diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 96efcfaad802d..705a5fc55b3fa 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1 @@ -Please fill out one of the templates on: https://github.com/Homebrew/homebrew-core/issues/new/choose - -To get formulae added or changed in Homebrew please file a [Pull Request](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md) - -If you want to ask a question please do so on our Discourse: https://discourse.brew.sh - -We will close issues asking questions or requesting formulae changes without comment. \ No newline at end of file +# Please fill out one of the templates on: https://github.com/Homebrew/homebrew-core/issues/new/choose or we will close it without comment. diff --git a/.github/ISSUE_TEMPLATE/Reproducible-Bug-Report.md b/.github/ISSUE_TEMPLATE/Reproducible-Bug-Report.md deleted file mode 100644 index f6635b5a7b4e8..0000000000000 --- a/.github/ISSUE_TEMPLATE/Reproducible-Bug-Report.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Reproducible Bug Report -about: Submit an issue so we can investigate - ---- - -**Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.** - -- [ ] are reporting a bug others will be able to reproduce and not asking a question or requesting software. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh. To get software added or changed in Homebrew please file a [Pull Request](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md) -- [ ] have a problem with `brew install` (or `upgrade`, `reinstall`) a single, official formula (not cask)? If it's a general `brew` problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a `brew cask` problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap. -- [ ] ran `brew update` and can still reproduce the problem? -- [ ] ran `brew doctor`, fixed all issues and can still reproduce the problem? -- [ ] ran `brew gist-logs ` (where `` is the name of the formula that failed) and included the output link? -- [ ] if `brew gist-logs` didn't work: ran `brew config` and `brew doctor` and included their output with your issue? - -To help us debug your issue please explain: -- What you were trying to do (and why) -- What happened (include command output) -- What you expected to happen -- Step-by-step reproduction instructions (by running `brew install` commands) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000000000..7c912ea6839eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,49 @@ +name: New issue for Reproducible Bug +description: "If you're sure it's reproducible and not just your machine: submit an issue so we can investigate." +type: "Bug" +body: + - type: markdown + attributes: + value: Please note we will close your issue without comment if you do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again. + - type: textarea + attributes: + render: shell + label: "`brew config` AND `brew doctor` output OR `brew gist-logs ` link" + validations: + required: true + - type: checkboxes + attributes: + label: Verification + description: Please verify that you've followed these steps. If you cannot truthfully check these boxes, open a discussion at https://github.com/orgs/Homebrew/discussions instead. + options: + - label: My `brew doctor` output says `Your system is ready to brew.` and am still able to reproduce my issue. + required: true + - label: I ran `brew update` and am still able to reproduce my issue. + required: true + - label: I have resolved all warnings from `brew doctor` and that did not fix my problem. + required: true + - label: I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates. + required: true + - label: My issue is not about a failure to build a formula from source. + required: true + - type: textarea + attributes: + label: What were you trying to do (and why)? + validations: + required: true + - type: textarea + attributes: + label: What happened (include all command output)? + validations: + required: true + - type: textarea + attributes: + label: What did you expect to happen? + validations: + required: true + - type: textarea + attributes: + render: shell + label: Step-by-step reproduction instructions (by running `brew` commands) + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000..445cfe3b61749 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,15 @@ +blank_issues_enabled: false + +contact_links: + - name: Request a change to a formula + url: https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request + about: Is something missing in a formula? Follow this guide to request new features in formulae. + - name: Get help in GitHub Discussions + url: https://github.com/orgs/Homebrew/discussions + about: Have a question? Not sure if your issue affects everyone reproducibly? The quickest way to get help is on Homebrew's GitHub Discussions! + - name: New issue on Homebrew/brew + url: https://github.com/Homebrew/brew/issues/new/choose + about: Having a `brew` problem that's not from a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/brew (the Homebrew package manager). + - name: New issue on Homebrew/homebrew-cask + url: https://github.com/Homebrew/homebrew-cask/issues/new/choose + about: Having a Homebrew Cask problem? Report it to Homebrew/homebrew-cask (the cask tap/repository) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 414cec55ea6e9..027521355d03f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,10 @@ -- [ ] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md)? + + +- [ ] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/HEAD/CONTRIBUTING.md)? +- [ ] Have you ensured that your commits follow the [commit style guide](https://docs.brew.sh/Formula-Cookbook#commit)? - [ ] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change? -- [ ] Have you built your formula locally with `brew install --build-from-source `, where `` is the name of the formula you're submitting? +- [ ] Have you built your formula locally with `HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source `, where `` is the name of the formula you're submitting? - [ ] Is your test running fine `brew test `, where `` is the name of the formula you're submitting? -- [ ] Does your build pass `brew audit --strict ` (after doing `brew install `)? +- [ ] Does your build pass `brew audit --strict ` (after doing `HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source `)? If this is a new formula, does it pass `brew audit --new `? ----- diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000000000..c3ad7063f8a32 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,7 @@ +self-hosted-runner: + # Labels of self-hosted runner in array of strings. + labels: [] +# Configuration variables in array of strings defined in your repository or +# organization. `null` means disabling configuration variables check. +# Empty array means no configuration variable is allowed. +config-variables: [] diff --git a/.github/codeql/extensions/homebrew-actions.yml b/.github/codeql/extensions/homebrew-actions.yml new file mode 100644 index 0000000000000..8d4091650bff2 --- /dev/null +++ b/.github/codeql/extensions/homebrew-actions.yml @@ -0,0 +1,7 @@ +# This file is synced from the `.github` repository, do not modify it directly. +extensions: + - addsTo: + pack: codeql/actions-all + extensible: trustedActionsOwnerDataModel + data: + - ["Homebrew"] diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000000..eb60bf0305731 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,3 @@ +# Formula Code Review + +Read formula documentation in `ls $(brew --repo)/docs/*ormula*.md`. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000000..0d8aabb29615a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +# This file is synced from the `.github` repository, do not modify it directly. +--- +version: 2 +multi-ecosystem-groups: + all: + schedule: + interval: weekly + day: friday + time: '08:00' + timezone: Etc/UTC +updates: +- package-ecosystem: github-actions + directory: "/" + multi-ecosystem-group: all + patterns: + - "*" + allow: + - dependency-type: all + diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index dcd0e8f706014..0000000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration for lock-threads - https://github.com/dessant/lock-threads - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 30 -# Comment to post before locking. Set to `false` to disable -lockComment: false -# Issues or pull requests with these labels will not be locked -# exemptLabels: -# - no-locking -# Limit to only `issues` or `pulls` -# only: issues -# Add a label when locking. Set to `false` to disable -lockLabel: outdated diff --git a/.github/no-response.yml b/.github/no-response.yml deleted file mode 100644 index cddf6410d5ebc..0000000000000 --- a/.github/no-response.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration for probot-no-response - https://github.com/probot/no-response - -# Number of days of inactivity before an Issue is closed for lack of response -daysUntilClose: 14 -# Label requiring a response -responseRequiredLabel: needs response -# Comment to post when closing an Issue for lack of response. Set to `false` to disable -closeComment: > - This issue has been automatically closed because there has been no response - to our request for more information from the original author. With only the - information that is currently in the issue, we don't have enough information - to take action. Please reach out if you have or find the answers we need so - that we can investigate further. diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index ab4bd7fe44dff..0000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 21 -# Number of days of inactivity before a stale Issue or Pull Request is closed -daysUntilClose: 7 -# Issues or Pull Requests with these labels will never be considered stale -exemptLabels: - - gsoc-outreachy - - help wanted - - in progress -# Label to use when marking as stale -staleLabel: stale -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. diff --git a/.github/support.yml b/.github/support.yml deleted file mode 100644 index f955781d8459b..0000000000000 --- a/.github/support.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for support-requests - https://github.com/dessant/support-requests - -# Label used to mark issues as support requests -supportLabel: support-request -# Comment to post on issues marked as support requests. Add a link -# to a support page, or set to `false` to disable -supportComment: > - We use the issue tracker exclusively for bug reports. - However, this issue appears to be a support request. Please use our - [Discourse](https://discourse.brew.sh) or - [IRC channel](irc://irc.freenode.net/#machomebrew) to get help with - the project. -# Whether to close issues marked as support requests -close: true -# Whether to lock issues marked as support requests -lock: true diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000000000..026a2aaa21ed8 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,98 @@ +# This file is synced from the `.github` repository, do not modify it directly. +name: Actionlint + +on: + push: + branches: + - main + - master + pull_request: + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: "actionlint-${{ github.ref }}" + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_ENV_HINTS: 1 + +permissions: {} + +jobs: + workflow_syntax: + if: github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + permissions: + contents: read + container: + image: ghcr.io/homebrew/ubuntu22.04:main + steps: + - name: Set up Homebrew + id: setup-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: false + cask: false + + - name: Install tools + run: brew install actionlint shellcheck zizmor + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + + - run: zizmor --format sarif . > results.sarif + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload SARIF file + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + # We can't use the SARIF file when triggered by `merge_group` so we don't upload it. + if: always() && github.event_name != 'merge_group' + with: + name: results.sarif + path: results.sarif + + - name: Set up actionlint + run: | + # In homebrew-core, setting `shell: /bin/bash` prevents shellcheck from running on + # those steps, so let's change them to `shell: bash` temporarily for better linting. + sed -i 's|shell: /bin/bash -x|shell: bash -x|' .github/workflows/*.y*ml + + # In homebrew-core, the JSON matcher needs to be accessible to the container host. + cp "$(brew --repository)/.github/actionlint-matcher.json" "$HOME" + + echo "::add-matcher::$HOME/actionlint-matcher.json" + + - run: actionlint + + upload_sarif: + needs: workflow_syntax + # We want to always upload this even if `actionlint` failed. + # This is only available on public repositories. + if: > + always() && + !contains(fromJSON('["cancelled", "skipped"]'), needs.workflow_syntax.result) && + !github.event.repository.private && + github.event_name != 'merge_group' + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Download SARIF file + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: results.sarif + path: results.sarif + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2 + with: + sarif_file: results.sarif + category: zizmor diff --git a/.github/workflows/autobump.yml b/.github/workflows/autobump.yml new file mode 100644 index 0000000000000..c94c275b33344 --- /dev/null +++ b/.github/workflows/autobump.yml @@ -0,0 +1,65 @@ +name: Bump formulae on schedule or request + +on: + push: + branches: + - main + - master + paths: + - .github/workflows/autobump.yml + workflow_dispatch: + inputs: + formulae: + description: Custom list of formulae to livecheck and bump if outdated + required: false + schedule: + # Every 3 hours from 1 through 23 with an offset of 45 minutes + - cron: "45 1-23/3 * * *" + +permissions: + contents: read + +defaults: + run: + shell: bash -xeuo pipefail {0} + +jobs: + autobump: + if: github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + env: + GNUPGHOME: /tmp/gnupghome + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Configure Git user + uses: Homebrew/actions/git-user-config@main + with: + username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Bump formulae + env: + HOMEBREW_TEST_BOT_AUTOBUMP: 1 + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_CORE_REPO_WORKFLOW_TOKEN }} + HOMEBREW_GIT_COMMITTER_NAME: BrewTestBot + HOMEBREW_GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com + FORMULAE: ${{ inputs.formulae }} + run: | + BREW_BUMP=(brew bump --no-fork --open-pr --formulae --bump-synced) + if [[ -n "${FORMULAE-}" ]]; then + xargs -t "${BREW_BUMP[@]}" <<<"${FORMULAE}" + else + "${BREW_BUMP[@]}" --auto --tap=Homebrew/core + fi diff --git a/.github/workflows/automerge-from-merge-queue.yml b/.github/workflows/automerge-from-merge-queue.yml new file mode 100644 index 0000000000000..1e725c4cff934 --- /dev/null +++ b/.github/workflows/automerge-from-merge-queue.yml @@ -0,0 +1,269 @@ +name: automerge from merge_queue + +on: + workflow_run: + workflows: + - CI + types: + - completed + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: automerge-merge_queue-${{ github.event.workflow_run.event }}-${{ github.event.workflow_run.id }} + cancel-in-progress: true + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + +jobs: + status-check: + runs-on: ubuntu-latest + if: > + github.repository_owner == 'Homebrew' && + github.event.workflow_run.conclusion != 'success' && + github.event.workflow_run.event == 'merge_group' + outputs: + pull-number: ${{ steps.pr.outputs.number }} + publishable: ${{ steps.check-labels.outputs.publishable }} + approved: ${{ steps.approval-status.outputs.approved }} + complete: ${{ steps.approval-status.outputs.complete }} + mergeable: ${{ steps.approval-status.outputs.mergeable }} + permissions: + contents: read + pull-requests: read + actions: read + steps: + - name: Upload metadata + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: event_payload + path: ${{ github.event_path }} + + - name: Dump metadata + run: jq . "$GITHUB_EVENT_PATH" + + - name: Get PR number + id: pr + env: + GH_TOKEN: ${{ github.token }} + WORKFLOW_RUN_NODE_ID: ${{ github.event.workflow_run.node_id }} + QUERY: |- + query($id: ID!) { + node(id: $id) { + ... on WorkflowRun { + checkSuite { + commit { + parents(last: 2) { + nodes { + oid + associatedPullRequests(last: 1) { + nodes { + number + } + } + } + } + } + } + } + } + } + run: | + # Get the latest PR associated with the second parent of the merge commit created for the merge_group. + head_commit_data="$( + gh api graphql \ + --field id="$WORKFLOW_RUN_NODE_ID" \ + --raw-field query="$QUERY" \ + --jq '.data.node.checkSuite.commit.parents.nodes | last' + )" + number="$(jq --raw-output '.associatedPullRequests.nodes[].number' <<<"$head_commit_data")" + + # Fall back to using the commit SHA if the associated PR is not available from the GraphQL API. + if [[ -z "$number" ]] + then + commit_sha="$(jq --raw-output '.oid' <<<"$head_commit_data")" + number="$(gh pr list --search "$commit_sha" --state open --limit 1 --json number --jq '.[].number' --repo "$GITHUB_REPOSITORY")" + fi + + if [[ -z "$number" ]] + then + echo "::error::Missing PR number!" + exit 1 + fi + + echo "number=$number" >> "$GITHUB_OUTPUT" + + - name: Check PR labels and timeline for merge queue events + id: check-labels + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.pr.outputs.number }} + QUERY: |- + query ($owner: String!, $name: String!, $pr: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $pr) { + timelineItems(itemTypes: [REMOVED_FROM_MERGE_QUEUE_EVENT], last: 5) { + totalCount + } + } + } + } + run: | + publishable=true + GITHUB_REPOSITORY_NAME="${GITHUB_REPOSITORY#"${GITHUB_REPOSITORY_OWNER}"/}" + + while IFS='' read -r label + do + if [[ "$label" = "pre-release" ]] || + [[ "$label" = "CI-published-bottle-commits" ]] + then + publishable=false + break + fi + done < <( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq '.labels[].name' + ) + + removed_from_merge_queue_count="$( + gh api graphql \ + --field owner="$GITHUB_REPOSITORY_OWNER" \ + --field name="$GITHUB_REPOSITORY_NAME" \ + --field pr="$PR" \ + --raw-field query="$QUERY" \ + --jq '.data.repository.pullRequest.timelineItems.totalCount' + )" + + if [[ "$removed_from_merge_queue_count" -gt 3 ]] + then + # We've already tried to merge this PR multiple times. + publishable=false + fi + + echo "publishable=$publishable" >> "$GITHUB_OUTPUT" + + - name: Get approval and CI status + if: fromJson(steps.check-labels.outputs.publishable) + id: approval-status + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.pr.outputs.number }} + QUERY: |- + query ($owner: String!, $name: String!, $pr: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $pr) { + reviewDecision + commits(last: 1) { + nodes { + commit { + checkSuites(last: 100) { + nodes { + conclusion + workflowRun { + workflow { + name + } + } + } + } + } + } + } + } + } + } + run: | + attempt=0 + max_attempts=5 + timeout=5 + GITHUB_REPOSITORY_NAME="${GITHUB_REPOSITORY#"${GITHUB_REPOSITORY_OWNER}"/}" + + while [[ "$attempt" -lt "$max_attempts" ]] + do + attempt=$(( attempt + 1 )) + + query_response="$( + gh api graphql \ + --field owner="$GITHUB_REPOSITORY_OWNER" \ + --field name="$GITHUB_REPOSITORY_NAME" \ + --field pr="$PR" \ + --raw-field query="$QUERY" \ + --jq '.data.repository.pullRequest' + )" + + approved="$( + jq --raw-output '.reviewDecision == "APPROVED"' <<< "$query_response" + )" + complete="$( + jq --raw-output \ + '.commits.nodes[].commit.checkSuites.nodes | + map(select(.workflowRun.workflow.name == "CI")) | + last | .conclusion == "SUCCESS"' <<< "$query_response" + )" + # See https://github.com/octokit/octokit.net/issues/1763 for possible `mergeable_state` values. + mergeable="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq '(.mergeable_state == "clean") and (.draft | not)' + )" + + if [[ "$approved" = "true" ]] && + [[ "$complete" = "true" ]] && + [[ "$mergeable" = "true" ]] || + [[ "$attempt" -eq "$max_attempts" ]] + then + break + fi + + echo "::notice ::PR #$PR status:" + echo "::notice ::Approved? $approved" + echo "::notice ::CI Complete? $complete" + echo "::notice ::Mergeable? $mergeable" + echo "::notice ::Checking again in ${timeout}s..." + sleep "$timeout" + timeout=$(( timeout * 2 )) + done + + { + echo "approved=$approved" + echo "complete=$complete" + echo "mergeable=$mergeable" + } >> "$GITHUB_OUTPUT" + + merge: + runs-on: ubuntu-latest + needs: status-check + if: > + fromJson(needs.status-check.outputs.publishable) && + fromJson(needs.status-check.outputs.approved) && + fromJson(needs.status-check.outputs.complete) && + fromJson(needs.status-check.outputs.mergeable) + container: + image: ghcr.io/homebrew/ubuntu22.04:main + permissions: + contents: read + pull-requests: read + actions: write # to dispatch publish workflow + steps: + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: false + cask: false + + - run: brew pr-publish --branch=main "$PR" + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ needs.status-check.outputs.pull-number }} diff --git a/.github/workflows/automerge-triggers.yml b/.github/workflows/automerge-triggers.yml new file mode 100644 index 0000000000000..1ea93fa1666da --- /dev/null +++ b/.github/workflows/automerge-triggers.yml @@ -0,0 +1,30 @@ +name: Trigger automerge + +on: + pull_request_review: + types: + - submitted + pull_request_target: + types: + - unlabeled + - ready_for_review + +defaults: + run: + shell: bash -xeuo pipefail {0} + +env: + HOMEBREW_DISABLE_LOAD_FORMULA: 1 + +permissions: {} + +jobs: + check: + if: > + github.repository_owner == 'Homebrew' && + ((github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || + (github.event_name == 'pull_request_target' && + (github.event.action == 'ready_for_review' || github.event.label.name == 'automerge-skip'))) + runs-on: ubuntu-latest + steps: + - run: true # This suffices to trigger `automerge.yml`. diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000000000..6e47e0fc57b75 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,199 @@ +name: automerge + +on: + workflow_run: + workflows: + - CI + - Trigger automerge + types: + - completed + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: automerge-${{ github.event.workflow_run.event }}-${{ github.event.workflow_run.id }} + cancel-in-progress: true + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + +jobs: + status-check: + runs-on: ubuntu-latest + if: > + github.repository_owner == 'Homebrew' && + github.event.workflow_run.conclusion == 'success' && + startsWith(github.event.workflow_run.event, 'pull_request') + outputs: + pull-number: ${{ steps.pr.outputs.number }} + publishable: ${{ steps.check-labels.outputs.publishable }} + approved: ${{ steps.approval-status.outputs.approved }} + complete: ${{ steps.approval-status.outputs.complete }} + mergeable: ${{ steps.approval-status.outputs.mergeable }} + permissions: + contents: read + pull-requests: read + actions: read + steps: + - uses: Homebrew/actions/find-related-workflow-run-id@main + with: + run-id: ${{ github.event.workflow_run.id }} + workflow-name: Triage tasks + + - name: Download `event_payload` artifact + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: event_payload + github-token: ${{ github.token }} + run-id: ${{ env.workflow_run_id }} + + - run: echo "number=$(jq --raw-output .number event.json)" >> "$GITHUB_OUTPUT" + id: pr + + - name: Check PR labels + id: check-labels + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.pr.outputs.number }} + run: | + publishable=true + while IFS='' read -r label + do + if [[ "$label" = "CI-published-bottle-commits" ]] || + [[ "$label" = "automerge-skip" ]] || + [[ "$label" = "maintainer feedback" ]] || + [[ "$label" = "pre-release" ]] + then + publishable=false + break + fi + done < <( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq '.labels[].name' + ) + echo "publishable=$publishable" >> "$GITHUB_OUTPUT" + + - name: Get approval and CI status + if: fromJson(steps.check-labels.outputs.publishable) + id: approval-status + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.pr.outputs.number }} + QUERY: |- + query ($owner: String!, $name: String!, $pr: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $pr) { + reviewDecision + commits(last: 1) { + nodes { + commit { + checkSuites(last: 100) { + nodes { + conclusion + workflowRun { + workflow { + name + } + } + } + } + } + } + } + } + } + } + run: | + attempt=0 + max_attempts=5 + timeout=5 + GITHUB_REPOSITORY_NAME="${GITHUB_REPOSITORY#"${GITHUB_REPOSITORY_OWNER}"/}" + + while [[ "$attempt" -lt "$max_attempts" ]] + do + attempt=$(( attempt + 1 )) + + query_response="$( + gh api graphql \ + --field owner="$GITHUB_REPOSITORY_OWNER" \ + --field name="$GITHUB_REPOSITORY_NAME" \ + --field pr="$PR" \ + --raw-field query="$QUERY" \ + --jq '.data.repository.pullRequest' + )" + + approved="$( + jq --raw-output '.reviewDecision == "APPROVED"' <<< "$query_response" + )" + complete="$( + jq --raw-output \ + '.commits.nodes[].commit.checkSuites.nodes | + map(select(.workflowRun.workflow.name == "CI")) | + last | .conclusion == "SUCCESS"' <<< "$query_response" + )" + # See https://github.com/octokit/octokit.net/issues/1763 for possible `mergeable_state` values. + mergeable="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq '(.mergeable_state == "clean") and (.draft | not)' + )" + + if [[ "$approved" = "true" ]] && + [[ "$complete" = "true" ]] && + [[ "$mergeable" = "true" ]] || + [[ "$attempt" -eq "$max_attempts" ]] + then + break + fi + + echo "::notice ::PR #$PR status:" + echo "::notice ::Approved? $approved" + echo "::notice ::CI Complete? $complete" + echo "::notice ::Mergeable? $mergeable" + echo "::notice ::Checking again in ${timeout}s..." + sleep "$timeout" + timeout=$(( timeout * 2 )) + done + + { + echo "approved=$approved" + echo "complete=$complete" + echo "mergeable=$mergeable" + } >> "$GITHUB_OUTPUT" + + merge: + runs-on: ubuntu-latest + needs: status-check + if: > + fromJson(needs.status-check.outputs.publishable) && + fromJson(needs.status-check.outputs.approved) && + fromJson(needs.status-check.outputs.complete) && + fromJson(needs.status-check.outputs.mergeable) + container: + image: ghcr.io/homebrew/ubuntu22.04:main + permissions: + contents: read + pull-requests: read + actions: write # to dispatch publish workflow + steps: + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: false + cask: false + + - run: brew pr-publish --branch=main "$PR" + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ needs.status-check.outputs.pull-number }} diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml new file mode 100644 index 0000000000000..d46d0d94d3455 --- /dev/null +++ b/.github/workflows/cache.yml @@ -0,0 +1,96 @@ +name: Populate gem cache + +on: + pull_request: + paths: + - .github/workflows/cache.yml + push: + paths: + - .github/workflows/cache.yml + branches: + - main + - master + schedule: + - cron: '30 19/6 * * *' + workflow_dispatch: + +permissions: + contents: read + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: cache-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + determine-runners: + if: github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + runners: ${{ steps.determine-runners.outputs.runners }} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: false + cask: false + + - name: Determine runners to use for this job + id: determine-runners + env: + HOMEBREW_MACOS_TIMEOUT: 30 + run: brew determine-test-runners --all-supported + + cache: + needs: determine-runners + strategy: + matrix: + include: ${{ fromJson(needs.determine-runners.outputs.runners) }} + fail-fast: false + name: ${{ matrix.name }} + runs-on: ${{ matrix.runner }} + timeout-minutes: ${{ matrix.timeout }} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: false + cask: false + + - name: Cleanup runner + if: matrix.cleanup + working-directory: ${{ runner.temp }} + run: brew test-bot --only-cleanup-before + + - name: Get cache key + id: cache-key + run: | + cache_key_prefix="${RUNNER_OS}" + if [ "${RUNNER_OS}" = macOS ] + then + macos_version="$(sw_vers -productVersion)" + cache_key_prefix="${macos_version%%.*}-$(uname -m)" + fi + echo "prefix=${cache_key_prefix}" >> "${GITHUB_OUTPUT}" + + - name: Cache Homebrew Bundler gems + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: ${{ steps.set-up-homebrew.outputs.gems-path }} + key: ${{ steps.cache-key.outputs.prefix }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} + restore-keys: ${{ steps.cache-key.outputs.prefix }}-rubygems- + + - name: Setup Homebrew test environment + working-directory: ${{ runner.temp }} + run: brew test-bot --only-setup diff --git a/.github/workflows/clean-up-closed-prs.yml b/.github/workflows/clean-up-closed-prs.yml new file mode 100644 index 0000000000000..bc79b1e48e0ad --- /dev/null +++ b/.github/workflows/clean-up-closed-prs.yml @@ -0,0 +1,78 @@ +name: Clean up closed PRs + +on: + pull_request_target: + types: + - closed + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number }} + cancel-in-progress: true + +env: + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + HOMEBREW_DISABLE_LOAD_FORMULA: 1 + PR: ${{ github.event.number }} + +jobs: + cancel-tests: + if: > + github.repository_owner == 'Homebrew' && + !github.event.pull_request.merged + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + permissions: + contents: read + actions: write # for `gh run cancel` + checks: read # for `GitHub.get_workflow_run` + steps: + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: false + cask: false + + - name: Check CI status + id: check + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + brew check-ci-status --cancel "$PR" + + - name: Cancel tests + if: fromJson(steps.check.outputs.cancellable-run-id) != null + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ fromJson(steps.check.outputs.cancellable-run-id) }} + run: | + echo "::notice ::Cancelling tests on closed PR #$PR" + gh run cancel "$RUN_ID" + + delete-branch: + if: > + github.repository_owner == 'Homebrew' && + github.event.pull_request.head.repo.full_name == github.repository && + !github.event.pull_request.merged + runs-on: ubuntu-latest + # Ignore errors as branch may already be deleted + continue-on-error: true + permissions: + contents: write + steps: + - name: Delete branch + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: ${{ github.event.pull_request.head.ref }} + run: | + gh api \ + -X DELETE \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/git/refs/heads/$BRANCH" diff --git a/.github/workflows/create-replacement-pr.yml b/.github/workflows/create-replacement-pr.yml new file mode 100644 index 0000000000000..b3c02e6785a91 --- /dev/null +++ b/.github/workflows/create-replacement-pr.yml @@ -0,0 +1,297 @@ +name: Create replacement pull request +run-name: "Replace PR #${{ inputs.pull_request }}" + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.inputs.pull_request }}-${{ github.event.inputs.upload }} + cancel-in-progress: ${{ !fromJson(github.event.inputs.upload) }} + +on: + workflow_dispatch: + inputs: + pull_request: + description: Pull request number + type: number + required: true + autosquash: + description: "Squash pull request commits according to Homebrew style? (default: true)" + type: boolean + required: false + default: true + upload: + description: > + Upload bottles built from original pull request? (default: false) + Warning: This destroys status check information when used with autosquash! + type: boolean + required: false + default: false + warn_on_upload_failure: + description: "Pass `--warn-on-upload-failure` to `brew pr-pull`? (default: false)" + type: boolean + required: false + default: false + message: + description: "Message to include when autosquashing revision bumps, deletions, and rebuilds (requires autosquash)" + required: false + +env: + PR: ${{ inputs.pull_request }} + GNUPGHOME: /tmp/gnupghome + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_FROM_API: 1 + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + RUN_URL: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} + REPLACEMENT_BRANCH: PR/${{ inputs.pull_request }} + +jobs: + create: + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + permissions: + contents: read + pull-requests: write # for `post-comment`, `gh api`, `gh pr edit` + repository-projects: write # for `gh pr edit` + attestations: write # for actions/attest-build-provenance + id-token: write # for actions/attest-build-provenance + steps: + - name: Post comment once started + uses: Homebrew/actions/post-comment@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue: ${{ env.PR }} + body: ":shipit: @${{ github.actor }} has [requested creation of a replacement PR](${{ env.RUN_URL }})." + bot_body: ":robot: An automated task has [requested creation of a replacement PR](${{ env.RUN_URL }})." + bot: github-actions[bot] + + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Get reviewers + id: reviewers + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + review_data="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR/reviews" + )" + + reviewer_filter='map(select(.author_association == "MEMBER")) | map(.user.login) | unique' + reviewers="$(jq --compact-output "$reviewer_filter" <<< "$review_data")" + approved="$(jq --raw-output 'any(.[].state; .== "APPROVED")' <<< "$review_data")" + + # See https://github.com/octokit/octokit.net/issues/1763 for possible `mergeable_state` values. + mergeable="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq '(.mergeable_state == "clean") and (.draft | not)' + )" + + { + echo "reviewers=$reviewers" + echo "approved=$approved" + echo "mergeable=$mergeable" + } >> "$GITHUB_OUTPUT" + + - name: Check approval if needed + if: > + inputs.upload && + !(fromJson(steps.reviewers.outputs.approved) && fromJson(steps.reviewers.outputs.mergeable)) + run: | + echo "::error ::Refusing to upload bottles because PR #$PR is not mergeable!" + exit 1 + + - name: Configure Git user + id: git-user-config + uses: Homebrew/actions/git-user-config@main + with: + username: BrewTestBot + + - name: Checkout PR branch + if: ${{ !inputs.autosquash }} + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr checkout "$PR" --repo "$GITHUB_REPOSITORY" + + - name: Checkout replacement PR branch + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + env: + START_POINT: ${{ inputs.autosquash && 'origin/main' || 'HEAD' }} + run: | + if git ls-remote --exit-code --heads origin "$REPLACEMENT_BRANCH" + then + echo "::error ::Branch $REPLACEMENT_BRANCH already exists!" + exit 1 + fi + git checkout -b "$REPLACEMENT_BRANCH" "$START_POINT" + + - name: Dismiss approvals + if: fromJson(steps.reviewers.outputs.approved) + uses: Homebrew/actions/dismiss-approvals@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + pr: ${{ env.PR }} + message: Replacement PR dispatched + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Pull PR + id: pr-pull + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + env: + BREWTESTBOT_NAME_EMAIL: "BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>" + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_CORE_PUBLIC_REPO_EMAIL_TOKEN }} + MESSAGE: ${{ inputs.message }} + AUTOSQUASH_FLAG: ${{ inputs.autosquash && '--autosquash' || '' }} + CLEAN_FLAG: ${{ !inputs.autosquash && '--clean' || '' }} + NO_CHERRY_PICK_FLAG: ${{ !inputs.autosquash && '--no-cherry-pick' || '' }} + run: | + # Don't quote arguments that might be empty; this causes errors. + brew pr-pull \ + --no-upload \ + --debug \ + --branch-okay \ + --workflows=tests.yml \ + --committer="$BREWTESTBOT_NAME_EMAIL" \ + --root-url="https://ghcr.io/v2/homebrew/core" \ + --retain-bottle-dir \ + ${AUTOSQUASH_FLAG:+"${AUTOSQUASH_FLAG}"} \ + ${CLEAN_FLAG:+"--clean"} \ + ${NO_CHERRY_PICK_FLAG:+"--no-cherry-pick"} \ + ${MESSAGE:+"--message=${MESSAGE}"} \ + "$PR" + + - name: Generate build provenance + uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 + with: + subject-path: '${{ steps.pr-pull.outputs.bottle_path }}/*.tar.gz' + if: inputs.upload + + - name: Upload bottles to GitHub Packages + id: pr-upload + if: inputs.upload + working-directory: ${{ steps.pr-pull.outputs.bottle_path }} + env: + BREWTESTBOT_NAME_EMAIL: "BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>" + HOMEBREW_GITHUB_PACKAGES_USER: brewtestbot + HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ secrets.HOMEBREW_CORE_GITHUB_PACKAGES_TOKEN }} + WARN_ON_UPLOAD_FAILURE_FLAG: ${{ inputs.warn_on_upload_failure && '--warn-on-upload-failure' || '' }} + run: | + # Don't quote arguments that might be empty; this causes errors when `brew` + # interprets them as empty arguments when we want `brew` to ignore them instead. + brew pr-upload \ + --debug \ + --committer="$BREWTESTBOT_NAME_EMAIL" \ + --root-url="https://ghcr.io/v2/homebrew/core" \ + ${WARN_ON_UPLOAD_FAILURE_FLAG:+"${WARN_ON_UPLOAD_FAILURE_FLAG}"} + + + - name: Push commits + uses: Homebrew/actions/git-try-push@main + with: + token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + branch: ${{ env.REPLACEMENT_BRANCH }} + env: + GIT_COMMITTER_NAME: ${{ steps.git-user-config.outputs.name }} + GIT_COMMITTER_EMAIL: ${{ steps.git-user-config.outputs.email }} + + - name: Open replacement pull request + id: create-pr + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + env: + GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + REVIEWERS: ${{ join(fromJson(steps.reviewers.outputs.reviewers)) }} + LABELS: ${{ inputs.upload && 'CI-published-bottle-commits' || '' }} + run: | + cat < body.txt + Created by [\`create-replacement-pr.yml\`]($RUN_URL) + + ----- + + Closes #$PR + MESSAGE + + original_title="$(gh pr view "$PR" --json title --jq '.title' --repo "$GITHUB_REPOSITORY")" + gh pr create \ + --base "$GITHUB_REF" \ + --title "$original_title (replacement for #$PR)" \ + --body-file body.txt \ + --head "$REPLACEMENT_BRANCH" \ + --reviewer "$REVIEWERS" \ + --label "$LABELS" \ + --repo "$GITHUB_REPOSITORY" + + pull_number="$(gh pr list --head "$REPLACEMENT_BRANCH" --limit 1 --json number --jq '.[].number' --repo "$GITHUB_REPOSITORY")" + echo "pull_number=$pull_number" >> "$GITHUB_OUTPUT" + + - name: Approve replacement PR if applicable + if: > + fromJson(steps.reviewers.outputs.approved) && + fromJson(steps.reviewers.outputs.mergeable) + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPLACEMENT_PR: ${{ steps.create-pr.outputs.pull_number }} + run: gh pr review --approve "$REPLACEMENT_PR" --repo "$GITHUB_REPOSITORY" + + - name: Enable automerge for replacement PR if applicable + if: inputs.upload + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + env: + GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + REPLACEMENT_PR: ${{ steps.create-pr.outputs.pull_number }} + run: | + gh pr merge "$REPLACEMENT_PR" \ + --auto \ + --merge \ + --match-head-commit "$(git rev-parse HEAD)" \ + --repo "$GITHUB_REPOSITORY" + + - name: Label replaced PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr edit --add-label automerge-skip --add-label superseded "$PR" --repo "$GITHUB_REPOSITORY" + + - name: Mark replaced PR as draft + env: # We need a PAT here. https://github.com/github/docs/issues/8925#issuecomment-970255180 + GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + run: gh pr ready --undo "$PR" --repo "$GITHUB_REPOSITORY" + + - name: Post comment on success + uses: Homebrew/actions/post-comment@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue: ${{ env.PR }} + body: ":white_check_mark: @${{ github.actor }} replacement PR created at #${{ steps.create-pr.outputs.pull_number }}." + bot_body: ":white_check_mark: Replacement PR created at #${{ steps.create-pr.outputs.pull_number }}." + bot: github-actions[bot] + + - name: Post comment on failure + if: ${{ !success() }} + uses: Homebrew/actions/post-comment@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue: ${{ env.PR }} + body: ":warning: @${{ github.actor }} replacement PR creation [failed](${{ env.RUN_URL }})." + bot_body: ":warning: Replacement PR creation [failed](${{ env.RUN_URL }})." + bot: github-actions[bot] diff --git a/.github/workflows/dispatch-build-bottle.yml b/.github/workflows/dispatch-build-bottle.yml new file mode 100644 index 0000000000000..5966c58db06cf --- /dev/null +++ b/.github/workflows/dispatch-build-bottle.yml @@ -0,0 +1,357 @@ +name: Dispatch build bottle (for chosen OS versions) + +run-name: Build bottle of ${{ inputs.formula }} on ${{ inputs.runner }} + +on: + workflow_dispatch: + inputs: + runner: + description: Build runner(s) (macOS version or Linux) + required: true + formula: + description: Formula name + required: true + timeout: + description: "Build timeout (in minutes, default: 60 minutes)" + type: number + default: 60 + required: false + issue: + description: Issue number, where comment on failure would be posted + type: number + required: false + upload: + description: "Upload built bottles? (default: false)" + type: boolean + default: false + required: false + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_GITHUB_ACTIONS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_FROM_API: 1 + HOMEBREW_NO_BUILD_ERROR_ISSUES: 1 + HOMEBREW_ARM64_TESTING: 1 + RUN_URL: ${{github.event.repository.html_url}}/actions/runs/${{github.run_id}} + DISPATCH_BUILD_BOTTLE_SENDER: ${{ github.event.sender.login }} + DISPATCH_BUILD_BOTTLE_FORMULA: ${{ inputs.formula }} + DISPATCH_BUILD_BOTTLE_RUNNER: ${{ inputs.runner }} + DISPATCH_BUILD_BOTTLE_TIMEOUT: ${{ inputs.timeout }} + DISPATCH_BUILD_BOTTLE_ISSUE: ${{ inputs.issue }} + DISPATCH_BUILD_BOTTLE_UPLOAD: ${{ inputs.upload }} + +defaults: + run: + shell: bash -xeuo pipefail {0} + +# Intentionally the same as dispatch-rebottle +concurrency: bottle-${{ github.event.inputs.formula }} + +permissions: + contents: read + +jobs: + prepare: + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + runners: ${{steps.runner-matrix.outputs.result}} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Prepare runner matrix + id: runner-matrix + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + with: + script: | + const macOSRegex = /^(\d+(?:\.\d+)?)(?:-(arm64|x86_64))?$/; + const linuxRegex = /^(?:ubuntu-|linux-self-hosted-)/; + return context.payload.inputs.runner.split(",") + .map(s => s.trim()) + .filter(Boolean) + .map(s => { + const macOSMatch = macOSRegex.exec(s); + if (macOSMatch && s != "11-arm64") // Ephemeral runners + return {runner: `${macOSMatch[1]}-${macOSMatch[2] ?? "x86_64"}-${context.runId}-dispatch`, cleanup: false}; + else if (linuxRegex.test(s)) + return { + runner: s, + container: { + image: "ghcr.io/homebrew/ubuntu22.04:main", + options: "--user=linuxbrew -e GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED" + }, + workdir: "/github/home", + cleanup: false + }; + else + return {runner: s, cleanup: true}; + }); + + - name: Ensure homebrew/core is up-to-date + if: endsWith(github.ref, 'main') || endsWith(github.ref, 'master') + run: brew update + + - name: Check for existing bottle + shell: brew ruby {0} + env: + HOMEBREW_RUNNER_MATRIX: ${{ steps.runner-matrix.outputs.result }} + HOMEBREW_DISPATCHED_FORMULA: ${{ inputs.formula }} + run: | + matrix = JSON.parse(ENV.fetch("HOMEBREW_RUNNER_MATRIX")) + formula_name = ENV.fetch("HOMEBREW_DISPATCHED_FORMULA") + formula = Formulary.factory(formula_name) + exit_code = 0 + + matrix.each do |entry| + runner = entry.fetch("runner") + + bottle_tag = if runner.start_with?("ubuntu-") && runner.end_with?("-arm") + Utils::Bottles.tag(:arm64_linux) + elsif runner.start_with?("ubuntu") || runner.start_with?("linux") + Utils::Bottles.tag(:x86_64_linux) + elsif runner.match?(/^\d+-/) + os_version, arch, _ = *runner.split("-") + system = MacOSVersion.new(os_version).to_sym + arch = arch.to_sym + + Utils::Bottles::Tag.new(system:, arch:) + end + next if bottle_tag.blank? + + bottled_on_current_runner = formula.bottle_specification.tag?(bottle_tag, no_older_versions: true) + next unless bottled_on_current_runner + + exit_code = 1 + puts GitHub::Actions::Annotation.new( + :error, + "#{formula_name} already has a bottle for #{bottle_tag}!", + ) + end + + exit exit_code + + bottle: + needs: prepare + strategy: + matrix: + include: ${{fromJson(needs.prepare.outputs.runners)}} + runs-on: ${{matrix.runner}} + container: ${{matrix.container}} + timeout-minutes: ${{fromJson(github.event.inputs.timeout)}} + permissions: + contents: read + defaults: + run: + shell: /bin/bash -xeuo pipefail {0} + working-directory: ${{matrix.workdir || github.workspace}} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} + BOTTLES_DIR: ${{ matrix.workdir || github.workspace }}/bottles + steps: + - name: ${{inputs.formula}} + id: print_details + run: | + echo sender="${DISPATCH_BUILD_BOTTLE_SENDER}" + echo formula="${DISPATCH_BUILD_BOTTLE_FORMULA}" + echo runner="${DISPATCH_BUILD_BOTTLE_RUNNER}" + echo timeout="${DISPATCH_BUILD_BOTTLE_TIMEOUT}" + echo issue="${DISPATCH_BUILD_BOTTLE_ISSUE}" + echo upload="${DISPATCH_BUILD_BOTTLE_UPLOAD}" + + - name: Pre-test steps + uses: Homebrew/actions/pre-build@main + with: + bottles-directory: ${{ env.BOTTLES_DIR }} + cleanup: ${{ matrix.cleanup }} + + - working-directory: ${{ env.BOTTLES_DIR }} + run: | + brew test-bot \ + --only-formulae \ + --keep-old \ + --only-json-tab \ + --skip-online-checks \ + --skip-dependents \ + "${DISPATCH_BUILD_BOTTLE_FORMULA}" + + - name: Post-build steps + if: always() + uses: Homebrew/actions/post-build@main + with: + runner: ${{ matrix.runner }} + cleanup: ${{ matrix.cleanup }} + bottles-directory: ${{ env.BOTTLES_DIR }} + logs-directory: ${{ env.BOTTLES_DIR }}/logs + + upload: + permissions: + contents: read + issues: write # for Homebrew/actions/post-comment + pull-requests: write # for `gh pr edit` + attestations: write # for actions/attest-build-provenance + id-token: write # for actions/attest-build-provenance + runs-on: ubuntu-latest + needs: bottle + if: inputs.upload + container: + image: ghcr.io/homebrew/ubuntu22.04:main + env: + HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1 + GH_REPO: ${{github.repository}} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + BOTTLE_BRANCH: ${{github.actor}}/dispatch/${{inputs.formula}}/${{github.run_id}} + BOTTLES_DIR: ${{ github.workspace }}/bottles + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Download bottles from GitHub Actions + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + pattern: bottles_* + path: ${{ env.BOTTLES_DIR }} + merge-multiple: true + + - name: Configure Git user + id: git-user-config + uses: Homebrew/actions/git-user-config@main + with: + username: ${{ (github.actor != 'github-actions[bot]' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Generate build provenance + uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 + with: + subject-path: ${{ env.BOTTLES_DIR }}/*.tar.gz + + - name: Checkout branch for bottle commit + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + run: git checkout -b "$BOTTLE_BRANCH" origin/HEAD + + - name: Upload bottles to GitHub Packages + id: upload + env: + HOMEBREW_GITHUB_PACKAGES_USER: brewtestbot + HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{secrets.HOMEBREW_CORE_GITHUB_PACKAGES_TOKEN}} + BREWTESTBOT_NAME_EMAIL: "BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>" + HOMEBREW_CORE_PATH: ${{steps.set-up-homebrew.outputs.repository-path}} + working-directory: ${{ env.BOTTLES_DIR }} + run: | + brew pr-upload --verbose --keep-old --committer="$BREWTESTBOT_NAME_EMAIL" --root-url="https://ghcr.io/v2/homebrew/core" + echo "title=$(git -C "$HOMEBREW_CORE_PATH" log -1 --format='%s' "$BOTTLE_BRANCH")" >> "$GITHUB_OUTPUT" + echo "head_sha=$(git -C "$HOMEBREW_CORE_PATH" rev-parse HEAD)" >> "$GITHUB_OUTPUT" + + - name: Push commits + uses: Homebrew/actions/git-try-push@main + with: + token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + directory: ${{steps.set-up-homebrew.outputs.repository-path}} + branch: ${{env.BOTTLE_BRANCH}} + env: + GIT_COMMITTER_NAME: BrewTestBot + GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com + + - name: Open PR with bottle commit + id: create-pr + uses: Homebrew/actions/create-pull-request@main + with: + token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + base: ${{github.ref}} + head: ${{env.BOTTLE_BRANCH}} + title: ${{steps.upload.outputs.title}} + body: Created by [`brew dispatch-build-bottle`](${{env.RUN_URL}}) + labels: CI-published-bottle-commits + reviewers: ${{github.actor}} + + - name: Enable automerge + env: + GH_TOKEN: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + NODE_ID: ${{steps.create-pr.outputs.node_id}} + SHA: ${{steps.upload.outputs.head_sha}} + MUTATION: |- + mutation ($input: EnablePullRequestAutoMergeInput!) { + enablePullRequestAutoMerge(input: $input) { + clientMutationId + } + } + run: | + gh api graphql \ + --field "input[pullRequestId]=$NODE_ID" \ + --field "input[expectedHeadOid]=$SHA" \ + --raw-field query="$MUTATION" + + - name: Approve PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{steps.create-pr.outputs.number}} + run: | + gh api \ + --method POST \ + --header "Accept: application/vnd.github+json" \ + --header "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$GITHUB_REPOSITORY/pulls/$PR/reviews" \ + --field "event=APPROVE" + + - name: Wait until PR is merged + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.create-pr.outputs.number }} + run: | + # Hold the `concurrency` lock for up to another 10 minutes while the PR has not yet been merged. + sleep 300 + + attempt=0 + max_attempts=5 + sleep_time=10 + + while (( attempt < max_attempts )) + do + if jq --exit-status .merged_at + then + break + fi < <( # We could use `gh pr view`, but that uses 2 API calls. + gh api \ + --header "Accept: application/vnd.github+json" \ + --header "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$GITHUB_REPOSITORY/pulls/$PR" + ) + + sleep "$sleep_time" + + sleep_time=$(( sleep_time * 2 )) + attempt=$(( attempt + 1 )) + done + + comment: + permissions: + issues: write # for Homebrew/actions/post-comment + pull-requests: write # for Homebrew/actions/post-comment + needs: [bottle, upload] + if: failure() && inputs.issue > 0 + runs-on: ubuntu-latest + steps: + - name: Post comment on failure + uses: Homebrew/actions/post-comment@main + with: + token: ${{secrets.GITHUB_TOKEN}} + issue: ${{inputs.issue}} + body: ":x: @${{github.actor}} bottle request for ${{inputs.formula}} [failed](${{env.RUN_URL}})." + bot_body: ":x: Bottle request for ${{inputs.formula}} [failed](${{env.RUN_URL}})." + bot: BrewTestBot diff --git a/.github/workflows/dispatch-rebottle.yml b/.github/workflows/dispatch-rebottle.yml new file mode 100644 index 0000000000000..9082b0656f8c3 --- /dev/null +++ b/.github/workflows/dispatch-rebottle.yml @@ -0,0 +1,297 @@ +name: Dispatch rebottle (for all currently bottled OS versions) + +run-name: Rebuild bottles of ${{ inputs.formula }} + +on: + workflow_dispatch: + inputs: + formula: + description: Formula name + required: true + reason: + description: Reason for rebottling + required: true + timeout: + description: "Build timeout (in minutes, default: 60 minutes)" + type: number + default: 60 + required: false + issue: + description: Issue number, where comment on failure would be posted + type: number + required: false + upload: + description: "Upload built bottles? (default: false)" + type: boolean + default: false + required: false + fail-fast: + description: "Fail immediately on a single OS version failure? (default: true)" + type: boolean + default: true + required: false + +defaults: + run: + shell: bash -xeuo pipefail {0} + +# Intentionally the same as dispatch-build-bottle +concurrency: bottle-${{ github.event.inputs.formula }} + +permissions: + contents: read + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_GITHUB_ACTIONS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_FROM_API: 1 + HOMEBREW_NO_BUILD_ERROR_ISSUES: 1 + HOMEBREW_ARM64_TESTING: 1 + RUN_URL: ${{github.event.repository.html_url}}/actions/runs/${{github.run_id}} + DISPATCH_REBOTTLE_SENDER: ${{ github.event.sender.login }} + DISPATCH_REBOTTLE_FORMULA: ${{ inputs.formula }} + DISPATCH_REBOTTLE_TIMEOUT: ${{ inputs.timeout }} + DISPATCH_REBOTTLE_ISSUE: ${{ inputs.issue }} + DISPATCH_REBOTTLE_UPLOAD: ${{ inputs.upload }} + DISPATCH_REBOTTLE_REASON: ${{ inputs.reason }} + +jobs: + setup: + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + runners: ${{steps.determine-runners.outputs.runners}} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Determine runners + id: determine-runners + run: brew determine-rebottle-runners "${DISPATCH_REBOTTLE_FORMULA}" "${DISPATCH_REBOTTLE_TIMEOUT}" + + bottle: + permissions: + contents: read + needs: setup + strategy: + matrix: + include: ${{fromJson(needs.setup.outputs.runners)}} + fail-fast: ${{inputs.fail-fast}} + runs-on: ${{matrix.runner}} + container: ${{matrix.container}} + timeout-minutes: ${{fromJson(inputs.timeout)}} + defaults: + run: + shell: /bin/bash -xeuo pipefail {0} + working-directory: ${{matrix.workdir || github.workspace}} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + BOTTLES_DIR: ${{ matrix.workdir || github.workspace }}/bottles + steps: + - name: ${{inputs.formula}} + id: print_details + run: | + echo sender="${DISPATCH_REBOTTLE_SENDER}" + echo formula="${DISPATCH_REBOTTLE_FORMULA}" + echo timeout="${DISPATCH_REBOTTLE_TIMEOUT}" + echo issue="${DISPATCH_REBOTTLE_ISSUE}" + echo upload="${DISPATCH_REBOTTLE_UPLOAD}" + echo reason="${DISPATCH_REBOTTLE_REASON}" + + - name: Pre-test steps + uses: Homebrew/actions/pre-build@main + with: + bottles-directory: ${{ env.BOTTLES_DIR }} + + - run: | + brew test-bot --only-formulae --only-json-tab --skip-online-checks \ + --skip-dependents \ + "${DISPATCH_REBOTTLE_FORMULA}" + working-directory: ${{ env.BOTTLES_DIR }} + env: + HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Post-build steps + if: always() + uses: Homebrew/actions/post-build@main + with: + runner: ${{ matrix.runner }} + bottles-directory: ${{ env.BOTTLES_DIR }} + logs-directory: ${{ env.BOTTLES_DIR }}/logs + + upload: + permissions: + issues: write # for Homebrew/actions/post-comment + contents: write # for Homebrew/actions/git-try-push + packages: write # for brew pr-upload + pull-requests: write # for gh pr + attestations: write # for actions/attest-build-provenance + id-token: write # for actions/attest-build-provenance + runs-on: ubuntu-latest + needs: bottle + if: inputs.upload + container: + image: ghcr.io/homebrew/ubuntu22.04:main + env: + HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1 + GH_REPO: ${{github.repository}} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + BOTTLE_BRANCH: ${{github.actor}}/dispatch/${{inputs.formula}}/${{github.run_id}} + BOTTLES_DIR: ${{ github.workspace }}/bottles + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Download bottles from GitHub Actions + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + pattern: bottles_* + path: ${{ env.BOTTLES_DIR }} + merge-multiple: true + + - name: Setup git + id: git-user-config + uses: Homebrew/actions/git-user-config@main + with: + username: ${{ (github.actor != 'github-actions[bot]' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Generate build provenance + uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 + with: + subject-path: ${{ env.BOTTLES_DIR }}/*.tar.gz + + - name: Checkout branch for bottle commit + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + run: git checkout -b "$BOTTLE_BRANCH" origin/HEAD + + - name: Upload bottles to GitHub Packages + id: upload + env: + HOMEBREW_GITHUB_PACKAGES_USER: brewtestbot + HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{secrets.HOMEBREW_CORE_GITHUB_PACKAGES_TOKEN}} + BREWTESTBOT_NAME_EMAIL: "BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>" + HOMEBREW_CORE_PATH: ${{steps.set-up-homebrew.outputs.repository-path}} + working-directory: ${{ env.BOTTLES_DIR }} + run: | + brew pr-upload --verbose --committer="$BREWTESTBOT_NAME_EMAIL" --root-url="https://ghcr.io/v2/homebrew/core" --debug + echo "title=$(git -C "$HOMEBREW_CORE_PATH" log -1 --format='%s' "$BOTTLE_BRANCH")" >> "$GITHUB_OUTPUT" + echo "head_sha=$(git -C "$HOMEBREW_CORE_PATH" rev-parse HEAD)" >> "$GITHUB_OUTPUT" + + - name: Push commits + uses: Homebrew/actions/git-try-push@main + with: + token: ${{secrets.GITHUB_TOKEN}} + directory: ${{steps.set-up-homebrew.outputs.repository-path}} + branch: ${{env.BOTTLE_BRANCH}} + env: + GIT_COMMITTER_NAME: BrewTestBot + GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com + + - name: Open PR with bottle commit + id: create-pr + uses: Homebrew/actions/create-pull-request@main + with: + token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + base: ${{github.ref}} + head: ${{env.BOTTLE_BRANCH}} + title: ${{steps.upload.outputs.title}} + body: | + Created by [`dispatch-rebottle.yml`](${{env.RUN_URL}}) + + ----- + + ${{env.DISPATCH_REBOTTLE_REASON}} + labels: CI-published-bottle-commits + reviewers: ${{github.actor}} + + - name: Enable automerge + env: + GH_TOKEN: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + NODE_ID: ${{steps.create-pr.outputs.node_id}} + SHA: ${{steps.upload.outputs.head_sha}} + MUTATION: |- + mutation ($input: EnablePullRequestAutoMergeInput!) { + enablePullRequestAutoMerge(input: $input) { + clientMutationId + } + } + run: | + gh api graphql \ + --field "input[pullRequestId]=$NODE_ID" \ + --field "input[expectedHeadOid]=$SHA" \ + --raw-field query="$MUTATION" + + - name: Approve PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{steps.create-pr.outputs.number}} + run: | + gh api \ + --method POST \ + --header "Accept: application/vnd.github+json" \ + --header "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$GITHUB_REPOSITORY/pulls/$PR/reviews" \ + --field "event=APPROVE" + + - name: Wait until PR is merged + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.create-pr.outputs.number }} + run: | + # Hold the `concurrency` lock for up to another 10 minutes while the PR has not yet been merged. + sleep 300 + + attempt=0 + max_attempts=5 + sleep_time=10 + + while (( attempt < max_attempts )) + do + if jq --exit-status .merged_at + then + break + fi < <( # We could use `gh pr view`, but that uses 2 API calls. + gh api \ + --header "Accept: application/vnd.github+json" \ + --header "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$GITHUB_REPOSITORY/pulls/$PR" + ) + + sleep "$sleep_time" + + sleep_time=$(( sleep_time * 2 )) + attempt=$(( attempt + 1 )) + done + + comment: + permissions: + issues: write # for Homebrew/actions/post-comment + pull-requests: write # for Homebrew/actions/post-comment + needs: [bottle, upload] + if: failure() && inputs.issue > 0 + runs-on: ubuntu-latest + steps: + - name: Post comment on failure + uses: Homebrew/actions/post-comment@main + with: + token: ${{secrets.GITHUB_TOKEN}} + issue: ${{inputs.issue}} + body: ":x: @${{github.actor}} bottle request for ${{inputs.formula}} [failed](${{env.RUN_URL}})." + bot_body: ":x: Bottle request for ${{inputs.formula}} [failed](${{env.RUN_URL}})." + bot: BrewTestBot diff --git a/.github/workflows/manage-pull-request-labels.yml b/.github/workflows/manage-pull-request-labels.yml new file mode 100644 index 0000000000000..d479dce4751ea --- /dev/null +++ b/.github/workflows/manage-pull-request-labels.yml @@ -0,0 +1,56 @@ +name: Manage pull request labels + +on: + pull_request_target: + types: + - labeled + - unlabeled + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.label.name }} + cancel-in-progress: true + +env: + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + HOMEBREW_DISABLE_LOAD_FORMULA: 1 + PR: ${{ github.event.number }} + +jobs: + workflows-label: + permissions: + pull-requests: write # for `gh pr edit` + runs-on: ubuntu-latest + if: > + github.repository_owner == 'Homebrew' && + github.event.action == 'unlabeled' && + contains(fromJson('["workflows"]'), github.event.label.name) + steps: + - name: Re-label PR + run: gh pr edit "$PR" --add-label "$LABEL" --repo "$GITHUB_REPOSITORY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + LABEL: ${{ github.event.label.name }} + + concurrent-downloads-label: + permissions: + pull-requests: write # for `gh pr comment` + runs-on: ubuntu-latest + if: > + github.repository_owner == 'Homebrew' && + github.event.action == 'labeled' && + contains(fromJson('["CI-test-bot-no-concurrent-downloads"]'), github.event.label.name) + steps: + - name: Post comment + run: gh pr comment "$PR" --body "$COMMENT" --repo "$GITHUB_REPOSITORY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMENT: >- + @${{ github.actor }}, please file an issue at Homebrew/brew for all uses of + ${{ github.server_url }}/${{ github.repository }}/labels/${{ github.event.label.name }}. + Thanks! diff --git a/.github/workflows/publish-commit-bottles.yml b/.github/workflows/publish-commit-bottles.yml new file mode 100644 index 0000000000000..6813253223d16 --- /dev/null +++ b/.github/workflows/publish-commit-bottles.yml @@ -0,0 +1,504 @@ +name: Publish and commit bottles + +run-name: "Publish PR #${{ inputs.pull_request }}" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.inputs.pull_request }} + cancel-in-progress: false + +on: + workflow_dispatch: + inputs: + pull_request: + description: Pull request number + type: number + required: true + large_runner: + description: "Run the upload job on a large runner? (default: false)" + type: boolean + required: false + default: false + autosquash: + description: "Squash pull request commits according to Homebrew style? (default: false)" + type: boolean + required: false + default: false + warn_on_upload_failure: + description: "Pass `--warn-on-upload-failure` to `brew pr-pull`? (default: false)" + type: boolean + required: false + default: false + message: + description: "Message to include when autosquashing revision bumps, deletions, and rebuilds (requires autosquash)" + required: false + +defaults: + run: + shell: bash -xeuo pipefail {0} + +env: + PR: ${{inputs.pull_request}} + INPUT_MESSAGE: ${{ inputs.message }} + GNUPGHOME: /tmp/gnupghome + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_FROM_API: 1 + GH_REPO: ${{github.repository}} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + RUN_URL: ${{github.event.repository.html_url}}/actions/runs/${{github.run_id}} + NON_PUSHABLE_MESSAGE: >- + :no_entry: It looks like @BrewTestBot cannot push to your PR branch. For future pull requests, please + [allow maintainers to edit your PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to simplify the merge process. + ORG_FORK_MESSAGE: >- + :no_entry: It looks like @BrewTestBot cannot push to your PR branch. Please open + future pull requests from a non-organization fork to simplify the merge process. + BOTTLE_COMMIT_PUSH_MESSAGE: |- + > [!CAUTION] + > Please **do not** push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. + +jobs: + check: + runs-on: ubuntu-latest + outputs: + bottles: ${{steps.pr-branch-check.outputs.bottles}} + head_sha: ${{steps.pr-branch-check.outputs.head_sha}} + branch: ${{steps.pr-branch-check.outputs.branch}} + remote_branch: ${{steps.pr-branch-check.outputs.remote_branch}} + remote: ${{steps.pr-branch-check.outputs.remote}} + replace: ${{steps.pr-branch-check.outputs.replace}} + requires_merge: ${{steps.pr-branch-check.outputs.requires_merge}} + permissions: + contents: read + actions: write # for `gh workflow run` + pull-requests: write # for `gh pr edit|comment|review` + repository-projects: write # for `gh pr edit` + steps: + - name: Check PR approval + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + if jq --exit-status 'all(.[].state; .!= "APPROVED")' + then + echo "::error ::PR #$PR is not approved!" + exit 1 + fi < <( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + --paginate \ + "repos/$GITHUB_REPOSITORY/pulls/$PR/reviews" + ) + + - name: Check PR branch for mergeability + id: pr-branch-check + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + AUTOSQUASH: ${{inputs.autosquash}} + run: | + pr_data="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GH_REPO/pulls/$PR" + )" + + pushable="$(jq .maintainer_can_modify <<< "$pr_data")" + base_branch="$(jq --raw-output .base.ref <<< "$pr_data")" + branch="$(jq --raw-output .head.ref <<< "$pr_data")" + remote="$(jq --raw-output .head.repo.clone_url <<< "$pr_data")" + head_repo="$(jq --raw-output .head.repo.full_name <<< "$pr_data")" + head_repo_owner="$(jq --raw-output .head.repo.owner.login <<< "$pr_data")" + head_sha="$(jq --raw-output .head.sha <<< "$pr_data")" + fork_type="$(jq --raw-output .head.repo.owner.type <<< "$pr_data")" + state="$(jq --raw-output .state <<< "$pr_data")" + node_id="$(jq --raw-output .node_id <<< "$pr_data")" + merged="$(jq --raw-output .merged <<< "$pr_data")" + automerge_enabled="$(jq --raw-output '.auto_merge != null' <<< "$pr_data")" + + if [[ -z "$pushable" ]] || + [[ -z "$base_branch" ]] || + [[ -z "$branch" ]] || + [[ -z "$remote" ]] || + [[ -z "$head_repo" ]] || + [[ -z "$head_repo_owner" ]] || + [[ -z "$head_sha" ]] || + [[ -z "$fork_type" ]] || + [[ -z "$state" ]] || + [[ -z "$merged" ]] || + [[ -z "$node_id" ]] || + [[ -z "$automerge_enabled" ]] + then + echo "::error ::Failed to get PR data!" + exit 1 + fi + + if [[ "$state" = "closed" ]] + then + echo "::error ::PR #$PR is closed!" + exit 1 + fi + + if [[ "$base_branch" = "master" ]] + then + echo "::error ::PR #$PR targets the \`master\` branch!" + exit 1 + fi + + bottles=true + while IFS='' read -r label + do + if [[ "$label" = "CI-syntax-only" ]] || + [[ "$label" = "CI-no-bottles" ]] || + [[ "$label" = "CI-published-bottle-commits" ]] + then + echo '::notice ::No bottles to publish according to PR labels.' + bottles=false + break + fi + done < <(jq --raw-output '.labels[].name' <<< "$pr_data") + + if [[ "$bottles" = "true" ]] + then + array_has_unremoved_formulae_filter='any((.filename | startswith("Formula/")) and (.status != "removed"))' + if jq --exit-status ". | $array_has_unremoved_formulae_filter | not" + then + echo '::notice ::PR does not add or modify formulae; no bottles to publish.' + bottles=false + fi < <( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GH_REPO/pulls/$PR/files" + ) + fi + + requires_merge=true + if [[ "$merged" = "true" || "$automerge_enabled" = "true" ]] + then + echo '::notice ::Pull request is either already merged or queued to merge.' + requires_merge=false + fi + + if [[ "$branch" = "main" ]] + then + branch="$head_repo_owner/main" + remote_branch="main" + else + remote_branch="$branch" + fi + + { + echo "bottles=$bottles" + echo "head_sha=$head_sha" + echo "branch=$branch" + echo "remote_branch=$remote_branch" + echo "remote=$remote" + echo "node_id=$node_id" + echo "requires_merge=$requires_merge" + echo "replace=${AUTOSQUASH}" + } >> "$GITHUB_OUTPUT" + + if "$pushable" && [[ "$fork_type" != "Organization" ]] || + [[ "$head_repo" = "$GH_REPO" ]] || + [[ "$bottles" = "false" ]] + then + exit 0 + elif "$pushable" || [[ "$fork_type" = "Organization" ]] + then + MESSAGE="$ORG_FORK_MESSAGE" + else + MESSAGE="$NON_PUSHABLE_MESSAGE" + fi + + echo "replace=true" >> "$GITHUB_OUTPUT" + gh pr comment "$PR" --body "$MESSAGE" --repo "$GITHUB_REPOSITORY" + gh pr edit --add-label 'no push access' "$PR" --repo "$GITHUB_REPOSITORY" + + - name: Dispatch replacement pull request + if: > + fromJson(steps.pr-branch-check.outputs.replace) && + fromJson(steps.pr-branch-check.outputs.bottles) && + fromJson(steps.pr-branch-check.outputs.requires_merge) + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + AUTOSQUASH: ${{inputs.autosquash}} + UPLOAD: ${{!inputs.autosquash}} + run: | + gh workflow run create-replacement-pr.yml \ + --ref "$GITHUB_REF_NAME" \ + --field pull_request="$PR" \ + --field autosquash="${AUTOSQUASH}" \ + --field upload="${UPLOAD}" \ + --field warn_on_upload_failure=false \ + --field message="$INPUT_MESSAGE" \ + --repo "$GITHUB_REPOSITORY" + + - name: Post comment on failure + if: ${{!success()}} + uses: Homebrew/actions/post-comment@main + with: + token: ${{secrets.GITHUB_TOKEN}} + issue: ${{inputs.pull_request}} + body: ":warning: @${{github.actor}} pre-merge checks [failed](${{env.RUN_URL}})." + bot_body: ":warning: Pre-merge checks [failed](${{env.RUN_URL}})." + bot: github-actions[bot] + + - name: Enqueue PR for merge + if: > + fromJson(steps.pr-branch-check.outputs.requires_merge) && + !fromJson(steps.pr-branch-check.outputs.bottles) && + !inputs.autosquash + env: + GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + ID: ${{ steps.pr-branch-check.outputs.node_id }} + EXPECTED_SHA: ${{ steps.pr-branch-check.outputs.head_sha }} + MUTATION: |- + mutation ($input: EnqueuePullRequestInput!) { + enqueuePullRequest(input: $input) { + clientMutationId + } + } + run: | + # TODO Try using `gh pr merge` when the following is resolved: + # https://github.com/cli/cli/issues/7213 + gh api graphql \ + --field "input[pullRequestId]=$ID" \ + --field "input[expectedHeadOid]=$EXPECTED_SHA" \ + --raw-field query="$MUTATION" + + upload: + needs: check + if: > + fromJson(needs.check.outputs.requires_merge) && + fromJson(needs.check.outputs.bottles) && + !fromJson(needs.check.outputs.replace) + runs-on: ${{inputs.large_runner && 'homebrew-large-bottle-upload' || 'ubuntu-latest'}} + container: + image: ghcr.io/homebrew/ubuntu22.04:main + volumes: + - /mnt:/mnt + permissions: + attestations: write # for `generate build provenance` + id-token: write # for `generate build provenance` + actions: read # for `brew pr-pull` + pull-requests: write # for `gh pr edit|review` + repository-projects: write # for `gh pr edit` + steps: + - name: Post comment once started + uses: Homebrew/actions/post-comment@main + with: + token: ${{secrets.GITHUB_TOKEN}} + issue: ${{inputs.pull_request}} + body: | + :shipit: @${{github.actor}} has [requested bottles to be published to this PR](${{env.RUN_URL}}). + + ${{env.BOTTLE_COMMIT_PUSH_MESSAGE}} + bot_body: | + :robot: An automated task has [requested bottles to be published to this PR](${{env.RUN_URL}}). + + ${{env.BOTTLE_COMMIT_PUSH_MESSAGE}} + bot: github-actions[bot] + + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Configure Git user + id: git-user-config + uses: Homebrew/actions/git-user-config@main + with: + username: ${{ (github.actor != 'github-actions[bot]' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Checkout PR branch + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: gh pr checkout "$PR" --repo "$GITHUB_REPOSITORY" + + - name: Pull PR bottles + id: pr-pull + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + env: + BREWTESTBOT_NAME_EMAIL: "BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>" + HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_CORE_PUBLIC_REPO_EMAIL_TOKEN}} + EXPECTED_SHA: ${{needs.check.outputs.head_sha}} + LARGE_RUNNER: ${{inputs.large_runner}} + WARN_ON_UPLOAD_FAILURE_FLAG: ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}} + MESSAGE: ${{inputs.message}} + run: | + local_git_head="$(git rev-parse HEAD)" + remote_git_head="$(git ls-remote origin "pull/$PR/head" | cut -f1)" + + if [ "$local_git_head" != "$EXPECTED_SHA" ] || + [ "$remote_git_head" != "$EXPECTED_SHA" ] + then + echo "::error ::Unexpected change in target branch." + echo "::error ::Expected SHA1 $EXPECTED_SHA" + echo "::error ::Checked out SHA1 $local_git_head" + echo "::error ::PR branch SHA1 $remote_git_head" + exit 1 + fi + + if [ -z "${LARGE_RUNNER}" ] || [ "${LARGE_RUNNER}" == "false" ] + then + sudo install -o "$(id -u)" -d "$(id -g)" /mnt/homebrew + export HOMEBREW_CACHE=/mnt/homebrew/cache + export HOMEBREW_TEMP=/mnt/homebrew/temp + fi + + # Don't quote arguments that might be empty; this causes errors. + brew pr-pull \ + --no-upload \ + --debug \ + --clean \ + --no-cherry-pick \ + --workflows=tests.yml \ + --committer="$BREWTESTBOT_NAME_EMAIL" \ + --root-url="https://ghcr.io/v2/homebrew/core" \ + --retain-bottle-dir \ + ${WARN_ON_UPLOAD_FAILURE_FLAG:+"${WARN_ON_UPLOAD_FAILURE_FLAG}"} \ + ${MESSAGE:+"--message=${MESSAGE}"} \ + "$PR" + + - name: Generate build provenance + uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 + with: + subject-path: '${{steps.pr-pull.outputs.bottle_path}}/*.tar.gz' + + - name: Upload bottles to GitHub Packages + id: pr-upload + working-directory: ${{steps.pr-pull.outputs.bottle_path}} + env: + BREWTESTBOT_NAME_EMAIL: "BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>" + HOMEBREW_GITHUB_PACKAGES_USER: brewtestbot + HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{secrets.HOMEBREW_CORE_GITHUB_PACKAGES_TOKEN}} + REPO_PATH: ${{steps.set-up-homebrew.outputs.repository-path}} + WARN_ON_UPLOAD_FAILURE_FLAG: ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}} + run: | + # Don't quote arguments that might be empty; this causes errors when `brew` + # interprets them as empty arguments when we want `brew` to ignore them instead. + brew pr-upload \ + --debug \ + --committer="$BREWTESTBOT_NAME_EMAIL" \ + --root-url="https://ghcr.io/v2/homebrew/core" \ + ${WARN_ON_UPLOAD_FAILURE_FLAG:+"${WARN_ON_UPLOAD_FAILURE_FLAG}"} + + + echo "head_sha=$(git -C "$REPO_PATH" rev-parse HEAD)" >> "$GITHUB_OUTPUT" + + - name: Push commits + uses: Homebrew/actions/git-try-push@main + with: + token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + directory: ${{steps.set-up-homebrew.outputs.repository-path}} + remote: ${{needs.check.outputs.remote}} + branch: ${{needs.check.outputs.branch}} + remote_branch: ${{needs.check.outputs.remote_branch}} + env: + GIT_COMMITTER_NAME: BrewTestBot + GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com + + - name: Add CI-published-bottle-commits label + run: gh pr edit --add-label CI-published-bottle-commits "$PR" --repo "$GITHUB_REPOSITORY" + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + + - name: Post comment on failure + if: failure() + uses: Homebrew/actions/post-comment@main + with: + token: ${{secrets.GITHUB_TOKEN}} + issue: ${{inputs.pull_request}} + body: ":warning: @${{github.actor}} bottle publish [failed](${{env.RUN_URL}})." + bot_body: ":warning: Bottle publish [failed](${{env.RUN_URL}})." + bot: github-actions[bot] + + - name: Wait until pull request branch is in sync with local repository + id: wait-until-in-sync + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + env: + EXPECTED_SHA: ${{steps.pr-upload.outputs.head_sha}} + run: | + echo "::notice ::Local repository HEAD: $EXPECTED_SHA" + + attempt=0 + max_attempts=10 + timeout=1 + + # Wait (with exponential backoff) until the PR branch is in sync + while [[ "$attempt" -lt "$max_attempts" ]] + do + remote_head="$(git ls-remote origin "pull/$PR/head" | cut -f1)" + echo "::notice ::Pull request HEAD: $remote_head" + if [[ "$EXPECTED_SHA" = "$remote_head" ]] + then + success=1 + break + fi + echo "::notice ::Remote repository not in sync. Checking again in ${timeout}s..." + sleep "$timeout" + attempt=$(( attempt + 1 )) + timeout=$(( timeout * 2 )) + done + + # One last check... + if [[ -z "${success:-}" ]] && [[ "$EXPECTED_SHA" != "$(git ls-remote origin "pull/$PR/head" | cut -f1)" ]] + then + echo "::error ::No attempts remaining. Giving up." + exit 1 + fi + + - run: gh pr review --approve "$PR" --repo "$GITHUB_REPOSITORY" + id: approve + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Enable automerge + id: automerge + env: + GH_TOKEN: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + EXPECTED_SHA: ${{steps.pr-upload.outputs.head_sha}} + working-directory: ${{steps.set-up-homebrew.outputs.repository-path}} + run: | + local_git_head="$(git rev-parse HEAD)" + remote_git_head="$(git ls-remote origin "pull/$PR/head" | cut -f1)" + + if [[ "$local_git_head" != "$EXPECTED_SHA" ]] || + [[ "$remote_git_head" != "$EXPECTED_SHA" ]] + then + echo "::error ::Unexpected change in target branch." + echo "::error ::Expected SHA1 $EXPECTED_SHA" + echo "::error ::Checked out SHA1 $local_git_head" + echo "::error ::PR branch SHA1 $remote_git_head" + exit 1 + fi + + gh pr merge "$PR" \ + --auto \ + --merge \ + --match-head-commit "$EXPECTED_SHA" \ + --repo "$GITHUB_REPOSITORY" + + - name: Post comment on failure + if: > + failure() && + (steps.approve.conclusion == 'failure' || + steps.wait-until-in-sync.conclusion == 'failure' || + steps.automerge.conclusion == 'failure') + uses: Homebrew/actions/post-comment@main + with: + token: ${{secrets.GITHUB_TOKEN}} + issue: ${{inputs.pull_request}} + body: ":warning: @${{github.actor}} [Failed to enable automerge](${{env.RUN_URL}})." + bot_body: ":warning: [Failed to enable automerge](${{env.RUN_URL}})." + bot: github-actions[bot] diff --git a/.github/workflows/recreate-linux-runners.yml b/.github/workflows/recreate-linux-runners.yml new file mode 100644 index 0000000000000..a1bec141be1dc --- /dev/null +++ b/.github/workflows/recreate-linux-runners.yml @@ -0,0 +1,115 @@ +name: Recreate Linux self-hosted runners + +on: + workflow_dispatch: + schedule: + # Once each 24 hours, at 1 during the night + - cron: "0 1 * * *" + workflow_run: + workflows: + - CI + types: + - completed + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: recreate-linux-runners-${{ github.event.workflow_run.id || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +env: + GH_REPO: ${{github.repository}} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + +jobs: + check: + if: > + github.repository_owner == 'Homebrew' && + (github.event_name != 'workflow_run' || github.event.workflow_run.event == 'pull_request') + runs-on: ubuntu-latest + outputs: + recreate: ${{ steps.check.outputs.recreate }} + permissions: + actions: read # for `gh run download` + pull-requests: read # for `gh api` + steps: + - uses: Homebrew/actions/find-related-workflow-run-id@main + if: github.event_name == 'workflow_run' + with: + run-id: ${{ github.event.workflow_run.id }} + workflow-name: Triage tasks + + - name: Download `event_payload` artifact + if: github.event_name == 'workflow_run' + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: event_payload + github-token: ${{ github.token }} + run-id: ${{ env.workflow_run_id }} + + - name: Check if runner needs to be recreated + id: check + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + recreate=true + + if [[ "$GITHUB_EVENT_NAME" = "workflow_run" ]] + then + PR="$(jq --raw-output .number event.json)" + + recreate="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq 'any(.labels[].name; .== "CI-linux-self-hosted")' + )" + fi + + echo "recreate=$recreate" >> "$GITHUB_OUTPUT" + + recreate: + needs: check + if: > + github.repository_owner == 'Homebrew' && + (github.event_name != 'workflow_run' || github.event.workflow_run.event == 'pull_request') && + fromJson(needs.check.outputs.recreate) + runs-on: ubuntu-latest + env: + # TODO agree on one label for all runners + RUNNER_LABEL: TODO + strategy: + matrix: + runner_name: + - linux-self-hosted-1 + steps: + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@daadedc81d5f9d3c06d2c92f49202a3cc2b919ba # v0.2.1 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} + export_default_credentials: true + + - name: Wait for idle runner + id: killable + uses: Homebrew/actions/wait-for-idle-runner@main + with: + runner_name: ${{ matrix.runner_name }} + github_token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + + - name: Kill runner and create a new one + if: ${{ steps.killable.outputs.runner-found == 'true' && steps.killable.outputs.runner-idle == 'true' }} + uses: Homebrew/actions/create-gcloud-instance@main + with: + runner_name: ${{ matrix.runner_name }} + gcp_project_id: ${{ secrets.GCP_PROJECT_ID }} + gcp_service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} + gcp_sa_key: ${{ secrets.GCP_SA_KEY }} + github_token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} diff --git a/.github/workflows/remove-disabled-packages.yml b/.github/workflows/remove-disabled-packages.yml new file mode 100644 index 0000000000000..5138ed5d99b69 --- /dev/null +++ b/.github/workflows/remove-disabled-packages.yml @@ -0,0 +1,105 @@ +name: Remove disabled packages + +on: + push: + branches: + - main + - master + paths: + - .github/workflows/remove-disabled-packages.yml + schedule: + # Once every day at midnight UTC + - cron: "0 0 * * *" + +env: + RUN_URL: ${{github.event.repository.html_url}}/actions/runs/${{github.run_id}} + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: remove-disabled-packages + cancel-in-progress: true + +permissions: + contents: read + +jobs: + remove-disabled-packages: + if: github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + env: + REMOVAL_BRANCH: remove-disabled-packages + permissions: + contents: write # for Homebrew/actions/git-try-push + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Configure Git user + id: git-user-config + uses: Homebrew/actions/git-user-config@main + with: + username: BrewTestBot + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Checkout removal branch + run: git checkout -b "$REMOVAL_BRANCH" origin/HEAD + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + + - name: Remove disabled packages + id: remove_disabled + uses: Homebrew/actions/remove-disabled-packages@main + env: + HOMEBREW_EVAL_ALL: 1 + + - name: Push commits + if: fromJson(steps.remove_disabled.outputs.packages-removed) + uses: Homebrew/actions/git-try-push@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + branch: ${{ env.REMOVAL_BRANCH }} + env: + GIT_COMMITTER_NAME: ${{ steps.git-user-config.outputs.name }} + GIT_COMMITTER_EMAIL: ${{ steps.git-user-config.outputs.email }} + + - name: Create pull request + if: fromJson(steps.remove_disabled.outputs.packages-removed) + uses: Homebrew/actions/create-pull-request@main + with: + token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + base: ${{ github.event.repository.default_branch }} + head: ${{ env.REMOVAL_BRANCH }} + title: Remove disabled packages + labels: CI-no-bottles + body: This pull request was created automatically by the [`remove-disabled-packages`](${{ env.RUN_URL }}) workflow. + + create-issue: + permissions: + issues: write # for Homebrew/actions/create-or-update-issue + needs: remove-disabled-packages + if: always() && github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + steps: + - name: Create issue on failure + uses: Homebrew/actions/create-or-update-issue@main + with: + title: Disabled package removal failed + body: Run failed at ${{ env.RUN_URL }} + labels: bug,help wanted + update-existing: ${{ needs.remove-disabled-packages.result == 'failure' }} + close-existing: ${{ needs.remove-disabled-packages.result == 'success' }} + close-from-author: github-actions[bot] + close-comment: Run succeeded at ${{ env.RUN_URL }}, closing issue. diff --git a/.github/workflows/remove-unused-patches.yml b/.github/workflows/remove-unused-patches.yml new file mode 100644 index 0000000000000..b966ac358628e --- /dev/null +++ b/.github/workflows/remove-unused-patches.yml @@ -0,0 +1,160 @@ +name: Remove unused patches + +on: + push: + branches: + - main + paths: + - .github/workflows/remove-unused-patches.yml + schedule: + - cron: "0 22 * * 1" # Once a week (Monday) at 10pm UTC. + +env: + RUN_URL: ${{github.event.repository.html_url}}/actions/runs/${{github.run_id}} + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: remove-unused-patches + cancel-in-progress: true + +permissions: + contents: read + +jobs: + remove-unused-patches: + if: github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + env: + REMOVAL_BRANCH: remove-unused-patches + permissions: + contents: write # for Homebrew/actions/git-try-push + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Configure Git user + id: git-user-config + uses: Homebrew/actions/git-user-config@main + with: + username: BrewTestBot + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@main + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Checkout removal branch + run: git checkout -b "$REMOVAL_BRANCH" origin/HEAD + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + + - name: Remove unused patches + id: remove_unused + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + run: | + if [[ ! -d "Patches" ]]; then + echo "No Patches directory found" + echo "patches-removed=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + all_patches=$(mktemp) + referenced_patches=$(mktemp) + unused_patches=$(mktemp) + + # Exclude `LICENSE` as it's not a patch, and `proctools` patches as they're interpolated in the formula. + find Patches -type f ! -name "LICENSE" ! -path "Patches/proctools/*" > "$all_patches" + + if [[ ! -s "$all_patches" ]]; then + echo "No patch files found in Patches directory" + echo "patches-removed=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + echo "Found $(wc -l < "$all_patches") total patch files" + + # Search for patch references in all formula files + # Look for patterns like "Patches/formula/patch.diff" in URLs + grep -r --include="*.rb" -h "Patches/" Formula/ | \ + grep -o "Patches/[^\"'[:space:]]*" | \ + sort -u > "$referenced_patches" || true + + echo "Found $(wc -l < "$referenced_patches") referenced patch paths" + + unused_count=0 + while IFS= read -r patch_file; do + if ! grep -Fxq "$patch_file" "$referenced_patches"; then + echo "$patch_file" >> "$unused_patches" + ((++unused_count)) + fi + done < "$all_patches" + + echo "Found $unused_count unused patch files" + + if [[ $unused_count -eq 0 ]]; then + echo "No unused patches found" + echo "patches-removed=false" >> "$GITHUB_OUTPUT" + else + echo "Removing unused patches:" + while IFS= read -r unused_patch; do + echo " - $unused_patch" + git rm "$unused_patch" + done < "$unused_patches" + + if git diff --cached --quiet; then + echo "patches-removed=false" >> "$GITHUB_OUTPUT" + else + git commit -m "Remove unused patches" + echo "patches-removed=true" >> "$GITHUB_OUTPUT" + fi + fi + + rm "$all_patches" "$referenced_patches" "$unused_patches" + + - name: Push commits + if: fromJson(steps.remove_unused.outputs.patches-removed) + uses: Homebrew/actions/git-try-push@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + branch: ${{ env.REMOVAL_BRANCH }} + env: + GIT_COMMITTER_NAME: ${{ steps.git-user-config.outputs.name }} + GIT_COMMITTER_EMAIL: ${{ steps.git-user-config.outputs.email }} + + - name: Create pull request + if: fromJson(steps.remove_unused.outputs.patches-removed) + uses: Homebrew/actions/create-pull-request@main + with: + token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + base: ${{ github.event.repository.default_branch }} + head: ${{ env.REMOVAL_BRANCH }} + title: Remove unused patches + labels: CI-no-bottles + body: This pull request was created automatically by the [`remove-unused-patches`](${{ env.RUN_URL }}) workflow. + + create-issue: + permissions: + issues: write # for Homebrew/actions/create-or-update-issue + needs: remove-unused-patches + if: always() && github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + steps: + - name: Create issue on failure + uses: Homebrew/actions/create-or-update-issue@main + with: + title: Unused patch removal failed + body: Run failed at ${{ env.RUN_URL }} + labels: bug,help wanted + update-existing: ${{ needs.remove-unused-patches.result == 'failure' }} + close-existing: ${{ needs.remove-unused-patches.result == 'success' }} + close-from-author: github-actions[bot] + close-comment: Run succeeded at ${{ env.RUN_URL }}, closing issue. diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml new file mode 100644 index 0000000000000..73a8795749474 --- /dev/null +++ b/.github/workflows/scheduled.yml @@ -0,0 +1,176 @@ +name: Scheduled online check + +on: + push: + branches: + - main + - master + paths: + - .github/workflows/scheduled.yml + schedule: + # Once every day at 1AM + - cron: "0 1 * * *" + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: scheduled + cancel-in-progress: true + +permissions: {} + +env: + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + GH_REPO: ${{ github.repository }} + REPORTING_ISSUE: 139929 + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + +jobs: + create_matrix: + if: startsWith( github.repository, 'Homebrew/' ) + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + json: ${{ steps.matrix.outputs.json }} + env: + TEST_COUNT: 50 + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Generate matrix + id: matrix + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + run: | + # Index all formulae so that we test (n ranges from 0 to TEST_COUNT - 1): + # - formulae 0, 365, 630,..., 0 + 365 * n,... on the first day of the year + # - formulae 1, 366, 631,..., 1 + 365 * n,... on the second day of the year + # - formulae 2, 367, 632,..., 2 + 365 * n,... on the third day of the year + # - ... + # This works fine as long as we have fewer than 365 * TEST_COUNT formulae. + mapfile -t formulae < <(find Formula -type f -execdir basename -s '.rb' {} + | sort) + formulae_count="${#formulae[@]}" + + DAYS_PER_YEAR=365 + if (( formulae_count > DAYS_PER_YEAR * TEST_COUNT )); then + required_test_count="$(( formulae_count / DAYS_PER_YEAR + 1 ))" + echo "::error ::Too many formulae (${formulae_count})! Adjust TEST_COUNT to a number greater than ${required_test_count}." + exit 1 + fi + + day="$(date +%j)" + testing_formulae=() + for (( i=0; i < TEST_COUNT; i++ )); do + index="$(( (day + i * DAYS_PER_YEAR - 1) % formulae_count ))" + testing_formulae+=("${formulae[${index}]}") + done + + jq_filter='[.formulae[] | select(.deprecated or .disabled | not) | { name, curl: (.urls.stable.using == "homebrew_curl")}]' + json="$(brew info --json=v2 "${testing_formulae[@]}" | jq --compact-output "${jq_filter}")" + echo "json=${json}" >> "$GITHUB_OUTPUT" + + comment_on_failure: + needs: create_matrix + if: needs.create_matrix.result == 'failure' + runs-on: ubuntu-latest + permissions: + issues: write + env: + GH_TOKEN: ${{ github.token }} + steps: + - name: Post comment on failure + run: | + gh issue comment "$REPORTING_ISSUE" \ + --body "\`create_matrix\` job failed. Check $RUN_URL" \ + --repo "$GITHUB_REPOSITORY" + + audit_online: + if: startsWith( github.repository, 'Homebrew/' ) + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + permissions: + issues: write + needs: create_matrix + name: "Online check: ${{ matrix.name }}" + env: + HOMEBREW_GITHUB_API_TOKEN: "${{ github.token }}" + GH_TOKEN: "${{ github.token }}" + FORMULA: ${{ matrix.name }} + strategy: + fail-fast: false + matrix: + include: ${{ fromJson(needs.create_matrix.outputs.json) }} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Install and use Homebrew curl if needed + if: matrix.curl + run: | + brew install curl + echo "HOMEBREW_FORCE_BREWED_CURL=1" >>"${GITHUB_ENV}" + + - name: Install Homebrew subversion if needed for downloading sources + run: | + if comm -23 <(brew deps --include-implicit --direct "$FORMULA" | sort) <(brew deps --direct "$FORMULA" | sort) | grep -Fqx subversion; then + brew install subversion + fi + + - name: Check formula source is not archived. + id: archived + run: brew audit --online --skip-style --only github_repository_archived,gitlab_repository_archived "$FORMULA" + + - name: Report online issues + if: failure() && steps.archived.conclusion == 'failure' + run: | + gh issue comment "$REPORTING_ISSUE" \ + --body "$FORMULA should be archived. Check $RUN_URL" \ + --repo "$GITHUB_REPOSITORY" + + - name: Check formula for unavailable homepage. + id: homepage + run: brew audit --online --skip-style --only homepage "$FORMULA" + + - name: Report homepage issues + if: failure() && steps.homepage.conclusion == 'failure' + run: | + gh issue comment "$REPORTING_ISSUE" \ + --body "$FORMULA has homepage issues. Check $RUN_URL" \ + --repo "$GITHUB_REPOSITORY" + + - name: Check formula for missing sources. + id: fetch + if: always() && steps.archived.conclusion != 'failure' + run: brew fetch --build-from-source "$FORMULA" + + - name: Report fetch issues + if: failure() && steps.fetch.conclusion == 'failure' + run: | + gh issue comment "$REPORTING_ISSUE" \ + --body "$FORMULA source has problems. Check $RUN_URL" \ + --repo "$GITHUB_REPOSITORY" + + - name: Check bottle attestation + id: attestation + if: always() + run: brew verify --os=all --arch=all "$FORMULA" + + - name: Report attestation issues + if: failure() && steps.attestation.conclusion == 'failure' + run: | + gh issue comment "$REPORTING_ISSUE" \ + --body "$FORMULA attestation has problems. Check $RUN_URL" \ + --repo "$GITHUB_REPOSITORY" diff --git a/.github/workflows/scripts/check-labels.js b/.github/workflows/scripts/check-labels.js new file mode 100644 index 0000000000000..bbc0bcafa5e4f --- /dev/null +++ b/.github/workflows/scripts/check-labels.js @@ -0,0 +1,149 @@ +module.exports = async ({github, context, core}, formulae_detect, dependent_testing) => { + const deps_suffix = dependent_testing ? '-deps' : '' + + const { data: { labels: labels } } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }) + const label_names = labels.map(label => label.name) + var syntax_only = false + + if (label_names.includes('CI-syntax-only')) { + console.log('CI-syntax-only label found. Skipping tests job.') + syntax_only = true + } else if (label_names.includes('CI-published-bottle-commits')) { + console.log('CI-published-bottle-commits label found. Skipping tests job.') + syntax_only = true + } else { + console.log('No CI-syntax-only label found. Running tests job.') + } + + core.setOutput('syntax-only', syntax_only) + if (syntax_only) { + return + } + + var linux_runner = 'ubuntu-latest' + if (label_names.includes(`CI-linux-self-hosted${deps_suffix}`)) { + linux_runner = 'linux-self-hosted-1' + } else if (label_names.includes(`CI-linux-large-runner${deps_suffix}`)) { + linux_runner = 'homebrew-large-bottle-build' + } + core.setOutput('linux-runner', linux_runner) + + if (label_names.includes(`CI-no-fail-fast${deps_suffix}`)) { + console.log(`CI-no-fail-fast${deps_suffix} label found. Continuing tests despite failing matrix builds.`) + core.setOutput('fail-fast', false) + } else { + console.log(`No CI-no-fail-fast${deps_suffix} label found. Stopping tests on first failing matrix build.`) + core.setOutput('fail-fast', true) + } + + if (label_names.includes('CI-skip-dependents')) { + console.log('CI-skip-dependents label found. Skipping brew test-bot --only-formulae-dependents.') + core.setOutput('test-dependents', false) + } else if (!formulae_detect.testing_formulae) { + console.log('No testing formulae found. Skipping brew test-bot --only-formulae-dependents.') + core.setOutput('test-dependents', false) + } else { + console.log('No CI-skip-dependents label found. Running brew test-bot --only-formulae-dependents.') + core.setOutput('test-dependents', true) + } + + if (dependent_testing) { + if (label_names.includes('long dependent tests')) { + console.log('"long dependent tests" label found. Setting long GitHub Actions timeout.') + core.setOutput('long-timeout', true) + } else { + console.log('No "long dependent tests" label found. Setting short GitHub Actions timeout.') + core.setOutput('long-timeout', false) + } + } else { + if (label_names.includes('long build')) { + console.log('"long build" label found. Setting long GitHub Actions timeout.') + core.setOutput('long-timeout', true) + } else { + console.log('No "long build" label found. Setting short GitHub Actions timeout.') + core.setOutput('long-timeout', false) + } + } + + const test_bot_formulae_args = ["--only-formulae", "--junit", "--only-json-tab", "--skip-dependents"] + const test_bot_dependents_args = ["--only-formulae-dependents", "--junit"] + + if (label_names.includes(`CI-test-bot-no-concurrent-downloads`)) { + console.log(`CI-test-bot-no-concurrent-downloads label found. Not passing --concurrent-downloads to brew test-bot.`) + } else { + console.log(`No CI-test-bot-no-concurrent-downloads label found. Passing --concurrent-downloads to brew test-bot.`) + test_bot_formulae_args.push('--concurrent-downloads') + test_bot_dependents_args.push('--concurrent-downloads') + } + + if (label_names.includes(`CI-test-bot-fail-fast${deps_suffix}`)) { + console.log(`CI-test-bot-fail-fast${deps_suffix} label found. Passing --fail-fast to brew test-bot.`) + test_bot_formulae_args.push('--fail-fast') + test_bot_dependents_args.push('--fail-fast') + } else { + console.log(`No CI-test-bot-fail-fast${deps_suffix} label found. Not passing --fail-fast to brew test-bot.`) + } + + if (label_names.includes('CI-build-dependents-from-source')) { + console.log('CI-build-dependents-from-source label found. Passing --build-dependents-from-source to brew test-bot.') + test_bot_dependents_args.push('--build-dependents-from-source') + } else { + console.log('No CI-build-dependents-from-source label found. Not passing --build-dependents-from-source to brew test-bot.') + } + + if (label_names.includes('CI-skip-recursive-dependents')) { + console.log('CI-skip-recursive-dependents label found. Passing --skip-recursive-dependents to brew test-bot.') + test_bot_dependents_args.push('--skip-recursive-dependents') + } else { + console.log('No CI-skip-recursive-dependents label found. Not passing --skip-recursive-dependents to brew test-bot.') + } + + if (label_names.includes('CI-skip-livecheck')) { + console.log('CI-skip-livecheck label found. Passing --skip-livecheck to brew test-bot.') + test_bot_formulae_args.push('--skip-livecheck') + } else { + console.log('No CI-skip-livecheck label found. Not passing --skip-livecheck to brew test-bot.') + } + + if (label_names.includes('CI-version-downgrade')) { + console.log('CI-version-downgrade label found. Passing --skip-stable-version-audit to brew test-bot.') + test_bot_formulae_args.push('--skip-stable-version-audit') + } else { + console.log('No CI-version-downgrade label found. Not passing --skip-stable-version-audit to brew test-bot.') + } + + if (label_names.includes('CI-checksum-change-confirmed')) { + console.log('CI-checksum-change-confirmed label found. Passing --skip-checksum-only-audit to brew test-bot.') + test_bot_formulae_args.push('--skip-checksum-only-audit') + } else { + console.log('No CI-checksum-change-confirmed label found. Not passing --skip-checksum-only-audit to brew test-bot.') + } + + if (label_names.includes('CI-skip-revision-audit')) { + console.log('CI-skip-revision-audit label found. Passing --skip-revision-audit to brew test-bot.') + test_bot_formulae_args.push('--skip-revision-audit') + } else { + console.log('No CI-skip-revision-audit label found. Not passing --skip-revision-audit to brew test-bot.') + } + + if (label_names.includes('CI-skip-new-formulae')) { + console.log('CI-skip-new-formulae label found. Passing --skip-new to brew test-bot.') + test_bot_formulae_args.push('--skip-new') + } else { + console.log('No CI-skip-new-formulae label found. Not passing --skip-new to brew test-bot.') + } + + if (label_names.includes('CI-skip-new-formulae-strict')) { + console.log('CI-skip-new-formulae-strict label found. Passing --skip-new-strict to brew test-bot.') + test_bot_formulae_args.push('--skip-new-strict') + } else { + console.log('No CI-skip-new-formulae-strict label found. Not passing --skip-new-strict to brew test-bot.') + } + + core.setOutput('test-bot-formulae-args', test_bot_formulae_args.join(" ")) + core.setOutput('test-bot-dependents-args', test_bot_dependents_args.join(" ")) +} diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 0000000000000..9eaa00603383c --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -0,0 +1,82 @@ +# This file is synced from the `.github` repository, do not modify it directly. +name: Manage stale issues + +on: + push: + paths: + - .github/workflows/stale-issues.yml + branches-ignore: + - dependabot/** + schedule: + # Once every day at midnight UTC + - cron: "0 0 * * *" + issue_comment: + +permissions: {} + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: stale-issues + cancel-in-progress: ${{ github.event_name != 'issue_comment' }} + +jobs: + stale: + if: > + github.repository_owner == 'Homebrew' && ( + github.event_name != 'issue_comment' || ( + contains(github.event.issue.labels.*.name, 'stale') || + contains(github.event.pull_request.labels.*.name, 'stale') + ) + ) + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Mark/Close Stale Issues and Pull Requests + uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 21 + days-before-close: 7 + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + exempt-issue-labels: "gsoc-outreachy,help wanted,in progress" + exempt-pr-labels: "gsoc-outreachy,help wanted,in progress" + delete-branch: true + + bump-pr-stale: + if: > + github.repository_owner == 'Homebrew' && ( + github.event_name != 'issue_comment' || ( + contains(github.event.issue.labels.*.name, 'stale') || + contains(github.event.pull_request.labels.*.name, 'stale') + ) + ) + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Mark/Close Stale `bump-formula-pr` and `bump-cask-pr` Pull Requests + uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 2 + days-before-close: 1 + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. To keep this + pull request open, add a `help wanted` or `in progress` label. + exempt-pr-labels: "help wanted,in progress" + any-of-labels: "bump-formula-pr,bump-cask-pr" + delete-branch: true diff --git a/.github/workflows/sync-default-branches.yml b/.github/workflows/sync-default-branches.yml new file mode 100644 index 0000000000000..c404f955a2fe5 --- /dev/null +++ b/.github/workflows/sync-default-branches.yml @@ -0,0 +1,64 @@ +name: Sync default branches + +on: + push: + branches: + - main + - master + pull_request: + paths: + - .github/workflows/sync-default-branches.yml + +permissions: {} + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: "sync-default-branches-${{ github.ref }}" + cancel-in-progress: true + +jobs: + sync: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Configure Git user + uses: Homebrew/actions/git-user-config@main + with: + username: github-actions[bot] + + - name: Determine source and target branches + id: branches + run: | + if [[ "${GITHUB_REF_NAME}" == "main" ]]; then + target="master" + source="main" + else + target="main" + source="master" + fi + echo "target=${target}" >> "$GITHUB_OUTPUT" + echo "source=${source}" >> "$GITHUB_OUTPUT" + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: 1 + persist-credentials: true + + - name: Get target SHA + id: sha + run: | + TARGET_SHA=$(git ls-remote origin "refs/heads/${SOURCE_BRANCH}" | cut -f1) + echo "target=${TARGET_SHA}" >> "$GITHUB_OUTPUT" + env: + SOURCE_BRANCH: ${{ steps.branches.outputs.source }} + + - name: Push target branch + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + run: git push origin "${TARGET_SHA}:refs/heads/${TARGET_BRANCH}" --force + env: + TARGET_SHA: ${{ steps.sha.outputs.target }} + TARGET_BRANCH: ${{ steps.branches.outputs.target }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000000..c0f520d313445 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,452 @@ +name: CI + +on: + push: + branches: + - main + - master + pull_request: + merge_group: + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_GITHUB_ACTIONS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_FROM_API: 1 + HOMEBREW_TEST_BOT_ANALYTICS: 1 + HOMEBREW_ENFORCE_SBOM: 1 + HOMEBREW_NO_BUILD_ERROR_ISSUES: 1 + HOMEBREW_ARM64_TESTING: 1 + GH_REPO: ${{github.repository}} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + SCRIPTS_PATH: .github/workflows/scripts + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: "tests-${{ github.ref }}" + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +permissions: + contents: read + +jobs: + tap_syntax: + if: github.repository_owner == 'Homebrew' + strategy: + matrix: + stable: [false, true] + name: tap_syntax${{ matrix.stable && ' (stable)' || '' }} + runs-on: ubuntu-latest + continue-on-error: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast-syntax') }} + container: + image: ghcr.io/homebrew/ubuntu22.04:${{ matrix.stable && 'latest' || 'main'}} + env: + HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1 + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + stable: ${{ matrix.stable }} + + - name: Cache style cache + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: /home/linuxbrew/.cache/Homebrew/style + key: style-cache-${{ matrix.stable && 'stable-' || 'main-' }}${{ github.sha }} + restore-keys: style-cache-${{ matrix.stable && 'stable-' || 'main-' }} + + - run: brew test-bot --only-tap-syntax ${{ matrix.stable && '--stable' || '' }} + + formulae_detect: + if: github.repository_owner == 'Homebrew' && github.event_name != 'push' + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + testing_formulae: ${{ steps.formulae-detect.outputs.testing_formulae }} + added_formulae: ${{ steps.formulae-detect.outputs.added_formulae }} + deleted_formulae: ${{ steps.formulae-detect.outputs.deleted_formulae }} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - run: brew test-bot --only-formulae-detect + id: formulae-detect + + - name: Fetch detected formulae bottles + if: > + github.event_name == 'merge_group' || + (contains(github.event.pull_request.labels.*.name, 'CI-published-bottle-commits') && + github.base_ref != 'master' && github.base_ref != 'main') + env: + TESTING_FORMULAE: ${{ steps.formulae-detect.outputs.formulae_to_fetch }} + run: brew test-bot --only-bottles-fetch --testing-formulae="$TESTING_FORMULAE" + + report_analytics: + runs-on: ubuntu-latest + needs: formulae_detect + if: github.repository_owner == 'Homebrew' && github.event_name == 'pull_request' + steps: + - name: Publish Analytics to Summary + env: + TESTING_FORMULAE: ${{needs.formulae_detect.outputs.testing_formulae}} + run: | + if [[ -z "$TESTING_FORMULAE" ]] + then + exit 0 + fi + + { + DATA_30="$(curl -s https://formulae.brew.sh/api/analytics/install/homebrew-core/30d.json)" + DATA_90="$(curl -s https://formulae.brew.sh/api/analytics/install/homebrew-core/90d.json)" + DATA_1="$(curl -s https://formulae.brew.sh/api/analytics/install/homebrew-core/365d.json)" + ERROR_DATA="$(curl -s https://formulae.brew.sh/api/analytics/build-error/30d.json)" + + echo "### Analytics about: ${TESTING_FORMULAE}" + echo "
Click to expand" + echo "" + echo "| Formula | Errors | 30d | 90d | 365d |" + echo "|---|---|---|---|---|" + for formula in ${TESTING_FORMULAE//,/ } + do + FORMULA_30="$(echo "$DATA_30" | jq -r ".formulae[\"$formula\"][0].count")" + FORMULA_90="$(echo "$DATA_90" | jq -r ".formulae[\"$formula\"][0].count")" + FORMULA_1="$(echo "$DATA_1" | jq -r ".formulae[\"$formula\"][0].count")" + FORMULA_ERROR="$(echo "$ERROR_DATA" | jq -r ".items[] | select(.formula == \"$formula\").count")" + echo "| $formula | $FORMULA_ERROR | $FORMULA_30 | $FORMULA_90 | $FORMULA_1 |" + done + echo "
" + } >> "$GITHUB_STEP_SUMMARY" + + setup_tests: + permissions: + pull-requests: read + if: github.repository_owner == 'Homebrew' && github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: formulae_detect + outputs: + syntax-only: ${{ steps.check-labels.outputs.syntax-only }} + linux-runner: ${{ steps.check-labels.outputs.linux-runner }} + fail-fast: ${{ steps.check-labels.outputs.fail-fast }} + test-dependents: ${{ steps.check-labels.outputs.test-dependents }} + long-timeout: ${{ steps.check-labels.outputs.long-timeout }} + test-bot-formulae-args: ${{ steps.check-labels.outputs.test-bot-formulae-args }} + test-bot-dependents-args: ${{ steps.check-labels.outputs.test-bot-dependents-args }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + + - name: Check for CI labels + id: check-labels + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + env: + TESTING_FORMULAE: ${{needs.formulae_detect.outputs.testing_formulae}} + ADDED_FORMULAE: ${{needs.formulae_detect.outputs.added_formulae}} + DELETED_FORMULAE: ${{needs.formulae_detect.outputs.deleted_formulae}} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + retries: 3 + script: | + const path = require('path') + const script = require(path.resolve(`${process.env.SCRIPTS_PATH}/check-labels.js`)) + + const formulae_detect = { + testing_formulae: `${process.env.TESTING_FORMULAE}`, + added_formulae: `${process.env.ADDED_FORMULAE}`, + deleted_formulae: `${process.env.DELETED_FORMULAE}` + } + + try { + await script({github, context, core}, formulae_detect, false) + } catch (error) { + console.error(error); + } + + setup_runners: + needs: [formulae_detect, setup_tests] + if: > + github.event_name == 'pull_request' && + !fromJson(needs.setup_tests.outputs.syntax-only) + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + runners: ${{steps.determine-runners.outputs.runners}} + runners_present: ${{steps.determine-runners.outputs.runners_present}} + env: + HOMEBREW_LINUX_RUNNER: ${{needs.setup_tests.outputs.linux-runner}} + HOMEBREW_MACOS_LONG_TIMEOUT: ${{needs.setup_tests.outputs.long-timeout}} + TESTING_FORMULAE: ${{needs.formulae_detect.outputs.testing_formulae}} + DELETED_FORMULAE: ${{needs.formulae_detect.outputs.deleted_formulae}} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Determine runners to use for tests job + id: determine-runners + run: brew determine-test-runners "$TESTING_FORMULAE" "$DELETED_FORMULAE" + + tests: + needs: [tap_syntax, formulae_detect, setup_tests, setup_runners] + if: > + github.event_name == 'pull_request' && + !fromJson(needs.setup_tests.outputs.syntax-only) && + fromJson(needs.setup_runners.outputs.runners_present) + strategy: + matrix: + include: ${{fromJson(needs.setup_runners.outputs.runners)}} + fail-fast: ${{fromJson(needs.setup_tests.outputs.fail-fast)}} + name: ${{matrix.name}} + runs-on: ${{matrix.runner}} + container: ${{matrix.container}} + timeout-minutes: ${{ matrix.timeout }} + defaults: + run: + shell: /bin/bash -xeuo pipefail {0} + working-directory: ${{matrix.workdir || github.workspace}} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} + BOTTLES_DIR: ${{matrix.workdir || github.workspace}}/bottles + steps: + - name: Pre-test steps + uses: Homebrew/actions/pre-build@main + with: + bottles-directory: ${{ env.BOTTLES_DIR }} + cleanup: ${{ matrix.cleanup }} + + - name: Test formulae + id: brew-test-bot-formulae + run: | + xargs -t brew test-bot \ + --testing-formulae="$TESTING_FORMULAE" \ + --added-formulae="$ADDED_FORMULAE" \ + --deleted-formulae="$DELETED_FORMULAE" \ + <<<"$TEST_BOT_FORMULAE_ARGS" + env: + TEST_BOT_FORMULAE_ARGS: ${{ needs.setup_tests.outputs.test-bot-formulae-args }} + TESTING_FORMULAE: ${{ needs.formulae_detect.outputs.testing_formulae }} + ADDED_FORMULAE: ${{ needs.formulae_detect.outputs.added_formulae }} + DELETED_FORMULAE: ${{ needs.formulae_detect.outputs.deleted_formulae }} + working-directory: ${{ env.BOTTLES_DIR }} + + - name: Post-build steps + if: always() + uses: Homebrew/actions/post-build@main + with: + runner: ${{ matrix.runner }} + cleanup: ${{ matrix.cleanup }} + bottles-directory: ${{ env.BOTTLES_DIR }} + logs-directory: ${{ format('{0}/logs', env.BOTTLES_DIR) }} + + setup_dep_tests: + permissions: + pull-requests: read + if: github.repository_owner == 'Homebrew' && github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: [setup_tests, formulae_detect] + outputs: + syntax-only: ${{ steps.check-labels.outputs.syntax-only }} + linux-runner: ${{ steps.check-labels.outputs.linux-runner }} + fail-fast: ${{ steps.check-labels.outputs.fail-fast }} + test-dependents: ${{ steps.check-labels.outputs.test-dependents }} + long-timeout: ${{ steps.check-labels.outputs.long-timeout }} + test-bot-formulae-args: ${{ steps.check-labels.outputs.test-bot-formulae-args }} + test-bot-dependents-args: ${{ steps.check-labels.outputs.test-bot-dependents-args }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + + - name: Check for CI labels + id: check-labels + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + env: + TESTING_FORMULAE: ${{needs.formulae_detect.outputs.testing_formulae}} + ADDED_FORMULAE: ${{needs.formulae_detect.outputs.added_formulae}} + DELETED_FORMULAE: ${{needs.formulae_detect.outputs.deleted_formulae}} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + retries: 3 + script: | + const path = require('path') + const script = require(path.resolve(`${process.env.SCRIPTS_PATH}/check-labels.js`)) + + const formulae_detect = { + testing_formulae: `${process.env.TESTING_FORMULAE}`, + added_formulae: `${process.env.ADDED_FORMULAE}`, + deleted_formulae: `${process.env.DELETED_FORMULAE}` + } + + try { + await script({github, context, core}, formulae_detect, true) + } catch (error) { + console.error(error); + } + + setup_dep_runners: + needs: [formulae_detect, setup_dep_tests] + if: > + github.event_name == 'pull_request' && + !fromJson(needs.setup_dep_tests.outputs.syntax-only) && + fromJson(needs.setup_dep_tests.outputs.test-dependents) + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + outputs: + runners: ${{steps.determine-dependent-runners.outputs.runners}} + runners_present: ${{steps.determine-dependent-runners.outputs.runners_present}} + env: + HOMEBREW_LINUX_RUNNER: ${{needs.setup_dep_tests.outputs.linux-runner}} + HOMEBREW_MACOS_LONG_TIMEOUT: ${{needs.setup_dep_tests.outputs.long-timeout}} + TESTING_FORMULAE: ${{needs.formulae_detect.outputs.testing_formulae}} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Determine runners to use for test_deps job + id: determine-dependent-runners + run: brew determine-test-runners --dependents --eval-all "$TESTING_FORMULAE" + + test_deps: + needs: + [tap_syntax, formulae_detect, setup_dep_tests, setup_dep_runners, tests] + if: > + (success() || + (failure() && + !fromJson(needs.setup_dep_tests.outputs.fail-fast) && + !contains(fromJson('["skipped", "cancelled"]'), needs.tests.result))) && + github.event_name == 'pull_request' && + !fromJson(needs.setup_dep_tests.outputs.syntax-only) && + fromJson(needs.setup_dep_tests.outputs.test-dependents) && + fromJson(needs.setup_dep_runners.outputs.runners_present) + strategy: + matrix: + include: ${{fromJson(needs.setup_dep_runners.outputs.runners)}} + fail-fast: ${{fromJson(needs.setup_dep_tests.outputs.fail-fast)}} + name: ${{matrix.name}} (deps) + runs-on: ${{matrix.runner}} + container: ${{matrix.container}} + timeout-minutes: ${{ matrix.timeout }} + defaults: + run: + shell: /bin/bash -xeuo pipefail {0} + working-directory: ${{matrix.workdir || github.workspace}} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} + BOTTLES_DIR: ${{matrix.workdir || github.workspace}}/bottles + TESTING_FORMULAE: ${{matrix.testing_formulae}} + steps: + - name: Pre-test steps + uses: Homebrew/actions/pre-build@main + with: + bottles-directory: ${{ env.BOTTLES_DIR }} + cleanup: ${{ matrix.cleanup }} + download-bottles: true + + - name: Test dependents + run: | + xargs -t brew test-bot \ + --testing-formulae="$TESTING_FORMULAE" \ + --tested-formulae="$TESTED_FORMULAE" \ + <<<"$TEST_BOT_DEPENDENTS_ARGS" + env: + TEST_BOT_DEPENDENTS_ARGS: ${{ needs.setup_dep_tests.outputs.test-bot-dependents-args }} + TESTED_FORMULAE: ${{ needs.formulae_detect.outputs.testing_formulae }} + working-directory: ${{ env.BOTTLES_DIR }} + + - name: Steps summary and cleanup + if: always() + uses: Homebrew/actions/post-build@main + with: + runner: ${{ runner.os == 'Linux' && format('{0}-deps', matrix.runner) || matrix.runner }} + cleanup: ${{ matrix.cleanup }} + bottles-directory: ${{ env.BOTTLES_DIR }} + logs-directory: ${{ format('{0}/logs', env.BOTTLES_DIR) }} + upload-bottles: false + + conclusion: + needs: [tests, test_deps, setup_tests, setup_runners] + if: always() && github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - name: Check `tests` result + env: + TESTS_RESULT: ${{ needs.tests.result }} + DEPS_TESTS_RESULT: ${{ needs.test_deps.result }} + RUNNERS_PRESENT: ${{ needs.setup_runners.outputs.runners_present }} + SYNTAX_ONLY: ${{ needs.setup_tests.outputs.syntax-only }} + run: | + result="${TESTS_RESULT}" + # Silence lint error about backtick usage inside single quotes. + # shellcheck disable=SC2016 + printf '::notice ::`tests` job status: %s\n' "$result" + + # Possible values are `success`, `failure`, `cancelled` or `skipped`. + # https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context + if [[ "$result" = "failure" ]] || [[ "$result" = "cancelled" ]] + then + # Silence lint error about backtick usage inside single quotes. + # shellcheck disable=SC2016 + printf '::error ::`tests` job %s.\n' "$result" + + deps_result="${DEPS_TESTS_RESULT}" + if [[ "$deps_result" = "skipped" ]] + then + # Silence lint error about backtick usage inside single quotes. + # shellcheck disable=SC2016 + printf '::error ::`test_deps` job skipped. Do not merge until re-run with `CI-no-fail-fast-deps`\n' + fi + + exit 1 + fi + + runners_present="${RUNNERS_PRESENT-}" + syntax_only="${SYNTAX_ONLY-}" + + # The tests job can be skipped only if the PR is syntax-only + # or no runners were assigned. + if [[ "$result" = "skipped" ]] && + [[ "$runners_present" = "false" || "$syntax_only" = "true" ]] + then + exit 0 + fi + + # The test job can succeed only if the PR is not syntax-only + # and runners were assigned. Otherwise it must have been skipped. + if [[ "$result" = "success" ]] && + [[ "$runners_present" = "true" ]] && + [[ "$syntax_only" = "false" ]] + then + exit 0 + fi + + # If we made it here, something went wrong with our workflow run that needs investigating. + printf '::error ::Unexpected outcome!\n' + # Silence lint error about backtick usage inside single quotes. + # shellcheck disable=SC2016 + printf '::error ::`tests` job result: %s\n' "$result" # success/skipped + printf '::error ::runners assigned: %s\n' "$runners_present" # true/false + printf '::error ::syntax-only: %s\n' "$syntax_only" # true/false + exit 1 diff --git a/.github/workflows/triage-ci.yml b/.github/workflows/triage-ci.yml new file mode 100644 index 0000000000000..855e1d8b0846a --- /dev/null +++ b/.github/workflows/triage-ci.yml @@ -0,0 +1,114 @@ +name: Triage CI failure + +on: + workflow_run: + workflows: + - CI + types: + - completed + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: triage-ci-${{ github.event.workflow_run.event }}-${{ github.event.workflow_run.id }} + cancel-in-progress: true + +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + +jobs: + comment: + runs-on: ubuntu-latest + if: > + github.repository_owner == 'Homebrew' && + github.event.workflow_run.conclusion == 'failure' && + github.event.workflow_run.event == 'pull_request' + permissions: + contents: read + pull-requests: write + env: + COMMENT_BODY_FILE: comment.txt + steps: + - uses: Homebrew/actions/find-related-workflow-run-id@main + with: + run-id: ${{ github.event.workflow_run.id }} + workflow-name: Triage tasks + + - name: Download `event_payload` artifact + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: event_payload + github-token: ${{ github.token }} + run-id: ${{ env.workflow_run_id }} + + - run: echo "number=$(jq --raw-output .number event.json)" >> "$GITHUB_OUTPUT" + id: pr + + - name: Check PR + id: check + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.pr.outputs.number }} + NEW_CONTRIBUTOR_MESSAGE: > + Thanks for contributing to Homebrew! :tada: It looks like you're having trouble + with a CI failure. See our [contribution guide](${{ github.event.repository.html_url }}/blob/HEAD/CONTRIBUTING.md) + for help. You may be most interested in the section on + [dealing with CI failures](${{ github.event.repository.html_url }}/blob/HEAD/CONTRIBUTING.md#dealing-with-ci-failures). + You can find the CI logs in the + [Checks tab](${{ github.event.repository.html_url }}/pull/${{ steps.pr.outputs.number }}/checks) + of your pull request. + run: | + rm -f "$COMMENT_BODY_FILE" + comment=false + response="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" + )" + comments_api_url="$(jq --raw-output '.comments_url' <<< "$response")" + + post_comment_if_not_posted() { + comment_condition_filter="$1" + message="$2" + + if jq --exit-status "$comment_condition_filter" + then + # Check that we haven't posted the message yet. + if jq --exit-status \ + --arg message "$message" \ + 'any(.[].body; contains($message)) | not' + then + echo "$message" >> "$COMMENT_BODY_FILE" + fi < <( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "$comments_api_url" + ) + fi <<< "$response" + } + + post_comment_if_not_posted \ + '.author_association == "FIRST_TIME_CONTRIBUTOR" or .author_association == "NONE"' \ + "$NEW_CONTRIBUTOR_MESSAGE" + + if [[ -s "$COMMENT_BODY_FILE" ]] + then + comment=true + fi + + echo "comment=$comment" >> "$GITHUB_OUTPUT" + + - name: Post comment + if: fromJson(steps.check.outputs.comment) + run: gh pr comment "$PR" --body-file "$COMMENT_BODY_FILE" --repo "$GITHUB_REPOSITORY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ steps.pr.outputs.number }} diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 0000000000000..53796b0af7d05 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,488 @@ +name: Triage tasks + +on: pull_request_target + +env: + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 + HOMEBREW_DISABLE_LOAD_FORMULA: 1 + +defaults: + run: + shell: bash -xeuo pipefail {0} + +concurrency: + group: "triage-${{ github.event.number }}" + cancel-in-progress: true + +permissions: {} + +jobs: + upload-metadata: + permissions: + contents: read + if: always() && github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + steps: + - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: event_payload + path: ${{ github.event_path }} + + check-base-branch: + permissions: + contents: read + issues: write + pull-requests: write + if: always() && github.repository_owner == 'Homebrew' && github.actor != 'BrewTestBot' + runs-on: ubuntu-latest + env: + PR: ${{ github.event.number }} + steps: + - name: Check pull request base branch + id: base + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + branch="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR" \ + --jq '.base.ref' + )" + echo "branch=${branch}" >>"${GITHUB_OUTPUT}" + + - name: Change base branch to `main` + id: change + if: steps.base.outputs.branch == 'master' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr edit "${PR}" --base main --repo "${GITHUB_REPOSITORY}" + + - name: Post comment + if: steps.base.outputs.branch == 'master' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BODY: |- + > [!TIP] + > This pull request targets the `master` branch. For future pull requests, please target the `main` branch instead. + run: gh pr comment "${PR}" --body "${BODY}" --repo "${GITHUB_REPOSITORY}" + + - name: Post failure comment + if: failure() && steps.change.conclusion == 'failure' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BODY: |- + > [!CAUTION] + > Failed to change base branch to `main`. Please edit your pull request manually to target the `main` branch instead of the `master` branch. + run: gh pr comment "${PR}" --body "${BODY}" --repo "${GITHUB_REPOSITORY}" + + check-bottle-block: + permissions: + contents: read + issues: write + pull-requests: write + if: always() && github.repository_owner == 'Homebrew' && github.actor != 'BrewTestBot' + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:main + env: + PR: ${{ github.event.number }} + steps: + - name: Set up Homebrew + id: setup-homebrew + uses: Homebrew/actions/setup-homebrew@main + with: + core: true + cask: false + + - name: Check that bottle block is not modified + id: bottle-block + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: brew check-bottle-modification "${PR}" + + - name: Post comment + if: failure() && steps.bottle-block.conclusion == 'failure' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BODY: |- + > [!CAUTION] + > Please **do not** modify the bottle block. Bottle block modifications can cause CI to misbehave. + > @BrewTestBot will handle updating the bottle block before this PR is merged. + run: gh pr comment "${PR}" --body "${BODY}" --repo "${GITHUB_REPOSITORY}" + + triage: + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + pull-requests: write + statuses: write + steps: + - name: Check commit format + if: > + github.actor != 'BrewTestBot' && + !contains(github.event.pull_request.labels.*.name, 'CI-published-bottle-commits') + uses: Homebrew/actions/check-commit-format@main + with: + token: ${{secrets.GITHUB_TOKEN}} + + - name: Label pull request + uses: Homebrew/actions/label-pull-requests@main + if: always() + with: + token: ${{secrets.GITHUB_TOKEN}} + def: | + - label: new formula + status: added + path: Formula/.+ + allow_any_match: true + + - label: marked for removal/rejection + status: removed + path: Formula/.+ + + - label: no ARM bottle + path: Formula/.+ + content: '\n sha256.* (?!.*(?:arm64_|_linux)).+: +"[a-fA-F0-9]+"\n' + missing_content: '\n sha256.* (arm64_.+|all): +"[a-fA-F0-9]+"\n' + + - label: no Linux bottle + path: Formula/.+ + content: \n bottle do\n + missing_content: + - '\n sha256.* (x86_64|arm64)_linux: +"[a-fA-F0-9]+"\n' + - '\n sha256.* all: +"[a-fA-F0-9]+"\n' + - depends_on :macos + + - label: formula deprecated + path: Formula/.+ + content: \n deprecate!.*\n + + - label: formula disabled + path: Formula/.+ + content: \n disable!.*\n + + - label: legacy + path: Formula/.+@.+ + except: + - Formula/b/bash-completion@2.rb + - Formula/i/icu4c@77.rb + - Formula/lib/libxml++@5.rb + - Formula/o/openssl@3.rb + - Formula/p/postgresql@18.rb + - Formula/p/python@3.14.rb + - Formula/p/python-gdbm@3.14.rb + - Formula/p/python-tk@3.14.rb + + - label: missing license + path: Formula/.+ + missing_content: \n license .+\n + + - label: deprecated license + path: Formula/.+ + content: license .*"(GPL|LGPL|AGPL|GFDL)-[0-9].[0-9][+]?".* + + - label: boost + path: Formula/.+ + content: depends_on "boost(@[0-9.]+)?" + + - label: ffmpeg + path: Formula/.+ + content: depends_on "ffmpeg(@[0-9.]+)?" + + - label: erlang + path: Formula/.+ + content: depends_on "erlang(@[0-9.]+)?" + + - label: go + path: Formula/.+ + content: depends_on "go(@[0-9.]+)?" + + - label: haskell + path: Formula/.+ + content: depends_on "(ghc|haskell-stack)(@[0-9.]+)?" + + - label: icu4c + path: Formula/.+ + content: depends_on "icu4c(@[0-9.]+)?" + + - label: java + path: Formula/.+ + content: depends_on "openjdk(@[0-9.]+)?" + + - label: linux-only + path: Formula/.+ + content: depends_on :linux + + - label: macos-only + path: Formula/.+ + content: depends_on :macos + + - label: meson + path: Formula/.+ + content: depends_on "meson" + + - label: lua + path: Formula/.+ + content: depends_on "(lua|luajit|luajit-openresty)(@[0-9.]+)?" + + - label: nodejs + path: Formula/.+ + content: depends_on "node(@[0-9.]+)?" + + - label: ocaml + path: Formula/.+ + content: depends_on "ocaml(@[0-9.]+)?" + + - label: perl + path: Formula/.+ + content: (depends_on|uses_from_macos) "perl(@[0-9.]+)?" + + - label: php + path: Formula/.+ + content: (depends_on|uses_from_macos) "php(@[0-9.]+)?" + + - label: python + path: Formula/.+ + content: (depends_on|uses_from_macos) "python(@[0-9.]+)?" + missing_content: (depends_on|uses_from_macos) "python(@[0-9.]+)?" => \[?:(build|test) + + - label: ruby + path: Formula/.+ + content: (depends_on|uses_from_macos) "ruby(@[0-9.]+)?" + + - label: rust + path: Formula/.+ + content: depends_on "rust(@[0-9.]+)?" + + - label: zig + path: Formula/.+ + content: depends_on "zig(@[0-9.]+)?" + + - label: dotnet + path: Formula/.+ + content: depends_on "dotnet(@[0-9.]+)?" + + - label: swift + path: Formula/.+ + content: system "swift", "build" + + - label: long build + path: "Formula/.+/(\ + agda|\ + apache-pulsar|\ + arangodb|\ + aws-sdk-cpp|\ + cbmc|\ + cp2k|\ + deno|\ + dotnet|\ + emscripten|\ + envoy|\ + gcc|\ + gdb|\ + ghc|\ + graph-tool|\ + gstreamer|\ + haskell-language-server|\ + libtensorflow|\ + llvm@19|\ + llvm|\ + mame|\ + metashell|\ + mlkit|\ + mpich|\ + node|\ + octave|\ + opencascade|\ + openfast|\ + openvino|\ + pcl|\ + ponyc|\ + pytorch|\ + qtwebengine|\ + root|\ + rtabmap|\ + rust|\ + souffle|\ + swift|\ + texlive|\ + v8|\ + vtk\ + )(@[0-9.]+)?.rb" + keep_if_no_match: true + allow_any_match: true + + - label: long dependent tests + path: "Formula/.+/(\ + aom|\ + at-spi2-core|\ + boost|\ + brotli|\ + c-ares|\ + cabal-install|\ + cmake|\ + cryptography|\ + dav1d|\ + freetype|\ + frei0r|\ + gcc|\ + gettext|\ + ghc|\ + glib|\ + gsettings-desktop-schemas|\ + gtk\\+3|\ + harfbuzz|\ + highway|\ + hwloc|\ + icu4c|\ + imath|\ + jasper|\ + jpeg-turbo|\ + jpeg-xl|\ + libcap|\ + libgcrypt|\ + libgpg-error|\ + libidn2|\ + libmicrohttpd|\ + librist|\ + libnghttp2|\ + libomp|\ + libpng|\ + libtool|\ + libunistring|\ + mpfr|\ + mpg123|\ + node|\ + numpy|\ + openblas|\ + openjpeg|\ + openssl@3|\ + p11-kit|\ + pango|\ + pcre2|\ + python@3.14|\ + rav1e|\ + rust|\ + sdl2|\ + shared-mime-info|\ + sqlite|\ + suite-sparse|\ + qtbase|\ + readline|\ + unbound|\ + xz|\ + zstd\ + ).rb" + keep_if_no_match: true + allow_any_match: true + + - label: CI-build-dependents-from-source + path: + - 'Formula/.+/(cabal-install|docbook-xsl|emscripten|erlang|ocaml|ocaml-findlib|ocaml-num|openjdk|rust)\.rb' + - 'Aliases/(ghc|go)(@[0-9.]+)?$' + missing_content: '\n revision [0-9]+\n' + keep_if_no_match: true + allow_any_match: true + + - label: CI-skip-recursive-dependents + path: "Formula/.+/(\ + ca-certificates|\ + certifi|\ + cmake|\ + curl|\ + gettext|\ + glib|\ + openssl@3|\ + wayland-protocols|\ + sqlite|\ + systemd\ + ).rb" + keep_if_no_match: true + allow_any_match: true + + - label: CI-linux-self-hosted + path: "Formula/.+/(\ + dart-sdk|\ + envoy|\ + qt@5|\ + qtwebengine|\ + teleport|\ + texlive\ + ).rb" + keep_if_no_match: true + allow_any_match: true + + - label: CI-linux-self-hosted-deps + path: "Formula/.+/(\ + alsa-lib|\ + glib|\ + libcap|\ + libva|\ + libxml2|\ + openssl@3|\ + python@3.14|\ + wayland-protocols|\ + zlib|\ + ).rb" + keep_if_no_match: true + allow_any_match: true + + - label: CI-no-bottles + path: Formula/p/portable-.+ + except: + - Formula/p/portable-ruby.rb + keep_if_no_match: true + + - label: bump-formula-pr + pr_body_content: Created with `brew bump-formula-pr` + + - label: pip-audit + pr_body_content: Created by `brew-pip-audit` + + - label: alias + path: Aliases/.+ + allow_any_match: true + + # Handle this separately since the `workflows` label affects bottle cache usage + # and hardens us against cache poisoning attacks. + workflows-label: + needs: triage + permissions: + contents: read + issues: write + pull-requests: write + if: always() && github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + env: + PR: ${{ github.event.number }} + steps: + - name: Check pull request changed files + id: files + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + workflow_modified="$( + gh api \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + "repos/$GITHUB_REPOSITORY/pulls/$PR/files" \ + --jq 'any(.[].filename; startswith(".github/workflows"))' + )" + # Fail closed. + echo "workflow_modified=${workflow_modified:-true}" >> "${GITHUB_OUTPUT}" + + # Wait briefly in case of failure to make sure we don't end up + # hitting the same API error when trying `gh pr edit`. + - if: failure() + run: sleep 30 + + - name: Label PR + if: always() && fromJson(steps.files.outputs.workflow_modified) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr edit --add-label workflows "$PR" --repo "$GITHUB_REPOSITORY" diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000000000..465fbd2c2e052 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,6 @@ +# This file is synced from the `.github` repository, do not modify it directly. +rules: + unpinned-uses: + config: + policies: + Homebrew/actions/*: ref-pin diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000000000..80eb245cd22bc --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,235 @@ +# This file is synced from `Homebrew/brew` by the `.github` repository, do not modify it directly. +--- +AllCops: + ParserEngine: parser_prism + TargetRubyVersion: 3.3 + NewCops: enable + Include: + - "**/*.rbi" + Exclude: + - Homebrew/sorbet/rbi/{annotations,dsl,gems}/**/*.rbi + - Homebrew/sorbet/rbi/parser*.rbi + - Homebrew/bin/* + - Homebrew/vendor/**/* + - Taps/*/*/vendor/**/* + - "**/.github/copilot-instructions.md" + - "**/vendor/**/*" + SuggestExtensions: + rubocop-minitest: false +Layout/ArgumentAlignment: + Exclude: + - Taps/*/*/*.rb + - "/**/Formula/**/*.rb" + - "**/Formula/**/*.rb" +Layout/CaseIndentation: + EnforcedStyle: end +Layout/EmptyLinesAfterModuleInclusion: + Enabled: false +Layout/FirstArrayElementIndentation: + EnforcedStyle: consistent +Layout/FirstHashElementIndentation: + EnforcedStyle: consistent +Layout/EndAlignment: + EnforcedStyleAlignWith: start_of_line +Layout/HashAlignment: + EnforcedHashRocketStyle: table + EnforcedColonStyle: table +Layout/LeadingCommentSpace: + Exclude: + - Taps/*/*/cmd/*.rb +Layout/LineLength: + Max: 118 + AllowedPatterns: + - "#: " + - ' url "' + - ' mirror "' + - " plist_options " + - ' executable: "' + - ' font "' + - ' homepage "' + - ' name "' + - ' pkg "' + - ' pkgutil: "' + - " sha256 cellar: " + - " sha256 " + - "#{language}" + - "#{version." + - ' "/Library/Application Support/' + - "\"/Library/Caches/" + - "\"/Library/PreferencePanes/" + - ' "~/Library/Application Support/' + - "\"~/Library/Caches/" + - "\"~/Library/Containers" + - "\"~/Application Support" + - " was verified as official when first introduced to the cask" +Layout/SpaceAroundOperators: + Enabled: false +Layout/SpaceBeforeBrackets: + Exclude: + - "**/*_spec.rb" + - Taps/*/*/*.rb + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" +Lint/AmbiguousBlockAssociation: + Enabled: false +Lint/DuplicateBranch: + Exclude: + - Taps/*/*/*.rb + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" +Lint/ParenthesesAsGroupedExpression: + Exclude: + - Taps/*/*/*.rb + - "/**/Formula/**/*.rb" + - "**/Formula/**/*.rb" +Lint/UnusedMethodArgument: + AllowUnusedKeywordArguments: true +Metrics: + Enabled: false +Naming/BlockForwarding: + Enabled: false +Naming/FileName: + Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/ +Naming/HeredocDelimiterNaming: + ForbiddenDelimiters: + - END, EOD, EOF +Naming/InclusiveLanguage: + CheckStrings: true + FlaggedTerms: + slave: + AllowedRegex: + - gitslave + - log_slave + - ssdb_slave + - var_slave + - patches/13_fix_scope_for_show_slave_status_data.patch +Naming/MethodName: + AllowedPatterns: + - "\\A(fetch_)?HEAD\\?\\Z" +Naming/MethodParameterName: + inherit_mode: + merge: + - AllowedNames +Naming/PredicateMethod: + AllowBangMethods: true +Naming/VariableNumber: + Enabled: false +Style/AndOr: + EnforcedStyle: always +Style/ArgumentsForwarding: + Enabled: false +Style/AutoResourceCleanup: + Enabled: true +Style/BarePercentLiterals: + EnforcedStyle: percent_q +Style/BlockDelimiters: + BracesRequiredMethods: + - sig +Style/ClassAndModuleChildren: + Exclude: + - "**/*.rbi" +Style/CollectionMethods: + Enabled: true +Style/DisableCopsWithinSourceCodeDirective: + Enabled: true + Include: + - Taps/*/*/*.rb + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" +Style/Documentation: + Exclude: + - Taps/**/* + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" + - "**/*.rbi" +Style/EmptyMethod: + Exclude: + - "**/*.rbi" +Style/FetchEnvVar: + Exclude: + - Taps/*/*/*.rb + - "/**/Formula/**/*.rb" + - "**/Formula/**/*.rb" +Style/FrozenStringLiteralComment: + EnforcedStyle: always + Exclude: + - Taps/*/*/*.rb + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" + - Homebrew/test/**/Casks/**/*.rb + - "**/*.rbi" + - "**/Brewfile" +Style/GuardClause: + Exclude: + - Taps/*/*/*.rb + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" +Style/HashAsLastArrayItem: + Exclude: + - Taps/*/*/*.rb + - "/**/Formula/**/*.rb" + - "**/Formula/**/*.rb" +Style/InverseMethods: + InverseMethods: + :blank?: :present? +Style/InvertibleUnlessCondition: + Enabled: true + InverseMethods: + :==: :!= + :zero?: + :blank?: :present? +Style/MutableConstant: + EnforcedStyle: strict +Style/NumericLiteralPrefix: + EnforcedOctalStyle: zero_only +Style/NumericLiterals: + MinDigits: 11 + Strict: true +Style/OpenStructUse: + Exclude: + - Taps/**/* +Style/OptionalBooleanParameter: + AllowedMethods: + - respond_to? + - respond_to_missing? +Style/RedundantLineContinuation: + Enabled: false +Style/RescueStandardError: + EnforcedStyle: implicit +Style/ReturnNil: + Enabled: true +Style/StderrPuts: + Enabled: false +Style/StringConcatenation: + Exclude: + - Taps/*/*/*.rb + - "/**/{Formula,Casks}/**/*.rb" + - "**/{Formula,Casks}/**/*.rb" +Style/StringLiterals: + EnforcedStyle: double_quotes +Style/StringLiteralsInInterpolation: + EnforcedStyle: double_quotes +Style/StringMethods: + Enabled: true +Style/SuperWithArgsParentheses: + Enabled: false +Style/SymbolArray: + EnforcedStyle: brackets +Style/TernaryParentheses: + EnforcedStyle: require_parentheses_when_complex +Style/TopLevelMethodDefinition: + Enabled: true + Exclude: + - Taps/**/* +Style/TrailingCommaInArguments: + EnforcedStyleForMultiline: comma +Style/TrailingCommaInArrayLiteral: + EnforcedStyleForMultiline: comma +Style/TrailingCommaInHashLiteral: + EnforcedStyleForMultiline: comma +Style/UnlessLogicalOperators: + Enabled: true + EnforcedStyle: forbid_logical_operators +Style/WordArray: + MinSize: 4 + diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000000000..4f5e69734c958 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.5 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 62e28b06f1249..0000000000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: c -os: linux -compiler: gcc -sudo: false - -deploy: - local-dir: formulae.brew.sh - repo: Homebrew/formulae.brew.sh - target-branch: master - verbose: true - provider: pages - skip-cleanup: true - github-token: $GITHUB_TOKEN - keep-history: true - on: - all_branches: true - -before_install: - - HOMEBREW_REPOSITORY="$HOME/Homebrew" - - export PATH="$HOMEBREW_REPOSITORY/bin:$PATH" - - export HOMEBREW_FORCE_HOMEBREW_ORG=1 - - export HOMEBREW_BOTTLE_DOMAIN=https://homebrew.bintray.com - # umask 022 fixes Linux `brew tests` failures - - umask 022 - - chmod 644 Formula/*.rb - - rm -rf $HOMEBREW_REPOSITORY - - travis_retry git clone --depth=1 https://github.com/Homebrew/brew "$HOMEBREW_REPOSITORY" - - HOMEBREW_TAP_DIR="$(brew --repo "$TRAVIS_REPO_SLUG")" - - mkdir -p "$HOMEBREW_TAP_DIR" - - rm -rf "$HOMEBREW_TAP_DIR" - - ln -s "$PWD" "$HOMEBREW_TAP_DIR" - # trigger vendored ruby installation - - brew help - -before_script: - - travis_retry git clone https://$GITHUB_TOKEN@github.com/Homebrew/formulae.brew.sh - - openssl aes-256-cbc -K $encrypted_973277d8afbb_key -iv $encrypted_973277d8afbb_iv -in formulae.brew.sh/.homebrew_analytics.json.enc -out formulae.brew.sh/.homebrew_analytics.json -d - - -script: - - cd formulae.brew.sh && rake diff --git a/Abstract/portable-formula.rb b/Abstract/portable-formula.rb new file mode 100644 index 0000000000000..182120ca9336b --- /dev/null +++ b/Abstract/portable-formula.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +module PortableFormulaMixin + if OS.mac? + if Hardware::CPU.arm? + TARGET_MACOS = :big_sur + TARGET_DARWIN_VERSION = Version.new("20.1.0").freeze + else + TARGET_MACOS = :catalina + TARGET_DARWIN_VERSION = Version.new("19.0.0").freeze + end + + CROSS_COMPILING = OS.kernel_version.major != TARGET_DARWIN_VERSION.major + end + + def portable_configure_args + # Allow cross-compile between Darwin versions + if OS.mac? && CROSS_COMPILING + cpu = if Hardware::CPU.arm? + "aarch64" + else + "x86_64" + end + %W[ + --build=#{cpu}-apple-darwin#{OS.kernel_version} + --host=#{cpu}-apple-darwin#{TARGET_DARWIN_VERSION} + ] + else + [] + end + end + + def install + if OS.mac? + if OS::Mac.version > TARGET_MACOS + target_macos_humanized = TARGET_MACOS.to_s.tr("_", " ").split.map(&:capitalize).join(" ") + + opoo <<~EOS + You are building portable formula on #{OS::Mac.version}. + As result, formula won't be able to work on older macOS versions. + It's recommended to build this formula on macOS #{target_macos_humanized} + (the oldest version that can run Homebrew). + EOS + end + + # Always prefer to linking to portable libs. + ENV.append "LDFLAGS", "-Wl,-search_paths_first" + elsif OS.linux? + # reset Linuxbrew env, because we want to build formula against + # libraries offered by system (CentOS docker) rather than Linuxbrew. + ENV.delete "LDFLAGS" + ENV.delete "LIBRARY_PATH" + ENV.delete "LD_RUN_PATH" + ENV.delete "LD_LIBRARY_PATH" + ENV.delete "TERMINFO_DIRS" + ENV.delete "HOMEBREW_RPATH_PATHS" + ENV.delete "HOMEBREW_DYNAMIC_LINKER" + + # https://github.com/Homebrew/homebrew-portable-ruby/issues/118 + ENV.append_to_cflags "-fPIC" + end + + super + end + + def test + refute_match(/Homebrew libraries/, + shell_output("#{HOMEBREW_BREW_FILE} linkage #{full_name}")) + + super + end +end + +class PortableFormula < Formula + desc "Abstract portable formula" + homepage "https://github.com/Homebrew/homebrew-portable-ruby" + + def self.inherited(subclass) + subclass.class_eval do + super + + keg_only "portable formulae are keg-only" + + on_linux do + on_intel do + depends_on "glibc@2.13" => :build + end + on_arm do + depends_on "glibc@2.17" => :build + end + depends_on "linux-headers@4.4" => :build + end + + prepend PortableFormulaMixin + end + end +end diff --git a/Aliases/0install b/Aliases/0install index 2586aea6e0c11..f50154c8984d4 120000 --- a/Aliases/0install +++ b/Aliases/0install @@ -1 +1 @@ -../Formula/zero-install.rb \ No newline at end of file +../Formula/z/zero-install.rb \ No newline at end of file diff --git a/Aliases/0mq b/Aliases/0mq index 173ef88d6a059..16891bfe3ad3d 120000 --- a/Aliases/0mq +++ b/Aliases/0mq @@ -1 +1 @@ -../Formula/zeromq.rb \ No newline at end of file +../Formula/z/zeromq.rb \ No newline at end of file diff --git a/Aliases/2ms b/Aliases/2ms new file mode 120000 index 0000000000000..cf12d120395ae --- /dev/null +++ b/Aliases/2ms @@ -0,0 +1 @@ +../Formula/t/two-ms.rb \ No newline at end of file diff --git a/Aliases/2ping b/Aliases/2ping index 791c3ba453105..cb0c68d1d014f 120000 --- a/Aliases/2ping +++ b/Aliases/2ping @@ -1 +1 @@ -../Formula/twoping.rb \ No newline at end of file +../Formula/t/twoping.rb \ No newline at end of file diff --git a/Aliases/3mux b/Aliases/3mux new file mode 120000 index 0000000000000..d4ec32a1efd6d --- /dev/null +++ b/Aliases/3mux @@ -0,0 +1 @@ +../Formula/t/threemux.rb \ No newline at end of file diff --git a/Aliases/4store b/Aliases/4store index ba1951c65b673..06d01b4eb38b5 120000 --- a/Aliases/4store +++ b/Aliases/4store @@ -1 +1 @@ -../Formula/fourstore.rb \ No newline at end of file +../Formula/f/fourstore.rb \ No newline at end of file diff --git a/Aliases/64tass b/Aliases/64tass index 272010cc8c310..df08336b47f93 120000 --- a/Aliases/64tass +++ b/Aliases/64tass @@ -1 +1 @@ -../Formula/tass64.rb \ No newline at end of file +../Formula/t/tass64.rb \ No newline at end of file diff --git a/Aliases/6tunnel b/Aliases/6tunnel new file mode 120000 index 0000000000000..4489a6679f466 --- /dev/null +++ b/Aliases/6tunnel @@ -0,0 +1 @@ +../Formula/s/sixtunnel.rb \ No newline at end of file diff --git a/Aliases/7-zip b/Aliases/7-zip new file mode 120000 index 0000000000000..7d41e11db54f5 --- /dev/null +++ b/Aliases/7-zip @@ -0,0 +1 @@ +../Formula/s/sevenzip.rb \ No newline at end of file diff --git a/Aliases/7zip b/Aliases/7zip new file mode 120000 index 0000000000000..7d41e11db54f5 --- /dev/null +++ b/Aliases/7zip @@ -0,0 +1 @@ +../Formula/s/sevenzip.rb \ No newline at end of file diff --git a/Aliases/actor-framework b/Aliases/actor-framework index 99a8b499ee05b..5c9284264c01e 120000 --- a/Aliases/actor-framework +++ b/Aliases/actor-framework @@ -1 +1 @@ -../Formula/caf.rb \ No newline at end of file +../Formula/c/caf.rb \ No newline at end of file diff --git a/Aliases/ag b/Aliases/ag index dd4531b44ad73..bd4cefa2aed34 120000 --- a/Aliases/ag +++ b/Aliases/ag @@ -1 +1 @@ -../Formula/the_silver_searcher.rb \ No newline at end of file +../Formula/t/the_silver_searcher.rb \ No newline at end of file diff --git a/Aliases/alut b/Aliases/alut index 41d7d8a10018b..34d2b10322699 120000 --- a/Aliases/alut +++ b/Aliases/alut @@ -1 +1 @@ -../Formula/freealut.rb \ No newline at end of file +../Formula/f/freealut.rb \ No newline at end of file diff --git a/Aliases/ansible@12 b/Aliases/ansible@12 new file mode 120000 index 0000000000000..f450e2c00ab37 --- /dev/null +++ b/Aliases/ansible@12 @@ -0,0 +1 @@ +../Formula/a/ansible.rb \ No newline at end of file diff --git a/Aliases/ansible@2.7 b/Aliases/ansible@2.7 deleted file mode 120000 index 875b454391541..0000000000000 --- a/Aliases/ansible@2.7 +++ /dev/null @@ -1 +0,0 @@ -../Formula/ansible.rb \ No newline at end of file diff --git a/Aliases/ant@1.10 b/Aliases/ant@1.10 index c161553112251..9dc74605e2137 120000 --- a/Aliases/ant@1.10 +++ b/Aliases/ant@1.10 @@ -1 +1 @@ -../Formula/ant.rb \ No newline at end of file +../Formula/a/ant.rb \ No newline at end of file diff --git a/Aliases/antlr@4 b/Aliases/antlr@4 deleted file mode 120000 index 13be1ede9228e..0000000000000 --- a/Aliases/antlr@4 +++ /dev/null @@ -1 +0,0 @@ -../Formula/antlr.rb \ No newline at end of file diff --git a/Aliases/apache-activemq b/Aliases/apache-activemq index 9e9722dac8c35..44cbcf2559bd7 120000 --- a/Aliases/apache-activemq +++ b/Aliases/apache-activemq @@ -1 +1 @@ -../Formula/activemq.rb \ No newline at end of file +../Formula/a/activemq.rb \ No newline at end of file diff --git a/Aliases/apache-flink@2 b/Aliases/apache-flink@2 new file mode 120000 index 0000000000000..4ced5c8b1f954 --- /dev/null +++ b/Aliases/apache-flink@2 @@ -0,0 +1 @@ +../Formula/a/apache-flink.rb \ No newline at end of file diff --git a/Aliases/apache-fop b/Aliases/apache-fop index e555499e9bb5e..bc68a984f1673 120000 --- a/Aliases/apache-fop +++ b/Aliases/apache-fop @@ -1 +1 @@ -../Formula/fop.rb \ No newline at end of file +../Formula/f/fop.rb \ No newline at end of file diff --git a/Aliases/apache-httpd b/Aliases/apache-httpd index 65420f86cb55a..c215267654f56 120000 --- a/Aliases/apache-httpd +++ b/Aliases/apache-httpd @@ -1 +1 @@ -../Formula/httpd.rb \ No newline at end of file +../Formula/h/httpd.rb \ No newline at end of file diff --git a/Aliases/apache2 b/Aliases/apache2 index 65420f86cb55a..c215267654f56 120000 --- a/Aliases/apache2 +++ b/Aliases/apache2 @@ -1 +1 @@ -../Formula/httpd.rb \ No newline at end of file +../Formula/h/httpd.rb \ No newline at end of file diff --git a/Aliases/arpack-ng b/Aliases/arpack-ng new file mode 120000 index 0000000000000..22643ca89bf1a --- /dev/null +++ b/Aliases/arpack-ng @@ -0,0 +1 @@ +../Formula/a/arpack.rb \ No newline at end of file diff --git a/Aliases/assimp@6 b/Aliases/assimp@6 new file mode 120000 index 0000000000000..28e7837394f7b --- /dev/null +++ b/Aliases/assimp@6 @@ -0,0 +1 @@ +../Formula/a/assimp.rb \ No newline at end of file diff --git a/Aliases/atkmm@2.36 b/Aliases/atkmm@2.36 new file mode 120000 index 0000000000000..beb5cb7a7729b --- /dev/null +++ b/Aliases/atkmm@2.36 @@ -0,0 +1 @@ +../Formula/a/atkmm.rb \ No newline at end of file diff --git a/Aliases/autoconf@2.69 b/Aliases/autoconf@2.69 deleted file mode 120000 index eec60d8a8771e..0000000000000 --- a/Aliases/autoconf@2.69 +++ /dev/null @@ -1 +0,0 @@ -../Formula/autoconf.rb \ No newline at end of file diff --git a/Aliases/autoconf@2.72 b/Aliases/autoconf@2.72 new file mode 120000 index 0000000000000..c5e01590f1d66 --- /dev/null +++ b/Aliases/autoconf@2.72 @@ -0,0 +1 @@ +../Formula/a/autoconf.rb \ No newline at end of file diff --git a/Aliases/aws-as b/Aliases/aws-as deleted file mode 120000 index 39e684abe7fe1..0000000000000 --- a/Aliases/aws-as +++ /dev/null @@ -1 +0,0 @@ -../Formula/auto-scaling.rb \ No newline at end of file diff --git a/Aliases/aws-mon b/Aliases/aws-mon deleted file mode 120000 index 190c3c2e5a5bd..0000000000000 --- a/Aliases/aws-mon +++ /dev/null @@ -1 +0,0 @@ -../Formula/cloud-watch.rb \ No newline at end of file diff --git a/Aliases/awscli@2 b/Aliases/awscli@2 new file mode 120000 index 0000000000000..cdfa7f7a563af --- /dev/null +++ b/Aliases/awscli@2 @@ -0,0 +1 @@ +../Formula/a/awscli.rb \ No newline at end of file diff --git a/Aliases/awsebcli b/Aliases/awsebcli index ac955f9c92349..51c1039096b6c 120000 --- a/Aliases/awsebcli +++ b/Aliases/awsebcli @@ -1 +1 @@ -../Formula/aws-elasticbeanstalk.rb \ No newline at end of file +../Formula/a/aws-elasticbeanstalk.rb \ No newline at end of file diff --git a/Aliases/az b/Aliases/az index e8fae66d7baac..8117293fc5391 120000 --- a/Aliases/az +++ b/Aliases/az @@ -1 +1 @@ -../Formula/azure-cli.rb \ No newline at end of file +../Formula/a/azure-cli.rb \ No newline at end of file diff --git a/Aliases/bal b/Aliases/bal new file mode 120000 index 0000000000000..0d70a424edf5b --- /dev/null +++ b/Aliases/bal @@ -0,0 +1 @@ +../Formula/b/ballerina.rb \ No newline at end of file diff --git a/Aliases/bash-completion@1 b/Aliases/bash-completion@1 index 4fa6f6be3aecc..ad226e7c41fa1 120000 --- a/Aliases/bash-completion@1 +++ b/Aliases/bash-completion@1 @@ -1 +1 @@ -../Formula/bash-completion.rb \ No newline at end of file +../Formula/b/bash-completion.rb \ No newline at end of file diff --git a/Aliases/basisu b/Aliases/basisu new file mode 120000 index 0000000000000..b29e06b5dd756 --- /dev/null +++ b/Aliases/basisu @@ -0,0 +1 @@ +../Formula/b/basis_universal.rb \ No newline at end of file diff --git a/Aliases/bats b/Aliases/bats new file mode 120000 index 0000000000000..38890a7abca78 --- /dev/null +++ b/Aliases/bats @@ -0,0 +1 @@ +../Formula/b/bats-core.rb \ No newline at end of file diff --git a/Aliases/bazel@8 b/Aliases/bazel@8 new file mode 120000 index 0000000000000..1373f68cedb87 --- /dev/null +++ b/Aliases/bazel@8 @@ -0,0 +1 @@ +../Formula/b/bazel.rb \ No newline at end of file diff --git a/Aliases/berkeley-db@18 b/Aliases/berkeley-db@18 index 4840a66b0ea23..e07d98ec4c445 120000 --- a/Aliases/berkeley-db@18 +++ b/Aliases/berkeley-db@18 @@ -1 +1 @@ -../Formula/berkeley-db.rb \ No newline at end of file +../Formula/b/berkeley-db.rb \ No newline at end of file diff --git a/Aliases/bigdata b/Aliases/bigdata deleted file mode 120000 index 5cb5a15765d1e..0000000000000 --- a/Aliases/bigdata +++ /dev/null @@ -1 +0,0 @@ -../Formula/blazegraph.rb \ No newline at end of file diff --git a/Aliases/bison@3.2 b/Aliases/bison@3.2 deleted file mode 120000 index 152bb4efd35cd..0000000000000 --- a/Aliases/bison@3.2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/bison.rb \ No newline at end of file diff --git a/Aliases/bison@3.8 b/Aliases/bison@3.8 new file mode 120000 index 0000000000000..9729a9e2a9cbb --- /dev/null +++ b/Aliases/bison@3.8 @@ -0,0 +1 @@ +../Formula/b/bison.rb \ No newline at end of file diff --git a/Aliases/bjam b/Aliases/bjam index 238bf0317da20..f0bc38cdadb75 120000 --- a/Aliases/bjam +++ b/Aliases/bjam @@ -1 +1 @@ -../Formula/boost-build.rb \ No newline at end of file +../Formula/b/boost-build.rb \ No newline at end of file diff --git a/Aliases/bn b/Aliases/bn index d24b66f9c401b..12ca4ed4c84c9 120000 --- a/Aliases/bn +++ b/Aliases/bn @@ -1 +1 @@ -../Formula/libbitcoin-node.rb \ No newline at end of file +../Formula/lib/libbitcoin-node.rb \ No newline at end of file diff --git a/Aliases/boehmgc b/Aliases/boehmgc index e50e54160b816..caa042c0c97a7 120000 --- a/Aliases/boehmgc +++ b/Aliases/boehmgc @@ -1 +1 @@ -../Formula/bdw-gc.rb \ No newline at end of file +../Formula/b/bdw-gc.rb \ No newline at end of file diff --git a/Aliases/boost-jam b/Aliases/boost-jam index 238bf0317da20..f0bc38cdadb75 120000 --- a/Aliases/boost-jam +++ b/Aliases/boost-jam @@ -1 +1 @@ -../Formula/boost-build.rb \ No newline at end of file +../Formula/b/boost-build.rb \ No newline at end of file diff --git a/Aliases/boost-python@1.68 b/Aliases/boost-python@1.68 deleted file mode 120000 index 3146c5214b7d8..0000000000000 --- a/Aliases/boost-python@1.68 +++ /dev/null @@ -1 +0,0 @@ -../Formula/boost-python.rb \ No newline at end of file diff --git a/Aliases/boost@1.68 b/Aliases/boost@1.68 deleted file mode 120000 index 5a8467daa6ed4..0000000000000 --- a/Aliases/boost@1.68 +++ /dev/null @@ -1 +0,0 @@ -../Formula/boost.rb \ No newline at end of file diff --git a/Aliases/boost@1.89 b/Aliases/boost@1.89 new file mode 120000 index 0000000000000..402bbeb4503ca --- /dev/null +++ b/Aliases/boost@1.89 @@ -0,0 +1 @@ +../Formula/b/boost.rb \ No newline at end of file diff --git a/Aliases/boot2docker b/Aliases/boot2docker deleted file mode 120000 index fbd17925c6726..0000000000000 --- a/Aliases/boot2docker +++ /dev/null @@ -1 +0,0 @@ -../Formula/docker-machine.rb \ No newline at end of file diff --git a/Aliases/boot2docker-cli b/Aliases/boot2docker-cli index fbd17925c6726..476473f3d5382 120000 --- a/Aliases/boot2docker-cli +++ b/Aliases/boot2docker-cli @@ -1 +1 @@ -../Formula/docker-machine.rb \ No newline at end of file +../Formula/d/docker-machine.rb \ No newline at end of file diff --git a/Aliases/botan@3 b/Aliases/botan@3 new file mode 120000 index 0000000000000..c00dc2f72a243 --- /dev/null +++ b/Aliases/botan@3 @@ -0,0 +1 @@ +../Formula/b/botan.rb \ No newline at end of file diff --git a/Aliases/brz b/Aliases/brz new file mode 120000 index 0000000000000..1ef5f6b8e3980 --- /dev/null +++ b/Aliases/brz @@ -0,0 +1 @@ +../Formula/b/breezy.rb \ No newline at end of file diff --git a/Aliases/bs b/Aliases/bs index 833f33ef54425..a2fa1ffde9f1f 120000 --- a/Aliases/bs +++ b/Aliases/bs @@ -1 +1 @@ -../Formula/libbitcoin-server.rb \ No newline at end of file +../Formula/lib/libbitcoin-server.rb \ No newline at end of file diff --git a/Aliases/bx b/Aliases/bx index 41855d5eb1398..53df00c8253c0 120000 --- a/Aliases/bx +++ b/Aliases/bx @@ -1 +1 @@ -../Formula/libbitcoin-explorer.rb \ No newline at end of file +../Formula/lib/libbitcoin-explorer.rb \ No newline at end of file diff --git a/Aliases/bzr b/Aliases/bzr deleted file mode 120000 index a9d2abb4d8ef9..0000000000000 --- a/Aliases/bzr +++ /dev/null @@ -1 +0,0 @@ -../Formula/bazaar.rb \ No newline at end of file diff --git a/Aliases/cairomm@1.18 b/Aliases/cairomm@1.18 new file mode 120000 index 0000000000000..4b6f4641de3a7 --- /dev/null +++ b/Aliases/cairomm@1.18 @@ -0,0 +1 @@ +../Formula/c/cairomm.rb \ No newline at end of file diff --git a/Aliases/camlistore b/Aliases/camlistore deleted file mode 120000 index 4b38e196f9ccc..0000000000000 --- a/Aliases/camlistore +++ /dev/null @@ -1 +0,0 @@ -../Formula/perkeep.rb \ No newline at end of file diff --git a/Aliases/cassandra@3.11 b/Aliases/cassandra@3.11 deleted file mode 120000 index 95f25f3dc5976..0000000000000 --- a/Aliases/cassandra@3.11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/cassandra.rb \ No newline at end of file diff --git a/Aliases/cassandra@5.0 b/Aliases/cassandra@5.0 new file mode 120000 index 0000000000000..9087636f5a1d5 --- /dev/null +++ b/Aliases/cassandra@5.0 @@ -0,0 +1 @@ +../Formula/c/cassandra.rb \ No newline at end of file diff --git a/Aliases/ck b/Aliases/ck new file mode 120000 index 0000000000000..433f8f2e8dc2c --- /dev/null +++ b/Aliases/ck @@ -0,0 +1 @@ +../Formula/c/concurrencykit.rb \ No newline at end of file diff --git a/Aliases/clang-format@21 b/Aliases/clang-format@21 new file mode 120000 index 0000000000000..3df5956deb298 --- /dev/null +++ b/Aliases/clang-format@21 @@ -0,0 +1 @@ +../Formula/c/clang-format.rb \ No newline at end of file diff --git a/Aliases/clasp b/Aliases/clasp index 8f06c38ff91d3..3c902f1f4b544 120000 --- a/Aliases/clasp +++ b/Aliases/clasp @@ -1 +1 @@ -../Formula/clingo.rb \ No newline at end of file +../Formula/c/clingo.rb \ No newline at end of file diff --git a/Aliases/conan@2 b/Aliases/conan@2 new file mode 120000 index 0000000000000..dc1ebc465b71a --- /dev/null +++ b/Aliases/conan@2 @@ -0,0 +1 @@ +../Formula/c/conan.rb \ No newline at end of file diff --git a/Aliases/cowthink b/Aliases/cowthink index e3188df842830..2d2ca87ea1630 120000 --- a/Aliases/cowthink +++ b/Aliases/cowthink @@ -1 +1 @@ -../Formula/cowsay.rb \ No newline at end of file +../Formula/c/cowsay.rb \ No newline at end of file diff --git a/Aliases/cpanm b/Aliases/cpanm index 37f816c04f2d6..e51aa283b0c46 120000 --- a/Aliases/cpanm +++ b/Aliases/cpanm @@ -1 +1 @@ -../Formula/cpanminus.rb \ No newline at end of file +../Formula/c/cpanminus.rb \ No newline at end of file diff --git a/Aliases/crypto++ b/Aliases/crypto++ new file mode 120000 index 0000000000000..d0e210c164fbb --- /dev/null +++ b/Aliases/crypto++ @@ -0,0 +1 @@ +../Formula/c/cryptopp.rb \ No newline at end of file diff --git a/Aliases/crystal-lang b/Aliases/crystal-lang deleted file mode 120000 index defe3a0759abf..0000000000000 --- a/Aliases/crystal-lang +++ /dev/null @@ -1 +0,0 @@ -../Formula/crystal.rb \ No newline at end of file diff --git a/Aliases/csvfix b/Aliases/csvfix deleted file mode 120000 index bf4245e2270f7..0000000000000 --- a/Aliases/csvfix +++ /dev/null @@ -1 +0,0 @@ -../Formula/csv-fix.rb \ No newline at end of file diff --git a/Aliases/ctags-exuberant b/Aliases/ctags-exuberant index a64792a5d2914..1bd1f4531e83d 120000 --- a/Aliases/ctags-exuberant +++ b/Aliases/ctags-exuberant @@ -1 +1 @@ -../Formula/ctags.rb \ No newline at end of file +../Formula/c/ctags.rb \ No newline at end of file diff --git a/Aliases/db b/Aliases/db index 4840a66b0ea23..e07d98ec4c445 120000 --- a/Aliases/db +++ b/Aliases/db @@ -1 +1 @@ -../Formula/berkeley-db.rb \ No newline at end of file +../Formula/b/berkeley-db.rb \ No newline at end of file diff --git a/Aliases/dejagnu b/Aliases/dejagnu index bd01786ad5fd4..e1d67cea7c8dd 120000 --- a/Aliases/dejagnu +++ b/Aliases/dejagnu @@ -1 +1 @@ -../Formula/deja-gnu.rb \ No newline at end of file +../Formula/d/deja-gnu.rb \ No newline at end of file diff --git a/Aliases/delta b/Aliases/delta new file mode 120000 index 0000000000000..a2a4408c65c5d --- /dev/null +++ b/Aliases/delta @@ -0,0 +1 @@ +../Formula/g/git-delta.rb \ No newline at end of file diff --git a/Aliases/dlv b/Aliases/dlv new file mode 120000 index 0000000000000..d9d3eac347153 --- /dev/null +++ b/Aliases/dlv @@ -0,0 +1 @@ +../Formula/d/delve.rb \ No newline at end of file diff --git a/Aliases/dotnet@9 b/Aliases/dotnet@9 new file mode 120000 index 0000000000000..03c38d233fd77 --- /dev/null +++ b/Aliases/dotnet@9 @@ -0,0 +1 @@ +../Formula/d/dotnet.rb \ No newline at end of file diff --git a/Aliases/dupeseek b/Aliases/dupeseek index 746a5b60357f3..9694e10120873 120000 --- a/Aliases/dupeseek +++ b/Aliases/dupeseek @@ -1 +1 @@ -../Formula/dupseek.rb \ No newline at end of file +../Formula/d/dupseek.rb \ No newline at end of file diff --git a/Aliases/eigen@5 b/Aliases/eigen@5 new file mode 120000 index 0000000000000..bbd28f2133106 --- /dev/null +++ b/Aliases/eigen@5 @@ -0,0 +1 @@ +../Formula/e/eigen.rb \ No newline at end of file diff --git a/Aliases/elan b/Aliases/elan new file mode 120000 index 0000000000000..0093ab7e31b99 --- /dev/null +++ b/Aliases/elan @@ -0,0 +1 @@ +../Formula/e/elan-init.rb \ No newline at end of file diff --git a/Aliases/elasticsearch@6.5 b/Aliases/elasticsearch@6.5 deleted file mode 120000 index e54cdefb60c65..0000000000000 --- a/Aliases/elasticsearch@6.5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/elasticsearch.rb \ No newline at end of file diff --git a/Aliases/eris b/Aliases/eris deleted file mode 120000 index 12c1832a5a492..0000000000000 --- a/Aliases/eris +++ /dev/null @@ -1 +0,0 @@ -../Formula/monax.rb \ No newline at end of file diff --git a/Aliases/erlang@21 b/Aliases/erlang@21 deleted file mode 120000 index 14434d7c387c6..0000000000000 --- a/Aliases/erlang@21 +++ /dev/null @@ -1 +0,0 @@ -../Formula/erlang.rb \ No newline at end of file diff --git a/Aliases/erlang@28 b/Aliases/erlang@28 new file mode 120000 index 0000000000000..3d5032c1a06ae --- /dev/null +++ b/Aliases/erlang@28 @@ -0,0 +1 @@ +../Formula/e/erlang.rb \ No newline at end of file diff --git a/Aliases/faas b/Aliases/faas index 82d170a583a60..538265fee90b7 120000 --- a/Aliases/faas +++ b/Aliases/faas @@ -1 +1 @@ -../Formula/faas-cli.rb \ No newline at end of file +../Formula/f/faas-cli.rb \ No newline at end of file diff --git a/Aliases/fastcgi b/Aliases/fastcgi index f5dcf4d79d9ca..81d69432c9bb1 120000 --- a/Aliases/fastcgi +++ b/Aliases/fastcgi @@ -1 +1 @@ -../Formula/fcgi.rb \ No newline at end of file +../Formula/f/fcgi.rb \ No newline at end of file diff --git a/Aliases/ffmpeg@4 b/Aliases/ffmpeg@4 deleted file mode 120000 index d8aa51e082005..0000000000000 --- a/Aliases/ffmpeg@4 +++ /dev/null @@ -1 +0,0 @@ -../Formula/ffmpeg.rb \ No newline at end of file diff --git a/Aliases/ffmpeg@8 b/Aliases/ffmpeg@8 new file mode 120000 index 0000000000000..79a0f0e744d56 --- /dev/null +++ b/Aliases/ffmpeg@8 @@ -0,0 +1 @@ +../Formula/f/ffmpeg.rb \ No newline at end of file diff --git a/Aliases/file b/Aliases/file new file mode 120000 index 0000000000000..444fcf5b73514 --- /dev/null +++ b/Aliases/file @@ -0,0 +1 @@ +../Formula/f/file-formula.rb \ No newline at end of file diff --git a/Aliases/findbugs b/Aliases/findbugs deleted file mode 120000 index 30fe3290eeab0..0000000000000 --- a/Aliases/findbugs +++ /dev/null @@ -1 +0,0 @@ -../Formula/spotbugs.rb \ No newline at end of file diff --git a/Aliases/fishfish b/Aliases/fishfish index 6a9cd66202c15..b262be9ce48a9 120000 --- a/Aliases/fishfish +++ b/Aliases/fishfish @@ -1 +1 @@ -../Formula/fish.rb \ No newline at end of file +../Formula/f/fish.rb \ No newline at end of file diff --git a/Aliases/fltk@1.4 b/Aliases/fltk@1.4 new file mode 120000 index 0000000000000..a0fc3668da6d8 --- /dev/null +++ b/Aliases/fltk@1.4 @@ -0,0 +1 @@ +../Formula/f/fltk.rb \ No newline at end of file diff --git a/Aliases/fluidsynth b/Aliases/fluidsynth index ae98408336b8b..31d4e12cac019 120000 --- a/Aliases/fluidsynth +++ b/Aliases/fluidsynth @@ -1 +1 @@ -../Formula/fluid-synth.rb \ No newline at end of file +../Formula/f/fluid-synth.rb \ No newline at end of file diff --git a/Aliases/freetds@1.00 b/Aliases/freetds@1.00 deleted file mode 120000 index a15d35fddff2d..0000000000000 --- a/Aliases/freetds@1.00 +++ /dev/null @@ -1 +0,0 @@ -../Formula/freetds.rb \ No newline at end of file diff --git a/Aliases/freetype2 b/Aliases/freetype2 new file mode 120000 index 0000000000000..2acd6d240ec17 --- /dev/null +++ b/Aliases/freetype2 @@ -0,0 +1 @@ +../Formula/f/freetype.rb \ No newline at end of file diff --git a/Aliases/gcc@15 b/Aliases/gcc@15 new file mode 120000 index 0000000000000..fb3d3f537b00b --- /dev/null +++ b/Aliases/gcc@15 @@ -0,0 +1 @@ +../Formula/g/gcc.rb \ No newline at end of file diff --git a/Aliases/gcc@8 b/Aliases/gcc@8 deleted file mode 120000 index f4c8842b0a913..0000000000000 --- a/Aliases/gcc@8 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gcc.rb \ No newline at end of file diff --git a/Aliases/gdrive@3 b/Aliases/gdrive@3 new file mode 120000 index 0000000000000..eb5cee1b6217a --- /dev/null +++ b/Aliases/gdrive@3 @@ -0,0 +1 @@ +../Formula/g/gdrive.rb \ No newline at end of file diff --git a/Aliases/gearmand b/Aliases/gearmand index a19e3986b60ab..1613b762aba38 120000 --- a/Aliases/gearmand +++ b/Aliases/gearmand @@ -1 +1 @@ -../Formula/gearman.rb \ No newline at end of file +../Formula/g/gearman.rb \ No newline at end of file diff --git a/Aliases/gfortran b/Aliases/gfortran new file mode 120000 index 0000000000000..fb3d3f537b00b --- /dev/null +++ b/Aliases/gfortran @@ -0,0 +1 @@ +../Formula/g/gcc.rb \ No newline at end of file diff --git a/Aliases/ghc@8.4 b/Aliases/ghc@8.4 deleted file mode 120000 index d00ca34b11178..0000000000000 --- a/Aliases/ghc@8.4 +++ /dev/null @@ -1 +0,0 @@ -../Formula/ghc.rb \ No newline at end of file diff --git a/Aliases/ghc@9 b/Aliases/ghc@9 new file mode 120000 index 0000000000000..cf505c10c4f22 --- /dev/null +++ b/Aliases/ghc@9 @@ -0,0 +1 @@ +../Formula/g/ghc.rb \ No newline at end of file diff --git a/Aliases/ghc@9.12 b/Aliases/ghc@9.12 new file mode 120000 index 0000000000000..cf505c10c4f22 --- /dev/null +++ b/Aliases/ghc@9.12 @@ -0,0 +1 @@ +../Formula/g/ghc.rb \ No newline at end of file diff --git a/Aliases/git-tig b/Aliases/git-tig index c23147165761d..cea40ab62f89c 120000 --- a/Aliases/git-tig +++ b/Aliases/git-tig @@ -1 +1 @@ -../Formula/tig.rb \ No newline at end of file +../Formula/t/tig.rb \ No newline at end of file diff --git a/Aliases/gitlab-ci-multi-runner b/Aliases/gitlab-ci-multi-runner deleted file mode 120000 index 89fe56a75ece8..0000000000000 --- a/Aliases/gitlab-ci-multi-runner +++ /dev/null @@ -1 +0,0 @@ -../Formula/gitlab-runner.rb \ No newline at end of file diff --git a/Aliases/glbinding@3 b/Aliases/glbinding@3 new file mode 120000 index 0000000000000..bc610621081cf --- /dev/null +++ b/Aliases/glbinding@3 @@ -0,0 +1 @@ +../Formula/g/glbinding.rb \ No newline at end of file diff --git a/Aliases/glibc@2.35 b/Aliases/glibc@2.35 new file mode 120000 index 0000000000000..811f1584bc4ce --- /dev/null +++ b/Aliases/glibc@2.35 @@ -0,0 +1 @@ +../Formula/g/glibc.rb \ No newline at end of file diff --git a/Aliases/glibmm@2.86 b/Aliases/glibmm@2.86 new file mode 120000 index 0000000000000..9a1261d105f30 --- /dev/null +++ b/Aliases/glibmm@2.86 @@ -0,0 +1 @@ +../Formula/g/glibmm.rb \ No newline at end of file diff --git a/Aliases/gmt@5 b/Aliases/gmt@5 deleted file mode 120000 index fd26522330cfc..0000000000000 --- a/Aliases/gmt@5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gmt.rb \ No newline at end of file diff --git a/Aliases/gnome-icon-theme b/Aliases/gnome-icon-theme deleted file mode 120000 index deb470e90e81d..0000000000000 --- a/Aliases/gnome-icon-theme +++ /dev/null @@ -1 +0,0 @@ -../Formula/adwaita-icon-theme.rb \ No newline at end of file diff --git a/Aliases/gnu-scientific-library b/Aliases/gnu-scientific-library index c92f53e4c810e..0802292029091 120000 --- a/Aliases/gnu-scientific-library +++ b/Aliases/gnu-scientific-library @@ -1 +1 @@ -../Formula/gsl.rb \ No newline at end of file +../Formula/g/gsl.rb \ No newline at end of file diff --git a/Aliases/gnupg2 b/Aliases/gnupg2 deleted file mode 120000 index e3dd6256a7c82..0000000000000 --- a/Aliases/gnupg2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gnupg.rb \ No newline at end of file diff --git a/Aliases/gnupg@2.2 b/Aliases/gnupg@2.2 deleted file mode 120000 index e3dd6256a7c82..0000000000000 --- a/Aliases/gnupg@2.2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gnupg.rb \ No newline at end of file diff --git a/Aliases/gnupg@2.4 b/Aliases/gnupg@2.4 new file mode 120000 index 0000000000000..672d583bad603 --- /dev/null +++ b/Aliases/gnupg@2.4 @@ -0,0 +1 @@ +../Formula/g/gnupg.rb \ No newline at end of file diff --git a/Aliases/gnuplot@5 b/Aliases/gnuplot@5 deleted file mode 120000 index 8b3864398f33a..0000000000000 --- a/Aliases/gnuplot@5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gnuplot.rb \ No newline at end of file diff --git a/Aliases/go-feature-flag b/Aliases/go-feature-flag new file mode 120000 index 0000000000000..df04b4527d20d --- /dev/null +++ b/Aliases/go-feature-flag @@ -0,0 +1 @@ +../Formula/g/go-feature-flag-relay-proxy.rb \ No newline at end of file diff --git a/Aliases/go@1.11 b/Aliases/go@1.11 deleted file mode 120000 index 5547ea3f3f8a6..0000000000000 --- a/Aliases/go@1.11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/go.rb \ No newline at end of file diff --git a/Aliases/go@1.25 b/Aliases/go@1.25 new file mode 120000 index 0000000000000..3dda9a799d7b7 --- /dev/null +++ b/Aliases/go@1.25 @@ -0,0 +1 @@ +../Formula/g/go.rb \ No newline at end of file diff --git a/Aliases/golang b/Aliases/golang index 5547ea3f3f8a6..3dda9a799d7b7 120000 --- a/Aliases/golang +++ b/Aliases/golang @@ -1 +1 @@ -../Formula/go.rb \ No newline at end of file +../Formula/g/go.rb \ No newline at end of file diff --git a/Aliases/google-go b/Aliases/google-go index 5547ea3f3f8a6..3dda9a799d7b7 120000 --- a/Aliases/google-go +++ b/Aliases/google-go @@ -1 +1 @@ -../Formula/go.rb \ No newline at end of file +../Formula/g/go.rb \ No newline at end of file diff --git a/Aliases/gpg b/Aliases/gpg index e3dd6256a7c82..672d583bad603 120000 --- a/Aliases/gpg +++ b/Aliases/gpg @@ -1 +1 @@ -../Formula/gnupg.rb \ No newline at end of file +../Formula/g/gnupg.rb \ No newline at end of file diff --git a/Aliases/gpg1 b/Aliases/gpg1 index 3152c3f232c52..6129633b2f57a 120000 --- a/Aliases/gpg1 +++ b/Aliases/gpg1 @@ -1 +1 @@ -../Formula/gnupg@1.4.rb \ No newline at end of file +../Formula/g/gnupg@1.4.rb \ No newline at end of file diff --git a/Aliases/gpg2 b/Aliases/gpg2 index e3dd6256a7c82..672d583bad603 120000 --- a/Aliases/gpg2 +++ b/Aliases/gpg2 @@ -1 +1 @@ -../Formula/gnupg.rb \ No newline at end of file +../Formula/g/gnupg.rb \ No newline at end of file diff --git a/Aliases/gradle@5 b/Aliases/gradle@5 deleted file mode 120000 index 84fdfdcfee505..0000000000000 --- a/Aliases/gradle@5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gradle.rb \ No newline at end of file diff --git a/Aliases/gradle@9 b/Aliases/gradle@9 new file mode 120000 index 0000000000000..5fff19e6e5a51 --- /dev/null +++ b/Aliases/gradle@9 @@ -0,0 +1 @@ +../Formula/g/gradle.rb \ No newline at end of file diff --git a/Aliases/gringo b/Aliases/gringo index 8f06c38ff91d3..3c902f1f4b544 120000 --- a/Aliases/gringo +++ b/Aliases/gringo @@ -1 +1 @@ -../Formula/clingo.rb \ No newline at end of file +../Formula/c/clingo.rb \ No newline at end of file diff --git a/Aliases/grpc@1.76 b/Aliases/grpc@1.76 new file mode 120000 index 0000000000000..76feb7444debd --- /dev/null +++ b/Aliases/grpc@1.76 @@ -0,0 +1 @@ +../Formula/g/grpc.rb \ No newline at end of file diff --git a/Aliases/gs b/Aliases/gs index 2ec55ba1620f0..2c14de5b96c10 120000 --- a/Aliases/gs +++ b/Aliases/gs @@ -1 +1 @@ -../Formula/ghostscript.rb \ No newline at end of file +../Formula/g/ghostscript.rb \ No newline at end of file diff --git a/Aliases/gsed b/Aliases/gsed new file mode 120000 index 0000000000000..d7567b1a91c83 --- /dev/null +++ b/Aliases/gsed @@ -0,0 +1 @@ +../Formula/g/gnu-sed.rb \ No newline at end of file diff --git a/Aliases/gtef b/Aliases/gtef deleted file mode 120000 index dd191d34da214..0000000000000 --- a/Aliases/gtef +++ /dev/null @@ -1 +0,0 @@ -../Formula/tepl.rb \ No newline at end of file diff --git a/Aliases/gtk b/Aliases/gtk index a820d387663b3..83d957f12011a 120000 --- a/Aliases/gtk +++ b/Aliases/gtk @@ -1 +1 @@ -../Formula/gtk+.rb \ No newline at end of file +../Formula/g/gtk+.rb \ No newline at end of file diff --git a/Aliases/gtypist b/Aliases/gtypist index 0d3a3b0a54b1f..fbf5c495198f7 120000 --- a/Aliases/gtypist +++ b/Aliases/gtypist @@ -1 +1 @@ -../Formula/gnu-typist.rb \ No newline at end of file +../Formula/g/gnu-typist.rb \ No newline at end of file diff --git a/Aliases/guile@2.2 b/Aliases/guile@2.2 deleted file mode 120000 index 593d0f9c103b1..0000000000000 --- a/Aliases/guile@2.2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/guile.rb \ No newline at end of file diff --git a/Aliases/guile@3 b/Aliases/guile@3 new file mode 120000 index 0000000000000..b37c387266ac6 --- /dev/null +++ b/Aliases/guile@3 @@ -0,0 +1 @@ +../Formula/g/guile.rb \ No newline at end of file diff --git a/Aliases/haproxy@3.2 b/Aliases/haproxy@3.2 new file mode 120000 index 0000000000000..c70c2a801f359 --- /dev/null +++ b/Aliases/haproxy@3.2 @@ -0,0 +1 @@ +../Formula/h/haproxy.rb \ No newline at end of file diff --git a/Aliases/hashdeep b/Aliases/hashdeep index b3fdc7a9612e8..cb907e81ca24a 120000 --- a/Aliases/hashdeep +++ b/Aliases/hashdeep @@ -1 +1 @@ -../Formula/md5deep.rb \ No newline at end of file +../Formula/m/md5deep.rb \ No newline at end of file diff --git a/Aliases/hdf5@1.10 b/Aliases/hdf5@1.10 deleted file mode 120000 index c216ee9544a12..0000000000000 --- a/Aliases/hdf5@1.10 +++ /dev/null @@ -1 +0,0 @@ -../Formula/hdf5.rb \ No newline at end of file diff --git a/Aliases/hdf5@1.14 b/Aliases/hdf5@1.14 new file mode 120000 index 0000000000000..0c85703996961 --- /dev/null +++ b/Aliases/hdf5@1.14 @@ -0,0 +1 @@ +../Formula/h/hdf5.rb \ No newline at end of file diff --git a/Aliases/hg b/Aliases/hg index b48e610aeeb02..380cf80dd5b50 120000 --- a/Aliases/hg +++ b/Aliases/hg @@ -1 +1 @@ -../Formula/mercurial.rb \ No newline at end of file +../Formula/m/mercurial.rb \ No newline at end of file diff --git a/Aliases/htop-osx b/Aliases/htop-osx deleted file mode 120000 index b1b8be0561243..0000000000000 --- a/Aliases/htop-osx +++ /dev/null @@ -1 +0,0 @@ -../Formula/htop.rb \ No newline at end of file diff --git a/Aliases/hudson b/Aliases/hudson index 9ef7d642f9c88..b077721d2bd57 120000 --- a/Aliases/hudson +++ b/Aliases/hudson @@ -1 +1 @@ -../Formula/jenkins.rb \ No newline at end of file +../Formula/j/jenkins.rb \ No newline at end of file diff --git a/Aliases/icu4c b/Aliases/icu4c new file mode 120000 index 0000000000000..5c14001d079c0 --- /dev/null +++ b/Aliases/icu4c @@ -0,0 +1 @@ +../Formula/i/icu4c@77.rb \ No newline at end of file diff --git a/Aliases/imagemagick@7 b/Aliases/imagemagick@7 index 51995ae02376d..61f76914b091a 120000 --- a/Aliases/imagemagick@7 +++ b/Aliases/imagemagick@7 @@ -1 +1 @@ -../Formula/imagemagick.rb \ No newline at end of file +../Formula/i/imagemagick.rb \ No newline at end of file diff --git a/Aliases/influxdb@3 b/Aliases/influxdb@3 new file mode 120000 index 0000000000000..e76a478e4a968 --- /dev/null +++ b/Aliases/influxdb@3 @@ -0,0 +1 @@ +../Formula/i/influxdb.rb \ No newline at end of file diff --git a/Aliases/ipsum b/Aliases/ipsum index e62264862e5c7..3ff05a290d17f 120000 --- a/Aliases/ipsum +++ b/Aliases/ipsum @@ -1 +1 @@ -../Formula/lorem.rb \ No newline at end of file +../Formula/l/lorem.rb \ No newline at end of file diff --git a/Aliases/ipython@7 b/Aliases/ipython@7 deleted file mode 120000 index e189368a3d08a..0000000000000 --- a/Aliases/ipython@7 +++ /dev/null @@ -1 +0,0 @@ -../Formula/ipython.rb \ No newline at end of file diff --git a/Aliases/isl@0.27 b/Aliases/isl@0.27 new file mode 120000 index 0000000000000..e1c05555ab2ff --- /dev/null +++ b/Aliases/isl@0.27 @@ -0,0 +1 @@ +../Formula/i/isl.rb \ No newline at end of file diff --git a/Aliases/iwyu b/Aliases/iwyu new file mode 120000 index 0000000000000..722b08365db6b --- /dev/null +++ b/Aliases/iwyu @@ -0,0 +1 @@ +../Formula/i/include-what-you-use.rb \ No newline at end of file diff --git a/Aliases/java b/Aliases/java new file mode 120000 index 0000000000000..25d05e0c38ade --- /dev/null +++ b/Aliases/java @@ -0,0 +1 @@ +../Formula/o/openjdk.rb \ No newline at end of file diff --git a/Aliases/java11 b/Aliases/java11 new file mode 120000 index 0000000000000..497169f869379 --- /dev/null +++ b/Aliases/java11 @@ -0,0 +1 @@ +../Formula/o/openjdk@11.rb \ No newline at end of file diff --git a/Aliases/jocr b/Aliases/jocr index 4956596fde92c..182cbf11de850 120000 --- a/Aliases/jocr +++ b/Aliases/jocr @@ -1 +1 @@ -../Formula/gocr.rb \ No newline at end of file +../Formula/g/gocr.rb \ No newline at end of file diff --git a/Aliases/jujutsu b/Aliases/jujutsu new file mode 120000 index 0000000000000..85abf8e2ca9d6 --- /dev/null +++ b/Aliases/jujutsu @@ -0,0 +1 @@ +../Formula/j/jj.rb \ No newline at end of file diff --git a/Aliases/kibana@6.5 b/Aliases/kibana@6.5 deleted file mode 120000 index 8d9eaa880c8cd..0000000000000 --- a/Aliases/kibana@6.5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/kibana.rb \ No newline at end of file diff --git a/Aliases/kk b/Aliases/kk new file mode 120000 index 0000000000000..873faceab80b1 --- /dev/null +++ b/Aliases/kk @@ -0,0 +1 @@ +../Formula/k/kubekey.rb \ No newline at end of file diff --git a/Aliases/kubectl b/Aliases/kubectl index 4da67cb81d5d6..0df591bc589c6 120000 --- a/Aliases/kubectl +++ b/Aliases/kubectl @@ -1 +1 @@ -../Formula/kubernetes-cli.rb \ No newline at end of file +../Formula/k/kubernetes-cli.rb \ No newline at end of file diff --git a/Aliases/kubernetes-cli@1.34 b/Aliases/kubernetes-cli@1.34 new file mode 120000 index 0000000000000..0df591bc589c6 --- /dev/null +++ b/Aliases/kubernetes-cli@1.34 @@ -0,0 +1 @@ +../Formula/k/kubernetes-cli.rb \ No newline at end of file diff --git a/Aliases/kubo b/Aliases/kubo new file mode 120000 index 0000000000000..c3c6e71781191 --- /dev/null +++ b/Aliases/kubo @@ -0,0 +1 @@ +../Formula/i/ipfs.rb \ No newline at end of file diff --git a/Aliases/latexila b/Aliases/latexila deleted file mode 120000 index e996f5156ba91..0000000000000 --- a/Aliases/latexila +++ /dev/null @@ -1 +0,0 @@ -../Formula/gnome-latex.rb \ No newline at end of file diff --git a/Aliases/lcms b/Aliases/lcms deleted file mode 120000 index d19e7aea3274f..0000000000000 --- a/Aliases/lcms +++ /dev/null @@ -1 +0,0 @@ -../Formula/little-cms.rb \ No newline at end of file diff --git a/Aliases/lcms2 b/Aliases/lcms2 index e32a712571af9..9b35de42ceb36 120000 --- a/Aliases/lcms2 +++ b/Aliases/lcms2 @@ -1 +1 @@ -../Formula/little-cms2.rb \ No newline at end of file +../Formula/l/little-cms2.rb \ No newline at end of file diff --git a/Aliases/leg b/Aliases/leg index ca28a58b091f1..2c7d4a88b59cd 120000 --- a/Aliases/leg +++ b/Aliases/leg @@ -1 +1 @@ -../Formula/peg.rb \ No newline at end of file +../Formula/p/peg.rb \ No newline at end of file diff --git a/Aliases/letsencrypt b/Aliases/letsencrypt deleted file mode 120000 index f88cfa4b7b460..0000000000000 --- a/Aliases/letsencrypt +++ /dev/null @@ -1 +0,0 @@ -../Formula/certbot.rb \ No newline at end of file diff --git a/Aliases/libassuan@3 b/Aliases/libassuan@3 new file mode 120000 index 0000000000000..6dafe1666d814 --- /dev/null +++ b/Aliases/libassuan@3 @@ -0,0 +1 @@ +../Formula/lib/libassuan.rb \ No newline at end of file diff --git a/Aliases/libcouchbase@3 b/Aliases/libcouchbase@3 new file mode 120000 index 0000000000000..b06ab3f95d583 --- /dev/null +++ b/Aliases/libcouchbase@3 @@ -0,0 +1 @@ +../Formula/lib/libcouchbase.rb \ No newline at end of file diff --git a/Aliases/libcryptopp b/Aliases/libcryptopp deleted file mode 120000 index b0b8a1753b62f..0000000000000 --- a/Aliases/libcryptopp +++ /dev/null @@ -1 +0,0 @@ -../Formula/cryptopp.rb \ No newline at end of file diff --git a/Aliases/libdwarf b/Aliases/libdwarf new file mode 120000 index 0000000000000..c4368390f631f --- /dev/null +++ b/Aliases/libdwarf @@ -0,0 +1 @@ +../Formula/d/dwarfutils.rb \ No newline at end of file diff --git a/Aliases/libfuse@3 b/Aliases/libfuse@3 new file mode 120000 index 0000000000000..487eb6781e85d --- /dev/null +++ b/Aliases/libfuse@3 @@ -0,0 +1 @@ +../Formula/lib/libfuse.rb \ No newline at end of file diff --git a/Aliases/libgc b/Aliases/libgc index e50e54160b816..caa042c0c97a7 120000 --- a/Aliases/libgc +++ b/Aliases/libgc @@ -1 +1 @@ -../Formula/bdw-gc.rb \ No newline at end of file +../Formula/b/bdw-gc.rb \ No newline at end of file diff --git a/Aliases/libgd b/Aliases/libgd index d2b94bd646678..728cacdc719e0 120000 --- a/Aliases/libgd +++ b/Aliases/libgd @@ -1 +1 @@ -../Formula/gd.rb \ No newline at end of file +../Formula/g/gd.rb \ No newline at end of file diff --git a/Aliases/libgeoip b/Aliases/libgeoip index 33688b31d7d31..522380ad94ee4 120000 --- a/Aliases/libgeoip +++ b/Aliases/libgeoip @@ -1 +1 @@ -../Formula/geoip.rb \ No newline at end of file +../Formula/g/geoip.rb \ No newline at end of file diff --git a/Aliases/libgit2@1.9 b/Aliases/libgit2@1.9 new file mode 120000 index 0000000000000..bfb0eb01b76df --- /dev/null +++ b/Aliases/libgit2@1.9 @@ -0,0 +1 @@ +../Formula/lib/libgit2.rb \ No newline at end of file diff --git a/Aliases/libglu b/Aliases/libglu new file mode 120000 index 0000000000000..e4504224c0f36 --- /dev/null +++ b/Aliases/libglu @@ -0,0 +1 @@ +../Formula/m/mesa-glu.rb \ No newline at end of file diff --git a/Aliases/libgme b/Aliases/libgme index 29eea7e17116c..bb375ae51a717 120000 --- a/Aliases/libgme +++ b/Aliases/libgme @@ -1 +1 @@ -../Formula/game-music-emu.rb \ No newline at end of file +../Formula/g/game-music-emu.rb \ No newline at end of file diff --git a/Aliases/libjpeg b/Aliases/libjpeg index fcd2d7f7b2405..1b95a09b88a83 120000 --- a/Aliases/libjpeg +++ b/Aliases/libjpeg @@ -1 +1 @@ -../Formula/jpeg.rb \ No newline at end of file +../Formula/j/jpeg.rb \ No newline at end of file diff --git a/Aliases/libjpeg-turbo b/Aliases/libjpeg-turbo index 0a6edb5bbdb7b..571c6d1d405e1 120000 --- a/Aliases/libjpeg-turbo +++ b/Aliases/libjpeg-turbo @@ -1 +1 @@ -../Formula/jpeg-turbo.rb \ No newline at end of file +../Formula/j/jpeg-turbo.rb \ No newline at end of file diff --git a/Aliases/libjpg b/Aliases/libjpg index fcd2d7f7b2405..1b95a09b88a83 120000 --- a/Aliases/libjpg +++ b/Aliases/libjpg @@ -1 +1 @@ -../Formula/jpeg.rb \ No newline at end of file +../Formula/j/jpeg.rb \ No newline at end of file diff --git a/Aliases/liblabjackusb b/Aliases/liblabjackusb index 388313b6dfd6b..2577a32548bdc 120000 --- a/Aliases/liblabjackusb +++ b/Aliases/liblabjackusb @@ -1 +1 @@ -../Formula/exodriver.rb \ No newline at end of file +../Formula/e/exodriver.rb \ No newline at end of file diff --git a/Aliases/libmad b/Aliases/libmad index f7d2a3fadbcfe..df2e8c7bb29ea 120000 --- a/Aliases/libmad +++ b/Aliases/libmad @@ -1 +1 @@ -../Formula/mad.rb \ No newline at end of file +../Formula/m/mad.rb \ No newline at end of file diff --git a/Aliases/libmcrypt b/Aliases/libmcrypt deleted file mode 120000 index 491a7d4bc034c..0000000000000 --- a/Aliases/libmcrypt +++ /dev/null @@ -1 +0,0 @@ -../Formula/mcrypt.rb \ No newline at end of file diff --git a/Aliases/libmongoc b/Aliases/libmongoc index 2e7895f879580..8354a6798cf01 120000 --- a/Aliases/libmongoc +++ b/Aliases/libmongoc @@ -1 +1 @@ -../Formula/mongo-c-driver.rb \ No newline at end of file +../Formula/m/mongo-c-driver.rb \ No newline at end of file diff --git a/Aliases/libmongoclient b/Aliases/libmongoclient deleted file mode 120000 index 8aa39420c2097..0000000000000 --- a/Aliases/libmongoclient +++ /dev/null @@ -1 +0,0 @@ -../Formula/mongo-cxx-driver.rb \ No newline at end of file diff --git a/Aliases/libmpdec b/Aliases/libmpdec new file mode 120000 index 0000000000000..cfca4d57c5da1 --- /dev/null +++ b/Aliases/libmpdec @@ -0,0 +1 @@ +../Formula/m/mpdecimal.rb \ No newline at end of file diff --git a/Aliases/libnettle b/Aliases/libnettle index 9bd9afac6fa88..188a39c5f87d9 120000 --- a/Aliases/libnettle +++ b/Aliases/libnettle @@ -1 +1 @@ -../Formula/nettle.rb \ No newline at end of file +../Formula/n/nettle.rb \ No newline at end of file diff --git a/Aliases/liboggz b/Aliases/liboggz index 78dbdd253d7eb..8d4dd45c9f624 120000 --- a/Aliases/liboggz +++ b/Aliases/liboggz @@ -1 +1 @@ -../Formula/oggz.rb \ No newline at end of file +../Formula/o/oggz.rb \ No newline at end of file diff --git a/Aliases/libpeas@2 b/Aliases/libpeas@2 new file mode 120000 index 0000000000000..be2257ef067a4 --- /dev/null +++ b/Aliases/libpeas@2 @@ -0,0 +1 @@ +../Formula/lib/libpeas.rb \ No newline at end of file diff --git a/Aliases/libpq@18 b/Aliases/libpq@18 new file mode 120000 index 0000000000000..40331ae4aa329 --- /dev/null +++ b/Aliases/libpq@18 @@ -0,0 +1 @@ +../Formula/lib/libpq.rb \ No newline at end of file diff --git a/Aliases/libqrencode b/Aliases/libqrencode index b64f35e9fffb9..38f37211d52d3 120000 --- a/Aliases/libqrencode +++ b/Aliases/libqrencode @@ -1 +1 @@ -../Formula/qrencode.rb \ No newline at end of file +../Formula/q/qrencode.rb \ No newline at end of file diff --git a/Aliases/libsigc++@3 b/Aliases/libsigc++@3 new file mode 120000 index 0000000000000..bb34e9a4483b3 --- /dev/null +++ b/Aliases/libsigc++@3 @@ -0,0 +1 @@ +../Formula/lib/libsigc++.rb \ No newline at end of file diff --git a/Aliases/libsoup@3 b/Aliases/libsoup@3 new file mode 120000 index 0000000000000..6bbc451ee6992 --- /dev/null +++ b/Aliases/libsoup@3 @@ -0,0 +1 @@ +../Formula/lib/libsoup.rb \ No newline at end of file diff --git a/Aliases/libspelling@0.4 b/Aliases/libspelling@0.4 new file mode 120000 index 0000000000000..9444fdbb430a5 --- /dev/null +++ b/Aliases/libspelling@0.4 @@ -0,0 +1 @@ +../Formula/lib/libspelling.rb \ No newline at end of file diff --git a/Aliases/libtag b/Aliases/libtag index 63592f0c08191..3e6d675d28ef6 120000 --- a/Aliases/libtag +++ b/Aliases/libtag @@ -1 +1 @@ -../Formula/taglib.rb \ No newline at end of file +../Formula/t/taglib.rb \ No newline at end of file diff --git a/Aliases/libtasn b/Aliases/libtasn index e182aa4ddbabe..8e387f7489773 120000 --- a/Aliases/libtasn +++ b/Aliases/libtasn @@ -1 +1 @@ -../Formula/libtasn1.rb \ No newline at end of file +../Formula/lib/libtasn1.rb \ No newline at end of file diff --git a/Aliases/libtcnative b/Aliases/libtcnative index 0bf6a0aab852c..89296ca64ebb4 120000 --- a/Aliases/libtcnative +++ b/Aliases/libtcnative @@ -1 +1 @@ -../Formula/tomcat-native.rb \ No newline at end of file +../Formula/t/tomcat-native.rb \ No newline at end of file diff --git a/Aliases/libtree-sitter b/Aliases/libtree-sitter new file mode 120000 index 0000000000000..d7952881c2ad8 --- /dev/null +++ b/Aliases/libtree-sitter @@ -0,0 +1 @@ +../Formula/t/tree-sitter.rb \ No newline at end of file diff --git a/Aliases/libvips b/Aliases/libvips new file mode 120000 index 0000000000000..5b403ec37a4ae --- /dev/null +++ b/Aliases/libvips @@ -0,0 +1 @@ +../Formula/v/vips.rb \ No newline at end of file diff --git a/Aliases/libxml++@2 b/Aliases/libxml++@2 new file mode 120000 index 0000000000000..7dd8b65d0a26e --- /dev/null +++ b/Aliases/libxml++@2 @@ -0,0 +1 @@ +../Formula/lib/libxml++.rb \ No newline at end of file diff --git a/Aliases/lightningd b/Aliases/lightningd new file mode 120000 index 0000000000000..71f7b310dcbd3 --- /dev/null +++ b/Aliases/lightningd @@ -0,0 +1 @@ +../Formula/c/core-lightning.rb \ No newline at end of file diff --git a/Aliases/linux-headers b/Aliases/linux-headers new file mode 120000 index 0000000000000..684e202c293f3 --- /dev/null +++ b/Aliases/linux-headers @@ -0,0 +1 @@ +../Formula/l/linux-headers@5.15.rb \ No newline at end of file diff --git a/Aliases/littlecms b/Aliases/littlecms deleted file mode 120000 index d19e7aea3274f..0000000000000 --- a/Aliases/littlecms +++ /dev/null @@ -1 +0,0 @@ -../Formula/little-cms.rb \ No newline at end of file diff --git a/Aliases/lld@21 b/Aliases/lld@21 new file mode 120000 index 0000000000000..789ca30241210 --- /dev/null +++ b/Aliases/lld@21 @@ -0,0 +1 @@ +../Formula/l/lld.rb \ No newline at end of file diff --git a/Aliases/llvm@21 b/Aliases/llvm@21 new file mode 120000 index 0000000000000..5251b0d981566 --- /dev/null +++ b/Aliases/llvm@21 @@ -0,0 +1 @@ +../Formula/l/llvm.rb \ No newline at end of file diff --git a/Aliases/llvm@7 b/Aliases/llvm@7 deleted file mode 120000 index 08e217ab6049a..0000000000000 --- a/Aliases/llvm@7 +++ /dev/null @@ -1 +0,0 @@ -../Formula/llvm.rb \ No newline at end of file diff --git a/Aliases/lua@5.3 b/Aliases/lua@5.3 deleted file mode 120000 index 9a467229afa70..0000000000000 --- a/Aliases/lua@5.3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/lua.rb \ No newline at end of file diff --git a/Aliases/lua@5.4 b/Aliases/lua@5.4 new file mode 120000 index 0000000000000..ec9d105bd5b92 --- /dev/null +++ b/Aliases/lua@5.4 @@ -0,0 +1 @@ +../Formula/l/lua.rb \ No newline at end of file diff --git a/Aliases/lukemftp b/Aliases/lukemftp index a764d2f0f4c92..553d17d531a18 120000 --- a/Aliases/lukemftp +++ b/Aliases/lukemftp @@ -1 +1 @@ -../Formula/tnftp.rb \ No newline at end of file +../Formula/t/tnftp.rb \ No newline at end of file diff --git a/Aliases/lukemftpd b/Aliases/lukemftpd index e53081ead7212..82f831f749318 120000 --- a/Aliases/lukemftpd +++ b/Aliases/lukemftpd @@ -1 +1 @@ -../Formula/tnftpd.rb \ No newline at end of file +../Formula/t/tnftpd.rb \ No newline at end of file diff --git a/Aliases/mariadb@10.3 b/Aliases/mariadb@10.3 deleted file mode 120000 index e4a1665ba58c4..0000000000000 --- a/Aliases/mariadb@10.3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/mariadb.rb \ No newline at end of file diff --git a/Aliases/mariadb@12.0 b/Aliases/mariadb@12.0 new file mode 120000 index 0000000000000..286d10f60dc80 --- /dev/null +++ b/Aliases/mariadb@12.0 @@ -0,0 +1 @@ +../Formula/m/mariadb.rb \ No newline at end of file diff --git a/Aliases/mat b/Aliases/mat deleted file mode 120000 index c0bdda6c98f2d..0000000000000 --- a/Aliases/mat +++ /dev/null @@ -1 +0,0 @@ -../Formula/mat2.rb \ No newline at end of file diff --git a/Aliases/mathcomp b/Aliases/mathcomp index 51eb61d337c4c..12cca156fa622 120000 --- a/Aliases/mathcomp +++ b/Aliases/mathcomp @@ -1 +1 @@ -../Formula/math-comp.rb \ No newline at end of file +../Formula/m/math-comp.rb \ No newline at end of file diff --git a/Aliases/maven@3.6 b/Aliases/maven@3.6 deleted file mode 120000 index b1147d4de309f..0000000000000 --- a/Aliases/maven@3.6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/maven.rb \ No newline at end of file diff --git a/Aliases/mbedtls@3 b/Aliases/mbedtls@3 new file mode 120000 index 0000000000000..a4b703fd66de5 --- /dev/null +++ b/Aliases/mbedtls@3 @@ -0,0 +1 @@ +../Formula/m/mbedtls.rb \ No newline at end of file diff --git a/Aliases/mc b/Aliases/mc index bcf0c8a860083..b394720fb69b7 120000 --- a/Aliases/mc +++ b/Aliases/mc @@ -1 +1 @@ -../Formula/midnight-commander.rb \ No newline at end of file +../Formula/m/midnight-commander.rb \ No newline at end of file diff --git a/Aliases/mdocml b/Aliases/mdocml index f9b7c26144ee3..776d749c1379c 120000 --- a/Aliases/mdocml +++ b/Aliases/mdocml @@ -1 +1 @@ -../Formula/mandoc.rb \ No newline at end of file +../Formula/m/mandoc.rb \ No newline at end of file diff --git a/Aliases/mediainfo b/Aliases/mediainfo index 4a87df71642d1..eaa92668083d4 120000 --- a/Aliases/mediainfo +++ b/Aliases/mediainfo @@ -1 +1 @@ -../Formula/media-info.rb \ No newline at end of file +../Formula/m/media-info.rb \ No newline at end of file diff --git a/Aliases/mobile-shell b/Aliases/mobile-shell deleted file mode 120000 index 2e2a9dec9e595..0000000000000 --- a/Aliases/mobile-shell +++ /dev/null @@ -1 +0,0 @@ -../Formula/mosh.rb \ No newline at end of file diff --git a/Aliases/mongo b/Aliases/mongo deleted file mode 120000 index 82e0e47c41f71..0000000000000 --- a/Aliases/mongo +++ /dev/null @@ -1 +0,0 @@ -../Formula/mongodb.rb \ No newline at end of file diff --git a/Aliases/mongo-c b/Aliases/mongo-c deleted file mode 120000 index 2e7895f879580..0000000000000 --- a/Aliases/mongo-c +++ /dev/null @@ -1 +0,0 @@ -../Formula/mongo-c-driver.rb \ No newline at end of file diff --git a/Aliases/mongo-c-driver@2 b/Aliases/mongo-c-driver@2 new file mode 120000 index 0000000000000..8354a6798cf01 --- /dev/null +++ b/Aliases/mongo-c-driver@2 @@ -0,0 +1 @@ +../Formula/m/mongo-c-driver.rb \ No newline at end of file diff --git a/Aliases/mongodb-atlas b/Aliases/mongodb-atlas new file mode 120000 index 0000000000000..f0efb0e63abc6 --- /dev/null +++ b/Aliases/mongodb-atlas @@ -0,0 +1 @@ +../Formula/m/mongodb-atlas-cli.rb \ No newline at end of file diff --git a/Aliases/mongodb@4.0 b/Aliases/mongodb@4.0 deleted file mode 120000 index 82e0e47c41f71..0000000000000 --- a/Aliases/mongodb@4.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/mongodb.rb \ No newline at end of file diff --git a/Aliases/mp4box b/Aliases/mp4box index 4f0ac84c16efa..11151d0922329 120000 --- a/Aliases/mp4box +++ b/Aliases/mp4box @@ -1 +1 @@ -../Formula/gpac.rb \ No newline at end of file +../Formula/g/gpac.rb \ No newline at end of file diff --git a/Aliases/msgpack-c b/Aliases/msgpack-c new file mode 120000 index 0000000000000..9acd31c2eea6d --- /dev/null +++ b/Aliases/msgpack-c @@ -0,0 +1 @@ +../Formula/m/msgpack.rb \ No newline at end of file diff --git a/Aliases/msgpack-cpp b/Aliases/msgpack-cpp new file mode 120000 index 0000000000000..35e51273eba4d --- /dev/null +++ b/Aliases/msgpack-cpp @@ -0,0 +1 @@ +../Formula/m/msgpack-cxx.rb \ No newline at end of file diff --git a/Aliases/mvn b/Aliases/mvn new file mode 120000 index 0000000000000..f75f1d570cf09 --- /dev/null +++ b/Aliases/mvn @@ -0,0 +1 @@ +../Formula/m/maven.rb \ No newline at end of file diff --git a/Aliases/myrepos b/Aliases/myrepos index c2402cb650841..e16ba8eba589f 120000 --- a/Aliases/myrepos +++ b/Aliases/myrepos @@ -1 +1 @@ -../Formula/mr.rb \ No newline at end of file +../Formula/m/mr.rb \ No newline at end of file diff --git a/Aliases/mysql-client@9.5 b/Aliases/mysql-client@9.5 new file mode 120000 index 0000000000000..0486f754ef8c7 --- /dev/null +++ b/Aliases/mysql-client@9.5 @@ -0,0 +1 @@ +../Formula/m/mysql-client.rb \ No newline at end of file diff --git a/Aliases/mysql@8.0 b/Aliases/mysql@8.0 deleted file mode 120000 index 21b0360374b01..0000000000000 --- a/Aliases/mysql@8.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/mysql.rb \ No newline at end of file diff --git a/Aliases/mysql@9.5 b/Aliases/mysql@9.5 new file mode 120000 index 0000000000000..4f2ad1d91f9ae --- /dev/null +++ b/Aliases/mysql@9.5 @@ -0,0 +1 @@ +../Formula/m/mysql.rb \ No newline at end of file diff --git a/Aliases/newsbeuter b/Aliases/newsbeuter deleted file mode 120000 index e8dfb48618e67..0000000000000 --- a/Aliases/newsbeuter +++ /dev/null @@ -1 +0,0 @@ -../Formula/newsboat.rb \ No newline at end of file diff --git a/Aliases/node.js b/Aliases/node.js index 3acecf25b5c15..0b6ed0e182659 120000 --- a/Aliases/node.js +++ b/Aliases/node.js @@ -1 +1 @@ -../Formula/node.rb \ No newline at end of file +../Formula/n/node.rb \ No newline at end of file diff --git a/Aliases/node@11 b/Aliases/node@11 deleted file mode 120000 index 3acecf25b5c15..0000000000000 --- a/Aliases/node@11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/node.rb \ No newline at end of file diff --git a/Aliases/node@25 b/Aliases/node@25 new file mode 120000 index 0000000000000..0b6ed0e182659 --- /dev/null +++ b/Aliases/node@25 @@ -0,0 +1 @@ +../Formula/n/node.rb \ No newline at end of file diff --git a/Aliases/nodejs b/Aliases/nodejs index 3acecf25b5c15..0b6ed0e182659 120000 --- a/Aliases/nodejs +++ b/Aliases/nodejs @@ -1 +1 @@ -../Formula/node.rb \ No newline at end of file +../Formula/n/node.rb \ No newline at end of file diff --git a/Aliases/npm b/Aliases/npm index 3acecf25b5c15..0b6ed0e182659 120000 --- a/Aliases/npm +++ b/Aliases/npm @@ -1 +1 @@ -../Formula/node.rb \ No newline at end of file +../Formula/n/node.rb \ No newline at end of file diff --git a/Aliases/nsis b/Aliases/nsis index 586146862d74d..9b55b3f890e0b 120000 --- a/Aliases/nsis +++ b/Aliases/nsis @@ -1 +1 @@ -../Formula/makensis.rb \ No newline at end of file +../Formula/m/makensis.rb \ No newline at end of file diff --git a/Aliases/nvim b/Aliases/nvim index 60922f19a2cb9..5ee4ed1bf6126 120000 --- a/Aliases/nvim +++ b/Aliases/nvim @@ -1 +1 @@ -../Formula/neovim.rb \ No newline at end of file +../Formula/n/neovim.rb \ No newline at end of file diff --git a/Aliases/nvr b/Aliases/nvr new file mode 120000 index 0000000000000..d180b4c39df8b --- /dev/null +++ b/Aliases/nvr @@ -0,0 +1 @@ +../Formula/n/neovim-remote.rb \ No newline at end of file diff --git a/Aliases/o-caml b/Aliases/o-caml index 0dbaf93b6dd30..0f2149f5082cf 120000 --- a/Aliases/o-caml +++ b/Aliases/o-caml @@ -1 +1 @@ -../Formula/ocaml.rb \ No newline at end of file +../Formula/o/ocaml.rb \ No newline at end of file diff --git a/Aliases/o-make b/Aliases/o-make new file mode 120000 index 0000000000000..37d1681c7393f --- /dev/null +++ b/Aliases/o-make @@ -0,0 +1 @@ +../Formula/o/omake.rb \ No newline at end of file diff --git a/Aliases/observer_ward b/Aliases/observer_ward new file mode 120000 index 0000000000000..139a99ff4434f --- /dev/null +++ b/Aliases/observer_ward @@ -0,0 +1 @@ +../Formula/o/observerward.rb \ No newline at end of file diff --git a/Aliases/ocaml@5 b/Aliases/ocaml@5 new file mode 120000 index 0000000000000..0f2149f5082cf --- /dev/null +++ b/Aliases/ocaml@5 @@ -0,0 +1 @@ +../Formula/o/ocaml.rb \ No newline at end of file diff --git a/Aliases/ocio b/Aliases/ocio index 6f690128ae996..a7dbe116b2635 120000 --- a/Aliases/ocio +++ b/Aliases/ocio @@ -1 +1 @@ -../Formula/opencolorio.rb \ No newline at end of file +../Formula/o/opencolorio.rb \ No newline at end of file diff --git a/Aliases/onetbb b/Aliases/onetbb new file mode 120000 index 0000000000000..9d55b387ad4d6 --- /dev/null +++ b/Aliases/onetbb @@ -0,0 +1 @@ +../Formula/t/tbb.rb \ No newline at end of file diff --git a/Aliases/opencv@4 b/Aliases/opencv@4 index faca80a20de56..c511644ebc059 120000 --- a/Aliases/opencv@4 +++ b/Aliases/opencv@4 @@ -1 +1 @@ -../Formula/opencv.rb \ No newline at end of file +../Formula/o/opencv.rb \ No newline at end of file diff --git a/Aliases/openexr@3 b/Aliases/openexr@3 new file mode 120000 index 0000000000000..3a2e6df13e3b6 --- /dev/null +++ b/Aliases/openexr@3 @@ -0,0 +1 @@ +../Formula/o/openexr.rb \ No newline at end of file diff --git a/Aliases/openjdk@25 b/Aliases/openjdk@25 new file mode 120000 index 0000000000000..25d05e0c38ade --- /dev/null +++ b/Aliases/openjdk@25 @@ -0,0 +1 @@ +../Formula/o/openjdk.rb \ No newline at end of file diff --git a/Aliases/openmpi b/Aliases/openmpi index 71bca84cec2e2..b9bbb0bbce6d9 120000 --- a/Aliases/openmpi +++ b/Aliases/openmpi @@ -1 +1 @@ -../Formula/open-mpi.rb \ No newline at end of file +../Formula/o/open-mpi.rb \ No newline at end of file diff --git a/Aliases/openocd b/Aliases/openocd index 026dea1efe29e..fcb655497b641 120000 --- a/Aliases/openocd +++ b/Aliases/openocd @@ -1 +1 @@ -../Formula/open-ocd.rb \ No newline at end of file +../Formula/o/open-ocd.rb \ No newline at end of file diff --git a/Aliases/openscenegraph b/Aliases/openscenegraph index 71c4db1c5536d..c43304327d180 120000 --- a/Aliases/openscenegraph +++ b/Aliases/openscenegraph @@ -1 +1 @@ -../Formula/open-scene-graph.rb \ No newline at end of file +../Formula/o/open-scene-graph.rb \ No newline at end of file diff --git a/Aliases/openssl b/Aliases/openssl new file mode 120000 index 0000000000000..96ca3b908887d --- /dev/null +++ b/Aliases/openssl @@ -0,0 +1 @@ +../Formula/o/openssl@3.rb \ No newline at end of file diff --git a/Aliases/openssl@1.0 b/Aliases/openssl@1.0 deleted file mode 120000 index d46bd7148cf34..0000000000000 --- a/Aliases/openssl@1.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/openssl.rb \ No newline at end of file diff --git a/Aliases/openssl@3.6 b/Aliases/openssl@3.6 new file mode 120000 index 0000000000000..96ca3b908887d --- /dev/null +++ b/Aliases/openssl@3.6 @@ -0,0 +1 @@ +../Formula/o/openssl@3.rb \ No newline at end of file diff --git a/Aliases/osh b/Aliases/osh deleted file mode 120000 index 2954cb033060b..0000000000000 --- a/Aliases/osh +++ /dev/null @@ -1 +0,0 @@ -../Formula/etsh.rb \ No newline at end of file diff --git a/Aliases/pangomm@2.56 b/Aliases/pangomm@2.56 new file mode 120000 index 0000000000000..c64be8e387c05 --- /dev/null +++ b/Aliases/pangomm@2.56 @@ -0,0 +1 @@ +../Formula/p/pangomm.rb \ No newline at end of file diff --git a/Aliases/pcre1 b/Aliases/pcre1 index 21a6fa78b45ec..06c357a4390f2 120000 --- a/Aliases/pcre1 +++ b/Aliases/pcre1 @@ -1 +1 @@ -../Formula/pcre.rb \ No newline at end of file +../Formula/p/pcre.rb \ No newline at end of file diff --git a/Aliases/percona-server@5.7 b/Aliases/percona-server@5.7 deleted file mode 120000 index 00b678d36f3fd..0000000000000 --- a/Aliases/percona-server@5.7 +++ /dev/null @@ -1 +0,0 @@ -../Formula/percona-server.rb \ No newline at end of file diff --git a/Aliases/percona-server@8.4 b/Aliases/percona-server@8.4 new file mode 120000 index 0000000000000..59c3aef615bcd --- /dev/null +++ b/Aliases/percona-server@8.4 @@ -0,0 +1 @@ +../Formula/p/percona-server.rb \ No newline at end of file diff --git a/Aliases/percona-xtrabackup@8.4 b/Aliases/percona-xtrabackup@8.4 new file mode 120000 index 0000000000000..d685a73201e47 --- /dev/null +++ b/Aliases/percona-xtrabackup@8.4 @@ -0,0 +1 @@ +../Formula/p/percona-xtrabackup.rb \ No newline at end of file diff --git a/Aliases/perl6 b/Aliases/perl6 index 5feac3923aff3..f0b8cb7291539 120000 --- a/Aliases/perl6 +++ b/Aliases/perl6 @@ -1 +1 @@ -../Formula/rakudo-star.rb \ No newline at end of file +../Formula/r/rakudo-star.rb \ No newline at end of file diff --git a/Aliases/perl@5.28 b/Aliases/perl@5.28 deleted file mode 120000 index fc0ae6a3542eb..0000000000000 --- a/Aliases/perl@5.28 +++ /dev/null @@ -1 +0,0 @@ -../Formula/perl.rb \ No newline at end of file diff --git a/Aliases/perl@5.40 b/Aliases/perl@5.40 new file mode 120000 index 0000000000000..b9d2dfc667068 --- /dev/null +++ b/Aliases/perl@5.40 @@ -0,0 +1 @@ +../Formula/p/perl.rb \ No newline at end of file diff --git a/Aliases/pgrep b/Aliases/pgrep index e4f03a25ccebf..860a68942ae7d 120000 --- a/Aliases/pgrep +++ b/Aliases/pgrep @@ -1 +1 @@ -../Formula/proctools.rb \ No newline at end of file +../Formula/p/proctools.rb \ No newline at end of file diff --git a/Aliases/php@7.3 b/Aliases/php@7.3 deleted file mode 120000 index 5ec1a2cc804ef..0000000000000 --- a/Aliases/php@7.3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/php.rb \ No newline at end of file diff --git a/Aliases/php@8.4 b/Aliases/php@8.4 new file mode 120000 index 0000000000000..f070f85cd0bbe --- /dev/null +++ b/Aliases/php@8.4 @@ -0,0 +1 @@ +../Formula/p/php.rb \ No newline at end of file diff --git a/Aliases/phrase b/Aliases/phrase new file mode 120000 index 0000000000000..9e97d01647e69 --- /dev/null +++ b/Aliases/phrase @@ -0,0 +1 @@ +../Formula/p/phrase-cli.rb \ No newline at end of file diff --git a/Aliases/phylum b/Aliases/phylum new file mode 120000 index 0000000000000..a2f71bb2f2e78 --- /dev/null +++ b/Aliases/phylum @@ -0,0 +1 @@ +../Formula/p/phylum-cli.rb \ No newline at end of file diff --git a/Aliases/pipeviewer b/Aliases/pipeviewer index d2eb603e31951..f989f35d9df90 120000 --- a/Aliases/pipeviewer +++ b/Aliases/pipeviewer @@ -1 +1 @@ -../Formula/pv.rb \ No newline at end of file +../Formula/p/pv.rb \ No newline at end of file diff --git a/Aliases/pkg-config b/Aliases/pkg-config new file mode 120000 index 0000000000000..cfd1caa5c3348 --- /dev/null +++ b/Aliases/pkg-config @@ -0,0 +1 @@ +../Formula/p/pkgconf.rb \ No newline at end of file diff --git a/Aliases/pkgconfig b/Aliases/pkgconfig index 0df3e4ce9b9f4..cfd1caa5c3348 120000 --- a/Aliases/pkgconfig +++ b/Aliases/pkgconfig @@ -1 +1 @@ -../Formula/pkg-config.rb \ No newline at end of file +../Formula/p/pkgconf.rb \ No newline at end of file diff --git a/Aliases/pkill b/Aliases/pkill index e4f03a25ccebf..860a68942ae7d 120000 --- a/Aliases/pkill +++ b/Aliases/pkill @@ -1 +1 @@ -../Formula/proctools.rb \ No newline at end of file +../Formula/p/proctools.rb \ No newline at end of file diff --git a/Aliases/pnpm@10 b/Aliases/pnpm@10 new file mode 120000 index 0000000000000..aff6f9a094e8b --- /dev/null +++ b/Aliases/pnpm@10 @@ -0,0 +1 @@ +../Formula/p/pnpm.rb \ No newline at end of file diff --git a/Aliases/pocketsphinx b/Aliases/pocketsphinx index 253028ed5be65..78dfba806c39b 120000 --- a/Aliases/pocketsphinx +++ b/Aliases/pocketsphinx @@ -1 +1 @@ -../Formula/cmu-pocketsphinx.rb \ No newline at end of file +../Formula/c/cmu-pocketsphinx.rb \ No newline at end of file diff --git a/Aliases/postgres b/Aliases/postgres deleted file mode 120000 index 0e4f62d343485..0000000000000 --- a/Aliases/postgres +++ /dev/null @@ -1 +0,0 @@ -../Formula/postgresql.rb \ No newline at end of file diff --git a/Aliases/postgresql@11 b/Aliases/postgresql@11 deleted file mode 120000 index 0e4f62d343485..0000000000000 --- a/Aliases/postgresql@11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/postgresql.rb \ No newline at end of file diff --git a/Aliases/procps@4 b/Aliases/procps@4 new file mode 120000 index 0000000000000..e0194a82df8ec --- /dev/null +++ b/Aliases/procps@4 @@ -0,0 +1 @@ +../Formula/p/procps.rb \ No newline at end of file diff --git a/Aliases/proj@9 b/Aliases/proj@9 new file mode 120000 index 0000000000000..d989620078ddd --- /dev/null +++ b/Aliases/proj@9 @@ -0,0 +1 @@ +../Formula/p/proj.rb \ No newline at end of file diff --git a/Aliases/protobuf@3.20 b/Aliases/protobuf@3.20 new file mode 120000 index 0000000000000..e59b985d0de0d --- /dev/null +++ b/Aliases/protobuf@3.20 @@ -0,0 +1 @@ +../Formula/p/protobuf@3.rb \ No newline at end of file diff --git a/Aliases/protobuf@3.6 b/Aliases/protobuf@3.6 deleted file mode 120000 index a449c83f02f07..0000000000000 --- a/Aliases/protobuf@3.6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/protobuf.rb \ No newline at end of file diff --git a/Aliases/protobuf@33 b/Aliases/protobuf@33 new file mode 120000 index 0000000000000..eed58b3535be6 --- /dev/null +++ b/Aliases/protobuf@33 @@ -0,0 +1 @@ +../Formula/p/protobuf.rb \ No newline at end of file diff --git a/Aliases/pt b/Aliases/pt index bec2f61b79163..101432d517b1c 120000 --- a/Aliases/pt +++ b/Aliases/pt @@ -1 +1 @@ -../Formula/the_platinum_searcher.rb \ No newline at end of file +../Formula/t/the_platinum_searcher.rb \ No newline at end of file diff --git a/Aliases/pylsp b/Aliases/pylsp new file mode 120000 index 0000000000000..566382e6a16c3 --- /dev/null +++ b/Aliases/pylsp @@ -0,0 +1 @@ +../Formula/p/python-lsp-server.rb \ No newline at end of file diff --git a/Aliases/pypy3 b/Aliases/pypy3 new file mode 120000 index 0000000000000..ab5428b2c2298 --- /dev/null +++ b/Aliases/pypy3 @@ -0,0 +1 @@ +../Formula/p/pypy3.10.rb \ No newline at end of file diff --git a/Aliases/pyqt5 b/Aliases/pyqt5 deleted file mode 120000 index e377862dfe909..0000000000000 --- a/Aliases/pyqt5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/pyqt.rb \ No newline at end of file diff --git a/Aliases/pyqt@6 b/Aliases/pyqt@6 new file mode 120000 index 0000000000000..3acaea2062244 --- /dev/null +++ b/Aliases/pyqt@6 @@ -0,0 +1 @@ +../Formula/p/pyqt.rb \ No newline at end of file diff --git a/Aliases/pyside@6 b/Aliases/pyside@6 new file mode 120000 index 0000000000000..397dcc1c453ff --- /dev/null +++ b/Aliases/pyside@6 @@ -0,0 +1 @@ +../Formula/p/pyside.rb \ No newline at end of file diff --git a/Aliases/python b/Aliases/python new file mode 120000 index 0000000000000..cd577fdd0c0ec --- /dev/null +++ b/Aliases/python @@ -0,0 +1 @@ +../Formula/p/python@3.14.rb \ No newline at end of file diff --git a/Aliases/python-gdbm b/Aliases/python-gdbm new file mode 120000 index 0000000000000..f584c09ac2a62 --- /dev/null +++ b/Aliases/python-gdbm @@ -0,0 +1 @@ +../Formula/p/python-gdbm@3.14.rb \ No newline at end of file diff --git a/Aliases/python-tk b/Aliases/python-tk new file mode 120000 index 0000000000000..bab88472569df --- /dev/null +++ b/Aliases/python-tk @@ -0,0 +1 @@ +../Formula/p/python-tk@3.14.rb \ No newline at end of file diff --git a/Aliases/python2 b/Aliases/python2 deleted file mode 120000 index 8db32ddbd2cee..0000000000000 --- a/Aliases/python2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/python@2.rb \ No newline at end of file diff --git a/Aliases/python3 b/Aliases/python3 index ad9356d0b23c7..cd577fdd0c0ec 120000 --- a/Aliases/python3 +++ b/Aliases/python3 @@ -1 +1 @@ -../Formula/python.rb \ No newline at end of file +../Formula/p/python@3.14.rb \ No newline at end of file diff --git a/Aliases/python@3 b/Aliases/python@3 index ad9356d0b23c7..cd577fdd0c0ec 120000 --- a/Aliases/python@3 +++ b/Aliases/python@3 @@ -1 +1 @@ -../Formula/python.rb \ No newline at end of file +../Formula/p/python@3.14.rb \ No newline at end of file diff --git a/Aliases/pzstd b/Aliases/pzstd index ea05c6dea05bb..5cf380bde6976 120000 --- a/Aliases/pzstd +++ b/Aliases/pzstd @@ -1 +1 @@ -../Formula/zstd.rb \ No newline at end of file +../Formula/z/zstd.rb \ No newline at end of file diff --git a/Aliases/qt5 b/Aliases/qt5 deleted file mode 120000 index f6482cf9840ad..0000000000000 --- a/Aliases/qt5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/qt.rb \ No newline at end of file diff --git a/Aliases/qt6 b/Aliases/qt6 new file mode 120000 index 0000000000000..85c55c4403203 --- /dev/null +++ b/Aliases/qt6 @@ -0,0 +1 @@ +../Formula/q/qt.rb \ No newline at end of file diff --git a/Aliases/qt@6 b/Aliases/qt@6 new file mode 120000 index 0000000000000..85c55c4403203 --- /dev/null +++ b/Aliases/qt@6 @@ -0,0 +1 @@ +../Formula/q/qt.rb \ No newline at end of file diff --git a/Aliases/recipes b/Aliases/recipes deleted file mode 120000 index 373aa43072b16..0000000000000 --- a/Aliases/recipes +++ /dev/null @@ -1 +0,0 @@ -../Formula/gnome-recipes.rb \ No newline at end of file diff --git a/Aliases/redis@5.0 b/Aliases/redis@5.0 deleted file mode 120000 index aa595fa34cd43..0000000000000 --- a/Aliases/redis@5.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/redis.rb \ No newline at end of file diff --git a/Aliases/redis@8.2 b/Aliases/redis@8.2 new file mode 120000 index 0000000000000..ffacee2e43761 --- /dev/null +++ b/Aliases/redis@8.2 @@ -0,0 +1 @@ +../Formula/r/redis.rb \ No newline at end of file diff --git a/Aliases/rg b/Aliases/rg index 251a8140ebe04..af1925f5e1895 120000 --- a/Aliases/rg +++ b/Aliases/rg @@ -1 +1 @@ -../Formula/ripgrep.rb \ No newline at end of file +../Formula/r/ripgrep.rb \ No newline at end of file diff --git a/Aliases/rga b/Aliases/rga new file mode 120000 index 0000000000000..f6b2a9c0d6398 --- /dev/null +++ b/Aliases/rga @@ -0,0 +1 @@ +../Formula/r/ripgrep-all.rb \ No newline at end of file diff --git a/Aliases/rich b/Aliases/rich new file mode 120000 index 0000000000000..a857d9c19c0ae --- /dev/null +++ b/Aliases/rich @@ -0,0 +1 @@ +../Formula/r/rich-cli.rb \ No newline at end of file diff --git a/Aliases/rtl-sdr b/Aliases/rtl-sdr index 2ac65e37a2859..db5c94bd09179 120000 --- a/Aliases/rtl-sdr +++ b/Aliases/rtl-sdr @@ -1 +1 @@ -../Formula/librtlsdr.rb \ No newline at end of file +../Formula/lib/librtlsdr.rb \ No newline at end of file diff --git a/Aliases/ruby@2.6 b/Aliases/ruby@2.6 deleted file mode 120000 index c725ef9048af8..0000000000000 --- a/Aliases/ruby@2.6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/ruby.rb \ No newline at end of file diff --git a/Aliases/ruby@3 b/Aliases/ruby@3 new file mode 120000 index 0000000000000..b06f1bb3103ed --- /dev/null +++ b/Aliases/ruby@3 @@ -0,0 +1 @@ +../Formula/r/ruby.rb \ No newline at end of file diff --git a/Aliases/ruby@3.4 b/Aliases/ruby@3.4 new file mode 120000 index 0000000000000..b06f1bb3103ed --- /dev/null +++ b/Aliases/ruby@3.4 @@ -0,0 +1 @@ +../Formula/r/ruby.rb \ No newline at end of file diff --git a/Aliases/rustup b/Aliases/rustup deleted file mode 120000 index c97586f9dabe5..0000000000000 --- a/Aliases/rustup +++ /dev/null @@ -1 +0,0 @@ -../Formula/rustup-init.rb \ No newline at end of file diff --git a/Aliases/saltstack b/Aliases/saltstack deleted file mode 120000 index c5ea099f692e1..0000000000000 --- a/Aliases/saltstack +++ /dev/null @@ -1 +0,0 @@ -../Formula/salt.rb \ No newline at end of file diff --git a/Aliases/sbt@1 b/Aliases/sbt@1 index 252751c603fdc..73f39db633c82 120000 --- a/Aliases/sbt@1 +++ b/Aliases/sbt@1 @@ -1 +1 @@ -../Formula/sbt.rb \ No newline at end of file +../Formula/s/sbt.rb \ No newline at end of file diff --git a/Aliases/scala@2.12 b/Aliases/scala@2.12 deleted file mode 120000 index b28057a0efde9..0000000000000 --- a/Aliases/scala@2.12 +++ /dev/null @@ -1 +0,0 @@ -../Formula/scala.rb \ No newline at end of file diff --git a/Aliases/scala@3 b/Aliases/scala@3 new file mode 120000 index 0000000000000..789304d1552c6 --- /dev/null +++ b/Aliases/scala@3 @@ -0,0 +1 @@ +../Formula/s/scala.rb \ No newline at end of file diff --git a/Aliases/sem b/Aliases/sem index 6ed2ae61bd863..e5f28f4e08af8 120000 --- a/Aliases/sem +++ b/Aliases/sem @@ -1 +1 @@ -../Formula/schema-evolution-manager.rb \ No newline at end of file +../Formula/s/schema-evolution-manager.rb \ No newline at end of file diff --git a/Aliases/sfml@3 b/Aliases/sfml@3 new file mode 120000 index 0000000000000..483217603bdf4 --- /dev/null +++ b/Aliases/sfml@3 @@ -0,0 +1 @@ +../Formula/s/sfml.rb \ No newline at end of file diff --git a/Aliases/skaffold@2.16 b/Aliases/skaffold@2.16 new file mode 120000 index 0000000000000..6102b4d3b0469 --- /dev/null +++ b/Aliases/skaffold@2.16 @@ -0,0 +1 @@ +../Formula/s/skaffold.rb \ No newline at end of file diff --git a/Aliases/slang b/Aliases/slang index 58fdabaa1ebcf..98bbb1ec5ed74 120000 --- a/Aliases/slang +++ b/Aliases/slang @@ -1 +1 @@ -../Formula/s-lang.rb \ No newline at end of file +../Formula/s/s-lang.rb \ No newline at end of file diff --git a/Aliases/solr@7.6 b/Aliases/solr@7.6 deleted file mode 120000 index cceb22ad842ef..0000000000000 --- a/Aliases/solr@7.6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/solr.rb \ No newline at end of file diff --git a/Aliases/solr@9.9 b/Aliases/solr@9.9 new file mode 120000 index 0000000000000..5c36691464f21 --- /dev/null +++ b/Aliases/solr@9.9 @@ -0,0 +1 @@ +../Formula/s/solr.rb \ No newline at end of file diff --git a/Aliases/speedtest_cli b/Aliases/speedtest_cli deleted file mode 120000 index e494aa1f18b08..0000000000000 --- a/Aliases/speedtest_cli +++ /dev/null @@ -1 +0,0 @@ -../Formula/speedtest-cli.rb \ No newline at end of file diff --git a/Aliases/sphinx b/Aliases/sphinx new file mode 120000 index 0000000000000..01c067fd7aa1d --- /dev/null +++ b/Aliases/sphinx @@ -0,0 +1 @@ +../Formula/s/sphinx-doc.rb \ No newline at end of file diff --git a/Aliases/sphinxbase b/Aliases/sphinxbase deleted file mode 120000 index 1b499cc74c9ba..0000000000000 --- a/Aliases/sphinxbase +++ /dev/null @@ -1 +0,0 @@ -../Formula/cmu-sphinxbase.rb \ No newline at end of file diff --git a/Aliases/spidermonkey@140 b/Aliases/spidermonkey@140 new file mode 120000 index 0000000000000..b401a72ee8edb --- /dev/null +++ b/Aliases/spidermonkey@140 @@ -0,0 +1 @@ +../Formula/s/spidermonkey.rb \ No newline at end of file diff --git a/Aliases/sqlite3 b/Aliases/sqlite3 index e1446202eba1e..c9be1bb3b6fad 120000 --- a/Aliases/sqlite3 +++ b/Aliases/sqlite3 @@ -1 +1 @@ -../Formula/sqlite.rb \ No newline at end of file +../Formula/s/sqlite.rb \ No newline at end of file diff --git a/Aliases/ssreflect b/Aliases/ssreflect deleted file mode 120000 index 51eb61d337c4c..0000000000000 --- a/Aliases/ssreflect +++ /dev/null @@ -1 +0,0 @@ -../Formula/math-comp.rb \ No newline at end of file diff --git a/Aliases/stack b/Aliases/stack index 8e80db7e4f06f..bc7f01f78a040 120000 --- a/Aliases/stack +++ b/Aliases/stack @@ -1 +1 @@ -../Formula/haskell-stack.rb \ No newline at end of file +../Formula/h/haskell-stack.rb \ No newline at end of file diff --git a/Aliases/stash-cli b/Aliases/stash-cli deleted file mode 120000 index e40e57ea4ee2b..0000000000000 --- a/Aliases/stash-cli +++ /dev/null @@ -1 +0,0 @@ -../Formula/atlassian-cli.rb \ No newline at end of file diff --git a/Aliases/stripe b/Aliases/stripe new file mode 120000 index 0000000000000..e4f46094e3265 --- /dev/null +++ b/Aliases/stripe @@ -0,0 +1 @@ +../Formula/s/stripe-cli.rb \ No newline at end of file diff --git a/Aliases/style b/Aliases/style index aac14c67387ee..c33dd9e41eb86 120000 --- a/Aliases/style +++ b/Aliases/style @@ -1 +1 @@ -../Formula/diction.rb \ No newline at end of file +../Formula/d/diction.rb \ No newline at end of file diff --git a/Aliases/subversion@1.11 b/Aliases/subversion@1.11 deleted file mode 120000 index 5a000aa104c22..0000000000000 --- a/Aliases/subversion@1.11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/subversion.rb \ No newline at end of file diff --git a/Aliases/suitesparse b/Aliases/suitesparse index 843282b1d3ae4..3748c0fa00b45 120000 --- a/Aliases/suitesparse +++ b/Aliases/suitesparse @@ -1 +1 @@ -../Formula/suite-sparse.rb \ No newline at end of file +../Formula/s/suite-sparse.rb \ No newline at end of file diff --git a/Aliases/supervisord b/Aliases/supervisord index 16be427ea775e..6e80777efba7c 120000 --- a/Aliases/supervisord +++ b/Aliases/supervisord @@ -1 +1 @@ -../Formula/supervisor.rb \ No newline at end of file +../Formula/s/supervisor.rb \ No newline at end of file diff --git a/Aliases/svn b/Aliases/svn index 5a000aa104c22..1a08039b16661 120000 --- a/Aliases/svn +++ b/Aliases/svn @@ -1 +1 @@ -../Formula/subversion.rb \ No newline at end of file +../Formula/s/subversion.rb \ No newline at end of file diff --git a/Aliases/swagger-codegen@3 b/Aliases/swagger-codegen@3 new file mode 120000 index 0000000000000..c9829763bc382 --- /dev/null +++ b/Aliases/swagger-codegen@3 @@ -0,0 +1 @@ +../Formula/s/swagger-codegen.rb \ No newline at end of file diff --git a/Aliases/swig@3.0 b/Aliases/swig@3.0 deleted file mode 120000 index 0d1a33d7ad9fa..0000000000000 --- a/Aliases/swig@3.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/swig.rb \ No newline at end of file diff --git a/Aliases/synergy b/Aliases/synergy new file mode 120000 index 0000000000000..ca54192eed2c0 --- /dev/null +++ b/Aliases/synergy @@ -0,0 +1 @@ +../Formula/s/synergy-core.rb \ No newline at end of file diff --git a/Aliases/tachyon b/Aliases/tachyon deleted file mode 120000 index 12026ac16e940..0000000000000 --- a/Aliases/tachyon +++ /dev/null @@ -1 +0,0 @@ -../Formula/alluxio.rb \ No newline at end of file diff --git a/Aliases/task@3 b/Aliases/task@3 new file mode 120000 index 0000000000000..1b146bda6c566 --- /dev/null +++ b/Aliases/task@3 @@ -0,0 +1 @@ +../Formula/t/task.rb \ No newline at end of file diff --git a/Aliases/tcl-tk@9 b/Aliases/tcl-tk@9 new file mode 120000 index 0000000000000..d9f6188864aba --- /dev/null +++ b/Aliases/tcl-tk@9 @@ -0,0 +1 @@ +../Formula/t/tcl-tk.rb \ No newline at end of file diff --git a/Aliases/team-explorer-everywhere b/Aliases/team-explorer-everywhere deleted file mode 120000 index 4485d78ad0f94..0000000000000 --- a/Aliases/team-explorer-everywhere +++ /dev/null @@ -1 +0,0 @@ -../Formula/tee-clc.rb \ No newline at end of file diff --git a/Aliases/tensorflow b/Aliases/tensorflow deleted file mode 120000 index 19bbc51f20427..0000000000000 --- a/Aliases/tensorflow +++ /dev/null @@ -1 +0,0 @@ -../Formula/libtensorflow.rb \ No newline at end of file diff --git a/Aliases/thrift@0.11 b/Aliases/thrift@0.11 deleted file mode 120000 index 5973f36cd4848..0000000000000 --- a/Aliases/thrift@0.11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/thrift.rb \ No newline at end of file diff --git a/Aliases/thrift@0.22 b/Aliases/thrift@0.22 new file mode 120000 index 0000000000000..7d65993396a0a --- /dev/null +++ b/Aliases/thrift@0.22 @@ -0,0 +1 @@ +../Formula/t/thrift.rb \ No newline at end of file diff --git a/Aliases/tinyfugue b/Aliases/tinyfugue deleted file mode 120000 index 96df5a3c8c93a..0000000000000 --- a/Aliases/tinyfugue +++ /dev/null @@ -1 +0,0 @@ -../Formula/tiny-fugue.rb \ No newline at end of file diff --git a/Aliases/tiv b/Aliases/tiv new file mode 120000 index 0000000000000..5824660ec2253 --- /dev/null +++ b/Aliases/tiv @@ -0,0 +1 @@ +../Formula/t/terminalimageviewer.rb \ No newline at end of file diff --git a/Aliases/tomcat@11 b/Aliases/tomcat@11 new file mode 120000 index 0000000000000..cc4917d0ed5fa --- /dev/null +++ b/Aliases/tomcat@11 @@ -0,0 +1 @@ +../Formula/t/tomcat.rb \ No newline at end of file diff --git a/Aliases/tomcat@9 b/Aliases/tomcat@9 deleted file mode 120000 index 0f1c653631ca6..0000000000000 --- a/Aliases/tomcat@9 +++ /dev/null @@ -1 +0,0 @@ -../Formula/tomcat.rb \ No newline at end of file diff --git a/Aliases/traefik@3 b/Aliases/traefik@3 new file mode 120000 index 0000000000000..1c46fa11d7f9f --- /dev/null +++ b/Aliases/traefik@3 @@ -0,0 +1 @@ +../Formula/t/traefik.rb \ No newline at end of file diff --git a/Aliases/transfig b/Aliases/transfig deleted file mode 120000 index 41dbc3a06912b..0000000000000 --- a/Aliases/transfig +++ /dev/null @@ -1 +0,0 @@ -../Formula/fig2dev.rb \ No newline at end of file diff --git a/Aliases/tsc b/Aliases/tsc new file mode 120000 index 0000000000000..bdf5d4008c7df --- /dev/null +++ b/Aliases/tsc @@ -0,0 +1 @@ +../Formula/t/typescript.rb \ No newline at end of file diff --git a/Aliases/tutum b/Aliases/tutum deleted file mode 120000 index 7fef1108ac4a4..0000000000000 --- a/Aliases/tutum +++ /dev/null @@ -1 +0,0 @@ -../Formula/docker-cloud.rb \ No newline at end of file diff --git a/Aliases/twemproxy b/Aliases/twemproxy index f51da4ed20a87..f38dd397a93af 120000 --- a/Aliases/twemproxy +++ b/Aliases/twemproxy @@ -1 +1 @@ -../Formula/nutcracker.rb \ No newline at end of file +../Formula/n/nutcracker.rb \ No newline at end of file diff --git a/Aliases/twolame b/Aliases/twolame index 9c7c72c167a8b..35d2f4aae447d 120000 --- a/Aliases/twolame +++ b/Aliases/twolame @@ -1 +1 @@ -../Formula/two-lame.rb \ No newline at end of file +../Formula/t/two-lame.rb \ No newline at end of file diff --git a/Aliases/ucm b/Aliases/ucm new file mode 120000 index 0000000000000..f71b01cb9c42f --- /dev/null +++ b/Aliases/ucm @@ -0,0 +1 @@ +../Formula/u/unisonlang.rb \ No newline at end of file diff --git a/Aliases/unix2dos b/Aliases/unix2dos index ab871e3e64c23..689f313a6b79d 120000 --- a/Aliases/unix2dos +++ b/Aliases/unix2dos @@ -1 +1 @@ -../Formula/dos2unix.rb \ No newline at end of file +../Formula/d/dos2unix.rb \ No newline at end of file diff --git a/Aliases/usb-multiplex-daemon b/Aliases/usb-multiplex-daemon index 5fedad0d240a3..fff0f2f856ec6 120000 --- a/Aliases/usb-multiplex-daemon +++ b/Aliases/usb-multiplex-daemon @@ -1 +1 @@ -../Formula/usbmuxd.rb \ No newline at end of file +../Formula/lib/libusbmuxd.rb \ No newline at end of file diff --git a/Aliases/v8@7.1 b/Aliases/v8@7.1 deleted file mode 120000 index c08cedfb44694..0000000000000 --- a/Aliases/v8@7.1 +++ /dev/null @@ -1 +0,0 @@ -../Formula/v8.rb \ No newline at end of file diff --git a/Aliases/varnish@6 b/Aliases/varnish@6 deleted file mode 120000 index 5893e6c03daaf..0000000000000 --- a/Aliases/varnish@6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/varnish.rb \ No newline at end of file diff --git a/Aliases/vid.stab b/Aliases/vid.stab index ef8fbc83c86b0..e80907f5eac88 120000 --- a/Aliases/vid.stab +++ b/Aliases/vid.stab @@ -1 +1 @@ -../Formula/libvidstab.rb \ No newline at end of file +../Formula/lib/libvidstab.rb \ No newline at end of file diff --git a/Aliases/vim@8.1 b/Aliases/vim@8.1 deleted file mode 120000 index f76bbc8b03eb8..0000000000000 --- a/Aliases/vim@8.1 +++ /dev/null @@ -1 +0,0 @@ -../Formula/vim.rb \ No newline at end of file diff --git a/Aliases/vimcat b/Aliases/vimcat new file mode 120000 index 0000000000000..8925970fd50cb --- /dev/null +++ b/Aliases/vimcat @@ -0,0 +1 @@ +../Formula/v/vimpager.rb \ No newline at end of file diff --git a/Aliases/wamr b/Aliases/wamr new file mode 120000 index 0000000000000..e90e2347882fe --- /dev/null +++ b/Aliases/wamr @@ -0,0 +1 @@ +../Formula/w/wasm-micro-runtime.rb \ No newline at end of file diff --git a/Aliases/wxwidgets b/Aliases/wxwidgets deleted file mode 120000 index abdff258ac24b..0000000000000 --- a/Aliases/wxwidgets +++ /dev/null @@ -1 +0,0 @@ -../Formula/wxmac.rb \ No newline at end of file diff --git a/Aliases/wxwidgets@3.3 b/Aliases/wxwidgets@3.3 new file mode 120000 index 0000000000000..403c799954602 --- /dev/null +++ b/Aliases/wxwidgets@3.3 @@ -0,0 +1 @@ +../Formula/w/wxwidgets.rb \ No newline at end of file diff --git a/Aliases/xmlsec1 b/Aliases/xmlsec1 index 11f2425f0d30b..6ba871c6054bc 120000 --- a/Aliases/xmlsec1 +++ b/Aliases/xmlsec1 @@ -1 +1 @@ -../Formula/libxmlsec1.rb \ No newline at end of file +../Formula/lib/libxmlsec1.rb \ No newline at end of file diff --git a/Aliases/yubico-pam b/Aliases/yubico-pam deleted file mode 120000 index ad23fa9572d44..0000000000000 --- a/Aliases/yubico-pam +++ /dev/null @@ -1 +0,0 @@ -../Formula/pam_yubico.rb \ No newline at end of file diff --git a/Aliases/yubikey-personalization b/Aliases/yubikey-personalization index bc4aac0be5e32..654bd2b54045d 120000 --- a/Aliases/yubikey-personalization +++ b/Aliases/yubikey-personalization @@ -1 +1 @@ -../Formula/ykpers.rb \ No newline at end of file +../Formula/y/ykpers.rb \ No newline at end of file diff --git a/Aliases/zig@0.15 b/Aliases/zig@0.15 new file mode 120000 index 0000000000000..d76306a0b6319 --- /dev/null +++ b/Aliases/zig@0.15 @@ -0,0 +1 @@ +../Formula/z/zig.rb \ No newline at end of file diff --git a/Aliases/zmq b/Aliases/zmq index 173ef88d6a059..16891bfe3ad3d 120000 --- a/Aliases/zmq +++ b/Aliases/zmq @@ -1 +1 @@ -../Formula/zeromq.rb \ No newline at end of file +../Formula/z/zeromq.rb \ No newline at end of file diff --git a/Aliases/zsh-completion b/Aliases/zsh-completion index 6510c4634bbb2..dc64371d8f804 120000 --- a/Aliases/zsh-completion +++ b/Aliases/zsh-completion @@ -1 +1 @@ -../Formula/zsh-completions.rb \ No newline at end of file +../Formula/z/zsh-completions.rb \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000000..ee218011cc64b --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,25 @@ +# Note that the naming of this file is incorrect for our case: these people do not "own" the provided files but are +# people with write-access to this repository (i.e. @Homebrew/core) who wish to approve changes to these files. +# +# Their review is required to merge PRs that change these files. +# +# To be explicit: we will never accept changes to this file adding people from outside the Homebrew GitHub +# organisation. If you are not a Homebrew maintainer: you do not personally "own" or "maintain" any formulae. +# +# Note: @Homebrew/plc does not have write-access to this repository, and therefore cannot be listed in this file. + +CODEOWNERS @Homebrew/tsc @MikeMcQuaid +CONTRIBUTING.md @Homebrew/tsc @MikeMcQuaid +tap_migrations.json @Homebrew/tsc @MikeMcQuaid +.github/ISSUE_TEMPLATE/ @Homebrew/tsc @MikeMcQuaid +.github/PULL_REQUEST_TEMPLATE.md @Homebrew/tsc @MikeMcQuaid +LICENSE.txt @Homebrew/tsc @MikeMcQuaid +.github/workflows/ @Homebrew/core @MikeMcQuaid +.github/workflows/triage.yml @Homebrew/tsc + +audit_exceptions/linux_only_gcc_dependency_allowlist.json @Homebrew/tsc +audit_exceptions/permitted_formula_license_mismatches.json @Homebrew/tsc @MikeMcQuaid +audit_exceptions/provided_by_macos_depends_on_allowlist.json @Homebrew/tsc @MikeMcQuaid +audit_exceptions/relicensed_formulae_versions.json @Homebrew/tsc @MikeMcQuaid +audit_exceptions/universal_binary_allowlist.json @Homebrew/tsc @carlocab +audit_exceptions/versioned_formula_dependent_conflicts_allowlist.json @Homebrew/tsc @MikeMcQuaid diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 9706e18f925e0..0000000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,25 +0,0 @@ -# Code of Conduct -The Homebrew community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences great successes and continued growth. When you're working with members of the community, we encourage you to follow these guidelines which help steer our interactions and strive to keep Homebrew a positive, successful, and growing community. - -A member of the Homebrew community is: - -## Open -Members of the community are open to collaboration, whether it's on GitHub, email, IRC or otherwise. We're receptive to constructive comment and criticism, as the experiences and skill sets of other members contribute to the whole of our efforts. We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate and everyone can make a difference. - -## Considerate -Members of the community are considerate of their peers - other Homebrew users. We're thoughtful when addressing the efforts of others, keeping in mind that oftentimes their labor was completed simply for the good of the community. We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views. - -## Respectful -Members of the community are respectful. We're respectful of others, their positions, their skills, their commitments, and their efforts. We're respectful of the volunteer efforts that permeate the Homebrew community. We're respectful of the processes set forth in the community, and we work within them. When we disagree, we are courteous in raising our issues. - -Overall, we're good to each other. We contribute to this community not because we have to, but because we want to. If we remember that, these guidelines will come naturally. - -# Diversity -The Homebrew community welcomes and encourages participation by everyone. Our community is based on mutual respect, tolerance, and encouragement, and we are working to help each other live up to these principles. We want our community to be more diverse: whoever you are, and whatever your background, we welcome you. - -We have created this diversity statement because we believe that a diverse Homebrew community is stronger and more vibrant. A diverse community where people treat each other with respect has more potential contributors and more sources for ideas. - -Although we have phrased the formal diversity statement generically to make it all-inclusive, we recognise that there are specific attributes that are used to discriminate against people. In alphabetical order, some of these attributes include (but are not limited to): age, culture, ethnicity, gender identity or expression, national origin, physical or mental difference, politics, race, religion, sex, sexual orientation, socio-economic status, and subculture. We welcome people regardless of the values of these or other attributes. - -# Attribution -This code of conduct is heavily based on the [Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/) and the [Python Diversity Statement](https://www.python.org/community/diversity/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b9d66d407662..4b8ace8cd390d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,33 +1,99 @@ # Contributing to Homebrew -First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/brew/blob/master/CODE_OF_CONDUCT.md#code-of-conduct). +First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct). -### Report a bug +Ensure your commits follow the [commit style guide](https://docs.brew.sh/Formula-Cookbook#commit). + +Thanks for contributing! + +### To report a bug * run `brew update` (twice) * run and read `brew doctor` * read [the Troubleshooting Checklist](https://docs.brew.sh/Troubleshooting) * open an issue on the formula's repository -### Submit a version upgrade for the `foo` formula +### To submit a version upgrade for the `foo` formula * check if the same upgrade has been already submitted by [searching the open pull requests for `foo`](https://github.com/Homebrew/homebrew-core/pulls?utf8=✓&q=is%3Apr+is%3Aopen+foo). -* `brew bump-formula-pr --strict foo` with `--url=...` and `--sha256=...` or `--tag=...` and `--revision=...` arguments. +* `brew tap homebrew/core` +* `brew bump-formula-pr --strict foo` with one of the following: + * `--url=...` and `--sha256=...` + * `--tag=...` and `--revision=...` + * `--version=...` -### Add a new formula for `foo` version `2.3.4` from `$URL` +### To add a new formula for `foo` version `2.3.4` from `$URL` * read [the Formula Cookbook](https://docs.brew.sh/Formula-Cookbook) or: `brew create $URL` and make edits -* `brew install --build-from-source foo` -* `brew audit --new-formula foo` +* `HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source foo` +* `brew audit --new foo` * `git commit` with message formatted `foo 2.3.4 (new formula)` * [open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) and fix any failing tests -### Contribute a fix to the `foo` formula +Once you've addressed any potential feedback and a member of the Homebrew org has approved your pull request, the [BrewTestBot](https://github.com/BrewTestBot) will automatically merge it a couple of minutes later. -* `brew edit foo` and make edits -* leave the [`bottle`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#bottle-class_method) as-is -* `brew uninstall --force foo`, `brew install --build-from-source foo`, `brew test foo`, and `brew audit --strict foo` -* `git commit` with message formatted `foo: ` -* [open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) and fix any failing tests +### To contribute a fix to the `foo` formula + +If you are already well-versed in the use of `git`, then you can work with the local +copy of the `homebrew-core` repository as you are used to. You may need to run +`brew tap homebrew/core` to clone it, if you haven't done so already; the repository +will then be located in the directory `$(brew --repository homebrew/core)`. +Modify the formula there using `brew edit foo`, +leaving the section `bottle do ... end` unchanged, and prepare a pull request +as you usually do. Before submitting your pull request, be sure to test it +with these commands: + +``` +brew uninstall --force foo +HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source foo +brew test foo +brew audit --strict foo +brew style foo +``` + +After testing, if you think it is needed to force the corresponding bottles to be +rebuilt and redistributed, add a line of the form `revision 1` to the formula, +or add 1 to the revision number already present. + +If you are not already well versed in the use of `git`, then you may learn +about it from the introduction at +https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request and then proceed as +follows: + +* run `brew tap homebrew/core --force`, if you haven't done so previously +* run `brew edit foo` and make edits +* leave the section `bottle do ... end` unchanged +* test your changes using the commands listed above +* run `git commit` with message formatted `foo ` or `foo: ` +* open a pull request as described in the introduction linked to above, wait for the automated test results, and fix any failing tests + +Once you've addressed any potential feedback and a member of the Homebrew org has approved your pull request, the [BrewTestBot](https://github.com/BrewTestBot) will automatically merge it a couple of minutes later. + +### Dealing with CI failures + +Pull requests with failing CI should not be merged, so the failures will need to be fixed. Start by looking for errors in the CI log. Some errors will show up as annotations in the "Files changed" tab of your pull request. If there are no annotations, or the annotations do not contain the relevant errors, then the complete build log can be found in the "Checks" tab of your pull request. + +Once you've identified the error(s), check whether you can reproduce them locally. You should be able to do this with one or more of `HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source`, `brew audit --strict --online`, and `brew test`. Don't forget to checkout your PR branch before trying this! If you can reproduce the failure(s), then it is likely that the formula needs to be fixed. Read the error messages carefully. Many errors provide hints on how to fix them. Failing that: looking up the error message is often a fruitful source of hints for what to do next. + +If you can't reproduce an error, then you need to identify what makes your local environment different from the build environment in CI. It is likely that one of those differences is driving the CI failure. It may help to try to make your local environment as similar to CI as possible to try to reproduce the failure. If the CI failure occurs on Linux, you can use the Homebrew Docker container to emulate the CI environment. See the next section for a guide on how to do this. + +If you're still stuck: don't fret. Leave a comment on your PR describing what you've done to try to diagnose and fix the CI failure and we'll do our best to help you resolve them. + +### Homebrew Docker container + +Linux CI runs on a Docker container running Ubuntu 22.04. If you have Docker installed, you can use our container with: + +``` +docker run --interactive --tty --rm --pull always ghcr.io/homebrew/ubuntu22.04:latest /bin/bash +``` + +If you don't have Docker installed: + +``` +brew install --formula docker lima +limactl start template://docker +docker context create lima --docker "host=unix://${HOME}/.lima/docker/sock/docker.sock" +docker context use lima +``` -Thanks! +You should now be able to run the `docker` command shown above. diff --git a/Formula/a/a2ps.rb b/Formula/a/a2ps.rb new file mode 100644 index 0000000000000..5133eb37f8a74 --- /dev/null +++ b/Formula/a/a2ps.rb @@ -0,0 +1,41 @@ +class A2ps < Formula + desc "Any-to-PostScript filter" + homepage "https://www.gnu.org/software/a2ps/" + url "https://ftpmirror.gnu.org/gnu/a2ps/a2ps-4.15.7.tar.gz" + mirror "https://ftp.gnu.org/gnu/a2ps/a2ps-4.15.7.tar.gz" + sha256 "715f38670afd950b4ca71c01f468feefad265ca52d3f112934c63c0a8bfbb8af" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "a0e1ed8df721dc8c255fb987d04120fc02f76fae2396b111c744008b9f71950c" + sha256 arm64_sequoia: "09f88b61e36045188ddb1b1ba8e402b9f3debee1770cc4ca91355eeccb5f4a38" + sha256 arm64_sonoma: "fa5fee22382064275c78eb9c2c34149f1079d8dd55cff9109db2b9515aff5976" + sha256 arm64_ventura: "1c84d09586d6a1dcd21cc0a5bc73879dbf075ea88f8e5d490e6bcef9add4d91d" + sha256 sonoma: "8d6400425422f554d9e668c3625f706989cf0ae89f36fdb57283c826febb4643" + sha256 ventura: "4fad7a2f054888fb432c24d9c78f86b17ebe40fc85ca6154f045195ccc2943fa" + sha256 arm64_linux: "df084253ef723569fb05845b1660a50a4f37f5cdc7018e8439a7b77277093081" + sha256 x86_64_linux: "7333d9a579dcf60c26f56c8505d8181e6d53494a659777586f067f38eb529119" + end + + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "libpaper" + uses_from_macos "gperf" + + def install + system "./configure", "--sysconfdir=#{etc}", + "--with-lispdir=#{elisp}", + "--with-packager=#{tap.user}", + "--with-packager-version=#{pkg_version}", + "--with-packager-bug-reports=#{tap.issues_url}", + *std_configure_args + system "make", "install" + inreplace etc/"a2ps.cfg", prefix, opt_prefix + end + + test do + (testpath/"test.txt").write("Hello World!\n") + system bin/"a2ps", "test.txt", "-o", "test.ps" + assert File.read("test.ps").start_with?("") + end +end diff --git a/Formula/a/a52dec.rb b/Formula/a/a52dec.rb new file mode 100644 index 0000000000000..e50cbe7040853 --- /dev/null +++ b/Formula/a/a52dec.rb @@ -0,0 +1,44 @@ +class A52dec < Formula + desc "Library for decoding ATSC A/52 streams (AKA 'AC-3')" + homepage "https://git.adelielinux.org/community/a52dec/" + url "https://distfiles.adelielinux.org/source/a52dec/a52dec-0.8.0.tar.gz" + sha256 "03c181ce9c3fe0d2f5130de18dab9bd8bc63c354071515aa56983c74a9cffcc9" + license "GPL-2.0-or-later" + + livecheck do + url "https://distfiles.adelielinux.org/source/a52dec/" + regex(/href=.*?a52dec[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ca731a1b2d531c0e169e56a7d02c72dc18e0fb163fac344f7476fe0e399bec7b" + sha256 cellar: :any, arm64_sequoia: "bb6e3408f39a404770529cfce548dc2666e861077acd173825cb3138c27c205a" + sha256 cellar: :any, arm64_sonoma: "9619e592adb641635b8bc648e92149822e6564203088f33570c2da72283ba918" + sha256 cellar: :any, arm64_ventura: "1f40eee1f2254ecbeee873473dba633d2cc52f295aedb0ae3ae82db198d0c5b9" + sha256 cellar: :any, arm64_monterey: "61a272a68f11e79ba690068f532728eda218a9d86f330d070826bf003aedacfa" + sha256 cellar: :any, arm64_big_sur: "24dae57187519f6ef5449df29562fa9d752d1844d00f2590bf5bb2b38213fd84" + sha256 cellar: :any, sonoma: "20ad4b441da0829f26e28c1ed1c6580af78d078a9393c97af3d5fa66a7d3c0dc" + sha256 cellar: :any, ventura: "d365954f1957b92868f9a3335509eff98e4d52437b75a868165742c6849555d6" + sha256 cellar: :any, monterey: "36ff9fa73cae7a8d1850cafa0f75d27df33d5f8bf5d57bf10a064de09e234194" + sha256 cellar: :any, big_sur: "cf1809cf8444fb50bbbe685e0f8ac697b84969cc0662d5079fa817c8eadd1ec3" + sha256 cellar: :any_skip_relocation, arm64_linux: "b81010ab1db1eb4740dc4a587fdee7a4340873c6a61d16b17c51bb6ac33371f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a3d786826405966046c6962db674c563b89e86bf9ff5a53aecb9cea18f4df3d" + end + + def install + # Fixes duplicate symbols errors on arm64 + ENV.append_to_cflags "-std=gnu89" if OS.mac? + + system "./configure", "--disable-silent-rules", + "--enable-shared", + *std_configure_args + system "make", "install" + end + + test do + touch testpath/"test" + system bin/"a52dec", "-o", "null", "test" + end +end diff --git a/Formula/a/aalib.rb b/Formula/a/aalib.rb new file mode 100644 index 0000000000000..f52f54092e915 --- /dev/null +++ b/Formula/a/aalib.rb @@ -0,0 +1,80 @@ +class Aalib < Formula + desc "Portable ASCII art graphics library" + homepage "https://aa-project.sourceforge.net/aalib/" + url "https://downloads.sourceforge.net/project/aa-project/aa-lib/1.4rc5/aalib-1.4rc5.tar.gz" + sha256 "fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee" + license "GPL-2.0-or-later" + revision 2 + + # The latest version in the formula is a release candidate, so we have to + # allow matching of unstable versions. + livecheck do + url "https://sourceforge.net/projects/aa-project/rss?path=/aa-lib" + regex(%r{url=.*?/aalib[._-]v?(\d+(?:\.\d+)+.*?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a4aec0f6a61caa07dcdfd47a8579ba4f506b1047cc0b822fe0321e123e638764" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "404c97537d65ca0b75c389e7d439dcefb9b56f34d3b98017669eda0d0501add7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a4890d380658f2e1ebef37698c874b8711acfe9c0685313d8c93dbe2e9e08bbf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3bbe40492b5ff2d6bde6effd36a8fa0b179786032c1da624d0f6bd15e71cd044" + sha256 cellar: :any_skip_relocation, arm64_monterey: "292e704fb6cca01e6ab77baac8960df5c9b45f2fb209a0f670a7de16242c3ee0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "031eac9658cb6878fea6b53e232e0b3f294b81953dd1803bd808c26c5b1a934a" + sha256 cellar: :any_skip_relocation, sonoma: "9bee33852c86c2dea5017369281ec0e4d56249d4bc7d2803f1c2794c8773b92d" + sha256 cellar: :any_skip_relocation, ventura: "a71c6ea0888e11ca4512de9bab4142c160e360e41ef5eb761740af5f77a459cb" + sha256 cellar: :any_skip_relocation, monterey: "ac7c8f7dafcb3eedf34abdd258d0cab1f9e58a3048da6307ded8ae029d162a2b" + sha256 cellar: :any_skip_relocation, big_sur: "fb1df93a418c2ae4b7c358d19b58afc0ad73d9d1e6f22b92aa5d5f086cb48a70" + sha256 cellar: :any_skip_relocation, catalina: "d83c1b827ca16ae5450356db32fe1b27e910a27bbe2b074a9b4c22fe310bc5b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "6205456db777cfa9097a0285ef6fdc29876b21df831295a0c9f2837ce236fdda" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ba926f8aadec9e5c30880ae6e6497d44f9045d1ca1f680baf28e67309bd8ecd" + end + + # Fix malloc/stdlib issue on macOS + # Fix underquoted definition of AM_PATH_AALIB in aalib.m4 + # Fix implicit function declarations + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/aalib/1.4rc5.patch" + sha256 "9843e109d580e7112291871248140b8657108faac6d90ce5caf66cd25e8d0d1e" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + args = %W[ + --mandir=#{man} + --infodir=#{info} + --enable-shared=yes + --enable-static=yes + --without-x + ] + # Help old config scripts identify arm64 linux + args << "--host=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/aainfo -width 100 -height 50") + assert_match "AAlib version:#{version.major_minor}", output + assert_match(/Width +:100$/, output) + assert_match(/Height +:50$/, output) + + output = shell_output("yes '' | #{bin}/aatest -width 20 -height 10") + assert_match <<~EOS, output + floyd-steelberg dith + ering. . ....----:.: + . .......-.:.::: + . . . ....---:-:: + . .......-.:.:-: + . . . ....--.:-:: + . .......-.:-:-: + . . . ....:.:.:-: + . ........:.:-:: + . . . ....:.--:-: + EOS + end +end diff --git a/Formula/a/aamath.rb b/Formula/a/aamath.rb new file mode 100644 index 0000000000000..80230feaf293d --- /dev/null +++ b/Formula/a/aamath.rb @@ -0,0 +1,56 @@ +class Aamath < Formula + desc "Renders mathematical expressions as ASCII art" + homepage "http://fuse.superglue.se/aamath/" + url "http://fuse.superglue.se/aamath/aamath-0.3.tar.gz" + sha256 "9843f4588695e2cd55ce5d8f58921d4f255e0e65ed9569e1dcddf3f68f77b631" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?aamath[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "587054f7e1107e61554956c8ba147c9560af1e7138547651ba82d32464c0862c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7fb04795cf214c974e4e45cb8c369dad3232624dd070641a4f408808fbd98d3b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "04bc9d4ebf6c7eb4e4634f79fdd297aa57c87d570f0e3f6937c9bf104d0c0f2a" + sha256 cellar: :any_skip_relocation, sonoma: "56c65eaae7db0c86ca690b79cde6894c281877f00c18965975b4e4fd91b4fe71" + sha256 cellar: :any_skip_relocation, arm64_linux: "912312e5d565a7255691d9cff437f1e66419054dc75365cda3af747ef5bf5c6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79b5ff4704b7f8393182ee3b68f5343a745e5e62ad4b2db90b3b4f28c186ae52" + end + + uses_from_macos "bison" => :build # for yacc + uses_from_macos "flex" => :build + uses_from_macos "libedit" # readline's license is incompatible with GPL-2.0-only + + # Fix build on clang; patch by Homebrew team + # https://github.com/Homebrew/homebrew/issues/23872 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/aamath/0.3.patch" + sha256 "9443881d7950ac8d2da217a23ae3f2c936fbd6880f34dceba717f1246d8608f1" + end + + def install + unless OS.mac? + inreplace "Makefile" do |s| + s.change_make_var! "CFLAGS", "#{s.get_make_var("CFLAGS")} -I#{Formula["libedit"].opt_libexec}/include" + s.change_make_var! "LFLAGS", "#{s.get_make_var("LFLAGS")} -L#{Formula["libedit"].opt_libexec}/lib" + end + end + + ENV.deparallelize + system "make" + + bin.install "aamath" + man1.install "aamath.1" + prefix.install "testcases" + end + + test do + s = pipe_output(bin/"aamath", (prefix/"testcases").read, 0) + assert_match "f(x + h) = f(x) + h f'(x)", s + end +end diff --git a/Formula/a/aarch64-elf-binutils.rb b/Formula/a/aarch64-elf-binutils.rb new file mode 100644 index 0000000000000..7ecc4d5d19c99 --- /dev/null +++ b/Formula/a/aarch64-elf-binutils.rb @@ -0,0 +1,60 @@ +class Aarch64ElfBinutils < Formula + desc "GNU Binutils for aarch64-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_tahoe: "700c2d2ce4189b280b2bafa0cfb373391e5e171a514dad37a2b2565a33fd3b9e" + sha256 arm64_sequoia: "555d443f33c1fe479481a48d61bffb0be295b89e75c378d53a4052747030e18a" + sha256 arm64_sonoma: "4d77f3e9d17697880181ea56ed7d931dd3be1a3c9e4ed3c501cbeb7ac18b1769" + sha256 arm64_ventura: "2c700e06335b4c282fc7605367a1da70f71daa9b52057c20ada64d2fac6cdce8" + sha256 sonoma: "be78db6eeaf1dccbd64555553078e278c4607eef88ef3a5289b3a5905b378856" + sha256 ventura: "895227b5d0ea3997bce325b5d5b25c847a3faf807b31b73298ae254ef0da711f" + sha256 arm64_linux: "ed34e104bc3f039f84e3f55cedde122b6a968141a614f4437dd720f9f08c5cce" + sha256 x86_64_linux: "c7d674b57892d51fbc3c5010609fa3fab69572d8efbc66403b936c94dab1da44" + end + + depends_on "pkgconf" => :build + depends_on "zstd" + + uses_from_macos "zlib" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "aarch64-elf" + system "./configure", "--target=#{target}", + "--prefix=#{prefix}", + "--libdir=#{lib}/#{target}", + "--infodir=#{info}/#{target}", + "--with-system-zlib", + "--with-zstd", + "--disable-nls" + system "make" + system "make", "install" + end + + test do + (testpath/"test-s.s").write <<~ASM + .section .text + .globl _start + _start: + mov x0, #0 + mov x16, #1 + svc #0x80 + ASM + system bin/"aarch64-elf-as", "-o", "test-s.o", "test-s.s" + assert_match "file format elf64-littleaarch64", + shell_output("#{bin}/aarch64-elf-objdump -a test-s.o") + assert_match "f()", shell_output("#{bin}/aarch64-elf-c++filt _Z1fv") + end +end diff --git a/Formula/a/aarch64-elf-gcc.rb b/Formula/a/aarch64-elf-gcc.rb new file mode 100644 index 0000000000000..56b3298e4bab5 --- /dev/null +++ b/Formula/a/aarch64-elf-gcc.rb @@ -0,0 +1,71 @@ +class Aarch64ElfGcc < Formula + desc "GNU compiler collection for aarch64-elf" + homepage "https://gcc.gnu.org" + url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + mirror "https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_tahoe: "6b143ee35830f3cafa970d17d063cc1ca6c9ddd1e0e8be53fc9c736cb6b093b0" + sha256 arm64_sequoia: "84c76461cca4e1e88ca11ab1a25319f3688d8b8687c18de0131f970fdbcf9cc3" + sha256 arm64_sonoma: "30169f8be9da11b9da508bb9149035e79decf4acfe85e7073e79220a8d7cc3f0" + sha256 arm64_ventura: "b1ce1405c117b7af21c7f3d7aae0d09fc461a736133c7893f162d74e523177f8" + sha256 sonoma: "ba627e18b1d928e4df9a05c7e865f2e99ebdf58413a771323036d828091f8e68" + sha256 ventura: "72262b703d74775bf3f319aaadab659322f7c94f1b83210fa1ce4d31bf21f35b" + sha256 arm64_linux: "6575f0e5e5408f293992aa5e0f728c2d902411cab9c0f1310152ee732314e429" + sha256 x86_64_linux: "1a04adeee3439a7bb9c9cc881853f1445697531304ab3a42f9e2d127ca398ff1" + end + + depends_on "aarch64-elf-binutils" + depends_on "gmp" + depends_on "isl" + depends_on "libmpc" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + target = "aarch64-elf" + mkdir "aarch64-elf-gcc-build" do + system "../configure", "--target=#{target}", + "--prefix=#{prefix}", + "--infodir=#{info}/#{target}", + "--disable-nls", + "--without-headers", + "--with-as=#{Formula["aarch64-elf-binutils"].bin}/aarch64-elf-as", + "--with-ld=#{Formula["aarch64-elf-binutils"].bin}/aarch64-elf-ld", + "--enable-languages=c,c++,objc,lto", + "--enable-lto", + "--with-system-zlib", + "--with-zstd", + *std_configure_args + system "make", "all-gcc" + system "make", "install-gcc" + system "make", "all-target-libgcc" + system "make", "install-target-libgcc" + + # FSF-related man pages may conflict with native gcc + rm_r(share/"man/man7") + end + end + + test do + (testpath/"test-c.c").write <<~C + int main(void) + { + int i=0; + while(i<10) i++; + return i; + } + C + system bin/"aarch64-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" + assert_match "file format elf64-littleaarch64", + shell_output("#{Formula["aarch64-elf-binutils"].bin}/aarch64-elf-objdump -a test-c.o") + end +end diff --git a/Formula/a/aarch64-elf-gdb.rb b/Formula/a/aarch64-elf-gdb.rb new file mode 100644 index 0000000000000..e08844a3fa7a9 --- /dev/null +++ b/Formula/a/aarch64-elf-gdb.rb @@ -0,0 +1,86 @@ +class Aarch64ElfGdb < Formula + desc "GNU debugger for aarch64-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + sha256 "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5" + license "GPL-3.0-or-later" + head "https://sourceware.org/git/binutils-gdb.git", branch: "master" + + livecheck do + formula "gdb" + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "908f6d0471ea78fcc62b6808afb9f64838af2eb387bd5f354c73fae4a1e0cc86" + sha256 arm64_sequoia: "7e30fff7745a0e820e446526efff7ef2a9e1f61d5e5c53221ced69f3e3dbf7f9" + sha256 arm64_sonoma: "401182ec5660cbab09c6a55ea69d07f20df46eb0dbae3317345e28e31951c894" + sha256 sonoma: "b13a43c6056721b21bd7c071d05920d96d7494ff596d0d6b9ba5657569d8d533" + sha256 arm64_linux: "e6133be397ab031bd4bcafe5cd2f843455a25d7ec852e78cd3983f820c0157ee" + sha256 x86_64_linux: "5e3431d1fef809c31595bdc6cfefcb0fc5d24ca12aa9c8661151ee546a9a1e6d" + end + + depends_on "pkgconf" => :build + depends_on "aarch64-elf-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "ncurses" # https://github.com/Homebrew/homebrew-core/issues/224294 + depends_on "python@3.14" + depends_on "readline" + depends_on "xz" # required for lzma support + depends_on "zstd" + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "zlib" + + # Workaround for https://github.com/Homebrew/brew/issues/19315 + on_sequoia :or_newer do + on_intel do + depends_on "expat" + end + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "aarch64-elf" + args = %W[ + --target=#{target} + --datarootdir=#{share}/#{target} + --includedir=#{include}/#{target} + --infodir=#{info}/#{target} + --mandir=#{man} + --disable-binutils + --disable-nls + --enable-tui + --with-curses + --with-expat + --with-lzma + --with-python=#{which("python3.14")} + --with-system-readline + --with-system-zlib + --with-zstd + ] + + mkdir "build" do + system "../configure", *args, *std_configure_args + ENV.deparallelize # Error: common/version.c-stamp.tmp: No such file or directory + system "make" + + # Don't install bfd or opcodes, as they are provided by binutils + system "make", "install-gdb" + end + end + + test do + (testpath/"test.c").write "void _start(void) {}" + system "#{Formula["aarch64-elf-gcc"].bin}/aarch64-elf-gcc", "-g", "-nostdlib", "test.c" + assert_match "Symbol \"_start\" is a function at address 0x", + shell_output("#{bin}/aarch64-elf-gdb -batch -ex 'info address _start' a.out") + end +end diff --git a/Formula/a/ab-av1.rb b/Formula/a/ab-av1.rb new file mode 100644 index 0000000000000..d1a365bd64228 --- /dev/null +++ b/Formula/a/ab-av1.rb @@ -0,0 +1,41 @@ +class AbAv1 < Formula + desc "AV1 re-encoding using ffmpeg, svt-av1 & vmaf" + homepage "https://github.com/alexheretic/ab-av1" + url "https://github.com/alexheretic/ab-av1/archive/refs/tags/v0.10.1.tar.gz" + sha256 "837c3016f6eeca3ea174bdaffcc9bb29cc4917a05f43367579b8b0d7bf68db15" + license "MIT" + head "https://github.com/alexheretic/ab-av1.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "82ff422a8078b3f8a55e1f824df2a443549d85980c3d8cf5a395bdf2d6d2d631" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "054d32abb5e30883eba42437e7601f94b610c07fadfb3f843bb8a356cd4ff499" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93f75abbb34e3f11dc8b0102517d5a9769abf26e384ce0aa59904ecb5c78894f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8da4a26639bf8f8adca062321bbcae7452b0953801ddc89153bd06113452c921" + sha256 cellar: :any_skip_relocation, sonoma: "3cc6fffb9863658595610461339b5e5a07fe4f8b3531f7e058442213d803b286" + sha256 cellar: :any_skip_relocation, ventura: "1c58bf1d5408deffa4bdf5f1adb0de0cbfec33429d926efd9f4838fad5dcdbcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "2aefe876ee0c4dadad0ab3307481d6f62e6d4f91a1d1ce93baa5b6a23329fbcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "070168c14a60daebc173c5f5ad49a8ecc1b0a81c38fef8c0ea601abf6ff60e2f" + end + + depends_on "rust" => :build + depends_on "ffmpeg" + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"ab-av1", "print-completions") + end + + test do + resource "sample-mp4" do + url "https://download.samplelib.com/mp4/sample-5s.mp4" + sha256 "05bd857af7f70bf51b6aac1144046973bf3325c9101a554bc27dc9607dbbd8f5" + end + + assert_match "ab-av1 #{version}", shell_output("#{bin}/ab-av1 --version") + + resource("sample-mp4").stage testpath + system bin/"ab-av1", "auto-encode", "-i", testpath/"sample-5s.mp4" + assert_path_exists testpath/"sample-5s.av1.mp4" + end +end diff --git a/Formula/a/abcde.rb b/Formula/a/abcde.rb new file mode 100644 index 0000000000000..5c73ed2fc8293 --- /dev/null +++ b/Formula/a/abcde.rb @@ -0,0 +1,80 @@ +class Abcde < Formula + desc "Better CD Encoder" + homepage "https://abcde.einval.com" + url "https://abcde.einval.com/download/abcde-2.9.3.tar.gz" + sha256 "046cd0bba78dd4bbdcbcf82fe625865c60df35a005482de13a6699c5a3b83124" + license "GPL-2.0-or-later" + revision 1 + head "https://git.einval.com/git/abcde.git", branch: "master" + + livecheck do + url "https://abcde.einval.com/download/" + regex(/href=.*?abcde[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "580cb0f7c45b342dbdfac94e4fe3a2dc6db572409e212d963b22fba20a002423" + sha256 cellar: :any, arm64_sequoia: "48c8a99c5cf28e44096fe46c62f5dc826a90282769b895fb50807cca0f5383b0" + sha256 cellar: :any, arm64_sonoma: "5e728aa1561686b5cfb5fe14f2fec3f4a106a7403a9ccaee4c9fd3c1eca530e1" + sha256 cellar: :any, arm64_ventura: "dedb7cfd40ab62f591ee97a8da975fe570cc2af675e4a488e3895976bfbf4f96" + sha256 cellar: :any, arm64_monterey: "41d225802703a6ae7adeb3044e41e36402e2e98517aebe4567852e3bd3e4f12e" + sha256 cellar: :any, arm64_big_sur: "4240ff000419b4ca9c0d275d70fccb10255ea17718906768892ba3a2d7ecb444" + sha256 cellar: :any, sonoma: "44f6deddfdf79f2bed8c3f44f0dbbc22bd6631c0b29db815ffa685f7b026aace" + sha256 cellar: :any, ventura: "a0b33bf4a03961de5a66dcd612634e6098fca485bdec229ec5853787e1951d1f" + sha256 cellar: :any, monterey: "1108a67a9a2046cf987daa49ef63a8ce8b1dd8b011463cd7594fb13e0aee190b" + sha256 cellar: :any, big_sur: "c9668232e677e92b51210a0563c2156f030837b1fb221de60d16c83c466620b2" + sha256 cellar: :any, catalina: "fa00c7fc4b6b4ab794439f619ba00961358a4e5684a0ae2412fbd78ba2497df1" + sha256 cellar: :any_skip_relocation, arm64_linux: "16b246ffcc1d24acb0aba75e1ba6995535470fc90b0992746bd38e3f2aa10243" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93e3d734fe73f1ca3edeab8e4f25794a28acbdde6df9f3ffd7d01b2e16ce31a2" + end + + depends_on "pkgconf" => :build + + depends_on "cdrtools" + depends_on "eye-d3" + depends_on "flac" + depends_on "glyr" + depends_on "lame" + depends_on "libdiscid" + depends_on "mkcue" + depends_on "perl" + depends_on "vorbis-tools" + + resource "MusicBrainz::DiscID" do + url "https://cpan.metacpan.org/authors/id/N/NJ/NJH/MusicBrainz-DiscID-0.06.tar.gz" + sha256 "ba0b6ed09897ff563ba59872ee93715bef37157515b19b7c6d6f286e6548ecab" + end + + resource "WebService::MusicBrainz" do + url "https://cpan.metacpan.org/authors/id/B/BF/BFAIST/WebService-MusicBrainz-1.0.5.tar.gz" + sha256 "523b839968206c5751ea9ee670c7892c8c3be0f593aa591a00c0315468d09099" + end + + resource "Mojo::Base" do + url "https://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-8.64.tar.gz" + sha256 "547a2c592e30ab5f22e42af9a84982b5cd699553f51226b6ed9524b4b7f4b24d" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + inreplace "abcde-musicbrainz-tool", "#!/usr/bin/perl", "#!/usr/bin/env perl" + + system "make", "install", "prefix=#{prefix}", "sysconfdir=#{etc}" + + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/abcde -v") + end +end diff --git a/Formula/a/abcl.rb b/Formula/a/abcl.rb new file mode 100644 index 0000000000000..25a05da64ba4a --- /dev/null +++ b/Formula/a/abcl.rb @@ -0,0 +1,55 @@ +class Abcl < Formula + desc "Armed Bear Common Lisp: a full implementation of Common Lisp" + # upstream bug report about site issue, https://github.com/armedbear/abcl/issues/711 + homepage "https://github.com/armedbear/abcl" + url "https://deb.debian.org/debian/pool/main/a/abcl/abcl_1.9.2.orig.tar.gz" + mirror "https://abcl.org/releases/1.9.2/abcl-src-1.9.2.tar.gz" + sha256 "4e2f4b8f85e2d95d95e5bdbcd9fa17ad6131a17e2fcf12bc19ffb97b48bc1d38" + license "GPL-2.0-or-later" => { + with: "Classpath-exception-2.0", + } + head "https://abcl.org/svn/trunk/abcl/", using: :svn + + livecheck do + url "https://deb.debian.org/debian/pool/main/a/abcl/" + regex(/href=.*?abcl[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3231aead5669b78ca3b23ad314c5bc1135178182fcab8ec84da66ecdef470350" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3b54e12b38b7736c33fe43c677c4d396337617e4f0647a2d5522bde43e31fc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6cde97a77b73cdec4bb00bbec261b1486d8f742e50e166edd4b64a65b5c725dd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71c365f98413ab1f6e6e88a59dfd662e975855b8583e04b4945e1c0900eb2f85" + sha256 cellar: :any_skip_relocation, arm64_monterey: "820338d8d274276e466d84616bfb820f181b30dee53860f38bd3b737c542e301" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f0e7ee7fc02acb7e4e81debdaefece5fa62eb5129eca94247b4f53628766c104" + sha256 cellar: :any_skip_relocation, sonoma: "87fc8d8c17166264571f39ab53428c48246cef454f31a2a631ac50a68606e82e" + sha256 cellar: :any_skip_relocation, ventura: "682505e8bf32bcd1c89bab05bee6563ef541cdcee8cb563ad0b9a37e3777aa39" + sha256 cellar: :any_skip_relocation, monterey: "923b22698e40554a1920f55c4657153a236e3a3dad6a48266f84ec740dbba6ee" + sha256 cellar: :any_skip_relocation, big_sur: "d8a077488cce7889466e0cd135e9c83d5d6c1425d7b3f794d9ed863ed6c70056" + sha256 cellar: :any_skip_relocation, arm64_linux: "996a3421c3c9543e959914c14736756e4a9f4c30bbf77eb45db1ae8f7756a21c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "461c7a8fe2a872e92ff82e19767b6b80cb69cb6985676ef751dc169fc05737ab" + end + + depends_on "ant" + depends_on "openjdk" + depends_on "rlwrap" + + def install + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + + system "ant", "abcl.properties.autoconfigure.openjdk.8" + system "ant" + + libexec.install "dist/abcl.jar", "dist/abcl-contrib.jar" + (bin/"abcl").write_env_script "rlwrap", + "java -cp #{libexec}/abcl.jar:\"$CLASSPATH\" org.armedbear.lisp.Main", + Language::Java.overridable_java_home_env + end + + test do + (testpath/"test.lisp").write "(print \"Homebrew\")\n(quit)" + assert_match(/"Homebrew"$/, shell_output("#{bin}/abcl --load test.lisp").strip) + end +end diff --git a/Formula/a/abcm2ps.rb b/Formula/a/abcm2ps.rb new file mode 100644 index 0000000000000..4df47d2893e5c --- /dev/null +++ b/Formula/a/abcm2ps.rb @@ -0,0 +1,58 @@ +class Abcm2ps < Formula + desc "ABC music notation software" + homepage "http://moinejf.free.fr" + url "https://chiselapp.com/user/moinejf/repository/abcm2ps/tarball/v8.14.17/download.tar.gz" + sha256 "61df2c53f932b9dbce57e1c6c4ff5be6e69ca2162317a7c3e61297befa40aeaa" + license "GPL-3.0-or-later" + + livecheck do + url "https://chiselapp.com/user/moinejf/repository/abcm2ps/taglist" + regex(%r{"tagDsp">v?(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "009998c0673285fe186b142ba9dfdf7e6da03baa621fed30626e0c208526e9a5" + sha256 arm64_sequoia: "3d17a30a50dec0a222b5affc869944133110d26183456da63dd0e53ed05dced0" + sha256 arm64_sonoma: "1285f979079ab7e11a7b9695ca1a50e558bd1e98ea77fc7b0eade685bd339e78" + sha256 arm64_ventura: "b1904fe9f5fb66c73cba6bf1988afdc0a86ba846972738e649a2c9b1c1e6268d" + sha256 sonoma: "e89ffe353ec57c1e6203ea927ad2234bac3cd90b49daba91bec849cc29acbb24" + sha256 ventura: "c7d963e4b54d64a7277ea51e0f9c52b6d522b24affbdd70b4820a7e2dba88eda" + sha256 arm64_linux: "1d02bfb62f29fc77d202476f9848e39520045d0b495b215859c3bfe294388fc8" + sha256 x86_64_linux: "f68c9955212b1f0ece80488663bb67ba04dfca697c6c417f339caa2a625c2413" + end + + depends_on "pkgconf" => :build + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"voices.abc").write <<~ABC + X:7 + T:Qui Tolis (Trio) + C:Andre Raison + M:3/4 + L:1/4 + Q:1/4=92 + %%staves {(Pos1 Pos2) Trompette} + K:F + % + V:Pos1 + %%MIDI program 78 + "Positif"x3 |x3|c'>ba|Pga/g/f|:g2a |ba2 |g2c- |c2P=B |c>de |fga | + V:Pos2 + %%MIDI program 78 + Mf>ed|cd/c/B|PA2d |ef/e/d |:e2f |ef2 |c>BA |GA/G/F |E>FG |ABc- | + V:Trompette + %%MIDI program 56 + "Trompette"z3|z3 |z3 |z3 |:Mc>BA|PGA/G/F|PE>EF|PEF/E/D|C>CPB,|A,G,F,-| + ABC + + system bin/"abcm2ps", testpath/"voices" + assert_path_exists testpath/"Out.ps" + end +end diff --git a/Formula/a/abcmidi.rb b/Formula/a/abcmidi.rb new file mode 100644 index 0000000000000..bebd4af4e982f --- /dev/null +++ b/Formula/a/abcmidi.rb @@ -0,0 +1,51 @@ +class Abcmidi < Formula + desc "Converts abc music notation files to MIDI files" + homepage "https://ifdo.ca/~seymour/runabc/top.html" + url "https://ifdo.ca/~seymour/runabc/abcMIDI-2025.06.27.zip" + sha256 "617b4e8b2cb4608677627e2b04998d0ff252e95d63d8694b1b763376c9b6c8cd" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?abcMIDI[._-]v?(\d{4}(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7fa5c7986446c5fc14f2bd670207e61491badfd2aff1f728628cea4d048079e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bacbedeb4f65551a9c7008d5cc482e8ec645c4fff54fa8785c71cebf510abeb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "12183fd273d8cea05c6e7e683bbf060bf8751f3e0a6f74453167afdfe1a82333" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e18860b3130c1fd2c13187fcece0e17e05c700e01096a1c190c6bd6f225401cd" + sha256 cellar: :any_skip_relocation, sonoma: "a77a8696a94d1d5eda7f0132e51c6abd411d95927f34e3a24d27ae964a84cb2b" + sha256 cellar: :any_skip_relocation, ventura: "67a6fe2788a02a49e045c6574d545c05fc09ff68be4fb48034694c600029896f" + sha256 cellar: :any_skip_relocation, arm64_linux: "d085029a820b547f1fee7b9729c2ebd1a42b643731e361ea49588dc86d1e4112" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1383c9dd85d4e213bf849e1808789f036d89b80524f6be7e22187ed0aeb73aed" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"balk.abc").write <<~EOS + X: 1 + T: Abdala + F: https://www.youtube.com/watch?v=YMf8yXaQDiQ + L: 1/8 + M: 2/4 + K:Cm + Q:1/4=180 + %%MIDI bassprog 32 % 32 Acoustic Bass + %%MIDI program 23 % 23 Tango Accordion + %%MIDI bassvol 69 + %%MIDI gchord fzfz + |:"G"FDEC|D2C=B,|C2=B,2 |C2D2 |\ + FDEC |D2C=B,|C2=B,2 |A,2G,2 :| + |:=B,CDE |D2C=B,|C2=B,2 |C2D2 |\ + =B,CDE |D2C=B,|C2=B,2 |A,2G,2 :| + |:C2=B,2 |A,2G,2| C2=B,2|A,2G,2 :| + EOS + + system bin/"abc2midi", testpath/"balk.abc" + end +end diff --git a/Formula/a/abduco.rb b/Formula/a/abduco.rb new file mode 100644 index 0000000000000..1ea8c4a30e597 --- /dev/null +++ b/Formula/a/abduco.rb @@ -0,0 +1,37 @@ +class Abduco < Formula + desc "Provides session management: i.e. separate programs from terminals" + homepage "https://www.brain-dump.org/projects/abduco/" + url "https://github.com/martanne/abduco/releases/download/v0.6/abduco-0.6.tar.gz" + sha256 "c90909e13fa95770b5afc3b59f311b3d3d2fdfae23f9569fa4f96a3e192a35f4" + license "ISC" + head "https://github.com/martanne/abduco.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c2c4bcd34f6b83f1a2b3a04e223b7eab8b29d6a39043127f422f59d7c38c7e6e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "216c0c4a4ac3e537b0846cb998b36ea986de0d42fb3b2c50b0dfdd4da38a7418" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6db16f93fb69cad1e8ef83fcbe67783e9dce80f5cf2e36caa56b85d81cf3938b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b07ab80b2d588ae9ed65d615b8e4f12bf04b8e86eec0ffd407a4955aef9a2dba" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f3e01e687a45b2458311702b5b48b8d3bb8d681388cacc85e7fb26d0be6b7720" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e261303a69440aa46e09bfc3be3b7fb0c5cb6b2a3f6fbeb94338491a8538a90a" + sha256 cellar: :any_skip_relocation, sonoma: "e4fe0b940ecf7445830a525f829bc2f2b3bf358947117ca93642336a21ff2090" + sha256 cellar: :any_skip_relocation, ventura: "cec640c52bce7b9d63223b949ad4e30a96cb1acc58c8f95ab5017104cd41aac6" + sha256 cellar: :any_skip_relocation, monterey: "8c9d9c494114dfcb8c231d5823afa980bd0b7a1d055c30ea7b60a9e4d7a92878" + sha256 cellar: :any_skip_relocation, big_sur: "a010ab98531eaafdb9d35a7f2ca6a0583b6566be603f95b721f41e1037eafacb" + sha256 cellar: :any_skip_relocation, catalina: "6d78f6c36e0933f3c55bc96d4ca5c0e4e24030598702423ed752130721e7b8dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e84ed7e82b55ae643f46c6b81488e55535269cb37a95e7eec87a06b60f66427" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2129c6039968a818f71997e800575b581128b56f8783eeb32c990f8a5e8b81ad" + end + + def install + ENV.append_to_cflags "-D_DARWIN_C_SOURCE" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + result = shell_output("#{bin}/abduco -v") + result.force_encoding("UTF-8") if result.respond_to?(:force_encoding) + assert_match(/^abduco-#{version}/, result) + end +end diff --git a/Formula/a/abi-compliance-checker.rb b/Formula/a/abi-compliance-checker.rb new file mode 100644 index 0000000000000..d66268f5a5c97 --- /dev/null +++ b/Formula/a/abi-compliance-checker.rb @@ -0,0 +1,67 @@ +class AbiComplianceChecker < Formula + desc "Tool for checking backward API/ABI compatibility of a C/C++ library" + homepage "https://lvc.github.io/abi-compliance-checker/" + url "https://github.com/lvc/abi-compliance-checker/archive/refs/tags/2.3.tar.gz" + sha256 "b1e32a484211ec05d7f265ab4d2c1c52dcdb610708cb3f74d8aaeb7fe9685d64" + license "LGPL-2.1-or-later" + head "https://github.com/lvc/abi-compliance-checker.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "06af34b7632a01e00b3d6d5ad826d4102e7a840e32b4a0a0bc2a58c3fc799cef" + end + + deprecate! date: "2024-06-05", because: :unmaintained + disable! date: "2025-06-21", because: :unmaintained + + uses_from_macos "perl" + + on_macos do + # abi-compliance-checker can read only x86_64 Mach-O files. + # https://github.com/lvc/abi-compliance-checker/issues/116 + depends_on arch: :x86_64 + depends_on "gcc" + end + + on_linux do + depends_on "universal-ctags" + end + + def install + system "perl", "Makefile.pl", "-install", "-prefix", prefix + (bin/"abi-compliance-checker.cmd").unlink if OS.mac? + + # Make bottles uniform + inreplace pkgshare/"modules/Internals/SysFiles.pm", "/usr/local", HOMEBREW_PREFIX + end + + test do + args = [] + args << "--gcc-path=gcc-#{Formula["gcc"].any_installed_version.major}" if OS.mac? + system bin/"abi-compliance-checker", *args, "-test" + + (testpath/"foo.c").write "int foo(void) { return 0; }" + (testpath/"include/foo.h").write "int foo(void);" + (testpath/"lib").mkpath + + system ENV.cc, "-shared", "foo.c", "-o", testpath/"lib"/shared_library("libfoo", "1.0") + system ENV.cc, "-shared", "foo.c", "-o", testpath/"lib"/shared_library("libfoo", "2.0") + + [1, 2].each do |v| + (testpath/"foo.#{v}.xml").write <<~XML + + #{v}.0 + + + #{testpath}/include/ + + + #{testpath}/lib/ + + XML + end + + system bin/"abi-compliance-checker", *args, "-lib", "foo", "-old", "foo.1.xml", "-new", "foo.2.xml" + assert_path_exists testpath/"compat_reports/foo/1.0_to_2.0/compat_report.html" + end +end diff --git a/Formula/a/abi-dumper.rb b/Formula/a/abi-dumper.rb new file mode 100644 index 0000000000000..f52eb044ba4f2 --- /dev/null +++ b/Formula/a/abi-dumper.rb @@ -0,0 +1,36 @@ +class AbiDumper < Formula + desc "Dump ABI of an ELF object containing DWARF debug info" + homepage "https://github.com/lvc/abi-dumper" + url "https://github.com/lvc/abi-dumper/archive/refs/tags/1.2.tar.gz" + sha256 "8a9858c91b4e9222c89b676d59422053ad560fa005a39443053568049bd4d27e" + license "LGPL-2.1-or-later" + head "https://github.com/lvc/abi-dumper.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "dfe5724c38317949620260b45f44131625434adb3ba62f2b4c778f7f87c409e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e69d56bf0f10ea4b9f0bea25e8a860823ff0f08846cea20ca1212f06b9d09b5" + end + + deprecate! date: "2024-06-05", because: :unmaintained + disable! date: "2025-06-21", because: :unmaintained + + depends_on "abi-compliance-checker" + depends_on "elfutils" + depends_on :linux + depends_on "universal-ctags" + depends_on "vtable-dumper" + + def install + # We pass `--program-prefix=elfutils-` when building `elfutils`. + inreplace "abi-dumper.pl", "eu-readelf", "elfutils-readelf" + system "make", "prefix=#{prefix}", "install" + end + + test do + testlib = testpath/shared_library("libtest") + (testpath/"test.c").write "int foo() { return 0; }" + system ENV.cc, "-g", "-Og", "-shared", "test.c", "-o", testlib + system bin/"abi-dumper", testlib, "-o", "test.dump" + assert_path_exists testpath/"test.dump" + end +end diff --git a/Formula/a/abi3audit.rb b/Formula/a/abi3audit.rb new file mode 100644 index 0000000000000..9a29ea43f114f --- /dev/null +++ b/Formula/a/abi3audit.rb @@ -0,0 +1,129 @@ +class Abi3audit < Formula + include Language::Python::Virtualenv + + desc "Scans Python packages for abi3 violations and inconsistencies" + homepage "https://github.com/pypa/abi3audit" + url "https://files.pythonhosted.org/packages/3f/c4/c87c370ba5c9e0821da2946bb8fd6ccf95c1c2869ef78368702d932e17ff/abi3audit-0.0.22.tar.gz" + sha256 "60d2c7a0556e98316a5a0e18e3b232e3b047011353762126d7af0db5a7f10da0" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "661504bff33cd05d8e3e4044704567955dc8c15675039e5bde4ee67e6793be0e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "certifi" + depends_on "python@3.14" + + on_linux do + depends_on "rust" => :build + end + + pypi_packages exclude_packages: "certifi" + + resource "abi3info" do + url "https://files.pythonhosted.org/packages/da/48/ec0cb606d072dbefd7d83930030f8ee499927bd11df213e53c76655b0367/abi3info-2025.4.29.tar.gz" + sha256 "00733a73532cbf6f41e78549dc959a2110fce6e33d207a31c1ec653fa4be3b20" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "cattrs" do + url "https://files.pythonhosted.org/packages/e3/42/988b3a667967e9d2d32346e7ed7edee540ef1cee829b53ef80aa8d4a0222/cattrs-25.2.0.tar.gz" + sha256 "f46c918e955db0177be6aa559068390f71988e877c603ae2e56c71827165cc06" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "kaitaistruct" do + url "https://files.pythonhosted.org/packages/54/04/dd60b9cb65d580ef6cb6eaee975ad1bdd22d46a3f51b07a1e0606710ea88/kaitaistruct-0.10.tar.gz" + sha256 "a044dee29173d6afbacf27bcac39daf89b654dd418cfa009ab82d9178a9ae52a" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pefile" do + url "https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz" + sha256 "3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz" + sha256 "ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/b9/ab/33968940b2deb3d92f5b146bc6d4009a5f95d1d06c148ea2f9ee965071af/pyelftools-0.32.tar.gz" + sha256 "6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-cache" do + url "https://files.pythonhosted.org/packages/1a/be/7b2a95a9e7a7c3e774e43d067c51244e61dea8b120ae2deff7089a93fb2b/requests_cache-1.2.1.tar.gz" + sha256 "68abc986fdc5b8d0911318fbb5f7c80eebcd4d01bfacc6685ecf8876052511d1" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fe/75/af448d8e52bf1d8fa6a9d089ca6c07ff4453d86c65c145d0a300bb073b9b/rich-14.1.0.tar.gz" + sha256 "e497a48b844b0320d45007cdebfeaeed8db2a4f4bcf49f15e455cfc4af11eaa8" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "url-normalize" do + url "https://files.pythonhosted.org/packages/80/31/febb777441e5fcdaacb4522316bf2a527c44551430a4873b052d545e3279/url_normalize-2.2.1.tar.gz" + sha256 "74a540a3b6eba1d95bdc610c24f2c0141639f3ba903501e61a52a8730247ff37" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/abi3audit sip 2>&1", 1) + assert_match(/sip: \d+ extensions scanned; \d+ ABI version mismatches and \d+ ABI\s+violations found/, output) + end +end diff --git a/Formula/a/abnfgen.rb b/Formula/a/abnfgen.rb new file mode 100644 index 0000000000000..63e1ef1562e10 --- /dev/null +++ b/Formula/a/abnfgen.rb @@ -0,0 +1,41 @@ +class Abnfgen < Formula + desc "Quickly generate random documents that match an ABFN grammar" + homepage "https://www.quut.com/abnfgen/" + url "https://www.quut.com/abnfgen/abnfgen-0.21.tar.gz" + sha256 "5bf784e6010b4b67e38fa18632b7e2b221c1a7a43a0907be0379a4909f5e536e" + license :cannot_represent + + livecheck do + url :homepage + regex(%r{href=.*?/abnfgen[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eab87d7376a80c7f80ea531c0d416ffd17c8382339891c38158763e67cab67e3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2396295b6a6b0952355321d37830f2a2f42b2b2deda9a7ec9162d7f224f0c98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ebbd726f391652bf3bd3c84107de75d1302ec42551c7355f9760c416915e2291" + sha256 cellar: :any_skip_relocation, arm64_ventura: "77649fae7599272e9602a0b31d1c821f4f09b364d9e782a146a27bc961066194" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dbb853413b291a12a931c32fe4698d1e97f263c70ea9635875afcdf2bf3a63d8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "907493c609cdd60994448826e9adf685fd8048bb24e3dbea2db7440871d3dd2a" + sha256 cellar: :any_skip_relocation, sonoma: "cdae00cf074d6a865aa7ec7854d6e3fde32756f8398aff1312b3bdc176cc6393" + sha256 cellar: :any_skip_relocation, ventura: "575c3555e7ba9555741886bd51dec912ba229d99f00461f0fa8e5bfcb1953e62" + sha256 cellar: :any_skip_relocation, monterey: "aabd22f0c8be1bfdb787b8ca17c303350ac9d726df2cb6ee2b760972c8fa6b1d" + sha256 cellar: :any_skip_relocation, big_sur: "d26f4e4456ba543aa9b54b8950d26cdd91b7f64e1f40e5b67d4266463f3f9aeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d3524e2008a5cb3a6c5248cdddc948d023a0e1781246862c0035d7a3cbf6bbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76f35d17e3a1bad80de9ef0c2fb654882619b43a70f00cc23293b7d63c3fc513" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + (testpath/"grammar").write 'ring = 1*12("ding" SP) "dong" CRLF' + system bin/"abnfgen", (testpath/"grammar") + end +end diff --git a/Formula/a/abook.rb b/Formula/a/abook.rb new file mode 100644 index 0000000000000..80216c9e434f8 --- /dev/null +++ b/Formula/a/abook.rb @@ -0,0 +1,69 @@ +class Abook < Formula + desc "Address book with mutt support" + homepage "https://abook.sourceforge.io/" + license all_of: [ + "GPL-3.0-only", + "GPL-2.0-or-later", # mbswidth.c + "LGPL-2.0-or-later", # getopt.c + "BSD-2-Clause", # xmalloc.c + "BSD-4.3RENO", # ldif.c + ] + head "https://git.code.sf.net/p/abook/git.git", branch: "master" + + stable do + url "https://git.code.sf.net/p/abook/git.git", + tag: "ver_0_6_2", + revision: "a243d4a18a64f4ee188191a797b34f60d4ff852f" + + # Backport include from https://sourceforge.net/p/abook/git/ci/39484721c44629fb1f54d92f09c92ef4c3201302/ + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4179f858a3406d98bbf021e5a431cf064b6430839a4210643925af38a9c037af" + sha256 arm64_sequoia: "b0113dcc3ee161e37ed8c9fbdab0175486bf04c3a5e802b46dde3b015fe67cac" + sha256 arm64_sonoma: "bbdac04e9da720845e5ee41ba19af9541a62d953c4c9929170400c84dcad3e32" + sha256 arm64_ventura: "7ac157f6847b43e07454da28ffefc1911c891c1a7d642d3ad31d7d12166ee42b" + sha256 sonoma: "aaa8b661464c11cc8329a8b9da48ff5088df6b5e556eded5f32970c441858626" + sha256 ventura: "192d1342a247240817e4a4235341eeb440c79d042ec092dbc784015fb346efa4" + sha256 arm64_linux: "643aa6b526a1b5c3d01a072633e346efa165c3c5ed2804a5ed516cce7d1b5ac9" + sha256 x86_64_linux: "20347763d0c3ac3e729619fcf98b65e72f0931ddd7ca55d51f2c26d62e1f5147" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "readline" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"abook", "--formats" + end +end + +__END__ +diff --git a/database.c b/database.c +index 384223e..eb9b4b0 100644 +--- a/database.c ++++ b/database.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif diff --git a/Formula/a/abpoa.rb b/Formula/a/abpoa.rb new file mode 100644 index 0000000000000..aca6662c3a19a --- /dev/null +++ b/Formula/a/abpoa.rb @@ -0,0 +1,31 @@ +class Abpoa < Formula + desc "SIMD-based C library for fast partial order alignment using adaptive band" + homepage "https://github.com/yangao07/abPOA" + url "https://github.com/yangao07/abPOA/releases/download/v1.5.5/abPOA-v1.5.5.tar.gz" + sha256 "2e2919dcadbc6713a6e248514e2d9e9cb93c53c5b36dd953a2909ad2e3fa6349" + license "MIT" + head "https://github.com/yangao07/abPOA.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "193726357f31962a176b28e7616fe993acd775b286359c63d6224973c1c939ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "689ef67875138bd5e8726b3c6a169fb56878057b07e861062e664c03d4cd7770" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe22809a4dbd7882b8dd3d2d7ce5d556ef59b7b1f9e4c9811b94579c116c4614" + sha256 cellar: :any_skip_relocation, sonoma: "c21b07d695aec084a6b9e64ed5deff172907dbaeaa494b6ddf7dbc3ed41638d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "d12ebfc06f1359e96e7975e73832cbcaaadfa7b636df4e90bc7fbd78c52f0a79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "215a8929dea50b7fff307c3950aaaf658ad29a303d8172fe0d24c375b6599e5e" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "bin/abpoa" + pkgshare.install "test_data" + end + + test do + assert_match version.to_s, shell_output("#{bin}/abpoa --version") + cp_r pkgshare/"test_data/.", testpath + assert_match ">Consensus_sequence", shell_output("#{bin}/abpoa seq.fa") + end +end diff --git a/Formula/a/abricate.rb b/Formula/a/abricate.rb new file mode 100644 index 0000000000000..a7152f7832d63 --- /dev/null +++ b/Formula/a/abricate.rb @@ -0,0 +1,182 @@ +class Abricate < Formula + desc "Find antimicrobial resistance and virulence genes in contigs" + homepage "https://github.com/tseemann/abricate" + url "https://github.com/tseemann/abricate/archive/refs/tags/v1.0.1.tar.gz" + sha256 "5edc6b45a0ff73dcb4f1489a64cb3385d065a6f29185406197379522226a5d20" + license "GPL-2.0-only" + revision 3 + head "https://github.com/tseemann/abricate.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fcb7a6a43e558cea2253ef0d00cdb5344d7569844f3d9bab441c7095ac45beba" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e7f6393112a6a35dce42b72269577f9a625cb161185fc24075afc326e057ad7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35e1dff52eb0bf1df021f9fa7cfe0e1a09df089e6bfc4af6c87e07a0f52db655" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a1019399ae72e1e4b793e287b92c2b000b6680f44c60faa2aa63e61683fae70c" + sha256 cellar: :any_skip_relocation, sonoma: "f72cb3d2b9f6d42fe8ff2ff6c72d9dab66d5e7a5f867ae384ae06f2477c8e53c" + sha256 cellar: :any_skip_relocation, ventura: "e64a514eafd58745186e9302e4a5fa0d9da4eb9e686ff15ec3fa53c29b9b3a3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6862ba41484e2752fbfa93c339fd12a691f164f5342a7864b8af2e786cbbe23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ccff5939400556b14677e73e48b33f8794781a62ed6df468bef9d240ecaffb4" + end + + depends_on "bioperl" + depends_on "blast" + depends_on "perl" + + uses_from_macos "unzip" + + resource "any2fasta" do + url "https://raw.githubusercontent.com/tseemann/any2fasta/v0.4.2/any2fasta" + sha256 "ed20e895c7a94d246163267d56fce99ab0de48784ddda2b3bf1246aa296bf249" + end + + # Perl dependencies originally installed via cpanminus. + # For `JSON Path::Tiny List::MoreUtils LWP::Simple` and dependencies. + resource "JSON" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" + sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + end + + resource "Path::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.144.tar.gz" + sha256 "f6ea094ece845c952a02c2789332579354de8d410a707f9b7045bd241206487d" + end + + resource "List::MoreUtils::XS" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-XS-0.430.tar.gz" + sha256 "e8ce46d57c179eecd8758293e9400ff300aaf20fefe0a9d15b9fe2302b9cb242" + end + + resource "Exporter::Tiny" do + url "https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-1.006002.tar.gz" + sha256 "6f295e2cbffb1dbc15bdb9dadc341671c1e0cd2bdf2d312b17526273c322638d" + end + + resource "List::MoreUtils" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0.430.tar.gz" + sha256 "63b1f7842cd42d9b538d1e34e0330de5ff1559e4c2737342506418276f646527" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/S/SI/SIMBABQUE/URI-5.19.tar.gz" + sha256 "8fed5f819905c8a8e18f4447034322d042c3536b43c13ac1f09ba92e1a50a394" + end + + resource "LWP::MediaTypes" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz" + sha256 "8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9" + end + + resource "Encode::Locale" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz" + sha256 "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1" + end + + resource "Time::Zone" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz" + sha256 "c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2" + end + + resource "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.05.tar.gz" + sha256 "365d6294dfbd37ebc51def8b65b81eb79b3934ecbc95a2ec2d4d827efe6a922b" + end + + resource "IO::HTML" do + url "https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-1.004.tar.gz" + sha256 "c87b2df59463bbf2c39596773dfb5c03bde0f7e1051af339f963f58c1cbd8bf5" + end + + resource "HTTP::Request" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.44.tar.gz" + sha256 "398b647bf45aa972f432ec0111f6617742ba32fc773c6612d21f64ab4eacbca1" + end + + resource "HTML::Tagset" do + url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz" + sha256 "adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2" + end + + resource "HTML::HeadParser" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.81.tar.gz" + sha256 "c0910a5c8f92f8817edd06ccfd224ba1c2ebe8c10f551f032587a1fc83d62ff2" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + end + + resource "HTTP::Cookies" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.10.tar.gz" + sha256 "e36f36633c5ce6b5e4b876ffcf74787cc5efe0736dd7f487bdd73c14f0bd7007" + end + + resource "File::Listing" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.15.tar.gz" + sha256 "46c4fb9f9eb9635805e26b7ea55b54455e47302758a10ed2a0b92f392713770c" + end + + resource "WWW::RobotRules" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz" + sha256 "46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e" + end + + resource "HTTP::Negotiate" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz" + sha256 "1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016" + end + + resource "Net::HTTP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.23.tar.gz" + sha256 "0d65c09dd6c8589b2ae1118174d3c1a61703b6ecfc14a3442a8c74af65e0c94e" + end + + resource "LWP::Simple" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.71.tar.gz" + sha256 "9d852d92c1f087d838adcb4107c4ff69887e7e5bdb742f984639c4c18dddb6e7" + end + + resource "Clone" do + url "https://cpan.metacpan.org/authors/id/G/GA/GARU/Clone-0.46.tar.gz" + sha256 "aadeed5e4c8bd6bbdf68c0dd0066cb513e16ab9e5b4382dc4a0aafd55890697b" + end + + def install + resource("any2fasta").stage do + bin.install "any2fasta" + end + + ENV.prepend_path "PERL5LIB", Formula["bioperl"].opt_libexec/"lib/perl5" + ENV.prepend_create_path "PERL5LIB", libexec/"perl5/lib/perl5" + ENV["PERL_MM_USE_DEFAULT"] = "1" + + resources.each do |r| + next if r.name == "any2fasta" + + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}/perl5" + system "make", "install" + end + end + + libexec.install Dir["*"] + %w[abricate abricate-get_db].each do |name| + (bin/name).write_env_script("#{libexec}/bin/#{name}", PERL5LIB: ENV["PERL5LIB"]) + end + end + + def post_install + system bin/"abricate", "--setupdb" + end + + test do + assert_match "resfinder", shell_output("#{bin}/abricate --list 2>&1") + assert_match "--db", shell_output("#{bin}/abricate --help") + assert_match "OK", shell_output("#{bin}/abricate --check 2>&1") + assert_match "download", shell_output("#{bin}/abricate-get_db --help 2>&1") + cp_r libexec/"test", testpath + assert_match "penicillinase repressor BlaI", shell_output("#{bin}/abricate --fofn test/fofn.txt") + end +end diff --git a/Formula/a/abseil.rb b/Formula/a/abseil.rb new file mode 100644 index 0000000000000..b88684975fb31 --- /dev/null +++ b/Formula/a/abseil.rb @@ -0,0 +1,73 @@ +class Abseil < Formula + desc "C++ Common Libraries" + homepage "https://abseil.io" + url "https://github.com/abseil/abseil-cpp/archive/refs/tags/20250814.1.tar.gz" + sha256 "1692f77d1739bacf3f94337188b78583cf09bab7e420d2dc6c5605a4f86785a1" + license "Apache-2.0" + head "https://github.com/abseil/abseil-cpp.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "a420c5f258edbae66fd2f5ac17320d46fd1e9e884f1cbb7cb23c9711e46d67f8" + sha256 arm64_sequoia: "fc8915867a2ee9678dc1603c12d4b69e4c88fc5e5e4d71b44b1279e7a598bcc1" + sha256 arm64_sonoma: "327300ffe635b76ee159dafd5cdc48f5a6ff9757673673b75d8a86ed6ca08475" + sha256 cellar: :any, sonoma: "15a4561cad35249b0f19cb876e874e4a8d892e287267985c24a47cb6835ec66d" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd2d71f5e2f747eda4d887d3d841ae87f6d1e02d337ae635f54c1444daacc6bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f1d2a133d4f0273361ac12b4b9286ce855a53914dbdd2d85b095efe779f62a1" + end + + depends_on "cmake" => [:build, :test] + depends_on "googletest" => :build # For test helpers + + def install + ENV.runtime_cpu_detection + + # Install test helpers. + extra_cmake_args = %w[ABSL_BUILD_TEST_HELPERS ABSL_USE_EXTERNAL_GOOGLETEST ABSL_FIND_GOOGLETEST].map do |arg| + "-D#{arg}=ON" + end + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_CXX_STANDARD=17", + "-DBUILD_SHARED_LIBS=ON", + "-DABSL_PROPAGATE_CXX_STD=ON", + "-DABSL_ENABLE_INSTALL=ON", + *extra_cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"hello_world.cc").write <<~CPP + #include + #include + #include + #include "absl/strings/str_join.h" + + int main() { + std::vector v = {"foo","bar","baz"}; + std::string s = absl::StrJoin(v, "-"); + + std::cout << "Joined string: " << s << "\\n"; + } + CPP + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.16) + + project(my_project) + + # Abseil requires C++14 + set(CMAKE_CXX_STANDARD 14) + + find_package(absl REQUIRED) + + add_executable(hello_world hello_world.cc) + + # Declare dependency on the absl::strings library + target_link_libraries(hello_world absl::strings) + CMAKE + system "cmake", testpath + system "cmake", "--build", testpath, "--target", "hello_world" + assert_equal "Joined string: foo-bar-baz\n", shell_output("#{testpath}/hello_world") + end +end diff --git a/Formula/a/abyss.rb b/Formula/a/abyss.rb new file mode 100644 index 0000000000000..190cfb91a0545 --- /dev/null +++ b/Formula/a/abyss.rb @@ -0,0 +1,74 @@ +class Abyss < Formula + desc "Genome sequence assembler for short reads" + homepage "https://www.bcgsc.ca/resources/software/abyss" + url "https://github.com/bcgsc/abyss/releases/download/2.3.10/abyss-2.3.10.tar.gz" + sha256 "bbe42e00d1ebb53ec6afaad07779baaaee994aa5c65b9a38cf4ad2011bb93c65" + license all_of: ["GPL-3.0-only", "LGPL-2.1-or-later", "MIT", "BSD-3-Clause"] + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "274f0f758f4cc8852779e2a55f8900ea34ccf7dd0e784396752f03c7e6c56767" + sha256 cellar: :any, arm64_sequoia: "156d580ae0392d7045dd60c744d4a1a32206a950c86588cb25aa600dedd0e8ae" + sha256 cellar: :any, arm64_sonoma: "61982df06da982cf2f7edca391a61f935cb3c1542d165f1ed69f60a33b4a6031" + sha256 cellar: :any, sonoma: "cd3d743d197a92d98b4cd43a45615de53d5cc403a36ac9e41cdf6e47ce7aee44" + sha256 cellar: :any_skip_relocation, arm64_linux: "57e42e8b368589c943fa3bd23e3c8f8a5af03b307530c445309dc45a72e2d2d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7b36e68d3d7b88d89656707fd50185e8649d31bac5359575f160dc875c1d28f" + end + + head do + url "https://github.com/bcgsc/abyss.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "multimarkdown" => :build + end + + depends_on "boost" => :build + depends_on "google-sparsehash" => :build + depends_on "btllib" + depends_on "open-mpi" + + uses_from_macos "sqlite" + + on_macos do + depends_on "libomp" + end + + def install + # Help link to libomp on macOS + ENV["ac_cv_prog_cxx_openmp"] = "-Xpreprocessor -fopenmp -lomp" if OS.mac? + + args = %W[ + --disable-silent-rules + --enable-maxk=128 + --with-boost=#{Formula["boost"].include} + --with-btllib=#{Formula["btllib"].prefix} + --with-mpi=#{Formula["open-mpi"].prefix} + --with-sparsehash=#{Formula["google-sparsehash"].prefix} + ] + system "./autogen.sh" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + resource "homebrew-testdata" do + url "https://www.bcgsc.ca/sites/default/files/bioinformatics/software/abyss/releases/1.3.4/test-data.tar.gz" + sha256 "28f8592203daf2d7c3b90887f9344ea54fda39451464a306ef0226224e5f4f0e" + end + + testpath.install resource("homebrew-testdata") + if which("column") + system bin/"abyss-pe", "B=2G", "k=25", "name=ts", "in=reads1.fastq reads2.fastq" + else + # Fix error: abyss-tabtomd: column: not found + system bin/"abyss-pe", "B=2G", "unitigs", "scaffolds", "k=25", "name=ts", "in=reads1.fastq reads2.fastq" + end + system bin/"abyss-fac", "ts-unitigs.fa" + end +end diff --git a/Formula/a/access.rb b/Formula/a/access.rb new file mode 100644 index 0000000000000..c642de01e8306 --- /dev/null +++ b/Formula/a/access.rb @@ -0,0 +1,48 @@ +class Access < Formula + desc "Easiest way to request and grant access without leaving your terminal" + homepage "https://indent.com" + url "https://github.com/indentapis/access.git", + tag: "v0.10.13", + revision: "b315c75e461e0a0cc0978960a80ba352ea8ff85a" + license "Apache-2.0" + head "https://github.com/indentapis/access.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe5ecb27d29092ac09bb50bd585479b665da864053c9cb838dc6684d60c88b44" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "747d33dad01a56760cb4d3934856b7a1f591e61d01ab14c4ddd6064a6ecf3329" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d72d19172c369f06e75b592c6638f321d4037212c1133e92f6a77338c4bb91d8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d72d19172c369f06e75b592c6638f321d4037212c1133e92f6a77338c4bb91d8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d72d19172c369f06e75b592c6638f321d4037212c1133e92f6a77338c4bb91d8" + sha256 cellar: :any_skip_relocation, sonoma: "bc6b359a800445b5a4ebbd0af9fcace65e3649321e19e86a9ef0fd86216e8ca3" + sha256 cellar: :any_skip_relocation, ventura: "07d21cbdb98e62015a0268c4fc4d95df3c3c08a3b894f28e88709830d815698d" + sha256 cellar: :any_skip_relocation, monterey: "07d21cbdb98e62015a0268c4fc4d95df3c3c08a3b894f28e88709830d815698d" + sha256 cellar: :any_skip_relocation, big_sur: "07d21cbdb98e62015a0268c4fc4d95df3c3c08a3b894f28e88709830d815698d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a79bf2d2657b530ea0d6a6d2e56f209419ade6d3250ae506db41d000a72d9ca" + end + + # service sunset notice, https://web.archive.org/web/20240707220001/https://indent.com/ + deprecate! date: "2024-07-07", because: :unmaintained + disable! date: "2025-07-07", because: :unmaintained + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.GitVersion=#{Utils.git_head} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/access" + + # Install shell completions + generate_completions_from_executable(bin/"access", "completion") + end + + test do + test_file = testpath/"access.yaml" + touch test_file + system bin/"access", "config", "set", "space", "some-space" + assert_equal "space: some-space", test_file.read.strip + end +end diff --git a/Formula/a/ace.rb b/Formula/a/ace.rb new file mode 100644 index 0000000000000..e87c1bf00a0bf --- /dev/null +++ b/Formula/a/ace.rb @@ -0,0 +1,57 @@ +class Ace < Formula + desc "ADAPTIVE Communication Environment: OO network programming in C++" + homepage "https://www.dre.vanderbilt.edu/~schmidt/ACE.html" + url "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-8_0_5/ACE+TAO-8.0.5.tar.bz2" + sha256 "1f539d4be5a50791ea45d53f0aa71eb07383a12715c7f56487318172ab48d743" + license "DOC" + + livecheck do + url :stable + regex(/^ACE(?:\+[A-Z]+)*?[._-]v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "723cf89b58d2a47670cd669057004a59a38969aeb94e73710d95f3ba7db75876" + sha256 cellar: :any, arm64_sequoia: "d341e47e245341bf21821888a94c2fba6882f9fc08109bde313b196cd5a2980d" + sha256 cellar: :any, arm64_sonoma: "4278aadca8ec160df5b9a7767cb846260dbc8cbe34191f6194100cf9216c5a57" + sha256 cellar: :any, arm64_ventura: "60335363ff4ce8c51f6463ce517993522f751d830d3ec7f3afc1eeee726d3455" + sha256 cellar: :any, sonoma: "6f746eb61a1f47f3bafc23f51d5f45ef2833e6aac7fee4ac2f6fecd7fb0464a2" + sha256 cellar: :any, ventura: "86573e39966f22e0b8f0ac7fb2496737b97c65e06caff805cd2d5872ed80f33b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b2e800d881a976ecf0882c2d3d5de3fffd5a6e777770ae4f5e6cedc651ee7a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32e0c9ff8192c7d4165d88e3cf86663de57f33b18d76ca0d76ed0e8dfe7eda68" + end + + def install + os = OS.mac? ? "macosx" : "linux" + ln_sf "config-#{os}.h", "ace/config.h" + ln_sf "platform_#{os}.GNU", "include/makeinclude/platform_macros.GNU" + + ENV["ACE_ROOT"] = buildpath + ENV["DYLD_LIBRARY_PATH"] = "#{buildpath}/lib" + + # Done! We go ahead and build. + system "make", "-C", "ace", "-f", "GNUmakefile.ACE", + "INSTALL_PREFIX=#{prefix}", + "LDFLAGS=", + "DESTDIR=", + "INST_DIR=/ace", + "debug=0", + "shared_libs=1", + "static_libs=0", + "install" + + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}" if OS.mac? + system "make", "-C", "examples/Log_Msg" + pkgshare.install "examples" + end + + test do + cp_r "#{pkgshare}/examples/Log_Msg/.", testpath + system "./test_callback" + end +end diff --git a/Formula/a/aces_container.rb b/Formula/a/aces_container.rb new file mode 100644 index 0000000000000..c21cec49112a9 --- /dev/null +++ b/Formula/a/aces_container.rb @@ -0,0 +1,54 @@ +class AcesContainer < Formula + desc "Reference implementation of SMPTE ST2065-4" + homepage "https://github.com/ampas/aces_container" + url "https://github.com/ampas/aces_container/archive/refs/tags/v1.0.2.tar.gz" + sha256 "cbbba395d2425251263e4ae05c4829319a3e399a0aee70df2eb9efb6a8afdbae" + license "AMPAS" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "99edd15fca4a15e40dfac78586b15c5c86fb13ae9d05024f837fc7b28aa7abde" + sha256 cellar: :any, arm64_sequoia: "470a323cfa40f185682a38aa7ecb04256cebf17b0b854e444cb89d02c09c7d0c" + sha256 cellar: :any, arm64_sonoma: "93e409e911279df2bdf9c910341e1ba17a64aff066b042a51eba8894bf1bfea9" + sha256 cellar: :any, arm64_ventura: "15fd9fe1558e49d54f45bdd8b7dc124bca31732212fe502d48be8d0ba716997e" + sha256 cellar: :any, arm64_monterey: "2f2429a4ee7fdb7d58ee635a6d653f799d1f22ec9dddabab6b3b7e5d4d06b5de" + sha256 cellar: :any, arm64_big_sur: "0d1d573d700561a2cc168c20f2de1dd752553f142575c64c8b3235cfb2dc6133" + sha256 cellar: :any, sonoma: "6a201930c698e76ae0ee1d705d4de5504a524770999dbc6044a0dc093f819e92" + sha256 cellar: :any, ventura: "411b910c990eb426a348c74ed2e7f40a46fba871b56314f3b2ea311f8a220ee6" + sha256 cellar: :any, monterey: "86a5c8b346d870672b1e2af38be9f1c20b561e4f46f92dbd8f9e2b3d617cd0f9" + sha256 cellar: :any, big_sur: "ab9e2e475f4b03c4d2ff8ecfb31f1254d862dcadb2baf8d76d143fd4ef8c74ee" + sha256 cellar: :any, catalina: "26cfdcca70d0fb62834376bfbda89af0acd57f0173a4a3c9bd0f77adf748c8b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "2db09e9407396d6028ca3f4d5753568fddf26fb066608453da5ccbc09fcf1763" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b73f4e399a8e1e405f0f0fc0c3e514e52a22abe17b8e518868074c118cd1116a" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-c++11-narrowing" if DevelopmentTools.clang_build_version >= 1403 + + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "aces/aces_Writer.h" + + int main() + { + aces_Writer x; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lAcesContainer", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/ack.rb b/Formula/a/ack.rb new file mode 100644 index 0000000000000..f096267b6aeba --- /dev/null +++ b/Formula/a/ack.rb @@ -0,0 +1,66 @@ +class Ack < Formula + desc "Search tool like grep, but optimized for programmers" + homepage "https://beyondgrep.com/" + url "https://beyondgrep.com/ack-v3.9.0" + sha256 "b8916abc9d42ebe8cc82264e047ccff5cbc976401e32a3dc6fc01c551c0cb5f8" + license "Artistic-2.0" + + livecheck do + url "https://beyondgrep.com/install/" + regex(/href=.*?ack[._-]v?(\d+(?:\.\d+)+)["' >]/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8d040693538ad8d489770cf4186a47364fc2bbe4d47e863c491b863e04b4df30" + end + + head do + url "https://github.com/beyondgrep/ack3.git", branch: "dev" + + resource "File::Next" do + url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/File-Next-1.16.tar.gz" + sha256 "6965f25c2c132d0ba7a6f72b57b8bc6d25cf8c1b7032caa3a9bda8612e41d759" + end + end + + depends_on "pod2man" => :build + + uses_from_macos "perl" + + def install + if build.head? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + + resource("File::Next").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + + system "perl", "Makefile.PL", "DESTDIR=#{buildpath}" + system "make" + + libexec.install "ack" + chmod 0755, libexec/"ack" + (libexec/"lib").install "blib/lib/App" + (bin/"ack").write_env_script("#{libexec}/ack", PERL5LIB: ENV["PERL5LIB"]) + man1.install "blib/man1/ack.1" + else + bin.install "ack-v#{version.to_s.tr("-", "_")}" => "ack" + system "#{Formula["pod2man"].opt_bin}/pod2man", bin/"ack", "ack.1", "--release=ack v#{version}" + man1.install "ack.1" + end + end + + def post_install + # FIXME: keg relocation breaks the shebang, so we unbreak it here. + # See https://github.com/Homebrew/brew/issues/20023 + # We need `audit_result: false` because this replacement only needs to be done when poured from an `:all` bottle. + inreplace bin/"ack", "#!#{Formula["perl"].opt_bin}/perl", "#!/usr/bin/env perl", audit_result: false + end + + test do + assert_equal "foo bar\n", pipe_output("#{bin}/ack --noenv --nocolor bar -", "foo\nfoo bar\nbaz", 0) + end +end diff --git a/Formula/a/acl.rb b/Formula/a/acl.rb new file mode 100644 index 0000000000000..44cf28035e174 --- /dev/null +++ b/Formula/a/acl.rb @@ -0,0 +1,78 @@ +class Acl < Formula + desc "Commands for manipulating POSIX access control lists" + homepage "https://savannah.nongnu.org/projects/acl/" + url "https://download.savannah.nongnu.org/releases/acl/acl-2.3.2.tar.gz" + sha256 "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url "https://download.savannah.nongnu.org/releases/acl/" + regex(/href=.*?acl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_linux: "df5af5425e87eda102251eacdf2a56622bfbda1b285441d438186d471cbd4cb7" + sha256 x86_64_linux: "65c9042358cb23a7510fb0a52f938e5b4e48d32c1a19c756165c6c814dd5146e" + end + + depends_on "attr" => :build + depends_on :linux + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + assert_equal "getfacl #{version}", shell_output("#{bin}/getfacl --version").chomp + + touch testpath/"test.txt" + chmod 0654, testpath/"test.txt" + assert_equal <<~EOS, shell_output("#{bin}/getfacl --omit-header test.txt").chomp + user::rw- + group::r-x + other::r-- + EOS + + user = ENV["USER"] + system bin/"setfacl", "--modify=u:#{user}:x", "test.txt" + assert_equal <<~EOS, shell_output("#{bin}/getfacl --omit-header test.txt").chomp + user::rw- + user:#{user}:--x + group::r-x + mask::r-x + other::r-- + EOS + + system bin/"chacl", "u::rwx,g::rw-,o::r-x", "test.txt" + assert_equal <<~EOS, shell_output("#{bin}/getfacl --omit-header test.txt").chomp + user::rwx + group::rw- + other::r-x + EOS + + (testpath/"test.c").write <<~C + #include + #include + + int main() { + acl_t acl = acl_get_file("test.txt", ACL_TYPE_ACCESS); + if (acl == NULL) return 1; + char* acl_text = acl_to_text(acl, NULL); + acl_free(acl); + printf("%s\\n", acl_text); + acl_free(acl_text); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lacl" + assert_equal <<~EOS, shell_output("./test").chomp + user::rwx + group::rw- + other::r-x + EOS + end +end diff --git a/Formula/a/acl2.rb b/Formula/a/acl2.rb new file mode 100644 index 0000000000000..3cf2a500e28f3 --- /dev/null +++ b/Formula/a/acl2.rb @@ -0,0 +1,50 @@ +class Acl2 < Formula + desc "Logic and programming language in which you can model computer systems" + homepage "https://www.cs.utexas.edu/~moore/acl2/" + url "https://github.com/acl2/acl2/archive/refs/tags/8.6.tar.gz" + sha256 "c2d73e66422901b3cc2a6f5a9ab50f5f3b1b4060cf9dc9148d076f3a8b957cf9" + license "BSD-3-Clause" + revision 13 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "79f4d9fcd79ff956c2b698d4a0d1400506a9c83a032b3b675f67382c2e2ad805" + sha256 arm64_sequoia: "dcb4361aebe67010a2b772fa08b00d05dce7f44e342101da07ce04fe3b4d41ed" + sha256 arm64_sonoma: "238c9edf710d6c268f15b57b0da402f900618c562df34d359e5727e95a03d4c6" + sha256 sonoma: "465e7552071a28adb773e85803c29193614d27fa020783e0a758d4fc1b7a1a99" + sha256 x86_64_linux: "0ae5f2bf2d53143d05ad171874894656618f1b10b23a2d7c5e43a461351aa6b9" + end + + depends_on "sbcl" + + def install + # Remove prebuilt binaries + rm([ + "books/kestrel/axe/x86/examples/popcount/popcount-macho-64.executable", + "books/kestrel/axe/x86/examples/factorial/factorial.macho64", + "books/kestrel/axe/x86/examples/tea/tea.macho64", + ]) + + # Move files and then build to avoid saving build directory in files + libexec.install Dir["*"] + + sbcl = Formula["sbcl"].opt_bin/"sbcl" + system "make", "-C", libexec, "all", "basic", "LISP=#{sbcl}", "USE_QUICKLISP=0" + system "make", "-C", libexec, "all", "basic", "LISP=#{sbcl}", "USE_QUICKLISP=0", "ACL2_PAR=p" + + ["acl2", "acl2p"].each do |acl2| + inreplace libexec/"saved_#{acl2}", Formula["sbcl"].prefix.realpath, Formula["sbcl"].opt_prefix + (bin/acl2).write_env_script libexec/"saved_#{acl2}", ACL2_SYSTEM_BOOKS: "#{libexec}/books" + end + end + + test do + (testpath/"simple.lisp").write "(+ 2 2)" + output = shell_output("#{bin}/acl2 < #{testpath}/simple.lisp | grep 'ACL2 !>'") + assert_equal "ACL2 !>4\nACL2 !>Bye.", output.strip + end +end diff --git a/Formula/a/acme.rb b/Formula/a/acme.rb new file mode 100644 index 0000000000000..1e7c459ef9506 --- /dev/null +++ b/Formula/a/acme.rb @@ -0,0 +1,49 @@ +class Acme < Formula + desc "Crossassembler for multiple environments" + homepage "https://sourceforge.net/projects/acme-crossass/" + url "https://svn.code.sf.net/p/acme-crossass/code-0/trunk", revision: "266" + version "0.97" + license "GPL-2.0-or-later" + + livecheck do + url "https://sourceforge.net/p/acme-crossass/code-0/HEAD/tree/trunk/docs/Changes.txt?format=raw" + regex(/New in release v?(\d+(?:\.\d+)+)/i) + strategy :page_match + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f603308c41ccb1f3b81bef2ffccc7a3ec09b797133abb5d41f9574a95411f73b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "789ffc7764ec07db6142518896bff4aa1940980929b977fabb084ef12d1d4ea7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c48aa0b38e6597799d22ec3c0ad8c8868c753918a92adb4f60ab7f9eabe945b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f8b137715ebc611f81b2e49445396488a26a0240a7e9fe24f8fb897aecf964f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2c56301699b1c2419655c5fac5e5a1c16767729d7a4afa9560231ecdd60972d5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "eed2df7b934a52ca875e02a7b89588ac602cfa0cfbde0e795bbcdaff72bb5201" + sha256 cellar: :any_skip_relocation, sonoma: "9075f4b6b9cc0869c5a800d6b35aaa92f66f6964495545ae7a4f742fd3d50940" + sha256 cellar: :any_skip_relocation, ventura: "4de66d662e3631ae88f197b7b28045407b929d05d5d844cc7f3569696df7078a" + sha256 cellar: :any_skip_relocation, monterey: "057df491fd1784cad46df8397ddd2cb972c256d094b5849731899bd03163184a" + sha256 cellar: :any_skip_relocation, big_sur: "7890b8c1a32b202ab913553d534db373de3d61bb274a564fb9304cd4de043736" + sha256 cellar: :any_skip_relocation, catalina: "54080f9a08a3f958c5a024fd536c2308c392521a4a4092afb115f368b3256fd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "743dda54569b1514edf7632a1d62b7f93b44324cdb91d2520a10f27edd3236e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcb14a109abee4d1af24a79bc4991a851a6b1b75fd64999e815715fc54a4c834" + end + + def install + system "make", "-C", "src", "install", "BINDIR=#{bin}" + doc.install Dir["docs/*"] + end + + test do + path = testpath/"a.asm" + path.write <<~ASM + !to "a.out", cbm + * = $c000 + jmp $fce2 + ASM + + system bin/"acme", path + code = File.open(testpath/"a.out", "rb") { |f| f.read.unpack("C*") } + assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code + end +end diff --git a/Formula/a/acme.sh.rb b/Formula/a/acme.sh.rb new file mode 100644 index 0000000000000..3efedbe55fefc --- /dev/null +++ b/Formula/a/acme.sh.rb @@ -0,0 +1,40 @@ +class AcmeSh < Formula + desc "ACME client" + homepage "https://github.com/acmesh-official/acme.sh" + url "https://github.com/acmesh-official/acme.sh/archive/refs/tags/3.1.1.tar.gz" + sha256 "c5d623ac0af400e83cd676aefaf045228f60e9fc597fea5db4c3a5bd7f6bfcf4" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d00192c5ed57c194866906887b7407562b52c191d0db0df2462dfb31b46db3c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d00192c5ed57c194866906887b7407562b52c191d0db0df2462dfb31b46db3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d00192c5ed57c194866906887b7407562b52c191d0db0df2462dfb31b46db3c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6d00192c5ed57c194866906887b7407562b52c191d0db0df2462dfb31b46db3c" + sha256 cellar: :any_skip_relocation, sonoma: "2dea65246401fb500e1cdee17b5ddf2b9b06079d736e1de9d4082464b3fbe5d1" + sha256 cellar: :any_skip_relocation, ventura: "2dea65246401fb500e1cdee17b5ddf2b9b06079d736e1de9d4082464b3fbe5d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d00192c5ed57c194866906887b7407562b52c191d0db0df2462dfb31b46db3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d00192c5ed57c194866906887b7407562b52c191d0db0df2462dfb31b46db3c" + end + + def install + libexec.install [ + "acme.sh", + "deploy", + "dnsapi", + "notify", + ] + + bin.install_symlink libexec/"acme.sh" + end + + test do + assert_match version.to_s, shell_output("#{bin}/acme.sh --version") + + expected = if OS.mac? + "Main_Domain KeyLength SAN_Domains CA Created Renew\n" + else + "Main_Domain\tKeyLength\tSAN_Domains\tCA\tCreated\tRenew\n" + end + assert_match expected, shell_output("#{bin}/acme.sh --list") + end +end diff --git a/Formula/a/acpica.rb b/Formula/a/acpica.rb new file mode 100644 index 0000000000000..88593ed0c8627 --- /dev/null +++ b/Formula/a/acpica.rb @@ -0,0 +1,41 @@ +class Acpica < Formula + desc "OS-independent implementation of the ACPI specification" + homepage "https://github.com/acpica/acpica" + url "https://github.com/acpica/acpica/releases/download/20250807/acpica-unix2-20250807.tar.gz" + sha256 "a3df5eb6b21324075d6aff9b1743e200fba5a1b21f35686c2d2b4466b2df6886" + license any_of: ["Intel-ACPI", "GPL-2.0-only", "BSD-3-Clause"] + head "https://github.com/acpica/acpica.git", branch: "master" + + livecheck do + url "https://www.intel.com/content/www/us/en/download/776303/acpi-component-architecture-downloads-unix-format-source-code-and-build-environment-with-an-intel-license.html" + regex(/href=.*?acpica-unix[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d4272d5885464a91f2d73d4fd40572cd1119dd3433d14181aaf148b4c1a3676c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6f32cc9b31ebe6e473306036117315a4bc227380cebe27fe439d79ad10885aba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9d39e58cdf4e911d1b3db8ce1b967ac592c219fb4d089eacbf30386112a3e9ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a484f87cc8f909f8fcd4ff3bdaca228e4f5417ba0436f7e4275047da7d4986e" + sha256 cellar: :any_skip_relocation, sonoma: "68e1a5a0237c94a34ab064ce828faa9c074cf1328ed26dc151c93b0a688bfd2a" + sha256 cellar: :any_skip_relocation, ventura: "bb5e24b60b08d46aaf15de390cf5edb74225b0f5b8b60ffe7c0f3648671c2287" + sha256 cellar: :any_skip_relocation, arm64_linux: "31b5ad741d331ec60b502e9c0f57e8a7ae96a30091ad630802f89b2f33c8c685" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d97900731e708343c719eed7cf25d66cc6c345dc0122a6a32e3b0de4c878d838" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "m4" => :build + + def install + # ACPI_PACKED_POINTERS_NOT_SUPPORTED: + # https://github.com/acpica/acpica/issues/781#issuecomment-1718084901 + system "make", "PREFIX=#{prefix}", "OPT_CFLAGS=\"-DACPI_PACKED_POINTERS_NOT_SUPPORTED\"" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"acpihelp", "-u" + end +end diff --git a/Formula/a/acronym.rb b/Formula/a/acronym.rb new file mode 100644 index 0000000000000..8f67eeb7611b9 --- /dev/null +++ b/Formula/a/acronym.rb @@ -0,0 +1,89 @@ +class Acronym < Formula + include Language::Python::Virtualenv + + desc "Python-based tool for creating English-ish acronyms from your fancy project" + homepage "https://github.com/bacook17/acronym" + url "https://files.pythonhosted.org/packages/e3/1a/1a364f93053f9ad0d4f38b5c0078637db484bb4c1388ad0234b85c9d2ca8/acronym-2.0.0.tar.gz" + sha256 "163cc1630b7c65cbca6426f80e267f5253ea787e17a329d1d55517868897bbf1" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "28f9d722ad4f7ca4cac9b84faf09f19536bebc7e4fe17887cc1666eac6281f47" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f0bf7427caeeb3f33476658bd69bbfebd547df49c90db6a328ebabbbf7b7a78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "527bcd0322a0b731e280b2f75905a19bccd0e14490123f6f3b57709105eb993d" + sha256 cellar: :any_skip_relocation, sonoma: "0a745d5f44b5fb3d34c850e7d391a19c1e938631cf381b10c5374ae8b29524d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "9bfabc3eda08a2f8f3c38ccba43b2cc1d34be7cd0ac0880485f5dcc8c6944ee5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6056bea3ce25ae1105f1de1129a5ca5bbaf133ee2151fd94c841a81062a6fdb5" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "numpy" + depends_on "python@3.14" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: "numpy" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "joblib" do + url "https://files.pythonhosted.org/packages/64/33/60135848598c076ce4b231e1b1895170f45fbcaeaa2c9d5e38b04db70c35/joblib-1.4.2.tar.gz" + sha256 "2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e" + end + + resource "nltk" do + url "https://files.pythonhosted.org/packages/3c/87/db8be88ad32c2d042420b6fd9ffd4a149f9a0d7f0e86b3f543be2eeeedd2/nltk-3.9.1.tar.gz" + sha256 "87d127bd3de4bd89a4f81265e5fa59cb1b199b27440175370f7417d2bc7ae868" + end + + resource "pandas" do + url "https://files.pythonhosted.org/packages/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz" + sha256 "4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/e1/34/943888654477a574a86a98e9896bae89c7aa15078ec29f490fef2f1e5384/tzdata-2024.2.tar.gz" + sha256 "7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "TEMPORAL", shell_output("#{bin}/acronym 'The missing package manager for macOS (or Linux)'") + end +end diff --git a/Formula/a/act.rb b/Formula/a/act.rb new file mode 100644 index 0000000000000..81d378a7c7adb --- /dev/null +++ b/Formula/a/act.rb @@ -0,0 +1,46 @@ +class Act < Formula + desc "Run your GitHub Actions locally" + homepage "https://github.com/nektos/act" + url "https://github.com/nektos/act/archive/refs/tags/v0.2.82.tar.gz" + sha256 "9a346d558672a23822f5fbfc020547a2b96ed4945e6c36dc239d9ac545cd64a9" + license "MIT" + head "https://github.com/nektos/act.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a26089eb2a99e0d946d16b5581319d253a00ef0cdf3a300a92773d8056b78054" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84e624a16ab7b533d99ec96dd19216206d3f76a563cb6c37079232b739e4c32b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "31ec069c57b2b6260b6ef975ced230d57cb9a20d2016920cec770cbfb8666fa6" + sha256 cellar: :any_skip_relocation, sonoma: "d09d0a2d827b284c2e6521523c17935f04e13e64632e0ac100d90117872884fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdeeebae1c56adaa150f5f8ce4d736923ef2afd788fab7c90e420a1ad6f240e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "071b914efae08b41bf98e0179c8730f1b1f9e7394180eab49e30368c180fb8d3" + end + + depends_on "go" => :build + + def install + system "make", "build", "VERSION=#{version}" + bin.install "dist/local/act" + end + + test do + (testpath/".actrc").write <<~EOS + -P ubuntu-latest=node:12.6-buster-slim + -P ubuntu-12.04=node:12.6-buster-slim + -P ubuntu-18.04=node:12.6-buster-slim + -P ubuntu-16.04=node:12.6-stretch-slim + EOS + + system "git", "clone", "https://github.com/stefanzweifel/laravel-github-actions-demo.git" + + cd "laravel-github-actions-demo" do + system "git", "checkout", "v2.0" + + pull_request_jobs = shell_output("#{bin}/act pull_request --list") + assert_match "php-cs-fixer", pull_request_jobs + + push_jobs = shell_output("#{bin}/act push --list") + assert_match "phpinsights", push_jobs + assert_match "phpunit", push_jobs + end + end +end diff --git a/Formula/a/act_runner.rb b/Formula/a/act_runner.rb new file mode 100644 index 0000000000000..7025967eadc85 --- /dev/null +++ b/Formula/a/act_runner.rb @@ -0,0 +1,64 @@ +class ActRunner < Formula + desc "Action runner for Gitea based on Gitea's fork of act" + homepage "https://docs.gitea.com/usage/actions/act-runner" + url "https://gitea.com/gitea/act_runner/archive/v0.2.13.tar.gz" + sha256 "69e6fe36ad9e9be188bf6dfe5fd55697eb92ef1aed6396c9a44c1d8e24611176" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2a0cfa9e0ffbab45375a67c81cc5ce165fdfc99317724052adfaa8b11e20c531" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e525763dffbc8e994cb4d45a953a9831c2a55157c0f69594a756f8c430ce91d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e525763dffbc8e994cb4d45a953a9831c2a55157c0f69594a756f8c430ce91d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e525763dffbc8e994cb4d45a953a9831c2a55157c0f69594a756f8c430ce91d" + sha256 cellar: :any_skip_relocation, sonoma: "8180d78844d19ff451c313ecc30965cd7f0a7c5c8fdb5fcee54a95bfd2ed719f" + sha256 cellar: :any_skip_relocation, ventura: "8180d78844d19ff451c313ecc30965cd7f0a7c5c8fdb5fcee54a95bfd2ed719f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0430e7fcdbaec8134f0952177678469a9da4fc497a33f879fd55d5b748ac0a5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "716c0ddb4c00ee04e35141a73c50b74aeecaaa17b9504a5537f1794927f11cce" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X gitea.com/gitea/act_runner/internal/pkg/ver.version=v#{version} + ] + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"act_runner", "completion") + + pkgetc.mkpath + (pkgetc/"config.yaml").write Utils.safe_popen_read(bin/"act_runner", "generate-config") + end + + def post_install + # Create working dir for services + (var/"lib/act_runner").mkpath + end + + def caveats + <<~EOS + Config file: #{pkgetc}/config.yaml + EOS + end + + service do + run [opt_bin/"act_runner", "daemon", "--config", etc/"act_runner/config.yaml"] + keep_alive successful_exit: true + environment_variables PATH: std_service_path_env + + working_dir var/"lib/act_runner" + log_path var/"log/act_runner.log" + error_log_path var/"log/act_runner.err" + end + + test do + assert_match version.to_s, shell_output("#{bin}/act_runner --version") + args = %w[ + --no-interactive + --instance https://gitea.com + --token INVALID_TOKEN + ] + output = shell_output("#{bin}/act_runner register #{args.join(" ")} 2>&1", 1) + assert_match "Error: Failed to register runner", output + end +end diff --git a/Formula/a/action-docs.rb b/Formula/a/action-docs.rb new file mode 100644 index 0000000000000..ed4117e67ac8b --- /dev/null +++ b/Formula/a/action-docs.rb @@ -0,0 +1,45 @@ +class ActionDocs < Formula + desc "Generate docs for GitHub actions" + homepage "https://github.com/npalm/action-docs" + url "https://registry.npmjs.org/action-docs/-/action-docs-2.5.1.tgz" + sha256 "f7d93433a6d3e532b30b3fc068fa263d16f7c38da91422450507b469bd36a64a" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "89a129206e1fd2a3bb48e3f7923ba2bbb98c3533d28332c2511c6ff093807f51" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + test_file = testpath/"action.yml" + test_file.write <<~YAML + --- + name: "Example name" + description: "Example action description" + author: "Example action author" + inputs: + example: + description: "Example input description" + required: false + runs: + using: "composite" + steps: + - id: random-number-generator + run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT + shell: bash + YAML + + output = shell_output("#{bin}/action-docs --source #{test_file}") + assert_match "Example input description", output + + assert_match version.to_s, shell_output("#{bin}/action-docs --version") + end +end diff --git a/Formula/a/action-validator.rb b/Formula/a/action-validator.rb new file mode 100644 index 0000000000000..7abf219d1a756 --- /dev/null +++ b/Formula/a/action-validator.rb @@ -0,0 +1,78 @@ +class ActionValidator < Formula + desc "Tool to validate GitHub Action and Workflow YAML files" + homepage "https://github.com/mpalmer/action-validator" + license "GPL-3.0-only" + + stable do + url "https://github.com/mpalmer/action-validator/archive/refs/tags/v0.8.0.tar.gz" + sha256 "2a75ecde0a5e58b525623db1f270f7d0153e3707d3ad87adee73fd4ef6adeac6" + + # always pull the HEAD commit hash + resource "schemastore" do + url "https://github.com/SchemaStore/schemastore.git", + revision: "d94af770cffaa34559f5279acbcc3a548bb0ea8c" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2fca02f94098fb5318e9cf6a729e498a08788e7d165895f5dddfa321781d606a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c634f2face2954fa059011d97fd132eaa440aa712982913470b009a279384bd5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e382a477d0f3078fd02333b9d333d6ee76405cd318d3c7f983732f0da2ff774" + sha256 cellar: :any_skip_relocation, arm64_ventura: "470f7ae27fb3bce14d1bcdee86558a353eb3fc847fc3e70c2b856177c7c24735" + sha256 cellar: :any_skip_relocation, sonoma: "728921173c7f6ec599d088e865b7db2e85de594dacf69961310b44462d54fc25" + sha256 cellar: :any_skip_relocation, ventura: "a6835560feda32a13dc86443867887fce516f7025cd8045e42de6ba8273047b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0541c834ef9cd4fc192f3babc34741dde6e5c0d428dc4266238a1072e13760de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94e49dda6b381d74167f63da53903bf8a3e7b243d456eeb6d305b91b1ec43d10" + end + + head do + url "https://github.com/mpalmer/action-validator.git", branch: "main" + + resource "schemastore" do + url "https://github.com/SchemaStore/schemastore.git", branch: "master" + end + end + + depends_on "rust" => :build + + def install + ENV["GEN_DIR"] = buildpath + + (buildpath/"src/schemastore").install resource("schemastore") + + system "cargo", "install", *std_cargo_args + end + + test do + test_action = testpath/"action.yml" + test_action.write <<~YAML + name: "Brew Test Action" + description: "Test Action" + inputs: + test: + description: "test input" + default: "brew" + runs: + using: "node20" + main: "index.js" + YAML + + test_workflow = testpath/"workflow.yml" + test_workflow.write <<~YAML + name: "Brew Test Workflow" + on: [push111] + jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + YAML + + output = shell_output("#{bin}/action-validator --verbose #{test_action}") + assert_match "Treating action.yml as an Action definition", output + + output = shell_output("#{bin}/action-validator --verbose #{test_workflow} 2>&1", 1) + assert_match "Fatal error validating #{test_workflow}", output + assert_match "Type of the value is wrong", output + end +end diff --git a/Formula/a/actionlint.rb b/Formula/a/actionlint.rb new file mode 100644 index 0000000000000..a6b4bbf6fd7a7 --- /dev/null +++ b/Formula/a/actionlint.rb @@ -0,0 +1,49 @@ +class Actionlint < Formula + desc "Static checker for GitHub Actions workflow files" + homepage "https://rhysd.github.io/actionlint/" + url "https://github.com/rhysd/actionlint/archive/refs/tags/v1.7.8.tar.gz" + sha256 "1c1e058ed2202e342f474c6ec1a18164cd60473f61163b78a6afb5aff4fac4bc" + license "MIT" + head "https://github.com/rhysd/actionlint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "078ed93bed877dcd668a869e8ab2e17f911477dec9ec5c450942111f39592d60" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "078ed93bed877dcd668a869e8ab2e17f911477dec9ec5c450942111f39592d60" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "078ed93bed877dcd668a869e8ab2e17f911477dec9ec5c450942111f39592d60" + sha256 cellar: :any_skip_relocation, sonoma: "f5e49fed60a5539e4583579d4bb627a616c6f03523704a7f8b8186e49a384c4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f29d4e5e5c3149db1655520d05d87b5218d2aea944b4010b3ce84675c1f2e841" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d50813a23bfd071e6458fd453c6585a3b979289eb321cb538e7a4e3ef29c16b0" + end + + depends_on "go" => :build + depends_on "ronn" => :build + depends_on "shellcheck" + + def install + ldflags = "-s -w -X github.com/rhysd/actionlint.version=#{version}" + # FIXME: we shouldn't need this, but patchelf.rb does not seem to work well with the layout of Aarch64 ELF files + ldflags += " -extld #{ENV.cc}" if OS.linux? && Hardware::CPU.arm? + system "go", "build", *std_go_args(ldflags:), "./cmd/actionlint" + system "ronn", "man/actionlint.1.ronn" + man1.install "man/actionlint.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/actionlint --version 2>&1") + + (testpath/"action.yaml").write <<~YAML + name: Test + on: push + jobs: + test: + permissions: + attestations: write + steps: + - run: actions/checkout@v4 + YAML + + output = shell_output("#{bin}/actionlint #{testpath}/action.yaml", 1) + assert_match "\"runs-on\" section is missing in job", output + refute_match "unknown permission scope", output + end +end diff --git a/Formula/a/actions-batch.rb b/Formula/a/actions-batch.rb new file mode 100644 index 0000000000000..50e4f081a9d07 --- /dev/null +++ b/Formula/a/actions-batch.rb @@ -0,0 +1,43 @@ +class ActionsBatch < Formula + desc "Time-sharing supercomputer built on GitHub Actions" + homepage "https://github.com/alexellis/actions-batch" + url "https://github.com/alexellis/actions-batch/archive/refs/tags/v0.0.3.tar.gz" + sha256 "9290b338e41ff71fb599de9996c64e33a58ec9aa4e8fdd7c4484ec2b085f2160" + license "MIT" + head "https://github.com/alexellis/actions-batch.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "59536a5a9f181ae349d14c6c2b55d6a8e022365f1ae425321e6ceccb43d9f4b5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "275c7fbcf663d2acb91d05bde500b7138a1cb7f5df5f1247c887ca7bbe823019" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c3348aebf7b7b6c6645d01cd1348a976f6225e30a1669d147af6629fc93f131" + sha256 cellar: :any_skip_relocation, arm64_ventura: "30e6fab61cadce4dc40248d1a17884dbfc0595e1ef06108f9375988b1bc87e6c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f199258b2393f9ae2d333e13e38b75fb4913cc3e74eea6625e3b44638159d018" + sha256 cellar: :any_skip_relocation, sonoma: "9105a8d2904a59cb2be1808eb38576c2e9910fbb485b415cf89604f6bce65a43" + sha256 cellar: :any_skip_relocation, ventura: "20bb3b2e0c456933a1af59fc18ea0b528de5cae7e9206a1f65b8cac0ae49a7cb" + sha256 cellar: :any_skip_relocation, monterey: "70c67253a00f5e78afb71eb99933748d8d079466e8e880cee888c80bbcc529b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4013124489ea2fb57e41de5bac37a514888b6d38adb121c6d6ebd3ec993520cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8dfaef2b9edcf0f025dafa223cecbdd96bfeebcc01feac706576d0fae729ef2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + pkgshare.install "examples" + end + + test do + # fake token file + (testpath/"notvavlid").write "fake" + + cmd = "#{bin}/actions-batch --private=false --owner alexellis " \ + "--token-file #{testpath}/notvavlid --runs-on ubuntu-latest " \ + "--org=false --file #{pkgshare}/examples/curl.sh" + + output = shell_output("#{cmd} 2>&1", 2) + assert_match "failed to create repo", output + end +end diff --git a/Formula/a/activemq-cpp.rb b/Formula/a/activemq-cpp.rb new file mode 100644 index 0000000000000..9a4b755039b61 --- /dev/null +++ b/Formula/a/activemq-cpp.rb @@ -0,0 +1,47 @@ +class ActivemqCpp < Formula + desc "C++ API for message brokers such as Apache ActiveMQ" + homepage "https://activemq.apache.org/components/cms/" + url "https://www.apache.org/dyn/closer.lua?path=activemq/activemq-cpp/3.9.5/activemq-cpp-library-3.9.5-src.tar.bz2" + mirror "https://archive.apache.org/dist/activemq/activemq-cpp/3.9.5/activemq-cpp-library-3.9.5-src.tar.bz2" + sha256 "6bd794818ae5b5567dbdaeb30f0508cc7d03808a4b04e0d24695b2501ba70c15" + license "Apache-2.0" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a0f11adf35cbc7f7295a0d056b8255af8d54bab66c242fa31704f54070aaa1a7" + sha256 cellar: :any, arm64_sequoia: "9662d2f91d16d3077aabec66a532efde437d18987dd1a7be434e3c118a5e1eb9" + sha256 cellar: :any, arm64_sonoma: "9c0b1a20e016293fcd540c357d6d879c82446c00720b447ae4e1ee1d1eb546ad" + sha256 cellar: :any, arm64_ventura: "9b637874d78138b4debd3b45d1bbd54d79babf16bfdfbf9acc340103208262bd" + sha256 cellar: :any, arm64_monterey: "aecbae4664dd780644ff782462ea5bcdcc592917dfad01dde5370a93db641319" + sha256 cellar: :any, arm64_big_sur: "8848bb4603302677cc482a59e21f5e5651e844d3d981c75c6ab3e82257ddf234" + sha256 cellar: :any, sonoma: "48bb7e137e7277ec31c056f662ad7b799d706a0440ffa353af2ab857e28a3e7b" + sha256 cellar: :any, ventura: "49bcd935f1f96ffcc79a19577e32f23d34019eea4c1436054dcf535a47d8ac97" + sha256 cellar: :any, monterey: "fc59b7bff98816254d9180614b72606f424c209a97ae1a0a6e28985af8889f6a" + sha256 cellar: :any, big_sur: "cce6f6a49cb80accb399d33826380c4220d01701b2b53f14eafde10406f835b5" + sha256 cellar: :any, catalina: "296375b0118271838d46daf6722954f6e5a8c791f08245324abd7289b4ded719" + sha256 cellar: :any_skip_relocation, arm64_linux: "07d0b32de8d78022c5498d1ff144d16c573bd5de3edf91239f8404dc72cd64a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa16d5eb67f51eb3d9e648447398db44713695f5e1c5279c70f7a2229e607a9a" + end + + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "openssl@3" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"activemqcpp-config", "--version" + end +end diff --git a/Formula/a/activemq.rb b/Formula/a/activemq.rb new file mode 100644 index 0000000000000..3a90e918b9aa5 --- /dev/null +++ b/Formula/a/activemq.rb @@ -0,0 +1,55 @@ +class Activemq < Formula + desc "Apache ActiveMQ: powerful open source messaging server" + homepage "https://activemq.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=activemq/6.1.8/apache-activemq-6.1.8-bin.tar.gz" + mirror "https://archive.apache.org/dist/activemq/6.1.8/apache-activemq-6.1.8-bin.tar.gz" + sha256 "042add311ebdf3102c97ef2763c0e9c1d6591fa2c7d82e4504d676b11526b419" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2cdb9cb997ff21a907fd48f2509dbf276e2bee0df3ec6ef3a0c96ba2a7b979c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c98092e16d799a4147b904bea384ebd42fafd2d41eaa0d7571e37bef7ce45a95" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "66c3baa2e66cf134485ac695a4a15ab849728e9dfe556b50b13a7389f10ab651" + sha256 cellar: :any_skip_relocation, sonoma: "96aac16da73d71e43539ebaa6c9712a4b088f4fac5b9d315eb2a5fb9765c972b" + sha256 cellar: :any_skip_relocation, arm64_linux: "422d67dbd7a055b70b4029989418f407bf0adbce611531fc7906ede1c111bcba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0726f734a41230c8ce201e0ed155e93705864acb5f5c2f101b0e786f5e5efe1" + end + + depends_on "java-service-wrapper" + depends_on "openjdk" + + def install + if OS.mac? + wrapper_dir = "macosx" + else + # https://github.com/apache/activemq/blob/main/assembly/src/release/bin/linux-x86-64/activemq#L176-L183 + arch = Hardware::CPU.intel? ? "x86" : Utils.safe_popen_read("uname", "-p").downcase.strip + wrapper_dir = "#{OS.kernel_name.downcase}-#{arch}-#{Hardware::CPU.bits}" + odie "Remove workaround for arm64 linux!" unless buildpath.glob("bin/linux-{arm,aarch}*").empty? + mv "bin/linux-x86-64", "bin/#{wrapper_dir}" unless Hardware::CPU.intel? + end + + useless = OS.mac? ? "linux" : "macosx" + rm_r buildpath.glob("bin/#{useless}*") + rm buildpath.glob("bin/#{wrapper_dir}/{wrapper,libwrapper.{so,jnilib}}") + + libexec.install buildpath.children + (bin/"activemq").write_env_script libexec/"bin/activemq", Language::Java.overridable_java_home_env + + wrapper = Formula["java-service-wrapper"].opt_libexec + wrapper_dir = libexec/"bin"/wrapper_dir + ln_sf wrapper/"bin/wrapper", wrapper_dir/"wrapper" + libext = OS.mac? ? "jnilib" : "so" + ln_sf wrapper/"lib/libwrapper.#{libext}", wrapper_dir/"libwrapper.#{libext}" + ln_sf wrapper/"lib/wrapper.jar", wrapper_dir/"wrapper.jar" + end + + service do + run [opt_bin/"activemq", "console"] + working_dir opt_libexec + end + + test do + system bin/"activemq", "browse", "-h" + end +end diff --git a/Formula/a/ad.rb b/Formula/a/ad.rb new file mode 100644 index 0000000000000..2bd6fc19138fb --- /dev/null +++ b/Formula/a/ad.rb @@ -0,0 +1,49 @@ +class Ad < Formula + desc "Adaptable text editor inspired by vi, kakoune, and acme" + homepage "https://github.com/sminez/ad" + url "https://github.com/sminez/ad/archive/refs/tags/0.3.1.tar.gz" + sha256 "809cd09550daf38b1c4b7d19b975e6dbeb85f424f8942f20fc9cd7808c1ef196" + license "MIT" + head "https://github.com/sminez/ad.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54265079d292ffdf2718c837a8479f03851b66909b09981170fb440c17a04baf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4874d80cf8ec7d9a713ac0403e759fb024deea5a0aa9b0baaf77bb75da6dc379" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed349050f01a8877ff816ab5a680f2bdfdce30c022a78f7b2a68ec2a87f4665d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b292412f05f615a3d450d6a45359307330b4b492f822b19c888bab607a191d3" + sha256 cellar: :any_skip_relocation, sonoma: "811782a9dfec54873725b526d03d7820f0c07b7ea4c3559cc298a63b7b68ea41" + sha256 cellar: :any_skip_relocation, ventura: "42174e0d98492a910e6109919c4217b8653f2e3b43917dc18e79fcf379ba1ee8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2439ba1faa2c4bf0b81716297b78e50dc87e9dfaad2bf35166c9fec01324a5c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69c603b8ed8f547bbf1bbefe0001e8c828de418ee9f1e0e74e19161581b7767f" + end + + depends_on "rust" => :build + + conflicts_with "netatalk", because: "both install `ad` binaries" + + def install + system "cargo", "install", *std_cargo_args + man.install buildpath/"docs/man/ad.1" + end + + test do + # ad is a gui application + assert_match "ad v#{version}", shell_output("#{bin}/ad --version").strip + + # test scripts + (testpath/"test.txt").write <<~TXT + Hello, World! + Goodbye, World! + hello, John! + Hi, Alex! + TXT + + (testpath/"hello.ad").write <<~AD + , + x/[Hh]ello, (.*)!/ + p/$1\n/ + AD + + assert_match "World\nJohn\n", shell_output("#{bin}/ad -f #{testpath}/hello.ad #{testpath}/test.txt") + end +end diff --git a/Formula/a/ada-url.rb b/Formula/a/ada-url.rb new file mode 100644 index 0000000000000..a4026a43d641a --- /dev/null +++ b/Formula/a/ada-url.rb @@ -0,0 +1,87 @@ +class AdaUrl < Formula + desc "WHATWG-compliant and fast URL parser written in modern C++" + homepage "https://github.com/ada-url/ada" + url "https://github.com/ada-url/ada/archive/refs/tags/v3.3.0.tar.gz" + sha256 "75565e2d4cc8e3ce2dd7927f5c75cc5ebbd3b620468cb0226501dae68d8fe1cd" + license any_of: ["Apache-2.0", "MIT"] + revision 1 + head "https://github.com/ada-url/ada.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "50d62e0af3952214f33d8db467c5f0c4680786980d943ce244fafd0d4f7ede67" + sha256 cellar: :any, arm64_sequoia: "2801164edd3675e14fa2bebaa2e34c285153d7c96eb71ab52780689bd464c5f5" + sha256 cellar: :any, arm64_sonoma: "8c32ecf2d524b6ebb3adf0ec91785c093b78452cc79c299ea7ba20b098a42d2e" + sha256 cellar: :any, sonoma: "0b11b09bc97b8a30ecb3f0fa016c52ec604959381b6635b96f76e290cb1f9785" + sha256 cellar: :any_skip_relocation, arm64_linux: "533d50e0ca2539bc06e6de76a2c1577de99a71b5858dc93a9fe6dc643d8af4c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "688ad78d321118be7aab51c1eccb86540044e4ee83a9eae780d53e9c19f8f26d" + end + + depends_on "cmake" => :build + depends_on "cxxopts" => :build + depends_on "fmt" + + uses_from_macos "python" => :build + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500 + end + + fails_with :clang do + build 1500 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "11" + cause "Requires C++20" + end + + def install + # ld: unknown options: --gc-sections + if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + inreplace "tools/cli/CMakeLists.txt", 'target_link_options(adaparse PRIVATE "-Wl,--gc-sections")', "" + end + # Do not statically link to libstdc++ + inreplace "tools/cli/CMakeLists.txt", 'target_link_options(adaparse PRIVATE "-static-libstdc++")', "" if OS.linux? + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DBUILD_SHARED_LIBS=ON + -DADA_TOOLS=ON + -DCPM_LOCAL_PACKAGES_ONLY=ON + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "ada.h" + #include + + int main(int , char *[]) { + auto url = ada::parse("https://www.github.com/ada-url/ada"); + url->set_protocol("http"); + std::cout << url->get_protocol() << std::endl; + return EXIT_SUCCESS; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++20", "-I#{include}", "-L#{lib}", "-lada", "-o", "test" + assert_equal "http:", shell_output("./test").chomp + + if OS.mac? + output = shell_output("#{bin}/adaparse -d http://www.google.com/bal?a==11#fddfds") + else + require "pty" + PTY.spawn(bin/"adaparse", "-d", "http://www.google.com/bal?a==11#fddfds") do |r, _w, pid| + Process.wait(pid) + output = r.read_nonblock(1024) + end + end + assert_match "search_start 25", output + end +end diff --git a/Formula/a/adamstark-audiofile.rb b/Formula/a/adamstark-audiofile.rb new file mode 100644 index 0000000000000..b93fec83aa3a8 --- /dev/null +++ b/Formula/a/adamstark-audiofile.rb @@ -0,0 +1,33 @@ +class AdamstarkAudiofile < Formula + desc "C++ Audio File Library by Adam Stark" + homepage "https://github.com/adamstark/AudioFile" + url "https://github.com/adamstark/AudioFile/archive/refs/tags/1.1.4.tar.gz" + sha256 "e3749f90a9356b5206ef8928fa0a9c039e7db49e46bb7f32c3963d6c44c5bea8" + license "MIT" + head "https://github.com/adamstark/AudioFile.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "dce0123d95e01e4609051018ea590c2811908a0e75cb97f7c445c491d21de87e" + end + + def install + include.install "AudioFile.h" + end + + test do + (testpath/"audiofile.cc").write <<~CPP + #include "AudioFile.h" + int main(int argc, char* *argv) { + AudioFile audioFile; + AudioFile::AudioBuffer abuf; + return 0; + } + CPP + + system ENV.cxx, "-std=c++17", + "-I#{include}", + "-o", "audiofile", + "audiofile.cc" + system "./audiofile" + end +end diff --git a/Formula/a/adapterremoval.rb b/Formula/a/adapterremoval.rb new file mode 100644 index 0000000000000..e9bd852e92e95 --- /dev/null +++ b/Formula/a/adapterremoval.rb @@ -0,0 +1,38 @@ +class Adapterremoval < Formula + desc "Rapid adapter trimming, identification, and read merging" + homepage "https://github.com/MikkelSchubert/adapterremoval" + url "https://github.com/MikkelSchubert/adapterremoval/archive/refs/tags/v2.3.4.tar.gz" + sha256 "a4433a45b73ead907aede22ed0c7ea6fbc080f6de6ed7bc00f52173dfb309aa1" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "896c7233e9f91a6a6ccdaf4d9327b77283bcb8af87234c957905fb46f1643cfe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad8f771d05f2b2a193c0bdac1ffdbae8b9213e1cc04a0c92d35135d4d5504262" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "70ace6d9c876a32e46322733499ec9c331d56d48f3a4c567f997bc43e3304deb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2efcd4380b4a9be30bcaa32552abe16aee7742860c49b4854651f3775914d118" + sha256 cellar: :any_skip_relocation, sonoma: "324c6792d35fed4dc9a80e8853261cdfc232f9510d4480878ec774e20d5f733b" + sha256 cellar: :any_skip_relocation, ventura: "04770b3b45993c485713def1d48d104c8ddd83b95fe12a02a45860b04d171423" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b32f3d296d346274a86d5f9a29e7af74afcdbcc76545536f311c8f9d4954f85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ac45069d93dbe0781c369b55b7252bf863d7cc379c359b4e56d4bb589e35fd1" + end + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + ENV.deparallelize + system "make", "install", "PREFIX=#{prefix}" + end + + test do + examples = pkgshare/"examples" + args = %W[ + --bzip2 + --file1 #{examples}/reads_1.fq + --file2 #{examples}/reads_2.fq + --basename #{testpath}/output + ].join(" ") + + assert_match "Processed a total of 1,000 reads", shell_output("#{bin}/AdapterRemoval #{args} 2>&1") + end +end diff --git a/Formula/a/adaptivecpp.rb b/Formula/a/adaptivecpp.rb new file mode 100644 index 0000000000000..b89c80a764e11 --- /dev/null +++ b/Formula/a/adaptivecpp.rb @@ -0,0 +1,85 @@ +class Adaptivecpp < Formula + desc "SYCL and C++ standard parallelism for CPUs and GPUs" + homepage "https://adaptivecpp.github.io/" + url "https://github.com/AdaptiveCpp/AdaptiveCpp/archive/refs/tags/v25.02.0.tar.gz" + sha256 "8cc8a3be7bb38f88d7fd51597e0ec924b124d4233f64da62a31b9945b55612ca" + license "BSD-2-Clause" + revision 3 + head "https://github.com/AdaptiveCpp/AdaptiveCpp.git", branch: "develop" + + bottle do + sha256 arm64_tahoe: "c7d4959352b8ebddf43641929597f0ba52212c921c1f3933980f32fa06d925fe" + sha256 arm64_sequoia: "8d7276450c277fe9378aa8bb2c959adbec2ea0a4072ec9416cb3cb43263b6950" + sha256 arm64_sonoma: "a7d8243f1f5151c7a3b2875f9fba1412755663d5b085c87e9ec3b6a005f9cb35" + sha256 sonoma: "0e5825f933f4d87ec3d66a25c4d7a931cd5be6aaf7d0dd5e2d62cfdcca9e8396" + sha256 arm64_linux: "1442b54a1ed1362ef94e93e073c8090df229b495195131e5e66467cc6b1be3eb" + sha256 x86_64_linux: "ba6fea3e06fe2291cad07ec926c56cc1335b29401ca984a01be13484689def1e" + end + + depends_on "cmake" => :build + depends_on "boost" # needed to use collective_execution_engine.hpp + + uses_from_macos "python" + + on_macos do + depends_on "libomp" + end + + on_linux do + depends_on "llvm" + + # Backport support for LLVM 21 + patch do + url "https://github.com/AdaptiveCpp/AdaptiveCpp/commit/623aa0b1840c5ccd7a45d3e8b228f1bff5257056.patch?full_index=1" + sha256 "d3b8708ded954f04b87ad22254fd949c1d584d6de7a3f8a7e978ff715ca1a33d" + end + end + + def install + args = if OS.mac? + libomp_root = Formula["libomp"].opt_prefix + ["-DOpenMP_ROOT=#{libomp_root}"] + else + %W[ + -DACPP_EXPERIMENTAL_LLVM=ON + -DCLANG_EXECUTABLE_PATH=#{Formula["llvm"].opt_bin/"clang++"} + ] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Avoid references to Homebrew shims directory + inreplace prefix/"etc/AdaptiveCpp/acpp-core.json", Superenv.shims_path/ENV.cxx, ENV.cxx + + if OS.mac? + # we add -I#{libomp_root}/include to default-omp-cxx-flags + inreplace prefix/"etc/AdaptiveCpp/acpp-core.json", + "\"default-omp-cxx-flags\" : \"", + "\"default-omp-cxx-flags\" : \"-I#{libomp_root}/include " + else + # Move tools to work around brew's non-executable audit + (lib/"hipSYCL/llvm-to-backend").install (bin/"hipSYCL/llvm-to-backend").children + end + end + + test do + system bin/"acpp", "--version" + + (testpath/"hellosycl.cpp").write <<~C + #include + int main() { + sycl::queue q{}; + } + C + system bin/"acpp", "hellosycl.cpp", "-o", "hello" + system "./hello" + + unless OS.mac? + refute_match Formula["llvm"].prefix.realpath.to_s, + (etc/"AdaptiveCpp/acpp-core.json").read, + "`acpp-core.json` references `llvm`'s cellar path" + end + end +end diff --git a/Formula/a/adb-enhanced.rb b/Formula/a/adb-enhanced.rb new file mode 100644 index 0000000000000..3230d5f3e4bf3 --- /dev/null +++ b/Formula/a/adb-enhanced.rb @@ -0,0 +1,52 @@ +class AdbEnhanced < Formula + include Language::Python::Virtualenv + + desc "Swiss-army knife for Android testing and development" + homepage "https://ashishb.net/tech/introducing-adb-enhanced-a-swiss-army-knife-for-android-development/" + url "https://files.pythonhosted.org/packages/b6/c9/11f95027ba0bf13938abe329809154e6342181380d3530f26018325b79e7/adb_enhanced-2.7.1.tar.gz" + sha256 "2f09d6edc663fd7fe34b9cb65232e5b85238c7c53bd8284b826fe62fbb039ae1" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "79e4ba0ad8eff1c52d4f630af4039231824eae00171c113072768f53e7f60482" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8deefa2050df50026ff63acc7cd8d3e6addb5bf9ac067b71b830ceac04eff624" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "646209bc549d1c4fde9b65f8559be8de43251297ebd904449cd4db47a849e353" + sha256 cellar: :any_skip_relocation, sonoma: "7038c821594759b71f5333f03752e7178700970629b04d97b0af8f039b4db89a" + sha256 cellar: :any_skip_relocation, arm64_linux: "53ece69f192371adbcd68db594082cca95b8a65945e45c5ef242924924a9fcc7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a12e4cc653134bef9073855829d87e9931d927325e413b0340a5a3d44ef4d96" + end + + depends_on "python@3.14" + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + At runtime, adb must be accessible from your PATH. + + You can install adb from Homebrew Cask: + brew install --cask android-platform-tools + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/adbe --version") + # ADB is not intentionally supplied + # There are multiple ways to install it and we don't want dictate + # one particular way to the end user + assert_match(/(not found)|(No attached Android device found)/, shell_output("#{bin}/adbe devices", 1)) + end +end diff --git a/Formula/a/add-determinism.rb b/Formula/a/add-determinism.rb new file mode 100644 index 0000000000000..ac2635c1bbe08 --- /dev/null +++ b/Formula/a/add-determinism.rb @@ -0,0 +1,44 @@ +class AddDeterminism < Formula + desc "Build postprocessor to reset metadata fields for build reproducibility" + homepage "https://github.com/keszybz/add-determinism" + url "https://github.com/keszybz/add-determinism/archive/refs/tags/v0.7.2.tar.gz" + sha256 "232c4f9fdc482dee5e6d38ef45a2c983b88283fe23d6ff4bcb26164b4c9a2dcb" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eeb3e62ac092a45d7c80ad6028866c21e53dd67deca07cd858c60ca08b605115" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c1fcd780d6cd60bb5b5a87a9034396d1fc7e389fbfb162b0bc0133398fcb5e7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32e47defa47bb9c60faa4590ff747249d0a7a137df8a28f25385ace015f6e407" + sha256 cellar: :any_skip_relocation, sonoma: "535ba04c2c5a2252676dcfd043ede6509ed2ed8d982ff3fea3d944d1d51c3aea" + sha256 cellar: :any_skip_relocation, arm64_linux: "8320195d668c1822ed3c0d9a9be244f7e022be0812d318339cbcba1009125cc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcd9b16144899992dbafb28d162ad3796002fe605749650292c46057c7952ced" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + uses_from_macos "zlib" + + on_linux do + depends_on "libselinux" + end + + def install + ENV["RUSTFLAGS"] = "-C link-arg=-lselinux" if OS.linux? + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.html").write <<~HTML + + + HTML + + ENV["SOURCE_DATE_EPOCH"] = "0" + system bin/"add-det", testpath/"test.html" + + assert_match "", (testpath/"test.html").read + assert_match "content=\"1970-01-01\"", (testpath/"test.html").read + end +end diff --git a/Formula/a/addlicense.rb b/Formula/a/addlicense.rb new file mode 100644 index 0000000000000..a8bce16323a10 --- /dev/null +++ b/Formula/a/addlicense.rb @@ -0,0 +1,31 @@ +class Addlicense < Formula + desc "Scan directories recursively to ensure source files have license headers" + homepage "https://github.com/google/addlicense" + url "https://github.com/google/addlicense/archive/refs/tags/v1.2.0.tar.gz" + sha256 "d2e05668e6f3da9b119931c2fdadfa6dd19a8fc441218eb3f2aec4aa24ae3f90" + license "Apache-2.0" + head "https://github.com/google/addlicense.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d805d6f3d40e1004189f3ac86a50250f2a2c7eef920127565c59f646f703ed30" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d805d6f3d40e1004189f3ac86a50250f2a2c7eef920127565c59f646f703ed30" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d805d6f3d40e1004189f3ac86a50250f2a2c7eef920127565c59f646f703ed30" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d805d6f3d40e1004189f3ac86a50250f2a2c7eef920127565c59f646f703ed30" + sha256 cellar: :any_skip_relocation, sonoma: "feee4e9cf952c2d3bc600e044b275c059450a897543c033c7bae0961020175fb" + sha256 cellar: :any_skip_relocation, ventura: "feee4e9cf952c2d3bc600e044b275c059450a897543c033c7bae0961020175fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "146bce5af0963bcfad9a958fcb92b082c1ae4c95971f09a43f7dffecbc83ca0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8c37cd4c9c5b2dcb5fc8091b30900e71216d0d7fd4fe6d562d10b2d1a38fd46" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"test.go").write("package main\\n") + system bin/"addlicense", "-c", "Random LLC", testpath/"test.go" + assert_match "// Copyright 2025 Random LLC", (testpath/"test.go").read + end +end diff --git a/Formula/a/addons-linter.rb b/Formula/a/addons-linter.rb new file mode 100644 index 0000000000000..309557a08b819 --- /dev/null +++ b/Formula/a/addons-linter.rb @@ -0,0 +1,38 @@ +class AddonsLinter < Formula + desc "Firefox Add-ons linter, written in JavaScript" + homepage "https://github.com/mozilla/addons-linter" + url "https://registry.npmjs.org/addons-linter/-/addons-linter-8.4.0.tgz" + sha256 "c2cc1cba8095267a046bb411b85cad2c8504f7bf065e6c0212316a902661a722" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8c98b516f61e469d0e0bb606ee3feba6c810facff5bc01806bd8a9d6ac22b5fa" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/addons-linter --version") + + (testpath/"manifest.json").write <<~JSON + { + "manifest_version": 2, + "name": "Test Addon", + "version": "1.0", + "description": "A test addon", + "applications": { + "gecko": { + "id": "test-addon@example.com" + } + } + } + JSON + output = shell_output("#{bin}/addons-linter #{testpath}/manifest.json 2>&1") + assert_match "BAD_ZIPFILE Corrupt ZIP", output + end +end diff --git a/Formula/a/adios2.rb b/Formula/a/adios2.rb new file mode 100644 index 0000000000000..d78514fbba628 --- /dev/null +++ b/Formula/a/adios2.rb @@ -0,0 +1,115 @@ +class Adios2 < Formula + desc "Next generation of ADIOS developed in the Exascale Computing Program" + homepage "https://adios2.readthedocs.io" + url "https://github.com/ornladios/ADIOS2/archive/refs/tags/v2.10.2.tar.gz" + sha256 "14cf0bcd94772194bce0f2c0e74dba187965d1cffd12d45f801c32929158579e" + license "Apache-2.0" + head "https://github.com/ornladios/ADIOS2.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "544926ccf1bc80eb6a66cadfbcd50452ca3ac79159dc50dbddc5ccf68c78a64d" + sha256 arm64_sequoia: "caf49db76e7ccd69679a897c33cae89ce8f6c3791b37e1e9e64f44b5ed1d3681" + sha256 arm64_sonoma: "f1d5cea886ed8cd5f968a842aca88fe6a45ecb2bce617aec503b52bed5da7ed9" + sha256 arm64_ventura: "b1f76254ef5027a9f7b4975d78f978e08cb83fbabccf3f1c563b561ab894a27e" + sha256 sonoma: "14dcca08d1cc8ec5c34bbb9fd652e67614fa300dcc4cc1764279021ebe4eb1d0" + sha256 ventura: "7f46f4a0b3a3f652c98ad7ee92c0b7d12c32dd3ea35c990092f3194abc92940d" + sha256 arm64_linux: "4d6e615acfb2490c76cf4489959c40fbcda944ed33ae983157a2cac241de6e6f" + sha256 x86_64_linux: "9496dbfe1f33f6ee68f69692c979e083525425da1e3a8d220eab5d19f82e6a2b" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "pybind11" => :build + depends_on "c-blosc2" + depends_on "gcc" # for gfortran + depends_on "libfabric" + depends_on "libpng" + depends_on "libsodium" + depends_on "mpi4py" + depends_on "numpy" + depends_on "open-mpi" + depends_on "pugixml" + depends_on "python@3.13" + depends_on "sqlite" + depends_on "yaml-cpp" + depends_on "zeromq" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version == 1400 + depends_on "lz4" + depends_on "zstd" + end + + # clang: error: unable to execute command: Segmentation fault: 11 + # clang: error: clang frontend command failed due to signal (use -v to see invocation) + # Apple clang version 14.0.0 (clang-1400.0.29.202) + fails_with :clang if DevelopmentTools.clang_build_version == 1400 + + def python3 + "python3.13" + end + + def install + ENV.llvm_clang if DevelopmentTools.clang_build_version == 1400 + + # fix `include/adios2/common/ADIOSConfig.h` file audit failure + inreplace "source/adios2/common/ADIOSConfig.h.in" do |s| + s.gsub! ": @CMAKE_C_COMPILER@", ": #{ENV.cc}" + s.gsub! ": @CMAKE_CXX_COMPILER@", ": #{ENV.cxx}" + end + + args = %W[ + -DADIOS2_USE_Blosc2=ON + -DADIOS2_USE_BZip2=ON + -DADIOS2_USE_DataSpaces=OFF + -DADIOS2_USE_Fortran=ON + -DADIOS2_USE_HDF5=OFF + -DADIOS2_USE_IME=OFF + -DADIOS2_USE_MGARD=OFF + -DADIOS2_USE_MPI=ON + -DADIOS2_USE_PNG=ON + -DADIOS2_USE_Python=ON + -DADIOS2_USE_SZ=OFF + -DADIOS2_USE_ZeroMQ=ON + -DADIOS2_USE_ZFP=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CrayDRC=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_FLEX=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_NVSTREAM=TRUE + -DPython_EXECUTABLE=#{which(python3)} + -DCMAKE_INSTALL_PYTHONDIR=#{prefix/Language::Python.site_packages(python3)} + -DADIOS2_BUILD_TESTING=OFF + -DADIOS2_BUILD_EXAMPLES=OFF + -DADIOS2_USE_EXTERNAL_DEPENDENCIES=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"test").install "examples/hello/bpWriter/bpWriter.cpp" + (pkgshare/"test").install "examples/hello/bpWriter/bpWriter.py" + end + + test do + adios2_config_flags = Utils.safe_popen_read(bin/"adios2-config", "--cxx").chomp.split + adios2_config_flags += %W[-L#{Formula["lz4"].opt_lib} -llz4] + system "mpic++", "-std=c++17", pkgshare/"test/bpWriter.cpp", *adios2_config_flags + system "./a.out" + assert_path_exists testpath/"myVector_cpp.bp" + + system python3, "-c", "import adios2" + system python3, pkgshare/"test/bpWriter.py" + assert_path_exists testpath/"bpWriter-py.bp" + end +end diff --git a/Formula/a/admesh.rb b/Formula/a/admesh.rb new file mode 100644 index 0000000000000..2462f4890f44b --- /dev/null +++ b/Formula/a/admesh.rb @@ -0,0 +1,48 @@ +class Admesh < Formula + desc "Processes triangulated solid meshes" + homepage "https://github.com/admesh/admesh" + url "https://github.com/admesh/admesh/releases/download/v0.98.5/admesh-0.98.5.tar.gz" + sha256 "0d7994bfa587c4e958b2ac7c7d2fb90dfb6c5463d32513ada169cf710a438535" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "446f3774fd018994f5f040279c0198a80c6f7144023f465e6a5cbb7183225b66" + sha256 cellar: :any, arm64_sequoia: "c88ef051413ca638240add2cd10c366fc81c3b8d1cd29387cb137d7d3ef411c8" + sha256 cellar: :any, arm64_sonoma: "d8be2d072ff47a331d5a749e91598d85da1079f65e2f5f9a222f3f8bb386daff" + sha256 cellar: :any, arm64_ventura: "574b1956bd94a641fac2f06a85f9cfe3aaf5969a14ec3d88a5431230cbd36e49" + sha256 cellar: :any, arm64_monterey: "3c0ddb99e13c88ae4197e0822e1bb616f1c681f38a907da42099f0bcb763f3a7" + sha256 cellar: :any, arm64_big_sur: "7fc9a0d3002aa670461964731d21e8e32e080dd6447c6bac9f0bd13a23074040" + sha256 cellar: :any, sonoma: "d11ab16b8bce8e9f88dbc07e8b4ae02d75a19d9854afd84654ad7751d260a38a" + sha256 cellar: :any, ventura: "45c04648928137181b483df0a17cef9b5d254e6f49d089861436930bed9f6a1a" + sha256 cellar: :any, monterey: "d2741e200d97e2528ea4e5d2449ae474a793218891db0bdd568d7bca314f0149" + sha256 cellar: :any, big_sur: "b9f6d7b1b242abeb35ce180f190f56acdbb10b547bc3f90a07b0c380bde3727f" + sha256 cellar: :any, catalina: "d741e030b9ae1a2022dad2e17a2e98dc6516bae9df607fb3841d6397317b8e83" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d436d9757a292b26c71acd6951a9c96b466006659787443c40d0231b9791401" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d06691e618a708b7c30459acdc5e70f2abed11d5a2f8c7622b1fc6f8ef353f8" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + # Test file is the beginning of block.stl from admesh's source + (testpath/"test.stl").write <<~STL + SOLID Untitled1 + FACET NORMAL 0.00000000E+00 0.00000000E+00 1.00000000E+00 + OUTER LOOP + VERTEX -1.96850394E+00 1.96850394E+00 1.96850394E+00 + VERTEX -1.96850394E+00 -1.96850394E+00 1.96850394E+00 + VERTEX 1.96850394E+00 -1.96850394E+00 1.96850394E+00 + ENDLOOP + ENDFACET + ENDSOLID Untitled1 + STL + system bin/"admesh", "test.stl" + end +end diff --git a/Formula/a/adns.rb b/Formula/a/adns.rb new file mode 100644 index 0000000000000..6a329546eee64 --- /dev/null +++ b/Formula/a/adns.rb @@ -0,0 +1,38 @@ +class Adns < Formula + desc "C/C++ resolver library and DNS resolver utilities" + homepage "https://www.chiark.greenend.org.uk/~ian/adns/" + url "https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-1.6.1.tar.gz" + sha256 "7138b3789b7506bd683f451d4f7d853077a91803b7b35d86ec667f0f9cd401cd" + license all_of: ["GPL-3.0-or-later", "LGPL-2.0-or-later"] + head "https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/githttp/adns.git", branch: "master" + + livecheck do + url "https://www.chiark.greenend.org.uk/~ian/adns/ftp/" + regex(/href=.*?adns[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13b27a569da82d1c3dccfbd733715ca0e4b850462ee7cd74561b3753945848be" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3d3ebb294a2b86724d9484f996261c4e76472c8519618662300d4023d75a6b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a18386d620c3bdb3136f4800b3f972d545ddd63753363d4425d3d4e819c4474" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72889b372cd9dbba605289c703e885a518d2f4d34aed5f1103bd2af0b3d471aa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d1143604507ce762772b0ed61e367827054e1414ea1a24883fbe8b8d8dc026aa" + sha256 cellar: :any_skip_relocation, sonoma: "fefe889ad072b0186eb26a445a13bff68e1f1e0914fce32273be408449c6518e" + sha256 cellar: :any_skip_relocation, ventura: "903ec0367e65867e0c69b536c535c24de0e588ceac6b2b53b6a0880194ce3e52" + sha256 cellar: :any_skip_relocation, monterey: "7f461bac71655ec0e4c05041dcd456e2648b2a1960ea8a633198ae35f1ba5557" + sha256 cellar: :any_skip_relocation, arm64_linux: "61536298beb99ff2010ca729c20656b74b9ce355d246bb5df0e2b187b01501ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ac86275f06493e6589ea7f3c6306281891074deb2d4b3318652ee5e3d66d594" + end + + uses_from_macos "m4" => :build + + def install + system "./configure", "--prefix=#{prefix}", "--disable-dynamic" + system "make" + system "make", "install" + end + + test do + system bin/"adnsheloex", "--version" + end +end diff --git a/Formula/a/adplug.rb b/Formula/a/adplug.rb new file mode 100644 index 0000000000000..cd49a8ed02908 --- /dev/null +++ b/Formula/a/adplug.rb @@ -0,0 +1,54 @@ +class Adplug < Formula + desc "Free, hardware independent AdLib sound player library" + homepage "https://adplug.github.io" + url "https://github.com/adplug/adplug/releases/download/adplug-2.4/adplug-2.4.tar.bz2" + sha256 "de18463bf7c0cb639a3228ad47e69eb7f78a5a197802d325f3a5ed7e1c56d57f" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "892435c5c1e839118883ea1ccb12ba98ca1e5ad200523547d63bebabaf1b2b64" + sha256 cellar: :any, arm64_sequoia: "367afb14f5af6fc67209b806c5d6b48bc5b39b45d6981914357f50cfb99e9a88" + sha256 cellar: :any, arm64_sonoma: "d4cc6d03f6820bab04347eed81792a56670a7b15aacc2cab57bf752e5685d55c" + sha256 cellar: :any, arm64_ventura: "cf6008d2cedfe92a81e66895841c5c0fa47c0807849c4f970a184012e5101d32" + sha256 cellar: :any, sonoma: "988cd421d220bba2933a2bba81df367e3a5cb6e64fdb02272a9532eadc51cd07" + sha256 cellar: :any, ventura: "e969b8061a3f8f10218e284760970bffbf963edd9d9c9ee1fbd98cf017aa5d71" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4686e12a33772cc5af4303f201c88c59f2417e15e2189afeddaa10c78548976" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c16d651b0aff495078228866958b6a7a6d85c2006808b4393afa947a48e72a81" + end + + head do + url "https://github.com/adplug/adplug.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libbinio" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + # Workaround for arm64 linux, issue ref: https://github.com/adplug/adplug/issues/246 + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + resource "ksms" do + url "http://advsys.net/ken/ksmsongs.zip" + sha256 "2af9bfc390f545bc7f51b834e46eb0b989833b11058e812200d485a5591c5877" + end + + resource("ksms").stage do + (testpath/".adplug").mkpath + system bin/"adplugdb", "-v", "add", "JAZZSONG.KSM" + end + end +end diff --git a/Formula/a/adr-tools.rb b/Formula/a/adr-tools.rb new file mode 100644 index 0000000000000..1a595e51bb0dc --- /dev/null +++ b/Formula/a/adr-tools.rb @@ -0,0 +1,36 @@ +class AdrTools < Formula + desc "CLI tool for working with Architecture Decision Records" + homepage "https://github.com/npryce/adr-tools" + url "https://github.com/npryce/adr-tools/archive/refs/tags/3.0.0.tar.gz" + sha256 "9490f31a457c253c4113313ed6352efcbf8f924970a309a08488833b9c325d7c" + license "CC-BY-4.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "76cb31e149dbe88de67cbb6911e3837f7fddda5d773b9abc3b8374f770bc309d" + end + + def install + config = buildpath/"src/adr-config" + + # Unlink and re-write to matches homebrew's installation conventions + config.unlink + config.write <<~SHELL + #!/bin/bash + echo 'adr_bin_dir="#{bin}"' + echo 'adr_template_dir="#{prefix}"' + SHELL + + prefix.install Dir["src/*.md"] + bin.install Dir["src/*"] + bash_completion.install "autocomplete/adr" => "adr-tools" + end + + test do + file = "0001-record-architecture-decisions.md" + assert_match file, shell_output("#{bin}/adr-init") + assert_match file, shell_output("#{bin}/adr-list") + end +end diff --git a/Formula/a/adr-viewer.rb b/Formula/a/adr-viewer.rb new file mode 100644 index 0000000000000..63ce0e623ee9d --- /dev/null +++ b/Formula/a/adr-viewer.rb @@ -0,0 +1,91 @@ +class AdrViewer < Formula + include Language::Python::Virtualenv + + desc "Generate easy-to-read web pages for your Architecture Decision Records" + homepage "https://github.com/mrwilson/adr-viewer" + url "https://files.pythonhosted.org/packages/1b/72/0f787da38d0f9d69c06b31d8f412735ed4fad383edd7f7d2286f4fc7b5b0/adr_viewer-1.4.0.tar.gz" + sha256 "9a2f02a9feb3a6d03d055dd8599b20d34126f8e755b4b4ee1a353ecbbd590cef" + license "MIT" + revision 4 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3f6b7a95651b6fb125de9bf527bacacfaaedb388d7b04f70d4403b8035e2c8f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "58ab44ead9b88068a4cd4a4d5e7623b5769c6b614e888374ba863e9d0e0a5d06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc342d015274358ca7077ce8552140d0f71fec60c06c9567c11086ddb76ff447" + sha256 cellar: :any_skip_relocation, sonoma: "7b31b8e4db34d9255f45a69b7a1bafeb8c847766cd13fb7a855c0aa23fa8c88b" + sha256 cellar: :any_skip_relocation, arm64_linux: "831b524d372bbe7f6a292e141f1d87b0516e1f3f067cf24309066926ec397fdd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3043b26cd6a9c4f8dcf48da0045d79860b6697742b108eb49ef7695e3a1f94d" + end + + depends_on "python@3.14" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "bottle" do + url "https://files.pythonhosted.org/packages/1b/fb/97839b95c2a2ea1ca91877a846988f90f4ca16ee42c0bb79e079171c0c06/bottle-0.13.2.tar.gz" + sha256 "e53803b9d298c7d343d00ba7d27b0059415f04b9f6f40b8d58b5bf914ba9d348" + end + + resource "bs4" do + url "https://files.pythonhosted.org/packages/c9/aa/4acaf814ff901145da37332e05bb510452ebed97bc9602695059dd46ef39/bs4-0.0.2.tar.gz" + sha256 "a48685c58f50fe127722417bae83fe6badf500d54b55f7e39ffe43b798653925" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mistune" do + url "https://files.pythonhosted.org/packages/80/f7/f6d06304c61c2a73213c0a4815280f70d985429cda26272f490e42119c1a/mistune-3.1.2.tar.gz" + sha256 "733bf018ba007e8b5f2d3a9eb624034f6ee26c4ea769a98ec533ee111d504dff" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"adr-viewer", shell_parameter_format: :click) + end + + test do + adr_dir = testpath/"doc"/"adr" + mkdir_p adr_dir + (adr_dir/"0001-record.md").write <<~MARKDOWN + # 1. Record architecture decisions + Date: 2018-09-02 + ## Status + Accepted + ## Context + We need to record the architectural decisions made on this project. + ## Decision + We will use Architecture Decision Records, as [described by Michael Nygard](https://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). + ## Consequences + See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). + MARKDOWN + system bin/"adr-viewer", "--adr-path", adr_dir, "--output", "index.html" + assert_path_exists testpath/"index.html" + end +end diff --git a/Formula/a/advancecomp.rb b/Formula/a/advancecomp.rb new file mode 100644 index 0000000000000..00385eac8dab6 --- /dev/null +++ b/Formula/a/advancecomp.rb @@ -0,0 +1,45 @@ +class Advancecomp < Formula + desc "Recompression utilities for .PNG, .MNG, .ZIP, and .GZ files" + homepage "https://www.advancemame.it/comp-readme.html" + url "https://github.com/amadvance/advancecomp/releases/download/v2.6/advancecomp-2.6.tar.gz" + sha256 "b07d77735540409771cbe1b6df165b5151c11bb9c3d8f01290be0ec88ec3498f" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2862d3598f6f87ae56c243ebc30fffc8e2249ed68554be1d2e87ef3b3b791edd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5777e7f8547c26b139edefeaf97664e1f8140947043ac1edc932ff03d58eac66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "847145cf9a8712c77732c65eb448cba870e669606e84a9014cb9757a02a8ed2c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5c1276ea10b780d85270c5a8147dccfedbc646ced65525deecf797b52e480396" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2cba21d82da0f9bdb1971dcf7eea4b452aebef5ce609e286bdfc12a546b3e768" + sha256 cellar: :any_skip_relocation, sonoma: "ee89dce9384c81e60d5bd776cc63401e01f3b7ca54b13e95caf08d79fc195640" + sha256 cellar: :any_skip_relocation, ventura: "bff1aa324fdb1cbeea5f49d22e5bfd3eb2e9b1d7c59b6735dbdf41e37ca7ba1e" + sha256 cellar: :any_skip_relocation, monterey: "0cee2346975f74c9e601ccd07704a820d0aed34751ced2df5df0767d38a7d504" + sha256 cellar: :any_skip_relocation, arm64_linux: "58852c7c4a248abf531cd35832281b6c9d4b618826690415687a28f9a05259c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1329faa8c59e53b7570dbed75709d2dc07d3fcbf1ac6610ccee09c817aee056" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--enable-bzip2", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"advdef", "--version" + + cp test_fixtures("test.png"), "test.png" + system bin/"advpng", "--recompress", "--shrink-fast", "test.png" + + version_string = shell_output("#{bin}/advpng --version") + assert_includes version_string, "advancecomp v#{version}" + end +end diff --git a/Formula/a/advancescan.rb b/Formula/a/advancescan.rb new file mode 100644 index 0000000000000..4c9d359b7e326 --- /dev/null +++ b/Formula/a/advancescan.rb @@ -0,0 +1,39 @@ +class Advancescan < Formula + desc "Rom manager for AdvanceMAME/MESS" + homepage "https://www.advancemame.it/scan-readme.html" + url "https://github.com/amadvance/advancescan/releases/download/v1.18/advancescan-1.18.tar.gz" + sha256 "8c346c6578a1486ca01774f30c3e678058b9b8b02f265119776d523358d24672" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7b3f7f89918a0c35864ba97a1536ecc7d78805ea79008dce1c74dffaad2a225f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8665f9344bd59d8d1ca29f033abc8db6616078e57fe991e781771c6e43f7113a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53a0ab6f94d0b7bbafada815a25b5159ac3d0fed4073714526bbd4350ec5df63" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ac972445b713681140e05905b842621e3d5e845f4a697686f7d9d5578eb9a53b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2f031fe7a7fcb2f3184a2b5e07339d6b400c3d776d43f6b1a1a62bdaaf49eed6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "edf3274971a23adffeca610c2ec178698fea761c728f6b92a6610da67695dcbf" + sha256 cellar: :any_skip_relocation, sonoma: "a161d438152b4c290a63851c40120e0b44bd58821de237fecc3f5ef6ae8dd590" + sha256 cellar: :any_skip_relocation, ventura: "a2cccf02a3885ffb4c04810b29b71f107596a875c0cad654f4de47c05166e448" + sha256 cellar: :any_skip_relocation, monterey: "82b01ceb54c4bdc9be1c92e51058bcb003387c9d64e65ba59704edd44ce25a98" + sha256 cellar: :any_skip_relocation, big_sur: "9e13a5aaa5365e7a2dee8d01cf12fc499a832545e146c9b343f3966b1e4441bd" + sha256 cellar: :any_skip_relocation, catalina: "a2858248da2aa75092ab3511c6f9922bc85227e07c27444371e8d75931668bee" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e27855b2b171f2bedb2bf89d28c2ea3f1178951fdfe1b7ec2540fdca51f1439" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a42de6a209af1dd02c8544621f7da76afabd415d46265b548b3e35b7667b45d" + end + + uses_from_macos "zlib" + + def install + ENV.cxx11 + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"advdiff", "-V" + system bin/"advscan", "-V" + end +end diff --git a/Formula/a/adwaita-icon-theme.rb b/Formula/a/adwaita-icon-theme.rb new file mode 100644 index 0000000000000..14f0f47bba8e8 --- /dev/null +++ b/Formula/a/adwaita-icon-theme.rb @@ -0,0 +1,33 @@ +class AdwaitaIconTheme < Formula + desc "Icons for the GNOME project" + homepage "https://developer.gnome.org" + url "https://download.gnome.org/sources/adwaita-icon-theme/49/adwaita-icon-theme-49.0.tar.xz" + sha256 "65166461d1b278aa942f59aa8d0fccf1108d71c65f372c6266e172449791755c" + license any_of: ["LGPL-3.0-or-later", "CC-BY-SA-3.0"] + + bottle do + sha256 cellar: :any_skip_relocation, all: "bb850642a89f3e7e8341fc010e2fc4791933160f275ec6e93848ae3783dce02c" + end + + depends_on "gtk4" => :build # for gtk4-update-icon-cache + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "librsvg" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # This checks that a -symbolic png file generated from svg exists + # and that a file created late in the install process exists. + # Someone who understands GTK4 could probably write better tests that + # check if GTK4 can find the icons. + png = "audio-headphones.png" + assert_path_exists share/"icons/Adwaita/16x16/devices/#{png}" + assert_path_exists share/"icons/Adwaita/index.theme" + end +end diff --git a/Formula/a/aerc.rb b/Formula/a/aerc.rb new file mode 100644 index 0000000000000..9e7eeb48c5c3e --- /dev/null +++ b/Formula/a/aerc.rb @@ -0,0 +1,41 @@ +class Aerc < Formula + desc "Email client that runs in your terminal" + homepage "https://aerc-mail.org/" + url "https://git.sr.ht/~rjarry/aerc/archive/0.21.0.tar.gz" + mirror "https://github.com/rjarry/aerc/archive/refs/tags/0.21.0.tar.gz" + sha256 "3f1469bbaea982fc58352f2682932ecc2fb50c705994d96b2343e771747745a7" + license "MIT" + head "https://git.sr.ht/~rjarry/aerc", branch: "master" + + bottle do + sha256 arm64_tahoe: "a8f207daf51b4be7b0645bf3e81cacc2687190713bb13a59ad246419c469affb" + sha256 arm64_sequoia: "1bc0619b2b30691c09fab1382cd6a9510b66278e08b58fb8255e62d2929f08d7" + sha256 arm64_sonoma: "fbd0023ba20b2075790a2a558434aa4c3fe18098d17cb129122f7ade45a8c4d5" + sha256 arm64_ventura: "a993460fcf4acfdcef595f4ce9e4ae678358c11f79c9dff6bc7f09d5edb73d94" + sha256 sonoma: "8b46596c840dd14a947428e4669704bdee42c36d6ddaa617d8d69453137e5664" + sha256 ventura: "c04471c53a6b7db1b349937a7b81ecf5ea794f41aad35e9d9bc0e69e309453d0" + sha256 arm64_linux: "6d9361c0ff2d2c7fb8bfb3d80ec789d012547fed90bab51941250c10a07c6024" + sha256 x86_64_linux: "5f8a0e69f2b07a3fbbc3615af3ed930151e4d601632f2c25a3e8928068106492" + end + + depends_on "go" => :build + depends_on "scdoc" => :build + depends_on "notmuch" + + def install + # Workaround to avoid patchelf corruption when cgo is required + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV["BUILD_OPTS"] = "-buildmode=pie -trimpath" + end + + system "make", "PREFIX=#{prefix}", "VERSION=#{version}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/aerc -v") + assert_match(/aerc #{version} \+notmuch\.*/, output) + end +end diff --git a/Formula/a/aerleon.rb b/Formula/a/aerleon.rb new file mode 100644 index 0000000000000..2cbdc8cc81df0 --- /dev/null +++ b/Formula/a/aerleon.rb @@ -0,0 +1,112 @@ +class Aerleon < Formula + include Language::Python::Virtualenv + + desc "Generate firewall configs for multiple firewall platforms" + homepage "https://aerleon.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/aa/59/bdfba424f08f2942bac1c630653ef8177938421e0cfd00ccaf358744bbed/aerleon-1.11.0.tar.gz" + sha256 "51ece6e194b802a21213a66a502e8b8f227b09542571c2b0d42b924750ec2dbb" + license "Apache-2.0" + revision 1 + head "https://github.com/aerleon/aerleon.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5bd619121aa28922bc80c156af0e2d7bb339ab8e45ac7a88ad7907cecc95e8a8" + sha256 cellar: :any, arm64_sequoia: "b9d3180d7832cd312734e5c77d4de93e8f398939da286d4b7e9b793dd7060522" + sha256 cellar: :any, arm64_sonoma: "6e2f14b8727215e6ef700b9abb7cde455c8f76819fbd1a5c5726cbb52a234310" + sha256 cellar: :any, sonoma: "f2ffce8c69f9fce3b2db6facf808d9d578904929a2aa2ae34ff492a0c6891e0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "6bdeb546adeb6444c76d34b7b41f3ca8e478aedffc96e1852e87fbc6a4628a6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b01c21822707df72e754e5839e00b7c5322a4597da0646768db534e4d573ca10" + end + + depends_on "libyaml" + depends_on "python@3.14" + + conflicts_with "cgrep", because: "both install `cgrep` binaries" + + resource "absl-py" do + url "https://files.pythonhosted.org/packages/79/c9/45ecff8055b0ce2ad2bfbf1f438b5b8605873704d50610eda05771b865a0/absl-py-1.4.0.tar.gz" + sha256 "d2c244d01048ba476e7c080bd2c6df5e141d211de80223460d5b3b8a2a58433d" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/98/5a/da40306b885cc8c09109dc2e1abd358d5684b1425678151cdaed4731c822/typing_extensions-4.14.1.tar.gz" + sha256 "38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"def/definitions.yaml").write <<~YAML + networks: + RFC1918: + values: + - address: 10.0.0.0/8 + - address: 172.16.0.0/12 + - address: 192.168.0.0/16 + WEB_SERVERS: + values: + - address: 10.0.0.1/32 + comment: Web Server 1 + - address: 10.0.0.2/32 + comment: Web Server 2 + MAIL_SERVERS: + values: + - address: 10.0.0.3/32 + comment: Mail Server 1 + - address: 10.0.0.4/32 + comment: Mail Server 2 + ALL_SERVERS: + values: + - WEB_SERVERS + - MAIL_SERVERS + services: + HTTP: + - protocol: tcp + port: 80 + HTTPS: + - protocol: tcp + port: 443 + WEB: + - HTTP + - HTTPS + HIGH_PORTS: + - port: 1024-65535 + protocol: tcp + - port: 1024-65535 + protocol: udp + YAML + + (testpath/"policies/pol/example.pol.yaml").write <<~YAML + filters: + - header: + comment: Example inbound + targets: + cisco: inbound extended + terms: + - name: accept-web-servers + comment: Accept connections to our web servers. + destination-address: WEB_SERVERS + destination-port: WEB + protocol: tcp + action: accept + - name: default-deny + comment: Deny anything else. + action: deny#{" "} + YAML + + assert_match "writing file: example.pol.acl", shell_output("#{bin}/aclgen 2>&1") + assert_path_exists "example.pol.acl" + end +end diff --git a/Formula/a/aescrypt-packetizer.rb b/Formula/a/aescrypt-packetizer.rb new file mode 100644 index 0000000000000..e42438f5e88e2 --- /dev/null +++ b/Formula/a/aescrypt-packetizer.rb @@ -0,0 +1,70 @@ +class AescryptPacketizer < Formula + desc "Encrypt and decrypt using 256-bit AES encryption" + homepage "https://www.aescrypt.com" + # v3 source is currently removed. See https://forums.packetizer.com/viewtopic.php?t=1777 + # url "https://www.aescrypt.com/download/v3/linux/aescrypt-3.16.tgz" + url "https://www.mirrorservice.org/sites/distfiles.gentoo.org/distfiles/13/aescrypt-3.16.tgz" + sha256 "e2e192d0b45eab9748efe59e97b656cc55f1faeb595a2f77ab84d44b0ec084d2" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8ea5602c897a56c72464bea7b0de0b3e06694dae88df581be1e27aa6a67a2b2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1039232a96b3efc3d8c4a1da6d48d8d37cc2991e8275dc467d0b8b16229ead5c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d840ff8d10cb48274d58dac6bc26126ceba767c36e56b2e9e24f2b591dccca0d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b40247d58019bfa5346f2cf07d75dbe765f64d9fea747c088f0ac1d44555fe7e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "823e51604fff46f1cb74a791f7a94c35092393352861fee84c9e5517df795395" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3803d5d2dc8c254d7f68d95175e77dc62c5f4a0a6ee01d24e2a7c8a45049e33b" + sha256 cellar: :any_skip_relocation, sonoma: "1a6a9157e3cff9a015e32f3e442dadfa6ac2241ff6766b951be3e11cd5b81eae" + sha256 cellar: :any_skip_relocation, ventura: "4ec24729c18720223c80a584f59f4603c8caa72e23c30c52462e2a7777cc9410" + sha256 cellar: :any_skip_relocation, monterey: "3e96703d06fcb1ac6114af1929f87cba2c6d04cb65f2d44aa4f51b56d28c04ac" + sha256 cellar: :any_skip_relocation, big_sur: "6ded6050675d0f771f473d5873bf897d0391859c9f9280362444f2189661ac3b" + sha256 cellar: :any_skip_relocation, catalina: "d129279cb28702f27173f99338f5ffd08f042202f5cc3bf2fd71f9107155cc51" + sha256 cellar: :any_skip_relocation, arm64_linux: "64bf374350078c9e283cd1b4e283fc477f9c484ca0388eebf12a140d1f1fa999" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3eddb8372fd630b7f93288f2fb19c3ec96a061b1de150918bee53d0a7a1d55ee" + end + + # v3 source code has been unavailable since at least 2024-09-01. + # v4 requires purchase of license (https://www.aescrypt.com/license.html) + deprecate! date: "2025-03-17", because: "switched to a commercial license in v4" + + def install + if build.head? + cd "Linux" + system "autoreconf", "--force", "--install", "--verbose" + + args = ["--disable-gui"] + args << "--enable-iconv" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + else + system "make" + bin.install "src/aescrypt" + bin.install "src/aescrypt_keygen" + man1.install "man/aescrypt.1" + end + + # To prevent conflict with our other aescrypt, rename the binaries. + mv "#{bin}/aescrypt", "#{bin}/paescrypt" + mv "#{bin}/aescrypt_keygen", "#{bin}/paescrypt_keygen" + end + + def caveats + <<~EOS + To avoid conflicting with our other AESCrypt package the binaries + have been renamed paescrypt and paescrypt_keygen. + EOS + end + + test do + path = testpath/"secret.txt" + original_contents = "What grows when it eats, but dies when it drinks?" + path.write original_contents + + system bin/"paescrypt", "-e", "-p", "fire", path + assert_path_exists testpath/"#{path}.aes" + + system bin/"paescrypt", "-d", "-p", "fire", "#{path}.aes" + assert_equal original_contents, path.read + end +end diff --git a/Formula/a/aescrypt.rb b/Formula/a/aescrypt.rb new file mode 100644 index 0000000000000..96b200344f7e1 --- /dev/null +++ b/Formula/a/aescrypt.rb @@ -0,0 +1,52 @@ +class Aescrypt < Formula + desc "Program for encryption/decryption" + homepage "https://aescrypt.sourceforge.net/" + url "https://aescrypt.sourceforge.net/aescrypt-0.7.tar.gz" + sha256 "7b17656cbbd76700d313a1c36824a197dfb776cadcbf3a748da5ee3d0791b92d" + license "BSD-4-Clause" + + livecheck do + url :homepage + regex(/href=.*?aescrypt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9b39aab473142edc7f8e5eaea2122edcd3bebcea70810914d8d9735a4d82fd0f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4ec90c9ff44239c6cf43b35377e7ff709983c1b76577ea84cd8dbc638d763ee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7cb68631e925aa19e1e1c3cc513dab638b264b078d69a4033789e011876207b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6c6719bff5edd5e48eea46096d02b2818e94491901d419de070a0927fb53bd5d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bbd0fab48f97fd829f8fddf38423158d950668f84dfaee6d87f45fa1af96b55c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a6ca5e29be88eea7f2fe4faf1e57e3f827bfa86bae2726e5f83cedc79c091fcb" + sha256 cellar: :any_skip_relocation, sonoma: "156d8f92b0e60679fe57ab359c054ce6bc0345f519a69fa7184af5f6cd2ebdc5" + sha256 cellar: :any_skip_relocation, ventura: "436e60d661f966b478c730c3a0e9615a963e540424a6d9acf26f549d56bcd08a" + sha256 cellar: :any_skip_relocation, monterey: "a2d7637fcca0782a1f78089af50ea8a39d97d84f7e5fff9c9af938a353724887" + sha256 cellar: :any_skip_relocation, big_sur: "e41505ebcf2ca60292fd7391501ccc8d81ec41c96b23f2f50f21315bafc97f77" + sha256 cellar: :any_skip_relocation, catalina: "c5dac9eb7f3ce8509c766d82ef5f972c8a41984284ae3e01651c6f308164c5bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "249795b1e998522e6adeaab21b99f1cd97afcabcdc5069196604a036f68c97dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a2705c4423a86919b9309235a468b5cc1ac66200501bd255cefe0d26d1f07c6" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `ROUNDS'; aescrypt.o:(.bss+0x180): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure" + system "make" + bin.install "aescrypt", "aesget" + end + + test do + (testpath/"key").write "kk=12345678901234567890123456789abc0" + original_text = "hello" + cipher_text = pipe_output("#{bin}/aescrypt -k #{testpath}/key -s 128", original_text, 0) + deciphered_text = pipe_output("#{bin}/aesget -k #{testpath}/key -s 128", cipher_text, 0) + refute_equal original_text, cipher_text + assert_equal original_text, deciphered_text + end +end diff --git a/Formula/a/aespipe.rb b/Formula/a/aespipe.rb new file mode 100644 index 0000000000000..2368f65ef7b7d --- /dev/null +++ b/Formula/a/aespipe.rb @@ -0,0 +1,37 @@ +class Aespipe < Formula + desc "AES encryption or decryption for pipes" + homepage "https://loop-aes.sourceforge.net/" + url "https://loop-aes.sourceforge.net/aespipe/aespipe-v2.4j.tar.bz2" + sha256 "448fe1e58612c184951645ddd926fc5bdb64fc4f2f828c766c82aa1127e9a3e2" + license "GPL-2.0-or-later" + + livecheck do + url "https://loop-aes.sourceforge.net/aespipe/" + regex(/href=.*?aespipe[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + strategy :page_match + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5fc60a58b6bd7edc3b66eb41f00db8c6b5cd875ba16451ea1d17cb760e3f9240" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30d621d103de66d7f34cb29a9b75022c1074d510880d7e953062569a6411c9d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ca22c2423a32c3060e7a0bff95254c3051fd3a6af36e110620b28d1426bf5c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d0e76b53b8dff2ff1f1141f2c8ba3f1f779019d92ffdd3c18be26850cf60176d" + sha256 cellar: :any_skip_relocation, sonoma: "4af99e0b662569c6d8c11affab727184530d174f3837d209661c59c7d11ff008" + sha256 cellar: :any_skip_relocation, ventura: "0839eb2b3920448d08700403bde7c9ce6c7e6f1c01f0082763e1aa0513c00c34" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fa15737620b958cfcd6333d49e868b26d72e4cf6f7908b7129bfcb2b5c5c3cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b78adabc6a957ed1ff8947cda33e32704dcc0104149a0347fcfd735d7ff91b78" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"secret").write "thisismysecrethomebrewdonttellitplease" + msg = "Hello this is Homebrew" + encrypted = pipe_output("#{bin}/aespipe -P secret", msg, 0) + decrypted = pipe_output("#{bin}/aespipe -P secret -d", encrypted, 0) + assert_equal msg, decrypted.gsub(/\x0+$/, "") + end +end diff --git a/Formula/a/afflib.rb b/Formula/a/afflib.rb new file mode 100644 index 0000000000000..3078c6ec278b1 --- /dev/null +++ b/Formula/a/afflib.rb @@ -0,0 +1,60 @@ +class Afflib < Formula + desc "Advanced Forensic Format" + homepage "https://github.com/sshock/AFFLIBv3" + url "https://github.com/sshock/AFFLIBv3/archive/refs/tags/v3.7.22.tar.gz" + sha256 "67481fc520ff927bf61aea0bf2d660feb73e24cc329335bebb064f8f12115dcb" + license all_of: [ + "BSD-4-Clause", # AFFLIB 2.0a14 and before + :public_domain, # contributions after 2.0a14 + ] + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "db3b39ef1335b3f8a8285a7aa4fdecd8f7dc720719f1a4900aeae3b32a80414f" + sha256 cellar: :any, arm64_sequoia: "efdb247c3914a7f915a611100161c86380bba976856078094f2b80acfa7d9c12" + sha256 cellar: :any, arm64_sonoma: "488454a73b94dd3e858bd582ff0aa72ceae15fceb51f54192b96f142ff7af4ce" + sha256 cellar: :any, sonoma: "9638dd07d37bfc2ecce341bf7360e7a0681e529e89f991d580b31c2e67abfbf0" + sha256 cellar: :any_skip_relocation, arm64_linux: "df198c6d6c4ca05dca7821410d5ee80ad7618b3d50988c1ad62603a8b9c604ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85e81fadf3c44eae7e1354f6239ec86e6c9ee341382f9a1b6ccd17c5ea095daa" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => [:build, :test] # for bindings, avoid runtime dependency due to `expat` + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "zlib" + + def python3 + which("python3.14") + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-fuse", + "--disable-python", + "--disable-silent-rules", + "--enable-s3", + *std_configure_args + system "make", "install" + + # We install Python bindings with pip rather than `./configure --enable-python` to avoid + # managing Setuptools dependency and modifying Makefile to work around our sysconfig patch. + # As a side effect, we need to imitate the Makefile and provide paths to headers/libraries. + ENV.append_to_cflags "-I#{include}" + ENV.append "LDFLAGS", "-L#{lib}" + + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./pyaff" + end + + test do + system bin/"affcat", "-v" + + system python3, "-c", "import pyaff" + end +end diff --git a/Formula/a/afio.rb b/Formula/a/afio.rb new file mode 100644 index 0000000000000..e8ea46909d997 --- /dev/null +++ b/Formula/a/afio.rb @@ -0,0 +1,54 @@ +class Afio < Formula + desc "Creates cpio-format archives" + homepage "https://github.com/kholtman/afio" + url "https://github.com/kholtman/afio/archive/refs/tags/v2.5.2.tar.gz" + sha256 "c64ca14109df547e25702c9f3a9ca877881cd4bf38dcbe90fbd09c8d294f42b9" + # See afio_license_issues_v5.txt + license :cannot_represent + head "https://github.com/kholtman/afio.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5c6e7fd1928e44f9b105d46afbe6615590f0021e16ca4332c71122e913f06dd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2aff60d7ee0309043a8a16fcc08fa31e97f926e891e0cba31fe0f68968f2ae5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1827985d86c7da8918f35afafdd8cc7bf62fe20e8ebc627cdd77c7ac12b2ab0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "181059011f90205cc99df3760661b795b59cda42e7bf18746403889e6305ac65" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7b4f681e5f0c0d32afa17e1f68c74b510ad922996f0bea0ce8be409169047e20" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ca63097a9d1a29c00ae8a799941e937c7359b9df59c723b6110cd7b5cfe7c943" + sha256 cellar: :any_skip_relocation, sonoma: "450bd133db30e618eb5f538bf3f4c740c08f74abf26037356bd629148f20edde" + sha256 cellar: :any_skip_relocation, ventura: "9e5718d3fe605e90aa5bd956bf4849274d716f09617c10da3d3bb522dea23d24" + sha256 cellar: :any_skip_relocation, monterey: "f01da50d10c66c547df1cbaafd07131eb1307737d5e8556c85da1741b1c8c056" + sha256 cellar: :any_skip_relocation, big_sur: "0daf7df23f36271e3141cc11cab067b33ed5855b9faba53bc697d5259deb82ca" + sha256 cellar: :any_skip_relocation, catalina: "28494133d10acea2c1a298fe858d26889ba8567422b9f431710b156a4a8ac858" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a697f6c0f0e1fd2b2fca0db9d4eacb4e12dbb0f82212fbe00947bca01c3eea6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93dee32378176bea139dadf874fed07b411076443fee3a7ff33c84eadfc7760d" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "DESTDIR=#{prefix}" + bin.install "afio" + man1.install "afio.1" + + prefix.install "ANNOUNCE-2.5.1" => "ANNOUNCE" + prefix.install %w[INSTALLATION SCRIPTS] + share.install Dir["script*"] + end + + test do + path = testpath/"test" + path.write "homebrew" + pipe_output("#{bin}/afio -o archive", "test\n", 0) + + system bin/"afio", "-r", "archive" + path.unlink + + system bin/"afio", "-t", "archive" + system bin/"afio", "-i", "archive" + assert_equal "homebrew", path.read.chomp + end +end diff --git a/Formula/a/afl++.rb b/Formula/a/afl++.rb new file mode 100644 index 0000000000000..c251e257e1782 --- /dev/null +++ b/Formula/a/afl++.rb @@ -0,0 +1,74 @@ +class Aflxx < Formula + desc "American Fuzzy Lop++" + homepage "https://aflplus.plus/" + url "https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/v4.34c.tar.gz" + version "4.34c" + sha256 "b500b3d8012757ba6f3435814f7f36a474a1b722efce464216c87af0c515888c" + license "Apache-2.0" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+c)$/i) + end + + bottle do + sha256 arm64_tahoe: "38501f46e62ba0ae835aedcc3964ebd52a2485dc360ce172919557a67c37a9e0" + sha256 arm64_sequoia: "45bb110c26cbeffe6e43b3c544d133a10fbc58e5cd9efc966240368471e3266e" + sha256 arm64_sonoma: "8524f5f60c6b6c3a5d15c143ebf452518eccc779d435648f9564dba2dddcc676" + sha256 sonoma: "a0edabd4ae32fb7ee22d9efd61ce3b17419804e5cfb174b97d846a11795055e7" + sha256 arm64_linux: "edd24b5f5f8725c1152038783d1bb0d552fc5f5293cab154359e1d0f5ccdfe5e" + sha256 x86_64_linux: "95d898801603c750a683ba2b060ae108dc7abcd8bda78c59d03715f89c21018e" + end + + depends_on "coreutils" => :build + depends_on "llvm" + depends_on "python@3.14" + + uses_from_macos "zlib" + + # The Makefile will insist on compiling with LLVM clang even without this. + fails_with :clang + fails_with :gcc + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" + + if OS.mac? + # Disable the in-build test runs as they require modifying system settings as root. + inreplace ["GNUmakefile", "GNUmakefile.llvm"] do |f| + f.gsub! "all_done: test_build", "all_done:" + f.gsub! " test_build all_done", " all_done" + end + end + + llvm = Formula["llvm"] + make_args = %W[ + PREFIX=#{prefix} + CC=clang + CXX=clang++ + LLVM_BINDIR=#{llvm.opt_bin} + LLVM_LIBDIR=#{llvm.opt_lib} + ] + + system "make", "source-only", *make_args + system "make", "install", *make_args + return unless llvm.keg_only? + + bin.env_script_all_files libexec, PATH: "#{llvm.opt_bin}:${PATH}" + end + + test do + cpp_file = testpath/"main.cpp" + cpp_file.write <<~CPP + #include + + int main() { + std::cout << "Hello, world!"; + } + CPP + + system bin/"afl-c++", "-g", cpp_file, "-o", "test" + assert_equal "Hello, world!", shell_output("./test") + end +end diff --git a/Formula/a/afsctool.rb b/Formula/a/afsctool.rb new file mode 100644 index 0000000000000..a438872d13024 --- /dev/null +++ b/Formula/a/afsctool.rb @@ -0,0 +1,59 @@ +class Afsctool < Formula + desc "Utility for manipulating APFS and ZFS compressed files" + homepage "https://brkirch.wordpress.com/afsctool/" + url "https://github.com/RJVB/afsctool/archive/refs/tags/v1.7.3.tar.gz" + sha256 "5776ff5aaf05c513bead107536d9e98e6037019a0de8a1435cc9da89ea8d49b8" + license all_of: ["GPL-3.0-only", "BSL-1.0"] + head "https://github.com/RJVB/afsctool.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "551e9f8910b53ce228f1f710e100c54266cbed7ffa3a087ecec516c71bba5dbb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9eab0e700160a5bf2d1f62f8e67a017280e10315030cb09134933ee782974a95" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a1596705cff076205b68f6fa301394e2feb6bdfc071543679db46aa38eec7aae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6528c95eb0a3b0b57a72eeb847ceab4e4887cbcbaf46a019f9e47d875b6deb9b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "54700cfb61f7a32df0346997ccb3a181e1b7bef7613ad8bee751b75aaab9500d" + sha256 cellar: :any_skip_relocation, sonoma: "74f60adb27bfbec7b4add84a60f73ae3d7c804632dd99a39b61c270bf8125e92" + sha256 cellar: :any_skip_relocation, ventura: "3f8835bb2dac636100454adb2262b8e86dbb394519dcd60f83ecbd39e21e6f17" + sha256 cellar: :any_skip_relocation, monterey: "17a9351748475089c170985080188c640209eab140e959808979260d752c254e" + end + + depends_on "cmake" => :build + depends_on "google-sparsehash" => :build + depends_on "pkgconf" => :build + depends_on :macos + + resource "lzfse" do + url "https://github.com/lzfse/lzfse.git", + revision: "e634ca58b4821d9f3d560cdc6df5dec02ffc93fd" + end + + def install + (buildpath/"src/private/lzfse").install resource("lzfse") + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/afsctool", "build/zfsctool" + end + + test do + path = testpath/"foo" + sample = "A"*1024*1024 + path.write sample + original_size = File.stat(path).blocks + + test_options = [[], ["-T", "LZFSE"]] + test_options.each do |x| + system bin/"afsctool", "-c", *x, path + system bin/"afsctool", "-v", path + raise "Did not compress" unless File.stat(path).blocks.between?(1, 10) + + system bin/"afsctool", "-d", path + raise "Did not decompress" if File.stat(path).blocks != original_size + raise "Data corruption" if path.read != sample + end + end +end diff --git a/Formula/a/aften.rb b/Formula/a/aften.rb new file mode 100644 index 0000000000000..fc357ed7f0ff8 --- /dev/null +++ b/Formula/a/aften.rb @@ -0,0 +1,87 @@ +class Aften < Formula + desc "Audio encoder which generates ATSC A/52 compressed audio streams" + homepage "https://aften.sourceforge.net/" + url "https://downloads.sourceforge.net/project/aften/aften/0.0.8/aften-0.0.8.tar.bz2" + sha256 "87cc847233bb92fbd5bed49e2cdd6932bb58504aeaefbfd20ecfbeb9532f0c0a" + license "LGPL-2.1-or-later" + + # Aften has moved from a version scheme like 0.07 to 0.0.8. We restrict + # matching to versions with three parts, since a version like 0.07 is parsed + # as 0.7 and seen as newer than 0.0.8. + livecheck do + url :stable + regex(%r{url=.*?/aften[._-]v?(\d+(?:\.\d+){2,})\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "98174738f94e5b13f3814dca23e803878017f9d719e0eb7d5f3ebb82e7819db7" + sha256 cellar: :any, arm64_sequoia: "c158dd1b9124db377e0119b6d4dc34ce9ecb14e458379ab023165ce6b83715fb" + sha256 cellar: :any, arm64_sonoma: "918b76d55d51e34cd63b83041517d0a06dd9b10f24a2d35ec8b68fc97a04f589" + sha256 cellar: :any, arm64_ventura: "b210014aa83271ec35261c51fc2d32914b33090deb3fda59993e30aba4b324de" + sha256 cellar: :any, arm64_monterey: "a1a669de1fd73431993f57c52603cb68d5794590bb175084de3ffac408d50c13" + sha256 cellar: :any, arm64_big_sur: "6f4cfa96fbcc6616017d696852e0738796471c24b2bcbd4ee38ce9cd2c01575c" + sha256 cellar: :any, sonoma: "05e65496042ea60735223e9cfa06b97ee8ae136531aafe8d7550f40051ecc33e" + sha256 cellar: :any, ventura: "0ac6b5c31292bc1fea37415cf9f76010633c6c4a2bf3cc8770c4f9cd3b79cbbb" + sha256 cellar: :any, monterey: "f4632d08d823d8bda73e319dd6bf3f27651c9df4a61a2e0bfec30a116ed8745f" + sha256 cellar: :any, big_sur: "86e6506319cdf2eb030d2084663acbabd75dc3ce5f3a6e60fbd9af27c60bad1b" + sha256 cellar: :any, catalina: "c1f3497bae95d7cd92f28b1a22d2dcfc06c0c7342c6c2993b6f564110f6e8f99" + sha256 cellar: :any_skip_relocation, arm64_linux: "30a63d92db554df38e376c97fd0052b6b01956f89f3bb0b9f81309b11df8a332" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9e42d32fbd1c37b67e5beb729fba09eed1378d0f44c89b0b313231d478320d7" + end + + depends_on "cmake" => :build + + resource "sample_wav" do + url "https://www.mediacollege.com/audio/tone/files/1kHz_44100Hz_16bit_05sec.wav" + sha256 "949dd8ef74db1793ac6174b8d38b1c8e4c4e10fb3ffe7a15b4941fa0f1fbdc20" + end + + # The ToT actually compiles fine, but there's no official release made from that changeset. + # So fix the Apple Silicon compile issues. + patch :DATA + + def install + # Fix build with CMake 4.0+. + inreplace "CMakeLists.txt", + "CMAKE_MINIMUM_REQUIRED(VERSION 2.4)", + "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)" + + mkdir "default" do + system "cmake", "-DSHARED=ON", "..", *std_cmake_args + system "make", "install" + end + end + + test do + resource("sample_wav").stage testpath + system bin/"aften", "#{testpath}/1kHz_44100Hz_16bit_05sec.wav", "sample.ac3" + end +end +__END__ +From dca9c03930d669233258c114e914a01f7c0aeb05 Mon Sep 17 00:00:00 2001 +From: jbr79 +Date: Wed, 24 Sep 2008 22:02:59 +0000 +Subject: [PATCH] add fallback function for apply_simd_restrictions() on + non-x86/ppc + +git-svn-id: https://aften.svn.sourceforge.net/svnroot/aften@766 ef0d8562-5c19-0410-972e-841db63a069c +--- + libaften/cpu_caps.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libaften/cpu_caps.h b/libaften/cpu_caps.h +index b7c6159..4db11f7 100644 +--- a/libaften/cpu_caps.h ++++ b/libaften/cpu_caps.h +@@ -26,6 +26,7 @@ + #include "ppc_cpu_caps.h" + #else + static inline void cpu_caps_detect(void){} ++static inline void apply_simd_restrictions(AftenSimdInstructions *simd_instructions){} + #endif + + #endif /* CPU_CAPS_H */ +-- +2.24.3 (Apple Git-128) diff --git a/Formula/a/aftman.rb b/Formula/a/aftman.rb new file mode 100644 index 0000000000000..901269f9256db --- /dev/null +++ b/Formula/a/aftman.rb @@ -0,0 +1,52 @@ +class Aftman < Formula + desc "Toolchain manager for Roblox, the prodigal sequel to Foreman" + homepage "https://github.com/LPGhatguy/aftman" + url "https://github.com/LPGhatguy/aftman/archive/refs/tags/v0.3.0.tar.gz" + sha256 "f75aab63cb887c63e3888a225061a1ab4e0fd0d9c3e0a1c86b8ac7ad035fdf6c" + license "MIT" + head "https://github.com/LPGhatguy/aftman.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2b825b23c892fdf2a0067b011ccbfd4157006d27a5d5c115499331c0345c7a9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57feb860410d508174e62f9f07d467da9ca62c88b35005ea5ebcbed2ed87a71f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "79678c381bbec86c92bee17e53dd01f34355e0dcda445f5a90a1d287c4825c11" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f52a939e6d2cefc3d5e936a08ef2450b8bb0ad909af7f71adc0c1ec7bb1cfc8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3302f69a40b249f7cfa486fa479674c4373c4666e815b07042bc829e151c371e" + sha256 cellar: :any_skip_relocation, sonoma: "fdf56dee4a49f7c3e0038b48b7dc2520dc94882bc7a2e5ce554bc4cc89ce2c7e" + sha256 cellar: :any_skip_relocation, ventura: "707ab252c150e4208055d2398d6d7bf29ca1309d329128a2f3303ba45011717c" + sha256 cellar: :any_skip_relocation, monterey: "9afea6436f083ac4beca2dd9e1321490a7768a5f0f784a0fcacd6f7a813c32a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9457a79cb80b1423563f8d54ffcf84e2b765189b526f029437841c2f2abe335" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e8943e04ce29ca295996d3acacb141d87504a59374aa2da2e7e15a453bbe5a9" + end + + deprecate! date: "2025-07-19", because: :repo_archived + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"aftman.toml").write <<~TOML + [tools] + rojo = "rojo-rbx/rojo@7.2.1" + TOML + + system bin/"aftman", "install", "--no-trust-check" + + assert_path_exists testpath/".aftman" + end +end diff --git a/Formula/a/afuse.rb b/Formula/a/afuse.rb new file mode 100644 index 0000000000000..4e320453da310 --- /dev/null +++ b/Formula/a/afuse.rb @@ -0,0 +1,31 @@ +class Afuse < Formula + desc "Automounting file system implemented in userspace with FUSE" + homepage "https://github.com/pcarrier/afuse/" + url "https://github.com/pcarrier/afuse/archive/refs/tags/v0.5.0.tar.gz" + sha256 "87284e3f7973f5a61eea4a37880512c01f0b8bf1d37a8988447efbe806ec3414" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "22032cf3dd5fe4a2aa623d7bc1f542eebd796f749a63e62907bf1006b2f42d26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d36270c3d62319e03cf6f11756308f5a1f1daef36cebb7ef19376a795002014" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libfuse@2" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match "FUSE library version", shell_output("#{bin}/afuse --version 2>&1", 1) + end +end diff --git a/Formula/a/agda.rb b/Formula/a/agda.rb new file mode 100644 index 0000000000000..7eddabf965fa6 --- /dev/null +++ b/Formula/a/agda.rb @@ -0,0 +1,348 @@ +class Agda < Formula + desc "Dependently typed functional programming language" + homepage "https://wiki.portal.chalmers.se/agda/" + # agda2hs.cabal specifies BSD-3-Clause but it installs an MIT LICENSE file. + # Everything else specifies MIT license and installs corresponding file. + license all_of: ["MIT", "BSD-3-Clause"] + + stable do + url "https://github.com/agda/agda/archive/refs/tags/v2.8.0.tar.gz" + sha256 "6950ccc4848ef18c22866a391b3d72f1c59bb87c621391f18d3557d463fe7dbb" + + resource "stdlib" do + url "https://github.com/agda/agda-stdlib/archive/refs/tags/v2.3.tar.gz" + sha256 "407286af16f2b5b8aebe577b3610ae9b40ce296ed3c03c66444b5801c2fa3012" + + # Bugfix in building documentation + # Should be agda/agda-stdlib commit 628f0a255b36ca96d36e9a83db6e9bdd4f73aa25, + # but that commit includes a change to the CHANGELOG file that doesn't + # apply cleanly. + # Remove on next version bump + patch :DATA + end + + resource "cubical" do + url "https://github.com/agda/cubical/archive/refs/tags/v0.9.tar.gz" + sha256 "3dde4c1936e8b5583a5adda429de7a6a6e14295d09434591d65ad52c7009cf9a" + + # Bugfix in building documentation + # Remove on next version bump + patch do + url "https://github.com/agda/cubical/commit/294e7960eeb03a3a5f9041e49980b061e4a4a51b.patch?full_index=1" + sha256 "d845f5e7cfc17a7324d883a20e701e69fe2a3036c6da9b3837c0c6558136e138" + end + end + + resource "categories" do + # Use git checkout due to `git ls-tree` usage in Makefile + url "https://github.com/agda/agda-categories.git", + tag: "v0.3.0", + revision: "02be9337ad5bf0dedae84cefd58b11f25b18855a" + end + + resource "agda2hs" do + url "https://github.com/agda/agda2hs/archive/refs/tags/v1.4.tar.gz" + sha256 "e3f377b18a4545aea2cd9292f21962e896993be4b470f0b0a7865f3129688c6b" + end + end + + # The regex below is intended to match stable tags like `2.6.3` but not + # seemingly unstable tags like `2.6.3.20230930`. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)*\.\d{1,3})$/i) + end + + bottle do + sha256 arm64_tahoe: "67c4869f12105c37ce7d68aafc8ef8c6f86d1024ad8c82701515eee2f5271d70" + sha256 arm64_sequoia: "d9b340ab2150f6e9becd13e074ad823263f724d2ac26ce62ff90730f18ec3216" + sha256 arm64_sonoma: "3ac61a6a0e70f1ff409d14feb6f9b393d7d8265397b20055b467a6664c858081" + sha256 sonoma: "4f0b8ad5cc891d516865477f8a2cd9968ed6d9eaf706a37885ad23774b1ad26f" + sha256 arm64_linux: "47ed5d37c034a4554932e439e03188cc20294b4158cefe140ac42ccb3e9534db" + sha256 x86_64_linux: "28ee793e66ef9bb78c80055e7f69f978ef2b5f5eae67d56d8f2ff2a47db5ac8f" + end + + head do + url "https://github.com/agda/agda.git", branch: "master" + + resource "stdlib" do + url "https://github.com/agda/agda-stdlib.git", branch: "master" + end + + resource "cubical" do + url "https://github.com/agda/cubical.git", branch: "master" + end + + resource "categories" do + url "https://github.com/agda/agda-categories.git", branch: "master" + end + + resource "agda2hs" do + url "https://github.com/agda/agda2hs.git", branch: "master" + end + end + + depends_on "cabal-install" => :build + depends_on "emacs" => :build + depends_on "ghc" + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + agda2hs_build = buildpath/"agda2hs" + # use pkgshare for write permissions needed to re-generate .agdai when using different options + agdaprim = pkgshare/"prim" + stdlib = pkgshare/"stdlib" + cubicallib = pkgshare/"cubical" + categorieslib = pkgshare/"categories" + agda2hs_lib = pkgshare/"agda2hs" + + resource("agda2hs").stage agda2hs_build + resource("stdlib").stage stdlib + resource("cubical").stage cubicallib + resource("categories").stage categorieslib + + # Set up the primitive library and data file directory ahead of time + mkdir_p agdaprim + ENV["Agda_datadir"] = agdaprim.to_s + + (buildpath/"cabal.project.local").write <<~HASKELL + packages: . #{agda2hs_build} + package Agda + flags: +optimise-heavily + HASKELL + + cabal_args = std_cabal_v2_args.map { |s| s.sub "=copy", "=symlink" } + # Reduce install size by dynamically linking to shared libraries in store-dir + # TODO: Linux support, related issue https://github.com/haskell/cabal/issues/9784 + cabal_args += %w[--enable-executable-dynamic --enable-shared] if OS.mac? + + # Expose certain packages for building and testing + exposed_packages = %w[base ieee754 text directory containers] + + system "cabal", "v2-update" + system "cabal", "--store-dir=#{libexec}", "v2-install", *exposed_packages, "--lib", *cabal_args + system "cabal", "--store-dir=#{libexec}", "v2-install", ".", agda2hs_build, *cabal_args + + # Write out the primitive library and data files + system bin/"agda", "--setup" + system bin/"agda", "--emacs-mode", "compile" + + # Allow build scripts to find stdlib and just built agda binary + Pathname("#{Dir.home}/.config/agda/libraries").write "#{stdlib}/standard-library.agda-lib" + ENV.prepend_path "PATH", bin + + # work around issue related to find command on older macOS + inreplace cubicallib/"generate-everything.sh", "find Cubical/ ", "find Cubical " + + # Generate documentation and interface files. We build without extra options + # so generated interface files work on basic use case. Options like -Werror + # will need re-generation: https://github.com/agda/agda/issues/5151 + system "make", "-C", stdlib, "listings", "AGDA_OPTIONS=" + system "make", "-C", cubicallib, "listings", "AGDA_FLAGS=" + system "make", "-C", categorieslib, "html", "OTHEROPTS=" + + # Clean up references to Homebrew shims and temporary generated files + rm_r("#{stdlib}/dist-newstyle") + + # Move the agda2hs support libraries into place + agda2hs_lib.install (agda2hs_build/"lib").subdirs + + # generate interface files for agda2hs libraries + cd agda2hs_lib/"base" do + system bin/"agda", "--no-default-libraries", + "--build-library" + end + cd agda2hs_lib/"containers" do + system bin/"agda", "--no-default-libraries", + "--library-file=./agda2hs-libraries", + "--build-library" + # adapted from upstream at + # https://github.com/agda/agda2hs/blob/master/lib/containers/generate-haskell.sh + system bin/"agda2hs", "--no-default-libraries", + "--library-file=./agda2hs-libraries", + "-o", "./haskell", + "./agda/Containers.agda" + end + + # make the binaries into env scripts so that the primitive files can be picked up automatically + # cannot use env_script_all_files for this because these are symlinks + bin.each_child do |f| + real_f = f.realpath + f.delete + f.write_env_script(real_f, Agda_datadir: agdaprim.to_s) + end + + # write out the example libraries and defaults files for users to copy + (pkgshare/"example-libraries").write <<~TEXT + #{opt_pkgshare}/stdlib/standard-library.agda-lib + #{opt_pkgshare}/stdlib/doc/standard-library-doc.agda-lib + #{opt_pkgshare}/stdlib/tests/standard-library-tests.agda-lib + #{opt_pkgshare}/cubical/cubical.agda-lib + #{opt_pkgshare}/categories/agda-categories.agda-lib + #{opt_pkgshare}/agda2hs/base/base.agda-lib + #{opt_pkgshare}/agda2hs/containers/containers.agda-lib + TEXT + (pkgshare/"example-defaults").write <<~TEXT + standard-library + cubical + agda-categories + agda2hs-base + agda2hs-containers + TEXT + end + + def caveats + <<~EOS + To use the installed Agda libraries, execute the following commands: + + mkdir -p $HOME/.config/agda + cp #{opt_pkgshare}/example-libraries $HOME/.config/agda/libraries + cp #{opt_pkgshare}/example-defaults $HOME/.config/agda/defaults + + You can then inspect the copied files and customize them as needed. + If you have upgraded your Agda installation from a previous version, you may need to redo this. + EOS + end + + test do + Pathname("#{Dir.home}/.config/agda").install_symlink opt_pkgshare/"example-libraries" => "libraries" + Pathname("#{Dir.home}/.config/agda").install_symlink opt_pkgshare/"example-defaults" => "defaults" + + simpletest = testpath/"SimpleTest.agda" + simpletest.write <<~AGDA + {-# OPTIONS --safe --cubical-compatible #-} + module SimpleTest where + + infix 4 _≡_ + data _≡_ {A : Set} (x : A) : A → Set where + refl : x ≡ x + + cong : ∀ {A B : Set} (f : A → B) {x y} → x ≡ y → f x ≡ f y + cong f refl = refl + AGDA + + stdlibtest = testpath/"StdlibTest.agda" + stdlibtest.write <<~AGDA + module StdlibTest where + + open import Data.Nat + open import Relation.Binary.PropositionalEquality + + +-assoc : ∀ m n o → (m + n) + o ≡ m + (n + o) + +-assoc zero _ _ = refl + +-assoc (suc m) n o = cong suc (+-assoc m n o) + AGDA + + cubicaltest = testpath/"CubicalTest.agda" + cubicaltest.write <<~AGDA + {-# OPTIONS --cubical --guardedness #-} + module CubicalTest where + + open import Cubical.Foundations.Prelude + open import Cubical.Foundations.Isomorphism + open import Cubical.Foundations.Univalence + open import Cubical.Data.Int + + suc-equiv : ℤ ≡ ℤ + suc-equiv = ua (isoToEquiv (iso sucℤ predℤ sucPred predSuc)) + AGDA + + categoriestest = testpath/"CategoriesTest.agda" + categoriestest.write <<~AGDA + module CategoriesTest where + + open import Level using (zero) + open import Data.Empty + open import Data.Quiver + open Quiver + + empty-quiver : Quiver zero zero zero + Obj empty-quiver = ⊥ + _⇒_ empty-quiver () + _≈_ empty-quiver {()} + equiv empty-quiver {()} + AGDA + + iotest = testpath/"IOTest.agda" + iotest.write <<~AGDA + module IOTest where + + open import Agda.Builtin.IO + open import Agda.Builtin.Unit + + postulate + return : ∀ {A : Set} → A → IO A + + {-# COMPILE GHC return = \\_ -> return #-} + + main : _ + main = return tt + AGDA + + agda2hstest = testpath/"Agda2HsTest.agda" + agda2hstest.write <<~AGDA + {-# OPTIONS --erasure #-} + module Agda2HsTest where + open import Haskell.Prelude + + _≤_ : {{Ord a}} → a → a → Set + x ≤ y = (x <= y) ≡ True + + data BST (a : Set) {{@0 _ : Ord a}} (@0 lower upper : a) : Set where + Leaf : (@0 pf : lower ≤ upper) → BST a lower upper + Node : (x : a) (l : BST a lower x) (r : BST a x upper) → BST a lower upper + + {-# COMPILE AGDA2HS BST #-} + AGDA + + agda2hsout = testpath/"Agda2HsTest.hs" + agda2hsexpect = <<~HASKELL + module Agda2HsTest where + + data BST a = Leaf + | Node a (BST a) (BST a) + + HASKELL + + # typecheck a simple module + system bin/"agda", simpletest + + # typecheck a module that uses the standard library + system bin/"agda", stdlibtest + + # typecheck a module that uses the cubical library + system bin/"agda", cubicaltest + + # typecheck a module that uses the categories library + system bin/"agda", categoriestest + + # compile a simple module using the JS backend + system bin/"agda", "--js", simpletest + + # test the GHC backend; compile and run a simple program + system bin/"agda", "--compile", iotest + assert_empty shell_output(testpath/"IOTest") + + # translate a simple file via agda2hs + system bin/"agda2hs", "--out-dir=#{testpath}", agda2hstest + assert_equal agda2hsexpect, agda2hsout.read + end +end +__END__ +diff --git a/doc/README/Data/Fin/Relation/Unary/Top.agda b/doc/README/Data/Fin/Relation/Unary/Top.agda +index 390a48d58f49a595a3a12e4474e4ef2f122ed1da..181520b87f0f2fca43f62ca7ce9741d8929dd9bb 100644 +--- a/doc/README/Data/Fin/Relation/Unary/Top.agda ++++ b/doc/README/Data/Fin/Relation/Unary/Top.agda +@@ -94,7 +94,7 @@ open WF using (Acc; acc) + induct : ∀ {i} → Acc _>_ i → P i + induct {i} (acc rec) with view i + ... | ‵fromℕ = Pₙ +- ... | ‵inject₁ j = Pᵢ₊₁⇒Pᵢ j (induct (rec _ inject₁[j]+1≤[j+1])) ++ ... | ‵inject₁ j = Pᵢ₊₁⇒Pᵢ j (induct (rec inject₁[j]+1≤[j+1])) + where + inject₁[j]+1≤[j+1] : suc (toℕ (inject₁ j)) ≤ toℕ (suc j) + inject₁[j]+1≤[j+1] = ≤-reflexive (toℕ-inject₁ (suc j)) diff --git a/Formula/a/age-plugin-se.rb b/Formula/a/age-plugin-se.rb new file mode 100644 index 0000000000000..bd2d3ac0453a2 --- /dev/null +++ b/Formula/a/age-plugin-se.rb @@ -0,0 +1,38 @@ +class AgePluginSe < Formula + desc "Age plugin for Apple Secure Enclave" + homepage "https://github.com/remko/age-plugin-se" + url "https://github.com/remko/age-plugin-se/archive/refs/tags/v0.1.4.tar.gz" + sha256 "52d9b9583783988fbe5e94bbe72089a870d128a2eba197fc09a95c13926fb27a" + license "MIT" + head "https://github.com/remko/age-plugin-se.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55a0b7d025debf0f2de2c023e0590391e04deedea8c90068d041dd2926616d26" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1a850c11897c463a544f04473ce8ed580cba03618ff480e6acf5c7ed4d856bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fdafa89da43cac1983dbc16e5f974766b729c8eda0fe79b67f85f55c546da28f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a1e9f1d63e3860bb88c049baa8b4adaacb3263ce69b95b3bd78951752ad576fe" + sha256 cellar: :any_skip_relocation, sonoma: "599dfc3ab78c9c6cf7bbacf9e3e0feab93a092d7689b66d485a6c8fc5971cdcc" + sha256 cellar: :any_skip_relocation, ventura: "b5be656138ce5035388f1430e884a0ef0424464c409c45d1ef1a7d8f439f83d3" + end + + depends_on "scdoc" => :build + depends_on xcode: ["14.0", :build] + depends_on "age" => :test + depends_on :macos + depends_on macos: :ventura + + def install + system "make", "PREFIX=#{prefix}", "RELEASE=1", "all" + system "make", "PREFIX=#{prefix}", "RELEASE=1", "install" + end + + test do + (testpath/"secret.txt").write "My secret" + system "age", "--encrypt", + "-r", "age1se1qgg72x2qfk9wg3wh0qg9u0v7l5dkq4jx69fv80p6wdus3ftg6flwg5dz2dp", + "-o", "secret.txt.age", "secret.txt" + assert_path_exists testpath/"secret.txt.age" + + assert_match version.to_s, shell_output("#{bin}/age-plugin-se --version") + end +end diff --git a/Formula/a/age-plugin-yubikey.rb b/Formula/a/age-plugin-yubikey.rb new file mode 100644 index 0000000000000..fcc90d3982a41 --- /dev/null +++ b/Formula/a/age-plugin-yubikey.rb @@ -0,0 +1,36 @@ +class AgePluginYubikey < Formula + desc "Plugin for encrypting files with age and PIV tokens such as YubiKeys" + homepage "https://github.com/str4d/age-plugin-yubikey" + url "https://github.com/str4d/age-plugin-yubikey/archive/refs/tags/v0.5.0.tar.gz" + sha256 "65807403f0098569a473ffa76302b205da148a7f46b61fd331b8e323959978ba" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/str4d/age-plugin-yubikey.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6801ea0c59df5851fb1340474d8e2f910ca64ce254cac752b5a02c1a21fbc723" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c1abec9dc0158b55ab98a0e85e1e25ae5f9fded57604288b4f7991b38526dbd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b00a1b3384bb12abb53559e7d45f7c00bc59cf253d437365ce1d9eba65c1ed43" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e53f702fa0b8742fa519c6605ce75ac46338e9cac6b5e94f28f5e1ac32476449" + sha256 cellar: :any_skip_relocation, arm64_monterey: "12d3c578b51f4fa1a2b4c75fbbee4a5a749552a8e9f5df6f9cd0a6a15877f10a" + sha256 cellar: :any_skip_relocation, sonoma: "2473cd4b99557da25b8e2899b5cccc8238a0cb9704be98fb274438e06593cf09" + sha256 cellar: :any_skip_relocation, ventura: "e5b92cc016f5f44f1c646dd717fd2b502f32fe69e6f1d4272f65f417d96b622d" + sha256 cellar: :any_skip_relocation, monterey: "4dd83632a9120d7c0bd3d8cc220bba2bd9ef0530370b7a87276d9d7627925a33" + sha256 cellar: :any_skip_relocation, arm64_linux: "db8aff3d27ae723dde79b70043a3a2dce5ade95446c7d3ece767cf56a29679ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82643b04b611338208b3bed82b767ade73d25bf088ee7bac22d678f4ce0b7651" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "pcsc-lite" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ENV["LANG"] = "en_US.UTF-8" + assert_match "Let's get your YubiKey set up for age!", + shell_output("#{bin}/age-plugin-yubikey 2>&1", 1) + end +end diff --git a/Formula/a/age.rb b/Formula/a/age.rb new file mode 100644 index 0000000000000..f10eea6eb38d8 --- /dev/null +++ b/Formula/a/age.rb @@ -0,0 +1,36 @@ +class Age < Formula + desc "Simple, modern, secure file encryption" + homepage "https://github.com/FiloSottile/age" + url "https://github.com/FiloSottile/age/archive/refs/tags/v1.2.1.tar.gz" + sha256 "93bd89a16c74949ee7c69ef580d8e4cf5ce03e7d9c461b68cf1ace3e4017eef5" + license "BSD-3-Clause" + head "https://github.com/FiloSottile/age.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c690cb985f65f678b227175723ef9bc12ea8c598b9200a8cb2b90cece7e0509e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "705c020da53169d3d628c90d98ffdbd0029da3e3ecfe84cca12a20fa4e0b76a1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "705c020da53169d3d628c90d98ffdbd0029da3e3ecfe84cca12a20fa4e0b76a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "705c020da53169d3d628c90d98ffdbd0029da3e3ecfe84cca12a20fa4e0b76a1" + sha256 cellar: :any_skip_relocation, sonoma: "5e44ff70a1bd1addf97fd49eab60126015d8f477493426a02866b927fa4cc485" + sha256 cellar: :any_skip_relocation, ventura: "5e44ff70a1bd1addf97fd49eab60126015d8f477493426a02866b927fa4cc485" + sha256 cellar: :any_skip_relocation, arm64_linux: "07553aac53785aceee7c03c807ab7b4d6b90770be185a0888ae7b1b7b635de9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "216ab3d1d02b2a71ff4003357d434c25d9e0357d7ac18f88ff5de2a645382c59" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/age" + system "go", "build", *std_go_args(ldflags:, output: bin/"age-keygen"), "./cmd/age-keygen" + + man1.install "doc/age.1" + man1.install "doc/age-keygen.1" + end + + test do + system bin/"age-keygen", "-o", "key.txt" + pipe_output("#{bin}/age -e -i key.txt -o test.age", "test", 0) + assert_equal "test", shell_output("#{bin}/age -d -i key.txt test.age") + end +end diff --git a/Formula/a/agedu.rb b/Formula/a/agedu.rb new file mode 100644 index 0000000000000..3a367c792e646 --- /dev/null +++ b/Formula/a/agedu.rb @@ -0,0 +1,40 @@ +class Agedu < Formula + desc "Unix utility for tracking down wasted disk space" + homepage "https://www.chiark.greenend.org.uk/~sgtatham/agedu/" + url "https://www.chiark.greenend.org.uk/~sgtatham/agedu/agedu-20241013.3622eda.tar.gz" + version "20241013" + sha256 "3f77cb2e4dd64c100f7a7b0789a6c06cc16f23e7fe78c1451f5020dd823cf2f8" + license "MIT" + head "https://git.tartarus.org/simon/agedu.git", branch: "main" + + livecheck do + url :homepage + regex(/href=.*?agedu[._-]v?(\d+(?:\.\d+)*)(?:[._-][\da-z]+)?\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "41f04708967fca0cee916a7361fc5aa4dd9c5bd3e639f1a1a9b83715d626e48d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d779cddebf2f281e0ac4ae36def487c0068283d2be92002709f23fd6f81d9d44" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1a1e5993b600a5ed4625628cd50e19cb46f8761e374d4d6b28be5d4f021c873" + sha256 cellar: :any_skip_relocation, arm64_ventura: "40c91107a019a0032e48dab8c7a03e9b9e30fb1b566940f09b59ed51055455b2" + sha256 cellar: :any_skip_relocation, sonoma: "17e793caa2392c484df501763ba40a368adbd1a093c37558690bb747eb95dd5c" + sha256 cellar: :any_skip_relocation, ventura: "5fa2adc1d4d7d12ab15c411da797706c7d7e9179b18408fd4a69ffc00d314ab0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e65d93a8c50262817c010ea8f441dd820485bec296d7fb559a89f1765a88edc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00ac7a445b632cb005add4e4d8a5aefeca4a537930de4c2638607ef3a1ed203b" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"agedu", "-s", "." + assert_path_exists testpath/"agedu.dat" + end +end diff --git a/Formula/a/agg.rb b/Formula/a/agg.rb new file mode 100644 index 0000000000000..ba6afe03b0912 --- /dev/null +++ b/Formula/a/agg.rb @@ -0,0 +1,35 @@ +class Agg < Formula + desc "Asciicast to GIF converter" + homepage "https://github.com/asciinema/agg" + url "https://github.com/asciinema/agg/archive/refs/tags/v1.7.0.tar.gz" + sha256 "8927e2f3b1db53feed2e74319497ddc8404ac7989cb592099c402fbd05d94aa4" + license "GPL-3.0-or-later" + head "https://github.com/asciinema/agg.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "111de71cf579f444632552967e802a4d2d2231783980257cb2074b6ea6c665aa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4e3d20e6feebfb8a7d3f6692b55fe9075a274e25371573506d1d0bd50b34854" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a768f00a227e2a9dab8573d3092c5bb3b809ead87b2796ee585e96642ae32d2a" + sha256 cellar: :any_skip_relocation, sonoma: "79ed3722522e61c4463f4a1635814d71c1a4d5549712abfe0684bc8ba8b7be63" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9d25a7264c451f75fe0183573f10c5419337eb81f86752c95e92c7cc9bc1d40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6e1e1877a7a54519c6cd15626e091d7f58de72bb3fa8763b46e85ead83f9c7b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.cast").write <<~EOS + {"version": 2, "width": 80, "height": 24, "timestamp": 1504467315, "title": "Demo", "env": {"TERM": "xterm-256color", "SHELL": "/bin/zsh"}} + [0.248848, "o", "\\u001b[1;31mHello \\u001b[32mWorld!\\u001b[0m\\n"] + [1.001376, "o", "That was ok\\rThis is better."] + [2.143733, "o", " "] + [6.541828, "o", "Bye!"] + EOS + system bin/"agg", "--verbose", "test.cast", "test.gif" + assert_path_exists testpath/"test.gif" + end +end diff --git a/Formula/a/aggregate.rb b/Formula/a/aggregate.rb new file mode 100644 index 0000000000000..393c9678b8d73 --- /dev/null +++ b/Formula/a/aggregate.rb @@ -0,0 +1,68 @@ +class Aggregate < Formula + desc "Optimizes lists of prefixes to reduce list lengths" + homepage "https://web.archive.org/web/20160716192438/freecode.com/projects/aggregate/" + url "https://ftp.isc.org/isc/aggregate/aggregate-1.6.tar.gz" + sha256 "166503005cd8722c730e530cc90652ddfa198a25624914c65dffc3eb87ba5482" + license "ISC" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acc66660e03c2394db8381da8ad5200a6a6f02fce14b1de748dd555f0f98ffa6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b7b89c9bc52c33559e7a3f8df32bb2a20b3fcdd1c5b5714452f1efe93f9467a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ed5b3fee9fdcadb6278923b3776739ef63226ae5ad3dbc024ddfc54e1eea0fc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "387184c17669967eb2af11d108d5bd53294ea7163a19ec3a2519449e3f8c24a6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "429949518b51d72ff7e05ebe6b0ae77a11d7aa593bcec67e0edd6477fe273a8d" + sha256 cellar: :any_skip_relocation, sonoma: "30003ce2979a313a92c3fe9ab684bed3082d5aa2e95d93858abff2a5df1766ea" + sha256 cellar: :any_skip_relocation, ventura: "33fa5a424f83152abf9eaaa93383cc165263e7404bbceae7f7ea84873cbe5f2d" + sha256 cellar: :any_skip_relocation, monterey: "b8cb4e13724b2c45889b17303bb378dd6444557aa0a0c3bb7a100643aabbde49" + sha256 cellar: :any_skip_relocation, big_sur: "ab6914ea220f96d957eb322596ddc34fb72e8beedaed0bc21ee5dbfb2d0c64ca" + sha256 cellar: :any_skip_relocation, catalina: "3e22a340761b031b33e9f4a48f39edd98c18f7ea7c77abd02d95f816e7fe7245" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba57c28f3e39be87d0283a8365934747979b67e5d692f86fc869f1e6f88d119c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed89de5c64cf464e1002d2b16aaa6749a68b113199dd702077a36db84a1a7ae1" + end + + deprecate! date: "2024-05-04", because: :repo_removed + disable! date: "2025-05-05", because: :repo_removed + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + bin.mkpath + man1.mkpath + + # Makefile doesn't respect --mandir or MANDIR + inreplace "Makefile.in", "$(prefix)/man/man1", "$(prefix)/share/man/man1" + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "CFLAGS=#{ENV.cflags}", + "LDFLAGS=#{ENV.ldflags}", + "install" + end + + test do + # Test case taken from here: https://horms.net/projects/aggregate/examples.shtml + test_input = <<~EOS + 10.0.0.0/19 + 10.0.255.0/24 + 10.1.0.0/24 + 10.1.1.0/24 + 10.1.2.0/24 + 10.1.2.0/25 + 10.1.2.128/25 + 10.1.3.0/25 + EOS + + expected_output = <<~EOS + 10.0.0.0/19 + 10.0.255.0/24 + 10.1.0.0/23 + 10.1.2.0/24 + 10.1.3.0/25 + EOS + + assert_equal expected_output, pipe_output(bin/"aggregate", test_input), "Test Failed" + end +end diff --git a/Formula/a/aha.rb b/Formula/a/aha.rb new file mode 100644 index 0000000000000..d2fc58986607d --- /dev/null +++ b/Formula/a/aha.rb @@ -0,0 +1,35 @@ +class Aha < Formula + desc "ANSI HTML adapter" + homepage "https://github.com/theZiz/aha" + url "https://github.com/theZiz/aha/archive/refs/tags/0.5.1.tar.gz" + sha256 "6aea13487f6b5c3e453a447a67345f8095282f5acd97344466816b05ebd0b3b1" + license any_of: ["LGPL-2.0-or-later", "MPL-1.1"] + head "https://github.com/theZiz/aha.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c5c635a3945439e2666c6387fc7adf040ae53448b69cdd10ead335c19238abe0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16696aeddc832f4f9f7c61ce7d3e6a8327f229bdeb941aded1bce4b2285f8470" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1df76aba65188e22f99b5229fdfc0435cd0e1e747d8596e64cee739bb679fb6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73761c6952a8eb254cf92b17f685bc1cb107d7f075e8e54ae97fc66bdf3b6707" + sha256 cellar: :any_skip_relocation, arm64_monterey: "638f024391f63bcaeb96fc614f0bd1d18ca42a42db7aaaacf939c5a473aa70b5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fed59f6650f5b40100644b0baf1bee57b0b3ca6a05d413af70350d9d0eaa8441" + sha256 cellar: :any_skip_relocation, sonoma: "759a0282561b295214bc58c2ef10c3e0209a499dd03431e72aad7279eb26cc56" + sha256 cellar: :any_skip_relocation, ventura: "3c9adaf83f5ed9e8a0f6c6596888f97199f18900c203765b86b658a72036c145" + sha256 cellar: :any_skip_relocation, monterey: "ea27c4b1e45d668521568a5d5e425dc607aadd74ac7378a6e100607a90330cbf" + sha256 cellar: :any_skip_relocation, big_sur: "68281908da802d600716d979b84a47109fabd6770da0cc9a1a689b609b2024b8" + sha256 cellar: :any_skip_relocation, catalina: "bcd5f7ea0e30795e05719351823769f9a7ac434e57bf09cb738eeef50c0f0f85" + sha256 cellar: :any_skip_relocation, arm64_linux: "da606271d62f24440590f2b791073d6507f1eeff55f96134023dea46464e0095" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c018344a8a20792dbcc444893c62279ea87a97539e1cf0141ddf7b2cf538a9fb" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + out = pipe_output(bin/"aha", "rainpill", 0) + assert_match(/color:purple;">rain.*color:blue;">pill/, out) + end +end diff --git a/Formula/a/ahcpd.rb b/Formula/a/ahcpd.rb new file mode 100644 index 0000000000000..44a0154fc31f6 --- /dev/null +++ b/Formula/a/ahcpd.rb @@ -0,0 +1,93 @@ +class Ahcpd < Formula + desc "Autoconfiguration protocol for IPv6 and IPv6/IPv4 networks" + homepage "https://www.irif.fr/~jch/software/ahcp/" + url "https://www.irif.fr/~jch/software/files/ahcpd-0.53.tar.gz" + sha256 "a4622e817d2b2a9b878653f085585bd57f3838cc546cca6028d3b73ffcac0d52" + license "MIT" + + livecheck do + url "https://www.irif.fr/~jch/software/files/" + regex(/href=.*?ahcpd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7eb4adae6d9931eb81c4241ddb5475152e5908ba3fa4f1e3903aeb2f36f050ee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4963298b5a52bcbef584be986fe4a4223a30aefffd2ab6f8372c63c6f8edf075" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b32065d48213f53843b0d0fbc736413cd84da5f87af3a6f1a3d283c6652538f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8723c6d7d09c03950c296db788a025635ff54314925db39294d96f1d088111bc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3ca4d84aac5c8fe54641405340ea2a397a5c6916913b4bd70392d6beb08f8f2f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "49ef92eb18038f60e6419a5dfecd11be62f3b69cb4778c473050e5443e72ac06" + sha256 cellar: :any_skip_relocation, sonoma: "a37d96a87622ed0de7ce0c019cb5e763fbbc6f2eb1196a369edbe175635129c0" + sha256 cellar: :any_skip_relocation, ventura: "6a6b775a3d94c0e3635ee987c6ee0b0020668e6bd1c1676cbffc19f19fc3901e" + sha256 cellar: :any_skip_relocation, monterey: "d715f5dc18a9b7dbc91fd34a767c22519f71aabcb62c6a479986b6f6472ad71a" + sha256 cellar: :any_skip_relocation, big_sur: "3f3e332726a04e2cb6a639b18d0092a80cf8d83a9363e75c6579d73ba8ac4d16" + sha256 cellar: :any_skip_relocation, catalina: "9320f1465296a364f0d55ffca9342f087b781f0853ad2213b278189bfc062202" + sha256 cellar: :any_skip_relocation, arm64_linux: "3989aae71302502a2cd749f088ae640087fe698da1cfefc412a9806b7bfde281" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2007cca57256875a13c8dc554e48d2bbfc9b061101bbd2f24f07910b75f0aa00" + end + + patch :DATA + + def install + if OS.mac? + # LDLIBS='' fixes: ld: library not found for -lrt + system "make", "LDLIBS=''" + else + system "make" + end + system "make", "install", "PREFIX=", "TARGET=#{prefix}" + end + + test do + pid_file = testpath/"ahcpd.pid" + log_file = testpath/"ahcpd.log" + mkdir testpath/"leases" + + (testpath/"ahcpd.conf").write <<~EOS + mode server + + prefix fde6:20f5:c9ac:358::/64 + prefix 192.168.4.128/25 + lease-dir #{testpath}/leases + name-server fde6:20f5:c9ac:358::1 + name-server 192.168.4.1 + ntp-server 192.168.4.2 + EOS + + system bin/"ahcpd", "-c", "ahcpd.conf", "-I", pid_file, "-L", log_file, "-D", "lo0" + sleep(2) + + assert_path_exists pid_file, "The file containing the PID of the child process was not created." + assert_path_exists log_file, "The file containing the log was not created." + + Process.kill("TERM", pid_file.read.to_i) + end +end + +__END__ +diff --git a/Makefile b/Makefile +index e52eeb7..28e1043 100644 +--- a/Makefile ++++ b/Makefile +@@ -40,8 +40,8 @@ install.minimal: all + chmod +x $(TARGET)/etc/ahcp/ahcp-config.sh + + install: all install.minimal +- mkdir -p $(TARGET)$(PREFIX)/man/man8/ +- cp -f ahcpd.man $(TARGET)$(PREFIX)/man/man8/ahcpd.8 ++ mkdir -p $(TARGET)$(PREFIX)/share/man/man8/ ++ cp -f ahcpd.man $(TARGET)$(PREFIX)/share/man/man8/ahcpd.8 + + .PHONY: uninstall + +@@ -49,7 +49,7 @@ uninstall: + -rm -f $(TARGET)$(PREFIX)/bin/ahcpd + -rm -f $(TARGET)$(PREFIX)/bin/ahcp-config.sh + -rm -f $(TARGET)$(PREFIX)/bin/ahcp-dummy-config.sh +- -rm -f $(TARGET)$(PREFIX)/man/man8/ahcpd.8 ++ -rm -f $(TARGET)$(PREFIX)/share/man/man8/ahcpd.8 + + .PHONY: clean diff --git a/Formula/a/ahoy.rb b/Formula/a/ahoy.rb new file mode 100644 index 0000000000000..0b388eeb82673 --- /dev/null +++ b/Formula/a/ahoy.rb @@ -0,0 +1,39 @@ +class Ahoy < Formula + desc "Creates self documenting CLI programs from commands in YAML files" + homepage "https://github.com/ahoy-cli/ahoy/" + url "https://github.com/ahoy-cli/ahoy/archive/refs/tags/v2.5.0.tar.gz" + sha256 "e57f908df16c29d5e1b5e814496d0f9eb9e11a871ed68e1fd93aa286c557c540" + license "MIT" + head "https://github.com/ahoy-cli/ahoy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1d4f45c4c570160683c363f45827d0e8632297f68794018f8686ca1e88f02ee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39cc43e109a7f06f80f5bbea045f5877292645bebdc4e8dda3dcc60699bef370" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39cc43e109a7f06f80f5bbea045f5877292645bebdc4e8dda3dcc60699bef370" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39cc43e109a7f06f80f5bbea045f5877292645bebdc4e8dda3dcc60699bef370" + sha256 cellar: :any_skip_relocation, sonoma: "fde6ef7692a9bf8513258596831c349e349b49beea85ff7ba06c0046305e3156" + sha256 cellar: :any_skip_relocation, ventura: "fde6ef7692a9bf8513258596831c349e349b49beea85ff7ba06c0046305e3156" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d628f6bd4c2687f8b9736b8b365e311472af4b81dfe798014816b436e08d8fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "689b92185a351f9b622340c9fc7c1234df8a33e6bea026075bb79f52e2de13c5" + end + + depends_on "go" => :build + + def install + cd "v2" do + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}-homebrew") + end + end + + test do + (testpath/".ahoy.yml").write <<~YAML + ahoyapi: v2 + commands: + hello: + cmd: echo "Hello Homebrew!" + YAML + assert_equal "Hello Homebrew!\n", shell_output("#{bin}/ahoy hello") + + assert_equal "#{version}-homebrew", shell_output("#{bin}/ahoy --version").strip + end +end diff --git a/Formula/a/aiac.rb b/Formula/a/aiac.rb new file mode 100644 index 0000000000000..0667fadfe2651 --- /dev/null +++ b/Formula/a/aiac.rb @@ -0,0 +1,34 @@ +class Aiac < Formula + desc "Artificial Intelligence Infrastructure-as-Code Generator" + homepage "https://github.com/gofireflyio/aiac" + url "https://github.com/gofireflyio/aiac/archive/refs/tags/v5.3.0.tar.gz" + sha256 "45e48cd8958d835b402e0e68d7aa8b9642deb535464dad5d6b83fb8f8ed3d79e" + license "Apache-2.0" + head "https://github.com/gofireflyio/aiac.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd35116079cf1351dad53d6753863a5301638121559915331c21dcd2a8a10173" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4db2b9d958b304727cdaa0a7147908f4f01bdbe3ee2d43ade18426b9dfb6aeaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4db2b9d958b304727cdaa0a7147908f4f01bdbe3ee2d43ade18426b9dfb6aeaa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4db2b9d958b304727cdaa0a7147908f4f01bdbe3ee2d43ade18426b9dfb6aeaa" + sha256 cellar: :any_skip_relocation, sonoma: "2dbaa7b25dc9be8356f083cd11c3e5d6738b8b0545cac4f4000196bb4d2bf39a" + sha256 cellar: :any_skip_relocation, ventura: "2dbaa7b25dc9be8356f083cd11c3e5d6738b8b0545cac4f4000196bb4d2bf39a" + sha256 cellar: :any_skip_relocation, arm64_linux: "03d5c8fd027682c85c921bfa1fad5d4bb2b4ed7fa4c75f14777ec8c043ac9911" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e74cfb47682506cce9ef87848aa085274b067c36139d49cdbaee1ed9259c193" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/gofireflyio/aiac/v#{version.major}/libaiac.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/aiac --version") + assert_match "failed loading configuration", shell_output("#{bin}/aiac python print hello world 2>&1", 1) + end +end diff --git a/Formula/a/aichat.rb b/Formula/a/aichat.rb new file mode 100644 index 0000000000000..31c7c5b249279 --- /dev/null +++ b/Formula/a/aichat.rb @@ -0,0 +1,35 @@ +class Aichat < Formula + desc "All-in-one AI-Powered CLI Chat & Copilot" + homepage "https://github.com/sigoden/aichat" + url "https://github.com/sigoden/aichat/archive/refs/tags/v0.30.0.tar.gz" + sha256 "e194cc89afc213a6e3169738221cae641c347421c4f2aacd5d6f4f7cc6edb387" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sigoden/aichat.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb51a984d400d6c62b6978a9d9c1e13c5d3837d9d2aef4f1d838a03d5b127f3c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d1b2c49651e762004cdc4851d8397d8b5677cc0b804e67486bd35a8c7de99507" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da41c83eaba9327bf0ff11f2c7809905365e1d74743c9127cb2e6a3df86f660b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b003b5f94382d23b8dc1a44831a109372324c59f79f21dae668af357b3a7230" + sha256 cellar: :any_skip_relocation, sonoma: "3a3a2bb10971377b15727ca4fc7c2ba8eb905ef9034cfda97d58fff594e2b34a" + sha256 cellar: :any_skip_relocation, ventura: "1a636cf9b9e2bb24f2ee609400f204e6086f573a42e0fdab7809e0f305016978" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b3072ceed89d9206141fad174bdc04ca249f905917d2d6ddefd4fa00cc0d38e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dab29ef575f4af6926cba9b71dca94143c3363021c402262a1f1ad5a66af5dad" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "scripts/completions/aichat.bash" => "aichat" + fish_completion.install "scripts/completions/aichat.fish" + zsh_completion.install "scripts/completions/aichat.zsh" => "_aichat" + end + + test do + ENV["AICHAT_PLATFORM"] = "openai" + ENV["OPENAI_API_KEY"] = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + output = shell_output("#{bin}/aichat --dry-run math 3.2x4.8") + assert_match "math 3.2x4.8", output + end +end diff --git a/Formula/a/aicommit.rb b/Formula/a/aicommit.rb new file mode 100644 index 0000000000000..60296ff8b6006 --- /dev/null +++ b/Formula/a/aicommit.rb @@ -0,0 +1,34 @@ +class Aicommit < Formula + desc "AI-powered commit message generator" + homepage "https://github.com/coder/aicommit" + url "https://github.com/coder/aicommit/archive/refs/tags/v0.6.5.tar.gz" + sha256 "b89c00eabd881344a0e1ee3fe2d5bbf5005cfd19881f5d3a4b23bc8dd0a98a0b" + license "CC0-1.0" + head "https://github.com/coder/aicommit.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "076bbcf508c5867b4b0b525a0075200c671c2a5f909799ab4292bab2a4e93a30" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a7c316f47dae0539e95407a1d404c7ccbb37f771f6a9049e3abc6dc6421484c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a7c316f47dae0539e95407a1d404c7ccbb37f771f6a9049e3abc6dc6421484c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a7c316f47dae0539e95407a1d404c7ccbb37f771f6a9049e3abc6dc6421484c" + sha256 cellar: :any_skip_relocation, sonoma: "03e62c692d3d64bc97dd6a388a8e3b810c1c8d8830a76495e0c8a80a689655a4" + sha256 cellar: :any_skip_relocation, ventura: "03e62c692d3d64bc97dd6a388a8e3b810c1c8d8830a76495e0c8a80a689655a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "b473355665502296b1832fdc242a0056bac8dfec6eeb7fab010c89b596d3bb5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "848a5368d7881eb41335e58e54eb995252a4339ef65802360df8abcd05928b6b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=v#{version}"), "./cmd/aicommit" + end + + test do + assert_match "aicommit v#{version}", shell_output("#{bin}/aicommit version") + + system "git", "init", "--bare", "." + assert_match "err: $OPENAI_API_KEY is not set", shell_output("#{bin}/aicommit 2>&1", 1) + end +end diff --git a/Formula/a/aicommit2.rb b/Formula/a/aicommit2.rb new file mode 100644 index 0000000000000..6d10ed55766d0 --- /dev/null +++ b/Formula/a/aicommit2.rb @@ -0,0 +1,35 @@ +class Aicommit2 < Formula + desc "Reactive CLI that generates commit messages for Git and Jujutsu with AI" + homepage "https://github.com/tak-bro/aicommit2" + url "https://registry.npmjs.org/aicommit2/-/aicommit2-2.4.16.tgz" + sha256 "ad2c991bb4ceb09010aa8781e9ff6fd83762298789a86c8126d766a59bda6b5f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "bc428c6c12bbcbc181c0dbf14fd710f9a1bf445584412337fa6a931c3c8825a5" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/aicommit2 --version") + assert_match version.to_s, shell_output("#{bin}/aic2 --version") + + assert_match "Not in a Git repository", shell_output("#{bin}/aicommit2 2>&1", 1) + + system "git", "init" + assert_match "No staged changes found", shell_output("#{bin}/aicommit2 2>&1", 1) + + (testpath/"test.txt").write "test content" + system "git", "add", "test.txt" + + assert_match "Please set at least one API key", shell_output("#{bin}/aicommit2 2>&1", 1) + shell_output("#{bin}/aicommit2 config set OPENAI.key=sk-test") + assert_match "key: 'sk-test'", shell_output("#{bin}/aicommit2 config get OPENAI") + end +end diff --git a/Formula/a/aicommits.rb b/Formula/a/aicommits.rb new file mode 100644 index 0000000000000..f61b07328ff35 --- /dev/null +++ b/Formula/a/aicommits.rb @@ -0,0 +1,33 @@ +class Aicommits < Formula + desc "Writes your git commit messages for you with AI" + homepage "https://github.com/Nutlope/aicommits" + url "https://registry.npmjs.org/aicommits/-/aicommits-1.11.0.tgz" + sha256 "b74cf25eb31eb7098d01f482cd64a87e2f59d7efa11f5273fbb353f35e850c5d" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a95d423b81063b3a9f2772969b4b627aacf2c173d841ab5cb6659c4224ecdf27" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "The current directory must be a Git repository!", shell_output(bin/"aicommits", 1) + + system "git", "init" + assert_match "No staged changes found. Stage your changes manually, or automatically stage all changes with the", + shell_output(bin/"aicommits", 1) + touch "test.txt" + system "git", "add", "test.txt" + assert_match "Please set your OpenAI API key via `aicommits config set OPENAI_KEY=`", + shell_output(bin/"aicommits", 1) + end +end diff --git a/Formula/a/aide.rb b/Formula/a/aide.rb new file mode 100644 index 0000000000000..f27c61de83146 --- /dev/null +++ b/Formula/a/aide.rb @@ -0,0 +1,76 @@ +class Aide < Formula + desc "File and directory integrity checker" + homepage "https://aide.github.io/" + url "https://github.com/aide/aide/releases/download/v0.19.2/aide-0.19.2.tar.gz" + sha256 "23762b05f46111edeb3c8a05016c8731c01bdb8c1f91be48c156c31ab85e74c4" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a947c75c477cf411400106de11a991089a34c6078ddb353c17fe93425f546468" + sha256 cellar: :any, arm64_sequoia: "9e5b60be5b1430a10b7c986292bfec5197b6c7af149ee8c599cec7c65309d264" + sha256 cellar: :any, arm64_sonoma: "7806be9d00e0f7692ed878edae17173fad9b008501c611b48d0abb0c05055274" + sha256 cellar: :any, arm64_ventura: "4ce4a584208aec836c39a954a59970511898e3cb67db66a0054be1a52f7137cf" + sha256 cellar: :any, sonoma: "ca382368cb70c1d567c2b9d61394f3f27db967b4e86ce570fa4d06f1d66c2d3b" + sha256 cellar: :any, ventura: "7a15c93adff7e9a842966ab65b253d3dbcc2e7a30f54d20971e55f54aaab29a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3da22175d632c8fbbfc6ba3b7ea851c15ebcb7628d31830f8923cf063acb861" + sha256 cellar: :any_skip_relocation, x86_64_linux: "886b88eb65a9e7affb0b9f504e45f72bbbbeaefeef112d77a0eb0fbc6c2d55db" + end + + head do + url "https://github.com/aide/aide.git", branch: "master" + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "bison" => :build + end + + depends_on "pkgconf" => :build + + depends_on "libgcrypt" + depends_on "libgpg-error" + depends_on "pcre2" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + conflicts_with cask: "aide-app" + + def install + # use sdk's strnstr instead + ENV.append_to_cflags "-DHAVE_STRNSTR" + + system "sh", "./autogen.sh" if build.head? + + args = %W[ + --disable-static + --with-zlib + --sysconfdir=#{etc} + ] + + args << if OS.mac? + "--with-curl" + else + "--with-curl=#{Formula["curl"].prefix}" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"aide.conf").write <<~EOS + database_in = file:/var/lib/aide/aide.db + database_out = file:/var/lib/aide/aide.db.new + database_new = file:/var/lib/aide/aide.db.new + gzip_dbout = yes + report_summarize_changes = yes + report_grouped = yes + log_level = info + database_attrs = sha256 + /etc p+i+u+g+sha256 + EOS + system bin/"aide", "--config-check", "-c", "aide.conf" + end +end diff --git a/Formula/a/aider.rb b/Formula/a/aider.rb new file mode 100644 index 0000000000000..b65b342abe055 --- /dev/null +++ b/Formula/a/aider.rb @@ -0,0 +1,656 @@ +class Aider < Formula + include Language::Python::Virtualenv + + desc "AI pair programming in your terminal" + homepage "https://aider.chat/" + url "https://files.pythonhosted.org/packages/87/60/42ee32c47d6711635d591c729eea6bc56fa244099a18e0b82da064951af9/aider_chat-0.86.1.tar.gz" + sha256 "48e489d20a4dfdd90ac4acc781f0170f688aaa5c5f2017d035e2d947fb801bbb" + license "Apache-2.0" + revision 1 + head "https://github.com/Aider-AI/aider.git", branch: "main" + + no_autobump! because: "has non-PyPI resources" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c9670f9c05f57b607dcc518fe3271e48eca372a7429351996b387e12e65e69ff" + sha256 cellar: :any, arm64_sequoia: "d2f45f468c19a7d29c7cb2b8882b551009ac43e3b50ae4b7bac294c8a3ff075c" + sha256 cellar: :any, arm64_sonoma: "f6732c1c087ba8fa961ef493553f6d7e9bf793a07f943adba9de0533b02821de" + sha256 cellar: :any, sonoma: "a925911560bece950ceff26cdf09e56976f4523b7b4c394fe91b34d5d84f9616" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7289c98bf2792551be208d379e38745486f731e76244927a95daaebe9094035" + sha256 cellar: :any_skip_relocation, x86_64_linux: "770986e10792d59817c160930708e1b300da50e62826f65ad7f6dde6e03ea5eb" + end + + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build # for pydantic_core + + depends_on "certifi" => :no_linkage + depends_on "freetype" + depends_on "gcc" # for gfortran + depends_on "jpeg-turbo" + depends_on "libyaml" + depends_on "openblas" + depends_on "python@3.12" # py3.13 support issue, https://github.com/Aider-AI/aider/issues/3037 + + uses_from_macos "libffi" + uses_from_macos "zlib" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: "certifi" + + # One way to update python resources: + # 1. remove GitHub url resources + # 2. run `brew update-python-resources aider` + # 3. use GitHub urls for any incomplete tree-sitter-* sdists (missing C headers) + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/9b/e7/d92a237d8802ca88483906c388f7c201bbe96cd80a165ffd0ac2f6a8d59f/aiohttp-3.12.15.tar.gz" + sha256 "4fc61385e9c98d72fcdf47e6dd81833f47b2f77c114c29cd64a361be57a763a2" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/f1/b4/636b3b65173d3ce9a38ef5f0522789614e590dab6a8d505340a4efe4c567/anyio-4.10.0.tar.gz" + sha256 "3f3fae35c96039744587aa5b8371e7e8e603c0702999535961dd336026973ba6" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "backoff" do + url "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz" + sha256 "03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/6c/81/3747dad6b14fa2cf53fcf10548cf5aea6913e96fab41a3c198676f8948a5/cachetools-5.5.2.tar.gz" + sha256 "1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "diff-match-patch" do + url "https://files.pythonhosted.org/packages/0e/ad/32e1777dd57d8e85fa31e3a243af66c538245b8d64b7265bec9a61f2ca33/diff_match_patch-20241021.tar.gz" + sha256 "beae57a99fa48084532935ee2968b8661db861862ec82c6f21f4acdd6d835073" + end + + resource "diskcache" do + url "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz" + sha256 "2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "flake8" do + url "https://files.pythonhosted.org/packages/9b/af/fbfe3c4b5a657d79e5c47a2827a362f9e1b763336a52f926126aa6dc7123/flake8-7.3.0.tar.gz" + sha256 "fe044858146b9fc69b551a4b490d69cf960fcb78ad1edcb84e7fbb1b4a8e3872" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/79/b1/b64018016eeb087db503b038296fd782586432b9c077fc5c7839e9cb6ef6/frozenlist-1.7.0.tar.gz" + sha256 "2e310d81923c2437ea8670467121cc3e9b0f76d3043cc1d2331d56c7fb7a3a8f" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/8b/02/0835e6ab9cfc03916fe3f78c0956cfcdb6ff2669ffa6651065d5ebf7fc98/fsspec-2025.7.0.tar.gz" + sha256 "786120687ffa54b8283d942929540d8bc5ccfa820deb555a2b5d0ed2b737bf58" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "google-ai-generativelanguage" do + url "https://files.pythonhosted.org/packages/11/d1/48fe5d7a43d278e9f6b5ada810b0a3530bbeac7ed7fcbcd366f932f05316/google_ai_generativelanguage-0.6.15.tar.gz" + sha256 "8f6d9dc4c12b065fe2d0289026171acea5183ebf2d0b11cefe12f3821e159ec3" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/dc/21/e9d043e88222317afdbdb567165fdbc3b0aad90064c7e0c9eb0ad9955ad8/google_api_core-2.25.1.tar.gz" + sha256 "d2aaa0b13c78c61cb3f4282c464c046e45fbd75755683c9c525e6e8f7ed0a5e8" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/99/98/916385a87d145a27661b630c480fadf9db32bb1ad9fb1b13e8dbcbe2af70/google_api_python_client-2.178.0.tar.gz" + sha256 "99cba921eb471bb5973b780c653ac54d96eef8a42f1b7375b7ab98f257a4414c" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/9e/9b/e92ef23b84fa10a64ce4831390b7a4c2e53c0132568d99d4ae61d04c8855/google_auth-2.40.3.tar.gz" + sha256 "500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "google-generativeai" do + url "https://files.pythonhosted.org/packages/6e/40/c42ff9ded9f09ec9392879a8e6538a00b2dc185e834a3392917626255419/google_generativeai-0.8.5-py3-none-any.whl" + sha256 "22b420817fb263f8ed520b33285f45976d5b21e904da32b80d4fd20c055123a2" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz" + sha256 "0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257" + end + + resource "grep-ast" do + url "https://files.pythonhosted.org/packages/67/82/a87079945a7c15d242cb586ae22e17952132439eaa9c878ec5fbdc61c54d/grep_ast-0.9.0.tar.gz" + sha256 "620a242a4493e6721338d1c9a6c234ae651f8774f4924a6dcf90f6865d4b2ee3" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/38/b4/35feb8f7cab7239c5b94bd2db71abb3d6adb5f335ad8f131abb6060840b6/grpcio-1.74.0.tar.gz" + sha256 "80d1f4fbb35b0742d3e3d3bb654b7381cd5f015f8497279a1e9c21ba623e01b1" + end + + resource "grpcio-status" do + url "https://files.pythonhosted.org/packages/fd/d1/b6e9877fedae3add1afdeae1f89d1927d296da9cf977eca0eb08fb8a460e/grpcio_status-1.71.2.tar.gz" + sha256 "c7a97e176df71cdc2c179cd1847d7fc86cca5832ad12e9798d7fed6b7a1aab50" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hf-xet" do + url "https://files.pythonhosted.org/packages/b2/0a/a0f56735940fde6dd627602fec9ab3bad23f66a272397560abd65aba416e/hf_xet-1.1.7.tar.gz" + sha256 "20cec8db4561338824a3b5f8c19774055b04a8df7fff0cb1ff2cb1a0c1607b80" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/3d/ad/2371116b22d616c194aa25ec410c9c6c37f23599dcd590502b74db197584/httplib2-0.22.0.tar.gz" + sha256 "d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "huggingface-hub" do + url "https://files.pythonhosted.org/packages/91/b4/e6b465eca5386b52cf23cb6df8644ad318a6b0e12b4b96a7e0be09cbfbcc/huggingface_hub-0.34.3.tar.gz" + sha256 "d58130fd5aa7408480681475491c0abd7e835442082fbc3ef4d45b6c39f83853" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/72/33d1bb4be61f1327d3cd76fc41e2d001a6b748a0648d944c646643f123fe/importlib_metadata-7.2.1.tar.gz" + sha256 "509ecb2ab77071db5137c655e24ceb3eee66e7bbc6574165d0d114d9fc4bbe68" + end + + resource "importlib-resources" do + url "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz" + sha256 "185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/ee/9d/ae7ddb4b8ab3fb1b51faf4deb36cb48a4fbbd7cb36bad6a5fca4741306f7/jiter-0.10.0.tar.gz" + sha256 "07a7142c38aacc85194391108dc91b5b57093c978a9932bd86a36862759d9500" + end + + resource "json5" do + url "https://files.pythonhosted.org/packages/12/be/c6c745ec4c4539b25a278b70e29793f10382947df0d9efba2fa09120895d/json5-0.12.0.tar.gz" + sha256 "0b4b6ff56801a1c7dc817b0241bca4ce474a0e6a163bfef3fc594d3fd263ff3a" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/d5/00/a297a868e9d0784450faa7365c2172a7d6110c763e30ba861867c32ae6a9/jsonschema-4.25.0.tar.gz" + sha256 "e63acf5c11762c0e6672ffb61482bdf57f0876684d8d249c0fe2d730d48bc55f" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "litellm" do + url "https://files.pythonhosted.org/packages/1b/28/50837cb0246c42a8caac45610572883de7f478543cf4d143e84f099c0234/litellm-1.75.0.tar.gz" + sha256 "ec7fbfe79e1b9cd4a2b36ca9e71e71959d8fc43305b222e5f257aced1a0d1d63" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mccabe" do + url "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz" + sha256 "348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "mixpanel" do + url "https://files.pythonhosted.org/packages/bd/a3/9d71562db2107da31be6a988cac88cd1be11364d103b618a98ba92d2487b/mixpanel-4.10.1.tar.gz" + sha256 "29a6b5773dd34f05cf8e249f4e1d16e7b6280d6b58894551ce9a5aad7700a115" + end + + resource "mslex" do + url "https://files.pythonhosted.org/packages/e0/97/7022667073c99a0fe028f2e34b9bf76b49a611afd21b02527fbfd92d4cd5/mslex-1.3.0.tar.gz" + sha256 "641c887d1d3db610eee2af37a8e5abda3f70b3006cdfd2d0d29dc0d1ae28a85d" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/3d/2c/5dad12e82fbdf7470f29bff2171484bf07cb3b16ada60a6589af8f376440/multidict-6.6.3.tar.gz" + sha256 "798a9eb12dab0a6c2e29c1de6f3468af5cb2da6053a20dfa3344907eed0937cc" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + end + + resource "numpy" do + url "https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz" + sha256 "2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/03/30/f0fb7907a77e733bb801c7bdcde903500b31215141cdb261f04421e6fbec/openai-1.99.1.tar.gz" + sha256 "2c9d8e498c298f51bb94bcac724257a3a6cac6139ccdfc1186c6708f7a93120f" + end + + resource "oslex" do + url "https://files.pythonhosted.org/packages/5e/a9/ebd426ee0ca59fb5ba8f0039c53989f4ca475f2dd9583b5719e2fb01602c/oslex-0.1.3.tar.gz" + sha256 "1ed4cd82c75df2a8bcb0da34400984183753933155d0c7d999fa533137685f2d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "pillow" do + url "https://files.pythonhosted.org/packages/f3/0d/d0d6dea55cd152ce3d6767bb38a8fc10e33796ba4ba210cbab9354b6d238/pillow-11.3.0.tar.gz" + sha256 "3828ee7586cd0b2091b6209e5ad53e20d0649bbe87164a459d0676e035e8f523" + end + + resource "posthog" do + url "https://files.pythonhosted.org/packages/97/56/d0f77d6b20d2c5a349fd4eae55389ab8769c95c99c9881c523f9809bdba6/posthog-6.4.1.tar.gz" + sha256 "751afaca4007855b3d848b69020c8c8f83a8d5f03a98b464e6a3b74c5a21bd22" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/a6/16/43264e4a779dd8588c21a70f0709665ee8f611211bdd2c87d952cfa7c776/propcache-0.3.2.tar.gz" + sha256 "20d7d62e4e7ef05f221e0db2856b979540686342e7dd9973b815599c7057e168" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/43/29/d09e70352e4e88c9c7a198d5645d7277811448d76c23b00345670f7c8a38/protobuf-5.29.5.tar.gz" + sha256 "bc1463bafd4b0929216c35f437a8e28731a2b7fe3d98bb77a600efced5a15c84" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycodestyle" do + url "https://files.pythonhosted.org/packages/11/e0/abfd2a0d2efe47670df87f3e3a0e2edda42f055053c85361f19c0e2c1ca8/pycodestyle-2.14.0.tar.gz" + sha256 "c4b5b517d278089ff9d0abdec919cd97262a3367449ea1c8b49b91529167b783" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/00/dd/4325abf92c39ba8623b5af936ddb36ffcfe0beae70405d456ab1fb2f5b8c/pydantic-2.11.7.tar.gz" + sha256 "d989c3c6cb79469287b1569f7447a17848c998458d49ebe294e975b9baf0f0db" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/ad/88/5f2260bdfae97aabf98f1778d43f69574390ad787afb646292a638c923d4/pydantic_core-2.33.2.tar.gz" + sha256 "7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc" + end + + resource "pydub" do + url "https://files.pythonhosted.org/packages/fe/9a/e6bca0eed82db26562c73b5076539a4a08d3cffd19c3cc5913a3e61145fd/pydub-0.25.1.tar.gz" + sha256 "980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f" + end + + resource "pyflakes" do + url "https://files.pythonhosted.org/packages/45/dc/fd034dc20b4b264b3d015808458391acbf9df40b1e54750ef175d39180b1/pyflakes-3.4.0.tar.gz" + sha256 "b24f96fafb7d2ab0ec5075b7350b3d2d2218eab42003821c06344973d3ea2f58" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pypandoc" do + url "https://files.pythonhosted.org/packages/e1/88/26e650d053df5f3874aa3c05901a14166ce3271f58bfe114fd776987efbd/pypandoc-1.15.tar.gz" + sha256 "ea25beebe712ae41d63f7410c08741a3cab0e420f6703f95bc9b3a749192ce13" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz" + sha256 "a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/0b/de/e13fa6dc61d78b30ba47481f99933a3b49a57779d625c392d8036770a60d/regex-2025.7.34.tar.gz" + sha256 "9ead9765217afd04a86822dfcd4ed2747dfe426e887da413b15ff0ac2457e21a" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fe/75/af448d8e52bf1d8fa6a9d089ca6c07ff4453d86c65c145d0a300bb073b9b/rich-14.1.0.tar.gz" + sha256 "e497a48b844b0320d45007cdebfeaeed8db2a4f4bcf49f15e455cfc4af11eaa8" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/1e/d9/991a0dee12d9fc53ed027e26a26a64b151d77252ac477e22666b9688bc16/rpds_py-0.27.0.tar.gz" + sha256 "8b23cf252f180cda89220b378d917180f29d313cd6a07b2431c0d3b776aae86f" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "scipy" do + url "https://files.pythonhosted.org/packages/0f/37/6964b830433e654ec7485e45a00fc9a27cf868d622838f6b6d9c5ec0d532/scipy-1.15.3.tar.gz" + sha256 "eae3cf522bc7df64b42cad3925c876e1b0b6c35c1337c93e12c0f366f55b0eaf" + end + + resource "shtab" do + url "https://files.pythonhosted.org/packages/5a/3e/837067b970c1d2ffa936c72f384a63fdec4e186b74da781e921354a94024/shtab-1.7.2.tar.gz" + sha256 "8c16673ade76a2d42417f03e57acf239bfb5968e842204c17990cae357d07d6f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "socksio" do + url "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz" + sha256 "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac" + end + + resource "sounddevice" do + url "https://files.pythonhosted.org/packages/91/a6/91e9f08ed37c7c9f56b5227c6aea7f2ae63ba2d59520eefb24e82cbdd589/sounddevice-0.5.2.tar.gz" + sha256 "c634d51bd4e922d6f0fa5e1a975cc897c947f61d31da9f79ba7ea34dff448b49" + end + + resource "soundfile" do + url "https://files.pythonhosted.org/packages/e1/41/9b873a8c055582859b239be17902a85339bec6a30ad162f98c9b0288a2cc/soundfile-0.13.1.tar.gz" + sha256 "b2c68dab1e30297317080a5b43df57e302584c49e2942defdde0acccc53f0e5b" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + end + + resource "tiktoken" do + url "https://files.pythonhosted.org/packages/fd/6a/e0f66d5cf612979fec2c18f9069962c73ed51949403967ba0de9ea6859e5/tiktoken-0.10.0.tar.gz" + sha256 "7cd88c11699b18081822e6ae1beee55e8f20ea361d73c507d33f5a89a1898f1c" + end + + resource "tokenizers" do + url "https://files.pythonhosted.org/packages/c2/2f/402986d0823f8d7ca139d969af2917fefaa9b947d1fb32f6168c509f2492/tokenizers-0.21.4.tar.gz" + sha256 "fa23f85fbc9a02ec5c6978da172cdcbac23498c3ca9f3645c5c68740ac007880" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "tree-sitter" do + url "https://files.pythonhosted.org/packages/a7/a2/698b9d31d08ad5558f8bfbfe3a0781bd4b1f284e89bde3ad18e05101a892/tree-sitter-0.24.0.tar.gz" + sha256 "abd95af65ca2f4f7eca356343391ed669e764f37748b5352946f00f7fc78e734" + end + + resource "tree-sitter-c-sharp" do + url "https://github.com/tree-sitter/tree-sitter-c-sharp/releases/download/v0.23.1/tree-sitter-c-sharp.tar.xz" + sha256 "091b700c852ec39c9253ad22ea50198567ede167afddedbcc6a8080a7148090b" + end + + resource "tree-sitter-embedded-template" do + url "https://github.com/tree-sitter/tree-sitter-embedded-template/archive/refs/tags/v0.23.2.tar.gz" + sha256 "eeda286631c6086b6fbe6d2a2c5cc8c1ea6129aaaf5bef4ca4b9a3f44d829569" + end + + resource "tree-sitter-language-pack" do + url "https://files.pythonhosted.org/packages/bf/3f/8725bf725969681b9ab862eef80b2c4f97d6983286a57dddbe6b8bc41d9b/tree_sitter_language_pack-0.9.0.tar.gz" + sha256 "900eb3bd82c1bcf5cf20ed852b1b6fdc7eae89e40a860fa5e221a796687c359a" + end + + resource "tree-sitter-yaml" do + url "https://github.com/tree-sitter-grammars/tree-sitter-yaml/archive/refs/tags/v0.7.1.tar.gz" + sha256 "0626a1d89d713a46acd0581b745d3dcfe0b3714279eb6cf858fe78ff850a5a2b" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/98/5a/da40306b885cc8c09109dc2e1abd358d5684b1425678151cdaed4731c822/typing_extensions-4.14.1.tar.gz" + sha256 "38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/f8/b1/0c11f5058406b3af7609f121aaa6b609744687f1d158b3c3a5bf4cc94238/typing_inspection-0.4.1.tar.gz" + sha256 "6ae134cc0203c33377d43188d4064e9b357dba58cff3185f22924610e70a9d28" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/2a/9a/d451fcc97d029f5812e898fd30a53fd8c15c7bbd058fd75cfc6beb9bd761/watchfiles-1.1.0.tar.gz" + sha256 "693ed7ec72cbfcee399e92c895362b6e66d63dac6b91e2c11ae03d10d503e575" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/3c/fb/efaa23fa4e45537b827620f04cf8f3cd658b76642205162e072703a5b963/yarl-1.20.1.tar.gz" + sha256 "d017a4997ee50c91fd5466cef416231bb82177b93b029906cefc542ce14c35ac" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + venv = virtualenv_install_with_resources(without: ["hf-xet", "numpy"]) + + resource("hf-xet").stage do + if ENV.effective_arch == :armv8 + # Disable sha2-asm which requires a minimum of -march=armv8-a+crypto + inreplace "data/Cargo.toml", + 'sha2 = { workspace = true, features = ["asm"] }', + "sha2 = { workspace = true }" + end + venv.pip_install Pathname.pwd + end + + resource("numpy").stage do + python = venv.root/"bin/python" + system python, "-m", "pip", "install", "--config-settings=setup-args=-Dblas=openblas", + "--config-settings=setup-args=-Dlapack=openblas", + *std_pip_args(prefix: false, build_isolation: true), "." + end + end + + test do + ENV["AIDER_CHECK_UPDATE"] = ENV["AIDER_GUI"] = "false" + ENV["AIDER_DRY_RUN"] = ENV["AIDER_YES_ALWAYS"] = "true" + + mkdir "tmptestdir" do + assert_match version.to_s, shell_output("#{bin}/aider --version") + ENV["OPENAI_API_KEY"] = "invalid" + output = shell_output("#{bin}/aider --exit --message=test 2>&1") + assert_match "API key provided: invalid", output + end + end +end diff --git a/Formula/a/aiken.rb b/Formula/a/aiken.rb new file mode 100644 index 0000000000000..ddf15699afd84 --- /dev/null +++ b/Formula/a/aiken.rb @@ -0,0 +1,40 @@ +class Aiken < Formula + desc "Modern smart contract platform for Cardano" + homepage "https://aiken-lang.org/" + url "https://github.com/aiken-lang/aiken/archive/refs/tags/v1.1.19.tar.gz" + sha256 "87a74203a8ff4a82aa8c33f07ed4f5fc1fbda9c69a38b13bd2abf24146f9811d" + license "Apache-2.0" + head "https://github.com/aiken-lang/aiken.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "43233b48701c4054dfe2e0d85828df0d9f415a6137926f049ba5a7c445db8034" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e065b14137f3be1aff198cce428fac2f2a42bab03b895c6ee625cbca200e8b98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a13087d28450285c6e1eeaadc1edeb5967dffbe3e6aad3da7e9a020e5200689" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f5727f30a905dd47e0dc2d665fface04471345491b3a78641b8490d7475ff775" + sha256 cellar: :any_skip_relocation, sonoma: "bbd79525e346edd3aa8e612b258f53cc1c06c7ab377c0f011444a8d9d39aa70a" + sha256 cellar: :any_skip_relocation, ventura: "eff97c253040ee3e4350eaeb56ea8549a2b0085a8ad48adfe4a5958261e0b1b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "d792aa271c65084f44a87748a48641336208efbf50621c326fed14b3a39edd88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04816c293fb1ff27d65e1502884b5ae67752453c1ad5b46d07c12d57d7fb5c43" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/aiken") + + generate_completions_from_executable(bin/"aiken", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/aiken --version") + + system bin/"aiken", "new", "brewtest/hello" + assert_path_exists testpath/"hello/README.md" + assert_match "brewtest/hello", (testpath/"hello/aiken.toml").read + end +end diff --git a/Formula/a/ain.rb b/Formula/a/ain.rb new file mode 100644 index 0000000000000..3309fccbbbcd1 --- /dev/null +++ b/Formula/a/ain.rb @@ -0,0 +1,39 @@ +class Ain < Formula + desc "HTTP API client for the terminal" + homepage "https://github.com/jonaslu/ain" + url "https://github.com/jonaslu/ain/archive/refs/tags/v1.6.0.tar.gz" + sha256 "a60ce846edc6f8e5429c3cf14faf57f170b757c6ab13d8f36d64235a1959e6c8" + license "MIT" + head "https://github.com/jonaslu/ain.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e0f860b88ce92fc60e45285259aad2671904bfca0d1b929e47204c2a32bddab2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "470ca30ee09a8e40745f90086841c36f4efe34acdd7c7398089a6a6597314bfa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "470ca30ee09a8e40745f90086841c36f4efe34acdd7c7398089a6a6597314bfa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "470ca30ee09a8e40745f90086841c36f4efe34acdd7c7398089a6a6597314bfa" + sha256 cellar: :any_skip_relocation, sonoma: "9299bcb45b88a76fa588d7352925a379b41cc6cfc0d23f4c38b80903b2391bf5" + sha256 cellar: :any_skip_relocation, ventura: "9299bcb45b88a76fa588d7352925a379b41cc6cfc0d23f4c38b80903b2391bf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c56fbc38b0d4116a3fff8bfd8dcc8d0ed9860433b03625a7dd4a60c6c628ead7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b63dff05d2c4e4c322a6f4213271cf5e5a80d9a55d8a0cdca5dcbf3bda87748" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.gitSha=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/ain" + end + + test do + assert_match "http://localhost:${PORT}", shell_output("#{bin}/ain -b") + assert_match version.to_s, shell_output("#{bin}/ain -v") + end +end diff --git a/Formula/a/air.rb b/Formula/a/air.rb new file mode 100644 index 0000000000000..9ded38a8f6567 --- /dev/null +++ b/Formula/a/air.rb @@ -0,0 +1,39 @@ +class Air < Formula + desc "Fast and opinionated formatter for R code" + homepage "https://github.com/posit-dev/air" + url "https://github.com/posit-dev/air/archive/refs/tags/0.8.0.tar.gz" + sha256 "fbce4a9698c756dc4d65eb6cb845fcdd8bca952f25b988711037b6ff9b82a99c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "22bfc11080f588ebe147ee1eff7e54c62f2c5fb0aa9334aa29041a1211ca2fea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6237dee64f4f22f034686e091ccdf7adca3452ff59118d6b9167eaef4ca06c62" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41aafa386238de558ba5c1050c5931ebaae5372548ed6632340ebecc9c0e5324" + sha256 cellar: :any_skip_relocation, sonoma: "4bfb9ac82a1d126386b1bb3dccb55cea3d4385d030f0c443eb7b578d30bef4dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "28d2350eb72cf1f61922bf5a32340fcd821a88d32995d2052e1d3513ed9fbb96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5b74bd49dfb4b972e2624a666f97c20611634bfe0990d516b1621ee1fab84c3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/air") + end + + test do + (testpath/"test.R").write <<~R + # Simple R code for testing + x<-1+2 + y <- 3 + 4 + print(x+y) + R + + assert_match "air #{version}", shell_output("#{bin}/air --version") + + system bin/"air", "format", testpath/"test.R" + + formatted_content = (testpath/"test.R").read + assert_match "x <- 1 + 2", formatted_content + assert_match "y <- 3 + 4", formatted_content + end +end diff --git a/Formula/a/aircrack-ng.rb b/Formula/a/aircrack-ng.rb new file mode 100644 index 0000000000000..a0abb1e2d84e8 --- /dev/null +++ b/Formula/a/aircrack-ng.rb @@ -0,0 +1,107 @@ +class AircrackNg < Formula + desc "Next-generation aircrack with lots of new features" + homepage "https://aircrack-ng.org/" + # TODO: Migrate to PCRE2 in the next release + url "https://download.aircrack-ng.org/aircrack-ng-1.7.tar.gz" + sha256 "05a704e3c8f7792a17315080a21214a4448fd2452c1b0dd5226a3a55f90b58c3" + license all_of: [ + "BSD-3-Clause", # include/aircrack-ng/third-party/{if_arp.h,if_llc.h} + "GPL-2.0-or-later", + "GPL-2.0-or-later" => { with: "cryptsetup-OpenSSL-exception" }, + ] + revision 1 + + livecheck do + url :homepage + regex(/href=.*?aircrack-ng[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "23f7bfece711bbf3e9dbb3555d3f00eba3e8d6670ca88cb5cf5b611f6b4fac9f" + sha256 arm64_sequoia: "52dbe4ce295e97351a0ec2dfbb986abf37b2665a1775aa580fb70b45e806cbe2" + sha256 arm64_sonoma: "fe96a817b4755ca8a498ad1cd45666a04238d3ed1a7bd3ce97f27f0fd68ae2ef" + sha256 arm64_ventura: "d3d59c186fb570afbf6c925fece858ae01ed7d0a7290e3cccbd45a1ae3789881" + sha256 arm64_monterey: "ae0d6fe850335049e70c0eed7486182be424fe7e9f1f449687ab2a4248e0816a" + sha256 arm64_big_sur: "146f8023328aff76b469874b408e00a2bb142e05753badd291be1e0370a21502" + sha256 sonoma: "857116e74cf96666577ff3bcc36a18ce3a4b629e3fba09c96224efe47f7195ae" + sha256 ventura: "f418df11db6bc8af148f4f889715009da8e7084fb2777c3831f38cd5a90a3c4a" + sha256 monterey: "32bab474db5a9602788ffd7d32f4bd25199732705cc4856b7335c96d6675a961" + sha256 big_sur: "c7b4666859d336a5219c53d5b9310547495438e460d38c7f1b3175c274245b55" + sha256 catalina: "09115822ebac9a6d9903635faa0a393dc1bcaaaf2fcbb344a5dee123fe1f02f1" + sha256 arm64_linux: "8a789a3419bcd0c237abc1f7e10743d97eac240bdd6d49ec1ed9656e0b42f64a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72556b434c07c994c66ac4f37b9946884357af00a7543d6e961808ca78a6818c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "pcre" + depends_on "sqlite" + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + # Remove root requirement from OUI update script. See: + # https://github.com/Homebrew/homebrew/pull/12755 + patch :DATA + + def install + system "./autogen.sh", "--disable-silent-rules", + "--sysconfdir=#{etc}", + "--with-experimental", + *std_configure_args + system "make", "install" + inreplace sbin/"airodump-ng-oui-update", "/usr/local", HOMEBREW_PREFIX + end + + def post_install + pkgetc.mkpath + end + + def caveats + <<~EOS + Run `airodump-ng-oui-update` install or update the Airodump-ng OUI file. + EOS + end + + test do + assert_match "usage: aircrack-ng", shell_output("#{bin}/aircrack-ng --help") + assert_match "Logical CPUs", shell_output("#{bin}/aircrack-ng -u") + expected_simd = Hardware::CPU.arm? ? "neon" : "sse2" + assert_match expected_simd, shell_output("#{bin}/aircrack-ng --simd-list") + end +end + +__END__ +--- a/scripts/airodump-ng-oui-update ++++ b/scripts/airodump-ng-oui-update +@@ -20,25 +20,6 @@ fi + + AIRODUMP_NG_OUI="${OUI_PATH}/airodump-ng-oui.txt" + OUI_IEEE="${OUI_PATH}/oui.txt" +-USERID="" +- +- +-# Make sure the user is root +-if [ x"`which id 2> /dev/null`" != "x" ] +-then +- USERID="`id -u 2> /dev/null`" +-fi +- +-if [ x$USERID = "x" -a x$(id -ru) != "x" ] +-then +- USERID=$(id -ru) +-fi +- +-if [ x$USERID != "x" -a x$USERID != "x0" ] +-then +- echo Run it as root ; exit ; +-fi +- + + if [ ! -d "${OUI_PATH}" ]; then + mkdir -p ${OUI_PATH} diff --git a/Formula/a/airshare.rb b/Formula/a/airshare.rb new file mode 100644 index 0000000000000..6ddb1514a9e27 --- /dev/null +++ b/Formula/a/airshare.rb @@ -0,0 +1,152 @@ +class Airshare < Formula + include Language::Python::Virtualenv + + desc "Cross-platform content sharing in a local network" + homepage "https://airshare.readthedocs.io/" + url "https://files.pythonhosted.org/packages/cb/a2/d59c18cd6a143bf860c29acb70552b7351fd7e0f56213be86b624601106b/Airshare-0.1.6.tar.gz" + sha256 "138976933bcf2c0bc99f18901242544919e9fafe43735b4f83b19d4ae5964be7" + license "MIT" + revision 18 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "79f781d57a3cf6f5b6574cb69c5e1431e99b9b18715692da1dae5ed80c65a346" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d30bb4ba62d471a0c4a00f7d3d124899c1efe7ae34a35948b3bb93205c4d733" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c9179b2b2df7fb41d759ca1563294797c474ec25d768a8090791800eddf05ad" + sha256 cellar: :any_skip_relocation, sonoma: "c63f6d1291cd4e986e102d5607d56a89067bd2e08ab2450e4f60db2b5bf9c2b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "13a4f4c0abc104e6dc1079e5409a1202ef513377dd5fb6be57901004f1d61d23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e609f15de4b73eaeecb8510f4bd25fb4310609fd3115a8e0595bd5d574c6d67" + end + + depends_on "python@3.14" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "asyncio" do + url "https://files.pythonhosted.org/packages/71/ea/26c489a11f7ca862d5705db67683a7361ce11c23a7b98fc6c2deaeccede2/asyncio-4.0.0.tar.gz" + sha256 "570cd9e50db83bc1629152d4d0b7558d6451bb1bfd5dfc2e935d96fc2f40329b" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz" + sha256 "47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/98/1d/3062fcc89ee05a715c0b9bfe6490c00c576314f27ffee3a704122c6fd259/humanize-4.13.0.tar.gz" + sha256 "78f79e68f76f0b04d711c4e55d32bebef5be387148862cb1ef83d2b58e7935a0" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "ifaddr" do + url "https://files.pythonhosted.org/packages/e8/ac/fb4c578f4a3256561548cd825646680edcadb9440f3f68add95ade1eb791/ifaddr-0.2.0.tar.gz" + sha256 "cc0cbfcaabf765d44595825fb96a99bb12c79716b73b44330ea38ee2b0c4aed4" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" + sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "zeroconf" do + url "https://files.pythonhosted.org/packages/67/46/10db987799629d01930176ae523f70879b63577060d63e05ebf9214aba4b/zeroconf-0.148.0.tar.gz" + sha256 "03fcca123df3652e23d945112d683d2f605f313637611b7d4adf31056f681702" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"airshare", shell_parameter_format: :click) + end + + test do + port = free_port + pid = spawn bin/"airshare", "-p", port.to_s, "homebrew-demo", "-t", "Hello Homebrew!" + sleep 30 + output = shell_output("#{bin}/airshare -p #{port} homebrew-demo") + assert_equal "Received: Hello Homebrew!\n", output.lines.last + Process.kill("TERM", pid) + end +end diff --git a/Formula/a/airspy.rb b/Formula/a/airspy.rb new file mode 100644 index 0000000000000..68af1e35b4ee1 --- /dev/null +++ b/Formula/a/airspy.rb @@ -0,0 +1,62 @@ +class Airspy < Formula + desc "Driver and tools for a software-defined radio" + homepage "https://airspy.com/" + url "https://github.com/airspy/airspyone_host/archive/refs/tags/v1.0.10.tar.gz" + sha256 "fcca23911c9a9da71cebeffeba708c59d1d6401eec6eb2dd73cae35b8ea3c613" + license "GPL-2.0-or-later" + head "https://github.com/airspy/airspyone_host.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "43ab01541269d098b8b36f73e206cae61390ded5015dd8a795ee0d9917ba10bc" + sha256 cellar: :any, arm64_sequoia: "6e66f0c2d5fe94466e432a57c49fdcf7cfb6a01f9d71896f74b06e9a3c16777d" + sha256 cellar: :any, arm64_sonoma: "8c086845772a91ed241283aa4175e0ba598e9e80530b660fceb413857211901f" + sha256 cellar: :any, arm64_ventura: "e32975089469cf19d14495a2ebfc86815aa431efeefaf11d24afd42e0fe8780b" + sha256 cellar: :any, arm64_monterey: "9c2f5b4cc0c698d7f2690ea8091c8ce99b73ea659dc281916dbac0fb71ae3b05" + sha256 arm64_big_sur: "3cebc54737172b116e3cdabc7770777954b6c1840940588cd29f431c4db526c7" + sha256 cellar: :any, sonoma: "522690a97cfed3979494776f031ca2ccad8c4240691ddcce9720636b96cb9802" + sha256 cellar: :any, ventura: "76cc6e04ec293907b1be68033f1725156ffd6bc7a6c0d95bd00477b78052bba0" + sha256 cellar: :any, monterey: "53843ed22a54472fe5d40ca9191f5425af68ab2996981c489ecd5b0cd8fae221" + sha256 big_sur: "acada5e4e39e99dfad89cbcd1d0440cc3b4814936160b37220059cf602b94b4d" + sha256 catalina: "5e8d910759443d83f3975b41e2805b4bfeb605d55271f0e37e8ca7de470415f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "04a3fc8d7785a617963f05f454e5c18526e855ad8171285420aa68c7f5a38391" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1705571f2f7cc979706ceb8340ee737fde0b538002c3942145f35355b9b41d3" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + airspy_lib_version_t lib_version; + airspy_lib_version(&lib_version); + + printf("Airspy library version: %d.%d.%d\\n", + lib_version.major_version, + lib_version.minor_version, + lib_version.revision); + + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lairspy", "-o", "test" + assert_match version.to_s, shell_output("./test") + + assert_match version.to_s, shell_output("#{bin}/airspy_lib_version --version") + end +end diff --git a/Formula/a/airspyhf.rb b/Formula/a/airspyhf.rb new file mode 100644 index 0000000000000..805a2ed67ce3d --- /dev/null +++ b/Formula/a/airspyhf.rb @@ -0,0 +1,59 @@ +class Airspyhf < Formula + desc "Driver and tools for a software-defined radio" + homepage "https://airspy.com/" + url "https://github.com/airspy/airspyhf/archive/refs/tags/1.6.8.tar.gz" + sha256 "cd1e5ae89e09b813b096ae4a328e352c9432a582e03fd7da86760ba60efa77ab" + license "BSD-3-Clause" + head "https://github.com/airspy/airspyhf.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1c1fd82f7cb86587bd29d675af8ea216722ed5e0aee0eca6a137afc0adda0ca2" + sha256 cellar: :any, arm64_sequoia: "56ba130afa6a1ad1fe9fbda09e0ae0bfefd6eb4d2e5b5a88fa28b150c2a4c1f6" + sha256 cellar: :any, arm64_sonoma: "b747dbc3b901d77c790fd984fdbaf37979b0e3e7ef0aaca8d616be09353fbe37" + sha256 cellar: :any, arm64_ventura: "5fbaa0afc4b557fad2a08babdbe97253a76ab494b81dbc402fe0ca9d5c26674a" + sha256 cellar: :any, arm64_monterey: "eef302a163fb091b112c40684b5dcc04e226e95df03042cc9c77ff6e1b637f9c" + sha256 cellar: :any, arm64_big_sur: "687651c9d95e06436df3a43a0dca6e3d39747bbf2d92892edf44bddd964c5345" + sha256 cellar: :any, sonoma: "c6bb7ad085e41a534221d9fc96bb4f9692d6af6d49a821d973f9091dc7040615" + sha256 cellar: :any, ventura: "506b301e7f411e447bd5b0bab09551eb1ace6fdd62d76a99239e42c648cb2cb4" + sha256 cellar: :any, monterey: "4d8688285b59e46abc06d20c835e82a4a5ae3271ad469e12f5c249e464419a31" + sha256 cellar: :any, big_sur: "e41261aeca3a632c9c2cb265e321fe2ff88820901ea1d3ea01e42e2a1ba0413a" + sha256 cellar: :any, catalina: "d8b783edf8b206ba8228c96bde21a0dfb42771bc5c46e3493f3dd995a0dfe4d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "e84516121578b8b4e3ed09e2617fe1fe378e7267dd900d8ab08c5cea0de963ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9d30b5b22a4dc96558528d46a73cdb6102b49601f9fe04abfc3f9c812606600" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + uint64_t serials[256]; + int n = airspyhf_list_devices(serials, 256); + + if (n == 0){ + return 0; + } + + return 1; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lairspyhf", "-lm" + system "./test" + assert_match version.to_s, shell_output("#{bin}/airspyhf_lib_version").chomp + end +end diff --git a/Formula/a/airtable-mcp-server.rb b/Formula/a/airtable-mcp-server.rb new file mode 100644 index 0000000000000..5e6a4f0f2997c --- /dev/null +++ b/Formula/a/airtable-mcp-server.rb @@ -0,0 +1,30 @@ +class AirtableMcpServer < Formula + desc "MCP Server for Airtable" + homepage "https://github.com/domdomegg/airtable-mcp-server" + url "https://registry.npmjs.org/airtable-mcp-server/-/airtable-mcp-server-1.9.4.tgz" + sha256 "02da4ed6dc48434d7ad6b6961c12c9ea7e3b6275f41332c6a2bd6a0fcd9566cd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5a48a6f448c7100a36f1422b89e73ec0bf7307a823f2de26963080e80fa4849d" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + ENV["AIRTABLE_API_KEY"] = "pat123.abc123" + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output("#{bin}/airtable-mcp-server 2>&1", json, 0) + assert_match "The name or ID of a view in the table", output + end +end diff --git a/Formula/a/aiven-client.rb b/Formula/a/aiven-client.rb new file mode 100644 index 0000000000000..67ecd5667528a --- /dev/null +++ b/Formula/a/aiven-client.rb @@ -0,0 +1,54 @@ +class AivenClient < Formula + include Language::Python::Virtualenv + + desc "Official command-line client for Aiven" + homepage "https://aiven.io/docs/tools/cli" + url "https://files.pythonhosted.org/packages/8e/ff/bcc66a90be0be8cc5d8faefd4531c629375076993cb216e3da060a16320f/aiven_client-4.10.0.tar.gz" + sha256 "3981cb9996957f8e57c467c62a3344b4eb342b94baac4602d28cf6e78f4a1c2b" + license "Apache-2.0" + head "https://github.com/aiven/aiven-client.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0e25a56090195714eed5ef08eeac3051aafb09edab8c8448f7692d0f1ae5c3ac" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "aiven-client", shell_output("#{bin}/avn --version") + assert_match "UserError: not authenticated", shell_output("AIVEN_CONFIG_DIR=/tmp #{bin}/avn user info 2>&1", 1) + end +end diff --git a/Formula/a/akamai.rb b/Formula/a/akamai.rb new file mode 100644 index 0000000000000..4c23e0fae9125 --- /dev/null +++ b/Formula/a/akamai.rb @@ -0,0 +1,34 @@ +class Akamai < Formula + desc "CLI toolkit for working with Akamai's APIs" + homepage "https://github.com/akamai/cli" + url "https://github.com/akamai/cli/archive/refs/tags/v2.0.2.tar.gz" + sha256 "aa51202c2be133d10c9a34e942749c1359f9e6a4ba6f121d37f05c917d0acde7" + license "Apache-2.0" + head "https://github.com/akamai/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d72990121793aba11dd3e209799ba18a402a46b8db3febc5a98c182b287f8b69" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f697de247788e7e0a5406bc235265048870c13aaf6cef382ba7ddfdc9757af77" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f697de247788e7e0a5406bc235265048870c13aaf6cef382ba7ddfdc9757af77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f697de247788e7e0a5406bc235265048870c13aaf6cef382ba7ddfdc9757af77" + sha256 cellar: :any_skip_relocation, sonoma: "753075c92ea403dad120335559579ce684598a99c16631f3148ee86e32ea428d" + sha256 cellar: :any_skip_relocation, ventura: "753075c92ea403dad120335559579ce684598a99c16631f3148ee86e32ea428d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0932738c0a393e5d337308f3508d098c2340b2a6615ed3768a4c949ad6e2920" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe534c7e4ffdd95743ed89296f80986616f81cbfefd6f03bc7c4958a9240a049" + end + + depends_on "go" => [:build, :test] + + def install + tags = %w[ + noautoupgrade + nofirstrun + ] + system "go", "build", *std_go_args(ldflags: "-s -w", tags:), "./cli" + end + + test do + assert_match "diagnostics", shell_output("#{bin}/akamai install diagnostics") + system bin/"akamai", "uninstall", "diagnostics" + end +end diff --git a/Formula/a/akku.rb b/Formula/a/akku.rb new file mode 100644 index 0000000000000..1a6a7ff979b0e --- /dev/null +++ b/Formula/a/akku.rb @@ -0,0 +1,49 @@ +class Akku < Formula + desc "Package manager for Scheme" + homepage "https://akkuscm.org/" + url "https://gitlab.com/akkuscm/akku/uploads/819fd1f988c6af5e7df0dfa70aa3d3fe/akku-1.1.0.tar.gz" + sha256 "12decdc8a2caba0f67dfcd57b65e4643037757e86da576408d41a5c487552c08" + license "GPL-3.0-or-later" + head "https://gitlab.com/akkuscm/akku.git", branch: "master" + + livecheck do + url "https://gitlab.com/api/v4/projects/6808260/releases" + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :json do |json, regex| + json.map { |item| item["tag_name"]&.[](regex, 1) } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "525ddcc47892beb6922d45852f96cd4cdb3b7981605acf5d415216a2e728b44e" + sha256 arm64_sequoia: "0f13478e5f6f3b41e6e75beac905b2aaae1df9d9a1eb7d600bf0f6bf70b076f0" + sha256 arm64_sonoma: "565a1f1bba15ccfbe640704c86b1752a03fe8935b86fefe5c02f946d51cf6b0a" + sha256 arm64_ventura: "dac9e5f8e17d8b88899acb8fcd0678e863c028737aa921c07ad982804c3ab656" + sha256 arm64_monterey: "a0a5fc11cd13c9ebb25ad4d8e46c607a67b061852e4d3ef17ec1ace4758d8962" + sha256 arm64_big_sur: "4bdac89c45742a59172e3e2653ef27dd1234d0c8a4483eccdb978e4ece15222c" + sha256 sonoma: "ca9a81689b78a05f3d8679810825438d3617e3195c4a1c4831219949ec78b73e" + sha256 ventura: "f77236380b87ec9fac32323c1aa339e8d2aa90c5613ba90bf5b33b449a6ba601" + sha256 monterey: "a1de5fe0cd475fcdd4b5c91762dfbeb0d681fa59bcba9472972dbec356b517d6" + sha256 big_sur: "85a186c3e7502ceafc16741ade1c34601e713538f2dc080c6c0a01cfc0e109f2" + sha256 arm64_linux: "e01b75b5ae763d756faf1c9e6ac2c308a99d0d639c324726b92b46cbc2bbc7e5" + sha256 x86_64_linux: "23a1841305dd2e17051dc12c0e0c10e17420c432a0fca409ece365558a5cce4f" + end + + depends_on "pkgconf" => :build + depends_on "guile" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"akku", "init", "brewtest" + assert_path_exists testpath/"brewtest/brewtest.sls" + assert_match "akku-package (\"brewtest\"", (testpath/"brewtest/Akku.manifest").read + assert_match "Akku.scm #{version}", shell_output("#{bin}/akku --help 2>&1") + end +end diff --git a/Formula/a/alac.rb b/Formula/a/alac.rb new file mode 100644 index 0000000000000..667da55c7bc12 --- /dev/null +++ b/Formula/a/alac.rb @@ -0,0 +1,33 @@ +class Alac < Formula + desc "Basic decoder for Apple Lossless Audio Codec files (ALAC)" + homepage "https://web.archive.org/web/20150319040222/craz.net/programs/itunes/alac.html" + url "https://web.archive.org/web/20150510210401/craz.net/programs/itunes/files/alac_decoder-0.2.0.tgz" + sha256 "7f8f978a5619e6dfa03dc140994fd7255008d788af848ba6acf9cfbaa3e4122f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "726f02f4e73857ebafaf7d5d554e6c659b4795ef682aa0ce46c3ee21ffef952c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "78ed3a6e07c6093f26c14a5f0a468369a4b2822f456101c0539386e2aeb2c4ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71a71cbbe491b65fd89198aab4168b7ec3d2436896c913a43858c806469a56ea" + sha256 cellar: :any_skip_relocation, arm64_monterey: "71cd043cec976255c6ae78ad79021dd5ba499b5678e5163e6353f571cae2eb6d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3d12d2c7b28c99fba529faea181dc91a04ea469e68607f9e3263c082dcb5cde4" + sha256 cellar: :any_skip_relocation, sonoma: "3f951cde205130f7b732f27ef20ebfc8d1d504805d389c092518c6ca12d0a239" + sha256 cellar: :any_skip_relocation, ventura: "5385e4fecc817b09a2be15e6eed1184cd2c4bb1014c6c89d9611a151adb49555" + sha256 cellar: :any_skip_relocation, monterey: "c0e143a554186ce5b3c1ad9850c5f65d0248461eeea9f8f02389f74e78989a14" + sha256 cellar: :any_skip_relocation, big_sur: "8d6293bbacf08bada008f799f03c6ea3265dd48bd5c81d77d042e4a3bedcf84f" + sha256 cellar: :any_skip_relocation, catalina: "0cb8439e4028ea823fb442559c12365bae08499a142ad46d0c89f010f9eb7e5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01ddb3fb230954f624b068100ddcffa8c288481489f6cd62143beac4cd1e3c45" + end + + disable! date: "2025-01-10", because: :repo_removed + + def install + system "make", "CFLAGS=#{ENV.cflags}", "CC=#{ENV.cc}" + bin.install "alac" + end + + test do + sample = test_fixtures("test.m4a") + assert_equal "file type: mp4a\n", shell_output("#{bin}/alac -t #{sample}", 100) + end +end diff --git a/Formula/a/alass.rb b/Formula/a/alass.rb new file mode 100644 index 0000000000000..eb586cbef957e --- /dev/null +++ b/Formula/a/alass.rb @@ -0,0 +1,47 @@ +class Alass < Formula + desc "Automatic Language-Agnostic Subtitle Synchronization" + homepage "https://github.com/kaegi/alass" + url "https://github.com/kaegi/alass/archive/refs/tags/v2.0.0.tar.gz" + sha256 "ce88f92c7a427b623edcabb1b64e80be70cca2777f3da4b96702820a6cdf1e26" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de4af244ed90c2a2b9c309340cb5d47e926ce1f2012001524d1674dd4213b1fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "efa1a388ee9ecf5193edd9c9003af0f035ed138bf6a79b45e6b22654c32888e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f42a7b7ef244c6018d9d16f3979f14758ca54a50a568b269011f9ccdcae5f39" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93ea3d2535b7d2f339a736efbbf28f952abf06fdcb8186a72b1f706a77c9c3c1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c20460b0e920c4165d4f2e0fda02055564277562ca0707d7417279f3c1a70a4f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "89d96baa88517ace085a0a467f08928fff9fc15966edd7061ebf614133eb5e98" + sha256 cellar: :any_skip_relocation, sonoma: "0a5668b9a440fb7cf6b8827824abcffd57d69473c2c55749a303e460dade07b3" + sha256 cellar: :any_skip_relocation, ventura: "1b6e4cc531bc410f1c4792f5e8709230fa1312425499c7179712714ecbfbc593" + sha256 cellar: :any_skip_relocation, monterey: "3b60c7670145e819679d32671912305e150b55164de74e39b4ea788586651696" + sha256 cellar: :any_skip_relocation, big_sur: "8aa09d2f899a21272a4703e587a036e475b4ce060bdb9ef0d214b449157126fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc47c934ca68489561b3f325fb9627fe7cd98d2cbffb0bca6bb1d4bbb0c9e0b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "499c4ee6c9cefa90b135dbfb668879f8a56fd5da4ab20dfd077ae1047b34f0f1" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "alass-cli") + end + + test do + (testpath/"reference.srt").write <<~SRT + 1 + 00:00:00,000 --> 00:00:01,000 + This is the first subtitle. + SRT + + (testpath/"incorrect.srt").write <<~SRT + 1 + 00:00:01,000 --> 00:00:02,000 + This is the first subtitle. + SRT + + output = shell_output("#{bin}/alass-cli reference.srt incorrect.srt output.srt").strip + assert_match "shifted block of 1 subtitles with length 0:00:00.000 by -0:00:01.000", output + end +end diff --git a/Formula/a/alda.rb b/Formula/a/alda.rb new file mode 100644 index 0000000000000..70210ed50d2b7 --- /dev/null +++ b/Formula/a/alda.rb @@ -0,0 +1,41 @@ +class Alda < Formula + desc "Music programming language for musicians" + homepage "https://alda.io" + url "https://github.com/alda-lang/alda/archive/refs/tags/release-2.3.3.tar.gz" + sha256 "eacb1f6fc649d0e3e159377c1084f1530469d2953b97ccb10720222aadcc8a04" + license "EPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5b3dced96ecc8d49bc3f70ea8e95a27a1872e379427a7e4bb25d97e6d87e8af5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d4ca1302163e7a0a35afd5a98b86b8c4b0c9607df2e48c9dced2fccb399d682" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3058e5e68f295158c638f9fca77218495d762fb9fae51a62303a416f3b12051e" + sha256 cellar: :any_skip_relocation, sonoma: "1e9db76b22de729bfc98c8ccb60d91dec15f127bed3de0f6ba18cb6f46916a3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b927ab16d9df3c039935db537543a66f1244d0380daf511f74b5f84f6758e2e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5eaf0475905ef9d87f2ca57532377b23536b24f53746b92dca99a57a54075d7" + end + + depends_on "go" => :build + # Issue ref: https://github.com/alda-lang/alda/issues/510 + depends_on "gradle@8" => :build + depends_on "openjdk" + + def install + pkgshare.install "examples" + cd "client" do + system "go", "generate" + system "go", "build", *std_go_args + end + cd "player" do + system "gradle", "build" + libexec.install "build/libs/alda-player-fat.jar" + bin.write_jar_script libexec/"alda-player-fat.jar", "alda-player" + end + end + + test do + (testpath/"hello.alda").write "piano: c8 d e f g f e d c2." + json_output = JSON.parse(shell_output("#{bin}/alda parse -f hello.alda 2>/dev/null")) + midi_notes = json_output["events"].map { |event| event["midi-note"] } + assert_equal [60, 62, 64, 65, 67, 65, 64, 62, 60], midi_notes + end +end diff --git a/Formula/a/aldo.rb b/Formula/a/aldo.rb new file mode 100644 index 0000000000000..7b0187521a34b --- /dev/null +++ b/Formula/a/aldo.rb @@ -0,0 +1,49 @@ +class Aldo < Formula + desc "Morse code learning tool released under GPL" + homepage "https://www.nongnu.org/aldo/" + url "https://savannah.nongnu.org/download/aldo/aldo-0.7.7.tar.bz2" + sha256 "f1b8849d09267fff3c1f5122097d90fec261291f51b1e075f37fad8f1b7d9f92" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/aldo/" + regex(/href=.*?aldo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c79608f02c4c17db23e84db17545e895475a4a38e46419b37d7b518a40363e73" + sha256 cellar: :any, arm64_sequoia: "85ae21042606044840664aafe2df3fdcdbc6b00274ef715522d1e14964e51643" + sha256 cellar: :any, arm64_sonoma: "b213535da0d7e8de96c6d529a82d17beabea2b2fc54a7a0b4ef9e1e0787dc2b0" + sha256 cellar: :any, arm64_ventura: "0d999e5927c28aec07c5e74d61f3338129c4040bd34c35e12a3da993b0de90c0" + sha256 cellar: :any, arm64_monterey: "434e524f42b70dd31c05c80d41808af6b68d13875376d38ef86dba496b86b609" + sha256 cellar: :any, arm64_big_sur: "a0944cbf0df1cccd63c1d18cf758826e8b7621c188b60603153b717ba9d2edbf" + sha256 cellar: :any, sonoma: "ce5f647836b60f1d2b19e47b7dd445e4a3005c478746c36fe4ec08e1a03a79a4" + sha256 cellar: :any, ventura: "e81b0d99b63abac08c7768f017eae3c9d059012fa8867f0ff8d3d5bf76e81b7b" + sha256 cellar: :any, monterey: "266951db532a823d9241ad3e29d0e07b63f5b7dc5d4fcae3b3dfed117dfd9488" + sha256 cellar: :any, big_sur: "b6e5c413c1ca391cd040cadd7d2c153e7552ce43677da0d0f1aab1467e92bb3b" + sha256 cellar: :any, catalina: "2a574bfd1a76ef4733d941234df142dfc87b05cefefaf58d0617113d7af85999" + sha256 cellar: :any_skip_relocation, arm64_linux: "41aaf9303c8e8cac32a159590dc0e3f1c905d591cebf215a0e699c893feced08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "660548eb8c93e2c78a50b925143a9b24400ee578790b62e7acde1d1aed360a98" + end + + depends_on "libao" + + # Reported upstream: + # https://savannah.nongnu.org/bugs/index.php?42127 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/aldo/0.7.7.patch" + sha256 "3b6c6cc067fc690b5af4042a2326cee2b74071966e9e2cd71fab061fde6c4a5d" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "Aldo #{version} Main Menu", pipe_output(bin/"aldo", "6", 0) + end +end diff --git a/Formula/a/alejandra.rb b/Formula/a/alejandra.rb new file mode 100644 index 0000000000000..e42d3d8d243fd --- /dev/null +++ b/Formula/a/alejandra.rb @@ -0,0 +1,39 @@ +class Alejandra < Formula + desc "Command-line tool for formatting Nix Code" + homepage "https://kamadorueda.com/alejandra/" + url "https://github.com/kamadorueda/alejandra/archive/refs/tags/4.0.0.tar.gz" + sha256 "f3f9989c3fb6a56e2050bf5329692fae32a2b54be7c0652aa394afe4660ebb74" + license "Unlicense" + head "https://github.com/kamadorueda/alejandra.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ee21f9015c2853fb4ccd0b5e8b8674c7d1c27ef9c17ff73771ca33f035a4eddd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a105b8e8c06f4e240b052d62e5b271e4a1c196f8367780ae22fe4bf705ad65b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e02b48f1e647cf69ccbb6846c8335f912cc08344f7107af6f3b4ad3780981f8c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d220e43933b6412b9b2c55193af67aa046a935f282f7bb2bcbe73ce0987561fe" + sha256 cellar: :any_skip_relocation, sonoma: "82324a20fbc443a94c675997c412c0394d9dc511f7bb72e9b36e1861deeee324" + sha256 cellar: :any_skip_relocation, ventura: "bbdac460582dfb76e32ca4976eae2ca4a58ab2ce5aa54091136040d9634b9af8" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc7e20816b52cb47ab33221af91747fdf9e537a7b4bc252ed3aab37602cd4e65" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34b9aa4a4f9d81bec8bd22b0f2199000be9469a732f3c140f5fabd7a4e766c04" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "src/alejandra_cli") + end + + test do + assert_equal "Alejandra #{version}", shell_output("#{bin}/alejandra --version").chomp + + ENV["LC_ALL"] = "en_US.UTF-8" + input_nix = "{description=\"Demo\";outputs={self}:{};}" + output_nix = "{\n description = \"Demo\";\n outputs = {self}: {};\n}" + + (testpath/"alejandra_test.nix").write input_nix + system bin/"alejandra", "alejandra_test.nix" + assert_equal output_nix, (testpath/"alejandra_test.nix").read.strip + end +end diff --git a/Formula/a/alembic.rb b/Formula/a/alembic.rb new file mode 100644 index 0000000000000..3a5998d41d9cb --- /dev/null +++ b/Formula/a/alembic.rb @@ -0,0 +1,43 @@ +class Alembic < Formula + desc "Open computer graphics interchange framework" + homepage "http://www.alembic.io/" + url "https://github.com/alembic/alembic/archive/refs/tags/1.8.9.tar.gz" + sha256 "8c59c10813feee917d262c71af77d6fa3db1acaf7c5fecfd4104167077403955" + license "BSD-3-Clause" + head "https://github.com/alembic/alembic.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fe4175963e13cf035e6565485469cc17b66c12bbbe333e705f4111c52bedbe61" + sha256 cellar: :any, arm64_sequoia: "ec6e903dd3d682d599cc953dd768e9f9a6de69996c15e03d5aeb008e1c1abdcd" + sha256 cellar: :any, arm64_sonoma: "f7093bfea4c17d6ff6257501785677aa56a5c158d469b89932b7dd6a73a57595" + sha256 cellar: :any, sonoma: "7e4baa1809aae0982320bac1d6c2d54b28e47c253146c3890caf1bde15e453b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4371cff241b0231dbd14de3c5b65e092772902a714b3b7da72eb080412e63ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d79b74b60858311b6619973fcb81ff06363bc8e2838e90835be8e1ce1d01f79f" + end + + depends_on "cmake" => :build + depends_on "hdf5" + depends_on "imath" + depends_on "libaec" + + uses_from_macos "zlib" + + def install + cmake_args = std_cmake_args + %w[ + -DUSE_PRMAN=OFF + -DUSE_ARNOLD=OFF + -DUSE_MAYA=OFF + -DUSE_PYALEMBIC=OFF + -DUSE_HDF5=ON + ] + system "cmake", "-S", ".", "-B", "build", *cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "prman/Tests/testdata/cube.abc" + end + + test do + assert_match "root", shell_output("#{bin}/abcls #{pkgshare}/cube.abc") + end +end diff --git a/Formula/a/alexjs.rb b/Formula/a/alexjs.rb new file mode 100644 index 0000000000000..bfc848ba1ff12 --- /dev/null +++ b/Formula/a/alexjs.rb @@ -0,0 +1,33 @@ +class Alexjs < Formula + desc "Catch insensitive, inconsiderate writing" + homepage "https://alexjs.com" + url "https://github.com/get-alex/alex/archive/refs/tags/11.0.1.tar.gz" + sha256 "0c41d5d72c0101996aecb88ae2f423d6ac7a2fc57f93384d1a193d2ce67c4ffb" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8e7666f1bbca1055363b542c7937cfcfdcf2ce1667f8e01a3013353a0b32ab8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "02502faa257c0027e461b00a8f802c5bb60de704c3f75afbc09aa41b51763d71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "02502faa257c0027e461b00a8f802c5bb60de704c3f75afbc09aa41b51763d71" + sha256 cellar: :any_skip_relocation, arm64_ventura: "02502faa257c0027e461b00a8f802c5bb60de704c3f75afbc09aa41b51763d71" + sha256 cellar: :any_skip_relocation, sonoma: "b8eedf8b9395fadd7cc1dd2011a9a31043acda33dd864bd214fa6457edb62a5f" + sha256 cellar: :any_skip_relocation, ventura: "b8eedf8b9395fadd7cc1dd2011a9a31043acda33dd864bd214fa6457edb62a5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "08e51dfcc87a621c5b02f9d4ce9e92b571bc9a7659d53f75d2f66ac55d9f84b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02502faa257c0027e461b00a8f802c5bb60de704c3f75afbc09aa41b51763d71" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.txt").write "garbageman" + assert_match "garbage collector", shell_output("#{bin}/alex test.txt 2>&1", 1) + end +end diff --git a/Formula/a/algernon.rb b/Formula/a/algernon.rb new file mode 100644 index 0000000000000..3e94ef0872ec3 --- /dev/null +++ b/Formula/a/algernon.rb @@ -0,0 +1,46 @@ +class Algernon < Formula + desc "Pure Go web server with Lua, Markdown, HTTP/2 and template support" + homepage "https://github.com/xyproto/algernon" + url "https://github.com/xyproto/algernon/archive/refs/tags/v1.17.4.tar.gz" + sha256 "ac9dab6c1a6111588ce9572ffc46351e8eda86f495efb9f25ed9ad7dc6f5ac82" + license "BSD-3-Clause" + version_scheme 1 + head "https://github.com/xyproto/algernon.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c494e6fd80f964a17b6f267c6c8a539ff1fcd2541d03fd424ba1c81a3b4b012d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "373c1718ad869193e8052898edefdafd7f148402c52e40278ba79cb8261638cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef49ed9df5d3b02e086635c1646da9b6cb091f9de33528e24f05511169ad2435" + sha256 cellar: :any_skip_relocation, arm64_ventura: "422ad3c58512082f42a176927c5381a4e04389216c213c448974f66c52c7aae6" + sha256 cellar: :any_skip_relocation, sonoma: "269e77f15bb933c7b14dd3ae92df72709e0cea2e91ad4c58ebb8d4e24a247f9d" + sha256 cellar: :any_skip_relocation, ventura: "30736dcbe2a9c3456b019cf2f7d2d4de6a079c5a627d002203a537ad85d8c6ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "1022a6ee40a91870ceebccaf02c7ee9993c4466d4ca407420bcf1ac6c4c3cdad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03a33b6a3204128cbdd386108af445fa195ba47b8d03ef5166582614af7943f5" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "-mod=vendor" + + bin.install "desktop/mdview" + end + + test do + port = free_port + pid = fork do + exec bin/"algernon", "-s", "-q", "--httponly", "--boltdb", "tmp.db", + "--addr", ":#{port}" + end + sleep 20 + output = shell_output("curl -sIm3 -o- http://localhost:#{port}") + assert_match(/200 OK.*Server: Algernon/m, output) + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/a/algol68g.rb b/Formula/a/algol68g.rb new file mode 100644 index 0000000000000..abe64393ee9cc --- /dev/null +++ b/Formula/a/algol68g.rb @@ -0,0 +1,41 @@ +class Algol68g < Formula + desc "Algol 68 compiler-interpreter" + homepage "https://jmvdveer.home.xs4all.nl/algol.html" + url "https://jmvdveer.home.xs4all.nl/algol68g-3.10.5.tar.gz" + sha256 "cc9b104b3e3384bb4b36821cce660c71f910e1c404a347bfc7eb817c5b121cda" + license "GPL-3.0-or-later" + + livecheck do + url "https://jmvdveer.home.xs4all.nl/en.download.algol-68-genie-current.html" + regex(/href=.*?algol68g[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "9b5ffee64033715be346cf602edae1ff2dcf173dba830b85f287a19aa92841e4" + sha256 arm64_sequoia: "8ff432584f3421e7a7da19fb462b13d9c82d5d4a6071f96351806e8aeef2e4b3" + sha256 arm64_sonoma: "d21cfcc6a7668085847d77ea0721b1667bdc78152c13dd3589a9abca4a6fc3cb" + sha256 sonoma: "c7333068a1a3a6e17a29920ace37204a03467eef2df856a2f03478665c5ca13b" + sha256 arm64_linux: "d51ea28dbd920c6637150c68f608204311429dc754756722a33e605d095be35b" + sha256 x86_64_linux: "b127428b3a48a328ef7b9f805eaeba8d791da351444e6cbab5711767ab68a296" + end + + uses_from_macos "ncurses" + + on_linux do + depends_on "libpq" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + path = testpath/"hello.alg" + path.write <<~EOS + print("Hello World") + EOS + + assert_equal "Hello World", shell_output("#{bin}/a68g #{path}").strip + end +end diff --git a/Formula/a/algolia.rb b/Formula/a/algolia.rb new file mode 100644 index 0000000000000..9fbe32c725b55 --- /dev/null +++ b/Formula/a/algolia.rb @@ -0,0 +1,35 @@ +class Algolia < Formula + desc "CLI for Algolia" + homepage "https://www.algolia.com/doc/tools/cli" + url "https://github.com/algolia/cli/archive/refs/tags/v1.7.1.tar.gz" + sha256 "3757d76ed2a9c341fb5f1a4cb8e2e7465ac17753eb489bb5fae2f4df10c6302b" + license "MIT" + head "https://github.com/algolia/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ed3fe3b5b7f0a90081443986fbe756dfd14fc828fa3b50944dd6a2d3e64139ee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed3fe3b5b7f0a90081443986fbe756dfd14fc828fa3b50944dd6a2d3e64139ee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed3fe3b5b7f0a90081443986fbe756dfd14fc828fa3b50944dd6a2d3e64139ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed3fe3b5b7f0a90081443986fbe756dfd14fc828fa3b50944dd6a2d3e64139ee" + sha256 cellar: :any_skip_relocation, sonoma: "b67032c92b32eeb4bd79836b6d2c09d6a8e0cc05ff0fa02bbf7cb1b6889d7501" + sha256 cellar: :any_skip_relocation, ventura: "b67032c92b32eeb4bd79836b6d2c09d6a8e0cc05ff0fa02bbf7cb1b6889d7501" + sha256 cellar: :any_skip_relocation, arm64_linux: "048383a03e88f4a83dbf333ad4daf895100cfabcf35adf6f5a9fea9dd452c738" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a448e8b052d4ed8cb044cfcb74bb3b33be7e7a9c92853babff6b476224a81355" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/algolia/cli/pkg/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/algolia" + + generate_completions_from_executable(bin/"algolia", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/algolia --version") + + output = shell_output("#{bin}/algolia apikeys list 2>&1", 4) + assert_match "you have not configured your Application ID yet", output + end +end diff --git a/Formula/a/ali.rb b/Formula/a/ali.rb new file mode 100644 index 0000000000000..3fb3db74fa498 --- /dev/null +++ b/Formula/a/ali.rb @@ -0,0 +1,39 @@ +class Ali < Formula + desc "Generate HTTP load and plot the results in real-time" + homepage "https://github.com/nakabonne/ali" + url "https://github.com/nakabonne/ali/archive/refs/tags/v0.7.5.tar.gz" + sha256 "3eed2d7cbdf8365cad78833362e99138e7c0945d6dbc19e1253f8e0438a72f81" + license "MIT" + head "https://github.com/nakabonne/ali.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6c75f79f91b80211c17b21b777050f1df8a6081ac567ffb5556d9609148b4d1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1fa319e59e535c54935058ab8a8ffdf177bec32fac05003168bd9c15021da164" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e26d87beadff780ef72f728cef8042f6ef0f8224e9e5745b35c74653fa5a47a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b5c51e93206dc7cfcedf87724c1333f0318a2c9d3901f1c34c523363cd32469" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eb5f1fb53b82dc72ed40d5a00b4e7bf9a66955ebb12ecb5d882ec0f6d73db811" + sha256 cellar: :any_skip_relocation, sonoma: "f10493d0b0865a6b278382ceee4ac84b9f373b238721f949061a188eb03172ab" + sha256 cellar: :any_skip_relocation, ventura: "c1e614a1bb025e707f4535377c85ff1ed81dceb47e73f6079c7c3fc519cc7cd7" + sha256 cellar: :any_skip_relocation, monterey: "45e2b734e1662d30b68c7b47b2684399c5ecb5e13747f6f8036830983daefd37" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b64df658e252aac13d38bf1fd272c53ba58f55efd77861e01622de875d06626" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b61422195f1f744328bea5388328f63b68c45e04543d117a83d8d5a155561cc" + end + + depends_on "go" => :build + + conflicts_with "nmh", because: "both install `ali` binaries" + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit= -X main.date=#{time.iso8601}}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + output = shell_output("#{bin}/ali --duration=10m --rate=100 http://host.xz 2>&1", 1) + assert_match "failed to start application: failed to generate terminal interface", output + + assert_match version.to_s, shell_output("#{bin}/ali --version 2>&1") + end +end diff --git a/Formula/a/aliae.rb b/Formula/a/aliae.rb new file mode 100644 index 0000000000000..55d9d214da14b --- /dev/null +++ b/Formula/a/aliae.rb @@ -0,0 +1,51 @@ +class Aliae < Formula + desc "Cross shell and platform alias management" + homepage "https://aliae.dev" + url "https://github.com/jandedobbeleer/aliae/archive/refs/tags/v0.26.6.tar.gz" + sha256 "905602b3dd56b6caf099970132edf7e3366b3ef0d98a71b277e23c00990e979d" + license "MIT" + head "https://github.com/jandedobbeleer/aliae.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "23027e091dc14b23943ce0c49bbdd033aa88b284c31873db383174af492b1f0a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b92e61c0150e736a343ea89b719b2daa761b380e283a07ed186800c96566243" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67767bffeda6f91745690be6ad4f36de9095ed20338e4fd51f07b13c1380b053" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5c2e3fbd5cbacc683410564241b3af976f0dd7cce4927a01c44bae2617a5085a" + sha256 cellar: :any_skip_relocation, sonoma: "80f94a1ed79e0501da37ec491c68eeac725df677a1e4277a6f22a0a9f189798b" + sha256 cellar: :any_skip_relocation, ventura: "c2147bc050d3bc14bd1d48a1bd2b9625143179da77c9666260e0dac634c2d1ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "73937fe03334e20ce13283b3cca4f9494fa0ff1065238424584e39b553bf3393" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4322cff6d3ca1b321177b9f03422de1259caa1f173cd52c099e6e7afa1d696c1" + end + + depends_on "go" => :build + + def install + cd "src" do + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + generate_completions_from_executable(bin/"aliae", "completion") + end + + test do + (testpath/".aliae.yaml").write <<~YAML + alias: + - name: a + value: aliae + - name: hello-world + value: echo "hello world" + type: function + YAML + + output = shell_output("#{bin}/aliae init bash") + assert_equal <<~SHELL.chomp, output + alias a="aliae" + hello-world() { + echo "hello world" + } + SHELL + + assert_match version.to_s, shell_output("#{bin}/aliae --version") + end +end diff --git a/Formula/a/aliddns.rb b/Formula/a/aliddns.rb new file mode 100644 index 0000000000000..bb2e809aa9e8f --- /dev/null +++ b/Formula/a/aliddns.rb @@ -0,0 +1,43 @@ +class Aliddns < Formula + desc "Aliyun(Alibaba Cloud) ddns for golang" + homepage "https://github.com/OpenIoTHub/aliddns" + url "https://github.com/OpenIoTHub/aliddns.git", + tag: "v0.0.23", + revision: "0b3a93644030e1917f34ab76d4cbc279f090653c" + license "MIT" + head "https://github.com/OpenIoTHub/aliddns.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "06b60c6460fba278ca18d975d72e209b6e7089b35012f21dfceba3334db24b92" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b1a8f12757738745c93af17367461d0f6a42482075f5b31fb093bd69ada590d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "90af620562ae9c772f7d5cc14f6398c498d06ea9e77cd67bc759512ab677a94f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b6ba33d055f1f0342f2aa3121593933125b2054b1fa9faae848ae71ad0d6d6d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c2eb96cb882b715a1d9427e5bb3f6bca9222bd24d3a2080b864632deab660582" + sha256 cellar: :any_skip_relocation, sonoma: "b8051122a13e743cc9c0e6aa0eccb86ec9bcf014dff7e23180683068e19bfb75" + sha256 cellar: :any_skip_relocation, ventura: "f083114a10855bf586164f35d83235d74b5cd3b848adf3a7d609c26aedc4a496" + sha256 cellar: :any_skip_relocation, monterey: "4a87e7615baed5cb9c6e1c2b38091c93bc616a054fecc57488a43c196818cd85" + sha256 cellar: :any_skip_relocation, arm64_linux: "04d29e980abbe4840c4a77b971d61dfa6ddc0239d72ab00de599c98d75ad5193" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf0adee43a8efe19657d0aec5deb3aae6bf0d54030f3fe30dd1155935dcc192e" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{Utils.git_head} -X main.builtBy=#{tap.user}" + system "go", "build", "-mod=vendor", *std_go_args(ldflags:) + pkgetc.install "aliddns.yaml" + end + + service do + run [opt_bin/"aliddns", "-c", etc/"aliddns/aliddns.yaml"] + keep_alive true + log_path var/"log/aliddns.log" + error_log_path var/"log/aliddns.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/aliddns -v 2>&1") + assert_match "config created", shell_output("#{bin}/aliddns init --config=aliddns.yml 2>&1") + assert_path_exists testpath/"aliddns.yml" + end +end diff --git a/Formula/a/align.rb b/Formula/a/align.rb new file mode 100644 index 0000000000000..bcf869259b6d3 --- /dev/null +++ b/Formula/a/align.rb @@ -0,0 +1,29 @@ +class Align < Formula + desc "Text column alignment filter" + homepage "https://kinzler.com/me/align/" + url "https://kinzler.com/me/align/align-1.7.5.tgz" + sha256 "cc692fb9dee0cc288757e708fc1a3b6b56ca1210ca181053a371cb11746969dd" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?align[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "59752d9b714819dca9ca9a6bd4cf70a9a78645aad65a2b5d031812ee84b52c5c" + end + + conflicts_with "speech-tools", because: "both install `align` binaries" + + def install + system "make", "install", "BINDIR=#{bin}" + end + + test do + assert_equal " 1 1\n12 12\n", pipe_output(bin/"align", "1 1\n12 12\n", 0) + end +end diff --git a/Formula/a/alive2.rb b/Formula/a/alive2.rb new file mode 100644 index 0000000000000..1d19ecc0b04c4 --- /dev/null +++ b/Formula/a/alive2.rb @@ -0,0 +1,56 @@ +class Alive2 < Formula + desc "Automatic verification of LLVM optimizations" + homepage "https://github.com/AliveToolkit/alive2" + url "https://github.com/AliveToolkit/alive2.git", + tag: "v21.0", + revision: "913e1556032ee70a9ebf147b5a0c7e10086b7490" + license "MIT" + revision 1 + head "https://github.com/AliveToolkit/alive2.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5675de65ebc52814b9c54323af8dee2c8f6601c917c6652ace10dedc6cbc2b10" + sha256 cellar: :any, arm64_sequoia: "2b50bddff87ab541451702d2c7d004412b8b10ae2b946a2efba614943cbfef58" + sha256 cellar: :any, arm64_sonoma: "c36cbe7db0301802dbaed9106d464e15979f24d842d73ea3d092ee6a74740317" + sha256 cellar: :any, arm64_ventura: "b414bdbfb3e39fade927d5241a03c78bc05346359d14d72d222819fa79b2b01d" + sha256 cellar: :any, sonoma: "44f20bc496219036254e1e751090e6d1cd5349ad97635ab1d3c26bffa184f0a0" + sha256 cellar: :any, ventura: "e7c67408e23dd90ca063cb508dea9060a5f380bbfcb3927481908784872560fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5c21492b9c865c0b252c360129e047c6d0260180d8d2fe9dc36dfa57aab6c55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9fe289bc8cd5bd27db7c60c76084b6b9b72ffe6a1fa5dae9f43ede9367fb4d9" + end + + depends_on "cmake" => :build + depends_on "re2c" => :build + depends_on "hiredis" + depends_on "llvm" + depends_on "z3" + depends_on "zstd" + uses_from_macos "zlib" + + def install + # Work around ir/state.cpp:730:40: error: reference to local binding + # 'src_data' declared in enclosing function 'IR::State::copyUBFromBB' + if OS.mac? && MacOS.version <= :ventura + ENV.llvm_clang + # Also link to LLVM libc++ due to `std::__hash_memory` availability in newer header + # https://github.com/llvm/llvm-project/commit/17d05695388128353662fbb80bbb7a13d172b41d + ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/c++ -L#{Formula["llvm"].opt_lib}/unwind -lunwind" + end + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_LLVM_UTILS=ON", "-DBUILD_TV=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + int main(void) { return 0; } + C + + clang = Formula["llvm"].opt_bin/"clang" + system clang, "-O3", "test.c", "-S", "-emit-llvm", + "-fpass-plugin=#{lib/shared_library("tv")}", + "-Xclang", "-load", + "-Xclang", lib/shared_library("tv") + end +end diff --git a/Formula/a/aliyun-cli.rb b/Formula/a/aliyun-cli.rb new file mode 100644 index 0000000000000..17901e3e6bba0 --- /dev/null +++ b/Formula/a/aliyun-cli.rb @@ -0,0 +1,45 @@ +class AliyunCli < Formula + desc "Universal Command-Line Interface for Alibaba Cloud" + homepage "https://github.com/aliyun/aliyun-cli" + url "https://github.com/aliyun/aliyun-cli.git", + tag: "v3.1.1", + revision: "4ae725eca4daf581337383c47438e44c3c0b979f" + license "Apache-2.0" + head "https://github.com/aliyun/aliyun-cli.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9ea99ff5aded765e6c29aae979a5916bf78311443647de1b3273e1380c35caa4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ea99ff5aded765e6c29aae979a5916bf78311443647de1b3273e1380c35caa4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ea99ff5aded765e6c29aae979a5916bf78311443647de1b3273e1380c35caa4" + sha256 cellar: :any_skip_relocation, sonoma: "3be87d0b23913abc28581bc347158f4b05f2202d21e2aa06ff650989beaef721" + sha256 cellar: :any_skip_relocation, arm64_linux: "c699339deab3c0d7bb260f24b65fe552b700839048a74516a77c6e89ce920fea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee8b23565d6d699404d48a59c05f63cdd2a9aed55e7a22a53325da70e9a0c482" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/aliyun/aliyun-cli/v#{version.major}/cli.Version=#{version}" + system "go", "build", *std_go_args(output: bin/"aliyun", ldflags:), "main/main.go" + end + + test do + version_out = shell_output("#{bin}/aliyun version") + assert_match version.to_s, version_out + + help_out = shell_output("#{bin}/aliyun --help") + assert_match "Alibaba Cloud Command Line Interface Version #{version}", help_out + assert_match "", help_out + assert_match "Usage:", help_out + assert_match "aliyun [--parameter1 value1 --parameter2 value2 ...]", help_out + + oss_out = shell_output("#{bin}/aliyun oss") + assert_match "Object Storage Service", oss_out + assert_match "aliyun oss [command] [args...] [options...]", oss_out + end +end diff --git a/Formula/a/aliyunpan.rb b/Formula/a/aliyunpan.rb new file mode 100644 index 0000000000000..51e90b376eb2c --- /dev/null +++ b/Formula/a/aliyunpan.rb @@ -0,0 +1,30 @@ +class Aliyunpan < Formula + desc "Command-line client tool for Alibaba aDrive disk" + homepage "https://github.com/tickstep/aliyunpan" + url "https://github.com/tickstep/aliyunpan/archive/refs/tags/v0.3.7.tar.gz" + sha256 "65003e0925e5f64b20f47ea030aa01cb40972dc4cce67cc93a69282d88f254b0" + license "Apache-2.0" + head "https://github.com/tickstep/aliyunpan.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "faad7d7d6aceedefc2080e2efc7db379f6e0d6640d0f1acbd2734ee9e53f6422" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f43f03044ff8db6b97fee26628dbe66343935e13e53aee6d973adfddf0924b97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f43f03044ff8db6b97fee26628dbe66343935e13e53aee6d973adfddf0924b97" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f43f03044ff8db6b97fee26628dbe66343935e13e53aee6d973adfddf0924b97" + sha256 cellar: :any_skip_relocation, sonoma: "d8a3e1de0f284f8c1bd1c0f8a96db80f885464e3f5e5a47c750bf3a0ff921fe5" + sha256 cellar: :any_skip_relocation, ventura: "d8a3e1de0f284f8c1bd1c0f8a96db80f885464e3f5e5a47c750bf3a0ff921fe5" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fe036fc957c7ec78225a43510603dde7b1fd2cf69836a692a388cfb1690e85e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb7f77f47dc25c016a62ac1ce13546514e281d0f57bef014a32215a4b68bc0dc" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"aliyunpan", "run", "touch", "output.txt" + assert_path_exists testpath/"output.txt" + end +end diff --git a/Formula/a/all-repos.rb b/Formula/a/all-repos.rb new file mode 100644 index 0000000000000..40e17a3be0c87 --- /dev/null +++ b/Formula/a/all-repos.rb @@ -0,0 +1,50 @@ +class AllRepos < Formula + include Language::Python::Virtualenv + + desc "Clone all your repositories and apply sweeping changes" + homepage "https://github.com/asottile/all-repos" + url "https://files.pythonhosted.org/packages/81/6d/2e793a3884244034e2a4e587759ddda0a94f808571a01d6acb15cb3702c8/all_repos-1.31.0.tar.gz" + sha256 "b9083857addd96b76ae958b25ac19ad314f3e5c43e3212721b943fc7f14ea851" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d814d6697713609b2396d80fc04f27b0cadff970894c236b6c0fd73c6e8de8ca" + end + + depends_on "python@3.14" + + resource "identify" do + url "https://files.pythonhosted.org/packages/ff/e7/685de97986c916a6d93b3876139e00eef26ad5bbbd61925d670ae8013449/identify-2.6.15.tar.gz" + sha256 "e4f4864b96c6557ef2a1e1c951771838f4edc9df3a72ec7118b338801b11c7bf" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"all-repos.json").write <<~JSON + { + "output_dir": "out", + "source": "all_repos.source.json_file", + "source_settings": {"filename": "repos.json"}, + "push": "all_repos.push.readonly", + "push_settings": {} + } + JSON + chmod 0600, "all-repos.json" + (testpath/"repos.json").write <<~JSON + {"discussions": "https://github.com/Homebrew/discussions"} + JSON + + system bin/"all-repos-clone" + assert_path_exists testpath/"out/discussions" + output = shell_output("#{bin}/all-repos-grep discussions") + assert_match "out/discussions:README.md", output + end +end diff --git a/Formula/a/allegro.rb b/Formula/a/allegro.rb new file mode 100644 index 0000000000000..595bcbe645160 --- /dev/null +++ b/Formula/a/allegro.rb @@ -0,0 +1,84 @@ +class Allegro < Formula + desc "C/C++ multimedia library for cross-platform game development" + homepage "https://liballeg.org/" + url "https://github.com/liballeg/allegro5/releases/download/5.2.10.1/allegro-5.2.10.1.tar.gz" + sha256 "2ef9f77f0b19459ea2c7645cc4762fc35c74d3d297bfc38d8592307757166f05" + license "Zlib" + revision 2 + head "https://github.com/liballeg/allegro5.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "279a66b4096e22b8b252632d8daf3f83e1c378a7d470699ffebda7e779be9db8" + sha256 cellar: :any, arm64_sequoia: "b5a0bac3386f3bce78af4bf6e938a21bd329178d7055dd811f33ea8299a916d9" + sha256 cellar: :any, arm64_sonoma: "c09db091d2391cd5cb51e00e4857ceabdf279ebcc111fd501b1331dd990ad091" + sha256 cellar: :any, arm64_ventura: "a72784c6d7f9dad5f653e8d16e20e12c9f4d718494003e2efe12bd9e4dc9377e" + sha256 cellar: :any, sonoma: "04e6776435cf05f3dbedddb3eae6124ba1fe4eb0438b3e7b6816633e95890867" + sha256 cellar: :any, ventura: "43ced1b768c9fb07f4cb012b0898c91d464d52aaac253dc5e337494b83d3ce1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "421fc43dcbb28fc51af56b84ed76d0a3febaed1f931ea05c6a47873797c63118" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f4d4bd8e8e01b35aca70053f1fc651c35a9ed2c37bab958aeb2b833e6b02044" + end + + depends_on "cmake" => :build + depends_on "flac" + depends_on "freetype" + depends_on "libogg" + depends_on "libopenmpt" + depends_on "libvorbis" + depends_on "opusfile" + depends_on "physfs" + depends_on "theora" + depends_on "webp" + + on_macos do + depends_on "opus" + end + + on_linux do + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on "libxscrnsaver" + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + cmake_args = %W[ + -DWANT_DOCS=OFF + -DWANT_DUMB=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"allegro_test.cpp").write <<~CPP + #include + #include + + int main(int n, char** c) { + if (!al_init()) { + return 1; + } + return 0; + } + CPP + + system ENV.cxx, "allegro_test.cpp", "-I#{include}", "-L#{lib}", + "-lallegro", "-lallegro_main", "-o", "allegro_test" + system "./allegro_test" + end +end diff --git a/Formula/a/alloy-analyzer.rb b/Formula/a/alloy-analyzer.rb new file mode 100644 index 0000000000000..da9be3bd89ae9 --- /dev/null +++ b/Formula/a/alloy-analyzer.rb @@ -0,0 +1,34 @@ +class AlloyAnalyzer < Formula + desc "Open-source language and analyzer for software modeling" + homepage "https://alloytools.org" + url "https://search.maven.org/remotecontent?filepath=org/alloytools/org.alloytools.alloy.dist/6.2.0/org.alloytools.alloy.dist-6.2.0.jar" + sha256 "6037cbeee0e8423c1c468447ed10f5fcf2f2743a2ffc39cb1c81f2905c0fdb9d" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/alloytools/org.alloytools.alloy.dist/maven-metadata.xml" + regex(%r{(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "e6b7ea99c4d94c851e458306d370fcdd49b32426042bc21618972e37f3c5a907" + end + + depends_on "openjdk" + + conflicts_with "grafana-alloy", because: "both install `alloy` binaries" + + def install + libexec.install "org.alloytools.alloy.dist-#{version}.jar" + bin.write_jar_script libexec/"org.alloytools.alloy.dist-#{version}.jar", "alloy" + end + + test do + output = shell_output("#{bin}/alloy version 2>&1") + filtered_output = output.lines.reject { |line| line.start_with?("Picked up") }.join + ohai "Expected version: #{version}" + assert_match version.to_s, filtered_output + end +end diff --git a/Formula/a/allure.rb b/Formula/a/allure.rb new file mode 100644 index 0000000000000..9b22d5d19877a --- /dev/null +++ b/Formula/a/allure.rb @@ -0,0 +1,56 @@ +class Allure < Formula + desc "Flexible lightweight test report tool" + homepage "https://github.com/allure-framework/allure2" + url "https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.35.1/allure-commandline-2.35.1.zip" + sha256 "3cb17dd207291fe120c99a0e59919a45de656debc416c2ab3a4a2e1aa997aa54" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=io/qameta/allure/allure-commandline/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "56ccc39be1a1cee6569877d0cb6eddbe01f9871a187732ba4b646c6a239461d8" + end + + depends_on "openjdk" + + def install + # Remove all windows files + rm(Dir["bin/*.bat"]) + + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + (testpath/"allure-results/allure-result.json").write <<~JSON + { + "uuid": "allure", + "name": "testReportGeneration", + "fullName": "org.homebrew.AllureFormula.testReportGeneration", + "status": "passed", + "stage": "finished", + "start": 1494857300486, + "stop": 1494857300492, + "labels": [ + { + "name": "package", + "value": "org.homebrew" + }, + { + "name": "testClass", + "value": "AllureFormula" + }, + { + "name": "testMethod", + "value": "testReportGeneration" + } + ] + } + JSON + system bin/"allure", "generate", "#{testpath}/allure-results", "-o", "#{testpath}/allure-report" + end +end diff --git a/Formula/a/allureofthestars.rb b/Formula/a/allureofthestars.rb new file mode 100644 index 0000000000000..d49bf1e0f122a --- /dev/null +++ b/Formula/a/allureofthestars.rb @@ -0,0 +1,72 @@ +class Allureofthestars < Formula + desc "Near-future Sci-Fi roguelike and tactical squad combat game" + homepage "https://allureofthestars.com/" + url "https://hackage.haskell.org/package/Allure-0.11.0.0/Allure-0.11.0.0.tar.gz" + sha256 "6125cc585e2a5f28c88855c3c328385c1f21bed093d7606478f1b2af0cb2b6d6" + license all_of: ["AGPL-3.0-or-later", "GPL-2.0-or-later", "OFL-1.1", "MIT", "Bitstream-Vera"] + revision 6 + head "https://github.com/AllureOfTheStars/Allure.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bc1152802bbc0c177b8da999c6221a7c229fb2c6fc104fe8135dcfe0691062f4" + sha256 cellar: :any, arm64_sequoia: "bdcf533595e5ae4f13cde425c0e06c515257045288acddad4b9530ce3c949394" + sha256 cellar: :any, arm64_sonoma: "f2798a7e39c570fb3f16f223658233ed9d4f273bfb079851d5b23ad7ee3279c4" + sha256 cellar: :any, arm64_ventura: "6892fd7487390e10f9a9353e0ed478bbaae9492f458cc26ce6e28bb152d9ba23" + sha256 cellar: :any, arm64_monterey: "9d7499f1d328a6a4b91e22b90ded73a9ba3f4147cddff1d27e6a38a0f009378b" + sha256 cellar: :any, sonoma: "04408ea5d216f20bf717bff54479860587047d3ba6f461dffb2ad44abdad6ca3" + sha256 cellar: :any, ventura: "3283e3c2fc6119cdb90fea04630036f3e2db8e614aacb4190910d23afb722d1c" + sha256 cellar: :any, monterey: "03c79e5c09db8d0a39e66e8f79ed7ef2fb39c5d1a7760ac3b5979a74a309a61c" + sha256 cellar: :any_skip_relocation, arm64_linux: "3073343041a2759f07e44132a6ac86238e34660549a7b8df8e7b05aa28fa52f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d9642c0028543fc3452e204831c3d675c121fb756fd7376f9c6f879adbaea5a" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "sdl2" + depends_on "sdl2_ttf" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + # TODO: Remove resource once new release is available or hackage revision (r2+) with + # equivalent changes (https://hackage.haskell.org/package/sdl2-2.5.5.0/revisions/). + resource "sdl2" do + url "https://hackage.haskell.org/package/sdl2-2.5.5.0/sdl2-2.5.5.0.tar.gz" + sha256 "23fdaa896e528620f31afeb763422d0c27d758e587215ff0c1387d6e6b3551cd" + + # Backport increased upper bounds for dependencies + patch do + url "https://github.com/haskell-game/sdl2/commit/7d77a910b176c395881da3bf507a6e1936a30023.patch?full_index=1" + sha256 "eee6b20184b9a86adf3fdfb36b5565bde2e0845f0b0d9edf37872d6abfe3248e" + end + patch do + url "https://github.com/haskell-game/sdl2/commit/5c92d46bebf188911d6472ace159995e47580290.patch?full_index=1" + sha256 "570ad5c52892709e19777eb2e9aa6773c0626ce993fbc775c1d1a3ae3674af2f" + end + end + + def install + # Workaround to use newer GHC + odie "Check if workaround can be removed!" if build.stable? && version > "0.11.0.0" + (buildpath/"cabal.project.local").write "packages: . sdl2/" + (buildpath/"sdl2").install resource("sdl2") + + # Workaround for GHC 9.12 until https://github.com/tfausak/witch/issues/117 is fixed + args = ["--allow-newer=witch:base,witch:template-haskell"] + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *std_cabal_v2_args + end + + test do + assert_empty shell_output("#{bin}/Allure --dbgMsgSer --dbgMsgCli --logPriority 0 --newGame 3 " \ + "--maxFps 100000 --stopAfterFrames 50 --automateAll --keepAutomated " \ + "--gameMode battle --setDungeonRng \"SMGen 7 7\" --setMainRng \"SMGen 7 7\"") + assert_empty (testpath/".Allure/stderr.txt").read + assert_match "Client FactionId 1 closed frontend.", (testpath/".Allure/stdout.txt").read + end +end diff --git a/Formula/a/alluxio.rb b/Formula/a/alluxio.rb new file mode 100644 index 0000000000000..7ac6f8f8b7837 --- /dev/null +++ b/Formula/a/alluxio.rb @@ -0,0 +1,67 @@ +class Alluxio < Formula + desc "Open Source Memory Speed Virtual Distributed Storage" + homepage "https://www.alluxio.io/" + url "https://downloads.alluxio.io/downloads/files/2.9.5/alluxio-2.9.5-bin.tar.gz" + sha256 "a85fb49654599f813661f9b8fc68d507774746258c607af33b9b2b12f16feaba" + license "Apache-2.0" + + livecheck do + url "https://downloads.alluxio.io/downloads/files/" + regex(%r{href=["']?v?(\d+(?:[.-]\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5063a69bf2f9fb8db4f197d44aa9098e206c9b69ab03c2c7f3a2698c94c21f8c" + end + + # Alluxio requires Java 8 or Java 11 + depends_on "openjdk@11" + + def default_alluxio_conf + <<~EOS + alluxio.master.hostname=localhost + EOS + end + + def install + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env("11") + chmod "+x", Dir["#{libexec}/bin/*"] + + rm_r(Dir["#{etc}/alluxio/*"]) + + (etc/"alluxio").install libexec/"conf/alluxio-env.sh.template" => "alluxio-env.sh" + ln_sf "#{etc}/alluxio/alluxio-env.sh", "#{libexec}/conf/alluxio-env.sh" + + defaults = etc/"alluxio/alluxio-site.properties" + defaults.write(default_alluxio_conf) unless defaults.exist? + ln_sf "#{etc}/alluxio/alluxio-site.properties", "#{libexec}/conf/alluxio-site.properties" + + # Build `:all` bottle. + rm_r libexec/"integration/docker" + end + + def caveats + <<~EOS + To configure alluxio, edit + #{etc}/alluxio/alluxio-env.sh + #{etc}/alluxio/alluxio-site.properties + + To use `alluxio-fuse` on macOS: + brew install --cask macfuse + EOS + end + + test do + output = shell_output("#{bin}/alluxio validateConf") + assert_match "Validating configuration.", output + + output = shell_output("#{bin}/alluxio clearCache 2>&1", 1) + expected_output = OS.mac? ? "drop_caches: No such file or directory" : "drop_caches: Read-only file system" + assert_match expected_output, output + + assert_match version.to_s, shell_output("#{bin}/alluxio version") + end +end diff --git a/Formula/a/alot.rb b/Formula/a/alot.rb new file mode 100644 index 0000000000000..dc42d1cd52ff5 --- /dev/null +++ b/Formula/a/alot.rb @@ -0,0 +1,171 @@ +class Alot < Formula + include Language::Python::Virtualenv + + desc "Text mode MUA using notmuch mail" + homepage "https://github.com/pazz/alot" + # TODO: check if we can remove `standard-mailcap` from `pypi_packages` + # https://github.com/pazz/alot/issues/1632 + url "https://github.com/pazz/alot.git", + tag: "0.11", + revision: "a8a108e2344656a13bca21211ccc0df2414cbef6" + license "GPL-3.0-only" + revision 3 + head "https://github.com/pazz/alot.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "682d580669a0e7e68d83a60bf92d879e8c9260b14cc775a066f9460336186e05" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2073f6c4e5efd15df25adcfb47610e6e660459b4887eb65781758e25122fcce1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce121172682f2fa975d6bea984bc29140c5d15e2acb6711fb4e593e9cd64b861" + sha256 cellar: :any_skip_relocation, sonoma: "0182e95a1b54b00b0d23616ac1e22757ead4f31a7f6d29a71282cfe220ebc538" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fe63c1ecf7ed1c13992b031363ce9fc57c9ed8b8f392a0f37f8b9260018e287" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b9196aa41058870ae15ec07ab9fc659d7c5317547ebc7664af48ba85f223508" + end + + depends_on "sphinx-doc" => :build + depends_on "swig" => :build + depends_on "gpgmepy" => :no_linkage + depends_on "libmagic" => :no_linkage + depends_on "notmuch" + depends_on "python@3.14" + + pypi_packages exclude_packages: "notmuch2", + extra_packages: "standard-mailcap" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "automat" do + url "https://files.pythonhosted.org/packages/e3/0f/d40bbe294bbf004d436a8bcbcfaadca8b5140d39ad0ad3d73d1a8ba15f14/automat-25.4.16.tar.gz" + sha256 "0017591a5477066e90d26b0e696ddc143baafd87b588cfac8100bc6be9634de0" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "constantly" do + url "https://files.pythonhosted.org/packages/4d/6f/cb2a94494ff74aa9528a36c5b1422756330a75a8367bf20bd63171fc324d/constantly-23.10.4.tar.gz" + sha256 "aa92b70a33e2ac0bb33cd745eb61776594dc48764b06c35e0efd050b7f1c7cbd" + end + + resource "hyperlink" do + url "https://files.pythonhosted.org/packages/3a/51/1947bd81d75af87e3bb9e34593a4cf118115a8feb451ce7a69044ef1412e/hyperlink-21.0.0.tar.gz" + sha256 "427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "incremental" do + url "https://files.pythonhosted.org/packages/27/87/156b374ff6578062965afe30cc57627d35234369b3336cf244b240c8d8e6/incremental-24.7.2.tar.gz" + sha256 "fb4f1d47ee60efe87d4f6f0ebb5f70b9760db2b2574c59c8e8912be4ebd464c9" + end + + resource "mock" do + url "https://files.pythonhosted.org/packages/07/8c/14c2ae915e5f9dca5a22edd68b35be94400719ccfa068a03e0fb63d0f6f6/mock-5.2.0.tar.gz" + sha256 "4e460e818629b4b173f32d08bf30d3af8123afbb8e04bb5707a1fd4799e503f0" + end + + resource "python-magic" do + url "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz" + sha256 "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "standard-mailcap" do + url "https://files.pythonhosted.org/packages/53/e8/672bd621c146b89667a2bfaa58a1384db13cdd62bb7722ddb8d672bf7a75/standard_mailcap-3.13.0.tar.gz" + sha256 "19ed7955dbeaccb35e8bb05b2b5443ce55c1f932a8cbe7a5c13d42f9db4f499a" + end + + resource "twisted" do + url "https://files.pythonhosted.org/packages/13/0f/82716ed849bf7ea4984c21385597c949944f0f9b428b5710f79d0afc084d/twisted-25.5.0.tar.gz" + sha256 "1deb272358cb6be1e3e8fc6f9c8b36f78eb0fa7c2233d2dbe11ec6fee04ea316" + + # Fix asyncio error with Python 3.14, remove in next release + # PR ref: https://github.com/twisted/twisted/pull/12508 + patch do + url "https://github.com/twisted/twisted/commit/c8a4c700a71c283bd65faee69820f88ec97966cb.patch?full_index=1" + sha256 "04b849f18e6ef01e7ee2903dba13ffa8bcb04c6d9c182d25410605320d819bd2" + end + patch do + url "https://github.com/twisted/twisted/commit/69b81f9038eea5ef60c30a3460abb4cc26986f72.patch?full_index=1" + sha256 "f999fc976327e955fbe82348dfd8c336925bc1f87cfaf4bd4c95deeb0570116d" + end + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/bb/d3/09683323e2290732a39dc92ca5031d5e5ddda56f8d236f885a400535b29a/urwid-3.0.3.tar.gz" + sha256 "300804dd568cda5aa1c5b204227bd0cfe7a62cef2d00987c5eb2e4e64294ed9b" + end + + resource "urwidtrees" do + url "https://files.pythonhosted.org/packages/43/e1/ca5cf122cf1121b55acb39a1fb7e9fb1283c2eb0dc75fca751eb8c16b2f9/urwidtrees-1.0.3.tar.gz" + sha256 "50b19c06b03a5a73e561757a26d449cfe0c08afabe5c0f3cd4435596bdddaae9" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "zope-interface" do + url "https://files.pythonhosted.org/packages/88/3a/7fcf02178b8fad0a51e67e32765cd039ae505d054d744d76b8c2bbcba5ba/zope_interface-8.0.1.tar.gz" + sha256 "eba5610d042c3704a48222f7f7c6ab5b243ed26f917e2bc69379456b115e02d1" + end + + def install + venv = virtualenv_install_with_resources + + pkgshare.install Pathname("extra").children - [Pathname("extra/completion")] + zsh_completion.install "extra/completion/alot-completion.zsh" => "_alot" + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["SPHINXBUILD"] = Formula["sphinx-doc"].opt_bin/"sphinx-build" + ENV.prepend_path "PYTHONPATH", venv.site_packages + cd "docs" do + system "make", "pickle" + system "make", "man", "html" + man1.install "build/man/alot.1" + doc.install Pathname("build/html").children + end + end + + test do + (testpath/".notmuch-config").write <<~EOS + [database] + path=#{testpath}/Mail + EOS + (testpath/"Mail").mkpath + system Formula["notmuch"].bin/"notmuch", "new" + + require "pty" + PTY.spawn(bin/"alot", "--logfile", testpath/"out.log") do |_r, _w, pid| + sleep 10 + Process.kill 9, pid + end + + assert_path_exists testpath/"out.log", "out.log file should exist" + assert_match "setup gui", (testpath/"out.log").read + end +end diff --git a/Formula/a/alp.rb b/Formula/a/alp.rb new file mode 100644 index 0000000000000..d64b3e9cfefe7 --- /dev/null +++ b/Formula/a/alp.rb @@ -0,0 +1,51 @@ +class Alp < Formula + desc "Access Log Profiler" + homepage "https://github.com/tkuchiki/alp" + url "https://github.com/tkuchiki/alp/archive/refs/tags/v1.0.21.tar.gz" + sha256 "cb46bbf1c8a1feace9ea23447509a7b7fad8960e9e73948fcfdf012436c64390" + license "MIT" + head "https://github.com/tkuchiki/alp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "14766445b5af7cef554c3755e57032c2059a4bdf5136f9a15fb55929df5dcf45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8be191e741a56c44af0ade4faa8e5c5b3fd7d6ca4a2f05b057efdb0ff2b3913" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e947c50b3cfeb2580521b828119cf5e6e1590b3596415f93a5525fc6157c0765" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8f75372afd0b575d95b8f5d6f1f0cdda3dc9d7748974286aaa2823f3d98bc39" + sha256 cellar: :any_skip_relocation, arm64_monterey: "17f070fc807d0190a175d61ac599920e0af0b791d52f7831c28d6714263d0dbe" + sha256 cellar: :any_skip_relocation, sonoma: "37d8da350c6ca544b05f4cf14e4a60037865958c73d6023e75f2f61000b3f572" + sha256 cellar: :any_skip_relocation, ventura: "ba54691789ec295053d9a208d3ecae57fbdd176692ddee4cbbcdecbea570d0a8" + sha256 cellar: :any_skip_relocation, monterey: "508bdbaf309ca746ed76d0fbc3028a5f3f8b1bacafa65ffd2a46282f1afe147a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f2879c7909a7f8a13c186c306f23b79438b56ea013a26e063b229c04721a4d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e1770f74c2881e2147f43cf2a182b4a5c60cd5c324120127d70c938459cd735" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/alp" + + generate_completions_from_executable(bin/"alp", "completion") + end + + test do + (testpath/"json_access.log").write <<~EOS + {"time":"2015-09-06T05:58:05+09:00","method":"POST","uri":"/foo/bar?token=xxx&uuid=1234","status":200,"body_bytes":12,"response_time":0.057} + {"time":"2015-09-06T05:58:41+09:00","method":"POST","uri":"/foo/bar?token=yyy","status":200,"body_bytes":34,"response_time":0.100} + {"time":"2015-09-06T06:00:42+09:00","method":"GET","uri":"/foo/bar?token=zzz","status":200,"body_bytes":56,"response_time":0.123} + {"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/foo/bar","status":400,"body_bytes":15,"response_time":"-"} + {"time":"2015-09-06T05:58:44+09:00","method":"POST","uri":"/foo/bar?token=yyy","status":200,"body_bytes":34,"response_time":0.234} + {"time":"2015-09-06T05:58:44+09:00","method":"POST","uri":"/hoge/piyo?id=yyy","status":200,"body_bytes":34,"response_time":0.234} + {"time":"2015-09-06T05:58:05+09:00","method":"POST","uri":"/foo/bar?token=xxx&uuid=1234","status":200,"body_bytes":12,"response_time":0.057} + {"time":"2015-09-06T05:58:41+09:00","method":"POST","uri":"/foo/bar?token=yyy","status":200,"body_bytes":34,"response_time":0.100} + {"time":"2015-09-06T06:00:42+09:00","method":"GET","uri":"/foo/bar?token=zzz","status":200,"body_bytes":56,"response_time":0.123} + {"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/foo/bar","status":400,"body_bytes":15,"response_time":"-"} + {"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/diary/entry/1234","status":200,"body_bytes":15,"response_time":0.135} + {"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/diary/entry/5678","status":200,"body_bytes":30,"response_time":0.432} + {"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/foo/bar/5xx","status":504,"body_bytes":15,"response_time":60.000} + {"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/req","status":200,"body_bytes":15,"response_time":"-", "request_time":0.321} + EOS + system bin/"alp", "json", "--file=#{testpath}/json_access.log", "--dump=#{testpath}/dump.yml" + assert_path_exists testpath/"dump.yml" + end +end diff --git a/Formula/a/alpine.rb b/Formula/a/alpine.rb new file mode 100644 index 0000000000000..38ddd802d456b --- /dev/null +++ b/Formula/a/alpine.rb @@ -0,0 +1,145 @@ +class Alpine < Formula + desc "News and email agent" + homepage "https://alpineapp.email" + url "https://alpineapp.email/alpine/release/src/alpine-2.26.tar.xz" + # keep mirror even though `brew audit --strict --online` complains + mirror "https://alpineapp.email/alpine/release/src/Old/alpine-2.26.tar.xz" + sha256 "c0779c2be6c47d30554854a3e14ef5e36539502b331068851329275898a9baba" + license "Apache-2.0" + head "https://repo.or.cz/alpine.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?alpine[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "62301d0e5eb9290a24fb3ab3d9117f9dccc45160fbdee0ee7a176e9d02a21f2e" + sha256 arm64_sequoia: "0299b3f80c9193359059909396ebf74078a263d0e0987e086741398bac68d566" + sha256 arm64_sonoma: "7ad58b222ed8fa4ef1a7609c1223796de0a349d3d5b408109c408793586dfee5" + sha256 arm64_ventura: "9b7a5da6cd88ce590ec0c1c2ef8dc45da8a4fa45d108eb976157ddd505cf2b2a" + sha256 arm64_monterey: "b1c884c5cc1d84813284e85e74ae3c78db147b46da0d0b8d18ade4ff2ee550ac" + sha256 arm64_big_sur: "ba5962d03c0733fff29eb92d1c759867185d38de7ba342561ccbd20da5ce050d" + sha256 sonoma: "a7e085c449b40a91ecba38010375fd7f4ad9446c0a2cd490ed2dbf3da2b06f67" + sha256 ventura: "7b8f62b0200eb3ed18c3f79ecf7201f8409916f505fe738068307b6dbeb754ca" + sha256 monterey: "5f289262fe8971acbe473b036316f73d7a17c8f9bbbcb7a966c2a2d5e7c06ee6" + sha256 big_sur: "8a5830644c5e7738ba52ad6687eebf493020c8e6d14a4d247b3372138cac37a3" + sha256 catalina: "0a9ccb4fa8aac9476933d439ee57c30c234a20c0b189cdab09dfceba2e19b00d" + sha256 arm64_linux: "26792044eea71951e4a6236711a8f29cb7e52e68ee289cac3c809815bbd484be" + sha256 x86_64_linux: "3a326ae9048a1ea6fe4403478254a7bb403c1a565486b96d7224138f1b2e3072" + end + + depends_on "openssl@3" + + uses_from_macos "krb5" + uses_from_macos "ncurses" + uses_from_macos "openldap" + + on_linux do + depends_on "linux-pam" + end + + conflicts_with "macpine", because: "both install `alpine` binaries" + + # patch for macOS obtained from developer; see git commit + # https://repo.or.cz/alpine.git/commitdiff/701aebc00aff0585ce6c96653714e4ba94834c9c + patch :DATA + # fix `error: incompatible function pointer types` + patch do + url "https://raw.githubusercontent.com/gentoo/gentoo/37cdeedd76ed2f1f9d169431ac98c9e40afe9372/mail-client/alpine/files/alpine-2.26-fix-clang16-build-no-chappa.patch" + sha256 "0e51e8253f9e5ff7fc9599845ec2bd3a0007a1bffb097a603dfd8d6fa6362797" + end + + def install + ENV.deparallelize + + args = %W[ + --disable-debug + --with-ssl-dir=#{Formula["openssl@3"].opt_prefix} + --with-ssl-certs-dir=#{etc}/openssl@3 + --prefix=#{prefix} + --with-bundled-tools + ] + + system "./configure", *args + system "make", "install" + end + + test do + system bin/"alpine", "-conf" + end +end + +__END__ +--- a/configure ++++ b/configure +@@ -18752,6 +18752,26 @@ + fi + + ++ ++# Check whether --with-local-password-cache was given. ++if test "${with_local_password_cache+set}" = set; then : ++ withval=$with_local_password_cache; ++ alpine_os_credential_cache=$withval ++ ++fi ++ ++ ++ ++# Check whether --with-local-password-cache-method was given. ++if test "${with_local_password_cache_method+set}" = set; then : ++ withval=$with_local_password_cache_method; ++ alpine_os_credential_cache_method=$withval ++ ++fi ++ ++ ++alpine_cache_os_method="no" ++ + alpine_PAM="none" + + case "$host" in +@@ -18874,6 +18894,7 @@ + + $as_echo "#define APPLEKEYCHAIN 1" >>confdefs.h + ++ alpine_cache_os_method="yes" + ;; + esac + if test -z "$alpine_c_client_bundled" ; then +@@ -19096,25 +19117,7 @@ + + + +- +-# Check whether --with-local-password-cache was given. +-if test "${with_local_password_cache+set}" = set; then : +- withval=$with_local_password_cache; +- alpine_os_credential_cache=$withval +- +-fi +- +- +- +-# Check whether --with-local-password-cache-method was given. +-if test "${with_local_password_cache_method+set}" = set; then : +- withval=$with_local_password_cache_method; +- alpine_os_credential_cache_method=$withval +- +-fi +- +- +-if test -z "$alpine_PASSFILE" ; then ++if test -z "$alpine_PASSFILE" -a "alpine_cache_os_method" = "no" ; then + if test -z "$alpine_SYSTEM_PASSFILE" ; then + alpine_PASSFILE=".alpine.pwd" + else +@@ -25365,4 +25368,3 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi +- diff --git a/Formula/a/alpscore.rb b/Formula/a/alpscore.rb new file mode 100644 index 0000000000000..9e6aac0135d75 --- /dev/null +++ b/Formula/a/alpscore.rb @@ -0,0 +1,111 @@ +class Alpscore < Formula + desc "Applications and libraries for physics simulations" + homepage "https://alpscore.org" + url "https://github.com/ALPSCore/ALPSCore/archive/refs/tags/v2.3.2.tar.gz" + sha256 "bd9b5af0a33acc825ffedfaa0bf794a420ab2b9b50f6a4e634ecbde43ae9cc24" + license "GPL-2.0-only" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "c126dec161f1b5f224e3811bfa7725cffc28c07a7353117e732e73a5e98c545c" + sha256 cellar: :any, arm64_sequoia: "0f73bb0b70e164a8a4ea330153fb90a55704627dbce801fb2256dca62d068352" + sha256 cellar: :any, arm64_sonoma: "d400c7a4d8877d42213b712c7ca565dd90810368bfe5f86b70557a8f8d0e2dd3" + sha256 cellar: :any, sonoma: "4b977847e01b872501059cd69d19fd82a371b8a89c219967898a6ca48a39332d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ac7f13cd5680672509610183e0d0b9cfce2a443011b1b8eb7d597170eb26496" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39f48a1bbd7bb2136497962321d05351de1414aed5c6f37e178331cf5aa4d81e" + end + + depends_on "cmake" => [:build, :test] + depends_on "boost" + depends_on "eigen" + depends_on "hdf5" + depends_on "open-mpi" + + # Backport support for CMake 4 + patch do + url "https://github.com/ALPSCore/ALPSCore/commit/155e4327a78c1fa9442a179868994c8715582720.patch?full_index=1" + sha256 "9cb67c3d457a99fc799a60e8fcae0af63b99ebb18b5279b449ce9c0c1445077a" + end + + # Apply open PR to support Eigen 5.0.0 + # PR ref: https://github.com/ALPSCore/ALPSCore/pull/651 + # PR ref: https://github.com/ALPSCore/ALPSCore/pull/656 + patch do + url "https://github.com/ALPSCore/ALPSCore/commit/b2e21ce65b323196f04490c362694f0c30f8cdde.patch?full_index=1" + sha256 "8f237373e7a945126e5a1b88d8707ea2d67a263369134d6302205646f35af4e5" + end + patch do + url "https://github.com/ALPSCore/ALPSCore/commit/98a707d2bef2520df1fccfaf132c94ca7c909bb6.patch?full_index=1" + sha256 "ad13d526ccbc7f7c90c1bf2895e7bc0143ad8630729d616d391e86d04ffaecd9" + end + + def install + # Work around different behavior in CMake-built HDF5 + inreplace "common/cmake/ALPSCommonModuleDefinitions.cmake" do |s| + s.sub! "set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE TRUE)", "" + s.sub! "find_package (HDF5 1.10.2 ", "find_package (HDF5 " + end + + args = %W[ + -DALPS_BUILD_SHARED=ON + -DALPS_CXX_STD=c++14 + -DEIGEN3_INCLUDE_DIR=#{Formula["eigen"].opt_include}/eigen3 + -DENABLE_MPI=ON + -DTesting=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Fix Cellar references + files_with_cellar_references = [ + share/"alps-utilities/alps-utilities.cmake", + share/"alps-alea/alps-alea.cmake", + share/"alps-gf/alps-gf.cmake", + share/"alps-accumulators/alps-accumulators.cmake", + share/"alps-mc/alps-mc.cmake", + share/"alps-params/alps-params.cmake", + share/"alps-hdf5/alps-hdf5.cmake", + ] + + inreplace files_with_cellar_references do |s| + s.gsub!(Formula["open-mpi"].prefix.realpath, Formula["open-mpi"].opt_prefix) + s.gsub!(Formula["hdf5"].prefix.realpath, Formula["hdf5"].opt_prefix, audit_result: false) + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + using namespace std; + int main() + { + alps::accumulators::accumulator_set set; + set << alps::accumulators::MeanAccumulator("a"); + set["a"] << 2.9 << 3.1; + alps::params p; + p["myparam"] = 1.0; + cout << set["a"] << endl << p["myparam"] << endl; + } + CPP + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(test) + set(CMAKE_CXX_STANDARD 14) + set(ALPS_FORCE_NO_COMPILER_CHECK TRUE) + find_package(HDF5 REQUIRED) + find_package(ALPSCore REQUIRED mc accumulators params) + add_executable(test test.cpp) + target_link_libraries(test ${ALPSCore_LIBRARIES}) + CMAKE + + system "cmake", "." + system "cmake", "--build", "." + assert_equal "3 #2\n1 (type: double) (name='myparam')\n", shell_output("./test") + end +end diff --git a/Formula/a/alsa-lib.rb b/Formula/a/alsa-lib.rb new file mode 100644 index 0000000000000..2e389c6629560 --- /dev/null +++ b/Formula/a/alsa-lib.rb @@ -0,0 +1,39 @@ +class AlsaLib < Formula + desc "Provides audio and MIDI functionality to the Linux operating system" + homepage "https://www.alsa-project.org/" + url "https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.14.tar.bz2" + sha256 "be9c88a0b3604367dd74167a2b754a35e142f670292ae47a2fdef27a2ee97a32" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + + livecheck do + url "https://www.alsa-project.org/files/pub/lib/" + regex(/href=.*?alsa-lib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "c6c6ed9651d126ff9ffa7152978cb1a43165e471982213ea640efce6dcca058f" + sha256 x86_64_linux: "dd7a6d240793f432a3ab967c20cd49f07dc62291194d632434c975befc71aacc" + end + + depends_on :linux + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + prefix.install "aserver/COPYING" => "COPYING-aserver" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) + { + snd_ctl_card_info_t *info; + snd_ctl_card_info_alloca(&info); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lasound", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/alure.rb b/Formula/a/alure.rb new file mode 100644 index 0000000000000..c72f9a48c0449 --- /dev/null +++ b/Formula/a/alure.rb @@ -0,0 +1,53 @@ +class Alure < Formula + desc "Manage common tasks with OpenAL applications" + homepage "https://kcat.tomasu.net/alure.html" + url "https://kcat.tomasu.net/alure-releases/alure-1.2.tar.bz2" + sha256 "465e6adae68927be3a023903764662d64404e40c4c152d160e3a8838b1d70f71" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5a83dde3ee767c2d722500d07ed8868c671c2d560b932953cfd52fdcf835eef1" + sha256 cellar: :any, arm64_sonoma: "d0397aae71401ccd8bbe0adda961be09b1f8aa3d70085c2b1d3b51bb6485f0cc" + sha256 cellar: :any, arm64_ventura: "709b5d0a3f4bb2fed0a455b7fd023a31f85bb4fd93498f3a57fe6eaa552c78e4" + sha256 cellar: :any, arm64_monterey: "be784a86bfdf46e17722ce8c2002a430495e70bd6627f13b2952c1147070cbb8" + sha256 cellar: :any, arm64_big_sur: "b7c2de932d9fa136dbecbd6b235c2db13e8fb4a46551be15cadf9f4ae58ab7f9" + sha256 cellar: :any, sonoma: "163a91e3f957ee4b11acc22699bc7189b873aff6be6b234129446a54d05a248a" + sha256 cellar: :any, ventura: "941eb17380a74d487d84ac4a86c71709aad7b11b351c4418d10ca35985fa71b1" + sha256 cellar: :any, monterey: "42382cc1953f124c11b9ed54b255a88367991b52e20d000bb8575f4cab956121" + sha256 cellar: :any, big_sur: "0415055955d1281d292513b656af55869e32af09d92925ff26c74bcfea56487f" + sha256 cellar: :any, catalina: "3701d2ac280fd8ef5476343c348fec853397241cb2bdcaeb25e8a53b203d292c" + sha256 cellar: :any_skip_relocation, arm64_linux: "86327e343698981d268e5efa342f39abe1fa3e213ad423a9df9ae8054c7f65b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27631da30742e75d039fc709f8e437b22371bfc0859466a4bb4856f155d8f4f5" + end + + disable! date: "2025-04-18", because: :repo_removed + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "openal-soft" + end + + # Fix missing unistd include + # Reported by email to author on 2017-08-25 + patch do + on_macos do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/alure/unistd.patch" + sha256 "7852a7a365f518b12a1afd763a6a80ece88ac7aeea3c9023aa6c1fe46ac5a1ae" + end + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/alureplay 2>&1", 1) + assert_match "Usage #{bin}/alureplay ", output + end +end diff --git a/Formula/a/amass.rb b/Formula/a/amass.rb new file mode 100644 index 0000000000000..62097c3bd9146 --- /dev/null +++ b/Formula/a/amass.rb @@ -0,0 +1,44 @@ +class Amass < Formula + desc "In-depth attack surface mapping and asset discovery" + homepage "https://owasp.org/www-project-amass/" + url "https://github.com/owasp-amass/amass/archive/refs/tags/v5.0.1.tar.gz" + sha256 "975b23891423a29767d9d83c4d4d501e5ae524288be424b0052e61a9fe8a2869" + license "Apache-2.0" + head "https://github.com/owasp-amass/amass.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "91cdfd185942688add2d63aec30c4b7fe8828c2fbc8072ab18010aac7e18813e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91cdfd185942688add2d63aec30c4b7fe8828c2fbc8072ab18010aac7e18813e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91cdfd185942688add2d63aec30c4b7fe8828c2fbc8072ab18010aac7e18813e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91cdfd185942688add2d63aec30c4b7fe8828c2fbc8072ab18010aac7e18813e" + sha256 cellar: :any_skip_relocation, sonoma: "58786c0989372a5d55673fff78637bbe533a4efac67979e379e666e5b5a98f18" + sha256 cellar: :any_skip_relocation, ventura: "58786c0989372a5d55673fff78637bbe533a4efac67979e379e666e5b5a98f18" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2d310e25c95898c0c70021e1cd9319d9b8e1cd1aad50d54f2f7f4991547ebb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af6fec44a8e37e2acf94f169a8f888551fcfdd33a1d22b4d742204fc02ac85e6" + end + + depends_on "go" => :build + + # version patch, upstream pr ref, https://github.com/owasp-amass/amass/pull/1083 + patch do + url "https://github.com/owasp-amass/amass/commit/fbdb97b6884e0ac01526c9c555a1e4a37533fa95.patch?full_index=1" + sha256 "188412fb8e1663bacfd222828974a792a40c3e795dee62133244e27a45772883" + end + + def install + ENV["CGO_ENABLED"] = "0" + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/amass" + end + + test do + assert_match version.to_s, shell_output("#{bin}/amass --version 2>&1") + + (testpath/"config.yaml").write <<~YAML + scope: + domains: + - example.com + YAML + + system bin/"amass", "enum", "-list", "-config", testpath/"config.yaml" + end +end diff --git a/Formula/a/amazon-ecs-cli.rb b/Formula/a/amazon-ecs-cli.rb new file mode 100644 index 0000000000000..9d740e1404292 --- /dev/null +++ b/Formula/a/amazon-ecs-cli.rb @@ -0,0 +1,43 @@ +class AmazonEcsCli < Formula + desc "CLI for Amazon ECS to manage clusters and tasks for development" + homepage "https://aws.amazon.com/ecs/" + url "https://github.com/aws/amazon-ecs-cli/archive/refs/tags/v1.21.0.tar.gz" + sha256 "27e93a5439090486a2f2f5a9b02cbbd1493e3c14affbbe2375ed57f8f903e677" + license "Apache-2.0" + head "https://github.com/aws/amazon-ecs-cli.git", branch: "mainline" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9a98803f22995cb9fd3ccfff0d9ac6bcb8de73df88e94c9bf60f16181ffab227" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "946c2dea923a3f6ce1247becebbe353802a74bf44b5142d0ad0d5548e8fc1ea5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d701174d94a2bf504a8f73efbeae65ba21319e8ec2f8c686341db46bed1015f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef77e9ec799164485117cc7971285ef4cd0d9f7ce526eff3955c18270f215c0c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "997efae6c4c5bd40f018cf944093c3842d52c8ba09e6bbc68715b697438a1f77" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dfe17f71140b30b124679fee0a7b402f8f16a3d284ea357b315f2f9896f67beb" + sha256 cellar: :any_skip_relocation, sonoma: "07a9670e96753241bc2088cc23591db1da13ef3c190bdcfe0c077e2b871bfc7d" + sha256 cellar: :any_skip_relocation, ventura: "f020f685eb458c206f9dad7f6f2d6767bc088a5132655569bd5d652552cf211c" + sha256 cellar: :any_skip_relocation, monterey: "c052c78ca3a7a564bfb1544cf70d6cee45fb933ae0ce6f4c9abe987df2e194d9" + sha256 cellar: :any_skip_relocation, big_sur: "66dcb9af8a67215a8a1f4fef00dbf0c16e836cc65985a86d113cb4f208dff50c" + sha256 cellar: :any_skip_relocation, catalina: "0bb03d95203b20aebc66ee008946951dfc66a991d6015f38d9158cda3dc36b8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c02a7a6f0510165209dd1770595340906f5c0165084dd88801ef76916c61270" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bfbca5701b37d685a0f5da1a135e736e4a594079e2368262c498396f4446261" + end + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + (buildpath/"src/github.com/aws/amazon-ecs-cli").install buildpath.children + cd "src/github.com/aws/amazon-ecs-cli" do + system "make", "build" + bin.install "bin/local/ecs-cli" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/ecs-cli -v") + end +end diff --git a/Formula/a/amber.rb b/Formula/a/amber.rb new file mode 100644 index 0000000000000..140497106a754 --- /dev/null +++ b/Formula/a/amber.rb @@ -0,0 +1,61 @@ +class Amber < Formula + desc "Crystal web framework. Bare metal performance, productivity and happiness" + homepage "https://amberframework.org/" + url "https://github.com/amberframework/amber/archive/refs/tags/v1.4.1.tar.gz" + sha256 "92664a859fb27699855dfa5d87dc9bf2e4a614d3e54844a8344196d2807e775c" + license "MIT" + revision 2 + + bottle do + sha256 arm64_tahoe: "aab42dadcba980b950797c53d051d76831f90e4457d6f70aa18553d4f67e4e6e" + sha256 arm64_sequoia: "c8bb8c22fe777f8058380a9193fa2128127a80e5b4e5a695fdd5b3684db1cbc0" + sha256 arm64_sonoma: "aedf640540270738aa662506e1a34e9853c4c7474310b2b7a5d4dc86d6c3a5c9" + sha256 arm64_ventura: "b48cb05e8b797ee829115cc6c60e89172169a0f68c4122fa8f9aaa07be7df8d0" + sha256 sonoma: "d5632dc63a99120dcd4715a94f58d12dc9ea1ff69914bc6202c7fd0809bdcb29" + sha256 ventura: "430d7db186ae038f2d9b5da2f1f96e1f32f3dcfeb5139fc94c1a5d7da705b48b" + sha256 arm64_linux: "26750133b64027b387c8c10e9176f1f55885b6ec2dc1f12ccd3337b6d9870db6" + sha256 x86_64_linux: "459d2c3de122b8f9f0890270fd3b638180521f96976572ef59f31c5a8712bf65" + end + + depends_on "bdw-gc" + depends_on "crystal" + depends_on "libevent" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + + uses_from_macos "zlib" + + # patch granite to fix db dependency resolution issue + # upstream patch https://github.com/amberframework/amber/pull/1339 + patch do + url "https://github.com/amberframework/amber/commit/54b1de90cd3e395cd09326b1d43074e267c79695.patch?full_index=1" + sha256 "be0e30f08b8f7fcb71604eb01136d82d48b7e34afac9a1c846c74a7a7d2f8bd6" + end + + def install + system "shards", "install" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/amber new test_app") + %w[ + config/environments + amber.yml + shard.yml + public + src/controllers + src/views + src/test_app.cr + ].each do |path| + assert_match path, output + end + + cd "test_app" do + assert_match "Building", shell_output("#{Formula["crystal"].bin}/shards build test_app") + end + assert_path_exists testpath/"test_app/bin/test_app" + end +end diff --git a/Formula/a/amdatu-bootstrap.rb b/Formula/a/amdatu-bootstrap.rb new file mode 100644 index 0000000000000..07134380d0992 --- /dev/null +++ b/Formula/a/amdatu-bootstrap.rb @@ -0,0 +1,49 @@ +class AmdatuBootstrap < Formula + desc "Bootstrapping OSGi development" + homepage "https://bitbucket.org/amdatuadm/amdatu-bootstrap/" + url "https://bitbucket.org/amdatuadm/amdatu-bootstrap/downloads/bootstrap-bin-r9.zip" + sha256 "937ef932a740665439ea0118ed417ff7bdc9680b816b8b3c81ecfd6d0fc4773b" + license "Apache-2.0" + revision 2 + + livecheck do + url "https://bitbucket.org/amdatuadm/amdatu-bootstrap/downloads/" + regex(/href=.*?bootstrap[._-]v?(?:bin-)?r(\d+(?:\.\d+)*)(?:-bin)?\./i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0094a50b87c8bf6f25f9fc0e68bcb95a2c46923a240eb83210748a280ee8cd27" + end + + # Deprecated since: + # * No arm64 macOS support: https://docs.brew.sh/Support-Tiers#future-macos-support + # * No upstream activity since 2015 + # * Still needs OpenJDK 8 + deprecate! date: "2025-09-25", because: :unmaintained + disable! date: "2026-09-25", because: :unmaintained + + depends_on "openjdk@8" + + on_macos do + depends_on arch: :x86_64 # openjdk@8 is not supported on ARM + end + + def install + env = Language::Java.java_home_env("1.8") + # Add java to PATH to fix Linux issue: amdatu-bootstrap: line 35: java: command not found + env["PATH"] = "$JAVA_HOME/bin:$PATH" + # Use bash to avoid issues with shells like dash: amdatu-bootstrap: 34: [: --info: unexpected operator + inreplace "amdatu-bootstrap", %r{^#!/bin/sh$}, "#!/bin/bash" + + libexec.install %w[amdatu-bootstrap bootstrap.jar conf] + (bin/"amdatu-bootstrap").write_env_script libexec/"amdatu-bootstrap", env + end + + test do + output = shell_output("#{bin}/amdatu-bootstrap --info") + assert_match "Amdatu Bootstrap R9", output + end +end diff --git a/Formula/a/amfora.rb b/Formula/a/amfora.rb new file mode 100644 index 0000000000000..31ed73bc28ffd --- /dev/null +++ b/Formula/a/amfora.rb @@ -0,0 +1,54 @@ +class Amfora < Formula + desc "Fancy terminal browser for the Gemini protocol" + homepage "https://github.com/makew0rld/amfora" + url "https://github.com/makew0rld/amfora/archive/refs/tags/v1.11.0.tar.gz" + sha256 "76ae120bdae9a1882acbb2b07a873a52e40265b3ef4c8291de0934c1e9b5982c" + license all_of: [ + "GPL-3.0-only", + any_of: ["GPL-3.0-only", "MIT"], # rr + ] + head "https://github.com/makew0rld/amfora.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00e4da529415b5a5b02c68c987828c996e1b044e8de4bdd3bd91aff35d472396" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aea294662496a802b0b372ac96c71b78a6df62ff654855c243677b5d7d4e4803" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aea294662496a802b0b372ac96c71b78a6df62ff654855c243677b5d7d4e4803" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aea294662496a802b0b372ac96c71b78a6df62ff654855c243677b5d7d4e4803" + sha256 cellar: :any_skip_relocation, sonoma: "f50a1331ec6c174d16aabe9908dbe16ca7b840bf44c7e76b384de67b5e5f2f67" + sha256 cellar: :any_skip_relocation, ventura: "f50a1331ec6c174d16aabe9908dbe16ca7b840bf44c7e76b384de67b5e5f2f67" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d9218f579fb7be31312ea53a6d59a7f6f63ea4a01216c64ab68b49c2899b34f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ccab595f65a7e440660a2981719199eef7e5cc82025a89f0cfa2936892fa57b" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.builtBy=#{tap.user}" + system "go", "build", *std_go_args(ldflags:) + pkgshare.install "contrib/themes" + end + + test do + ENV["TERM"] = "xterm" + + require "open3" + + input, _, wait_thr = Open3.popen2 "script -q screenlog.txt" + input.puts "stty rows 80 cols 43" + input.puts bin/"amfora" + sleep 1 + input.putc "1" + sleep 1 + input.putc "1" + sleep 1 + input.putc "q" + + screenlog = (testpath/"screenlog.txt").read + assert_match "# New Tab", screenlog + assert_match "## Learn more about Amfora!", screenlog + ensure + Process.kill("TERM", wait_thr.pid) + end +end diff --git a/Formula/a/ammonite-repl.rb b/Formula/a/ammonite-repl.rb new file mode 100644 index 0000000000000..b6deec1a3ca39 --- /dev/null +++ b/Formula/a/ammonite-repl.rb @@ -0,0 +1,41 @@ +class AmmoniteRepl < Formula + desc "Ammonite is a cleanroom re-implementation of the Scala REPL" + homepage "https://ammonite.io/" + url "https://github.com/com-lihaoyi/Ammonite/releases/download/3.0.4/3.3-3.0.4" + version "3.0.4" + sha256 "b3ac7c6cf5e22450a8afebfb3dc0312c53ec676baf93583ab59b8ef81627937d" + license "MIT" + + # There can be a gap between when a GitHub release is created and when the + # release assets are uploaded, so the `GithubLatest` strategy isn't + # sufficient here. This checks GitHub asset URLs on the homepage, as it + # doesn't appear to be updated until the release assets are available. + livecheck do + url :homepage + regex(%r{href=.*?/releases/download/v?(\d+(?:\.\d+)+(?:[._-]M\d+)?)/}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "cb8019b6e6d5423660b56fd8fad914faca6a371df3be2176afa006a256665e99" + end + + depends_on "openjdk" + + def install + (libexec/"bin").install Dir["*"].first => "amm" + chmod 0755, libexec/"bin/amm" + env = Language::Java.overridable_java_home_env + env["PATH"] = "$JAVA_HOME/bin:$PATH" + (bin/"amm").write_env_script libexec/"bin/amm", env + end + + test do + (testpath/"testscript.sc").write <<~SCALA + #!/usr/bin/env amm + @main + def fn(): Unit = println("hello world!") + SCALA + output = shell_output("#{bin}/amm #{testpath}/testscript.sc") + assert_equal "hello world!", output.lines.last.chomp + end +end diff --git a/Formula/a/amp.rb b/Formula/a/amp.rb new file mode 100644 index 0000000000000..e783887d8aabd --- /dev/null +++ b/Formula/a/amp.rb @@ -0,0 +1,61 @@ +class Amp < Formula + desc "Text editor for your terminal" + homepage "https://amp.rs" + url "https://github.com/jmacdonald/amp/archive/refs/tags/0.7.1.tar.gz" + sha256 "59a65c2c4592eed188433fe7c4bf2ba84206f217bdafc5a2c7f97623f5607c12" + license "GPL-3.0-or-later" + head "https://github.com/jmacdonald/amp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0ea7ee62194a805d8aac77d647b293612a22e742adc7ac3679a80ae138b9592a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a30d84cac91e6123f3e57142c390e206d50a81c85bb249918ed9d25722d85bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99da73190b5be3bab9813061219aaf060d73bc996a03b9fc194a77c93cc15159" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d0f0821829385e973dae0f4112bb3378d5e358b69f6e51064874e1355ab37151" + sha256 cellar: :any_skip_relocation, sonoma: "552866e5376aa068d399a05e7aa92f0a8e39d8e1fe6418cd1614352902dc4959" + sha256 cellar: :any_skip_relocation, ventura: "b6a91b42ec2904a23ce679264886e2cbfdba31f97a5dc0b4dd66164a6d4178a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc1b33c3caff52184f6760a2adcd2f49048ded51708d4416988d5e26a2328d99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7df552cbc8bfb5ae1f956eaaf1f32af1daf7e32000d4012897459f5885bb2bf" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + on_linux do + depends_on "libxcb" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + require "pty" + require "io/console" + + PTY.spawn(bin/"amp", "test.txt") do |r, w, _pid| + r.winsize = [80, 43] + sleep 1 + # switch to insert mode and add data + w.write "i" + sleep 1 + w.write "test data" + sleep 1 + # escape to normal mode, save the file, and quit + w.write "\e" + sleep 1 + w.write "s" + sleep 1 + w.write "Q" + begin + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + assert_match "test data\n", (testpath/"test.txt").read + end +end diff --git a/Formula/a/ampl-asl.rb b/Formula/a/ampl-asl.rb new file mode 100644 index 0000000000000..2da4dd71fd2c2 --- /dev/null +++ b/Formula/a/ampl-asl.rb @@ -0,0 +1,47 @@ +class AmplAsl < Formula + desc "AMPL Solver Library" + homepage "https://ampl.com/" + url "https://github.com/ampl/asl/archive/refs/tags/v1.0.1.tar.gz" + sha256 "57b767161fd95869757daa0761d9b19fa39ad5de4315f95a3c0dff08b0d4c4f2" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3e93cfc9570652c4c096b01942081b983ebafff86da8edbaf143992fe5c97338" + sha256 cellar: :any, arm64_sequoia: "df57b49399130fbfff59616c73f30a0751241e422bc817013870c339bb213537" + sha256 cellar: :any, arm64_sonoma: "80dc283a53e12edbaa054669f376bc5fb6d54f90b4e94d9fa6b4119d46127531" + sha256 cellar: :any, arm64_ventura: "d8e6c8531c3fe9794f920361660e8e574a989ffb2be3d9bd2a175c765fce5937" + sha256 cellar: :any, sonoma: "63dc38641db70dd681e96b4845458fbe9aed065dd896dca0ef8daba1c98f3724" + sha256 cellar: :any, ventura: "60cfa373989ced8460b2d010ee473cf4be786b867f3198edc4f791fef9e80584" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b5fcd3e7c6634a5718574b024cec7f43f90085ce233e9d7038c62a5915b351d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ed2974a2535806181150237068f2125ab75f64fc06644cd972b66278cfb8dda" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + ] + args << "-DUSE_LTO=OFF" if OS.linux? + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "asl/asl.h" + + int main() { + void* asl_instance = malloc(sizeof(void)); + free(asl_instance); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}/asl", "-L#{lib}", "-lasl" + system "./test" + end +end diff --git a/Formula/a/ampl-mp.rb b/Formula/a/ampl-mp.rb new file mode 100644 index 0000000000000..bb8c79c646096 --- /dev/null +++ b/Formula/a/ampl-mp.rb @@ -0,0 +1,53 @@ +class AmplMp < Formula + desc "Open-source library for mathematical programming" + homepage "https://ampl.com/" + url "https://github.com/ampl/mp/archive/refs/tags/v4.0.4.tar.gz" + sha256 "17cedaddb57a1df4d47bbe5fe0782f2e8d90a416130b70d291ef97513128b8dc" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9bf5a0d43eed837f69e6e7a1cd20d0b1e0d5cd7d17341b11bd44a9f1f2497ee7" + sha256 cellar: :any, arm64_sequoia: "243e01399f49efaa494912effa97b114f146886fd2da61e383fe5ee03cbe81fc" + sha256 cellar: :any, arm64_sonoma: "a9da950919b6eb5c47123fbff37e2c9597ac01fa6ac3d8b46b9770e7c052e95a" + sha256 cellar: :any, sonoma: "12be92be01cb47cf32fa277a1f86f94cf565c01019d88011e0f60d223a7e6468" + sha256 cellar: :any_skip_relocation, arm64_linux: "d65ee2909acdab137ba45976e25bf19b23c91704d2f460b85c3fd274a7f82543" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbe407627bdc0227755d9b7f90b9ebbde9657b7273a338fd506e67abd855a70f" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DAMPL_LIBRARY_DIR=#{libexec}/bin + -DBUILD_SHARED_LIBS=ON + -DBUILD_TESTS=OFF + -DCMAKE_INSTALL_RPATH=#{rpath};#{rpath(source: libexec/"bin")} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "mp/ampls-c-api.h" + + int main() { + AMPLS_MP_Solver* solver = (AMPLS_MP_Solver*)malloc(sizeof(AMPLS_MP_Solver)); + free(solver); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}/mp", "-L#{lib}", "-lmp", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/amqp-cpp.rb b/Formula/a/amqp-cpp.rb new file mode 100644 index 0000000000000..a68f60215e64e --- /dev/null +++ b/Formula/a/amqp-cpp.rb @@ -0,0 +1,58 @@ +class AmqpCpp < Formula + desc "C++ library for communicating with a RabbitMQ message broker" + homepage "https://github.com/CopernicaMarketingSoftware/AMQP-CPP" + url "https://github.com/CopernicaMarketingSoftware/AMQP-CPP/archive/refs/tags/v4.3.27.tar.gz" + sha256 "af649ef8b14076325387e0a1d2d16dd8395ff3db75d79cc904eb6c179c1982fe" + license "Apache-2.0" + head "https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f300647f32576320289d224bdf7f4500522765a6c2ed8f10711372547d24114b" + sha256 cellar: :any, arm64_sequoia: "d42884b0048b3524ff2503b74e3606a415534df02f36b76daa738005f801c660" + sha256 cellar: :any, arm64_sonoma: "6088a49ef4492292f4643805af8808a6d3942a1f3b4e1fda5b29aefb08bc96c6" + sha256 cellar: :any, arm64_ventura: "052fb79e01072ebee63a343fca762f19fb3d3586502e6049c0e8666db559663e" + sha256 cellar: :any, sonoma: "58aa9b3ed88fa9452bab84e4265c04ff686abb23cfefd9ce1b40066fa50cdacd" + sha256 cellar: :any, ventura: "a0549cf3274f68d0dd55199876406836104d0df3af6dbc4ffa56031a2b8859ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "8951f9439fa4acf6c6616b1130c7a2cbffe3ef79e9443865592448baca178ea9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61ccf7cf9045f334afa3df40778602bdf1382d681c0ae5811ac34e6863906fcb" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + # Backport fix for CMake 4 + # PR ref: https://github.com/CopernicaMarketingSoftware/AMQP-CPP/pull/541 + patch do + url "https://github.com/CopernicaMarketingSoftware/AMQP-CPP/commit/3a80a681ec258807c24f54214a3b6c7fc0dc28c0.patch?full_index=1" + sha256 "70337b274251cfe890ecf560109d7389e43ae44fb93b43f1279871aa9aa7f139" + end + + def install + args = %w[ + -DAMQP-CPP_BUILD_SHARED=ON + -DAMQP-CPP_LINUX_TCP=ON + -DCMAKE_MACOSX_RPATH=1 + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-L#{lib}", "-o", + "test", "-lamqpcpp" + system "./test" + end +end diff --git a/Formula/a/amtterm.rb b/Formula/a/amtterm.rb new file mode 100644 index 0000000000000..ee3a40afdf2e0 --- /dev/null +++ b/Formula/a/amtterm.rb @@ -0,0 +1,51 @@ +class Amtterm < Formula + desc "Serial-over-LAN (sol) client for Intel AMT" + homepage "https://www.kraxel.org/blog/linux/amtterm/" + url "https://www.kraxel.org/releases/amtterm/amtterm-1.7.tar.gz" + sha256 "8c58b76b3237504d751bf3588fef25117248a0569523f0d86deaf696d14294d4" + license "GPL-2.0-or-later" + head "https://github.com/kraxel/amtterm.git", branch: "master" + + livecheck do + url "https://www.kraxel.org/releases/amtterm/" + regex(/href=.*?amtterm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "33934a9d2469315d7e292462ed352c552a01ef9717c98ed502b693fc496731f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18584332d73c1ec0c92903282b8363ec3d459b2bfacd19748f69607652cc40c8" + end + + depends_on "gtk+3" + depends_on :linux + depends_on "vte3" + + resource "SOAP::Lite" do + url "https://cpan.metacpan.org/authors/id/P/PH/PHRED/SOAP-Lite-1.27.tar.gz" + sha256 "e359106bab1a45a16044a4c2f8049fad034e5ded1517990bc9b5f8d86dddd301" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resource("SOAP::Lite").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + + # @echo -e accidentally prepends "-e" to the beginning of Make.config + # which causes the build to fail with an "empty variable" error. + inreplace "mk/Autoconf.mk", "@echo -e", "@echo" + + system "make", "prefix=#{prefix}", "install" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + assert_match "Connection refused", shell_output("#{bin}/amtterm 127.0.0.1 -u brew -p brew 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/amtterm -v 2>&1", 1) + end +end diff --git a/Formula/a/analog.rb b/Formula/a/analog.rb new file mode 100644 index 0000000000000..b32613a0fee9e --- /dev/null +++ b/Formula/a/analog.rb @@ -0,0 +1,54 @@ +class Analog < Formula + desc "Logfile analyzer" + homepage "https://www.c-amie.co.uk/software/analog/" + url "https://github.com/c-amie/analog-ce/archive/refs/tags/6.0.18.tar.gz" + sha256 "6c5d3f05643196b64eadeccb7b5063e2508c0155ac34c1fe848f6d055c371933" + license "GPL-2.0-only" + head "https://github.com/c-amie/analog-ce.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f7dcb27fbb927e223eb5de35e0121ed04978d431cbda451bc90d514db6f91898" + sha256 arm64_sequoia: "cf6b6b5922287fd9aad880021dbc161e361b3e1a485ae29ebba5a205085c9bd1" + sha256 arm64_sonoma: "566c70a3d0443d7072dd51cacc8d0717fbc0d39d34c7a5ea2283b85238e565b5" + sha256 arm64_ventura: "6165d65fc23d23b5abf3ee30b59ede9b9626de03259e6ce24779adb72870925e" + sha256 sonoma: "67ef4efa366ab045c74c946acfee46f118d1053b90f477493476e814a4247c30" + sha256 ventura: "7b02e3af7264089c6f6c9fbf9e7f5568be220104ca01bc17a640d4e4979b2dc2" + sha256 arm64_linux: "d24b9f6178f2c5b1f903e5c5416a8ae63c40906c5e4761eeaa144cbf21d26072" + sha256 x86_64_linux: "f81a6b3348847b5dbbcfad4242a43d9a98266c7cbc037a22656a610a3ffa2104" + end + + depends_on "gd" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "minizip" + depends_on "pcre2" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + args = [ + "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + %Q(DEFS='-DLANGDIR="#{pkgshare}/lang/"' -DHAVE_GD -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_PCRE), + "LIBS=-lgd -lpng -ljpeg -lz -lbz2 -lpcre2-8 -lminizip -lm", + "OS=#{OS.mac? ? "OSX" : "UNIX"}", + "SUBDIRS=libgd", + "SUBDIROBJS=libgd/gdfontf.o", + ] + system "make", *args + + bin.install "analog" + pkgshare.install "examples", "how-to", "images", "lang" + pkgshare.install "analog.cfg-sample" + (pkgshare/"examples").install "logfile.log" + man1.install "analog.man" => "analog.1" + end + + test do + output = shell_output("#{bin}/analog #{pkgshare}/examples/logfile.log") + assert_match "(United Kingdom)", output + end +end diff --git a/Formula/a/anchor.rb b/Formula/a/anchor.rb new file mode 100644 index 0000000000000..e88ee39790ef6 --- /dev/null +++ b/Formula/a/anchor.rb @@ -0,0 +1,40 @@ +class Anchor < Formula + desc "Solana Program Framework" + homepage "https://anchor-lang.com" + url "https://github.com/solana-foundation/anchor/archive/refs/tags/v0.32.1.tar.gz" + sha256 "e45fec416a1a13dd20112f3f52855b91180448b3298808d7e42c6cd57ad4ae48" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "efa83be67b8c4ef3119a6b2cd93ac097834419567ceb8fe9b24513cfe1a84a96" + sha256 cellar: :any, arm64_sequoia: "ee130c6aca80d10276703c3c66902d91d4bc5794e34b60f8c4a4dcf7b37d9ea7" + sha256 cellar: :any, arm64_sonoma: "1617688b9e102a9ddffee0ce691f22d2ddc7b233569ee1c3d8bb11008e3d0045" + sha256 cellar: :any, sonoma: "1dfc139234b277777e469c8b0dc3dc503b1897ffa41c19d03f1ef58e5b43e07b" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e3973d262aa79319f11d4986b61cc0da7ea61068bf1a148cc6574de45609290" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f595b09c4947d0f474539715dc33586b9c4f6c4b57598756cd3a9a9fc36f674" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "node" => :test + depends_on "yarn" => :test + depends_on "openssl@3" + + on_linux do + depends_on "systemd" # for `libudev` + end + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", "--no-default-features", *std_cargo_args(path: "cli") + end + + test do + assert_match "anchor-cli #{version}", shell_output("#{bin}/anchor --version") + system bin/"anchor", "init", "test_project" + assert_path_exists testpath/"test_project/Cargo.toml" + assert_path_exists testpath/"test_project/Anchor.toml" + end +end diff --git a/Formula/a/ancient.rb b/Formula/a/ancient.rb new file mode 100644 index 0000000000000..01d4ef7b713ac --- /dev/null +++ b/Formula/a/ancient.rb @@ -0,0 +1,43 @@ +class Ancient < Formula + desc "Decompression routines for ancient formats" + homepage "https://github.com/temisu/ancient" + url "https://github.com/temisu/ancient/archive/refs/tags/v2.3.0.tar.gz" + sha256 "5d1d71f0fb8c69955bb4ec01ed9ffd2b5bf546b10463030dda85d949ea422bc9" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6817d9ce2e9d71f8e176280373905983d18dc6984a8cb9fd8587a77189ed77a3" + sha256 cellar: :any, arm64_sequoia: "08b6b80e0b301194514d37f7bcbfbb9f3f6741a5f76d26d11238591d4095481a" + sha256 cellar: :any, arm64_sonoma: "bff6bffe97748fcafa7153b84ab9f4e777140bcd61b283368e1700d059b7a248" + sha256 cellar: :any, sonoma: "e7d17674bacf02c4c01a07812e801e662b76fd68de9ad82287bf1fd65c4e2e18" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3c75d64ba336cfa2c79cff5db5f0f918f95448565e93685df2679d25b429aac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc2e89a54843d08f940bf5a541e85ad5ae0ece2fa2f5b146a2e22a792ced7a2e" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char **argv) + { + std::optional decompressor; + return 0; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-L#{lib}", "-lancient", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/angband.rb b/Formula/a/angband.rb new file mode 100644 index 0000000000000..d6dc10c204cdc --- /dev/null +++ b/Formula/a/angband.rb @@ -0,0 +1,84 @@ +class Angband < Formula + desc "Dungeon exploration game" + homepage "https://rephial.org/" + url "https://github.com/angband/angband/releases/download/4.2.5/Angband-4.2.5.tar.gz" + sha256 "c4cacbdf28f726fcb1a0b30b8763100fb06f88dbb570e955232e41d83e0718a6" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "7feaf0301dee2c96389eb8bb5615910b9a0ef9ec51cf930a3c9ca4e7dcd2849a" + sha256 arm64_sequoia: "56b2ccd6f86112f7f3c8b97100252d4d39d49be6a659dabbaffd9e393c1d4db1" + sha256 arm64_sonoma: "8c10f616a3f00c8950337ef5bb75494ab170230efdf3c24a20d92b134becdb3a" + sha256 arm64_ventura: "8f7a2ba62953feedc36fc0581b683aea811ccf8fc8e261385abd6275c6717625" + sha256 sonoma: "091bad28afd7bad19504a1153d7bd6e44871975927cc62f5363fb55c866ec938" + sha256 ventura: "75ae7f63506954778d1dfede17083c865cb49bbabec6df92fce979206e42feb4" + sha256 arm64_linux: "72e0ca41e7634c6783d80320a98e0d23345bb7d7e407e60a679b79fe52d74682" + sha256 x86_64_linux: "453011c94bc2555692b32716a63a88f14b55562677069daf88bef76db98976ea" + end + + head do + url "https://github.com/angband/angband.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + on_system :linux, macos: :sonoma_or_newer do + depends_on "ncurses" # ncurse5.4-config is broken on recent macOS + end + + def install + args = %W[ + --bindir=#{bin} + --enable-release + --enable-curses + --disable-ncursestest + --disable-sdltest + --disable-x11 + ] + if OS.mac? && MacOS.version < :sonoma + ENV["NCURSES_CONFIG"] = "#{MacOS.sdk_path}/usr/bin/ncurses5.4-config" + args << "--with-ncurses-prefix=#{MacOS.sdk_path}/usr" + end + system "./autogen.sh" if build.head? + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + require "expect" + require "pty" + + timeout = 10 + args = %W[ + -duser=#{testpath} + -darchive=#{testpath}/archive + -dpanic=#{testpath}/panic + -dsave=#{testpath}/save + -dscores=#{testpath}/scores + ] + + PTY.spawn({ "LC_ALL" => "en_US.UTF-8", "TERM" => "xterm" }, bin/"angband", *args) do |r, w, pid| + refute_nil r.expect("[Initialization complete]", timeout), "Expected initialization message" + w.write "\x18" + refute_nil r.expect("Please select your character", timeout), "Expected character selection" + w.write "\x18" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + ensure + r.close + w.close + Process.wait(pid) + end + end +end diff --git a/Formula/a/angle-grinder.rb b/Formula/a/angle-grinder.rb new file mode 100644 index 0000000000000..3520d6c2c99e0 --- /dev/null +++ b/Formula/a/angle-grinder.rb @@ -0,0 +1,30 @@ +class AngleGrinder < Formula + desc "Slice and dice log files on the command-line" + homepage "https://github.com/rcoh/angle-grinder" + url "https://github.com/rcoh/angle-grinder/archive/refs/tags/v0.19.6.tar.gz" + sha256 "f76e236f0825ca3f0b165e37d6448fa36e39c41690e7469d02c37eeb0c972222" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "98723fe85d178aac89df81a680eb6219bfb4559d4f5e2c78d7b09753e64b7ce3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "280e3f3eeb588c1af385fad6a05e08f5e6091f8114c268d56bba319a61800c92" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d56a1aa983b7e82416a161f67ba167e0621adaa77f105c54d6718d67077ea0ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a50e61175718bb7bf7308a14048d490ddf3e7da8fe757f5155468b997dd7d121" + sha256 cellar: :any_skip_relocation, sonoma: "2159b170bb90518e07ae0e8cfc5d3600c15d9289c88845ca2e9891f5618f731e" + sha256 cellar: :any_skip_relocation, ventura: "558f1dcc5e0109898a9e49511cfda872245e9c4cdf42d0785214c197f8b04e2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0ee850784501fcc08b3a8e5b04b0ed884d15cd5563d5fade0e1bfcbcdbc1cc8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "881ad5857fabe8dc722b466099b20ce47b582f7508612419425af047e73c2ba5" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"logs.txt").write("{\"key\": 5}") + output = shell_output("#{bin}/agrind --file logs.txt '* | json'") + assert_match "[key=5]", output + end +end diff --git a/Formula/a/angular-cli.rb b/Formula/a/angular-cli.rb new file mode 100644 index 0000000000000..c588f4f209c24 --- /dev/null +++ b/Formula/a/angular-cli.rb @@ -0,0 +1,23 @@ +class AngularCli < Formula + desc "CLI tool for Angular" + homepage "https://angular.dev/cli/" + url "https://registry.npmjs.org/@angular/cli/-/cli-20.3.8.tgz" + sha256 "cc542c8c10e7e28b0c631eb7c2ae78cf419aba6e2fe522fd0b2bdb21c620dea8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "46dd6f375e8b8bc4166fe05f2296b154942487b06f9f95e0b7b7a8a8bc89e0cc" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"ng", "new", "angular-homebrew-test", "--skip-install" + assert_path_exists testpath/"angular-homebrew-test/package.json", "Project was not created" + end +end diff --git a/Formula/a/animdl.rb b/Formula/a/animdl.rb new file mode 100644 index 0000000000000..603f7228212f1 --- /dev/null +++ b/Formula/a/animdl.rb @@ -0,0 +1,202 @@ +class Animdl < Formula + include Language::Python::Virtualenv + + desc "Anime downloader and streamer" + # pin lxml and yarl once https://github.com/justfoolingaround/animdl/pull/308 merged and released + homepage "https://github.com/justfoolingaround/animdl" + url "https://files.pythonhosted.org/packages/5b/79/4be6ac2caca32dea6fe500e5f5df9d74a3a5ce1d500175c3a7b69500bb3f/animdl-1.7.27.tar.gz" + sha256 "fd97b278da4c82da88759993eaf6d8ad6fc3660d0f03de5b2151279c4ebd8370" + license "GPL-3.0-only" + revision 1 + head "https://github.com/justfoolingaround/animdl.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "76c8e70495c3f20a11443fb7bb5e60ab3a3b4d1588b452036d10b00e4943825c" + sha256 cellar: :any, arm64_sequoia: "83f5d6273bcde5662f5b6b94ce85ef2d4888f3730293e15b12b6abb5646b8c38" + sha256 cellar: :any, arm64_sonoma: "8feb0684a8199f1cc06c2b544c974f3dc66721a9991cac3c40c8a31f30878e71" + sha256 cellar: :any, sonoma: "55d2dfddf0ad960407db20f1c4ddba33bb299c4179417903846e4f707aa81c73" + sha256 cellar: :any_skip_relocation, arm64_linux: "137dc036fd3c25046c9642b4cdf260a3cf175a2474dcf45cbb66de786a71a47a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b4586b185802368c5c14fe17ff1652a6cbd0f9a91ab2657c6dd5fed61a810df" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "certifi" + + resource "anchor-kr" do + url "https://files.pythonhosted.org/packages/dd/46/c96feb94c9101ca57b9d612b6510b06da31d31321e5c54fca6cb4a6a0adf/anchor-kr-0.1.3.tar.gz" + sha256 "0fc055b6fd359bd20225dc4c39f721535af3245b068724db09c62a0f95ec4bbf" + end + + resource "anitopy" do + url "https://files.pythonhosted.org/packages/d3/8b/3da3f8ba73b8e4e5325a9ecbd6780f4dc9f41c98cc1c6a897800c4f85979/anitopy-2.1.1.tar.gz" + sha256 "515b97cd78917ee406313f4eb53bdc75e8a573e6ad5252ffd355c96a06988e26" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "comtypes" do + url "https://files.pythonhosted.org/packages/e9/c3/f1b3d86f210e42c3103d4e6c22b9775747d78c337acd3f7f7ab615f5c3e2/comtypes-1.1.14.zip" + sha256 "5d7caf6d3a86d51ddfc53e4548cae2dceee1b46672f8bd59679711dd01a934f2" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/d1/91/d51202cc41fbfca7fa332f43a5adac4b253962588c7cc5a54824b019081c/cssselect-1.2.0.tar.gz" + sha256 "666b19839cfaddb9ce9d36bfe4c969132c647b92fc9088c4e23f786b30f1b3dc" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz" + sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/61/42/5c456b02816845d163fab0f32936b6a5b649f3f915beff6f819f4f6c90b2/httpcore-0.16.3.tar.gz" + sha256 "c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/f5/50/04d5e8ee398a10c767a341a25f59ff8711ae3adf0143c7f8b45fc560d72d/httpx-0.23.3.tar.gz" + sha256 "9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/ea/e2/3834472e7f18801e67a3cd6f3c203a5456d6f7f903cfb9a990e62098a2f3/lxml-5.2.1.tar.gz" + sha256 "3f7765e69bbce0906a7c74d5fe46d2c7a7596147318dbc08e4a2431f3060e306" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/e4/c0/59bd6d0571986f72899288a95d9d6178d0eebd70b6650f1bb3f0da90f8f7/markdown-it-py-2.2.0.tar.gz" + sha256 "7c9a5e412688bc771c67432cbfebcdd686c93ce6484913dccf06cb5a0bea35a1" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "pkginfo" do + url "https://files.pythonhosted.org/packages/24/03/e26bf3d6453b7fda5bd2b84029a426553bb373d6277ef6b5ac8863421f87/pkginfo-1.12.1.2.tar.gz" + sha256 "5cd957824ac36f140260964eba3c6be6442a8359b8c48f4adf90210f33a04b7b" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/24/40/e249ac3845a2333ce50f1bb02299ffb766babdfe80ca9d31e0158ad06afd/pycryptodomex-3.14.1.tar.gz" + sha256 "2ce76ed0081fd6ac8c74edc75b9d14eca2064173af79843c24fa62573263c1f2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/27/b5/92d404279fd5f4f0a17235211bb0f5ae7a0d9afb7f439086ec247441ed28/regex-2022.10.31.tar.gz" + sha256 "a3a98921da9a1bf8457aeee6a551948a83601689e5ecdd736894ea9bbec77e83" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/79/30/5b1b6c28c105629cc12b33bdcbb0b11b5bb1880c6cfbd955f9e792921aa8/rfc3986-1.5.0.tar.gz" + sha256 "270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/9a/50/672a8d347f92bc752b04c338bbf932fbd0104fbc416c82cc91aa5f7b4b0b/rich-13.3.3.tar.gz" + sha256 "dc84400a9d842b3a9c5ff74addd8eb798d155f36c1c91303888e0a66850d2a15" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/06/04/e65e7f457ce9a2e338366a3a873ec6994e081cf4f99becb59ab6ce19e4b5/tqdm-4.65.2.tar.gz" + sha256 "5f7d8b4ac76016ce9d51a7f0ea30d30984888d97c474fdc4a4148abfb5ee76aa" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/1e/87/6d71456eabebf614e0cac4387c27116a0bff9decf00a70c362fe7db9394e/yarl-1.9.11.tar.gz" + sha256 "c7548a90cb72b67652e2cd6ae80e2683ee08fde663104528ac7df12d8ef271d2" + end + + # Multiple resources are too old to build on recent Xcode/macOS, + # can delete this after a change like this is merged and released in a new version: + # https://github.com/justfoolingaround/animdl/pull/301 + # The patch isn't strictly needed but it's an easy way to see which Python `resource` + # blocks needed to be manually bumped to newer versions. + patch :DATA + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"animdl", shell_parameter_format: :click) + end + + test do + (testpath/"config.yml").write <<~YAML + default_provider: animixplay + YAML + + assert_match "One Piece Film", shell_output("#{bin}/animdl search 'one piece' 2>&1") + assert_match "animdl, version #{version}", shell_output("#{bin}/animdl --version") + end +end + +__END__ +diff --git a/pyproject.toml b/pyproject.toml +index e0e8782..e71eacf 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -21,8 +21,8 @@ httpx = "~=0.23.0" + tqdm = ">=4.62.3,<4.66.0" + pycryptodomex = "~=3.14.1" + regex = "~=2022.10.31" +-yarl = "~=1.8.1" +-pyyaml = "~=6.0" ++yarl = "~=1.9.11" ++pyyaml = "~=6.0.1" + packaging = ">=22,<24" + pkginfo = "^1.9.2" + rich = ">=13.3.1,<13.3.4" +@@ -33,5 +33,5 @@ rich = ">=13.3.1,<13.3.4" + animdl = "animdl.__main__:__animdl_cli__" + + [tool.poetry.dependencies.lxml] +-version = "4.9.1" ++version = "5.1.0" + markers = "sys_platform != 'win32'" diff --git a/Formula/a/ansible-builder.rb b/Formula/a/ansible-builder.rb new file mode 100644 index 0000000000000..957df289eadc8 --- /dev/null +++ b/Formula/a/ansible-builder.rb @@ -0,0 +1,103 @@ +class AnsibleBuilder < Formula + include Language::Python::Virtualenv + + desc "CLI tool for building Ansible Execution Environments (Containers)" + homepage "https://ansible-builder.readthedocs.io/" + url "https://files.pythonhosted.org/packages/fe/6b/0525894e5dd510c3a67da0b8819209333ca939cfa94b7f0d3ef041a628ec/ansible_builder-3.1.1.tar.gz" + sha256 "9d88bc15acc7d31056d0c51914a6102dac8e5ad73f9f2d35ba98378c89714ed2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "030e0175318b171c3d580e0e1300b1d387a947b1e6d1d6a1bd619dab0cc46ce6" + sha256 cellar: :any, arm64_sequoia: "33a173da8eba8ee2ae6fb00ca9266c62eccb47cf0e93f79b59da14c523d55499" + sha256 cellar: :any, arm64_sonoma: "573391108eac3b6a9466ffda19876b44366b44e3be2f7d4d342e96ec230dc265" + sha256 cellar: :any, sonoma: "a81de84cbf633d655d4089ae76c19c28ab55b30db050873d8abdc46d917f619a" + sha256 cellar: :any_skip_relocation, arm64_linux: "00f7fc506d516b318030fe07e59d2ef21435353014bf2d660d756a49940e8129" + sha256 cellar: :any_skip_relocation, x86_64_linux: "140f9e227e3758a28f256a5b213f54b73e8e130d7ebcf5784e5f8444b50021d0" + end + + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: "rpds-py" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "bindep" do + url "https://files.pythonhosted.org/packages/e9/e4/fdefd8289e79f3a2f9f692f9ef64b0c835856dd023f335c96c8225e776cb/bindep-2.13.0.tar.gz" + sha256 "df7564753e583033bb113338150d772540145b4d189a4801ec56a25b5ede5050" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "parsley" do + url "https://files.pythonhosted.org/packages/06/52/cac2f9e78c26cff8bb518bdb4f2b5a0c7058dec7a62087ed48fe87478ef0/Parsley-1.3.tar.gz" + sha256 "9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def install + virtualenv_install_with_resources + end + + test do + test_tmp = testpath/"tmp" + (testpath/"execution-environment.yml").write <<~YAML + --- + version: 3 + images: + base_image: + name: quay.io/ansible/awx-ee:latest + options: + skip_ansible_check: True + YAML + + system bin/"ansible-builder", "create", "-c", test_tmp, + "--output-filename", "Containerfile", + "--file", testpath/"execution-environment.yml" + assert_path_exists test_tmp/"Containerfile" + + assert_match version.to_s, shell_output("#{bin}/ansible-builder --version") + end +end diff --git a/Formula/a/ansible-cmdb.rb b/Formula/a/ansible-cmdb.rb new file mode 100644 index 0000000000000..d235eb3cfc64d --- /dev/null +++ b/Formula/a/ansible-cmdb.rb @@ -0,0 +1,75 @@ +class AnsibleCmdb < Formula + include Language::Python::Virtualenv + + desc "Generates static HTML overview page from Ansible facts" + homepage "https://github.com/fboender/ansible-cmdb" + url "https://github.com/fboender/ansible-cmdb/archive/refs/tags/1.31.tar.gz" + sha256 "8de9a02e3f0740967537850f6263756dca1bf506cd95c1f2ef7f4ee6d9ff23b8" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b6be47954b66a7ecc04bfff866f4417a531171c2bfa3dcf1ac7c17ed5bac7e5c" + sha256 cellar: :any, arm64_sequoia: "2164c629351884de60aaa7fa684d2384ee24e81c23f5515064becc5728cb7597" + sha256 cellar: :any, arm64_sonoma: "f169a1b45de20cb12c7b2c8399fbc32e5d565a808d4a11b919d9595e02ef7175" + sha256 cellar: :any, sonoma: "5a4011e6d5933f8e6fa6f6933fd0a222d15ad535bcdf4f4849a89ca5b8200fcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "e02eca8dd4bf47a7cb861cd1c6ee75f735a46696b1e7e665cd1eb5f2e8f9cda0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c82c4713092df1c5856967eb0d0d4072622d531083501e3995dfa27f10f2fbdb" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "jsonxs" do + url "https://files.pythonhosted.org/packages/65/62/67257a84338fde1b89fce8b28164364bf2ad6a5a4459a6a890cf497cf721/jsonxs-0.6.tar.gz" + sha256 "dc41ae07961f3f19f97241e4c7f611d84d076c420dd2876aadfd936e59c8c302" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/62/4f/ddb1965901bc388958db9f0c991255b2c469349a741ae8c9cd8a562d70a6/mako-1.3.9.tar.gz" + sha256 "b5d65ff3462870feec922dbccf38f6efb44e5714d7b593a656be86663d8600ac" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "ushlex" do + url "https://files.pythonhosted.org/packages/48/e0/33fa11058c8efc51ba3520ceb85c9fa0c5e42ce414b885fcd5e12132d13b/ushlex-0.99.1.tar.gz" + sha256 "6d681561545a9781430d5254eab9a648bade78c82ffd127d56c9228ae8887d46" + end + + # from https://github.com/fboender/ansible-cmdb/pull/260 + # fixes imp being deprecated in python 3.12 https://github.com/fboender/ansible-cmdb/issues/259 + patch do + url "https://github.com/fboender/ansible-cmdb/commit/02242d4eed9d4295d02cf2835a51eb4f422b18cf.patch?full_index=1" + sha256 "5b63452cd28eb49afa2ea927e61280e864bf04edeaf830f37f5e63620169fd41" + end + + def install + man1.install "contrib/ansible-cmdb.man.1" => "ansible-cmdb.1" + + inreplace "src/ansiblecmdb/data/VERSION", "MASTER", version.to_s + virtualenv_install_with_resources + + # built binary needs python and ansible-cmdb.py paths + libexec_python = libexec/"bin/python" + inreplace libexec/"bin/ansible-cmdb" do |s| + s.gsub! "which -a python", "echo \"#{libexec_python}\"" + s.gsub! "BIN_DIR=$(dirname \"$0\")", "BIN_DIR=#{libexec}/bin" + end + end + + test do + system bin/"ansible-cmdb", "-dt", "html_fancy", "." + end +end diff --git a/Formula/a/ansible-creator.rb b/Formula/a/ansible-creator.rb new file mode 100644 index 0000000000000..3d318bf505976 --- /dev/null +++ b/Formula/a/ansible-creator.rb @@ -0,0 +1,49 @@ +class AnsibleCreator < Formula + include Language::Python::Virtualenv + + desc "CLI tool for scaffolding Ansible Content" + homepage "https://ansible.readthedocs.io/projects/creator/" + url "https://files.pythonhosted.org/packages/b4/5d/e712b0e27afca77fce327fab0c77ee6413dcce76b28a35dad189e7142070/ansible_creator-25.10.0.tar.gz" + sha256 "328332df0da015f2a895cf9f17ce6af95b205644131f04c246aeb7b70f4487ee" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e8b7ff5333f87cc19cdbe8aef9dcca050324efe05d9b9971b725a833837a1a80" + sha256 cellar: :any, arm64_sequoia: "688d1cfe893ab071529ee90354bcf083e8f76bb59fd9c0722192facbf35b4846" + sha256 cellar: :any, arm64_sonoma: "bac74ec1926b8e873a31d78a9b917919592c952f1734efd5f45e13aac409699f" + sha256 cellar: :any, sonoma: "41f057ae8f79ff0358fa71caff73b019767f849c583c1c341d6b8a11daf2dbda" + sha256 cellar: :any_skip_relocation, arm64_linux: "757f35f5e25e320ad10235d770134b326104c6c5c9e5a279a8f4b46a24fdd34f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2eacd170bc4e37f5fefb347443b52ed0fec7df8a5ebe75c7ae527a8025a8defd" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" + system bin/"ansible-creator", "init", "examplenamespace.examplename", + "--init-path", testpath/"example" + assert_path_exists testpath/"example/galaxy.yml" + + assert_match version.to_s, shell_output("#{bin}/ansible-creator --version") + end +end diff --git a/Formula/a/ansible-language-server.rb b/Formula/a/ansible-language-server.rb new file mode 100644 index 0000000000000..d32fa8f16fc4a --- /dev/null +++ b/Formula/a/ansible-language-server.rb @@ -0,0 +1,51 @@ +class AnsibleLanguageServer < Formula + desc "Language Server for Ansible Files" + homepage "https://github.com/ansible/vscode-ansible" + url "https://registry.npmjs.org/@ansible/ansible-language-server/-/ansible-language-server-1.2.3.tgz" + sha256 "3182960a35f229f453d520cfb6c9624ca18104653457eca99dc1406690fa5aa2" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55e9dfc3173ac49bd6499e5186f4483a79f448141bf3933a5248a6a3169b76c5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f77d8d03dd3d1c02a29ba66785d2628274f5478363f8fce75a41ca3e6febcc32" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea600142aba89658a7896fa5c65ce40a2648b61f8535d569c552416ba38cd5c8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4575717c98b81f527b192d6687372445551f11c94b1f47058698e1b6cede67e3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "db9a066966f1c8a6abd1ce7e7a453a7199bdf34f17d3fb2c333113764d0cad84" + sha256 cellar: :any_skip_relocation, sonoma: "b926dc5d1e4e44a5718cf6d462c3902d8001208d4e3f28f94ed71adbfc44748a" + sha256 cellar: :any_skip_relocation, ventura: "5ac3f6ccdfc8b366ae1b0097b1c031e45371e8898b6f8ce988a065f8ee8e33e4" + sha256 cellar: :any_skip_relocation, monterey: "f0a90c681ae308eedcd2f57d363519b9d3eacb123e8772fc6f105b3ac7948f80" + sha256 cellar: :any_skip_relocation, arm64_linux: "69f366a23f834e990444cec8ccb7f0b7a17aa539cf8d54ba78523ba2dc13e400" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f51eb058ef24cd16f4f06e1a62b37aa801fa305a9be5ab816553250c07a9a07" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"ansible-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/a/ansible-lint.rb b/Formula/a/ansible-lint.rb new file mode 100644 index 0000000000000..5e39231cd6ea6 --- /dev/null +++ b/Formula/a/ansible-lint.rb @@ -0,0 +1,191 @@ +class AnsibleLint < Formula + include Language::Python::Virtualenv + + desc "Checks ansible playbooks for practices and behaviour" + homepage "https://ansible-lint.readthedocs.io/" + url "https://files.pythonhosted.org/packages/17/dd/6c1dd87464488a8d848d3e9dc5b833f0328ce9b4b7fcb6511a702d4cf0cd/ansible_lint-25.9.2.tar.gz" + sha256 "0eea8a5d17dd328bef12e7c9b6eb8714ba03fb1af62d9c700bf46e4858d1a6a4" + license all_of: ["MIT", "GPL-3.0-or-later"] + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "abb8479a067cec20e8f972561249be85232333d3e5fa766ed86982159cdf4ff3" + sha256 cellar: :any, arm64_sequoia: "a86601d4eb1985865a15a225acb4bb14e4c454a643eb4a4ebd51a423c954a75c" + sha256 cellar: :any, arm64_sonoma: "bfaa2670f555dc23197d43c1e414018602855832784a30a97b9be330aeb5ba77" + sha256 cellar: :any, sonoma: "53ba660cf65b85d5f8aff9dc57b85e6ed34ccfb3c8128a6b971d9b491ae79ff1" + sha256 cellar: :any_skip_relocation, arm64_linux: "26a28665c2dcf50cc932fc1b0d1f2395337b1d3dc6058516400badcc2aadc58c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21e73737123be56595ca277ca2f0c1d65e285f05cc4a9111209839e0c6bee76c" + end + + depends_on "pkgconf" => :build + depends_on "ansible" => :test + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.13" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["cryptography", "rpds-py"] + + resource "ansible-compat" do + url "https://files.pythonhosted.org/packages/e3/06/5e66f1f0d482b21b0dc03c9b9e47cab58dd4efc770f41029bb244e86b608/ansible_compat-25.8.2.tar.gz" + sha256 "c5ae1ff70938f1e009cfc7df66c9faad223a3ccd0ad6b57400de53b2459a6164" + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/aa/20/036f20185b8a65de24b0759efa8666577804f42b31beccb96309c67aa6d4/ansible_core-2.19.3.tar.gz" + sha256 "243a69669a007be0794360bc4477f70e0128ce0091dc3af4c5cb81c6a466f573" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "black" do + url "https://files.pythonhosted.org/packages/4b/43/20b5c90612d7bdb2bdbcceeb53d588acca3bb8f0e4c5d5c751a2c8fdd55a/black-25.9.0.tar.gz" + sha256 "0474bca9a0dd1b51791fcc507a4e02078a1c63f6d4e4ae5544b9848c7adfb619" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz" + sha256 "98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/40/bb/0ab3e58d22305b6f5440629d20683af28959bf793d98d11950e305c1c326/filelock-3.19.1.tar.gz" + sha256 "66eda1888b0171c998b35be2bcc0f6d75c388a7ce20c3f3f37aa8e96c2dddf58" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz" + sha256 "ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf" + end + + resource "pytokens" do + url "https://files.pythonhosted.org/packages/30/5f/e959a442435e24f6fb5a01aec6c657079ceaca1b3baf18561c3728d681da/pytokens-0.1.10.tar.gz" + sha256 "c9a4bfa0be1d26aebce03e6884ba454e842f186a59ea43a6d3b25af58223c044" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/05/57/c5c178e21968123cf2aa90501b5fc14a48e342612695863333f4b70510ad/resolvelib-1.2.0.tar.gz" + sha256 "c27fbb5098acd7dfc01fb2be3724bd0881168edc2bd3b4dc876ca3f46b8e4a3d" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "ruamel-yaml-clib" do + url "https://files.pythonhosted.org/packages/d8/e9/39ec4d4b3f91188fad1842748f67d4e749c77c37e353c4e545052ee8e893/ruamel.yaml.clib-0.2.14.tar.gz" + sha256 "803f5044b13602d58ea378576dd75aa759f52116a0232608e8fdada4da33752e" + end + + resource "subprocess-tee" do + url "https://files.pythonhosted.org/packages/d7/22/991efbf35bc811dfe7edcd749253f0931d2d4838cf55176132633e1c82a7/subprocess_tee-0.4.2.tar.gz" + sha256 "91b2b4da3aae9a7088d84acaf2ea0abee3f4fd9c0d2eae69a9b9122a71476590" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/79/3e/c0bdc27cf06f4e47680bd5803a07cb3dfd17de84cde92dd217dcb9e05253/wcmatch-10.1.tar.gz" + sha256 "f11f94208c8c8484a16f4f48638a85d771d9513f4ab3f37595978801cb9465af" + end + + resource "yamllint" do + url "https://files.pythonhosted.org/packages/46/f2/cd8b7584a48ee83f0bc94f8a32fea38734cefcdc6f7324c4d3bfc699457b/yamllint-1.37.1.tar.gz" + sha256 "81f7c0c5559becc8049470d86046b36e96113637bcbe4753ecef06977c00245d" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + virtualenv_install_with_resources + rm(bin/name) + (bin/name).write_env_script libexec/"bin"/name, PATH: "#{libexec}/bin:${PATH}" + end + + test do + mkdir ".git" + output = shell_output("#{bin}/ansible-lint --version 2>&1") + refute_match "WARNING", output + + ansible_lint_core_version = output.match(/ansible-core:([\d.]+)/)[1] + ansible = Formula["ansible"].opt_bin/"ansible" + assert_match "[core #{ansible_lint_core_version}]", shell_output("#{ansible} --version") + + ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" + (testpath/"playbook.yml").write <<~YAML + --- + - name: Homebrew test + hosts: all + gather_facts: false + tasks: + - name: Ping + ansible.builtin.ping: + YAML + system bin/"ansible-lint", testpath/"playbook.yml" + end +end diff --git a/Formula/a/ansible.rb b/Formula/a/ansible.rb new file mode 100644 index 0000000000000..f4df96bcb68c0 --- /dev/null +++ b/Formula/a/ansible.rb @@ -0,0 +1,641 @@ +class Ansible < Formula + include Language::Python::Virtualenv + + desc "Automate deployment, configuration, and upgrading" + homepage "https://www.ansible.com/" + url "https://files.pythonhosted.org/packages/98/ca/e4e29f2f222b675e2708d35b98f8e2156de080a47fcfbea6e03be9c2afe3/ansible-12.1.0.tar.gz" + sha256 "22dea1938d433fa515b3001cfad65cb308ef97c980f1520174d054dd38f32c83" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/ansible/ansible.git", branch: "devel" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab2e9694c18ca4b36b6f3b0bd78e2168820a73f938e2989d76b81827978ca39f" + sha256 cellar: :any, arm64_sequoia: "4f3d3e6ddd67cba85d682f6120cb79411b8a8ab74a2b533dacdfec4bf88e6182" + sha256 cellar: :any, arm64_sonoma: "ac2c4a5201afedb873536b4896a2671f23394661ff0aad8c34488d658df7d4c6" + sha256 cellar: :any, sonoma: "14b740de9436e9337114b44620bed20c93f3d1a504b19fbe5149c91ae5364262" + sha256 cellar: :any_skip_relocation, arm64_linux: "13668959b295ba6b4c73410632110e4b0d967f6fdfd846da200bda827bc133f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d7dd5e518e5626b61f46df7ac88de14b2b3470163160a2f660cbe7f05d8f646" + end + + # `pkgconf` and `rust` are for bcrypt + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "libssh" + depends_on "libyaml" + depends_on "python@3.13" + depends_on "tree" # for ansible-role-init + + uses_from_macos "krb5" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + uses_from_macos "openldap" # for python-ldap + + # passlib doesn't work with bcrypt v5+: https://github.com/ansible/ansible/issues/85919 + pypi_packages exclude_packages: %w[certifi cryptography gnureadline], + extra_packages: %w[ansible-pylibssh apache-libcloud bcrypt<5 boto3 dnspython docker + fqdn junos-eznc jxmlease kerberos ntc-templates openshift + passlib pexpect proxmoxer pynetbox pysphere3 python-consul + python-ldap python-neutronclient pytz pywinrm requests-credssp + shade zabbix-api] + + # pyinotify is only a dependency on Linux + resource "pyinotify" do + on_linux do + url "https://files.pythonhosted.org/packages/e3/c0/fd5b18dde17c1249658521f69598f3252f11d9d7a980c5be8619970646e1/pyinotify-0.9.6.tar.gz" + sha256 "9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4" + end + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/aa/20/036f20185b8a65de24b0759efa8666577804f42b31beccb96309c67aa6d4/ansible_core-2.19.3.tar.gz" + sha256 "243a69669a007be0794360bc4477f70e0128ce0091dc3af4c5cb81c6a466f573" + end + + resource "ansible-pylibssh" do + url "https://files.pythonhosted.org/packages/68/6d/93b13182acd29632ef3ab58650fc5727936942e2ad642a48f6a5e12aebb4/ansible-pylibssh-1.3.0.tar.gz" + sha256 "243ea1b0962b0b6b1e717ac0e69dac9636e61ec65b37260c317b2360c6e30ca7" + end + + resource "apache-libcloud" do + url "https://files.pythonhosted.org/packages/1b/45/1a239d9789c75899df8ff53a6b198c1657328f3b333f1711194643d53868/apache-libcloud-3.8.0.tar.gz" + sha256 "75bf4c0b123bc225e24ca95fca1c35be30b19e6bb85feea781404d43c4276c91" + + # Backport newer setuptools/wheel version + patch do + url "https://github.com/apache/libcloud/commit/a2114923adcaee6b022b43410db59df5d7e53c26.patch?full_index=1" + sha256 "b2b07919f7edbc346a16cfe8571ddbfb232e2b33ed32be18bf85e9ac4ec24d30" + end + end + + resource "autopage" do + url "https://files.pythonhosted.org/packages/9f/9e/559b0cfdba9f3ed6744d8cbcdbda58880d3695c43c053a31773cefcedde3/autopage-0.5.2.tar.gz" + sha256 "826996d74c5aa9f4b6916195547312ac6384bac3810b8517063f293248257b72" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/41/e1/a4c1f27d58bee960d4323251d016358547c40bc74c5460e426565d828bc4/boto3-1.40.60.tar.gz" + sha256 "fd3fa9de730c0f4d8a584d6b5313755923a9e181496fa6b09bbf78011e6c2ab3" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ea/f7/5313e9f84c962af63e05a0c23b51134b5288b198fa0023cf9dbe1b964504/botocore-1.40.60.tar.gz" + sha256 "85443f1829d9240d16ba346781956ebcd104dd8e91742c2901a9b2ace198a829" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/8d/43/6974bae8a54e8e49aea448f2897ba1af4d261b95328a3cc112fa0e290b1a/cliff-4.11.0.tar.gz" + sha256 "aa33c11ac2fecdf2d1eaffea9d5d0eb4584b8e777673bb55d42a693e34ccc429" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/75/68/4bf43d284e41c01c6011146e5c2824aa6f17a3bb1ef10ba3dbbae5cf31dc/cmd2-2.7.0.tar.gz" + sha256 "81d8135b46210e1d03a5a810baf859069a62214788ceeec3588f44eed86fbeeb" + end + + resource "debtcollector" do + url "https://files.pythonhosted.org/packages/31/e2/a45b5a620145937529c840df5e499c267997e85de40df27d54424a158d3c/debtcollector-3.0.0.tar.gz" + sha256 "2a8917d25b0e1f1d0d365d3c1c6ecfc7a522b1e9716e8a1a4a915126f7ccea6f" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/e7/c8/301ff89746e76745b937606df4753c032787c59ecb37dd4d4250bddc8929/dogpile_cache-1.5.0.tar.gz" + sha256 "849c5573c9a38f155cd4173103c702b637ede0361c12e864876877d0cd125eec" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/9d/a4/e44218c2b394e31a6dd0d6b095c4e1f32d0be54c2a4b250032d717647bab/durationpy-0.10.tar.gz" + sha256 "1fa6893409a6e739c9c72334fc65cca1f355dbdd93405d30f726deb5bde42fba" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "junos-eznc" do + url "https://files.pythonhosted.org/packages/bc/a0/54c0ca84bca6233aa25ab01f57117c8fbe1498a05bf85842f1a6c99eb3bf/junos_eznc-2.7.5.tar.gz" + sha256 "d7e395669eb94aeed9bca47a157ac87fa2e5489c075225b0878d0e5b77cd00c3" + end + + resource "jxmlease" do + url "https://files.pythonhosted.org/packages/8d/6a/b2944628e019c753894552c1499bf60e2cef9efea138756c5d66f0d5eb98/jxmlease-1.0.3.tar.gz" + sha256 "612c1575d8a87026dea096bb75acec7302dd69040fa23d9116e71e30d5e0839e" + end + + resource "kerberos" do + url "https://files.pythonhosted.org/packages/39/cd/f98699a6e806b9d974ea1d3376b91f09edcb90415adbf31e3b56ee99ba64/kerberos-1.3.1.tar.gz" + sha256 "cdd046142a4e0060f96a00eb13d82a5d9ebc0f2d7934393ed559bac773460a2c" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/e5/16/b96df223ca7ea4bfa78034b205e0eaf4875bfecb2f119f375fc5232d2061/keystoneauth1-5.12.0.tar.gz" + sha256 "dd113c2f3dcb418d9f761c73b8cd43a96ddfa8a612b51c576822381f39ca4ae8" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/ef/55/3f880ef65f559cbed44a9aa20d3bdbc219a2c3a3bac4a30a513029b03ee9/kubernetes-34.1.0.tar.gz" + sha256 "8fe8edb0b5d290a2f3ac06596b23f87c658977d46b5f8df9d0f4ea83d0003912" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "ncclient" do + url "https://files.pythonhosted.org/packages/c2/fb/29dbb4987f81d7932d8018079bf3e6d1d5cce320d7c2c90e84d3c7dba40c/ncclient-0.7.0.tar.gz" + sha256 "318e8e3e72b1d2a766f3665cabef33436fd25b607da5f15657a199c648a68435" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "ntc-templates" do + url "https://files.pythonhosted.org/packages/d6/0c/decd784b5969ddfed7e41d95baaa309f31c896bd7ed22d3a6d29ec1117a1/ntc_templates-8.1.0.tar.gz" + sha256 "e570a5bb4ee829d62bfdce3fb46045a40aaa176b134aa0db21542d6518ca4be7" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "openshift" do + url "https://files.pythonhosted.org/packages/55/f6/9e2e4935b59726bff3d53da35afba3904fe9ed693efedd6b7bbddff6cc78/openshift-0.13.2.tar.gz" + sha256 "f55789fce56fcbf7e2cd9377a68c4a99ab406074d3324b9abcca98477d101471" + end + + resource "openstacksdk" do + url "https://files.pythonhosted.org/packages/6c/e7/4921e513dc00e2b052b196e4a7055351b74192a680470ab287b2332b0c6a/openstacksdk-4.7.1.tar.gz" + sha256 "23348aa69c6cc6c1ed0e8f03fb42b156519ed8cfcd143e783ef5c1dd800ad9f1" + end + + resource "os-client-config" do + url "https://files.pythonhosted.org/packages/50/cd/352f6f18d1fb90780b95fdc3a668a279bd41d89905d70ee06076b529077c/os_client_config-2.3.0.tar.gz" + sha256 "e16a260f2fd500af14f157b9b7b7d69292ce83b0f8a461ec68ce6a8a42967cbd" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/9d/e9/1725288a94496d7780cd1624d16b86b7ed596960595d5742f051c4b90df5/os_service_types-1.8.0.tar.gz" + sha256 "890ce74f132ca334c2b23f0025112b47c6926da6d28c2f75bcfc0a83dea3603e" + end + + resource "osc-lib" do + url "https://files.pythonhosted.org/packages/7c/63/ea0eda39e1b2c0ca3e9d87798568f881ea7aa90e4f94affb78676215f72d/osc_lib-4.2.0.tar.gz" + sha256 "99718f06a990c1ad6fb9034bbed9655390a2ea83cef71a53781e7e9abd9f20ce" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/03/67/221128a241ab4151ecc5b101de23651e7c08491f7b2edea31744207a23dc/oslo_config-10.0.0.tar.gz" + sha256 "333e675db8c6be7715b3decf78c398ca1138439225aa274632e89314837f6ea3" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/15/a3/d4804bb24e6f8cabcae4925a02ade281c2f8d90e3d0b7b367221cfb65ad8/oslo_context-6.1.0.tar.gz" + sha256 "c1a8d17c79f50c71024d54cc17cc0b01e89dbff258315dc11d7e04e6b1a02ce3" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/c1/74/a2238cfdf6e97ee398b3fc5eda8b0e108be3913494dbef90961ebe38bf23/oslo_i18n-6.6.0.tar.gz" + sha256 "bb5e3becefa2e40488b259f9db12cc5ad894dd309b5b5aca56382ff190c18f5e" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/81/6b/a7f1c1daeadd36f71633fb3ebac9817fcb1f8edfd06d6bdd71384f39010f/oslo_log-7.2.1.tar.gz" + sha256 "01aebabdcf06b62df00e479db99df0c23f6cd24c6500ab3110e604bd059fa8d5" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/d4/ac/119c430df3a86dc6a664fa864f777b4fd5cc16c50caa1ba3dd3bf10f43ae/oslo_serialization-5.8.0.tar.gz" + sha256 "5871a62b23f98cacd5518482941ae6d2a983e2936ed52d543ad08685dc6d2343" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/d9/ec/9f12c8ded6eb7ba0774ea4a0e03bfe6cd35fea4cbc944a826c751bb49500/oslo_utils-9.1.0.tar.gz" + sha256 "01c3875e7cca005b59465c429f467113b5f4b04211cbd534c9ac2f152276d3b3" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "passlib" do + url "https://files.pythonhosted.org/packages/b6/06/9da9ee59a67fae7761aab3ccc84fa4f3f33f125b370f1ccdb915bf967c11/passlib-1.7.4.tar.gz" + sha256 "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "proxmoxer" do + url "https://files.pythonhosted.org/packages/6a/54/dc2919eed681ca31220a9021e35935a3995335069b520279b4d55b9df822/proxmoxer-2.2.0.tar.gz" + sha256 "3ed63a58e5c0822841afdb3801f9d913a4996955c1c54f7319b5842ba2615006" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pynetbox" do + url "https://files.pythonhosted.org/packages/d3/0b/695021a23c373991d07c1e4cb510287a521318cfc4b29f68ebbecb19fcd2/pynetbox-7.5.0.tar.gz" + sha256 "780064c800fb8c079c9828df472203146442ed3dd0b522a28a501204eb00c066" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "pysphere3" do + url "https://files.pythonhosted.org/packages/fa/1e/16cf889e0e38380678631a4afebeeb840cb29f54f11413356770efe29240/pysphere3-0.1.8.tar.gz" + sha256 "c8efe92e7802b59ef67e09fb20b008fc1bd0d253ba97ba689aa892b125283ae1" + end + + resource "pyspnego" do + url "https://files.pythonhosted.org/packages/f9/e4/8b32a91aeba6fbc6943a630c44b2fe038615e5c7dec8814316fafdcf4bf4/pyspnego-0.12.0.tar.gz" + sha256 "e1d9cd3520a87a1d6db8d68783b17edc4e1464eae3d51ead411a51c82dbaae67" + end + + resource "python-consul" do + url "https://files.pythonhosted.org/packages/7f/06/c12ff73cb1059c453603ba5378521e079c3f0ab0f0660c410627daca64b7/python-consul-1.1.0.tar.gz" + sha256 "168f1fa53948047effe4f14d53fc1dab50192e2a2cf7855703f126f469ea11f4" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-keystoneclient" do + url "https://files.pythonhosted.org/packages/94/29/3775d7a722924a72208753a8aa5ddb0a58de24f5a5dd287cc9a0f66038e4/python_keystoneclient-5.7.0.tar.gz" + sha256 "8ce7bf1c8cddca6d7140fc76918b44eddf1d64040a60cb8ff7059136104d4ceb" + end + + resource "python-ldap" do + url "https://files.pythonhosted.org/packages/0c/88/8d2797decc42e1c1cdd926df4f005e938b0643d0d1219c08c2b5ee8ae0c0/python_ldap-3.4.5.tar.gz" + sha256 "b2f6ef1c37fe2c6a5a85212efe71311ee21847766a7d45fcb711f3b270a5f79a" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/57/15/96f2f42df4c1d6873c89a0cae2ba3b98f83273e965421eb11b7dbb257b4d/python_neutronclient-11.6.0.tar.gz" + sha256 "3c6958088d18c8676a10abf9d94b8dbf1a984741cbb988554f216880797e072f" + end + + resource "python-string-utils" do + url "https://files.pythonhosted.org/packages/10/91/8c883b83c7d039ca7e6c8f8a7e154a27fdeddd98d14c10c5ee8fe425b6c0/python-string-utils-1.0.0.tar.gz" + sha256 "dcf9060b03f07647c0a603408dc8b03f807f3b54a05c6e19eb14460256fac0cb" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pywinrm" do + url "https://files.pythonhosted.org/packages/5a/2f/d835c342c4b11e28beaccef74982e7669986c84bf19654c39f53c8b8243c/pywinrm-0.5.0.tar.gz" + sha256 "5428eb1e494af7954546cd4ff15c9ef1a30a75e05b25a39fd606cef22201e9f1" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-credssp" do + url "https://files.pythonhosted.org/packages/bc/c3/de13b8598287440ab1df7eba97b93278d309dffb920f0163a09e089b71ec/requests-credssp-2.0.0.tar.gz" + sha256 "229afe2f6e1c9fabef64fc2bdf2a10e794ca6c4a0c00a687d53fbfaf7b8ee71d" + end + + resource "requests-ntlm" do + url "https://files.pythonhosted.org/packages/15/74/5d4e1815107e9d78c44c3ad04740b00efd1189e5a9ec11e5275b60864e54/requests_ntlm-1.3.0.tar.gz" + sha256 "b29cc2462623dffdf9b88c43e180ccb735b4007228a542220e882c58ae56c668" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "requestsexceptions" do + url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" + sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/1d/14/4669927e06631070edb968c78fdb6ce8992e27c9ab2cde4b3993e22ac7af/resolvelib-1.2.1.tar.gz" + sha256 "7d08a2022f6e16ce405d60b68c390f054efcfd0477d4b9bd019cc941c28fad1c" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/71/a6/34460d81e5534f6d2fc8e8d91ff99a5835fdca53578eac89e4f37b3a7c6d/rich_argparse-1.7.1.tar.gz" + sha256 "d7a493cde94043e41ea68fb43a74405fa178de981bf7b800f7a3bd02ac5c27be" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "scp" do + url "https://files.pythonhosted.org/packages/d6/1c/d213e1c6651d0bd37636b21b1ba9b895f276e8057f882c9f944931e4f002/scp-0.15.0.tar.gz" + sha256 "f1b22e9932123ccf17eebf19e0953c6e9148f589f93d91b872941a696305c83f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shade" do + url "https://files.pythonhosted.org/packages/b0/a6/a83f14eca6f7223319d9d564030bd322ca52c910c34943f38a59ad2a6549/shade-1.33.0.tar.gz" + sha256 "36f6936da93723f34bf99d00bae24aa4cc36125d597392ead8319720035d21e8" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "textfsm" do + url "https://files.pythonhosted.org/packages/9e/87/2a93c2ced2a11fb26cfec3623894a9127b9b67ae3cfdd1778afa5cff576f/textfsm-2.1.0.tar.gz" + sha256 "45c18ff2b7c90163dfdff7e20d3f482514cc7aac26bc2547744e79dfa761e458" + end + + resource "transitions" do + url "https://files.pythonhosted.org/packages/4f/83/9e90f3494057d73c9e6bd8de8488af7c9fa714666ccc2db30fe07d147818/transitions-0.9.3.tar.gz" + sha256 "881fb75bb1654ed55d86060bb067f2c716f8e155f57bb73fd444e53713aafec8" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/49/19/5e5bcd855d808892fe02d49219f97a50f64cd6d8313d75df3494ee97b1a3/wrapt-2.0.0.tar.gz" + sha256 "35a542cc7a962331d0279735c30995b024e852cf40481e384fd63caaa391cbb9" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + resource "yamlordereddictloader" do + url "https://files.pythonhosted.org/packages/23/78/f853b0db6d8f3ea0ae4c648e4504ba376d024c139ba1292a256ce6180dd0/yamlordereddictloader-0.4.2.tar.gz" + sha256 "36af2f6210fcff5da4fc4c12e1d815f973dceb41044e795e1f06115d634bca13" + end + + resource "zabbix-api" do + url "https://files.pythonhosted.org/packages/4a/ce/893d6ab7e978d0c00d9154c0cf385016b862438da069302e7ceac0f6c429/zabbix-api-0.5.6.tar.gz" + sha256 "627ad26769b6831130239182afcb195f64fbf494626bc9eb4b2ac8170de5b775" + end + + def install + venv = virtualenv_install_with_resources without: "ansible-core" + venv.pip_install_and_link resource("ansible-core") + end + + test do + ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" + (testpath/"playbook.yml").write <<~YAML + --- + - hosts: all + gather_facts: False + tasks: + - name: ping + ping: + YAML + python3 = "python#{Language::Python.major_minor_version libexec/"bin/python"}" + (testpath/"hosts.ini").write [ + "localhost ansible_connection=local", + " ansible_python_interpreter=#{which(python3)}", + "\n", + ].join + system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" + + # Ensure requests[security] is activated + script = "import requests as r; r.get('https://mozilla-modern.badssl.com')" + system libexec/"bin/python", "-c", script + + # Ensure ansible-vault can encrypt/decrypt files. + (testpath/"vault-password.txt").write("12345678") + (testpath/"vault-test-file.txt").write <<~EOS + --- + content: + hello: world + EOS + system bin/"ansible-vault", "encrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + system bin/"ansible-vault", "decrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + + # Check ansible-test is happy with our python version + mkdir "ansible_collections/community/general/" do + output = shell_output("#{bin}/ansible-test sanity --list-tests 2>&1") + assert_match "WARNING: All targets skipped.", output + end + end +end diff --git a/Formula/a/ansible@10.rb b/Formula/a/ansible@10.rb new file mode 100644 index 0000000000000..6b00db7b23e40 --- /dev/null +++ b/Formula/a/ansible@10.rb @@ -0,0 +1,669 @@ +class AnsibleAT10 < Formula + include Language::Python::Virtualenv + + desc "Automate deployment, configuration, and upgrading" + homepage "https://www.ansible.com/" + url "https://files.pythonhosted.org/packages/d4/64/29fdff6fe7682342adb54802c1cd90b2272d382e1743089af88f90a1d986/ansible-10.7.0.tar.gz" + sha256 "59d29e3de1080e740dfa974517d455217601b16d16880314d9be26145c68dc22" + license "GPL-3.0-or-later" + revision 5 + + livecheck do + url "https://pypi.org/rss/project/ansible/releases.xml" + regex(/^v?(10(?:\.\d+)+)$/i) + strategy :xml do |xml, regex| + xml.get_elements("//item/title").map { |item| item.text[regex, 1] } + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1c5318d8e7b6d9d8a03d75260f0ad11960cec47b45e346fae8c68529f5af95bb" + sha256 cellar: :any, arm64_sequoia: "65798350999edd68ccbb5d0b418d8f3c7bb6499af312b49c6c12435f7893bae4" + sha256 cellar: :any, arm64_sonoma: "7e5b77c0c432ac1dded6869a75a4300b2f6390884eca4f8d10bb4ff3ae9a797e" + sha256 cellar: :any, sonoma: "d5524287c95020c875b33b8acf5286dcfbae2644991ed198dbd93b8e569f39d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "d551bf40e756f7ede27ff3600f49b87e3ffb39880bb9091010705eccf731ccaf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c409d652ca7c06fe9b90e24661caaa49a43c1498427452c19a17f3ab73b9048d" + end + + keg_only :versioned_formula + + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-community-package-release-cycle + deprecate! date: "2025-05-19", because: :unmaintained + disable! date: "2026-05-19", because: :unmaintained + + # `pkgconf` and `rust` are for bcrypt + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "libsodium" # for pynacl + depends_on "libssh" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "python@3.12" # ansible-core 2.17.6 only supports py3.12 + + uses_from_macos "krb5" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + uses_from_macos "openldap" # for python-ldap + + # passlib doesn't work with bcrypt v5+: https://github.com/ansible/ansible/issues/85919 + pypi_packages exclude_packages: %w[certifi gnureadline], + extra_packages: %w[ansible-pylibssh apache-libcloud bcrypt<5 boto3 dnspython + docker fqdn junos-eznc jxmlease kerberos ntc-templates openshift + passlib pexpect proxmoxer pynetbox pysphere3 python-consul + python-ldap python-neutronclient pytz pywinrm requests-credssp + shade zabbix-api] + + # pyinotify is linux-only dependency + resource "pyinotify" do + on_linux do + url "https://files.pythonhosted.org/packages/e3/c0/fd5b18dde17c1249658521f69598f3252f11d9d7a980c5be8619970646e1/pyinotify-0.9.6.tar.gz" + sha256 "9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4" + end + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/ff/80/2925a0564f6f99a8002c3be3885b83c3a1dc5f57ebf00163f528889865f5/ansible_core-2.17.14.tar.gz" + sha256 "7c17fee39f8c29d70e3282a7e9c10bd70d5cd4fd13ddffc5dcaa52adbd142ff8" + end + + resource "ansible-pylibssh" do + url "https://files.pythonhosted.org/packages/68/6d/93b13182acd29632ef3ab58650fc5727936942e2ad642a48f6a5e12aebb4/ansible-pylibssh-1.3.0.tar.gz" + sha256 "243ea1b0962b0b6b1e717ac0e69dac9636e61ec65b37260c317b2360c6e30ca7" + end + + resource "apache-libcloud" do + url "https://files.pythonhosted.org/packages/1b/45/1a239d9789c75899df8ff53a6b198c1657328f3b333f1711194643d53868/apache-libcloud-3.8.0.tar.gz" + sha256 "75bf4c0b123bc225e24ca95fca1c35be30b19e6bb85feea781404d43c4276c91" + + # Backport newer setuptools/wheel version + patch do + url "https://github.com/apache/libcloud/commit/a2114923adcaee6b022b43410db59df5d7e53c26.patch?full_index=1" + sha256 "b2b07919f7edbc346a16cfe8571ddbfb232e2b33ed32be18bf85e9ac4ec24d30" + end + end + + resource "autopage" do + url "https://files.pythonhosted.org/packages/9f/9e/559b0cfdba9f3ed6744d8cbcdbda58880d3695c43c053a31773cefcedde3/autopage-0.5.2.tar.gz" + sha256 "826996d74c5aa9f4b6916195547312ac6384bac3810b8517063f293248257b72" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/41/e1/a4c1f27d58bee960d4323251d016358547c40bc74c5460e426565d828bc4/boto3-1.40.60.tar.gz" + sha256 "fd3fa9de730c0f4d8a584d6b5313755923a9e181496fa6b09bbf78011e6c2ab3" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ea/f7/5313e9f84c962af63e05a0c23b51134b5288b198fa0023cf9dbe1b964504/botocore-1.40.60.tar.gz" + sha256 "85443f1829d9240d16ba346781956ebcd104dd8e91742c2901a9b2ace198a829" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/8d/43/6974bae8a54e8e49aea448f2897ba1af4d261b95328a3cc112fa0e290b1a/cliff-4.11.0.tar.gz" + sha256 "aa33c11ac2fecdf2d1eaffea9d5d0eb4584b8e777673bb55d42a693e34ccc429" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/75/68/4bf43d284e41c01c6011146e5c2824aa6f17a3bb1ef10ba3dbbae5cf31dc/cmd2-2.7.0.tar.gz" + sha256 "81d8135b46210e1d03a5a810baf859069a62214788ceeec3588f44eed86fbeeb" + end + + resource "cryptography" do + url "https://files.pythonhosted.org/packages/9f/33/c00162f49c0e2fe8064a62cb92b93e50c74a72bc370ab92f86112b33ff62/cryptography-46.0.3.tar.gz" + sha256 "a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1" + end + + resource "debtcollector" do + url "https://files.pythonhosted.org/packages/31/e2/a45b5a620145937529c840df5e499c267997e85de40df27d54424a158d3c/debtcollector-3.0.0.tar.gz" + sha256 "2a8917d25b0e1f1d0d365d3c1c6ecfc7a522b1e9716e8a1a4a915126f7ccea6f" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/e7/c8/301ff89746e76745b937606df4753c032787c59ecb37dd4d4250bddc8929/dogpile_cache-1.5.0.tar.gz" + sha256 "849c5573c9a38f155cd4173103c702b637ede0361c12e864876877d0cd125eec" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/9d/a4/e44218c2b394e31a6dd0d6b095c4e1f32d0be54c2a4b250032d717647bab/durationpy-0.10.tar.gz" + sha256 "1fa6893409a6e739c9c72334fc65cca1f355dbdd93405d30f726deb5bde42fba" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "junos-eznc" do + url "https://files.pythonhosted.org/packages/bc/a0/54c0ca84bca6233aa25ab01f57117c8fbe1498a05bf85842f1a6c99eb3bf/junos_eznc-2.7.5.tar.gz" + sha256 "d7e395669eb94aeed9bca47a157ac87fa2e5489c075225b0878d0e5b77cd00c3" + end + + resource "jxmlease" do + url "https://files.pythonhosted.org/packages/8d/6a/b2944628e019c753894552c1499bf60e2cef9efea138756c5d66f0d5eb98/jxmlease-1.0.3.tar.gz" + sha256 "612c1575d8a87026dea096bb75acec7302dd69040fa23d9116e71e30d5e0839e" + end + + resource "kerberos" do + url "https://files.pythonhosted.org/packages/39/cd/f98699a6e806b9d974ea1d3376b91f09edcb90415adbf31e3b56ee99ba64/kerberos-1.3.1.tar.gz" + sha256 "cdd046142a4e0060f96a00eb13d82a5d9ebc0f2d7934393ed559bac773460a2c" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/e5/16/b96df223ca7ea4bfa78034b205e0eaf4875bfecb2f119f375fc5232d2061/keystoneauth1-5.12.0.tar.gz" + sha256 "dd113c2f3dcb418d9f761c73b8cd43a96ddfa8a612b51c576822381f39ca4ae8" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/ef/55/3f880ef65f559cbed44a9aa20d3bdbc219a2c3a3bac4a30a513029b03ee9/kubernetes-34.1.0.tar.gz" + sha256 "8fe8edb0b5d290a2f3ac06596b23f87c658977d46b5f8df9d0f4ea83d0003912" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "ncclient" do + url "https://files.pythonhosted.org/packages/c2/fb/29dbb4987f81d7932d8018079bf3e6d1d5cce320d7c2c90e84d3c7dba40c/ncclient-0.7.0.tar.gz" + sha256 "318e8e3e72b1d2a766f3665cabef33436fd25b607da5f15657a199c648a68435" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "ntc-templates" do + url "https://files.pythonhosted.org/packages/d6/0c/decd784b5969ddfed7e41d95baaa309f31c896bd7ed22d3a6d29ec1117a1/ntc_templates-8.1.0.tar.gz" + sha256 "e570a5bb4ee829d62bfdce3fb46045a40aaa176b134aa0db21542d6518ca4be7" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "openshift" do + url "https://files.pythonhosted.org/packages/55/f6/9e2e4935b59726bff3d53da35afba3904fe9ed693efedd6b7bbddff6cc78/openshift-0.13.2.tar.gz" + sha256 "f55789fce56fcbf7e2cd9377a68c4a99ab406074d3324b9abcca98477d101471" + end + + resource "openstacksdk" do + url "https://files.pythonhosted.org/packages/6c/e7/4921e513dc00e2b052b196e4a7055351b74192a680470ab287b2332b0c6a/openstacksdk-4.7.1.tar.gz" + sha256 "23348aa69c6cc6c1ed0e8f03fb42b156519ed8cfcd143e783ef5c1dd800ad9f1" + end + + resource "os-client-config" do + url "https://files.pythonhosted.org/packages/50/cd/352f6f18d1fb90780b95fdc3a668a279bd41d89905d70ee06076b529077c/os_client_config-2.3.0.tar.gz" + sha256 "e16a260f2fd500af14f157b9b7b7d69292ce83b0f8a461ec68ce6a8a42967cbd" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/9d/e9/1725288a94496d7780cd1624d16b86b7ed596960595d5742f051c4b90df5/os_service_types-1.8.0.tar.gz" + sha256 "890ce74f132ca334c2b23f0025112b47c6926da6d28c2f75bcfc0a83dea3603e" + end + + resource "osc-lib" do + url "https://files.pythonhosted.org/packages/7c/63/ea0eda39e1b2c0ca3e9d87798568f881ea7aa90e4f94affb78676215f72d/osc_lib-4.2.0.tar.gz" + sha256 "99718f06a990c1ad6fb9034bbed9655390a2ea83cef71a53781e7e9abd9f20ce" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/03/67/221128a241ab4151ecc5b101de23651e7c08491f7b2edea31744207a23dc/oslo_config-10.0.0.tar.gz" + sha256 "333e675db8c6be7715b3decf78c398ca1138439225aa274632e89314837f6ea3" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/15/a3/d4804bb24e6f8cabcae4925a02ade281c2f8d90e3d0b7b367221cfb65ad8/oslo_context-6.1.0.tar.gz" + sha256 "c1a8d17c79f50c71024d54cc17cc0b01e89dbff258315dc11d7e04e6b1a02ce3" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/c1/74/a2238cfdf6e97ee398b3fc5eda8b0e108be3913494dbef90961ebe38bf23/oslo_i18n-6.6.0.tar.gz" + sha256 "bb5e3becefa2e40488b259f9db12cc5ad894dd309b5b5aca56382ff190c18f5e" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/81/6b/a7f1c1daeadd36f71633fb3ebac9817fcb1f8edfd06d6bdd71384f39010f/oslo_log-7.2.1.tar.gz" + sha256 "01aebabdcf06b62df00e479db99df0c23f6cd24c6500ab3110e604bd059fa8d5" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/d4/ac/119c430df3a86dc6a664fa864f777b4fd5cc16c50caa1ba3dd3bf10f43ae/oslo_serialization-5.8.0.tar.gz" + sha256 "5871a62b23f98cacd5518482941ae6d2a983e2936ed52d543ad08685dc6d2343" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/d9/ec/9f12c8ded6eb7ba0774ea4a0e03bfe6cd35fea4cbc944a826c751bb49500/oslo_utils-9.1.0.tar.gz" + sha256 "01c3875e7cca005b59465c429f467113b5f4b04211cbd534c9ac2f152276d3b3" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "passlib" do + url "https://files.pythonhosted.org/packages/b6/06/9da9ee59a67fae7761aab3ccc84fa4f3f33f125b370f1ccdb915bf967c11/passlib-1.7.4.tar.gz" + sha256 "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "proxmoxer" do + url "https://files.pythonhosted.org/packages/6a/54/dc2919eed681ca31220a9021e35935a3995335069b520279b4d55b9df822/proxmoxer-2.2.0.tar.gz" + sha256 "3ed63a58e5c0822841afdb3801f9d913a4996955c1c54f7319b5842ba2615006" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pynetbox" do + url "https://files.pythonhosted.org/packages/d3/0b/695021a23c373991d07c1e4cb510287a521318cfc4b29f68ebbecb19fcd2/pynetbox-7.5.0.tar.gz" + sha256 "780064c800fb8c079c9828df472203146442ed3dd0b522a28a501204eb00c066" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "pysphere3" do + url "https://files.pythonhosted.org/packages/fa/1e/16cf889e0e38380678631a4afebeeb840cb29f54f11413356770efe29240/pysphere3-0.1.8.tar.gz" + sha256 "c8efe92e7802b59ef67e09fb20b008fc1bd0d253ba97ba689aa892b125283ae1" + end + + resource "pyspnego" do + url "https://files.pythonhosted.org/packages/f9/e4/8b32a91aeba6fbc6943a630c44b2fe038615e5c7dec8814316fafdcf4bf4/pyspnego-0.12.0.tar.gz" + sha256 "e1d9cd3520a87a1d6db8d68783b17edc4e1464eae3d51ead411a51c82dbaae67" + end + + resource "python-consul" do + url "https://files.pythonhosted.org/packages/7f/06/c12ff73cb1059c453603ba5378521e079c3f0ab0f0660c410627daca64b7/python-consul-1.1.0.tar.gz" + sha256 "168f1fa53948047effe4f14d53fc1dab50192e2a2cf7855703f126f469ea11f4" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-keystoneclient" do + url "https://files.pythonhosted.org/packages/94/29/3775d7a722924a72208753a8aa5ddb0a58de24f5a5dd287cc9a0f66038e4/python_keystoneclient-5.7.0.tar.gz" + sha256 "8ce7bf1c8cddca6d7140fc76918b44eddf1d64040a60cb8ff7059136104d4ceb" + end + + resource "python-ldap" do + url "https://files.pythonhosted.org/packages/0c/88/8d2797decc42e1c1cdd926df4f005e938b0643d0d1219c08c2b5ee8ae0c0/python_ldap-3.4.5.tar.gz" + sha256 "b2f6ef1c37fe2c6a5a85212efe71311ee21847766a7d45fcb711f3b270a5f79a" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/57/15/96f2f42df4c1d6873c89a0cae2ba3b98f83273e965421eb11b7dbb257b4d/python_neutronclient-11.6.0.tar.gz" + sha256 "3c6958088d18c8676a10abf9d94b8dbf1a984741cbb988554f216880797e072f" + end + + resource "python-string-utils" do + url "https://files.pythonhosted.org/packages/10/91/8c883b83c7d039ca7e6c8f8a7e154a27fdeddd98d14c10c5ee8fe425b6c0/python-string-utils-1.0.0.tar.gz" + sha256 "dcf9060b03f07647c0a603408dc8b03f807f3b54a05c6e19eb14460256fac0cb" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pywinrm" do + url "https://files.pythonhosted.org/packages/5a/2f/d835c342c4b11e28beaccef74982e7669986c84bf19654c39f53c8b8243c/pywinrm-0.5.0.tar.gz" + sha256 "5428eb1e494af7954546cd4ff15c9ef1a30a75e05b25a39fd606cef22201e9f1" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-credssp" do + url "https://files.pythonhosted.org/packages/bc/c3/de13b8598287440ab1df7eba97b93278d309dffb920f0163a09e089b71ec/requests-credssp-2.0.0.tar.gz" + sha256 "229afe2f6e1c9fabef64fc2bdf2a10e794ca6c4a0c00a687d53fbfaf7b8ee71d" + end + + resource "requests-ntlm" do + url "https://files.pythonhosted.org/packages/15/74/5d4e1815107e9d78c44c3ad04740b00efd1189e5a9ec11e5275b60864e54/requests_ntlm-1.3.0.tar.gz" + sha256 "b29cc2462623dffdf9b88c43e180ccb735b4007228a542220e882c58ae56c668" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "requestsexceptions" do + url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" + sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/ce/10/f699366ce577423cbc3df3280063099054c23df70856465080798c6ebad6/resolvelib-1.0.1.tar.gz" + sha256 "04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/71/a6/34460d81e5534f6d2fc8e8d91ff99a5835fdca53578eac89e4f37b3a7c6d/rich_argparse-1.7.1.tar.gz" + sha256 "d7a493cde94043e41ea68fb43a74405fa178de981bf7b800f7a3bd02ac5c27be" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "scp" do + url "https://files.pythonhosted.org/packages/d6/1c/d213e1c6651d0bd37636b21b1ba9b895f276e8057f882c9f944931e4f002/scp-0.15.0.tar.gz" + sha256 "f1b22e9932123ccf17eebf19e0953c6e9148f589f93d91b872941a696305c83f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shade" do + url "https://files.pythonhosted.org/packages/b0/a6/a83f14eca6f7223319d9d564030bd322ca52c910c34943f38a59ad2a6549/shade-1.33.0.tar.gz" + sha256 "36f6936da93723f34bf99d00bae24aa4cc36125d597392ead8319720035d21e8" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "textfsm" do + url "https://files.pythonhosted.org/packages/9e/87/2a93c2ced2a11fb26cfec3623894a9127b9b67ae3cfdd1778afa5cff576f/textfsm-2.1.0.tar.gz" + sha256 "45c18ff2b7c90163dfdff7e20d3f482514cc7aac26bc2547744e79dfa761e458" + end + + resource "transitions" do + url "https://files.pythonhosted.org/packages/4f/83/9e90f3494057d73c9e6bd8de8488af7c9fa714666ccc2db30fe07d147818/transitions-0.9.3.tar.gz" + sha256 "881fb75bb1654ed55d86060bb067f2c716f8e155f57bb73fd444e53713aafec8" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/49/19/5e5bcd855d808892fe02d49219f97a50f64cd6d8313d75df3494ee97b1a3/wrapt-2.0.0.tar.gz" + sha256 "35a542cc7a962331d0279735c30995b024e852cf40481e384fd63caaa391cbb9" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + resource "yamlordereddictloader" do + url "https://files.pythonhosted.org/packages/23/78/f853b0db6d8f3ea0ae4c648e4504ba376d024c139ba1292a256ce6180dd0/yamlordereddictloader-0.4.2.tar.gz" + sha256 "36af2f6210fcff5da4fc4c12e1d815f973dceb41044e795e1f06115d634bca13" + end + + resource "zabbix-api" do + url "https://files.pythonhosted.org/packages/4a/ce/893d6ab7e978d0c00d9154c0cf385016b862438da069302e7ceac0f6c429/zabbix-api-0.5.6.tar.gz" + sha256 "627ad26769b6831130239182afcb195f64fbf494626bc9eb4b2ac8170de5b775" + end + + def install + ENV["SODIUM_INSTALL"] = "system" + venv = virtualenv_install_with_resources without: "ansible-core" + venv.pip_install_and_link resource("ansible-core") + end + + test do + ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" + (testpath/"playbook.yml").write <<~YAML + --- + - hosts: all + gather_facts: False + tasks: + - name: ping + ping: + YAML + python3 = "python#{Language::Python.major_minor_version libexec/"bin/python"}" + (testpath/"hosts.ini").write [ + "localhost ansible_connection=local", + " ansible_python_interpreter=#{which(python3)}", + "\n", + ].join + system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" + + # Ensure requests[security] is activated + script = "import requests as r; r.get('https://mozilla-modern.badssl.com')" + system libexec/"bin/python", "-c", script + + # Ensure ansible-vault can encrypt/decrypt files. + (testpath/"vault-password.txt").write("12345678") + (testpath/"vault-test-file.txt").write <<~EOS + --- + content: + hello: world + EOS + system bin/"ansible-vault", "encrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + system bin/"ansible-vault", "decrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + + # Check ansible-test is happy with our python version + mkdir "ansible_collections/community/general/" do + output = shell_output("#{bin}/ansible-test sanity --list-tests 2>&1") + assert_match "WARNING: All targets skipped.", output + end + end +end diff --git a/Formula/a/ansible@8.rb b/Formula/a/ansible@8.rb new file mode 100644 index 0000000000000..bc18cb9b098e5 --- /dev/null +++ b/Formula/a/ansible@8.rb @@ -0,0 +1,591 @@ +class AnsibleAT8 < Formula + include Language::Python::Virtualenv + + desc "Automate deployment, configuration, and upgrading" + homepage "https://www.ansible.com/" + url "https://files.pythonhosted.org/packages/90/25/55e09468efe564f3b48c47a7e082bd84d4f0d064af60ac8458eba4667994/ansible-8.7.0.tar.gz" + sha256 "3a5ca5152e4547d590e40b542d76b18dbbe2b36da4edd00a13a7c51a374ff737" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "f004f489b86deb0493906cbb400768209c66dbbfec8e29e5dacc249ce5263324" + sha256 cellar: :any, arm64_sonoma: "4949d0db36fff1aef4e69a9ca49ad6179e9fc980876901066c4af141466d401a" + sha256 cellar: :any, arm64_ventura: "b9f8f6bec6b24d0fee295481e8cc9d8ba4160260ef8da35777b76ded78e22b1a" + sha256 cellar: :any, sonoma: "187330798c85545952dbe8606f44f156f8a49597dad0184ea1ed56a65bbcc47c" + sha256 cellar: :any, ventura: "f1e961e26484e8b7cc8239b71c3a21d9ae6887dd4079065d5a62874092424ee2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c4b4102e16e982331e98d4d4b3077468737c729459ccb00acb850f61577508a" + end + + keg_only :versioned_formula + + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-community-package-release-cycle + disable! date: "2024-12-14", because: :unmaintained + + # `pkgconf` and `rust` are for bcrypt + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "openssl@3" + depends_on "python@3.11" + + uses_from_macos "krb5" + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages extra_packages: %w[apache-libcloud boto3 dnspython docker + junos-eznc jxmlease kerberos ntc-templates openshift + passlib pexpect proxmoxer pysphere3 python-consul + python-neutronclient pywinrm requests-credssp shade zabbix-api] + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/a1/fc/e81a2e2a6e4247444fe632c8ffaff5c1bcc3adf85ae87d08158724f419fd/ansible_core-2.15.12.tar.gz" + sha256 "5fde82cd3928d9857ad880782c644f27d3168b0f25321d5a8d6befa524aa1818" + end + + resource "apache-libcloud" do + url "https://files.pythonhosted.org/packages/1b/45/1a239d9789c75899df8ff53a6b198c1657328f3b333f1711194643d53868/apache-libcloud-3.8.0.tar.gz" + sha256 "75bf4c0b123bc225e24ca95fca1c35be30b19e6bb85feea781404d43c4276c91" + end + + resource "autopage" do + url "https://files.pythonhosted.org/packages/9f/9e/559b0cfdba9f3ed6744d8cbcdbda58880d3695c43c053a31773cefcedde3/autopage-0.5.2.tar.gz" + sha256 "826996d74c5aa9f4b6916195547312ac6384bac3810b8517063f293248257b72" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/e4/7e/d95e7d96d4828e965891af92e43b52a4cd3395dc1c1ef4ee62748d0471d0/bcrypt-4.2.0.tar.gz" + sha256 "cf69eaf5185fd58f268f805b505ce31f9b9fc2d64b376642164e9244540c1221" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/12/c1/1dc34b322d2f022d190c34dd4aa7f1a242d73633c25061bf56bd1319fe05/boto3-1.35.53.tar.gz" + sha256 "f4124548bb831e13504e805f2fbbfcee06df42fffea0655862c6eb9b95d6d1be" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/48/c9/d5a1f5ad4024eda0d5d1b4103d28085c13cf42ca377fc141f7df4ad1cec9/botocore-1.35.53.tar.gz" + sha256 "e610ae076ad1eaed5680d3990493659bbabdffd67b15c61d8373a23e4bc41062" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/c3/38/a0f315319737ecf45b4319a8cd1f3a908e29d9277b46942263292115eee7/cachetools-5.5.0.tar.gz" + sha256 "2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz" + sha256 "bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/3c/1c/213ba67600827d8c8cb2b30f1e5471e298b766505341b7fe7c8486cdc388/cliff-4.7.0.tar.gz" + sha256 "6ca45f8df519bbc0722c61049de7b7e442a465fa7f3f552b96d735fa26fd5b26" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/b1/f8/1d6f1a54378a12acc9e8cc68aa69e2463bbb02f75878da4ad0c5e4d37751/cmd2-2.5.0.tar.gz" + sha256 "36292d144e5fd62549b50e94e5f36514557fb92e615155ac28763ea4bc13b954" + end + + resource "cryptography" do + url "https://files.pythonhosted.org/packages/0d/05/07b55d1fa21ac18c3a8c79f764e2514e6f6a9698f1be44994f5adf0d29db/cryptography-43.0.3.tar.gz" + sha256 "315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805" + end + + resource "debtcollector" do + url "https://files.pythonhosted.org/packages/31/e2/a45b5a620145937529c840df5e499c267997e85de40df27d54424a158d3c/debtcollector-3.0.0.tar.gz" + sha256 "2a8917d25b0e1f1d0d365d3c1c6ecfc7a522b1e9716e8a1a4a915126f7ccea6f" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/81/3b/83ce66995ce658ad63b86f7ca83943c466133108f20edc7056d4e0f41347/dogpile.cache-1.3.3.tar.gz" + sha256 "f84b8ed0b0fb297d151055447fa8dcaf7bae566d4dbdefecdcc1f37662ab588b" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/31/e9/f49c4e7fccb77fa5c43c2480e09a857a78b41e7331a75e128ed5df45c56b/durationpy-0.9.tar.gz" + sha256 "fd3feb0a69a0057d582ef643c355c40d2fa1c942191f914d12203b1a01ac722a" + end + + resource "future" do + url "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz" + sha256 "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a1/37/c854a8b1b1020cf042db3d67577c6f84cd1e8ff6515e4f5498ae9e444ea5/google_auth-2.35.0.tar.gz" + sha256 "f4c64ed4e01e8e8b646ef34c018f8bf3338df0c8e37d8b3bba40e7f574a3278a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "junos-eznc" do + url "https://files.pythonhosted.org/packages/52/28/05d6d7a15e231b91f2e3133f29ab235f7798393d30a39a8611a12a90cf55/junos-eznc-2.7.2.tar.gz" + sha256 "7c7e6f8e9bb9d0d034ffaeb592e400dd114f03db44c3bb608c951e88483c825d" + end + + resource "jxmlease" do + url "https://files.pythonhosted.org/packages/8d/6a/b2944628e019c753894552c1499bf60e2cef9efea138756c5d66f0d5eb98/jxmlease-1.0.3.tar.gz" + sha256 "612c1575d8a87026dea096bb75acec7302dd69040fa23d9116e71e30d5e0839e" + end + + resource "kerberos" do + url "https://files.pythonhosted.org/packages/39/cd/f98699a6e806b9d974ea1d3376b91f09edcb90415adbf31e3b56ee99ba64/kerberos-1.3.1.tar.gz" + sha256 "cdd046142a4e0060f96a00eb13d82a5d9ebc0f2d7934393ed559bac773460a2c" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/09/9e/c11b6f5b97f0a5671b61c4908ecae0c6fb879323699c116a8a9040fff6f0/keystoneauth1-5.8.0.tar.gz" + sha256 "3157c212e121164de64d63e5ef7e1daad2bd3649a68de1e971b76877019ef1c4" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/7e/bd/ffcd3104155b467347cd9b3a64eb24182e459579845196b3a200569c8912/kubernetes-31.0.0.tar.gz" + sha256 "28945de906c8c259c1ebe62703b56a03b714049372196f854105afe4e6d014c0" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "ncclient" do + url "https://files.pythonhosted.org/packages/6d/db/887f9002c3e6c8b838ec7027f9d8ac36337f44bcd146c922e3deee60e55e/ncclient-0.6.15.tar.gz" + sha256 "6757cb41bc9160dfe47f22f5de8cf2f1adf22f27463fb50453cc415ab96773d8" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "netifaces" do + url "https://files.pythonhosted.org/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz" + sha256 "043a79146eb2907edf439899f262b3dfe41717d34124298ed281139a8b93ca32" + end + + resource "ntc-templates" do + url "https://files.pythonhosted.org/packages/29/c1/96131cd0ce7eb614d07efb8441dd4b9a65159c7cf0dd5f9855c5dc124e30/ntc_templates-7.3.0.tar.gz" + sha256 "6ac605fe745b5757e0ae703c5561e0181527402c62b054d042cf622a3ab0e5f7" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "openshift" do + url "https://files.pythonhosted.org/packages/55/f6/9e2e4935b59726bff3d53da35afba3904fe9ed693efedd6b7bbddff6cc78/openshift-0.13.2.tar.gz" + sha256 "f55789fce56fcbf7e2cd9377a68c4a99ab406074d3324b9abcca98477d101471" + end + + resource "openstacksdk" do + url "https://files.pythonhosted.org/packages/32/7b/42529e0014cf5c3e1a4f4c07ed43c1df357d57f5f61ca15cbdbfdd229654/openstacksdk-4.1.0.tar.gz" + sha256 "ccac9b158e3d36b959a3bdce71bd4f883d7758fef6856841c855ff2b22c941ea" + end + + resource "os-client-config" do + url "https://files.pythonhosted.org/packages/58/be/ba2e4d71dd57653c8fefe8577ade06bf5f87826e835b3c7d5bb513225227/os-client-config-2.1.0.tar.gz" + sha256 "abc38a351f8c006d34f7ee5f3f648de5e3ecf6455cc5d76cfd889d291cdf3f4e" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/58/3f/09e93eb484b69d2a0d31361962fb667591a850630c8ce47bb177324910ec/os-service-types-1.7.0.tar.gz" + sha256 "31800299a82239363995b91f1ebf9106ac7758542a1e4ef6dc737a5932878c6c" + end + + resource "osc-lib" do + url "https://files.pythonhosted.org/packages/56/42/a85b60f90efd29bade74d2e4fee287339b8a5b20377736fd2aac7378492d/osc-lib-3.1.0.tar.gz" + sha256 "ef085249a8764b6f29d404eda566a261a3003502aa431b39ffd54307ee103e19" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/42/92/f53acc4f8bb37ba50722b9ba03f53fd507adc434d821552d79d34ca87d2f/oslo.config-9.6.0.tar.gz" + sha256 "9f05ef70e48d9a61a8d0c9bed389da24f2ef5a89df5b6e8deb7c741d6113667e" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/41/3a/d217eb9c3f844aa6e955bf6d85cc9207b2d93e42fc47aff77fc1a778fc72/oslo.context-5.6.0.tar.gz" + sha256 "5222c32636be070a230df9d3141a0b27a95f0a3b6978f4c1485bcada47a4c3cb" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/75/16/743dbdaa3ddf05206c07965e89889295ada095d7b91954445f3e6cc7157e/oslo.i18n-6.4.0.tar.gz" + sha256 "66e04c041e9ff17d07e13ec7f48295fbc36169143c72ca2352a3efcc98e7b608" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/69/dd/7d461de2e089c0ddd56e8834a17f1b4efaf2e6ae495acf63c0ed558780b7/oslo.log-6.1.2.tar.gz" + sha256 "f768047df9d706c484dd6665dcbbea289021d48cb7ce5abf7a1f69a09491f5fe" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/3d/99/5d314298d154a58343050b4d8bb972cbbbb728ef943b57aef7f247c372f8/oslo.serialization-5.5.0.tar.gz" + sha256 "9e752fc5d8a975956728dd96a82186783b3fefcacbb3553acd933058861e15a6" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/80/67/160e651bbd4c919ea308d63f5cc6c2b82808f0e118abb9f5f7ebca32ca60/oslo.utils-7.3.0.tar.gz" + sha256 "59a5d3e4e7bbc78d801ccebc2b823e429b624c12bb6e3b6e76f71c29f2bf21df" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1b/0f/c00296e36ff7485935b83d466c4f2cf5934b84b0ad14e81796e1d9d3609b/paramiko-3.5.0.tar.gz" + sha256 "ad11e540da4f55cedda52931f1a3f812a8238a7af7f62a60de538cd80bb28124" + end + + resource "passlib" do + url "https://files.pythonhosted.org/packages/b6/06/9da9ee59a67fae7761aab3ccc84fa4f3f33f125b370f1ccdb915bf967c11/passlib-1.7.4.tar.gz" + sha256 "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/3b/8a/de4dc1a6098621781c266b3fb3964009af1e9023527180cb8a3b0dd9d09e/prettytable-3.12.0.tar.gz" + sha256 "f04b3e1ba35747ac86e96ec33e3bb9748ce08e254dc2a1c6253945901beec804" + end + + resource "proxmoxer" do + url "https://files.pythonhosted.org/packages/e3/99/eb6129acd6552178b5fb20d101e43f1c78695140f1c3c2769f5dcb37a56d/proxmoxer-2.1.0.tar.gz" + sha256 "d92993782e74ed8a76ff355dc050f58aa039fa697f9349a68e643552bd0fa62e" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz" + sha256 "c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/8c/d5/e5aeee5387091148a19e1145f63606619cb5f20b83fccb63efae6474e7b2/pyparsing-3.2.0.tar.gz" + sha256 "cbf74e27246d595d9a74b186b810f6fbb86726dbf3b9532efb343f6d7294fe9c" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "pysphere3" do + url "https://files.pythonhosted.org/packages/fa/1e/16cf889e0e38380678631a4afebeeb840cb29f54f11413356770efe29240/pysphere3-0.1.8.tar.gz" + sha256 "c8efe92e7802b59ef67e09fb20b008fc1bd0d253ba97ba689aa892b125283ae1" + end + + resource "pyspnego" do + url "https://files.pythonhosted.org/packages/46/f5/1f938a781742d18475ac43a101ec8a9499e1655da0984e08b59e20012c04/pyspnego-0.11.1.tar.gz" + sha256 "e92ed8b0a62765b9d6abbb86a48cf871228ddb97678598dc01c9c39a626823f6" + end + + resource "python-consul" do + url "https://files.pythonhosted.org/packages/7f/06/c12ff73cb1059c453603ba5378521e079c3f0ab0f0660c410627daca64b7/python-consul-1.1.0.tar.gz" + sha256 "168f1fa53948047effe4f14d53fc1dab50192e2a2cf7855703f126f469ea11f4" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-keystoneclient" do + url "https://files.pythonhosted.org/packages/ea/5e/2d6700c6e36c288ec7e6d24ad49ef400311e8d2b2d926b16906f12c1cb26/python-keystoneclient-5.5.0.tar.gz" + sha256 "c2f5934f95576936c98e45bf599ad48bcb0ac451593e5f8344ebf52cb0f411f5" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/6e/b2/b2cb8b08085e419907a28932ca55a2d54b71bd41aedb10f9faf03410e218/python-neutronclient-11.3.1.tar.gz" + sha256 "53cd9923f43a3b0772a40e3561f74655adc8038f90261ab3de05b6211d12edcb" + end + + resource "python-string-utils" do + url "https://files.pythonhosted.org/packages/10/91/8c883b83c7d039ca7e6c8f8a7e154a27fdeddd98d14c10c5ee8fe425b6c0/python-string-utils-1.0.0.tar.gz" + sha256 "dcf9060b03f07647c0a603408dc8b03f807f3b54a05c6e19eb14460256fac0cb" + end + + resource "pywinrm" do + url "https://files.pythonhosted.org/packages/5a/2f/d835c342c4b11e28beaccef74982e7669986c84bf19654c39f53c8b8243c/pywinrm-0.5.0.tar.gz" + sha256 "5428eb1e494af7954546cd4ff15c9ef1a30a75e05b25a39fd606cef22201e9f1" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "requests-credssp" do + url "https://files.pythonhosted.org/packages/bc/c3/de13b8598287440ab1df7eba97b93278d309dffb920f0163a09e089b71ec/requests-credssp-2.0.0.tar.gz" + sha256 "229afe2f6e1c9fabef64fc2bdf2a10e794ca6c4a0c00a687d53fbfaf7b8ee71d" + end + + resource "requests-ntlm" do + url "https://files.pythonhosted.org/packages/15/74/5d4e1815107e9d78c44c3ad04740b00efd1189e5a9ec11e5275b60864e54/requests_ntlm-1.3.0.tar.gz" + sha256 "b29cc2462623dffdf9b88c43e180ccb735b4007228a542220e882c58ae56c668" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "requestsexceptions" do + url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" + sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/ce/10/f699366ce577423cbc3df3280063099054c23df70856465080798c6ebad6/resolvelib-1.0.1.tar.gz" + sha256 "04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/aa/65/7d973b89c4d2351d7fb232c2e452547ddfa243e93131e7cfa766da627b52/rsa-4.9.tar.gz" + sha256 "e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "scp" do + url "https://files.pythonhosted.org/packages/d6/1c/d213e1c6651d0bd37636b21b1ba9b895f276e8057f882c9f944931e4f002/scp-0.15.0.tar.gz" + sha256 "f1b22e9932123ccf17eebf19e0953c6e9148f589f93d91b872941a696305c83f" + end + + resource "shade" do + url "https://files.pythonhosted.org/packages/b0/a6/a83f14eca6f7223319d9d564030bd322ca52c910c34943f38a59ad2a6549/shade-1.33.0.tar.gz" + sha256 "36f6936da93723f34bf99d00bae24aa4cc36125d597392ead8319720035d21e8" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/c4/59/f8aefa21020054f553bf7e3b405caec7f8d1f432d9cb47e34aaa244d8d03/stevedore-5.3.0.tar.gz" + sha256 "9a64265f4060312828151c204efbe9b7a9852a0d9228756344dbc7e4023e375a" + end + + resource "textfsm" do + url "https://files.pythonhosted.org/packages/b8/bf/c9147d29c5a3ff4c1c876e16ea02f6d4e4f35ba1bcbb2ac80a254924f0aa/textfsm-1.1.3.tar.gz" + sha256 "577ef278a9237f5341ae9b682947cefa4a2c1b24dbe486f94f2c95addc6504b5" + end + + resource "transitions" do + url "https://files.pythonhosted.org/packages/4a/82/4dfbb3cf62501cb3e8d026cbeb2d5cdeaf5bfe916ea50d3a9435faa2b0e1/transitions-0.9.2.tar.gz" + sha256 "2f8490dbdbd419366cef1516032ab06d07ccb5839ef54905e842a472692d4204" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/e1/34/943888654477a574a86a98e9896bae89c7aa15078ec29f490fef2f1e5384/tzdata-2024.2.tar.gz" + sha256 "7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz" + sha256 "3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/4c/063a912e20bcef7124e0df97282a8af3ff3e4b603ce84c481d6d7346be0a/wrapt-1.16.0.tar.gz" + sha256 "5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + resource "yamlordereddictloader" do + url "https://files.pythonhosted.org/packages/23/78/f853b0db6d8f3ea0ae4c648e4504ba376d024c139ba1292a256ce6180dd0/yamlordereddictloader-0.4.2.tar.gz" + sha256 "36af2f6210fcff5da4fc4c12e1d815f973dceb41044e795e1f06115d634bca13" + end + + resource "zabbix-api" do + url "https://files.pythonhosted.org/packages/4a/ce/893d6ab7e978d0c00d9154c0cf385016b862438da069302e7ceac0f6c429/zabbix-api-0.5.6.tar.gz" + sha256 "627ad26769b6831130239182afcb195f64fbf494626bc9eb4b2ac8170de5b775" + end + + def python3 + "python3.11" + end + + def install + venv = virtualenv_create(libexec, python3) + skipped = %w[ansible-core junos-eznc] + venv.pip_install resources.reject { |r| skipped.include? r.name } + venv.pip_install_and_link resource("ansible-core") + venv.pip_install_and_link buildpath + end + + test do + ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" + (testpath/"playbook.yml").write <<~YAML + --- + - hosts: all + gather_facts: False + tasks: + - name: ping + ping: + YAML + (testpath/"hosts.ini").write [ + "localhost ansible_connection=local", + " ansible_python_interpreter=#{Formula["python@3.11"].opt_bin}/python3.11", + "\n", + ].join + system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" + + # Ensure requests[security] is activated + script = "import requests as r; r.get('https://mozilla-modern.badssl.com')" + system libexec/"bin/python", "-c", script + + # Ensure ansible-vault can encrypt/decrypt files. + (testpath/"vault-password.txt").write("12345678") + (testpath/"vault-test-file.txt").write <<~EOS + --- + content: + hello: world + EOS + system bin/"ansible-vault", "encrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + system bin/"ansible-vault", "decrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + + # Check ansible-test is happy with our python version + mkdir "ansible_collections/community/general/" do + output = shell_output("#{bin}/ansible-test sanity --list-tests 2>&1") + assert_match "WARNING: All targets skipped.", output + end + end +end diff --git a/Formula/a/ansible@9.rb b/Formula/a/ansible@9.rb new file mode 100644 index 0000000000000..a8aa9849f27be --- /dev/null +++ b/Formula/a/ansible@9.rb @@ -0,0 +1,659 @@ +class AnsibleAT9 < Formula + include Language::Python::Virtualenv + + desc "Automate deployment, configuration, and upgrading" + homepage "https://www.ansible.com/" + url "https://files.pythonhosted.org/packages/d1/63/a136e8c5ff5768c26edb2098dca116bd9cf430d8921fbbc4e199dca51655/ansible-9.13.0.tar.gz" + sha256 "b389a97d1e85c2b2ad6ace9e94f410111f69cc5aa3845c930c873b34c0ddd6e2" + license "GPL-3.0-or-later" + revision 3 + + bottle do + sha256 cellar: :any, arm64_tahoe: "a7c7e3e76269ad310333c8da3b55b190ad729a875ee01812c310508792997f8a" + sha256 cellar: :any, arm64_sequoia: "2a854f10c05a023c4dd993a26dcffcda031e1e27e5d6c68703869a57ddd63a85" + sha256 cellar: :any, arm64_sonoma: "4163000e583f8b5c9781ec1bcb37cb42056bee496b671522ae70474468c3e712" + sha256 cellar: :any, sonoma: "60f3c61e6427a0feede4dc5b2e2ca8e58ad88a77c538d108d9d3c84f6b060acc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4704d185ad03c1c53a09eeaef1e4b53882b44c190a100dae02a883ccb0486f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "926e81b0883f75eeb36abbcf939960675fdd079cb5b5230fb6500ffd8249bd48" + end + + keg_only :versioned_formula + + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-community-package-release-cycle + deprecate! date: "2024-11-30", because: :unmaintained + + # `pkgconf` and `rust` are for bcrypt + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "libsodium" # for pynacl + depends_on "libssh" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "python@3.12" # must be 3.10-3.12 + + uses_from_macos "krb5" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + uses_from_macos "openldap" # for python-ldap + + # passlib doesn't work with bcrypt v5+: https://github.com/ansible/ansible/issues/85919 + pypi_packages exclude_packages: %w[certifi gnureadline], + extra_packages: %w[ansible-pylibssh apache-libcloud bcrypt<5 boto3 dnspython docker + fqdn junos-eznc jxmlease kerberos ntc-templates openshift + passlib pexpect proxmoxer pynetbox pysphere3 python-consul + python-ldap python-neutronclient pytz pywinrm requests-credssp + shade zabbix-api] + + # pyinotify is linux-only dependency + resource "pyinotify" do + on_linux do + url "https://files.pythonhosted.org/packages/e3/c0/fd5b18dde17c1249658521f69598f3252f11d9d7a980c5be8619970646e1/pyinotify-0.9.6.tar.gz" + sha256 "9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4" + end + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/de/5c/ac61c1444b36b07bfde70dea95beb5a89525b11c92f6e7ef8b87e3ba0248/ansible_core-2.16.14.tar.gz" + sha256 "80279fffd98686badfaa32e1ec785d98a6df1b2fc1e4097dec0597640d746415" + end + + resource "ansible-pylibssh" do + url "https://files.pythonhosted.org/packages/68/6d/93b13182acd29632ef3ab58650fc5727936942e2ad642a48f6a5e12aebb4/ansible-pylibssh-1.3.0.tar.gz" + sha256 "243ea1b0962b0b6b1e717ac0e69dac9636e61ec65b37260c317b2360c6e30ca7" + end + + resource "apache-libcloud" do + url "https://files.pythonhosted.org/packages/1b/45/1a239d9789c75899df8ff53a6b198c1657328f3b333f1711194643d53868/apache-libcloud-3.8.0.tar.gz" + sha256 "75bf4c0b123bc225e24ca95fca1c35be30b19e6bb85feea781404d43c4276c91" + + # Backport newer setuptools/wheel version + patch do + url "https://github.com/apache/libcloud/commit/a2114923adcaee6b022b43410db59df5d7e53c26.patch?full_index=1" + sha256 "b2b07919f7edbc346a16cfe8571ddbfb232e2b33ed32be18bf85e9ac4ec24d30" + end + end + + resource "autopage" do + url "https://files.pythonhosted.org/packages/9f/9e/559b0cfdba9f3ed6744d8cbcdbda58880d3695c43c053a31773cefcedde3/autopage-0.5.2.tar.gz" + sha256 "826996d74c5aa9f4b6916195547312ac6384bac3810b8517063f293248257b72" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/41/e1/a4c1f27d58bee960d4323251d016358547c40bc74c5460e426565d828bc4/boto3-1.40.60.tar.gz" + sha256 "fd3fa9de730c0f4d8a584d6b5313755923a9e181496fa6b09bbf78011e6c2ab3" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ea/f7/5313e9f84c962af63e05a0c23b51134b5288b198fa0023cf9dbe1b964504/botocore-1.40.60.tar.gz" + sha256 "85443f1829d9240d16ba346781956ebcd104dd8e91742c2901a9b2ace198a829" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/8d/43/6974bae8a54e8e49aea448f2897ba1af4d261b95328a3cc112fa0e290b1a/cliff-4.11.0.tar.gz" + sha256 "aa33c11ac2fecdf2d1eaffea9d5d0eb4584b8e777673bb55d42a693e34ccc429" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/75/68/4bf43d284e41c01c6011146e5c2824aa6f17a3bb1ef10ba3dbbae5cf31dc/cmd2-2.7.0.tar.gz" + sha256 "81d8135b46210e1d03a5a810baf859069a62214788ceeec3588f44eed86fbeeb" + end + + resource "cryptography" do + url "https://files.pythonhosted.org/packages/9f/33/c00162f49c0e2fe8064a62cb92b93e50c74a72bc370ab92f86112b33ff62/cryptography-46.0.3.tar.gz" + sha256 "a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1" + end + + resource "debtcollector" do + url "https://files.pythonhosted.org/packages/31/e2/a45b5a620145937529c840df5e499c267997e85de40df27d54424a158d3c/debtcollector-3.0.0.tar.gz" + sha256 "2a8917d25b0e1f1d0d365d3c1c6ecfc7a522b1e9716e8a1a4a915126f7ccea6f" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/e7/c8/301ff89746e76745b937606df4753c032787c59ecb37dd4d4250bddc8929/dogpile_cache-1.5.0.tar.gz" + sha256 "849c5573c9a38f155cd4173103c702b637ede0361c12e864876877d0cd125eec" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/9d/a4/e44218c2b394e31a6dd0d6b095c4e1f32d0be54c2a4b250032d717647bab/durationpy-0.10.tar.gz" + sha256 "1fa6893409a6e739c9c72334fc65cca1f355dbdd93405d30f726deb5bde42fba" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "junos-eznc" do + url "https://files.pythonhosted.org/packages/bc/a0/54c0ca84bca6233aa25ab01f57117c8fbe1498a05bf85842f1a6c99eb3bf/junos_eznc-2.7.5.tar.gz" + sha256 "d7e395669eb94aeed9bca47a157ac87fa2e5489c075225b0878d0e5b77cd00c3" + end + + resource "jxmlease" do + url "https://files.pythonhosted.org/packages/8d/6a/b2944628e019c753894552c1499bf60e2cef9efea138756c5d66f0d5eb98/jxmlease-1.0.3.tar.gz" + sha256 "612c1575d8a87026dea096bb75acec7302dd69040fa23d9116e71e30d5e0839e" + end + + resource "kerberos" do + url "https://files.pythonhosted.org/packages/39/cd/f98699a6e806b9d974ea1d3376b91f09edcb90415adbf31e3b56ee99ba64/kerberos-1.3.1.tar.gz" + sha256 "cdd046142a4e0060f96a00eb13d82a5d9ebc0f2d7934393ed559bac773460a2c" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/e5/16/b96df223ca7ea4bfa78034b205e0eaf4875bfecb2f119f375fc5232d2061/keystoneauth1-5.12.0.tar.gz" + sha256 "dd113c2f3dcb418d9f761c73b8cd43a96ddfa8a612b51c576822381f39ca4ae8" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/ef/55/3f880ef65f559cbed44a9aa20d3bdbc219a2c3a3bac4a30a513029b03ee9/kubernetes-34.1.0.tar.gz" + sha256 "8fe8edb0b5d290a2f3ac06596b23f87c658977d46b5f8df9d0f4ea83d0003912" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "ncclient" do + url "https://files.pythonhosted.org/packages/c2/fb/29dbb4987f81d7932d8018079bf3e6d1d5cce320d7c2c90e84d3c7dba40c/ncclient-0.7.0.tar.gz" + sha256 "318e8e3e72b1d2a766f3665cabef33436fd25b607da5f15657a199c648a68435" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "ntc-templates" do + url "https://files.pythonhosted.org/packages/d6/0c/decd784b5969ddfed7e41d95baaa309f31c896bd7ed22d3a6d29ec1117a1/ntc_templates-8.1.0.tar.gz" + sha256 "e570a5bb4ee829d62bfdce3fb46045a40aaa176b134aa0db21542d6518ca4be7" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "openshift" do + url "https://files.pythonhosted.org/packages/55/f6/9e2e4935b59726bff3d53da35afba3904fe9ed693efedd6b7bbddff6cc78/openshift-0.13.2.tar.gz" + sha256 "f55789fce56fcbf7e2cd9377a68c4a99ab406074d3324b9abcca98477d101471" + end + + resource "openstacksdk" do + url "https://files.pythonhosted.org/packages/6c/e7/4921e513dc00e2b052b196e4a7055351b74192a680470ab287b2332b0c6a/openstacksdk-4.7.1.tar.gz" + sha256 "23348aa69c6cc6c1ed0e8f03fb42b156519ed8cfcd143e783ef5c1dd800ad9f1" + end + + resource "os-client-config" do + url "https://files.pythonhosted.org/packages/50/cd/352f6f18d1fb90780b95fdc3a668a279bd41d89905d70ee06076b529077c/os_client_config-2.3.0.tar.gz" + sha256 "e16a260f2fd500af14f157b9b7b7d69292ce83b0f8a461ec68ce6a8a42967cbd" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/9d/e9/1725288a94496d7780cd1624d16b86b7ed596960595d5742f051c4b90df5/os_service_types-1.8.0.tar.gz" + sha256 "890ce74f132ca334c2b23f0025112b47c6926da6d28c2f75bcfc0a83dea3603e" + end + + resource "osc-lib" do + url "https://files.pythonhosted.org/packages/7c/63/ea0eda39e1b2c0ca3e9d87798568f881ea7aa90e4f94affb78676215f72d/osc_lib-4.2.0.tar.gz" + sha256 "99718f06a990c1ad6fb9034bbed9655390a2ea83cef71a53781e7e9abd9f20ce" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/03/67/221128a241ab4151ecc5b101de23651e7c08491f7b2edea31744207a23dc/oslo_config-10.0.0.tar.gz" + sha256 "333e675db8c6be7715b3decf78c398ca1138439225aa274632e89314837f6ea3" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/15/a3/d4804bb24e6f8cabcae4925a02ade281c2f8d90e3d0b7b367221cfb65ad8/oslo_context-6.1.0.tar.gz" + sha256 "c1a8d17c79f50c71024d54cc17cc0b01e89dbff258315dc11d7e04e6b1a02ce3" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/c1/74/a2238cfdf6e97ee398b3fc5eda8b0e108be3913494dbef90961ebe38bf23/oslo_i18n-6.6.0.tar.gz" + sha256 "bb5e3becefa2e40488b259f9db12cc5ad894dd309b5b5aca56382ff190c18f5e" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/81/6b/a7f1c1daeadd36f71633fb3ebac9817fcb1f8edfd06d6bdd71384f39010f/oslo_log-7.2.1.tar.gz" + sha256 "01aebabdcf06b62df00e479db99df0c23f6cd24c6500ab3110e604bd059fa8d5" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/d4/ac/119c430df3a86dc6a664fa864f777b4fd5cc16c50caa1ba3dd3bf10f43ae/oslo_serialization-5.8.0.tar.gz" + sha256 "5871a62b23f98cacd5518482941ae6d2a983e2936ed52d543ad08685dc6d2343" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/d9/ec/9f12c8ded6eb7ba0774ea4a0e03bfe6cd35fea4cbc944a826c751bb49500/oslo_utils-9.1.0.tar.gz" + sha256 "01c3875e7cca005b59465c429f467113b5f4b04211cbd534c9ac2f152276d3b3" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "passlib" do + url "https://files.pythonhosted.org/packages/b6/06/9da9ee59a67fae7761aab3ccc84fa4f3f33f125b370f1ccdb915bf967c11/passlib-1.7.4.tar.gz" + sha256 "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "proxmoxer" do + url "https://files.pythonhosted.org/packages/6a/54/dc2919eed681ca31220a9021e35935a3995335069b520279b4d55b9df822/proxmoxer-2.2.0.tar.gz" + sha256 "3ed63a58e5c0822841afdb3801f9d913a4996955c1c54f7319b5842ba2615006" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pynetbox" do + url "https://files.pythonhosted.org/packages/d3/0b/695021a23c373991d07c1e4cb510287a521318cfc4b29f68ebbecb19fcd2/pynetbox-7.5.0.tar.gz" + sha256 "780064c800fb8c079c9828df472203146442ed3dd0b522a28a501204eb00c066" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "pysphere3" do + url "https://files.pythonhosted.org/packages/fa/1e/16cf889e0e38380678631a4afebeeb840cb29f54f11413356770efe29240/pysphere3-0.1.8.tar.gz" + sha256 "c8efe92e7802b59ef67e09fb20b008fc1bd0d253ba97ba689aa892b125283ae1" + end + + resource "pyspnego" do + url "https://files.pythonhosted.org/packages/f9/e4/8b32a91aeba6fbc6943a630c44b2fe038615e5c7dec8814316fafdcf4bf4/pyspnego-0.12.0.tar.gz" + sha256 "e1d9cd3520a87a1d6db8d68783b17edc4e1464eae3d51ead411a51c82dbaae67" + end + + resource "python-consul" do + url "https://files.pythonhosted.org/packages/7f/06/c12ff73cb1059c453603ba5378521e079c3f0ab0f0660c410627daca64b7/python-consul-1.1.0.tar.gz" + sha256 "168f1fa53948047effe4f14d53fc1dab50192e2a2cf7855703f126f469ea11f4" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-keystoneclient" do + url "https://files.pythonhosted.org/packages/94/29/3775d7a722924a72208753a8aa5ddb0a58de24f5a5dd287cc9a0f66038e4/python_keystoneclient-5.7.0.tar.gz" + sha256 "8ce7bf1c8cddca6d7140fc76918b44eddf1d64040a60cb8ff7059136104d4ceb" + end + + resource "python-ldap" do + url "https://files.pythonhosted.org/packages/0c/88/8d2797decc42e1c1cdd926df4f005e938b0643d0d1219c08c2b5ee8ae0c0/python_ldap-3.4.5.tar.gz" + sha256 "b2f6ef1c37fe2c6a5a85212efe71311ee21847766a7d45fcb711f3b270a5f79a" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/57/15/96f2f42df4c1d6873c89a0cae2ba3b98f83273e965421eb11b7dbb257b4d/python_neutronclient-11.6.0.tar.gz" + sha256 "3c6958088d18c8676a10abf9d94b8dbf1a984741cbb988554f216880797e072f" + end + + resource "python-string-utils" do + url "https://files.pythonhosted.org/packages/10/91/8c883b83c7d039ca7e6c8f8a7e154a27fdeddd98d14c10c5ee8fe425b6c0/python-string-utils-1.0.0.tar.gz" + sha256 "dcf9060b03f07647c0a603408dc8b03f807f3b54a05c6e19eb14460256fac0cb" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pywinrm" do + url "https://files.pythonhosted.org/packages/5a/2f/d835c342c4b11e28beaccef74982e7669986c84bf19654c39f53c8b8243c/pywinrm-0.5.0.tar.gz" + sha256 "5428eb1e494af7954546cd4ff15c9ef1a30a75e05b25a39fd606cef22201e9f1" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-credssp" do + url "https://files.pythonhosted.org/packages/bc/c3/de13b8598287440ab1df7eba97b93278d309dffb920f0163a09e089b71ec/requests-credssp-2.0.0.tar.gz" + sha256 "229afe2f6e1c9fabef64fc2bdf2a10e794ca6c4a0c00a687d53fbfaf7b8ee71d" + end + + resource "requests-ntlm" do + url "https://files.pythonhosted.org/packages/15/74/5d4e1815107e9d78c44c3ad04740b00efd1189e5a9ec11e5275b60864e54/requests_ntlm-1.3.0.tar.gz" + sha256 "b29cc2462623dffdf9b88c43e180ccb735b4007228a542220e882c58ae56c668" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "requestsexceptions" do + url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" + sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/ce/10/f699366ce577423cbc3df3280063099054c23df70856465080798c6ebad6/resolvelib-1.0.1.tar.gz" + sha256 "04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/71/a6/34460d81e5534f6d2fc8e8d91ff99a5835fdca53578eac89e4f37b3a7c6d/rich_argparse-1.7.1.tar.gz" + sha256 "d7a493cde94043e41ea68fb43a74405fa178de981bf7b800f7a3bd02ac5c27be" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "scp" do + url "https://files.pythonhosted.org/packages/d6/1c/d213e1c6651d0bd37636b21b1ba9b895f276e8057f882c9f944931e4f002/scp-0.15.0.tar.gz" + sha256 "f1b22e9932123ccf17eebf19e0953c6e9148f589f93d91b872941a696305c83f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shade" do + url "https://files.pythonhosted.org/packages/b0/a6/a83f14eca6f7223319d9d564030bd322ca52c910c34943f38a59ad2a6549/shade-1.33.0.tar.gz" + sha256 "36f6936da93723f34bf99d00bae24aa4cc36125d597392ead8319720035d21e8" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "textfsm" do + url "https://files.pythonhosted.org/packages/9e/87/2a93c2ced2a11fb26cfec3623894a9127b9b67ae3cfdd1778afa5cff576f/textfsm-2.1.0.tar.gz" + sha256 "45c18ff2b7c90163dfdff7e20d3f482514cc7aac26bc2547744e79dfa761e458" + end + + resource "transitions" do + url "https://files.pythonhosted.org/packages/4f/83/9e90f3494057d73c9e6bd8de8488af7c9fa714666ccc2db30fe07d147818/transitions-0.9.3.tar.gz" + sha256 "881fb75bb1654ed55d86060bb067f2c716f8e155f57bb73fd444e53713aafec8" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/49/19/5e5bcd855d808892fe02d49219f97a50f64cd6d8313d75df3494ee97b1a3/wrapt-2.0.0.tar.gz" + sha256 "35a542cc7a962331d0279735c30995b024e852cf40481e384fd63caaa391cbb9" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + resource "yamlordereddictloader" do + url "https://files.pythonhosted.org/packages/23/78/f853b0db6d8f3ea0ae4c648e4504ba376d024c139ba1292a256ce6180dd0/yamlordereddictloader-0.4.2.tar.gz" + sha256 "36af2f6210fcff5da4fc4c12e1d815f973dceb41044e795e1f06115d634bca13" + end + + resource "zabbix-api" do + url "https://files.pythonhosted.org/packages/4a/ce/893d6ab7e978d0c00d9154c0cf385016b862438da069302e7ceac0f6c429/zabbix-api-0.5.6.tar.gz" + sha256 "627ad26769b6831130239182afcb195f64fbf494626bc9eb4b2ac8170de5b775" + end + + def install + venv = virtualenv_install_with_resources without: "ansible-core" + venv.pip_install_and_link resource("ansible-core") + end + + test do + ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" + (testpath/"playbook.yml").write <<~YAML + --- + - hosts: all + gather_facts: False + tasks: + - name: ping + ping: + YAML + python3 = "python#{Language::Python.major_minor_version libexec/"bin/python"}" + (testpath/"hosts.ini").write [ + "localhost ansible_connection=local", + " ansible_python_interpreter=#{which(python3)}", + "\n", + ].join + system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" + + # Ensure requests[security] is activated + script = "import requests as r; r.get('https://mozilla-modern.badssl.com')" + system libexec/"bin/python", "-c", script + + # Ensure ansible-vault can encrypt/decrypt files. + (testpath/"vault-password.txt").write("12345678") + (testpath/"vault-test-file.txt").write <<~EOS + --- + content: + hello: world + EOS + system bin/"ansible-vault", "encrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + system bin/"ansible-vault", "decrypt", + "--vault-password-file", testpath/"vault-password.txt", + testpath/"vault-test-file.txt" + + # Check ansible-test is happy with our python version + mkdir "ansible_collections/community/general/" do + output = shell_output("#{bin}/ansible-test sanity --list-tests 2>&1") + assert_match "WARNING: All targets skipped.", output + end + end +end diff --git a/Formula/a/ansifilter.rb b/Formula/a/ansifilter.rb new file mode 100644 index 0000000000000..974084844f7ef --- /dev/null +++ b/Formula/a/ansifilter.rb @@ -0,0 +1,35 @@ +class Ansifilter < Formula + desc "Strip or convert ANSI codes into HTML, (La)Tex, RTF, or BBCode" + homepage "http://andre-simon.de/doku/ansifilter/en/ansifilter.php" + url "http://andre-simon.de/zip/ansifilter-2.22.tar.bz2" + sha256 "ccff41ca740b813bf9103868b5000f4243d32a75304ea929a214c49b943ecc93" + license "GPL-3.0-or-later" + + livecheck do + url "http://andre-simon.de/zip/download.php" + regex(/href=.*?ansifilter[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b5d1fc53ad6b542fc718d161242c44adc151f7e555cdd5f511304cb6a8191e20" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c880e01b68cabf80075bc756ad604a1a8e0f22e81947245fef8ce1db551c6426" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1156071a738a3798f023c76b641f97318f4e2bf011e0e1994708672cde1302a7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45348d509ab10e0cc44fb3be8320ebc5443d07de35216b1dee2d88c8275a35d3" + sha256 cellar: :any_skip_relocation, sonoma: "103edd1a82bbeab8af847a4cedbc2bb8210983041ba4bd9d37ab66df777fac7b" + sha256 cellar: :any_skip_relocation, ventura: "14bec805d0e50a63b56cbaa6d9793b04d164b4f3c23403dd0cdb12f0e223f7bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "9acd580fc2162cf91e862aa5a38dd9927cded50ad1c4736380725ab833bdae68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d5c6389358d8037984ef69e04c20707e8f0b55436e814db0f4b76ebb4e2f638" + end + + def install + system "make", "PREFIX=#{prefix}" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + path = testpath/"ansi.txt" + path.write "f\x1b[31moo" + + assert_equal "foo", shell_output("#{bin}/ansifilter #{path}").strip + end +end diff --git a/Formula/a/ansilove.rb b/Formula/a/ansilove.rb new file mode 100644 index 0000000000000..e80180b4ff5b7 --- /dev/null +++ b/Formula/a/ansilove.rb @@ -0,0 +1,37 @@ +class Ansilove < Formula + desc "ANSI/ASCII art to PNG converter" + homepage "https://www.ansilove.org" + url "https://github.com/ansilove/ansilove/releases/download/4.2.1/ansilove-4.2.1.tar.gz" + sha256 "60b1f1b6e4a5be287bb19310ea526c631a0bea5f4cb550f33c301a4b1ec30abf" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "aa355a28549b83c25a3a8253d2310839916f36fdb297bb0b9501b8de0d976f74" + sha256 cellar: :any, arm64_sequoia: "a2ebd555bc91908d5e5a19c2e7836b8156ae1ec73bd89937037682663878ba70" + sha256 cellar: :any, arm64_sonoma: "9c1dd009271113b0c90e6d4e945eb2f7e8e1f2ff1bbe76447e27c04741fc674f" + sha256 cellar: :any, arm64_ventura: "fcd7297a08e54c44a7db0e19cce085c65f8fbceea158f40aab9900f816b600fb" + sha256 cellar: :any, sonoma: "0c4afe55030fe391aee91079e6a914a4bc989176d1e6cda14c571447de1ce8c4" + sha256 cellar: :any, ventura: "d33e47ed0c4b9956d65b8374db318b53926aed5296db5e56c9f4fa38fe253f6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1ae03d326bb2fa1250f8bf6d86a790d997ab6c5e9a05a211d9dc7583c3e9d5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bd6f63f8bfdd6b56e2ce0cb6cff1cbb54c0fb34c36e96d71d9104a5d2ef0ae3" + end + + depends_on "cmake" => :build + depends_on "libansilove" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples/burps/bs-ansilove.ans" => "test.ans" + end + + test do + output = shell_output("#{bin}/ansilove -o #{testpath}/output.png #{pkgshare}/test.ans") + assert_match "Font: 80x25", output + assert_match "Id: SAUCE v00", output + assert_match "Tinfos: IBM VGA", output + assert_path_exists testpath/"output.png" + end +end diff --git a/Formula/a/ansiweather.rb b/Formula/a/ansiweather.rb new file mode 100644 index 0000000000000..9cd84ce37120d --- /dev/null +++ b/Formula/a/ansiweather.rb @@ -0,0 +1,28 @@ +class Ansiweather < Formula + desc "Weather in your terminal, with ANSI colors and Unicode symbols" + homepage "https://github.com/fcambus/ansiweather" + url "https://github.com/fcambus/ansiweather/archive/refs/tags/1.19.0.tar.gz" + sha256 "5c902d4604d18d737c6a5d97d2d4a560717d72c8e9e853b384543c008dc46f4d" + license "BSD-2-Clause" + head "https://github.com/fcambus/ansiweather.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "038fbe9d452985ee47b312d1c9cfcab030622d4d4e9e803e7062f0c7f2bb42c8" + end + + depends_on "jq" + + uses_from_macos "bc" + + def install + bin.install "ansiweather" + man1.install "ansiweather.1" + end + + test do + assert_match "Wind", shell_output(bin/"ansiweather") + end +end diff --git a/Formula/a/ant-contrib.rb b/Formula/a/ant-contrib.rb new file mode 100644 index 0000000000000..36e1c39268159 --- /dev/null +++ b/Formula/a/ant-contrib.rb @@ -0,0 +1,43 @@ +class AntContrib < Formula + desc "Collection of tasks for Apache Ant" + homepage "https://ant-contrib.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.tar.gz" + sha256 "6e58c2ee65e1f4df031796d512427ea213a92ae40c5fc0b38d8ac82701f42a3c" + license "Apache-1.1" + + livecheck do + url :stable + regex(%r{url=.*?/ant-contrib[._-]v?(\d+(?:\.\d+)+(?:[a-z]\d+)?)-bin\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "11f6456cf47128a33054e067467dd8186dfd6db33c85cf60bb8620e4a269fced" + end + + depends_on "ant" + + def install + (share/"ant").install "ant-contrib-1.0b3.jar" + share.install "docs" + end + + test do + (testpath/"build.xml").write <<~XML + + + + + + + + + + + + XML + system Formula["ant"].opt_bin/"ant" + end +end diff --git a/Formula/a/ant.rb b/Formula/a/ant.rb new file mode 100644 index 0000000000000..3f04f52f90c73 --- /dev/null +++ b/Formula/a/ant.rb @@ -0,0 +1,79 @@ +class Ant < Formula + desc "Java build tool" + homepage "https://ant.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=ant/binaries/apache-ant-1.10.15-bin.tar.xz" + mirror "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.15-bin.tar.xz" + sha256 "4d5bb20cee34afbad17782de61f4f422c5a03e4d2dffc503bcbd0651c3d3c396" + license "Apache-2.0" + revision 1 + head "https://git-wip-us.apache.org/repos/asf/ant.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8e222d1b959c3a0b7b5bb343eba4a04d9a6730056f41954c05837828ff128f97" + end + + depends_on "openjdk" + + resource "ivy" do + url "https://www.apache.org/dyn/closer.lua?path=ant/ivy/2.5.3/apache-ivy-2.5.3-bin.tar.gz" + mirror "https://archive.apache.org/dist/ant/ivy/2.5.3/apache-ivy-2.5.3-bin.tar.gz" + sha256 "3d41e45021b84089e37329ede433e3ca20943cb1be0235390b6ddf4a919a85af" + end + + resource "bcel" do + url "https://www.apache.org/dyn/closer.lua?path=commons/bcel/binaries/bcel-6.10.0-bin.tar.gz" + mirror "https://archive.apache.org/dist/commons/bcel/binaries/bcel-6.10.0-bin.tar.gz" + sha256 "451557c4fb706d3f405fdd93eb4b8326915617a0e2a2d706d4abcaae515f1165" + end + + def install + rm Dir["bin/*.{bat,cmd,dll,exe}"] + + libexec.install Dir["*"] + bin.install_symlink Dir["#{libexec}/bin/*"] + rm bin/"ant" + (bin/"ant").write <<~SHELL + #!/bin/bash + JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" exec "#{libexec}/bin/ant" -lib #{HOMEBREW_PREFIX}/share/ant "$@" + SHELL + + resource("ivy").stage do + (libexec/"lib").install Dir["ivy-*.jar"] + end + + resource("bcel").stage do + (libexec/"lib").install "bcel-#{resource("bcel").version}.jar" + + # Ensure bcel jar is readable by world, see https://github.com/Homebrew/homebrew-core/issues/203905 + # Fixed upstream in https://github.com/apache/commons-bcel/commit/3afa84f8cc19e56ea550ae743ce0693f4c7d8ec5, + # remove on next update of bcel resource. + chmod 0644, libexec/"lib/bcel-#{resource("bcel").version}.jar" + end + end + + test do + (testpath/"build.xml").write <<~XML + + + + + + + + + + + XML + + (testpath/"src/main/java/org/homebrew/AntTest.java").write <<~JAVA + package org.homebrew; + public class AntTest { + public static void main(String[] args) { + System.out.println("Testing Ant with Homebrew!"); + } + } + JAVA + + system bin/"ant", "compile" + end +end diff --git a/Formula/a/ant@1.9.rb b/Formula/a/ant@1.9.rb new file mode 100644 index 0000000000000..6bd6868980039 --- /dev/null +++ b/Formula/a/ant@1.9.rb @@ -0,0 +1,58 @@ +class AntAT19 < Formula + desc "Java build tool" + homepage "https://ant.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=ant/binaries/apache-ant-1.9.16-bin.tar.bz2" + mirror "https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.16-bin.tar.bz2" + sha256 "57ceb0b249708cb28d081a72045657ab067fc4bc4a0d1e4af252496be44c2e66" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a881e6229607ce27db2cf3686cc2f28deeb04d2e3a0e6f0967438dd123516eab" + end + + keg_only :versioned_formula + + # End-of-life on 2024-06-19: https://lists.apache.org/thread/f6jw4v3gjwhqt5fz25og0my2o6xwvvm1 + deprecate! date: "2024-07-24", because: :unsupported + disable! date: "2025-07-26", because: :unsupported + + depends_on "openjdk" + + def install + rm Dir["bin/*.{bat,cmd,dll,exe}"] + libexec.install Dir["*"] + bin.install_symlink Dir["#{libexec}/bin/*"] + rm bin/"ant" + (bin/"ant").write <<~SHELL + #!/bin/sh + JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" exec "#{libexec}/bin/ant" -lib #{HOMEBREW_PREFIX}/share/ant "$@" + SHELL + end + + test do + (testpath/"build.xml").write <<~XML + + + + + + + + + + + XML + + (testpath/"src/main/java/org/homebrew/AntTest.java").write <<~JAVA + package org.homebrew; + public class AntTest { + public static void main(String[] args) { + System.out.println("Testing Ant with Homebrew!"); + } + } + JAVA + + system bin/"ant", "compile" + end +end diff --git a/Formula/a/antidote.rb b/Formula/a/antidote.rb new file mode 100644 index 0000000000000..89989bad777d7 --- /dev/null +++ b/Formula/a/antidote.rb @@ -0,0 +1,38 @@ +class Antidote < Formula + desc "Plugin manager for zsh, inspired by antigen and antibody" + homepage "https://antidote.sh/" + url "https://github.com/mattmc3/antidote/archive/refs/tags/v1.9.10.tar.gz" + sha256 "4beb9074da75bfe44a502db61542c557af1a6206a3cdd6e36c3f0743d71417ec" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f137ff897aab2a92deb3b181c4e1809cfb47ec02e033b567d4ad83a49c1ddeb9" + end + + uses_from_macos "zsh" + + def install + pkgshare.install "antidote.zsh" + pkgshare.install "functions" + man.install "man/man1" + end + + def caveats + <<~EOS + To activate antidote, add the following to your ~/.zshrc: + source #{opt_pkgshare}/antidote.zsh + EOS + end + + test do + (testpath/".zshrc").write <<~SHELL + export GIT_TERMINAL_PROMPT=0 + export ANTIDOTE_HOME=~/.zplugins + source #{pkgshare}/antidote.zsh + SHELL + + system "zsh", "--login", "-i", "-c", "antidote install rupa/z" + assert_equal (testpath/".zsh_plugins.txt").read, "rupa/z\n" + assert_path_exists testpath/".zplugins/https-COLON--SLASH--SLASH-github.amrom.workers.dev-SLASH-rupa-SLASH-z/z.sh" + end +end diff --git a/Formula/a/antigen.rb b/Formula/a/antigen.rb new file mode 100644 index 0000000000000..7c20be41e6489 --- /dev/null +++ b/Formula/a/antigen.rb @@ -0,0 +1,33 @@ +class Antigen < Formula + desc "Plugin manager for zsh, inspired by oh-my-zsh and vundle" + homepage "https://antigen.sharats.me/" + url "https://github.com/zsh-users/antigen/releases/download/v2.2.3/v2.2.3.tar.gz" + sha256 "bd3f1077050d52f459bc30fa3f025c44c528d625b4924a2f487fd2bacb89d61e" + license "MIT" + head "https://github.com/zsh-users/antigen.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c5b90cbbac10593d4cdc737303340894b65b0598a564cc9eafe1466f33936503" + end + + uses_from_macos "zsh" + + def install + pkgshare.install "bin/antigen.zsh" + end + + def caveats + <<~EOS + To activate antigen, add the following to your ~/.zshrc: + source #{HOMEBREW_PREFIX}/share/antigen/antigen.zsh + EOS + end + + test do + (testpath/".zshrc").write "source #{HOMEBREW_PREFIX}/share/antigen/antigen.zsh\n" + system "zsh", "--login", "-i", "-c", "antigen help" + end +end diff --git a/Formula/a/antiword.rb b/Formula/a/antiword.rb new file mode 100644 index 0000000000000..8acaf53f85b04 --- /dev/null +++ b/Formula/a/antiword.rb @@ -0,0 +1,73 @@ +class Antiword < Formula + desc "Utility to read Word (.doc) files" + homepage "https://web.archive.org/web/20221207132720/http://www.winfield.demon.nl/" + url "https://web.archive.org/web/20221207132720/http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz" + mirror "https://fossies.org/linux/misc/old/antiword-0.37.tar.gz" + sha256 "8e2c000fcbc6d641b0e6ff95e13c846da3ff31097801e86702124a206888f5ac" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "f3a917d197df7b1a9e21a9e604593783436adff1b8c6854a85ef417abc3ca21b" + sha256 arm64_sonoma: "393500bd0690bd7fdb9ed258a1ce7882f518db42ec14d380421f771467080bf6" + sha256 arm64_ventura: "c4d6bfce24638c2f087af1f8bab031848f27584bbc4497d2b11913d9562a0047" + sha256 arm64_monterey: "3d34f162686148d496bee36265f1434f11daf29957de15c4bdce8ba386f90fc9" + sha256 arm64_big_sur: "b47c2693abcaa8e3b9bc14a4239b1cd857f66f1fa381009659b7e1bc7f7d52c2" + sha256 sonoma: "7c0d5b36540d2d65aa86290dbc58abe08731c1a8619720e4465ed33103bcef88" + sha256 ventura: "60dace4917a561e05ff9bcce49bdedab2d1e39b5e5b2bb3c7f81bb4b14c3e2e4" + sha256 monterey: "2532dc5dd6a92569c650fd6bb490fae31c49d79234948c224f51df5910fbecc9" + sha256 big_sur: "d155e9094844588db872b6791fe727bb72fac4a72d9897bac768a813c1bf273a" + sha256 catalina: "7f62624bf238ba077370f6e8e223704b57eee461f2bbaddc47de8e4b5c5a4eda" + sha256 arm64_linux: "80b3df205c403d29dc8f09ddfd181a3418b2ad6b84f7f54029717d1326896a48" + sha256 x86_64_linux: "12935daff8ed3ffc2a68b8be542ea190bff6d7d2a2d46c854080d4023346d526" + end + + deprecate! date: "2024-06-19", because: :repo_removed + disable! date: "2025-06-21", because: :repo_removed + + resource "testdoc.doc" do + url "https://github.com/rsdoiel/antiword/raw/fe4b579067122a2d9d62647efb1ee7cfe3ca92bb/Docs/testdoc.doc" + sha256 "4ea5fe94a8ff9d8cd1e21a5e233efb681f2026de48ab1ac2cbaabdb953ca25ac" + end + + def install + inreplace "antiword.h", "/usr/share/antiword", pkgshare + + system "make", "CC=#{ENV.cc}", + "LD=#{ENV.cc}", + "CFLAGS=#{ENV.cflags} -DNDEBUG", + "GLOBAL_INSTALL_DIR=#{bin}", + "GLOBAL_RESOURCES_DIR=#{pkgshare}" + bin.install "antiword" + pkgshare.install Dir["Resources/*"] + man1.install "Docs/antiword.1" + end + + def caveats + <<~EOS + You can install mapping files in ~/.antiword + EOS + end + + test do + resource("testdoc.doc").stage do + assert_match <<~EOS, shell_output("#{bin}/antiword testdoc.doc") + This is just a small test document. + + + This is just a small document to see if Antiword has been compiled + correctly. + The images will only show in the PostScript mode. + + [pic] + + Figure 1 + + This JPEG image is the Antiword icon. + + [pic] + + Figure 2 + EOS + end + end +end diff --git a/Formula/a/antlr.rb b/Formula/a/antlr.rb new file mode 100644 index 0000000000000..de867fc336649 --- /dev/null +++ b/Formula/a/antlr.rb @@ -0,0 +1,52 @@ +class Antlr < Formula + desc "ANother Tool for Language Recognition" + homepage "https://www.antlr.org/" + url "https://www.antlr.org/download/antlr-4.13.2-complete.jar" + sha256 "eae2dfa119a64327444672aff63e9ec35a20180dc5b8090b7a6ab85125df4d76" + license "BSD-3-Clause" + + livecheck do + url "https://www.antlr.org/download.html" + regex(/href=.*?antlr[._-]v?(\d+(?:\.\d+)+)-complete\.jar/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "51675080a8ca4a12f374f985f7ca5867606ef491b680a84d0e83484849f907ef" + end + + depends_on "openjdk" + + def install + prefix.install "antlr-#{version}-complete.jar" + + (bin/"antlr").write <<~SHELL + #!/bin/bash + CLASSPATH="#{prefix}/antlr-#{version}-complete.jar:." exec "#{Formula["openjdk"].opt_bin}/java" -jar #{prefix}/antlr-#{version}-complete.jar "$@" + SHELL + + (bin/"grun").write <<~SHELL + #!/bin/bash + exec "#{Formula["openjdk"].opt_bin}/java" -classpath #{prefix}/antlr-#{version}-complete.jar:. org.antlr.v4.gui.TestRig "$@" + SHELL + end + + test do + path = testpath/"Expr.g4" + path.write <<~EOS + grammar Expr; + prog:\t(expr NEWLINE)* ; + expr:\texpr ('*'|'/') expr + |\texpr ('+'|'-') expr + |\tINT + |\t'(' expr ')' + ; + NEWLINE :\t[\\r\\n]+ ; + INT :\t[0-9]+ ; + EOS + ENV.prepend "CLASSPATH", "#{prefix}/antlr-#{version}-complete.jar", ":" + ENV.prepend "CLASSPATH", ".", ":" + system bin/"antlr", "Expr.g4" + system Formula["openjdk"].bin/"javac", *Dir["Expr*.java"] + assert_match(/^$/, pipe_output("#{bin}/grun Expr prog", "22+20\n", 0)) + end +end diff --git a/Formula/a/antlr4-cpp-runtime.rb b/Formula/a/antlr4-cpp-runtime.rb new file mode 100644 index 0000000000000..b85bbdfeedb89 --- /dev/null +++ b/Formula/a/antlr4-cpp-runtime.rb @@ -0,0 +1,60 @@ +class Antlr4CppRuntime < Formula + desc "ANother Tool for Language Recognition C++ Runtime Library" + homepage "https://www.antlr.org/" + url "https://www.antlr.org/download/antlr4-cpp-runtime-4.13.2-source.zip" + sha256 "0ed13668906e86dbc0dcddf30fdee68c10203dea4e83852b4edb810821bee3c4" + license "BSD-3-Clause" + + livecheck do + url "https://www.antlr.org/download.html" + regex(/href=.*?antlr4-cpp-runtime[._-]v?(\d+(?:\.\d+)+)-source\.zip/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d8f9d672ccd25be18abca3d12219ba53c3d797a75c41c9616ed7b741f28699ca" + sha256 cellar: :any, arm64_sequoia: "2094de636c5aed0176c2a9719a92554cf839b17b047e2792c300e1207225074b" + sha256 cellar: :any, arm64_sonoma: "d27c1a0fe28b968a40cab91183d1b0c3a681d3c287bf25dd6e4b0e59ba991af6" + sha256 cellar: :any, arm64_ventura: "4d6a9dca9ad714531d45d853e6d01f00d9e8181b345dd53584d25d5162693a92" + sha256 cellar: :any, arm64_monterey: "7ce24e3fcb89f34345a3cb596e2e7616af56e376c0137a58ee090f3d3ddcb3cd" + sha256 cellar: :any, sonoma: "5a36907fcc647e852ae13c9cd51bcc4ccb8ec91d89b0c618c838006ca60d1be0" + sha256 cellar: :any, ventura: "252ce01a63a080f19c9366be691a41faec552205d4497591b6c128c6d36a69d6" + sha256 cellar: :any, monterey: "d35b13d3122b481810c4a1edebf2add904647c0c96d431584a633cafa8aa4897" + sha256 cellar: :any_skip_relocation, arm64_linux: "47c1f68ced83aed06e56f01a7630253bbf11d7a9ad275d81645e420d150e1ddb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04da1cc9e4e3b28751460f84ebe762a1ac566db6d620568813ba8bf1a039acec" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "util-linux" + end + + def install + args = %w[ + -DANTLR4_INSTALL=ON + -DANTLR_BUILD_CPP_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + int main(int argc, const char* argv[]) { + try { + throw antlr4::ParseCancellationException() ; + } catch (antlr4::ParseCancellationException &exception) { + /* ignore */ + } + return 0 ; + } + CPP + system ENV.cxx, "-std=c++17", "-I#{include}/antlr4-runtime", "test.cc", + "-L#{lib}", "-lantlr4-runtime", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/anubis.rb b/Formula/a/anubis.rb new file mode 100644 index 0000000000000..a5d864da0b8c1 --- /dev/null +++ b/Formula/a/anubis.rb @@ -0,0 +1,60 @@ +class Anubis < Formula + desc "Protect resources from scraper bots" + homepage "https://anubis.techaro.lol" + url "https://github.com/TecharoHQ/anubis/archive/refs/tags/v1.22.0.tar.gz" + sha256 "81b45cf8d210927c6bdf81b4d925734b623e0c0c3f04f48c2034a85eea3bcd32" + license "MIT" + head "https://github.com/TecharoHQ/anubis.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2211e6b6502c41dd5fc0c6a2676050c6f91f621c169effb80e81a26bf26f9965" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d65a937abb523e9b114d2ed65efba6c358657cd68016ff1861be37dcdf69bc1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8c927116bc136769bbbbec15ecc5ac0b53c3485949038d9be623a8d65bcb747" + sha256 cellar: :any_skip_relocation, arm64_ventura: "32fa71019c675cf01dffa9ff5fc619016fa3b9b8b2c1cabc737cf6fafbef7bbb" + sha256 cellar: :any_skip_relocation, sonoma: "ed3379344e5ec7af017eb02062b21c3906f4c280fd1e6982ce7f632bcf08b7a3" + sha256 cellar: :any_skip_relocation, ventura: "6a5e15acb5c16f7953658d62adc9ed630c544d7d1fe45f89e6d02c28cdc8d4de" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b09dae0f088230fce50061b765e14670918deac828d5ecb76e9e09644e56b0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef17f1e143a3f82ca4a9291e51b6490a1dc0564ad5972f9284261fc48c2be72d" + end + + depends_on "brotli" => :build + depends_on "go" => :build + depends_on "node" => :build + depends_on "zstd" => :build + depends_on "webify" => :test + + def install + system "make", "assets" + ldflags = "-s -w -X github.com/TecharoHQ/anubis.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/anubis" + end + + test do + webify_port = free_port + anubis_port = free_port + + webify_pid = spawn Formula["webify"].opt_bin/"webify", "-addr", ":#{webify_port}", "echo", "Homebrew" + anubis_pid = spawn bin/"anubis", "-bind", ":#{anubis_port}", "-target", "http://localhost:#{webify_port}", + "-serve-robots-txt", "-use-remote-address", "127.0.0.1" + + assert_includes shell_output("curl --silent --retry 5 --retry-connrefused http://localhost:#{anubis_port}"), + "Homebrew" + + expected_robots_txt = <<~EOS + User-agent: * + Disallow: / + EOS + assert_includes shell_output("curl --silent http://localhost:#{anubis_port}/robots.txt"), + expected_robots_txt.strip + ensure + Process.kill "TERM", anubis_pid + Process.kill "TERM", webify_pid + Process.wait anubis_pid + Process.wait webify_pid + end +end diff --git a/Formula/a/anycable-go.rb b/Formula/a/anycable-go.rb new file mode 100644 index 0000000000000..3bd815f7cc369 --- /dev/null +++ b/Formula/a/anycable-go.rb @@ -0,0 +1,50 @@ +class AnycableGo < Formula + desc "WebSocket server with action cable protocol" + homepage "https://github.com/anycable/anycable" + url "https://github.com/anycable/anycable/archive/refs/tags/v1.6.6.tar.gz" + sha256 "0af41d2c7e196611d3d4da9c5f37e044f49e73f6117df5559b1c59d812f3e18f" + license "MIT" + head "https://github.com/anycable/anycable.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "069768ead769f2c8d0aad1da61169eb4aba503323295996b4fb0e23c2b3e0895" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "069768ead769f2c8d0aad1da61169eb4aba503323295996b4fb0e23c2b3e0895" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "069768ead769f2c8d0aad1da61169eb4aba503323295996b4fb0e23c2b3e0895" + sha256 cellar: :any_skip_relocation, sonoma: "384203a4e86860d9c77000c6d1f1bfaf84a535a6e7c17db9c1cd9e46c922ac82" + sha256 cellar: :any_skip_relocation, arm64_linux: "87acd55650f1548a25b0a6cb0bf27f60c2dbce68bb329fbf5db934e3789196c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f677d4890764324e87b09225652e1b8977f30d541a017edfd59b5b648e043f0f" + end + + depends_on "go" => :build + + def install + ldflags = %w[ + -s -w + ] + ldflags << if build.head? + "-X github.com/anycable/anycable/utils.sha=#{version.commit}" + else + "-X github.com/anycable/anycable/utils.version=#{version}" + end + + system "go", "build", *std_go_args(ldflags:), "./cmd/anycable-go" + end + + test do + port = free_port + pid = fork do + exec "#{bin}/anycable-go --port=#{port}" + end + sleep 1 + sleep 2 if OS.mac? && Hardware::CPU.intel? + output = shell_output("curl -sI http://localhost:#{port}/health") + assert_match(/200 OK/m, output) + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/a/anyenv.rb b/Formula/a/anyenv.rb new file mode 100644 index 0000000000000..5d79b56bf4bb4 --- /dev/null +++ b/Formula/a/anyenv.rb @@ -0,0 +1,38 @@ +class Anyenv < Formula + desc "All in one for **env" + homepage "https://anyenv.github.io/" + url "https://github.com/anyenv/anyenv/archive/refs/tags/v1.1.5.tar.gz" + sha256 "ed086fb8f5ee6bd8136364c94a9a76a24c65e0a950bb015e1b83389879a56ba8" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "be1c3998ca482ca2cf3377f5db6690f1c74877e5cdfc4266d62c5cc1627caacd" + end + + def install + inreplace "libexec/anyenv", "/usr/local", HOMEBREW_PREFIX + prefix.install %w[bin completions libexec] + end + + test do + anyenv_root = testpath/"anyenv" + profile = testpath/".profile" + profile.write <<~SHELL + export ANYENV_ROOT=#{anyenv_root} + export ANYENV_DEFINITION_ROOT=#{testpath}/anyenv-install + eval "$(#{bin}/anyenv init -)" + SHELL + + anyenv_install = ". #{profile} && #{bin}/anyenv install" + assert_match "Completed!", shell_output("#{anyenv_install} --force-init") + assert_match(/^\s*rbenv$/, shell_output("#{anyenv_install} --list")) + assert_match "succeeded!", shell_output("#{anyenv_install} rbenv") + + anyenv_rbenv_path = "#{anyenv_root}/envs/rbenv/bin/rbenv" + assert_equal anyenv_rbenv_path, shell_output(". #{profile} && which rbenv").chomp + assert_match(/^\d+\.\d+\.\d+$/, shell_output(". #{profile} && rbenv install --list")) + end +end diff --git a/Formula/a/anyquery.rb b/Formula/a/anyquery.rb new file mode 100644 index 0000000000000..48e1a9d4b84e5 --- /dev/null +++ b/Formula/a/anyquery.rb @@ -0,0 +1,42 @@ +class Anyquery < Formula + desc "Query anything with SQL" + homepage "https://anyquery.dev" + url "https://github.com/julien040/anyquery/archive/refs/tags/0.4.4.tar.gz" + sha256 "f174106c27af67e2d378713666d90b713edc52950be677312e2c282db54b279c" + license "AGPL-3.0-only" + head "https://github.com/julien040/anyquery.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e606702ce9cb04a446b1180ec22c133b07e5c549f360590094aa91291310212" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "48135a4e7ac901b87c0a115352e67bd6c5170ab2ceae5525e41593be478b878b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6408120e49f7f1126fda43abb4ff1a5446a5be557beefbc5d3954db985b555c" + sha256 cellar: :any_skip_relocation, sonoma: "09a95872694c7195c6dd197ac981f2799e2e20804b286ab9739d417e75bde95d" + sha256 cellar: :any_skip_relocation, arm64_linux: "59c435670a58f69be3447cabd2e479b95e4d008ac7f6635ef53069dc4848fef2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a72dd22e82c070ba3d3fce162b4af27ee37b0aa09d70418e8f02a821168a2a0" + end + + depends_on "go" => :build + + def install + tags = %w[ + vtable + fts5 + sqlite_json + sqlite_math_functions + ] + system "go", "build", *std_go_args(ldflags: "-s -w", tags:) + generate_completions_from_executable(bin/"anyquery", "completion") + end + + test do + assert_match "no such table: non_existing_table", + shell_output("#{bin}/anyquery -q \"SELECT * FROM non_existing_table\"") + # test server + pid = fork do + system bin/"anyquery", "server" + end + sleep 20 + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/a/anyzig.rb b/Formula/a/anyzig.rb new file mode 100644 index 0000000000000..fcbf6bf4607f1 --- /dev/null +++ b/Formula/a/anyzig.rb @@ -0,0 +1,42 @@ +class Anyzig < Formula + desc "Universal zig executable that runs any version of zig" + homepage "https://github.com/marler8997/anyzig" + url "https://github.com/marler8997/anyzig/archive/refs/tags/v2025_10_15.tar.gz" + sha256 "65ebdeca9e20ac347d094b504c3198eab25f130638e91554f517eef1c0275c2c" + license "MIT" + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b742bd26786d46db9dfe46088fc423d3ea4020eb1bdab90fe871b1c157682822" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8b788c7f65dff73b02212d1b5bbd35f0d55106d4064853848371111a0cb0220" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05c25f2403072fba5eb711fd62b2f6e97d4d2753344e2ef0d0e330d920aa883a" + sha256 cellar: :any_skip_relocation, sonoma: "0205666a6552cd3e57c8c65e4f842939d6cfae318506bc7fa482e9069e185802" + sha256 cellar: :any_skip_relocation, arm64_linux: "259c4a5bcec54b7948dcc82ce6cc003575e63b5fa35049ac389ebe258c8b756e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b96df77ca3f2ffd21ff157661045237683a954504516c300c8965232329446c3" + end + + depends_on "zig@0.14" => :build + + conflicts_with "zig", because: "both install `zig` binaries" + + def install + args = %W[-Dforce-version=v#{version.to_s.tr(".", "_")}] + + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case ENV.effective_arch + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else ENV.effective_arch + end + args << "-Dcpu=#{cpu}" if build.bottle? + + system "zig", "build", *args, *std_zig_args + end + + test do + assert_match "v#{version.to_s.tr(".", "_")}", shell_output("#{bin}/zig any version").strip + system bin/"zig", "any", "list-installed" + end +end diff --git a/Formula/a/aoeui.rb b/Formula/a/aoeui.rb new file mode 100644 index 0000000000000..bb8a84434bb8c --- /dev/null +++ b/Formula/a/aoeui.rb @@ -0,0 +1,31 @@ +class Aoeui < Formula + desc "Lightweight text editor optimized for Dvorak and QWERTY keyboards" + homepage "https://code.google.com/archive/p/aoeui/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/aoeui/aoeui-1.6.tgz" + sha256 "0655c3ca945b75b1204c5f25722ac0a07e89dd44bbf33aca068e918e9ef2a825" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5db4e6bc86d61cb543bba6cfc8f46bb1db2dd51314701866c881c50b09e4aab8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d884318d049fd6851389c8c37f7c0eb1042fbeb00c7cf7d0829ce6ab3d45d81d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a151b75fa791fe09b9b8e76783aeb89afdaafef9cd14e70208bde09334dfd84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f595bfa77ba8b7c03b12866673e1104b82d2d9e269c781279010a149ee49597a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1591ca7ff3b44a5947dbe9502987b9eb5566d2670048f3317cdf96d8af28fd77" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "daa6bd80f0cf479ba65187c2834ce38add2aeb37f93094596dcac9eda5001a68" + sha256 cellar: :any_skip_relocation, sonoma: "aa238d9b653cb8eff741c6f9a6811c3e8b9183adce57161a6f4817cfbfbe38b5" + sha256 cellar: :any_skip_relocation, ventura: "2e51be697ebb292fbca7958f8f64129d7925929d627911d300fd7e899d0b8feb" + sha256 cellar: :any_skip_relocation, monterey: "929a533158d7b0113cefcdfefd36b982eb68da53268a15a37733f737bef2ef79" + sha256 cellar: :any_skip_relocation, big_sur: "80411e75607878170abd4516b4ff368d8b4a8d1da0855c540d069d5b4cb88464" + sha256 cellar: :any_skip_relocation, catalina: "79a6d037053bc2b3fcd21870ccc274ad02f8e47bde5c9755b8665c25609ddd3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc5fc0e63ce3c46a6384f860fb44a6ebb0761f9fa4ffdcbe18eb27c27d72180a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b130912a9d91e2462433ad80f02827461c3c6aa8fef646b84cfa0249b9929815" + end + + uses_from_macos "m4" => :build + + def install + system "make", "INST_DIR=#{prefix}", "install" + end +end diff --git a/Formula/a/aom.rb b/Formula/a/aom.rb new file mode 100644 index 0000000000000..e947a2904c15a --- /dev/null +++ b/Formula/a/aom.rb @@ -0,0 +1,67 @@ +class Aom < Formula + desc "Codec library for encoding and decoding AV1 video streams" + homepage "https://aomedia.googlesource.com/aom" + url "https://aomedia.googlesource.com/aom.git", + tag: "v3.13.1", + revision: "d772e334cc724105040382a977ebb10dfd393293" + license "BSD-2-Clause" + head "https://aomedia.googlesource.com/aom.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "518aed50b3ab63ef4d9b7cefcfaf257b683f247f06dd81c173c7e5df03bd9d5a" + sha256 cellar: :any, arm64_sequoia: "ca79133eb9a4ec1e943322ef475811cc2be310cccfc28d4aa1326bfba0ffa0c7" + sha256 cellar: :any, arm64_sonoma: "697ad35de4a11f4a9f8a7307384081a397ca58ff238060a396e1248e88a08b24" + sha256 cellar: :any, arm64_ventura: "9329b9bf9dbd64be5bf52ad5eb822e0a7454948bfb91746772e0ee2788ae70e4" + sha256 cellar: :any, sonoma: "5d05040b86a95990ea50468ff17b5cbe3bccb2e636a1f6256e4c0439fe189f93" + sha256 cellar: :any, ventura: "644685d7962c133de1873d831d87a6cc71138fcbf2bbe2455b51000011a72b3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfb1ae4c7df80a5a2a6df56e1eef67536da73f1c90601d96c637e6a871ed2635" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c860bd13961bfa2cba27db91983d7bfac46e9a00ae005174ea6faa41bce43969" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jpeg-xl" + depends_on "libvmaf" + + on_intel do + depends_on "yasm" => :build + end + + def install + ENV.runtime_cpu_detection + + args = [ + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DENABLE_DOCS=off", + "-DENABLE_EXAMPLES=on", + "-DENABLE_TESTDATA=off", + "-DENABLE_TESTS=off", + "-DENABLE_TOOLS=off", + "-DBUILD_SHARED_LIBS=on", + "-DCONFIG_TUNE_VMAF=1", + ] + + system "cmake", "-S", ".", "-B", "brewbuild", *args, *std_cmake_args + system "cmake", "--build", "brewbuild" + system "cmake", "--install", "brewbuild" + end + + test do + resource "homebrew-bus_qcif_15fps.y4m" do + url "https://media.xiph.org/video/derf/y4m/bus_qcif_15fps.y4m" + sha256 "868fc3446d37d0c6959a48b68906486bd64788b2e795f0e29613cbb1fa73480e" + end + + testpath.install resource("homebrew-bus_qcif_15fps.y4m") + + system bin/"aomenc", "--webm", + "--tile-columns=2", + "--tile-rows=2", + "--cpu-used=8", + "--output=bus_qcif_15fps.webm", + "bus_qcif_15fps.y4m" + + system bin/"aomdec", "--output=bus_qcif_15fps_decode.y4m", + "bus_qcif_15fps.webm" + end +end diff --git a/Formula/a/apache-archiva.rb b/Formula/a/apache-archiva.rb new file mode 100644 index 0000000000000..933e2e8dde028 --- /dev/null +++ b/Formula/a/apache-archiva.rb @@ -0,0 +1,60 @@ +class ApacheArchiva < Formula + desc "Build Artifact Repository Manager" + homepage "https://archiva.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=archiva/2.2.10/binaries/apache-archiva-2.2.10-bin.tar.gz" + mirror "https://archive.apache.org/dist/archiva/2.2.10/binaries/apache-archiva-2.2.10-bin.tar.gz" + sha256 "9d468f5cd3d7f6841e133e853fc24e73fb62397091f1bb3601b6f157a5eadf77" + license all_of: ["Apache-2.0", "GPL-2.0-only"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0353821ce360af9daa593f637080c56b6e2cfbdd79430d90592577476aefd5be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "608f320fba80feaae78ae4a9245939f3c115a06ad852b83a510332f816982fc3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d50d77e7248f8d9c91d0db6952a249cd7913d9463268e99494d909defc5d3a24" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d50d77e7248f8d9c91d0db6952a249cd7913d9463268e99494d909defc5d3a24" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d50d77e7248f8d9c91d0db6952a249cd7913d9463268e99494d909defc5d3a24" + sha256 cellar: :any_skip_relocation, sonoma: "608f320fba80feaae78ae4a9245939f3c115a06ad852b83a510332f816982fc3" + sha256 cellar: :any_skip_relocation, ventura: "d50d77e7248f8d9c91d0db6952a249cd7913d9463268e99494d909defc5d3a24" + sha256 cellar: :any_skip_relocation, monterey: "d50d77e7248f8d9c91d0db6952a249cd7913d9463268e99494d909defc5d3a24" + sha256 cellar: :any_skip_relocation, big_sur: "d50d77e7248f8d9c91d0db6952a249cd7913d9463268e99494d909defc5d3a24" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1c07d5cd8ea4779a08546249c6599e57e1838c1613b7607f1dfbc1b9207f90e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8e45fbe48a08a1244ea72537e4eb0d550cd73f7977250a6b1b9d31bcd2a5b90" + end + + deprecate! date: "2024-05-01", because: :repo_archived + disable! date: "2025-05-05", because: :repo_archived + + depends_on "ant" => :build + depends_on "java-service-wrapper" + depends_on "openjdk" + + def install + libexec.install Dir["*"] + rm(libexec.glob("bin/wrapper*")) + rm(libexec.glob("lib/libwrapper*")) + (bin/"archiva").write_env_script libexec/"bin/archiva", Language::Java.java_home_env + + wrapper = Formula["java-service-wrapper"].opt_libexec + ln_sf wrapper/"bin/wrapper", libexec/"bin/wrapper" + libext = OS.mac? ? "jnilib" : "so" + ln_sf wrapper/"lib/libwrapper.#{libext}", libexec/"lib/libwrapper.#{libext}" + ln_sf wrapper/"lib/wrapper.jar", libexec/"lib/wrapper.jar" + end + + def post_install + (var/"archiva/logs").mkpath + (var/"archiva/data").mkpath + (var/"archiva/temp").mkpath + + cp_r libexec/"conf", var/"archiva" + end + + service do + run [opt_bin/"archiva", "console"] + environment_variables ARCHIVA_BASE: var/"archiva" + log_path var/"archiva/logs/launchd.log" + end + + test do + assert_match "was not running.", shell_output("#{bin}/archiva stop") + end +end diff --git a/Formula/a/apache-arrow-glib.rb b/Formula/a/apache-arrow-glib.rb new file mode 100644 index 0000000000000..2c462861838db --- /dev/null +++ b/Formula/a/apache-arrow-glib.rb @@ -0,0 +1,52 @@ +class ApacheArrowGlib < Formula + desc "GLib bindings for Apache Arrow" + homepage "https://arrow.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-21.0.0/apache-arrow-21.0.0.tar.gz" + mirror "https://archive.apache.org/dist/arrow/arrow-21.0.0/apache-arrow-21.0.0.tar.gz" + sha256 "5d3f8db7e72fb9f65f4785b7a1634522e8d8e9657a445af53d4a34a3849857b5" + license "Apache-2.0" + head "https://github.com/apache/arrow.git", branch: "main" + + livecheck do + formula "apache-arrow" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1ae66ca7d006705b24abb76a80126c8aa6bd08fe0bb06ccdb809aa07477ff83a" + sha256 cellar: :any, arm64_sequoia: "5f004095e9a67918ee7c1cfde17bf071d4a79caf3e27b5cac09ac1e6c03b5c77" + sha256 cellar: :any, arm64_sonoma: "44999e5b2a9658c20b288e9a3af01df921e8a7d8eb7d36cafb558dfad3da71af" + sha256 cellar: :any, arm64_ventura: "6b14ecf4d7d980bd1e47160236fc827fd586825892ef54f1ce833185d7652618" + sha256 cellar: :any, sonoma: "bebd307d4033aa01b91f4e8f2ef555399fdf3879473578ac43fa5d82727844c8" + sha256 cellar: :any, ventura: "1450c1222d39a1aec318819dae8d30afd958c9e4ad39fdd450ef46a0827ad6a1" + sha256 arm64_linux: "025eced98b83562c6e92d48434a81645aaae4d06ae63a29a79b5e5993687fc73" + sha256 x86_64_linux: "c51e0a090a554bb95ade46e3dfb48f06a502541d87259a8f6cf6579bfc60c991" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "apache-arrow" + depends_on "glib" + + def install + system "meson", "setup", "build", "c_glib", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + GArrowNullArray *array = garrow_null_array_new(10); + g_object_unref(array); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs arrow-glib gobject-2.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/a/apache-arrow.rb b/Formula/a/apache-arrow.rb new file mode 100644 index 0000000000000..2a833348c2b9f --- /dev/null +++ b/Formula/a/apache-arrow.rb @@ -0,0 +1,112 @@ +class ApacheArrow < Formula + desc "Columnar in-memory analytics layer designed to accelerate big data" + homepage "https://arrow.apache.org/" + license "Apache-2.0" + revision 9 + head "https://github.com/apache/arrow.git", branch: "main" + + stable do + url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-21.0.0/apache-arrow-21.0.0.tar.gz" + mirror "https://archive.apache.org/dist/arrow/arrow-21.0.0/apache-arrow-21.0.0.tar.gz" + sha256 "5d3f8db7e72fb9f65f4785b7a1634522e8d8e9657a445af53d4a34a3849857b5" + + # Backport support for LLVM 21 + patch do + url "https://github.com/apache/arrow/commit/57b4b4b77df5ae77910a91b171fa924d4ce78247.patch?full_index=1" + sha256 "8331efaf6ed21cba8d90ee802e685a8f113af11aa92da59457c36c06aa21dab6" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5776e86c85ccbb3c0de4e91a1b13f2616d8e9702e23b1b72717a37e6d1d4675" + sha256 cellar: :any, arm64_sequoia: "c33d22b68c12ea2176b564348638e5246d70f1e318074eff74291a6ba006137a" + sha256 cellar: :any, arm64_sonoma: "cc93f7c19e427bf54bcc5dba075ba5feed227358e14fb09c6507040f8c86b5fc" + sha256 cellar: :any, sonoma: "8c2d8cfe95ba7e67919ce73c09722e01bce3fba14f80d715403b863b48378a1c" + sha256 arm64_linux: "fa3062cf0d7dfcc62b34f465e8e4ef7df9966613c3067fb24533725a7cf7ae94" + sha256 x86_64_linux: "4659dbf7c87b079368b0a067092e89fdc00ad3bd39ba5977a343c3c8bd9e4c86" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "gflags" => :build + depends_on "rapidjson" => :build + depends_on "xsimd" => :build + depends_on "abseil" + depends_on "aws-crt-cpp" + depends_on "aws-sdk-cpp" + depends_on "brotli" + depends_on "grpc" + depends_on "llvm" + depends_on "lz4" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "re2" + depends_on "snappy" + depends_on "thrift" + depends_on "utf8proc" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + # We set `ARROW_ORC=OFF` because it fails to build with Protobuf 27.0 + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DLLVM_ROOT=#{Formula["llvm"].opt_prefix} + -DARROW_DEPENDENCY_SOURCE=SYSTEM + -DARROW_ACERO=ON + -DARROW_COMPUTE=ON + -DARROW_CSV=ON + -DARROW_DATASET=ON + -DARROW_FILESYSTEM=ON + -DARROW_FLIGHT=ON + -DARROW_FLIGHT_SQL=ON + -DARROW_GANDIVA=ON + -DARROW_HDFS=ON + -DARROW_JSON=ON + -DARROW_ORC=OFF + -DARROW_PARQUET=ON + -DARROW_PROTOBUF_USE_SHARED=ON + -DARROW_S3=ON + -DARROW_WITH_BZ2=ON + -DARROW_WITH_ZLIB=ON + -DARROW_WITH_ZSTD=ON + -DARROW_WITH_LZ4=ON + -DARROW_WITH_SNAPPY=ON + -DARROW_WITH_BROTLI=ON + -DARROW_WITH_UTF8PROC=ON + -DARROW_INSTALL_NAME_RPATH=OFF + -DPARQUET_BUILD_EXECUTABLES=ON + ] + args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm? + args << if OS.mac? + "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" # Reduce overlinking + else + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" # Avoid versioned LLVM RPATH getting dropped + end + # ARROW_SIMD_LEVEL sets the minimum required SIMD. Since this defaults to + # SSE4.2 on x86_64, we need to reduce level to match oldest supported CPU. + # Ref: https://arrow.apache.org/docs/cpp/env_vars.html#envvar-ARROW_USER_SIMD_LEVEL + if build.bottle? && Hardware::CPU.intel? && (!OS.mac? || !MacOS.version.requires_sse42?) + args << "-DARROW_SIMD_LEVEL=NONE" + end + + system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "arrow/api.h" + int main(void) { + arrow::int64(); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/apache-brooklyn-cli.rb b/Formula/a/apache-brooklyn-cli.rb new file mode 100644 index 0000000000000..aab263318939f --- /dev/null +++ b/Formula/a/apache-brooklyn-cli.rb @@ -0,0 +1,62 @@ +class ApacheBrooklynCli < Formula + desc "Apache Brooklyn command-line interface" + homepage "https://brooklyn.apache.org" + url "https://github.com/apache/brooklyn-client/archive/refs/tags/rel/apache-brooklyn-1.1.0.tar.gz" + sha256 "0c9ec77413e88d4ca23d0821c4d053b7cc69818962d4ccb9e7082c9d1dea7146" + license "Apache-2.0" + head "https://github.com/apache/brooklyn-client.git", branch: "master" + + livecheck do + url :stable + regex(%r{^(?:rel/)?apache-brooklyn[._-]v?(\d+(?:\.\d+)+)$}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40f8748f92e5bf30f1451b1590f1bcfa7d2cb4001b3b464a3cba2536207dabfb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "503ba57fecdd845c589d3d989e55389df542bf408d74c6b6bdaaaaa3b9fa9d7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5d4f837f66feb0e8ffd454caabde1262774b0146b9a41bc7b0e6c8db2f12d35" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3c1f6d82e0bded1a9caed523d74fc56bde05a5a11dade96496475ff43064f7e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eb10e0929a320063dd6ff2bddef8b222600696bc54186be67d390194b4282c88" + sha256 cellar: :any_skip_relocation, sonoma: "4c95c57b459108b4ea53b4ad26ac0fa1f5f63bb7d48f4af8cf213f052e35235b" + sha256 cellar: :any_skip_relocation, ventura: "93b0fa4d3664559fd801cd65d4834352cffb39b5328ae8ee8b983aa379926add" + sha256 cellar: :any_skip_relocation, monterey: "0478989b79dde26f28cb82612e4991cc7f9e0255ea4d5db7991177083b77f036" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ad44e932f78810e55add04db3a881b3ed6f0f90b9869ec404f37c17e690331a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7c85e245c2a3ba2ed68c1e2a64d9b6bbb7e1b0dbd5f1a4f3d941d0e0f19a25e" + end + + depends_on "go" => :build + + def install + cd "cli" do + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"br"), "./br" + end + end + + test do + port = free_port + server = TCPServer.new("localhost", port) + pid_mock_brooklyn = fork do + loop do + socket = server.accept + response = '{"version":"1.2.3","buildSha1":"dummysha","buildBranch":"1.2.3"}' + socket.print "HTTP/1.1 200 OK\r\n" \ + "Content-Type: application/json\r\n" \ + "Content-Length: #{response.bytesize}\r\n" \ + "Connection: close\r\n" + socket.print "\r\n" + socket.print response + socket.close + end + end + + begin + mock_brooklyn_url = "http://localhost:#{port}" + assert_equal "Connected to Brooklyn version 1.2.3 at #{mock_brooklyn_url}\n", + shell_output("#{bin}/br login #{mock_brooklyn_url} username password") + ensure + Process.kill("KILL", pid_mock_brooklyn) + end + end +end diff --git a/Formula/a/apache-drill.rb b/Formula/a/apache-drill.rb new file mode 100644 index 0000000000000..f2d1f3cfab99c --- /dev/null +++ b/Formula/a/apache-drill.rb @@ -0,0 +1,56 @@ +class ApacheDrill < Formula + desc "Schema-free SQL Query Engine for Hadoop, NoSQL and Cloud Storage" + homepage "https://drill.apache.org" + url "https://www.apache.org/dyn/closer.lua?path=drill/1.22.0/apache-drill-1.22.0.tar.gz" + mirror "https://dlcdn.apache.org/drill/1.22.0/apache-drill-1.22.0.tar.gz" + sha256 "21bb0087ead2487f31ef04dd1cd2f41eaacb147b4f9880f81737b4894a3db4e4" + license "Apache-2.0" + + livecheck do + url "https://drill.apache.org/download/" + regex(/href=.*?apache-drill[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "8822e3447afdecf6c393810d92f67814473e04f5bee2839e150b3e0ad0194c08" + end + + depends_on "openjdk@21" + + def install + rm(Dir["bin/*.bat"]) + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("21")) + rm(Dir["#{bin}/*.txt"]) + end + + test do + ENV["DRILL_LOG_DIR"] = ENV["TMP"] + output = pipe_output("#{bin}/sqlline -u jdbc:drill:zk=local 2>&1", "!tables", 0) + refute_match "Exception:", output + + (testpath/"query.sql").write <<~SQL + SELECT employee_id, last_name, birth_date FROM cp.`employee.json` LIMIT 3; + SELECT * FROM dfs.`#{libexec}/sample-data/region.parquet`; + SQL + assert_match <<~EOS, shell_output("#{bin}/drill-embedded --run=#{testpath}/query.sql") + +-------------+-----------+------------+ + | employee_id | last_name | birth_date | + +-------------+-----------+------------+ + | 1 | Nowmer | 1961-08-26 | + | 2 | Whelply | 1915-07-03 | + | 4 | Spence | 1969-06-20 | + +-------------+-----------+------------+ + +-------------+-------------+----------------------+ + | R_REGIONKEY | R_NAME | R_COMMENT | + +-------------+-------------+----------------------+ + | 0 | AFRICA | lar deposits. blithe | + | 1 | AMERICA | hs use ironic, even | + | 2 | ASIA | ges. thinly even pin | + | 3 | EUROPE | ly final courts cajo | + | 4 | MIDDLE EAST | uickly special accou | + +-------------+-------------+----------------------+ + EOS + end +end diff --git a/Formula/a/apache-flink-cdc.rb b/Formula/a/apache-flink-cdc.rb new file mode 100644 index 0000000000000..3018b26ebfae7 --- /dev/null +++ b/Formula/a/apache-flink-cdc.rb @@ -0,0 +1,104 @@ +class ApacheFlinkCdc < Formula + desc "Flink CDC is a streaming data integration tool" + homepage "https://nightlies.apache.org/flink/flink-cdc-docs-stable/" + url "https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=flink/flink-cdc-3.5.0/flink-cdc-3.5.0-bin.tar.gz" + mirror "https://archive.apache.org/dist/flink/flink-cdc-3.5.0/flink-cdc-3.5.0-bin.tar.gz" + sha256 "50938f2e0e4eeae46241fa077123d7071d27c91ba4ff44f7594620e6278773a7" + license "Apache-2.0" + head "https://github.com/apache/flink-cdc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a2ef1ef002c24579098ea4ad0474551fa6899e052fc03397616fee4bd1ab92aa" + end + + depends_on "apache-flink@1" => :test + + # See: https://github.com/apache/flink-cdc/blob/master/docs/content/docs/connectors/pipeline-connectors/overview.md#supported-connectors + resource "mysql-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-mysql/3.5.0/flink-cdc-pipeline-connector-mysql-3.5.0.jar" + sha256 "60ace993199e26f3b06c45ff71732d974bbb4c8e35b960fd8d58ea6d37b21a0e" + end + resource "oceanbase-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-oceanbase/3.5.0/flink-cdc-pipeline-connector-oceanbase-3.5.0.jar" + sha256 "60ace993199e26f3b06c45ff71732d974bbb4c8e35b960fd8d58ea6d37b21a0e" + end + resource "paimon-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-paimon/3.5.0/flink-cdc-pipeline-connector-paimon-3.5.0.jar" + sha256 "0431fd6d42b9475506842b5409c37c35ac932e4a84d143d5c493c7d46fced74b" + end + resource "kafka-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-kafka/3.5.0/flink-cdc-pipeline-connector-kafka-3.5.0.jar" + sha256 "8f9ac34b28b72797ec8af0f402f382c75299a78df863c1ddd1a683919c7eac28" + end + resource "maxcompute-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-maxcompute/3.5.0/flink-cdc-pipeline-connector-maxcompute-3.5.0.jar" + sha256 "0b398c78f9431b44113ad32ed90616df49dcbf82b5d5703de2ed08c738dddb21" + end + resource "doris-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-doris/3.5.0/flink-cdc-pipeline-connector-doris-3.5.0.jar" + sha256 "1cbbdd5a296420b78e2b748867bbbb12d44384d0d11d8654312beb53eb140899" + end + resource "elasticsearch-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-elasticsearch/3.5.0/flink-cdc-pipeline-connector-elasticsearch-3.5.0.jar" + sha256 "d973b966bc5123cd378fb841f919312805e615cd6fd54dea3d2b4331ae081a30" + end + resource "starrocks-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-starrocks/3.5.0/flink-cdc-pipeline-connector-starrocks-3.5.0.jar" + sha256 "0848c35d0068329f5d90c5729df2814692677946bd42f34b68decebc23cdb3cf" + end + resource "values-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-values/3.5.0/flink-cdc-pipeline-connector-values-3.5.0.jar" + sha256 "075aa185925ac78b411ccad049ea3f5ecbb647d7054dbde653f4029a05ad7e16" + end + resource "iceberg-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-iceberg/3.5.0/flink-cdc-pipeline-connector-iceberg-3.5.0.jar" + sha256 "e11a47e6da8c2879acf1694387599e477180126b212224ab46e5819333667988" + end + + def install + # Install launch script + mv "bin/flink-cdc.sh", "bin/flink-cdc" + libexec.install "bin" + bin.write_exec_script libexec/"bin/flink-cdc" + inreplace libexec/"bin/flink-cdc" do |s| + # Specify FLINK_CDC_HOME explicitly + s.sub! "FLINK_CDC_HOME=\"$SCRIPT_DIR\"/..", "FLINK_CDC_HOME=\"#{libexec}\"" + end + + # Install connector libraries + libexec.install "lib" + resources.each { |connector| (libexec/"lib").install connector } + + # Store configs in etc, outside of keg + pkgetc.install Dir["conf/*"] + libexec.install_symlink pkgetc => "conf" + end + + def post_install + (var/"log/apache-flink-cdc").mkpath + libexec.install_symlink var/"log/apache-flink-cdc" => "log" + end + + test do + (testpath/"test-pipeline.yaml").write <<~YAML + source: + name: Dummy data source + type: values + + sink: + name: Dummy data sink + type: values + + pipeline: + name: Dummy pipeline job + parallelism: 1 + YAML + (testpath/"log").mkpath + ENV["FLINK_LOG_DIR"] = testpath/"log" + flink_home = Formula["apache-flink@1"].libexec + system flink_home/"bin/start-cluster.sh" + output = shell_output "#{bin}/flink-cdc --flink-home #{flink_home} #{testpath}/test-pipeline.yaml" + assert_match "Pipeline has been submitted to cluster.", output + system flink_home/"bin/stop-cluster.sh" + end +end diff --git a/Formula/a/apache-flink.rb b/Formula/a/apache-flink.rb new file mode 100644 index 0000000000000..f41d2b42b8d69 --- /dev/null +++ b/Formula/a/apache-flink.rb @@ -0,0 +1,52 @@ +class ApacheFlink < Formula + desc "Scalable batch and stream data processing" + homepage "https://flink.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=flink/flink-2.1.0/flink-2.1.0-bin-scala_2.12.tgz" + mirror "https://archive.apache.org/dist/flink/flink-2.1.0/flink-2.1.0-bin-scala_2.12.tgz" + version "2.1.0" + sha256 "07f1212ed0cabded522a86b20f2e84eb82e4e054e59f714befd921dc27072c45" + license "Apache-2.0" + head "https://github.com/apache/flink.git", branch: "master" + + livecheck do + url "https://flink.apache.org/downloads/" + regex(/href=.*?flink[._-]v?(\d+(?:\.\d+)+)-bin[^"' >]*?\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "d44e2738ead7c7c798ad94d0f78859b99faeab502921e2c595662640db3361f2" + end + + # Java 11, 17 (Default), and 21 are supported. + # See: https://github.com/apache/flink?tab=readme-ov-file#building-apache-flink-from-source + depends_on "openjdk@21" + + def install + inreplace "conf/config.yaml" do |s| + s.sub!(/^env:/, "env.java.home: #{Language::Java.java_home("21")}\n\\0") + end + libexec.install Dir["*"] + bin.write_exec_script libexec/"bin/flink" + end + + test do + (testpath/"log").mkpath + (testpath/"input").write "foo bar foobar" + expected = <<~EOS + (foo,1) + (bar,1) + (foobar,1) + EOS + ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" + ENV.prepend "FLINK_LOG_DIR", testpath/"log" + system libexec/"bin/start-cluster.sh" + system bin/"flink", "run", "-p", "1", + libexec/"examples/streaming/WordCount.jar", "--input", testpath/"input", + "--output", testpath/"result" + system libexec/"bin/stop-cluster.sh" + assert_path_exists testpath/"result" + result_files = Dir[testpath/"result/*/*"] + assert_equal 1, result_files.length + assert_equal expected, (testpath/result_files.first).read + end +end diff --git a/Formula/a/apache-flink@1.rb b/Formula/a/apache-flink@1.rb new file mode 100644 index 0000000000000..3628427e6b612 --- /dev/null +++ b/Formula/a/apache-flink@1.rb @@ -0,0 +1,48 @@ +class ApacheFlinkAT1 < Formula + desc "Scalable batch and stream data processing" + homepage "https://flink.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=flink/flink-1.20.2/flink-1.20.2-bin-scala_2.12.tgz" + mirror "https://archive.apache.org/dist/flink/flink-1.20.2/flink-1.20.2-bin-scala_2.12.tgz" + version "1.20.2" + sha256 "76923477b2d12a992f1713954c03611a37a293349ae9e21e163790c1fd6a676a" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "343d4caf2add1dd23ff46d12008f3726787b3fc443f3fb31fc5eef0ff3b734e3" + end + + keg_only :versioned_formula + + depends_on "openjdk@11" + + def install + inreplace "conf/config.yaml" do |s| + s.sub!(/^env:/, "env.java.home: #{Language::Java.java_home("11")}\n\\0") + end + libexec.install Dir["*"] + bin.write_exec_script libexec/"bin/flink" + end + + test do + (testpath/"log").mkpath + (testpath/"input").write "foo bar foobar" + expected = <<~EOS + (foo,1) + (bar,1) + (foobar,1) + EOS + ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" + ENV.prepend "FLINK_LOG_DIR", testpath/"log" + system libexec/"bin/start-cluster.sh" + system bin/"flink", "run", "-p", "1", + libexec/"examples/streaming/WordCount.jar", "--input", testpath/"input", + "--output", testpath/"result" + system libexec/"bin/stop-cluster.sh" + assert_path_exists testpath/"result" + result_files = Dir[testpath/"result/*/*"] + assert_equal 1, result_files.length + assert_equal expected, (testpath/result_files.first).read + end +end diff --git a/Formula/a/apache-geode.rb b/Formula/a/apache-geode.rb new file mode 100644 index 0000000000000..29cd99440904e --- /dev/null +++ b/Formula/a/apache-geode.rb @@ -0,0 +1,49 @@ +class ApacheGeode < Formula + desc "In-memory Data Grid for fast transactional data processing" + homepage "https://geode.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=geode/1.15.2/apache-geode-1.15.2.tgz" + mirror "https://archive.apache.org/dist/geode/1.15.2/apache-geode-1.15.2.tgz" + mirror "https://downloads.apache.org/geode/1.15.2/apache-geode-1.15.2.tgz" + sha256 "60d190b07b4dabd83a86bfa21acab7ed38d2eccaabe4bc5baabab0981cf7910a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8a0b8cb1ec42b12799db4b388cf1e82b3adcb43b92dd4be77ff331516bd9d1f7" + end + + depends_on "openjdk" + + def install + rm("bin/gfsh.bat") + bash_completion.install "bin/gfsh-completion.bash" => "gfsh" + libexec.install Dir["*"] + (bin/"gfsh").write_env_script libexec/"bin/gfsh", Language::Java.overridable_java_home_env + end + + test do + output = shell_output("#{bin}/gfsh start locator --name=locator1") + assert_match "Cluster configuration service is up and running", output + + output = shell_output("#{bin}/gfsh -e connect -e 'start server --name=server1 --server-port=#{free_port}'") + assert_match "server1 is currently online", output + + output = shell_output("#{bin}/gfsh -e connect -e 'create region --name=regionA --type=REPLICATE_PERSISTENT'") + assert_match 'Region "/regionA" created on "server1"', output + + output = shell_output("#{bin}/gfsh -e connect -e 'put --region=regionA --key=\"1\" --value=\"one\"'") + assert_match(/Result\s*:\s*true/, output) + + output = shell_output("#{bin}/gfsh -e connect -e 'put --region=regionA --key=\"2\" --value=\"two\"'") + assert_match(/Result\s*:\s*true/, output) + + output = shell_output("#{bin}/gfsh -e connect -e 'query --query=\"select * from /regionA\"'") + assert_match <<~EOS, output + Result + ------ + two + one + EOS + ensure + system bin/"gfsh", "-e", "connect", "-e", "shutdown --include-locators=true" + end +end diff --git a/Formula/a/apache-opennlp.rb b/Formula/a/apache-opennlp.rb new file mode 100644 index 0000000000000..656bc12caba85 --- /dev/null +++ b/Formula/a/apache-opennlp.rb @@ -0,0 +1,28 @@ +class ApacheOpennlp < Formula + desc "Machine learning toolkit for processing natural language text" + homepage "https://opennlp.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=opennlp/opennlp-2.5.6/apache-opennlp-2.5.6-bin.tar.gz" + mirror "https://archive.apache.org/dist/opennlp/opennlp-2.5.6/apache-opennlp-2.5.6-bin.tar.gz" + sha256 "cebff9d389cb434c41395f3e1212795fea0825252a261952ed3bd6cad1f7e924" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a6c465c04a76f79cfe83ddee02f150293e9269de70671c6c6c97f38e669f6390" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm(Dir["bin/*.bat"]) + + libexec.install Dir["*"] + (bin/"opennlp").write_env_script libexec/"bin/opennlp", JAVA_HOME: Formula["openjdk"].opt_prefix, + OPENNLP_HOME: libexec + end + + test do + output = pipe_output("#{bin}/opennlp SimpleTokenizer", "Hello, friends", 0) + assert_equal "Hello , friends", output.lines.first.chomp + end +end diff --git a/Formula/a/apache-polaris.rb b/Formula/a/apache-polaris.rb new file mode 100644 index 0000000000000..fe75bb3f20812 --- /dev/null +++ b/Formula/a/apache-polaris.rb @@ -0,0 +1,55 @@ +class ApachePolaris < Formula + desc "Interoperable, open source catalog for Apache Iceberg" + homepage "https://polaris.apache.org/" + url "https://github.com/apache/polaris/archive/refs/tags/apache-polaris-1.1.0-incubating.tar.gz" + sha256 "cc4e0557e7a9cc36fd0d72412842f11cbbf5acb90f13f6e32fac14aa5f9ed77c" + license "Apache-2.0" + + livecheck do + url "https://polaris.apache.org/downloads/" + regex(/href=.*?apache-polaris-(\d+(?:\.\d+)+)-incubating\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7be0de8249bc27a87b9450036e69f9563476437f2627176371caba2043e471c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e06628ed638db4c7cc23537fc8ce8f455105dacacd922a2f78c9d735c38dacea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c9446b5bc0c4ea66d04e1295ca6d29744c62b34d37a920142bcf48e3e9fb1356" + sha256 cellar: :any_skip_relocation, sonoma: "46cebbbc97ec05299f795dd61bc8e4351134fa1918e3e56e6401be68b9d48de9" + sha256 cellar: :any_skip_relocation, arm64_linux: "d73af81b82333cc0c6899e6446c469ecaa98a702823e6f79698b988950814432" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c455b85be6a394de94a20a4e6badb785e93f791cd730a6782e44c84c904006d6" + end + + depends_on "gradle@8" => :build + depends_on "openjdk" + + def install + system "gradle", "assemble" + + mkdir "build" do + system "tar", "xzf", "../runtime/distribution/build/distributions/polaris-bin-#{version}-incubating.tgz", "--strip-components", "1" + libexec.install "admin", "bin", "server" + end + + java_env = Language::Java.overridable_java_home_env + %w[admin server].each do |script| + (bin/"polaris-#{script}").write_env_script libexec/"bin"/script, java_env + end + end + + service do + run [opt_bin/"polaris-server"] + keep_alive true + error_log_path var/"log/polaris.log" + log_path var/"log/polaris.log" + end + + test do + port = free_port + ENV["QUARKUS_HTTP_PORT"] = free_port.to_s + ENV["QUARKUS_MANAGEMENT_PORT"] = port.to_s + spawn bin/"polaris-server" + + output = shell_output("curl -s --retry 5 --retry-connrefused localhost:#{port}/q/health") + assert_match "UP", output + end +end diff --git a/Formula/a/apache-pulsar.rb b/Formula/a/apache-pulsar.rb new file mode 100644 index 0000000000000..f42e1c40af42b --- /dev/null +++ b/Formula/a/apache-pulsar.rb @@ -0,0 +1,84 @@ +class ApachePulsar < Formula + desc "Cloud-native distributed messaging and streaming platform" + homepage "https://pulsar.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=pulsar/pulsar-4.1.0/apache-pulsar-4.1.0-src.tar.gz" + mirror "https://archive.apache.org/dist/pulsar/pulsar-4.1.0/apache-pulsar-4.1.0-src.tar.gz" + sha256 "6edb381a41adafcc6117c029caadcf606fd88e427796bef7b188f233aee7362a" + license "Apache-2.0" + head "https://github.com/apache/pulsar.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "257f518d60e0fa2957cfc360d64c538de4351b649e6a11eb7c33bb460f31564a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "432701f412d644f92f65a7788b7c9cd9284df2df66ff8f4f56d4cd17fbe7190f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6372ff073ab7f90bd1278dc7be7e76c49a1588dcc52ffb7a4bdaba3d0ba0836e" + sha256 cellar: :any_skip_relocation, sonoma: "46d89b7aae5c4f0aae195d122680033f37a25915d91e8bbff1418b33e0554e1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1a3d4318f390f2e1c3d7b53fc1aa274acb2bf65f400ce56536fe6cc0d4b974d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "140fab15d195c19bcd8a363e8f9ec3c010142cda0e43ea3979999c69321155cd" + end + + depends_on "maven" => :build + depends_on "protoc-gen-grpc-java" => :build + depends_on "openjdk@21" + + def install + # Pin gRPC Java version to that of protoc-gen-grpc-java + inreplace "pom.xml", + %r{\d+(?:\.\d+)+}, + "#{Formula["protoc-gen-grpc-java"].version}" + + # Avoid using pre-built `protoc-gen-grpc-java` + grpc_java_files = ["pulsar-client/pom.xml", "pulsar-functions/proto/pom.xml"] + plugin_artifact = "io.grpc:protoc-gen-grpc-java:${protoc-gen-grpc-java.version}:exe:${os.detected.classifier}" + inreplace grpc_java_files, %r{#{Regexp.escape(plugin_artifact)}\s*}, "" + + java_home_env = Language::Java.java_home_env("21") + with_env(TMPDIR: buildpath, **java_home_env) do + system "mvn", "clean", "package", "-DskipTests", "-Pcore-modules" + end + + tarball = if build.head? + Dir["distribution/server/target/apache-pulsar-*-bin.tar.gz"].first + else + "distribution/server/target/apache-pulsar-#{version}-bin.tar.gz" + end + + libexec.mkpath + system "tar", "--extract", "--file", tarball, "--directory", libexec, "--strip-components=1" + pkgshare.install libexec/"examples" + (etc/"pulsar").install_symlink libexec/"conf" + + rm libexec.glob("bin/*.cmd") + libexec.glob("bin/*") do |path| + next if !path.file? || path.fnmatch?("*common.sh") + + (bin/path.basename).write_env_script path, java_home_env + end + end + + def post_install + (var/"log/pulsar").mkpath + end + + service do + run [opt_bin/"pulsar", "standalone"] + log_path var/"log/pulsar/output.log" + error_log_path var/"log/pulsar/error.log" + end + + test do + ENV["PULSAR_GC_LOG"] = "-Xlog:gc*:#{testpath}/pulsar_gc_%p.log:time,uptime:filecount=10,filesize=20M" + ENV["PULSAR_LOG_DIR"] = testpath + ENV["PULSAR_STANDALONE_USE_ZOOKEEPER"] = "1" + + spawn bin/"pulsar", "standalone", "--zookeeper-dir", "#{testpath}/zk", "--bookkeeper-dir", "#{testpath}/bk" + # The daemon takes some time to start; pulsar-client will retry until it gets a connection, but emit confusing + # errors until that happens, so sleep to reduce log spam. + sleep 30 + sleep 30 if OS.mac? && Hardware::CPU.intel? + + output = shell_output("#{bin}/pulsar-client produce my-topic --messages 'hello-pulsar'") + assert_match "1 messages successfully produced", output + output = shell_output("#{bin}/pulsar initialize-cluster-metadata -c a -cs localhost -uw localhost -zk localhost") + assert_match "Cluster metadata for 'a' setup correctly", output + end +end diff --git a/Formula/a/apache-spark.rb b/Formula/a/apache-spark.rb new file mode 100644 index 0000000000000..0f0b35ba46314 --- /dev/null +++ b/Formula/a/apache-spark.rb @@ -0,0 +1,67 @@ +class ApacheSpark < Formula + desc "Engine for large-scale data processing" + homepage "https://spark.apache.org/" + url "https://dlcdn.apache.org/spark/spark-4.0.1/spark-4.0.1-bin-hadoop3.tgz" + mirror "https://archive.apache.org/dist/spark/spark-4.0.1/spark-4.0.1-bin-hadoop3.tgz" + version "4.0.1" + sha256 "bd5315fa89db737f005971835b94e093c3d2b8581d2411737d281627d6803cc3" + license "Apache-2.0" + revision 1 + head "https://github.com/apache/spark.git", branch: "master" + + # The download page creates file links using JavaScript, so we identify + # versions within the related JS file. + livecheck do + url "https://spark.apache.org/js/downloads.js" + regex(/addRelease\(.*?["']v?(\d+(?:\.\d+)+)["']/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "6567eb49d5d7f9e6e63d272d674e3d2e96a9eac837a8fee7d11f8c824f443177" + end + + depends_on "openjdk@21" + + def install + # Rename beeline to distinguish it from hive's beeline + mv "bin/beeline", "bin/spark-beeline" + + rm(Dir["bin/*.cmd"]) + libexec.install Dir["*"] + bin.install Dir[libexec/"bin/*"] + bin.env_script_all_files(libexec/"bin", JAVA_HOME: Language::Java.overridable_java_home_env("21")[:JAVA_HOME]) + end + + test do + require "pty" + + (testpath/"data.txt").write <<~EOS + Homebrew test + Homebrew Spark test + Spark test Homebrew + EOS + + output = "" + PTY.spawn(bin/"spark-shell") do |r, w, pid| + w.puts "sc.parallelize(1 to 1000).count()" + w.puts 'sc.textFile("data.txt").filter(line => line.contains("Spark")).first()' + w.puts ":quit" + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + # remove ANSI colors + output.encode!("UTF-8", "binary", + invalid: :replace, + undef: :replace, + replace: "") + output.gsub!(/\e\[([;\d]+)?m/, "") + ensure + Process.kill("TERM", pid) + end + + assert_match "Long = 1000", output + assert_match "String = Homebrew Spark test", output + end +end diff --git a/Formula/a/apachetop.rb b/Formula/a/apachetop.rb new file mode 100644 index 0000000000000..57e3ff0dc40dd --- /dev/null +++ b/Formula/a/apachetop.rb @@ -0,0 +1,49 @@ +class Apachetop < Formula + desc "Top-like display of Apache log" + homepage "https://github.com/tessus/apachetop" + url "https://github.com/tessus/apachetop/releases/download/0.23.2/apachetop-0.23.2.tar.gz" + sha256 "f94a34180808c3edb24c1779f72363246dd4143a89f579ef2ac168a45b04443f" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b43b64c9b48fdef15d11d7dcb99d20bf65a31c05b36e7468c3e9e8bbd16f3f5f" + sha256 cellar: :any, arm64_sequoia: "5fca6d39ff40dc897dd1051087db749f0f6921515443fd6dcd1dbc9150847c3a" + sha256 cellar: :any, arm64_sonoma: "32e56eb605dc205768eeeb8fa3d6bd575dee188cef3e4962e6e62ffb7bfb7075" + sha256 cellar: :any, arm64_ventura: "83ab9282b83e2d1e56142e673273f8b709944a0019ffc42547be9a50040c6fcd" + sha256 cellar: :any, arm64_monterey: "090134b03c12d592af96aea44192ba384f283ba968d90d267f30fd888599cd33" + sha256 cellar: :any, arm64_big_sur: "7fa14fb5f2569c2519b97d0ba9be81e3300acefc7439359053569dca949cd20c" + sha256 cellar: :any, sonoma: "6f1bb6b2163f1738b3ab80f3c4a41fb0c73f50a07cc45a8924b31b22ec355334" + sha256 cellar: :any, ventura: "4c6d945946d47eed147f9ff9550bb06d00c5c12662d32375a0ad2e1c2a2429d5" + sha256 cellar: :any, monterey: "d2e4cc231ecfa99b31fa9d7348755322ee8d3370fb7c9bcbf4516397ebf858b3" + sha256 cellar: :any, big_sur: "14e727f81b2b5960f03a93e15a5fb345c17749deff826170417bc8aa54687dc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee4946ec586338260b8540ae8954f40001f2cd482663f55a9e19f94572756f67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b12e4f730309bb91ee34bb2972ef2004a979c2a608abb93500b859973994abf8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "adns" + depends_on "ncurses" + depends_on "pcre2" + + on_linux do + depends_on "readline" + end + + def install + ENV.append "CXX", "-std=gnu++17" + + system "./configure", "--mandir=#{man}", + "--with-logfile=#{var}/log/apache2/access_log", + "--with-adns=#{Formula["adns"].opt_prefix}", + "--with-pcre2=#{Formula["pcre2"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/apachetop -h 2>&1", 1) + assert_match "ApacheTop v#{version}", output + end +end diff --git a/Formula/a/apcupsd.rb b/Formula/a/apcupsd.rb new file mode 100644 index 0000000000000..e26f55ea20380 --- /dev/null +++ b/Formula/a/apcupsd.rb @@ -0,0 +1,117 @@ +class Apcupsd < Formula + desc "Daemon for controlling APC UPSes" + homepage "http://www.apcupsd.org" + url "https://downloads.sourceforge.net/project/apcupsd/apcupsd%20-%20Stable/3.14.14/apcupsd-3.14.14.tar.gz" + sha256 "db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867" + license "GPL-2.0-only" # a few files have "or later", but most do not + + livecheck do + url :stable + regex(%r{url=.*?/apcupsd%20-%20Stable/[^/]+/apcupsd[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 arm64_tahoe: "b3ee569355dc3304f2efdf334b2b130088427c6cb9001213c73837ec7ef26160" + sha256 arm64_sequoia: "42e5ae7b28e6a629784dc2fde07477671a8348544e1472de2fd27ddf88a55dc5" + sha256 arm64_sonoma: "5a906ee35f2ec26d466dab2060b61af39dd43297e9580f804fba78f7f1e1bb33" + sha256 arm64_ventura: "d09fad7812d162e402914ee0fdf8e5bd91593dfc1a5050258eb6ba2296ef767d" + sha256 arm64_monterey: "a6cf4c78394837233cb366da2697b0c80a69d5191b09b5aba0125d40fcdb48a5" + sha256 arm64_big_sur: "891644e5123fc8fd644cf88809642334f07093f7dae656c3f65d276e90a2b6bf" + sha256 sonoma: "d38f2c3404c9d08bd7bbe480cd8acf70153bf7486ee01da4b71d31f05acccc71" + sha256 ventura: "bb3971d7d541206fc672a8d01410674a3a7d8abac848f8e8049589369d1b081f" + sha256 monterey: "e1b0cba1a14c977d8a7faad52c9d72080b745f7b3a49557a5cebe8171bcbc9a1" + sha256 big_sur: "1c425f1d6db43a760e4d068ae8ef193c3ca32a3157564989ba1a6aa2ce44a2c7" + sha256 catalina: "7636fe8d43fde7368817c64dc8f689526f48d2a958532e3fdd3f05db3deb4c5e" + sha256 arm64_linux: "2e4b840420d4e7b2712118ca0e9d789e0d6c1f44f54ea6bb49eca03b5548aef5" + sha256 x86_64_linux: "d393e850548713a383f89d2375fdbd895eae93c063c97b7e16cd767c881d983e" + end + + depends_on "gd" + depends_on "libusb-compat" + + on_linux do + depends_on "systemd" # for shutdown + end + + def install + ENV.prepend_path "PATH", Formula["systemd"].opt_sbin if OS.linux? + sysconfdir = etc/name + args = %W[ + --prefix=#{prefix} + --sbindir=#{sbin} + --sysconfdir=#{sysconfdir} + --enable-cgi + --with-cgi-bin=#{sysconfdir} + --enable-usb + --enable-modbus-usb + ] + + if OS.mac? + # Detecting the lack of gethostname_r() goes wrong on Xcode 12: + args << "ac_cv_func_which_gethostbyname_r=no" + + # Paths below are hard-coded upstream for creation of `.pkg` installer. + + # Install apcagent.app to `prefix`. + inreplace "src/apcagent/Makefile", "Applications", prefix + + cd "platforms/darwin" do + inreplace "Makefile" do |s| + # Install launch daemon and kernel extension to subdirectories of `prefix`. + s.gsub! "/Library/LaunchDaemons", lib/"Library/LaunchDaemons" + s.gsub! "/System/Library/Extensions", kext_prefix + # Custom uninstaller not needed as this is handled by Homebrew. + s.gsub!(/.*apcupsd-uninstall.*/, "") + end + + # Use appropriate paths for launch daemon and launch script. + inreplace %w[apcupsd-start.in org.apcupsd.apcupsd.plist.in], "/etc/apcupsd", sysconfdir + end + else + # Avoid Linux distro-specific paths + args << "--with-distname=unknown" + args << "--with-halpolicydir=#{share}/hal/fdi/policy/20thirdparty" + end + + system "./configure", *args + system "make", "install" + end + + def caveats + on_macos do + <<~EOS + For #{name} to be able to communicate with UPSes connected via USB, + the kernel extension must be installed by the root user: + + sudo cp -pR #{kext_prefix}/ApcupsdDummy.kext /System/Library/Extensions/ + sudo chown -R root:wheel /System/Library/Extensions/ApcupsdDummy.kext + sudo touch /System/Library/Extensions/ + + Note: The kernel extension currently does not work as expected. + + You will have to unplug and plug the USB cable back in after each + reboot in order for #{name} to be able to connect to the UPS. + + To load #{name} at startup, activate the included Launch Daemon: + + sudo cp #{prefix}/lib/Library/LaunchDaemons/org.apcupsd.apcupsd.plist /Library/LaunchDaemons + sudo chmod 644 /Library/LaunchDaemons/org.apcupsd.apcupsd.plist + sudo launchctl load -w /Library/LaunchDaemons/org.apcupsd.apcupsd.plist + + If this is an upgrade and you already have the Launch Daemon loaded, you + have to unload the Launch Daemon before reinstalling it: + + sudo launchctl unload -w /Library/LaunchDaemons/org.apcupsd.apcupsd.plist + sudo rm /Library/LaunchDaemons/org.apcupsd.apcupsd.plist + EOS + end + end + + test do + system sbin/"apcupsd", "--version" + assert_match "usage", shell_output("#{sbin}/apctest --help", 1) + end +end diff --git a/Formula/a/apgdiff.rb b/Formula/a/apgdiff.rb new file mode 100644 index 0000000000000..2d7b25d7f9182 --- /dev/null +++ b/Formula/a/apgdiff.rb @@ -0,0 +1,65 @@ +class Apgdiff < Formula + desc "Another PostgreSQL diff tool" + homepage "https://www.apgdiff.com/" + url "https://github.com/fordfrog/apgdiff/archive/refs/tags/release_2.7.0.tar.gz" + sha256 "932a7e9fef69a289f4c7bed31a9c0709ebd2816c834b65bad796bdc49ca38341" + license "MIT" + + livecheck do + url :stable + regex(/^release[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "22236801bcf19f2b8beb312287dc2b3a8d9ebdef2ee0fa56779ed0abc3e44fc4" + end + + head do + url "https://github.com/fordfrog/apgdiff.git", branch: "develop" + depends_on "ant" => :build + end + + depends_on "openjdk" + + def install + jar = "releases/apgdiff-#{version}.jar" + + if build.head? + system "ant", "-Dnoget=1" + jar = Dir["dist/apgdiff-*.jar"].first + end + + libexec.install jar + bin.write_jar_script libexec/File.basename(jar), "apgdiff" + end + + test do + sql_orig = testpath/"orig.sql" + sql_new = testpath/"new.sql" + + sql_orig.write <<~SQL + SET search_path = public, pg_catalog; + SET default_tablespace = ''; + CREATE TABLE testtable (field1 integer); + ALTER TABLE public.testtable OWNER TO fordfrog; + SQL + + sql_new.write <<~SQL + SET search_path = public, pg_catalog; + SET default_tablespace = ''; + CREATE TABLE testtable (field1 integer, + field2 boolean DEFAULT false NOT NULL); + ALTER TABLE public.testtable OWNER TO fordfrog; + SQL + + expected = <<~SQL.strip + ALTER TABLE testtable + \tADD COLUMN field2 boolean DEFAULT false NOT NULL; + SQL + + assert_equal expected, shell_output("#{bin}/apgdiff #{sql_orig} #{sql_new}").strip + end +end diff --git a/Formula/a/api-linter.rb b/Formula/a/api-linter.rb new file mode 100644 index 0000000000000..9e1441ff610c7 --- /dev/null +++ b/Formula/a/api-linter.rb @@ -0,0 +1,40 @@ +class ApiLinter < Formula + desc "Linter for APIs defined in protocol buffers" + homepage "https://linter.aip.dev/" + url "https://github.com/googleapis/api-linter/archive/refs/tags/v2.0.0.tar.gz" + sha256 "e42c23eb6ee3b040555453b8bb92a624f8a388821db53ff5691c8a188deb37a7" + license "Apache-2.0" + head "https://github.com/googleapis/api-linter.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6a7a163028bf85f562da0a15a1885f5ed092039bcc2238d8b94d8f00d5d8370a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a7a163028bf85f562da0a15a1885f5ed092039bcc2238d8b94d8f00d5d8370a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a7a163028bf85f562da0a15a1885f5ed092039bcc2238d8b94d8f00d5d8370a" + sha256 cellar: :any_skip_relocation, sonoma: "2f301a9883efdce8e8bd950fdbf0842919defef460b13ce36a96a0c39e630d06" + sha256 cellar: :any_skip_relocation, arm64_linux: "05fb0f72cab0c1eb5b0dbe9029e5eb378db7d652bf1d9619c77a5f6cea8290c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f748f4f8d76703b2491bb1c39981e68f68ae0ef3702b870a4145263981cc045e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/api-linter" + end + + test do + assert_match version.to_s, shell_output("#{bin}/api-linter --version") + + protofile = testpath/"proto3.proto" + protofile.write <<~EOS + syntax = "proto3"; + package proto3; + + message Request { + string name = 1; + repeated int64 key = 2; + } + EOS + + assert_match "message: Missing comment over \"Request\"", shell_output("#{bin}/api-linter proto3.proto 2>&1") + end +end diff --git a/Formula/a/apib.rb b/Formula/a/apib.rb new file mode 100644 index 0000000000000..69e5329425336 --- /dev/null +++ b/Formula/a/apib.rb @@ -0,0 +1,43 @@ +class Apib < Formula + desc "HTTP performance-testing tool" + homepage "https://github.com/apigee/apib" + url "https://github.com/apigee/apib/archive/refs/tags/APIB_1_2_1.tar.gz" + sha256 "e47f639aa6ffc14a2e5b03bf95e8b0edc390fa0bb2594a521f779d6e17afc14c" + license "Apache-2.0" + head "https://github.com/apigee/apib.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "337cb9a61b2d654dd1217f9abb5c6b36056b0a9a1b0309493761e48b70e3c087" + sha256 cellar: :any, arm64_sequoia: "16bdbdc8c1157d81ef431aa3c9065d08a8986f6f9863d6d1d9ec7b9bf9ba1a4c" + sha256 cellar: :any, arm64_sonoma: "6b82511a66880598cbb30560c46652203f7448dd5fecea99bf50a73cc248f18a" + sha256 cellar: :any, arm64_ventura: "0d3f8ebb9f43ccdebb3d1f0afea5decb6418aee36e2021d8c6eb2a182f023c09" + sha256 cellar: :any, arm64_monterey: "c411bb84a6c9cedada2763065efefa16107e3d030108a0a56d58cbef1261ead7" + sha256 cellar: :any, arm64_big_sur: "a2c0d222e5f4e7ce13ea2671367e125a2a493922696f1cdcccf01edb3fcafb8f" + sha256 cellar: :any, sonoma: "8312ece497888c99b07749e20beb873192dcc2ccc16cd0f0f0193324e9bec9f1" + sha256 cellar: :any, ventura: "829fdf8369067c69644601156922fa6f2a6b42909156c5760c9b37a0cfaf3a72" + sha256 cellar: :any, monterey: "f8b39236e548bc511ac9be750bf5e34ea153828b66fee23f12d59cef6a1d2459" + sha256 cellar: :any, big_sur: "26096e8f935082051fb8695d3f01ae9d0991baad89d170d96461794a9f756d3a" + sha256 cellar: :any, catalina: "c14c342e3615bce14f3fe666fefdd17456e1c96b5ce8b59edd46dad19beab49f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f95d7ee859f9339c976338e990352bf0416c79a14645c66eda6ee7387f4089b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43509a772521b80a03d3702dba034b752371581c0739c6cfb7f1c48217398a42" + end + + depends_on "cmake" => :build + depends_on "libev" + depends_on "openssl@3" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build", "--target", "apib", "apibmon" + bin.install "build/apib/apib", "build/apib/apibmon" + end + + test do + system bin/"apib", "-c 1", "-d 1", "https://www.google.com" + end +end diff --git a/Formula/a/apibuilder-cli.rb b/Formula/a/apibuilder-cli.rb new file mode 100644 index 0000000000000..dea930b82c08b --- /dev/null +++ b/Formula/a/apibuilder-cli.rb @@ -0,0 +1,36 @@ +class ApibuilderCli < Formula + desc "Command-line interface to generate clients for api builder" + homepage "https://www.apibuilder.io" + url "https://github.com/apicollective/apibuilder-cli/archive/refs/tags/0.1.52.tar.gz" + sha256 "3ce833ef38dfeebcd4d4c27133b567412c28cf160c156993700d22f706caa738" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "39cbf3461c7f364bf4f50327ef24d23e877c8ab8cd27253f9c1a29a94ba359bc" + end + + uses_from_macos "ruby" + + # patch to remove ask.rb file load, upstream pr ref, https://github.com/apicollective/apibuilder-cli/pull/89 + patch do + url "https://github.com/apicollective/apibuilder-cli/commit/2f901ad345c8a5d3b7bf46934d97f9be2150eae7.patch?full_index=1" + sha256 "d57b7684247224c7d9e43b4b009da92c7a9c9ff9938e2376af544662c5dfd6c4" + end + + def install + system "./install.sh", prefix + end + + test do + (testpath/"config").write <<~EOS + [default] + token = abcd1234 + EOS + + assert_match "Profile default:", + shell_output("#{bin}/read-config --path config") + assert_match "Could not find apibuilder configuration directory", + shell_output("#{bin}/apibuilder", 1) + end +end diff --git a/Formula/a/apidoc.rb b/Formula/a/apidoc.rb new file mode 100644 index 0000000000000..843638d778f42 --- /dev/null +++ b/Formula/a/apidoc.rb @@ -0,0 +1,56 @@ +class Apidoc < Formula + desc "RESTful web API Documentation Generator" + homepage "https://apidocjs.com" + url "https://github.com/apidoc/apidoc/archive/refs/tags/1.2.0.tar.gz" + sha256 "45812a66432ec3d7dc97e557bab0a9f9a877f0616a95c2c49979b67ba8cfb0cf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77eead90a2e275963902897bb539d05529082eefc6da4862e006cce26e850fb6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e50dd2df96beabbbb2ae46b9066c60903b6c778798fa172aeece50e8a68d78b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ae177f380e815fcea0ae8cf238d1cba13f50e7d78195e0329c6574155a53624" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3ae177f380e815fcea0ae8cf238d1cba13f50e7d78195e0329c6574155a53624" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3ae177f380e815fcea0ae8cf238d1cba13f50e7d78195e0329c6574155a53624" + sha256 cellar: :any_skip_relocation, sonoma: "9650b7a10fbcb0995dd5e7e4d389360f5f8904a5f8773cb67cd683ebe8b7df15" + sha256 cellar: :any_skip_relocation, ventura: "3f913c5b951f97de85b776b9d08f7a53f1be7d83dca04f2e210ecb9343f94866" + sha256 cellar: :any_skip_relocation, monterey: "3f913c5b951f97de85b776b9d08f7a53f1be7d83dca04f2e210ecb9343f94866" + sha256 cellar: :any_skip_relocation, big_sur: "3f913c5b951f97de85b776b9d08f7a53f1be7d83dca04f2e210ecb9343f94866" + sha256 cellar: :any_skip_relocation, arm64_linux: "f49ecbead9febb009893cce39dd1956a463b7b7ad419fefb783f78705e57f8f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "814be573ff5193c0e23d6ffffe1fee94fd5d9ed5efbc4684bf3e39ac0325d34f" + end + + deprecate! date: "2024-07-16", because: :repo_archived + disable! date: "2025-07-17", because: :repo_archived + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"api.go").write <<~GO + /** + * @api {get} /user/:id Request User information + * @apiVersion #{version} + * @apiName GetUser + * @apiGroup User + * + * @apiParam {Number} id User's unique ID. + * + * @apiSuccess {String} firstname Firstname of the User. + * @apiSuccess {String} lastname Lastname of the User. + */ + GO + (testpath/"apidoc.json").write <<~JSON + { + "name": "brew test example", + "version": "#{version}", + "description": "A basic apiDoc example" + } + JSON + system bin/"apidoc", "-i", ".", "-o", "out" + assert_path_exists testpath/"out/assets/main.bundle.js" + end +end diff --git a/Formula/a/apify-cli.rb b/Formula/a/apify-cli.rb new file mode 100644 index 0000000000000..77f20d462b7a7 --- /dev/null +++ b/Formula/a/apify-cli.rb @@ -0,0 +1,28 @@ +class ApifyCli < Formula + desc "Apify command-line interface" + homepage "https://docs.apify.com/cli/" + url "https://registry.npmjs.org/apify-cli/-/apify-cli-1.1.1.tgz" + sha256 "00e4827b9d4995263ca008b0ee1e6fa1bad556d5e01e422407c25302a48eb92d" + license "Apache-2.0" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, all: "778eaf7f2ed8bbfc6a34841368b90bc6986da3c59c1a441b2b57532ca0c338d2" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/apify init -y testing-actor 2>&1") + assert_includes output, "Success: The Actor has been initialized in the current directory" + assert_path_exists testpath/"storage/key_value_stores/default/INPUT.json" + + assert_includes shell_output("#{bin}/apify --version 2>&1"), version.to_s + end +end diff --git a/Formula/a/apigeecli.rb b/Formula/a/apigeecli.rb new file mode 100644 index 0000000000000..f8ff0e4e956d6 --- /dev/null +++ b/Formula/a/apigeecli.rb @@ -0,0 +1,46 @@ +class Apigeecli < Formula + desc "Apigee management API command-line interface" + homepage "https://cloud.google.com/apigee/docs" + url "https://github.com/apigee/apigeecli/archive/refs/tags/v2.16.0.tar.gz" + sha256 "eed2a51199b7778e2faf1752bb8a8f3bb8d60240f6159152fa9d95f5cfacb534" + license "Apache-2.0" + head "https://github.com/apigee/apigeecli.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4258ee6b313df32d1a1f89fa22e966a28dc62cae6ccbf607ed870cc85afa73a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4258ee6b313df32d1a1f89fa22e966a28dc62cae6ccbf607ed870cc85afa73a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4258ee6b313df32d1a1f89fa22e966a28dc62cae6ccbf607ed870cc85afa73a4" + sha256 cellar: :any_skip_relocation, sonoma: "3cb1d14ec106a4d6b4da8addee32e69064b9faa21eb5f3caa300d23a0237bfb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "bae233defe3cc1a64eb3824123d8551eb2b4840859b5527e0df04b6d3c4ac608" + sha256 cellar: :any_skip_relocation, x86_64_linux: "190e83a7bbe8b18c495d04d2a45a5f9e741b62a3120216e72bbc631bbfc3031e" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{version} + -X main.date=#{time.iso8601} + ] + gcflags = 'all="-l"' + system "go", "build", *std_go_args(ldflags:, gcflags:), "./cmd/apigeecli" + + generate_completions_from_executable(bin/"apigeecli", "completion") + end + + test do + assert_match "apigeecli version #{version}", shell_output("#{bin}/apigeecli --version") + + ENV["APIGEECLI_DRYRUN"] = "true" + apigeecli_apis_list = "#{bin}/apigeecli apis list --org=homebrew-test --token='homebrew-test' 2>&1" + assert_match "Dry run mode enabled! unset APIGEECLI_DRYRUN to disable dry run", shell_output(apigeecli_apis_list) + end +end diff --git a/Formula/a/apkleaks.rb b/Formula/a/apkleaks.rb new file mode 100644 index 0000000000000..6be10f7ea1dfb --- /dev/null +++ b/Formula/a/apkleaks.rb @@ -0,0 +1,63 @@ +class Apkleaks < Formula + include Language::Python::Virtualenv + + desc "Scanning APK file for URIs, endpoints & secrets" + homepage "https://github.com/dwisiswant0/apkleaks" + url "https://files.pythonhosted.org/packages/1e/e6/203661abe151dbc59096de65d6f0cf392d1aad3acba32f4e9f3f389acad0/apkleaks-2.6.3.tar.gz" + sha256 "e247b59acf4448f3c2e45449bc7564bc5b7a216ebfb166236baf602d625b1df5" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e1d47054ac171bb39a0dfac7971bee89f16e2b132939238516253626f00c0fa3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8ccba254372a410048df881690db842753db0d1cf44f6c949794eed76b6f949" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "01db0cc2ba78d06e07a2dc9845d6a32537aff975e85f30a9c95940a2e76e32dc" + sha256 cellar: :any_skip_relocation, sonoma: "76049852fe10e2f7b4709f727f05eab86ae32aa3ae69bda6e1c8d8c5f13bbf38" + sha256 cellar: :any_skip_relocation, arm64_linux: "49af4612bade044c39289d429d0eb0d90e10e02fbef12b91147ecc3ef4c2616e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9720c048f854f1b5b8491c9a7857dc0d09400c7c092d6f06e32b6c4e2cea4c07" + end + + depends_on "jadx" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "asn1crypto" do + url "https://files.pythonhosted.org/packages/de/cf/d547feed25b5244fcb9392e288ff9fdc3280b10260362fc45d37a798a6ee/asn1crypto-1.5.1.tar.gz" + sha256 "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "pyaxmlparser" do + url "https://files.pythonhosted.org/packages/1e/1f/7a7318ad054d66253d2b96e2d9038ea920f17c8a9bd687cdcfa16a655bdf/pyaxmlparser-0.3.31.tar.gz" + sha256 "fecb858ff1fb456466f8dcdcd814207b4c15edb95f67cfe0a38c7d7cd4a28d4d" + end + + def install + virtualenv_install_with_resources + end + + test do + resource "homebrew-test.apk" do + url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" + sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" + end + + testpath.install resource("homebrew-test.apk") + output = shell_output("#{bin}/apkleaks -f #{testpath}/redex-test.apk") + assert_match "Decompiling APK...", output + assert_match "Scanning against 'com.facebook.redex.test.instr'", output + + assert_match version.to_s, shell_output("#{bin}/apkleaks -h 2>&1") + end +end diff --git a/Formula/a/apko.rb b/Formula/a/apko.rb new file mode 100644 index 0000000000000..1a831cdca2c0f --- /dev/null +++ b/Formula/a/apko.rb @@ -0,0 +1,65 @@ +class Apko < Formula + desc "Build OCI images from APK packages directly without Dockerfile" + homepage "https://github.com/chainguard-dev/apko" + url "https://github.com/chainguard-dev/apko/archive/refs/tags/v0.30.20.tar.gz" + sha256 "6ec12bee3cffeac9eba21d00d99cc1a66ed033a0b69cdbec4badab4e3f545f9e" + license "Apache-2.0" + head "https://github.com/chainguard-dev/apko.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "64624dd8c68970c6b6fa41ec343a114eb55d573dc3a3a9c54c0f082e3eaa4138" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f43d8afdf86bbefd9c9e4925d0edb8cc8d47094acf97cd0a823b4a3b7f513c89" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea4563c4560fffd22d5e9b1e145272a2eaee3b2fb2815e5ba19e573fe4e21d88" + sha256 cellar: :any_skip_relocation, sonoma: "e15bd466e2c81cd92ac43336baf5ce5beeb253c9dff2ba88b45d9a1dec0503be" + sha256 cellar: :any_skip_relocation, arm64_linux: "0379c595c1be16dbe65ae4a6aacce167d678c673602631ce4bdc3835808e757d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "041422dd893b4cef22b30fb2daf68242ef5c17e355b23c24b6763c8f874d64f2" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/release-utils/version.gitVersion=#{version} + -X sigs.k8s.io/release-utils/version.gitCommit=brew + -X sigs.k8s.io/release-utils/version.gitTreeState=clean + -X sigs.k8s.io/release-utils/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"apko", "completion") + end + + test do + (testpath/"test.yml").write <<~YAML + contents: + repositories: + - https://dl-cdn.alpinelinux.org/alpine/edge/main + packages: + - apk-tools + + entrypoint: + command: /bin/sh -l + + # optional environment configuration + environment: + PATH: /usr/sbin:/sbin:/usr/bin:/bin + + # only key found for arch riscv64 [edge], + archs: + - riscv64 + YAML + system bin/"apko", "build", testpath/"test.yml", "apko-alpine:test", "apko-alpine.tar" + assert_path_exists testpath/"apko-alpine.tar" + + assert_match version.to_s, shell_output("#{bin}/apko version 2>&1") + end +end diff --git a/Formula/a/apktool.rb b/Formula/a/apktool.rb new file mode 100644 index 0000000000000..6a560ea31ef27 --- /dev/null +++ b/Formula/a/apktool.rb @@ -0,0 +1,30 @@ +class Apktool < Formula + desc "Tool for reverse engineering 3rd party, closed, binary Android apps" + homepage "https://github.com/iBotPeaches/Apktool" + url "https://github.com/iBotPeaches/Apktool/releases/download/v2.12.1/apktool_2.12.1.jar" + sha256 "66cf4524a4a45a7f56567d08b2c9b6ec237bcdd78cee69fd4a59c8a0243aeafa" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "73038ea8772d8a416a500d23d65dbee3220ebbd5ab773a13e20e298f64919d3c" + end + + depends_on "openjdk" + + def install + libexec.install "apktool_#{version}.jar" + bin.write_jar_script libexec/"apktool_#{version}.jar", "apktool" + end + + test do + resource "homebrew-test.apk" do + url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" + sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" + end + + resource("homebrew-test.apk").stage do + system bin/"apktool", "d", "redex-test.apk" + system bin/"apktool", "b", "redex-test" + end + end +end diff --git a/Formula/a/apm-bash-completion.rb b/Formula/a/apm-bash-completion.rb new file mode 100644 index 0000000000000..b1887520a1e4d --- /dev/null +++ b/Formula/a/apm-bash-completion.rb @@ -0,0 +1,23 @@ +class ApmBashCompletion < Formula + desc "Completion for Atom Package Manager" + homepage "https://github.com/vigo/apm-bash-completion" + url "https://github.com/vigo/apm-bash-completion/archive/refs/tags/1.0.0.tar.gz" + sha256 "1043a7f19eabe69316ea483830fb9f78d6c90853aaf4dd7ed60007af7f0d6e9d" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f86348dd9abdb4b7a8c6353f29374d7432375920a0281e806f14d50b8673bc1f" + end + + deprecate! date: "2025-04-27", because: :repo_archived + + def install + bash_completion.install "apm" + end + + test do + assert_match "-F __apm", + shell_output("bash -c 'source #{bash_completion}/apm && complete -p apm'") + end +end diff --git a/Formula/a/apng2gif.rb b/Formula/a/apng2gif.rb new file mode 100644 index 0000000000000..cbeb23f102e14 --- /dev/null +++ b/Formula/a/apng2gif.rb @@ -0,0 +1,39 @@ +class Apng2gif < Formula + desc "Convert APNG animations into animated GIF format" + homepage "https://apng2gif.sourceforge.net/" + url "https://downloads.sourceforge.net/project/apng2gif/1.8/apng2gif-1.8-src.zip" + sha256 "9a07e386017dc696573cd7bc7b46b2575c06da0bc68c3c4f1c24a4b39cdedd4d" + license all_of: ["libpng-2.0", "Zlib"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ed45a01466de66b866f9b894a9a12299c51b2f663facd8af4d262429b9507ada" + sha256 cellar: :any, arm64_sequoia: "0f86e3508b3328f66e3ada01096160126c5ef87912d0a6a187a0200293d0d93f" + sha256 cellar: :any, arm64_sonoma: "20bcd262d61b96408beb4146b7adc55fa3f18d5a9170949670245bc9e0128f58" + sha256 cellar: :any, arm64_ventura: "96885dd78971006a1a9c2110cf491436d16cb705fd29c67a8506c06c41cf867c" + sha256 cellar: :any, arm64_monterey: "06feb5f45bd0926a23bcda94caf5af7eb1f29166b71853ea3c9136c74c63d000" + sha256 cellar: :any, arm64_big_sur: "b11d6a2f6d1eba7587c8541f65440b027596ae8b3b60ea23e080a237d0b215a3" + sha256 cellar: :any, sonoma: "d8ac4e2fb2ec309f7eb0b5fb0ad011166cb37884b2090fbbf839f78277436ec4" + sha256 cellar: :any, ventura: "f67f54a6e9f79ca11e7d1c0f5b9d4fbbf43ed6f4b0045875287ad4dafb5df70d" + sha256 cellar: :any, monterey: "58b5118280140555684d30a9682450f95ddcbbb7f2f03d6a354da850b3f432db" + sha256 cellar: :any, big_sur: "8c541ad0b322c10bacc60230d91daf242f3b7ebb8e5deb72860fe2dc1b8cb551" + sha256 cellar: :any, catalina: "e602a9876003067007cdd579101e1fafa937e7a2ca328a0406e872d6be4f5705" + sha256 cellar: :any_skip_relocation, arm64_linux: "e05a9e7698a6e549570520d9c2edbd687265df5b5a7fc5d806d8c525b178fd6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f98dfacc9457ddd5742ff27448fdd3b51dbd1445a586447327404bcb0028b72a" + end + + depends_on "libpng" + + def install + system "make" + bin.install "apng2gif" + end + + test do + cp test_fixtures("test.png"), testpath/"test.png" + system bin/"apng2gif", testpath/"test.png" + assert_path_exists testpath/"test.gif", "Failed to create test.gif" + end +end diff --git a/Formula/a/apngasm.rb b/Formula/a/apngasm.rb new file mode 100644 index 0000000000000..26a86ab1cb59a --- /dev/null +++ b/Formula/a/apngasm.rb @@ -0,0 +1,58 @@ +class Apngasm < Formula + desc "Next generation of apngasm, the APNG assembler" + homepage "https://github.com/apngasm/apngasm" + url "https://github.com/apngasm/apngasm/archive/refs/tags/3.1.10.tar.gz" + sha256 "8171e2c1d37ab231a2061320cb1e5d15cee37642e3ce78e8ab0b8dfc45b80f6c" + license "Zlib" + revision 18 + head "https://github.com/apngasm/apngasm.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "8d4cb366969b69d558489a3225602608880d1618caa18f597b2ee57997affcb9" + sha256 arm64_sequoia: "909813b7286d5c3dbff8d6b13497fe607037fc65fe0ea065b676e2b831789073" + sha256 arm64_sonoma: "e0d5bf50c94003d87095dcdd397ede2dcff470f208dfd60a63a49f2a5713490f" + sha256 arm64_ventura: "1eaf62b76489a8137ce94807e4620bb9858aa5fe14c2aae549ee21225549a6c8" + sha256 sonoma: "f58b86508e14f1eec53218dab0e9ca5f4416fe48884f2be2439224f4763ec7bd" + sha256 ventura: "9db2561881222680a4b2740f342ce45ec1ada0c4c95a211ad0bdb16c274fbc24" + sha256 cellar: :any_skip_relocation, arm64_linux: "7799fbab3ad13774e371173cdf0c16d09506fa5e4bac755dd29d513e2d4be41e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab4cf496aea65ea1db6d5e1ac594e76e5f6e82454d8bc3e48fe03672d115bf3d" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "icu4c@77" + depends_on "libpng" + depends_on "lzlib" + + uses_from_macos "zlib" + + fails_with :gcc do + version "7" + cause "Requires C++17 filesystem" + end + + # Fix build with Boost 1.89.0, pr ref: https://github.com/apngasm/apngasm/pull/111 + patch do + url "https://github.com/apngasm/apngasm/commit/7bf77bdefd348c629f650e2a5102a26ab6bee7b8.patch?full_index=1" + sha256 "cbb9d679c5d46424bb00962481903f12b8b0e943dfdc98910ad05af7c7dacf5b" + end + + def install + inreplace "cli/CMakeLists.txt", "${CMAKE_INSTALL_PREFIX}/man/man1", + "${CMAKE_INSTALL_PREFIX}/share/man/man1" + ENV.cxx11 + ENV.deparallelize # Build error: ld: library not found for -lapngasm + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"test").install "test/samples" + end + + test do + system bin/"apngasm", pkgshare/"test/samples/clock*.png" + end +end diff --git a/Formula/a/apophenia.rb b/Formula/a/apophenia.rb new file mode 100644 index 0000000000000..bb3c34f9e57d5 --- /dev/null +++ b/Formula/a/apophenia.rb @@ -0,0 +1,74 @@ +class Apophenia < Formula + desc "C library for statistical and scientific computing" + homepage "https://github.com/b-k/apophenia" + url "https://github.com/b-k/apophenia/archive/refs/tags/v1.0.tar.gz" + sha256 "c753047a9230f9d9e105541f671c4961dc7998f4402972424e591404f33b82ca" + license "GPL-2.0-only" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "44c30149c9a30ba1c3eabfde55df2aa654127cd2788bddef59c67dc61b79531d" + sha256 cellar: :any, arm64_sequoia: "45407a002d3d36f5c0e0e1b286a7097074d389691e119c42b17681e086b48473" + sha256 cellar: :any, arm64_sonoma: "46a4119ca0d9f934fad32688b6a85ae8206a5f86f8e64b9d3680201398c1bee2" + sha256 cellar: :any, arm64_ventura: "4cfac020f8c94bf825b0b21b2c56eb77d815d8eff4b935eecc7f69825ac7f69d" + sha256 cellar: :any, arm64_monterey: "dad0483f7c96479a293715d97dab14df9cc1fbec0378f2bf97fc17b64aa2c2e5" + sha256 cellar: :any, sonoma: "cde422f8be856275c3fb3d2092929101bafcbbee62cb9486d1b59378b02b004a" + sha256 cellar: :any, ventura: "104c954cb700c12c225829809d209c7c5861c57ef05a0ada3f9cb0e6e8a61935" + sha256 cellar: :any, monterey: "a449794eaa411f25d9df192964a641bb773cbe80b0f873cd158a1dbd1e1d45c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d28856a30a244da835dc65df83285e22c654e7e449e56d0cf2a7748bc9ede283" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2980951404674b5fc9a6957d6fe7ebb8ae0ded37f3c0c444c732115f5b3f6638" + end + + depends_on "gsl" + + uses_from_macos "sqlite" + + on_macos do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # Fix compilation with POSIX basename(3) + # Patches already accepted upstream, remove on next release + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/apophenia/posix-basename.diff" + sha256 "9d8d92c850cdb671032679e3ef46dafda96ffa6daf39769573392605cea41af3" + end + + def install + # Regenerate configure to avoid binaries being built with flat namespace + system "autoreconf", "--force", "--install", "--verbose" if OS.mac? + + args = std_configure_args - ["--disable-debug"] + system "./configure", *args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"foo.csv").write <<~CSV + thud,bump + 1,2 + 3,4 + 5,6 + 7,8 + CSV + + expected_gnuplot_output = <<~EOS + plot '-' with lines + 1\t 2 + 3\t 4 + 5\t 6 + 7\t 8 + EOS + + system bin/"apop_text_to_db", testpath/"foo.csv", "bar", testpath/"baz.db" + sqlite_output = shell_output("sqlite3 baz.db '.mode csv' '.headers on' 'select * from bar'") + assert_equal (testpath/"foo.csv").read, sqlite_output.gsub(/\r\n?/, "\n") + + query_output = shell_output("#{bin}/apop_plot_query -d #{testpath/"baz.db"} -q 'select thud,bump from bar' -f-") + assert_equal query_output, expected_gnuplot_output + end +end diff --git a/Formula/a/apparix.rb b/Formula/a/apparix.rb new file mode 100644 index 0000000000000..61145cdcb64f9 --- /dev/null +++ b/Formula/a/apparix.rb @@ -0,0 +1,41 @@ +class Apparix < Formula + desc "File system navigation via bookmarking directories" + homepage "https://micans.org/apparix/" + url "https://micans.org/apparix/src/apparix-11-062.tar.gz" + sha256 "211bb5f67b32ba7c3e044a13e4e79eb998ca017538e9f4b06bc92d5953615235" + license "GPL-3.0-or-later" + + livecheck do + skip "No version information available" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be86c4c318c45b049209995839f8bc3d5fd58d872595672ccd5399e7d081f77e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c47c60a9ddde3d173404c7337080bf1cbd8c8d314b78092f02068a3fa5a689e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15fd7b26fab6e5f2f5d2874ec6d7790b17b6df6fef078d8f2691560e86fb1295" + sha256 cellar: :any_skip_relocation, arm64_ventura: "185b92258d1ca2a1aeb6cb068f1fc1fdd13415aa3f730fac1eaa998fef099653" + sha256 cellar: :any_skip_relocation, arm64_monterey: "376d5af089ec2f8fc405e043142976cff8f2005b0338711e572008062298326f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d6fddf44a334a107525c10d79840a52c7298a822e39aa74a6b12d713b9a59bff" + sha256 cellar: :any_skip_relocation, sonoma: "57755cd04d59e11e725962bb70a274dfc5c732c4020691431d73d1c3f14f7ecb" + sha256 cellar: :any_skip_relocation, ventura: "f8146185bc73258782bfed5b8155d7f20bcaf74cbc14de2ecb94316247e397be" + sha256 cellar: :any_skip_relocation, monterey: "7409c547247d36188c88db44981e1b60174b34d627fbf181be554ce25498e4a8" + sha256 cellar: :any_skip_relocation, big_sur: "a7c4e0d0754712277af33217475b179c898bbd965b5bff85f845658791eda9f8" + sha256 cellar: :any_skip_relocation, catalina: "27524421291472bcc5ef8dc6a19d7b6cb7aab1d6a7dffd326c4594a11f3ce4e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "b30647a456f6b9b5d8990f73fc9cf1ef2f4456a666123f396914fb56a136af18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0597c7147ee8a66fe491ccb3e8c386e1580953cc1eedbc9ddbb0349037f312d7" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + mkdir "test" + system bin/"apparix", "--add-mark", "homebrew", "test" + assert_equal "j,homebrew,test", + shell_output("#{bin}/apparix -lm homebrew").chomp + end +end diff --git a/Formula/a/appium.rb b/Formula/a/appium.rb new file mode 100644 index 0000000000000..43dc82b54b30d --- /dev/null +++ b/Formula/a/appium.rb @@ -0,0 +1,50 @@ +class Appium < Formula + desc "Automation for Apps" + homepage "https://appium.io/" + url "https://registry.npmjs.org/appium/-/appium-3.1.0.tgz" + sha256 "7b99c3b9369c1153b28f65924b3becc54473f5e8e321cfd8bfdcba0393d688af" + license "Apache-2.0" + head "https://github.com/appium/appium.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5f59248aaae23303ec920a2150cdf73287b66d5d1600653d5ef5bf4798c26758" + sha256 cellar: :any, arm64_sequoia: "c6038dc285224ca95469c4be6300dd1b8b56b32c1fc40c2961090bbb8593e84a" + sha256 cellar: :any, arm64_sonoma: "c6038dc285224ca95469c4be6300dd1b8b56b32c1fc40c2961090bbb8593e84a" + sha256 cellar: :any, sonoma: "a9987eab2dc3d8c97f103c68101cc4ab4c54840e363d770b77fd46ff71c06245" + sha256 cellar: :any_skip_relocation, arm64_linux: "020a4e007df5d7ae1398dc34e737bc7b0414a07c1ee1c008694dc9c0ba230e44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72da5540d9a2e4214bb00d1d3e145a511eb931bc101e50547d948cf98c1a63d1" + end + + depends_on "node" + + on_linux do + depends_on "vips" + end + + def install + system "npm", "install", *std_npm_args, "--chromedriver-skip-install" + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + service do + run opt_bin/"appium" + environment_variables PATH: std_service_path_env + keep_alive true + error_log_path var/"log/appium-error.log" + log_path var/"log/appium.log" + working_dir var + end + + test do + output = shell_output("#{bin}/appium server --show-build-info") + assert_match version.to_s, JSON.parse(output)["version"] + + output = shell_output("#{bin}/appium driver list 2>&1") + assert_match "uiautomator2", output + + output = shell_output("#{bin}/appium plugin list 2>&1") + assert_match "images", output + + assert_match version.to_s, shell_output("#{bin}/appium --version") + end +end diff --git a/Formula/a/apprise.rb b/Formula/a/apprise.rb new file mode 100644 index 0000000000000..7ef8fb7f07ed1 --- /dev/null +++ b/Formula/a/apprise.rb @@ -0,0 +1,97 @@ +class Apprise < Formula + include Language::Python::Virtualenv + + desc "Send notifications from the command-line to popular notification services" + homepage "https://pypi.org/project/apprise/" + url "https://files.pythonhosted.org/packages/60/16/e39338b8310af9466fab6f4482b542e24cb1fcbb7e36bf00c089c4e015e7/apprise-1.9.5.tar.gz" + sha256 "8f3be318bb429c2017470e33928a2e313cbf7600fc74b8184782a37060db366a" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b09464f2cd97606cd7ade6149ff5ee12c02d6813467bbe348c33ffff26e795ec" + sha256 cellar: :any, arm64_sequoia: "f2b365edd57773f103e68674a0b00c50f0778c0b5533124b5726f366b44554d2" + sha256 cellar: :any, arm64_sonoma: "731ba916cf99f464ba07cd758c3e04ed7379294a1c4d8cc72720866024fc846b" + sha256 cellar: :any, sonoma: "4a17373dab8009ff5df9533a22cbff84c7fd8cfea0fb2555889b4d8c9561cdb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb69778718cf93a4451a7645b6b233360e49c20e82bedc1b6a54fc184644af0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53a79d91023be849d3cd9b00f17acc30eded33d92edb1af03dc2adc2c42acc65" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"apprise", shell_parameter_format: :click) + end + + test do + # Setup a custom notifier that can be passed in as a plugin + file = testpath/"brewtest_notifier.py" + file.write <<~PYTHON + from apprise.decorators import notify + + @notify(on="brewtest") + def my_wrapper(body, title, *args, **kwargs): + # A simple test - print to screen + print("{}: {}".format(title, body)) + PYTHON + + charset = Array("A".."Z") + Array("a".."z") + Array(0..9) + title = charset.sample(32).join + body = charset.sample(256).join + + # Run the custom notifier and make sure the output matches the expected value + assert_match "#{title}: #{body}", + shell_output("#{bin}/apprise -P \"#{file}\" -t \"#{title}\" -b \"#{body}\" \"brewtest://\" 2>&1") + end +end diff --git a/Formula/a/appstream-glib.rb b/Formula/a/appstream-glib.rb new file mode 100644 index 0000000000000..b16bb4525907c --- /dev/null +++ b/Formula/a/appstream-glib.rb @@ -0,0 +1,88 @@ +class AppstreamGlib < Formula + desc "Helper library for reading and writing AppStream metadata" + homepage "https://github.com/hughsie/appstream-glib" + url "https://github.com/hughsie/appstream-glib/archive/refs/tags/appstream_glib_0_8_3.tar.gz" + sha256 "15ad7690b0132d883bd066699a7b55f6cef4c0f266d18d781ce5d8112fb4ee63" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2587f394775fa2f8b69be4db40c9bbe66d5b4d961803ac90e8f7b0e67c171259" + sha256 cellar: :any, arm64_sequoia: "8b7403b1054de2416fa93563425321346b3f19e0828dc570eda83d6275892c69" + sha256 cellar: :any, arm64_sonoma: "436c07f995a7eebb35d00956d96b5a3a7839fe406ad2ecfcb870ba47c2fe14cf" + sha256 cellar: :any, arm64_ventura: "5fc017681fbd7c6900cc1a81412d922d681266fc53842b81b14b76975a4ec76e" + sha256 cellar: :any, arm64_monterey: "ec5bcbd5802db3070ef6f9e2401608d45e1a0b26820342dab42b7b123861298e" + sha256 cellar: :any, sonoma: "9ee04a0e10295134da81fe789ff2acac90c3d64ffb2d33a5e6700a4bdd5f6a6c" + sha256 cellar: :any, ventura: "ea40ca29ab320034cc36833efd33aa20c8ebe128fb013bfa3e2a3cef4e3eecc6" + sha256 cellar: :any, monterey: "648ab1fde37e8da156d657d26c5f9d5e2b2d18acf36896c7cf9508f11819ab25" + sha256 arm64_linux: "a8eb70a5bc4dcbbe274a1ad1ce81f8aa99738e8db59996f6e6c10c6c3294eb0f" + sha256 x86_64_linux: "e3817d099c3f3d7bcdb0aec2920ff5b92e76454398d4efda5acb72c6d2ac4a1f" + end + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "json-glib" + depends_on "libarchive" + + uses_from_macos "gperf" => :build + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "util-linux" + end + + # see https://github.com/hughsie/appstream-glib/issues/258 + patch :DATA + + def install + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "meson", "setup", "build", "-Dbuilder=false", "-Drpm=false", "-Ddep11=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + AsScreenshot *screen_shot = as_screenshot_new(); + g_assert_nonnull(screen_shot); + return 0; + } + C + + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libarchive"].opt_lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs appstream-glib").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + system bin/"appstream-util", "--help" + end +end + +__END__ +diff --git a/libappstream-glib/meson.build b/libappstream-glib/meson.build +index 5f726b0..7d29ac8 100644 +--- a/libappstream-glib/meson.build ++++ b/libappstream-glib/meson.build +@@ -136,7 +136,6 @@ asglib = shared_library( + dependencies : deps, + c_args : cargs, + include_directories : include_directories('..'), +- link_args : vflag, + link_depends : mapfile, + install : true, + ) diff --git a/Formula/a/appstream.rb b/Formula/a/appstream.rb new file mode 100644 index 0000000000000..71422a618d80d --- /dev/null +++ b/Formula/a/appstream.rb @@ -0,0 +1,103 @@ +class Appstream < Formula + desc "Tools and libraries to work with AppStream metadata" + homepage "https://www.freedesktop.org/wiki/Distributions/AppStream/" + url "https://github.com/ximion/appstream/archive/refs/tags/v1.1.1.tar.gz" + sha256 "1615468b8d1e5edb9a9081f81841c8a22439c64bee5f02b008b3b8d5a5204c91" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_tahoe: "5c4d63f882c37a0fa88eb063ba6729e50828c90a3557275cfdb2fcd95c6be689" + sha256 arm64_sequoia: "0cbd344f90288c94a3fb50f2760c5534d94ffb0341fe1cdfb95b5e9722e1cbdc" + sha256 arm64_sonoma: "2f89708646bad98fa12c7603f28bc69c073c8affe2ae4a06d4c21aa872639d0c" + sha256 sonoma: "691460ba1870714a88becef552e7a7fc5cb160420c16341f7dd1d1a716f036e9" + sha256 arm64_linux: "a70d63095e2f7e86633c882a6558b58d5e8e404130e6827f9bfdfb436c38e2b5" + sha256 x86_64_linux: "57debd4845aff350063efe15835c806cd24b3b6ba41ce722678ada6b1c4e0ab3" + end + + depends_on "gobject-introspection" => :build + depends_on "gtk-doc" => :build + depends_on "itstool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "glib" + depends_on "libfyaml" + depends_on "libxmlb" + depends_on "zstd" + + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "gettext" => :build + depends_on "gperf" => :build + depends_on "systemd" + end + + # fix macos build, upstream PR ref, https://github.com/ximion/appstream/pull/556 + patch do + url "https://github.com/ximion/appstream/commit/06eeffe7eba5c4e82a1dd548e100c6fe4f71b413.patch?full_index=1" + sha256 "d0ad5853d451eb073fc64bd3e9e58e81182f4142220e0f413794752cda235d28" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + inreplace "meson.build", "/usr/include", prefix.to_s + + args = %w[ + -Dstemming=false + -Dvapi=true + -Dgir=true + -Ddocs=false + -Dapidocs=false + -Dinstall-docs=false + ] + + args << "-Dsystemd=false" if OS.mac? + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"appdata.xml").write <<~XML + + + org.test.test-app + Test App + + XML + (testpath/"test.c").write <<~C + #include "appstream.h" + + int main(int argc, char *argv[]) { + GFile *appdata_file; + char *appdata_uri; + AsMetadata *metadata; + GError *error = NULL; + char *resource_path = "#{testpath}/appdata.xml"; + appdata_file = g_file_new_for_path (resource_path); + metadata = as_metadata_new (); + if (!as_metadata_parse_file (metadata, appdata_file, AS_FORMAT_KIND_UNKNOWN, &error)) { + g_error ("Could not parse metadata file: %s", error->message); + g_clear_error (&error); + } + } + C + flags = shell_output("pkg-config --cflags --libs appstream").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + + assert_match version.to_s, shell_output("#{bin}/appstreamcli --version") + end +end diff --git a/Formula/a/apptainer.rb b/Formula/a/apptainer.rb new file mode 100644 index 0000000000000..ca071101481ad --- /dev/null +++ b/Formula/a/apptainer.rb @@ -0,0 +1,47 @@ +class Apptainer < Formula + desc "Application container and unprivileged sandbox platform for Linux" + homepage "https://apptainer.org/" + url "https://github.com/apptainer/apptainer/releases/download/v1.4.4/apptainer-1.4.4.tar.gz" + sha256 "eb806e22dabfb6549c398b55e50c747e4c51b57f8879da9e29813de40af54b48" + license "BSD-3-Clause" + head "https://github.com/apptainer/apptainer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "64b09a15fe0c2e9197bd9d44b303818a8917e4e26643f196d215abfb2a598e57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39b57c560205f3f4e2b1834c1c9d7b74a545b50934a4ae592b47587f00bd221e" + end + + # No relocation, the localstatedir to find configs etc is compiled into the program + pour_bottle? only_if: :default_prefix + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "libseccomp" + depends_on :linux + depends_on "squashfs" + + def install + ENV["CGO_ENABLED"] = "1" if Hardware::CPU.arm? + + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --localstatedir=#{var} + --without-suid + -P release-stripped + -v + ] + ENV.O0 + system "./mconfig", *args + cd "./builddir" do + system "make" + system "make", "install" + end + end + + test do + assert_match(/There are [0-9]+ container file/, shell_output("#{bin}/apptainer cache list")) + # This does not work inside older github runners, but for a simple quick check, run: + # singularity exec library://alpine cat /etc/alpine-release + end +end diff --git a/Formula/a/appwrite.rb b/Formula/a/appwrite.rb new file mode 100644 index 0000000000000..7b7a4fde9ea6c --- /dev/null +++ b/Formula/a/appwrite.rb @@ -0,0 +1,34 @@ +class Appwrite < Formula + desc "Command-line tool for Appwrite" + homepage "https://appwrite.io" + url "https://registry.npmjs.org/appwrite-cli/-/appwrite-cli-11.1.0.tgz" + sha256 "8fdd5373d0eecb9c786ae40ce8825701c24f3129003aa892286b67d774a20d8c" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "de25d5d00033be8a3c6a5b675fc57438109b02a07a53643a3c9ab9f909bf12d7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Ensure uniform bottles + file = libexec/"lib/node_modules/appwrite-cli/lib/commands/update.js" + homebrew_check_str = "scriptPath.includes('/opt/homebrew/') || scriptPath.includes('/usr/local/Cellar/')" + inreplace file do |s| + s.gsub! "scriptPath.includes('/usr/local/lib/node_modules/')", "scriptPath.includes('/lib/node_modules/')" + s.gsub! "scriptPath.includes('/opt/homebrew/lib/node_modules/') ||", "" + s.gsub! homebrew_check_str, "true" + end + end + + test do + output = shell_output("#{bin}/appwrite client --endpoint http://localhost/v1 2>&1", 1) + assert_match "Error: Invalid endpoint", output + + assert_match version.to_s, shell_output("#{bin}/appwrite --version") + end +end diff --git a/Formula/a/apr-util.rb b/Formula/a/apr-util.rb new file mode 100644 index 0000000000000..795eaec0f34ad --- /dev/null +++ b/Formula/a/apr-util.rb @@ -0,0 +1,64 @@ +class AprUtil < Formula + desc "Companion library to apr, the Apache Portable Runtime library" + homepage "https://apr.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=apr/apr-util-1.6.3.tar.bz2" + mirror "https://archive.apache.org/dist/apr/apr-util-1.6.3.tar.bz2" + sha256 "a41076e3710746326c3945042994ad9a4fcac0ce0277dd8fea076fec3c9772b5" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "c1b6ca1239679046b74a5ea73032f87a83cbc9c503455a0cf3bc12a54777a03d" + sha256 arm64_sequoia: "6d3282873dffcfed602c5cfb7eb5ddad4b7115aaa954e191dfd4b733a58ef43e" + sha256 arm64_sonoma: "e21a775a4cd6e721ad4f09cd7ed0355b5a1181ca8ad6834911a045c8f076eb01" + sha256 arm64_ventura: "cb73075171b2079d2b8e8028f42766dffa5db08882261c3f5aff59d8eb9638a9" + sha256 arm64_monterey: "e4a7a42c82ae44bb192b2f718af4ced48d34560325b63d5c653a5c569edf759f" + sha256 arm64_big_sur: "689fd5b76d98449ae31a78ac1380412248ce10a91409c7c1e16d4e2efbd2a32e" + sha256 sonoma: "a59301c0e98b321c57fc3c8fac679a1e1bcdd5bce470fef60adc240f9c575674" + sha256 ventura: "127d4d4523d49a73e7dbf610f3e439ac2051a383edbf28cc18438faf78945ef0" + sha256 monterey: "1d6b4a8fed8cbec1e7056432a378b27455454f7b69de61a227d452a7b4671551" + sha256 big_sur: "92bfab4310f0b384081f1997054f207e0d03c97e067407a328e19148a0132375" + sha256 arm64_linux: "830c11d6eb7e0d08d27adeac35c24865e6a49c1bef237b6dc704ca4057062a7d" + sha256 x86_64_linux: "5ad68f7525d3368b7e1fae3157c0338fffad2d33a907413c87ce8728c2e19378" + end + + keg_only :shadowed_by_macos, "Apple's CLT provides apr (but not apr-util)" + + depends_on "apr" + depends_on "openssl@3" + + uses_from_macos "expat" + uses_from_macos "libxcrypt" + uses_from_macos "sqlite" + + on_linux do + depends_on "mawk" + depends_on "unixodbc" + end + + def install + system "./configure", *std_configure_args, + "--with-apr=#{Formula["apr"].opt_prefix}", + "--with-crypto", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--without-pgsql" + + system "make" + system "make", "install" + + # Install symlinks so that linkage doesn't break for reverse dependencies. + # This should be removed on the next ABI breaking update. + (libexec/"lib").install_symlink Dir["#{lib}/#{shared_library("*")}"] + + rm Dir[lib/"**/*.{la,exp}"] + + # No need for this to point to the versioned path. + inreplace bin/"apu-#{version.major}-config", prefix, opt_prefix + end + + test do + assert_match opt_prefix.to_s, shell_output("#{bin}/apu-#{version.major}-config --prefix") + end +end diff --git a/Formula/a/apr.rb b/Formula/a/apr.rb new file mode 100644 index 0000000000000..f015cc3a16c04 --- /dev/null +++ b/Formula/a/apr.rb @@ -0,0 +1,58 @@ +class Apr < Formula + desc "Apache Portable Runtime library" + homepage "https://apr.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=apr/apr-1.7.6.tar.bz2" + mirror "https://archive.apache.org/dist/apr/apr-1.7.6.tar.bz2" + sha256 "49030d92d2575da735791b496dc322f3ce5cff9494779ba8cc28c7f46c5deb32" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a8dbcf3f996ba1148b936081612ff5228cb4ba5a08de6635a695bd9ec6963266" + sha256 cellar: :any, arm64_sequoia: "58a68eee9f289319c41100b42bddbaa265366c093e0c0f83e4295c7a535d7395" + sha256 cellar: :any, arm64_sonoma: "d89324cbc51a250e109e00dc2e90ce77611058027060c39c83bb771118502332" + sha256 cellar: :any, arm64_ventura: "c9c536ea3504e24b30b5cf6187100f746eba704e237d3839d0c04feb98df623e" + sha256 cellar: :any, sonoma: "fdf0f628598225db7ea43128abaf944011df61e2469811709c250607745b8570" + sha256 cellar: :any, ventura: "327273dae10ae18781b2f347531253d968e0c06533c913a80d775a5972e65477" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee70c4b7041ea9743a1f87c8c0c9dc14e7a3372ab5d5e073912913b83cf2bcc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a52537b5ff653a7c477dd67be99faeb1684d3002cd9afe6c24501118083a6154" + end + + keg_only :provided_by_macos, "Apple's CLT provides apr" + + uses_from_macos "libxcrypt" + + on_linux do + depends_on "util-linux" + end + + def install + # https://bz.apache.org/bugzilla/show_bug.cgi?id=57359 + # The internal libtool throws an enormous strop if we don't do... + ENV.deparallelize + + system "./configure", *std_configure_args + system "make", "install" + + rm lib.glob("*.{la,exp}") + + # No need for this to point to the versioned path. + inreplace bin/"apr-#{version.major}-config", prefix, opt_prefix + + # Avoid references to the Homebrew shims directory + inreplace prefix/"build-#{version.major}/libtool", Superenv.shims_path, "/usr/bin" if OS.linux? + end + + test do + assert_match opt_prefix.to_s, shell_output("#{bin}/apr-#{version.major}-config --prefix") + (testpath/"test.c").write <<~C + #include + #include + int main() { + printf("%s", apr_version_string()); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lapr-#{version.major}", "-o", "test" + assert_equal version.to_s, shell_output("./test") + end +end diff --git a/Formula/a/apt-dater.rb b/Formula/a/apt-dater.rb new file mode 100644 index 0000000000000..266429a7cb1d9 --- /dev/null +++ b/Formula/a/apt-dater.rb @@ -0,0 +1,61 @@ +class AptDater < Formula + desc "Manage package updates on remote hosts using SSH" + homepage "https://github.com/DE-IBH/apt-dater" + url "https://github.com/DE-IBH/apt-dater/archive/refs/tags/v1.0.4.tar.gz" + sha256 "a4bd5f70a199b844a34a3b4c4677ea56780c055db7c557ff5bd8f2772378a4d6" + license "GPL-2.0-or-later" + revision 1 + version_scheme 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "cfed8555fc3c444c0146d47d4715b81c0898b29997fb139a76db99565417bd08" + sha256 arm64_sequoia: "e89784e139fbbe28d5b78275b2242171bac80c2ef9499613154b3e7811c08468" + sha256 arm64_sonoma: "2f391ec78361caf2e94d1e63cc21f0b1f00939ada71065b215e41f798025018f" + sha256 arm64_ventura: "c22ae498b3b9ffaa679ccf61ce23dc2938d2acd6960db44c422269c2673cab2a" + sha256 arm64_monterey: "fe34f1009b1e42d85afbcbbae7c61554e6ebe527112d8249430f896661c82817" + sha256 sonoma: "34b892275adfc73fe17bd925f2cf7a29b9f02d29c84dca818b46a1d9e5faf6ac" + sha256 ventura: "bdd43755453bb7b579382091ce430bc9d16bb8fbf128ece766b92034ff547963" + sha256 monterey: "3bcfbb9b3f6648f528de329d439840049cabfcb55d81757eebb74f3da88e7ad3" + sha256 arm64_linux: "b80fdf17b885b19e6c905fd64524968669f4cd80aed8119526377ad774c3c62b" + sha256 x86_64_linux: "0aa11ef9c978a52cc0b1941bd4484df092e4dd1c0682f616692b30bc894feb85" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "popt" + + uses_from_macos "libxml2" + uses_from_macos "ncurses" + + on_macos do + depends_on "coreutils" => :build # for `date -d` + depends_on "gettext" + end + + # Fix incorrect args to g_strlcpy + # Part of open PR: https://github.com/DE-IBH/apt-dater/pull/182 + patch do + url "https://github.com/DE-IBH/apt-dater/commit/70a6e4a007d2bbd891442794080ab4fe713a6f94.patch?full_index=1" + sha256 "de100e8ddd576957e7e2ac6cb5ac43e55235c4031efd7ee6fd0e0e81b7b0b2f4" + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + # Global config overrides local config, so delete global config to prioritize the + # config in $HOME/.config/apt-dater + rm_r(prefix/"etc") + end + + test do + system bin/"apt-dater", "-v" + end +end diff --git a/Formula/a/apt.rb b/Formula/a/apt.rb new file mode 100644 index 0000000000000..4155c4bf15a0f --- /dev/null +++ b/Formula/a/apt.rb @@ -0,0 +1,92 @@ +class Apt < Formula + desc "Advanced Package Tool" + homepage "https://wiki.debian.org/Apt" + # Using git tarball as Debian does not retain old versions at deb.debian.org + url "https://salsa.debian.org/apt-team/apt/-/archive/3.1.11/apt-3.1.11.tar.bz2" + sha256 "bd4cca1f23e5618fdce907000ad5b6d4ea658cebfd986de8b2a5cce7b84cb7e2" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/a/apt/" + regex(/href=.*?apt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "a7b9f56eec93e22e62b39ecfb48a281440a173fd6d2de68006bfe5966c78a99e" + sha256 x86_64_linux: "56faa2a3dad5b958322b0a64700b54d2159cc9d502dae3d0d87f02b24471e30a" + end + + keg_only "it conflicts with system apt" + + depends_on "cmake" => :build + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + depends_on "doxygen" => :build + depends_on "gettext" => :build + depends_on "libxslt" => :build + depends_on "po4a" => :build + depends_on "w3m" => :build + + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL-3.0 restrictions + depends_on "bzip2" + depends_on "dpkg" + depends_on :linux + depends_on "lz4" + depends_on "openssl@3" + depends_on "perl" + depends_on "sequoia-sqv" + depends_on "systemd" + depends_on "xxhash" + depends_on "xz" + depends_on "zlib" + depends_on "zstd" + + resource "triehash" do + url "https://github.com/julian-klode/triehash/archive/refs/tags/v0.3.tar.gz" + sha256 "289a0966c02c2008cd263d3913a8e3c84c97b8ded3e08373d63a382c71d2199c" + end + + # Add missing header + patch :DATA + + def install + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + ENV.prepend_path "PATH", buildpath/"bin" + + resource("triehash").stage do + (buildpath/"bin").install "triehash.pl" => "triehash" + end + + system "cmake", "-S", ".", "-B", "build", + "-DDPKG_DATADIR=#{Formula["dpkg"].opt_libexec}/share/dpkg", + "-DDOCBOOK_XSL=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl", + "-DBERKELEY_INCLUDE_DIRS=#{Formula["berkeley-db@5"].opt_include}", + "-DWITH_TESTS=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgetc/"apt.conf.d").mkpath + end + + test do + assert_match "apt does not have a stable CLI interface. Use with caution in scripts", + shell_output("#{bin}/apt list 2>&1") + end +end + +__END__ +diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc +index 7ea1878..117644d 100644 +--- a/apt-private/private-cmndline.cc ++++ b/apt-private/private-cmndline.cc +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + + #include diff --git a/Formula/a/aptly.rb b/Formula/a/aptly.rb new file mode 100644 index 0000000000000..b2e479c80c9ec --- /dev/null +++ b/Formula/a/aptly.rb @@ -0,0 +1,44 @@ +class Aptly < Formula + desc "Swiss army knife for Debian repository management" + homepage "https://www.aptly.info/" + url "https://github.com/aptly-dev/aptly/archive/refs/tags/v1.6.2.tar.gz" + sha256 "cadfabda2a59f397adfe6f9ce3c9ddc6fe4c6052f0e03a300ba1f22d7cf0e09a" + license "MIT" + head "https://github.com/aptly-dev/aptly.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ba67fa93b8c34004f46f52be6bb9db588833f14e195c7225184a6a8bc3ad14e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5eed18d1e90c95d9f9d27c1bb4071b5918df5102d674ed4377f5ed48bb19963c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5eed18d1e90c95d9f9d27c1bb4071b5918df5102d674ed4377f5ed48bb19963c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5eed18d1e90c95d9f9d27c1bb4071b5918df5102d674ed4377f5ed48bb19963c" + sha256 cellar: :any_skip_relocation, sonoma: "13d85438f90917d1e5e0ec47d983373305e5cdf6880c8eca78d95dff2c6c6e29" + sha256 cellar: :any_skip_relocation, ventura: "13d85438f90917d1e5e0ec47d983373305e5cdf6880c8eca78d95dff2c6c6e29" + sha256 cellar: :any_skip_relocation, arm64_linux: "816f00ebfe70c1dfeba581f6b8b3e046b727b7cd1c0aa49e2213814e4b22d505" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff56ef982a5265758be69344b4d222bebb20bc969382bffc6110604a627e3f2d" + end + + depends_on "go" => :build + + def install + system "go", "generate" + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + + bash_completion.install "completion.d/aptly" + zsh_completion.install "completion.d/_aptly" + + man1.install "man/aptly.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/aptly version") + + (testpath/".aptly.conf").write("{}") + result = shell_output("#{bin}/aptly -config='#{testpath}/.aptly.conf' mirror list") + assert_match "No mirrors found, create one with", result + end +end diff --git a/Formula/a/aptos.rb b/Formula/a/aptos.rb new file mode 100644 index 0000000000000..de03ec321a1bc --- /dev/null +++ b/Formula/a/aptos.rb @@ -0,0 +1,50 @@ +class Aptos < Formula + desc "Layer 1 blockchain built to support fair access to decentralized assets for all" + homepage "https://aptosfoundation.org/" + url "https://github.com/aptos-labs/aptos-core/archive/refs/tags/aptos-cli-v7.10.2.tar.gz" + sha256 "643a8e8d73dccb67e95117dd444679bd286281da877a6ad7271ece7b2b7baecb" + license "Apache-2.0" + head "https://github.com/aptos-labs/aptos-core.git", branch: "main" + + livecheck do + url :stable + regex(/^aptos-cli[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "30b699b9c7e523e80d88f874449e0bb1f062a778636a93e84c0505e318b5afd5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37ab2cc1f0cbae2a3efd49c3d47dbb231266984ce4a040b954a88f5a8def6733" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5407004f7aff8333e94de402cdb80990c21b6565b03816069ed970d656e54d86" + sha256 cellar: :any_skip_relocation, sonoma: "cdf91a916c54438196c62200e2d0cb7a2dfaaeb10d7577e7c4475fb6aefc43f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e90c489f6e32c56912a1c2869e473f01e2c32ead3884b677293e69394cb50ab0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ba02e88138c5fdf11aed36b90a0bd4bd73e6c22d69f5dc264dd74ecf7f04a44" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + + on_linux do + depends_on "lld" => :build + depends_on "pkgconf" => :build + depends_on "zip" => :build + depends_on "elfutils" + depends_on "openssl@3" + depends_on "systemd" + end + + def install + # Use correct compiler to prevent blst from enabling AVX support on macOS + # upstream issue report, https://github.com/supranational/blst/issues/253 + ENV["CC"] = Formula["llvm"].opt_bin/"clang" if OS.mac? + + system "cargo", "install", *std_cargo_args(path: "crates/aptos"), "--profile=cli" + end + + test do + assert_match(/output.pub/i, shell_output("#{bin}/aptos key generate --output-file output")) + end +end diff --git a/Formula/a/aqbanking.rb b/Formula/a/aqbanking.rb new file mode 100644 index 0000000000000..38fc522c77b1d --- /dev/null +++ b/Formula/a/aqbanking.rb @@ -0,0 +1,78 @@ +class Aqbanking < Formula + desc "Generic online banking interface" + homepage "https://www.aquamaniac.de/rdm/projects/aqbanking" + url "https://www.aquamaniac.de/rdm/attachments/download/548/aqbanking-6.6.4.tar.gz" + sha256 "a25c209538fa163f3749676a084493c9a43d9045a945aeee2db25dfd9a502b7f" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.aquamaniac.de/rdm/projects/aqbanking/files" + regex(/href=.*?aqbanking[._-](\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "290db8be664463305324ef1fbcfc7a099d0c7cde5adf26ba17382846935a584b" + sha256 arm64_sequoia: "b985704676223c04fc03a105140aab9e751a65d6835a5b66a6f44054891d0b84" + sha256 arm64_sonoma: "35919380f881247c239d3bb486d6ac5e415b01135955c634e103dfa4640dced1" + sha256 sonoma: "8b549c2edc5250cd4a2e29b767022a1fccc2dd0d2574d5acb1b9022d25edcb1d" + sha256 arm64_linux: "4b821d035a16ba1e42f5553a7ec80b78895a44510098c26785047f92cd3f874b" + sha256 x86_64_linux: "e44f6dab27441e02921afaa60265c0b6ccf5fdba95474b76827de4f64e8ea9e4" + end + + depends_on "gmp" + depends_on "gwenhywfar" + depends_on "ktoblzcheck" + depends_on "libxml2" + depends_on "libxmlsec1" + depends_on "libxslt" # Our libxslt links with libgcrypt + depends_on "openssl@3" + depends_on "pkgconf" # aqbanking-config needs pkg-config for execution + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + ENV.deparallelize + + inreplace "aqbanking-config.in.in", "@PKG_CONFIG@", "pkg-config" + system "./configure", "--enable-cli", *std_configure_args + # This is banking software, so let's run the test suite. + system "make", "check" + system "make", "install" + end + + test do + ENV["TZ"] = "UTC" + context = "balance.ctx" + (testpath/context).write <<~EOS + accountInfoList { + accountInfo { + char bankCode="110000000" + char accountNumber="000123456789" + char iban="US44110000000000123456789" + char bic="BYLADEM1001" + char currency="USD" + + balanceList { + balance { + char date="20221212" + char value="-11096%2F100%3AUSD" + char type="booked" + } #balance + } #balanceList + } #accountInfo + } #accountInfoList + EOS + + match = "110000000 000123456789 12.12.2022 -110.96 US44110000000000123456789 BYLADEM1001" + out = shell_output("#{bin}/aqbanking-cli -D .aqbanking listbal " \ + "-T '$(bankcode) $(accountnumber) $(dateAsString) " \ + "$(valueAsString) $(iban) $(bic)' < #{context}") + assert_match match, out.gsub(/\s+/, " ") + end +end diff --git a/Formula/a/aqtinstall.rb b/Formula/a/aqtinstall.rb new file mode 100644 index 0000000000000..f9ff387cc2934 --- /dev/null +++ b/Formula/a/aqtinstall.rb @@ -0,0 +1,151 @@ +class Aqtinstall < Formula + include Language::Python::Virtualenv + + desc "Another unofficial Qt installer" + homepage "https://github.com/miurahr/aqtinstall" + url "https://files.pythonhosted.org/packages/76/19/24a588de6c25d43169d172dab47e63a63cd0d8f90e98cf86487acbf00ac7/aqtinstall-3.3.0.tar.gz" + sha256 "9c7d85fbe7258be2d7d23fda33f8aff2e8b7536817255eaeaaf4226da8546a31" + license "MIT" + revision 2 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "abef19bf515e9576e934c3330e55d883b7f59b6028d6e6de33fa35ae4107426f" + sha256 cellar: :any, arm64_sequoia: "e4a15fbc60056432694b6a5772cfc94a48db856fdf3235c1f35a0a4646f9da0b" + sha256 cellar: :any, arm64_sonoma: "30e9aed605e70786aaae67e5c3aed12f9f3d62e91f3eb4b8899a9f64f5b75f14" + sha256 cellar: :any, sonoma: "50b754e47f0d447c9f22749f956f7a1eac2b81009ff44596f9ec4364db3cea86" + sha256 cellar: :any_skip_relocation, arm64_linux: "a138aaab502c7160722522b0d300b41f8c8a3065687120039abd465d3b459b8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c25d70cad63fd3a0a438cc81da9f4026a41a62161aedab9a3a903956c5c50a34" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + depends_on "zstd" + + pypi_packages exclude_packages: "certifi" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "brotli" do + url "https://files.pythonhosted.org/packages/2f/c2/f9e977608bdf958650638c3f1e28f85a1b075f075ebbe77db8555463787b/Brotli-1.1.0.tar.gz" + sha256 "81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724" + end + + resource "bs4" do + url "https://files.pythonhosted.org/packages/c9/aa/4acaf814ff901145da37332e05bb510452ebed97bc9602695059dd46ef39/bs4-0.0.2.tar.gz" + sha256 "a48685c58f50fe127722417bae83fe6badf500d54b55f7e39ffe43b798653925" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "inflate64" do + url "https://files.pythonhosted.org/packages/dd/8c/3a7ac7e1931bd1bca5f8e3687f7611083f6a79aae02b9cd6b7ce1fb4a8d0/inflate64-1.0.1.tar.gz" + sha256 "3b1c83c22651b5942b35829df526e89602e494192bf021e0d7d0b600e76c429d" + end + + resource "multivolumefile" do + url "https://files.pythonhosted.org/packages/50/f0/a7786212b5a4cb9ba05ae84a2bbd11d1d0279523aea0424b6d981d652a14/multivolumefile-0.2.3.tar.gz" + sha256 "a0648d0aafbc96e59198d5c17e9acad7eb531abea51035d08ce8060dcad709d6" + end + + resource "patch-ng" do + url "https://files.pythonhosted.org/packages/65/bb/ebd7c6058dcfbf634986f9a8b3fb638f3269501c73701a48b7530042da5b/patch-ng-1.19.0.tar.gz" + sha256 "27484792f4ac1c15fe2f3e4cecf74bb9833d33b75c715b71d199f7e1e7d1f786" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "py7zr" do + url "https://files.pythonhosted.org/packages/97/62/d6f18967875aa60182198a0dd287d3a50d8aea1d844239ea00c016f7be88/py7zr-1.0.0.tar.gz" + sha256 "f6bfee81637c9032f6a9f0eb045a4bfc7a7ff4138becfc42d7cb89b54ffbfef1" + end + + resource "pybcj" do + url "https://files.pythonhosted.org/packages/ce/75/bbcf098abf68081fa27c09d642790daa99d9156132c8b0893e3fecd946ab/pybcj-1.0.6.tar.gz" + sha256 "70bbe2dc185993351955bfe8f61395038f96f5de92bb3a436acb01505781f8f2" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pyppmd" do + url "https://files.pythonhosted.org/packages/f6/d7/b3084ff1ac6451ef7dd93d4f7627eeb121a3bed4f8a573a81978a43ddb06/pyppmd-1.2.0.tar.gz" + sha256 "cc04af92f1d26831ec96963439dfb27c96467b5452b94436a6af696649a121fd" + end + + resource "pyzstd" do + url "https://files.pythonhosted.org/packages/47/82/7bcafbf06ee83a66990ce5badbb8f4dc32184346bab20de7e468b1a2f6ec/pyzstd-0.18.0.tar.gz" + sha256 "81b6851ab1ca2e5f2c709e896a1362e3065a64f271f43db77fb7d5e4a78e9861" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "semantic-version" do + url "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz" + sha256 "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "texttable" do + url "https://files.pythonhosted.org/packages/1c/dc/0aff23d6036a4d3bf4f1d8c8204c5c79c4437e25e0ae94ffe4bbb55ee3c2/texttable-1.7.0.tar.gz" + sha256 "2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + venv = virtualenv_install_with_resources without: "pyzstd" + # We need to build separately to link to our `zstd`. + resource("pyzstd").stage do + system_zstd = "--config-settings=--build-option=--dynamic-link-zstd" + system venv.root/"bin/python", "-m", "pip", "install", system_zstd, + *std_pip_args(prefix: false, build_isolation: true), "." + end + end + + test do + assert_match "clang_64", shell_output("#{bin}/aqt list-qt mac desktop --arch 6.7.0") + assert_match "linux_gcc_64", shell_output("#{bin}/aqt list-qt linux desktop --arch 6.7.0") + end +end diff --git a/Formula/a/aqua.rb b/Formula/a/aqua.rb new file mode 100644 index 0000000000000..7ed7c19d12335 --- /dev/null +++ b/Formula/a/aqua.rb @@ -0,0 +1,38 @@ +class Aqua < Formula + desc "Declarative CLI Version manager" + homepage "https://aquaproj.github.io/" + url "https://github.com/aquaproj/aqua/archive/refs/tags/v2.55.1.tar.gz" + sha256 "534ed9cc19f7a38fcd126b34d3a37993ec4b90105fe12e113ce27cc4218a6290" + license "MIT" + head "https://github.com/aquaproj/aqua.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e691f48d6e680f37c396407bc585f218ab6a93d7024e01b2fce9ab7f6e2bb3de" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e691f48d6e680f37c396407bc585f218ab6a93d7024e01b2fce9ab7f6e2bb3de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e691f48d6e680f37c396407bc585f218ab6a93d7024e01b2fce9ab7f6e2bb3de" + sha256 cellar: :any_skip_relocation, sonoma: "b1b1c119106f5988119f0979b1daf6fb69fbac46cdc2f0bee122dadbbbef0dd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dff2e74bf39baf368435fa6a0ed2380c1347d40bf5915e3d7c7d357c02acdc13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5df0dc645916132d74c1b58f3f60cb97235fc6561f534c83e03a3147e2037738" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/aqua" + + generate_completions_from_executable(bin/"aqua", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/aqua --version") + + system bin/"aqua", "init" + assert_match "depName=aquaproj/aqua-registry", (testpath/"aqua.yaml").read + end +end diff --git a/Formula/a/arabica.rb b/Formula/a/arabica.rb new file mode 100644 index 0000000000000..15c6c5b6dbd97 --- /dev/null +++ b/Formula/a/arabica.rb @@ -0,0 +1,59 @@ +class Arabica < Formula + desc "XML toolkit written in C++" + homepage "https://www.jezuk.co.uk/tags/arabica.html" + url "https://github.com/jezhiggins/arabica/archive/refs/tags/2020-April.tar.gz" + version "20200425" + sha256 "b00c7b8afd2c3f17b5a22171248136ecadf0223b598fd9631c23f875a5ce87fe" + license "BSD-3-Clause" + head "https://github.com/jezhiggins/arabica.git", branch: "main" + + # The formula uses a YYYYMMDD version format, so we have to check the release + # information to generate a version from the publish datetime. + livecheck do + url :stable + regex(/^(\d{4}-\d{2}-\d{2})T.+$/i) + strategy :github_latest do |json, regex| + json["published_at"]&.scan(regex)&.map { |match| match[0].tr("-", "") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c5797a1e8e13b35bfb400c09bd783382c517006dafae47a33204a1f292faddd0" + sha256 cellar: :any, arm64_sequoia: "5448f9dfdd462014fca6f549d3d8e42a8831e7af763ec90ec55d5f9de259a171" + sha256 cellar: :any, arm64_sonoma: "d066bb2e2067e8487d5e161c2c0d438ac331f377b4103833ee4859c6d680540a" + sha256 cellar: :any, arm64_ventura: "0a4fd034a7098d204a0b3c772023f6bc35f024e2f048216fdfe8e589f38cf2a8" + sha256 cellar: :any, arm64_monterey: "3e92d822c2e0c5d314a92e5e26df14b3a84774494fb100f401c3a2d0c7e54768" + sha256 cellar: :any, arm64_big_sur: "6875acb418a0c10026c5356fe927a7c91a1825d8b314599ee1a64a309f30ed77" + sha256 cellar: :any, sonoma: "405046b352e922c38c294c48962a80f041156fc0f56991122fe86f996588c47c" + sha256 cellar: :any, ventura: "6fc9d75c64dc7690bf5c6b4d07642b65cee5f5a7cd582e59dfa22cb5cf8cac07" + sha256 cellar: :any, monterey: "db7acb62fe52ebc6b315b9e1e94cbf5ead317e7856af95efa8d5eeb0a41f62bf" + sha256 cellar: :any, big_sur: "c1a63f10d7451ba663ad8d974a69d83091be30730ca962a2fbd0e36b95ab16d2" + sha256 cellar: :any, catalina: "4fbf676c46941de213b095ab74f0b4973e5984c2bbaa7679757b0db4b369480a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fca2b168c6149c388d0692cecce3959175ef8aeec053cb64c0fa653f2c6553a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "129967d8e801a766a2d8209dff39cc8358bff641249838682ac1a943d0b7d385" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "boost" + + uses_from_macos "expat" + + conflicts_with "nss", because: "both install `mangle` binaries" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make" + system "make", "check" + system "make", "install" + end + + test do + output = shell_output("#{bin}/mangle") + assert_match "mangle is an (in-development) XSLT processor", output + end +end diff --git a/Formula/a/aravis.rb b/Formula/a/aravis.rb new file mode 100644 index 0000000000000..991f722c437b8 --- /dev/null +++ b/Formula/a/aravis.rb @@ -0,0 +1,81 @@ +class Aravis < Formula + desc "Vision library for genicam based cameras" + homepage "https://github.com/AravisProject/aravis" + url "https://github.com/AravisProject/aravis/releases/download/0.8.35/aravis-0.8.35.tar.xz" + sha256 "8089af991fc3a2644ab04b2ddf82623cd663d80c7ebbdefa93ddbc17ea702ddb" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "4a273b81181ee894d4f4403f8b8f4a3a3e3e77c6eb800dc2c6940f5032d9d6b4" + sha256 arm64_sequoia: "5dacbb067602cd6942321a0e548cdff50b237162f12819baf9f2ee34040aa3eb" + sha256 arm64_sonoma: "82e9c7e422b14826f80abac1b17a271ead738e5abf4fe862799d68aad848e803" + sha256 arm64_ventura: "27e3c92eb7b96f192bf0e4d73a358088ada319fb8a10dab041e678d43b8472d9" + sha256 sonoma: "e0eca377a1cf2abfa292ca80b36627376e0bd2f28237876ce5f07cbb97428947" + sha256 ventura: "f08e8cc521c459783db474b8cd887947018393f33cc7eafbe9a00ac908b70b5c" + sha256 arm64_linux: "086dca0e9de5c8780bf98bf202808565b73ec26419f02b5a99fc2c67040329e1" + sha256 x86_64_linux: "50d18122eca4c3b85d4eb4f5fa4fb31d129ade755a4ef3bfde377cc64710814d" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "gtk-doc" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "glib" + depends_on "gstreamer" + depends_on "gtk+3" + depends_on "intltool" + depends_on "libnotify" + depends_on "libusb" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + + def caveats + <<~EOS + For GStreamer to find the bundled plugin: + export GST_PLUGIN_PATH=#{opt_lib}/gstreamer-1.0 + EOS + end + + test do + # The initial plugin load takes a long time without extra permissions on + # macOS, which frequently causes the slower Intel macOS runners to time out. + # + # Ref: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1119 + ENV["GST_PLUGIN_SYSTEM_PATH"] = testpath if OS.mac? && Hardware::CPU.intel? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + lib_ext = OS.mac? ? "dylib" : "so" + output = shell_output("gst-inspect-1.0 #{lib}/gstreamer-1.0/libgstaravis.#{version.major_minor}.#{lib_ext}") + assert_match(/Description *Aravis Video Source/, output) + end +end diff --git a/Formula/a/arcade-learning-environment.rb b/Formula/a/arcade-learning-environment.rb new file mode 100644 index 0000000000000..12b9edd490027 --- /dev/null +++ b/Formula/a/arcade-learning-environment.rb @@ -0,0 +1,138 @@ +class ArcadeLearningEnvironment < Formula + include Language::Python::Virtualenv + + desc "Platform for AI research" + homepage "https://github.com/Farama-Foundation/Arcade-Learning-Environment" + url "https://github.com/Farama-Foundation/Arcade-Learning-Environment/archive/refs/tags/v0.11.2.tar.gz" + sha256 "d6ac9406690bb3533b37a99253bdfc59bc27779c5e1b6855c763d0b367bcbf96" + license "GPL-2.0-only" + revision 1 + head "https://github.com/Farama-Foundation/Arcade-Learning-Environment.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "8f064101937b69531d91019cbe7707ede64b32c80ca1a5c25c654d1659331484" + sha256 cellar: :any, arm64_sequoia: "da30b51a9970f4021b5b868cdae341c1b935e686eaefeb8b736d745db77afa2f" + sha256 cellar: :any, arm64_sonoma: "6812d9341ff79682a410b8e9049595a686f89bdbb60772b6b3b3707c945ec852" + sha256 cellar: :any, sonoma: "77504f7bbe80fcd02974ee91650ce2abf27289a4abf1f4de18c111ea72c7d550" + sha256 cellar: :any_skip_relocation, arm64_linux: "adbb8756e9d7682016e87d35a9a7fd9f5bb4eb9125f7b5a68e96166b3f04ec86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a62c769d2dd61d395d321f74dfbafc5f1b8c38c2df4434ef21d45f0a53e7528" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pybind11" => :build + depends_on "numpy" + depends_on "opencv" + depends_on "python@3.14" + depends_on "sdl2" + + uses_from_macos "zlib" + + pypi_packages exclude_packages: "numpy", + extra_packages: "gymnasium" + + # See https://github.com/Farama-Foundation/Arcade-Learning-Environment/blob/master/scripts/download_unpack_roms.sh + resource "roms" do + url "https://gist.githubusercontent.com/jjshoots/61b22aefce4456920ba99f2c36906eda/raw/00046ac3403768bfe45857610a3d333b8e35e026/Roms.tar.gz.b64" + sha256 "02ca777c16476a72fa36680a2ba78f24c3ac31b2155033549a5f37a0653117de" + end + + resource "cloudpickle" do + url "https://files.pythonhosted.org/packages/52/39/069100b84d7418bc358d81669d5748efb14b9cceacd2f9c75f550424132f/cloudpickle-3.1.1.tar.gz" + sha256 "b216fa8ae4019d5482a8ac3c95d8f6346115d8835911fd4aefd1a445e4242c64" + end + + resource "farama-notifications" do + url "https://files.pythonhosted.org/packages/2e/2c/8384832b7a6b1fd6ba95bbdcae26e7137bb3eedc955c42fd5cdcc086cfbf/Farama-Notifications-0.0.4.tar.gz" + sha256 "13fceff2d14314cf80703c8266462ebf3733c7d165336eee998fc58e545efd18" + end + + resource "gymnasium" do + url "https://files.pythonhosted.org/packages/b3/de/b923d09654df8f8ee29a3cc7ec7829ac057efd0d969cc3da0c8a7b219d59/gymnasium-1.2.1.tar.gz" + sha256 "4e6480273528523a90b3db99befb6111b13f15fa0866de88c4b675770495b66c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def python3 + "python3.14" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DSDL_SUPPORT=ON", + "-DSDL_DYNLOAD=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "tests/resources/tetris.bin" + + # Install ROMs + resource("roms").stage do + require "base64" + + pwd = Pathname.pwd + encoded = (pwd/"Roms.tar.gz.b64").read + (pwd/"Roms.tar.gz").write Base64.decode64(encoded) + + system "tar", "-xzf", "Roms.tar.gz" + (buildpath/"src/python/roms").install pwd.glob("ROM/*/*.bin") + end + + inreplace "setup.py" do |s| + # error: no member named 'signbit' in the global namespace + s.gsub! "cmake_args = [", "\\0\"-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}\"," if OS.mac? + # Remove XLA support for now + s.gsub! "-DBUILD_VECTOR_XLA_LIB=ON", "" + end + # We build without XLA and jax has no sdists + inreplace "pyproject.toml", '"jax >= 0.4.31', "#" + venv = virtualenv_create(libexec, python3) + venv.pip_install resources.select { |r| r.url.start_with?("https://files.pythonhosted.org/") } + venv.pip_install_and_link Pathname.pwd + (prefix/Language::Python.site_packages(python3)/"homebrew-ale.pth").write venv.site_packages + + # Replace vendored `libSDL2` with a symlink to our own. + libsdl2 = Formula["sdl2"].opt_lib/shared_library("libSDL2") + vendored_libsdl2_dir = venv.site_packages/"ale_py" + (vendored_libsdl2_dir/shared_library("libSDL2")).unlink + + # Use `ln_s` to avoid referencing a Cellar path. + ln_s libsdl2.relative_path_from(vendored_libsdl2_dir), vendored_libsdl2_dir + end + + test do + (testpath/"roms.py").write <<~PYTHON + from ale_py.roms import get_all_rom_ids + print(get_all_rom_ids()) + PYTHON + assert_match "adventure", shell_output("#{python3} roms.py") + + cp pkgshare/"tetris.bin", testpath + (testpath/"test.py").write <<~PYTHON + from ale_py import ALEInterface, SDL_SUPPORT + assert SDL_SUPPORT + + ale = ALEInterface() + ale.setInt("random_seed", 123) + ale.loadROM("tetris.bin") + assert len(ale.getLegalActionSet()) == 18 + PYTHON + + output = shell_output("#{python3} test.py 2>&1") + assert_match <<~EOS, output + Game console created: + ROM file: tetris.bin + Cart Name: Tetris 2600 (Colin Hughes) + Cart MD5: b0e1ee07fbc73493eac5651a52f90f00 + EOS + assert_match <<~EOS, output + Running ROM file... + Random seed is 123 + EOS + end +end diff --git a/Formula/a/archey4.rb b/Formula/a/archey4.rb new file mode 100644 index 0000000000000..e87166ed7844f --- /dev/null +++ b/Formula/a/archey4.rb @@ -0,0 +1,40 @@ +class Archey4 < Formula + include Language::Python::Virtualenv + + desc "Simple system information tool written in Python" + homepage "https://github.com/HorlogeSkynet/archey4" + url "https://files.pythonhosted.org/packages/a7/bd/f70b613520c3f683eff6b9ffe5a31ba142bcc1b206db3181606b8e440193/archey4-4.15.0.0.tar.gz" + sha256 "1cf158ab799fa8a5d15deab0a48df306d2788c81de44d0242c3ab1dfa84865ac" + license "GPL-3.0-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b51742b76a0d2c6fa1f889d22c4c1346ff2a1c696adff0e27936ef1b113ee84" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f89f2d74d626422931410d34c7d8b5399ea0751098945065b0225c45751df928" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "892ee32d2fee5bb6c81d0ce7f9d09856eea40d5a1cc47ef3e11d7ff9f534e6d0" + sha256 cellar: :any_skip_relocation, sonoma: "72a8d23ac8b71a3d221173b763cbc0b24741585707134ba3b5a1da295014c721" + sha256 cellar: :any_skip_relocation, arm64_linux: "2903334f800483b711c76502cde2a16ed6a44c8d2ce4ddeae17a9299a230dad6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcf85f57e5437fd832700cf479064e7c1d5ee3582abfe235d9b42c51ffb92f70" + end + + depends_on "python@3.14" + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "netifaces" do + url "https://files.pythonhosted.org/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz" + sha256 "043a79146eb2907edf439899f262b3dfe41717d34124298ed281139a8b93ca32" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match(version.to_s, shell_output("#{bin}/archey -v")) + assert_match(/BSD|Linux|macOS/i, shell_output("#{bin}/archey -j")) + end +end diff --git a/Formula/a/archgw.rb b/Formula/a/archgw.rb new file mode 100644 index 0000000000000..eed2bb2069d0f --- /dev/null +++ b/Formula/a/archgw.rb @@ -0,0 +1,359 @@ +class Archgw < Formula + include Language::Python::Virtualenv + + desc "CLI for Arch Gateway" + homepage "https://github.com/katanemo/archgw/tree/main/arch/tools" + url "https://files.pythonhosted.org/packages/d6/96/90e4129b14fe6fdc03692818ee2831d51eb6759d6e17ce880c9cc70c74b8/archgw-0.3.18.tar.gz" + sha256 "68bdebbf5854a3662d3e88b8ac55db6cfa916ff5ff8875ec3a200593bd75d4f3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c16e461db8536b55f415929444a2b8a89a1c2df44e85fbece2c1cf7bc7a1eea" + sha256 cellar: :any, arm64_sequoia: "3bbd2c1f6767359fb0ceb058ec0fd018f5c9829a43389167c5fe761393a61c09" + sha256 cellar: :any, arm64_sonoma: "a2effa6d3e9c74987109912e53b556e8ca6bb46f4a475f581dd022304bf11056" + sha256 cellar: :any, sonoma: "497fe9db6b48f0e9bbdded016ea751474ac7fe804bffdbbdb56f944d58361d99" + sha256 cellar: :any_skip_relocation, arm64_linux: "315fe9576a17ca71095d5b74fbdd8463d4415d7f9702a98f153b5d9cff0c0949" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e462b7760b2dd3ebbc79acb58cddf5393aa87359ab4af2d0c4fdb6fa36ddbcb" + end + + depends_on "rust" => :build # for hf-xet, jitter and safetensors + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "numpy" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "pytorch" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi numpy pydantic-core rpds-py torch] + + resource "accelerate" do + url "https://files.pythonhosted.org/packages/23/60/2757c4f03a8705dbf80b1268b03881927878dca5ed07d74f733fb6c219e0/accelerate-1.11.0.tar.gz" + sha256 "bb1caf2597b4cd632b917b5000c591d10730bb024a79746f1ee205bba80bd229" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "archgw-modelserver" do + url "https://files.pythonhosted.org/packages/60/87/bbb11cf400ca2b01e0de55a0e4c1b14280b08f3d1452714ec87beefa997f/archgw_modelserver-0.3.18.tar.gz" + sha256 "9c32f48e0c7e0b886e803218c4289c0fb27362b567a02fba25e1bd8dd5a9fb65" + end + + resource "asgiref" do + url "https://files.pythonhosted.org/packages/46/08/4dfec9b90758a59acc6be32ac82e98d1fbfc321cb5cfa410436dbacf821c/asgiref-3.10.0.tar.gz" + sha256 "d89f2d8cd8b56dada7d52fa7dc8075baa08fb836560710d38c292a7a3f78c04e" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "dateparser" do + url "https://files.pythonhosted.org/packages/a9/30/064144f0df1749e7bb5faaa7f52b007d7c2d08ec08fed8411aba87207f68/dateparser-1.2.2.tar.gz" + sha256 "986316f17cb8cdc23ea8ce563027c5ef12fc725b6fb1d137c14ca08777c5ecf7" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "fastapi" do + url "https://files.pythonhosted.org/packages/7b/5e/bf0471f14bf6ebfbee8208148a3396d1a23298531a6cc10776c59f4c0f87/fastapi-0.115.0.tar.gz" + sha256 "f93b4ca3529a8ebc6fc3fcf710e5efa8de3df9b41570958abf1d97d843138004" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz" + sha256 "7be78388d6da1a25c0d5ec506523db58b18be22d9c37d8d3a32c08be4987bd73" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hf-xet" do + url "https://files.pythonhosted.org/packages/5e/6e/0f11bacf08a67f7fb5ee09740f2ca54163863b07b70d579356e9222ce5d8/hf_xet-1.2.0.tar.gz" + sha256 "a8c27070ca547293b6890c4bf389f713f80e8c478631432962bb7f4bc0bd7d7f" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/78/82/08f8c936781f67d9e6b9eeb8a0c8b4e406136ea4c3d1f89a5db71d42e0e6/httpx-0.27.2.tar.gz" + sha256 "f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2" + end + + resource "huggingface-hub" do + url "https://files.pythonhosted.org/packages/98/63/4910c5fa9128fdadf6a9c5ac138e8b1b6cee4ca44bf7915bbfbce4e355ee/huggingface_hub-0.36.0.tar.gz" + sha256 "47b3f0e2539c39bf5cde015d63b72ec49baff67b6931c3d97f3f84532e2b8d25" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/a3/68/0357982493a7b20925aece061f7fb7a2678e3b232f8d73a6edb7e5304443/jiter-0.11.1.tar.gz" + sha256 "849dcfc76481c0ea0099391235b7ca97d7279e0fa4c86005457ac7c88e8b76dc" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/c6/a1/a303104dc55fc546a3f6914c842d3da471c64eec92043aef8f652eb6c524/openai-1.109.1.tar.gz" + sha256 "d173ed8dbca665892a6db099b4a2dfac624f94d20a93f46eb0b56aae940ed869" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/08/d8/0f354c375628e048bd0570645b310797299754730079853095bf000fba69/opentelemetry_api-1.38.0.tar.gz" + sha256 "f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12" + end + + resource "opentelemetry-exporter-otlp" do + url "https://files.pythonhosted.org/packages/c2/2d/16e3487ddde2dee702bd746dd41950a8789b846d22a1c7e64824aac5ebea/opentelemetry_exporter_otlp-1.38.0.tar.gz" + sha256 "2f55acdd475e4136117eff20fbf1b9488b1b0b665ab64407516e1ac06f9c3f9d" + end + + resource "opentelemetry-exporter-otlp-proto-common" do + url "https://files.pythonhosted.org/packages/19/83/dd4660f2956ff88ed071e9e0e36e830df14b8c5dc06722dbde1841accbe8/opentelemetry_exporter_otlp_proto_common-1.38.0.tar.gz" + sha256 "e333278afab4695aa8114eeb7bf4e44e65c6607d54968271a249c180b2cb605c" + end + + resource "opentelemetry-exporter-otlp-proto-grpc" do + url "https://files.pythonhosted.org/packages/a2/c0/43222f5b97dc10812bc4f0abc5dc7cd0a2525a91b5151d26c9e2e958f52e/opentelemetry_exporter_otlp_proto_grpc-1.38.0.tar.gz" + sha256 "2473935e9eac71f401de6101d37d6f3f0f1831db92b953c7dcc912536158ebd6" + end + + resource "opentelemetry-exporter-otlp-proto-http" do + url "https://files.pythonhosted.org/packages/81/0a/debcdfb029fbd1ccd1563f7c287b89a6f7bef3b2902ade56797bfd020854/opentelemetry_exporter_otlp_proto_http-1.38.0.tar.gz" + sha256 "f16bd44baf15cbe07633c5112ffc68229d0edbeac7b37610be0b2def4e21e90b" + end + + resource "opentelemetry-instrumentation" do + url "https://files.pythonhosted.org/packages/04/ed/9c65cd209407fd807fa05be03ee30f159bdac8d59e7ea16a8fe5a1601222/opentelemetry_instrumentation-0.59b0.tar.gz" + sha256 "6010f0faaacdaf7c4dff8aac84e226d23437b331dcda7e70367f6d73a7db1adc" + end + + resource "opentelemetry-instrumentation-asgi" do + url "https://files.pythonhosted.org/packages/b7/a4/cfbb6fc1ec0aa9bf5a93f548e6a11ab3ac1956272f17e0d399aa2c1f85bc/opentelemetry_instrumentation_asgi-0.59b0.tar.gz" + sha256 "2509d6fe9fd829399ce3536e3a00426c7e3aa359fc1ed9ceee1628b56da40e7a" + end + + resource "opentelemetry-instrumentation-fastapi" do + url "https://files.pythonhosted.org/packages/ab/a7/7a6ce5009584ce97dbfd5ce77d4f9d9570147507363349d2cb705c402bcf/opentelemetry_instrumentation_fastapi-0.59b0.tar.gz" + sha256 "e8fe620cfcca96a7d634003df1bc36a42369dedcdd6893e13fb5903aeeb89b2b" + end + + resource "opentelemetry-proto" do + url "https://files.pythonhosted.org/packages/51/14/f0c4f0f6371b9cb7f9fa9ee8918bfd59ac7040c7791f1e6da32a1839780d/opentelemetry_proto-1.38.0.tar.gz" + sha256 "88b161e89d9d372ce723da289b7da74c3a8354a8e5359992be813942969ed468" + end + + resource "opentelemetry-sdk" do + url "https://files.pythonhosted.org/packages/85/cb/f0eee1445161faf4c9af3ba7b848cc22a50a3d3e2515051ad8628c35ff80/opentelemetry_sdk-1.38.0.tar.gz" + sha256 "93df5d4d871ed09cb4272305be4d996236eedb232253e3ab864c8620f051cebe" + end + + resource "opentelemetry-semantic-conventions" do + url "https://files.pythonhosted.org/packages/40/bc/8b9ad3802cd8ac6583a4eb7de7e5d7db004e89cb7efe7008f9c8a537ee75/opentelemetry_semantic_conventions-0.59b0.tar.gz" + sha256 "7a6db3f30d70202d5bf9fa4b69bc866ca6a30437287de6c510fb594878aed6b0" + end + + resource "opentelemetry-util-http" do + url "https://files.pythonhosted.org/packages/34/f7/13cd081e7851c42520ab0e96efb17ffbd901111a50b8252ec1e240664020/opentelemetry_util_http-0.59b0.tar.gz" + sha256 "ae66ee91be31938d832f3b4bc4eb8a911f6eddd38969c4a871b1230db2a0a560" + end + + resource "overrides" do + url "https://files.pythonhosted.org/packages/36/86/b585f53236dec60aba864e050778b25045f857e17f6e5ea0ae95fe80edd2/overrides-7.7.0.tar.gz" + sha256 "55158fa3d93b98cc75299b1e67078ad9003ca27945c76162c1c0766d6f91820a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "safetensors" do + url "https://files.pythonhosted.org/packages/ac/cc/738f3011628920e027a11754d9cae9abec1aed00f7ae860abbf843755233/safetensors-0.6.2.tar.gz" + sha256 "43ff2aa0e6fa2dc3ea5524ac7ad93a9839256b8703761e76e2d0b2a3fa4f15d9" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/42/b4/e25c3b688ef703d85e55017c6edd0cbf38e5770ab748234363d54ff0251a/starlette-0.38.6.tar.gz" + sha256 "863a1588f5574e70a821dadefb41e4881ea451a47a3cd1b4df359d4ffefe5ead" + end + + resource "tokenizers" do + url "https://files.pythonhosted.org/packages/1c/46/fb6854cec3278fbfa4a75b50232c77622bc517ac886156e6afbfa4d8fc6e/tokenizers-0.22.1.tar.gz" + sha256 "61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "transformers" do + url "https://files.pythonhosted.org/packages/d6/68/a39307bcc4116a30b2106f2e689130a48de8bd8a1e635b5e1030e46fcd9e/transformers-4.57.1.tar.gz" + sha256 "f06c837959196c75039809636cd964b959f6604b75b8eeec6fdfc0440b89cc55" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/0a/96/ee52d900f8e41cc35eaebfda76f3619c2e45b741f3ee957d6fe32be1b2aa/uvicorn-0.31.0.tar.gz" + sha256 "13bc21373d103859f68fe739608e2eb054a816dea79189bc3ca08ea89a275906" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + venv = virtualenv_install_with_resources(without: "hf-xet") + + resource("hf-xet").stage do + if ENV.effective_arch == :armv8 + # Disable sha2-asm which requires a minimum of -march=armv8-a+crypto + inreplace "data/Cargo.toml", + 'sha2 = { workspace = true, features = ["asm"] }', + "sha2 = { workspace = true }" + end + venv.pip_install Pathname.pwd + end + + # NOTE: This is an exception to our usual policy as building `pytorch` is complicated + site_packages = Language::Python.site_packages(venv.root/"bin/python3") + pth_contents = "import site; site.addsitedir('#{Formula["pytorch"].opt_libexec/site_packages}')\n" + (venv.site_packages/"homebrew-pytorch.pth").write pth_contents + end + + test do + assert_match version.to_s, shell_output("#{bin}/archgw --version") + + output = shell_output("#{bin}/archgw up 2>&1") + assert_match "INFO - Error: #{testpath}/arch_config.yaml does not exist.", output + end +end diff --git a/Formula/a/archi-steam-farm.rb b/Formula/a/archi-steam-farm.rb new file mode 100644 index 0000000000000..f4f9835ddf353 --- /dev/null +++ b/Formula/a/archi-steam-farm.rb @@ -0,0 +1,73 @@ +class ArchiSteamFarm < Formula + desc "Application for idling Steam cards from multiple accounts simultaneously" + homepage "https://github.com/JustArchiNET/ArchiSteamFarm" + url "https://github.com/JustArchiNET/ArchiSteamFarm.git", + tag: "6.2.1.2", + revision: "fe80d3029b6ee371a5acd2bfd6ef3042aea4a3f9" + license "Apache-2.0" + head "https://github.com/JustArchiNET/ArchiSteamFarm.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "56ec334ab300d981a48e231f1dea4bd7fb5e4881f9e09aab51d82fdd284a936b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "490c297bc91584818ff21d9a26b7f750729bf81626aaebdf913fa2be568b32f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81299bf6abd6721445576143caab857d9242158c11d5dcf0ef7f2c28b612c8ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "55e45a5277ae05dfc01d73366058c3e92c8626740ef408d95a899fa1a5d5924f" + sha256 cellar: :any_skip_relocation, ventura: "36bce8cdb65d7803ef17f1bcaf274ba9932a282360ba92b2f348cd6ab49a6306" + sha256 cellar: :any_skip_relocation, arm64_linux: "aedf76ac040d42c592fc6487e1a05515ecdbdaea434c7b95081451d7192c22c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1eab4f0727c67da321d6322c4f30e538cd1f21743eec92700ceae659707d9b69" + end + + depends_on "node" => :build + depends_on "dotnet" + + def install + plugins = %w[ + ArchiSteamFarm.OfficialPlugins.ItemsMatcher + ArchiSteamFarm.OfficialPlugins.MobileAuthenticator + ] + + dotnet = Formula["dotnet"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --no-self-contained + --use-current-runtime + ] + asf_args = %W[ + --output #{libexec} + -p:AppHostRelativeDotNet=#{dotnet.opt_libexec.relative_path_from(libexec)} + -p:PublishSingleFile=true + ] + + system "npm", "ci", "--no-progress", "--prefix", "ASF-ui" + system "npm", "run-script", "deploy", "--no-progress", "--prefix", "ASF-ui" + + system "dotnet", "publish", "ArchiSteamFarm", *args, *asf_args + plugins.each do |plugin| + system "dotnet", "publish", plugin, *args, "--output", libexec/"plugins"/plugin + end + + bin.install_symlink libexec/"ArchiSteamFarm" => "asf" + etc.install libexec/"config" => "asf" + rm_r(libexec/"config") + libexec.install_symlink etc/"asf" => "config" + end + + def caveats + <<~EOS + ASF config files should be placed under #{etc}/asf/. + EOS + end + + test do + _, stdout, wait_thr = Open3.popen2("#{bin}/asf") + assert_match version.to_s, stdout.gets("\n") + ensure + Process.kill("TERM", wait_thr.pid) + end +end diff --git a/Formula/a/archivemount.rb b/Formula/a/archivemount.rb new file mode 100644 index 0000000000000..ff0e38517d8dc --- /dev/null +++ b/Formula/a/archivemount.rb @@ -0,0 +1,34 @@ +class Archivemount < Formula + desc "File system for accessing archives using libarchive" + homepage "https://github.com/cybernoid/archivemount" + url "https://slackware.uk/~urchlay/src/archivemount-0.9.1.tar.gz" + sha256 "c529b981cacb19541b48ddafdafb2ede47a40fcaf16c677c1e2cd198b159c5b3" + license "LGPL-2.0-or-later" + + livecheck do + url "https://raw.githubusercontent.com/cybernoid/archivemount/refs/heads/master/CHANGELOG" + regex(/\*\s+v?(\d+(?:\.\d+)+)\s+/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_linux: "955c633971c03c810ea51de75c517e68fc10b1dc69b129039ab3fd4a8419cffe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "238d9539e81cdafd6d74dee82438d06c4348b5570260102811a2a1362088527c" + end + + depends_on "pkgconf" => :build + depends_on "libarchive" + depends_on "libfuse@2" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"archivemount", "--version" + end +end diff --git a/Formula/a/archiver.rb b/Formula/a/archiver.rb new file mode 100644 index 0000000000000..49c1caa73ee81 --- /dev/null +++ b/Formula/a/archiver.rb @@ -0,0 +1,55 @@ +class Archiver < Formula + desc "Cross-platform, multi-format archive utility" + homepage "https://github.com/mholt/archiver" + url "https://github.com/mholt/archiver/archive/refs/tags/v3.5.1.tar.gz" + sha256 "b69a76f837b6cc1c34c72ace16670360577b123ccc17872a95af07178e69fbe7" + license "MIT" + head "https://github.com/mholt/archiver.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7da16b2c8807513b73777c4e799fa9f3a6fef4a0a00e5a5287977882bc4a1c68" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b6c238c7e684837a57ff1038a05b92a89b1db0311443ff3f66da556eeeb873a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "247cc8a86532c7e40d47ee84872895a7790a87c0c732cb1d4dfd19a25e8b724f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "50eb72205f3ffce1c6b64a7182454213c07cf6396469046875c5687f5f7018a9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9194e883ec240998c4c2ec26a4cc8d79d1ad29964b592ac0cc45c9b6c5da7dd8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7a4c576219a90d52a24dec089f2ef3cd900f5d9779d57fc6f6d83c8e2ae7241c" + sha256 cellar: :any_skip_relocation, sonoma: "5239b35339f165119d9e93b34775bd986982c296286dfdb3fbbb456f1776d66a" + sha256 cellar: :any_skip_relocation, ventura: "27b0c4dd81f24dd779dccb56944733ac3381adf3dcd9c9087f70dc53908359e8" + sha256 cellar: :any_skip_relocation, monterey: "f0c4b8adac0f867744ccde72ed8d83f66bcf098f45e32edf7c1dfd347772ee9f" + sha256 cellar: :any_skip_relocation, big_sur: "74fd6ad65f0b92af3a034874d6317065b7805d98cb945006d05dff0117d179d6" + sha256 cellar: :any_skip_relocation, catalina: "b2a0192ed66099721b7662fe5d772f8a99ecb5c8922270cbc825cdcbb7032378" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e4334939b05d0ec67d9f84d3761b876be7a3f802239ab3848d89a9d9ece61b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "461a212b25cc90af84996b43067bbd096cf343bbe04a39b4aa40d10cb235e238" + end + + deprecate! date: "2025-04-27", because: :repo_archived + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"arc"), "./cmd/arc" + end + + test do + output = shell_output("#{bin}/arc --help 2>&1") + assert_match "Usage: arc {archive|unarchive", output + + (testpath/"test1").write "Hello!" + (testpath/"test2").write "Bonjour!" + (testpath/"test3").write "Moien!" + + system bin/"arc", "archive", "test.zip", + "test1", "test2", "test3" + + assert_path_exists testpath/"test.zip" + assert_match "Zip archive data", + shell_output("file -b #{testpath}/test.zip") + + output = shell_output("#{bin}/arc ls test.zip") + names = output.lines.map do |line| + columns = line.split(/\s+/) + File.basename(columns.last) + end + assert_match "test1 test2 test3", names.join(" ") + end +end diff --git a/Formula/a/arduino-cli.rb b/Formula/a/arduino-cli.rb new file mode 100644 index 0000000000000..41643b147040d --- /dev/null +++ b/Formula/a/arduino-cli.rb @@ -0,0 +1,45 @@ +class ArduinoCli < Formula + desc "Arduino command-line interface" + homepage "https://arduino.github.io/arduino-cli/latest/" + url "https://github.com/arduino/arduino-cli/archive/refs/tags/v1.3.1.tar.gz" + sha256 "7977ef114eee32aec3eb2f371c6a5bbcf9b2238b1e923eb2d384c888ad1c1fe0" + license "GPL-3.0-only" + head "https://github.com/arduino/arduino-cli.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "781f0ebbd54ea973f3d7c685c978bbd69735de45b6fce860e14e6c3abf9ca124" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3aedb3a445445c4cb9580cfc0013fae74f26b35e49eae7d8a6869ab0d7a3385" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b3697ee5b068123f44b35fbe307aedbac3db13ea5cbc4a8181e6da03e949239" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1c2817ebb4d5156f2f60f7633e5e942804af6936d256886ee380aa52a5305a8" + sha256 cellar: :any_skip_relocation, sonoma: "55f3c059903e61aaf929d9e28c4493f4602d253eb3dee2db4f296c351f8d7349" + sha256 cellar: :any_skip_relocation, ventura: "83c5c94009164256b3d69af9244f409721b825852211b935a02b3cd941fae9b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a94b9756b8f7d8674e97134c47d5e36d7c561ded406f4ea109d1d1e1bd6147a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b871670ddad2f671f411a7fe9117a19e74f0ec831300207575813830964cd41f" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/arduino/arduino-cli/internal/version.versionString=#{version} + -X github.com/arduino/arduino-cli/internal/version.commit=#{tap.user} + -X github.com/arduino/arduino-cli/internal/version.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"arduino-cli", "completion") + end + + test do + system bin/"arduino-cli", "sketch", "new", "test_sketch" + assert_path_exists testpath/"test_sketch/test_sketch.ino" + + assert_match version.to_s, shell_output("#{bin}/arduino-cli version") + end +end diff --git a/Formula/a/arelo.rb b/Formula/a/arelo.rb new file mode 100644 index 0000000000000..0148e9df41430 --- /dev/null +++ b/Formula/a/arelo.rb @@ -0,0 +1,47 @@ +class Arelo < Formula + desc "Simple auto reload (live reload) utility" + homepage "https://github.com/makiuchi-d/arelo" + url "https://github.com/makiuchi-d/arelo/archive/refs/tags/v1.15.4.tar.gz" + sha256 "f687e04187145aa6ccaf68fc995f9e8297387a2f27871ccb132625e0635cf15d" + license "MIT" + head "https://github.com/makiuchi-d/arelo.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ef8b5e963b9357f36274cc3215e3c4bef786c2ca7f81d844ed7161426725d9a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef8b5e963b9357f36274cc3215e3c4bef786c2ca7f81d844ed7161426725d9a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef8b5e963b9357f36274cc3215e3c4bef786c2ca7f81d844ed7161426725d9a6" + sha256 cellar: :any_skip_relocation, sonoma: "14da6734979c2342999a2387f2682858ca121f8252dbb946911b9bd64a2e33df" + sha256 cellar: :any_skip_relocation, arm64_linux: "8051a15270ccfa1ac4ba18bb6421ecf51e1f6d3a89a462809890a6b41c760ca9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "592beafb82bd1f10d9b8a303b0d224e0378d71eac089a47be9f141c266788e35" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/arelo --version") + + (testpath/"test.sh").write <<~EOS + #!/bin/sh + echo "Hello, world!" + EOS + chmod 0755, testpath/"test.sh" + + logfile = testpath/"arelo.log" + arelo_pid = spawn bin/"arelo", "--pattern", "test.sh", "--", "./test.sh", out: logfile.to_s + + sleep 1 + touch testpath/"test.sh" + sleep 1 + + assert_path_exists testpath/"test.sh" + assert_match "Hello, world!", logfile.read + ensure + Process.kill("TERM", arelo_pid) + Process.wait(arelo_pid) + end +end diff --git a/Formula/a/ares.rb b/Formula/a/ares.rb new file mode 100644 index 0000000000000..d4a0d557a1aaf --- /dev/null +++ b/Formula/a/ares.rb @@ -0,0 +1,40 @@ +class Ares < Formula + desc "Automated decoding of encrypted text" + homepage "https://github.com/bee-san/Ares" + url "https://github.com/bee-san/Ares/archive/refs/tags/0.11.0.tar.gz" + sha256 "fd8751de6c46eb523d62d4ca52018b9127b9fa5fbd4a372b7f22e0f9957f030f" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ef78e48f63a1af964da3502cf71ecd41039eeefa3fabfef3c4e831382b26f07f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f1ebc203591b997591cf3f7fef4fb145eaf1c7bdda7c1b92a4a5f7c73afc3a1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69ed6c01fd307449f1f5f1d76f1de7dc4f804d1c57ba7bc106c9dbead3685ee8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5acf01bcc2e7bb451ffaf5b99fc499663de093222b057b0f4d8f21b7239c7e6e" + sha256 cellar: :any_skip_relocation, sonoma: "453b5cf8f4f29d7a0a5702569f9f149451bd5e19c313886a0e5024369cab3879" + sha256 cellar: :any_skip_relocation, ventura: "038f0c1740c55673f92e9eda04f45e2d1af79ec0c75a19d0495d0286c0fc1821" + sha256 cellar: :any_skip_relocation, arm64_linux: "18bca98bf45a77d9f7358342a4196720b37d59ea4f77f26c9c8a36abe3a70c8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bdeab88f015b3d9e745c63a71c680c2a53b17f9a81146ddfc1d67233d332ed5" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # base64 encoded string for "Hello from Homebrew" + input_string = "SGVsbG8gZnJvbSBIb21lYnJldw==" + expected_text = "Hello from Homebrew" + # Disable custom color scheme + output = pipe_output("#{bin}/ares -d -t #{input_string}", "N", 0) + assert_match expected_text, output + end +end diff --git a/Formula/a/argc.rb b/Formula/a/argc.rb new file mode 100644 index 0000000000000..59324fa742720 --- /dev/null +++ b/Formula/a/argc.rb @@ -0,0 +1,32 @@ +class Argc < Formula + desc "Easily create and use cli based on bash script" + homepage "https://github.com/sigoden/argc" + url "https://github.com/sigoden/argc/archive/refs/tags/v1.23.0.tar.gz" + sha256 "d3eb85faf26a69c582dcea6d0fc2025bcfeec1dd0b9b35384a67059c2833103c" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cd87f048d0c58c25a09af13aef7f6b61f922d312298bb71fd62b7a9ed922b88b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36a5733acc21f8146c6cb3d6dd23968d3d77d4ce3c501b391c50d6cf44556a19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e17c17e8c931f998b2da7cd5d93365097716a332d1028786c28bf50ff815e4ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "318fd0396e6396ec672e0b302630fccf146564948d1f1cd21bc340954fc33904" + sha256 cellar: :any_skip_relocation, sonoma: "50fe3f4adf05485dd7491edf7557457ad160bff95db98d4eb428af060b6254e7" + sha256 cellar: :any_skip_relocation, ventura: "46274957c0ee5d3974c6e4aa4a953d16bfb318638935cdd0dc130bf4b89843ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4195f0d5d08d008ad7a470641d8a8246e737ee42395e5915dcf78272db830b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf572063a6a97cf2f9a663c93133e5467b7b06f37c233d0623dc9f8079bc7bd2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"argc", "--argc-completions") + end + + test do + system bin/"argc", "--argc-create", "build" + assert_path_exists testpath/"Argcfile.sh" + assert_match "build", shell_output("#{bin}/argc build") + end +end diff --git a/Formula/a/argo.rb b/Formula/a/argo.rb new file mode 100644 index 0000000000000..151f4de91b965 --- /dev/null +++ b/Formula/a/argo.rb @@ -0,0 +1,41 @@ +class Argo < Formula + desc "Get stuff done with container-native workflows for Kubernetes" + homepage "https://argoproj.io" + url "https://github.com/argoproj/argo-workflows.git", + tag: "v3.7.3", + revision: "bded09fe4abd37cb98d7fc81b4c14a6f5034e9ab" + license "Apache-2.0" + head "https://github.com/argoproj/argo-workflows.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a2e2ee58797a7c5bd7263737aab60392f25495707a0fcce259ce292a5dcc6207" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a390d3753227f11fed5e25a2ce184533c60f70f7d173cfeea7802d76b75cd4cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0d6344d55adb0da779bafc6c7fe987b00c87bb300be2f675da157e463131558" + sha256 cellar: :any_skip_relocation, sonoma: "a20107eaa6d1da6afbd14c1108c8402119a14c12894cb36d5650649d3e3fe55e" + sha256 cellar: :any_skip_relocation, arm64_linux: "675e5cc98b550e08b3b52b004ab5884edcbaac59fd1d526c6d3f36a5168d0f58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "797a27cac49e6c0bf0bc925163f3ae1fd840428e4fb152b9889f62768efd4e5d" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "yarn" => :build + + def install + # this needs to be remove to prevent multiple 'operation not permitted' errors + inreplace "Makefile", "CGO_ENABLED=0", "" + system "make", "dist/argo", "-j1" + bin.install "dist/argo" + + generate_completions_from_executable(bin/"argo", "completion") + end + + test do + assert_match "argo: v#{version}", shell_output("#{bin}/argo version") + + # argo consumes the Kubernetes configuration with the `--kubeconfig` flag + # Since it is an empty file we expect it to be invalid + touch testpath/"kubeconfig" + assert_match "invalid configuration", + shell_output("#{bin}/argo lint --kubeconfig ./kubeconfig ./kubeconfig 2>&1", 1) + end +end diff --git a/Formula/a/argocd-autopilot.rb b/Formula/a/argocd-autopilot.rb new file mode 100644 index 0000000000000..b5072831ff5c4 --- /dev/null +++ b/Formula/a/argocd-autopilot.rb @@ -0,0 +1,34 @@ +class ArgocdAutopilot < Formula + desc "Opinionated way of installing Argo CD and managing GitOps repositories" + homepage "https://argoproj.io" + url "https://github.com/argoproj-labs/argocd-autopilot.git", + tag: "v0.4.20", + revision: "a1d2d4c97c59d19127b1bfc1eca3149ca0984df9" + license "Apache-2.0" + head "https://github.com/argoproj-labs/argocd-autopilot.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6413e513cbc1efeaad2aaf4afe34e8cdb1e2b38eff30197754f3c9d2fde65a3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a030325b70b6a46c4d63136e638a852b25cfa90a871464f07724ea48951a7ccf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d34a4629f9d8089d89ca77a623618b73cb95c73afad228ffeb41a93ab021f067" + sha256 cellar: :any_skip_relocation, sonoma: "b5899d7d38572a62a7aacf3fb9b30536b3e970c8ef910015ed25ba7fbcf3051b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c4a677b34fea2ba9324961d0da07ed40374625388f6bdf7e43b3f3afc7a9de28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5c224d930f9df3fc46eae79c4d0c9e15339628a40e80bef6fa2ee2a1999a0ca" + end + + depends_on "go" => :build + + def install + system "make", "cli-package", "DEV_MODE=false" + bin.install "dist/argocd-autopilot" + + generate_completions_from_executable(bin/"argocd-autopilot", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/argocd-autopilot version") + + assert_match "required flag(s) \\\"git-token\\\" not set\"", + shell_output("#{bin}/argocd-autopilot repo bootstrap --repo https://github.com/example/repo 2>&1", 1) + end +end diff --git a/Formula/a/argocd-vault-plugin.rb b/Formula/a/argocd-vault-plugin.rb new file mode 100644 index 0000000000000..7f1e4d61a8afb --- /dev/null +++ b/Formula/a/argocd-vault-plugin.rb @@ -0,0 +1,47 @@ +class ArgocdVaultPlugin < Formula + desc "Argo CD plugin to retrieve secrets from Secret Management tools" + homepage "https://argocd-vault-plugin.readthedocs.io" + url "https://github.com/argoproj-labs/argocd-vault-plugin.git", + tag: "v1.18.1", + revision: "fc452cdd8d4727b412ce3de61ee0416efd75050d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6955e65b88cd94b91c5780fa18da4ee2804568242e0560e3c5143e92484269c2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16c6f66c3a9728fb32b1098e4ac611c9e7f85d3da8fd59c464ec6662d8f472a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7dcbaa4f8fea11cbc2bff01602fe23caece755107e78213214a490423315938" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e7dcbaa4f8fea11cbc2bff01602fe23caece755107e78213214a490423315938" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e7dcbaa4f8fea11cbc2bff01602fe23caece755107e78213214a490423315938" + sha256 cellar: :any_skip_relocation, sonoma: "e5b3dae256fd58870d8257ad93bb990e01c59847de737cf6e11328568c07a518" + sha256 cellar: :any_skip_relocation, ventura: "e5b3dae256fd58870d8257ad93bb990e01c59847de737cf6e11328568c07a518" + sha256 cellar: :any_skip_relocation, monterey: "e5b3dae256fd58870d8257ad93bb990e01c59847de737cf6e11328568c07a518" + sha256 cellar: :any_skip_relocation, arm64_linux: "71c58033fef7e4eac8c71e825df10dc0b275ce7fea93cd798e46780e89005a18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dea50d0a56408e8c396cb0bfc6534f025bc2e8acefb125f59a32a0fecc9eee89" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + + ldflags = %W[ + -s -w + -X github.com/argoproj-labs/argocd-vault-plugin/version.Version=#{version} + -X github.com/argoproj-labs/argocd-vault-plugin/version.BuildDate=#{time.iso8601} + -X github.com/argoproj-labs/argocd-vault-plugin/version.CommitSHA=#{Utils.git_head} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"argocd-vault-plugin", "completion") + end + + test do + assert_match "This is a plugin to replace with Vault secrets", + shell_output("#{bin}/argocd-vault-plugin --help") + + touch testpath/"empty.yaml" + assert_match "Error: Must provide a supported Vault Type", + shell_output("#{bin}/argocd-vault-plugin generate ./empty.yaml 2>&1", 1) + end +end diff --git a/Formula/a/argocd.rb b/Formula/a/argocd.rb new file mode 100644 index 0000000000000..b0e32a75bb82f --- /dev/null +++ b/Formula/a/argocd.rb @@ -0,0 +1,57 @@ +class Argocd < Formula + desc "GitOps Continuous Delivery for Kubernetes" + homepage "https://argoproj.github.io/cd/" + url "https://github.com/argoproj/argo-cd.git", + tag: "v3.2.0", + revision: "66b2f302d91a42cc151808da0eec0846bbe1062c" + license "Apache-2.0" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check releases instead of the Git + # tags. Upstream maintains multiple major/minor versions and the "latest" + # release may be for an older version, so we have to check multiple releases + # to identify the highest version. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6f0cca48e367e77082d62bc8f9814ae4d690d2abf86bde1bc3c033631d49fef2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "410d6beae4b0761a4f45ce396c3d3bc5dcf0a3fb196b5e4b31d7f8941b6b7ea6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4b019705f9e7c186813688a5db17bfe31dd102260318071c866723a330ea287" + sha256 cellar: :any_skip_relocation, sonoma: "cc9c030bf7f0d0a45c147d061e03e847ade649def6a336981c36bd7788b262fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c65dd5e48621be5eb7f8f074693dc6005e29615c00022af13d4b5cf2cf39d41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5902d16c0f28b8ee22ad51677487704661729c1debf9f3d266d73f38293989d6" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "yarn" => :build + + def install + system "make", "dep-ui-local" + with_env( + NODE_ENV: "production", + NODE_ONLINE_ENV: "online", + ) do + system "yarn", "--cwd", "ui", "build" + end + system "make", "cli-local" + bin.install "dist/argocd" + + generate_completions_from_executable(bin/"argocd", "completion") + end + + test do + assert_match "argocd controls a Argo CD server", + shell_output("#{bin}/argocd --help") + + # Providing argocd with an empty config file returns the contexts table header + touch testpath/"argocd-config" + (testpath/"argocd-config").chmod 0600 + assert_match "CURRENT NAME SERVER\n", + shell_output("#{bin}/argocd context --config ./argocd-config") + end +end diff --git a/Formula/a/argon2.rb b/Formula/a/argon2.rb new file mode 100644 index 0000000000000..a7ecad10a2206 --- /dev/null +++ b/Formula/a/argon2.rb @@ -0,0 +1,39 @@ +class Argon2 < Formula + desc "Password hashing library and CLI utility" + homepage "https://github.com/P-H-C/phc-winner-argon2" + url "https://github.com/P-H-C/phc-winner-argon2/archive/refs/tags/20190702.tar.gz" + sha256 "daf972a89577f8772602bf2eb38b6a3dd3d922bf5724d45e7f9589b5e830442c" + license "Apache-2.0" + revision 1 + head "https://github.com/P-H-C/phc-winner-argon2.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "afaa0b7c4c305b6b8ccef5abb4863d30fc1dfc537cc2bdc43e1c558df25723c6" + sha256 cellar: :any, arm64_sequoia: "4fe5808e09d5c48eac1991bb19bca51ac39517ae46d8e9f696580dc004c0bd08" + sha256 cellar: :any, arm64_sonoma: "c503692d2a7d5538d5cb241b69c283d998bde91b38e3065c01bc79fdbe8cd197" + sha256 cellar: :any, arm64_ventura: "016bdb5f9f24c58d77c34daa974103a22a80d7ded572c2cb2d4586c97b43eb62" + sha256 cellar: :any, arm64_monterey: "498cea03c8c9f5ab7b90a0c333122415f0360c09f837cafae6d8685d6846ced2" + sha256 cellar: :any, arm64_big_sur: "192f3381abe337df8af214cf4dccef2cbfaa9c88df489b5cf9276cea9f8c6080" + sha256 cellar: :any, sonoma: "00b61d421980e47df314b7b4ca74d3ed12ebf2eab0f35cb1013d0e397700c6bc" + sha256 cellar: :any, ventura: "22435030bed2a599098ef4cd239153d2c3c9b5b4b5bbe2390d32f3f9a35a96fd" + sha256 cellar: :any, monterey: "decd61f1d853225582aaa70e9f67438c21f45105118d86ddb69a5e494311a841" + sha256 cellar: :any, big_sur: "a9dd363964a2a633ace13aff04e4c5eac7e720d44faf377456de55396647ff13" + sha256 cellar: :any, catalina: "f8e550c8597728bb9edc5a548497fd7b1219203932cd0f93ecc97a4fbf0bdad8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1149cb3482d46eb06f07d77b2d3e3ff3f71599f573bf32553c4407f0b470c45c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58b4014f120e135a991f1023f210366ef3e9175a37a05a3fffb06a9fe3c23ff4" + end + + def install + system "make", "PREFIX=#{prefix}", "ARGON2_VERSION=#{version}", "LIBRARY_REL=lib" + system "make", "test" + system "make", "install", "PREFIX=#{prefix}", "ARGON2_VERSION=#{version}", "LIBRARY_REL=lib" + doc.install "argon2-specs.pdf" + end + + test do + output = pipe_output("#{bin}/argon2 somesalt -t 2 -m 16 -p 4", "password", 0) + assert_match "c29tZXNhbHQ$IMit9qkFULCMA/ViizL57cnTLOa5DiVM9eMwpAvPw", output + end +end diff --git a/Formula/a/argp-standalone.rb b/Formula/a/argp-standalone.rb new file mode 100644 index 0000000000000..4186c820ca18e --- /dev/null +++ b/Formula/a/argp-standalone.rb @@ -0,0 +1,48 @@ +class ArgpStandalone < Formula + desc "Standalone version of arguments parsing functions from GLIBC" + homepage "https://github.com/argp-standalone/argp-standalone" + url "https://github.com/argp-standalone/argp-standalone/archive/refs/tags/1.5.0.tar.gz" + sha256 "c29eae929dfebd575c38174f2c8c315766092cec99a8f987569d0cad3c6d64f6" + license all_of: [ + "LGPL-2.1-or-later", + "LGPL-2.0-or-later", # argp.h, argp-parse.c + :public_domain, # mempcpy.c, strchrnul.c + ] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4e16dcc9c857334ef0c9edee97b5063ead0f3f8dddc428ccb9cbeec6881a104c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b71de47f10a604629ded46675494d28ec5189153afe353425a4f6f52ab879f29" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ded4333901f512960d2087fd1177a70c82af78f296d858e517b52d94a2585520" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f24ae027fbc894e59972455cf569fd3676dc90d87ab93e4919df9fce0698ec1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "52318bf7231650f9e0a5f956ee4ec133e34355d15c137267c6dbbc27f426d080" + sha256 cellar: :any_skip_relocation, sonoma: "4fa315b100b5d38eb5bf4c8fdaff61075c58f78a029434ccb1e9beb32c44c640" + sha256 cellar: :any_skip_relocation, ventura: "e274c57f48b316cfbd5fd3d13f560d85f9e62ae1cc44483565ddd73d90d31a21" + sha256 cellar: :any_skip_relocation, monterey: "207d701bc2983741c8bbe79297945eb4982ad58ba5597557d3216aa99e90a543" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on :macos # argp is provided by glibc on Linux + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char ** argv) + { + return argp_parse(0, argc, argv, 0, 0, 0); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-largp", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/argparse.rb b/Formula/a/argparse.rb new file mode 100644 index 0000000000000..154842c9e2515 --- /dev/null +++ b/Formula/a/argparse.rb @@ -0,0 +1,39 @@ +class Argparse < Formula + desc "Argument Parser for Modern C++" + homepage "https://github.com/p-ranav/argparse" + url "https://github.com/p-ranav/argparse/archive/refs/tags/v3.2.tar.gz" + sha256 "9dcb3d8ce0a41b2a48ac8baa54b51a9f1b6a2c52dd374e28cc713bab0568ec98" + license "MIT" + head "https://github.com/p-ranav/argparse.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "92d7cc74e452d6e188643d82ee165ebae9a929a87f4608b50595b8daea7e91d4" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) { + argparse::ArgumentParser program("test"); + + program.add_argument("--color").default_value(std::string{"orange"}); + program.parse_args(argc, argv); + + auto color = program.get("--color"); + std::cout << "Color: " << color; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-o", "test" + assert_equal "Color: blue", shell_output("./test --color blue").strip + end +end diff --git a/Formula/a/argtable.rb b/Formula/a/argtable.rb new file mode 100644 index 0000000000000..742b8d418a5ee --- /dev/null +++ b/Formula/a/argtable.rb @@ -0,0 +1,70 @@ +class Argtable < Formula + desc "ANSI C library for parsing GNU-style command-line options" + homepage "https://argtable.sourceforge.io" + url "https://downloads.sourceforge.net/project/argtable/argtable/argtable-2.13/argtable2-13.tar.gz" + version "2.13" + sha256 "8f77e8a7ced5301af6e22f47302fdbc3b1ff41f2b83c43c77ae5ca041771ddbf" + license "LGPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f6b3a1af259640264644f92286a3d96e4fb4ca0dd4f16aabbdcf608117bf116" + sha256 cellar: :any, arm64_sequoia: "ac1c99cc90796da54dcfa48415939944d6608a1284d6c1eb2650d43717a4d622" + sha256 cellar: :any, arm64_sonoma: "0f2a92f017739cf52ff30229bbbb87fed5e9d818ae9655685227d5f72a94825a" + sha256 cellar: :any, arm64_ventura: "01d3903a4cc0bd3c007b2c8401479c8abcca6d2f0ace9ad7659e95ee241819db" + sha256 cellar: :any, arm64_monterey: "988e6dea2d2b5b0d6fdd8d6d0b91430ce5e5e61e176550000068983614f4874e" + sha256 cellar: :any, arm64_big_sur: "ef0f7424fe4d4ec76d19cfaa8a7d4ceda2abcdd13942939f2f708c57b878de1f" + sha256 cellar: :any, sonoma: "bcfe5a8e2205a9e4de40b83f70306f1a3c9a9e2d896018e1e3b4a16a6560a43f" + sha256 cellar: :any, ventura: "318ad62fc7490140b41a386483f9d2d45ba040771ebc8a9378ac3f4bf7ca05a2" + sha256 cellar: :any, monterey: "b1ea013fae36e65f4dcdf7e4d13a2d39332ea02dfbc70d7ca5d707434c47254c" + sha256 cellar: :any, big_sur: "b5bd39e72d347c2b73845caefb3c44cb9988f3b35ea4fe4b43e765e292b28de4" + sha256 cellar: :any, catalina: "29bfa5bfd7e897512347ecf664c3e3a9bbe7ec585115c09167ca8b6c312be9d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb7cc898c5016f533115709f43cb216842c242caf7aa2e4b8e5a178cc9c9572b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "784464fba494301f0f28dfe309112e99267a2a9084243916283ba7c6e2db0a48" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "argtable2.h" + #include + #include + + int main (int argc, char **argv) { + struct arg_lit *all = arg_lit0 ("a", "all", "show all"); + struct arg_end *end = arg_end(20); + void *argtable[] = {all, end}; + + assert (arg_nullcheck(argtable) == 0); + if (arg_parse(argc, argv, argtable) == 0) { + if (all->count) puts ("Received option"); + } else { + puts ("Invalid option"); + } + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-largtable2", + "-o", "test" + assert_match "Received option", shell_output("./test -a") + assert_match "Received option", shell_output("./test --all") + assert_match "Invalid option", shell_output("./test -t") + end +end diff --git a/Formula/a/argtable3.rb b/Formula/a/argtable3.rb new file mode 100644 index 0000000000000..ce6fcbb6bfec9 --- /dev/null +++ b/Formula/a/argtable3.rb @@ -0,0 +1,64 @@ +class Argtable3 < Formula + desc "ANSI C library for parsing GNU-style command-line options" + homepage "https://www.argtable.org" + url "https://github.com/argtable/argtable3/archive/refs/tags/v3.3.1.tar.gz" + sha256 "8b28a4fb2cd621d8d16f34e30e1956aa488077f6a6b902e7fc9f07883e1519c1" + license "BSD-3-Clause" + head "https://github.com/argtable/argtable3.git", branch: "master" + + # Upstream uses a tag format including a version and hash (e.g. + # `v3.2.2.f25c624`) and we only use the version part in the formula, so this + # omits the hash part to match. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)(?:\.\h+)?$/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "02841c4514ec0b016351a3f513bcb7b529f78e0fbe3e4dbab89b9734d084244e" + sha256 cellar: :any, arm64_sequoia: "08c1d4c1b1caf0027f5965d8f4a33a8634de5d1d2db97215c4cae4dd35a21d83" + sha256 cellar: :any, arm64_sonoma: "d12329601f98832b51f7d0887754b353116fc91389d7427526f2c7f2d493de64" + sha256 cellar: :any, arm64_ventura: "f49951ca0b688eadaac7d390a5f4cba099dd801c8e1fa772eae1bbd223ee955a" + sha256 cellar: :any, sonoma: "81aa7acce60ed7c0fbb3f7becf7b93065640a23accbace7b0b98758cc4b034b0" + sha256 cellar: :any, ventura: "e54312fdc0437c0fac0f877c1f644cea428c82174025607e23e31133a594a51d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a6bd561754762b0b1c295c6d99882e4c98a11783675260c8a99dd3135789b7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "569f0abb77d2e4b88ab0e948309bbb78858387ecc9ed8544942020a4bc868ad4" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "argtable3.h" + #include + #include + + int main (int argc, char **argv) { + struct arg_lit *all = arg_lit0 ("a", "all", "show all"); + struct arg_end *end = arg_end(20); + void *argtable[] = {all, end}; + + assert (arg_nullcheck(argtable) == 0); + if (arg_parse(argc, argv, argtable) == 0) { + if (all->count) puts ("Received option"); + } else { + puts ("Invalid option"); + } + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-largtable3", + "-o", "test" + assert_match "Received option", shell_output("./test -a") + assert_match "Received option", shell_output("./test --all") + assert_match "Invalid option", shell_output("./test -t") + end +end diff --git a/Formula/a/argus-clients.rb b/Formula/a/argus-clients.rb new file mode 100644 index 0000000000000..eb7d29e0a5467 --- /dev/null +++ b/Formula/a/argus-clients.rb @@ -0,0 +1,63 @@ +class ArgusClients < Formula + desc "Audit Record Generation and Utilization System clients" + homepage "https://openargus.org" + url "https://github.com/openargus/clients/archive/refs/tags/v5.0.0.tar.gz" + sha256 "c695e69f8cfffcb6ed978f1f29b1292a2638e4882a66ea8652052ba1e42fe8bc" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "035cd5d0076a84d0d23c830e19145f66fe895ac6ea078c8f66f301043b74ff11" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f744dae64c30ef8fc60183486410d2d512b83155b70e1fdf2ec85a5de20a4fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a760cca90fd565fd14745b087550293aefa4d2dfabf33be01df96c2b373631af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a92a4ea3c8550c3428ece86db0a5fc5e9b1cfeff7ada32d0f7cd65c5ec2c5c33" + sha256 cellar: :any_skip_relocation, arm64_monterey: "84db26da116fab9c66e38bb8732cdc68a9ffc7da8ef2d6014e3919703a522a4d" + sha256 cellar: :any_skip_relocation, sonoma: "e8971b72a53c213e0e42c494c6541414596aa11c86abd0032d0cd375775d093c" + sha256 cellar: :any_skip_relocation, ventura: "e9e2edf0a1a0b4e8f6eb0a68b8a4bb3bc9eb091d79fe45b8de822eb5a13bbe18" + sha256 cellar: :any_skip_relocation, monterey: "6fc266f5374526ff225dd0fca2645ffe1f445665c3877b6f3a1879db503a00d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "41f00d0bc7f3472d5bf84ebd9756e75f38d7671732ecfef5ee573b27f3cb0fba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ab05f0d7461e89b9f7ac1b18c6abb4d191a9c045eaf151d1126eb35f91157c6" + end + + depends_on "perl" + depends_on "readline" + depends_on "rrdtool" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "zlib" + + on_linux do + depends_on "libtirpc" + end + + resource "Switch" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Switch-2.17.tar.gz" + sha256 "31354975140fe6235ac130a109496491ad33dd42f9c62189e23f49f75f936d75" + end + + def install + ENV.append_to_cflags "-I#{Formula["libtirpc"].opt_include}/tirpc" if OS.linux? + + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + + ENV["PERL_EXT_LIB"] = libexec/"lib/perl5" + + system "./configure", "--prefix=#{prefix}", "--without-examples" + system "make" + system "make", "install" + end + + test do + ENV["PERL5LIB"] = libexec/"lib/perl5" + system "perl", "-e", "use qosient::util;" + + assert_match "Ra Version #{version}", shell_output("#{bin}/ra -h", 1) + end +end diff --git a/Formula/a/argus.rb b/Formula/a/argus.rb new file mode 100644 index 0000000000000..3f0ac3f02bf0e --- /dev/null +++ b/Formula/a/argus.rb @@ -0,0 +1,45 @@ +class Argus < Formula + desc "Audit Record Generation and Utilization System server" + homepage "https://openargus.org" + url "https://github.com/openargus/argus/archive/refs/tags/v5.0.2.tar.gz" + sha256 "1718454ac717fe5f500d00ff608097e3c5483f4e138aa789e67e306feb52bafb" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e54dcb3c0b96387252e93801d6cad6152fb3a0864d9379a253070aca6b0d8469" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "347acb963caee49f75d34625c31ea0d62da3a7197cdce61877ea7a9cc4234a47" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df1ed0d1ca211cc64e1d53368628178ba4b184e7b13f34734dfd8da167008dd5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a7fb76b9b7256db647ea6a124882c3cfee5e0838b08cca59494f53ce295caac1" + sha256 cellar: :any_skip_relocation, sonoma: "ee799b219fbfca3ff8c1babf20c550ab30274e3fa2e87f964a53a3a47416d65c" + sha256 cellar: :any_skip_relocation, ventura: "a48764b6fbf43defc9dfa3505f6bc5e53c683eb2a94a5a05575fb31c16305695" + sha256 cellar: :any_skip_relocation, arm64_linux: "466b334735a7bca04ea37ec2c5e1fdaccaa651c75c59fbbc57cad68709dae99d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f955db69cd767d836e4f1c784f21d22205f3f7ed466218f1837ea89743e3a8c1" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "cyrus-sasl" + uses_from_macos "libpcap" + uses_from_macos "zlib" + + on_linux do + depends_on "libtirpc" + end + + def install + if OS.linux? + ENV.append_to_cflags "-I#{Formula["libtirpc"].opt_include}/tirpc" + ENV.append "LIBS", "-ltirpc" + end + system "./configure", "--with-sasl", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "Pages", shell_output(bin/"argus-vmstat") if OS.mac? + assert_match "Argus Version #{version}", shell_output("#{sbin}/argus -h", 255) + system sbin/"argus", "-r", test_fixtures("test.pcap"), "-w", testpath/"test.argus" + assert_path_exists testpath/"test.argus" + end +end diff --git a/Formula/a/argyll-cms.rb b/Formula/a/argyll-cms.rb new file mode 100644 index 0000000000000..d6ba374067e12 --- /dev/null +++ b/Formula/a/argyll-cms.rb @@ -0,0 +1,124 @@ +class ArgyllCms < Formula + desc "ICC compatible color management system" + homepage "https://www.argyllcms.com/" + url "https://www.argyllcms.com/Argyll_V3.4.1_src.zip" + sha256 "41ad51e02a3ec6981611be473221a3877fd359d3c1fa2172b4265dbe55f8b746" + license "AGPL-3.0-only" + + livecheck do + url "https://www.argyllcms.com/downloadsrc.html" + regex(/href=.*?Argyll[._-]v?(\d+(?:\.\d+)+)[._-]src\.zip/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ae9c7d99adca2b6382b1fbd34f36db5b5fca42d18d362408b8095acb10cb04e4" + sha256 cellar: :any, arm64_sequoia: "f16dded9bf615eb33b11a9533524d2020498e7aab4766eb7c4de993e83cc8719" + sha256 cellar: :any, arm64_sonoma: "0e15bf67bbbf98bf5cc480af3a90a0ac900616fd96dccf9cb1a53493e9ea6a0d" + sha256 cellar: :any, arm64_ventura: "b39ba95474701b963dadfddeca4bea00b037bb1baa766382e1108a879c50f84b" + sha256 cellar: :any, sonoma: "52ec759d47c3d4925f111e492be5f52417bca86187e1aaf212b9a834729ccdb5" + sha256 cellar: :any, ventura: "f8bc593f16e7c88c7c9ff5b852269223166f40d2de1dc68ea8957d0bc02c21d9" + sha256 arm64_linux: "6e40aab9550ed5d4df52fb6bd054e352d0f6fdbccb5d02f412b2294c40f49332" + sha256 x86_64_linux: "3d62059d60adbb6c0483ff303014de71bd9b2d4dd29b67d1b5122e8f5c817a72" + end + + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + depends_on "libxext" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on "libxscrnsaver" + depends_on "libxxf86vm" + depends_on "xorgproto" + end + + conflicts_with "num-utils", because: "both install `average` binaries" + + resource "jam" do + # The "Jam Documentation" page has a banner stating: + # "Perforce is no longer actively contributing to the Jam Open Source project. + # The last Perforce release of Jam was version 2.6 in August of 2014. We will + # keep the Perforce-controlled links and information posted here available + # until further notice." + + # The argyll-cms maintainer told us that they want to keep jam as a build system + # even if it is not maintained anymore + # https://www.freelists.org/post/argyllcms/Status-of-Jam-build,1 + # Vendoring jam will allow to get rid of our jam formula + url "https://swarm.workshop.perforce.com/downloads/guest/perforce_software/jam/jam-2.6.1.zip" + sha256 "72ea48500ad3d61877f7212aa3d673eab2db28d77b874c5a0b9f88decf41cb73" + + # * Ensure is included on macOS, fixing the following error: + # `make1.c:392:8: error: call to undeclared function 'unlink'`. + # * Fix a typo that leads to an undeclared function error: + # `parse.c:102:20: error: call to undeclared function 'yylineno'` + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/jam/2.6.1.patch" + sha256 "1850cf53c4db0e05978d52b90763b519c00fa4f2fbd6fc2753200e49943821ec" + end + end + + def install + resource("jam").stage do + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LOCATE_TARGET=bin" + (buildpath/"bin").install "bin/jam" + end + + # Remove bundled libraries to prevent fallback + %w[jpeg png tiff zlib].each { |l| rm_r(buildpath/l) } + + inreplace "Jamtop" do |s| + openssl = Formula["openssl@3"] + libname = shared_library("lib$(lcase)") + usr = if OS.mac? + "#{MacOS.sdk_path_if_needed}/usr" + else + "/usr" + end + + # These two inreplaces make sure all Homebrew and SDK libraries can be found by the Jamfile + s.gsub! "[ GLOB /usr/include$(subd) : $(lcase).h $(lcase)lib.h ]", + "[ GLOB #{openssl.opt_include}$(subd) : $(lcase).h $(lcase)lib.h ] || " \ + "[ GLOB #{HOMEBREW_PREFIX}/include$(subd) : $(lcase).h $(lcase)lib.h ] || " \ + "[ GLOB #{usr}/include$(subd) : $(lcase).h $(lcase)lib.h ]" + s.gsub! "[ GLOB /usr/lib : lib$(lcase).so ]", + "[ GLOB #{openssl.opt_lib} : #{libname} ] || " \ + "[ GLOB #{HOMEBREW_PREFIX}/lib : #{libname} ] || " \ + "[ GLOB #{usr}/lib : #{libname} lib$(lcase).tbd ]" + + # These two inreplaces make sure the X11 headers can be found on Linux. + s.gsub! "/usr/X11R6/include", HOMEBREW_PREFIX/"include" + s.gsub! "/usr/X11R6/lib", HOMEBREW_PREFIX/"lib" + end + + ENV["NUMBER_OF_PROCESSORS"] = ENV.make_jobs.to_s + + inreplace "makeall.sh", "jam", buildpath/"bin/jam" + inreplace "makeinstall.sh", "jam", buildpath/"bin/jam" + system "sh", "makeall.sh" + system "./makeinstall.sh" + rm "bin/License.txt" + rm "bin/com.argyllcms.metainfo.xml" + prefix.install "bin", "ref", "doc" + end + + test do + system bin/"targen", "-d", "0", "test.ti1" + system bin/"printtarg", testpath/"test.ti1" + + %w[test.ti1.ps test.ti1.ti1 test.ti1.ti2].each do |f| + assert_path_exists testpath/f + end + + # Skip this part of the test on Linux because it hangs due to lack of a display. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "Calibrate a Display", shell_output("#{bin}/dispcal 2>&1", 1) + end +end diff --git a/Formula/a/aria2.rb b/Formula/a/aria2.rb new file mode 100644 index 0000000000000..30354dfcdd33e --- /dev/null +++ b/Formula/a/aria2.rb @@ -0,0 +1,64 @@ +class Aria2 < Formula + desc "Download with resuming and segmented downloading" + homepage "https://aria2.github.io/" + url "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.xz" + sha256 "60a420ad7085eb616cb6e2bdf0a7206d68ff3d37fb5a956dc44242eb2f79b66b" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "02c192d4dc72d0c3960bbf780b3987ef70c3f35362a6b2aecac8840c96914f18" + sha256 arm64_sequoia: "fa42d58d43ca08575c6df1b9c8b6141edc97fdeec4c60fc3e39c50fffc7a301e" + sha256 arm64_sonoma: "89117256b91a5a87d4e31fb4054f7a0b45681a97627547b4db7498930486ff05" + sha256 arm64_ventura: "fd06b5b187243559c5f286767ab8f7f7d5f16d361bbd3ff9faf0909643920849" + sha256 arm64_monterey: "515cf8d197ec78753fa6b7462f775a3e625340e04f02207ae6dd1b6135afecdd" + sha256 sonoma: "7ad8b56e2edf9df28458b88cc88faec5e7ada3bd9b5652420aa6168325a10260" + sha256 ventura: "2821ec44b09994465d3bb8f8e4da6af8d2dd70cbdbf92f3b75d18ba65064e681" + sha256 monterey: "41ce19b788f94a35025e306afa0f90a85164243d18f7350340cf75b9edf18b6c" + sha256 arm64_linux: "ac394dd527b6cfcfa479e57854c9495dd12490f62074bc368795867688398036" + sha256 x86_64_linux: "e459fd063b80457e1d8ead88e3168effb13a80974e4d5e2fcd1bd2a11aa1cb00" + end + + depends_on "pkgconf" => :build + depends_on "libssh2" + depends_on "openssl@3" + depends_on "sqlite" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + ENV.cxx11 + + args = %w[ + --disable-silent-rules + --with-libssh2 + --without-gnutls + --without-libgmp + --without-libnettle + --without-libgcrypt + ] + if OS.mac? + args << "--with-appletls" + args << "--without-openssl" + else + args << "--without-appletls" + args << "--with-openssl" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + + bash_completion.install "doc/bash_completion/aria2c" + end + + test do + system bin/"aria2c", "https://brew.sh/" + assert_path_exists testpath/"index.html", "Failed to create index.html!" + end +end diff --git a/Formula/a/aribb24.rb b/Formula/a/aribb24.rb new file mode 100644 index 0000000000000..4538a5b691c9d --- /dev/null +++ b/Formula/a/aribb24.rb @@ -0,0 +1,54 @@ +class Aribb24 < Formula + desc "Library for ARIB STD-B24, decoding JIS 8 bit characters and parsing MPEG-TS" + homepage "https://code.videolan.org/jeeb/aribb24" + url "https://code.videolan.org/jeeb/aribb24/-/archive/v1.0.4/aribb24-v1.0.4.tar.bz2" + sha256 "88b58dd760609372701087e25557ada9f7c6d973306c017067c5dcaf9e2c9710" + license "LGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "68aed54c8d78b72dcc8306e91e004c2afcf193563be22adca2774fa094121ee5" + sha256 cellar: :any, arm64_sequoia: "4f5a5fb9f91e28f11bbf33dda14a54b36510cecc834a29f0ba28d980a57760fc" + sha256 cellar: :any, arm64_sonoma: "00fe805d46c08342ec5d62c3eaddfb272513ce55e5eeba324317f43f0783a6d8" + sha256 cellar: :any, arm64_ventura: "60ea5e1c7b35cde769b03c6172b4ff78dec340a91f8ae2e1c6b490fdce65c34a" + sha256 cellar: :any, arm64_monterey: "9e6741b85e4276c01c4ee9a9a304f816a2bbc7c848bf3f2607308af48c2464b0" + sha256 cellar: :any, arm64_big_sur: "14ac368a22499dc0de526a744fd69ba07c64a01de95e5f9fbf16df2a90c38a6e" + sha256 cellar: :any, sonoma: "1b3810c428e97ddad8cbefff6c59bfa6b6ac5e00903c73cc72a985a23b87dbce" + sha256 cellar: :any, ventura: "4d5f10b9965e29ae0ec8983ee370eb6e797eca7b00f00e3e1dc578c47ca3f5a2" + sha256 cellar: :any, monterey: "58a30ff5299bfc9311c30ae8ff571f156eb336add5b25d35d36c6e2a8e8d5534" + sha256 cellar: :any, big_sur: "fe1e9015a5c0791019bcdf64b980730d8736c85ea6cf306beef8e06ce8ebfaf9" + sha256 cellar: :any, catalina: "31520472d7d33c860fff359b7ca6cd3e724bf504d9926c601a4db798d21df600" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7b8880e65830477c4e7a14bad00f040eb8db469aab352003869dd1845cc1779" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a53b1584bef9b5d6aead4cc62266c67a9e642ea7234479516f4c083d0316f34" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libpng" + + def install + system "./bootstrap" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + arib_instance_t *ptr = arib_instance_new(NULL); + if (!ptr) + return 1; + arib_instance_destroy(ptr); + return 0; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{include}", + "-L#{lib}", "-laribb24" + system "./test" + end +end diff --git a/Formula/a/arjun.rb b/Formula/a/arjun.rb new file mode 100644 index 0000000000000..40197a8ee7565 --- /dev/null +++ b/Formula/a/arjun.rb @@ -0,0 +1,64 @@ +class Arjun < Formula + include Language::Python::Virtualenv + + desc "HTTP parameter discovery suite" + homepage "https://github.com/s0md3v/Arjun" + url "https://files.pythonhosted.org/packages/04/22/c5b969720d2802de2248c2aac0414ee5ae234887cfe150564d591c73fb23/arjun-2.2.7.tar.gz" + sha256 "b193cdaf97bf7b0e8cd91a41da778639e01fd9738d5f666a8161377f475ce72e" + license "AGPL-3.0-only" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "66c25ac1e7cf361e37ec88198a3312de04d0d4257cdc5c8d4c3efa578a7b2c5b" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + def python3 + "python3.14" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "dicttoxml" do + url "https://files.pythonhosted.org/packages/ee/c9/3132427f9e64d572688e6a1cbe3d542d1a03f676b81fb600f3d1fd7d2ec5/dicttoxml-1.7.16.tar.gz" + sha256 "6f36ce644881db5cd8940bee9b7cb3f3f6b7b327ba8a67d83d3e2caa0538bf9d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "ratelimit" do + url "https://files.pythonhosted.org/packages/ab/38/ff60c8fc9e002d50d48822cc5095deb8ebbc5f91a6b8fdd9731c87a147c9/ratelimit-2.2.1.tar.gz" + sha256 "af8a9b64b821529aca09ebaf6d8d279100d766f19e90b5059ac6a718ca6dee42" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + dbfile = libexec/Language::Python.site_packages(python3)/"arjun/db/small.txt" + output = shell_output("#{bin}/arjun -u https://mockbin.org/ -m GET -w #{dbfile}") + assert_match "No parameters were discovered", output + end +end diff --git a/Formula/a/arkade.rb b/Formula/a/arkade.rb new file mode 100644 index 0000000000000..988231a7b1ab0 --- /dev/null +++ b/Formula/a/arkade.rb @@ -0,0 +1,44 @@ +class Arkade < Formula + desc "Open Source Kubernetes Marketplace" + homepage "https://blog.alexellis.io/kubernetes-marketplace-two-year-update/" + url "https://github.com/alexellis/arkade/archive/refs/tags/0.11.54.tar.gz" + sha256 "e65686a035c299289dd61d09e051db3ef8146e27e31daed0bffbbb1c35caec01" + license "MIT" + head "https://github.com/alexellis/arkade.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1c1419dce24e47fa7e836119ca91fde0e5d303634b8ec714b5220c8afc11630f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1c1419dce24e47fa7e836119ca91fde0e5d303634b8ec714b5220c8afc11630f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c1419dce24e47fa7e836119ca91fde0e5d303634b8ec714b5220c8afc11630f" + sha256 cellar: :any_skip_relocation, sonoma: "8bcb3e4c7694328fd375f2546885e8172883ffcfd208150b5b8db13f7e96a9c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7ce998528bc0fa0b95bcdc7f043526d05e692ce502ea8a99b7035b16ba67640" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4581180bb9e63b596d4741c11ff4486acc792d2c60902f044cb90099869bbbb" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/alexellis/arkade/pkg.Version=#{version} + -X github.com/alexellis/arkade/pkg.GitCommit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + bin.install_symlink "arkade" => "ark" + + generate_completions_from_executable(bin/"arkade", "completion") + # make zsh completion also work for `ark` symlink + inreplace zsh_completion/"_arkade", "#compdef arkade", "#compdef arkade ark=arkade" + end + + test do + assert_match "Version: #{version}", shell_output("#{bin}/arkade version") + assert_match "Info for app: openfaas", shell_output("#{bin}/arkade info openfaas") + end +end diff --git a/Formula/a/arm-linux-gnueabihf-binutils.rb b/Formula/a/arm-linux-gnueabihf-binutils.rb new file mode 100644 index 0000000000000..7c4933cf18f61 --- /dev/null +++ b/Formula/a/arm-linux-gnueabihf-binutils.rb @@ -0,0 +1,64 @@ +class ArmLinuxGnueabihfBinutils < Formula + desc "FSF/GNU binutils for cross-compiling to arm-linux" + homepage "https://www.gnu.org/software/binutils/binutils.html" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "5d35ae39bdf28bc71b5043ca0ee5c224a00535e9bfc991d1a2e0cb81f7c11e81" + sha256 arm64_sequoia: "37eb2bbc064e560614b3bea589ccfc16323bf5b437befeb343869350f077b10c" + sha256 arm64_sonoma: "eff2bd1e8b7d29e647aef8f13a928f869f2aef7130d09ffd069b948c0d7fd5ca" + sha256 arm64_ventura: "5ec2f35a507d2013b01cff81538308aa0feb514308f15639c01e0ae175fa19c0" + sha256 sonoma: "f77281da449bf026e85bca7a473ec2e16b719c7668b57ed1c4b49d6d89df4013" + sha256 ventura: "d0add9a330375953283e6185678a06bfb128eddb4e51a15c6a0a66bf0b8cc0ba" + sha256 arm64_linux: "d3c1a3f7a1d5d6a47fbd9c71065c4ffda482f270a7edc20bab5f33ea58d2bba5" + sha256 x86_64_linux: "c24dcc4e9b0df3bdcb68abfd9c620169ba0a30246f1c14a775f0b8fcdd9e3ab0" + end + + depends_on "pkgconf" => :build + # Requires the header + # https://sourceware.org/bugzilla/show_bug.cgi?id=31320 + depends_on macos: :ventura + depends_on "zstd" + + uses_from_macos "zlib" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + ENV.cxx11 + + # Avoid build failure: https://sourceware.org/bugzilla/show_bug.cgi?id=23424 + ENV.append "CXXFLAGS", "-Wno-c++11-narrowing" + + target = "arm-linux-gnueabihf" + system "./configure", "--enable-deterministic-archives", + "--libdir=#{lib}/#{target}", + "--infodir=#{info}/#{target}", + "--disable-werror", + "--target=#{target}", + "--enable-gold=yes", + "--enable-ld=yes", + "--enable-interwork", + "--with-system-zlib", + "--with-zstd", + "--disable-nls", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "f()", shell_output("#{bin}/arm-linux-gnueabihf-c++filt _Z1fv") + end +end diff --git a/Formula/a/arm-none-eabi-binutils.rb b/Formula/a/arm-none-eabi-binutils.rb new file mode 100644 index 0000000000000..fc2b093d734b7 --- /dev/null +++ b/Formula/a/arm-none-eabi-binutils.rb @@ -0,0 +1,62 @@ +class ArmNoneEabiBinutils < Formula + desc "GNU Binutils for arm-none-eabi cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_tahoe: "5f7ce2be887c3bcb53d7e15e70d7ea560fc87ac3df99da6936233335ffd15967" + sha256 arm64_sequoia: "9d2d6391ad41a79397d221cc7def963c36afbae486a6063f33400244ed640beb" + sha256 arm64_sonoma: "cd29ee3d38b8e7f479ffbd0c9467d5c752f26c80eb9ac5bb0ff96625d58d92ce" + sha256 arm64_ventura: "42e5869d2ab0312188377d65b066f0bf612773445c51f9801dc2a67642cd4a37" + sha256 sonoma: "827b68df4de6ee8faa94066073e9c4b68dc24f4bf05a20294b9847001becc890" + sha256 ventura: "74db40f7b62e88c11db9270d1f2e4f594b8ba69117a634f54a5b1414837260d0" + sha256 arm64_linux: "66359d623c04dc1ab75a3c59cc557add208046e847d33f196218cac9ddadebd7" + sha256 x86_64_linux: "ad176f02f9fe696910855d5f9a70f2fefc54095f8a22fcc0054dc8e76b1d42ec" + end + + depends_on "pkgconf" => :build + depends_on "zstd" + + uses_from_macos "zlib" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "arm-none-eabi" + system "./configure", "--target=#{target}", + "--prefix=#{prefix}", + "--libdir=#{lib}/#{target}", + "--infodir=#{info}/#{target}", + "--with-system-zlib", + "--with-zstd", + "--enable-multilib", + "--disable-nls" + system "make" + system "make", "install" + end + + test do + (testpath/"test-s.s").write <<~ASM + .section .text + .globl _start + _start: + mov r1, #0 + mov r2, #1 + svc #0x80 + ASM + + system bin/"arm-none-eabi-as", "-o", "test-s.o", "test-s.s" + assert_match "file format elf32-littlearm", + shell_output("#{bin}/arm-none-eabi-objdump -a test-s.o") + assert_match "f()", shell_output("#{bin}/arm-none-eabi-c++filt _Z1fv") + end +end diff --git a/Formula/a/arm-none-eabi-gcc.rb b/Formula/a/arm-none-eabi-gcc.rb new file mode 100644 index 0000000000000..e8dcfc62c202b --- /dev/null +++ b/Formula/a/arm-none-eabi-gcc.rb @@ -0,0 +1,73 @@ +class ArmNoneEabiGcc < Formula + desc "GNU compiler collection for arm-none-eabi" + homepage "https://gcc.gnu.org" + url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + mirror "https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_tahoe: "92a7103601dc0c37db13ed93343b4671665c46e8ddd9f254ba697ad744eb9c8c" + sha256 arm64_sequoia: "47c0d0ced3dd45b08d524e79c6bbb260aaaefa9f1b3c7b9125aca936ca7d8b6c" + sha256 arm64_sonoma: "70af1c1ff0e2fe89bd5a48fcd474b7e20f5b8beaba7c0cab685abfd575abbdb9" + sha256 arm64_ventura: "ea891b743bfa1d20750b0bf3a6d42d26a75735e2915db2274aeeba005741af7c" + sha256 sonoma: "ffaedf2d455c5355e38e12bb6e7cb6e48461207645b645de0d63c4a7cd21eaa1" + sha256 ventura: "f2afbcf4b04dd28df9aa429637246aba842181c85a7e926c1ece700695a41d3a" + sha256 arm64_linux: "68de611434d96d73eeb8428e02b7c9d66b4bae87ce814a6d49a2a171d6c517b4" + sha256 x86_64_linux: "7fe586dbc32997229e4454d233077b94563d2a36802a5c2b608bd7edcd9e00c0" + end + + depends_on "arm-none-eabi-binutils" + depends_on "gmp" + depends_on "isl" + depends_on "libmpc" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + target = "arm-none-eabi" + mkdir "arm-none-eabi-gcc-build" do + system "../configure", "--target=#{target}", + "--prefix=#{prefix}", + "--infodir=#{info}/#{target}", + "--disable-nls", + "--without-headers", + "--with-as=#{Formula["arm-none-eabi-binutils"].bin}/arm-none-eabi-as", + "--with-ld=#{Formula["arm-none-eabi-binutils"].bin}/arm-none-eabi-ld", + "--enable-languages=c,c++,objc,lto", + "--enable-lto", + "--enable-multilib", + "--with-multilib-list=aprofile,rmprofile", + "--with-system-zlib", + "--with-zstd", + *std_configure_args + system "make", "all-gcc" + system "make", "install-gcc" + system "make", "all-target-libgcc" + system "make", "install-target-libgcc" + + # FSF-related man pages may conflict with native gcc + rm_r(share/"man/man7") + end + end + + test do + (testpath/"test-c.c").write <<~C + int main(void) + { + int i=0; + while(i<10) i++; + return i; + } + C + system bin/"arm-none-eabi-gcc", "-c", "-o", "test-c.o", "test-c.c" + assert_match "file format elf32-littlearm", + shell_output("#{Formula["arm-none-eabi-binutils"].bin}/arm-none-eabi-objdump -a test-c.o") + end +end diff --git a/Formula/a/arm-none-eabi-gdb.rb b/Formula/a/arm-none-eabi-gdb.rb new file mode 100644 index 0000000000000..7d626f90e20e7 --- /dev/null +++ b/Formula/a/arm-none-eabi-gdb.rb @@ -0,0 +1,86 @@ +class ArmNoneEabiGdb < Formula + desc "GNU debugger for arm-none-eabi cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + sha256 "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5" + license "GPL-3.0-or-later" + revision 1 + head "https://sourceware.org/git/binutils-gdb.git", branch: "master" + + livecheck do + formula "gdb" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "c2740373076acc200aa0157c156004d5e7a87276a38eef9c363ea2cdeb577f64" + sha256 arm64_sequoia: "f27a61727c7a0c34b9b5656173db8c49b9fbbd78b902644bbdbd1a6ebb32423c" + sha256 arm64_sonoma: "b018d62e0c9398b4a04d4e046b6cea110eab0c162f3fe888226cd627f156b68d" + sha256 sonoma: "995c4e02b1c766c51e5fa1b864c3194977617fa0830ce4fec42db7ba83878740" + sha256 arm64_linux: "a3ee4b947887ee5c53f3e183c9267928a998784befad772a322baf7780f8c2ee" + sha256 x86_64_linux: "0ecf24fbf0edc3dfe36e401357494e031a88f2457a44cce5a81c2bdc513dc1ce" + end + + depends_on "pkgconf" => :build + depends_on "arm-none-eabi-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "ncurses" # https://github.com/Homebrew/homebrew-core/issues/224294 + depends_on "python@3.14" + depends_on "readline" + depends_on "xz" # required for lzma support + depends_on "zstd" + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "zlib" + + # Workaround for https://github.com/Homebrew/brew/issues/19315 + on_sequoia :or_newer do + on_intel do + depends_on "expat" + end + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "arm-none-eabi" + args = %W[ + --target=#{target} + --datarootdir=#{share}/#{target} + --includedir=#{include}/#{target} + --infodir=#{info}/#{target} + --mandir=#{man} + --disable-binutils + --disable-nls + --enable-tui + --with-curses + --with-expat + --with-lzma + --with-python=#{which("python3.14")} + --with-system-readline + --with-system-zlib + --with-zstd + ] + + mkdir "build" do + system "../configure", *args, *std_configure_args + ENV.deparallelize # Error: common/version.c-stamp.tmp: No such file or directory + system "make" + + # Don't install bfd or opcodes, as they are provided by binutils + system "make", "install-gdb" + end + end + + test do + (testpath/"test.c").write "void _start(void) {}" + system "#{Formula["arm-none-eabi-gcc"].bin}/arm-none-eabi-gcc", "-g", "-nostdlib", "test.c" + assert_match "Symbol \"_start\" is a function at address 0x", + shell_output("#{bin}/arm-none-eabi-gdb -batch -ex 'info address _start' a.out") + end +end diff --git a/Formula/a/armadillo.rb b/Formula/a/armadillo.rb new file mode 100644 index 0000000000000..a859b14db2a91 --- /dev/null +++ b/Formula/a/armadillo.rb @@ -0,0 +1,45 @@ +class Armadillo < Formula + desc "C++ linear algebra library" + homepage "https://arma.sourceforge.net/" + url "https://downloads.sourceforge.net/project/arma/armadillo-15.2.1.tar.xz" + sha256 "a5b8109da3c169802f51a14d3bd1246395c24bbca55601760b0c96a3c0b2f8fa" + license "Apache-2.0" + + livecheck do + url :stable + regex(%r{url=.*?/armadillo[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7f3c00e1620ee33575df244707f8b3c1f289530b002378ce2c29ebc70e9fe71c" + sha256 cellar: :any, arm64_sequoia: "93de26dcb6df0074870e5c61409c1ce359b8ab7bd070bb0fc8841da19b8c9372" + sha256 cellar: :any, arm64_sonoma: "2d6fc08193d1ebcae41f3f94b867e26b003256bea2b8798d71307ce99da8d1ab" + sha256 cellar: :any, sonoma: "bbb7d8398b7ccf50d2695dcf6f3196931218cfe1b8d0dff65297e188d305591c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e94732daa01cc037f28d1bd459eeae5044ce9f4d41c15223477cb25d3de7d305" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4755a5715ee970cf8d406e59476e66e6a741a76caad97907e07be48ec8e1b188" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "arpack" + depends_on "openblas" + + def install + system "cmake", "-S", ".", "-B", "build", "-DALLOW_OPENBLAS_MACOS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(int argc, char** argv) { + std::cout << arma::arma_version::as_string() << std::endl; + } + CPP + system ENV.cxx, "-std=c++14", "test.cpp", "-I#{include}", "-L#{lib}", "-larmadillo", "-o", "test" + assert_equal version.to_s.to_i, shell_output("./test").to_i + end +end diff --git a/Formula/a/arp-scan-rs.rb b/Formula/a/arp-scan-rs.rb new file mode 100644 index 0000000000000..1a8a370b73589 --- /dev/null +++ b/Formula/a/arp-scan-rs.rb @@ -0,0 +1,32 @@ +class ArpScanRs < Formula + desc "ARP scan tool written in Rust for fast local network scans" + homepage "https://github.com/kongbytes/arp-scan-rs" + url "https://github.com/kongbytes/arp-scan-rs/archive/refs/tags/v0.14.0.tar.gz" + sha256 "9cd8ae882d47aef59f79ceedc797a9697b0f1b81916488a43a84b0a807b482fa" + license "AGPL-3.0-or-later" + head "https://github.com/kongbytes/arp-scan-rs.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "402e25b075591a2b324adfb852c1a457d445ea9821c6be9f6056f07fe38308ee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcd5eb8d1a5225c52e76fdeabc79fdff7d97ecf88ae25671a7c647cfb3867c31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76c6baf3ec726dcd760b513fcb2be26f5edbd68592e99e444a1b9ffeaee8878e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4121091ba5ad198c3498f015af7ca9b6ede928b8e43b525529b9e0554d3fa07f" + sha256 cellar: :any_skip_relocation, sonoma: "95a48cfa4db0dd5ae427484d1785ec5cc6bc1d741c3930ded3423dcaf8b7afbc" + sha256 cellar: :any_skip_relocation, ventura: "435b583d3a01fa0504ac92950115c41a72d23c96001f170fd9e3316465758b5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "22825e69ba7b9bef557bfdf6145a5c5b5a53a655c294028c5e359f039d253253" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de71563f7071cdd6b37930ca4f20f2e9c3746f3befa53c9353822dc0dc838c70" + end + + depends_on "rust" => :build + + conflicts_with "arp-scan", because: "both install `arp-scan` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/arp-scan --version") + assert_match "Default network interface", shell_output("#{bin}/arp-scan -l") + end +end diff --git a/Formula/a/arp-scan.rb b/Formula/a/arp-scan.rb new file mode 100644 index 0000000000000..d8249161bcb08 --- /dev/null +++ b/Formula/a/arp-scan.rb @@ -0,0 +1,43 @@ +class ArpScan < Formula + desc "ARP scanning and fingerprinting tool" + homepage "https://github.com/royhills/arp-scan" + url "https://github.com/royhills/arp-scan/archive/refs/tags/1.10.0.tar.gz" + sha256 "204b13487158b8e46bf6dd207757a52621148fdd1d2467ebd104de17493bab25" + license all_of: [ + "GPL-3.0-or-later", + "BSD-3-Clause", # mt19937ar.c + "ISC", # strlcpy.c (Linux) + ] + head "https://github.com/royhills/arp-scan.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a4212527be3b73cd4a5481e13014f6612f027139d5c0851ff3afca4f1828b137" + sha256 arm64_sequoia: "14249f8af1f8fa4a87cec61eeed1b7d2e15bdbdf917736eeb0a0fb5ec2be5b81" + sha256 arm64_sonoma: "bb46467cee8e1d7b24a8e7716cbdfacd2b8697c031d26a07658b8618557ff773" + sha256 arm64_ventura: "190e487560ceb1e564444c501f9bd814b2401d034e792a9c44b3d5f9a65ba720" + sha256 arm64_monterey: "be3d37daa3c51629577fb423af1cec9549a7835673a737407a6746b529bbfc58" + sha256 sonoma: "f5b3e8d47b51e2c3e822b19727ba50a05016a90f1a8e4d446bc5c5a33bed2ba9" + sha256 ventura: "be308c8baf776004a152beedf6b75edccdd661090a6dfc09e6ac6580c156c784" + sha256 monterey: "7f00b162c2af2f64d8697ca0e7e7f11137b361ee59f8f2be04fcf674ff4ef54f" + sha256 arm64_linux: "6d668fdbe4f8a7a72ea57f3a0cdaa5791de6f46b30275e355bc294d0420bad02" + sha256 x86_64_linux: "18935cd6c4a1d707abca5e0d3b0119d696bf6f834714393b018650f973287656" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "libpcap" + + conflicts_with "arp-scan-rs", because: "both install `arp-scan` binaries" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"arp-scan", "-V" + end +end diff --git a/Formula/a/arp-sk.rb b/Formula/a/arp-sk.rb new file mode 100644 index 0000000000000..73a56e612fbea --- /dev/null +++ b/Formula/a/arp-sk.rb @@ -0,0 +1,43 @@ +class ArpSk < Formula + desc "ARP traffic generation tool" + homepage "https://web.archive.org/web/20180223202629/sid.rstack.org/arp-sk/" + url "https://web.archive.org/web/20180223202629/sid.rstack.org/arp-sk/files/arp-sk-0.0.16.tgz" + mirror "https://pkg.freebsd.org/ports-distfiles/arp-sk-0.0.16.tgz" + sha256 "6e1c98ff5396dd2d1c95a0d8f08f85e51cf05b1ed85ea7b5bcf73c4ca5d301dd" + license "GPL-2.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "6fd6f88cc3ac21f19654e0c515e9cc473dcb6731a1e89eb83f26727b1aef6ee8" + sha256 cellar: :any, arm64_sonoma: "f4fe431e1423df2852ee7e36f9898c694bd5e95558c21afec86858858acd6403" + sha256 cellar: :any, arm64_ventura: "c910b1eeb3587b770b5a4c77904a7e5ad35824740762571a93fdef18175c0c39" + sha256 cellar: :any, arm64_monterey: "814f89b6e1bfcf86c29eefef47ccc5077c8d38efd4626cccc029363097048328" + sha256 cellar: :any, arm64_big_sur: "e9a3123cc035debcdac3582b5aa868cf8ab2f64d10c2ddac6e41df4df0121d52" + sha256 cellar: :any, sonoma: "e8255ab06ca442c3a5c01dc3edeb8fa4c9f0940aa0f1e2c744d5030d0f192984" + sha256 cellar: :any, ventura: "cc3c9357bd9440f49aa61f7483fe31561a035e544416727ee785bcef94014022" + sha256 cellar: :any, monterey: "43b6e66bf25c5be9893862c174e4a1aaaf3928f38bc68c25d0177026d3923a4f" + sha256 cellar: :any, big_sur: "206b69b4456fabe2614dbf5c5ab2886530d2b238f18adb28545a9758fc9a4561" + sha256 cellar: :any, catalina: "bc28c6d58a3838fac59ab625ab26a917b3b0282ac54a8f37a95034efd0740007" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a6745104a8b8035108f38a3f35ae90527790a02641cca54c29e99c962c74f16" + end + + disable! date: "2025-01-10", because: :repo_removed + + depends_on "libnet" + + def install + # libnet 1.2 compatibility - it is API compatible with 1.1. + # arp-sk's last update was in 2004. + inreplace "configure", "1.1.", "1.3" + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-libnet=#{Formula["libnet"].opt_prefix}" + system "make", "install" + end + + test do + assert_match "arp-sk version #{version}", shell_output("#{sbin}/arp-sk -V") + end +end diff --git a/Formula/a/arpack.rb b/Formula/a/arpack.rb new file mode 100644 index 0000000000000..a91585a42fec6 --- /dev/null +++ b/Formula/a/arpack.rb @@ -0,0 +1,56 @@ +class Arpack < Formula + desc "Routines to solve large scale eigenvalue problems" + homepage "https://github.com/opencollab/arpack-ng" + url "https://github.com/opencollab/arpack-ng/archive/refs/tags/3.9.1.tar.gz" + sha256 "f6641deb07fa69165b7815de9008af3ea47eb39b2bb97521fbf74c97aba6e844" + license "BSD-3-Clause" + revision 1 + head "https://github.com/opencollab/arpack-ng.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "49cef98cf7475c671e5826e23a50d8c093a34685d6a98ed55614916f2196408b" + sha256 cellar: :any, arm64_sequoia: "476f1c28808b3115fa9cf72d17bda20b989dc60d911d3abe85be50a92bd1d6a1" + sha256 cellar: :any, arm64_sonoma: "fcc8d39b5a28e371db0331c0f2ae3de23a6c37e38e9ee5026b88e668c093ea71" + sha256 cellar: :any, arm64_ventura: "99cf4eb648f19ac5355d2572ec5536624ca39d7480fd42bf00fcc478728ac9b4" + sha256 cellar: :any, sonoma: "f2b3e99ace1d79b1b69b986f2bbe88b43ccef0c2662b2158b70586b3c4a40e90" + sha256 cellar: :any, ventura: "153bbc3358e289d2ee528f481a86dcb41de9fe2947713b5e3a7241bfe45cb6de" + sha256 cellar: :any_skip_relocation, arm64_linux: "08a91a56289af355e7139466cff2c2d882e4361bddc76d4b509bee94524154cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37cccca9e03aeb558521d7f5e3022e24c99ba52aaecddfb99fd38ce08287c5bf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "eigen" + depends_on "gcc" # for gfortran + depends_on "open-mpi" + depends_on "openblas" + + def install + args = %W[ + --with-blas=-L#{Formula["openblas"].opt_lib}\ -lopenblas + F77=mpif77 + --enable-mpi + --enable-icb + --enable-eigen + ] + + system "./bootstrap" + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + pkgshare.install "TESTS/testA.mtx", "TESTS/dnsimp.f", "TESTS/mmio.f", "TESTS/debug.h" + end + + test do + system "gfortran", "-o", "test", pkgshare/"dnsimp.f", pkgshare/"mmio.f", + "-L#{lib}", "-larpack", + "-L#{Formula["openblas"].opt_lib}", "-lopenblas" + cp_r pkgshare/"testA.mtx", testpath + assert_match "reached", shell_output("./test") + end +end diff --git a/Formula/a/arping.rb b/Formula/a/arping.rb new file mode 100644 index 0000000000000..4852b746922d6 --- /dev/null +++ b/Formula/a/arping.rb @@ -0,0 +1,35 @@ +class Arping < Formula + desc "Utility to check whether MAC addresses are already taken on a LAN" + homepage "https://github.com/ThomasHabets/arping" + url "https://github.com/ThomasHabets/arping/archive/refs/tags/arping-2.26.tar.gz" + sha256 "58e866dce813d848fb77d5e5e0e866fb4a02b55bab366a0d66409da478ccb12f" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "33a1adf38137a9ba246ad985987abb3f87bf649a9e07498d0720184bc07a5c4d" + sha256 cellar: :any, arm64_sequoia: "a7859260b1ee1211710c85a796a4946e351303d41b12438a4efbb90671f6bb79" + sha256 cellar: :any, arm64_sonoma: "c1947a1d941c8a2192b8ec97f93622df09601f44b184a8ccdcc0bc20bdf05032" + sha256 cellar: :any, arm64_ventura: "180e181d122742cff589f2704d479e3691fcd644b973f8c3ad3ec3d28baac79f" + sha256 cellar: :any, sonoma: "93391c9235609d122da03039bf6ca8d4a94025498f1ce80e3df8a620cb074bc8" + sha256 cellar: :any, ventura: "3b7c88773c4f21c3308ab62ae6c2459fb661b70154d207789c591bdb233f68af" + sha256 cellar: :any_skip_relocation, arm64_linux: "53b81354c772f4ccdce0a2207abd75cc6cb8bcd64323e8c8f55411a3060d97b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d47eea83f17a1a41a3dce0461f3ea8d53869c1aa6a1292f7c3d59e46debdce2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libnet" + + uses_from_macos "libpcap" + + def install + system "./bootstrap.sh" + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system "#{sbin}/arping", "--help" + end +end diff --git a/Formula/a/arpoison.rb b/Formula/a/arpoison.rb new file mode 100644 index 0000000000000..9994753ad5b54 --- /dev/null +++ b/Formula/a/arpoison.rb @@ -0,0 +1,45 @@ +class Arpoison < Formula + desc "UNIX arp cache update utility" + homepage "http://www.arpoison.net/" + url "http://www.arpoison.net/arpoison-0.7.tar.gz" + sha256 "63571633826e413a9bdaab760425d0fab76abaf71a2b7ff6a00d1de53d83e741" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?arpoison[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "befc347407af6f1c5581b82628c49605b87c84b2ce0b2d75f4641496c9ad8789" + sha256 cellar: :any, arm64_sequoia: "5290454e5c88457099cf20619c7bbb8368c13c8a33365791781c7ef693fa6a1e" + sha256 cellar: :any, arm64_sonoma: "2c6f2456c9b2ba1ac193df313e5b48ffe0ec438d0a4abce2a0913a77783e04a1" + sha256 cellar: :any, arm64_ventura: "fda2504283a2fc1da565c46545d392afca3bf569aab288480f0d2521898a1967" + sha256 cellar: :any, arm64_monterey: "26c33452df47e5d7ec7953bce6aab14f87ea5151363530593440964bacd36266" + sha256 cellar: :any, arm64_big_sur: "376ce845d964f61c095ab7a16d2645d3688ebf5810b18dfb8badb8a24da0e66f" + sha256 cellar: :any, sonoma: "44c3875b6b3a12730676cab6eb35ca21b7e7d101cf5aa5647ea8711574e2fb04" + sha256 cellar: :any, ventura: "eee365fdbdf0f7a61b4a2ca6f97f62d3a011bf9b4d27b30ec20ffb7f088633cf" + sha256 cellar: :any, monterey: "efb931a73eccda7ae706e9138112c9ecb898fd09c42dcb0876b85899734eb93f" + sha256 cellar: :any, big_sur: "2009a1bff74b3d6e4fd4eb5f76ce104473e1c322e2f666cf3f5962de2bc99a0c" + sha256 cellar: :any, catalina: "550588e02ce0eb78b47d2d2f9e8b863c29761667aca72e4ad0c0810b13682d9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "75d63e2ad84b69dae9d22fde3a7a2faaa8f35b67766ae1ca1e7c7fcfd79de484" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d1b74e30daecd8e66750565482b964566fbb0b323f86f360de9f0b1ad332cec" + end + + depends_on "libnet" + + def install + inreplace "Makefile", /gcc -lnet (.*)/, "gcc \\1 -lnet" if OS.linux? + system "make" + bin.install "arpoison" + man8.install "arpoison.8" + end + + test do + # arpoison needs to run as root to do anything useful + assert_match "target MAC", shell_output(bin/"arpoison", 1) + end +end diff --git a/Formula/a/arrayfire.rb b/Formula/a/arrayfire.rb new file mode 100644 index 0000000000000..14f7c87040941 --- /dev/null +++ b/Formula/a/arrayfire.rb @@ -0,0 +1,169 @@ +class Arrayfire < Formula + desc "General purpose GPU library" + homepage "https://arrayfire.com" + url "https://github.com/arrayfire/arrayfire/releases/download/v3.10.0/arrayfire-full-3.10.0.tar.bz2" + sha256 "74e14b92a3e5a3ed6b79b000c7625b6223400836ec2ba724c3b356282ea741b3" + license "BSD-3-Clause" + revision 2 + + bottle do + sha256 cellar: :any, arm64_tahoe: "4e0a238ffb7367c46591ae7f903ed93adc6b8a0d61798026c6aaeffe951bd3fb" + sha256 cellar: :any, arm64_sequoia: "af37a413e1a83829845b1093fc3b5a8c7cf2bff49811872892062ac2daef3b39" + sha256 cellar: :any, arm64_sonoma: "1725e37213a35bcf1487255c0de87462b481aaf4a2285bb2c45e5e33adf03d35" + sha256 cellar: :any, sonoma: "41859b6fa2e3c5c994ebf5b40dd9987f28e48a0ce6bd0fbb2a364a37da10200a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9540a276a74efb6207a5736917eaee4712590ee9d82a507c184fbec2cad8463e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f47dd2593ffc1641f6f04703e0d516dff153cc1281f4cdc2e1cbe27aa3757f45" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "clblast" + depends_on "fftw" + depends_on "fmt" + depends_on "openblas" + depends_on "spdlog" + + uses_from_macos "llvm" => :build + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + fails_with :gcc do + cause <<~CAUSE + Building with GCC and CMake CXX_EXTENSIONS disabled causes OpenCL headers + to not expose cl_image_desc.mem_object which is needed by Boost.Compute. + CAUSE + end + + # fmt 11 compatibility + # https://github.com/arrayfire/arrayfire/issues/3596 + patch :DATA + + def install + # FreeImage has multiple CVEs (https://github.com/arrayfire/arrayfire/issues/3547) and + # has been dropped by distros like Arch Linux (https://archlinux.org/todo/drop-freeimage/). + odie "FreeImage should not be a dependency!" if deps.map(&:name).include?("freeimage") + + # Fix for: `ArrayFire couldn't locate any backends.` + rpaths = [ + rpath(source: lib, target: Formula["fftw"].opt_lib), + rpath(source: lib, target: Formula["openblas"].opt_lib), + rpath(source: lib, target: HOMEBREW_PREFIX/"lib"), + ] + + # Our compiler shims strip `-Werror`, which breaks upstream detection of linker features. + # https://github.com/arrayfire/arrayfire/blob/715e21fcd6e989793d01c5781908f221720e7d48/src/backend/opencl/CMakeLists.txt#L598 + inreplace "src/backend/opencl/CMakeLists.txt", "if(group_flags)", "if(FALSE)" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", + "-DAF_BUILD_CUDA=OFF", + "-DAF_COMPUTE_LIBRARY=FFTW/LAPACK/BLAS", + "-DAF_WITH_EXTERNAL_PACKAGES_ONLY=ON", + "-DCMAKE_CXX_STANDARD=14", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples" + end + + test do + ENV.method(DevelopmentTools.default_compiler).call if OS.linux? + cp pkgshare/"examples/helloworld/helloworld.cpp", testpath/"test.cpp" + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-laf", "-lafcpu", "-o", "test" + # OpenCL does not work in CI. + return if Hardware::CPU.arm? && OS.mac? && MacOS.version >= :monterey && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + assert_match "ArrayFire v#{version}", shell_output("./test") + end +end + +__END__ +diff --git a/src/backend/common/jit/NodeIO.hpp b/src/backend/common/jit/NodeIO.hpp +index ac149d9..edffdfa 100644 +--- a/src/backend/common/jit/NodeIO.hpp ++++ b/src/backend/common/jit/NodeIO.hpp +@@ -16,7 +16,7 @@ + template<> + struct fmt::formatter : fmt::formatter { + template +- auto format(const af::dtype& p, FormatContext& ctx) -> decltype(ctx.out()) { ++ auto format(const af::dtype& p, FormatContext& ctx) const -> decltype(ctx.out()) { + format_to(ctx.out(), "{}", arrayfire::common::getName(p)); + return ctx.out(); + } +@@ -58,7 +58,7 @@ struct fmt::formatter { + // Formats the point p using the parsed format specification (presentation) + // stored in this formatter. + template +- auto format(const arrayfire::common::Node& node, FormatContext& ctx) ++ auto format(const arrayfire::common::Node& node, FormatContext& ctx) const + -> decltype(ctx.out()) { + // ctx.out() is an output iterator to write to. + +diff --git a/src/backend/common/ArrayFireTypesIO.hpp b/src/backend/common/ArrayFireTypesIO.hpp +index e7a2e08..5da74a9 100644 +--- a/src/backend/common/ArrayFireTypesIO.hpp ++++ b/src/backend/common/ArrayFireTypesIO.hpp +@@ -21,7 +21,7 @@ struct fmt::formatter { + } + + template +- auto format(const af_seq& p, FormatContext& ctx) -> decltype(ctx.out()) { ++ auto format(const af_seq& p, FormatContext& ctx) const -> decltype(ctx.out()) { + // ctx.out() is an output iterator to write to. + if (p.begin == af_span.begin && p.end == af_span.end && + p.step == af_span.step) { +@@ -73,18 +73,16 @@ struct fmt::formatter { + } + + template +- auto format(const arrayfire::common::Version& ver, FormatContext& ctx) ++ auto format(const arrayfire::common::Version& ver, FormatContext& ctx) const + -> decltype(ctx.out()) { + if (ver.major() == -1) return format_to(ctx.out(), "N/A"); +- if (ver.minor() == -1) show_minor = false; +- if (ver.patch() == -1) show_patch = false; +- if (show_major && !show_minor && !show_patch) { ++ if (show_major && (!show_minor || ver.minor() == -1) && (!show_patch || ver.patch() == -1)) { + return format_to(ctx.out(), "{}", ver.major()); + } +- if (show_major && show_minor && !show_patch) { ++ if (show_major && (show_minor && ver.minor() != -1) && (!show_patch || ver.patch() == -1)) { + return format_to(ctx.out(), "{}.{}", ver.major(), ver.minor()); + } +- if (show_major && show_minor && show_patch) { ++ if (show_major && (show_minor && ver.minor() != -1) && (show_patch && ver.patch() != -1)) { + return format_to(ctx.out(), "{}.{}.{}", ver.major(), ver.minor(), + ver.patch()); + } +diff --git a/src/backend/common/debug.hpp b/src/backend/common/debug.hpp +index 54e74a2..07fa589 100644 +--- a/src/backend/common/debug.hpp ++++ b/src/backend/common/debug.hpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/backend/opencl/compile_module.cpp b/src/backend/opencl/compile_module.cpp +index 89d382c..2c979fd 100644 +--- a/src/backend/opencl/compile_module.cpp ++++ b/src/backend/opencl/compile_module.cpp +@@ -22,6 +22,8 @@ + #include + #include + ++#include ++ + #include + #include + #include diff --git a/Formula/a/arss.rb b/Formula/a/arss.rb new file mode 100644 index 0000000000000..b563c449980e0 --- /dev/null +++ b/Formula/a/arss.rb @@ -0,0 +1,46 @@ +class Arss < Formula + desc "Analyze a sound file into a spectrogram" + homepage "https://arss.sourceforge.net/" + url "https://downloads.sourceforge.net/project/arss/arss/0.2.3/arss-0.2.3-src.tar.gz" + sha256 "e2faca8b8a3902226353c4053cd9ab71595eec6ead657b5b44c14b4bef52b2b2" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bfe57aa3bd356a8a7d3b616e96f854b484a92be45620cbf9ce3729a7ded493bb" + sha256 cellar: :any, arm64_sequoia: "02051c251dcf51557823a6ae6effb432c9c892a42a3ab19e80c9b8f0e61327ad" + sha256 cellar: :any, arm64_sonoma: "b0bf1ad20a051b16f65fbbe1ee4780b674ae2a12953291e51de2ca4fd1d478d8" + sha256 cellar: :any, arm64_ventura: "8daf9486dc32c8698fa1fb731ceb12b04d00019043a803803a71e7472a0781ee" + sha256 cellar: :any, arm64_monterey: "89e8bfca3e620702bbf44ad9f75dcf18c48ef90b5ea97709a657be4cf15e6d25" + sha256 cellar: :any, arm64_big_sur: "0f31b0ca051c5caa089350b30ffd07bed2c24ff2c64dcec6776e19d594b36ad7" + sha256 cellar: :any, sonoma: "1fb3b69447553ca6d5ab2c3a98a44573e0dd3b176a68310b4fc543c68d72f7af" + sha256 cellar: :any, ventura: "1be5f2c7ce8ee18a767065c0ed7b3783de17a36dae8eaf73f838537ece38fb71" + sha256 cellar: :any, monterey: "22747b60848d59c6989707efb0373305af7376de07a4e8958426ddff11ff6bc5" + sha256 cellar: :any, big_sur: "153a648ed0bdec6e1f0abbdbefff2815b793bf79c4967c803cf55a512228dcfa" + sha256 cellar: :any, catalina: "d84220ffc41768520239228b13a8466493682fa30a670163041caa0b06f449a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e094f664eda5e0dabb7269b9a6129d97028bf76e10a6f0d3966479fee9cc79f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5c0a1ade41f7ff063620d37b071556cd71382e9728f160c24393809f89c0f80" + end + + depends_on "cmake" => :build + depends_on "fftw" + + def install + # CMake Error in CMakeLists.txt: No cmake_minimum_required command is present. + inreplace "src/CMakeLists.txt", /\A/, "cmake_minimum_required(VERSION 3.10)\n" + + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `LOGBASE'; CMakeFiles/arss.dir/arss.o:(.bss+0x18): first defined here + # multiple definition of `pi'; CMakeFiles/arss.dir/arss.o:(.bss+0x20): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "cmake", "-S", "src", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/arss" + end + + test do + system bin/"arss", "--version" + end +end diff --git a/Formula/a/artillery.rb b/Formula/a/artillery.rb new file mode 100644 index 0000000000000..a8b9baa0f43e2 --- /dev/null +++ b/Formula/a/artillery.rb @@ -0,0 +1,48 @@ +class Artillery < Formula + desc "Cloud-native performance & reliability testing for developers and SREs" + homepage "https://www.artillery.io/" + url "https://registry.npmjs.org/artillery/-/artillery-2.0.26.tgz" + sha256 "ca5a8041225287dfecb83d4dda385e2a0e6539b9544fb8af3b6ffde5d8779993" + license "MPL-2.0" + + livecheck do + url "https://registry.npmjs.org/artillery/latest" + regex(%r{["'][^"' ]*?/artillery[._-]v?(\d+(?:[.-]\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "f2074443fca8be08e2348aec667a5cb4940f1a250a696fc1593ec626de373bbf" + sha256 arm64_sequoia: "162ed91c8e41ef5249e6a8e53a9572f3e14aa565fc155745bae9680109b35a29" + sha256 arm64_sonoma: "26b358eef47e3bf5f1369428fb1a5e9c1514e36cb7e17267138ca9e5864070b0" + sha256 sonoma: "0fee749e63a4972e299d0c42aca8dc31f4e49fbd52054c80a90a21aaffab131b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f91181e8ee35c15ce8cf99015937e006d538b02a59133c4f4b726f67443e1a8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56e97b9cdeff224eeb42b67d0ac8d2ee155e4d81850eea7cd41f5fabbfe6bf23" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"artillery", "dino", "-m", "let's run some tests!" + + (testpath/"config.yml").write <<~YAML + config: + target: "http://httpbin.org" + phases: + - duration: 10 + arrivalRate: 1 + scenarios: + - flow: + - get: + url: "/headers" + - post: + url: "/response-headers" + YAML + + assert_match "All VUs finished", shell_output("#{bin}/artillery run #{testpath}/config.yml") + end +end diff --git a/Formula/a/arttime.rb b/Formula/a/arttime.rb new file mode 100644 index 0000000000000..14c03e641c109 --- /dev/null +++ b/Formula/a/arttime.rb @@ -0,0 +1,33 @@ +class Arttime < Formula + desc "Clock, timer, time manager and ASCII+ text-art viewer for the terminal" + homepage "https://github.com/poetaman/arttime" + url "https://github.com/poetaman/arttime/archive/refs/tags/v2.4.0.tar.gz" + sha256 "f1418522d36528b38ce604d1a9ec14ddf6284aa6a15d28a7eb5c01a872a6d436" + license "GPL-3.0-only" + head "https://github.com/poetaman/arttime.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0a3e584b805c966e2dbfd88d0c14fd624d5cccc7182ada2a3abdf85ff4bd81d9" + end + + depends_on "fzf" + + on_linux do + depends_on "diffutils" + depends_on "less" + depends_on "libnotify" + depends_on "vorbis-tools" + depends_on "zsh" + end + + def install + ENV["TERM"]="xterm" + system "./install.sh", "--noupdaterc", "--prefix", prefix, "--zcompdir", zsh_completion + end + + test do + # arttime is a GUI application + assert_match version.to_s, shell_output("#{bin}/arttime --version") + end +end diff --git a/Formula/a/arturo.rb b/Formula/a/arturo.rb new file mode 100644 index 0000000000000..6f10491f769f0 --- /dev/null +++ b/Formula/a/arturo.rb @@ -0,0 +1,78 @@ +class Arturo < Formula + desc "Simple, modern and portable programming language for efficient scripting" + homepage "https://arturo-lang.io/" + url "https://github.com/arturo-lang/arturo/archive/refs/tags/v0.9.83.tar.gz" + sha256 "0bb3632f21a1556167fdcb82170c29665350beb44f15b4666b4e22a23c2063cf" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "a3f8a2cb4563008ea24c54345240b6c92553291c12860425cc069903ef4e484a" + sha256 cellar: :any, arm64_sequoia: "8a85e164420eed7be9149784ed3186c27e475ac4249396bf7cab23d0cbb9d612" + sha256 cellar: :any, arm64_sonoma: "a5ec87e6b0b78f8f9c7488ee60fba66fa32b820ad0beb17a2a2ad609cf0db4ef" + sha256 cellar: :any, arm64_ventura: "18491874794e510a5ceab9f85b056dd5338869c63d6590bd8d2e5e5eb451e081" + sha256 cellar: :any, arm64_monterey: "97ada88c358d6b8fee6731bc2fb5a2b6f869ff0d9798b831801aa16096db0e40" + sha256 cellar: :any, sonoma: "080ae8f329e1f5434ff565a2731066510251e94be46b3dbc88ce81d7fa131395" + sha256 cellar: :any, ventura: "bfd55cd5a7c527f3ee97be03d31019f19bcc42e8827eff660a3e0225fc010601" + sha256 cellar: :any, monterey: "a131b4cca2eb06a0077955ad754e0cf2e028b6edcb8d59f671d3863f4d0c9e09" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fda47994e673c1315f52cde8615be23dd6cdf870982562aa2cc7a09ae44c8a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58f4a8c2fa4c22f00887c45852b4fe5326d1df941f484f5884bf5cab6df1c81a" + end + + depends_on "gmp" + depends_on "mpfr" + + # TODO: switch to `depends_on "nim" => :build` in the next release + resource "nim" do + url "https://nim-lang.org/download/nim-1.6.14.tar.xz" + sha256 "d070d2f28ae2400df7fe4a49eceb9f45cd539906b107481856a0af7a8fa82dc9" + end + + # Workaround for newer Clang + # upstream pr ref, https://github.com/arturo-lang/arturo/pull/1635 + patch :DATA + + def install + (buildpath/"nim").install resource("nim") + cd "nim" do + system "./build.sh" + system "./bin/nim", "c", "-d:release", "koch" + system "./koch", "boot", "-d:release", "-d:useLinenoise" + end + ENV.prepend_path "PATH", buildpath/"nim/bin" + + inreplace "build.nims", /ROOT_DIR\s*=\s*r"\{getHomeDir\(\)\}.arturo".fmt/, "ROOT_DIR=\"#{prefix}\"" + + # Work around issues with Xcode 14.3 + # @mhelpers@swebviews.nim.c:1116:2: error: call to undeclared function 'generateDefaultMainMenu'; + # ISO C99 and later do not support implicit function declarations + inreplace "build.nims", "--passC:'-flto'", "--passC:'-flto' --passC:'-Wno-implicit-function-declaration'" + + # Use mini install on Linux to avoid webkit2gtk dependency, which does not have a formula. + args = ["log", "release"] + args << "mini" if OS.linux? + system "./build.nims", "install", *args + end + + test do + (testpath/"hello.art").write <<~EOS + print "hello" + EOS + assert_equal "hello", shell_output("#{bin}/arturo #{testpath}/hello.art").chomp + end +end + +__END__ +diff --git a/build.nims b/build.nims +index 9c3f812..c4ed4c0 100755 +--- a/build.nims ++++ b/build.nims +@@ -104,7 +104,7 @@ var + "--skipUserCfg:on --colors:off -d:danger " & + "--panics:off --mm:orc -d:useMalloc --checks:off " & + "-d:ssl --cincludes:extras --opt:speed --nimcache:.cache --passL:'-pthread' " & +- "--path:src " ++ "--path:src --passC:\"-Wno-error=incompatible-pointer-types\"" + CONFIG ="@full" + + ARGS: seq[string] = @[] diff --git a/Formula/a/arx-libertatis.rb b/Formula/a/arx-libertatis.rb new file mode 100644 index 0000000000000..6c9f0d0865d06 --- /dev/null +++ b/Formula/a/arx-libertatis.rb @@ -0,0 +1,89 @@ +class ArxLibertatis < Formula + desc "Cross-platform, open source port of Arx Fatalis" + homepage "https://arx-libertatis.org/" + url "https://arx-libertatis.org/files/arx-libertatis-1.2.1/arx-libertatis-1.2.1.tar.xz" + sha256 "aafd8831ee2d187d7647ad671a03aabd2df3b7248b0bac0b3ac36ffeb441aedf" + license "GPL-3.0-or-later" + + livecheck do + url "https://arx-libertatis.org/files/" + regex(%r{href=["']?arx-libertatis[._-]v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "53d4828b343a70fd7a3801c3c245a15ca140f3426db4ee57a2968397dc6450e8" + sha256 arm64_sequoia: "e60d7ed4b0a7ff3b132efb97907d8203a0e501f292866d17ab9b2773376b44cd" + sha256 arm64_sonoma: "2c520ea9e3ce0eb1066cd47fd192e73bda08a3e27b39b1efa6b5dcef7614dedf" + sha256 arm64_ventura: "1db7612e1dbbe5d1515b7578a2c20a3b62dd4f65c37257237d10bf7e48723448" + sha256 arm64_monterey: "9fd235faef3f4cac1fa1bc33acace5545839c5bf9a4344793225f734dc0f4b7e" + sha256 arm64_big_sur: "5b7dd893fd8ab89d9265dc031d48781b14437ba175265f89a316a0d60686927e" + sha256 sonoma: "57d56bfaf644da9ad8cfda24e22bef0e474bd46d5ad4d5a3ffd6279b7d5777bf" + sha256 ventura: "2969e73fdbd0e6d7c8a72891440da7ea868bcdb35776fafb425e81f369d4df6d" + sha256 monterey: "d9c218e036852e73dea349e17eaa6e03358f7118bd41acd98a5f4bae7b25bc9d" + sha256 big_sur: "e855dfe524dd05d0ebf94acee4cb2e74f2037d0c4c44eb76fd5f49fbbb8477f8" + sha256 catalina: "a8a9036477373bd0065f739c0bbc8bd6e20b09da4d643f20483ab6aec6a6d289" + sha256 arm64_linux: "a6feb6bee70f09bafb43c03d91727cad508dac8176a2858d8f4ef761121c78f4" + sha256 x86_64_linux: "fcdc6dcedd23cc35e9bf57f97b4aa5946fe36adc3ffc9e15140224f79cc7d14f" + end + + head do + url "https://github.com/arx/ArxLibertatis.git", branch: "master" + + resource "arx-libertatis-data" do + url "https://github.com/arx/ArxLibertatisData.git", branch: "master" + end + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "glm" => :build + depends_on "freetype" + depends_on "glew" + depends_on "innoextract" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + depends_on "openal-soft" + end + + conflicts_with "rnv", because: "both install `arx` binaries" + + def install + args = %w[ + -DBUILD_CRASHREPORTER=OFF + -DSTRICT_USE=ON + -DWITH_OPENGL=glew + -DWITH_SDL=2 + ] + + # Install prebuilt icons to avoid inkscape and imagemagick deps + if build.head? + (buildpath/"arx-libertatis-data").install resource("arx-libertatis-data") + args << "-DDATA_FILES=#{buildpath}/arx-libertatis-data" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + This package only contains the Arx Libertatis binary, not the game data. + To play Arx Fatalis you will need to obtain the game from GOG.com and + install the game data with: + + arx-install-data /path/to/setup_arx_fatalis.exe + EOS + end + + test do + output = shell_output("#{bin}/arx --list-dirs") + assert_match "User directories (select first existing)", output + end +end diff --git a/Formula/a/arxiv_latex_cleaner.rb b/Formula/a/arxiv_latex_cleaner.rb new file mode 100644 index 0000000000000..8cb16fa599600 --- /dev/null +++ b/Formula/a/arxiv_latex_cleaner.rb @@ -0,0 +1,57 @@ +class ArxivLatexCleaner < Formula + include Language::Python::Virtualenv + + desc "Clean LaTeX code to submit to arXiv" + homepage "https://github.com/google-research/arxiv-latex-cleaner" + url "https://files.pythonhosted.org/packages/7b/be/e0afb37ba09060368e3858c8248328faf187d814f9cb9da00e5611d150d0/arxiv_latex_cleaner-1.0.8.tar.gz" + sha256 "e40215f486770a90aaec3d4d5c666a5695ce282b4bf57cdd39c2f4623866e3f4" + license "Apache-2.0" + head "https://github.com/google-research/arxiv-latex-cleaner.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "0aa4f023567c96cb224e27b23bd7d7f46af7560a47160d9d0347ec8aeab665d7" + sha256 cellar: :any, arm64_sequoia: "146b23e2785e71e5661febedb3faa0260b28c4ec16b6eaad2ee53b26918acdf6" + sha256 cellar: :any, arm64_sonoma: "8fbed795e668e2dd08b569908ee9ca4f183b6e730c802ebf541806665696e035" + sha256 cellar: :any, sonoma: "83da74885a44096ffe6ca4341ebe6e39d7622e6a283f8b12f0c7f4d95e34b113" + sha256 cellar: :any_skip_relocation, arm64_linux: "736e54216d418f80b50fc48130b57de5bc0654e2e009b6b5f82d979763de40c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "540beff3135b2c24b7415f8750668aa3f9cd52e19f9bbd5b6148869351a35acc" + end + + depends_on "libyaml" + depends_on "pillow" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "pillow" + + resource "absl-py" do + url "https://files.pythonhosted.org/packages/10/2a/c93173ffa1b39c1d0395b7e842bbdc62e556ca9d8d3b5572926f3e4ca752/absl_py-2.3.1.tar.gz" + sha256 "a97820526f7fbfd2ec1bce83f3f25e3a14840dac0d8e02a0b71cd75db3f77fc9" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + def install + virtualenv_install_with_resources + end + + test do + latexdir = testpath/"latex" + latexdir.mkpath + (latexdir/"test.tex").write <<~TEX + % remove + keep + TEX + system bin/"arxiv_latex_cleaner", latexdir + assert_path_exists testpath/"latex_arXiv" + assert_equal "keep", (testpath/"latex_arXiv/test.tex").read.strip + end +end diff --git a/Formula/a/as-tree.rb b/Formula/a/as-tree.rb new file mode 100644 index 0000000000000..5fa61b87be753 --- /dev/null +++ b/Formula/a/as-tree.rb @@ -0,0 +1,36 @@ +class AsTree < Formula + desc "Print a list of paths as a tree of paths" + homepage "https://github.com/jez/as-tree" + url "https://github.com/jez/as-tree/archive/refs/tags/0.12.0.tar.gz" + sha256 "2af03a2b200041ac5c7a20aa1cea0dcc21fb83ac9fe9a1cd63cb02adab299456" + license "BlueOak-1.0.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "21036f05ea5294ef3b8f2fb17517631a76c8d2c2ed521311322a55ba2320a28e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5059a4f64cd775588b4f57a258964415373c09346d65f121f9e61464bbc6789a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c54dc2d8c4eb0848cf008d1aba865d566d31a711fcba898e06d50553f14e4720" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f1ff59d33ae1147f903973d50d44e945b7d4ef2564d8877be6fc38b9433bafb6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7ffe542490373f69918fbb37ef7e93c94a7d26e87f4be282b491816713b7d049" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4cbe38f0537c86b65808064608c61b8c792098177911f013f24c2470fd2fdf62" + sha256 cellar: :any_skip_relocation, sonoma: "a5a2de8891810abc35ac5c0815003aac603e9467633eaebe161a71e8ccc5dadd" + sha256 cellar: :any_skip_relocation, ventura: "427e9bc1f7f6a92da07ad4284e82ab6b3d24441bac2c0f5b4850c250106622b6" + sha256 cellar: :any_skip_relocation, monterey: "adf2bb6e9bbbcc4d393462ec04b4cf9abe28bc5748f9636b0a9668b56082fb60" + sha256 cellar: :any_skip_relocation, big_sur: "2d13c83015f82b0b39760b9087f417bc1465b4e33cc6a90061235a70e510c896" + sha256 cellar: :any_skip_relocation, catalina: "5c14a2f148f036c39c7187f0da94f9c6ab52f3e9c531c5009ae5e6db68b01cc4" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c877d85a4310115448ce71c13d75b93976ee2bea0b0ef0e890c53a469e8f85d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82337903e0b8ee48cd19517b4d1bd8e0b66d5c17e212a03f6e15d2b12130d85b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal ".\n└── file\n", pipe_output(bin/"as-tree", "file", 0) + end +end diff --git a/Formula/a/asak.rb b/Formula/a/asak.rb new file mode 100644 index 0000000000000..c7871d69209d8 --- /dev/null +++ b/Formula/a/asak.rb @@ -0,0 +1,44 @@ +class Asak < Formula + desc "Cross-platform audio recording/playback CLI tool with TUI" + homepage "https://github.com/chaosprint/asak" + url "https://github.com/chaosprint/asak/archive/refs/tags/v0.3.5.tar.gz" + sha256 "da90a31924a6ac7ed06fa54d5060290535afdfe1a6fc3e69ad1ed5bc82757e92" + license "MIT" + head "https://github.com/chaosprint/asak.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0eacdb4a479c653f777726c669eec0fc89c2a922c13b15bbfd8370c3b24417fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc34ad17c5c94e3a205d72d5cd89d632e9e77478b863c704711d57813174458c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "22662e9e6284f51656b1e9b2ff845d1020891ad01f8ff39085f23f2b94063710" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ecbcbea3ea060f02617de9c3d5a80477e014b2b789c7330bf95e31ce70d5365" + sha256 cellar: :any_skip_relocation, sonoma: "971aa9cc9f4caad9bea64347102ffa2ac2ebc89de06aa6e1b1fc7c486fd21ac4" + sha256 cellar: :any_skip_relocation, ventura: "ac44eeb109efb1b9ce9e787e24e1c9ee917c8a0b889f2dff2576717644f6531f" + sha256 cellar: :any_skip_relocation, arm64_linux: "df0d9919f8e49aea1800986f43644c84e3b0000b04de81ba7e2aeae1072320b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47670f65f8c158c2a27772c5ad9de162b9f11234c5b5bf110a87f3434d14bb78" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "jack" + + on_linux do + depends_on "alsa-lib" + end + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "target/completions/asak.bash" => "asak" + fish_completion.install "target/completions/asak.fish" + zsh_completion.install "target/completions/_asak" => "_asak" + man1.install "target/man/asak.1" + end + + test do + output = shell_output("#{bin}/asak play") + assert_match "No wav files found in current directory", output + + assert_match version.to_s, shell_output("#{bin}/asak --version") + end +end diff --git a/Formula/a/ascii.rb b/Formula/a/ascii.rb new file mode 100644 index 0000000000000..31f63b77b5169 --- /dev/null +++ b/Formula/a/ascii.rb @@ -0,0 +1,47 @@ +class Ascii < Formula + desc "List ASCII idiomatic names and octal/decimal code-point forms" + homepage "http://www.catb.org/~esr/ascii/" + url "http://www.catb.org/~esr/ascii/ascii-3.30.tar.gz" + sha256 "ed2fdc973e1b87da2af83050e560e731b0f3bf5f6b4fd9babc9f60bb2b992443" + license "BSD-2-Clause" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("-", ".") } + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "11cfc4ca9c93744de8e2be5d04df19e4d2210f813580d74da65a819c54600cc4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e225f8d820c8a2a106ecaa694d127747e33367cf2a3ad817c6b5252f61368e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b09302d5da1fde775d54d424f6c0170f37f1da1b2513d51b1f823735852828b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0139a6c8bb456eae23940a7c52c35b41312de889f6ef3f83629772939a745bca" + sha256 cellar: :any_skip_relocation, arm64_monterey: "47ba21ef26f596735cd2c3b7de685190497ad837127b3d1fa5807fc59845243c" + sha256 cellar: :any_skip_relocation, sonoma: "45a69a2b921833d1baf72f0d09b468ab454288be54e06a98cba131341b7dca9f" + sha256 cellar: :any_skip_relocation, ventura: "4b0846635b36a199106674d2afd42d8e7dea53f853787653cd4ecb6db150ac72" + sha256 cellar: :any_skip_relocation, monterey: "22f33f9d9ac7142411fb7d9d7108c630c139a171ab68551adb5338c7bbba265b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c43387bff6017bb5d5f61ef1ed614bbf73172d5c446fba156f7e4b017ffdfed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4be383b6e806721fc89c09ab1e971ad2d5be5922952f8d67141fa765a50d8dc" + end + + head do + url "https://gitlab.com/esr/ascii.git", branch: "master" + depends_on "xmlto" => :build + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" if build.head? + bin.mkpath + man1.mkpath + system "make" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + assert_match "Official name: Line Feed", shell_output("#{bin}/ascii 0x0a") + end +end diff --git a/Formula/a/ascii2binary.rb b/Formula/a/ascii2binary.rb new file mode 100644 index 0000000000000..9dcf5c29bb707 --- /dev/null +++ b/Formula/a/ascii2binary.rb @@ -0,0 +1,52 @@ +class Ascii2binary < Formula + desc "Converting Text to Binary and Back" + homepage "https://billposer.org/Software/a2b.html" + url "https://www.billposer.org/Software/Downloads/ascii2binary-2.14.tar.gz" + sha256 "addc332b2bdc503de573bfc1876290cf976811aae28498a5c9b902a3c06835a9" + license "GPL-3.0-only" + + livecheck do + url :homepage + regex(/href=.*?ascii2binary[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "04f82b33a8a3806b57864a4295dc727744275e1d57494803780ea373cadaff54" + sha256 cellar: :any, arm64_sequoia: "5fa97a3db89565045338e7d0a725a0dfe87995651b8987d271bfb5eeb07e7728" + sha256 cellar: :any, arm64_sonoma: "fa4789ecc58d9510294d6ceb7e88865abecf9b50237def8dde810cea6a9a8477" + sha256 cellar: :any, arm64_ventura: "ab0651840367c796ed21eeceb7b6299338c7b0b42fe2fad395f3494da144470d" + sha256 cellar: :any, arm64_monterey: "f0c93f44f94301da7726208ebff6c51c83b751827518a92c7347c0312bafabcc" + sha256 cellar: :any, arm64_big_sur: "c205cd2ae106cbbd23999f85812a51bbd0c6453caa761be24082cec7c721fc7f" + sha256 cellar: :any, sonoma: "d9430468703535a3bf50d32fdd39b90b140e493d662e002cdf1a11869b5bfdde" + sha256 cellar: :any, ventura: "ea844e5cb1c4dd10ee070ed633f9052cd6762addc0f556ad4433a97ead7f4be5" + sha256 cellar: :any, monterey: "3a8a279dfc5c852ab3fa081cd61eeb49ced7a94f3b3fb5fa0b9b747211cb2b51" + sha256 cellar: :any, big_sur: "8b85d75f6bdcf06c7ab2cd68f6f276532aeed3b258dfa7c370c913a5cf1e4e70" + sha256 cellar: :any, catalina: "7ad654dc498763cb63634191cb9c9c697604faa88fc41d51060df1bb6c0e42ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "dae63772ba06b7609d29d51fa608f8db00d29703b6c42837098b6629a35ac0a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb4b9cc5fe32d49bbb8e0b8acd72396dbbd8fde547777f441b0deab8be17ac57" + end + + on_macos do + depends_on "gettext" + end + + def install + if OS.mac? + gettext = Formula["gettext"] + ENV.append "CFLAGS", "-I#{gettext.include}" + ENV.append "LDFLAGS", "-L#{gettext.lib}" + ENV.append "LDFLAGS", "-lintl" + end + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + binary = pipe_output("#{bin}/ascii2binary -t ui", "42", 0) + ascii = pipe_output("#{bin}/binary2ascii -t ui", binary, 0).strip + assert_equal "42", ascii + end +end diff --git a/Formula/a/asciidoc.rb b/Formula/a/asciidoc.rb new file mode 100644 index 0000000000000..96d525658757d --- /dev/null +++ b/Formula/a/asciidoc.rb @@ -0,0 +1,46 @@ +class Asciidoc < Formula + include Language::Python::Virtualenv + + desc "Formatter/translator for text files to numerous formats" + homepage "https://asciidoc-py.github.io/" + url "https://files.pythonhosted.org/packages/1d/e7/315a82f2d256e9270977aa3c15e8fe281fd7c40b8e2a0b97e0cb61ca8fa0/asciidoc-10.2.1.tar.gz" + sha256 "d9f13c285981b3c7eb660d02ca0a2779981e88d48105de81bb40445e60dddb83" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/asciidoc-py/asciidoc-py.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1bc7364d821058b91231a5ccf9481b508bd85713522c2d2702c51807feecef78" + end + + depends_on "docbook" + depends_on "python@3.14" + depends_on "source-highlight" + + uses_from_macos "libxml2" + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + If you intend to process AsciiDoc files through an XML stage + (such as a2x for manpage generation) you need to add something + like: + + export XML_CATALOG_FILES=#{etc}/xml/catalog + + to your shell rc file so that xmllint can find AsciiDoc's + catalog files. + + See `man 1 xmllint' for more. + EOS + end + + test do + (testpath/"test.txt").write("== Hello World!") + system bin/"asciidoc", "-b", "html5", "-o", testpath/"test.html", testpath/"test.txt" + assert_match %r{

Hello World!

}, File.read(testpath/"test.html") + end +end diff --git a/Formula/a/asciidoctor.rb b/Formula/a/asciidoctor.rb new file mode 100644 index 0000000000000..4c0331555c3a8 --- /dev/null +++ b/Formula/a/asciidoctor.rb @@ -0,0 +1,189 @@ +class Asciidoctor < Formula + desc "Text processor and publishing toolchain for AsciiDoc" + homepage "https://asciidoctor.org/" + url "https://github.com/asciidoctor/asciidoctor/archive/refs/tags/v2.0.26.tar.gz" + sha256 "25c22b934bc0ae2448f2d73d4b2eba0c59e0521cf5e893fb0b0ad54a461bf066" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "83482da376e6cbc52582198a08c0a04cd652f0560df93c5c496bed02053cc818" + end + + # Some gems require >= ruby 2.7 + depends_on "ruby" + + # Dependencies are for the asciidoctor-pdf, coderay, pygments.rb and rouge gems + + resource "polyglot" do + url "https://rubygems.org/gems/polyglot-0.3.5.gem" + sha256 "59d66ef5e3c166431c39cb8b7c1d02af419051352f27912f6a43981b3def16af" + end + + resource "treetop" do + url "https://rubygems.org/gems/treetop-1.6.12.gem" + sha256 "ed48add684a2d7a8fd6e3b8b027d8ee5983b50977ae691913131a24f1746ac29" + end + + resource "concurrent-ruby" do + url "https://rubygems.org/gems/concurrent-ruby-1.2.3.gem" + sha256 "82fdd3f8a0816e28d513e637bb2b90a45d7b982bdf4f3a0511722d2e495801e2" + end + + resource "ttfunk" do + url "https://rubygems.org/gems/ttfunk-1.7.0.gem" + sha256 "2370ba484b1891c70bdcafd3448cfd82a32dd794802d81d720a64c15d3ef2a96" + end + + resource "pdf-core" do + url "https://rubygems.org/gems/pdf-core-0.9.0.gem" + sha256 "4f368b2f12b57ec979872d4bf4bd1a67e8648e0c81ab89801431d2fc89f4e0bb" + end + + resource "prawn" do + url "https://rubygems.org/gems/prawn-2.4.0.gem" + sha256 "82062744f7126c2d77501da253a154271790254dfa8c309b8e52e79bc5de2abd" + end + + resource "prawn-icon" do + url "https://rubygems.org/gems/prawn-icon-3.0.0.gem" + sha256 "dac8d481dee0f60a769c0cab0fd1baec7351b4806bf9ba959cd6c65f6694b6f5" + end + + resource "rexml" do + url "https://rubygems.org/gems/rexml-3.2.6.gem" + sha256 "e0669a2d4e9f109951cb1fde723d8acd285425d81594a2ea929304af50282816" + end + + resource "matrix" do + url "https://rubygems.org/downloads/matrix-0.4.2.gem" + sha256 "71083ccbd67a14a43bfa78d3e4dc0f4b503b9cc18e5b4b1d686dc0f9ef7c4cc0" + end + + resource "public_suffix" do + url "https://rubygems.org/gems/public_suffix-5.0.5.gem" + sha256 "72c340218bb384610536919988705cc29e09749c0021fd7005f715c7e5dfc493" + end + + resource "addressable" do + url "https://rubygems.org/gems/addressable-2.8.6.gem" + sha256 "798f6af3556641a7619bad1dce04cdb6eb44b0216a991b0396ea7339276f2b47" + end + + resource "css_parser" do + url "https://rubygems.org/gems/css_parser-1.17.1.gem" + sha256 "eb730f2d26591a843e52bd3d0efd76abdfeec8bad728e0b2ac821fc10bb018e6" + end + + resource "prawn-svg" do + url "https://rubygems.org/gems/prawn-svg-0.34.2.gem" + sha256 "afff79d332940f6d59604d0b2810f54d46e9335533a2aa4e892fb7d514777a90" + end + + resource "afm" do + url "https://rubygems.org/gems/afm-0.2.2.gem" + sha256 "c83e698e759ab0063331ff84ca39c4673b03318f4ddcbe8e90177dd01e4c721a" + end + + resource "hashery" do + url "https://rubygems.org/gems/hashery-2.1.2.gem" + sha256 "d239cc2310401903f6b79d458c2bbef5bf74c46f3f974ae9c1061fb74a404862" + end + + resource "ruby-rc4" do + url "https://rubygems.org/gems/ruby-rc4-0.1.5.gem" + sha256 "00cc40a39d20b53f5459e7ea006a92cf584e9bc275e2a6f7aa1515510e896c03" + end + + resource "Ascii85" do + url "https://rubygems.org/gems/Ascii85-1.1.1.gem" + sha256 "73d760d093bf997e88c2a4d0bfe4328e838e0799915aee6b3162836c5267c2b0" + end + + resource "pdf-reader" do + url "https://rubygems.org/gems/pdf-reader-2.12.0.gem" + sha256 "61e72a4839cf2b3735a4b08dcb00e23c57a51d199494a5b11bd78e49d7b91758" + end + + resource "prawn-templates" do + url "https://rubygems.org/gems/prawn-templates-0.1.2.gem" + sha256 "117aa03db570147cb86fcd7de4fd896994f702eada1d699848a9529a87cd31f1" + end + + resource "prawn-table" do + url "https://rubygems.org/gems/prawn-table-0.2.2.gem" + sha256 "336d46e39e003f77bf973337a958af6a68300b941c85cb22288872dc2b36addb" + end + + # asciidoctor supports the Python 3 pygments syntax highlighter via pygments.rb ~> 2.0.0 + # Unless pygments.rb is installed in the asciidoctor libexec gems folder, asciidoctor will + # not be able to find the gem. Installing the pygment.rb gem as part of the main asciidoctor + # formula ensures it's available if users choose to install and enable the Pygments syntax + # highlighter. + resource "pygments.rb" do + url "https://rubygems.org/gems/pygments.rb-3.0.0.gem" + sha256 "41729ecc69624bd3fc6bcc13d6ccb6ff0263334c42f66bfcf517a120addbb093" + end + + resource "asciidoctor-pdf" do + url "https://rubygems.org/gems/asciidoctor-pdf-2.3.15.gem" + sha256 "432effdefdcd6433a797b702422b5f6fd4120c495c5f75ae059159aa75aa9a94" + end + + resource "coderay" do + url "https://rubygems.org/gems/coderay-1.1.3.gem" + sha256 "dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b" + end + + resource "rouge" do + url "https://rubygems.org/gems/rouge-4.2.1.gem" + sha256 "f371732db127913fe10f13b1c25500b927539167a746dc8ee8089ad868bba1fd" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + system "gem", "build", "asciidoctor.gemspec" + system "gem", "install", "asciidoctor-#{version}.gem" + bin.install Dir[libexec/"bin/asciidoctor"] + bin.install Dir[libexec/"bin/asciidoctor-pdf"] + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + man1.install_symlink "#{libexec}/gems/asciidoctor-#{version}/man/asciidoctor.1" => "asciidoctor.1" + end + + test do + %w[rouge coderay].each do |highlighter| + (testpath/"test.adoc").atomic_write <<~EOS + = AsciiDoc is Writing Zen + Random J. Author + :icons: font + :source-highlighter: #{highlighter} + + Hello, World! + + == Syntax Highlighting + + Python source. + + [source, python] + ---- + import something + ---- + + List + + - one + - two + - three + EOS + output = Utils.popen_read bin/"asciidoctor", "-b", "html5", "-o", "test.html", "test.adoc", err: :out + refute_match(/optional gem '#{highlighter}' is not available/, output) + assert_match "

AsciiDoc is Writing Zen

", File.read("test.html") + assert_match(/
/i, File.read("test.html"))
+      system bin/"asciidoctor", "-r", "asciidoctor-pdf", "-b", "pdf", "-o", "test.pdf", "test.adoc"
+      assert_match "/Title (AsciiDoc is Writing Zen)", File.read("test.pdf", mode: "rb")
+    end
+  end
+end
diff --git a/Formula/a/asciidoctorj.rb b/Formula/a/asciidoctorj.rb
new file mode 100644
index 0000000000000..52eb871c40bd0
--- /dev/null
+++ b/Formula/a/asciidoctorj.rb
@@ -0,0 +1,53 @@
+class Asciidoctorj < Formula
+  desc "Java wrapper and bindings for Asciidoctor"
+  homepage "https://github.com/asciidoctor/asciidoctorj"
+  url "https://search.maven.org/remotecontent?filepath=org/asciidoctor/asciidoctorj/3.0.0/asciidoctorj-3.0.0-bin.zip"
+  sha256 "6d6fed763aa441746f57e98aeaa302678b62c8420ffced00e2cfd979a9377c17"
+  license "Apache-2.0"
+
+  livecheck do
+    url "https://search.maven.org/remotecontent?filepath=org/asciidoctor/asciidoctorj/maven-metadata.xml"
+    regex(%r{v?(\d+(?:\.\d+)+)}i)
+  end
+
+  bottle do
+    sha256 cellar: :any_skip_relocation, all: "e6545330f49cad533a5caedbc9fa651fc7d2c5dff6ce42310de2563331ee160c"
+  end
+
+  depends_on "openjdk"
+
+  def install
+    rm_r(Dir["bin/*.bat"]) # Remove Windows files.
+    libexec.install Dir["*"]
+    (bin/"asciidoctorj").write_env_script libexec/"bin/asciidoctorj", JAVA_HOME: Formula["openjdk"].opt_prefix
+  end
+
+  test do
+    (testpath/"test.adoc").write <<~EOS
+      = AsciiDoc is Writing Zen
+      Random J. Author 
+      :icons: font
+
+      Hello, World!
+
+      == Syntax Highlighting
+
+      Python source.
+
+      [source, python]
+      ----
+      import something
+      ----
+
+      List
+
+      - one
+      - two
+      - three
+    EOS
+    system bin/"asciidoctorj", "-b", "html5", "-o", "test.html", "test.adoc"
+    assert_match "

AsciiDoc is Writing Zen

", File.read("test.html") + system bin/"asciidoctorj", "-r", "asciidoctor-pdf", "-b", "pdf", "-o", "test.pdf", "test.adoc" + assert_match "/Title (AsciiDoc is Writing Zen)", File.read("test.pdf", mode: "rb") + end +end diff --git a/Formula/a/asciinema.rb b/Formula/a/asciinema.rb new file mode 100644 index 0000000000000..0294611049fac --- /dev/null +++ b/Formula/a/asciinema.rb @@ -0,0 +1,40 @@ +class Asciinema < Formula + desc "Record and share terminal sessions" + homepage "https://asciinema.org" + url "https://github.com/asciinema/asciinema/archive/refs/tags/v3.0.1.tar.gz" + sha256 "612ecb265ccb316f07c9825bacd7301fd21f03a72b516edd370b0d3aa1adf2bb" + license "GPL-3.0-only" + head "https://github.com/asciinema/asciinema.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9411ff190cabfa8ca9a85555362dd5311a3da03061aba49bd42e86dac6cd5222" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77f52a807a21b826e63ec4eeec391d0d1acbe9ac0d2041e70d71868b1d1900c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a1e2fd482ea5c1437fd0b087bfa931b1e165be9a4932e313eed3964d0f928c7" + sha256 cellar: :any_skip_relocation, sonoma: "e5ce98155a854b9c7d3d95f156f66a8eed5eb2868c4020283da8e023ad81e7f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "37ea2aec4888cd4a0e05e1ef398dc6d805dace1b88567663b4ad290cdf046f1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72947fa454d14cb38785b507462c56724a4c97ca218d5ebafdb3825c52321912" + end + + depends_on "rust" => :build + + def install + ENV["ASCIINEMA_GEN_DIR"] = "." + + system "cargo", "install", *std_cargo_args + + man1.install Dir["man/**/*.1"] + + bash_completion.install "completion/asciinema.bash" => "asciinema" + fish_completion.install "completion/asciinema.fish" + zsh_completion.install "completion/_asciinema" + pwsh_completion.install "completion/_asciinema.ps1" => "asciinema" + (share/"elvish/lib").install "completion/asciinema.elv" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["ASCIINEMA_SERVER_URL"] = "https://example.com" + output = shell_output("#{bin}/asciinema auth 2>&1") + assert_match "Open the following URL in a web browser to authenticate this CLI", output + end +end diff --git a/Formula/a/asciiquarium.rb b/Formula/a/asciiquarium.rb new file mode 100644 index 0000000000000..ff1ca5bb32f91 --- /dev/null +++ b/Formula/a/asciiquarium.rb @@ -0,0 +1,84 @@ +class Asciiquarium < Formula + desc "Aquarium animation in ASCII art" + homepage "https://robobunny.com/projects/asciiquarium/html/" + url "https://robobunny.com/projects/asciiquarium/asciiquarium_1.1.tar.gz" + sha256 "1b08c6613525e75e87546f4e8984ab3b33f1e922080268c749f1777d56c9d361" + license "GPL-2.0-or-later" + revision 5 + + livecheck do + url "https://robobunny.com/projects/asciiquarium/" + regex(/href=.*?asciiquarium[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c8d27e98633a1e5c8824aee48999c9d5ba0fa06da02b268772fcf8e7b6a9e492" + sha256 cellar: :any, arm64_sequoia: "080079f96aa210857f68ea0e376ce057dca85875e94df0a2da695559d37d08e9" + sha256 cellar: :any, arm64_sonoma: "059912db660f5e55c48c425c6c227f9122d02055e13bdaf1633ce39e0a4f575e" + sha256 cellar: :any, arm64_ventura: "6f9aa92e662714c05c5abebf715071a583eafdc0f639a1d0230a66043d28d088" + sha256 cellar: :any, arm64_monterey: "025b86916160e616180c3c84e58dbe678dafc777704d66ce9d7a2ba07df5241e" + sha256 cellar: :any, sonoma: "821f581063ff102904f53455f6f7c412e060a0da3be1563dae89fe592b613986" + sha256 cellar: :any, ventura: "d1774d0ec6069c399b4a40e49e7f98f7df94fa51b3f6ddd3a402e14c96c34f2b" + sha256 cellar: :any, monterey: "0e107b8988ca4b01b6a7df53abb9fd894447836f3bca8af95528c5a26ca1da76" + sha256 cellar: :any_skip_relocation, arm64_linux: "1038d221610a6828fff3e680fa8a32142b5a731c6b19ee5a4ff87f8c86317c45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c07d0ae91d74691fa184d850d1444412042d9302d52ef44c37f14ab6f00cb433" + end + + depends_on "ncurses" + depends_on "perl" + + resource "Curses" do + url "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.45.tar.gz" + sha256 "84221e0013a2d64a0bae6a32bb44b1ae5734d2cb0465fb89af3e3abd6e05aeb2" + end + + resource "Term::Animation" do + url "https://cpan.metacpan.org/authors/id/K/KB/KBAUCOM/Term-Animation-2.6.tar.gz" + sha256 "7d5c3c2d4f9b657a8b1dce7f5e2cbbe02ada2e97c72f3a0304bf3c99d084b045" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + chmod 0755, "asciiquarium" + bin.install "asciiquarium" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # This is difficult to test because: + # - There are no command line switches that make the process exit + # - The output is a constant stream of terminal control codes + # - Testing only if the binary exists can still result in failure + + # The test process is as follows: + # - Spawn the process capturing stdout and the pid + # - Kill the process after there is some output + # - Ensure the start of the output matches what is expected + + require "pty" + ENV["TERM"] = "xterm" + PTY.spawn(bin/"asciiquarium") do |stdout, stdin, _pid| + sleep 5 + stdin.write "q" + output = begin + stdout.gets + rescue Errno::EIO + nil + end + assert_match "\e[?10", output[0..4] + end + end +end diff --git a/Formula/a/asciitex.rb b/Formula/a/asciitex.rb new file mode 100644 index 0000000000000..cdb99ad8cd0f8 --- /dev/null +++ b/Formula/a/asciitex.rb @@ -0,0 +1,40 @@ +class Asciitex < Formula + desc "Generate ASCII-art representations of mathematical equations" + homepage "https://asciitex.sourceforge.net/" + url "https://downloads.sourceforge.net/project/asciitex/asciiTeX-0.21.tar.gz" + sha256 "abf964818833d8b256815eb107fb0de391d808fe131040fb13005988ff92a48d" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5b71c04bd0a92fe7d693aff5674b9464532b0a6160b918832dcf299354b2adc5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d70918544a7191e90ce55d8b2cc02b5602ef6210dc6f0269e9667bdc0fce8a26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "001ef3790d111bdafbaf5ab24d20a2c62c09fe3278a05d8115ec382c91b86a89" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f12101117b2b9663ac74cfed4d14daa32fbbbc0fbeba1463063c6a151cdb0040" + sha256 cellar: :any_skip_relocation, arm64_monterey: "99da7eb7e14ae19b86cbb881e662fbc6a67cd26c7aadd4cb038add368f9eeb3b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2b9cae6e65df9390c4a9a9ab55813fe05e291ca928364350d333f0389042b8d1" + sha256 cellar: :any_skip_relocation, sonoma: "8db42f4ab42823b6d60176e7ef225cc2d714e6a49c8ac280938300ab78180164" + sha256 cellar: :any_skip_relocation, ventura: "72fc542175fc6f213602a22893bdbcb784db02431dc17aba29a2509cc04fbb87" + sha256 cellar: :any_skip_relocation, monterey: "5e539d41ca86bb5f239671fec71d66969ffa81380fae782677f7a656f4588cb6" + sha256 cellar: :any_skip_relocation, big_sur: "5d62737e9f19a499f84fb442ebc5d8738c96f44a4aeea9104a71b304a9777e6f" + sha256 cellar: :any_skip_relocation, catalina: "4899775d92a5f26e4b8530823593e5819b8578c44a4537c949ee4e0f6f3d5614" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c58b7bfb137b8905ee389497448200beeaf56f9636938f926aaf7497b9dced9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "630265b0202b14fd9459b9f772f8f2c1518ddf1b5a5baf6f086f693c8054b470" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `SYNTAX_ERR_FLAG'; array.o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--prefix=#{prefix}", "--disable-gtk" + inreplace "Makefile", "man/asciiTeX_gui.1", "" + system "make", "install" + pkgshare.install "EXAMPLES" + end + + test do + system bin/"asciiTeX", "-f", "#{pkgshare}/EXAMPLES" + end +end diff --git a/Formula/a/asdf.rb b/Formula/a/asdf.rb new file mode 100644 index 0000000000000..72bb190cf6c7a --- /dev/null +++ b/Formula/a/asdf.rb @@ -0,0 +1,42 @@ +class Asdf < Formula + desc "Extendable version manager with support for Ruby, Node.js, Erlang & more" + homepage "https://asdf-vm.com/" + url "https://github.com/asdf-vm/asdf/archive/refs/tags/v0.18.0.tar.gz" + sha256 "c452a886503277260b7c82c07031800340f892bb2147bb3af67dca7268a410b5" + license "MIT" + head "https://github.com/asdf-vm/asdf.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b22b8e329c938b0b7c464de089c396e48c8712c8ea34df5130dc6f1652883616" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae721d20a3a3f9402d2bad6201a001379adcc3300c01a4548fbb5067daeee338" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae721d20a3a3f9402d2bad6201a001379adcc3300c01a4548fbb5067daeee338" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae721d20a3a3f9402d2bad6201a001379adcc3300c01a4548fbb5067daeee338" + sha256 cellar: :any_skip_relocation, sonoma: "6bc472f55318b4b9810673f11731f42338e6ebf466cd4098426e0d72b483dd6a" + sha256 cellar: :any_skip_relocation, ventura: "6bc472f55318b4b9810673f11731f42338e6ebf466cd4098426e0d72b483dd6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "884f05b0a2dd2c2e377fb8f9c0ccd7070d1f499175fac67544d99f4df5e75e19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f6863a8bc60de461a3228c19198f8c927bac21c4e17618a8c28d22ccfa7675a" + end + + depends_on "go" => :build + depends_on "git" + + def install + # fix https://github.com/asdf-vm/asdf/issues/1992 + # relates to https://github.com/Homebrew/homebrew-core/issues/163826 + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/asdf" + generate_completions_from_executable(bin/"asdf", "completion") + libexec.install Dir["asdf.*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/asdf version") + assert_match "No plugins installed", shell_output("#{bin}/asdf plugin list 2>&1") + end +end diff --git a/Formula/a/asimov.rb b/Formula/a/asimov.rb new file mode 100644 index 0000000000000..8a39dca07de1d --- /dev/null +++ b/Formula/a/asimov.rb @@ -0,0 +1,32 @@ +class Asimov < Formula + desc "Automatically exclude development dependencies from Time Machine backups" + homepage "https://github.com/stevegrunwell/asimov" + url "https://github.com/stevegrunwell/asimov/archive/refs/tags/v0.3.0.tar.gz" + sha256 "77a0ef09c86d9d6ff146547902c749c43bc054f331a12ecb9992db9673469fab" + license "MIT" + head "https://github.com/stevegrunwell/asimov.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "acc00f632c9cf38cca02e619759b0239e00a3b3d1120b5b8f55066a1eb134322" + end + + def install + bin.install buildpath/"asimov" + end + + # Asimov will run in the background on a daily basis + service do + run opt_bin/"asimov" + run_type :interval + require_root true + interval 86400 # 24 hours = 60 * 60 * 24 + end + + test do + assert_match "Finding dependency directories with corresponding definition files…", + shell_output(bin/"asimov") + end +end diff --git a/Formula/a/asio.rb b/Formula/a/asio.rb new file mode 100644 index 0000000000000..534a23b448e50 --- /dev/null +++ b/Formula/a/asio.rb @@ -0,0 +1,63 @@ +class Asio < Formula + desc "Cross-platform C++ Library for asynchronous programming" + homepage "https://think-async.com/Asio/" + url "https://downloads.sourceforge.net/project/asio/asio/1.36.0%20%28Stable%29/asio-1.36.0.tar.bz2" + sha256 "7bf4dbe3c1ccd9cc4c94e6e6be026dcc2110f9201d286bb9500dc85d69825524" + license "BSL-1.0" + + livecheck do + url :stable + regex(%r{url=.*?Stable.*?/asio[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c270edee8c7f97079ae4f4cf2c6ea3f072a02e3966354fa233a72df2dff6834b" + sha256 cellar: :any, arm64_sequoia: "701828b9474caf60d19e538ae4988a86d9df9a09ce95c9cf0e2de1cc8a6cbda6" + sha256 cellar: :any, arm64_sonoma: "acbee89e1effe0135dd01fec0bc94243cffbe5c2f5c7d5b0f7340428d9516dde" + sha256 cellar: :any, arm64_ventura: "f6758226362135efb7485211bfe170ee4c3788c46a1275dca59c477ae8c6051c" + sha256 cellar: :any, sonoma: "6a4f0422454474b28955a8d9bb203d703bdbb7c857096dc32bd6c191fb8a0ba5" + sha256 cellar: :any, ventura: "0e1a5a2d7537a2ef0cd946cb75edcf3e72e615f78bc610f77987b0bacaad3231" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d1cda2230726d6339c1233ea2a126525d9044aacac103fb6da0fd195698a68b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b3a5307039ebc24abeba8e99bf96fdff91577b4d2a413715c3e83ff755c4ed4" + end + + head do + url "https://github.com/chriskohlhoff/asio.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "openssl@3" + + def install + ENV.cxx11 + + if build.head? + cd "asio" + system "./autogen.sh" + end + + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-boost=no", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}" + system "make", "install" + pkgshare.install "src/examples" + end + + test do + found = Dir[pkgshare/"examples/cpp{11,03}/http/server/http_server"] + raise "no http_server example file found" if found.empty? + + port = free_port + pid = fork do + exec found.first, "127.0.0.1", port.to_s, "." + end + sleep 5 + begin + assert_match "404 Not Found", shell_output("curl http://127.0.0.1:#{port}") + ensure + Process.kill 9, pid + end + end +end diff --git a/Formula/a/asitop.rb b/Formula/a/asitop.rb new file mode 100644 index 0000000000000..dc82f1f97078e --- /dev/null +++ b/Formula/a/asitop.rb @@ -0,0 +1,52 @@ +class Asitop < Formula + include Language::Python::Virtualenv + + desc "Perf monitoring CLI tool for Apple Silicon" + homepage "https://tlkh.github.io/asitop/" + url "https://files.pythonhosted.org/packages/93/bc/8755d818efc33dd758322086a23f08bee5e1f7769c339a8be5c142adbbbc/asitop-0.0.24.tar.gz" + sha256 "5df7b59304572a948f71cf94b87adc613869a8a87a933595b1b3e26bf42c3e37" + license "MIT" + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de255de46d14df3c89b457ed3e18d402a63a6a24b47da228084646a20e6b9db0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a40878e9b51a199368c3647e227773c8a8fa2413f64167630cb05e92fe3b4bb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "73ede524bcc50e849a3568afe14f6a2469e5a439f79dd284b21cc0a4b1f41ab5" + end + + depends_on arch: :arm64 + depends_on :macos + depends_on "python@3.14" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/7c/51/a72df7730aa34a94bc43cebecb7b63ffa42f019868637dbeb45e0620d26e/blessed-1.22.0.tar.gz" + sha256 "1818efb7c10015478286f21a412fcdd31a3d8b94a18f6d926e733827da7a844b" + end + + resource "dashing" do + url "https://files.pythonhosted.org/packages/bd/01/1c966934ab5ebe5a8fa3012c5de32bfa86916dba0428bdc6cdfe9489f768/dashing-0.1.0.tar.gz" + sha256 "2514608e0f29a775dbd1b1111561219ce83d53cfa4baa2fe4101fab84fd56f1b" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + bin.env_script_all_files(libexec, PYTHONDONTWRITEBYTECODE: "1") + end + + test do + output = shell_output("#{bin}/asitop 2>&1", 1) + # needs sudo permission to run + assert_match "You are recommended to run ASITOP with `sudo asitop`", output + assert_match "Performance monitoring CLI tool", shell_output("#{bin}/asitop --help") + end +end diff --git a/Formula/a/ask-cli.rb b/Formula/a/ask-cli.rb new file mode 100644 index 0000000000000..a3e6138269475 --- /dev/null +++ b/Formula/a/ask-cli.rb @@ -0,0 +1,32 @@ +class AskCli < Formula + desc "CLI tool for Alexa Skill Kit" + homepage "https://github.com/alexa/ask-cli" + url "https://registry.npmjs.org/ask-cli/-/ask-cli-2.30.7.tgz" + sha256 "437b55f774064e053b0185956afc69ecb38a8b53c996a6e1e49960918b54f909" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6ec89ac010d0a2464553452e947e5ce7944a71a658e470a756118e9d3565282e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a883f88d9896627c807417adb1d23d9884dbbd65f7fbc1060b80315fc1093150" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26fa2cfd5a670de545967dc8aecf123ac3e0e71b9f92735a82dd81e8e2219458" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0fee36de070aab95a6baf2f7e6a8310a5d109e543f5edeeebca4a8fb75eff82e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2a726d74c5e74806f900274563d143f998b4d9222ab310ac43ed0345e39d2b07" + sha256 cellar: :any_skip_relocation, sonoma: "50dcfa2070028a255e11a25a05a264a9fc5daa156cb9517914fd3a560e116ace" + sha256 cellar: :any_skip_relocation, ventura: "eed5bf23802e3c9e24250a75088dfd170936908b1630c4ca6528ec08de93bcde" + sha256 cellar: :any_skip_relocation, monterey: "08fefe63b075593ac0cb4c75d42f6c2ab48bb62d9c630b4b59eefbe69de6d955" + sha256 cellar: :any_skip_relocation, arm64_linux: "5075ee29be0cae332a709af27e7ac67c1040dba2bdd1e9b99af77ab595155ba1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a076d74bb089649513e80702d85a273a67c3f453ad1ef4ca962f55f175d83c81" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.write_exec_script libexec/"bin/ask" + end + + test do + output = shell_output("#{bin}/ask deploy 2>&1", 1) + assert_match "File #{testpath}/.ask/cli_config not exists.", output + end +end diff --git a/Formula/a/asm-lsp.rb b/Formula/a/asm-lsp.rb new file mode 100644 index 0000000000000..ecb57516b53c7 --- /dev/null +++ b/Formula/a/asm-lsp.rb @@ -0,0 +1,42 @@ +class AsmLsp < Formula + desc "Language server for NASM/GAS/GO Assembly" + homepage "https://github.com/bergercookie/asm-lsp" + url "https://github.com/bergercookie/asm-lsp/archive/refs/tags/v0.10.1.tar.gz" + sha256 "9500dd7234966ae9fa57d8759edf1d165acd06c4924d7dbeddb7d52eb0ce59d6" + license "BSD-2-Clause" + head "https://github.com/bergercookie/asm-lsp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9dbd0fa7b74cb1681084b66a3734930224775007d96d00d31bf14a24ba018941" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1438e57e7d525aad8e337a2b8048956ffab380f8c6ca0f67a57ed6f9d9148ebd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8466388eb30846c764f3b866085c171dbdeaa5b35f2db7358daafe42e3b8a6f3" + sha256 cellar: :any_skip_relocation, sonoma: "847db26465932b751aadf74a7d26ccf155ea0788c5120d3440747e69059b38e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "4044b50207f4e70ad533d93f322202a80f52b4a55bd046de5b3f9b039d539d10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76259656f79fee2add9b11db2439511d8eef903f3bb3419d889262fa486b2892" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "asm-lsp") + end + + test do + assert_match version.to_s, shell_output("#{bin}/asm-lsp version") + + expected = if OS.mac? + "Global config directories" + else + "Global config directory" + end + assert_match expected, shell_output("#{bin}/asm-lsp info") + + output = shell_output("#{bin}/asm-lsp gen-config 2>&1", 101) + assert_match "not a terminal", output + end +end diff --git a/Formula/a/asm6809.rb b/Formula/a/asm6809.rb new file mode 100644 index 0000000000000..764c1f6687fbc --- /dev/null +++ b/Formula/a/asm6809.rb @@ -0,0 +1,57 @@ +class Asm6809 < Formula + desc "Cross assembler targeting the Motorola 6809 and Hitachi 6309" + homepage "https://www.6809.org.uk/asm6809/" + url "https://www.6809.org.uk/asm6809/dl/asm6809-2.17.tar.gz" + sha256 "a6d36dd29cb3b26505c46595c1f0f1c4d7e66d3838f6347ce33ce27f4b35cffa" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?asm6809[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fc791edd9764748c796e4f6a90e3705326600445cdf4a2eeb3fc6fd61552b920" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7de504e84b26b8234defb68bf94da035a54d7c4ac541aaf4b467089c27bd8b85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "995fe91f8964623a28d85e866b283f3d530638c2315dba2ca8e5a709a3be0889" + sha256 cellar: :any_skip_relocation, arm64_ventura: "045d5d4372030b74a9f65153a0a985d83f1dcf74d0b6ac16c067d0ccf4d29de4" + sha256 cellar: :any_skip_relocation, sonoma: "c60151ade6cc3f159517932d60880ea5635ada30a038647001c0e3c3763a1267" + sha256 cellar: :any_skip_relocation, ventura: "60f7bbebe4678620b524fea6071a467ce5a708504e25ce932819b06eb7356bdc" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba890d3aebaaf8b4463b7dccf849c30fdc7be4028ac80f683421f4eca00fc3d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cffd8646a3965426d5c82a4a4b846714003e0e0fc297a879f55cc5d7e8ee2dc3" + end + + head do + url "https://www.6809.org.uk/git/asm6809.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + input = testpath/"a.asm" + + input.write <<~ASM + ; Instructions must be preceded by whitespace + org $c000 + lda $42 + end $c000 + ASM + + output = testpath/"a.bin" + + system bin/"asm6809", input, "-o", output + binary = output.binread.unpack("C*") + assert_equal [0xb6, 0x00, 0x42], binary + end +end diff --git a/Formula/a/asmfmt.rb b/Formula/a/asmfmt.rb new file mode 100644 index 0000000000000..bc2667c686e1d --- /dev/null +++ b/Formula/a/asmfmt.rb @@ -0,0 +1,35 @@ +class Asmfmt < Formula + desc "Go Assembler Formatter" + homepage "https://github.com/klauspost/asmfmt" + url "https://github.com/klauspost/asmfmt/archive/refs/tags/v1.3.2.tar.gz" + sha256 "4bb6931aefcf105c0e0bc6d239845f6350aceba5b2b76e84c961ba8d100f8fc6" + license "MIT" + head "https://github.com/klauspost/asmfmt.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9bde3ea9f89546ebccfec0cd65ee0afa6b9a11656285d71c21fdbf37bbec50f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c6bd7b97cd140278a84fc6f839c13b5ec3f6baced91eb0cba54601959f87d5e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6204249317abd8ab8e64945e5f2604d4c81f1945a1bfecf6afc8cffe08df5bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d6204249317abd8ab8e64945e5f2604d4c81f1945a1bfecf6afc8cffe08df5bb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d6204249317abd8ab8e64945e5f2604d4c81f1945a1bfecf6afc8cffe08df5bb" + sha256 cellar: :any_skip_relocation, sonoma: "4b08dbe6fc5d733483491891fc9e12fded3a10210f58b401e6b89a0f78105b67" + sha256 cellar: :any_skip_relocation, ventura: "4b08dbe6fc5d733483491891fc9e12fded3a10210f58b401e6b89a0f78105b67" + sha256 cellar: :any_skip_relocation, monterey: "4b08dbe6fc5d733483491891fc9e12fded3a10210f58b401e6b89a0f78105b67" + sha256 cellar: :any_skip_relocation, arm64_linux: "70ff5db6eb55382884b589fcd59e631d46266e97e7ebc2ee3890a4686dbdaef8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b813ba80300f7211d6fde13f39ad1faa0e0b41002a5691a42ed2dcf40b58318b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/asmfmt" + end + + test do + input = " TEXT ·subVV(SB), NOSPLIT, $0\n// func subVV(z, x, y []Word) (c Word)" + expected = "TEXT ·subVV(SB), NOSPLIT, $0\n\t// func subVV(z, x, y []Word) (c Word)\n" + assert_equal expected, pipe_output(bin/"asmfmt", input, 0) + end +end diff --git a/Formula/a/asn.rb b/Formula/a/asn.rb new file mode 100644 index 0000000000000..3409b0ff05692 --- /dev/null +++ b/Formula/a/asn.rb @@ -0,0 +1,38 @@ +class Asn < Formula + desc "Organization lookup and server tool (ASN / IPv4 / IPv6 / Prefix / AS Path)" + homepage "https://github.com/nitefood/asn" + url "https://github.com/nitefood/asn/archive/refs/tags/v0.80.0.tar.gz" + sha256 "73b28d4a1f53e0bda4b72e543b41800d8af1bce7df959350b54f5b073a6e3434" + license "MIT" + head "https://github.com/nitefood/asn.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fcf15b34feaab955f5d34ccdfa9bfa0946aeeffb7bd699fee3e94beb53145cbf" + end + + depends_on "aha" + depends_on "bash" + depends_on "coreutils" + depends_on "grepcidr" + depends_on "ipcalc" + depends_on "jq" + depends_on "mtr" + depends_on "nmap" + + uses_from_macos "curl" + uses_from_macos "whois" + + on_linux do + depends_on "bind" # for `host` + end + + def install + bin.install "asn" + end + + test do + test_ip = "8.8.8.8" + output = shell_output("#{bin}/asn #{test_ip} 2>&1") + assert_match "ASN lookup for #{test_ip}", output + end +end diff --git a/Formula/a/asn1c.rb b/Formula/a/asn1c.rb new file mode 100644 index 0000000000000..8e6e7dbff908a --- /dev/null +++ b/Formula/a/asn1c.rb @@ -0,0 +1,66 @@ +class Asn1c < Formula + desc "Compile ASN.1 specifications into C source code" + homepage "https://lionet.info/asn1c/blog" + url "https://github.com/vlm/asn1c/releases/download/v0.9.28/asn1c-0.9.28.tar.gz" + sha256 "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "101f876e913d345e99ac08ef2e9144b578e3979491f8338a62cf3c0e0d346144" + sha256 arm64_sequoia: "92cbad00b77b014b9fc957b1fe1c3ceafe01c367355dbbce6b92321aa5dcacda" + sha256 arm64_sonoma: "81853752cb0f9b91cf9fa95ec52a83ae7a59c21f4aac0f09b213f45bff3f303e" + sha256 arm64_ventura: "3d72779b69c5ad5f2bf006ca514ad77d6cadf7512f5f8e21e7f7ca07399ff799" + sha256 arm64_monterey: "d4a15a7420fc9ccf67b43823f117ff4ba4ecd8db6686ad2ed2748a3375d00c9b" + sha256 arm64_big_sur: "25ad95ded32395974dee8fdf8d0e5f7e2dc7cebd38ff0082a13cd3e52677f329" + sha256 sonoma: "72e535073c4021897bcf9a79d2032a6375d59c60fd95d512d5b2f50b4f0d93b3" + sha256 ventura: "40bcecf237baa2b3f51a6211ef981a515269e5aa243e862b3852d0cda417c662" + sha256 monterey: "a3999e6443202ae87c2c44823efb4ce4939838124f870cccbf19d8be61a01974" + sha256 big_sur: "d3db341a38f139efbea8f9d2f70912af6e80d4f9cd0b472f2f6202bcd31431b3" + sha256 catalina: "a7688d139182258a7377b3a30cf57ef3ff95c184940bcb171d0968c2c152f65f" + sha256 arm64_linux: "1cf47d0986b911c566f919454694f2abc20927425eb4b002d1761c2e9c8d714a" + sha256 x86_64_linux: "fe7fa5f68ab94a7d748a2af7451d496192c7bc543bd9dc9c660673cb8026bda4" + end + + head do + url "https://github.com/vlm/asn1c.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.asn1").write <<~EOS + MyModule DEFINITIONS ::= + BEGIN + + MyTypes ::= SEQUENCE { + myObjectId OBJECT IDENTIFIER, + mySeqOf SEQUENCE OF MyInt, + myBitString BIT STRING { + muxToken(0), + modemToken(1) + } + } + + MyInt ::= INTEGER (0..65535) + + END + EOS + + system bin/"asn1c", "test.asn1" + end +end diff --git a/Formula/a/asnmap.rb b/Formula/a/asnmap.rb new file mode 100644 index 0000000000000..35c532a96ba9b --- /dev/null +++ b/Formula/a/asnmap.rb @@ -0,0 +1,37 @@ +class Asnmap < Formula + desc "Quickly map organization network ranges using ASN information" + homepage "https://github.com/projectdiscovery/asnmap" + url "https://github.com/projectdiscovery/asnmap/archive/refs/tags/v1.1.1.tar.gz" + sha256 "3d48657278a1f1fa27528e66d5cf4bcb6f3ee7ce26a518fcaf6ce9a9c9a8e317" + license "MIT" + head "https://github.com/projectdiscovery/asnmap.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d30ae986746962385b61472a49d0d9d5ded178c4ab0fd02d45146d9d9514b83" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2f106b6ccfbce290cf32265b1198f1056b9622cd2fcbdb7e6fe146098bb98da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "676a3e1e9acbcf36042c305254cba864a8f122f206761a689667347c17c9c4a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7694fa2c90ce2daff499a549faa0af0997e9cc89550d12f3a457ae13cd06cee7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "044d56aeee6424bf5f72c668a53b72a6357259d6a9d4a384dc18fb1b61ba759b" + sha256 cellar: :any_skip_relocation, sonoma: "f859f48ef91d69fe448c33284462f5802177d73619e39dfcc4894ad359212273" + sha256 cellar: :any_skip_relocation, ventura: "5b3c2c268b3a78ba6aa1459dda4798c7ecba402acacc5a1ab64d9b0d0e7e6736" + sha256 cellar: :any_skip_relocation, monterey: "01cff6b7dea711d6716674b008cc915b7d86c40134e8378e2d964f3421d6ee3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "9028f3436f84bf3c7b7310c7cb0f7c1230601805db6b6a6152dd72fd4af5818f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cc586b3ac93d7c6d675338f46ec034d1c0d20e3f46306bbd56c7f964b8f0fec" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/asnmap" + end + + test do + assert_match version.to_s, shell_output("#{bin}/asnmap -version 2>&1") + + # Skip linux CI test as test not working there + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # need API key for IP lookup test, thus just run empty binary test + assert_match "no input defined", shell_output("#{bin}/asnmap 2>&1", 1) + end +end diff --git a/Formula/a/aspcud.rb b/Formula/a/aspcud.rb new file mode 100644 index 0000000000000..7838f3cd258ba --- /dev/null +++ b/Formula/a/aspcud.rb @@ -0,0 +1,52 @@ +class Aspcud < Formula + desc "Package dependency solver" + homepage "https://potassco.org/aspcud/" + url "https://github.com/potassco/aspcud/archive/refs/tags/v1.9.6.tar.gz" + sha256 "4dddfd4a74e4324887a1ddd7f8ff36231774fc1aa78b383256546e83acdf516c" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "38a5c5010a8e9f38e95233d7b20dcdb75b76c33e1cb3f80410dc01b277ddc17e" + sha256 arm64_sequoia: "429008eb29edff4d08e840bd0eb373ea061c357d01ebab4e416f9d4681b95b0a" + sha256 arm64_sonoma: "f9754209fbab844fa1dc333dd669715fb973838a82f87c44580f9198a56b94ea" + sha256 arm64_ventura: "559e837a693b869dd122da250d57f222501b1f352bf57258eb4305530f8d30a0" + sha256 arm64_monterey: "99122c4ae30f0760d00103191fb33b4fd793ac65e45f662a64d1386e0775d85f" + sha256 arm64_big_sur: "59e462b9a05482e92ccee1a483642515afe98cf8180d22ec414b16282513cb6d" + sha256 sonoma: "edc44ff90fbf5353a53ddc431d73054561379ebb1d512fbb3779a1ba6a92ac2b" + sha256 ventura: "89f0c16b2804c20cda2b800f9504753b2151ab6b2418d77e55eee1b35a3cb652" + sha256 monterey: "8920dad4979d2ae3542553312c906d917ad1cbfe9f9059f4ee6bd726408489df" + sha256 big_sur: "8b458c28102da4cbc936a8ee349f4ce95764c801a70e0031dd2007b94e93d1ef" + sha256 catalina: "ae23d915a2acf5de9083c065c41df839558ac272725ef76e8ac269498b5cabe0" + sha256 arm64_linux: "eda6f25c685bc5b196faf5a997403db0ed730f2cf4e7f680ca316861ac979bce" + sha256 x86_64_linux: "38882525e9e80e2f8436800e20415bd7f584130f264fdacf484c4c11a2ee0076" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "re2c" => :build + depends_on "clingo" + + def install + args = %W[ + -DASPCUD_GRINGO_PATH=#{Formula["clingo"].opt_bin}/gringo + -DASPCUD_CLASP_PATH=#{Formula["clingo"].opt_bin}/clasp + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"in.cudf").write <<~EOS + package: foo + version: 1 + + request: foo >= 1 + EOS + system bin/"aspcud", "in.cudf", "out.cudf" + end +end diff --git a/Formula/a/aspectj.rb b/Formula/a/aspectj.rb new file mode 100644 index 0000000000000..4387b1ce3f1d4 --- /dev/null +++ b/Formula/a/aspectj.rb @@ -0,0 +1,64 @@ +class Aspectj < Formula + desc "Aspect-oriented programming for Java" + homepage "https://eclipse.dev/aspectj/" + url "https://github.com/eclipse-aspectj/aspectj/releases/download/V1_9_25/aspectj-1.9.25.jar" + sha256 "0190878539658cdaa654b422f56cf294183c2e5570ecd16cfc3aa2ddd5226fed" + license "EPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+)$/i) + strategy :github_latest do |json, regex| + match = json["tag_name"]&.match(regex) + next if match.blank? + + match[1].tr("_", ".") + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7c1fd9555e4ca8396b8a5770363bb8bc48b18c1d846fa790b9ce0c6fea5561d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "886591ea57644b9d9ef1f1b7712878e11eca18cf86745ece3c5b73a41649d63d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d2ddf5ffe417f503602d12f07c8af6aaf813243c4082958188a03692d93a5b2" + sha256 cellar: :any_skip_relocation, sonoma: "fb25223230d39ca2bef3bb0b84ee209236abe38d5180a5e194564cb9dd2afb7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bbfd48bf13bc58c0f623ad703f8ef8f517a9d2b6e30c095d252c2ab2170a335" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18df22d9d90b37312e0c3af0692dd4559f725c9a71442eebf420a5d69815eee7" + end + + depends_on "openjdk" + + def install + mkdir_p "#{libexec}/#{name}" + system "#{Formula["openjdk"].bin}/java", "-jar", "#{name}-#{version}.jar", "-to", "#{libexec}/#{name}" + bin.install Dir["#{libexec}/#{name}/bin/*"] + bin.env_script_all_files libexec/"#{name}/bin", Language::Java.overridable_java_home_env + chmod 0555, Dir["#{libexec}/#{name}/bin/*"] # avoid 0777 + end + + test do + (testpath/"Test.java").write <<~JAVA + public class Test { + public static void main (String[] args) { + System.out.println("Brew Test"); + } + } + JAVA + (testpath/"TestAspect.aj").write <<~JAVA + public aspect TestAspect { + private pointcut mainMethod () : + execution(public static void main(String[])); + + before () : mainMethod() { + System.out.print("Aspect "); + } + } + JAVA + ENV["CLASSPATH"] = "#{libexec}/#{name}/lib/aspectjrt.jar:test.jar:testaspect.jar" + system bin/"ajc", "-outjar", "test.jar", "Test.java" + system bin/"ajc", "-outjar", "testaspect.jar", "-outxml", "TestAspect.aj" + output = shell_output("#{bin}/aj Test") + assert_match "Aspect Brew Test", output + end +end diff --git a/Formula/a/aspell.rb b/Formula/a/aspell.rb new file mode 100644 index 0000000000000..b6f7681fa7e0e --- /dev/null +++ b/Formula/a/aspell.rb @@ -0,0 +1,607 @@ +class Aspell < Formula + desc "Spell checker with better logic than ispell" + homepage "http://aspell.net/" + url "https://ftpmirror.gnu.org/gnu/aspell/aspell-0.60.8.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/aspell/aspell-0.60.8.1.tar.gz" + sha256 "d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b" + license "LGPL-2.1-only" + revision 1 + + bottle do + sha256 arm64_tahoe: "383f92d2e0a58c88f3d8022f0bbf068d8111fd754fc320d389a866c4b9bc5ca2" + sha256 arm64_sequoia: "2dead356b82d0553b5a4efe4ed8a061649c8e2d04fbc7f96293cfc2956813de7" + sha256 arm64_sonoma: "8d5594cd0235f14ef183062e5e1ff997470f0c5cf9a522cd488997f206df28ae" + sha256 arm64_ventura: "c36b4d14b5b78a2b61a21878bec4a060376fc72a2bdd975c0a32c0f88fc0865b" + sha256 arm64_monterey: "bfc9df1c3eef5bf05029c819592d6073437707fa60e3523ea4a98fd2929fc8ee" + sha256 sonoma: "960e34fc76f8dfeeb3115236cfdaea24b2339791070411a5ea19e38d6e60f5de" + sha256 ventura: "0a07e16a5486cae75a1c146e0a5001709e77172385c0887234d1119eb691bb94" + sha256 monterey: "6ceca17185c9b563d91f81c8665fd2a31ddf37248fce447ded97c9ac9e82f7b9" + sha256 arm64_linux: "22099f2f381de2e95ea9ec72370f29fd0da0baad59bb18664513f25081da78a5" + sha256 x86_64_linux: "d0a434bcc48c8bebdf070e31e07a14cd7ae3bc3988abb0b111baeb809e5be448" + end + + uses_from_macos "ncurses" + + resource "af" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/af/aspell-af-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/af/aspell-af-0.50-0.tar.bz2" + sha256 "9d6000aeca5911343278bd6ed9e21d42c8cb26247dafe94a76ff81d8ac98e602" + end + + resource "am" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/am/aspell6-am-0.03-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/am/aspell6-am-0.03-1.tar.bz2" + sha256 "bf27dd21f8871e2b3332c211b402cd46604d431a7773e599729c242cdfb9d487" + end + + resource "ar" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ar/aspell6-ar-1.2-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ar/aspell6-ar-1.2-0.tar.bz2" + sha256 "041ea24a82cdd6957040e2fb84262583bf46b3a8301283a75d257a7417207cab" + end + + resource "ast" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ast/aspell6-ast-0.01.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ast/aspell6-ast-0.01.tar.bz2" + sha256 "43f23ed01c338c37f9bbb820db757b36ede1cea47a7b93dc8b6d7bd66b410f92" + end + + resource "az" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/az/aspell6-az-0.02-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/az/aspell6-az-0.02-0.tar.bz2" + sha256 "063176ec459d61acd59450ae49b5076e42abb1dcd54c1f934bae5fa6658044c3" + end + + resource "be" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/be/aspell5-be-0.01.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/be/aspell5-be-0.01.tar.bz2" + sha256 "550bad0c03a142241ffe5ecc183659d80020b566003a05341cd1e97c6ed274eb" + end + + resource "bg" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/bg/aspell6-bg-4.1-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/bg/aspell6-bg-4.1-0.tar.bz2" + sha256 "74570005dc2be5a244436fa2b46a5f612be84c6843f881f0cb1e4c775f658aaa" + end + + resource "bn" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/bn/aspell6-bn-0.01.1-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/bn/aspell6-bn-0.01.1-1.tar.bz2" + sha256 "b03f9cc4feb00df9bfd697b032f4f4ae838ad5a6bb41db798eefc5639a1480d9" + end + + resource "br" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/br/aspell-br-0.50-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/br/aspell-br-0.50-2.tar.bz2" + sha256 "c2122a6dcca653c082d785f0da4bf267363182a017fea4129e8b0882aa6d2a3b" + end + + resource "ca" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ca/aspell6-ca-2.1.5-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ca/aspell6-ca-2.1.5-1.tar.bz2" + sha256 "ebdae47edf87357a4df137dd754737e6417452540cb1ed34b545ccfd66f165b9" + end + + resource "cs" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/cs/aspell6-cs-20040614-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/cs/aspell6-cs-20040614-1.tar.bz2" + sha256 "01c091f907c2fa4dfa38305c2494bb80009407dfb76ead586ad724ae21913066" + end + + resource "csb" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/csb/aspell6-csb-0.02-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/csb/aspell6-csb-0.02-0.tar.bz2" + sha256 "c166ad07d50e9e13ac9f87d5a8938b3f675a0f8a01017bd8969c2053e7f52298" + end + + resource "cy" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/cy/aspell-cy-0.50-3.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/cy/aspell-cy-0.50-3.tar.bz2" + sha256 "d5399dcd70061e5ed5af1214eb580f62864dd35ea4fa1ec2882ffc4f03307897" + end + + resource "da" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/da/aspell6-da-1.6.36-11-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/da/aspell6-da-1.6.36-11-0.tar.bz2" + sha256 "dbc6cbceaa7a4528f3756f0b5cce5c3d0615c2103d3899b47e9df2ed9582e2f7" + end + + resource "de" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/de/aspell6-de-20161207-7-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/de/aspell6-de-20161207-7-0.tar.bz2" + sha256 "c2125d1fafb1d4effbe6c88d4e9127db59da9ed92639c7cbaeae1b7337655571" + end + + resource "de_alt" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/de-alt/aspell6-de-alt-2.1-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/de-alt/aspell6-de-alt-2.1-1.tar.bz2" + sha256 "36d13c6c743a6b1ff05fb1af79134e118e5a94db06ba40c076636f9d04158c73" + end + + resource "el" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/el/aspell6-el-0.08-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/el/aspell6-el-0.08-0.tar.bz2" + sha256 "4af60f1a8adf8b1899680deefdf49288d7406a2c591658f880628bf7c1604cd2" + end + + resource "en" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/en/aspell6-en-2020.12.07-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-2020.12.07-0.tar.bz2" + sha256 "4c8f734a28a088b88bb6481fcf972d0b2c3dc8da944f7673283ce487eac49fb3" + end + + resource "eo" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/eo/aspell6-eo-2.1.20000225a-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/eo/aspell6-eo-2.1.20000225a-2.tar.bz2" + sha256 "41d2d18d6a4de6422185a31ecfc1a3de2e751f3dfb2cbec8f275b11857056e27" + end + + resource "es" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/es/aspell6-es-1.11-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/es/aspell6-es-1.11-2.tar.bz2" + sha256 "ad367fa1e7069c72eb7ae37e4d39c30a44d32a6aa73cedccbd0d06a69018afcc" + end + + resource "et" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/et/aspell6-et-0.1.21-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/et/aspell6-et-0.1.21-1.tar.bz2" + sha256 "b1e857aa3daaea2a19462b2671e87c26a7eb7337c83b709685394eed8472b249" + end + + resource "fa" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/fa/aspell6-fa-0.11-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/fa/aspell6-fa-0.11-0.tar.bz2" + sha256 "482d26ea879a8ea02d9373952205f67e07c85a7550841b13b5079bb2f9f2e15b" + end + + resource "fi" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/fi/aspell6-fi-0.7-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/fi/aspell6-fi-0.7-0.tar.bz2" + sha256 "f8d7f07b4511e606eb56392ddaa76fd29918006331795e5942ad11b510d0a51d" + end + + resource "fo" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/fo/aspell5-fo-0.2.16-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/fo/aspell5-fo-0.2.16-1.tar.bz2" + sha256 "f7e0ddc039bb4f5c142d39dab72d9dfcb951f5e46779f6e3cf1d084a69f95e08" + end + + resource "fr" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/fr/aspell-fr-0.50-3.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/fr/aspell-fr-0.50-3.tar.bz2" + sha256 "f9421047519d2af9a7a466e4336f6e6ea55206b356cd33c8bd18cb626bf2ce91" + end + + resource "fy" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/fy/aspell6-fy-0.12-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/fy/aspell6-fy-0.12-0.tar.bz2" + sha256 "3447cfa90e459af32183a6bc8af9ba3ed571087811cdfc336821454bac8995aa" + end + + resource "ga" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ga/aspell5-ga-4.5-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ga/aspell5-ga-4.5-0.tar.bz2" + sha256 "455fdbbca24cecb4667fbcf9544d84ae83e5b2505caae79afa6b2cb76b4d0679" + end + + resource "gd" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/gd/aspell5-gd-0.1.1-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/gd/aspell5-gd-0.1.1-1.tar.bz2" + sha256 "e316a08a75da8a0d4d15eb892023073a971e0a326382a5532db29856768e0929" + end + + resource "gl" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/gl/aspell6-gl-0.5a-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/gl/aspell6-gl-0.5a-2.tar.bz2" + sha256 "b3cdcf65971e70b8c09fb7f319164c6344a80d260b6e98dc6ecca1e02b7cfc8a" + end + + resource "grc" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/grc/aspell6-grc-0.02-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/grc/aspell6-grc-0.02-0.tar.bz2" + sha256 "2214883e2b9883f360b090948afd2cb0687bc6bba4e1e98011fb8c8d4a42b9ff" + end + + resource "gu" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/gu/aspell6-gu-0.03-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/gu/aspell6-gu-0.03-0.tar.bz2" + sha256 "432c125acc6a86456061dcd47018df4318a117be9f7c09a590979243ad448311" + end + + resource "gv" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/gv/aspell-gv-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/gv/aspell-gv-0.50-0.tar.bz2" + sha256 "bbe626feb5c81c1b7e7d3199d558bc5c560b2d4aef377d0e4b4227ae3c7176e6" + end + + resource "he" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/he/aspell6-he-1.0-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/he/aspell6-he-1.0-0.tar.bz2" + sha256 "d64dabac9f40ca9e632a8eee40fc01c7d18a2c699d8f9742000fadd2e15b708d" + end + + resource "hi" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hi/aspell6-hi-0.02-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hi/aspell6-hi-0.02-0.tar.bz2" + sha256 "da0778c46716f4209da25195294139c2f5e6031253381afa4f81908fc9193a37" + end + + resource "hil" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hil/aspell5-hil-0.11-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hil/aspell5-hil-0.11-0.tar.bz2" + sha256 "570a374fd0b97943bc6893cf25ac7b23da815120842a80144e2c7ee8b41388e8" + end + + resource "hr" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hr/aspell-hr-0.51-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hr/aspell-hr-0.51-0.tar.bz2" + sha256 "2ac4030354d7961e45d63b46e06e59248d59cc70dfc9e1d8ee0ae21d9c774a25" + end + + resource "hsb" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hsb/aspell6-hsb-0.02-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hsb/aspell6-hsb-0.02-0.tar.bz2" + sha256 "8d9f2ae428c7754a922ce6a7ef23401bc65f6f1909aec5077975077b3edc222e" + end + + resource "hu" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hu/aspell6-hu-0.99.4.2-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hu/aspell6-hu-0.99.4.2-0.tar.bz2" + sha256 "3335a7b45cf9774bccf03740fbddeb7ec4752dd87178fa93f92d4c71e3f236b5" + end + + resource "hus" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hus/aspell6-hus-0.03-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hus/aspell6-hus-0.03-1.tar.bz2" + sha256 "6d28f371d1a172439395d56d2d5ce8f27c617de03f847f02643dfd79dd8df425" + end + + resource "hy" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/hy/aspell6-hy-0.10.0-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/hy/aspell6-hy-0.10.0-0.tar.bz2" + sha256 "2dea8d0093a3b8373cc97703dca2979b285f71916181d1a20db70bea28c2bcf0" + end + + resource "ia" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ia/aspell-ia-0.50-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ia/aspell-ia-0.50-1.tar.bz2" + sha256 "5797cb59606d007cf8fe5b9ec435de0d63b2d0e0d391ed8850ef8aa3f4bb0c2f" + end + + resource "id" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/id/aspell5-id-1.2-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/id/aspell5-id-1.2-0.tar.bz2" + sha256 "523912082848d891746dbb233f2ddb2cdbab6750dc76c38b3f6e000c9eb37308" + end + + resource "it" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/it/aspell6-it-2.2_20050523-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/it/aspell6-it-2.2_20050523-0.tar.bz2" + sha256 "3b19dc709924783c8d87111aa9653dc6c000e845183778abee750215d83aaebd" + end + + resource "kn" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/kn/aspell6-kn-0.01-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/kn/aspell6-kn-0.01-1.tar.bz2" + sha256 "cb010b34a712f853fa53c4618cb801704b9f76c72db9390009ba914e3a075383" + end + + resource "ku" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ku/aspell5-ku-0.20-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ku/aspell5-ku-0.20-1.tar.bz2" + sha256 "968f76418c991dc004a1cc3d8cd07b58fb210b6ad506106857ed2d97274a6a27" + end + + resource "ky" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ky/aspell6-ky-0.01-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ky/aspell6-ky-0.01-0.tar.bz2" + sha256 "e10f2f25b44b71e30fa1ea9c248c04543c688845a734d0b9bdc65a2bbd16fb4f" + end + + resource "la" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/la/aspell6-la-20020503-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/la/aspell6-la-20020503-0.tar.bz2" + sha256 "d486b048d1c3056d3a555744584a81873a63ecd4641f04e8b7bf9910b98d2985" + end + + resource "lt" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/lt/aspell6-lt-1.2.1-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/lt/aspell6-lt-1.2.1-0.tar.bz2" + sha256 "f6f53b6e418c22f63e1a70b8bc77bc66912bc1afd40cf98dc026d110d26452ab" + end + + resource "lv" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/lv/aspell6-lv-0.5.5-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/lv/aspell6-lv-0.5.5-1.tar.bz2" + sha256 "3c30e206ea562b2e759fb7467680e1a01d5deec5edbd66653c83184550d1fb8a" + end + + resource "mg" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/mg/aspell5-mg-0.03-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/mg/aspell5-mg-0.03-0.tar.bz2" + sha256 "5182f832e1630ceef5711a83b530fb583ffe04f28cc042d195b5c6b2d25cb041" + end + + resource "mi" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/mi/aspell-mi-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/mi/aspell-mi-0.50-0.tar.bz2" + sha256 "beee1e33baf6301e3ffc56558c84c3e7d29622541b232c1aea1e91d12ebd7d89" + end + + resource "mk" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/mk/aspell-mk-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/mk/aspell-mk-0.50-0.tar.bz2" + sha256 "15fc2380fb673d2003d8075d8cef2b0dbb4d30b430587ad459257681904d9971" + end + + resource "ml" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ml/aspell6-ml-0.03-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ml/aspell6-ml-0.03-1.tar.bz2" + sha256 "e4cd551e558b6d26e4db58e051eeca3d893fc2c4e7fce90a022af247422096fd" + end + + resource "mn" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/mn/aspell6-mn-0.06-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/mn/aspell6-mn-0.06-2.tar.bz2" + sha256 "2f1b6edd48b82cd9b99b9262d5635f72271c062ef4e772b90388dfc48a4f1294" + end + + resource "mr" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2" + sha256 "d3a35a40bee0234a5b388375485ab8bf0ba8edbf3b0a82e2c2f76a40a8586f33" + end + + resource "ms" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ms/aspell-ms-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ms/aspell-ms-0.50-0.tar.bz2" + sha256 "3cc4e3537bb0f455ce58b4d2fa84b03dc678e0153536a41dee1a3a7623dc246f" + end + + resource "mt" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/mt/aspell-mt-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/mt/aspell-mt-0.50-0.tar.bz2" + sha256 "e00fcaad60a90cfed687ba02f62be8c27b8650457dd3c5bdcb064b476da059b4" + end + + resource "nds" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/nds/aspell6-nds-0.01-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/nds/aspell6-nds-0.01-0.tar.bz2" + sha256 "ce381e869def56e54a31f965df518deca0e6f12238859650fcb115623f8772da" + end + + resource "nl" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/nl/aspell-nl-0.50-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/nl/aspell-nl-0.50-2.tar.bz2" + sha256 "440e0b7df8c5903d728221fe4ba88a74658ce14c8bb04b290c41402dfd41cb39" + end + + resource "nn" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/nn/aspell-nn-0.50.1-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/nn/aspell-nn-0.50.1-1.tar.bz2" + sha256 "ac6610540c7e134f09cbebbd148f9316bef27bc491e377638ef4e2950b2d5370" + end + + resource "ny" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ny/aspell5-ny-0.01-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ny/aspell5-ny-0.01-0.tar.bz2" + sha256 "176f970f6ba3bb448c7e946fa8d209eb4da7138ac6899af7731a98c7b6484b3e" + end + + resource "or" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/or/aspell6-or-0.03-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/or/aspell6-or-0.03-1.tar.bz2" + sha256 "d6ffa369f8918d74cdea966112bc5cb700e09dca5ac6b968660cfc22044ef24f" + end + + resource "pa" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/pa/aspell6-pa-0.01-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/pa/aspell6-pa-0.01-1.tar.bz2" + sha256 "c7f3abb1c5efe62e072ca8bef44b0d0506501bbb7b48ced1d0d95f10e61fc945" + end + + resource "pl" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/pl/aspell6-pl-6.0_20061121-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/pl/aspell6-pl-6.0_20061121-0.tar.bz2" + sha256 "017741fcb70a885d718c534160c9de06b03cc72f352879bd106be165e024574d" + end + + resource "pt_BR" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/pt_BR/aspell6-pt_BR-20131030-12-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/pt_BR/aspell6-pt_BR-20131030-12-0.tar.bz2" + sha256 "eb0d99db0b5d5c442133a88bddfe96dd252c0c3df3da36e9326c241dc4bc14f7" + end + + resource "pt_PT" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/pt_PT/aspell6-pt_PT-20190329-1-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/pt_PT/aspell6-pt_PT-20190329-1-0.tar.bz2" + sha256 "e5708b890c2afff51276a6cc276af5e6b3b8a026db75eda48b58124f2368a051" + end + + resource "qu" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/qu/aspell6-qu-0.02-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/qu/aspell6-qu-0.02-0.tar.bz2" + sha256 "80977629b8425bda7ffd951628d23a6793a457f4948151c71ff9e0bff5073f01" + end + + resource "ro" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ro/aspell5-ro-3.3-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ro/aspell5-ro-3.3-2.tar.bz2" + sha256 "53c38b7668a540cf90ddca11c007ce812d2ad86bd11c2c43a08da9e06392683d" + end + + resource "ru" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ru/aspell6-ru-0.99f7-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ru/aspell6-ru-0.99f7-1.tar.bz2" + sha256 "5c29b6ccce57bc3f7c4fb0510d330446b9c769e59c92bdfede27333808b6e646" + end + + resource "rw" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/rw/aspell-rw-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/rw/aspell-rw-0.50-0.tar.bz2" + sha256 "3406102e0e33344b6eae73dbfaf86d8e411b7c97775827a6db79c943ce43f081" + end + + resource "sc" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/sc/aspell5-sc-1.0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/sc/aspell5-sc-1.0.tar.bz2" + sha256 "591ae22f712b472182b41b8bc97dce1e5ecd240c75eccc25f59ab15c60be8742" + end + + resource "sk" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/sk/aspell6-sk-2.01-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/sk/aspell6-sk-2.01-2.tar.bz2" + sha256 "c6a80a2989c305518e0d71af1196b7484fda26fe53be4e49eec7b15b76a860a6" + end + + resource "sl" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/sl/aspell-sl-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/sl/aspell-sl-0.50-0.tar.bz2" + sha256 "e566d127f7130da2df7b1f4f4cb4bc51932517b0c24299f84498ba325e6133d1" + end + + resource "sr" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/sr/aspell6-sr-0.02.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/sr/aspell6-sr-0.02.tar.bz2" + sha256 "705e58fb390633c89c4cb224a1cfb34e67e09496448f7adc6500494b6e009289" + end + + resource "sv" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/sv/aspell-sv-0.51-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/sv/aspell-sv-0.51-0.tar.bz2" + sha256 "9b70573c9c8cf76f5cdb6abcdfb834a754bbaa1efd7d6f57f47b8a91a19c5c0a" + end + + resource "sw" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/sw/aspell-sw-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/sw/aspell-sw-0.50-0.tar.bz2" + sha256 "7ed51f107dc57a7b3555f20d1cee2903275d63e022b055ea6b6409d9e081f297" + end + + resource "ta" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/ta/aspell6-ta-20040424-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/ta/aspell6-ta-20040424-1.tar.bz2" + sha256 "52f552f1a2c0fc53ed4eac75990ff75bccf3d5f1440ca3d948d96eafe5f3486a" + end + + resource "te" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/te/aspell6-te-0.01-2.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/te/aspell6-te-0.01-2.tar.bz2" + sha256 "3682638a757a65afcc770e565e68347e8eb7be94052d9d6eff64fc767e7fec5d" + end + + resource "tet" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/tet/aspell5-tet-0.1.1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/tet/aspell5-tet-0.1.1.tar.bz2" + sha256 "9dd546c9c48f42085e3c17f22c8e6d46e56f3ea9c4618b933c642a091df1c09e" + end + + resource "tk" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/tk/aspell5-tk-0.01-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/tk/aspell5-tk-0.01-0.tar.bz2" + sha256 "86f24209cab61a54ed85ad3020915d8ce1dec13fbfe012f1bf1d648825696a0b" + end + + resource "tl" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/tl/aspell5-tl-0.02-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/tl/aspell5-tl-0.02-1.tar.bz2" + sha256 "48b65d2c6886f353d1e1756a93bcd4d8ab2b88b021176c25dfdb5d8bcf348acd" + end + + resource "tn" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/tn/aspell5-tn-1.0.1-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/tn/aspell5-tn-1.0.1-0.tar.bz2" + sha256 "41a0c20e1d2acaa28a647d74b40778e491815566019f79e7049621f40d3bbd60" + end + + resource "tr" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/tr/aspell-tr-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/tr/aspell-tr-0.50-0.tar.bz2" + sha256 "0bc6530e5eebf8b2b53f1e8add596c62099173f62b9baa6b3efaa86752bdfb4a" + end + + resource "uk" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/uk/aspell6-uk-1.4.0-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/uk/aspell6-uk-1.4.0-0.tar.bz2" + sha256 "35f9a7e840c1272706bc6dd172bc9625cbd843d021094da8598a6abba525f18c" + end + + resource "uz" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/uz/aspell6-uz-0.6-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/uz/aspell6-uz-0.6-0.tar.bz2" + sha256 "2281c1fc7fe2411f02d25887c8a68eaa2965df3cd25f5ff06d31787a3de5e369" + end + + resource "vi" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/vi/aspell6-vi-0.01.1-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/vi/aspell6-vi-0.01.1-1.tar.bz2" + sha256 "3cd85d53bb62b0d104cb5c03e142c3bbe1ad64329d7beae057854816dc7e7c17" + end + + resource "wa" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/wa/aspell-wa-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/wa/aspell-wa-0.50-0.tar.bz2" + sha256 "5a17aa8aa37afbcc8f52336476670b93cba16462bcb89dd46b80f4d9cfe73fe4" + end + + resource "yi" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/yi/aspell6-yi-0.01.1-1.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/yi/aspell6-yi-0.01.1-1.tar.bz2" + sha256 "9879d35a5b0b86f8e217601568480f2f634bc8b7a97341e9e80b0d40a8202856" + end + + resource "zu" do + url "https://ftpmirror.gnu.org/gnu/aspell/dict/zu/aspell-zu-0.50-0.tar.bz2" + mirror "https://ftp.gnu.org/gnu/aspell/dict/zu/aspell-zu-0.50-0.tar.bz2" + sha256 "3fa255cd0b20e6229a53df972fd3c5ed8481db11cfd0347dd3da629bbb7a6796" + end + + # Backport fix for newer Apple Clang and GCC 15 + patch do + url "https://github.com/GNUAspell/aspell/commit/ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041.patch?full_index=1" + sha256 "96e6b23947744e5d1374640a38cf20ec541b64c00a063cbed6d1fcc3e3fc19ee" + end + + # const problems with llvm: https://www.freebsd.org/cgi/query-pr.cgi?pr=180565&cat= + patch :DATA + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + + ENV.prepend_path "PATH", bin + + resources.each do |r| + r.stage do + system "./configure", "--vars", "ASPELL=#{bin}/aspell", "PREZIP=#{bin}/prezip" + system "make", "install" + end + end + end + + test do + assert_equal "worrd", pipe_output("#{bin}/aspell list -d en_US", "misspell worrd", 0).strip + end +end + +__END__ +diff --git a/interfaces/cc/aspell.h b/interfaces/cc/aspell.h +index 9c8e81b..2cd00d4 100644 +--- a/interfaces/cc/aspell.h ++++ b/interfaces/cc/aspell.h +@@ -237,6 +237,7 @@ void delete_aspell_can_have_error(struct AspellCanHaveError * ths); + /******************************** errors ********************************/ + + ++#ifndef __cplusplus + extern const struct AspellErrorInfo * const aerror_other; + extern const struct AspellErrorInfo * const aerror_operation_not_supported; + extern const struct AspellErrorInfo * const aerror_cant_copy; +@@ -322,6 +323,7 @@ extern const struct AspellErrorInfo * const aerror_missing_magic; + extern const struct AspellErrorInfo * const aerror_bad_magic; + extern const struct AspellErrorInfo * const aerror_expression; + extern const struct AspellErrorInfo * const aerror_invalid_expression; ++#endif + + + /******************************* speller *******************************/ diff --git a/Formula/a/asroute.rb b/Formula/a/asroute.rb new file mode 100644 index 0000000000000..589c63fa9debc --- /dev/null +++ b/Formula/a/asroute.rb @@ -0,0 +1,38 @@ +class Asroute < Formula + desc "CLI to interpret traceroute -a output to show AS names traversed" + homepage "https://github.com/stevenpack/asroute" + url "https://github.com/stevenpack/asroute/archive/refs/tags/v0.1.0.tar.gz" + sha256 "dfbf910966cdfacf18ba200b83791628ebd1b5fa89fdfa69b989e0cb05b3ca37" + license "MIT" + head "https://github.com/stevenpack/asroute.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c6742a4381bdb0de6f208dfcaba3e95ca02ffa9c7ff2263ed492ac082af55d24" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46518f15ede2b92592176216ba3fbb3aa9bc582b20208ea475a8028745b621fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f928e074222b7b6f239cc6f6b8af05196287c48b2d252560d4b6a0f1e267c813" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd44c35000aae6f727e7014d50e6955d740d1dea628f127f7ab163566cef9ea9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5987e2552c04a0ebb4e10a3dbd990a756312e763d0f8dd5181094ad23597e34b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "163a9abd216264008582b7be4230fd4b25499c98df63428cc6712688e7864a26" + sha256 cellar: :any_skip_relocation, sonoma: "02dbd3f936395cec14d177103c5d3d810421859e3a25d903ab83955034fe97f6" + sha256 cellar: :any_skip_relocation, ventura: "71c97603b26dc9288ebb1dfa8bcbac7f24b3ce7e3f05e6ad896da27420cf23c2" + sha256 cellar: :any_skip_relocation, monterey: "1c25bfabb04bf68c00afa5b1cfe58dde4da17f666aaf4342f43db0a887e4c254" + sha256 cellar: :any_skip_relocation, big_sur: "96074d1e87efc94a13cca8a1afb4b2ae5ba6379c30bb5fd0ec4d635c9f97f84a" + sha256 cellar: :any_skip_relocation, catalina: "c3129df660d27e0bb0ac8ff5252c8d973402e613f2345e12a8621ed3a2f69809" + sha256 cellar: :any_skip_relocation, arm64_linux: "4dcb080985610f556b9a60a133f1f22176456cd94bbb898acd08461c1f6cbab9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d188308819d803382363c7a89e9aa531721a65c05fdba1092b4e08791caa4254" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + bin.install "target/release/asroute" + end + + test do + system "echo '[AS13335]' | asroute" + end +end diff --git a/Formula/a/assh.rb b/Formula/a/assh.rb new file mode 100644 index 0000000000000..1eed90cbc331b --- /dev/null +++ b/Formula/a/assh.rb @@ -0,0 +1,42 @@ +class Assh < Formula + desc "Advanced SSH config - Regex, aliases, gateways, includes and dynamic hosts" + homepage "https://v1.manfred.life/assh/" + url "https://github.com/moul/assh/archive/refs/tags/v2.16.0.tar.gz" + sha256 "9635d4123d344779728299627be57ee7ca26aa3ca65ed2fd4510a4fdd508b3cf" + license "MIT" + head "https://github.com/moul/assh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "11ccb1c7d31ec14e1328c0da793dd9140a26bbeb4c67f51c2722bf26c553c632" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "075a77507a18b82139c596e10594bf5584e3ed53016bd3d1fa43dd2bbb85afc6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d4c84e457f4a186f199a65311f8ddaaf8c05f60387eb71f16d7608d05afd75e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b8d0b50314b10b93181797d66523827c575c3bfdba89045969cc26badadaddd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "68f821488002a3aec14d7de7ceb122e61b83ace0ff2f7de08aaa757c469a7c29" + sha256 cellar: :any_skip_relocation, sonoma: "58b30be37e3af425f3074bad8582766f14845de9d8c79454d6a41dec8d98ad10" + sha256 cellar: :any_skip_relocation, ventura: "469bfcb0438ab525e6522cd1041e3aec3aae29b7e8b7515ebc6557c034d6b31d" + sha256 cellar: :any_skip_relocation, monterey: "2c5ef162523ae4a15d8cb5800666aad11a55bce998ac76805f0cf3a57455ef87" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2dc1fd2114c9b5f32d977f9cda64204e183f585e04c12d94407baf9cde97851" + sha256 cellar: :any_skip_relocation, x86_64_linux: "598e7c71ca8a20aec8985f1aee880fb6076081ed91622aa3983b41f3103f628f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"assh", "completion") + end + + test do + assh_config = testpath/"assh.yml" + assh_config.write <<~YAML + hosts: + hosta: + Hostname: 127.0.0.1 + asshknownhostfile: /dev/null + YAML + + output = "hosta assh ping statistics" + assert_match output, shell_output("#{bin}/assh --config #{assh_config} ping -c 4 hosta 2>&1") + end +end diff --git a/Formula/a/assimp.rb b/Formula/a/assimp.rb new file mode 100644 index 0000000000000..14c19587a3089 --- /dev/null +++ b/Formula/a/assimp.rb @@ -0,0 +1,90 @@ +class Assimp < Formula + desc "Portable library for importing many well-known 3D model formats" + homepage "https://www.assimp.org/" + url "https://github.com/assimp/assimp/archive/refs/tags/v6.0.2.tar.gz" + sha256 "d1822d9a19c9205d6e8bc533bf897174ddb360ce504680f294170cc1d6319751" + # NOTE: BSD-2-Clause is omitted as contrib/Open3DGC/o3dgcArithmeticCodec.c is not used + license all_of: [ + "BSD-3-Clause", + "CC-PDDC", # code/AssetLib/Assjson/cencode.* (code from libb64) + "MIT", # code/AssetLib/M3D/m3d.h, contrib/{openddlparser,pugixml,rapidjson} + "BSL-1.0", # contrib/{clipper,utf8cpp} + "Unlicense", # contrib/zip + "Zlib", # contrib/unzip + ] + head "https://github.com/assimp/assimp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cd42d21879d88bf5c153f8c356ba0641b3cdfa8d1ae0d965734ff51440c9304d" + sha256 cellar: :any, arm64_sequoia: "6ab85fd16cd1f86fc8ee199e49d4f57d9b23eb0e2b598e32d1450913862506a8" + sha256 cellar: :any, arm64_sonoma: "3ce55f76aaeb9b538266dfc81622bf6e33e1d4fdf2aebf69e442369378830a95" + sha256 cellar: :any, arm64_ventura: "ed951286fbf3dc3362927d2698df086e7da7ed6ae9be2fd83f4fba310431266b" + sha256 cellar: :any, sonoma: "1b6514222b86287994281fd61e7d30e5a087ecf143fc3f190afb9fc17048f061" + sha256 cellar: :any, ventura: "69f5e3ac41175e81f7431ea19ca6514790ce82107f71a843f739042394d221f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c781ef6fdfe87c1074960fd21abfa8e43c6ff35955b15b29a1e0ef0ceaf08f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e96dbe0de6b786a99551d144173516e4ae104bacb2c20ee0bcabd6af405ef90" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + + uses_from_macos "zlib" + + def install + args = %W[ + -DASSIMP_BUILD_TESTS=OFF + -DASSIMP_BUILD_ASSIMP_TOOLS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", " -S", ".", "-B", "build", "-G", "Ninja", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Library test. + (testpath/"test.cpp").write <<~CPP + #include + int main() { + Assimp::Importer importer; + return 0; + } + CPP + system ENV.cc, "-std=c++11", "test.cpp", "-L#{lib}", "-lassimp", "-o", "test" + system "./test" + + # Application test. + (testpath/"test.obj").write <<~EOS + # WaveFront .obj file - a single square based pyramid + + # Start a new group: + g MySquareBasedPyramid + + # List of vertices: + # Front left + v -0.5 0 0.5 + # Front right + v 0.5 0 0.5 + # Back right + v 0.5 0 -0.5 + # Back left + v -0.5 0 -0.5 + # Top point (top of pyramid). + v 0 1 0 + + # List of faces: + # Square base (note: normals are placed anti-clockwise). + f 4 3 2 1 + # Triangle on front + f 1 2 5 + # Triangle on back + f 3 4 5 + # Triangle on left side + f 4 1 5 + # Triangle on right side + f 2 3 5 + EOS + system bin/"assimp", "export", "test.obj", "test.ply" + end +end diff --git a/Formula/a/assimp@5.rb b/Formula/a/assimp@5.rb new file mode 100644 index 0000000000000..496bfecfd1461 --- /dev/null +++ b/Formula/a/assimp@5.rb @@ -0,0 +1,97 @@ +class AssimpAT5 < Formula + desc "Portable library for importing many well-known 3D model formats" + homepage "https://www.assimp.org/" + url "https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.tar.gz" + sha256 "66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb" + # NOTE: BSD-2-Clause is omitted as contrib/Open3DGC/o3dgcArithmeticCodec.c is not used + license all_of: [ + "BSD-3-Clause", + "CC-PDDC", # code/AssetLib/Assjson/cencode.* (code from libb64) + "MIT", # code/AssetLib/M3D/m3d.h, contrib/{openddlparser,pugixml,rapidjson} + "BSL-1.0", # contrib/{clipper,utf8cpp} + "Unlicense", # contrib/zip + "Zlib", # contrib/unzip + ] + + livecheck do + url :stable + regex(/^v?(5(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3faef1c367567a99e18a728139d787d046e0aefc30f65d541f88ccfd27b1ce19" + sha256 cellar: :any, arm64_sequoia: "88b53d2e04bf2557a8b9231ccf1d7924bb55917003fe16872c8f864de930feb4" + sha256 cellar: :any, arm64_sonoma: "74157cf837ac90bb9378ba79f75d9cbf8f4a3db379da1dc5f03db3748e2e8a42" + sha256 cellar: :any, arm64_ventura: "1b1d4f11a3c83bb8a7565c877397c86d4a06c952d3b4b85d8a756ce25516059e" + sha256 cellar: :any, sonoma: "72f6ba4406def81da38c77507f259cd9a1f28b8efb14983ce7780007cd951391" + sha256 cellar: :any, ventura: "17173cbe629f6dc15c3aecd382391aadeb74abd6c374760ad6143a5c16410138" + sha256 cellar: :any_skip_relocation, arm64_linux: "1dddf2d65a2c8f08efb3a198cd825952be67dd8785da42725dd50cda9eead96a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74fb37f50e5dea840d202a0b0cc5c8b5e7589128e5a294e23209ca131277ad43" + end + + keg_only :versioned_formula + + depends_on "cmake" => :build + depends_on "ninja" => :build + + uses_from_macos "zlib" + + def install + args = %W[ + -DASSIMP_BUILD_TESTS=OFF + -DASSIMP_BUILD_ASSIMP_TOOLS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", " -S", ".", "-B", "build", "-G", "Ninja", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Library test. + (testpath/"test.cpp").write <<~CPP + #include + int main() { + Assimp::Importer importer; + return 0; + } + CPP + system ENV.cc, "-std=c++11", "test.cpp", + "-I#{include}", "-L#{lib}", "-lassimp", "-o", "test" + system "./test" + + # Application test. + (testpath/"test.obj").write <<~EOS + # WaveFront .obj file - a single square based pyramid + + # Start a new group: + g MySquareBasedPyramid + + # List of vertices: + # Front left + v -0.5 0 0.5 + # Front right + v 0.5 0 0.5 + # Back right + v 0.5 0 -0.5 + # Back left + v -0.5 0 -0.5 + # Top point (top of pyramid). + v 0 1 0 + + # List of faces: + # Square base (note: normals are placed anti-clockwise). + f 4 3 2 1 + # Triangle on front + f 1 2 5 + # Triangle on back + f 3 4 5 + # Triangle on left side + f 4 1 5 + # Triangle on right side + f 2 3 5 + EOS + system bin/"assimp", "export", "test.obj", "test.ply" + end +end diff --git a/Formula/a/ast-grep.rb b/Formula/a/ast-grep.rb new file mode 100644 index 0000000000000..7c5dfc229659d --- /dev/null +++ b/Formula/a/ast-grep.rb @@ -0,0 +1,32 @@ +class AstGrep < Formula + desc "Code searching, linting, rewriting" + homepage "https://github.com/ast-grep/ast-grep" + url "https://github.com/ast-grep/ast-grep/archive/refs/tags/0.39.7.tar.gz" + sha256 "498e7837e5e58ad14f002001b8a43c41819035b688a10aade41529933b51967a" + license "MIT" + head "https://github.com/ast-grep/ast-grep.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "320bef4c63e24da69e20f6122feafc3f17fafdf7711c53ff7e27ac9a3f1d3f57" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "922743afb2591f644d16d00c58145c38d3aab4aff69a972737b355a68ab7eafe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10a7fd2baa7ee183b0c4c59c43593909b395b918c025091d488b5cc61a15c7eb" + sha256 cellar: :any_skip_relocation, sonoma: "dff4b844e955ed00e6e3d1f7350173fbc492daea1b657d27c3ca97614a2db777" + sha256 cellar: :any_skip_relocation, arm64_linux: "31916c0819aed130af72cdd6ee8c820d8ebfaed64f699d7960714f2634ad629a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1efce3500efa86fa1223a859f73cd760485d8541fe1cbb66be58c5a018faa443" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/cli") + + generate_completions_from_executable(bin/"ast-grep", "completions") + end + + test do + (testpath/"hi.js").write("console.log('it is me')") + system bin/"ast-grep", "run", "-l", "js", "-p console.log", (testpath/"hi.js") + + assert_match version.to_s, shell_output("#{bin}/ast-grep --version") + end +end diff --git a/Formula/a/astgen.rb b/Formula/a/astgen.rb new file mode 100644 index 0000000000000..b242d2e2e7991 --- /dev/null +++ b/Formula/a/astgen.rb @@ -0,0 +1,35 @@ +class Astgen < Formula + desc "Generate AST in json format for JS/TS" + homepage "https://github.com/joernio/astgen" + url "https://github.com/joernio/astgen/archive/refs/tags/v3.36.0.tar.gz" + sha256 "85c232240c49e9afd22279836dfc37fa10c7692722613a3de97263601cc16494" + license "Apache-2.0" + head "https://github.com/joernio/astgen.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9cd41858baaecd97598e53b8c11283e55dabfae40215ae2080c24dce2891b473" + end + + depends_on "node" + + uses_from_macos "zlib" + + def install + # Install `devDependency` packages to compile the TypeScript files + system "npm", "install", *std_npm_args(prefix: false), "-D" + system "npm", "run", "build" + + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + (testpath/"main.js").write <<~JS + console.log("Hello, world!"); + JS + + assert_match "Converted AST", shell_output("#{bin}/astgen -t js -i . -o #{testpath}/out") + assert_match "\"fullName\":\"#{testpath}/main.js\"", (testpath/"out/main.js.json").read + assert_match '"0:7":"Console"', (testpath/"out/main.js.typemap").read + end +end diff --git a/Formula/a/astro.rb b/Formula/a/astro.rb new file mode 100644 index 0000000000000..cd46f8849d5d2 --- /dev/null +++ b/Formula/a/astro.rb @@ -0,0 +1,51 @@ +class Astro < Formula + desc "To build and run Airflow DAGs locally and interact with the Astronomer API" + homepage "https://www.astronomer.io/" + url "https://github.com/astronomer/astro-cli/archive/refs/tags/v1.38.0.tar.gz" + sha256 "90b4c6cafc58d79b2baa418e397fa2b52d577b22c70e7812b365c3ae6d6fc7f2" + license "Apache-2.0" + head "https://github.com/astronomer/astro-cli.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf147c75310ae02c19643e336cdde4a014f637bcfaa551629f03958fda34b434" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be5577394136010b2dd8b25ecbb15f7d204d19b7eb5a1dc06e949aab49ab383a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26f4edca4abbf3a8c4d4e9312551bde98a30c35c494f4a66a61e2a0a7eb198eb" + sha256 cellar: :any_skip_relocation, sonoma: "920dd9a48cf82d54fc2913d63a2392930dd9ad41e097618cf9801a6c42253cd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "d975fb0afbbe086dd04e44722d260a7b14e9723290b925e0817db891a6d324b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00308b71058abf3022e2909edd44a5b13acc46e56c10cbf1fbd64ce8e655f043" + end + + depends_on "go" => :build + + on_macos do + depends_on "podman" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/astronomer/astro-cli/version.CurrVersion=#{version}") + + generate_completions_from_executable(bin/"astro", "completion") + end + + test do + version_output = shell_output("#{bin}/astro version") + assert_match("Astro CLI Version: #{version}", version_output) + + mkdir testpath/"astro-project" + cd testpath/"astro-project" do + run_output = shell_output("#{bin}/astro config set -g container.binary podman") + assert_match "Setting container.binary to podman successfully", run_output + run_output = shell_output("#{bin}/astro dev init") + assert_match "Initialized empty Astro project", run_output + assert_path_exists testpath/".astro/config.yaml" + end + + run_output = shell_output("echo 'test@invalid.io' | #{bin}/astro login astronomer.io --token-login=test", 1) + assert_match(/^Welcome to the Astro CLI*/, run_output) + end +end diff --git a/Formula/a/astrometry-net.rb b/Formula/a/astrometry-net.rb new file mode 100644 index 0000000000000..e5d2e5a46e71a --- /dev/null +++ b/Formula/a/astrometry-net.rb @@ -0,0 +1,92 @@ +class AstrometryNet < Formula + include Language::Python::Virtualenv + + desc "Automatic identification of astronomical images" + homepage "https://github.com/dstndstn/astrometry.net" + url "https://github.com/dstndstn/astrometry.net/releases/download/0.97/astrometry.net-0.97.tar.gz" + sha256 "e4eef1b658ba5ad462282b661c0ca3a5c538ba1716e853f7970b7b9fa4a33459" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "7f4f5d8b63f56580ab8358c167b88b4935edfd89c7a1f23795dd8cc17d7f7dd0" + sha256 cellar: :any, arm64_sequoia: "92cd33a9b2b2e265f40fc41d8f3970db11b13fd5644e79bb25b59e9c35918300" + sha256 cellar: :any, arm64_sonoma: "ed304036c98a2e5b34afd683447e9ec731da0a932f4efd4583948ffa912cd0ab" + sha256 cellar: :any, sonoma: "5e5b7ea3ffc3f164fe4ef417ee07b3bd61635e0d013ad65a44750f949b868a39" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f885845949e0b6399a00d2628b78b06576b2c89137ff308e1c5b708d6b36162" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d90330bbdcaca59edfed36e5c276dbdfc4167fb0defff861fd94b23bdd28d52" + end + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "swig" => :build + depends_on "cairo" + depends_on "cfitsio" + depends_on "gsl" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "netpbm" + depends_on "numpy" + depends_on "python@3.14" + depends_on "wcslib" + + pypi_packages exclude_packages: "numpy", + extra_packages: "fitsio" + + resource "fitsio" do + url "https://github.com/esheldon/fitsio/archive/refs/tags/1.2.7.tar.gz" + sha256 "356a425ce1c5c64e42685e1196f1d5fb43ec8fefb7f800232f756360e1a2a38a" + end + + def install + # astrometry-net doesn't support parallel build + # See https://github.com/dstndstn/astrometry.net/issues/178#issuecomment-592741428 + ENV.deparallelize + + ENV["FITSIO_USE_SYSTEM_FITSIO"] = "1" + ENV["NETPBM_INC"] = "-I#{Formula["netpbm"].opt_include}/netpbm" + ENV["NETPBM_LIB"] = "-L#{Formula["netpbm"].opt_lib} -lnetpbm" + ENV["SYSTEM_GSL"] = "yes" + ENV["PYTHON"] = python3 = which("python3.14") + + venv = virtualenv_create(libexec, python3) + venv.pip_install(resources, build_isolation: false) + + ENV["INSTALL_DIR"] = prefix + ENV["PY_BASE_INSTALL_DIR"] = venv.site_packages/"astrometry" + ENV["PY_BASE_LINK_DIR"] = venv.site_packages/"astrometry" + ENV["PYTHON_SCRIPT"] = venv.root/"bin/python" + + system "make" + system "make", "py" + system "make", "install" + + rm prefix/"doc/report.txt" + end + + test do + system bin/"image2pnm", "-h" + system bin/"build-astrometry-index", "-d", "3", "-o", "index-9918.fits", + "-P", "18", "-S", "mag", "-B", "0.1", + "-s", "0", "-r", "1", "-I", "9918", "-M", + "-i", prefix/"examples/tycho2-mag6.fits" + (testpath/"99.cfg").write <<~EOS + add_path . + inparallel + index index-9918.fits + EOS + system bin/"solve-field", "--config", "99.cfg", prefix/"examples/apod4.jpg", + "--continue", "--dir", "jpg" + assert_path_exists testpath/"jpg/apod4.solved" + assert_path_exists testpath/"jpg/apod4.wcs" + system bin/"solve-field", "--config", "99.cfg", prefix/"examples/apod4.xyls", + "--continue", "--dir", "xyls" + assert_path_exists testpath/"xyls/apod4.solved" + assert_path_exists testpath/"xyls/apod4.wcs" + end +end diff --git a/Formula/a/astroterm.rb b/Formula/a/astroterm.rb new file mode 100644 index 0000000000000..7c96070dec554 --- /dev/null +++ b/Formula/a/astroterm.rb @@ -0,0 +1,47 @@ +class Astroterm < Formula + desc "Planetarium for your terminal" + homepage "https://github.com/da-luce/astroterm" + url "https://github.com/da-luce/astroterm/archive/refs/tags/v1.0.9.tar.gz" + sha256 "d96d70c644b258ed0adc3a700e6af122659ecabf3eed60d7cfb6810b5068f3eb" + license "MIT" + head "https://github.com/da-luce/astroterm.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0d027e2cc1fd0a23430be34a88382d77c4506bae0b5984fe38294ffb53171cd0" + sha256 cellar: :any, arm64_sequoia: "59afefcb5518a5ec3f606202f6f1e614ff7a7338afe4390857861b4a58b86a41" + sha256 cellar: :any, arm64_sonoma: "b725c146a47cf2516699c6ad7779dd248fdc863b9daf7c4339d415455f06090b" + sha256 cellar: :any, arm64_ventura: "dd53a52e2c8386f5c6bf1f1cc8722c764b6c17b06c705ea69d3cab4546cd968a" + sha256 cellar: :any, sonoma: "fc4d03bd92fede80413930d6ccd1febd685cd21a600f278c07d81daa0f8532a4" + sha256 cellar: :any, ventura: "cd7e62dd0ad54dc212302677ebe6d74b5dfa820e1eba0edb545a43087b9c3862" + sha256 cellar: :any_skip_relocation, arm64_linux: "115541270f06d3f93203a9b6fe97df62c96ff5656fb13b08157df6dc1cd74718" + sha256 cellar: :any_skip_relocation, x86_64_linux: "369a156968b1a56a54b48779ebce9f0832e36f8433a876f1cec3a1aae3cdb876" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "argtable3" + + uses_from_macos "vim" => :build # for xxd + uses_from_macos "ncurses" + + resource "bsc5" do + url "http://tdc-www.harvard.edu/catalogs/BSC5", using: :nounzip + sha256 "e471d02eaf4eecb61c12f879a1cb6432ba9d7b68a9a8c5654a1eb42a0c8cc340" + end + + def install + resource("bsc5").stage do + (buildpath/"data").install "BSC5" + mv buildpath/"data/BSC5", buildpath/"data/bsc5" if OS.linux? + end + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # astroterm is a TUI application + assert_match version.to_s, shell_output("#{bin}/astroterm --version") + end +end diff --git a/Formula/a/astyle.rb b/Formula/a/astyle.rb new file mode 100644 index 0000000000000..343be5d0cdfab --- /dev/null +++ b/Formula/a/astyle.rb @@ -0,0 +1,43 @@ +class Astyle < Formula + desc "Source code beautifier for C, C++, C#, and Java" + homepage "https://astyle.sourceforge.net/" + url "https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.6/astyle-3.6.13.tar.bz2" + sha256 "048b74b14c6e01f7fae8e63b767da33303ab39d9022afe33055ce4b9e56f162d" + license "MIT" + head "https://svn.code.sf.net/p/astyle/code/trunk/AStyle" + + livecheck do + url :stable + regex(%r{url=.*?/astyle[._-]v?(\d+(?:\.\d+)+)(?:[._-]linux)?\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1c6fc89470242b5c172c5bdcca02db6296caaf0f96a9a338dda98a0a9d603d9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb581f7a3a7f042c2eacc69eb37d7919ff42333a2104bc096668374b4a08f9ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "75567d1c83c98f50e0b5d977eb9adc66ec3f73ab306b64b7024456bd90d7de5f" + sha256 cellar: :any_skip_relocation, sonoma: "961ad7ab777fd4fa58e89e29e6436c535ea9df87e567c64321ddcb0f0d86992f" + sha256 cellar: :any_skip_relocation, arm64_linux: "d26e61ddec42b911465f31ffc7ea6a2ed135bc083d6c581c24f833b799f5dec5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d04d6901ab8db87f311aaaa01d0bd1b9c94dba81f7b6478efed4ddad868269b6" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + man1.install "man/astyle.1" + end + + test do + (testpath/"test.c").write("int main(){return 0;}\n") + system bin/"astyle", "--style=gnu", "--indent=spaces=4", + "--lineend=linux", "#{testpath}/test.c" + assert_equal File.read("test.c"), <<~C + int main() + { + return 0; + } + C + end +end diff --git a/Formula/a/asuka.rb b/Formula/a/asuka.rb new file mode 100644 index 0000000000000..95efbd01a08eb --- /dev/null +++ b/Formula/a/asuka.rb @@ -0,0 +1,60 @@ +class Asuka < Formula + desc "Gemini Project client written in Rust with NCurses" + homepage "https://sr.ht/~julienxx/Asuka/" + url "https://git.sr.ht/~julienxx/asuka/archive/0.8.5.tar.gz" + sha256 "f7be2925cfc7ee6dcdfa4c30b9d4f6963f729c1b3f526ac242c7e1794bb190b1" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "156e06eccb49386fb0b708f212293bc61286c6380704b60b0e74e80126a59378" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6f80c3696b038f4ecc213c293ee2ba9ea19a16073eb43568c01bd422abec78e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2afd8a844903c8f8793e1f24c64094be24827fcfa61be07e9f3166723fa5b89a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1c02f51ae8c0a6bfa92468fa67574c31a5ac69680fa9aed4d0ff56028755a16" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5bf321cdfb82c2c08f69c1a7e48eed33d00e71c569e7eef10004ffd833c36bb5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bdd3adc10b5f906817abc3929dff9cb8e1420b2d91a88c5ac41d83106c9150bd" + sha256 cellar: :any_skip_relocation, sonoma: "033a615252d7926b79906b332656c132dc24e3cfb8e73b161983b6085e5ec35f" + sha256 cellar: :any_skip_relocation, ventura: "5403bcc45b1d57b653520103366cd5b73e2903fea485e4300740ed26438d1656" + sha256 cellar: :any_skip_relocation, monterey: "3f55b85765e46142ec4916bf0979283853e4442a116e2afc52282aa011d542be" + sha256 cellar: :any_skip_relocation, big_sur: "d943994991d51bfa95ce90f41e1cc7ad83be02e3b1117b76ed684310a22fb0ae" + sha256 cellar: :any_skip_relocation, catalina: "343c7a00b703c35a8e3600481d9dc54eb96bbb3f715cceb13e113f3dc1c7eeea" + sha256 cellar: :any_skip_relocation, arm64_linux: "bceb17ceec9b3e391c70eeb2798b3da9a1e2544c23203039032f0e8e38d0fda2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "600e1d1324197049502dddfbce2df349657fb4108154a042c6503bdb69f24400" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "ncurses" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + input, _, wait_thr = Open3.popen2 "script -q screenlog.txt" + input.puts "stty rows 80 cols 43" + input.puts "env LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 TERM=xterm #{bin}/asuka" + sleep 1 + input.putc "g" + sleep 1 + input.puts "gemini://gemini.circumlunar.space" + sleep 10 + input.putc "q" + input.puts "exit" + + screenlog = File.open(testpath/"screenlog.txt", "r:ASCII-8BIT", &:read) + assert_match "# Project Gemini", screenlog + ensure + Process.kill("TERM", wait_thr.pid) + end +end diff --git a/Formula/a/asymptote.rb b/Formula/a/asymptote.rb new file mode 100644 index 0000000000000..db9d38eead91a --- /dev/null +++ b/Formula/a/asymptote.rb @@ -0,0 +1,78 @@ +class Asymptote < Formula + desc "Powerful descriptive vector graphics language" + homepage "https://asymptote.sourceforge.io" + # Keep version in sync with manual below + url "https://downloads.sourceforge.net/project/asymptote/3.05/asymptote-3.05.src.tgz" + sha256 "35c16d0a3bdd869a56e4efff4638f81c3a88b2f6b664d196471015dbf4c69a87" + license "LGPL-3.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/asymptote[._-]v?(\d+(?:\.\d+)+)\.src\.t}i) + end + + bottle do + sha256 arm64_tahoe: "814b188f28dd593747d45a1a2a9f59011cdf0fc3a7d121d053e3109ee5649311" + sha256 arm64_sequoia: "2326f3949c22f1bd00df59c0ddee388e06e58ddd164cbfbea87f7033bf3f7aab" + sha256 arm64_sonoma: "7a6a49634130032a12c0100df37300fa6cbb9fde874aac00204539db78005f38" + sha256 arm64_ventura: "d4a00b288fa17bc6f556ac79d2fde894369181cad7edd7c81e79ea26499a3a3f" + sha256 sonoma: "53cf893a46148dbea3304ccc0eda5e64a56eda39a25bbf7dcf4e34428ae7eb30" + sha256 ventura: "8aa6f5d28d73efc11ceb4cf3ebddae9be8472095505fb103080c1f0bbcb251fd" + sha256 arm64_linux: "e1e896e59e89d3dbd32de5c717ba417e99b4cd6f11201a236319ab7a2d392f2d" + sha256 x86_64_linux: "61d615b53a3d74f89ab4338a1cfaca6df53602baba4cec6b89541568716d9905" + end + + depends_on "glm" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "fftw" + depends_on "ghostscript" + depends_on "gsl" + depends_on "readline" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "libtool" => :build + depends_on "freeglut" + depends_on "libtirpc" + depends_on "mesa" + end + + resource "manual" do + url "https://downloads.sourceforge.net/project/asymptote/3.05/asymptote.pdf" + sha256 "0c1237603f9eb898fd76d0976c4f091fd77085aa1b414bf4bc8d8344adb10862" + + livecheck do + formula :parent + end + end + + def install + odie "manual resource needs to be updated" if version != resource("manual").version + + system "./configure", *std_configure_args + + # Avoid use of LaTeX with these commands (instead of `make all && make install`) + # Also workaround to override bundled bdw-gc. Upstream is not willing to add configure option. + # Ref: https://github.com/vectorgraphics/asymptote/issues/521#issuecomment-2644549764 + system "make", "install-asy", "GCLIB=#{Formula["bdw-gc"].opt_lib/shared_library("libgc")}" + + doc.install resource("manual") + elisp.install_symlink pkgshare.glob("*.el") + end + + test do + (testpath/"line.asy").write <<~EOF + settings.outformat = "pdf"; + size(200,0); + draw((0,0)--(100,50),N,red); + EOF + + system bin/"asy", testpath/"line.asy" + assert_path_exists testpath/"line.pdf" + end +end diff --git a/Formula/a/async_simple.rb b/Formula/a/async_simple.rb new file mode 100644 index 0000000000000..9f3ae64cab9da --- /dev/null +++ b/Formula/a/async_simple.rb @@ -0,0 +1,63 @@ +class AsyncSimple < Formula + desc "Simple, light-weight and easy-to-use asynchronous components" + homepage "https://github.com/alibaba/async_simple" + url "https://github.com/alibaba/async_simple/archive/refs/tags/1.4.tar.gz" + sha256 "6188f7a5f4211754fee758dfebf73759b74ce78c208719b5cc37d5ab4775d550" + license "Apache-2.0" + head "https://github.com/alibaba/async_simple.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ea3f1e248db7c9bbaf801186303a6c6e633476b1fb0c0e6553642c46abc191ad" + sha256 cellar: :any, arm64_sequoia: "582aee9fb04f0106f59850ef5001c8fb830da5f16ecfc60e6ee0b37de2c10c15" + sha256 cellar: :any, arm64_sonoma: "ad0185e500e7a4873138ffb48dbf0a0ad9d6ac7298fb3418006b8ecd6df8ba34" + sha256 cellar: :any, arm64_ventura: "518f0229d7a19797fd5626fab507e608c7b25cc3bdfac3c05577d491c4923996" + sha256 cellar: :any, sonoma: "96069ca4876ed9bc04149fe02cc2445f3434a1dd84ae4360e4e420950a6d8e8c" + sha256 cellar: :any, ventura: "13c8d498f0ef0dd957353666f689f42bb9f94c262ab2997094699ec961362197" + sha256 cellar: :any_skip_relocation, arm64_linux: "3207af424eb85ff7a9d5c617b4c713262433024595a09d01e4d213328ae92bda" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20cb19de4276e5664a529b84494d3109488ca7970bee8912d502066bb899d188" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCMAKE_CXX_STANDARD=20 + -DBUILD_GMOCK=OFF + -DBUILD_GTEST=OFF + -DINSTALL_GTEST=OFF + -DASYNC_SIMPLE_BUILD_DEMO_EXAMPL=OFF + -DASYNC_SIMPLE_ENABLE_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath / "test.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + + using namespace async_simple::coro; + + using Texts = std::vector; + + Lazy CountLineChar(const std::string& line, char c) { + auto ret = std::count(line.begin(), line.end(), c); + co_return static_cast(ret); + } + + auto main() -> int { + auto num = syncAwait(CountLineChar("axxxax", 'x')); + std::cout << num << std::endl; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++20", "-L#{lib}", "-lasync_simple", "-o", "test" + assert_equal "4", shell_output("./test").chomp + end +end diff --git a/Formula/a/asyncapi.rb b/Formula/a/asyncapi.rb new file mode 100644 index 0000000000000..7989ba7e5a280 --- /dev/null +++ b/Formula/a/asyncapi.rb @@ -0,0 +1,35 @@ +class Asyncapi < Formula + desc "All in one CLI for all AsyncAPI tools" + homepage "https://github.com/asyncapi/cli" + url "https://registry.npmjs.org/@asyncapi/cli/-/cli-4.1.1.tgz" + sha256 "2f4d12597d6fc30615b6dd27fdac2c63222726005d50f62300d1f6a257f6cf61" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3ebd61013a46b45e87e720f6a29a01b21f30284eb2cc189b64192b4ada07bf39" + sha256 cellar: :any, arm64_sequoia: "7aef6cc320594a4a347ed4cb8d2b233aa62fa6bf6d58e485eacf7f95a558cab2" + sha256 cellar: :any, arm64_sonoma: "7aef6cc320594a4a347ed4cb8d2b233aa62fa6bf6d58e485eacf7f95a558cab2" + sha256 cellar: :any, sonoma: "256cfaa02cb30e5633444226e24db3820b4008faf720552b28b162bff96f04d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7db0c88cd1cdec73bff3052af77a3ced1082ca4d5b8b76d77b038910bea805e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b598c9f62a1fc12200cb19235a92224b7cbb94eb3b890fc1d0f317449d97de7" + end + + depends_on "node" + + def install + system "npm", "install", "--ignore-scripts", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Cleanup .pnpm folder + node_modules = libexec/"lib/node_modules/@asyncapi/cli/node_modules" + rm_r (node_modules/"@asyncapi/studio/build/standalone/node_modules/.pnpm") if OS.linux? + + # Replace universal binaries with their native slices + deuniversalize_machos node_modules/"fsevents/fsevents.node" + end + + test do + system bin/"asyncapi", "new", "file", "--file-name=asyncapi.yml", "--example=default-example.yaml", "--no-tty" + assert_path_exists testpath/"asyncapi.yml", "AsyncAPI file was not created" + end +end diff --git a/Formula/a/asyncplusplus.rb b/Formula/a/asyncplusplus.rb new file mode 100644 index 0000000000000..b28bd5f8925bd --- /dev/null +++ b/Formula/a/asyncplusplus.rb @@ -0,0 +1,78 @@ +class Asyncplusplus < Formula + desc "Concurrency framework for C++11" + homepage "https://github.com/Amanieu/asyncplusplus" + url "https://github.com/Amanieu/asyncplusplus/archive/refs/tags/v1.2.tar.gz" + sha256 "0711c8db231bf3eb1066400f49ed73b5c3211a10eb3b8c3e64da3d5fdee8a4bf" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "2dac09584a6d6b1fadb97f9a1fb4e439acc0c7dc9a33b24bef1fc5b32312d31e" + sha256 cellar: :any, arm64_sequoia: "2f1f1563fd122b947f728ed73168c062ffb569adbc92f02e1bbd372edbdaf889" + sha256 cellar: :any, arm64_sonoma: "405f620fcdc1fd59da54ac754d28fa308c0f1abab3369dcfc77d2ee80b17fad5" + sha256 cellar: :any, arm64_ventura: "2a2f1cdc93741e0db73b4359a7881225631f008a7b9e6e3d67d9d2de8d1c8765" + sha256 cellar: :any, sonoma: "251aea5c5562246a1ab1a394fa7396a4949df464c354f2007f4d671eee4a75be" + sha256 cellar: :any, ventura: "38434ba8c7542abbffd781b7f5f547f166f3143e971677d31bd1dd6a2c9da049" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fc17239cf85202f52390b6c1297bfd75db621c0dddb37d1df24366b0013538a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31b9d42407804a993ea90e4e2cf04c0466ea226f4a967f1ac8b732d9bf830aec" + end + + depends_on "cmake" => :build + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() + { + auto task1 = async::spawn([] { + std::cout << "Task 1 executes asynchronously" << std::endl; + }); + auto task2 = async::spawn([]() -> int { + std::cout << "Task 2 executes in parallel with task 1" << std::endl; + return 42; + }); + auto task3 = task2.then([](int value) -> int { + std::cout << "Task 3 executes after task 2, which returned " + << value << std::endl; + return value * 3; + }); + auto task4 = async::when_all(task1, task3); + auto task5 = task4.then([](std::tuple, + async::task> results) { + std::cout << "Task 5 executes after tasks 1 and 3. Task 3 returned " + << std::get<1>(results).get() << std::endl; + }); + + task5.get(); + std::cout << "Task 5 has completed" << std::endl; + + async::parallel_invoke([] { + std::cout << "This is executed in parallel..." << std::endl; + }, [] { + std::cout << "with this" << std::endl; + }); + + async::parallel_for(async::irange(0, 5), [](int x) { + std::cout << x; + }); + std::cout << std::endl; + + int r = async::parallel_reduce({1, 2, 3, 4}, 0, [](int x, int y) { + return x + y; + }); + std::cout << "The sum of {1, 2, 3, 4} is" << std::endl << r << std::endl; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lasync++", "--std=c++11", "-o", "test" + assert_equal "10", shell_output("./test").chomp.lines.last + end +end diff --git a/Formula/a/at-spi2-core.rb b/Formula/a/at-spi2-core.rb new file mode 100644 index 0000000000000..b8af49a6b8575 --- /dev/null +++ b/Formula/a/at-spi2-core.rb @@ -0,0 +1,85 @@ +class AtSpi2Core < Formula + desc "Protocol definitions and daemon for D-Bus at-spi" + homepage "https://www.freedesktop.org/wiki/Accessibility/AT-SPI2/" + url "https://download.gnome.org/sources/at-spi2-core/2.58/at-spi2-core-2.58.1.tar.xz" + sha256 "7f374a6a38cd70ff4b32c9d3a0310bfa804d946fed4c9e69a7d49facdcb95e9c" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_tahoe: "b23a823a46d17607d897d586d6ad7597970a2cf43eb8f97df62f1cc181cf4471" + sha256 arm64_sequoia: "4dff654ebf86dda945fd44f209092ebd57e456f2ef647347506a06a1a02e08f4" + sha256 arm64_sonoma: "1863b61000d7d817761a3b5b734412d27ff39d2c0fd40b6ab484ce12514cf0ad" + sha256 sonoma: "0b1c0981e638df2e28b0a581c4df8380d6c28024036d26876e18bec26ea69fcc" + sha256 arm64_linux: "59a1a31b41bfbc99abfa581259d02dc04b8e0ba51037d9ceb95124bb61f92b83" + sha256 x86_64_linux: "a13915bb502ab4f838dce3c490e2f87a640eb92b4b7187d7791db3775762034e" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "xorgproto" => :build + + depends_on "dbus" + depends_on "glib" + depends_on "libx11" + depends_on "libxi" + depends_on "libxtst" + + uses_from_macos "libxml2" => :build + + on_macos do + depends_on "gettext" + end + + def install + if OS.linux? + # Work around brew not adding dependencies of build dependencies to PKG_CONFIG_PATH + icu4c_dep = Formula["libxml2"].deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + ENV.append_path "PKG_CONFIG_PATH", icu4c_dep.to_formula.opt_lib/"pkgconfig" + end + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + /* + * List the applications registered on at-spi. + */ + + #include + #include + #include + #include + + + int main(int argc, gchar **argv) + { + gint i; + AtspiAccessible *desktop = NULL; + AtspiAccessible *app = NULL; + + atspi_init (); + + desktop = atspi_get_desktop (0); + for (i = 0; i < atspi_accessible_get_child_count (desktop, NULL); i++) { + app = atspi_accessible_get_child_at_index (desktop, i, NULL); + + g_print ("(Index, application, application_child_count)=(%d,%s,%d)\\n", + i, atspi_accessible_get_name (app, NULL), atspi_accessible_get_child_count (app, NULL)); + g_object_unref (app); + } + + return 1; + } + C + + pkg_config_cflags = shell_output("pkg-config --cflags --libs atspi-2").chomp.split + system ENV.cc, "test.c", *pkg_config_cflags, "-lgobject-2.0", "-o", "test" + assert_match "AT-SPI", shell_output("#{testpath}/test 2>&1", 133) + end +end diff --git a/Formula/a/ata.rb b/Formula/a/ata.rb new file mode 100644 index 0000000000000..44a1e337aa7e7 --- /dev/null +++ b/Formula/a/ata.rb @@ -0,0 +1,54 @@ +class Ata < Formula + desc "ChatGPT in the terminal" + homepage "https://github.com/transformrs/ata" + url "https://github.com/transformrs/ata/archive/refs/tags/v2.0.4.tar.gz" + sha256 "a70498492fce7b46a2a62175886a801f61f9f530c5c6d01b664af2750d3af555" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "61e1c7235e1db8bd6b2dca88f24e1dce32658c60817c274a8a3a74f8e93865f0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4e98e4c055e41cc706441024e03f621e29598cf9889dd8735542dea055a34e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f61ec72f7a185910b29a9209a746cd3ab5b951bc114479692fbe59a679292ac7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cca453b1df61a1bfb7c6e4121c6f2885b3558907c8275f871e79a252cee4582d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "26a3a3e71ffed54d77329208d9c74ae3eb9be88f5e69cf7fca46f8254aa1ad67" + sha256 cellar: :any_skip_relocation, sonoma: "4b2e8e207ef02ff40ecafaed7d1009785ef20473b7b7d89adfac06b0c97b86a8" + sha256 cellar: :any_skip_relocation, ventura: "0308bfe2e109b9b02c7a7c4216c741b69a5d485f96fe723da1265eec10651e0c" + sha256 cellar: :any_skip_relocation, monterey: "1c08731f02edf7f158c4d8865e331ebea4f91d8699f8fa4c714118af377deb2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea43319e201b4677ae3e9646b0cd8e7b5ccf1f09a5b5db4f5f92f467301e7d11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c73e91e7b7fc1ef0ca0db0c57df4e099c105c1a3f63b95a41a526043bd814ff9" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "ata") + end + + test do + system bin/"ata", "--version" + + config_file = testpath/"config/ata.toml" + config_file.write <<~TOML + api_key = "" + model = "gpt-3.5-turbo" + max_tokens = 2048 + temperature = 0.8 + TOML + + IO.popen("#{bin}/ata --config #{config_file} 2>&1", "r+") do |pipe| + assert_match "Ask the Terminal Anything", pipe.gets.chomp + assert_empty pipe.gets.chomp + assert_match "model: gpt-3.5-turbo", pipe.gets.chomp + assert_match "max_tokens: 2048", pipe.gets.chomp + assert_match "temperature: 0.8", pipe.gets.chomp + assert_empty pipe.gets.chomp + assert_match "Prompt: ", pipe.gets.chomp + pipe.puts "Hello\n" + pipe.flush + assert_empty pipe.gets.chomp + assert_match "Error:", pipe.gets.chomp + end + end +end diff --git a/Formula/a/atac.rb b/Formula/a/atac.rb new file mode 100644 index 0000000000000..5f23681b27d0d --- /dev/null +++ b/Formula/a/atac.rb @@ -0,0 +1,44 @@ +class Atac < Formula + desc "Simple API client (Postman-like) in your terminal" + homepage "https://atac.julien-cpsn.com/" + url "https://github.com/Julien-cpsn/ATAC/archive/refs/tags/v0.22.1.tar.gz" + sha256 "230fc1730fa8787a390232d88f286ba542e8627426ae9f7897f77d2a728b3578" + license "MIT" + head "https://github.com/Julien-cpsn/ATAC.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d77d486ce20dc189f86e1ef0035987e7a41023d8f2e3aae4400d21134f4ae2aa" + sha256 cellar: :any, arm64_sequoia: "5256db3f3e645117605fed41808add96c55d8c33e6861e5d29984647b7a2d212" + sha256 cellar: :any, arm64_sonoma: "a045d53a28a6f0ad7813e13f925185a92973e61f94d84ad9eee268ef71058475" + sha256 cellar: :any, sonoma: "5fa9daaa8f15d443cbef8ef8fe030f00045d211672ff4973754a34eb484c78c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7fcaeb9ad46e445f7021cb8ae79eb4751f323ab19efea0192a59f4da1bed0fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b3282d2f3123a70069906d2c78245be6123b363c35598a13d106c158786cf1d" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" + + def install + ENV["RUSTONIG_DYNAMIC_LIBONIG"] = "1" + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + + # Turn off shell completions to clipboard feature + system "cargo", "install", "--no-default-features", *std_cargo_args + + generate_completions_from_executable(bin/"atac", "completions") + + system bin/"atac", "man" + man1.install "atac.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/atac --version") + + system bin/"atac", "collection", "new", "test" + assert_match "test", shell_output("#{bin}/atac collection list") + + system bin/"atac", "try", "-u", "https://postman-echo.com/post", + "-m", "POST", "--duration", "--console", "--hide-content" + end +end diff --git a/Formula/a/atari800.rb b/Formula/a/atari800.rb new file mode 100644 index 0000000000000..fd5e725b64994 --- /dev/null +++ b/Formula/a/atari800.rb @@ -0,0 +1,58 @@ +class Atari800 < Formula + desc "Atari 8-bit machine emulator" + homepage "https://atari800.github.io/" + url "https://github.com/atari800/atari800/releases/download/ATARI800_5_2_0/atari800-5.2.0-src.tgz" + sha256 "3874d02b89d83c8089f75391a4c91ecb4e94001da2020c2617be088eba1f461f" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/ATARI800[._-]v?(\d+(?:[._]\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e87acc86cd6e9fa170e8e29bf5c92e649b4af7de49faab2f25f4a573f655e380" + sha256 cellar: :any, arm64_sequoia: "82df74e82551f83d67d3a7fcba873d4bd62a0084bc96371fbcc16e760a80aac4" + sha256 cellar: :any, arm64_sonoma: "800ce7fc88004e578e5b69d573b4a3701245de0174fbd4a4494d37ad79c0f3d0" + sha256 cellar: :any, arm64_ventura: "07b1d045d2e043b5ffa9af66fa8680309ced19869b882783caa535a3895c85c5" + sha256 cellar: :any, arm64_monterey: "fecd8f434681b731b644ca26c0f22d1be8373bce97386e0f7dd4eee0983ee29b" + sha256 cellar: :any, sonoma: "4053e4f8f91302c40fa30f31ee533ea3819e4e0ee736b328d4a9468f9846bd8d" + sha256 cellar: :any, ventura: "ab29186147fd355b806981cf9df942da3fe9a5c84041db411efa67662862283d" + sha256 cellar: :any, monterey: "2b2a241d5c0d1a9992682a0ff96fe9e7cec19ab3217deeb3839703779a35f2ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdd1445eb9501d8495ebb18ee093636b15dc6b6490f2fa702c7a267eb3161440" + sha256 cellar: :any_skip_relocation, x86_64_linux: "656005889be7d36009a7b927d4b7437f38b988cc74063b5e3cefe3406bbffd77" + end + + head do + url "https://github.com/atari800/atari800.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "libpng" + depends_on "sdl12-compat" + + uses_from_macos "zlib" + + on_linux do + depends_on "readline" + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-sdltest", + "--disable-riodevice", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + assert_equal "Atari 800 Emulator, Version #{version}", + shell_output("#{bin}/atari800 -v", 3).strip + end +end diff --git a/Formula/a/atasm.rb b/Formula/a/atasm.rb new file mode 100644 index 0000000000000..cd216aa92459d --- /dev/null +++ b/Formula/a/atasm.rb @@ -0,0 +1,44 @@ +class Atasm < Formula + desc "Atari MAC/65 compatible assembler for Unix" + homepage "https://sourceforge.net/projects/atasm/" + url "https://downloads.sourceforge.net/project/atasm/atasm/atasm-1.09/atasm109.zip" + version "1.09" + sha256 "dbab21870dabdf419920fcfa4b5adfe9d38b291a60a4bc2ba824595f7fbc3ef0" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8350e6c0e2bbb8035e95f13ad05a77bf44aa99e6d93c3ceae54c0b3265bd4a29" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9402a817b9438f3ba44ecf8ef38e70dcfe070a43251f9d62fe0785212b2d0e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c4910e7d916c52776028f38d6b61858f7d0a4bc85bb46571f08bdcfbc6418df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "727eea7c68b8de0a001e3b0937c429af8797af568433be534d74ada42a1925eb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fab0b76cba3104965e4627681e2f5776df2337ad3300ba6acf140a0151afe237" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f4c812d6e1cc7f0b02d3c00160d7656779fe163f62c55da63ae2359bc472585b" + sha256 cellar: :any_skip_relocation, sonoma: "47a836c3560e9a8929e45aab4c124d1a7db6b533440a55f1e239d9b563dbdf52" + sha256 cellar: :any_skip_relocation, ventura: "516c1388cf1e4c11c805dd8f9670b53be3ee63469b0d4804c24917b5cba18432" + sha256 cellar: :any_skip_relocation, monterey: "16ea6c4cd36ace328c78bbe3daeaad7e22ea30c5e013b07584eb00e9931ef67e" + sha256 cellar: :any_skip_relocation, big_sur: "8d7eba0c0fa5194201d4fac69466c807bf01d3676424a1501d3bc35cec2e43c1" + sha256 cellar: :any_skip_relocation, catalina: "d89f9e6ccd622ec72be4e8c3e5c01fa1b70abc1cf79b8cd5379ff986aae6d616" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec6ae8edd7437983d866c3e8a1c90699912e8064c9678040e06f3bf93065584f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d348c1f0f46cb7d43078b336c4b08751966d9763f4ce3470aa082f94a1ed90e1" + end + + uses_from_macos "zlib" + + def install + cd "src" do + system "make" + bin.install "atasm" + inreplace "atasm.1.in", "%%DOCDIR%%", "#{HOMEBREW_PREFIX}/share/doc/atasm" + man1.install "atasm.1.in" => "atasm.1" + end + doc.install "examples", Dir["docs/atasm.*"] + end + + test do + cd "#{doc}/examples" do + system bin/"atasm", "-v", "test.m65", "-o/tmp/test.bin" + end + end +end diff --git a/Formula/a/atf.rb b/Formula/a/atf.rb new file mode 100644 index 0000000000000..f3c82ad7468b4 --- /dev/null +++ b/Formula/a/atf.rb @@ -0,0 +1,49 @@ +class Atf < Formula + desc "Automated testing framework" + homepage "https://github.com/freebsd/atf" + url "https://github.com/freebsd/atf/releases/download/atf-0.23/atf-0.23.tar.gz" + sha256 "a64e2427d021297f25b3f2e1798f8ec4dc3061ffb01a1cd3f66cc4cee486b10f" + license "BSD-2-Clause" + head "https://github.com/freebsd/atf.git", branch: "master" + + livecheck do + url :stable + regex(/^atf[._-]?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "acbf43372e23b1ec798d9220e6035f76a8d42d61af90ab40c43b32dc90b22745" + sha256 arm64_sequoia: "14d17d25d50313d4fbd2794874b972925f23c67dea567ae1ec692efd32c2647f" + sha256 arm64_sonoma: "b8f3e848fb9147744c021fae004abe9cb8ac262c94d6bcd4a487b79ea73e6cee" + sha256 arm64_ventura: "b0e02364b9ab0b317420b1ed1045e9c701ad002653b9180832a18e29c5c542ec" + sha256 sonoma: "9cd739eb6f0f1ec5c7a7718c66fea9ea8a3435ffd3506da93d60393f0bda5f0d" + sha256 ventura: "f454fa5d1f845261d605e9d94a926b6cd4e3a120a6782fe0f93776ab01697df6" + sha256 arm64_linux: "5b259959f57b981567bc83a2889401ef8224bc504e46428a62569cb3eebb054a" + sha256 x86_64_linux: "9e2c5311676f2350c618ba8b2092a67df2fa2300c1212d1f25bd70f4650ea934" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "glibtoolize", "--force", "--install" + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}" + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + (testpath/"test.sh").write <<~SHELL + #!/usr/bin/env atf-sh + echo test + exit 0 + SHELL + system "bash", "test.sh" + end +end diff --git a/Formula/a/athenacli.rb b/Formula/a/athenacli.rb new file mode 100644 index 0000000000000..cb52d5890bb5c --- /dev/null +++ b/Formula/a/athenacli.rb @@ -0,0 +1,120 @@ +class Athenacli < Formula + include Language::Python::Virtualenv + + desc "CLI tool for AWS Athena service" + homepage "https://athenacli.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/38/1a/d9cd6c68a4a1cd2ce779b163f8cec390ae82c684caa920d0360094886b1f/athenacli-1.6.8.tar.gz" + sha256 "c7733433f2795d250e3c23b134136fea571ea9868c15f424875cd194eaeb7246" + license "BSD-3-Clause" + revision 7 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2d28ac6dd41d5886272d80aace113a0650304eb999238cc8350afcd8c9be5d59" + end + + depends_on "python@3.14" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/5a/e6/51b043e8c4ae390af61af35f73a9c2a69a26ea9cf4d061ab45c59f8e20f4/cli_helpers-2.7.0.tar.gz" + sha256 "62d11710dbebc2fc460003de1215688325d8636859056d688b38419bd4048bc0" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/de/e0/bab50af11c2d75c9c4a2a26a5254573c0bd97cea152254401510950486fa/fsspec-2025.9.0.tar.gz" + sha256 "19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pyathena" do + url "https://files.pythonhosted.org/packages/02/5b/70d5ee0313b5d2f55a11272c84ecfb73e72d82ff807873a9a35c9bf9dd25/pyathena-3.18.0.tar.gz" + sha256 "5d6c9c70c1abcc49fdb33c9470d520f470cace1f04e5249c7b92e06ffc328326" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/15/53/5345177cafa79a49e02c27102019a01ef1682ab170d2138deca47a4c8924/Pygments-2.11.1.tar.gz" + sha256 "59b895e326f0fb0d733fd28c6839bd18ad0687ba20efc26d4277fd1d30b971f4" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sqlparse" do + url "https://files.pythonhosted.org/packages/65/16/10f170ec641ed852611b6c9441b23d10b5702ab5288371feab3d36de2574/sqlparse-0.4.4.tar.gz" + sha256 "d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tenacity" do + url "https://files.pythonhosted.org/packages/0a/d4/2b0cd0fe285e14b36db076e78c93766ff1d529d70408bd1d2a5a84f1d929/tenacity-9.1.2.tar.gz" + sha256 "1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + init_run_output = shell_output("#{bin}/athenacli 2>&1", 1) + assert_match "Welcome to athenacli!", init_run_output + assert_match "we generated a default config file for you", init_run_output + + regular_run_output = shell_output("#{bin}/athenacli 2>&1", 1) + assert_match "`s3_staging_dir` or `work_group` not found", regular_run_output + end +end diff --git a/Formula/a/atkmm.rb b/Formula/a/atkmm.rb new file mode 100644 index 0000000000000..a86d417031a9c --- /dev/null +++ b/Formula/a/atkmm.rb @@ -0,0 +1,56 @@ +class Atkmm < Formula + desc "Official C++ interface for the ATK accessibility toolkit library" + homepage "https://www.gtkmm.org/" + url "https://download.gnome.org/sources/atkmm/2.36/atkmm-2.36.3.tar.xz" + sha256 "6ec264eaa0c4de0adb7202c600170bde9a7fbe4d466bfbe940eaf7faaa6c5974" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a0084966800d7cf115466eb824f41e5c4c8fa269437abdc7d874f1ba5d52c04d" + sha256 cellar: :any, arm64_sequoia: "7b9d9f8002ad938aeefbdad02a83210e5e0b9e76cfba58cf5754d6d72bf48c45" + sha256 cellar: :any, arm64_sonoma: "62dd226fac2e76888483763ecc6ef017a652bde7bb98c914565c8002efe03db3" + sha256 cellar: :any, arm64_ventura: "3cc5b98b28dad00ca0c2caf58510534bb1181ec9a649ce4fcf1dc4c587bb7fb9" + sha256 cellar: :any, arm64_monterey: "24dd60968bc4fea78ba832266d4a735d1bbd678f52b75bdb1df621cb4d8c8092" + sha256 cellar: :any, sonoma: "6454c0225d51922b4ad717b04dade8bf93b92aa26c836d77b41a55fbc41a0a14" + sha256 cellar: :any, ventura: "8327309298dd1743517ed04c4d8b0c7803c9619ea9139dfcbe5531f51730a639" + sha256 cellar: :any, monterey: "d16d833f1b2cd3ff76fd00054da59dba3413e2ce655068f62ef2c47dabe8e08b" + sha256 arm64_linux: "05e534d8d4d01ae147b7e2102e041262aea114c33ed580fb4000037a7ca41694" + sha256 x86_64_linux: "cec181c4ae3a4be7b814e82d909f1128e5279592ff3a4ea6e7e85baebe27dbb0" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "at-spi2-core" + depends_on "glib" + depends_on "glibmm" + depends_on "libsigc++" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) + { + Atk::init(); + return 0; + } + CPP + flags = shell_output("pkg-config --cflags --libs atkmm-2.36").chomp.split + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/a/atkmm@2.28.rb b/Formula/a/atkmm@2.28.rb new file mode 100644 index 0000000000000..ab92d2050402a --- /dev/null +++ b/Formula/a/atkmm@2.28.rb @@ -0,0 +1,62 @@ +class AtkmmAT228 < Formula + desc "Official C++ interface for the ATK accessibility toolkit library" + homepage "https://www.gtkmm.org/" + url "https://download.gnome.org/sources/atkmm/2.28/atkmm-2.28.4.tar.xz" + sha256 "0a142a8128f83c001efb8014ee463e9a766054ef84686af953135e04d28fdab3" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/atkmm-(2\.28(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e8931497dd646ec78caf0f60b31040f777a584af67d3b46439f4811812c0645c" + sha256 cellar: :any, arm64_sequoia: "666a7ab1c48c5013fe80065747861be3df354221fd8f2dc4fa6fc312961f3edc" + sha256 cellar: :any, arm64_sonoma: "f456190b4929828e7786823167e1b49e017314b86018a02d5730921db647b61f" + sha256 cellar: :any, arm64_ventura: "9258ea3392df7963c73faaeebb0d1daa29bef3e3d29a2fb3ba0ec75d70a5be9b" + sha256 cellar: :any, arm64_monterey: "0c6cab78734bf9ba2566cc9226d100ac78fc7b50e3576df09bdccdca3cd17995" + sha256 cellar: :any, sonoma: "23fc5fb3345c060262e193aa31f07fe347f297a3e365090d77697b0c3531111e" + sha256 cellar: :any, ventura: "d7e72faf7d1f8cec802a2cf3ffc36a24e0c763d7aa5c350796d1d49255fad66a" + sha256 cellar: :any, monterey: "d48e4769f508c8f4b3147fa598020da42d42cdce9ad5ac4377763f508d3e228b" + sha256 arm64_linux: "96e07ff462123e77d619943a5bba6ac854387c209a58547ecc7d772172521b44" + sha256 x86_64_linux: "fc9b8e9286aaf97bc9255158fae66cb4ea5c6a2c2c8f6cbb3681a69cd9fa39f3" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "at-spi2-core" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "libsigc++@2" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) + { + Atk::init(); + return 0; + } + CPP + + flags = shell_output("pkg-config --cflags --libs atkmm-1.6").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/a/atlantis.rb b/Formula/a/atlantis.rb new file mode 100644 index 0000000000000..8da2dde75c187 --- /dev/null +++ b/Formula/a/atlantis.rb @@ -0,0 +1,59 @@ +class Atlantis < Formula + desc "Terraform Pull Request Automation tool" + homepage "https://www.runatlantis.io/" + url "https://github.com/runatlantis/atlantis/archive/refs/tags/v0.36.0.tar.gz" + sha256 "710408feeeb12c23012bf24c57b674561af6076a843203729ba9e201f3ad634b" + license "Apache-2.0" + head "https://github.com/runatlantis/atlantis.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c65a1de357b8701e3bfa231d403af4cf3a19cd7ca0d33dc1de44704ead7b4974" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c65a1de357b8701e3bfa231d403af4cf3a19cd7ca0d33dc1de44704ead7b4974" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c65a1de357b8701e3bfa231d403af4cf3a19cd7ca0d33dc1de44704ead7b4974" + sha256 cellar: :any_skip_relocation, sonoma: "8f820a1c3f5f82218d25a2c57456a0d5d4326eef449be767b4c1bb75ef552343" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff008dfd191baa436d101ff42c1bdf95450fdee61dd4f850062b9f2015102da7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fab9f3c7d443074ea6e780ca96ead6ed9f755fcb1ad3d416071a11ac47e9b74" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=brew + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/atlantis version") + + port = free_port + args = %W[ + --atlantis-url http://invalid/ + --port #{port} + --gh-user INVALID + --gh-token INVALID + --gh-webhook-secret INVALID + --repo-allowlist INVALID + --log-level info + --default-tf-distribution opentofu + --default-tf-version #{Formula["opentofu"].version} + ] + pid = spawn(bin/"atlantis", "server", *args) + sleep 5 + output = shell_output("curl -vk# 'http://localhost:#{port}/' 2>&1") + assert_match %r{HTTP/1.1 200 OK}m, output + assert_match "atlantis", output + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/a/atlas.rb b/Formula/a/atlas.rb new file mode 100644 index 0000000000000..fc885ad467844 --- /dev/null +++ b/Formula/a/atlas.rb @@ -0,0 +1,42 @@ +class Atlas < Formula + desc "Database toolkit" + homepage "https://atlasgo.io/" + # Upstream may not mark patch releases as latest on GitHub; it is fine to ship them. + # See https://github.com/ariga/atlas/issues/1090#issuecomment-1225258408 + url "https://github.com/ariga/atlas/archive/refs/tags/v0.38.0.tar.gz" + sha256 "70c0efefa3605279c8eb6fb69447b461f304a6846205d23d394570fc4cd95d69" + license "Apache-2.0" + head "https://github.com/ariga/atlas.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34207701799315abfe7a888cde24f2b86fe5b5fa5ff75e3382c130b0674756d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7a3e90c2446f3e7a1c99f328624950f79b5a2278d78133ed33088a7af35f84e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "465d79753381fe25c1d707e76a979a2635b532c01cffdeeac45976cb18d4f28a" + sha256 cellar: :any_skip_relocation, sonoma: "e07364e03dbdbbd95c0c6c8d1e4091aab6ffecf200dbac35d72e3584c89e956a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b764d1659b61f6d095290397af53d4f8ac35795fa4322abaf25d14de84f365bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1822b313630f1c80e9c10e48d2d6ab4b0be616a1d4d3bc60c04642e91f3090ad" + end + + depends_on "go" => :build + + conflicts_with "mongodb-atlas-cli", "nim", because: "both install `atlas` executable" + + def install + ldflags = %W[ + -s -w + -X ariga.io/atlas/cmd/atlas/internal/cmdapi.version=v#{version} + ] + cd "./cmd/atlas" do + system "go", "build", *std_go_args(ldflags:) + end + + generate_completions_from_executable(bin/"atlas", "completion") + end + + test do + assert_match "Error: mysql: query system variables:", + shell_output("#{bin}/atlas schema inspect -u \"mysql://user:pass@localhost:3306/dbname\" 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/atlas version") + end +end diff --git a/Formula/a/atmos.rb b/Formula/a/atmos.rb new file mode 100644 index 0000000000000..752a6691653a3 --- /dev/null +++ b/Formula/a/atmos.rb @@ -0,0 +1,127 @@ +class Atmos < Formula + desc "Universal Tool for DevOps and Cloud Automation" + homepage "https://github.com/cloudposse/atmos" + url "https://github.com/cloudposse/atmos/archive/refs/tags/v1.197.0.tar.gz" + sha256 "cdf393d2c1fe1213efbf3fa68ea27d650674826e7821638fd20efd1b7323ebb5" + license "Apache-2.0" + head "https://github.com/cloudposse/atmos.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e8c7d091b324bf789caa9d24186011add9816f99ea0b5f4c21d0f945eef6c656" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16091ee967f37f4d81bf9ae0f4b2d945f54ae6aed84f40d9ad8f714931cbf7b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4aa4f29187bfbce3cf87baea3637c30bd1c1afd9545cc204a1f1338a3fb9d1b" + sha256 cellar: :any_skip_relocation, sonoma: "a26092407e4e3e0e97f0cc8c7343e61fb741fd95a500ec70ec8ed04859fe685b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d53017b206bee8815fab5015c6cd908d0acbbe207db542cc8909e80db24602d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df8de4bd3f0497814c30dee3314a90d9be10e91f6af872913c8ded8696e06fce" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "systemd" # libudev + end + + conflicts_with "tenv", because: "tenv symlinks atmos binaries" + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + system "go", "build", *std_go_args(ldflags: "-s -w -X 'github.com/cloudposse/atmos/pkg/version.Version=#{version}'") + + generate_completions_from_executable(bin/"atmos", "completion") + end + + test do + # create basic atmos.yaml + (testpath/"atmos.yaml").write <<~YAML + components: + terraform: + base_path: "./components/terraform" + apply_auto_approve: false + deploy_run_init: true + auto_generate_backend_file: false + helmfile: + base_path: "./components/helmfile" + kubeconfig_path: "/dev/shm" + helm_aws_profile_pattern: "{namespace}-{tenant}-gbl-{stage}-helm" + cluster_name_pattern: "{namespace}-{tenant}-{environment}-{stage}-eks-cluster" + stacks: + base_path: "./stacks" + included_paths: + - "**/*" + excluded_paths: + - "globals/**/*" + - "catalog/**/*" + - "**/*globals*" + name_pattern: "{tenant}-{environment}-{stage}" + logs: + file: "/dev/stderr" + verbose: false + colors: true + YAML + + # create scaffold + mkdir_p testpath/"stacks" + mkdir_p testpath/"components/terraform/top-level-component1" + (testpath/"stacks/tenant1-ue2-dev.yaml").write <<~YAML + terraform: + backend_type: s3 # s3, remote, vault, static, etc. + backend: + s3: + encrypt: true + bucket: "eg-ue2-root-tfstate" + key: "terraform.tfstate" + dynamodb_table: "eg-ue2-root-tfstate-lock" + acl: "bucket-owner-full-control" + region: "us-east-2" + role_arn: null + remote: + vault: + + vars: + tenant: tenant1 + region: us-east-2 + environment: ue2 + stage: dev + + components: + terraform: + top-level-component1: {} + YAML + + # create expected file + (testpath/"backend.tf.json").write <<~JSON + { + "terraform": { + "backend": { + "s3": { + "workspace_key_prefix": "top-level-component1", + "acl": "bucket-owner-full-control", + "bucket": "eg-ue2-root-tfstate", + "dynamodb_table": "eg-ue2-root-tfstate-lock", + "encrypt": true, + "key": "terraform.tfstate", + "region": "us-east-2", + "role_arn": null + } + } + } + } + JSON + + system bin/"atmos", "terraform", "generate", "backend", "top-level-component1", "--stack", "tenant1-ue2-dev" + actual_json = JSON.parse(File.read(testpath/"components/terraform/top-level-component1/backend.tf.json")) + expected_json = JSON.parse(File.read(testpath/"backend.tf.json")) + assert_equal expected_json["terraform"].to_set, actual_json["terraform"].to_set + + assert_match "Atmos #{version}", shell_output("#{bin}/atmos version") + end +end diff --git a/Formula/a/atomic_queue.rb b/Formula/a/atomic_queue.rb new file mode 100644 index 0000000000000..17f6e1a047dd5 --- /dev/null +++ b/Formula/a/atomic_queue.rb @@ -0,0 +1,47 @@ +class AtomicQueue < Formula + desc "C++14 lock-free queues" + homepage "https://github.com/max0x7ba/atomic_queue" + url "https://github.com/max0x7ba/atomic_queue/archive/refs/tags/v1.7.1.tar.gz" + sha256 "6eeff578f8b0499717bf890d90e2c58106ac2b8076084b73f2183a631742b4ab" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b1149a3911cea1bd45fb204530cedb7f6ff684dc73aff53fac24fbbcfab88861" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1149a3911cea1bd45fb204530cedb7f6ff684dc73aff53fac24fbbcfab88861" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1149a3911cea1bd45fb204530cedb7f6ff684dc73aff53fac24fbbcfab88861" + sha256 cellar: :any_skip_relocation, sonoma: "b1149a3911cea1bd45fb204530cedb7f6ff684dc73aff53fac24fbbcfab88861" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bc3490122a06d18acb763f3bd9a76d098380aaf2d4e753a75771d714e5a228b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bc3490122a06d18acb763f3bd9a76d098380aaf2d4e753a75771d714e5a228b" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + def install + system "meson", "setup", "build", "-Dtests=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() { + using QueueT = atomic_queue::AtomicQueueB2, true, true, true>; + auto queue = QueueT(64); + queue.push(5); + assert(queue.was_size() == 1); + assert(queue.pop() == 5); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs atomic_queue").chomp.split + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++14", *flags + system "./test" + end +end diff --git a/Formula/a/atomicparsley.rb b/Formula/a/atomicparsley.rb new file mode 100644 index 0000000000000..78b6d23f7a9c2 --- /dev/null +++ b/Formula/a/atomicparsley.rb @@ -0,0 +1,41 @@ +class Atomicparsley < Formula + desc "MPEG-4 command-line tool" + homepage "https://github.com/wez/atomicparsley" + url "https://github.com/wez/atomicparsley/archive/refs/tags/20240608.083822.1ed9031.tar.gz" + version "20240608.083822.1ed9031" + sha256 "5bc9ac931a637ced65543094fa02f50dde74daae6c8800a63805719d65e5145e" + license "GPL-2.0-or-later" + version_scheme 1 + head "https://github.com/wez/atomicparsley.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eb06745bb021400165dff5d9c34273fcbe02a430686c6075df36d1828c09261f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a224c8a6e91bac8c95b78e70797b63f260e0958cb724e2884868b7720739f93" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f08cfa8a20add56a8a17d2356dccdfd59065dc969e6d3fc1ede0978d46185f9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "05d19096d14878111b050374bbdafcc19cb453c068cd24106766edb5e6889d6f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bb99a7c912436b15676ed135f18c3e687eeef23b4dc2f92c962f40c6ec4aae19" + sha256 cellar: :any_skip_relocation, sonoma: "7ef3fb9321dfd7ac580239b39e67a580553083f4538823b1ad498e1a20521551" + sha256 cellar: :any_skip_relocation, ventura: "e09ac5b05a2227b03567097e8ff3e39f4f12a929b86207a4ac0873eb6578e43d" + sha256 cellar: :any_skip_relocation, monterey: "9d119a39c122e416e2e089fbcc2dd9714fc1a9c182c258b0b5a512b793dbae79" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ddacba6d9783f732895ac6ffa41167aacbecaea081f7efa36702a0a1a72debc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71ecbada94798344e79eb385528e9b598767297a70beb6246d4bb1b29aaf77bd" + end + + depends_on "cmake" => :build + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/AtomicParsley" + end + + test do + cp test_fixtures("test.m4a"), testpath/"file.m4a" + + system bin/"AtomicParsley", testpath/"file.m4a", "--artist", "Homebrew", "--overWrite" + output = shell_output("#{bin}/AtomicParsley file.m4a --textdata") + assert_match "Homebrew", output + end +end diff --git a/Formula/a/atomist-cli.rb b/Formula/a/atomist-cli.rb new file mode 100644 index 0000000000000..9b34c43feb230 --- /dev/null +++ b/Formula/a/atomist-cli.rb @@ -0,0 +1,66 @@ +class AtomistCli < Formula + desc "Unified command-line tool for interacting with Atomist services" + homepage "https://github.com/atomist/cli" + url "https://registry.npmjs.org/@atomist/cli/-/cli-1.8.0.tgz" + sha256 "64bcc7484fa2f1b7172984c278ae928450149fb02b750f79454b1a6683d17f62" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 1 + sha256 arm64_tahoe: "9096d4a8b1d236daa97853083e811de728f31d36cca61907d27e959fb827bb1c" + sha256 arm64_sequoia: "54a93f92a1ab76bd418aea3c87bede2490e9db5605238ba1b501717dd54377d4" + sha256 arm64_sonoma: "6f7f8b016f46718325419bda88b5b605070f6caa951007a1479d009490f2b25e" + sha256 arm64_ventura: "91010cbaa3802b444bfcfb62569f4e953fcabf564da8cde87ab82b8c7b35fefa" + sha256 arm64_monterey: "2090a3d1b37500a44d836873fd4b3d8c8f0a6b094c61fb8530baa4b3f33ee82b" + sha256 sonoma: "9f084e5811bda72cbdafaa9d6ef94475d4e62f8a02a9701482d48c77c2135cf3" + sha256 ventura: "059bfc06ae2d8cd4ff0c588d543b6d79637c6e199b30544e832ca5fb472701ab" + sha256 monterey: "35c62db45f98397cf306aad8b2f9e4a0b0f0b61f686da6b7b91c34d41bcf18d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "f506f68f1e09b7ace94a007c93bab7edccbdf5f6d11461756bd2921ee0d481fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8a420e052281702ab92e1b510422b86556e366f8c6b149fbae2ef3864466708" + end + + deprecate! date: "2025-08-01", because: :unmaintained + + depends_on "node" + + on_macos do + depends_on "macos-term-size" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + bash_completion.install libexec/"lib/node_modules/@atomist/cli/assets/bash_completion/atomist" + + term_size_vendor_dir = libexec/"lib/node_modules/@atomist/cli/node_modules/term-size/vendor" + rm_r(term_size_vendor_dir) # remove pre-built binaries + + if OS.mac? + macos_dir = term_size_vendor_dir/"macos" + macos_dir.mkpath + # Replace the vendored pre-built term-size with one we build ourselves + ln_sf (Formula["macos-term-size"].opt_bin/"term-size").relative_path_from(macos_dir), macos_dir + end + end + + test do + assert_path_exists bin/"atomist" + assert_predicate bin/"atomist", :executable? + assert_path_exists bin/"@atomist" + assert_predicate bin/"@atomist", :executable? + + run_output = shell_output("#{bin}/atomist 2>&1", 1) + assert_match "Not enough non-option arguments", run_output + assert_match "Specify --help for available options", run_output + + version_output = shell_output("#{bin}/atomist --version") + assert_match "@atomist/cli", version_output + assert_match "@atomist/sdm ", version_output + assert_match "@atomist/sdm-core", version_output + assert_match "@atomist/sdm-local", version_output + + skill_output = shell_output("#{bin}/atomist show skills") + assert_match(/\d+ commands are available from \d+ connected SDMs/, skill_output) + end +end diff --git a/Formula/a/atool.rb b/Formula/a/atool.rb new file mode 100644 index 0000000000000..5993a9fb4ef9c --- /dev/null +++ b/Formula/a/atool.rb @@ -0,0 +1,38 @@ +class Atool < Formula + desc "Archival front-end" + homepage "https://savannah.nongnu.org/projects/atool/" + url "https://savannah.nongnu.org/download/atool/atool-0.39.0.tar.gz" + sha256 "aaf60095884abb872e25f8e919a8a63d0dabaeca46faeba87d12812d6efc703b" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/atool/" + regex(/href=.*?atool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "7bdc1cec48daaf7c140aa3ebb5e32ea863e560947ff2ed110339f84bdcea25c4" + end + + def install + # Build an `:all` bottle. + files = %w[ChangeLog README] + files.each { |file| rm buildpath/file } + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + touch "example.txt" + touch "example2.txt" + system bin/"apack", "test.tar.gz", "example.txt", "example2.txt" + + output = shell_output("#{bin}/als test.tar.gz") + assert_match "example.txt", output + assert_match "example2.txt", output + end +end diff --git a/Formula/a/atop.rb b/Formula/a/atop.rb new file mode 100644 index 0000000000000..fd65a960c78ad --- /dev/null +++ b/Formula/a/atop.rb @@ -0,0 +1,42 @@ +class Atop < Formula + desc "Advanced system and process monitor for Linux using process events" + homepage "https://www.atoptool.nl" + url "https://github.com/Atoptool/atop/archive/refs/tags/v2.12.1.tar.gz" + sha256 "0f49f3aa5e3449f8c1cf10ac08036e2b67887640fe7980b8bc6ca9fd84d46fdf" + license "GPL-2.0-or-later" + head "https://github.com/Atoptool/atop.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "5f581fbfafeb966617a05c78b80229de58345210b34b21775324cb7bd4555dbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07279f97d6dbaa37555fdc2ef63686834132d85f12a975515fc7df0538734450" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on :linux + depends_on "ncurses" + depends_on "zlib" + + def install + inreplace "version.h", /"$/, "-#{Utils.git_short_head}\"", global: false if build.head? + # As this project does not use configure, we have to configure manually: + ENV["BINPATH"] = bin.to_s + ENV["SBINPATH"] = bin.to_s + ENV["MAN1PATH"] = man1.to_s + ENV["MAN5PATH"] = man5.to_s + ENV["MAN8PATH"] = man8.to_s + ENV["DEFPATH"] = "prev" + ENV["LOGPATH"] = "prev" + # It would try to install some files suid, which is not good for users: + inreplace "Makefile", "chmod", "true" + # RPM and Debian packages do not use the Makefile for users, but it ensures we forget nothing: + system "make", "-e", "genericinstall" + end + + test do + assert_match "Version:", shell_output("#{bin}/atop -V") + system bin/"atop", "1", "1" + system bin/"atop", "-w", "atop.raw", "1", "1" + system bin/"atop", "-r", "atop.raw", "-PCPU,DSK" + end +end diff --git a/Formula/a/ats2-postiats.rb b/Formula/a/ats2-postiats.rb new file mode 100644 index 0000000000000..4706b89bedc82 --- /dev/null +++ b/Formula/a/ats2-postiats.rb @@ -0,0 +1,50 @@ +class Ats2Postiats < Formula + desc "Programming language with formal specification features" + homepage "https://www.cs.bu.edu/~hwxi/atslangweb/" + url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.4.2/ATS2-Postiats-0.4.2.tgz" + sha256 "51b8e75e62321f5e3e97d7996d605c46a90c6721b568b9b52fe00c19944134d3" + license "GPL-3.0-only" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/ATS2-Postiats[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d971aa331b5bb0f2efb3e34658fbc4fdf590dbfaffc3c257f4c16ac177ff6821" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32296b820ff276f1de0eed59460f9dd48ca47132a77fdee78ee19fed9ba46923" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53cc8a637f0375080c8071792bef06c870579bab915aa44f7525ae580e9fd8f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "edc96757ad3e2248e4d87f904edeb0af670f07989406e0f5a4ae5e9e342ef959" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bd07b22230211e0dd486209ccf7e4e370ae0f23cd651b57ad53ecd897143affd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9e1df17625267408944c93dc245b69d4d9fbbc94a2c61352d4ec1a23a88168e0" + sha256 cellar: :any_skip_relocation, sonoma: "8237ef66fb0b9a07269662b74692cab6553440ed113d2b40fd1f304915b60711" + sha256 cellar: :any_skip_relocation, ventura: "fb64d3578989ac866fbe0aa59cb22626abaa518dd0f82c196a1378b8983fd6cf" + sha256 cellar: :any_skip_relocation, monterey: "ea6fbabe5daedb333244e591027f092c335a08ca202863df9ea045f36d983661" + sha256 cellar: :any_skip_relocation, big_sur: "747125c30964abb7ad33c827104ca58fdacbba8010f19e3cbf9c0590d3b95734" + sha256 cellar: :any_skip_relocation, catalina: "c6906922f37376e8edc668995c8cbbf965f0da4faa63940388f26bd3d0a455af" + sha256 cellar: :any_skip_relocation, arm64_linux: "03245b8efbf85b96591b28ec06ca32b8c7da1b5dcdb8bf32c62dda500b98e5f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a8f6e305de82f8adcdd01b2533de14fe9d9209d3cf9f0253ec64e5088dcc155" + end + + depends_on "gmp" + + def install + ENV.deparallelize + system "./configure", "--prefix=#{prefix}" + # -Wno-implicit-function-declaration is added to fix compilation with newer Clang + system "make", "all", "install", "CFLAGS=-I. -I./ccomp/runtime -Wno-implicit-function-declaration" + end + + test do + (testpath/"hello.dats").write <<~EOS + val _ = print ("Hello, world!\n") + implement main0 () = () + EOS + + system bin/"patscc", "hello.dats", "-o", "hello" + assert_match "Hello, world!", shell_output(testpath/"hello") + end +end diff --git a/Formula/a/attempt-cli.rb b/Formula/a/attempt-cli.rb new file mode 100644 index 0000000000000..05ab7aa2a4276 --- /dev/null +++ b/Formula/a/attempt-cli.rb @@ -0,0 +1,30 @@ +class AttemptCli < Formula + desc "CLI for retrying fallible commands" + homepage "https://github.com/MaxBondABE/attempt" + url "https://github.com/MaxBondABE/attempt/archive/refs/tags/v1.1.0.tar.gz" + sha256 "59a5a250de15ec14802eec19b6c63de975ccb72d2f205f1402bef94cf30b2f10" + license "Unlicense" + head "https://github.com/MaxBondABE/attempt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f3d246f8da65165d17c588dc3bf1231532e0c8c666fc2f5bac8493c9a6911f6b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6affd2438d988a8bf47fa4991d1df98c07b0e7e92940de0b69f8d5816269432" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b946258b9c500cb93ed7609477acf244e29c94dc90e6454e250407e912588f49" + sha256 cellar: :any_skip_relocation, sonoma: "e2830afa1aae71e0dd566895e9ee24a87831d1cb175e60a157493392c9348cc6" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b19f8b44ec04231ef3b8bca972cf63df75b6ab4525c9657a350d81dc5b00751" + sha256 cellar: :any_skip_relocation, x86_64_linux: "405051516520cdea32998076289c1331800da5dbd81e7d16fb8d067cb6f97a56" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/attempt --version") + + output = shell_output("#{bin}/attempt fixed -a 1 -m 0s -- sh -c 'echo ok'") + assert_match "ok", output + end +end diff --git a/Formula/a/attr.rb b/Formula/a/attr.rb new file mode 100644 index 0000000000000..6a95b085a879a --- /dev/null +++ b/Formula/a/attr.rb @@ -0,0 +1,36 @@ +class Attr < Formula + desc "Manipulate filesystem extended attributes" + homepage "https://savannah.nongnu.org/projects/attr" + url "https://download.savannah.nongnu.org/releases/attr/attr-2.5.2.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/nongnu/attr/attr-2.5.2.tar.gz" + sha256 "39bf67452fa41d0948c2197601053f48b3d78a029389734332a6309a680c6c87" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.nongnu.org/releases/attr/" + regex(/href=.*?attr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_linux: "6d22ffeb1ac124b47032e96cfc44264b228f3fcabe9746a426e46a5f7db45c3a" + sha256 x86_64_linux: "80c103ddb53c169071d3995ac74c7e4cca59aeed6bea4e5444eac1026d380528" + end + + depends_on :linux + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.txt").write("Hello World!\n") + output = pipe_output("#{bin}/attr -s name test.txt", "", 0) + assert_match 'Attribute "name" set to a 0 byte value for test.txt', output + output = shell_output("#{bin}/attr -l test.txt") + assert_match 'Attribute "name" has a 0 byte value for test.txt', output + end +end diff --git a/Formula/a/atuin.rb b/Formula/a/atuin.rb new file mode 100644 index 0000000000000..02d221893695b --- /dev/null +++ b/Formula/a/atuin.rb @@ -0,0 +1,39 @@ +class Atuin < Formula + desc "Improved shell history for zsh, bash, fish and nushell" + homepage "https://atuin.sh/" + url "https://github.com/atuinsh/atuin/archive/refs/tags/v18.10.0.tar.gz" + sha256 "02228929976142f63b4464a35b8b29b29155e1814cf03e99c95381954c5d9e37" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "235d017cc3111495c86fbc1d312474ac34bef3b437f87d06f863e0c9958be678" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1bd0573a397e6971a1425c76bf1704e32aa1236d573c0fe0af9ad864cd153aad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2291c61ea446650b01fa0ea5015f5d8b2552735fdba7613d032cfdde341e7078" + sha256 cellar: :any_skip_relocation, sonoma: "be9b90ff44ced78f53e2365435c0f168d4aa2218b8da2146c4354a5049a9905e" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1f59232ac04c3d7be883f9d65f7100a2209fca0a5e7b99206a24b2aa949a54b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82a016cbd0456b8af46f94f87e6e4ff178e5143363d4fb02958a83b110b8fbdd" + end + + depends_on "protobuf" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/atuin") + + generate_completions_from_executable(bin/"atuin", "gen-completion", "--shell") + end + + service do + run [opt_bin/"atuin", "daemon"] + keep_alive true + log_path var/"log/atuin.log" + error_log_path var/"log/atuin.log" + end + + test do + # or `atuin init zsh` to setup the `ATUIN_SESSION` + ENV["ATUIN_SESSION"] = "random" + assert_match "autoload -U add-zsh-hook", shell_output("#{bin}/atuin init zsh") + assert shell_output("#{bin}/atuin history list").blank? + end +end diff --git a/Formula/a/aubio.rb b/Formula/a/aubio.rb new file mode 100644 index 0000000000000..38dd2687e16b8 --- /dev/null +++ b/Formula/a/aubio.rb @@ -0,0 +1,82 @@ +class Aubio < Formula + desc "Extract annotations from audio signals" + homepage "https://github.com/aubio/aubio" + url "https://sources.buildroot.net/aubio/aubio-0.4.9.tar.bz2" + sha256 "d48282ae4dab83b3dc94c16cf011bcb63835c1c02b515490e1883049c3d1f3da" + license "GPL-3.0-or-later" + revision 4 + + livecheck do + url "https://aubio.org/pub/" + regex(/href=.*?aubio[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "54adb27d46e507c9fa6dd57b9da19b11fc435dc706d1a79a2835e83137813a05" + sha256 arm64_sequoia: "c428580f0615808cafca003cc2596a913162586af33f5fd1235b274b413c3ed4" + sha256 arm64_sonoma: "979cea612bed708e02710af48d438df7f48a28ed502fb714d023182c24caf43c" + sha256 sonoma: "9200348f9f11f4149f91d7163e79f141f9bb7d2271a6af5398dc38ceadfd6ebd" + sha256 arm64_linux: "d98aea68e9a3677405a41ff89820d6ee76b5fb6fa7f02d964846c7b674756d06" + sha256 x86_64_linux: "be4fcc0b0a52320a3787a70cf2ba81bb1ba0e374921c7be49a96e0dc92d07feb" + end + + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "libsndfile" + depends_on "numpy" + depends_on "python@3.14" + + # Fix build with Python 3.12 using Fedora patch. Failure is due to old waf 2.0.14. + # Remove on next release as HEAD has newer waf. + patch do + url "https://src.fedoraproject.org/rpms/aubio/raw/29fb7e383b5465f4704b1cdc7db27df716e1b45c/f/aubio-python39.patch" + sha256 "2f9cb8913b1c4840588df2f437f702c329b4de4e46eff4dcf68aff4b5024a358" + end + patch do + url "https://src.fedoraproject.org/rpms/aubio/raw/454ac411d2af0ebcf63cdb1bacd8f229817c27c9/f/aubio-imp-removed.patch" + sha256 "0ff5cbb3cdcebbced7432366c3eb0f742db48e864b48bf845c0d3240136c5cdb" + end + + def python3 + "python3.14" + end + + def install + # Work-around for build issue with Xcode 15.3: https://github.com/aubio/aubio/issues/402 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system python3, "./waf", "configure", "--prefix=#{prefix}" + system python3, "./waf", "build" + system python3, "./waf", "install" + + system python3, "-m", "pip", "install", *std_pip_args, "." + end + + test do + resource "homebrew-aiff" do + url "https://archive.org/download/TestAifAiffFile/02DayIsDone.aif" + sha256 "bca81e8d13f3f6526cd54110ec1196afd5bda6c93b16a7ba5023e474901e050d" + end + + testpath.install resource("homebrew-aiff") + system bin/"aubiocut", "--verbose", "02DayIsDone.aif" + system bin/"aubioonset", "--verbose", "02DayIsDone.aif" + + (testpath/"test.py").write <<~PYTHON + import aubio + src = aubio.source('#{testpath}/02DayIsDone.aif') + total_frames = 0 + while True: + samples, read = src() + total_frames += read + if read < src.hop_size: + break + print(total_frames) + PYTHON + assert_equal "8680056", shell_output("#{python3} test.py").chomp + end +end diff --git a/Formula/a/audacious.rb b/Formula/a/audacious.rb new file mode 100644 index 0000000000000..58aa788a45412 --- /dev/null +++ b/Formula/a/audacious.rb @@ -0,0 +1,126 @@ +class Audacious < Formula + desc "Lightweight and versatile audio player" + homepage "https://audacious-media-player.org/" + license "BSD-2-Clause" + + stable do + url "https://distfiles.audacious-media-player.org/audacious-4.5.1.tar.bz2" + sha256 "7194743a0a41b1d8f582c071488b77f7b917be47ca5e142dd76af5d81d36f9cd" + + resource "plugins" do + url "https://distfiles.audacious-media-player.org/audacious-plugins-4.5.1.tar.bz2" + sha256 "f4feedc32776acfa9d24701d3b794fc97822f76da6991e91e627e70e561fdd3b" + + livecheck do + formula :parent + end + end + end + + livecheck do + url "https://audacious-media-player.org/download" + regex(/href=.*?audacious[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "3b829640b0cc7b22b0f282e8ab130fd6bbc5848f5d0eb2bd55c33b6274560000" + sha256 arm64_sequoia: "af302255ecb85db566402b0df1eb92965dfbb6464899cd0bac235dae93f8db95" + sha256 arm64_sonoma: "777753090239d0c200cf857435d144df7575fa8988a6784f10c3693fade8a9ab" + sha256 sonoma: "b62ee7187df43d86850bd74b6a6a2b8491250c998c27e9ba59d86178b26242e4" + sha256 arm64_linux: "c9c7ccf5630491e3f2d5e4a3b825eefa7bbc59646f7a491c7bd4c3542fc22597" + sha256 x86_64_linux: "56afb109a127599f5a9e6a2bcbbb1717f1796ccf3ab83a1dfba66aa4e1de3c54" + end + + head do + url "https://github.com/audacious-media-player/audacious.git", branch: "master" + + resource "plugins" do + url "https://github.com/audacious-media-player/audacious-plugins.git", branch: "master" + end + end + + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "qttools" => :build + depends_on "faad2" + depends_on "ffmpeg" + depends_on "flac" + depends_on "fluid-synth" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "lame" + depends_on "libbs2b" + depends_on "libcue" + depends_on "libmodplug" + depends_on "libnotify" + depends_on "libogg" + depends_on "libopenmpt" + depends_on "libsamplerate" + depends_on "libsidplayfp" + depends_on "libsndfile" + depends_on "libsoxr" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "neon" + depends_on "opusfile" + depends_on "qtbase" + depends_on "qtimageformats" => :no_linkage # for webp album covers + depends_on "qtmultimedia" + depends_on "qtsvg" => :no_linkage # for svg icons + depends_on "sdl2" + depends_on "wavpack" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "alsa-lib" + depends_on "jack" + depends_on "libx11" + depends_on "libxml2" + depends_on "pulseaudio" + end + + def install + odie "plugins resource needs to be updated" if build.stable? && version != resource("plugins").version + + args = %w[ + -Dgtk=false + ] + + system "meson", "setup", "build", "-Ddbus=false", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + resource("plugins").stage do + args += %w[ + -Dmpris2=false + -Dmac-media-keys=true + ] + + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + end + + def caveats + <<~EOS + audtool does not work due to a broken dbus implementation on macOS, so it is not built. + GTK+ GUI is not built by default as the Qt GUI has better integration with macOS, + and the GTK GUI would take precedence if present. + EOS + end + + test do + system bin/"audacious", "--help" + end +end diff --git a/Formula/a/audiowaveform.rb b/Formula/a/audiowaveform.rb new file mode 100644 index 0000000000000..9896af7caeb36 --- /dev/null +++ b/Formula/a/audiowaveform.rb @@ -0,0 +1,36 @@ +class Audiowaveform < Formula + desc "Generate waveform data and render waveform images from audio files" + homepage "https://codeberg.org/chrisn/audiowaveform" + url "https://codeberg.org/chrisn/audiowaveform/archive/1.10.3.tar.gz" + sha256 "f33680a4c74a718648ee0567511537ad80e015fb3bf5c8440a8176414afb415a" + license "GPL-3.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "40d9bf787e5f7813ed51079d59716a7f88c6cd2c0076dc04b5838bf0d769536d" + sha256 cellar: :any, arm64_sequoia: "0847aa9b5ae424d084e9ca3b8d00e703d1935237fe107ac87495ddf3301e360c" + sha256 cellar: :any, arm64_sonoma: "0edef92eb11576b39b7b4684c5c853a6e3e42b3784870d1e57406256c8baa110" + sha256 cellar: :any, sonoma: "93f324ec4b218cda6afb1459b53efe02d5a1887a1494831b89bcb753749ed752" + sha256 cellar: :any_skip_relocation, arm64_linux: "5832d40c71610ac220ad80dc716d252108916ad7f2b421f147d185c94ff7e7e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5be140b85eb627cbb179bfc6252d6af35f80dd9972b67426687af659e88a8996" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "gd" + depends_on "libid3tag" + depends_on "libsndfile" + depends_on "mad" + + def install + cmake_args = %w[-DENABLE_TESTS=OFF] + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"audiowaveform", "-i", test_fixtures("test.wav"), "-o", "test_file_stereo.png" + assert_path_exists testpath/"test_file_stereo.png" + end +end diff --git a/Formula/a/auditbeat.rb b/Formula/a/auditbeat.rb new file mode 100644 index 0000000000000..f5fd8815c1348 --- /dev/null +++ b/Formula/a/auditbeat.rb @@ -0,0 +1,91 @@ +class Auditbeat < Formula + desc "Lightweight Shipper for Audit Data" + homepage "https://www.elastic.co/beats/auditbeat" + url "https://github.com/elastic/beats.git", + tag: "v9.2.0", + revision: "09b547febe1cc9102a5d3f80ac8fbf68a5fd84f5" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6b2fafed05833ea42722d60c262a6755b22523afa920fd6ead2d96be81389bef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e5ea86246f9ec52415988119a5eecc0f78e657810a98117e86c14ed9df7d3a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0932246f302db9db76b9200f23afddb835fd5b27823014c4d2b740bfd15ac58" + sha256 cellar: :any_skip_relocation, sonoma: "1c20ab9909da21f16762dbc184e7f73aedbeaeed1df098726183bd5586fab290" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3e0784ace272933f1eb971b9e128556c55d06fb363bc24e9efc0f4cd6ea5de8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48c228f216bd1cda178b16237fbf04e0e96c81d96fa7206586a3bb79b5ffc63c" + end + + depends_on "go" => :build + depends_on "mage" => :build + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + # remove non open source files + rm_r("x-pack") + + cd "auditbeat" do + # don't build docs because it would fail creating the combined OSS/x-pack + # docs and we aren't installing them anyway + inreplace "magefile.go", "devtools.GenerateModuleIncludeListGo, Docs)", + "devtools.GenerateModuleIncludeListGo)" + + system "mage", "-v", "build" + system "mage", "-v", "update" + + pkgetc.install Dir["auditbeat.*", "fields.yml"] + (libexec/"bin").install "auditbeat" + prefix.install "build/kibana" + end + + (bin/"auditbeat").write <<~SHELL + #!/bin/sh + exec #{libexec}/bin/auditbeat \ + --path.config #{etc}/auditbeat \ + --path.data #{var}/lib/auditbeat \ + --path.home #{prefix} \ + --path.logs #{var}/log/auditbeat \ + "$@" + SHELL + + chmod 0555, bin/"auditbeat" + generate_completions_from_executable(bin/"auditbeat", "completion", shells: [:bash, :zsh]) + end + + def post_install + (var/"lib/auditbeat").mkpath + (var/"log/auditbeat").mkpath + end + + service do + run opt_bin/"auditbeat" + end + + test do + (testpath/"files").mkpath + (testpath/"config/auditbeat.yml").write <<~YAML + auditbeat.modules: + - module: file_integrity + paths: + - #{testpath}/files + output.file: + path: "#{testpath}/auditbeat" + filename: auditbeat + YAML + + pid = spawn bin/"auditbeat", "--path.config", testpath/"config", "--path.data", testpath/"data" + sleep 5 + touch testpath/"files/touch" + sleep 10 + sleep 20 if OS.mac? && Hardware::CPU.intel? + + assert_path_exists testpath/"data/beat.db" + + output = JSON.parse((testpath/"data/meta.json").read) + assert_includes output, "first_start" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/a/auditwheel.rb b/Formula/a/auditwheel.rb new file mode 100644 index 0000000000000..275d971be744b --- /dev/null +++ b/Formula/a/auditwheel.rb @@ -0,0 +1,55 @@ +class Auditwheel < Formula + include Language::Python::Virtualenv + + desc "Auditing and relabeling cross-distribution Linux wheels" + homepage "https://github.com/pypa/auditwheel" + url "https://files.pythonhosted.org/packages/0c/88/6b61d2a4e5bc05c65cddb9040891ee34fd145b8a46202a1bfcbb76bcd512/auditwheel-6.5.0.tar.gz" + sha256 "4fbcbd5854054bb1dd7870db03727b871b96b18147db57259561c058603987d7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5b4fcb7168508ee96266b8536a21e93a127b18960c6f6f7549a55e0f1630d5a8" + end + + depends_on :linux + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/b9/ab/33968940b2deb3d92f5b146bc6d4009a5f95d1d06c148ea2f9ee965071af/pyelftools-0.32.tar.gz" + sha256 "6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/auditwheel -V") + + if Hardware::CPU.intel? + resource "homebrew-test-wheel" do + url "https://files.pythonhosted.org/packages/f1/47/d7145bf2dc04684935d57d67dff9d6d795b2ba2796806bb109864be3a151/cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl" + sha256 "72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9" + end + platform_tag = "musllinux_1_2_x86_64" + wheel_file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl" + else + resource "homebrew-test-wheel" do + url "https://files.pythonhosted.org/packages/5f/e4/fb8b3dd8dc0e98edf1135ff067ae070bb32ef9d509d6cb0f538cd6f7483f/cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl" + sha256 "3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed" + end + platform_tag = "musllinux_1_2_aarch64" + wheel_file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl" + end + + resource("homebrew-test-wheel").stage testpath + + output = shell_output("#{bin}/auditwheel show #{wheel_file}") + assert_match "is consistent with\nthe following platform tag: \"#{platform_tag}\"", output + end +end diff --git a/Formula/a/augeas.rb b/Formula/a/augeas.rb new file mode 100644 index 0000000000000..3a177b85e890e --- /dev/null +++ b/Formula/a/augeas.rb @@ -0,0 +1,96 @@ +class Augeas < Formula + desc "Configuration editing tool and API" + homepage "https://augeas.net/" + license "LGPL-2.1-or-later" + + stable do + url "https://github.com/hercules-team/augeas/releases/download/release-1.14.1/augeas-1.14.1.tar.gz" + sha256 "368bfdd782e4b9c7163baadd621359c82b162734864b667051ff6bcb57b9edff" + + # Fixes `implicit-function-declaration` error + # Remove when merged and released + patch do + url "https://github.com/hercules-team/augeas/commit/26d297825000dd2cdc45d0fa6bf68dcc14b08d7d.patch?full_index=1" + sha256 "6bed3c3201eabb1849cbc729d42e33a3692069a06d298ce3f4a8bce7cdbf9f0e" + end + end + + livecheck do + url :stable + regex(/\D*?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "22a645d56e63c0d75b634e795b25862ea9b9ba1572d1614060a4784c0bb112c6" + sha256 arm64_sequoia: "235513308423f52fd6d049cf16b5e0c31b0862bce0d8aa6afb11ce2e8208020a" + sha256 arm64_sonoma: "72892294927f45da15836ea628404d5ea93597344d93dfe1ba3889dc9c1daf68" + sha256 arm64_ventura: "9d42d73d125f3aa9e859ecf4e0029b9e0e4a9354b166d7d7d96e4753bf99348c" + sha256 arm64_monterey: "6ce2ccf218f4ac51eae364b50a74eae014820ddb0e2073700da3e8b3b58735e3" + sha256 sonoma: "8a2fe89ec726bcc30aeb669014f3a22dee5f5d649cd35f32839fb41f01ac1e10" + sha256 ventura: "9ecddaf5c923d43477fcd22de3949bf85bdadd5c69c424af840e7e636ecd47de" + sha256 monterey: "39ec06ee5c541c591d89ed0770a9b6de354f4df19413217d70eecf272e4662b2" + sha256 arm64_linux: "ba1db64d2aeb385be8c6b34cae38571d0c05693ce273115b0e88a8352a801aba" + sha256 x86_64_linux: "b42ec1edf00ea7a66acff5ea7286a68b5bbbfa49442a3ab818f8c6c13eafdb32" + end + + head do + url "https://github.com/hercules-team/augeas.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "readline" + + uses_from_macos "libxml2" + + def install + ENV.append "LDFLAGS", "-L#{Formula["readline"].opt_lib}" + + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + Lenses have been installed to: + #{HOMEBREW_PREFIX}/share/augeas/lenses/dist + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/augtool --version 2>&1") + + (testpath/"etc/hosts").write <<~EOS + 192.168.0.1 brew.sh test + EOS + + expected_augtool_output = <<~EOS + /files/etc/hosts/1 + /files/etc/hosts/1/ipaddr = "192.168.0.1" + /files/etc/hosts/1/canonical = "brew.sh" + /files/etc/hosts/1/alias = "test" + EOS + assert_equal expected_augtool_output, + shell_output("#{bin}/augtool --root #{testpath} 'print /files/etc/hosts/1'") + + expected_augprint_output = <<~EOS + setm /augeas/load/*[incl='/etc/hosts' and label() != 'hosts']/excl '/etc/hosts' + transform hosts incl /etc/hosts + load-file /etc/hosts + set /files/etc/hosts/seq::*[ipaddr='192.168.0.1']/ipaddr '192.168.0.1' + set /files/etc/hosts/seq::*[ipaddr='192.168.0.1']/canonical 'brew.sh' + set /files/etc/hosts/seq::*[ipaddr='192.168.0.1']/alias 'test' + EOS + assert_equal expected_augprint_output, + shell_output("#{bin}/augprint --lens=hosts --target=/etc/hosts #{testpath}/etc/hosts") + end +end diff --git a/Formula/a/augustus.rb b/Formula/a/augustus.rb new file mode 100644 index 0000000000000..096d50d18ae21 --- /dev/null +++ b/Formula/a/augustus.rb @@ -0,0 +1,63 @@ +class Augustus < Formula + desc "Predict genes in eukaryotic genomic sequences" + homepage "https://bioinf.uni-greifswald.de/augustus/" + url "https://github.com/Gaius-Augustus/Augustus/archive/refs/tags/v3.5.0.tar.gz" + sha256 "5ed6ce6106303b800c5e91d37a250baff43b20824657b853ae04d11ad8bdd686" + license "Artistic-1.0" + revision 11 + head "https://github.com/Gaius-Augustus/Augustus.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "41678b162c8b7a007c3cb62cbe8602a936809ff80dfa32eecf32e3d2f4c14dea" + sha256 cellar: :any, arm64_sequoia: "06f498925823cbdedaf60204cf457f802100a392fa33e528c3b6d1997a01d5d8" + sha256 cellar: :any, arm64_sonoma: "400c79fab02d6b771cd3f56b416cedf97a478067275cefba4b6c00862702a68a" + sha256 cellar: :any, arm64_ventura: "d0a38630e0aca7c3b35d567e92b5cb88cb21866f0e7a09301eaeeb214e83dc8c" + sha256 cellar: :any, sonoma: "890855e13b04f2e5344f40e3cafa211b734a115bb1a9e20c7bf990c4c3aa5e42" + sha256 cellar: :any, ventura: "459888204f0f0a84e2d52ab6d9fe7e432803a9727b8ad83819862ff47c482fef" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf1ce53da5b7c605ef7ccf68be9b7f1445fb952523c9dd26e28dbf69877c1d7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80b5d3640841e47c9ae79dc92b1521931d9e9c4b74525b16fb985e4d5cf5650d" + end + + depends_on "bamtools" + depends_on "boost" + depends_on "htslib" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + def install + # Compile executables for macOS. Tarball ships with executables for Linux. + system "make", "clean" + + ENV.append "CXXFLAGS", "-std=c++14" + + system "make", "COMPGENEPRED=false", + "INCLUDE_PATH_BAMTOOLS=-I#{Formula["bamtools"].opt_include}/bamtools", + "LIBRARY_PATH_BAMTOOLS=-L#{Formula["bamtools"].opt_lib}", + "INCLUDE_PATH_HTSLIB=-I#{Formula["htslib"].opt_include}/htslib", + "LIBRARY_PATH_HTSLIB=-L#{Formula["htslib"].opt_lib}" + + # Set PREFIX to prevent symlinking into /usr/local/bin/ + (buildpath/"tmp/bin").mkpath + system "make", "install", "INSTALLDIR=#{prefix}", "PREFIX=#{buildpath}/tmp" + + bin.env_script_all_files libexec/"bin", AUGUSTUS_CONFIG_PATH: prefix/"config" + pkgshare.install "examples" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + cmd = "#{bin}/augustus --species=human test.fasta" + assert_match "Predicted genes", shell_output(cmd) + + cp pkgshare/"examples/example.fa", testpath + cp pkgshare/"examples/profile/HsDHC.prfl", testpath + cmd = "#{bin}/augustus --species=human --proteinprofile=HsDHC.prfl example.fa 2> /dev/null" + assert_match "HS04636 AUGUSTUS gene 966 6903 1 + . g1", shell_output(cmd) + end +end diff --git a/Formula/a/aurora.rb b/Formula/a/aurora.rb new file mode 100644 index 0000000000000..959f20eed1847 --- /dev/null +++ b/Formula/a/aurora.rb @@ -0,0 +1,37 @@ +class Aurora < Formula + desc "Beanstalkd queue server console" + homepage "https://xuri.me/aurora/" + url "https://github.com/xuri/aurora/archive/refs/tags/2.2.tar.gz" + sha256 "90ac08b7c960aa24ee0c8e60759e398ef205f5b48c2293dd81d9c2f17b24ca42" + license "MIT" + head "https://github.com/xuri/aurora.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d851326e81898d1d2e48168b6bfdfaa7a9073361543e2fca53be0d0bb28a27ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4cb522a01c06cf788476d58b83b367c4c753f7fc6ced76b18881586eefd8c188" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e21aa44a64a8a48a4a0ac332f5069076fcfe8f3bd29a9ae9a2c5a6c6ab966cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f466ea097843bef81d5d4ad254e51d06bc2cc33be76f7fcb900a65e6a513fe3a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5187558579ceb4884f08f91855d393bb0f0b79b7ac5a4ff1abc1cdc43a780006" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "798b63da7188da92582ffde96fed8f3407add006f2db88a610cb4aacda1c5b89" + sha256 cellar: :any_skip_relocation, sonoma: "6069583d481b3409513c421031a0f57ec2cc32f0c312f65043630e477d683e99" + sha256 cellar: :any_skip_relocation, ventura: "93ceeb44e164b13e4c6c4711a3ddaee49451691bf7e19fc0f49de1ad47d453c5" + sha256 cellar: :any_skip_relocation, monterey: "fc1e371ec7afa848b85dd45424209ed1d9da85985e9cf5cc21a6ae46071847bf" + sha256 cellar: :any_skip_relocation, big_sur: "714b7116c80107b6ffb0f5b8abba41ae5aa88708fe688e61144ca3a636b7fc4f" + sha256 cellar: :any_skip_relocation, catalina: "f3b45006b5b5c6f15166d11d1a740fb14f3b22c1d64b3b64397ed2958e9c882d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8077df23766d9926fc9b8948ce0ea1861465dad40c42a3f7576a0599ce5f08b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c045ae045444b0e5f6ad993b2d30697908b1925132ea47fe2d25b46e729a760c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/aurora -v") + end +end diff --git a/Formula/a/austin.rb b/Formula/a/austin.rb new file mode 100644 index 0000000000000..640c1fc3f6f70 --- /dev/null +++ b/Formula/a/austin.rb @@ -0,0 +1,40 @@ +class Austin < Formula + desc "Python frame stack sampler for CPython" + homepage "https://github.com/P403n1x87/austin" + url "https://github.com/P403n1x87/austin/archive/refs/tags/v4.0.0.tar.gz" + sha256 "1a857d4590092cd8f7fc110cd83c31311dde03113a5dc4cb93c4eb31e5c8f884" + license "GPL-3.0-or-later" + head "https://github.com/P403n1x87/austin.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "da1ec3babb470a9b8e4f12b70ece43a4d0d00b5de8663477bfb88d5a10544b14" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d44ca3dd16c310c1aa9b06039ce4a3e660e9f6599d8f21ddfcc1ef0f0d93a3b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2bb32d8e6f61cbb427fa68b9ba33e3028581dff7cba144686522f3fae9f6a429" + sha256 cellar: :any_skip_relocation, sonoma: "ff93fdbf6c416993ffc4e25f03c56ccc9a832d8d06fb6bda5a4142ff41083b0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "29c1aee7c3027fa88156dfbe09656e9a577f0c38f145ce3b40fe1daafc93a474" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8881075b254897ac5c175df033cf18c4e3c9be2c8f7da9c089ff51f829121833" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "python" => :test + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + man1.install "src/austin.1" + end + + test do + command = "#{bin}/austin -o samples.mojo -i 1ms python3 -c 'from time import sleep; sleep(1)' 2>&1" + if OS.mac? + assert_match "Insufficient permissions. Austin requires the use of sudo", shell_output(command, 2) + else + assert_match "Sampling Statistics", shell_output(command) + end + assert_equal "austin #{version}", shell_output("#{bin}/austin --version").chomp + end +end diff --git a/Formula/a/authoscope.rb b/Formula/a/authoscope.rb new file mode 100644 index 0000000000000..10cc0cd27f1cc --- /dev/null +++ b/Formula/a/authoscope.rb @@ -0,0 +1,53 @@ +class Authoscope < Formula + desc "Scriptable network authentication cracker" + homepage "https://github.com/kpcyrd/authoscope" + url "https://github.com/kpcyrd/authoscope/archive/refs/tags/v0.8.1.tar.gz" + sha256 "fd70d3d86421ac791362bf8d1063a1d5cd4f5410b0b8f5871c42cb48c8cc411a" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cefec3d1e50d1459bfb64456662e7ba2037959207912ed9beaf9f59d94f0f870" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd181040954b9cb22040c9bbd7ba32fa2a22814968046bedac1da48eede489a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1c4c2802d4bf6e2d26ddea931e096a4ccc2bb3da7d8a43950853cd299bbb046" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6c02326d8bba708c177e946f59b3074609f27eb0250e74f52760a39360aff7c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c51d402bcb2a79225d442a5d291c1eb15d6899c0088704bf2ee7c919c2ade0e7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "751047e5d1259f529ffb995c0199724dccb34a7892418e2ebd9fd9c60f16270c" + sha256 cellar: :any_skip_relocation, sonoma: "d5f85fee01c0fd4966106bb442d4faf1ba971b3ea42f30e99abd71ea3bc038c5" + sha256 cellar: :any_skip_relocation, ventura: "2bd8ef5edf11158e2db3f871e13c683654ae7137ca6384576f25bb6dc3014994" + sha256 cellar: :any_skip_relocation, monterey: "cd8c5b3960c3474bc2ba1b404116d2e682ae733d699b87c41cc38cd95b5074b7" + sha256 cellar: :any_skip_relocation, big_sur: "4e866a906027911bc7f543db28c38cb1ae952f30e51beab743e0b3243f1070ab" + sha256 cellar: :any_skip_relocation, catalina: "977e84fb35259cfc01b4ba789bdf86270675c031bbc9b289034bd9974ca9d9b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca1513fa96596e1ee02e4577e921369b8d689ee3e0a18fad5776d80ce68988f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cf7f5e3bc8dbe57cc22cd6bbdd5b62a7c69c54e1da1cc6ea7e1e19b0166c413" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + def install + system "cargo", "install", *std_cargo_args + man1.install "docs/authoscope.1" + + generate_completions_from_executable(bin/"authoscope", "completions") + end + + test do + (testpath/"true.lua").write <<~LUA + descr = "always true" + + function verify(user, password) + return true + end + LUA + system bin/"authoscope", "run", "-vvx", testpath/"true.lua", "foo" + end +end diff --git a/Formula/a/authz0.rb b/Formula/a/authz0.rb new file mode 100644 index 0000000000000..7a7620fc1fbdb --- /dev/null +++ b/Formula/a/authz0.rb @@ -0,0 +1,39 @@ +class Authz0 < Formula + desc "Automated authorization test tool" + homepage "https://authz0.hahwul.com/" + url "https://github.com/hahwul/authz0/archive/refs/tags/v1.1.2.tar.gz" + sha256 "b62d61846f3c1559dbffb6707f943ad6c4a5d4d519119b3c21954b8cd2a11a16" + license "MIT" + head "https://github.com/hahwul/authz0.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "07856f2310d354f1c7d363a2a7d1cfd3a1f1c5ca906934b57f33055b6c5633f9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "76f92010b14aae9dae0ead727ef643ce0b0edc8a5361530ffdfd549b9895e2ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14381da4ed533631835222d21cd916381953a087c3b1335bb4d30a8c26acd382" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b2a469a36c22f19b0ecc5ee81c8aae79cdd1f826a6ee917865666b7f004ab3a0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "68a16964db28dc0169285a3a7dc06c19544ec0f53fcc83396d7944700aea3826" + sha256 cellar: :any_skip_relocation, sonoma: "463ee39916da6ebe2df30fbf14805ea507a3c9be4881c5be47c8f538c34553d4" + sha256 cellar: :any_skip_relocation, ventura: "97e19733f1cab9bece649e12ef4ea454f05cb9596755d90901c74e7ebedcc56f" + sha256 cellar: :any_skip_relocation, monterey: "a3342b3b6def76d71b61f2a3c16cb9ce3ffed34787effd744d29de1a1277ebd1" + sha256 cellar: :any_skip_relocation, arm64_linux: "98a9bcfcd1fd8a2b5572144d3beb098e37b61fef453fdc06426a7fe4a29c5331" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c7d5364e993143029a3c66471ee76f88ed3f5e20e0094ba6aa497830b195fc6" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"authz0", "completion") + end + + test do + output = shell_output("#{bin}/authz0 new --name brewtest 2>&1") + assert_match "[INFO] [authz0.yaml]", output + assert_match "name: brewtest", (testpath/"authz0.yaml").read + + assert_match version.to_s, shell_output("#{bin}/authz0 version") + end +end diff --git a/Formula/a/autobench.rb b/Formula/a/autobench.rb new file mode 100644 index 0000000000000..3ac399f393ebb --- /dev/null +++ b/Formula/a/autobench.rb @@ -0,0 +1,49 @@ +class Autobench < Formula + desc "Automatic webserver benchmark tool" + homepage "http://www.xenoclast.org/autobench/" + url "http://www.xenoclast.org/autobench/downloads/autobench-2.1.2.tar.gz" + sha256 "d8b4d30aaaf652df37dff18ee819d8f42751bc40272d288ee2a5d847eaf0423b" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?autobench[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3647ac7b205e7a115aae29fc33d72dc21ab5465b98081711240899fdbde2c096" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e205a771a8b315d263fbfb8cac87e6cf90dec528afeb9d755908a9139a2499cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33abbf1a79c47258e22ff62a94c7d1ec19b304cce3a50780097bd65de10eac99" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1395f353dcbb83ca42019534ce574f19eabdfaf6e5fa203f9e16a5c5d199e0a0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "feb1d05812e4ccfb525567d4193b0a567498c7aefe1bdf7b9c632b3100ea3e75" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c475644370c0f887d23d5fb77b4c3e24fc31ab21366e35395a8c1214c3f91143" + sha256 cellar: :any_skip_relocation, sonoma: "162967bfd95f422dc7189ad99fd61b4f002f2f966e6ad01346aae4fd302dd4c0" + sha256 cellar: :any_skip_relocation, ventura: "ebf91a63de293b20f1f7228ea1053543ab09bb63cf381d05caf0af8dfac2a794" + sha256 cellar: :any_skip_relocation, monterey: "2cd26e697396773123b3d800a9a19e10f225b58797849a7ecbe1250969baf77c" + sha256 cellar: :any_skip_relocation, big_sur: "dde390cbcb35b87f2cf565a59e11ae4997400a37170abd9b276696460f81dbc4" + sha256 cellar: :any_skip_relocation, catalina: "02476e73b18bf8ed02b18fa66b1c90133e21ad28223f528532a427060860dbe9" + sha256 cellar: :any_skip_relocation, arm64_linux: "480b1dd43d675961961fe91a4d1f6fd39ba7a4187127d51fa177a694856f0b7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f33306a0edae89cab46f98344c30feeab7a3d9d03e1d6c21e578720c8cac794f" + end + + depends_on "httperf" + + def install + # Workaround for arm64 linux. Upstream isn't actively maintained + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + system "make", "PREFIX=#{prefix}", + "MANDIR=#{man1}", + "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "install" + end + + test do + system bin/"crfile", "-f", "#{testpath}/test", "-s", "42" + assert_path_exists testpath/"test" + assert_equal 42, File.size("test") + end +end diff --git a/Formula/a/autobrr.rb b/Formula/a/autobrr.rb new file mode 100644 index 0000000000000..8182de28f9862 --- /dev/null +++ b/Formula/a/autobrr.rb @@ -0,0 +1,67 @@ +class Autobrr < Formula + desc "Modern, easy to use download automation for torrents and usenet" + homepage "https://autobrr.com/" + url "https://github.com/autobrr/autobrr/archive/refs/tags/v1.68.0.tar.gz" + sha256 "2a3346c628ee039c0cff4159215ace6f1ae7c4524f6331a99f4f91c2c1dfa754" + license "GPL-2.0-or-later" + head "https://github.com/autobrr/autobrr.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fae0c3bf998074467d4a4dfb801ef310c6658692f2691bc669c43a1ab8c9481e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0aa2555e8976f72c7992fadea4b5453ce3eaba1b03fe9d479db0196a1ecce883" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ea434c97025e19d272b864104e06121664c75ecb0654a46bece5efb6e1d39e1" + sha256 cellar: :any_skip_relocation, sonoma: "fa2c7dd4f0dca8f72f603549771fe5f5b31e531f373eabf370c5f304a0e6982d" + sha256 cellar: :any_skip_relocation, arm64_linux: "945592c7e141f9af74053160900059a399d299331c267f05eb2c1b2bcb128d37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "170679c1ba216a4528662dae201b4c0f23bec749fa80653f846df1dc3cf65884" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "pnpm" => :build + + def install + system "pnpm", "install", "--dir", "web" + system "pnpm", "--dir", "web", "run", "build" + + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user}" + + system "go", "build", *std_go_args(output: bin/"autobrr", ldflags:), "./cmd/autobrr" + system "go", "build", *std_go_args(output: bin/"autobrrctl", ldflags:), "./cmd/autobrrctl" + end + + def post_install + (var/"autobrr").mkpath + end + + service do + run [opt_bin/"autobrr", "--config", var/"autobrr/"] + keep_alive true + log_path var/"log/autobrr.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/autobrrctl version") + + port = free_port + + (testpath/"config.toml").write <<~TOML + host = "127.0.0.1" + port = #{port} + logLevel = "INFO" + checkForUpdates = false + sessionSecret = "secret-session-key" + TOML + + pid = fork do + exec bin/"autobrr", "--config", "#{testpath}/" + end + sleep 4 + + begin + system "curl", "-s", "--fail", "http://127.0.0.1:#{port}/api/healthz/liveness" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/a/autocannon.rb b/Formula/a/autocannon.rb new file mode 100644 index 0000000000000..b3dc1a8fa9acb --- /dev/null +++ b/Formula/a/autocannon.rb @@ -0,0 +1,27 @@ +class Autocannon < Formula + desc "Fast HTTP/1.1 benchmarking tool written in Node.js" + homepage "https://github.com/mcollina/autocannon" + url "https://registry.npmjs.org/autocannon/-/autocannon-8.0.0.tgz" + sha256 "470ac762b261d8eca3d8069be8776b25fc111e4caa962bc144a85e9631fd07fa" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "802f0328259fdee67f34d0f613897abf2d1a665654a7b26fcd5dca49b053c103" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir[libexec/"bin/*"] + end + + test do + output = shell_output("#{bin}/autocannon --connection 1 --duration 1 https://brew.sh 2>&1") + assert_match "Running 1s test @ https://brew.sh", output + + assert_match version.to_s, shell_output("#{bin}/autocannon --version") + end +end diff --git a/Formula/a/autocode.rb b/Formula/a/autocode.rb new file mode 100644 index 0000000000000..d9edc108ed456 --- /dev/null +++ b/Formula/a/autocode.rb @@ -0,0 +1,47 @@ +class Autocode < Formula + desc "Code automation for every language, library and framework" + homepage "https://autocode.readme.io/" + url "https://registry.npmjs.org/autocode/-/autocode-1.3.1.tgz" + sha256 "952364766e645d4ddae30f9d6cc106fdb74d05afc4028066f75eeeb17c4b0247" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "abf59dcf5fe4c66882ff2e33b395fd733f43b831e983592b530160dd3bb94c1e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b77a0c5a2addfbdb49c0c77c50d5ef04b56462c3882588527dba9bbb81feefd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f91b10fe03c30d860728b43972b1d261bf0bcd51eaaff8bb086a7f68f69c76a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fc6e30959f70b915afd2f6808c21150f2b818d9ea2bce0990aa81a960ff185ab" + sha256 cellar: :any_skip_relocation, arm64_monterey: "829180e4ff87058eedda5560d335a3e1e35ae8ae37747e4be41cde83e505c3a7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "780c41a7ada390dbefa61b56497f4cf53f9a5db0094b38c7064f9a4c21177fff" + sha256 cellar: :any_skip_relocation, sonoma: "3dacf760cebe889c2c0bb16cf51ecd74c0ec96b51476282ae16ec96c1ef66953" + sha256 cellar: :any_skip_relocation, ventura: "70efb3eb2cd71248d2b6f239752f5e8155beab4f8cb33f9f6542aa58ac779e3a" + sha256 cellar: :any_skip_relocation, monterey: "cde7f8b32745f8ab929ace5952dafdec15cabdf92d2a96ab67ddeaad5479bee0" + sha256 cellar: :any_skip_relocation, big_sur: "ddfc5b923a862daf2c1489d942e83f03dc99fdb3dcb2b7eebd67e92582174867" + sha256 cellar: :any_skip_relocation, catalina: "451224479d19854f4f802b0ec63077080df91196917ad14d16e4a2308f247527" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1e4d0a241cbecda677088d390da59e754c90f1236a101c6b36e5d3df6d3fc77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "186b5262fed77462a1b2407dbd2106ebf80f9e1c48fd56bf57549f6716156f96" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/".autocode/config.yml").write <<~YAML + name: test + version: 0.1.0 + description: test description + author: + name: Test User + email: test@example.com + url: https://example.com + copyright: 2015 Test + YAML + system bin/"autocode", "build" + end +end diff --git a/Formula/a/autoconf-archive.rb b/Formula/a/autoconf-archive.rb new file mode 100644 index 0000000000000..d22fcbd3344c9 --- /dev/null +++ b/Formula/a/autoconf-archive.rb @@ -0,0 +1,47 @@ +class AutoconfArchive < Formula + desc "Collection of over 500 reusable autoconf macros" + homepage "https://savannah.gnu.org/projects/autoconf-archive/" + url "https://ftpmirror.gnu.org/gnu/autoconf-archive/autoconf-archive-2024.10.16.tar.xz" + mirror "https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2024.10.16.tar.xz" + sha256 "7bcd5d001916f3a50ed7436f4f700e3d2b1bade3ed803219c592d62502a57363" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "75991b9174b35f768e55c113e3cca5f1b88939590ea865b4072426230fdef4ae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7652c1e3d7ef6dc9cc8d6ef298f1bfe80d9888876052bedba5f5638b5e280945" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7652c1e3d7ef6dc9cc8d6ef298f1bfe80d9888876052bedba5f5638b5e280945" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7652c1e3d7ef6dc9cc8d6ef298f1bfe80d9888876052bedba5f5638b5e280945" + sha256 cellar: :any_skip_relocation, sonoma: "ffb73dbda72f41e7b21402df83c9b72f2570e37a8cdad47d0a90768aa5b5d2a3" + sha256 cellar: :any_skip_relocation, ventura: "ffb73dbda72f41e7b21402df83c9b72f2570e37a8cdad47d0a90768aa5b5d2a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "8185cedad20ff9606d383493e300a38f608a408b677490b7192ad698b3b02ba7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ce036c58366f08d63911e57d2bf5db88d008ac6fce194f8e8a41a073e92a1a8" + end + + # autoconf-archive is useless without autoconf + depends_on "autoconf" + + # Fix quoting of `m4_fatal` + # https://github.com/autoconf-archive/autoconf-archive/pull/312 + # https://github.com/Homebrew/homebrew-core/issues/202234 + patch do + url "https://github.com/autoconf-archive/autoconf-archive/commit/fadde164479a926d6b56dd693ded2a4c36ed89f0.patch?full_index=1" + sha256 "4d9a4ca1fc9dc9e28a765ebbd1fa0e1080b6c8401e048b28bb16b9735ff7bf77" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"configure.ac").write <<~EOS + AC_INIT([test], [0.1]) + AX_CHECK_ENABLE_DEBUG + AC_OUTPUT + EOS + + system Formula["autoconf"].bin/"autoconf", "configure.ac" + assert_path_exists testpath/"autom4te.cache" + end +end diff --git a/Formula/a/autoconf.rb b/Formula/a/autoconf.rb new file mode 100644 index 0000000000000..12095aa538a93 --- /dev/null +++ b/Formula/a/autoconf.rb @@ -0,0 +1,66 @@ +class Autoconf < Formula + desc "Automatic configure script builder" + homepage "https://www.gnu.org/software/autoconf/" + url "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz" + mirror "https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz" + sha256 "afb181a76e1ee72832f6581c0eddf8df032b83e2e0239ef79ebedc4467d92d6e" + license all_of: [ + "GPL-3.0-or-later", + "GPL-3.0-or-later" => { with: "Autoconf-exception-3.0" }, + ] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3374908e36c28948511beea4bdb005556f3d3c382a1377301c9b8eba2bf8ee77" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1d110e2efd457a5e56c4469f2d6741109d542801a401fe08b750d0614581a9a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3674a4dfa3794e022b1adbcd9c954c91192d38822080c7162d073d6609b903a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c3674a4dfa3794e022b1adbcd9c954c91192d38822080c7162d073d6609b903a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c3674a4dfa3794e022b1adbcd9c954c91192d38822080c7162d073d6609b903a" + sha256 cellar: :any_skip_relocation, tahoe: "3374908e36c28948511beea4bdb005556f3d3c382a1377301c9b8eba2bf8ee77" + sha256 cellar: :any_skip_relocation, sequoia: "a0d9eae5c0acae66c817cba6c01e872d475cd756ea6af10a7e72be27e5b80d02" + sha256 cellar: :any_skip_relocation, sonoma: "32c6ff07058a61e7fada66d171fee246502fcd1f5b98b65a1ef5b0acfcfa28c2" + sha256 cellar: :any_skip_relocation, ventura: "32c6ff07058a61e7fada66d171fee246502fcd1f5b98b65a1ef5b0acfcfa28c2" + sha256 cellar: :any_skip_relocation, monterey: "ab03a9de5759022fd4c341a085adc41ef34b00829a21d5f98a76538ce7ec4908" + sha256 cellar: :any_skip_relocation, arm64_linux: "55fcb698584173e2d750696d104f3658dbe37fae4651dc7c72d28e6b3a2fb4e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55e5cfc7d6f3d91895fe5a345b2158498f8e96b05574b073edf667de4122413d" + end + + depends_on "m4" + uses_from_macos "perl" + + def install + if OS.mac? + ENV["PERL"] = "/usr/bin/perl" + + # force autoreconf to look for and use our glibtoolize + inreplace "bin/autoreconf.in", "libtoolize", "glibtoolize" + # also touch the man page so that it isn't rebuilt + inreplace "man/autoreconf.1", "libtoolize", "glibtoolize" + end + + system "./configure", "--prefix=#{prefix}", "--with-lispdir=#{elisp}" + system "make", "install" + + rm(info/"standards.info") + end + + test do + cp pkgshare/"autotest/autotest.m4", "autotest.m4" + system bin/"autoconf", "autotest.m4" + + (testpath/"configure.ac").write <<~EOS + AC_INIT([hello], [1.0]) + AC_CONFIG_SRCDIR([hello.c]) + AC_PROG_CC + AC_OUTPUT + EOS + (testpath/"hello.c").write "int foo(void) { return 42; }" + + system bin/"autoconf" + system "./configure" + assert_path_exists testpath/"config.status" + assert_match(/\nCC=.*#{ENV.cc}/, (testpath/"config.log").read) + end +end diff --git a/Formula/a/autoconf@2.13.rb b/Formula/a/autoconf@2.13.rb new file mode 100644 index 0000000000000..a0cef45b8929f --- /dev/null +++ b/Formula/a/autoconf@2.13.rb @@ -0,0 +1,42 @@ +class AutoconfAT213 < Formula + desc "Automatic configure script builder" + homepage "https://www.gnu.org/software/autoconf/" + url "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz" + mirror "https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz" + sha256 "f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f5871980126b7e1f4135fbbdc0d00932c4c670de6f7b1e095698d3c326e5c4b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6fa08a57e3bbd841ad5085216fde02726a26379c2ba53dd46e849dfe49f02cf4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8ff0982e2d5057b15802e26a9bfb14144f42d4d59683ea9233de0348309298e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e8ff0982e2d5057b15802e26a9bfb14144f42d4d59683ea9233de0348309298e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "075de1fe7d7cdf38d3ca84a4436a8f9839adc333e3eb42ccc21c15d77cf01fb8" + sha256 cellar: :any_skip_relocation, sonoma: "286b0faa90ffe785542aa8effd23c1e75b404590ded0e3166d759577eabc904d" + sha256 cellar: :any_skip_relocation, ventura: "c8091905cf2e72b925e7ab60a776a3d6acb6e6ab01217e396055e7f36dcc15ad" + sha256 cellar: :any_skip_relocation, monterey: "ca413d4515dfd932453a20978e21f95ce349421052428b547ae938c60792a76f" + sha256 cellar: :any_skip_relocation, big_sur: "5d538d7301ae68a526aca1848ed4bab6fed48ee6b9375766b26d38fa2825a1c0" + sha256 cellar: :any_skip_relocation, catalina: "d3b4d6e06ae6749fc60fa437f1f5c2ae85a91f6979ca897e08b854f920c222a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cccd5c06cf43a458be6dd0f07af79a3d63411aa6e3c350df0aae1e9a0b6b795" + end + + deprecate! date: "2024-02-22", because: :unsupported + disable! date: "2025-02-24", because: :unsupported + + uses_from_macos "m4" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--program-suffix=213", + "--prefix=#{prefix}", + "--infodir=#{pkgshare}/info", + "--datadir=#{pkgshare}" + system "make", "install" + end + + test do + assert_match "Usage: autoconf", shell_output("#{bin}/autoconf213 --help 2>&1") + end +end diff --git a/Formula/a/autoconf@2.69.rb b/Formula/a/autoconf@2.69.rb new file mode 100644 index 0000000000000..cbd84f2607da8 --- /dev/null +++ b/Formula/a/autoconf@2.69.rb @@ -0,0 +1,66 @@ +class AutoconfAT269 < Formula + desc "Automatic configure script builder" + homepage "https://www.gnu.org/software/autoconf/" + url "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz" + mirror "https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz" + sha256 "954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969" + license all_of: [ + "GPL-3.0-or-later", + "GPL-3.0-or-later" => { with: "Autoconf-exception-3.0" }, + ] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "349138ef4ad5f2b21cca94d5534c659f59206c582af8f063e64269e34b56eb04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4497ba5e4e2a1a463e60a5fa8cf7227f8ebf943f19ef52edd2e6c2ce83435de4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa8878f7ae82d8c8b2f1de7d330ffe52d797aec62c955fd0d62bcf5557ffd4b1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa8878f7ae82d8c8b2f1de7d330ffe52d797aec62c955fd0d62bcf5557ffd4b1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f7b28e5cdf538418baea43d1d5638a1df52161ef0cd198ee1f261cdc61ac6636" + sha256 cellar: :any_skip_relocation, sonoma: "0258028b89daec636bb2da31d0c6893ab13f35940c195ef045fabbd4db824908" + sha256 cellar: :any_skip_relocation, ventura: "210d6b15bb404f7711955bfeb60dce45a8bd34bda84d043ea32552571bb3d1d6" + sha256 cellar: :any_skip_relocation, monterey: "b06ba90b16a3d6d38a2954e5c02710a4225a7e82bd1a5c30e1b7574dbfd1b2b4" + sha256 cellar: :any_skip_relocation, big_sur: "e4a0ef0b0b653836a212225fbb5345fb58e898ed7a24cb8386a4169496bbfde3" + sha256 cellar: :any_skip_relocation, catalina: "e4a0ef0b0b653836a212225fbb5345fb58e898ed7a24cb8386a4169496bbfde3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a81e31050fea7e78203415941a85de809015059eb2a3e356afcfe73ec715237d" + end + + keg_only :versioned_formula + + disable! date: "2024-12-14", because: :versioned_formula + + depends_on "m4" + uses_from_macos "perl" + + def install + if OS.mac? + ENV["PERL"] = "/usr/bin/perl" + + # force autoreconf to look for and use our glibtoolize + inreplace "bin/autoreconf.in", "libtoolize", "glibtoolize" + # also touch the man page so that it isn't rebuilt + inreplace "man/autoreconf.1", "libtoolize", "glibtoolize" + end + + system "./configure", "--prefix=#{prefix}", "--with-lispdir=#{elisp}" + system "make", "install" + + rm(info/"standards.info") + end + + test do + cp prefix/"share/autoconf/autotest/autotest.m4", "autotest.m4" + system bin/"autoconf", "autotest.m4" + + (testpath/"configure.ac").write <<~EOS + AC_INIT([hello], [1.0]) + AC_CONFIG_SRCDIR([hello.c]) + AC_PROG_CC + AC_OUTPUT + EOS + (testpath/"hello.c").write "int foo(void) { return 42; }" + + system bin/"autoconf" + system "./configure" + assert_path_exists testpath/"config.status" + assert_match(/\nCC=.*#{ENV.cc}/, (testpath/"config.log").read) + end +end diff --git a/Formula/a/autocorrect.rb b/Formula/a/autocorrect.rb new file mode 100644 index 0000000000000..48e7f3f4ca007 --- /dev/null +++ b/Formula/a/autocorrect.rb @@ -0,0 +1,33 @@ +class Autocorrect < Formula + desc "Linter and formatter to improve copywriting, correct spaces, words between CJK" + homepage "https://huacnlee.github.io/autocorrect/" + url "https://github.com/huacnlee/autocorrect/archive/refs/tags/v2.16.1.tar.gz" + sha256 "0aef23b4a40e39759ccd6f5c073b36d87e228eb8790d677145e6adde38bc376d" + license "MIT" + head "https://github.com/huacnlee/autocorrect.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1794166fb34512f180ebf9ed6ef4b55eac13fad9885943c41013d5299bda09b4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6728180139bff31ada423bf4068956a17aab82e654a01f53cead9dd2dce61a38" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42c3b2bfbd5738a7762a729ae0b16b22aa15d559b9f6d98b66ac3c2322f84526" + sha256 cellar: :any_skip_relocation, sonoma: "46e39386f4383798e8f0e7f81fc6c17034c769b9ad3afd8d39443cfd257866aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fed71303ceaa3272b6f141d60944c267ac12ab2e5670f91db198a1bd9835afd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56d00c53c780607dbcfc15dab89aeb3dace74d5264ab86c771d3a05ee80587b2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "autocorrect-cli") + end + + test do + (testpath/"autocorrect.md").write "Hello世界" + out = shell_output("#{bin}/autocorrect autocorrect.md").chomp + assert_match "Hello 世界", out + + assert_match version.to_s, shell_output("#{bin}/autocorrect --version") + end +end diff --git a/Formula/a/autocycler.rb b/Formula/a/autocycler.rb new file mode 100644 index 0000000000000..c621265c2feac --- /dev/null +++ b/Formula/a/autocycler.rb @@ -0,0 +1,38 @@ +class Autocycler < Formula + desc "Tool for generating consensus long-read assemblies for bacterial genomes" + homepage "https://github.com/rrwick/Autocycler" + url "https://github.com/rrwick/Autocycler/archive/refs/tags/v0.5.2.tar.gz" + sha256 "371e5815c7ed7b83c3b19d1282ce4b043bff0b23eb08a8dde4f5ff9ee73c31ee" + license "GPL-3.0-or-later" + head "https://github.com/rrwick/Autocycler.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e3df9155d8e46b0cc1b89041613195338c789e53a7eead38d4e6661af9ad3e7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa67f52f7764946aa612e550637cdbd5368d313ec06a5b7f3d6a14a1e7ee9528" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c2e32d17ea27850c128bdcfb4589613939e373dd40fd9725e56bdc419f716cd3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b66dbe8d769d372409e6a40aa96c5d31862f8569d9ff7326617b70a700ec1cd0" + sha256 cellar: :any_skip_relocation, sonoma: "19e655f41ded88da7769ca24dc50e1e5d7428a3636e39e9f7ffa7fa579fa58a7" + sha256 cellar: :any_skip_relocation, ventura: "619ee0a9c21f35454994d1e26e350421c17626cc1054d513dc38484ed398fc28" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e06ac8cde8770a38eeba9e5fe67c4dc64b221fb9365f9e3b978d257a732af90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7f005447e399ff2d23451a9c0946f24d0d67892b4bb23171864771e4de46dd0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + resource "autocycler-demo-dataset" do + url "https://github.com/rrwick/Autocycler/releases/download/v0.1.0/autocycler-demo-dataset.tar" + sha256 "70a5480b4390b2629a9406aad788cb2813570827b86b37b982609e6842ba0bc9" + end + + resource("autocycler-demo-dataset").stage testpath + system bin/"autocycler", "subsample", "--reads", "reads.fastq.gz", + "--out_dir", "subsampled_reads", + "--genome_size", "242000" + assert_path_exists "subsampled_reads" + end +end diff --git a/Formula/a/autodiff.rb b/Formula/a/autodiff.rb new file mode 100644 index 0000000000000..7d87345fa6fad --- /dev/null +++ b/Formula/a/autodiff.rb @@ -0,0 +1,51 @@ +class Autodiff < Formula + desc "Automatic differentiation made easier for C++" + homepage "https://autodiff.github.io" + url "https://github.com/autodiff/autodiff/archive/refs/tags/v1.1.2.tar.gz" + sha256 "86f68aabdae1eed214bfbf0ddaa182c78ea1bb99e4df404efb7b94d30e06b744" + license "MIT" + revision 1 + head "https://github.com/autodiff/autodiff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e710233eea192e5eb1cafc35744e0c112c2015b1c953b04951f80a8441c19861" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9884600e74258251a3b98f12dfe91649864da02aa4eb20bec25183d365e9270f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6bd150a2d334136661c09b9b39cfde2ac583be0c01f3e3337dab5ce991d7e128" + sha256 cellar: :any_skip_relocation, sonoma: "a5ab6b8e788bb486b1149856f048184b0e9925c9613892a8a556aea6481a157f" + sha256 cellar: :any_skip_relocation, arm64_linux: "08b090f52b399f776b1d4b1a7601f2a81d75793b0617c942dc235d70cfea41f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ed20441a603fa36b2ca44607e1511a644aa5e6255f51cf7e07630da0ef86518" + end + + depends_on "cmake" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "eigen@3" + depends_on "pybind11" + + def python3 + "python3.14" + end + + def install + args = %W[ + -DAUTODIFF_BUILD_TESTS=OFF + -DPYTHON_EXECUTABLE=#{which(python3)} + ] + system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + (pkgshare/"test").install "examples/forward/example-forward-single-variable-function.cpp" => "forward.cpp" + (pkgshare/"test").install "examples/reverse/example-reverse-single-variable-function.cpp" => "reverse.cpp" + end + + test do + system ENV.cxx, pkgshare/"test/forward.cpp", "--std=c++17", + "-I#{include}", "-I#{Formula["eigen@3"].opt_include}/eigen3", "-o", "forward" + system ENV.cxx, pkgshare/"test/reverse.cpp", "--std=c++17", + "-I#{include}", "-I#{Formula["eigen@3"].opt_include}/eigen3", "-o", "reverse" + assert_match "u = 8.19315\ndu/dx = 5.25\n", shell_output(testpath/"forward") + assert_match "u = 8.19315\nux = 5.25\n", shell_output(testpath/"reverse") + system python3, "-c", "import autodiff" + end +end diff --git a/Formula/a/autoenv.rb b/Formula/a/autoenv.rb new file mode 100644 index 0000000000000..151e05dbd3064 --- /dev/null +++ b/Formula/a/autoenv.rb @@ -0,0 +1,31 @@ +class Autoenv < Formula + desc "Per-project, per-directory shell environments" + homepage "https://github.com/hyperupcall/autoenv" + url "https://github.com/hyperupcall/autoenv/archive/refs/tags/v0.4.0.tar.gz" + sha256 "baf91afe2e93b071dbf3da0c9ad294c1858efd9c8de4b0845f7fb2f31520b252" + license "MIT" + head "https://github.com/hyperupcall/autoenv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7d291627ba82fc28ef378728ea6969eb3cebed1e8b2c17b9655cf05745102362" + end + + depends_on "bash" + + def install + prefix.install "activate.sh" + end + + def caveats + <<~EOS + To finish the installation, source activate.sh in your shell: + source #{opt_prefix}/activate.sh + EOS + end + + test do + (testpath/"test/.env").write "echo it works\n" + testcmd = "yes | bash -c '. #{prefix}/activate.sh; autoenv_cd test'" + assert_match "it works", shell_output(testcmd) + end +end diff --git a/Formula/a/autogen.rb b/Formula/a/autogen.rb new file mode 100644 index 0000000000000..530c46bc64d18 --- /dev/null +++ b/Formula/a/autogen.rb @@ -0,0 +1,106 @@ +class Autogen < Formula + desc "Automated text file generator" + homepage "https://autogen.sourceforge.net/" + url "https://ftpmirror.gnu.org/gnu/autogen/rel5.18.16/autogen-5.18.16.tar.xz" + mirror "https://ftp.gnu.org/gnu/autogen/rel5.18.16/autogen-5.18.16.tar.xz" + sha256 "f8a13466b48faa3ba99fe17a069e71c9ab006d9b1cfabe699f8c60a47d5bb49a" + license "GPL-3.0-or-later" + revision 2 + + livecheck do + url :stable + regex(%r{href=.*?rel(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "5913abd2c6cbe11a0df0c52b48b9e27554c8976378c59203bd45a2b86cc6edc8" + sha256 arm64_sequoia: "6e840d15bd4394ae8d7896f12bc04d5531f182dd9b21c855b2d5752cf1f3fce7" + sha256 arm64_sonoma: "00050be1bb38030c899331d274860d7b90a6938d59800b5930669ee7887c8b71" + sha256 arm64_ventura: "3158365c07858e79995b689eb2e3d91c3e666db591d7b932d73c895aefc9ad0e" + sha256 arm64_monterey: "002ff8cce7e99ea4013348ada75389cb74804dcf3fa810488aeed5812f160b81" + sha256 arm64_big_sur: "96cccae43990d233afe756eef8b9d700c7fc6ab316b3d119a809df04e04289dc" + sha256 sonoma: "69e23cf2d8b4959dc6ea1b9e98973d4cc3e5545139e678dd4c187245acdff92a" + sha256 ventura: "914ff2b610598f432b4bd816bf7149c1a05a828b797260b74c53f9811f950d2d" + sha256 monterey: "ed4a28138185633424aa705f44e1449e5706c40f055b0e86fc58008f7400f0d7" + sha256 big_sur: "a26ab2c3665e3fabb1a3b3ca20f52b0e1ee0c4a0ccd12beea3af97b73d347690" + sha256 catalina: "45b3f716163b29ab1aab05aa9fbcf9e53bcee5c815b505165c52e80d9fa9234c" + sha256 arm64_linux: "1aa11356e7c39b6c92fac2a616a062030c3d729b7a333eadd37cad14922c1e59" + sha256 x86_64_linux: "1f564be58133732a4c9a380c85da6cc27dfe1b465c0a29c136c1a7ccb470a105" + end + + depends_on "coreutils" => :build + depends_on "pkgconf" => :build + + depends_on "guile" + + uses_from_macos "libxml2" + + on_macos do + depends_on "bdw-gc" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # Fix guile detection, see https://sourceforge.net/p/autogen/bugs/196/ + patch :DATA + + def install + # Uses GNU-specific mktemp syntax: https://sourceforge.net/p/autogen/bugs/189/ + inreplace %w[agen5/mk-stamps.sh build-aux/run-ag.sh config/mk-shdefs.in], "mktemp", "gmktemp" + # Upstream bug regarding "stat" struct: https://sourceforge.net/p/autogen/bugs/187/ + system "./configure", "ac_cv_func_utimensat=no", + "--disable-silent-rules", + *std_configure_args + + # make and install must be separate steps for this formula + system "make" + system "make", "install" + end + + test do + system bin/"autogen", "-v" + end +end + +__END__ +Index: autogen-5.18.16/agen5/guile-iface.h +=================================================================== +--- autogen-5.18.16.orig/agen5/guile-iface.h ++++ autogen-5.18.16/agen5/guile-iface.h +@@ -9,16 +9,13 @@ + # error AutoGen does not work with this version of Guile + choke me. + +-#elif GUILE_VERSION < 203000 ++#else + # define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p)) + # define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l)) + # define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p)) + # define AG_SCM_TO_LONG(_v) scm_to_long(_v) + # define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v)) + +-#else +-# error unknown GUILE_VERSION +- choke me. + #endif + + #endif /* MUTATING_GUILE_IFACE_H_GUARD */ +Index: autogen-5.18.16/configure +=================================================================== +--- autogen-5.18.16.orig/configure ++++ autogen-5.18.16/configure +@@ -14798,7 +14798,7 @@ $as_echo "no" >&6; } + PKG_CONFIG="" + fi + fi +- _guile_versions_to_search="2.2 2.0 1.8" ++ _guile_versions_to_search="3.0 2.2 2.0 1.8" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do diff --git a/Formula/a/autojump.rb b/Formula/a/autojump.rb new file mode 100644 index 0000000000000..d12821dbb4361 --- /dev/null +++ b/Formula/a/autojump.rb @@ -0,0 +1,55 @@ +class Autojump < Formula + desc "Shell extension to jump to frequently used directories" + homepage "https://github.com/wting/autojump" + url "https://github.com/wting/autojump/archive/refs/tags/release-v22.5.3.tar.gz" + sha256 "00daf3698e17ac3ac788d529877c03ee80c3790472a85d0ed063ac3a354c37b1" + license "GPL-3.0-or-later" + revision 3 + head "https://github.com/wting/autojump.git", branch: "master" + + bottle do + rebuild 7 + sha256 cellar: :any_skip_relocation, all: "2a5206b6e787350ca32d8e9adbf7b336dc794ff95b54a1da6ba968db261892b3" + end + + depends_on "python@3.14" + + def install + python_bin = Formula["python@3.14"].opt_libexec/"bin" + system python_bin/"python", "install.py", "-d", prefix, "-z", zsh_completion + + # ensure uniform bottles + inreplace prefix/"etc/profile.d/autojump.sh", "/usr/local", HOMEBREW_PREFIX + + # Backwards compatibility for users that have the old path in .bash_profile + # or .zshrc + (prefix/"etc").install_symlink prefix/"etc/profile.d/autojump.sh" + + libexec.install bin + (bin/"autojump").write_env_script libexec/"bin/autojump", PATH: "#{python_bin}:$PATH" + end + + def caveats + <<~EOS + Add the following line to your ~/.bash_profile or ~/.zshrc file: + [ -f #{etc}/profile.d/autojump.sh ] && . #{etc}/profile.d/autojump.sh + + If you use the Fish shell then add the following line to your ~/.config/fish/config.fish: + [ -f #{HOMEBREW_PREFIX}/share/autojump/autojump.fish ]; and source #{HOMEBREW_PREFIX}/share/autojump/autojump.fish + + Restart your terminal for the settings to take effect. + EOS + end + + test do + path = testpath/"foo/bar" + path.mkpath + cmds = [ + ". #{etc}/profile.d/autojump.sh", + "j -a \"#{path.relative_path_from(testpath)}\"", + "j foo >/dev/null", + "pwd", + ] + assert_equal path.realpath.to_s, shell_output("bash -c '#{cmds.join("; ")}'").strip + end +end diff --git a/Formula/a/automake.rb b/Formula/a/automake.rb new file mode 100644 index 0000000000000..59e04080b0902 --- /dev/null +++ b/Formula/a/automake.rb @@ -0,0 +1,60 @@ +class Automake < Formula + desc "Tool for generating GNU Standards-compliant Makefiles" + homepage "https://www.gnu.org/software/automake/" + url "https://ftpmirror.gnu.org/gnu/automake/automake-1.18.1.tar.xz" + mirror "https://ftp.gnu.org/gnu/automake/automake-1.18.1.tar.xz" + sha256 "168aa363278351b89af56684448f525a5bce5079d0b6842bd910fdd3f1646887" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7298e979d484b938f42b96dfd4b270353e64f61ab0f31e0718799b29dc1570fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c00a332610983c37659eee42e4a93341a3051892481362d223a40f5435b7555" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c00a332610983c37659eee42e4a93341a3051892481362d223a40f5435b7555" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3c00a332610983c37659eee42e4a93341a3051892481362d223a40f5435b7555" + sha256 cellar: :any_skip_relocation, tahoe: "78ea48a55a4f8b088e5e83a5284e29307981cc6c265487e026824baad283c3b9" + sha256 cellar: :any_skip_relocation, sequoia: "bddfb6ebd600671dbeb0c3e665a98bc971c97834f9b5fdfc15c17f6e3cd44de8" + sha256 cellar: :any_skip_relocation, sonoma: "bddfb6ebd600671dbeb0c3e665a98bc971c97834f9b5fdfc15c17f6e3cd44de8" + sha256 cellar: :any_skip_relocation, ventura: "bddfb6ebd600671dbeb0c3e665a98bc971c97834f9b5fdfc15c17f6e3cd44de8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5bc18b0f438a2b7776c8a2cec9f9c5a4189a46dd35b79046249ad9d3abd4da1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5bc18b0f438a2b7776c8a2cec9f9c5a4189a46dd35b79046249ad9d3abd4da1" + end + + depends_on "autoconf" + + def install + ENV["PERL"] = "/usr/bin/perl" if OS.mac? + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + + # Our aclocal must go first. See: + # https://github.com/Homebrew/homebrew/issues/10618 + (share/"aclocal/dirlist").write <<~EOS + #{HOMEBREW_PREFIX}/share/aclocal + /usr/share/aclocal + EOS + end + + test do + (testpath/"test.c").write <<~C + int main() { return 0; } + C + (testpath/"configure.ac").write <<~EOS + AC_INIT(test, 1.0) + AM_INIT_AUTOMAKE + AC_PROG_CC + AC_CONFIG_FILES(Makefile) + AC_OUTPUT + EOS + (testpath/"Makefile.am").write <<~EOS + bin_PROGRAMS = test + test_SOURCES = test.c + EOS + system bin/"aclocal" + system bin/"automake", "--add-missing", "--foreign" + system "autoconf" + system "./configure" + system "make" + system "./test" + end +end diff --git a/Formula/a/automysqlbackup.rb b/Formula/a/automysqlbackup.rb new file mode 100644 index 0000000000000..8613cac4d4e90 --- /dev/null +++ b/Formula/a/automysqlbackup.rb @@ -0,0 +1,62 @@ +class Automysqlbackup < Formula + desc "Automate MySQL backups" + homepage "https://sourceforge.net/projects/automysqlbackup/" + url "https://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0/automysqlbackup-v3.0_rc6.tar.gz" + version "3.0-rc6" + sha256 "889e064d086b077e213da11e937ea7242a289f9217652b9051c157830dc23cc0" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/automysqlbackup[._-]v?(\d+(?:\.\d+)+(?:[._-]?rc\d+)?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "47848e3272f89cc4d30787693b27799507fe8d7593d51b2586431e88eb92c6dc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eae5fa097a6796bd0aeb27e2a4026257d8b8a868263f292a693723c32404a0d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eae5fa097a6796bd0aeb27e2a4026257d8b8a868263f292a693723c32404a0d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eae5fa097a6796bd0aeb27e2a4026257d8b8a868263f292a693723c32404a0d3" + sha256 cellar: :any_skip_relocation, sonoma: "c34d3e9363096874a38e300b7ca801587d5e3076de4fd0b9504229b3544cfb50" + sha256 cellar: :any_skip_relocation, ventura: "c34d3e9363096874a38e300b7ca801587d5e3076de4fd0b9504229b3544cfb50" + sha256 cellar: :any_skip_relocation, arm64_linux: "eae5fa097a6796bd0aeb27e2a4026257d8b8a868263f292a693723c32404a0d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eae5fa097a6796bd0aeb27e2a4026257d8b8a868263f292a693723c32404a0d3" + end + + def install + inreplace "automysqlbackup" do |s| + s.gsub! "/etc", etc + s.gsub! "/var", var + end + inreplace "automysqlbackup.conf", "/var", var + + conf_path = (etc/"automysqlbackup") + conf_path.install "automysqlbackup.conf" unless (conf_path/"automysqlbackup.conf").exist? + sbin.install "automysqlbackup" + end + + def caveats + <<~EOS + You will have to edit + #{etc}/automysqlbackup/automysqlbackup.conf + to set AutoMySQLBackup up to find your database and backup directory. + + The included service will run AutoMySQLBackup every day at 04:00. + EOS + end + + service do + run opt_sbin/"automysqlbackup" + working_dir HOMEBREW_PREFIX + run_type :cron + cron "0 4 * * *" + log_path var/"log/automysqlbackup.log" + error_log_path var/"log/automysqlbackup.log" + end + + test do + system "#{sbin}/automysqlbackup", "--help" + end +end diff --git a/Formula/a/autopep8.rb b/Formula/a/autopep8.rb new file mode 100644 index 0000000000000..dd5150ee21298 --- /dev/null +++ b/Formula/a/autopep8.rb @@ -0,0 +1,30 @@ +class Autopep8 < Formula + include Language::Python::Virtualenv + + desc "Automatically formats Python code to conform to the PEP 8 style guide" + homepage "https://github.com/hhatto/autopep8" + url "https://files.pythonhosted.org/packages/50/d8/30873d2b7b57dee9263e53d142da044c4600a46f2d28374b3e38b023df16/autopep8-2.3.2.tar.gz" + sha256 "89440a4f969197b69a995e4ce0661b031f455a9f776d2c5ba3dbd83466931758" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5f1bd9503359c8e67f6cefd931a53b5749aea1415fcfb1ed26ed3cda9b761702" + end + + depends_on "python@3.14" + + resource "pycodestyle" do + url "https://files.pythonhosted.org/packages/11/e0/abfd2a0d2efe47670df87f3e3a0e2edda42f055053c85361f19c0e2c1ca8/pycodestyle-2.14.0.tar.gz" + sha256 "c4b5b517d278089ff9d0abdec919cd97262a3367449ea1c8b49b91529167b783" + end + + def install + virtualenv_install_with_resources + end + + test do + output = pipe_output("#{bin}/autopep8 -", "x='homebrew'", 0) + assert_equal "x = 'homebrew'", output.strip + end +end diff --git a/Formula/a/autopsy.rb b/Formula/a/autopsy.rb new file mode 100644 index 0000000000000..512e95e275671 --- /dev/null +++ b/Formula/a/autopsy.rb @@ -0,0 +1,127 @@ +class Autopsy < Formula + desc "Graphical interface to Sleuth Kit investigation tools" + homepage "https://www.sleuthkit.org/autopsy/index.php" + url "https://downloads.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz" + sha256 "ab787f519942783d43a561d12be0554587f11f22bc55ab79d34d8da703edc09e" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dbb4291f1325784e67d172ee19b80d1557ae45ee1e0cc9be8da5e1baf0b08374" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b7daff147ae1d82a0dee7c5f3d853b0b6015af1bf2fde65f23676feae1b7895" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b7daff147ae1d82a0dee7c5f3d853b0b6015af1bf2fde65f23676feae1b7895" + sha256 cellar: :any_skip_relocation, arm64_monterey: "778ab6721c38acce97a7e7bbe7e4c941ecb9c8f6a684581e26d2b24684308046" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "778ab6721c38acce97a7e7bbe7e4c941ecb9c8f6a684581e26d2b24684308046" + sha256 cellar: :any_skip_relocation, sonoma: "cd85ba9a96870da9470b8119649d1da48daa5bae273b0ef726535dac9dd4f5f0" + sha256 cellar: :any_skip_relocation, ventura: "fb630d6b19ab15e8688b7fe1b59bfd708dd6d0366cc9c29a40a33ecf6c9c4b6a" + sha256 cellar: :any_skip_relocation, monterey: "cec5acab1fcc5e79f07962e85ed00af7696fb5db6d7e1bce164d8f21bf3b614d" + sha256 cellar: :any_skip_relocation, big_sur: "cec5acab1fcc5e79f07962e85ed00af7696fb5db6d7e1bce164d8f21bf3b614d" + sha256 cellar: :any_skip_relocation, catalina: "cec5acab1fcc5e79f07962e85ed00af7696fb5db6d7e1bce164d8f21bf3b614d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e1ce8b5147639d7737a4013030ee2a059d1b8dd4657554e08e9423a9a6b2f66" + end + + # Installs prebuilt binaries, broken on arm: https://github.com/Homebrew/homebrew-core/issues/175053 + deprecate! date: "2024-06-22", because: :does_not_build + disable! date: "2025-06-23", because: :does_not_build + + depends_on "sleuthkit" + + uses_from_macos "perl" + + on_linux do + depends_on "file-formula" + depends_on "grep" + depends_on "md5sha1sum" + end + + # fixes weird configure script that wouldn't work nicely with homebrew + patch :DATA + + def autcfg + # Although these binaries are usually available on Linux, they can be in different locations + # so we use the brewed versions instead. + + grep = "/usr/bin/grep" + file = "/usr/bin/file" + md5 = "/sbin/md5" + sha1 = "/usr/bin/shasum" + + on_linux do + grep = Formula["grep"].opt_bin/"grep" + file = Formula["file"].opt_bin/"file" + md5 = Formula["md5sha1sum"].opt_bin/"md5sum" + sha1 = Formula["md5sha1sum"].opt_bin/"sha1sum" + end + + <<~EOS + # Autopsy configuration settings + + # when set to 1, the server will stop after it receives no + # connections for STIMEOUT seconds. + $USE_STIMEOUT = 0; + $STIMEOUT = 3600; + + # number of seconds that child waits for input from client + $CTIMEOUT = 15; + + # set to 1 to save the cookie value in a file (for scripting) + $SAVE_COOKIE = 1; + + $INSTALLDIR = '#{prefix}'; + + + # System Utilities + $GREP_EXE = '#{grep}'; + $FILE_EXE = '#{file}'; + $MD5_EXE = '#{md5}'; + $SHA1_EXE = '#{sha1}'; + + + # Directories + $TSKDIR = '#{Formula["sleuthkit"].opt_bin}'; + + # Homebrew users can install NSRL database and change this variable later + $NSRLDB = ''; + + # Evidence locker location + $LOCKDIR = '#{var}/lib/autopsy'; + EOS + end + + def install + (var+"lib/autopsy").mkpath + mv "lib", "libexec" + prefix.install %w[global.css help libexec pict] + prefix.install Dir["*.txt"] + (prefix/"conf.pl").write autcfg + inreplace "base/autopsy.base", "/tmp/autopsy", prefix + inreplace "base/autopsy.base", "lib/define.pl", "#{libexec}/define.pl" + bin.install "base/autopsy.base" => "autopsy" + end + + def caveats + <<~EOS + By default, the evidence locker is in: + #{var}/lib/autopsy + EOS + end + + test do + # Launch autopsy inside a PTY and use Ctrl-C to exit it. + PTY.spawn(bin/"autopsy") do |_r, w, _pid| + w.write "\cC" + end + end +end + +__END__ +diff --git a/base/autopsy.base b/base/autopsy.base +index 3b3bbdc..a0d2632 100644 +--- a/base/autopsy.base ++++ b/base/autopsy.base +@@ -1,3 +1,6 @@ ++#!/usr/bin/perl -wT ++use lib '/tmp/autopsy/'; ++use lib '/tmp/autopsy/libexec/'; + # + # autopsy gui server + # Autopsy Forensic Browser diff --git a/Formula/a/autorest.rb b/Formula/a/autorest.rb new file mode 100644 index 0000000000000..dbf6e2f6a2a65 --- /dev/null +++ b/Formula/a/autorest.rb @@ -0,0 +1,33 @@ +class Autorest < Formula + desc "Swagger (OpenAPI) Specification code generator" + homepage "https://github.com/Azure/autorest" + url "https://registry.npmjs.org/autorest/-/autorest-3.7.2.tgz" + sha256 "4bd274127b60c276832127fe738f0f7f25ee56b190395dc4d594ca507659ccd2" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "8b8b739c12e033a7458bca6b5a91396f06267289f553961157320c48e2c4a50d" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + resource "homebrew-petstore" do + url "https://raw.githubusercontent.com/Azure/autorest/5c170a02c009d032e10aa9f5ab7841e637b3d53b/Samples/1b-code-generation-multilang/petstore.yaml" + sha256 "e981f21115bc9deba47c74e5c533d92a94cf5dbe880c4304357650083283ce13" + end + + resource("homebrew-petstore").stage do + system (bin/"autorest"), "--input-file=petstore.yaml", + "--typescript", + "--output-folder=petstore" + assert_includes File.read("petstore/package.json"), "Microsoft Corporation" + end + end +end diff --git a/Formula/a/autorestic.rb b/Formula/a/autorestic.rb new file mode 100644 index 0000000000000..579f69fa081cf --- /dev/null +++ b/Formula/a/autorestic.rb @@ -0,0 +1,48 @@ +class Autorestic < Formula + desc "High level CLI utility for restic" + homepage "https://autorestic.vercel.app/" + url "https://github.com/cupcakearmy/autorestic/archive/refs/tags/v1.8.3.tar.gz" + sha256 "2f9ccdb83621530ebda4d22373554af45eeb550d32924a82249dbc66cb867726" + license "Apache-2.0" + head "https://github.com/cupcakearmy/autorestic.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ad574bcd9a1adb60d03421185b68465feb9b39db31df3e3031b6d691553c0df9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2cade21fc658ba2dc41a9340b62816575ccc5107dd3785d0ff3a718efca1115" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b08a884dfb153b6fe2127bd30c91ee36aad5622ec69305b13ba23b43d358c351" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b08a884dfb153b6fe2127bd30c91ee36aad5622ec69305b13ba23b43d358c351" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b08a884dfb153b6fe2127bd30c91ee36aad5622ec69305b13ba23b43d358c351" + sha256 cellar: :any_skip_relocation, sonoma: "fe4791b279ef81457641763d07a23b02df7aeb2eafa8cd2ceaf72ba1ed9227c9" + sha256 cellar: :any_skip_relocation, ventura: "fe4791b279ef81457641763d07a23b02df7aeb2eafa8cd2ceaf72ba1ed9227c9" + sha256 cellar: :any_skip_relocation, monterey: "fe4791b279ef81457641763d07a23b02df7aeb2eafa8cd2ceaf72ba1ed9227c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "008bf52acf690ed12cb12f12d2827043f9748ce9dcbf99961acbfbd89a9eac0d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdcc8558f432a2b40971c51191e07ab9b8f21c60e3b8fd959f48a5139a483faa" + end + + depends_on "go" => :build + depends_on "restic" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"autorestic", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/autorestic --version") + + require "yaml" + config = { + "locations" => { "foo" => { "from" => "repo", "to" => ["bar"] } }, + "backends" => { "bar" => { "type" => "local", "key" => "secret", "path" => "data" } }, + } + config["version"] = 2 + + (testpath/".autorestic.yml").write config.to_yaml + (testpath/"repo"/"test.txt").write("This is a testfile") + + system bin/"autorestic", "check" + system bin/"autorestic", "backup", "-a" + system bin/"autorestic", "restore", "-l", "foo", "--to", "restore" + assert compare_file testpath/"repo"/"test.txt", testpath/"restore"/testpath/"repo"/"test.txt" + end +end diff --git a/Formula/a/autossh.rb b/Formula/a/autossh.rb new file mode 100644 index 0000000000000..2f1ec47371daf --- /dev/null +++ b/Formula/a/autossh.rb @@ -0,0 +1,56 @@ +class Autossh < Formula + desc "Automatically restart SSH sessions and tunnels" + homepage "https://www.harding.motd.ca/autossh/" + url "https://www.harding.motd.ca/autossh/autossh-1.4g.tgz" + mirror "https://deb.debian.org/debian/pool/main/a/autossh/autossh_1.4g.orig.tar.gz" + sha256 "5fc3cee3361ca1615af862364c480593171d0c54ec156de79fc421e31ae21277" + license "BSD-1-Clause" + + livecheck do + url :homepage + regex(/href=.*?autossh[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "33e051fb258b827ab535ba5909806f87dc63a82f3d3fe9117be1f3c0aa7f4045" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "66600f6f9ea804ec6342ea35c6bd26c068802f31dce3eb09ec161eb67fde8415" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6adeb0a9a13c4e256e4f585524fcb8c7ec49878d876f3d66ecbc9ec62474d16" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c292dd6b6f1393dbccbdc296b881f30844787c909605577ee7367b0b77c0a793" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d14799b6ca48526b2cf94de0ec192da8689fcec70dff538a554cce942c9a1520" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c96653d1f3146ed3d7a2fea7127bae950f5b0766885385983e1ac086eda5dd43" + sha256 cellar: :any_skip_relocation, sonoma: "15ac495d0360f64bbd48a11967af2aab8f12b17b7250579653fd1e085e33feb7" + sha256 cellar: :any_skip_relocation, ventura: "d1712ac93597119c8ba5cf1f945243b52ef382241e868920753e0d18b8a3944d" + sha256 cellar: :any_skip_relocation, monterey: "a99fb17beece2065e5e184f5dcf707011c2470a05644be7ae495bcd10c99410c" + sha256 cellar: :any_skip_relocation, big_sur: "f9a7e07af1ad3391c1bd209b32dd92370bc93afb47c0a65499be89990ef471fe" + sha256 cellar: :any_skip_relocation, catalina: "48e2beb06564ae4715df08b98577b10d01a25750e720b188b863ea8f195278ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "d60fa3c4409563c4ee150db9420c1690afd67a5ddc4b275164a388543b2d6e54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "382150d095c1ca848c38eabfd93635ecf9868291ec5cb85bdae6a16a53dc7ea9" + end + + patch :DATA + + def install + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + bin.install "rscreen" + end + + test do + assert_match version.to_s, shell_output("#{bin}/autossh -V") + end +end + + +__END__ +diff --git a/rscreen b/rscreen +index f0bbced..ce232c3 100755 +--- a/rscreen ++++ b/rscreen +@@ -23,4 +23,4 @@ fi + #AUTOSSH_PATH=/usr/local/bin/ssh + export AUTOSSH_POLL AUTOSSH_LOGFILE AUTOSSH_DEBUG AUTOSSH_PATH AUTOSSH_GATETIME AUTOSSH_PORT + +-autossh -M 20004 -t $1 "screen -e^Zz -D -R" ++autossh -M 20004 -t $1 "screen -D -R" diff --git a/Formula/a/autotrace.rb b/Formula/a/autotrace.rb new file mode 100644 index 0000000000000..09ba6a6e44936 --- /dev/null +++ b/Formula/a/autotrace.rb @@ -0,0 +1,70 @@ +class Autotrace < Formula + desc "Convert bitmap to vector graphics" + homepage "https://autotrace.sourceforge.net/" + url "https://github.com/autotrace/autotrace/archive/refs/tags/0.31.10.tar.gz" + sha256 "14627f93bb02fe14eeda0163434a7cb9b1f316c0f1727f0bdf6323a831ffe80d" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + head "https://github.com/autotrace/autotrace.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "8f46e9bf0a5498be353f53dcfb86707921065ab3b96935e90e270aa98202520c" + sha256 arm64_sequoia: "c2d1d03bc042ec69198132771c0f609e20e53bb2902ae38318803ad22a642dd5" + sha256 arm64_sonoma: "bb7e5e2c27bd3da06e535a8a06baa26600dd95e864e18bf8600a2aba988069ad" + sha256 arm64_ventura: "d976e8f28196b677548bb11fee10be185632451b5cd5a8d1b0d4752d052118b3" + sha256 arm64_monterey: "f75fb3dec8f93b6cd85ba5520010a28103a0c9259f0f4321691651f9b2f5da0f" + sha256 sonoma: "309ada11b08e9bb6477127ba861acf1ea44e2a9c4e4ef366a614d418d7c8ef55" + sha256 ventura: "1da418dcb2e3c56b24a46541728782d9e2853f9d9988f3146c151016dd7c86c6" + sha256 monterey: "21cbef75c9802414f576566503a5d570e878fbaf0d2587d40ce5773371866ab0" + sha256 arm64_linux: "2b49716451cbac5e13837244a3413197cc69e0d5358e519697d104e667f5ac4a" + sha256 x86_64_linux: "4aab08802d48a33cc4d89c858fbc7ecc61dddb7a8d1e6ec250cf8b2dda4b9f8f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "imagemagick" + depends_on "libpng" + depends_on "libtiff" + depends_on "pstoedit" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "fontconfig" + depends_on "freetype" + depends_on "gettext" + depends_on "liblqr" + depends_on "libomp" + depends_on "libtool" + depends_on "little-cms2" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + system "./autogen.sh" + system "./configure", "--enable-magick-readers", + "--mandir=#{man}", + *std_configure_args + system "make", "install" + end + + test do + system "convert", "-size", "1x1", "canvas:black", "test.png" + system "convert", "test.png", "test.bmp" + output = shell_output("#{bin}/autotrace -output-format svg test.bmp") + assert_match " :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + depends_on "m4" => :build + depends_on "perl" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "xmltoman" => :build + + depends_on "dbus" + depends_on "expat" + depends_on "gdbm" + depends_on "glib" + depends_on "libdaemon" + depends_on :linux + + def install + system "./bootstrap.sh", "--disable-silent-rules", + "--sysconfdir=#{prefix}/etc", + "--localstatedir=#{prefix}/var", + "--disable-mono", + "--disable-monodoc", + "--disable-python", + "--disable-qt4", + "--disable-qt5", + "--disable-gtk", + "--disable-gtk3", + "--disable-libevent", + "--enable-compat-libdns_sd", + "--with-distro=none", + "--with-systemdsystemunitdir=no", + *std_configure_args + system "make", "install" + + # mDNSResponder compatibility + ln_s include/"avahi-compat-libdns_sd/dns_sd.h", include/"dns_sd.h" + end + + test do + (testpath/"test.c").write <<~C + #include + + #include + #include + #include + #include + + static void avahi_client_callback (AVAHI_GCC_UNUSED AvahiClient *client, AvahiClientState state, void *userdata) + { + GMainLoop *loop = userdata; + g_message ("Avahi Client State Change: %d", state); + + if (state == AVAHI_CLIENT_FAILURE) + { + g_message ("Disconnected from the Avahi Daemon: %s", avahi_strerror(avahi_client_errno(client))); + g_main_loop_quit (loop); + } + } + + int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) + { + GMainLoop *loop = NULL; + const AvahiPoll *poll_api; + AvahiGLibPoll *glib_poll; + AvahiClient *client; + const char *version; + int error; + + avahi_set_allocator (avahi_glib_allocator ()); + loop = g_main_loop_new (NULL, FALSE); + glib_poll = avahi_glib_poll_new (NULL, G_PRIORITY_DEFAULT); + poll_api = avahi_glib_poll_get (glib_poll); + client = avahi_client_new (poll_api, 0, avahi_client_callback, loop, &error); + + if (client == NULL) + { + g_warning ("Error initializing Avahi: %s", avahi_strerror (error)); + } + + g_main_loop_unref (loop); + avahi_client_free (client); + avahi_glib_poll_free (glib_poll); + + return 0; + } + C + + pkg_config_flags = shell_output("pkg-config --cflags --libs avahi-client avahi-core avahi-glib").chomp.split + system ENV.cc, "test.c", *pkg_config_flags, "-o", "test" + assert_match "Avahi", shell_output("#{testpath}/test 2>&1", 134) + end +end diff --git a/Formula/a/avanor.rb b/Formula/a/avanor.rb new file mode 100644 index 0000000000000..9b70d32c12f5c --- /dev/null +++ b/Formula/a/avanor.rb @@ -0,0 +1,44 @@ +class Avanor < Formula + desc "Quick-growing roguelike game with easy ADOM-like UI" + homepage "https://avanor.sourceforge.net/" + url "https://downloads.sourceforge.net/project/avanor/avanor/0.5.8/avanor-0.5.8-src.tar.bz2" + sha256 "8f55be83d985470b9a5220263fc87d0a0a6e2b60dbbc977c1c49347321379ef3" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f4e7392f6932b4478f15b384de5435734302d9758907fac70bb02d70e8307ea6" + sha256 arm64_sequoia: "88abecffbb226843739fc147a93b4ba8d7feeb105f4ae7f3580ceb719c16ce8f" + sha256 arm64_sonoma: "f230abf456ef3e8f748a444f6c4909ae3d94553e6fc7dee79a871d1b7639e9a7" + sha256 arm64_ventura: "ccc57d4f9e6be0a45d01a7498cd8f4503810d6f754847ca561e0404f705ad5b7" + sha256 arm64_monterey: "44a7864d851ed2f13f69d2db72dab4f8622dd7e52e03933f54c4f1c625deb6e6" + sha256 arm64_big_sur: "6c2ae364f9e7c7ce1f3876a4ce9acb53489e9a17221646f004895ccd239e4646" + sha256 sonoma: "4bad762a39191e5bb9fa549ad6e9357c68031a1a0f0603585eb4d339956ac052" + sha256 ventura: "068723dfb7c9ce0a1c77337ed71fa3966a9bde3abd5af431d9fe80bbc6eebb5d" + sha256 monterey: "31f93f42adc5936fa370279095f656b270e0ffb3fe79f3fa163cab67d6fa3bb7" + sha256 big_sur: "fe8fbd3aed29fc9c50753000036d9c13b5e8732f687d71b061d954e83517d403" + sha256 catalina: "ecaf9be2ed4f7fac2f5cff16be121214bbbfd44477a5f3f5287ce26da94fed3e" + sha256 arm64_linux: "39d71fa50daeab0033fb05cbc656d28654effd5c1d650b8e4cbb339ef96004ec" + sha256 x86_64_linux: "99ac78a20ffc5cccb1a0b5617c9977501a41edb8823663ee4656d177fad7ed09" + end + + uses_from_macos "ncurses" + + # Upstream fix for clang: https://sourceforge.net/p/avanor/code/133/ + patch :p0 do + url "https://gist.githubusercontent.com/mistydemeo/64f47233ee64d55cb7d5/raw/c1847d7e3a134e6109ad30ce1968919dd962e727/avanor-clang.diff" + sha256 "2d24ce7b71eb7b20485d841aabffa55b25b9074f9a5dd83aee33b7695ba9d75c" + end + + def install + system "make", "DATA_DIR=#{pkgshare}/", "CC=#{ENV.cxx}", "LD=#{ENV.cxx}" + bin.install "avanor" + pkgshare.install "manual" + end + + test do + ENV["TERM"] = "xterm" + assert_match "T h e L a n d o f M y s t e r y", pipe_output(bin/"avanor", "\e", 0) + end +end diff --git a/Formula/a/avce00.rb b/Formula/a/avce00.rb new file mode 100644 index 0000000000000..accf573d81c31 --- /dev/null +++ b/Formula/a/avce00.rb @@ -0,0 +1,44 @@ +class Avce00 < Formula + desc "Make Arc/Info (binary) Vector Coverages appear as E00" + homepage "http://avce00.maptools.org/avce00/index.html" + url "http://avce00.maptools.org/dl/avce00-2.0.0.tar.gz" + sha256 "c0851f86b4cd414d6150a04820491024fb6248b52ca5c7bd1ca3d2a0f9946a40" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?avce00[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "380d933d3d32aa65c7afd933544c0f8a3d4b9fd349288627eeb6211753ad8c0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cbfe81486e3dc61f284643a89726e5d94927eaa359f3fe63664baaae8c9bc0ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3cbade903948049d8a8ce0e7d367d5740fcdd72c4f1fb67a355e1d43380c3b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9078894641a0060c43d87875285e11baab6f2a7f24c36f109f56687b2eaf5674" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5d68b4c2b28928e6f435666ae990ecc9f6ad4b082158374c24437c7d18d6a84f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9c4e10ddc6cad4b6a7001a697b8318513a09166e70fa6831ed5fdbede1e71d47" + sha256 cellar: :any_skip_relocation, sonoma: "0ac923114152eb0f5cb0dc2a5bd77f095bb10d93ef207c0a08934f52992bfe5d" + sha256 cellar: :any_skip_relocation, ventura: "eb6894812ee0f45a4922522cc2c8a38c6f023dc49be73b70209908be6c373ea3" + sha256 cellar: :any_skip_relocation, monterey: "eea33df8503aff86d07c0e10947fa54e57c579755086838aca78da96b00d4dce" + sha256 cellar: :any_skip_relocation, big_sur: "1fdd45d6a401ca88019bbd58cb3afdda23dedf706c4556e87a7cc48b1a3e952a" + sha256 cellar: :any_skip_relocation, catalina: "db71ee14a03d041413530c0974ce7703100dc3259fc0d2ea5a32fadcf7180133" + sha256 cellar: :any_skip_relocation, arm64_linux: "716bd0aa9bdbc244c1ae81d687a5d2b1755e4e94b7dc131bf08490c18147bf4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac93d6ed79eb10699125a47c23e8ece19290f75bd186a670dc25396ef32b1f86" + end + + conflicts_with "gdal", because: "both install a cpl_conv.h header" + + def install + system "make", "CC=#{ENV.cc}" + bin.install "avcimport", "avcexport", "avcdelete", "avctest" + lib.install "avc.a" + include.install Dir["*.h"] + end + + test do + touch testpath/"test" + system bin/"avctest", "-b", "test" + end +end diff --git a/Formula/a/avfs.rb b/Formula/a/avfs.rb new file mode 100644 index 0000000000000..254f127f3b648 --- /dev/null +++ b/Formula/a/avfs.rb @@ -0,0 +1,44 @@ +class Avfs < Formula + desc "Virtual file system that facilitates looking inside archives" + homepage "https://avf.sourceforge.net/" + url "https://downloads.sourceforge.net/project/avf/avfs/1.2.0/avfs-1.2.0.tar.bz2" + sha256 "a25a8ec43c1ee172624e1a4c79ce66a1b930841cdb545b725f1ec64bcabe889c" + license all_of: [ + "GPL-2.0-only", + "LGPL-2.0-only", # for shared library + "GPL-2.0-or-later", # modules/dav_ls.c + "Zlib", # zlib/* + ] + + livecheck do + url :stable + regex(%r{url=.*?/avfs[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_linux: "81825d0ffa76826644f47b69036175d85182751c891a0fcb06e27a8dd1a09a50" + sha256 x86_64_linux: "44c9d1451dd67af972b90f625e38f9a48b089dbfbbf2b76b4d2e6ac668e61eb5" + end + + depends_on "pkgconf" => :build + depends_on "bzip2" + depends_on "libfuse@2" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "xz" + depends_on "zlib" + + def install + system "./configure", "--disable-silent-rules", + "--enable-fuse", + "--enable-library", + "--with-system-zlib", + "--with-system-bzlib", + "--with-xz", + *std_configure_args + system "make", "install" + end + + test do + system bin/"avfsd", "--version" + end +end diff --git a/Formula/a/aview.rb b/Formula/a/aview.rb new file mode 100644 index 0000000000000..b72dc045969a8 --- /dev/null +++ b/Formula/a/aview.rb @@ -0,0 +1,54 @@ +class Aview < Formula + desc "ASCII-art image browser and animation viewer" + homepage "https://aa-project.sourceforge.net/" + url "https://downloads.sourceforge.net/project/aa-project/aview/1.3.0rc1/aview-1.3.0rc1.tar.gz" + sha256 "42d61c4194e8b9b69a881fdde698c83cb27d7eda59e08b300e73aaa34474ec99" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/aview[._-]v?(\d+(?:\.\d+)+(?:[a-z]+\d*)?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f995d46c12b61d831e06aa42646204b6a732b3841ba9ba9e262d3f25ac81f901" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0d6d2b0ec534cc1f23d9a43cca5d6e56afae2da62b68eb2f0675907456e0ad6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0209d8c38cb00d749453ae8525b7f54f730930f497026b01d4192c1a732deea8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bab18a87647013db5d6556072629a8e138e664a7c7b8f2154179b5eaa6379f7d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "91d8305546f435e4702c333f28d0ce8590c8b14d8b37707ff2ce398d0b618ff5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4616c937f328391a9ad212bbdd51818d97c629eeaa649ddcdf97e0332e7964bf" + sha256 cellar: :any_skip_relocation, sonoma: "9aadc4e50975200d3ed6fe3a2172a516aefece83c83c80ea56bb107b5f8f5891" + sha256 cellar: :any_skip_relocation, ventura: "093f941166a79fd776fafdf09576b47208a1a18ce02aa26f404e2b16fe74ed69" + sha256 cellar: :any_skip_relocation, monterey: "2d671edc613c82993fae031b0a2795aae4a88a19ca4051095ae174aed038b100" + sha256 cellar: :any_skip_relocation, big_sur: "7a32c517ba508c6febe9605d4c9f4d8bde9200393cd8e4dd51adeb7c6e85fb6f" + sha256 cellar: :any_skip_relocation, catalina: "ad92a0e964ccbebe685edf9c595efd420475490d255caed072985cb128a8230b" + sha256 cellar: :any_skip_relocation, arm64_linux: "3223307ac974a5f3c1c4720b8ae6f1a5f8560eb8e8fd03882c2ffba1fb5a76ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2a611a1c3b2b1c76816dffcef6b3aff9f4ea88f6fbd87729dc987c39bd7cc2a" + end + + depends_on "aalib" + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/aview/1.3.0rc1.patch" + sha256 "72a979eff325056f709cee49f5836a425635bd72078515a5949a812aa68741aa" + end + + def install + # Fix compile with newer Clang + if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-implicit-function-declaration -Wno-implicit-int" + end + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"aview", "--version" + end +end diff --git a/Formula/a/avimetaedit.rb b/Formula/a/avimetaedit.rb new file mode 100644 index 0000000000000..5bc3b5c1f2924 --- /dev/null +++ b/Formula/a/avimetaedit.rb @@ -0,0 +1,49 @@ +class Avimetaedit < Formula + desc "Tool for embedding, validating, and exporting of AVI files metadata" + homepage "https://mediaarea.net/AVIMetaEdit" + url "https://mediaarea.net/download/binary/avimetaedit/1.0.2/AVIMetaEdit_CLI_1.0.2_GNU_FromSource.tar.bz2" + sha256 "e0b83e17460d0202a54f637cb673a0c03460704e6c2cff0c2e34222efb2c11ca" + license "CC0-1.0" + + livecheck do + url "https://mediaarea.net/AVIMetaEdit/Download/Source" + regex(/href=.*?avimetaedit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3354d0e2c79d26a44be8eaa5297b6d3142b8a2754b2e9b4103a521f0209bcc4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4a0e40875df5de8808e670967741dfbf1587d033d3262754e99ab43213f63d0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4f66c36f77f301329187605c19b423905190a8856052516b6921dcf766bf1f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "27712b47badd939a9d42753a26584e98829ade7692a630944a805b649148e84f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d3954f26bd43180cb106636ff5e11e5afe66b0f77ca054bcd0c2d1ef6a97125f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e9e10cf64f7d87cdc85102dffea61ac546b0877896ff721a55857a2e80eb0475" + sha256 cellar: :any_skip_relocation, sonoma: "6f8699ec5d2e344e137f5571ecfb345f9bfdfdbad88d86f39e88f555d8018d0c" + sha256 cellar: :any_skip_relocation, ventura: "8e46ebb28eed64365f6e9e8b460aa3055216efde63561aaa8ef8f03bba8ee365" + sha256 cellar: :any_skip_relocation, monterey: "26bde1d806ea7acbee6a436e57ac7476d069dc78c64b3700b81c5473c9f9c961" + sha256 cellar: :any_skip_relocation, big_sur: "c8cbab65b9f81a1015a5550b042fcc91471b288d8e256723be694f5caf402767" + sha256 cellar: :any_skip_relocation, catalina: "f3b1bacfbd6b2c53421e97c37eaeee7783c1cda0e614e9a27ba34ae048bbb5c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "01314c71d02ebe43ef66968361d932ca27bcbfe37a498a6b8881812bd0b86427" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4358ad784993160a54dde004c372a315404352d4dfad8e1dcb7e63b232332fa8" + end + + def install + cd "Project/GNU/CLI" do + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + end + + test do + avi = "UklGRuYAAABBVkkgTElTVMAAAABoZHJsYXZpaDgAAABAnAAAlgAAAAAAAAAQCQAAAQAAAAAAAAABAAAAAAAQAA" \ + "IAAAACAAAAAAAAAAAAAAAAAAAAAAAAAExJU1R0AAAAc3RybHN0cmg4AAAAdmlkc0k0MjAAAAAAAAAAAAAAAAAB" \ + "AAAAGQAAAAAAAAABAAAABgAAAP////8AAAAAAAAAAAIAAgBzdHJmKAAAACgAAAACAAAAAgAAAAEADABJNDIwBg" \ + "AAAAAAAAAAAAAAAAAAAAAAAABMSVNUEgAAAG1vdmkwMGRjBgAAABAQEBCAgA==".unpack1("m") + (testpath/"test.avi").write avi + assert_match "test.avi,238,AVI", shell_output("#{bin}/avimetaedit --out-tech test.avi") + end +end diff --git a/Formula/a/avra.rb b/Formula/a/avra.rb new file mode 100644 index 0000000000000..3bb4f31714528 --- /dev/null +++ b/Formula/a/avra.rb @@ -0,0 +1,41 @@ +class Avra < Formula + desc "Assembler for the Atmel AVR microcontroller family" + homepage "https://github.com/Ro5bert/avra" + url "https://github.com/Ro5bert/avra/archive/refs/tags/1.4.2.tar.gz" + sha256 "cc56837be973d1a102dc6936a0b7235a1d716c0f7cd053bf77e0620577cff986" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00e1f1cfce097d5ffae9d1c99fec5a225eddc92bf806227ee55aa50c585d442f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "761db2506786dee44f9e36284b588b38692bdef86870ebacf6d90472585627cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f170628778857bc28a0cb962dc7c44904c2d4400d56e2723c3df711d05acb9d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e1534538fee5207f6bae424a84ecf108e7c0100c513a853b777b817f6baa5e89" + sha256 cellar: :any_skip_relocation, arm64_monterey: "875e98a908da8ed0978f4b7e3854579dc63dc821df67c924e4ce12c5cd194a0e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "22a03e978b90b0c87a7a7d15f63975880a8bad314c2592bf107b7bcb3d5fe5c6" + sha256 cellar: :any_skip_relocation, sonoma: "30d659e79b1dbe58516222f50deed2673bcd6a5945b01e4b04ec66aec84df77a" + sha256 cellar: :any_skip_relocation, ventura: "d1df06956805a9e7e69e5a4057535dfffa974f782637f26f92a4000e7c1f0c29" + sha256 cellar: :any_skip_relocation, monterey: "af3758871e939781a5bb4842caf21fe8db90dd2f86e3b6b08a5ce49ac00a7f86" + sha256 cellar: :any_skip_relocation, big_sur: "b1b6077185e775675dfd538ee67fab94c5e24219dd8cd76b1dbc962748572513" + sha256 cellar: :any_skip_relocation, catalina: "752edb7e9140387d4b763229ff05cdf973056a70c5a4799b63cce83c2ff18be5" + sha256 cellar: :any_skip_relocation, arm64_linux: "12e71df9eb59795607bf04ad34be2fd45cafe2b73fa1e5eeb94197d31c40b13c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db5dc219fb53c28e191c9f2a4127efe2de53a27e7526b2b0d6b705c4ff57ee69" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "make", "install", "PREFIX=#{prefix}", "OS=osx" + pkgshare.install Dir["includes/*"] + end + + test do + (testpath/"test.asm").write " .device attiny10\n ldi r16,0x42\n" + output = shell_output("#{bin}/avra -l test.lst test.asm") + assert_match "Assembly complete with no errors.", output + assert_path_exists testpath/"test.hex" + assert_match "ldi r16,0x42", File.read("test.lst") + end +end diff --git a/Formula/a/avrdude.rb b/Formula/a/avrdude.rb new file mode 100644 index 0000000000000..c6fc17ba32acd --- /dev/null +++ b/Formula/a/avrdude.rb @@ -0,0 +1,58 @@ +class Avrdude < Formula + desc "Atmel AVR MCU programmer" + homepage "https://www.nongnu.org/avrdude/" + url "https://github.com/avrdudes/avrdude/archive/refs/tags/v8.1.tar.gz" + sha256 "2d3016edd5281ea09627c20b865e605d4f5354fe98f269ce20522a5b910ab399" + license "GPL-2.0-or-later" + head "https://github.com/avrdudes/avrdude.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "3a29b8596cded5c9243cf835257352942d4bd1a1466be0423377d3a405940da6" + sha256 arm64_sequoia: "99d020ca9145a289d74a52ff001e499e76d26a8afed895d8f39d7d92f7327a8e" + sha256 arm64_sonoma: "dfb5e436dd7a172c43e4e2929451ca851ff748843276525799736e8605884343" + sha256 arm64_ventura: "29b9741bb4b29391facdc339173f61273073fbed528d3ca3dadaf804f5a51805" + sha256 sonoma: "ace8f271d4765b29bc8717d5ea758fd097e5baf31570b88b84c8d4c35e4984ca" + sha256 ventura: "a50ea68b75610e2bd9125cd753edbaeb76447bdbe4b205063fba4843571eabb7" + sha256 arm64_linux: "8ccf60c11997fbf0ceaebd78f29516467186ca20a85cf720c815d8e3fd8d7972" + sha256 x86_64_linux: "84b6fbe6bd4f0a34e03c159910960f5c3d6f2e82c58ed6bad2c1eb42ae38e342" + end + + depends_on "cmake" => :build + depends_on "hidapi" + depends_on "libftdi" + depends_on "libusb" + depends_on "libusb-compat" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_macos do + # https://github.com/avrdudes/avrdude/issues/1653 + depends_on "libelf" => :build + end + + on_linux do + depends_on "elfutils" + depends_on "readline" + end + + def install + args = std_cmake_args + ["-DCMAKE_INSTALL_SYSCONFDIR=#{etc}"] + shared_args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"] + shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup" if OS.mac? + + system "cmake", "-S", ".", "-B", "build/shared", *args, *shared_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", ".", "-B", "build/static", *args + system "cmake", "--build", "build/static" + lib.install "build/static/src/libavrdude.a" + end + + test do + output = shell_output("#{bin}/avrdude -c jtag2 -p x16a4 2>&1", 1).strip + refute_match "avrdude was compiled without usb support", output + assert_match "Avrdude done. Thank you.", output + end +end diff --git a/Formula/a/avro-c.rb b/Formula/a/avro-c.rb new file mode 100644 index 0000000000000..e5e533e1fdfd1 --- /dev/null +++ b/Formula/a/avro-c.rb @@ -0,0 +1,42 @@ +class AvroC < Formula + desc "Data serialization system" + homepage "https://avro.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.1/c/avro-c-1.12.1.tar.gz" + mirror "https://archive.apache.org/dist/avro/avro-1.12.1/c/avro-c-1.12.1.tar.gz" + sha256 "b64e31b94719499549622aa92f1d96d1742967ced261a0931b63be3bbe907f2c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bbdf1ec9340996a46133cdb5c069d0fa413f0998a05c7ff4589d1e6ae5a43a51" + sha256 cellar: :any, arm64_sequoia: "cc17f9907b085d176a5726058a266f0c251c3fbe64bddccbfa2c1cec17d9c06a" + sha256 cellar: :any, arm64_sonoma: "0b67b5f253ad41f9c2e13d79179987140a5072ceec7aa37460c2c9e3fa06f229" + sha256 cellar: :any, sonoma: "3c17d0b642d61939628c80f9a3fc6ef200b06d735bb7bf3a80007e6adf0aab1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ac05bd00f42b859e03b56503b0942c6cb423a0205ab4c444fd962994293347e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55f8e43ea2d0386f33e078a3238886d1de56e4fe843a3e4e0c525179b7189698" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jansson" + depends_on "snappy" + depends_on "xz" + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-example" do + url "https://raw.githubusercontent.com/apache/avro/88538e9f1d6be236ce69ea2e0bdd6eed352c503e/lang/c/examples/quickstop.c" + sha256 "8108fda370afb0e7be4e213d4e339bd2aabc1801dcd0b600380d81c09e5ff94f" + end + + testpath.install resource("homebrew-example") + system ENV.cc, "quickstop.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lavro" + assert_match "Silent | (555) 123-6422 | 29 |", shell_output("./test") + end +end diff --git a/Formula/a/avro-cpp.rb b/Formula/a/avro-cpp.rb new file mode 100644 index 0000000000000..d66ff1c3b1d36 --- /dev/null +++ b/Formula/a/avro-cpp.rb @@ -0,0 +1,74 @@ +class AvroCpp < Formula + desc "Data serialization system" + homepage "https://avro.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.1/cpp/avro-cpp-1.12.1.tar.gz" + mirror "https://archive.apache.org/dist/avro/avro-1.12.1/cpp/avro-cpp-1.12.1.tar.gz" + sha256 "18a0d155905a4dab0c2bfd66c742358a7d969bcff58cf6f655bcf602879f4fe7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b89b52514a01938e58227cea3df043f72c11d92517e50e612b7b21dc21a2896e" + sha256 cellar: :any, arm64_sequoia: "87b4bc2edf4027fb23b6377efc812502ee28d5824fcaa985b505cdb74b7affaa" + sha256 cellar: :any, arm64_sonoma: "3b5fd6eab8771d335bdcd737c3a36829517744a98d628ba4478ae3832f719d8c" + sha256 cellar: :any, sonoma: "fc835f42954873b7b49d89070ca917f1b441e46fa3ce2ba74a66951aac80f2ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "07d6dfb9075c7ebfe7b280a386f7ae12e05ad6359426f170de52e2333f1280ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "abb4bdc11f71daeb6474d1f46bbac5dd9d8d80bd916e1386aeb457042c37964d" + end + + depends_on "cmake" => :build + depends_on "fmt" => [:build, :test] # needed for headers + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "zstd" + + uses_from_macos "zlib" + + # Add missing cmake file from git + resource "avro-cpp-config.cmake.in" do + url "https://github.com/apache/avro/raw/refs/tags/release-1.12.1/lang/c++/cmake/avro-cpp-config.cmake.in" + sha256 "2f100bed5a5ec300bc16e618ef17c64056c165a3dba8dde590a3ef65352440fa" + end + + def install + (buildpath/"cmake").install resource("avro-cpp-config.cmake.in") + + # Boost 1.89+ no longer requires the 'system' component + boost_replacements = /Boost\s1.70\sREQUIRED\s(CONFIG\s)?COMPONENTS\s?system/ + inreplace "CMakeLists.txt" do |s| + s.gsub! boost_replacements, "Boost REQUIRED" + s.gsub! "$>", "" + s.gsub! "Boost::system ZLIB::ZLIB", "$ ZLIB::ZLIB" + end + inreplace "cmake/avro-cpp-config.cmake.in", boost_replacements, "Boost REQUIRED" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"cpx.json").write <<~JSON + { + "type": "record", + "name": "cpx", + "fields" : [ + {"name": "re", "type": "double"}, + {"name": "im", "type" : "double"} + ] + } + JSON + + (testpath/"test.cpp").write <<~CPP + #include "cpx.hh" + + int main() { + cpx::cpx number; + return 0; + } + CPP + + system bin/"avrogencpp", "-i", "cpx.json", "-o", "cpx.hh", "-n", "cpx" + system ENV.cxx, "test.cpp", "-std=c++17", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/avro-tools.rb b/Formula/a/avro-tools.rb new file mode 100644 index 0000000000000..de860efa2c59a --- /dev/null +++ b/Formula/a/avro-tools.rb @@ -0,0 +1,23 @@ +class AvroTools < Formula + desc "Avro command-line tools and utilities" + homepage "https://avro.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.1/java/avro-tools-1.12.1.jar" + mirror "https://archive.apache.org/dist/avro/avro-1.12.1/java/avro-tools-1.12.1.jar" + sha256 "eb269df172ec96f6721bf9e56182e28afd9cd72d596d035c46561f6f70a69c36" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "38d023c2825177abcf6afefb16f1806b2655da255ea6ecb664d45047e1973fac" + end + + depends_on "openjdk" + + def install + libexec.install "avro-tools-#{version}.jar" + bin.write_jar_script libexec/"avro-tools-#{version}.jar", "avro-tools" + end + + test do + assert_match "Version #{version}", shell_output("#{bin}/avro-tools 2>&1", 1) + end +end diff --git a/Formula/a/awk.rb b/Formula/a/awk.rb new file mode 100644 index 0000000000000..0a851471585e2 --- /dev/null +++ b/Formula/a/awk.rb @@ -0,0 +1,35 @@ +class Awk < Formula + desc "Text processing scripting language" + homepage "https://www.cs.princeton.edu/~bwk/btl.mirror/" + url "https://github.com/onetrueawk/awk/archive/refs/tags/20250116.tar.gz" + sha256 "e031b1e1d2b230f276f975bffb923f0ea15f798c839d15a3f26a1a39448e32d7" + license "SMLNJ" + head "https://github.com/onetrueawk/awk.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9240fc9e7ecebf530d86c2c3de58cb313f2f43c02b767f92aad88f18b58645f3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5856a1cbeffd667a6c5b806882dd171e1e07e4fc360c517879670d473e2c53d6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "120228d2017aa47ba4b3bfc5f19a036c9faae95df04d0868c2b2deb114b8a914" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1e7d70c9939caca5633d63b76cf7335e09acc043ead6161030d6509f17627c52" + sha256 cellar: :any_skip_relocation, sonoma: "8968128a1d73c936afcf91001b14acff3b61434c29da46dcc6633a0db110bafe" + sha256 cellar: :any_skip_relocation, ventura: "bcd5849c88f363e61d7b5a64ad66523b179bb0640c6ccb2d20bc73a5f16ff97e" + sha256 cellar: :any_skip_relocation, arm64_linux: "eea9d168fda5dd37f829e640f2cede4388e4def78df435d7a80d9970791a2f88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58c95f701bae773a84aac466636229ae363c15b1943ae627d2065bcb16c2bc78" + end + + uses_from_macos "bison" => :build + + on_linux do + conflicts_with "gawk", because: "both install an `awk` executable" + end + + def install + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" + bin.install "a.out" => "awk" + man1.install "awk.1" + end + + test do + assert_match "test", pipe_output("#{bin}/awk '{print $1}'", "test", 0) + end +end diff --git a/Formula/a/aws-amplify.rb b/Formula/a/aws-amplify.rb new file mode 100644 index 0000000000000..d5522258e1b09 --- /dev/null +++ b/Formula/a/aws-amplify.rb @@ -0,0 +1,54 @@ +class AwsAmplify < Formula + desc "Build full-stack web and mobile apps in hours. Easy to start, easy to scale" + homepage "https://aws.amazon.com/amplify/" + url "https://registry.npmjs.org/@aws-amplify/cli-internal/-/cli-internal-14.2.2.tgz" + sha256 "3966d8cb0259411a6cad7e9f7685c392595fd6309c21823a36694fc16d092fbd" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7246da131d5dca7f42e9fa9678562c96449a797679fe3c1f6a0ee42196f2c438" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7246da131d5dca7f42e9fa9678562c96449a797679fe3c1f6a0ee42196f2c438" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7246da131d5dca7f42e9fa9678562c96449a797679fe3c1f6a0ee42196f2c438" + sha256 cellar: :any_skip_relocation, sonoma: "8fab1c162fe7a108f9e101feee84e1d8d4c1705b0c56558a9f8a14f4f28a75ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "7246da131d5dca7f42e9fa9678562c96449a797679fe3c1f6a0ee42196f2c438" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fab1c162fe7a108f9e101feee84e1d8d4c1705b0c56558a9f8a14f4f28a75ca" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + unless Hardware::CPU.intel? + rm_r "#{libexec}/lib/node_modules/@aws-amplify/cli-internal/node_modules" \ + "/@aws-amplify/amplify-frontend-ios/resources/amplify-xcode" + end + + # Remove non-native libsqlite4java files + os = OS.kernel_name.downcase + if Hardware::CPU.intel? + arch = if OS.mac? + "x86_64" + else + "amd64" + end + elsif OS.mac? # apple silicon + arch = "aarch64" + end + node_modules = libexec/"lib/node_modules/@aws-amplify/cli-internal/node_modules" + (node_modules/"amplify-dynamodb-simulator/emulator/DynamoDBLocal_lib").glob("libsqlite4java-*").each do |f| + rm f if f.basename.to_s != "libsqlite4java-#{os}-#{arch}" + end + end + + test do + require "open3" + + Open3.popen3(bin/"amplify", "status", "2>&1") do |_, stdout, _| + assert_match "No Amplify backend project files detected within this folder.", stdout.read + end + + assert_match version.to_s, shell_output("#{bin}/amplify version") + end +end diff --git a/Formula/a/aws-auth.rb b/Formula/a/aws-auth.rb new file mode 100644 index 0000000000000..3868dc1c0cc27 --- /dev/null +++ b/Formula/a/aws-auth.rb @@ -0,0 +1,35 @@ +class AwsAuth < Formula + desc "Allows you to programmatically authenticate into AWS accounts through IAM roles" + homepage "https://github.com/iamarkadyt/aws-auth" + url "https://registry.npmjs.org/@iamarkadyt/aws-auth/-/aws-auth-2.2.4.tgz" + sha256 "79fd9c77a389e275f6a8e8bc08e5245c9699779da5621abd929a475322698146" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d586f7428e369586475c9ee9f3b4865aa181191a54bbf60f62e99e29d0cf369f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a60b04e342a6f7740665def07e9a7851d7214d47e1da66641e4b6692c7b67067" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a60b04e342a6f7740665def07e9a7851d7214d47e1da66641e4b6692c7b67067" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a60b04e342a6f7740665def07e9a7851d7214d47e1da66641e4b6692c7b67067" + sha256 cellar: :any_skip_relocation, sonoma: "c825913a0ac4b4292f691dad42ae1fd4a576cc687c9607082bd588b14734b51b" + sha256 cellar: :any_skip_relocation, ventura: "c825913a0ac4b4292f691dad42ae1fd4a576cc687c9607082bd588b14734b51b" + sha256 cellar: :any_skip_relocation, monterey: "c825913a0ac4b4292f691dad42ae1fd4a576cc687c9607082bd588b14734b51b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a60b04e342a6f7740665def07e9a7851d7214d47e1da66641e4b6692c7b67067" + end + + deprecate! date: "2025-03-14", because: :does_not_build # and :repo_removed + disable! date: "2025-10-06", because: :repo_removed + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + output = pipe_output("#{bin}/aws-auth login 2>&1", "fake123", 0) + assert_match "Enter new passphrase", output + + assert_match version.to_s, shell_output("#{bin}/aws-auth version") + end +end diff --git a/Formula/a/aws-c-auth.rb b/Formula/a/aws-c-auth.rb new file mode 100644 index 0000000000000..89ed330cc34bd --- /dev/null +++ b/Formula/a/aws-c-auth.rb @@ -0,0 +1,60 @@ +class AwsCAuth < Formula + desc "C99 library implementation of AWS client-side authentication" + homepage "https://github.com/awslabs/aws-c-auth" + url "https://github.com/awslabs/aws-c-auth/archive/refs/tags/v0.9.1.tar.gz" + sha256 "adae1e725d9725682366080b8bf8e49481650c436b846ceeb5efe955d5e03273" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8a9ee4a866559d4b733e584ce1df655cc789f10507ea99e8cb4442d97bc11d42" + sha256 cellar: :any, arm64_sequoia: "628d7eff28d87830f9e3b8930a07db8786efd86566f7b861c1dad714a3628c04" + sha256 cellar: :any, arm64_sonoma: "76e5d44197370eec47d2c553734288f1b1e167af6fe2725845eaed05949d849f" + sha256 cellar: :any, arm64_ventura: "6dbf23930d544c6aecb07e2c14cb68dfc16cef447d888d726320a555b2883004" + sha256 cellar: :any, sonoma: "6254f9445b56eef471bf35b06b14f731d37834febf83c581b88a58550a607750" + sha256 cellar: :any, ventura: "fd056f07750e90ab5f3b4871b401b4c28095ff1cede75da681547aeb2f4628bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "166b119a65f5f27402543f2b16167514f99d29f66980af5f98ced0085a122f26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "631d5a1f2d684dcbf46bbe001ec463e64ab543e894c10a5aa1e06db6bbf6b7ba" + end + + depends_on "cmake" => :build + depends_on "aws-c-cal" + depends_on "aws-c-common" + depends_on "aws-c-http" + depends_on "aws-c-io" + depends_on "aws-c-sdkutils" + + def install + args = ["-DBUILD_SHARED_LIBS=ON"] + # Avoid linkage to `aws-c-compression` + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + struct aws_credentials *credentials = aws_credentials_new_anonymous(allocator); + + assert(NULL != credentials); + assert(aws_credentials_is_anonymous(credentials)); + assert(NULL == aws_credentials_get_access_key_id(credentials).ptr); + assert(NULL == aws_credentials_get_secret_access_key(credentials).ptr); + assert(NULL == aws_credentials_get_session_token(credentials).ptr); + + aws_credentials_release(credentials); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-auth", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-cal.rb b/Formula/a/aws-c-cal.rb new file mode 100644 index 0000000000000..f8165656f7043 --- /dev/null +++ b/Formula/a/aws-c-cal.rb @@ -0,0 +1,78 @@ +class AwsCCal < Formula + desc "AWS Crypto Abstraction Layer" + homepage "https://github.com/awslabs/aws-c-cal" + url "https://github.com/awslabs/aws-c-cal/archive/refs/tags/v0.9.9.tar.gz" + sha256 "692951061684347596861a8f8fe044a271ba2b4fae796b3c361288311cd536b4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "554dfb5a943a6f3baa96982f51d1145beaad222cc4f68cc35b87338e54560ea4" + sha256 cellar: :any, arm64_sequoia: "a56cac9a8e763edad49c498ba5ac23dd721ca6399d7834fab8f237a31d925623" + sha256 cellar: :any, arm64_sonoma: "a49eed97e338be40c2335d07b17328a211c346380b7c9c582f28ff4dd827fec2" + sha256 cellar: :any, sonoma: "2abfaafe23c7f393b776871472b1257461d21f719b930b4d62b5b3d3cc980576" + sha256 cellar: :any_skip_relocation, arm64_linux: "282509a28d74d25625bfd5ec17235a4a3a8bf6931569a9d351a0456645a771db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fb13a54691e3eb40dca67a722b1444223ecfc8e4b0eac76e34de4eb9e34d2ac" + end + + depends_on "cmake" => :build + depends_on "aws-c-common" + + on_linux do + depends_on "openssl@3" + end + + def install + args = ["-DBUILD_SHARED_LIBS=ON"] + args << "-DUSE_OPENSSL=ON" if OS.linux? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + aws_cal_library_init(allocator); + + struct aws_hash *hash = aws_sha256_new(allocator); + assert(NULL != hash); + struct aws_byte_cursor input = aws_byte_cursor_from_c_str("a"); + + for (size_t i = 0; i < 1000000; ++i) { + assert(AWS_OP_SUCCESS == aws_hash_update(hash, &input)); + } + + uint8_t output[AWS_SHA256_LEN] = {0}; + struct aws_byte_buf output_buf = aws_byte_buf_from_array(output, sizeof(output)); + output_buf.len = 0; + assert(AWS_OP_SUCCESS == aws_hash_finalize(hash, &output_buf, 0)); + + uint8_t expected[] = { + 0xcd, 0xc7, 0x6e, 0x5c, 0x99, 0x14, 0xfb, 0x92, 0x81, 0xa1, 0xc7, 0xe2, 0x84, 0xd7, 0x3e, 0x67, + 0xf1, 0x80, 0x9a, 0x48, 0xa4, 0x97, 0x20, 0x0e, 0x04, 0x6d, 0x39, 0xcc, 0xc7, 0x11, 0x2c, 0xd0, + }; + struct aws_byte_cursor expected_buf = aws_byte_cursor_from_array(expected, sizeof(expected)); + assert(expected_buf.len == output_buf.len); + for (size_t i = 0; i < expected_buf.len; ++i) { + assert(expected_buf.ptr[i] == output_buf.buffer[i]); + } + + aws_hash_destroy(hash); + aws_cal_library_clean_up(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-cal", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-common.rb b/Formula/a/aws-c-common.rb new file mode 100644 index 0000000000000..60bf525c032ca --- /dev/null +++ b/Formula/a/aws-c-common.rb @@ -0,0 +1,51 @@ +class AwsCCommon < Formula + desc "Core c99 package for AWS SDK for C" + homepage "https://github.com/awslabs/aws-c-common" + url "https://github.com/awslabs/aws-c-common/archive/refs/tags/v0.12.5.tar.gz" + sha256 "02d1ab905d43a33008a63f273b27dbe4859e9f090eac6f0e3eeaf8c64a083937" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1ad6ff40df267465d0f1c2629c2a5458e833edca5ab61744e6355d975ef5243f" + sha256 cellar: :any, arm64_sequoia: "26a8725e75a099da71d4ce720c3270cb92df6cda1dd0811c9b4b1553d24f046a" + sha256 cellar: :any, arm64_sonoma: "d4b73a804c52ba4ac86c3f3436783b4dab389a3d4af055496c09a606ecd04a0a" + sha256 cellar: :any, sonoma: "fbadec428a15aab3af8ec173edaaf90f11fd1a216b7b30deadf3324a1b0b7a5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8a9b854a80e713993a9970a307378e52f838bf3b6fde871329dcf92b10747f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed2855635b883cd40ae1d5c5badd2d319b88b35b19d7bf3bb059b5ee03ffe323" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main(void) { + struct aws_uuid uuid; + assert(AWS_OP_SUCCESS == aws_uuid_init(&uuid)); + + uint8_t uuid_array[AWS_UUID_STR_LEN] = {0}; + struct aws_byte_buf uuid_buf = aws_byte_buf_from_array(uuid_array, sizeof(uuid_array)); + uuid_buf.len = 0; + + assert(AWS_OP_SUCCESS == aws_uuid_to_str(&uuid, &uuid_buf)); + uint8_t zerod_buf[AWS_UUID_STR_LEN] = {0}; + assert(AWS_UUID_STR_LEN - 1 == uuid_buf.len); + assert(0 != memcmp(zerod_buf, uuid_array, sizeof(uuid_array))); + + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-compression.rb b/Formula/a/aws-c-compression.rb new file mode 100644 index 0000000000000..2a74cfb103b9f --- /dev/null +++ b/Formula/a/aws-c-compression.rb @@ -0,0 +1,54 @@ +class AwsCCompression < Formula + desc "C99 implementation of huffman encoding/decoding" + homepage "https://github.com/awslabs/aws-c-compression" + url "https://github.com/awslabs/aws-c-compression/archive/refs/tags/v0.3.1.tar.gz" + sha256 "d89fca17a37de762dc34f332d2da402343078da8dbd2224c46a11a88adddf754" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c9e37702140dfa756eeb6c2fff4a319764847207c95d029b236212b02d91161c" + sha256 cellar: :any, arm64_sequoia: "07ad5126a62967518823503ad65c6eceedb164aaa28e8f4b817d8fb8eb6d8f2c" + sha256 cellar: :any, arm64_sonoma: "e90f0d8370adc024e41c89f650c4fd37c62e396a05d369e1b8e834bca6cf63dc" + sha256 cellar: :any, arm64_ventura: "8025bc877dd2221c32bb3527e34ee5d618156f40c972a13189857c63b0da2a56" + sha256 cellar: :any, sonoma: "cca91302bdbb311dbf40825511da49c15da10943ec8ee9bf4f0d2761a7885306" + sha256 cellar: :any, ventura: "9348145f22774820af3b513272e03e0d453b677d452671d42776fc0f735d7e4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "29653a96519fab683d1b00e0df5611e28cee7a1c1b7a4f1e4fe711ca291ece1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a52c6fef0619145315545b21c86be299989bf437e5e8eac6bbc2ed817ac51dd" + end + + depends_on "cmake" => :build + depends_on "aws-c-common" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + aws_compression_library_init(allocator); + + const char *err_name = aws_error_name(AWS_ERROR_COMPRESSION_UNKNOWN_SYMBOL); + const char *expected = "AWS_ERROR_COMPRESSION_UNKNOWN_SYMBOL"; + assert(strlen(expected) == strlen(err_name)); + for (size_t i = 0; i < strlen(expected); ++i) { + assert(expected[i] == err_name[i]); + } + + aws_compression_library_clean_up(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-compression", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-event-stream.rb b/Formula/a/aws-c-event-stream.rb new file mode 100644 index 0000000000000..2601b22467247 --- /dev/null +++ b/Formula/a/aws-c-event-stream.rb @@ -0,0 +1,62 @@ +class AwsCEventStream < Formula + desc "C99 implementation of the vnd.amazon.eventstream content-type" + homepage "https://github.com/awslabs/aws-c-event-stream" + url "https://github.com/awslabs/aws-c-event-stream/archive/refs/tags/v0.5.7.tar.gz" + sha256 "5d92abed2ed89cc1efaba3963e888d9df527296f1dbfe21c569f84ea731aa3c2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cfc0a548bc6e46ce2ba3ab96cb7dda74471c6f02b9b2ca227835f495fe50fd4c" + sha256 cellar: :any, arm64_sequoia: "66c081da6840b3767f64e9f948b243da2f660cc97fa87a1157dfdc4e48ac336b" + sha256 cellar: :any, arm64_sonoma: "772b25abbdf8a8006bf546e67e7205d52b707d55ac126409fc1e9e51c0e93003" + sha256 cellar: :any, arm64_ventura: "e6c236efcd0e084f1231dfb6af750d89e2c889253f5abfd594f3c8f533ac4aaa" + sha256 cellar: :any, sonoma: "22583145d951b5e8cc709240c5e2a4226b4471618238e4583a6fa1eb69b041aa" + sha256 cellar: :any, ventura: "4971b2d3d25d37e3f0caa323270a48daabdd2319eed62178633f73a5edc55815" + sha256 cellar: :any_skip_relocation, arm64_linux: "d03e1bd24c78f48f81057982faaba90343170ff0bfe9d21dfbaf86365df3f3f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7aed2c28c221b53dc3007abb63a213679d8cb778cd7f4503552761f87a49d80" + end + + depends_on "cmake" => :build + depends_on "aws-c-common" + depends_on "aws-c-io" + depends_on "aws-checksums" + + def install + args = ["-DBUILD_SHARED_LIBS=ON"] + # Avoid linkage to `aws-c-cal` + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + uint8_t test_data[] = { + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0xc2, 0x48, 0xeb, 0x7d, 0x98, 0xc8, 0xff}; + + struct aws_allocator *allocator = aws_default_allocator(); + struct aws_event_stream_message message; + struct aws_byte_buf test_buf = aws_byte_buf_from_array(test_data, sizeof(test_data)); + assert(AWS_OP_SUCCESS == aws_event_stream_message_from_buffer(&message, allocator, &test_buf)); + + assert(0x00000010 == aws_event_stream_message_total_length(&message)); + assert(0x00000000 == aws_event_stream_message_headers_len(&message)); + assert(0x05c248eb == aws_event_stream_message_prelude_crc(&message)); + assert(0x7d98c8ff == aws_event_stream_message_message_crc(&message)); + + aws_event_stream_message_clean_up(&message); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-event-stream", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-http.rb b/Formula/a/aws-c-http.rb new file mode 100644 index 0000000000000..8cc0664f060ad --- /dev/null +++ b/Formula/a/aws-c-http.rb @@ -0,0 +1,64 @@ +class AwsCHttp < Formula + desc "C99 implementation of the HTTP/1.1 and HTTP/2 specifications" + homepage "https://github.com/awslabs/aws-c-http" + url "https://github.com/awslabs/aws-c-http/archive/refs/tags/v0.10.7.tar.gz" + sha256 "ce9e71c3eae67b1c6c0149278e0d0929a7d928c3547de64999430c8592864ad4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a7f26111b34cc6e6166a7737110880ed463a6d72f461e3a11302b7458cade2f1" + sha256 cellar: :any, arm64_sequoia: "75b4c5cc6cd8fde7631ef352fe6666f5ae435b694a4ce4e4afba8ef7ebde77e9" + sha256 cellar: :any, arm64_sonoma: "9fdcff12d1bab1a98886151a188f6d8762be0af17b96210e012870f4bad2779a" + sha256 cellar: :any, sonoma: "d823374276406d418b7e0e27054e8ae866c5e296fe86a28da7b841a87fe097b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "85d29fcbddd521c73e19089230ec457b9f795aa0df2b95f909d586a98a08d39f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f257e6f5e39e906029d726bc8b8ff77ab6c7a616ab739368ebf828b934a601b5" + end + + depends_on "cmake" => :build + depends_on "aws-c-cal" + depends_on "aws-c-common" + depends_on "aws-c-compression" + depends_on "aws-c-io" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + struct aws_http_headers *headers = aws_http_headers_new(allocator); + assert(NULL != headers); + + char name_src[] = "Host"; + char value_src[] = "example.com"; + + assert(AWS_OP_SUCCESS == + aws_http_headers_add(headers, aws_byte_cursor_from_c_str(name_src), aws_byte_cursor_from_c_str(value_src))); + assert(1 == aws_http_headers_count(headers)); + + name_src[0] = 0; + value_src[0] = 0; + + struct aws_http_header get; + assert(AWS_OP_SUCCESS == aws_http_headers_get_index(headers, 0, &get)); + assert(aws_byte_cursor_eq_c_str(&get.name, "Host")); + assert(aws_byte_cursor_eq_c_str(&get.value, "example.com")); + + aws_http_headers_release(headers); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-http", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-io.rb b/Formula/a/aws-c-io.rb new file mode 100644 index 0000000000000..8dcf1d6c61dc7 --- /dev/null +++ b/Formula/a/aws-c-io.rb @@ -0,0 +1,59 @@ +class AwsCIo < Formula + desc "Event driven framework for implementing application protocols" + homepage "https://github.com/awslabs/aws-c-io" + url "https://github.com/awslabs/aws-c-io/archive/refs/tags/v0.23.3.tar.gz" + sha256 "cdcb31b694fc28ba96237ee33a742679daf2dcabfd41464f8a68fbd913907085" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "00f11c37fb3be3d7681c8a1f33d2cc13f660d4f4e3f1dce65c7fcac06d0fde6e" + sha256 cellar: :any, arm64_sequoia: "0bdc40aaadb99d98c7fbddd5bb65536a30077b5cf739c846139875e5d9bddf51" + sha256 cellar: :any, arm64_sonoma: "2acaceb09ca5a936022e8807fc2c63dca68190dd96d5c7e2c2d4a697479fb097" + sha256 cellar: :any, sonoma: "03752a8c1cc43922a921fdf3e0e2499a129e4fb8015cd4074dad654a595ef996" + sha256 cellar: :any_skip_relocation, arm64_linux: "271b594edd1bcc1a6ba8e1a4d8237c323fc54135ef5305522b49208d0ca1704a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98f1c1d0a00f9e3cee38810e8f7bcc498f84db17937438dd9364b45487ea9e39" + end + + depends_on "cmake" => :build + depends_on "aws-c-cal" + depends_on "aws-c-common" + + on_linux do + depends_on "s2n" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + aws_io_library_init(allocator); + + struct aws_retry_strategy *retry_strategy = aws_retry_strategy_new_no_retry(allocator, NULL); + assert(NULL != retry_strategy); + + int rv = aws_retry_strategy_acquire_retry_token(retry_strategy, NULL, NULL, NULL, 0); + assert(rv == AWS_OP_ERR); + assert(aws_last_error() == AWS_IO_RETRY_PERMISSION_DENIED); + + aws_retry_strategy_release(retry_strategy); + aws_io_library_clean_up(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-io", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-mqtt.rb b/Formula/a/aws-c-mqtt.rb new file mode 100644 index 0000000000000..e3e43d366cb50 --- /dev/null +++ b/Formula/a/aws-c-mqtt.rb @@ -0,0 +1,50 @@ +class AwsCMqtt < Formula + desc "C99 implementation of the MQTT 3.1.1 specification" + homepage "https://github.com/awslabs/aws-c-mqtt" + url "https://github.com/awslabs/aws-c-mqtt/archive/refs/tags/v0.13.3.tar.gz" + sha256 "1dfc11d6b3dc1a6d408df64073e8238739b4c50374078d36d3f2d30491d15527" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fbc29f69f9027eda095e14c2e2f230cc8d9ea1f894ee99c2340f399809a88917" + sha256 cellar: :any, arm64_sequoia: "8e08c006499b410fe17dad331e6c6b393f437b3bd3dc9d5ecbfe3bca7f03e915" + sha256 cellar: :any, arm64_sonoma: "32344e5abda84e1faa9c9bed67a75c9fb75c7a48d409f2948470de6856e1d947" + sha256 cellar: :any, arm64_ventura: "27d44efd0274a41ce0607cd6937f30b265b7ad48c4665aa7728e068b435b8e95" + sha256 cellar: :any, sonoma: "1e3fe8c6e6af3c549bd43b066faf77a52accb1cf9f37b1b61c8b804fedf93bfa" + sha256 cellar: :any, ventura: "36791013670e5b2f7be5475c6dc1d2f81c7840d816e89a4bc901054d06a2f7f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6821229b25b0c86fc065431bbf256146c6c4c374acf4dc2a641332c549f1f455" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c618725d7a3c5e236c847ff53cf18c9fa36c12b6873d208ec32d017348103cb" + end + + depends_on "cmake" => :build + depends_on "aws-c-common" + depends_on "aws-c-http" + depends_on "aws-c-io" + + def install + args = ["-DBUILD_SHARED_LIBS=ON"] + # Avoid linkage to `aws-c-cal` and `aws-c-compression` + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + aws_mqtt_library_init(allocator); + aws_mqtt_library_clean_up(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-mqtt", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-s3.rb b/Formula/a/aws-c-s3.rb new file mode 100644 index 0000000000000..ca7199e370dd4 --- /dev/null +++ b/Formula/a/aws-c-s3.rb @@ -0,0 +1,69 @@ +class AwsCS3 < Formula + desc "C99 library implementation for communicating with the S3 service" + homepage "https://github.com/awslabs/aws-c-s3" + url "https://github.com/awslabs/aws-c-s3/archive/refs/tags/v0.9.3.tar.gz" + sha256 "e035e50f8f25883ade1f03126deba56e7b0e7da04fa0274539759024adf44be8" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8f27cece99aed807799c5e093804bf6f65d601bb0ffb05fd991c5405a543418f" + sha256 cellar: :any, arm64_sequoia: "1eca74f70b6aa9c0370099149dc049e88e9896082a83eaeb7e55c71bdb3980b2" + sha256 cellar: :any, arm64_sonoma: "f411bd834768ac44b3438dc84228eafc4b495acbbcc460636dbf7c850abf439a" + sha256 cellar: :any, sonoma: "d5846c87a0ede0640793aa73266fb574492d067284471fdf1e5379d423b9c691" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d880dd2055578470a9cfdaefed42989502959ce4efe5bf9880c90b89a9631c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb5626a56ece1d3f64dcb90a223bceabbda7e6232f0c9a3a66758d3f92b6fb5d" + end + + depends_on "cmake" => :build + depends_on "aws-c-auth" + depends_on "aws-c-cal" + depends_on "aws-c-common" + depends_on "aws-c-http" + depends_on "aws-c-io" + depends_on "aws-checksums" + + def install + args = ["-DBUILD_SHARED_LIBS=ON"] + # Avoid linkage to `aws-c-compression` and `aws-c-sdkutils` + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + aws_s3_library_init(allocator); + + assert(0 == strcmp("HeadObject", aws_s3_request_type_operation_name(AWS_S3_REQUEST_TYPE_HEAD_OBJECT))); + + for (enum aws_s3_request_type type = AWS_S3_REQUEST_TYPE_UNKNOWN + 1; type < AWS_S3_REQUEST_TYPE_MAX; ++type) { + const char *operation_name = aws_s3_request_type_operation_name(type); + assert(NULL != operation_name); + assert(strlen(operation_name) > 1); + } + + assert(NULL != aws_s3_request_type_operation_name(AWS_S3_REQUEST_TYPE_UNKNOWN)); + assert(0 == strcmp("", aws_s3_request_type_operation_name(AWS_S3_REQUEST_TYPE_UNKNOWN))); + assert(0 == strcmp("", aws_s3_request_type_operation_name(AWS_S3_REQUEST_TYPE_MAX))); + assert(0 == strcmp("", aws_s3_request_type_operation_name(-1))); + + aws_s3_library_clean_up(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-s3", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-c-sdkutils.rb b/Formula/a/aws-c-sdkutils.rb new file mode 100644 index 0000000000000..40ac713d23168 --- /dev/null +++ b/Formula/a/aws-c-sdkutils.rb @@ -0,0 +1,64 @@ +class AwsCSdkutils < Formula + desc "C99 library implementing AWS SDK specific utilities" + homepage "https://github.com/awslabs/aws-c-sdkutils" + url "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.2.4.tar.gz" + sha256 "493cbed4fa57e0d4622fcff044e11305eb4fc12445f32c8861025597939175fc" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d0f34c54b3e8be0bbff43be46378156e8b5177f90091499dbd51c27969e1de2a" + sha256 cellar: :any, arm64_sequoia: "507738d55485b9455c59f6bff4a7280445483dce69963ac052190135bc53bccf" + sha256 cellar: :any, arm64_sonoma: "a5583794b7a383d70c8a3814609660b0a886482b10e520c7bbfa403b4d7a6c98" + sha256 cellar: :any, arm64_ventura: "24a84103b826055429f427388ab4c3591724cc5acc68ff9fb1118f9ee81935ce" + sha256 cellar: :any, sonoma: "6159606530f7ed2acd4b495413389c2efc43cc65a7cbb7b86dfcecfd5cf677cb" + sha256 cellar: :any, ventura: "15f6671877aa6cb73bcfc14c91b040265c5e57cbc29b523cfec3457bc9e5aeaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "50513535d8578d5536701e223d3b31f0ded0977a1d1350ce96b70913f556515f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "775f9fce83bb072b3a9d381a496bded25d40fba78a1d6a609888e58e573d3fbe" + end + + depends_on "cmake" => :build + depends_on "aws-c-common" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~'C' + #include + #include + #include + #include + + AWS_STATIC_STRING_FROM_LITERAL(s_single_simple_property_profile, "[profile foo]\nname = value"); + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + + struct aws_byte_cursor contents = aws_byte_cursor_from_string(s_single_simple_property_profile); + struct aws_byte_buf buffer; + AWS_ZERO_STRUCT(buffer); + aws_byte_buf_init_copy_from_cursor(&buffer, allocator, contents); + struct aws_profile_collection *profile_collection = + aws_profile_collection_new_from_buffer(allocator, &buffer, AWS_PST_CONFIG); + aws_byte_buf_clean_up(&buffer); + + assert(profile_collection != NULL); + assert(aws_profile_collection_get_profile_count(profile_collection) == 1); + + struct aws_string *profile_name_str = aws_string_new_from_c_str(allocator, "foo"); + const struct aws_profile *profile = aws_profile_collection_get_profile(profile_collection, profile_name_str); + aws_string_destroy(profile_name_str); + assert(profile != NULL); + + aws_profile_collection_destroy(profile_collection); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-c-sdkutils", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-cdk.rb b/Formula/a/aws-cdk.rb new file mode 100644 index 0000000000000..b75da1a60daae --- /dev/null +++ b/Formula/a/aws-cdk.rb @@ -0,0 +1,32 @@ +class AwsCdk < Formula + desc "AWS Cloud Development Kit - framework for defining AWS infra as code" + homepage "https://github.com/aws/aws-cdk" + url "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1031.1.tgz" + sha256 "dec9fc3ca1d17266e582c90513871e338c63c43c9dfcf7006bc4df3588eba7c4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "76f251a7c2f0fefd765a243bab8808bb4fc5b8189ed33e3f8fdcb850958a57fa" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove empty `node_modules` directory on macOS + rmdir libexec/"lib/node_modules/aws-cdk/node_modules" if OS.mac? + end + + test do + # `cdk init` cannot be run in a non-empty directory + mkdir "testapp" do + shell_output("#{bin}/cdk init app --language=javascript") + list = shell_output("#{bin}/cdk list") + cdkversion = shell_output("#{bin}/cdk --version") + assert_match "TestappStack", list + assert_match version.to_s, cdkversion + end + end +end diff --git a/Formula/a/aws-checksums.rb b/Formula/a/aws-checksums.rb new file mode 100644 index 0000000000000..06caca90317b7 --- /dev/null +++ b/Formula/a/aws-checksums.rb @@ -0,0 +1,52 @@ +class AwsChecksums < Formula + desc "Cross-Platform HW accelerated CRC32c and CRC32 with fallback" + homepage "https://github.com/awslabs/aws-checksums" + url "https://github.com/awslabs/aws-checksums/archive/refs/tags/v0.2.7.tar.gz" + sha256 "178e8398d98111f29150f7813a70c20ad97ab30be0de02525440355fe84ccb1d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "651646b3d9106d84eab329a87a558d55654de9141315ad1fe0f1bc01253ffade" + sha256 cellar: :any, arm64_sequoia: "b109e8f4cf42b41d08ec355d3b2abf4e55cef2451ff308130815c026556982e7" + sha256 cellar: :any, arm64_sonoma: "d162d62888aa8aae8ddcab6d6639395c452b930b6351e5fbfc32bac1a07d9465" + sha256 cellar: :any, arm64_ventura: "411782961b2ae15dbafeab24cc77f22ef3aafc58ae1d12eafd3655fee97e588f" + sha256 cellar: :any, sonoma: "5813da053800b6fff4cb6e7b091b0a24991226702ad8a2e1193d9e90a0d60285" + sha256 cellar: :any, ventura: "658f25960e74c00710c06ff1328678036b460f6e32f974ee3b1056f413628556" + sha256 cellar: :any_skip_relocation, arm64_linux: "10aed55de1097e6ce6fdbfc40f93d8b148a7ede46eea8acb2b0c068d64136dd0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cef7f2358c7998d4da746e253e360b1665290a5893dc79344d44dbfe8d334abb" + end + + depends_on "cmake" => :build + depends_on "aws-c-common" + + def install + # Intel: https://github.com/awslabs/aws-checksums/commit/e03e976974d27491740c98f9132a38ee25fb27d0 + # ARM: https://github.com/awslabs/aws-checksums/commit/d7005974347050a97b13285eb0108dd1e59cf2c4 + ENV.runtime_cpu_detection + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + struct aws_allocator *allocator = aws_default_allocator(); + const size_t len = 3 * 1024 * 1024 * 1024ULL; + const uint8_t *many_zeroes = aws_mem_calloc(allocator, len, sizeof(uint8_t)); + uint32_t result = aws_checksums_crc32_ex(many_zeroes, len, 0); + aws_mem_release(allocator, (void *)many_zeroes); + assert(0x480BBE37 == result); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-laws-checksums", + "-L#{Formula["aws-c-common"].opt_lib}", "-laws-c-common" + system "./test" + end +end diff --git a/Formula/a/aws-console.rb b/Formula/a/aws-console.rb new file mode 100644 index 0000000000000..7398e163e8a20 --- /dev/null +++ b/Formula/a/aws-console.rb @@ -0,0 +1,35 @@ +class AwsConsole < Formula + desc "Command-line to use AWS CLI credentials to launch the AWS console in a browser" + homepage "https://github.com/aws-cloudformation/rain" + url "https://github.com/aws-cloudformation/rain/archive/refs/tags/v1.23.1.tar.gz" + sha256 "37fb974ee0eb36ceb80f38f13141883f3779a81c79562d0ad15afcd74753485e" + license "Apache-2.0" + head "https://github.com/aws-cloudformation/rain.git", branch: "main" + + livecheck do + formula "rain" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "41108f285bd15406ea37a8a8fa8a2ad701d26ff6398861ac6dcacd2cb852005d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5031fcf4faff28bc4346d2bc96a9e9a86700fa97400cad285a223e245c94a468" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5031fcf4faff28bc4346d2bc96a9e9a86700fa97400cad285a223e245c94a468" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5031fcf4faff28bc4346d2bc96a9e9a86700fa97400cad285a223e245c94a468" + sha256 cellar: :any_skip_relocation, sonoma: "04a3b06b6d14ed8c797ead0b5c54d88c272be22869fd7c1dd6186eae7d3853f2" + sha256 cellar: :any_skip_relocation, ventura: "04a3b06b6d14ed8c797ead0b5c54d88c272be22869fd7c1dd6186eae7d3853f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "59984e965ed6fc885be49ff46239b60597f3e862582934d3cda503d42641f962" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75e873fb45886368b0cefb0ed08483b03148202a0a0ce934c7dc4754102e450e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/aws-console" + end + + test do + # No other operation is possible without valid AWS credentials configured + output = shell_output("#{bin}/aws-console 2>&1", 1) + assert_match "a region was not specified. You can run 'aws configure' or choose a profile with a region", output + end +end diff --git a/Formula/a/aws-crt-cpp.rb b/Formula/a/aws-crt-cpp.rb new file mode 100644 index 0000000000000..0b9e8c00cc6ca --- /dev/null +++ b/Formula/a/aws-crt-cpp.rb @@ -0,0 +1,61 @@ +class AwsCrtCpp < Formula + desc "C++ wrapper around the aws-c-* libraries" + homepage "https://github.com/awslabs/aws-crt-cpp" + url "https://github.com/awslabs/aws-crt-cpp/archive/refs/tags/v0.35.2.tar.gz" + sha256 "9d53d7018994a5f7fc879d397032b72ad88b1585a8cc07e2c8c339ae427f0577" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e60118db2e66baba29cf41ef5ffc700a99b89d212a1855d065886596f819f249" + sha256 cellar: :any, arm64_sequoia: "f7e78ef5f2f0ebeb997b7f744db22b191e2b1970d85af6579acd19504901175c" + sha256 cellar: :any, arm64_sonoma: "9ec54417b3b905c7bcda2a1eff2a2501fcdef4f0ef2f1714ca824cb0738dd38e" + sha256 cellar: :any, sonoma: "e6695159cd7caf5e93decc36dc1844520ca24c833e74506714830cbb64feba09" + sha256 cellar: :any_skip_relocation, arm64_linux: "f71fc8617a033177f7cba0076db516d719731a3d0fbb3e2b1368e915c38d04ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccfc70760e482bebf5cd979c2963f04d31575e2f68db1a9f93d0c041a0d9ebd8" + end + + depends_on "cmake" => :build + depends_on "aws-c-auth" + depends_on "aws-c-cal" + depends_on "aws-c-common" + depends_on "aws-c-event-stream" + depends_on "aws-c-http" + depends_on "aws-c-io" + depends_on "aws-c-mqtt" + depends_on "aws-c-s3" + depends_on "aws-c-sdkutils" + depends_on "aws-checksums" + + def install + args = %W[ + -DBUILD_DEPS=OFF + -DBUILD_SHARED_LIBS=ON + -DCMAKE_MODULE_PATH=#{Formula["aws-c-common"].opt_lib}/cmake + ] + # Avoid linkage to `aws-c-compression` + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() { + Aws::Crt::ApiHandle apiHandle(Aws::Crt::DefaultAllocatorImplementation()); + uint8_t data[32] = {0}; + Aws::Crt::ByteCursor dataCur = Aws::Crt::ByteCursorFromArray(data, sizeof(data)); + assert(0x190A55AD == Aws::Crt::Checksum::ComputeCRC32(dataCur)); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-L#{lib}", "-laws-crt-cpp" + system "./test" + end +end diff --git a/Formula/a/aws-elasticbeanstalk.rb b/Formula/a/aws-elasticbeanstalk.rb new file mode 100644 index 0000000000000..97d60a13d09d7 --- /dev/null +++ b/Formula/a/aws-elasticbeanstalk.rb @@ -0,0 +1,169 @@ +class AwsElasticbeanstalk < Formula + include Language::Python::Virtualenv + + desc "Client for Amazon Elastic Beanstalk web service" + homepage "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html" + url "https://files.pythonhosted.org/packages/a1/76/03fcfe7e8db30187a301eaebee915df26eebea23650687d176fc1cee6ffa/awsebcli-3.25.2.tar.gz" + sha256 "ae7622dfccac4dc13b79a50dedd8fa886b7cc805ee297ea4dd96bd7c0756dbbf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fab308fd356770a90695b183b3107b009b7731cc5494020bc43411640603ac3b" + sha256 cellar: :any, arm64_sequoia: "a97459117a2748d61010be8e36c7caa9b3d1c6274679e05afa4e302271b4bfe4" + sha256 cellar: :any, arm64_sonoma: "2c4cf69df213ed58d2faead5ada7e6e3b430f821e62ce87ed4e0f0aec98d822e" + sha256 cellar: :any, sonoma: "375cffa45cc9f0ec1687f3ba796429f777a09c9aa723f0df66a9623ea745b5bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "baad1a76e5b36d453a51d798f0fbf1b51e9b537f183cccf8d319a6a80baa2085" + sha256 cellar: :any_skip_relocation, x86_64_linux: "294745bb556dfac99c92a26d270e55701881af970bb3bdcfe54460944d469e29" + end + + depends_on "rust" => :build # for bcrypt + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: ["certifi", "cryptography"] + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "blessed" do + url "https://files.pythonhosted.org/packages/7c/51/a72df7730aa34a94bc43cebecb7b63ffa42f019868637dbeb45e0620d26e/blessed-1.22.0.tar.gz" + sha256 "1818efb7c10015478286f21a412fcdd31a3d8b94a18f6d926e733827da7a844b" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/28/a3/81d3a47c2dbfd76f185d3b894f2ad01a75096c006a2dd91f237dca182188/botocore-1.40.61.tar.gz" + sha256 "a2487ad69b090f9cccd64cf07c7021cd80ee9c0655ad974f87045b02f3ef52cd" + end + + resource "cement" do + url "https://files.pythonhosted.org/packages/49/a9/94696dcf1483eac1c25f278d79d67c408a170414daa1f7522b96b8afd01d/cement-2.10.14.tar.gz" + sha256 "342e27db54a6616dd1892ed0bb3597a227cee33dc2d85560426df17fca907058" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "fabric" do + url "https://files.pythonhosted.org/packages/0d/3f/337f278b70ba339c618a490f6b8033b7006c583bd197a897f12fbc468c51/fabric-3.2.2.tar.gz" + sha256 "8783ca42e3b0076f08b26901aac6b9d9b1f19c410074e7accfab902c184ff4a3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "semantic-version" do + url "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz" + sha256 "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + ENV["SODIUM_INSTALL"] = "system" + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/eb init --region=us-east-1 --profile=homebrew-test", 4) + assert_match("ERROR: InvalidProfileError - The config profile (homebrew-test) could not be found", output) + end +end diff --git a/Formula/a/aws-es-proxy.rb b/Formula/a/aws-es-proxy.rb new file mode 100644 index 0000000000000..fdef20de49557 --- /dev/null +++ b/Formula/a/aws-es-proxy.rb @@ -0,0 +1,55 @@ +class AwsEsProxy < Formula + desc "Small proxy between HTTP client and AWS Elasticsearch" + homepage "https://github.com/abutaha/aws-es-proxy" + url "https://github.com/abutaha/aws-es-proxy/archive/refs/tags/v1.5.tar.gz" + sha256 "ac6dca6cc271f57831ccf4a413e210d175641932e13dcd12c8d6036e8030e3a5" + license "Apache-2.0" + head "https://github.com/abutaha/aws-es-proxy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae88a4d6f9708c3dfdebe1473f65c6b1063b79e526f99fd7cb0cfef999dbf431" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c0415a87ec2804d034902df0cd3ada2a5085706236e2b73f68c45dbf99fdd1e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b120ad6ea167aba79f5bf38cb52a67efc6611adcb8fbae3b75207e1a04f9ea64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b2b1415650725652e3282217d2c09464410645b225f954101259df3827b4a135" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b2b1415650725652e3282217d2c09464410645b225f954101259df3827b4a135" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b2b1415650725652e3282217d2c09464410645b225f954101259df3827b4a135" + sha256 cellar: :any_skip_relocation, sonoma: "7ea23d1d458a4ef45083c46678463884d07f2dd0fdfc47296698a9ee41d5cc35" + sha256 cellar: :any_skip_relocation, ventura: "ca006b5fff25e619563f739d83881a461d0c763c9501d144b355da1940075468" + sha256 cellar: :any_skip_relocation, monterey: "ca006b5fff25e619563f739d83881a461d0c763c9501d144b355da1940075468" + sha256 cellar: :any_skip_relocation, big_sur: "ca006b5fff25e619563f739d83881a461d0c763c9501d144b355da1940075468" + sha256 cellar: :any_skip_relocation, arm64_linux: "17fb4900682979bce53761826f3a8e1f9bd091fa851f19cfb5aa8d034e0adb52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11d0bf2df2385efb683589d960858d194c89ba11db563faebc76d6405f07c078" + end + + depends_on "go" => :build + + # patch to add the missing go.sum file, remove in next release + patch do + url "https://github.com/abutaha/aws-es-proxy/commit/5a40bd821e26ce7b6827327f25b22854a07b8880.patch?full_index=1" + sha256 "b604cf8d51d3d325bd9810feb54f7bb1a1a7a226cada71a08dd93c5a76ffc15f" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + def caveats + <<~EOS + Before you can use these tools you must export some variables to your $SHELL. + export AWS_ACCESS_KEY="" + export AWS_SECRET_KEY="" + export AWS_CREDENTIAL_FILE="" + EOS + end + + test do + address = "127.0.0.1:#{free_port}" + endpoint = "https://dummy-host.eu-west-1.es.amazonaws.com" + + fork { exec bin/"aws-es-proxy", "-listen=#{address}", "-endpoint=#{endpoint}" } + sleep 2 + + output = shell_output("curl --silent #{address}") + assert_match "Failed to sign", output + end +end diff --git a/Formula/a/aws-google-auth.rb b/Formula/a/aws-google-auth.rb new file mode 100644 index 0000000000000..8d6df5f10c835 --- /dev/null +++ b/Formula/a/aws-google-auth.rb @@ -0,0 +1,189 @@ +class AwsGoogleAuth < Formula + include Language::Python::Virtualenv + + desc "Acquire AWS credentials using Google Apps" + homepage "https://github.com/cevoaustralia/aws-google-auth" + url "https://files.pythonhosted.org/packages/32/4c/3a1dd1781c9d3bb4a85921b3d3e6e32fc0f0bad61ace6a8e1bd1a59c5ba0/aws-google-auth-0.0.38.tar.gz" + sha256 "7a044636df2f0ce6ceb01f8f57aba0b6a79ae58a91bef788b0ccc6474914e8ee" + license "MIT" + revision 13 + head "https://github.com/cevoaustralia/aws-google-auth.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9c62eca85780e19cf59e3753dec52e28f2c9da04f0b251ceb278dc9cda4d056" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b04aab58b6a502c142597b70a4808b97e01beb98ca2e0e1eba36744bdf6b45cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0225fcfece48863bf0f2b90ae26973ecf67b7252520519cf654012a4acccc207" + sha256 cellar: :any_skip_relocation, sonoma: "100e585b65e81171ba4d4ecd5269881f367282198da41848d86bb4fbcd524176" + sha256 cellar: :any_skip_relocation, arm64_linux: "66856f14f69119ca77c8a25d571341c4b30613572fc4631536649efc5a952f4c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "239aa71582bc404c2e92507ee346e2de9d484d539798459514f2479bd1a09ab2" + end + + depends_on "certifi" + depends_on "pillow" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_linux do + depends_on "cryptography" + end + + pypi_packages exclude_packages: ["certifi", "pillow"] + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/50/d8/a279c054e0c9731172f05b3d118f3ffc9d74806657f84fc0c93c42d1bb5d/boto3-1.40.55.tar.gz" + sha256 "27e35b4fa9edd414ce06c1a748bf57cacd8203271847d93fc1053e4a4ec6e1a9" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/a4/92/dce4842b2e215d213d34b064fcdd13c6a782c43344e77336bcde586e9229/botocore-1.40.55.tar.gz" + sha256 "79b6472e2de92b3519d44fc1eec8c5feced7f99a0d10fdea6dc93133426057c1" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "configparser" do + url "https://files.pythonhosted.org/packages/8b/ac/ea19242153b5e8be412a726a70e82c7b5c1537c83f61b20995b2eda3dcd7/configparser-7.2.0.tar.gz" + sha256 "b629cc8ae916e3afbd36d1b3d093f34193d851e11998920fdcfc4552218b7b70" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "keyrings-alt" do + url "https://files.pythonhosted.org/packages/5c/7b/e3bf53326e0753bee11813337b1391179582ba5c6851b13e0d9502d15a50/keyrings_alt-5.0.2.tar.gz" + sha256 "8f097ebe9dc8b185106502b8cdb066c926d2180e13b4689fd4771a3eab7d69fb" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "jeepney" do + on_linux do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + end + end + + resource "secretstorage" do + on_linux do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + end + + # Drop distutils for 3.13: https://github.com/cevoaustralia/aws-google-auth/pull/277 + patch do + url "https://github.com/cevoaustralia/aws-google-auth/commit/43720916af88d485a914c9d35288b23817e2ae3f.patch?full_index=1" + sha256 "1ba699bbddb2e696282c4ccca693f99501b3e4b648252c890aab4ef98e668d85" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/aws-google-auth --version") + + require "pty" + PTY.spawn(bin/"aws-google-auth") do |r, _w, pid| + sleep 5 + Process.kill "TERM", pid + assert_match "AWS Region:", r.read_nonblock(1024) + end + end +end diff --git a/Formula/a/aws-iam-authenticator.rb b/Formula/a/aws-iam-authenticator.rb new file mode 100644 index 0000000000000..94825e36769cf --- /dev/null +++ b/Formula/a/aws-iam-authenticator.rb @@ -0,0 +1,49 @@ +class AwsIamAuthenticator < Formula + desc "Use AWS IAM credentials to authenticate to Kubernetes" + homepage "https://github.com/kubernetes-sigs/aws-iam-authenticator" + url "https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/refs/tags/v0.7.8.tar.gz" + sha256 "d1d4c929412698fbe63287bd95aabce8c16634349d04613f3f8238e73efebc2c" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/aws-iam-authenticator.git", branch: "master" + + # Upstream has marked a version as "pre-release" in the past, so we check + # GitHub releases instead of Git tags. Upstream also doesn't always mark the + # highest version as the "Latest" release, so we have to use the + # `GithubReleases` strategy (instead of `GithubLatest`) for now. + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40a3b458f803ea858c05753808acf464a7d8632c5d20e0f96638be25ab63f5ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30b00798e3db33efc9b42ba48699c0d8e02b55b36c2865c300494aba78d0c67f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "102c406bfeb5e1f6366fa178913c2b8e9b8320babade82a544c616567a9db82d" + sha256 cellar: :any_skip_relocation, sonoma: "f8d9735769b97d46db97322e28191afb4b3ba8e5b7154a7861f5e65a39bba5b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "37b5b051cf5b6d2b4da91dbf3e023613abc9b497ac0a4f9a55099067fe880db3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e69bc2c2f729cc788cc0a3763c0d50e61996df086c501589c4c33bf88b13e8d7" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/aws-iam-authenticator/pkg.Version=#{version} + -X sigs.k8s.io/aws-iam-authenticator/pkg.CommitID=#{tap.user} + -buildid= + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/aws-iam-authenticator" + end + + test do + output = shell_output("#{bin}/aws-iam-authenticator version") + assert_match %Q("Version":"#{version}"), output + + system bin/"aws-iam-authenticator", "init", "-i", "test" + contents = Dir.entries(".") + ["cert.pem", "key.pem", "aws-iam-authenticator.kubeconfig"].each do |created| + assert_includes contents, created + end + end +end diff --git a/Formula/a/aws-keychain.rb b/Formula/a/aws-keychain.rb new file mode 100644 index 0000000000000..e6b783dd2d629 --- /dev/null +++ b/Formula/a/aws-keychain.rb @@ -0,0 +1,26 @@ +class AwsKeychain < Formula + desc "Uses macOS keychain for storage of AWS credentials" + homepage "https://github.com/pda/aws-keychain" + url "https://github.com/pda/aws-keychain/archive/refs/tags/v3.0.0.tar.gz" + sha256 "3c9882d3b516b629303ca9a045fc50f6eb75fda25cd2452f10c47eda205e051f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "07b563b515bc0baa71f648ce63989009e50160d6ef87bd821e045be451cffb53" + end + + depends_on :macos + + def install + bin.install "aws-keychain" + end + + test do + # It is not possible to create a new keychain without triggering a prompt. + assert_match "Store multiple AWS IAM access keys", + shell_output("#{bin}/aws-keychain --help", 1) + end +end diff --git a/Formula/a/aws-lc.rb b/Formula/a/aws-lc.rb new file mode 100644 index 0000000000000..5ae4d6f815882 --- /dev/null +++ b/Formula/a/aws-lc.rb @@ -0,0 +1,51 @@ +class AwsLc < Formula + desc "General-purpose cryptographic library" + homepage "https://github.com/aws/aws-lc" + url "https://github.com/aws/aws-lc/archive/refs/tags/v1.63.0.tar.gz" + sha256 "8cbfe34e49c9a8ab836a72173e8b919b12dc9605252f25c667358ddc3f2d9c6b" + license all_of: ["Apache-2.0", "ISC", "OpenSSL", "MIT", "BSD-3-Clause"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7a9289c48d87713dc6a924891d5c4755661f8de2ca81647ca162ecbf15e64d49" + sha256 cellar: :any, arm64_sequoia: "683f7677dc1c2733920645b67a6832a8238c271c488cb81623c2cc877dc87299" + sha256 cellar: :any, arm64_sonoma: "acfad2d91e319f824481f990db52a2b50a6f29f5212d9a9f16341e0244f4fa60" + sha256 cellar: :any, sonoma: "960476b14bd2fa7e6604024ba35be8d7536d22f7b557b60ba58339c4c0525b84" + sha256 cellar: :any_skip_relocation, arm64_linux: "682a5ce7aea14ce17253fcb9ebbb9fdce7ca672d5d01ff4d4199a8b1265603da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df90153d3138886e5c0c890561ef24b9df4f15dc1ca9c98f38dba177ccf7c7d6" + end + + keg_only "it conflicts with OpenSSL" + + depends_on "cmake" => :build + depends_on "go" => :build + + uses_from_macos "perl" + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_BINDIR=bin + -DCMAKE_INSTALL_INCLUDEDIR=include + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + + # The jitter entropy collector must be built without optimisations + ENV.O0 { system "cmake", "--build", "build", "--target", "jitterentropy" } + + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"testfile.txt").write("This is a test file") + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" + output = shell_output("#{bin}/bssl sha256sum testfile.txt") + assert_match expected_checksum, output + end +end diff --git a/Formula/a/aws-nuke.rb b/Formula/a/aws-nuke.rb new file mode 100644 index 0000000000000..51108e74a50e4 --- /dev/null +++ b/Formula/a/aws-nuke.rb @@ -0,0 +1,42 @@ +class AwsNuke < Formula + desc "Nuke a whole AWS account and delete all its resources" + homepage "https://github.com/ekristen/aws-nuke" + url "https://github.com/ekristen/aws-nuke/archive/refs/tags/v3.61.0.tar.gz" + sha256 "3a767a76cdd8e451e7c59c51c1593386a2bf5c98438d9313f9cac8d6f584dce0" + license "MIT" + head "https://github.com/ekristen/aws-nuke.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1e8d4a7e14fc976529d33318f888e5fb12360b2c9b9bf75e66105f469a400207" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e8d4a7e14fc976529d33318f888e5fb12360b2c9b9bf75e66105f469a400207" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e8d4a7e14fc976529d33318f888e5fb12360b2c9b9bf75e66105f469a400207" + sha256 cellar: :any_skip_relocation, sonoma: "30f37a8d6ef2e83d4aacd47f65cd2c8d97f7174e4b86c26f6bf65ef0046d7feb" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9f12f57d35742f2d130de8b8dd2ecc786fd25c4365731b138e8c84c680b4f54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b201e4c32c0e2d114d1475472860cc1526594f6c16273dc2e90e0e5ce27b866" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/ekristen/aws-nuke/v#{version.major}/pkg/common.SUMMARY=#{version} + ] + ENV["CGO_ENABLED"] = "0" + system "go", "build", *std_go_args(ldflags:) + + pkgshare.install "pkg/config" + + generate_completions_from_executable(bin/"aws-nuke", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/aws-nuke --version") + assert_match "InvalidClientTokenId", shell_output( + "#{bin}/aws-nuke run --config #{pkgshare}/config/testdata/example.yaml \ + --access-key-id fake --secret-access-key fake 2>&1", + 1, + ) + assert_match "IAMUser", shell_output("#{bin}/aws-nuke resource-types") + end +end diff --git a/Formula/a/aws-rotate-key.rb b/Formula/a/aws-rotate-key.rb new file mode 100644 index 0000000000000..c09317bbcf8e6 --- /dev/null +++ b/Formula/a/aws-rotate-key.rb @@ -0,0 +1,36 @@ +class AwsRotateKey < Formula + desc "Easily rotate your AWS access key" + homepage "https://github.com/stefansundin/aws-rotate-key" + url "https://github.com/stefansundin/aws-rotate-key/archive/refs/tags/v1.2.0.tar.gz" + sha256 "91568ad7aeb849454ac066c44303e2b97e158dc094a90af43c8c9b3dc5cc4ed7" + license "MIT" + head "https://github.com/stefansundin/aws-rotate-key.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e59f500cb777981b12d0c2c2cabf293036235bd8c962888c83c3886f2b08850" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51c9c9e83de0683c2a79db2c926ed216dd5801602bd2a7796386a64f0964d258" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51c9c9e83de0683c2a79db2c926ed216dd5801602bd2a7796386a64f0964d258" + sha256 cellar: :any_skip_relocation, arm64_ventura: "51c9c9e83de0683c2a79db2c926ed216dd5801602bd2a7796386a64f0964d258" + sha256 cellar: :any_skip_relocation, sonoma: "9430280fe49a0045dbb0664c3c29e8159e4716d87a33bc66a68cf2247a311219" + sha256 cellar: :any_skip_relocation, ventura: "9430280fe49a0045dbb0664c3c29e8159e4716d87a33bc66a68cf2247a311219" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed1c92bf08bb8ad18011883c64d164e25b8191f9781e3de86d953ad540193d89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c01910c4f482e31fa3f2980df4a370d7b7482ee199f16f47f2414d58ced1fc3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"credentials").write <<~EOF + [default] + aws_access_key_id=AKIA123 + aws_secret_access_key=abc + EOF + output = shell_output("AWS_SHARED_CREDENTIALS_FILE=#{testpath}/credentials #{bin}/aws-rotate-key -y 2>&1", 1) + assert_match "InvalidClientTokenId: The security token included in the request is invalid", output + end +end diff --git a/Formula/a/aws-sam-cli.rb b/Formula/a/aws-sam-cli.rb new file mode 100644 index 0000000000000..c788dee47f9fe --- /dev/null +++ b/Formula/a/aws-sam-cli.rb @@ -0,0 +1,413 @@ +class AwsSamCli < Formula + include Language::Python::Virtualenv + + desc "CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM" + homepage "https://aws.amazon.com/serverless/sam/" + url "https://files.pythonhosted.org/packages/ad/72/1e2ecd4b2b453b9d3eef2ca38d854658b09436a14eff2cdf82412c81ff85/aws_sam_cli-1.145.2.tar.gz" + sha256 "5f5e6256ea625f64ca4e2d451c59f4a033c78a80c16c203875e282c0b7774ec7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "63982db80d9221d3adbe5518f8671f4d5e763dc7b266d97163ff7722a0d67ff7" + sha256 cellar: :any, arm64_sequoia: "6572481978730149e11829f7cf8e5b0b8922c5b3448bb4b54ca5a08c39fa7427" + sha256 cellar: :any, arm64_sonoma: "f885f370a2b6a27f6b25f3e85367875e048f80a24e0179764cebf11431695b82" + sha256 cellar: :any, sonoma: "a8d5d5a6ac2eb51b7b4d5b9b9091e23a634adaeea43837b36dee6d7c4e90aca8" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7982382fe1e1680d57f5fc4367930a7c4aaa510b6439cad28c16e7d76d53679" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a0da9712afb4bc445ac6d14204f064ae16980cd3fca5cb38b01e8ca63f299e8" + end + + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libffi" + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core rpds-py] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "aws-lambda-builders" do + url "https://files.pythonhosted.org/packages/b7/77/32ad8ba660029b8e78a38e1e034ad4c32e408517b7329bafdb9d6f9c7a05/aws_lambda_builders-1.58.0.tar.gz" + sha256 "95bf2a502bd9cf5abc14b1a27e9d0c7378cf261abb52373ea16be7ca22b7e812" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/e8/7f/db344c656949fa286ff8a14ff2c64355b6ca0cb6ebaf260678041acb8d9c/aws_sam_translator-1.101.0.tar.gz" + sha256 "234c1ca29d47f2cd276858371d4a646bc5cdb0de1e07724721d9358d6de005aa" + end + + resource "binaryornot" do + url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" + sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/9c/8d/70929dde76e24f252d6cf1fb3224ff5694ca96451d9e7023a43555fab760/boto3-1.40.56.tar.gz" + sha256 "c1afdb04dd27418fc58400434ab8e05998bb452b69c428168d9ada344fe6b93e" + end + + resource "boto3-stubs" do + url "https://files.pythonhosted.org/packages/35/c8/06584145c4ccc80e3297a97874bfaa43e6b2fb9f8a69bcc38e29a1457bf5/boto3_stubs-1.40.50.tar.gz" + sha256 "29828adfcb8629b5e285468eb89610f1fc71f964ad0913de3049a0a9d5de0be1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/03/e48e32cd73a7f82bae267320f435526bb6c7ec8d3d72d69febd4ec5b8ee9/botocore-1.40.56.tar.gz" + sha256 "b29df3418a299609632cab240ee79275463b176ebeb3adc841ba367a3fa0c4db" + end + + resource "botocore-stubs" do + url "https://files.pythonhosted.org/packages/48/ea/f174fc13a6e150021d6a0c51e58dc14d9730d319bdefc721bd7562ae513f/botocore_stubs-1.40.56.tar.gz" + sha256 "aa9535b8a0f7135b062504e39e7cbc83fb3f00b2d4dc2baba6170436b494b696" + end + + resource "cfn-lint" do + url "https://files.pythonhosted.org/packages/cd/3e/0e653b305bf8f77d377943e7294176bdc4b1db9d29c989c1cc6255f7ac40/cfn_lint-1.40.2.tar.gz" + sha256 "5822b2c90f7f2646823a47db9df7a60c23df46bbac34b2081d8a0b3b806c91eb" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "chevron" do + url "https://files.pythonhosted.org/packages/15/1f/ca74b65b19798895d63a6e92874162f44233467c9e7c1ed8afd19016ebe9/chevron-0.14.0.tar.gz" + sha256 "87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "cookiecutter" do + url "https://files.pythonhosted.org/packages/52/17/9f2cd228eb949a91915acd38d3eecdc9d8893dde353b603f0db7e9f6be55/cookiecutter-2.6.0.tar.gz" + sha256 "db21f8169ea4f4fdc2408d48ca44859349de2647fbe494a9d6c3edfc0542c21c" + end + + resource "dateparser" do + url "https://files.pythonhosted.org/packages/a9/30/064144f0df1749e7bb5faaa7f52b007d7c2d08ec08fed8411aba87207f68/dateparser-1.2.2.tar.gz" + sha256 "986316f17cb8cdc23ea8ce563027c5ef12fc725b6fb1d137c14ca08777c5ecf7" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz" + sha256 "bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "mpmath" do + url "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz" + sha256 "7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f" + end + + resource "mypy-boto3-apigateway" do + url "https://files.pythonhosted.org/packages/2b/4c/c8de2ecbafde4de3ec8fc935726fe672c11f563d37bf70d8e68df8502be6/mypy_boto3_apigateway-1.40.0.tar.gz" + sha256 "99f3134375d25470e34e340463f10bd71ab8b7429168fc06d8dbb43f0b1b937a" + end + + resource "mypy-boto3-cloudformation" do + url "https://files.pythonhosted.org/packages/8c/2c/140b6b0d74afa4854edb3b3e640ff96c711270f27711ad1325cecc5661c1/mypy_boto3_cloudformation-1.40.44.tar.gz" + sha256 "3d82f5504382c86ad195a1b80a2a82f73587c37e1b636864ebb85dd43bd79a5b" + end + + resource "mypy-boto3-ecr" do + url "https://files.pythonhosted.org/packages/61/10/076d964b9aa733ddf2e1a60e0ebd1b46afe2d9ce56eea29ee7e60f0eaabf/mypy_boto3_ecr-1.40.0.tar.gz" + sha256 "7733e42bc8a92ffd93bebf0343af133fd52698ffebd323d82ffde755ce28687f" + end + + resource "mypy-boto3-iam" do + url "https://files.pythonhosted.org/packages/69/7c/fdec1447883fb90470b7cb1917a32923583e7bcfa4b592e8f9f5871cd1a7/mypy_boto3_iam-1.40.0.tar.gz" + sha256 "b900ac557375428f0bbc37aa24fdd2901e2db7018ae44e0aaf99ec0f84a28d44" + end + + resource "mypy-boto3-kinesis" do + url "https://files.pythonhosted.org/packages/75/ea/b1ccfd706bc5ccccf4a88e324c2426b7fd9dabd7cf4ed07206840572713b/mypy_boto3_kinesis-1.40.0.tar.gz" + sha256 "4f74f715e23a8dce062b40f6a4f2ff1023cec6f41b4521f0bc15679883a7e68e" + end + + resource "mypy-boto3-lambda" do + url "https://files.pythonhosted.org/packages/27/af/0bce015eb183a5bd43a90774ef995e183c44a150c105361cd8ed629d2d18/mypy_boto3_lambda-1.40.50.tar.gz" + sha256 "a709e0ac6940783aad08ff5cf98c789a215840bab17e468ca5e22305ad0aea05" + end + + resource "mypy-boto3-s3" do + url "https://files.pythonhosted.org/packages/00/b8/55d21ed9ca479df66d9892212ba7d7977850ef17aa80a83e3f11f31190fd/mypy_boto3_s3-1.40.26.tar.gz" + sha256 "8d2bfd1052894d0e84c9fb9358d838ba0eed0265076c7dd7f45622c770275c99" + end + + resource "mypy-boto3-schemas" do + url "https://files.pythonhosted.org/packages/3f/7d/e722babaac6cc303ab317c6872cb2761d17c7a9b0852722363428a9ebad3/mypy_boto3_schemas-1.40.19.tar.gz" + sha256 "70d0066555d9283c5f535c7dd9c04761ad8c9551426854d510db77a5bb18a5c6" + end + + resource "mypy-boto3-secretsmanager" do + url "https://files.pythonhosted.org/packages/c5/d4/046dd85e0914a924ec95449d698e1ae15e698ed880e1a95ae8bf8c8d8a1b/mypy_boto3_secretsmanager-1.40.0.tar.gz" + sha256 "f6509365d5d4fe3260703badcef5a1c45455ed454e5f03f3573a5023cc176644" + end + + resource "mypy-boto3-signer" do + url "https://files.pythonhosted.org/packages/38/8a/dbd8aa981b72b4481441d2f7c0e4d21522b6b0aec3d296cf05d6b2966147/mypy_boto3_signer-1.40.55.tar.gz" + sha256 "07ad05fd0d8594bb8d08666ec5267703d41200c14c80538ed0014bce64ddca85" + end + + resource "mypy-boto3-sqs" do + url "https://files.pythonhosted.org/packages/70/be/27ead4078dc1faa9c6c1916e0f7cfdb102925591eaab153a496640250541/mypy_boto3_sqs-1.40.35.tar.gz" + sha256 "c11f95ee72bddb84f7fecf3000372e01547f36737064b785f1cf34191b87e03f" + end + + resource "mypy-boto3-stepfunctions" do + url "https://files.pythonhosted.org/packages/f8/57/34d2d380862cf8c130981edb8d4c185ef4da256b5b0d7a28a29926009b51/mypy_boto3_stepfunctions-1.40.0.tar.gz" + sha256 "b7ee316136d32e45d1a03cad78109596349bdefd8ffec04b2c4526a509ba53cd" + end + + resource "mypy-boto3-sts" do + url "https://files.pythonhosted.org/packages/39/32/8dce999ed05c797000ce70287f3e82025a98514781c303c7f8fe42f7b327/mypy_boto3_sts-1.40.0.tar.gz" + sha256 "eb55e50960ae6194d09488464c302196392df712a6a5f4308b6a0e24244cfd5c" + end + + resource "mypy-boto3-xray" do + url "https://files.pythonhosted.org/packages/0f/91/e5148d00d65411f71c4bd1fa6410cf5f60fe0016e2d6a9b214c5cd9589e9/mypy_boto3_xray-1.40.21.tar.gz" + sha256 "bd880ac900e3f36dd6f45019493ec7de1c4201da9e50cd934526834cb30e6eab" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-slugify" do + url "https://files.pythonhosted.org/packages/87/c7/5e1547c44e31da50a460df93af11a535ace568ef89d7a811069ead340c4a/python-slugify-8.0.4.tar.gz" + sha256 "59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sympy" do + url "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz" + sha256 "d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517" + end + + resource "text-unidecode" do + url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" + sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "types-awscrt" do + url "https://files.pythonhosted.org/packages/86/65/f92debc7c9ff9e6e51cf1495248f0edd2fa7123461acf5d07ec1688d8ac1/types_awscrt-0.28.2.tar.gz" + sha256 "4349b6fc7b1cd9c9eb782701fb213875db89ab1781219c0e947dd7c4d9dcd65e" + end + + resource "types-s3transfer" do + url "https://files.pythonhosted.org/packages/8e/9b/8913198b7fc700acc1dcb84827137bb2922052e43dde0f4fb0ed2dc6f118/types_s3transfer-0.14.0.tar.gz" + sha256 "17f800a87c7eafab0434e9d87452c809c290ae906c2024c24261c564479e9c95" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "watchdog" do + url "https://files.pythonhosted.org/packages/4f/38/764baaa25eb5e35c9a043d4c4588f9836edfe52a708950f4b6d5f714fd42/watchdog-4.0.2.tar.gz" + sha256 "b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sam", shell_parameter_format: :click) + end + + test do + output = shell_output("#{bin}/sam validate 2>&1", 1) + assert_match "SAM Template Not Found", output + + assert_match version.to_s, shell_output("#{bin}/sam --version") + end +end diff --git a/Formula/a/aws-sdk-cpp.rb b/Formula/a/aws-sdk-cpp.rb new file mode 100644 index 0000000000000..2b1f93ca13ba4 --- /dev/null +++ b/Formula/a/aws-sdk-cpp.rb @@ -0,0 +1,67 @@ +class AwsSdkCpp < Formula + desc "AWS SDK for C++" + homepage "https://github.com/aws/aws-sdk-cpp" + url "https://github.com/aws/aws-sdk-cpp/archive/refs/tags/1.11.675.tar.gz" + sha256 "af9d7c3a97db01ef9186764bc4151a83b37d733667126363d2daf2838cd3c5e0" + license "Apache-2.0" + head "https://github.com/aws/aws-sdk-cpp.git", branch: "main" + + livecheck do + throttle 15 + end + + bottle do + sha256 arm64_tahoe: "1bf21fa239afaf6b23003cc6775b90f9329aa71a7ff8a46f21766cfcc10143d3" + sha256 arm64_sequoia: "9dac5db620881eeca74c95e7e0d30975073088bf3ea0b5cc987a9e87c471ead6" + sha256 arm64_sonoma: "8ff4abe1ae12504be40d7e3b7a2602d7a673cdffa6dd92cb8f646baa8bd005f4" + sha256 cellar: :any, sonoma: "81698fae168971f46108619e266da6c768bac1b684c31025c46ade6ebf243b61" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c95d91a6056c238338f726fb56b9577223f4d9cd573d4e0a84dd2f560b8b9ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf5b4e7c5cd1f6ddfba1c53345d5a48ea0b1c5570eebed39f72a60efa4672f1e" + end + + depends_on "cmake" => :build + depends_on "aws-c-auth" + depends_on "aws-c-common" + depends_on "aws-c-event-stream" + depends_on "aws-c-http" + depends_on "aws-c-io" + depends_on "aws-c-s3" + depends_on "aws-crt-cpp" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + # Avoid OOM failure on Github runner + ENV.deparallelize if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + linker_flags = ["-Wl,-rpath,#{rpath}"] + # Avoid overlinking to aws-c-* indirect dependencies + linker_flags << "-Wl,-dead_strip_dylibs" if OS.mac? + + args = %W[ + -DBUILD_DEPS=OFF + -DCMAKE_MODULE_PATH=#{Formula["aws-c-common"].opt_lib}/cmake/aws-c-common/modules + -DCMAKE_SHARED_LINKER_FLAGS=#{linker_flags.join(" ")} + -DENABLE_TESTING=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + std::cout << Aws::Version::GetVersionString() << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-laws-cpp-sdk-core", "-o", "test" + system "./test" + end +end diff --git a/Formula/a/aws-shell.rb b/Formula/a/aws-shell.rb new file mode 100644 index 0000000000000..0dca1d2cd3221 --- /dev/null +++ b/Formula/a/aws-shell.rb @@ -0,0 +1,116 @@ +class AwsShell < Formula + include Language::Python::Virtualenv + + desc "Integrated shell for working with the AWS CLI" + homepage "https://github.com/awslabs/aws-shell" + url "https://files.pythonhosted.org/packages/01/31/ee166a91c865a855af4f15e393974eadf57762629fc2a163a3eb3f470ac5/aws-shell-0.2.2.tar.gz" + sha256 "fd1699ea5f201e7cbaacaeb34bf1eb88c8fe6dc6b248bce1b3d22b3e099a41e5" + license "Apache-2.0" + revision 7 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b2184fc10e8b1c76f74026cbbccadfa3543353f733fb728f81b49f5951b4d31c" + sha256 cellar: :any, arm64_sequoia: "c4f93abd6f358455e6ca8d51baf5c2977d622d68a9c2cb7866593381715e31db" + sha256 cellar: :any, arm64_sonoma: "f76c1b8385bc6312687a8ac90b24b79a78b594272e316877f46572c9aa47a1ac" + sha256 cellar: :any, sonoma: "d5d93a3c11454b18f29d55ae980862b246326a3d7b31ca951ff7d677de88b66a" + sha256 cellar: :any_skip_relocation, arm64_linux: "280367d8927e8841423fc16c2882c2d45333ca913f2046200cf1ce76cd93af6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32a471c48d1dcf848a13ecc7fec4b8b725f5b352e33d295dfa6905ccdfbb83a3" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "awscli" do + url "https://files.pythonhosted.org/packages/2c/f7/b64d6e8e263b9b30da20e3c3a607e887c6ef45aea52aa4142dd7bff2beea/awscli-1.42.55.tar.gz" + sha256 "547f3e560549358368327423855daea7c007615c9298154a38aa79d647933231" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/50/d8/a279c054e0c9731172f05b3d118f3ffc9d74806657f84fc0c93c42d1bb5d/boto3-1.40.55.tar.gz" + sha256 "27e35b4fa9edd414ce06c1a748bf57cacd8203271847d93fc1053e4a4ec6e1a9" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/a4/92/dce4842b2e215d213d34b064fcdd13c6a782c43344e77336bcde586e9229/botocore-1.40.55.tar.gz" + sha256 "79b6472e2de92b3519d44fc1eec8c5feced7f99a0d10fdea6dc93133426057c1" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/6b/5c/330ea8d383eb2ce973df34d1239b3b21e91cd8c865d21ff82902d952f91f/docutils-0.19.tar.gz" + sha256 "33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/c5/64/c170e5b1913b540bf0c8ab7676b21fdd1d25b65ddeb10025c6ca43cccd4c/prompt_toolkit-1.0.18.tar.gz" + sha256 "dd4fca02c8069497ad931a2d09914c6b0d1b50151ce876bc15bde4c747090126" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/db/b5/475c45a58650b0580421746504b680cd2db4e81bc941e94ca53785250269/rsa-4.7.2.tar.gz" + sha256 "9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"aws-shell", "--help" + end +end diff --git a/Formula/a/aws-sso-cli.rb b/Formula/a/aws-sso-cli.rb new file mode 100644 index 0000000000000..c3d8ca1328c49 --- /dev/null +++ b/Formula/a/aws-sso-cli.rb @@ -0,0 +1,38 @@ +class AwsSsoCli < Formula + desc "Securely manage AWS API credentials using AWS SSO" + homepage "https://synfinatic.github.io/aws-sso-cli/" + url "https://github.com/synfinatic/aws-sso-cli/archive/refs/tags/v2.1.0.tar.gz" + sha256 "110b0a416b6f94c4654ac31b240395e415c642e4a83af11f0fad2126dfa9237c" + license "GPL-3.0-only" + head "https://github.com/synfinatic/aws-sso-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8a49c0fa55021f88a3f8c658083946bc049f5920ce9ef831dfb2f84c67376f3e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "56017c6be0977b895c4cabe77f016df3386eed97b081e2c66bbc7fb1e1067ebb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6fb251cd783f29eb194b2214f3dc33a15b906d88e9b88336bebd48a4cbf20d13" + sha256 cellar: :any_skip_relocation, arm64_ventura: "427855b807581225b458b77abdf85ec85a7078e747032769925b1585d2eb8b81" + sha256 cellar: :any_skip_relocation, sonoma: "a0b463a978cce6be0a7cffe431fdf2683c490cc640c131fb4367a102885ea99e" + sha256 cellar: :any_skip_relocation, ventura: "5e939831d1930895e26566c71ba99271286206c1aac03497c96e395aaf3e3c88" + sha256 cellar: :any_skip_relocation, arm64_linux: "b229f48a550fb95e559a57002a32141aac154fa8dff1a6ce2fb7a4f71022eac5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2cc894ad7d0d759c3e07b042658ddf839144109f2abe3af664e3a3f8ae7d3bd8" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + -X main.Buildinfos=#{time.iso8601} + -X main.Tag=#{version} + -X main.CommitID=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"aws-sso"), "./cmd/aws-sso" + end + + test do + assert_match "AWS SSO CLI Version #{version}", shell_output("#{bin}/aws-sso version") + assert_match "no AWS SSO providers have been configured", + shell_output("#{bin}/aws-sso --config /dev/null 2>&1", 1) + end +end diff --git a/Formula/a/aws-sso-util.rb b/Formula/a/aws-sso-util.rb new file mode 100644 index 0000000000000..4a72e33ed761a --- /dev/null +++ b/Formula/a/aws-sso-util.rb @@ -0,0 +1,148 @@ +class AwsSsoUtil < Formula + include Language::Python::Virtualenv + + desc "Smooth out the rough edges of AWS SSO (temporarily, until AWS makes it better)" + homepage "https://github.com/benkehoe/aws-sso-util" + url "https://files.pythonhosted.org/packages/4f/64/f00272ecbc60703d0f1a3b17ab75d893c05ec5d60b0e6e9d59ef9b8b9c61/aws_sso_util-4.33.0.tar.gz" + sha256 "e48d7f5911443450d28e1ac1613f81b9aa15babb1b2055b4531df87db43a09df" + license "Apache-2.0" + revision 3 + head "https://github.com/benkehoe/aws-sso-util.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "613eafb6c9aca830f9a0598d24ccfe7c659fb31902226bc2a31df17ea0fd5e42" + sha256 cellar: :any, arm64_sequoia: "9643a028947f8ebf5075e1a697b340a165f4a164269c3f5acc5d97ed754156ac" + sha256 cellar: :any, arm64_sonoma: "3cc77192eefb4938c7f348c00601a3d7efd75ded9cc812c3e9b46bb76d3d284e" + sha256 cellar: :any, sonoma: "9e2eba970867b8683286d1e42af6faa8b2cf7368b184ec013ff596627a289b41" + sha256 cellar: :any_skip_relocation, arm64_linux: "d60c98c57bf091e24313d9fed321c759c76b4d8d6b3ce58c659c0713697ec1b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84c48a6849418f6bc1404fc14dd0352d9735d5eb81262c32a820f5c0486e8d92" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "rpds-py"] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "aws-error-utils" do + url "https://files.pythonhosted.org/packages/2a/fc/2541892cafad6658e9ce5226e54088eff9692cbe4a32cd5a7dfec5846cbf/aws_error_utils-2.7.0.tar.gz" + sha256 "07107af2a2c26706cd9525b7ffbed43f2d07b50d27e39f9e9156c11b2e993c97" + end + + resource "aws-sso-lib" do + url "https://files.pythonhosted.org/packages/3d/df/302bafc5e7182212eec091269c4731bb4469041a1db5e6c3643d089d135d/aws_sso_lib-1.14.0.tar.gz" + sha256 "b0203a64ccb66ba78f99ef3d0eb669affe7bc323f6ab9caac97f35c21a03cea5" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/50/d8/a279c054e0c9731172f05b3d118f3ffc9d74806657f84fc0c93c42d1bb5d/boto3-1.40.55.tar.gz" + sha256 "27e35b4fa9edd414ce06c1a748bf57cacd8203271847d93fc1053e4a4ec6e1a9" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/a4/92/dce4842b2e215d213d34b064fcdd13c6a782c43344e77336bcde586e9229/botocore-1.40.55.tar.gz" + sha256 "79b6472e2de92b3519d44fc1eec8c5feced7f99a0d10fdea6dc93133426057c1" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"aws-sso-util", shell_parameter_format: :click) + end + + test do + cmd = "#{bin}/aws-sso-util configure profile invalid " \ + "--sso-start-url https://example.com/start --sso-region eu-west-1 " \ + "--account-id 000000000000 --role-name InvalidRole " \ + "--region eu-west-1 --non-interactive" + + assert_empty shell_output "AWS_CONFIG_FILE=#{testpath}/config #{cmd}" + + assert_path_exists testpath/"config" + + expected = <<~EOS + + [profile invalid] + sso_start_url = https://example.com/start + sso_region = eu-west-1 + sso_account_id = 000000000000 + sso_role_name = InvalidRole + region = eu-west-1 + credential_process = aws-sso-util credential-process --profile invalid + EOS + + assert_equal expected, (testpath/"config").read + end +end diff --git a/Formula/a/aws-vault.rb b/Formula/a/aws-vault.rb new file mode 100644 index 0000000000000..e348c1ab7ac88 --- /dev/null +++ b/Formula/a/aws-vault.rb @@ -0,0 +1,46 @@ +class AwsVault < Formula + desc "Securely store and access AWS credentials in development environments" + homepage "https://github.com/ByteNess/aws-vault" + url "https://github.com/ByteNess/aws-vault/archive/refs/tags/v7.7.7.tar.gz" + sha256 "349790f4aff5e1797074a33e444a6543e722e48bc1e6dec3a18a8626b6b85b68" + license "MIT" + head "https://github.com/ByteNess/aws-vault.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d90c3461c7a469ea9d369e8f87e65b25b529d73d8534dcaf86e2efa585abdb15" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc07c24af09a1ca5d400215a36c6cb4b878765298dcf71fdb68fc1eb11c3691a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ebe5f59b23357149900e8096cbe318a4db527dcd2e90b7dd71346eb89a53516" + sha256 cellar: :any_skip_relocation, sonoma: "a955338c260acae42c044343a769eac8f33edcc8e40ea47bc0b76bbe1b4b4386" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0c01a4e5afc5ceefaf7887a67174bbf21d38b2b169cbe328619a1fdd407adc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbe9710b54c857d6a43ed9553788f835a95991f3469e8fbbfea6effa0adad2c2" + end + + depends_on "go" => :build + + def install + # Remove this line because we don't have a certificate to code sign with + inreplace "Makefile", + "codesign --options runtime --timestamp --sign \"$(CERT_ID)\" $@", "" + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + + system "make", "aws-vault-#{os}-#{arch}", "VERSION=#{version}-#{tap.user}" + system "make", "install", "INSTALL_DIR=#{bin}", "VERSION=#{version}-#{tap.user}" + + zsh_completion.install "contrib/completions/zsh/aws-vault.zsh" => "_aws-vault" + bash_completion.install "contrib/completions/bash/aws-vault.bash" => "aws-vault" + fish_completion.install "contrib/completions/fish/aws-vault.fish" + end + + test do + assert_match("aws-vault: error: login: unable to select a 'profile', nor any AWS env vars found.", + shell_output("#{bin}/aws-vault --backend=file login 2>&1", 1)) + + assert_match version.to_s, shell_output("#{bin}/aws-vault --version 2>&1") + end +end diff --git a/Formula/a/aws2-wrap.rb b/Formula/a/aws2-wrap.rb new file mode 100644 index 0000000000000..b04c8044064e9 --- /dev/null +++ b/Formula/a/aws2-wrap.rb @@ -0,0 +1,40 @@ +class Aws2Wrap < Formula + include Language::Python::Virtualenv + + desc "Script to export current AWS SSO credentials or run a sub-process with them" + homepage "https://github.com/linaro-its/aws2-wrap" + url "https://files.pythonhosted.org/packages/6d/c7/8afdf4d0c7c6e2072c73a0150f9789445af33381a611d33333f4c9bf1ef6/aws2-wrap-1.4.0.tar.gz" + sha256 "77613ae13423a6407e79760bdd35843ddd128612672a0ad3a934ecade76aa7fc" + license "GPL-3.0-only" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3268822bfc1e7e701d18bdc33ab3e1da2dbade82654349196575813f596fa2ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4273b2ffc121cdec548f58a6fe95ee8b48ec81302d2aeaffc7988d480c74b487" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "162278b196ec4ea96fa0c358d6375ee2728591d89dd577aa619097fe897bf9c9" + sha256 cellar: :any_skip_relocation, sonoma: "b2ea3565616d3ae6d2242997f570c236bd9b0f2bc9df70c5a4963ff78f0ba027" + sha256 cellar: :any_skip_relocation, arm64_linux: "bce412d5705b5db7d2bd526f20e9da030b4c4c0404bab9a9d7c3de6608ebbbb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cadb8097812a3729fb1ae6d91eec08399280c4096cc4d4d79423ce3924b445b5" + end + + deprecate! date: "2025-10-02", because: :repo_archived + + depends_on "python@3.14" + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + def install + virtualenv_install_with_resources + end + + test do + mkdir testpath/".aws" + touch testpath/".aws/config" + ENV["AWS_CONFIG_FILE"] = testpath/".aws/config" + + assert_match "Cannot find profile 'default'", shell_output("#{bin}/aws2-wrap 2>&1", 1).strip + end +end diff --git a/Formula/a/awscli-local.rb b/Formula/a/awscli-local.rb new file mode 100644 index 0000000000000..5803eccec129e --- /dev/null +++ b/Formula/a/awscli-local.rb @@ -0,0 +1,67 @@ +class AwscliLocal < Formula + include Language::Python::Virtualenv + + desc "Thin wrapper around the `aws` command-line interface for use with LocalStack" + homepage "https://www.localstack.cloud/" + url "https://files.pythonhosted.org/packages/7a/71/591a30da6819c96deca2286f145d5982e73b11e7f657e8cbfc5e003ca73f/awscli_local-0.22.2.tar.gz" + sha256 "07c532c372753bf5f15426451dc91d6eec9de8779748049329a9a882bdac8a0b" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "a52f3f17fb20def59c43e6cb16905e592a51b2e6ebfcc91f63b22448c874ef6b" + end + + depends_on "awscli" => :test # awscli-local can work with any version of awscli + depends_on "localstack" + depends_on "python@3.14" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/50/d8/a279c054e0c9731172f05b3d118f3ffc9d74806657f84fc0c93c42d1bb5d/boto3-1.40.55.tar.gz" + sha256 "27e35b4fa9edd414ce06c1a748bf57cacd8203271847d93fc1053e4a4ec6e1a9" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/a4/92/dce4842b2e215d213d34b064fcdd13c6a782c43344e77336bcde586e9229/botocore-1.40.55.tar.gz" + sha256 "79b6472e2de92b3519d44fc1eec8c5feced7f99a0d10fdea6dc93133426057c1" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "localstack-client" do + url "https://files.pythonhosted.org/packages/22/11/4f10b87d634edd616d8063dd0ed1193be747e524e28801f826d72828b98f/localstack_client-2.10.tar.gz" + sha256 "732a07e23fffd6a581af2714bbe006ad6f884ac4f8ac955211a8a63321cdc409" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/awslocal kinesis list-streams 2>&1", 255) + assert_match "Could not connect to the endpoint URL", output + end +end diff --git a/Formula/a/awscli.rb b/Formula/a/awscli.rb new file mode 100644 index 0000000000000..faf3ae8c37be9 --- /dev/null +++ b/Formula/a/awscli.rb @@ -0,0 +1,139 @@ +class Awscli < Formula + include Language::Python::Virtualenv + + desc "Official Amazon AWS command-line interface" + homepage "https://aws.amazon.com/cli/" + url "https://github.com/aws/aws-cli/archive/refs/tags/2.31.28.tar.gz" + sha256 "b148c740182df5da73263eb985e7118e04f6c4c78a525185c0e3315841032f2b" + license "Apache-2.0" + head "https://github.com/aws/aws-cli.git", branch: "v2" + + bottle do + sha256 cellar: :any, arm64_tahoe: "60cfc7b2bdc27d7a8136cf6d10f4aae3c7a6413825599fbd12faa8d2bc71b63d" + sha256 cellar: :any, arm64_sequoia: "d135766e0867d0e209cf7c123a89319053ceffad77d9fe7f39155df2608c5835" + sha256 cellar: :any, arm64_sonoma: "e414a4230c0a7789460562beb17a23b5e6043cea5d9c91faab1a77a798f1c214" + sha256 cellar: :any, sonoma: "128c0dbcd0c887ba4b475da6b59520144511a5c7baf5f0986cbcc186b924cb04" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a5723f77c6d0b2b705d6c90f7693fc6646423d1ebbcd316ad2ce50a0fa62dd3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18111413e76c1a1885620d0ebaac9f705b597c3dea7f782f0db9494a4bd1dec1" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "python@3.13" # Python 3.14 issue: https://github.com/aws/aws-cli/issues/9783 + + uses_from_macos "libffi" + uses_from_macos "mandoc" + + pypi_packages extra_packages: "flit-core" + + resource "awscrt" do + url "https://files.pythonhosted.org/packages/82/cf/fb5af0ffac5b3b43d12323ecf7be03da7fd32c5bcb6bb9749d4ff5802698/awscrt-0.27.6.tar.gz" + sha256 "45f3dd0b3fb13dfbea856dd96c9acfe77beba57b9b019444ee962ed2b76276dd" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/4b/89/eaa3a3587ebf8bed93e45aa79be8c2af77d50790d15b53f6dfc85b57f398/distro-1.8.0.tar.gz" + sha256 "02e111d1dc6a50abb8eed6bf31c3e48ed8b0830d1ea2a1b78c61765c2513fdd8" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/6b/5c/330ea8d383eb2ce973df34d1239b3b21e91cd8c865d21ff82902d952f91f/docutils-0.19.tar.gz" + sha256 "33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6" + end + + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/d9/77/bd458a2e387e98f71de86dcc2ca2cab64489736004c80bc12b70da8b5488/python-dateutil-2.9.0.tar.gz" + sha256 "78e73e19c63f5b20ffa567001531680d939dc042bf7850431877645523c66709" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/46/a9/6ed24832095b692a8cecc323230ce2ec3480015fbfa4b79941bd41b23a3c/ruamel.yaml-0.17.21.tar.gz" + sha256 "8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af" + end + + resource "ruamel-yaml-clib" do + url "https://files.pythonhosted.org/packages/20/84/80203abff8ea4993a87d823a5f632e4d92831ef75d404c9fc78d0176d2b5/ruamel.yaml.clib-0.2.12.tar.gz" + sha256 "6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def python3 + which("python3.13") + end + + def install + ENV["AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO"] = "1" + + # Work around ruamel.yaml.clib not building on Xcode 15.3, remove after a new release + # has resolved: https://sourceforge.net/p/ruamel-yaml-clib/tickets/32/ + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + venv = virtualenv_create(libexec, python3, system_site_packages: false) + venv.pip_install resources.reject { |r| r.name == "awscrt" } + # CPU detection is available in AWS C libraries + ENV.runtime_cpu_detection + venv.pip_install resource("awscrt") + venv.pip_install_and_link buildpath, build_isolation: false + + pkgshare.install "awscli/examples" + + rm bin.glob("{aws.cmd,aws_bash_completer,aws_zsh_completer.sh}") + bash_completion.install "bin/aws_bash_completer" + zsh_completion.install "bin/aws_zsh_completer.sh" + (zsh_completion/"_aws").write <<~EOS + #compdef aws + _aws () { + local e + e=$(dirname ${funcsourcetrace[1]%:*})/aws_zsh_completer.sh + if [[ -f $e ]]; then source $e; fi + } + EOS + end + + def caveats + <<~EOS + The "examples" directory has been installed to: + #{HOMEBREW_PREFIX}/share/awscli/examples + EOS + end + + test do + assert_match "topics", shell_output("#{bin}/aws help") + site_packages = libexec/Language::Python.site_packages(python3) + assert_includes site_packages.glob("awscli/data/*"), site_packages/"awscli/data/ac.index" + end +end diff --git a/Formula/a/awscli@1.rb b/Formula/a/awscli@1.rb new file mode 100644 index 0000000000000..8bf74bd069ed6 --- /dev/null +++ b/Formula/a/awscli@1.rb @@ -0,0 +1,115 @@ +class AwscliAT1 < Formula + include Language::Python::Virtualenv + + desc "Official Amazon AWS command-line interface" + homepage "https://aws.amazon.com/cli/" + # awscli should only be updated every 10 releases on multiples of 10 + url "https://files.pythonhosted.org/packages/44/70/c4a0d0a6ac9b43cb1a1e6a7a29ea8d848333f17c0336cb13b11d39895e48/awscli-1.42.60.tar.gz" + sha256 "d2d341fa83f5f43270d8d80ad62a46d5486b0f08ad98c104bc457018945befaf" + license "Apache-2.0" + + livecheck do + url "https://github.com/aws/aws-cli.git" + regex(/^v?(1(?:\.\d+)+)$/i) + throttle 10 + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "92ff1bc788366e740df178e5338920cb16a145624c723c2320694ddaadc38ecf" + sha256 cellar: :any, arm64_sequoia: "a4442f1483fe5d861128e3d0e9b7beb1a65a135c85613a1567588c5f8805af90" + sha256 cellar: :any, arm64_sonoma: "a7620f1992dfa7716ed79226e9df1015349a0d3adee4dcac749c7be2dc37b39c" + sha256 cellar: :any, sonoma: "202288a963858d0b9af43072ccb4216361c51fa3254ff76659e4d889cd65faed" + sha256 cellar: :any_skip_relocation, arm64_linux: "a737e81b7959196bd29cf95c637003628dae711a8104ff26c3cc7cb9c73d9dcc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbc93664a6a564f7044b1f8e5d25a1250805d04d5f1025318e68d1bb32e66fad" + end + + keg_only :versioned_formula + + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "mandoc" + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ea/f7/5313e9f84c962af63e05a0c23b51134b5288b198fa0023cf9dbe1b964504/botocore-1.40.60.tar.gz" + sha256 "85443f1829d9240d16ba346781956ebcd104dd8e91742c2901a9b2ace198a829" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/6b/5c/330ea8d383eb2ce973df34d1239b3b21e91cd8c865d21ff82902d952f91f/docutils-0.19.tar.gz" + sha256 "33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/db/b5/475c45a58650b0580421746504b680cd2db4e81bc941e94ca53785250269/rsa-4.7.2.tar.gz" + sha256 "9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + pkgshare.install "awscli/examples" + + %w[aws.cmd aws_bash_completer aws_zsh_completer.sh].each { |f| rm(bin/f) } + bash_completion.install "bin/aws_bash_completer" + zsh_completion.install "bin/aws_zsh_completer.sh" + (zsh_completion/"_aws").write <<~ZSH + #compdef aws + _aws () { + local e + e=$(dirname ${funcsourcetrace[1]%:*})/aws_zsh_completer.sh + if [[ -f $e ]]; then source $e; fi + } + ZSH + end + + def caveats + <<~EOS + The "examples" directory has been installed to: + #{HOMEBREW_PREFIX}/share/awscli/examples + EOS + end + + test do + assert_match "topics", shell_output("#{bin}/aws help") + end +end diff --git a/Formula/a/awscurl.rb b/Formula/a/awscurl.rb new file mode 100644 index 0000000000000..f4c419b2ea76e --- /dev/null +++ b/Formula/a/awscurl.rb @@ -0,0 +1,88 @@ +class Awscurl < Formula + include Language::Python::Virtualenv + + desc "Curl like simplicity to access AWS resources" + homepage "https://github.com/okigan/awscurl" + url "https://files.pythonhosted.org/packages/f0/53/68500d2e61aff7549f878a9227eea5c80eaf6ffcad7c134c576360b1bae7/awscurl-0.36.tar.gz" + sha256 "9eb9d4949616d90dd7bf0d12a67eb3e1d3487bf08d75a7555d979811e5da1cb4" + license "MIT" + revision 2 + head "https://github.com/okigan/awscurl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0e29ddcd3efaefa318c2534ec6823c44e719ffa8614c87ce50da15a9d5d52563" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: ["certifi", "cryptography"] + + resource "botocore" do + url "https://files.pythonhosted.org/packages/d1/c8/8c7509d7fa26de03d21673f18a1edc1ac98198ba261a2b943774ed4f1c44/botocore-1.40.54.tar.gz" + sha256 "808232d9fcbf2c295b6e7cd1897119ee2fb97e756edfb313aa6d27ba0b281c66" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "configparser" do + url "https://files.pythonhosted.org/packages/8b/ac/ea19242153b5e8be412a726a70e82c7b5c1537c83f61b20995b2eda3dcd7/configparser-7.2.0.tar.gz" + sha256 "b629cc8ae916e3afbd36d1b3d093f34193d851e11998920fdcfc4552218b7b70" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["AWS_ACCESS_KEY_ID"] = "test" + ENV["AWS_SECRET_ACCESS_KEY"] = "test" + + assert_match "Curl", shell_output("#{bin}/awscurl --help") + + assert_match "The AWS Access Key Id you provided does not exist in our records.", + shell_output("#{bin}/awscurl --service s3 https://homebrew-test-non-existent-bucket.s3.amazonaws.com") + end +end diff --git a/Formula/a/awsdac.rb b/Formula/a/awsdac.rb new file mode 100644 index 0000000000000..f8b14bb8f35e1 --- /dev/null +++ b/Formula/a/awsdac.rb @@ -0,0 +1,42 @@ +class Awsdac < Formula + desc "CLI tool for drawing AWS architecture" + homepage "https://github.com/awslabs/diagram-as-code" + url "https://github.com/awslabs/diagram-as-code/archive/refs/tags/v0.22.3.tar.gz" + sha256 "7a52b3fe9f8db097652cf72a2f4628f0af539f8ae72c533d4abd197f1a68c6e1" + license "Apache-2.0" + head "https://github.com/awslabs/diagram-as-code.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0165dfdd75e63cef4590052ad3a0993461877f46aae6d2512bb38b452efd0fd6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0165dfdd75e63cef4590052ad3a0993461877f46aae6d2512bb38b452efd0fd6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0165dfdd75e63cef4590052ad3a0993461877f46aae6d2512bb38b452efd0fd6" + sha256 cellar: :any_skip_relocation, sonoma: "02a55d9a58b5612ff827582626ef0de815ca07034d8fc0fd1ec5124a15f7351a" + end + + depends_on "go" => :build + depends_on :macos # linux build blocked by https://github.com/awslabs/diagram-as-code/issues/12 + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/awsdac" + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}", output: bin/"awsdac-mcp-server"), "./cmd/awsdac-mcp-server" + + pkgshare.install "examples/alb-ec2.yaml" + end + + test do + assert_match version.to_s, shell_output("#{bin}/awsdac --version") + + cp pkgshare/"alb-ec2.yaml", testpath/"test.yaml" + expected = "[Completed] AWS infrastructure diagram generated: output.png" + assert_equal expected, shell_output("#{bin}/awsdac test.yaml").strip + + # Test awsdac-mcp-server with MCP protocol + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output(bin/"awsdac-mcp-server", json, 0) + assert_match "Generate AWS architecture diagrams", output + end +end diff --git a/Formula/a/awslogs.rb b/Formula/a/awslogs.rb new file mode 100644 index 0000000000000..9253697285ea5 --- /dev/null +++ b/Formula/a/awslogs.rb @@ -0,0 +1,70 @@ +class Awslogs < Formula + include Language::Python::Virtualenv + + desc "Simple command-line tool to read AWS CloudWatch logs" + homepage "https://github.com/jorgebastida/awslogs" + url "https://files.pythonhosted.org/packages/15/f5/8f3bd0f4a927b1fbb3a5e6a5b036f29e4263977fb167b301bc4a5f4db2b9/awslogs-0.15.0.tar.gz" + sha256 "19f223bb1c0703cea0689d94b1d293006529095e6ab8971f6b52289a2e545dd5" + license "BSD-3-Clause" + revision 2 + head "https://github.com/jorgebastida/awslogs.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b705f89824369179c2e868aabf5639c06545dab9cff39c267f55f87478a7328e" + end + + depends_on "python@3.14" + + uses_from_macos "zlib" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" + sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/awslogs --version") + + assert_match "You must specify a region", shell_output("#{bin}/awslogs groups 2>&1", 1) + end +end diff --git a/Formula/a/awsume.rb b/Formula/a/awsume.rb new file mode 100644 index 0000000000000..a5b3b4aea9869 --- /dev/null +++ b/Formula/a/awsume.rb @@ -0,0 +1,96 @@ +class Awsume < Formula + include Language::Python::Virtualenv + + desc "Utility for easily assuming AWS IAM roles from the command-line" + homepage "https://awsu.me" + url "https://files.pythonhosted.org/packages/d7/08/264d5c0b1a2618c95f3a391e038830c18bcccce5f202b293acdb14b7ac63/awsume-4.5.4.tar.gz" + sha256 "4c1f6336e1f9e36b2144761345967f50f43128363892cc62325577201e133b1b" + license "MIT" + revision 2 + head "https://github.com/trek10inc/awsume.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "40942453249c7c43c2597f4023fa2d17c379fcb75d1af9aa376477818a687e8d" + sha256 cellar: :any, arm64_sequoia: "ff8a3931a4a9ba60b981e2dfec0ded6dfd29d50d77c6fa3f128254468a713652" + sha256 cellar: :any, arm64_sonoma: "4bf687401e65c9e453a67428fb5b992163095cf786a743d3963cd8fa0dbf3d33" + sha256 cellar: :any, sonoma: "36daa6865ef8efe090e30fa85724d87e705ce051d2499ef579d8b3cd629f12e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c957c09a7e779f26179760e6cda0dea5579686c0d79aab5b2ec8821bcde439c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d027e70d6261b0877f370da9679d3bc1b69da2c442ae3327a2ffeb1bf06af1a" + end + + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "sqlite" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/5c/89/36c09108d8d35e6f722cdc9ff169f003c7458657ecf04c3a375dca973ccb/boto3-1.40.54.tar.gz" + sha256 "5f7dbf8539d26e0ee973baea49d0db8c1ee57707a785c5a23307241fdba04327" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/d1/c8/8c7509d7fa26de03d21673f18a1edc1ac98198ba261a2b943774ed4f1c44/botocore-1.40.54.tar.gz" + sha256 "808232d9fcbf2c295b6e7cd1897119ee2fb97e756edfb313aa6d27ba0b281c66" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("bash -c '. #{bin}/awsume -v 2>&1'") + assert_match <<~YAML, (testpath/".awsume/config.yaml").read + colors: true + fuzzy-match: false + role-duration: 0 + YAML + assert_match "PROFILE TYPE SOURCE MFA? REGION PARTITION ACCOUNT", + shell_output("bash -c '. #{bin}/awsume --list-profiles 2>&1'") + end +end diff --git a/Formula/a/awsweeper.rb b/Formula/a/awsweeper.rb new file mode 100644 index 0000000000000..f123d17249d98 --- /dev/null +++ b/Formula/a/awsweeper.rb @@ -0,0 +1,50 @@ +class Awsweeper < Formula + desc "CLI tool for cleaning your AWS account" + homepage "https://github.com/jckuester/awsweeper/" + url "https://github.com/jckuester/awsweeper/archive/refs/tags/v0.12.0.tar.gz" + sha256 "43468e1af20dab757da449b07330f7b16cbb9f77e130782f88f30a7744385c5e" + license "MPL-2.0" + head "https://github.com/jckuester/awsweeper.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "57cca26932b44660312b377bca14d2f3fdde698d215c127f4be5740304cb61ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f22735ca83b553b980c8c4c965b82c74661f63b05b42535f1cf182c6e80d6eb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5010b86841f22dddef64df08c14003a9f8b67be8799a2fd2c25f123b4d87404" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6aaf2bf93c063a5ab9d409f70d77ad32d5c5b8d42f3b9d2b167e83817de89baa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dabe2797d6b3a7f40fa31dff1fc8bc7f7c94918f024f6f866c9fedb43d8ce485" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b4b48419aaa4619449078a64b28ed9bde4b3bb1c05cf096d6852fa92596f2260" + sha256 cellar: :any_skip_relocation, sonoma: "483afd6a7be152d00165c0608892c710ac465e1437fb8fd555e260b06693dc99" + sha256 cellar: :any_skip_relocation, ventura: "f45b885d958f4b7752e02dc778e64d88a604021bfb0635a80444ff07c78f2e95" + sha256 cellar: :any_skip_relocation, monterey: "54bc928c085313ad7b2cd353bbf4b7e49df992527526348ee0eb01437f9ca87b" + sha256 cellar: :any_skip_relocation, big_sur: "1855fe15c7d95a0dddf4487692bf75d6dc234c3ecd25457dffaeab3a2312ece8" + sha256 cellar: :any_skip_relocation, catalina: "76710715dee67793f3715dc1a902b18f259b4ed4b42515fbf13b641339b1f899" + sha256 cellar: :any_skip_relocation, arm64_linux: "6509b1bdbe77f14394f17818f3956b0bde26493eb49f1ad0088f4873cec209d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81776b638e309f839a362f70ba7d0621c2ca9e80f6472f334c5472049cbc3374" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/jckuester/awsweeper/internal.version=#{version} + -X github.com/jckuester/awsweeper/internal.date=#{time.strftime("%F")} + ] + + system "go", "build", *std_go_args(ldflags:) + end + + test do + (testpath/"filter.yml").write <<~YAML + aws_autoscaling_group: + aws_instance: + - tags: + Name: foo + YAML + + assert_match "Error: failed to configure provider (name=aws", + shell_output("#{bin}/awsweeper --dry-run #{testpath}/filter.yml 2>&1", 1) + end +end diff --git a/Formula/a/axel.rb b/Formula/a/axel.rb new file mode 100644 index 0000000000000..f44336396170c --- /dev/null +++ b/Formula/a/axel.rb @@ -0,0 +1,53 @@ +class Axel < Formula + desc "Light UNIX download accelerator" + homepage "https://github.com/axel-download-accelerator/axel" + url "https://github.com/axel-download-accelerator/axel/releases/download/v2.17.14/axel-2.17.14.tar.xz" + sha256 "938ee7c8c478bf6fcc82359bbf9576f298033e8b13908e53e3ea9c45c1443693" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + bottle do + sha256 cellar: :any, arm64_tahoe: "1f8ad603fc44127acc3b97b453360043ffa0610d63248035509a8b9c70d93fdc" + sha256 cellar: :any, arm64_sequoia: "b916766161940b92547f4dfddcc72ff0a7138c773e935927e0c8ae3111076494" + sha256 cellar: :any, arm64_sonoma: "3304a247f8e410cf41737d083bb6611d74bb5991d7cec6d76b48d9ce2e944423" + sha256 cellar: :any, arm64_ventura: "0b24ce8df8e83157f4558afcb41083993d7b7aa5dbf02e06b01037a665a63ae5" + sha256 cellar: :any, arm64_monterey: "a5ac14c819bb4bc61c7f9b1c9b8211bbc14e83c9db8a3c301f58abaf822de463" + sha256 cellar: :any, sonoma: "10439c6710098fb8022d91ce619e8c459810845beee5d20f2aab33c6cf1a13df" + sha256 cellar: :any, ventura: "5ca2bc10eba04c8efaf32c380ac81f6b3da6a3a8a0dd28013a9000d06a76dd4e" + sha256 cellar: :any, monterey: "70f5c6208758d713185fe924ef3778b4a72e81c29660b495c1cdab5c2e968685" + sha256 arm64_linux: "5a1e69568f0649bd3fc53694bf840b8a626e507c11cbb12496b8485ac82553af" + sha256 x86_64_linux: "bf422304c452796fc7a1c020f7bf067fe1ff5eb7be4757a56b249eef815dfa9d" + end + + head do + url "https://github.com/axel-download-accelerator/axel.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "gawk" => :build + depends_on "gettext" => :build + depends_on "txt2man" => :build + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + on_macos do + depends_on "gettext" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", + "--sysconfdir=#{etc}", + *std_configure_args + system "make", "install" + end + + test do + filename = (testpath/"axel.tar.gz") + system bin/"axel", "-o", "axel.tar.gz", stable.url + filename.verify_checksum stable.checksum + assert_path_exists testpath/"axel.tar.gz" + end +end diff --git a/Formula/a/ayatana-ido.rb b/Formula/a/ayatana-ido.rb new file mode 100644 index 0000000000000..9835bfa7d420e --- /dev/null +++ b/Formula/a/ayatana-ido.rb @@ -0,0 +1,55 @@ +class AyatanaIdo < Formula + desc "Ayatana Indicator Display Objects" + homepage "https://github.com/AyatanaIndicators/ayatana-ido" + url "https://github.com/AyatanaIndicators/ayatana-ido/archive/refs/tags/0.10.4.tar.gz" + sha256 "bd59abd5f1314e411d0d55ce3643e91cef633271f58126be529de5fb71c5ab38" + license any_of: ["GPL-3.0-or-later", "LGPL-2.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "d057f3cc3501c6a142003866281a9290c052086decc8167138488d6a7fc906f8" + sha256 cellar: :any, arm64_sequoia: "4fed31960fa9d6d907fb7c6e283573b7a456abce909ed30d88e70bbaa9c88d9a" + sha256 cellar: :any, arm64_sonoma: "09913ff54d95db83cdacf1f026844761d2973a581fac4c4698ab46b97a7d016e" + sha256 cellar: :any, arm64_ventura: "c415adf102890257e312cbf46e14e274819d513479c51bedef3ec4beb25c517b" + sha256 cellar: :any, sonoma: "a4633dc9cd30e3ccfb1079a42c91df5fefa6c4cf4e2f70e18a0c1538f9cd7356" + sha256 cellar: :any, ventura: "8d7ec3123010aa1ff40ff6a84b8369808f5581cd437b6197984157c3b119edfa" + sha256 cellar: :any_skip_relocation, arm64_linux: "8908314215b919c26a433bc0c539510a495a209ddd0361aa14cfe0f4f631558c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0462edd4eaed23ad5557e1e733f4fbb17256f850da3c8a6c1f6cff6a9c95f750" + end + + depends_on "cmake" => :build + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + args = %w[-DENABLE_TESTS=OFF] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + ido_init(); + return 0; + } + C + flags = shell_output("pkgconf --cflags --libs libayatana-ido3-0.4").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/a/azcopy.rb b/Formula/a/azcopy.rb new file mode 100644 index 0000000000000..9f260a047d3e4 --- /dev/null +++ b/Formula/a/azcopy.rb @@ -0,0 +1,35 @@ +class Azcopy < Formula + desc "Azure Storage data transfer utility" + homepage "https://github.com/Azure/azure-storage-azcopy" + url "https://github.com/Azure/azure-storage-azcopy/archive/refs/tags/v10.31.0.tar.gz" + sha256 "21ca550d42bb06807d985a5ac003c0b479d55cf15506e948c78a419b421eb5c4" + license "MIT" + head "https://github.com/Azure/azure-storage-azcopy.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5ea9c8def369e8f97c32d4641ed6a78dab61122a6335fdc6242aff5ca73b4b85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "223df44e2cbea3cd51ca1bf12643dd0df85dcc66a56921c32aeeb379fb1fde01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e59532db8e96d7dd12b5715c143ee24e8d92d35b368a101e5ecaf4e9ef50bda" + sha256 cellar: :any_skip_relocation, sonoma: "0038eabb1d3b8d67aed7632d96c9dd23b2e19df31baa5be83442d78ae9591d19" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a888cbc20cc9a9fdcf6cd1bf6be28109e1e12a164fd41fe98149f2f8edb1947" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20ba89af84dc06563e074cb20c4c75d44a68587fe53a88671cf0aa2b6332c1f2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"azcopy", "completion") + end + + test do + assert_match "Existing Jobs", shell_output("#{bin}/azcopy jobs list") + assert_match version.to_s, shell_output("#{bin}/azcopy --version") + end +end diff --git a/Formula/a/azion.rb b/Formula/a/azion.rb new file mode 100644 index 0000000000000..bff9c3119c151 --- /dev/null +++ b/Formula/a/azion.rb @@ -0,0 +1,38 @@ +class Azion < Formula + desc "CLI for the Azion service" + homepage "https://github.com/aziontech/azion" + url "https://github.com/aziontech/azion/archive/refs/tags/4.11.0.tar.gz" + sha256 "87178c1bf78bcaf4dcce53cb2ceef702fc88645a73c7605f39e247f632451ae8" + license "MIT" + head "https://github.com/aziontech/azion.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a7245d964aebbfda59c696c9b2bf2fcf3d4d35954cde0cadd6434966e8f7e392" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a7245d964aebbfda59c696c9b2bf2fcf3d4d35954cde0cadd6434966e8f7e392" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7245d964aebbfda59c696c9b2bf2fcf3d4d35954cde0cadd6434966e8f7e392" + sha256 cellar: :any_skip_relocation, sonoma: "422a41ddbcda1be51652fa7fc83685b3ab12a9dc79434c52321743cee5911a33" + sha256 cellar: :any_skip_relocation, arm64_linux: "e81583c90cd814f969b54be9c7d6eb7cf283f787992dc9fe571b918635bdb9ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2aaeff66c89fd1b4d13f76324162887b97930ee16b28675af8a3bf18ff1d9248" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/aziontech/azion-cli/pkg/cmd/version.BinVersion=#{version} + -X github.com/aziontech/azion-cli/pkg/constants.StorageApiURL=https://api.azion.com/v4 + -X github.com/aziontech/azion-cli/pkg/constants.AuthURL=https://sso.azion.com/api + -X github.com/aziontech/azion-cli/pkg/constants.ApiURL=https://api.azionapi.net + -X github.com/aziontech/azion-cli/pkg/constants.ApiV4URL=https://api.azion.com/v4 + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/azion" + + generate_completions_from_executable(bin/"azion", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/azion --version") + assert_match "Failed to build your resource", shell_output("#{bin}/azion build --yes 2>&1", 1) + end +end diff --git a/Formula/a/azqr.rb b/Formula/a/azqr.rb new file mode 100644 index 0000000000000..b5824a02cadd6 --- /dev/null +++ b/Formula/a/azqr.rb @@ -0,0 +1,39 @@ +class Azqr < Formula + desc "Azure Quick Review" + homepage "https://azure.github.io/azqr/" + # pull from git tag to get submodules + url "https://github.com/Azure/azqr.git", + tag: "v.2.12.2", + revision: "6191b1d0adab0dc0c8d8f416ffb1b98308714374" + license "MIT" + head "https://github.com/Azure/azqr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8a217567b212c15f0f4216224987c5d5301a0bbd7f9ceef9d04e9cf25c80ddd4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a217567b212c15f0f4216224987c5d5301a0bbd7f9ceef9d04e9cf25c80ddd4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a217567b212c15f0f4216224987c5d5301a0bbd7f9ceef9d04e9cf25c80ddd4" + sha256 cellar: :any_skip_relocation, sonoma: "492d3c5298a472c663e1d246258970dae853187a4c93b49f4467e2d700dfa38d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d114a21b54db7114b8824ec7bbbf2ead5fcc7c286e8d7bd19bfbd0f223b6d202" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6ab62f2cd8405d91ee725ff9a082ea8010a2258c9adbf59dd6d478041b30245" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/Azure/azqr/cmd/azqr/commands.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/azqr" + + generate_completions_from_executable(bin/"azqr", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/azqr -v") + output = shell_output("#{bin}/azqr scan --filters notexists.yaml 2>&1", 1) + assert_includes output, "failed reading data from file" + output = shell_output("#{bin}/azqr scan 2>&1", 1) + assert_includes output, "Failed to list subscriptions" + end +end diff --git a/Formula/a/aztfexport.rb b/Formula/a/aztfexport.rb new file mode 100644 index 0000000000000..9fcaea556597c --- /dev/null +++ b/Formula/a/aztfexport.rb @@ -0,0 +1,39 @@ +class Aztfexport < Formula + desc "Bring your existing Azure resources under the management of Terraform" + homepage "https://azure.github.io/aztfexport/" + url "https://github.com/Azure/aztfexport.git", + tag: "v0.18.0", + revision: "c787766b069dc1cee0cd9d50801847d230a0d264" + license "MPL-2.0" + head "https://github.com/Azure/aztfexport.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5f3a5ee03fca178adacba476b73a2176c24c4dddb35232c0baf49b350c52afcc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4315e5a84cfa58065d8474d8be1cc9f2f520590426ef77c6a1c070c19fea526" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4315e5a84cfa58065d8474d8be1cc9f2f520590426ef77c6a1c070c19fea526" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e4315e5a84cfa58065d8474d8be1cc9f2f520590426ef77c6a1c070c19fea526" + sha256 cellar: :any_skip_relocation, sonoma: "372087c2a171dd4d5b27e83e24a4e893ab36c7706882766de524e22cdd92cfa2" + sha256 cellar: :any_skip_relocation, ventura: "372087c2a171dd4d5b27e83e24a4e893ab36c7706882766de524e22cdd92cfa2" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ce117fbfcb7aeaaafa8afd030e2308fed365f704e8429ad1d5340661193410b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "baf8a4f42df5eeffa6ef8cbcc64d5f96623d382751377ad04072fb38ba8a8cd9" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + system "go", "build", *std_go_args(ldflags: "-s -w -X 'main.version=v#{version}' -X 'main.revision=#{Utils.git_short_head(length: 7)}'") + end + + test do + version_output = shell_output("#{bin}/aztfexport -v") + assert_match version.to_s, version_output + + mkdir "test" do + no_resource_group_specified_output = shell_output("#{bin}/aztfexport rg 2>&1", 1) + assert_match("Error: retrieving subscription id from CLI", no_resource_group_specified_output) + end + end +end diff --git a/Formula/a/azure-cli.rb b/Formula/a/azure-cli.rb new file mode 100644 index 0000000000000..a210c56156847 --- /dev/null +++ b/Formula/a/azure-cli.rb @@ -0,0 +1,776 @@ +class AzureCli < Formula + include Language::Python::Virtualenv + + desc "Microsoft Azure CLI 2.0" + homepage "https://docs.microsoft.com/cli/azure/overview" + url "https://github.com/Azure/azure-cli/archive/refs/tags/azure-cli-2.79.0.tar.gz" + sha256 "79fb9c8e0b063144ca0f671c18b23847e4096d204bfc2323997a40ae8a4039d4" + license "MIT" + head "https://github.com/Azure/azure-cli.git", branch: "dev" + + livecheck do + url :stable + regex(/azure-cli[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any, arm64_tahoe: "5f14426c9ab39d35ddd78d7402945250ac4cb7b2cba1da7c9fbb98de06ad5d40" + sha256 cellar: :any, arm64_sequoia: "88dbf609d3936910a78e06d02d8323a437101c02b4789181c8b154b701094d23" + sha256 cellar: :any, arm64_sonoma: "33c9695ccd0f09e08521867e1bb4cc18aad7db31f2ca222f18a4060e3e6cda34" + sha256 cellar: :any, sonoma: "e95448623f70b684726d540443a8820622ec94098569d089a3f9bf052987a4d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d21aac960fc64468118accc638aee0d69fed5d07944ea47238dbf458b8e9194" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5adacf466a746fb096d201d66cad99230682304b71079cb34e82ad1a6c853ef" + end + + # `pkgconf`, `rust`, and `openssl@3` are for cryptography. + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libsodium" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "Deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "PyGithub" do + url "https://files.pythonhosted.org/packages/98/36/386d282903c572b18abc36de68aaf4146db4659c82dceee009ef88a86b67/PyGithub-1.55.tar.gz" + sha256 "1bbfff9372047ff3f21d5cd8e07720f3dbfdaf6462fcaed9d815f528f1ba7283" + end + + resource "PySocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "antlr4-python3-runtime" do + url "https://files.pythonhosted.org/packages/b6/00/7f1cab9b44518ca225a03f4493ac9294aab5935a7a28486ba91a20ea29cf/antlr4-python3-runtime-4.13.1.tar.gz" + sha256 "3cd282f5ea7cfb841537fe01f143350fdb1c0b1ce7981443a2fa8513fddb6d1a" + end + + resource "applicationinsights" do + url "https://files.pythonhosted.org/packages/f5/02/b831bf3281723b81eb6b041d91d2c219123366f975ec0a73556620773417/applicationinsights-0.11.9.tar.gz" + sha256 "30a11aafacea34f8b160fbdc35254c9029c7e325267874e3c68f6bdbcd6ed2c3" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/7f/03/581b1c29d88fffaa08abbced2e628c34dd92d32f1adaed7e42fc416938b0/argcomplete-3.5.2.tar.gz" + sha256 "23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb" + end + + resource "azure-appconfiguration" do + url "https://files.pythonhosted.org/packages/2c/ff/cd3804d1aa1789f393a3174ca2b701edf7f0092c615ab384fd065afd4433/azure-appconfiguration-1.7.1.tar.gz" + sha256 "3ebe41e9be3f4ae6ca61e5dbc42c4b7cc007a01054a8506501a26dfc199fd3ec" + end + + resource "azure-batch" do + url "https://files.pythonhosted.org/packages/34/e8/6a1354d9fd22a84a83f009915598b823a7d9cb60e39cd28661b9c54d1121/azure_batch-15.0.0b1.tar.gz" + sha256 "dfbddd158ffade52193e3e4d86c996ea7236ffd2695a43734fae5e05a974e2ed" + end + + resource "azure-common" do + url "https://files.pythonhosted.org/packages/99/33/fe8ffd51ed08a2b77d34b6a997f8e3e884a6e08f08f9626c9969d930fd3c/azure-common-1.1.22.zip" + sha256 "c8e4a7bf15f139f779a415d2d3c371738b1e9f5e14abd9c18af6b9bed3babf35" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/ce/89/f53968635b1b2e53e4aad2dd641488929fef4ca9dfb0b97927fa7697ddf3/azure_core-1.35.0.tar.gz" + sha256 "c0be528489485e9ede59b6971eb63c1eaacf83ef53001bfe3904e475e972be5c" + end + + resource "azure-cosmos" do + url "https://files.pythonhosted.org/packages/3c/d3/f74bf55c48851944b726cb36883c68d3c4bb887fb2196f216ca543c691e1/azure-cosmos-3.2.0.tar.gz" + sha256 "4f77cc558fecffac04377ba758ac4e23f076dc1c54e2cf2515f85bc15cbde5c6" + end + + resource "azure-data-tables" do + url "https://files.pythonhosted.org/packages/8b/0c/bc5ca41bcfeb1ce3a7e870084abc257463be521da27c27409f4b502f4739/azure-data-tables-12.4.0.zip" + sha256 "dd5fc8de91e2f8908efa4c64ca7f63cf83b3068a9ba426298de3b54139e9665c" + end + + resource "azure-datalake-store" do + url "https://files.pythonhosted.org/packages/74/58/41042543710a3a0be3bd1b7851c790a3087cdbf4c8eb14efcd7a0a910ea7/azure_datalake_store-1.0.1.tar.gz" + sha256 "5364d4445aab154a1c7cb10215629c3ce46ce5c7aaaf16071890c03fae53a035" + end + + resource "azure-keyvault-administration" do + url "https://files.pythonhosted.org/packages/a9/7c/6f6fb2e13eb0628ed5b2708058ea48746ffaf1dfde59f94ca792eceb11e1/azure-keyvault-administration-4.4.0.tar.gz" + sha256 "7a6b36cb9f544f35750ff2fa94c83b97b3ef20c1fe1b424ea68018eee703f1df" + end + + resource "azure-keyvault-certificates" do + url "https://files.pythonhosted.org/packages/e6/cf/85d521e65557e4dee2cd9c700f518c3a46f6f71068e61c07d0b13b2e0727/azure-keyvault-certificates-4.7.0.zip" + sha256 "9e47d9a74825e502b13d5481c99c182040c4f54723f43371e00859436dfcf3ca" + end + + resource "azure-keyvault-keys" do + url "https://files.pythonhosted.org/packages/69/ed/450c9389d76be1a95a056528ec2b832a3721858dd47b1f4eb12dab7060a1/azure_keyvault_keys-4.11.0.tar.gz" + sha256 "f257b1917a2c3a88983e3f5675a6419449eb262318888d5b51e1cb3bed79779a" + end + + resource "azure-keyvault-secrets" do + url "https://files.pythonhosted.org/packages/5c/a1/78ecabf98e97d600dcac1559ff64b4bc9f84eca126c0aeba859916832b0c/azure-keyvault-secrets-4.7.0.zip" + sha256 "77ee2534ba651a1f306c85d7b505bc3ccee8fea77450ebafafc26aec16e5445d" + end + + resource "azure-keyvault-securitydomain" do + url "https://files.pythonhosted.org/packages/a6/18/3a67754d999a0244f3551c8c28031cdfb5d2b6f072df6b55fc2bf2e69ec5/azure_keyvault_securitydomain-1.0.0b1.tar.gz" + sha256 "3291a191e778a947e4b28ed01327892a93aedcf8e0a0dd674cf116cb11043776" + end + + resource "azure-mgmt-advisor" do + url "https://files.pythonhosted.org/packages/34/96/e28b949dd55e1fc381fae2676c95c8a9410fa4b9768cc02ec3668fc490c4/azure-mgmt-advisor-9.0.0.zip" + sha256 "fc408b37315fe84781b519124f8cb1b8ac10b2f4241e439d0d3e25fd6ca18d7b" + end + + resource "azure-mgmt-apimanagement" do + url "https://files.pythonhosted.org/packages/55/41/18982d29dceae7d2cca0e03513e30d65229a6785a0ab0d6b05e942ea6f6c/azure-mgmt-apimanagement-4.0.0.zip" + sha256 "0224e32c9dbc83cd319eb4452df3d47af26079ac4ba6e1a6be4777f85b24362c" + end + + resource "azure-mgmt-appconfiguration" do + url "https://files.pythonhosted.org/packages/02/96/864552c912934cef3feec816f3012fddaa5b5d8dacb59d01ddbe8c6a4fa3/azure_mgmt_appconfiguration-5.0.0.tar.gz" + sha256 "f8f0f81b790d1ed77bbc052ecdcf7b13091fad88b10c1f3f471000dbd9c20977" + end + + resource "azure-mgmt-appcontainers" do + url "https://files.pythonhosted.org/packages/97/ad/3eb1687c3f27b8a4c87b284f5180984073564f47ebd8445e4a44184473a7/azure-mgmt-appcontainers-2.0.0.zip" + sha256 "71c74876f7604d83d6119096aa42dcf2512e32e004111be5e41d61b89c8192f5" + end + + resource "azure-mgmt-applicationinsights" do + url "https://files.pythonhosted.org/packages/04/d6/31fdc6bc6cebfbf66e12e8a5556e5f7bda7f7ec57367ec9d8025df62560a/azure-mgmt-applicationinsights-1.0.0.zip" + sha256 "c287a2c7def4de19f92c0c31ba02867fac6f5b8df71b5dbdab19288bb455fc5b" + end + + resource "azure-mgmt-authorization" do + url "https://files.pythonhosted.org/packages/a6/dc/f62c0f30274cd06b9afa5f997326e31b05e673a2922333117c8ebaa64e14/azure_mgmt_authorization-5.0.0b1.tar.gz" + sha256 "2b96eab3a61ef9dd84776a476482e82726013bfe110262d90619685b235e5737" + end + + resource "azure-mgmt-batch" do + url "https://files.pythonhosted.org/packages/37/6d/b76ba7ca3b3e68f173afbdaf3373acd11d203be1ccf9408957525c355cba/azure-mgmt-batch-17.3.0.tar.gz" + sha256 "fc94881a6acdb8a9533f371b6f7b2d3eaea1789eb955014b24a908d6dfe75991" + end + + resource "azure-mgmt-batchai" do + url "https://files.pythonhosted.org/packages/80/8b/ed14bdce18c5f7a54dde2d4717f7bfb4bf1546b7b380d2af0af6cb11a999/azure-mgmt-batchai-7.0.0b1.zip" + sha256 "993eafbe359bab445642276e811db6f44f09795122a1b3c3dd703f9c333723a6" + end + + resource "azure-mgmt-billing" do + url "https://files.pythonhosted.org/packages/b0/40/59a55614cc987457efe35c2055a7c5d8757f9cb5207010cb1d3ddf382edd/azure-mgmt-billing-6.0.0.zip" + sha256 "d4f5c5a4188a456fe1eb32b6c45f55ca2069c74be41eb76921840b39f2f5c07f" + end + + resource "azure-mgmt-botservice" do + url "https://files.pythonhosted.org/packages/b9/8d/0b681fc3be71de2e46bb2d4a16e6375eb1f65b65f4f240d1af056929c4dd/azure-mgmt-botservice-2.0.0b3.zip" + sha256 "5d919039e330f2eb32435b65f23e7b7d9deea8bb21a261d8f633bfadba503af3" + end + + resource "azure-mgmt-cdn" do + url "https://files.pythonhosted.org/packages/d7/fc/48310b510043223c42ea2f9ac1e91a9a88b7438c0882d4c32db9f0b9fb0c/azure-mgmt-cdn-12.0.0.zip" + sha256 "b7c3ee2189234b4af51ace2924927c5fd733f3de748a642d6d5040067c8c9ddd" + end + + resource "azure-mgmt-cognitiveservices" do + url "https://files.pythonhosted.org/packages/f7/4b/428c41c3aacad9506e65bd67055cc8ea950857ce4161b6bd895ed44e37f2/azure_mgmt_cognitiveservices-13.7.0.tar.gz" + sha256 "48a5a44c15c6768bad238011aaac83a806ceb8ace1b51b8043e35b39a9167a19" + end + + resource "azure-mgmt-compute" do + url "https://files.pythonhosted.org/packages/87/30/bb941f2eee419009668305b510dfb3577604a08102b3a1d0df78d14205f3/azure_mgmt_compute-34.1.0.tar.gz" + sha256 "cd9d35d1cc1b8cb0bd241ad55c91b77d14e04ae73c632ada1140135f9c217fe1" + end + + resource "azure-mgmt-containerinstance" do + url "https://files.pythonhosted.org/packages/4a/0c/434063cc0dfd1a5f07e4517d6ffc9ffa6bdc6159019266402f61624129c6/azure_mgmt_containerinstance-10.2.0b1.tar.gz" + sha256 "bf4bb77bd6681270dd0a733aa3a7c3ecdfacba8e616d3a8c3b98cce9c48cc7c0" + end + + resource "azure-mgmt-containerregistry" do + url "https://files.pythonhosted.org/packages/b2/38/833c885a044fc1285773b00c618ac5216d8a63c8dd269c7df984b2660c60/azure_mgmt_containerregistry-14.1.0b1.tar.gz" + sha256 "c3f3c8a0f73aa24a19b64c0187db7ec455453efe1df303fbee983922515baa6f" + end + + resource "azure-mgmt-containerservice" do + url "https://files.pythonhosted.org/packages/f1/d8/57a59d50f2287809af2f5a3dd4092ab58a6dfd98b992c3a137911a3c50d2/azure_mgmt_containerservice-40.0.0.tar.gz" + sha256 "6c52a0cd5d55520ef028ea90b72bd8d1328f80d0ce697434ef61c5068626af6f" + end + + resource "azure-mgmt-core" do + url "https://files.pythonhosted.org/packages/3e/99/fa9e7551313d8c7099c89ebf3b03cd31beb12e1b498d575aa19bb59a5d04/azure_mgmt_core-1.6.0.tar.gz" + sha256 "b26232af857b021e61d813d9f4ae530465255cb10b3dde945ad3743f7a58e79c" + end + + resource "azure-mgmt-cosmosdb" do + url "https://files.pythonhosted.org/packages/a1/cd/b5d1eac32515370da90454fe64500d29e20daffd15575550fca5628eb300/azure_mgmt_cosmosdb-9.8.0.tar.gz" + sha256 "214ee47165387e578f86e6611fb329b4d54dc295ad79da37b9d92c5d6d20d1b1" + end + + resource "azure-mgmt-datalake-store" do + url "https://files.pythonhosted.org/packages/70/61/e16aaf70be45eae80aaeb4bd2d4b4101bc6e6dbe301d9ab4c22572808ea7/azure-mgmt-datalake-store-1.1.0b1.zip" + sha256 "5a275768bc1bd918caa0e65df9bae28b74e6fdf3dc9ea7e24aed75ffb499cb64" + end + + resource "azure-mgmt-datamigration" do + url "https://files.pythonhosted.org/packages/06/47/cccd2c22f8f525b8a1c38fd88ffef7ae989f50bd15f1ad5b955e27ef5985/azure-mgmt-datamigration-10.0.0.zip" + sha256 "5cee70f97fe3a093c3cb70c2a190c2df936b772e94a09ef7e3deb1ed177c9f32" + end + + resource "azure-mgmt-eventgrid" do + url "https://files.pythonhosted.org/packages/ff/ef/2d48ac5af17c3ae32feaf40769e4579ca47c4d1c5a6798f149faf0397b65/azure-mgmt-eventgrid-10.2.0b2.zip" + sha256 "41c1d8d700b043254e11d522d3aff011ae1da891f909c777de02754a3bb4a990" + end + + resource "azure-mgmt-eventhub" do + url "https://files.pythonhosted.org/packages/6c/e5/d56993e6334d53ada0b45a07266bafde48d14c72ba9473211b606d95ecf0/azure_mgmt_eventhub-12.0.0b1.tar.gz" + sha256 "e7bdf166c32de7aef5a626953f536ca4f1c6115f16795354c8c3f38f1da1fe10" + end + + resource "azure-mgmt-extendedlocation" do + url "https://files.pythonhosted.org/packages/b7/de/a7b62f053597506e01641c68e1708222f01cd7574e4147d4f645ff6e6aaa/azure-mgmt-extendedlocation-1.0.0b2.zip" + sha256 "9a37c7df94fcd4943dee35601255a667c3f93305d5c5942ffd024a34b4b74fc0" + end + + resource "azure-mgmt-hdinsight" do + url "https://files.pythonhosted.org/packages/4a/50/598359f4aeb3dc7b9d74815ee113138088bca3b095230d9e54da3f76f33a/azure_mgmt_hdinsight-9.1.0b2.tar.gz" + sha256 "5b0d1335e2c1a73bc0891abbb178dc006309756d1e0bc5766c1832b9fb442717" + end + + resource "azure-mgmt-imagebuilder" do + url "https://files.pythonhosted.org/packages/06/a0/5996570f011ddab6dfcc19c5bf64056370c255ffbbd2232447f88f24e5d1/azure-mgmt-imagebuilder-1.3.0.tar.gz" + sha256 "3f325d688b6125c2fa92681e5b18ea407ba032d5be3f7c0724406d733e6c14ef" + end + + resource "azure-mgmt-iotcentral" do + url "https://files.pythonhosted.org/packages/9e/9e/50b30ad35c0038ce93ccf80535d2052967dc0dedae0eee84d2dc81458614/azure-mgmt-iotcentral-10.0.0b1.zip" + sha256 "d42899b935d88486fbe1e1906542471f3a2f60d9e755ddd876ed540b2d81bb4d" + end + + resource "azure-mgmt-iothub" do + url "https://files.pythonhosted.org/packages/c9/41/e44db1427723bd768e7bfd3f0cebd93406878997b3035a982fc3f657f18f/azure_mgmt_iothub-5.0.0b1.tar.gz" + sha256 "091f19a2917b5b486d87c88e04662a90520666233d870746aee70284d6556204" + end + + resource "azure-mgmt-iothubprovisioningservices" do + url "https://files.pythonhosted.org/packages/47/78/b5252f7e42d596d0e8ab4d7ea5f90545436d83c4bf45f1e86d7618d128db/azure-mgmt-iothubprovisioningservices-1.1.0.zip" + sha256 "d383a826e7dff772fad86e88a33a661e911a51b1c71c3ea72a590c1d5a09bc9e" + end + + resource "azure-mgmt-keyvault" do + url "https://files.pythonhosted.org/packages/ca/79/a2200a22c0aa36a85b9e9d93a0702adf75afcf3b79791041ee9872d7a940/azure_mgmt_keyvault-12.1.0.tar.gz" + sha256 "ced572c166354db5db89c9bbe5e215f607c46eabeaac1211138bb9db5de421d3" + end + + resource "azure-mgmt-loganalytics" do + url "https://files.pythonhosted.org/packages/da/3f/c784b29431b597d11fdcdb6b430d114819459eb34da190fceff5a70901cd/azure-mgmt-loganalytics-13.0.0b4.zip" + sha256 "266d6deefe6fc858cd34cfdebd568423db1724a370264e97017b894914a72879" + end + + resource "azure-mgmt-managementgroups" do + url "https://files.pythonhosted.org/packages/b3/e7/74159d9cd15966031ba03a92e0b53c6b0cc895bb5fdb7374fc326fb9dd21/azure-mgmt-managementgroups-1.0.0.zip" + sha256 "bab9bd532a1c34557f5b0ab9950e431e3f00bb96e8a3ce66df0f6ce2ae19cd73" + end + + resource "azure-mgmt-maps" do + url "https://files.pythonhosted.org/packages/c2/d1/35d471f400b612b38473ffa7747ba5fa2f79f47e410009fb887db19a4e8a/azure-mgmt-maps-2.0.0.zip" + sha256 "384e17f76a68b700a4f988478945c3a9721711c0400725afdfcb63cf84e85f0e" + end + + resource "azure-mgmt-marketplaceordering" do + url "https://files.pythonhosted.org/packages/17/9c/74d7746672a4e9ac6136e3043078a2f4d0a0e3568daf2de772de8e4d7cff/azure-mgmt-marketplaceordering-1.1.0.zip" + sha256 "68b381f52a4df4435dacad5a97e1c59ac4c981f667dcca8f9d04453417d60ad8" + end + + resource "azure-mgmt-media" do + url "https://files.pythonhosted.org/packages/54/97/90167348963e7544be9984866712dadaae665d91d0f4fbbae6cddf5875ba/azure-mgmt-media-9.0.0.zip" + sha256 "4c8ee5f2c490d905203ea884dc2bbf17aed69daf8a1db412ddfb888ce6fde593" + end + + resource "azure-mgmt-monitor" do + url "https://files.pythonhosted.org/packages/f1/da/4007e21ff82e645d8bfd600f470bf020a83bdb4eba4d5dda1d749c09c270/azure_mgmt_monitor-7.0.0b1.tar.gz" + sha256 "591e1864cc389e3925a40464ba3b119ddea7c1367c339bd715ccbd01f2fda23e" + end + + resource "azure-mgmt-msi" do + url "https://files.pythonhosted.org/packages/77/d7/4ef788fb8e0f90a3fe5875b05dcef535ad4b4a766372af82870120cd5dd3/azure-mgmt-msi-7.0.0.zip" + sha256 "72d46c9a62783ec4eab619be9d1b78ffebbdaa164d406fd303f16303f37256b2" + end + + resource "azure-mgmt-mysqlflexibleservers" do + url "https://files.pythonhosted.org/packages/61/85/b86cb3e554d72a837f0c86caf9ed43c3462cce5d7ce1bb1114bfcd34745b/azure_mgmt_mysqlflexibleservers-1.0.0b3.tar.gz" + sha256 "611fd88f3db1e0a8477a1633fe94c461d17213e215170eb53c1eea9b823bd4c3" + end + + resource "azure-mgmt-netapp" do + url "https://files.pythonhosted.org/packages/0f/f2/074f7ddf5e62b5853b88483fcdc5bd5acb12ae16d98aa910c8e57132f1f3/azure-mgmt-netapp-10.1.0.zip" + sha256 "7898964ce0a4d82efd268b64bbd6ca96edef53a1fcd34e215ab5fe87be8c8d03" + end + + resource "azure-mgmt-policyinsights" do + url "https://files.pythonhosted.org/packages/d8/ec/4af9af212e5680831208e12874dd064dfdd5a0876af0edfe15be79c04f0e/azure-mgmt-policyinsights-1.1.0b4.zip" + sha256 "681d7ac72ae13581c97a2b6f742795fa48a4db50762c2fb9fce4834081b04e92" + end + + resource "azure-mgmt-postgresqlflexibleservers" do + url "https://files.pythonhosted.org/packages/52/f2/7cc422a144074a30e88bd5d5ca8e12100ca2a90791fef82a1e962bea816f/azure_mgmt_postgresqlflexibleservers-1.1.0b2.tar.gz" + sha256 "f0eb026f275f97bf95ae82cd58e30a760fff2944a7f4a80fc285aaf8da070934" + end + + resource "azure-mgmt-privatedns" do + url "https://files.pythonhosted.org/packages/72/f0/e8e401da635a72936c7edc32d4fdb7fcc4572400e0d66ed6ff6978b935a9/azure-mgmt-privatedns-1.0.0.zip" + sha256 "b60f16e43f7b291582c5f57bae1b083096d8303e9d9958e2c29227a55cc27c45" + end + + resource "azure-mgmt-rdbms" do + url "https://files.pythonhosted.org/packages/ad/48/a494ad47d0ea08d1f9a29abcd241787d2513b5727ac6f3836a66487eaf39/azure-mgmt-rdbms-10.2.0b17.tar.gz" + sha256 "d679d1932af8226efd07b0c3a86cff14eacf013a05686844f9aeebe5b64cb8e4" + end + + resource "azure-mgmt-recoveryservices" do + url "https://files.pythonhosted.org/packages/86/0d/eb3e3928a38e365d2301b9dc08700e0af5474c44542d36c8adf3d5c193c8/azure_mgmt_recoveryservices-4.0.0.tar.gz" + sha256 "a1429cfd283a9c9950ac153482fa9c9741646fd20da8aa9c3c81e725c78c5c9f" + end + + resource "azure-mgmt-recoveryservicesbackup" do + url "https://files.pythonhosted.org/packages/72/28/99997bb991c8d1d53ec1164a4f07adc520e3c10c55b7e0b814f6e6c6043e/azure_mgmt_recoveryservicesbackup-9.2.0.tar.gz" + sha256 "c402b3e22a6c3879df56bc37e0063142c3352c5102599ff102d19824f1b32b29" + end + + resource "azure-mgmt-redhatopenshift" do + url "https://files.pythonhosted.org/packages/01/a2/b89ba36f4bc2708a7ab0115b451028b8888184b3c19bd9a3ac71afec8941/azure-mgmt-redhatopenshift-1.5.0.tar.gz" + sha256 "51fb7429c39c88acc9fa273d9f89f19303520662996a6d7d8e1122a98f5f2527" + end + + resource "azure-mgmt-redis" do + url "https://files.pythonhosted.org/packages/7c/e2/7e4895296df120458af54186d788cb43abb95676e0a075c154606b8772ab/azure_mgmt_redis-14.5.0.tar.gz" + sha256 "5c3434c82492688e25b93aaf5113ecff0b92b7ad6da2a4fd4695530f82b152fa" + end + + resource "azure-mgmt-resource" do + url "https://files.pythonhosted.org/packages/a7/28/e950da2d89e55e2315ff0f4de075da4ac0fed4c27a489f7c774dedde9854/azure_mgmt_resource-23.3.0.tar.gz" + sha256 "fc4f1fd8b6aad23f8af4ed1f913df5f5c92df117449dc354fea6802a2829fea4" + end + + resource "azure-mgmt-resource-templatespecs" do + url "https://files.pythonhosted.org/packages/e6/8d/2b85183b2bef5efef239b96bb33a6a6025593f6617958001d608ff82958a/azure_mgmt_resource_templatespecs-1.0.0b1.tar.gz" + sha256 "0f9e739ab43db2ad870eae5df1b5c4bfa0500bbea1c6e58aa5e2e9c385facbc5" + end + + resource "azure-mgmt-resource-deploymentstacks" do + url "https://files.pythonhosted.org/packages/85/60/870f4fe84574891283b555419b0a45c0828e06d28596fc9bdf3b65692bc0/azure_mgmt_resource_deploymentstacks-1.0.0b1.tar.gz" + sha256 "49b876e45c0f5bab88ec47d7c56e8fb34fbdfcfe5b831a3a2a21e817f3d9732e" + end + + resource "azure-mgmt-resource-deploymentscripts" do + url "https://files.pythonhosted.org/packages/eb/b0/60718c1a96bd4d1c08a7d6bdb620f7fa8740b30f1a0f7796e124d333970d/azure_mgmt_resource_deploymentscripts-1.0.0b1.tar.gz" + sha256 "566d855953e949bb2b34cb43e1e73054aaa79281c74613b745ffddb82c802375" + end + + resource "azure-mgmt-resource-deployments" do + url "https://files.pythonhosted.org/packages/28/64/80b5e10c21d82c79ee2050ed5d2859c725207617dfa30cf7e72f112ad2fb/azure_mgmt_resource_deployments-1.0.0b1.tar.gz" + sha256 "7359b42658826e7e7ff13e6dbb0c490e95fcc95dbca224d2b85cf71ad7535f1d" + end + + resource "azure-mgmt-search" do + url "https://files.pythonhosted.org/packages/c5/52/70315fa90fddd4ac681ecf39ce63e81254e4aa972be3ad94a29eb5e8e24d/azure-mgmt-search-9.0.0.zip" + sha256 "19cfaaa136b5104e3f62626f512a951becd9e74c1fa21bd639efdf2c9fef81bd" + end + + resource "azure-mgmt-security" do + url "https://files.pythonhosted.org/packages/25/b2/bbe822bca8dc617ac5fab0eb40e5786a2ed933b484a3238af5b7a19e6deb/azure-mgmt-security-6.0.0.tar.gz" + sha256 "ceafc1869899067110bd830c5cc98bc9b8f32d8ea840ca1f693b1a5f52a5f8b0" + end + + resource "azure-mgmt-servicebus" do + url "https://files.pythonhosted.org/packages/42/c6/2dbb6d6a10665b93f77c815598586efafc5df2a095cf62613babf16ab02d/azure_mgmt_servicebus-10.0.0b1.tar.gz" + sha256 "bbbc6db9c4bc067fb08271f8eda356129d6051c4538977a8f375120f4e63f79c" + end + + resource "azure-mgmt-servicefabric" do + url "https://files.pythonhosted.org/packages/55/74/056878a1bbe4f07a49ac8479a587ae73c0d7d719cce3b540d4b22af44e81/azure-mgmt-servicefabric-2.1.0.tar.gz" + sha256 "a08433049554436c90844bc8a96820e883699484e6ffc99032fd2571f8c5f7d6" + end + + resource "azure-mgmt-servicefabricmanagedclusters" do + url "https://files.pythonhosted.org/packages/4f/68/d707b2a7fc64cbb42d1e57a183b332dfe8746deca58577a78c4fe42b803e/azure_mgmt_servicefabricmanagedclusters-2.1.0b1.tar.gz" + sha256 "2b16b93c8446e13372e28b378f635da1ad2aa631d9547b31b9fa3b7bc56d0f63" + end + + resource "azure-mgmt-servicelinker" do + url "https://files.pythonhosted.org/packages/81/b2/747b748a16f934f65eec2c37fbab23144b63365483ab19436a921d42ae31/azure_mgmt_servicelinker-1.2.0b3.tar.gz" + sha256 "c51c111fb76c59e58fceccfecfd119f8c83e4d64fdca77a46b62d81ec6a3ea29" + end + + resource "azure-mgmt-signalr" do + url "https://files.pythonhosted.org/packages/5e/0d/fbdf31df60d756790470a50a9c0d5a51db3e16cc42ea66377190ab9ed1b8/azure-mgmt-signalr-2.0.0b2.tar.gz" + sha256 "d393d457ca2e00aabfc611b1544588cc3a29d1aed60d35799865520b8b2ff4fe" + end + + resource "azure-mgmt-sql" do + url "https://files.pythonhosted.org/packages/a3/4a/e41603713e2626100e11208cb047799395eb5d89c4162c7b3d20245000eb/azure_mgmt_sql-4.0.0b22.tar.gz" + sha256 "92edd837d5bd0b2c78cec2b102ce24f7fa1e0d7029ce2daea80511a9aef61f49" + end + + resource "azure-mgmt-sqlvirtualmachine" do + url "https://files.pythonhosted.org/packages/8c/9a/b5f0ebf6b82df07a55556bfb18388d09582e50369b6a69e85b0df66dcb02/azure-mgmt-sqlvirtualmachine-1.0.0b5.zip" + sha256 "6458097e58329d14b1a3e07e56ca38797d4985e5a50d08df27d426ba95f2a4c7" + end + + resource "azure-mgmt-storage" do + url "https://files.pythonhosted.org/packages/fb/42/b01a1c451417ac05229d986f5755a411bec7922c5eb5170d54642c2118df/azure_mgmt_storage-24.0.0.tar.gz" + sha256 "b1ae225ef87ada85f29c02e406140ab5895285ca64de2bcfe50b631c4818a337" + end + + resource "azure-mgmt-synapse" do + url "https://files.pythonhosted.org/packages/9a/37/83c4b44418fb7bb10389e43a5fc29c164bd8524f73a0e664d5f4ccf716be/azure-mgmt-synapse-2.1.0b5.zip" + sha256 "e44e987f51a03723558ddf927850db843c67380e9f3801baa288f1b423f89be9" + end + + resource "azure-mgmt-trafficmanager" do + url "https://files.pythonhosted.org/packages/0f/f0/31bbc546d10254513905174e429e320f192f853159482f2bdc71b4623830/azure-mgmt-trafficmanager-1.0.0.zip" + sha256 "4741761e80346c4edd4cb3f271368ea98063f804d015e245c2fe048ed2b596a8" + end + + resource "azure-mgmt-web" do + url "https://files.pythonhosted.org/packages/6c/b9/1baee7b05ece33dcc88e3a2e8b93dbbfec0d848f0e9fcfa1c34bed53d987/azure_mgmt_web-9.0.0.tar.gz" + sha256 "4455ecd3b498577085c1904e6d17139254e358ba07fe6c4835a891bbaf7b06c2" + end + + resource "azure-monitor-query" do + url "https://files.pythonhosted.org/packages/ad/16/fd06cccfc583d8d38d8d99ee92ec1bbc9604cf6e8c62e64ddca5644e0a60/azure-monitor-query-1.2.0.zip" + sha256 "2c57432443f203069e64e500c7e958ca31650f641950515ffe65555ba134c371" + end + + resource "azure-multiapi-storage" do + url "https://files.pythonhosted.org/packages/cb/b0/2f1e20f8ef180b38f48a12c4c41dbcf74c1657653837b029d25754175211/azure_multiapi_storage-1.6.0.tar.gz" + sha256 "8942e3f4edbeddd23cda19acee796076fbcd1a40e46f9aa1110ffda314e31c55" + end + + resource "azure-storage-common" do + url "https://files.pythonhosted.org/packages/ae/45/0d21c1543afd3a97c416298368e06df158dfb4740da0e646a99dab6080de/azure-storage-common-1.4.2.tar.gz" + sha256 "4ec87c7537d457ec95252e0e46477e2c1ccf33774ffefd05d8544682cb0ae401" + end + + resource "azure-synapse-accesscontrol" do + url "https://files.pythonhosted.org/packages/e9/fd/df10cfab13b3e715e51dd04077f55f95211c3bad325d59cda4c22fec67ea/azure-synapse-accesscontrol-0.5.0.zip" + sha256 "835e324a2072a8f824246447f049c84493bd43a1f6bac4b914e78c090894bb04" + end + + resource "azure-synapse-artifacts" do + url "https://files.pythonhosted.org/packages/17/b6/08aa179e85836089f541b8805e18e9eaca507dc2d8e608f5e9c2e893d4b3/azure_synapse_artifacts-0.21.0.tar.gz" + sha256 "d7e37516cf8569e03c604d921e3407d7140cf7523b67b67f757caf999e3c8ee7" + end + + resource "azure-synapse-managedprivateendpoints" do + url "https://files.pythonhosted.org/packages/14/85/3f7224fb15155be1acd9d5cb2a5ac0575b617cade72a890f09d35b175ad7/azure-synapse-managedprivateendpoints-0.4.0.zip" + sha256 "900eaeaccffdcd01012b248a7d049008c92807b749edd1c9074ca9248554c17e" + end + + resource "azure-synapse-spark" do + url "https://files.pythonhosted.org/packages/bd/59/2b505c6465b05065760cc3af8905835680ef63164d9739311c275be339d4/azure-synapse-spark-0.7.0.zip" + sha256 "86fa29463a24b7c37025ff21509b70e36b4dace28e5d92001bc920488350acd5" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d8/ba/21c475ead997ee21502d30f76fd93ad8d5858d19a3fad7cd153de698c4dd/bcrypt-3.2.0.tar.gz" + sha256 "5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/c2/02/a95f2b11e207f68bc64d7aae9666fed2e2b3f307748d5123dffb72a1bbea/certifi-2024.7.4.tar.gz" + sha256 "5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "cryptography" do + url "https://files.pythonhosted.org/packages/c7/67/545c79fe50f7af51dbad56d16b23fe33f63ee6a5d956b3cb68ea110cbe64/cryptography-44.0.1.tar.gz" + sha256 "f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "fabric" do + url "https://files.pythonhosted.org/packages/0d/3f/337f278b70ba339c618a490f6b8033b7006c583bd197a897f12fbc468c51/fabric-3.2.2.tar.gz" + sha256 "8783ca42e3b0076f08b26901aac6b9d9b1f19c410074e7accfab902c184ff4a3" + end + + resource "humanfriendly" do + url "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz" + sha256 "6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/21/ed/f86a79a07470cb07819390452f178b3bef1d375f2ec021ecfc709fc7cf07/idna-3.7.tar.gz" + sha256 "028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/f9/42/127e6d792884ab860defc3f4d80a8f9812e48ace584ffc5a346de58cdc6c/invoke-2.2.0.tar.gz" + sha256 "ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/db/7a/c0a56c7d56c7fa723988f122fa1f1ccf8c5c4ccc48efad0d214b49e5b1af/isodate-0.6.1.tar.gz" + sha256 "48c5881de7e8b0a0d648cb024c8062dc84e7b840ed81e864c7614fd3c127bde9" + end + + resource "javaproperties" do + url "https://files.pythonhosted.org/packages/db/43/58b89453727acdcf07298fe0f037e45b3988e5dcc78af5dce6881d0d2c5e/javaproperties-0.5.1.tar.gz" + sha256 "2b0237b054af4d24c74f54734b7d997ca040209a1820e96fb4a82625f7bd40cf" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" + sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" + end + + resource "jsondiff" do + url "https://files.pythonhosted.org/packages/dd/13/2b691afe0a90fb930a32b8fc1b0fd6b5bdeaed459a32c5a58dc6654342da/jsondiff-2.0.0.tar.gz" + sha256 "2795844ef075ec8a2b8d385c4d59f5ea48b08e7180fce3cb2787be0db00b1fb4" + end + + resource "knack" do + url "https://files.pythonhosted.org/packages/0c/5b/7cc69b2941a11bdace4faffef8f023543feefd14ab0222b6e62a318c53b9/knack-0.11.0.tar.gz" + sha256 "eb6568001e9110b1b320941431c51033d104cc98cda2254a5c2b09ba569fd494" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/b3/99/b443d095e0e9d4ec7f46cd60c921f9d24904afb889bf884e8550b8326f02/msal-1.34.0b1.tar.gz" + sha256 "86cdbfec14955e803379499d017056c6df4ed40f717fd6addde94bdeb4babd78" + end + + resource "msal-extensions" do + url "https://files.pythonhosted.org/packages/2d/38/ad49272d0a5af95f7a0cb64a79bbd75c9c187f3b789385a143d8d537a5eb/msal_extensions-1.2.0.tar.gz" + sha256 "6f41b320bfd2933d631a215c91ca0dd3e67d84bd1a2f50ce917d5874ec646bef" + end + + resource "msrest" do + url "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip" + sha256 "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1b/0f/c00296e36ff7485935b83d466c4f2cf5934b84b0ad14e81796e1d9d3609b/paramiko-3.5.0.tar.gz" + sha256 "ad11e540da4f55cedda52931f1a3f812a8238a7af7f62a60de538cd80bb28124" + end + + resource "pkginfo" do + url "https://files.pythonhosted.org/packages/54/6a/42056522e1d79fa9768712782f37365ef786d905e4efeed6db44cad1803b/pkginfo-1.8.2.tar.gz" + sha256 "542e0d0b6750e2e21c20179803e40ab50598d8066d51097a0e382cba9eb02bff" + end + + resource "portalocker" do + url "https://files.pythonhosted.org/packages/38/2e/32172e8418f2ba284cee4fd67cb547d39a7debb3eed37d514da173786112/portalocker-2.3.2.tar.gz" + sha256 "75cfe02f702737f1726d83e04eedfa0bda2cc5b974b1ceafb8d6b42377efbd5f" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/26/10/2a30b13c61e7cf937f4adf90710776b7918ed0a9c434e2c38224732af310/psutil-6.1.0.tar.gz" + sha256 "353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "Pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "PyJWT" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "PyNaCl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "microsoft-security-utilities-secret-masker" do + url "https://files.pythonhosted.org/packages/e8/1a/6fa5c0ba55ed62e17df010af8a3a71ffea701c3d414b4688834c527d5aeb/microsoft_security_utilities_secret_masker-1.0.0b4.tar.gz" + sha256 "a30bd361ac18c8b52f6844076bc26465335949ea9c7a004d95f5196ec6fdef3e" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "py-deviceid" do + url "https://files.pythonhosted.org/packages/0c/fe/1beb99282853f4f6fd32af50dc1f77d15e8883627bf5014a14a7eb024963/py_deviceid-0.1.1.tar.gz" + sha256 "c3e7577ada23666e7f39e69370dfdaa76fe9de79c02635376d6aa0229bfa30e3" + end + + resource "pyOpenSSL" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + end + + resource "pycomposefile" do + url "https://files.pythonhosted.org/packages/a3/77/031cfe69eb2075f7479a1fc9913ed8b131001e5a94dc450b7704997e5246/pycomposefile-0.0.32.tar.gz" + sha256 "a355d515c4c4ff92ee5a16590de8b367a3be4827046592d0870f8cb6ac4a6e34" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/ad/99/5b2e99737edeb28c71bcbec5b5dda19d0d9ef3ca3e92e3e925e7c0bb364c/python-dateutil-2.8.0.tar.gz" + sha256 "c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e" + end + + resource "PyYAML" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/de/a2/f55312dfe2f7a344d0d4044fdfae12ac8a24169dc668bd55f72b27090c32/requests-oauthlib-1.2.0.tar.gz" + sha256 "bd6533330e8748e94bf0b214775fed487d309b8b8fe823dc45641ebcd9a32f57" + end + + resource "scp" do + url "https://files.pythonhosted.org/packages/05/e0/ac4169e773e12a08d941ca3c006cb8c91bee9d6d80328a15af850b5e7480/scp-0.13.2.tar.gz" + sha256 "ef9d6e67c0331485d3db146bf9ee9baff8a48f3eb0e6c08276a8584b13bf34b3" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "sshtunnel" do + url "https://files.pythonhosted.org/packages/c5/5c/4b320d7ec4b0d5d4d6df1fdf66a5799625b3623d0ce4efe81719c6f8dfb3/sshtunnel-0.1.5.tar.gz" + sha256 "c813fdcda8e81c3936ffeac47cb69cfb2d1f5e77ad0de656c6dab56aeebd9249" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ae/3d/9d7576d94007eaf3bb685acbaaec66ff4cdeb0b18f1bf1f17edbeebffb0a/tabulate-0.8.9.tar.gz" + sha256 "eb1d13f25760052e8931f2ef80aaf6045a6cceb47514db8beab24cded16f13a7" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/8d/12/cd10d050f7714ccc675b486cdcbbaed54c782a5b77da2bb82e5c7b31fb40/websocket-client-1.3.1.tar.gz" + sha256 "6278a75065395418283f887de7c3beafb3aa68dada5cacbe4b214e8d26da499b" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz" + sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + venv = virtualenv_create(libexec, "python3.13", system_site_packages: false) + venv.pip_install resources + + # Get the CLI components we'll install + components = [ + buildpath/"src/azure-cli", + buildpath/"src/azure-cli-telemetry", + buildpath/"src/azure-cli-core", + ] + + # Install CLI + components.each do |item| + cd item do + venv.pip_install item + end + end + + (bin/"az").write <<~SHELL + #!/usr/bin/env bash + AZ_INSTALLER=HOMEBREW #{libexec}/bin/python -Im azure.cli "$@" + SHELL + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "az", + base_name: "az", shell_parameter_format: :arg) + end + + test do + json_text = shell_output("#{bin}/az cloud show --name AzureCloud") + azure_cloud = JSON.parse(json_text) + assert_equal azure_cloud["name"], "AzureCloud" + assert_equal azure_cloud["endpoints"]["management"], "https://management.core.windows.net/" + assert_equal azure_cloud["endpoints"]["resourceManager"], "https://management.azure.com/" + end +end diff --git a/Formula/a/azure-core-cpp.rb b/Formula/a/azure-core-cpp.rb new file mode 100644 index 0000000000000..b085ac6903701 --- /dev/null +++ b/Formula/a/azure-core-cpp.rb @@ -0,0 +1,53 @@ +class AzureCoreCpp < Formula + desc "Primitives, abstractions and helpers for Azure SDK client libraries" + homepage "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/core/azure-core" + url "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-core_1.16.1.tar.gz" + sha256 "4d2a85be0a5b7ced9a75cb89434fa6c0712784fb3dfd5d378514197bf9d21e96" + license "MIT" + + livecheck do + url :stable + regex(/^azure-core[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "147b229f3cd5c72c2b6ff353dbd34a0677a5a140ab3d0352d51718a24fd7173e" + sha256 cellar: :any, arm64_sequoia: "ba3db1c8658ac6e079e8ce49ff6100da42895193000081b2db75b5d5d39e5aee" + sha256 cellar: :any, arm64_sonoma: "32853f153fba753256d26039b0ca9da4a39d1c22b94a5ee94e5af03a599747ac" + sha256 cellar: :any, arm64_ventura: "4966615792bec9650801744bccbe9d872d26b6a7974e6da7372fe61939d0fc4d" + sha256 cellar: :any, sonoma: "b515c0397f389c49a1e5c585e036ff64fcf1cc319ec2f790c7c1a3e5c9214925" + sha256 cellar: :any, ventura: "1475ad75fc67f4b11e2472a6ff93a56c8cd3954061b6ce68971fa0b9c81cb5ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "03e8711bd015d54c60d0c4f7d502ab075ebe4bd3a84a5bf817303449818bf5a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd63088a70b504ace021c6fedc8b0382d5455e5152315beb897f3b335fd973c4" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + + def install + ENV["AZURE_SDK_DISABLE_AUTO_VCPKG"] = "1" + system "cmake", "-S", "sdk/core/azure-core", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # From https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/test/ut/datetime_test.cpp + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + auto dt1 = Azure::DateTime::Parse("20130517T00:00:00Z", Azure::DateTime::DateFormat::Rfc3339); + auto dt2 = Azure::DateTime::Parse("Fri, 17 May 2013 00:00:00 GMT", Azure::DateTime::DateFormat::Rfc1123); + assert(0 != dt2.time_since_epoch().count()); + assert(dt1 == dt2); + return 0; + } + CPP + system ENV.cxx, "-std=c++14", "test.cpp", "-o", "test", "-L#{lib}", "-lazure-core" + system "./test" + end +end diff --git a/Formula/a/azure-storage-blobs-cpp.rb b/Formula/a/azure-storage-blobs-cpp.rb new file mode 100644 index 0000000000000..a1bdbafdaded6 --- /dev/null +++ b/Formula/a/azure-storage-blobs-cpp.rb @@ -0,0 +1,65 @@ +class AzureStorageBlobsCpp < Formula + desc "Microsoft Azure Storage Blobs SDK for C++" + homepage "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-blobs" + url "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-storage-blobs_12.15.0.tar.gz" + sha256 "00040ef20d25918eafd5e89e8c237d5a647810efb1466677fbe0cbb766213f7c" + license "MIT" + revision 1 + + livecheck do + url :stable + regex(/^azure-storage-blobs[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ee0fe5e82e94b7afb9ab20b69b03c0fac96c06b04deadea7a2238d0777c60668" + sha256 cellar: :any, arm64_sequoia: "9ef30c3ec542134106961931594cd2daa5aa0f94482094f7f3e9f97f61c8e6c1" + sha256 cellar: :any, arm64_sonoma: "e684e0a234fe3de910d7c8e1f5fec412368f3939c43a78a681f6e12951bd529f" + sha256 cellar: :any, sonoma: "170a519183917482dd97204e5cbb2979c6e90e47ad2f2d0376f95bc41d0aeb7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c9337a8777f45e2f88ede3dfaa7dd588a37510de0f9325a72a66abcf904fdaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f19943239844bbc08ec1012be4061af852a169089777fcc4977b9c72f76cbce" + end + + depends_on "cmake" => :build + depends_on "azure-core-cpp" + depends_on "azure-storage-common-cpp" + + def install + ENV["AZURE_SDK_DISABLE_AUTO_VCPKG"] = "1" + system "cmake", "-S", "sdk/storage/azure-storage-blobs", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # From https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-blobs/test/ut/simplified_header_test.cpp + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + Azure::Storage::Blobs::BlobServiceClient serviceClient("https://account.blob.core.windows.net"); + Azure::Storage::Blobs::BlobContainerClient containerClient( + "https://account.blob.core.windows.net/container"); + Azure::Storage::Blobs::BlobClient blobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::BlockBlobClient blockBlobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::PageBlobClient pageBlobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::AppendBlobClient appendBlobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::BlobLeaseClient leaseClient( + containerClient, Azure::Storage::Blobs::BlobLeaseClient::CreateUniqueLeaseId()); + + Azure::Storage::Sas::BlobSasBuilder sasBuilder; + + Azure::Storage::StorageSharedKeyCredential keyCredential("account", "key"); + return 0; + } + CPP + system ENV.cxx, "-std=c++14", "test.cpp", "-o", "test", + "-L#{lib}", "-lazure-storage-blobs", + "-L#{Formula["azure-core-cpp"].opt_lib}", "-lazure-core" + system "./test" + end +end diff --git a/Formula/a/azure-storage-common-cpp.rb b/Formula/a/azure-storage-common-cpp.rb new file mode 100644 index 0000000000000..e57f0d6770885 --- /dev/null +++ b/Formula/a/azure-storage-common-cpp.rb @@ -0,0 +1,59 @@ +class AzureStorageCommonCpp < Formula + desc "Provides common Azure Storage-related abstractions for Azure SDK" + homepage "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-common" + url "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-storage-common_12.11.0.tar.gz" + sha256 "456c95bf5c723ae4f84202faa45a0644b8f25b34bced37dce6b6afd854c17936" + license "MIT" + + livecheck do + url :stable + regex(/^azure-storage-common[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c5d3308f10f7eff56ac3913efee810fb44ef351a192ddec1040494787e8416ab" + sha256 cellar: :any, arm64_sequoia: "00fc8aa5dc515606eb23bab63a4d27484dbe3885b291e189fabe3c9e2a94f197" + sha256 cellar: :any, arm64_sonoma: "d69c75cd6f6c9c0426757c077666fc8853087731874aca9c733272a6ab4f5502" + sha256 cellar: :any, sonoma: "8f83d43a40fc0efc75535cbcd33414def4e880708a20af1dabb89d57d3634487" + sha256 cellar: :any_skip_relocation, arm64_linux: "09d0469fe2eb85c03b74e95c7c402bf3d133e6e1bf4590601bac46570c9e0f47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b075c2b0520e483c04e8b57569e6876f14a455c9b8d2ae997d9c993ac6c84d5" + end + + depends_on "cmake" => :build + depends_on "azure-core-cpp" + depends_on "openssl@3" + + uses_from_macos "libxml2" + + def install + ENV["AZURE_SDK_DISABLE_AUTO_VCPKG"] = "1" + system "cmake", "-S", "sdk/storage/azure-storage-common", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # From https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-common/test/ut/crypt_functions_test.cpp + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + static std::vector ComputeHash(const std::string& data) { + const uint8_t* ptr = reinterpret_cast(data.data()); + Azure::Storage::Crc64Hash instance; + return instance.Final(ptr, data.length()); + } + + int main() { + assert(Azure::Core::Convert::Base64Encode(ComputeHash("Hello Azure!")) == "DtjZpL9/o8c="); + return 0; + } + CPP + system ENV.cxx, "-std=c++14", "test.cpp", "-o", "test", + "-L#{lib}", "-lazure-storage-common", + "-L#{Formula["azure-core-cpp"].opt_lib}", "-lazure-core" + system "./test" + end +end diff --git a/Formula/a/azure-storage-cpp.rb b/Formula/a/azure-storage-cpp.rb new file mode 100644 index 0000000000000..b3435a7225b5a --- /dev/null +++ b/Formula/a/azure-storage-cpp.rb @@ -0,0 +1,72 @@ +class AzureStorageCpp < Formula + desc "Microsoft Azure Storage Client Library for C++" + homepage "https://azure.github.io/azure-storage-cpp/" + url "https://github.com/Azure/azure-storage-cpp/archive/refs/tags/v7.5.0.tar.gz" + sha256 "446a821d115949f6511b7eb01e6a0e4f014b17bfeba0f3dc33a51750a9d5eca5" + license "Apache-2.0" + revision 11 + + bottle do + sha256 cellar: :any, arm64_sequoia: "f00202a3cc5f45662cb1bf801b41b41da1e6723ab96ae9a34d25cce65d62ff4e" + sha256 cellar: :any, arm64_sonoma: "66384afbbbaaf12285b727f25b3f6c21637183de034a0cf48c1d3c282f90cb67" + sha256 cellar: :any, arm64_ventura: "6765f5fa16be2927c8fcf835d78ee871d3732ccea22a810177bf9f96df5f80f2" + sha256 cellar: :any, sonoma: "2ce10849c8309c5ce8244584ad2684d56e038228d93dd4116228518f4b28b847" + sha256 cellar: :any, ventura: "b8a14b220f1ad4e4c759146992258c51906652387a5aabaa924a296f31d37a31" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bdea74a09a3eec6da16d427c5570792e4793340d5f4fe88ba8b0d4b0e5bbf2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43fc31791da3f757934d1f122292cce81008d2af85f98284a7cfb89f9aab9104" + end + + # https://github.com/Azure/azure-storage-cpp/commit/b319b189067ac5f54137ddcfc18ef506816cbea4 + # https://aka.ms/AzStorageCPPSDKRetirement + disable! date: "2025-05-20", because: :deprecated_upstream, replacement_formula: "azure-storage-blobs-cpp" + + depends_on "cmake" => :build + depends_on "boost@1.85" + depends_on "cpprestsdk" + depends_on "openssl@3" + + uses_from_macos "libxml2" + + on_linux do + depends_on "util-linux" + end + + def install + system "cmake", "-S", "Microsoft.WindowsAzure.Storage", "-B", "build", + "-DBUILD_SAMPLES=OFF", + "-DBUILD_TESTS=OFF", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + using namespace azure; + int main() { + utility::string_t storage_connection_string(_XPLATSTR("DefaultEndpointsProtocol=https;AccountName=myaccountname;AccountKey=myaccountkey")); + try { + azure::storage::cloud_storage_account storage_account = azure::storage::cloud_storage_account::parse(storage_connection_string); + return 0; + } + catch(...){ return 1; } + } + CPP + boost = Formula["boost@1.85"] + flags = ["-std=c++11", "-I#{include}", + "-I#{boost.include}", + "-I#{Formula["openssl@3"].include}", + "-I#{Formula["cpprestsdk"].include}", + "-L#{boost.lib}", + "-L#{Formula["cpprestsdk"].lib}", + "-L#{Formula["openssl@3"].lib}", + "-L#{lib}", + "-lcpprest", "-lboost_system-mt", "-lssl", "-lcrypto", "-lazurestorage"] + flags << "-stdlib=libc++" if OS.mac? + system ENV.cxx, "-o", "test_azurestoragecpp", "test.cpp", *flags + system "./test_azurestoragecpp" + end +end diff --git a/Formula/a/azurehound.rb b/Formula/a/azurehound.rb new file mode 100644 index 0000000000000..f1d03f60287d3 --- /dev/null +++ b/Formula/a/azurehound.rb @@ -0,0 +1,36 @@ +class Azurehound < Formula + desc "Azure Data Exporter for BloodHound" + homepage "https://github.com/SpecterOps/AzureHound" + url "https://github.com/SpecterOps/AzureHound/archive/refs/tags/v2.8.1.tar.gz" + sha256 "8a99ba69dd15c05bc1b85d9234c1de22b02e100a3a0ce605f7d89a569071e93c" + license "GPL-3.0-or-later" + head "https://github.com/SpecterOps/AzureHound.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "83a334b62de0996744cc7fed1ec39a2b3779353bd6d936e4d8940aa6b646ea71" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83a334b62de0996744cc7fed1ec39a2b3779353bd6d936e4d8940aa6b646ea71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "83a334b62de0996744cc7fed1ec39a2b3779353bd6d936e4d8940aa6b646ea71" + sha256 cellar: :any_skip_relocation, sonoma: "fe314a96a45c94c3c204f8c16128004a11f8daf8ca1bd4e184d891b60951cdd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "827159f06900908bca25d8812496d87d4deb4aefe21985c5323b60367cc518dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "638f98e3c913adf10938a5f4ce73db61d2ca7a6733c5441f6a06dbfe88e3a8a8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/bloodhoundad/azurehound/v2/constants.Version=#{version}") + + generate_completions_from_executable(bin/"azurehound", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/azurehound --version") + + assert_match "No configuration file", shell_output("#{bin}/azurehound list 2>&1", 1) + end +end diff --git a/Formula/a2ps.rb b/Formula/a2ps.rb deleted file mode 100644 index 0b5ba47449816..0000000000000 --- a/Formula/a2ps.rb +++ /dev/null @@ -1,47 +0,0 @@ -class A2ps < Formula - desc "Any-to-PostScript filter" - homepage "https://www.gnu.org/software/a2ps/" - url "https://ftp.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz" - mirror "https://ftpmirror.gnu.org/a2ps/a2ps-4.14.tar.gz" - sha256 "f3ae8d3d4564a41b6e2a21f237d2f2b104f48108591e8b83497500182a3ab3a4" - - bottle do - rebuild 3 - sha256 "b3d7d7bd0bfcada7fc2bc2340ab67362e5087e53b4d611d84aafedf713bde6c3" => :mojave - sha256 "99646196c8b9e6d5a7b67ecca1589160749d690128bb89aace3b79d4c355dfde" => :high_sierra - sha256 "5a1c466a3f833797710464dd1aaf4ad6c9ff0a47de33ab3b2ba9cf0c2be36bfd" => :sierra - sha256 "532c3f14debcd59028285dad1d6fe41dbad481718cc1752b1b9e7c05fd82e27f" => :el_capitan - end - - pour_bottle? do - reason "The bottle needs to be installed into /usr/local." - # https://github.com/Homebrew/brew/issues/2005 - satisfy { HOMEBREW_PREFIX.to_s == "/usr/local" } - end - - # Software was last updated in 2007. - # https://svn.macports.org/ticket/20867 - # https://trac.macports.org/ticket/18255 - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0ae366e6/a2ps/patch-contrib_sample_Makefile.in" - sha256 "5a34c101feb00cf52199a28b1ea1bca83608cf0a1cb123e6af2d3d8992c6011f" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0ae366e6/a2ps/patch-lib__xstrrpl.c" - sha256 "89fa3c95c329ec326e2e76493471a7a974c673792725059ef121e6f9efb05bf4" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--sysconfdir=#{etc}", - "--with-lispdir=#{elisp}" - system "make", "install" - end - - test do - (testpath/"test.txt").write("Hello World!\n") - system bin/"a2ps", "test.txt", "-o", "test.ps" - assert File.read("test.ps").start_with?("") - end -end diff --git a/Formula/a52dec.rb b/Formula/a52dec.rb deleted file mode 100644 index 0fa9bcad0583b..0000000000000 --- a/Formula/a52dec.rb +++ /dev/null @@ -1,31 +0,0 @@ -class A52dec < Formula - desc "Library for decoding ATSC A/52 streams (AKA 'AC-3')" - homepage "https://liba52.sourceforge.io/" - url "https://liba52.sourceforge.io/files/a52dec-0.7.4.tar.gz" - sha256 "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33" - - bottle do - cellar :any - sha256 "5186add25fb7aae66c80139b56ea81fb3aff1f87e74354c2cebe022374532286" => :mojave - sha256 "c7485fae127d02a6628186b821d72fc40bc82019ae30ddee0abfacf2b63701dc" => :high_sierra - sha256 "150123fdf33421b85f4625d73c015a660300db698a82fd0165475fe8e7081d0b" => :sierra - sha256 "2feac8f578fd1aa43385ce8714b059c90f4aaf3a0401d8ba825939e8e8ab7b1b" => :el_capitan - sha256 "cfe0ddcf275b03d9ad0c626174962601ae18d3f77fa35266228425b818ce4a7f" => :yosemite - sha256 "cb40eed81300fa32069bac07244cf7f56363cc04af853ddb75bada292e8d9912" => :mavericks - sha256 "8311a6c00e6213f754062a6cf243bc807ca2c9b6db73f78de3b8149679d7ccc9" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-shared", - "--mandir=#{man}" - system "make", "install" - end - - test do - touch testpath/"test" - system "#{bin}/a52dec", "-o", "null", "test" - end -end diff --git a/Formula/aacgain.rb b/Formula/aacgain.rb deleted file mode 100644 index 0c574faf8b24c..0000000000000 --- a/Formula/aacgain.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Aacgain < Formula - desc "AAC-supporting version of mp3gain" - homepage "https://aacgain.altosdesign.com/" - # This server will autocorrect a 1.9 url back to this 1.8 tarball. - # The 1.9 version mentioned on the website is pre-release, so make - # sure 1.9 is actually out before updating. - # See: https://github.com/Homebrew/homebrew/issues/16838 - url "https://aacgain.altosdesign.com/alvarez/aacgain-1.8.tar.bz2" - sha256 "2bb8e27aa8f8434a4861fdbc70adb9cb4b47e1dfe472910d62d6042cb80a2ee1" - - bottle do - cellar :any_skip_relocation - sha256 "a6d9e4d4f20311e0a91bdbc6f42ef8894e6a6b9f4d8290938d14f02868821c0d" => :mojave - sha256 "eda9c36cf9517c9f342031632b9fb38f77d8150cc2a7cf88b57e46f77395c96e" => :high_sierra - sha256 "2d7ea587b06feb7ccb4f6dfaee3a6d7b329e041cc80af969afb8b5d1631997e8" => :sierra - sha256 "b97aaaf19fee69734b4a29e22c498becaa94b3025a192a7ef8f1ecfb0a2ce87c" => :el_capitan - sha256 "5c01278c495e8a67b7af02f6355ac6a79ce6b4caa5148503346eb33e7d26b70a" => :yosemite - sha256 "9bf1cb0bf030d70bb37a311b92621747d02379cb7f6ae6734bcb4239bdb9d4e6" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # aacgain modifies files in-place - # See: https://github.com/Homebrew/homebrew/pull/37080 - cp test_fixtures("test.m4a"), "test.m4a" - system bin/"aacgain", "test.m4a" - end -end diff --git a/Formula/aalib.rb b/Formula/aalib.rb deleted file mode 100644 index bdb025ebcce64..0000000000000 --- a/Formula/aalib.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Aalib < Formula - desc "Portable ASCII art graphics library" - homepage "https://aa-project.sourceforge.io/aalib/" - url "https://downloads.sourceforge.net/aa-project/aalib-1.4rc5.tar.gz" - sha256 "fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "a19ebbf86362d9a90900dd0b4013ebed778cd8681c0b3ed122c8bbaa04b11cbe" => :mojave - sha256 "b2c5467ff9182645676381967b8dc89878f88900b19bed34ef432fd3257aa2a0" => :high_sierra - sha256 "2c2d05720ca991422e4c27e3f770c29024c5197871cba67404f4e72a3cfaf002" => :sierra - sha256 "9b3f19e5da28fb682aeb1fe40f1747d1b532490dd50262978aaefcb7afbc8804" => :el_capitan - sha256 "9e08dd4e3545b05353f3158e4e756c20a301bef295b72183e1fd5fb1d6d8e897" => :yosemite - end - - # Fix malloc/stdlib issue on macOS - # Fix underquoted definition of AM_PATH_AALIB in aalib.m4 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/6e23dfb/aalib/1.4rc5.patch" - sha256 "54aeff2adaea53902afc2660afb9534675b3ea522c767cbc24a5281080457b2c" - end - - def install - ENV.ncurses_define - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}", - "--enable-shared=yes", - "--enable-static=yes", - "--without-x" - system "make", "install" - end - - test do - system "script", "-q", "/dev/null", bin/"aainfo" - end -end diff --git a/Formula/aamath.rb b/Formula/aamath.rb deleted file mode 100644 index c44d53d39defe..0000000000000 --- a/Formula/aamath.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Aamath < Formula - desc "Renders mathematical expressions as ASCII art" - homepage "http://fuse.superglue.se/aamath/" - url "http://fuse.superglue.se/aamath/aamath-0.3.tar.gz" - sha256 "9843f4588695e2cd55ce5d8f58921d4f255e0e65ed9569e1dcddf3f68f77b631" - - bottle do - cellar :any_skip_relocation - sha256 "79ef03b1d334136b693131b133944109545b07aca2dfd9165531016e4250444c" => :mojave - sha256 "41223cb51bc006abfba33b6af77b665c28de4155d19e5f43d0561b885b73368f" => :high_sierra - sha256 "d537cb11d2dcbac9b5d5356c471775699312e83450635ba7676083f381a531cd" => :sierra - sha256 "8b805e37fd5f4536b4fbf7f3ae6251b645b4b132027d56ccd015a6036c304744" => :el_capitan - sha256 "1e22022e621e7d2337edf4a80ae2c1618a89089132656d85cc141774565e34d7" => :yosemite - sha256 "0212e0b5844ea1a491bc7d4fcab2b590921042b28bc50e79c36cd9e15d08e2aa" => :mavericks - end - - # Fix build on clang; patch by Homebrew team - # https://github.com/Homebrew/homebrew/issues/23872 - patch :DATA - - def install - ENV.deparallelize - system "make" - - bin.install "aamath" - man1.install "aamath.1" - prefix.install "testcases" - end - - test do - s = pipe_output("#{bin}/aamath", (prefix/"testcases").read) - assert_match /#{Regexp.escape("f(x + h) = f(x) + h f'(x)")}/, s - end -end - -__END__ -diff --git a/expr.cc b/expr.cc -index 7bc0ee3..8f4eaf7 100644 ---- a/expr.cc -+++ b/expr.cc -@@ -1192,7 +1192,7 @@ IntegralOnInterval::render_head() const - - class SumSymbol : public OpSymbol { - public: -- void render(Canvas& c, int r, int c) const; -+ void render(Canvas& canvas, int r, int c) const; - }; - - void -@@ -1208,7 +1208,7 @@ SumSymbol::render(Canvas& canvas, int r, int c) const - - class ProductSymbol : public OpSymbol { - public: -- void render(Canvas& c, int r, int c) const; -+ void render(Canvas& canvas, int r, int c) const; - }; - - void -@@ -1612,7 +1612,7 @@ Matrix::render() const - int cols = num_cols(); - int rows = num_rows(); - -- CanvasPtr ec[cols * rows]; -+ CanvasPtr *ec = new CanvasPtr[cols * rows]; - Size sz[cols * rows]; - - int row_height[rows]; -@@ -1692,6 +1692,8 @@ Matrix::render() const - - canvas->center(); - -+ delete[] ec; -+ - return canvas; - } - -diff --git a/expr.h b/expr.h -index 000ebd4..d233da9 100644 ---- a/expr.h -+++ b/expr.h -@@ -451,7 +451,7 @@ class Integral : public OpOnFunction { - - virtual CanvasPtr render_head() const; - -- void render_symbol(Canvas& c, int r, int c, int h) const; -+ void render_symbol(Canvas& canvas, int r, int c, int h) const; - - virtual CanvasPtr render() const; - }; -@@ -467,7 +467,7 @@ class IntegralOnInterval : public Integral, public OpOverInterval { - - class OpSymbol { - public: -- virtual void render(Canvas& c, int r, int c) const = 0; -+ virtual void render(Canvas& canvas, int r, int c) const = 0; - }; - - class SumOrProduct : public OpOnFunction { diff --git a/Formula/aap.rb b/Formula/aap.rb deleted file mode 100644 index b540167bf3ada..0000000000000 --- a/Formula/aap.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Aap < Formula - desc "Make-like tool to download, build, and install software" - homepage "http://www.a-a-p.org" - url "https://downloads.sourceforge.net/project/a-a-p/aap-1.094.zip" - sha256 "3f53b2fc277756042449416150acc477f29de93692944f8a77e8cef285a1efd8" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "533ff4c588ea7e7369570eb3ae7de191d9b62ed9161acbdeb0b07cb8d328aec7" => :mojave - sha256 "4fa43a4a0294b7e9040e13bf843e70fbeb189c2e505315dd574fbc9ed43bd060" => :high_sierra - sha256 "6e42400eb31e15dae56452b347925eb20faae1b996d94173b8711bd080e4a182" => :sierra - sha256 "32c30b38a37147754c5abfe9a801777b4a798af6dbcce2f15e1693c6027f0fbe" => :el_capitan - sha256 "15472b5a56a90d2d83c3ab24eba09e3644867857d8a7c547c82e6937beff3344" => :yosemite - sha256 "b141c07f091f90bd883148bf0e3c093d90fc0be7c4f8e7d07df9ae7cae684862" => :mavericks - end - - depends_on "python@2" # does not support Python 3 - - def install - # Aap is designed to install using itself - system "./aap", "install", "PREFIX=#{prefix}", "MANSUBDIR=share/man" - end - - test do - # A dummy target definition - (testpath/"main.aap").write("dummy:\n\t:print OK\n") - system "#{bin}/aap", "dummy" - end -end diff --git a/Formula/aardvark_shell_utils.rb b/Formula/aardvark_shell_utils.rb deleted file mode 100644 index 5210c1890d69c..0000000000000 --- a/Formula/aardvark_shell_utils.rb +++ /dev/null @@ -1,33 +0,0 @@ -class AardvarkShellUtils < Formula - desc "Utilities to aid shell scripts or command-line users" - homepage "http://www.laffeycomputer.com/shellutils.html" - url "https://web.archive.org/web/20170106105512/downloads.laffeycomputer.com/current_builds/shellutils/aardvark_shell_utils-1.0.tar.gz" - sha256 "aa2b83d9eea416aa31dd1ce9b04054be1a504e60e46426225543476c0ebc3f67" - - bottle do - cellar :any_skip_relocation - sha256 "d67eb7992219f30e6bced8b4a47d4a111ebb81b6b622d33dfb73ce2022b4fb70" => :mojave - sha256 "aec60722076aab148a97d2f426f7d15b1b214793f8168b15f2b6d4d65d2afc48" => :high_sierra - sha256 "cf6d9a3d99fefa3cce7ea67c7e8070a99d648b5bf3a3cd9da9ab128a1696327d" => :sierra - sha256 "4fc19fca9729b408c5a77f362fff72a8c74c324d4a81cc0cf3e4c91b41bf2d6f" => :el_capitan - sha256 "ca1cb774102a7e5128f964c2c9d48b45877f1fd3347288edb2adef5981fdd0f4" => :yosemite - sha256 "e8e8b6fd4ee85d8a6ae267fbd20160c1aeddeb6c8e302793b12a807131ef4b27" => :mavericks - end - - conflicts_with "coreutils", :because => "both install `realpath` binaries" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - assert_equal "movcpm", shell_output("#{bin}/filebase movcpm.com").strip - assert_equal "com", shell_output("#{bin}/fileext movcpm.com").strip - assert_equal testpath.realpath.to_s, shell_output("#{bin}/realpath .").strip - end -end diff --git a/Formula/abcde.rb b/Formula/abcde.rb deleted file mode 100644 index 07787638350e7..0000000000000 --- a/Formula/abcde.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Abcde < Formula - desc "Better CD Encoder" - homepage "https://abcde.einval.com" - url "https://abcde.einval.com/download/abcde-2.9.2.tar.gz" - sha256 "34356c6ea4cc39b33c807261bfdf8e8da8905b2ed50313147c78b283eef6858d" - revision 1 - head "https://git.einval.com/git/abcde.git" - - bottle do - cellar :any_skip_relocation - sha256 "9b390aaedef649f141a790b7291db5db37e288a28a11962b30799769cc8fe979" => :mojave - sha256 "d24c74859027cb359cd0b1eb3966551da4641dd44ea001c33b45e596ccc7b9bb" => :high_sierra - sha256 "d24c74859027cb359cd0b1eb3966551da4641dd44ea001c33b45e596ccc7b9bb" => :sierra - end - - depends_on "cd-discid" - depends_on "cdrtools" - depends_on "flac" - depends_on "glyr" - depends_on "id3v2" - depends_on "lame" - depends_on "mkcue" - depends_on "vorbis-tools" - - def install - system "make", "install", "prefix=#{prefix}", "sysconfdir=#{etc}" - end - - test do - assert_match version.to_s, shell_output("#{bin}/abcde -v") - end -end diff --git a/Formula/abcl.rb b/Formula/abcl.rb deleted file mode 100644 index b6b34d1fe2c67..0000000000000 --- a/Formula/abcl.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Abcl < Formula - desc "Armed Bear Common Lisp: a full implementation of Common Lisp" - homepage "https://abcl.org/" - url "https://abcl.org/releases/1.5.0/abcl-src-1.5.0.tar.gz" - sha256 "920ee7d634a7f4ceca0a469d431d3611a321c566814d5ddb92d75950c0631bc2" - revision 1 - head "https://abcl.org/svn/trunk/abcl/", :using => :svn - - bottle do - cellar :any_skip_relocation - sha256 "5eefea90ac903b73abb042dd77d56b38d4183b6ab2bad53506704d6df352b6f7" => :mojave - sha256 "8a5e39a470e5022e17c503218cadf989cdda645a94511954f7af5959107e79a9" => :high_sierra - sha256 "bb56fa9880fc0d627d94f3d0fa63b1979f6acf24c4dd40de3102dd51736f90ea" => :sierra - sha256 "300b8eef97c11953cfe37e28a5cea6ff5e0734c49e08ba8527743156ef9ad04e" => :el_capitan - end - - depends_on "ant" - depends_on :java => "1.8" - depends_on "rlwrap" - - def install - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp - - system "ant" - - libexec.install "dist/abcl.jar", "dist/abcl-contrib.jar" - (bin/"abcl").write <<~EOS - #!/bin/sh - export JAVA_HOME=$(#{cmd}) - rlwrap java -cp #{libexec}/abcl.jar:"$CLASSPATH" org.armedbear.lisp.Main "$@" - EOS - end - - test do - (testpath/"test.lisp").write "(print \"Homebrew\")\n(quit)" - assert_match /"Homebrew"$/, shell_output("#{bin}/abcl --load test.lisp").strip - end -end diff --git a/Formula/abcm2ps.rb b/Formula/abcm2ps.rb deleted file mode 100644 index caf8f39fc806b..0000000000000 --- a/Formula/abcm2ps.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Abcm2ps < Formula - desc "ABC music notation software" - homepage "http://moinejf.free.fr" - url "https://github.com/leesavide/abcm2ps/archive/v8.14.2.tar.gz" - sha256 "496bbd6eb36e6f5ab45c56373d288329853a9c905d49cf35606eb09bc40a356b" - - bottle do - sha256 "320058bf265c30f579e84da0c55fcd7bb1344ce5e7a55d5115acf98cca3a6273" => :mojave - sha256 "0a50d0b42377150386ae72402d6916f66d361f66fbed186b9c914abcff0a1c5a" => :high_sierra - sha256 "440e63459d4348940210433dc760c8434b3d3d884dfb9e2c785d7ad3c8637f5b" => :sierra - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"voices.abc").write <<~EOS - X:7 - T:Qui Tolis (Trio) - C:Andre Raison - M:3/4 - L:1/4 - Q:1/4=92 - %%staves {(Pos1 Pos2) Trompette} - K:F - % - V:Pos1 - %%MIDI program 78 - "Positif"x3 |x3|c'>ba|Pga/g/f|:g2a |ba2 |g2c- |c2P=B |c>de |fga | - V:Pos2 - %%MIDI program 78 - Mf>ed|cd/c/B|PA2d |ef/e/d |:e2f |ef2 |c>BA |GA/G/F |E>FG |ABc- | - V:Trompette - %%MIDI program 56 - "Trompette"z3|z3 |z3 |z3 |:Mc>BA|PGA/G/F|PE>EF|PEF/E/D|C>CPB,|A,G,F,-| - EOS - - system "#{bin}/abcm2ps", testpath/"voices" - assert_predicate testpath/"Out.ps", :exist? - end -end diff --git a/Formula/abcmidi.rb b/Formula/abcmidi.rb deleted file mode 100644 index f50dfbce9c942..0000000000000 --- a/Formula/abcmidi.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Abcmidi < Formula - desc "Converts abc music notation files to MIDI files" - homepage "https://www.ifdo.ca/~seymour/runabc/top.html" - url "https://www.ifdo.ca/~seymour/runabc/abcMIDI-2018.06.23.zip" - sha256 "3018b467c17dabee92d728c2a344100928efc8791922f3d889099722db68c1f0" - - bottle do - cellar :any_skip_relocation - sha256 "ccc56b114ce9db4371c000dff8eb5c0db13d7de0f9a3518a4416c34dd5f17c8a" => :mojave - sha256 "b3559c7dff532dafb8072a9edaea4ea84f6e9fec7f33e4ffdd61a400cb47ada9" => :high_sierra - sha256 "1af2dda55544c81d912410262bf2d6795da221fa1877df125cd8f7cca33ce971" => :sierra - sha256 "bd75e233967a9c45173f539768596ece1ba1ed6e3976a52da61dd4ecd733c3d5" => :el_capitan - end - - def install - # configure creates a "Makefile" file. A "makefile" file already exist in - # the tarball. On case-sensitive file-systems, the "makefile" file won't - # be overridden and will be chosen over the "Makefile" file. - rm "makefile" - - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"balk.abc").write <<~EOS - X: 1 - T: Abdala - F: https://www.youtube.com/watch?v=YMf8yXaQDiQ - L: 1/8 - M: 2/4 - K:Cm - Q:1/4=180 - %%MIDI bassprog 32 % 32 Acoustic Bass - %%MIDI program 23 % 23 Tango Accordian - %%MIDI bassvol 69 - %%MIDI gchord fzfz - |:"G"FDEC|D2C=B,|C2=B,2 |C2D2 |\ - FDEC |D2C=B,|C2=B,2 |A,2G,2 :| - |:=B,CDE |D2C=B,|C2=B,2 |C2D2 |\ - =B,CDE |D2C=B,|C2=B,2 |A,2G,2 :| - |:C2=B,2 |A,2G,2| C2=B,2|A,2G,2 :| - EOS - - system "#{bin}/abc2midi", (testpath/"balk.abc") - end -end diff --git a/Formula/abduco.rb b/Formula/abduco.rb deleted file mode 100644 index 257294d00b95b..0000000000000 --- a/Formula/abduco.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Abduco < Formula - desc "Provides session management: i.e. separate programs from terminals" - homepage "http://www.brain-dump.org/projects/abduco" - url "http://www.brain-dump.org/projects/abduco/abduco-0.6.tar.gz" - sha256 "c90909e13fa95770b5afc3b59f311b3d3d2fdfae23f9569fa4f96a3e192a35f4" - head "https://github.com/martanne/abduco.git" - - bottle do - cellar :any_skip_relocation - sha256 "b3c5d87a9da3f70e3fd16fdf7a3d2327b41c96ab74d62e2a6efa2e3733ec78f3" => :mojave - sha256 "8ca092b6fd5a6ad39e3c91186421bca2943af6bfdbae4ea95254b36d1e109a78" => :high_sierra - sha256 "9367a86666aad4d14cecf2d7c20f897d3eb92d5cd913af43081d80b9452e19fd" => :sierra - sha256 "62b4673f4fba1d3c5b201b972e220a2736ec053e0c83b1369bb4e5641a71f8e4" => :el_capitan - sha256 "17338a1f1f2cace2bfb40c79d746ad60c6604555e8fb34476ec4ef9a2f68234e" => :yosemite - sha256 "1f48e0d684ba7b41768b5aa770df9c8ee716a3132d3c8043b4f7ff970c925ac5" => :mavericks - end - - def install - ENV.append_to_cflags "-D_DARWIN_C_SOURCE" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - result = shell_output("#{bin}/abduco -v") - result.force_encoding("UTF-8") if result.respond_to?(:force_encoding) - assert_match /^abduco-#{version}/, result - end -end diff --git a/Formula/abnfgen.rb b/Formula/abnfgen.rb deleted file mode 100644 index 092569b44e9d3..0000000000000 --- a/Formula/abnfgen.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Abnfgen < Formula - desc "Quickly generate random documents that match an ABFN grammar" - homepage "http://www.quut.com/abnfgen/" - url "http://www.quut.com/abnfgen/abnfgen-0.20.tar.gz" - sha256 "73ce23ab8f95d649ab9402632af977e11666c825b3020eb8c7d03fa4ca3e7514" - - bottle do - cellar :any_skip_relocation - sha256 "b553651b5500f66d10a369f4d8862ed9c6d2b39d395c43e372b346b4c7bfead0" => :mojave - sha256 "3a62e72bec09b9bfff637710db366f713abc95de45437aeadbfa87a87dfc040c" => :high_sierra - sha256 "0d69f39473838a8e46fb02009329e05be6eeaed579ff5533a09cbbecd8d46a2d" => :sierra - sha256 "fd51cb760ed8afb8a9e3dd5d05c8efa832361b238ad95410fb2864c91c081825" => :el_capitan - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"grammar").write 'ring = 1*12("ding" SP) "dong" CRLF' - system "#{bin}/abnfgen", (testpath/"grammar") - end -end diff --git a/Formula/abook.rb b/Formula/abook.rb deleted file mode 100644 index 42c2140742a26..0000000000000 --- a/Formula/abook.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Abook < Formula - desc "Address book with mutt support" - homepage "https://abook.sourceforge.io/" - url "https://downloads.sourceforge.net/project/abook/abook/0.5.6/abook-0.5.6.tar.gz" - sha256 "0646f6311a94ad3341812a4de12a5a940a7a44d5cb6e9da5b0930aae9f44756e" - revision 1 - head "https://git.code.sf.net/p/abook/git.git" - - bottle do - sha256 "aa37eab8b488f96dd3d54236309ed7841aaeede27a179b4de7415fb8711dc904" => :mojave - sha256 "3eb9e2e7003ef3501c63d87a5a632791769c84ac4d81a2c5fe1d40c04986e19f" => :high_sierra - sha256 "e32cff277928e0b5cd24f201b1b5f94faf5469f263856b48c78f85b539018c86" => :sierra - sha256 "fc5e09a73519a20dbe90258d6779bfddb1a02b2fc277fd54b4cd8c80c378539d" => :el_capitan - sha256 "2f3a8d37fd17ecdda801f8de53e4048f19d824748e11a34c6f9abca0aae06c3b" => :yosemite - end - - depends_on "readline" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/abook", "--formats" - end -end diff --git a/Formula/abuse.rb b/Formula/abuse.rb deleted file mode 100644 index f8aeff26afefb..0000000000000 --- a/Formula/abuse.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Abuse < Formula - desc "Dark 2D side-scrolling platform game" - homepage "http://abuse.zoy.org/" - url "http://abuse.zoy.org/raw-attachment/wiki/download/abuse-0.8.tar.gz" - sha256 "0104db5fd2695c9518583783f7aaa7e5c0355e27c5a803840a05aef97f9d3488" - head "svn://svn.zoy.org/abuse/abuse/trunk" - - bottle do - cellar :any - sha256 "e2dd02d540aabb2943823051e4bf80ea1fbb80da1725462fb314f53a0c6800b2" => :mojave - sha256 "3fdc2ccd00bf320b994747d982b5cbde4b73c45c094c9a0f89acf13aea3eb847" => :high_sierra - sha256 "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" => :sierra - sha256 "456dfbfb6e7486d0c5a50ac01423efabf5243b08d3235c83477681090a42c652" => :el_capitan - sha256 "3ca083d0d99c00ad26f306c026ef35ee565a24f0171b94457deb64d5e170edf9" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libvorbis" - depends_on "sdl" - depends_on "sdl_mixer" - - def startup_script - <<~EOS - #!/bin/bash - #{libexec}/abuse-bin -datadir "#{pkgshare}" "$@" - EOS - end - - def install - # Hack to work with newer versions of automake - inreplace "bootstrap", "11 10 9 8 7 6 5", '$(seq -s " " 5 99)' - - # Add SDL.m4 to aclocal includes - inreplace "bootstrap", - "aclocal${amvers} ${aclocalflags}", - "aclocal${amvers} ${aclocalflags} -I#{HOMEBREW_PREFIX}/share/aclocal" - - # undefined - inreplace "src/net/fileman.cpp", "ushort", "unsigned short" - inreplace "src/sdlport/setup.cpp", "UInt8", "uint8_t" - - # Fix autotools obsoletion notice - inreplace "configure.ac", "AM_CONFIG_HEADER", "AC_CONFIG_HEADERS" - - # Re-enable OpenGL detection - inreplace "configure.ac", - "#error\t/* Error so the compile fails on OSX */", - "#include " - - system "./bootstrap" - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--prefix=#{prefix}", - "--disable-sdltest", - "--with-assetdir=#{pkgshare}", - "--with-sdl-prefix=#{Formula["sdl"].opt_prefix}" - - # Use Framework OpenGL, not libGl - %w[. src src/imlib src/lisp src/net src/sdlport].each do |p| - inreplace "#{p}/Makefile", "-lGL", "-framework OpenGL" - end - - system "make" - - bin.install "src/abuse-tool" - libexec.install "src/abuse" => "abuse-bin" - pkgshare.install Dir["data/*"] - %w[data/Makefile data/Makefile.am data/Makefile.in] - # Use a startup script to find the game data - (bin/"abuse").write startup_script - end - - def caveats - <<~EOS - Game settings and saves will be written to the ~/.abuse folder. - EOS - end - - test do - system "#{bin}/abuse", "--help" - end -end diff --git a/Formula/abyss.rb b/Formula/abyss.rb deleted file mode 100644 index 870872e40bef7..0000000000000 --- a/Formula/abyss.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Abyss < Formula - desc "Genome sequence assembler for short reads" - homepage "http://www.bcgsc.ca/platform/bioinfo/software/abyss" - url "https://github.com/bcgsc/abyss/releases/download/2.1.5/abyss-2.1.5.tar.gz" - sha256 "65bfc8241e6ff5adf7601ae4ae93a75e3db86d6bff5d593c75aaff7f0ef41757" - - bottle do - cellar :any - sha256 "9899d03cf2714ffc25adcac83e4b424c03022b6896c3112f49d01f585b0d3a7c" => :mojave - sha256 "3c358f580990e5edb642524dc83d7cf82cff1788649ef2584dd8e9113d9f7821" => :high_sierra - sha256 "56097dc4da0f6700dface6d4a36b5064b3401f2ba7b874cc61736f4a06047cdf" => :sierra - end - - head do - url "https://github.com/bcgsc/abyss.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "multimarkdown" => :build - end - - depends_on "boost" => :build - depends_on "google-sparsehash" => :build - depends_on "gcc" - depends_on "open-mpi" - - fails_with :clang # no OpenMP support - - resource("testdata") do - url "http://www.bcgsc.ca/platform/bioinfo/software/abyss/releases/1.3.4/test-data.tar.gz" - sha256 "28f8592203daf2d7c3b90887f9344ea54fda39451464a306ef0226224e5f4f0e" - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--enable-maxk=128", - "--prefix=#{prefix}", - "--with-boost=#{Formula["boost"].include}", - "--with-mpi=#{Formula["open-mpi"].prefix}", - "--with-sparsehash=#{Formula["google-sparsehash"].prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules" - system "make", "install" - end - - test do - testpath.install resource("testdata") - system "#{bin}/abyss-pe", "k=25", "name=ts", "in=reads1.fastq reads2.fastq" - system "#{bin}/abyss-fac", "ts-unitigs.fa" - end -end diff --git a/Formula/ace.rb b/Formula/ace.rb deleted file mode 100644 index b46d0edbe35ba..0000000000000 --- a/Formula/ace.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Ace < Formula - desc "ADAPTIVE Communication Environment: OO network programming in C++" - homepage "https://www.dre.vanderbilt.edu/~schmidt/ACE.html" - url "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_3/ACE-6.5.3.tar.bz2" - sha256 "b1d6a716394bd15c21bb90037b8a12a4d8034cc9d8878b0ad39b3c467df19b1a" - - bottle do - cellar :any - sha256 "14eda7ed6a531986ee224f9a1ae4c5bf068b7ba958d8a82aa95830f03e4c51c8" => :mojave - sha256 "99c5f0512bd685b9544b8adaf7386a2fc57a74aa22082f9e7e68ad477ed7c953" => :high_sierra - sha256 "4919d255d1473ac444aa59877603a1adf234549c217c40b74aa06233e3eb6f74" => :sierra - end - - def install - ln_sf "config-macosx.h", "ace/config.h" - ln_sf "platform_macosx.GNU", "include/makeinclude/platform_macros.GNU" - - # Set up the environment the way ACE expects during build. - ENV["ACE_ROOT"] = buildpath - ENV["DYLD_LIBRARY_PATH"] = "#{buildpath}/lib" - - # Done! We go ahead and build. - system "make", "-C", "ace", "-f", "GNUmakefile.ACE", - "INSTALL_PREFIX=#{prefix}", - "LDFLAGS=", - "DESTDIR=", - "INST_DIR=/ace", - "debug=0", - "shared_libs=1", - "static_libs=0", - "install" - - system "make", "-C", "examples" - pkgshare.install "examples" - end - - test do - cp_r "#{pkgshare}/examples/Log_Msg/.", testpath - system "./test_callback" - end -end diff --git a/Formula/aces_container.rb b/Formula/aces_container.rb deleted file mode 100644 index c0aa30382c326..0000000000000 --- a/Formula/aces_container.rb +++ /dev/null @@ -1,37 +0,0 @@ -class AcesContainer < Formula - desc "Reference implementation of SMPTE ST2065-4" - homepage "https://github.com/ampas/aces_container" - url "https://github.com/ampas/aces_container/archive/v1.0.2.tar.gz" - sha256 "cbbba395d2425251263e4ae05c4829319a3e399a0aee70df2eb9efb6a8afdbae" - - bottle do - cellar :any - sha256 "5f2c4a76a3a1082e3d969143455c8a47b8d05d7251424b7e8d821b4e73f46a9e" => :mojave - sha256 "4297afa069f1cd305e93038ed43260b3643f0bd27f39e33355061fc111fb7f6f" => :high_sierra - sha256 "6b276491297d4052538bd2fd22d5129389f27d90a98f831987236a5b90511b98" => :sierra - sha256 "16cf230afdfcb6306c208d169549cf8773c831c8653d2c852315a048960d7e72" => :el_capitan - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "aces/aces_Writer.h" - - int main() - { - aces_Writer x; - return 0; - } - EOS - system ENV.cxx, "-L#{lib}", "-lacescontainer", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/ack.rb b/Formula/ack.rb deleted file mode 100644 index a5be8a7f2e1c2..0000000000000 --- a/Formula/ack.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Ack < Formula - desc "Search tool like grep, but optimized for programmers" - homepage "https://beyondgrep.com/" - url "https://beyondgrep.com/ack-2.24-single-file" - sha256 "8361e5a2654bc575db27bfa40470c4182d74d51098d390944d98fe7cd5b20d49" - - head do - url "https://github.com/petdance/ack2.git", :branch => "dev" - - resource "File::Next" do - url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/File-Next-1.16.tar.gz" - sha256 "6965f25c2c132d0ba7a6f72b57b8bc6d25cf8c1b7032caa3a9bda8612e41d759" - end - end - - bottle :unneeded - - def install - if build.head? - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV.prepend_path "PERL5LIB", libexec/"lib" - - resource("File::Next").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - - system "perl", "Makefile.PL", "DESTDIR=#{buildpath}" - system "make" - - libexec.install "ack" - chmod 0755, libexec/"ack" - (libexec/"lib").install "blib/lib/App" - (bin/"ack").write_env_script("#{libexec}/ack", :PERL5LIB => ENV["PERL5LIB"]) - man1.install "blib/man1/ack.1" - else - bin.install "ack-#{version.to_s.tr("-", "_")}-single-file" => "ack" - system "pod2man", "#{bin}/ack", "ack.1" - man1.install "ack.1" - end - end - - test do - assert_equal "foo bar\n", pipe_output("#{bin}/ack --noenv --nocolor bar -", - "foo\nfoo bar\nbaz") - end -end diff --git a/Formula/acme.rb b/Formula/acme.rb deleted file mode 100644 index 7d9ab8f458b7f..0000000000000 --- a/Formula/acme.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Acme < Formula - desc "Crossassembler for multiple environments" - homepage "https://sourceforge.net/projects/acme-crossass/" - url "http://svn.code.sf.net/p/acme-crossass/code-0/trunk", :revision => "97" - version "0.96.4" - - bottle do - cellar :any_skip_relocation - sha256 "529a7a699305f67a3443adcbd432a53690d314730401e970502222d2a2d7637b" => :mojave - sha256 "95a02b54ddd935e3681b603617cdb428e3c0998697e83b5bacd231d0d662004f" => :high_sierra - sha256 "3fea7e2943215c6e6ad2fa5be5e022d212b7fa55403a45f3b01a4bf5beba0061" => :sierra - sha256 "c4dca010cb942fb1336b49ce754c2b90d61766cce34838214489bc64207f916c" => :el_capitan - end - - def install - system "make", "-C", "src", "install", "BINDIR=#{bin}" - doc.install Dir["docs/*"] - end - - test do - path = testpath/"a.asm" - path.write <<~EOS - !to "a.out", cbm - * = $c000 - jmp $fce2 - EOS - - system bin/"acme", path - code = File.open(testpath/"a.out", "rb") { |f| f.read.unpack("C*") } - assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code - end -end diff --git a/Formula/acmetool.rb b/Formula/acmetool.rb deleted file mode 100644 index 6f9da4dac8c4e..0000000000000 --- a/Formula/acmetool.rb +++ /dev/null @@ -1,190 +0,0 @@ -require "language/go" - -class Acmetool < Formula - desc "Automatic certificate acquisition tool for ACME (Let's Encrypt)" - homepage "https://github.com/hlandau/acme" - url "https://github.com/hlandau/acme.git", - :tag => "v0.0.67", - :revision => "221ea15246f0bbcf254b350bee272d43a1820285" - - bottle do - sha256 "6f2cf5cfb987a2df2f791c162209039804fd8fd12692da69f52153ec9668e9ca" => :mojave - sha256 "c4ff2b08c70560072307d64272f105bcd66c05983efbf1e278de9e5012047738" => :high_sierra - sha256 "7c77a51f12ec154cd5a82f066d547c70f8970a4c5046adf2ab99c600c930a9d5" => :sierra - sha256 "8f9a190bbda5a5cd209cf7f45bcdfff9c504a7e368458b435c78b1c25c8cb54b" => :el_capitan - end - - depends_on "go" => :build - - go_resource "github.com/alecthomas/template" do - url "https://github.com/alecthomas/template.git", - :revision => "a0175ee3bccc567396460bf5acd36800cb10c49c" - end - - go_resource "github.com/alecthomas/units" do - url "https://github.com/alecthomas/units.git", - :revision => "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a" - end - - go_resource "github.com/coreos/go-systemd" do - url "https://github.com/coreos/go-systemd.git", - :revision => "cc4f39464dc797b91c8025330de585294c2a6950" - end - - go_resource "github.com/hlandau/buildinfo" do - url "https://github.com/hlandau/buildinfo.git", - :revision => "337a29b5499734e584d4630ce535af64c5fe7813" - end - - go_resource "github.com/hlandau/dexlogconfig" do - url "https://github.com/hlandau/dexlogconfig.git", - :revision => "244f29bd260884993b176cd14ef2f7631f6f3c18" - end - - go_resource "github.com/hlandau/goutils" do - url "https://github.com/hlandau/goutils.git", - :revision => "0cdb66aea5b843822af6fdffc21286b8fe8379c4" - end - - go_resource "github.com/hlandau/xlog" do - url "https://github.com/hlandau/xlog.git", - :revision => "197ef798aed28e08ed3e176e678fda81be993a31" - end - - go_resource "github.com/jmhodges/clock" do - url "https://github.com/jmhodges/clock.git", - :revision => "880ee4c335489bc78d01e4d0a254ae880734bc15" - end - - go_resource "github.com/mattn/go-isatty" do - url "https://github.com/mattn/go-isatty.git", - :revision => "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" - end - - go_resource "github.com/mattn/go-runewidth" do - url "https://github.com/mattn/go-runewidth.git", - :revision => "97311d9f7767e3d6f422ea06661bc2c7a19e8a5d" - end - - go_resource "github.com/mitchellh/go-wordwrap" do - url "https://github.com/mitchellh/go-wordwrap.git", - :revision => "ad45545899c7b13c020ea92b2072220eefad42b8" - end - - go_resource "github.com/ogier/pflag" do - url "https://github.com/ogier/pflag.git", - :revision => "45c278ab3607870051a2ea9040bb85fcb8557481" - end - - go_resource "github.com/peterhellberg/link" do - url "https://github.com/peterhellberg/link.git", - :revision => "8768c6d4dc563b4a09f58ecda04997024452c057" - end - - go_resource "github.com/satori/go.uuid" do - url "https://github.com/satori/go.uuid.git", - :revision => "36e9d2ebbde5e3f13ab2e25625fd453271d6522e" - end - - go_resource "github.com/shiena/ansicolor" do - url "https://github.com/shiena/ansicolor.git", - :revision => "a422bbe96644373c5753384a59d678f7d261ff10" - end - - go_resource "golang.org/x/crypto" do - url "https://go.googlesource.com/crypto.git", - :revision => "a6600008915114d9c087fad9f03d75087b1a74df" - end - - go_resource "golang.org/x/net" do - url "https://go.googlesource.com/net.git", - :revision => "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec" - end - - go_resource "golang.org/x/sys" do - url "https://go.googlesource.com/sys.git", - :revision => "2c42eef0765b9837fbdab12011af7830f55f88f0" - end - - go_resource "golang.org/x/text" do - url "https://go.googlesource.com/text.git", - :revision => "e19ae1496984b1c655b8044a65c0300a3c878dd3" - end - - go_resource "gopkg.in/alecthomas/kingpin.v2" do - url "https://gopkg.in/alecthomas/kingpin.v2.git", - :revision => "947dcec5ba9c011838740e680966fd7087a71d0d" - end - - go_resource "gopkg.in/cheggaaa/pb.v1" do - url "https://gopkg.in/cheggaaa/pb.v1.git", - :revision => "43d64de27312b32812ca7e994fa0bb03ccf08fdf" - end - - go_resource "gopkg.in/hlandau/configurable.v1" do - url "https://gopkg.in/hlandau/configurable.v1.git", - :revision => "41496864a1fe3e0fef2973f22372b755d2897402" - end - - go_resource "gopkg.in/hlandau/easyconfig.v1" do - url "https://gopkg.in/hlandau/easyconfig.v1.git", - :revision => "7589cb96edce2f94f8c1e6eb261f8c2b06220fe7" - end - - go_resource "gopkg.in/hlandau/service.v2" do - url "https://gopkg.in/hlandau/service.v2.git", - :revision => "b64b3467ebd16f64faec1640c25e318efc0c0d7b" - end - - go_resource "gopkg.in/hlandau/svcutils.v1" do - url "https://gopkg.in/hlandau/svcutils.v1.git", - :revision => "c25dac49e50cbbcbef8c81b089f56156f4067729" - end - - go_resource "gopkg.in/square/go-jose.v1" do - url "https://gopkg.in/square/go-jose.v1.git", - :revision => "aa2e30fdd1fe9dd3394119af66451ae790d50e0d" - end - - go_resource "gopkg.in/tylerb/graceful.v1" do - url "https://gopkg.in/tylerb/graceful.v1.git", - :revision => "4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb" - end - - go_resource "gopkg.in/yaml.v2" do - url "https://gopkg.in/yaml.v2.git", - :revision => "d670f9405373e636a5a2765eea47fac0c9bc91a4" - end - - def install - ENV["GOPATH"] = buildpath - - (buildpath/"src/github.com/hlandau").mkpath - ln_sf buildpath, buildpath/"src/github.com/hlandau/acme" - Language::Go.stage_deps resources, buildpath/"src" - - cd "cmd/acmetool" do - # https://github.com/hlandau/acme/blob/master/_doc/PACKAGING-PATHS.md - ldflags = %W[ - -X github.com/hlandau/acme/storage.RecommendedPath=#{var}/lib/acmetool - -X github.com/hlandau/acme/hooks.DefaultPath=#{lib}/hooks - -X github.com/hlandau/acme/responder.StandardWebrootPath=#{var}/run/acmetool/acme-challenge - #{Utils.popen_read("#{buildpath}/src/github.com/hlandau/buildinfo/gen")} - ] - system "go", "build", "-o", bin/"acmetool", "-ldflags", ldflags.join(" ") - end - - (man8/"acmetool.8").write Utils.popen_read(bin/"acmetool", "--help-man") - - doc.install Dir["_doc/*"] - end - - def post_install - (var/"lib/acmetool").mkpath - (var/"run/acmetool").mkpath - end - - test do - assert_match version.to_s, shell_output("#{bin}/acmetool --version", 2) - end -end diff --git a/Formula/acpica.rb b/Formula/acpica.rb deleted file mode 100644 index 5e889e2455284..0000000000000 --- a/Formula/acpica.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Acpica < Formula - desc "OS-independent implementation of the ACPI specification" - homepage "https://www.acpica.org/" - url "https://acpica.org/sites/acpica/files/acpica-unix-20180810.tar.gz" - sha256 "2643911d0e74c52e4122b914dbbbfa8e2559e4414342bc45f268d2fae32c1ef3" - head "https://github.com/acpica/acpica.git" - - bottle do - cellar :any_skip_relocation - sha256 "ca895ad2ed43004463000c0dd86f2ed94773565cf16bf5026f4f2e01e95d304c" => :mojave - sha256 "ead5eaa7c0fda1e28aba6dde8932f6cd87e6ed41cc24ca7cae3a988be8472ed2" => :high_sierra - sha256 "b8fc8e51abb8bee1a22fc0cfbcefbd16c717f8248e17b5228dcc4eede15da4ab" => :sierra - sha256 "e1e59d509d939e868ec40fb0a572f6c8c5facf52f2a1e4a6e44e987f3b1e82b0" => :el_capitan - end - - def install - ENV.deparallelize - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/acpihelp", "-u" - end -end diff --git a/Formula/activemq-cpp.rb b/Formula/activemq-cpp.rb deleted file mode 100644 index b8993ba8d2842..0000000000000 --- a/Formula/activemq-cpp.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ActivemqCpp < Formula - desc "C++ API for message brokers such as Apache ActiveMQ" - homepage "https://activemq.apache.org/cms/index.html" - url "https://www.apache.org/dyn/closer.cgi?path=activemq/activemq-cpp/3.9.4/activemq-cpp-library-3.9.4-src.tar.bz2" - sha256 "6505137fd4835a388b5ddecf6a96a62abd01b6d80f124e95dc2076127f4a84d3" - - bottle do - cellar :any - sha256 "61713f3bfd9d2666573a29b7996be2e649bcc713088b08acf5f8ef8f3309d72e" => :mojave - sha256 "2a78638d0af4698578ef71cf738571ad6cacaef9b8ed2324148eb1df19816885" => :high_sierra - sha256 "eda1e1feb50e5ffdceb93e3161eab96b389aaa65d64961c6803406176c89f198" => :sierra - sha256 "799696b515fbff76de2277327d074dc96b74e676df72aa347b23eee12ffbc03b" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "apr" - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/activemqcpp-config", "--version" - end -end diff --git a/Formula/activemq.rb b/Formula/activemq.rb deleted file mode 100644 index d19d84d7c0601..0000000000000 --- a/Formula/activemq.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Activemq < Formula - desc "Apache ActiveMQ: powerful open source messaging server" - homepage "https://activemq.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=/activemq/5.15.8/apache-activemq-5.15.8-bin.tar.gz" - sha256 "186c9c4b0d351ffa5e5370536e5fe6650ae53f696dfd69d4f10a807e006f7779" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - rm_rf Dir["bin/linux-x86-*"] - libexec.install Dir["*"] - (bin/"activemq").write_env_script libexec/"bin/activemq", Language::Java.java_home_env("1.6+") - end - - plist_options :manual => "activemq start" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - AbandonProcessGroup - - WorkingDirectory - #{opt_libexec} - ProgramArguments - - #{opt_bin}/activemq - start - - - - EOS - end - - test do - system "#{bin}/activemq", "browse", "-h" - end -end diff --git a/Formula/admesh.rb b/Formula/admesh.rb deleted file mode 100644 index b7ab368d98770..0000000000000 --- a/Formula/admesh.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Admesh < Formula - desc "Processes triangulated solid meshes" - homepage "https://github.com/admesh/admesh" - url "https://github.com/admesh/admesh/releases/download/v0.98.3/admesh-0.98.3.tar.gz" - sha256 "b349c835383b6648fd159e528a530fdcb31aed95024d7a294280ac8096ec7624" - - bottle do - cellar :any - sha256 "7a02108366a0172922d15c13e21c365eb79db7bdca68abfcc1cb5110675b582e" => :mojave - sha256 "bc978ecef1c37b4c2155c5327bc47908024fb4568f222bb5dd4b90af7e12a09b" => :high_sierra - sha256 "3de4fbc48e0d5ca620bb5fa9cb20d18065fa00fa0c007109473bd495e17686d1" => :sierra - sha256 "a2de7016b2356c0e2e860c80999bd27edd9967fb85069ed33c60b9dcd35f725b" => :el_capitan - sha256 "3f3db422de01a8e239d7ef6027d0264d3857feac781ef739072b6ec0d50894a0" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Test file is the beginning of block.stl from admesh's source - (testpath/"test.stl").write <<~EOS - SOLID Untitled1 - FACET NORMAL 0.00000000E+00 0.00000000E+00 1.00000000E+00 - OUTER LOOP - VERTEX -1.96850394E+00 1.96850394E+00 1.96850394E+00 - VERTEX -1.96850394E+00 -1.96850394E+00 1.96850394E+00 - VERTEX 1.96850394E+00 -1.96850394E+00 1.96850394E+00 - ENDLOOP - ENDFACET - ENDSOLID Untitled1 - EOS - system "#{bin}/admesh", "test.stl" - end -end diff --git a/Formula/adns.rb b/Formula/adns.rb deleted file mode 100644 index 3aa5b7baa221f..0000000000000 --- a/Formula/adns.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Adns < Formula - desc "C/C++ resolver library and DNS resolver utilities" - homepage "https://www.chiark.greenend.org.uk/~ian/adns/" - url "https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-1.5.1.tar.gz" - sha256 "5b1026f18b8274be869245ed63427bf8ddac0739c67be12c4a769ac948824eeb" - head "git://git.chiark.greenend.org.uk/~ianmdlvl/adns.git" - - bottle do - cellar :any_skip_relocation - sha256 "1a067d7acebfc1733c3b035ca51c7bbf73fa5af96072447933c77025b66af897" => :mojave - sha256 "5abc21fa69037e1a161c90a594077c6fc8b74aed19f371337aa4a4946e9cc08f" => :high_sierra - sha256 "3bbd0cc0bc05c228746629760bcd027bbe90aa54e3b79fc2d4553e7fd5900d44" => :sierra - sha256 "90fd1e0e102f446de1e647f2c3ec9f0dd6c5df190dcbdd9f1136bb90e344d730" => :el_capitan - sha256 "9c5974b93f921e8d6c735ca6722d83d94d5a501d301d337177741f4a2a8f9128" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dynamic" - system "make" - system "make", "install" - end - - test do - system "#{bin}/adnsheloex", "--version" - end -end diff --git a/Formula/adplug.rb b/Formula/adplug.rb deleted file mode 100644 index 0d8981262eb35..0000000000000 --- a/Formula/adplug.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Adplug < Formula - desc "Free, hardware independent AdLib sound player library" - homepage "https://adplug.github.io" - url "https://github.com/adplug/adplug/releases/download/adplug-2.3.1/adplug-2.3.1.tar.bz2" - sha256 "5ba628cfa24a37b89ac6f70c6ec8fa8157405428f508828fdf5d372ff99483d9" - - bottle do - cellar :any - sha256 "bf68be72cffe219d9450afa96b4445c1db273c7ce4ea664d023341cc2d9b6fb7" => :mojave - sha256 "8b5a35c8e06097a6d12d172e1c2682542e4dd3eb6264933b8c0fa29b99d80e9e" => :high_sierra - sha256 "66f5ef8ac8ff8a1e6909098259cc501057eab601e416df3f23ca5cf975b09ac6" => :sierra - sha256 "a5af729b9f94e3b3665ce445880fd55186668c84dbd6e8e05ba945f40c514a99" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libbinio" - - resource "ksms" do - url "http://advsys.net/ken/ksmsongs.zip" - sha256 "2af9bfc390f545bc7f51b834e46eb0b989833b11058e812200d485a5591c5877" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - resource("ksms").stage do - mkdir "#{testpath}/.adplug" - system "#{bin}/adplugdb", "-v", "add", "JAZZSONG.KSM" - end - end -end diff --git a/Formula/adr-tools.rb b/Formula/adr-tools.rb deleted file mode 100644 index 49f2f042fc6cd..0000000000000 --- a/Formula/adr-tools.rb +++ /dev/null @@ -1,30 +0,0 @@ -class AdrTools < Formula - desc "CLI tool for working with Architecture Decision Records" - homepage "https://github.com/npryce/adr-tools" - url "https://github.com/npryce/adr-tools/archive/3.0.0.tar.gz" - sha256 "9490f31a457c253c4113313ed6352efcbf8f924970a309a08488833b9c325d7c" - - bottle :unneeded - - def install - config = buildpath/"src/adr-config" - - # Unlink and re-write to matches homebrew's installation conventions - config.unlink - config.write <<~EOS - #!/bin/bash - echo 'adr_bin_dir=\"#{bin}\"' - echo 'adr_template_dir=\"#{prefix}\"' - EOS - - prefix.install Dir["src/*.md"] - bin.install Dir["src/*"] - bash_completion.install "autocomplete/adr" => "adr-tools" - end - - test do - file = "0001-record-architecture-decisions.md" - assert_match file, shell_output("#{bin}/adr-init") - assert_match file, shell_output("#{bin}/adr-list") - end -end diff --git a/Formula/advancecomp.rb b/Formula/advancecomp.rb deleted file mode 100644 index b90d518b98ebc..0000000000000 --- a/Formula/advancecomp.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Advancecomp < Formula - desc "Recompression utilities for .PNG, .MNG, .ZIP, and .GZ files" - homepage "https://www.advancemame.it/comp-readme.html" - url "https://github.com/amadvance/advancecomp/releases/download/v2.1/advancecomp-2.1.tar.gz" - sha256 "3ac0875e86a8517011976f04107186d5c60d434954078bc502ee731480933eb8" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "798de4490c97283280259ffc1dc39159bd0ded85edb47f3212ad5ec9a174289e" => :mojave - sha256 "fdb2a72157445c33a462388f05580489c427f4f0d2a3d4cdc1b7867ef69e7e53" => :high_sierra - sha256 "4ef3590e26c5ac96d64dc985b035ec7055f215c84d31dfb09542d958f6ec4e77" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--enable-bzip2", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system bin/"advdef", "--version" - - cp test_fixtures("test.png"), "test.png" - system bin/"advpng", "--recompress", "--shrink-fast", "test.png" - - version_string = shell_output("#{bin}/advpng --version") - assert_includes version_string, "advancecomp v#{version}" - end -end diff --git a/Formula/advancemame.rb b/Formula/advancemame.rb deleted file mode 100644 index 1dc41bc52822f..0000000000000 --- a/Formula/advancemame.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Advancemame < Formula - desc "MAME with advanced video support" - homepage "https://www.advancemame.it/" - url "https://github.com/amadvance/advancemame/releases/download/v3.9/advancemame-3.9.tar.gz" - sha256 "3e4628e1577e70a1dbe104f17b1b746745b8eda80837f53fbf7b091c88be8c2b" - - bottle do - sha256 "95f2cdff91ff98c3c9f65a0751d7948cefb3829d96e1977b5b8869163eba0790" => :mojave - sha256 "9c5e0a9f81f43ec02eb951b82b4930639dafcdbacbeadf7bcc5e74f2e2ec7c45" => :high_sierra - sha256 "6ba2c02db07a9ef7ddf561dbc2cde3904abe0b1b0ab9c9469020fdeced72e011" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "sdl" - - conflicts_with "advancemenu", :because => "both install `advmenu` binaries" - - def install - ENV.delete "SDKROOT" if MacOS.version == :yosemite - system "./configure", "--prefix=#{prefix}" - system "make", "install", "LDFLAGS=#{ENV.ldflags}", "mandir=#{man}", "docdir=#{doc}" - end - - test do - system "#{bin}/advmame", "--version" - end -end diff --git a/Formula/advancemenu.rb b/Formula/advancemenu.rb deleted file mode 100644 index c12b3a3857a81..0000000000000 --- a/Formula/advancemenu.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Advancemenu < Formula - desc "Frontend for AdvanceMAME/MESS" - homepage "https://www.advancemame.it/menu-readme.html" - url "https://github.com/amadvance/advancemame/releases/download/advancemenu-2.9/advancemenu-2.9.tar.gz" - sha256 "c7599da6ff715eb3ad9f7a55973a9aaac2f26740a4e12daf744cf08963d652c1" - - bottle do - sha256 "b61eed32b7dbf12a05a73e825df47adab2ee86da445808c0e9b4db5597d2ad23" => :mojave - sha256 "8c96b4bef369fe6b52d58c9c6d8025a64450fad965af6209c99c7b1edcec58eb" => :high_sierra - sha256 "875396a5eb77a17ee1cda679fc782d5fa15072a206331d15cb186e52bf4d5369" => :sierra - sha256 "5e4a2e320562c0d92c3d61049f097d0a7ee054b76bacc8dbf81095c2758bed6a" => :el_capitan - sha256 "543c8592f5f72c1407fac7e29a9bc298b2d5b15529d669b54338d60209409028" => :yosemite - end - - depends_on "sdl" - - conflicts_with "advancemame", :because => "both install `advmenu` binaries" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install", "LDFLAGS=#{ENV.ldflags}", "mandir=#{man}" - end - - test do - system bin/"advmenu", "--version" - end -end diff --git a/Formula/advancescan.rb b/Formula/advancescan.rb deleted file mode 100644 index dd2c70a1e54b2..0000000000000 --- a/Formula/advancescan.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Advancescan < Formula - desc "Rom manager for AdvanceMAME/MESS" - homepage "https://www.advancemame.it/scan-readme.html" - url "https://github.com/amadvance/advancescan/releases/download/v1.18/advancescan-1.18.tar.gz" - sha256 "8c346c6578a1486ca01774f30c3e678058b9b8b02f265119776d523358d24672" - - bottle do - cellar :any_skip_relocation - sha256 "3aa20db4c47b16166b385d3e7e0c7af903833333757af7b1e0909dec00824ce2" => :mojave - sha256 "d0a8416434aa03573dcbadebd135fbcfa6f4829934622ab8afe68aa496ec5e48" => :high_sierra - sha256 "0bc4290c65271b84aec455adbaf85795857b19102e6efb152a64623420ae5757" => :sierra - sha256 "e4295866cda2370aa37cb1144ff1269ada4df6b76145a25efaf072d7a6b09b5c" => :el_capitan - sha256 "f91cbe31c7c8072fffffcd0cc8766e20df6f728abc73f66140f97c0a49d6f6c8" => :yosemite - end - - def install - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/advdiff", "-V" - system "#{bin}/advscan", "-V" - end -end diff --git a/Formula/adwaita-icon-theme.rb b/Formula/adwaita-icon-theme.rb deleted file mode 100644 index 29326546e014b..0000000000000 --- a/Formula/adwaita-icon-theme.rb +++ /dev/null @@ -1,36 +0,0 @@ -class AdwaitaIconTheme < Formula - desc "Icons for the GNOME project" - homepage "https://developer.gnome.org" - url "https://download.gnome.org/sources/adwaita-icon-theme/3.30/adwaita-icon-theme-3.30.1.tar.xz" - sha256 "6d752a2b1bc668483956d4485c39cad1642d9358e133ff689526e43674a4e1ce" - - bottle do - cellar :any_skip_relocation - sha256 "50a30cbc9017985d9ca2ff7285a0da47563dd3be313ee6fd406c172305bf0d7c" => :mojave - sha256 "11a39582ae7f7e34f0d9d3557e01553d967546b6cbb6c9913799352437c0dbbe" => :high_sierra - sha256 "11a39582ae7f7e34f0d9d3557e01553d967546b6cbb6c9913799352437c0dbbe" => :sierra - end - - depends_on "gettext" => :build - depends_on "gtk+3" => :build # for gtk3-update-icon-cache - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "librsvg" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "GTK_UPDATE_ICON_CACHE=#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache" - system "make", "install" - end - - test do - # This checks that a -symbolic png file generated from svg exists - # and that a file created late in the install process exists. - # Someone who understands GTK+3 could probably write better tests that - # check if GTK+3 can find the icons. - png = "weather-storm-symbolic.symbolic.png" - assert_predicate share/"icons/Adwaita/96x96/status/#{png}", :exist? - assert_predicate share/"icons/Adwaita/index.theme", :exist? - end -end diff --git a/Formula/aescrypt-packetizer.rb b/Formula/aescrypt-packetizer.rb deleted file mode 100644 index c2694a66b37a4..0000000000000 --- a/Formula/aescrypt-packetizer.rb +++ /dev/null @@ -1,66 +0,0 @@ -class AescryptPacketizer < Formula - desc "Encrypt and decrypt using 256-bit AES encryption" - homepage "https://www.aescrypt.com" - url "https://www.aescrypt.com/download/v3/linux/aescrypt-3.13.tgz" - sha256 "87cd6f6e15828a93637aa44f6ee4f01bea372ccd02ecf1702903f655fbd139a8" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0065041f51f313cc89745778c7063171ab021ac844c238a1186c5b4e35d88323" => :mojave - sha256 "0bc56edb35949f38807c5e64895875f9177c732c1b97d65146fe0ccd18fba434" => :high_sierra - sha256 "271379b01ad1868a2b9270e987911694391824beea2f53a54d95eb989027fb58" => :sierra - end - - head do - url "https://github.com/paulej/AESCrypt.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on :xcode => :build - - def install - if build.head? - cd "linux" - system "autoreconf", "-ivf" - system "./configure", "prefix=#{prefix}", "--enable-iconv", - "--disable-gui" - system "make", "install" - else - cd "src" do - # https://www.aescrypt.com/mac_aes_crypt.html - inreplace "Makefile", "#LIBS=-liconv", "LIBS=-liconv" - system "make" - - bin.install "aescrypt" - bin.install "aescrypt_keygen" - end - man1.install "man/aescrypt.1" - end - - # To prevent conflict with our other aescrypt, rename the binaries. - mv "#{bin}/aescrypt", "#{bin}/paescrypt" - mv "#{bin}/aescrypt_keygen", "#{bin}/paescrypt_keygen" - end - - def caveats; <<~EOS - To avoid conflicting with our other AESCrypt package the binaries - have been renamed paescrypt and paescrypt_keygen. - EOS - end - - test do - path = testpath/"secret.txt" - original_contents = "What grows when it eats, but dies when it drinks?" - path.write original_contents - - system bin/"paescrypt", "-e", "-p", "fire", path - assert_predicate testpath/"#{path}.aes", :exist? - - system bin/"paescrypt", "-d", "-p", "fire", "#{path}.aes" - assert_equal original_contents, path.read - end -end diff --git a/Formula/aescrypt.rb b/Formula/aescrypt.rb deleted file mode 100644 index 797981245f219..0000000000000 --- a/Formula/aescrypt.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Aescrypt < Formula - desc "Program for encryption/decryption" - homepage "https://aescrypt.sourceforge.io/" - url "https://aescrypt.sourceforge.io/aescrypt-0.7.tar.gz" - sha256 "7b17656cbbd76700d313a1c36824a197dfb776cadcbf3a748da5ee3d0791b92d" - - bottle do - cellar :any_skip_relocation - sha256 "55bc9c5be0263f1659ab389b22e1e5f594b037a87d49aa5ed94ab5ccce3af3da" => :mojave - sha256 "1b2326e6dbc73d394cb5d4d7bf655b026fa77a7d66d02da386bff16b84e84d83" => :high_sierra - sha256 "2250bd07f689721287269dc70c504b4f08ac2a02b5550ad9f0a51dca60ed6f9a" => :sierra - sha256 "0cd940c7c9e59104746a8f83f92a06e703e7f98195a202d20516c03b588fd63f" => :el_capitan - sha256 "660c8a9266d7f85e699fb5bfabb82c508a66d303b2a2057c9c70a3c70fed43f6" => :yosemite - sha256 "a0bf8895165037991bf5b33be5c995e9b68a1d05898003a0ef45adb7aa3d3da9" => :mavericks - end - - def install - system "./configure" - system "make" - bin.install "aescrypt", "aesget" - end - - test do - (testpath/"key").write "kk=12345678901234567890123456789abc0" - original_text = "hello" - cipher_text = pipe_output("#{bin}/aescrypt -k #{testpath}/key -s 128", original_text) - deciphered_text = pipe_output("#{bin}/aesget -k #{testpath}/key -s 128", cipher_text) - assert_not_equal original_text, cipher_text - assert_equal original_text, deciphered_text - end -end diff --git a/Formula/aespipe.rb b/Formula/aespipe.rb deleted file mode 100644 index 48741e58d5da7..0000000000000 --- a/Formula/aespipe.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Aespipe < Formula - desc "AES encryption or decryption for pipes" - homepage "https://loop-aes.sourceforge.io/" - url "https://loop-aes.sourceforge.io/aespipe/aespipe-v2.4e.tar.bz2" - sha256 "bad5abb8678c2a6062d22b893171623e0c8e6163b5c1e6e5086e2140e606b93a" - - bottle do - cellar :any_skip_relocation - sha256 "abd6ee4463960a4283fa5fd97b45f7ca49400bdee3182d1248ced9ef45626189" => :mojave - sha256 "0031c9dbcf93fb4faa3b4176491cb0917426f0b5c146e0dff9a1f51a0d2cc9c9" => :high_sierra - sha256 "7569237a2bd31170d52f161afdb3b46cc23acdc4a35c2662d0b79aac831ac2b8" => :sierra - sha256 "5a70398747999348647c7577da0c4fb2274413f53ee65fd6fce3845cbc27e0d9" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"secret").write "thisismysecrethomebrewdonttellitplease" - msg = "Hello this is Homebrew" - encrypted = pipe_output("#{bin}/aespipe -P secret", msg) - decrypted = pipe_output("#{bin}/aespipe -P secret -d", encrypted) - assert_equal msg, decrypted.gsub(/\x0+$/, "") - end -end diff --git a/Formula/afflib.rb b/Formula/afflib.rb deleted file mode 100644 index a00cda0f4608b..0000000000000 --- a/Formula/afflib.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Afflib < Formula - desc "Advanced Forensic Format" - homepage "https://github.com/sshock/AFFLIBv3" - url "https://github.com/sshock/AFFLIBv3/archive/v3.7.17.tar.gz" - sha256 "3c5a718731c90a75a1134796ab9de9a0156f6b3a8d1dec4f532e161b94bdaff4" - - bottle do - cellar :any - sha256 "e2f6aabed324721e31798315e0f8f7768f14b3858e6b16f4f921edb57ff40838" => :mojave - sha256 "0ebbe3c416cd433966a37d6724129720a1314e9a0f9b58ef3ff132ece9d8efb3" => :high_sierra - sha256 "ea3328cb0ffa8848a1f21893ee96782bd886cd9821d0e4542968b98c7c209cf7" => :sierra - sha256 "cb6ada311bc269985934cc835adf7dde8e8437f882beda9223ba47613c5364f0" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - # Python 3 error filed upstream: https://github.com/sshock/AFFLIBv3/issues/35 - depends_on "python@2" # does not support Python 3 - depends_on :osxfuse => :optional - - def install - args = ["--enable-s3", "--enable-python"] - - if build.with? "osxfuse" - ENV.append "CPPFLAGS", "-I/usr/local/include/osxfuse" - ENV.append "LDFLAGS", "-L/usr/local/lib" - args << "--enable-fuse" - else - args << "--disable-fuse" - end - - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - *args - system "make", "install" - end - - test do - system "#{bin}/affcat", "-v" - end -end diff --git a/Formula/afio.rb b/Formula/afio.rb deleted file mode 100644 index c9bf71d4977a7..0000000000000 --- a/Formula/afio.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Afio < Formula - desc "Creates cpio-format archives" - homepage "http://members.chello.nl/~k.holtman/afio.html" - url "http://members.chello.nl/~k.holtman/afio-2.5.1.tgz" - sha256 "363457a5d6ee422d9b704ef56d26369ca5ee671d7209cfe799cab6e30bf2b99a" - head "https://github.com/kholtman/afio.git" - - bottle do - cellar :any_skip_relocation - sha256 "365c570b59790368b8ef4f47b375ad8bc64b4017f89ecfb6facca16d8a8ea672" => :mojave - sha256 "ae3eea7cafc324521405f6ebfe697e04f109dd48b66e60054238ffba470e867b" => :high_sierra - sha256 "5863378152ea720ffb5614cceb27eabcd98a2e2734810830f7908af3262ee303" => :sierra - sha256 "4bbebea8c0ea4bc79d0614dcf04a12aa44282198a0af4d9fee40fa0b70abb745" => :el_capitan - sha256 "c729e81f3952e8475ec4fe1ed4dc5a870e550af781b877a610a09686e9fe8a71" => :mavericks - sha256 "74a74e153dda86a7d08ab9cf293c1ac8796f64d1f94f0f31590ee96de88b2c3d" => :mountain_lion - sha256 "7ff316d9e43e5a55b95d381f13f0429a87ff36d39425fb62ec2af2cb00fc22af" => :lion - end - - def install - system "make", "DESTDIR=#{prefix}" - bin.install "afio" - man1.install "afio.1" - - prefix.install "ANNOUNCE-2.5.1" => "ANNOUNCE" - prefix.install %w[INSTALLATION SCRIPTS] - share.install Dir["script*"] - end - - test do - path = testpath/"test" - path.write "homebrew" - pipe_output("#{bin}/afio -o archive", "test\n") - - system "#{bin}/afio", "-r", "archive" - path.unlink - - system "#{bin}/afio", "-t", "archive" - system "#{bin}/afio", "-i", "archive" - assert_equal "homebrew", path.read.chomp - end -end diff --git a/Formula/afl-fuzz.rb b/Formula/afl-fuzz.rb deleted file mode 100644 index 5519f65d0991d..0000000000000 --- a/Formula/afl-fuzz.rb +++ /dev/null @@ -1,32 +0,0 @@ -class AflFuzz < Formula - desc "American fuzzy lop: Security-oriented fuzzer" - homepage "http://lcamtuf.coredump.cx/afl/" - url "http://lcamtuf.coredump.cx/afl/releases/afl-2.52b.tgz" - sha256 "43614b4b91c014d39ef086c5cc84ff5f068010c264c2c05bf199df60898ce045" - - bottle do - sha256 "33a83a8fd62e5a4d4ae6fa098580b3f3926e6517debe77368e7c0290cf73f39f" => :mojave - sha256 "4cd6b08ecfe35a62136b7a52222c59e055b80aef599404e29c7c9b8bf4f8fd50" => :high_sierra - sha256 "b45ff3036dddc75cf64689b3f2660938834f393256315ed33ba72ed1924c695e" => :sierra - sha256 "ef5e7c2e25020bf2d468c81ced4fdd9014dbdc0bb523f5acd8d91d8badc97d59" => :el_capitan - end - - def install - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - cpp_file = testpath/"main.cpp" - cpp_file.write <<~EOS - #include - - int main() { - std::cout << "Hello, world!"; - } - EOS - - system bin/"afl-clang++", "-g", cpp_file, "-o", "test" - assert_equal "Hello, world!", shell_output("./test") - end -end diff --git a/Formula/afsctool.rb b/Formula/afsctool.rb deleted file mode 100644 index 0b5b934c6239e..0000000000000 --- a/Formula/afsctool.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Afsctool < Formula - desc "Utility for manipulating HFS+ compressed files" - homepage "https://brkirch.wordpress.com/afsctool/" - url "https://dl.bintray.com/homebrew/mirror/afsctool-1.6.4.zip" - mirror "https://docs.google.com/uc?export=download&id=0BwQlnXqL939ZQjBQNEhRQUo0aUk" - sha256 "bb6a84370526af6ec1cee2c1a7199134806e691d1093f4aef060df080cd3866d" - revision 2 - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "15c264a828ed98a42cc5ac68869c16b8306f73effe108e50bb1f731574311c51" => :mojave - sha256 "72e92414d524b82ec1d8381ad50f55bd330f1109a5e10bca4235300fee557caf" => :high_sierra - sha256 "96437b04a2974c215979550d3d70b4c8e3f609e76954ca41059c6f246da452ee" => :sierra - end - - # Fixes Sierra "Unable to compress" issue; reported upstream on 24 July 2017 - patch :p2 do - url "https://github.com/vfx01j/afsctool/commit/26293a3809c9ad1db5f9bff9dffaefb8e201a089.diff?full_index=1" - sha256 "a541526679eb5d2471b3f257dab6103300d950f7b2f9d49bbfeb9f27dfc48542" - end - - # Fixes High Sierra "Expecting f_type of 17 or 23. f_type is 24" issue - # Acknowledged by upstream 12 Apr 2018: - # https://github.com/Homebrew/homebrew-core/pull/20898#issuecomment-380727547 - patch :p2, :DATA - - def install - system ENV.cc, ENV.cflags, "-lz", "afsctool.c", - "-framework", "CoreServices", "-o", "afsctool" - bin.install "afsctool" - end - - test do - path = testpath/"foo" - path.write "some text here." - system "#{bin}/afsctool", "-c", path - system "#{bin}/afsctool", "-v", path - end -end - -__END__ -diff --git a/afsctool_34/afsctool.c b/afsctool_34/afsctool.c -index 8713407fa673f216e69dfc36152c39bc1dea4fe7..7038859f43e035be44c9b8cfbb1bb76a93e26e0a 100644 ---- a/afsctool_34/afsctool.c -+++ b/afsctool_34/afsctool.c -@@ -104,8 +104,8 @@ void compressFile(const char *inFile, struct stat *inFileInfo, long long int max - - if (statfs(inFile, &fsInfo) < 0) - return; -- if (fsInfo.f_type != 17 && fsInfo.f_type != 23) { -- printf("Expecting f_type of 17 or 23. f_type is %i.\n", fsInfo.f_type); -+ if (fsInfo.f_type != 17 && fsInfo.f_type != 23 && fsInfo.f_type != 24) { -+ printf("Expecting f_type of 17, 23 or 24. f_type is %i.\n", fsInfo.f_type); - return; - } - if (!S_ISREG(inFileInfo->st_mode)) diff --git a/Formula/aften.rb b/Formula/aften.rb deleted file mode 100644 index 268c5994fae2b..0000000000000 --- a/Formula/aften.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Aften < Formula - desc "Audio encoder which generates ATSC A/52 compressed audio streams" - homepage "https://aften.sourceforge.io/" - url "https://downloads.sourceforge.net/aften/aften-0.0.8.tar.bz2" - sha256 "87cc847233bb92fbd5bed49e2cdd6932bb58504aeaefbfd20ecfbeb9532f0c0a" - - bottle do - cellar :any - sha256 "07e80303cd84483b9e86b880feb3885814644b115f161ad10582c6ce99cf192d" => :mojave - sha256 "b1b8facf243da3872f4ddf2fbefb4879228cb5b390f883794b8b115d06e4c6a6" => :high_sierra - sha256 "535ef47b08163c8d1d7a66ffda7d3f280c0569a74d9feedbcfc93cd3c55194ca" => :sierra - sha256 "68b4983cc843e2d57854a263038a965a2dd6c473c98111f482ec1c69d09ace83" => :el_capitan - sha256 "4f785f04a3bbde677452f2c5d1c04f77605e156b4020294c5799c85d0b8586d3" => :yosemite - sha256 "b7acaf77ece8e6b51493ce69e713990a4ce13bc5b9d5ad6914cc86c0f745c9d0" => :mavericks - end - - depends_on "cmake" => :build - - resource "sample_wav" do - url "https://www.mediacollege.com/audio/tone/files/1kHz_44100Hz_16bit_05sec.wav" - sha256 "949dd8ef74db1793ac6174b8d38b1c8e4c4e10fb3ffe7a15b4941fa0f1fbdc20" - end - - def install - mkdir "default" do - system "cmake", "-DSHARED=ON", "..", *std_cmake_args - system "make", "install" - end - end - - test do - resource("sample_wav").stage testpath - system "#{bin}/aften", "#{testpath}/1kHz_44100Hz_16bit_05sec.wav", "sample.ac3" - end -end diff --git a/Formula/afuse.rb b/Formula/afuse.rb deleted file mode 100644 index 1443c32b15fea..0000000000000 --- a/Formula/afuse.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Afuse < Formula - desc "Automounting file system implemented in userspace with FUSE" - homepage "https://github.com/pcarrier/afuse/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/afuse/afuse-0.4.1.tar.gz" - sha256 "c6e0555a65d42d3782e0734198bbebd22486386e29cb00047bc43c3eb726dca8" - - bottle do - cellar :any - sha256 "d28d229c3bc7317681e538388a3d87df170aa56dc8e5e9ced6bf964e6fafba71" => :mojave - sha256 "5596df8a8351206809f4b047e9d357e36273f5d505e531db3f14d320cf7eec28" => :high_sierra - sha256 "900e55a47834181f518e87e7cbaaf0f3f078b0d40631ffccfc776e82c7c61f87" => :sierra - sha256 "a4c0f86a179ca8c5d1e3977ff167dbcd1abff4ec1ee17fd5700a3fb602c781a3" => :el_capitan - sha256 "2a57c7752c7b461f6b628a1c30e845fe13685eab394d933e8da3aebf7102ae9c" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on :osxfuse - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /OSXFUSE/, pipe_output("#{bin}/afuse --version 2>&1") - end -end diff --git a/Formula/agda.rb b/Formula/agda.rb deleted file mode 100644 index 81d9ced1b550e..0000000000000 --- a/Formula/agda.rb +++ /dev/null @@ -1,160 +0,0 @@ -require "language/haskell" - -class Agda < Formula - include Language::Haskell::Cabal - - desc "Dependently typed functional programming language" - homepage "https://wiki.portal.chalmers.se/agda/" - - stable do - url "https://hackage.haskell.org/package/Agda-2.5.4.2/Agda-2.5.4.2.tar.gz" - sha256 "f645add8a47a35da3f37757204fa9c80aeb0993d628fc2057fa343e92e579b1f" - - resource "stdlib" do - url "https://github.com/agda/agda-stdlib.git", - :tag => "v0.17", - :revision => "5819a4dd9c965296224944f05b1481805649bdc2" - end - end - - bottle do - rebuild 1 - sha256 "eef42265827b82744ad2b9d6238fa4d8984d226251fb54825734f300a40faa98" => :mojave - sha256 "74b627b7b04489c7ea610fada9df16d3a6f3e5926a6ee40f3032f93e67382b44" => :high_sierra - sha256 "b8d0a4cd285ee27406e9dc673d03b6c0bb34604c72919b8059826a7c84b7c547" => :sierra - end - - head do - url "https://github.com/agda/agda.git" - - resource "stdlib" do - url "https://github.com/agda/agda-stdlib.git" - end - end - - depends_on "cabal-install" => [:build, :test] - depends_on "emacs" - depends_on "ghc" - - def install - # install Agda core - install_cabal_package :using => ["alex", "happy", "cpphs"] - - resource("stdlib").stage lib/"agda" - - # generate the standard library's bytecode - cd lib/"agda" do - cabal_sandbox :home => buildpath, :keep_lib => true do - cabal_install "--only-dependencies" - cabal_install - system "GenerateEverything" - end - end - - # generate the standard library's documentation and vim highlighting files - cd lib/"agda" do - system bin/"agda", "-i", ".", "-i", "src", "--html", "--vim", "README.agda" - end - - # compile the included Emacs mode - system bin/"agda-mode", "compile" - elisp.install_symlink Dir["#{share}/*/Agda-#{version}/emacs-mode/*"] - end - - def caveats; <<~EOS - To use the Agda standard library by default: - mkdir -p ~/.agda - echo #{HOMEBREW_PREFIX}/lib/agda/standard-library.agda-lib >>~/.agda/libraries - echo standard-library >>~/.agda/defaults - EOS - end - - test do - simpletest = testpath/"SimpleTest.agda" - simpletest.write <<~EOS - module SimpleTest where - - data ℕ : Set where - zero : ℕ - suc : ℕ → ℕ - - infixl 6 _+_ - _+_ : ℕ → ℕ → ℕ - zero + n = n - suc m + n = suc (m + n) - - infix 4 _≡_ - data _≡_ {A : Set} (x : A) : A → Set where - refl : x ≡ x - - cong : ∀ {A B : Set} (f : A → B) {x y} → x ≡ y → f x ≡ f y - cong f refl = refl - - +-assoc : ∀ m n o → (m + n) + o ≡ m + (n + o) - +-assoc zero _ _ = refl - +-assoc (suc m) n o = cong suc (+-assoc m n o) - EOS - - stdlibtest = testpath/"StdlibTest.agda" - stdlibtest.write <<~EOS - module StdlibTest where - - open import Data.Nat - open import Relation.Binary.PropositionalEquality - - +-assoc : ∀ m n o → (m + n) + o ≡ m + (n + o) - +-assoc zero _ _ = refl - +-assoc (suc m) n o = cong suc (+-assoc m n o) - EOS - - iotest = testpath/"IOTest.agda" - iotest.write <<~EOS - module IOTest where - - open import Agda.Builtin.IO - open import Agda.Builtin.Unit - - postulate - return : ∀ {A : Set} → A → IO A - - {-# COMPILED return (\\_ -> return) #-} - - main : _ - main = return tt - EOS - - stdlibiotest = testpath/"StdlibIOTest.agda" - stdlibiotest.write <<~EOS - module StdlibIOTest where - - open import IO - - main : _ - main = run (putStr "Hello, world!") - EOS - - # typecheck a simple module - system bin/"agda", simpletest - - # typecheck a module that uses the standard library - system bin/"agda", "-i", lib/"agda"/"src", stdlibtest - - # compile a simple module using the JS backend - system bin/"agda", "--js", simpletest - - # test the GHC backend - cabal_sandbox do - cabal_install "text", "ieee754" - dbpath = Dir["#{testpath}/.cabal-sandbox/*-packages.conf.d"].first - dbopt = "--ghc-flag=-package-db=#{dbpath}" - - # compile and run a simple program - system bin/"agda", "-c", dbopt, iotest - assert_equal "", shell_output(testpath/"IOTest") - - # compile and run a program that uses the standard library - system bin/"agda", "-c", "-i", lib/"agda"/"src", dbopt, stdlibiotest - assert_equal "Hello, world!", shell_output(testpath/"StdlibIOTest") - end - end -end diff --git a/Formula/agedu.rb b/Formula/agedu.rb deleted file mode 100644 index 47e2a832bf753..0000000000000 --- a/Formula/agedu.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Agedu < Formula - desc "Unix utility for tracking down wasted disk space" - homepage "https://www.chiark.greenend.org.uk/~sgtatham/agedu/" - url "https://www.chiark.greenend.org.uk/~sgtatham/agedu/agedu-20180522.5b12791.tar.gz" - version "20180522" - sha256 "151f3c9ebf0580d85e30870c473e675762c8537d5ce9df82a5ea3c86b3e5092e" - head "https://git.tartarus.org/simon/agedu.git" - - bottle do - cellar :any_skip_relocation - sha256 "c22495405a89ad5216eb562a0d69da0c33f152c8f35997eb7124f7096ffeb3c6" => :mojave - sha256 "10f3a7572f0ac969a4c445fba43856ff5944cc31d6477bce45c840e4a71abb02" => :high_sierra - sha256 "1b7e10c023c382650cb01de99d5e6b3a8dfcda34059d32f1c0ba2fc39c7d4591" => :sierra - sha256 "f50ddaa6442d7676a3394636eb7c145d20d8d98b794e99ea774e317df36f25f4" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "halibut" => :build - - def install - system "./mkauto.sh" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"agedu", "-s", "." - assert_predicate testpath/"agedu.dat", :exist? - end -end diff --git a/Formula/aggregate.rb b/Formula/aggregate.rb deleted file mode 100644 index f383260a8a8aa..0000000000000 --- a/Formula/aggregate.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Aggregate < Formula - desc "Optimizes lists of prefixes to reduce list lengths" - homepage "https://web.archive.org/web/20160716192438/freecode.com/projects/aggregate/" - url "https://ftp.isc.org/isc/aggregate/aggregate-1.6.tar.gz" - sha256 "166503005cd8722c730e530cc90652ddfa198a25624914c65dffc3eb87ba5482" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "231a7cce3160591eff39c8f70a9324dd0329a6a21355d49747c74308527cc946" => :mojave - sha256 "6dc7626282f519003e1d559ac42a983f4a571494ac04e5b61858fdf16d1ca924" => :high_sierra - sha256 "ebe7aa16c7cf36684463292995c60fdde12cdac889de551d8f85b89e6b77416c" => :sierra - sha256 "87507a739f2bd5ba57ccd23b34f2b7c41d68a897c128231dbbc32ba23b869ed5" => :el_capitan - sha256 "813ccd28b00f94e1574079f7f6816858e32c5d8f9a964b783307d25c7e449d2b" => :yosemite - sha256 "169598a0d41382215ba51ed0c377c98857804e82fb1658414dd04ee94ddbb993" => :mavericks - end - - conflicts_with "crush-tools", :because => "both install an `aggregate` binary" - - def install - bin.mkpath - man1.mkpath - - # Makefile doesn't respect --mandir or MANDIR - inreplace "Makefile.in", "$(prefix)/man/man1", "$(prefix)/share/man/man1" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "CFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}", - "install" - end - - test do - # Test case taken from here: http://horms.net/projects/aggregate/examples.shtml - test_input = <<~EOS - 10.0.0.0/19 - 10.0.255.0/24 - 10.1.0.0/24 - 10.1.1.0/24 - 10.1.2.0/24 - 10.1.2.0/25 - 10.1.2.128/25 - 10.1.3.0/25 - EOS - - expected_output = <<~EOS - 10.0.0.0/19 - 10.0.255.0/24 - 10.1.0.0/23 - 10.1.2.0/24 - 10.1.3.0/25 - EOS - - assert_equal expected_output, pipe_output("#{bin}/aggregate", test_input), "Test Failed" - end -end diff --git a/Formula/aha.rb b/Formula/aha.rb deleted file mode 100644 index e6cc87d80b393..0000000000000 --- a/Formula/aha.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Aha < Formula - desc "ANSI HTML adapter" - homepage "https://github.com/theZiz/aha" - url "https://github.com/theZiz/aha/archive/0.5.tar.gz" - sha256 "6f8b044bee9760a1a85dffbc362e532d7dd91bb20b7ed4f241ff1119ad74758f" - head "https://github.com/theZiz/aha.git" - - bottle do - cellar :any_skip_relocation - sha256 "b22a64305a6e2b05dfbc534169d4536d34dcb5ed81be53dbf57f7dd640a6b9bf" => :mojave - sha256 "be1915be3aebd7fdccc3e0d694351b29c9e5af4093492154dbf46ddb5d506a2b" => :high_sierra - sha256 "2625fabfb62878a3123448e5dbe56e18efbd0d90f1b4dcf3dc1619274ecb7c08" => :sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - out = pipe_output(bin/"aha", "rainpill") - assert_match(/color:purple;">rain.*color:blue;">pill/, out) - end -end diff --git a/Formula/ahcpd.rb b/Formula/ahcpd.rb deleted file mode 100644 index 10f2d422548e1..0000000000000 --- a/Formula/ahcpd.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Ahcpd < Formula - desc "Autoconfiguration protocol for IPv6 and IPv6/IPv4 networks" - homepage "https://www.irif.univ-paris-diderot.fr/~jch/software/ahcp/" - url "https://www.irif.univ-paris-diderot.fr/~jch/software/files/ahcpd-0.53.tar.gz" - sha256 "a4622e817d2b2a9b878653f085585bd57f3838cc546cca6028d3b73ffcac0d52" - - bottle do - cellar :any_skip_relocation - sha256 "8852e7e5e11d6ea413657d012e4d49ca0d9ac406e56da6bf7c0daa6d4d788a16" => :mojave - sha256 "ab3221a9f28ded916f8d2ef4b8377a2a793fa2fee5f891b9a97e3dede0d294ae" => :high_sierra - sha256 "d3a8a4efb712e2c6a8a055276e5d93d3275a638df4231a4dfe8d428a2606d776" => :sierra - sha256 "b37143ee365a4a3afd9623d5f49eab0bc4bdf9ac3662d22db9671cffa1078224" => :el_capitan - sha256 "36907bc1aadc9d9d874ebd74624d8c2c2e8b4057181df1e964720a41f72ccae8" => :yosemite - sha256 "8518f82187d2b8d2bc24648bd072f19073e159abb2bdaf5418ad31e3ab966d0b" => :mavericks - end - - patch :DATA - - def install - system "make", "LDLIBS=''" - system "make", "install", "PREFIX=", "TARGET=#{prefix}" - end - - test do - pid_file = testpath/"ahcpd.pid" - log_file = testpath/"ahcpd.log" - mkdir testpath/"leases" - - (testpath/"ahcpd.conf").write <<~EOS - mode server - - prefix fde6:20f5:c9ac:358::/64 - prefix 192.168.4.128/25 - lease-dir #{testpath}/leases - name-server fde6:20f5:c9ac:358::1 - name-server 192.168.4.1 - ntp-server 192.168.4.2 - EOS - - system "#{bin}/ahcpd", "-c", "ahcpd.conf", "-I", pid_file, "-L", log_file, "-D", "lo0" - sleep(2) - - assert_predicate pid_file, :exist?, "The file containing the PID of the child process was not created." - assert_predicate log_file, :exist?, "The file containing the log was not created." - - Process.kill("TERM", pid_file.read.to_i) - end -end - -__END__ -diff --git a/Makefile b/Makefile -index e52eeb7..28e1043 100644 ---- a/Makefile -+++ b/Makefile -@@ -40,8 +40,8 @@ install.minimal: all - chmod +x $(TARGET)/etc/ahcp/ahcp-config.sh - - install: all install.minimal -- mkdir -p $(TARGET)$(PREFIX)/man/man8/ -- cp -f ahcpd.man $(TARGET)$(PREFIX)/man/man8/ahcpd.8 -+ mkdir -p $(TARGET)$(PREFIX)/share/man/man8/ -+ cp -f ahcpd.man $(TARGET)$(PREFIX)/share/man/man8/ahcpd.8 - - .PHONY: uninstall - -@@ -49,7 +49,7 @@ uninstall: - -rm -f $(TARGET)$(PREFIX)/bin/ahcpd - -rm -f $(TARGET)$(PREFIX)/bin/ahcp-config.sh - -rm -f $(TARGET)$(PREFIX)/bin/ahcp-dummy-config.sh -- -rm -f $(TARGET)$(PREFIX)/man/man8/ahcpd.8 -+ -rm -f $(TARGET)$(PREFIX)/share/man/man8/ahcpd.8 - - .PHONY: clean diff --git a/Formula/aiccu.rb b/Formula/aiccu.rb deleted file mode 100644 index 84610ee722616..0000000000000 --- a/Formula/aiccu.rb +++ /dev/null @@ -1,145 +0,0 @@ -class Aiccu < Formula - desc "Automatic IPv6 Connectivity Client Utility" - homepage "https://www.sixxs.net/tools/aiccu/" - url "https://deb.debian.org/debian/pool/main/a/aiccu/aiccu_20070115.orig.tar.gz" - version "20070115" - sha256 "d23cf50a16fa842242c97683c3c1c1089a7a4964e3eaba97ad1f17110fdfe3cc" - - bottle do - rebuild 1 - sha256 "f6c90e2ecdcd0d676abe4fb32f98a8592d348ac3794de62fa64f403e5ecbbf17" => :mojave - sha256 "9033bb99bd8fbaa3b74abb0fa850b2220c317628851af361180c0c764732d49c" => :high_sierra - sha256 "ee19bef55805a8562bddb41a3af66e5bce9589b1e4d96b05348a37b5ada2c091" => :sierra - sha256 "572e103e9de9c872eb202e18d5c4f352f0b9dc26d284d5979b83ff6fa3daa5b2" => :el_capitan - sha256 "e4db05626f082c10398f46ac40aa25ec271be6e4372330d6d7c27b2349d0e789" => :yosemite - end - - # Patches per MacPorts - patch :DATA - - def install - inreplace "doc/aiccu.conf", "daemonize true", "daemonize false" - system "make", "prefix=#{prefix}" - system "make", "install", "prefix=#{prefix}" - - etc.install "doc/aiccu.conf" - end - - def caveats - <<~EOS - You may also wish to install tuntap: - - The TunTap project provides kernel extensions for macOS that allow - creation of virtual network interfaces. - - https://tuntaposx.sourceforge.io/ - - You can install tuntap with homebrew using brew install tuntap - - Unless it exists already, a aiccu.conf file has been written to: - #{etc}/aiccu.conf - - Protect this file as it will contain your credentials. - - The 'aiccu' command will load this file by default unless told to use - a different one. - EOS - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/aiccu - start - #{etc}/aiccu.conf - - RunAtLoad - - - - EOS - end - - test do - system "#{sbin}/aiccu", "version" - end -end - -__END__ -diff --git a/Makefile b/Makefile -index 0e96136..78609bd 100644 ---- a/Makefile -+++ b/Makefile -@@ -36,10 +36,11 @@ export DESTDIR - CFLAGS=${RPM_OPT_FLAGS} - - # Destination Paths (relative to DESTDIR) --dirsbin=/usr/sbin/ --dirbin=/usr/bin/ --diretc=/etc/ --dirdoc=/usr/share/doc/${PROJECT}/ -+prefix= -+dirsbin=${prefix}/sbin/ -+dirbin=${prefix}/bin/ -+diretc=${prefix}/etc/ -+dirdoc=${prefix}/share/doc/${PROJECT}/ - - # Make sure the lower makefile also knows these - export PROJECT -@@ -79,21 +80,13 @@ install: aiccu - @echo "Configuration..." - @mkdir -p ${DESTDIR}${diretc} - ifeq ($(shell echo "A${RPM_BUILD_ROOT}"),A) -- $(shell [ -f ${DESTDIR}${diretc}${PROJECT}.conf ] || cp -R doc/${PROJECT}.conf ${DESTDIR}${diretc}${PROJECT}.conf) - @echo "Documentation..." -+ @cp doc/${PROJECT}.conf ${DESTDIR}${dirdoc} - @cp doc/README ${DESTDIR}${dirdoc} - @cp doc/LICENSE ${DESTDIR}${dirdoc} - @cp doc/HOWTO ${DESTDIR}${dirdoc} -- @echo "Installing Debian-style init.d" -- @mkdir -p ${DESTDIR}${diretc}init.d -- @cp doc/${PROJECT}.init.debian ${DESTDIR}${diretc}init.d/${PROJECT} --else -- @echo "Installing Redhat-style init.d" -- @mkdir -p ${DESTDIR}${diretc}init.d -- @cp doc/${PROJECT}.init.rpm ${DESTDIR}${diretc}init.d/${PROJECT} -- @cp doc/${PROJECT}.conf ${DESTDIR}${diretc}${PROJECT}.conf - endif -- @echo "Installation into ${DESTDIR}/ completed" -+ @echo "Installation into ${DESTDIR}${prefix}/ completed" - - help: - @echo "$(PROJECT) - $(PROJECT_DESC)" -diff --git a/common/aiccu.h b/common/aiccu.h -index ef65000..5b2eb43 100755 ---- a/common/aiccu.h -+++ b/common/aiccu.h -@@ -65,17 +65,17 @@ - * the data. Could be useful in the event - * where we can't make contact to the main server - */ --#define AICCU_CACHE "/var/cache/aiccu.cache" -+#define AICCU_CACHE "HOMEBREW_PREFIX/var/cache/aiccu.cache" - - /* The PID we are running as when daemonized */ --#define AICCU_PID "/var/run/aiccu.pid" -+#define AICCU_PID "HOMEBREW_PREFIX/var/run/aiccu.pid" - - /* AICCU Configuration file */ - #ifdef _WIN32 - /* GetWindowsDirectory() is used to figure out the directory to store the config */ - #define AICCU_CONFIG "aiccu.conf" - #else --#define AICCU_CONFIG "/etc/aiccu.conf" -+#define AICCU_CONFIG "HOMEBREW_PREFIX/etc/aiccu.conf" - #endif - - /* Inbound listen queue */ diff --git a/Formula/aide.rb b/Formula/aide.rb deleted file mode 100644 index b9a546c9c01c6..0000000000000 --- a/Formula/aide.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Aide < Formula - desc "File and directory integrity checker" - homepage "https://aide.sourceforge.io/" - url "https://downloads.sourceforge.net/project/aide/aide/0.16/aide-0.16.tar.gz" - sha256 "a81c53a131c4fd130b169b3a26ac35386a2f6e1e014f12807524cc273ed97345" - - bottle do - rebuild 1 - sha256 "0c952b922666c241fd3fe1249b29bf88c2149378511218d76dc30de1097a04f1" => :mojave - sha256 "c9429f028f2627c8ae1b76737b26741cecc4c18507139b02bcc6c487bc5e15a7" => :high_sierra - sha256 "71d151f2f389cbbc5884eff30261d0691d020c0983411962c1ba42927d0ae052" => :sierra - sha256 "2860850684659f15f8d5dc01127a7a9f2bfc21f773d99c4a8897585b4542723d" => :el_capitan - end - - head do - url "https://git.code.sf.net/p/aide/code.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "libgcrypt" - depends_on "libgpg-error" - depends_on "pcre" - - def install - system "sh", "./autogen.sh" if build.head? - - system "./configure", "--disable-lfs", - "--disable-static", - "--with-curl", - "--with-zlib", - "--sysconfdir=#{etc}", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - (testpath/"aide.conf").write <<~EOS - database = file:/var/lib/aide/aide.db - database_out = file:/var/lib/aide/aide.db.new - database_new = file:/var/lib/aide/aide.db.new - gzip_dbout = yes - summarize_changes = yes - grouped = yes - verbose = 7 - database_attrs = sha256 - /etc p+i+u+g+sha256 - EOS - system "#{bin}/aide", "--config-check", "-c", "aide.conf" - end -end diff --git a/Formula/aircrack-ng.rb b/Formula/aircrack-ng.rb deleted file mode 100644 index e31ff326862cd..0000000000000 --- a/Formula/aircrack-ng.rb +++ /dev/null @@ -1,71 +0,0 @@ -class AircrackNg < Formula - desc "Next-generation aircrack with lots of new features" - homepage "https://aircrack-ng.org/" - url "https://download.aircrack-ng.org/aircrack-ng-1.5.2.tar.gz" - sha256 "9e592fe7658046220e0ac0a6d05c4026903f3077b248893e0056ccbe4ee88241" - - bottle do - sha256 "6aaae61586ea0f80f466e1eaa3740ff64cb5a68d457ee248c6561339778246bf" => :mojave - sha256 "795dfb0d851b602176fa1a68383afee62f6860fdbd868b515cbf7cf4fe010b7c" => :high_sierra - sha256 "e8302d2bb87a615d341dc907cf4a8e8f87f9fd560a28246a5b4a37230abe9d7b" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "pcre" - depends_on "sqlite" - - # Remove root requirement from OUI update script. See: - # https://github.com/Homebrew/homebrew/pull/12755 - patch :DATA - - def install - system "./autogen.sh", "--disable-silent-rules", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-experimental" - system "make", "install" - end - - def caveats; <<~EOS - Run `airodump-ng-oui-update` install or update the Airodump-ng OUI file. - EOS - end - - test do - system "#{bin}/aircrack-ng", "--help" - end -end - -__END__ ---- a/scripts/airodump-ng-oui-update -+++ b/scripts/airodump-ng-oui-update -@@ -20,25 +20,6 @@ fi - - AIRODUMP_NG_OUI="${OUI_PATH}/airodump-ng-oui.txt" - OUI_IEEE="${OUI_PATH}/oui.txt" --USERID="" -- -- --# Make sure the user is root --if [ x"`which id 2> /dev/null`" != "x" ] --then -- USERID="`id -u 2> /dev/null`" --fi -- --if [ x$USERID = "x" -a x$(id -ru) != "x" ] --then -- USERID=$(id -ru) --fi -- --if [ x$USERID != "x" -a x$USERID != "x0" ] --then -- echo Run it as root ; exit ; --fi -- - - if [ ! -d "${OUI_PATH}" ]; then - mkdir -p ${OUI_PATH} diff --git a/Formula/airspy.rb b/Formula/airspy.rb deleted file mode 100644 index f76b8ac21c713..0000000000000 --- a/Formula/airspy.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Airspy < Formula - desc "The usemode driver and associated tools for airspy" - homepage "https://airspy.com/" - url "https://github.com/airspy/airspyone_host/archive/v1.0.9.tar.gz" - sha256 "967ef256596d4527b81f007f77b91caec3e9f5ab148a8fec436a703db85234cc" - head "https://github.com/airspy/airspyone_host.git" - - bottle do - sha256 "d593672c7c08aff7b0056aa06171129b9fba717837de653dfb96b26ec78d6553" => :mojave - sha256 "44736e1193e3f63fca0c984ac4f594d1ad11a83a810898103652f69af2bce63f" => :high_sierra - sha256 "bfc1393f3efe5b58016fbee40a4048e7c7246203cb72b02261da1045941bcd4f" => :sierra - sha256 "c86b265ed42d8a976ff4bfc6116e5945d103f22af8ced4b9a9a18827ecf4af06" => :el_capitan - sha256 "1d6af7e52534bc50625eabcaa2b586e5824a3abbb4c3b42e032e5b4de41c6bfb" => :yosemite - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - args = std_cmake_args - - libusb = Formula["libusb"] - args << "-DLIBUSB_INCLUDE_DIR=#{libusb.opt_include}/libusb-1.0" - args << "-DLIBUSB_LIBRARIES=#{libusb.opt_lib}/libusb-1.0.dylib" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/airspy_lib_version").chomp - end -end diff --git a/Formula/akamai.rb b/Formula/akamai.rb deleted file mode 100644 index 0f6c5d3d55e53..0000000000000 --- a/Formula/akamai.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Akamai < Formula - desc "CLI toolkit for working with Akamai's APIs" - homepage "https://github.com/akamai/cli" - url "https://github.com/akamai/cli/archive/1.1.1.tar.gz" - sha256 "fd29fb3639f0c6d0d3c0b9d19ffebb935d8d9ea693533d1255c42f55a3860a00" - - bottle do - cellar :any_skip_relocation - sha256 "16764dec8d1dbec939ff77658fbd97307750e6fd285351bbbd7b3a05698d2137" => :mojave - sha256 "9075875740404cd16e557546722e47535979082a4b8a21b35973bb08a5c91cd3" => :high_sierra - sha256 "cf3a27a0a65bdd49e9d2cae18bde2ff6b72989a541388bec9c4ce37ffddc07ba" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - - srcpath = buildpath/"src/github.com/akamai/cli" - srcpath.install buildpath.children - - cd srcpath do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-tags", "noautoupgrade nofirstrun", "-o", bin/"akamai" - prefix.install_metafiles - end - end - - test do - assert_match "Purge", shell_output("#{bin}/akamai install --force purge") - end -end diff --git a/Formula/akka.rb b/Formula/akka.rb deleted file mode 100644 index 2ac81efc5639a..0000000000000 --- a/Formula/akka.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Akka < Formula - desc "Toolkit for building concurrent, distributed, and fault tolerant apps" - homepage "https://github.com/akka/akka" - url "https://downloads.typesafe.com/akka/akka_2.11-2.4.17.zip" - sha256 "d5a9d3b4235a917173438fa5711d7af1bd100dd98f7567249390e202d5f06316" - - bottle :unneeded - - depends_on :java - - def install - # Remove Windows files - rm "bin/akka.bat" - - chmod 0755, "bin/akka" - chmod 0755, "bin/akka-cluster" - - inreplace ["bin/akka", "bin/akka-cluster"] do |s| - # Translate akka script - s.gsub! /^declare AKKA_HOME=.*$/, "declare AKKA_HOME=#{libexec}" - # dos to unix (bug fix for version 2.3.11) - s.gsub! /\r?/, "" - end - - libexec.install Dir["*"] - bin.install_symlink libexec/"bin/akka" - bin.install_symlink libexec/"bin/akka-cluster" - end - - test do - (testpath/"src/main/java/sample/hello/HelloWorld.java").write <<~EOS - package sample.hello; - - import akka.actor.Props; - import akka.actor.UntypedActor; - import akka.actor.ActorRef; - - public class HelloWorld extends UntypedActor { - - @Override - public void preStart() { - // create the greeter actor - final ActorRef greeter = getContext().actorOf(Props.create(Greeter.class), "greeter"); - // tell it to perform the greeting - greeter.tell(Greeter.Msg.GREET, getSelf()); - } - - @Override - public void onReceive(Object msg) { - if (msg == Greeter.Msg.DONE) { - // when the greeter is done, stop this actor and with it the application - getContext().stop(getSelf()); - } else - unhandled(msg); - } - } - EOS - (testpath/"src/main/java/sample/hello/Greeter.java").write <<~EOS - package sample.hello; - - import akka.actor.UntypedActor; - - public class Greeter extends UntypedActor { - - public static enum Msg { - GREET, DONE; - } - - @Override - public void onReceive(Object msg) { - if (msg == Msg.GREET) { - System.out.println("Hello World!"); - getSender().tell(Msg.DONE, getSelf()); - } else - unhandled(msg); - } - - } - EOS - (testpath/"src/main/java/sample/hello/Main.java").write <<~EOS - package sample.hello; - - public class Main { - - public static void main(String[] args) { - akka.Main.main(new String[] { HelloWorld.class.getName() }); - } - } - EOS - system "javac", "-classpath", Dir[libexec/"lib/**/*.jar"].join(":"), - testpath/"src/main/java/sample/hello/HelloWorld.java", - testpath/"src/main/java/sample/hello/Greeter.java", - testpath/"src/main/java/sample/hello/Main.java" - system "java", - "-classpath", (Dir[libexec/"lib/**/*.jar"] + [testpath/"src/main/java"]).join(":"), - "akka.Main", "sample.hello.HelloWorld" - end -end diff --git a/Formula/alac.rb b/Formula/alac.rb deleted file mode 100644 index 9519c1ab9257b..0000000000000 --- a/Formula/alac.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Alac < Formula - desc "Basic decoder for Apple Lossless Audio Codec files (ALAC)" - homepage "https://web.archive.org/web/20150319040222/craz.net/programs/itunes/alac.html" - url "https://web.archive.org/web/20150510210401/craz.net/programs/itunes/files/alac_decoder-0.2.0.tgz" - sha256 "7f8f978a5619e6dfa03dc140994fd7255008d788af848ba6acf9cfbaa3e4122f" - - bottle do - cellar :any_skip_relocation - sha256 "ffc34867982b3a942be2bfa1c9a561bc85270871b029c45a16fc11ffae899603" => :mojave - sha256 "17bffb09018ddf7d96258b99860d75fb9a203037a356cb0f2e4c6c4520cdc4c3" => :high_sierra - sha256 "3c833c71834ea65498c761d4fe444a26e97e107433de526ab55ad1fb0d36a2ba" => :sierra - sha256 "4cb85c125553c6c2a49576790c5be5e0b89096569131df3b8576f3499e65ef5a" => :el_capitan - sha256 "a3a54a254a147f3a1173870bdd2e9399043b3e506d8c04383f99cf3ce67a4fca" => :yosemite - sha256 "20cca431ce69d7eb2e5d894ebbfffdbc633eef2b3447be6d0afdb7c25cac8c0e" => :mavericks - end - - def install - system "make", "CFLAGS=#{ENV.cflags}", "CC=#{ENV.cc}" - bin.install "alac" - end - - test do - sample = test_fixtures("test.m4a") - assert_equal "file type: mp4a\n", shell_output("#{bin}/alac -t #{sample}", 100) - end -end diff --git a/Formula/aldo.rb b/Formula/aldo.rb deleted file mode 100644 index 810047dd42b44..0000000000000 --- a/Formula/aldo.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Aldo < Formula - desc "Morse code learning tool released under GPL" - homepage "https://www.nongnu.org/aldo/" - url "https://savannah.nongnu.org/download/aldo/aldo-0.7.7.tar.bz2" - sha256 "f1b8849d09267fff3c1f5122097d90fec261291f51b1e075f37fad8f1b7d9f92" - - bottle do - cellar :any - rebuild 1 - sha256 "4c510b7da186be5d55c990d97265952de8fad51079ad2fa18058b8a57d8eeebb" => :mojave - sha256 "d30e5e60defc2e2d2110cf52a60898d94ae3331a679f1c228e0d598421a594d9" => :high_sierra - sha256 "ad5216c04fce4d1f4da63af2fa4d298a3414073db186991ec4389a942799ddd1" => :sierra - sha256 "0691c4b9b7ae5b6f104c5b5205f731d4348563b8a9a8c3631395f619ce00aabf" => :el_capitan - sha256 "f5d55cefcfc65033f50bf2aedb30298db1540a8dd5f5c028feb3b4b1c7e5610b" => :yosemite - sha256 "fea59d120862f6a04da3993dde1b2f6db60183fc6d7f90f77bb622efdf8a16ac" => :mavericks - end - - depends_on "libao" - - # Reported upstream: - # https://savannah.nongnu.org/bugs/index.php?42127 - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "Aldo #{version} Main Menu", pipe_output("#{bin}/aldo", "6") - end -end - -__END__ -diff --git a/src/menu.cc b/src/menu.cc -index 483b826..092d604 100644 ---- a/src/menu.cc -+++ b/src/menu.cc -@@ -112,20 +112,17 @@ void Menu::add_item(id_type id, std::string c, Function2 f) - - void Menu::add_item_at(unsigned int pos, id_type id, std::string c, Function1 f) - { -- IT it(&m_its[pos]); -- m_its.insert(it, Item(id,c,f) ); -+ m_its.insert(m_its.begin()+pos, Item(id,c,f) ); - } - - void Menu::add_item_at(unsigned int pos, id_type id, std::string c, Function2 f) - { -- IT it(&m_its[pos]); -- m_its.insert(it, Item(id,c,f) ); -+ m_its.insert(m_its.begin()+pos, Item(id,c,f) ); - } - - void Menu::delete_item_at(unsigned int pos) - { -- IT it(&m_its[pos]); -- m_its.erase(it); -+ m_its.erase(m_its.begin()+pos); - } diff --git a/Formula/alexjs.rb b/Formula/alexjs.rb deleted file mode 100644 index b77cbd13a065d..0000000000000 --- a/Formula/alexjs.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class Alexjs < Formula - desc "Catch insensitive, inconsiderate writing" - homepage "https://alexjs.com" - url "https://github.com/get-alex/alex/archive/7.0.0.tar.gz" - sha256 "406ab546c773eccb40a2ef756019894dd00635de7f05feb76d48f0850c6644a6" - - bottle do - cellar :any_skip_relocation - sha256 "4448a72318e45cbd3e47a6763555439417f556a45d19a57692ca6c891c3fa1b8" => :mojave - sha256 "c7d03a223d9cae6603cbeb2dd46070cbb79c2e1a012896d9e69e313e1472fcda" => :high_sierra - sha256 "0636f6ec0a9788daad20bf60b341a25ca26f367f8a6e72ea05998031a7b95701" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.txt").write "garbageman" - assert_match "garbage collector", shell_output("#{bin}/alex test.txt 2>&1", 1) - end -end diff --git a/Formula/algernon.rb b/Formula/algernon.rb deleted file mode 100644 index ad3bc0f47cee5..0000000000000 --- a/Formula/algernon.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Algernon < Formula - desc "Pure Go web server with Lua, Markdown, HTTP/2 and template support" - homepage "https://algernon.roboticoverlords.org/" - url "https://github.com/xyproto/algernon.git", - :tag => "1.12.1", - :revision => "26b9b39868ee55866e2bec551adc0627dc79d18b" - version_scheme 1 - head "https://github.com/xyproto/algernon.git" - - bottle do - cellar :any_skip_relocation - sha256 "f321c973abf840aa4b692492688a08e10311c8f6b1a5125e3523b5ccf81d34d8" => :mojave - sha256 "0c8cfec27830be68fcd5032fcbec444f8fbf963e089c264d1e570cc0ddc9d020" => :high_sierra - sha256 "0d132a8e624b56ccaaa47e808fc22e080e522e1e972bde0df8f40d0d6352c3c0" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/xyproto/algernon").install buildpath.children - cd "src/github.com/xyproto/algernon" do - system "go", "build", "-o", "algernon" - - bin.install "desktop/mdview" - bin.install "algernon" - prefix.install_metafiles - end - end - - test do - begin - pid = fork do - exec "#{bin}/algernon", "-s", "-q", "--httponly", "--boltdb", "tmp.db", - "--addr", ":45678" - end - sleep 20 - output = shell_output("curl -sIm3 -o- http://localhost:45678") - assert_match /200 OK.*Server: Algernon/m, output - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/algol68g.rb b/Formula/algol68g.rb deleted file mode 100644 index 029e930ca239c..0000000000000 --- a/Formula/algol68g.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Algol68g < Formula - desc "Algol 68 compiler-interpreter" - homepage "https://jmvdveer.home.xs4all.nl/algol.html" - url "https://jmvdveer.home.xs4all.nl/algol68g-2.8.4.tar.gz" - sha256 "5823ccd0c18fe10a368a117cc3924748c4a5d0fe8dff0d9d818ff73c342565f0" - - bottle do - sha256 "381a280f428418bbb2338bdbe6a3bd4881f5d857c0d6dc9274f850d67df73bfb" => :mojave - sha256 "3354af424bfb01307305a9bdb60695db71f2aa43cacd750a62057c1f3aeb3cee" => :high_sierra - sha256 "888a4d7dfa4d9379d09657fe3ff4d673238c9827dfbe443f8cacbd40a32c042e" => :sierra - sha256 "78c7f1fea5c16a6c7e8d774bbd91174bb541a9548766a70c2da3660f73c8a01c" => :el_capitan - sha256 "8b635fbd56159120fef7b0dca5364de8baa2b7d9a2f87956b86d31e4dd51a111" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - path = testpath/"hello.alg" - path.write <<~EOS - print("Hello World") - EOS - - assert_equal "Hello World", shell_output("#{bin}/a68g #{path}").strip - end -end diff --git a/Formula/align.rb b/Formula/align.rb deleted file mode 100644 index fdee7ddf27bdc..0000000000000 --- a/Formula/align.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Align < Formula - desc "Text column alignment filter" - homepage "https://www.cs.indiana.edu/~kinzler/align/" - url "https://www.cs.indiana.edu/~kinzler/align/align-1.7.5.tgz" - sha256 "cc692fb9dee0cc288757e708fc1a3b6b56ca1210ca181053a371cb11746969dd" - - bottle do - cellar :any_skip_relocation - sha256 "b8de67536085ba47ddeaed3b8567645beaf5e84ab0b7ab958cf7b6cc358e10dc" => :mojave - sha256 "4b0b70a5909b7d6d2fa78fcb4e36acb20295202adbdbd6bf5754530f7e055199" => :high_sierra - sha256 "4d07f4f2ae948de293afdc80a5a736cf81da7c335cec1778f5b7304debda6599" => :sierra - sha256 "c2c177c8be3b5a58e60f3a1f39d9fdd3cc3d39247d92be45142cd06ae80273bf" => :el_capitan - sha256 "caa9e8c3b3a9d946b95d5222b1518c5307499d57fe17f593ec3911f9cc6eace7" => :yosemite - sha256 "f903cb30e079f56c5743e2ca22a168c61d7a7c57b2cf6bc3c6492ed214a296a3" => :mavericks - end - - conflicts_with "speech-tools", :because => "both install `align` binaries" - - def install - system "make", "install", "BINDIR=#{bin}" - end - - test do - assert_equal " 1 1\n12 12\n", pipe_output(bin/"align", "1 1\n12 12\n") - end -end diff --git a/Formula/allegro.rb b/Formula/allegro.rb deleted file mode 100644 index 99e34363cba94..0000000000000 --- a/Formula/allegro.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Allegro < Formula - desc "C/C++ multimedia library for cross-platform game development" - homepage "https://liballeg.org/" - url "https://github.com/liballeg/allegro5/releases/download/5.2.4.0/allegro-5.2.4.0.tar.gz" - sha256 "346163d456c5281c3b70271ecf525e1d7c754172aef4bab15803e012b12f2af1" - head "https://github.com/liballeg/allegro5.git" - - bottle do - cellar :any - rebuild 1 - sha256 "04a378dc871c98270dd7d2305dfe1373c400a39893e555c6166c13e26d472ba3" => :mojave - sha256 "bb341c97b4b21ec74bce8c2bd89bb3bd01ab1367eaec595eb597fcdb9411a315" => :high_sierra - sha256 "e4047f9d5e838c84e1e1774c080b6c66bb75da9794fd677512eb8d8294ea2da1" => :sierra - sha256 "c98cd152d3be7f0d12e6ba9f06c2cde35d71a3c425ae950fbf22a9ba0c985139" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "flac" - depends_on "freetype" - depends_on "libogg" - depends_on "libvorbis" - depends_on "opusfile" - depends_on "physfs" - depends_on "theora" - depends_on "webp" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DWANT_DOCS=OFF" - system "make", "install" - end - end - - test do - (testpath/"allegro_test.cpp").write <<~EOS - #include - #include - - int main(int n, char** c) { - if (!al_init()) { - return 1; - } - return 0; - } - EOS - - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lallegro", "-lallegro_main", - "-o", "allegro_test", "allegro_test.cpp" - system "./allegro_test" - end -end diff --git a/Formula/allure.rb b/Formula/allure.rb deleted file mode 100644 index 36876914d06aa..0000000000000 --- a/Formula/allure.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Allure < Formula - desc "Flexible lightweight test report tool" - homepage "https://github.com/allure-framework/allure2" - url "https://dl.bintray.com/qameta/maven/io/qameta/allure/allure-commandline/2.8.1/allure-commandline-2.8.1.zip" - sha256 "d04139ef7bc6d0b3e2379f069b1cc968f6676d523969333958ce28d549c51225" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - # Remove all windows files - rm_f Dir["bin/*.bat"] - - prefix.install_metafiles - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"allure-results/allure-result.json").write <<~EOS - { - "uuid": "allure", - "name": "testReportGeneration", - "fullName": "org.homebrew.AllureFormula.testReportGeneration", - "status": "passed", - "stage": "finished", - "start": 1494857300486, - "stop": 1494857300492, - "labels": [ - { - "name": "package", - "value": "org.homebrew" - }, - { - "name": "testClass", - "value": "AllureFormula" - }, - { - "name": "testMethod", - "value": "testReportGeneration" - } - ] - } - EOS - system "#{bin}/allure", "generate", "#{testpath}/allure-results", "-o", "#{testpath}/allure-report" - end -end diff --git a/Formula/alluxio.rb b/Formula/alluxio.rb deleted file mode 100644 index 7a25f30c78aab..0000000000000 --- a/Formula/alluxio.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Alluxio < Formula - desc "Open Source Memory Speed Virtual Distributed Storage" - homepage "https://www.alluxio.org/" - url "http://downloads.alluxio.org/downloads/files/1.8.1/alluxio-1.8.1-bin.tar.gz" - sha256 "5565b4a55331458da087c35d9612165a399a8fcc2221c7bc4665eac8b5f7ab5c" - - bottle :unneeded - - def install - doc.install Dir["docs/*"] - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/bin/*"] - - (etc/"alluxio").install libexec/"conf/alluxio-env.sh.template" => "alluxio-env.sh" - ln_sf "#{etc}/alluxio/alluxio-env.sh", "#{libexec}/conf/alluxio-env.sh" - end - - def caveats; <<~EOS - To configure alluxio, edit - #{etc}/alluxio/alluxio-env.sh - EOS - end - - test do - system bin/"alluxio", "version" - end -end diff --git a/Formula/alot.rb b/Formula/alot.rb deleted file mode 100644 index a9a34ef25a1f3..0000000000000 --- a/Formula/alot.rb +++ /dev/null @@ -1,125 +0,0 @@ -class Alot < Formula - include Language::Python::Virtualenv - - desc "Text mode MUA using notmuch mail" - homepage "https://github.com/pazz/alot" - url "https://github.com/pazz/alot/archive/0.7.tar.gz" - sha256 "2d49a7d61241cfadc993a8456076605b2cfe264c51f5e3f18f337bad58f29a1c" - revision 1 - head "https://github.com/pazz/alot.git" - - bottle do - cellar :any - sha256 "adbbdac0378bf3c5a1d5cf86190b0bdd7bff2569fd7fb3d254fd2bd5bae1e7fe" => :mojave - sha256 "79c1bdd07fa75983d06f4a6c27e81741d0553e3635dd3836c65dc6f3c08c0954" => :high_sierra - sha256 "227895c908fda25c07555e5514b067d086d6d961f71a40c2098763cfd63deccd" => :sierra - sha256 "ba94977585c50e29025be7e592a31809d2f520d50fdb8f023a445dc78ca1bd9d" => :el_capitan - end - - depends_on "sphinx-doc" => :build - depends_on "swig" => :build - depends_on "gpgme" - depends_on "libmagic" - depends_on "notmuch" - depends_on "python@2" - - resource "Automat" do - url "https://files.pythonhosted.org/packages/de/05/b8e453085cf8a7f27bb1226596f4ccf5cc9e758377d60284f990bbdc592c/Automat-0.6.0.tar.gz" - sha256 "3c1fd04ecf08ac87b4dd3feae409542e9bf7827257097b2b6ed5692f69d6f6a8" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/be/41/e909cb6d901e9689da947419505cc7fb7d242a08a62ee221fce6a009a523/attrs-17.2.0.tar.gz" - sha256 "5d4d1b99f94d69338f485984127e4473b3ab9e20f43821b0e546cc3b2302fd11" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "constantly" do - url "https://files.pythonhosted.org/packages/95/f1/207a0a478c4bb34b1b49d5915e2db574cadc415c9ac3a7ef17e29b2e8951/constantly-15.1.0.tar.gz" - sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35" - end - - resource "gpg" do - url "https://files.pythonhosted.org/packages/ef/86/c5a34243a932346c59cb25eb49a4d1dec227974209eb9b618d0ed57ea5be/gpg-1.10.0.tar.gz" - sha256 "349214a866c84aa548bc35ed14eccd2ec9085b3958d5753a63a19a71a1f523ca" - end - - resource "hyperlink" do - url "https://files.pythonhosted.org/packages/83/df/3bdaf38f21f93429de02f04c6a967d2154955fc5b9a6a1a0b20a682edc13/hyperlink-17.3.1.tar.gz" - sha256 "bc4ffdbde9bdad204d507bd8f554f16bba82dd356f6130cb16f41422909c33bc" - end - - resource "incremental" do - url "https://files.pythonhosted.org/packages/8f/26/02c4016aa95f45479eea37c90c34f8fab6775732ae62587a874b619ca097/incremental-17.5.0.tar.gz" - sha256 "7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3" - end - - resource "python-magic" do - url "https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-0.4.15.tar.gz" - sha256 "f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz" - sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" - end - - resource "Twisted" do - url "https://files.pythonhosted.org/packages/a2/37/298f9547606c45d75aa9792369302cc63aa4bbcf7b5f607560180dd099d2/Twisted-17.9.0.tar.bz2" - sha256 "0da1a7e35d5fcae37bc9c7978970b5feb3bc82822155b8654ec63925c05af75c" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - resource "urwidtrees" do - url "https://files.pythonhosted.org/packages/88/9d/981617fa083a75cf0b5ebb0ae47c3af6fb69183be1c74cc3ac6d9a0c5964/urwidtrees-1.0.1.1.tar.gz" - sha256 "08a66d0e76e94bc32bc590e35ed283e8a6b0c93adeb431dc576ec0a345f09bfd" - end - - resource "zope.interface" do - url "https://files.pythonhosted.org/packages/bd/d2/25349ed41f9dcff7b3baf87bd88a4c82396cf6e02f1f42bb68657a3132af/zope.interface-4.4.3.tar.gz" - sha256 "d6d26d5dfbfd60c65152938fcb82f949e8dada37c041f72916fef6621ba5c5ce" - end - - def install - virtualenv_install_with_resources - pkgshare.install Dir["extra/*"] - %w[extra/completion] - zsh_completion.install "extra/completion/alot-completion.zsh" => "_alot" - - ENV["LC_ALL"] = "en_US.UTF-8" - ENV["SPHINXBUILD"] = Formula["sphinx-doc"].opt_bin/"sphinx-build" - cd "docs" do - system "make", "pickle" - system "make", "man", "html" - man1.install "build/man/alot.1" - doc.install Dir["build/html/*"] - end - end - - test do - (testpath/".notmuch-config").write "[database]\npath=#{testpath}/Mail" - (testpath/"Mail").mkpath - system Formula["notmuch"].bin/"notmuch", "new" - - begin - pid = fork do - $stdout.reopen("/dev/null") - $stdin.reopen("/dev/null") - exec "script", "-q", "/dev/null", bin/"alot", "--logfile", testpath/"out.log" - end - sleep 10 - ensure - Process.kill 9, pid - end - - assert_predicate testpath/"out.log", :exist?, "out.log file should exist" - assert_match "setup gui", File.read(testpath/"out.log") - end -end diff --git a/Formula/alpine.rb b/Formula/alpine.rb deleted file mode 100644 index 0cfe336213a19..0000000000000 --- a/Formula/alpine.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Alpine < Formula - desc "News and email agent" - homepage "https://repo.or.cz/alpine.git" - url "https://ftp.osuosl.org/pub/blfs/conglomeration/alpine/alpine-2.21.tar.xz" - mirror "https://fossies.org/linux/misc/alpine-2.21.tar.xz" - sha256 "6030b6881b8168546756ab3a5e43628d8d564539b0476578e287775573a77438" - - bottle do - rebuild 1 - sha256 "df710f2b8178a350e992b53f1ceeda2a2624bacadbf3a5d1d237f6efce66cf76" => :mojave - sha256 "86c4bb588e6c99a856b665d7643cf8ad699c9add68f7301db804085533480cd8" => :high_sierra - sha256 "8d0c2b6cd5b91cb904f1ddebe8b5ba27f1c2db50fe26db9a40a8131943abe2b5" => :sierra - sha256 "a3385e12f96372323504cf50f32b7a045a24e90d0b767ed9be98fdf705d4d65b" => :el_capitan - sha256 "5b57214d7c4603dea4081f4aa8edee42c148a7daad1ed1fd881d4fb01a28d778" => :yosemite - end - - depends_on "openssl" - - def install - ENV.deparallelize - - args = %W[ - --disable-debug - --with-ssl-dir=#{Formula["openssl"].opt_prefix} - --with-ssl-certs-dir=#{etc}/openssl - --prefix=#{prefix} - --with-passfile=.pine-passfile - ] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/alpine", "-supported" - end -end diff --git a/Formula/alure.rb b/Formula/alure.rb deleted file mode 100644 index 10177385d1f07..0000000000000 --- a/Formula/alure.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Alure < Formula - desc "Manage common tasks with OpenAL applications" - homepage "https://kcat.strangesoft.net/alure.html" - url "https://kcat.strangesoft.net/alure-releases/alure-1.2.tar.bz2" - sha256 "465e6adae68927be3a023903764662d64404e40c4c152d160e3a8838b1d70f71" - - bottle do - cellar :any - rebuild 1 - sha256 "4b0683abfa113c033e779e61583dd9d8ced53e5a11a982da15e6ce13bcee742d" => :mojave - sha256 "0e11aef02b6fe4ba7f47030ab2329d16766951f1aab15ea38fbff49119f9c946" => :high_sierra - sha256 "ca92f4baba46fb0d6f33aca69e04215e7a867ebde1aa371938c3b81a34f9f2db" => :sierra - sha256 "6dc7f359b7cdb67e741a48c276ba57e22d5b9c5d55d4881fcb798f52356c1a10" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - # Fix missing unistd include - # Reported by email to author on 2017-08-25 - if MacOS.version >= :high_sierra - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/eed63e836e/alure/unistd.patch" - sha256 "7852a7a365f518b12a1afd763a6a80ece88ac7aeea3c9023aa6c1fe46ac5a1ae" - end - end - - def install - cd "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"alureplay", test_fixtures("test.wav") - end -end diff --git a/Formula/amap.rb b/Formula/amap.rb deleted file mode 100644 index 83bfa2c84b0b6..0000000000000 --- a/Formula/amap.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Amap < Formula - desc "Perform application protocol detection" - homepage "https://www.thc.org/thc-amap/" - url "https://www.thc.org/releases/amap-5.4.tar.gz" - mirror "https://downloads.sourceforge.net/project/slackbuildsdirectlinks/amap/amap-5.4.tar.gz" - sha256 "a75ea58de75034de6b10b0de0065ec88e32f9e9af11c7d69edbffc4da9a5b059" - revision 2 - - bottle do - cellar :any - sha256 "2e6101b4931a28f1bebe642cd2591abbb49245b478f0805f972cb828fe10eadf" => :mojave - sha256 "e20c8c6cfa0221a47164565fd4b4484dd4c653d646a8bdbf7f2330ef99c5079e" => :high_sierra - sha256 "81ff7d4c48a2bb6e0ba15ef0dbcbf31f98f1a1410d65bd53cd60ffc0e8d8c9d1" => :sierra - sha256 "c90c8fb7641960727299f576812dd38d88f836f9d3b99a21fdf652d2032acb52" => :el_capitan - sha256 "0ab42765f948fe016bc38c8d6005e66a86e93b4e93b073615baaf0fa0f0e95dc" => :yosemite - sha256 "18d4464b634e7aec9fefc45079dd97d0867b956ee71f189dc7f0393e77f7dba7" => :mavericks - end - - depends_on "openssl" - - def install - # Last release was 2011 & there's nowhere supported to report this. - openssl = Formula["openssl"] - inreplace "configure" do |s| - s.gsub! 'SSL_IPATH=""', "SSL_IPATH=\"#{openssl.opt_include}/openssl\"" - s.gsub! 'SSL_PATH=""', "SSL_PATH=\"#{openssl.opt_lib}\"" - s.gsub! 'CRYPTO_PATH=""', "CRYPTO_PATH=\"#{openssl.opt_lib}\"" - end - - system "./configure", "--prefix=#{prefix}" - system "make" - - # --prefix doesn't work as we want it to so install manually - bin.install "amap", "amap6", "amapcrap" - etc.install "appdefs.resp", "appdefs.rpc", "appdefs.trig" - man1.install "amap.1" - end - - test do - openssl_linked = MachO::Tools.dylibs("#{bin}/amap").any? { |d| d.include? Formula["openssl"].opt_lib.to_s } - assert openssl_linked - # We can do more than this, but unsure how polite it is to port-scan - # someone's domain every time this goes through CI. - assert_match version.to_s, shell_output("#{bin}/amap", 255) - end -end diff --git a/Formula/amazon-ecs-cli.rb b/Formula/amazon-ecs-cli.rb deleted file mode 100644 index 35cb6d3bf455d..0000000000000 --- a/Formula/amazon-ecs-cli.rb +++ /dev/null @@ -1,29 +0,0 @@ -class AmazonEcsCli < Formula - desc "CLI for Amazon ECS to manage clusters and tasks for development" - homepage "https://aws.amazon.com/ecs" - url "https://github.com/aws/amazon-ecs-cli/archive/v1.12.1.tar.gz" - sha256 "ee04b8442353a01d2ce2e5107f8e996b5c90d3a873aae89f33d0aebe1fc48adf" - - bottle do - cellar :any_skip_relocation - sha256 "4544f0ad6675d3bf7b1ec1c0f94c0f3e3728346a8ae4a2ed806b7c47b703c05e" => :mojave - sha256 "86241125a9d774a945545140022d9259160edd6f34cb24f0b05af392d3c0052d" => :high_sierra - sha256 "25eaba806f9d118cf1e5e1f0df4a4f63c605072c15597976467565f65b4c790d" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/aws/amazon-ecs-cli").install buildpath.children - cd "src/github.com/aws/amazon-ecs-cli" do - system "make", "build" - bin.install "bin/local/ecs-cli" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/ecs-cli -v") - end -end diff --git a/Formula/amdatu-bootstrap.rb b/Formula/amdatu-bootstrap.rb deleted file mode 100644 index f55514306776a..0000000000000 --- a/Formula/amdatu-bootstrap.rb +++ /dev/null @@ -1,21 +0,0 @@ -class AmdatuBootstrap < Formula - desc "Bootstrapping OSGi development" - homepage "https://www.amdatu.com/bootstrap/intro.html" - url "https://bitbucket.org/amdatuadm/amdatu-bootstrap/downloads/bootstrap-bin-r9.zip" - sha256 "937ef932a740665439ea0118ed417ff7bdc9680b816b8b3c81ecfd6d0fc4773b" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install %w[amdatu-bootstrap bootstrap.jar conf] - (bin/"amdatu-bootstrap").write_env_script libexec/"amdatu-bootstrap", - Language::Java.java_home_env("1.8") - end - - test do - output = shell_output("#{bin}/amdatu-bootstrap --info") - assert_match "Amdatu Bootstrap R9", output - end -end diff --git a/Formula/ammonite-repl.rb b/Formula/ammonite-repl.rb deleted file mode 100644 index 33bbc5a19351f..0000000000000 --- a/Formula/ammonite-repl.rb +++ /dev/null @@ -1,21 +0,0 @@ -class AmmoniteRepl < Formula - desc "Ammonite is a cleanroom re-implementation of the Scala REPL" - homepage "https://lihaoyi.github.io/Ammonite/#Ammonite-REPL" - url "https://github.com/lihaoyi/Ammonite/releases/download/1.6.0/2.12-1.6.0" - sha256 "1e93ce4284a71c309c19f4a0a3343e9a110f71ae8877938f940c22128bbe869d" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"].shift => "amm" - chmod 0555, libexec/"amm" - bin.install_symlink libexec/"amm" - end - - test do - output = shell_output("#{bin}/amm -c 'print(\"hello world!\")'") - assert_equal "hello world!", output.lines.last - end -end diff --git a/Formula/ampl-mp.rb b/Formula/ampl-mp.rb deleted file mode 100644 index e0d429fd7b17f..0000000000000 --- a/Formula/ampl-mp.rb +++ /dev/null @@ -1,50 +0,0 @@ -class AmplMp < Formula - desc "The AMPL modeling language solver library" - homepage "https://www.ampl.com/" - url "https://github.com/ampl/mp/archive/3.1.0.tar.gz" - sha256 "587c1a88f4c8f57bef95b58a8586956145417c8039f59b1758365ccc5a309ae9" - revision 2 - - bottle do - cellar :any - sha256 "c16bb69deb8159e7d23af87e61de36aacba168ececc03ae0f2ba7b063758a3dc" => :mojave - sha256 "db013b18d1c1ac615514e2ba8f760cc8b91120218b205d843d536beb3888237e" => :high_sierra - sha256 "46d1cf71028cfaa76c3dc7fbc869dfdac4704f97c2963142df41afabe3bbc6f0" => :sierra - sha256 "87744fa4f67c6f1d35ed70f17f04d96e19b6ed3312bcea224677d89a6d1c89f4" => :el_capitan - sha256 "f9fd64bafa20eebd39425bf8331e0ca1962d47b1deeed589c347b75ced5e193d" => :yosemite - end - - depends_on "cmake" => :build - - resource "miniampl" do - url "https://github.com/dpo/miniampl/archive/v1.0.tar.gz" - sha256 "b836dbf1208426f4bd93d6d79d632c6f5619054279ac33453825e036a915c675" - end - - def install - system "cmake", ".", *std_cmake_args, "-DBUILD_SHARED_LIBS=True" - system "make", "all" - MachO::Tools.change_install_name("bin/libasl.dylib", "@rpath/libmp.3.dylib", - "#{opt_lib}/libmp.dylib") - system "make", "install" - - # Shared modules are installed in bin - mkdir_p libexec/"bin" - mv Dir[bin/"*.dll"], libexec/"bin" - - # Install missing header files, remove in > 3.1.0 - # https://github.com/ampl/mp/issues/110 - %w[errchk.h jac2dim.h obj_adj.h].each { |h| cp "src/asl/solvers/#{h}", include/"asl" } - - resource("miniampl").stage do - (pkgshare/"example").install "src/miniampl.c", Dir["examples/wb.*"] - end - end - - test do - system ENV.cc, pkgshare/"example/miniampl.c", "-I#{include}/asl", "-L#{lib}", "-lasl", "-lmp" - cp Dir[pkgshare/"example/wb.*"], testpath - output = shell_output("./a.out wb showname=1 showgrad=1") - assert_match "Objective name: objective", output - end -end diff --git a/Formula/amqp-cpp.rb b/Formula/amqp-cpp.rb deleted file mode 100644 index a04c456150eb4..0000000000000 --- a/Formula/amqp-cpp.rb +++ /dev/null @@ -1,43 +0,0 @@ -class AmqpCpp < Formula - desc "C++ library for communicating with a RabbitMQ message broker" - homepage "https://github.com/CopernicaMarketingSoftware/AMQP-CPP" - url "https://github.com/CopernicaMarketingSoftware/AMQP-CPP/archive/v4.0.1.tar.gz" - sha256 "b42247662aed721c914ba96fcc699f2958e57b45f53b8253047a175b4030da3c" - head "https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git" - - bottle do - cellar :any_skip_relocation - sha256 "1dc05699f0abb8e845c41834eda1400f2f2c680657e23900d18a099ba61542ff" => :mojave - sha256 "49705f3ab7b6ad81e9b7356ce9be58387151b35d083f91a36c1b793972b34972" => :high_sierra - sha256 "07295fc11cc21f05e618438174b6751fdfbe5a9f72b55dc8a4f03d0cfd71d083" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl" - - needs :cxx11 - - def install - ENV.cxx11 - - system "cmake", "-DBUILD_SHARED=ON", - "-DCMAKE_MACOSX_RPATH=1", - "-DAMQP-CPP_LINUX_TCP=ON", - *std_cmake_args - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-o", - "test", "-lc++", "-lamqpcpp" - system "./test" - end -end diff --git a/Formula/amtk.rb b/Formula/amtk.rb deleted file mode 100644 index 30220735f5585..0000000000000 --- a/Formula/amtk.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Amtk < Formula - desc "Actions, Menus and Toolbars Kit for GNOME" - homepage "https://wiki.gnome.org/Projects/Amtk" - url "https://download.gnome.org/sources/amtk/5.0/amtk-5.0.0.tar.xz" - sha256 "12a996978a30b7b69a810ac0c5656d5cf2f58d9787b98a0c028ff1b64e8f31ff" - - bottle do - sha256 "62f05f5fc282e1f9ac7cb6fef99eafdc0680741de535be52590bdfc71c432d8c" => :mojave - sha256 "eec94f844c2786f6e9a5f5bb5ebd1b179e04432b4166dbdfd136451a4164201f" => :high_sierra - sha256 "304f48b54a08facfd5d96dd3ff1b82fcb189a9310342a9a3b721f8cb0160a29e" => :sierra - sha256 "36f23f1e7336d58d01a9b3bd0a27565b08437d503500fd1d35bab61c31ae7ca4" => :el_capitan - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - amtk_init(); - return 0; - } - EOS - ENV.libxml2 - atk = Formula["atk"] - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gtkx3 = Formula["gtk+3"] - harfbuzz = Formula["harfbuzz"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pcre = Formula["pcre"] - pixman = Formula["pixman"] - flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split - flags += %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/gio-unix-2.0/ - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/amtk-5 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pcre.opt_include} - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gtkx3.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lamtk-5.0 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgtk-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/amtterm.rb b/Formula/amtterm.rb deleted file mode 100644 index 950f96a67bc3e..0000000000000 --- a/Formula/amtterm.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Amtterm < Formula - desc "Serial-over-LAN (sol) client for Intel AMT" - homepage "https://www.kraxel.org/blog/linux/amtterm/" - url "https://www.kraxel.org/releases/amtterm/amtterm-1.6.tar.gz" - sha256 "1242cea467827aa1e2e91b41846229ca0a5b3f3e09260b0df9d78dc875075590" - head "https://www.kraxel.org/cgit/amtterm", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "f8ed67be384a24abd8114f058092b923e101a2991f32f712d437c6a292b40a12" => :mojave - sha256 "eef6949767ce3e19a88f0eb4b146b1444ea39541ab7a075311a8bf11a327f781" => :high_sierra - sha256 "256736b4dd1d0b427bdb7ca2f9931cc1c403ffe1e43695920160f4f3ffabfe88" => :sierra - sha256 "4035d9bcb4f6785255a5ea3df1dcc309dbf69441b69dde15b1936e8522fc8e95" => :el_capitan - sha256 "387897642ba8bcb6daff01adae021264eaf9deea1f264e210e9592b6bc5cc44a" => :yosemite - end - - resource "SOAP::Lite" do - url "https://cpan.metacpan.org/authors/id/P/PH/PHRED/SOAP-Lite-1.11.tar.gz" - sha256 "e4dee589ef7d66314b3dc956569b2541e0b917e834974e078c256571b6011efe" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec+"lib/perl5" - - resource("SOAP::Lite").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - system "make", "prefix=#{prefix}", "install" - bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - system "#{bin}/amtterm", "-h" - end -end diff --git a/Formula/analog.rb b/Formula/analog.rb deleted file mode 100644 index a1f2a31e9102f..0000000000000 --- a/Formula/analog.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Analog < Formula - desc "Logfile analyzer" - # Last known good original homepage: https://web.archive.org/web/20140822104703/analog.cx/ - homepage "https://tracker.debian.org/pkg/analog" - url "https://deb.debian.org/debian/pool/main/a/analog/analog_6.0.orig.tar.gz" - sha256 "31c0e2bedd0968f9d4657db233b20427d8c497be98194daf19d6f859d7f6fcca" - revision 1 - - bottle do - rebuild 2 - sha256 "87337ab3f0049004b3b6e5bdcdb70c07f4a4cd457a917b7ec99e48650e3d560d" => :mojave - sha256 "d6cf3bcc19b376b693cc27ccd0ebeafb80a05c783405a13ed0d24abd07368cb2" => :high_sierra - sha256 "cb8cb25d3050dc3a08445987739c43b5fd7dad7a798342fb7538c016930a9978" => :sierra - sha256 "097f11e7f53078e6b248e38fc326cded49b08cdbe75ab61e20ab7b2a6e770256" => :el_capitan - sha256 "f2f29ea2dcbb9e0576c72f009d8814b0c7f84efd49d6f005085c876c85fd29b9" => :yosemite - sha256 "c9ca1f30d5b71b7653ecbbdb4ad8d9e81e41b2e33a9dc2c8e0a92af7cd48007d" => :mavericks - end - - depends_on "gd" - depends_on "jpeg" - depends_on "libpng" - - def install - system "make", "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "DEFS='-DLANGDIR=\"#{pkgshare}/lang/\"' -DHAVE_ZLIB", - "LIBS=-lz", - "OS=OSX" - - bin.install "analog" - pkgshare.install "examples", "how-to", "images", "lang" - pkgshare.install "analog.cfg" => "analog.cfg-dist" - (pkgshare/"examples").install "logfile.log" - man1.install "analog.man" => "analog.1" - end - - test do - output = pipe_output("#{bin}/analog #{pkgshare}/examples/logfile.log") - assert_match /(United Kingdom)/, output - end -end diff --git a/Formula/angband.rb b/Formula/angband.rb deleted file mode 100644 index 643d9eac6e9fe..0000000000000 --- a/Formula/angband.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Angband < Formula - desc "Dungeon exploration game" - homepage "https://rephial.org/" - url "https://rephial.org/downloads/4.1/angband-4.1.3.tar.gz" - sha256 "9402c4f8da691edbd4567a948c5663e1066bee3fcb4a62fbcf86b5454918406f" - head "https://github.com/angband/angband.git" - - bottle do - sha256 "9f122623c5ef12aecc045f865527bbb85100aa192beab072ea5952574a8377d8" => :mojave - sha256 "5659320a3de2e2f84b8dbbb385802ac18e7e80ad53c7aa6d0ae44d5ccbac6faa" => :high_sierra - sha256 "b212186bf04d009ac2c6a16bbceda9cdad23fa7eb9b61f4567ff3971b8de6873" => :sierra - sha256 "48e336d2c27873aa53c976460346f7523f0b12dbf1939e89c428af4ee95dfa73" => :el_capitan - end - - option "with-cocoa", "Install Cocoa app" - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - ENV["NCURSES_CONFIG"] = "#{MacOS.sdk_path}/usr/bin/ncurses5.4-config" - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--bindir=#{bin}", - "--libdir=#{libexec}", - "--enable-curses", - "--disable-ncursestest", - "--disable-sdltest", - "--disable-x11", - "--with-ncurses-prefix=#{MacOS.sdk_path}/usr" - system "make" - system "make", "install" - - if build.with? "cocoa" - cd "src" do - system "make", "-f", "Makefile.osx" - end - prefix.install "Angband.app" - end - end - - test do - system bin/"angband", "--help" - end -end diff --git a/Formula/angle-grinder.rb b/Formula/angle-grinder.rb deleted file mode 100644 index 3ed23faf88946..0000000000000 --- a/Formula/angle-grinder.rb +++ /dev/null @@ -1,25 +0,0 @@ -class AngleGrinder < Formula - desc "Slice and dice log files on the command-line" - homepage "https://github.com/rcoh/angle-grinder" - url "https://github.com/rcoh/angle-grinder/archive/v0.8.0.tar.gz" - sha256 "d90d96075db1a84863eb56e0a3061bbf8928ed795324b2b5373e4dbfa7043eac" - - bottle do - cellar :any_skip_relocation - sha256 "2490b6ba39c056bd6a819b3eccaf9f6193c05f7a2a493136d7dd930cfa3fa89c" => :mojave - sha256 "2a209c1c0c71e06955acdd3a8d5f3ff37e3d433dba3d018504759049f3fd1eee" => :high_sierra - sha256 "b654fa835ba288ab1d6153ef133e264258b7307fe056423a11c1ad9909e02b81" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - (testpath/"logs.txt").write("{\"key\": 5}") - output = shell_output("#{bin}/agrind --file logs.txt '* | json'") - assert_match "[key=5]", output - end -end diff --git a/Formula/angular-cli.rb b/Formula/angular-cli.rb deleted file mode 100644 index cd37516d51e01..0000000000000 --- a/Formula/angular-cli.rb +++ /dev/null @@ -1,26 +0,0 @@ -require "language/node" - -class AngularCli < Formula - desc "CLI tool for Angular" - homepage "https://cli.angular.io/" - url "https://registry.npmjs.org/@angular/cli/-/cli-7.1.4.tgz" - sha256 "5ee2a304349236c567069810e030454298d2f3c5d2dd18f5bd91c149d2c16c43" - - bottle do - sha256 "76eac3dac06a6e78e26d13c4c06d9d7395f7ffe4917bf0184fc4eefb98edad4c" => :mojave - sha256 "7479d505a262985b151ac8568293b06a908fe3286bc724d30d32856d8b5a6201" => :high_sierra - sha256 "eb740bf7b8090a5caa99357c48bb33cda73d842e889b0ff7724452ecb6c64bb5" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - system bin/"ng", "new", "angular-homebrew-test", "--skip-install" - assert_predicate testpath/"angular-homebrew-test/package.json", :exist?, "Project was not created" - end -end diff --git a/Formula/anjuta.rb b/Formula/anjuta.rb deleted file mode 100644 index 2c69b312cc4d7..0000000000000 --- a/Formula/anjuta.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Anjuta < Formula - desc "GNOME Integrated Development Environment" - homepage "http://anjuta.org" - url "https://download.gnome.org/sources/anjuta/3.28/anjuta-3.28.0.tar.xz" - sha256 "b087b0a5857952d0edd24dae458616eb166a3257bc647d5279a9e71495544779" - revision 4 - - bottle do - sha256 "b161145bbb89ab51466f2a82f0e44d3b9050ac4bef2e72b1490bc5111bb329ae" => :mojave - sha256 "847cab22d1e101f20e5dc1f02041a6ec9570a18258ebcffb4afc6c431310f028" => :high_sierra - sha256 "1c49cb3084e1b742802fbbfde8b604b2477700cb220bd8d42cfb3b2e04f07a62" => :sierra - end - - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "autogen" - depends_on "gdl" - depends_on "gnome-themes-standard" - depends_on "gnutls" - depends_on "gtksourceview3" - depends_on "hicolor-icon-theme" - depends_on "libgda" - depends_on "libxml2" - depends_on "python" - depends_on "shared-mime-info" - depends_on "vala" - depends_on "vte3" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-schemas-compile" - - xy = Language::Python.major_minor_version "python3" - ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python#{xy}/site-packages" - system "make", "install" - end - - def post_install - hshare = HOMEBREW_PREFIX/"share" - - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", hshare/"glib-2.0/schemas" - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", hshare/"icons/hicolor" - # HighContrast is provided by gnome-themes-standard - if File.file?("#{hshare}/icons/HighContrast/.icon-theme.cache") - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", hshare/"icons/HighContrast" - end - system "#{Formula["shared-mime-info"].opt_bin}/update-mime-database", hshare/"mime" - end - - test do - system "#{bin}/anjuta", "--version" - end -end diff --git a/Formula/annie.rb b/Formula/annie.rb deleted file mode 100644 index 9d5a960f0c2e0..0000000000000 --- a/Formula/annie.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Annie < Formula - desc "Fast, simple and clean video downloader" - homepage "https://github.com/iawia002/annie" - url "https://github.com/iawia002/annie/archive/0.9.0.tar.gz" - sha256 "f455fba01bf31d99326c015c54807f41379eeab61d3d79e0487d253b0ecbb884" - - bottle do - cellar :any_skip_relocation - sha256 "08430620b0134fe90414529f481cefbf5ecb607126e0120722f648a49e798ed1" => :mojave - sha256 "fe01b8283c50f3e5198aa3f185eac10ae2fe668a358ec1e01c0016d6d0d89aba" => :high_sierra - sha256 "5a21d5922090baea34ba726162e4db7bc3fb9d35cc4386baa1fda5f3d9340924" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/iawia002/annie").install buildpath.children - cd "src/github.com/iawia002/annie" do - system "go", "build", "-o", bin/"annie" - prefix.install_metafiles - end - end - - test do - system bin/"annie", "-i", "https://www.bilibili.com/video/av20203945" - end -end diff --git a/Formula/ansible-cmdb.rb b/Formula/ansible-cmdb.rb deleted file mode 100644 index 9889279707715..0000000000000 --- a/Formula/ansible-cmdb.rb +++ /dev/null @@ -1,21 +0,0 @@ -class AnsibleCmdb < Formula - desc "Generates static HTML overview page from Ansible facts" - homepage "https://github.com/fboender/ansible-cmdb" - url "https://github.com/fboender/ansible-cmdb/releases/download/1.30/ansible-cmdb-1.30.tar.gz" - sha256 "a52c450abea8fa7d162445386e40e554db763e34695b50c64c43e98d594539f6" - - bottle :unneeded - - depends_on "libyaml" - - def install - prefix.install_metafiles - man1.install "ansible-cmdb.man.1" => "ansible-cmdb.1" - libexec.install Dir["*"] - ["Makefile"] - bin.write_exec_script libexec/"ansible-cmdb" - end - - test do - system bin/"ansible-cmdb", "-dt", "html_fancy", "." - end -end diff --git a/Formula/ansible-lint.rb b/Formula/ansible-lint.rb deleted file mode 100644 index 4a969605beb0c..0000000000000 --- a/Formula/ansible-lint.rb +++ /dev/null @@ -1,113 +0,0 @@ -class AnsibleLint < Formula - include Language::Python::Virtualenv - - desc "Checks ansible playbooks for practices and behaviour" - homepage "https://github.com/willthames/ansible-lint/" - url "https://files.pythonhosted.org/packages/ac/37/5680eb8e4325120457bf177d7c3fe81a29eeeeb37f8fe0fc3131cd9ff721/ansible-lint-3.4.23.tar.gz" - sha256 "7686dad54aab9281562a5788415af1488b9af8a5acc99c042ecb9959b6ab7a57" - - bottle do - cellar :any - rebuild 1 - sha256 "411202c6284aafa6daecf6a368dbddcf0060c61ddf7b23c5c5f5ceb48382db1d" => :mojave - sha256 "5da7c7a3a06275e07a093d127ede7152f75fd1e04111faf7af3cedeec622e484" => :high_sierra - sha256 "42aa37985dface62e4146dcace6ab3ded1c9cc87c6a2d1dab4635fede9b509ba" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "python" - - resource "ansible" do - url "https://files.pythonhosted.org/packages/93/53/925881db1049134679908698115752ad0b0fe95c82b3055a632476cd3687/ansible-2.5.5.tar.gz" - sha256 "d7e5aae60c0e76c824bf8a410fe247b5c4afcfaee272f6283b4f996d237e365a" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz" - sha256 "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/29/65/83181630befb17cd1370a6abb9a87957947a43c2332216e5975353f61d64/paramiko-2.4.1.tar.gz" - sha256 "33e36775a6c71790ba7692a73f948b329cf9295a72b0102144b031114bd2a4f3" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/0d/33/3466a3210321a02040e3ab2cd1ffc6f44664301a5d650a7e44be1dc341f2/pyasn1-0.4.3.tar.gz" - sha256 "fb81622d8f3509f0026b0683fe90fea27be7284d3826a5f2edf97f69151ab0fc" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b261f/PyNaCl-1.2.1.tar.gz" - sha256 "e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" - (testpath/"playbook.yml").write <<~EOS - --- - - hosts: all - gather_facts: False - tasks: - - name: ping - ping: - EOS - system bin/"ansible-lint", testpath/"playbook.yml" - end -end diff --git a/Formula/ansible.rb b/Formula/ansible.rb deleted file mode 100644 index 5e5949a7a686c..0000000000000 --- a/Formula/ansible.rb +++ /dev/null @@ -1,564 +0,0 @@ -class Ansible < Formula - include Language::Python::Virtualenv - - desc "Automate deployment, configuration, and upgrading" - homepage "https://www.ansible.com/" - url "https://releases.ansible.com/ansible/ansible-2.7.5.tar.gz" - sha256 "aaf9e1974bd12840ca055ac156f37601c08d73d726a3a6b98a2fe759a57051bb" - head "https://github.com/ansible/ansible.git", :branch => "devel" - - bottle do - cellar :any - sha256 "861921d1b648ddecd14ffc65564f0d50e37bb5f82d74cbb9629ff2f9a48f55e0" => :mojave - sha256 "a7cf6719982444d2dd1987530d9eb94b3c2ac151aca14f236e664c59eda881c2" => :high_sierra - sha256 "821ce76f6f847ca0a021cebcf78deae8e4304f0adba2cb38d70610b205ba9f54" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "python" - - # Collect requirements from: - # ansible - # docker-py - # python-neutronclient (OpenStack) - # shade (OpenStack) - # pywinrm (Windows) - # kerberos (Windows) - # xmltodict (Windows) - # boto (AWS) - # boto3 (AWS) - # botocore (AWS) - # apache-libcloud (Google GCE) - # python-keyczar (Accelerated Mode) - # passlib (htpasswd core module) - # zabbix-api (Zabbix extras module) - # junos-eznc (Juniper device support) - # jxmlease (Juniper device support) - # dnspython (DNS Lookup - dig) - # pysphere (VMware vSphere support) - # python-consul (Consul support) - - ### setup_requires dependencies - resource "pbr" do - url "https://files.pythonhosted.org/packages/33/07/6e68a96ff240a0e7bb1f6e21093532386a98a82d56512e1e3da6d125f7aa/pbr-5.1.1.tar.gz" - sha256 "f59d71442f9ece3dffc17bc36575768e1ee9967756e6b6535f0ee1f0054c3d68" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/cd/71/ae99fc3df1b1c5267d37ef2c51b7d79c44ba8a5e37b48e3ca93b4d74d98b/pytz-2018.7.tar.gz" - sha256 "31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca" - end - ### end - - ### extras for requests[security] - resource "cryptography" do - url "https://files.pythonhosted.org/packages/f3/39/d3904df7c56f8654691c4ae1bdb270c1c9220d6da79bd3b1fbad91afd0e1/cryptography-2.4.2.tar.gz" - sha256 "05a6052c6a9f17ff78ba78f8e6eb1d777d25db3b763343a1ae89a7a8670386dd" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - ### end - - # The rest of this list should always be sorted by: - # pip install homebrew-pypi-poet && poet_lint $(brew formula ansible) - resource "Babel" do - url "https://files.pythonhosted.org/packages/be/cc/9c981b249a455fa0c76338966325fc70b7265521bad641bf2932f77712f4/Babel-2.6.0.tar.gz" - sha256 "8cba50f48c529ca3fa18cf81fa9403be176d374ac4d60738b839122dfaaa3d23" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/ac/7e/1b4c2e05809a4414ebce0892fe1e32c14ace86ca7d50c70f00979ca9b3a3/MarkupSafe-1.1.0.tar.gz" - sha256 "4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3" - end - - resource "PrettyTable" do - url "https://files.pythonhosted.org/packages/ef/30/4b0746848746ed5941f052479e7c23d2b56d174b82f4fd34a25e389831f5/prettytable-0.7.2.tar.bz2" - sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "apache-libcloud" do - url "https://files.pythonhosted.org/packages/b9/3e/adfe316292bd2f5ff2556ea09887515c09974483c3028ae39563734e145b/apache-libcloud-2.4.0.tar.gz" - sha256 "125c410996b84464b426922f1398a317869f27173a6461e32f3b1dfe671d5235" - end - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/76/21/2dc61178a2038a5cb35d14b61467c6ac632791ed05131dda72c20e7b9e23/backports.ssl_match_hostname-3.5.0.1.tar.gz" - sha256 "502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz" - sha256 "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d" - end - - resource "boto" do - url "https://files.pythonhosted.org/packages/c8/af/54a920ff4255664f5d238b5aebd8eedf7a07c7a5e71e27afcfe840b82f51/boto-2.49.0.tar.gz" - sha256 "ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/8d/93/8395000623748648009b0b40a980b68deb72446b01598e1dbbe64b2a5ee1/boto3-1.9.59.tar.gz" - sha256 "1bb0505de52201ed2f3bafe3b4b1539971a4b08ff048b9d804f6e04f017701fb" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/f5/1a/b50e770e7aadee4cf259782e4e7460d0ebe2613b5bacc0c1a8f4379d7766/botocore-1.12.59.tar.gz" - sha256 "bcc4ae773091ed632eaf4a6d5bc46c6409659ce138158ec11904a931b21bd8f8" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cliff" do - url "https://files.pythonhosted.org/packages/90/2a/232a69a1f1fe3bdf9a05fd4ec6072c44b63849771d10b6f21a6be701c943/cliff-2.14.0.tar.gz" - sha256 "21a24dfee9f4e58c397e725bb1568e031d75a8925def92e4d3def2b755f816bc" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/21/80/a93427ed96b700d08200520fe318438ae6c257103941cd18ca1a8325a49a/cmd2-0.9.6.tar.gz" - sha256 "5c4d92c089d014dfb750a9d05cefd231e2dca437cc25edf535de7a63cdb9e908" - end - - resource "contextlib2" do - url "https://files.pythonhosted.org/packages/6e/db/41233498c210b03ab8b072c8ee49b1cd63b3b0c76f8ea0a0e5d02df06898/contextlib2-0.5.5.tar.gz" - sha256 "509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48" - end - - resource "debtcollector" do - url "https://files.pythonhosted.org/packages/56/ea/e8867c97ae9650ecf67edf66ed844c89b3b0a7a54c9ea00b23d889195ec6/debtcollector-1.20.0.tar.gz" - sha256 "f48639881e0dd492e3576fd714e2a4e422492bb586b9f90affe0f093d7a09ac8" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz" - sha256 "c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c" - end - - resource "deprecation" do - url "https://files.pythonhosted.org/packages/cd/35/ab3995718c7b12d6a5e69f40540fe1df0b505cca5ee6af169d23ab9d0b00/deprecation-2.0.6.tar.gz" - sha256 "68071e5ae7cd7e9da6c7dffd750922be4825c7c3a6780d29314076009cc39c35" - end - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/e4/96/a598fa35f8a625bc39fed50cdbe3fd8a52ef215ef8475c17cabade6656cb/dnspython-1.15.0.zip" - sha256 "40f563e1f7a7b80dc5a4e76ad75c23da53d62f1e15e6e517293b04e1f84ead7c" - end - - resource "docker-py" do - url "https://files.pythonhosted.org/packages/fa/2d/906afc44a833901fc6fed1a89c228e5c88fbfc6bd2f3d2f0497fdfb9c525/docker-py-1.10.6.tar.gz" - sha256 "4c2a75875764d38d67f87bc7d03f7443a3895704efc57962bdf6500b8d4bc415" - end - - resource "docker-pycreds" do - url "https://files.pythonhosted.org/packages/c5/e6/d1f6c00b7221e2d7c4b470132c931325c8b22c51ca62417e300f5ce16009/docker-pycreds-0.4.0.tar.gz" - sha256 "6ce3270bcaf404cc4c3e27e4b6c70d3521deae82fb508767870fdbf772d584d4" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/73/bf/0cbed594e4f0f9360bfb98e7276131bf32e1af1d15e6c11a9dd8bd93a12f/dogpile.cache-0.6.8.tar.gz" - sha256 "e2fbe5d95e6df3fcfff2b666c69f3c06a4a3f77296142ae2bca523a176f88fa0" - end - - resource "funcsigs" do - url "https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz" - sha256 "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/18/80/57284ac01ab6556efe7ce66e5833a890cf26ec256e49fb6d68091f1b9930/iso-8601-0.3.0.tar.gz" - sha256 "1b9f74df591812732b69a1cfba5196e176138bf5b0b49a920af5804924cc27e0" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/9a/7d/bcf203d81939420e1aaf7478a3efce1efb8ccb4d047a33cb85d7f96d775e/jsonpatch-1.23.tar.gz" - sha256 "49f29cab70e9068db3b1dc6b656cbe2ee4edf7dfe9bf5a0055f17a4b6804a4b9" - end - - resource "jsonpointer" do - url "https://files.pythonhosted.org/packages/52/e7/246d9ef2366d430f0ce7bdc494ea2df8b49d7a2a41ba51f5655f68cfe85f/jsonpointer-2.0.tar.gz" - sha256 "c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362" - end - - resource "junos-eznc" do - url "https://files.pythonhosted.org/packages/c2/0a/b61333c5de5bf9a12cbee528bca94ccc53b2c8a75d2e828cbfa8c51d0188/junos-eznc-2.2.0.tar.gz" - sha256 "d97d8babf650abca25a096825aa6d88573d340481a0b0793afcdac4a7bee09d3" - end - - resource "jxmlease" do - url "https://files.pythonhosted.org/packages/80/b3/a1ffc5ea763c84780a9acfaa4f69a98f6c974eaf297e20d9d3648ef7d95b/jxmlease-1.0.1.tar.gz" - sha256 "fb04cfd54d8d7e4cc533108750047e9ccf43139c3c0220f8a082274b19564e98" - end - - resource "kerberos" do - url "https://files.pythonhosted.org/packages/34/18/9c86fdfdb27e0f7437b7d5a9e22975dcc382637b2a68baac07843be512fc/kerberos-1.3.0.tar.gz" - sha256 "f039b7dd4746df56f6102097b3dc250fe0078be75130b9dc4211a85a3b1ec6a4" - end - - resource "keystoneauth1" do - url "https://files.pythonhosted.org/packages/3b/c1/ef5904e9d1961b45c2a2cc0bfd9ac3aaeabfab8580683009fb9a94b65b78/keystoneauth1-3.11.1.tar.gz" - sha256 "c1adb59c82c989b7c6293231da0fd46d30adfe2b7d9e35f327e3bfe7a0f99656" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/4b/20/ddf5eb3bd5c57582d2b4652b4bbcf8da301bdfe5d805cb94e805f4d7464d/lxml-4.2.5.tar.gz" - sha256 "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f" - end - - resource "monotonic" do - url "https://files.pythonhosted.org/packages/19/c1/27f722aaaaf98786a1b338b78cf60960d9fe4849825b071f4e300da29589/monotonic-1.5.tar.gz" - sha256 "23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0" - end - - resource "msgpack" do - url "https://files.pythonhosted.org/packages/3a/bb/dc3f9fc608a6c1c7a471c2bebc761d9c8dbb2f7179a4283a89b9451765b5/msgpack-0.6.0.tar.gz" - sha256 "64abc6bf3a2ac301702f5760f4e6e227d0fd4d84d9014ef9a40faa9d43365259" - end - - resource "munch" do - url "https://files.pythonhosted.org/packages/68/f4/260ec98ea840757a0da09e0ed8135333d59b8dfebe9752a365b04857660a/munch-2.3.2.tar.gz" - sha256 "6ae3d26b837feacf732fb8aa5b842130da1daf221f5af9f9d4b2a0a6414b0d51" - end - - resource "ncclient" do - url "https://files.pythonhosted.org/packages/dc/95/acc44c2ff966743fedd1ad991ecf2498f40fd434883c67138b60a6373d49/ncclient-0.6.3.tar.gz" - sha256 "3ab58ee0d71069cb5b0e2f29a4e605d1d8417bd10af45b73ee3e817fe389fadc" - end - - resource "netaddr" do - url "https://files.pythonhosted.org/packages/0c/13/7cbb180b52201c07c796243eeff4c256b053656da5cfe3916c3f5b57b3a0/netaddr-0.7.19.tar.gz" - sha256 "38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd" - end - - resource "netifaces" do - url "https://files.pythonhosted.org/packages/81/39/4e9a026265ba944ddf1fea176dbb29e0fe50c43717ba4fcf3646d099fe38/netifaces-0.10.7.tar.gz" - sha256 "bd590fcb75421537d4149825e1e63cca225fd47dad861710c46bd1cb329d8cbd" - end - - resource "ntlm-auth" do - url "https://files.pythonhosted.org/packages/b5/f4/9df9b6713cf3527453d18b2a4567d49893ca1a1c95a566a88baefcb9796e/ntlm-auth-1.2.0.tar.gz" - sha256 "7bc02a3fbdfee7275d3dc20fce8028ed8eb6d32364637f28be9e9ae9160c6d5c" - end - - resource "openstacksdk" do - url "https://files.pythonhosted.org/packages/d6/26/2f23705313677fc7ae41de283605af127b294d075357403fb05725ee6e70/openstacksdk-0.20.0.tar.gz" - sha256 "97ed925c86003bd6d01db2317023e8f2f1f05f9dd17b3dffaf7145a1f1234f2b" - end - - resource "os-client-config" do - url "https://files.pythonhosted.org/packages/80/bb/e7d5c7ae06ccbab1c9a3f8b9ea2a99d16981b66b5f2cad21f1b94a0eca0e/os-client-config-1.31.2.tar.gz" - sha256 "4e9de6be30d2314bfb40a723ee01fa630e9b6764e0e5680e7418acf1566d0e12" - end - - resource "os-service-types" do - url "https://files.pythonhosted.org/packages/ad/1b/7bc2b1f91e5e4c51c40fcbe6d4ebe068f8a96490a0e12f480f98940f4ba4/os-service-types-1.4.0.tar.gz" - sha256 "93a251556fb1994b15d1a2dbf2262d3ce34df81640de56ab78fe37f4bd5726e7" - end - - resource "osc-lib" do - url "https://files.pythonhosted.org/packages/8d/a8/b63a53baed828a3e46ff2d1ee5cb63f794e9e071f05e99229642edfc46a5/osc-lib-1.11.1.tar.gz" - sha256 "4b118f72757b84c8375e8af47bb59151337fbc50305a6c5b5307ad7442422af4" - end - - resource "oslo.config" do - url "https://files.pythonhosted.org/packages/b9/a0/402bd835656b6261df354daa16a814eaccf0221a512ceffec49504125783/oslo.config-6.7.0.tar.gz" - sha256 "5d57ae2efc4f61b6ae11d0074baa93e9ab5e13be77f899d24d280ce66b92208c" - end - - resource "oslo.context" do - url "https://files.pythonhosted.org/packages/4a/ef/068594a4ec32d028aff2385a145008a0d800e32010df0696c0f0e2e3d304/oslo.context-2.22.0.tar.gz" - sha256 "e78734c71294101f87f186e1e1188d0524885b24d1ea18662c13647e08ceca14" - end - - resource "oslo.i18n" do - url "https://files.pythonhosted.org/packages/da/4a/58911ccb11029e2b43e6d2c375990d8de6305955ced8810a26749596a425/oslo.i18n-3.23.0.tar.gz" - sha256 "510c48c5ab5fc055cb9ec8c1ebd934ad37ba67a50a7af475f73fca3839295d3f" - end - - resource "oslo.log" do - url "https://files.pythonhosted.org/packages/98/9c/73214e5858523dfa89d41b6746e3b2bab32ce58df8cf8266ca3ee63107e1/oslo.log-3.42.0.tar.gz" - sha256 "e7bb326210f04829e6c3b91dac674982cd9a5adf2147c673387cc4a898a8376f" - end - - resource "oslo.serialization" do - url "https://files.pythonhosted.org/packages/ec/ef/e08efaec5c3bc155f6e6cfc1703bb6e6f95171332436a24a6ee6d15ba01c/oslo.serialization-2.28.1.tar.gz" - sha256 "fd1febd9abe2042052846a39b7b8ad0f878cc5365d4484d241f0b0711601b8ee" - end - - resource "oslo.utils" do - url "https://files.pythonhosted.org/packages/a0/0f/2eeaaf5ab1c1179b93e7658e3a3e4c3ea77d6308e6a7dd7dae6e85119b87/oslo.utils-3.38.0.tar.gz" - sha256 "3fd6d40a65a2d5b56d644ca8da585d19b1afe5245ef84542e5983d0e75bafd04" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/cf/50/1f10d2626df0aa97ce6b62cf6ebe14f605f4e101234f7748b8da4138a8ed/packaging-18.0.tar.gz" - sha256 "0886227f54515e592aaa2e5a553332c73962917f2831f1b0f9b9f4380a4b9807" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/a4/57/86681372e7a8d642718cadeef38ead1c24c4a1af21ae852642bf974e37c7/paramiko-2.4.2.tar.gz" - sha256 "a8975a7df3560c9f1e2b43dc54ebd40fd00a7017392ca5445ce7df409f900fcb" - end - - resource "passlib" do - url "https://files.pythonhosted.org/packages/25/4b/6fbfc66aabb3017cd8c3bd97b37f769d7503ead2899bf76e570eb91270de/passlib-1.7.1.tar.gz" - sha256 "3d948f64138c25633613f303bcc471126eae67c04d5e3f6b7b8ce6242f8653e0" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/10/46/059775dc8e50f722d205452bced4b3cc965d27e8c3389156acd3b1123ae3/pyasn1-0.4.4.tar.gz" - sha256 "f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/d0/09/3e6a5eeb6e04467b737d55f8bba15247ac0876f98fae659e58cd744430c6/pyparsing-2.3.0.tar.gz" - sha256 "f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/2d/0f/4eda562dffd085945d57c2d9a5da745cfb5228c02bc90f2c74bbac746243/pyperclip-1.7.0.tar.gz" - sha256 "979325468ccf682104d5dcaf753f869868100631301d3e72f47babdea5700d1c" - end - - resource "pyserial" do - url "https://files.pythonhosted.org/packages/cc/74/11b04703ec416717b247d789103277269d567db575d2fd88f25d9767fe3d/pyserial-3.4.tar.gz" - sha256 "6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627" - end - - resource "pysphere" do - url "https://files.pythonhosted.org/packages/a3/53/582ad19aae059b777f1105e6c7f6fa96f2ab6e7f018d94497fbe1518548d/pysphere-0.1.7.zip" - sha256 "cef3cb3a6836f1cf092caf4613123d084f36b0e96fa48a27708c0e868df8a1ea" - end - - resource "python-consul" do - url "https://files.pythonhosted.org/packages/7f/06/c12ff73cb1059c453603ba5378521e079c3f0ab0f0660c410627daca64b7/python-consul-1.1.0.tar.gz" - sha256 "168f1fa53948047effe4f14d53fc1dab50192e2a2cf7855703f126f469ea11f4" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/0e/01/68747933e8d12263d41ce08119620d9a7e5eb72c876a3442257f74490da0/python-dateutil-2.7.5.tar.gz" - sha256 "88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02" - end - - resource "python-keyczar" do - url "https://files.pythonhosted.org/packages/c8/14/3ffb68671fef927fa5b60f21c43a04a4a007acbe939a26ba08b197fea6b3/python-keyczar-0.716.tar.gz" - sha256 "f9b614112dc8248af3d03b989da4aeca70e747d32fe7e6fce9512945365e3f83" - end - - resource "python-keystoneclient" do - url "https://files.pythonhosted.org/packages/4a/d7/7ee2efca36b975da19b5e2ae76a6dec38a38f8fb5cc92145aa9c58903312/python-keystoneclient-3.18.0.tar.gz" - sha256 "2825f3bf20f8b4f6b43bdf393462de3d4b116135b02bb4059960c7e9caf638d3" - end - - resource "python-neutronclient" do - url "https://files.pythonhosted.org/packages/47/af/b2f1f26df007078e23a651a1af4fb2100d075ccb24fefe70028c9c0f23c7/python-neutronclient-6.11.0.tar.gz" - sha256 "eacc4626cd1f59390977e89aad9a3a7600dc45e916020e0b0946912b7c174bc4" - end - - resource "pywinrm" do - url "https://files.pythonhosted.org/packages/5b/8b/eae19a3574256c834213838310364838a869d128538609da2099cb027c25/pywinrm-0.3.0.tar.gz" - sha256 "799fc3e33fec8684443adf5778860388289102ea4fa1458f1bf307d167855573" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/40/35/298c36d839547b50822985a2cf0611b3b978a5ab7a5af5562b8ebe3e1369/requests-2.20.1.tar.gz" - sha256 "ea881206e59f41dbd0bd445437d792e43906703fff75ca8ff43ccdb11f33f263" - end - - resource "requests_ntlm" do - url "https://files.pythonhosted.org/packages/3e/02/6b31dfc8334caeea446a2ac3aea5b8e197710e0b8ad3c3035f7c79e792a8/requests_ntlm-1.1.0.tar.gz" - sha256 "9189c92e8c61ae91402a64b972c4802b2457ce6a799d658256ebf084d5c7eb71" - end - - resource "requestsexceptions" do - url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" - sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" - end - - resource "rfc3986" do - url "https://files.pythonhosted.org/packages/e1/f0/d1571e8891e8e93ebb0fc61fb09c04acf0088bab3fa1cb02eb577e7bc135/rfc3986-1.2.0.tar.gz" - sha256 "bc3ae4b7cd88a99eff2d3900fcb858d44562fd7f273fc07aeef568b9bb6fc4e1" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/9a/66/c6a5ae4dbbaf253bd662921b805e4972451a6d214d0dc9fb3300cb642320/s3transfer-0.1.13.tar.gz" - sha256 "90dc18e028989c609146e241ea153250be451e05ecc0c2832565231dacdf59c1" - end - - resource "scp" do - url "https://files.pythonhosted.org/packages/a6/7d/735579c8cd4f903cd3002be68581dfe8d48c7498b4e6e7a874065d2af1a5/scp-0.13.0.tar.gz" - sha256 "cfcc275c249ae59480f88fa55c4bd7795ce8b48d3a9b8fd635d82958084b4124" - end - - resource "shade" do - url "https://files.pythonhosted.org/packages/71/25/21c9a9765dd1321282693ce03bdab751a86b5ff04c7a9347a8671fecee72/shade-1.30.0.tar.gz" - sha256 "f774ddd3190d6e3a97aa55617d0b10d578e7c8b141104331e2de7f388aeca405" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/e3/24/c35fb1c1c315fc0fffe61ea00d3f88e85469004713dab488dee4f35b0aff/simplejson-3.16.0.tar.gz" - sha256 "b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/fd/e3/5bc7226601d6405b588efc9c9f22e3cb0ada577eb957cdcd0ae9093ab6d8/stevedore-1.30.0.tar.gz" - sha256 "b92bc7add1a53fb76c634a178978d113330aaf2006f9498d9e2414b31fbfc104" - end - - resource "subprocess32" do - url "https://files.pythonhosted.org/packages/be/2b/beeba583e9877e64db10b52a96915afc0feabf7144dcbf2a0d0ea68bf73d/subprocess32-3.5.3.tar.gz" - sha256 "6bc82992316eef3ccff319b5033809801c0c3372709c5f6985299c88ac7225c3" - end - - resource "unicodecsv" do - url "https://files.pythonhosted.org/packages/6f/a4/691ab63b17505a26096608cc309960b5a6bdf39e4ba1a793d5f9b1a53270/unicodecsv-0.14.1.tar.gz" - sha256 "018c08037d48649a0412063ff4eda26eaa81eff1546dbffa51fa5293276ff7fc" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/35/d4/14e446a82bc9172d088ebd81c0b02c5ca8481bfeecb13c9ef07998f9249b/websocket_client-0.54.0.tar.gz" - sha256 "e51562c91ddb8148e791f0155fdb01325d99bb52c4cdbb291aee7a3563fd0849" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/a0/47/66897906448185fcb77fc3c2b1bc20ed0ecca81a0f2f88eda3fc5a34fc3d/wrapt-1.10.11.tar.gz" - sha256 "d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/57/17/a6acddc5f5993ea6eaf792b2e6c3be55e3e11f3b85206c818572585f61e1/xmltodict-0.11.0.tar.gz" - sha256 "8f8d7d40aa28d83f4109a7e8aa86e67a4df202d9538be40c0cb1d70da527b0df" - end - - resource "zabbix-api" do - url "https://files.pythonhosted.org/packages/2a/f3/c261c6d7517acbb19bb76e9ff4721a8adda79be7e09218331603baeef145/zabbix-api-0.5.3.tar.gz" - sha256 "c64a82531d72230cc3c19684ee586d8d1cdb221f0562c1d88f7325db5abe63d4" - end - - def install - ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin" - - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - # https://github.com/Homebrew/homebrew-core/issues/7197 - ENV.prepend "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/ffi" - - virtualenv_install_with_resources - - # prettytable 0.7.2 has file permissions 600 for some files. - # We need to add read permissions in order to be able to use it as a - # different user than the one installing it. - # See: https://github.com/Homebrew/homebrew-core/issues/6975 - # Also: https://github.com/Homebrew/brew/pull/1709 - Pathname.glob(libexec/"lib/python*/site-packages/prettytable-0.7.2-py*.egg-info").each do |prettytable_path| - chmod_R("a+r", prettytable_path) - end - - man1.install Dir["docs/man/man1/*.1"] - end - - test do - ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" - (testpath/"playbook.yml").write <<~EOS - --- - - hosts: all - gather_facts: False - tasks: - - name: ping - ping: - EOS - (testpath/"hosts.ini").write "localhost ansible_connection=local\n" - system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" - - # Ensure requests[security] is activated - script = "import requests as r; r.get('https://mozilla-modern.badssl.com')" - system libexec/"bin/python3", "-c", script - end -end diff --git a/Formula/ansible@1.9.rb b/Formula/ansible@1.9.rb deleted file mode 100644 index 76a8b047e2735..0000000000000 --- a/Formula/ansible@1.9.rb +++ /dev/null @@ -1,571 +0,0 @@ -class AnsibleAT19 < Formula - desc "Automate deployment, configuration, and upgrading" - homepage "https://www.ansible.com/" - url "https://releases.ansible.com/ansible/ansible-1.9.6.tar.gz" - sha256 "50773781b1e76f2885bbeb2351a97cf1c6a29239d3e073da939a104e7e81ee5d" - revision 1 - - bottle do - cellar :any - rebuild 2 - sha256 "c40717022760a47f23abbb8b14d24870feeebdd0ad498e870a0608e4790d3778" => :mojave - sha256 "4aa3ddfdea9746060e685a1f19b67af567bc9d49a54b0b92071f88c4336a2998" => :high_sierra - sha256 "258006e587e914736e541de070d22c14017b704ec51ae4b3b34313945b492f3e" => :sierra - sha256 "e43f2279aa5e0ce3ceba08743ac4d375d7b1ebe20984b7446c435eb41c935e23" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "libyaml" - depends_on "openssl" - depends_on "python@2" # does not support Python 3 - - # - # ansible (core dependencies) - # - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz" - sha256 "bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz" - sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/source/p/paramiko/paramiko-1.15.2.tar.gz" - sha256 "4f56a671a3eecbb76e6143e6e4ca007d503a39aa79aa9e14ade667fa53fd6e55" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz" - sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8" - end - - # - # Required by the 'paramiko' core module - # https://github.com/paramiko/paramiko) - # - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz" - sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa" - end - - # - # Required by the 'uri' core module - # See https://docs.ansible.com/uri_module.html#requirements) - # - resource "httplib2" do - url "https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-0.9.2.tar.gz" - sha256 "c3aba1c9539711551f4d83e857b316b5134a1c4ddce98a875b7027be7dd6d988" - end - - # - # Resources required by docker-py, pyrax, and shade (see below). - # Install requests with [security] - # - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "ndg-httpsclient" do - url "https://files.pythonhosted.org/packages/source/n/ndg-httpsclient/ndg_httpsclient-0.4.0.tar.gz" - sha256 "e8c155fdebd9c4bcb0810b4ed01ae1987554b1ee034dd7532d7b8fdae38a6274" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.1.9.tar.gz" - sha256 "853cacd96d1f701ddd67aa03ecc05f51890135b7262e922710112f12a2ed2a7f" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/source/r/requests/requests-2.9.1.tar.gz" - sha256 "c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - # - # docker-py (for Docker support) - # - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/source/b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.4.0.2.tar.gz" - sha256 "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae" - end - - resource "docker-py" do - url "https://files.pythonhosted.org/packages/source/d/docker-py/docker-py-1.5.0.tar.gz" - sha256 "6924128fac46afef0de16ebdffc30a8c071246312260f289d895129f4e00f8d0" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/source/w/websocket-client/websocket_client-0.34.0.tar.gz" - sha256 "682a6241ca953499f06ca506f69aa3ea26f0ed2a41fe7982732cb8449ae92ddf" - end - - # - # pywinrm (for Windows support) - # - resource "isodate" do - url "https://files.pythonhosted.org/packages/source/i/isodate/isodate-0.5.1.tar.gz" - sha256 "b12aed31c0e834543497e24d609a41531a800d8304c39e6665c45ca023b012fb" - end - - resource "pywinrm" do - url "https://files.pythonhosted.org/packages/source/p/pywinrm/pywinrm-0.0.3.tar.gz" - sha256 "be3775890effcddfb1fca440b43bf08af165527a7b102d43518232bfc9c021bc" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/source/x/xmltodict/xmltodict-0.9.2.tar.gz" - sha256 "275d1e68c95cd7e3ee703ddc3ea7278e8281f761680d6bdd637bcd00a5c59901" - end - - # - # kerberos (for Windows support) - # - resource "kerberos" do - url "https://files.pythonhosted.org/packages/source/k/kerberos/kerberos-1.2.2.tar.gz" - sha256 "070ff6d9baf3752323283b1c8ed75e2edd0ec55337359185abf5bb0b617d2f5d" - end - - # - # boto (for AWS support) - # - resource "boto" do - url "https://files.pythonhosted.org/packages/source/b/boto/boto-2.38.0.tar.gz" - sha256 "d9083f91e21df850c813b38358dc83df16d7f253180a1344ecfedce24213ecf2" - end - - # - # pyrax (for Rackspace support) - # - resource "Babel" do - url "https://files.pythonhosted.org/packages/source/B/Babel/Babel-2.1.1.tar.gz" - sha256 "7fb6d50effe88a087feb2036cb972fd7a893bf338361516f1a55a820bf7b5248" - end - - resource "debtcollector" do - url "https://files.pythonhosted.org/packages/source/d/debtcollector/debtcollector-0.10.0.tar.gz" - sha256 "8cc22cf2223af7789692ef0b1cb5c0c3a00da7d6e34cbfce125a956cb4d2f21e" - end - - resource "funcsigs" do - url "https://files.pythonhosted.org/packages/source/f/funcsigs/funcsigs-0.4.tar.gz" - sha256 "d83ce6df0b0ea6618700fe1db353526391a8a3ada1b7aba52fed7a61da772033" - end - - resource "ip_associations_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/i/ip_associations_python_novaclient_ext/ip_associations_python_novaclient_ext-0.1.tar.gz" - sha256 "a709b8804364afbbab81470b57e8df3f3ea11dff843c6cb4590bbc130cea94f7" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/source/i/iso8601/iso8601-0.1.11.tar.gz" - sha256 "e8fb52f78880ae063336c94eb5b87b181e6a0cc33a6c008511bac9a6e980ef30" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/source/k/keyring/keyring-5.6.tar.gz" - sha256 "862e8c7ae689bd1e50bf5940c88317c3afad4b71d7c0e0748b273ef769c66adf" - end - - resource "mock" do - # NOTE: mock versions above 1.0.1 fail to install due to a broken setuptools version check. - url "https://files.pythonhosted.org/packages/source/m/mock/mock-1.0.1.tar.gz" - sha256 "b839dd2d9c117c701430c149956918a423a9863b48b09c90e30a6013e7d2f44f" - end - - resource "monotonic" do - url "https://files.pythonhosted.org/packages/source/m/monotonic/monotonic-0.4.tar.gz" - sha256 "852f656adbf623ee859def6ca2f5498f4cae3256f8320d5c50570ee8a0592ab6" - end - - resource "msgpack-python" do - url "https://files.pythonhosted.org/packages/source/m/msgpack-python/msgpack-python-0.4.6.tar.gz" - sha256 "bfcc581c9dbbf07cc2f951baf30c3249a57e20dcbd60f7e6ffc43ab3cc614794" - end - - resource "netaddr" do - url "https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-0.7.18.tar.gz" - sha256 "a1f5c9fcf75ac2579b9995c843dade33009543c04f218ff7c007b3c81695bd19" - end - - resource "netifaces" do - url "https://files.pythonhosted.org/packages/source/n/netifaces/netifaces-0.10.4.tar.gz" - sha256 "9656a169cb83da34d732b0eb72b39373d48774aee009a3d1272b7ea2ce109cde" - end - - resource "os_diskconfig_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/o/os_diskconfig_python_novaclient_ext/os_diskconfig_python_novaclient_ext-0.1.2.tar.gz" - sha256 "78076a7b05afb8842734329f306bd69e64af6af910a3bc973fcf023723b8d7fc" - end - - resource "os_networksv2_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/o/os_networksv2_python_novaclient_ext/os_networksv2_python_novaclient_ext-0.25.tar.gz" - sha256 "35ba71b027daf4c407d7a2fd94604d0437eea0c1de4d8d5d0f8ab69100834a0f" - end - - resource "os_virtual_interfacesv2_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/o/os_virtual_interfacesv2_python_novaclient_ext/os_virtual_interfacesv2_python_novaclient_ext-0.19.tar.gz" - sha256 "5171370e5cea447019cee5da22102b7eca4d4a7fb3f12875e2d7658d98462c0a" - end - - resource "oslo.config" do - url "https://files.pythonhosted.org/packages/source/o/oslo.config/oslo.config-2.6.0.tar.gz" - sha256 "5d5f1cba6c6175a4222d71ae9aac031054c79529b67cb5e43cb627e8837a9ee5" - end - - resource "oslo.i18n" do - url "https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-2.7.0.tar.gz" - sha256 "9f510fd251510ca670ef876783a1727f67fe7a27595d772057273d33e4664f86" - end - - resource "oslo.serialization" do - url "https://files.pythonhosted.org/packages/source/o/oslo.serialization/oslo.serialization-1.11.0.tar.gz" - sha256 "b9a5b8bd4583957476464016f1c4d3ca01a30a0125acb1cd0ddd830715c88e1f" - end - - resource "oslo.utils" do - url "https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-2.7.0.tar.gz" - sha256 "5afed9470494222bc6d90efddfc52223cfc84e03a3898775a7a7ee44a4e7e424" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/source/p/pytz/pytz-2015.7.tar.bz2" - sha256 "fbd26746772c24cb93c8b97cbdad5cb9e46c86bbdb1b9d8a743ee00e2fb1fc5d" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/source/p/pbr/pbr-1.8.1.tar.gz" - sha256 "e2127626a91e6c885db89668976db31020f0af2da728924b56480fc7ccf09649" - end - - resource "PrettyTable" do - url "https://files.pythonhosted.org/packages/source/P/PrettyTable/prettytable-0.7.2.tar.bz2" - sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36" - end - - resource "pyrax" do - url "https://files.pythonhosted.org/packages/source/p/pyrax/pyrax-1.9.5.tar.gz" - sha256 "59ac98ae0549beb1eb36cc1f4985d565f126adbfa596d7fa5aaccde5ef194c0e" - end - - resource "python-keystoneclient" do - url "https://files.pythonhosted.org/packages/source/p/python-keystoneclient/python-keystoneclient-1.8.1.tar.gz" - sha256 "4429b973fc45636d1f7117791d930391a432b4d0db76eafb75f918a8e6d68cf0" - end - - resource "python-novaclient" do - url "https://files.pythonhosted.org/packages/source/p/python-novaclient/python-novaclient-2.34.0.tar.gz" - sha256 "62c0d1996b2eb53707c3bef7a445a05a809d427c92a2030ed95b59f49031e527" - end - - resource "rackspace-auth-openstack" do - url "https://files.pythonhosted.org/packages/source/r/rackspace-auth-openstack/rackspace-auth-openstack-1.3.tar.gz" - sha256 "c4c069eeb1924ea492c50144d8a4f5f1eb0ece945e0c0d60157cabcadff651cd" - end - - resource "rackspace-novaclient" do - url "https://files.pythonhosted.org/packages/source/r/rackspace-novaclient/rackspace-novaclient-1.5.tar.gz" - sha256 "0fcde7e22594d9710c65e850d11898bd342fa83849dc8ef32c2a94117f7132b1" - end - - resource "rax_default_network_flags_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/r/rax_default_network_flags_python_novaclient_ext/rax_default_network_flags_python_novaclient_ext-0.3.2.tar.gz" - sha256 "bf18d534f6ab1ca1c82680a71d631babee285257c7d99321413a19d773790915" - end - - resource "rax_scheduled_images_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/r/rax_scheduled_images_python_novaclient_ext/rax_scheduled_images_python_novaclient_ext-0.3.1.tar.gz" - sha256 "f170cf97b20bdc8a1784cc0b85b70df5eb9b88c3230dab8e68e1863bf3937cdb" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/source/s/simplejson/simplejson-3.8.1.tar.gz" - sha256 "428ac8f3219c78fb04ce05895d5dff9bd813c05a9a7922c53dc879cd32a12493" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/source/s/stevedore/stevedore-1.9.0.tar.gz" - sha256 "cc19908840498ed5f7cb5cf59bbe47b41aa9d65821548e2b3c8a99a571cbec06" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/source/w/wrapt/wrapt-1.10.5.tar.gz" - sha256 "99cbb4e3a3ea964df0cb1437261fc1198616ec872e7b501622f3f7f92fcd0833" - end - - # - # python-keyczar (for Accelerated Mode support) - # - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.1.8.tar.gz" - sha256 "5d33be7ca0ec5997d76d29ea4c33b65c00c0231407fff975199d7f40530b8347" - end - - resource "python-keyczar" do - url "https://files.pythonhosted.org/packages/source/p/python-keyczar/python-keyczar-0.715.tar.gz" - sha256 "f43f9f15b0b719de94cab2754dcf78ef63b40ee2a12cea296e7af788b28501bb" - end - - # also required by the htpasswd core module - resource "passlib" do - url "https://files.pythonhosted.org/packages/source/p/passlib/passlib-1.6.5.tar.gz" - sha256 "a83d34f53dc9b17aa42c9a35c3fbcc5120f3fcb07f7f8721ec45e6a27be347fc" - end - - # - # shade (for OpenStack support) - # - resource "anyjson" do - url "https://files.pythonhosted.org/packages/source/a/anyjson/anyjson-0.3.3.tar.gz" - sha256 "37812d863c9ad3e35c0734c42e0bf0320ce8c3bed82cd20ad54cb34d158157ba" - end - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/source/a/appdirs/appdirs-1.4.0.tar.gz" - sha256 "8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5" - end - - resource "cliff" do - url "https://files.pythonhosted.org/packages/source/c/cliff/cliff-1.15.0.tar.gz" - sha256 "f5ba6fe0940547549947d5a24ca3354145a603d3a9ba054f209d20b66dc02be7" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-0.6.8.tar.gz" - sha256 "ac780d8c31fc107bf6b4edcbcea711de4ff776d59d89bb167f8819d2d83764a8" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/source/d/decorator/decorator-4.0.4.tar.gz" - sha256 "5ad0c10fad31648cffa15ee0640eee04bbb1b843a02de26ad3700740768cc3e1" - end - - resource "dogpile" do - url "https://files.pythonhosted.org/packages/source/d/dogpile/dogpile-0.2.2.tar.gz" - sha256 "bce7e7145054af20d4bef01c7b2fb4266fa88dca107ed246c395558a824e9bf0" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/source/d/dogpile.cache/dogpile.cache-0.5.7.tar.gz" - sha256 "dcf99b09ddf3d8216b1b4378100eb0235619612fb0e6300ba5d74f10962d0956" - end - - resource "dogpile.core" do - url "https://files.pythonhosted.org/packages/source/d/dogpile.core/dogpile.core-0.4.1.tar.gz" - sha256 "be652fb11a8eaf66f7e5c94d418d2eaa60a2fe81dae500f3743a863cc9dbed76" - end - - resource "functools32" do - url "https://files.pythonhosted.org/packages/source/f/functools32/functools32-3.2.3-2.tar.gz" - sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/source/f/futures/futures-3.0.3.tar.gz" - sha256 "2fe2342bb4fe8b8e217f0d21b5921cbe5408bf966d9f92025e707e881b198bed" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/source/i/idna/idna-2.0.tar.gz" - sha256 "16199aad938b290f5be1057c0e1efc6546229391c23cea61ca940c115f7d3d3b" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/source/j/jsonpatch/jsonpatch-1.12.tar.gz" - sha256 "2e1eb457f9c8dd5dae837ca93c0fe5bd2522c9d44b9b380fb1aab2ab4dec04b1" - end - - resource "jsonpointer" do - url "https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-1.10.tar.gz" - sha256 "9fa5dcac35eefd53e25d6cd4c310d963c9f0b897641772cd6e5e7b89df7ee0b1" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz" - sha256 "36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41" - end - - resource "keystoneauth1" do - url "https://files.pythonhosted.org/packages/source/k/keystoneauth1/keystoneauth1-1.2.0.tar.gz" - sha256 "e8386dc8b0f17d439e1f2f4e6a8ef64fe0f2b81938b2f0b13f80042bb98e2b85" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/source/l/lxml/lxml-3.4.4.tar.gz" - sha256 "b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099" - end - - resource "munch" do - url "https://files.pythonhosted.org/packages/source/m/munch/munch-2.0.4.tar.gz" - sha256 "1420683a94f3a2ffc77935ddd28aa9ccb540dd02b75e02ed7ea863db437ab8b2" - end - - resource "os-client-config" do - url "https://files.pythonhosted.org/packages/source/o/os-client-config/os-client-config-1.10.2.tar.gz" - sha256 "b0e24a97224469ad814d933d55d575678c0e26d633918844e8b7338fce631841" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.15.1.tar.gz" - sha256 "f0a26070d6db0881de8bcc7846934b7c3c930d8f9c79d45883ee48984bc0d672" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-2.0.5.tar.gz" - sha256 "58756bf33e989d84ac72142e4ca558cf10c778a3233edb0a86632f271409ba9e" - end - - resource "python-cinderclient" do - url "https://files.pythonhosted.org/packages/source/p/python-cinderclient/python-cinderclient-1.1.2.tar.gz" - sha256 "d364b627fbcbd049b2cedf125fb6aa06e2ca6213208f92b7ea393a7e1d7ecbe2" - end - - resource "python-designateclient" do - url "https://files.pythonhosted.org/packages/source/p/python-designateclient/python-designateclient-1.5.0.tar.gz" - sha256 "bbd93cca7eb966a270b5c49247b12fb2bf8fbb80a8577574d5c1bc8812de9cf2" - end - - resource "python-glanceclient" do - url "https://files.pythonhosted.org/packages/source/p/python-glanceclient/python-glanceclient-1.1.0.tar.gz" - sha256 "59ff30927468215131a68ffbfb9b2cb15d636a17cf702d87d0370957b553f25e" - end - - resource "python-heatclient" do - url "https://files.pythonhosted.org/packages/source/p/python-heatclient/python-heatclient-0.8.0.tar.gz" - sha256 "5cd1c855ee21f18bfffbc7269e40c417b953d0855aa3cc8b56d778b8612467d5" - end - - resource "python-ironicclient" do - url "https://files.pythonhosted.org/packages/source/p/python-ironicclient/python-ironicclient-0.10.0.tar.gz" - sha256 "53259ad9fc3b2d4a38b61ded24e89ca226e91c700daae1d9639251a20b6c7990" - end - - resource "python-neutronclient" do - url "https://files.pythonhosted.org/packages/source/p/python-neutronclient/python-neutronclient-3.1.0.tar.gz" - sha256 "02c432b35806f4017c9041ac609a367e0423973cdb48706c3c807c8a56e9263d" - end - - resource "python-openstackclient" do - url "https://files.pythonhosted.org/packages/source/p/python-openstackclient/python-openstackclient-1.8.0.tar.gz" - sha256 "d71369f802d8d537efc576acc437465d636e1aadc20f011e6bbdc38597db5258" - end - - resource "python-swiftclient" do - url "https://files.pythonhosted.org/packages/source/p/python-swiftclient/python-swiftclient-2.6.0.tar.gz" - sha256 "f7344b2a66ec0518d97e262a083b7e30e41fc0eb8e50661dd300e29d3ea163c8" - end - - resource "python-troveclient" do - url "https://files.pythonhosted.org/packages/source/p/python-troveclient/python-troveclient-1.4.0.tar.gz" - sha256 "990c8d6b8b506ce35b883290d59932b6d08e8367f990bc3d365d659cfa9c2b51" - end - - resource "shade" do - url "https://files.pythonhosted.org/packages/source/s/shade/shade-1.0.0.tar.gz" - sha256 "40403c7be65971581027b248e504f3ba8a2e250f03b9f315d87a8eeb402429ab" - end - - resource "unicodecsv" do - url "https://files.pythonhosted.org/packages/source/u/unicodecsv/unicodecsv-0.14.1.tar.gz" - sha256 "018c08037d48649a0412063ff4eda26eaa81eff1546dbffa51fa5293276ff7fc" - end - - resource "warlock" do - url "https://files.pythonhosted.org/packages/source/w/warlock/warlock-1.2.0.tar.gz" - sha256 "7c0d17891e14cf77e13a598edecc9f4682a5bc8a219dc84c139c5ba02789ef5a" - end - - def install - vendor_site_packages = libexec/"vendor/lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", vendor_site_packages - - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - resources.each do |r| - r.stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - # ndg is a namespace package - touch vendor_site_packages/"ndg/__init__.py" - - inreplace "lib/ansible/constants.py" do |s| - s.gsub! "/usr/share/ansible", share/"ansible" - s.gsub! "/etc/ansible", etc/"ansible" - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - - man1.install Dir["docs/man/man1/*.1"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - def caveats; <<~EOS - Homebrew writes wrapper scripts that set PYTHONPATH in ansible's - execution environment, which is inherited by Python scripts invoked - by ansible. If this causes problems, you can modify your playbooks - to invoke python with -E, which causes python to ignore PYTHONPATH. - EOS - end - - test do - ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" - (testpath/"playbook.yml").write <<~EOS - --- - - hosts: all - gather_facts: False - tasks: - - name: ping - ping: - EOS - (testpath/"hosts.ini").write "localhost ansible_connection=local\n" - system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" - end -end diff --git a/Formula/ansible@2.0.rb b/Formula/ansible@2.0.rb deleted file mode 100644 index d1c8ba3f1d5a1..0000000000000 --- a/Formula/ansible@2.0.rb +++ /dev/null @@ -1,614 +0,0 @@ -class AnsibleAT20 < Formula - desc "Automate deployment, configuration, and upgrading" - homepage "https://www.ansible.com/" - url "https://releases.ansible.com/ansible/ansible-2.0.2.0.tar.gz" - sha256 "373a2e50319d90da50948e3faf1c033464b7302200e0199da8981d24646d4387" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "7f4e6ad0d1987ea253c845e1003033732c810030dbea5fde80331c35cc994539" => :mojave - sha256 "0cf09f665995cb713b32152f76ac8786c7cd245720b956025d9d9b0ae011d47e" => :high_sierra - sha256 "9fd845b11d6f144d95fa9e81fb68a4f4e69a31a99c1ed99453abc699945dbead" => :sierra - sha256 "0649dfc2f9becb403dc019dd9774d191ea5f168db968c9dd2fa60291951cdb78" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "python@2" # does not support Python 3 - - # - # ansible (core dependencies) - # - resource "setuptools" do - url "https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-20.8.1.tar.gz" - sha256 "f49be4963e2d985bf12768f46cbfe4b016787f2c0ed1f8f62c3d2bc0362586da" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz" - sha256 "bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz" - sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/source/p/paramiko/paramiko-1.16.0.tar.gz" - sha256 "3297ebd3cd072f573772f7c7426939a443c62c458d54bb632ff30fd6ecf96892" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz" - sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8" - end - - # - # Required by the 'paramiko' core module - # https://github.com/paramiko/paramiko) - # - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz" - sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa" - end - - # - # Required by the 'uri' core module - # See https://docs.ansible.com/uri_module.html#requirements) - # - resource "httplib2" do - url "https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-0.9.2.tar.gz" - sha256 "c3aba1c9539711551f4d83e857b316b5134a1c4ddce98a875b7027be7dd6d988" - end - - # - # Resources required by docker-py, pyrax, and shade (see below). - # Install requests with [security] - # - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "ndg-httpsclient" do - url "https://files.pythonhosted.org/packages/source/n/ndg-httpsclient/ndg_httpsclient-0.4.0.tar.gz" - sha256 "e8c155fdebd9c4bcb0810b4ed01ae1987554b1ee034dd7532d7b8fdae38a6274" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.1.9.tar.gz" - sha256 "853cacd96d1f701ddd67aa03ecc05f51890135b7262e922710112f12a2ed2a7f" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/source/r/requests/requests-2.9.1.tar.gz" - sha256 "c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f" - end - - resource "requestsexceptions" do - url "https://files.pythonhosted.org/packages/source/r/requestsexceptions/requestsexceptions-1.1.1.tar.gz" - sha256 "21853958a2245d6dc1c851cf31ccc24ab5142efa67d73cca4b7678f604bbaf52" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - # - # docker-py (for Docker support) - # - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/source/b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.5.0.1.tar.gz" - sha256 "502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2" - end - - resource "docker-py" do - url "https://files.pythonhosted.org/packages/source/d/docker-py/docker-py-1.8.0.tar.gz" - sha256 "09ccd3522d86ec95c0659887d1da7b2761529020694efb0eeac87074cb4536c2" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/source/w/websocket-client/websocket_client-0.37.0.tar.gz" - sha256 "678b246d816b94018af5297e72915160e2feb042e0cde1a9397f502ac3a52f41" - end - - # - # pywinrm (for Windows support) - # - resource "isodate" do - url "https://files.pythonhosted.org/packages/source/i/isodate/isodate-0.5.4.tar.gz" - sha256 "42105c41d037246dc1987e36d96f3752ffd5c0c24834dd12e4fdbe1e79544e31" - end - - resource "pywinrm" do - url "https://files.pythonhosted.org/packages/source/p/pywinrm/pywinrm-0.1.1.tar.gz" - sha256 "0230d7e574a5375e8a0b46001a2bce2440aba2b866629342be0360859f8d514d" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/source/x/xmltodict/xmltodict-0.9.2.tar.gz" - sha256 "275d1e68c95cd7e3ee703ddc3ea7278e8281f761680d6bdd637bcd00a5c59901" - end - - # - # kerberos (for Windows support) - # - resource "kerberos" do - url "https://files.pythonhosted.org/packages/source/k/kerberos/kerberos-1.2.2.tar.gz" - sha256 "070ff6d9baf3752323283b1c8ed75e2edd0ec55337359185abf5bb0b617d2f5d" - end - - # - # boto/boto3 (for AWS support) - # - resource "boto" do - url "https://files.pythonhosted.org/packages/source/b/boto/boto-2.39.0.tar.gz" - sha256 "950c5bf36691df916b94ebc5679fed07f642030d39132454ec178800d5b6c58a" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/source/b/boto3/boto3-1.3.0.tar.gz" - sha256 "8f85b9261a5b4606d883248a59ef1a4e82fd783602dbec8deac4d2ad36a1b6f4" - end - - # - # Required by the 'boto3' module - # https://github.com/boto/boto3 - # - resource "botocore" do - url "https://files.pythonhosted.org/packages/source/b/botocore/botocore-1.4.11.tar.gz" - sha256 "96295db1444e9a458a3018205187ec424213e0a69c937062347f88b7b7e078fb" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/source/d/docutils/docutils-0.12.tar.gz" - sha256 "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/source/j/jmespath/jmespath-0.9.0.tar.gz" - sha256 "08dfaa06d4397f283a01e57089f3360e3b52b5b9da91a70e1fd91e9f0cdd3d3d" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/source/p/python-dateutil/python-dateutil-2.5.2.tar.gz" - sha256 "063907ef47f6e187b8fe0728952e4effb587a34f2dc356888646f9b71fbb2e4b" - end - - # - # apache libcloud (for Google GCE cupport) - # - resource "apache-libcloud" do - url "https://files.pythonhosted.org/packages/source/a/apache-libcloud/apache-libcloud-0.20.1.tar.gz" - sha256 "f36dcf8e6a4270c86b521ab4868fd762a7ec217195e126a8ccb028a82cf55466" - end - - # - # pyrax (for Rackspace support) - # - resource "Babel" do - url "https://files.pythonhosted.org/packages/source/B/Babel/Babel-2.3.3.tar.gz" - sha256 "12dff9afa9c6cd6e2a39960d3cd4b46b2b98768cdc6646833c66b20799c1c58e" - end - - resource "debtcollector" do - url "https://files.pythonhosted.org/packages/source/d/debtcollector/debtcollector-1.3.0.tar.gz" - sha256 "9a65cf09239eab75b961ef609b3176ed2487bedcfa0a465331661824e1c8db8f" - end - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-1.12.0.zip" - sha256 "63bd1fae61809eedb91f84b2185816fac1270ae51494fbdd36ea25f904a8502f" - end - - resource "funcsigs" do - url "https://files.pythonhosted.org/packages/source/f/funcsigs/funcsigs-1.0.0.tar.gz" - sha256 "2310f9d4a77c284e920ec572dc2525366a107b08d216ff8dbb891d95b6a77563" - end - - resource "ip_associations_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/i/ip_associations_python_novaclient_ext/ip_associations_python_novaclient_ext-0.1.tar.gz" - sha256 "a709b8804364afbbab81470b57e8df3f3ea11dff843c6cb4590bbc130cea94f7" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/source/i/iso8601/iso8601-0.1.11.tar.gz" - sha256 "e8fb52f78880ae063336c94eb5b87b181e6a0cc33a6c008511bac9a6e980ef30" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/source/k/keyring/keyring-9.0.tar.gz" - sha256 "1c1222298da2100128f821c57096c69cb6cec0d22ba3b66c2859ae95ae473799" - end - - resource "keystoneauth1" do - url "https://files.pythonhosted.org/packages/source/k/keystoneauth1/keystoneauth1-2.6.0.tar.gz" - sha256 "b89a5eab3bb4bd6b36dc0c34903dbc37f531fbef4c74722cc62bffd730d1d854" - end - - resource "mock" do - # NOTE: mock versions above 1.0.1 fail to install due to a broken setuptools version check. - url "https://files.pythonhosted.org/packages/source/m/mock/mock-1.0.1.tar.gz" - sha256 "b839dd2d9c117c701430c149956918a423a9863b48b09c90e30a6013e7d2f44f" - end - - resource "monotonic" do - url "https://files.pythonhosted.org/packages/source/m/monotonic/monotonic-1.0.tar.gz" - sha256 "47d7d045b3f2a08bffe683d761ef7f9131a2598db1cec7532a06720656cf719d" - end - - resource "msgpack-python" do - url "https://files.pythonhosted.org/packages/source/m/msgpack-python/msgpack-python-0.4.7.tar.gz" - sha256 "5e001229a54180a02dcdd59db23c9978351af55b1290c27bc549e381f43acd6b" - end - - resource "netaddr" do - url "https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-0.7.18.tar.gz" - sha256 "a1f5c9fcf75ac2579b9995c843dade33009543c04f218ff7c007b3c81695bd19" - end - - resource "netifaces" do - url "https://files.pythonhosted.org/packages/source/n/netifaces/netifaces-0.10.4.tar.gz" - sha256 "9656a169cb83da34d732b0eb72b39373d48774aee009a3d1272b7ea2ce109cde" - end - - resource "os_diskconfig_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/o/os_diskconfig_python_novaclient_ext/os_diskconfig_python_novaclient_ext-0.1.3.tar.gz" - sha256 "e7d19233a7b73c70244d2527d162d8176555698e7c621b41f689be496df15e75" - end - - resource "os_networksv2_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/o/os_networksv2_python_novaclient_ext/os_networksv2_python_novaclient_ext-0.25.tar.gz" - sha256 "35ba71b027daf4c407d7a2fd94604d0437eea0c1de4d8d5d0f8ab69100834a0f" - end - - resource "os_virtual_interfacesv2_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/o/os_virtual_interfacesv2_python_novaclient_ext/os_virtual_interfacesv2_python_novaclient_ext-0.19.tar.gz" - sha256 "5171370e5cea447019cee5da22102b7eca4d4a7fb3f12875e2d7658d98462c0a" - end - - resource "oslo.config" do - url "https://files.pythonhosted.org/packages/source/o/oslo.config/oslo.config-3.9.0.tar.gz" - sha256 "ec7bdf4a3d85f90cf07d2fa03a20783558ad0f490d71bd8faf50bf4ee2923df1" - end - - resource "oslo.i18n" do - url "https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-3.5.0.tar.gz" - sha256 "5fff5f6ceabed9d09b18d83e049864c29eff038efbbe67e03fe68c49cc189f10" - end - - resource "oslo.serialization" do - url "https://files.pythonhosted.org/packages/source/o/oslo.serialization/oslo.serialization-2.4.0.tar.gz" - sha256 "9b95fc07310fd6df8cab064f89fd15327b259dec17a2e2b9a07b9ca4d96be0c6" - end - - resource "oslo.utils" do - url "https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-3.8.0.tar.gz" - sha256 "c0e935b86e72facc02264271ed09dd9c5879d52452d7a1b4a116a6c7d05077aa" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/source/p/pytz/pytz-2016.3.tar.bz2" - sha256 "c193dfa167ac32c8cb96f26cbcd92972591b22bda0bac3effdbdb04de6cc55d6" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/source/p/pbr/pbr-1.9.1.tar.gz" - sha256 "3997406c90894ebf3d1371811c1e099721440a901f946ca6dc4383350403ed51" - end - - resource "positional" do - url "https://files.pythonhosted.org/packages/source/p/positional/positional-1.0.1.tar.gz" - sha256 "54a73f3593c6e30e9cdd0a727503b7c5dddbb75fb78bb681614b08dfde2bc444" - end - - resource "PrettyTable" do - url "https://files.pythonhosted.org/packages/source/P/PrettyTable/prettytable-0.7.2.tar.bz2" - sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36" - end - - resource "pyrax" do - url "https://files.pythonhosted.org/packages/source/p/pyrax/pyrax-1.9.7.tar.gz" - sha256 "6f2e2bbe9d34541db66f5815ee2016a1366a78a5bf518810d4bd81b71a9bc477" - end - - resource "python-keystoneclient" do - url "https://files.pythonhosted.org/packages/source/p/python-keystoneclient/python-keystoneclient-2.3.1.tar.gz" - sha256 "89e93551071cf29780eeafe7a61114cd36b1c2192813d3c2a58a348a6a3ac6ff" - end - - resource "python-novaclient" do - url "https://files.pythonhosted.org/packages/source/p/python-novaclient/python-novaclient-2.27.0.tar.gz" - sha256 "d1279d5c2857cf8c56cb953639b36225bc1fec7fa30ee632940823506a7638ef" - end - - resource "rackspace-auth-openstack" do - url "https://files.pythonhosted.org/packages/source/r/rackspace-auth-openstack/rackspace-auth-openstack-1.3.tar.gz" - sha256 "c4c069eeb1924ea492c50144d8a4f5f1eb0ece945e0c0d60157cabcadff651cd" - end - - resource "rackspace-novaclient" do - url "https://files.pythonhosted.org/packages/source/r/rackspace-novaclient/rackspace-novaclient-1.5.tar.gz" - sha256 "0fcde7e22594d9710c65e850d11898bd342fa83849dc8ef32c2a94117f7132b1" - end - - resource "rax_default_network_flags_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/r/rax_default_network_flags_python_novaclient_ext/rax_default_network_flags_python_novaclient_ext-0.3.2.tar.gz" - sha256 "bf18d534f6ab1ca1c82680a71d631babee285257c7d99321413a19d773790915" - end - - resource "rax_scheduled_images_python_novaclient_ext" do - url "https://files.pythonhosted.org/packages/source/r/rax_scheduled_images_python_novaclient_ext/rax_scheduled_images_python_novaclient_ext-0.3.1.tar.gz" - sha256 "f170cf97b20bdc8a1784cc0b85b70df5eb9b88c3230dab8e68e1863bf3937cdb" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/source/s/simplejson/simplejson-3.8.2.tar.gz" - sha256 "d58439c548433adcda98e695be53e526ba940a4b9c44fb9a05d92cd495cdd47f" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/source/s/stevedore/stevedore-1.10.0.tar.gz" - sha256 "f5d689ef38e0ca532d57a03d1ab95e89b17c57f97b58d10c92da94699973779f" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/source/w/wrapt/wrapt-1.10.6.tar.gz" - sha256 "9576869bb74a43cbb36ee39dc3584e6830b8e5c788e83edf0a397eba807734ab" - end - - # - # python-keyczar (for Accelerated Mode support) - # - resource "python-keyczar" do - url "https://files.pythonhosted.org/packages/source/p/python-keyczar/python-keyczar-0.715.tar.gz" - sha256 "f43f9f15b0b719de94cab2754dcf78ef63b40ee2a12cea296e7af788b28501bb" - end - - # also required by the htpasswd core module - resource "passlib" do - url "https://files.pythonhosted.org/packages/source/p/passlib/passlib-1.6.5.tar.gz" - sha256 "a83d34f53dc9b17aa42c9a35c3fbcc5120f3fcb07f7f8721ec45e6a27be347fc" - end - - # - # shade (for OpenStack support) - # - resource "anyjson" do - url "https://files.pythonhosted.org/packages/source/a/anyjson/anyjson-0.3.3.tar.gz" - sha256 "37812d863c9ad3e35c0734c42e0bf0320ce8c3bed82cd20ad54cb34d158157ba" - end - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/source/a/appdirs/appdirs-1.4.0.tar.gz" - sha256 "8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5" - end - - resource "cliff" do - url "https://files.pythonhosted.org/packages/source/c/cliff/cliff-1.15.0.tar.gz" - sha256 "f5ba6fe0940547549947d5a24ca3354145a603d3a9ba054f209d20b66dc02be7" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-0.6.8.tar.gz" - sha256 "ac780d8c31fc107bf6b4edcbcea711de4ff776d59d89bb167f8819d2d83764a8" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/source/d/decorator/decorator-4.0.6.tar.gz" - sha256 "1c6254597777fd003da2e8fb503c3dbf3d9e8f8d55f054709c0e65be3467209c" - end - - resource "dogpile" do - url "https://files.pythonhosted.org/packages/source/d/dogpile/dogpile-0.2.2.tar.gz" - sha256 "bce7e7145054af20d4bef01c7b2fb4266fa88dca107ed246c395558a824e9bf0" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/source/d/dogpile.cache/dogpile.cache-0.5.7.tar.gz" - sha256 "dcf99b09ddf3d8216b1b4378100eb0235619612fb0e6300ba5d74f10962d0956" - end - - resource "dogpile.core" do - url "https://files.pythonhosted.org/packages/source/d/dogpile.core/dogpile.core-0.4.1.tar.gz" - sha256 "be652fb11a8eaf66f7e5c94d418d2eaa60a2fe81dae500f3743a863cc9dbed76" - end - - resource "functools32" do - url "https://files.pythonhosted.org/packages/source/f/functools32/functools32-3.2.3-2.tar.gz" - sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/source/f/futures/futures-3.0.4.tar.gz" - sha256 "19485d83f7bd2151c0aeaf88fbba3ee50dadfb222ffc3b66a344ef4952b782a3" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/source/j/jsonpatch/jsonpatch-1.12.tar.gz" - sha256 "2e1eb457f9c8dd5dae837ca93c0fe5bd2522c9d44b9b380fb1aab2ab4dec04b1" - end - - resource "jsonpointer" do - url "https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-1.10.tar.gz" - sha256 "9fa5dcac35eefd53e25d6cd4c310d963c9f0b897641772cd6e5e7b89df7ee0b1" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz" - sha256 "36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/source/l/lxml/lxml-3.4.4.tar.gz" - sha256 "b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099" - end - - resource "munch" do - url "https://files.pythonhosted.org/packages/source/m/munch/munch-2.0.4.tar.gz" - sha256 "1420683a94f3a2ffc77935ddd28aa9ccb540dd02b75e02ed7ea863db437ab8b2" - end - - resource "os-client-config" do - url "https://files.pythonhosted.org/packages/source/o/os-client-config/os-client-config-1.14.0.tar.gz" - sha256 "d12e92d461abbba9f87d722a28927ba4241d29abbaea520f2a44146b9eeec118" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.15.1.tar.gz" - sha256 "f0a26070d6db0881de8bcc7846934b7c3c930d8f9c79d45883ee48984bc0d672" - end - - resource "python-cinderclient" do - url "https://files.pythonhosted.org/packages/source/p/python-cinderclient/python-cinderclient-1.5.0.tar.gz" - sha256 "4c4f5f4500afa2d3b6de183a0da573b6a04d18c92d01cc27dd29d0b5ec815d60" - end - - resource "python-designateclient" do - url "https://files.pythonhosted.org/packages/source/p/python-designateclient/python-designateclient-1.5.0.tar.gz" - sha256 "bbd93cca7eb966a270b5c49247b12fb2bf8fbb80a8577574d5c1bc8812de9cf2" - end - - resource "python-glanceclient" do - url "https://files.pythonhosted.org/packages/source/p/python-glanceclient/python-glanceclient-1.1.0.tar.gz" - sha256 "59ff30927468215131a68ffbfb9b2cb15d636a17cf702d87d0370957b553f25e" - end - - resource "python-heatclient" do - url "https://files.pythonhosted.org/packages/source/p/python-heatclient/python-heatclient-0.9.0.tar.gz" - sha256 "3a393de49239c3e6a82e2ce819684f262cb6f48ec70542d1d3dfb7aa690c7574" - end - - resource "python-ironicclient" do - url "https://files.pythonhosted.org/packages/source/p/python-ironicclient/python-ironicclient-1.1.0.tar.gz" - sha256 "4c83c4799f4a52f3ad1167ae66214265ec4bba3eab4b9518b0ff003662f40f4a" - end - - resource "python-neutronclient" do - url "https://files.pythonhosted.org/packages/source/p/python-neutronclient/python-neutronclient-4.0.0.tar.gz" - sha256 "13f4255b698bfcb19acbc8b2550ea10fd41f64e39b7951f0f2af8bec4f077191" - end - - resource "python-openstackclient" do - url "https://files.pythonhosted.org/packages/source/p/python-openstackclient/python-openstackclient-2.0.0.tar.gz" - sha256 "f89d838966fd3a6fbdc635f82ba91d5318292cef851a084e8fa01fcbf4bef62f" - end - - resource "python-swiftclient" do - url "https://files.pythonhosted.org/packages/source/p/python-swiftclient/python-swiftclient-2.7.0.tar.gz" - sha256 "013f3d8296f5b4342341e086e95c4a1fc85a24caa22a9bcc7de6716b20de2a55" - end - - resource "python-troveclient" do - url "https://files.pythonhosted.org/packages/source/p/python-troveclient/python-troveclient-2.0.0.tar.gz" - sha256 "43e7116c23f0e533560df5cbc3dbfb5e6db6ea779f7f32e31ba4ff8c038145f5" - end - - resource "shade" do - url "https://files.pythonhosted.org/packages/source/s/shade/shade-1.4.0.tar.gz" - sha256 "ad94109d9f1379104cfeee9f7de0b16741b50f1d9c99fa662717861ca8ed1981" - end - - resource "unicodecsv" do - url "https://files.pythonhosted.org/packages/source/u/unicodecsv/unicodecsv-0.14.1.tar.gz" - sha256 "018c08037d48649a0412063ff4eda26eaa81eff1546dbffa51fa5293276ff7fc" - end - - resource "warlock" do - url "https://files.pythonhosted.org/packages/source/w/warlock/warlock-1.2.0.tar.gz" - sha256 "7c0d17891e14cf77e13a598edecc9f4682a5bc8a219dc84c139c5ba02789ef5a" - end - - def install - vendor_site_packages = libexec/"vendor/lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", vendor_site_packages - - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - resources.each do |r| - r.stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - # ndg is a namespace package - touch vendor_site_packages/"ndg/__init__.py" - - inreplace "lib/ansible/constants.py" do |s| - s.gsub! "/usr/share/ansible", pkgshare - s.gsub! "/etc/ansible", etc/"ansible" - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - - man1.install Dir["docs/man/man1/*.1"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - def caveats; <<~EOS - Homebrew writes wrapper scripts that set PYTHONPATH in ansible's - execution environment, which is inherited by Python scripts invoked - by ansible. If this causes problems, you can modify your playbooks - to invoke python with -E, which causes python to ignore PYTHONPATH. - EOS - end - - test do - ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp" - (testpath/"playbook.yml").write <<~EOS - --- - - hosts: all - gather_facts: False - tasks: - - name: ping - ping: - EOS - (testpath/"hosts.ini").write "localhost ansible_connection=local\n" - system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini" - end -end diff --git a/Formula/ansifilter.rb b/Formula/ansifilter.rb deleted file mode 100644 index da0f608bb79a0..0000000000000 --- a/Formula/ansifilter.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ansifilter < Formula - desc "Strip or convert ANSI codes into HTML, (La)Tex, RTF, or BBCode" - homepage "http://www.andre-simon.de/doku/ansifilter/ansifilter.html" - url "http://www.andre-simon.de/zip/ansifilter-2.13.tar.bz2" - sha256 "4022e6d763512cbbadc47264266c8796ee654ebd2f43daca4599d1f0281812c0" - - bottle do - cellar :any_skip_relocation - sha256 "a36f0458213473bc454fc5874b813a7f8d6d16f4bc06184641b9564e89b67f11" => :mojave - sha256 "cc48b3139a95610a18173aff45235592fa0a8c1ef8a46a5b82a9bb225c37669c" => :high_sierra - sha256 "8c8b40f0b954c12ab7fe0aa52abbb103b9b3e0b7be1132658bf1a370e3133daa" => :sierra - end - - def install - system "make", "PREFIX=#{prefix}" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - path = testpath/"ansi.txt" - path.write "f\x1b[31moo" - - assert_equal "foo", shell_output("#{bin}/ansifilter #{path}").strip - end -end diff --git a/Formula/ansiweather.rb b/Formula/ansiweather.rb deleted file mode 100644 index e53254db1cb42..0000000000000 --- a/Formula/ansiweather.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Ansiweather < Formula - desc "Weather in your terminal, with ANSI colors and Unicode symbols" - homepage "https://github.com/fcambus/ansiweather" - url "https://github.com/fcambus/ansiweather/archive/1.13.0.tar.gz" - sha256 "2f0fc8722e45f02042a96d903e87196ad08b237ae693895df9a805c27637dac9" - head "https://github.com/fcambus/ansiweather.git" - - bottle :unneeded - - depends_on "jq" - - def install - bin.install "ansiweather" - end - - test do - assert_match "Wind", shell_output("#{bin}/ansiweather") - end -end diff --git a/Formula/ant-contrib.rb b/Formula/ant-contrib.rb deleted file mode 100644 index 9936237e9f88f..0000000000000 --- a/Formula/ant-contrib.rb +++ /dev/null @@ -1,33 +0,0 @@ -class AntContrib < Formula - desc "Collection of tasks for Apache Ant" - homepage "https://ant-contrib.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.tar.gz" - version "1.0b3" - sha256 "6e58c2ee65e1f4df031796d512427ea213a92ae40c5fc0b38d8ac82701f42a3c" - - bottle :unneeded - - depends_on "ant" - - def install - (share+"ant").install "ant-contrib-1.0b3.jar" - share.install "docs" - end - - test do - (testpath/"build.xml").write <<~EOS - - - - - - - - - - - - EOS - system Formula["ant"].opt_bin/"ant" - end -end diff --git a/Formula/ant.rb b/Formula/ant.rb deleted file mode 100644 index 5735fd20d7848..0000000000000 --- a/Formula/ant.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Ant < Formula - desc "Java build tool" - homepage "https://ant.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=ant/binaries/apache-ant-1.10.5-bin.tar.xz" - sha256 "cebb705dbbe26a41d359b8be08ec066caba4e8686670070ce44bbf2b57ae113f" - head "https://git-wip-us.apache.org/repos/asf/ant.git" - - bottle :unneeded - - keg_only :provided_by_macos if MacOS.version < :mavericks - - option "with-ivy", "Install ivy dependency manager" - option "with-bcel", "Install Byte Code Engineering Library" - - depends_on :java => "1.8+" - - resource "ivy" do - url "https://www.apache.org/dyn/closer.cgi?path=ant/ivy/2.4.0/apache-ivy-2.4.0-bin.tar.gz" - sha256 "7a3d13a80b69d71608191463dfc2a74fff8ef638ce0208e70d54d28ba9785ee9" - end - - resource "bcel" do - url "https://www.apache.org/dyn/closer.cgi?path=commons/bcel/binaries/bcel-6.2-bin.tar.gz" - sha256 "e5963ed50ef1f243f852a27efaf898c050a3b39721d147ccda8418c0b7255955" - end - - def install - rm Dir["bin/*.{bat,cmd,dll,exe}"] - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - rm bin/"ant" - (bin/"ant").write <<~EOS - #!/bin/sh - #{libexec}/bin/ant -lib #{HOMEBREW_PREFIX}/share/ant "$@" - EOS - if build.with? "ivy" - resource("ivy").stage do - (libexec/"lib").install Dir["ivy-*.jar"] - end - end - if build.with? "bcel" - resource("bcel").stage do - (libexec/"lib").install "bcel-#{resource("bcel").version}.jar" - end - end - end - - test do - (testpath/"build.xml").write <<~EOS - - - - - - - - - - - EOS - (testpath/"src/main/java/org/homebrew/AntTest.java").write <<~EOS - package org.homebrew; - public class AntTest { - public static void main(String[] args) { - System.out.println("Testing Ant with Homebrew!"); - } - } - EOS - system "#{bin}/ant", "compile" - end -end diff --git a/Formula/ant@1.9.rb b/Formula/ant@1.9.rb deleted file mode 100644 index c47e2478e9cf4..0000000000000 --- a/Formula/ant@1.9.rb +++ /dev/null @@ -1,45 +0,0 @@ -class AntAT19 < Formula - desc "Java build tool" - homepage "https://ant.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=ant/binaries/apache-ant-1.9.13-bin.tar.bz2" - sha256 "e770c2ba77fd695734fa1945f887891a04524998f17e929d821f993ba3c5c73c" - - bottle :unneeded - - keg_only :versioned_formula - - def install - rm Dir["bin/*.{bat,cmd,dll,exe}"] - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - rm bin/"ant" - (bin/"ant").write <<~EOS - #!/bin/sh - #{libexec}/bin/ant -lib #{HOMEBREW_PREFIX}/share/ant "$@" - EOS - end - - test do - (testpath/"build.xml").write <<~EOS - - - - - - - - - - - EOS - (testpath/"src/main/java/org/homebrew/AntTest.java").write <<~EOS - package org.homebrew; - public class AntTest { - public static void main(String[] args) { - System.out.println("Testing Ant with Homebrew!"); - } - } - EOS - system "#{bin}/ant", "compile" - end -end diff --git a/Formula/antigen.rb b/Formula/antigen.rb deleted file mode 100644 index c9ba715bb56f1..0000000000000 --- a/Formula/antigen.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Antigen < Formula - desc "Plugin manager for zsh, inspired by oh-my-zsh and vundle" - homepage "https://antigen.sharats.me/" - url "https://github.com/zsh-users/antigen/releases/download/v2.2.3/v2.2.3.tar.gz" - sha256 "bd3f1077050d52f459bc30fa3f025c44c528d625b4924a2f487fd2bacb89d61e" - head "https://github.com/zsh-users/antigen.git", :branch => "develop" - - bottle :unneeded - - def install - pkgshare.install "bin/antigen.zsh" - end - - def caveats; <<~EOS - To activate antigen, add the following to your ~/.zshrc: - source #{HOMEBREW_PREFIX}/share/antigen/antigen.zsh - EOS - end - - test do - (testpath/".zshrc").write "source #{HOMEBREW_PREFIX}/share/antigen/antigen.zsh\n" - system "zsh", "--login", "-i", "-c", "antigen help" - end -end diff --git a/Formula/antiword.rb b/Formula/antiword.rb deleted file mode 100644 index d0bea8e4ff6e1..0000000000000 --- a/Formula/antiword.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Antiword < Formula - desc "Utility to read Word (.doc) files" - homepage "http://www.winfield.demon.nl/" - url "http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz" - sha256 "8e2c000fcbc6d641b0e6ff95e13c846da3ff31097801e86702124a206888f5ac" - - bottle do - sha256 "63b4aa9e31936c405039161b1ae728d76472bb9932a7b460e1fdd7a1276ee5ad" => :mojave - sha256 "cacd3e8a83231fd139a5b845f17fb99a34f728d10df2eb6289457037ee8c827f" => :high_sierra - sha256 "6456be83a3f867a0df1121b7c7b6c413d94d1e38bc920c9c5fda73851265fb2e" => :sierra - sha256 "ffc3b61781ffb2ae04537e34b28a19a4fe33683c534dd2d1504d2ec8d5ef4bef" => :el_capitan - sha256 "1397c95409d671da764658460eba612b2564d4a0403bfffa667510e05f2fb08a" => :yosemite - sha256 "4f4938378ed4cad59dc61d652ec8d33b0410f85dd99ac825f1f86eeeedb07402" => :mavericks - end - - resource "sample.doc" do - url "https://gist.github.com/bfontaine/f7e29599d329c41737ce/raw/ed4a3c5461924ed3bc18beb6b82681af9ad143d1/sample.doc" - sha256 "b53b8d1843029b39b65ae7fdba265035c76610b85c2b9511bcade046d75d272f" - end - - def install - inreplace "antiword.h", "/usr/share/antiword", pkgshare - - system "make", "CC=#{ENV.cc}", - "LD=#{ENV.cc}", - "CFLAGS=#{ENV.cflags} -DNDEBUG", - "GLOBAL_INSTALL_DIR=#{bin}", - "GLOBAL_RESOURCES_DIR=#{pkgshare}" - bin.install "antiword" - pkgshare.install Dir["Resources/*"] - man1.install "Docs/antiword.1" - end - - def caveats; <<~EOS - You can install mapping files in ~/.antiword - EOS - end - - test do - resource("sample.doc").stage do - system "#{bin}/antiword", "sample.doc" - end - end -end diff --git a/Formula/antlr.rb b/Formula/antlr.rb deleted file mode 100644 index d09c14ee23b26..0000000000000 --- a/Formula/antlr.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Antlr < Formula - desc "ANother Tool for Language Recognition" - homepage "https://www.antlr.org/" - url "https://www.antlr.org/download/antlr-4.7.2-complete.jar" - sha256 "6852386d7975eff29171dae002cc223251510d35f291ae277948f381a7b380b4" - - bottle :unneeded - - depends_on :java - - def install - prefix.install "antlr-#{version}-complete.jar" - - (bin/"antlr").write <<~EOS - #!/bin/bash - CLASSPATH="#{prefix}/antlr-#{version}-complete.jar:." exec java -jar #{prefix}/antlr-#{version}-complete.jar "$@" - EOS - - (bin/"grun").write <<~EOS - #!/bin/bash - java -classpath #{prefix}/antlr-#{version}-complete.jar:. org.antlr.v4.gui.TestRig "$@" - EOS - end - - test do - path = testpath/"Expr.g4" - path.write <<~EOS - grammar Expr; - prog:\t(expr NEWLINE)* ; - expr:\texpr ('*'|'/') expr - |\texpr ('+'|'-') expr - |\tINT - |\t'(' expr ')' - ; - NEWLINE :\t[\\r\\n]+ ; - INT :\t[0-9]+ ; - EOS - ENV.prepend "CLASSPATH", "#{prefix}/antlr-#{version}-complete.jar", ":" - ENV.prepend "CLASSPATH", ".", ":" - system "#{bin}/antlr", "Expr.g4" - system "javac", *Dir["Expr*.java"] - assert_match(/^$/, pipe_output("#{bin}/grun Expr prog", "22+20\n")) - end -end diff --git a/Formula/antlr4-cpp-runtime.rb b/Formula/antlr4-cpp-runtime.rb deleted file mode 100644 index dbc702963900c..0000000000000 --- a/Formula/antlr4-cpp-runtime.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Antlr4CppRuntime < Formula - desc "ANother Tool for Language Recognition C++ Runtime Library" - homepage "https://www.antlr.org/" - url "https://www.antlr.org/download/antlr4-cpp-runtime-4.7.2-source.zip" - sha256 "8631a39116684638168663d295a969ad544cead3e6089605a44fea34ec01f31a" - - bottle do - cellar :any - sha256 "61e3aedd11c8ed9dda57ff30f67966c178c1209ba847c44d8db686b9691e645c" => :mojave - sha256 "3a7b6fd7bd3a8aa81c4844f9c6544f96072e6cc95f5ff4cfa6d0cf8dc5af843d" => :high_sierra - sha256 "035803548352d0189b5d2a6d3e736cacd64b8a86896fabf87e02b274b89068c3" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cc").write <<~EOS - #include - int main(int argc, const char* argv[]) { - try { - throw antlr4::ParseCancellationException() ; - } catch (antlr4::ParseCancellationException &exception) { - /* ignore */ - } - return 0 ; - } - EOS - system ENV.cxx, "-std=c++11", "-I#{include}/antlr4-runtime", "test.cc", - "-L#{lib}", "-lantlr4-runtime", "-o", "test" - system "./test" - end -end diff --git a/Formula/antlr@2.rb b/Formula/antlr@2.rb deleted file mode 100644 index 5c216282c2d00..0000000000000 --- a/Formula/antlr@2.rb +++ /dev/null @@ -1,41 +0,0 @@ -class AntlrAT2 < Formula - desc "ANother Tool for Language Recognition" - homepage "https://www.antlr2.org/" - url "https://www.antlr2.org/download/antlr-2.7.7.tar.gz" - sha256 "853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "9be9c82eba1b6b803c75114ed55947692693785566c59dca392b8bbae6b8aa19" => :mojave - sha256 "8befbeeb644d45a1a8edfebc99035b965dfc95a9d5adfa7227428905168062d4" => :high_sierra - sha256 "76d763e8d8097435e98239935255d6679e174245b5443f4f87decf4198793444" => :sierra - end - - keg_only :versioned_formula - - depends_on :java - - def install - # C Sharp is explicitly disabled because the antlr configure script will - # confuse the Chicken Scheme compiler, csc, for a C sharp compiler. - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-csharp" - system "make" - - libexec.install "antlr.jar" - include.install "lib/cpp/antlr" - lib.install "lib/cpp/src/libantlr.a" - - (bin/"antlr").write <<~EOS - #!/bin/sh - java -classpath #{libexec}/antlr.jar antlr.Tool "$@" - EOS - end - - test do - assert_match "ANTLR Parser Generator Version #{version}", - shell_output("#{bin}/antlr --help 2>&1") - end -end diff --git a/Formula/anttweakbar.rb b/Formula/anttweakbar.rb deleted file mode 100644 index 05cc66e8d19da..0000000000000 --- a/Formula/anttweakbar.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Anttweakbar < Formula - desc "C/C++ library for adding GUIs to OpenGL apps" - homepage "https://anttweakbar.sourceforge.io/" - url "https://downloads.sourceforge.net/project/anttweakbar/AntTweakBar_116.zip" - version "1.16" - sha256 "fbceb719c13ceb13b9fd973840c2c950527b6e026f9a7a80968c14f76fcf6e7c" - - bottle do - cellar :any - rebuild 1 - sha256 "2e68286a46381829f51a5bb91eb03bcdc876b79445c86672395517b4f3322652" => :mojave - sha256 "393b87de789337afebed9196404af46fa660fea3b476d874d77b48bb35c8079b" => :high_sierra - sha256 "af510970b310b01ee52528e816cdd53e2d4a4e2cfc76e426b1710f758bc99d20" => :sierra - sha256 "417278abe012967efcf22b0276527187f6472dd5fd4d271b1ea32604816d46c9" => :el_capitan - sha256 "a2e29104a5ef51621faaebd72ccc39bd5fe7bd6e977af74a358c5cc83c65c2c2" => :yosemite - sha256 "d1298b92cf6a7498c3b357adf6e696d0b24374e758853783fa228a8af5eecddc" => :mavericks - end - - # See: - # https://sourceforge.net/p/anttweakbar/code/ci/5a076d13f143175a6bda3c668e29a33406479339/tree/src/LoadOGLCore.h?diff=5528b167ed12395a60949d7c643262b6668f15d5&diformat=regular - # https://sourceforge.net/p/anttweakbar/tickets/14/ - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/62e79481/anttweakbar/anttweakbar.diff" - sha256 "3be2cb71cc00a9948c8b474da7e15ec85e3d094ed51ad2fab5c8991a9ad66fc2" - end - - def install - # Work around Xcode 9 error "no member named 'signbit' in the global - # namespace" and Xcode 8 issue on El Capitan "error: missing ',' between - # enumerators" - if DevelopmentTools.clang_build_version >= 900 || - (MacOS.version == :el_capitan && MacOS::Xcode.installed? && - MacOS::Xcode.version >= "8.0") - ENV.delete("SDKROOT") - end - - system "make", "-C", "src", "-f", "Makefile.osx" - lib.install "lib/libAntTweakBar.dylib", "lib/libAntTweakBar.a" - include.install "include/AntTweakBar.h" - end -end diff --git a/Formula/anycable-go.rb b/Formula/anycable-go.rb deleted file mode 100644 index 5ca4bea3cd64f..0000000000000 --- a/Formula/anycable-go.rb +++ /dev/null @@ -1,34 +0,0 @@ -class AnycableGo < Formula - desc "Anycable Go WebSocket Server" - homepage "https://github.com/anycable/anycable-go" - url "https://github.com/anycable/anycable-go/archive/v0.6.1.tar.gz" - sha256 "609e09d3f6f37900ee02590efe75e5792c1fda52bce4bbb4075d2523c8fbd3bf" - - bottle do - cellar :any_skip_relocation - sha256 "7135382ab3246162a827b707e4eb1b6197d061b06d83fc4b580b8e9bec8f3ca5" => :mojave - sha256 "5ee790ab1c455cb125e1c3a52e4cbb47426c6a5bd51f74f00853bebd75ed9523" => :high_sierra - sha256 "03f1dc7e44d72166e75de663a9506fb6de48d2c60a1331dc60d9184c4f884358" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/anycable/anycable-go/").install Dir["*"] - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-o", "#{bin}/anycable-go", "-v", "github.com/anycable/anycable-go/cmd/anycable-go" - end - - test do - begin - pid = fork do - exec "#{bin}/anycable-go" - end - sleep 1 - output = shell_output("curl -sI http://localhost:8080/health") - assert_match(/200 OK/m, output) - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/aoeui.rb b/Formula/aoeui.rb deleted file mode 100644 index af8987a6a368e..0000000000000 --- a/Formula/aoeui.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Aoeui < Formula - desc "Lightweight text editor optimized for Dvorak and QWERTY keyboards" - homepage "https://code.google.com/archive/p/aoeui/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/aoeui/aoeui-1.6.tgz" - sha256 "0655c3ca945b75b1204c5f25722ac0a07e89dd44bbf33aca068e918e9ef2a825" - - bottle do - cellar :any_skip_relocation - sha256 "c1e5c83add4ecaae6e45f5bed048045a0b2e81794244daf93028161bdd71e031" => :mojave - sha256 "946acae5b1b88cb67bf805e6b8a8d591e3267d799c9d1a924e60217218166e78" => :high_sierra - sha256 "1b04b93c490895121fed315f685d60cb96551b971ca1433a5240425cfa31dfcd" => :sierra - sha256 "62a04ac0fd27e76f4f77da95e7d5aaf75488765f98b02574ae7dff0508cd9f13" => :el_capitan - sha256 "19f622466c20ad4ddff2fc97ac186e189d5a8bb02dd405ed2a93c5d13a88b1f4" => :yosemite - sha256 "a3ac3238356624a12b20df52c98d2bc52e0d785745e393928fc4c629212d1406" => :mavericks - end - - def install - system "make", "INST_DIR=#{prefix}", "install" - end -end diff --git a/Formula/aom.rb b/Formula/aom.rb deleted file mode 100644 index 41e5b4e4fdabd..0000000000000 --- a/Formula/aom.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Aom < Formula - desc "Codec library for encoding and decoding AV1 video streams" - homepage "https://aomedia.googlesource.com/aom" - url "https://aomedia.googlesource.com/aom.git", - :tag => "v1.0.0", - :revision => "d14c5bb4f336ef1842046089849dee4a301fbbf0" - - bottle do - cellar :any_skip_relocation - sha256 "fdcfd3f69fbf8c9d5d3277a9cc0aabe6e4d708e3c505724828078ef93d3c82f7" => :mojave - sha256 "7ab120d51096c0b9211588e0241f6e3da2cb76487fa92ed3fba97ccefab6608b" => :high_sierra - sha256 "6059c30278e7c195ca7bd6487e21b7f8177d1320c32ab7d1e3202649b4680a3b" => :sierra - end - - depends_on "cmake" => :build - depends_on "yasm" => :build - - resource "bus_qcif_15fps.y4m" do - url "https://media.xiph.org/video/derf/y4m/bus_qcif_15fps.y4m" - sha256 "868fc3446d37d0c6959a48b68906486bd64788b2e795f0e29613cbb1fa73480e" - end - - def install - mkdir "macbuild" do - system "cmake", "..", *std_cmake_args, - "-DENABLE_DOCS=off", - "-DENABLE_EXAMPLES=on", - "-DENABLE_TESTDATA=off", - "-DENABLE_TESTS=off", - "-DENABLE_TOOLS=off" - - system "make", "install" - end - end - - test do - resource("bus_qcif_15fps.y4m").stage do - system "#{bin}/aomenc", "--webm", - "--tile-columns=2", - "--tile-rows=2", - "--cpu-used=8", - "--output=bus_qcif_15fps.webm", - "bus_qcif_15fps.y4m" - - system "#{bin}/aomdec", "--output=bus_qcif_15fps_decode.y4m", - "bus_qcif_15fps.webm" - end - end -end diff --git a/Formula/apache-archiva.rb b/Formula/apache-archiva.rb deleted file mode 100644 index e88f65495d059..0000000000000 --- a/Formula/apache-archiva.rb +++ /dev/null @@ -1,60 +0,0 @@ -class ApacheArchiva < Formula - desc "The Build Artifact Repository Manager" - homepage "https://archiva.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=archiva/2.2.3/binaries/apache-archiva-2.2.3-bin.tar.gz" - sha256 "cf90d097e7c2763f6ff8df458b64be0348b35847de8b238c3e1e28e006da8bad" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install Dir["*"] - - bin.install_symlink libexec/"bin/archiva" - end - - def post_install - (var/"archiva/logs").mkpath - (var/"archiva/data").mkpath - (var/"archiva/temp").mkpath - - cp_r libexec/"conf", var/"archiva" - end - - plist_options :manual => "ARCHIVA_BASE=#{HOMEBREW_PREFIX}/var/archiva #{HOMEBREW_PREFIX}/opt/apache-archiva/bin/archiva console" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/archiva - console - - Disabled - - RunAtLoad - - UserName - archiva - StandardOutPath - #{var}/archiva/logs/launchd.log - EnvironmentVariables - - ARCHIVA_BASE - #{var}/archiva - - - - EOS - end - - test do - assert_match "was not running.", shell_output("#{bin}/archiva stop") - end -end diff --git a/Formula/apache-arrow-glib.rb b/Formula/apache-arrow-glib.rb deleted file mode 100644 index ba6d0dc89f752..0000000000000 --- a/Formula/apache-arrow-glib.rb +++ /dev/null @@ -1,57 +0,0 @@ -class ApacheArrowGlib < Formula - desc "GObject Introspection files of Apache Arrow" - homepage "https://arrow.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-0.11.1/apache-arrow-0.11.1.tar.gz" - mirror "https://archive.apache.org/dist/arrow/arrow-0.11.1/apache-arrow-0.11.1.tar.gz" - sha256 "c524f3d47f0cdb7445c0326b20e79f60485e12daeb2adc8ad6a845ad6c19c1ac" - head "https://github.com/apache/arrow.git" - - bottle do - sha256 "e191d5cc56f40a85d9b7e7a258972381fbad66fbbb7fd894c7d9aff51aacfc55" => :mojave - sha256 "844ab89fcc76e32ad16fc9f012fcfa37138d4f035c991d0482bf357470dfff85" => :high_sierra - sha256 "2521430e830e0f7a7d6c7f09dbff30511443da4bbad3386c657935370cd46686" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "apache-arrow" - depends_on "gettext" - depends_on "glib" - - def install - cd "c_glib" do - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void){ - GArrowNullArray *array = garrow_null_array_new(10); - return 0; - } - EOS - apache_arrow = Formula["apache-arrow"] - glib = Formula["glib"] - flags = %W[ - -I#{include} - -I#{apache_arrow.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -L#{lib} - -L#{apache_arrow.opt_lib} - -L#{glib.opt_lib} - -DNDEBUG - -larrow-glib - -larrow - -lglib-2.0 - -lgobject-2.0 - -lgio-2.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/apache-arrow.rb b/Formula/apache-arrow.rb deleted file mode 100644 index 1943359bf8a98..0000000000000 --- a/Formula/apache-arrow.rb +++ /dev/null @@ -1,53 +0,0 @@ -class ApacheArrow < Formula - desc "Columnar in-memory analytics layer designed to accelerate big data" - homepage "https://arrow.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-0.11.0/apache-arrow-0.11.0.tar.gz" - sha256 "1838faa3775e082062ad832942ebc03aaf95386c0284288346ddae0632be855d" - head "https://github.com/apache/arrow.git" - - bottle do - cellar :any - sha256 "702985ab75e66013b03ca0d6b16abbb839bb8ca72a5a11df7ddb630c25eaf544" => :mojave - sha256 "825cbad795fde15c7f48a22494c3f413a52c6d59048dc0a4570b56308e3447e2" => :high_sierra - sha256 "04c5ef6542fdfb29eb624d80a465885e8ef946793727fa8e25d6eb067f438139" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "jemalloc" - depends_on "python" => :optional - depends_on "python@2" => :optional - - needs :cxx11 - - def install - ENV.cxx11 - args = [] - - if build.with?("python") && build.with?("python@2") - odie "Cannot provide both --with-python and --with-python@2" - end - Language::Python.each_python(build) do |python, _version| - args << "-DARROW_PYTHON=1" << "-DPYTHON_EXECUTABLE=#{which python}" - end - - cd "cpp" do - system "cmake", ".", *std_cmake_args, *args - system "make", "unittest" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "arrow/api.h" - int main(void) - { - arrow::int64(); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test" - system "./test" - end -end diff --git a/Formula/apache-brooklyn-cli.rb b/Formula/apache-brooklyn-cli.rb deleted file mode 100644 index ce9fecb37dc03..0000000000000 --- a/Formula/apache-brooklyn-cli.rb +++ /dev/null @@ -1,56 +0,0 @@ -class ApacheBrooklynCli < Formula - desc "Apache Brooklyn command-line interface" - homepage "https://brooklyn.apache.org" - url "https://github.com/apache/brooklyn-client/archive/rel/apache-brooklyn-0.12.0.tar.gz" - sha256 "1d0975252a41f1fd65268b915778d4974a0eff2a8a315280e3dedc0e39ef486f" - - bottle do - cellar :any_skip_relocation - sha256 "bc1c638f30c4036519eff703b605de6d22313970e585576bcf16183381f59247" => :high_sierra - sha256 "b2ad53984d4e98ef3d37622ff0ff9dd987f4ecc2614e251f3df60de13d96b6c2" => :sierra - sha256 "39f56956e1ed81dfae64401caa333f910b70312d6e45950ac5e2bb3c0db59cfe" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["XC_OS"] = "darwin" - ENV["XC_ARCH"] = "amd64" - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - (buildpath/"src/github.com/apache/brooklyn-client").install "cli" - cd "src/github.com/apache/brooklyn-client/cli" do - system "glide", "install" - system "go", "install", ".../br" - prefix.install_metafiles - end - end - - test do - require "socket" - - server = TCPServer.new("localhost", 0) - pid_mock_brooklyn = fork do - loop do - socket = server.accept - response = '{"version":"1.2.3","buildSha1":"dummysha","buildBranch":"1.2.3"}' - socket.print "HTTP/1.1 200 OK\r\n" \ - "Content-Type: application/json\r\n" \ - "Content-Length: #{response.bytesize}\r\n" \ - "Connection: close\r\n" - socket.print "\r\n" - socket.print response - socket.close - end - end - - begin - mock_brooklyn_url = "http://localhost:#{server.addr[1]}" - assert_equal "Connected to Brooklyn version 1.2.3 at #{mock_brooklyn_url}\n", shell_output("#{bin}/br login #{mock_brooklyn_url} username password") - ensure - Process.kill("KILL", pid_mock_brooklyn) - end - end -end diff --git a/Formula/apache-ctakes.rb b/Formula/apache-ctakes.rb deleted file mode 100644 index 27f2ce2c7234d..0000000000000 --- a/Formula/apache-ctakes.rb +++ /dev/null @@ -1,26 +0,0 @@ -class ApacheCtakes < Formula - desc "NLP system for extraction of information from EMR clinical text" - homepage "https://ctakes.apache.org" - url "https://apache.osuosl.org/ctakes/ctakes-4.0.0/apache-ctakes-4.0.0-bin.tar.gz" - sha256 "37ca2b8dfe06465469ed1830fbb84dfc7bcc4295e5387d66e90a76ad2a5cdeaf" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm_f Dir["bin/*.bat", "bin/*.cmd", "bin/ctakes.profile", "bin/ctakes-ytex", - "libexec/*.bat", "libexec/*.cmd"] - libexec.install %w[bin config desc lib resources] - pkgshare.install_symlink libexec/"resources/org/apache/ctakes/examples" - - bin.write_exec_script Dir["#{libexec}/bin/*"] - end - - test do - piper = pkgshare/"examples/pipeline/HelloWorld.piper" - note = pkgshare/"examples/notes/dr_nutritious_1.txt" - output = shell_output("#{bin}/runPiperFile.sh -p #{piper} -i #{note}") - assert_match "mayo-pos.zip", output - end -end diff --git a/Formula/apache-drill.rb b/Formula/apache-drill.rb deleted file mode 100644 index 3ee7480733b55..0000000000000 --- a/Formula/apache-drill.rb +++ /dev/null @@ -1,22 +0,0 @@ -class ApacheDrill < Formula - desc "Schema-free SQL Query Engine for Hadoop, NoSQL and Cloud Storage" - homepage "https://drill.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=drill/drill-1.15.0/apache-drill-1.15.0.tar.gz" - mirror "https://archive.apache.org/dist/drill/drill-1.15.0/apache-drill-1.15.0.tar.gz" - sha256 "188c1d0df28e50f0265f4bc3c5871b4e7abc9450a4e5a7dbe7f0b23146bec76b" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - ENV["DRILL_LOG_DIR"] = ENV["TMP"] - pipe_output("#{bin}/sqlline -u jdbc:drill:zk=local", "!tables", 0) - end -end diff --git a/Formula/apache-flink.rb b/Formula/apache-flink.rb deleted file mode 100644 index 210cb0b1c9d06..0000000000000 --- a/Formula/apache-flink.rb +++ /dev/null @@ -1,39 +0,0 @@ -class ApacheFlink < Formula - desc "Scalable batch and stream data processing" - homepage "https://flink.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=flink/flink-1.7.1/flink-1.7.1-bin-hadoop27-scala_2.11.tgz" - version "1.7.1" - sha256 "e7ed4c76e59454bb6cb2a513b3ceb57a55b37a9ce02a9bdb3ff25ad84e19f328" - head "https://github.com/apache/flink.git" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - (libexec/"bin").env_script_all_files(libexec/"libexec", Language::Java.java_home_env("1.8")) - chmod 0755, Dir["#{libexec}/bin/*"] - bin.write_exec_script "#{libexec}/bin/flink" - end - - test do - (testpath/"log").mkpath - (testpath/"input").write "foo bar foobar" - expected = <<~EOS - (foo,1) - (bar,1) - (foobar,1) - EOS - ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" - ENV.prepend "FLINK_LOG_DIR", testpath/"log" - system libexec/"bin/start-cluster.sh" - system bin/"flink", "run", "-p", "1", - libexec/"examples/streaming/WordCount.jar", "--input", "input", - "--output", "result" - system libexec/"bin/stop-cluster.sh" - assert_predicate testpath/"result", :exist? - assert_equal expected, (testpath/"result").read - end -end diff --git a/Formula/apache-forrest.rb b/Formula/apache-forrest.rb deleted file mode 100644 index 9b4969a65dc08..0000000000000 --- a/Formula/apache-forrest.rb +++ /dev/null @@ -1,50 +0,0 @@ -class ApacheForrest < Formula - desc "Publishing framework providing multiple output formats" - homepage "https://forrest.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=forrest/apache-forrest-0.9-sources.tar.gz" - sha256 "c6ac758db2eb0d4d91bd1733bbbc2dec4fdb33603895c464bcb47a34490fb64d" - - bottle do - cellar :any_skip_relocation - sha256 "6128ea9bb47128eddc98787e8c874e100195e9c29062df10395b0fc9159c76f1" => :mojave - sha256 "66a6c2fb9f2d6db49bae90431d841378b07925d746d33bb77bfa9b41deff7e9e" => :high_sierra - sha256 "9d5b65be3ab328e2861e47e842530cba5d393e7ac2e6a09af0f2f4731fb0e34e" => :sierra - sha256 "615ab5a39fcc19a110ebab166c05a614149374e65c5f9a7a4522fa400b8d4118" => :el_capitan - sha256 "cd0e4ceeb9e01118fe69bee3f80ccff63a951e01bf76c87146185ae6fe474c09" => :yosemite - sha256 "a0e06c41204932f1427e38d47b3c4442dea7f7c3312f959faf1b725d35d85a52" => :mavericks - end - - depends_on :java - - resource "deps" do - url "https://www.apache.org/dyn/closer.cgi?path=forrest/apache-forrest-0.9-dependencies.tar.gz" - sha256 "33146b4e64933691d3b779421b35da08062a704618518d561281d3b43917ccf1" - end - - def install - libexec.install Dir["*"] - (bin/"forrest").write_env_script libexec/"bin/forrest", Language::Java.java_home_env - - resource("deps").stage do - # To avoid conflicts with directory names already installed from the - # main tarball, surgically install contents of dependency tarball - deps_to_install = [ - "lib", - "main/webapp/resources/schema/relaxng", - "main/webapp/resources/stylesheets", - "plugins/org.apache.forrest.plugin.output.pdf/", - "tools/ant", - "tools/forrestbot/lib", - "tools/forrestbot/webapp/lib", - "tools/jetty", - ] - deps_to_install.each do |dep| - (libexec+dep).install Dir["#{dep}/*"] - end - end - end - - test do - system "#{bin}/forrest", "-projecthelp" - end -end diff --git a/Formula/apache-geode.rb b/Formula/apache-geode.rb deleted file mode 100644 index 56de9467b5bfa..0000000000000 --- a/Formula/apache-geode.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ApacheGeode < Formula - desc "In-memory Data Grid for fast transactional data processing" - homepage "https://geode.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=geode/1.8.0/apache-geode-1.8.0.tgz" - sha256 "58edc41edac4eabd899322b73a24727eac41f6253274c2ce7d0a82227121ae3e" - - bottle :unneeded - - # Geode does not work with Java 1.9 (see https://issues.apache.org/jira/browse/GEODE-3) - depends_on :java => "1.8" - - def install - rm_f "bin/gfsh.bat" - bash_completion.install "bin/gfsh-completion.bash" => "gfsh" - libexec.install Dir["*"] - (bin/"gfsh").write_env_script libexec/"bin/gfsh", Language::Java.java_home_env("1.8") - end - - test do - begin - flags = "--dir #{testpath} --name=geode_locator_brew_test" - output = shell_output("#{bin}/gfsh start locator #{flags}") - assert_match "Cluster configuration service is up and running", output - ensure - quiet_system "pkill", "-9", "-f", "geode_locator_brew_test" - end - end -end diff --git a/Formula/apache-opennlp.rb b/Formula/apache-opennlp.rb deleted file mode 100644 index f6879dabe898b..0000000000000 --- a/Formula/apache-opennlp.rb +++ /dev/null @@ -1,17 +0,0 @@ -class ApacheOpennlp < Formula - desc "Machine learning toolkit for processing natural language text" - homepage "https://opennlp.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=opennlp/opennlp-1.9.0/apache-opennlp-1.9.0-bin.tar.gz" - sha256 "f5632772c2bc871498102c566441d6fe1f1c6f852e63c1a95fdd94e5201134bd" - - bottle :unneeded - - def install - libexec.install Dir["*"] - bin.write_exec_script libexec/"bin/opennlp" - end - - test do - assert_equal "Hello , friends", pipe_output("#{bin}/opennlp SimpleTokenizer", "Hello, friends").lines.first.chomp - end -end diff --git a/Formula/apache-spark.rb b/Formula/apache-spark.rb deleted file mode 100644 index a42787343f992..0000000000000 --- a/Formula/apache-spark.rb +++ /dev/null @@ -1,26 +0,0 @@ -class ApacheSpark < Formula - desc "Engine for large-scale data processing" - homepage "https://spark.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz" - version "2.4.0" - sha256 "c93c096c8d64062345b26b34c85127a6848cff95a4bb829333a06b83222a5cfa" - head "https://github.com/apache/spark.git" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - # Rename beeline to distinguish it from hive's beeline - mv "bin/beeline", "bin/spark-beeline" - - rm_f Dir["bin/*.cmd"] - libexec.install Dir["*"] - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - assert_match "Long = 1000", pipe_output(bin/"spark-shell --conf spark.driver.bindAddress=127.0.0.1", "sc.parallelize(1 to 1000).count()") - end -end diff --git a/Formula/apache-zeppelin.rb b/Formula/apache-zeppelin.rb deleted file mode 100644 index 5c5785f127cd8..0000000000000 --- a/Formula/apache-zeppelin.rb +++ /dev/null @@ -1,41 +0,0 @@ -class ApacheZeppelin < Formula - desc "Web-based notebook that enables interactive data analytics" - homepage "https://zeppelin.apache.org" - url "https://www.apache.org/dyn/closer.lua?path=zeppelin/zeppelin-0.8.0/zeppelin-0.8.0-bin-all.tgz" - sha256 "6d35163f8005a8f5280dd28318aad626c2f3149567520cffa8d22822a882a798" - head "https://github.com/apache/zeppelin.git" - - bottle :unneeded - - def install - rm_f Dir["bin/*.cmd"] - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/bin/*"] - end - - test do - begin - ENV["ZEPPELIN_LOG_DIR"] = "logs" - ENV["ZEPPELIN_PID_DIR"] = "pid" - ENV["ZEPPELIN_CONF_DIR"] = "#{testpath}/conf" - conf = testpath/"conf" - conf.mkdir - (conf/"zeppelin-env.sh").write <<~EOS - export ZEPPELIN_WAR_TEMPDIR="#{testpath}/webapps" - export ZEPPELIN_PORT=9999 - export ZEPPELIN_NOTEBOOK_DIR="#{testpath}/notebooks" - export ZEPPELIN_MEM="-Xms256m -Xmx1024m -XX:MaxPermSize=256m" - EOS - ln_s "#{libexec}/conf/log4j.properties", conf - ln_s "#{libexec}/conf/shiro.ini", conf - system "#{bin}/zeppelin-daemon.sh", "start" - begin - sleep 25 - json_text = shell_output("curl -s http://localhost:9999/api/notebook/") - assert_equal JSON.parse(json_text)["status"], "OK" - ensure - system "#{bin}/zeppelin-daemon.sh", "stop" - end - end - end -end diff --git a/Formula/apachetop.rb b/Formula/apachetop.rb deleted file mode 100644 index aefe0715d25b9..0000000000000 --- a/Formula/apachetop.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Apachetop < Formula - desc "Top-like display of Apache log" - homepage "https://web.archive.org/web/20170809160553/freecode.com/projects/apachetop" - url "https://deb.debian.org/debian/pool/main/a/apachetop/apachetop_0.12.6.orig.tar.gz" - sha256 "850062414517055eab2440b788b503d45ebe9b290d4b2e027a5f887ad70f3f29" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f4520c12643b7b9d6afc80729217ecbe7f17298790dbe783e7909c436559ac30" => :mojave - sha256 "e41dce58ad184e880c1f198ae1d5c0d0d1f1fc9fd27f1296a02a1b23e33c09cb" => :high_sierra - sha256 "3a3f3b20db8183a8c642ce732d9ecc3eac68ea1c292cab0594c3d5000c181442" => :sierra - sha256 "f1dd6f8ac7cb973228227b4cb678ef0bb61f618c482dc8d7d3144acccfebcf5b" => :el_capitan - sha256 "1cfb399a8548e1ac48d7cb61374e23273aa1eb289e49ba452aa2c55641fe5bae" => :yosemite - sha256 "78aa56c9141cfc658120edfb27e795cf178067d54f66c79fc752536d8e0335ea" => :mavericks - sha256 "d2383e14241b9af39c197462339393463ae6f8161dae508f49b0753dff846287" => :mountain_lion - end - - # Freecode is officially static from this point forwards. Do not rely on it for up-to-date package information. - # Upstream hasn't had activity in years, patch from MacPorts - patch :p0, :DATA - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-debug", - "--disable-dependency-tracking", - "--with-logfile=/var/log/apache2/access_log" - system "make", "install" - end - - test do - output = shell_output("#{bin}/apachetop -h 2>&1", 1) - assert_match "ApacheTop v#{version}", output - end -end - -__END__ ---- src/resolver.h 2005-10-15 18:10:01.000000000 +0200 -+++ src/resolver.h 2007-02-17 11:24:37.000000000 -0100 -@@ -10,8 +10,8 @@ - class Resolver - { - public: -- Resolver::Resolver(void); -- Resolver::~Resolver(void); -+ Resolver(void); -+ ~Resolver(void); - int add_request(char *request, enum resolver_action act); diff --git a/Formula/apcupsd.rb b/Formula/apcupsd.rb deleted file mode 100644 index cdbef9a92d295..0000000000000 --- a/Formula/apcupsd.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Apcupsd < Formula - desc "Daemon for controlling APC UPSes" - homepage "http://www.apcupsd.org" - url "https://downloads.sourceforge.net/project/apcupsd/apcupsd%20-%20Stable/3.14.14/apcupsd-3.14.14.tar.gz" - sha256 "db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867" - - bottle do - rebuild 1 - sha256 "2308c0cbde96d244e535e9fae11c501a49dc4aafa33fc1475b9285a3246e581e" => :mojave - sha256 "beee3be60fc8aafbd2a8fdb215ec8f0d531cc6750d00fd176039a0e5d8ee0d1e" => :high_sierra - sha256 "8cf3f4840ec564f859fa0b02eda9aec274180de519b512e28e19a31b6eab583c" => :sierra - sha256 "d000cc771fde79714b634a49b31afd207d6a26b76924c586e0af9fa80f539db5" => :el_capitan - end - - depends_on "gd" - depends_on "libusb-compat" - - def install - # Paths below are hard-coded upstream for creation of `.pkg` installer. - - sysconfdir = etc/name - - cd "src/apcagent" do - # Install apcagent.app to `prefix`. - inreplace "Makefile", "Applications", prefix - end - - cd "platforms/darwin" do - # Install launch daemon and kernel extension to subdirectories of `prefix`. - inreplace "Makefile", "/Library/LaunchDaemons", "#{prefix}/Library/LaunchDaemons" - inreplace "Makefile", "/System/Library/Extensions", kext_prefix - - # Use appropriate paths for launch daemon and launch script. - inreplace "apcupsd-start.in", "/etc/apcupsd", sysconfdir - inreplace "org.apcupsd.apcupsd.plist.in", "/etc/apcupsd", sysconfdir - - # Custom uninstaller not needed as this is handled by Homebrew. - inreplace "Makefile", /.*apcupsd-uninstall.*/, "" - end - - system "./configure", "--prefix=#{prefix}", - "--sbindir=#{sbin}", - "--sysconfdir=#{sysconfdir}", - "--enable-cgi", "--with-cgi-bin=#{sysconfdir}", - "--enable-usb", "--enable-modbus-usb" - - system "make", "install" - end - - def caveats - s = <<~EOS - For #{name} to be able to communicate with UPSes connected via USB, - the kernel extension must be installed by the root user: - - sudo cp -pR #{kext_prefix}/ApcupsdDummy.kext /System/Library/Extensions/ - sudo chown -R root:wheel /System/Library/Extensions/ApcupsdDummy.kext - sudo touch /System/Library/Extensions/ - - EOS - - if MacOS.version >= :el_capitan - s += <<~EOS - Note: On OS X El Capitan and above, the kernel extension currently - does not work as expected. - - You will have to unplug and plug the USB cable back in after each - reboot in order for #{name} to be able to connect to the UPS. - - EOS - end - - s += <<~EOS - To load #{name} at startup, activate the included Launch Daemon: - - sudo cp #{prefix}/Library/LaunchDaemons/org.apcupsd.apcupsd.plist /Library/LaunchDaemons - sudo chmod 644 /Library/LaunchDaemons/org.apcupsd.apcupsd.plist - sudo launchctl load -w /Library/LaunchDaemons/org.apcupsd.apcupsd.plist - - If this is an upgrade and you already have the Launch Daemon loaded, you - have to unload the Launch Daemon before reinstalling it: - - sudo launchctl unload -w /Library/LaunchDaemons/org.apcupsd.apcupsd.plist - sudo rm /Library/LaunchDaemons/org.apcupsd.apcupsd.plist - EOS - - s - end - - test do - system "#{sbin}/apcupsd", "--version" - assert_match /usage/, shell_output("#{sbin}/apctest --help", 1) - end -end diff --git a/Formula/ape.rb b/Formula/ape.rb deleted file mode 100644 index a23cb0050b2f7..0000000000000 --- a/Formula/ape.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Ape < Formula - desc "Ajax Push Engine" - homepage "http://www.ape-project.org/" - url "https://github.com/APE-Project/APE_Server/archive/v1.1.2.tar.gz" - sha256 "c5f6ec0740f20dd5eb26c223149fc4bade3daadff02a851e2abb7e00be97db42" - - bottle do - cellar :any_skip_relocation - sha256 "54387a0a2a38314a0def581f67c517d9ff7f82efd431e9811cf774cf235850a3" => :high_sierra - sha256 "dd095fa1465e0a20613481720e26a5917c08882b340a18ab4d351a95e5eb3a3e" => :sierra - sha256 "259b19e211ff6d6ffc376db0b3696a912a6ac48dca83cbcbe525c78e56755c82" => :el_capitan - sha256 "3859216e566e6faaccc7183d737527dd4785260a698c8344520e7951baebca76" => :yosemite - sha256 "83c7ef23309dec2e7bd4bec3ae75b6f0e04fcfecbda489c90810b6948eb3bb28" => :mavericks - sha256 "136d65f58cb956b95a6ccb9517a5affe69c3491d283478708ca88091abb3103f" => :mountain_lion - end - - fails_with :clang do - build 500 - cause "multiple configure and compile errors" - end - - def install - system "./build.sh" - # The Makefile installs a configuration file in the bindir which our bot red-flags - (prefix+"etc").mkdir - inreplace "Makefile", "bin/ape.conf $(bindir)", "bin/ape.conf $(prefix)/etc" - system "make", "install", "prefix=#{prefix}" - end - - def caveats; <<~EOS - The default configuration file is stored in #{etc}. You should load aped with: - aped --cfg #{etc}/ape.conf - EOS - end - - test do - system "#{bin}/aped", "--version" - end -end diff --git a/Formula/apel.rb b/Formula/apel.rb deleted file mode 100644 index c30a6e83bf758..0000000000000 --- a/Formula/apel.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Apel < Formula - desc "Emacs Lisp library to help write portable Emacs programs" - homepage "http://git.chise.org/elisp/apel/" - url "http://git.chise.org/elisp/dist/apel/apel-10.8.tar.gz" - sha256 "a511cc36bb51dc32b4915c9e03c67a994060b3156ceeab6fafa0be7874b9ccfe" - - bottle do - cellar :any_skip_relocation - sha256 "1943ce15491aba8c8ef257e45336ad96fff4e41d3fa4127c226fd243252350d2" => :mojave - sha256 "0886fb7b0cf5358b7354ccc81a7f95fff446c61b8dbf3bb3d66b8f322e455cee" => :high_sierra - sha256 "f39010912a4a48b6dfce1b64e420bf3e3979a373a15a16dd5d5440c97c2d3a76" => :sierra - sha256 "f47d90fd2aea06a0e52a75b84af03c7a97f479f00f621168eb5afb6f911e999f" => :el_capitan - sha256 "90038f974eb80c5d670990f349a13d629e2139098720ca13b5a26c7c9a8c9360" => :yosemite - sha256 "00acef6949043235fc8a613c1d5dc9f58d8e365bde486d42461fc89449ff834b" => :mavericks - end - - def install - system "make", "install", "PREFIX=#{prefix}", - "LISPDIR=#{elisp}", "VERSION_SPECIFIC_LISPDIR=#{elisp}" - end - - test do - program = testpath/"test-apel.el" - program.write <<~EOS - (add-to-list 'load-path "#{elisp}/emu") - (require 'poe) - (print (minibuffer-prompt-width)) - EOS - assert_equal "0", shell_output("emacs -Q --batch -l #{program}").strip - end -end diff --git a/Formula/apgdiff.rb b/Formula/apgdiff.rb deleted file mode 100644 index 5c380b86db850..0000000000000 --- a/Formula/apgdiff.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Apgdiff < Formula - desc "Another PostgreSQL diff tool" - homepage "https://www.apgdiff.com/" - url "https://www.apgdiff.com/download/apgdiff-2.4-bin.zip" - sha256 "12d95fbb0b8188d7f90e7aaf8bdd29d0eecac26e08d6323624b5b7e3f7c7a3f7" - - head do - url "https://github.com/fordfrog/apgdiff.git" - depends_on "ant" => :build - end - - bottle :unneeded - - def install - jar = "apgdiff-#{version}.jar" - - if build.head? - system "ant" - cd "dist" do - jar = Dir["apgdiff-*.jar"].first - mv jar, ".." - end - end - - libexec.install jar - bin.write_jar_script libexec/jar, "apgdiff" - end - - test do - sql_orig = testpath/"orig.sql" - sql_new = testpath/"new.sql" - - sql_orig.write <<~EOS - SET search_path = public, pg_catalog; - SET default_tablespace = ''; - CREATE TABLE testtable (field1 integer); - ALTER TABLE public.testtable OWNER TO fordfrog; - EOS - - sql_new.write <<~EOS - SET search_path = public, pg_catalog; - SET default_tablespace = ''; - CREATE TABLE testtable (field1 integer, - field2 boolean DEFAULT false NOT NULL); - ALTER TABLE public.testtable OWNER TO fordfrog; - EOS - - expected = <<~EOS.strip - ALTER TABLE testtable - \tADD COLUMN field2 boolean DEFAULT false NOT NULL; - EOS - - result = pipe_output("#{bin}/apgdiff #{sql_orig} #{sql_new}").strip - - assert_equal result, expected - end -end diff --git a/Formula/apib.rb b/Formula/apib.rb deleted file mode 100644 index fab90ae98bdf3..0000000000000 --- a/Formula/apib.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Apib < Formula - desc "HTTP performance-testing tool" - homepage "https://github.com/apigee/apib" - url "https://github.com/apigee/apib/archive/APIB_1_0.tar.gz" - sha256 "1592e55c01f2f9bc8085b39f09c49cd7b786b6fb6d02441ca665eef262e7b87e" - revision 1 - head "https://github.com/apigee/apib.git" - - bottle do - cellar :any - sha256 "6ebf28013ff33494c45a67b4e66abf15549a90cac60fc8bb0f8720ebf1387623" => :mojave - sha256 "3ceaeadbdbd7c70211b7774ab76cff8e4d5176d4f04e4f1984043ec16002c4ec" => :high_sierra - sha256 "f0443f15ef97284cefe199c11f7cbb14d6b41e48c5d13d6a372e9d47c1410573" => :sierra - sha256 "cc30447ff51239eb2334d85b2f3faf0842b21ff882d8a4edb2e99155cb1dab76" => :el_capitan - sha256 "9cd200dbdb251c5d50e7fa2307a6252aa295a4a7ac0e594d0774ad1d2631215c" => :yosemite - sha256 "b14202356551d0b33446c99d38c4ed0f1d4893aa8e203fd04b6923db18ff40c1" => :mavericks - sha256 "c538b9389b1849704720383f03fb2fe4eaf145ecd01d7dca5fd08d95e0e961ba" => :mountain_lion - end - - depends_on "apr" - depends_on "openssl" - - def install - # Upstream hardcodes finding apr in /usr/include. When CLT is not present - # we need to fix this so our apr requirement works. - # https://github.com/apigee/apib/issues/11 - unless MacOS::CLT.installed? - inreplace "configure" do |s| - s.gsub! "/usr/include/apr-1.0", "#{Formula["apr"].opt_libexec}/include/apr-1" - s.gsub! "/usr/include/apr-1", "#{Formula["apr"].opt_libexec}/include/apr-1" - end - ENV.append "LDFLAGS", "-L#{Formula["apr-util"].opt_libexec}/lib" - ENV.append "LDFLAGS", "-L#{Formula["apr"].opt_libexec}/lib" - ENV.append "CFLAGS", "-I#{Formula["apr"].opt_libexec}/include/apr-1" - ENV.append "CFLAGS", "-I#{Formula["apr-util"].opt_libexec}/include/apr-1" - end - - system "./configure", "--prefix=#{prefix}" - system "make" - bin.install "apib", "apibmon" - end - - test do - system "#{bin}/apib", "-c 1", "-d 1", "https://www.google.com" - end -end diff --git a/Formula/apibuilder-cli.rb b/Formula/apibuilder-cli.rb deleted file mode 100644 index 6db9571a04634..0000000000000 --- a/Formula/apibuilder-cli.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ApibuilderCli < Formula - desc "Command-line interface to generate clients for api builder" - homepage "https://www.apibuilder.io" - url "https://github.com/apicollective/apibuilder-cli/archive/0.1.31.tar.gz" - sha256 "4ef95aa8a819760a230d5f21eacb33730234f7827c9081eec9babacb55008058" - - bottle :unneeded - - def install - system "./install.sh", prefix - end - - test do - (testpath/"config").write <<~EOS - [default] - token = abcd1234 - EOS - assert_match "Profile default:", - shell_output("#{bin}/read-config --path config") - assert_match "Could not find apibuilder configuration directory", - shell_output("#{bin}/apibuilder", 1) - end -end diff --git a/Formula/apktool.rb b/Formula/apktool.rb deleted file mode 100644 index 65b47b8fa2a4a..0000000000000 --- a/Formula/apktool.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Apktool < Formula - desc "Tool for reverse engineering 3rd party, closed, binary Android apps" - homepage "https://github.com/iBotPeaches/Apktool" - url "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.4.jar" - sha256 "758b1bd58f9c9dd5ca85258d31c75f32e5878a502e3d75c66f3bfacf74b9dc1d" - - bottle :unneeded - - resource "sample.apk" do - url "https://github.com/downloads/stephanenicolas/RoboDemo/robodemo-sample-1.0.1.apk" - sha256 "bf3ec04631339538c8edb97ebbd5262c3962c5873a2df9022385156c775eb81f" - end - - def install - libexec.install "apktool_#{version}.jar" - bin.write_jar_script libexec/"apktool_#{version}.jar", "apktool" - end - - test do - resource("sample.apk").stage do - system bin/"apktool", "d", "robodemo-sample-1.0.1.apk" - system bin/"apktool", "b", "robodemo-sample-1.0.1" - end - end -end diff --git a/Formula/apm-bash-completion.rb b/Formula/apm-bash-completion.rb deleted file mode 100644 index 886d509b65c75..0000000000000 --- a/Formula/apm-bash-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class ApmBashCompletion < Formula - desc "Completion for Atom Package Manager" - homepage "https://github.com/vigo/apm-bash-completion" - url "https://github.com/vigo/apm-bash-completion/archive/1.0.0.tar.gz" - sha256 "1043a7f19eabe69316ea483830fb9f78d6c90853aaf4dd7ed60007af7f0d6e9d" - - bottle :unneeded - - def install - bash_completion.install "apm" - end - - test do - assert_match "-F __apm", - shell_output("source #{bash_completion}/apm && complete -p apm") - end -end diff --git a/Formula/apm-server.rb b/Formula/apm-server.rb deleted file mode 100644 index f1aa588833ecd..0000000000000 --- a/Formula/apm-server.rb +++ /dev/null @@ -1,120 +0,0 @@ -class ApmServer < Formula - desc "Server for shipping APM metrics to Elasticsearch" - homepage "https://www.elastic.co/" - # Pinned at 6.2.x because of a licencing issue - # See: https://github.com/Homebrew/homebrew-core/pull/28995 - url "https://github.com/elastic/apm-server/archive/v6.2.4.tar.gz" - sha256 "b0d85f62851dd0cc7cb7a54c8549d36fb7c29bdb8f83c91b3a6487a8e9acba39" - head "https://github.com/elastic/apm-server.git" - - bottle do - cellar :any_skip_relocation - sha256 "5a4ab76cc1b52263994f71d69b3a9d94457833f9091d066c9f75696eb1db3090" => :mojave - sha256 "8371817897ace0a1c3ed28700f684a555214a6f61acbefa52253f07170902634" => :high_sierra - sha256 "1f6ed039a917a43dfd5eebb7e392324e4a63ac05d22516ce2cd6a0f11821ec6c" => :sierra - sha256 "a0be0b0f6241c98bca1de560dfa7ebd1b153ca09708ac34dd19693cc4c5cbba7" => :el_capitan - end - - depends_on "go" => :build - depends_on "python@2" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/apm-server").install buildpath.children - - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages" - - resource("virtualenv").stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" - - cd "src/github.com/elastic/apm-server" do - system "make" - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "make", "update" - (libexec/"bin").install "apm-server" - libexec.install "_meta/kibana" - - (etc/"apm-server").install Dir["apm-server*.yml"] - (etc/"apm-server").install "fields.yml" - prefix.install_metafiles - end - - (bin/"apm-server").write <<~EOS - #!/bin/sh - exec #{libexec}/bin/apm-server \ - -path.config #{etc}/apm-server \ - -path.home #{libexec} \ - -path.logs #{var}/log/apm-server \ - -path.data #{var}/lib/apm-server \ - "$@" - EOS - end - - def post_install - (var/"lib/apm-server").mkpath - (var/"log/apm-server").mkpath - end - - plist_options :manual => "apm-server" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/apm-server - RunAtLoad - - - - EOS - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - (testpath/"config/apm-server.yml").write <<~EOS - apm-server: - host: localhost:#{port} - output.file: - path: "#{testpath}/apm-server" - filename: apm-server - codec.format: - string: '%{[transaction]}' - EOS - pid = fork do - exec bin/"apm-server", "-path.config", testpath/"config", "-path.data", testpath/"data" - end - sleep 1 - - begin - system "curl", "-H", "Content-Type: application/json", "-XPOST", "localhost:#{port}/v1/transactions", "-d", - '{"service":{"name":"app1","agent":{"name":"python","version":"1.0"}},' \ - '"transactions":[{"id":"945254c5-67a5-417e-8a4e-aa29efcbfb79","name":"GET /api/types", ' \ - '"type":"request","duration":32.592981,"timestamp":"2017-05-09T15:04:05.999999Z"}]}' - sleep 1 - s = (testpath/"apm-server/apm-server").read - assert_match '"id":"945254c5-67a5-417e-8a4e-aa29efcbfb79"', s - assert_match '"name":"GET /api/types"', s - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/apng2gif.rb b/Formula/apng2gif.rb deleted file mode 100644 index 9713464b13bac..0000000000000 --- a/Formula/apng2gif.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Apng2gif < Formula - desc "Convert APNG animations into animated GIF format" - homepage "https://apng2gif.sourceforge.io/" - url "https://downloads.sourceforge.net/apng2gif/apng2gif-1.8-src.zip" - sha256 "9a07e386017dc696573cd7bc7b46b2575c06da0bc68c3c4f1c24a4b39cdedd4d" - - bottle do - cellar :any - rebuild 1 - sha256 "f0f18d7ae3beaaac092bc06bccc3f5fdcd0c7de11df6ded61e8fde151d3e2276" => :mojave - sha256 "810005bcbc32c60c7084b248eef3d007e756180842051f64385fb90cfac66c63" => :high_sierra - sha256 "fa18274f18fb0d3a2b3f5c360c24587b805db3f4734972c350643c35b8677174" => :sierra - sha256 "42d033ae0a661d75b588af8d7c0cdb67a81bfc481aa88665973d95d3e4fb64ec" => :el_capitan - sha256 "5456ec2b90086c84f2094972fa0dacc11de0abdde5346e3445a6b7d64b49201c" => :yosemite - end - - depends_on "libpng" - - if MacOS.version <= :yosemite - depends_on "gcc" - fails_with :clang - end - - def install - system "make" - bin.install "apng2gif" - end - - test do - cp test_fixtures("test.png"), testpath/"test.png" - system bin/"apng2gif", testpath/"test.png" - assert_predicate testpath/"test.gif", :exist?, "Failed to create test.gif" - end -end diff --git a/Formula/apngasm.rb b/Formula/apngasm.rb deleted file mode 100644 index 800c26e2c7a2d..0000000000000 --- a/Formula/apngasm.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Apngasm < Formula - desc "Next generation of apngasm, the APNG assembler" - homepage "https://github.com/apngasm/apngasm" - url "https://github.com/apngasm/apngasm/archive/3.1.6.tar.gz" - sha256 "0068e31cd878e07f3dffa4c6afba6242a753dac83b3799470149d2e816c1a2a7" - head "https://github.com/apngasm/apngasm.git" - - bottle do - cellar :any - rebuild 1 - sha256 "9385f652fd7fae83e373a823d7cd7b090213f3e6e17d1eee415022a4eb454cf4" => :mojave - sha256 "df11f91ea8d27997410b38d42e435b58c34d54dd2bb58a714745ffcfaaacdda2" => :high_sierra - sha256 "87cb9f81d1ec12b561e8750d259e27d1d97daa654742fcce032863e0185baf0f" => :sierra - sha256 "073f74cacea8907e430113f4aae80d248887fc1d18de36f64889e683c08e3441" => :el_capitan - sha256 "5fb1bd67761e2717c78c3842c7effd8835acb5f6193a05516df7cde7ff7051e8" => :yosemite - sha256 "124cee4bf9746a9e60882cf6fd5b2430265fc661af5dbe9bab2f85e83e985cfa" => :mavericks - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "libpng" - depends_on "lzlib" - - def install - inreplace "cli/CMakeLists.txt", "${CMAKE_INSTALL_PREFIX}/man/man1", - "${CMAKE_INSTALL_PREFIX}/share/man/man1" - system "cmake", ".", *std_cmake_args - system "make", "install" - (pkgshare/"test").install "test/samples" - end - - test do - system bin/"apngasm", "#{pkgshare}/test/samples/clock*.png" - end -end diff --git a/Formula/apollo.rb b/Formula/apollo.rb deleted file mode 100644 index b80be045e88f1..0000000000000 --- a/Formula/apollo.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Apollo < Formula - desc "Multi-protocol messaging broker based on ActiveMQ" - homepage "https://activemq.apache.org/apollo" - url "https://archive.apache.org/dist/activemq/activemq-apollo/1.7.1/apache-apollo-1.7.1-unix-distro.tar.gz" - sha256 "74577339a1843995a5128d14c68b21fb8f229d80d8ce1341dd3134f250ab689d" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0bea2c3db30793391d982ff0d6233e11b93df47a34fe253c8daf8dc6f0fe05fd" => :mojave - sha256 "48b09eb2c2be0ed37a27b6b4d6835c5db6d80c877ea10e46296ddd17f8e646ba" => :high_sierra - sha256 "1d4d6ac835aa8f72d8fb3084780e215986737c6609dff27a552730f2df9f5fc7" => :sierra - sha256 "1521942c30bd7443a79d944c384391cea0944089a0242b89f31c2c2e4dda1e81" => :el_capitan - sha256 "1521942c30bd7443a79d944c384391cea0944089a0242b89f31c2c2e4dda1e81" => :yosemite - end - - depends_on :java => "1.7+" - - # https://www.oracle.com/technetwork/database/berkeleydb/overview/index-093405.html - resource "bdb-je" do - url "https://download.oracle.com/maven/com/sleepycat/je/5.0.34/je-5.0.34.jar" - sha256 "025afa4954ed4e6f926af6e9015aa109528b0f947fcb3790b7bace639fe558fa" - end - - # https://github.com/fusesource/fuse-extra/tree/master/fusemq-apollo/fusemq-apollo-mqtt - resource "mqtt" do - url "https://search.maven.org/remotecontent?filepath=org/fusesource/fuse-extra/fusemq-apollo-mqtt/1.3/fusemq-apollo-mqtt-1.3-uber.jar" - sha256 "2795caacbc6086c7de46b588d11a78edbf8272acb7d9da3fb329cb34fcb8783f" - end - - def install - prefix.install_metafiles - prefix.install %w[docs examples] - libexec.install Dir["*"] - - (libexec/"lib").install resource("bdb-je") - (libexec/"lib").install resource("mqtt") - - (bin/"apollo").write_env_script libexec/"bin/apollo", Language::Java.java_home_env - end - - def caveats; <<~EOS - To create the broker: - #{bin}/apollo create #{var}/apollo - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/var/apollo/bin/apollo-broker run" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{var}/apollo/bin/apollo-broker - run - - RunAtLoad - - WorkingDirectory - #{var}/apollo - - - EOS - end - - test do - system bin/"apollo", "create", testpath - assert_predicate testpath/"bin/apollo-broker", :exist? - assert_predicate testpath/"bin/apollo-broker", :executable? - end -end diff --git a/Formula/app-engine-java.rb b/Formula/app-engine-java.rb deleted file mode 100644 index 8e01358d23cb4..0000000000000 --- a/Formula/app-engine-java.rb +++ /dev/null @@ -1,33 +0,0 @@ -class AppEngineJava < Formula - desc "Google App Engine for Java" - homepage "https://cloud.google.com/appengine/docs/java/" - url "https://storage.googleapis.com/appengine-sdks/featured/appengine-java-sdk-1.9.68.zip" - sha256 "29674e10002202ec87d70e750773835e3be2231d30fa90d4c7955bdfbb239022" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm Dir["bin/*.cmd"] - libexec.install Dir["*"] - - %w[appcfg.sh dev_appserver.sh endpoints.sh run_java.sh].each do |f| - bin.install libexec/"bin/#{f}" - end - - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - (testpath/"WEB-INF/web.xml").write "" - (testpath/"WEB-INF/appengine-web.xml").write "true" - Process.setsid - IO.popen("#{bin}/dev_appserver.sh . 2>&1") do |io| - assert_not_nil(io.gets, "Dev App Server terminated prematurely") until $LAST_READ_LINE == "INFO: Dev App Server is now running\n" - Signal.trap "INT", "IGNORE" - Process.kill "INT", 0 - end - assert_equal(130, $CHILD_STATUS.exitstatus, "Dev App Server exited with unexpected status code") - end -end diff --git a/Formula/app-engine-python.rb b/Formula/app-engine-python.rb deleted file mode 100644 index 5d32cc05ede1f..0000000000000 --- a/Formula/app-engine-python.rb +++ /dev/null @@ -1,64 +0,0 @@ -class AppEnginePython < Formula - desc "Google App Engine" - homepage "https://cloud.google.com/appengine/docs" - url "https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.70.zip" - sha256 "3675197df810f104bbbee0e97b1ab776ba2ebff8b99f241bd4c2c125c8ebdaa1" - - bottle :unneeded - - def install - pkgshare.install Dir["*"] - %w[ - _python_runtime.py - _php_runtime.py - api_server.py - appcfg.py - backends_conversion.py - bulkload_client.py - bulkloader.py - dev_appserver.py - download_appstats.py - endpointscfg.py - gen_protorpc.py - php_cli.py - remote_api_shell.py - run_tests.py - wrapper_util.py - ].each do |fn| - bin.install_symlink share/name/fn - end - end - - test do - (testpath/"app.yaml").write <<~EOS - runtime: python27 - api_version: 1 - threadsafe: true - - handlers: - - url: /.* - script: main.app - - EOS - (testpath/"main.py").write <<~EOS - import webapp2 - class MainPage(webapp2.RequestHandler): - def get(self): - self.response.headers['Content-Type'] = 'text/plain' - self.response.write('Hello, World!') - app = webapp2.WSGIApplication([ - ('/', MainPage), - ], debug=True) - EOS - begin - pid = fork do - exec "#{pkgshare}/dev_appserver.py app.yaml --skip_sdk_update_check" - end - sleep 5 - output = shell_output("curl -s http://localhost:8080/") - assert_equal "Hello, World!", output.chomp - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/apparix.rb b/Formula/apparix.rb deleted file mode 100644 index 2352350438fce..0000000000000 --- a/Formula/apparix.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Apparix < Formula - desc "File system navigation via bookmarking directories" - homepage "https://micans.org/apparix/" - url "https://micans.org/apparix/src/apparix-11-062.tar.gz" - sha256 "211bb5f67b32ba7c3e044a13e4e79eb998ca017538e9f4b06bc92d5953615235" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "5b26fe074f048cdf1ba973e21e91bd51eb7f275ba05928ffaaf2e56c15671bbd" => :mojave - sha256 "1170198d8bafd2b2a6795257dec1e4c15cb1c92d1af7eea44ee816c0a58ac8a1" => :high_sierra - sha256 "889da718a73f128fa8baaca4a66ae80316ef6cb00ccc03937ea191c8eb781930" => :sierra - sha256 "89d7d52f9f2e76f1dd6b91075f407fa71000be0b09bd4548c11a6fd820b87ab3" => :el_capitan - sha256 "9ff5a4568499ba2ca67b7c1bae689ab25576409da76798642b3c4caee489c878" => :yosemite - sha256 "537fac6c0755ea6ef4ac4a6da2840de49c2c125015afaee6cf691ac33937c380" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - mkdir "test" - system "#{bin}/apparix", "--add-mark", "homebrew", "test" - assert_equal "j,homebrew,test", - shell_output("#{bin}/apparix -lm homebrew").chomp - end -end diff --git a/Formula/appledoc.rb b/Formula/appledoc.rb deleted file mode 100644 index dab6b1c109768..0000000000000 --- a/Formula/appledoc.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Appledoc < Formula - desc "Objective-C API documentation generator" - homepage "http://appledoc.gentlebytes.com/" - url "https://github.com/tomaz/appledoc/archive/2.2.1.tar.gz" - sha256 "0ec881f667dfe70d565b7f1328e9ad4eebc8699ee6dcd381f3bd0ccbf35c0337" - head "https://github.com/tomaz/appledoc.git" - - bottle do - sha256 "2964d5f269086c396b9ffef15c52f2af29b9bb61b7b208b62ab9dcc95d86c649" => :mojave - sha256 "53e67d5fb1067078a1fde8cc17c5836313d6303a9fe03b9df4d0727fb89974ca" => :high_sierra - sha256 "2d986524eff2914b52f2336ab19dfd8bf21fb98a278e47690355c0cce525a06b" => :sierra - sha256 "c723bec6cdeb0eb067d7c67cee472f20a6f1935e1bbd6b0a3aa0ec7f77fea583" => :el_capitan - sha256 "ada12050d25be7a3c9920b1b4e2aa8d8a1efa7d59d9e67325f4e83dab14d0f59" => :yosemite - sha256 "dede0bad06c61e56350c5fc812e1c507d3b2e0b73b6d062eedfe8e47f39b74fb" => :mavericks - end - - depends_on :xcode => :build - depends_on :macos => :lion - - def install - xcodebuild "-project", "appledoc.xcodeproj", - "-target", "appledoc", - "-configuration", "Release", - "clean", "install", - "SYMROOT=build", - "DSTROOT=build", - "INSTALL_PATH=/bin", - "OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"#{prefix}/Templates\"'" - bin.install "build/bin/appledoc" - prefix.install "Templates/" - end - - test do - (testpath/"test.h").write <<~EOS - /** - * This is a test class. It does stuff. - * - * Here **is** some `markdown`. - */ - - @interface X : Y - - /** - * Does a thing. - * - * @returns An instance of X. - * @param thing The thing to copy. - */ - + (X *)thingWithThing:(X *)thing; - - @end - EOS - - system bin/"appledoc", "--project-name", "Test", - "--project-company", "Homebrew", - "--create-html", - "--no-install-docset", - "--keep-intermediate-files", - "--docset-install-path", testpath, - "--output", testpath, - testpath/"test.h" - end -end diff --git a/Formula/appscale-tools.rb b/Formula/appscale-tools.rb deleted file mode 100644 index cc473de76f4a2..0000000000000 --- a/Formula/appscale-tools.rb +++ /dev/null @@ -1,339 +0,0 @@ -class AppscaleTools < Formula - desc "Command-line tools for working with AppScale" - homepage "https://github.com/AppScale/appscale-tools" - url "https://github.com/AppScale/appscale-tools/archive/3.5.3.tar.gz" - sha256 "ae3f373626d5d88d38cf17fef8bd5faaf92234bc6421d5f5c49cf5788acbe93a" - head "https://github.com/AppScale/appscale-tools.git" - - bottle do - cellar :any - sha256 "4f41b03465b1dea26010f87ca4aae2685b58d50cc1139b17aed9b74da6e75fc7" => :mojave - sha256 "09504e42c3fa49bef72caec812e751b662a64bc9c82b8e6489fee22eeda5f5f2" => :high_sierra - sha256 "99ffa7564f5c791bff75392877e57c8ba513c95ab7ec98f18b3b68096faacf04" => :sierra - sha256 "fb7096134ec7fd4172c3906190f123f21d8cf9c336729c07271f792e926997d3" => :el_capitan - end - - depends_on "libyaml" - depends_on "openssl" - depends_on "python@2" - depends_on "ssh-copy-id" - - resource "retrying" do - url "https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz" - sha256 "08c039560a6da2fe4f2c426d0766e284d3b736e355f8dd24b37367b0bb41973b" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "SOAPpy" do - url "https://files.pythonhosted.org/packages/78/1b/29cbe26b2b98804d65e934925ced9810883bdda9eacba3f993ad60bfe271/SOAPpy-0.12.22.zip" - sha256 "e70845906bb625144ae6a8df4534d66d84431ff8e21835d7b401ec6d8eb447a5" - end - - # Dependencies for SOAPpy - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "wstools" do - url "https://files.pythonhosted.org/packages/81/a3/0fbea78bccec0970032b847135b0d6050224c8601460464edcc748c5a22c/wstools-0.4.3.tar.gz" - sha256 "578b53e98bc8dadf5a55dfd1f559fd9b37a594609f1883f23e8646d2d30336f8" - end - - resource "defusedxml" do - url "https://files.pythonhosted.org/packages/74/ba/4ba4e89e21b5a2e267d80736ea674609a0a33cc4435a6d748ef04f1f9374/defusedxml-0.5.0.tar.gz" - sha256 "24d7f2f94f7f3cb6061acb215685e5125fbcdc40a857eff9de22518820b0a4f4" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz" - sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab" - end - - resource "boto" do - url "https://files.pythonhosted.org/packages/66/e7/fe1db6a5ed53831b53b8a6695a8f134a58833cadb5f2740802bc3730ac15/boto-2.48.0.tar.gz" - sha256 "deb8925b734b109679e3de65856018996338758f4b916ff4fe7bb62b6d7000d1" - end - - resource "argparse" do - url "https://files.pythonhosted.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz" - sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4" - end - - resource "google-api-python-client" do - url "https://files.pythonhosted.org/packages/31/c4/c77f3ddadf17d041f237615d5fba02faefd93adfb82ad75877156647491a/google-api-python-client-1.5.4.tar.gz" - sha256 "b9f6697cf9d2d556e8241c18518f1f9a2531e71b59703d0d1505bb47e97009ac" - end - - resource "uritemplate" do - url "https://files.pythonhosted.org/packages/cd/db/f7b98cdc3f81513fb25d3cbe2501d621882ee81150b745cdd1363278c10a/uritemplate-3.0.0.tar.gz" - sha256 "c02643cebe23fc8adb5e6becffe201185bf06c40bda5c0b4028a93f1527d011d" - end - - # Dependencies for google-api-python-client - resource "oauth2client" do - url "https://files.pythonhosted.org/packages/c2/ce/7aaf19d8b856191e2e1885201fe45f3dc57b97f5ec5bc98ef2cc15472918/oauth2client-4.0.0.tar.gz" - sha256 "80be5420889694634b8517b4acd3292ace881d9d1aa9d590d37ec52faec238c7" - end - - # Dependencies for oauth2client - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/eb/3d/b7d0fdf4a882e26674c68c20f40682491377c4db1439870f5b6f862f76ed/pyasn1-0.4.2.tar.gz" - sha256 "d258b0a71994f7770599835249cece1caef3c70def868c4915e6e5ca49b67d15" - end - - resource "pyasn1-modules" do - url "https://files.pythonhosted.org/packages/ab/76/36ab0e099e6bd27ed95b70c2c86c326d3affa59b9b535c63a2f892ac9f45/pyasn1-modules-0.2.1.tar.gz" - sha256 "af00ea8f2022b6287dc375b2c70f31ab5af83989fc6fe9eacd4976ce26cd7ccc" - end - - resource "rsa" do - url "https://files.pythonhosted.org/packages/14/89/adf8b72371e37f3ca69c6cb8ab6319d009c4a24b04a31399e5bd77d9bb57/rsa-3.4.2.tar.gz" - sha256 "25df4e10c263fb88b5ace923dd84bf9aa7f5019687b5e55382ffcdb8bede9db5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "httplib2" do - url "https://files.pythonhosted.org/packages/e4/2e/a7e27d2c36076efeb8c0e519758968b20389adf57a9ce3af139891af2696/httplib2-0.10.3.tar.gz" - sha256 "e404d3b7bd86c1bc931906098e7c1305d6a3a6dcef141b8bb1059903abb3ceeb" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/1c/a1/3367581782ce79b727954f7aa5d29e6a439dc2490a9ac0e7ea0a7115435d/tabulate-0.7.7.tar.gz" - sha256 "83a0b8e17c09f012090a50e1e97ae897300a72b35e0c86c0b53d3bd2ae86d8c6" - end - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/dc/8c/7c9869454bdc53e72fb87ace63eac39336879eef6f2bf96e946edbf03e90/setuptools-33.1.1.zip" - sha256 "6b20352ed60ba08c43b3611bdb502286f7a869fbfcf472f40d7279f1e77de145" - end - - # Dependencies for Azure - resource "azure-mgmt-nspkg" do - url "https://files.pythonhosted.org/packages/fe/66/66eb0d5ead69b7371649466fa160a166de0d1ddafc4a1d7a172858a8abc9/azure-mgmt-nspkg-2.0.0.zip" - sha256 "e36488d4f5d7d668ef5cc3e6e86f081448fd60c9bf4e051d06ff7cfc5a653e6f" - end - - resource "azure-nspkg" do - url "https://files.pythonhosted.org/packages/06/a2/77820fa07ec4657d6456b67edfa78856b4789ada42d1bb8e8485df19824e/azure-nspkg-2.0.0.zip" - sha256 "fe19ee5d8c66ee8ef62557fc7310f59cffb7230f0a94701eef79f6e3191fdc7b" - end - - resource "azure-common" do - url "https://files.pythonhosted.org/packages/00/39/7b915a03e1a64415c81a8b8f317556182592327d2b62812ef2b19e71b378/azure-common-1.1.4.zip" - sha256 "f8c8d97d0a7de202a47d7081c39c0e4a827c78900719d02c2ebe936e44ff152f" - end - - resource "azure-servicemanagement-legacy" do - url "https://files.pythonhosted.org/packages/71/72/247d6e15711ace1e0e680d067f34e04facb3bc4b340234c0267b54842b01/azure-servicemanagement-legacy-0.20.4.zip" - sha256 "742df8756065ff033d9af974851d2de6df5cc09de53802cf3172646c1e7f2932" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/1f/9e/7b2ff7e965fc654592269f2906ade1c7d705f1bf25b7d469fa153f7d19eb/futures-3.2.0.tar.gz" - sha256 "9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265" - end - - resource "azure-storage" do - url "https://files.pythonhosted.org/packages/94/fd/301d5d72126125b59731ad64bcfcc9bc75fcddb9bb8370a917559a693433/azure-storage-0.33.0.zip" - sha256 "1117e15bdd699b7f44412fec06948b9161de13c0cd01bea092c7752112542c40" - end - - resource "azure-servicebus" do - url "https://files.pythonhosted.org/packages/38/97/a0f9a44d2c9501329338ae252794c12939e70188a41d902c2717f26f7385/azure-servicebus-0.20.3.zip" - sha256 "442bf44d32286cdaef71f75e03bcff912a7111f281462b9c4d560f77687684f7" - end - - resource "azure-batch" do - url "https://files.pythonhosted.org/packages/2a/e9/6c16410251d9e65e89a8f72f6c5bcb3b8b54928a072e9481eccebd9c1cd4/azure-batch-1.0.0.zip" - sha256 "0c863b863f9efa1ff1a30c4a8aa6d8bb6c80b334bb01de43ae863daefb982e3e" - end - - resource "azure-mgmt-storage" do - url "https://files.pythonhosted.org/packages/f8/d8/425dc59243cca1e907778445d68610345fda4ff341b12209d4d4bb3d1388/azure-mgmt-storage-0.30.0rc6.zip" - sha256 "8038669aa1386e6def927accf4b0d0426a5a542fcce71fed4c5100aff9d55a65" - end - - resource "azure-mgmt-resource" do - url "https://files.pythonhosted.org/packages/5a/88/12b179f4473b51b671a126741b4520edbfea164bf0d683d3a0c78cec98a9/azure-mgmt-resource-0.30.0rc6.zip" - sha256 "afc26ac7c0a468c04504e63f3d361ead4bdedc7e48fd41197779396423ed7383" - end - - resource "azure-mgmt-batch" do - url "https://files.pythonhosted.org/packages/14/15/315e59a9a3c7db95c9d653cec963d6dbb935a11335b5679aecf229d600f5/azure-mgmt-batch-1.0.0.zip" - sha256 "3af7750aff8ccacaf73ec482bfa5c5c7ea57ca1fa9c51541da6564d91583e5eb" - end - - resource "azure-mgmt-compute" do - url "https://files.pythonhosted.org/packages/7d/b5/e85d7054f2ef45f4413e6711837d5dc3ac85ac3114cf3891e8938ecc40d5/azure-mgmt-compute-0.30.0rc6.zip" - sha256 "01ec076790dc7ac509a753f2492e82776e9a0ae1556608fbc86d7b646f348d77" - end - - resource "azure-mgmt-keyvault" do - url "https://files.pythonhosted.org/packages/11/d8/bf649497dc0e589920393f6a3b9be3bec7eeea38c1f41d4476a5e828585b/azure-mgmt-keyvault-0.30.0rc6.zip" - sha256 "c01e9a62cbce0889e5030653ecc99a9ff240dfd2858f666837a3247eb2c2a19a" - end - - resource "azure-mgmt-logic" do - url "https://files.pythonhosted.org/packages/9f/16/32ef7f8cae08a7d2c7bd096c5d9f3af2fd96de23d3f8db337333401d8b36/azure-mgmt-logic-1.0.0.zip" - sha256 "12efc80bcab1a6e5f7a641e3873c7dfbd8ecbcba49f7c222cd04a26d196f6007" - end - - resource "azure-mgmt-network" do - url "https://files.pythonhosted.org/packages/60/54/1459f5652fe19da9689bf8642f84fe220f6307dac8ac2a62e2b9f582eaa2/azure-mgmt-network-0.30.0rc6.zip" - sha256 "31b1849d470adf2189f47f8de84f0875b0ccbbc5de576cdbbd8500a1ef95870f" - end - - resource "azure-mgmt-scheduler" do - url "https://files.pythonhosted.org/packages/d2/42/4b15b354a2208e1fa43c327fd5a3215071140467624d3a14d97076988d7d/azure-mgmt-scheduler-1.0.0.zip" - sha256 "bddf4b9ee5a27180782831a375604b2af0cff0c0cbd5e57a010cc4f0c6a322c3" - end - - resource "azure-mgmt-redis" do - url "https://files.pythonhosted.org/packages/47/bc/b42afac6ff6479c95d8d5a0946f0c94f818a2cecb84303482eecf0d41f40/azure-mgmt-redis-1.0.0.zip" - sha256 "b5c1de56e66756134ede1757901d4c3ece62e7dcc16c21f4d7c3c7ca0e27dbad" - end - - resource "azure-mgmt" do - url "https://files.pythonhosted.org/packages/52/4a/1812c3d233e3d2e62613337552be64022dc4b231a5d51e25266cc68ddb33/azure-mgmt-0.30.0rc6.zip" - sha256 "b3b0c187bcc51bbcd49b8254921d70a8988d733a7c822a533ec7ec762ccfb9b8" - end - - resource "azure" do - url "https://files.pythonhosted.org/packages/85/5c/d4a19612a2ca66966267198cd238ecc5e99e2082a41f0344733c7302ca92/azure-2.0.0rc6.zip" - sha256 "d71fa18a2f8f3e6d56051782e00497d28414a68219b01899ba3f791bcd6bd324" - end - - # Dependencies for cryptography - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/f0/ba/860a4a3e283456d6b7e2ab39ce5cf11a3490ee1a363652ac50abf9f0f5df/ipaddress-1.0.19.tar.gz" - sha256 "200d8686011d470b5e4de207d803445deee427455cd0cb7c982b68cf82524f81" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/78/c5/7188f15a92413096c93053d5304718e1f6ba88b818357d05d19250ebff85/cryptography-2.1.4.tar.gz" - sha256 "e4d967371c5b6b2e67855066471d844c5d52d210c36c28d49a8507b96e2c5291" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/e5/1d/64a3b1c30842ecf0518af93ed123e5064559e588aebdcae0a59831dee642/python-dateutil-2.7.0.tar.gz" - sha256 "8f95bb7e6edbb2456a51a1fb58c8dca942024b4f5844cae62c90aa88afe6e300" - end - - resource "PyJWT" do - url "https://files.pythonhosted.org/packages/0e/01/021a7cd3f898e8fcba2cda40b3cc07c0f957ae1ede394559643e20656468/PyJWT-1.6.0.tar.gz" - sha256 "9c3016e4a292151c5396e25cc0c28c4e1cdf13fa19118eb84f500f9670e3f628" - end - - resource "adal" do - url "https://files.pythonhosted.org/packages/dd/55/fe57a0c94680f7b72bb524c085d28a0e407dcaa695ab927d1a904fdc7b6a/adal-0.4.5.tar.gz" - sha256 "c5ddfd473fe272ae1deefcee22f99f094f9f195bcb52a8678b2e315b755fe253" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/3b/15/a5d90ab1a41075e8f0fae334f13452549528f82142b3b9d0c9d86ab7178c/pyOpenSSL-17.5.0.tar.gz" - sha256 "2c10cfba46a52c0b0950118981d61e72c1e5b1aac451ca1bc77de1a679456773" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/72/46/4abc3f5aaf7bf16a52206bb0c68677a26c216c1e6625c78c5aef695b5359/requests-2.14.2.tar.gz" - sha256 "a274abba399a23e8713ffd2b5706535ae280ebe2b8069ee6a941cb089440d153" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/5e/f8/ac0b545c716ed7bab54d11669328e34a6f1eb4a5d8b188d443a7b234861f/keyring-11.0.0.tar.gz" - sha256 "b4607520a7c97be96be4ddc00f4b9dac65f47a45af4b4cd13ed5a8879641d646" - end - - resource "msrestazure" do - url "https://files.pythonhosted.org/packages/6a/d1/761e69540cc8076a8a64f280638397e2eb1dcba1ff697e5cd1730797eff9/msrestazure-0.4.19.tar.gz" - sha256 "43b78f25a432772b48c1dee615bd2c1de2ebb2f8107e96d4eea8cf6f691069c4" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/15/d4/2f888fc463d516ff7bf2379a4e9a552fef7f22a94147655d9b1097108248/certifi-2018.1.18.tar.gz" - sha256 "edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/a5/8a/212e9b47fb54be109f3ff0684165bb38c51117f34e175c379fce5c7df754/oauthlib-2.0.6.tar.gz" - sha256 "ce57b501e906ff4f614e71c36a3ab9eacbb96d35c24d1970d2539bbc3ec70ce1" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/80/14/ad120c720f86c547ba8988010d5186102030591f71f7099f23921ca47fe5/requests-oauthlib-0.8.0.tar.gz" - sha256 "883ac416757eada6d3d07054ec7092ac21c7f35cb1d2cf82faf205637081f468" - end - - resource "msrest" do - url "https://files.pythonhosted.org/packages/e5/51/5c57754bfb2c097f5057c11a712d7b45f9a7f78191085085d3f34c809c4f/msrest-0.4.27.tar.gz" - sha256 "cf45f02d73e45e5382f0e03b7552f530b090547cf77c4fb19f7dbe1990b3a739" - end - - resource "haikunator" do - url "https://files.pythonhosted.org/packages/af/58/6a000ee0ec34cac5c78669359a8b1db969f1f511454a140ad3d193714ba2/haikunator-2.1.0.zip" - sha256 "91ee3949a3a613cac037ddde0b16b17062e248376b11491436e49d5ddc75ff9b" - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - resources.each do |r| - r.stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - site_packages = libexec/"lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", site_packages - system "python", *Language::Python.setup_install_args(libexec) - - # appscale is a namespace package - touch site_packages/"appscale/__init__.py" - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system bin/"appscale", "help" - system bin/"appscale", "init", "cloud" - end -end diff --git a/Formula/apr-util.rb b/Formula/apr-util.rb deleted file mode 100644 index 4dee25282b8a9..0000000000000 --- a/Formula/apr-util.rb +++ /dev/null @@ -1,40 +0,0 @@ -class AprUtil < Formula - desc "Companion library to apr, the Apache Portable Runtime library" - homepage "https://apr.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=apr/apr-util-1.6.1.tar.bz2" - sha256 "d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b" - revision 1 - - bottle do - sha256 "e4927892e16a3c9cf0d037c1777a6e5728fef2f5abfbc0af3d0d444e9d6a1d2b" => :mojave - sha256 "1bdf0cda4f0015318994a162971505f9807cb0589a4b0cbc7828531e19b6f739" => :high_sierra - sha256 "75c244c3a34abab343f0db7652aeb2c2ba472e7ad91f13af5524d17bba3001f2" => :sierra - sha256 "bae285ada445a2b5cc8b43cb8c61a75e177056c6176d0622f6f87b1b17a8502f" => :el_capitan - end - - keg_only :provided_by_macos, "Apple's CLT package contains apr" - - depends_on "apr" - depends_on "openssl" - - def install - # Install in libexec otherwise it pollutes lib with a .exp file. - system "./configure", "--prefix=#{libexec}", - "--with-apr=#{Formula["apr"].opt_prefix}", - "--with-crypto", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make" - system "make", "install" - bin.install_symlink Dir["#{libexec}/bin/*"] - - rm Dir[libexec/"lib/*.la"] - rm Dir[libexec/"lib/apr-util-1/*.la"] - - # No need for this to point to the versioned path. - inreplace libexec/"bin/apu-1-config", libexec, opt_libexec - end - - test do - assert_match opt_libexec.to_s, shell_output("#{bin}/apu-1-config --prefix") - end -end diff --git a/Formula/apr.rb b/Formula/apr.rb deleted file mode 100644 index 5c3a167f6e980..0000000000000 --- a/Formula/apr.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Apr < Formula - desc "Apache Portable Runtime library" - homepage "https://apr.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=apr/apr-1.6.5.tar.bz2" - sha256 "a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105" - - bottle do - cellar :any - sha256 "0111bfb48f0a020292bd503c2c8e1b374f9ea844c3cc32a0b35a670234adc055" => :mojave - sha256 "314c8ebd08304a0f7dcebe3ca7fe5cc6b1c283b744f12d19d0931b91fac4fe20" => :high_sierra - sha256 "71cb98918a64daac38641bf4bbfb9457693ffd4109c023f0c3a50bfa029141f7" => :sierra - sha256 "a3e0d0b44862e575f529d9b6fdf467b507dced4bfcf9afc30d06d3ddc5e51a0e" => :el_capitan - end - - keg_only :provided_by_macos, "Apple's CLT package contains apr" - - def install - ENV["SED"] = "sed" # prevent libtool from hardcoding sed path from superenv - - # https://bz.apache.org/bugzilla/show_bug.cgi?id=57359 - # The internal libtool throws an enormous strop if we don't do... - ENV.deparallelize - - # Stick it in libexec otherwise it pollutes lib with a .exp file. - system "./configure", "--prefix=#{libexec}" - system "make", "install" - bin.install_symlink Dir["#{libexec}/bin/*"] - - rm Dir[libexec/"lib/*.la"] - - # No need for this to point to the versioned path. - inreplace libexec/"bin/apr-1-config", libexec, opt_libexec - end - - test do - assert_match opt_libexec.to_s, shell_output("#{bin}/apr-1-config --prefix") - end -end diff --git a/Formula/apt-dater.rb b/Formula/apt-dater.rb deleted file mode 100644 index 7d0670bd20d74..0000000000000 --- a/Formula/apt-dater.rb +++ /dev/null @@ -1,32 +0,0 @@ -class AptDater < Formula - desc "Manage package updates on remote hosts using SSH" - homepage "https://github.com/DE-IBH/apt-dater" - url "https://github.com/DE-IBH/apt-dater/archive/v0.9.0.tar.gz" - sha256 "1c361dd686d66473b27db4af8d241d520535c5d5a33f42a35943bf4e16c13f47" - version_scheme 1 - - bottle do - rebuild 2 - sha256 "ee24c55759d197401d4b4c930837c48a5343edf1ed9bb308c7fdedde2be19cd8" => :mojave - sha256 "2263ba095d1b5250428fd765b4c591886a4f7c117b1bb62719df1033a246de32" => :high_sierra - sha256 "026b29a9428c2c1d77e70001c8651f8e8ac20b20dee1ba62a89e0d69e2da570e" => :sierra - sha256 "a2f37094132e6f5cd8ad9b287bf299eea8acbc99b1d468002dfe875a8a14985d" => :el_capitan - sha256 "2ac3ba56f32d018a9af477484d8ad561871f855aca78726dbe8f43f5552f6acc" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "popt" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "AM_LDFLAGS=", "install" - end - - test do - system "#{bin}/apt-dater", "-v" - end -end diff --git a/Formula/aptly.rb b/Formula/aptly.rb deleted file mode 100644 index bacb6a38f4d66..0000000000000 --- a/Formula/aptly.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Aptly < Formula - desc "Swiss army knife for Debian repository management" - homepage "https://www.aptly.info/" - url "https://github.com/aptly-dev/aptly/archive/v1.3.0.tar.gz" - sha256 "4d993dd790345e54dd963467a475ae160a7133bae7ee42844f15d5e82c1fb36e" - revision 1 - head "https://github.com/aptly-dev/aptly.git" - - bottle do - cellar :any_skip_relocation - sha256 "19b910566b07b2795bbc67ad1c3894c309cf772045922baff0dcc5e3f53329a8" => :mojave - sha256 "966f18f15eaf50533ff84926ed2d1a302b9da5dfc860b65fc94f89efa06622c8" => :high_sierra - sha256 "c3137ebf033719c6076b2fdda72d01bb91fd286affe1535ef84c8d9f388ac414" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - (buildpath/"src/github.com/aptly-dev/aptly").install buildpath.children - cd "src/github.com/aptly-dev/aptly" do - system "make", "VERSION=#{version}", "install" - prefix.install_metafiles - bash_completion.install "completion.d/aptly" - zsh_completion.install "completion.d/_aptly" - end - end - - test do - assert_match "aptly version:", shell_output("#{bin}/aptly version") - (testpath/".aptly.conf").write("{}") - result = shell_output("#{bin}/aptly -config='#{testpath}/.aptly.conf' mirror list") - assert_match "No mirrors found, create one with", result - end -end diff --git a/Formula/aqbanking.rb b/Formula/aqbanking.rb deleted file mode 100644 index b15857090e25d..0000000000000 --- a/Formula/aqbanking.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Aqbanking < Formula - desc "Generic online banking interface" - homepage "https://www.aquamaniac.de/sites/aqbanking/" - url "https://www.aquamaniac.de/sites/download/download.php?package=03&release=217&file=02&dummy=aqbanking-5.7.8.tar.gz" - sha256 "16f86e4cc49a9eaaa8dfe3206607e627873208bce45a70030c3caea9b5afc768" - revision 1 - - bottle do - sha256 "153049e5417652e7dbf7ea864751552faf1eb0d4fd5abcdf1f67208bb6c1ef04" => :mojave - sha256 "454fb80632eebfc602c32f417dfd761b83a3fb7a047a6a74e8c05bec00c6f930" => :high_sierra - sha256 "76d2ae1f5935d4e4ffd666a8f84ba612d83a1e1777d17f7c76bee3d8aa3a98dc" => :sierra - sha256 "a0a0d87e3aa8fc53f5e2fef317be081c30be7472ef2e2fda9b64d4ea3fd21357" => :el_capitan - end - - head do - url "https://git.aquamaniac.de/git/aqbanking.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gmp" - depends_on "gwenhywfar" - depends_on "ktoblzcheck" - depends_on "libxml2" - depends_on "libxmlsec1" - depends_on "libxslt" - - def install - ENV.deparallelize - system "autoreconf", "-fiv" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-cli", - "--with-gwen-dir=#{HOMEBREW_PREFIX}" - system "make", "check" - system "make", "install" - end - - test do - ENV["TZ"] = "UTC" - context = "balance.ctx" - (testpath/context).write <<~EOS - accountInfoList { - accountInfo { - char bankCode="110000000" - char bankName="STRIPE TEST BANK" - char accountNumber="000123456789" - char accountName="demand deposit" - char iban="US44110000000000123456789" - char bic="BYLADEM1001" - char owner="JOHN DOE" - char currency="USD" - int accountType="0" - int accountId="2" - - statusList { - status { - int time="1388664000" - - notedBalance { - value { - char value="123456%2F100" - char currency="USD" - } #value - - int time="1388664000" - } #notedBalance - } #status - - status { - int time="1388750400" - - notedBalance { - value { - char value="132436%2F100" - char currency="USD" - } #value - - int time="1388750400" - } #notedBalance - } #status - } #statusList - - } # accountInfo - } # accountInfoList - EOS - - match = "Account 110000000 000123456789 STRIPE TEST BANK 03.01.2014 12:00 1324.36 USD" - out = shell_output("#{bin}/aqbanking-cli listbal -c #{context}") - assert_match match, out.gsub(/\s+/, " ") - end -end diff --git a/Formula/arabica.rb b/Formula/arabica.rb deleted file mode 100644 index 0229fec789f49..0000000000000 --- a/Formula/arabica.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Arabica < Formula - desc "XML toolkit written in C++" - homepage "https://www.jezuk.co.uk/cgi-bin/view/arabica" - url "https://github.com/jezhiggins/arabica/archive/2016-January.tar.gz" - version "20160214" - sha256 "addcbd13a6f814a8c692cff5d4d13491f0b12378d0ee45bdd6801aba21f9f2ae" - head "https://github.com/jezhiggins/arabica.git" - - bottle do - cellar :any - sha256 "448e31922f8c9b913ca5ca450599bfd631ed9781007cb7ff64fe69f14014cc27" => :mojave - sha256 "0d3da860ba0b953abb9f70665cc73620ae2b0cd0570dacb55bfe8954ae0d58e7" => :high_sierra - sha256 "6a08cb5b8af8d2034569451ad499260acebc610ab390383b20398fc10a6fb115" => :sierra - sha256 "185edd120b5759f25d1e69b9f24840eef6a404b1001c90e684546e359cf75928" => :el_capitan - sha256 "1882f30edf8da8d98df603a6006c3dce96e21941e4266103366930b3e5a922c2" => :yosemite - sha256 "5d247d4d5819106404bc7091e3b6141b4d298c77636bee39bfc524a3c5481e7f" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "boost" - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - output = shell_output("#{bin}/mangle") - assert_match "mangle is an (in-development) XSLT processor", output - end -end diff --git a/Formula/arangodb.rb b/Formula/arangodb.rb deleted file mode 100644 index a95db5794b85a..0000000000000 --- a/Formula/arangodb.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Arangodb < Formula - desc "The Multi-Model NoSQL Database" - homepage "https://www.arangodb.com/" - url "https://download.arangodb.com/Source/ArangoDB-3.4.0.tar.gz" - sha256 "5e45fa2f5eff8420a2e3e083535663a21ab06bc66fa29857d6cd4e36ed4c4aff" - head "https://github.com/arangodb/arangodb.git", :branch => "unstable" - - bottle do - sha256 "26914e81f2b90c88aa281193f50dcd26ae97ed001185d55b62af70874e11e8fa" => :mojave - sha256 "afff87970c8491e5dd0c76f4b6f86f6de92531332aa24cedce29a6cd8a5dcdc8" => :high_sierra - sha256 "5346d11d6f89c0247a066e2c277c1c15c151c5b2a66e7cf0ce564277da359b98" => :sierra - end - - depends_on "cmake" => :build - depends_on "go" => :build - depends_on :macos => :yosemite - depends_on "openssl" - - fails_with :clang do - build 600 - cause "Fails with compile errors" - end - - fails_with :gcc do - build 820 - cause "Generates incorrect code" - end - - needs :cxx11 - - def install - ENV.cxx11 - - mkdir "build" do - args = std_cmake_args + %W[ - -DHOMEBREW=ON - -DUSE_OPTIMIZE_FOR_ARCHITECTURE=OFF - -DASM_OPTIMIZATIONS=OFF - -DCMAKE_INSTALL_DATADIR=#{share} - -DCMAKE_INSTALL_DATAROOTDIR=#{share} - -DCMAKE_INSTALL_SYSCONFDIR=#{etc} - -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} - ] - - if ENV.compiler == "gcc-6" - ENV.append "V8_CXXFLAGS", "-O3 -g -fno-delete-null-pointer-checks" - end - - system "cmake", "..", *args - system "make", "install" - - %w[arangod arango-dfdb arangosh foxx-manager].each do |f| - inreplace etc/"arangodb3/#{f}.conf", pkgshare, opt_pkgshare - end - end - end - - def post_install - (var/"lib/arangodb3").mkpath - (var/"log/arangodb3").mkpath - end - - def caveats - s = <<~EOS - An empty password has been set. Please change it by executing - #{opt_sbin}/arango-secure-installation - EOS - - s - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/arangodb/sbin/arangod" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - Program - #{opt_sbin}/arangod - RunAtLoad - - - - EOS - end - - test do - testcase = "require('@arangodb').print('it works!')" - output = shell_output("#{bin}/arangosh --server.password \"\" --javascript.execute-string \"#{testcase}\"") - assert_equal "it works!", output.chomp - end -end diff --git a/Formula/aravis.rb b/Formula/aravis.rb deleted file mode 100644 index a413e5de6dafa..0000000000000 --- a/Formula/aravis.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Aravis < Formula - desc "Vision library for genicam based cameras" - homepage "https://wiki.gnome.org/Projects/Aravis" - url "https://github.com/AravisProject/aravis/archive/ARAVIS_0_6_0.tar.gz" - sha256 "d7c047af9c845a3e036557b6e5d715da0c21eeb314f704a257f8636fcb634af6" - - bottle do - sha256 "535b46c36a805622b39db2f1eb0ee30b9a16a3b1cccc99af0fea4253f58a2b76" => :mojave - sha256 "e4b43a8840f5e21a9acc48faaced67a58432deb26d38c632d5b8ccda129f2dca" => :high_sierra - sha256 "33f2fb3607b7547ac3505c42f74743fa4cd281044bda83a3348e20e3fc5c0a79" => :sierra - sha256 "1594fd0d1117da017a5934b5c1444b7ff0f1642817640f33dc12bf23b3a8e5ba" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gtk-doc" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "glib" - depends_on "gst-plugins-base" - depends_on "gstreamer" - depends_on "gtk+3" - depends_on "intltool" - depends_on "libnotify" - depends_on "libusb" - - def install - inreplace "viewer/Makefile.am", "gtk-update-icon-cache", "gtk3-update-icon-cache" - system "./autogen.sh", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("gst-inspect-1.0 #{lib}/gstreamer-1.0/libgstaravis.0.6.so") - assert_match /Description *Aravis Video Source/, output - end -end diff --git a/Formula/arcade-learning-environment.rb b/Formula/arcade-learning-environment.rb deleted file mode 100644 index e0dcebeb8c627..0000000000000 --- a/Formula/arcade-learning-environment.rb +++ /dev/null @@ -1,40 +0,0 @@ -class ArcadeLearningEnvironment < Formula - desc "Platform for AI research" - homepage "https://github.com/mgbellemare/Arcade-Learning-Environment" - url "https://github.com/mgbellemare/Arcade-Learning-Environment/archive/v0.6.0.tar.gz" - sha256 "da4597edf8ebef99961394daca44fa30148c778adff59ee5aec073ea94dcc175" - revision 4 - head "https://github.com/mgbellemare/Arcade-Learning-Environment.git" - - bottle do - cellar :any - sha256 "c1df5b72ac9f1048c11b51133b3c703cab7ff5f184e5a3ac80df559ea7332f66" => :mojave - sha256 "4347e69ed56c1798240b6c160d7ddaedf5ecc2fb56b8d235c644ef44103f3dc9" => :high_sierra - sha256 "327944c55b6c2b917bfdc04c8cdfaffe59ecea5851f326369901949c0657a5ed" => :sierra - end - - depends_on "cmake" => :build - depends_on "numpy" - depends_on "python" - depends_on "sdl" - - def install - args = std_cmake_args + %W[ - -DCMAKE_INSTALL_NAME_DIR=#{opt_lib} - -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON - ] - system "cmake", ".", *args - system "make", "install" - system "python3", *Language::Python.setup_install_args(prefix) - end - - test do - output = shell_output("#{bin}/ale 2>&1", 1).lines.last.chomp - assert_equal "No ROM File specified.", output - (testpath/"test.py").write <<~EOS - from ale_python_interface import ALEInterface; - ale = ALEInterface(); - EOS - assert_match "ale.cfg", shell_output("python3 test.py 2>&1") - end -end diff --git a/Formula/archey.rb b/Formula/archey.rb deleted file mode 100644 index 69efa81d7e318..0000000000000 --- a/Formula/archey.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Archey < Formula - desc "Graphical system information display for macOS" - homepage "https://obihann.github.io/archey-osx/" - url "https://github.com/obihann/archey-osx/archive/1.6.0.tar.gz" - sha256 "0f0ffcf8c5f07610b98f0351dcb38bb8419001f40906d5dc4bfd28ef12dbd0f8" - revision 1 - head "https://github.com/obihann/archey-osx.git" - - bottle :unneeded - - # Fix double percent sign in battery output, remove in next release - unless build.head? - patch do - url "https://github.com/obihann/archey-osx/commit/cd125547d0936f066b64616553269bf647348e53.diff?full_index=1" - sha256 "c03b80e4d5aa114b81ac04bfa77c46055fe01764ae877a8a061f3d43c9de8a72" - end - end - - def install - bin.install "bin/archey" - end - - test do - assert_match "Archey OS X 1", shell_output("#{bin}/archey --help") - end -end diff --git a/Formula/archi-steam-farm.rb b/Formula/archi-steam-farm.rb deleted file mode 100644 index 6ad226049cfda..0000000000000 --- a/Formula/archi-steam-farm.rb +++ /dev/null @@ -1,30 +0,0 @@ -class ArchiSteamFarm < Formula - desc "ASF is a C# application that allows you to farm steam cards" - homepage "https://github.com/JustArchi/ArchiSteamFarm" - url "https://github.com/JustArchi/ArchiSteamFarm/releases/download/2.3.2.0/ASF.zip" - sha256 "1a9f50c3cf2eb00e5148bc21a209b0c7c275b6c36c8cae8b4d9b2469bee7ff33" - - bottle :unneeded - - depends_on "mono" - - def install - libexec.install "ASF.exe" - (bin/"asf").write <<~EOS - #!/bin/bash - mono #{libexec}/ASF.exe "$@" - EOS - - etc.install "config" => "asf" - libexec.install_symlink etc/"asf" => "config" - end - - def caveats; <<~EOS - Config: #{etc}/asf/ - EOS - end - - test do - assert_match "ASF V#{version}", shell_output("#{bin}/asf --client") - end -end diff --git a/Formula/archivemail.rb b/Formula/archivemail.rb deleted file mode 100644 index 785360a956d10..0000000000000 --- a/Formula/archivemail.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Archivemail < Formula - desc "Tool for archiving and compressing old email in mailboxes" - homepage "https://archivemail.sourceforge.io/" - url "https://downloads.sourceforge.net/project/archivemail/archivemail-0.9.0.tar.gz" - sha256 "4b430e2fba6f24970a67bd61eef39d7eae8209c7bef001196b997be1916fc663" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "33c0fd2530ac1f0d09ff9c357ea3cbd8774e05c1f78b7d73e9674af9b5ab3b42" => :mojave - sha256 "fdcee6cb204a8b0aeacb9d3774d782013b2a53e87c0f2995d939f00f7fe669e4" => :high_sierra - sha256 "fdcee6cb204a8b0aeacb9d3774d782013b2a53e87c0f2995d939f00f7fe669e4" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - def install - ENV.prepend_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - man1.install Dir[libexec/"share/man/man1/*"] - end - - test do - (testpath/"inbox").write <<~EOS - From MAILER-DAEMON Fri Jul 8 12:08:34 2011 - From: Author - To: Recipient - Subject: Sample message 1 - - This is the body. - - From MAILER-DAEMON Fri Jul 8 12:08:34 2012 - From: Author - To: Recipient - Subject: Sample message 2 - - This is the second body. - EOS - system bin/"archivemail", "--no-compress", "--date", "2012-01-01", (testpath/"inbox") - assert_predicate testpath/"inbox_archive", :exist? - assert_match "Sample message 1", File.read("inbox_archive") - assert !File.read("inbox").include?("Sample message 1") - assert_match "Sample message 2", File.read("inbox") - end -end diff --git a/Formula/archivemount.rb b/Formula/archivemount.rb deleted file mode 100644 index 73921ae42446e..0000000000000 --- a/Formula/archivemount.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Archivemount < Formula - desc "File system for accessing archives using libarchive" - homepage "https://www.cybernoia.de/software/archivemount.html" - url "https://www.cybernoia.de/software/archivemount/archivemount-0.8.12.tar.gz" - sha256 "247e475539b84e6d2a13083fd6df149995560ff1ea92fe9fdbfc87569943cb89" - - bottle do - cellar :any - sha256 "3003ff24d840602eada1d74a1d3c319b87090717594a89fa14941594d3bc6688" => :mojave - sha256 "e5ec32c8e34385931fe8a9cbd97b02dbba56650194e8cf8d0bfae628132ca096" => :high_sierra - sha256 "bbe1f730c843b49dbdf8fcb05822314eacec63535e5a13096bf672e4446bc0c0" => :sierra - sha256 "0723ee2f777084e9ed749c996ef0f48dd68d55925a008ed4283902c814e5748e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libarchive" - depends_on :osxfuse - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - system bin/"archivemount", "--version" - end -end diff --git a/Formula/argon2.rb b/Formula/argon2.rb deleted file mode 100644 index ae40c95d08cef..0000000000000 --- a/Formula/argon2.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Argon2 < Formula - desc "Password hashing library and CLI utility" - homepage "https://github.com/P-H-C/phc-winner-argon2" - url "https://github.com/P-H-C/phc-winner-argon2/archive/20171227.tar.gz" - sha256 "eaea0172c1f4ee4550d1b6c9ce01aab8d1ab66b4207776aa67991eb5872fdcd8" - head "https://github.com/P-H-C/phc-winner-argon2.git" - - bottle do - cellar :any - sha256 "0b01daa08f731fa6d107aa26fbc52a5ef8cd8c9bc78e700409aa47d070b92cf9" => :mojave - sha256 "139741b1c18f60d815ef22066fcfdd3803d688e01cf7f0c004ac5636e811e3ca" => :high_sierra - sha256 "e48789086ce519c82973ba6b92f28aa2effd558cdf2740ecaf1a10318a3fc40a" => :sierra - sha256 "cb15f70ccb45ddcfe5b267ab003ffcc07a47a5526b40da3b35135c21a64fb3d2" => :el_capitan - end - - def install - system "make" - system "make", "test" - system "make", "install", "PREFIX=#{prefix}" - doc.install "argon2-specs.pdf" - end - - test do - output = pipe_output("#{bin}/argon2 somesalt -t 2 -m 16 -p 4", "password") - assert_match "c29tZXNhbHQ$IMit9qkFULCMA/ViizL57cnTLOa5DiVM9eMwpAvPw", output - end -end diff --git a/Formula/argp-standalone.rb b/Formula/argp-standalone.rb deleted file mode 100644 index 4623c4c8e4b81..0000000000000 --- a/Formula/argp-standalone.rb +++ /dev/null @@ -1,45 +0,0 @@ -class ArgpStandalone < Formula - desc "Standalone version of arguments parsing functions from GLIBC" - homepage "https://www.lysator.liu.se/~nisse/misc/" - url "https://www.lysator.liu.se/~nisse/misc/argp-standalone-1.3.tar.gz" - sha256 "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "fb60d10ba68efda61d1dfdb161bcf9bfa0474c82b03e0579517cb10608aa9aea" => :mojave - sha256 "92532fafd8c2cc86b33de0f347496746d8049bb4d1a6ce0948148e0f3c4bca5a" => :high_sierra - sha256 "10627e72c0e0eb66cbd03a2beb767c06b8edad4bef01914de7f7c6c1be33a356" => :sierra - sha256 "798e6ddb78957f9ad33662287b5971aaf3a43f3646e84691d56b3b85ca06d47f" => :el_capitan - sha256 "c926ac0ad3b8dbb8c3e08299ade556470f81d3a88eb51dc60e7cfe107da533e8" => :yosemite - sha256 "789a73a54793c058ee419824d76d603562d56fe6c2bce37c6b5b47f8f0ddce2a" => :mavericks - sha256 "c1d91ec4ec7f0abee15fa5f58860057d8e8c58e25fd9231107f716bcd5e2a607" => :mountain_lion - end - - # This patch fixes compilation with Clang. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b5f0ad3/argp-standalone/patch-argp-fmtstream.h" - sha256 "5656273f622fdb7ca7cf1f98c0c9529bed461d23718bc2a6a85986e4f8ed1cb8" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - lib.install "libargp.a" - include.install "argp.h" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char ** argv) - { - return argp_parse(0, argc, argv, 0, 0, 0); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-largp", "-o", "test" - system "./test" - end -end diff --git a/Formula/argtable.rb b/Formula/argtable.rb deleted file mode 100644 index 0e2218644ac2e..0000000000000 --- a/Formula/argtable.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Argtable < Formula - desc "ANSI C library for parsing GNU-style command-line options" - homepage "https://argtable.sourceforge.io" - url "https://downloads.sourceforge.net/project/argtable/argtable/argtable-2.13/argtable2-13.tar.gz" - version "2.13" - sha256 "8f77e8a7ced5301af6e22f47302fdbc3b1ff41f2b83c43c77ae5ca041771ddbf" - - bottle do - cellar :any - sha256 "61ec2ac4b9e65f7965931dfd983848fae06130686c4f800eb9341f96a6f6d398" => :mojave - sha256 "e68b3df66d638a024c3b57b069bcdebfbdabb230a9c851de886321c2b3df7099" => :high_sierra - sha256 "9485d1e045ed40c0145eb867f9d24425ccedd53b4f0cb0ec949139b0c99507c7" => :sierra - sha256 "0a720e738557215bf1b58fa642ec2fc51971da38e98b987862fcd05cc54756f7" => :el_capitan - sha256 "9e9d1451712580f090f0078ec7774a0daeb1057be3b1762e3d8465264d969432" => :yosemite - sha256 "7081198c76023e34380d35682b7a4274a9faf98d3e3e3fa2a9fa801e0a320a8c" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "argtable2.h" - #include - #include - - int main (int argc, char **argv) { - struct arg_lit *all = arg_lit0 ("a", "all", "show all"); - struct arg_end *end = arg_end(20); - void *argtable[] = {all, end}; - - assert (arg_nullcheck(argtable) == 0); - if (arg_parse(argc, argv, argtable) == 0) { - if (all->count) puts ("Received option"); - } else { - puts ("Invalid option"); - } - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-largtable2", - "-o", "test" - assert_match "Received option", shell_output("./test -a") - assert_match "Received option", shell_output("./test --all") - assert_match "Invalid option", shell_output("./test -t") - end -end diff --git a/Formula/argus-clients.rb b/Formula/argus-clients.rb deleted file mode 100644 index 37d733bbb1ae8..0000000000000 --- a/Formula/argus-clients.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ArgusClients < Formula - desc "Audit Record Generation and Utilization System clients" - homepage "https://qosient.com/argus/" - url "https://qosient.com/argus/src/argus-clients-3.0.8.2.tar.gz" - sha256 "32073a60ddd56ea8407a4d1b134448ff4bcdba0ee7399160c2f801a0aa913bb1" - revision 2 - - bottle do - cellar :any - sha256 "36e51aaa7622a2da108c7ad863b52de41c3e0682dfb65b09d1a6e45b3c82db10" => :mojave - sha256 "c1e2461ae53031164d50a775b5c3f83b0f4155be54fac037b55934d940a631d4" => :high_sierra - sha256 "e1449092f7f8d2645de4339be67f9c84705f84b6d9fee8277277dbb5c3cd6625" => :sierra - sha256 "1f9efb0c9ed77f8c546595cfda46c60dcaec81e3c0d01e5a4d7a31595a24f88c" => :el_capitan - end - - depends_on "readline" - depends_on "rrdtool" - - def install - ENV.append "CFLAGS", "-std=gnu89" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match "Ra Version #{version}", shell_output("#{bin}/ra -h", 1) - end -end diff --git a/Formula/argus.rb b/Formula/argus.rb deleted file mode 100644 index f2722dbf28ed0..0000000000000 --- a/Formula/argus.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Argus < Formula - desc "Audit Record Generation and Utilization System server" - homepage "https://qosient.com/argus/" - url "https://qosient.com/argus/src/argus-3.0.8.2.tar.gz" - sha256 "ca4e3bd5b9d4a8ff7c01cc96d1bffd46dbd6321237ec94c52f8badd51032eeff" - - bottle do - cellar :any_skip_relocation - sha256 "83ea7bc0f0103ba900dad6856762aae355f726c0bb9f089cc5434c30dacce1fb" => :mojave - sha256 "faf6ef808e9ff867eed42586ae6c27f84b66933559e9960fb48853b67325fb20" => :high_sierra - sha256 "42487c51fa731752e10da402b5fac0f973ee090eaad19f8f4fd52fc5317c9cfb" => :sierra - sha256 "ea46f2010610e46c120e2df100d61e01c21ee58627e105273c0e0a76437150e1" => :el_capitan - sha256 "b4d359943e8404d7c6a340c36bbc4d42e14a56cd80e17a997114fdc6f76552d8" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match "Pages", shell_output("#{bin}/argus-vmstat") - end -end diff --git a/Formula/argyll-cms.rb b/Formula/argyll-cms.rb deleted file mode 100644 index 11ec60c090bcf..0000000000000 --- a/Formula/argyll-cms.rb +++ /dev/null @@ -1,44 +0,0 @@ -class ArgyllCms < Formula - desc "ICC compatible color management system" - homepage "https://www.argyllcms.com/" - url "https://www.argyllcms.com/Argyll_V2.0.1_src.zip" - version "2.0.1" - sha256 "7d6542c16118bb93ba252d72bc9562bf2b01d3ae62cc0583cf4331e766b3a512" - - bottle do - cellar :any - sha256 "94100f30f5b6b9bf796a0dcf9eeefbcae6cb5fcacb4f31d5ad726c07c108b1f8" => :mojave - sha256 "c7b3fb56921cc2285eb9a965530128aff808a625ee1807fe605be0c872e93123" => :high_sierra - sha256 "547e64c39eaaaecd4796a175f83e9217197ee90929b33b1572e9be483d097f3c" => :sierra - sha256 "433106360daf2a1af397b19ab3790c742c701a8a49e595b60a847d29154d5bb5" => :el_capitan - end - - depends_on "jam" => :build - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - conflicts_with "num-utils", :because => "both install `average` binaries" - - def install - # dyld: lazy symbol binding failed: Symbol not found: _clock_gettime - # Reported 20 Aug 2017 to graeme AT argyllcms DOT com - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "numlib/numsup.c", "CLOCK_MONOTONIC", "UNDEFINED_GIBBERISH" - end - - system "sh", "makeall.sh" - system "./makeinstall.sh" - rm "bin/License.txt" - prefix.install "bin", "ref", "doc" - end - - test do - system bin/"targen", "-d", "0", "test.ti1" - system bin/"printtarg", testpath/"test.ti1" - %w[test.ti1.ps test.ti1.ti1 test.ti1.ti2].each do |f| - assert_predicate testpath/f, :exist? - end - assert_match "Calibrate a Display", shell_output("#{bin}/dispcal 2>&1", 1) - end -end diff --git a/Formula/aria2.rb b/Formula/aria2.rb deleted file mode 100644 index 438ef405ea559..0000000000000 --- a/Formula/aria2.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Aria2 < Formula - desc "Download with resuming and segmented downloading" - homepage "https://aria2.github.io/" - url "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0.tar.xz" - sha256 "3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3" - revision 1 - - bottle do - cellar :any - sha256 "a5244c4733c43fdd2441e97abe12211cc718a383d5e7c3be2117cec7d87f9424" => :mojave - sha256 "8fe4633e41f67b4a80ad80f6c3423641d39e091779636c7b62e046c50331fe87" => :high_sierra - sha256 "04b6207d99d9882c41f11178a70f61c5aebc43e9db0d8ea87c2d870de2f7c646" => :sierra - sha256 "82f36d7a6cb88b292430a5ea05389e6e066f7e059df2468a2639cdd7844988c4" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libssh2" - - needs :cxx14 - - def install - # Fix "error: use of undeclared identifier 'make_unique'" - # Reported upstream 15 May 2018 https://github.com/aria2/aria2/issues/1198 - inreplace "src/bignum.h", "make_unique", "std::make_unique" - inreplace "configure", "-std=c++11", "-std=c++14" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-appletls - --with-libssh2 - --without-openssl - --without-gnutls - --without-libgmp - --without-libnettle - --without-libgcrypt - ] - - system "./configure", *args - system "make", "install" - - bash_completion.install "doc/bash_completion/aria2c" - end - - test do - system "#{bin}/aria2c", "https://brew.sh/" - assert_predicate testpath/"index.html", :exist?, "Failed to create index.html!" - end -end diff --git a/Formula/ark.rb b/Formula/ark.rb deleted file mode 100644 index 6cecb2d29b270..0000000000000 --- a/Formula/ark.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ark < Formula - desc "Disaster recovery for Kubernetes cluster resources and persistent volumes" - homepage "https://github.com/heptio/ark" - url "https://github.com/heptio/ark/archive/v0.10.0.tar.gz" - sha256 "95d7cd269f085a26f957b905c2232d9dffb81acf0af0bbdc0300f9e8de535e38" - - bottle do - cellar :any_skip_relocation - sha256 "1a72fe0416004c33e53bec256e8021ffab13a941f251526faf175fac15e3010d" => :mojave - sha256 "eb0f136f09565542a999126f6f8c74c25093b79cb982588a59141540c5d215e4" => :high_sierra - sha256 "4234249db66744eb35e0b59df7f9f0bfff572d331dc3c5ff5b7ef6f4e6329346" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/heptio/ark").install buildpath.children - - cd "src/github.com/heptio/ark" do - system "go", "build", "-o", bin/"ark", "-installsuffix", "static", - "-ldflags", - "-X github.com/heptio/ark/pkg/buildinfo.Version=#{version}", - "./cmd/ark" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/ark 2>&1") - assert_match "Heptio Ark is a tool for managing disaster recovery", output - assert_match "Version: #{version}", shell_output("#{bin}/ark version 2>&1") - system bin/"ark", "client", "config", "set", "TEST=value" - assert_match "value", shell_output("#{bin}/ark client config get 2>&1") - end -end diff --git a/Formula/arm-linux-gnueabihf-binutils.rb b/Formula/arm-linux-gnueabihf-binutils.rb deleted file mode 100644 index 4ce672aaa99a5..0000000000000 --- a/Formula/arm-linux-gnueabihf-binutils.rb +++ /dev/null @@ -1,37 +0,0 @@ -class ArmLinuxGnueabihfBinutils < Formula - desc "FSF/GNU binutils for cross-compiling to arm-linux" - homepage "https://www.gnu.org/software/binutils/binutils.html" - url "https://ftp.gnu.org/gnu/binutils/binutils-2.31.1.tar.gz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.31.1.tar.gz" - sha256 "e88f8d36bd0a75d3765a4ad088d819e35f8d7ac6288049780e2fefcad18dde88" - - bottle do - sha256 "133d41e8d94e272a87b71ee4f73c35aa954a38de1b13d9340b9756f56c62cc7d" => :mojave - sha256 "7603bd2dc2d5ff4ee8671ab3444d0d20d4f907fbb469fe3cd628540f68caf1ea" => :high_sierra - sha256 "e7179a5847a494bc9e141f6a863d3b4912c71981686e1a456d2368431a9ae33a" => :sierra - sha256 "4b727d9fc8ffe961eb071e69430367e217be6bd3d967d66960ad1903fe2b9ebf" => :el_capitan - end - - def install - ENV.cxx11 - - # Avoid build failure: https://sourceware.org/bugzilla/show_bug.cgi?id=23424 - ENV.append "CXXFLAGS", "-Wno-c++11-narrowing" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--enable-deterministic-archives", - "--prefix=#{prefix}", - "--disable-werror", - "--target=arm-linux-gnueabihf", - "--enable-gold=yes", - "--enable-ld=yes", - "--enable-interwork" - system "make" - system "make", "install" - end - - test do - assert_match "f()", shell_output("#{bin}/arm-linux-gnueabihf-c++filt _Z1fv") - end -end diff --git a/Formula/armadillo.rb b/Formula/armadillo.rb deleted file mode 100644 index afca1c3b4bb4a..0000000000000 --- a/Formula/armadillo.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Armadillo < Formula - desc "C++ linear algebra library" - homepage "https://arma.sourceforge.io/" - url "https://downloads.sourceforge.net/project/arma/armadillo-9.100.5.tar.xz" - sha256 "7e7dc6f1e876b8243c27a003b037559663371b42885436b1087757e652db41cd" - revision 2 - - bottle do - cellar :any - sha256 "5cad0c12bdff2e375c3daff9016835361761f9b45bc9af19eb5e3ac4141439ff" => :mojave - sha256 "e446e6f4fb46f2f975eb7864631c143ca235a0bb89776ac4f8282c99c0956529" => :high_sierra - sha256 "b1de7d65af96e81049a99352c1e32833d205d42cef0fd3ef28b085ea121f3ad3" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "arpack" - depends_on "hdf5" - depends_on "superlu" - - def install - system "cmake", ".", "-DDETECT_HDF5=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main(int argc, char** argv) { - std::cout << arma::arma_version::as_string() << std::endl; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-larmadillo", "-o", "test" - assert_equal Utils.popen_read("./test").to_i, version.to_s.to_i - end -end diff --git a/Formula/armor.rb b/Formula/armor.rb deleted file mode 100644 index 16ffc0dbc8d2d..0000000000000 --- a/Formula/armor.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Armor < Formula - desc "Uncomplicated, modern HTTP server" - homepage "https://github.com/labstack/armor" - url "https://github.com/labstack/armor/archive/v0.4.13.tar.gz" - sha256 "1e80b70c2fa245800594f3ef7b6bb14d2af4fda2a8622d3c8a0a28f9ef6c4629" - head "https://github.com/labstack/armor.git" - - bottle do - cellar :any_skip_relocation - sha256 "06688ea6376d5442935ae75c719f63e1f6302384b1197d790cf01feb35dfc645" => :mojave - sha256 "4aa066a1dc4f908c31168cb9a3ace4372d41b00f6b7f653fb957625f4e2c4145" => :high_sierra - sha256 "aeb2fda18ebb214da91feefd22f4476197ae81abbf6a766bd2c53ab8706d9d47" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GO111MODULE"] = "on" - ENV["GOPATH"] = buildpath - armorpath = buildpath/"src/github.com/labstack/armor" - armorpath.install buildpath.children - - cd armorpath do - system "go", "build", "-o", bin/"armor", "cmd/armor/main.go" - prefix.install_metafiles - end - end - - test do - begin - pid = fork do - exec "#{bin}/armor" - end - sleep 1 - output = shell_output("curl -sI http://localhost:8080") - assert_match(/200 OK/m, output) - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/arp-scan.rb b/Formula/arp-scan.rb deleted file mode 100644 index 41d9c7a5c822a..0000000000000 --- a/Formula/arp-scan.rb +++ /dev/null @@ -1,30 +0,0 @@ -class ArpScan < Formula - desc "ARP scanning and fingerprinting tool" - homepage "https://github.com/royhills/arp-scan" - url "https://github.com/royhills/arp-scan/archive/1.9.5.tar.gz" - sha256 "aa9498af84158a315b7e0ea6c2cddfa746660ca3987cbe7e32c0c90f5382d9d2" - revision 1 - head "https://github.com/royhills/arp-scan.git" - - bottle do - sha256 "b2b784e3577ce342c80a646428ebb672971a532679791467b009493e048896f8" => :mojave - sha256 "bc0fdf16b93e8793cbe2bc820969b167ef54df05d25e2d1f9162bda984768241" => :high_sierra - sha256 "8e372e2939b71602ed646c55ccf80a8a17f16e00c25e3eb2a7a273a7df19a487" => :sierra - sha256 "15502dca99f62348373e10510432ff389170fa4b1cbf40a52b546e3c5beecf40" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libpcap" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/arp-scan", "-V" - end -end diff --git a/Formula/arp-sk.rb b/Formula/arp-sk.rb deleted file mode 100644 index 5829d7f286a62..0000000000000 --- a/Formula/arp-sk.rb +++ /dev/null @@ -1,31 +0,0 @@ -class ArpSk < Formula - desc "ARP traffic generation tool" - homepage "https://web.archive.org/web/20180223202629/sid.rstack.org/arp-sk/" - url "https://web.archive.org/web/20180223202629/sid.rstack.org/arp-sk/files/arp-sk-0.0.16.tgz" - mirror "https://pkg.freebsd.org/ports-distfiles/arp-sk-0.0.16.tgz" - sha256 "6e1c98ff5396dd2d1c95a0d8f08f85e51cf05b1ed85ea7b5bcf73c4ca5d301dd" - - bottle do - cellar :any - sha256 "b0c8b814c565ed44ce9bf1a52f9555fa6223d64a51bece46749a71403d1988fd" => :mojave - sha256 "db71e1610feac13246511f6c67bbf224e20b49e9a130d76dc5ca3317fe755601" => :high_sierra - sha256 "d933c37e26f227918a6e770dc3214a76f06ca79abbf1f646a6c00447ad9933ac" => :sierra - sha256 "5d112e8d54329bff104270b7ca27cd4884e48f8c47904bb5838a2e107c035736" => :el_capitan - sha256 "11253608a659d16a179c9c7b25050989991a29a68c9c9b4647fe9614e191fcff" => :yosemite - sha256 "cea3047a876b12520e9614be8cfcf09348a49522bb5c8bbb7d2c185950e4c08d" => :mavericks - end - - depends_on "libnet" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-libnet=#{Formula["libnet"].opt_prefix}" - system "make", "install" - end - - test do - assert_match "arp-sk version #{version}", shell_output("#{sbin}/arp-sk -V") - end -end diff --git a/Formula/arpack.rb b/Formula/arpack.rb deleted file mode 100644 index 31c85b5ffb1f4..0000000000000 --- a/Formula/arpack.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Arpack < Formula - desc "Routines to solve large scale eigenvalue problems" - homepage "https://github.com/opencollab/arpack-ng" - url "https://github.com/opencollab/arpack-ng/archive/3.6.3.tar.gz" - sha256 "64f3551e5a2f8497399d82af3076b6a33bf1bc95fc46bbcabe66442db366f453" - head "https://github.com/opencollab/arpack-ng.git" - - bottle do - sha256 "ddf478d1a70c309b7e623003f3bf2b88faab80a9ce28b7de4d4b52a38b074683" => :mojave - sha256 "ef0340677c5137666d663accbcbb137496f9bb366ad1fa3b1bc70643fb43bb42" => :high_sierra - sha256 "f6822d4de016811fb2200f576ed5257472afd57c9e13ebd6d3324d54e7ea5736" => :sierra - sha256 "6db44ed19be3e9fc92fac97a35965156af0351b03e8f0fdba3e19529d854a0af" => :el_capitan - end - - option "with-mpi", "Enable parallel support" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - depends_on "gcc" # for gfortran - depends_on "open-mpi" if build.with? "mpi" - depends_on "veclibfort" - - def install - args = %W[ --disable-dependency-tracking - --prefix=#{libexec} - --with-blas=-L#{Formula["veclibfort"].opt_lib}\ -lvecLibFort ] - - args << "F77=mpif77" << "--enable-mpi" if build.with? "mpi" - - system "./bootstrap" - system "./configure", *args - system "make" - system "make", "install" - - lib.install_symlink Dir["#{libexec}/lib/*"].select { |f| File.file?(f) } - (lib/"pkgconfig").install_symlink Dir["#{libexec}/lib/pkgconfig/*"] - pkgshare.install "TESTS/testA.mtx", "TESTS/dnsimp.f", - "TESTS/mmio.f", "TESTS/debug.h" - - if build.with? "mpi" - (libexec/"bin").install (buildpath/"PARPACK/EXAMPLES/MPI").children - end - end - - test do - system "gfortran", "-o", "test", pkgshare/"dnsimp.f", pkgshare/"mmio.f", - "-L#{lib}", "-larpack", - "-L#{Formula["veclibfort"].opt_lib}", "-lvecLibFort" - cp_r pkgshare/"testA.mtx", testpath - assert_match "reached", shell_output("./test") - - if build.with? "mpi" - cp_r (libexec/"bin").children, testpath - %w[pcndrv1 pdndrv1 pdndrv3 pdsdrv1 - psndrv1 psndrv3 pssdrv1 pzndrv1].each do |slv| - system "mpirun", "-np", "4", slv - end - end - end -end diff --git a/Formula/arping.rb b/Formula/arping.rb deleted file mode 100644 index fd7e8899f36a3..0000000000000 --- a/Formula/arping.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Arping < Formula - desc "Utility to check whether MAC addresses are already taken on a LAN" - homepage "https://github.com/ThomasHabets/arping" - url "https://github.com/ThomasHabets/arping/archive/arping-2.19.tar.gz" - sha256 "b1477892e19687a99fa4fb42e147d7478d96d0d3fc78ca4faade6392452414db" - - bottle do - cellar :any - sha256 "1ad01f9bf993312c04c2b67d9b0b975e20ea017a88d771b6ab0dafab9ad35114" => :mojave - sha256 "10814e4189c25dd909346c39ab9b504244596a8b09dffc9d7ca91272decfded5" => :high_sierra - sha256 "fff7a3fa700564778114ad421446a48fedd06e252074c6be66e2c4102e538ec4" => :sierra - sha256 "e60c8221e95db34d5d2a66039d229e242f194b05e22aa4ebdefd7b06cd00fb74" => :el_capitan - sha256 "cca37d86bc0c93413cd9b1d9259113c21e7b512c780f1e74da71f981e3986c8b" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libnet" - - def install - system "./bootstrap.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{sbin}/arping", "--help" - end -end diff --git a/Formula/arpoison.rb b/Formula/arpoison.rb deleted file mode 100644 index 762e1c3ece44f..0000000000000 --- a/Formula/arpoison.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Arpoison < Formula - desc "UNIX arp cache update utility" - homepage "http://www.arpoison.net/" - url "http://www.arpoison.net/arpoison-0.7.tar.gz" - sha256 "63571633826e413a9bdaab760425d0fab76abaf71a2b7ff6a00d1de53d83e741" - - bottle do - cellar :any - rebuild 1 - sha256 "85237acdcba092c948cd45c98ad0e9fdfea757d155e7a464a8379fee5b9420a8" => :mojave - sha256 "eb37399841022351ef5551de5a63ecfc93d061d03518d62f01852a1d8e663e4e" => :high_sierra - sha256 "2ed60cb186440c24eaf0c8e040acb89ba60cdd730c83f4c6793add25c80a67ca" => :sierra - sha256 "33e496f9d1ca384ad23c50a1868fc2682352176d1cf5b37472299a9e36dc7e6c" => :el_capitan - sha256 "9d902ac3611dd0422783aecb7d46f39dd0278f65f5cab1aa99490fb527de5e22" => :yosemite - sha256 "0737a954fa5f4d6794f7a373b90b5d2b2008a0bf7cdc4e2fd51266485e86b983" => :mavericks - end - - depends_on "libnet" - - def install - system "make" - bin.install "arpoison" - man8.install "arpoison.8" - end - - test do - # arpoison needs to run as root to do anything useful - assert_match "target MAC", shell_output("#{bin}/arpoison", 1) - end -end diff --git a/Formula/arss.rb b/Formula/arss.rb deleted file mode 100644 index d6975d493c3c8..0000000000000 --- a/Formula/arss.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Arss < Formula - desc "Analyze a sound file into a spectrogram" - homepage "https://arss.sourceforge.io/" - url "https://downloads.sourceforge.net/project/arss/arss/0.2.3/arss-0.2.3-src.tar.gz" - sha256 "e2faca8b8a3902226353c4053cd9ab71595eec6ead657b5b44c14b4bef52b2b2" - - bottle do - cellar :any - sha256 "891cda5121a3ea035215f0113d5291fa9afd468e68cc3dc9238b203985fcfe96" => :mojave - sha256 "b848efa3abde7c5fffd18289c1ab51a842cd93e0e97d6af32329acf869909d38" => :high_sierra - sha256 "2311c31ae2e80905dfc41c8adb9639314664103352540b198f24c54e0c102550" => :sierra - sha256 "5da45934b19d0cab02c809932fb8c5da3fd76d2f781bc9e2e7a98fa1825989eb" => :el_capitan - sha256 "268225389842f4952424b17c7b94759b7a3d3009053b50718f1e4155b7eace86" => :yosemite - sha256 "7159b6b56ad3878bc84b9fdf9d708f0828637db64ae12ef96f39820c2f22d061" => :mavericks - end - - depends_on "cmake" => :build - depends_on "fftw" - - def install - cd "src" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - system "#{bin}/arss", "--version" - end -end diff --git a/Formula/artifactory.rb b/Formula/artifactory.rb deleted file mode 100644 index 3e93c3d00e8a3..0000000000000 --- a/Formula/artifactory.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Artifactory < Formula - desc "Manages binaries" - homepage "https://www.jfrog.com/artifactory/" - url "https://dl.bintray.com/jfrog/artifactory/jfrog-artifactory-oss-6.3.2.zip" - sha256 "322bd08aa5b68b084c1c8ad1203d05ac6915a48cccb1a8b819693011d6be6782" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - # Remove Windows binaries - rm_f Dir["bin/*.bat"] - rm_f Dir["bin/*.exe"] - - # Set correct working directory - inreplace "bin/artifactory.sh", - 'export ARTIFACTORY_HOME="$(cd "$(dirname "${artBinDir}")" && pwd)"', - "export ARTIFACTORY_HOME=#{libexec}" - - libexec.install Dir["*"] - - # Launch Script - bin.install_symlink libexec/"bin/artifactory.sh" - # Memory Options - bin.install_symlink libexec/"bin/artifactory.default" - end - - def post_install - # Create persistent data directory. Artifactory heavily relies on the data - # directory being directly under ARTIFACTORY_HOME. - # Therefore, we symlink the data dir to var. - data = var/"artifactory" - data.mkpath - - libexec.install_symlink data => "data" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/artifactory/libexec/bin/artifactory.sh" - - def plist; <<~EOS - - - - - Label - com.jfrog.artifactory - - WorkingDirectory - #{libexec} - - Program - #{bin}/artifactory.sh - - KeepAlive - - - - EOS - end - - test do - assert_match "Checking arguments to Artifactory", pipe_output("#{bin}/artifactory.sh check") - end -end diff --git a/Formula/arx-libertatis.rb b/Formula/arx-libertatis.rb deleted file mode 100644 index 5c2ba50d35030..0000000000000 --- a/Formula/arx-libertatis.rb +++ /dev/null @@ -1,89 +0,0 @@ -class ArxLibertatis < Formula - desc "Cross-platform, open source port of Arx Fatalis" - homepage "https://arx-libertatis.org/" - revision 1 - - stable do - url "https://arx-libertatis.org/files/arx-libertatis-1.1.2.tar.xz" - sha256 "82adb440a9c86673e74b84abd480cae968e1296d625b6d40c69ca35b35ed4e42" - - # Add a missing include to CMakeLists.txt - patch do - url "https://github.com/arx/ArxLibertatis/commit/442ba4af978160abd3856a9daec38f5b6e213cb4.patch?full_index=1" - sha256 "de361866cc51c14f317a67dcfd3b736160a577238f931c78a525ea2864b1add9" - end - end - - bottle do - cellar :any - sha256 "9e9f88d9c0c24e99bed8f2243da32fe41b1859aaa25121dab9d4c20a354ef5e6" => :mojave - sha256 "eaff0f12ab121a5964e7d0cd8c9272a39daba70a268d039728947c72885be8b2" => :high_sierra - sha256 "9a7629e5033f4180f9e0a82bb018c2f00403c09aa473cfa0224301cc405fb6d3" => :sierra - sha256 "8824a97e84542832da85eeb48b79a6b1de189ddf6ebe041fc7f1c9cb874fad21" => :el_capitan - sha256 "1fc2d3c07f6f1a1cf1470138329290484145f7774b16fc5a8ca82d01ea194312" => :yosemite - end - - head do - url "https://github.com/arx/ArxLibertatis.git" - - resource "arx-libertatis-data" do - url "https://github.com/arx/ArxLibertatisData.git" - end - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "glm" => :build - depends_on "freetype" - depends_on "glew" - depends_on "innoextract" - depends_on "sdl" - - conflicts_with "rnv", :because => "both install `arx` binaries" - - def install - args = std_cmake_args - - # The patches for these aren't straightforward to backport because of - # other changes; these minimal inreplaces get it building. - # HEAD is fine, and the next stable release will contain these changes. - if build.stable? - # https://github.com/arx/ArxLibertatis/commit/39fb9a0e3a6888a6a5f040e39896e88750c89065 - inreplace "src/platform/Time.cpp", "clock_t ", "clockid_t " - - # Version parsing is broken in the current stable; fixed upstream. - # This hardcodes the current version based on data from VERSION. - inreplace "src/core/Version.cpp.in" do |s| - s.gsub! "${VERSION_COUNT}", "5" - s.gsub! "${VERSION_2}", "10" - s.gsub! "${VERSION_0}", "1.1.2" - s.gsub! "${GIT_SUFFIX_5}", "+Homebrew-1" - s.gsub! "${VERSION_4}", "Rhaa Movis" - end - end - - # Install prebuilt icons to avoid inkscape and imagemagick deps - if build.head? - (buildpath/"arx-libertatis-data").install resource("arx-libertatis-data") - args << "-DDATA_FILES=#{buildpath}/arx-libertatis-data" - end - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - def caveats; <<~EOS - This package only contains the Arx Libertatis binary, not the game data. - To play Arx Fatalis you will need to obtain the game from GOG.com and - install the game data with: - - arx-install-data /path/to/setup_arx_fatalis.exe - EOS - end - - test do - system "#{bin}/arx", "-h" - end -end diff --git a/Formula/arx.rb b/Formula/arx.rb deleted file mode 100644 index e567e51c47bec..0000000000000 --- a/Formula/arx.rb +++ /dev/null @@ -1,40 +0,0 @@ -require "language/haskell" - -class Arx < Formula - include Language::Haskell::Cabal - - desc "Bundles files and programs for easy transfer and repeatable execution" - homepage "https://github.com/solidsnack/arx" - url "https://github.com/solidsnack/arx/archive/0.3.2.tar.gz" - sha256 "81fc7e8de484e865c04fda1bf4619030621e261102aa79490a18ab4e4275105f" - - bottle do - cellar :any_skip_relocation - sha256 "b8fc00cd6d272e33046cd7fad782c4d3f5fccd61d1aaf2ddca92db58acf79247" => :mojave - sha256 "ff5ed85033e8e8e32cb86bc17ff3fcf61ee3ca4789663a7df73d72b6e538d560" => :high_sierra - sha256 "e9784c07ce08e7dcc11d779a8357a65d1e2f338349c8466b2262f8695fb9b2d2" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - cabal_sandbox do - cabal_install "--only-dependencies" - - system "make" - - tag = `./bin/dist tag`.chomp - bin.install "tmp/dist/arx-#{tag}/arx" => "arx" - end - end - - test do - testscript = (testpath/"testing.sh") - - testscript.write shell_output("#{bin}/arx tmpx // echo 'testing'") - testscript.chmod 0555 - - assert_match /testing/, shell_output("./testing.sh") - end -end diff --git a/Formula/ascii.rb b/Formula/ascii.rb deleted file mode 100644 index 23cc03fa892d7..0000000000000 --- a/Formula/ascii.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ascii < Formula - desc "List ASCII idiomatic names and octal/decimal code-point forms" - homepage "http://www.catb.org/~esr/ascii/" - url "http://www.catb.org/~esr/ascii/ascii-3.18.tar.gz" - sha256 "728422d5f4da61a37a17b4364d06708e543297de0a5f70305243236d80df072d" - - bottle do - cellar :any_skip_relocation - sha256 "d5f4c8fe4ad1467c1708e49268a42f0d201f8c18ed912cf3de330bdf1f219cc1" => :mojave - sha256 "858e5bd8f55367349f936f47346a7d4dc2afed7c8f3d9fca16c42071f537f644" => :high_sierra - sha256 "52fb2a78a1409f4f6db0b59589f773c4427c87a84a7fee1809e5f0a4d50e4d65" => :sierra - sha256 "bbb5f365f96e42dfaa8af31f21daa8809b0a628451599fab7bc7509ceeb0d14f" => :el_capitan - sha256 "ab520ebbe64a946a0ac0466537a0e207e49cd85979e41582ab542dcaef9db3ff" => :yosemite - end - - head do - url "git://thyrsus.com/repositories/ascii.git" - depends_on "xmlto" => :build - end - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" if build.head? - bin.mkpath - man1.mkpath - system "make" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - assert_match "Official name: Line Feed", shell_output(bin/"ascii 0x0a") - end -end diff --git a/Formula/asciidoc.rb b/Formula/asciidoc.rb deleted file mode 100644 index c481e8ca46f44..0000000000000 --- a/Formula/asciidoc.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Asciidoc < Formula - desc "Formatter/translator for text files to numerous formats. Includes a2x" - homepage "http://asciidoc.org/" - # This release is listed as final on GitHub, but not listed on asciidoc.org. - url "https://github.com/asciidoc/asciidoc/archive/8.6.10.tar.gz" - sha256 "9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983" - revision 2 - head "https://github.com/asciidoc/asciidoc.git" - - bottle do - cellar :any_skip_relocation - sha256 "f89040aa055faab054a4b82e0cdfec724b57529844368c2f4fe81683ee2967f9" => :mojave - sha256 "0a021fbfe992e2357c6d6b9b940ca3b080911a6d156bd3fb52775c452a272075" => :high_sierra - sha256 "0a021fbfe992e2357c6d6b9b940ca3b080911a6d156bd3fb52775c452a272075" => :sierra - end - - depends_on "autoconf" => :build - depends_on "docbook-xsl" => :build - depends_on "docbook" - depends_on "source-highlight" - - def install - ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/2.7/bin" - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - system "autoconf" - system "./configure", "--prefix=#{prefix}" - - inreplace %w[a2x.py asciidoc.py filters/code/code-filter.py - filters/graphviz/graphviz2png.py filters/latex/latex2img.py - filters/music/music2png.py filters/unwraplatex.py], - "#!/usr/bin/env python2", "#!/usr/bin/python" - - # otherwise macOS's xmllint bails out - inreplace "Makefile", "-f manpage", "-f manpage -L" - system "make", "install" - system "make", "docs" - end - - def caveats - <<~EOS - If you intend to process AsciiDoc files through an XML stage - (such as a2x for manpage generation) you need to add something - like: - - export XML_CATALOG_FILES=#{etc}/xml/catalog - - to your shell rc file so that xmllint can find AsciiDoc's - catalog files. - - See `man 1 xmllint' for more. - EOS - end - - test do - (testpath/"test.txt").write("== Hello World!") - system "#{bin}/asciidoc", "-b", "html5", "-o", "test.html", "test.txt" - assert_match %r{\

Hello World!\}, File.read("test.html") - end -end diff --git a/Formula/asciidoctor.rb b/Formula/asciidoctor.rb deleted file mode 100644 index 38122baf60d83..0000000000000 --- a/Formula/asciidoctor.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Asciidoctor < Formula - desc "Text processor and publishing toolchain for AsciiDoc" - homepage "https://asciidoctor.org/" - url "https://github.com/asciidoctor/asciidoctor/archive/v1.5.8.tar.gz" - sha256 "bc225145feb7876bce5188aa3ef511fad49b141ec18e1bb60e69b33b0a100da0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0cd37a53d270739c7798368d25762ecfdd4f962a6dd65805775940985f822c84" => :mojave - sha256 "8e11a9703b0ce01f19e64065fb296b18a2eee334c2630cb4aa5fb3bfd36ddf9c" => :high_sierra - sha256 "de3c2471e4afa84af77b5a5e6e78443c4b6f297d2f6da03e64d62ce1f2ac8491" => :sierra - end - - def install - ENV["GEM_HOME"] = libexec - system "gem", "build", "asciidoctor.gemspec" - system "gem", "install", "asciidoctor-#{version}.gem" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - (testpath/"test.adoc").write("= AsciiDoc is Writing Zen") - system bin/"asciidoctor", "-b", "html5", "-o", "test.html", "test.adoc" - assert_match "

AsciiDoc is Writing Zen

", File.read("test.html") - end -end diff --git a/Formula/asciidoctorj.rb b/Formula/asciidoctorj.rb deleted file mode 100644 index d306a5377b2de..0000000000000 --- a/Formula/asciidoctorj.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Asciidoctorj < Formula - desc "Java wrapper and bindings for Asciidoctor" - homepage "https://github.com/asciidoctor/asciidoctorj" - url "https://dl.bintray.com/asciidoctor/maven/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6-bin.zip" - sha256 "be2f7afe0b713bf5b3e625a99a588a87e91afb2eb684c9b1fd0653db88154e1d" - - bottle :unneeded - - depends_on :java => "1.6+" - - def install - rm_rf Dir["bin/*.bat"] # Remove Windows files. - libexec.install Dir["*"] - - executable = libexec/"bin/asciidoctorj" - executable.chmod 0555 - bin.write_exec_script executable - end - - test do - (testpath/"test.adoc").write <<~EOS - = This Is A Title - Random J. Author - :icons: font - - Hello, World! - - == Syntax Highlighting - - Python source. - - [source, python] - ---- - import something - ---- - - List - - - one - - two - - three - EOS - system bin/"asciidoctorj", "-b", "pdf", "test.adoc" - assert_predicate testpath/"test.pdf", :exist? - end -end diff --git a/Formula/asciinema.rb b/Formula/asciinema.rb deleted file mode 100644 index 0728a47747500..0000000000000 --- a/Formula/asciinema.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Asciinema < Formula - desc "Record and share terminal sessions" - homepage "https://asciinema.org" - url "https://github.com/asciinema/asciinema/archive/v2.0.1.tar.gz" - sha256 "7087b247dae36d04821197bc14ebd4248049592b299c9878d8953c025ac802e4" - revision 1 - head "https://github.com/asciinema/asciinema.git" - - bottle do - cellar :any_skip_relocation - sha256 "d5beedf1dd255d1bc2793aee0d5ed024730f2c9162b4fa52680311371d0c9c11" => :mojave - sha256 "7673916f20d752ad61c5bc859fef8d5a4baec23e684b1bff0363fac3e789ae68" => :high_sierra - sha256 "7673916f20d752ad61c5bc859fef8d5a4baec23e684b1bff0363fac3e789ae68" => :sierra - sha256 "7673916f20d752ad61c5bc859fef8d5a4baec23e684b1bff0363fac3e789ae68" => :el_capitan - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - system "#{bin}/asciinema", "--version" - system "#{bin}/asciinema", "--help" - end -end diff --git a/Formula/asciiquarium.rb b/Formula/asciiquarium.rb deleted file mode 100644 index 56850f5a5d356..0000000000000 --- a/Formula/asciiquarium.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Asciiquarium < Formula - desc "Aquarium animation in ASCII art" - homepage "https://robobunny.com/projects/asciiquarium/html/" - url "https://robobunny.com/projects/asciiquarium/asciiquarium_1.1.tar.gz" - sha256 "1b08c6613525e75e87546f4e8984ab3b33f1e922080268c749f1777d56c9d361" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "7c9263400bd1045b998e5f48d34d79fa4df0e27daf5f9c49afb1ed283a39f537" => :mojave - sha256 "10d2a74f8e447c87fa477de74aa692a1d0043ab508e9a924126e0a3d55ffe5a7" => :high_sierra - sha256 "890b0e69b0261ff61b0d0666f2b3e0f579c1f63556c77c2d8d24bc1ef3f4e241" => :sierra - sha256 "9120f02b70c63672af2752de536aeaeac5ef57bc2b3a388afe1ab9e12d40a59b" => :el_capitan - sha256 "6b20abf264f40c7123e40f0f34cfc11f0c12a03b1a74a324e3f3a7ae75e94f3f" => :yosemite - end - - resource "Curses" do - url "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.34.tar.gz" - sha256 "808e44d5946be265af5ff0b90f3d0802108e7d1b39b0fe68a4a446fe284d322b" - end - - resource "Term::Animation" do - url "https://cpan.metacpan.org/authors/id/K/KB/KBAUCOM/Term-Animation-2.6.tar.gz" - sha256 "7d5c3c2d4f9b657a8b1dce7f5e2cbbe02ada2e97c72f3a0304bf3c99d084b045" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - end - - # Disable dynamic selection of perl which may cause segfault when an - # incompatible perl is picked up. - # https://github.com/Homebrew/homebrew-core/issues/4936 - inreplace "asciiquarium", "#!/usr/bin/env perl", "#!/usr/bin/perl" - - chmod 0755, "asciiquarium" - bin.install "asciiquarium" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - # This is difficult to test because: - # - There are no command line switches that make the process exit - # - The output is a constant stream of terminal control codes - # - Testing only if the binary exists can still result in failure - - # The test process is as follows: - # - Spawn the process capturing stdout and the pid - # - Kill the process after there is some output - # - Ensure the start of the output matches what is expected - - require "pty" - ENV["TERM"] = "xterm" - PTY.spawn(bin/"asciiquarium") do |stdin, _stdout, pid| - sleep 0.1 - Process.kill "TERM", pid - output = stdin.read - assert_match "\e[?10", output[0..4] - end - end -end diff --git a/Formula/asciitex.rb b/Formula/asciitex.rb deleted file mode 100644 index 5fc3fea1f6e82..0000000000000 --- a/Formula/asciitex.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Asciitex < Formula - desc "Generate ASCII-art representations of mathematical equations" - homepage "https://asciitex.sourceforge.io" - url "https://downloads.sourceforge.net/project/asciitex/asciiTeX-0.21.tar.gz" - sha256 "abf964818833d8b256815eb107fb0de391d808fe131040fb13005988ff92a48d" - - bottle do - cellar :any_skip_relocation - sha256 "d5f864f9e6722d36da2e0412d4523a4977599c1229e3fb122bf4a0b29421c082" => :mojave - sha256 "28a1327d58e05b74df8382ce37595d8d80decaf5cdbac4739995bc53d9f30ef7" => :high_sierra - sha256 "9828783530514218f99ea7eabfad2031caeac979fac90cc9e049de4b4622fb80" => :sierra - sha256 "0ae267d7ffcf17769da97275af047dc2a4ba9e5086acdb53dd11ca41f3d40ddb" => :el_capitan - sha256 "e9eadc960e449db67f305c3e1cc8d4f025288967bb8b6a37f5ba4bf5ad58493d" => :yosemite - sha256 "31518a63d9b06f8e47ff57c5d6d22ca838abc2c1366d59db2bb8967971134d52" => :mavericks - sha256 "cfcef4a17d2194a111da39891f06694d2056082915858d3cf938d3659b2d1a64" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-gtk" - inreplace "Makefile", "man/asciiTeX_gui.1", "" - system "make", "install" - pkgshare.install "EXAMPLES" - end - - test do - system "#{bin}/asciiTeX", "-f", "#{pkgshare}/EXAMPLES" - end -end diff --git a/Formula/asdf.rb b/Formula/asdf.rb deleted file mode 100644 index 1030fcebfe626..0000000000000 --- a/Formula/asdf.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Asdf < Formula - desc "Extendable version manager with support for Ruby, Node.js, Erlang & more" - homepage "https://github.com/asdf-vm" - url "https://github.com/asdf-vm/asdf/archive/v0.6.2.tar.gz" - sha256 "5d8c19c311206f5ea4a3a4a978bc5140924d6faf4880dfb7f68cdf1077f036e6" - head "https://github.com/asdf-vm/asdf.git" - - bottle :unneeded - - depends_on "autoconf" - depends_on "automake" - depends_on "coreutils" - depends_on "libtool" - depends_on "libyaml" - depends_on "openssl" - depends_on "readline" - depends_on "unixodbc" - - def install - bash_completion.install "completions/asdf.bash" - fish_completion.install "completions/asdf.fish" - libexec.install "bin/private" - prefix.install Dir["*"] - - inreplace "#{lib}/commands/reshim.sh", - "exec $(asdf_dir)/bin/private/asdf-exec ", - "exec $(asdf_dir)/libexec/private/asdf-exec " - end - - test do - output = shell_output("#{bin}/asdf plugin-list 2>&1", 1) - assert_match "Oohes nooes ~! No plugins installed", output - end -end diff --git a/Formula/asio.rb b/Formula/asio.rb deleted file mode 100644 index bb86a7be3c6b0..0000000000000 --- a/Formula/asio.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Asio < Formula - desc "Cross-platform C++ Library for asynchronous programming" - homepage "https://think-async.com/Asio" - url "https://downloads.sourceforge.net/project/asio/asio/1.12.1%20%28Stable%29/asio-1.12.1.tar.bz2" - sha256 "a9091b4de847539fa5b2259bf76a5355339c7eaaa5e33d7d4ae74d614c21965a" - head "https://github.com/chriskohlhoff/asio.git" - - bottle do - cellar :any - sha256 "49e8f4686ca26f77e22ffc4ef9fe5715b402bb14bdc118c87a9bfe0a3e0f348c" => :mojave - sha256 "65892f6827794887cb8ace02435bdbce35e213b74e3c8acfc157a9f5ef41f239" => :high_sierra - sha256 "6564529f098c6f936c7b57aaf562c396f89bc4e8b13018b1bf395502616b4b92" => :sierra - sha256 "fbb2170a86dcb1af7b899e0a877dd5351ae891abf3a3bc82e0afc7ce3b5dfa24" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - depends_on "openssl" - - needs :cxx11 - - def install - ENV.cxx11 - - if build.head? - cd "asio" - system "./autogen.sh" - else - system "autoconf" - end - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-boost=no" - system "make", "install" - pkgshare.install "src/examples" - end - - test do - found = [pkgshare/"examples/cpp11/http/server/http_server", - pkgshare/"examples/cpp03/http/server/http_server"].select(&:exist?) - raise "no http_server example file found" if found.empty? - pid = fork do - exec found.first, "127.0.0.1", "8080", "." - end - sleep 1 - begin - assert_match /404 Not Found/, shell_output("curl http://127.0.0.1:8080") - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/ask-cli.rb b/Formula/ask-cli.rb deleted file mode 100644 index 63f12369ad614..0000000000000 --- a/Formula/ask-cli.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class AskCli < Formula - desc "CLI tool for Alexa Skill Kit" - homepage "https://www.npmjs.com/package/ask-cli" - url "https://registry.npmjs.org/ask-cli/-/ask-cli-1.4.1.tgz" - sha256 "6521100da683326ada697b0e6240c49fc02e272e702226bd84a43fc6c544ec03" - - bottle do - sha256 "91c1350fcb4040ff49030583107fd8ede5762d202024549c609c9a49d706aa85" => :mojave - sha256 "280957dd55800a896a8315996c4e5572471aa30cc1e5bd7b8b35edf6df9532a5" => :high_sierra - sha256 "37e48a253231738d42b2df71689285b682013b50b32254130dbea72a4f57cd97" => :sierra - sha256 "fb964579b3f6a28671081bfeeb1c7d6f505f6db3a026b19f745c3f876d7054f1" => :el_capitan - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - output = shell_output("#{bin}/ask deploy 2>&1", 1) - assert_match %r{\AInvalid json: [^ ]+\/.ask\/cli_config\Z}, output - end -end diff --git a/Formula/asn1c.rb b/Formula/asn1c.rb deleted file mode 100644 index 430c4ba1ad429..0000000000000 --- a/Formula/asn1c.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Asn1c < Formula - desc "Compile ASN.1 specifications into C source code" - homepage "https://lionet.info/asn1c/blog/" - url "https://github.com/vlm/asn1c/releases/download/v0.9.28/asn1c-0.9.28.tar.gz" - sha256 "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" - - bottle do - sha256 "ca164013b7756e3e0362ed4aae3a7e3cc541e2963354ddfeb1f08d6a754b4a68" => :mojave - sha256 "8b26526bf103e9b11b07b401a68bc86fb35d4d1ce6e62f6a1568dbc80bd86613" => :high_sierra - sha256 "432aa83cf3a3f9db86435fe75330902b556885605446a477a3f55e9e0ac13806" => :sierra - sha256 "be0a7e18cf6c2a3cf04831fb854247b26b6da96d3b56b3f8b3088fe3bd5c7668" => :el_capitan - sha256 "c9f31dc8f2f27a99370713ad9d5dfc1969ced862045bfa3680b48e85080277b5" => :yosemite - end - - head do - url "https://github.com/vlm/asn1c.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-iv" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.asn1").write <<~EOS - MyModule DEFINITIONS ::= - BEGIN - - MyTypes ::= SEQUENCE { - myObjectId OBJECT IDENTIFIER, - mySeqOf SEQUENCE OF MyInt, - myBitString BIT STRING { - muxToken(0), - modemToken(1) - } - } - - MyInt ::= INTEGER (0..65535) - - END - EOS - - system "#{bin}/asn1c", "test.asn1" - end -end diff --git a/Formula/aspcud.rb b/Formula/aspcud.rb deleted file mode 100644 index fe5573921cb91..0000000000000 --- a/Formula/aspcud.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Aspcud < Formula - desc "Package dependency solver" - homepage "https://potassco.org/aspcud/" - url "https://github.com/potassco/aspcud/archive/v1.9.4.tar.gz" - sha256 "3645f08b079e1cc80e24cd2d7ae5172a52476d84e3ec5e6a6c0034492a6ea885" - revision 1 - - bottle do - sha256 "663b82ae45395f7235e1ee0acb7dfc8821efb2a799569c65275ecac90d96570d" => :mojave - sha256 "07f0e44c6cf608f20da7a37744d7559c1f7b77fc3151bcd37ea0af9fbd39cde7" => :high_sierra - sha256 "c3c886728b9713da9ec4837b7faf19832219636743654f5b94dbe83b09c83bae" => :sierra - sha256 "d9f4bb9cd64ba31b4786fc848813cf665ff5f37c761cfb0bacd6c70b50fd9a58" => :el_capitan - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "re2c" => :build - depends_on "clingo" - - needs :cxx14 - - def install - args = std_cmake_args - args << "-DASPCUD_GRINGO_PATH=#{Formula["clingo"].opt_bin}/gringo" - args << "-DASPCUD_CLASP_PATH=#{Formula["clingo"].opt_bin}/clasp" - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"in.cudf").write <<~EOS - package: foo - version: 1 - - request: foo >= 1 - EOS - system "#{bin}/aspcud", "in.cudf", "out.cudf" - end -end diff --git a/Formula/aspectj.rb b/Formula/aspectj.rb deleted file mode 100644 index 1e3ecc50e24ee..0000000000000 --- a/Formula/aspectj.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Aspectj < Formula - desc "Aspect-oriented programming for Java" - homepage "https://eclipse.org/aspectj/" - url "https://www.eclipse.org/downloads/download.php?r=1&file=/tools/aspectj/aspectj-1.9.2.jar" - sha256 "b1d66287612a2f02311596f56c2f15b2510067bbda829c079791a1affe00ab05" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - mkdir_p "#{libexec}/#{name}" - system "java", "-jar", "aspectj-#{version}.jar", "-to", "#{libexec}/#{name}" - bin.install Dir["#{libexec}/#{name}/bin/*"] - bin.env_script_all_files(libexec/"#{name}/bin", Language::Java.java_home_env("1.8")) - chmod 0555, Dir["#{libexec}/#{name}/bin/*"] # avoid 0777 - end - - test do - (testpath/"Test.java").write <<~EOS - public class Test { - public static void main (String[] args) { - System.out.println("Brew Test"); - } - } - EOS - (testpath/"TestAspect.aj").write <<~EOS - public aspect TestAspect { - private pointcut mainMethod () : - execution(public static void main(String[])); - - before () : mainMethod() { - System.out.print("Aspect "); - } - } - EOS - ENV["CLASSPATH"] = "#{libexec}/#{name}/lib/aspectjrt.jar:test.jar:testaspect.jar" - system bin/"ajc", "-outjar", "test.jar", "Test.java" - system bin/"ajc", "-outjar", "testaspect.jar", "-outxml", "TestAspect.aj" - output = shell_output("#{bin}/aj Test") - assert_match /Aspect Brew Test/, output - end -end diff --git a/Formula/aspell.rb b/Formula/aspell.rb deleted file mode 100644 index c1961564534ba..0000000000000 --- a/Formula/aspell.rb +++ /dev/null @@ -1,708 +0,0 @@ -class Aspell < Formula - desc "Spell checker with better logic than ispell" - homepage "http://aspell.net/" - url "https://ftp.gnu.org/gnu/aspell/aspell-0.60.6.1.tar.gz" - mirror "https://ftpmirror.gnu.org/aspell/aspell-0.60.6.1.tar.gz" - sha256 "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1" - revision 1 - - bottle do - sha256 "f0264ded1cf174eb37c8a4175bc5f900d8abbe2d06e7f8109aa96106dd044f25" => :mojave - sha256 "d5927b312520252d7634902269336fe28148dac0d986e7bb0883327233462f01" => :high_sierra - sha256 "69c2de621e5d6c0a18ca7bf43b153deefef24eaa65d8ae3f5939a106d52948ce" => :sierra - sha256 "d107e964156e9932303a3569cbfc489d96593d67c5a724e70c45dbe2ed961516" => :el_capitan - sha256 "4a50a1b26bcbaa10dc4968332d03ce3e24772a60ec7b1561ab23102d0f46052a" => :yosemite - end - - # Dictionaries installed by default: en, de, es, fr - option "without-lang-en", "Do not install en dictionary" - resource "en" do - url "https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-2017.01.22-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/en/aspell6-en-2017.01.22-0.tar.bz2" - sha256 "93c73fae3eab5ea3ca6db3cea8770715a820f1b7d6ea2b932dd66a17f8fd55e1" - end - - option "without-lang-de", "Do not install de dictionary" - resource "de" do - url "https://ftp.gnu.org/gnu/aspell/dict/de/aspell6-de-20030222-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/de/aspell6-de-20030222-1.tar.bz2" - sha256 "ba6c94e11bc2e0e6e43ce0f7822c5bba5ca5ac77129ef90c190b33632416e906" - end - - option "without-lang-es", "Do not install es dictionary" - resource "es" do - url "https://ftp.gnu.org/gnu/aspell/dict/es/aspell6-es-1.11-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/es/aspell6-es-1.11-2.tar.bz2" - sha256 "ad367fa1e7069c72eb7ae37e4d39c30a44d32a6aa73cedccbd0d06a69018afcc" - end - - option "without-lang-fr", "Do not install fr dictionary" - resource "fr" do - url "https://ftp.gnu.org/gnu/aspell/dict/fr/aspell-fr-0.50-3.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/fr/aspell-fr-0.50-3.tar.bz2" - sha256 "f9421047519d2af9a7a466e4336f6e6ea55206b356cd33c8bd18cb626bf2ce91" - end - - option "with-all-langs", "Install all available dictionaries" - - # Other dictionaries - option "with-lang-af", "Install af dictionary" - resource "af" do - url "https://ftp.gnu.org/gnu/aspell/dict/af/aspell-af-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/af/aspell-af-0.50-0.tar.bz2" - sha256 "9d6000aeca5911343278bd6ed9e21d42c8cb26247dafe94a76ff81d8ac98e602" - end - - option "with-lang-am", "Install am dictionary" - resource "am" do - url "https://ftp.gnu.org/gnu/aspell/dict/am/aspell6-am-0.03-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/am/aspell6-am-0.03-1.tar.bz2" - sha256 "bf27dd21f8871e2b3332c211b402cd46604d431a7773e599729c242cdfb9d487" - end - - option "with-lang-ar", "Install ar dictionary" - resource "ar" do - url "https://ftp.gnu.org/gnu/aspell/dict/ar/aspell6-ar-1.2-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ar/aspell6-ar-1.2-0.tar.bz2" - sha256 "041ea24a82cdd6957040e2fb84262583bf46b3a8301283a75d257a7417207cab" - end - - option "with-lang-ast", "Install ast dictionary" - resource "ast" do - url "https://ftp.gnu.org/gnu/aspell/dict/ast/aspell6-ast-0.01.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ast/aspell6-ast-0.01.tar.bz2" - sha256 "43f23ed01c338c37f9bbb820db757b36ede1cea47a7b93dc8b6d7bd66b410f92" - end - - option "with-lang-az", "Install az dictionary" - resource "az" do - url "https://ftp.gnu.org/gnu/aspell/dict/az/aspell6-az-0.02-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/az/aspell6-az-0.02-0.tar.bz2" - sha256 "063176ec459d61acd59450ae49b5076e42abb1dcd54c1f934bae5fa6658044c3" - end - - option "with-lang-be", "Install be dictionary" - resource "be" do - url "https://ftp.gnu.org/gnu/aspell/dict/be/aspell5-be-0.01.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/be/aspell5-be-0.01.tar.bz2" - sha256 "550bad0c03a142241ffe5ecc183659d80020b566003a05341cd1e97c6ed274eb" - end - - option "with-lang-bg", "Install bg dictionary" - resource "bg" do - url "https://ftp.gnu.org/gnu/aspell/dict/bg/aspell6-bg-4.1-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/bg/aspell6-bg-4.1-0.tar.bz2" - sha256 "74570005dc2be5a244436fa2b46a5f612be84c6843f881f0cb1e4c775f658aaa" - end - - option "with-lang-bn", "Install bn dictionary" - resource "bn" do - url "https://ftp.gnu.org/gnu/aspell/dict/bn/aspell6-bn-0.01.1-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/bn/aspell6-bn-0.01.1-1.tar.bz2" - sha256 "b03f9cc4feb00df9bfd697b032f4f4ae838ad5a6bb41db798eefc5639a1480d9" - end - - option "with-lang-br", "Install br dictionary" - resource "br" do - url "https://ftp.gnu.org/gnu/aspell/dict/br/aspell-br-0.50-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/br/aspell-br-0.50-2.tar.bz2" - sha256 "c2122a6dcca653c082d785f0da4bf267363182a017fea4129e8b0882aa6d2a3b" - end - - option "with-lang-ca", "Install ca dictionary" - resource "ca" do - url "https://ftp.gnu.org/gnu/aspell/dict/ca/aspell6-ca-2.1.5-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ca/aspell6-ca-2.1.5-1.tar.bz2" - sha256 "ebdae47edf87357a4df137dd754737e6417452540cb1ed34b545ccfd66f165b9" - end - - option "with-lang-cs", "Install cs dictionary" - resource "cs" do - url "https://ftp.gnu.org/gnu/aspell/dict/cs/aspell6-cs-20040614-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/cs/aspell6-cs-20040614-1.tar.bz2" - sha256 "01c091f907c2fa4dfa38305c2494bb80009407dfb76ead586ad724ae21913066" - end - - option "with-lang-csb", "Install csb dictionary" - resource "csb" do - url "https://ftp.gnu.org/gnu/aspell/dict/csb/aspell6-csb-0.02-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/csb/aspell6-csb-0.02-0.tar.bz2" - sha256 "c166ad07d50e9e13ac9f87d5a8938b3f675a0f8a01017bd8969c2053e7f52298" - end - - option "with-lang-cy", "Install cy dictionary" - resource "cy" do - url "https://ftp.gnu.org/gnu/aspell/dict/cy/aspell-cy-0.50-3.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/cy/aspell-cy-0.50-3.tar.bz2" - sha256 "d5399dcd70061e5ed5af1214eb580f62864dd35ea4fa1ec2882ffc4f03307897" - end - - option "with-lang-da", "Install da dictionary" - resource "da" do - url "https://ftp.gnu.org/gnu/aspell/dict/da/aspell5-da-1.4.42-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/da/aspell5-da-1.4.42-1.tar.bz2" - sha256 "f74a079617979c1623e8e7313e4ecd3bc260db92ce55b1f2a3a5e7077dacd3c1" - end - - option "with-lang-de_alt", "Install de_alt dictionary" - resource "de_alt" do - url "https://ftp.gnu.org/gnu/aspell/dict/de-alt/aspell6-de-alt-2.1-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/de-alt/aspell6-de-alt-2.1-1.tar.bz2" - sha256 "36d13c6c743a6b1ff05fb1af79134e118e5a94db06ba40c076636f9d04158c73" - end - - option "with-lang-el", "Install el dictionary" - resource "el" do - url "https://ftp.gnu.org/gnu/aspell/dict/el/aspell-el-0.50-3.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/el/aspell-el-0.50-3.tar.bz2" - sha256 "3f6508937dcaa64a6c70ee5f722f088b46b202a6409961b93b705d4ec4f56380" - end - - option "with-lang-eo", "Install eo dictionary" - resource "eo" do - url "https://ftp.gnu.org/gnu/aspell/dict/eo/aspell6-eo-2.1.20000225a-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/eo/aspell6-eo-2.1.20000225a-2.tar.bz2" - sha256 "41d2d18d6a4de6422185a31ecfc1a3de2e751f3dfb2cbec8f275b11857056e27" - end - - option "with-lang-et", "Install et dictionary" - resource "et" do - url "https://ftp.gnu.org/gnu/aspell/dict/et/aspell6-et-0.1.21-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/et/aspell6-et-0.1.21-1.tar.bz2" - sha256 "b1e857aa3daaea2a19462b2671e87c26a7eb7337c83b709685394eed8472b249" - end - - option "with-lang-fa", "Install fa dictionary" - resource "fa" do - url "https://ftp.gnu.org/gnu/aspell/dict/fa/aspell6-fa-0.11-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/fa/aspell6-fa-0.11-0.tar.bz2" - sha256 "482d26ea879a8ea02d9373952205f67e07c85a7550841b13b5079bb2f9f2e15b" - end - - option "with-lang-fi", "Install fi dictionary" - resource "fi" do - url "https://ftp.gnu.org/gnu/aspell/dict/fi/aspell6-fi-0.7-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/fi/aspell6-fi-0.7-0.tar.bz2" - sha256 "f8d7f07b4511e606eb56392ddaa76fd29918006331795e5942ad11b510d0a51d" - end - - option "with-lang-fo", "Install fo dictionary" - resource "fo" do - url "https://ftp.gnu.org/gnu/aspell/dict/fo/aspell5-fo-0.2.16-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/fo/aspell5-fo-0.2.16-1.tar.bz2" - sha256 "f7e0ddc039bb4f5c142d39dab72d9dfcb951f5e46779f6e3cf1d084a69f95e08" - end - - option "with-lang-fy", "Install fy dictionary" - resource "fy" do - url "https://ftp.gnu.org/gnu/aspell/dict/fy/aspell6-fy-0.12-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/fy/aspell6-fy-0.12-0.tar.bz2" - sha256 "3447cfa90e459af32183a6bc8af9ba3ed571087811cdfc336821454bac8995aa" - end - - option "with-lang-ga", "Install ga dictionary" - resource "ga" do - url "https://ftp.gnu.org/gnu/aspell/dict/ga/aspell5-ga-4.5-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ga/aspell5-ga-4.5-0.tar.bz2" - sha256 "455fdbbca24cecb4667fbcf9544d84ae83e5b2505caae79afa6b2cb76b4d0679" - end - - option "with-lang-gd", "Install gd dictionary" - resource "gd" do - url "https://ftp.gnu.org/gnu/aspell/dict/gd/aspell5-gd-0.1.1-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/gd/aspell5-gd-0.1.1-1.tar.bz2" - sha256 "e316a08a75da8a0d4d15eb892023073a971e0a326382a5532db29856768e0929" - end - - option "with-lang-gl", "Install gl dictionary" - resource "gl" do - url "https://ftp.gnu.org/gnu/aspell/dict/gl/aspell6-gl-0.5a-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/gl/aspell6-gl-0.5a-2.tar.bz2" - sha256 "b3cdcf65971e70b8c09fb7f319164c6344a80d260b6e98dc6ecca1e02b7cfc8a" - end - - option "with-lang-grc", "Install grc dictionary" - resource "grc" do - url "https://ftp.gnu.org/gnu/aspell/dict/grc/aspell6-grc-0.02-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/grc/aspell6-grc-0.02-0.tar.bz2" - sha256 "2214883e2b9883f360b090948afd2cb0687bc6bba4e1e98011fb8c8d4a42b9ff" - end - - option "with-lang-gu", "Install gu dictionary" - resource "gu" do - url "https://ftp.gnu.org/gnu/aspell/dict/gu/aspell6-gu-0.03-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/gu/aspell6-gu-0.03-0.tar.bz2" - sha256 "432c125acc6a86456061dcd47018df4318a117be9f7c09a590979243ad448311" - end - - option "with-lang-gv", "Install gv dictionary" - resource "gv" do - url "https://ftp.gnu.org/gnu/aspell/dict/gv/aspell-gv-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/gv/aspell-gv-0.50-0.tar.bz2" - sha256 "bbe626feb5c81c1b7e7d3199d558bc5c560b2d4aef377d0e4b4227ae3c7176e6" - end - - option "with-lang-he", "Install he dictionary" - resource "he" do - url "https://ftp.gnu.org/gnu/aspell/dict/he/aspell6-he-1.0-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/he/aspell6-he-1.0-0.tar.bz2" - sha256 "d64dabac9f40ca9e632a8eee40fc01c7d18a2c699d8f9742000fadd2e15b708d" - end - - option "with-lang-hi", "Install hi dictionary" - resource "hi" do - url "https://ftp.gnu.org/gnu/aspell/dict/hi/aspell6-hi-0.02-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hi/aspell6-hi-0.02-0.tar.bz2" - sha256 "da0778c46716f4209da25195294139c2f5e6031253381afa4f81908fc9193a37" - end - - option "with-lang-hil", "Install hil dictionary" - resource "hil" do - url "https://ftp.gnu.org/gnu/aspell/dict/hil/aspell5-hil-0.11-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hil/aspell5-hil-0.11-0.tar.bz2" - sha256 "570a374fd0b97943bc6893cf25ac7b23da815120842a80144e2c7ee8b41388e8" - end - - option "with-lang-hr", "Install hr dictionary" - resource "hr" do - url "https://ftp.gnu.org/gnu/aspell/dict/hr/aspell-hr-0.51-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hr/aspell-hr-0.51-0.tar.bz2" - sha256 "2ac4030354d7961e45d63b46e06e59248d59cc70dfc9e1d8ee0ae21d9c774a25" - end - - option "with-lang-hsb", "Install hsb dictionary" - resource "hsb" do - url "https://ftp.gnu.org/gnu/aspell/dict/hsb/aspell6-hsb-0.02-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hsb/aspell6-hsb-0.02-0.tar.bz2" - sha256 "8d9f2ae428c7754a922ce6a7ef23401bc65f6f1909aec5077975077b3edc222e" - end - - option "with-lang-hu", "Install hu dictionary" - resource "hu" do - url "https://ftp.gnu.org/gnu/aspell/dict/hu/aspell6-hu-0.99.4.2-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hu/aspell6-hu-0.99.4.2-0.tar.bz2" - sha256 "3335a7b45cf9774bccf03740fbddeb7ec4752dd87178fa93f92d4c71e3f236b5" - end - - option "with-lang-hus", "Install hus dictionary" - resource "hus" do - url "https://ftp.gnu.org/gnu/aspell/dict/hus/aspell6-hus-0.03-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hus/aspell6-hus-0.03-1.tar.bz2" - sha256 "6d28f371d1a172439395d56d2d5ce8f27c617de03f847f02643dfd79dd8df425" - end - - option "with-lang-hy", "Install hy dictionary" - resource "hy" do - url "https://ftp.gnu.org/gnu/aspell/dict/hy/aspell6-hy-0.10.0-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/hy/aspell6-hy-0.10.0-0.tar.bz2" - sha256 "2dea8d0093a3b8373cc97703dca2979b285f71916181d1a20db70bea28c2bcf0" - end - - option "with-lang-ia", "Install ia dictionary" - resource "ia" do - url "https://ftp.gnu.org/gnu/aspell/dict/ia/aspell-ia-0.50-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ia/aspell-ia-0.50-1.tar.bz2" - sha256 "5797cb59606d007cf8fe5b9ec435de0d63b2d0e0d391ed8850ef8aa3f4bb0c2f" - end - - option "with-lang-id", "Install id dictionary" - resource "id" do - url "https://ftp.gnu.org/gnu/aspell/dict/id/aspell5-id-1.2-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/id/aspell5-id-1.2-0.tar.bz2" - sha256 "523912082848d891746dbb233f2ddb2cdbab6750dc76c38b3f6e000c9eb37308" - end - - option "with-lang-it", "Install it dictionary" - resource "it" do - url "https://ftp.gnu.org/gnu/aspell/dict/it/aspell6-it-2.2_20050523-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/it/aspell6-it-2.2_20050523-0.tar.bz2" - sha256 "3b19dc709924783c8d87111aa9653dc6c000e845183778abee750215d83aaebd" - end - - option "with-lang-kn", "Install kn dictionary" - resource "kn" do - url "https://ftp.gnu.org/gnu/aspell/dict/kn/aspell6-kn-0.01-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/kn/aspell6-kn-0.01-1.tar.bz2" - sha256 "cb010b34a712f853fa53c4618cb801704b9f76c72db9390009ba914e3a075383" - end - - option "with-lang-ku", "Install ku dictionary" - resource "ku" do - url "https://ftp.gnu.org/gnu/aspell/dict/ku/aspell5-ku-0.20-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ku/aspell5-ku-0.20-1.tar.bz2" - sha256 "968f76418c991dc004a1cc3d8cd07b58fb210b6ad506106857ed2d97274a6a27" - end - - option "with-lang-ky", "Install ky dictionary" - resource "ky" do - url "https://ftp.gnu.org/gnu/aspell/dict/ky/aspell6-ky-0.01-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ky/aspell6-ky-0.01-0.tar.bz2" - sha256 "e10f2f25b44b71e30fa1ea9c248c04543c688845a734d0b9bdc65a2bbd16fb4f" - end - - option "with-lang-la", "Install la dictionary" - resource "la" do - url "https://ftp.gnu.org/gnu/aspell/dict/la/aspell6-la-20020503-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/la/aspell6-la-20020503-0.tar.bz2" - sha256 "d486b048d1c3056d3a555744584a81873a63ecd4641f04e8b7bf9910b98d2985" - end - - option "with-lang-lt", "Install lt dictionary" - resource "lt" do - url "https://ftp.gnu.org/gnu/aspell/dict/lt/aspell6-lt-1.2.1-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/lt/aspell6-lt-1.2.1-0.tar.bz2" - sha256 "f6f53b6e418c22f63e1a70b8bc77bc66912bc1afd40cf98dc026d110d26452ab" - end - - option "with-lang-lv", "Install lv dictionary" - resource "lv" do - url "https://ftp.gnu.org/gnu/aspell/dict/lv/aspell6-lv-0.5.5-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/lv/aspell6-lv-0.5.5-1.tar.bz2" - sha256 "3c30e206ea562b2e759fb7467680e1a01d5deec5edbd66653c83184550d1fb8a" - end - - option "with-lang-mg", "Install mg dictionary" - resource "mg" do - url "https://ftp.gnu.org/gnu/aspell/dict/mg/aspell5-mg-0.03-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/mg/aspell5-mg-0.03-0.tar.bz2" - sha256 "5182f832e1630ceef5711a83b530fb583ffe04f28cc042d195b5c6b2d25cb041" - end - - option "with-lang-mi", "Install mi dictionary" - resource "mi" do - url "https://ftp.gnu.org/gnu/aspell/dict/mi/aspell-mi-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/mi/aspell-mi-0.50-0.tar.bz2" - sha256 "beee1e33baf6301e3ffc56558c84c3e7d29622541b232c1aea1e91d12ebd7d89" - end - - option "with-lang-mk", "Install mk dictionary" - resource "mk" do - url "https://ftp.gnu.org/gnu/aspell/dict/mk/aspell-mk-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/mk/aspell-mk-0.50-0.tar.bz2" - sha256 "15fc2380fb673d2003d8075d8cef2b0dbb4d30b430587ad459257681904d9971" - end - - option "with-lang-ml", "Install ml dictionary" - resource "ml" do - url "https://ftp.gnu.org/gnu/aspell/dict/ml/aspell6-ml-0.03-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ml/aspell6-ml-0.03-1.tar.bz2" - sha256 "e4cd551e558b6d26e4db58e051eeca3d893fc2c4e7fce90a022af247422096fd" - end - - option "with-lang-mn", "Install mn dictionary" - resource "mn" do - url "https://ftp.gnu.org/gnu/aspell/dict/mn/aspell6-mn-0.06-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/mn/aspell6-mn-0.06-2.tar.bz2" - sha256 "2f1b6edd48b82cd9b99b9262d5635f72271c062ef4e772b90388dfc48a4f1294" - end - - option "with-lang-mr", "Install mr dictionary" - resource "mr" do - url "https://ftp.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2" - sha256 "d3a35a40bee0234a5b388375485ab8bf0ba8edbf3b0a82e2c2f76a40a8586f33" - end - - option "with-lang-ms", "Install ms dictionary" - resource "ms" do - url "https://ftp.gnu.org/gnu/aspell/dict/ms/aspell-ms-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ms/aspell-ms-0.50-0.tar.bz2" - sha256 "3cc4e3537bb0f455ce58b4d2fa84b03dc678e0153536a41dee1a3a7623dc246f" - end - - option "with-lang-mt", "Install mt dictionary" - resource "mt" do - url "https://ftp.gnu.org/gnu/aspell/dict/mt/aspell-mt-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/mt/aspell-mt-0.50-0.tar.bz2" - sha256 "e00fcaad60a90cfed687ba02f62be8c27b8650457dd3c5bdcb064b476da059b4" - end - - option "with-lang-nds", "Install nds dictionary" - resource "nds" do - url "https://ftp.gnu.org/gnu/aspell/dict/nds/aspell6-nds-0.01-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/nds/aspell6-nds-0.01-0.tar.bz2" - sha256 "ce381e869def56e54a31f965df518deca0e6f12238859650fcb115623f8772da" - end - - option "with-lang-nl", "Install nl dictionary" - resource "nl" do - url "https://ftp.gnu.org/gnu/aspell/dict/nl/aspell-nl-0.50-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/nl/aspell-nl-0.50-2.tar.bz2" - sha256 "440e0b7df8c5903d728221fe4ba88a74658ce14c8bb04b290c41402dfd41cb39" - end - - option "with-lang-nn", "Install nn dictionary" - resource "nn" do - url "https://ftp.gnu.org/gnu/aspell/dict/nn/aspell-nn-0.50.1-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/nn/aspell-nn-0.50.1-1.tar.bz2" - sha256 "ac6610540c7e134f09cbebbd148f9316bef27bc491e377638ef4e2950b2d5370" - end - - option "with-lang-ny", "Install ny dictionary" - resource "ny" do - url "https://ftp.gnu.org/gnu/aspell/dict/ny/aspell5-ny-0.01-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ny/aspell5-ny-0.01-0.tar.bz2" - sha256 "176f970f6ba3bb448c7e946fa8d209eb4da7138ac6899af7731a98c7b6484b3e" - end - - option "with-lang-or", "Install or dictionary" - resource "or" do - url "https://ftp.gnu.org/gnu/aspell/dict/or/aspell6-or-0.03-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/or/aspell6-or-0.03-1.tar.bz2" - sha256 "d6ffa369f8918d74cdea966112bc5cb700e09dca5ac6b968660cfc22044ef24f" - end - - option "with-lang-pa", "Install pa dictionary" - resource "pa" do - url "https://ftp.gnu.org/gnu/aspell/dict/pa/aspell6-pa-0.01-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/pa/aspell6-pa-0.01-1.tar.bz2" - sha256 "c7f3abb1c5efe62e072ca8bef44b0d0506501bbb7b48ced1d0d95f10e61fc945" - end - - option "with-lang-pl", "Install pl dictionary" - resource "pl" do - url "https://ftp.gnu.org/gnu/aspell/dict/pl/aspell6-pl-6.0_20061121-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/pl/aspell6-pl-6.0_20061121-0.tar.bz2" - sha256 "017741fcb70a885d718c534160c9de06b03cc72f352879bd106be165e024574d" - end - - option "with-lang-pt_BR", "Install pt_BR dictionary" - resource "pt_BR" do - url "https://ftp.gnu.org/gnu/aspell/dict/pt_BR/aspell6-pt_BR-20090702-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/pt_BR/aspell6-pt_BR-20090702-0.tar.bz2" - sha256 "77fc554aa9bbd5f4a87b58edf0d128838e92e4db6299904bb9360bf753a709f8" - end - - option "with-lang-pt_PT", "Install pt_PT dictionary" - resource "pt_PT" do - url "https://ftp.gnu.org/gnu/aspell/dict/pt_PT/aspell6-pt_PT-20070510-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/pt_PT/aspell6-pt_PT-20070510-0.tar.bz2" - sha256 "b8b7a71a480f2a6659a3ab1e6069d4be7a9a929fc520e4a1364f51ce484ad9d6" - end - - option "with-lang-qu", "Install qu dictionary" - resource "qu" do - url "https://ftp.gnu.org/gnu/aspell/dict/qu/aspell6-qu-0.02-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/qu/aspell6-qu-0.02-0.tar.bz2" - sha256 "80977629b8425bda7ffd951628d23a6793a457f4948151c71ff9e0bff5073f01" - end - - option "with-lang-ro", "Install ro dictionary" - resource "ro" do - url "https://ftp.gnu.org/gnu/aspell/dict/ro/aspell5-ro-3.3-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ro/aspell5-ro-3.3-2.tar.bz2" - sha256 "53c38b7668a540cf90ddca11c007ce812d2ad86bd11c2c43a08da9e06392683d" - end - - option "with-lang-ru", "Install ru dictionary" - resource "ru" do - url "https://ftp.gnu.org/gnu/aspell/dict/ru/aspell6-ru-0.99f7-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ru/aspell6-ru-0.99f7-1.tar.bz2" - sha256 "5c29b6ccce57bc3f7c4fb0510d330446b9c769e59c92bdfede27333808b6e646" - end - - option "with-lang-rw", "Install rw dictionary" - resource "rw" do - url "https://ftp.gnu.org/gnu/aspell/dict/rw/aspell-rw-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/rw/aspell-rw-0.50-0.tar.bz2" - sha256 "3406102e0e33344b6eae73dbfaf86d8e411b7c97775827a6db79c943ce43f081" - end - - option "with-lang-sc", "Install sc dictionary" - resource "sc" do - url "https://ftp.gnu.org/gnu/aspell/dict/sc/aspell5-sc-1.0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/sc/aspell5-sc-1.0.tar.bz2" - sha256 "591ae22f712b472182b41b8bc97dce1e5ecd240c75eccc25f59ab15c60be8742" - end - - option "with-lang-sk", "Install sk dictionary" - resource "sk" do - url "https://ftp.gnu.org/gnu/aspell/dict/sk/aspell6-sk-2.01-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/sk/aspell6-sk-2.01-2.tar.bz2" - sha256 "c6a80a2989c305518e0d71af1196b7484fda26fe53be4e49eec7b15b76a860a6" - end - - option "with-lang-sl", "Install sl dictionary" - resource "sl" do - url "https://ftp.gnu.org/gnu/aspell/dict/sl/aspell-sl-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/sl/aspell-sl-0.50-0.tar.bz2" - sha256 "e566d127f7130da2df7b1f4f4cb4bc51932517b0c24299f84498ba325e6133d1" - end - - option "with-lang-sr", "Install sr dictionary" - resource "sr" do - url "https://ftp.gnu.org/gnu/aspell/dict/sr/aspell6-sr-0.02.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/sr/aspell6-sr-0.02.tar.bz2" - sha256 "705e58fb390633c89c4cb224a1cfb34e67e09496448f7adc6500494b6e009289" - end - - option "with-lang-sv", "Install sv dictionary" - resource "sv" do - url "https://ftp.gnu.org/gnu/aspell/dict/sv/aspell-sv-0.51-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/sv/aspell-sv-0.51-0.tar.bz2" - sha256 "9b70573c9c8cf76f5cdb6abcdfb834a754bbaa1efd7d6f57f47b8a91a19c5c0a" - end - - option "with-lang-sw", "Install sw dictionary" - resource "sw" do - url "https://ftp.gnu.org/gnu/aspell/dict/sw/aspell-sw-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/sw/aspell-sw-0.50-0.tar.bz2" - sha256 "7ed51f107dc57a7b3555f20d1cee2903275d63e022b055ea6b6409d9e081f297" - end - - option "with-lang-ta", "Install ta dictionary" - resource "ta" do - url "https://ftp.gnu.org/gnu/aspell/dict/ta/aspell6-ta-20040424-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/ta/aspell6-ta-20040424-1.tar.bz2" - sha256 "52f552f1a2c0fc53ed4eac75990ff75bccf3d5f1440ca3d948d96eafe5f3486a" - end - - option "with-lang-te", "Install te dictionary" - resource "te" do - url "https://ftp.gnu.org/gnu/aspell/dict/te/aspell6-te-0.01-2.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/te/aspell6-te-0.01-2.tar.bz2" - sha256 "3682638a757a65afcc770e565e68347e8eb7be94052d9d6eff64fc767e7fec5d" - end - - option "with-lang-tet", "Install tet dictionary" - resource "tet" do - url "https://ftp.gnu.org/gnu/aspell/dict/tet/aspell5-tet-0.1.1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/tet/aspell5-tet-0.1.1.tar.bz2" - sha256 "9dd546c9c48f42085e3c17f22c8e6d46e56f3ea9c4618b933c642a091df1c09e" - end - - option "with-lang-tk", "Install tk dictionary" - resource "tk" do - url "https://ftp.gnu.org/gnu/aspell/dict/tk/aspell5-tk-0.01-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/tk/aspell5-tk-0.01-0.tar.bz2" - sha256 "86f24209cab61a54ed85ad3020915d8ce1dec13fbfe012f1bf1d648825696a0b" - end - - option "with-lang-tl", "Install tl dictionary" - resource "tl" do - url "https://ftp.gnu.org/gnu/aspell/dict/tl/aspell5-tl-0.02-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/tl/aspell5-tl-0.02-1.tar.bz2" - sha256 "48b65d2c6886f353d1e1756a93bcd4d8ab2b88b021176c25dfdb5d8bcf348acd" - end - - option "with-lang-tn", "Install tn dictionary" - resource "tn" do - url "https://ftp.gnu.org/gnu/aspell/dict/tn/aspell5-tn-1.0.1-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/tn/aspell5-tn-1.0.1-0.tar.bz2" - sha256 "41a0c20e1d2acaa28a647d74b40778e491815566019f79e7049621f40d3bbd60" - end - - option "with-lang-tr", "Install tr dictionary" - resource "tr" do - url "https://ftp.gnu.org/gnu/aspell/dict/tr/aspell-tr-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/tr/aspell-tr-0.50-0.tar.bz2" - sha256 "0bc6530e5eebf8b2b53f1e8add596c62099173f62b9baa6b3efaa86752bdfb4a" - end - - option "with-lang-uk", "Install uk dictionary" - resource "uk" do - url "https://ftp.gnu.org/gnu/aspell/dict/uk/aspell6-uk-1.4.0-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/uk/aspell6-uk-1.4.0-0.tar.bz2" - sha256 "35f9a7e840c1272706bc6dd172bc9625cbd843d021094da8598a6abba525f18c" - end - - option "with-lang-uz", "Install uz dictionary" - resource "uz" do - url "https://ftp.gnu.org/gnu/aspell/dict/uz/aspell6-uz-0.6-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/uz/aspell6-uz-0.6-0.tar.bz2" - sha256 "2281c1fc7fe2411f02d25887c8a68eaa2965df3cd25f5ff06d31787a3de5e369" - end - - option "with-lang-vi", "Install vi dictionary" - resource "vi" do - url "https://ftp.gnu.org/gnu/aspell/dict/vi/aspell6-vi-0.01.1-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/vi/aspell6-vi-0.01.1-1.tar.bz2" - sha256 "3cd85d53bb62b0d104cb5c03e142c3bbe1ad64329d7beae057854816dc7e7c17" - end - - option "with-lang-wa", "Install wa dictionary" - resource "wa" do - url "https://ftp.gnu.org/gnu/aspell/dict/wa/aspell-wa-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/wa/aspell-wa-0.50-0.tar.bz2" - sha256 "5a17aa8aa37afbcc8f52336476670b93cba16462bcb89dd46b80f4d9cfe73fe4" - end - - option "with-lang-yi", "Install yi dictionary" - resource "yi" do - url "https://ftp.gnu.org/gnu/aspell/dict/yi/aspell6-yi-0.01.1-1.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/yi/aspell6-yi-0.01.1-1.tar.bz2" - sha256 "9879d35a5b0b86f8e217601568480f2f634bc8b7a97341e9e80b0d40a8202856" - end - - option "with-lang-zu", "Install zu dictionary" - resource "zu" do - url "https://ftp.gnu.org/gnu/aspell/dict/zu/aspell-zu-0.50-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/zu/aspell-zu-0.50-0.tar.bz2" - sha256 "3fa255cd0b20e6229a53df972fd3c5ed8481db11cfd0347dd3da629bbb7a6796" - end - - deprecated_option "all" => "with-all-langs" - - def available_languages - resources.map(&:name) - end - - # const problems with llvm: https://www.freebsd.org/cgi/query-pr.cgi?pr=180565&cat= - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - - ENV.prepend_path "PATH", bin - - languages = [] - available_languages.each do |lang| - languages << lang if build.with? "lang-#{lang}" - end - languages.concat(available_languages) if build.with? "all-langs" - - languages.each do |lang| - resource(lang).stage do - system "./configure", "--vars", "ASPELL=#{bin}/aspell", "PREZIP=#{bin}/prezip" - system "make", "install" - end - end - end - - def caveats - <<~EOS - Installation of the 'is' (Icelandic) and 'nb' (Norwegian) dictionaries is - currently broken. They can be installed manually. - - See: https://github.com/Homebrew/homebrew-core/issues/28074 - EOS - end - - test do - assert_equal shell_output("echo \"misspell worrd\" | #{bin}/aspell list -d en_US").strip, - "worrd" - end -end - -__END__ -diff --git a/interfaces/cc/aspell.h b/interfaces/cc/aspell.h -index 9c8e81b..2cd00d4 100644 ---- a/interfaces/cc/aspell.h -+++ b/interfaces/cc/aspell.h -@@ -237,6 +237,7 @@ void delete_aspell_can_have_error(struct AspellCanHaveError * ths); - /******************************** errors ********************************/ - - -+#ifndef __cplusplus - extern const struct AspellErrorInfo * const aerror_other; - extern const struct AspellErrorInfo * const aerror_operation_not_supported; - extern const struct AspellErrorInfo * const aerror_cant_copy; -@@ -322,6 +323,7 @@ extern const struct AspellErrorInfo * const aerror_missing_magic; - extern const struct AspellErrorInfo * const aerror_bad_magic; - extern const struct AspellErrorInfo * const aerror_expression; - extern const struct AspellErrorInfo * const aerror_invalid_expression; -+#endif - - - /******************************* speller *******************************/ diff --git a/Formula/assh.rb b/Formula/assh.rb deleted file mode 100644 index d21b1b679a05a..0000000000000 --- a/Formula/assh.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Assh < Formula - desc "Advanced SSH config - Regex, aliases, gateways, includes and dynamic hosts" - homepage "https://github.com/moul/advanced-ssh-config" - url "https://github.com/moul/advanced-ssh-config/archive/v2.8.0.tar.gz" - sha256 "e04de57ab048f1abee75e9e739514c4f47e6cbb8acacb9d58a6e2892df30dc42" - head "https://github.com/moul/advanced-ssh-config.git" - - bottle do - cellar :any_skip_relocation - sha256 "bea473073d77ae8be2329b1c868242b6d5098c46516a6e16669752b8742d56b2" => :mojave - sha256 "7e48c5089af70b883059a68a4e8be6b3a4a973306067d16983bc1130e23979fc" => :high_sierra - sha256 "0087bab708bd409d1cd00dcaba1ed40c4ad9e4f11f3b6db275a827fe2ff69011" => :sierra - sha256 "f791dad7d95875ae19db21305c2d5d3632ebfb7783c837d212a08099d15c4d7a" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/moul/advanced-ssh-config").install Dir["*"] - cd "src/github.com/moul/advanced-ssh-config/cmd/assh" do - system "go", "build", "-o", bin/"assh" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/assh --version") - end -end diff --git a/Formula/assimp.rb b/Formula/assimp.rb deleted file mode 100644 index 670474353820d..0000000000000 --- a/Formula/assimp.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Assimp < Formula - desc "Portable library for importing many well-known 3D model formats" - homepage "http://www.assimp.org" - url "https://github.com/assimp/assimp/archive/v4.1.0.tar.gz" - sha256 "3520b1e9793b93a2ca3b797199e16f40d61762617e072f2d525fad70f9678a71" - head "https://github.com/assimp/assimp.git" - - bottle do - cellar :any - sha256 "97457d0943085b11a105b95a4799c73f624db843b9de7e0f81515add33539f6e" => :mojave - sha256 "2a3c4f77532717d3cd6b8de75a4cdb033b26fc4d64736f17e90d836e11b90fe4" => :high_sierra - sha256 "632ab4d0bd3f3aaa002945ace7e90362b396154ef3c4536b884872f82f3dd30d" => :sierra - sha256 "5991caf1877f8193889d0929399aa24790e8eeab96736c3c1d28800966d75169" => :el_capitan - end - - depends_on "boost" => :build - depends_on "cmake" => :build - - # Fix "unzip.c:150:11: error: unknown type name 'z_crc_t'" - # Upstream PR from 12 Dec 2017 "unzip: fix build with older zlib" - if MacOS.version <= :el_capitan - patch do - url "https://github.com/assimp/assimp/pull/1634.patch?full_index=1" - sha256 "79b93f785ee141dc2f56d557b2b8ee290eed0afc7dd373ad84715c6c9aa23460" - end - end - - def install - args = std_cmake_args - args << "-DASSIMP_BUILD_TESTS=OFF" - system "cmake", *args - system "make", "install" - end - - test do - # Library test. - (testpath/"test.cpp").write <<~EOS - #include - int main() { - Assimp::Importer importer; - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lassimp", "-o", "test" - system "./test" - - # Application test. - (testpath/"test.obj").write <<~EOS - # WaveFront .obj file - a single square based pyramid - - # Start a new group: - g MySquareBasedPyramid - - # List of vertices: - # Front left - v -0.5 0 0.5 - # Front right - v 0.5 0 0.5 - # Back right - v 0.5 0 -0.5 - # Back left - v -0.5 0 -0.5 - # Top point (top of pyramid). - v 0 1 0 - - # List of faces: - # Square base (note: normals are placed anti-clockwise). - f 4 3 2 1 - # Triangle on front - f 1 2 5 - # Triangle on back - f 3 4 5 - # Triangle on left side - f 4 1 5 - # Triangle on right side - f 2 3 5 - EOS - system bin/"assimp", "export", "test.obj", "test.ply" - end -end diff --git a/Formula/astrometry-net.rb b/Formula/astrometry-net.rb deleted file mode 100644 index 13219eaa7000d..0000000000000 --- a/Formula/astrometry-net.rb +++ /dev/null @@ -1,73 +0,0 @@ -class AstrometryNet < Formula - include Language::Python::Virtualenv - - desc "Automatic identification of astronomical images" - homepage "https://github.com/dstndstn/astrometry.net" - url "https://github.com/dstndstn/astrometry.net/releases/download/0.76/astrometry.net-0.76.tar.gz" - sha256 "244355ef9716a9e062eb19e8547e8b50434c7df52a8b96f9d0a254bc646d1f0d" - revision 2 - - bottle do - cellar :any - sha256 "bd0a57bbdd91ebd8f48b2a1c5d8b4bb6189b1c186e0ad75a0de21d1c4d7d2bf2" => :mojave - sha256 "699fb3223434169ba81f7e62bd0d58dd401157d58556864b11d36b6b5209925e" => :high_sierra - sha256 "7916882224fc6064e127129bc7a0e17cef05ff97ff00eaaf15f955339a381942" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "cairo" - depends_on "cfitsio" - depends_on "gsl" - depends_on "jpeg" - depends_on "libpng" - depends_on "netpbm" - depends_on "numpy" - depends_on "python" - depends_on "wcslib" - - resource "fitsio" do - url "https://files.pythonhosted.org/packages/9c/cb/f52534b71f4d99916723af2994898904015b9a1bf0286a165182d0374bbf/fitsio-0.9.11.tar.gz" - sha256 "a1196385ca7c42c93d9e53002d5ba574a8db452c3b53ef1189e2c150177d4266" - end - - def install - ENV["NETPBM_INC"] = "-I#{Formula["netpbm"].opt_include}/netpbm" - ENV["NETPBM_LIB"] = "-L#{Formula["netpbm"].opt_lib} -lnetpbm" - ENV["SYSTEM_GSL"] = "yes" - ENV["PYTHON_SCRIPT"] = "#{libexec}/bin/python3" - ENV["PYTHON"] = "python3" - - venv = virtualenv_create(libexec, "python3") - venv.pip_install resources - - ENV["INSTALL_DIR"] = prefix - xy = Language::Python.major_minor_version "python3" - ENV["PY_BASE_INSTALL_DIR"] = "#{libexec}/lib/python#{xy}/site-packages/astrometry" - - system "make" - system "make", "py" - system "make", "install" - - # Work around for https://github.com/dstndstn/astrometry.net/issues/142 - # On the next release, remove the following two lines & add `ENV["PY_BASE_LINK_DIR"] = ...` - rm "#{bin}/plotann.py" - bin.install_symlink libexec/"lib/python#{xy}/site-packages/astrometry/blind/plotann.py" - end - - test do - system "#{bin}/build-astrometry-index", "-d", "3", "-o", "index-9918.fits", - "-P", "18", "-S", "mag", "-B", "0.1", - "-s", "0", "-r", "1", "-I", "9918", "-M", - "-i", "#{prefix}/examples/tycho2-mag6.fits" - (testpath/"99.cfg").write <<~EOS - add_path . - inparallel - index index-9918.fits - EOS - system "#{bin}/solve-field", "--config", "99.cfg", "#{prefix}/examples/apod4.jpg", - "--continue", "--dir", "." - assert_predicate testpath/"apod4.solved", :exist? - assert_predicate testpath/"apod4.wcs", :exist? - end -end diff --git a/Formula/astyle.rb b/Formula/astyle.rb deleted file mode 100644 index 68b2ba15dc80e..0000000000000 --- a/Formula/astyle.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Astyle < Formula - desc "Source code beautifier for C, C++, C#, and Java" - homepage "https://astyle.sourceforge.io/" - url "https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_macos.tar.gz" - sha256 "c4eebbe082eb2cb98f90aafcce3da2daeb774dd092e4cf8b728102fded8d1dcf" - head "http://svn.code.sf.net/p/astyle/code/trunk/AStyle" - - bottle do - cellar :any_skip_relocation - sha256 "65a2f71d86cbc112f12729a0845f47f718cb2751e2e1ccdd78c6c4fc4ad6e817" => :mojave - sha256 "a58fdf5320a691b37337973e0ca43d2e69f42adbc96d6ab160066c3574373047" => :high_sierra - sha256 "7a3ff647da72399ee8aa05f1c55806b3bc273409e4a7b2ab0f68930227a47b5f" => :sierra - sha256 "e6eb9d95f56fa99005173fcd1c147f9335f55c9ccf52067f57da36e95f7f4c7e" => :el_capitan - end - - def install - cd "src" do - system "make", "CXX=#{ENV.cxx}", "-f", "../build/mac/Makefile" - bin.install "bin/astyle" - end - end - - test do - (testpath/"test.c").write("int main(){return 0;}\n") - system "#{bin}/astyle", "--style=gnu", "--indent=spaces=4", - "--lineend=linux", "#{testpath}/test.c" - assert_equal File.read("test.c"), <<~EOS - int main() - { - return 0; - } - EOS - end -end diff --git a/Formula/at-spi2-atk.rb b/Formula/at-spi2-atk.rb deleted file mode 100644 index 2b9b464c54059..0000000000000 --- a/Formula/at-spi2-atk.rb +++ /dev/null @@ -1,31 +0,0 @@ -class AtSpi2Atk < Formula - desc "Accessibility Toolkit GTK+ module" - homepage "https://wiki.linuxfoundation.org/accessibility/" - url "https://download.gnome.org/sources/at-spi2-atk/2.30/at-spi2-atk-2.30.0.tar.xz" - sha256 "e2e1571004ea7b105c969473ce455a95be4038fb2541471714aeb33a26da8a9a" - - bottle do - cellar :any - sha256 "c2027dd839ea861984aee1587108e89be54661d4ceada586a48b4ca4f6cd0d41" => :mojave - sha256 "93b22bd8e17c750e71f8afbe96d2ed1011884f3a9461eeeeff7689b7473675ad" => :high_sierra - sha256 "a017537217c5c1533adc6a9c2ed209349186380ccda808375d10a3e8d7b393ed" => :sierra - sha256 "ac94ce79b4199253f019f7fd270e60931e2fbc301b86ec7e45aca16f58d0fc58" => :el_capitan - end - - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python" => :build - depends_on "at-spi2-core" - depends_on "atk" - - def install - ENV.refurbish_args - - mkdir "build" do - system "meson", "--prefix=#{prefix}", ".." - system "ninja" - system "ninja", "install" - end - end -end diff --git a/Formula/at-spi2-core.rb b/Formula/at-spi2-core.rb deleted file mode 100644 index 3fa3298401511..0000000000000 --- a/Formula/at-spi2-core.rb +++ /dev/null @@ -1,37 +0,0 @@ -class AtSpi2Core < Formula - desc "Protocol definitions and daemon for D-Bus at-spi" - homepage "https://wiki.linuxfoundation.org/accessibility/" - url "https://download.gnome.org/sources/at-spi2-core/2.30/at-spi2-core-2.30.0.tar.xz" - sha256 "0175f5393d19da51f4c11462cba4ba6ef3fa042abf1611a70bdfed586b7bfb2b" - - bottle do - sha256 "fba527a12118cfbb6668f6517e6edd875e0ffb5a06d8ef5cb7efce62f6f362e9" => :mojave - sha256 "649bacc1ff2fa519645dd267e2ad3591a28777d0170c62dd94cb6b1bd7ab474a" => :high_sierra - sha256 "55cfa9b412a347885868f9429e79a8757501d634608b3bc677fbfb573a812458" => :sierra - sha256 "29cdd716e1961e90a94fd6a73a8f62b57f7a6180ce64aa23e08e84e61c0acd19" => :el_capitan - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python" => :build - depends_on "dbus" - depends_on "gettext" - depends_on "glib" - - def install - ENV.refurbish_args - - mkdir "build" do - system "meson", "--prefix=#{prefix}", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - system "#{libexec}/at-spi2-registryd", "-h" - end -end diff --git a/Formula/atari800.rb b/Formula/atari800.rb deleted file mode 100644 index fa7930ea829b2..0000000000000 --- a/Formula/atari800.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Atari800 < Formula - desc "Atari 8-bit machine emulator" - homepage "https://atari800.github.io/" - url "https://downloads.sourceforge.net/project/atari800/atari800/4.0.0/atari800-4.0.0.tar.gz" - sha256 "08e9b989ddb2785265d242ff92b416a2b53c285c7309f3fc3f5e94889cb69eb5" - - bottle do - cellar :any - sha256 "3dbeacd2b8792c016a7b08d88372240bd45d6841e1e65ec6477fb1a322a013ae" => :mojave - sha256 "7e796d1b72b0f04b7d396a132f39be6b0537150b085ee33dde648980ab325049" => :high_sierra - sha256 "91c67cd09225e85b65ce6040c37608365afbe49428113c785973f9e32c3d2604" => :sierra - sha256 "bedac5c5ac65f87e08c1983d130fbe88e02e056b154196f2add661f98cb2b973" => :el_capitan - end - - depends_on "libpng" - depends_on "sdl" - - def install - cd "src" do - system "./configure", "--prefix=#{prefix}", - "--disable-sdltest" - system "make", "install" - end - end - - test do - assert_equal "Atari 800 Emulator, Version #{version}", - shell_output("#{bin}/atari800 -v", 3).strip - end -end diff --git a/Formula/atdtool.rb b/Formula/atdtool.rb deleted file mode 100644 index 4e9abaeabdd07..0000000000000 --- a/Formula/atdtool.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Atdtool < Formula - desc "Command-line interface for After the Deadline language checker" - homepage "https://github.com/lpenz/atdtool" - url "https://github.com/lpenz/atdtool/archive/upstream/1.3.3.tar.gz" - sha256 "3e928721388cf6f58b7e663ebc5508f26d180b1c07d5b8119212356c66e57fe8" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "70d3f21f1dc1ee76fa55fcb3d4cd5369300c8d361031267fb25f6426b13bdce9" => :mojave - sha256 "2de45317e5c51f1fcb7365d038e667fcbf48f333af9c49eb0a27ddce2d2b1e57" => :high_sierra - sha256 "2de45317e5c51f1fcb7365d038e667fcbf48f333af9c49eb0a27ddce2d2b1e57" => :sierra - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - prefix.install libexec/"share" - end - - test do - system "#{bin}/atdtool", "--help" - end -end diff --git a/Formula/aterm.rb b/Formula/aterm.rb deleted file mode 100644 index da4b474b62791..0000000000000 --- a/Formula/aterm.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Aterm < Formula - desc "Annotated Term for tree-like ADT exchange" - homepage "https://strategoxt.org/Tools/ATermFormat" - url "http://www.meta-environment.org/releases/aterm-2.8.tar.gz" - sha256 "bab69c10507a16f61b96182a06cdac2f45ecc33ff7d1b9ce4e7670ceeac504ef" - - bottle do - cellar :any - rebuild 1 - sha256 "302f12e90b83e896318e34a1931cdee75d7de43d1c8de9163f307a9d17f1668c" => :mojave - sha256 "f56a13be464fa577fdad7fe82779f5e6bbe820995e1849b6741ca92807c10bf0" => :high_sierra - sha256 "dd7b81b3bd9a31746ab461b8d79e4c32838b7e86f540769e4c17825a4b89c1c2" => :sierra - sha256 "5140e20287eda941f8756dfdaf377663f84f6872d1ca3f6d70e04b554591d11a" => :el_capitan - sha256 "d12bebbfa2e764abb9cfac1aecd6fc04e58f83eadf0fb3db298d5be03d7f8dca" => :yosemite - sha256 "f565d64b5b19b549cfe6eacedd587ff6d2b0e0b3129e1018b364edc0c2d9c415" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - ENV.deparallelize # Parallel builds don't work - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - ATerm bottomOfStack; - ATinit(argc, argv, &bottomOfStack); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lATerm", "-o", "test" - system "./test" - end -end diff --git a/Formula/atf.rb b/Formula/atf.rb deleted file mode 100644 index fcfc68b498bc9..0000000000000 --- a/Formula/atf.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Atf < Formula - desc "ATF: Automated Testing Framework" - homepage "https://github.com/jmmv/atf" - url "https://github.com/jmmv/atf/releases/download/atf-0.21/atf-0.21.tar.gz" - sha256 "92bc64180135eea8fe84c91c9f894e678767764f6dbc8482021d4dde09857505" - - bottle do - sha256 "c8e2c7b3d06d8c84409ef21b12201803113244d668eb092decf073fc5066fdab" => :mojave - sha256 "034a9f29ce63bd5cd019b957bc544a3129df7ec3872453f57f24914dce1f2da8" => :high_sierra - sha256 "a58333135e72fa1817c0411f3801615780c4346347d73d25ddec6eca6b213c41" => :sierra - sha256 "74493d4b4868628a7a84338eb28ecfce8afdd896962f3ba632b1e785def48737" => :el_capitan - sha256 "e4caa0498d0caf2e99e0eea9ae9269240e4f4a49a41f712cf6a730fab8d72672" => :yosemite - sha256 "240443a1a96ba8ed51ac7b263749f69013f05d42eb84018824791e419a6d5e81" => :mavericks - sha256 "be1a15d142717902889cf540f02641c34fd3241a369bf25f1c9c31197f04dccf" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - (testpath/"test.sh").write <<~EOS - #!/usr/bin/env atf-sh - echo test - exit 0 - EOS - system "bash", "test.sh" - end -end diff --git a/Formula/atk.rb b/Formula/atk.rb deleted file mode 100644 index af32268feda7b..0000000000000 --- a/Formula/atk.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Atk < Formula - desc "GNOME accessibility toolkit" - homepage "https://library.gnome.org/devel/atk/" - url "https://download.gnome.org/sources/atk/2.30/atk-2.30.0.tar.xz" - sha256 "dd4d90d4217f2a0c1fee708a555596c2c19d26fef0952e1ead1938ab632c027b" - - bottle do - sha256 "ef98c860ad49b7c335854dc8a558e193353a8afad8d22d0bc1be1d82ccc716c7" => :mojave - sha256 "13a414fd51dc409c7fb66ff5a91920f11cda4a18e311b16249df7a1395e8f2b5" => :high_sierra - sha256 "945bbdb2a8e1ed4802a9b437fcdfccd59d0de099bcbee66e32a42f7cf9c86896" => :sierra - sha256 "786efff084a599afbdc9ab706da2e64ae1c4fc29110ab8f7379649a9651599e2" => :el_capitan - end - - depends_on "gobject-introspection" => :build - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - patch :DATA - - def install - ENV.refurbish_args - - mkdir "build" do - system "meson", "--prefix=#{prefix}", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - const gchar *version = atk_get_version(); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - flags = %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/atk-1.0 - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -latk-1.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end - -__END__ -diff --git a/meson.build b/meson.build -index 59abf5e..7af4f12 100644 ---- a/meson.build -+++ b/meson.build -@@ -73,11 +73,6 @@ if host_machine.system() == 'linux' - common_ldflags += cc.get_supported_link_arguments(test_ldflags) - endif - --# Maintain compatibility with autotools on macOS --if host_machine.system() == 'darwin' -- common_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ] --endif -- - # Functions - checked_funcs = [ - 'bind_textdomain_codeset', diff --git a/Formula/atkmm.rb b/Formula/atkmm.rb deleted file mode 100644 index de4d39e7417e7..0000000000000 --- a/Formula/atkmm.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Atkmm < Formula - desc "Official C++ interface for the ATK accessibility toolkit library" - homepage "https://www.gtkmm.org/" - url "https://download.gnome.org/sources/atkmm/2.24/atkmm-2.24.2.tar.xz" - sha256 "ff95385759e2af23828d4056356f25376cfabc41e690ac1df055371537e458bd" - revision 1 - - bottle do - cellar :any - sha256 "c3a1e1fe87f1f53c7a272381a56257b7ddbddfbfc0790215b1a3b8e7b1792e4f" => :mojave - sha256 "b6b2da1cde33893f1c499a6df77de45568b20afcfc87e2bfc911a25631b9a1af" => :high_sierra - sha256 "09bfd213a8eb8c7b3ab8b8858593cd9c715b3f2baf00bdeb207dabf35e9d024e" => :sierra - sha256 "010e3d1649ba47570df271456ba83c28ca23fbbceddee8cad0644ef91ba96eca" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "atk" - depends_on "glibmm" - - needs :cxx11 - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main(int argc, char *argv[]) - { - Atk::init(); - return 0; - } - EOS - atk = Formula["atk"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - libsigcxx = Formula["libsigc++"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{glibmm.opt_include}/glibmm-2.4 - -I#{glibmm.opt_lib}/glibmm-2.4/include - -I#{include}/atkmm-1.6 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -L#{atk.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -latk-1.0 - -latkmm-1.6 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lintl - -lsigc-2.0 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/atlassian-cli.rb b/Formula/atlassian-cli.rb deleted file mode 100644 index 2b2fe64ab713c..0000000000000 --- a/Formula/atlassian-cli.rb +++ /dev/null @@ -1,26 +0,0 @@ -class AtlassianCli < Formula - desc "Command-line interface clients for Atlassian products" - homepage "https://bobswift.atlassian.net/wiki/pages/viewpage.action?pageId=1966101" - url "https://bobswift.atlassian.net/wiki/download/attachments/16285777/atlassian-cli-8.0.0-distribution.zip" - sha256 "cdba80bf44e8550ec9755c5b82711a0c5d32d2dbfe15bdbb55a75657603320b0" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - Dir.glob("*.sh") do |f| - cmd = File.basename(f, ".sh") - inreplace cmd + ".sh", "`dirname $0`", share - bin.install cmd + ".sh" => cmd - end - share.install "lib", "license" - end - - test do - Dir.glob(bin/"*") do |f| - cmd = File.basename(f, ".sh") - assert_match "Usage:", shell_output(bin/"#{cmd} --help 2>&1 | head") unless cmd == "atlassian" - end - end -end diff --git a/Formula/atomicparsley.rb b/Formula/atomicparsley.rb deleted file mode 100644 index 773c1885ca4be..0000000000000 --- a/Formula/atomicparsley.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Atomicparsley < Formula - desc "MPEG-4 command-line tool" - homepage "https://bitbucket.org/wez/atomicparsley/overview/" - url "https://bitbucket.org/wez/atomicparsley/get/0.9.6.tar.bz2" - sha256 "e28d46728be86219e6ce48695ea637d831ca0170ca6bdac99810996a8291ee50" - revision 1 - head "https://bitbucket.org/wez/atomicparsley", :using => :hg - - bottle do - cellar :any_skip_relocation - sha256 "d32a565f675bd0b2c5ebf1b5aee01fb79d9d42b072dedf724b7ee03b2cc242ee" => :mojave - sha256 "05c4cdc1dfc14fa6f06fdbbcadead5055a9fb53091d014458b86ecb4b22111fe" => :high_sierra - sha256 "d5f8672d420511ff76fd9ecc4d41c8aee5eecbf4382d7c4bd3fb04400c4617f4" => :sierra - sha256 "c0a7964ced998b2db7150f95b9329e138f28f0768be50d531fd4d82754e0ebde" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - # Fix Xcode 9 pointer warnings - # https://bitbucket.org/wez/atomicparsley/issues/52/xcode-9-build-failure - if DevelopmentTools.clang_build_version >= 900 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/ac8624c36e/atomicparsley/xcode9.patch" - sha256 "15b87be1800760920ac696a93131cab1c0f35ce4c400697bb8b0648765767e5f" - end - end - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-universal" - system "make", "install" - end - - test do - cp test_fixtures("test.m4a"), testpath/"file.m4a" - system "#{bin}/AtomicParsley", testpath/"file.m4a", "--artist", "Homebrew", "--overWrite" - output = shell_output("#{bin}/AtomicParsley file.m4a --textdata") - assert_match "Homebrew", output - end -end diff --git a/Formula/atomist-cli.rb b/Formula/atomist-cli.rb deleted file mode 100644 index a920ef2ea7b40..0000000000000 --- a/Formula/atomist-cli.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "language/node" - -class AtomistCli < Formula - desc "The Atomist CLI" - homepage "https://github.com/atomist/cli#readme" - url "https://registry.npmjs.org/@atomist/cli/-/@atomist/cli-1.1.0.tgz" - sha256 "bdc37fc2216745b1156f7038de66f755a355fc9328ee72ec53630d95c1b22be9" - - bottle do - cellar :any_skip_relocation - sha256 "4c9c870b32219f80331b4a5b88be890c65a7aa302491fb0152dfa53835b18ade" => :mojave - sha256 "93b64aa4b2b1616431546d1390a73f23fcf9e2d882aa7d774de5a094c08d9b01" => :high_sierra - sha256 "21c36da42409a22383703491f43ef4c6916ce156f7ca7fabfd4b51858f03e309" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - bash_completion.install "#{libexec}/lib/node_modules/@atomist/cli/assets/bash_completion/atomist" - end - - test do - assert_predicate bin/"atomist", :exist? - assert_predicate bin/"atomist", :executable? - assert_predicate bin/"@atomist", :exist? - assert_predicate bin/"@atomist", :executable? - - run_output = shell_output("#{bin}/atomist 2>&1") - assert_match "Not enough non-option arguments", run_output - assert_match "Specify --help for available options", run_output - - version_output = shell_output("#{bin}/atomist --version") - assert_match "@atomist/cli", version_output - assert_match "@atomist/sdm ", version_output - assert_match "@atomist/sdm-core", version_output - assert_match "@atomist/sdm-local", version_output - - skill_output = shell_output("#{bin}/atomist show skills") - assert_match(/\d+ commands are available from \d+ connected SDMs/, skill_output) - end -end diff --git a/Formula/atool.rb b/Formula/atool.rb deleted file mode 100644 index be4d53c26f95a..0000000000000 --- a/Formula/atool.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Atool < Formula - desc "Archival front-end" - homepage "https://savannah.nongnu.org/projects/atool/" - url "https://savannah.nongnu.org/download/atool/atool-0.39.0.tar.gz" - sha256 "aaf60095884abb872e25f8e919a8a63d0dabaeca46faeba87d12812d6efc703b" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "afc78205d3558294d008a801f7b06e8fcc94509a34bb0832f914575c196d6f8d" => :mojave - sha256 "0f28ddbd664675c6b3fe440f6cfba6ac8cc6fc1f97141979bbce485080a759f4" => :high_sierra - sha256 "656b59fcaa79956c81af4ce21afc06dbf9f6ffaecc0ff52b1a063da2c911fe89" => :sierra - sha256 "dcfdcb720aa3704b9103aa01bb8efac42d24327bc8664baa420a9a69d75a98b6" => :el_capitan - sha256 "efdeeb165e146f4a76477417d2af9c60e2f776d06081bb579ff73ceb296a899d" => :yosemite - sha256 "4eed286344a3a1d4fc6efc908b34062b5cc7c7fdf2449cf85b7767168585fc7a" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - mkdir "apple_juice" - cd testpath/"apple_juice" do - touch "example.txt" - touch "example2.txt" - system bin/"apack", "test.tar.gz", "example.txt", "example2.txt" - end - output = shell_output("#{bin}/als #{testpath}/apple_juice/test.tar.gz") - assert_match "example.txt", output - assert_match "example2.txt", output - end -end diff --git a/Formula/ats2-postiats.rb b/Formula/ats2-postiats.rb deleted file mode 100644 index 0dbcf3c59e12a..0000000000000 --- a/Formula/ats2-postiats.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Ats2Postiats < Formula - desc "Programming language with formal specification features" - homepage "http://www.ats-lang.org/" - url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.3.11/ATS2-Postiats-0.3.11.tgz" - sha256 "feba71f37e9688b8ff0a72c4eb21914ce59f19421350d9dc3f15ad6f8c28428a" - - bottle do - cellar :any - sha256 "b451498a16a5e4af15a0f08101926ccfa6e78e6e3d34573897891bba906d42d3" => :mojave - sha256 "b149d55a64bf358dc26cba82dd393ca8d680c1f1a55d3b1e8153b0a9aa5e0c30" => :high_sierra - sha256 "2611492fad5a912fceddcb691cfb5b4843436b9abf6af54747e1e324ed20e026" => :sierra - sha256 "f517b798a720d0782a6c2bc319a439aac5c92e7dee3e0baf57c49a1bd4aeee5f" => :el_capitan - end - - depends_on "gmp" - - def install - ENV.deparallelize - system "./configure", "--prefix=#{prefix}" - system "make", "all", "install" - end - - test do - (testpath/"hello.dats").write <<~EOS - val _ = print ("Hello, world!\n") - implement main0 () = () - EOS - system "#{bin}/patscc", "hello.dats", "-o", "hello" - assert_match "Hello, world!", shell_output(testpath/"hello") - end -end diff --git a/Formula/aubio.rb b/Formula/aubio.rb deleted file mode 100644 index 68a47c06f5d01..0000000000000 --- a/Formula/aubio.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Aubio < Formula - desc "Extract annotations from audio signals" - homepage "https://aubio.org/" - url "https://aubio.org/pub/aubio-0.4.7.tar.bz2" - sha256 "cbed4afec5ab3a1a6300c7e3af0a1369379aa94259f5e701a8ca905cdd9fa041" - revision 2 - - bottle do - cellar :any - sha256 "0a0f0aa930fe033f16662748bd27fae7b897e18d63b637eb5f3185b147230285" => :mojave - sha256 "1bcfe7f151e3778a934a7b63ba2660d012e2dc87e54ea52393d46f4fb19ab402" => :high_sierra - sha256 "1bb355e4fb82b09d4df4fb2c8b5a3f0537e6e8f660f22762da5255e36b9c4eae" => :sierra - end - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on :macos => :lion - depends_on "numpy" - depends_on "python" - - def install - # Needed due to issue with recent clang (-fno-fused-madd)) - ENV.refurbish_args - - system "python3", "./waf", "configure", "--prefix=#{prefix}" - system "python3", "./waf", "build" - system "python3", "./waf", "install" - - system "python3", *Language::Python.setup_install_args(prefix) - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/aubiocut", "--verbose", "/System/Library/Sounds/Glass.aiff" - system "#{bin}/aubioonset", "--verbose", "/System/Library/Sounds/Glass.aiff" - end -end diff --git a/Formula/audacious.rb b/Formula/audacious.rb deleted file mode 100644 index 423d73c26c88b..0000000000000 --- a/Formula/audacious.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Audacious < Formula - desc "Free and advanced audio player based on GTK+" - homepage "https://audacious-media-player.org/" - revision 2 - - stable do - url "https://distfiles.audacious-media-player.org/audacious-3.9.tar.bz2" - sha256 "2d8044673ac786d71b08004f190bbca368258bf60e6602ffc0d9622835ccb05e" - - resource "plugins" do - url "https://distfiles.audacious-media-player.org/audacious-plugins-3.9.tar.bz2" - sha256 "8bf7f21089cb3406968cc9c71307774aee7100ec4607f28f63cf5690d5c927b8" - - # Fixes "info_bar.cc:258:21: error: no viable overloaded '='" - # Upstream PR from 11 Dec 2017 "qtui: fix build with Qt 5.10" - patch do - url "https://github.com/audacious-media-player/audacious-plugins/pull/62.patch?full_index=1" - sha256 "055e11096de7a8b695959b0d5f69a7f84630764f7abd7ec7b4dc3f14a719d9de" - end - end - end - - bottle do - sha256 "e32b10763bb9ff68a632a6f5adfbd55f3884637dbdb892830ea77ab91d1446e0" => :mojave - sha256 "facd97bdfb3935149d7c51035b38e3a1f7f3c7b705074eb75a1a795844bf739a" => :high_sierra - sha256 "1acf6566b58d9ab31e088ed8e3f30aba30e171a32e0121f46f0f954a3871f7e9" => :sierra - sha256 "c9238f08f8f9328ca7b427e2616698d6bea975b33fbcbe2e52c8a2f4b8f5b009" => :el_capitan - end - - head do - url "https://github.com/audacious-media-player/audacious.git" - - resource "plugins" do - url "https://github.com/audacious-media-player/audacious-plugins.git" - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gettext" => :build - depends_on "make" => :build - depends_on "pkg-config" => :build - depends_on "faad2" - depends_on "ffmpeg" - depends_on "flac" - depends_on "fluid-synth" - depends_on "glib" - depends_on "lame" - depends_on "libbs2b" - depends_on "libcue" - depends_on "libnotify" - depends_on "libsamplerate" - depends_on "libsoxr" - depends_on "libvorbis" - depends_on "mpg123" - depends_on "neon" - depends_on "python@2" - depends_on "qt" - depends_on "sdl2" - depends_on "wavpack" - - def install - args = %W[ - --prefix=#{prefix} - --disable-coreaudio - --disable-gtk - --disable-mpris2 - --enable-mac-media-keys - --enable-qt - ] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - system "make", "install" - - resource("plugins").stage do - ENV.prepend_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" - - system "./autogen.sh" if build.head? - - system "./configure", *args - system "make" - system "make", "install" - end - end - - def caveats; <<~EOS - audtool does not work due to a broken dbus implementation on macOS, so is not built - coreaudio output has been disabled as it does not work (Fails to set audio unit input property.) - GTK+ gui is not built by default as the QT gui has better integration with macOS, and when built, the gtk gui takes precedence - EOS - end - - test do - system bin/"audacious", "--help" - end -end diff --git a/Formula/audiofile.rb b/Formula/audiofile.rb deleted file mode 100644 index 208869f1a87f2..0000000000000 --- a/Formula/audiofile.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Audiofile < Formula - desc "Reads and writes many common audio file formats" - homepage "https://audiofile.68k.org/" - revision 1 - - stable do - url "https://audiofile.68k.org/audiofile-0.3.6.tar.gz" - sha256 "cdc60df19ab08bfe55344395739bb08f50fc15c92da3962fac334d3bff116965" - - # Fixes CVE-2015-7747. Fixed upstream but doesn't apply cleanly. - # https://github.com/mpruett/audiofile/commit/b62c902dd258125cac86cd2df21fc898035a43d3 - patch do - url "https://deb.debian.org/debian/pool/main/a/audiofile/audiofile_0.3.6-4.debian.tar.xz" - sha256 "0620675a52bdb40b775980cc1820e308df329348bb847f9a4a8361b3799fa241" - apply "patches/03_CVE-2015-7747.patch" - end - end - - bottle do - cellar :any - sha256 "9d1038463e8eaa68f1cee8c447d566dc5acd32e2697f41837a9c08fedb0b2088" => :mojave - sha256 "cf1f732ca5565a0e5d24a8d90714e554f95b4fbd3662da18ec843c0c356fff16" => :high_sierra - sha256 "0a6cc39d6cce2c4436008f3d5679dbac6a8e0c0a1a91ea5db34597737fd5fb54" => :sierra - sha256 "8e725b2809f539e2382b07a2fb64a551cbb09fdbaad168dd05784142e07ce495" => :el_capitan - sha256 "b7c1a9815937840419cec79513d908a5e7ddb34699c34d656a6f1f85cb08b90f" => :yosemite - end - - head do - url "https://github.com/mpruett/audiofile.git" - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - # These have all been reported upstream but beside - # 03_CVE-2015-7747 not yet merged or fixed. - # https://github.com/mpruett/audiofile/issues/31 - # https://github.com/mpruett/audiofile/issues/32 - # https://github.com/mpruett/audiofile/issues/33 - # https://github.com/mpruett/audiofile/issues/34 - # https://github.com/mpruett/audiofile/issues/35 - # https://github.com/mpruett/audiofile/issues/36 - # https://github.com/mpruett/audiofile/issues/37 - # https://github.com/mpruett/audiofile/issues/38 - # https://github.com/mpruett/audiofile/issues/39 - # https://github.com/mpruett/audiofile/issues/40 - # https://github.com/mpruett/audiofile/issues/41 - # https://github.com/mpruett/audiofile/pull/42 - patch do - url "https://deb.debian.org/debian/pool/main/a/audiofile/audiofile_0.3.6-4.debian.tar.xz" - sha256 "0620675a52bdb40b775980cc1820e308df329348bb847f9a4a8361b3799fa241" - apply "patches/04_clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch", - "patches/05_Always-check-the-number-of-coefficients.patch", - "patches/06_Check-for-multiplication-overflow-in-MSADPCM-decodeSam.patch", - "patches/07_Check-for-multiplication-overflow-in-sfconvert.patch", - "patches/08_Fix-signature-of-multiplyCheckOverflow.-It-returns-a-b.patch", - "patches/09_Actually-fail-when-error-occurs-in-parseFormat.patch", - "patches/10_Check-for-division-by-zero-in-BlockCodec-runPull.patch" - end - - def install - if build.head? - inreplace "autogen.sh", "libtool", "glibtool" - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - end - - configure = build.head? ? "./autogen.sh" : "./configure" - args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] - system configure, *args - system "make" - system "make", "install" - end - - test do - inn = "/System/Library/Sounds/Glass.aiff" - out = "Glass.wav" - - system bin/"sfconvert", inn, out, "format", "wave" - system bin/"sfinfo", "--short", "--reporterror", out - end -end diff --git a/Formula/auditbeat.rb b/Formula/auditbeat.rb deleted file mode 100644 index edad8d6bcaa1e..0000000000000 --- a/Formula/auditbeat.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Auditbeat < Formula - desc "Lightweight Shipper for Audit Data" - homepage "https://www.elastic.co/products/beats/auditbeat" - # Pinned at 6.2.x because of a licencing issue - # See: https://github.com/Homebrew/homebrew-core/pull/28995 - url "https://github.com/elastic/beats/archive/v6.2.4.tar.gz" - sha256 "87d863cf55863329ca80e76c3d813af2960492f4834d4fea919f1d4b49aaf699" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "ebd8f45921dbdd3089084bca6b48f3c91553007a2d42eb222e0b9cf15b1b6873" => :high_sierra - sha256 "26a317fa93b70509f8885b63981cf3dd7332b825f975f6ceb151b49baf26fe7f" => :sierra - sha256 "3d639a62737631ec77a87d4f9853f9d653982c39f05dad964cf94de04f9444b2" => :el_capitan - end - - depends_on "go" => :build - depends_on "python@2" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - # Patch required to build against go 1.10. - # May be removed once upstream beats project fully supports go 1.10. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/1ddc0e6/auditbeat/go1.10.diff" - sha256 "cf0988ba5ff5cc8bd7502671f08ea282b19720be42bea2aaf5c236b29a01a24f" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages" - - resource("virtualenv").stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" - - cd "src/github.com/elastic/beats/auditbeat" do - system "make" - # prevent downloading binary wheels during python setup - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "make", "DEV_OS=darwin", "update" - - (etc/"auditbeat").install Dir["auditbeat.*", "fields.yml"] - (libexec/"bin").install "auditbeat" - prefix.install "_meta/kibana" - end - - prefix.install_metafiles buildpath/"src/github.com/elastic/beats" - - (bin/"auditbeat").write <<~EOS - #!/bin/sh - exec #{libexec}/bin/auditbeat \ - --path.config #{etc}/auditbeat \ - --path.data #{var}/lib/auditbeat \ - --path.home #{prefix} \ - --path.logs #{var}/log/auditbeat \ - "$@" - EOS - end - - def post_install - (var/"lib/auditbeat").mkpath - (var/"log/auditbeat").mkpath - end - - plist_options :manual => "auditbeat" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/auditbeat - RunAtLoad - - - - EOS - end - - test do - (testpath/"files").mkpath - (testpath/"config/auditbeat.yml").write <<~EOS - auditbeat.modules: - - module: file_integrity - paths: - - #{testpath}/files - output.file: - path: "#{testpath}/auditbeat" - filename: auditbeat - EOS - pid = fork do - exec "#{bin}/auditbeat", "-path.config", testpath/"config", "-path.data", testpath/"data" - end - sleep 5 - - begin - touch testpath/"files/touch" - sleep 30 - s = IO.readlines(testpath/"auditbeat/auditbeat").last(1)[0] - assert_match "\"action\":\[\"created\"\]", s - realdirpath = File.realdirpath(testpath) - assert_match "\"path\":\"#{realdirpath}/files/touch\"", s - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/augeas.rb b/Formula/augeas.rb deleted file mode 100644 index 4b37cbdbe943d..0000000000000 --- a/Formula/augeas.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Augeas < Formula - desc "Configuration editing tool and API" - homepage "http://augeas.net" - url "http://download.augeas.net/augeas-1.11.0.tar.gz" - sha256 "393ce8f4055af89cd4c20bf903eacbbd909cf427891f41b56dc2ba66243ea0b0" - - bottle do - sha256 "cebc1b3db31952c0d347586576b983a7f0585f0791e6ed9cab40bbd7485eeca8" => :mojave - sha256 "589af77e50225882c0f052379ffdcf935bba550f01190074395f6b5e195cb332" => :high_sierra - sha256 "1fbc0ab4f4537d59730fc84829cac47eb98362178423fed6f3e3241ec0c306d2" => :sierra - sha256 "afd1ca94038dfcccb49b2d5c36ebbc45ca95d749d847a25e26c39c080edf5f64" => :el_capitan - end - - head do - url "https://github.com/hercules-team/augeas.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "readline" - - def install - args = %W[--disable-debug --disable-dependency-tracking --prefix=#{prefix}] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - - system "make", "install" - end - - def caveats; <<~EOS - Lenses have been installed to: - #{HOMEBREW_PREFIX}/share/augeas/lenses/dist - EOS - end - - test do - system bin/"augtool", "print", etc - end -end diff --git a/Formula/augustus.rb b/Formula/augustus.rb deleted file mode 100644 index 765087b36dcab..0000000000000 --- a/Formula/augustus.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Augustus < Formula - desc "Predict genes in eukaryotic genomic sequences" - homepage "http://bioinf.uni-greifswald.de/augustus/" - url "http://bioinf.uni-greifswald.de/augustus/binaries/augustus-3.3.2.tar.gz" - sha256 "989a95fe3a83d62af4d323a9727d11b2c566adcf4d789d5d86d7b842d83e7671" - - bottle do - sha256 "2d7449f08dbf38ee7a46d51e2f17032221b0567e4a215e7d309602cee8724ce5" => :mojave - sha256 "6df315ec1bad28e6708e8a99b533216de4c4049ef1e79680f4132e77209f77b5" => :high_sierra - sha256 "020e9e8531aeaad48d06a96ca78eda64eae25e3737e69941f9069e6abd4e898d" => :sierra - end - - depends_on "bamtools" - depends_on "boost" - - def install - # Avoid "fatal error: 'sam.h' file not found" by not building bam2wig - inreplace "auxprogs/Makefile", "cd bam2wig; make;", "#cd bam2wig; make;" - - # Fix error: api/BamReader.h: No such file or directory - inreplace "auxprogs/bam2hints/Makefile", - "INCLUDES = /usr/include/bamtools", - "INCLUDES = #{Formula["bamtools"].include/"bamtools"}" - inreplace "auxprogs/filterBam/src/Makefile", - "BAMTOOLS = /usr/include/bamtools", - "BAMTOOLS= #{Formula["bamtools"].include/"bamtools"}" - - # Prevent symlinking into /usr/local/bin/ - inreplace "Makefile", %r{ln -sf.*/usr/local/bin/}, "#ln -sf" - - # Compile executables for macOS. Tarball ships with executables for Linux. - system "make", "clean" - system "make" - - system "make", "install", "INSTALLDIR=#{prefix}" - bin.env_script_all_files libexec/"bin", :AUGUSTUS_CONFIG_PATH => prefix/"config" - end - - test do - (testpath/"test.fasta").write <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - cmd = "#{bin}/augustus --species=human test.fasta" - assert_match "Predicted genes", shell_output(cmd) - end -end diff --git a/Formula/aurora-cli.rb b/Formula/aurora-cli.rb deleted file mode 100644 index b62df47bdc384..0000000000000 --- a/Formula/aurora-cli.rb +++ /dev/null @@ -1,40 +0,0 @@ -class AuroraCli < Formula - desc "Apache Aurora Scheduler Client" - homepage "https://aurora.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=/aurora/0.21.0/apache-aurora-0.21.0.tar.gz" - sha256 "4b608e5199ae72c83b0bc97569de5ed2c58d73a709f6906c3664154144438b65" - - bottle do - cellar :any_skip_relocation - sha256 "4bdec41534eb705691db0fd301dc2e76349ba458971c5d699a3dc8b6ec12f494" => :mojave - sha256 "8e8b1b203a68dd13016f16ce393819ee0cbaaa4e46c923e17c3774bfaf32656e" => :high_sierra - sha256 "3e5af36a5af5ab82b48efeed7134cab6736719994831e49a760f63ed6ae1b7fe" => :sierra - sha256 "0aa81ba9c237f213417b5c3c60409d2f754953a98ff3f6eb5c41ec991b90f2d0" => :el_capitan - end - - depends_on "python@2" - - def install - # No pants yet for Mojave, so we force High Sierra binaries there - ENV["PANTS_BINARIES_PATH_BY_ID"] = "{('darwin','15'):('mac','10.11'),('darwin','16'):('mac','10.12'),('darwin','17'):('mac','10.13'),('darwin','18'):('mac','10.13')}" - - system "./pants", "binary", "src/main/python/apache/aurora/kerberos:kaurora" - system "./pants", "binary", "src/main/python/apache/aurora/kerberos:kaurora_admin" - bin.install "dist/kaurora.pex" => "aurora" - bin.install "dist/kaurora_admin.pex" => "aurora_admin" - end - - test do - ENV["AURORA_CONFIG_ROOT"] = "#{testpath}/" - (testpath/"clusters.json").write <<~EOS - [{ - "name": "devcluster", - "slave_root": "/tmp/mesos/", - "zk": "172.16.64.185", - "scheduler_zk_path": "/aurora/scheduler", - "auth_mechanism": "UNAUTHENTICATED" - }] - EOS - system "#{bin}/aurora_admin", "get_cluster_config", "devcluster" - end -end diff --git a/Formula/aurora.rb b/Formula/aurora.rb deleted file mode 100644 index 2e8fc9062d7ea..0000000000000 --- a/Formula/aurora.rb +++ /dev/null @@ -1,46 +0,0 @@ -require "language/go" - -class Aurora < Formula - desc "Beanstalkd queue server console" - homepage "https://xuri.me/aurora" - url "https://github.com/xuri/aurora/archive/2.1.tar.gz" - sha256 "921f137e269c3abc4c352822cb73cc6edff69434d4685c8aabc24978e951e800" - - bottle do - cellar :any_skip_relocation - sha256 "93366557dd7e5e34c081fc3c26630208b88339f36bf9e5d33f7bd634b5d6d39f" => :mojave - sha256 "64a70dcfd939245ccd64cee3f91c26374616eede20583e0a7e43314188d6e648" => :high_sierra - sha256 "d2af9495df0060035181a1991a9e29a8723336b312ac794e4b9a716cc38ce58e" => :sierra - sha256 "f0361aa58cf382e6daafb4cfd13dad45d398e4d6edff5cccd813efc165df199b" => :el_capitan - sha256 "150614c06c473e101d34f65f0e4114581df8d9808a3ec36df9425c9fd5246c4d" => :yosemite - end - - depends_on "go" => :build - - go_resource "github.com/BurntSushi/toml" do - url "https://github.com/BurntSushi/toml.git", - :revision => "a368813c5e648fee92e5f6c30e3944ff9d5e8895" - end - - go_resource "github.com/rakyll/statik" do - url "https://github.com/rakyll/statik.git", - :revision => "89fe3459b5c829c32e89bdff9c43f18aad728f2f" - end - - go_resource "github.com/xuri/aurora" do - url "https://github.com/xuri/aurora.git", - :revision => "ba6eea49d8e2ba665613b570b1532ac9fbfcfbbb" - end - - def install - ENV["GOPATH"] = buildpath - Language::Go.stage_deps resources, buildpath/"src" - (buildpath/"src/github.com/xuri").mkpath - ln_s buildpath, "src/github.com/xuri/aurora" - system "go", "build", "-o", bin/"aurora" - end - - test do - assert_match version.to_s, shell_output("#{bin}/aurora -v") - end -end diff --git a/Formula/auto-scaling.rb b/Formula/auto-scaling.rb deleted file mode 100644 index 6b6e0ae42f94e..0000000000000 --- a/Formula/auto-scaling.rb +++ /dev/null @@ -1,39 +0,0 @@ -class AutoScaling < Formula - desc "Client interface to the Amazon Auto Scaling web service" - homepage "https://aws.amazon.com/developertools/2535" - url "https://ec2-downloads.s3.amazonaws.com/AutoScaling-2011-01-01.zip" - version "1.0.61.6" - sha256 "2c81e092d5c479896007e7d1a3cf40631d09e6bffd83b42f49a56f42207326b6" - - bottle :unneeded - - depends_on :java - - def install - env = Language::Java.java_home_env.merge(:AWS_AUTO_SCALING_HOME => libexec) - rm Dir["bin/*.cmd"] # Remove Windows versions - libexec.install Dir["*"] - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "service" - (bin/basename).write_env_script file, env - end - end - - def caveats - <<~EOS - Before you can use these tools you must export some variables to your $SHELL. - export AWS_ACCESS_KEY="" - export AWS_SECRET_KEY="" - export AWS_CREDENTIAL_FILE="" - - See the website for more details: - https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/UsingTheCommandLineTools.html - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/as-version") - end -end diff --git a/Formula/autobench.rb b/Formula/autobench.rb deleted file mode 100644 index 51b7365abdf5c..0000000000000 --- a/Formula/autobench.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Autobench < Formula - desc "Automatic webserver benchmark tool" - homepage "http://www.xenoclast.org/autobench/" - url "http://www.xenoclast.org/autobench/downloads/autobench-2.1.2.tar.gz" - sha256 "d8b4d30aaaf652df37dff18ee819d8f42751bc40272d288ee2a5d847eaf0423b" - - bottle do - cellar :any_skip_relocation - sha256 "7306e126fae18f469488e3c3952ff8bd67af967510ffd6a021914a59556e0419" => :mojave - sha256 "02e3a2a6aa7c3e2d6d0a4500445c7b08bd0804dac28d863944dfd48d41f025d9" => :high_sierra - sha256 "daecaaf9c3a733c7667c5414371ba948896b0c0eb47dfd1b1ce876921c829390" => :sierra - sha256 "37bb6f40825953f9ba176522bc64d74a6375304d7963331aee937417e339964f" => :el_capitan - sha256 "9884556bd5f7ab7c29a0aa199328cbe609e04437b1ddce4703214ba65f15d40a" => :yosemite - sha256 "d31d3625f06d036af97b6cc80d62856b9d3eecadb4ed9fe7a0cb9b96f8d9f9a0" => :mavericks - sha256 "0246ec483143e1f752a6b7a22ddc11a5c213e795bb55c5296646bcedc05d3426" => :mountain_lion - end - - depends_on "httperf" - - def install - system "make", "PREFIX=#{prefix}", - "MANDIR=#{man1}", - "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "install" - end - - test do - system "#{bin}/crfile", "-f", "#{testpath}/test", "-s", "42" - assert_predicate testpath/"test", :exist? - assert_equal 42, File.size("test") - end -end diff --git a/Formula/autocode.rb b/Formula/autocode.rb deleted file mode 100644 index 4c02aaace7853..0000000000000 --- a/Formula/autocode.rb +++ /dev/null @@ -1,40 +0,0 @@ -require "language/node" - -class Autocode < Formula - desc "Code automation for every language, library and framework" - homepage "https://autocode.readme.io/" - url "https://registry.npmjs.org/autocode/-/autocode-1.3.1.tgz" - sha256 "952364766e645d4ddae30f9d6cc106fdb74d05afc4028066f75eeeb17c4b0247" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "44742d0ccc3af3f27590445dbf2e89dffd8e684ff81521b5dc421449507879cd" => :mojave - sha256 "a11f1fbbbf04052b9885a00abc88e7539a6c1992e35a62c6776df7ea32daf890" => :high_sierra - sha256 "f369819b2f33327071a68455a14f66855286c7614977f06704f21c38e2df5f89" => :sierra - sha256 "c321c73e1662332392c5949467c544e18db30849019555086ad14eeb097656d2" => :el_capitan - sha256 "a0b7c969db9e2870e818587c7d832bbe0bb187cbc01346b85bb81a6097a9e015" => :yosemite - sha256 "04effb5aecdd48e2a3c38435079424fd83f08dff206096f9807ff7c4ccd68b93" => :mavericks - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/".autocode/config.yml").write <<~EOS - name: test - version: 0.1.0 - description: test description - author: - name: Test User - email: test@example.com - url: https://example.com - copyright: 2015 Test - EOS - system bin/"autocode", "build" - end -end diff --git a/Formula/autoconf-archive.rb b/Formula/autoconf-archive.rb deleted file mode 100644 index dce4853f7051e..0000000000000 --- a/Formula/autoconf-archive.rb +++ /dev/null @@ -1,42 +0,0 @@ -class AutoconfArchive < Formula - desc "Collection of over 500 reusable autoconf macros" - homepage "https://savannah.gnu.org/projects/autoconf-archive/" - url "https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2018.03.13.tar.xz" - mirror "https://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2018.03.13.tar.xz" - sha256 "6175f90d9fa64c4d939bdbb3e8511ae0ee2134863a2c7bf8d9733819efa6e159" - - bottle do - cellar :any_skip_relocation - sha256 "608a8ec40924375525fa4f33280088ea7b4136b2255525da34f7f76fee954c5f" => :mojave - sha256 "10e2660afcbb3d970cd7cac44ad0ebf84f521ab89fd9de25091e752aa0aa9959" => :high_sierra - sha256 "10e2660afcbb3d970cd7cac44ad0ebf84f521ab89fd9de25091e752aa0aa9959" => :sierra - sha256 "10e2660afcbb3d970cd7cac44ad0ebf84f521ab89fd9de25091e752aa0aa9959" => :el_capitan - end - - # autoconf-archive is useless without autoconf - depends_on "autoconf" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.m4").write <<~EOS - AC_INIT(myconfig, version-0.1) - AC_MSG_NOTICE([Hello, world.]) - - m4_include([#{share}/aclocal/ax_have_select.m4]) - - # from https://www.gnu.org/software/autoconf-archive/ax_have_select.html - AX_HAVE_SELECT( - [AX_CONFIG_FEATURE_ENABLE(select)], - [AX_CONFIG_FEATURE_DISABLE(select)]) - AX_CONFIG_FEATURE( - [select], [This platform supports select(7)], - [HAVE_SELECT], [This platform supports select(7).]) - EOS - - system "#{Formula["autoconf"].bin}/autoconf", "test.m4" - end -end diff --git a/Formula/autoconf.rb b/Formula/autoconf.rb deleted file mode 100644 index 1e279c46f3cbb..0000000000000 --- a/Formula/autoconf.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Autoconf < Formula - desc "Automatic configure script builder" - homepage "https://www.gnu.org/software/autoconf" - url "https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz" - mirror "https://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz" - sha256 "954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969" - - bottle do - cellar :any_skip_relocation - rebuild 4 - sha256 "9724736d34773b6e41e2434ffa28fe79feccccf7b7786e54671441ca75115cdb" => :mojave - sha256 "63957a3952b7af5496012b3819c9956822fd7d895d63339c23fdc65c502e1a40" => :high_sierra - sha256 "a76fca79a00f733c1c9f75600b906de4755dd3fbb595b1b55ded1347ac141607" => :sierra - sha256 "ded69c7dac4bc8747e52dca37d6d561e55e3162649d3805572db0dc2f940a4b8" => :el_capitan - sha256 "daf70656aa9ff8b2fb612324222aa6b5e900e2705c9f555198bcd8cd798d7dd0" => :yosemite - sha256 "d153b3318754731ff5e91b45b2518c75880993fa9d1f312a03696e2c1de0c9d5" => :mavericks - sha256 "37e77a2e7ca6d479f0a471d5f5d828efff621bd051c1884ff1363d77c5c4675e" => :mountain_lion - end - - def install - ENV["PERL"] = "/usr/bin/perl" - - # force autoreconf to look for and use our glibtoolize - inreplace "bin/autoreconf.in", "libtoolize", "glibtoolize" - # also touch the man page so that it isn't rebuilt - inreplace "man/autoreconf.1", "libtoolize", "glibtoolize" - - system "./configure", "--prefix=#{prefix}", "--with-lispdir=#{elisp}" - system "make", "install" - - rm_f info/"standards.info" - end - - test do - cp pkgshare/"autotest/autotest.m4", "autotest.m4" - system bin/"autoconf", "autotest.m4" - end -end diff --git a/Formula/autoconf@2.13.rb b/Formula/autoconf@2.13.rb deleted file mode 100644 index 4c7e55accb962..0000000000000 --- a/Formula/autoconf@2.13.rb +++ /dev/null @@ -1,29 +0,0 @@ -class AutoconfAT213 < Formula - desc "Automatic configure script builder" - homepage "https://www.gnu.org/software/autoconf/" - url "https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz" - mirror "https://ftpmirror.gnu.org/autoconf/autoconf-2.13.tar.gz" - sha256 "f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e" - - bottle do - sha256 "1ea8c751806adc1ee85dcfef1b66d2d8aaed52d9848362635bed0251b7437fa4" => :mojave - sha256 "180a5d234c513e34952d639cfbcb5c486d64ad814d3d422b6cf86d048c0267c8" => :high_sierra - sha256 "1631e2f720355ef11b150ebddde824c02eab44a336203bcdb5282e4784ecbcd9" => :sierra - sha256 "f6b148c2bcf08f0e143a4757fa6784bf9e0d780d5ca8ec8cd97c042316c50d84" => :el_capitan - sha256 "f6b148c2bcf08f0e143a4757fa6784bf9e0d780d5ca8ec8cd97c042316c50d84" => :yosemite - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--program-suffix=213", - "--prefix=#{prefix}", - "--infodir=#{pkgshare}/info", - "--datadir=#{pkgshare}" - system "make", "install" - end - - test do - assert_match "Usage: autoconf", shell_output("#{bin}/autoconf213 --help 2>&1") - end -end diff --git a/Formula/autoenv.rb b/Formula/autoenv.rb deleted file mode 100644 index 866a18e7bf46f..0000000000000 --- a/Formula/autoenv.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Autoenv < Formula - desc "Per-project, per-directory shell environments" - homepage "https://github.com/kennethreitz/autoenv" - url "https://github.com/kennethreitz/autoenv/archive/v0.2.1.tar.gz" - sha256 "d10ee4d916a11a664453e60864294fec221c353f8ad798aa0aa6a2d2c5d5b318" - head "https://github.com/kennethreitz/autoenv.git" - - bottle :unneeded - - def install - prefix.install "activate.sh" - end - - def caveats; <<~EOS - To finish the installation, source activate.sh in your shell: - source #{opt_prefix}/activate.sh - EOS - end - - test do - (testpath/"test/.env").write "echo it works\n" - testcmd = "yes | bash -c '. #{prefix}/activate.sh; autoenv_cd test'" - assert_match "it works", shell_output(testcmd) - end -end diff --git a/Formula/autogen.rb b/Formula/autogen.rb deleted file mode 100644 index 18e7f949dc350..0000000000000 --- a/Formula/autogen.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Autogen < Formula - desc "Automated text file generator" - homepage "https://autogen.sourceforge.io" - url "https://ftp.gnu.org/gnu/autogen/rel5.18.12/autogen-5.18.12.tar.xz" - mirror "https://ftpmirror.gnu.org/autogen/rel5.18.12/autogen-5.18.12.tar.xz" - sha256 "be3ba62e883185b6ee8475edae97d7197d701d6b9ad9c3d2df53697110c1bfd8" - revision 1 - - bottle do - sha256 "bf05048f02504d4dd73f5204abcfd7b880dca3ef65ed6c1a11a2836fed1efd80" => :mojave - sha256 "c9835af12e309b7992918e64fc766f59ca50ff3f4e846434d74141859d638cd8" => :high_sierra - sha256 "c80dbb65f3afee35378aadaf766cd3d772d39256ec6d48b9864ecab018a931e9" => :sierra - sha256 "ff8c66ca7d86c309e884dad0fcc49aadf65a830768a0551c5711cba2f6d6a046" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "guile" - - # Allow guile 2.2 to be used - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0de886b/autogen/allow-guile-2.2.diff" - sha256 "438fe673432c96d5da449b84daa4d1c6ad238ea0b4ccd13491872df8c51fa978" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - - # make and install must be separate steps for this formula - system "make" - system "make", "install" - end - - test do - system bin/"autogen", "-v" - end -end diff --git a/Formula/autojump.rb b/Formula/autojump.rb deleted file mode 100644 index 3015f177935fa..0000000000000 --- a/Formula/autojump.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Autojump < Formula - desc "Shell extension to jump to frequently used directories" - homepage "https://github.com/wting/autojump" - url "https://github.com/wting/autojump/archive/release-v22.5.1.tar.gz" - sha256 "765fabda130eb4df70d1c1e5bc172e1d18f8ec22c6b89ff98f1674335292e99f" - head "https://github.com/wting/autojump.git" - - bottle do - cellar :any_skip_relocation - sha256 "80aef4fa4699bad12cae0c1a6d6db2632d15c13b503796db5c9889f7b43a3279" => :mojave - sha256 "8e302e0a90b898349749c4b83b3c758f4af76ad415f6ac5e245cc0df9c2c90e6" => :high_sierra - sha256 "29d37b9fc31a978d0767c4925e88fa9fe3cebf4a9f9278fa82a96baf5caa0db4" => :sierra - sha256 "29d37b9fc31a978d0767c4925e88fa9fe3cebf4a9f9278fa82a96baf5caa0db4" => :el_capitan - sha256 "29d37b9fc31a978d0767c4925e88fa9fe3cebf4a9f9278fa82a96baf5caa0db4" => :yosemite - end - - def install - system "./install.py", "-d", prefix, "-z", zsh_completion - - # Backwards compatibility for users that have the old path in .bash_profile - # or .zshrc - (prefix/"etc").install_symlink prefix/"etc/profile.d/autojump.sh" - - libexec.install bin - bin.write_exec_script libexec/"bin/autojump" - end - - def caveats; <<~EOS - Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember - to source the file to update your current session): - [ -f #{etc}/profile.d/autojump.sh ] && . #{etc}/profile.d/autojump.sh - - If you use the Fish shell then add the following line to your ~/.config/fish/config.fish: - [ -f #{HOMEBREW_PREFIX}/share/autojump/autojump.fish ]; and source #{HOMEBREW_PREFIX}/share/autojump/autojump.fish - EOS - end - - test do - path = testpath/"foo/bar" - path.mkpath - output = ` - source #{etc}/profile.d/autojump.sh - j -a "#{path.relative_path_from(testpath)}" - j foo >/dev/null - pwd - `.strip - assert_equal path.realpath.to_s, output - end -end diff --git a/Formula/automake.rb b/Formula/automake.rb deleted file mode 100644 index 5c3e768916e60..0000000000000 --- a/Formula/automake.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Automake < Formula - desc "Tool for generating GNU Standards-compliant Makefiles" - homepage "https://www.gnu.org/software/automake/" - url "https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz" - mirror "https://ftpmirror.gnu.org/automake/automake-1.16.1.tar.xz" - sha256 "5d05bb38a23fd3312b10aea93840feec685bdf4a41146e78882848165d3ae921" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "0a359c2385d0673ce1ab3cdaf39dd22af191f7b74732105ca5751e08a334e061" => :mojave - sha256 "fb32c065aaf91661380af32ed301edcf209ba453635c79ca945353b67e54af10" => :high_sierra - sha256 "fb32c065aaf91661380af32ed301edcf209ba453635c79ca945353b67e54af10" => :sierra - sha256 "d552844779f0dc4062f27203f7facfbd74c9d1780724ac76a86791e401aa73bd" => :el_capitan - end - - depends_on "autoconf" - - # https://lists.gnu.org/archive/html/bug-automake/2018-04/msg00002.html - # Remove this when applying any future 1.16.2 update. - patch do - url "https://git.savannah.gnu.org/cgit/automake.git/patch/?id=a348d830659fffd2cfc42994524783b07e69b4b5" - sha256 "7a57ca2b91f7f3c0b168cf5ffbc8a1b2168f3886bcadcc15412281472dace3ce" - end - - def install - ENV["PERL"] = "/usr/bin/perl" - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - - # Our aclocal must go first. See: - # https://github.com/Homebrew/homebrew/issues/10618 - (share/"aclocal/dirlist").write <<~EOS - #{HOMEBREW_PREFIX}/share/aclocal - /usr/share/aclocal - EOS - end - - test do - (testpath/"test.c").write <<~EOS - int main() { return 0; } - EOS - (testpath/"configure.ac").write <<~EOS - AC_INIT(test, 1.0) - AM_INIT_AUTOMAKE - AC_PROG_CC - AC_CONFIG_FILES(Makefile) - AC_OUTPUT - EOS - (testpath/"Makefile.am").write <<~EOS - bin_PROGRAMS = test - test_SOURCES = test.c - EOS - system bin/"aclocal" - system bin/"automake", "--add-missing", "--foreign" - system "autoconf" - system "./configure" - system "make" - system "./test" - end -end diff --git a/Formula/automysqlbackup.rb b/Formula/automysqlbackup.rb deleted file mode 100644 index fde3c0d924a85..0000000000000 --- a/Formula/automysqlbackup.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Automysqlbackup < Formula - desc "Automate MySQL backups" - homepage "https://sourceforge.net/projects/automysqlbackup/" - url "https://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0/automysqlbackup-v3.0_rc6.tar.gz" - version "3.0-rc6" - sha256 "889e064d086b077e213da11e937ea7242a289f9217652b9051c157830dc23cc0" - - bottle :unneeded - - def install - inreplace "automysqlbackup" do |s| - s.gsub! "/etc", etc - s.gsub! "/var", var - end - inreplace "automysqlbackup.conf", "/var", var - - conf_path = (etc/"automysqlbackup") - conf_path.install "automysqlbackup.conf" unless (conf_path/"automysqlbackup.conf").exist? - sbin.install "automysqlbackup" - end - - def caveats; <<~EOS - You will have to edit - #{etc}/automysqlbackup/automysqlbackup.conf - to set AutoMySQLBackup up to find your database and backup directory. - - The included plist file will run AutoMySQLBackup every day at 04:00. - EOS - end - - plist_options :manual => "automysqlbackup" - - def plist; <<~EOS - - - - - Label - #{plist_name} - OnDemand - - RunAtLoad - - StartCalendarInterval - - Hour - 04 - Minute - 00 - - ProgramArguments - - #{sbin}/automysqlbackup - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - system "#{sbin}/automysqlbackup", "--help" - end -end diff --git a/Formula/autopano-sift-c.rb b/Formula/autopano-sift-c.rb deleted file mode 100644 index e23545659f3ce..0000000000000 --- a/Formula/autopano-sift-c.rb +++ /dev/null @@ -1,28 +0,0 @@ -class AutopanoSiftC < Formula - desc "Find control points in overlapping image pairs" - homepage "https://wiki.panotools.org/Autopano-sift-C" - url "https://downloads.sourceforge.net/project/hugin/autopano-sift-C/autopano-sift-C-2.5.1/autopano-sift-C-2.5.1.tar.gz" - sha256 "9a9029353f240b105a9c0e31e4053b37b0f9ef4bd9166dcb26be3e819c431337" - revision 1 - - bottle do - cellar :any - sha256 "4ccc74538e6f6b01fd42c659991d0ba67e2544eb135f130d052dd1d2688070d8" => :mojave - sha256 "1127a58fa18f17bdf4776de9fa8871df153d80447ac7b03388aceef71da87b8a" => :high_sierra - sha256 "8b3c5657e1b4b29848bc583b8794eb1739018058c42a291bf3016fee02ab0532" => :sierra - sha256 "9845348b5630218469ee555c666677303fa8d9cf45cd7aa51b26e1bef81cd76f" => :el_capitan - sha256 "f38fa9a0dc3b30352155bafdad91f18b01ddc11db7c27c164d23def252ec7513" => :yosemite - end - - depends_on "cmake" => :build - depends_on "libpano" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_match "Version #{version}", pipe_output("#{bin}/autopano-sift-c") - end -end diff --git a/Formula/autopep8.rb b/Formula/autopep8.rb deleted file mode 100644 index 1675550d926c5..0000000000000 --- a/Formula/autopep8.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Autopep8 < Formula - include Language::Python::Virtualenv - - desc "Automatically formats Python code to conform to the PEP 8 style guide" - homepage "https://github.com/hhatto/autopep8" - url "https://files.pythonhosted.org/packages/5b/ba/37d30e4263c51ee5a655118ac8c331e96a4e45fd4cea876a74b87af9ffc1/autopep8-1.4.3.tar.gz" - sha256 "33d2b5325b7e1afb4240814fe982eea3a92ebea712869bfd08b3c0393404248c" - - bottle do - cellar :any_skip_relocation - sha256 "e907895a8bb66a4dd3803db9ab36c94ed19d267858d002da0b8cb6a71ced6d79" => :mojave - sha256 "6906758261366f6cdefebccb7e40418285aa1ab8ced2946f3b865691fad42c26" => :high_sierra - sha256 "22f0fc75ab33b8096c78c5ad90782d00cbe35c3571d974710d157a30540cfc45" => :sierra - end - - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", name - venv.pip_install_and_link buildpath - end - - test do - output = shell_output("echo \"x='homebrew'\" | #{bin}/autopep8 -") - assert_equal "x = 'homebrew'", output.strip - end -end diff --git a/Formula/autopsy.rb b/Formula/autopsy.rb deleted file mode 100644 index 7bd72d5b5c24c..0000000000000 --- a/Formula/autopsy.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Autopsy < Formula - desc "Graphical interface to Sleuth Kit investigation tools" - homepage "https://www.sleuthkit.org/autopsy/index.php" - url "https://downloads.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz" - sha256 "ab787f519942783d43a561d12be0554587f11f22bc55ab79d34d8da703edc09e" - - bottle :unneeded - - depends_on "sleuthkit" - - # fixes weird configure script that wouldn't work nicely with homebrew - patch :DATA - - def autcfg; <<~EOS - # Autopsy configuration settings - - # when set to 1, the server will stop after it receives no - # connections for STIMEOUT seconds. - $USE_STIMEOUT = 0; - $STIMEOUT = 3600; - - # number of seconds that child waits for input from client - $CTIMEOUT = 15; - - # set to 1 to save the cookie value in a file (for scripting) - $SAVE_COOKIE = 1; - - $INSTALLDIR = '#{prefix}'; - - - # System Utilities - $GREP_EXE = '/usr/bin/grep'; - $FILE_EXE = '/usr/bin/file'; - $MD5_EXE = '/sbin/md5'; - $SHA1_EXE = '/usr/bin/shasum'; - - - # Directories - $TSKDIR = '/usr/local/bin/'; - - # Homebrew users can install NSRL database and change this variable later - $NSRLDB = ''; - - # Evidence locker location - $LOCKDIR = '#{var}/lib/autopsy'; - EOS - end - - def install - (var+"lib/autopsy").mkpath - mv "lib", "libexec" - prefix.install %w[global.css help libexec pict] - prefix.install Dir["*.txt"] - (prefix+"conf.pl").write autcfg - inreplace "base/autopsy.base", "/tmp/autopsy", prefix - inreplace "base/autopsy.base", "lib/define.pl", "#{libexec}/define.pl" - bin.install "base/autopsy.base" => "autopsy" - end - - def caveats; <<~EOS - By default, the evidence locker is in: - #{var}/lib/autopsy - EOS - end -end - -__END__ -diff --git a/base/autopsy.base b/base/autopsy.base -index 3b3bbdc..a0d2632 100644 ---- a/base/autopsy.base -+++ b/base/autopsy.base -@@ -1,3 +1,6 @@ -+#!/usr/bin/perl -wT -+use lib '/tmp/autopsy/'; -+use lib '/tmp/autopsy/libexec/'; - # - # autopsy gui server - # Autopsy Forensic Browser diff --git a/Formula/autorest.rb b/Formula/autorest.rb deleted file mode 100644 index 369e69df31fd9..0000000000000 --- a/Formula/autorest.rb +++ /dev/null @@ -1,36 +0,0 @@ -require "language/node" - -class Autorest < Formula - desc "Swagger (OpenAPI) Specification code generator" - homepage "https://github.com/Azure/autorest" - url "https://registry.npmjs.org/autorest/-/autorest-2.0.4283.tgz" - sha256 "a655719fa6dd20b11db4a3d9c5853e9ed0454429bd6371f0bc6a5a9014b1bb8d" - - bottle do - cellar :any_skip_relocation - sha256 "f21d55c75239c873ebaea6f35b98e55369587f0d1c1750dc9fa5f0b5961e1be1" => :mojave - sha256 "755f3e5566c192b4f861a2e8dd4f2d2351070a1d022e54138197aae55b5a894b" => :high_sierra - sha256 "ddf3e62ef8e0c98554f48dbd2ac1aec6c56ae62b20419c14b049063867183cc5" => :sierra - end - - depends_on "node" - - resource "petstore" do - url "https://raw.githubusercontent.com/Azure/autorest/5c170a02c009d032e10aa9f5ab7841e637b3d53b/Samples/1b-code-generation-multilang/petstore.yaml" - sha256 "e981f21115bc9deba47c74e5c533d92a94cf5dbe880c4304357650083283ce13" - end - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - resource("petstore").stage do - system (bin/"autorest"), "--input-file=petstore.yaml", - "--nodejs", - "--output-folder=petstore" - assert_includes File.read("petstore/package.json"), "Microsoft Corporation" - end - end -end diff --git a/Formula/autossh.rb b/Formula/autossh.rb deleted file mode 100644 index c551335ec5b30..0000000000000 --- a/Formula/autossh.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Autossh < Formula - desc "Automatically restart SSH sessions and tunnels" - homepage "https://www.harding.motd.ca/autossh/" - url "https://www.harding.motd.ca/autossh/autossh-1.4f.tgz" - mirror "https://deb.debian.org/debian/pool/main/a/autossh/autossh_1.4f.orig.tar.gz" - sha256 "0172e5e1bea40c642e0ef025334be3aadd4ff3b4d62c0b177ed88a8384e2f8f2" - - bottle do - cellar :any_skip_relocation - sha256 "80ea151fa465a49fc65ff6de0e5ed75300c42b37179012c87eea4aebfaa28443" => :mojave - sha256 "d9bb50e0a96fe80d177541ed317032e4f0d1d66af70aed5fcb804299384bdd87" => :high_sierra - sha256 "75d84cea4022291022508dd13d231c6beb599e95256759856051e1cdcc385541" => :sierra - sha256 "fea4dce29ebf3308cddd9f36f209a401933998821b3b8fa8845130d340d487e2" => :el_capitan - end - - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - bin.install "rscreen" - end - - test do - assert_match version.to_s, shell_output("#{bin}/autossh -V") - end -end - - -__END__ -diff --git a/rscreen b/rscreen -index f0bbced..ce232c3 100755 ---- a/rscreen -+++ b/rscreen -@@ -23,4 +23,4 @@ fi - #AUTOSSH_PATH=/usr/local/bin/ssh - export AUTOSSH_POLL AUTOSSH_LOGFILE AUTOSSH_DEBUG AUTOSSH_PATH AUTOSSH_GATETIME AUTOSSH_PORT - --autossh -M 20004 -t $1 "screen -e^Zz -D -R" -+autossh -M 20004 -t $1 "screen -D -R" diff --git a/Formula/avanor.rb b/Formula/avanor.rb deleted file mode 100644 index a05f4ceda3cbc..0000000000000 --- a/Formula/avanor.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Avanor < Formula - desc "Quick-growing roguelike game with easy ADOM-like UI" - homepage "https://avanor.sourceforge.io/" - url "https://downloads.sourceforge.net/project/avanor/avanor/0.5.8/avanor-0.5.8-src.tar.bz2" - sha256 "8f55be83d985470b9a5220263fc87d0a0a6e2b60dbbc977c1c49347321379ef3" - - bottle do - sha256 "ca4aef9b5bceb8f3dddd89f58846f4d9cfbddf2f108a7e8e39d262e92ea9bac4" => :mojave - sha256 "d99615cac684c32894df532e78452b2542ba857ce69fa58d39e54bcc2fe4ca4a" => :high_sierra - sha256 "848e96ed26b258042b77a3c2139398b8e6f62722719263c082fb4c6655ffd4bc" => :sierra - sha256 "a66b436a645cafa77a5bd79d22f314ff2b9331526f5efeaf79d38346647cad66" => :el_capitan - sha256 "1c12fd7f45993d18b481d3317594083e4bb88f0eecf100d4b5dd4a927c866200" => :yosemite - end - - # Upstream fix for clang: https://sourceforge.net/p/avanor/code/133/ - patch :p0 do - url "https://gist.githubusercontent.com/mistydemeo/64f47233ee64d55cb7d5/raw/c1847d7e3a134e6109ad30ce1968919dd962e727/avanor-clang.diff" - sha256 "2d24ce7b71eb7b20485d841aabffa55b25b9074f9a5dd83aee33b7695ba9d75c" - end - - def install - system "make", "DATA_DIR=#{pkgshare}/", "CC=#{ENV.cxx}", "LD=#{ENV.cxx}" - bin.install "avanor" - pkgshare.install "manual" - end - - test do - script = (testpath/"script.exp") - script.write <<~EOS - #!/usr/bin/expect -f - set timeout 10 - spawn avanor - send -- "\e" - expect eof - EOS - script.chmod 0700 - system "./script.exp" - end -end diff --git a/Formula/avce00.rb b/Formula/avce00.rb deleted file mode 100644 index 7f0e881c14dcc..0000000000000 --- a/Formula/avce00.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Avce00 < Formula - desc "Make Arc/Info (binary) Vector Coverages appear as E00" - homepage "http://avce00.maptools.org/avce00/index.html" - url "http://avce00.maptools.org/dl/avce00-2.0.0.tar.gz" - sha256 "c0851f86b4cd414d6150a04820491024fb6248b52ca5c7bd1ca3d2a0f9946a40" - - bottle do - cellar :any_skip_relocation - sha256 "285b4eb74ff189689097df36f62fa4c2a48b68ece7442156a5700b6c36feb743" => :mojave - sha256 "40b26638adfaf290bc07ae792da49106b493ea3109a97c1fac775723a0463ac4" => :high_sierra - sha256 "576b5ea62376b42733d56e7bd862522588c16160ac1abb5f382c1c12055248e1" => :sierra - sha256 "45f18e289431af4de0d1e96c1fadd6a056e80907a1650654f8ee0dd1dafab401" => :el_capitan - sha256 "56e15b29411b2947d9a842d91ae713e16566aa59e297e06f7d4de4b301847e66" => :yosemite - sha256 "55990b93f7fe4639c6fdf29c4cc6c5791c6178c8661e22ef9e0dd64606532f56" => :mavericks - sha256 "4f114d3d8872cbf9e2df2c2ed2d4962b65b39efc568faf78eb5b2f47552a39da" => :mountain_lion - end - - conflicts_with "gdal", :because => "both install a cpl_conv.h header" - - def install - system "make", "CC=#{ENV.cc}" - bin.install "avcimport", "avcexport", "avcdelete", "avctest" - lib.install "avc.a" - include.install Dir["*.h"] - end - - test do - touch testpath/"test" - system "#{bin}/avctest", "-b", "test" - end -end diff --git a/Formula/avfs.rb b/Formula/avfs.rb deleted file mode 100644 index 10fd7693f2408..0000000000000 --- a/Formula/avfs.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Avfs < Formula - desc "Virtual file system that facilitates looking inside archives" - homepage "https://avf.sourceforge.io/" - url "https://downloads.sourceforge.net/project/avf/avfs/1.0.5/avfs-1.0.5.tar.bz2" - sha256 "e5ce6b1f4193c37148b1b8a021f4f3d05e88f725cf11b16b95a58e8fdae50176" - revision 1 - - bottle do - rebuild 1 - sha256 "f30091e80fde67155307d3f21e591790672fa0a54d4ef232a0d961cd1c5409c2" => :mojave - sha256 "c3f6275c1c03ae70e19c5159d1ccf08b428bdc18f7f524ca3bf05b1a150e0d65" => :high_sierra - sha256 "ac6d33a32baed847feb08181e9c9758de7f9bfdabc52bf3b4e3607c3f85682f5" => :sierra - end - - depends_on "pkg-config" => :build - depends_on :macos => :sierra # needs clock_gettime - depends_on "openssl" - depends_on :osxfuse - depends_on "xz" - - # Fix scripts to work on Mac OS X. - # Nothing the patch fixes has been changed in 1.0.2, so still necessary. - patch :DATA - - def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --enable-fuse - --enable-library - --with-ssl=#{Formula["openssl"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"avfsd", "--version" - end -end - -__END__ -diff --git i/scripts/mountavfs w/scripts/mountavfs -index 5722dcd..a35e633 100755 ---- i/scripts/mountavfs -+++ w/scripts/mountavfs -@@ -14,7 +14,7 @@ else - MntDir=${HOME}/.avfs - fi - --grep -qE "avfsd ${MntDir}" /proc/mounts || { -+grep -qE "avfsd.*${MntDir}" < <(mount) || { - if [ ! -e "$MntDir" ]; then - mkdir -p "$MntDir" - fi -diff --git i/scripts/umountavfs w/scripts/umountavfs -index 09dc629..a242c21 100644 ---- i/scripts/umountavfs -+++ w/scripts/umountavfs -@@ -14,11 +14,11 @@ else - MntDir="${HOME}/.avfs" - fi - --grep -qE "${MntDir}.*avfsd" /proc/mounts && { -+grep -qE "avfsd.*${MntDir}" < <(mount) && { - echo unMounting AVFS on $MntDir... - if type -p fusermount > /dev/null 2>&1 ; then - fusermount -u -z "$MntDir" - else -- umount -l "$MntDir" -+ umount "$MntDir" - fi - } diff --git a/Formula/avian.rb b/Formula/avian.rb deleted file mode 100644 index a519a35aeb746..0000000000000 --- a/Formula/avian.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Avian < Formula - desc "Lightweight VM and class library for a subset of Java features" - homepage "https://readytalk.github.io/avian/" - url "https://github.com/ReadyTalk/avian/archive/v1.2.0.tar.gz" - sha256 "e3639282962239ce09e4f79f327c679506d165810f08c92ce23e53e86e1d621c" - head "https://github.com/ReadyTalk/avian.git" - - bottle do - cellar :any - rebuild 1 - sha256 "07a5c761ffc3bc57db4a5b0dbd952a47fcb2b62f1083eee3106be50031adfa5e" => :mojave - sha256 "ee881641717eed4a61ab64f832ab420401ed7a814fd32e546ae0765b5b27de6b" => :high_sierra - sha256 "ef092ec60093190857b558fd9a663ca0c6d0356bb9af7798be21cf466678f27e" => :sierra - sha256 "d2719509725f4c1fad3a53c32de18aff5d45685fb35ae352f1d51fc61e566f4a" => :el_capitan - sha256 "d002876c03742fc7ec4157fff598e7c11ed1e62f97ce1b217f8b089db87e43ed" => :yosemite - sha256 "20dd7125d138e05021b473d026190d8f4652e807afcfe057614e5c2e66ce0ed1" => :mavericks - end - - depends_on :java => "1.8" - depends_on :macos => :lion - - def install - system "make", "use-clang=true" - bin.install Dir["build/macosx-*/avian*"] - lib.install Dir["build/macosx-*/*.dylib", "build/macosx-*/*.a"] - end - - test do - (testpath/"Test.java").write <<~EOS - public class Test { - public static void main(String arg[]) { - System.out.print("OK"); - } - } - EOS - system "javac", "Test.java" - assert_equal "OK", shell_output("#{bin}/avian Test") - end -end diff --git a/Formula/aview.rb b/Formula/aview.rb deleted file mode 100644 index 659bced6ddf30..0000000000000 --- a/Formula/aview.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Aview < Formula - desc "ASCII-art image browser and animation viewer" - homepage "https://aa-project.sourceforge.io/" - url "https://downloads.sourceforge.net/aa-project/aview-1.3.0rc1.tar.gz" - sha256 "42d61c4194e8b9b69a881fdde698c83cb27d7eda59e08b300e73aaa34474ec99" - - bottle do - cellar :any_skip_relocation - sha256 "fe70cf7dbd1d2e1473da3818b96d3a94d811e93d52ecbb6ecfc1c1e1ccb8b12a" => :mojave - sha256 "4f5fa09318475fca46c584b52e5d5b845cd4d331df04744ca41d6789575b32ec" => :high_sierra - sha256 "95cbb14a2a5cb4d8d11d9ca3621e81705df77f47d85f89383913e3a02da56041" => :sierra - sha256 "cb20b8513b3b7d2977943d7ba14f2627892697e9a6b69c4366563786810ca95c" => :el_capitan - sha256 "886a6800deefcf7a1e377db57c9df0579b6f1fcb4b491a6262171411bce3517b" => :yosemite - sha256 "142a0b64e457e900e395f35d5112bd968e605fa6182bdc9ca77b923a5e5263f6" => :mavericks - end - - depends_on "aalib" - - patch :DATA - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/aview", "--version" - end -end - -__END__ -diff --git a/image.c b/image.c -index 232b838..9780e61 100644 ---- a/image.c -+++ b/image.c -@@ -1,6 +1,6 @@ - #include - #include --#include -+#include - #include "config.h" - - int imgwidth, imgheight; -diff --git a/ui.c b/ui.c -index d316f7a..134a4ca 100644 ---- a/ui.c -+++ b/ui.c -@@ -1,6 +1,6 @@ - #include - #include --#include -+#include - #include - #include - #include "shrink.h" - diff --git a/Formula/avimetaedit.rb b/Formula/avimetaedit.rb deleted file mode 100644 index 26a98f0b46f4b..0000000000000 --- a/Formula/avimetaedit.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Avimetaedit < Formula - desc "Tool for embedding, validating, and exporting of AVI files metadata" - homepage "https://mediaarea.net/AVIMetaEdit" - url "https://mediaarea.net/download/binary/avimetaedit/1.0.2/AVIMetaEdit_CLI_1.0.2_GNU_FromSource.tar.bz2" - version "1.0.2" - sha256 "e0b83e17460d0202a54f637cb673a0c03460704e6c2cff0c2e34222efb2c11ca" - - bottle do - cellar :any_skip_relocation - sha256 "2ee42355aa90d5bc5ca8c61dc0c02274edd9c723b8a5b65595285319e9b7dda6" => :mojave - sha256 "323673de85bd3c8f272d5f8d0b32d34304faaa02f88c2ce44f08c697266e889e" => :high_sierra - sha256 "75d65e8ef1ecf31ebb016aa7e1a940bdaac33042af895729a230b6ee4beab3f0" => :sierra - sha256 "41873fc416d070f417f1387e50515ffa099018c2f8ef27a2b8ce8b8a94b5c43f" => :el_capitan - end - - def install - cd "Project/GNU/CLI" do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - avi = "UklGRuYAAABBVkkgTElTVMAAAABoZHJsYXZpaDgAAABAnAAAlgAAAAAAAAAQCQAAAQAAAAAAAAABAAAAAAAQAA" \ - "IAAAACAAAAAAAAAAAAAAAAAAAAAAAAAExJU1R0AAAAc3RybHN0cmg4AAAAdmlkc0k0MjAAAAAAAAAAAAAAAAAB" \ - "AAAAGQAAAAAAAAABAAAABgAAAP////8AAAAAAAAAAAIAAgBzdHJmKAAAACgAAAACAAAAAgAAAAEADABJNDIwBg" \ - "AAAAAAAAAAAAAAAAAAAAAAAABMSVNUEgAAAG1vdmkwMGRjBgAAABAQEBCAgA==".unpack("m")[0] - (testpath/"test.avi").write avi - assert_match "test.avi,238,AVI", shell_output("#{bin}/avimetaedit --out-tech test.avi") - end -end diff --git a/Formula/avra.rb b/Formula/avra.rb deleted file mode 100644 index d2bdc964c5091..0000000000000 --- a/Formula/avra.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Avra < Formula - desc "Assember for the Atmel AVR microcontroller family" - homepage "https://avra.sourceforge.io/" - url "https://downloads.sourceforge.net/project/avra/1.3.0/avra-1.3.0.tar.bz2" - sha256 "a62cbf8662caf9cc4e75da6c634efce402778639202a65eb2d149002c1049712" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "e24312ed64192fa3e90f497d6f37eee1f9a3cb9505f943018f28c29b8ce2c044" => :mojave - sha256 "0c4ac95218144b45bfed147a584707c8f2b8f0ec7c75b2ac4fdfae5592029b92" => :high_sierra - sha256 "2fd31c2a27b2ef237a6c9e33d7b378682dcba6b79131717f6c97264999b85658" => :sierra - sha256 "a53990c229653465948d9d66fc972e695591cddf6529c25ad834fed7fbd7267d" => :el_capitan - sha256 "1fd6d746309dbdf2811ba8d461188ec63e93363a34546a3af7ad9b4f47c75ffc" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - # Crashes with 'abort trap 6' unless this fix is applied. - # See: https://sourceforge.net/p/avra/patches/16/ - patch do - url "https://gist.githubusercontent.com/adammck/7e4a14f7dd4cc58eea8afa99d1ad9f5d/raw/5cdbfe5ac310a12cae6671502697737d56827b05/avra-fix-osx.patch" - sha256 "03493058c351cfce0764a8c2e63c2a7b691601dd836c760048fe47ddb9e91682" - end - - def install - # build fails if these don't exist - touch "NEWS" - touch "ChangeLog" - cd "src" do - system "./bootstrap" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - pkgshare.install Dir["includes/*"] - end - - test do - (testpath/"test.asm").write " .device attiny10\n ldi r16,0x42\n" - output = shell_output("#{bin}/avra -l test.lst test.asm") - assert_match "Assembly complete with no errors.", output - assert_predicate testpath/"test.hex", :exist? - assert_match "ldi r16,0x42", File.read("test.lst") - end -end diff --git a/Formula/avrdude.rb b/Formula/avrdude.rb deleted file mode 100644 index 1324e1487596b..0000000000000 --- a/Formula/avrdude.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Avrdude < Formula - desc "Atmel AVR MCU programmer" - homepage "https://savannah.nongnu.org/projects/avrdude/" - url "https://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz" - mirror "https://download-mirror.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz" - sha256 "0f9f731b6394ca7795b88359689a7fa1fba818c6e1d962513eb28da670e0a196" - revision 1 - - bottle do - sha256 "65fe6de6f540eb1c6ad94d35c847f8a5921cc9059ff044d1bc78f68cc8b8334b" => :mojave - sha256 "b0cb94b5c4f01fcc870f286bca293218c98fda23d76397db8a831272f7087038" => :high_sierra - sha256 "e8e26af5565cd897867d4e6e71e66e6e946e1e21eb4e27d3cd49f199f088fc5d" => :sierra - sha256 "c953526dc893a9b162a109d074edf8bb71d7049c63990282edc994c63de90c44" => :el_capitan - end - - head do - url "https://svn.savannah.nongnu.org/svn/avrdude/trunk/avrdude" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "libelf" - depends_on "libftdi0" - depends_on "libhid" - depends_on "libusb-compat" - - def install - if build.head? - inreplace "bootstrap", /libtoolize/, "glibtoolize" - system "./bootstrap" - end - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_equal "avrdude done. Thank you.", - shell_output("#{bin}/avrdude -c jtag2 -p x16a4 2>&1", 1).strip - end -end diff --git a/Formula/avro-c.rb b/Formula/avro-c.rb deleted file mode 100644 index 4a8df39fd2b63..0000000000000 --- a/Formula/avro-c.rb +++ /dev/null @@ -1,30 +0,0 @@ -class AvroC < Formula - desc "Data serialization system" - homepage "https://avro.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=avro/avro-1.8.2/c/avro-c-1.8.2.tar.gz" - sha256 "4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e" - revision 1 - - bottle do - sha256 "072eff37263bbd6dfa941cb350ffd2ea7ee6e23e948547f8c9c6f3b58e162211" => :mojave - sha256 "845eb5220229a26d3acd435beb093301207850787827a84db0d55455357f18dd" => :high_sierra - sha256 "442b64624539b8454693b961ac9b455f2ad956c1119cb16e49c65498caeb1e81" => :sierra - sha256 "6282882c11af83fe568776fa45c11c5140dec413a6cd4efff9e28b2ffc35713c" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "snappy" - depends_on "xz" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - pkgshare.install "tests/test_avro_1087" - end - - test do - assert shell_output("#{pkgshare}/test_avro_1087") - end -end diff --git a/Formula/avro-cpp.rb b/Formula/avro-cpp.rb deleted file mode 100644 index 7004ad82a4b97..0000000000000 --- a/Formula/avro-cpp.rb +++ /dev/null @@ -1,48 +0,0 @@ -class AvroCpp < Formula - desc "Data serialization system" - homepage "https://avro.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=avro/avro-1.8.2/cpp/avro-cpp-1.8.2.tar.gz" - sha256 "5328b913882ee5339112fa0178756789f164c9c5162e1c83437a20ee162a3aab" - - bottle do - cellar :any - sha256 "0a45a73085609cd13b6f4b65194f60caf507c3f624a458c09d4409dd7ae6eee4" => :mojave - sha256 "92474608c57be07c5453914f40ac5579affe1c2852776c99784559028ae61808" => :high_sierra - sha256 "319664d5b1f6dcfca5485ca7e30c10b316a6b865658bb4d86e94036312400792" => :sierra - sha256 "608da3caf3b22380430f27975bd00c240f9b852fb7b2bfa1a06c91ff25bf6245" => :el_capitan - sha256 "30de5dd8b0328916218197bf57e6d74695c770a9c53194a0ec4d2676934dc27b" => :yosemite - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"cpx.json").write <<~EOS - { - "type": "record", - "name": "cpx", - "fields" : [ - {"name": "re", "type": "double"}, - {"name": "im", "type" : "double"} - ] - } - EOS - (testpath/"test.cpp").write <<~EOS - #include "cpx.hh" - - int main() { - cpx::cpx number; - return 0; - } - EOS - system "#{bin}/avrogencpp", "-i", "cpx.json", "-o", "cpx.hh", "-n", "cpx" - system ENV.cxx, "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/avro-tools.rb b/Formula/avro-tools.rb deleted file mode 100644 index 12ad2a0db7719..0000000000000 --- a/Formula/avro-tools.rb +++ /dev/null @@ -1,17 +0,0 @@ -class AvroTools < Formula - desc "Avro command-line tools and utilities" - homepage "https://avro.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=avro/avro-1.8.2/java/avro-tools-1.8.2.jar" - sha256 "8a1e2cc40daf89a29a30f15309077e5d0b9e0434ec5521a1fdd1d005159b89c4" - - bottle :unneeded - - def install - libexec.install "avro-tools-#{version}.jar" - bin.write_jar_script libexec/"avro-tools-#{version}.jar", "avro-tools" - end - - test do - assert_match "Version #{version}", shell_output("#{bin}/avro-tools 2>&1", 1) - end -end diff --git a/Formula/awf.rb b/Formula/awf.rb deleted file mode 100644 index 166ef579863e7..0000000000000 --- a/Formula/awf.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Awf < Formula - desc "'A Widget Factory' is a theme preview application for gtk2 and gtk3" - homepage "https://github.com/valr/awf" - url "https://github.com/valr/awf/archive/v1.4.0.tar.gz" - sha256 "bb14517ea3eed050b3fec37783b79c515a0f03268a55dfd0b96a594b5b655c78" - revision 1 - head "https://github.com/valr/awf.git" - - bottle do - cellar :any - sha256 "d64d7cc69ccc6bfab256afed30c89d7ce25234ada80afd33475bba4b7263b163" => :mojave - sha256 "50dae601b8135cc9bb01e62c4268812f5c6cc935f0c326e0e66cdc66a3337186" => :high_sierra - sha256 "6685282a4c03f247e2e619bd4ba4b531c73e867f34708def93cdc13fc3e9ec7b" => :sierra - sha256 "18761ce847fb96be9dbf1339a683ce65695a76c1e3508d2f3f6d60cb80218481" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "gtk+3" - - def install - inreplace "src/awf.c", "/usr/share/themes", "#{HOMEBREW_PREFIX}/share/themes" - system "./autogen.sh" - rm "README.md" # let's not have two copies of README - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_predicate bin/"awf-gtk2", :exist? - assert_predicate bin/"awf-gtk3", :exist? - end -end diff --git a/Formula/awk.rb b/Formula/awk.rb deleted file mode 100644 index 2bd4e8f3997b5..0000000000000 --- a/Formula/awk.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Awk < Formula - desc "Text processing scripting language" - homepage "https://www.cs.princeton.edu/~bwk/btl.mirror/" - url "https://github.com/onetrueawk/awk/archive/20180827.tar.gz" - sha256 "c9232d23410c715234d0c26131a43ae6087462e999a61f038f1790598ce4807f" - head "https://github.com/onetrueawk/awk.git" - - bottle do - cellar :any_skip_relocation - sha256 "da17e7e893d2a2fb4ab267fb9ead8785ef9417dead77d6c84204d2151330bf47" => :mojave - sha256 "3e7c18b44cd1f1783a28c34edbc2215a2b975021ec42ccaa0f792243d3cb320b" => :high_sierra - sha256 "2c55499ad7ed357a30d643430dd00d426fd3cfa2f5705c772f5a3dd8c8cd020c" => :sierra - sha256 "a844637c334c68f7d7079a1ef6bc45c4df242c93cf6ed891b6d551269518c9c7" => :el_capitan - end - - conflicts_with "gawk", - :because => "both install awk executables." - - def install - ENV.O3 # Docs recommend higher optimization - ENV.deparallelize - # the yacc command the makefile uses results in build failures: - # /usr/bin/bison: missing operand after `awkgram.y' - # makefile believes -S to use sprintf instead of sprint, but the - # -S flag is not supported by `bison -y` - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "YACC=yacc -d" - bin.install "a.out" => "awk" - man1.install "awk.1" - end - - test do - assert_match "test", pipe_output("#{bin}/awk '{print $1}'", "test") - end -end diff --git a/Formula/aws-apigateway-importer.rb b/Formula/aws-apigateway-importer.rb deleted file mode 100644 index 6caf33bfaa05d..0000000000000 --- a/Formula/aws-apigateway-importer.rb +++ /dev/null @@ -1,35 +0,0 @@ -class AwsApigatewayImporter < Formula - desc "AWS API Gateway Importer" - homepage "https://github.com/amazon-archives/aws-apigateway-importer" - url "https://github.com/amazon-archives/aws-apigateway-importer/archive/aws-apigateway-importer-1.0.1.tar.gz" - sha256 "8371e3fb1b6333cd50a76fdcdc1280ee8e489aec4bf9a1869325f9b8ebb73b54" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "03baa4d6f79772591dcd0ac5db5a148fbe79633b7ab66de104cd244141fbb0d0" => :mojave - sha256 "3e194aa8c79d1609040430c5d2e804b69df9ffd4cfd0c0501cdecce249591f83" => :high_sierra - sha256 "65d77c58ac90e7767f93896c9ec95a478dc1388316bcdafb4c06ed10db089caf" => :sierra - sha256 "bbe12dac66d033674840eace741bcf5c3549e7317ab9ca6fa9f349418a6c9861" => :el_capitan - sha256 "bbe12dac66d033674840eace741bcf5c3549e7317ab9ca6fa9f349418a6c9861" => :yosemite - end - - depends_on "maven" => :build - depends_on :java => "1.8" - - # Pin aws-sdk-java-core for JSONObject compatibility - patch do - url "https://github.com/amazon-archives/aws-apigateway-importer/commit/660e3ce.diff?full_index=1" - sha256 "6ff63c504b906e1fb6d0f2a9772761edeef3b37b3dca1e48bba72432d863a852" - end - - def install - system "mvn", "assembly:assembly" - libexec.install "target/aws-apigateway-importer-1.0.1-jar-with-dependencies.jar" - bin.write_jar_script libexec/"aws-apigateway-importer-1.0.1-jar-with-dependencies.jar", "aws-api-import" - end - - test do - assert_match(/^Usage:\s+aws-api-import/, shell_output("#{bin}/aws-api-import --help")) - end -end diff --git a/Formula/aws-cfn-tools.rb b/Formula/aws-cfn-tools.rb deleted file mode 100644 index 5219db5411c29..0000000000000 --- a/Formula/aws-cfn-tools.rb +++ /dev/null @@ -1,37 +0,0 @@ -class AwsCfnTools < Formula - desc "Client for Amazon CloudFormation web service" - homepage "https://aws.amazon.com/developertools/AWS-CloudFormation/2555753788650372" - url "https://s3.amazonaws.com/cloudformation-cli/AWSCloudFormation-cli.zip" - version "1.0.12" - sha256 "382e3e951833fd77235fae41c1742224d68bdf165e1ace4200ee88c01ac29a90" - - bottle :unneeded - - depends_on "ec2-api-tools" - depends_on :java - - def install - env = Language::Java.java_home_env.merge(:AWS_CLOUDFORMATION_HOME => libexec) - rm Dir["bin/*.cmd"] # Remove Windows versions - libexec.install Dir["*"] - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "service" - (bin/basename).write_env_script file, env - end - end - - def caveats - <<~EOS - Before you can use these tools you must export some variables to your $SHELL. - export AWS_ACCESS_KEY="" - export AWS_SECRET_KEY="" - export AWS_CREDENTIAL_FILE="" - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/cfn-version") - end -end diff --git a/Formula/aws-elasticache.rb b/Formula/aws-elasticache.rb deleted file mode 100644 index 33229014760fe..0000000000000 --- a/Formula/aws-elasticache.rb +++ /dev/null @@ -1,37 +0,0 @@ -class AwsElasticache < Formula - desc "Client for Amazon ElastiCache web service" - homepage "https://aws.amazon.com/developertools/2310261897259567" - url "https://s3.amazonaws.com/elasticache-downloads/AmazonElastiCacheCli-2014-09-30-1.12.000.zip" - version "1.12.000" - sha256 "0aee0849a78c8129ed16e99706dde34972c02ed1846e70b76a1e21a133d9648f" - - bottle :unneeded - - depends_on "ec2-api-tools" - depends_on :java - - def install - env = Language::Java.java_home_env.merge(:AWS_ELASTICACHE_HOME => libexec) - rm Dir["bin/*.cmd"] # Remove Windows versions - libexec.install Dir["*"] - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "service" - (bin/basename).write_env_script file, env - end - end - - def caveats - <<~EOS - Before you can use these tools you must export some variables to your $SHELL. - export AWS_ACCESS_KEY="" - export AWS_SECRET_KEY="" - export AWS_CREDENTIAL_FILE="" - EOS - end - - test do - system "#{bin}/elasticache-version" - end -end diff --git a/Formula/aws-elasticbeanstalk.rb b/Formula/aws-elasticbeanstalk.rb deleted file mode 100644 index 2ffc2b82b91e3..0000000000000 --- a/Formula/aws-elasticbeanstalk.rb +++ /dev/null @@ -1,178 +0,0 @@ -class AwsElasticbeanstalk < Formula - include Language::Python::Virtualenv - - desc "Client for Amazon Elastic Beanstalk web service" - homepage "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html" - url "https://files.pythonhosted.org/packages/cd/52/74d6fb2c789f061c5abfd0084b9f0592b3d7f39ae73c24b8a885a07d09d4/awsebcli-3.14.6.tar.gz" - sha256 "b2dff9efbd83979b8050a95803eb88b0902660d926eae31e3a0bfe0836c2d318" - - bottle do - cellar :any_skip_relocation - sha256 "83badc49015db13b12f12ec1f3640716fba2161a80e91772d8ccdc144ff69185" => :mojave - sha256 "e88ba1b0777ae69d037fb3fe933b833ed8147d34b85aa0adb97b2d63df08a87f" => :high_sierra - end - - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/76/21/2dc61178a2038a5cb35d14b61467c6ac632791ed05131dda72c20e7b9e23/backports.ssl_match_hostname-3.5.0.1.tar.gz" - sha256 "502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2" - end - - resource "blessed" do - url "https://files.pythonhosted.org/packages/51/c7/3af3ec267387d4a900a9e8f9a03a6c9068fb3c606c77bf2dd4558e1ea248/blessed-1.15.0.tar.gz" - sha256 "777b0b6b5ce51f3832e498c22bc6a093b6b5f99148c7cbf866d26e2dec51ef21" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/f0/b3/5b7cb91757aef1ad9241fb469c7dc25baa2ed6f491673d0fe11bc33886bb/botocore-1.12.18.tar.gz" - sha256 "d11fa0e12448105989f1f4eebf093e8cfba5f90860640c488f3211ff2a744df0" - end - - resource "cached-property" do - url "https://files.pythonhosted.org/packages/57/8e/0698e10350a57d46b3bcfe8eff1d4181642fd1724073336079cb13c5cf7f/cached-property-1.5.1.tar.gz" - sha256 "9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504" - end - - resource "cement" do - url "https://files.pythonhosted.org/packages/70/60/608f0b8975f4ee7deaaaa7052210d095e0b96e7cd3becdeede9bd13674a1/cement-2.8.2.tar.gz" - sha256 "8765ed052c061d74e4d0189addc33d268de544ca219b259d797741f725e422d2" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/e1/0f/f8d5e939184547b3bdc6128551b831a62832713aa98c2ccdf8c47ecc7f17/certifi-2018.8.24.tar.gz" - sha256 "376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/e6/76/257b53926889e2835355d74fec73d82662100135293e17d382e2b74d1669/colorama-0.3.9.tar.gz" - sha256 "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1" - end - - resource "docker" do - url "https://files.pythonhosted.org/packages/66/d0/2f6702857613e8dc9190bd1224434be6e8b25bb86812a1642947baf320b8/docker-3.5.0.tar.gz" - sha256 "bc693be5a84b3b9e5aaf156068c5c0a445ee5138c638c3fbc857133bf67ebe07" - end - - resource "docker-compose" do - url "https://files.pythonhosted.org/packages/d1/50/6c6f0ec7338844aa59ab24ef39c656b51fa65aecc8345d62173472c5b3a5/docker-compose-1.21.2.tar.gz" - sha256 "68b07193755440d5f8d4f47e6f3484212afc255d5b785a81353ea1e9298c1c2c" - end - - resource "docker-pycreds" do - url "https://files.pythonhosted.org/packages/9e/7a/109e0a3cc3c19534edd843c16e792c67911b5b4072fdd34ddce90d49f355/docker-pycreds-0.3.0.tar.gz" - sha256 "8b0e956c8d206f832b06aa93a710ba2c3bcbacb5a314449c040b0b814355bbff" - end - - resource "dockerpty" do - url "https://files.pythonhosted.org/packages/8d/ee/e9ecce4c32204a6738e0a5d5883d3413794d7498fe8b06f44becc028d3ba/dockerpty-0.4.1.tar.gz" - sha256 "69a9d69d573a0daa31bcd1c0774eeed5c15c295fe719c61aca550ed1393156ce" - end - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "functools32" do - url "https://files.pythonhosted.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz" - sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz" - sha256 "6ff5f3180870836cae40f06fa10419f557208175f13ad7bc26caa77beb1f6e02" - end - - resource "pathspec" do - url "https://files.pythonhosted.org/packages/9f/fb/5a901a3b1eeebf83af6da74ecca69d7daf5189e450f0f4cccf9c19132651/pathspec-0.5.5.tar.gz" - sha256 "72c495d1bbe76674219e307f6d1c6062f2e1b0b483a5e4886435127d0df3d0d3" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "semantic_version" do - url "https://files.pythonhosted.org/packages/8e/0e/33052dd97ab9d07dae8ddffcfb2740efe58c46d72efbc060cf6da250439f/semantic_version-2.5.0.tar.gz" - sha256 "3baad35dcb074a49419539cea6a33b484706b6c2dd03f05b67763eba4c1bb65c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "texttable" do - url "https://files.pythonhosted.org/packages/02/e1/2565e6b842de7945af0555167d33acfc8a615584ef7abd30d1eae00a4d80/texttable-0.9.1.tar.gz" - sha256 "119041773ff03596b56392532f9315cb3a3116e404fd6f36e76a7dc088d95c79" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/fb/1f/9acd71b77e66fafb19cfb023e50cbb7ed2c3be3c72db999162bd36c518c4/websocket_client-0.53.0.tar.gz" - sha256 "c42b71b68f9ef151433d6dcc6a7cb98ac72d2ad1e3a74981ca22bc5d9134f166" - end - - def install - virtualenv_install_with_resources - bash_completion.install libexec/"bin/eb_completion.bash" - end - - test do - system "#{bin}/eb", "--version" - end -end diff --git a/Formula/aws-es-proxy.rb b/Formula/aws-es-proxy.rb deleted file mode 100644 index 0b22069c7499b..0000000000000 --- a/Formula/aws-es-proxy.rb +++ /dev/null @@ -1,50 +0,0 @@ -class AwsEsProxy < Formula - desc "Small proxy between HTTP client and AWS Elasticsearch" - homepage "https://github.com/abutaha/aws-es-proxy" - url "https://github.com/abutaha/aws-es-proxy/archive/v0.9.tar.gz" - sha256 "c5a2943c79737874b7fc84ee298925e33aeece58fcf0e2b8b7d2f416bc872491" - - bottle do - cellar :any_skip_relocation - sha256 "35421935cd1cdb758564d9fb6328aea304d2d1850539e5e407e2496f3963842c" => :mojave - sha256 "f8f4c0fc627d3a2319b4ddd51c692040f97fae904a3c4840890740a0a3a0d3ff" => :high_sierra - sha256 "a7909d452eae3f5f34f982f98af35be8c814d9b9476c3c7a2f479fa6f5e9f631" => :sierra - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GLIDE_HOME"] = buildpath/"glide_home" - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/abutaha/aws-es-proxy").install buildpath.children - cd "src/github.com/abutaha/aws-es-proxy" do - system "glide", "install" - system "go", "build", "-o", "aws-es-proxy" - - bin.install "aws-es-proxy" - prefix.install_metafiles - end - end - - def caveats - <<~EOS - Before you can use these tools you must export some variables to your $SHELL. - export AWS_ACCESS_KEY="" - export AWS_SECRET_KEY="" - export AWS_CREDENTIAL_FILE="" - EOS - end - - test do - begin - io = IO.popen("#{bin}/aws-es-proxy -endpoint https://dummy-host.eu-west-1.es.amazonaws.com", :err => [:child, :out]) - sleep 2 - ensure - Process.kill("SIGINT", io.pid) - Process.wait(io.pid) - end - - assert_match "Listening on", io.read - end -end diff --git a/Formula/aws-keychain.rb b/Formula/aws-keychain.rb deleted file mode 100644 index 5e3768dacf175..0000000000000 --- a/Formula/aws-keychain.rb +++ /dev/null @@ -1,18 +0,0 @@ -class AwsKeychain < Formula - desc "Uses macOS keychain for storage of AWS credentials" - homepage "https://github.com/pda/aws-keychain" - url "https://github.com/pda/aws-keychain/archive/v3.0.0.tar.gz" - sha256 "3c9882d3b516b629303ca9a045fc50f6eb75fda25cd2452f10c47eda205e051f" - - bottle :unneeded - - def install - bin.install "aws-keychain" - end - - test do - # It is not possible to create a new keychain without triggering a prompt. - assert_match /Store multiple AWS IAM access keys/, - shell_output("#{bin}/aws-keychain --help", 1) - end -end diff --git a/Formula/aws-okta.rb b/Formula/aws-okta.rb deleted file mode 100644 index 3d10ebdae2556..0000000000000 --- a/Formula/aws-okta.rb +++ /dev/null @@ -1,43 +0,0 @@ -class AwsOkta < Formula - desc "Authenticate with AWS using your Okta credentials" - homepage "https://github.com/segmentio/aws-okta" - url "https://github.com/segmentio/aws-okta/archive/v0.19.4.tar.gz" - sha256 "5bd6f81376cfa45ea5d0a067bed68e8dec14fe1a2f4bd7f4954db89172b32710" - - bottle do - cellar :any_skip_relocation - sha256 "cf692e08b3054ac9b9f16a2fa3996fd3d4a888905ceb35c7496a535f21dd7b8a" => :mojave - sha256 "455fcea7890c8c29446867192966f58a625287b36dc9a0760ab2a72f581b8229" => :high_sierra - sha256 "101f4ea15a1a2dabb2932078ac846ec858718a8b9c65d4b1b03a5381abd52414" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/segmentio/aws-okta").install buildpath.children - cd "src/github.com/segmentio/aws-okta" do - system "go", "build", "-ldflags", "-X main.Version=#{version}" - bin.install "aws-okta" - prefix.install_metafiles - end - end - - test do - require "pty" - - PTY.spawn("#{bin}/aws-okta --backend file add") do |input, output, _pid| - output.puts "organization\n" - input.gets - output.puts "username\n" - input.gets - output.puts "password\n" - input.gets - output.puts "\n" - input.gets - input.gets - assert_match "Failed to validate credentials", input.gets.chomp - input.close - end - end -end diff --git a/Formula/aws-sdk-cpp.rb b/Formula/aws-sdk-cpp.rb deleted file mode 100644 index c2ac549c99f54..0000000000000 --- a/Formula/aws-sdk-cpp.rb +++ /dev/null @@ -1,42 +0,0 @@ -class AwsSdkCpp < Formula - desc "AWS SDK for C++" - homepage "https://github.com/aws/aws-sdk-cpp" - # aws-sdk-cpp should only be updated every 10 releases on multiples of 10 - url "https://github.com/aws/aws-sdk-cpp/archive/1.7.20.tar.gz" - sha256 "497d1f33f91eb4b64839f3cda567bae9bf76ae0fc5c77c3aa8723a360eedab2c" - head "https://github.com/aws/aws-sdk-cpp.git" - - bottle do - cellar :any - sha256 "abff5c371e8b584c09cbff8e74e3bc3be3efa5abd8634537c3f0947cf1b96e1f" => :mojave - sha256 "b39e86931af791de2b2eab0be253c5c06ec5f58bb2bc09b46c7daf674dd18692" => :high_sierra - sha256 "a7480c19a2a850c5a3b105fd82b745b04b86244cec74ef96804e7bb5324c7272" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - - lib.install Dir[lib/"mac/Release/*"].select { |f| File.file? f } - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main() { - std::cout << Aws::Version::GetVersionString() << std::endl; - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-laws-cpp-sdk-core", - "-o", "test" - system "./test" - end -end diff --git a/Formula/aws-shell.rb b/Formula/aws-shell.rb deleted file mode 100644 index 1b0666c9a8ded..0000000000000 --- a/Formula/aws-shell.rb +++ /dev/null @@ -1,124 +0,0 @@ -class AwsShell < Formula - desc "Integrated shell for working with the AWS CLI" - homepage "https://github.com/awslabs/aws-shell" - url "https://files.pythonhosted.org/packages/46/5a/c01bbff96fcbe8051e0b59e6191e07f5917f7f2cf667557c7dcbb85f62c3/aws-shell-0.2.1.tar.gz" - sha256 "2044b0ef78c7542c392f2cee4b74a4439545c63dda0a3e28b712fff53e8e5823" - - bottle do - cellar :any_skip_relocation - sha256 "59abd5ef0a98a26b785083daace85db738b945a90cf228c9a7969f5bc5fee24f" => :mojave - sha256 "2a5457ef6240db4e5588eea1b52b3d4e0d20554d84efeb282193a20e9b35ea0a" => :high_sierra - sha256 "2a5457ef6240db4e5588eea1b52b3d4e0d20554d84efeb282193a20e9b35ea0a" => :sierra - end - - depends_on "python" - - resource "awscli" do - url "https://files.pythonhosted.org/packages/71/15/06cd2c5ae1646596542aae02d7a2bd86264673909930526d684526545a94/awscli-1.16.19.tar.gz" - sha256 "0b8f86e44d0efbcc1488cb548eddbb30c3ebcc8ba292ee2d607ebc8f55712019" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/6d/9b/5cc24eeae40906824bbaea729bf474f6f8429963c8a4c54abc133464ba5a/boto3-1.9.9.tar.gz" - sha256 "675970103ca5eef49689bea0f8c2dcbc6d70da4fa1ceec2533f5f02c31089b04" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/09/aa/c48ef4dc4dfcb407a28f18e1904e856ae2a316214514b23cef4331bf4342/botocore-1.12.9.tar.gz" - sha256 "b79f1e5b6fe80cdfe951912bf1a08343013d021cf67d973825634ff47248cdb0" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/e6/76/257b53926889e2835355d74fec73d82662100135293e17d382e2b74d1669/colorama-0.3.9.tar.gz" - sha256 "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/8a/ad/cf6b128866e78ad6d7f1dc5b7f99885fb813393d9860778b2984582e81b5/prompt_toolkit-1.0.15.tar.gz" - sha256 "858588f1983ca497f1cf4ffde01d978a3ea02b01c8a26a8bbc5cd2e66d816917" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/10/46/059775dc8e50f722d205452bced4b3cc965d27e8c3389156acd3b1123ae3/pyasn1-0.4.4.tar.gz" - sha256 "f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "rsa" do - url "https://files.pythonhosted.org/packages/14/89/adf8b72371e37f3ca69c6cb8ab6319d009c4a24b04a31399e5bd77d9bb57/rsa-3.4.2.tar.gz" - sha256 "25df4e10c263fb88b5ace923dd84bf9aa7f5019687b5e55382ffcdb8bede9db5" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/9a/66/c6a5ae4dbbaf253bd662921b805e4972451a6d214d0dc9fb3300cb642320/s3transfer-0.1.13.tar.gz" - sha256 "90dc18e028989c609146e241ea153250be451e05ecc0c2832565231dacdf59c1" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV["PYTHONPATH"] = libexec/"lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - env = { - :PATH => "#{libexec}/vendor/bin:$PATH", - :PYTHONPATH => ENV["PYTHONPATH"], - } - bin.env_script_all_files(libexec/"bin", env) - end - - test do - system "#{bin}/aws-shell", "--help" - end -end diff --git a/Formula/aws-sns-cli.rb b/Formula/aws-sns-cli.rb deleted file mode 100644 index a1a0dad70fec9..0000000000000 --- a/Formula/aws-sns-cli.rb +++ /dev/null @@ -1,38 +0,0 @@ -class AwsSnsCli < Formula - desc "Client for Amazon Simple Notification web service" - homepage "https://aws.amazon.com/developertools/3688" - url "https://sns-public-resources.s3.amazonaws.com/SimpleNotificationServiceCli-2010-03-31.zip" - # The version in the tarball is the API version; this is the tool version - version "2013-09-27" - sha256 "c14adade30bf366f7d95d19d177babd33669dbd0e4b46f2c81304723776d382f" - - bottle :unneeded - - depends_on :java - - def install - env = Language::Java.java_home_env.merge(:AWS_SNS_HOME => libexec) - rm Dir["bin/*.cmd"] # Remove Windows versions - chmod 0755, Dir["bin/*"] - libexec.install Dir["*"] - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "service" - (bin/basename).write_env_script file, env - end - end - - def caveats - <<~EOS - Before you can use these tools you must export some variables to your $SHELL. - export AWS_ACCESS_KEY="" - export AWS_SECRET_KEY="" - export AWS_CREDENTIAL_FILE="" - EOS - end - - test do - assert_match /w.x.y.z/, shell_output("#{bin}/sns-version") - end -end diff --git a/Formula/awscli.rb b/Formula/awscli.rb deleted file mode 100644 index 90e1500d3b39e..0000000000000 --- a/Formula/awscli.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Awscli < Formula - include Language::Python::Virtualenv - - desc "Official Amazon AWS command-line interface" - homepage "https://aws.amazon.com/cli/" - # awscli should only be updated every 10 releases on multiples of 10 - url "https://github.com/aws/aws-cli/archive/1.16.80.tar.gz" - sha256 "cae75d3632d74378e2da899b9ccee232f730df42f5e066d841e20a391876c23e" - head "https://github.com/aws/aws-cli.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "fa958cb8d04129befc59f40865f22910130a37a7fe7284d23ade036e0b45d358" => :mojave - sha256 "d156289ef31446d47ed2f5ebab54636ceb7d177e62287a383952db57a5e178cc" => :high_sierra - sha256 "35aa04d3bbb5ff6e4359017d42e58183dc96c63c821cc6e69404232c446a92ec" => :sierra - end - - # Some AWS APIs require TLS1.2, which system Python doesn't have before High - # Sierra - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", "awscli" - venv.pip_install_and_link buildpath - pkgshare.install "awscli/examples" - - rm Dir["#{bin}/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh}"] - bash_completion.install "bin/aws_bash_completer" - zsh_completion.install "bin/aws_zsh_completer.sh" - (zsh_completion/"_aws").write <<~EOS - #compdef aws - _aws () { - local e - e=$(dirname ${funcsourcetrace[1]%:*})/aws_zsh_completer.sh - if [[ -f $e ]]; then source $e; fi - } - EOS - end - - def caveats; <<~EOS - The "examples" directory has been installed to: - #{HOMEBREW_PREFIX}/share/awscli/examples - EOS - end - - test do - assert_match "topics", shell_output("#{bin}/aws help") - end -end diff --git a/Formula/awslogs.rb b/Formula/awslogs.rb deleted file mode 100644 index 215f488d62b82..0000000000000 --- a/Formula/awslogs.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Awslogs < Formula - include Language::Python::Virtualenv - - desc "Simple command-line tool to read AWS CloudWatch logs" - homepage "https://github.com/jorgebastida/awslogs" - url "https://github.com/jorgebastida/awslogs/archive/0.11.0.tar.gz" - sha256 "6258a121629cb872ee61fe78bf112753c8782c971524f0943a0e21f74d5e28bd" - head "https://github.com/jorgebastida/awslogs.git" - - bottle do - cellar :any_skip_relocation - sha256 "a2cb26fb8da13bd1198f918e69c412f06fc1a98a97622b4daac09ff49b11bad6" => :mojave - sha256 "e85c038b6472ea984b2dc6ed56f2b06274abb6848a4077bf269f20d79424e90b" => :high_sierra - sha256 "7abb54b867eaa110ef231718f22452cd663188037176de08ada4519835420282" => :sierra - end - - depends_on "python" - - resource "boto3" do - url "https://files.pythonhosted.org/packages/fd/50/3868735fae36e0f93216019551ca0f75b6cf9f933a55891244efefdcc3bd/boto3-1.9.62.tar.gz" - sha256 "e9e93029b0d4f91ff342ffd953048c5a64e6a1522c2362c4521864bcc88cc365" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/da/c5/8fded95d8076d0144cbe3b836277ce234cee86e1b1393f6e6e8bedbf1436/botocore-1.12.62.tar.gz" - sha256 "67ebafe2d0d6a37b62033bbc78786fdada02c38535f83d74313dc0dc281bf87d" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "crayons" do - url "https://files.pythonhosted.org/packages/14/fa/635fdd47686a0f29692d927333fcf39e0279fc39c81704866c97adc34053/crayons-0.1.2.tar.gz" - sha256 "5e17691605e564d63482067eb6327d01a584bbaf870beffd4456a3391bd8809d" - end - - resource "dateparser" do - url "https://files.pythonhosted.org/packages/e7/87/fc2ab653e628e2e51e00115bc9cb14c31afdd03acb710f137056a1c13f7c/dateparser-0.7.0.tar.gz" - sha256 "940828183c937bcec530753211b70f673c0a9aab831e43273489b310538dff86" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/0e/01/68747933e8d12263d41ce08119620d9a7e5eb72c876a3442257f74490da0/python-dateutil-2.7.5.tar.gz" - sha256 "88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/ca/a9/62f96decb1e309d6300ebe7eee9acfd7bccaeedd693794437005b9067b44/pytz-2018.5.tar.gz" - sha256 "ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277" - end - - resource "regex" do - url "https://files.pythonhosted.org/packages/16/07/ee3e02770ed456a088b90da7c9b1e9aa227e3c956d37b845cef2aab93764/regex-2018.11.22.tar.gz" - sha256 "79a6a60ed1ee3b12eb0e828c01d75e3b743af6616d69add6c2fde1d425a4ba3f" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/9a/66/c6a5ae4dbbaf253bd662921b805e4972451a6d214d0dc9fb3300cb642320/s3transfer-0.1.13.tar.gz" - sha256 "90dc18e028989c609146e241ea153250be451e05ecc0c2832565231dacdf59c1" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/cb/89/e3687d3ed99bc882793f82634e9824e62499fdfdc4b1ae39e211c5b05017/tzlocal-1.5.1.tar.gz" - sha256 "4ebeb848845ac898da6519b9b31879cf13b6626f7184c496037b818e238f2c4e" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("#{bin}/awslogs --version 2>&1") - end -end diff --git a/Formula/axel.rb b/Formula/axel.rb deleted file mode 100644 index 72aecb751cd8f..0000000000000 --- a/Formula/axel.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Axel < Formula - desc "Light UNIX download accelerator" - homepage "https://github.com/eribertomota/axel" - url "https://github.com/axel-download-accelerator/axel/archive/v2.15.tar.gz" - sha256 "0e223f18954e4c6c34b882a474c526b9c7d107168220c2f3892598248236a172" - head "https://github.com/eribertomota/axel.git" - - bottle do - sha256 "9a113a4e26408726833f2b0b84cd420944d633b4bebba1982ee96a65176bccdf" => :mojave - sha256 "18d458adef55854c33e4be487ce77eaa294fa9b7c8f09bcd3aff68cea063c2ab" => :high_sierra - sha256 "2ed9747656442072e684c56a6354fcbfd1179b01cd0873cc77760a6e64270662" => :sierra - sha256 "10257917ed87edf070064ad51dac4a3685415f969a6999a5a55938aab355f584" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" - depends_on "openssl" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - end - - test do - filename = (testpath/"axel.tar.gz") - system bin/"axel", "-o", "axel.tar.gz", stable.url - filename.verify_checksum stable.checksum - assert_predicate testpath/"axel.tar.gz", :exist? - end -end diff --git a/Formula/azure-cli.rb b/Formula/azure-cli.rb deleted file mode 100644 index b19144dc226ff..0000000000000 --- a/Formula/azure-cli.rb +++ /dev/null @@ -1,650 +0,0 @@ -class AzureCli < Formula - desc "Microsoft Azure CLI 2.0" - homepage "https://docs.microsoft.com/cli/azure/overview" - url "https://azureclistage.blob.core.windows.net/archive/2290041/rc2.0.54.tar.gz" - sha256 "bbb3f02fe6a68af217f1a201cc5b3d9da5dee0ba262dcbce4b8b51653eed7606" - head "https://github.com/Azure/azure-cli.git" - - bottle do - cellar :any - sha256 "6fc9b6ffeb2f00c3a98a6bf9daa762b32e15f162ee817f5b8638491da3bffb2f" => :mojave - sha256 "08a7625b9e902e274d6f78028282a1de78c0de158f15eb1cbc683d7e0e9c5668" => :high_sierra - sha256 "067cecc28788bac51ad2149a9e94f35a7a1c701a9760266e7133682ca4b6a20a" => :sierra - end - - depends_on "openssl" - depends_on "python" - - resource "adal" do - url "https://files.pythonhosted.org/packages/0f/ba/07dbea5f63937c4a9a10946107d72b03354f65a51f9e0602314193fc2bae/adal-1.2.0.tar.gz" - sha256 "ba52913c38d76b4a4d88eaab41a5763d056ab6d073f106e0605b051ab930f5c1" - end - - resource "antlr4-python3-runtime" do - url "https://files.pythonhosted.org/packages/29/14/8ac135ec7cc9db3f768e2d032776718c6b23f74e63543f0974b4873500b2/antlr4-python3-runtime-4.7.2.tar.gz" - sha256 "168cdcec8fb9152e84a87ca6fd261b3d54c8f6358f42ab3b813b14a7193bb50b" - end - - resource "applicationinsights" do - url "https://files.pythonhosted.org/packages/f0/93/f60d7519c28b9e05b075ce89027df27849c7a50fe0371d4da2c38389570a/applicationinsights-0.11.7.tar.gz" - sha256 "c4712ede8eeca57e611b7fd4b3b6c345745a4a002a08145ab45f92d31d900040" - end - - resource "argcomplete" do - url "https://files.pythonhosted.org/packages/3c/21/9741e5e5e63245a8cdafb32ffc738bff6e7ef6253b65953e77933e56ce88/argcomplete-1.9.4.tar.gz" - sha256 "06c8a54ffaa6bfc9006314498742ec8843601206a3b94212f82657673662ecf1" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "azure-batch" do - url "https://files.pythonhosted.org/packages/68/eb/e9e0bd808cc77f651053adf6d54c36a54a39558faae5290b2ccafbe811e1/azure-batch-5.1.0.zip" - sha256 "21687ea71a14decc57499795075ff70090f67d46f3b1e31cd3415a138ee955e8" - end - - resource "azure-common" do - url "https://files.pythonhosted.org/packages/39/ca/2bdd67243ae7a45281acbbfc139db273868e99fc219e46724dac68094e69/azure-common-1.1.16.zip" - sha256 "2606ae77ff81c0036965b92ec2efe03eaec02a66714140ca0f7aa401b8b9bbb0" - end - - resource "azure-datalake-store" do - url "https://files.pythonhosted.org/packages/7b/43/6ebe1b59732ec50255a32ac1da6c8f254767e079836b8c273aceb5ed7a6f/azure-datalake-store-0.0.39.tar.gz" - sha256 "fd1ca3384808ac806470c26c98bc2346c1784d5b281fac4ea468ba018269ee3a" - end - - resource "azure-graphrbac" do - url "https://files.pythonhosted.org/packages/4a/78/cf441cf25279f2005a9b88fcdbb56f42b6362d2916e74970883165122a49/azure-graphrbac-0.53.0.zip" - sha256 "970c11f2cfa42c3e52d9768a92295cb0812dfbaa35401a2c5d1f5cbf6a42ae6f" - end - - resource "azure-keyvault" do - url "https://files.pythonhosted.org/packages/8e/47/b71d7ab466189d0663a8aa216e4cc67eb16d5dfc7d69b62a9140dd8d1a20/azure-keyvault-1.1.0.zip" - sha256 "37a8e5f376eb5a304fcd066d414b5d93b987e68f9212b0c41efa37d429aadd49" - end - - resource "azure-mgmt-advisor" do - url "https://files.pythonhosted.org/packages/f2/fb/bca29d83a2062c7d977742189195d669fd5983017fddb464c90f07adaac0/azure-mgmt-advisor-2.0.1.zip" - sha256 "1929d6d5ba49d055fdc806e981b93cf75ea42ba35f78222aaf42d8dcf29d4ef3" - end - - resource "azure-mgmt-authorization" do - url "https://files.pythonhosted.org/packages/3e/8f/ccb1117884ffd81862ed03359c90aace89e9d2faa8bb50e35e7fb85154c3/azure-mgmt-authorization-0.50.0.zip" - sha256 "535de12ff4f628b62b939ae17cc6186226d7783bf02f242cdd3512ee03a6a40e" - end - - resource "azure-mgmt-batch" do - url "https://files.pythonhosted.org/packages/8b/c3/ffd878e309a2e3905f9f4aa453344abad1e41caca33d495501c05074458c/azure-mgmt-batch-5.0.1.zip" - sha256 "6e375ecdd5966ee9ee45b29c90a806388c27ceacc2cbd6dd406ff311b5d7da72" - end - - resource "azure-mgmt-batchai" do - url "https://files.pythonhosted.org/packages/fa/7f/0a9e5aa22ea91db0771c267c4815396516177702a4a4eea389eed7af47dd/azure-mgmt-batchai-2.0.0.zip" - sha256 "f1870b0f97d5001cdb66208e5a236c9717a0ed18b34dbfdb238a828f3ca2a683" - end - - resource "azure-mgmt-billing" do - url "https://files.pythonhosted.org/packages/24/35/3b9da47363a300203c324b572a1ae3c096dc031905d582d5a27bd59a8d4e/azure-mgmt-billing-0.2.0.zip" - sha256 "85f73bb3808a7d0d2543307e8f41e5b90a170ad6eeedd54fe7fcaac61b5b22d2" - end - - resource "azure-mgmt-botservice" do - url "https://files.pythonhosted.org/packages/1d/e5/8c46af4aa8f5ba7d726e1ac2cecb40f0d2c37ef62830e50a818671ed2f1a/azure-mgmt-botservice-0.1.0.zip" - sha256 "592ea3828858841d470109b7eebd68627ead16a9cde1db8114ecaf3b76b56084" - end - - resource "azure-mgmt-cdn" do - url "https://files.pythonhosted.org/packages/3f/2a/2c5450add0e93067270b24a39444c1bfb1a18ee705c5735cf38f5900f270/azure-mgmt-cdn-3.0.0.zip" - sha256 "069774eb4b59b76ff9bd01708be0c8f9254ed40237b48368c3bb173f298755dd" - end - - resource "azure-mgmt-cognitiveservices" do - url "https://files.pythonhosted.org/packages/e0/34/def32a5bc74b565bc55ccfc9fd3a5ee3a8ccd36e6a98d6578167d7bbc65d/azure-mgmt-cognitiveservices-3.0.0.zip" - sha256 "c3247f2786b996a5f328ebdaf65d31507571979e004de7a5ed0ff280f95d80b4" - end - - resource "azure-mgmt-compute" do - url "https://files.pythonhosted.org/packages/c5/c5/e5a7a49a9b96ec3f70b2332e8919d8df940baed4f799fe1ad7d52ff6a241/azure-mgmt-compute-4.3.1.zip" - sha256 "5b0c2390af3e29d910e3d6e7a72b0be59d6e15933740dd193129217c000e4fed" - end - - resource "azure-mgmt-consumption" do - url "https://files.pythonhosted.org/packages/8c/f0/e2d94b246e2dce71eff8d362836a1979f02b4185f5403a13e4fb26c07ccb/azure-mgmt-consumption-2.0.0.zip" - sha256 "9a85a89f30f224d261749be20b4616a0eb8948586f7f0f20573b8ea32f265189" - end - - resource "azure-mgmt-containerinstance" do - url "https://files.pythonhosted.org/packages/e7/c1/2866937bc19ba102eaca9bc84cd28c0e7695cfbda26d3f299fbd9bd2e5a3/azure-mgmt-containerinstance-1.2.1.zip" - sha256 "5badd436938767924d89dac2d9a950010131a3ba40febdf3b36c7d30ba5cf69a" - end - - resource "azure-mgmt-containerregistry" do - url "https://files.pythonhosted.org/packages/b3/67/c483ace7f6edeb14740398ead78efacb182a09c5d4ecc8a1075bc494c340/azure-mgmt-containerregistry-2.4.0.zip" - sha256 "d5419db4543aaf5d83f73e087df0c0193f6b987f5c6161ac0fdd8eeabbfd23b0" - end - - resource "azure-mgmt-containerservice" do - url "https://files.pythonhosted.org/packages/e4/1c/88e48e8fe7a5d13cfafc7716052d392b08dcc69d08c4302bc48c12b5c3e7/azure-mgmt-containerservice-4.2.2.zip" - sha256 "99df430a03aada02625e35ef13d7de6c667e9bef56b5e2f60b2c284514223bff" - end - - resource "azure-mgmt-cosmosdb" do - url "https://files.pythonhosted.org/packages/58/0d/10329926e63c68fbf8f2040e2bf1b2a8ec3546b2b1cf34d3162f20519c48/azure-mgmt-cosmosdb-0.5.2.zip" - sha256 "1a7fefbd45262a7384a013fa4c29ea030365b08ead5e08a7148d2a32276cb2c3" - end - - resource "azure-mgmt-datalake-analytics" do - url "https://files.pythonhosted.org/packages/a7/58/48e0ca69aa4b515992b743d37abfcb348d48d457bc878895be8e1913b740/azure-mgmt-datalake-analytics-0.2.0.zip" - sha256 "2deb008be2583d7ed9573e6876f708f94b2971e6e25bc8f1c0f96d3f49900270" - end - - resource "azure-mgmt-datalake-nspkg" do - url "https://files.pythonhosted.org/packages/8e/0c/7b705f7c4a41bfeb0b6f3557f227c71aa3fa71555ed76ae934aa7db4b13e/azure-mgmt-datalake-nspkg-3.0.1.zip" - sha256 "deb192ba422f8b3ec272ce4e88736796f216f28ea5b03f28331d784b7a3f4880" - end - - resource "azure-mgmt-datalake-store" do - url "https://files.pythonhosted.org/packages/00/13/037f0128bdfcd47253f69a3b4ca6a7ff7b673b35832bc48f7c74df24a9be/azure-mgmt-datalake-store-0.5.0.zip" - sha256 "9376d35495661d19f8acc5604f67b0bc59493b1835bbc480f9a1952f90017a4c" - end - - resource "azure-mgmt-datamigration" do - url "https://files.pythonhosted.org/packages/69/0c/d876ab1ff8786deaf5bbf3b10c6823ae92c1d1ff576e262f4a6c681ffd39/azure-mgmt-datamigration-0.1.0.zip" - sha256 "e754928992743f54d999800a5e0679ee3e91d804d23a25f12c2e6f2f86cd05df" - end - - resource "azure-mgmt-devtestlabs" do - url "https://files.pythonhosted.org/packages/1d/67/b3fad6c04240edf278d2afa71129b8a86f43803ee681c518beac5729e58b/azure-mgmt-devtestlabs-2.2.0.zip" - sha256 "d416a6d0883b0d33a63c524db6455ee90a01a72a9d8757653e446bf4d3f69796" - end - - resource "azure-mgmt-dns" do - url "https://files.pythonhosted.org/packages/a2/0d/a36c123a1c978d39a1da747b9e8179f37441176d2a5276124d6d3312b2c4/azure-mgmt-dns-2.1.0.zip" - sha256 "3730b1b3f545a5aa43c0fff07418b362a789eb7d81286e2bed90ffef88bfa5d0" - end - - resource "azure-mgmt-eventgrid" do - url "https://files.pythonhosted.org/packages/a8/b5/a3e49faa5bd5618294d411bbd11ed1ae9eb886c65b78cdcb9bea360a53e4/azure-mgmt-eventgrid-0.4.0.zip" - sha256 "cf22195fe453627e20d81695a14e3c7b9329790763b65243be55d66964c789ac" - end - - resource "azure-mgmt-eventhub" do - url "https://files.pythonhosted.org/packages/bb/ad/a6f807a52d6c52e1e44e6f8ca877860970b6593bbfd3286802c322453e65/azure-mgmt-eventhub-2.2.0.zip" - sha256 "b5407e529b9daeefbb9393c8f7401f44a21ecfeede6e03cf08456149c1d3533e" - end - - resource "azure-mgmt-hdinsight" do - url "https://files.pythonhosted.org/packages/54/8d/ae164176232e1d5e03ebe915c06f5dca7c6a5978ca294c131546501b0a17/azure-mgmt-hdinsight-0.1.0.zip" - sha256 "89c8a3816742cb8ceba8a16d74d3980289d34323177978a410bb7323f6ddf71c" - end - - resource "azure-mgmt-iotcentral" do - url "https://files.pythonhosted.org/packages/cb/8b/878d6d5658cc224861f56d220834aeca794cc60c59e77bad643aa88c8ab7/azure-mgmt-iotcentral-1.0.0.zip" - sha256 "9aac88ed1f993965015f4e9986931fc08798e09d7b864928681a7cebff053de8" - end - - resource "azure-mgmt-iothub" do - url "https://files.pythonhosted.org/packages/54/6f/3d67a99c211fc6b5de1a9930c3c83962cd416b5f6e9e69366a968c6401c7/azure-mgmt-iothub-0.6.0.zip" - sha256 "a95b20466572f331f884d3e8cd5f159b3924b9ffd9069439b3afcfe6ad388434" - end - - resource "azure-mgmt-iothubprovisioningservices" do - url "https://files.pythonhosted.org/packages/7a/9e/179a404d2b3d999cf2dbdbec51c849e92625706e8eff6bd6d02df3ad2ab7/azure-mgmt-iothubprovisioningservices-0.2.0.zip" - sha256 "8c37acfd1c33aba845f2e0302ef7266cad31cba503cc990a48684659acb7b91d" - end - - resource "azure-mgmt-keyvault" do - url "https://files.pythonhosted.org/packages/ee/51/49aa83bc983020d69807ce5458d70009bff211e9f6e4f6bb081755e82af8/azure-mgmt-keyvault-1.1.0.zip" - sha256 "05a15327a922441d2ba32add50a35c7f1b9225727cbdd3eeb98bc656e4684099" - end - - resource "azure-mgmt-loganalytics" do - url "https://files.pythonhosted.org/packages/93/e2/6b47cc232357b05d0c8c788d6bbece67428ea997ba29d50e5cd90c1bd104/azure-mgmt-loganalytics-0.2.0.zip" - sha256 "c7315ff0ee4d618fb38dca68548ef4023a7a20ce00efe27eb2105a5426237d86" - end - - resource "azure-mgmt-managementgroups" do - url "https://files.pythonhosted.org/packages/3e/fd/0601266fd246b84a8f6882822b6cbccee18b85d5405dab1b85db82ba2606/azure-mgmt-managementgroups-0.1.0.zip" - sha256 "ff62d982edda634a36160cb1d15a367a9572a5acb419e5e7ad371e8c83bd47c7" - end - - resource "azure-mgmt-maps" do - url "https://files.pythonhosted.org/packages/58/99/735fc6f274d2f2a493071b4bc3e6ec2bc3d0d6caf1425eb903647785532c/azure-mgmt-maps-0.1.0.zip" - sha256 "c120e210bb61768da29de24d28b82f8d42ae24e52396eb6569b499709e22f006" - end - - resource "azure-mgmt-marketplaceordering" do - url "https://files.pythonhosted.org/packages/30/16/e381dd68bfc281f110a94733abdce0626b9c38647ea17f89adc937c61f49/azure-mgmt-marketplaceordering-0.1.0.zip" - sha256 "6da12425cbab0cc62f246e7266b4d67aff6bdd031ecbe50c7542c2f2b2440ad4" - end - - resource "azure-mgmt-media" do - url "https://files.pythonhosted.org/packages/0c/a9/93951a36f2347f00f3323986aeb48588f55c179f7e710434a10ae9a635d0/azure-mgmt-media-1.0.1.zip" - sha256 "e582851032a98613e16c36cabba8903e755f7622bd24bdf114b32064799f3059" - end - - resource "azure-mgmt-monitor" do - url "https://files.pythonhosted.org/packages/c6/e7/7a05e95d742605c08b38864693e82d0424bb66dd5870b5e2edfc0f71fd0c/azure-mgmt-monitor-0.5.2.zip" - sha256 "f1a58d483e3292ba4f7bbf3104573130c9265d6c9262e26b60cbfa950b5601e4" - end - - resource "azure-mgmt-msi" do - url "https://files.pythonhosted.org/packages/da/6f/60f92469f93e2820949f967b8c722fe0c04f03e4cc9a6332ffaf5e9f405b/azure-mgmt-msi-0.2.0.zip" - sha256 "8622bc9a164169a0113728ebe7fd43a88189708ce6e10d4507247d6907987167" - end - - resource "azure-mgmt-network" do - url "https://files.pythonhosted.org/packages/9f/af/3ef12f79fd0552d078751145b75b26c6eea6bd744278ce49be40c1547f45/azure-mgmt-network-2.4.0.zip" - sha256 "37c11c131ec55bf13216d62b058786491c8dd5700ffe19fec68b4557b87408a6" - end - - resource "azure-mgmt-nspkg" do - url "https://files.pythonhosted.org/packages/c4/d4/a9a140ee15abd8b0a542c0d31b7212acf173582c10323b09380c79a1178b/azure-mgmt-nspkg-3.0.2.zip" - sha256 "8b2287f671529505b296005e6de9150b074344c2c7d1c805b3f053d081d58c52" - end - - resource "azure-mgmt-policyinsights" do - url "https://files.pythonhosted.org/packages/72/f8/ead482ae756cc04b61f96ffa29d4a6dca736dddc5407697cdc98cde17015/azure-mgmt-policyinsights-0.1.0.zip" - sha256 "ff94cb12d6e01bf1470c2a6af4ce6960669ab4209106153879ff97addc569ce1" - end - - resource "azure-mgmt-rdbms" do - url "https://files.pythonhosted.org/packages/4b/7c/eec30fec9740dcdaa6650141b968ce914b13dc73a17805d290eb361c978a/azure-mgmt-rdbms-1.5.0.zip" - sha256 "3b6a194e6b82aa9fa187d1060ff3f19ad7218317b9ae30d9b64c3113ac8dfd7c" - end - - resource "azure-mgmt-recoveryservices" do - url "https://files.pythonhosted.org/packages/a3/e9/476dbfc13000f7eda49b18a0c109827841b5381ce15acb651b5b4dec248e/azure-mgmt-recoveryservices-0.1.0.zip" - sha256 "bf875b8fbfe2459f4c729c363ec6721b8d33bd7fe74bcd0a8ce27f0fcdae5aef" - end - - resource "azure-mgmt-recoveryservicesbackup" do - url "https://files.pythonhosted.org/packages/9f/fb/731b07c573c660780e660d883cb1d1a6d09c1b4ebd5348383eae854a4024/azure-mgmt-recoveryservicesbackup-0.1.1.zip" - sha256 "a09a514f5c7877406bdf777007683f036f5444f878cf595a15e541e7ba5c1c66" - end - - resource "azure-mgmt-redis" do - url "https://files.pythonhosted.org/packages/be/18/3f350eb5ddba594b1775b5f3a0cc60f53357feaf3986b7cd2da5400d2802/azure-mgmt-redis-5.0.0.zip" - sha256 "374a267b83ec4e71077b8afad537863fb93816c96407595cdd02973235356ded" - end - - resource "azure-mgmt-relay" do - url "https://files.pythonhosted.org/packages/df/76/f4673094df467c1198dfd944f8a800a25d0ed7f4bbd7c73e9e2605874576/azure-mgmt-relay-0.1.0.zip" - sha256 "d9f987cf2998b8a354f331b2a71082c049193f1e1cd345812e14b9b821365acb" - end - - resource "azure-mgmt-reservations" do - url "https://files.pythonhosted.org/packages/44/56/5ef2dec169039dbc390ae4f6d91e930d5a790a289d2ae0832235889a2fed/azure-mgmt-reservations-0.3.1.zip" - sha256 "b25dac18466204643d9450b1cb0163161254c0f7ea76136af9c6589e89c8de49" - end - - resource "azure-mgmt-resource" do - url "https://files.pythonhosted.org/packages/48/31/5996d2af3e32cf6ccc3f44da401ae397e6302b08d7ef7d8736191a8bfe61/azure-mgmt-resource-2.0.0.zip" - sha256 "2e83289369be88d0f06792118db5a7d4ed7150f956aaae64c528808da5518d7f" - end - - resource "azure-mgmt-search" do - url "https://files.pythonhosted.org/packages/d3/ac/45dc77a33fa08f09f27a28a42321780d41830f22b554951836bca8665a5e/azure-mgmt-search-2.0.0.zip" - sha256 "0ec5de861bd786bcb8691322feed6e6caa8d2f0806a50dc0ca5d640591926893" - end - - resource "azure-mgmt-servicebus" do - url "https://files.pythonhosted.org/packages/a2/ec/029e1d4e6aea0eb1aac53a80083de9bf96ba724c46af36ee39e834f84fee/azure-mgmt-servicebus-0.5.3.zip" - sha256 "7d1e8c3dc05ffdfe496ae643290ce4de93a3bf814ffda69121223e3d7da12408" - end - - resource "azure-mgmt-servicefabric" do - url "https://files.pythonhosted.org/packages/13/cd/996d5887c207c175eb1be0936b994db3382d0e2998e58baaf5255e53ddc2/azure-mgmt-servicefabric-0.2.0.zip" - sha256 "b2bf2279b8ff8450c35e78e226231655021482fdbda27db09975ebfc983398ad" - end - - resource "azure-mgmt-signalr" do - url "https://files.pythonhosted.org/packages/b7/ee/cb621d6d744d15bda56b4026cee078bfc14c47aa5b770b68f46b89b74e98/azure-mgmt-signalr-0.1.1.zip" - sha256 "8a6266a59a5c69102e274806ccad3ac74b06fd2c226e16426bbe248fc2174903" - end - - resource "azure-mgmt-sql" do - url "https://files.pythonhosted.org/packages/ec/a0/4ecdb08ba6646d79766d86e87d22571a8045f490d417635dc1505b6633c7/azure-mgmt-sql-0.11.0.zip" - sha256 "a6b6d49fdbd440a1685dcd98bb92f98b6ecd450603733f8a3873ab2dc6c81607" - end - - resource "azure-mgmt-storage" do - url "https://files.pythonhosted.org/packages/9f/5b/419caf8918a80622eb9ac06057ad898f927737a29b40b72f792b01c21723/azure-mgmt-storage-3.1.0.zip" - sha256 "854b7a9bbb8af0f70104d75110e21caf874369d776cb52600220718c7b8a5c7a" - end - - resource "azure-mgmt-trafficmanager" do - url "https://files.pythonhosted.org/packages/bb/66/ca0d8190a227ba2fcd2b712209cd39e10e28f71b4d621ef07e7c325e29ca/azure-mgmt-trafficmanager-0.50.0.zip" - sha256 "126167eaa82b443b5b71394050ec292f45074701232bdbdda71f636e9b46516b" - end - - resource "azure-mgmt-web" do - url "https://files.pythonhosted.org/packages/60/42/0880efbfe860fd6756c4e2d42ad40ac921c4a7a94230dec1648967e8e839/azure-mgmt-web-0.40.0.zip" - sha256 "13b3bd17591000586894d0904531ada65a40eab87d25fc181d1dfeca8da9f4b1" - end - - resource "azure-multiapi-storage" do - url "https://files.pythonhosted.org/packages/b6/fd/be45075a77d26e32a2687c301e566989fbe3c8c0da27f5b87b4b073726cb/azure-multiapi-storage-0.2.2.tar.gz" - sha256 "2f46a08fa73f857ed37d7f2d43ce50d382ab69dd4e502662ea7be30166f7a1e8" - end - - resource "azure-nspkg" do - url "https://files.pythonhosted.org/packages/39/31/b24f494eca22e0389ac2e81b1b734453f187b69c95f039aa202f6f798b84/azure-nspkg-3.0.2.zip" - sha256 "e7d3cea6af63e667d87ba1ca4f8cd7cb4dfca678e4c55fc1cedb320760e39dd0" - end - - resource "azure-storage-blob" do - url "https://files.pythonhosted.org/packages/41/0d/a9d63c97b59c9853a9a491809c3c2d06e766bbfb72366549939ee9b7e554/azure-storage-blob-1.3.1.tar.gz" - sha256 "8cab5420ba6646ead09fdb497646f735b12645cba8efed96a86f7b370e175ade" - end - - resource "azure-storage-common" do - url "https://files.pythonhosted.org/packages/6b/d5/b0bac239f0b6396ce6f56a04ed5e3a8e4a0fe59669459f4cf4fe9df4f259/azure-storage-common-1.4.0.tar.gz" - sha256 "7ab607f9b8fd27b817482194b1e7d43484c65dcf2605aae21ad8706c6891934d" - end - - resource "azure-storage-nspkg" do - url "https://files.pythonhosted.org/packages/ce/70/86db196352768b4da1bbc101de967f8eb98fdfca9fd8f46b9eca148fdded/azure-storage-nspkg-3.1.0.tar.gz" - sha256 "6f3bbe8652d5f542767d8433e7f96b8df7f518774055ac7c92ed7ca85f653811" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/91/a5/fd19eac0252e56b4ce65ced937ae40024782c21108da7d830003b7f76cdb/bcrypt-3.1.5.tar.gz" - sha256 "136243dc44e5bab9b61206bd46fff3018bd80980b1a1dfbab64a22ff5745957f" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/f3/39/d3904df7c56f8654691c4ae1bdb270c1c9220d6da79bd3b1fbad91afd0e1/cryptography-2.4.2.tar.gz" - sha256 "05a6052c6a9f17ff78ba78f8e6eb1d777d25db3b763343a1ae89a7a8670386dd" - end - - resource "entrypoints" do - url "https://files.pythonhosted.org/packages/27/e8/607697e6ab8a961fc0b141a97ea4ce72cd9c9e264adeb0669f6d194aa626/entrypoints-0.2.3.tar.gz" - sha256 "d2d587dde06f99545fb13a383d2cd336a8ff1f359c5839ce3a64c917d10c029f" - end - - resource "humanfriendly" do - url "https://files.pythonhosted.org/packages/fc/62/327ccaf2bbc726b8612708c3324d8bb8a157418cfba1cf710fc3adf714cf/humanfriendly-4.17.tar.gz" - sha256 "1d3a1c157602801c62dfdb321760229df2e0d4f14412a0f41b13ad3f930a936a" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "jeepney" do - url "https://files.pythonhosted.org/packages/16/1d/74adf3b164a8d19a60d0fcf706a751ffa2a1eaa8e5bbb1b6705c92a05263/jeepney-0.4.tar.gz" - sha256 "6089412a5de162c04747f0220f6b2223b8ba660acd041e52a76426ca550e3c70" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/d2/fc/08b607c6870b20fc2aa9ef5b7c49293c3134d57563e57d27d9a8b753816c/keyring-17.0.0.tar.gz" - sha256 "d3744d22e398c19405d819d3c2d3bb82dc05a96513f577411c8847bb207dc289" - end - - resource "knack" do - url "https://files.pythonhosted.org/packages/03/a0/80b482d0c9374e30f01d15dcf3343c5d0bf43b6ed63d8bafe959bc84137c/knack-0.5.1.tar.gz" - sha256 "2c3a7604260cd58e094ddb506c2d5d85cd378bce03692b1fdc1d13143271c898" - end - - resource "mock" do - url "https://files.pythonhosted.org/packages/0c/53/014354fc93c591ccc4abff12c473ad565a2eb24dcd82490fae33dbf2539f/mock-2.0.0.tar.gz" - sha256 "b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba" - end - - resource "msrest" do - url "https://files.pythonhosted.org/packages/d8/9a/34f359d9acba054274202f6a2f0bdc3c907f938aeb7dff612002874f17ea/msrest-0.6.2.tar.gz" - sha256 "1b8daa01341fb77b0797c5fbc28e7e957388eb562721cc6392603ea5a4a39345" - end - - resource "msrestazure" do - url "https://files.pythonhosted.org/packages/cd/ce/1381822930cb2e90e889e43831428982577acb9caec5244bcce1c9c542f9/msrestazure-0.4.34.tar.gz" - sha256 "4fc94a03ecd5b094ab904d929cc5be7a6a80262eab93948260cfe9081a9e6de4" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/df/5f/3f4aae7b28db87ddef18afed3b71921e531ca288dc604eb981e9ec9f8853/oauthlib-2.1.0.tar.gz" - sha256 "ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/a4/57/86681372e7a8d642718cadeef38ead1c24c4a1af21ae852642bf974e37c7/paramiko-2.4.2.tar.gz" - sha256 "a8975a7df3560c9f1e2b43dc54ebd40fd00a7017392ca5445ce7df409f900fcb" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/33/07/6e68a96ff240a0e7bb1f6e21093532386a98a82d56512e1e3da6d125f7aa/pbr-5.1.1.tar.gz" - sha256 "f59d71442f9ece3dffc17bc36575768e1ee9967756e6b6535f0ee1f0054c3d68" - end - - resource "portalocker" do - url "https://files.pythonhosted.org/packages/01/e1/badb92f4bbd7c8c892d943a0136dcacf123cfbc835535368c74b707bc8dd/portalocker-1.2.1.tar.gz" - sha256 "3f2a56d3d90e2ac5659ee744336e6953c0050bb61fccb97090a03de5c2a4db9f" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/8a/ad/cf6b128866e78ad6d7f1dc5b7f99885fb813393d9860778b2984582e81b5/prompt_toolkit-1.0.15.tar.gz" - sha256 "858588f1983ca497f1cf4ffde01d978a3ea02b01c8a26a8bbc5cd2e66d816917" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/10/46/059775dc8e50f722d205452bced4b3cc965d27e8c3389156acd3b1123ae3/pyasn1-0.4.4.tar.gz" - sha256 "f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pydocumentdb" do - url "https://files.pythonhosted.org/packages/cf/53/310ef5bd836e54f8a8c3d4da8c9a8c9b21c6bb362665e018eb27c41a1518/pydocumentdb-2.3.3.tar.gz" - sha256 "77c8da2b50920442da42f13b2cb9ff0a4062a982b26d9381ba30b12bcc1b97b9" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/64/69/413708eaf3a64a6abb8972644e0f20891a55e621c6759e2c3f3891e05d63/Pygments-2.3.1.tar.gz" - sha256 "5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a" - end - - resource "PyJWT" do - url "https://files.pythonhosted.org/packages/2f/38/ff37a24c0243c5f45f5798bd120c0f873eeed073994133c084e1cf13b95c/PyJWT-1.7.1.tar.gz" - sha256 "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/0e/01/68747933e8d12263d41ce08119620d9a7e5eb72c876a3442257f74490da0/python-dateutil-2.7.5.tar.gz" - sha256 "88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/cd/71/ae99fc3df1b1c5267d37ef2c51b7d79c44ba8a5e37b48e3ca93b4d74d98b/pytz-2018.7.tar.gz" - sha256 "31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz" - sha256 "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/95/be/072464f05b70e4142cb37151e215a2037b08b1400f8a56f2538b76ca6205/requests-oauthlib-1.0.0.tar.gz" - sha256 "8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f" - end - - resource "scp" do - url "https://files.pythonhosted.org/packages/a6/7d/735579c8cd4f903cd3002be68581dfe8d48c7498b4e6e7a874065d2af1a5/scp-0.13.0.tar.gz" - sha256 "cfcc275c249ae59480f88fa55c4bd7795ce8b48d3a9b8fd635d82958084b4124" - end - - resource "SecretStorage" do - url "https://files.pythonhosted.org/packages/17/7a/683ce8d41b0b392199f1f6273a5cc81a0583b886e799786b7add5750817f/SecretStorage-3.1.0.tar.gz" - sha256 "29aa3cbd36dd5e54ac17d69161f9a150548f4ffba21fa8b5fdd5add854fe7d8b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "sshtunnel" do - url "https://files.pythonhosted.org/packages/bf/8d/385c7e7c90e17934b3102ad2902e224c27a7173a6a57ef4805dcef8043b1/sshtunnel-0.1.4.tar.gz" - sha256 "f29ae41a1bd3afa64e9a31029bece2966e4be9a9641e8262372741e691c40d76" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz" - sha256 "e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "vsts-cd-manager" do - url "https://files.pythonhosted.org/packages/fc/cd/29c798a92d5f7a718711e4beace03612c93ad7ec2121aea606d8abae38ee/vsts-cd-manager-1.0.2.tar.gz" - sha256 "0bb09059cd553e1c206e92ef324cb0dcf92334846d646c44c684f6256b86447b" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/35/d4/14e446a82bc9172d088ebd81c0b02c5ca8481bfeecb13c9ef07998f9249b/websocket_client-0.54.0.tar.gz" - sha256 "e51562c91ddb8148e791f0155fdb01325d99bb52c4cdbb291aee7a3563fd0849" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/fa/b4/f9886517624a4dcb81a1d766f68034344b7565db69f13d52697222daeb72/wheel-0.30.0.tar.gz" - sha256 "9515fe0a94e823fd90b08d22de45d7bde57c90edce705b22f5e1ecf7e1b653c8" - end - - resource "Whoosh" do - url "https://files.pythonhosted.org/packages/25/2b/6beed2107b148edc1321da0d489afc4617b9ed317ef7b72d4993cad9b684/Whoosh-2.7.4.tar.gz" - sha256 "7ca5633dbfa9e0e0fa400d3151a8a0c4bec53bd2ecedc0a67705b17565c31a83" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/57/17/a6acddc5f5993ea6eaf792b2e6c3be55e3e11f3b85206c818572585f61e1/xmltodict-0.11.0.tar.gz" - sha256 "8f8d7d40aa28d83f4109a7e8aa86e67a4df202d9538be40c0cb1d70da527b0df" - end - - def install - xy = Language::Python.major_minor_version "python3" - site_packages = libexec/"lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", site_packages - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib}" - ENV.prepend "CFLAGS", "-I#{Formula["openssl"].opt_include}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include}" - - # Get the CLI components we'll install - components = [ - buildpath/"src/azure-cli", - buildpath/"src/azure-cli-telemetry", - buildpath/"src/azure-cli-core", - buildpath/"src/azure-cli-nspkg", - buildpath/"src/azure-cli-command_modules-nspkg", - ] - components += Pathname.glob(buildpath/"src/command_modules/azure-cli-*/") - - # Install dependencies - # note: Even if in 'resources', don't include 'futures' as not needed for Python3 - # and causes import errors. See https://github.com/agronholm/pythonfutures/issues/41 - deps = resources.map(&:name).to_set - ["futures"] - deps.each do |r| - resource(r).stage do - system "python3", *Language::Python.setup_install_args(libexec) - end - end - - # Install CLI - components.each do |item| - cd item do - system "python3", *Language::Python.setup_install_args(libexec) - end - end - - # This replaces the `import pkg_resources` namespace imports from upstream - # with empty string as the import is slow and not needed in this environment. - File.open(site_packages/"azure/__init__.py", "w") {} - File.open(site_packages/"azure/cli/__init__.py", "w") {} - File.open(site_packages/"azure/cli/command_modules/__init__.py", "w") {} - File.open(site_packages/"azure/mgmt/__init__.py", "w") {} - - (bin/"az").write <<~EOS - #!/usr/bin/env bash - export PYTHONPATH="#{ENV["PYTHONPATH"]}" - if command -v python#{xy} >/dev/null 2>&1; then - python#{xy} -m azure.cli \"$@\" - else - python3 -m azure.cli \"$@\" - fi - EOS - - bash_completion.install "az.completion" => "az" - end - - test do - json_text = shell_output("#{bin}/az cloud show --name AzureCloud") - azure_cloud = JSON.parse(json_text) - assert_equal azure_cloud["name"], "AzureCloud" - assert_equal azure_cloud["endpoints"]["management"], "https://management.core.windows.net/" - assert_equal azure_cloud["endpoints"]["resourceManager"], "https://management.azure.com/" - end -end diff --git a/Formula/azure-storage-cpp.rb b/Formula/azure-storage-cpp.rb deleted file mode 100644 index 8f7dd90b0b63c..0000000000000 --- a/Formula/azure-storage-cpp.rb +++ /dev/null @@ -1,55 +0,0 @@ -class AzureStorageCpp < Formula - desc "Microsoft Azure Storage Client Library for C++" - homepage "https://azure.github.io/azure-storage-cpp" - url "https://github.com/Azure/azure-storage-cpp/archive/v5.2.0.tar.gz" - sha256 "c7e4cddd0d3c913ca1f367e3b5d84b5260311dcb33beaf2fefb66f821d2255fc" - - bottle do - cellar :any - sha256 "d113d3a9b40a1c1e804701ab91bf0bba9ec6ea5258f38ef4e9887f3e85a21a36" => :mojave - sha256 "245d504aa58031cd17e0e22d94ab3a23ee33e0113962c5ea05db374407c1d688" => :high_sierra - sha256 "9c2e8d60a2a270edcdb96dd42492644a271477e707268e6919312a52de2f4c15" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "cpprestsdk" - depends_on "gettext" - depends_on "openssl" - depends_on "ossp-uuid" - - def install - system "cmake", "Microsoft.WindowsAzure.Storage", - "-DBUILD_SAMPLES=OFF", - "-DBUILD_TESTS=OFF", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace azure; - int main() { - utility::string_t storage_connection_string(_XPLATSTR("DefaultEndpointsProtocol=https;AccountName=myaccountname;AccountKey=myaccountkey")); - try { - azure::storage::cloud_storage_account storage_account = azure::storage::cloud_storage_account::parse(storage_connection_string); - return 0; - } - catch(...){ return 1; } - } - EOS - flags = ["-stdlib=libc++", "-std=c++11", "-I#{include}", - "-I#{Formula["boost"].include}", - "-I#{Formula["openssl"].include}", - "-I#{Formula["cpprestsdk"].include}", - "-L#{Formula["boost"].lib}", - "-L#{Formula["cpprestsdk"].lib}", - "-L#{Formula["openssl"].lib}", - "-L#{lib}", - "-lcpprest", "-lboost_system-mt", "-lssl", "-lcrypto", "-lazurestorage"] + ENV.cflags.to_s.split - system ENV.cxx, "-o", "test_azurestoragecpp", "test.cpp", *flags - system "./test_azurestoragecpp" - end -end diff --git a/Formula/b/b2-tools.rb b/Formula/b/b2-tools.rb new file mode 100644 index 0000000000000..c387b75fb2429 --- /dev/null +++ b/Formula/b/b2-tools.rb @@ -0,0 +1,131 @@ +class B2Tools < Formula + include Language::Python::Virtualenv + + desc "B2 Cloud Storage Command-Line Tools" + homepage "https://github.com/Backblaze/B2_Command_Line_Tool" + url "https://files.pythonhosted.org/packages/e8/be/5787c4a1ab6d996e6740904fc8bfcf9b39de5cafc2aae0b8d84a997d26e2/b2-4.4.2.tar.gz" + sha256 "61ac927da23e5c69bbc87b217b21cec442c809f890bc07e2dcc9f66a75e2d60b" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e9367aabbecfaa1ec9f43be2ee3e02a8a6bc0bcaa372eb4ddb3a0a3ddaaabe6c" + end + + depends_on "certifi" + depends_on "python@3.14" + + conflicts_with "boost-build", because: "both install `b2` binaries" + + pypi_packages exclude_packages: "certifi" + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "b2sdk" do + url "https://files.pythonhosted.org/packages/f2/d2/3418125c13b35960d0fa00cdb58bfe03c4b88fb74519c5930a47802c1b63/b2sdk-2.10.1.tar.gz" + sha256 "92c860a4a2e64d4a30d255d5a8d6d9049ff6d2bc64ff5751c0e05b1a2921fd1f" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "logfury" do + url "https://files.pythonhosted.org/packages/90/f2/24389d99f861dd65753fc5a56e2672339ec1b078da5e2f4b174d0767b132/logfury-1.0.1.tar.gz" + sha256 "130a5daceab9ad534924252ddf70482aa2c96662b3a3825a7d30981d03b76a26" + end + + resource "phx-class-registry" do + url "https://files.pythonhosted.org/packages/79/ce/db26f7f8ed4f4b200f34b8401ecaa9cbb0709f3c3822ae0d29a6019ad2a8/phx-class-registry-4.1.0.tar.gz" + sha256 "6a7fe8568f9000ad1f90c9a81c5cb65ec20ee3b89b2aaab7a67e14dbb67e11d1" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rst2ansi" do + url "https://files.pythonhosted.org/packages/3c/19/b29bc04524e7d1dbde13272fbb67e45a8eb24bb6d112cf10c46162b350d7/rst2ansi-0.1.5.tar.gz" + sha256 "1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + venv = virtualenv_install_with_resources + + system bin/"b2", "install-autocomplete", "--shell", "bash" + bash_completion.install "#{Dir.home}/.bash_completion.d/b2" + + # Build an `:all` bottle by replacing comments + inreplace venv.site_packages.glob("argcomplete-*.dist-info/METADATA"), + "/opt/homebrew/bin/bash", + "$HOMEBREW_PREFIX/bin/bash" + end + + test do + assert_match "-F _python_argcomplete b2", + shell_output("bash -c \"source #{bash_completion}/b2 && complete -p b2\"") + ENV["LC_ALL"] = "en_US.UTF-8" + output = shell_output("#{bin}/b2 authorize_account BOGUSACCTID BOGUSAPPKEY 2>&1", 1) + assert_match "unable to authorize account", output + end +end diff --git a/Formula/b/b2sum.rb b/Formula/b/b2sum.rb new file mode 100644 index 0000000000000..28e7305bc308b --- /dev/null +++ b/Formula/b/b2sum.rb @@ -0,0 +1,41 @@ +class B2sum < Formula + desc "BLAKE2 b2sum reference binary" + homepage "https://github.com/BLAKE2/BLAKE2" + url "https://github.com/BLAKE2/BLAKE2/archive/refs/tags/20190724.tar.gz" + sha256 "7f2c72859d462d604ab3c9b568c03e97b50a4052092205ad18733d254070ddc2" + license any_of: ["CC0-1.0", "OpenSSL", "Apache-2.0"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2c13b1572d5c05d0c824ffa7cc06a385d7a99c7e03ab695701a4a95964677abd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78ff50b93a895f7bb3344a5469d54dbbd55066e27903a0411be5c8406d9bf896" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f950ffbb7054c14bc13c5308966a2eb461557103b96f43d446781b9353887a78" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9fb48197fac700a466ea1628a59ed6a5b6a9690977659bb31c9fe31bf5fce63" + sha256 cellar: :any_skip_relocation, arm64_monterey: "64c2c7d38639bafcf1ae62c5c1b4d6226dc57fcf7cff654c676d97be597b3d40" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d7c75a1aaf69f5bdec9706848244f7baaa4c17066d99e791ad9d007a483d1671" + sha256 cellar: :any_skip_relocation, sonoma: "a7e35223790e6b251dbad52a84e5cd3c1bbfe774039afdfcbc6d40a7537126df" + sha256 cellar: :any_skip_relocation, ventura: "b68e4c748c44e8087d61da723e3402dd9e6506b038695e6bbd447333bb69503f" + sha256 cellar: :any_skip_relocation, monterey: "70a311dd99f685268a3bcef834c4373d8506fafcd17de9a15fbe9fb68f2fcaed" + sha256 cellar: :any_skip_relocation, big_sur: "fd4870a8a8ea954c5f8b45addfd4ee6ccac3f69f058a54be623ea271b3b4be78" + sha256 cellar: :any_skip_relocation, catalina: "339b959eb5c2cbc8c26a39022937ea27b7911ff1c9f0611c3f2ac1595f5b0e50" + sha256 cellar: :any_skip_relocation, arm64_linux: "045bcf83cd9918310902dcf419763b59bfa86c1cce653d2469a760e3cff05219" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3de701be2858013ed380a477ce9b911db189812984990cd420b9f6d5df7a82bd" + end + + conflicts_with "coreutils", because: "both install `b2sum` binaries" + + def install + cd "b2sum" do + inreplace "makefile", "../sse", "../neon" if Hardware::CPU.arm? + system "make", "NO_OPENMP=1" + system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man}" + end + end + + test do + checksum = "ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d1" \ + "7d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923 -" + assert_equal checksum, pipe_output("#{bin}/b2sum -", "abc", 0).chomp + end +end diff --git a/Formula/b/b3sum.rb b/Formula/b/b3sum.rb new file mode 100644 index 0000000000000..598d413048159 --- /dev/null +++ b/Formula/b/b3sum.rb @@ -0,0 +1,35 @@ +class B3sum < Formula + desc "Command-line implementation of the BLAKE3 cryptographic hash function" + homepage "https://github.com/BLAKE3-team/BLAKE3" + url "https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/1.8.2.tar.gz" + sha256 "6b51aefe515969785da02e87befafc7fdc7a065cd3458cf1141f29267749e81f" + license any_of: ["CC0-1.0", "Apache-2.0"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e07d5d585f8a33c42965dc6da2b1d46898bda73e1b604a63c562b73603be1c3e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bad04179c8c37e7afa0fd83d28af8fe27607994fa8c39f309bd3e3c69b613086" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e906f67b37fd1f69281f71039786cf49bc8aba72b5879cc1dad720c414ad3982" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cfdaa91ad3f88c6fb734acad4adfd0e272881182d7f9810223964d1003c94ab0" + sha256 cellar: :any_skip_relocation, sonoma: "8786885a570f8b3b2d6d66c2dbf7cdbe0317c4393bbf6a390882a450d6d5f4aa" + sha256 cellar: :any_skip_relocation, ventura: "61606af42f07a5a6dcfcf1b2ffe6f76b046213cfba6f42a2afa1d06a798dc37b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d94b9769af2a11c7ce1e4e1e8ecdd6c649ee305ed58e0363da5ce4509afe904" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c65b99dc2886d78591ab8ffcb62c760869a41c4c30b75677ac07830f96e4756" + end + + depends_on "rust" => :build + + def install + cd "b3sum" do + system "cargo", "install", *std_cargo_args + end + end + + test do + (testpath/"test.txt").write <<~EOS + content + EOS + + output = shell_output("#{bin}/b3sum test.txt") + assert_equal "df0c40684c6bda3958244ee330300fdcbc5a37fb7ae06fe886b786bc474be87e test.txt", output.strip + end +end diff --git a/Formula/b/b4.rb b/Formula/b/b4.rb new file mode 100644 index 0000000000000..94cc8e9ada9ad --- /dev/null +++ b/Formula/b/b4.rb @@ -0,0 +1,86 @@ +class B4 < Formula + include Language::Python::Virtualenv + + desc "Tool to work with public-inbox and patch archives" + homepage "https://b4.docs.kernel.org/en/latest/" + url "https://files.pythonhosted.org/packages/70/99/2b34c8451ad6599090f7d9045adb9f19270c2ed8cef4d52c179b297f8e37/b4-0.14.3.tar.gz" + sha256 "31a4927b8dfbb5c97edfc9569cda3b6737bbfd8430881e8cc48a0b088ced6147" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5d861848f90bd4f1953944a09bfc7d37e0eaf1ae6dac84acdfaee2578ec97f57" + sha256 cellar: :any, arm64_sequoia: "638ed304654795652f41c9e72597cce6558d6f1eb6f30c29f6bc347621267cb0" + sha256 cellar: :any, arm64_sonoma: "392952a0c0aff0de08ba6983baaff5cade7b9c21dd90a3b9bb235d999acecabd" + sha256 cellar: :any, sonoma: "c1638b4b15315711fd1ed98dcce28c66d81e8de9fb56b75bd3950ac9a81e208b" + sha256 cellar: :any_skip_relocation, arm64_linux: "00cc2ec03823c39977cb962f06634b3305dae835ba96609d60bc0aac220cbc68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f99ab2316852426903e49e93d05f6df992d1e5d786d4f340da5e49218003ba38" + end + + depends_on "certifi" => :no_linkage + depends_on "cffi" => :no_linkage + depends_on "libsodium" + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "cffi"] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "dkimpy" do + url "https://files.pythonhosted.org/packages/f0/6f/84e91828186bbfcedd7f9385ef5e0d369632444195c20e08951b7ffe0481/dkimpy-1.1.8.tar.gz" + sha256 "b5f60fb47bbf5d8d762f134bcea0c388eba6b498342a682a21f1686545094b77" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "git-filter-repo" do + url "https://files.pythonhosted.org/packages/b9/bb/7a283f568af6b0528ade65e8ace84bd6ba46003e429101bcd62c232d01a5/git_filter_repo-2.47.0.tar.gz" + sha256 "411b27e68a080c07a69c233cb526dbc2d848b09a72f10477f4444dd0822cf290" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "patatt" do + url "https://files.pythonhosted.org/packages/fa/62/8adfadbc130cd33696e06c9c2f3ea36252c2e3dd1387cfdea0bc3aa10172/patatt-0.6.3.tar.gz" + sha256 "980826f6529d2576c267ca1f564d5bef046cb47e54215bb598ed6c4b9b2d0a28" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/b4 --version") + + (testpath/".gitconfig").write <<~EOS + [user] + name = Homebrew + email = foo@brew.sh + EOS + assert_match "No thanks necessary.", shell_output("#{bin}/b4 ty 2>&1") + end +end diff --git a/Formula/b/b43-fwcutter.rb b/Formula/b/b43-fwcutter.rb new file mode 100644 index 0000000000000..0e22f5ed0f9fb --- /dev/null +++ b/Formula/b/b43-fwcutter.rb @@ -0,0 +1,48 @@ +class B43Fwcutter < Formula + desc "Extract firmware from Braodcom 43xx driver files" + homepage "https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43.html" + url "https://bues.ch/b43/fwcutter/b43-fwcutter-019.tar.bz2" + mirror "https://launchpad.net/ubuntu/+archive/primary/+files/b43-fwcutter_019.orig.tar.bz2" + sha256 "d6ea85310df6ae08e7f7e46d8b975e17fc867145ee249307413cfbe15d7121ce" + license "BSD-2-Clause" + + livecheck do + url "https://bues.ch/b43/fwcutter/" + regex(/href=.*?b43-fwcutter[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e27ebebb8d25a8d3c1ddd0e03b4a9f174117c1cb977c590b1c5300f5b45629f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "feebcb5d44b93e56fb3057568f06a25214d0c0aa2b03c48c0e8a068ecf5a1986" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "de90ea58c943e6a3a4da88710cfc5b1e29e646e1033ca280dac8730184346572" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e4d24a045df3b788ed629cd5f67509f5a0c5bff70fcd213f72107c2db166e3d9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "22dc022f54852b54e28b799378fcbd2ca877eb815332d90199881dbfe291d84b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0c68725ddd4ab0d3467c8eab623682712e51d180e4517e1fa04518c0aac4c65a" + sha256 cellar: :any_skip_relocation, sonoma: "c24cffe8c519050b9e9810e28038cb84815a5526089e5aa15f239c8061c131f2" + sha256 cellar: :any_skip_relocation, ventura: "5158aa819495b8aa8692bee35210299f865b62fb3cb4e559019290e1964b5ac5" + sha256 cellar: :any_skip_relocation, monterey: "a5c8994d63b3a39547fc9675b60c163575b6c88d24634d6ef0c0f29ebf1dbecf" + sha256 cellar: :any_skip_relocation, big_sur: "d71a9a74998af98e4593b5593ff415aa4e6f868a9fe7b7fa4814fd27a4b6652d" + sha256 cellar: :any_skip_relocation, catalina: "65b60abba52b848bd47386245505719c4c2218429719cf008a6720a4fbcac36a" + sha256 cellar: :any_skip_relocation, arm64_linux: "13ef19f39b23087c593c3f7b9c61e0eec77695230bd14018c4af95600f56450b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "730c1aaf1eca6cdcc4abab681ca38e7629699e85ac20bb0082b15abbf317a5ca" + end + + def install + inreplace "Makefile" do |m| + # Don't try to chown root:root on generated files + m.gsub! "install -o 0 -g 0", "install" + m.gsub! "install -d -o 0 -g 0", "install -d" + # Fix manpage installation directory + m.gsub! "$(PREFIX)/man", man + end + # b43-fwcutter has no ./configure + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"b43-fwcutter", "--version" + end +end diff --git a/Formula/b/babel.rb b/Formula/b/babel.rb new file mode 100644 index 0000000000000..a0bff203028b8 --- /dev/null +++ b/Formula/b/babel.rb @@ -0,0 +1,27 @@ +class Babel < Formula + desc "Compiler for writing next generation JavaScript" + homepage "https://babeljs.io/" + url "https://registry.npmjs.org/@babel/cli/-/cli-7.28.3.tgz" + sha256 "7166334788706818cba54d9f4daca3d1f45859e5586dc8a155f187a1ec6d62eb" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a7bba0de148f0f36c7bcb50a74f05b66068249554645dab0e558822278ae6476" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + (testpath/"script.js").write <<~JS + [1,2,3].map(n => n + 1); + JS + + system bin/"babel", "script.js", "--out-file", "script-compiled.js" + assert_path_exists testpath/"script-compiled.js", "script-compiled.js was not generated" + end +end diff --git a/Formula/b/babeld.rb b/Formula/b/babeld.rb new file mode 100644 index 0000000000000..2c3d70353a875 --- /dev/null +++ b/Formula/b/babeld.rb @@ -0,0 +1,45 @@ +class Babeld < Formula + desc "Loop-avoiding distance-vector routing protocol" + homepage "https://www.irif.fr/~jch/software/babel/" + url "https://www.irif.fr/~jch/software/files/babeld-1.13.1.tar.gz" + sha256 "15f24d26da0ccfc073abcdef0309f281e4684f2aa71126f826572c4c845e8dd9" + license "MIT" + head "https://github.com/jech/babeld.git", branch: "master" + + livecheck do + url "https://www.irif.fr/~jch/software/files/" + regex(/href=.*?babeld[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f977cf0194b8bb8a3a60a434904a2a858b0b9f336176327800a731ef007ab1a1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "62f048341c61438f5d7fade7659f694402543ca20d8fa7d06d42e87e42144e0c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "daa3da57b19ef571e1f7a235bc7ae6ce7ba610155b0f74b122e460e78d3c4e2b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "de3bd348ee96f4800eebf8e081ba0b02688dd47c05303f4bd7c47b8850a6bc97" + sha256 cellar: :any_skip_relocation, arm64_monterey: "055e941a8174763608a1eb8b1953d2d60a75f6bd2ac5bc2f57235fc647b10bd8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1c95ab7121b226e24a505064d231e89efe854d2c373f6a362e987b22901ed1cd" + sha256 cellar: :any_skip_relocation, sonoma: "df247b0cb0a9ba370ed3436aca781312806eec813a33a4b87008a8a09871e0ac" + sha256 cellar: :any_skip_relocation, ventura: "fa42c87c9b05ce203d457c7d6e288165ddb658bf830cd297b4fbe8c542ba40a8" + sha256 cellar: :any_skip_relocation, monterey: "69f0e27d20bf8a9febc3922bbcfe6d9ac84685751814d7f8747fcb3a2153d543" + sha256 cellar: :any_skip_relocation, big_sur: "3248b6ab94fada912bfdcb3521dc6c629a6e1a7bb09f9c1d33c232abcfc27a66" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ee2de3eeddb40b1c2bc7f4eee384c0e14bc00e4b403cb5f8f46e2e0ba202dd2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73e9228c77443e9d1c349091f0fecb2b5f61daaf340b99a6b2120def482a8f9a" + end + + def install + if OS.mac? + # LDLIBS='' fixes: ld: library not found for -lrt + system "make", "LDLIBS=''" + else + system "make" + end + system "make", "install", "PREFIX=#{prefix}" + end + + test do + shell_output("#{bin}/babeld -I #{testpath}/test.pid -L #{testpath}/test.log", 1) + assert_match "kernel_setup failed", (testpath/"test.log").read + end +end diff --git a/Formula/b/babelfish.rb b/Formula/b/babelfish.rb new file mode 100644 index 0000000000000..2a966ac7c8f38 --- /dev/null +++ b/Formula/b/babelfish.rb @@ -0,0 +1,43 @@ +class Babelfish < Formula + desc "Translate bash scripts to fish" + homepage "https://github.com/bouk/babelfish" + url "https://github.com/bouk/babelfish/archive/refs/tags/v1.2.1.tar.gz" + sha256 "967a9020e905f01b0d3150a37f35d21e8d051c634eebf479bc1503d95f81a1d9" + license "MIT" + head "https://github.com/bouk/babelfish.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67fa97472345f1e6a97179815c7c741904c41b6d0c349e9cb94076e2dce9cf02" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f8115802286fe41309a1b8b9291312e08f2b0ebdb65c4d928d59b8189bae38c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f8115802286fe41309a1b8b9291312e08f2b0ebdb65c4d928d59b8189bae38c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f8115802286fe41309a1b8b9291312e08f2b0ebdb65c4d928d59b8189bae38c" + sha256 cellar: :any_skip_relocation, sonoma: "edaf31144744c63fd91293ddaf4c5f5cdc96217c3c5df59065d95d04839ecbde" + sha256 cellar: :any_skip_relocation, ventura: "edaf31144744c63fd91293ddaf4c5f5cdc96217c3c5df59065d95d04839ecbde" + sha256 cellar: :any_skip_relocation, arm64_linux: "169834375c342c0ebcc87f43e78190c2c16bfd1b610da40fc3d6b27dc80dca87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "828cb037747b3780fc6b91d03e1377c3220ec7ea7a86f87e9db928e89bbffcc6" + end + + depends_on "go" => :build + depends_on "fish" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-w -s", gcflags: "all=-l -B -wb=false") + fish_function.install "babel.fish" + end + + def caveats + <<~EOS + The shell hook has been installed, you can use it by running: + + $ source #{HOMEBREW_PREFIX}/share/fish/vendor_functions.d/babel.fish + EOS + end + + test do + script = 'echo ${#@}' + translated = pipe_output(bin/"babelfish", script) + assert_equal "0", pipe_output("fish", translated).strip + end +end diff --git a/Formula/b/babl.rb b/Formula/b/babl.rb new file mode 100644 index 0000000000000..70f6f1b1b33fd --- /dev/null +++ b/Formula/b/babl.rb @@ -0,0 +1,62 @@ +class Babl < Formula + desc "Dynamic, any-to-any, pixel format translation library" + homepage "https://www.gegl.org/babl/" + url "https://download.gimp.org/pub/babl/0.1/babl-0.1.116.tar.xz" + sha256 "50fae069867c7ade1259888ff1e3db85fec86d708252e5385b5a4f39a78ec483" + license "LGPL-3.0-or-later" + # Use GitHub instead of GNOME's git. The latter is unreliable. + head "https://github.com/GNOME/babl.git", branch: "master" + + livecheck do + url "https://download.gimp.org/pub/babl/0.1/" + regex(/href=.*?babl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "85c839537f9471af091c716deff006d3c533a179fdff40fa2a191d257f72afa8" + sha256 arm64_sequoia: "d9811006ba4c60cbfa2d3cb23c85b2446a6f8c3b8e3a291b677cd2a1f82e47b8" + sha256 arm64_sonoma: "ca8508bda2750d69d76d513be77360f6b15981969dc9526d9454954e5dbf5f54" + sha256 sonoma: "bbdbf27e0c0b4eb55b0f3a8c9d8287d64e836c1482358e7349e15ad1c82c12d6" + sha256 arm64_linux: "08bf951f290b244cb91e6b3f871d2976809c17e76da10b7cb2b1b13fd1d84907" + sha256 x86_64_linux: "864d00c576fa0df3f7b2a80d3fdcfa1f2fb252f04c36d4260b95915b25467747" + end + + depends_on "glib" => :build # to add to PKG_CONFIG_PATH for gobject-introspection + depends_on "gobject-introspection" => [:build, :test] + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pcre2" => :build # to add to PKG_CONFIG_PATH for glib + depends_on "pkgconf" => :build + depends_on "vala" => :build + depends_on "little-cms2" + + uses_from_macos "libffi" => :build # to add to PKG_CONFIG_PATH for glib + + on_linux do + depends_on "util-linux" => :build # to add to PKG_CONFIG_PATH for glib + end + + def install + system "meson", "setup", "build", "-Dwith-docs=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + babl_init(); + const Babl *srgb = babl_format ("R'G'B' u8"); + const Babl *lab = babl_format ("CIE Lab float"); + const Babl *rgb_to_lab_fish = babl_fish (srgb, lab); + babl_exit(); + return 0; + } + C + system ENV.cc, "-I#{include}/babl-0.1", testpath/"test.c", "-L#{lib}", "-lbabl-0.1", "-o", "test" + system testpath/"test" + + system Formula["gobject-introspection"].opt_bin/"g-ir-inspect", "--print-typelibs", "--print-shlibs", "Babl" + end +end diff --git a/Formula/b/backgroundremover.rb b/Formula/b/backgroundremover.rb new file mode 100644 index 0000000000000..f28b8d4d0bf70 --- /dev/null +++ b/Formula/b/backgroundremover.rb @@ -0,0 +1,166 @@ +class Backgroundremover < Formula + include Language::Python::Virtualenv + + desc "Remove background from images and video using AI" + homepage "https://github.com/nadermx/backgroundremover" + url "https://files.pythonhosted.org/packages/81/c9/5c7d668bea7bb5ae6e069afe33c19e55ae95975a87a7e3a5bbd3d6199f74/backgroundremover-0.3.4.tar.gz" + sha256 "c4ce35da0194138c115017dba9f5dae38b7e2bfcf15a413ef04d8ce01e66e214" + license "MIT" + revision 2 + + bottle do + sha256 cellar: :any, arm64_tahoe: "47670e19d3401ac962ad008a87e145636fc0700592fbe82e216577aa859de77d" + sha256 cellar: :any, arm64_sequoia: "48877e3f30160439254633c0333b86890b571fa8cc9d70594f5bcdb5873d0f91" + sha256 cellar: :any, arm64_sonoma: "ad99ed4e1052a9967395eac4bcc83b98a05c2222d8a2148f8bd33f150c696e60" + sha256 cellar: :any, sonoma: "5257f4d79d258ec2474e6f40f3e576450adb2a4b37144b8a9479c7c5063d07ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "93db10c23a7ce007d554c0b8e2ee57246f53e9cb8fc76fde6ed2ff5e5a08d8f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdf05188369165206939c0b9b271b36b0afd1a05e91ef64ad7fa437d9e12b660" + end + + depends_on "cmake" => :build + depends_on "certifi" + depends_on "ffmpeg" + depends_on "llvm@20" + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.14" + depends_on "scikit-image" + depends_on "scipy" + depends_on "torchvision" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[certifi numpy torch torchvision pillow scipy scikit-image], + extra_packages: "imageio" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "commandlines" do + url "https://files.pythonhosted.org/packages/b9/4c/d380f7f9aaa12175b189cfe087e823cd9aa2a99afc95a8d6e028142311c9/commandlines-0.4.1.tar.gz" + sha256 "86b650b78470ac95966d7b1a9d215c16591bccb34b28ae2bb9026c3b4166fd64" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "ffmpeg-python" do + url "https://files.pythonhosted.org/packages/dd/5e/d5f9105d59c1325759d838af4e973695081fbbc97182baf73afc78dec266/ffmpeg-python-0.2.0.tar.gz" + sha256 "65225db34627c578ef0e11c8b1eb528bb35e024752f6f10b78c011f6f64c4127" + end + + resource "filetype" do + url "https://files.pythonhosted.org/packages/bb/29/745f7d30d47fe0f251d3ad3dc2978a23141917661998763bebb6da007eb1/filetype-1.2.0.tar.gz" + sha256 "66b56cd6474bf41d8c54660347d37afcc3f7d1970648de365c102ef77548aadb" + end + + resource "future" do + url "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz" + sha256 "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + end + + resource "hsh" do + url "https://files.pythonhosted.org/packages/88/dd/c04f9a56e374e7fe5a0ac5032d0a059ef7338485bcd2ae1a05115081c4e1/hsh-1.1.0.tar.gz" + sha256 "c04e43ac538feafb029dba3c4972207a704f5fcdf0ee271ebdddd03d96b5df85" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "imageio-ffmpeg" do + url "https://files.pythonhosted.org/packages/44/bd/c3343c721f2a1b0c9fc71c1aebf1966a3b7f08c2eea8ed5437a2865611d6/imageio_ffmpeg-0.6.0.tar.gz" + sha256 "e2556bed8e005564a9f925bb7afa4002d82770d6b08825078b7697ab88ba1755" + end + + resource "llvmlite" do + url "https://files.pythonhosted.org/packages/c1/39/be3a8255c8c40fcab6d54d147ae5bda00104e861b108c541f2b2ecb30c44/llvmlite-0.46.0b1.tar.gz" + sha256 "ea7208f342cc157e600093862ff87ab5d296680d7dfff0a01dc13668ecbc60d0" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "moviepy" do + url "https://files.pythonhosted.org/packages/de/61/15f9476e270f64c78a834e7459ca045d669f869cec24eed26807b8cd479d/moviepy-2.2.1.tar.gz" + sha256 "c80cb56815ece94e5e3e2d361aa40070eeb30a09d23a24c4e684d03e16deacb1" + end + + resource "numba" do + url "https://files.pythonhosted.org/packages/8b/ce/efb2667849b0abac22d1499bc855f67b97c3d23bb4f43c1d854ec2a0c716/numba-0.63.0b1.tar.gz" + sha256 "66b7a0052e2cfe8befa273e5af3eae75e102ac9c3da7d2ca361b7b72cf5051c8" + end + + resource "proglog" do + url "https://files.pythonhosted.org/packages/c2/af/c108866c452eda1132f3d6b3cb6be2ae8430c97e9309f38ca9dbd430af37/proglog-0.1.12.tar.gz" + sha256 "361ee074721c277b89b75c061336cb8c5f287c92b043efa562ccf7866cda931c" + end + + resource "pymatting" do + url "https://files.pythonhosted.org/packages/35/43/cd7a82913dfde95dfb653efd09c7b394a76b3865570050b674a36fc0078c/pymatting-1.1.14.tar.gz" + sha256 "75e2ec1e346dbd564c9a2cc8229b134ec939f49008fa570025db30003d0c46fc" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "waitress" do + url "https://files.pythonhosted.org/packages/bf/cb/04ddb054f45faa306a230769e868c28b8065ea196891f09004ebace5b184/waitress-3.0.2.tar.gz" + sha256 "682aaaf2af0c44ada4abfb70ded36393f0e307f4ab9456a215ce0020baefc31f" + end + + def install + ENV["LLVMLITE_SHARED"] = "1" + venv = virtualenv_install_with_resources + + # We depend on the formula below, but they are separate formula, so install a `.pth` file to link them. + # NOTE: This is an exception to our usual policy as building them is complicated + site_packages = Language::Python.site_packages(venv.root/"bin/python3") + torchvision_pth_contents = "import site; site.addsitedir('#{Formula["torchvision"].opt_libexec/site_packages}')\n" + (venv.site_packages/"homebrew-torchvision.pth").write torchvision_pth_contents + + skimage_pth_contents = "import site; site.addsitedir('#{Formula["scikit-image"].opt_libexec/site_packages}')\n" + (venv.site_packages/"homebrew-scikit-image.pth").write skimage_pth_contents + end + + test do + system bin/"backgroundremover", "-i", test_fixtures("test.jpg"), "-o", testpath/"output.png" + assert_path_exists testpath/"output.png" + end +end diff --git a/Formula/b/backlog-md.rb b/Formula/b/backlog-md.rb new file mode 100644 index 0000000000000..5e84fc0797fde --- /dev/null +++ b/Formula/b/backlog-md.rb @@ -0,0 +1,31 @@ +class BacklogMd < Formula + desc "Markdown‑native Task Manager & Kanban visualizer for any Git repository" + homepage "https://github.com/MrLesk/Backlog.md" + url "https://registry.npmjs.org/backlog.md/-/backlog.md-1.18.5.tgz" + sha256 "8f4eb6ab6b0ff0a676f5b98916b425bae34bd13c48ff0e63e0b4153cfd5487a5" + license "MIT" + + bottle do + sha256 arm64_tahoe: "01ed6020336546f5684eedd0622ba034682c8023ff16c7a9b01bb552fdb1179a" + sha256 arm64_sequoia: "01ed6020336546f5684eedd0622ba034682c8023ff16c7a9b01bb552fdb1179a" + sha256 arm64_sonoma: "01ed6020336546f5684eedd0622ba034682c8023ff16c7a9b01bb552fdb1179a" + sha256 cellar: :any_skip_relocation, sonoma: "cdbee76594f3dbc39dc2a7e5829a520408a82cfb87ab7bdc54287b4a47784a81" + sha256 cellar: :any_skip_relocation, arm64_linux: "7577e6185dfda6f905faba4962d785063795910be25f322b3c503023e4d5aa3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be563c3a21f048edef5b515ff1717ab85bf6050e1407001ce590bbf44a7080a8" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/backlog --version") + + system "git", "init" + system bin/"backlog", "init", "--defaults", "foobar" + assert_path_exists testpath/"backlog" + end +end diff --git a/Formula/b/backupninja.rb b/Formula/b/backupninja.rb new file mode 100644 index 0000000000000..1e21717be2b20 --- /dev/null +++ b/Formula/b/backupninja.rb @@ -0,0 +1,52 @@ +class Backupninja < Formula + desc "Backup automation tool" + homepage "https://0xacab.org/liberate/backupninja" + url "https://0xacab.org/liberate/backupninja/-/archive/backupninja_upstream/1.2.2/backupninja-backupninja_upstream-1.2.2.tar.gz" + sha256 "93ddc72f085d46145b289d35dac1d72e998c15bec1833db78e474b53c9768774" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^backupninja[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d1b80fa729900bd76aef820cc86234a063da66ab9ec44dc9e5350535092953a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9200901794d73bd35ef083d40452e6c1b740c43634c97d5df84b1771a66d61ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dcf6a2f362c138eeda64773965a94b261c63dc8850cd15bd3063f0ad840614d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ce80b2e23b07df75d4d11651c7c819c27ab5673189114aa72da8f28f96e2732" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3ce80b2e23b07df75d4d11651c7c819c27ab5673189114aa72da8f28f96e2732" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3ce80b2e23b07df75d4d11651c7c819c27ab5673189114aa72da8f28f96e2732" + sha256 cellar: :any_skip_relocation, sonoma: "17d638fdf1e6c0b4463f8b7dac5ce5a455a4c170e20e5bb41f9a4541dc47ca27" + sha256 cellar: :any_skip_relocation, ventura: "36e98005281874b8a396b799357be9631e3a698e433fbe26ff4812711ae487a5" + sha256 cellar: :any_skip_relocation, monterey: "36e98005281874b8a396b799357be9631e3a698e433fbe26ff4812711ae487a5" + sha256 cellar: :any_skip_relocation, big_sur: "36e98005281874b8a396b799357be9631e3a698e433fbe26ff4812711ae487a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c9a28b99674fac9469b9e253ad405aa02f0a7e3b5a2a6a3060ef9bc03fda6ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00f801dcd347b92d24d6f2dca281b464e6c627d62003dacf6d74a9595c2c4a0d" + end + + depends_on "bash" + depends_on "dialog" + depends_on "gawk" + + skip_clean "etc/backup.d" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "BASH=#{Formula["bash"].opt_bin}/bash" + system "make", "install", "SED=sed" + end + + def post_install + (var/"log").mkpath + end + + test do + assert_match "root", shell_output("#{sbin}/backupninja -h", 3) + end +end diff --git a/Formula/b/bacon-ls.rb b/Formula/b/bacon-ls.rb new file mode 100644 index 0000000000000..8830ee3d16c04 --- /dev/null +++ b/Formula/b/bacon-ls.rb @@ -0,0 +1,53 @@ +class BaconLs < Formula + desc "Rust diagnostic provider based on Bacon" + homepage "https://github.com/crisidev/bacon-ls" + url "https://github.com/crisidev/bacon-ls/archive/refs/tags/0.23.0.tar.gz" + sha256 "19c85e175f3b8cd7a7ba30ce6270de766f995463dd296a5a98b04fd43bbc1279" + license "MIT" + head "https://github.com/crisidev/bacon-ls.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2eca67dafbfc92a86203b5900704b547f9fe9b2a5bb79313e2bfde170d51b787" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ea32f28e464938d7dd4d9046ac3930b9f988b1d357afe0a1fb6b6cbcd6f89dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e3936974459aa7b60c72843dd0131ecd5d9c35aa7d824a1ff966b2dc9bc0ef4" + sha256 cellar: :any_skip_relocation, sonoma: "ade93b0174b9931c4071dcf9b893c3d9ff441b110e01574b2ac88220e0978436" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ea3ff0cec231a12ad7b73c1d1228fef747afbc37036a1df75559da94ac5a9e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "037eff3fbcdaa390493cb9bea89c0a4ff807b06bfcf04e7a874277793d003988" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + require "open3" + + assert_match version.to_s, shell_output("#{bin}/bacon-ls --version") + + init_json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"bacon-ls") do |stdin, stdout, _| + stdin.write "Content-Length: #{init_json.bytesize}\r\n\r\n#{init_json}" + stdin.close + + assert_match(/^Content-Length: \d+/i, stdout.read) + end + end +end diff --git a/Formula/b/bacon.rb b/Formula/b/bacon.rb new file mode 100644 index 0000000000000..746746a066dbe --- /dev/null +++ b/Formula/b/bacon.rb @@ -0,0 +1,62 @@ +class Bacon < Formula + desc "Background rust code check" + homepage "https://dystroy.org/bacon/" + url "https://github.com/Canop/bacon/archive/refs/tags/v3.19.0.tar.gz" + sha256 "2c49ca02687391d425f2cc9a19cae8227338def2d689d55ff5970cb70fd2b7f6" + license "AGPL-3.0-or-later" + head "https://github.com/Canop/bacon.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10395f25be03ed834ca48c32535a85e459ce531ffe2f9a34a77cf2239ed1af5e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0524ca75127eb97f2983049a9f232ecc70bbb2ac97ef1bf011f2a6b0fa58d5ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f69aa22695b557fd779e9fd15d4b81a03d7b9db884c23f30ae301198259e3b85" + sha256 cellar: :any_skip_relocation, sonoma: "3721d7f2c33acc8b8f63513eb9d04d0d82d00532b264627c8867d2693ec7dece" + sha256 cellar: :any_skip_relocation, arm64_linux: "aeae918c0a5b9ced620ad43aa09fda55cb7b2c6f9c73d9dabb39d308487f8c9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9199143c65a8eb63d7f08bce48ba0499343fd6e349aa1d3a39bef22cd2962ed2" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + on_linux do + depends_on "alsa-lib" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + #[cfg(test)] + mod tests { + #[test] + fn test_it() { + assert_eq!(1 + 1, 2); + } + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + system bin/"bacon", "--init" + assert_match "[jobs.check]", (crate/"bacon.toml").read + end + + output = shell_output("#{bin}/bacon --version") + assert_match version.to_s, output + end +end diff --git a/Formula/b/bacula-fd.rb b/Formula/b/bacula-fd.rb new file mode 100644 index 0000000000000..c7977581cd96f --- /dev/null +++ b/Formula/b/bacula-fd.rb @@ -0,0 +1,74 @@ +class BaculaFd < Formula + desc "Network backup solution" + homepage "https://www.bacula.org/" + url "https://downloads.sourceforge.net/project/bacula/bacula/15.0.3/bacula-15.0.3.tar.gz" + sha256 "294afd3d2eb9d5b71c3d0e88fdf19eb513bfdb843b28d35c0552e4ae062827a1" + license "AGPL-3.0-only" => { with: "openvpn-openssl-exception" } + + livecheck do + url "https://sourceforge.net/projects/bacula/rss?path=/bacula" + regex(%r{url=.*?/bacula(?:(?!/[^/]*beta[^/]*)/[^/]+)*/bacula[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "06814f801d435234eda5bc445d9faa6634fb646fea8fc9b9c801daad7daf564c" + sha256 arm64_sequoia: "63a1ce591508863f9c78b987c14dd6bf168d49349b8479310685cbb442cd122d" + sha256 arm64_sonoma: "b41791686a3499085b3522f3c4a0fa7ac85cd7a404e9c9cafda74ce0dfba6c43" + sha256 arm64_ventura: "41e90a2019cdb02163dd8ff8044117f16960eda69ccd8fa8811c9ab3e6a9bfd7" + sha256 sonoma: "ab5d9db5f59ce74e1c8a1a33413e4aa8e26a7ff5237e2bc86038b1f41fb08ada" + sha256 ventura: "42c3f2e6d299ef9e9bf8f28d8b1111e446bfbed29f538a50237d340f509acf29" + sha256 arm64_linux: "c85f6c053e80dae666859a88d5250366c368a235af84a7414b7d3e08981043d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebf5f15762df9a4ef212ff679a0973851ae21ab9faa251e2944e4e687b4b73e1" + end + + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "zlib" + + conflicts_with "bareos-client", because: "both install a `bconsole` executable" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # CoreFoundation is also used alongside IOKit + inreplace "configure", '"-framework IOKit"', + '"-framework IOKit -framework CoreFoundation"' + + # * sets --disable-conio in order to force the use of readline + # (conio support not tested) + # * working directory in /var/lib/bacula, reasonable place that + # matches Debian's location. + system "./configure", "--prefix=#{prefix}", + "--sbindir=#{bin}", + "--with-working-dir=#{var}/lib/bacula", + "--with-pid-dir=#{var}/run", + "--with-logdir=#{var}/log/bacula", + "--enable-client-only", + "--disable-conio", + "--with-readline=#{Formula["readline"].opt_prefix}" + + system "make" + system "make", "install" + + # Avoid references to the Homebrew shims directory + inreplace prefix/"etc/bacula_config", "#{Superenv.shims_path}/", "" + + (var/"lib/bacula").mkpath + (var/"run").mkpath + end + + service do + run [opt_bin/"bacula-fd", "-f"] + require_root true + end + + test do + assert_match version.to_s, shell_output("#{bin}/bacula-fd -? 2>&1", 1) + end +end diff --git a/Formula/b/badkeys.rb b/Formula/b/badkeys.rb new file mode 100644 index 0000000000000..48aac051d5916 --- /dev/null +++ b/Formula/b/badkeys.rb @@ -0,0 +1,57 @@ +class Badkeys < Formula + include Language::Python::Virtualenv + + desc "Tool to find common vulnerabilities in cryptographic public keys" + homepage "https://badkeys.info" + url "https://files.pythonhosted.org/packages/55/db/bc7583f7f0ed8effe33c20c0f4190b7167ae25a81641d8670a9e3ecb7adc/badkeys-0.0.14.tar.gz" + sha256 "5eec8c646e90e1f8f64115ee9ea120d6886a231aae7d619017506f8cc630f48d" + license "MIT" + head "https://github.com/badkeys/badkeys.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "9806b5e535be6712262a43feb4ebad23615bf12bc632df45dce500f555882a1e" + sha256 cellar: :any, arm64_sequoia: "39dfa6f5a1988016755b1bd5a07b58114190a5ff2867de0c702c22d9102be87d" + sha256 cellar: :any, arm64_sonoma: "5d5496ecc3f90a28df364be7643446a5281228fc009e0ef090588221e89e040f" + sha256 cellar: :any, sonoma: "1a70e69b84522bac473855776f8b8362b8578128330ddac987f09ae593374cc6" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1302b0437d907419f57f5164792750ebc2245ac373672803d9da9dd136532a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2bd97a3fd9c0cb48b4e9d2079f98d715b386a5688fd1455e7db2e8e9a4a5178d" + end + + depends_on "cryptography" + depends_on "gmp" + depends_on "libmpc" + depends_on "mpfr" + depends_on "python@3.14" + + pypi_packages exclude_packages: "cryptography" + + resource "gmpy2" do + url "https://files.pythonhosted.org/packages/07/bd/c6c154ce734a3e6187871b323297d8e5f3bdf9feaafc5212381538bc19e4/gmpy2-2.2.1.tar.gz" + sha256 "e83e07567441b78cb87544910cb3cc4fe94e7da987e93ef7622e76fb96650432" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/badkeys --update-bl") + assert_match "Writing new badkeysdata.json...", output + + # taken from https://raw.githubusercontent.com/badkeys/badkeys/main/tests/data/rsa-debianweak.key + (testpath/"rsa-debianweak.key").write <<~EOS + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAwJZTDExKND/DiP+LbhTIi2F0hZZt0PdX897LLwPf3+b1GOCUj1OH + BZvVqhJPJtOPE53W68I0NgVhaJdY6bFOA/cUUIFnN0y/ZOJOJsPNle1aXQTjxAS+ + FXu4CQ6a2pzcU+9+gGwed7XxAkIVCiTprfmRCI2vIKdb61S8kf5D3YdVRH/Tq977 + nxyYeosEGYJFBOIT+N0mqca37S8hA9hCJyD3p0AM40dD5M5ARAxpAT7+oqOXkPzf + zLtCTaHYJK3+WAce121Br4NuQJPqYPVxniUPohT4YxFTqB7vwX2C4/gZ2ldpHtlg + JVAHT96nOsnlz+EPa5GtwxtALD43CwOlWQIDAQAB + -----END RSA PUBLIC KEY----- + EOS + + output = shell_output("#{bin}/badkeys #{testpath}/rsa-debianweak.key") + assert_match "blocklist/debianssl vulnerability, rsa[2048], #{testpath}/rsa-debianweak.key", output + end +end diff --git a/Formula/b/badread.rb b/Formula/b/badread.rb new file mode 100644 index 0000000000000..22e1f9b3edeb8 --- /dev/null +++ b/Formula/b/badread.rb @@ -0,0 +1,41 @@ +class Badread < Formula + include Language::Python::Virtualenv + + desc "Long read simulator that can imitate many types of read problems" + homepage "https://github.com/rrwick/Badread" + url "https://github.com/rrwick/Badread/archive/refs/tags/v0.4.1.tar.gz" + sha256 "236dee5ac99b8d0c1997c482df5b805908b0c34f75277ef706e897af71db1f9a" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb61116ebca8bec9b22139071f9845635e88840e9911141661bd731c150e8027" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f79260fe61facfce61ea9af35c21fcf5398a5e372193dbaa800cb2a755d3502" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cef938bdf102e7b9c6b4aa11a50cffdfc572044de21a54b7fbac677d9718adcc" + sha256 cellar: :any_skip_relocation, sonoma: "fb8cca5eec6cb16e79912f2ac38c4721461dd8e6278be9517fb9001311c33d7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff8895a97c93ecbf53bf382cb0d77e6b588e559beb05332da4877fb032c99916" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9677618080b71fbe762f03a62173688539a4a56166f2f5b549e13a7aeffd586" + end + + depends_on "numpy" + depends_on "python@3.14" + depends_on "scipy" => :no_linkage + + pypi_packages exclude_packages: ["numpy", "scipy"] + + resource "edlib" do + url "https://files.pythonhosted.org/packages/0c/dd/caa71ef15b46375e01581812e52ec8e3f4da0686f370e8b9179eb5f748fb/edlib-1.3.9.post1.tar.gz" + sha256 "b0fb6e85882cab02208ccd6daa46f80cb9ff1d05764e91bf22920a01d7a6fbfa" + end + + def install + virtualenv_install_with_resources + pkgshare.install "test" + end + + test do + cp pkgshare/"test/test_ref_2.fasta", testpath + output = shell_output("#{bin}/badread simulate --reference test_ref_2.fasta --quantity 1x") + assert_match "error-free_length", output + end +end diff --git a/Formula/b/bagels.rb b/Formula/b/bagels.rb new file mode 100644 index 0000000000000..b529f6575ee33 --- /dev/null +++ b/Formula/b/bagels.rb @@ -0,0 +1,242 @@ +class Bagels < Formula + include Language::Python::Virtualenv + + desc "Powerful expense tracker that lives in your terminal" + homepage "https://github.com/EnhancedJax/Bagels" + url "https://files.pythonhosted.org/packages/6e/04/e19a99e357221cb41e1e2f0352172e282ac8195fa2418b776345497fb260/bagels-0.3.12.tar.gz" + sha256 "c3ebd4a727ddd62450528676a1ce3e475f92bd36edfed5f9c0b110bb24592608" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "b455dd12c64b48e4eb573e89bd0181af97388a7d03fcdaa9f6464999d070cabf" + sha256 cellar: :any, arm64_sequoia: "d1c31a29395253037c6375e532d0d84e0157f8e44ee4ec6d45ccf812a45eff9a" + sha256 cellar: :any, arm64_sonoma: "67ff66282087b0bea17c19039800ea3aaec73d938068ae8a49a201a8b634e920" + sha256 cellar: :any, sonoma: "e644c157b42527a376054f40ef0a35f592d41bbbb5470344398ac0e9b9f8a7a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "835585d75ffad9a40f280ae72a4246972f13307b7190eb0a3550047f997a95e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "242efb4f1512a3b300fe9e643fa91ea09befa2a62702776e7bf95048756394ac" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "numpy" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "numpy", "pydantic-core"] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/ba/fa/3ae643cd525cf6844d3dc810481e5748107368eb49563c15a5fb9f680750/aiohttp-3.13.1.tar.gz" + sha256 "4b7ee9c355015813a6aa085170b96ec22315dabc3d866fd77d147927000e9464" + end + + resource "aiohttp-jinja2" do + url "https://files.pythonhosted.org/packages/e6/39/da5a94dd89b1af7241fb7fc99ae4e73505b5f898b540b6aba6dc7afe600e/aiohttp-jinja2-1.6.tar.gz" + sha256 "a3a7ff5264e5bca52e8ae547bbfd0761b72495230d438d05b6c0915be619b0e2" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/48/c8/6260f8ccc11f0917360fc0da435c5c9c7504e3db174d5a12a1494887b045/attrs-24.3.0.tar.gz" + sha256 "8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "plotext" do + url "https://files.pythonhosted.org/packages/c9/d7/f75f397af966fe252d0d34ffd3cae765317fce2134f925f95e7d6725d1ce/plotext-5.3.2.tar.gz" + sha256 "52d1e932e67c177bf357a3f0fe6ce14d1a96f7f7d5679d7b455b929df517068e" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sqlalchemy" do + url "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz" + sha256 "0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/1f/b6/59b1de04bb4dca0f21ed7ba0b19309ed7f3f5de4396edf20cc2855e53085/textual-1.0.0.tar.gz" + sha256 "bec9fe63547c1c552569d1b75d309038b7d456c03f86dfa3706ddb099b151399" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz" + sha256 "64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "xdg-base-dirs" do + url "https://files.pythonhosted.org/packages/bf/d0/bbe05a15347538aaf9fa5b51ac3b97075dfb834931fcb77d81fbdb69e8f6/xdg_base_dirs-6.0.2.tar.gz" + sha256 "950504e14d27cf3c9cb37744680a43bf0ac42efefc4ef4acf98dc736cab2bced" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/bagels locate config") + assert_match "#{testpath}/.config/bagels/config.yaml", output + end +end diff --git a/Formula/b/bagit.rb b/Formula/b/bagit.rb new file mode 100644 index 0000000000000..8c4807c97d003 --- /dev/null +++ b/Formula/b/bagit.rb @@ -0,0 +1,32 @@ +class Bagit < Formula + include Language::Python::Virtualenv + + desc "Library for creation, manipulation, and validation of bags" + homepage "https://libraryofcongress.github.io/bagit-python/" + url "https://files.pythonhosted.org/packages/a1/a0/8866b4c6f894af0eb10e4964157f3241dd4117700fc010e7825471d51a13/bagit-1.9.0.tar.gz" + sha256 "9455006c2d1df88be95ec1fccabc5ea623389589ea4c85b3d85bd256f29d7656" + license "CC0-1.0" + version_scheme 1 + head "https://github.com/LibraryOfCongress/bagit-python.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cd75590862c752f2d6fa722470125ef7eb0c50bcace9dff268adfa600a71123d" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + system bin/"bagit.py", "--source-organization", "Library of Congress", testpath.to_s + assert_path_exists testpath/"bag-info.txt" + assert_path_exists testpath/"bagit.txt" + assert_match "Bag-Software-Agent: bagit.py", File.read("bag-info.txt") + assert_match "BagIt-Version: 0.97", File.read("bagit.txt") + + assert_match version.to_s, shell_output("#{bin}/bagit.py --version") + end +end diff --git a/Formula/b/baidupcs-go.rb b/Formula/b/baidupcs-go.rb new file mode 100644 index 0000000000000..dbdb9810a3e5a --- /dev/null +++ b/Formula/b/baidupcs-go.rb @@ -0,0 +1,33 @@ +class BaidupcsGo < Formula + desc "Terminal utility for Baidu Network Disk" + homepage "https://github.com/qjfoidnh/BaiduPCS-Go" + url "https://github.com/qjfoidnh/BaiduPCS-Go/archive/refs/tags/v4.0.0.tar.gz" + sha256 "4721b51aab77adfaea83a3491b52af7b1865403292c14774b3aaf4377de7cdab" + license "Apache-2.0" + head "https://github.com/qjfoidnh/BaiduPCS-Go.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cd8b06861d6b86f64bf1eb47b3f8628a9879c4be2ccf3ed772157fce171e91ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd8b06861d6b86f64bf1eb47b3f8628a9879c4be2ccf3ed772157fce171e91ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd8b06861d6b86f64bf1eb47b3f8628a9879c4be2ccf3ed772157fce171e91ac" + sha256 cellar: :any_skip_relocation, sonoma: "a64772100fb125322e607ce829505af09a2a4bf5be544930cf29987cafd74e1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0099d6d6aa2bb74dec1f372df837c7df08aee9cd9cd2dc0f2f0b0db9bc51b41f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "364e12c208ebd9a3f6a9cc340029b2df203612340e5f84be46556b7f72661745" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"baidupcs-go", "run", "touch", "test.txt" + assert_path_exists testpath/"test.txt" + end +end diff --git a/Formula/b/balena-cli.rb b/Formula/b/balena-cli.rb new file mode 100644 index 0000000000000..c4113b5b53aa9 --- /dev/null +++ b/Formula/b/balena-cli.rb @@ -0,0 +1,63 @@ +class BalenaCli < Formula + desc "Command-line tool for interacting with the balenaCloud and balena API" + homepage "https://docs.balena.io/reference/balena-cli/latest/" + url "https://registry.npmjs.org/balena-cli/-/balena-cli-22.4.16.tgz" + sha256 "f8b90fb573fc703c0c75afea651538468e2edf4f079616591e6439f0ed4ac36a" + license "Apache-2.0" + + livecheck do + url "https://registry.npmjs.org/balena-cli/latest" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 arm64_tahoe: "1d16f271c210eaf0ad8523c00f0122768b56e83323c31c5993113bb415e7f363" + sha256 arm64_sequoia: "762351dda4f43909dce4c0fe6769127b18a177185540d539542931c1b6463cf1" + sha256 arm64_sonoma: "28117933383b88cdd52193992513d780f90cf0aa88bf508e3162d9177954ef5a" + sha256 sonoma: "e7a8f70df1b28960c7b3409738ce8a4fa75a80943b7119fde4ebcdab957922cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bc2a9ae6a96a6ab84412312bc04ae335879aecccde317fafc92978b1ad2f257" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bf0445164495b2a285830b4a3f3bc954c8aaae359ec5ffddf21df7c3b756fa2" + end + + # align with upstream, https://github.com/balena-io/balena-cli/blob/master/.github/actions/publish/action.yml#L21 + depends_on "node@22" + + on_linux do + depends_on "libusb" + depends_on "systemd" # for libudev + depends_on "xz" # for liblzma + end + + def install + ENV.deparallelize + + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/balena-cli/node_modules" + node_modules.glob("{bcrypt,lzma-native,mountutils}/prebuilds/*") + .each do |dir| + if dir.basename.to_s == "#{os}-#{arch}" + dir.glob("*.musl.node").each(&:unlink) if OS.linux? + else + rm_r(dir) + end + end + + rm_r(node_modules/"lzma-native/build") + rm_r(node_modules/"usb") if OS.linux? + + # Replace universal binaries with native slices + deuniversalize_machos + end + + test do + assert_match "Logging in to balena-cloud.com", + shell_output("#{bin}/balena login --credentials --email johndoe@gmail.com --password secret 2>/dev/null", 1) + end +end diff --git a/Formula/b/ballerburg.rb b/Formula/b/ballerburg.rb new file mode 100644 index 0000000000000..f5cd2360cbd51 --- /dev/null +++ b/Formula/b/ballerburg.rb @@ -0,0 +1,28 @@ +class Ballerburg < Formula + desc "Castle combat game" + homepage "https://baller.frama.io/" + url "https://framagit.org/baller/ballerburg/-/archive/v1.2.3/ballerburg-v1.2.3.tar.bz2" + sha256 "2e55087c70e10a827a270493732d3928f8fb0abb6b583661f80cbbe1efac80f7" + license "GPL-3.0-or-later" + head "https://framagit.org/baller/ballerburg.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cccde44114f408fbef049352adf60ffd2bfcdca158cde6b665cbbf03801daaa6" + sha256 cellar: :any, arm64_sequoia: "dd778359cebe62952c33d6a2e5c2274f7e4784ccc9f02dd86ca15bb783487608" + sha256 cellar: :any, arm64_sonoma: "bf505c27f0af03d53a92ef5816d66ccaf2843ef65cfb59aec887a5ec0c1f7a57" + sha256 cellar: :any, arm64_ventura: "1c01a6a26ad1acfef28ad833391a9d004a2a70d8d97e6e5a475f26210c2bf43c" + sha256 cellar: :any, sonoma: "29c01bc593a8279839cee765f58ec00e8e7e52486099f8309b97b5f493e45e11" + sha256 cellar: :any, ventura: "ee583b89ffe454e9c550860d852333d5f91c23155c426c384727dfd1f689a0fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a7a8a678f0f6cdaf859468a93da5ef49d5a1aa095fbec77e7d1bf5184163dd3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1aa85f3ee1fc21cda5916659e10333c563cd918356d3eca5016847a48ff03e57" + end + + depends_on "cmake" => :build + depends_on "sdl2" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end +end diff --git a/Formula/b/ballerina.rb b/Formula/b/ballerina.rb new file mode 100644 index 0000000000000..cbc5569136214 --- /dev/null +++ b/Formula/b/ballerina.rb @@ -0,0 +1,47 @@ +class Ballerina < Formula + desc "Programming Language for Network Distributed Applications" + homepage "https://ballerina.io" + url "https://dist.ballerina.io/downloads/2201.12.10/ballerina-2201.12.10-swan-lake.zip" + sha256 "cfc31a44f213c51584a968e85a829adb02cf6787e16770599106d01b20333099" + license "Apache-2.0" + + # The Downloads and Installation Options pages don't include any version + # information or download links in the HTML. This information is instead + # found in page-specific JavaScript files but those use a unique cache-busting + # hash in the file name. In this scenario, we would have to fetch the page, + # find the JS file name in the HTML, and fetch the JS file to identify the + # version. To avoid that setup, we identify the version information from the + # release notes URL on the Downloads page (though it's a less ideal check). + livecheck do + url "https://ballerina.io/downloads/" + regex(%r{href=.*?release-notes/[^/]*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "58a19cb2d9d0dc4ce71aca1e4dbf4b789be2e3ef5dd043d1b1ec78cfe207221d" + end + + depends_on "openjdk" + + def install + # Remove Windows files + rm Dir["bin/*.bat"] + + chmod 0755, "bin/bal" + + bin.install "bin/bal" + libexec.install Dir["*"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + (testpath/"helloWorld.bal").write <<~EOS + import ballerina/io; + public function main() { + io:println("Hello, World!"); + } + EOS + output = shell_output("#{bin}/bal run helloWorld.bal") + assert_equal "Hello, World!", output.chomp + end +end diff --git a/Formula/b/bam.rb b/Formula/b/bam.rb new file mode 100644 index 0000000000000..12db7ca871a27 --- /dev/null +++ b/Formula/b/bam.rb @@ -0,0 +1,50 @@ +class Bam < Formula + desc "Build system that uses Lua to describe the build process" + homepage "https://matricks.github.io/bam/" + url "https://github.com/matricks/bam/archive/refs/tags/v0.5.1.tar.gz" + sha256 "cc8596af3325ecb18ebd6ec2baee550e82cb7b2da19588f3f843b02e943a15a9" + license "Zlib" + head "https://github.com/matricks/bam.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4b8de9dd63dfda7b5b54d80b09458897660a18f8bc7e81ccf5fcf10e30890f69" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "adebb626ddcef7b484f65ffa378f7b8301106618b360871f442da91f2944a410" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f96e777038d7de85e3cc3d52b30692f7980c1da78c82fa19447a1c0610c3e46" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8e89910d5b1ebfbf030acf7e764ed714826bf7920f0dd5fe755861cee969784" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ee7ac2a67e4d72ef0cea6c7c34afa9284bcba629991e8ec38ca185c2f470a472" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6c0a42f9cf83eabac04cd67c5441590f3fea48f7dd9aacd1a7fef524b4a40cf9" + sha256 cellar: :any_skip_relocation, sonoma: "a02a2877930db310c3de63b2a8fa34892ed25ca66030f90ef5db29c0169923ca" + sha256 cellar: :any_skip_relocation, ventura: "75d5f23cc6cfc164c893479517a3cfbdcae7f08ccade50ab8408a83cd5939e54" + sha256 cellar: :any_skip_relocation, monterey: "be83765718e57f62d746cd72d15451e4074bd34aa334f235dd0aeefbb760ba13" + sha256 cellar: :any_skip_relocation, big_sur: "0bd9f6ad25f64fc5282dd4facfea787bbca5855eb855c12eebb12cb60d82261b" + sha256 cellar: :any_skip_relocation, catalina: "de24826592ac3d7a97f2ea0372d6a002e67e39bc1f10dc5d2e54563f84953690" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8b66adf43d301d47e35cb5b45bf01bed4923f7eaf7496d08ded5d2bf70b2b64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1220e1a71792eacface17e8168d217ca657aeecf3b30a672a0815375536e2d1d" + end + + def install + system "./make_unix.sh" + bin.install "bam" + end + + test do + (testpath/"hello.c").write <<~C + #include + int main() { + printf("hello\\n"); + return 0; + } + C + + (testpath/"bam.lua").write <<~LUA + settings = NewSettings() + objs = Compile(settings, Collect("*.c")) + exe = Link(settings, "hello", objs) + LUA + + system bin/"bam", "-v" + assert_equal "hello", shell_output("./hello").chomp + end +end diff --git a/Formula/b/bamtools.rb b/Formula/b/bamtools.rb new file mode 100644 index 0000000000000..83f2828d23ed3 --- /dev/null +++ b/Formula/b/bamtools.rb @@ -0,0 +1,57 @@ +class Bamtools < Formula + desc "C++ API and command-line toolkit for BAM data" + homepage "https://github.com/pezmaster31/bamtools" + url "https://github.com/pezmaster31/bamtools/archive/refs/tags/v2.5.3.tar.gz" + sha256 "7d4e59bac7c03bde488fe43e533692f78b5325a097328785ec31373ffac08344" + license "MIT" + head "https://github.com/pezmaster31/bamtools.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "de2b4d556e28fa243f1ffed7caa5a587d02a6ea23bfd11e9b977d6c4808c57d2" + sha256 cellar: :any, arm64_sequoia: "3373086bf64dc373555ebe29e0d83b7717e9753c2568f6e28aa1bda00f03c8cc" + sha256 cellar: :any, arm64_sonoma: "1bb2f639770d64612d2a90faf8409396a4ca9c8d07ac57c49ea34605110cb8e9" + sha256 cellar: :any, arm64_ventura: "f3ba5ba2ba5277012456cfbcfb26c4dbd7a1a5c7d5eb59034ff0ec3d10b08409" + sha256 cellar: :any, sonoma: "d47d47a532624911149aeed6ce5f3774d040bc589c188f8699f43025920ac3d6" + sha256 cellar: :any, ventura: "1b1ed182544cc5cb37a5706c1246f4bf0df3f14bf199ebc2c46c60e55e40f7a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc7464d2e563ff3573d4d1754e543ce554efc1af87cd361301e65b7ca0d3b0ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1338babe6eccee20e6d23f405db8267025fe19f221e0ddd9d7cb2cd02654c48" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jsoncpp" + + uses_from_macos "zlib" + + def install + # Delete bundled jsoncpp to avoid fallback + rm_r(buildpath/"src/third_party/jsoncpp") + + # Build shared library + system "cmake", "-S", ".", "-B", "build_shared", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + # Build static library + system "cmake", "-S", ".", "-B", "build_static", *std_cmake_args + system "cmake", "--build", "build_static" + lib.install "build_static/src/libbamtools.a" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "api/BamWriter.h" + using namespace BamTools; + int main() { + BamWriter writer; + writer.Close(); + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}/bamtools", "-L#{lib}", + "-lbamtools", "-lz", "-o", "test" + system "./test" + end +end diff --git a/Formula/b/bandcamp-dl.rb b/Formula/b/bandcamp-dl.rb new file mode 100644 index 0000000000000..186a858622cef --- /dev/null +++ b/Formula/b/bandcamp-dl.rb @@ -0,0 +1,91 @@ +class BandcampDl < Formula + include Language::Python::Virtualenv + + desc "Simple python script to download Bandcamp albums" + homepage "https://github.com/evolution0/bandcamp-dl" + url "https://files.pythonhosted.org/packages/78/c2/2c11878a494ceef38ed5ac51dede216547cb14ef40a30f8f009fca0ceab6/bandcamp_downloader-0.0.17.tar.gz" + sha256 "d5e47777d0b1a14e49ba72d78ffa9b150e72af51d28e981231a0bd32c1c2e159" + license "Unlicense" + revision 2 + head "https://github.com/evolution0/bandcamp-dl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4d7a02493e7d856497e73b9b7051206046438f72f93c0c26c5905e1b5095335e" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "demjson3" do + url "https://files.pythonhosted.org/packages/f7/d2/6a81a9b5311d50542e11218b470dafd8adbaf1b3e51fc1fddd8a57eed691/demjson3-3.0.6.tar.gz" + sha256 "37c83b0c6eb08d25defc88df0a2a4875d58a7809a9650bd6eee7afd8053cdbac" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "unicode-slugify" do + url "https://files.pythonhosted.org/packages/ed/37/c82a28893c7bfd881c011cbebf777d2a61f129409d83775f835f70e02c20/unicode-slugify-0.1.5.tar.gz" + sha256 "25f424258317e4cb41093e2953374b3af1f23097297664731cdb3ae46f6bd6c3" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/".config").mkpath + system bin/"bandcamp-dl", "https://iamsleepless.bandcamp.com/track/under-the-glass-dome" + assert_path_exists testpath/"iamsleepless/under-the-glass-dome/Single - under-the-glass-dome.mp3" + end +end diff --git a/Formula/b/bandicoot.rb b/Formula/b/bandicoot.rb new file mode 100644 index 0000000000000..4fa25644016c6 --- /dev/null +++ b/Formula/b/bandicoot.rb @@ -0,0 +1,56 @@ +class Bandicoot < Formula + desc "C++ library for GPU accelerated linear algebra" + homepage "https://coot.sourceforge.io/" + url "https://gitlab.com/bandicoot-lib/bandicoot-code/-/archive/2.1.1/bandicoot-code-2.1.1.tar.bz2" + sha256 "128a02062426fbb88aaf6a00af227ee9d40e083e4c78fa560498ff06ae381544" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "81c3b86a21a4c27b55e42edd737234099d598a112cd5f839a41af3095e404960" + sha256 cellar: :any, arm64_sequoia: "9eca2fb6a06c29cebd5fd25ddf5878ae34d88d5b923fa1fed5aed1a9e0773c98" + sha256 cellar: :any, arm64_sonoma: "b55ec22827391201012634b5ae8e634c8e78cd254c15230b697ea3374cf46bb5" + sha256 cellar: :any, arm64_ventura: "9831c4eea08c9dc12470f68591f42f310998b6ee4ab5d362be142cb3e7514c7e" + sha256 cellar: :any, sonoma: "2ab39c81ba1c29f3cbc6ece50efecba6235c8f6d1f8c888e2aad80f25e3890b7" + sha256 cellar: :any, ventura: "b2c5cf47375d80f86139639924fa492acdcb7768f1e7f8b33b0f8cdce219834f" + sha256 cellar: :any_skip_relocation, arm64_linux: "757d99751200c72d5b79d7f90be7e0faed3a23501f62af28156c9c66512d94d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "252019c9e01386f84034a00808cd5c9cd7c03c24d26818b855ee1ad85452c10e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "clblas" + depends_on "openblas" + + # Ensure CL components are present on Linux + on_linux do + depends_on "opencl-headers" => [:build, :test] + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + def install + args = [] + # Enable the detection of OpenBLAS on macOS. Avoid specifying detection for linux + args += ["-DALLOW_OPENBLAS_MACOS=ON", "-DALLOW_BLAS_LAPACK_MACOS=ON"] if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Create a test script that compiles a program + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(int argc, char** argv) { + std::cout << coot::coot_version::as_string() << std::endl; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}", "-L#{lib}", "-lbandicoot", "-o", "test" + + # Check that the coot version matches with the formula version + assert_equal version.to_s.to_i, shell_output("./test").to_i + end +end diff --git a/Formula/b/bandit.rb b/Formula/b/bandit.rb new file mode 100644 index 0000000000000..41374e1508752 --- /dev/null +++ b/Formula/b/bandit.rb @@ -0,0 +1,63 @@ +class Bandit < Formula + include Language::Python::Virtualenv + + desc "Security-oriented static analyser for Python code" + homepage "https://github.com/PyCQA/bandit" + url "https://files.pythonhosted.org/packages/fb/b5/7eb834e213d6f73aace21938e5e90425c92e5f42abafaf8a6d5d21beed51/bandit-1.8.6.tar.gz" + sha256 "dbfe9c25fc6961c2078593de55fd19f2559f9e45b99f1272341f5b95dea4e56b" + license "Apache-2.0" + head "https://github.com/PyCQA/bandit.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ef5c4732e7adcac576f695ebeec098d8868cd5d948b79090d0a1ba481b0b9b74" + sha256 cellar: :any, arm64_sequoia: "24af38a92df7381746b2621706fc28181c505cb50305c82a1bb28e5a643fa279" + sha256 cellar: :any, arm64_sonoma: "ef0d63ce2a5a05d7ea9c675eff0ad7fbc0547f21ff5e2cafb52cc75bd2a570f4" + sha256 cellar: :any, sonoma: "c3f8a60a0aee4d8c6da4e4f7e0a62b48d9acb8a8851a51c3da769a8a2be33d59" + sha256 cellar: :any_skip_relocation, arm64_linux: "167da002a52b508e69a7516adffb1600504961adee462771322fac8d844df95d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d8f41c6895a95989db6e060a25c3340eea577b5224c004e099fe5cb37576b9b" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.py").write "assert True\n" + output = JSON.parse shell_output("#{bin}/bandit -q -f json test.py", 1) + assert_equal output["results"][0]["test_id"], "B101" + end +end diff --git a/Formula/b/bandwhich.rb b/Formula/b/bandwhich.rb new file mode 100644 index 0000000000000..581c207ca1412 --- /dev/null +++ b/Formula/b/bandwhich.rb @@ -0,0 +1,37 @@ +class Bandwhich < Formula + desc "Terminal bandwidth utilization tool" + homepage "https://github.com/imsnif/bandwhich" + url "https://github.com/imsnif/bandwhich/archive/refs/tags/v0.23.1.tar.gz" + sha256 "aafb96d059cf9734da915dca4f5940c319d2e6b54e2ffb884332e9f5e820e6d7" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ceb7beda5d377f5fb16336a194d7aca4fe90fc7efa0acd996bc597ce55684da8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c15e7fef87ef65a7978559fbae64620eeb81447c7d36b75f61d7b38b7550d6f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7979b9c76cfc69fdc8a04c9d73d3e2eb971f80d97a2b001c0070dbd3b7f35a25" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b3d6ba9e64f04836694b7fdc561898f574acdc7a9a16748c9cc7e3a55837779" + sha256 cellar: :any_skip_relocation, sonoma: "20cc25bd2086b5641e01ddab375f3c1011f53ca385cb19f8cfb4b46a46e5b878" + sha256 cellar: :any_skip_relocation, ventura: "960376206b857195c7d7c4640719b3e242fe1c06728eeb46ec441d517706fa7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8b780c7481b3b9c4e70cab919adb4d3e8784d03f1c8e0e9ba38d08d764012f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f381d378861391d73194970be1237864d4ef6acb6d508db75502da5981647d7" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + out_dir = Dir["target/release/build/bandwhich-*/out"].first + bash_completion.install "#{out_dir}/bandwhich.bash" => "bandwhich" + fish_completion.install "#{out_dir}/bandwhich.fish" + zsh_completion.install "#{out_dir}/_bandwhich" + + man1.install "#{out_dir}/bandwhich.1" + end + + test do + output = shell_output "#{bin}/bandwhich --interface bandwhich", 1 + assert_match output, "Error: Cannot find interface bandwhich" + end +end diff --git a/Formula/b/bao.rb b/Formula/b/bao.rb new file mode 100644 index 0000000000000..64cf2354c8a94 --- /dev/null +++ b/Formula/b/bao.rb @@ -0,0 +1,36 @@ +class Bao < Formula + desc "Implementation of BLAKE3 verified streaming" + homepage "https://github.com/oconnor663/bao" + url "https://github.com/oconnor663/bao/archive/refs/tags/0.13.1.tar.gz" + sha256 "34cdbc1bc30ce41394ffd52e8a29ab4e5956ecabd7c4db26ffd992d306a59d96" + license any_of: ["Apache-2.0", "CC0-1.0"] + head "https://github.com/oconnor663/bao.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9825859095cd723bb032520fe1548c694f4a413a42e874525c7dd5e16d0340f7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e72ccd2883d2cca743e0436eae25cee929d330d0238df74a7bfa1a48d48cf9ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ee092a0750ef69e210081b7bb3d1143365755d330711ce42bfa9ce2c4774b98" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b7ca0bd24b20763777ef735beabb064f068174b3f4ac3c76b86d33834cc37ed" + sha256 cellar: :any_skip_relocation, sonoma: "3f56a2a03eb3c7c5087b44266136a6f90f868f1f312731811fcb2866d421113e" + sha256 cellar: :any_skip_relocation, ventura: "c1be9491ec695e53a1e9d94391081618451b25f6da26bea453faf7791cc34e48" + sha256 cellar: :any_skip_relocation, arm64_linux: "e61983b766ac21aadef6a9afa6d4bea203c87dea271b180be9a2fe9554e81bd2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02ccf54ad8acabb8b7504b3b9e6ba699a50f96cd487f89a2859ba565b6476de2" + end + + depends_on "rust" => :build + + conflicts_with "openbao", because: "both install `bao` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "bao_bin") + end + + test do + test_file = testpath/"test" + test_file.write "foo" + output = shell_output("#{bin}/bao hash #{test_file}") + assert_match "04e0bb39f30b1a3feb89f536c93be15055482df748674b00d26e5a75777702e9", output + + assert_match version.to_s, shell_output("#{bin}/bao --version") + end +end diff --git a/Formula/b/baobab.rb b/Formula/b/baobab.rb new file mode 100644 index 0000000000000..c278ffc4b9eec --- /dev/null +++ b/Formula/b/baobab.rb @@ -0,0 +1,61 @@ +class Baobab < Formula + desc "Gnome disk usage analyzer" + homepage "https://apps.gnome.org/Baobab/" + url "https://download.gnome.org/sources/baobab/49/baobab-49.0.tar.xz" + sha256 "195c0182dc4d7f694dd0b4ee36e72e0f4ab757825fc238233409eec2df483fae" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "0febae35c1f687555a62c18786f78761b8f40e7287b9b6bf0168530a3ec5f8c0" + sha256 arm64_sequoia: "b5af8085b2a36d02d8587f1b90116eb9b2d5ad3a2982ee33b9d91576be52d27f" + sha256 arm64_sonoma: "8b2d77a4774f245504c6a7a7a8d321b802ad66a1cfd7c33845f2ae6412e0e3cb" + sha256 arm64_ventura: "f697e53a272f314f50ddb0afe4d4fe03d7fa49ee10daa1111128a8e1809979f4" + sha256 sonoma: "f2ef838e9a6796ed2871257c533ff2a12add44a97cb81ad3aef99980d2c563f9" + sha256 ventura: "41a620af55c2d4e008486e7bb63c26dc589c20ad67f0589aba52b115300b85b0" + sha256 arm64_linux: "42a76e3bb4163c7e6f35936ee60520b04b2de06eca9658e000073821a1026abe" + sha256 x86_64_linux: "d88be91ce42ac7d800449d863d94e32f97ad3ce469b5a9a401d10e37b3b1a114" + end + + depends_on "desktop-file-utils" => :build + depends_on "gettext" => :build + depends_on "itstool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build + + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "glib" + depends_on "graphene" + depends_on "gtk4" + depends_on "hicolor-icon-theme" + depends_on "libadwaita" + depends_on "pango" + + on_macos do + depends_on "gettext" + end + + def install + # Work-around for build issue with Xcode 15.3 + # upstream bug report, https://gitlab.gnome.org/GNOME/baobab/-/issues/122 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + # stop meson_post_install.py from doing what needs to be done in the post_install step + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + system "#{Formula["gtk4"].opt_bin}/gtk4-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + + test do + assert_match version.to_s, shell_output("#{bin}/baobab --version") + end +end diff --git a/Formula/b/bar.rb b/Formula/b/bar.rb new file mode 100644 index 0000000000000..f115935f8031c --- /dev/null +++ b/Formula/b/bar.rb @@ -0,0 +1,29 @@ +class Bar < Formula + desc "Provide progress bars for shell scripts" + homepage "http://www.theiling.de/projects/bar.html" + url "http://www.theiling.de/downloads/bar-1.4-src.tar.bz2" + sha256 "8034c405b6aa0d474c75ef9356cde1672b8b81834edc7bd94fc91e8ae097033e" + license "Zlib" + + livecheck do + url :homepage + regex(/href=.*?bar[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fa55cacca64ca91bdb24888d6ad36cff103aac0a461a8d2f32ae5b6e69d47980" + end + + def install + bin.install "bar" + end + + test do + (testpath/"test1").write "pumpkin" + (testpath/"test2").write "latte" + assert_match "latte", shell_output("#{bin}/bar test1 test2") + end +end diff --git a/Formula/b/bareos-client.rb b/Formula/b/bareos-client.rb new file mode 100644 index 0000000000000..83df4b338a96c --- /dev/null +++ b/Formula/b/bareos-client.rb @@ -0,0 +1,112 @@ +class BareosClient < Formula + desc "Client for Bareos (Backup Archiving REcovery Open Sourced)" + homepage "https://www.bareos.com/" + url "https://github.com/bareos/bareos/archive/refs/tags/Release/24.0.7.tar.gz" + sha256 "ae60d17114f1b9081314d002186fd538c108972c332287f381cff0f63c1b22a1" + license "AGPL-3.0-only" + + livecheck do + url :stable + regex(%r{^Release/(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 arm64_tahoe: "ca9e8fbf99e22526a8f24268580b3f30647a33c9ced707820e549d0db495c8e0" + sha256 arm64_sequoia: "5f9fda83af5d2473bd373ca531df308cf611d9283dccdce106a2893a8acd6389" + sha256 arm64_sonoma: "c401f9deecf6c02ed83e9515d82798f61ce85f2107aa95d84312f76463d85579" + sha256 sonoma: "00f574b386df4bbd673956a3eacdf9bd929bfedbfeddb815909c29f0c77d07dc" + sha256 arm64_linux: "508990f99a02d75beb2d30e57f9426666b939b098357bbdec333f0a293977f65" + sha256 x86_64_linux: "6c03646b46d8ad6fcfd0a131c6ba22b710a8291fddbe2863c9a5d70fd2b82a0c" + end + + depends_on "cli11" => :build + depends_on "cmake" => :build + depends_on "cpp-gsl" => :build + depends_on "fmt" => :build + depends_on "utf8cpp" => :build + depends_on "jansson" + depends_on "lzo" + depends_on "openssl@3" + depends_on "readline" + depends_on "xxhash" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "acl" + end + + conflicts_with "bacula-fd", because: "both install a `bconsole` executable" + + def install + # Work around Linux build failure by disabling warnings: + # lmdb/mdb.c:2282:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] + # fastlzlib.c:512:63: error: unused parameter ‘output_length’ [-Werror=unused-parameter] + # Upstream issue: https://bugs.bareos.org/view.php?id=1504 + if OS.linux? + ENV.append_to_cflags "-Wno-unused-but-set-variable" + ENV.append_to_cflags "-Wno-unused-parameter" + end + + # Work around hardcoded paths forced static linkage on macOS + inreplace "core/cmake/BareosFindAllLibraries.cmake" do |s| + s.gsub! "set(OPENSSL_USE_STATIC_LIBS 1)", "" + s.gsub! "${HOMEBREW_PREFIX}/opt/lzo/lib/liblzo2.a", Formula["lzo"].opt_lib/shared_library("liblzo2") + end + + inreplace "core/cmake/FindReadline.cmake", + "${HOMEBREW_PREFIX}/opt/readline/lib/libreadline.a", + Formula["readline"].opt_lib/shared_library("libreadline") + + inreplace "core/src/filed/CMakeLists.txt", + "bareos-fd PROPERTIES INSTALL_RPATH \"@loader_path/../${libdir}\"", + "bareos-fd PROPERTIES INSTALL_RPATH \"${libdir}\"" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DENABLE_PYTHON=OFF", + "-Dworkingdir=#{var}/lib/bareos", + "-Darchivedir=#{var}/bareos", + "-Dconfdir=#{etc}/bareos", + "-Dconfigtemplatedir=#{lib}/bareos/defaultconfigs", + "-Dscriptdir=#{lib}/bareos/scripts", + "-Dplugindir=#{lib}/bareos/plugins", + "-Dfd-password=XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX", + "-Dmon-fd-password=XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX", + "-Dbasename=XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX", + "-Dhostname=XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX", + "-Dclient-only=ON", + "-DENABLE_LZO=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"lib/bareos").mkpath + # If no configuration files are present, + # deploy them (copy them and replace variables). + unless (etc/"bareos/bareos-fd.d").exist? + system lib/"bareos/scripts/bareos-config", "deploy_config", + lib/"bareos/defaultconfigs", etc/"bareos", "bareos-fd" + system lib/"bareos/scripts/bareos-config", "deploy_config", + lib/"bareos/defaultconfigs", etc/"bareos", "bconsole" + end + end + + service do + run [opt_sbin/"bareos-fd", "-f"] + require_root true + log_path var/"run/bareos-fd.log" + error_log_path var/"run/bareos-fd.log" + end + + test do + # Check if bareos-fd starts at all. + assert_match version.to_s, shell_output("#{sbin}/bareos-fd -? 2>&1") + # Check if the configuration is valid. + system sbin/"bareos-fd", "-t" + end +end diff --git a/Formula/b/baresip.rb b/Formula/b/baresip.rb new file mode 100644 index 0000000000000..d289df4c37a9a --- /dev/null +++ b/Formula/b/baresip.rb @@ -0,0 +1,38 @@ +class Baresip < Formula + desc "Modular SIP useragent" + homepage "https://github.com/baresip/baresip" + url "https://github.com/baresip/baresip/archive/refs/tags/v4.2.0.tar.gz" + sha256 "4b9fba7c53cabec4cc702bf47fb421f078d6f31421b7bea8f3f0fdbe1a671674" + license "BSD-3-Clause" + + bottle do + sha256 arm64_tahoe: "e78cde7fd04ff2c722a2d488f1bdeaeea26ddb5872db21b3c7820095632bbd61" + sha256 arm64_sequoia: "049d6a85fe0ce5b446e0cd67867065f2527aa91bc9f85b268775b326ddacf789" + sha256 arm64_sonoma: "f57364b17d30bd865e800c47fbd720ff4159dc52f2ad7263c09fd629c31f91d4" + sha256 sonoma: "912c041a07671ea5657a6adbf9e8fdaa9562e887b17f5e982227274a0b024b69" + sha256 arm64_linux: "9385aeebebba702ca7f8c39989ccfba4e5ca926b72a548a2f3dc697b002ddc4e" + sha256 x86_64_linux: "d8427ec7146e4415a8253a9d3b3cc3ed069d3db013a0659c439e1584c9a7c8d3" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libre" + + on_macos do + depends_on "openssl@3" + end + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DRE_INCLUDE_DIR=#{Formula["libre"].opt_include}/re + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"baresip", "-f", testpath/".baresip", "-t", "5" + end +end diff --git a/Formula/b/bartib.rb b/Formula/b/bartib.rb new file mode 100644 index 0000000000000..43a025e444231 --- /dev/null +++ b/Formula/b/bartib.rb @@ -0,0 +1,43 @@ +class Bartib < Formula + desc "Simple timetracker for the command-line" + homepage "https://github.com/nikolassv/bartib" + url "https://github.com/nikolassv/bartib/archive/refs/tags/v1.1.0.tar.gz" + sha256 "29fcfb9fc2a64c11023d4be9904e2c70e49ec1f6c9f8ce4c6ee9d73825d2f6f4" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "52b6b03f65e39ab962199f96aad40078bac3c6b13214803724efc8bd3490cbac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9be195bbd5899cb6db9a41856d9b40b47bbcb7d420ccaf4de1e5ca3e3da6937a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42242e50705c778c366ba844a712b7ed298e59515f03bbfe990c59e43372438f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c62668a835b2f7063af07ea743d6ab4ed7935c69643c16d8f774dd1e74efbdf4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "75f3c6550bcafdd59162ba969481e35b11829e1f9a7364b44134c3f5cf1f0f9e" + sha256 cellar: :any_skip_relocation, sonoma: "741cc1e4303b22c965b48b659745eb1fffc7189c09424e408ad92bd07bb8aa24" + sha256 cellar: :any_skip_relocation, ventura: "b0ae657c86becd8b322873503cf52457afc6ddf51e90b7937db03f1aec103f51" + sha256 cellar: :any_skip_relocation, monterey: "3f112d924d8a4d4ea2a92d5e8200364835b126b3110220f3ee20cdc1576bff3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c652215df17112bc66caf38b274458b81c97a6d22ca7b91cf4fbe6ad908d3328" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67345dd0da6698d9c95b8ed43a394fa960574f29f3d45fd1d548561d559c34b6" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + bartib_file = testpath/"activities.bartib" + touch bartib_file + ENV["BARTIB_FILE"] = bartib_file + + system bin/"bartib", "start", "-d", "task BrewTest", "-p", "project" + sleep 2 + system bin/"bartib", "stop" + expected =<<~EOS.strip + \e[1mproject.......... <1m\e[0m + task BrewTest <1m + + \e[1mTotal............ <1m\e[0m + EOS + assert_equal expected, shell_output("#{bin}/bartib report").strip + end +end diff --git a/Formula/b/bartycrouch.rb b/Formula/b/bartycrouch.rb new file mode 100644 index 0000000000000..419deabc90b3a --- /dev/null +++ b/Formula/b/bartycrouch.rb @@ -0,0 +1,48 @@ +class Bartycrouch < Formula + desc "Incrementally update/translate your Strings files" + homepage "https://github.com/FlineDev/BartyCrouch" + url "https://github.com/FlineDev/BartyCrouch.git", + tag: "4.15.1", + revision: "fe88110ab0af3d1281138b63159e20a7450383fa" + license "MIT" + head "https://github.com/FlineDev/BartyCrouch.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "46fbbd53f6f604e0b12914220924a0dffbc030707b8079b488716e9cc3d97fe4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1c38b26cfa121cc550ed3a82c6ec5838855f86afa694b31ae6ad33463857880" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eaa1ce531757276cd36316e1d689fea793b203923abddc935c78237551a6e8ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b13d54cac22da186bd607c75403d684dd1ba9210a62f5cbbe310a204761df0db" + sha256 cellar: :any_skip_relocation, arm64_monterey: "04e1c952b93b649d10bc8d21393d85f3bbf34f6367c8c45d397e35cb7078f358" + sha256 cellar: :any_skip_relocation, sonoma: "04e8787865027a86682e3f371d346c8cdf2fada6d9a8143d47e805059bfef416" + sha256 cellar: :any_skip_relocation, ventura: "a96c215d738ffedc43b770955b434a74b2ebb7ee085d25636a29276628481f90" + sha256 cellar: :any_skip_relocation, monterey: "0dc9b2657b7071f05f5d4cd6e0563add579632de61ee1fc70135c9182064591a" + end + + depends_on xcode: ["14.0", :build] + depends_on :macos + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + (testpath/"Test.swift").write <<~SWIFT + import Foundation + + class Test { + func test() { + NSLocalizedString("test", comment: "") + } + } + SWIFT + + (testpath/"en.lproj/Localizable.strings").write <<~EOS + /* No comment provided by engineer. */ + "oldKey" = "Some translation"; + EOS + + system bin/"bartycrouch", "update" + assert_match '"oldKey" = "', File.read("en.lproj/Localizable.strings") + assert_match '"test" = "', File.read("en.lproj/Localizable.strings") + end +end diff --git a/Formula/b/bas55.rb b/Formula/b/bas55.rb new file mode 100644 index 0000000000000..a43d618384e2e --- /dev/null +++ b/Formula/b/bas55.rb @@ -0,0 +1,45 @@ +class Bas55 < Formula + desc "Minimal BASIC programming language interpreter as defined by ECMA-55" + homepage "https://jorgicor.niobe.org/bas55/" + url "https://jorgicor.niobe.org/bas55/bas55-2.0.tar.gz" + sha256 "640b296df2ee22c2e14e90b23e0edad646682c80b3226652772847fa0614f293" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?bas55[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ee22532aeb40b552f0bcdad959ea9790db7a1256a562d032ea17ec3abf5774c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "478a5356e46bd76319db391d95aff282e41a3864225cede8f1da17a18eeeb055" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d2b79dbbfcd253fc6e67a423ebad563b746fb9584ec0ce981575b6a5f1cf427" + sha256 cellar: :any_skip_relocation, arm64_ventura: "99f0e68f265df21972857f7978cf48f771eae5196bc1ba27b929ccb75b650b3a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d0104191f7a019cf4e94d968da26e46fd477e4c4e147a690ed890ff7b37b93ef" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9cfc62a8faca260dc7c8f3616083b30792b5fc453a5f082bfc2b7a6ac2b0b42a" + sha256 cellar: :any_skip_relocation, sonoma: "e91df7c926416cb91911dc4132e80f8bb22c3789e64475b222591718919dfea8" + sha256 cellar: :any_skip_relocation, ventura: "44d2a192051128129fefc7940affd20c3328a7a0585c7af897e1046acccb6fea" + sha256 cellar: :any_skip_relocation, monterey: "088b046993c5070926efaca3e3768c724571e788192532fe0647e23d5807c83a" + sha256 cellar: :any_skip_relocation, big_sur: "3ad23d069a17c47de857d1247335e5372b702da82a9d888c2f4cd46d4d0e96ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "38457e7ed5857d21ccdc44361a8befba24764b9e345f8cbc5aacc46bf7bd2629" + sha256 cellar: :any_skip_relocation, x86_64_linux: "687aa791b5bece0576dbe003bc84a50fd8aa65a4ec639b0ee8a16fa8b6702f39" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"hello.bas").write <<~EOS + 10 PRINT "HELLO, WORLD" + 20 END + EOS + + assert_equal "HELLO, WORLD\n", shell_output("#{bin}/bas55 hello.bas") + end +end diff --git a/Formula/b/base16384.rb b/Formula/b/base16384.rb new file mode 100644 index 0000000000000..8e047a583b0cd --- /dev/null +++ b/Formula/b/base16384.rb @@ -0,0 +1,31 @@ +class Base16384 < Formula + desc "Encode binary files to printable utf16be" + homepage "https://github.com/fumiama/base16384" + url "https://github.com/fumiama/base16384/archive/refs/tags/v2.3.2.tar.gz" + sha256 "3b612e8ab32e7b108a08cdf4112a04fbebaaa572bc60d386343a954c695e450b" + license "GPL-3.0-or-later" + head "https://github.com/fumiama/base16384.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "1f5f8def255ca57e635603ef572bb652a7920bae85be2e2c84a13c446d6d4615" + sha256 cellar: :any, arm64_sequoia: "deeb2188d7479f513249484059fd1de2adbeeecc433b5017bd352ca29328d9c4" + sha256 cellar: :any, arm64_sonoma: "7908aa72a066df28976ac2c33318b3bc14dcdcdb14e03f075aaef4e49f927b0d" + sha256 cellar: :any, sonoma: "b9c40a9eeae7fb639505085bf436817583a4bef68ab415966a232facbb1634b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "292b2d8e8b87a90ee2dbb426a69ed69f8c58945cda95c879478eeab33d38c818" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3010ed072ea82794a4f40a0ec7a11e2bc51a6f0a8d25aa18483be84976b9a2b3" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + hash = pipe_output("#{bin}/base16384 -e - -", "1234567890abcdefg", 0) + assert_match "1234567890abcdefg", pipe_output("#{bin}/base16384 -d - -", hash, 0) + end +end diff --git a/Formula/b/base64.rb b/Formula/b/base64.rb new file mode 100644 index 0000000000000..00439d5faf233 --- /dev/null +++ b/Formula/b/base64.rb @@ -0,0 +1,43 @@ +class Base64 < Formula + desc "Encode and decode base64 files" + homepage "https://www.fourmilab.ch/webtools/base64/" + url "https://www.fourmilab.ch/webtools/base64/base64-1.5.tar.gz" + sha256 "2416578ba7a7197bddd1ee578a6d8872707c831d2419bdc2c1b4317a7e3c8a2a" + license :public_domain + + livecheck do + url :homepage + regex(/href=.*?base64[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fbf459526bc50316ed55f1e5ea972f22658ba26aa8e0b4b5db5b984bc0fbceb8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17aef54e36b9c3ce2cd832c59d4cacbac0584a1a9db7af45e1728d6fceeb760e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8d7991eaf3b922668f4da81929e574d1ce879acf372ffc8a24679da63e83967" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bc888655b142849238c7aa9764e462c4f30a94c80c682962bddea75c96dc581d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "aa86de79c32e57cf11fceeba4ab6ccdbd4bccbf88704e85b7f9bae100f9af236" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ddaa699165e82146b4f3b476d05cff364a9530d1c389d43573b8f59a2a2e7d5a" + sha256 cellar: :any_skip_relocation, sonoma: "4a15a0d6f82a026a34550257e7dda5bfc81a7d12414d7d28bcfec4df9882f7bb" + sha256 cellar: :any_skip_relocation, ventura: "6fe7f731c8dae0f98208beedf2610c71cac50df042d133612fe9be00864cfec5" + sha256 cellar: :any_skip_relocation, monterey: "283b796362540fd1f3a006f537bc87c92cfe1c47071eb8d2d2c863334ada81d6" + sha256 cellar: :any_skip_relocation, big_sur: "4c9e32d24df53a042aec56518070159c224216e16346f7f567a4261521609efd" + sha256 cellar: :any_skip_relocation, catalina: "f883e1602433f3a921fd1892747d76cf4548f75ac2e572be9eb0cfe0ced7290c" + sha256 cellar: :any_skip_relocation, arm64_linux: "37aa1f30a578bdc6344258b905cf1e714d2dbc6323cbace378c07760d18e9817" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f8f96bcf972f99b8ca838f542a44c9b1f7bf8da7e66eb3333d941093ecbc199" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking" + system "make" + bin.install "base64" + man1.install "base64.1" + end + + test do + path = testpath/"a.txt" + path.write "hello" + assert_equal "aGVsbG8=", shell_output("#{bin}/base64 #{path}").strip + end +end diff --git a/Formula/b/base91.rb b/Formula/b/base91.rb new file mode 100644 index 0000000000000..4ae7f59cfb078 --- /dev/null +++ b/Formula/b/base91.rb @@ -0,0 +1,40 @@ +class Base91 < Formula + desc "Utility to encode and decode base91 files" + homepage "https://base91.sourceforge.net/" + url "https://downloads.sourceforge.net/project/base91/basE91/0.6.0/base91-0.6.0.tar.gz" + sha256 "02cfae7322c1f865ca6ce8f2e0bb8d38c8513e76aed67bf1c94eab1343c6c651" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c288d4a7310b87b44e080c9b10ae3f541945cc7ba1e990edd1006df84c6ad9e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c592a7056137ae37fd39f580b4f5b94abb84943d2c9910854ddf149d4099becf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47951f7f2de89d984b7bbfa58b5c39ec6d1fad793516cb925478e907882ffae5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67a2d373e37965d8f4af56c50d704340f2a85efd2563a1801e8b61eeaa1d8755" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cd1312d937857681b5c54a9d135b0e7b37b934fe8c3ef4be414222a876904dce" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f97be9aed077e34c2aaf8aac0157fae476dedf2cf02eae3b23de8a74541e8135" + sha256 cellar: :any_skip_relocation, sonoma: "5631c841168b7506040aa82be29ac05c5a91714107e99cfa2d7f3b59fd1958cb" + sha256 cellar: :any_skip_relocation, ventura: "17bcc913dc97e5e52dbdd67aae0e622eea1593adbe692adc584c888c754577e7" + sha256 cellar: :any_skip_relocation, monterey: "2580639cbba0238bdf477650b1759dcb51d328fcdc9375ebbc031b355cb0ed23" + sha256 cellar: :any_skip_relocation, big_sur: "039bcf75c09fb75a7472e8f92ef349f2908073b4ac76c1c4573d1a393e248229" + sha256 cellar: :any_skip_relocation, catalina: "239a9f51f67e7b1de09d10c838dffd2c34ce0f6f58641269e2278d6478b36542" + sha256 cellar: :any_skip_relocation, arm64_linux: "570aa4d67d764052049d02bb6f3843b306378950a45ac01145b0e11e183bebc0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c611713705345338da5415ea274901781c883f71e870384f92866fb7275083b3" + end + + def install + system "make" + bin.install "base91" + bin.install_symlink "base91" => "b91dec" + bin.install_symlink "base91" => "b91enc" + man1.install "base91.1" + man1.install_symlink "base91.1" => "b91dec.1" + man1.install_symlink "base91.1" => "b91enc.1" + end + + test do + assert_equal ">OwJh>Io2Tv!lE", pipe_output("#{bin}/b91enc", "Hello world", 0) + assert_equal "Hello world", pipe_output("#{bin}/b91dec", ">OwJh>Io2Tv!lE", 0) + end +end diff --git a/Formula/b/basedpyright.rb b/Formula/b/basedpyright.rb new file mode 100644 index 0000000000000..819a2831b53b6 --- /dev/null +++ b/Formula/b/basedpyright.rb @@ -0,0 +1,28 @@ +class Basedpyright < Formula + desc "Pyright fork with various improvements and built-in pylance features" + homepage "https://github.com/DetachHead/basedpyright" + url "https://registry.npmjs.org/basedpyright/-/basedpyright-1.32.1.tgz" + sha256 "4432a781e7a84a54404980934c1d7f7d2a9655e8d9adcbebf34d8680ef2cd392" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "bfb11eb290c41a1801c87cb5dfd357227120e76ab3bb1e0081b89ca2debc172a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec/"bin/pyright" => "basedpyright" + bin.install_symlink libexec/"bin/pyright-langserver" => "basedpyright-langserver" + end + + test do + (testpath/"broken.py").write <<~PYTHON + def wrong_types(a: int, b: int) -> str: + return a + b + PYTHON + output = shell_output("#{bin}/basedpyright broken.py 2>&1", 1) + assert_match "error: Type \"int\" is not assignable to return type \"str\"", output + end +end diff --git a/Formula/b/basex.rb b/Formula/b/basex.rb new file mode 100644 index 0000000000000..ebab3ceb69769 --- /dev/null +++ b/Formula/b/basex.rb @@ -0,0 +1,36 @@ +class Basex < Formula + desc "Light-weight XML database and XPath/XQuery processor" + homepage "https://basex.org" + url "https://files.basex.org/releases/12.0/BaseX120.zip" + version "12.0" + sha256 "ffd4de680a768dc906efb17cf89dda4a99285d6c93157bd7c67c578299f9f197" + license "BSD-3-Clause" + + livecheck do + url "https://basex.org/download/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/BaseX[._-]?v?(\d+(?:\.\d+)*)\.zip}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "05607e52e85895c35964198defc61f665b99d0174f74c28dc9d00b25a6ad4de7" + end + + depends_on "openjdk" + + def install + rm Dir["bin/*.bat"] + rm_r("repo") + rm_r("data") + rm_r("etc") + + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + assert_equal "1\n2\n3\n4\n5\n6\n7\n8\n9\n10", shell_output("#{bin}/basex '1 to 10'") + end +end diff --git a/Formula/b/bash-completion.rb b/Formula/b/bash-completion.rb new file mode 100644 index 0000000000000..e317483bd4a95 --- /dev/null +++ b/Formula/b/bash-completion.rb @@ -0,0 +1,84 @@ +# NOTE: version 2 is out, but it requires Bash 4, and macOS ships +# with 3.2.57. If you've upgraded bash, use bash-completion@2 instead. +class BashCompletion < Formula + desc "Programmable completion for Bash 3.2" + homepage "https://salsa.debian.org/debian/bash-completion" + url "https://src.fedoraproject.org/repo/pkgs/bash-completion/bash-completion-1.3.tar.bz2/a1262659b4bbf44dc9e59d034de505ec/bash-completion-1.3.tar.bz2" + sha256 "8ebe30579f0f3e1a521013bcdd183193605dab353d7a244ff2582fb3a36f7bec" + license "GPL-2.0-or-later" + revision 3 + + livecheck do + skip "1.x versions are no longer developed" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "286910bb6889fd2cbafa738ac0461c549846e711fa00fb29d335fa5c1e93973c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6727e6e418e740531b75aebedaac6ceece0a0865f4f46dd0351d265035b497e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60e79daad9283c5e9f4c814eed837c86aab0b5172c633e7171cbbf26a434bcff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d7902e07973d14daf1bf98d5e3bc5b84beeee977b943c33585cf86d4eaae6e36" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d7902e07973d14daf1bf98d5e3bc5b84beeee977b943c33585cf86d4eaae6e36" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "44be13e781914250b3c277ce3672b7a3c45974f80ae8a2b0c55ccf884faf5d6b" + sha256 cellar: :any_skip_relocation, sonoma: "10c560f8c8058f80450a1d44826e57820d83370dbc3631cf5230a15cc8b8bbdc" + sha256 cellar: :any_skip_relocation, ventura: "1a5cc6b613a97f1a15f87725d8343b4358e56acaa230f7cec64c77d4566a6f80" + sha256 cellar: :any_skip_relocation, monterey: "1a5cc6b613a97f1a15f87725d8343b4358e56acaa230f7cec64c77d4566a6f80" + sha256 cellar: :any_skip_relocation, big_sur: "8fe573529e08174b26d4379d92a42a7c38138c712e4e998541e8892fc6a376e7" + sha256 cellar: :any_skip_relocation, catalina: "bd0c84cc6df9d3ff06ac081d85fdcc052b9e63136f4e2aa5fd2f2a0b7f654c84" + sha256 cellar: :any_skip_relocation, arm64_linux: "f741b3bdcb0a881ab7b961a7ee397014f964440c74b4949f118a79540d8aba01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c34ba8272f8e85e7f453c76e0fee07d8d35831e6b6365588a80ef240f9524e50" + end + + on_linux do + conflicts_with "util-linux", because: "both install `mount`, `rfkill`, and `rtcwake` completions" + end + + conflicts_with "bash-completion@2", because: "each are different versions of the same formula" + conflicts_with "medusa", because: "both install `medusa` bash completion" + + # Backports the following upstream patch from 2.x: + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740971 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bash-completion/bug-740971.patch" + sha256 "bd242a35b8664c340add068bcfac74eada41ed26d52dc0f1b39eebe591c2ea97" + end + + # Backports (a variant of) an upstream patch to fix man completion. + patch :DATA + + def install + inreplace "bash_completion" do |s| + s.gsub! "/etc/bash_completion", etc/"bash_completion" + s.gsub! "readlink -f", "readlink" + end + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + def caveats + <<~EOS + Add the following line to your ~/.bash_profile: + [[ -r "#{etc}/profile.d/bash_completion.sh" ]] && . "#{etc}/profile.d/bash_completion.sh" + + This formula is mainly for use with Bash 3. If you are using Homebrew's Bash or your + system Bash is at least version 4.2, then you should install `bash-completion@2` instead. + EOS + end + + test do + system "bash", "-c", ". #{etc}/profile.d/bash_completion.sh" + end +end + +__END__ +--- a/completions/man ++++ b/completions/man +@@ -27,7 +27,7 @@ + fi + + uname=$( uname -s ) +- if [[ $uname == @(Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then ++ if [[ $uname == @(Darwin|Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then + manpath=$( manpath 2>/dev/null || command man --path ) + else + manpath=$MANPATH diff --git a/Formula/b/bash-completion@2.rb b/Formula/b/bash-completion@2.rb new file mode 100644 index 0000000000000..3ce6fe8370fe6 --- /dev/null +++ b/Formula/b/bash-completion@2.rb @@ -0,0 +1,59 @@ +class BashCompletionAT2 < Formula + desc "Programmable completion for Bash 4.2+" + homepage "https://github.com/scop/bash-completion" + url "https://github.com/scop/bash-completion/releases/download/2.17.0/bash-completion-2.17.0.tar.xz" + sha256 "dd9d825e496435fb3beba3ae7bea9f77e821e894667d07431d1d4c8c570b9e58" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ea80dd75c8d7b48e1ed47b5c1b36c5171ec31640ea290ecc3fb8a6f8941d4fbf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea80dd75c8d7b48e1ed47b5c1b36c5171ec31640ea290ecc3fb8a6f8941d4fbf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea80dd75c8d7b48e1ed47b5c1b36c5171ec31640ea290ecc3fb8a6f8941d4fbf" + sha256 cellar: :any_skip_relocation, sonoma: "f958af6492d1c86a775cb5fedbbece68ea1853208a4b92fa169c527ca12d0cc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea80dd75c8d7b48e1ed47b5c1b36c5171ec31640ea290ecc3fb8a6f8941d4fbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea80dd75c8d7b48e1ed47b5c1b36c5171ec31640ea290ecc3fb8a6f8941d4fbf" + end + + head do + url "https://github.com/scop/bash-completion.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "bash" + + conflicts_with "bash-completion", + because: "each are different versions of the same formula" + + def install + inreplace "bash_completion" do |s| + # `/usr/bin/readlink -f` exists since macOS 12.3. Older systems + # (including earlier Monterey releases) do not support this option. + s.gsub! "readlink -f", "readlink" if OS.mac? && MacOS.version <= :monterey + # Automatically read Homebrew's existing v1 completions + s.gsub! "(/etc/bash_completion.d)", "(#{etc}/bash_completion.d)" + end + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + ENV.deparallelize + system "make", "install" + end + + def caveats + <<~EOS + Add the following line to your ~/.bash_profile: + [[ -r "#{etc}/profile.d/bash_completion.sh" ]] && . "#{etc}/profile.d/bash_completion.sh" + EOS + end + + test do + system "test", "-f", "#{share}/bash-completion/bash_completion" + end +end diff --git a/Formula/b/bash-git-prompt.rb b/Formula/b/bash-git-prompt.rb new file mode 100644 index 0000000000000..888addf0947b2 --- /dev/null +++ b/Formula/b/bash-git-prompt.rb @@ -0,0 +1,39 @@ +class BashGitPrompt < Formula + desc "Informative, fancy bash prompt for Git users" + homepage "https://github.com/magicmonty/bash-git-prompt" + url "https://github.com/magicmonty/bash-git-prompt/archive/refs/tags/2.7.1.tar.gz" + sha256 "5e5fc6f5133b65760fede8050d4c3bc8edb8e78bc7ce26c16db442aa94b8a709" + license "BSD-2-Clause" + head "https://github.com/magicmonty/bash-git-prompt.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5049efb01e5ceb83df920dfe1c5dd23595401e3c700064fee74afbf9949d4f8f" + end + + def install + share.install "gitprompt.sh", "gitprompt.fish", "git-prompt-help.sh", + "gitstatus.py", "gitstatus.sh", "gitstatus_pre-1.7.10.sh", + "prompt-colors.sh" + + (share/"themes").install Dir["themes/*.bgptheme"], "themes/Custom.bgptemplate" + doc.install "README.md" + end + + def caveats + <<~EOS + You should add the following to your .bashrc (or .bash_profile): + if [ -f "#{opt_share}/gitprompt.sh" ]; then + __GIT_PROMPT_DIR="#{opt_share}" + source "#{opt_share}/gitprompt.sh" + fi + EOS + end + + test do + output = shell_output("/bin/bash #{share}/gitstatus.sh 2>&1") + assert_match "not a git repository", output + end +end diff --git a/Formula/b/bash-language-server.rb b/Formula/b/bash-language-server.rb new file mode 100644 index 0000000000000..18186e6c98645 --- /dev/null +++ b/Formula/b/bash-language-server.rb @@ -0,0 +1,35 @@ +class BashLanguageServer < Formula + desc "Language Server for Bash" + homepage "https://github.com/bash-lsp/bash-language-server" + url "https://registry.npmjs.org/bash-language-server/-/bash-language-server-5.6.0.tgz" + sha256 "56d22481ffd0eed3edd23d1130554da31dc186d935202f08cf7ce3894fe801be" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "efa96e18937bedf5586191f4450794a30d0b7af5efede85876f5fa7629586e68" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output("#{bin}/bash-language-server start", input, 0) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/b/bash-preexec.rb b/Formula/b/bash-preexec.rb new file mode 100644 index 0000000000000..97166740d0e81 --- /dev/null +++ b/Formula/b/bash-preexec.rb @@ -0,0 +1,28 @@ +class BashPreexec < Formula + desc "Preexec and precmd functions for Bash (like Zsh)" + homepage "https://github.com/rcaloras/bash-preexec" + url "https://github.com/rcaloras/bash-preexec/archive/refs/tags/0.6.0.tar.gz" + sha256 "1a987c0ef0e9cfa0391389327c5aef30166325b32666adde3daa9b809850cdd1" + license "MIT" + head "https://github.com/rcaloras/bash-preexec.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d737f908e1981ebeeb2cc684951331f7dfb4ab8b0befc291c5da4b3f83fd7154" + end + + def install + (prefix/"etc/profile.d").install "bash-preexec.sh" + end + + def caveats + <<~EOS + Add the following line to your bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile) + [ -f #{etc}/profile.d/bash-preexec.sh ] && . #{etc}/profile.d/bash-preexec.sh + EOS + end + + test do + # Just testing that the file is installed + assert_path_exists testpath/"#{prefix}/etc/profile.d/bash-preexec.sh" + end +end diff --git a/Formula/b/bash-snippets.rb b/Formula/b/bash-snippets.rb new file mode 100644 index 0000000000000..ea60124bb3b97 --- /dev/null +++ b/Formula/b/bash-snippets.rb @@ -0,0 +1,30 @@ +class BashSnippets < Formula + desc "Collection of small bash scripts for heavy terminal users" + homepage "https://github.com/alexanderepstein/Bash-Snippets" + url "https://github.com/alexanderepstein/Bash-Snippets/archive/refs/tags/v1.23.0.tar.gz" + sha256 "59b784e714ba34a847b6a6844ae1703f46db6f0a804c3e5f2de994bbe8ebe146" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "d22507e71365355dc20eba3747a10f575f80ff3dc86103d1a2f9be08a08932d9" + end + + conflicts_with "cheat", because: "both install `cheat` binaries" + conflicts_with "expect", because: "both install `weather` binaries" + conflicts_with "pwned", because: "both install `pwned` binaries" + conflicts_with "todoman", because: "both install `todo` binaries" + + def install + system "./install.sh", "--prefix=#{prefix}", "all" + end + + test do + output = shell_output("#{bin}/weather London").lines.first.chomp + assert_equal "Weather report: London", output + output = shell_output("#{bin}/qrify This is a test") + assert_match "████ ▄▄▄▄▄ █▀▄█▀ █ ▀█ ▄▄▄▄▄ ████", output + end +end diff --git a/Formula/b/bash.rb b/Formula/b/bash.rb new file mode 100644 index 0000000000000..75c7a96bfde0b --- /dev/null +++ b/Formula/b/bash.rb @@ -0,0 +1,147 @@ +class Bash < Formula + desc "Bourne-Again SHell, a UNIX command interpreter" + homepage "https://www.gnu.org/software/bash/" + license "GPL-3.0-or-later" + head "https://git.savannah.gnu.org/git/bash.git", branch: "master" + + stable do + url "https://ftpmirror.gnu.org/gnu/bash/bash-5.3.tar.gz" + mirror "https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz" + mirror "https://mirrors.kernel.org/gnu/bash/bash-5.3.tar.gz" + mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.3.tar.gz" + sha256 "0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba" + version "5.3.3" + + # Add new patches using this format: + # + # patch_checksum_pairs = %w[ + # 001 + # 002 + # ... + # ] + + patch_checksum_pairs = %w[ + 001 1f608434364af86b9b45c8b0ea3fb3b165fb830d27697e6cdfc7ac17dee3287f + 002 e385548a00130765ec7938a56fbdca52447ab41fabc95a25f19ade527e282001 + 003 f245d9c7dc3f5a20d84b53d249334747940936f09dc97e1dcb89fc3ab37d60ed + ] + + patch_checksum_pairs.each_slice(2) do |p, checksum| + patch :p0 do + url "https://ftpmirror.gnu.org/gnu/bash/bash-5.3-patches/bash53-#{p}" + mirror "https://ftp.gnu.org/gnu/bash/bash-5.3-patches/bash53-#{p}" + mirror "https://mirrors.kernel.org/gnu/bash/bash-5.3-patches/bash53-#{p}" + mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.3-patches/bash53-#{p}" + sha256 checksum + end + end + end + + # We're not using `url :stable` here because we need `url` to be a string + # when we use it in the `strategy` block. + livecheck do + url "https://ftpmirror.gnu.org/gnu/bash/?C=M&O=D" + regex(/href=.*?bash[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :gnu do |page, regex| + # Match versions from files + versions = page.scan(regex) + .flatten + .uniq + .map { |v| Version.new(v) } + .sort + next versions if versions.blank? + + # Assume the last-sorted version is newest + newest_version = versions.last + + # Simply return the found versions if there isn't a patches directory + # for the "newest" version + patches_directory = page.match(%r{href=.*?(bash[._-]v?#{newest_version.major_minor}[._-]patches/?)["' >]}i) + next versions if patches_directory.blank? + + # Fetch the page for the patches directory + patches_page = Homebrew::Livecheck::Strategy.page_content(URI.join(@url, patches_directory[1]).to_s) + next versions if patches_page[:content].blank? + + # Generate additional major.minor.patch versions from the patch files in + # the directory and add those to the versions array + patches_page[:content].scan(/href=.*?bash[._-]?v?\d+(?:\.\d+)*[._-]0*(\d+)["' >]/i).each do |match| + versions << "#{newest_version.major_minor}.#{match[0]}" + end + + versions + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c334ace988880c652a96a7be9e9c4ff03ba59db64ce66d3b0aefa8fb5e0780a8" + sha256 arm64_sequoia: "9b4b897e4fe4df3ffdfcd47265ca1c5c563265d9de490b6ef8deb75580ad4ee2" + sha256 arm64_sonoma: "82f6c2822bd49dae8d15be45fc347ebc91100de1fdad421b1360d4caf5526df3" + sha256 arm64_ventura: "721bdf14667a59cb7a24d4d476e0228649483513a2d3c9e93908564380915032" + sha256 sonoma: "94ef4a156e8cf4be1ae0a056aa988324d89cea55c2ec8f29ec9646a9df258441" + sha256 ventura: "7d259d44cfcbc36bb9c7c21fa8a08138868b39ce36dd963f853f9d50d9202145" + sha256 arm64_linux: "08e2e633ceb91d97c90205197d521607a3bcc3a491a18ae16d0fd3f1acf80d31" + sha256 x86_64_linux: "5d178cd059067f0e76c91ad7515304576052dd8727d5a7c50fc7b9caa0b5bc32" + end + + # System ncurses lacks functionality + # https://github.com/Homebrew/homebrew-core/issues/158667 + depends_on "ncurses" + depends_on "readline" + + on_macos do + depends_on "gettext" + end + + def bash_loadables_path + [ + "#{HOMEBREW_PREFIX}/lib/bash", + # Stock Bash paths; keep them for backwards compatibility. + "/usr/local/lib/bash", + "/usr/lib/bash", + "/opt/local/lib/bash", + "/usr/pkg/lib/bash", + "/opt/pkg/lib/bash", + ".", + ].uniq.join(":") + end + + def install + # When built with SSH_SOURCE_BASHRC, bash will source ~/.bashrc when + # it's non-interactively from sshd. This allows the user to set + # environment variables prior to running the command (e.g. PATH). The + # /bin/bash that ships with macOS defines this, and without it, some + # things (e.g. git+ssh) will break if the user sets their default shell to + # Homebrew's bash instead of /bin/bash. + ENV.append_to_cflags "-DSSH_SOURCE_BASHRC" + + ENV.append_to_cflags "-DDEFAULT_LOADABLE_BUILTINS_PATH='\"#{bash_loadables_path}\"'" + + # Avoid crashes on macOS 15.0-15.4. + ENV["bash_cv_func_strchrnul_works"] = "no" if OS.mac? && MacOS.version <= :sequoia + + system "./configure", "--prefix=#{prefix}", "--with-curses", "--with-installed-readline" + system "make", "install" + + (include/"bash/builtins").install lib/"bash/loadables.h" + pkgshare.install lib.glob("bash/Makefile*") + end + + def caveats + "DEFAULT_LOADABLE_BUILTINS_PATH: #{bash_loadables_path}" + end + + test do + assert_equal "hello", shell_output("#{bin}/bash -c 'echo -n hello'") + # If the following assertion breaks, then it's likely the configuration of `DEFAULT_LOADABLE_BUILTINS_PATH` + # is broken. Changing the test below will probably hide that breakage. + assert_equal "csv is a shell builtin\n", shell_output("#{bin}/bash -c 'enable csv; type csv'") + + return if OS.linux? || MacOS.version > :sequoia + + refute_match "U _strchrnul", shell_output("nm #{bin}/bash") + end +end diff --git a/Formula/b/bash_unit.rb b/Formula/b/bash_unit.rb new file mode 100644 index 0000000000000..fea3bf783eb99 --- /dev/null +++ b/Formula/b/bash_unit.rb @@ -0,0 +1,28 @@ +class BashUnit < Formula + desc "Bash unit testing enterprise edition framework for professionals" + homepage "https://github.com/bash-unit/bash_unit" + url "https://github.com/bash-unit/bash_unit/archive/refs/tags/v2.3.3.tar.gz" + sha256 "a2f76ddca88e2bef7c628c8cac6bf68b93a388fce143f6a4dc770fe1b3584307" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8c7b39455fab02fd97f73960e4c41b3d65f7695d5442d3950385c4d5fe874f09" + end + + uses_from_macos "bc" => :test + + def install + bin.install "bash_unit" + man1.install "docs/man/man1/bash_unit.1" + end + + test do + (testpath/"test.sh").write <<~SHELL + test_addition() { + RES="$(echo 2+2 | bc)" + assert_equals "${RES}" "4" + } + SHELL + assert "addition", shell_output("#{bin}/bash_unit test.sh") + end +end diff --git a/Formula/b/bashate.rb b/Formula/b/bashate.rb new file mode 100644 index 0000000000000..76db873805f7a --- /dev/null +++ b/Formula/b/bashate.rb @@ -0,0 +1,40 @@ +class Bashate < Formula + include Language::Python::Virtualenv + + desc "Code style enforcement for bash programs" + homepage "https://github.com/openstack/bashate" + url "https://files.pythonhosted.org/packages/4d/0c/35b92b742cc9da7788db16cfafda2f38505e19045ae1ee204ec238ece93f/bashate-2.1.1.tar.gz" + sha256 "4bab6e977f8305a720535f8f93f1fb42c521fcbc4a6c2b3d3d7671f42f221f4c" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "3599931c38b9118981d0e25270b4b625b998f7b88a37d9579115be3f1547beeb" + end + + depends_on "python-setuptools" => :build + depends_on "python@3.14" + + pypi_packages exclude_packages: "setuptools" + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/bashate --version") + + (testpath/"test.sh").write <<~SHELL + #!/bin/bash + echo "Testing Bashate" + SHELL + assert_match "E003 Indent not multiple of 4", shell_output("#{bin}/bashate #{testpath}/test.sh", 1) + assert_empty shell_output("#{bin}/bashate -i E003 #{testpath}/test.sh") + end +end diff --git a/Formula/b/bashdb.rb b/Formula/b/bashdb.rb new file mode 100644 index 0000000000000..f8ea95f34b4a5 --- /dev/null +++ b/Formula/b/bashdb.rb @@ -0,0 +1,44 @@ +class Bashdb < Formula + desc "Bash shell debugger" + homepage "https://bashdb.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bashdb/bashdb/5.2-1.2.0/bashdb-5.2-1.2.0.tar.bz2" + version "5.2-1.2.0" + sha256 "96fe0c8ffc12bc478c9dc41bb349ae85135da71b692069b8b7f62b27967ce534" + license "GPL-2.0-or-later" + + # We check the "bashdb" directory page because the bashdb project contains + # various software and bashdb releases may be pushed out of the SourceForge + # RSS feed. + livecheck do + url "https://sourceforge.net/projects/bashdb/files/bashdb/" + regex(%r{href=(?:["']|.*?bashdb/)?v?(\d+(?:[.-]\d+)+)/?["' >]}i) + strategy :page_match + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2aedb1af38194b056e6f3a31ff73c2995782f41d714955991a5d749abe53eb14" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2aedb1af38194b056e6f3a31ff73c2995782f41d714955991a5d749abe53eb14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2aedb1af38194b056e6f3a31ff73c2995782f41d714955991a5d749abe53eb14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2aedb1af38194b056e6f3a31ff73c2995782f41d714955991a5d749abe53eb14" + sha256 cellar: :any_skip_relocation, sonoma: "ce33c2ad50ddabd3cbff0c1a2b6e0f9ebaf8ff28609df48fafd6d7e8e1c8962d" + sha256 cellar: :any_skip_relocation, ventura: "ce33c2ad50ddabd3cbff0c1a2b6e0f9ebaf8ff28609df48fafd6d7e8e1c8962d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2aedb1af38194b056e6f3a31ff73c2995782f41d714955991a5d749abe53eb14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2aedb1af38194b056e6f3a31ff73c2995782f41d714955991a5d749abe53eb14" + end + + depends_on "bash" + + def install + # Update configure to support Bash 5.3 by replacing `'5.2' | '5.0' | '5.1'` + inreplace "configure", /(?:'5\.\d+'(?:\s+\|\s+)?)+/, "'#{Formula["bash"].version.major_minor}'" + + system "./configure", "--with-bash=#{HOMEBREW_PREFIX}/bin/bash", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, pipe_output("#{bin}/bashdb --version 2>&1") + end +end diff --git a/Formula/b/bashish.rb b/Formula/b/bashish.rb new file mode 100644 index 0000000000000..5593a7e9857f3 --- /dev/null +++ b/Formula/b/bashish.rb @@ -0,0 +1,26 @@ +class Bashish < Formula + desc "Theme environment for text terminals" + homepage "https://bashish.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bashish/bashish/2.2.4/bashish-2.2.4.tar.gz" + sha256 "3de48bc1aa69ec73dafc7436070e688015d794f22f6e74d5c78a0b09c938204b" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "593a8963d32a22c3c7a65c3d1f9f8ae8fec9a0a85dffe8ad5c71baba839091ca" + end + + depends_on "dialog" + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"bashish", "list" + end +end diff --git a/Formula/b/bashunit.rb b/Formula/b/bashunit.rb new file mode 100644 index 0000000000000..764677d6e7192 --- /dev/null +++ b/Formula/b/bashunit.rb @@ -0,0 +1,29 @@ +class Bashunit < Formula + desc "Simple testing library for bash scripts" + homepage "https://bashunit.typeddevs.com" + url "https://github.com/TypedDevs/bashunit/releases/download/0.26.0/bashunit" + sha256 "7ff253ec2cb665d560fd92d314687f0d6a256f9f9f13c57b3c4747d056e659af" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "604f39c434f4d1e5e871844756a9abcaaca391dd5c57883ff252ddf4b5c68a93" + end + + def install + bin.install "bashunit" + end + + test do + (testpath/"test.sh").write <<~SHELL + function test_addition() { + local result + result="$((2 + 2))" + + assert_equals "4" "$result" + } + SHELL + assert "addition", shell_output("#{bin}/bashunit test.sh") + + assert_match version.to_s, shell_output("#{bin}/bashunit --version") + end +end diff --git a/Formula/b/basis_universal.rb b/Formula/b/basis_universal.rb new file mode 100644 index 0000000000000..fb8facf39ebf0 --- /dev/null +++ b/Formula/b/basis_universal.rb @@ -0,0 +1,42 @@ +class BasisUniversal < Formula + desc "Basis Universal GPU texture codec command-line compression tool" + homepage "https://github.com/BinomialLLC/basis_universal" + url "https://github.com/BinomialLLC/basis_universal/archive/refs/tags/v1_60.tar.gz" + sha256 "64ac9363656dc3eb41c59ee52af7e939abe574a92c85fd0ba27008c4a7ec9f40" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "528256b199323aa91aeeea65287838c0f416c350866aae486092e4399edcfe69" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96434e6249de92e5397c362a061db58527d27934d0c6eb0c8dfca00a0e713a79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0e189d41590b8af1cbf3dc09edad394432df308cfff3fd3ec2b7f59364229f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11ad095bcfaed712c6bb0cad156195f547b62b25099017e42281081dd0625722" + sha256 cellar: :any_skip_relocation, sonoma: "255ab827520159d10a65c679cba019b737567ab0f6fbeeedf72328668b266ded" + sha256 cellar: :any_skip_relocation, ventura: "7968489b3cb67938213dc0ebabf094ac85d56cb6f7cec5f9815e7359f3efd074" + sha256 cellar: :any_skip_relocation, arm64_linux: "6cf5cb5d24db7ee3f074944845ba412eedf16b5aad753b6d01698bd2a886e706" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae7370a2812a7acea4e1b85530eea51b4c2d9c98db98e5cefee7e25e81abf710" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + bin.install "bin/basisu" + bin.install "bin/examples" => "basisu_examples" + end + + test do + system bin/"basisu", test_fixtures("test.png") + assert_path_exists testpath/"test.ktx2" + end +end diff --git a/Formula/b/bastet.rb b/Formula/b/bastet.rb new file mode 100644 index 0000000000000..23501e7f32cb5 --- /dev/null +++ b/Formula/b/bastet.rb @@ -0,0 +1,58 @@ +class Bastet < Formula + desc "Bastard Tetris" + homepage "https://fph.altervista.org/prog/bastet.html" + url "https://github.com/fph/bastet/archive/refs/tags/0.43.2.tar.gz" + sha256 "f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f" + license "GPL-3.0-or-later" + revision 12 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "bd1d97bd3983d3531e2e3bde824f690e527db5cce1d884602631a8cd387053cf" + sha256 arm64_sequoia: "4610cfc2730928d36fc2c129de55b26257ceb5e13821142529ff948660073bf6" + sha256 arm64_sonoma: "246ad961cdfb6d5c55993faabe240444589c870cbc5eb2567130f53ec94bc6f0" + sha256 arm64_ventura: "a0862ef06147f76cf326257d45eea42597330c5c45f631317b1c8c39ccd5136f" + sha256 cellar: :any, sonoma: "98a67787b19ac466bcca7bdb637815e7baf9c3dcaefd03a69a4f240c6600c60b" + sha256 cellar: :any, ventura: "ad8b5e6d2c65c9d503d57401856729551a993e34d6201f396a52c8e811f349b4" + sha256 arm64_linux: "e2e97c4de86dffae54d79bcf9afd9283e1014968dc67b426e57a963c69232e9a" + sha256 x86_64_linux: "fac2d3e5ddb3dde86764be8ae0072842f3c985c7393ca3fc75fba495f72ad2d1" + end + + depends_on "boost" + uses_from_macos "ncurses" + + # Fix compilation with Boost >= 1.65, remove for next release + patch do + url "https://github.com/fph/bastet/commit/0e03f8d4.patch?full_index=1" + sha256 "9b937d070a4faf150f60f82ace790c7a1119cff0685b52edf579740d2c415d7b" + end + + def install + inreplace %w[Config.cpp bastet.6], "/var", var + + ENV.append "CXX", "-std=c++14" + + system "make", "all" + + # this must exist for games to be saved globally + (var/"games").mkpath + touch "#{var}/games/bastet.scores2" + + bin.install "bastet" + man6.install "bastet.6" + end + + test do + pid = fork do + exec bin/"bastet" + end + sleep 3 + + assert_path_exists bin/"bastet" + assert_predicate bin/"bastet", :executable? + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/b/basti.rb b/Formula/b/basti.rb new file mode 100644 index 0000000000000..396ae808dd9fe --- /dev/null +++ b/Formula/b/basti.rb @@ -0,0 +1,42 @@ +class Basti < Formula + desc "Securely connect to RDS, Elasticache, and other AWS resources in VPCs" + homepage "https://github.com/basti-app/basti" + url "https://registry.npmjs.org/basti/-/basti-1.7.2.tgz" + sha256 "92937b3bf012ea34a0435b21dce634ecff724c9a1580ecf0a3850f1365ce5e7e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c93ea7546c6c4ed6f890169f332f28810658e4b68d864f965f2e77214e7b445b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c93ea7546c6c4ed6f890169f332f28810658e4b68d864f965f2e77214e7b445b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c93ea7546c6c4ed6f890169f332f28810658e4b68d864f965f2e77214e7b445b" + sha256 cellar: :any_skip_relocation, sonoma: "5a5cc4bd8ada263464e590c898b0dd980e35b8d53fa68a5fce9fde2897e5d6ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "04d05f5fab473c324a8e001be4b880ba1c129e0e3b15e766c71179787352b784" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebb576e2bda22c4bf10be9e06b9f2d5ba2ddd906cb53580ca2113865f6b6539f" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binary, session-manager-plugin + node_modules = libexec/"lib/node_modules/basti/node_modules" + node_modules.glob("basti-session-manager-binary-*/*").each do |f| + next if f.arch == Hardware::CPU.arch + + rm f + end + + generate_completions_from_executable(bin/"basti", "completion", + shells: [:bash, :zsh], + shell_parameter_format: :none) + end + + test do + output = shell_output("#{bin}/basti cleanup") + assert_match "No Basti-managed resources found in your account", output + + assert_match version.to_s, shell_output("#{bin}/basti --version") + end +end diff --git a/Formula/b/bat-extras.rb b/Formula/b/bat-extras.rb new file mode 100644 index 0000000000000..e9b8b1573f93b --- /dev/null +++ b/Formula/b/bat-extras.rb @@ -0,0 +1,38 @@ +class BatExtras < Formula + desc "Bash scripts that integrate bat with various command-line tools" + homepage "https://github.com/eth-p/bat-extras" + url "https://github.com/eth-p/bat-extras/archive/refs/tags/v2024.08.24.tar.gz" + sha256 "2ff1b9104134f10721ef36580150365e94546e5b41b9a2a6eaa4851c5959b487" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7695a2dcd409140a509215697b685659f50cf73d177b981fb8b3ab081ceeb38b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88a1916fda3f274a6572ab61bc490a502d219ebfc0d8c6a876be3508f2512250" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f77d56bf671e40f980d54be6fe95db9b75b4846544d1551366a7c952972d864" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ffbc0b06365560c945e7ba27da1e9416e2b28ee1dbc719d63672f797293668c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2887dfd67a998d9fc5e9631463074f2361dea63e878bb1b8f6cafda07c1cada4" + sha256 cellar: :any_skip_relocation, sonoma: "ad0c1049cd4c49a98517ab67a2bf6f9e5b4304ff26e2b930216e3badb069a054" + sha256 cellar: :any_skip_relocation, ventura: "eba7f97907ba5dc853dcbbcaa038d5e6f77e1929e50088c715ba51476de51855" + sha256 cellar: :any_skip_relocation, monterey: "cb838dc35e747b7510d75e919449059858f676d31265acaa5445d234e759902f" + sha256 cellar: :any_skip_relocation, arm64_linux: "474398e0365c6378393ee7eaa78eb8e453ffa325f3082e6f7a304180bddbcf06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "493e6115711432e8e2cc3527b3660bb47762a7e609d16dbdc19cbe8d6fb61307" + end + + depends_on "bat" => [:build, :test] + depends_on "shfmt" => :build + depends_on "ripgrep" => :test + + def install + system "./build.sh", "--prefix=#{prefix}", "--minify", "all", "--install" + end + + test do + system bin/"prettybat < /dev/null" + system bin/"batgrep", "/usr/bin/env", bin + end +end diff --git a/Formula/b/bat.rb b/Formula/b/bat.rb new file mode 100644 index 0000000000000..27b2760f9e19d --- /dev/null +++ b/Formula/b/bat.rb @@ -0,0 +1,50 @@ +class Bat < Formula + desc "Clone of cat(1) with syntax highlighting and Git integration" + homepage "https://github.com/sharkdp/bat" + url "https://github.com/sharkdp/bat/archive/refs/tags/v0.26.0.tar.gz" + sha256 "ccf3e2b9374792f88797a28ce82451faeae0136037cb8c8b56ba0a6c1a94fd69" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/bat.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c49743f75958c8333a3ef923906045bca3cfb890659b87b3d38f1ab9ffa0496" + sha256 cellar: :any, arm64_sequoia: "b07dd7fec6a90bdb42c73b5dc4ee330570610810c8cd397e3bd4171a22aaef14" + sha256 cellar: :any, arm64_sonoma: "fab51c86bad02391ff22d8b6fa8225b2ee5588236cffd1c13fa882340d9403a2" + sha256 cellar: :any, sonoma: "4b147697e73d74adf80ef3e3b1bc6c5b3e09538f16d66ee783a5d86d5acf1f7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "1eac312a8a8e8c7c1357cfcd2facd210de2872cf376083f370ee1977d09f1cbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8694f4ab8f7dde1dbb026624d83410efb4788ff10fcc39f508d46f4a3f65d44" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + depends_on "oniguruma" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["RUSTONIG_DYNAMIC_LIBONIG"] = "1" + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + + system "cargo", "install", *std_cargo_args + + assets = buildpath.glob("target/release/build/bat-*/out/assets").first + man1.install assets/"manual/bat.1" + generate_completions_from_executable(bin/"bat", "--completion") + end + + test do + require "utils/linkage" + + pdf = test_fixtures("test.pdf") + output = shell_output("#{bin}/bat #{pdf} --color=never") + assert_match "Homebrew test", output + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["oniguruma"].opt_lib/shared_library("libonig"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"bat", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/b/batik.rb b/Formula/b/batik.rb new file mode 100644 index 0000000000000..84c3cea60d09e --- /dev/null +++ b/Formula/b/batik.rb @@ -0,0 +1,32 @@ +class Batik < Formula + desc "Java-based toolkit for SVG images" + homepage "https://xmlgraphics.apache.org/batik/" + url "https://www.apache.org/dyn/closer.lua?path=xmlgraphics/batik/binaries/batik-bin-1.19.tar.gz" + mirror "https://archive.apache.org/dist/xmlgraphics/batik/binaries/batik-bin-1.19.tar.gz" + sha256 "d4abb3845484bfe189a80f37419b94c77e66bd4b8bb9e5bf72ce70bc865edb22" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "acd7a808bfc88b232db45029fa1f85609d72b2f313cdf2e2b17a6c8f6e38c011" + end + + depends_on "openjdk" + + def install + libexec.install "lib", Dir["*.jar"] + Dir[libexec/"*.jar"].each do |f| + bin.write_jar_script f, File.basename(f, "-#{version}.jar") + end + end + + test do + font_path = if OS.mac? + "/Library/Fonts/Arial Unicode.ttf" + else + "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" + end + system bin/"batik-ttf2svg", font_path, "-autorange", + "-o", "Arial.svg", "-testcard" + assert_match "abcdefghijklmnopqrstuvwxyz", File.read("Arial.svg") + end +end diff --git a/Formula/b/bats-core.rb b/Formula/b/bats-core.rb new file mode 100644 index 0000000000000..af375f73fb9e0 --- /dev/null +++ b/Formula/b/bats-core.rb @@ -0,0 +1,34 @@ +class BatsCore < Formula + desc "Bash Automated Testing System" + homepage "https://github.com/bats-core/bats-core" + url "https://github.com/bats-core/bats-core/archive/refs/tags/v1.12.0.tar.gz" + sha256 "e36b020436228262731e3319ed013d84fcd7c4bd97a1b34dee33d170e9ae6bab" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "f044362c7a483163c2b7498130fbbf76f6e081cf025e5ed25a15817fdeec130a" + end + + depends_on "coreutils" + + uses_from_macos "bc" => :test + + def install + system "./install.sh", prefix + end + + test do + (testpath/"test.sh").write <<~SHELL + @test "addition using bc" { + result="$(echo 2+2 | bc)" + [ "$result" -eq 4 ] + } + SHELL + assert_match "addition", shell_output("#{bin}/bats test.sh") + end +end diff --git a/Formula/b/batt.rb b/Formula/b/batt.rb new file mode 100644 index 0000000000000..94dc13f51880c --- /dev/null +++ b/Formula/b/batt.rb @@ -0,0 +1,62 @@ +class Batt < Formula + desc "Control and limit battery charging on Apple Silicon MacBooks" + homepage "https://github.com/charlie0129/batt" + url "https://github.com/charlie0129/batt.git", + tag: "v0.5.3", + revision: "9c9e5e3ef4b1edd93d050aaddd5f9b91ddb6c1ac" + license "GPL-2.0-only" + head "https://github.com/charlie0129/batt.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "95fb5d9ac1f66a3d7948e4074f6a56f243c20e844f52f9fca8f0be1d99f58bec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c64da77e60b194d9947509ddc13c3f96bcaf95a4d631c56a0cfa0429a99d688" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "233a0501c14a1786182fbef62b09fe6c3eee8f7a36c2c8573e287cb07855a23a" + end + + depends_on "go" => :build + depends_on arch: :arm64 + depends_on :macos + + def install + # Point to the correct path for the binary + inreplace "hack/cc.chlc.batt.plist", "/path/to/batt", opt_bin/"batt" + # Limit config path to Homebrew prefix. + system "plutil", "-insert", "ProgramArguments", + "-string", "--config=#{etc}/batt.json", "-append", + "--", "hack/cc.chlc.batt.plist" + # Allow non-root access to the battery controller. + system "plutil", "-insert", "ProgramArguments", + "-string", "--always-allow-non-root-access", "-append", + "--", "hack/cc.chlc.batt.plist" + # Due to local changes version tag would show vx.x.x-dirty, override VERSION. + # GOTAGS is set to disable built-in install/uninstall commands when building for Homebrew. + system "make", "GOTAGS=brew", "VERSION=v#{version}" + bin.install "bin/batt" + prefix.install "hack/cc.chlc.batt.plist" + end + + def caveats + <<~EOS + The batt service must be running before most of batt's commands will work. + EOS + end + + service do + name macos: "cc.chlc.batt" + require_root true + end + + test do + # batt is only meaningful on Mac laptops. There is not much we can test + # in a VM. + assert_match "operation not permitted", # Non-root daemon cannot listen in /var/run + shell_output("#{bin}/batt daemon --config=#{etc}/batt.json 2>&1", 1) # Non-root daemon exits with 1 + assert_match "batt daemon is not running", + shell_output("#{bin}/batt status 2>&1", 1) # Cannot connect to daemon + end +end diff --git a/Formula/b/bazarr.rb b/Formula/b/bazarr.rb new file mode 100644 index 0000000000000..25b43b6f6998c --- /dev/null +++ b/Formula/b/bazarr.rb @@ -0,0 +1,130 @@ +class Bazarr < Formula + include Language::Python::Virtualenv + + desc "Companion to Sonarr and Radarr for managing and downloading subtitles" + homepage "https://www.bazarr.media" + url "https://github.com/morpheus65535/bazarr/releases/download/v1.5.2/bazarr.zip" + sha256 "63519d9855e5b84c947b18d72fa36dfa9341a040879d1079bfde2fabfe8ab30e" + license "GPL-3.0-or-later" + head "https://github.com/morpheus65535/bazarr.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13dad9508cc54bb3b14425ad8005711bc2b97bd5471aa945898839d06990ee5c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cd7fac278c1f29e5c97f6359b192f597167e1c2c15f2e55a4865b0f7aaca457" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b08939f323b7d8c26c67caf75cbf05e8ef8c256902968d17e85041f4bfe190a" + sha256 cellar: :any_skip_relocation, sonoma: "709e694a1793dbcdb469354ff11cad0063778cdcd27bf9f017e097cebe26a5a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "0edcee85ccdc5aab7f8cd238ad2e06c6547a66955fb573895d755e102ec9802c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7aaae675cc693e2cb388c076d3f1fb71dc959bd3f26778df7058ef05535ae53" + end + + depends_on "node" => :build + depends_on "ffmpeg" + depends_on "numpy" + depends_on "pillow" => :no_linkage + depends_on "python@3.14" + depends_on "unar" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + uses_from_macos "zlib" + + pypi_packages package_name: "", + extra_packages: ["lxml", "setuptools", "webrtcvad-wheels"] + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "webrtcvad-wheels" do + url "https://files.pythonhosted.org/packages/28/ba/3a8ce2cff3eee72a39ed190e5f9dac792da1526909c97a11589590b21739/webrtcvad_wheels-2.0.14.tar.gz" + sha256 "5f59c8e291c6ef102d9f39532982fbf26a52ce2de6328382e2654b0960fea397" + end + + def install + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + + if build.head? + # Build front-end. + cd buildpath/"frontend" do + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "build" + end + end + + # Stop program from automatically downloading its own binaries. + binaries_file = buildpath/"bazarr/utilities/binaries.json" + binaries_file.unlink + binaries_file.write "[]" + + # Prevent strange behavior of searching for a different python executable on macOS, + # which won't have the required dependencies + inreplace "bazarr.py", "def get_python_path():", "def get_python_path():\n return sys.executable" + + libexec.install Dir["*"] + (bin/"bazarr").write_env_script venv.root/"bin/python", "#{libexec}/bazarr.py", + NO_UPDATE: "1", + PATH: "#{Formula["ffmpeg"].opt_bin}:#{HOMEBREW_PREFIX}/bin:${PATH}", + PYTHONPATH: venv.site_packages + + pkgvar = var/"bazarr" + pkgvar.mkpath + pkgvar.install_symlink pkgetc => "config" + + pkgetc.mkpath + cp Dir[libexec/"data/config/*"], pkgetc + + libexec.install_symlink pkgvar => "data" + + (buildpath/"config.ini").write <<~INI + [backup] + folder = #{pkgvar}/backup + INI + pkgetc.install "config.ini" + end + + service do + run opt_bin/"bazarr" + keep_alive true + require_root true + log_path var/"log/bazarr.log" + error_log_path var/"log/bazarr.log" + end + + test do + require "open3" + require "timeout" + + system bin/"bazarr", "--help" + + (testpath/"config/config.ini").write <<~INI + [backup] + folder = #{testpath}/custom_backup + INI + + port = free_port + + Open3.popen3(bin/"bazarr", "--no-update", "--config", testpath, "--port", port.to_s) do |_, _, stderr, wait_thr| + Timeout.timeout(45) do + stderr.each do |line| + refute_match "ERROR", line unless line.match? "Error trying to get releases from Github" + break if line.include? "BAZARR is started and waiting for requests on: http://0.0.0.0:#{port}" + end + assert_match "Bazarr", shell_output("curl --silent http://localhost:#{port}") + end + ensure + Process.kill "TERM", wait_thr.pid + end + + assert_path_exists (testpath/"config/config.ini.old") + assert_includes (testpath/"config/config.yaml").read, "#{testpath}/custom_backup" + assert_match "BAZARR is started and waiting for request", (testpath/"log/bazarr.log").read + end +end diff --git a/Formula/b/bazel-diff.rb b/Formula/b/bazel-diff.rb new file mode 100644 index 0000000000000..d193b90a79b5d --- /dev/null +++ b/Formula/b/bazel-diff.rb @@ -0,0 +1,24 @@ +class BazelDiff < Formula + desc "Performs Bazel Target Diffing between two revisions in Git" + homepage "https://github.com/Tinder/bazel-diff/" + url "https://github.com/Tinder/bazel-diff/releases/download/12.1.0/bazel-diff_deploy.jar" + sha256 "73a6540ef4684c8e1bac79efc4971a618556e04230338ef0a8b5cc3289a1621a" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e727d8c6bb1a529307a86ab20a771daad81488d67163250ae4f306ed5b27b714" + end + + depends_on "bazel" => :test + depends_on "openjdk" + + def install + libexec.install "bazel-diff_deploy.jar" + bin.write_jar_script libexec/"bazel-diff_deploy.jar", "bazel-diff" + end + + test do + output = shell_output("#{bin}/bazel-diff generate-hashes --workspacePath=#{testpath} 2>&1", 1) + assert_match "ERROR: The 'info' command is only supported from within a workspace", output + end +end diff --git a/Formula/b/bazel-remote.rb b/Formula/b/bazel-remote.rb new file mode 100644 index 0000000000000..9d4090d2ebd36 --- /dev/null +++ b/Formula/b/bazel-remote.rb @@ -0,0 +1,38 @@ +class BazelRemote < Formula + desc "Remote cache for Bazel" + homepage "https://github.com/buchgr/bazel-remote/" + url "https://github.com/buchgr/bazel-remote/archive/refs/tags/v2.6.1.tar.gz" + sha256 "7e554caa4c9c7033459acc053ee8470208012223e72c81aabe2b48fb0e6c3fbc" + license "Apache-2.0" + head "https://github.com/buchgr/bazel-remote.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2938e4a481635cdd39a709bea02ae00526d5a787f650e8f48580f7dd54d6680d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f178f73163a7e5ce8c6e9e62d2d908d0a7c625f1e328503bd3b5aad8fe323145" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "95ae768b03b5831ff2354090c2b35868184f7d6ae1f979e9a29c138697b12c66" + sha256 cellar: :any_skip_relocation, sonoma: "5146c3be66190b6c9261402cd452e5b76599a4c585d279eb287ae762035ccdf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6130ae2d7c9df9b569c8ec35f5348ddb9386723a4c203872ce3f2ee3fdb4d0e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0fcc2d87fe990f1c6cc2385e2f10a08a9e16580282782ea0fcde57725284680" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.gitCommit=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + ENV["BAZEL_REMOTE_DIR"] = "test" + ENV["BAZEL_REMOTE_MAX_SIZE"] = "10" + + begin + pid = fork { exec bin/"bazel-remote" } + sleep 2 + assert_path_exists testpath/"test", "Failed to create test directory" + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/b/bazel.rb b/Formula/b/bazel.rb new file mode 100644 index 0000000000000..42a92304db80c --- /dev/null +++ b/Formula/b/bazel.rb @@ -0,0 +1,159 @@ +class Bazel < Formula + desc "Google's own build tool" + homepage "https://bazel.build/" + url "https://github.com/bazelbuild/bazel/releases/download/8.4.2/bazel-8.4.2-dist.zip" + sha256 "416055473d60768a94ade34a63fb9789dc01473eaf22c39b153af259ba369766" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a136922587e05a6d6d961a0a472519b980beabc0a21ce47bac3c1561342df8f7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3f2d220d1a574753273fa4e6e15f3ca358d5150e5ae7ebebb84d47cacbfbceb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "01889aeb02ead1bad98d2167ef5feb392dec4c4d7d9c18f8b678597915bc8595" + sha256 cellar: :any_skip_relocation, sonoma: "19c3199c0fbd0a49f7fd6687536e3dbbe088c6b7d26856f477f9820c29dd8476" + sha256 cellar: :any_skip_relocation, arm64_linux: "19e8a087faf77195f9652dca5108cf3ad765a12f9bcd2dd835e2772ad29bc096" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c4587ba5ee889c966f2cdf9f287016e72ffbacc922b9066be021015f5d79caf" + end + + depends_on "openjdk@21" + + uses_from_macos "python" => :build + uses_from_macos "unzip" + uses_from_macos "zip" + + on_linux do + on_arm do + # Workaround for "/usr/bin/ld.gold: internal error in try_fix_erratum_843419_optimized" + # Issue ref: https://sourceware.org/bugzilla/show_bug.cgi?id=31182 + depends_on "lld" => :build + + # We use a workaround to prevent modification of the `bazel-real` binary + # but this means brew cannot rewrite paths for non-default prefix + pour_bottle? only_if: :default_prefix + end + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + conflicts_with "bazelisk", because: "Bazelisk replaces the bazel binary" + + def bazel_real + libexec/"bin/bazel-real" + end + + def install + java_home_env = Language::Java.java_home_env("21") + + ENV["EMBED_LABEL"] = "#{version}-homebrew" + # Force Bazel ./compile.sh to put its temporary files in the buildpath + ENV["BAZEL_WRKDIR"] = buildpath/"work" + # Force Bazel to use brew OpenJDK + extra_bazel_args = ["--tool_java_runtime_version=local_jdk"] + ENV.merge! java_home_env.transform_keys(&:to_s) + # Bazel clears environment variables which breaks superenv shims + ENV.remove "PATH", Superenv.shims_path + + # Workaround to build zlib < 1.3.1 with Apple Clang 1700 + # https://releases.llvm.org/18.1.0/tools/clang/docs/ReleaseNotes.html#clang-frontend-potentially-breaking-changes + # Issue ref: https://github.com/bazelbuild/bazel/issues/25124 + if DevelopmentTools.clang_build_version >= 1700 + extra_bazel_args += %w[--copt=-fno-define-target-os-macros --host_copt=-fno-define-target-os-macros] + end + + # Set dynamic linker similar to cc shim so that bottle works on older Linux + if OS.linux? && build.bottle? && ENV["HOMEBREW_DYNAMIC_LINKER"] + extra_bazel_args << "--linkopt=-Wl,--dynamic-linker=#{ENV["HOMEBREW_DYNAMIC_LINKER"]}" + end + + if OS.linux? && Hardware::CPU.arch == :arm64 + extra_bazel_args << "--linkopt=-fuse-ld=lld" + extra_bazel_args << "--host_linkopt=-fuse-ld=lld" + end + + ENV["EXTRA_BAZEL_ARGS"] = extra_bazel_args.join(" ") + + (buildpath/"sources").install buildpath.children + + cd "sources" do + system "./compile.sh" + system "./output/bazel", "--output_user_root=#{buildpath}/output_user_root", + "build", + *extra_bazel_args, + "scripts:bash_completion", + "scripts:fish_completion" + + bin.install "scripts/packages/bazel.sh" => "bazel" + ln_s bazel_real, bin/"bazel-#{version}" + (libexec/"bin").install "output/bazel" => "bazel-real" + bin.env_script_all_files libexec/"bin", java_home_env + + bash_completion.install "bazel-bin/scripts/bazel-complete.bash" => "bazel" + zsh_completion.install "scripts/zsh_completion/_bazel" + fish_completion.install "bazel-bin/scripts/bazel.fish" + end + + # Workaround to avoid breaking the zip-appended `bazel-real` binary. + # Can remove if brew correctly handles these binaries or if upstream + # provides an alternative in https://github.com/bazelbuild/bazel/issues/11842 + if OS.linux? && build.bottle? + Utils::Gzip.compress(bazel_real) + bazel_real.write <<~SHELL + #!/bin/bash + echo 'ERROR: Need to run `brew postinstall #{name}`' >&2 + exit 1 + SHELL + bazel_real.chmod 0755 + end + end + + def post_install + if File.exist?("#{bazel_real}.gz") + rm(bazel_real) + system "gunzip", "#{bazel_real}.gz" + bazel_real.chmod 0755 + end + end + + test do + touch testpath/"WORKSPACE" + + (testpath/"ProjectRunner.java").write <<~JAVA + public class ProjectRunner { + public static void main(String args[]) { + System.out.println("Hi!"); + } + } + JAVA + + (testpath/"BUILD").write <<~STARLARK + java_binary( + name = "bazel-test", + srcs = glob(["*.java"]), + main_class = "ProjectRunner", + ) + STARLARK + + # Explicitly disable repo contents cache + system bin/"bazel", "build", "//:bazel-test", "--repo_contents_cache=" + assert_equal "Hi!\n", shell_output("bazel-bin/bazel-test") + + # Verify that `bazel` invokes Bazel's wrapper script, which delegates to + # project-specific `tools/bazel` if present. Invoking `bazel-VERSION` + # bypasses this behavior. + (testpath/"tools/bazel").write <<~SHELL + #!/bin/bash + echo "stub-wrapper" + exit 1 + SHELL + (testpath/"tools/bazel").chmod 0755 + + assert_equal "stub-wrapper\n", shell_output("#{bin}/bazel --version", 1) + assert_equal "bazel #{version}-homebrew\n", shell_output("#{bin}/bazel-#{version} --version") + end +end diff --git a/Formula/b/bazel@7.rb b/Formula/b/bazel@7.rb new file mode 100644 index 0000000000000..2f5ee8c4811a0 --- /dev/null +++ b/Formula/b/bazel@7.rb @@ -0,0 +1,139 @@ +class BazelAT7 < Formula + desc "Google's own build tool" + homepage "https://bazel.build/" + url "https://github.com/bazelbuild/bazel/releases/download/7.7.0/bazel-7.7.0-dist.zip" + sha256 "277946818c77fff70be442864cecc41faac862b6f2d0d37033e2da0b1fee7e0f" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(7(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5ba0c8ebc46aff52de4e7d75f89822f5a49e6cfb390146cd0852c4872be8a3b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b68187e8e26d7191c0916eb7565fb725390a4f147c9d7ceefca7cc3bffe447e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "819913a02673746b9600a809bd0bbfef76dd6bfba5e57560ef481d7bac607dfc" + sha256 cellar: :any_skip_relocation, sonoma: "e6d6d7c876080eb9b0b2008933b74f3b63043cb323a17092a66a2f6b9b47b9fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "11e6ed5d3acdaa4b2e3159c0d4ce6d9d97905aef6b5fe68bed0406b655c2b064" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab264b63ffceb8eb00fc967402fa6ac155c386a7f533e53b72fa3b28e6ce25b2" + end + + keg_only :versioned_formula + + # https://bazel.build/release#support-matrix + deprecate! date: "2027-01-01", because: :unsupported + + depends_on "openjdk@21" + + uses_from_macos "python" => :build + uses_from_macos "unzip" + uses_from_macos "zip" + + on_linux do + # We use a workaround to prevent modification of the `bazel-real` binary + # but this means brew cannot rewrite paths for non-default prefix + pour_bottle? only_if: :default_prefix + end + + def bazel_real + libexec/"bin/bazel-real" + end + + def install + java_home_env = Language::Java.java_home_env("21") + + ENV["EMBED_LABEL"] = "#{version}-homebrew" + # https://github.com/bazelbuild/bazel/issues/27401 + ENV["BAZEL_DEV_VERSION_OVERRIDE"] = ENV["EMBED_LABEL"] + # Force Bazel ./compile.sh to put its temporary files in the buildpath + ENV["BAZEL_WRKDIR"] = buildpath/"work" + # Force Bazel to use brew OpenJDK + extra_bazel_args = ["--tool_java_runtime_version=local_jdk"] + ENV.merge! java_home_env.transform_keys(&:to_s) + # Bazel clears environment variables which breaks superenv shims + ENV.remove "PATH", Superenv.shims_path + + # Set dynamic linker similar to cc shim so that bottle works on older Linux + if OS.linux? && build.bottle? && ENV["HOMEBREW_DYNAMIC_LINKER"] + extra_bazel_args << "--linkopt=-Wl,--dynamic-linker=#{ENV["HOMEBREW_DYNAMIC_LINKER"]}" + end + ENV["EXTRA_BAZEL_ARGS"] = extra_bazel_args.join(" ") + + (buildpath/"sources").install buildpath.children + + cd "sources" do + system "./compile.sh" + system "./output/bazel", "--output_user_root=#{buildpath}/output_user_root", + "build", + "scripts:bash_completion", + "scripts:fish_completion" + + bin.install "scripts/packages/bazel.sh" => "bazel" + ln_s bazel_real, bin/"bazel-#{version}" + (libexec/"bin").install "output/bazel" => "bazel-real" + bin.env_script_all_files libexec/"bin", java_home_env + + bash_completion.install "bazel-bin/scripts/bazel-complete.bash" => "bazel" + zsh_completion.install "scripts/zsh_completion/_bazel" + fish_completion.install "bazel-bin/scripts/bazel.fish" + end + + # Workaround to avoid breaking the zip-appended `bazel-real` binary. + # Can remove if brew correctly handles these binaries or if upstream + # provides an alternative in https://github.com/bazelbuild/bazel/issues/11842 + if OS.linux? && build.bottle? + Utils::Gzip.compress(bazel_real) + bazel_real.write <<~SHELL + #!/bin/bash + echo 'ERROR: Need to run `brew postinstall #{name}`' >&2 + exit 1 + SHELL + bazel_real.chmod 0755 + end + end + + def post_install + if File.exist?("#{bazel_real}.gz") + rm(bazel_real) + system "gunzip", "#{bazel_real}.gz" + bazel_real.chmod 0755 + end + end + + test do + touch testpath/"WORKSPACE" + + (testpath/"ProjectRunner.java").write <<~JAVA + public class ProjectRunner { + public static void main(String args[]) { + System.out.println("Hi!"); + } + } + JAVA + + (testpath/"BUILD").write <<~STARLARK + java_binary( + name = "bazel-test", + srcs = glob(["*.java"]), + main_class = "ProjectRunner", + ) + STARLARK + + system bin/"bazel", "build", "//:bazel-test" + assert_equal "Hi!\n", shell_output("bazel-bin/bazel-test") + + # Verify that `bazel` invokes Bazel's wrapper script, which delegates to + # project-specific `tools/bazel` if present. Invoking `bazel-VERSION` + # bypasses this behavior. + (testpath/"tools/bazel").write <<~SHELL + #!/bin/bash + echo "stub-wrapper" + exit 1 + SHELL + (testpath/"tools/bazel").chmod 0755 + + assert_equal "stub-wrapper\n", shell_output("#{bin}/bazel --version", 1) + assert_equal "bazel #{version}-homebrew\n", shell_output("#{bin}/bazel-#{version} --version") + end +end diff --git a/Formula/b/bazelisk.rb b/Formula/b/bazelisk.rb new file mode 100644 index 0000000000000..5edc25d44fa47 --- /dev/null +++ b/Formula/b/bazelisk.rb @@ -0,0 +1,50 @@ +class Bazelisk < Formula + desc "User-friendly launcher for Bazel" + homepage "https://github.com/bazelbuild/bazelisk/" + url "https://github.com/bazelbuild/bazelisk/archive/refs/tags/v1.27.0.tar.gz" + sha256 "d4abfac1a39876ec1e6c6fa04ec0b62cc4bef174f11d19848bc80dc15ee05261" + license "Apache-2.0" + head "https://github.com/bazelbuild/bazelisk.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e92a349b08740b3610079e799d5f80870a912790bff674a2da456859d38697a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "793f2de5437dab04d53985229024b5ebd8f53c08932df8777da135c71356d745" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "793f2de5437dab04d53985229024b5ebd8f53c08932df8777da135c71356d745" + sha256 cellar: :any_skip_relocation, arm64_ventura: "793f2de5437dab04d53985229024b5ebd8f53c08932df8777da135c71356d745" + sha256 cellar: :any_skip_relocation, sonoma: "1c0aa4a5126a4ada7dc36f18f01ddad84e448c275cde3d75423586ced6c5343e" + sha256 cellar: :any_skip_relocation, ventura: "1c0aa4a5126a4ada7dc36f18f01ddad84e448c275cde3d75423586ced6c5343e" + sha256 cellar: :any_skip_relocation, arm64_linux: "26fb1ee2c4bf8f45e51e3a53d8503c2c60c50139b9d9a333e11fa0ed4904ffb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3030c623242031fd6262a4eaea9919f3f7941376b2cdc192f88c21fa48b11d5" + end + + depends_on "go" => :build + + conflicts_with "bazel", because: "Bazelisk replaces the bazel binary" + + resource "bazel_zsh_completion" do + url "https://raw.githubusercontent.com/bazelbuild/bazel/036e5337f63d967bb4f5fea78dc928d16d0b213c/scripts/zsh_completion/_bazel" + sha256 "4094dc84add2f23823bc341186adf6b8487fbd5d4164bd52d98891c41511eba4" + end + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/bazelbuild/bazelisk/core.BazeliskVersion=#{version}") + + bin.install_symlink "bazelisk" => "bazel" + + resource("bazel_zsh_completion").stage do + zsh_completion.install "_bazel" + end + end + + test do + ENV["USE_BAZEL_VERSION"] = system_version = Formula["bazel"].version + output = shell_output("#{bin}/bazelisk version") + assert_match "Bazelisk version: #{version}", output + assert_match "Build label: #{system_version}", output + + # Test an older version that bazelisk will fetch + ENV["USE_BAZEL_VERSION"] = fetched_version = "7.6.1" + assert_match "Build label: #{fetched_version}", shell_output("#{bin}/bazelisk version") + end +end diff --git a/Formula/b/bb-cli.rb b/Formula/b/bb-cli.rb new file mode 100644 index 0000000000000..ddc13ffc8f8ac --- /dev/null +++ b/Formula/b/bb-cli.rb @@ -0,0 +1,22 @@ +class BbCli < Formula + desc "Bitbucket Rest API CLI written in pure PHP" + homepage "https://bb-cli.github.io" + url "https://github.com/bb-cli/bb-cli/releases/download/1.3.4/bb" + sha256 "6c6c5e64b67b113d8d2249bc153303044a94a60c6017e3ed392c3a4087f54c02" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e6e39224aa02067b7a78bfc90146384a68c1c80afd67c013e70ae0e6b97740ee" + end + + depends_on "php" + + def install + bin.install "bb" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bb version") + assert_match "No git repository found in current directory.", shell_output("#{bin}/bb pr 2>&1", 1) + end +end diff --git a/Formula/b/bbe.rb b/Formula/b/bbe.rb new file mode 100644 index 0000000000000..264ea99c759bc --- /dev/null +++ b/Formula/b/bbe.rb @@ -0,0 +1,38 @@ +class Bbe < Formula + desc "Sed-like editor for binary files" + homepage "https://sourceforge.net/projects/bbe-/" + url "https://downloads.sourceforge.net/project/bbe-/bbe/0.2.2/bbe-0.2.2.tar.gz" + sha256 "baaeaf5775a6d9bceb594ea100c8f45a677a0a7d07529fa573ba0842226edddb" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8fd3005bedec280a143b22eb15bb126055e121ba0e1db118108c0878104263c9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a207fd77fb072a948ca2261b0b2968e98932bea8c7afa112d310c6a6d9739d39" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da94323f0ee1b72c623dd63f3198dd8e25e0cb627277ff1bfeb9c81373441be5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e1c7ca0dd8b2f4c9161de533964c1d783b3e09c9a108880d87236db9a7401eab" + sha256 cellar: :any_skip_relocation, arm64_monterey: "095d439542aced7baf7f5994fe1d8ca64da82039222c1c083d09262cf559d4a4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7181a956a065ea4b793431041e45cc04d217a7c64a579dcf1c7078249ee579ab" + sha256 cellar: :any_skip_relocation, sonoma: "e82c72f757c617bc346b5702fe9333902e157042f4516acbb17d53164ecb5d16" + sha256 cellar: :any_skip_relocation, ventura: "81e9cc86f064e0e4a4b7dd44b6752a8f8643ba70dca6f08ae66dce92d4de58bd" + sha256 cellar: :any_skip_relocation, monterey: "1a2799215e2d472a9ae04a451e486da0853b2861e3e9e04d274c8ba5e0c30f30" + sha256 cellar: :any_skip_relocation, big_sur: "677a07ce2e73761b8403033706a969d15bd89f98401054dccae350c0d9acdf6b" + sha256 cellar: :any_skip_relocation, catalina: "16ec8602703755894016b9ecd47ca9875a97c66ba259cdb8d7fa8902a17dd8d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "27f2ca2cf847bfde8d9ccba37c4678db988ac753755b97eec3da69f75092ba68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b683897c9241114a529a017dafad699e55a4bc3f19f1e3ef9bed408c8ee6c72f" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--disable-silent-rules", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"bbe", "--version" + end +end diff --git a/Formula/b/bbftp-client.rb b/Formula/b/bbftp-client.rb new file mode 100644 index 0000000000000..f4d9bf6544642 --- /dev/null +++ b/Formula/b/bbftp-client.rb @@ -0,0 +1,55 @@ +class BbftpClient < Formula + desc "Secure file transfer software, optimized for large files" + homepage "https://gitlab.in2p3.fr/cc-in2p3-hpss-service/bbftp" + url "https://pkg.freebsd.org/ports-distfiles/bbftp-client-3.2.1.tar.gz" + sha256 "4000009804d90926ad3c0e770099874084fb49013e8b0770b82678462304456d" + license "GPL-2.0-or-later" + revision 3 + head "https://gitlab.in2p3.fr/cc-in2p3-hpss-service/bbftp.git", branch: "master" + + livecheck do + url :head + regex(/^(?:BBFTP|Version)[._-]v?(\d+(?:[._-]\d+)+[a-z]?)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("_-", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3dbb17d63dccd104bc819c729ee8715c4a67e5d704e7101ce7a5465ef85bc916" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f705530c05b923cc4de503817876fc96cf776f351aae554a64b144aef23c729a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "00799fab3efd0fd9c823854c0113ec44d2c4d13d7c191d79165e0ddc75ec71e0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f99da3815fbef62edb3391bdf9dab41055ed1ace3f0b30cd69c45e719be6149" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d429a71fe3b54e34d75efd1480062c322cee2a9b471628a671de3e9f1b91b201" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bd7a47c27111d4dc064a7009f919a3283360738329dcfde7eb6522ee280e78fd" + sha256 cellar: :any_skip_relocation, sonoma: "86903930a6e0fc3e443e2520b0cbaa595203e1bc4f2475d7cb714dc5e28611b9" + sha256 cellar: :any_skip_relocation, ventura: "7808120a9bee27c473f0f59b5223c9d709add5ed8d8609992d51efb4288fb89c" + sha256 cellar: :any_skip_relocation, monterey: "e50848489c6ad43604cbc0730d027939830ddc50d46fdd8d18dc6f729a910503" + sha256 cellar: :any_skip_relocation, big_sur: "f30650734e1829a0c399153c78088ccd987f28ede25b8eb13ecde6b138d55076" + sha256 cellar: :any_skip_relocation, catalina: "6d5bed31d69a0ff2f38f2642176cb3c3a4da34c4ea2740567d2698ca62519b7d" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e66c60423d6fc1c8f8079b0197306d388cc3867b2817d64583004e6e4700325" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be2f6db3c1cc87a51bab6a760cb1143747faeb3819f731192f09fceb3a658fbd" + end + + uses_from_macos "zlib" + + def install + # Workaround for Xcode 14.3 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Fix ntohll errors; reported 14 Jan 2015. + ENV.append_to_cflags "-DHAVE_NTOHLL" if OS.mac? + + cd "bbftpc" do + system "./configure", "--without-ssl", *std_configure_args + system "make", "install" + end + end + + test do + system bin/"bbftp", "-v" + end +end diff --git a/Formula/b/bbot.rb b/Formula/b/bbot.rb new file mode 100644 index 0000000000000..365db35f8fc02 --- /dev/null +++ b/Formula/b/bbot.rb @@ -0,0 +1,333 @@ +class Bbot < Formula + include Language::Python::Virtualenv + + desc "OSINT automation tool" + homepage "https://github.com/blacklanternsecurity/bbot" + url "https://files.pythonhosted.org/packages/1a/09/df14cf3ff1043e0ffd8dfb64c8bf70b8c7ac59c19cf90be58ccd4c1f829c/bbot-2.7.2.tar.gz" + sha256 "be929ecc6d67255c501384228dff1f79e4450f8863cbdf07ce75435cbf8c0641" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "53a9991b09f74bf7a54a5748ee9c96203f816f0165a70098aa57a8866e3c07c2" + sha256 cellar: :any, arm64_sequoia: "0f1a6a5c9defa6d2caeb8fc87f260027172783d23fda998b91744bff497baa15" + sha256 cellar: :any, arm64_sonoma: "8aa0b93197ff9982e74cc34523c10bfd683e9c169c4246e27914baa12eabd260" + sha256 cellar: :any, sonoma: "0d4104ec58498832faebc69a9279322ba8fb410f394022fecd88d439e64b7431" + sha256 cellar: :any_skip_relocation, arm64_linux: "56b808884995c422c8d1e6e60df18e5097e2e7e6f6e0138abfa8a50445a011c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "237b8987f00f5a5828324c3e3bf372549a5c01241e5086a3ec19842666914259" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build # for orjson + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "zeromq" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["certifi", "cryptography", "pydantic-core"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/aa/20/036f20185b8a65de24b0759efa8666577804f42b31beccb96309c67aa6d4/ansible_core-2.19.3.tar.gz" + sha256 "243a69669a007be0794360bc4477f70e0128ce0091dc3af4c5cb81c6a466f573" + end + + resource "ansible-runner" do + url "https://files.pythonhosted.org/packages/aa/db/65b9e058807d313c495a6f4365cc11234d0391c5843659ddc27cc4bf1677/ansible_runner-2.4.2.tar.gz" + sha256 "331d4da8d784e5a76aa9356981c0255f4bb1ba640736efe84b0bd7c73a4ca420" + end + + resource "antlr4-python3-runtime" do + url "https://files.pythonhosted.org/packages/3e/38/7859ff46355f76f8d19459005ca000b6e7012f2f1ca597746cbcd1fbfe5e/antlr4-python3-runtime-4.9.3.tar.gz" + sha256 "f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cloudcheck" do + url "https://files.pythonhosted.org/packages/5b/24/e72b0dc3b219787a61cdd1ae1250d143227b73424c50c6ddfa7258f95914/cloudcheck-7.2.149.tar.gz" + sha256 "419c549581da2cb3e955f5fe4113724e25639b1678075f3aee56e8a68a865801" + end + + resource "deepdiff" do + url "https://files.pythonhosted.org/packages/19/76/36c9aab3d5c19a94091f7c6c6e784efca50d87b124bf026c36e94719f33c/deepdiff-8.6.1.tar.gz" + sha256 "ec56d7a769ca80891b5200ec7bd41eec300ced91ebcc7797b41eb2b3f3ff643a" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "lockfile" do + url "https://files.pythonhosted.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz" + sha256 "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mmh3" do + url "https://files.pythonhosted.org/packages/a7/af/f28c2c2f51f31abb4725f9a64bc7863d5f491f6539bd26aee2a1d21a649e/mmh3-5.2.0.tar.gz" + sha256 "1efc8fec8478e9243a78bb993422cf79f8ff85cb4cf6b79647480a31e0d950a8" + end + + resource "omegaconf" do + url "https://files.pythonhosted.org/packages/09/48/6388f1bb9da707110532cb70ec4d2822858ddfb44f1cdf1233c20a80ea4b/omegaconf-2.3.0.tar.gz" + sha256 "d5d4b6d29955cc50ad50c46dc269bcd92c6e00f5f90d23ab5fee7bfca4ba4cc7" + end + + resource "orderly-set" do + url "https://files.pythonhosted.org/packages/4a/88/39c83c35d5e97cc203e9e77a4f93bf87ec89cf6a22ac4818fdcc65d66584/orderly_set-5.5.0.tar.gz" + sha256 "e87185c8e4d8afa64e7f8160ee2c542a475b738bc891dc3f58102e654125e6ce" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/c6/fe/ed708782d6709cc60eb4c2d8a361a440661f74134675c72990f2c48c785f/orjson-3.11.4.tar.gz" + sha256 "39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "puremagic" do + url "https://files.pythonhosted.org/packages/dd/7f/9998706bc516bdd664ccf929a1da6c6e5ee06e48f723ce45aae7cf3ff36e/puremagic-1.30.tar.gz" + sha256 "f9ff7ac157d54e9cf3bff1addfd97233548e75e685282d84ae11e7ffee1614c9" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "python-daemon" do + url "https://files.pythonhosted.org/packages/3d/37/4f10e37bdabc058a32989da2daf29e57dc59dbc5395497f3d36d5f5e2694/python_daemon-3.1.2.tar.gz" + sha256 "f7b04335adc473de877f5117e26d5f1142f4c9f7cd765408f0877757be5afbf4" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/04/0b/3c9baedbdf613ecaa7aa07027780b8867f57b6293b6ee50de316c9f3222b/pyzmq-27.1.0.tar.gz" + sha256 "ac0765e3d44455adb6ddbf4417dcce460fc40a05978c08efdf2948072f6db540" + end + + resource "radixtarget" do + url "https://files.pythonhosted.org/packages/26/89/1c19b98c48f703fe654f3e7d8986556573fe412945f13842240b7cf87e9a/radixtarget-3.0.15.tar.gz" + sha256 "dedfad3aea1e973f261b7bc0d8936423f59ae4d082648fd496c6cdfdfa069fea" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/3c/f8/5dc70102e4d337063452c82e1f0d95e39abfe67aa222ed8a5ddeb9df8de8/requests_file-3.0.1.tar.gz" + sha256 "f14243d7796c588f3521bd423c5dea2ee4cc730e54a3cac9574d78aca1272576" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/1d/14/4669927e06631070edb968c78fdb6ce8992e27c9ab2cde4b3993e22ac7af/resolvelib-1.2.1.tar.gz" + sha256 "7d08a2022f6e16ce405d60b68c390f054efcfd0477d4b9bd019cc941c28fad1c" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/8d/48/49393a96a2eef1ab418b17475fb92b8fcfad83d099e678751b05472e69de/setproctitle-1.3.7.tar.gz" + sha256 "bc2bc917691c1537d5b9bca1468437176809c7e11e5694ca79a9ca12345dcb9e" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "socksio" do + url "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz" + sha256 "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac" + + # Unpin flit-core<3 to support 3.14+ + patch do + url "https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1.patch?full_index=1" + sha256 "7aefa906b62e2c9a8df255ea742ca97e155ac2e1238e49ce11e3e56e37ee1f8b" + end + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/7a/53/afac341569b3fd558bf2b5428e925e2eb8753ad9627c1f9188104c6e0c4a/tabulate-0.8.10.tar.gz" + sha256 "6c57f3f3dd7ac2782770155f3adb2db0b1a269637e42f27599925e64b114f519" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "wordninja" do + url "https://files.pythonhosted.org/packages/30/15/abe4af50f4be92b60c25e43c1c64d08453b51e46c32981d80b3aebec0260/wordninja-2.0.0.tar.gz" + sha256 "1a1cc7ec146ad19d6f71941ee82aef3d31221700f0d8bf844136cf8df79d281a" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + resource "xmltojson" do + url "https://files.pythonhosted.org/packages/c5/bd/7ff42737e3715eaf0e46714776c2ce75c0d509c7b2e921fa0f94d031a1ff/xmltojson-2.0.3.tar.gz" + sha256 "68a0022272adf70b8f2639186172c808e9502cd03c0b851a65e0760561c7801d" + end + + resource "xxhash" do + url "https://files.pythonhosted.org/packages/02/84/30869e01909fb37a6cc7e18688ee8bf1e42d57e7e0777636bd47524c43c7/xxhash-3.6.0.tar.gz" + sha256 "f0162a78b13a0d7617b2845b90c763339d1f1d82bb04a4b07f4ab535cc5e05d6" + end + + resource "yara-python" do + url "https://files.pythonhosted.org/packages/51/38/347d1fcde4edabd338d5872ca5759ccfb95ff1cf5207dafded981fd08c4f/yara_python-4.5.4.tar.gz" + sha256 "4c682170f3d5cb3a73aa1bd0dc9ab1c0957437b937b7a83ff6d7ffd366415b9c" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/bbot -s --version") + + assert_path_exists testpath/".config/bbot/bbot.yml" + assert_path_exists testpath/".config/bbot/secrets.yml" + end +end diff --git a/Formula/b/bbtools.rb b/Formula/b/bbtools.rb new file mode 100644 index 0000000000000..112547484433c --- /dev/null +++ b/Formula/b/bbtools.rb @@ -0,0 +1,46 @@ +class Bbtools < Formula + desc "Brian Bushnell's tools for manipulating reads" + homepage "https://jgi.doe.gov/data-and-tools/software-tools/bbtools/" + url "https://downloads.sourceforge.net/bbmap/BBMap_39.43.tar.gz" + sha256 "a45d292b2338299decfce9155edbae36b2c190570c5ab38b22a83051973e4deb" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "41ae01992e8f3273f0e2ccd9c50eb9bbf3226c90fd1d6a8a4b902794df194b2d" + sha256 cellar: :any, arm64_sequoia: "2318111bffa7b165d4a57128fa46d4c62efb169cd0351572e3495c9e8f2bfd7f" + sha256 cellar: :any, arm64_sonoma: "387d9e87fe768a5cd562eadd52761b79649002fbea2c0891483a3a9241b82ba5" + sha256 cellar: :any, sonoma: "863cc9c3d519b13ab27e57f51fe181a46ee8f85eb53af2536f9a332af670b462" + sha256 cellar: :any_skip_relocation, arm64_linux: "d73406a69da295325d1c0bf76ed4558a70934d7735f459331ea1c8e3d239bf1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b6c467e04e47c75f4dcbbece9d626f7c13597b8f830e276c27e4ce0588c56c7" + end + + depends_on "openjdk" + + def install + cd "jni" do + rm Dir["libbbtoolsjni.*", "*.o"] + system "make", "-f", OS.mac? ? "makefile.osx" : "makefile.linux" + end + libexec.install %w[current jni resources] + libexec.install Dir["*.sh"] + bin.install Dir[libexec/"*.sh"] + bin.env_script_all_files(libexec, Language::Java.overridable_java_home_env) + doc.install Dir["docs/*"] + end + + test do + res = libexec/"resources" + args = %W[in=#{res}/sample1.fq.gz + in2=#{res}/sample2.fq.gz + out=R1.fastq.gz + out2=R2.fastq.gz + ref=#{res}/phix174_ill.ref.fa.gz + k=31 + hdist=1] + + system bin/"bbduk.sh", *args + assert_match "bbushnell@lbl.gov", shell_output("#{bin}/bbmap.sh") + assert_match "maqb", shell_output("#{bin}/bbmap.sh --help 2>&1") + assert_match "minkmerhits", shell_output("#{bin}/bbduk.sh --help 2>&1") + end +end diff --git a/Formula/b/bc-gh.rb b/Formula/b/bc-gh.rb new file mode 100644 index 0000000000000..cf90466ffbc63 --- /dev/null +++ b/Formula/b/bc-gh.rb @@ -0,0 +1,53 @@ +class BcGh < Formula + desc "Implementation of Unix dc and POSIX bc with GNU and BSD extensions" + homepage "https://github.com/gavinhoward/bc" + url "https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.xz" + sha256 "91eb74caed0ee6655b669711a4f350c25579778694df248e28363318e03c7fc4" + license "BSD-2-Clause" + head "https://github.com/gavinhoward/bc.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fa3bec57b187a0ccac9514b08d6782f93b7090917598f37c1f6bfa1ba21bcb9f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c25b6baed11d3e111039ea04100d211d37874750f42e2137d78e7774646e06b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68e9138e7ca909ceffb94ef103feec58eb0c6fe84f315dc290ee3ad41597f163" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60a78a50e4599775dd214f3c04662a918f0ca3ba7a4329e55334b8839f746bb1" + sha256 cellar: :any_skip_relocation, sonoma: "523f2085ce15b58bd77afc8324da625747be012b5706135c567d51a45ce906fb" + sha256 cellar: :any_skip_relocation, ventura: "ac2490db545515f79aea51d3433aa0bedef36f220fb0948851921c63cf5d82c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "c3c909b75dd473d2d9f9e7a266a485c23867721b4e1c08b41c68225ceccb5ac2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99d223ee8690ef3a798c6c342faa78b304230ea30cb4957ce7e06b89fc213866" + end + + keg_only :provided_by_macos # since Ventura + + depends_on "pkgconf" => :build + + uses_from_macos "libedit" + + conflicts_with "bc", because: "both install `bc` and `dc` binaries" + + def install + # https://github.com/gavinhoward/bc#recommended-optimizations + ENV.O3 + ENV.append "CFLAGS", "-flto" + + # NOTE: `--predefined-build-type` should be kept first to avoid overwriting later args + system "./configure.sh", "--predefined-build-type=GNU", + "--disable-generated-tests", + "--disable-problematic-tests", + "--disable-nls", + "--enable-editline", + "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"bc", "--version" + assert_match "2", pipe_output(bin/"bc", "1+1\n", 0) + end +end diff --git a/Formula/b/bc.rb b/Formula/b/bc.rb new file mode 100644 index 0000000000000..a0325a29570dc --- /dev/null +++ b/Formula/b/bc.rb @@ -0,0 +1,51 @@ +class Bc < Formula + desc "Arbitrary precision numeric processing language" + homepage "https://www.gnu.org/software/bc/" + url "https://ftpmirror.gnu.org/gnu/bc/bc-1.08.2.tar.gz" + mirror "https://ftp.gnu.org/gnu/bc/bc-1.08.2.tar.gz" + sha256 "ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0651089dd302a018f373870702769aee045e37420816f31f54d63d61ed92eaa0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1817f18a3e007d00b9128d225cc1aa8c18ea8673d954bea60e5a4d95fc8b4ff9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "08dc983bea3e325521a62c8f3eae7e9e414512c740cb99f7f0ea44e11fb1d213" + sha256 cellar: :any_skip_relocation, arm64_ventura: "205744876113e5f7ecd60bba584731c339386d3defc852d74a82cd01a64dea97" + sha256 cellar: :any_skip_relocation, sonoma: "eee028e2110a7e11ed6e7031617377654d2e3260a8b753d9965d165488b39afb" + sha256 cellar: :any_skip_relocation, ventura: "e2417d6a027f54331bbf1d5290dfaed83c3811c7e88ebb163e8bbbcf46e98f11" + sha256 cellar: :any_skip_relocation, arm64_linux: "aaa02a5b2ea9e4fa53a6266398cf51f3deabc3d0ce6a655b9abedcacc300d786" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e08ff27c11d109f803062119b73e680335a27a2229b7c1283c123559aa073f49" + end + + keg_only :provided_by_macos # before Ventura + + uses_from_macos "bison" => :build + uses_from_macos "ed" => :build + uses_from_macos "flex" + uses_from_macos "libedit" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + conflicts_with "bc-gh", because: "both install `bc` and `dc` binaries" + + def install + # prevent user BC_ENV_ARGS from interfering with or influencing the + # bootstrap phase of the build, particularly + # BC_ENV_ARGS="--mathlib=./my_custom_stuff.b" + ENV.delete("BC_ENV_ARGS") + + system "./configure", "--disable-silent-rules", + "--infodir=#{info}", + "--mandir=#{man}", + "--with-libedit", + *std_configure_args + system "make", "install" + end + + test do + system bin/"bc", "--version" + assert_match "2", pipe_output(bin/"bc", "1+1\n", 0) + end +end diff --git a/Formula/b/bcal.rb b/Formula/b/bcal.rb new file mode 100644 index 0000000000000..3df52cdf14d66 --- /dev/null +++ b/Formula/b/bcal.rb @@ -0,0 +1,42 @@ +class Bcal < Formula + desc "Storage conversion and expression calculator" + homepage "https://github.com/jarun/bcal" + url "https://github.com/jarun/bcal/archive/refs/tags/v2.4.tar.gz" + sha256 "141f39d866f62274b2262164baaac6202f60749862c84c2e6ed231f6d03ee8df" + license "GPL-3.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "158b09c6087e82d87d6d4dfc3f68354e863c4f1a20c491128cdf7c16c88ddbc5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43837bc1f22892876291a80a28d09583d6e3a5ca91eb5604682a7bbc1e85289e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ed08fabab9e6e7b2dfcdeb4a3e7b6945077b9a3b3922c436a7b9f38807e1137" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2a4d8cbb8feb1e2fe5b066ede0ce26048fa9d005f8a8df6fbd52dfb79a94f743" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8e02378e4f54c79747e0c4704a10f376bb4647fab48bbab0faf10c9b14f0d294" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a312da829f663fbc969ce1421c967bf301bb7a2fdab86d30f14266dfdb1731a" + sha256 cellar: :any_skip_relocation, sonoma: "ad0b047f53f3d0e29e52529aa8b147a91b2c66cce71eaed5df2025355f491fae" + sha256 cellar: :any_skip_relocation, ventura: "76325966b3ce420ec26e3baa523a903f227a087d102e7d69f9865fed3d11edbe" + sha256 cellar: :any_skip_relocation, monterey: "b067832e1fcd2ca0d46b4a73546288e402c50b0dbf5c10301fd2930a30669ab2" + sha256 cellar: :any_skip_relocation, big_sur: "58e835299adaf40b94a77390234d9e80a113d57efd18f5249d9aabfc9c7ac386" + sha256 cellar: :any_skip_relocation, catalina: "f71f837270d535a16447b927b4d3c32bb810e61d5da18c9476c7f04543684ac2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d206903ae5ee9b92914d37389c399929761b0b3537fbfb8e2c8788d6b99312d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f559a27314fb98edb8c31718cea5f817cd9e891c395d5e49387d4799d414e6a" + end + + on_linux do + depends_on "readline" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match "9333353817", shell_output("#{bin}/bcal '56 gb / 6 + 4kib * 5 + 4 B'") + end +end diff --git a/Formula/b/bcftools.rb b/Formula/b/bcftools.rb new file mode 100644 index 0000000000000..817271a5d3561 --- /dev/null +++ b/Formula/b/bcftools.rb @@ -0,0 +1,42 @@ +class Bcftools < Formula + desc "Tools for BCF/VCF files and variant calling from samtools" + homepage "https://www.htslib.org/" + url "https://github.com/samtools/bcftools/releases/download/1.22/bcftools-1.22.tar.bz2" + sha256 "f2ab9e2f605b1203a7e9cbfb0a3eb7689322297f8c34b45dc5237fe57d98489f" + # The bcftools source code is MIT/Expat-licensed, but when it is configured + # with --enable-libgsl the resulting executable is GPL-licensed. + license "GPL-3.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "6522598e958c511637e9d972977102f95a66b836577acf21e78d9c87ca76ce89" + sha256 arm64_sequoia: "7bfda27c183789cb73ade0e4aeb4437a31edbee0bc0cfd16191ad3572f4d9f44" + sha256 arm64_sonoma: "b158694e48f72aa30dfa323d0ff8ef2745f57eab6d0e0092b5178e5506c834e9" + sha256 arm64_ventura: "daf93a78cf3d50e8773288a2c0e0f7464e9a8ef8c81e3f9e1e5bd432c6aec16b" + sha256 sonoma: "a731d55be4c06169d30f2669fbffa00c8b4020a2d284e4c6f61aa5b765fdcd4d" + sha256 ventura: "d4df4f2814fb3f2d29454603ea88e37bd2c49b38f911c23e31a2961f3db76c78" + sha256 arm64_linux: "11f49299a8d6388e7cfc6d7e7e90b443fb60804c3c3a488aac024d5e72a74789" + sha256 x86_64_linux: "2879fc83d17d2474f2bdb37f44418953b75565cb4553501ba4da054fd373547e" + end + + depends_on "gsl" + depends_on "htslib" + + def install + system "./configure", "--prefix=#{prefix}", + "--with-htslib=#{Formula["htslib"].opt_prefix}", + "--enable-libgsl" + system "make", "install" + pkgshare.install "test/query.vcf" + end + + test do + output = shell_output("#{bin}/bcftools stats #{pkgshare}/query.vcf") + assert_match "number of SNPs:\t3", output + assert_match "fixploidy", shell_output("#{bin}/bcftools plugin -l") + end +end diff --git a/Formula/b/bchunk.rb b/Formula/b/bchunk.rb new file mode 100644 index 0000000000000..0235440639e43 --- /dev/null +++ b/Formula/b/bchunk.rb @@ -0,0 +1,50 @@ +class Bchunk < Formula + desc "Convert CD images from .bin/.cue to .iso/.cdr" + homepage "http://he.fi/bchunk/" + url "http://he.fi/bchunk/bchunk-1.2.2.tar.gz" + sha256 "e7d99b5b60ff0b94c540379f6396a670210400124544fb1af985dd3551eabd89" + license "GPL-2.0-or-later" + head "https://github.com/hessu/bchunk.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?bchunk[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3277369df1cbf1eee5bff5521a3c471311ac476f7bbc9deb3aebebe0d2f1ed06" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "22c3f5e3b6a740a91ac5ddd9b384efc9fd9d399a9356f2bb5e0eabad6df25b97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68a57a42fd8bc5ba39762d9b0731fd2ade2a6ec3862e2d2179daee64d60593b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "577174425847ab641ddbd3dd9001c596c2dbcc69ad54272c412a0d338c0ddd68" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c361f431e4d301b9a0805db04d500f73c4247d06067aba3ec74944525bc7855c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "94279b4e400c05770ec6c5cce6fe7ef50a062835508add3e981942944bb3eecc" + sha256 cellar: :any_skip_relocation, sonoma: "b9b2acfcb5072a9184b54326714ed28ef1535cd81e432f080aabc7c322cb47d2" + sha256 cellar: :any_skip_relocation, ventura: "ebb931a33718b6f6a70e94da300b4da3470664d00bd57d7b7856bf6449f61fe7" + sha256 cellar: :any_skip_relocation, monterey: "cbfaaf81653c53be4dbc62fe7eb6e13071ad9961b18d5f0369bd8f003cded841" + sha256 cellar: :any_skip_relocation, big_sur: "bf3ec0f873db02e0234790bc8b700e4f1b989877742cf1560854e7b561698f4b" + sha256 cellar: :any_skip_relocation, catalina: "b9f7bc758711585d7a016b7b3ddefe3256a368c00b21c51691481c7fbfc2823a" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb5ff1ac028a138667c1d1dae887d33348e009b44f4a9a042d7d10c7387b5d37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97b11f40a695dccaf6033a9911a9377984ffa7d3ed59bc1272fce7b3a0958edf" + end + + def install + system "make" + bin.install "bchunk" + man1.install "bchunk.1" + end + + test do + (testpath/"foo.cue").write <<~EOS + foo.bin BINARY + TRACK 01 MODE1/2352 + INDEX 01 00:00:00 + EOS + + touch testpath/"foo.bin" + + system bin/"bchunk", "foo.bin", "foo.cue", "foo" + assert_path_exists testpath/"foo01.iso" + end +end diff --git a/Formula/b/bcoin.rb b/Formula/b/bcoin.rb new file mode 100644 index 0000000000000..1fc9787473454 --- /dev/null +++ b/Formula/b/bcoin.rb @@ -0,0 +1,55 @@ +class Bcoin < Formula + desc "Javascript bitcoin library for node.js and browsers" + homepage "https://bcoin.io" + url "https://github.com/bcoin-org/bcoin/archive/refs/tags/v2.2.0.tar.gz" + sha256 "fa1a78a73bef5837b7ff10d18ffdb47c0e42ad068512987037a01e8fad980432" + license "MIT" + head "https://github.com/bcoin-org/bcoin.git", branch: "master" + + bottle do + rebuild 3 + sha256 arm64_tahoe: "22cb74e6bd2ddf842240be2209f1412af7423eb335056fdc7a58616d2a9dd4aa" + sha256 arm64_sequoia: "bcd872395d69686c004555e77f78998ca1a01e4d1a0f0d4f6315e5cc0a112be2" + sha256 arm64_sonoma: "c357454a7b33d7fe78ddad3a974eeb031642d8f82a49ad633c036d9a26657dcd" + sha256 arm64_ventura: "95e36e42caef34098e5802e9e8ede2cfa9b11c348eef528087ead3a1846647f9" + sha256 arm64_monterey: "2fccc2d7ac70da7276f1b951913b0f4d85ecc5990f35a0b790a9a496d432c84a" + sha256 sonoma: "48ca919ef8d01a8332ed7ce0b86d8ec413a507eecc59b7ca57d28b90202bdc1e" + sha256 ventura: "4ad6a6a70e1ae53934f27d45aecabf79139a8cc9b007613e15d87301c80bb3b0" + sha256 monterey: "8f094aa7df3a4ee4fba05e5da0fc690b8f15e01515d5c31135d3d0f2267fd150" + sha256 cellar: :any_skip_relocation, arm64_linux: "ece62525442c20293c56edcffd663feb78c8a5cba539a970e06604af2ac1385d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf6e4646d6f73fd463fe22799476324f382b7f86fe1bfcb1991ea930bcff5d56" + end + + depends_on "node" + + uses_from_macos "python" => :build + + def node + deps.reject(&:build?) + .map(&:to_formula) + .find { |f| f.name.match?(/^node(@\d+(\.\d+)*)?$/) } + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"script.js").write <<~JS + const assert = require('assert'); + const bcoin = require('#{libexec}/lib/node_modules/bcoin'); + assert(bcoin); + + const node = new bcoin.FullNode({ + prefix: '#{testpath}/.bcoin', + memory: false + }); + (async () => { + await node.ensure(); + })(); + JS + system "#{node.opt_bin}/node", testpath/"script.js" + assert File.directory?("#{testpath}/.bcoin") + end +end diff --git a/Formula/b/bcpp.rb b/Formula/b/bcpp.rb new file mode 100644 index 0000000000000..e507047ec9413 --- /dev/null +++ b/Formula/b/bcpp.rb @@ -0,0 +1,39 @@ +class Bcpp < Formula + desc "C(++) beautifier" + homepage "https://invisible-island.net/bcpp/" + url "https://invisible-mirror.net/archives/bcpp/bcpp-20250914.tgz" + sha256 "8d2a0f6255243c7f422cbc8d9d65bb381cc6559879df967ba2838ac7d267be3f" + license "MIT" + + livecheck do + url "https://invisible-island.net/bcpp/CHANGES.html" + regex(/id=.*?t(\d{6,8})["' >]/im) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fa74cdc2fb3f1809b90239f1e60363605cb9d5fc76bded0ea406d6e6920e1bdb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25716040eca8bdd532b128d8f285d5eaea77d8522a893ede0a59c69515a95b66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e169551e3a3120dc6966df837814802d00a8a6d1c799b40226ff72c2bfd79b46" + sha256 cellar: :any_skip_relocation, sonoma: "d6d74b99d7963c3f7403a8bd3991cbcccebf0fa2da16672ad912ef6857055a3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a1a406681f95c80d946ca3155ea3cea7397a119634746b2d873b7520aa1ba4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b501371fb124bd5814589d0e6f3dd850221ccb40e0e4b4d3fc41b72fcec32c6" + end + + def install + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + etc.install "bcpp.cfg" + end + + test do + (testpath/"test.txt").write <<~EOS + test + test + test + test + EOS + system bin/"bcpp", "test.txt", "-fnc", "#{etc}/bcpp.cfg" + assert_path_exists testpath/"test.txt.orig" + assert_path_exists testpath/"test.txt" + end +end diff --git a/Formula/b/bcrypt.rb b/Formula/b/bcrypt.rb new file mode 100644 index 0000000000000..c85ff008f0667 --- /dev/null +++ b/Formula/b/bcrypt.rb @@ -0,0 +1,49 @@ +class Bcrypt < Formula + desc "Cross platform file encryption utility using blowfish" + homepage "https://bcrypt.sourceforge.net/" + url "https://bcrypt.sourceforge.net/bcrypt-1.1.tar.gz" + sha256 "b9c1a7c0996a305465135b90123b0c63adbb5fa7c47a24b3f347deb2696d417d" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?bcrypt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10fa5035e3523bd776a5db30bd6426fe5d04b89d281d5df341cadd8da12b6448" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea8bb418fb65a4cded15e0a83c3fecfb5081b435211e832df5c663af5d3007ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10bbb3038fb8cf6be37e831c3296895c997edfa59335acabe8da991fd556730b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19491cbd69ead5d58ce19e714d0b4705a08f50f65e3a5553b97f1f8b63a78175" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4f04889e8272f7ed1efdcf2abd53fc9a108d2a33c72ba75c7da9aca1030cee43" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7b3e672ab9055b69dc1c7c5a7d13ad3a9a375f60de85cfcc5268f7eb139edcda" + sha256 cellar: :any_skip_relocation, sonoma: "190c6d093c768feda2c03b67ad7c43e330d345ee5faf63f466c32a447ca7c0a5" + sha256 cellar: :any_skip_relocation, ventura: "72268b3472f9972c859fd653d6926a8a728e527fd6c4dec6dc76ca09b8621e21" + sha256 cellar: :any_skip_relocation, monterey: "4b2f21d383ed9a4319d26a8093d55702a34340f307148d2fbfa3d1084e7cd41d" + sha256 cellar: :any_skip_relocation, big_sur: "9c3948e719b6b5cb195fc30c8e0fd555c35d9fcea7a5a6c607b094ce2e097f01" + sha256 cellar: :any_skip_relocation, catalina: "132998cb8e196f506666943a94a26927a19899cb1e45ee8eaf65e5ad0ee7ef8d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ab25224e9e787e4c3f04046857ff47cddb4146186eb63e45e2d898794eb56b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdc4ce5fa8dfa43b86a28d9f149ca0fe9ed94e698d4f3ca40c5352a9b912734e" + end + + uses_from_macos "zlib" + + def install + system "make", "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "LDFLAGS=-lz" + bin.install "bcrypt" + man1.install Utils::Gzip.compress("bcrypt.1") + end + + test do + (testpath/"test.txt").write("Hello World!") + pipe_output("#{bin}/bcrypt -r test.txt", "12345678\n12345678\n", 0) + mv "test.txt.bfe", "test.out.txt.bfe" + pipe_output("#{bin}/bcrypt -r test.out.txt.bfe", "12345678\n", 0) + assert_equal File.read("test.txt"), File.read("test.out.txt") + end +end diff --git a/Formula/b/bde.rb b/Formula/b/bde.rb new file mode 100644 index 0000000000000..7fca715f4118d --- /dev/null +++ b/Formula/b/bde.rb @@ -0,0 +1,76 @@ +class Bde < Formula + desc "Basic Development Environment: foundational C++ libraries used at Bloomberg" + homepage "https://github.com/bloomberg/bde" + url "https://github.com/bloomberg/bde/archive/refs/tags/4.31.0.0.tar.gz" + sha256 "07199eb1e99e13b47391111797f4fedbc830f6c2cd60f81dad75f0e677811bd5" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03d528a146e8a75b468263dd29c74ce4d7b336a50bfaa68025e322636b5087c4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27b46af97aab36048be806d14903f8e88842c64c3c1b6cf19ad6e8d70933e5f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d37dad0d0c0220f2da90dfe2589dbf843f55c2f0b883b226c4661135462a361c" + sha256 cellar: :any_skip_relocation, sonoma: "c3a0df4f414c93644a510c37cc53a70ca7722b49121f0033d03e6d3324a78805" + sha256 cellar: :any_skip_relocation, arm64_linux: "20011fa4541d350fc033a1b341efa8e15430182de5aec3dbaf64c454eb7b53b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2538d734ece223495e94d99944d4457b9f9c831075473c60664e460becdff2ab" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "pcre2" + + resource "bde-tools" do + url "https://github.com/bloomberg/bde-tools/archive/refs/tags/4.29.0.0.tar.gz" + sha256 "0e9fb2871cf0df9df2d86c240d736e94f47de67de4ccfeacb1f03e4a6a1f3a09" + + livecheck do + regex(/^v?(\d+\.\d+\.\d+\.\d+)$/i) + end + end + + def install + (buildpath/"bde-tools").install resource("bde-tools") + + # Use brewed pcre2 instead of bundled sources + rm_r buildpath/"thirdparty/pcre2" + inreplace "thirdparty/CMakeLists.txt", "add_subdirectory(pcre2)\n", "" + inreplace "groups/bdl/group/bdl.dep", "pcre2", "libpcre2-posix" + inreplace "groups/bdl/bdlpcre/bdlpcre_regex.h", "#include ", "#include " + + toolchain_file = "bde-tools/cmake/toolchains/#{OS.kernel_name.downcase}/default.cmake" + args = %W[ + -DBUILD_BITNESS=64 + -DUFID=opt_exc_mt_64_shr + -DCMAKE_MODULE_PATH=./bde-tools/cmake + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_TOOLCHAIN_FILE=#{toolchain_file} + -DPYTHON_EXECUTABLE=#{which("python3.14")} + -DBdeBuildSystem_DIR=#{buildpath}/bde-tools/BdeBuildSystem/ + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # bde tests are incredibly performance intensive + # test below does a simple sanity check for linking against bsl. + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + using namespace BloombergLP; + bsl::string string(bslma::Default::globalAllocator()); + return 0; + } + CPP + system ENV.cxx, "-I#{include}", "test.cpp", "-L#{lib}", "-lbsl", "-o", "test" + system "./test" + end +end diff --git a/Formula/b/bdftopcf.rb b/Formula/b/bdftopcf.rb new file mode 100644 index 0000000000000..912091188788f --- /dev/null +++ b/Formula/b/bdftopcf.rb @@ -0,0 +1,68 @@ +class Bdftopcf < Formula + desc "Convert X font from Bitmap Distribution Format to Portable Compiled Format" + homepage "https://gitlab.freedesktop.org/xorg/util/bdftopcf" + url "https://www.x.org/releases/individual/util/bdftopcf-1.1.2.tar.xz" + sha256 "bc60be5904330faaa3ddd2aed7874bee2f29e4387c245d6787552f067eb0523a" + license "MIT-open-group" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c5cce829845d0c176e814c40a20e018c9d04a9fe01774bba881526ec0c85023b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ece11c5aa3b020507c597dcedfefe2b513903cdf4577147115a4cd77d39b0277" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd210923efefbe66ac49de78a8151dec06b63b76453afb1458105cf10130b6f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a157c335ea904af1890eadf062b01e28ade46d1eaf27ed16a573d9db36267e00" + sha256 cellar: :any_skip_relocation, sonoma: "ee45ef9fa4bfcafde669505ffb448fb380af04ea4ece11c6e59b7b4a8148e3d7" + sha256 cellar: :any_skip_relocation, ventura: "cb5d73a38109e5b4519d9db189f7d251dd1a93e6e71421fcf1a1c320dd9ba808" + sha256 cellar: :any_skip_relocation, arm64_linux: "9504712a8df5ab24fffa7944c6b5d6a698fc97463e133ca71a8da88d57c1587e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d558ac21dd07f613ee4ebea998439f027b861a788fde3095a7d59193ea33562c" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.bdf").write <<~EOS + STARTFONT 2.1 + FONT -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1 + SIZE 16 75 75 + FONTBOUNDINGBOX 16 16 0 -2 + STARTPROPERTIES 2 + FONT_ASCENT 14 + FONT_DESCENT 2 + ENDPROPERTIES + CHARS 1 + STARTCHAR U+0041 + ENCODING 65 + SWIDTH 500 0 + DWIDTH 8 0 + BBX 8 16 0 -2 + BITMAP + 00 + 00 + 00 + 00 + 18 + 24 + 24 + 42 + 42 + 7E + 42 + 42 + 42 + 42 + 00 + 00 + ENDCHAR + ENDFONT + EOS + + system bin/"bdftopcf", "./test.bdf", "-o", "test.pcf" + assert_path_exists testpath/"test.pcf" + end +end diff --git a/Formula/b/bdw-gc.rb b/Formula/b/bdw-gc.rb new file mode 100644 index 0000000000000..93503b6a38bbd --- /dev/null +++ b/Formula/b/bdw-gc.rb @@ -0,0 +1,77 @@ +class BdwGc < Formula + desc "Garbage collector for C and C++" + homepage "https://www.hboehm.info/gc/" + url "https://github.com/bdwgc/bdwgc/releases/download/v8.2.10/gc-8.2.10.tar.gz" + sha256 "832cf4f7cf676b59582ed3b1bbd90a8d0e0ddbc3b11cb3b2096c5177ce39cc47" + license "MIT" + head "https://github.com/bdwgc/bdwgc.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "254bb411834a430517fe915698e9390cb93f9e84b69e15474278aa8c4e955959" + sha256 cellar: :any, arm64_sequoia: "fd7a11e13a54e13d44d7129ce59356b7ac814ac7d9484c565decbb4c9dd6686b" + sha256 cellar: :any, arm64_sonoma: "5b99cec3e7e5ac9fdc8444b1e9823cea3897f54d3008560d6055aa27b339590e" + sha256 cellar: :any, sonoma: "d2d6a52c5621a0e0aefe9dfbe08d50a9740c862db85671a7d501cfee410db5b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "b72cc75c32c63a1aed7fe5c7c90657417d6953790dc9b78a9f05209bdbd2b75d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f57f9bbcb829ff506a5363883d5f6906d2ccc2043199c6138f186974035d6704" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -Denable_cplusplus=ON + -Denable_large_config=ON + -Dwithout_libatomic_ops=OFF + -Dwith_libatomic_ops=OFF + ] + + system "cmake", "-S", ".", "-B", "build", + "-Dbuild_tests=ON", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *args, *std_cmake_args, + "-DBUILD_TESTING=ON" # Pass this *after* `std_cmake_args` + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", + "--parallel", ENV.make_jobs, + "--rerun-failed", + "--output-on-failure", + "--repeat", "until-pass:3" + system "cmake", "--install", "build" + + system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=OFF", *args, *std_cmake_args + system "cmake", "--build", "build-static" + lib.install buildpath.glob("build-static/*.a") + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "gc.h" + + int main(void) + { + int i; + + GC_INIT(); + for (i = 0; i < 10000000; ++i) + { + int **p = (int **) GC_MALLOC(sizeof(int *)); + int *q = (int *) GC_MALLOC_ATOMIC(sizeof(int)); + assert(*p == 0); + *p = (int *) GC_REALLOC(q, 2 * sizeof(int)); + } + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lgc", "-o", "test" + system "./test" + end +end diff --git a/Formula/b/beagle.rb b/Formula/b/beagle.rb new file mode 100644 index 0000000000000..b82dfed5bbc02 --- /dev/null +++ b/Formula/b/beagle.rb @@ -0,0 +1,67 @@ +class Beagle < Formula + desc "Evaluate the likelihood of sequence evolution on trees" + homepage "https://github.com/beagle-dev/beagle-lib" + url "https://github.com/beagle-dev/beagle-lib/archive/refs/tags/v4.0.1.tar.gz" + sha256 "9d258cd9bedd86d7c28b91587acd1132f4e01d4f095c657ad4dc93bd83d4f120" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "bc8e56cab2d1da3a82d01ba8a9e1b3976213a155667eec3e8a3ece160c0344fc" + sha256 cellar: :any, arm64_sequoia: "fe362a0f25bf169bb507df13e17e4647a85b185383308fa2c6907bf57a0c3bc9" + sha256 cellar: :any, arm64_sonoma: "a15730feb6101837d824ccc36397e4f777e450312e3e142b5e0a4752f44cfb4b" + sha256 cellar: :any, arm64_ventura: "630068ff93debb8af7e06748abb07dc1637467795b01bbd04aca01212a23c683" + sha256 cellar: :any, sonoma: "1a82a444e21aaf6ed87d13d100fe09bf5dada1f97794a349cb66e429d35ed7dd" + sha256 cellar: :any, ventura: "a249e59ce098ccab24c15b794bcd148dca578ce4cb5aad253732c8e9466c7f89" + sha256 cellar: :any_skip_relocation, arm64_linux: "a23bc6a7ade9eaeda9911a39a644a45f081f215b080de725a322dabf2b803063" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc0660f81935172863061b141e4576bedc36db62b6b0c0b7f5bececc5ed40689" + end + + depends_on "cmake" => :build + depends_on "openjdk" => [:build, :test] + + def install + # Avoid building Linux bottle with `-march=native`. Need to enable SSE4.1 for _mm_dp_pd + # Issue ref: https://github.com/beagle-dev/beagle-lib/issues/189 + inreplace "CMakeLists.txt", "-march=native", "-msse4.1" if OS.linux? && build.bottle? + + ENV["JAVA_HOME"] = Language::Java.java_home + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples/tinytest/tinytest.cpp" + end + + test do + if OS.mac? && Hardware::CPU.arm? && Hardware::CPU.virtualized? + # OpenCL is not supported on virtualized arm64 macOS which breaks all Beagle functionality + (testpath/"test.cpp").write <<~CPP + #include + #include "libhmsbeagle/beagle.h" + int main() { + std::cout << beagleGetVersion(); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}/libhmsbeagle-1", "-L#{lib}", "-lhmsbeagle" + assert_match version.to_s, shell_output("./test") + else + system ENV.cxx, pkgshare/"tinytest.cpp", "-o", "test", "-I#{include}/libhmsbeagle-1", "-L#{lib}", "-lhmsbeagle" + assert_match "sumLogL = -1498.", shell_output("./test") + end + + (testpath/"T.java").write <<~JAVA + class T { + static { System.loadLibrary("hmsbeagle-jni"); } + public static void main(String[] args) {} + } + JAVA + system Formula["openjdk"].bin/"javac", "T.java" + system Formula["openjdk"].bin/"java", "-Djava.library.path=#{lib}", "T" + end +end diff --git a/Formula/b/beakerlib.rb b/Formula/b/beakerlib.rb new file mode 100644 index 0000000000000..7f8bed41354e0 --- /dev/null +++ b/Formula/b/beakerlib.rb @@ -0,0 +1,49 @@ +class Beakerlib < Formula + desc "Shell-level integration testing library" + homepage "https://github.com/beakerlib/beakerlib" + url "https://github.com/beakerlib/beakerlib/archive/refs/tags/1.31.6.tar.gz" + sha256 "0f10799eb01625e45bbd84c0bc4fe1dda58c7dc33d207e91898cc56627fffd30" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67c41cdb44b346377b71971b913532f6c71c9f5f5bfc3fd6b45f5fc958391880" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b0aa3088b422da626306b144531c0c4a3d27dfa6007d626528396c26c2c6cc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae58c4f636b46fbb6180e2adf0320421a2cee7b164ca7212fd98edc1aa7f44ad" + sha256 cellar: :any_skip_relocation, sonoma: "9a35040b3c16fca97747cdc815bf33e5d207e8269bb8a1c7acb9cca010e61735" + sha256 cellar: :any_skip_relocation, arm64_linux: "c97853218480ad9b6d3432b8310f079ce55a9afc0c0a8e126a139cce9f096d23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8d572cdd457970cbeaba48af1bb069d027691913e9a69789ab10d5083aa3f08" + end + + on_macos do + # Fix `readlink` + depends_on "coreutils" + depends_on "gnu-getopt" + end + + def install + make_args = [ + "DD=#{prefix}", + ] + make_args << "GETOPT_CMD=#{Formula["gnu-getopt"].opt_bin}/getopt" if OS.mac? + make_args << "READLINK_CMD=#{Formula["coreutils"].opt_bin}/greadlink" if OS.mac? + system "make", *make_args, "install" + end + + test do + (testpath/"test.sh").write <<~SHELL + #!/usr/bin/env bash + source #{share}/beakerlib/beakerlib.sh || exit 1 + rlJournalStart + rlPhaseStartTest + rlPass "All works" + rlPhaseEnd + rlJournalEnd + SHELL + expected_journal = /\[\s*PASS\s*\]\s*::\s*All works/ + ENV["BEAKERLIB_DIR"] = testpath + system "bash", "#{testpath}/test.sh" + assert_match expected_journal, File.read(testpath/"journal.txt") + assert_match "TESTRESULT_STATE=complete", File.read(testpath/"TestResults") + assert_match "TESTRESULT_RESULT_STRING=PASS", File.read(testpath/"TestResults") + end +end diff --git a/Formula/b/beancount-language-server.rb b/Formula/b/beancount-language-server.rb new file mode 100644 index 0000000000000..9f209c322d425 --- /dev/null +++ b/Formula/b/beancount-language-server.rb @@ -0,0 +1,48 @@ +class BeancountLanguageServer < Formula + desc "Language server for beancount files" + homepage "https://github.com/polarmutex/beancount-language-server" + url "https://github.com/polarmutex/beancount-language-server/archive/refs/tags/v1.4.1.tar.gz" + sha256 "d8a7ed7eba4461d851574bcb42c614180513144bd56e429f803997a3555dfdaf" + license "MIT" + head "https://github.com/polarmutex/beancount-language-server.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8d4cc8564372d39f54e6e97c4f281fdcafb80a1532a6f5331c25a34965a1571" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "95b7377fc99ef879688e3f7bfab1e85ac155c1d583db4dd5e4ef84c200b026ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0a5131af0d419d63a342539a0ab3aca43fe3dfc16d755f49dfa33440bdb4c57" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6f3d2946f89f9262d2970c998617d0d068ad05a89195dd2936f1d2f59733f9d9" + sha256 cellar: :any_skip_relocation, sonoma: "4d8f70336fdbf1f1dabfedf317f39375a9c7a3c84ba4ae25d219e1b947e0f465" + sha256 cellar: :any_skip_relocation, ventura: "b848c9af6a74cf7768da405c1d244a7d35f66f230c06e0818f30a16584928511" + sha256 cellar: :any_skip_relocation, arm64_linux: "253473490238b1c2faf4d80f5d79149cdebaf6b035cfd57fb99dddef4a474e90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6125cd5ffaf34194e79987170c30d737ef6bc4a04b2e53a007bbd68344863a74" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/lsp") + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"beancount-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + + assert_match version.to_s, shell_output("#{bin}/beancount-language-server --version") + end +end diff --git a/Formula/b/beancount.rb b/Formula/b/beancount.rb new file mode 100644 index 0000000000000..c65fb9029bebd --- /dev/null +++ b/Formula/b/beancount.rb @@ -0,0 +1,67 @@ +class Beancount < Formula + include Language::Python::Virtualenv + + desc "Double-entry accounting tool that works on plain text files" + homepage "https://beancount.github.io/" + url "https://files.pythonhosted.org/packages/57/e3/951015ad2e72917611e1a45c5fe9a33b4e2e202923d91455a9727aff441b/beancount-3.2.0.tar.gz" + sha256 "9f374bdcbae63328d8a0cf6d539490f81caa647f2d1cc92c9fa6117a9eb092ca" + license "GPL-2.0-only" + head "https://github.com/beancount/beancount.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3045ff72fe59dd3077e08f18d541b91421d5fdb08d1b0bbaf154418840685dae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7cbfdba20bcae6f4bd7c5c526a32a3369b037bad2491cc35e20a8e04a1881c5e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b41451840d2ed0b79e7d7e32799e776001e9a0355525f584ef18f9231a64474" + sha256 cellar: :any_skip_relocation, sonoma: "96a14578b71603bb20ebf8f08e4a11fc8dcfde165d0e7ae9ace5c29cd80a36f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "e84599c4925de97bd2feb7e75162a9fe8e332bdb0e9b8d79954f73947dc40bca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23f5e096016de0cfda9bbab51edfec9b71b4b888a135572ee61fd3d46245e287" + end + + depends_on "bison" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "certifi" + depends_on "python@3.14" + + uses_from_macos "flex" => :build + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: "certifi" + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/b2/5a/4c63457fbcaf19d138d72b2e9b39405954f98c0349b31c601bfcb151582c/regex-2025.9.1.tar.gz" + sha256 "88ac07b38d20b54d79e704e38aa3bd2c0f8027432164226bdee201a1c0c9c9ff" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + + bin.glob("bean-*") do |executable| + generate_completions_from_executable(executable, shell_parameter_format: :click) + end + end + + test do + (testpath/"example.ledger").write shell_output("#{bin}/bean-example").strip + assert_empty shell_output("#{bin}/bean-check #{testpath}/example.ledger").strip + end +end diff --git a/Formula/b/beanquery.rb b/Formula/b/beanquery.rb new file mode 100644 index 0000000000000..45d0df6f15654 --- /dev/null +++ b/Formula/b/beanquery.rb @@ -0,0 +1,79 @@ +class Beanquery < Formula + include Language::Python::Virtualenv + + desc "Customizable lightweight SQL query tool" + homepage "https://github.com/beancount/beanquery" + url "https://files.pythonhosted.org/packages/7c/90/801eec23a07072dcf8df061cb6f27be6045e08c12a90b287e872ce0a12d3/beanquery-0.2.0.tar.gz" + sha256 "2d72b50a39003435c7fed183666572b8ea878b9860499d0f196b38469384cd2c" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c7bb8cb26caaf57d39d5de56dbb43c338af325b866018ad3f5b7f58fee470839" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f37c3deaee2b019a12ca31efacb072b4338c9772fcaf0da585b361d37be81d22" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1ff682ffc3b90f6397ef978057db4a63d4629cf1e4e01200ad848a6eccf32695" + sha256 cellar: :any_skip_relocation, sonoma: "7e612ab070eb3db9a1a363c39d7a836e3ea7a465270738ac31ddceae70d92517" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd9d89c48614beec712adb1d8e77983fb9cc5e962beb4e0a0424b2833c94b614" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4b4f40ee6c97f10bf46b1d9b2d6da0ca2bf0566986144cda7f47e4cbac177a9" + end + + depends_on "bison" => :build # for beancount + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.14" + + uses_from_macos "flex" => :build # for beancount + + on_linux do + depends_on "patchelf" => :build + end + + resource "beancount" do + url "https://files.pythonhosted.org/packages/93/a6/973010277d08f95ba3c6f4685010fe00c6858a136ed357c7e797a0ccbc04/beancount-3.1.0.tar.gz" + sha256 "1e70aba21fae648bc069452999d62c94c91edd7567f41697395c951be791ee0b" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tatsu-lts" do + url "https://files.pythonhosted.org/packages/4a/40/4bbdba35865ebaf33a192cea87bfafb4f4ca6b4bf45c18b89c6eed086b98/tatsu_lts-5.13.1.tar.gz" + sha256 "b9f0d38bf820d92077b5722bad26f68020c8e4ee663f7e35d4a0d95e4ebc5623" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.beancount").write <<~EOS + option "title" "Beanquery Test" + 2025-01-01 open Assets:Cash + 2025-01-02 * "Test Transaction" + Assets:Cash -10.00 USD + Expenses:Test 10.00 USD + EOS + + output = shell_output("#{bin}/bean-query test.beancount 'select account, sum(position)' --no-errors") + + assert_match "Assets:Cash", output + assert_match "Expenses:Test", output + end +end diff --git a/Formula/b/beanstalkd.rb b/Formula/b/beanstalkd.rb new file mode 100644 index 0000000000000..30f1cf9a3cd99 --- /dev/null +++ b/Formula/b/beanstalkd.rb @@ -0,0 +1,40 @@ +class Beanstalkd < Formula + desc "Generic work queue originally designed to reduce web latency" + homepage "https://beanstalkd.github.io/" + url "https://github.com/beanstalkd/beanstalkd/archive/refs/tags/v1.13.tar.gz" + sha256 "26292dcdc0a7011d2f8ad968612f2cd8b2ef07687224876015399ae85e9e5263" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3822e7705185398f263482d69e922ffee29ccc195eb491bcc765a020ac6728ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "74b984c41b74f63386b6125681be1f37529341179a754f0556ed9d2d621b9088" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c0cd544f3007bc3fc55d863ddacab823698188bd12e8a5b15e71aa81d071f50" + sha256 cellar: :any_skip_relocation, arm64_ventura: "128bb476a00fb682cbc27ce9859d44efdb752221458b8bc33dd358313f1dd54e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d00ef3ef848ab20b6a0e8673134ddda3711e3b7ade51d5a143920038081de2be" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b2f814739b81709efe980fe1d740ad459aa74db08a8027907af4d76f912e8e4f" + sha256 cellar: :any_skip_relocation, sonoma: "22599c35be1743c9dcb52fcf32aa04a2647ec8853857afbc6c2854e7b1d5c571" + sha256 cellar: :any_skip_relocation, ventura: "02424e9c82015053c1217768e20fa081e6d692ae82000de9c792b0e94d77cbaa" + sha256 cellar: :any_skip_relocation, monterey: "2d08f8d072061940b968de3f7b3f221dd4e18f083d96a85a3d33a1a2ad049d0d" + sha256 cellar: :any_skip_relocation, big_sur: "c5fbf19ce7c3b3cd8d6681aa8da2f7d658fa81486277ca06bf6225ece4b28568" + sha256 cellar: :any_skip_relocation, arm64_linux: "3992100979d75afc23d85cdff92fbb3d0f2d662c0e5cb0ea3d5ed6b13aeb4533" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e523cebb72efcd0e73c3c11cbf695f6b0a3486894b9c6f6ea4c7590dc6a59a77" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + service do + run opt_bin/"beanstalkd" + keep_alive true + working_dir var + log_path var/"log/beanstalkd.log" + error_log_path var/"log/beanstalkd.log" + end + + test do + system bin/"beanstalkd", "-v" + end +end diff --git a/Formula/b/bear.rb b/Formula/b/bear.rb new file mode 100644 index 0000000000000..75aa4317d72ee --- /dev/null +++ b/Formula/b/bear.rb @@ -0,0 +1,66 @@ +class Bear < Formula + desc "Generate compilation database for clang tooling" + homepage "https://github.com/rizsotto/Bear" + url "https://github.com/rizsotto/Bear/archive/refs/tags/3.1.6.tar.gz" + sha256 "99cd891eec6e89b734d7cafe0e623dd8c2f27d8cbf3ee9bc4807e69e5c8fb55c" + license "GPL-3.0-or-later" + revision 13 + head "https://github.com/rizsotto/Bear.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "eed336692e1b142d99fa42eb02039276bfee17fae510ff8b3991ea909ca0c9a1" + sha256 arm64_sequoia: "1a0362dba17bddffaa1904592fee8e17d6da4a14d6abec690a177559195f6247" + sha256 arm64_sonoma: "0d16aa42a9c6d3a972770c32d1bfd4e58be7b3d747033353e217befba257b6e1" + sha256 sonoma: "0368697645ec4733cef9b62925a3dc170fa1c28986702a63a84ca4b9b054bb07" + sha256 arm64_linux: "47a892cfcbd94dfb5b553e5acb4741fc20f4a5ad22582c152e4e05454db21a7c" + sha256 x86_64_linux: "1084d51e793d662b799db8704d94161108bda1f60c82a9144b949529a43cd9cf" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "fmt" + depends_on "grpc" + depends_on "nlohmann-json" + depends_on "protobuf" + depends_on "spdlog" + + uses_from_macos "llvm" => :test + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause <<~EOS + Undefined symbols for architecture x86_64: + "std::__1::__fs::filesystem::__current_path(std::__1::error_code*)" + EOS + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + args = %w[ + -DENABLE_UNIT_TESTS=OFF + -DENABLE_FUNC_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + printf("hello, world!\\n"); + return 0; + } + C + system bin/"bear", "--", "clang", "test.c" + assert_path_exists testpath/"compile_commands.json" + end +end diff --git a/Formula/b/beast.rb b/Formula/b/beast.rb new file mode 100644 index 0000000000000..c83981077d3a4 --- /dev/null +++ b/Formula/b/beast.rb @@ -0,0 +1,63 @@ +class Beast < Formula + desc "Bayesian Evolutionary Analysis Sampling Trees" + homepage "https://beast.community/" + url "https://github.com/beast-dev/beast-mcmc/archive/refs/tags/v10.5.0.tar.gz" + sha256 "6287ebbe85e65e44f421b7e9ec3fd17d9a736ff909dfa3b4ab6b1b1fd361b52b" + license "LGPL-2.1-or-later" + head "https://github.com/beast-dev/beast-mcmc.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6bea503ebf5a08dec482d702efc5deb9a582e508b02c0801676e5b12d81cc38" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b8a6e27f0f6d7d2ea5975527fcaeb26e12e85084ada04504faf8648e49c68aa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14251bfb6655c4a41182c877f335e7a52d94b0cf19944b6a84503114ffe9d225" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d3c7f2ada5fe41129297cb1d3982c820795caf49df73ef195809a105b6fc7b1" + sha256 cellar: :any_skip_relocation, sonoma: "26662c5e73e42985a75df7fb1fa10f74eff789aa3271daf497323c8c66725dee" + sha256 cellar: :any_skip_relocation, ventura: "293196654c48f797b253a1d07ce9bab5836d5682fbe1772f26a6dc8f64875977" + sha256 cellar: :any_skip_relocation, arm64_linux: "68647073986327f94f8ee9ec7e8d4b0e34cb8555378591e99e0ab19f480d9e83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34a93fd16e042a40f5d18973a31931ea504884cacb750acaabb1772a891435d3" + end + + depends_on "ant" => :build + depends_on "beagle" + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + system "ant", "linux" + libexec.install Dir["release/Linux/BEAST_X_v*/*"] + pkgshare.install_symlink libexec/"examples" + bin.install Dir[libexec/"bin/*"] + + env = Language::Java.overridable_java_home_env + env["PATH"] = "${JAVA_HOME}/bin:${PATH}" if OS.linux? + bin.env_script_all_files libexec/"bin", env + inreplace libexec/"bin/beast", "/usr/local", HOMEBREW_PREFIX + end + + test do + cp pkgshare/"examples/TestXML/ClockModels/testUCRelaxedClockLogNormal.xml", testpath + + # Run fewer generations to speed up tests + inreplace "testUCRelaxedClockLogNormal.xml", 'chainLength="10000000"', + 'chainLength="100000"' + + # OpenCL is not supported on virtualized arm64 macOS and causes all beast commands to fail + if OS.mac? && Hardware::CPU.arm? && Hardware::CPU.virtualized? + output = shell_output("#{bin}/beast testUCRelaxedClockLogNormal.xml 2>&1", 255) + assert_match "OpenCL error: CL_INVALID_VALUE", output + return + end + + system bin/"beast", "testUCRelaxedClockLogNormal.xml" + + %w[ops log trees].each do |ext| + output = "testUCRelaxedClockLogNormal." + ext + assert_path_exists testpath/output, "Failed to create #{output}" + end + end +end diff --git a/Formula/b/beautysh.rb b/Formula/b/beautysh.rb new file mode 100644 index 0000000000000..f40d70a542f6d --- /dev/null +++ b/Formula/b/beautysh.rb @@ -0,0 +1,46 @@ +class Beautysh < Formula + include Language::Python::Virtualenv + + desc "Bash beautifier" + homepage "https://github.com/lovesegfault/beautysh" + url "https://files.pythonhosted.org/packages/ce/72/6d47e5f15b16b650f6ac9da202bea6866bf327d4be133944a62cedf94d63/beautysh-6.4.1.tar.gz" + sha256 "5beeccdddf02cb11088e009d60e367a28aab1609fbe8da9e5a19a7c59fa28f56" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "877d75cebb64f21378b443632702a99d5e057f34f29ed8c12b36156a7f64f485" + end + + depends_on "python@3.14" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "editorconfig" do + url "https://files.pythonhosted.org/packages/88/3a/a61d9a1f319a186b05d14df17daea42fcddea63c213bcd61a929fb3a6796/editorconfig-0.17.1.tar.gz" + sha256 "23c08b00e8e08cc3adcddb825251c497478df1dada6aefeb01e626ad37303745" + end + + def install + virtualenv_install_with_resources + end + + test do + test_file = testpath/"test.sh" + test_file.write <<~SHELL + #!/bin/bash + echo "Hello, World!" + SHELL + + system bin/"beautysh", test_file + + assert_equal <<~SHELL, test_file.read + #!/bin/bash + echo "Hello, World!" + SHELL + + assert_match version.to_s, shell_output("#{bin}/beautysh --version") + end +end diff --git a/Formula/b/bed.rb b/Formula/b/bed.rb new file mode 100644 index 0000000000000..ab0bc57baabfb --- /dev/null +++ b/Formula/b/bed.rb @@ -0,0 +1,31 @@ +class Bed < Formula + desc "Binary editor written in Go" + homepage "https://github.com/itchyny/bed" + url "https://github.com/itchyny/bed/archive/refs/tags/v0.2.8.tar.gz" + sha256 "2515fd65c718f7aaa549bf9a98cf514102d2ea5f3b1c0437bbcf8bd26fae4d0a" + license "MIT" + head "https://github.com/itchyny/bed.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8cded6610391dae61838f8e3d1fed830a47bb036830fcfe6bae85a11d7ebaffc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "140a9d0772340162a6369e5662a344f6d08366322e4ff1e36fe974f08fc2d666" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "140a9d0772340162a6369e5662a344f6d08366322e4ff1e36fe974f08fc2d666" + sha256 cellar: :any_skip_relocation, arm64_ventura: "140a9d0772340162a6369e5662a344f6d08366322e4ff1e36fe974f08fc2d666" + sha256 cellar: :any_skip_relocation, sonoma: "f6ca3ed867cf825422e5b5a133799ecab751b017135bdb2593023977e9a44557" + sha256 cellar: :any_skip_relocation, ventura: "f6ca3ed867cf825422e5b5a133799ecab751b017135bdb2593023977e9a44557" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2562c5a4257daa51a5cca6592df17b3cd87389f0f8a54677ebf684b327723aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68f7873e2b5d5e5f871862af9004cdcd4b99fc6b51af6d1e8d100afe4418fe21" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.revision=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/bed" + end + + test do + # bed is a TUI application + assert_match version.to_s, shell_output("#{bin}/bed -version") + end +end diff --git a/Formula/b/bedops.rb b/Formula/b/bedops.rb new file mode 100644 index 0000000000000..db1551e60afb2 --- /dev/null +++ b/Formula/b/bedops.rb @@ -0,0 +1,60 @@ +class Bedops < Formula + desc "Set and statistical operations on genomic data of arbitrary scale" + homepage "https://github.com/bedops/bedops" + url "https://github.com/bedops/bedops/archive/refs/tags/v2.4.42.tar.gz" + sha256 "9daa0c098e37490a07f84664d2c61ff8909689995cf7e1673d259ccd4f1c453c" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4ff22f322da3637f4386dc02c4ab65a66792ec39e12c5cef947318b9192d8f7d" + sha256 cellar: :any, arm64_sequoia: "a4233322968c5020044fae4eebb8454b89f21f0a5d8e148a354d6e6ce34c29a1" + sha256 cellar: :any, arm64_sonoma: "20bb111818a6579c66d41e8f1197db5e2bfec0a552683c613a502f6c948bb545" + sha256 cellar: :any, arm64_ventura: "d76e57a5614cc8aa3ca1f80c578a3f1927afdd38b0c6781f661decbed04d9b9b" + sha256 cellar: :any, sonoma: "8f697e9debc25f693bc1ae11b4cda7ca24c9daa5473337185d498b25de092232" + sha256 cellar: :any, ventura: "28016580353e6377af02c3238032cad2eb0053a09ee84fcc98ed3f6a161def52" + sha256 cellar: :any_skip_relocation, arm64_linux: "75447ca25f0cc6f2c06a93085e0ca3724ed9fa26ebe46a3191f0a3af91c3d1bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afc3de7b8daff4e67a1dcf796e5ae9ddb12954d88eaeaac332ac30c0c22159ba" + end + + depends_on "jansson" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # Apply Debian patch to allow using system/brew libraries + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bedops/2.4.42-debian.patch" + sha256 "7d88db7624500521988d5260ec290578db74e85ad4b0cf0e1552e548691c3a21" + end + + def install + rm_r "third-party" + + # Avoid running `support` target which builds third-party libraries. + # On Linux, this is already handled by the Debian patch. + inreplace "system.mk/Makefile.darwin", /^default: support$/, "default: mkdirs" + + args = %W[ + BUILD_ARCH=#{Hardware::CPU.arch} + JPARALLEL=#{ENV.make_jobs} + LOCALBZIP2LIB=-lbz2 + LOCALJANSSONLIB=-ljansson + LOCALZLIBLIB=-lz + ] + args << "MIN_OSX_VERSION=#{MacOS.version}" if OS.mac? + + system "make", *args + system "make", "install", "BINDIR=#{bin}" + end + + test do + (testpath/"first.bed").write <<~EOS + chr1\t100\t200 + EOS + (testpath/"second.bed").write <<~EOS + chr1\t300\t400 + EOS + output = shell_output("#{bin}/bedops --complement first.bed second.bed") + assert_match "chr1\t200\t300", output + end +end diff --git a/Formula/b/bedtk.rb b/Formula/b/bedtk.rb new file mode 100644 index 0000000000000..74d7e1653218b --- /dev/null +++ b/Formula/b/bedtk.rb @@ -0,0 +1,29 @@ +class Bedtk < Formula + desc "Simple toolset for BED files" + homepage "https://github.com/lh3/bedtk" + url "https://github.com/lh3/bedtk/archive/refs/tags/v1.2.tar.gz" + sha256 "c0e1f454337dbd531659662ccce6c35831e7eec75ddf7b7751390b869e6ce9f0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "495953151b05090bee059581e5a872112a6621265f86c8be00d6a43fdec0d25a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7353b0431b57bfc23ffcdf490681771bab0f608a1c590ae24ca0e8f437613809" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a58dd66680c40dbd672a148a9640784c434f6d520bb88f6696c04cc31683a15" + sha256 cellar: :any_skip_relocation, sonoma: "ebad975371a395fab0ef08706244c491def00e494e657b15463da7cbe288893f" + sha256 cellar: :any_skip_relocation, arm64_linux: "d359cee1ad085e9a9fc2e36e63fde511e47fb12103526b843efccc8dfb19821f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9dec9cdbe36442a536160a54b14e5d07eaa1a7f6e59dcd73d0cb154854211562" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "bedtk" + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test/.", testpath + system bin/"bedtk", "flt", "test-anno.bed.gz", "test-iso.bed.gz" + end +end diff --git a/Formula/b/bedtools.rb b/Formula/b/bedtools.rb new file mode 100644 index 0000000000000..56c3b00876b9a --- /dev/null +++ b/Formula/b/bedtools.rb @@ -0,0 +1,36 @@ +class Bedtools < Formula + desc "Tools for genome arithmetic (set theory on the genome)" + homepage "https://github.com/arq5x/bedtools2" + url "https://github.com/arq5x/bedtools2/archive/refs/tags/v2.31.1.tar.gz" + sha256 "79a1ba318d309f4e74bfa74258b73ef578dccb1045e270998d7fe9da9f43a50e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "31fb10bdcf4acbae4eec588dfae4f131545f8cc87e45c7e6e7347adaf050645b" + sha256 cellar: :any, arm64_sequoia: "2e84cd0c3fa3bfe3fe5c55304cb4d53edfbffba792c40e98fc5a2c057d8e81b1" + sha256 cellar: :any, arm64_sonoma: "6b96362dc4065246cfd8a311991b81b13d1901feb8edd5db27c2911b47432f00" + sha256 cellar: :any, arm64_ventura: "31c196dcf1892f9a483abacfe84ed3922e09842d27c396880657fafd2dc98c52" + sha256 cellar: :any, arm64_monterey: "ad11f55f0de575280f25dea508fb8096bb80b4f1029cb1c0c7f8d88e81a0f4bb" + sha256 cellar: :any, sonoma: "99cb51ae62edfdd1f194fc1baf75c1133e061db3ca260f0699967ab421d5b015" + sha256 cellar: :any, ventura: "651f6403baaf21f1a9d3ee1735820d034896e6bbe74fa8c8e0ce0723ecbe3535" + sha256 cellar: :any, monterey: "4637c3326795fef57d614b6107fa563a767ecd779d32da27103a6f92e7e1f286" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f3ba51c86b51817350e0d7cb983c769d4d4a3e739cd7e502635d090e9681739" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16348989a791c74aa29f518072b2e696bca7c5818806dfae80ec2bec341d0af1" + end + + depends_on "xz" + + uses_from_macos "python" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "make" + system "make", "install", "prefix=#{prefix}" + end + + test do + (testpath/"t.bed").write "c\t1\t5\nc\t4\t9" + assert_equal "c\t1\t9", shell_output("#{bin}/bedtools merge -i t.bed").chomp + end +end diff --git a/Formula/b/bee.rb b/Formula/b/bee.rb new file mode 100644 index 0000000000000..935338a0cbe30 --- /dev/null +++ b/Formula/b/bee.rb @@ -0,0 +1,30 @@ +class Bee < Formula + desc "Tool for managing database changes" + homepage "https://github.com/bluesoft/bee" + url "https://github.com/bluesoft/bee/releases/download/1.110/bee-1.110.zip" + sha256 "ccddd2ab86ecfdb723de6917fca596aeabc9df44d36ad58432b3f2a4c72f10b7" + license "MPL-1.1" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6403967c67cdb228ea22dd5cb24121c5de8d33f4db951555034d232ba462a8be" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/*.bat"]) + libexec.install Dir["*"] + (bin/"bee").write_env_script libexec/"bin/bee", Language::Java.java_home_env + end + + test do + (testpath/"bee.properties").write <<~EOS + test-database.driver=com.mysql.jdbc.Driver + test-database.url=jdbc:mysql://127.0.0.1/test-database + test-database.user=root + test-database.password= + EOS + (testpath/"bee").mkpath + system bin/"bee", "-d", testpath/"bee", "dbchange:create", "new-file" + end +end diff --git a/Formula/b/beecrypt.rb b/Formula/b/beecrypt.rb new file mode 100644 index 0000000000000..3740f2f2daa0e --- /dev/null +++ b/Formula/b/beecrypt.rb @@ -0,0 +1,83 @@ +class Beecrypt < Formula + desc "C/C++ cryptography library" + homepage "https://beecrypt.sourceforge.net/" + url "https://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz" + sha256 "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d" + license "LGPL-2.1-or-later" + revision 7 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "19bbdbe37b8f9c59abd5ed8ce3a6c5c0fa4ac50734b445bc9f6a8bb05666c890" + sha256 cellar: :any, arm64_sequoia: "9d436aea574fc90b56ebdd14da2f08d7484209ddc553ad9a9928bb1b0e2ec28e" + sha256 cellar: :any, arm64_sonoma: "d90ef1d3a2df7b9ea6981ebf5d3635bbc8a7bf39c1412becdabbf810a499a98f" + sha256 cellar: :any, arm64_ventura: "3fcce19dcf6e9f7b864752d4a3a44864c774568203710fd7570684dec95c3f65" + sha256 cellar: :any, arm64_monterey: "4acdd6c4d36e63cfdbcee335076ef3a2d037fabcda966692a02301bc3a1c59e1" + sha256 cellar: :any, arm64_big_sur: "c67f38d1f106232edf5db9ea96b28c9cc240805c3021a41279085e592b3d1a5e" + sha256 cellar: :any, sonoma: "a06180b00af889242ee74e3588bc423f07d74c220a19c4e8eaff5dbf0deafd29" + sha256 cellar: :any, ventura: "7657b38fa0f49bc9a8ecf87d84e6f7d6f3a2bee962632d43aea95da5207fe148" + sha256 cellar: :any, monterey: "76b490b3b3da57df7f5e13032c04ea577fddca473cc34d6274075c1100795ca4" + sha256 cellar: :any, big_sur: "6a5d3034c4818dbf4332a65bc677edb230d174b2c0f47a4c329960f97400f926" + sha256 cellar: :any, catalina: "977150a0ff6d0a8739539ad4865bcea9fe68d603d22b86d85d6fdef794d66611" + sha256 cellar: :any_skip_relocation, arm64_linux: "63bbd01ef2d5b95098af62252230803004d064aea3a4ab23bc9dd37a3915b7af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5940b480e169cfe86dc568bd7a6a527c569797fc7a99155931b0d75798118c7" + end + + depends_on "libtool" => :build + + # fix build with newer clang, gcc 4.7 (https://bugs.gentoo.org/show_bug.cgi?id=413951) + patch do + url "https://sourceforge.net/p/beecrypt/patches/_discuss/thread/93d63cef/5653/attachment/beecrypt-gcc47.patch" + sha256 "6cb36ae3e8e9c595420379dc535bb5451d0ee60641a38b29a20ca25c7acbc60d" + end + + # blockmode.c:162:14: error: call to undeclared function 'swapu32'; + # ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + # (https://sourceforge.net/p/beecrypt/patches/13/) + patch do + url "https://sourceforge.net/p/beecrypt/patches/13/attachment/beecrypt-4.2.1-c99.patch" + sha256 "460f25ccd4478e5ec435dc9185b3021518d8b2d65cad2c9c1ee71be804471420" + end + + def install + cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--disable-openmp", + "--without-java", + "--without-python" + system "make" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "beecrypt/base64.h" + #include "beecrypt/sha256.h" + #include + + int main(void) + { + sha256Param hash; + const byte *string = (byte *) "abc"; + byte digest[32]; + byte *crc; + + sha256Reset(&hash); + sha256Update(&hash, string, 3); + sha256Digest(&hash, digest); + + printf("%s\\n", crc = b64crc(digest, 32)); + + free(crc); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lbeecrypt", "-o", "test" + assert_match "FJOO", shell_output("./test") + end +end diff --git a/Formula/b/befunge93.rb b/Formula/b/befunge93.rb new file mode 100644 index 0000000000000..21144fd1ec1bd --- /dev/null +++ b/Formula/b/befunge93.rb @@ -0,0 +1,43 @@ +class Befunge93 < Formula + desc "Esoteric programming language" + homepage "https://catseye.tc/article/Languages.md#befunge-93" + url "https://catseye.tc/distfiles/befunge-93-2.25.zip" + version "2.25" + sha256 "93a11fbc98d559f2bf9d862b9ffd2932cbe7193236036169812eb8e72fd69b19" + license "BSD-3-Clause" + head "https://github.com/catseye/Befunge-93.git", branch: "master" + + livecheck do + url "https://catseye.tc/distribution/Befunge-93_distribution" + regex(/href=.*?befunge-93[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e7cb6bafad0910e0180d079e0915876d138ad0ab1a7d5bdb7051d41ad1c5a9e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7cb92a7855edef8e243b3279f39eab303d89733524b215aeef9def5bb4273a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "def7c8d4722db8b8db0213eaee2bb178e072d0d1a5ceaf9a22e0677304d2f6f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2599a525caf498002cb5680508784d8e650abce0d06eaba12ecbb162231791b1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c40ed79d166ad25eec0fb9b75850d445d1cb2b6e9252e3fe40b0fc7d79b8fdb4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "05324749e9d37d4bdf4b6737ddcc2f48489755c60a38752f4cf8dc51e1b93085" + sha256 cellar: :any_skip_relocation, sonoma: "5486169859b1d8ed1522380e54f750cbc619ce7b06cfcbf91cd84a473f0adf3c" + sha256 cellar: :any_skip_relocation, ventura: "db58586d50b2268a3889d49899aaa3db014546dd905176b33e34785483be516c" + sha256 cellar: :any_skip_relocation, monterey: "7ec6a5c6ef76cf0bce2358f3ae72ac2336bba0c7f2b31419438c82bdc3ed6133" + sha256 cellar: :any_skip_relocation, big_sur: "bba6c29ce6655061c2f0323b1ee778c275e0bc18f850158274a03af1ea666fc6" + sha256 cellar: :any_skip_relocation, catalina: "190fa82b0fef31f096a102f3b33205112cb206f578813f7ac78f78617c7d73d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "81943fb8dff560b6d4a8641bd26eea7433127d01044710a3c46fce634cc8ce4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f71eb1910501903b8af94c21352759032696046be49995beb95caead85a8398" + end + + def install + system "make" + bin.install Dir["bin/bef*"] + end + + test do + (testpath/"test.bf").write '"dlroW olleH" ,,,,,,,,,,, @' + assert_match "Hello World", shell_output("#{bin}/bef test.bf") + end +end diff --git a/Formula/b/behaviortree.cpp.rb b/Formula/b/behaviortree.cpp.rb new file mode 100644 index 0000000000000..5b76bf61dc820 --- /dev/null +++ b/Formula/b/behaviortree.cpp.rb @@ -0,0 +1,40 @@ +class BehaviortreeCpp < Formula + desc "Behavior Trees Library in C++" + homepage "https://www.behaviortree.dev/" + url "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.8.2.tar.gz" + sha256 "fe682bc2a3430378611d5d520970333fcd57874eb726fce59b5b274b947b0ba7" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "67342d96ba2d203b132223ce51ba81bd0fc1d498d53957ba5bded071c384da11" + sha256 cellar: :any, arm64_sequoia: "bae8f0836a5e497e927de88478139970d78595b03447c3eddd38ef7891bf9a8e" + sha256 cellar: :any, arm64_sonoma: "0a0e9cef835e063ab997f313050f4bc9d5d66f1c795636fb3de7206bc673ae3d" + sha256 cellar: :any, sonoma: "aa5867b56b1270c40d11616a038e26cc5a319f6199fbe810a65609af8dde2b3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "163b27a6eba8374810b3d612608a323d8d9e30c4bb0277aba2825be0864717ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2dbdf83f6a1582a640313f179a6229bf1e22389e84f208ed513a8aef865ea99" + end + + depends_on "cmake" => :build + depends_on "cppzmq" + depends_on "zeromq" + + uses_from_macos "sqlite" + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DBTCPP_UNIT_TESTS=OFF + -DBTCPP_EXAMPLES=OFF + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/t03_generic_ports.cpp", testpath/"test.cpp" + system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lbehaviortree_cpp", "-o", "test" + assert_match "Target positions: [ -1.0, 3.0 ]", shell_output("./test") + end +end diff --git a/Formula/b/bench.rb b/Formula/b/bench.rb new file mode 100644 index 0000000000000..e4893ae6abb2e --- /dev/null +++ b/Formula/b/bench.rb @@ -0,0 +1,50 @@ +class Bench < Formula + desc "Command-line benchmark tool" + homepage "https://github.com/Gabriella439/bench" + license "BSD-3-Clause" + head "https://github.com/Gabriella439/bench.git", branch: "main" + + stable do + url "https://hackage.haskell.org/package/bench-1.0.13/bench-1.0.13.tar.gz" + sha256 "170c396f59e37851ed626c07756dc394841f7597895e691bf26049fee9725a6c" + + # Backport relaxed upper bound on text to build with GHC 9.10 + patch do + url "https://github.com/Gabriella439/bench/commit/f7efa5225eda160ca1cf978dc0147db4e1902e3c.patch?full_index=1" + sha256 "dc9895f4421274daa4e1aca04150b9e07eb48dbe5c11c1894aa9060081260342" + end + patch do + url "https://github.com/Gabriella439/bench/commit/1c4b112436c3eb3e4e9cccaf60525fa4c40fd38e.patch?full_index=1" + sha256 "df9192a1137883120580c9d1f51a2a742e099c28ad6733eca025bb606a71fdc6" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0ef5a04cf943fb775dec58c9f01e7a351234e96415eeddf7a1334fdc25e44125" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c5230fa0e73d5d95d308cba623b7482ecb7615ea7cba70da81cc2eaa402d911" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e53da698afa731c749f40351c628f1883c1e02b9a1d88d7d77184ed938b4004a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "95efaec2d62c71aa134fa3ce9219acfe3cad30adcd4dd39a677869dd577ddcb0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "58f3eaed9c9d200b98ae8cf639d50270d55353eac3cf7630c5ec256e18ee179d" + sha256 cellar: :any_skip_relocation, sonoma: "a3bb09eecf4d8c6a6be9de614227f20d1745abbb11d6de6e55d627ab82e381a7" + sha256 cellar: :any_skip_relocation, ventura: "dc156d8b5153328baa9611a2b3debce3ba9579ce5de607843f7cb1446499e3f7" + sha256 cellar: :any_skip_relocation, monterey: "0b40ea1f0980aa3d99c04d339739a8a9db6f149122e327b5b6f8107f972d597c" + sha256 cellar: :any_skip_relocation, arm64_linux: "9524c8585e0d39098a57f013cbd52142c7bc67c409bffded1f3fc9198c3e218f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe9558853d72f47d9f9ebec85e2e80eef181c37e607c7e40cf398845e49cf576" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + assert_match(/time\s+[0-9.]+/, shell_output("#{bin}/bench pwd")) + end +end diff --git a/Formula/b/benchi.rb b/Formula/b/benchi.rb new file mode 100644 index 0000000000000..d34668f7e7873 --- /dev/null +++ b/Formula/b/benchi.rb @@ -0,0 +1,52 @@ +class Benchi < Formula + desc "Benchmarking tool for data pipelines" + homepage "https://github.com/ConduitIO/benchi" + url "https://github.com/ConduitIO/benchi/archive/refs/tags/v0.4.1.tar.gz" + sha256 "c97fc9f2e2fac7be61e9e9c2282e7ee1c9a5da78c3d6c10e40c472b1e79168ab" + license "Apache-2.0" + head "https://github.com/ConduitIO/benchi.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "345f2cb5010d9484cb706db47b011fcf1803f7362edbfa566fa91c3b6dc4a661" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef982909669f57484c15967889e31d9dcbeaabbfa7c06e4679b3cb3cf80813d2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e068e8f02585836ec56621b89ee08f4f7e16227937a94e2506afa3281f41e6aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b234153232acdc8ce535e346c7dabc901982ef1e85560b398961c7c9d1f7fb88" + sha256 cellar: :any_skip_relocation, sonoma: "81b0da33bf40b9125ed50e1e1797204c92db8e4b399d2d6b789a0a1f80037ff0" + sha256 cellar: :any_skip_relocation, ventura: "db0e879626f4ab89d1508c1c39a5122368d0ca2f67ffef4e9e7409f49d0a5ad7" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae2ad857f711eedc3a3ce6c7b2a30d2476b46bc3fedc1d1ce1d7e9817b75e35a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e569ae18bead940da25254a002675e11578f3be5c81d631bb39db717a4439db" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/benchi" + end + + test do + assert_match version.to_s, shell_output("#{bin}/benchi -v") + + # Fails in Linux CI with "open /dev/tty: no such device or address" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + + test_config = testpath/"bench.yml" + test_config.write <<~YAML + name: test-benchmark + iterations: 1 + pipeline: + source: + type: generator + config: + records: 1 + processors: [] + destination: + type: noop + YAML + + output = shell_output("#{bin}/benchi -config #{test_config} -out #{testpath} 2>&1", 1) + assert_match "Cannot connect to the Docker daemon", output + end +end diff --git a/Formula/b/bender.rb b/Formula/b/bender.rb new file mode 100644 index 0000000000000..f8d2b3573419c --- /dev/null +++ b/Formula/b/bender.rb @@ -0,0 +1,32 @@ +class Bender < Formula + desc "Dependency management tool for hardware projects" + homepage "https://github.com/pulp-platform/bender" + url "https://github.com/pulp-platform/bender/archive/refs/tags/v0.28.2.tar.gz" + sha256 "1de599efd238f3238e9bed09005547e63b82c4d98affcd63c565ab650bebc9ad" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/pulp-platform/bender.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1189d35316b1ed3db620562524db029863e9313630d7a7bfec063fa3cf214ec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0025f80ceab8991afc8be4e8beb1987fde448db3ff24c614063a73552cb38d36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a620fe1ab9b5780e8c40141af6565232f050679f16437cd38a3792a4e63809bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b8aa18cb5cc4618a4a902a66344a7a5e6db58420892a74cef95db97b62eb896" + sha256 cellar: :any_skip_relocation, sonoma: "278268ed63d2c0c7becc6062fb2d85af2e5f906ce83999ee064c37c7a6b6553b" + sha256 cellar: :any_skip_relocation, ventura: "47002f217ee6c2ab0b3443193cbc376eba93da8d8871a7b8ca616f8f04cdf2cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "716652ec6f1abd66d61826ecfb6032a1a1bf385928a1011934f71acea34dd09c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbf6968800c089378274ab4ac70a4f709b2b7fa688d601cbcfc17538d01e9fbe" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/bender --version") + + system bin/"bender", "init" + assert_match "manifest format `Bender.yml`", (testpath/"Bender.yml").read + end +end diff --git a/Formula/b/benerator.rb b/Formula/b/benerator.rb new file mode 100644 index 0000000000000..6d5eb29df47f8 --- /dev/null +++ b/Formula/b/benerator.rb @@ -0,0 +1,102 @@ +class Benerator < Formula + desc "Tool for realistic test data generation" + homepage "https://rapiddweller.github.io/homebrew-benerator/" + url "https://github.com/rapiddweller/rapiddweller-benerator-ce/releases/download/3.2.1/rapiddweller-benerator-ce-3.2.1-jdk-11-dist.tar.gz" + sha256 "5d1b3de2344f0c2a1719eed5ab8154a75597a5d7693c373734e0603a45e5f96d" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a73bf659d5c7c62f8048aae669bd74c7da97f750ce0ecb1d8009f94ba32e77fd" + end + + depends_on "openjdk@11" + + def install + # Remove unnecessary files + rm(Dir["bin/*.bat", "bin/pom.xml"]) + + # Installs only the "bin" and "lib" directories from the tarball + libexec.install Dir["bin", "lib"] + # Generate a script that sets the necessary environment variables + env = Language::Java.overridable_java_home_env("11") + env["BENERATOR_HOME"] = libexec + (bin/"benerator").write_env_script(libexec/"bin/benerator", env) + end + + test do + # Test if version is correct + assert_match "Benerator Community Edition #{version}-jdk-11", + shell_output("#{bin}/benerator --version") + assert_match "Java version: #{Formula["openjdk@11"].version}", shell_output("#{bin}/benerator --version") + # Test if data is generated follow the corrected scheme. + # We feed benerator an xml and a scheme in demo/db/script/h2.multischema.sql. + # The XML scheme in myscript.xml have an inhouse test in to check if the data is generated correctly, + # If no, benerator will throw an error, otherwise a success message will be printed. + (testpath/"myscript.xml").write <<~XML + + + + + setting default values + + + + + + + + log the settings to the console + {ftl:encoding:${context.defaultEncoding} default pageSize:${context.defaultPageSize}} + {ftl:JDBC URL: ${dbUrl}} + + define a database that will be referred by the id 'db' subsequently + + + + + + + + + + + + + + + + + + + + + + + + Printing all generated data + + + + + Verifying generated data + select count(*) from "schema1"."db_Category" + select count(*) from "schema1"."db_product" + select count(*) from "schema3"."db_manufacturer" + No Error Occurs. Data Generated Correctly + + XML + + assert_match "No Error Occurs. Data Generated Correctly", + shell_output("#{bin}/benerator myscript.xml") + end +end diff --git a/Formula/b/benthos.rb b/Formula/b/benthos.rb new file mode 100644 index 0000000000000..b02209645cb3d --- /dev/null +++ b/Formula/b/benthos.rb @@ -0,0 +1,46 @@ +class Benthos < Formula + desc "Stream processor for mundane tasks written in Go" + homepage "https://github.com/redpanda-data/benthos" + url "https://github.com/redpanda-data/benthos/archive/refs/tags/v4.59.0.tar.gz" + sha256 "e91734f31a58e133cb072a88b79cd5f2aacc25b61355597977736c5445d2c8fc" + license "MIT" + head "https://github.com/redpanda-data/benthos.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "398d8bfa4fe48763e7b3ce3111ffae077ecce60bd0fc96c4cbb5148c60735c1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "398d8bfa4fe48763e7b3ce3111ffae077ecce60bd0fc96c4cbb5148c60735c1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "398d8bfa4fe48763e7b3ce3111ffae077ecce60bd0fc96c4cbb5148c60735c1d" + sha256 cellar: :any_skip_relocation, sonoma: "3ecf3ab8126a746853132d6191228f33597d9792eab9be57409bfe772222cf6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1c375a6f5ca7a73d858671dc7f6d7ac523253b7a4bdce447382359823767662" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5fab59babfe02593f098547f5dd86ce0d392e08ed160e5cea4d7e6817671790f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/benthos" + end + + test do + (testpath/"sample.txt").write <<~EOS + QmVudGhvcyByb2NrcyE= + EOS + + (testpath/"test_pipeline.yaml").write <<~YAML + --- + logger: + level: ERROR + input: + file: + paths: [ ./sample.txt ] + pipeline: + threads: 1 + processors: + - bloblang: 'root = content().decode("base64")' + output: + stdout: {} + YAML + output = shell_output("#{bin}/benthos -c test_pipeline.yaml") + assert_match "Benthos rocks!", output.strip + end +end diff --git a/Formula/b/bento.rb b/Formula/b/bento.rb new file mode 100644 index 0000000000000..e69b4c655cd0c --- /dev/null +++ b/Formula/b/bento.rb @@ -0,0 +1,42 @@ +class Bento < Formula + desc "Fancy stream processing made operationally mundane" + homepage "https://warpstreamlabs.github.io/bento/" + url "https://github.com/warpstreamlabs/bento/archive/refs/tags/v1.12.1.tar.gz" + sha256 "3faf7f45c70f831cb7c115051c2d99dd0acd12c7ae380ac56d83ae520a5a84df" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "834a7531f7bdf7acdcdb3d1402d771a43acea934fa196c6d804f13c3f2a6d171" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77051bec1c21c494abf207b42fec80ddf747f245257d848c605270f0dc2eaa8d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b8b9281fdb4de9062793774ac53374fc76c98622b39ab3b60bec3f45ca62b67" + sha256 cellar: :any_skip_relocation, sonoma: "c0ec115eb6023bfbcbda5a31824252181552fc7b3a5c458f124a4b534cd986a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fc2a0c3722c81f0323c01c739d209a6c0e61eda68bfd21a41cef754886482a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc7bbaf1b92f5e176b0e6b3b170a6b1325a9068bbc6b8785dd95c99f1a080dd2" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/warpstreamlabs/bento/internal/cli.Version=#{version} -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/bento" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bento --version") + + (testpath/"config.yaml").write <<~YAML + input: + stdin: {}#{" "} + + pipeline: + processors: + - mapping: root = content().uppercase() + + output: + stdout: {} + YAML + + output = shell_output("echo foobar | bento -c #{testpath}/config.yaml") + assert_match "FOOBAR", output + end +end diff --git a/Formula/b/bento4.rb b/Formula/b/bento4.rb new file mode 100644 index 0000000000000..38fd1a056d4c4 --- /dev/null +++ b/Formula/b/bento4.rb @@ -0,0 +1,47 @@ +class Bento4 < Formula + desc "Full-featured MP4 format and MPEG DASH library and tools" + homepage "https://www.bento4.com/" + url "https://www.bok.net/Bento4/source/Bento4-SRC-1-6-0-641.zip" + version "1.6.0-641" + sha256 "8258faf0de7253f2aac016018f33d4a04c16d9060735e14ec8711f84aaedf0c8" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://www.bok.net/Bento4/source/" + regex(/href=.*?Bento4-SRC[._-]v?(\d+(?:[.-]\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5367dba6956a756d81d778166578f003e29d2509b16e84a8fb0118b8bc387560" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3be0b7e4aa10081340266b8c4ecd5ff536ea75489fc739cfd3948195d94508af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e46e918ac116bfab1bad50f448b816fe75aba44b9f1331dcd01e9f4f8c9d1c8" + sha256 cellar: :any_skip_relocation, sonoma: "8c362b9bfd9caf4a3dfad70c80adb0d5166489c87021c17ee5ffc34ade8a34a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3cedc1416a3b31db7e328d170bbfd699b6d315ac1930aafbeb67bf283e0533b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79f1631cc68c122870fefb5815f100643587326f7663bfc1ff0b91657c5dc11e" + end + + depends_on "cmake" => :build + depends_on "python@3.14" + + conflicts_with "mp4v2", because: "both install `mp4extract` and `mp4info` binaries" + + def install + system "cmake", "-S", ".", "-B", "cmakebuild", "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch}", *std_cmake_args + system "cmake", "--build", "cmakebuild" + system "cmake", "--install", "cmakebuild" + + rm Dir["Source/Python/wrappers/*.bat"] + inreplace Dir["Source/Python/wrappers/*"], + "BASEDIR=$(dirname $0)", "BASEDIR=#{libexec}/Python/wrappers" + libexec.install "Source/Python" + bin.install_symlink Dir[libexec/"Python/wrappers/*"] + end + + test do + system bin/"mp4mux", "--track", test_fixtures("test.m4a"), "out.mp4" + assert_path_exists testpath/"out.mp4", "Failed to create out.mp4!" + end +end diff --git a/Formula/b/berglas.rb b/Formula/b/berglas.rb new file mode 100644 index 0000000000000..cba4f1aa23e5a --- /dev/null +++ b/Formula/b/berglas.rb @@ -0,0 +1,39 @@ +class Berglas < Formula + desc "Tool for managing secrets on Google Cloud" + homepage "https://github.com/GoogleCloudPlatform/berglas" + url "https://github.com/GoogleCloudPlatform/berglas/archive/refs/tags/v2.0.8.tar.gz" + sha256 "1765994e212c0281b215aabae3ec95eef2894a6bfa99f5434db4bf6814c0c940" + license "Apache-2.0" + head "https://github.com/GoogleCloudPlatform/berglas.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "33f45ad747d7be2e840d6befa7de18a8f9fe1b71d1a7b707f68c454b8f87dd11" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bacaef230bd9189cece3229c9ae695c9a38547e0cf7bcff8d38d993de445f437" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bacaef230bd9189cece3229c9ae695c9a38547e0cf7bcff8d38d993de445f437" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bacaef230bd9189cece3229c9ae695c9a38547e0cf7bcff8d38d993de445f437" + sha256 cellar: :any_skip_relocation, sonoma: "733fad7fc72998d03144ac96dac099243c32e6e92f1488eed016985f955b7010" + sha256 cellar: :any_skip_relocation, ventura: "733fad7fc72998d03144ac96dac099243c32e6e92f1488eed016985f955b7010" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0ebd830497e0a9496fb3ef987e6b75bebc16b7d868ee6cc31064738b53eb87f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "461226ff3f25d799795f5ab7d08f6552709219e27681c67d13eed28a06de1dde" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/GoogleCloudPlatform/berglas/v2/internal/version.name=berglas + -X github.com/GoogleCloudPlatform/berglas/v2/internal/version.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"berglas", "completion", shells: [:bash, :zsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/berglas -v") + + out = shell_output("#{bin}/berglas list -l info homebrewtest 2>&1", 61) + assert_match "could not find default credentials.", out + end +end diff --git a/Formula/b/berkeley-db.rb b/Formula/b/berkeley-db.rb new file mode 100644 index 0000000000000..9cf41cb056068 --- /dev/null +++ b/Formula/b/berkeley-db.rb @@ -0,0 +1,106 @@ +class BerkeleyDb < Formula + desc "High performance key/value database" + homepage "https://www.oracle.com/database/technologies/related/berkeleydb.html" + url "https://download.oracle.com/berkeley-db/db-18.1.40.tar.gz" + mirror "https://fossies.org/linux/misc/db-18.1.40.tar.gz" + sha256 "0cecb2ef0c67b166de93732769abdeba0555086d51de1090df325e18ee8da9c8" + license "AGPL-3.0-only" + revision 2 + + livecheck do + url "https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html" + regex(/Berkeley\s*DB[^(]*?\(\s*v?(\d+(?:\.\d+)+)\s*\)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8ab6e76001b5a945ed16eaa85a4a5676bd3a7f54365c2255c90565d73096ff0e" + sha256 cellar: :any, arm64_sequoia: "422be2c8877f981442a27bd80d7a4494de3a515b54b1d206e51c4e710f9d83eb" + sha256 cellar: :any, arm64_sonoma: "f8a6da9be201214ca17efa824a335060a6f1ff4d72cc579a5878ee06ac2d9b61" + sha256 cellar: :any, arm64_ventura: "67fed25d26cb987106b346ee4088959b71306db6a016cb6f58cca9da9350c36d" + sha256 cellar: :any, arm64_monterey: "e5416a45caf56653c4691f5d939df58d9da2254807efd6ab5425cfa63a472ac9" + sha256 cellar: :any, arm64_big_sur: "a68f9cf2daa3a03ea5c9c9e072955d2dec43aff19859ef2c40888b7b85ea379f" + sha256 cellar: :any, sonoma: "01746c62817e50160208bd9acb690eec9352e89b5a3b8bda6bea3952b9bc4352" + sha256 cellar: :any, ventura: "a6b04772ee3978ec98f1e3e79fec872c9dc5476b49b7d70218e5c850af6ecf79" + sha256 cellar: :any, monterey: "6db05f803f05820f25cdd5936a8d23615ef886f0a409946d40d966cf5f35f023" + sha256 cellar: :any, big_sur: "5f4917a225a5986f682c85dbcfb6503024738d6eadb637161210ae621c26f457" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ae89765b5bcd261562a5dd527459d9fadb46d2aa264240b634e0acc21076a58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ba948d2977fbfcc865086fab6d6567b4f3972fcc46e327817fb7600f64d4312" + end + + keg_only :provided_by_macos + + depends_on "openssl@3" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + directory "dist" + end + + def install + # Work around undefined NULL causing incorrect detection of thread local storage class + ENV.append "CFLAGS", "-include stddef.h" if DevelopmentTools.clang_build_version >= 1500 + + # BerkeleyDB dislikes parallel builds + ENV.deparallelize + + # --enable-compat185 is necessary because our build shadows + # the system berkeley db 1.x + args = %W[ + --disable-debug + --disable-static + --prefix=#{prefix} + --mandir=#{man} + --enable-cxx + --enable-compat185 + --enable-sql + --enable-sql_codegen + --enable-dbm + --enable-stl + ] + + # BerkeleyDB requires you to build everything from the build_unix subdirectory + cd "build_unix" do + system "../dist/configure", *args + system "make", "install", "DOCLIST=license" + + # delete docs dir because it is huge + rm_r(prefix/"docs") + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() { + Db db(NULL, 0); + assert(db.open(NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0) == 0); + + const char *project = "Homebrew"; + const char *stored_description = "The missing package manager for macOS"; + Dbt key(const_cast(project), strlen(project) + 1); + Dbt stored_data(const_cast(stored_description), strlen(stored_description) + 1); + assert(db.put(NULL, &key, &stored_data, DB_NOOVERWRITE) == 0); + + Dbt returned_data; + assert(db.get(NULL, &key, &returned_data, 0) == 0); + assert(strcmp(stored_description, (const char *)(returned_data.get_data())) == 0); + + assert(db.close(0) == 0); + } + CPP + flags = %W[ + -I#{include} + -L#{lib} + -ldb_cxx + ] + system ENV.cxx, "test.cpp", "-o", "test", *flags + system "./test" + assert_path_exists testpath/"test.db" + end +end diff --git a/Formula/b/berkeley-db@4.rb b/Formula/b/berkeley-db@4.rb new file mode 100644 index 0000000000000..6bc1faaa60594 --- /dev/null +++ b/Formula/b/berkeley-db@4.rb @@ -0,0 +1,103 @@ +class BerkeleyDbAT4 < Formula + desc "High performance key/value database" + homepage "https://www.oracle.com/database/technologies/related/berkeleydb.html" + url "https://download.oracle.com/berkeley-db/db-4.8.30.tar.gz" + sha256 "e0491a07cdb21fb9aa82773bbbedaeb7639cbd0e7f96147ab46141e0045db72a" + license "Sleepycat" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "de4afa55a39dde81bdc017b071d7ce98271d88bc440aecc89c21d426e27486e6" + sha256 cellar: :any, arm64_sonoma: "6a70bef2a6c9d8fcc8530348fdd1040aef31136d27ec7fcd3c2dfb009ae909f6" + sha256 cellar: :any, arm64_ventura: "dad3afeb395f771ec875428b208e25bb72a052f6b855832817491952ab9f5f02" + sha256 cellar: :any, arm64_monterey: "ec19587b4fb0d7ee44a351aed1ed2912e327acdd4de816baee6ec9f3a9dfc7ff" + sha256 cellar: :any, arm64_big_sur: "4cc3d7123506a695892eb450c704ae6a2f26fd865dcab7bb9290431c5ed4add5" + sha256 cellar: :any, sonoma: "af1faa2764731448aaa9ff5a24b570905a280a7b11354cbb997c2e2da2a24aa9" + sha256 cellar: :any, ventura: "19169bd9bb20a1625afc20a9da826825ddc2fc707a894eee0c8428102b2c4bee" + sha256 cellar: :any, monterey: "7b227d2e4f39efef969bc407bc04c5bbf7f2cfcce6e0e731680342777dd7f2be" + sha256 cellar: :any, big_sur: "8a95577ecc798d7dd61b100d282c3b667eb278b3d719a41331db2cc57e0843c1" + sha256 cellar: :any, catalina: "3ef8ec895927523c7a7c2c8c18af534ed00abd9b0d35664a3464595906adcee4" + sha256 cellar: :any_skip_relocation, arm64_linux: "055768ef5debedea1692119a19af00031e6ab66431ae47d635d0f2d4c46d40e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41de3e62651a2b5b8a3ae23b18b1331478c38fac38c1446627cd0d82c1e657d8" + end + + keg_only :versioned_formula + + # This formula is less likely to get security patches than `berkeley-db@5`, + # which is the version shipped & patched by major Linux distros. + deprecate! date: "2024-08-17", because: :unmaintained + disable! date: "2025-08-24", because: :unmaintained + + # Fix build with recent clang + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/berkeley-db@4/clang.diff" + sha256 "86111b0965762f2c2611b302e4a95ac8df46ad24925bbb95a1961542a1542e40" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + directory "dist" + end + + def install + # BerkeleyDB dislikes parallel builds + ENV.deparallelize + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + args = %W[ + --disable-debug + --prefix=#{prefix} + --mandir=#{man} + --enable-cxx + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + # BerkeleyDB requires you to build everything from the build_unix subdirectory + cd "build_unix" do + system "../dist/configure", *args + system "make", "install" + + # use the standard docs location + doc.parent.mkpath + mv prefix/"docs", doc + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() { + Db db(NULL, 0); + assert(db.open(NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0) == 0); + + const char *project = "Homebrew"; + const char *stored_description = "The missing package manager for macOS"; + Dbt key(const_cast(project), strlen(project) + 1); + Dbt stored_data(const_cast(stored_description), strlen(stored_description) + 1); + assert(db.put(NULL, &key, &stored_data, DB_NOOVERWRITE) == 0); + + Dbt returned_data; + assert(db.get(NULL, &key, &returned_data, 0) == 0); + assert(strcmp(stored_description, (const char *)(returned_data.get_data())) == 0); + + assert(db.close(0) == 0); + } + CPP + flags = %W[ + -I#{include} + -L#{lib} + -ldb_cxx + ] + flags << "-Wl,-rpath,#{lib}" if OS.linux? + system ENV.cxx, "test.cpp", "-o", "test", *flags + system "./test" + assert_path_exists testpath/"test.db" + end +end diff --git a/Formula/b/berkeley-db@5.rb b/Formula/b/berkeley-db@5.rb new file mode 100644 index 0000000000000..90be91f764b22 --- /dev/null +++ b/Formula/b/berkeley-db@5.rb @@ -0,0 +1,128 @@ +class BerkeleyDbAT5 < Formula + desc "High performance key/value database" + homepage "https://www.oracle.com/database/technologies/related/berkeleydb.html" + url "https://download.oracle.com/berkeley-db/db-5.3.28.tar.gz" + sha256 "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628" + license "Sleepycat" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a713c6c74511eb18a8dc92c92bbb1b7ca3f1e7c71c3325ab584634e6275ab1bd" + sha256 cellar: :any, arm64_sequoia: "ac64ff01e9897372c22dd2f9c90a2e5ffc5b66876c243d20d1e107b7c3785fba" + sha256 cellar: :any, arm64_sonoma: "7e1f6f67ce491e8636f9095fa45854e7b5720745b909e3b84cad8400b28418fd" + sha256 cellar: :any, arm64_ventura: "65a70e28dcf089e0ec6d247c32df257c8bc2532ece6f4c447200a48e7ad17a8d" + sha256 cellar: :any, arm64_monterey: "8c9ea685725256b2b50e856c23d20af734f20bc69fc92383e1819e4f867c8ac3" + sha256 cellar: :any, arm64_big_sur: "9ef4df0db041470e7eba4335524ea0348f0061bd4e10ab7a7f6051841f7a7e11" + sha256 cellar: :any, sonoma: "db128eb3926e9941b0db4aaf52df8848c74194128712f153f46df7810395ff5e" + sha256 cellar: :any, ventura: "7fdd38c90e7bfcb57b4a061423d38602471f568e37393820889ee56d1c9fd003" + sha256 cellar: :any, monterey: "36aaa79c9fc3eb2b7690c24bdf74be3d0f7e1752983a63a17538945e2bce7452" + sha256 cellar: :any, big_sur: "5aa0875cdd7bd504abf8f7365e47f5ac4b0e1b9e4ca004d6eb58e2f1564a9621" + sha256 cellar: :any, catalina: "944b439dd5dcb02c5219b307d6ed739b9808a4eced27f6605a977e550e47c8bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "356a948ed9ce8a65a5f280c5f68c0bb7d750ab962c06485c7972f557d779acf0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0e2906cc6657dc497fec75629560b0a404b81cebadf5e10c1f70616a14fa886" + end + + keg_only :versioned_formula + + # We use a resource to avoid potential build dependency loop in future. Right now this + # doesn't happen because `perl` depends on `berkeley-db`, but the dependency may change + # to `berkeley-db@5`. In this case, `automake -> autoconf -> perl` will create a loop. + # Ref: https://github.com/Homebrew/homebrew-core/issues/100796 + resource "automake" do + on_linux do + on_arm do + url "https://ftpmirror.gnu.org/gnu/automake/automake-1.16.5.tar.xz" + mirror "https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz" + sha256 "f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469" + end + end + end + + # Fix build with recent clang + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/berkeley-db@4/clang.diff" + sha256 "86111b0965762f2c2611b302e4a95ac8df46ad24925bbb95a1961542a1542e40" + directory "src" + end + + # Further fixes for clang + patch :p0 do + url "https://raw.githubusercontent.com/NetBSD/pkgsrc/6034096dc85159a02116524692545cf5752c8f33/databases/db5/patches/patch-src_dbinc_db.in" + sha256 "302b78f3e1f131cfbf91b24e53a5c79e1d9234c143443ab936b9e5ad08dea5b6" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + directory "dist" + end + + def install + # BerkeleyDB dislikes parallel builds + ENV.deparallelize + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + # Work around ancient config files not recognizing aarch64 linux + # configure: error: cannot guess build type; you must specify one + if OS.linux? && Hardware::CPU.arm? + resource("automake").stage do + (buildpath/"dist").install "lib/config.guess", "lib/config.sub" + end + end + + args = %W[ + --disable-static + --prefix=#{prefix} + --mandir=#{man} + --enable-cxx + --enable-dbm + ] + + # BerkeleyDB requires you to build everything from the build_unix subdirectory + cd "build_unix" do + system "../dist/configure", *args + system "make", "install" + + # use the standard docs location + doc.parent.mkpath + mv prefix/"docs", doc + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() { + Db db(NULL, 0); + assert(db.open(NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0) == 0); + + const char *project = "Homebrew"; + const char *stored_description = "The missing package manager for macOS"; + Dbt key(const_cast(project), strlen(project) + 1); + Dbt stored_data(const_cast(stored_description), strlen(stored_description) + 1); + assert(db.put(NULL, &key, &stored_data, DB_NOOVERWRITE) == 0); + + Dbt returned_data; + assert(db.get(NULL, &key, &returned_data, 0) == 0); + assert(strcmp(stored_description, (const char *)(returned_data.get_data())) == 0); + + assert(db.close(0) == 0); + } + CPP + flags = %W[ + -I#{include} + -L#{lib} + -ldb_cxx + ] + system ENV.cxx, "test.cpp", "-o", "test", *flags + system "./test" + assert_path_exists testpath/"test.db" + end +end diff --git a/Formula/b/bettercap.rb b/Formula/b/bettercap.rb new file mode 100644 index 0000000000000..2184979832d9d --- /dev/null +++ b/Formula/b/bettercap.rb @@ -0,0 +1,56 @@ +class Bettercap < Formula + desc "Swiss army knife for network attacks and monitoring" + homepage "https://www.bettercap.org/" + url "https://github.com/bettercap/bettercap/archive/refs/tags/v2.41.4.tar.gz" + sha256 "384848630f594fadd48e80406f4cf8ceccfe3f32dd9182f7e18c20240e74a5fd" + license "GPL-3.0-only" + head "https://github.com/bettercap/bettercap.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a5d2ccf8e44bcd750a3c1216174162ef4ceeed0dcf7573c58bc3b9a5b0d0c2ca" + sha256 cellar: :any, arm64_sequoia: "4207804c76606309568c517aca44e7cfc16b17c4536890d529db11e613ff9c90" + sha256 cellar: :any, arm64_sonoma: "9f27f57bf5b09da4bfc0452598b25b6e63e25bbfa6f24c8319fb359c4c8a21c6" + sha256 cellar: :any, arm64_ventura: "93b814c4cbfd843d1ae14c5bf401cad13f0cf06e3a91acb6b8d2b00967c321b5" + sha256 cellar: :any, sonoma: "6a7de7c04fc89cbb75a69ac6e8313fe59ab1cf5258042c8d9fb2f8b76655daf5" + sha256 cellar: :any, ventura: "99ab3ba1e0575352325dd1c179d55dc3235a082a415d22a3b45d1470df4daa76" + sha256 cellar: :any_skip_relocation, arm64_linux: "5935ba6b62d8519bccd82dcfc24a746804261d384751f85e60508cf0c26eb2fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d89986f7aa57f5b2303029cfb5b929498fb6f47cb54290fdc97b530feca594d" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + uses_from_macos "libpcap" + + on_linux do + depends_on "libnetfilter-queue" + end + + resource "ui" do + url "https://github.com/bettercap/ui.git", + revision: "6e126c470e97542d724927ba975011244127dbb1" + end + + def install + (buildpath/"modules/ui/ui").install resource("ui") + system "make", "build" + bin.install "bettercap" + end + + def caveats + <<~EOS + bettercap requires root privileges so you will need to run `sudo bettercap`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + expected = if OS.mac? + "Operation not permitted" + else + "Permission Denied" + end + assert_match expected, shell_output("#{bin}/bettercap 2>&1", 1) + end +end diff --git a/Formula/b/betty.rb b/Formula/b/betty.rb new file mode 100644 index 0000000000000..461fdd9a3eb3c --- /dev/null +++ b/Formula/b/betty.rb @@ -0,0 +1,27 @@ +class Betty < Formula + desc "English-like interface for the command-line" + homepage "https://github.com/pickhardt/betty" + url "https://github.com/pickhardt/betty/archive/refs/tags/v0.1.7.tar.gz" + sha256 "ed71e88a659725e0c475888df044c9de3ab1474ff483f0a3bb432949035e62d3" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "6d9822a13119b0500eb79e9c4cafaa064053c0870393092f1f0c6386592138d7" + end + + uses_from_macos "ruby" + + def install + libexec.install "lib", "main.rb" => "betty" + bin.write_exec_script libexec/"betty" + end + + test do + system bin/"betty", "what is your name" + system bin/"betty", "version" + end +end diff --git a/Formula/b/bfg.rb b/Formula/b/bfg.rb new file mode 100644 index 0000000000000..6f5a923bb3e9e --- /dev/null +++ b/Formula/b/bfg.rb @@ -0,0 +1,29 @@ +class Bfg < Formula + desc "Remove large files or passwords from Git history like git-filter-branch" + homepage "https://rtyley.github.io/bfg-repo-cleaner/" + url "https://search.maven.org/remotecontent?filepath=com/madgag/bfg/1.15.0/bfg-1.15.0.jar" + sha256 "dfe2885adc2916379093f02a80181200536856c9a987bf21c492e452adefef7a" + license "GPL-3.0-or-later" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/madgag/bfg/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "e6ab06431b47f90f783c186032521800d0fffb1f9fffb842c0de85e624d54d2d" + end + + depends_on "openjdk" + + def install + libexec.install "bfg-#{version}.jar" + bin.write_jar_script libexec/"bfg-#{version}.jar", "bfg" + end + + test do + system bin/"bfg" + end +end diff --git a/Formula/b/bfs.rb b/Formula/b/bfs.rb new file mode 100644 index 0000000000000..310e201d8fb7e --- /dev/null +++ b/Formula/b/bfs.rb @@ -0,0 +1,47 @@ +class Bfs < Formula + desc "Breadth-first version of find" + homepage "https://tavianator.com/projects/bfs.html" + url "https://github.com/tavianator/bfs/archive/refs/tags/4.1.tar.gz" + sha256 "7a2ccafc87803b6c42009019e0786cb1307f492c2d61d2fcb0be5dcfdd0049da" + license "0BSD" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2d197823d3ea09db80ff41a0a887b3278c9b1f28db50c683f17f8233a26e95c9" + sha256 cellar: :any, arm64_sequoia: "cc95849810fe6c692160249cc81d38f1a2cd3e0f5d6f033e0bd9342429116e40" + sha256 cellar: :any, arm64_sonoma: "dd75c7c57aa181eb29832ee8c1fb6d4530f8509672d9bfb27e19134309507d2d" + sha256 cellar: :any, arm64_ventura: "5b0fccf7829272c6a2c9d10c7432b70c912fbb5174eeff38a64ddbbb165bdce2" + sha256 cellar: :any, sonoma: "4c121ba08ed118750411c1003e9e078420e98a819258816f133b6ca0c83f2473" + sha256 cellar: :any, ventura: "50c78795197923422f8f51d5099dd604027a289701f9af875e7f942e6443e9be" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b3a3ee53d9833b58291c0e426afbdd4bac5a880c9bc77585d42e0205fb00785" + sha256 cellar: :any_skip_relocation, x86_64_linux: "724d215224af855240f52ca8f0ad7fccc8c1d2dace5f770692f699a8dd91c09f" + end + + depends_on "pkgconf" => :build + depends_on "oniguruma" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1300 + end + + on_linux do + depends_on "acl" + depends_on "libcap" + depends_on "liburing" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1300 + + system "./configure", "--enable-release" + system "make" + system "make", "install", "DEST_PREFIX=#{prefix}", "DEST_MANDIR=#{man}" + bash_completion.install share/"bash-completion/completions/bfs" + end + + test do + touch "foo_file" + touch "test_file" + assert_equal "./test_file", shell_output("#{bin}/bfs -name 'test*' -regextype emacs -depth 1").chomp + end +end diff --git a/Formula/b/bgpdump.rb b/Formula/b/bgpdump.rb new file mode 100644 index 0000000000000..07e20d342b0f6 --- /dev/null +++ b/Formula/b/bgpdump.rb @@ -0,0 +1,49 @@ +class Bgpdump < Formula + desc "C library for analyzing MRT/Zebra/Quagga dump files" + homepage "https://github.com/RIPE-NCC/bgpdump/wiki" + url "https://github.com/RIPE-NCC/bgpdump/archive/refs/tags/v1.6.2.tar.gz" + sha256 "415692c173a84c48b1e927a6423a4f8fd3e6359bc3008c06b7702fe143a76223" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e7f3f18e49653d1dff36e3ff2c608c0e20a387687655fa22c84b57fe015a431a" + sha256 cellar: :any, arm64_sequoia: "58a05ac326e701a6417482c33a5660c4cac2ad9a3995e64dd064bc088e9e8a8f" + sha256 cellar: :any, arm64_sonoma: "9845446b9c11faac51f1180ad9493fcc523ce44bc5f8179fd2ab4a985323e360" + sha256 cellar: :any, arm64_ventura: "7d108fc2cd142cecb17da960a4ec7db84bd63178879596c9f9811ce7caf6f015" + sha256 cellar: :any, arm64_monterey: "d4fe975c315b68318f0c63ff6b0d4ab3d9c6477fde81f6a4feed97ebe0fc39e4" + sha256 cellar: :any, arm64_big_sur: "547aa3e0a48f992ab4475b4f4b9203d46700fbde8588528382a7fc730157235c" + sha256 cellar: :any, sonoma: "73a39e564b78ad124866c1c94468620723ff94abf20a314dcb8ac98d55a56367" + sha256 cellar: :any, ventura: "ae7e665b60cb17e22cd9a145c59f8e5fb1e847892376fe8a621249b67e5786b9" + sha256 cellar: :any, monterey: "946678f11f01a3b35808d48e2ee9dc92a54f400364c7ae20989cf64263d9ae0a" + sha256 cellar: :any, big_sur: "30a4765bc4c7decdb628df132d66bc675da867c5ed9631beac87dd99bce53713" + sha256 cellar: :any, catalina: "f7c93574ccb3a6eaa05910009e26068f99f14082df78d3b2b0b84166488657e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b47b8e9e6bf6cf650441e4ccf7127b058ce743716a6b83e06803e18f37d9c6ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab69320eab97e440488a15664f3defe5f2dd921bedfd30c23b80deefc5c954e0" + end + + depends_on "autoconf" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "./bootstrap.sh" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"bgpdump", "-T" + end +end diff --git a/Formula/b/bgpq3.rb b/Formula/b/bgpq3.rb new file mode 100644 index 0000000000000..229a0d41411dc --- /dev/null +++ b/Formula/b/bgpq3.rb @@ -0,0 +1,53 @@ +class Bgpq3 < Formula + desc "BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers" + homepage "http://snar.spb.ru/prog/bgpq3/" + url "https://github.com/snar/bgpq3/archive/refs/tags/v0.1.38.tar.gz" + sha256 "c4a424825e6c9c9ec48c2583dcbbfc3016d15cc0be1dc55d07827e1b9b79888c" + license "BSD-2-Clause" + head "https://github.com/snar/bgpq3.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3bf0242ea13e9360cd13d475dd15be3f7c889c831a4110194e1f7fed18aaedf1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "234036f637e3d392114a9a92637f28f59820c407803d414e9efff4cde922e506" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "20e940f3930fc35fdb480f156780d53cebe5c18b26e231db42f0667d77d87b50" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c59144d7fa15c862bfdeb5af564871eb28cfbc6112d6e985d9be636de0deee4e" + sha256 cellar: :any_skip_relocation, sonoma: "4f29830a26cca0ebac56d0978d1265d9078c09f782c23062710262296750d916" + sha256 cellar: :any_skip_relocation, ventura: "19510346a7393c8b478610831da0a8d5060932feb543fb48d37709d09cac061b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5ad42018e54795c6aa663b7cf201eee6abbec7ccd6403041d619b4ecdd2dfa8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c79dfd70b5f7abf543be803c8f3e65b1c42b5dc746a9380e923599062e360a63" + end + + # Makefile: upstream has been informed of the patch through email (multiple + # times) but no plans yet to incorporate it https://github.com/snar/bgpq3/pull/2 + # there was discussion about this patch for 0.1.18 and 0.1.19 as well + patch :DATA + + def install + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"bgpq3", "AS-ANY" + end +end + +__END__ +--- a/Makefile.in ++++ b/Makefile.in +@@ -32,8 +32,8 @@ + install: bgpq3 + if test ! -d @bindir@ ; then mkdir -p @bindir@ ; fi + ${INSTALL} -c -s -m 755 bgpq3 @bindir@ +- if test ! -d @prefix@/man/man8 ; then mkdir -p @prefix@/man/man8 ; fi +- ${INSTALL} -m 644 bgpq3.8 @prefix@/man/man8 ++ if test ! -d @mandir@/man8 ; then mkdir -p @mandir@/man8 ; fi ++ ${INSTALL} -m 644 bgpq3.8 @mandir@/man8 + + depend: + makedepend -- $(CFLAGS) -- $(SRCS) diff --git a/Formula/b/bgpq4.rb b/Formula/b/bgpq4.rb new file mode 100644 index 0000000000000..172486864f585 --- /dev/null +++ b/Formula/b/bgpq4.rb @@ -0,0 +1,46 @@ +class Bgpq4 < Formula + desc "BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers" + homepage "https://github.com/bgp/bgpq4" + url "https://github.com/bgp/bgpq4/archive/refs/tags/1.15.tar.gz" + sha256 "30fea8d6274af6e3fba30497b977a924c79de326ae2211e490362dc7282403d6" + license "BSD-2-Clause" + head "https://github.com/bgp/bgpq4.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13894eb38127e80cfaad864959908e443b93920516fcaead469ca88ae882cd79" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe14d23c24fdc8be81ab6e291e8483e66a1c022939ec06603ce326da41393b78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67e3fce3c562c29ba7ea02ab532a49cd7d3be4a9a3f54db774235a2d9b68baf9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ef09ee512c779d161c92064f799d213300a00a72ce268f02b05652268afdf53" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d508f0b6fbf454288a745c659235deab354cbf63c1eda932dd589827b8ba3e24" + sha256 cellar: :any_skip_relocation, sonoma: "054b4627828599a8f3518c4cd47914f895b7c652b537cef8c9115940fc6dc3f6" + sha256 cellar: :any_skip_relocation, ventura: "6b1e57ac908e87d8b348fe0d2dc70fd0bd5c178caf8dc5a041bad4cd48088ab9" + sha256 cellar: :any_skip_relocation, monterey: "0d4dfeaa2caa2c39c6daa71d8f679fc18102c1c13caa14faa984e956eeb6820f" + sha256 cellar: :any_skip_relocation, arm64_linux: "eacb29c2e404c6c58efffd6bbcaa51a229a2ef55ddb83938737e2245c4c6fdd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1170e29b65fbd8f5eacb9ae2fa7ed9a1cf7408ef35095c17c95e38635cebb4c2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./bootstrap" + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + + test do + output = <<~EOS + no ip prefix-list NN + ! generated prefix-list NN is empty + ip prefix-list NN deny 0.0.0.0/0 + EOS + + assert_match output, shell_output("#{bin}/bgpq4 AS-ANY") + end +end diff --git a/Formula/b/bgpstream.rb b/Formula/b/bgpstream.rb new file mode 100644 index 0000000000000..d85e26de86d27 --- /dev/null +++ b/Formula/b/bgpstream.rb @@ -0,0 +1,46 @@ +class Bgpstream < Formula + desc "For live and historical BGP data analysis" + homepage "https://bgpstream.caida.org/" + url "https://github.com/CAIDA/libbgpstream/releases/download/v2.3.0/libbgpstream-2.3.0.tar.gz" + sha256 "c6be2c761ed216edc23a85409a5de3639172bc42db115c8574c2108ace7481a4" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c060368caac64c91df708d5b62f1e5ff276d94447b98c59cd168a0158890d1e2" + sha256 cellar: :any, arm64_sequoia: "8db317338ecbca23c82ea862d2f50c557262929d5c805abe88cf601dd5377da5" + sha256 cellar: :any, arm64_sonoma: "cad6544e83d2f83c50c324be9e81d144afd00e75f92d96f007dd131f529e1164" + sha256 cellar: :any, arm64_ventura: "dde80cac2798151d197586224462134faaa3f2e4504f7385bd63679326851646" + sha256 cellar: :any, arm64_monterey: "b693ea06d316782ba814fe4e5580f9c3be901cefb5a1dd8fdd5ccab71a342d96" + sha256 cellar: :any, sonoma: "a4aef360bb939d7ed5f7eef8e25248480b23af24914d8493af34fd9dc64478b4" + sha256 cellar: :any, ventura: "66b080b4aa838bc8d49618e17dba64817b0a02f3b66ec187a1ff554e9f50a246" + sha256 cellar: :any, monterey: "62c0565e4e317bb7a687f093b19830272088eb1ab00cde9f6160ca99b45f489e" + sha256 cellar: :any_skip_relocation, arm64_linux: "87a539b41d619711093bbd3fb76e30d78feaa1d4ff134f26afe6e0ac15263b17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb6547761ec1c1a5b8bd0c71899bc0c7acf4316c2d9c109b7ac66754c26d6341" + end + + depends_on "librdkafka" + depends_on "wandio" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "bgpstream.h" + int main() + { + bgpstream_t *bs = bs = bgpstream_create(); + if(!bs) { + return -1; + } + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lbgpstream", "-o", "test" + system "./test" + end +end diff --git a/Formula/b/bgrep.rb b/Formula/b/bgrep.rb new file mode 100644 index 0000000000000..cecd79ac58333 --- /dev/null +++ b/Formula/b/bgrep.rb @@ -0,0 +1,42 @@ +class Bgrep < Formula + desc "Like grep but for binary strings" + homepage "https://github.com/tmbinc/bgrep" + url "https://github.com/tmbinc/bgrep/archive/refs/tags/bgrep-0.2.tar.gz" + sha256 "24c02393fb436d7a2eb02c6042ec140f9502667500b13a59795388c1af91f9ba" + license "BSD-2-Clause" + head "https://github.com/tmbinc/bgrep.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb6e6a68d53feffbff679a734db6345a373556ddd3f2d76e2f073b4d3f84d452" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9084b991c90bd70740bce59c399d55365789b5226d8883067f552d2601fa0b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e2246a9bc12ae07c1c2403b4efb0023bc96c22867bff0ad41d1d7381ef5b694a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b808abe4e0fd7be98cd1d9916c7e839f95cb086d28a987101aa51a73c22da87f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c65ddc4ca486db177cd63f45e4cb97172f590ed9b2f70364120b2326e7ab3f94" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2d5628a1b93a4ad2e770502b011140bc301051e1679ac5d59eadbd9b94944b1b" + sha256 cellar: :any_skip_relocation, sonoma: "2c1b6ebd1db5456a5df3a9d7c6c3f5f360bc1a717c0428d204670f7c2e070210" + sha256 cellar: :any_skip_relocation, ventura: "0240d1970176f07cb0649f1da10501aadd49ca7a915756ecadb0d08fb1032bb5" + sha256 cellar: :any_skip_relocation, monterey: "2264b9b3c17b3faa5c66f612ce460a65e02bf0f3c3620002c90866c699b5cf81" + sha256 cellar: :any_skip_relocation, big_sur: "cbd5d550e042d764f0cc4c39e58cd40ae87430fb773aae7d77f3ca56d05c3325" + sha256 cellar: :any_skip_relocation, catalina: "444a8dd0c2190e3a75574f8bee287895aee1d070d3e72e72fd7cda4c9cb77211" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d285a3edc43fe8730ff6c744018cbbea2562647ff97565f8cc0b5c75d565e14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5a19c037fcdd2ef3d50b419dd0d80208febfe24fb6bf785f40f47b7b2f87f45" + end + + def install + args = %w[bgrep.c -o bgrep] + args << ENV.cflags if ENV.cflags.present? + system ENV.cc, *args + bin.install "bgrep" + end + + test do + path = testpath/"hi.prg" + path.binwrite [0x00, 0xc0, 0xa9, 0x48, 0x20, 0xd2, 0xff, + 0xa9, 0x49, 0x20, 0xd2, 0xff, 0x60].pack("C*") + + assert_equal "#{path}: 00000004\n#{path}: 00000009\n", + shell_output("#{bin}/bgrep 20d2ff #{path}") + end +end diff --git a/Formula/b/bib-tool.rb b/Formula/b/bib-tool.rb new file mode 100644 index 0000000000000..e423dea4fb2aa --- /dev/null +++ b/Formula/b/bib-tool.rb @@ -0,0 +1,54 @@ +class BibTool < Formula + desc "Manipulates BibTeX databases" + homepage "https://www.gerd-neugebauer.de/software/TeX/BibTool/en/" + url "https://github.com/ge-ne/bibtool/releases/download/BibTool_2_68/BibTool-2.68.tar.gz" + sha256 "e1964d199b0726f431f9a1dc4ff7257bb3dba879b9fa221803e0aa7840dee0e0" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^BibTool[._-]v?(\d+(?:[._-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "21dc870e5436946a79ee212b44a1d867c872f5c2374a3693563097dd89212849" + sha256 arm64_sequoia: "ce609aa4354f5b345611a48f17823affc614c23600940ec1c90b9945b7199512" + sha256 arm64_sonoma: "20a1020682e98e6b692a2096aea9d9963c6294f12c810ce0aa9135ca26bf6da1" + sha256 arm64_ventura: "7cb1325a01c1b3516c543d5911f0b10eeb6e68df2abe4b3541ff68242ffc356e" + sha256 arm64_monterey: "d9e9e76159ba4398731428fd7ab2523d9066c325b28efc7b6012b5e9784bfd95" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "56f39057fc8ab04a9f3e2a05ba7ad58a01bd73b66dcd50715ea8c492afaffc7e" + sha256 sonoma: "9b04230870283c0bbb78a8abbc3c805bcb3ba5df1e713c98f57e39ace29ec4b5" + sha256 ventura: "6ab04c4b9cc2400c1e0239654e1ee02487b545e497597eae58d20cdef1a9448e" + sha256 monterey: "552d9e005a5e6362efac8d592fd26bfa2669651776a2ec95ee0a9dd32c6854d3" + sha256 cellar: :any_skip_relocation, big_sur: "e2c2aafbf6a019096510776591956f8114489eff19cb46578dc33f1ea85401d5" + sha256 cellar: :any_skip_relocation, catalina: "26f2121d720fa6ffc20547b0bfc6754930f6b8660b51f634c686279dae7e73ce" + sha256 arm64_linux: "950aa4606e27f585b5845def489fa649687dcbfa927b7ceb79d2186c7c0e5cfc" + sha256 x86_64_linux: "26d038986c5f22a7fd14898391052bd93ac18d34374c2662624efd50ff86a137" + end + + def install + system "./configure", "--prefix=#{prefix}", "--without-kpathsea" + system "make" + system "make", "install" + end + + test do + (testpath/"test.bib").write <<~BIBTEX + @article{Homebrew, + title = {Something}, + author = {Someone}, + journal = {Something}, + volume = {1}, + number = {2}, + pages = {3--4} + } + BIBTEX + + system bin/"bibtool", "test.bib" + end +end diff --git a/Formula/b/bibclean.rb b/Formula/b/bibclean.rb new file mode 100644 index 0000000000000..692877831f871 --- /dev/null +++ b/Formula/b/bibclean.rb @@ -0,0 +1,66 @@ +class Bibclean < Formula + desc "BibTeX bibliography file pretty printer and syntax checker" + homepage "https://www.math.utah.edu/~beebe/software/bibclean/bibclean-03.html#HDR.3" + url "https://ftp.math.utah.edu/pub/bibclean/bibclean-3.07.tar.xz" + sha256 "919336782e9e3c204e60f56485fd1f8dd679eb622fc8fd1f4833595ee10191a6" + license "GPL-2.0-or-later" + + livecheck do + url "https://ftp.math.utah.edu/pub/bibclean/" + regex(/href=.*?bibclean[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "879cc1d92309684de3e1d3aac3f3ceae0751b013e52bee638c67c18fd63dbf92" + sha256 arm64_sequoia: "13c1d6444ba0a4dd09e6840c29240a230d4d5bab8946912b275fc53fca9558bc" + sha256 arm64_sonoma: "9ec0d9aaf5fa2f6f48a1fd7d221a8f76d0af01d2adc36be38ad81a9660750fbe" + sha256 arm64_ventura: "d3fe9381c582b76b086b44099f31247d59ce061cd28332df637410c9249ea801" + sha256 arm64_monterey: "13dab8081ee1d770d8ee59434aff9960da2210f8e20c41f95d23cdfa263b2041" + sha256 arm64_big_sur: "70485db89737d51bba727bac3ba1a8d736b7f9f128c5a3ec9edaeebfc35c6531" + sha256 sonoma: "4f6f06f2b94c6d0d8f113b494cefd204f2ae7f1d12e67ba5752dd5cb4b9da50f" + sha256 ventura: "b186cd7d543fd826e467a97c399e9fbd0cffb1bf65db3e31967aac99ef685093" + sha256 monterey: "0fd480cd271181b46c149447a7e982d70e7f196548407ed20a7557066e5124eb" + sha256 big_sur: "dd7f3ef2672e9f562a7248ae269a12b959b6606dff0aac1fbc0b59869a7d1fd3" + sha256 arm64_linux: "d700d842f1381f0c09f7580584db46a2ccc558fd0fbf95b17fc45ea242061036" + sha256 x86_64_linux: "3e6f4a7531a9e96f3cdb75f01271287c7bb477566ccf80438895c730d35c995d" + end + + def install + ENV.deparallelize + + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}" + + # The following inline patches have been reported upstream. + inreplace "Makefile" do |s| + # Insert `mkdir` statements before `scp` statements because `scp` in macOS + # requires that the full path to the target already exist. + s.gsub!(/[$][{]CP.*BIBCLEAN.*bindir.*BIBCLEAN[}]/, + "mkdir -p ${bindir} && ${CP} ${BIBCLEAN} ${bindir}/${BIBCLEAN}") + s.gsub!(/[$][{]CP.*bibclean.*mandir.*bibclean.*manext[}]/, + "mkdir -p ${mandir} && ${CP} bibclean.man ${mandir}/bibclean.${manext}") + + # Correct `mandir` (man file path) in the Makefile. + s.gsub!(/mandir.*prefix.*man.*man1/, "mandir = ${prefix}/share/man/man1") + end + + system "make", "all" + system "make", "install" + end + + test do + (testpath/"test.bib").write <<~BIBTEX + @article{small, + author = {Test, T.}, + title = {Test}, + journal = {Test}, + year = 2014, + note = {test}, + } + BIBTEX + + system bin/"bibclean", "test.bib" + end +end diff --git a/Formula/b/biber.rb b/Formula/b/biber.rb new file mode 100644 index 0000000000000..bfb9d9cc8cd48 --- /dev/null +++ b/Formula/b/biber.rb @@ -0,0 +1,713 @@ +class Biber < Formula + desc "Backend processor for BibLaTeX" + homepage "https://sourceforge.net/projects/biblatex-biber/" + url "https://github.com/plk/biber/archive/refs/tags/v2.21.tar.gz" + sha256 "2652cf3ae0abff5fb233aa77f18e70014cc2c70b94a8693c099a3cad9bbb4b20" + license "Artistic-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "730beb298d45d7103e87a8401c9c9010fb626c4f40f0aff0ce47a5f858440596" + sha256 cellar: :any, arm64_sequoia: "83b48725d0f628c2fcc4a3581952a18549ee546804518a4582ff3f682993aea4" + sha256 cellar: :any, arm64_sonoma: "bf9b1d0942aa0f858966cf9d4a7bdcd3190e91164b1d991df7d8ba2aaa184db1" + sha256 cellar: :any, arm64_ventura: "b59a9eb6df9fca0893fbf4dccfe73a1ce56604e0e66aff8a62173a55ca70afac" + sha256 cellar: :any, sonoma: "9b62856f82e553ba0584de00cc40865e13340a0685f9e32fd12012c38ca814e6" + sha256 cellar: :any, ventura: "4e884753fa7793a10c3835119435d2dac172c087d21fbe33120b443c7caadb6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2b4dae187cdd50080771a737b3a312cfec34fb23e793331c3e972f4011f1bf8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "448cae30fe730dadae6387bc4fffb1b7e34cfda58458f19275432aad299bcd44" + end + + depends_on "pkgconf" => :build + depends_on "texlive" => :test + depends_on "openssl@3" + depends_on "perl" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "Module::Build" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + end + + resource "ExtUtils::Config" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.010.tar.gz" + sha256 "82e7e4e90cbe380e152f5de6e3e403746982d502dd30197a123652e46610c66d" + end + + resource "ExtUtils::Helpers" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.028.tar.gz" + sha256 "c8574875cce073e7dc5345a7b06d502e52044d68894f9160203fcaab379514fe" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.014.tar.gz" + sha256 "ae65d20cc3c7e14b3cd790915c84510f82dfb37a4c9b88aa74b2e843af417d01" + end + + resource "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.052.tar.gz" + sha256 "bd10452c9f24d4b4fe594126e3ad231bab6cebf16acda40a4e8dc784907eb87f" + end + + resource "YAML::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.76.tar.gz" + sha256 "a8d584394cf069bf8f17cba3dd5099003b097fce316c31fb094f1b1c171c08a3" + end + + resource "Module::ScanDeps" do + url "https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.37.tar.gz" + sha256 "1f5e119cade1466c39c71e5bc35a8d4f4e672635db03d79a5a0dcf08c4e2b5a3" + end + + resource "File::Remove" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/File-Remove-1.61.tar.gz" + sha256 "fd857f585908fc503461b9e48b3c8594e6535766bc14beb17c90ba58d5dc4975" + end + + resource "inc::Module::Install" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Module-Install-1.21.tar.gz" + sha256 "fbf91007f30565f3920e106055fd0d4287981d5e7dad8b35323ce4b733f15a7b" + end + + resource "Business::ISBN::Data" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISBN-Data-20250708.001.tar.gz" + sha256 "a3a6d57e8855674640baec22d5f5e2fe068cc150da3986009d5803e44e126b31" + end + + resource "Business::ISBN" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISBN-3.012.tar.gz" + sha256 "567fecf073ed0ba2889bfe09c9f3c9996baf21bd2d48299b7330832809d501cb" + end + + resource "Tie::Cycle" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Tie-Cycle-1.231.tar.gz" + sha256 "84553d26db09b7eb3f15d809d82242214b5e4e268834a26574cefa83dd25c755" + end + + resource "Business::ISMN" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISMN-1.205.tar.gz" + sha256 "1c48e9b00bc32578b2176e6f79c4a11713d875befa8fbb7f48b7a9c8172fe8bd" + end + + resource "Business::ISSN" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISSN-1.008.tar.gz" + sha256 "b16b3a1b0e53cd45ed3328906d33ad4d59a13b57abf341424553aecf3e443aac" + end + + resource "Class::Accessor" do + url "https://cpan.metacpan.org/authors/id/K/KA/KASEI/Class-Accessor-0.51.tar.gz" + sha256 "bf12a3e5de5a2c6e8a447b364f4f5a050bf74624c56e315022ae7992ff2f411c" + end + + resource "Capture::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.50.tar.gz" + sha256 "ca6e8d7ce7471c2be54e1009f64c367d7ee233a2894cacf52ebe6f53b04e81e5" + end + + resource "Config::AutoConf" do + url "https://cpan.metacpan.org/authors/id/A/AM/AMBS/Config-AutoConf-0.320.tar.gz" + sha256 "bb57a958ef49d3f7162276dae14a7bd5af43fd1d8513231af35d665459454023" + end + + resource "Text::Glob" do + url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Text-Glob-0.11.tar.gz" + sha256 "069ccd49d3f0a2dedb115f4bdc9fbac07a83592840953d1fcdfc39eb9d305287" + end + + resource "Number::Compare" do + url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Number-Compare-0.03.tar.gz" + sha256 "83293737e803b43112830443fb5208ec5208a2e6ea512ed54ef8e4dd2b880827" + end + + resource "File::Find::Rule" do + url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/File-Find-Rule-0.35.tar.gz" + sha256 "2bd556289a6d44ad2ee74803258bb0b0050d246f1e81caab0b263c303acf0c82" + end + + resource "B::COW" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/B-COW-0.007.tar.gz" + sha256 "1290daf227e8b09889a31cf182e29106f1cf9f1a4e9bf7752f9de92ed1158b44" + end + + resource "Clone" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Clone-0.47.tar.gz" + sha256 "4c2c0cb9a483efbf970cb1a75b2ca75b0e18cb84bcb5c09624f86e26b09c211d" + end + + resource "Data::Compare" do + url "https://cpan.metacpan.org/authors/id/D/DC/DCANTRELL/Data-Compare-1.29.tar.gz" + sha256 "53c9db3b93263c88aaa3c4072d819eaded024d7a36b38c0c37737d288d5afa8c" + end + + resource "Data::Dump" do + url "https://cpan.metacpan.org/authors/id/G/GA/GARU/Data-Dump-1.25.tar.gz" + sha256 "a4aa6e0ddbf39d5ad49bddfe0f89d9da864e3bc00f627125d1bc580472f53fbd" + end + + resource "Data::Uniqid" do + url "https://cpan.metacpan.org/authors/id/M/MW/MWX/Data-Uniqid-0.12.tar.gz" + sha256 "b6919ba49b9fe98bfdf3e8accae7b9b7f78dc9e71ebbd0b7fef7a45d99324ccb" + end + + resource "Class::Inspector" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Class-Inspector-1.36.tar.gz" + sha256 "cc295d23a472687c24489d58226ead23b9fdc2588e522f0b5f0747741700694e" + end + + resource "File::ShareDir" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-1.118.tar.gz" + sha256 "3bb2a20ba35df958dc0a4f2306fc05d903d8b8c4de3c8beefce17739d281c958" + end + + resource "File::ShareDir::Install" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-0.14.tar.gz" + sha256 "8f9533b198f2d4a9a5288cbc7d224f7679ad05a7a8573745599789428bc5aea0" + end + + resource "Exporter::Tiny" do + url "https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-1.006002.tar.gz" + sha256 "6f295e2cbffb1dbc15bdb9dadc341671c1e0cd2bdf2d312b17526273c322638d" + end + + resource "List::MoreUtils::XS" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-XS-0.430.tar.gz" + sha256 "e8ce46d57c179eecd8758293e9400ff300aaf20fefe0a9d15b9fe2302b9cb242" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.32.tar.gz" + sha256 "ef2d6cab0bad18e3ab1c4e6125cc5f695c7e459899f512451c8fa3ef83fa7fc0" + end + + resource "List::MoreUtils" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0.430.tar.gz" + sha256 "63b1f7842cd42d9b538d1e34e0330de5ff1559e4c2737342506418276f646527" + end + + resource "Module::Runtime" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Module-Runtime-0.018.tar.gz" + sha256 "0bf77ef68e53721914ff554eada20973596310b4e2cf1401fc958601807de577" + end + + resource "Module::Implementation" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Module-Implementation-0.09.tar.gz" + sha256 "c15f1a12f0c2130c9efff3c2e1afe5887b08ccd033bd132186d1e7d5087fd66d" + end + + resource "Params::Validate" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-Validate-1.31.tar.gz" + sha256 "1bf2518ef2c4869f91590e219f545c8ef12ed53cf313e0eb5704adf7f1b2961e" + end + + resource "Sub::Exporter::Progressive" do + url "https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz" + sha256 "d535b7954d64da1ac1305b1fadf98202769e3599376854b2ced90c382beac056" + end + + resource "Variable::Magic" do + url "https://cpan.metacpan.org/authors/id/V/VP/VPIT/Variable-Magic-0.64.tar.gz" + sha256 "9f7853249c9ea3b4df92fb6b790c03a60680fc029f44c8bf9894dccf019516bd" + end + + resource "B::Hooks::EndOfScope" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/B-Hooks-EndOfScope-0.28.tar.gz" + sha256 "edac77a17fc36620c8324cc194ce1fad2f02e9fcbe72d08ad0b2c47f0c7fd8ef" + end + + resource "Package::Stash::XS" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-XS-0.30.tar.gz" + sha256 "26bad65c1959c57379b3e139dc776fbec5f702906617ef27cdc293ddf1239231" + end + + resource "Package::Stash" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-0.40.tar.gz" + sha256 "5a9722c6d9cb29ee133e5f7b08a5362762a0b5633ff5170642a5b0686e95e066" + end + + resource "namespace::clean" do + url "https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI/namespace-clean-0.27.tar.gz" + sha256 "8a10a83c3e183dc78f9e7b7aa4d09b47c11fb4e7d3a33b9a12912fd22e31af9d" + end + + resource "Sub::Identify" do + url "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Sub-Identify-0.14.tar.gz" + sha256 "068d272086514dd1e842b6a40b1bedbafee63900e5b08890ef6700039defad6f" + end + + resource "namespace::autoclean" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/namespace-autoclean-0.31.tar.gz" + sha256 "d3b32c82e1d2caa9d58b8c8075965240e6cab66ab9350bd6f6bea4ca07e938d6" + end + + resource "IPC::System::Simple" do + url "https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-1.30.tar.gz" + sha256 "22e6f5222b505ee513058fdca35ab7a1eab80539b98e5ca4a923a70a8ae9ba9e" + end + + resource "Eval::Closure" do + url "https://cpan.metacpan.org/authors/id/D/DO/DOY/Eval-Closure-0.14.tar.gz" + sha256 "ea0944f2f5ec98d895bef6d503e6e4a376fea6383a6bc64c7670d46ff2218cad" + end + + resource "Class::Data::Inheritable" do + url "https://cpan.metacpan.org/authors/id/R/RS/RSHERER/Class-Data-Inheritable-0.10.tar.gz" + sha256 "aa1ae68a611357b7bfd9a2f64907cc196ddd6d047cae64ef9d0ad099d98ae54a" + end + + resource "Devel::StackTrace" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-2.05.tar.gz" + sha256 "63cb6196e986a7e578c4d28b3c780e7194835bfc78b68eeb8f00599d4444888c" + end + + resource "Exception::Class" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Exception-Class-1.45.tar.gz" + sha256 "5482a77ef027ca1f9f39e1f48c558356e954936fc8fbbdee6c811c512701b249" + end + + resource "Role::Tiny" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.002004.tar.gz" + sha256 "d7bdee9e138a4f83aa52d0a981625644bda87ff16642dfa845dcb44d9a242b45" + end + + resource "MRO::Compat" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/MRO-Compat-0.15.tar.gz" + sha256 "0d4535f88e43babd84ab604866215fc4d04398bd4db7b21852d4a31b1c15ef61" + end + + resource "Sub::Quote" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Sub-Quote-2.006008.tar.gz" + sha256 "94bebd500af55762e83ea2f2bc594d87af828072370c7110c60c238a800d15b2" + end + + resource "XString" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/XString-0.005.tar.gz" + sha256 "f247f55c19aee6ba4a1ae73c0804259452e02ea85a9be07f8acf700a5138f884" + end + + resource "Specio" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-0.51.tar.gz" + sha256 "505f5de28bee55545b9ec0c45c1d5e4ae568d4f5dbb5e8eabe9d980cb9b68f93" + end + + resource "Params::ValidationCompiler" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-0.31.tar.gz" + sha256 "7b6497173f1b6adb29f5d51d8cf9ec36d2f1219412b4b2410e9d77a901e84a6d" + end + + resource "Path::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.148.tar.gz" + sha256 "818aed754b74f399e42c238bea738e20a52af89a6e3feb58bec9d0130eea4746" + end + + resource "DateTime::Locale" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz" + sha256 "1bc56dc2ff4b3152612e1d474ca65071ae2c00912e3fa4bc6f5a99e5e7a1da68" + end + + resource "Class::Singleton" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHAY/Class-Singleton-1.6.tar.gz" + sha256 "27ba13f0d9512929166bbd8c9ef95d90d630fc80f0c9a1b7458891055e9282a4" + end + + resource "List::SomeUtils::XS" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/List-SomeUtils-XS-0.58.tar.gz" + sha256 "4f9e4d2622481b79cc298e8e29de8a30943aff9f4be7992c0ebb7b22e5b4b297" + end + + resource "List::SomeUtils" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/List-SomeUtils-0.59.tar.gz" + sha256 "fab30372e4c67bf5a46062da38d1d0c8756279feada866eb439fa29571a2dc7b" + end + + resource "List::UtilsBy" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/List-UtilsBy-0.12.tar.gz" + sha256 "fff1281fd469fe982b1a58044becfd970f313bff3a26e1c7b2b3f4c0a5ed71e0" + end + + resource "Scalar::Util" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.69.tar.gz" + sha256 "49108037dc31ba4953aa8be57c1c72f3e922dde1fa328f1eb39a329f1e6314fc" + end + + resource "List::AllUtils" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/List-AllUtils-0.19.tar.gz" + sha256 "30a8146ab21a7787b8c56d5829cf9a7f2b15276d3b3fca07336ac38d3002ffbc" + end + + resource "DateTime::TimeZone" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-2.65.tar.gz" + sha256 "019e99ca8e8c655d70d6813b6df3f351c2bee5983e0f4732f18c5788e1d38e62" + end + + resource "DateTime" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.66.tar.gz" + sha256 "afabd686fb83d3ebf49ee453974f9122f3eec9b25ff8d2ddf4f12de92af1e5e2" + end + + resource "DateTime::Calendar::Julian" do + url "https://cpan.metacpan.org/authors/id/W/WY/WYANT/DateTime-Calendar-Julian-0.107.tar.gz" + sha256 "fcb2b424844bb13bcad46b1c7aa239b5a09bab2556f53bd1f27fad90c260d33d" + end + + resource "DateTime::Format::Strptime" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Strptime-1.79.tar.gz" + sha256 "701e46802c86ed4d88695c1a6dacbbe90b3390beeb794f387e7c792300037579" + end + + resource "DateTime::Format::Builder" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Builder-0.83.tar.gz" + sha256 "61ffb23d85b3ca1786b2da3289e99b57e0625fe0e49db02a6dc0cb62c689e2f2" + end + + resource "Encode::EUCJPASCII" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Encode-EUCJPASCII-0.03.tar.gz" + sha256 "f998d34d55fd9c82cf910786a0448d1edfa60bf68e2c2306724ca67c629de861" + end + + resource "Encode::HanExtra" do + url "https://cpan.metacpan.org/authors/id/A/AU/AUDREYT/Encode-HanExtra-0.23.tar.gz" + sha256 "1fd4b06cada70858003af153f94c863b3b95f2e3d03ba18d0451a81d51db443a" + end + + resource "Encode::JIS2K" do + url "https://cpan.metacpan.org/authors/id/D/DA/DANKOGAI/Encode-JIS2K-0.05.tar.gz" + sha256 "022f1f3d6869742b3718c27bfcca6f7c96aceffac0a2267d140bbf653d7c0ac2" + end + + resource "ExtUtils::LibBuilder" do + url "https://cpan.metacpan.org/authors/id/A/AM/AMBS/ExtUtils-LibBuilder-0.09.tar.gz" + sha256 "dbfac85d015874189a704fa0a2f001d13b5a0c7d89f36c06ff32d569720a6cfb" + end + + resource "File::Slurper" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/File-Slurper-0.014.tar.gz" + sha256 "d5a36487339888c3cd758e648160ee1d70eb4153cacbaff57846dbcefb344b0c" + end + + resource "IO::String" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/IO-String-1.08.tar.gz" + sha256 "2a3f4ad8442d9070780e58ef43722d19d1ee21a803bf7c8206877a10482de5a0" + end + + resource "IPC::Run3" do + url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/IPC-Run3-0.049.tar.gz" + sha256 "9d048ae7b9ae63871bae976ba01e081d887392d904e5d48b04e22d35ed22011a" + end + + resource "Lingua::Translit" do + url "https://cpan.metacpan.org/authors/id/A/AL/ALINKE/Lingua-Translit-0.29.tar.gz" + sha256 "1ad2fabc0079dad708b7d9d55437c9ebb192e610bf960af25945858b92597752" + end + + resource "Log::Log4perl" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETJ/Log-Log4perl-1.57.tar.gz" + sha256 "0f8fcb7638a8f3db4c797df94fdbc56013749142f2f94cbc95b43c9fca096a13" + end + + resource "Mozilla::CA" do + url "https://cpan.metacpan.org/authors/id/L/LW/LWP/Mozilla-CA-20250602.tar.gz" + sha256 "adeac0752440b2da094e8036bab6c857e22172457658868f5ac364f0c7b35481" + end + + resource "Net::SSLeay" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz" + sha256 "9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.32.tar.gz" + sha256 "9632067d34e14e0dae2da94631c4f25a387fcc48d06fa29330e8b3c04c4e913d" + end + + resource "IO::Socket::SSL" do + url "https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.094.tar.gz" + sha256 "b2446889cb5e20545d782c4676da1b235673a81c181689aaae2492589d84bf02" + end + + resource "Encode::Locale" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz" + sha256 "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1" + end + + # looks like 2.33 got recalled, but still downloadable + # latest release on cpan is 0.05 + resource "Time::Date" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz" + sha256 "c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2" + end + + resource "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.06.tar.gz" + sha256 "7b685191c6acc3e773d1fc02c95ee1f9fae94f77783175f5e78c181cc92d2b52" + end + + resource "File::Listing" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.16.tar.gz" + sha256 "189b3a13fc0a1ba412b9d9ec5901e9e5e444cc746b9f0156d4399370d33655c6" + end + + resource "HTML::Tagset" do + url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz" + sha256 "eb89e145a608ed1f8f141a57472ee5f69e67592a432dcd2e8b1dbb445f2b230b" + end + + resource "IO::HTML" do + url "https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-1.004.tar.gz" + sha256 "c87b2df59463bbf2c39596773dfb5c03bde0f7e1051af339f963f58c1cbd8bf5" + end + + resource "LWP::MediaTypes" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz" + sha256 "8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9" + end + + resource "HTTP::Message" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-7.00.tar.gz" + sha256 "5afa95eb6ed1c632e81656201a2738e2c1bc6cbfae2f6d82728e2bb0b519c1dc" + end + + resource "HTML::Parser" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.83.tar.gz" + sha256 "7278ce9791256132b26a71a5719451844704bb9674b58302c3486df43584f8c0" + end + + resource "HTTP::Cookies" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz" + sha256 "8c9a541a4a39f6c0c7e3d0b700b05dfdb830bd490a1b1942a7dedd1b50d9a8c8" + end + + resource "HTTP::Daemon" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-6.16.tar.gz" + sha256 "b38d092725e6fa4e0c4dc2a47e157070491bafa0dbe16c78a358e806aa7e173d" + end + + resource "HTTP::Negotiate" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz" + sha256 "1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016" + end + + resource "Net::HTTP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.23.tar.gz" + sha256 "0d65c09dd6c8589b2ae1118174d3c1a61703b6ecfc14a3442a8c74af65e0c94e" + end + + resource "WWW::RobotRules" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz" + sha256 "46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e" + end + + resource "LWP::Protocol::http" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.79.tar.gz" + sha256 "f2526e9a33ac96715cc47fbf5b4bec1a8c51720330b24e3974c2c5ae07a9c5e7" + end + + resource "LWP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.79.tar.gz" + sha256 "f2526e9a33ac96715cc47fbf5b4bec1a8c51720330b24e3974c2c5ae07a9c5e7" + end + + resource "LWP::Protocol::https" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-Protocol-https-6.14.tar.gz" + sha256 "59cdeabf26950d4f1bef70f096b0d77c5b1c5a7b5ad1b66d71b681ba279cbb2a" + end + + resource "Parse::RecDescent" do + url "https://cpan.metacpan.org/authors/id/J/JT/JTBRAUN/Parse-RecDescent-1.967015.tar.gz" + sha256 "1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37" + end + + resource "PerlIO::utf8_strict" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/PerlIO-utf8_strict-0.010.tar.gz" + sha256 "bcd2848b72df290b5e984fae8b1a6ca96f6d072003cf222389a8c9e8e1c570cd" + end + + resource "Regexp::Common" do + url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2024080801.tar.gz" + sha256 "0677afaec8e1300cefe246b4d809e75cdf55e2cc0f77c486d13073b69ab4fbdd" + end + + resource "Sort::Key" do + url "https://cpan.metacpan.org/authors/id/S/SA/SALVA/Sort-Key-1.33.tar.gz" + sha256 "ed6a4ccfab094c9cd164f564024e98bd21d94f4312ccac4d6246d22b34081acf" + end + + resource "Text::BibTeX" do + url "https://cpan.metacpan.org/authors/id/A/AM/AMBS/Text-BibTeX-0.91.tar.gz" + sha256 "3f0113cf8fe71dc7484636dc8e2a581637ecbcc82d0be29bbd46d0bf3f8cdb37" + end + + resource "Text::CSV" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Text-CSV-2.06.tar.gz" + sha256 "dfcaec925a788b0ba41e51bc6d16e21b0e98b4c7af9b79395090add75f5e506f" + end + + resource "Text::CSV_XS" do + url "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.60.tgz" + sha256 "798f8b45d5d4a24e34faeec6ae157d62356556ea0ba046d8e80f8fbf5c826911" + end + + resource "Text::Roman" do + url "https://cpan.metacpan.org/authors/id/S/SY/SYP/Text-Roman-3.5.tar.gz" + sha256 "cb4a08a3b151802ffb2fce3258a416542ab81db0f739ee474a9583ffb73e046a" + end + + resource "Unicode::GCString" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Unicode-LineBreak-2019.001.tar.gz" + sha256 "486762e4cacddcc77b13989f979a029f84630b8175e7fef17989e157d4b6318a" + end + + resource "MIME::Charset" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/MIME-Charset-1.013.1.tar.gz" + sha256 "1bb7a6e0c0d251f23d6e60bf84c9adefc5b74eec58475bfee4d39107e60870f0" + end + + resource "Unicode::LineBreak" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Unicode-LineBreak-2019.001.tar.gz" + sha256 "486762e4cacddcc77b13989f979a029f84630b8175e7fef17989e157d4b6318a" + end + + resource "FFI::CheckLib" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-0.31.tar.gz" + sha256 "04d885fc377d44896e5ea1c4ec310f979bb04f2f18658a7e7a4d509f7e80bb80" + end + + resource "File::chdir" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-chdir-0.1011.tar.gz" + sha256 "31ebf912df48d5d681def74b9880d78b1f3aca4351a0ed1fe3570b8e03af6c79" + end + + resource "File::Which" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz" + sha256 "3201f1a60e3f16484082e6045c896842261fc345de9fb2e620fd2a2c7af3a93a" + end + + resource "Alien::Build::Plugin::Download::GitLab" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Build-Plugin-Download-GitLab-0.01.tar.gz" + sha256 "c1f089c8ea152a789909d48a83dbfcf2626f773daf30431c8622582b26aba902" + end + + resource "Alien::Build" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Build-2.84.tar.gz" + sha256 "8e891fd3acbac39dd8fdc01376b9abff931e625be41e0910ca30ad59363b4477" + end + + resource "Alien::Libxml2" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Libxml2-0.20.tar.gz" + sha256 "56aae7b339bbeb02f77c5801f57a821be5791b51f43bf7f9062bb3bfa444c328" + end + + resource "XML::NamespaceSupport" do + url "https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.12.tar.gz" + sha256 "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef" + end + + resource "XML::SAX::Base" do + url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-Base-1.09.tar.gz" + sha256 "66cb355ba4ef47c10ca738bd35999723644386ac853abbeb5132841f5e8a2ad0" + end + + resource "XML::SAX" do + url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-1.02.tar.gz" + sha256 "4506c387043aa6a77b455f00f57409f3720aa7e553495ab2535263b4ed1ea12a" + end + + resource "XML::LibXML" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0210.tar.gz" + sha256 "a29bf3f00ab9c9ee04218154e0afc8f799bf23674eb99c1a9ed4de1f4059a48d" + end + + resource "XML::LibXML::Simple" do + url "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/XML-LibXML-Simple-1.01.tar.gz" + sha256 "cd98c8104b70d7672bfa26b4513b78adf2b4b9220e586aa8beb1a508500365a6" + end + + resource "XML::LibXSLT" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-2.003000.tar.gz" + sha256 "7caa5aee72f53be59d8b84eecb6864a07c612a12ea6b27d5c706960edcd54587" + end + + resource "XML::Writer" do + url "https://cpan.metacpan.org/authors/id/J/JO/JOSEPHW/XML-Writer-0.900.tar.gz" + sha256 "73c8f5bd3ecf2b350f4adae6d6676d52e08ecc2d7df4a9f089fa68360d400d1f" + end + + resource "autovivification" do + url "https://cpan.metacpan.org/authors/id/V/VP/VPIT/autovivification-0.18.tar.gz" + sha256 "2d99975685242980d0a9904f639144c059d6ece15899efde4acb742d3253f105" + end + + resource "Clone::Choose" do + url "https://cpan.metacpan.org/authors/id/H/HE/HERMES/Clone-Choose-0.010.tar.gz" + sha256 "5623481f58cee8edb96cd202aad0df5622d427e5f748b253851dfd62e5123632" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + ENV["PERL_MM_USE_DEFAULT"] = "1" + ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix + + resources.each do |r| + r.stage do + # fix libbtparse.so linkage failure on Linux + if r.name == "Text::BibTeX" && OS.linux? + inreplace "inc/MyBuilder.pm", + "-lbtparse", + "-Wl,-rpath,#{libexec}/lib -lbtparse" + end + + if File.exist? "Makefile.PL" + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + else + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + end + + bin_before = Dir[libexec/"bin/*"].to_set + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + bin_after = Dir[libexec/"bin/*"].to_set + (bin_after - bin_before).each do |file| + basename = Pathname(file).basename + (bin/basename).write_env_script file, PERL5LIB: ENV["PERL5LIB"] + end + man1.install libexec/"man/man1/biber.1" + (pkgshare/"test").install "t/tdata/annotations.bcf", "t/tdata/annotations.bib" + end + + test do + assert_match version.to_s, shell_output("#{bin}/biber --version") + + cp (pkgshare/"test").children, testpath + output = shell_output("#{bin}/biber --validate-control --convert-control annotations") + assert_match "Output to annotations.bbl", output + assert_path_exists testpath/"annotations.bcf.html" + assert_path_exists testpath/"annotations.blg" + assert_path_exists testpath/"annotations.bbl" + + (testpath/"test.bib").write <<~BIBTEX + @book{test, + author = {Test}, + title = {Test} + } + BIBTEX + (testpath/"test.latex").write <<~'LATEX' + \documentclass{article} + \usepackage[backend=biber]{biblatex} + \bibliography{test} + \begin{document} + \cite{test} + \printbibliography + \end{document} + LATEX + system Formula["texlive"].bin/"pdflatex", "-interaction=errorstopmode", testpath/"test.latex" + system bin/"biber", "test" + assert_path_exists testpath/"test.bbl" + end +end diff --git a/Formula/b/bibtex-tidy.rb b/Formula/b/bibtex-tidy.rb new file mode 100644 index 0000000000000..ca1b744f98030 --- /dev/null +++ b/Formula/b/bibtex-tidy.rb @@ -0,0 +1,32 @@ +class BibtexTidy < Formula + desc "Cleaner and Formatter for BibTeX files" + homepage "https://github.com/FlamingTempura/bibtex-tidy" + url "https://registry.npmjs.org/bibtex-tidy/-/bibtex-tidy-1.14.0.tgz" + sha256 "0a2c1bb73911a7cee36a30ce1fc86feffe39b2d39acd4c94d02aac6f84a00285" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a64302f3a71667bbf9a464dd63541f9b4e9ef015f09a94302ae4d2b94066ff1a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + test_file = testpath/"test.bib" + test_file.write <<~BIBTEX + @article{example, + author = {Author}, + title = {Title}, + year = {2024} + } + BIBTEX + + output = shell_output("#{bin}/bibtex-tidy #{test_file}") + assert_match "Done. Successfully tidied 1 entries.", output + end +end diff --git a/Formula/b/bibtex2html.rb b/Formula/b/bibtex2html.rb new file mode 100644 index 0000000000000..4c659c15c8c0c --- /dev/null +++ b/Formula/b/bibtex2html.rb @@ -0,0 +1,67 @@ +class Bibtex2html < Formula + desc "BibTeX to HTML converter" + homepage "https://usr.lmf.cnrs.fr/~jcf/bibtex2html/index.en.html" + url "https://usr.lmf.cnrs.fr/~jcf/ftp/bibtex2html/bibtex2html-1.99.tar.gz" + sha256 "d224dadd97f50199a358794e659596a3b3c38c7dc23e86885d7b664789ceff1d" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?bibtex2html[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "261c680993c384f4739fb747b85d0c6b346e5075a0450c588d4cd25093359d30" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec23acda42eaa89ba7dba681bdf117a0abd5b083e57f718ab35c5402d31e1470" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "edf466eae14117ebf2bdc825cd21d26306067b62f15245be0a0ac96b099bffa6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91f93894cd23e18564b8ef53f832e8a754be6e49a00326fbb0a82325056bc8f4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "48733e197e054f9681c722737a11503615cc2f7363de7ba78b6aa04c655c7d03" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dfcc9b81cb80f2a2397f35158ef6dd8ef1e0d5e3738b78985c494c8910f37786" + sha256 cellar: :any_skip_relocation, sonoma: "ce5becfa433595e55c9849f1d4fe5f6f2d8775ca82b9d223627032ad4b97f372" + sha256 cellar: :any_skip_relocation, ventura: "692250d158ca0121d055df2eda755feffabd835831b368af2ce49656f135d4b6" + sha256 cellar: :any_skip_relocation, monterey: "85debacb26917549e04bf951f253fc2d51da9515cc9b1dcc9d54310ad93b4b06" + sha256 cellar: :any_skip_relocation, big_sur: "04836e8704ec993d86ae5534e3a16432edb9ebcd2eebc1549b29c6353e3ff865" + sha256 cellar: :any_skip_relocation, catalina: "e9c4f95aaae6ddb40473a8c4349dbd9455c58e71ea4f580c8aa268292578464d" + sha256 cellar: :any_skip_relocation, arm64_linux: "de9b81d5eaae752f37d96d2015cad99401acf76322e440eb7e56cc46db59d9f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad67db6800da40bac05bfa7e9158ca392d135241e82e300e58cded0533349a11" + end + + head do + url "https://github.com/backtracking/bibtex2html.git", branch: "master" + depends_on "autoconf" => :build + end + + depends_on "ocaml" => :build + + def install + # See: https://trac.macports.org/ticket/26724 + inreplace "Makefile.in" do |s| + s.remove_make_var! "STRLIB" + end + + system "autoconf" if build.head? + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.bib").write <<~BIBTEX + @article{Homebrew, + title = {Something}, + author = {Someone}, + journal = {Something}, + volume = {1}, + number = {2}, + pages = {3--4} + } + BIBTEX + + system bin/"bib2bib", "test.bib", "--remove", "pages", "-ob", "out.bib" + assert(/pages\s*=\s*\{3--4\}/ !~ File.read("out.bib")) + assert_match(/pages\s*=\s*\{3--4\}/, File.read("test.bib")) + end +end diff --git a/Formula/b/bibtexconv.rb b/Formula/b/bibtexconv.rb new file mode 100644 index 0000000000000..3c107dfe6cbe7 --- /dev/null +++ b/Formula/b/bibtexconv.rb @@ -0,0 +1,46 @@ +class Bibtexconv < Formula + desc "BibTeX file converter" + homepage "https://github.com/dreibh/bibtexconv" + url "https://github.com/dreibh/bibtexconv/archive/refs/tags/bibtexconv-2.0.5.tar.gz" + sha256 "781ea738b0665fd9e8bb6f345a2a411036da0f8dde0e554652f55568aceb3f52" + license "GPL-3.0-or-later" + head "https://github.com/dreibh/bibtexconv.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3ffa6e1a42bf433037c48b0d3792741ffc32d8afa443f44a30caf054192990bc" + sha256 cellar: :any, arm64_sequoia: "029c8abb57ff20e462b1907f3fc8400cea94b7f079740c94d258cfbc910a6195" + sha256 cellar: :any, arm64_sonoma: "3ab14661da49ecbb4bea996ebed7abb4453aafd40a9895306f9df84882b4698c" + sha256 cellar: :any, sonoma: "1829fc58a3c86283faa52c6242c132c99da7f6fe5016bfbeb5dacfa6fbfc10bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "880620b75a4a767e0e9b8d3f9097a74d75db9c63bdd53f04ba8d4fc67430efc0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "458a70adf351b0efb63f7090fd73fadb730eef6530188ae116a1c4caa1217667" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "flex" => :build + uses_from_macos "curl" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1500 + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DCRYPTO_LIBRARY=#{Formula["openssl@3"].opt_lib}/#{shared_library("libcrypto")}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + cp "#{opt_share}/doc/bibtexconv/examples/ExampleReferences.bib", testpath + + system bin/"bibtexconv", "#{testpath}/ExampleReferences.bib", + "-export-to-bibtex=UpdatedReferences.bib", + "-check-urls", "-only-check-new-urls", + "-non-interactive" + end +end diff --git a/Formula/b/bibutils.rb b/Formula/b/bibutils.rb new file mode 100644 index 0000000000000..3f9473c2f3c11 --- /dev/null +++ b/Formula/b/bibutils.rb @@ -0,0 +1,51 @@ +class Bibutils < Formula + desc "Bibliography conversion utilities" + homepage "https://sourceforge.net/p/bibutils/home/Bibutils/" + url "https://downloads.sourceforge.net/project/bibutils/bibutils_7.2_src.tgz" + sha256 "6e028aef1e8a6b3e5acef098584a7bb68708f35cfe74011b341c11fea5e4b5c3" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/bibutils[._-]v?(\d+(?:\.\d+)+)[._-]src\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ac24439c4f2cf3ea608eb7b411d8094183796f81a3dee10e3ee550672e9ffae9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9cd55399d769cbc1cab21cfad48bb843a8c8a7c0a966445c6530c88ba8361b7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69d0da0d5cb6ef8cd905c782149b4212aa6e45beb171386672f0aa0fbe5a8f69" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a42ed6f44138819d700f274b2543a42e47e6f398039b23318d57a878a02cd07" + sha256 cellar: :any_skip_relocation, arm64_monterey: "085548415c78f47a9185a323cc633d3005de95d1422e882f18393d7f7cf665cb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fe66061892ae39db121b9393cbce117888d4ba59aaa251269710f88d6b38b0eb" + sha256 cellar: :any_skip_relocation, sonoma: "d7d1848fce479f7adbd94a5134da4d4190ef8ec893674050c1f1ec19b70d5e43" + sha256 cellar: :any_skip_relocation, ventura: "31939f0ba7545b32ed0c2ad75c3efdad4bd08a6d81680a29bac20e3389fe51c6" + sha256 cellar: :any_skip_relocation, monterey: "96d70048b4981355409b6620109d0acca787a9ae6a45a4c381a28bf8010b73f0" + sha256 cellar: :any_skip_relocation, big_sur: "42fd33d5b6c68a038ea4f13be19e3ac741fcffab459a12501da19d939231d94e" + sha256 cellar: :any_skip_relocation, catalina: "6c5c8d31e9991599261ea6ec046d87f011ae2c3a42afe5d4e3fea07e38a69637" + sha256 cellar: :any_skip_relocation, arm64_linux: "df6b2c5da9590ef4ec1d5d4a89ee04e95542d84fe02c9f1e0eaf28af505e52ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95a5448e5df2d441e8e47dfb5115a9e16f8f239acce666093b85ec9ce7038c67" + end + + def install + system "./configure", "--install-dir", bin, + "--install-lib", lib + system "make", "install", "CC=#{ENV.cc}" + end + + test do + (testpath/"test.bib").write <<~BIBTEX + @article{Homebrew, + title = {Something}, + author = {Someone}, + journal = {Something}, + volume = {1}, + number = {2}, + pages = {3--4} + } + BIBTEX + + system bin/"bib2xml", "test.bib" + end +end diff --git a/Formula/b/bic.rb b/Formula/b/bic.rb new file mode 100644 index 0000000000000..c2246deb9a00b --- /dev/null +++ b/Formula/b/bic.rb @@ -0,0 +1,96 @@ +class Bic < Formula + desc "C interpreter and API explorer" + homepage "https://github.com/hexagonal-sun/bic" + license "GPL-2.0-only" + + stable do + url "https://github.com/hexagonal-sun/bic/releases/download/v1.0.0/bic-v1.0.0.tar.gz" + sha256 "553324e39d87df59930d093a264c14176d5e3aaa24cd8bff276531fb94775100" + + on_macos do + on_arm do + # Need to use git archive tarball to apply patches which modify development/CI files + url "https://github.com/hexagonal-sun/bic/archive/refs/tags/v1.0.0.tar.gz" + sha256 "fa5b9e3ffc955220ab825a749f1987a7a0bd268693c1750a1af6cc1802217547" + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "bison" => :build # macOS bison is too outdated, build fails unless gnu bison is used + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + # Backport to cleanly apply next patch + patch do + url "https://github.com/hexagonal-sun/bic/commit/97296b610350b3ae6abfb546dcae43fd32a002b3.patch?full_index=1" + sha256 "32e732260a974cc48d757c0ed0a457467ed8f88025faf5637feca6e37a6e7788" + end + + # Apply all commits from PR https://github.com/hexagonal-sun/bic/pull/49 + patch do + url "https://github.com/hexagonal-sun/bic/compare/631cfb449eec35a2df52eb317f4e9add33c1dea9..7748c44eed2c53ce82b9d45a9f629f68f8cc4f99.patch" + sha256 "bf10454ec8fededce5e9688d7ebabc0f74df3d50c24322efc0f4ee215a1879a9" + end + end + end + + # Backport fix for error: call to undeclared function '__gmp_fprintf' + patch do + on_intel do + url "https://github.com/hexagonal-sun/bic/commit/77f2993cd5b41bfa21fb21636588e459c6aaf45c.patch?full_index=1" + sha256 "c7037e4f3b05be997744ccdea0f51786e5eafaddebc131763d5f45745e90cf00" + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "95d273611ee6c62e77dbcf51696f2d1af33b20e76586a35d2e93975b92257cbe" + sha256 cellar: :any, arm64_sequoia: "4d9fe97eade0c6ce2c65f69f49950a1f523351b31fb8f5c7d759617cf1aa0e9e" + sha256 cellar: :any, arm64_sonoma: "8394ce75075c03309cd99ebf48367e2bbc2f883a5e99be5256432547489802b5" + sha256 cellar: :any, sonoma: "4a93afe6568b694f333695ec33727a9545af2f981c546eb560205099afee3c68" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d43b0b4a77554c2f5d43f0956994c5008368bd40d9246a364708457c8833932" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18e8e74a600a6fd58a87eb2592dbc38c079bf9fd08b2e672c0e9a73ea66c0cce" + end + + head do + url "https://github.com/hexagonal-sun/bic.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "bison" => :build # macOS bison is too outdated, build fails unless gnu bison is used + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + uses_from_macos "flex" => :build + uses_from_macos "libffi" + end + + depends_on "gmp" + + uses_from_macos "libedit" # readline's license is incompatible with GPL-2.0-only + + def install + unless OS.mac? + ENV.append_to_cflags "-I#{Formula["libedit"].opt_libexec}/include" + ENV.append "LDFLAGS", "-L#{Formula["libedit"].opt_libexec}/lib" + end + + system "autoreconf", "--force", "--install", "--verbose" if build.head? || (OS.mac? && Hardware::CPU.arm?) + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"hello.c").write <<~C + #include + int main () { + puts("Hello Homebrew!"); + } + C + assert_equal "Hello Homebrew!", shell_output("#{bin}/bic -s hello.c").strip + end +end diff --git a/Formula/b/bigloo.rb b/Formula/b/bigloo.rb new file mode 100644 index 0000000000000..27f84f06239d7 --- /dev/null +++ b/Formula/b/bigloo.rb @@ -0,0 +1,87 @@ +class Bigloo < Formula + desc "Scheme implementation with object system, C, and Java interfaces" + homepage "https://www-sop.inria.fr/indes/fp/Bigloo/" + url "https://www-sop.inria.fr/indes/fp/Bigloo/download/bigloo-4.6a.tar.gz" + sha256 "6772f6a17b7f002171d433f1270344a6bbbefb17e2718b0456656aa8c0b0d9c1" + license "GPL-2.0-or-later" + head "https://github.com/manuel-serrano/bigloo.git", branch: "master" + + livecheck do + url "https://www-sop.inria.fr/indes/fp/Bigloo/download.html" + regex(/bigloo-latest\.t.+?\(([^)]+?)\)/i) + end + + bottle do + rebuild 2 + sha256 arm64_tahoe: "58fd054dced50f890349a99de351aba43c55166c09535636547b5ba901266281" + sha256 arm64_sequoia: "94b9559cbc116e2f6c197b2b656f257dd67a8b5a989c1795cd2bbe81056bfcb7" + sha256 arm64_sonoma: "f0c10fd7976cb0eac42f37408ac7672199a5ef17306720b33bba8f4c5ab0ec6f" + sha256 sonoma: "1ce2fd31a7a7d39ca08dd51e888ab21d6aa0b82e747e97eaa9349cca4970888a" + sha256 arm64_linux: "dec793d2615180d1e9174f4c89083d8ab77195c6cbb5589a2ee2952dde557687" + sha256 x86_64_linux: "a56a68b65951a1ce99b2f4615929f6ef4c8f9b5dbb80348cbcfc94ba17da5e4c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "bdw-gc" + depends_on "gmp" + depends_on "libunistring" + depends_on "libuv" + depends_on "openjdk" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + + on_linux do + depends_on "alsa-lib" + end + + def install + # Force bigloo not to use vendored libraries + inreplace "configure", /(^\s+custom\w+)=yes$/, "\\1=no" + + # configure doesn't respect --mandir or MANDIR + inreplace "configure", "$prefix/man/man1", "$prefix/share/man/man1" + + # configure doesn't respect --infodir or INFODIR + inreplace "configure", "$prefix/info", "$prefix/share/info" + + args = %w[ + --customgc=no + --customgmp=no + --customlibuv=no + --customunistring=no + --native=yes + --disable-mpg123 + --disable-flac + --jvm=yes + ] + + if OS.mac? + args << "--os-macosx" + args << "--disable-alsa" + else + args << "--disable-libbacktrace" + end + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + # Install the other manpages too + manpages = %w[bgldepend bglmake bglpp bgltags bglafile bgljfile bglmco bglprof] + manpages.each { |m| man1.install "manuals/#{m}.man" => "#{m}.1" } + end + + test do + program = <<~SCHEME + (display "Hello World!") + (newline) + (exit) + SCHEME + assert_match "Hello World!\n", pipe_output("#{bin}/bigloo -i -", program, 0) + end +end diff --git a/Formula/b/bigquery-emulator.rb b/Formula/b/bigquery-emulator.rb new file mode 100644 index 0000000000000..f0fd97c8d4c51 --- /dev/null +++ b/Formula/b/bigquery-emulator.rb @@ -0,0 +1,82 @@ +class BigqueryEmulator < Formula + desc "Emulate a GCP BigQuery server on your local machine" + homepage "https://github.com/goccy/bigquery-emulator" + url "https://github.com/goccy/bigquery-emulator/archive/refs/tags/v0.6.6.tar.gz" + sha256 "a4055b66ad28f972b43b3fe0c7d54a08c57bf91bb4163a39204e152055d54440" + license "MIT" + head "https://github.com/goccy/bigquery-emulator.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cfc703c5f709c8b31f299f4c9781b46f2099e3908984a156ad6ff7b832ad08c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09a97a4d0d2da38a73e8b6bea3fd5957a9e5c2fcf5902845082253969f0b77a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84e54fbfc85104d2effc52b84374c4e3c323eb9659ceb3f1aa7c8a7ae8c1283c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "099f43b95cae81557172f860bd1f0771193ade8a8e188a578991e6d8759137b5" + sha256 cellar: :any_skip_relocation, sonoma: "6d392929f5f202cb8cf49912926a283b424941c442071106c0a4bc57d5b7a953" + sha256 cellar: :any_skip_relocation, ventura: "4fea8c128986fd389f1441e02bd42aca1a31df8de1a3ce446c63007ce1bb7479" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1bb8c6a9605dd3ee04d8e944963aedc8cec753ace951e0bb9d243d4c7271aa9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b53e2bd32bf44be1c5ad737c1f4058d855faf4b82530aeebdecf5e9e690bdab2" + end + + depends_on "go" => :build + + uses_from_macos "llvm" => :build + + fails_with :gcc + + def install + ENV["CGO_ENABLED"] = "1" + + # Workaround to avoid patchelf corruption when cgo is required (for go-zetasql) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + ldflags = "-s -w -X main.version=#{version} -X main.revision=#{tap.user}" + system "go", "build", *std_go_args(ldflags:), "./cmd/bigquery-emulator" + end + + test do + # https://github.com/goccy/bigquery-emulator/blob/main/_examples/python/data.yaml + (testpath/"data.yaml").write <<~YAML + projects: + - id: test + datasets: + - id: dataset1 + tables: + - id: table_a + columns: + - name: id + type: INTEGER + - name: name + type: STRING + - name: createdAt + type: TIMESTAMP + data: + - id: 1 + name: alice + createdAt: "2022-10-21T00:00:00" + - id: 2 + name: bob + createdAt: "2022-10-21T00:00:00" + YAML + + port = free_port + grpc_port = free_port + pid = spawn bin/"bigquery-emulator", "--project=test", + "--data-from-yaml=./data.yaml", + "--port=#{port}", + "--grpc-port=#{grpc_port}" + sleep 5 + + query = '{"query": "SELECT name FROM dataset1.table_a WHERE id = 2"}' + query_url = "http://localhost:#{port}/bigquery/v2/projects/test/queries" + response = JSON.parse(shell_output("curl -s -X POST -d '#{query}' #{query_url}")) + assert_equal [{ "f" => [{ "v" => "bob" }] }], response["rows"] + + assert_match "version: #{version} (Homebrew)", shell_output("#{bin}/bigquery-emulator --version") + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/b/bilix.rb b/Formula/b/bilix.rb new file mode 100644 index 0000000000000..87a4aa8437b2c --- /dev/null +++ b/Formula/b/bilix.rb @@ -0,0 +1,203 @@ +class Bilix < Formula + include Language::Python::Virtualenv + + desc "Lightning-fast asynchronous download tool for bilibili and more" + homepage "https://github.com/HFrost0/bilix" + url "https://files.pythonhosted.org/packages/5c/12/0f885cee77471123a3c82da85bd1934af00aed213910987bbe5b2296997d/bilix-0.18.9.tar.gz" + sha256 "8ab1be9bcc661369cbeba95439c09716778b6b42b2505a3eaddb45175688e247" + license "Apache-2.0" + revision 4 + head "https://github.com/HFrost0/bilix.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e0dcbe69c03dc1756a42ff79896d4221a6c4cb6fb64c672483a8648261fb5d9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4dc5dcbac0119c0e47edb344f16acf65942749e9c89405a021dd75f63c86a08" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a848a88d351cb41ead7f01475668c2d0dc5575916c89f14e2650d146f081131" + sha256 cellar: :any_skip_relocation, sonoma: "a5655f75f3f04c84000c0bfe3f88b152004fae24a26712d29e9c8b906cd821fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "725965d870f178d9e9f900e1be1f25656ddff0217b0c8f8f94cbfb01b824a71d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8433c9dd9f9b0f8f524a0f1e6e93f4db234d95830f58e5265e95fa1c2f28b98f" + end + + depends_on "cmake" => :build # for danmakuc + depends_on "certifi" => :no_linkage + depends_on "lz4" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz" + sha256 "a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "browser-cookie3" do + url "https://files.pythonhosted.org/packages/e0/e1/652adea0ce25948e613ef78294c8ceaf4b32844aae00680d3a1712dde444/browser_cookie3-0.20.1.tar.gz" + sha256 "6d8d0744bf42a5327c951bdbcf77741db3455b8b4e840e18bab266d598368a12" + end + + resource "bs4" do + url "https://files.pythonhosted.org/packages/c9/aa/4acaf814ff901145da37332e05bb510452ebed97bc9602695059dd46ef39/bs4-0.0.2.tar.gz" + sha256 "a48685c58f50fe127722417bae83fe6badf500d54b55f7e39ffe43b798653925" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "construct" do + url "https://files.pythonhosted.org/packages/b6/2c/66bab4fef920ef8caa3e180ea601475b2cbbe196255b18f1c58215940607/construct-2.8.8.tar.gz" + sha256 "1b84b8147f6fd15bcf64b737c3e8ac5100811ad80c830cb4b2545140511c4157" + end + + resource "danmakuc" do + url "https://files.pythonhosted.org/packages/f5/81/171b7d5706546d7bd9dd431589e384f65d3007bb7bcb1475e3c677d7e243/danmakuC-0.3.6.tar.gz" + sha256 "db6b7dcf3dba1595c08a37a6f27f925fb40b9b8c110ff013872ac575c9c30132" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "h2" do + url "https://files.pythonhosted.org/packages/1d/17/afa56379f94ad0fe8defd37d6eb3f89a25404ffc71d4d848893d270325fc/h2-4.3.0.tar.gz" + sha256 "6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1" + end + + resource "hpack" do + url "https://files.pythonhosted.org/packages/2c/48/71de9ed269fdae9c8057e5a4c0aa7402e8bb16f2c6e90b3aa53327b113f8/hpack-4.1.0.tar.gz" + sha256 "ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "hyperframe" do + url "https://files.pythonhosted.org/packages/02/e7/94f8232d4a74cc99514c13a9f995811485a6903d48e5d952771ef6322e30/hyperframe-6.1.0.tar.gz" + sha256 "f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "json5" do + url "https://files.pythonhosted.org/packages/12/ae/929aee9619e9eba9015207a9d2c1c54db18311da7eb4dcf6d41ad6f0eb67/json5-0.12.1.tar.gz" + sha256 "b2743e77b3242f8d03c143dd975a6ec7c52e2f2afe76ed934e53503dd4ad4990" + end + + resource "lz4" do + url "https://files.pythonhosted.org/packages/c6/5a/945f5086326d569f14c84ac6f7fcc3229f0b9b1e8cc536b951fd53dfb9e1/lz4-4.4.4.tar.gz" + sha256 "070fd0627ec4393011251a094e08ed9fdcc78cb4e7ab28f507638eee4e39abda" + end + + resource "m3u8" do + url "https://files.pythonhosted.org/packages/9b/a5/73697aaa99bb32b610adc1f11d46a0c0c370351292e9b271755084a145e6/m3u8-6.0.0.tar.gz" + sha256 "7ade990a1667d7a653bcaf9413b16c3eb5cd618982ff46aaff57fe6d9fa9c0fd" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pymp4" do + url "https://files.pythonhosted.org/packages/a5/46/dfb3f5363fc71adaf419147fdcb93341029ca638634a5cc6f7e7446416b2/pymp4-1.4.0.tar.gz" + sha256 "bc9e77732a8a143d34c38aa862a54180716246938e4bf3e07585d19252b77bb5" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + # update bilibili play_info api, upstream pr ref, https://github.com/HFrost0/bilix/pull/244 + patch do + url "https://github.com/HFrost0/bilix/commit/72c259d88b2fffb6cd530fce01b8c3d35fb79335.patch?full_index=1" + sha256 "6f241455c6f1940626ed660d97abbcf3eecd3931cca3b6db6acd1f961649b6cb" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"bilix", shell_parameter_format: :click) + end + + test do + # By pass linux CI test due to the networking issue for `bilix info` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"bilix", "info", "https://www.bilibili.com/video/av20203945/" + end +end diff --git a/Formula/b/binaryen.rb b/Formula/b/binaryen.rb new file mode 100644 index 0000000000000..dde7188d0203e --- /dev/null +++ b/Formula/b/binaryen.rb @@ -0,0 +1,39 @@ +class Binaryen < Formula + desc "Compiler infrastructure and toolchain library for WebAssembly" + homepage "https://webassembly.org/" + url "https://github.com/WebAssembly/binaryen/archive/refs/tags/version_124.tar.gz" + sha256 "b8d06af81a8c2bb27c34d1f9e3cf7c621f93fc901f896809e0490f3586a63ca4" + license "Apache-2.0" + head "https://github.com/WebAssembly/binaryen.git", branch: "main" + + livecheck do + url :stable + regex(/^version[._-](\d+(?:\.\d+)*)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7f165275861ffd59b001dbb7fd3768e65604c241772e5efb407fd808c9173dd2" + sha256 cellar: :any, arm64_sequoia: "213bd9cb91194876d9848e8c9531610f4151ac9fc3bee3c6970a44dc1d0e4324" + sha256 cellar: :any, arm64_sonoma: "45b3c3fe30b13353c5e631a8da0398944980aab157556b0ab250f0161c917439" + sha256 cellar: :any, arm64_ventura: "5d1b51d3306078a2da4f07b3d9a74298f9acc8acdd161dee5ac150c8afe6496b" + sha256 cellar: :any, sonoma: "61f4f1510e017592ea3dcbb794234bec3072c4626519239abe8184849facdf95" + sha256 cellar: :any, ventura: "313f17811f062fc12ab94d4f01ab7f21fabe8b2838166a5190fd7bbc42626428" + sha256 cellar: :any_skip_relocation, arm64_linux: "58ac1a9da19b782eb28ad60cc039d16d8ea019466d1b95d3f3ac1ba1ac849379" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e948c1695635ca96ec9f31c00446594a6150cf8c0274c0192e08233de72269ce" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_TESTS=false", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "test/" + end + + test do + system bin/"wasm-opt", "-O", pkgshare/"test/passes/O1_print-stack-ir.wast", "-o", "1.wast" + assert_match "stacky-help", (testpath/"1.wast").read + end +end diff --git a/Formula/b/bind.rb b/Formula/b/bind.rb new file mode 100644 index 0000000000000..f4f6cd39fe79d --- /dev/null +++ b/Formula/b/bind.rb @@ -0,0 +1,110 @@ +class Bind < Formula + desc "Implementation of the DNS protocols" + homepage "https://www.isc.org/bind/" + + # BIND releases with even minor version numbers (9.14.x, 9.16.x, etc) are + # stable. Odd-numbered minor versions are for testing, and can be unstable + # or buggy. They are not suitable for general deployment. We have to use + # "version_scheme" because someone upgraded to 9.15.0, and required a + # downgrade. + + url "https://downloads.isc.org/isc/bind9/9.20.15/bind-9.20.15.tar.xz" + sha256 "d62b38fae48ba83fca6181112d0c71018d8b0f2ce285dc79dc6a0367722ccabb" + license "MPL-2.0" + version_scheme 1 + head "https://gitlab.isc.org/isc-projects/bind9.git", branch: "main" + + # BIND indicates stable releases with an even-numbered minor (e.g., x.2.x) + # and the regex below only matches these versions. + livecheck do + url "https://www.isc.org/download/" + regex(/href=.*?bind[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "e270ff3e68a808a35278cba49eacb883eec4b97f93a1e2175ba9a37a8edb0f42" + sha256 arm64_sequoia: "45b19505e24cec51ea56e78405bb5a3d155eaebe4ef7c91816855cc03e1eec9f" + sha256 arm64_sonoma: "8eddcd1a1803d2827a52c6e8e9330bfbc36be2dfcb57d8588bcf19c24064bbff" + sha256 sonoma: "e66bce6974413ec5859fc6d3af35e9835460a86ba9d261f9370fcc4d58b47522" + sha256 arm64_linux: "c75093d72f5d5b01a45b3f6b116fdb997183f4f6fbed26778f51f01462804f15" + sha256 x86_64_linux: "96e1567e4b0b8bbf0392dcd61576f9290a76914f8e5b5a2fc23b86f22bd903dc" + end + + depends_on "pkgconf" => :build + + depends_on "jemalloc" + depends_on "json-c" + depends_on "libidn2" + depends_on "libnghttp2" + depends_on "libuv" + depends_on "openssl@3" + depends_on "readline" + depends_on "userspace-rcu" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_linux do + depends_on "libcap" + end + + def install + # Apply macOS 15+ libxml2 deprecation to all macOS versions. + # This allows our macOS 14-built Intel bottle to work on macOS 15+ + # and also cover the case where a user on macOS 14- updates to macOS 15+. + ENV.append_to_cflags "-DLIBXML_HAS_DEPRECATED_MEMORY_ALLOCATION_FUNCTIONS" if OS.mac? + + args = [ + "--prefix=#{prefix}", + "--sysconfdir=#{pkgetc}", + "--localstatedir=#{var}", + "--with-json-c", + "--with-libidn2=#{Formula["libidn2"].opt_prefix}", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--without-lmdb", + ] + system "./configure", *args + + system "make" + system "make", "install" + + (buildpath/"named.conf").write named_conf + system "#{sbin}/rndc-confgen", "-a", "-c", "#{buildpath}/rndc.key" + pkgetc.install "named.conf", "rndc.key" + end + + def post_install + (var/"log/named").mkpath + (var/"named").mkpath + end + + def named_conf + <<~EOS + logging { + category default { + _default_log; + }; + channel _default_log { + file "#{var}/log/named/named.log" versions 10 size 1m; + severity info; + print-time yes; + }; + }; + + options { + directory "#{var}/named"; + }; + EOS + end + + service do + run [opt_sbin/"named", "-f", "-L", var/"log/named/named.log"] + require_root true + end + + test do + system bin/"dig", "-v" + system bin/"dig", "brew.sh" + system bin/"dig", "ü.cl" + end +end diff --git a/Formula/b/bindfs.rb b/Formula/b/bindfs.rb new file mode 100644 index 0000000000000..6e92fb519e25f --- /dev/null +++ b/Formula/b/bindfs.rb @@ -0,0 +1,39 @@ +class Bindfs < Formula + desc "FUSE file system for mounting to another location" + homepage "https://bindfs.org/" + url "https://bindfs.org/downloads/bindfs-1.18.3.tar.gz" + sha256 "178a723d7039bae3ab1cef2fc93e5e8693c4184f52519c0e9a1deee93b838df1" + license "GPL-2.0-or-later" + + livecheck do + url "https://bindfs.org/downloads/" + regex(/href=.*?bindfs[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "c7175be7021371942980c3bcdf3358f755d3822c4310a9d0f03424914211ef62" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58d2a9498683ea93a9d06a9afa360a8fa580801fbda1b2dfb6eebd59ff211fd2" + end + + head do + url "https://github.com/mpartel/bindfs.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, *std_configure_args + system "make", "install" + end + + test do + system bin/"bindfs", "-V" + end +end diff --git a/Formula/b/bindgen.rb b/Formula/b/bindgen.rb new file mode 100644 index 0000000000000..27801f7ab072a --- /dev/null +++ b/Formula/b/bindgen.rb @@ -0,0 +1,45 @@ +class Bindgen < Formula + desc "Automatically generates Rust FFI bindings to C (and some C++) libraries" + homepage "https://rust-lang.github.io/rust-bindgen/" + url "https://github.com/rust-lang/rust-bindgen/archive/refs/tags/v0.72.1.tar.gz" + sha256 "4ffb17061b2d71f19c5062d2e17e64107248f484f9775c0b7d30a16a8238dfd1" + license "BSD-3-Clause" + head "https://github.com/rust-lang/rust-bindgen.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e365fd73111ab1f7631e50ef51f4123d07e83c1f841ca7eff0422f884808a40" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e96f4bff4bf8646a132175f87710ffe282dadf9814a67cb0e2ab5cbfb47aaf97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68791b14f20aa5fbf605d2c762f4937c6e2389ab0659cf034699dfa5f41a2969" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b944567744c969e7238489247ecaa33f89fe66db3a1b02e58280a083688f8d83" + sha256 cellar: :any_skip_relocation, sonoma: "6c7bb66b409bc5c4e9eb5f72cca1731fff75f37f7d1384ca8898d8db8cae48eb" + sha256 cellar: :any_skip_relocation, ventura: "792a06e919fcf82e56401303df647e59151368a8df2b633f6a042eef48f9d62a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b6fe44a6d1ee205e403de6abdfb06a0956ff3747a4201100e5c031beaa86599" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a12ce571a9dcdf6ba8212d717096305d37d845c80551c3d26a0679efc76e2824" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" # for libclang + + def install + system "cargo", "install", *std_cargo_args(path: "bindgen-cli") + + generate_completions_from_executable(bin/"bindgen", "--generate-shell-completions") + end + + test do + (testpath/"cool.h").write <<~C + typedef struct CoolStruct { + int x; + int y; + } CoolStruct; + + void cool_function(int i, char c, CoolStruct* cs); + C + + output = shell_output("#{bin}/bindgen cool.h") + assert_match "pub struct CoolStruct", output + + assert_match version.to_s, shell_output("#{bin}/bindgen --version") + end +end diff --git a/Formula/b/bingrep.rb b/Formula/b/bingrep.rb new file mode 100644 index 0000000000000..eb7d59f6689e4 --- /dev/null +++ b/Formula/b/bingrep.rb @@ -0,0 +1,41 @@ +class Bingrep < Formula + desc "Greps through binaries from various OSs and architectures" + homepage "https://github.com/m4b/bingrep" + url "https://github.com/m4b/bingrep/archive/refs/tags/v0.11.0.tar.gz" + sha256 "3012aef73b3ef5e8b100824af0db2131f81771338fec5f9fe47dc71bf3782506" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "25ff59636e9bef5700315f86f48a67a2efbe09e339903bf4995e3129b542c4fb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bfce04e9d779487f7d4469abcd3be17916615d499f84a06e0580911cbac1ee0b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6ee2f9dd4398cc8a6897481e0f799cbe79227cedc35623c5d0a8c8e6d0895ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "349e4cd6b80fc83621693d1e68dd4e5c6ab29aa5259eb76edf8926e22f29e8e5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "20e1eb2ccd61e211cd3c6bba229b4ccc15ec3594337e20be2f68a2b141fd22c1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "489ea944bbbd2aeb68925d26e2effee5520155564cd031a6294860445b4510c0" + sha256 cellar: :any_skip_relocation, sonoma: "4bd36f17cf4c9c41ec1bb88df4adbae47f6b537c20517becf4a8026950fa842e" + sha256 cellar: :any_skip_relocation, ventura: "8b2e9baa7b521954bea1cecc6c5259808fdff948fa776902a328f18945414b22" + sha256 cellar: :any_skip_relocation, monterey: "d7c1fa10458fe1fedd754d8b5aa4bc1160abd305cf70078bc1d7e1c9caf385a8" + sha256 cellar: :any_skip_relocation, big_sur: "cdc9b107c8cecaec93dc476ff09a6649c4bf4a9604ee98ce9748d53c71fd9f7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "846cf810013ef2647155242db628236d9dc7a4647152bbc84aa941c41916d01f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cc509264acdf417f6ae40d102132fddd7ec95c4130c05bfb5d7c4c468f5b3dd" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.c").write <<~C + int homebrew_test() { + return 0; + } + int main() { + return homebrew_test(); + } + C + system ENV.cc, testpath/"test.c" + assert_match "homebrew_test", shell_output("#{bin}/bingrep a.out") + end +end diff --git a/Formula/b/binkd.rb b/Formula/b/binkd.rb new file mode 100644 index 0000000000000..ebdd0cabad58a --- /dev/null +++ b/Formula/b/binkd.rb @@ -0,0 +1,47 @@ +class Binkd < Formula + desc "TCP/IP FTN Mailer" + homepage "https://github.com/pgul/binkd" + url "https://github.com/pgul/binkd/archive/refs/tags/binkd-1_0_4.tar.gz" + sha256 "67cc5c254198005e6d7c5c98b1d161ad146615874df4839daa86735aa5e3fa1d" + license "GPL-2.0-or-later" + head "https://github.com/pgul/binkd.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:binkd[._-])?v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags| + tags.filter_map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f08a49cb7363be65bcc286cc198ebb24ffc83cf2b0340600ca5fff808cbc777" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "363282ef02c77db08c0963460807439902cc81ec6bf480f1fb2714fd2f0211f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55fbf747f2e698ebf87a90b001d4bf62f9486012f860b561835a3c45730b4f97" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18ee6019972abd32129415ce9545fbb80abf690bfe4aaa6dcd599d3ab9ab17d9" + sha256 cellar: :any_skip_relocation, sonoma: "7df6b2f5bb3437e91f6c293b63cf7dc28de37b458654d9b925cb0354dd296394" + sha256 cellar: :any_skip_relocation, ventura: "1d0c2d8e07da1e49cafed0aa027ea488105b3b8088b69e76d3027d3fdfe70c40" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f18098e2db860abd425689e3f7f45260039ec1b5b4c161f01182fc115fec8b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d99d97e67e7079053da1c408b6064abff7ff447a116e2044e4a39d82ed654bc2" + end + + uses_from_macos "zlib" + + def install + cp Dir["mkfls/unix/*"].select { |f| File.file? f }, "." + inreplace "binkd.conf", "/var/", "#{var}/" if build.stable? + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system "#{sbin}/binkd", "-v" + end +end diff --git a/Formula/b/binocle.rb b/Formula/b/binocle.rb new file mode 100644 index 0000000000000..b7fc98e408531 --- /dev/null +++ b/Formula/b/binocle.rb @@ -0,0 +1,47 @@ +class Binocle < Formula + desc "Graphical tool to visualize binary data" + homepage "https://github.com/sharkdp/binocle" + url "https://github.com/sharkdp/binocle/archive/refs/tags/v0.3.2.tar.gz" + sha256 "b58d450f343539242b9f146606f5e70d0d183e12ce03e1b003c5197e6e41727b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/binocle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0424cbc18de1317d37bd6716b7923f617c800b2bf4afaca3284cdd37dab4e795" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed724155e7422f1dbdb1336e55beb128771c94d7508824dd3218a2aa4f833b05" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "20c6213d9ae44a09f4221194c23db04c0b549ae1c5ec688fc1f7b951ddbeab53" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6890ababd81453d26246f912140a9018174c7819a9c2b597a9663c9cdfb6d255" + sha256 cellar: :any_skip_relocation, sonoma: "d55ffda75e2ed88f3230d2769438cc207fdb099a96abb635d9748415fa275396" + sha256 cellar: :any_skip_relocation, ventura: "a9ee501f778c26b5f3f27c9aefbc63d2d82e019dd3d81f0339f63060a9947d4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a19bfb4cba506bee5c78b864bb52473611d58d1356e51371573c2235180c839" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b316af1ebdf59111913cbb1bbe8836075316c7ebff977ebe12467815dfcf1ac" + end + + depends_on "rust" => :build + + on_linux do + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxrandr" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/binocle --version") + + # Fails in Linux CI with + # "Failed to initialize any backend! Wayland status: XdgRuntimeDirNotSet X11 status: XOpenDisplayFailed" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + expected = if Hardware::CPU.arm? + "Error: No such file or directory" + else + "Error: No suitable `wgpu::Adapter` found." + end + + assert_match expected, shell_output("#{bin}/binocle test.txt 2>&1", 1) + end +end diff --git a/Formula/b/binsider.rb b/Formula/b/binsider.rb new file mode 100644 index 0000000000000..a592e9e61dfcf --- /dev/null +++ b/Formula/b/binsider.rb @@ -0,0 +1,40 @@ +class Binsider < Formula + desc "Analyzes ELF binaries" + homepage "https://binsider.dev/" + url "https://github.com/orhun/binsider/archive/refs/tags/v0.2.1.tar.gz" + sha256 "a3bc10379677b19656436924f478798f205b371bc703feab938c1b2512f39500" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/orhun/binsider.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9977fd80586260eecc064cad2aff56041d5d62dda1c06e16c6ac65f7f8734f9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c11ab382fd297958dded8d9685f67fe756a24d97f528330dfae16a42d7a73dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60f9f1ceef1fdc6d373fec4c8b36997e5914f1ff8e0679293fcef4cc5a2be2c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "761e347994471b3ce157f8b2ab46a4e3e143b529d6578b4585e1c3b593adf1f2" + sha256 cellar: :any_skip_relocation, sonoma: "b2902341e9a85d24a8a33a19f1da3d9f2512e20400b3b68eabba48fe2cce994e" + sha256 cellar: :any_skip_relocation, ventura: "a0be7f487c12b713227182a95cfd71fa74c8861c845f51af597402fdb2c85aad" + sha256 cellar: :any_skip_relocation, arm64_linux: "510fed2e6a9eeac3beaeb9ddd8e8446b5fe7188993bbd907746c864be9c33721" + sha256 cellar: :any_skip_relocation, x86_64_linux: "805569e73c84fb8455ce5125dcc9e188404c48ca88538917c82b5e4994c1258d" + end + + depends_on "rust" => :build + + def install + # We pass this arg to disable the `dynamic-analysis` feature on macOS. + # This feature is not supported on macOS and fails to compile. + args = [] + args << "--no-default-features" if OS.mac? + + system "cargo", "install", *args, *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/binsider -V") + + # IO error: `No such device or address (os error 6)` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "Invalid Magic Bytes", + shell_output("#{bin}/binsider 2>&1", 1) + end +end diff --git a/Formula/b/binutils.rb b/Formula/b/binutils.rb new file mode 100644 index 0000000000000..269fbb93d4dc7 --- /dev/null +++ b/Formula/b/binutils.rb @@ -0,0 +1,75 @@ +class Binutils < Formula + desc "GNU binary tools for native development" + homepage "https://www.gnu.org/software/binutils/binutils.html" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later", "LGPL-2.0-or-later", "LGPL-3.0-only"] + + bottle do + rebuild 2 + sha256 arm64_tahoe: "fd20ebf003bed2def99e4d1394999ed18bb18cffb2ebc3780d28d20001ec70b1" + sha256 arm64_sequoia: "3fb936ff0d64e4bc3530ab07f83417f5dea8c098549ec506f19f1c6ae4962cb6" + sha256 arm64_sonoma: "1a6356d10575b843eafe84253ba51c147334239b37e02d99288d998466912471" + sha256 sonoma: "fb94a53dfab0618b68dcf429dfcd54d5854f74bff87225dc2f6465d9bb278f07" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7d645ca74225ac60a602aff4c9d9e6f91e1aedb5023f46ed69978a42b5397c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41d647102f58f2500a2d0194da255742ef8e7da26b9886fbd99a6fd080c3b76e" + end + + keg_only "it shadows the host toolchain" + + depends_on "pkgconf" => :build + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "zlib" + + skip_clean "etc/ld.so.conf" + + link_overwrite "bin/dwp" + + def install + # Workaround https://sourceware.org/bugzilla/show_bug.cgi?id=28909 + touch "gas/doc/.dirstamp", mtime: Time.utc(2022, 1, 1) + make_args = OS.mac? ? [] : ["MAKEINFO=true"] # for gprofng + + args = [ + "--disable-debug", + "--disable-dependency-tracking", + "--enable-deterministic-archives", + "--prefix=#{prefix}", + "--infodir=#{info}", + "--mandir=#{man}", + "--disable-werror", + "--enable-interwork", + "--enable-multilib", + "--enable-64-bit-bfd", + "--enable-plugins", + "--enable-targets=all", + "--with-system-zlib", + "--with-zstd", + "--disable-nls", + ] + system "./configure", *args + system "make", *make_args + system "make", "install", *make_args + + if OS.mac? + Dir["#{bin}/*"].each do |f| + bin.install_symlink f => "g" + File.basename(f) + end + else + # Reduce the size of the bottle. + bin_files = bin.children.select(&:elf?) + system "strip", *bin_files, *lib.glob("*.a") + end + + # Allow ld to find brew glibc. A broken symlink falls back to /etc/ld.so.conf + (prefix/"etc").install_symlink etc/"ld.so.conf" if OS.linux? + end + + test do + assert_match "Usage:", shell_output("#{bin}/strings #{bin}/strings") + assert_predicate prefix/"etc/ld.so.conf", :symlink? if OS.linux? + end +end diff --git a/Formula/b/binwalk.rb b/Formula/b/binwalk.rb new file mode 100644 index 0000000000000..5a7f24d7af94a --- /dev/null +++ b/Formula/b/binwalk.rb @@ -0,0 +1,50 @@ +class Binwalk < Formula + desc "Searches a binary image for embedded files and executable code" + homepage "https://github.com/ReFirmLabs/binwalk" + url "https://github.com/ReFirmLabs/binwalk/archive/refs/tags/v3.1.0.tar.gz" + sha256 "06f595719417b70a592580258ed980237892eadc198e02363201abe6ca59e49a" + license "MIT" + head "https://github.com/ReFirmLabs/binwalk.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "11b3d0c518f81eaba097392205c002a136e25b73a81ec35551b9ca1e3858c700" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00db81d196265d847f7241a8771bade058a6077c0db8701fa0345496b7ba1f42" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d2640baf0e4b7943cef7df7ff1280ebdf1bc47ba711cc53d984eef63d24c5022" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f0ff3203c523ad5b7551b711b4ac5cacd6fe1d1d934c9e8c8a54a6745f5b7826" + sha256 cellar: :any_skip_relocation, sonoma: "3666d1ed2f81484d360d03bba8eb74a5175dd5a0461175c20bf1aa559e6add6f" + sha256 cellar: :any_skip_relocation, ventura: "048ab0f16801129c741006603da6545c267ec98ea3c349537f22ce8d03ceb038" + sha256 cellar: :any_skip_relocation, arm64_linux: "c28f00bf24601ddcb037e1822dbea082dceda5f26ac9a152e11d78532a488b5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bad450fef7ba5832e71804dc11fcb87d817fabbbf735c2b1dc9fa6c508a1090" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "p7zip" + depends_on "xz" + + uses_from_macos "bzip2" + + on_linux do + depends_on "fontconfig" + depends_on "freetype" + end + + pypi_packages exclude_packages: ["numpy", "pillow"], + extra_packages: %w[capstone gnupg matplotlib pycryptodome] + + def install + system "cargo", "install", *std_cargo_args + end + + test do + touch "binwalk.test" + system bin/"binwalk", "binwalk.test" + end +end diff --git a/Formula/b/bioawk.rb b/Formula/b/bioawk.rb new file mode 100644 index 0000000000000..c113fa3671a54 --- /dev/null +++ b/Formula/b/bioawk.rb @@ -0,0 +1,47 @@ +class Bioawk < Formula + desc "AWK modified for biological data" + homepage "https://github.com/lh3/bioawk" + url "https://github.com/lh3/bioawk/archive/refs/tags/v1.0.tar.gz" + sha256 "5cbef3f39b085daba45510ff450afcf943cfdfdd483a546c8a509d3075ff51b5" + license "HPND" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "091d687b6c2584d1f0a47fbac10ba074ade881df4f0631022ae215ffed68343b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "581ec8168890f6010df9a49953f2d52a3a86020fc350cb7cdb64fae38e23b0c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "781164882120d8b28e1cdac8b8db1f5c9a8bdedea381aedad9b35b6d185f2897" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a80d9d6887393ec604646dd2e79090bda1034f5947488995c383d29b8fbb2f47" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a568547e0fb85d1d0678d157c93aee71710f58d3bc4591186365ae28e4502b24" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "de4d41adcf20cf87de3d2310d98c1dbfbff95eb3432e6d0888be964889f024c6" + sha256 cellar: :any_skip_relocation, sonoma: "41b9e0d69738711ac5f1a2269ba11cd6de67303224621e9f52bb5564e76f0098" + sha256 cellar: :any_skip_relocation, ventura: "d10e6430821b1876cf8ad863dce1978f7aa4564bc3508e48f7cfa9d8e4d89306" + sha256 cellar: :any_skip_relocation, monterey: "844d8041e128ebcf46d1a5dec20dfc22f0a3fc1ff48388310cf810685acd9890" + sha256 cellar: :any_skip_relocation, big_sur: "f0e6d3b143b32066da8f41266d1edf2855ab0d780982c8eb09b78194c1e2484e" + sha256 cellar: :any_skip_relocation, catalina: "c7377ef6e226404f71d52c04715ea0bb8456e1c90493e93e78101dfb3ed2190e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c71291338d2d1a4306c9d9124a5475d1ef05357bfb80846d6d573c06f55afaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d611e2578e57304e571f02a58ec46efc83752a97a7d830b40e03a2c83749bb3" + end + + uses_from_macos "bison" => :build + uses_from_macos "zlib" + + def install + # Fix make: *** No rule to make target `ytab.h', needed by `b.o'. + ENV.deparallelize + + system "make" + bin.install "bioawk" + man1.install "awk.1" => "bioawk.1" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT + CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + cmd = "#{bin}/bioawk -cfastx '{print length($seq)}' test.fasta" + assert_equal "70", shell_output(cmd).chomp + end +end diff --git a/Formula/b/biodiff.rb b/Formula/b/biodiff.rb new file mode 100644 index 0000000000000..3ba0cdb495f20 --- /dev/null +++ b/Formula/b/biodiff.rb @@ -0,0 +1,50 @@ +class Biodiff < Formula + desc "Hex diff viewer using alignment algorithms from biology" + homepage "https://github.com/8051Enthusiast/biodiff" + url "https://github.com/8051Enthusiast/biodiff.git", + tag: "v1.2.1", + revision: "48468e9e7493c5bec608035f86459feb2469be14" + license "MIT" + head "https://github.com/8051Enthusiast/biodiff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c939875ccb2ba0bdca25c0893e40a984bb8a0911f6b1e11a3fafcad5e3b3962e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08203fed461dddc5d59a07694f40c3f6a42b8cf9c1aeec91e3fc943936bd2315" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "472ba7b9f5d1166d147ccb15471af31ce1bbab00f6f0c7313fe21d8cb70d6e9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "929f49840064e70ab6ac4c60a3059eaf9c65484d04cc4971826ffeb9229b67ab" + sha256 cellar: :any_skip_relocation, arm64_monterey: "04c01a76177d041505fd9c1fdb40415428a08ceb556f687f79386ea560abc233" + sha256 cellar: :any_skip_relocation, sonoma: "5072d40346a831e078adcd0cf7b0706f24963216a4e29487d734409b214ddecc" + sha256 cellar: :any_skip_relocation, ventura: "036e815818cfc7a42cf07835cc78dcd3915e84f0056dc4f7dd35ad4625d2d687" + sha256 cellar: :any_skip_relocation, monterey: "69f3a2a771625fdeca1da0718990b71876fe62acfe527ceee508db0e8dc82484" + sha256 cellar: :any_skip_relocation, arm64_linux: "8217e0944fd572a40bfb517c730e6927c8aea6750f7afe8d71d18eba1bc0ee71" + sha256 cellar: :any_skip_relocation, x86_64_linux: "457e5aac74347eb07659a465a925c7720dbfbaf017b7563151bfe5acac10ad99" + end + + depends_on "cmake" => :build # for biodiff-wfa2-sys + depends_on "rust" => :build + + uses_from_macos "llvm" # for libclang + + def install + system "cargo", "install", *std_cargo_args + end + + test do + begin + (testpath/"file1").write "foo" + (testpath/"file2").write "bar" + + r, w, pid = PTY.spawn "#{bin}/biodiff file1 file2" + sleep 1 + w.write "q" + assert_match "unaligned file1 | unaligned file2", r.read + + assert_match version.to_s, shell_output("#{bin}/biodiff --version") + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/b/biome.rb b/Formula/b/biome.rb new file mode 100644 index 0000000000000..911906d734750 --- /dev/null +++ b/Formula/b/biome.rb @@ -0,0 +1,37 @@ +class Biome < Formula + desc "Toolchain of the web" + homepage "https://biomejs.dev/" + url "https://github.com/biomejs/biome/archive/refs/tags/@biomejs/biome@2.3.3.tar.gz" + sha256 "620a3ee8c715ba373e9b2dcfe71af67e1175e80c3216682c29585fc2de8b69f9" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/biomejs/biome.git", branch: "main" + + livecheck do + url :stable + regex(%r{^@biomejs/biome@v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c6c4e3bc43a2a867783d08d8d6d7e87ddf488040c9d0fe5dc5cea9283917ec9c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37a684736f6cfbe99ff9f12c8ee8b18aaa9181bcf6c74f3ca3288ec952b19d51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ea48ccdfee8b3af54fe3ba0ecf258d6f80de892e6917c835320ca30af51c49b" + sha256 cellar: :any_skip_relocation, sonoma: "66ccc87f94d5ad90ecdfa8f25242e1102c70defc07f8ad720ff3ecce90f56037" + sha256 cellar: :any_skip_relocation, arm64_linux: "69c6cf7da1f6f62ac93a7eaa0b9f71420777cffe1aa37cafcce1596aa7048ab8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c9f7cc1e8d6ed16b0d19bc52f1be8e882a78bec4e82c12936a481eb5eb8937b" + end + + depends_on "rust" => :build + + def install + ENV["BIOME_VERSION"] = version.to_s + system "cargo", "install", *std_cargo_args(path: "crates/biome_cli") + end + + test do + (testpath/"test.js").write("const x = 1") + system bin/"biome", "format", "--semicolons=always", "--write", testpath/"test.js" + assert_match "const x = 1;", (testpath/"test.js").read + + assert_match version.to_s, shell_output("#{bin}/biome --version") + end +end diff --git a/Formula/b/bioperl.rb b/Formula/b/bioperl.rb new file mode 100644 index 0000000000000..6e5bec0fddf65 --- /dev/null +++ b/Formula/b/bioperl.rb @@ -0,0 +1,56 @@ +class Bioperl < Formula + desc "Perl tools for bioinformatics, genomics and life science" + homepage "https://bioperl.org" + url "https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/BioPerl-1.7.8.tar.gz" + sha256 "c490a3be7715ea6e4305efd9710e5edab82dabc55fd786b6505b550a30d71738" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + revision 2 + head "https://github.com/bioperl/bioperl-live.git", branch: "master" + + # We specifically match versions with three numeric parts because upstream + # documentation mentions that release versions have three parts and there are + # older tarballs with fewer than three parts that we need to omit for version + # comparison to work correctly. + livecheck do + url :stable + regex(/href=["']?BioPerl[._-]v?(\d+\.\d+\.\d+)(?:\.?_\d+)?\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8f8a3cdf95bc4a5607dfebbe71917ec44fcddb57a7e0afe052d96616cf179c4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2908dce831726ddab69edcb252b8b45b1d9b4ba2995bbefc6410dea49a6b230e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d44c606e7a067575bfe21428d84fcd57c7e45daa8b2af2a2cf7b6ae766611b0c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cce1be0687ce0d7b8cbaaaa2192dcc0ee3e624978c7e5296c2676099fb9c647e" + sha256 cellar: :any_skip_relocation, sonoma: "a79018530a34ea3fc2515bf85a4db9ed4379ccf7aeb9ef5d744d5fdb3009596e" + sha256 cellar: :any_skip_relocation, ventura: "ff98f524ac97416bd3893e5decb6f4e5deb9340f27fbca59a5b8f231bd800829" + sha256 cellar: :any_skip_relocation, arm64_linux: "14e32e55fcf6f8242d16b3200ca0df932f03752526af6d26c08256f98acbe8d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c28697f03736035682992843bd2dae185e38958cea70dde760636d5fe5661f13" + end + + depends_on "cpanminus" => :build + depends_on "pkgconf" => :build + depends_on "perl" + + uses_from_macos "expat" + uses_from_macos "libxml2" + + def install + ENV["ALIEN_INSTALL_TYPE"] = "system" + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + system "cpanm", "--notest", "--self-contained", "--local-lib", libexec, "DBI" unless OS.mac? + system "cpanm", "--notest", "--self-contained", "--local-lib", libexec, "." + bin.env_script_all_files libexec, "PERL5LIB" => ENV["PERL5LIB"] + libexec.glob("bin/bp_*") do |executable| + (bin/executable.basename).write_env_script executable, PERL5LIB: ENV["PERL5LIB"] + end + end + + test do + (testpath/"test.fa").write ">homebrew\ncattaaatggaataacgcgaatgg" + assert_match ">homebrew\nH*ME*REW", shell_output("#{bin}/bp_translate_seq < test.fa") + assert_match(/>homebrew-100_percent-1\n[atg]/, shell_output("#{bin}/bp_mutate -i test.fa -p 100 -n 1")) + assert_match "GC content is 0.3750", shell_output("#{bin}/bp_gccalc test.fa") + end +end diff --git a/Formula/b/biosig.rb b/Formula/b/biosig.rb new file mode 100644 index 0000000000000..4d8644269184b --- /dev/null +++ b/Formula/b/biosig.rb @@ -0,0 +1,50 @@ +class Biosig < Formula + desc "Tools for biomedical signal processing and data conversion" + homepage "https://biosig.sourceforge.net/" + url "https://downloads.sourceforge.net/project/biosig/BioSig%20for%20C_C%2B%2B/src/biosig-3.9.0.src.tar.xz" + sha256 "e5b353a1500e6f80150e1236919aef9679410a2337ee81ed056b3f306b25611e" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/(?:biosig|biosig4c[^-]*?)[._-]v?(\d+(?:\.\d+)+)\.src\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "70d70680271747ac17d076fc94b26449cca89b8c5f3c361488857a9e56dac07a" + sha256 cellar: :any, arm64_sequoia: "152be2d169a73dbd8afcbb4e5060d547f7a0d439ed64626c6ccc969974d94e18" + sha256 cellar: :any, arm64_sonoma: "4d28f7a3f4ce3494c4557958c730b07bd08b19b8dbb056f7282f8e5fc396d918" + sha256 cellar: :any, arm64_ventura: "738017ce88f7c9d43596aeeddc99ce04c6a6896ab02922da8c056ea24f3d0e6b" + sha256 cellar: :any, sonoma: "b410b16cdff030dfe233751c39c6523d5a841bd35bdd2e9cd153582b881d3f96" + sha256 cellar: :any, ventura: "0f235a6d5036c54a44fe76c5dd3b3cb321805ea72663b3abd1565674a3bd5856" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bfe8bd446b18c50e95f60a1685c4ff47f1c7b3c0686799be786e2fd4b9ebb3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85ab1e23f4ec3552398ee860ee360c73eea317bc9e8881b90e1f9cc9d9069f02" + end + + depends_on "gawk" => :build + depends_on "libb64" => :build + depends_on "dcmtk" + depends_on "suite-sparse" + + def install + ENV.append "CXX", "-std=gnu++17" + + # Work around header include order causing issues with `#ifndef isfinite` + ENV.append "CXXFLAGS", "-include cmath" if DevelopmentTools.clang_build_version >= 1700 + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + ENV.deparallelize if OS.mac? && MacOS.version >= :sonoma + system "make", "install" + end + + test do + assert_match "usage: save2gdf [OPTIONS] SOURCE DEST", shell_output("#{bin}/save2gdf -h").strip + assert_match "mV\t4274\t0x10b2\t0.001\tV", shell_output("#{bin}/physicalunits mV").strip + assert_match "biosig_fhir provides fhir binary template for biosignal data", + shell_output("#{bin}/biosig_fhir 2>&1").strip + end +end diff --git a/Formula/b/bison.rb b/Formula/b/bison.rb new file mode 100644 index 0000000000000..020a891ed2143 --- /dev/null +++ b/Formula/b/bison.rb @@ -0,0 +1,69 @@ +class Bison < Formula + desc "Parser generator" + homepage "https://www.gnu.org/software/bison/" + # X.Y.9Z are beta releases that sometimes get accidentally uploaded to the release FTP + url "https://ftpmirror.gnu.org/gnu/bison/bison-3.8.2.tar.xz" + mirror "https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz" + sha256 "9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2" + license "GPL-3.0-or-later" + version_scheme 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d47d87f1bead6f00956ea21f147d46ded1c5c2ac0c53193a1ed7b46105492228" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d45a8c193646a25d281a6d3fd62d6f756d4e392cc2948e605a62f3d88ccbf188" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4c06638f63876867e8fc485129ea6683487a249f0b2bc98bfaa6f1dab4ff6a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f877d389e78b14a070d21c554e39abff55d2fb6d7f0ae58de746f6edd4509ca1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "78ce4e93936c37005e944b21e4b4d305725bc66f6c675acf2eb13cf72bac01cc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fb649b4e0b071ccfdce51193942366e894fb08be9798109eb718fb323369509e" + sha256 cellar: :any_skip_relocation, sonoma: "cadf52c2fd93ef340f01a36a8468b8725f5218ee6c62773b3838b8c01c862c9b" + sha256 cellar: :any_skip_relocation, ventura: "fc0224d45c74ee561128eb9df366ccb08698b1d659cfb92ea746e57da0108806" + sha256 cellar: :any_skip_relocation, monterey: "feb2484898408e8fb2008f4c0ff39042bffb026ea4463d33fd0dfb5952895f1c" + sha256 cellar: :any_skip_relocation, big_sur: "a4fa1a0bf3245d8ef6a0d24d35df5222269174a02408784d870e4a882434712d" + sha256 cellar: :any_skip_relocation, catalina: "5a79db63b8a10bc6211ed6a9dcef6df91c26d9fe3420047c285960dede637ea5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e35b0e9bf9ae5177b25e524b25b792690f6024dabb91428d5db0986e033c2f15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d708c29c7e44f28a4fa77d353ff7adfbe673b31cef6f24c3c384a03ba01b3608" + end + + keg_only :provided_by_macos + + uses_from_macos "m4" + + def install + system "./configure", "--disable-dependency-tracking", + "--enable-relocatable", + "--prefix=/output", + "M4=m4" + system "make", "install", "DESTDIR=#{buildpath}" + prefix.install Dir["#{buildpath}/output/*"] + end + + test do + (testpath/"test.y").write <<~EOS + %{ #include + using namespace std; + extern void yyerror (char *s); + extern int yylex (); + %} + %start prog + %% + prog: // empty + | prog expr '\\n' { cout << "pass"; exit(0); } + ; + expr: '(' ')' + | '(' expr ')' + | expr expr + ; + %% + char c; + void yyerror (char *s) { cout << "fail"; exit(0); } + int yylex () { cin.get(c); return c; } + int main() { yyparse(); } + EOS + system bin/"bison", "test.y" + system ENV.cxx, "test.tab.c", "-o", "test" + assert_equal "pass", shell_output("echo \"((()(())))()\" | ./test") + assert_equal "fail", shell_output("echo \"())\" | ./test") + end +end diff --git a/Formula/b/bison@2.7.rb b/Formula/b/bison@2.7.rb new file mode 100644 index 0000000000000..f3dd5d3132e99 --- /dev/null +++ b/Formula/b/bison@2.7.rb @@ -0,0 +1,71 @@ +class BisonAT27 < Formula + desc "Parser generator" + homepage "https://www.gnu.org/software/bison/" + url "https://ftpmirror.gnu.org/gnu/bison/bison-2.7.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/bison/bison-2.7.1.tar.gz" + sha256 "08e2296b024bab8ea36f3bb3b91d071165b22afda39a17ffc8ff53ade2883431" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 arm64_sequoia: "12eb0c1ab891b05dee98b3f748396e1efa2698ae63c40f84acbf73a3eb6959bf" + sha256 arm64_sonoma: "472d73bf7ba67981ae3246014105d2c150a5d62293b5c5e2e9726fea022c29f0" + sha256 arm64_ventura: "4c2881dcd188abeb431f4f53f1b01186b7dc588f12e890021ae77b3f3b547005" + sha256 arm64_monterey: "52c4f32eb121a9442b25748e155a1d9d4ace7d433a07eafc13faed18272a2714" + sha256 arm64_big_sur: "a8889d09761ad553f7b7061947a1715e88a658ce7f4d3755b7d8d00f25a53f1a" + sha256 sonoma: "d766c79c2137d8856917b57cfd63237d63d14f92469ca2eb9e0d0536049e5648" + sha256 ventura: "355f1fc5d497c0ce49e161173ff9c98a737dc8ec037ce2edde491f6bf65b6f79" + sha256 monterey: "fe295780aa756db1594d7a0db99e2f19c282b54f4c405d35a9248048714b680e" + sha256 big_sur: "01d3b84f13676a4da576df0d7f8f9fafcc7ea734b895a5d3947b1e055d9db330" + sha256 catalina: "b9af668b0da3e89f4a2d7b7e4d42009965780d1f7cd1541df85f758c2b7af55a" + sha256 x86_64_linux: "5ab86dee3b17c3d3a610b1db7f949a95d71be7ac1c978d81fc2ae400941c4d97" + end + + keg_only :versioned_formula + + disable! date: "2024-12-14", because: :versioned_formula + + uses_from_macos "m4" + + patch :p0 do + on_macos do + url "https://raw.githubusercontent.com/macports/macports-ports/b76d1e48dac/editors/nano/files/secure_snprintf.patch" + sha256 "57f972940a10d448efbd3d5ba46e65979ae4eea93681a85e1d998060b356e0d2" + end + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.y").write <<~EOS + %{ #include + using namespace std; + extern void yyerror (char *s); + extern int yylex (); + %} + %start prog + %% + prog: // empty + | prog expr '\\n' { cout << "pass"; exit(0); } + ; + expr: '(' ')' + | '(' expr ')' + | expr expr + ; + %% + char c; + void yyerror (char *s) { cout << "fail"; exit(0); } + int yylex () { cin.get(c); return c; } + int main() { yyparse(); } + EOS + + system bin/"bison", "test.y" + system ENV.cxx, "test.tab.c", "-o", "test" + assert_equal "pass", shell_output("echo \"((()(())))()\" | ./test") + assert_equal "fail", shell_output("echo \"())\" | ./test") + end +end diff --git a/Formula/b/bit-git.rb b/Formula/b/bit-git.rb new file mode 100644 index 0000000000000..abaed07719fc4 --- /dev/null +++ b/Formula/b/bit-git.rb @@ -0,0 +1,49 @@ +class BitGit < Formula + desc "Bit is a modern Git CLI" + homepage "https://github.com/chriswalz/bit" + url "https://github.com/chriswalz/bit/archive/refs/tags/v1.1.2.tar.gz" + sha256 "563ae6b0fa279cb8ea8f66b4b455c7cb74a9e65a0edbe694505b2c8fc719b2ff" + license "Apache-2.0" + head "https://github.com/chriswalz/bit.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6e2c5d5baedcd742c9f2808e15e1310c4762fe49bde321b2786bbdf5e5746319" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "512fae594f8692aea23014f35c5ef02d23c49c2ce28b2f772cffaeadc55b2c9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a28f8da02e22757fa2d836e5767926918410ab8f85f7e46ea330d5d5255b937a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "82fc55cd7f3b2e7fa64bb366e4ca6e9024510df3e734e8e54800dcbda8870c77" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5ec8c891231ff16cf80a718430dec65bea587391dc0ebe31494fea95edb44723" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cc0139db7fef5d988bd822b90f8551d8ed5a5cdccdcc71520ae6f326cdad89ac" + sha256 cellar: :any_skip_relocation, sonoma: "f1848708a2ca3bf3ad52aad8e4005adc464b824da5b38c3eb69bc80d9c8979d5" + sha256 cellar: :any_skip_relocation, ventura: "23bc09ee2722746a76d3fbd4dba8d4f8d9adceba6e558c2f92ba051f385081d9" + sha256 cellar: :any_skip_relocation, monterey: "e80cd43fa56f86ba282f2f91ca68336eecc331119e78e5757e53a3c4c5f9fe37" + sha256 cellar: :any_skip_relocation, big_sur: "f321a7d78c247054446dfbd07a46de743a36ad591f034e2e81c93b443741288a" + sha256 cellar: :any_skip_relocation, catalina: "4e4e377fc26a5574fa6b38f63f2aa1979f0639854ece3a14cbc95fb6a2cc037b" + sha256 cellar: :any_skip_relocation, arm64_linux: "353231b7f6e264d45c4aaeac8e79b17bbc5dd10f917c333725f28084644824fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9242804e17ecbd8e6a42368a26c83fd8d97567ce6adbe5c2471dce9f6969f90" + end + + depends_on "go" => :build + + conflicts_with "bit", because: "both install `bit` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-X main.version=v#{version}") + bin.install_symlink "bit-git" => "bit" + end + + test do + system "git", "init", testpath/"test-repository" + + cd testpath/"test-repository" do + (testpath/"test-repository/test.txt").write <<~EOS + Hello Homebrew! + EOS + system bin/"bit", "add", "test.txt" + + output = shell_output("#{bin}/bit status").chomp + assert_equal "new file: test.txt", output.lines.last.strip + end + end +end diff --git a/Formula/b/bit.rb b/Formula/b/bit.rb new file mode 100644 index 0000000000000..cbce42d8585a6 --- /dev/null +++ b/Formula/b/bit.rb @@ -0,0 +1,66 @@ +class Bit < Formula + desc "Distributed Code Component Manager" + homepage "https://bit.dev" + url "https://registry.npmjs.org/bit-bin/-/bit-bin-14.8.8.tgz" + sha256 "25d899bacd06d77fad41026a9b19cbe94c8fb986f5fe59ead7ccec9f60fd0ef9" + license "Apache-2.0" + revision 1 + head "https://github.com/teambit/bit.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "82201904fa2ec0416232bc8e3fa85b60945f07b58dbfa69566c800c96947fb7f" + sha256 arm64_sequoia: "591d452238af32826df679aa962d6ce755294473c450bc5118dfac9e50a552f8" + sha256 arm64_sonoma: "b69b3a7ba901fd29b6ef35d47b7248a4219b55336ad1cf04dd2f5cd8268387b8" + sha256 arm64_ventura: "37e5de52910eb4d93ff0d8c1d4348b8d1131b691af23ec0db82be76ba32a6417" + sha256 arm64_monterey: "47b532eb0b388e861e2da67c40cf213d4795277c4f7be59cc949fbac656d0e5f" + sha256 sonoma: "a5b469dc4bfc6937d12296c2c768b9dc3a210c8a9e1fe796213823b7ecd68c19" + sha256 ventura: "cbfe314c2c994b80648167a54ecca3cc3fb09c8824ef88f274d935d98ba8aafd" + sha256 monterey: "57c91e19fbc60897fa432f7028898f75d47395239fce208cb9222f83f78a1ac5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0b88da3686ca8ece21a232981d3d40196d0f4b1f8c9aabb55d2f4be142e33e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d998d44c9e7d076515e9363153c1aeaa4c8ddee77f9554152f6af2fab077764" + end + + depends_on "node" + + on_macos do + depends_on "terminal-notifier" + end + + conflicts_with "bit-git", because: "both install `bit` binaries" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/bit-bin/node_modules" + (node_modules/"leveldown/prebuilds/linux-x64/node.napi.musl.node").unlink + (node_modules/"leveldown/prebuilds").each_child { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + + # Remove vendored pre-built binary `terminal-notifier` + node_notifier_vendor_dir = node_modules/"node-notifier/vendor" + rm_r(node_notifier_vendor_dir) # remove vendored pre-built binaries + + if OS.mac? + terminal_notifier_dir = node_notifier_vendor_dir/"mac.noindex" + terminal_notifier_dir.mkpath + + # replace vendored `terminal-notifier` with our own + terminal_notifier_app = Formula["terminal-notifier"].opt_prefix/"terminal-notifier.app" + ln_sf terminal_notifier_app.relative_path_from(terminal_notifier_dir), terminal_notifier_dir + end + end + + test do + (testpath/"Library/Caches/Bit/config/config.json").write <<~JSON + { "analytics_reporting": false, "error_reporting": false } + JSON + output = shell_output("#{bin}/bit init --skip-update") + assert_match "successfully initialized", output + end +end diff --git a/Formula/b/bitchx.rb b/Formula/b/bitchx.rb new file mode 100644 index 0000000000000..12772045e0c03 --- /dev/null +++ b/Formula/b/bitchx.rb @@ -0,0 +1,120 @@ +class Bitchx < Formula + desc "Text-based, scriptable IRC client" + homepage "https://bitchx.sourceforge.net/" + license "BSD-3-Clause" + revision 1 + head "https://git.code.sf.net/p/bitchx/git.git", branch: "master" + + stable do + url "https://downloads.sourceforge.net/project/bitchx/ircii-pana/bitchx-1.2.1/bitchx-1.2.1.tar.gz" + sha256 "2d270500dd42b5e2b191980d584f6587ca8a0dbda26b35ce7fadb519f53c83e2" + + # Apply these upstream commits to fix Linux build: + # https://sourceforge.net/p/bitchx/git/ci/1c6ff3088ad01a15bea50f78f1b2b468db7afae9/ + # https://sourceforge.net/p/bitchx/git/ci/4f63d4892995eec6707f194b462c9fc3184ee85d/ + # Remove with next release. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bitchx/linux.patch" + sha256 "99caa10f32bfe4727a836b8cc99ec81e3c059729e4bb90641be392f4e98255d9" + end + + # Backport part of upstream commit to add static specifiers needed to fix Sonoma build + # Ref: https://sourceforge.net/p/bitchx/git/ci/7e3c39a464635eb22484161513410ecbb666f840/ + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a24e61a92b29742aed083f0630542dafa1b11daabbfbfe02ec73a1ba904789ff" + sha256 arm64_sequoia: "bb2902a6bb21cd1b2d5765652a7ef8c5b72a9ec645bab961d3d560320a96adb2" + sha256 arm64_sonoma: "774434de284a29888d4c9ed76671faf2903837d76a53acdfe25a8a358843c3ff" + sha256 arm64_ventura: "13c3a23d3e7316d509646ddbd5ee5442c096856124a4f2cc9123afee2ab66bfd" + sha256 arm64_monterey: "2176f208cf2ef65ebe0fc9ea27d2581e21450a01f2b399aba4d0620085245bc2" + sha256 arm64_big_sur: "e92a812a3fdb12ef256f677a923b1343bd9a478beb41c988ea36845e6e154d75" + sha256 sonoma: "9a2c155cc9c8089674d95958a529145840263b0a9268707f30f2950e08ec3bad" + sha256 ventura: "c793d5d32ff5b4bb73d9c33f12b047459245ecc9f80883c66fac3ae9a30e2f6e" + sha256 monterey: "60c248c5f1b0a85a655ec9462b28982c4c0a089babdac242aedf9e0313a36f8e" + sha256 big_sur: "fb716a19bd25719a59a53270eb4dd4087d11946f44fe2a7adde6aeee183917fd" + sha256 catalina: "ea43f6d0776072e4a73f77621b676920c7a85c0b35446e29d61612c2e68d1ce8" + sha256 arm64_linux: "4f34b4f508810bd50085303aa389932e4834bbf95db9ccecc01fc4b63a3e9039" + sha256 x86_64_linux: "99bec310978096fc74fb480bd558108eb6f9a476ce0dc6721c84a5023f6913c4" + end + + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + + def install + plugins = %w[ + acro arcfour amp autocycle blowfish cavlink encrypt + fserv hint identd nap pkga possum qbx qmail + ] + + # Remove following in next release + if build.stable? + # AIM plugin was removed upstream: + # https://sourceforge.net/p/bitchx/git/ci/35b1a65f03a2ca2dde31c9dbd77968587b6027d3/ + plugins << "aim" + + # Patch to fix OpenSSL detection with OpenSSL 1.1 + # A similar fix is already committed upstream: + # https://sourceforge.net/p/bitchx/git/ci/184af728c73c379d1eee57a387b6012572794fa8/ + inreplace "configure", "SSLeay", "OpenSSL_version_num" + + # Work around for new Clang. HEAD build does not hit issues. + if DevelopmentTools.clang_build_version >= 1500 + ENV.append_to_cflags "-Wno-implicit-function-declaration" + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" + ENV.append_to_cflags "-Wno-int-conversion" + end + end + + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--enable-ipv6", + "--with-plugins=#{plugins.join(",")}", + "--with-ssl" + system "make" + system "make", "install" + end + + test do + system bin/"BitchX", "-v" + end +end + +__END__ +diff --git a/source/expr2.c b/source/expr2.c +index f607707..657a2bc 100644 +--- a/source/expr2.c ++++ b/source/expr2.c +@@ -1192,7 +1204,7 @@ int lexerr (expr_info *c, char *format, ...) + * case 'operand' is set to 1. When an operand is lexed, then the next token + * is expected to be a binary operator, so 'operand' is set to 0. + */ +-__inline int check_implied_arg (expr_info *c) ++static __inline int check_implied_arg (expr_info *c) + { + if (c->operand == 2) + { +@@ -1205,7 +1217,7 @@ __inline int check_implied_arg (expr_info *c) + return c->operand; + } + +-__inline TOKEN operator (expr_info *c, char *x, int y, TOKEN z) ++static __inline TOKEN operator (expr_info *c, char *x, int y, TOKEN z) + { + check_implied_arg(c); + if (c->operand) +@@ -1216,7 +1228,7 @@ __inline TOKEN operator (expr_info *c, char *x, int y, TOKEN z) + return z; + } + +-__inline TOKEN unary (expr_info *c, char *x, int y, TOKEN z) ++static __inline TOKEN unary (expr_info *c, char *x, int y, TOKEN z) + { + if (!c->operand) + return lexerr(c, "An operator (%s) was found where " diff --git a/Formula/b/bitcoin.rb b/Formula/b/bitcoin.rb new file mode 100644 index 0000000000000..7a6d71640afee --- /dev/null +++ b/Formula/b/bitcoin.rb @@ -0,0 +1,66 @@ +class Bitcoin < Formula + desc "Decentralized, peer to peer payment network" + homepage "https://bitcoincore.org/" + url "https://bitcoincore.org/bin/bitcoin-core-30.0/bitcoin-30.0.tar.gz" + sha256 "9b472a4d51dfed9aa9d0ded2cb8c7bcb9267f8439a23a98f36eb509c1a5e6974" + license all_of: [ + "MIT", + "BSD-3-Clause", # src/crc32c, src/leveldb + "BSL-1.0", # src/tinyformat.h + ] + head "https://github.com/bitcoin/bitcoin.git", branch: "master" + + livecheck do + url "https://bitcoincore.org/en/download/" + regex(/latest version.*?v?(\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b41df41b0bdf46fe7877a738e33eaaf0eabc97361eb3b759e2712e1ec93a23a7" + sha256 cellar: :any, arm64_sequoia: "7174a1ba2ff1ed54708af13bb36f27424c37cae053c8dfda0ac19d0ac1d2671b" + sha256 cellar: :any, arm64_sonoma: "672a522db69b84fa3c9d1111e3cbbfe4b780ab915c449b8a67f6f142503eff8b" + sha256 cellar: :any, sonoma: "353356a2b200c3ef5e1c3727a11cd8ac86058673c157758e9aa3fee027146fca" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad4203d3296dae07be3e8d6ffe961e77faf4b1e76a59de729b7929c87c51c428" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae10c54ebb004117d6b3ab91f62fb6b6dc6e3ed9c6953686a79a20a3de340b60" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "capnp" + depends_on "libevent" + depends_on macos: :sonoma # Needs C++20 features not available on Ventura + depends_on "zeromq" + + uses_from_macos "sqlite" + + on_ventura do + # For C++20 (Ventura seems to be missing the `source_location` header). + depends_on "llvm" => :build + end + + fails_with :gcc do + version "11" + cause "Requires C++ 20" + end + + def install + ENV.runtime_cpu_detection + ENV.llvm_clang if OS.mac? && MacOS.version == :ventura + args = %w[ + -DWITH_ZMQ=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "share/rpcauth" + end + + service do + run opt_bin/"bitcoind" + end + + test do + system bin/"bitcoin", "test" + end +end diff --git a/Formula/b/bitlbee.rb b/Formula/b/bitlbee.rb new file mode 100644 index 0000000000000..491558eec7a60 --- /dev/null +++ b/Formula/b/bitlbee.rb @@ -0,0 +1,79 @@ +class Bitlbee < Formula + desc "IRC to other chat networks gateway" + homepage "https://www.bitlbee.org/" + url "https://get.bitlbee.org/src/bitlbee-3.6.tar.gz" + sha256 "9f15de46f29b46bf1e39fc50bdf4515e71b17f551f3955094c5da792d962107e" + license "GPL-2.0-or-later" + head "https://github.com/bitlbee/bitlbee.git", branch: "master" + + livecheck do + url "https://get.bitlbee.org/src/" + regex(/href=.*?bitlbee[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "efb34682e8ec26936cb35959a177ba9b4242223b70a4d3c2596960d13f2d3bf0" + sha256 arm64_sequoia: "b657d232b9e5c995bad586bebabccbf58cab67a71f81dcc20ef65ba7685c7c5c" + sha256 arm64_sonoma: "5405ccb44de475193bc30f0c57d9794ede440f7c3d8e608404cd2aee0431713b" + sha256 arm64_ventura: "d5abbf75f2d71752b48051f6072394422a338650a187b53f0bcb528981da9e3a" + sha256 arm64_monterey: "6c291e3c2ef13b1e766bbfa75f7732f273cacdd6eb98bfdd474db446a8ae0137" + sha256 arm64_big_sur: "664ce4fbb775206950ec7b0786bcefc43c43ead3631a33024061dd139b59ecfe" + sha256 sonoma: "929bb42139773284acbbd8f121eb572e4fe3bedc3802a0111347aeb0e1b5fc16" + sha256 ventura: "e74d65e09581d5e67cb6e7f495e7070bae95d4a51e5449f86b5fb9b44af6aa9c" + sha256 monterey: "58b2fb9b50a1c3ed78f9b8945abb8aa883da058170cd0255a44f01681c660f6c" + sha256 big_sur: "3d4a68524f64b5abca2cdb3cca9eb60fe6ab30c98bd12cddf4f736fb3c1dda54" + sha256 catalina: "c7280a6ea53c3336f710b12617c2fa68bd4b75829962728002f72006e3163ffc" + sha256 arm64_linux: "1e4d10f608c4b7af9664596201441fb1c8896d8fb708f7cd060dba134465cf0b" + sha256 x86_64_linux: "046736bbc9acefad55c69d5acbe77d4f96123d6a1ab49db0179d95f5cb72eec6" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "gnutls" + depends_on "libgcrypt" + depends_on "libgpg-error" + + on_macos do + depends_on "gettext" + end + + def install + args = %W[ + --prefix=#{prefix} + --plugindir=#{HOMEBREW_PREFIX}/lib/bitlbee/ + --debug=0 + --ssl=gnutls + --etcdir=#{etc}/bitlbee + --pidfile=#{var}/bitlbee/run/bitlbee.pid + --config=#{var}/bitlbee/lib/ + --ipsocket=#{var}/bitlbee/run/bitlbee.sock + ] + + system "./configure", *args + + # This build depends on make running first. + system "make" + system "make", "install" + # Install the dev headers too + system "make", "install-dev" + # This build has an extra step. + system "make", "install-etc" + end + + def post_install + (var/"bitlbee/run").mkpath + (var/"bitlbee/lib").mkpath + end + + service do + run opt_sbin/"bitlbee" + sockets "tcp://127.0.0.1:6667" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/bitlbee -V", 1) + end +end diff --git a/Formula/b/bitrise.rb b/Formula/b/bitrise.rb new file mode 100644 index 0000000000000..88abd3a8d3775 --- /dev/null +++ b/Formula/b/bitrise.rb @@ -0,0 +1,53 @@ +class Bitrise < Formula + desc "Command-line automation tool" + homepage "https://github.com/bitrise-io/bitrise" + url "https://github.com/bitrise-io/bitrise/archive/refs/tags/v2.34.6.tar.gz" + sha256 "530dd2a411f85a90261ab00f09bfad3d8a488e8bc7dc6df6b5179e596ee1c31a" + license "MIT" + head "https://github.com/bitrise-io/bitrise.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ac7db78585a9a785db9b747af1ee16baedbef451246a95d4ff75cdcf50e7a3b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac7db78585a9a785db9b747af1ee16baedbef451246a95d4ff75cdcf50e7a3b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac7db78585a9a785db9b747af1ee16baedbef451246a95d4ff75cdcf50e7a3b9" + sha256 cellar: :any_skip_relocation, sonoma: "5b2937a1b623f245159bb93b793cd2447d2ac6ff74a224033c0c9e9a509b4409" + sha256 cellar: :any_skip_relocation, arm64_linux: "27594480129c3d965dac95352b1329a8204640cea5c1cf268e63db23090cc065" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a8b892dff5a84b517ec61b2901ee2f1cbfab92d91a84cecee7fc138f108c629" + end + + depends_on "go" => :build + + uses_from_macos "rsync" + + def install + ldflags = %W[ + -s -w + -X github.com/bitrise-io/bitrise/version.VERSION=#{version} + -X github.com/bitrise-io/bitrise/version.Commit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags: ldflags) + end + + test do + (testpath/"bitrise.yml").write <<~YAML + format_version: 1.3.1 + default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git + workflows: + test_wf: + steps: + - script: + inputs: + - content: printf 'Test - OK' > brew.test.file + YAML + + system bin/"bitrise", "setup" + system bin/"bitrise", "run", "test_wf" + assert_equal "Test - OK", (testpath/"brew.test.file").read.chomp + end +end diff --git a/Formula/b/bittwist.rb b/Formula/b/bittwist.rb new file mode 100644 index 0000000000000..4f0dca5255043 --- /dev/null +++ b/Formula/b/bittwist.rb @@ -0,0 +1,30 @@ +class Bittwist < Formula + desc "Libcap-based Ethernet packet generator" + homepage "https://bittwist.sourceforge.io" + url "https://downloads.sourceforge.net/project/bittwist/macOS/Bit-Twist%204.7/bittwist-macos-4.7.tar.gz" + sha256 "2ff00070d57221672af5198268088ffee8ed6b5ade33d6f26be5b3b4125b48f1" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a7b5eded04554c702c03d007fc3154db054b0e2626fdf96cc7f3deb5507c3565" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e8c5033fb2ebd8dc27832f1b4252d3f1b4cfadee39831d6af68028f28f9e8e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "364a968f6b30db2db01a77f6b2c55c609d3c8165607c40e0f2b4b1ea011c81c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f5fe1bc269cc3195450240348b9b808f60b19c88b1362a533ef7f615d6b7c40" + sha256 cellar: :any_skip_relocation, sonoma: "523fc5af61f3f3815d23cfbc1089548d86b072a301c5424923cdac4028a61d95" + sha256 cellar: :any_skip_relocation, ventura: "3df91f28e930a032ea31108f1ceb250b14d0a02b5026060924027457426183b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e718fe79ba09665d846a8479a6ff2cb593540e48aa477114322af1bab5ccdc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f85b61e9d72e5d329a7b3a01813b01f2c72e81dc451bf144e8860b0cd868472d" + end + + uses_from_macos "libpcap" + + def install + system "make" + system "make", "install", "prefix=#{prefix}" + end + + test do + system bin/"bittwist", "-help" + system bin/"bittwiste", "-help" + end +end diff --git a/Formula/b/bitwarden-cli.rb b/Formula/b/bitwarden-cli.rb new file mode 100644 index 0000000000000..8e33dd929f917 --- /dev/null +++ b/Formula/b/bitwarden-cli.rb @@ -0,0 +1,38 @@ +class BitwardenCli < Formula + desc "Secure and free password manager for all of your devices" + homepage "https://bitwarden.com/" + url "https://github.com/bitwarden/clients/archive/refs/tags/cli-v2025.10.0.tar.gz" + sha256 "e9f5b989e3403525c08ef0d295e7a315de2e5f05121e67b0352fed21417277df" + license "GPL-3.0-only" + head "https://github.com/bitwarden/clients.git", branch: "main" + + livecheck do + url :stable + regex(/^cli[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "47a5545f00c13d5eb5ffe36e4f9dfd9e4a5b44f0c5fb3694a144d5672e55cc6a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args(prefix: false), "--ignore-scripts" + cd buildpath/"apps/cli" do + # The `oss` build of Bitwarden is a GPL backed build + system "npm", "run", "build:oss:prod", "--ignore-scripts" + system "npm", "install", *std_npm_args + end + bin.install_symlink libexec.glob("bin/*") + + generate_completions_from_executable(bin/"bw", "completion", "--shell", shells: [:zsh]) + end + + test do + assert_equal 10, shell_output("#{bin}/bw generate --length 10").length + + output = pipe_output("#{bin}/bw encode", "Testing", 0) + assert_equal "VGVzdGluZw==", output + end +end diff --git a/Formula/b/bitwise.rb b/Formula/b/bitwise.rb new file mode 100644 index 0000000000000..098a542fb99a9 --- /dev/null +++ b/Formula/b/bitwise.rb @@ -0,0 +1,41 @@ +class Bitwise < Formula + desc "Terminal based bit manipulator in ncurses" + homepage "https://github.com/mellowcandle/bitwise" + url "https://github.com/mellowcandle/bitwise/releases/download/v0.50/bitwise-v0.50.tar.gz" + sha256 "806271fa5bf31de0600315e8720004a8f529954480e991ca84a9868dc1cae97e" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9f6712da2de2e93861c008540f524f5b60be33054db0acb064d82a26322c361d" + sha256 cellar: :any, arm64_sequoia: "d7659a60e6cad87bc0dd72921475005c50340e66d7a6ba822a5769a67df1b91d" + sha256 cellar: :any, arm64_sonoma: "923c4828ff104f940038b9d6969759b08d90a3d2c89cb1c0e31b913a2d38769e" + sha256 cellar: :any, arm64_ventura: "85b482536f160a726ccf996c7653763a19c43b5b4926c8da4af4bb0b01ff63ca" + sha256 cellar: :any, arm64_monterey: "7b2980226d0d6d231bf41898bbadd6c18a838bee766aa62dfff1c451d8c0357a" + sha256 cellar: :any, arm64_big_sur: "92f12631e0740195ad3cf87b0a320288d6d27523651568575d3dedb4a02a0705" + sha256 cellar: :any, sonoma: "66b9022c3207ba8c0b9b9b3a530dfd1403d9fc3ed4c5e991ee01d7d3aafb3635" + sha256 cellar: :any, ventura: "7b67229824c3f0e7b1ff3f3e1cfbf11f8f0b8f6dec64a75e010e81f1e8e32fce" + sha256 cellar: :any, monterey: "5f880e578cbd7558572c25c9f5c66a674e0e0547f1bc7e8cee33e4869bb39228" + sha256 cellar: :any, big_sur: "560ee93626732de20fa8d5ca16058c92f26383a497e8218029ecbe377cda5602" + sha256 cellar: :any_skip_relocation, arm64_linux: "576e3966940ee9afff289f542a29073600a1b131c234e6ef49c0b59eb2cde5c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "843a3614b4b1ce32529429588fbc60289bfdf91086658666c850be7f88c1baca" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "readline" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + + system "make", "install" + end + + test do + assert_match "0 0 1 0 1 0 0 1", shell_output("#{bin}/bitwise --no-color '0x29A >> 4'") + end +end diff --git a/Formula/b/bk.rb b/Formula/b/bk.rb new file mode 100644 index 0000000000000..e698d87d95f79 --- /dev/null +++ b/Formula/b/bk.rb @@ -0,0 +1,33 @@ +class Bk < Formula + desc "Terminal EPUB Reader" + homepage "https://github.com/aeosynth/bk" + url "https://github.com/aeosynth/bk/archive/refs/tags/v0.6.0.tar.gz" + sha256 "c720c8e81e86709f8543ca1a97a3c30b3bb33d55692a536cefed0ad2e3dfabcd" + license "MIT" + head "https://github.com/aeosynth/bk.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "42cb86c453b9c30b09fd6d4cbec309748b0466a0de6cfbb9e5086c364d053e97" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30d3025706d0187e6cd460e507021a955c0530e1292a0b8432d56c79074fb07a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3643df6af656b1c215b983746a6982986e436f68ea5800e63b876579d24c2621" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1908ba16a3ab0d0ff9a23473cfa13429c8501f491f97315b447f1d2127d135f8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4b721741e74dfadfdaa8c138825f984752a0381349c89eadf22d5c416ad45e62" + sha256 cellar: :any_skip_relocation, sonoma: "8068f1d17daa139707c388f7941d5acd41f55a0d27d9e08c0b1f6e58b5667862" + sha256 cellar: :any_skip_relocation, ventura: "f69c8a364ee94f4ee85f8b9545235ed29b54c51eae5d709259cdb8547b1d3130" + sha256 cellar: :any_skip_relocation, monterey: "36744f668875bb46d8f30ad983ddd509dbef6ca0409be707c692a4a2e3fd1f67" + sha256 cellar: :any_skip_relocation, arm64_linux: "501750e75de55c4246ae4ba053ab3852be696d1d63a0f9e052a1ebae2f5e13e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "efc14a838d10cc7fa1ceb15224041d836eb77d36bbda8c8a966afe158aabb2e5" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + test_epub = test_fixtures("test.epub") + output = shell_output("#{bin}/bk --meta #{test_epub}") + assert_match "language: en", output + end +end diff --git a/Formula/b/bkcrack.rb b/Formula/b/bkcrack.rb new file mode 100644 index 0000000000000..bb12ce2acd744 --- /dev/null +++ b/Formula/b/bkcrack.rb @@ -0,0 +1,34 @@ +class Bkcrack < Formula + desc "Crack legacy zip encryption with Biham and Kocher's known plaintext attack" + homepage "https://github.com/kimci86/bkcrack" + url "https://github.com/kimci86/bkcrack/archive/refs/tags/v1.8.1.tar.gz" + sha256 "bb6a6d0bb1ccbb3c39cf8b3113581b5514b127023bbe0e864992c57e79346053" + license "Zlib" + head "https://github.com/kimci86/bkcrack.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f1e3072a7939eced9fa14731cd317886d42495018642b18fa1759efb759de3b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bef4cdf4614b7dee8af98a480523946f4fcc226f513ce1f82878655c05bef0a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "caf161efd7323878ac616aacf0d95865f6f0089ac871f586de8af139c9192f1f" + sha256 cellar: :any_skip_relocation, sonoma: "8123340e60ab3ec3f3876831311f1f5f915ac9e1e753cf45ac9a3a8947c89e62" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f6437c1bc9e24a70cff2fb2e75e44314f3b4cf17f82880fc1c342ed99f4bf19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b5b5e60a8ab8173b6ac1c6058a39f8cb118e2fc4c1b7de1b9bd896394d1b109" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/src/bkcrack" + pkgshare.install "example" + end + + test do + output = shell_output("#{bin}/bkcrack -L #{pkgshare}/example/secrets.zip") + assert_match "advice.jpg", output + assert_match "spiral.svg", output + + assert_match version.to_s, shell_output("#{bin}/bkcrack --help") + end +end diff --git a/Formula/b/bkmr.rb b/Formula/b/bkmr.rb new file mode 100644 index 0000000000000..8290b88829df8 --- /dev/null +++ b/Formula/b/bkmr.rb @@ -0,0 +1,44 @@ +class Bkmr < Formula + desc "Unified CLI Tool for Bookmark, Snippet, and Knowledge Management" + homepage "https://github.com/sysid/bkmr" + url "https://github.com/sysid/bkmr/archive/refs/tags/v6.2.6.tar.gz" + sha256 "7cdb4fd78b4a75995f0009529110d58246b301f2da00a616ba976c27d46c5ac3" + license "BSD-3-Clause" + head "https://github.com/sysid/bkmr.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2d81612c3dddf1f7a3d5ae180b1aefb4e1b0ab60e6b8628f0ac79964e1991a23" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "de39d1c0f032541a97a7a1e3a00e7e99049ecf144993fab665bb0b51f1682d6c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "541c3bfc949f6a2323d34f05d018b178e6d370b2f52efbb6a9c366f4cda538e4" + sha256 cellar: :any_skip_relocation, sonoma: "2dc42ee0cafed4940745c38b4c380296c0bf507154be48c342cc21610aeac13b" + sha256 cellar: :any_skip_relocation, arm64_linux: "68a06a4bc37ea70ab47c9f93fb9fefba3e3a4eeb3631328a8d007629004bc987" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9086484514a1a46028ce7a10aba54e572007119d02a0b8ea3d9284be74dcced" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "python" + + def install + cd "bkmr" do + # Ensure that the `openssl` crate picks up the intended library. + # https://docs.rs/openssl/latest/openssl/#manual + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + + system "cargo", "install", *std_cargo_args + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/bkmr --version") + + expected_output = "The configured database does not exist" + assert_match expected_output, shell_output("#{bin}/bkmr info 2>&1", 1) + end +end diff --git a/Formula/b/bkt.rb b/Formula/b/bkt.rb new file mode 100644 index 0000000000000..9edd9fdaf3492 --- /dev/null +++ b/Formula/b/bkt.rb @@ -0,0 +1,32 @@ +class Bkt < Formula + desc "CLI utility for caching the output of subprocesses" + # Original homepage `https://www.bkt.rs` is down + homepage "https://github.com/dimo414/bkt" + url "https://github.com/dimo414/bkt/archive/refs/tags/0.8.2.tar.gz" + sha256 "d9128a13070ebc564bcc70210062bdd60eb757fd0f5d075c50e9aa7f714c6562" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "63eb81ed48ddba2a9a0cf8c6b1f03f248056c8b0c2bdac579337b7bc885c16a1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b10047b912e99a0490844b80c06ad838dd05f85ff7e9e87f5c25447993b72ce7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc1910c62ee9d66bb773f0633106edb03345905393999a29f056ab59b570e583" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ead41eec54fe52160bacbcd5305a521e7704c5fc6b19082aebb03163d0b02ab" + sha256 cellar: :any_skip_relocation, sonoma: "fef406248481dabdb5e53ad4eb26be1f6984dbb261597a4f02e34a410d0b5141" + sha256 cellar: :any_skip_relocation, ventura: "4d516657009e7793b2f9e2e3ee08a9349d613346481b4f03581f1cfd4a948851" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce52b4cc601ae6bf230294309f3d972a63e1f63f5eec90964a64c374696e04e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f933949ff5c0945bc66c55380e42ca9e96d4292c241ba2ed8a147ea35e4b0a0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Make sure date output is cached between runs + output1 = shell_output("#{bin}/bkt --ttl=1m -- date +%s.%N") + sleep(1) + assert_equal output1, shell_output("#{bin}/bkt --ttl=1m -- date +%s.%N") + end +end diff --git a/Formula/b/black.rb b/Formula/b/black.rb new file mode 100644 index 0000000000000..031b9b93bd8a9 --- /dev/null +++ b/Formula/b/black.rb @@ -0,0 +1,133 @@ +class Black < Formula + include Language::Python::Virtualenv + + desc "Python code formatter" + homepage "https://black.readthedocs.io/en/stable/" + url "https://files.pythonhosted.org/packages/4b/43/20b5c90612d7bdb2bdbcceeb53d588acca3bb8f0e4c5d5c751a2c8fdd55a/black-25.9.0.tar.gz" + sha256 "0474bca9a0dd1b51791fcc507a4e02078a1c63f6d4e4ae5544b9848c7adfb619" + license "MIT" + head "https://github.com/psf/black.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "384a3d06a57bdc246ca9a8ec140645e63c229142e9b82fb9dad9039dd092c3f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3622c57a2a1ad5d636e0987fd0878adecd6d553d85c9660be9ae18351fc4733c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6f041c8faa32859df0caf06d5ce9c7dd41f6410c64cc474c13c7bb6f71b2b33" + sha256 cellar: :any_skip_relocation, sonoma: "277843871aec23c16d753a6e0ecb32c349b64b378c8f2a131e65985c81f7e573" + sha256 cellar: :any_skip_relocation, arm64_linux: "6656b8c84bb388ce8c7c2aac0a8ce64fd10fd12d7f1377a3cb3e394bf5e7c591" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc52daf4e29cb780e6478e8578e9653e8ae398c47d1478b59ecd0ac0b2500b86" + end + + depends_on "python@3.14" + + pypi_packages package_name: "black[d]" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pytokens" do + url "https://files.pythonhosted.org/packages/30/5f/e959a442435e24f6fb5a01aec6c657079ceaca1b3baf18561c3728d681da/pytokens-0.1.10.tar.gz" + sha256 "c9a4bfa0be1d26aebce03e6884ba454e842f186a59ea43a6d3b25af58223c044" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + ENV["HATCH_BUILD_HOOK_ENABLE_MYPYC"] = "1" + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"black", shell_parameter_format: :click) + end + + service do + run opt_bin/"blackd" + keep_alive true + require_root true + working_dir HOMEBREW_PREFIX + log_path var/"log/blackd.log" + error_log_path var/"log/blackd.log" + end + + test do + assert_match "compiled: yes", shell_output("#{bin}/black --version") + + ENV["LC_ALL"] = "en_US.UTF-8" + (testpath/"black_test.py").write <<~PYTHON + print( + 'It works!') + PYTHON + system bin/"black", "black_test.py" + assert_equal 'print("It works!")', (testpath/"black_test.py").read.strip + + port = free_port + spawn bin/"blackd", "--bind-host=127.0.0.1", "--bind-port=#{port}" + sleep 10 + output = shell_output("curl -s -XPOST localhost:#{port} -d \"print('valid')\"").strip + assert_match 'print("valid")', output + end +end diff --git a/Formula/b/blackbox.rb b/Formula/b/blackbox.rb new file mode 100644 index 0000000000000..8ad0382f6b1ab --- /dev/null +++ b/Formula/b/blackbox.rb @@ -0,0 +1,52 @@ +class Blackbox < Formula + desc "Safely store secrets in Git/Mercurial/Subversion" + homepage "https://github.com/StackExchange/blackbox" + url "https://github.com/StackExchange/blackbox/archive/refs/tags/v1.20220610.tar.gz" + sha256 "f1efcca6680159f244eb44fdb78e92b521760b875fa5a36e4c433b93ed0f87c1" + license "MIT" + version_scheme 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)*\.\d{6,8}(?:\.\d+)*)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "55abf9c858ccaf04d8ab764718fa5810f09adb66c150ae3a9f263622a1cae753" + end + + depends_on "gnupg" + + def install + libexec.install Dir["bin/*"] + bin.write_exec_script Dir[libexec/"*"].select { |f| File.executable? f } + end + + test do + (testpath/"batch.gpg").write <<~EOS + Key-Type: RSA + Key-Length: 2048 + Subkey-Type: RSA + Subkey-Length: 2048 + Name-Real: Testing + Name-Email: testing@foo.bar + Expire-Date: 1d + %no-protection + %commit + EOS + begin + system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" + system "git", "init" + system bin/"blackbox_initialize", "yes" + add_created_key = shell_output("#{bin}/blackbox_addadmin Testing 2>&1") + assert_match "", add_created_key + ensure + system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" + system Formula["gnupg"].opt_bin/"gpgconf", "--homedir", "keyrings/live", + "--kill", "gpg-agent" + end + end +end diff --git a/Formula/b/blades.rb b/Formula/b/blades.rb new file mode 100644 index 0000000000000..7d4f0c71afd2f --- /dev/null +++ b/Formula/b/blades.rb @@ -0,0 +1,45 @@ +class Blades < Formula + desc "Blazing fast dead simple static site generator" + homepage "https://www.getblades.org/" + url "https://github.com/grego/blades/archive/refs/tags/v0.6.0.tar.gz" + sha256 "6bcce947580243e83a9bf4d6ec4afbc7e6cd0c7541a16d904c7d4f1314036bd0" + license "GPL-3.0-or-later" + head "https://github.com/grego/blades.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "30c379b57bb8030e4a7502c73c8a7046e9809738f3027e761af11b23dda24536" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8cbe0edc427152920ea102e09fcf88f0807f787c019202090c22d32c5a827af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d39a8da1d1fbf7021ef3397567424f8043620a190fb444113a9816ddab1263f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "862697809bf4f3d34508e1e825583959cefeba8ae081a41e877659087786dba6" + sha256 cellar: :any_skip_relocation, sonoma: "d18112bcddc915b81b66db803ffe3d0c221d618f0f1c27e7bdab6beb04b776a9" + sha256 cellar: :any_skip_relocation, ventura: "bd2f938978247d08a419276e60f361805b9bf24ffc64091bc21830887f184297" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d77d91ea173c7fc7a50c2c6f8dafe1f5b93710f2d085e8f90579d0718c63530" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cdae37930e4d9629f7744b9e3fc74b64ddf5eb17d109165419b8f6a3089c00c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/blades version") + + require "expect" + require "pty" + + timeout = 5 + PTY.spawn(bin/"blades", "init") do |r, w, pid| + refute_nil r.expect("Name:", timeout), "Expected name input" + w.write "brew\r" + refute_nil r.expect("Author:", timeout), "Expected author input" + w.write "test\r" + w.write "Y\r" # `Start with a minimal working template?` + Process.wait pid + end + + assert_path_exists testpath/"content" + assert_match "title = \"brew\"", (testpath/"Blades.toml").read + end +end diff --git a/Formula/b/blahtexml.rb b/Formula/b/blahtexml.rb new file mode 100644 index 0000000000000..e5f24bf33b4cf --- /dev/null +++ b/Formula/b/blahtexml.rb @@ -0,0 +1,42 @@ +class Blahtexml < Formula + desc "Converts equations into Math ML" + homepage "https://github.com/gvanas/blahtexml" + url "https://github.com/gvanas/blahtexml/archive/refs/tags/v1.0.tar.gz" + sha256 "ef746642b1371f591b222ce3461c08656734c32ad3637fd0574d91e83995849e" + license "BSD-3-Clause" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ff3728fa3b6cd2729e13bf73a0f4bf9bd7be61b9296f3ec524a9898a4722a256" + sha256 cellar: :any, arm64_sequoia: "60f47cf24ae5bd4f52cf4aa2030b663593416a2af1a4cb8777eb62c9c372b6f6" + sha256 cellar: :any, arm64_sonoma: "e82e2cc31b503539d5db79bd19954cbfe6f7fbcfaea9ba16a28a57b83289f68a" + sha256 cellar: :any, arm64_ventura: "3a9444e47913a2712d6ebb56557368a847a25f597c6814ff8665ff6acdb3157b" + sha256 cellar: :any, sonoma: "98a072e29a975511bf7ccd60a9f701b15c6fe1d14a9756dfd36db003fc79d3b6" + sha256 cellar: :any, ventura: "33b2552f46a52197ba7964e9ad863ac7aa021843c3aa35af47e2d2dcdcfe9ed7" + sha256 cellar: :any_skip_relocation, arm64_linux: "647ed1ee2095b2c6c37fdbdcda7e448ed8df07f34779a03e79dd0763f5acca8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3931e63cdf1ec35393bc437441f1edc43413ba92760a1497de59a59fcc70e5bf" + end + + depends_on "xerces-c" + + def install + ENV.cxx11 + if OS.mac? + system "make", "blahtex-mac" + system "make", "blahtexml-mac" + else + system "make", "blahtex-linux" + system "make", "blahtexml-linux" + end + bin.install "blahtex" + bin.install "blahtexml" + end + + test do + input = '\sqrt{x^2+\alpha}' + output = pipe_output("#{bin}/blahtex --mathml", input, 0) + assert_match "x2 :build + + def install + system "cmake", "-S", "c", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + #include + + int main(void) { + blake3_hasher hasher; + blake3_hasher_init(&hasher); + + unsigned char buf[65536]; + while (1) { + ssize_t n = read(STDIN_FILENO, buf, sizeof(buf)); + if (n > 0) { + blake3_hasher_update(&hasher, buf, n); + } else if (n == 0) { + break; // end of file + } else { + fprintf(stderr, "read failed: %s\\n", strerror(errno)); + exit(1); + } + } + + uint8_t output[BLAKE3_OUT_LEN]; + blake3_hasher_finalize(&hasher, output, BLAKE3_OUT_LEN); + + for (size_t i = 0; i < BLAKE3_OUT_LEN; i++) { + printf("%02x", output[i]); + } + printf("\\n"); + return 0; + } + C + (testpath/"input.txt").write <<~EOS + content + EOS + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lblake3", "-o", "test" + output = shell_output("./test :build + uses_from_macos "bzip2" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + conflicts_with "proj", because: "both install a `libproj.a` library" + + def install + cd "c++" do + # Remove bundled libraries to make sure the brew/system libraries are used + %w[compress/bzip2 compress/zlib lmdb regexp].each do |lib_subdir| + rm_r("include/util/#{lib_subdir}") if lib_subdir != "regexp" + rm_r("src/util/#{lib_subdir}") + end + rm_r(Dir["include/util/regexp/*"] - ["include/util/regexp/ctre"]) + + # Remove Cloudflare zlib on arm64 linux as it requires a minimum of armv8-a+crc + # TODO: re-enable if we increase our minimum march to require crc + if Hardware::CPU.arm? && OS.linux? + rm_r("include/util/compress/zlib_cloudflare") + rm_r("src/util/compress/zlib_cloudflare") + inreplace "src/build-system/Makefile.mk.in" do |s| + cmprs_lib = s.get_make_var("CMPRS_LIB").split + cmprs_lib.delete("zcf") + s.change_make_var! "CMPRS_LIB", cmprs_lib.join(" ") + end + end + + # Boost is only used for unit tests. + args = %W[ + --prefix=#{prefix} + --with-bin-release + --with-mbedtls=#{Formula["mbedtls"].opt_prefix} + --with-mt + --with-pcre2=#{Formula["pcre2"].opt_prefix} + --without-strip + --with-experimental=Int8GI + --without-debug + --without-boost + --without-internal + ] + + if OS.mac? + # Allow SSE4.2 on some platforms. The --with-bin-release sets --without-sse42 + args << "--with-sse42" if Hardware::CPU.intel? && MacOS.version.requires_sse42? + args += ["OPENMP_FLAGS=-Xpreprocessor -fopenmp", + "LDFLAGS=-lomp"] + end + + system "./configure", *args + + # Fix the error: install: ReleaseMT/lib/*.*: No such file or directory + system "make" + system "make", "install" + end + end + + test do + output = shell_output("#{bin}/update_blastdb.pl --showall") + assert_match "nt", output + + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + output = shell_output("#{bin}/blastn -query test.fasta -subject test.fasta") + assert_match "Identities = 70/70", output + + # Create BLAST database + output = shell_output("#{bin}/makeblastdb -in test.fasta -out testdb -dbtype nucl") + assert_match "Adding sequences from FASTA", output + + # Check newly created BLAST database + output = shell_output("#{bin}/blastdbcmd -info -db testdb") + assert_match "Database: test", output + end +end diff --git a/Formula/b/blastem.rb b/Formula/b/blastem.rb new file mode 100644 index 0000000000000..fa0d737422a66 --- /dev/null +++ b/Formula/b/blastem.rb @@ -0,0 +1,94 @@ +class Blastem < Formula + desc "Fast and accurate Genesis emulator" + homepage "https://www.retrodev.com/blastem/" + license "GPL-3.0-or-later" + revision 2 + head "https://www.retrodev.com/repos/blastem", using: :hg + + stable do + url "https://www.retrodev.com/repos/blastem/archive/v0.6.2.tar.gz" + sha256 "d460632eff7e2753a0048f6bd18e97b9d7c415580c358365ff35ac64af30a452" + + depends_on arch: :x86_64 + + # Convert Python 2 script to Python 3. Remove with next release. + patch do + url "https://www.retrodev.com/repos/blastem/raw-rev/dbbf0100f249" + sha256 "e332764bfa08e08e0f9cbbebefe73b88adb99a1e96a77a16a0aeeae827ac72ff" + end + + # Fix build with -fno-common which is default in GCC 10+. Remove with next release. + patch do + on_linux do + url "https://www.retrodev.com/repos/blastem/raw-rev/e45a317802bd" + sha256 "8f869909df6eb66375eea09dde806422aa007aee073d557b774666f51c2e40dd" + end + end + end + + livecheck do + url "https://www.retrodev.com/repos/blastem/json-tags" + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :json do |json, regex| + json["tags"]&.map do |item| + match = item["tag"]&.match(regex) + next if match.blank? + + match[1] + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, sonoma: "6686aacd3cbb57870b7d0da4f17d3c325a846c7037366033d618457700f905da" + sha256 cellar: :any, ventura: "ed520887413f414355cd6ff7b7e7b000373f26446aa1ad9de623e081d8b1f116" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5eab5dbc561f5f5d8db17092c140fab888ab1c52b8437bb122e8204e60304c4e" + end + + depends_on "imagemagick" => :build + depends_on "pillow" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "glew" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_macos do + # Can be undeprecated if upstream decides to support arm64 macOS + deprecate! date: "2025-09-28", because: "is unsupported, https://docs.brew.sh/Support-Tiers#future-macos-support" + disable! date: "2026-09-28", because: "is unsupported, https://docs.brew.sh/Support-Tiers#future-macos-support" + end + + on_linux do + depends_on "mesa" + end + + resource "vasm" do + url "http://phoenix.owl.de/tags/vasm1_8i.tar.gz" + sha256 "9ae0b37bca11cae5cf00e4d47e7225737bdaec4028e4db2a501b4eca7df8639d" + end + + def install + resource("vasm").stage do + system "make", "CPU=m68k", "SYNTAX=mot" + (buildpath/"tool").install "vasmm68k_mot" + end + ENV.prepend_path "PATH", buildpath/"tool" + + # Use imagemagick to convert XCF files instead of xcftools, which is unmaintained and broken. + # Fix was sent to upstream developer. + inreplace "Makefile", "xcf2png $< > $@", "convert $< $@" if build.stable? + + system "make", "all", "menu.bin", "HOST_ZLIB=1" + libexec.install %w[blastem default.cfg menu.bin rom.db shaders] + bin.write_exec_script libexec/"blastem" + end + + test do + assert_equal "blastem #{version}", shell_output("#{bin}/blastem -b 1 -v").chomp + end +end diff --git a/Formula/b/blaze.rb b/Formula/b/blaze.rb new file mode 100644 index 0000000000000..b491ed9ddb2ff --- /dev/null +++ b/Formula/b/blaze.rb @@ -0,0 +1,66 @@ +class Blaze < Formula + desc "High-performance C++ math library for dense and sparse arithmetic" + homepage "https://bitbucket.org/blaze-lib/blaze" + url "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.8.2.tar.gz" + sha256 "4c4e1915971efbedab95790e4c5cf017d8448057fa8f8c62c46e1643bf72cbb1" + license "BSD-3-Clause" + head "https://bitbucket.org/blaze-lib/blaze.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f564399ba9c93c4246e3cf3679b5b49661edb3ad9077afab40f94c220e6d49c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a80081c26f45e68615e6ef2dcde4f354ee8dc05cf2744d20d75efee48f7e7864" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "808bf2b3fe945e77161aa0878ab93310708d2c1417a437940f4b3fb72f729822" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7517ce89404f505648d0a6c8581bee0037e03dbe9e2ff59a46ea331bbe03bbe3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e47ffe3bc0d4b023cb6aeb3a368b3758daa8f06fab8c5b701eb5e30733591bf2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e47ffe3bc0d4b023cb6aeb3a368b3758daa8f06fab8c5b701eb5e30733591bf2" + sha256 cellar: :any_skip_relocation, sonoma: "7db24bba973ce27f8e880f789e40d69fa6fa72397b82c2684c4571ad10d79d10" + sha256 cellar: :any_skip_relocation, ventura: "cdb1e443ad562ea1318c56b0aa3aa0851b3a61706937dea50e5a9b93d9c97889" + sha256 cellar: :any_skip_relocation, monterey: "cdb1e443ad562ea1318c56b0aa3aa0851b3a61706937dea50e5a9b93d9c97889" + sha256 cellar: :any_skip_relocation, big_sur: "cdb1e443ad562ea1318c56b0aa3aa0851b3a61706937dea50e5a9b93d9c97889" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd2428d2baba5bb1a0ee1ff74c7dc1c106d3f809306d9d0de5b271e84797b4a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0ca0507adf1a1c979a0446130bff037163e335a12cd8d0517cd83b1209ce206" + end + + depends_on "cmake" => :build + depends_on "openblas" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + blaze::DynamicMatrix A( 2UL, 3UL, 0 ); + A(0,0) = 1; + A(0,2) = 4; + A(1,1) = -2; + + blaze::StaticMatrix B{ + { 3, -1 }, + { 0, 2 }, + { -1, 0 } + }; + + blaze::DynamicMatrix C = A * B; + std::cout << "C =\\n" << C; + } + CPP + + expected = <<~EOS + C = + ( -1 -1 ) + ( 0 -4 ) + EOS + + system ENV.cxx, "test.cpp", "-std=c++14", "-I#{include}", "-o", "test" + assert_equal expected, shell_output(testpath/"test") + end +end diff --git a/Formula/b/blazeblogger.rb b/Formula/b/blazeblogger.rb new file mode 100644 index 0000000000000..f6f5d922f13c8 --- /dev/null +++ b/Formula/b/blazeblogger.rb @@ -0,0 +1,28 @@ +class Blazeblogger < Formula + desc "CMS for the command-line" + homepage "http://blaze.blackened.cz/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/blazeblogger/blazeblogger-1.2.0.tar.gz" + sha256 "39024b70708be6073e8aeb3943eb3b73d441fbb7b8113e145c0cf7540c4921aa" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "4f76e3eb4cb3ab302fdf746ec68a54f42422913c10916429788affadad93209c" + end + + def install + # https://code.google.com/p/blazeblogger/issues/detail?id=51 + ENV.deparallelize + system "make", "install", "prefix=#{prefix}", "compdir=#{prefix}" + end + + test do + system bin/"blaze", "init" + system bin/"blaze", "config", "blog.title", "Homebrew!" + system bin/"blaze", "make" + assert_path_exists testpath/"default.css" + assert_match "Homebrew!", File.read(".blaze/config") + end +end diff --git a/Formula/b/blazegraph.rb b/Formula/b/blazegraph.rb new file mode 100644 index 0000000000000..a276717b0e05c --- /dev/null +++ b/Formula/b/blazegraph.rb @@ -0,0 +1,44 @@ +class Blazegraph < Formula + desc "Graph database supporting RDF data model, Sesame, and Blueprint APIs" + homepage "https://blazegraph.com/" + url "https://github.com/blazegraph/database/releases/download/BLAZEGRAPH_RELEASE_2_1_5/blazegraph.jar" + version "2.1.5" + sha256 "fbaeae7e1b3af71f57cfc4da58b9c52a9ae40502d431c76bafa5d5570d737610" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3f006e1ce3a63d62b14b3274a11417ac02fa7585e5036bcba32fe4264deda8e3" + end + + # see https://github.com/blazegraph/database/issues/196 + # 2.1.6 release in rc phase for four years + deprecate! date: "2024-07-26", because: :unmaintained + disable! date: "2025-07-26", because: :unmaintained + + # Dependencies can be lifted in the upcoming release, > 2.1.5 + depends_on "openjdk@8" + + def install + libexec.install "blazegraph.jar" + bin.write_jar_script libexec/"blazegraph.jar", "blazegraph", java_version: "1.8" + end + + service do + run opt_bin/"blazegraph" + require_root true + working_dir opt_prefix + end + + test do + ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" + + server = fork do + exec bin/"blazegraph" + end + sleep 5 + Process.kill("TERM", server) + assert_path_exists testpath/"blazegraph.jnl" + assert_path_exists testpath/"rules.log" + end +end diff --git a/Formula/b/blink.rb b/Formula/b/blink.rb new file mode 100644 index 0000000000000..f9f8436f5aadc --- /dev/null +++ b/Formula/b/blink.rb @@ -0,0 +1,45 @@ +class Blink < Formula + desc "Tiniest x86-64-linux emulator" + homepage "https://github.com/jart/blink" + url "https://github.com/jart/blink/archive/refs/tags/1.1.0.tar.gz" + sha256 "2649793e1ebf12027f5e240a773f452434cefd9494744a858cd8bff8792dba68" + license "ISC" + head "https://github.com/jart/blink.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f2fd0aa42196ee52060b934e6a3be257ad1326c062c8fa83bc6bf3888f38aec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bcc500f8fe348d17be88e78813f689ad5f27a065db6112f5fa7e867e7c7f0139" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3682378ea5beb74906a12760147ddcae882095aa4a183f4fb328994ef9f8bb64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd18d0ceff9589f1ad6ea1dc5183c5c61f0234705d7789f6b26df8a47d830d94" + sha256 cellar: :any_skip_relocation, sonoma: "bcca9fdf32d372f26ef410994a397e00d2c0ad337b32bfc397dffb5d8e9c831d" + sha256 cellar: :any_skip_relocation, ventura: "c6bf3d3adff77c984c9966cee9df01f2962fa1781d591dbe0de0a81666762812" + sha256 cellar: :any_skip_relocation, arm64_linux: "ceddcd34e8f3929aacd7c139f86ca385e3a758417989d865b34a61437fbfc2ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae5240313e012eedfe56836839f4becd32fa8e3d22b690d1728aae141bb40025" + end + + depends_on "make" => :build # Needs Make 4.0+ + depends_on "pkgconf" => :build + uses_from_macos "zlib" + + def install + # newer linker cause issue as `pointer not aligned at _kWhence+0x4` + # upstream bug report, https://github.com/jart/blink/issues/166 + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--prefix=#{prefix}", "--enable-vfs" + # Call `make` as `gmake` to use Homebrew `make`. + system "gmake" # must be separate steps. + system "gmake", "install" + end + + test do + stable.stage testpath + ENV["BLINK_PREFIX"] = testpath + goodhello = "third_party/cosmo/goodhello.elf" + chmod "+x", goodhello + system bin/"blink", "-m", goodhello + end +end diff --git a/Formula/b/blink1.rb b/Formula/b/blink1.rb new file mode 100644 index 0000000000000..5d79cf40f1be5 --- /dev/null +++ b/Formula/b/blink1.rb @@ -0,0 +1,44 @@ +class Blink1 < Formula + desc "Control blink(1) indicator light" + homepage "https://blink1.thingm.com/" + url "https://github.com/todbot/blink1-tool.git", + tag: "v2.3.0", + revision: "69561a9ed9e83ff67c95cc70187c394150f51cd5" + license "CC-BY-SA-3.0" + head "https://github.com/todbot/blink1-tool.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cc077a783b0098ec7c0f91651c47773bb18da79831ad129aae0335f7ca644aac" + sha256 cellar: :any, arm64_sequoia: "2b04cc8a396b2f1d9ac01c7558fc56fc27b72792cb148f686e87298c638f29d8" + sha256 cellar: :any, arm64_sonoma: "6087adc4630ab9c242a9e2c89ce806ba069b9668fa2d19b270a94fd8f9c448fe" + sha256 cellar: :any, arm64_ventura: "12acc8c268141ffab31dd4e748d99e157d3c6708924aa06cee2afe6da3cbf576" + sha256 cellar: :any, arm64_monterey: "6aaa7efbcc86913250293edca2410848c30e01bf1e0ef70efd798fcd9c893ca8" + sha256 cellar: :any, arm64_big_sur: "9e57a3c3f96ad7a97056aebfeadb075a5471fe43fa078f4e7f02fdebc3582979" + sha256 cellar: :any, sonoma: "aa578663e46f8a7c9ab81195093a3bc3ab0ec33e751a0df894bf6309f23a1206" + sha256 cellar: :any, ventura: "e6fca6c6f10af9f3233262e7dd50f0a126f73c49288f0f27db5e4e4365bacdc3" + sha256 cellar: :any, monterey: "23bc96b6e6a9b1e9b0abdacc11033c85cd680a7ca3fc51836ebaadeb0e4be373" + sha256 cellar: :any, big_sur: "dfbcb34a56386bd9ce68d770bfe3355c408ed0d93197f1f07da69e53312b01c8" + sha256 cellar: :any, catalina: "52a3d5efa444acbd4fe4a76ba38152513bdbfa7138d66e799401aeb0ac87af78" + sha256 cellar: :any_skip_relocation, arm64_linux: "7af7689b8df9e9719d45fd5bdd736c515445a476d1c3c50c7e219132e6fff6b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "947b96287a04a1ee9fbe4dd3e0316e084a3cb54a73dbeb411f59959c991dabc4" + end + + on_linux do + depends_on "pkgconf" => :build + depends_on "systemd" + end + + def install + system "make" + bin.install "blink1-tool" + include.install "blink1-lib.h" + library = OS.mac? ? "libBlink1.dylib" : "libblink1.so" + lib.install library + end + + test do + system bin/"blink1-tool", "--version" + end +end diff --git a/Formula/b/blis.rb b/Formula/b/blis.rb new file mode 100644 index 0000000000000..a8792b5e9ca59 --- /dev/null +++ b/Formula/b/blis.rb @@ -0,0 +1,85 @@ +class Blis < Formula + desc "BLAS-like Library Instantiation Software Framework" + homepage "https://github.com/flame/blis" + url "https://github.com/flame/blis/archive/refs/tags/2.0.tar.gz" + sha256 "08bbebd77914a6d1a43874ae5ec2f54fe6a77cba745f2532df28361b0f1ad1b3" + license "BSD-3-Clause" + head "https://github.com/flame/blis.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ae5b40dcc1bb83dcc0742f24a1bfe0991bc3a349d34aa329a0b12f88b2b880fe" + sha256 cellar: :any, arm64_sequoia: "461fd80b3bd293dffab9b1a1ed90a35ef4c9b2f6f3546bc44fa06411681871dd" + sha256 cellar: :any, arm64_sonoma: "91e2bd552c5f1df187fdee979635b0c87ce5ea700127ec2110ef16da2ea005dd" + sha256 cellar: :any, sonoma: "a6f83d702d2ca94890919df8c80e998a874846677d9c6131358e10f5c03bdb35" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c654866bff3d54735f76b81eb0318d3d85727b3224c84c95f7e4a3db851593b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f201ae6efcebd05d84ae5360d95bffa2871344f6384a92be7019948429704776" + end + + uses_from_macos "python" => :build + + on_macos do + depends_on "libomp" + patch :DATA # patch to use libomp when CC=clang as common.mk is installed + end + + def install + # https://github.com/flame/blis/blob/master/docs/ConfigurationHowTo.md + ENV.runtime_cpu_detection + config = if !build.bottle? + "auto" + elsif OS.mac? + # For Apple Silicon, we can optimize using the dedicated "firestorm" config. + # For Intel Macs, we build multiple Intel x86_64 to allow runtime optimization. + Hardware::CPU.arm? ? "firestorm" : "intel64" + else + # For x86_64 Linux, we build full "x86_64" family with Intel and AMD processors. + Hardware::CPU.arch + end + + system "./configure", "--prefix=#{prefix}", "--enable-cblas", "--enable-threading=openmp", config + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include "blis/blis.h" + + int main(void) { + int i; + double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; + cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); + for (i = 0; i < 9; i++) + printf("%lf ", C[i]); + printf("\\n"); + if (fabs(C[0]-11) > 1.e-5) abort(); + if (fabs(C[4]-21) > 1.e-5) abort(); + return 0; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{include}", "-L#{lib}", "-lblis", "-lm" + system "./test" + end +end + +__END__ +--- a/common.mk ++++ b/common.mk +@@ -989,8 +989,8 @@ ifeq ($(CC_VENDOR),clang) + #THREADING_MODEL := pthreads + #endif + ifneq ($(findstring openmp,$(THREADING_MODEL)),) +-CTHREADFLAGS += -fopenmp +-LDFLAGS += -fopenmp ++CTHREADFLAGS += -I@@HOMEBREW_PREFIX@@/opt/libomp/include -Xpreprocessor -fopenmp ++LDFLAGS += -L@@HOMEBREW_PREFIX@@/opt/libomp/lib -lomp + endif + ifneq ($(findstring pthreads,$(THREADING_MODEL)),) + CTHREADFLAGS += -pthread diff --git a/Formula/b/blisp.rb b/Formula/b/blisp.rb new file mode 100644 index 0000000000000..d9467abcfe031 --- /dev/null +++ b/Formula/b/blisp.rb @@ -0,0 +1,46 @@ +class Blisp < Formula + desc "ISP tool & library for Bouffalo Labs RISC-V Microcontrollers and SoCs" + homepage "https://github.com/pine64/blisp" + url "https://github.com/pine64/blisp/archive/refs/tags/v0.0.5.tar.gz" + sha256 "79f87fbbb66f1d9ddf250cdc15dc16638d95e0905665003b08920a4b1fda9f96" + license "MIT" + head "https://github.com/pine64/blisp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6848a685d16c4a25a770a11a1059474540579f47a0af7b87bd0a907c3fc70275" + sha256 cellar: :any, arm64_sequoia: "ff28997c11bce2736f54cdb6e31fae1ef5ba7637443203d29ce8b7b5d947cfce" + sha256 cellar: :any, arm64_sonoma: "b034d4d4510b4d817547caf94730a1a6262608759849ea5782c957b4e8bc157a" + sha256 cellar: :any, arm64_ventura: "8429a988fc4858c21db8bbb87150e1aad7d1d11a306d4a90566c831f3b9b3dcc" + sha256 cellar: :any, sonoma: "67b1c5420ba76d82760abab0fafa97b343aeba0331a086ab755262f5165c3b1f" + sha256 cellar: :any, ventura: "185fa7b68d7301e70936fb7b0740a9e672ba89ff9fe51780febd8ebffd33247b" + sha256 cellar: :any_skip_relocation, arm64_linux: "473ecf51999b00ebacaaa0950602ccd9fa544fbabc13c2a912e4a9b5475b6a52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec80b8a1aa1b9271d6600f34e3d1e7de3ce029d7a87e232787d3e5f7e9405496" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "argtable3" + depends_on "libserialport" + + def install + args = %w[ + -DBLISP_USE_SYSTEM_LIBRARIES=ON + -DBLISP_BUILD_CLI=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # workaround for fixing the header installations, + # should be fixed with a new release, https://github.com/pine64/blisp/issues/67 + include.install Dir[lib/"blisp*.h"] + end + + test do + output = shell_output("#{bin}/blisp write -c bl70x --reset Pinecilv2_EN.bin 2>&1", 11) + assert_match "Input firmware not found: Pinecilv2_EN.bin", output + + assert_match version.to_s, shell_output("#{bin}/blisp --version") + end +end diff --git a/Formula/b/blitz.rb b/Formula/b/blitz.rb new file mode 100644 index 0000000000000..a072674e93efd --- /dev/null +++ b/Formula/b/blitz.rb @@ -0,0 +1,61 @@ +class Blitz < Formula + desc "Multi-dimensional array library for C++" + homepage "https://github.com/blitzpp/blitz/wiki" + url "https://github.com/blitzpp/blitz/archive/refs/tags/1.0.2.tar.gz" + sha256 "500db9c3b2617e1f03d0e548977aec10d36811ba1c43bb5ef250c0e3853ae1c2" + license "Artistic-2.0" + head "https://github.com/blitzpp/blitz.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0980f40ce384ebf7abbb720f1761764fbfd3118085b50ecefe1fcdc740418f88" + sha256 cellar: :any, arm64_sequoia: "f5c76acfde9f6b4ff49baaaddad03106654788518afcebd6e15b1511c965fe92" + sha256 cellar: :any, arm64_sonoma: "c1ce7b13ac8453f28f88f8828e05210332135de7b38886318b1146b8ff7507c8" + sha256 cellar: :any, arm64_ventura: "c12b81ef4cb76e7ab76b557ef4a57ac431a6a39ab63bce8f1d786a6e2c316140" + sha256 cellar: :any, arm64_monterey: "3403559216a7fe96f965537612fdbe8852810870a54c2ba96b6c0d15c9d03726" + sha256 cellar: :any, arm64_big_sur: "0b04264665a05ca8b018a1f9b8e7452297d675b5bb5b50f49af2dd5176de462e" + sha256 cellar: :any, sonoma: "ae6ec0760dd9cc8addde2a038106fadb227e379a5a8f611333c2e2ed5eb480e6" + sha256 cellar: :any, ventura: "fd5d3fdf22093032fd588b6de174f4c55d7b34bba8badfab58a244bad118c34b" + sha256 cellar: :any, monterey: "d18fe13200228947c919659133af057d66da2ccbcbf65febd057a612b2014a8d" + sha256 cellar: :any, big_sur: "eaf888ad2387b3aabccdc8ba82104b942dfa91b058b335449a7bdeb26213ce7d" + sha256 cellar: :any, catalina: "2bfa3e5a52f0f51e9e02c84f10f804093b7080c158b3376f330dd51c0f9e3d23" + sha256 cellar: :any_skip_relocation, arm64_linux: "634d7e0692358f5c7b6fc9de0b4f553b52b244cfa13cd3e42a1dd0dc1ece06c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69b643943846376a48b8cf266f639fff523ad74430a2e784c2bfdfab21137179" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"testfile.cpp").write <<~CPP + #include + #include + + using namespace blitz; + int main(){ + Array A(3,1); + A = 17, 2, 97; + cout << "A = " << A << endl; + return 0;} + CPP + + system ENV.cxx, "testfile.cpp", "-o", "testfile" + output = shell_output("./testfile") + assert_match <<~EOS, output + A = (0,2) x (0,0) + [ 17\s + 2\s + 97 ] + EOS + end +end diff --git a/Formula/b/blitzwave.rb b/Formula/b/blitzwave.rb new file mode 100644 index 0000000000000..ebcd7b24b40c3 --- /dev/null +++ b/Formula/b/blitzwave.rb @@ -0,0 +1,54 @@ +class Blitzwave < Formula + desc "C++ wavelet library" + homepage "https://oschulz.github.io/blitzwave/" + url "https://github.com/oschulz/blitzwave/archive/refs/tags/v0.8.0.tar.gz" + sha256 "edb0b708a0587e77b8e0aa3387b44f4e838855c17e896a8277bb80fbe79b9a63" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "af9617a5b1ac77f4118d9bed451601510403a32d7e45c1c0b0c67073f36a724b" + sha256 cellar: :any, arm64_sequoia: "6ddfd2d5b7388e38647c23c2556e37258da48bbb0408290ccc1e54c5970fc68f" + sha256 cellar: :any, arm64_sonoma: "358c1c33c449b774875a06bd2ec0dd68d306bf7a829ca7b79cd69d4ba9616dcb" + sha256 cellar: :any, arm64_ventura: "76ae73757551645b65f9215711c26a43d6dc9ef8226d9812abbf032ee4092921" + sha256 cellar: :any, arm64_monterey: "d63c1a6c2d85a04ee6bd22f26895abac9fe84a818220437c80d56dd022826b45" + sha256 cellar: :any, sonoma: "d691bde9853f4c6d6b2655ba1c85bdbeb3cace6c803c5a7119558a188342a67e" + sha256 cellar: :any, ventura: "44d4e4c784f0ef1a896eebac068467b780e90e8e7e8ba38aa6caede688eb5bf5" + sha256 cellar: :any, monterey: "dcbb61c393f804b7edba2e42caaf7688df8b9693ce4f4956814089f407651c09" + sha256 cellar: :any, big_sur: "1e65e0e917a0454346801ea361b5186676150edc50f296abcb5f682456375589" + sha256 cellar: :any, catalina: "c048a4c11493ddfd5222bbfd25934fe4e7981fb7d689eddaef38ac06fa0d5b2d" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb6ebd0241d46c3083fe7c665d80af3a6222e9dc33aad7d23a7b8cd9770541dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "353fd7cf26dc62a4441d2a7498a7d947c163dd0994a9bc2d1da6ef8677525b39" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "blitz" + + # an automake tweak to fix compiling + # reported upstream: https://github.com/oschulz/blitzwave/issues/2 + patch :DATA + + def install + system "./autogen.sh" + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end +end + +__END__ +diff --git a/configure.ac b/configure.ac +index 8d28d78..2bfe06f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -8,6 +8,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror]) + AC_PROG_CXX + AC_LIBTOOL_DLOPEN + AC_PROG_LIBTOOL ++AM_PROG_AR + + AC_CHECK_PROGS(DOXYGEN, doxygen, false) + AM_CONDITIONAL([COND_DOXYGEN], [test "$DOXYGEN" != "false"]) diff --git a/Formula/b/bloaty.rb b/Formula/b/bloaty.rb new file mode 100644 index 0000000000000..743fd7bed56d4 --- /dev/null +++ b/Formula/b/bloaty.rb @@ -0,0 +1,58 @@ +class Bloaty < Formula + desc "Size profiler for binaries" + homepage "https://github.com/google/bloaty" + license "Apache-2.0" + revision 42 + head "https://github.com/google/bloaty.git", branch: "main" + + stable do + url "https://github.com/google/bloaty/releases/download/v1.1/bloaty-1.1.tar.bz2" + sha256 "a308d8369d5812aba45982e55e7c3db2ea4780b7496a5455792fb3dcba9abd6f" + + # Support system Abseil. Needed for Protobuf 22+. + # Backport of: https://github.com/google/bloaty/pull/347 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bloaty/system-abseil.patch" + sha256 "d200e08c96985539795e13d69673ba48deadfb61a262bdf49a226863c65525a7" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "540b073368aa5403c4f3842c0159187e1775a8b5eef8dd564179d38277e6e9fb" + sha256 cellar: :any, arm64_sequoia: "048ca4fdf23adb247adbe883437ff6a9d29b0c46b6b84dd0eae7f84b39e0e040" + sha256 cellar: :any, arm64_sonoma: "eab4853f79751d93764cb87491bbab3a401cc7155800382f82d6cc1ffa0e7446" + sha256 cellar: :any, sonoma: "ae2d1ee8e7b9502d5b4a86e5d320b8184238ce3b300a7abe7b7677db8a9274c9" + sha256 arm64_linux: "48924fbed0ebae06151e324b8085184084b8c788f4d1351737bfa72897eddfcb" + sha256 x86_64_linux: "2efb5b644e72f9175cae764a3ab17d9dfe110e11f4c077430f16d9df69896d9b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "capstone" + depends_on "protobuf" + depends_on "re2" + + def install + # https://github.com/protocolbuffers/protobuf/issues/9947 + ENV.append_to_cflags "-DNDEBUG" + # Remove vendored dependencies + %w[abseil-cpp capstone protobuf re2].each { |dir| rm_r(buildpath/"third_party"/dir) } + abseil_cxx_standard = 17 # Keep in sync with C++ standard in abseil.rb + if build.stable? + inreplace "CMakeLists.txt", "CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD #{abseil_cxx_standard}" + inreplace "CMakeLists.txt", "-std=c++11", "-std=c++17" + end + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_CXX_STANDARD=#{abseil_cxx_standard}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match(/100\.0%\s+(\d\.)?\d+(M|K)i\s+100\.0%\s+(\d\.)?\d+(M|K)i\s+TOTAL/, + shell_output("#{bin}/bloaty #{bin}/bloaty").lines.last) + end +end diff --git a/Formula/b/block-goose-cli.rb b/Formula/b/block-goose-cli.rb new file mode 100644 index 0000000000000..87a9eefc7d4bb --- /dev/null +++ b/Formula/b/block-goose-cli.rb @@ -0,0 +1,44 @@ +class BlockGooseCli < Formula + desc "Open source, extensible AI agent that goes beyond code suggestions" + homepage "https://block.github.io/goose/" + url "https://github.com/block/goose/archive/refs/tags/v1.12.1.tar.gz" + sha256 "3778400762dd8f1a09355cb84f151c7acd3a329f5c7c2fe1be0277862f9d20a3" + license "Apache-2.0" + head "https://github.com/block/goose.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d18d09118a78d1bcbebf862f87087d9c2b3678fdaaf2d8bd5c4e533c93715f0f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b492828afa30c69eb90d05d165914cc0e9aab21d215208a62cb251ddd75f48fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "210e13b0c17df3b6470b33fe306d4c51cadab40e550ce3248c71ed25153790cd" + sha256 cellar: :any_skip_relocation, sonoma: "b71e613b89d6c893a87e6db1055783363f968daa8d6c7a3513cec559ad25d4f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "80fa6e3e7436e71950c554c22b573f63a490270643d80a62f69b7c0a2a8f8f46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f4cf34e9dc8246f7ae8e4b73034842f7b34fd9972cc5236ceae138222e5c531" + end + + depends_on "pkgconf" => :build + depends_on "protobuf" => :build # for lance-encoding + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "dbus" + depends_on "libxcb" + end + + conflicts_with "goose", because: "both install `goose` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "crates/goose-cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/goose --version") + assert_match "goose Locations", shell_output("#{bin}/goose info") + end +end diff --git a/Formula/b/blockhash.rb b/Formula/b/blockhash.rb new file mode 100644 index 0000000000000..7a2e10b4549bf --- /dev/null +++ b/Formula/b/blockhash.rb @@ -0,0 +1,48 @@ +class Blockhash < Formula + desc "Perceptual image hash calculation tool" + homepage "https://github.com/commonsmachinery/blockhash" + url "https://github.com/commonsmachinery/blockhash/archive/refs/tags/v0.3.3.tar.gz" + sha256 "3c48af7bdb1f673b2f3c9f8c0bfa9107a7019b54ac3b4e30964bc0707debdd3a" + license "MIT" + revision 4 + head "https://github.com/commonsmachinery/blockhash.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "67363b29a30df42d320f72595bd81ce0dc7e41ec7cf0ec5f620bc90e6256a681" + sha256 cellar: :any, arm64_sequoia: "da404e78c996ce8a8cc0f39fb53c7b98de1df04a20f3f04224ef34d181d427e1" + sha256 cellar: :any, arm64_sonoma: "570d07a44d4c376152581378e09887c872ff761622c559dce4018466cb964c69" + sha256 cellar: :any, arm64_ventura: "702e383c365b207cb2100d72858ce30f40535e68122958bbb983d5f40052ebcd" + sha256 cellar: :any, sonoma: "549ec4cab23c30f91e09ac9bb552be96444915ded6cf8b038e215cb7a0396b16" + sha256 cellar: :any, ventura: "45c797c6b7554516ad75039b09aea8531253ab81c1a958bf55a1710fc0de5be2" + sha256 cellar: :any_skip_relocation, arm64_linux: "04e18532865185d071a00a063393586fe2af100b84f8e2124b230a5185504bf8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5281622fbde0603ec516b153e1a02e85d58e18c0074e4a6bc2b7df5670784aee" + end + + depends_on "pkgconf" => :build + depends_on "imagemagick" + + uses_from_macos "python" => :build + + def install + system "python3", "./waf", "configure", "--prefix=#{prefix}" + # pkg-config adds -fopenmp flag during configuring + # This fails the build on system clang, and OpenMP is not used in blockhash + inreplace "build/c4che/_cache.py", "-fopenmp", "" + system "python3", "./waf" + system "python3", "./waf", "install" + end + + test do + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/commonsmachinery/blockhash/ce08b465b658c4e886d49ec33361cee767f86db6/testdata/clipper_ship.jpg" + sha256 "a9f6858876adadc83c8551b664632a9cf669c2aea4fec0c09d81171cc3b8a97f" + end + + resource("homebrew-testdata").stage testpath + hash = "00007ff07ff07fe07fe67ff07560600077fe701e7f5e000079fd40410001ffff" + result = shell_output("#{bin}/blockhash #{testpath}/clipper_ship.jpg") + assert_match hash, result + end +end diff --git a/Formula/b/blocky.rb b/Formula/b/blocky.rb new file mode 100644 index 0000000000000..905253a5683c8 --- /dev/null +++ b/Formula/b/blocky.rb @@ -0,0 +1,44 @@ +class Blocky < Formula + desc "Fast and lightweight DNS proxy as ad-blocker for local network" + homepage "https://0xerr0r.github.io/blocky/" + url "https://github.com/0xerr0r/blocky/archive/refs/tags/v0.27.0.tar.gz" + sha256 "c8d333ac554f69a90111dfedbf4d5abce7da97fc54221025a580a5e094ff5d84" + license "Apache-2.0" + head "https://github.com/0xerr0r/blocky.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c3e2158aa0ede4a4f8accf5501347fe0298da6be1bfba2e4dec9a8936820682d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a02093808c6316efd0add6b097f4e12bbba162ebe751e40cdeb15a35f7c0f87f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "651b3eeaf12549aadbd7a7b0f76a84f60bfe9731614dd9c4f76853aa31c4ef27" + sha256 cellar: :any_skip_relocation, sonoma: "22cf7781fdb8feb0e266a8e9d21823e7b3b467805b9dc655c8acf92ba11b97e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "9071f5389b8b2190063ccbd151fdf3b5c9f92024195bffa02927e8b1777dfe70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad621901770ab7cb2e5f849895939f2d5603a67dd0b53f37559ec82260d469c3" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/0xERR0R/blocky/util.Version=#{version} + -X github.com/0xERR0R/blocky/util.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: sbin/"blocky") + + pkgetc.install "docs/config.yml" + end + + service do + run [opt_sbin/"blocky", "--config", etc/"blocky/config.yml"] + keep_alive true + require_root true + end + + test do + # client + assert_match "Version: #{version}", shell_output("#{sbin}/blocky version") + + # server + assert_match "NOT OK", shell_output("#{sbin}/blocky healthcheck", 1) + end +end diff --git a/Formula/b/blogc.rb b/Formula/b/blogc.rb new file mode 100644 index 0000000000000..ab801cc3e8e14 --- /dev/null +++ b/Formula/b/blogc.rb @@ -0,0 +1,78 @@ +class Blogc < Formula + desc "Blog compiler with template engine and markup language" + homepage "https://blogc.rgm.io/" + url "https://github.com/blogc/blogc/releases/download/v0.20.1/blogc-0.20.1.tar.xz" + sha256 "d1289367362b7b11b438670fe703ff2c751e795393c06e1999d6b9a6e438fdd8" + license "BSD-3-Clause" + head "https://github.com/blogc/blogc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54a616937c29e0fa6c68db2372e4d577e26632bf6ef9c3454f8f3571a9b28251" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1550db3be9b6c9bd21d1a522550644fbf0d524f51126ed55560c2e3d01b4444f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e277f0a14ca6504906fee7b93a4f08a9191694afa1a8eb6748a0f2bebd37bef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a042dd99d35a1bf290cf530b21adf7a248e1fc33010b64497e689c9e3ba49680" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c132ce8fffa573a857c2ce019118f46bf11b52748dc9da184f3cc42779f7cfd1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f51d0d693775155a5eb1199a7ee90abb00e35a00a7469e02f3a31c074aff57cf" + sha256 cellar: :any_skip_relocation, sonoma: "c00764c88556c239149297995b261c607c8f733fa90774bbf7f35cf32c9ee4b0" + sha256 cellar: :any_skip_relocation, ventura: "947fede34167be2c54235e21108c6bc1cf4457d1fcf6416f917a2b1aec6a5860" + sha256 cellar: :any_skip_relocation, monterey: "cebc47838829ba79f58cf14561233d6af355ea261206969fcb63abfe24bbf266" + sha256 cellar: :any_skip_relocation, big_sur: "ff83c11472e9295479779c6e27d5ae59efb77bdb216ba4d4efb30ae88f847981" + sha256 cellar: :any_skip_relocation, catalina: "16c4393bd90b76d031af46bcd959705ef627e49823912c543f5a76683b5b48e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbf177c5bfece6942cd368cee01aec2fa762f4ecc02178441d3f35d26974c03b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5188455011d94f56149adb535c9a159e925eba66e28ab4362639ebb3e72ba5ba" + end + + def install + system "./configure", "--disable-tests", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--enable-git-receiver", + "--enable-make", + "--enable-runserver", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + # Write config file that describes folder structure + (testpath/"blogcfile").write <<~EOS + [global] + AUTHOR_NAME = Homebrew + AUTHOR_EMAIL = brew@example.org + SITE_TITLE = Homebrew + SITE_TAGLINE = The Missing Package Manager for macOS (or Linux) + BASE_DOMAIN = http://example.org + + [settings] + locale = en_US.utf8 + + [posts] + post1 + post2 + EOS + + # Set up folder structure for a basic example site + mkdir_p "content/post" + mkdir_p "templates" + (testpath/"content/post/post1.txt").write "----------\nfoo" + (testpath/"content/post/post2.txt").write "----------\nbar" + + (testpath/"templates/main.tmpl").write <<~EOS + + {{ SITE_TITLE }} + {{ SITE_TAGLINE }} + {% block listing %}{{ CONTENT }}{% endblock %} + + EOS + + # Generate static files + system bin/"blogc-make" + + # Run basic checks on generated files + output = (testpath/"_build/index.html").read + assert_match "Homebrew\nThe Missing Package Manager for macOS (or Linux)", output + assert_match "

bar

\n

foo

", output + end +end diff --git a/Formula/b/bltool.rb b/Formula/b/bltool.rb new file mode 100644 index 0000000000000..acfe79ed8af45 --- /dev/null +++ b/Formula/b/bltool.rb @@ -0,0 +1,49 @@ +class Bltool < Formula + desc "Tool for command-line interaction with backloggery.com" + homepage "https://github.com/ToxicFrog/bltool" + url "https://github.com/ToxicFrog/bltool/releases/download/v0.2.4/bltool-0.2.4.zip" + sha256 "5bef751aac7140f8a705b29edd35a7bfa9f87c36039d84d4001f16a307b64ef6" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "9b12a8b49ad485d5a67f12b7f8e228d2ebaa06344c653638d362804b6e416410" + end + + head do + url "https://github.com/ToxicFrog/bltool.git", branch: "master" + depends_on "leiningen" => :build + end + + depends_on "openjdk" + + def install + if build.head? + system "lein", "uberjar" + bltool_jar = Dir["target/bltool-*-standalone.jar"][0] + else + bltool_jar = "bltool.jar" + end + + libexec.install bltool_jar + bin.write_jar_script libexec/File.basename(bltool_jar), "bltool" + end + + test do + (testpath/"test.edn").write <<~EOS + [{:id "12527736", + :name "Assassin's Creed", + :platform "360", + :progress "unfinished"}] + EOS + + system bin/"bltool", "--from", "edn", + "--to", "text", + "--input", "test.edn", + "--output", "test.txt" + + assert_match(/12527736\s+360\s+unfinished\s+Assassin/, File.read("test.txt")) + end +end diff --git a/Formula/b/bluepill.rb b/Formula/b/bluepill.rb new file mode 100644 index 0000000000000..d353b3db727f3 --- /dev/null +++ b/Formula/b/bluepill.rb @@ -0,0 +1,49 @@ +class Bluepill < Formula + desc "Testing tool for iOS that runs UI tests using multiple simulators" + homepage "https://github.com/MobileNativeFoundation/bluepill" + url "https://github.com/MobileNativeFoundation/bluepill.git", + tag: "v5.13.0", + revision: "a3f6f4b52f994dfb322f507f05263d52869c4e01" + license "BSD-2-Clause" + head "https://github.com/MobileNativeFoundation/bluepill.git", branch: "master" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69a5e53d56d1093929bd7f7cdf80718d832834e6c0b1790202508f3b935ee6a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "40123f2981d2e731f0a15473049696f035e8e25f0b27752603550c16e904fd05" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a92ddfe4cfcaabe31286b25bea4673891111bb9225751574894552d7bc56fc00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48bb18fef3a6ba58029c0167a3bf903b6e7fd88e96af3ccb2dc7cfdcd4846e26" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e562b58dd64848a0f333325f2925883f1f3a8f841d9d122b4d7e0a3db032c5ad" + sha256 cellar: :any_skip_relocation, sonoma: "c1c6546ce0eed8ede74042419f0ce6a242dfa971db31806f6927fff369a3537e" + sha256 cellar: :any_skip_relocation, ventura: "b89586a8fe4f4049de8446d3e55f040ebf645678b7038a2c59b0c5714db11bb3" + sha256 cellar: :any_skip_relocation, monterey: "81990e0749d7b856571867c719d08c2b15ec2414e300ba7dc1a2b0d7dbf6af07" + end + + depends_on xcode: ["14.0", :build] + depends_on :macos + + def install + pbxprojs = ["bluepill", "bp"].map { |name| "#{name}/#{name}.xcodeproj/project.pbxproj" } + inreplace pbxprojs, "x86_64", Hardware::CPU.arch.to_s + + xcodebuild "-workspace", "Bluepill.xcworkspace", + "-scheme", "bluepill", + "-configuration", "Release", + "-IDECustomDerivedDataLocation=#{buildpath}", + "SYMROOT=../", + "ARCHS=#{Hardware::CPU.arch}" + bin.install "Release/bluepill", "Release/bp" + end + + test do + assert_match "Usage:", shell_output("#{bin}/bluepill -h") + assert_match "Usage:", shell_output("#{bin}/bp -h") + end +end diff --git a/Formula/b/blueprint-compiler.rb b/Formula/b/blueprint-compiler.rb new file mode 100644 index 0000000000000..2fc7de7e20ac2 --- /dev/null +++ b/Formula/b/blueprint-compiler.rb @@ -0,0 +1,58 @@ +class BlueprintCompiler < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Markup language and compiler for GTK 4 user interfaces" + homepage "https://gnome.pages.gitlab.gnome.org/blueprint-compiler/" + url "https://gitlab.gnome.org/GNOME/blueprint-compiler/-/archive/0.18.0/blueprint-compiler-0.18.0.tar.gz" + sha256 "51aa472ecd7bd4b32b8baa7ae6768b19810793d4a2a1aba39c5b31b0170cb258" + license "LGPL-3.0-or-later" + revision 1 + head "https://gitlab.gnome.org/GNOME/blueprint-compiler.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d935e3b6be2f9ca0baba92580a768de9e3bdc89f3d55e24113e39336456eb414" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + depends_on "gtk4" + depends_on "pygobject3" + depends_on "python@3.14" + + def install + python3 = "python3.14" + venv = virtualenv_create(libexec, python3) + + system "meson", "setup", "build", "-Dpython.platlibdir=#{venv.site_packages}", + "-Dpython.purelibdir=#{venv.site_packages}", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children + end + + test do + (testpath/"test.blp").write <<~BLUEPRINT + using Gtk 4.0; + + template $MyAppWindow: ApplicationWindow { + default-width: 600; + default-height: 300; + title: _("Hello, Blueprint!"); + + [titlebar] + HeaderBar {} + + Label { + label: bind template.main_text; + } + } + BLUEPRINT + output = shell_output("#{bin}/blueprint-compiler compile #{testpath}/test.blp") + assert_match "Hello, Blueprint!", output + end +end diff --git a/Formula/b/bluetoothconnector.rb b/Formula/b/bluetoothconnector.rb new file mode 100644 index 0000000000000..92608c6e1fc05 --- /dev/null +++ b/Formula/b/bluetoothconnector.rb @@ -0,0 +1,46 @@ +class Bluetoothconnector < Formula + desc "Connect and disconnect Bluetooth devices" + homepage "https://github.com/lapfelix/BluetoothConnector" + url "https://github.com/lapfelix/BluetoothConnector/archive/refs/tags/2.1.0.tar.gz" + sha256 "cbb192e5f94da27408bd8306a25e11bbffd643d916f6a03d532f83a229281f77" + license "MIT" + head "https://github.com/lapfelix/BluetoothConnector.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a09325ad64ca0a614f87d18aa6e54474d841d985a94bba2f7f7c15950a985c8e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e8786893183eba145ea2282b69540bd3c5b331decd4587090e94ac8b828e050" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fe88b3f3feca2d6bc8c39cb06af98f81ee42a04fac836873f80b06d87cc37d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f1e8d18ce7e2ee41a70c1a8d952a91404e4701725075e56f87bb063416880b0" + sha256 cellar: :any_skip_relocation, sonoma: "0094ab63b0f1d951007bbe29ec8413e1cf4548687fde0f051f2fdc8ddc7b754a" + sha256 cellar: :any_skip_relocation, ventura: "360733d6b564009fa2fde910ab9fd67baddd172e2a3763fda858db7ce0626eb4" + end + + depends_on xcode: ["15.0", :build] + depends_on :macos + + def install + system "swift", "build", "--disable-sandbox", "-c", "release", "--static-swift-stdlib" + bin.install ".build/release/BluetoothConnector" + end + + test do + if MacOS.version >= :sonoma && ENV["HOMEBREW_GITHUB_ACTIONS"] + # We cannot test any useful command since Sonoma as OS privacy restrictions + # will wait until Bluetooth permission is either accepted or rejected. + # Since even `--help` needs permissions, we just check process is still running. + pid = fork { exec bin/"BluetoothConnector" } + begin + sleep 5 + Process.getpgid(pid) + ensure + Process.kill("TERM", pid) + end + else + shell_output("#{bin}/BluetoothConnector", 64) + output_fail = shell_output("#{bin}/BluetoothConnector --connect 00-00-00-00-00-00", 252) + assert_equal "Not paired to device\n", output_fail + end + end +end diff --git a/Formula/b/blueutil.rb b/Formula/b/blueutil.rb new file mode 100644 index 0000000000000..bac3d5cab1315 --- /dev/null +++ b/Formula/b/blueutil.rb @@ -0,0 +1,36 @@ +class Blueutil < Formula + desc "Get/set bluetooth power and discoverable state" + homepage "https://github.com/toy/blueutil" + url "https://github.com/toy/blueutil/archive/refs/tags/v2.13.0.tar.gz" + sha256 "d6beba603ab6638f72d9966aed33343f35cac441fc48a81c04fd532c844f170d" + license "MIT" + head "https://github.com/toy/blueutil.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c31d3a14d7db9bebfd0bc6db63cc175189c6bb715891a6f5b0bd4618f06f06b7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d1d787bfda0fa2f1ed869851341fed5aec241e9910d49cf68d2fc45fb63b497" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6cbfdc8b46cdde4d61bbf221aa5a434e9320d30df95e930f0365d38709eab349" + sha256 cellar: :any_skip_relocation, arm64_ventura: "23f8456a3b7b9cce7e3f34b60ffa75727b58d772e552af3e0f7aea4627524daa" + sha256 cellar: :any_skip_relocation, sonoma: "2cff703f1c4f5826686dc1c948187a94b9130f9f367ec53fb765a193c953b602" + sha256 cellar: :any_skip_relocation, ventura: "ca2cecb2e1d3c5138a89baff635c957a43f9bf019ad598d7b6c149f95f26a5cf" + end + + depends_on xcode: :build + depends_on :macos + + def install + # Set to build with SDK=macosx10.6, but it doesn't actually need 10.6 + xcodebuild "-arch", Hardware::CPU.arch, + "SDKROOT=", + "SYMROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/blueutil" + end + + test do + assert_match version.to_s, shell_output("#{bin}/blueutil --version") + # We cannot test any useful command since Sonoma as OS privacy restrictions + # will wait until Bluetooth permission is either accepted or rejected. + system bin/"blueutil", "--discoverable", "0" if MacOS.version < :sonoma + end +end diff --git a/Formula/b/bluez.rb b/Formula/b/bluez.rb new file mode 100644 index 0000000000000..1230e9175ef14 --- /dev/null +++ b/Formula/b/bluez.rb @@ -0,0 +1,49 @@ +class Bluez < Formula + desc "Bluetooth protocol stack for Linux" + homepage "https://www.bluez.org" + url "https://mirrors.edge.kernel.org/pub/linux/bluetooth/bluez-5.84.tar.xz" + sha256 "5ba73d030f7b00087d67800b0e321601aec0f892827c72e5a2c8390d8c886b11" + license "GPL-2.0-or-later" + + livecheck do + url "https://mirrors.edge.kernel.org/pub/linux/bluetooth/" + regex(/href=.*?bluez[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "bc9e9023a937c52768515eaf8eb88f77c3a0e984c69c22a783f6d9944ef4e8cd" + sha256 x86_64_linux: "76938a4b48d514a8c4e500c67d22a92c2fdb52ec8bed79815f63dacb94208e81" + end + + head do + url "https://git.kernel.org/pub/scm/bluetooth/bluez.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "dbus" + depends_on "glib" + depends_on "libical" + depends_on :linux + depends_on "readline" + depends_on "systemd" # for libudev + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-testing", "--disable-manpages", "--enable-library", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bluetoothctl --version") unless head? + + assert_match "Failed to open HCI user channel", shell_output("#{bin}/bluemoon 2>&1", 1) + + output = shell_output("#{bin}/btmon 2>&1", 1) + assert_match "Failed to open channel: Address family not supported by protocol", output + end +end diff --git a/Formula/b/bmake.rb b/Formula/b/bmake.rb new file mode 100644 index 0000000000000..285dd8e406e0f --- /dev/null +++ b/Formula/b/bmake.rb @@ -0,0 +1,48 @@ +class Bmake < Formula + desc "Portable version of NetBSD make(1)" + homepage "https://www.crufty.net/help/sjg/bmake.html" + url "https://www.crufty.net/ftp/pub/sjg/bmake-20250804.tar.gz" + sha256 "0b49037644b253206d2e710d46e32859e62dfe2c6c8e7218ae439f2ef50de8ad" + license "BSD-3-Clause" + + livecheck do + url "https://www.crufty.net/ftp/pub/sjg/" + regex(/href=.*?bmake[._-]v?(\d{6,8})\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5390f535bc874e5d3eeed207d7384259c2943f3221daa7058729a4d85886b563" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a57472c5362530151be18f3877817b2960c4d94f1d96e8649db63b5c975dd23f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "31b71a1ebb0c3d1292622c0fc17706c60cda6f65ed7ebf1db61f05b61e8550d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "830bc4e799da17de7f75aa1cd34465aa4701bc471202c2fb45db43ce92eb1070" + sha256 sonoma: "1a84f32740d0e7a0dc5f283194313130881c490c2c24e05bb87ef88b3ab579e1" + sha256 ventura: "78bdf13ce45210ff6f65198369e936407f681ec45edf080d2a8a85bad2f68ea5" + sha256 arm64_linux: "24be7b2de47dcbd82915921fc8599d302f120f4c5dc99202e849b8c6a52ba141" + sha256 x86_64_linux: "3d578e60d3b633433f4536c95fed71d00a82aac0efef13c3b5a17d3208a24aa5" + end + + uses_from_macos "bc" => :build + + def install + # -DWITHOUT_PROG_LINK means "don't symlink as bmake-VERSION." + # shell-ksh test segfaults since macOS 11. + args = ["--prefix=#{prefix}", "-DWITHOUT_PROG_LINK", "--install", "BROKEN_TESTS=shell-ksh"] + system "sh", "boot-strap", *args + + man1.install "bmake.1" + end + + test do + (testpath/"Makefile").write <<~MAKE + all: hello + + hello: + @echo 'Test successful.' + + clean: + rm -rf Makefile + MAKE + system bin/"bmake" + system bin/"bmake", "clean" + end +end diff --git a/Formula/b/bmon.rb b/Formula/b/bmon.rb new file mode 100644 index 0000000000000..875d97bf1e29d --- /dev/null +++ b/Formula/b/bmon.rb @@ -0,0 +1,56 @@ +class Bmon < Formula + desc "Interface bandwidth monitor" + homepage "https://github.com/tgraf/bmon" + url "https://github.com/tgraf/bmon/releases/download/v4.0/bmon-4.0.tar.gz" + sha256 "02fdc312b8ceeb5786b28bf905f54328f414040ff42f45c83007f24b76cc9f7a" + license "BSD-2-Clause" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "93cdadcf5fec7072cb986a15fb5f6f3e405d09da4dbeb2048eff7b561b0b8af8" + sha256 cellar: :any, arm64_sequoia: "f32d98f5dbf21deda940949e6b11a722ad0d69a7acfc1841d2779ce5b3af12ed" + sha256 cellar: :any, arm64_sonoma: "f0b04892363966c2e28c0d4ac5a76a751acdeafbfdac6cf543a9b0db825c1aaf" + sha256 cellar: :any, arm64_ventura: "890364e7d54a6673fccb4091d9643e24ddb1dfd4a3b2102618cc0b7d67953771" + sha256 cellar: :any, arm64_monterey: "321c0715286901cc997ead59058971667bb3bd491cd85cd3a82eca29c7ae2f83" + sha256 cellar: :any, arm64_big_sur: "8f20f07b392953df52502a35c4430ae3f080e4cf8b932a95fa66c149e04ff149" + sha256 cellar: :any, sonoma: "519c72fe28d46ab57034f262ce1972f2ca0d7dbf616c2c2c2adfc7d6034a9b43" + sha256 cellar: :any, ventura: "68229b2903b717a8a03d324aebf0bab686723c9284d0124127b562beafa0be04" + sha256 cellar: :any, monterey: "b81677fc05a116244cc98fee5d4dcf1a137923669f349aa5a78ac5cc93d9271c" + sha256 cellar: :any, big_sur: "c5a460a6ada9a74638176734db89e6e7fc6f8c171a8e580d06bb7b77b9432c1b" + sha256 cellar: :any, catalina: "0e5a38ac18b9a385c33eeedd7c64c649bad0a6160aada5725cf3c1b2557b74f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "00927e3a0dbf34649e09b491181022e05e8fb8b5c4924cc2f2bd1951228e716c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c35f5e85c98f864cb59ce589b03c05ce6dd37563a731d86c4491e8930449b8d" + end + + head do + url "https://github.com/tgraf/bmon.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "confuse" + + uses_from_macos "ncurses" + + on_linux do + depends_on "libnl" + end + + def install + # Workaround for https://github.com/tgraf/bmon/issues/89 build issue: + inreplace "include/bmon/bmon.h", "#define __unused__", "//#define __unused__" + inreplace %w[src/in_proc.c src/out_curses.c], "__unused__", "" + + system "./autogen.sh" if build.head? + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"bmon", "-o", "ascii:quitafter=1" + end +end diff --git a/Formula/b/bnd.rb b/Formula/b/bnd.rb new file mode 100644 index 0000000000000..905fbc5ca9d19 --- /dev/null +++ b/Formula/b/bnd.rb @@ -0,0 +1,59 @@ +class Bnd < Formula + desc "Swiss Army Knife for OSGi bundles" + homepage "https://bnd.bndtools.org/" + url "https://search.maven.org/remotecontent?filepath=biz/aQute/bnd/biz.aQute.bnd/7.1.0/biz.aQute.bnd-7.1.0.jar" + sha256 "d68703e97d0950ced1610f8ff5c37c11cc68e67b96d746c3c7375eaa4980210d" + license any_of: ["Apache-2.0", "EPL-2.0"] + + livecheck do + url "https://search.maven.org/remotecontent?filepath=biz/aQute/bnd/biz.aQute.bnd/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7d052030c8ad5e158aed2587be01436bb0ec5d3f6133646108ee435bc46a7651" + end + + depends_on "openjdk" + + def install + libexec.install "biz.aQute.bnd-#{version}.jar" + bin.write_jar_script libexec/"biz.aQute.bnd-#{version}.jar", "bnd" + end + + test do + # Test bnd by resolving a launch.bndrun file against a trivial index. + test_sha = "baad835c6fa65afc1695cc92a9e1afe2967e546cae94d59fa9e49b557052b2b1" + test_bsn = "org.apache.felix.gogo.runtime" + test_version = "1.0.0" + test_version_next = "1.0.1" + test_file_name = "#{test_bsn}-#{test_version}.jar" + (testpath/"index.xml").write <<~XML + + + + + + + + + + + + + + + XML + + (testpath/"launch.bndrun").write <<~EOS + -standalone: ${.}/index.xml + -runrequires: osgi.identity;filter:='(osgi.identity=#{test_bsn})' + EOS + + mkdir "cnf" + touch "cnf/build.bnd" + + output = shell_output("#{bin}/bnd resolve resolve -b launch.bndrun") + assert_match(/BUNDLES\s+#{test_bsn};version='\[#{test_version},#{test_version_next}\)'/, output) + end +end diff --git a/Formula/b/bnfc.rb b/Formula/b/bnfc.rb new file mode 100644 index 0000000000000..206845be60b42 --- /dev/null +++ b/Formula/b/bnfc.rb @@ -0,0 +1,138 @@ +class Bnfc < Formula + desc "BNF Converter" + homepage "https://github.com/BNFC/bnfc" + url "https://github.com/BNFC/bnfc/archive/refs/tags/v2.9.6.1.tar.gz" + sha256 "da787f1a4cdb2476b7fbeb91e13ae831850c47261a14eaba0051aadbe75b1cc5" + license "BSD-3-Clause" + head "https://github.com/BNFC/bnfc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f4527a1670a78475c265fc33d67b1c94ea25a589c476d1ac460dcfcfe42a20d3" + sha256 cellar: :any, arm64_sequoia: "c31434982bdab1d316d2d79f1d8099b3ac6f3594b5cb7f1c4e44dc8647915d24" + sha256 cellar: :any, arm64_sonoma: "1ba668bdd79f0631df24fc241d90a491886e4126123d070570609e6e4d4b0af8" + sha256 cellar: :any, arm64_ventura: "16570619aab4070fa4d4517dc650d53fa619d95f3e14fe1f0b46914d9079c8cc" + sha256 cellar: :any, sonoma: "f24d3c0ff480f926217d9fe826760c6ab59b8ec6100f6c3e9d329da3100b8386" + sha256 cellar: :any, ventura: "7ac68aa426aaca6251a69e6ad730ec582d2d6ae127b2d80f68c1c3aedba6df71" + sha256 cellar: :any_skip_relocation, arm64_linux: "f79f089fe534748760af745ceebf7510828153f6f7e1bc898387480fed6aded1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b36466a041cf9cbbd8aadd038903c7f02a1a98873c61990ce4dd16615a9ebab" + end + + depends_on "cabal-install" => [:build, :test] + depends_on "ghc" => [:build, :test] + depends_on "sphinx-doc" => :build + depends_on "agda" => :test + depends_on "antlr" => :test + depends_on "bison" => :test + depends_on "flex" => :test + depends_on "openjdk" => :test + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", buildpath/"source", *std_cabal_v2_args + system "make", "-C", "docs", "text", "man", "SPHINXBUILD=#{Formula["sphinx-doc"].bin}/sphinx-build" + + man1.install "docs/_build/man/bnfc.1" + doc.install "docs/_build/text" => "manual" + doc.install "README.md", "examples", "source/CHANGELOG.md", "source/src/BNFC.cf" + end + + test do + ENV.prepend_create_path "PATH", testpath/"tools-bin" + system "cabal", "v2-update" + system "cabal", "v2-install", "alex", "happy", *std_cabal_v2_args.map { |s| s.sub bin, testpath/"tools-bin" } + + (testpath/"calc.cf").write <<~EOS + EAdd. Exp ::= Exp "+" Exp1 ; + ESub. Exp ::= Exp "-" Exp1 ; + EMul. Exp1 ::= Exp1 "*" Exp2 ; + EDiv. Exp1 ::= Exp1 "/" Exp2 ; + EInt. Exp2 ::= Integer ; + coercions Exp 2 ; + entrypoints Exp ; + comment "(#" "#)" ; + EOS + system bin/"bnfc", "--check", testpath/"calc.cf" + + (testpath/"test.calc").write "14 * (# Parsing is fun! #) (3 + 2 / 5 - 8)" + space = " " + check_out_c = <<~EOS + + Parse Successful! + + [Abstract Syntax] + (EMul (EInt 14) (ESub (EAdd (EInt 3) (EDiv (EInt 2) (EInt 5))) (EInt 8))) + + [Linearized Tree] + 14 * (3 + 2 / 5 - 8)#{space} + + EOS + check_out_hs = <<~EOS + #{testpath/"test.calc"} + + Parse Successful! + + [Abstract Syntax] + + EMul (Just (1,1)) (EInt (Just (1,1)) 14) (ESub (Just (1,29)) (EAdd (Just (1,29)) (EInt (Just (1,29)) 3) (EDiv (Just (1,33)) (EInt (Just (1,33)) 2) (EInt (Just (1,37)) 5))) (EInt (Just (1,41)) 8)) + + [Linearized tree] + + 14 * (3 + 2 / 5 - 8) + EOS + check_out_agda = <<~EOS + PARSE SUCCESSFUL + + 14 * (3 + 2 / 5 - 8) + EOS + check_out_java = <<~EOS + + Parse Successful! + + [Abstract Syntax] + + (EMul (EInt 14) (ESub (EAdd (EInt 3) (EDiv (EInt 2) (EInt 5))) (EInt 8)))#{space} + + [Linearized Tree] + + 14 * (3 + 2 / 5 - 8) + EOS + + flex_bison_args = ["FLEX=#{Formula["flex"].bin}/flex", "BISON=#{Formula["bison"].bin}/bison"] + + mkdir "c-test" do + system bin/"bnfc", "-m", "-o.", "--c", testpath/"calc.cf" + system "make", "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}", *flex_bison_args + assert_equal check_out_c, shell_output("./Testcalc #{testpath}/test.calc") + end + + mkdir "cxx-test" do + system bin/"bnfc", "-m", "-o.", "--cpp", testpath/"calc.cf" + system "make", "CC=#{ENV.cxx}", "CCFLAGS=#{ENV.cxxflags}", *flex_bison_args + assert_equal check_out_c, shell_output("./Testcalc #{testpath}/test.calc") + end + + mkdir "agda-test" do + system bin/"bnfc", "-m", "-o.", "--haskell", "--text-token", + "--generic", "--functor", "--agda", "-d", testpath/"calc.cf" + system "make" + assert_equal check_out_hs, shell_output("./Calc/Test #{testpath}/test.calc") # Haskell + assert_equal check_out_agda, shell_output("./Main #{testpath}/test.calc") # Agda + end + + ENV.deparallelize do # only the Java test needs this + mkdir "java-test" do + jdk_dir = Formula["openjdk"].bin + antlr_bin = Formula["antlr"].bin/"antlr" + antlr_jar = Formula["antlr"].prefix.glob("antlr-*-complete.jar").first + ENV["CLASSPATH"] = ".:#{antlr_jar}" + system bin/"bnfc", "-m", "-o.", "--java", "--antlr4", testpath/"calc.cf" + system "make", "JAVAC=#{jdk_dir}/javac", "JAVA=#{jdk_dir}/java", + "LEXER=#{antlr_bin}", "PARSER=#{antlr_bin}" + assert_equal check_out_java, shell_output("#{jdk_dir}/java calc.Test #{testpath}/test.calc") + end + end + end +end diff --git a/Formula/b/boa.rb b/Formula/b/boa.rb new file mode 100644 index 0000000000000..2dd952ce3f2d8 --- /dev/null +++ b/Formula/b/boa.rb @@ -0,0 +1,46 @@ +class Boa < Formula + desc "Embeddable and experimental Javascript engine written in Rust" + homepage "https://github.com/boa-dev/boa" + url "https://github.com/boa-dev/boa/archive/refs/tags/v0.21.tar.gz" + sha256 "aa6eb743cd6037e6b5efa6ba01ee8c5695b1406d141697ddd4578b047e8028bf" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/boa-dev/boa.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c487656c5ebb79333fa4f8a81afe8066f62059212dd0606c61fcefac52e9c064" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dae69096a640038b85e37d5532310514e46949c111b49f26eb9772d7fe3f0a14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fbe6e48aa63dea3f82e8caace4a5564958986b62a3df0b48f6bbf8ae5fe09275" + sha256 cellar: :any_skip_relocation, sonoma: "ecff53c4ecf56567e1593a80abca460b61015f8a4fc93ebd26edfb6015d00584" + sha256 cellar: :any_skip_relocation, arm64_linux: "733119d87455c4f1738bef0a532fe7869a9107548da834420c0b198a5fa08ad9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43062e155e024fee561efaf8951a02533d3f338acd229df0a4fa9b23f9c9b82d" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/boa --version") + + (testpath/"test.js").write <<~JS + function factorial(n) { + return n <= 1 ? 1 : n * factorial(n - 1); + } + console.log(`Factorial of 5 is: ${factorial(5)}`); + JS + + output = shell_output("#{bin}/boa #{testpath}/test.js") + assert_match "Factorial of 5 is: 120", output + end +end diff --git a/Formula/b/bob.rb b/Formula/b/bob.rb new file mode 100644 index 0000000000000..781ad47040e13 --- /dev/null +++ b/Formula/b/bob.rb @@ -0,0 +1,46 @@ +class Bob < Formula + desc "Version manager for neovim" + homepage "https://github.com/MordechaiHadad/bob" + url "https://github.com/MordechaiHadad/bob/archive/refs/tags/v4.1.4.tar.gz" + sha256 "8c235d68bc1f94199972753ed1a50475c4cd8e6729eb6b362ef442e21e08e107" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c1df6d3c524a6fb964a940cfaa0e27261949c70626ef9a916274e5ca8893545" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "551116855bf049e05a3c4af134824aab0027de3d0e37977ef6c90645ffba7b59" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55238d697646caf9ebb529369632d58321fc7ca54878b6a7d06a6ae723655231" + sha256 cellar: :any_skip_relocation, sonoma: "d5c35f5df459a2b9e5c2d63e327820d218b17e0154b0396726d844c4985379ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "78bf3941c9343411246e565986881ee6769b12cf3bc182e086d59f14682c1f32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6915c4fadbc935ddfc8bf3ca7ef7939885910941dae0c48fb29202332229831" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"bob", "complete") + end + + test do + config_file = testpath/"config.json" + config_file.write <<~JSON + { + "downloads_location": "#{testpath}/.local/share/bob", + "installation_location": "#{testpath}/.local/share/bob/nvim-bin" + } + JSON + + ENV["BOB_CONFIG"] = config_file + mkdir_p testpath/".local/share/bob" + mkdir_p testpath/".local/share/nvim-bin" + + neovim_version = "v0.11.0" + system bin/"bob", "install", neovim_version + assert_match neovim_version, shell_output("#{bin}/bob list") + assert_path_exists testpath/".local/share/bob"/neovim_version + + # failed to run `bob erase` in linux CI + # upstream bug report, https://github.com/MordechaiHadad/bob/issues/287 + system bin/"bob", "erase" unless OS.linux? + end +end diff --git a/Formula/b/bochs.rb b/Formula/b/bochs.rb new file mode 100644 index 0000000000000..6643a29b69f4f --- /dev/null +++ b/Formula/b/bochs.rb @@ -0,0 +1,118 @@ +class Bochs < Formula + desc "Open source IA-32 (x86) PC emulator written in C++" + homepage "https://bochs.sourceforge.io/" + url "https://downloads.sourceforge.net/project/bochs/bochs/3.0/bochs-3.0.tar.gz" + sha256 "cb6f542b51f35a2cc9206b2a980db5602b7cd1b7cf2e4ed4f116acd5507781aa" + license "LGPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/bochs[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "b358cdb2e679f040071c7da9ccf6cad7d82f144d47adb65fc2bafc2fb1ed01c5" + sha256 arm64_sequoia: "771309e968819d820ed0b538ed7a6c2365182b6e939e8de95c5a64265dcd0f28" + sha256 arm64_sonoma: "7fc4fd6a6ead512d3b9fb13964529682f17356ffe7e10a7692e6c42940d48f21" + sha256 arm64_ventura: "9c9acd2ad176ca2cde5e04bf1041e62649cf32d3ff11a0e272fc0394092c82f4" + sha256 sonoma: "308e5183b90eca43959de4064497c3d76e279c9b7849a7c8a68578fe8e0ec838" + sha256 ventura: "1b8557fd5e2ba1133050f72867b8254401003ac7064d81788046025446367efc" + sha256 arm64_linux: "c90bc3f05f5534d123939bc79e2afa947fc469e9841a2f6339ac8a5ce613ce4c" + sha256 x86_64_linux: "ad4f70d9e3cb7e9139e9542f351869f3e2175903c7bead372d988bb31ea784aa" + end + + depends_on "pkgconf" => :build + depends_on "libtool" + depends_on "sdl2" + + uses_from_macos "ncurses" + + on_linux do + depends_on "readline" + end + + # include `` for macos build, upstream bug report, https://sourceforge.net/p/bochs/bugs/1466/ + patch :DATA + + def install + args = %W[ + --prefix=#{prefix} + --disable-docbook + --enable-a20-pin + --enable-alignment-check + --enable-all-optimizations + --enable-avx + --enable-evex + --enable-cdrom + --enable-clgd54xx + --enable-cpu-level=6 + --enable-debugger + --enable-debugger-gui + --enable-disasm + --enable-fpu + --enable-iodebug + --enable-large-ramfile + --enable-logging + --enable-long-phy-address + --enable-pci + --enable-plugins + --enable-readline + --enable-show-ips + --enable-usb + --enable-vmx=2 + --enable-x86-64 + --with-nogui + --with-sdl2 + --with-term + ] + + system "./configure", *args + + system "make" + system "make", "install" + end + + test do + require "open3" + + (testpath/"bochsrc.txt").write <<~EOS + panic: action=fatal + error: action=report + info: action=ignore + debug: action=ignore + display_library: nogui + EOS + + expected = <<~EOS + Bochs is exiting with the following message: + [BIOS ] No bootable device. + EOS + + command = "#{bin}/bochs -qf bochsrc.txt" + + # When the debugger is enabled, bochs will stop on a breakpoint early + # during boot. We can pass in a command file to continue when it is hit. + (testpath/"debugger.txt").write("c\n") + command << " -rc debugger.txt" + + _, stderr, = Open3.capture3(command) + assert_match(expected, stderr) + end +end + +__END__ +diff --git a/gui/keymap.cc b/gui/keymap.cc +index 3426b6b..7bf76d8 100644 +--- a/gui/keymap.cc ++++ b/gui/keymap.cc +@@ -30,6 +30,10 @@ + #include "gui.h" + #include "keymap.h" + ++#if defined(__APPLE__) ++#include ++#endif ++ + // Table of bochs "BX_KEY_*" symbols + // the table must be in BX_KEY_* order + const char *bx_key_symbol[BX_KEY_NBKEYS] = { diff --git a/Formula/b/bogofilter.rb b/Formula/b/bogofilter.rb new file mode 100644 index 0000000000000..5ceb5789c480c --- /dev/null +++ b/Formula/b/bogofilter.rb @@ -0,0 +1,40 @@ +class Bogofilter < Formula + desc "Mail filter via statistical analysis" + homepage "https://bogofilter.sourceforge.io" + url "https://downloads.sourceforge.net/project/bogofilter/bogofilter-stable/bogofilter-1.2.5.tar.xz" + sha256 "3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea" + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later"] + + livecheck do + url "https://sourceforge.net/projects/bogofilter/rss?path=/bogofilter-stable" + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "52568286a8cb6ce65a146f26233362ec1df94e8d028d6c6d41dd889a31ab3e6c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9cdd5e3131e6b0880369ac2070e25880f55225b18eb6750bbcf997ffe7864555" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99c59d02b18ed1ef58f8c21ebc774ed67be9c694fc0807702c7e675daaad74da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fea13db3d925728149dcfb2349e1b1d9d720f96805f0302ba60f6896005163b7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1c8c1bdc849bd6b97a1ef962222e0c0f856da11e2f174eb4d7e9d587d971b0ea" + sha256 cellar: :any_skip_relocation, sonoma: "f74ffa505ef0bddb0dd6ee98b6a555fb4db02c0634789c3a29113a0ca01e50c2" + sha256 cellar: :any_skip_relocation, ventura: "5177e2c0e637368f36783396144f66a4e4fbd7f4620e4a5a870ee5208feeba5a" + sha256 cellar: :any_skip_relocation, monterey: "7ba6d67f7e248ea1d7b89ce21480ba2145c2906f22e6db749f4fe68fe16f0406" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5402defe7709d89be4e8186a4babc6c90562f7ee88ae84dcaf4fd9f0d3caadd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99ebd115fee3156d79ae0958b1326c7689e9af5092d5ef3e9adc915cbdff96f3" + end + + uses_from_macos "sqlite" + + def install + system "./configure", "--disable-silent-rules", + "--with-database=sqlite3", + *std_configure_args + system "make", "install" + end + + test do + system bin/"bogofilter", "--version" + end +end diff --git a/Formula/b/bold.rb b/Formula/b/bold.rb new file mode 100644 index 0000000000000..0479dd086774a --- /dev/null +++ b/Formula/b/bold.rb @@ -0,0 +1,53 @@ +class Bold < Formula + desc "Drop-in replacement for Apple system linker ld" + homepage "https://github.com/kubkon/bold" + url "https://github.com/kubkon/bold/archive/refs/tags/v0.2.0.tar.gz" + sha256 "7b12aceeabe32249784347f3bb1befde6dcf621668d0352497ee8ef8c381d9ee" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ed79f743395beae0a5c50b97e5915036fc150a64876e09f93a4c23ec22290e11" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "166e358558a1248b63764912648a742d9852058095fa8291e6ba5104f1f47145" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "153a08515b6fa639c3245055e773893ee95b9653c87bec5b822734090585afe2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d93e1830b77efb82fa671a2b52a50403292ce2cf991bc9abf2c04a22b57e324" + sha256 cellar: :any_skip_relocation, sonoma: "c63ee99bb85ab7dc35e04f09613b7ce775e1933ef264bb10bdf9a5127f2ff7d1" + sha256 cellar: :any_skip_relocation, ventura: "c9f50e5f314cfaeb955778838e303f508167ac884b48846ff1c31c786dcd5644" + end + + depends_on "zig@0.14" => :build + depends_on :macos # does not build on linux + + def install + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case Hardware.oldest_cpu + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + else Hardware.oldest_cpu + end + + args = ["-Dstrip=true"] + + args << "-Dcpu=#{cpu}" if build.bottle? + + system "zig", "build", *args, *std_zig_args + end + + test do + (testpath/"hello.c").write <<~C + #include + int main() { + printf("Hello from Bold"); + return 0; + } + C + + system ENV.cc, "-c", "hello.c", "-o", "hello.o" + arch = Hardware::CPU.arm? ? "arm64" : "x86_64" + macos_min = MacOS.version.to_s + + system bin/"bold", "hello.o", "-arch", arch, "-macos_version_min", macos_min, + "-syslibroot", MacOS.sdk_path, "-lSystem", "-o", "test" + + assert_equal "Hello from Bold", shell_output("./test") + end +end diff --git a/Formula/b/bom.rb b/Formula/b/bom.rb new file mode 100644 index 0000000000000..a52eee2c1d7c9 --- /dev/null +++ b/Formula/b/bom.rb @@ -0,0 +1,45 @@ +class Bom < Formula + desc "Utility to generate SPDX-compliant Bill of Materials manifests" + homepage "https://kubernetes-sigs.github.io/bom/" + url "https://github.com/kubernetes-sigs/bom/archive/refs/tags/v0.7.1.tar.gz" + sha256 "3893c25e7ea3b625c7c7c7d2f89cdd53fe6d8d43fac8c587a8f81c920498cca2" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/bom.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6db2ec5c4b09535a54d3d5d22d333082c00874771e37cf5ba956178621c5cc7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6db2ec5c4b09535a54d3d5d22d333082c00874771e37cf5ba956178621c5cc7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6db2ec5c4b09535a54d3d5d22d333082c00874771e37cf5ba956178621c5cc7" + sha256 cellar: :any_skip_relocation, sonoma: "5c03b4702c232ee981567805de93cd236d5c1dacab4308b2d335a2dcd51cdf06" + sha256 cellar: :any_skip_relocation, arm64_linux: "9876413b628df258e61da35b3cb16261a9004eee9ceb72c116d7f74c65a2d4e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "596ccf20880d7904ed00aceece1233e21f9685d0655e7cd9e83352401ee5525a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/release-utils/version.gitVersion=v#{version} + -X sigs.k8s.io/release-utils/version.gitTreeState=clean + ] + system "go", "build", *std_go_args(ldflags: ldflags.join(" ")), "./cmd/bom" + + generate_completions_from_executable(bin/"bom", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/bom version") + + (testpath/"hello.txt").write("hello\n") + sbom = testpath/"sbom.spdx" + system bin/"bom", "generate", "--format", "tag-value", "-n", "http://example.com/test", + "-f", testpath/"hello.txt", "-o", sbom + + assert_match "SPDXVersion: SPDX-2.3", sbom.read + + outline = shell_output("#{bin}/bom document outline #{sbom}") + assert_match "📦 DESCRIBES 0 Packages", outline + assert_match "📄 DESCRIBES 1 Files", outline + end +end diff --git a/Formula/b/bombadillo.rb b/Formula/b/bombadillo.rb new file mode 100644 index 0000000000000..dac907ff1f0e4 --- /dev/null +++ b/Formula/b/bombadillo.rb @@ -0,0 +1,54 @@ +class Bombadillo < Formula + desc "Non-web browser, designed for a growing list of protocols" + homepage "https://bombadillo.colorfield.space/" + url "https://tildegit.org/sloum/bombadillo/archive/2.4.0.tar.gz" + sha256 "e0daed1d9d0fe7cbea52bc3e6ecff327749b54e792774e6b985e0d64b7a36437" + license "GPL-3.0-or-later" + head "https://tildegit.org/sloum/bombadillo.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "31498bb84196e03bdbb936dc1528b02b3355832cc0a8ebd01dbdf176376caabc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "704af144b953977108282ec76083d51d8d359b2f08402aa71da7822a79491591" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48693234c0c87251efbb8f2d4cf5c23a4d4585c9b6ba00907122dbc59a6a5add" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5b792d8b1afcc6cb894aec708268f8099e8b70a3f8a629db32d0290a535a6800" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d78dae1cc03b2b801036ba0dfd19dbb9d47e491acac9ad1ea141a40eb6b4961b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "02c4423c500ab7e3fb19df4e68708cb9ded9197986aae6e1783cb3a79d592fd7" + sha256 cellar: :any_skip_relocation, sonoma: "a11e33aea16006a92c4106d122b756465d1fdda704c35a136e25824ca9926e99" + sha256 cellar: :any_skip_relocation, ventura: "e50be305e669ce2f6d47976b6515480d9ac9b88227e614d46f1da296bbbc2d63" + sha256 cellar: :any_skip_relocation, monterey: "ae21a5cc0383684f7080eb62468d91db698f901c3ce4332e933b5a72edce3041" + sha256 cellar: :any_skip_relocation, big_sur: "cb6a7684e76b5d8eebc23776181cbf6a3e798b3c6a1156772c2fff010fd6fc12" + sha256 cellar: :any_skip_relocation, catalina: "3b9db819279bf4f5453b702fb4947564b69b57e237ba7fdc11e56431ada415ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "22151314103e03dba1c70db82812e1e7565fcf636b615d039f155a59217e050c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8512c76f2d7a4ed9535fad9ed424f0e0da8a39240bbd90448c3e37600b13d650" + end + + depends_on "go" => :build + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + require "pty" + require "io/console" + + cmd = "#{bin}/bombadillo gopher://bombadillo.colorfield.space" + r, w, pid = PTY.spawn({ "XDG_CONFIG_HOME" => testpath/".config" }, cmd) + r.winsize = [80, 43] + sleep 1 + w.write "q" + output = "" + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + assert_match "Bombadillo is a non-web browser", output + + status = PTY.check(pid) + refute_nil status + assert status.success? + end +end diff --git a/Formula/b/bombardier.rb b/Formula/b/bombardier.rb new file mode 100644 index 0000000000000..20a1652d44833 --- /dev/null +++ b/Formula/b/bombardier.rb @@ -0,0 +1,33 @@ +class Bombardier < Formula + desc "Cross-platform HTTP benchmarking tool" + homepage "https://github.com/codesenberg/bombardier" + url "https://github.com/codesenberg/bombardier/archive/refs/tags/v2.0.2.tar.gz" + sha256 "472b14b1c3be26a5f6254f6b7c24f86c9b756544baa5ca28cbfad06aacf7f4ac" + license "MIT" + head "https://github.com/codesenberg/bombardier.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b978ad033988b894ab8f8010b68e50cf7a3485ac575e7d1e4a0118913a400e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9485c29e3e9dadce928f167deea422c02238f212e5cf46b51de4e3298e25b2ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9485c29e3e9dadce928f167deea422c02238f212e5cf46b51de4e3298e25b2ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9485c29e3e9dadce928f167deea422c02238f212e5cf46b51de4e3298e25b2ec" + sha256 cellar: :any_skip_relocation, sonoma: "fb82f62d4fc9f0766effee00a2b90e8a1e4a05e06244598d1652c4cd8241d051" + sha256 cellar: :any_skip_relocation, ventura: "fb82f62d4fc9f0766effee00a2b90e8a1e4a05e06244598d1652c4cd8241d051" + sha256 cellar: :any_skip_relocation, arm64_linux: "1edb1ce74da03b755bb33b3c1c9c701bfc8b87a93f39e520d0212b27a1485e29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bcdfdcc9bfb6f81117fce7d1d7d169823c5b7bf15367af83ffdde9041953e9d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/bombardier --version 2>&1") + + url = "https://example.com" + output = shell_output("#{bin}/bombardier -c 1 -n 1 #{url}") + assert_match "Bombarding #{url} with 1 request(s) using 1 connection(s)", output + end +end diff --git a/Formula/b/bomber.rb b/Formula/b/bomber.rb new file mode 100644 index 0000000000000..eab559a97ad86 --- /dev/null +++ b/Formula/b/bomber.rb @@ -0,0 +1,37 @@ +class Bomber < Formula + desc "Scans Software Bill of Materials for security vulnerabilities" + homepage "https://github.com/devops-kung-fu/bomber" + url "https://github.com/devops-kung-fu/bomber/archive/refs/tags/v0.5.1.tar.gz" + sha256 "f4d8165ea9d3be0e88fdb33d35870588df308f31a4c40f14f09f0b68570f6ae1" + license "MPL-2.0" + head "https://github.com/devops-kung-fu/bomber.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "746c9ea4e2f8e3c20774f9b9f587d6efc5611b9ec93483b076f1158fdbfd9b06" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "989ad14e281150f655296b8aa8ca9a3d24965bbd690d9ce8db45163e92429004" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "989ad14e281150f655296b8aa8ca9a3d24965bbd690d9ce8db45163e92429004" + sha256 cellar: :any_skip_relocation, arm64_ventura: "989ad14e281150f655296b8aa8ca9a3d24965bbd690d9ce8db45163e92429004" + sha256 cellar: :any_skip_relocation, sonoma: "ebe873ca7a04da1270598e2067be206460afa6d3779582773fc60e1529a3386c" + sha256 cellar: :any_skip_relocation, ventura: "ebe873ca7a04da1270598e2067be206460afa6d3779582773fc60e1529a3386c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4990cf29a0f9a505ce0521327e90670810d2d62a8168cd18cc02f787c4f2f057" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59deb5d9be3344d651aeaa337219f5183857dcb09e1b460788f3549e57bc6d0d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"bomber", "completion") + + pkgshare.install "_TESTDATA_" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bomber --version") + + cp pkgshare/"_TESTDATA_/sbom/bomber.spdx.json", testpath + output = shell_output("#{bin}/bomber scan bomber.spdx.json") + assert_match "Total vulnerabilities found:", output + end +end diff --git a/Formula/b/bonnie++.rb b/Formula/b/bonnie++.rb new file mode 100644 index 0000000000000..b4103ba4704e5 --- /dev/null +++ b/Formula/b/bonnie++.rb @@ -0,0 +1,51 @@ +class Bonniexx < Formula + desc "Benchmark suite for file systems and hard drives" + homepage "https://www.coker.com.au/bonnie++/" + url "https://www.coker.com.au/bonnie++/bonnie++-2.00a.tgz" + sha256 "a8d33bbd81bc7eb559ce5bf6e584b9b53faea39ccfb4ae92e58f27257e468f0e" + license "GPL-2.0-only" + + livecheck do + url "https://doc.coker.com.au/projects/bonnie/" + regex(/href=.*?bonnie\+\+[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "751104c5d03e4f91086a337c4ed4b12acd1464170f67b994cf20ec30f6456176" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2cdb858040bf6e8c19142a19932a6aa6294c863a4b3f7b2faebd5ebcb945ee29" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "748ee8216cf3b93d071f7fd95977e3d7a7ef28dd3c73467b212ef9594b037f7d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb48f4977b6fffe6260f6adf6a20b15d0e33ef6f0f70a3d5fe36f3d1cd708c3c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0cfe1657cc446af26bc4d3f2cf50e4a804fa98539993a007ab13b466536cda1d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "902ceb61db37a6795eee8d7941a44633faa38bcd9c2a4b952bf837bab0ee6d59" + sha256 cellar: :any_skip_relocation, sonoma: "097a86502ffbab14bbae35829de5d631181c0ff0db9e214d1b7c6c3899e1d5c2" + sha256 cellar: :any_skip_relocation, ventura: "6f87cb770bbb2cac134625c7998bd3bc0974ceaaf9d352045a5659adba6d6ae6" + sha256 cellar: :any_skip_relocation, monterey: "d6203a132a5f2e56a85356d5dd9c4545af59e7199b72eaca3a9571d171322d5a" + sha256 cellar: :any_skip_relocation, big_sur: "75e1876579c6638c1e4c0509af5c76950ae379b034e6a051d091593cb08c1ddd" + sha256 cellar: :any_skip_relocation, catalina: "83df0761686086ae64a3c08433613908d9c39d85daa7f81011b5bd70d2d5eb3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d88efefa2ddd179f4ba11870b49a1c4166b44be03930ed9b801c070dd6f86ceb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0418a37628a09a44eeb05aecca9b6fc6149dcfdf40729d4a41f754f030fac51" + end + + # Remove the #ifdef _LARGEFILE64_SOURCE macros which not only prohibits the + # intended functionality of splitting into 2 GB files for such filesystems but + # also incorrectly tests for it in the first place. The ideal fix would be to + # replace the AC_TRY_RUN() in configure.in if the fail code actually worked. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bonnie%2B%2B/remove-large-file-support-macros.diff" + sha256 "368a7ea0cf202a169467efb81cb6649c1b6306999ccd54b85641fd4b458a46b7" + end + + def install + ENV.cxx11 + system "./configure", "--disable-debug", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system "#{sbin}/bonnie++", "-s", "0" + end +end diff --git a/Formula/b/bookloupe.rb b/Formula/b/bookloupe.rb new file mode 100644 index 0000000000000..0589ce2a4df9c --- /dev/null +++ b/Formula/b/bookloupe.rb @@ -0,0 +1,61 @@ +class Bookloupe < Formula + desc "List common formatting errors in a Project Gutenberg candidate file" + homepage "http://www.juiblex.co.uk/pgdp/bookloupe/" + url "http://www.juiblex.co.uk/pgdp/bookloupe/bookloupe-2.0.tar.gz" + sha256 "15b1f5a0fa01e7c0a0752c282f8a354d3dc9edbefc677e6e42044771d5abe3c9" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?bookloupe[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5fdd9c33dda4df9eb880724c9ebf43aba9c5c9ebcd3eaa3659c06dee3506a9af" + sha256 cellar: :any, arm64_sequoia: "7ba3e588146783e6f0257c71de17fd54e6f4690c272790982b98f58bbfbf62f3" + sha256 cellar: :any, arm64_sonoma: "24bf9a6ae43fe3f89408a72d83f31b770ed3a34b8cd1bc2a8966418015b0035c" + sha256 cellar: :any, arm64_ventura: "4421a88b7f0f464d3469a652e232134ae0f9402c48201515a3c04f9e9f267c45" + sha256 cellar: :any, arm64_monterey: "f981bcea12ecb29401b723391ccf8a7b47ba68bf57dd7277cc4474fc3e0767af" + sha256 cellar: :any, arm64_big_sur: "52b3382b76c8ef2e8edd46e3bcbe56620d659713f0e8fc4a4fe3e109fc25d7ca" + sha256 cellar: :any, sonoma: "ee90301308017763e04f2d40a2ba8e50a3adb0b9015e23f59f1b211ce3563c69" + sha256 cellar: :any, ventura: "f39f6f8a9a229fcd14e1784dd57f1215afae5f8473ce0508392e64ba8063d540" + sha256 cellar: :any, monterey: "b2df92066e4e19f5a6c9eb4c0784b9f736e1e9043dcb83798e7f2bdf02295942" + sha256 cellar: :any, big_sur: "7ccdee4a97e6c705e478e38aeca1648b06a39c2edfcfa807a4a07ab12eb0d3c8" + sha256 cellar: :any, catalina: "83e920e882a00717b094b14477917ed477fa3ab9ae02433d79bf4d374d5723a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0c355266c0aa5d07d939056e39cd9747d893d84e8f80814d7b75d6483e8ddba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b7cdc047eeed0574f7b0c8bccae751fa4b047b0a2aa30d71153960b75b52444" + end + + depends_on "pkgconf" => :build + + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--disable-silent-rules", *args, *std_configure_args + system "make", "install" + end + + test do + ENV["BOOKLOUPE"] = bin/"bookloupe" + + Dir["#{pkgshare}/*.tst"].each do |test_file| + # Skip test that fails on macOS + # http://project.juiblex.co.uk/bugzilla/show_bug.cgi?id=39 + # (bugzilla page is not publicly accessible) + next if test_file.end_with?("/markup.tst") + + system bin/"loupe-test", test_file + end + end +end diff --git a/Formula/b/boolector.rb b/Formula/b/boolector.rb new file mode 100644 index 0000000000000..90bd7e8622509 --- /dev/null +++ b/Formula/b/boolector.rb @@ -0,0 +1,77 @@ +class Boolector < Formula + desc "SMT solver for fixed-size bit-vectors" + homepage "https://boolector.github.io/" + url "https://github.com/Boolector/boolector/archive/refs/tags/3.2.4.tar.gz" + sha256 "249c6dbf4e52ea6e8df1ddf7965d47f5c30f2c14905dce9b8f411756b05878bf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c36e9fe92bb625ab45e83a8b889a4f29264b4a6dca0b5da3e72c133724b6ddd2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb34a8aa518c75108be45137f5f72401f2a429d5c2aa5485e4addf5f9b7e2397" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a1cc2c76b073b53af089a7f14191ffaf3d2f5cc72946ad10456e56b4c05c24cb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "59043051dc8c304152d395edc3d3460af08a95922fbc0bb7014a0041be9813aa" + sha256 cellar: :any_skip_relocation, sonoma: "4a4617f2272b60e1abed3faa99242423bdae8d761d508abe457b68487f91a030" + sha256 cellar: :any_skip_relocation, ventura: "9c19e47efd028a1a3104a53a1102d30ebc239828b5756461e2a7df222c1ee98d" + sha256 cellar: :any_skip_relocation, monterey: "7b93dcb7a6974662f62d5bd7b24138117d80d474ca82c3eca2ba42d138040631" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6312b85c8f97aafbe24c940186b4fb2e12990ca54e93fe5edf29401b7966081" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4745395152455d49e3833ee69624a437e36fba98caf9d1d57f0c168d3e9034ca" + end + + deprecate! date: "2024-08-24", because: :repo_archived + disable! date: "2025-08-24", because: :repo_archived + + depends_on "cmake" => :build + + # Use commit hash from `contrib/setup-lingeling.sh` + resource "lingeling" do + url "https://github.com/arminbiere/lingeling/archive/7d5db72420b95ab356c98ca7f7a4681ed2c59c70.tar.gz" + sha256 "cf04c8f5706c14f00dd66e4db529c48513a450cc0f195242d8d0762b415f4427" + end + + # Use commit has from `contrib/setup-btor2tools.sh` + resource "btor2tools" do + url "https://github.com/boolector/btor2tools/archive/037f1fa88fb439dca6f648ad48a3463256d69d8b.tar.gz" + sha256 "d6a5836b9e26719c3b7fe1711d93d86ca4720dc9d4bac11d1fc006fa0a140965" + end + + def install + deps_dir = buildpath/"deps/install" + + resource("lingeling").stage do + system "./configure.sh", "-fPIC" + system "make" + (deps_dir/"lib").install "liblgl.a" + (deps_dir/"include").install "lglib.h" + end + + resource("btor2tools").stage do + system "./configure.sh", 'CFLAGS="-fPIC"', "--static" + cd "build" do + system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF" if OS.mac? + system "make" + end + (deps_dir/"lib").install "build/lib/libbtor2parser.a" + (deps_dir/"include/btor2parser").install "src/btor2parser/btor2parser.h" + end + + args = %W[ + -DBtor2Tools_INCLUDE_DIR=#{deps_dir}/include/btor2parser + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.btor").write <<~EOS + (set-logic BV) + (declare-fun x () (_ BitVec 4)) + (declare-fun y () (_ BitVec 4)) + (assert (= (bvadd x y) (_ bv6 4))) + (check-sat) + (get-value (x y)) + EOS + assert_match "sat", shell_output("#{bin}/boolector test.btor 2>/dev/null", 1) + end +end diff --git a/Formula/b/boom-completion.rb b/Formula/b/boom-completion.rb new file mode 100644 index 0000000000000..b39f0edabe077 --- /dev/null +++ b/Formula/b/boom-completion.rb @@ -0,0 +1,25 @@ +class BoomCompletion < Formula + desc "Bash and Zsh completion for Boom" + homepage "https://zachholman.com/boom/" + url "https://github.com/holman/boom/archive/refs/tags/v0.5.0.tar.gz" + sha256 "d107accf1fb84d9c245bb25383486179605d3b397c439c2f4690341283b0b2dd" + license "MIT" + head "https://github.com/holman/boom.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "05b587e612fdff3439b6618c062c1f7b5f13332e3b8e7645d80cf5d5f023d276" + end + + def install + bash_completion.install "completion/boom.bash" => "boom" + zsh_completion.install "completion/boom.zsh" => "_boom" + end + + test do + assert_match "-F _boom_complete", + shell_output("bash -c 'source #{bash_completion}/boom && complete -p boom'") + end +end diff --git a/Formula/b/boost-bcp.rb b/Formula/b/boost-bcp.rb new file mode 100644 index 0000000000000..48c0402abd59d --- /dev/null +++ b/Formula/b/boost-bcp.rb @@ -0,0 +1,39 @@ +class BoostBcp < Formula + desc "Utility for extracting subsets of the Boost library" + homepage "https://github.com/boostorg/bcp" + url "https://github.com/boostorg/boost/releases/download/boost-1.89.0/boost-1.89.0-b2-nodocs.tar.xz" + sha256 "875cc413afa6b86922b6df3b2ad23dec4511c8a741753e57c1129e7fa753d700" + license "BSL-1.0" + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + formula "boost" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "96bb9f9ea9bce6c06ea76bdb499978bc8a1691f001300086bb6a701b7f08c527" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "059e29a6e5ea0282d89e00824f9168dbfdfdb2a9416a354ce1d7deadf1406537" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e77de405349c635ed203adda0209ccb2e10181119b276f7fff7d194adcab42e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83553dbc596a673f145c29f598e7eda0a44103de1e63faa23d4d0289a7ee8627" + sha256 cellar: :any_skip_relocation, sonoma: "97d8d7f656803a4a414d3191eac351a6b2fee75b47b2e74ebb681e0fc3a525ab" + sha256 cellar: :any_skip_relocation, ventura: "f9adcbf91edc0f6201d5aa12c93e093ec1038b3ba91cab078503ea04c50f946e" + sha256 cellar: :any_skip_relocation, arm64_linux: "174209b11a9b545d078176bcc3496419f1f1542f29f07e634a5d51646c6c3a87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "616522539f98f8b39c4482feb06d59f1d6691254f715e4162013f8f2786d6799" + end + + depends_on "boost-build" => :build + depends_on "boost" => :test + + def install + cd "tools/bcp" do + system "b2" + prefix.install "../../dist/bin" + end + end + + test do + system bin/"bcp", "--boost=#{Formula["boost"].opt_include}", "--scan", "./" + end +end diff --git a/Formula/b/boost-build.rb b/Formula/b/boost-build.rb new file mode 100644 index 0000000000000..a7551c863ab03 --- /dev/null +++ b/Formula/b/boost-build.rb @@ -0,0 +1,49 @@ +class BoostBuild < Formula + desc "C++ build system" + homepage "https://www.boost.org/build/" + url "https://github.com/boostorg/build/archive/refs/tags/boost-1.89.0.tar.gz" + sha256 "8a154f61e8adfcaba21a54fdbfdeb5cda7fdef374ff1ad79be69644d9c2a97e2" + license "BSL-1.0" + version_scheme 1 + head "https://github.com/boostorg/build.git", branch: "develop" + + livecheck do + url :stable + regex(/^boost[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10da335480790cb39789466ea5a3bdd0dce3b0359e91438bd9bd52a2c636fa7d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f75f1d6345e7a8baf6d53c8f6e4db2d8dbe4724cfa9598bd7b0c05dbf8d4b3d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db0291a1760491d3200261e602785582bebf9687dd90ba3bbc5520e13f5ac98e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "777cf16f0dae799ee70b010775af19039180f9f4d5c2e2169aaa6bd19c42d2d0" + sha256 cellar: :any_skip_relocation, sonoma: "6816d550d826219ade18757195a78ff7636766def2e76a85de4e36347e56803b" + sha256 cellar: :any_skip_relocation, ventura: "01f05d1cc97c282b9c73eaee808b5816ba5238918d5a1a356bd242d69358cc5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "94cdd3d42c76dbed25b99daebe2ed2b771aaafb81e86e03ea90ec43b478e9806" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e581fb61742fc45c76ff67590d7ca781ab23085f92dfc6d4cc1ef8f1fee23c16" + end + + conflicts_with "b2-tools", because: "both install `b2` binaries" + + def install + system "./bootstrap.sh" + system "./b2", "--prefix=#{prefix}", "install" + end + + test do + (testpath/"hello.cpp").write <<~CPP + #include + int main (void) { std::cout << "Hello world"; } + CPP + (testpath/"Jamroot.jam").write <<~JAM + exe hello : hello.cpp ; + install install-bin : hello : "#{testpath}" ; + JAM + + system bin/"b2", "release" + assert_path_exists testpath/"hello" + assert_equal "Hello world", shell_output("./hello") + end +end diff --git a/Formula/b/boost-mpi.rb b/Formula/b/boost-mpi.rb new file mode 100644 index 0000000000000..6c825f7126047 --- /dev/null +++ b/Formula/b/boost-mpi.rb @@ -0,0 +1,131 @@ +class BoostMpi < Formula + desc "C++ library for C++/MPI interoperability" + homepage "https://www.boost.org/" + url "https://github.com/boostorg/boost/releases/download/boost-1.89.0/boost-1.89.0-b2-nodocs.tar.xz" + sha256 "875cc413afa6b86922b6df3b2ad23dec4511c8a741753e57c1129e7fa753d700" + license "BSL-1.0" + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + formula "boost" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "c6edda64a7d7a6059b344c382396548e0ebdcf137df5d39aed8bf9b51082dd30" + sha256 arm64_sequoia: "672ed016041a801f917f6af5b658ce812c06b81cd93eab69c7d0fe21556b0a13" + sha256 arm64_sonoma: "df7e86c4c7dcb10b3da2c910e46d640f07177035885316a699a07e8304e66e6c" + sha256 arm64_ventura: "c7a2c303322325c161bf56029e1262d0f94ebe14ee4a8fda4d2fd2c6099a8999" + sha256 sonoma: "80a9bdf93a85c1c321ff4e43cf4cbffee750f8e70dee7a4932d55944ea507fe8" + sha256 ventura: "f350e5f67e5b5b87fa3ca7528d916d796af8f16ddd3b72c8b40f895275d77761" + sha256 cellar: :any_skip_relocation, arm64_linux: "494f0a3fa0ba367dcea8a923a32039302f4ee96d9c89b31b23c063e7b435188b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "666c9bf5cd91ade6ea3a849b68dd1a47769db902888f6d24930162f364eb4b53" + end + + # Test with cmake to avoid issues like: + # https://github.com/Homebrew/homebrew-core/issues/67285 + depends_on "cmake" => :test + depends_on "boost" + depends_on "open-mpi" + + def install + # "layout" should be synchronized with boost + args = %W[ + -d2 + -j#{ENV.make_jobs} + --layout=system + --user-config=user-config.jam + install + threading=multi + link=shared,static + ] + + # Trunk starts using "clang++ -x c" to select C compiler which breaks C++11 + # handling using ENV.cxx11. Using "cxxflags" and "linkflags" still works. + args << "cxxflags=-std=c++11" + args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang + + # Avoid linkage to boost container and graph modules + # Issue ref: https://github.com/boostorg/boost/issues/985 + args << "linkflags=-Wl,-dead_strip_dylibs" if OS.mac? + + open("user-config.jam", "a") do |file| + if OS.mac? + file.write "using darwin : : #{ENV.cxx} ;\n" + else + file.write "using gcc : : #{ENV.cxx} ;\n" + end + file.write "using mpi ;\n" + end + + system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}", "--with-libraries=mpi" + + system "./b2", + "--prefix=install-mpi", + "--libdir=install-mpi/lib", + *args + + lib.install Dir["install-mpi/lib/*mpi*"] + (lib/"cmake").install Dir["install-mpi/lib/cmake/*mpi*"] + + if OS.mac? + # libboost_mpi links to libboost_serialization, which comes from the main boost formula + boost = Formula["boost"] + MachO::Tools.change_install_name("#{lib}/libboost_mpi.dylib", + "libboost_serialization.dylib", + "#{boost.lib}/libboost_serialization.dylib") + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + namespace mpi = boost::mpi; + + int main(int argc, char* argv[]) + { + mpi::environment env(argc, argv); + mpi::communicator world; + + if (world.rank() == 0) { + world.send(1, 0, std::string("Hello")); + std::string msg; + world.recv(1, 1, msg); + std::cout << msg << "!" << std::endl; + } else { + std::string msg; + world.recv(0, 0, msg); + std::cout << msg << ", "; + std::cout.flush(); + world.send(0, 1, std::string("world")); + } + + return 0; + } + CPP + + boost = Formula["boost"] + args = ["-L#{lib}", + "-L#{boost.lib}", + "-lboost_mpi", + "-lboost_serialization", + "-std=c++14"] + + if OS.linux? + args << "-Wl,-rpath,#{lib}" + args << "-Wl,-rpath,#{boost.lib}" + end + + system "mpic++", "test.cpp", *args, "-o", "test" + system "mpirun", "-np", "2", "./test" + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + find_package(Boost COMPONENTS mpi REQUIRED) + CMAKE + system "cmake", ".", "-Wno-dev" + end +end diff --git a/Formula/b/boost-python3.rb b/Formula/b/boost-python3.rb new file mode 100644 index 0000000000000..add51790a2181 --- /dev/null +++ b/Formula/b/boost-python3.rb @@ -0,0 +1,122 @@ +class BoostPython3 < Formula + desc "C++ library for C++/Python3 interoperability" + homepage "https://www.boost.org/" + url "https://github.com/boostorg/boost/releases/download/boost-1.89.0/boost-1.89.0-b2-nodocs.tar.xz" + sha256 "875cc413afa6b86922b6df3b2ad23dec4511c8a741753e57c1129e7fa753d700" + license "BSL-1.0" + revision 1 + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + formula "boost" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2fd4e2d3a8336e69231b449595d8106c8063ee1338b34e70e63bfca2143a3e2f" + sha256 cellar: :any, arm64_sequoia: "0ab536d70fa86ca34cfc414ab7039dd021bf84b02aece6d428d0d7283e5c7524" + sha256 cellar: :any, arm64_sonoma: "5182495303b64350e28ddb198f62663e40197eb1f2eca0188457d61c3ee1f212" + sha256 cellar: :any, sonoma: "8a03cbb7539ccc15ca16d6a271de8a9314a46d2b4ba8089216445fdebb1ca004" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d50c7bba1a1d00830067a11704e231feb60733c42ff78fc00d332c49c2e21bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "566977624d477de6a4e590776cba1e0cdeb7b22ff3b03ded5a1afb8ca2c4355b" + end + + depends_on "numpy" => :build + depends_on "boost" + depends_on "python@3.14" + + def python3 + "python3.14" + end + + def install + # "layout" should be synchronized with boost + args = %W[ + -d2 + -j#{ENV.make_jobs} + --layout=system + --user-config=user-config.jam + install + threading=multi + link=shared,static + ] + + # Boost is using "clang++ -x c" to select C compiler which breaks C++14 + # handling using ENV.cxx14. Using "cxxflags" and "linkflags" still works. + args << "cxxflags=-std=c++14" + args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang + + # Avoid linkage to boost container and graph modules + # Issue ref: https://github.com/boostorg/boost/issues/985 + args << "linkflags=-Wl,-dead_strip_dylibs" if OS.mac? + + # disable python detection in bootstrap.sh; it guesses the wrong include + # directory for Python 3 headers, so we configure python manually in + # user-config.jam below. + inreplace "bootstrap.sh", "using python", "#using python" + + pyver = Language::Python.major_minor_version python3 + py_prefix = if OS.mac? + Formula["python@#{pyver}"].opt_frameworks/"Python.framework/Versions"/pyver + else + Formula["python@#{pyver}"].opt_prefix + end + + # Force boost to compile with the desired compiler + (buildpath/"user-config.jam").write <<~EOS + using #{OS.mac? ? "darwin" : "gcc"} : : #{ENV.cxx} ; + using python : #{pyver} + : #{python3} + : #{py_prefix}/include/python#{pyver} + : #{py_prefix}/lib ; + EOS + + system "./bootstrap.sh", "--prefix=#{prefix}", + "--libdir=#{lib}", + "--with-libraries=python", + "--with-python=#{python3}", + "--with-python-root=#{py_prefix}" + + system "./b2", "--build-dir=build-python3", + "--stagedir=stage-python3", + "--libdir=install-python3/lib", + "--prefix=install-python3", + "python=#{pyver}", + *args + + lib.install buildpath.glob("install-python3/lib/*{python,numpy}*") + (lib/"cmake").install buildpath.glob("install-python3/lib/cmake/*{python,numpy}*") + + # Fix the path to headers installed in `boost` formula + cmake_configs = lib.glob("cmake/boost_{python,numpy}*/boost_{python,numpy}-config.cmake") + inreplace cmake_configs, '(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/" ABSOLUTE)', + "(_BOOST_INCLUDEDIR \"#{Formula["boost"].opt_include}/\" ABSOLUTE)" + end + + test do + (testpath/"hello.cpp").write <<~CPP + #include + char const* greet() { + return "Hello, world!"; + } + BOOST_PYTHON_MODULE(hello) + { + boost::python::def("greet", greet); + } + CPP + + pyincludes = shell_output("#{python3}-config --includes").chomp.split + pylib = shell_output("#{python3}-config --ldflags --embed").chomp.split + pyver = Language::Python.major_minor_version(python3).to_s.delete(".") + + system ENV.cxx, "-shared", "-fPIC", "-std=c++14", "hello.cpp", "-L#{lib}", "-lboost_python#{pyver}", + "-o", "hello.so", *pyincludes, *pylib + + output = <<~PYTHON + import hello + print(hello.greet()) + PYTHON + assert_match "Hello, world!", pipe_output(python3, output, 0) + end +end diff --git a/Formula/b/boost.rb b/Formula/b/boost.rb new file mode 100644 index 0000000000000..d2c4e2a61976c --- /dev/null +++ b/Formula/b/boost.rb @@ -0,0 +1,147 @@ +class Boost < Formula + desc "Collection of portable C++ source libraries" + homepage "https://www.boost.org/" + url "https://github.com/boostorg/boost/releases/download/boost-1.89.0/boost-1.89.0-b2-nodocs.tar.xz" + sha256 "875cc413afa6b86922b6df3b2ad23dec4511c8a741753e57c1129e7fa753d700" + license "BSL-1.0" + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + url "https://www.boost.org/users/download/" + regex(/href=.*?boost[._-]v?(\d+(?:[._]\d+)+)\.t/i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match.first.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "e9745a842c4035440724322d59aca19d1688485a330b6db60bf859dd3e540c0a" + sha256 arm64_sequoia: "e426fe85650221c715219ff5b86573b43889f48e41f2bc3329185e99d01c4481" + sha256 arm64_sonoma: "a149224ca5e08f36632f69f77e732f0efcbf97f65baada6e515c7f55ba22ff68" + sha256 arm64_ventura: "41327f524cff0592f6bdf53325eee9832e1337cce401f0f0a80a5bc9a93226bc" + sha256 cellar: :any, sonoma: "eb36169206c88a8e9c921516356b8e48cd2019bae7210511e46f83dc9428760e" + sha256 cellar: :any, ventura: "60c15a0814630f5deb9142d94396dc52360d01b201457c4092873fc2c6d41ca8" + sha256 cellar: :any_skip_relocation, arm64_linux: "92d10c7a9e662292953e52bc5eb707f81cd54373c6587d1c6cd0b9719500e662" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bbe66a1b57f7696e9f6815a1a0aef5e476827840a010dcc76a097ac2bf5ea6f" + end + + depends_on "icu4c@77" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # Fix for `ncmpcpp`, pr ref: https://github.com/boostorg/range/pull/157 + patch :p3 do + url "https://github.com/boostorg/range/commit/9ac89e9936b826c13e90611cb9a81a7aa0508d20.patch?full_index=1" + sha256 "914464ffa1d53b3bf56ee0ff1a78c25799170c99c9a1cda075e6298f730236ad" + directory "boost" + end + + def install + # Force boost to compile with the desired compiler + open("user-config.jam", "a") do |file| + if OS.mac? + file.write "using darwin : : #{ENV.cxx} ;\n" + else + file.write "using gcc : : #{ENV.cxx} ;\n" + end + end + + # libdir should be set by --prefix but isn't + icu4c = deps.map(&:to_formula).find { |f| f.name.match?(/^icu4c@\d+$/) } + bootstrap_args = %W[ + --prefix=#{prefix} + --libdir=#{lib} + --with-icu=#{icu4c.opt_prefix} + ] + + # Handle libraries that will not be built. + without_libraries = ["python", "mpi"] + + # Boost.Log cannot be built using Apple GCC at the moment. Disabled + # on such systems. + without_libraries << "log" if ENV.compiler == :gcc + + bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" + + # layout should be synchronized with boost-python and boost-mpi + args = %W[ + --prefix=#{prefix} + --libdir=#{lib} + -d2 + -j#{ENV.make_jobs} + --layout=system + --user-config=user-config.jam + install + threading=multi + link=shared,static + ] + + # Boost is using "clang++ -x c" to select C compiler which breaks C++ + # handling in superenv. Using "cxxflags" and "linkflags" still works. + # C++17 is due to `icu4c`. + args << "cxxflags=-std=c++17" + args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang + + system "./bootstrap.sh", *bootstrap_args + system "./b2", "headers" + system "./b2", *args + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + + using namespace boost::algorithm; + using namespace boost::iostreams; + using namespace std; + + int main() + { + string str("a,b"); + vector strVec; + split(strVec, str, is_any_of(",")); + assert(strVec.size()==2); + assert(strVec[0]=="a"); + assert(strVec[1]=="b"); + + // Test boost::iostreams::zstd_compressor() linking + std::vector v; + back_insert_device> snk{v}; + filtering_ostream os; + os.push(zstd_compressor()); + os.push(snk); + os << "Boost" << std::flush; + os.pop(); + + array_source src{v.data(), v.size()}; + filtering_istream is; + is.push(zstd_decompressor()); + is.push(src); + std::string s; + is >> s; + + assert(s == "Boost"); + + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++14", "-o", "test", "-L#{lib}", "-lboost_iostreams", + "-L#{Formula["zstd"].opt_lib}", "-lzstd" + system "./test" + end +end diff --git a/Formula/b/boost@1.76.rb b/Formula/b/boost@1.76.rb new file mode 100644 index 0000000000000..52d1876c64ffc --- /dev/null +++ b/Formula/b/boost@1.76.rb @@ -0,0 +1,112 @@ +class BoostAT176 < Formula + desc "Collection of portable C++ source libraries" + homepage "https://www.boost.org/" + url "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2" + sha256 "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41" + license "BSL-1.0" + revision 6 + + bottle do + sha256 cellar: :any, arm64_sequoia: "5fa1820397b30bc594fc77f937a99af346f8e41340d532a13f59e31c7076f0ea" + sha256 cellar: :any, arm64_sonoma: "bf2654e857a043032de6fe7fc6c8388a52ee86338dbbfdedc28617bac22f2df4" + sha256 cellar: :any, arm64_ventura: "3966bc23fe94abc372ddb6b2c1d07846ee9c1b2c99793a125c73f36c5f43d0af" + sha256 cellar: :any, sonoma: "f570c9d3c4e1d1cef19a21761de8b2dc6748445da6dc067457d5e950c023dd1a" + sha256 cellar: :any, ventura: "5879acd1c2d7f1067f365f9cb705ffd0aeb5dec9a8346ce3ec770e4220ddeb2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6c27b35876867779cfab02b6db3f56595494935da83e1b8c5a3bd4401c4aeae" + end + + keg_only :versioned_formula + + disable! date: "2024-12-14", because: :versioned_formula + + depends_on "icu4c@74" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # Backport fixes for newer Clang + patch :p2 do + url "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a.patch?full_index=1" + sha256 "d96761257f7efc2edc8414f1a2522fc07a3d7d56bb55a51d14af9abd39e389c8" + end + patch :p2 do + url "https://github.com/boostorg/mpl/commit/b37b709cbdb6b2c285fb808dab985aa005786351.patch?full_index=1" + sha256 "b8013ad3e6b63698158319f5efc2fe1558a00c1d2e32193086f741e774acc3e4" + end + + def install + # Force boost to compile with the desired compiler + open("user-config.jam", "a") do |file| + if OS.mac? + file.write "using darwin : : #{ENV.cxx} ;\n" + else + file.write "using gcc : : #{ENV.cxx} ;\n" + end + end + + # libdir should be set by --prefix but isn't + icu4c_prefix = Formula["icu4c@74"].opt_prefix + bootstrap_args = %W[ + --prefix=#{prefix} + --libdir=#{lib} + --with-icu=#{icu4c_prefix} + ] + + # Handle libraries that will not be built. + without_libraries = ["python", "mpi"] + + # Boost.Log cannot be built using Apple GCC at the moment. Disabled + # on such systems. + without_libraries << "log" if ENV.compiler == :gcc + + bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" + + # layout should be synchronized with boost-python and boost-mpi + args = %W[ + --prefix=#{prefix} + --libdir=#{lib} + -d2 + -j#{ENV.make_jobs} + --layout=tagged-1.66 + --user-config=user-config.jam + -sNO_LZMA=1 + -sNO_ZSTD=1 + install + threading=multi,single + link=shared,static + ] + + # Boost is using "clang++ -x c" to select C compiler which breaks C++14 + # handling using ENV.cxx14. Using "cxxflags" and "linkflags" still works. + args << "cxxflags=-std=c++14" + args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang + + system "./bootstrap.sh", *bootstrap_args + system "./b2", "headers" + system "./b2", *args + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + using namespace boost::algorithm; + using namespace std; + + int main() + { + string str("a,b"); + vector strVec; + split(strVec, str, is_any_of(",")); + assert(strVec.size()==2); + assert(strVec[0]=="a"); + assert(strVec[1]=="b"); + return 0; + } + CPP + system ENV.cxx, "-I#{Formula["boost@1.76"].opt_include}", "test.cpp", "-std=c++14", "-o", "test" + system "./test" + end +end diff --git a/Formula/b/boost@1.85.rb b/Formula/b/boost@1.85.rb new file mode 100644 index 0000000000000..4582ba1c2367f --- /dev/null +++ b/Formula/b/boost@1.85.rb @@ -0,0 +1,141 @@ +class BoostAT185 < Formula + desc "Collection of portable C++ source libraries" + homepage "https://www.boost.org/" + url "https://github.com/boostorg/boost/releases/download/boost-1.85.0/boost-1.85.0-b2-nodocs.tar.xz" + sha256 "09f0628bded81d20b0145b30925d7d7492fd99583671586525d5d66d4c28266a" + license "BSL-1.0" + revision 3 + + bottle do + sha256 arm64_tahoe: "db92e2332e0b99c30bb4329502aebb9d2b044b27a1cc85c1a72ed8c71b78354e" + sha256 arm64_sequoia: "0d57280eb03360e23f3693d33604711f5912a47c6400fbcf7a78ce4829d35db6" + sha256 arm64_sonoma: "a4d8d3af279e68a17a5d177dfbb716757d59b91448ba82dc8c015bc8749b6e0c" + sha256 arm64_ventura: "c60cdfef891f2f447509c8a460db5fd1b16e07111c7169457044eaa46674c9f3" + sha256 cellar: :any, sonoma: "21d45293e2b2ded9f5ac1c8bfa04867fd0e5d02f15911aa24e73a69665968d69" + sha256 cellar: :any, ventura: "834cb3ac5b69ae8a4768e2e1773798d7a1ae01aadb761a9e737ff84b8d07a837" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7fd2dc979f3b442f80669bfbb081f05eae3bfa4dd12fa46d21594154104600f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1afa1ddd0506aa3991d3e6b86941fb066fae250feecc9adeaad82780efac55da" + end + + keg_only :versioned_formula + + deprecate! date: "2025-04-05", because: :versioned_formula + + depends_on "icu4c@77" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + # Force boost to compile with the desired compiler + open("user-config.jam", "a") do |file| + if OS.mac? + file.write "using darwin : : #{ENV.cxx} ;\n" + else + file.write "using gcc : : #{ENV.cxx} ;\n" + end + end + + # libdir should be set by --prefix but isn't + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + bootstrap_args = %W[ + --prefix=#{prefix} + --libdir=#{lib} + --with-icu=#{icu4c.opt_prefix} + ] + + # Handle libraries that will not be built. + without_libraries = ["python", "mpi"] + + # Boost.Log cannot be built using Apple GCC at the moment. Disabled + # on such systems. + without_libraries << "log" if ENV.compiler == :gcc + + bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" + + # layout should be synchronized with boost-python and boost-mpi + args = %W[ + --prefix=#{prefix} + --libdir=#{lib} + -d2 + -j#{ENV.make_jobs} + --layout=tagged-1.66 + --user-config=user-config.jam + install + threading=multi,single + link=shared,static + ] + + # Boost is using "clang++ -x c" to select C compiler which breaks C++ + # handling in superenv. Using "cxxflags" and "linkflags" still works. + # C++17 is due to `icu4c`. + args << "cxxflags=-std=c++17" + args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang + + # Workaround mentioned in build error: + # > Define `BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK` to + # > suppress this error if the library would not be used with libc++ runtime + # > (for example, it would be only used with GCC runtime) + args << "define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK" if OS.linux? && Hardware::CPU.arm? + + system "./bootstrap.sh", *bootstrap_args + system "./b2", "headers" + system "./b2", *args + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + + using namespace boost::algorithm; + using namespace boost::iostreams; + using namespace std; + + int main() + { + string str("a,b"); + vector strVec; + split(strVec, str, is_any_of(",")); + assert(strVec.size()==2); + assert(strVec[0]=="a"); + assert(strVec[1]=="b"); + + // Test boost::iostreams::zstd_compressor() linking + std::vector v; + back_insert_device> snk{v}; + filtering_ostream os; + os.push(zstd_compressor()); + os.push(snk); + os << "Boost" << std::flush; + os.pop(); + + array_source src{v.data(), v.size()}; + filtering_istream is; + is.push(zstd_decompressor()); + is.push(src); + std::string s; + is >> s; + + assert(s == "Boost"); + + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++14", "-o", "test", "-I#{include}", + "-L#{lib}", "-lboost_iostreams", "-L#{Formula["zstd"].opt_lib}", "-lzstd" + system "./test" + end +end diff --git a/Formula/b/boot-clj.rb b/Formula/b/boot-clj.rb new file mode 100644 index 0000000000000..a2283e360d60b --- /dev/null +++ b/Formula/b/boot-clj.rb @@ -0,0 +1,31 @@ +class BootClj < Formula + desc "Build tooling for Clojure" + homepage "https://boot-clj.github.io/" + url "https://github.com/boot-clj/boot/releases/download/2.8.3/boot.jar" + sha256 "31f001988f580456b55a9462d95a8bf8b439956906c8aca65d3656206aa42ec7" + license "EPL-1.0" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fa2f333dd444cb3c41bd9252450e72fcb6c5182017df0012b67da09acc52d619" + end + + depends_on "openjdk" + + def install + libexec.install "boot.jar" + (bin/"boot").write <<~SHELL + #!/bin/bash + export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + declare -a "options=($BOOT_JVM_OPTIONS)" + exec "${JAVA_HOME}/bin/java" "${options[@]}" -Dboot.app.path="#{bin}/boot" -jar "#{libexec}/boot.jar" "$@" + SHELL + end + + test do + system bin/"boot", "repl", "-e", "(System/exit 0)" + end +end diff --git a/Formula/b/bootloadhid.rb b/Formula/b/bootloadhid.rb new file mode 100644 index 0000000000000..5f37e18e18ca0 --- /dev/null +++ b/Formula/b/bootloadhid.rb @@ -0,0 +1,43 @@ +class Bootloadhid < Formula + desc "HID-based USB bootloader for AVR microcontrollers" + homepage "https://www.obdev.at/products/vusb/bootloadhid.html" + url "https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz" + sha256 "154e7e38629a3a2eec2df666edfa1ee2f2e9a57018f17d9f0f8f064cc20d8754" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + + livecheck do + url :homepage + regex(/href=.*?bootloadHID[._-]v?(\d{4}-\d{1,2}-\d{1,2})\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b761a6cb6b73fde389f5aee23438b696185418e0f9c77775b7f93b83ed686a6" + sha256 cellar: :any, arm64_sequoia: "0c8755c106cb46118e33efda3ce06c507bc13949530ee87f10b4807c8cbcc55a" + sha256 cellar: :any, arm64_sonoma: "b7ff675ef48886f1dade51bab419acf430f6b0d19df5e3789231096bc15ebece" + sha256 cellar: :any, arm64_ventura: "2abf7dd9ed6601a8f2f42073b64abb33d20f7e81fdfd9d296f5441987d2054fe" + sha256 cellar: :any, arm64_monterey: "9abfe94becc61f67c3a5b02d650fb723c38307b582efbdb606948076162a03c5" + sha256 cellar: :any, arm64_big_sur: "43f9864d0cf06fe06fbbb26c95b592cb2fc39c06090187deff8f81b8b35fc12f" + sha256 cellar: :any, sonoma: "71cb01dcdccd3e01d4e99e23a5c6e78b0becf9921fc67645c54a3a06c71e2a47" + sha256 cellar: :any, ventura: "c7da175a271d8319af4c4fe923a2e1b1008be1bfc4ab99b1c0c59d3748f257c3" + sha256 cellar: :any, monterey: "aab53c65d93ea7a1274a39fc195e7e0599a20168a23764ec704b98d9b8ff082e" + sha256 cellar: :any, big_sur: "f77b7e77b043661da38b1c5d64140de538587d38a2ce50722a95c79339ceeee6" + sha256 cellar: :any, catalina: "aa0bc95a39610d6b5951d064d781d85b898ca2ebf230acbc60aa2f4e1f51e573" + sha256 cellar: :any_skip_relocation, arm64_linux: "51a4a8372175512d991362b12341aac01ac7d4b11b33af352de964815084e4cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eef4ea84385608a16af8533cd12d40b164a57e30bbfecfe9a58dd462e8cf22a6" + end + + depends_on "libusb-compat" + + def install + Dir.chdir "commandline" + system "make" + bin.install "bootloadHID" + end + + test do + touch "test.hex" + assert_equal "No data in input file, exiting.", shell_output("#{bin}/bootloadHID -r test.hex 2>&1").strip + end +end diff --git a/Formula/b/bootterm.rb b/Formula/b/bootterm.rb new file mode 100644 index 0000000000000..6b8bd2c93a2b7 --- /dev/null +++ b/Formula/b/bootterm.rb @@ -0,0 +1,31 @@ +class Bootterm < Formula + desc "Simple, reliable and powerful terminal to ease connection to serial ports" + homepage "https://github.com/wtarreau/bootterm" + url "https://github.com/wtarreau/bootterm/archive/refs/tags/v0.5.tar.gz" + sha256 "95cc154236655082fb60e8cdae15823e4624e108b8aead59498ac8f2263295ad" + license "MIT" + head "https://github.com/wtarreau/bootterm.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b2092a71f18955ebffa5397ce9350880cdade272e5010568da99ea58f2d7ec89" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a229cac60be2ea2f7c899a3b314daa4e561fa2d5a84e1b7c5e921ccec2f693b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a550becf9ccf4fec6f1de2f16834a85807328de531f45a576ee141018d1f7478" + sha256 cellar: :any_skip_relocation, arm64_ventura: "746045840ad8efcd9aac080b0f9913635ad94db1aefba6e0582b640cd8d0a7b3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "81545dd801839cab947817cd04ca78c016d3543c40ceff905749186b36951d12" + sha256 cellar: :any_skip_relocation, sonoma: "10d45c378a0d8437c2fa3f9697c0cd9514f41bcb41c41dbb36bd3d41fa566301" + sha256 cellar: :any_skip_relocation, ventura: "e296d70e6c19862f037889c3f5070a8821bef0c7ea894d3a1fe78b7c5383b8ab" + sha256 cellar: :any_skip_relocation, monterey: "a46c3e6762cc88d3794937a95d00ab9182674980081db1702b1ea8ab994da7d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1cd346e782d0dfab70dbc82d9677d4c834088439530ac4e91bbfa30e6d28ec1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffec9a2836da5cdeecccc33cd9ce2a78fb2048121c48b07bf28b0f6317a60c23" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + assert_match "port", shell_output("#{bin}/bt -l") + end +end diff --git a/Formula/b/bore-cli.rb b/Formula/b/bore-cli.rb new file mode 100644 index 0000000000000..b93651daa90bd --- /dev/null +++ b/Formula/b/bore-cli.rb @@ -0,0 +1,34 @@ +class BoreCli < Formula + desc "Modern, simple TCP tunnel in Rust that exposes local ports to a remote server" + homepage "https://github.com/ekzhang/bore" + url "https://github.com/ekzhang/bore/archive/refs/tags/v0.6.0.tar.gz" + sha256 "ab3175a6f304c7efdcacd0f6a0e4950f49eb31cb2a3ae9b4928c97ed8d03861c" + license "MIT" + head "https://github.com/ekzhang/bore.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10b6d41535558ab9df7926e6275f540ecf9774c443544cc5095af94f610729a5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "15e9d9687655043674c052c222aa3e5278f46a8e80fd00913dbc5a620c29c526" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "73377f27cbaae4ca7fa474d7b3ebe4b3fe30e975ba37a23b852f92d43f1843ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5bfa5d67bd3593a3f93b5e5699c4985bee14b37aeba172c9fdc03c02ea1b0bbd" + sha256 cellar: :any_skip_relocation, sonoma: "b722a8b975830007a221cdbff215e3ff127d80f30a9a734fc1a696c1843d0d65" + sha256 cellar: :any_skip_relocation, ventura: "0ca6bcbfa21ac2215828fc5f831ce32c4471dd03aa3ff9e617a7b4c3fc18106a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9169a3f8a0c759aa78466c1740cca29e9848cc95c1b4621cf6aa47bdf810e4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "642cb726161e0fa78e77642108e14fa502287262a7479998dccce2b042e2c2f5" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + _, stdout, wait_thr = Open3.popen2("#{bin}/bore server") + assert_match "server listening", stdout.gets("\n") + + assert_match version.to_s, shell_output("#{bin}/bore --version") + ensure + Process.kill("TERM", wait_thr.pid) + end +end diff --git a/Formula/b/borgbackup.rb b/Formula/b/borgbackup.rb new file mode 100644 index 0000000000000..d0081b98c80a4 --- /dev/null +++ b/Formula/b/borgbackup.rb @@ -0,0 +1,70 @@ +class Borgbackup < Formula + include Language::Python::Virtualenv + + desc "Deduplicating archiver with compression and authenticated encryption" + homepage "https://www.borgbackup.org/" + url "https://files.pythonhosted.org/packages/de/79/2031c715a35c1fc943cdac83337b0070737d29796270454bedf52d2ac457/borgbackup-1.4.2.tar.gz" + sha256 "8923f5e953205d81138d1d7276c8a1c864215e230994d620c397635568ed376f" + license "BSD-3-Clause" + head "https://github.com/borgbackup/borg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "2dcad2aa0003c6fe565a572ab227d39088b2e6d214ea67dc1cf8c86debe9aeb3" + sha256 cellar: :any, arm64_sequoia: "56f1467b3cdf858045d4286e5334db90f694b399d2deece026a1e0acb2c0596a" + sha256 cellar: :any, arm64_sonoma: "4c96af8b2bd0ea5eaf4bb006d5af725bb4b4bd8073cb7f95e769666363b73f0f" + sha256 cellar: :any, sonoma: "7e6d496de1ac2536d58c5282b681d91830b312318a54eb1eb6ad082285765c69" + sha256 cellar: :any_skip_relocation, arm64_linux: "28c86363324b95da0c1c1a19b88d388894c286587261a218909eb940c6003ad0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69525cf2f1f65c56f6f078a65252ef56473918e8246e62e07f09f95b2980b7d7" + end + + depends_on "pkgconf" => :build + depends_on "libb2" + depends_on "lz4" + depends_on "openssl@3" + depends_on "python@3.14" + depends_on "xxhash" + depends_on "zstd" + + on_linux do + depends_on "acl" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def install + ENV["BORG_LIBB2_PREFIX"] = Formula["libb2"].prefix + ENV["BORG_LIBLZ4_PREFIX"] = Formula["lz4"].prefix + ENV["BORG_LIBXXHASH_PREFIX"] = Formula["xxhash"].prefix + ENV["BORG_LIBZSTD_PREFIX"] = Formula["zstd"].prefix + ENV["BORG_OPENSSL_PREFIX"] = Formula["openssl@3"].prefix + + virtualenv_install_with_resources + + man1.install Dir["docs/man/*.1"] + bash_completion.install "scripts/shell_completions/bash/borg" + fish_completion.install "scripts/shell_completions/fish/borg.fish" + zsh_completion.install "scripts/shell_completions/zsh/_borg" + end + + test do + # Create a repo and archive, then test extraction. + cp test_fixtures("test.pdf"), testpath + + system bin/"borg", "init", "-e", "none", "test-repo" + system bin/"borg", "create", "--compression", "zstd", "test-repo::test-archive", "test.pdf" + mkdir testpath/"restore" do + system bin/"borg", "extract", testpath/"test-repo::test-archive" + end + + assert_path_exists testpath/"restore/test.pdf" + assert_equal File.size(testpath/"restore/test.pdf"), File.size(testpath/"test.pdf") + end +end diff --git a/Formula/b/borgmatic.rb b/Formula/b/borgmatic.rb new file mode 100644 index 0000000000000..23974c25148d0 --- /dev/null +++ b/Formula/b/borgmatic.rb @@ -0,0 +1,197 @@ +class Borgmatic < Formula + include Language::Python::Virtualenv + + desc "Simple wrapper script for the Borg backup software" + homepage "https://torsion.org/borgmatic/" + url "https://files.pythonhosted.org/packages/4f/47/ae5bb4c00d5a72c975bf95453ea39ce433e2788950c21039d6ccdad6c299/borgmatic-2.0.11.tar.gz" + sha256 "5fc22b2c01f4af050e196331f6d0c720bf03788237e5808e799c83f7bf71fe09" + license "GPL-3.0-or-later" + head "https://projects.torsion.org/borgmatic-collective/borgmatic.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d3ae3936605f3dad8130a062a9956955474bfdf82ae342933291dd6d3c032c1b" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "rpds-py"] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["TMPDIR"] = testpath + + borg = (testpath/"borg") + borg_info_json = (testpath/"borg_info_json") + config_path = testpath/"config.yml" + repo_path = testpath/"repo" + log_path = testpath/"borg.log" + sentinel_path = testpath/"init_done" + + # Create a fake borg info json + borg_info_json.write <<~JSON + { + "cache": { + "path": "", + "stats": { + "total_chunks": 0, + "total_csize": 0, + "total_size": 0, + "total_unique_chunks": 0, + "unique_csize": 0, + "unique_size": 0 + } + }, + "encryption": { + "mode": "repokey-blake2" + }, + "repository": { + "id": "0000000000000000000000000000000000000000000000000000000000000000", + "last_modified": "2022-01-01T00:00:00.000000", + "location": "#{repo_path}" + }, + "security_dir": "" + } + JSON + + # Create a fake borg executable to log requested commands + borg.write <<~SHELL + #!/bin/sh + echo $@ >> #{log_path} + + # return valid borg version + if [ "$1" = "--version" ]; then + echo "borg 1.2.0" + exit 0 + fi + + # for first invocation only, return an error so init is called + if [ "$1" = "info" ]; then + if [ -f #{sentinel_path} ]; then + # return fake repository info + cat #{borg_info_json} + exit 0 + else + touch #{sentinel_path} + exit 2 + fi + fi + + # skip actual backup creation + if [ "$1" = "create" ]; then + exit 0 + fi + SHELL + + borg.chmod 0755 + + # Generate a config + config_path.write <<~YAML + source_directories: + - /home + - /etc + repositories: + - path: #{repo_path} + local_path: #{borg} + patterns: + - R #{testpath} + - '- #{config_path}' + keep_daily: 7 + YAML + + # Initialize Repo + system bin/"borgmatic", "-v", "2", "--config", config_path, "init", "--encryption", "repokey" + + # Create a backup + system bin/"borgmatic", "--config", config_path + + # See if backup was created + system bin/"borgmatic", "--config", config_path, "--json" + + # Read in stored log + log_content = File.read(log_path) + + # Assert that the proper borg commands were executed + expected_log = <<~EOS + --version --debug --show-rc + info --json #{repo_path} + init --encryption repokey --debug #{repo_path} + --version + create --patterns-from #{testpath}/borgmatic-.{8}/borgmatic/tmp.{8} #{repo_path}::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} --dry-run --list + create --patterns-from #{testpath}/borgmatic-.{8}/borgmatic/tmp.{8} #{repo_path}::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} + prune --keep-daily 7 --glob-archives {hostname}-* #{repo_path} + compact #{repo_path} + info --json #{repo_path} + check --glob-archives {hostname}-* #{repo_path} + --version + create --patterns-from #{testpath}/borgmatic-.{8}/borgmatic/tmp.{8} #{repo_path}::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} --dry-run --list + create --patterns-from #{testpath}/borgmatic-.{8}/borgmatic/tmp.{8} --json #{repo_path}::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} + prune --keep-daily 7 --glob-archives {hostname}-* #{repo_path} + compact #{repo_path} + info --json #{repo_path} + EOS + expected = expected_log.split("\n").map(&:strip) + + log_content.lines.map.with_index do |line, i| + if line.start_with?("create") + assert_match(/#{expected[i].chomp}/, line.chomp) + else + assert_equal expected[i].chomp, line.chomp + end + end + end +end diff --git a/Formula/b/boring.rb b/Formula/b/boring.rb new file mode 100644 index 0000000000000..b664ada107c9e --- /dev/null +++ b/Formula/b/boring.rb @@ -0,0 +1,56 @@ +class Boring < Formula + desc "Simple command-line SSH tunnel manager that just works" + homepage "https://github.com/alebeck/boring" + url "https://github.com/alebeck/boring/archive/refs/tags/v0.11.8.tar.gz" + sha256 "6b31a6046d595fc55496c0cc7654184d22c871729ec274709222e5f34678819a" + license "MIT" + head "https://github.com/alebeck/boring.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4519a4d66c9e2d1bafeef19dfa358e2c56bfda4b2c1070ed251b0fcae9e7fde8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4519a4d66c9e2d1bafeef19dfa358e2c56bfda4b2c1070ed251b0fcae9e7fde8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4519a4d66c9e2d1bafeef19dfa358e2c56bfda4b2c1070ed251b0fcae9e7fde8" + sha256 cellar: :any_skip_relocation, sonoma: "4618e05ee175780dca308980515da4f16efc7b62e329f03e1307c67cec99d094" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc712b056d95434baa12289884298df928e7c4394be8b8c156c196fdf5dd9f43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2611d4e6ac1ee88db608c4decf132871021d86a933814f54b7550169ca1eec19" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/boring" + + generate_completions_from_executable(bin/"boring", "--shell") + end + + def post_install + quiet_system "killall", "boring" + end + + test do + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match version.to_s, shell_output("#{bin}/boring version") + + (testpath/".boring.toml").write <<~TOML + [[tunnels]] + name = "dev" + local = "9000" + remote = "localhost:9000" + host = "dev-server" + TOML + + begin + output_log = testpath/"output.log" + pid = spawn bin/"boring", "list", [:out, :err] => output_log.to_s + sleep 2 + assert_match "dev 9000 -> localhost:9000 dev-server", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/b/boringtun.rb b/Formula/b/boringtun.rb new file mode 100644 index 0000000000000..818133d84b044 --- /dev/null +++ b/Formula/b/boringtun.rb @@ -0,0 +1,41 @@ +class Boringtun < Formula + desc "Userspace WireGuard implementation in Rust" + homepage "https://github.com/cloudflare/boringtun" + url "https://github.com/cloudflare/boringtun/archive/refs/tags/boringtun-0.6.0.tar.gz" + sha256 "3b9fbd7bbc76c5e98237b34b9790656fb38d09cb9ac417361bf5881e44581035" + license "BSD-3-Clause" + head "https://github.com/cloudflare/boringtun.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6c63f98c9e4fd4cc7d16792968d183925958bda7ee096f5960eabce10c372b2e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b99c028395d91a7117b2287ea874730fa564416df85b646a6a078543a139320a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ce4199d92b31f23dfe37ce587a933fe2d7dba7bf832a4cfab6bd7dda783bb57" + sha256 cellar: :any_skip_relocation, arm64_ventura: "47c31d89d533a16220f0f88f23347357f95f7d815e7ceb0773e9ad0423691db2" + sha256 cellar: :any_skip_relocation, sonoma: "8bc9c266cd64613c37408c3e98ef80eaef53c4461f16c1a3891e361e4cd29c6b" + sha256 cellar: :any_skip_relocation, ventura: "0a9e89734c509ad3c0f8dd48d7a8150d0e861ae8120bb8d95ff0b27b44525fb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "210e8a4f5b83d3d7d3ba20fd36651c98bb0025901a51a222412d8a55b89dfe0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8165499bd4051c41df6b5a00dd62b9e5839e5863e54ec9992d7dd83ec400f88" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "boringtun-cli") + end + + def caveats + <<~EOS + boringtun-cli requires root privileges so you will need to run `sudo boringtun-cli utun`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + system bin/"boringtun-cli", "--help" + assert_match "boringtun #{version}", shell_output("#{bin}/boringtun-cli -V") + + output = shell_output("#{bin}/boringtun-cli utun --foreground 2>&1", 1) + # requires `sudo` to start + assert_match "Failed to initialize tunnel", output + end +end diff --git a/Formula/b/bork.rb b/Formula/b/bork.rb new file mode 100644 index 0000000000000..91f3f5415757e --- /dev/null +++ b/Formula/b/bork.rb @@ -0,0 +1,30 @@ +class Bork < Formula + desc "Bash-Operated Reconciling Kludge" + homepage "https://bork.sh/" + url "https://github.com/borksh/bork/archive/refs/tags/v0.14.0.tar.gz" + sha256 "718331c54c94bf7eddeff089227c0f57093361f7e6e24066cb544cc9ebd2f6c5" + license "Apache-2.0" + head "https://github.com/borksh/bork.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "16ffe8fc8e92fb6b7a8563cf610e9ebef39bb4123b8c092087aba936df7ed44b" + end + + def install + man1.install "docs/bork.1" + prefix.install %w[bin lib test types] + end + + test do + assert_match version.to_s, shell_output("#{bin}/bork version") + + expected_output = "checking: directory #{testpath}/foo\r" \ + "missing: directory #{testpath}/foo \n" \ + "verifying install: directory #{testpath}/foo\n" \ + "* success\n" + assert_match expected_output, shell_output("#{bin}/bork do ok directory #{testpath}/foo", 1) + end +end diff --git a/Formula/b/bosh-cli.rb b/Formula/b/bosh-cli.rb new file mode 100644 index 0000000000000..f688e3acb5dea --- /dev/null +++ b/Formula/b/bosh-cli.rb @@ -0,0 +1,32 @@ +class BoshCli < Formula + desc "Cloud Foundry BOSH CLI v2" + homepage "https://bosh.io/docs/cli-v2/" + url "https://github.com/cloudfoundry/bosh-cli/archive/refs/tags/v7.9.13.tar.gz" + sha256 "d93fd17a44cb0a4068b862b79afb19bf72344ca17e15b097945ff9668c8c191e" + license "Apache-2.0" + head "https://github.com/cloudfoundry/bosh-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "075403418c75d0156f35e2dc96ce58768b267a656d04c51509c4e53ad55a817d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "075403418c75d0156f35e2dc96ce58768b267a656d04c51509c4e53ad55a817d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "075403418c75d0156f35e2dc96ce58768b267a656d04c51509c4e53ad55a817d" + sha256 cellar: :any_skip_relocation, sonoma: "9937549ec0e7ae2f5d31601b5d148b09327348991130d4f30bda4307b52469de" + sha256 cellar: :any_skip_relocation, arm64_linux: "78bdee39efb6b8166cb6ef8802219f3a66220278e2ba4184ca9b129249a5cc6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d1240e525a9fa79156ce9285aa7ed3fea7a49ead8ac6579530f17ff13f64797" + end + + depends_on "go" => :build + + def install + # https://github.com/cloudfoundry/bosh-cli/blob/master/ci/tasks/build.sh#L23-L24 + inreplace "cmd/version.go", "[DEV BUILD]", "#{version}-#{tap.user}-#{time.iso8601}" + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"bosh-cli", "generate-job", "brew-test" + assert_path_exists testpath/"jobs/brew-test" + + assert_match version.to_s, shell_output("#{bin}/bosh-cli --version") + end +end diff --git a/Formula/b/bossa.rb b/Formula/b/bossa.rb new file mode 100644 index 0000000000000..7c9517e66ee5f --- /dev/null +++ b/Formula/b/bossa.rb @@ -0,0 +1,40 @@ +class Bossa < Formula + desc "Flash utility for Atmel SAM microcontrollers" + homepage "https://github.com/shumatech/BOSSA" + url "https://github.com/shumatech/BOSSA/archive/refs/tags/1.9.1.tar.gz" + sha256 "ca650455dfa36cbd029010167347525bea424717a71a691381c0811591c93e72" + license "BSD-3-Clause" + head "https://github.com/shumatech/BOSSA.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ce5af8cf28d6afbc05ee144e859c878eaf19ced4bdd3eac16ef67a0335f62abf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "72aece3647237751f8f18d1cc9af56dfecbc84652321ef43137eec8c47fd7922" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7ca492e595832676559c6b646e3d702ddd46dcb0610bf8d03c225b49c6d4624" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2158f7a97081f5f80316164003c9081332974aef077205116c33a4aecd374baa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "13a2c2eb937b91821a9f6f353219287ef55b464b9cf7c1b856d886fb1497f0eb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "374d82b1d164b7996887cad910472e9a9e58fc5eecfb8e61271e26059137727a" + sha256 cellar: :any_skip_relocation, sonoma: "e0acbe505207e5941a946aa5578011eb90c34feda27045e6bd311f0f18ea9f8d" + sha256 cellar: :any_skip_relocation, ventura: "d2c70106f28ae84a178b62a6f028eac65adf61baf48c6de1d2992796403eb6a6" + sha256 cellar: :any_skip_relocation, monterey: "0cc5c9f5080c2066dde8ee2c4c9fe8d7d6fc251a89bc975e2fde2fc99399e10a" + sha256 cellar: :any_skip_relocation, big_sur: "aa5fe3c981a324abb67a667253e2cfae1479b832e8a2d53ba615d99d3e0f0002" + sha256 cellar: :any_skip_relocation, arm64_linux: "b59423572bf2c379b9d72c7d10a21c5e7f3bc24c09fdb1b797f57e58ab4f87e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0621b561b15f00b336c30d0d91ab52ab59b8b6fab7c1a9fccb4faa287f65b52" + end + + on_linux do + depends_on "readline" + end + + def install + system "make", "bin/bossac", "bin/bossash" + bin.install "bin/bossac" + bin.install "bin/bossash" + end + + test do + expected_output = /^No device found.*/ + assert_match expected_output, shell_output("#{bin}/bossac -i 2>&1", 1) + end +end diff --git a/Formula/b/botan.rb b/Formula/b/botan.rb new file mode 100644 index 0000000000000..0119beff7016f --- /dev/null +++ b/Formula/b/botan.rb @@ -0,0 +1,75 @@ +class Botan < Formula + desc "Cryptographic algorithms and formats library in C++" + homepage "https://botan.randombit.net/" + url "https://botan.randombit.net/releases/Botan-3.9.0.tar.xz" + sha256 "8c3f284b58ddd42e8e43e9fa86a7129d87ea7c3f776a80d3da63ec20722b0883" + license "BSD-2-Clause" + revision 1 + head "https://github.com/randombit/botan.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?Botan[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "20b605d280d09825a7359ba1efd0dda1bbd5e46aa43f810b2d6d484fdaa4bad0" + sha256 arm64_sequoia: "ad63b78c79ad1a173c3969852bcfc2e607409da2db79392fb7b1e04c5772b8e4" + sha256 arm64_sonoma: "251d049d01a4800f9d3293dc6036fef0dd956428d8163b33d801aa05c91ad19c" + sha256 sonoma: "2d5c2cbf49ca883571de31e78527f8e594e86ee56f1fe734bdc93e11438972ed" + sha256 arm64_linux: "2694b54f044bbcc363bc16f9811d7c36d43ed248b186e9a8725bc4b7c4d7b788" + sha256 x86_64_linux: "97dc2d75dfad93dd6a701f2e56b81f3b25d8aa86262073371a407fa53cb0891c" + end + + depends_on "pkgconf" => :build + depends_on "ca-certificates" + depends_on "python@3.14" + depends_on "sqlite" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1400 + end + + fails_with :clang do + build 1400 + cause "Requires C++20" + end + + def python3 + which("python3.14") + end + + def install + ENV.runtime_cpu_detection + + args = %W[ + --prefix=#{prefix} + --docdir=share/doc + --with-zlib + --with-bzip2 + --with-sqlite3 + --system-cert-bundle=#{Formula["ca-certificates"].pkgetc}/cert.pem + ] + args << "--with-commoncrypto" if OS.mac? + + if OS.mac? && DevelopmentTools.clang_build_version <= 1400 + ENV.llvm_clang + + ldflags = %W[-L#{Formula["llvm"].opt_lib}/c++ -L#{Formula["llvm"].opt_lib}/unwind -lunwind] + args << "--ldflags=#{ldflags.join(" ")}" + end + + system python3, "configure.py", *args + system "make", "install" + end + + test do + text = "Homebrew" + base64_enc = pipe_output("#{bin}/botan base64_enc -", text) + refute_empty base64_enc + assert_equal text, pipe_output("#{bin}/botan base64_dec -", base64_enc).chomp + end +end diff --git a/Formula/b/botan@2.rb b/Formula/b/botan@2.rb new file mode 100644 index 0000000000000..f91b5dc93300d --- /dev/null +++ b/Formula/b/botan@2.rb @@ -0,0 +1,56 @@ +class BotanAT2 < Formula + desc "Cryptographic algorithms and formats library in C++" + homepage "https://botan.randombit.net/" + url "https://botan.randombit.net/releases/Botan-2.19.5.tar.xz" + sha256 "dfeea0e0a6f26d6724c4af01da9a7b88487adb2d81ba7c72fcaf52db522c9ad4" + license "BSD-2-Clause" + head "https://github.com/randombit/botan.git", branch: "release-2" + + bottle do + rebuild 2 + sha256 arm64_tahoe: "dd852d6fe3cc65e68fe497d5582c7f3dbaa4c2afced2acea3a9b0f412042bd82" + sha256 arm64_sequoia: "3b52c4abedf724426066b343384e553b586d7a3d69e437a85839ad1adde27868" + sha256 arm64_sonoma: "dc8d1646e46dab1be1f4f53b46f2e111b92610998ec700579c702abe3bee9baf" + sha256 sonoma: "534d9389e8a96ed9c171e1c457c931f70783c94515ff502c6fd876c369666f09" + sha256 arm64_linux: "faf67b146845389405939b4803884a521fd4210e441b078fea28cdeca78e78ac" + sha256 x86_64_linux: "a4d30c4277c84df5b6a0e51b82e049df3bbe90204151143bf68bf214f44cbd86" + end + + keg_only :versioned_formula + + # Botan2 is currently scheduled to reach end of life at the end of 2024 + # Ref: https://botan.randombit.net/#releases + deprecate! date: "2024-12-31", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "python@3.14" + depends_on "sqlite" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def python3 + which("python3.14") + end + + def install + ENV.cxx11 + + args = %W[ + --prefix=#{prefix} + --docdir=share/doc + --with-zlib + --with-bzip2 + --with-sqlite3 + ] + + system python3, "configure.py", *args + system "make", "install" + end + + test do + (testpath/"test.txt").write "Homebrew" + (testpath/"testout.txt").write shell_output("#{bin}/botan base64_enc test.txt") + assert_match "Homebrew", shell_output("#{bin}/botan base64_dec testout.txt") + end +end diff --git a/Formula/b/bottom.rb b/Formula/b/bottom.rb new file mode 100644 index 0000000000000..9284159019c67 --- /dev/null +++ b/Formula/b/bottom.rb @@ -0,0 +1,47 @@ +class Bottom < Formula + desc "Yet another cross-platform graphical process/system monitor" + homepage "https://clementtsang.github.io/bottom/" + url "https://github.com/ClementTsang/bottom/archive/refs/tags/0.11.2.tar.gz" + sha256 "213fbea68a315e012a0ab37e3382a287f0424675a47de04801aef4758458e64b" + license "MIT" + head "https://github.com/ClementTsang/bottom.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6728619f94b41a50bba7ff6ea4dac6cf0d9382d87f0ab031ae7b19149219bdf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9549e2c36e8d5e2c6e8206a96a0c94284c07f344a84536e2ac1e42bbbb2c47d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84f462b70ed48cf7e21c693927e44771d9d84a81bb4ade6eb3755a93223fc448" + sha256 cellar: :any_skip_relocation, sonoma: "8b7d0d6cef2da08f34c7bbd680aa3aa2aab14d66f3240bbb1ed3e537b8bf7c5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2069e2513be1b1fea0bde7cc7e9f1c5e15c960ef5e09ccd2e3a29bfdc24d1e63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15e8b97b0c29324c1612a17cd3214035e8f3e681aa2094c8f6ac1cf5966038b7" + end + + depends_on "rust" => :build + + def install + # enable build-time generation of completion scripts and manpage + ENV["BTM_GENERATE"] = "true" + + system "cargo", "install", *std_cargo_args + + # Completion scripts are generated in the crate's build + # directory, which includes a fingerprint hash. Try to locate it first + out_dir = "target/tmp/bottom" + bash_completion.install "#{out_dir}/completion/btm.bash" => "btm" + fish_completion.install "#{out_dir}/completion/btm.fish" + zsh_completion.install "#{out_dir}/completion/_btm" + man1.install "#{out_dir}/manpage/btm.1" + end + + test do + assert_equal "bottom #{version}", shell_output("#{bin}/btm --version").chomp + assert_match "error: unexpected argument '--invalid' found", shell_output("#{bin}/btm --invalid 2>&1", 2) + end +end diff --git a/Formula/b/bounceback.rb b/Formula/b/bounceback.rb new file mode 100644 index 0000000000000..c7958db50d63b --- /dev/null +++ b/Formula/b/bounceback.rb @@ -0,0 +1,50 @@ +class Bounceback < Formula + desc "Stealth redirector for red team operation security" + homepage "https://github.com/D00Movenok/BounceBack" + url "https://github.com/D00Movenok/BounceBack/archive/refs/tags/v1.5.2.tar.gz" + sha256 "3d3f263f8bb7349c25ffa389b98a59858ad4f289cfc03840cb504775fb062f2b" + license "MIT" + head "https://github.com/D00Movenok/BounceBack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "056b9bb95bc573c704efb0b1d7a88494adf17812a835afd4f03ce2ca6f14620a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8604b183fd34db0dec18fdf3738f5d10accfe83358355a2ac243d8e484ca99e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8604b183fd34db0dec18fdf3738f5d10accfe83358355a2ac243d8e484ca99e1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8604b183fd34db0dec18fdf3738f5d10accfe83358355a2ac243d8e484ca99e1" + sha256 cellar: :any_skip_relocation, sonoma: "151b7cc05ca88b9ad080c6be1424ea7418e2e9c39ce024d11c220240555b19a6" + sha256 cellar: :any_skip_relocation, ventura: "151b7cc05ca88b9ad080c6be1424ea7418e2e9c39ce024d11c220240555b19a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6030767cf90445f94a88162d2bdd0994af06608b3b52481e36717a164a6c9991" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddebb59897bab43a8e2b7fcc60b1f2c15b4528fc522e5bb493f391f8659854bd" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/bounceback" + + pkgshare.install "data" + # update relative data path to homebrew pkg path + inreplace "config.yml" do |s| + s.gsub! " data", " #{pkgshare}/data" + end + etc.install "config.yml" => "bounceback.yml" + end + + service do + run [opt_bin/"bounceback", "--config", etc/"bounceback.yml"] + keep_alive true + working_dir var + log_path var/"log/bounceback.log" + error_log_path var/"log/bounceback.log" + end + + test do + fork do + exec bin/"bounceback", "--config", etc/"bounceback.yml" + end + sleep 2 + assert_match "\"message\":\"Starting proxies\"", (testpath/"bounceback.log").read + assert_match version.to_s, shell_output("#{bin}/bounceback --help", 2) + end +end diff --git a/Formula/b/bower-mail.rb b/Formula/b/bower-mail.rb new file mode 100644 index 0000000000000..8df51a58abcaa --- /dev/null +++ b/Formula/b/bower-mail.rb @@ -0,0 +1,43 @@ +class BowerMail < Formula + desc "Curses terminal client for the Notmuch email system" + homepage "https://github.com/wangp/bower" + url "https://github.com/wangp/bower/archive/refs/tags/1.1.1.tar.gz" + sha256 "4c041681332d355710aa2f2a935ea56fbb2ba8d614be81dee594c431a1d493d9" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/wangp/bower.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6c529955bcdd18e610441bd154d41cdbb03e164ea51aee9be99db4d4fa388553" + sha256 cellar: :any, arm64_sequoia: "d47f47f021948b197519c8153299af29c6daf61303ec3271202a3db295d778fa" + sha256 cellar: :any, arm64_sonoma: "1b29ffd00b810534072cfb133481e8f56982ae599c14b93b03fd41a6c01b4511" + sha256 cellar: :any, arm64_ventura: "09f3d4499761c4070ba39bcd3fe811087e8be0e87e393aea012ebef4375d5d9c" + sha256 cellar: :any, sonoma: "5def685cc6179746680820800b1f8d9639c59624b12f2e2f50bbe976fc7171d8" + sha256 cellar: :any, ventura: "7f687a08815bb53a12b385f88278e82f1e47adb7105d7d3fbe40dbe2fbb934e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "e14703850f860c54de0e5e13c331e6e267bb001e90893d0079f31bc319ce90b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a66cb33b65d91e09351fbc8b01b884bee0f70737756666cbfd7f93057d746954" + end + + depends_on "mercury" => :build + depends_on "pandoc" => :build + depends_on "gpgme" + depends_on "ncurses" + depends_on "notmuch" + + conflicts_with "bower", because: "both install `bower` binaries" + + def install + system "make" + system "make", "man" + bin.install "bower" + man1.install "bower.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bower --version") + + assert_match "Error: could not locate database", shell_output("#{bin}/bower 2>&1", 1) + end +end diff --git a/Formula/b/bower.rb b/Formula/b/bower.rb new file mode 100644 index 0000000000000..6d2d2e0fc3520 --- /dev/null +++ b/Formula/b/bower.rb @@ -0,0 +1,37 @@ +class Bower < Formula + desc "Package manager for the web" + homepage "https://bower.io/" + url "https://registry.npmjs.org/bower/-/bower-1.8.14.tgz" + sha256 "00df3dcc6e8b3a4dd7668934a20e60e6fc0c4269790192179388c928553a3f7e" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "18bbc17742b8e6765f4aa0b104dcbea6d21c5fd28b072d10d838febef745bff0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27cfa496a8b8d490f3dd6eeba235e0b64561da813d88bcc89fe1b03114dc091c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e6ffe74d0b616fce08852c9b92624829b867149d990bd0bcc36f45b802e0016" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e6ffe74d0b616fce08852c9b92624829b867149d990bd0bcc36f45b802e0016" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3e6ffe74d0b616fce08852c9b92624829b867149d990bd0bcc36f45b802e0016" + sha256 cellar: :any_skip_relocation, sonoma: "5e40c22cfa9946b9bf731953c371b9793808754b6903037276be89b7c4c479b5" + sha256 cellar: :any_skip_relocation, ventura: "5e40c22cfa9946b9bf731953c371b9793808754b6903037276be89b7c4c479b5" + sha256 cellar: :any_skip_relocation, monterey: "5e40c22cfa9946b9bf731953c371b9793808754b6903037276be89b7c4c479b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d900e656c726f0a5afd2168de6c57ee24f7df977cec79b504d01b7f1117acae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "771a98dc248a03e567cf7dee75bb4711dd51ff9ff36df04186642c86d8f22263" + end + + depends_on "node" + + conflicts_with "bower-mail", because: "both install `bower` binaries" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"bower", "install", "jquery" + assert_path_exists testpath/"bower_components/jquery/dist/jquery.min.js", "jquery.min.js was not installed" + end +end diff --git a/Formula/b/bowtie2.rb b/Formula/b/bowtie2.rb new file mode 100644 index 0000000000000..b85f0ddddd9cd --- /dev/null +++ b/Formula/b/bowtie2.rb @@ -0,0 +1,39 @@ +class Bowtie2 < Formula + desc "Fast and sensitive gapped read aligner" + homepage "https://bowtie-bio.sourceforge.net/bowtie2/index.shtml" + url "https://github.com/BenLangmead/bowtie2/archive/refs/tags/v2.5.4.tar.gz" + sha256 "841a6a60111b690c11d1e123cb5c11560b4cd1502b5cee7e394fd50f83e74e13" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dcc146d51b08ed4a73d4938caf374776304df1e6ab8dda1cd964ece3c570f8e0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f8eca3ff38d6b573a73c160da0b80a8d20d29a5d11c07ad0c3de51f30986636" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "539b0d025ccf750ab75234c6b1ce0cbe2db9cd1cb3aac64e645ed2703d3f93d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f0ea46f0fb6351e20c753a488ab35b8af656b025dcd8529cf489391afa53a5d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "27fbcb3ea2f44568313fc80d900018727c376ce862a2e107540d73a5e118d7f9" + sha256 cellar: :any_skip_relocation, sonoma: "0851d07d8a4a57897ea4b2262d88073d35060638e297fd8ce3ca9b26eb510ceb" + sha256 cellar: :any_skip_relocation, ventura: "65d7c4f3afd8c3437222126d750ea55f6bb4214907072f97ff1bae4c26788465" + sha256 cellar: :any_skip_relocation, monterey: "76a63cb64ac6060cdeb35bf4e64e2dca18525ec103a8956e38fe6a9487aba434" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e4616762d3c198fa8b078654a6b98dd45d128a25731004a84666baae6ae92cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "574eeb3b13bb869e57844bea2fac0eaf789b708096e7b94d5f14b604655b78a9" + end + + uses_from_macos "perl" + uses_from_macos "python" + uses_from_macos "zlib" + + on_arm do + depends_on "simde" => :build + end + + def install + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install "example", "scripts" + end + + test do + system bin/"bowtie2-build", + "#{pkgshare}/example/reference/lambda_virus.fa", "lambda_virus" + assert_path_exists testpath/"lambda_virus.1.bt2", "Failed to create viral alignment lambda_virus.1.bt2" + end +end diff --git a/Formula/b/box2d.rb b/Formula/b/box2d.rb new file mode 100644 index 0000000000000..bcff47384e726 --- /dev/null +++ b/Formula/b/box2d.rb @@ -0,0 +1,52 @@ +class Box2d < Formula + desc "2D physics engine for games" + homepage "https://box2d.org" + url "https://github.com/erincatto/box2d/archive/refs/tags/v3.1.1.tar.gz" + sha256 "fb6ef914b50f4312d7d921a600eabc12318bb3c55a0b8c0b90608fa4488ef2e4" + license "MIT" + head "https://github.com/erincatto/Box2D.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e95ece003153c1a1124100c94a3c761e7b2e704551dc088d8062c97c94456cc0" + sha256 cellar: :any, arm64_sequoia: "1caaf1c980effd48d3eed26366c13660960a289ac51526b68816679f6284631a" + sha256 cellar: :any, arm64_sonoma: "c5ad8a041d04cbefb6674fe3d3337bdcdf451cb7ef311894ff6014245ce7b658" + sha256 cellar: :any, arm64_ventura: "c3eb47d52d68d2dea3679cf170ec01746dedc77bfc77386d6beb04ad29af28a5" + sha256 cellar: :any, sonoma: "37aa98eb7c538baac562620e3aed1187e0d23c713d73c8ec4c2def5c340d049b" + sha256 cellar: :any, ventura: "143f1e6e3f276f9e7ec87ea5d8b6f5056ac0388ad9f65c20998d16886e7a51f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c7471357570866b88743c8207c45e190e9478ecd7a0c44fbaf0bb603015df95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36086574d8eb78f65b8c94dc4ae1b94e9df18356c2636bf91b3a3bbffcc4805b" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DBOX2D_UNIT_TESTS=OFF + -DBOX2D_SAMPLES=OFF + -DBOX2D_BENCHMARKS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + include.install Dir["include/*"] + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + b2Version version = b2GetVersion(); + std::cout << "Box2D version: " << version.major << "." << version.minor << "." << version.revision << std::endl; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lbox2d", "-o", "test" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/b/boxes.rb b/Formula/b/boxes.rb new file mode 100644 index 0000000000000..b78155fe96340 --- /dev/null +++ b/Formula/b/boxes.rb @@ -0,0 +1,41 @@ +class Boxes < Formula + desc "Draw boxes around text" + homepage "https://boxes.thomasjensen.com/" + url "https://github.com/ascii-boxes/boxes/archive/refs/tags/v2.3.1.tar.gz" + sha256 "0834e54c0d5293950412729cabf16ada3076a804eacba8f1aacc5381dfe3a96a" + license "GPL-3.0-only" + head "https://github.com/ascii-boxes/boxes.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "6ebfa16105de5a5f1a0d46b7742afb09b97c6bcbe59d98c80bdf6e7057350917" + sha256 arm64_sequoia: "947c884cec8f4ae8248bff97af51e7d2d3bacce6ea7cde86831e0895c67471be" + sha256 arm64_sonoma: "503df5e97899ffc0a24982b46f265a82a7c4f138e656273b4eb2ed4752881b05" + sha256 arm64_ventura: "d83c635c1a99655fcda01132851aaa92d9ed54e7d331c9a3e2f32c072a7aa122" + sha256 sonoma: "00df90a0d846b02d58d16302daba7d9949d3c8cf4db7fe9bdd10f8c32b1e5679" + sha256 ventura: "a8c14372ddb54552b296380f436b49ba676ff7ef6d275513c36aadd197435aa9" + sha256 arm64_linux: "3934bb6ecfb413871a8311f1884191f0524fe2c1aed1992242ba31dae70a3dd2" + sha256 x86_64_linux: "dddb84f6366ff935cf5f1324d3b93d3a7f0e8fc6349d71aa4149a7241e9986c7" + end + + depends_on "bison" => :build + depends_on "libunistring" + depends_on "pcre2" + + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + def install + # distro uses /usr/share/boxes change to prefix + system "make", "GLOBALCONF=#{share}/boxes-config", + "CC=#{ENV.cc}", + "YACC=#{Formula["bison"].opt_bin/"bison"}" + + bin.install "out/boxes" + man1.install "doc/boxes.1" + share.install "boxes-config" + end + + test do + assert_match "test brew", pipe_output(bin/"boxes", "test brew", 0) + end +end diff --git a/Formula/b/bozohttpd.rb b/Formula/b/bozohttpd.rb new file mode 100644 index 0000000000000..ea3c0067ab2af --- /dev/null +++ b/Formula/b/bozohttpd.rb @@ -0,0 +1,57 @@ +class Bozohttpd < Formula + desc "Small and secure http version 1.1 server" + homepage "https://pkgsrc.se/www/bozohttpd" + url "https://cdn.netbsd.org/pub/pkgsrc/distfiles/LOCAL_PORTS/bozohttpd-20240126.tar.bz2" + sha256 "576267bc5681c52b650294c3f2a85b8c8d8c239e75e71aaba7973771f852b56d" + license "BSD-2-Clause" + + livecheck do + url "https://cdn.netbsd.org/pub/pkgsrc/distfiles/" + regex(/href=.*?bozohttpd[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f071d5d2e28bc3a4ccef5b81d780fbd3995a5cca9d508356ffa860ede9737bf6" + sha256 cellar: :any, arm64_sequoia: "f91adb497f96847759c3427e7b14b81889547273bc078266abdcc0087e6f1c8f" + sha256 cellar: :any, arm64_sonoma: "ad727b862019134b028cc9d5ee6893755dc001ab87ebc3625eca39779be2d65a" + sha256 cellar: :any, arm64_ventura: "5269de6704ed5507508a2bfba45dfb714d0a077bb86682cc013762a3e05dbaba" + sha256 cellar: :any, sonoma: "58b534558d746a783487067bcb393d6908c9961f1e8e82e2c8ff0e2790e5c7aa" + sha256 cellar: :any, ventura: "282ae1e2332c2dc426187b193fc943141bfd838b00818aa867da2eac281144c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ddfe6c1eedfc12b72ce6175e8bb8621d3c5b2cd946d5f35de76cf555c1dcd5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8f662a5761fcd610221da12ac4476496fe39bb5254c0192a05e6170b495c988" + end + + depends_on "pkgconf" => :build + depends_on "lua" + depends_on "openssl@3" + + def install + # Both `cflags` are explained at http://www.eterna.com.au/bozohttpd/bozohttpd.8.html + cflags = [ + # Disable NetBSD blocklistd support, which is enabled by default (see section "BLOCKLIST SUPPORT") + "-DNO_BLOCKLIST_SUPPORT", + # Enable basic authentication, which is disabled by default (see section "HTTP BASIC AUTHORIZATION") + "-DDO_HTPASSWD", + ] + cflags << Utils.safe_popen_read("pkg-config", "--libs", "--cflags", "lua").chomp + cflags << Utils.safe_popen_read("pkg-config", "--libs", "--cflags", "libcrypto").chomp + + ENV.append "CFLAGS", cflags.join(" ") + system "make", "-f", "Makefile.boot", "CC=#{ENV.cc}" + bin.install "bozohttpd" + end + + test do + port = free_port + + expected_output = "Hello from bozotic httpd!" + (testpath/"index.html").write expected_output + + spawn bin/"bozohttpd", "-b", "-f", "-I", port.to_s, testpath + sleep 3 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + end +end diff --git a/Formula/b/bpftop.rb b/Formula/b/bpftop.rb new file mode 100644 index 0000000000000..87b5d814509d5 --- /dev/null +++ b/Formula/b/bpftop.rb @@ -0,0 +1,38 @@ +class Bpftop < Formula + desc "Dynamic real-time view of running eBPF programs" + homepage "https://github.com/Netflix/bpftop" + url "https://github.com/Netflix/bpftop/archive/refs/tags/v0.7.1.tar.gz" + sha256 "871ea55ebe1ddc9555aaf9553ecb10cbec121fe55aac1bb26d19bec23d8b597b" + license "Apache-2.0" + head "https://github.com/Netflix/bpftop.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "009800df8f5531ace80a3b9ac23e44399679f8004bff3758b3fe4f3d8786730b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cda56bed86048a5f27bd82a9d35e4cb8e29b3486dbfc665536af2def4e241f6" + end + + depends_on "llvm" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "elfutils" + depends_on :linux + depends_on "zlib" + + fails_with :gcc do + cause "build.rs needs to run clang and not shim for gcc" + end + + def install + # Bypass Homebrew's compiler clang shim which adds incompatible option: + # clang: error: unsupported option '-mbranch-protection=' for target 'bpf' + clang = Formula["llvm"].opt_bin/"clang" + inreplace "build.rs", /^(\s*\.clang)_args/, "\\1(\"#{clang}\")\n\\0", global: false if Hardware::CPU.arm? + + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/bpftop 2>&1", 1) + assert_match "Error: This program must be run as root", output + end +end diff --git a/Formula/b/bpm-tools.rb b/Formula/b/bpm-tools.rb new file mode 100644 index 0000000000000..8a086ebae0ab0 --- /dev/null +++ b/Formula/b/bpm-tools.rb @@ -0,0 +1,38 @@ +class BpmTools < Formula + desc "Detect tempo of audio files using beats-per-minute (BPM)" + homepage "https://www.pogo.org.uk/~mark/bpm-tools/" + url "https://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-0.3.tar.gz" + sha256 "37efe81ef594e9df17763e0a6fc29617769df12dfab6358f5e910d88f4723b94" + license "GPL-2.0-only" + head "https://www.pogo.org.uk/~mark/bpm-tools.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?bpm-tools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "634c02b83f4eed1869654538098c52c10571bde389661e7624c7a3a4ba14ebc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b1d300cf51e9fa05e8eb82ca8b2bfec3203c2c8cc12f0bf9813545a668a11fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4dacfbda1751d63d7e6920d2201ff8b1eaa3a85a2317ce89f0c54595666540b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2b2f0588023837c6a2340024fce562029370273c22a79296756223907c8dc7c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "34949c1ed18d4065930654bb35f1fb88c4b5ab53a3571d1cbf52e6e79b452005" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "19d555332dffb4fbcc6a80f15c3aa7692594b5c75fb3e01a9da6f0878fc5a98b" + sha256 cellar: :any_skip_relocation, sonoma: "5f59f612366fde2bb900c8bd8481bef6c041baf0be571e622e0e4f336fbddfbc" + sha256 cellar: :any_skip_relocation, ventura: "483c8d0501a94e517e62dda21c44474d9315286e206e7e61e990502bcad0717e" + sha256 cellar: :any_skip_relocation, monterey: "4429ecadee7430b8c147e1631cea030c10953a00b3ec04e0afd031ff74a0fd8d" + sha256 cellar: :any_skip_relocation, big_sur: "6ad965195d96e6d9f1b01732b1314af6211b101a6113aab02c9fbf799f3ded1d" + sha256 cellar: :any_skip_relocation, catalina: "694afec7c21549badc5c2bf55ac3f3da588370affbaa78f1087e3bb204137f61" + sha256 cellar: :any_skip_relocation, arm64_linux: "46138982bb7ffca2a4f763f1fde359ac3b0cddadb65e8f2e7dbadeede5274143" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e78a1d3a9c96635e57bf0ce8c329a88b8b3406a0e0ba4a19cb97e4b42727f6a0" + end + + def install + system "make" + bin.install "bpm" + bin.install "bpm-tag" + end +end diff --git a/Formula/b/bpmnlint.rb b/Formula/b/bpmnlint.rb new file mode 100644 index 0000000000000..f9adf8e5498a4 --- /dev/null +++ b/Formula/b/bpmnlint.rb @@ -0,0 +1,37 @@ +class Bpmnlint < Formula + desc "Validate BPMN diagrams based on configurable lint rules" + homepage "https://github.com/bpmn-io/bpmnlint" + url "https://registry.npmjs.org/bpmnlint/-/bpmnlint-11.6.1.tgz" + sha256 "ee529212a3f962bc9db3c2ea0651f2463c391165834fdd38b3b85809aaf9772a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a020ee21927c8ecdcccc02943332d568fbc1087515f7a417ef376e43769039dd" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec/"bin/bpmnlint" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bpmnlint --version") + + system bin/"bpmnlint", "--init" + assert_match "\"extends\": \"bpmnlint:recommended\"", (testpath/".bpmnlintrc").read + + (testpath/"diagram.bpmn").write <<~XML + + + + + + + XML + + output = shell_output("#{bin}/bpmnlint diagram.bpmn 2>&1", 1) + assert_match "Process_1 error Process is missing end event end-event-required", output + end +end diff --git a/Formula/b/bpython.rb b/Formula/b/bpython.rb new file mode 100644 index 0000000000000..dd5c44e8d9240 --- /dev/null +++ b/Formula/b/bpython.rb @@ -0,0 +1,88 @@ +class Bpython < Formula + include Language::Python::Virtualenv + + desc "Fancy interface to the Python interpreter" + homepage "https://bpython-interpreter.org" + url "https://files.pythonhosted.org/packages/44/29/cd80e9108a6fc6a925ffb915f8f69198a2bb2388e39167a41d743ac2a8f4/bpython-0.26.tar.gz" + sha256 "f79083e1e3723be9b49c9994ad1dd3a19ccb4d0d4f9a6f5b3a73bef8bc327433" + license "MIT" + head "https://github.com/bpython/bpython.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "181612cdc4ded4b629ec21988193b9d9c84619960e712bf16d65ec9fcaaa03e3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c44a932adc1aac72681f63ee42579e5995079f37718ad6628269c84dc5d15a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3a453fc182732d50075da8206eee95e89259ba3e118ce4ea98eee9a7d23a13f" + sha256 cellar: :any_skip_relocation, sonoma: "0adbfab2be6f4f051a6a1fc864337b0c4943ead108a70e35dfbea9c0388e7b28" + sha256 cellar: :any_skip_relocation, arm64_linux: "00da95792875208088cddc67c3516b7437e08430e01f0d567de32a5be8868bd2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22c5361ecf6858a26525ddc7538d4ab76bd8d083d0eda66ffe657223e02ec438" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/7c/51/a72df7730aa34a94bc43cebecb7b63ffa42f019868637dbeb45e0620d26e/blessed-1.22.0.tar.gz" + sha256 "1818efb7c10015478286f21a412fcdd31a3d8b94a18f6d926e733827da7a844b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "curtsies" do + url "https://files.pythonhosted.org/packages/d1/18/5741cb42624089a815520d5b65c39c3e59673a77fd1fab6ad65bdebf2f91/curtsies-0.4.3.tar.gz" + sha256 "102a0ffbf952124f1be222fd6989da4ec7cce04e49f613009e5f54ad37618825" + end + + resource "cwcwidth" do + url "https://files.pythonhosted.org/packages/23/76/03fc9fb3441a13e9208bb6103ebb7200eba7647d040008b8303a1c03e152/cwcwidth-0.1.10.tar.gz" + sha256 "7468760f72c1f4107be1b2b2854bc000401ea36a69daed36fb966a1e19a7a124" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/03/b8/704d753a5a45507a7aab61f18db9509302ed3d0a27ac7e0359ec2905b1a6/greenlet-3.2.4.tar.gz" + sha256 "0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.py").write "print(2+2)\n" + assert_equal "4\n", shell_output("#{bin}/bpython test.py") + end +end diff --git a/Formula/b/bpytop.rb b/Formula/b/bpytop.rb new file mode 100644 index 0000000000000..8c0d6e91c4566 --- /dev/null +++ b/Formula/b/bpytop.rb @@ -0,0 +1,77 @@ +class Bpytop < Formula + include Language::Python::Virtualenv + include Language::Python::Shebang + + desc "Linux/OSX/FreeBSD resource monitor" + homepage "https://github.com/aristocratos/bpytop" + url "https://github.com/aristocratos/bpytop/archive/refs/tags/v1.0.68.tar.gz" + sha256 "3a936f8899efb66246e82bbcab33249bf94aabcefbe410e56f045a1ce3c9949f" + license "Apache-2.0" + head "https://github.com/aristocratos/bpytop.git", branch: "master" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b19bca99c4b0dadd6f0acaab677713cb36e69066d938e40975bb6ec5e1e5e0a5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f5de2cc3e6a468f7de3afc1a4c0e89b6fdc5b015c9948a069163a4cd8f5e883f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a68fda2ed5723d9a9dbd8314b432256fea597aed76249e118f5d84f9ad7f3435" + sha256 cellar: :any_skip_relocation, sonoma: "f47e3022d6b8328e32736b7193ac9d3c6678567697ad808252db830ce3b634db" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c67cef4be215e9374aebee5f4541a7f87b4d3a87dde27c738ce4f9d349ad90c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8429d3cbe14ef4215355724446eb5720130c89d596441d7184166f3b4c1f8dd" + end + + depends_on "python@3.14" + + on_macos do + depends_on "osx-cpu-temp" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/90/c7/6dc0a455d111f68ee43f27793971cf03fe29b6ef972042549db29eec39a2/psutil-5.9.8.tar.gz" + sha256 "6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c" + end + + # Tolerate SMC error from osx-cpu-temp + # https://github.com/aristocratos/bpytop/pull/405 + patch do + url "https://github.com/aristocratos/bpytop/commit/5634526721b1bc98dc7a7003801cdf99686419ed.patch?full_index=1" + sha256 "0158252936cfd1adcbe5e664f641a0c2bb6093270bedf4282cf5c7ff49a7d238" + end + + def install + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install "themes" + + # Replace shebang with virtualenv python + rw_info = python_shebang_rewrite_info("#{libexec}/bin/python") + rewrite_shebang rw_info, bin/"bpytop" + end + + test do + config = (testpath/".config/bpytop") + mkdir config/"themes" + # Disable cpu_freq on arm due to missing support: https://github.com/giampaolo/psutil/issues/1892 + (config/"bpytop.conf").write <<~EOS + #? Config file for bpytop v. #{version} + + update_ms=2000 + log_level=DEBUG + show_cpu_freq=#{!Hardware::CPU.arm?} + EOS + + require "pty" + require "io/console" + + r, w, pid = PTY.spawn(bin/"bpytop") + r.winsize = [80, 130] + sleep 15 + w.write "\cC" + + log = (config/"error.log").read + assert_match "bpytop version #{version} started with pid #{pid}", log + refute_match(/ERROR:/, log) + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/b/brag.rb b/Formula/b/brag.rb new file mode 100644 index 0000000000000..3b709cf06e9a3 --- /dev/null +++ b/Formula/b/brag.rb @@ -0,0 +1,32 @@ +class Brag < Formula + desc "Download and assemble multipart binaries from newsgroups" + homepage "https://brag.sourceforge.net/" + url "https://downloads.sourceforge.net/project/brag/brag/1.4.3/brag-1.4.3.tar.gz" + sha256 "f2c8110c38805c31ad181f4737c26e766dc8ecfa2bce158197b985be892cece6" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "112ddb2485aa0730c63d109081ccf086ca5c83c0de724cb1914722f63e4ea8ad" + end + + depends_on "uudeview" + + on_linux do + depends_on "tcl-tk@8" + end + + def install + bin.install "brag" + # macOS needs /usr/bin before #{HOMEBREW_PREFIX}/bin to avoid incompatible TCL 9. + # We prepend both PATH on all OS to retain `all` bottle. + bin.env_script_all_files libexec, PATH: "#{Formula["tcl-tk@8"].opt_bin}:/usr/bin:${PATH}" + man1.install "brag.1" + end + + test do + system bin/"brag", "-s", "nntp.perl.org", "-L" + end +end diff --git a/Formula/b/braid.rb b/Formula/b/braid.rb new file mode 100644 index 0000000000000..b4a31cdedd2e2 --- /dev/null +++ b/Formula/b/braid.rb @@ -0,0 +1,95 @@ +class Braid < Formula + desc "Simple tool to help track vendor branches in a Git repository" + homepage "https://cristibalan.github.io/braid/" + url "https://github.com/cristibalan/braid.git", + tag: "v1.1.10", + revision: "16729390a2a8e6b45919545b056a1a7ac83c14d6" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cf994c891b0d901bceab7e31c21b326527f158a9d919c7d763d5f5a25844e6ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf994c891b0d901bceab7e31c21b326527f158a9d919c7d763d5f5a25844e6ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf994c891b0d901bceab7e31c21b326527f158a9d919c7d763d5f5a25844e6ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf994c891b0d901bceab7e31c21b326527f158a9d919c7d763d5f5a25844e6ac" + sha256 cellar: :any_skip_relocation, sonoma: "cf994c891b0d901bceab7e31c21b326527f158a9d919c7d763d5f5a25844e6ac" + sha256 cellar: :any_skip_relocation, ventura: "cf994c891b0d901bceab7e31c21b326527f158a9d919c7d763d5f5a25844e6ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ed0a0fa749864a7a1ebfd8eb8864f49166d3d6e772dab487f985d2866f0604f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a30ac7001f8b4ee4cd78f913c580d432205a7bedf006ff557de41ae771f47dd" + end + + uses_from_macos "ruby" + + resource "pstore" do + url "https://rubygems.org/gems/pstore-0.1.3.gem" + sha256 "04b6a7d299379277ac3ec110a1c99785d6596c2db8ae52b8b8c2de5b8c2ab3c4" + end + + resource "ostruct" do + url "https://rubygems.org/gems/ostruct-0.6.0.gem" + sha256 "3b1736c99f4d985de36bde1155be5e22aaf6e564b30ff9bd481e2ef7c2d9ba85" + end + + resource "map" do + url "https://rubygems.org/gems/map-6.6.0.gem" + sha256 "153a6f384515b14085805f5839d318f9d3c9dab676f341340fa4300150373cbc" + end + + resource "fattr" do + url "https://rubygems.org/gems/fattr-2.4.0.gem" + sha256 "a7544665977e6ff2945e204436f3b8e932edf8ed3d7174d5d027a265e328fc08" + end + + resource "chronic" do + url "https://rubygems.org/gems/chronic-0.10.2.gem" + sha256 "766f2fcce6ac3cc152249ed0f2b827770d3e517e2e87c5fba7ed74f4889d2dc3" + end + + resource "arrayfields" do + url "https://rubygems.org/gems/arrayfields-4.9.2.gem" + sha256 "1593f0bac948e24aa5e5099b7994b0fb5da69b6f29a82804ccf496bc125de4ab" + end + + resource "main" do + url "https://rubygems.org/gems/main-6.3.0.gem" + sha256 "ebd573133ab3707e2b43710de79f03bde7f10d41b86f2ba75e93da1482b04897" + end + + resource "logger" do + url "https://rubygems.org/gems/logger-1.6.0.gem" + sha256 "0ab7c120262dd8de2a18cb8d377f1f318cbe98535160a508af9e7710ff43ef3e" + end + + resource "json" do + url "https://rubygems.org/gems/json-2.7.1.gem" + sha256 "187ea312fb58420ff0c40f40af1862651d4295c8675267c6a1c353f1a0ac3265" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + next if r.name == "json" && OS.mac? + + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + system "gem", "build", "braid.gemspec" + system "gem", "install", "--ignore-dependencies", "braid-#{version}.gem" + bin.install libexec/"bin/braid" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + mkdir "test" do + system "git", "init" + (Pathname.pwd/"README").write "Testing" + (Pathname.pwd/".gitignore").write "Library" + system "git", "add", "README", ".gitignore" + system "git", "commit", "-m", "Initial commit" + output = shell_output("#{bin}/braid add https://github.com/cristibalan/braid.git") + assert_match "Braid: Added mirror at '", output + assert_match "braid (", shell_output("#{bin}/braid status") + end + end +end diff --git a/Formula/b/brainfuck.rb b/Formula/b/brainfuck.rb new file mode 100644 index 0000000000000..7312ebfd6a181 --- /dev/null +++ b/Formula/b/brainfuck.rb @@ -0,0 +1,47 @@ +class Brainfuck < Formula + desc "Interpreter for the brainfuck language" + homepage "https://github.com/fabianishere/brainfuck" + url "https://github.com/fabianishere/brainfuck/archive/refs/tags/2.7.3.tar.gz" + sha256 "d99be61271b4c27e26a8154151574aa3750133a0bedd07124b92ccca1e03b5a7" + license "Apache-2.0" + head "https://github.com/fabianishere/brainfuck.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d38b944beb199f418b1d798264e8319b6b2e89e592fceb0ba113bd8b8a151ecb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e316f33095c63723b7cc707d1c3c484d2049292606c673e99053a2364ce2a0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44592a40d38925f1bd3093e343168d66e20f642883cbf5f00cf705b05aa9dbf2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d4112d01c4118b43ef74885ec4a4b5ca2042a2fe3fcb6094e0d9b27d98749052" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b753b7dd2274926dbd763571f8b922fe270e25ee527ddd3a71cc4a1f7acb94de" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "802734b20ee8e8fc6eed4a1894c10b5e11810d006ff9346897179b085a4d244b" + sha256 cellar: :any_skip_relocation, sonoma: "3b2cc8e0ad8efe56f633ac0970c2502f631080a04276eb34b35287eb9861f860" + sha256 cellar: :any_skip_relocation, ventura: "7d1a2e50deadc635f5ecde4166002b702eaba0c91869d24c5094d8eeb17c83cc" + sha256 cellar: :any_skip_relocation, monterey: "482ca8d67a9fd57c88e24d5763194e8e70f7e9d7c9dd8a7f3b5827097e2dfb6a" + sha256 cellar: :any_skip_relocation, big_sur: "3120d4eda67a0cf102317a5e0a4ecb36ca8ab99b75c2f0c8b76eabdffb31e252" + sha256 cellar: :any_skip_relocation, catalina: "3bc5affaa9e6ba7d7dc6c2f94ad1e63f36a6e19553a8f0183077322f4c9e9026" + sha256 cellar: :any_skip_relocation, arm64_linux: "acc255cdfcaf886863897df064d5aa0b548f1921a04d821c3df4074a7240e6e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3554b9a52daf8e246b2459186a891b82c2aa4ce70d900735288903cbc5150152" + end + + depends_on "cmake" => :build + + uses_from_macos "libedit" + + def install + args = %w[ + -DBUILD_SHARED_LIB=ON + -DBUILD_STATIC_LIB=ON + -DINSTALL_EXAMPLES=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/brainfuck -e '++++++++[>++++++++<-]>+.+.+.'") + assert_equal "ABC", output.chomp + end +end diff --git a/Formula/b/breezy.rb b/Formula/b/breezy.rb new file mode 100644 index 0000000000000..bd705ac586607 --- /dev/null +++ b/Formula/b/breezy.rb @@ -0,0 +1,100 @@ +class Breezy < Formula + include Language::Python::Virtualenv + + desc "Version control system implemented in Python with multi-format support" + # homepage "https://www.breezy-vcs.org/" # https://bugs.launchpad.net/brz/+bug/2102204 + homepage "https://github.com/breezy-team/breezy" + # pypi sdist bug report, https://bugs.launchpad.net/brz/+bug/2111649 + url "https://github.com/breezy-team/breezy/archive/refs/tags/brz-3.3.17.tar.gz" + sha256 "87aa018059e94debf8a6bf27117f36570e89d412a467d2bc6a31fecb374110f5" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^brz[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "55c587df317149640d9bdc4fb0055793b08322f9779393e75c74c508d44d7cc7" + sha256 cellar: :any, arm64_sequoia: "33d15e966a3e7f6b5766d08bfd9fa0f2cbf9931043c02210e74392ff3eeafa4f" + sha256 cellar: :any, arm64_sonoma: "5ea7ef502a4685ae9e6b85c107bbe929a43e44563faec707a65ac6b40f60ee2f" + sha256 cellar: :any, sonoma: "d97ca1db2078044db1810ed31e71d1b79cfc09f11bc53163efd085b27e9b4e0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "985a0a05022c9ad40764e748848f9044e031cc25624c09d9372693879e8269ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a521ae8f8a0fd779ad5160fd11e02071223c86ed1278e2e82cac172e21c69ee9" + end + + depends_on "gettext" => :build + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.14" + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "dulwich" do + url "https://files.pythonhosted.org/packages/58/98/b6b8bf80e61d1aacf59aad4e45e6a1e7c39751c7bcaeb1136821bae82cd8/dulwich-0.24.8.tar.gz" + sha256 "c9f4748bbcca56fb57458c71c0d30e2351ac15e0583d428c739c09228be68f05" + end + + resource "fastbencode" do + url "https://files.pythonhosted.org/packages/cd/e5/0e98b0154da2705852a1154a4d325830583670c376a6c46e9f557b0aa3c5/fastbencode-0.3.6.tar.gz" + sha256 "114f853ebbb0a5168ac7ca4337bd9a542105e3d403b970111bfef16e0037c1c5" + end + + resource "merge3" do + url "https://files.pythonhosted.org/packages/12/71/daaa7978561b9a7bfdcee4ba5ec2ead6162f6a9d2e2edf069def96085c6b/merge3-0.0.16.tar.gz" + sha256 "0852de4381cb46be5ef4ed49e3ac20c5a4a0cd46a8ff4bbb870bc27aab543306" + end + + resource "patiencediff" do + url "https://files.pythonhosted.org/packages/29/42/795991d063200c34094686bd3659a228caa1f4aca1afa98593d06a3d9344/patiencediff-0.2.18.tar.gz" + sha256 "a678d8252bfb060f1f280fd32d47d917d323e93e1a94ff4ddaaba693a6f66aad" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + bin.each_child do |f| + f.unlink + f.write_env_script libexec/"bin"/f.basename, PATH: "#{libexec}/bin:$PATH" + end + man1.install_symlink Dir[libexec/"man/man1/*.1"] + + # Replace bazaar with breezy + bin.install_symlink "brz" => "bzr" + end + + test do + whoami = "Homebrew " + system bin/"brz", "whoami", whoami + assert_match whoami, shell_output("#{bin}/brz whoami") + + # Test bazaar compatibility + system bin/"brz", "init-repo", "sample" + system bin/"brz", "init", "sample/trunk" + touch testpath/"sample/trunk/test.txt" + cd "sample/trunk" do + system bin/"brz", "add", "test.txt" + system bin/"brz", "commit", "-m", "test" + end + + # Test git compatibility + system bin/"brz", "init", "--git", "sample2" + touch testpath/"sample2/test.txt" + cd "sample2" do + system bin/"brz", "add", "test.txt" + system bin/"brz", "commit", "-m", "test" + end + end +end diff --git a/Formula/b/brename.rb b/Formula/b/brename.rb new file mode 100644 index 0000000000000..76bd57dd2395d --- /dev/null +++ b/Formula/b/brename.rb @@ -0,0 +1,39 @@ +class Brename < Formula + desc "Cross-platform command-line tool for safe batch renaming via regular expressions" + homepage "https://github.com/shenwei356/brename" + url "https://github.com/shenwei356/brename/archive/refs/tags/v2.14.0.tar.gz" + sha256 "a16bceb25a75afa14c5dae2248c1244f1083b80b62783ce5dbf3e46ff68867d5" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de768e5762a8564a275a8bc3f06407d3b17e8eb22cfb7619baa517815aefa460" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39e2df7de67e853a566edaa7a2ba0f092013367b2efcea51d3c5c5d311b8fd94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39e2df7de67e853a566edaa7a2ba0f092013367b2efcea51d3c5c5d311b8fd94" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39e2df7de67e853a566edaa7a2ba0f092013367b2efcea51d3c5c5d311b8fd94" + sha256 cellar: :any_skip_relocation, sonoma: "b8b913eb74ec7ad4a0173416d14bbf3b0778e4cfcfbab96074d23f3dc3eb599e" + sha256 cellar: :any_skip_relocation, ventura: "b8b913eb74ec7ad4a0173416d14bbf3b0778e4cfcfbab96074d23f3dc3eb599e" + sha256 cellar: :any_skip_relocation, arm64_linux: "170e7aab9d87ab1c8f1d8dfc8fdf21e50317f6de279a87e41fe0c1f3da895b49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a2f5be698351339e8d38e1f6c0349a527c16bba384f8af516b732d4dc0330af" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(tags: "netgo", ldflags: "-s -w") + end + + test do + (1..9).each do |n| + (testpath/"Homebrew-#{n}.txt").write n.to_s + end + + system bin/"brename", "-p", "Homebrew-(\\d+).txt", "-r", "$1.txt", "-v", "0" + + (1..9).each do |n| + assert_equal n.to_s, (testpath/"#{n}.txt").read + refute_path_exists testpath/"Homebrew-#{n}.txt" + end + end +end diff --git a/Formula/b/breseq.rb b/Formula/b/breseq.rb new file mode 100644 index 0000000000000..d1b482badeb84 --- /dev/null +++ b/Formula/b/breseq.rb @@ -0,0 +1,55 @@ +class Breseq < Formula + desc "Computational pipeline for finding mutations in short-read DNA resequencing data" + homepage "https://barricklab.org/breseq" + url "https://github.com/barricklab/breseq/archive/refs/tags/v0.39.0.tar.gz" + sha256 "5aa1bd9af71899e1358cfb9b8440c16cc908f185d9178a401a5a4d3f0c7ee861" + license all_of: ["GPL-2.0-or-later", "MIT", "BSD-3-Clause"] + head "https://github.com/barricklab/breseq.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9033acd95cad3f4b965f8baeacf9633bda0320067c79637a1322fe37673356c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f22120bae403eb392bec70333093e7176e565853bf5108b51ed37b82a8b39d54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a5d0b6591968d4b5747cf81d8f377560da5e8b2633d401d5e60f36e954655e49" + sha256 cellar: :any_skip_relocation, arm64_ventura: "251cb721ac1cedfb266a35557af31efc3964d9265c302c21186173c4089c5a3e" + sha256 cellar: :any_skip_relocation, sonoma: "f071fdaf4fb3b7b454b94674075cabe7bed6bbc630b5e3979971f62a35de4401" + sha256 cellar: :any_skip_relocation, ventura: "a7c5e18cc7968fd3e50450807eb1d84d2e1074b920e5a89011033c017621d248" + sha256 cellar: :any_skip_relocation, arm64_linux: "987988b2b8ade6641d0559570e3bb0b42dc96ab16e89d0a8fe6de973ae5f4ccc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fecf53100efc095e8c48e3be539d2d40d12f285983ba02d64333326b3acc4040" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "bowtie2" + depends_on "r" + + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + resource "homebrew-test-gbk" do + url "https://raw.githubusercontent.com/barricklab/breseq/refs/tags/v0.39.0/tests/data/REL606/REL606.fragment.gbk" + sha256 "0e6edf3df46da73db9d07622316e0b9617e7a95faf87589bb0a7bc2393e2d92e" + end + + resource "homebrew-test-fastq" do + url "https://raw.githubusercontent.com/barricklab/breseq/refs/tags/v0.39.0/tests/data/REL606/REL606.fragment.2.fastq" + sha256 "79775ab79421d43b41087f256f99f38681af5421d1303b86e6e92a471edbb0fb" + end + + testpath.install resource("homebrew-test-gbk") + testpath.install resource("homebrew-test-fastq") + + assert_match version.to_s, shell_output("#{bin}/breseq --version") + system bin/"breseq", "-r", "REL606.fragment.gbk", "REL606.fragment.2.fastq" + assert_path_exists "output" + end +end diff --git a/Formula/b/brev.rb b/Formula/b/brev.rb new file mode 100644 index 0000000000000..5c50bd05536b1 --- /dev/null +++ b/Formula/b/brev.rb @@ -0,0 +1,38 @@ +class Brev < Formula + desc "CLI tool for managing workspaces provided by brev.dev" + homepage "https://developer.nvidia.com/brev" + url "https://github.com/brevdev/brev-cli/archive/refs/tags/v0.6.314.tar.gz" + sha256 "8aace14f489e40db1fb63069e59b6d6c9613d8a2ac84342a346db04a127da8d4" + license "MIT" + head "https://github.com/brevdev/brev-cli.git", branch: "main" + + # Upstream appears to use GitHub releases to indicate that a version is + # released (and some tagged versions don't end up as a release), so it's + # necessary to check release versions instead of tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf6e04bc9b6014cdd639e5737f2f97109d16f4c035393a38b76165d35b6eb6cf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bf6e04bc9b6014cdd639e5737f2f97109d16f4c035393a38b76165d35b6eb6cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf6e04bc9b6014cdd639e5737f2f97109d16f4c035393a38b76165d35b6eb6cf" + sha256 cellar: :any_skip_relocation, sonoma: "f24f9c60f50288e46e10b8a8a30f9efcf2c4adfa51503889bb0ac7c902e8276e" + sha256 cellar: :any_skip_relocation, arm64_linux: "955d4d2288fd7b955eafdd9644c31bbfdf2bff066977aede8d01750ec362f329" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c38cdda4fae73cfa38c071ee8547148ebc0446ee55afa095c424f16d4b9cdab6" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/brevdev/brev-cli/pkg/cmd/version.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"brev", "completion") + end + + test do + system bin/"brev", "healthcheck" + end +end diff --git a/Formula/b/brew-cask-completion.rb b/Formula/b/brew-cask-completion.rb new file mode 100644 index 0000000000000..58b8aca9fdaeb --- /dev/null +++ b/Formula/b/brew-cask-completion.rb @@ -0,0 +1,35 @@ +class BrewCaskCompletion < Formula + desc "Fish completion for brew-cask" + homepage "https://github.com/xyb/homebrew-cask-completion" + url "https://github.com/xyb/homebrew-cask-completion/archive/refs/tags/v2.1.tar.gz" + sha256 "27c7ea3b7f7c060f5b5676a419220c4ce6ebf384237e859a61c346f61c8f7a1b" + license "BSD-2-Clause" + revision 1 + head "https://github.com/xyb/homebrew-cask-completion.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "713823d99d3c5d3b927159496e1f71721870ac4480c508edefc4feb617df854d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1c72424ca568a228443546a65b49434e69e1c5b1388786281cb7cc3ec5413ecb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9918f7a001ce1fb6bb7817a3aacae658371039789f5243d17e8a326880732d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fb88b0184cc69f44b9c0e9744a4ce7a46685aea6e1e529deae45f5edd4497788" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fb88b0184cc69f44b9c0e9744a4ce7a46685aea6e1e529deae45f5edd4497788" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a058f8dd7fb25aa2ca8452d32f7d419b3b461b0f3b1dfe4f2f2e6d0e79b014ab" + sha256 cellar: :any_skip_relocation, sonoma: "7881b953ee0b074dcf98d507dd637f805c2d04de803822ba2e002b00b9519ce1" + sha256 cellar: :any_skip_relocation, ventura: "2154b23c163900381ba68cfc78f2d961f5599e3a7116368ad516a7b02e2b7b4e" + sha256 cellar: :any_skip_relocation, monterey: "2154b23c163900381ba68cfc78f2d961f5599e3a7116368ad516a7b02e2b7b4e" + sha256 cellar: :any_skip_relocation, big_sur: "a5256bbd0456fc15083d843e7cc3778fd45dfd3562b14bf076e0a08bcc04948a" + sha256 cellar: :any_skip_relocation, catalina: "a5256bbd0456fc15083d843e7cc3778fd45dfd3562b14bf076e0a08bcc04948a" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfa441fcc60e4cab5a4005009c18f286d160b9e515462ab3938d8a15509d5195" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3225d50a5098677d66fd4179c7fb07460129e158fc7f3ba4f1a35adb6bd8901e" + end + + deprecate! date: "2025-05-17", because: "is now natively supported by `brew`" + + def install + fish_completion.install "brew-cask.fish" + end + + test do + assert_path_exists fish_completion/"brew-cask.fish" + end +end diff --git a/Formula/b/brew-gem.rb b/Formula/b/brew-gem.rb new file mode 100644 index 0000000000000..74ece640f10cf --- /dev/null +++ b/Formula/b/brew-gem.rb @@ -0,0 +1,33 @@ +class BrewGem < Formula + desc "Install RubyGems as Homebrew formulae" + homepage "https://github.com/sportngin/brew-gem" + url "https://github.com/sportngin/brew-gem/archive/refs/tags/v1.3.1.tar.gz" + sha256 "3ecb65806f7c4ea3140185dc90e0699f3d22c4b34926142f38c4d5abe5e2d2c2" + license "MIT" + head "https://github.com/sportngin/brew-gem.git", branch: "master" + + # Until versions exceed 2.2, the leading `v` in this regex isn't optional, as + # we need to avoid an older `2.2` tag (a typo) while continuing to match + # newer tags like `v1.1.1` and allowing for a future `v2.2.0` version. + livecheck do + url :stable + regex(/^v(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "d15fe230ba2d3b46a3239c2c8308771f4602d1367ca09a26e87fc0b402432e54" + end + + uses_from_macos "ruby" + + def install + lib.install Dir["lib/*"] + bin.install "bin/brew-gem" + end + + test do + system bin/"brew-gem", "help" + end +end diff --git a/Formula/b/brew-php-switcher.rb b/Formula/b/brew-php-switcher.rb new file mode 100644 index 0000000000000..2651220972ceb --- /dev/null +++ b/Formula/b/brew-php-switcher.rb @@ -0,0 +1,24 @@ +class BrewPhpSwitcher < Formula + desc "Switch Apache / Valet / CLI configs between PHP versions" + homepage "https://github.com/philcook/brew-php-switcher" + url "https://github.com/philcook/brew-php-switcher/archive/refs/tags/v2.6.tar.gz" + sha256 "a1d679b9d63d2a7b1e382c1e923bcb1aa717cee9fe605b0aaa70bb778fe99518" + license "MIT" + head "https://github.com/philcook/brew-php-switcher.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e41fbf1a76ac7c925c36ece1c26a597245e89a4c9444b3a145a1e6c054042dc0" + end + + depends_on "php" => :test + + def install + bin.install "phpswitch.sh" + bin.install_symlink "phpswitch.sh" => "brew-php-switcher" + end + + test do + assert_match "usage: brew-php-switcher version", + shell_output(bin/"brew-php-switcher") + end +end diff --git a/Formula/b/brigade-cli.rb b/Formula/b/brigade-cli.rb new file mode 100644 index 0000000000000..460efcffc461b --- /dev/null +++ b/Formula/b/brigade-cli.rb @@ -0,0 +1,56 @@ +class BrigadeCli < Formula + desc "Brigade command-line interface" + homepage "https://brigade.sh" + url "https://github.com/brigadecore/brigade.git", + tag: "v2.6.0", + revision: "e455508e5ec5bb9352e635c179ab44b0bc44c320" + license "Apache-2.0" + head "https://github.com/brigadecore/brigade.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "93938d159d0b3a5255a4bba8897a6e964ca40463210957612ab294e7deebcf27" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "297bad8cabf257b37796f62ce59aad4819642e6953fbf75aeedd5841b9ea0da1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37470ccf6183c82d4fbdc502adce51bafd52c44af60547a2c54b494bdb270d66" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bcb3e8a2f7518bd173d3a0c0427b11b817495408fb91adbd5a7ea0b1345e2f1e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4e178e6bfe8c8a61e05b2ada8776a5604613048747225d3e9860dc1dad623ead" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "48ec0ce5d53d16f87f4609aebdc42f589c4319ef546bec4c4cfe58d08c3cb7bf" + sha256 cellar: :any_skip_relocation, sonoma: "7376dace115e55e67a571e2a249765e957b7f1f44fbe8832f01c6f64bef8981a" + sha256 cellar: :any_skip_relocation, ventura: "86d2d5dbfcacd337eb27194414c7e46e2fd40d7a537e17a3293ea00f6e79e7a1" + sha256 cellar: :any_skip_relocation, monterey: "ac352707fa64317b9a5f9761bca6e51ef9da7381e070bfcbe54aceb6561f2ba0" + sha256 cellar: :any_skip_relocation, big_sur: "df47dabe1fa9f31b4e192307622c25134f09672b5a3149f634b360beef60a31c" + sha256 cellar: :any_skip_relocation, catalina: "c8053952e004fb4455c0402425de2e7099141964f914d3c906206e69865c98cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "e99412f76441b9a81e06bcb4a343498e2910d1b67a24995acbfafa840fc2289d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17449306b36ee93b21a273f1e7435610e11b903f49ebf5566dceac471fd0fe89" + end + + depends_on "go" => :build + + def install + ENV["SKIP_DOCKER"] = "true" + ENV["VERSION"] = "v#{version}" + + system "make", "hack-build-cli" + + os = Utils.safe_popen_read("go", "env", "GOOS").strip + arch = Utils.safe_popen_read("go", "env", "GOARCH").strip + bin.install "bin/brig-#{os}-#{arch}" => "brig" + end + + test do + system bin/"brig", "init", "--id", "foo" + assert_predicate testpath/".brigade", :directory? + + version_output = shell_output("#{bin}/brig version 2>&1") + assert_match "Brigade client:", version_output + + commit = stable.specs[:revision][0..6] + assert_match "Brigade client: version v#{version} -- commit #{commit}", version_output + end +end diff --git a/Formula/b/brightness.rb b/Formula/b/brightness.rb new file mode 100644 index 0000000000000..aed6fe64f1425 --- /dev/null +++ b/Formula/b/brightness.rb @@ -0,0 +1,35 @@ +class Brightness < Formula + desc "Change macOS display brightness from the command-line" + homepage "https://github.com/nriley/brightness" + url "https://github.com/nriley/brightness/archive/refs/tags/1.2.tar.gz" + sha256 "6094c9f0d136f4afaa823d299f5ea6100061c1cec7730bf45c155fd98761f86b" + license "BSD-2-Clause" + head "https://github.com/nriley/brightness.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0e6517dcfe7a3a982012ed8311ab590f4d071382d9e80ff60c8dba7dc0075e0a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92e87e26e1e82ded8087e37e6e94624f80af2b1d84248fb70653da8c86688396" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b58db49a33ceb05f73c15c3a138bf6f9c0c20902fc77395ebe980be328c3418" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9eeafad9f79ffee161eff12eb18073e5c3e22cdf00c727aead7f759e8d26b62" + sha256 cellar: :any_skip_relocation, arm64_monterey: "baf05ff80ff28745c1fed3f18467752c217236335d14d99d45fa6330a010a7bd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "553772d87cb89c4f482c3b4ea48eeb404a7572b6277ced0d87625695e480b4e7" + sha256 cellar: :any_skip_relocation, sonoma: "6318e2be3bb6323a7d1d89dd067cc9325486c431f0c692f0978e663969ed6fd7" + sha256 cellar: :any_skip_relocation, ventura: "ad0f98500a441f754f2f832e9d797f4dde7261874ceaee0a4d632f025d6d6985" + sha256 cellar: :any_skip_relocation, monterey: "b8eb62151ad68eaec24fedcd6e4f7a7f97970f044736cec19818c88d8ba9afca" + sha256 cellar: :any_skip_relocation, big_sur: "687b60a636da1664c3c16ef69e84556cfe78d04e3e080de1ca0182847df2afc1" + sha256 cellar: :any_skip_relocation, catalina: "d9a033e343696c88863a7d231197d27be9611a2c8c56c83b4fd2747e2a2e5a7e" + end + + depends_on :macos + + def install + system "make" + system "make", "prefix=#{prefix}", "install" + end + + test do + system bin/"brightness", "-l" + end +end diff --git a/Formula/b/briss.rb b/Formula/b/briss.rb new file mode 100644 index 0000000000000..32edaa5ab9933 --- /dev/null +++ b/Formula/b/briss.rb @@ -0,0 +1,27 @@ +class Briss < Formula + desc "Crop PDF files" + homepage "https://briss.sourceforge.net/" + url "https://downloads.sourceforge.net/project/briss/release%200.9/briss-0.9.tar.gz" + sha256 "45dd668a9ceb9cd59529a9fefe422a002ee1554a61be07e6fc8b3baf33d733d9" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "3aa9a79afde1e2530551aa220ea217676898bc939ac9341574079e126f4eaa83" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*.jar"] + bin.write_jar_script libexec/"briss-#{version}.jar", "briss" + end + + test do + cp test_fixtures("test.pdf"), testpath + system bin/"briss", "-s", "test.pdf", "-d", "output.pdf" + assert_path_exists testpath/"output.pdf" + end +end diff --git a/Formula/b/brogue.rb b/Formula/b/brogue.rb new file mode 100644 index 0000000000000..732c1cbaf2169 --- /dev/null +++ b/Formula/b/brogue.rb @@ -0,0 +1,58 @@ +class Brogue < Formula + desc "Roguelike game" + homepage "https://sites.google.com/site/broguegame/" + url "https://github.com/tmewett/BrogueCE/archive/refs/tags/v1.14.1.tar.gz" + sha256 "0fe39782c029068b4d3f9f21cc13974ced56fdd9b192e6ca972f8e13cf726f20" + license "AGPL-3.0-or-later" + head "https://github.com/tmewett/BrogueCE.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "540751f5a285ad8340068b1cb9432f65cd8744ce629819c3f3938fe9903850d6" + sha256 arm64_sequoia: "b2d2a8e6b65866cfbfba2eea171268017cb44f234dfdd85bd1943b5edcb8827f" + sha256 arm64_sonoma: "4d5ec621a099c5016345730c32c48664cab885537d7633f00fa39fe930b905da" + sha256 arm64_ventura: "1aec31252a24b39d4be968077507a343210733dfd068f31331e7dc7f5909a3a7" + sha256 arm64_monterey: "630b47e808445a9b131293d6e5637889d20c7168634981bd557b7df079d8c0d9" + sha256 sonoma: "0dc69856645329fa45cd9011a59c84260b00f05ad5fbe2a2e22f0f6ce2544f9b" + sha256 ventura: "9c7ee6f9de30fa3507aad6c3fbe863d0c5beea2e06ffdf34774974a83b4903b1" + sha256 monterey: "b84fd290fb2f6e5ed03f24df0cf85e0ec4b3c094e9af51271dc8ae2ad23ae0b2" + sha256 arm64_linux: "e32ab428d1e157b79b5f8837c820bff2573694ace1cbe4b258ba595171884dc6" + sha256 x86_64_linux: "024fae31f907fa7176729178e4b7e442d9f5ea9a978be5bffaa8bf20c5c50006" + end + + depends_on "sdl2" + depends_on "sdl2_image" + + uses_from_macos "ncurses" + + # build patch for sdl_image.h include, remove in next release + patch do + url "https://github.com/tmewett/BrogueCE/commit/baff9b5081c60ec3c0117913e419fa05126025db.patch?full_index=1" + sha256 "7b51b43ca542958cd2051d6edbe8de3cbe73a5f1ac3e0d8e3c9bff99554f877e" + end + + def install + system "make", "bin/brogue", "RELEASE=YES", "TERMINAL=YES", "DATADIR=#{libexec}" + libexec.install "bin/brogue", "bin/keymap.txt", "bin/assets" + + # Use var directory to save highscores and replay files across upgrades + (bin/"brogue").write <<~SHELL + #!/bin/bash + cd "#{var}/brogue" && exec "#{libexec}/brogue" "$@" + SHELL + end + + def post_install + (var/"brogue").mkpath + end + + def caveats + <<~EOS + If you are upgrading from 1.7.2, you need to copy your highscores file: + cp #{HOMEBREW_PREFIX}/Cellar/#{name}/1.7.2/BrogueHighScores.txt #{var}/brogue/ + EOS + end + + test do + system bin/"brogue", "--version" + end +end diff --git a/Formula/b/brook.rb b/Formula/b/brook.rb new file mode 100644 index 0000000000000..a1e5787c8c73b --- /dev/null +++ b/Formula/b/brook.rb @@ -0,0 +1,37 @@ +class Brook < Formula + desc "Cross-platform strong encryption and not detectable proxy. Zero-Configuration" + homepage "https://brook.app/" + url "https://github.com/txthinking/brook/archive/refs/tags/v20250808.tar.gz" + sha256 "d78e8066ba5377c3841c8b6dcc6949cccbc04f3e475a3ac34587721438cde494" + license "GPL-3.0-only" + head "https://github.com/txthinking/brook.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1242b02dbfd40053930fe0d52f7bb925b8c5fea7401e8e6e132d26086028793" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "564f95bb9ccd7cb726f77a7edbefa788366804c53d87398715a23a54cd1354d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "564f95bb9ccd7cb726f77a7edbefa788366804c53d87398715a23a54cd1354d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "564f95bb9ccd7cb726f77a7edbefa788366804c53d87398715a23a54cd1354d9" + sha256 cellar: :any_skip_relocation, sonoma: "43906bd2683a7b8d2d8ebfc55771e74c1161d8cf25af6482e429335e248db075" + sha256 cellar: :any_skip_relocation, ventura: "43906bd2683a7b8d2d8ebfc55771e74c1161d8cf25af6482e429335e248db075" + sha256 cellar: :any_skip_relocation, arm64_linux: "04c6e67447718429922cd0dc6ea53c3e9b3b4c6ed3ea02bc63300070657aef8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "401093bfe7df589f3e79937615e8f7585e7d916b714cc4c56a3cef1641be514d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cli/brook" + end + + test do + output = shell_output "#{bin}/brook link --server 1.2.3.4:56789 --password hello" + # We expect something like "brook://server?password=hello&server=1.2.3.4%3A56789" + uri = URI(output) + assert_equal "brook", uri.scheme + assert_equal "server", uri.host + + query = URI.decode_www_form(uri.query).to_h + assert_equal "1.2.3.4:56789", query["server"] + assert_equal "hello", query["password"] + end +end diff --git a/Formula/b/broot.rb b/Formula/b/broot.rb new file mode 100644 index 0000000000000..c9f479513458b --- /dev/null +++ b/Formula/b/broot.rb @@ -0,0 +1,65 @@ +class Broot < Formula + desc "New way to see and navigate directory trees" + homepage "https://dystroy.org/broot/" + url "https://github.com/Canop/broot/archive/refs/tags/v1.52.0.tar.gz" + sha256 "2f0c9b52a97cf32f617e39084bfff8271d4a3d9b30f8ec2811b577cb433d7743" + license "MIT" + head "https://github.com/Canop/broot.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7c55326883899ae579cf45a22d5543b96706fb3b09c83895c86affbf18781153" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42795f13ce351a096aa305fa19676cafb154f4e301850612d29d008974075653" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0179a500ad8a7e3fbc5b2a0db395d64dd0c6cc502c7b6315325534fa42794bae" + sha256 cellar: :any_skip_relocation, sonoma: "46269caaad596ddcf9867a08bd17f636f91c8d9c697fc25c3335801e019310aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "4dabf704921c24874ed243d6f0e3458dd1277d95991501d492940f98ca722993" + sha256 cellar: :any_skip_relocation, x86_64_linux: "438e5b147341337335c99d4d8d06dbaf9b91e7dbf29f874b28176ee6a0a3de25" + end + + depends_on "rust" => :build + depends_on "libxcb" + + uses_from_macos "curl" => :build + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + + # Replace man page "#version" and "#date" based on logic in release.sh + inreplace "man/page" do |s| + s.gsub! "#version", version.to_s + s.gsub! "#date", time.strftime("%Y/%m/%d") + end + man1.install "man/page" => "broot.1" + + # Completion scripts are generated in the crate's build directory, + # which includes a fingerprint hash. Try to locate it first + out_dir = Dir["target/release/build/broot-*/out"].first + fish_completion.install "#{out_dir}/broot.fish" + fish_completion.install "#{out_dir}/br.fish" + zsh_completion.install "#{out_dir}/_broot" + zsh_completion.install "#{out_dir}/_br" + bash_completion.install "#{out_dir}/broot.bash" => "broot" + bash_completion.install "#{out_dir}/br.bash" => "br" + end + + test do + output = shell_output("#{bin}/broot --help") + assert_match "lets you explore file hierarchies with a tree-like view", output + assert_match version.to_s, shell_output("#{bin}/broot --version") + + require "pty" + require "io/console" + PTY.spawn(bin/"broot", "-c", ":print_tree", "--color", "no", "--outcmd", testpath/"output.txt") do |r, w, pid| + r.winsize = [20, 80] # broot dependency terminal requires width > 2 + w.write "n\r\n" + output = "" + begin + r.each { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + assert_match "New Configuration files written in", output + assert_predicate Process::Status.wait(pid), :success? + end + end +end diff --git a/Formula/b/brotli.rb b/Formula/b/brotli.rb new file mode 100644 index 0000000000000..880f5b125f7bd --- /dev/null +++ b/Formula/b/brotli.rb @@ -0,0 +1,43 @@ +class Brotli < Formula + desc "Generic-purpose lossless compression algorithm by Google" + homepage "https://github.com/google/brotli" + url "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/brotli-1.2.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/brotli-1.2.0.tar.gz" + sha256 "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec" + license "MIT" + head "https://github.com/google/brotli.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "71ffd30ccd74a9f28cfb210c21fcdc1aa5fec79e23ad2264b6dbceb73437601f" + sha256 cellar: :any, arm64_sequoia: "b8e388c96be5a63a46e0335c390fecb20dda7adb1368a2ba0209b38cae17c708" + sha256 cellar: :any, arm64_sonoma: "46b1cc7ef8ba325e56f7363de1068a84449dac940187dd2290a75e7008b3b4e1" + sha256 cellar: :any, sonoma: "c9d272f3ac33b730d548da14ca323e8b4e0185273a6c85b0f12a4bbcd9f684af" + sha256 cellar: :any_skip_relocation, arm64_linux: "485e0a6a74702cbe57819b32177bfb81e0195a71f52a16bab84b03529a672cf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d97618daaa84b66bc783888297f1765eb6f60e6a78e9b7c2ba0406889c159c05" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build", "--verbose" + system "ctest", "--test-dir", "build", "--verbose" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args + system "cmake", "--build", "build-static" + lib.install buildpath.glob("build-static/*.a") + end + + test do + (testpath/"file.txt").write("Hello, World!") + system bin/"brotli", "file.txt", "file.txt.br" + system bin/"brotli", "file.txt.br", "--output=out.txt", "--decompress" + assert_equal (testpath/"file.txt").read, (testpath/"out.txt").read + end +end diff --git a/Formula/b/brpc.rb b/Formula/b/brpc.rb new file mode 100644 index 0000000000000..023fc332fce5d --- /dev/null +++ b/Formula/b/brpc.rb @@ -0,0 +1,90 @@ +class Brpc < Formula + desc "Better RPC framework" + homepage "https://brpc.apache.org/" + url "https://dlcdn.apache.org/brpc/1.15.0/apache-brpc-1.15.0-src.tar.gz" + sha256 "0bc8c2aee810c96e6c77886f828fbfdf32ae353ce997eb46f2772c0088010c35" + license "Apache-2.0" + head "https://github.com/apache/brpc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3f567ec2d226b62ad9c71cb209d8c73732ea18e8060f0cc8b4ae28790e0036c3" + sha256 cellar: :any, arm64_sequoia: "c31c7b334897927ce901498c0ef0a8c9b0b309c2e24646d3c5cc0423d9b23d91" + sha256 cellar: :any, arm64_sonoma: "89be1094ebbb941bafd4f564d9df2db447404fe2f3544d6483d85a334ab071d6" + sha256 cellar: :any, sonoma: "f11417e6c3be3b7317e50ec3da35c2622a773b08f4461fb501e2b80135d31d1b" + sha256 arm64_linux: "89a2ea7c0c1ac653a05a21526617c0e6e2ab9ccd9f7c2b186b36b843630b81ec" + sha256 x86_64_linux: "771c698d51a79bd2e6dbb4555cb5be115b0f802e881a36c7e4d26867f1f96ce2" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "gflags" + depends_on "leveldb" + depends_on "openssl@3" + depends_on "protobuf@29" + + on_linux do + depends_on "pkgconf" => :test + end + + def install + inreplace "CMakeLists.txt", "/usr/local/opt/openssl", + Formula["openssl@3"].opt_prefix + + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DBUILD_UNIT_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + -DWITH_DEBUG_SYMBOLS=OFF + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + #include + #include + #include + + int main() { + brpc::Channel channel; + brpc::ChannelOptions options; + options.protocol = "http"; + options.timeout_ms = 1000; + if (channel.Init("https://brew.sh/", &options) != 0) { + LOG(ERROR) << "Failed to initialize channel"; + return 1; + } + brpc::Controller cntl; + cntl.http_request().uri() = "https://brew.sh/"; + channel.CallMethod(nullptr, &cntl, nullptr, nullptr, nullptr); + if (cntl.Failed()) { + LOG(ERROR) << cntl.ErrorText(); + return 1; + } + std::cout << cntl.http_response().status_code(); + return 0; + } + CPP + + protobuf = Formula["protobuf@29"] + flags = %W[ + -I#{include} + -I#{protobuf.opt_include} + -L#{lib} + -L#{protobuf.opt_lib} + -lbrpc + -lprotobuf + ] + # Work around for undefined reference to symbol + # '_ZN4absl12lts_2024072212log_internal21CheckOpMessageBuilder7ForVar2Ev' + flags += shell_output("pkgconf --libs absl_log_internal_check_op").chomp.split if OS.linux? + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + assert_equal "200", shell_output("./test") + end +end diff --git a/Formula/b/bruno-cli.rb b/Formula/b/bruno-cli.rb new file mode 100644 index 0000000000000..e41680e1f2cfe --- /dev/null +++ b/Formula/b/bruno-cli.rb @@ -0,0 +1,24 @@ +class BrunoCli < Formula + desc "CLI of the open-source IDE For exploring and testing APIs" + homepage "https://www.usebruno.com/" + url "https://registry.npmjs.org/@usebruno/cli/-/cli-2.13.2.tgz" + sha256 "043115f418dfbd7eac6058a14c38a6d605f5ee3c99c519331376136502c2b883" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0d5e08a1f8b1c9f4379496be6ef473e20d779d18f9ad279aba1d69f6ec676730" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + # supress `punycode` module deprecation warning, upstream issue: https://github.com/usebruno/bruno/issues/2229 + (bin/"bru").write_env_script libexec/"bin/bru", NODE_OPTIONS: "--no-deprecation" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bru --version") + assert_match "You can run only at the root of a collection", shell_output("#{bin}/bru run 2>&1", 4) + end +end diff --git a/Formula/b/brush.rb b/Formula/b/brush.rb new file mode 100644 index 0000000000000..d2e95f81fdcf2 --- /dev/null +++ b/Formula/b/brush.rb @@ -0,0 +1,34 @@ +class Brush < Formula + desc "Bourne RUsty SHell (command interpreter)" + homepage "https://github.com/reubeno/brush" + url "https://github.com/reubeno/brush/archive/refs/tags/brush-shell-v0.2.23.tar.gz" + sha256 "e1ed28bcc77fd58a8d3927a0409d6e31adc4991b1d54f567eeb804b37cb0f45c" + license "MIT" + head "https://github.com/reubeno/brush.git", branch: "main" + + livecheck do + url :stable + regex(/brush-shell[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8395daf5f869b07c9fe0bbc6a1c5863d0e9250b82f01d28fab1da56977e028d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "388611368e7fcee5e28f57b9fe155d0ca0d3fc68e6a9455d02819a426b07a009" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8dc37e66986bbcbdc068030a9e6f8119023c3a1b804acf3e17e31402b3feb556" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f0ea9343fee1abdbc901c57f68d30c28a339e95ca28b62176fb94e932cc47dc9" + sha256 cellar: :any_skip_relocation, sonoma: "82a63afb63f7bacd4cbdf269edbf589ece53f73650ee7d805126ae0a0e2589af" + sha256 cellar: :any_skip_relocation, ventura: "2776423f8acaa757911c23f6ed00e1dfef33b8df2260cbae1d167dfeebf732c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5774b9e24629eff1d65a4b6a2331cc8b109978326215ef8442ad16a6a02521ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d7e443de2576ab6a888a3972bece0ee694a79334d94bb31b31524e8c7b44778" + end + + depends_on "rust" => :build + def install + system "cargo", "install", *std_cargo_args(path: "brush-shell") + end + + test do + assert_match "brush", shell_output("#{bin}/brush --version") + assert_equal "homebrew", shell_output("#{bin}/brush -c 'echo homebrew'").chomp + end +end diff --git a/Formula/b/bsc.rb b/Formula/b/bsc.rb new file mode 100644 index 0000000000000..eaf86191a5adb --- /dev/null +++ b/Formula/b/bsc.rb @@ -0,0 +1,156 @@ +class Bsc < Formula + desc "Bluespec Compiler (BSC)" + homepage "https://github.com/B-Lang-org/bsc" + url "https://github.com/B-Lang-org/bsc.git", + tag: "2025.07", + revision: "282e82e95da4b8cdedc3af3431a45cc1c630c291" + license "BSD-3-Clause" + head "https://github.com/B-Lang-org/bsc.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "271fac6bcb893b9ac9ed0816572967482485674525370bac1aec27e5fafdcec8" + sha256 cellar: :any, arm64_sequoia: "73ca733dc6506343d400fb4b3615473893bb7c14b840f4bc2a87dee1fea1b6dc" + sha256 cellar: :any, arm64_sonoma: "a76320a8ef7ff83fdcfee1f8ab422f1907f17e38849ce7b7adf5093941ddeef1" + sha256 cellar: :any, sonoma: "99bea46008c809f6f605a517da2c24faf78ae7ce0ebfa015758e7d6c1a5d7744" + sha256 cellar: :any_skip_relocation, arm64_linux: "71d9a63e7c159e1ac85cff67a5e90f1711785d74ebc9250f470f361dd728648c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43b681c317a2919923ab0fcd8aea8fb74d2e5237fc4fa55cd2adef18cd8710dd" + end + + depends_on "autoconf" => :build + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gperf" => :build + depends_on "make" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "icarus-verilog" + depends_on "tcl-tk" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libffi" + uses_from_macos "perl" + + conflicts_with "libbsc", because: "both install `bsc` binaries" + + # Workaround to use brew `tcl-tk` until upstream adds support + # https://github.com/B-Lang-org/bsc/issues/504#issuecomment-1286287406 + patch :DATA + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", "--lib", + "old-time", + "regex-compat", + "split", + "syb" + + store_dir = Utils.safe_popen_read("cabal", "path", "--store-dir").chomp + ghc_version = Utils.safe_popen_read("ghc", "--numeric-version").chomp + package_db = "#{store_dir}/ghc-#{ghc_version}-inplace/package.db" + + with_env( + PREFIX: libexec, + GHCJOBS: ENV.make_jobs.to_s, + GHCRTSFLAGS: "+RTS -M4G -A128m -RTS", + GHC_PACKAGE_PATH: "#{package_db}:", + ) do + system "make", "install-src", "-j#{ENV.make_jobs}" + end + + bin.write_exec_script libexec/"bin/bsc" + bin.write_exec_script libexec/"bin/bluetcl" + lib.install_symlink Dir[libexec/"lib/SAT"/shared_library("*")] + lib.install_symlink libexec/"lib/Bluesim/libbskernel.a" + lib.install_symlink libexec/"lib/Bluesim/libbsprim.a" + include.install_symlink Dir[libexec/"lib/Bluesim/*.h"] + end + + test do + (testpath/"FibOne.bsv").write <<~BSV + (* synthesize *) + module mkFibOne(); + // register containing the current Fibonacci value + Reg#(int) this_fib(); // interface instantiation + mkReg#(0) this_fib_inst(this_fib); // module instantiation + // register containing the next Fibonacci value + Reg#(int) next_fib(); + mkReg#(1) next_fib_inst(next_fib); + + rule fib; // predicate condition always true, so omitted + this_fib <= next_fib; + next_fib <= this_fib + next_fib; // note that this uses stale this_fib + $display("%0d", this_fib); + if ( this_fib > 50 ) $finish(0) ; + endrule: fib + endmodule: mkFibOne + BSV + + expected_output = <<~EOS + 0 + 1 + 1 + 2 + 3 + 5 + 8 + 13 + 21 + 34 + 55 + EOS + + # Checking Verilog generation + system bin/"bsc", "-verilog", + "FibOne.bsv" + + # Checking Verilog simulation + system bin/"bsc", "-vsim", "iverilog", + "-e", "mkFibOne", + "-o", "mkFibOne.vexe", + "mkFibOne.v" + assert_equal expected_output, shell_output("./mkFibOne.vexe") + + # Checking Bluesim object generation + system bin/"bsc", "-sim", + "FibOne.bsv" + + # Checking Bluesim simulation + system bin/"bsc", "-sim", + "-e", "mkFibOne", + "-o", "mkFibOne.bexe", + "mkFibOne.ba" + assert_equal expected_output, shell_output("./mkFibOne.bexe") + end +end + +__END__ +--- a/platform.sh ++++ b/platform.sh +@@ -78,7 +78,7 @@ fi + ## ========================= + ## Find the TCL shell command + +-if [ ${OSTYPE} = "Darwin" ] ; then ++if [ ${OSTYPE} = "SKIP" ] ; then + # Have Makefile avoid Homebrew's install of tcl on Mac + TCLSH=/usr/bin/tclsh + else +@@ -106,7 +106,7 @@ TCL_ALT_SUFFIX=$(echo ${TCL_SUFFIX} | sed 's/\.//') + + if [ "$1" = "tclinc" ] ; then + # Avoid Homebrew's install of Tcl on Mac +- if [ ${OSTYPE} = "Darwin" ] ; then ++ if [ ${OSTYPE} = "SKIP" ] ; then + # no flags needed + exit 0 + fi +@@ -146,7 +146,7 @@ fi + + if [ "$1" = "tcllibs" ] ; then + # Avoid Homebrew's install of Tcl on Mac +- if [ ${OSTYPE} = "Darwin" ] ; then ++ if [ ${OSTYPE} = "SKIP" ] ; then + echo -ltcl${TCL_SUFFIX} + exit 0 + fi diff --git a/Formula/b/bsdconv.rb b/Formula/b/bsdconv.rb new file mode 100644 index 0000000000000..2d427e56fb27f --- /dev/null +++ b/Formula/b/bsdconv.rb @@ -0,0 +1,37 @@ +class Bsdconv < Formula + desc "Charset/encoding converter library" + homepage "https://github.com/buganini/bsdconv" + url "https://github.com/buganini/bsdconv/archive/refs/tags/11.6.tar.gz" + sha256 "e856e24474deb3731ac059a96af0078ba951895f2cb3b31f125148a29cc32b70" + license "BSD-2-Clause" + head "https://github.com/buganini/bsdconv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4975475d7d550693334c6abef8a0c8c1ee3f87552e3310f333f6a7e3b1548240" + sha256 arm64_sequoia: "eb27911fad713a1d8d36146105cb0abffcf7a6c78bdd358c09e5ff64c207e3fd" + sha256 arm64_sonoma: "d5f2086f8915426931817985ce3a3b379b4cac7ba2c31ea1b8ba69f46a51ebb2" + sha256 arm64_ventura: "3677f1c3ddd940126cdbaef44ea54ee40e8912572886d490e75139dd1950e268" + sha256 arm64_monterey: "bc26b770aa6622c467bb6adb345593c59cee51d1071211dd5acc913b4f0932c8" + sha256 arm64_big_sur: "92a2e9b7e7389c00556c577f05e2e7d6ff39919d62153fb07dd98df8ba6347ab" + sha256 sonoma: "6577f7dfca8ee141a9817219d6305b3f983ffeb11e2da5a3ab49d1834286356a" + sha256 ventura: "1021dc605aa738c62277f0c5eee99044daeb20111ce08360b827395fd088f779" + sha256 monterey: "1e695c9018c174f1dc39d4205e26a507acd12f789733c5c76608f5ceef92a2b4" + sha256 big_sur: "18fa8aff61b229d34b05516953d49aa807edb4f2231108e84bbe5c4847aac9e0" + sha256 catalina: "c7c3ee826009c6a77d2e435b56deee58b3243e7dc2ac54a7ddea90555a16ef7a" + sha256 arm64_linux: "2be08396cd20f1a195b1f1322e48fb636b76ab7d484c28790578286dcbaf011d" + sha256 x86_64_linux: "a77ffb5b4b404f82c6dcaa52eb3f63e23931e93782a3b179e873f47628673213" + end + + def install + system "make", "PREFIX=#{prefix}" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + output = pipe_output("#{bin}/bsdconv BIG5:UTF-8", "\263\134\273\134", 0) + output.force_encoding("UTF-8") if output.respond_to?(:force_encoding) + assert_equal "許蓋", output + end +end diff --git a/Formula/b/bsdiff.rb b/Formula/b/bsdiff.rb new file mode 100644 index 0000000000000..acaaf45372993 --- /dev/null +++ b/Formula/b/bsdiff.rb @@ -0,0 +1,66 @@ +class Bsdiff < Formula + desc "Generate and apply patches to binary files" + homepage "https://www.daemonology.net/bsdiff/" + # Returns 403 (forbidden) for the canonical download URL: + # "https://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz" + url "https://deb.debian.org/debian/pool/main/b/bsdiff/bsdiff_4.3.orig.tar.gz" + sha256 "18821588b2dc5bf159aa37d3bcb7b885d85ffd1e19f23a0c57a58723fea85f48" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?bsdiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1b39ac523c9bb26c5b194c20451b28be15bf1a8a5b59bab50a517f7619c472d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5aa138e7ada53aa574d2bf31f2cfa65cd53692001a1d7e5ad6240fc72975d6b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5dac6fb313e1df3f6c05870f8accc2f65615924124b9b24b481dc0c4e5f77193" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e83875207f8cc492079e701ba371bb08c89aaea95d47c0aa1d78069376dced12" + sha256 cellar: :any_skip_relocation, arm64_monterey: "141219925cf9d52e796d9bce068bf747d32e5f5c9b486c3eaf539b59980062dd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "810dccf063f4876a5786e4aa7f7584ebcf5205fec1abd0882cead7e0de16bca9" + sha256 cellar: :any_skip_relocation, sonoma: "ebe5b95b664031daacd3c13c259b36dacf96b014de8f391ba3c16049764758f0" + sha256 cellar: :any_skip_relocation, ventura: "a48083deaf3e24c5c364aeb4503cbceee406a980b63fa764df92d23798c95283" + sha256 cellar: :any_skip_relocation, monterey: "e0cf74e5fb1ef71fd68a33595f0dcc6d777d72e90689f57976e5c1784b1496a0" + sha256 cellar: :any_skip_relocation, big_sur: "7f1f498a32a8804a238cf8dce1ba7cebbee070ae6bf0bb4015dcb133ab155574" + sha256 cellar: :any_skip_relocation, catalina: "648a52a8af8e8f17feb9e34168dd0f00abfc98e9f0f3aa7fd88fb1458a782098" + sha256 arm64_linux: "bb201ab0bfbc684057c632420b2a69c2b568ccf547a7c121096806bd6c836d8f" + sha256 x86_64_linux: "a48ec4c541d81798cb3ba5706f031a7e71a8da01154eef1df353a729d2614130" + end + + depends_on "bmake" => :build + + uses_from_macos "bzip2" + + patch :DATA + + def install + ENV.append "LDLIBS", "-lbz2" unless OS.mac? + system "bmake" + bin.install "bsdiff" + man1.install "bsdiff.1" + end + + test do + (testpath/"bin1").write "\x01\x02\x03\x04" + (testpath/"bin2").write "\x01\x02\x03\x05" + + system bin/"bsdiff", "bin1", "bin2", "bindiff" + end +end + +__END__ +diff --git a/bspatch.c b/bspatch.c +index 643c60b..543379c 100644 +--- a/bspatch.c ++++ b/bspatch.c +@@ -28,6 +28,7 @@ + __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59:06 cperciva Exp $"); + #endif + ++#include + #include + #include + #include diff --git a/Formula/b/bsdmake.rb b/Formula/b/bsdmake.rb new file mode 100644 index 0000000000000..fe2c785020d24 --- /dev/null +++ b/Formula/b/bsdmake.rb @@ -0,0 +1,86 @@ +class Bsdmake < Formula + desc "BSD version of the Make build tool" + homepage "https://opensource.apple.com/" + url "https://github.com/apple-oss-distributions/bsdmake/archive/refs/tags/bsdmake-24.tar.gz" + sha256 "096f333f94193215931a9fab86b9bca0713fbd22ec465bf55510067b53940e62" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "BSD-4-Clause-UC"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "5318ec01ebc418bab6c1977ee2023e10901a0c9527cce2e277a9a66d86379399" + sha256 arm64_sequoia: "0d312bb7d3aec58aff67174bccc96691d353f97aedf71244e3efd32e7c8179e5" + sha256 arm64_sonoma: "2c38034eb73f466372df6d1de17892abc48aa2c112d33d65245a28290a49d591" + sha256 arm64_ventura: "8426abe75969c8adb575f6276d55e8a4737d1f139cf534294f74a843e74a632b" + sha256 arm64_monterey: "d01faf8a67751cf8248d36ef46fa23f8f6031c04fd723eb1cbf40ee881d6bc09" + sha256 arm64_big_sur: "cfca87086e9932c2a1beb031d5fd34018a5afbe84a051918b41b33e4e86c82ea" + sha256 sonoma: "2161f0b91983b77abfff210022d1175228354b0633d8ce9cbdb17f5647994c37" + sha256 ventura: "706f2a70bcadbfd643fdc3e6ca944de50c63fde0a23de03244ea4770f192e49a" + sha256 monterey: "303f1fce21a307e0ecb01214f64ba7c3f26c21aeafb44d803120d26500dd387a" + sha256 big_sur: "6b1aef88ae6c6b11cee8062b64f5fe2e1c337e3029833eaded84b6e740ae0391" + sha256 catalina: "5075d566898ea241d7251734f82f6846c288a49d939f8842fa566ea706e2417f" + end + + depends_on :macos + + # MacPorts patches to make bsdmake play nice with our prefix system + # Also a MacPorts patch to circumvent setrlimit error + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bsdmake/patch-Makefile.diff" + sha256 "1e247cb7d8769d50e675e3f66b6f19a1bc7663a7c0800fc29a2489f3f6397242" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bsdmake/patch-mk.diff" + sha256 "b7146bfe7a28fc422e740e28e56e5bf0166a29ddf47a54632ad106bca2d72559" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bsdmake/patch-pathnames.diff" + sha256 "b24d73e5fe48ac2ecdfbe381e9173f97523eed5b82a78c69dcdf6ce936706ec6" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/bsdmake/patch-setrlimit.diff" + sha256 "cab53527564d775d9bd9a6e4969f116fdd85bcf0ad3f3e57ec2dcc648f7ed448" + end + + def install + # Replace @PREFIX@ inserted by MacPorts patches + inreplace %w[mk/bsd.README + mk/bsd.cpu.mk + mk/bsd.doc.mk + mk/bsd.obj.mk + mk/bsd.own.mk + mk/bsd.port.mk + mk/bsd.port.subdir.mk + mk/sys.mk + pathnames.h], + "@PREFIX@", prefix + + inreplace "mk/bsd.own.mk" do |s| + s.gsub! "@INSTALL_USER@", `id -un`.chomp + s.gsub! "@INSTALL_GROUP@", `id -gn`.chomp + end + + # See GNUMakefile + ENV.append "CFLAGS", "-D__FBSDID=__RCSID" + ENV.append "CFLAGS", "-mdynamic-no-pic" + + system "make", "-f", "Makefile.dist" + bin.install "pmake" => "bsdmake" + man1.install "make.1" => "bsdmake.1" + (share/"mk/bsdmake").install Dir["mk/*"] + end + + test do + (testpath/"Makefile").write <<~MAKE + foo: + touch $@ + MAKE + + system bin/"bsdmake" + assert_path_exists testpath/"foo" + end +end diff --git a/Formula/b/bsdsfv.rb b/Formula/b/bsdsfv.rb new file mode 100644 index 0000000000000..fa244c322be51 --- /dev/null +++ b/Formula/b/bsdsfv.rb @@ -0,0 +1,54 @@ +class Bsdsfv < Formula + desc "SFV utility tools" + homepage "https://bsdsfv.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bsdsfv/bsdsfv/1.18/bsdsfv-1.18.tar.gz" + sha256 "577245da123d1ea95266c1628e66a6cf87b8046e1a902ddd408671baecf88495" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f9574e283a380ebdba76ba7ede0ad884261ee528e481f77cd4783e3d5b890e3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "524701069b0a0b5434b2cead350b18ef4bb2b394d7a82cc73c3fab9baed107ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e645fb99bfc780d0de8de68c504d7d10eba8337d3dc4108409171211a902239e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81531b6407c9081e4118d7abd4ed94f9f84899e349b6785141874bd0fd375390" + sha256 cellar: :any_skip_relocation, arm64_monterey: "30b9057ddfd9c6135bec8299b07b4070df1b9d27c78cbfdf02b60af48628915d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1f2a24ab528de05007b43da3e52628380f4bf6acf8d0d9d2d52cd3defd0c429c" + sha256 cellar: :any_skip_relocation, sonoma: "6330adc3385cc94183d0719c5b5868a4db2aa055551469eccccd29fae2b0c568" + sha256 cellar: :any_skip_relocation, ventura: "6f7366afb6194e3d5feca85e754ab5e0b3a2d02c5c56419aa2d9d7372a85afee" + sha256 cellar: :any_skip_relocation, monterey: "5e790ea081550e93842400272cd2e50ef34abf7d24bd04d258bfb9f4554a3ca4" + sha256 cellar: :any_skip_relocation, big_sur: "3fe4cd9e74eb5d55bf3ecc10a675600ade3b4f0d56b94d2bcfd9d71e91cae302" + sha256 cellar: :any_skip_relocation, catalina: "3abfd33001c44edc6b03905559f8565f923001aa1ccc3a3247ebd073d226ccaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "19ee5c984fc2bfc91735e2e53532b59f8acd4e8831bab55c215844b99f17beee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffa21308fb20dc93bbe80e8735590e035e0810e858a088f50c8d1ce1cfee041d" + end + + # bug report: + # https://sourceforge.net/p/bsdsfv/bugs/1/ + # Patch from MacPorts + patch :DATA + + def install + bin.mkpath + + inreplace "Makefile" do |s| + s.change_make_var! "INSTALL_PREFIX", prefix + s.change_make_var! "INDENT", "indent" + s.gsub! " ${INSTALL_PROGRAM} bsdsfv ${INSTALL_PREFIX}/bin", " ${INSTALL_PROGRAM} bsdsfv #{bin}/" + end + + system "make", "all" + system "make", "install" + end +end + +__END__ +--- a/bsdsfv.c 2012-09-25 07:31:03.000000000 -0500 ++++ b/bsdsfv.c 2012-09-25 07:31:08.000000000 -0500 +@@ -44,5 +44,5 @@ + typedef struct sfvtable { + char filename[FNAMELEN]; +- int crc; ++ unsigned int crc; + int found; + } SFVTABLE; diff --git a/Formula/b/bstring.rb b/Formula/b/bstring.rb new file mode 100644 index 0000000000000..f9d7a58fc3c8e --- /dev/null +++ b/Formula/b/bstring.rb @@ -0,0 +1,41 @@ +class Bstring < Formula + desc "Fork of Paul Hsieh's Better String Library" + homepage "https://mike.steinert.ca/bstring/" + url "https://github.com/msteinert/bstring/releases/download/v1.0.3/bstring-1.0.3.tar.xz" + sha256 "90db08fd33e9494aea3f00f9b71cdcf3114c65457ee35558e8274df6ebac43f3" + license "BSD-3-Clause" + head "https://github.com/msteinert/bstring.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "24503d1d048147dd52f869dadf9798aff2a658f0c79b6fc04239dc3fe91b8087" + sha256 cellar: :any, arm64_sequoia: "57539d29c82c298ddb0796cebbdcb5f487d9d9439403bc871331fae77a6360ba" + sha256 cellar: :any, arm64_sonoma: "1a12d3cf35ca6e75f822d558209b4c7012c581442c8413dcb1b420905705905f" + sha256 cellar: :any, sonoma: "3b7912d21554db0be416ba7b2d397062e3147463ca3ab62b6fecff5240e928f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "94f20278cd1ff242a9015e59d4572f4e65a85dec934e9fcc6f81bd416b664ed6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6f4ee274a77d1f62fa1220c2deffe2e08bb5e86ae39b993fae50813099b66a4" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "check" => :test + + def install + args = %w[-Denable-docs=false -Denable-tests=false] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install "tests" + end + + test do + cp pkgshare/"tests/bstest.c", "." + + check = Formula["check"] + ENV.append_to_cflags "-I#{include} -I#{check.opt_include}" + ENV.append "LDFLAGS", "-L#{lib} -L#{check.opt_lib}" + ENV.append "LDLIBS", "-lbstring -lcheck" + + system "make", "bstest" + system "./bstest" + end +end diff --git a/Formula/b/btcli.rb b/Formula/b/btcli.rb new file mode 100644 index 0000000000000..e5d4f0c7448aa --- /dev/null +++ b/Formula/b/btcli.rb @@ -0,0 +1,328 @@ +class Btcli < Formula + include Language::Python::Virtualenv + + desc "Bittensor command-line tool" + homepage "https://docs.bittensor.com/btcli" + url "https://files.pythonhosted.org/packages/72/ad/d996242b6093f5ea9bb9babc7927bb6817fd0c2fa585de1199bfa70eb506/bittensor_cli-9.14.3.tar.gz" + sha256 "bc8cb5e4e4aeabcfbee9cc1f2e1169079678464b60a7166510170772968a1511" + license "MIT" + head "https://github.com/opentensor/btcli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5737f77e7d5291cf23b71079e0fa0d4e28ae723ed36f0f4adf197b99844a5569" + sha256 cellar: :any, arm64_sequoia: "21b5c603a0fe8747e846a02475400102615b168fd3814ad3e03911a59341d715" + sha256 cellar: :any, arm64_sonoma: "d92475c956dac9507b958fca760f4653feb88452358171ba2df22f87ad4ce83c" + sha256 cellar: :any, sonoma: "c4cf4a5c040aec76360b7612c32c1a69e99dd1b6b1d6eb15bc93c812f6b351ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e6be426989101ad0a96256a9b80402d7f46126d2f6c0cdb8a45821e858a6273" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f513cad81c1b6def0a3404e051d94dd0401d525f9fb5a441f09ac55c160d2ec9" + end + + depends_on "rust" => :build # for bittensor-wallet, plotly + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "numpy" + depends_on "openssl@3" + depends_on "python@3.14" + + conflicts_with "btpd", because: "both install `btcli` binaries" + + pypi_packages exclude_packages: ["certifi", "numpy"] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "aiosqlite" do + url "https://files.pythonhosted.org/packages/13/7d/8bca2bf9a247c2c5dfeec1d7a5f40db6518f88d314b8bca9da29670d2671/aiosqlite-0.21.0.tar.gz" + sha256 "131bb8056daa3bc875608c631c678cda73922a2d4ba8aec373b19f18c17e7aa3" + end + + resource "async-substrate-interface" do + url "https://files.pythonhosted.org/packages/2e/9f/ce4215ae20299c883dac0dc8912ad5edb32c89a732b33cb6df4ffc9b9e83/async_substrate_interface-1.5.9.tar.gz" + sha256 "e3bf21a60ad8bc019c51f568bad98b7ca97d9653ecb74abd1aae811e1dc328c1" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "backoff" do + url "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz" + sha256 "03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba" + end + + resource "base58" do + url "https://files.pythonhosted.org/packages/7f/45/8ae61209bb9015f516102fa559a2914178da1d5868428bd86a1b4421141d/base58-2.1.1.tar.gz" + sha256 "c5d0cb3f5b6e81e8e35da5754388ddcc6d0d14b6c6a132cb93d69ed580a7278c" + end + + resource "bittensor-wallet" do + url "https://files.pythonhosted.org/packages/74/69/8e5eb1131e3fb750ead1c1b1d2b628dede7b41edfad835cb78764dd88ceb/bittensor_wallet-4.0.1.tar.gz" + sha256 "edc2588d5e272835285e4171dd3daf862149f617015bf52e43d433d8e5c297c5" + end + + resource "bt-decode" do + url "https://files.pythonhosted.org/packages/9d/d6/f30b65454ff3f78b698ec9e0b18fcd22299b43c5581f1e913f77657761db/bt_decode-0.8.0.tar.gz" + sha256 "deb6b798bea703c9b9e40267f6cddcfb45f7f4c884bbb3d2280143b18095eb09" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "narwhals" do + url "https://files.pythonhosted.org/packages/56/e5/ef07d31c2e07d99eecac8e14ace5c20aeb00ecba4ed5bb00343136380524/narwhals-2.10.0.tar.gz" + sha256 "1c05bbef2048a4045263de7d98c3d06140583eb13d796dd733b2157f05d24485" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "plotille" do + url "https://files.pythonhosted.org/packages/8a/73/3f342572f7f916e387e546cc502d6cad35e7162ba0bcde203669e15aa3af/plotille-5.0.0.tar.gz" + sha256 "99e5ca51a2e4c922ead3a3b0863cc2c6a9a4b3f701944589df10f42ce02ab3dc" + end + + resource "plotly" do + url "https://files.pythonhosted.org/packages/0c/63/961d47c9ffd592a575495891cdcf7875dc0903ebb33ac238935714213789/plotly-6.3.1.tar.gz" + sha256 "dd896e3d940e653a7ce0470087e82c2bd903969a55e30d1b01bb389319461bb0" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "scalecodec" do + url "https://files.pythonhosted.org/packages/b8/3c/4c3e3fa0efd75eb1e00b9bd6ccce8e0018e0789bff35d76cc9ce554354d0/scalecodec-1.2.12.tar.gz" + sha256 "aa54cc901970289fe64ae01edf076f25f60f8d7e4682979b827cab73dde74393" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + resource "xxhash" do + url "https://files.pythonhosted.org/packages/02/84/30869e01909fb37a6cc7e18688ee8bf1e42d57e7e0777636bd47524c43c7/xxhash-3.6.0.tar.gz" + sha256 "f0162a78b13a0d7617b2845b90c763339d1f1d82bb04a4b07f4ab535cc5e05d6" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + # required to declare scalecodec's version, issue opened at https://github.com/JAMdotTech/py-scale-codec/issues/130 + ENV["TRAVIS_TAG"] = resource("scalecodec").version.to_s + virtualenv_install_with_resources + + # `shellingham` auto-detection doesn't work in Homebrew CI build environment so + # disable it to allow `typer` to use argument as shell for completions + # Ref: https://typer.tiangolo.com/features/#user-friendly-cli-apps + ENV["_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION"] = "1" + generate_completions_from_executable(bin/"btcli", "--show-completion") + end + + test do + require "json" + wallet_path = testpath/"btcli-brew-test" + test_wallet_name = "brew-test" + ss58_address = "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty" + + # Create wallet + create_args = %W[ + --wallet-name #{test_wallet_name} + --wallet-path #{wallet_path} + --hotkey default + --no-use-password + --uri Bob + --overwrite + --json-output + ] + output = shell_output("#{bin}/btcli w create #{create_args.join(" ")}") + + expected_create = { + "success" => true, + "error" => "", + "data" => + { + "name" => test_wallet_name, + "path" => wallet_path.to_s, + "hotkey" => "default", + "hotkey_ss58" => ss58_address, + "coldkey_ss58" => ss58_address, + }, + } + + parsed_create = JSON.parse(output) + assert_equal expected_create, parsed_create + + # Check balance of the created wallet on the finney network + balance_args = %W[ + --network finney + --wallet-path #{wallet_path} + --wallet-name #{test_wallet_name} + --json-output + ] + balance_output = shell_output("#{bin}/btcli w balance #{balance_args.join(" ")}") + + expected_balance = { + "balances" => { + "brew-test" => { + "coldkey" => ss58_address, + "free" => 0.0, + "staked" => 0.0, + "total" => 0.0, + }, + }, + "totals" => { + "free" => 0.0, + "staked" => 0.0, + "total" => 0.0, + }, + } + + parsed_balance = JSON.parse(balance_output) + assert_equal expected_balance, parsed_balance + end +end diff --git a/Formula/b/btfs.rb b/Formula/b/btfs.rb new file mode 100644 index 0000000000000..f5a17dc5e0d81 --- /dev/null +++ b/Formula/b/btfs.rb @@ -0,0 +1,33 @@ +class Btfs < Formula + desc "BitTorrent filesystem based on FUSE" + homepage "https://github.com/johang/btfs" + url "https://github.com/johang/btfs/archive/refs/tags/v3.1.tar.gz" + sha256 "c363f04149f97baf1c5e10ac90677b8309724f2042ab045a45041cfb7b44649b" + license "GPL-3.0-only" + head "https://github.com/johang/btfs.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "cb3c4a3351015895e992b3c059b012aa24410edfa4795decafdbe7a850b9201c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de0d62491fcf2a7793531a3b1e3900f10cca457b2a2f67d04f19588f9f1c0b62" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "libfuse" + depends_on "libtorrent-rasterbar" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "openssl@3" + + def install + ENV.cxx11 + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"btfs", "--help" + end +end diff --git a/Formula/b/btllib.rb b/Formula/b/btllib.rb new file mode 100644 index 0000000000000..35fc305201a2a --- /dev/null +++ b/Formula/b/btllib.rb @@ -0,0 +1,62 @@ +class Btllib < Formula + desc "Bioinformatics Technology Lab common code library" + homepage "https://github.com/bcgsc/btllib" + url "https://github.com/bcgsc/btllib/releases/download/v1.7.5/btllib-1.7.5.tar.gz" + sha256 "118a9f8d6445a618178bfbec40d121bbe03014e767261522148f642686090c76" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f28456234329c7647f0f2cc58540744e0f9790b626b77d62cc4e1fc15811857f" + sha256 cellar: :any, arm64_sequoia: "62a4e2af4d7fc2c9d4a49e354943f4581629e399f78b6f31ad41458859651179" + sha256 cellar: :any, arm64_sonoma: "023e2d26013d71ba1f754c22ddca0993f33801e70d17d542a3776b144b0cae6e" + sha256 cellar: :any, sonoma: "e5c99cf0f8b060c9fed4bf52fe89bf90fd5e1535571fe59b67b0a80323afe58d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad898baf48d8ac49e1d40209b1a1e5a5f47cf3a79fbffb6975e55dcd77194e90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3473b3fa6fc735ad5f8262edf31a5decf2d998cf046880420dec5dc97679bac0" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.13" => :build # cxx file generated by swig is not compatible with 3.14 + + on_macos do + depends_on "libomp" + end + + # Apply FreeBSD patch to fix build with newer Clang, https://github.com/simongog/sdsl-lite/issues/462 + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/af74f60a871e4a5aa7aea787fc235a2cb760e764/devel/sdsl-lite/files/patch-include_sdsl_louds__tree.hpp" + sha256 "84aef67058947044c40032ac39d9b6d1b8a285c581f660d565cd23aaa4beade7" + directory "subprojects/sdsl-lite" + end + + def install + # Workaround for CMake 4 compatibility + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + args = %w[-Db_ndebug=true -Db_coverage=false] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "btllib/seq.hpp" + + #include + + int main() + { + std::string seq = "ACGTACACTGGACTGAGTCT"; + std::string rc = "AGACTCAGTCCAGTGTACGT"; + if (btllib::get_reverse_complement(seq) != rc) { + return 1; + } + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-lbtllib", "-o", "test" + system "./test" + end +end diff --git a/Formula/b/btop.rb b/Formula/b/btop.rb new file mode 100644 index 0000000000000..e8ee75b65fdbb --- /dev/null +++ b/Formula/b/btop.rb @@ -0,0 +1,82 @@ +class Btop < Formula + desc "Resource monitor. C++ version and continuation of bashtop and bpytop" + homepage "https://github.com/aristocratos/btop" + url "https://github.com/aristocratos/btop/archive/refs/tags/v1.4.5.tar.gz" + sha256 "0ffe03d3e26a3e9bbfd5375adf34934137757994f297d6b699a46edd43c3fc02" + license "Apache-2.0" + head "https://github.com/aristocratos/btop.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "51bf4b6c17e8d2fd5a4eed2eb6f63aad0239d36d26986b398b59d895dd183794" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf5788f77aeeb642ae9d80430bc6da47ea26e38e8628522f9771e978982eba61" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f2006e7d26a7a69a677537c974239f41ad43e961b81115127c0dc62f6503159" + sha256 sonoma: "e97e0797466ccbb028dc113fd21c6b0836b9460e5e52fd0705825b1308b2ff53" + sha256 cellar: :any_skip_relocation, arm64_linux: "c538378976afbf732762684bc823124b289e9c3bd79bc424003e42fdedc84b3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2743b5eaf43985efa2ce7151bb25a71bd6d09eeeb6872a1437a894e395e40310" + end + + depends_on "lowdown" => :build + + on_macos do + depends_on "coreutils" => :build + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1499 + end + + on_ventura do + # Ventura seems to be missing the `source_location` header. + depends_on "llvm" => :build + end + + # -ftree-loop-vectorize -flto=12 -s + # Needs Clang 16 / Xcode 15+ + fails_with :clang do + build 1499 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "9" + cause "requires GCC 10+" + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1499 || MacOS.version == :ventura) + system "make", "CXX=#{ENV.cxx}", "STRIP=true" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + # The build will silently skip the manpage if it can't be built, + # so let's double-check that it was. + assert_path_exists man1/"btop.1" + + require "pty" + require "io/console" + + config = (testpath/".config/btop") + mkdir config/"themes" + begin + (config/"btop.conf").write <<~EOS + #? Config file for btop v. #{version} + + update_ms=2000 + log_level=DEBUG + EOS + + r, w, pid = PTY.spawn(bin/"btop", "--force-utf") + r.winsize = [80, 130] + sleep 5 + w.write "q" + rescue Errno::EIO + # Apple silicon raises EIO + end + + log = (testpath/".local/state/btop.log").read + # SMC is not available in VMs. + log = log.lines.grep_v(/ERROR:.* SMC /).join if Hardware::CPU.virtualized? + assert_match "===> btop++ v.#{version}", log + refute_match(/ERROR:/, log) + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/b/btparse.rb b/Formula/b/btparse.rb new file mode 100644 index 0000000000000..f27cfcb599940 --- /dev/null +++ b/Formula/b/btparse.rb @@ -0,0 +1,57 @@ +class Btparse < Formula + desc "BibTeX utility libraries" + homepage "https://metacpan.org/dist/Text-BibTeX/view/btparse/doc/btparse.pod" + url "https://cpan.metacpan.org/authors/id/A/AM/AMBS/btparse/btparse-0.35.tar.gz" + sha256 "631bf1b79dfd4c83377b416a12c349fe88ee37448dc82e41424b2f364a99477b" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6bcfac3d46e83b1217a57419de338fbea65b77c71d9a4f6de49665990e93b746" + sha256 cellar: :any, arm64_sequoia: "7da3060367c602412a91935267f6f8eef48d2c15fc0e5fcfd7a8bc42423ba281" + sha256 cellar: :any, arm64_sonoma: "783d3d629c204b19bfcfa7e64dc138f89432392c29838999b95364d814ab6445" + sha256 cellar: :any, arm64_ventura: "d58ac5298bb8bfc1859e5333d541ea89ce1dba5a629c1360b48857eb307f6350" + sha256 cellar: :any, arm64_monterey: "32ee64dd04210dd27edb63ba2d3a635995f379e54d60b9e797e52a913201b546" + sha256 cellar: :any, arm64_big_sur: "d69e49048e5366097bd7fe06b5ab9e40e3e97602896c613706559ab2c7aa4295" + sha256 cellar: :any, sonoma: "2c03d25c93b9dd5a6ef76494499f0504d38fec90f3e098fced14b4f9b1bf0236" + sha256 cellar: :any, ventura: "79122577ccff4c437a09ca3d3a7f0fcb5270ff5b1b90be60442f420c3e1ee830" + sha256 cellar: :any, monterey: "3330e9fe95565967827105cbe3009bf533b1363f8b4454c3fa34a7bca72f9502" + sha256 cellar: :any, big_sur: "6080f2a4c252d49a4b265807ce77c290bd881b5339b7b2c19c5efc8a7f40b871" + sha256 cellar: :any, catalina: "6ce6b4e17c2559540007f3e15e38ee5f4eff1cc5dd6782e87089abf824a94e90" + sha256 cellar: :any_skip_relocation, arm64_linux: "a38cb6010173a8291ff7f70a323775f1131adfcdb6a755a7ebdf3e8269397353" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb28ef3caa60d179c008ab9fbd54395014c35119cb9b1c1f2168a3e6bde294d0" + end + + def install + # workaround for Xcode 14.3 + if DevelopmentTools.clang_build_version >= 1403 || (OS.linux? && Hardware::CPU.arm?) + ENV.append "CFLAGS", "-Wno-implicit-function-declaration" + end + + # Fix flat namespace usage + inreplace "configure", "${wl}-flat_namespace ${wl}-undefined ${wl}suppress", "${wl}-undefined ${wl}dynamic_lookup" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.bib").write <<~BIBTEX + @article{mxcl09, + title={{H}omebrew}, + author={{H}owell, {M}ax}, + journal={GitHub}, + volume={1}, + page={42}, + year={2009} + } + BIBTEX + + system bin/"bibparse", "-check", "test.bib" + end +end diff --git a/Formula/b/btpd.rb b/Formula/b/btpd.rb new file mode 100644 index 0000000000000..8ee9cdbd72377 --- /dev/null +++ b/Formula/b/btpd.rb @@ -0,0 +1,44 @@ +class Btpd < Formula + desc "BitTorrent Protocol Daemon" + homepage "https://github.com/btpd/btpd" + url "https://github.com/btpd/btpd/archive/refs/tags/v0.16.tar.gz" + sha256 "9cda656f67edb2cdc3b51d43b7f0510c4e65a0f55cd1317a7113051429d6c9e5" + license "BSD-2-Clause" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "9670afe44796531465fa7394a409a946f16512995eaa9405ad263fcb72bd469f" + sha256 cellar: :any, arm64_sequoia: "29e7c1076df7e76f28cd672d7fd4e9c87ddf6d21ddca353cf1014906b9fa594d" + sha256 cellar: :any, arm64_sonoma: "6fd9324f811eb0e07e6a3ca529424a00b4a1ddd6d7ce88601b5f1c51cf91d89c" + sha256 cellar: :any, arm64_ventura: "bdde460a80660a0afd8811c961ffd495be84550578f4a3125181605438500e0f" + sha256 cellar: :any, arm64_monterey: "78f27d75fcd843c49964eb16b4391a4f356aa608738ec4783baccba2636f5a0b" + sha256 cellar: :any, arm64_big_sur: "0e4467a0d042844b00c6b5f896468dada066d0372e060d788733afada425b87b" + sha256 cellar: :any, sonoma: "77c89315bf5e63b47de72fbd3c17d3182d2d73c5bf2a341840bae4d7ea8b2bfe" + sha256 cellar: :any, ventura: "f98d0960732c2ba02a8c8335ca94f5f49a36723e7107490a8154cd7fe85b65d2" + sha256 cellar: :any, monterey: "423f7dc95d5fbb92a4e8cefdca992b20eb20e3a4548248281ed5d135a6a675c8" + sha256 cellar: :any, big_sur: "0a69fd078eb310b051cc151295ec20619a5aa8309adde05fc281a66bf7652df5" + sha256 cellar: :any, catalina: "e3aaa9dc2e6cafa9e9a2672fe9bad6da2871e1f496029ad2f12004c6c24f0895" + sha256 cellar: :any_skip_relocation, arm64_linux: "d051486a6fae13f53a4478ae31ad45cf05bf067727ef83f5c77836ac5526b18d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "483442aed198f237fd3d92bde41c2b12db3e150e44bab84bd2fab6d96a25d8c5" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + conflicts_with "btcli", because: "both install `btcli` binaries" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match "Torrents can be specified", shell_output("#{bin}/btcli --help 2>&1", 1) + end +end diff --git a/Formula/b/btrfs-progs.rb b/Formula/b/btrfs-progs.rb new file mode 100644 index 0000000000000..4c4f62bdaf9c5 --- /dev/null +++ b/Formula/b/btrfs-progs.rb @@ -0,0 +1,89 @@ +class BtrfsProgs < Formula + desc "Userspace utilities to manage btrfs filesystems" + homepage "https://btrfs.readthedocs.io/en/latest/" + url "https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v6.17.tar.xz" + sha256 "277d696c9d79713ff5afb53c7efebdcead2e6a6007789b1742ec411f4e4ca229" + license all_of: [ + "GPL-2.0-only", + "LGPL-2.1-or-later", # libbtrfsutil + ] + + livecheck do + url "https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/" + regex(/href=.*?btrfs-progs[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "e2f810d06b33a1f0548a3d6d3e51dc7003964893e848ba99bd3db7613f76a84b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1623987a0df0664bf6786bcf5e80a50e6490f0bb46493d6edcc910c2b7ce4224" + end + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "sphinx-doc" => :build + depends_on "e2fsprogs" + depends_on :linux + depends_on "lzo" + depends_on "systemd" # for libudev + depends_on "util-linux" + depends_on "zlib" + depends_on "zstd" + + def python3 + which("python3.14") + end + + # remove sphinx-rtd-theme extension for html docs + patch :DATA + + def install + system "./configure", "--disable-python", *std_configure_args + # Override `udevdir` since Homebrew's `pkg-config udev --variable=udevdir` output + # is #{Formula["systemd"].lib}/udev. This path is used to install udev rules. + system "make", "install", "V=1", "udevdir=#{lib}/udev" + bash_completion.install "btrfs-completion" => "btrfs" + + # We don't use the make target `install_python` due to Homebrew's prefix scheme patch + system python3, "-m", "pip", "install", *std_pip_args, "./libbtrfsutil/python" + end + + test do + device = testpath/"test.img" + system "truncate", "-s", "128M", device + + output = shell_output("#{bin}/mkfs.btrfs #{device}") + assert_match(/Filesystem size:\s*128\.00MiB/, output) + output = shell_output("#{bin}/btrfs filesystem show #{device}") + assert_match "Total devices 1 FS bytes used 144.00KiB", output + + system python3, "-c", "import btrfsutil" + end +end + +__END__ +diff --git a/Documentation/conf.py b/Documentation/conf.py +index 7d90916..4550842 100644 +--- a/Documentation/conf.py ++++ b/Documentation/conf.py +@@ -33,10 +33,6 @@ templates_path = ['_templates'] + # This pattern also affects html_static_path and html_extra_path. + exclude_patterns = ['_build'] + +-# The theme to use for HTML and HTML Help pages. See the documentation for +-# a list of builtin themes. +-html_theme = 'sphinx_rtd_theme' +- + html_theme_options = { + 'navigation_with_keys': True + } +@@ -80,8 +76,6 @@ man_pages = [ + ('btrfs-man5', 'btrfs', 'topics about the BTRFS filesystem (mount options, supported file attributes and other)', '', 5), + ] + +-extensions = [ 'sphinx_rtd_theme' ] +- + # Cross reference with document and label + # Syntax: :docref`Title ` + # Backends: html, man, others diff --git a/Formula/b/bubblewrap.rb b/Formula/b/bubblewrap.rb new file mode 100644 index 0000000000000..c6fb0fb4f7c28 --- /dev/null +++ b/Formula/b/bubblewrap.rb @@ -0,0 +1,37 @@ +class Bubblewrap < Formula + desc "Unprivileged sandboxing tool for Linux" + homepage "https://github.com/containers/bubblewrap" + url "https://github.com/containers/bubblewrap/releases/download/v0.11.0/bubblewrap-0.11.0.tar.xz" + sha256 "988fd6b232dafa04b8b8198723efeaccdb3c6aa9c1c7936219d5791a8b7a8646" + license "LGPL-2.0-or-later" + head "https://github.com/containers/bubblewrap.git", branch: "master" + + bottle do + sha256 arm64_linux: "0b9837b33f5d2858266ca6eea7c436a43115cbd2cc322f45601862d4d0f00051" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6694f22b5343dc2dbb81adf6ff9fcd5a37ee6fe1757e96b4966367e766dcfe4" + end + + depends_on "docbook-xsl" => :build + depends_on "libxslt" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "strace" => :test + depends_on "libcap" + depends_on :linux + + def install + args = %w[ + -Dselinux=disabled + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_match "bubblewrap", "#{bin}/bwrap --version" + assert_match "clone", shell_output("strace -e inject=clone:error=EPERM " \ + "#{bin}/bwrap --bind / / /bin/echo hi 2>&1", 1) + end +end diff --git a/Formula/b/buf.rb b/Formula/b/buf.rb new file mode 100644 index 0000000000000..4964f3d7656b5 --- /dev/null +++ b/Formula/b/buf.rb @@ -0,0 +1,69 @@ +class Buf < Formula + desc "New way of working with Protocol Buffers" + homepage "https://github.com/bufbuild/buf" + url "https://github.com/bufbuild/buf/archive/refs/tags/v1.59.0.tar.gz" + sha256 "3b7dc788df0f59d693b4ade0d2447e647f90435a8adc1bfd111c346093c98b04" + license "Apache-2.0" + head "https://github.com/bufbuild/buf.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "75716788623c9a1c77378190f5ace7c72ae741e299dbf612b1857b1bba596443" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "75716788623c9a1c77378190f5ace7c72ae741e299dbf612b1857b1bba596443" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "75716788623c9a1c77378190f5ace7c72ae741e299dbf612b1857b1bba596443" + sha256 cellar: :any_skip_relocation, sonoma: "7bc88b42f1462b215e1cfcb683f47e114eb35dc1100c82fc84184daa07713b5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "175b2caf47b69b3c1c583ad20c8f91b12436211f6b0761d290ecd53d5a7f339e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1177b54ebab879c12090fe317ecfd85343e07b972e1c6d69798ae42fe1c1973b" + end + + depends_on "go" => :build + + def install + %w[buf protoc-gen-buf-breaking protoc-gen-buf-lint].each do |name| + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/name), "./cmd/#{name}" + end + + generate_completions_from_executable(bin/"buf", "completion") + man1.mkpath + system bin/"buf", "manpages", man1 + end + + test do + (testpath/"invalidFileName.proto").write <<~PROTO + syntax = "proto3"; + package examplepb; + PROTO + + (testpath/"buf.yaml").write <<~YAML + version: v1 + name: buf.build/bufbuild/buf + lint: + use: + - STANDARD + - UNARY_RPC + breaking: + use: + - FILE + ignore_unstable_packages: true + YAML + + expected = <<~EOS + invalidFileName.proto:1:1:Filename "invalidFileName.proto" should be \ + lower_snake_case.proto, such as "invalid_file_name.proto". + invalidFileName.proto:2:1:Files with package "examplepb" must be within \ + a directory "examplepb" relative to root but were in directory ".". + invalidFileName.proto:2:1:Package name "examplepb" should be suffixed \ + with a correctly formed version, such as "examplepb.v1". + EOS + assert_equal expected, shell_output("#{bin}/buf lint invalidFileName.proto 2>&1", 100) + + assert_match version.to_s, shell_output("#{bin}/buf --version") + end +end diff --git a/Formula/b/buffrs.rb b/Formula/b/buffrs.rb new file mode 100644 index 0000000000000..e7ed981ac4823 --- /dev/null +++ b/Formula/b/buffrs.rb @@ -0,0 +1,34 @@ +class Buffrs < Formula + desc "Modern protobuf package management" + homepage "https://github.com/helsing-ai/buffrs" + url "https://github.com/helsing-ai/buffrs/archive/refs/tags/v0.11.0.tar.gz" + sha256 "c52b04ef9d7919d19d9c3fd6312091f0000a65097e55c45c6f9f3ab5d2d3369c" + license "Apache-2.0" + head "https://github.com/helsing-ai/buffrs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f524b1a0dcfb11ac67040c610e145b30761bdc0543bd9fb5dc72b4d96afc13ec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b48db1d0f92f5ea602daa0ee3f1144ec731b5b698f796d14e3b6c1e3713d07eb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4f91126c4f5858b219cfbc77dd0387ef34ac4ceacca9bfa7c2f5ff6f949476b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "01be1c3a392d1f3eccbd5b0f9192bd05eec93970df920cc91eb1e7eae45517e0" + sha256 cellar: :any_skip_relocation, sonoma: "8cfeeaab827d991b4cad11b9dda4bec5a945c6e0739fc66368eca0de765819f5" + sha256 cellar: :any_skip_relocation, ventura: "3a64c41d00df7a7a1a723862395111bd453f0e53db547a0b0eccc96bf8da2de1" + sha256 cellar: :any_skip_relocation, arm64_linux: "24e12ab2178b05497cb35720450c8c5a3efc42b8566834c0718bbe7ed5ff4e22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4206df7cccc9918528f8a93193ea5c0ba4e2ab25cc16d579b975c201b13bcba0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/buffrs --version") + + system bin/"buffrs", "init" + assert_match "edition = \"#{version.major_minor}\"", (testpath/"Proto.toml").read + + assert_empty shell_output("#{bin}/buffrs list") + end +end diff --git a/Formula/b/build2.rb b/Formula/b/build2.rb new file mode 100644 index 0000000000000..25db02cd083e3 --- /dev/null +++ b/Formula/b/build2.rb @@ -0,0 +1,93 @@ +class Build2 < Formula + desc "C/C++ Build Toolchain" + homepage "https://build2.org" + url "https://download.build2.org/0.17.0/build2-toolchain-0.17.0.tar.xz" + sha256 "3722a89ea86df742539d0f91bb4429fd46bbf668553a350780a63411b648bf5d" + license "MIT" + + livecheck do + url "https://download.build2.org/toolchain.sha256" + regex(/^# (\d+\.\d+\.\d+)(?:\+\d+)?$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "04b1c4088629832bebbfd1b82b8132b14ac4d623585dc9a3d2e3147be53025e6" + sha256 arm64_sequoia: "70ffd3523f4b4d74bd22b1374963bbefc8308140252481c2fd97972360757619" + sha256 arm64_sonoma: "0e7160137ee4ed4148b5b7219224029a1120d0429425602711d3a175f743bcb2" + sha256 arm64_ventura: "8f144b91ef3c6cece42e79cfac3422f0c7c88291f0e5cd3cc8d93b7eaac09936" + sha256 arm64_monterey: "56b872f3baf6900a98dbed0703dd9ea2e6aad437c9ae54b1aac417ec7d1be475" + sha256 sonoma: "b7ac1377358cb2440b33094f30e696cdbf4b7e77f90f126a220f223299fcaf6c" + sha256 ventura: "e7e1b9212dd13e228cba7aa96cff10688da90517bad8806fa65e55170ef67e1d" + sha256 monterey: "2e9e1e8bf14f7daea54d814e7919353b52fd257d82394c6dccbc258f18b59c8c" + sha256 arm64_linux: "8aff877f3d60ee2c1260951e873f9aa3790073643aaae93a87004e45e349d2b0" + sha256 x86_64_linux: "b0bf7ddb8cc3cb9a9d196d86bc76bba253460c31b55e7914acb8d1d72d2a297a" + end + + uses_from_macos "curl" + uses_from_macos "openssl" + + def install + # Suppress loading of default options files. + ENV["BUILD2_DEF_OPT"] = "0" + + # Note that we disable all warnings since we cannot do anything more + # granular during bootstrap stage 1. + chdir "build2" do + system "make", "-f", "./bootstrap.gmake", "CXXFLAGS=-w" + end + + chdir "build2" do + system "build2/b-boot", "-v", + "-j", ENV.make_jobs, + "config.cxx=#{ENV.cxx}", + "config.bin.lib=static", + "build2/exe{b}" + mv "build2/b", "build2/b-boot" + end + + # Note that while Homebrew's clang wrapper will strip any optimization + # options, we still want to pass them since they will also be included + # into the ~host and ~build2 configurations that will be used to build + # build-time dependencies and build system modules, respectively, when + # the user uses actual clang. + system "build2/build2/b-boot", "-V", + "config.cxx=#{ENV.cxx}", + "config.cc.coptions=-O3", + "config.bin.lib=shared", + "config.bin.rpath='#{rpath}'", + "config.install.root=#{prefix}", + "configure" + + system "build2/build2/b-boot", "-v", + "-j", ENV.make_jobs, + "install:", "build2/", "bpkg/", "bdep/" + + ENV.prepend_path "PATH", bin + + system "b", "-v", + "-j", ENV.make_jobs, + "install:", *Dir["libbuild2-*/"] + end + + test do + # Suppress loading of default options files. + ENV["BUILD2_DEF_OPT"] = "0" + ENV["BPKG_DEF_OPT"] = "0" + ENV["BDEP_DEF_OPT"] = "0" + + assert_match "build2 #{version}", shell_output("#{bin}/b --version") + assert_match "bpkg #{version}", shell_output("#{bin}/bpkg --version") + assert_match "bdep #{version}", shell_output("#{bin}/bdep --version") + + system bin/"bdep", "new", "--type=lib,no-version", "--lang=c++", "libhello" + (testpath/"libhello/build/root.build").append_lines("using autoconf") + chdir "libhello" do + assert_match "project: libhello", shell_output("#{bin}/b info") + system bin/"bdep", "init", "--config-create", "@default", "cc" + system bin/"b", "test" + system bin/"b", "-V", "noop:", "libhello/" # Show configuration report. + end + end +end diff --git a/Formula/b/buildapp.rb b/Formula/b/buildapp.rb new file mode 100644 index 0000000000000..fbaaf0d65326e --- /dev/null +++ b/Formula/b/buildapp.rb @@ -0,0 +1,52 @@ +class Buildapp < Formula + desc "Creates executables with SBCL" + homepage "https://www.xach.com/lisp/buildapp/" + url "https://github.com/xach/buildapp/archive/refs/tags/release-1.5.6.tar.gz" + sha256 "d77fb6c151605da660b909af058206f7fe7d9faf972e2c30876d42cb03d6a3ed" + license "BSD-2-Clause" + revision 3 + head "https://github.com/xach/buildapp.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "1b91e415cf7ddeab7dc5585efe5b7e58d4798f336ae19bd8c33ebd4d24b19e58" + sha256 arm64_sequoia: "a424c9298996d720b76dd934de8ba4f8fb90f30b05ab3a8f2916ff351bbe8318" + sha256 arm64_sonoma: "3c6c239c61b755cf08e189979db5dfc599111067973befc8fa7155986a2d2e6f" + sha256 sonoma: "e832088898a11ef56ff0b5000b5166df15e600d78da05b7061b1917ff932c90e" + sha256 arm64_linux: "25b50dc88f92ffa69a1ca5f768b1b50338b37f3ff32078a93492e29b3f66b56b" + sha256 x86_64_linux: "7fd612c69baa9387a3790c750c5fc8eb3a7c9787e9107cf7fb200aeb3d184f3b" + end + + depends_on "sbcl" + depends_on "zstd" + + def install + bin.mkpath + system "make", "install", "DESTDIR=#{prefix}" + + # Work around patchelf corrupting the SBCL core which is appended to binary + # TODO: Find a better way to handle this in brew, either automatically or via DSL + if OS.linux? && build.bottle? + cp bin/"buildapp", prefix + Utils::Gzip.compress(prefix/"buildapp") + end + end + + def post_install + if (prefix/"buildapp.gz").exist? + system "gunzip", prefix/"buildapp.gz" + bin.install prefix/"buildapp" + (bin/"buildapp").chmod 0755 + end + end + + test do + code = <<~LISP + (defun f (a) (declare (ignore a)) (write-line "Hello, homebrew")) + LISP + system bin/"buildapp", "--eval", code, "--entry", "f", "--output", "t" + assert_equal "Hello, homebrew\n", shell_output("./t") + end +end diff --git a/Formula/b/buildifier.rb b/Formula/b/buildifier.rb new file mode 100644 index 0000000000000..24894c6ed916a --- /dev/null +++ b/Formula/b/buildifier.rb @@ -0,0 +1,30 @@ +class Buildifier < Formula + desc "Format bazel BUILD files with a standard convention" + homepage "https://github.com/bazelbuild/buildtools" + url "https://github.com/bazelbuild/buildtools/archive/refs/tags/v8.2.1.tar.gz" + sha256 "53119397bbce1cd7e4c590e117dcda343c2086199de62932106c80733526c261" + license "Apache-2.0" + head "https://github.com/bazelbuild/buildtools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c35863552f974d1f58207dfe2bd76d31d55a74f667552e25f85286b1007ba354" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a50bef2309f22e994b9f6f44b8a33461504ab6608d33012fa5a6afece978d8d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a50bef2309f22e994b9f6f44b8a33461504ab6608d33012fa5a6afece978d8d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a50bef2309f22e994b9f6f44b8a33461504ab6608d33012fa5a6afece978d8d9" + sha256 cellar: :any_skip_relocation, sonoma: "c3624c86423fc9d43ad9368eccaa940d87be190dae38ceb835645a066ccd923b" + sha256 cellar: :any_skip_relocation, ventura: "c3624c86423fc9d43ad9368eccaa940d87be190dae38ceb835645a066ccd923b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9dc61d443de40465d0ec8e63b575a07c9e262c0d4957871f3ff85f67f040f37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "899c8e182da372a46ea980a6def786aa3f61b4c9e378feba734f24cb24f7ee45" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./buildifier" + end + + test do + touch testpath/"BUILD" + system bin/"buildifier", "-mode=check", "BUILD" + end +end diff --git a/Formula/b/buildkit.rb b/Formula/b/buildkit.rb new file mode 100644 index 0000000000000..c33286ed54360 --- /dev/null +++ b/Formula/b/buildkit.rb @@ -0,0 +1,49 @@ +class Buildkit < Formula + desc "Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit" + homepage "https://github.com/moby/buildkit" + url "https://github.com/moby/buildkit.git", + tag: "v0.25.1", + revision: "1d4469a951d329d6815394b21084aeca512fcb0d" + license "Apache-2.0" + head "https://github.com/moby/buildkit.git", branch: "master" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "da73b3ea99c3dd3059714f2c45cb2afab392e141a4e7e48d7ec64abf8cd0d53c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "da73b3ea99c3dd3059714f2c45cb2afab392e141a4e7e48d7ec64abf8cd0d53c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da73b3ea99c3dd3059714f2c45cb2afab392e141a4e7e48d7ec64abf8cd0d53c" + sha256 cellar: :any_skip_relocation, sonoma: "dd48d41872875377dbd8fe7ef557048fa9b1cbded79f4344184f002669d39af5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7264371ed8737cf5050359ad8f77643998cad0aed0fd6b97c6c7e6b34894ee52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6371b7e0ad7da333e7df2fe8713cfa0dca3d2dff82c220e9581aadfc6afb916" + end + + depends_on "go" => :build + + def install + revision = Utils.git_head + ldflags = %W[ + -s -w + -X github.com/moby/buildkit/version.Version=#{version} + -X github.com/moby/buildkit/version.Revision=#{revision} + -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit + ] + + system "go", "build", "-mod=vendor", *std_go_args(ldflags:, output: bin/"buildctl"), "./cmd/buildctl" + + doc.install Dir["docs/*.md"] + end + + test do + assert_match "make sure buildkitd is running", + shell_output("#{bin}/buildctl --addr unix://dev/null --timeout 0 du 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/buildctl --version") + end +end diff --git a/Formula/b/buildozer.rb b/Formula/b/buildozer.rb new file mode 100644 index 0000000000000..4e166f2eccb58 --- /dev/null +++ b/Formula/b/buildozer.rb @@ -0,0 +1,34 @@ +class Buildozer < Formula + desc "Rewrite bazel BUILD files using standard commands" + homepage "https://github.com/bazelbuild/buildtools" + url "https://github.com/bazelbuild/buildtools/archive/refs/tags/v8.2.1.tar.gz" + sha256 "53119397bbce1cd7e4c590e117dcda343c2086199de62932106c80733526c261" + license "Apache-2.0" + head "https://github.com/bazelbuild/buildtools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13ed75fa44e97d084b144187f15887c616c9d5e6b845c761c30cb2ea61f8cbf1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0a249d9ed33e966cc6af1cbc240863f9c08da7835812781908215d9656f66f5a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a249d9ed33e966cc6af1cbc240863f9c08da7835812781908215d9656f66f5a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0a249d9ed33e966cc6af1cbc240863f9c08da7835812781908215d9656f66f5a" + sha256 cellar: :any_skip_relocation, sonoma: "5ec76949ac1ba18f851875ebc9fdedea90a20807cb4cfb6356e538e55b19befe" + sha256 cellar: :any_skip_relocation, ventura: "5ec76949ac1ba18f851875ebc9fdedea90a20807cb4cfb6356e538e55b19befe" + sha256 cellar: :any_skip_relocation, arm64_linux: "32f244ab0870ca8d972d148030a493be5c2b1b17ba375b2614d5e4f536f6f70a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c9539ecbd3762b9bdd61859a66c80d68f7e85f24af7557c3bb62c47840d4f7e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./buildozer" + end + + test do + build_file = testpath/"BUILD" + + touch build_file + system bin/"buildozer", "new java_library brewed", "//:__pkg__" + + assert_equal "java_library(name = \"brewed\")\n", build_file.read + end +end diff --git a/Formula/b/buildpulse-test-reporter.rb b/Formula/b/buildpulse-test-reporter.rb new file mode 100644 index 0000000000000..299cb8957a86f --- /dev/null +++ b/Formula/b/buildpulse-test-reporter.rb @@ -0,0 +1,44 @@ +class BuildpulseTestReporter < Formula + desc "Connect your CI to BuildPulse to detect, track, and rank flaky tests" + homepage "https://buildpulse.io" + url "https://github.com/buildpulse/test-reporter/archive/refs/tags/v0.29.0.tar.gz" + sha256 "605e87f4d566f14455f6c1e609eabd3fc2337a09d695fafc489011ce48b02035" + license "MIT" + head "https://github.com/buildpulse/test-reporter.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4711592a6b669b5d417bf261032b49b16a0939ccd1af8d0b72bf09eff8875988" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9517c8459dbd5480f9c0d20230d1a331e22de9225109d0b777fc9c438fbb366" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9517c8459dbd5480f9c0d20230d1a331e22de9225109d0b777fc9c438fbb366" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d9517c8459dbd5480f9c0d20230d1a331e22de9225109d0b777fc9c438fbb366" + sha256 cellar: :any_skip_relocation, sonoma: "3f5d4e0bcadb62fd9c54073b4868129f67bb484189800987c64a663a6b594a49" + sha256 cellar: :any_skip_relocation, ventura: "3f5d4e0bcadb62fd9c54073b4868129f67bb484189800987c64a663a6b594a49" + sha256 cellar: :any_skip_relocation, arm64_linux: "b19d3cb0925d0cb510b6a5fd8e0fb277309db68a43bda6e6687cb474b6e0e734" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2acf192f12d0435f4d764e2fccd9a532b708ec0bd24cfc2d4b7a0beed3840c2" + end + + depends_on "go" => :build + + def install + goldflags = %W[ + -s -w + -X main.Version=#{version} + -X main.Commit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags: goldflags), "./cmd/test-reporter" + end + + test do + binary = bin/"buildpulse-test-reporter" + assert_match version.to_s, shell_output("#{binary} --version") + + fake_dir = "im-not-real" + assert_match "Received args: #{fake_dir}", shell_output("#{binary} submit #{fake_dir}", 1) + end +end diff --git a/Formula/b/buku.rb b/Formula/b/buku.rb new file mode 100644 index 0000000000000..b3d19ff1acc34 --- /dev/null +++ b/Formula/b/buku.rb @@ -0,0 +1,247 @@ +class Buku < Formula + include Language::Python::Virtualenv + + desc "Powerful command-line bookmark manager" + homepage "https://github.com/jarun/buku" + url "https://files.pythonhosted.org/packages/a0/74/a3ecd735d75fc452fa4c6a995141cda20937e21d30ae9810d70ed159f58d/buku-5.0.tar.gz" + sha256 "895a86b099adfe420c1925f333ce6cb00b851a6f11bcc7e42fb125fa81cae8b2" + license "GPL-3.0-or-later" + revision 2 + head "https://github.com/jarun/buku.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1a1f1557ab3d6578e9589b8e28fc2477ab3ec5fc3224bb5c7f9f81fc69e830b3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f94f9b0dc834181746d00e206d9fc50d4f330602acc33d7ea9b9eadcbec0c11" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2cc3e4e855f52937e2afcfa149e41eeb3dc313e9f54bbb997bf6b312e0957838" + sha256 cellar: :any_skip_relocation, sonoma: "d0fa70a3343c56a5c94ae4c0f22d24346e281fa56c3bbdfd1504942a28464319" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bd708874bf13051728a3c67e18dfb804860024005b049cfd57a15c13a5da4d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3faf4630b940657022c532f496614567061a255234b18fb397530aa5acf36ef3" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages package_name: "buku[server]", + exclude_packages: ["certifi", "cryptography"] + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz" + sha256 "bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87" + end + + resource "flask-admin" do + url "https://files.pythonhosted.org/packages/be/4d/7cad383a93e3e1dd9378f1fcf05ddc532c6d921fb30c19ce8f8583630f24/Flask-Admin-1.6.1.tar.gz" + sha256 "24cae2af832b6a611a01d7dc35f42d266c1d6c75a426b869d8cb241b78233369" + end + + resource "flask-paginate" do + url "https://files.pythonhosted.org/packages/5c/d0/aca9153b109f0062eaadb497448f5e596f87cc89474d77347a1d931c8842/flask-paginate-2024.4.12.tar.gz" + sha256 "2de04606b061736f0fc8fbe73d9d4d6fc03664638eca70a57728b03b3e2c9577" + end + + resource "flask-wtf" do + url "https://files.pythonhosted.org/packages/80/9b/f1cd6e41bbf874f3436368f2c7ee3216c1e82d666ff90d1d800e20eb1317/flask_wtf-1.2.2.tar.gz" + sha256 "79d2ee1e436cf570bccb7d916533fa18757a2f18c290accffab1b9a0b684666b" + end + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + + # Fix to build with Python 3.14 + # PR ref: https://github.com/html5lib/html5lib-python/pull/589 + patch do + url "https://github.com/html5lib/html5lib-python/commit/b90dafff1bf342d34d539098013d0b9f318c7641.patch?full_index=1" + sha256 "779f8bab52308792b7ac2f01c3cd61335587640f98812c88cb074dce9fe8162d" + end + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/fc/83/24ed25dd0c6277a1a170c180ad9eef5879ecc9a4745b58d7905a4588c80d/types_python_dateutil-2.9.0.20251008.tar.gz" + sha256 "c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "wtforms" do + url "https://files.pythonhosted.org/packages/01/e4/633d080897e769ed5712dcfad626e55dbd6cf45db0ff4d9884315c6a82da/wtforms-3.2.1.tar.gz" + sha256 "df3e6b70f3192e92623128123ec8dca3067df9cfadd43d59681e210cfb8d4682" + end + + def install + virtualenv_install_with_resources + man1.install "buku.1" + bash_completion.install "auto-completion/bash/buku-completion.bash" => "buku" + fish_completion.install "auto-completion/fish/buku.fish" + zsh_completion.install "auto-completion/zsh/_buku" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["XDG_DATA_HOME"] = "#{testpath}/.local/share" + + # Firefox exported bookmarks file + (testpath/"bookmarks.html").write <<~HTML + + + Bookmarks +

Bookmarks Menu

+ +

+


Bookmarks Toolbar

+
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar +

+

Title unknown +

+

+ HTML + + system bin/"buku", "--nostdin", "--nc", "--tacit", "--import", "bookmarks.html" + assert_equal <<~EOS, shell_output("#{bin}/buku --nostdin --nc --print").chomp + 1. Title unknown + > https://github.com/Homebrew/brew + EOS + + # Test online components -- fetch titles + assert_match "Index 1: updated", shell_output("#{bin}/buku --nostdin --nc --update") + + # Test crypto functionality + require "expect" + require "pty" + timeout = 5 + PTY.spawn(bin/"buku", "--lock") do |r, w, pid| + # Lock bookmark database + refute_nil r.expect("Password: ", timeout), "Expected password input" + w.write "password\r" + refute_nil r.expect("Password: ", timeout), "Expected password confirmation input" + w.write "password\r" + output = "" + begin + r.each { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + refute_match "ERROR", output + assert_match "File encrypted", output + ensure + r.close + w.close + Process.wait pid + end + PTY.spawn(bin/"buku", "--unlock") do |r, w, pid| + # Unlock bookmark database + refute_nil r.expect("Password: ", timeout), "Expected password input" + w.write "password\r" + output = "" + begin + r.each { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + refute_match "ERROR", output + assert_match "File decrypted", output + ensure + r.close + w.close + Process.wait pid + end + + # Test database content and search + result = shell_output("#{bin}/buku --np --sany Homebrew") + assert_match "https://github.com/Homebrew/brew", result + assert_match "The missing package manager for macOS", result + + # Test bukuserver + result = shell_output("#{bin}/bukuserver --version") + assert_match version.to_s, result + + port = free_port + pid = fork do + $stdout.reopen(File::NULL) + $stderr.reopen(File::NULL) + exec "#{bin}/bukuserver", "run", "--host", "127.0.0.1", "--port", port.to_s + end + + begin + sleep 15 + result = shell_output("curl -s 127.0.0.1:#{port}/api/bookmarks") + assert_match "https://github.com/Homebrew/brew", result + assert_match "The missing package manager for macOS", result + ensure + Process.kill "SIGINT", pid + Process.wait pid + end + end +end diff --git a/Formula/b/bulk_extractor.rb b/Formula/b/bulk_extractor.rb new file mode 100644 index 0000000000000..faf4c503b4acf --- /dev/null +++ b/Formula/b/bulk_extractor.rb @@ -0,0 +1,71 @@ +class BulkExtractor < Formula + desc "Stream-based forensics tool" + homepage "https://github.com/simsong/bulk_extractor/wiki" + url "https://github.com/simsong/bulk_extractor/releases/download/v2.1.1/bulk_extractor-2.1.1.tar.gz" + sha256 "0cd57c743581a66ea94d49edac2e89210c80a2a7cc90dd254d56940b3d41b7f7" + license "MIT" + revision 3 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "28112f82cc9e0e627462d3a4b5d882ac36e00ca7367a9a367dc15b5d7dfc95c3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9a31d530c9667f15046ad54b617056fe121a9eec4f7b24749207b8b6e84f9083" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d670cf96b00bf5497c822bf2b7f0aef8c1b23cec45692a37bb2c61e3fedc0c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a2707abfb8d0b3cf9744d495661c47a3ff3fc0bf16cbbc09311ccd462dc54c9" + sha256 cellar: :any_skip_relocation, sonoma: "f3f3290fda284e7b8e04d5c64ee3a06b06048b37c1f7399a3374ac033c3d5f74" + sha256 cellar: :any_skip_relocation, ventura: "f85d235e221af43b55ab85384aa5f4e3799d5cd73c8bf54e41cf1d0cae93464f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dd712b046cc8a9d3b6707582ab3a2d309b71c534617828cb8eca95e8a56905f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "624fbdcd4889624e1c1da350a4433335234d25bf861686bcf4736e5f4315ee0b" + end + + head do + url "https://github.com/simsong/bulk_extractor.git", branch: "main" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + # Not actually used at runtime, but required at build-time + # due to a stray `RE2::` reference. + depends_on "re2" => :build + + uses_from_macos "flex" => :build + uses_from_macos "expat" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" # uses CommonCrypto on macOS + end + + def install + # Avoid overlinkage with abseil and re2. + ENV.append "LDFLAGS", "-Wl,-dead_strip_dylibs" if OS.mac? + system "./bootstrap.sh" if build.head? + # Disable RAR to avoid problematic UnRAR license + system "./configure", *std_configure_args, "--disable-rar", "--disable-silent-rules" + system "make" + system "make", "install" + + # Install documentation + (pkgshare/"doc").install Dir["doc/*.{html,txt,pdf}"] + + (lib/"python2.7/site-packages").install Dir["python/*.py"] + end + + test do + input_file = testpath/"data.txt" + input_file.write "https://brew.sh\n(201)555-1212\n" + + output_dir = testpath/"output" + system bin/"bulk_extractor", "-o", output_dir, input_file + + assert_match "https://brew.sh", (output_dir/"url.txt").read + assert_match "(201)555-1212", (output_dir/"telephone.txt").read + end +end diff --git a/Formula/b/bullet.rb b/Formula/b/bullet.rb new file mode 100644 index 0000000000000..a47cf85396267 --- /dev/null +++ b/Formula/b/bullet.rb @@ -0,0 +1,121 @@ +class Bullet < Formula + desc "Physics SDK" + homepage "https://bulletphysics.org/" + url "https://github.com/bulletphysics/bullet3/archive/refs/tags/3.25.tar.gz" + sha256 "c45afb6399e3f68036ddb641c6bf6f552bf332d5ab6be62f7e6c54eda05ceb77" + license "Zlib" + head "https://github.com/bulletphysics/bullet3.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any, arm64_tahoe: "87c1a6671e6825d2886bd6025091c80f3633033cb1f61bfb343512e7aacfd346" + sha256 cellar: :any, arm64_sequoia: "16117f81a0c3c9e22cbdc21ebf7926bb39d29ad29bde9d84fbfad0b3b3cb1d68" + sha256 cellar: :any, arm64_sonoma: "290642f55b724eecb80aadd93a11a3faec1f6768db05412c4b6f21b5fc274cd3" + sha256 cellar: :any, sonoma: "354ff9e050f7c14b6f25ee2aaa865a2949538da6fc017c5f0e688639fa46f9e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fba99fe645c8290925e3a0dc6bdb8059e799b045de00c67cc0e67563bbdc33e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c9c0d8ab57375f2ffedb24fdfb000e4d52c96d3e948a4c5ebd986ad32e7ed70" + end + + depends_on "cmake" => :build + depends_on "numpy" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "python@3.14" => [:build, :test] + + def python3 + "python3.14" + end + + def install + # C++11 for nullptr usage in examples. Can remove when fixed upstream. + # Issue ref: https://github.com/bulletphysics/bullet3/pull/4243 + ENV.cxx11 if OS.linux? + + common_args = %w[ + -DBT_USE_EGL=ON + -DBUILD_UNIT_TESTS=OFF + -DINSTALL_EXTRA_LIBS=ON + -DBULLET2_MULTITHREADING=ON + ] + std_cmake_args(find_framework: "FIRST") + + # Workaround to build with CMake 4 + common_args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + + # Temporary fix for https://github.com/bulletphysics/bullet3/issues/4733 + common_args << "-D_CURRENT_OSX_VERSION=#{MacOS.full_version}" if OS.mac? + + system "cmake", "-S", ".", "-B", "build_double", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{loader_path}", + "-DUSE_DOUBLE_PRECISION=ON", + *common_args + system "cmake", "--build", "build_double" + system "cmake", "--install", "build_double" + (lib/"bullet/double").install lib.children + + system "cmake", "-S", ".", "-B", "build_static", + "-DBUILD_SHARED_LIBS=OFF", + *common_args + system "cmake", "--build", "build_static" + system "cmake", "--install", "build_static" + + python_version = Language::Python.major_minor_version python3 + python_prefix = if OS.mac? + Formula["python@#{python_version}"].opt_frameworks/"Python.framework/Versions/#{python_version}" + else + Formula["python@#{python_version}"].opt_prefix + end + prefix_site_packages = prefix/Language::Python.site_packages(python3) + + system "cmake", "-S", ".", "-B", "build_shared", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{loader_path};#{rpath(source: prefix_site_packages)}", + "-DBUILD_PYBULLET=ON", + "-DBUILD_PYBULLET_NUMPY=ON", + "-DPYTHON_EXECUTABLE=#{which(python3)}", + "-DPYTHON_INCLUDE_DIR=#{python_prefix}/include/python#{python_version}", + "-DPYTHON_LIBRARY=#{python_prefix}/lib", + *common_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + # Install single-precision library symlinks into `lib/"bullet/single"` for consistency + (lib/"bullet/single").install_symlink (lib.children - [lib/"bullet"]) + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "LinearMath/btPolarDecomposition.h" + int main() { + btMatrix3x3 I = btMatrix3x3::getIdentity(); + btMatrix3x3 u, h; + polarDecompose(I, u, h); + return 0; + } + CPP + + cxx_lib = if OS.mac? + "-lc++" + else + "-lstdc++" + end + + # Test single-precision library + system ENV.cc, "test.cpp", "-I#{include}/bullet", "-L#{lib}", + "-lLinearMath", cxx_lib, "-o", "test" + system "./test" + + # Test double-precision library + system ENV.cc, "test.cpp", "-I#{include}/bullet", "-L#{lib}/bullet/double", + "-lLinearMath", cxx_lib, "-o", "test" + system "./test" + + system python3, "-c", <<~PYTHON + import pybullet + pybullet.connect(pybullet.DIRECT) + pybullet.setGravity(0, 0, -10) + pybullet.disconnect() + PYTHON + end +end diff --git a/Formula/b/bump-my-version.rb b/Formula/b/bump-my-version.rb new file mode 100644 index 0000000000000..b9361baa8d4c9 --- /dev/null +++ b/Formula/b/bump-my-version.rb @@ -0,0 +1,157 @@ +class BumpMyVersion < Formula + include Language::Python::Virtualenv + + desc "Version bump your Python project" + homepage "https://callowayproject.github.io/bump-my-version/" + url "https://files.pythonhosted.org/packages/a0/fa/3ade689370780989831e574e82024d301ffa5ef75b3d169a7074c9419ce4/bump_my_version-1.2.4.tar.gz" + sha256 "998abb4f3774cf96137a77034a5a12a722b109b26a3afa044ec14622a0180fa3" + license "MIT" + head "https://github.com/callowayproject/bump-my-version.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "72715c4b0dd6ec9361a68998582f0c6de8db428f51dba86444dde612f61fa432" + end + + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz" + sha256 "98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/f6/45/eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5/questionary-2.1.1.tar.gz" + sha256 "3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-click" do + url "https://files.pythonhosted.org/packages/bf/d8/f2c1b7e9a645ba40f756d7a5b195fc104729bc6b19061ba3ab385f342931/rich_click-1.9.4.tar.gz" + sha256 "af73dc68e85f3bebb80ce302a642b9fe3b65f3df0ceb42eb9a27c467c1b678c8" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/79/3e/c0bdc27cf06f4e47680bd5803a07cb3dfd17de84cde92dd217dcb9e05253/wcmatch-10.1.tar.gz" + sha256 "f11f94208c8c8484a16f4f48638a85d771d9513f4ab3f37595978801cb9465af" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"bump-my-version", shell_parameter_format: :click) + end + + test do + ENV["COLUMNS"] = "80" + assert_equal "bump-my-version, version #{version}", shell_output("#{bin}/bump-my-version --version").chomp + + (version_file = testpath/"VERSION").write "0.0.0" + system bin/"bump-my-version", "bump", "--current-version", "0.0.0", "minor", version_file + assert_match "0.1.0", version_file.read + + system bin/"bump-my-version", "bump", "--current-version", "0.1.0", "patch", version_file + assert_match "0.1.1", version_file.read + + system bin/"bump-my-version", "bump", "--current-version", "0.1.1", "major", version_file + assert_match "1.0.0", version_file.read + end +end diff --git a/Formula/b/bumpversion.rb b/Formula/b/bumpversion.rb new file mode 100644 index 0000000000000..69ee9f47e6ba7 --- /dev/null +++ b/Formula/b/bumpversion.rb @@ -0,0 +1,48 @@ +class Bumpversion < Formula + include Language::Python::Virtualenv + + desc "Increase version numbers with SemVer terms" + homepage "https://pypi.org/project/bumpversion/" + # maintained fork for the project + # Ongoing maintenance discussion for the project, https://github.com/c4urself/bump2version/issues/86 + url "https://files.pythonhosted.org/packages/29/2a/688aca6eeebfe8941235be53f4da780c6edee05dbbea5d7abaa3aab6fad2/bump2version-1.0.1.tar.gz" + sha256 "762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6" + license "MIT" + revision 1 + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "166ec2e234ca2b7970dac12809f1eb9642c8647cd030169049b866c7d03f19ee" + end + + # Original and fork are both unmaintained: + # https://github.com/peritus/bumpversion/commit/cc3c8cfd77380ef50eeac740efe627509a248101 + # https://github.com/c4urself/bump2version/commit/c3a1995b35335da6fa7932e4bac089992c947bba + deprecate! date: "2024-09-08", because: :unmaintained, replacement_formula: "bump-my-version" + disable! date: "2025-09-08", because: :unmaintained, replacement_formula: "bump-my-version" + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + ENV["COLUMNS"] = "80" + command = if OS.mac? + "script -q /dev/null #{bin}/bumpversion --help" + else + "script -q /dev/null -c \"#{bin}/bumpversion --help\"" + end + assert_includes shell_output(command), "bumpversion: v#{version}" + + version_file = testpath/"VERSION" + version_file.write "0.0.0" + system bin/"bumpversion", "--current-version", "0.0.0", "minor", version_file + assert_match "0.1.0", version_file.read + system bin/"bumpversion", "--current-version", "0.1.0", "patch", version_file + assert_match "0.1.1", version_file.read + system bin/"bumpversion", "--current-version", "0.1.1", "major", version_file + assert_match "1.0.0", version_file.read + end +end diff --git a/Formula/b/bundler-completion.rb b/Formula/b/bundler-completion.rb new file mode 100644 index 0000000000000..6990235da6890 --- /dev/null +++ b/Formula/b/bundler-completion.rb @@ -0,0 +1,28 @@ +class BundlerCompletion < Formula + desc "Bash completion for Bundler" + homepage "https://github.com/mernen/completion-ruby" + url "https://github.com/mernen/completion-ruby/archive/refs/tags/v1.0.3.tar.gz" + sha256 "cbcd002bba2a43730cff54f5386565917913d9dec16dcd89345fbe298fe4316b" + license "MIT" + version_scheme 1 + head "https://github.com/mernen/completion-ruby.git", branch: "main" + + livecheck do + formula "ruby-completion" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "eba47de2a5fee4ae57cc2e1eec146d6b8602819de68ab8865a092cfbfe8aa2e8" + end + + def install + bash_completion.install "completion-bundle" => "bundler" + end + + test do + assert_match "-F __bundle", + shell_output("bash -c 'source #{bash_completion}/bundler && complete -p bundle'") + end +end diff --git a/Formula/b/bundletool.rb b/Formula/b/bundletool.rb new file mode 100644 index 0000000000000..a2215da1dd53c --- /dev/null +++ b/Formula/b/bundletool.rb @@ -0,0 +1,37 @@ +class Bundletool < Formula + desc "Command-line tool to manipulate Android App Bundles" + homepage "https://github.com/google/bundletool" + url "https://github.com/google/bundletool/releases/download/1.18.2/bundletool-all-1.18.2.jar" + sha256 "378b5434cd1378bef6b2bc527b8c7f0ff2584b273830335bce54d6d0813c8584" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2fbb198c9ecae32ccfcbafc4fd15e63b91259f8c9af70c359375b0236c1abe08" + end + + depends_on "openjdk" + + def install + libexec.install "bundletool-all-#{version}.jar" => "bundletool-all.jar" + bin.write_jar_script libexec/"bundletool-all.jar", "bundletool" + end + + test do + resource "homebrew-test-bundle" do + url "https://github.com/thuongleit/crashlytics-sample/raw/master/app/release/app.aab" + sha256 "f7ea5a75ce10e394a547d0c46115b62a2f03380a18b1fc222e98928d1448775f" + end + + resource("homebrew-test-bundle").stage do + expected = <<~EOS + App Bundle information + ------------ + Feature modules: + \tFeature module: base + \t\tFile: res/anim/abc_fade_in.xml + EOS + + assert_match expected, shell_output("#{bin}/bundletool validate --bundle app.aab") + end + end +end diff --git a/Formula/b/bunster.rb b/Formula/b/bunster.rb new file mode 100644 index 0000000000000..a0ef63c543895 --- /dev/null +++ b/Formula/b/bunster.rb @@ -0,0 +1,38 @@ +class Bunster < Formula + desc "Compile shell scripts to static binaries" + homepage "https://bunster.netlify.app/" + url "https://github.com/yassinebenaid/bunster/archive/refs/tags/v0.14.0.tar.gz" + sha256 "bab301b4365b0937537154afca867ec989cfe3f2d2233fabfbfa245882abaa1e" + license "BSD-3-Clause" + head "https://github.com/yassinebenaid/bunster.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "358db3b08f9fabcf962e0342003873fd4c2aa20cad61a6bf41ee2ae61a8b53f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b582d338176ba738133ad00602adf2bc34f43c1ea6f56b6bfda7c65a05474c8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b582d338176ba738133ad00602adf2bc34f43c1ea6f56b6bfda7c65a05474c8c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b582d338176ba738133ad00602adf2bc34f43c1ea6f56b6bfda7c65a05474c8c" + sha256 cellar: :any_skip_relocation, sonoma: "c154f3dafa865c73e98519d29dab24692c12e418a6ef4dbb67d8f5da945634b4" + sha256 cellar: :any_skip_relocation, ventura: "c154f3dafa865c73e98519d29dab24692c12e418a6ef4dbb67d8f5da945634b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "cafa15d4686916f99ebf6db783521a268f3faf1172c820e5fa22a3f92b2bd56e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a171f3ab3ab56a91691574af1b10aa145a625438e06a9e98e1d075eee9ba02e" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/bunster" + end + + test do + assert_match version.to_s, shell_output("#{bin}/bunster --version") + + (testpath/"test.sh").write <<~SHELL + #!/bin/bash + echo "Hello, World!" + SHELL + + system bin/"bunster", "build", "test.sh", "-o", "test-binary" + assert_path_exists testpath/"test-binary" + assert_match "Hello, World!", shell_output("./test-binary") + end +end diff --git a/Formula/b/bup.rb b/Formula/b/bup.rb new file mode 100644 index 0000000000000..983844347cfa6 --- /dev/null +++ b/Formula/b/bup.rb @@ -0,0 +1,43 @@ +class Bup < Formula + desc "Backup tool" + homepage "https://bup.github.io/" + url "https://github.com/bup/bup/archive/refs/tags/0.33.9.tar.gz" + sha256 "310823bb3437b2a9ce8979a31951405e057fa2f387ef176b64ef3ce3041f59d0" + license all_of: ["BSD-2-Clause", "LGPL-2.0-only"] + head "https://github.com/bup/bup.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "988236b03242dbd381dc6831d5ef5dea6fe9983e5f1d29134e0178b0869e060c" + sha256 cellar: :any, arm64_sequoia: "74c459719d6f665c6e3a98733891a40c69dafd6b3c3010b8d7ee852968b64749" + sha256 cellar: :any, arm64_sonoma: "67e4b187cd72bbf2f744bf5aac6a822c3008a8c22835a3c4f0d02a7cd34f5674" + sha256 cellar: :any, sonoma: "1363113a9ddbb8acbd4298a963cfa27d23dc2cda833d81efe1d073fc2a7265f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f827787f986ea7029b1f17aacbb360427c14d3c6d736abb1f4658d2d180f828" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f913e83384e3266a82fddd3cdabca334f122459a0f2ecaa0e519b49d52a3b986" + end + + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + + depends_on "python@3.14" + depends_on "readline" + + on_linux do + depends_on "acl" + end + + def python3 + which("python3.14") + end + + def install + ENV["BUP_PYTHON_CONFIG"] = "#{python3}-config" + + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"bup", "init" + assert_path_exists testpath/".bup" + end +end diff --git a/Formula/b/bupstash.rb b/Formula/b/bupstash.rb new file mode 100644 index 0000000000000..63268232d614f --- /dev/null +++ b/Formula/b/bupstash.rb @@ -0,0 +1,50 @@ +class Bupstash < Formula + desc "Easy and efficient encrypted backups" + homepage "https://bupstash.io" + url "https://github.com/andrewchambers/bupstash/releases/download/v0.12.0/bupstash-v0.12.0-src+deps.tar.gz" + sha256 "e3054c03b0d57ba718bd2cab8c24df13153369dea311e5a595d586ad24865793" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "11880e340498d539dc45fc413508f1bda1985c1f1d1e9b9ae818287ffe028141" + sha256 cellar: :any, arm64_sequoia: "a1955968ad1ced6369767619595453bcd9260fa963878cec01f51ed10ae0f4f9" + sha256 cellar: :any, arm64_sonoma: "282702198d0383461a3827c2727a2cef576f7e68cf32f88af49fd1591602e0ed" + sha256 cellar: :any, arm64_ventura: "5c75007fe3422c999e4843325a6d7939850e60266485ae78b514b4f56f19114f" + sha256 cellar: :any, arm64_monterey: "31c1594f63290770e6b4e5e624c24a471fc905a4484da6d0c6675371e093b22c" + sha256 cellar: :any, sonoma: "5e4323b39fdc2751adfb15eeb1fb6224f7f5631fbb44995dfaaf9b8bd5bca6e3" + sha256 cellar: :any, ventura: "553dcd5d10275673f1106914e7af449ac1ebe52ec80f99150206370426a7d558" + sha256 cellar: :any, monterey: "a78d691c6274743184a5ec48d717f1835d016c615bdb1e6bb3e1e9a5d6b3c3f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f00098d6b1cd79ddf82999ef4371f46ecd2935ccf0c6c23be33f2d4aab36933" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b61eb9cbb571a97f1064e6b0e0766e2fc19e1b7691ab8cc988ea4db67f8d5182" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libsodium" + + resource "man" do + url "https://github.com/andrewchambers/bupstash/releases/download/v0.12.0/bupstash-v0.12.0-man.tar.gz" + sha256 "bffe4a9e7c79f03af0255638acfa13fb9f74ed5d6f8987954db1d3164f431629" + end + + def install + system "cargo", "install", *std_cargo_args + + resource("man").stage do + man1.install Dir["*.1"] + man7.install Dir["*.7"] + end + end + + test do + (testpath/"testfile").write("This is a test") + + system bin/"bupstash", "init", "-r", testpath/"foo" + system bin/"bupstash", "new-key", "-o", testpath/"key" + system bin/"bupstash", "put", "-k", testpath/"key", "-r", testpath/"foo", testpath/"testfile" + + assert_equal (testpath/"testfile").read, + shell_output("#{bin}/bupstash get -k #{testpath}/key -r #{testpath}/foo id=*") + end +end diff --git a/Formula/b/burp.rb b/Formula/b/burp.rb new file mode 100644 index 0000000000000..2c04e0a21430f --- /dev/null +++ b/Formula/b/burp.rb @@ -0,0 +1,104 @@ +class Burp < Formula + desc "Network backup and restore" + homepage "https://burp.grke.org/" + license "AGPL-3.0-only" => { with: "openvpn-openssl-exception" } + revision 1 + + stable do + url "https://github.com/grke/burp/releases/download/2.4.0/burp-2.4.0.tar.bz2" + sha256 "1f88d325f59c6191908d13ac764db5ee56b478fbea30244ae839383b9f9d2832" + + resource "uthash" do + url "https://github.com/troydhanson/uthash/archive/refs/tags/v2.3.0.tar.gz" + sha256 "e10382ab75518bad8319eb922ad04f907cb20cccb451a3aa980c9d005e661acc" + end + end + + livecheck do + url "https://burp.grke.org/download.html" + regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >].*?:\s*Stable}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "3de56f0f4305377c2cd47b9b5b43a8c43e19bfe77031512edae33fc70aa02895" + sha256 arm64_sequoia: "2e9356b11a8e46c3be3414b7a2f88dc01974d49a9b18372f5e92e5654d59144b" + sha256 arm64_sonoma: "839b8941718ab30883533b6cdaf415cb0b6aa085a2dfc53a5439c3cdd6c8e563" + sha256 arm64_ventura: "e1360b199ce42bba04f10443f26954d9c3dafe03b7565b571382f6baaad21bd2" + sha256 arm64_monterey: "c69b19653c7d88ecb561c6116e50208b79834dc5e547396630b2c9fe6a873153" + sha256 arm64_big_sur: "91a2441ee60e0cbacc3e6707be43725a65fc161e24e66cbf67dbd1255aea1ff1" + sha256 sonoma: "074e7ecd4259269a27e59b057a9dc502438caf0d52d4e951db492ba2d05ca668" + sha256 ventura: "9a7d37e6cbe57a298cd83d7ab19960895329906bcf828113a98e159ac5baf8d0" + sha256 monterey: "a1aeb87a73af8ecf56631e3a3ac97732cc391afbe4d3651e05b390f0777f91de" + sha256 big_sur: "bde32d67b881d607349d196ecd79aac7cc92256e3ce94731bf27f90eb99ace53" + sha256 arm64_linux: "2cf103f7f0a674d270df1ae3ffcb7b8aec575b6c4b4a86f06a16f77b2f4b1ca9" + sha256 x86_64_linux: "3e0b7b18c51c5e0bd4160c6c9feba24bae0a4a3b1dad8c91e5c9f5f77736a113" + end + + head do + url "https://github.com/grke/burp.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + resource "uthash" do + url "https://github.com/troydhanson/uthash.git", branch: "master" + end + end + + depends_on "pkgconf" => :build + depends_on "librsync" + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "acl" + end + + def install + resource("uthash").stage do + (buildpath/"uthash/include").install "src/uthash.h" + end + + ENV.prepend "CPPFLAGS", "-I#{buildpath}/uthash/include" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + system "./configure", "--prefix=#{prefix}", + "--sysconfdir=#{etc}/burp", + "--sbindir=#{bin}", + "--localstatedir=#{var}" + + system "make", "install-all" + end + + def post_install + (var/"run").mkpath + (var/"spool/burp").mkpath + end + + def caveats + <<~EOS + Before installing the launchd entry you should configure your burp client in + #{etc}/burp/burp.conf + EOS + end + + service do + run [opt_bin/"burp", "-a", "t"] + run_type :interval + keep_alive false + require_root true + interval 1200 + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"burp", "-V" + end +end diff --git a/Formula/b/burrow.rb b/Formula/b/burrow.rb new file mode 100644 index 0000000000000..0c78aef7c14c2 --- /dev/null +++ b/Formula/b/burrow.rb @@ -0,0 +1,50 @@ +class Burrow < Formula + desc "Kafka Consumer Lag Checking" + homepage "https://github.com/linkedin/Burrow" + url "https://github.com/linkedin/Burrow/archive/refs/tags/v1.9.5.tar.gz" + sha256 "9d9b7502cfbee6038af80c3bbfa651ae2437f07ec0756aa2b6c874d516b4ffae" + license "Apache-2.0" + head "https://github.com/linkedin/Burrow.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5b86ff8deae33789a7977472252996ce9bed5b9297186b7e3ada18b8ccb34531" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96d98011b5b9e0943087196c71dbcf60904ab9e4e22602baeea422a96e488620" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed299aece4ff3ffe4f5c676b3b2afda41d5d8a97dc937e3babceef7387dce6a7" + sha256 cellar: :any_skip_relocation, sonoma: "261a4bfe121fa8af48ee190fdab037c5c16d65a5ee672d9b3a9cb90c68260e54" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3e5b31685703828e5b444374c29942c97afbbb18d85959916d2a46778c9d0a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1701af844c34f0f248f80cf39e42f0f75c29b39ca976acc8a129c8a382eb5168" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + + inreplace "docker-config/burrow.toml" do |s| + s.gsub!(/(kafka|zookeeper):/, "localhost:") + s.sub! "docker-client", "homebrew-client" + end + (etc/"burrow").install "docker-config/burrow.toml" + end + + service do + run [opt_bin/"burrow", "--config-dir", etc/"burrow"] + keep_alive true + error_log_path var/"log/burrow.log" + log_path var/"log/burrow.log" + working_dir var + end + + test do + port = free_port + (testpath/"burrow.toml").write <<~TOML + [httpserver.default] + address="localhost:#{port}" + TOML + spawn bin/"burrow" + sleep 1 + + output = shell_output("curl -s localhost:#{port}/v3/kafka") + assert_match "cluster list returned", output + end +end diff --git a/Formula/b/burst.rb b/Formula/b/burst.rb new file mode 100644 index 0000000000000..325c0946aa586 --- /dev/null +++ b/Formula/b/burst.rb @@ -0,0 +1,63 @@ +class Burst < Formula + desc "Radix sort, lazy ranges and iterators, and more. Boost-like header-only library" + homepage "https://github.com/izvolov/burst" + url "https://github.com/izvolov/burst/archive/refs/tags/v3.1.1.tar.gz" + sha256 "ee58c7b98ca1709dd452b9ba46cb4c91fc0b2952edd020ed5bc2d600b3edeae7" + license "BSL-1.0" + head "https://github.com/izvolov/burst.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "aba413390562e5c52f5ebfc88bc53280094805ae1440081e2d3bcf54267c4586" + end + + depends_on "cmake" => [:build, :test] + depends_on "boost" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBURST_TESTING=OFF", + "-DBURST_BENCHMARKING=OFF", + *std_cmake_args + # Skip `cmake --build build` to avoid running tests. + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.8.2) + project(TestBurst) + find_package(Burst 3.1.1 REQUIRED) + + add_executable(test_burst test_burst.cpp) + target_link_libraries(test_burst PRIVATE Burst::burst) + CMAKE + (testpath/"test_burst.cpp").write <<~CPP + #include + + #include + #include + #include + + int main () + { + std::vector strings{"aaaa", "bbb", "cc", "d"}; + + std::vector buffer(strings.size()); + burst::radix_sort(strings.begin(), strings.end(), buffer.begin(), + [] (const std::string & string) + { + return string.size(); + } + ); + assert((strings == std::vector{"d", "cc", "bbb", "aaaa"})); + } + CPP + cmake_args = std_cmake_args + ["-DCMAKE_BUILD_TYPE=Debug"] + system "cmake", "-S", ".", "-B", "build", *cmake_args + system "cmake", "--build", "build", "--target", "test_burst" + system "build/test_burst" + end +end diff --git a/Formula/b/busted.rb b/Formula/b/busted.rb new file mode 100644 index 0000000000000..9e00a0b669358 --- /dev/null +++ b/Formula/b/busted.rb @@ -0,0 +1,47 @@ +class Busted < Formula + desc "Elegant Lua unit testing" + homepage "https://lunarmodules.github.io/busted/" + url "https://github.com/lunarmodules/busted/archive/refs/tags/v2.2.0.tar.gz" + sha256 "befca10f573bb476fa1db2e3149150d65f802a71d34d1682679e640665f2dc2b" + license "MIT" + head "https://github.com/lunarmodules/busted.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "86eff6847066324485ec0565d35720a6f5a7802ab571131904e38b0f917055a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcff5cb71f86dd72db670cc83b1ed19dfde1af3b1efd756cc46ec530a3c1f6fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9267e5bd352ff30b679465035c1a6180df40dabdec7b4e14f31f1857155ebe00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "005189ce90798040e77012a87a523454c8a64f6dcdf27e2d2022cb5a81c60491" + sha256 cellar: :any_skip_relocation, arm64_monterey: "86a649562e5124e1d9761e1bb18e2589e89a013268fed32dd9c12a1dc7be0f13" + sha256 cellar: :any_skip_relocation, sonoma: "1d46925551fc50862907fe770dde0aaf06cad8d476ed7f313988afb3eb23b5a2" + sha256 cellar: :any_skip_relocation, ventura: "bec97bc61b1ffe4f39f035d2710c626b6f31c91c1fa16c778fcc0bc3704681b2" + sha256 cellar: :any_skip_relocation, monterey: "8510ad64b34d08addb54433deca168f8f7f2c1db6df90c7ab41f32ae352d23a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9296bbdb2e2a16feae4033c598626a68edfbbd3523cb9d71631d640d4da59895" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed3b9a4fea656d23198b327ed55879761fd1ab0f5332adf34db382f86622d8d1" + end + + depends_on "luarocks" => :build + depends_on "lua" + + uses_from_macos "unzip" => :build + + def install + system "luarocks", "make", "--tree=#{libexec}", "--local", "--lua-dir=#{Formula["lua"].opt_prefix}" + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + test_file = testpath/"test.lua" + + test_file.write <<~LUA + describe("brewtest", function() + it("should pass", function() + assert.is_true(true) + end) + end) + LUA + + assert_match "1 success / 0 failures", shell_output("#{bin}/busted #{test_file}") + + assert_match version.to_s, shell_output("#{bin}/busted --version") + end +end diff --git a/Formula/b/butane.rb b/Formula/b/butane.rb new file mode 100644 index 0000000000000..22115249cd142 --- /dev/null +++ b/Formula/b/butane.rb @@ -0,0 +1,63 @@ +class Butane < Formula + desc "Translates human-readable Butane Configs into machine-readable Ignition Configs" + homepage "https://github.com/coreos/butane" + url "https://github.com/coreos/butane/archive/refs/tags/v0.25.1.tar.gz" + sha256 "14203e7fa13f5753e332c472d0d7be3fc7ddf9a637873463793d898bb61cf69c" + license "Apache-2.0" + head "https://github.com/coreos/butane.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "462e8be7b0aa75adecb7309207b6820cc18ca2991159e8bf3e79f8a14c5d4f93" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "462e8be7b0aa75adecb7309207b6820cc18ca2991159e8bf3e79f8a14c5d4f93" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "462e8be7b0aa75adecb7309207b6820cc18ca2991159e8bf3e79f8a14c5d4f93" + sha256 cellar: :any_skip_relocation, sonoma: "1c227b7f81ac0f40e7be5a2d263ddb1825a87c5ebbe552033abdd1cbcf6423e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "acc15c74454f7db160bfb6801d1ddab0d043cff9152245aeaeb7e9a518c64deb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9791d51417e488f5aa4e00a60d95b46412f29f02e686ba4c7787ceee56af5aeb" + end + + depends_on "go" => :build + + def install + system "go", "build", "-mod=vendor", + *std_go_args(ldflags: "-w -X github.com/coreos/butane/internal/version.Raw=#{version}"), "internal/main.go" + end + + test do + (testpath/"example.bu").write <<~EOS + variant: fcos + version: 1.3.0 + passwd: + users: + - name: core + ssh_authorized_keys: + - ssh-rsa mykey + EOS + + (testpath/"broken.bu").write <<~EOS + variant: fcos + version: 1.3.0 + passwd: + users: + - name: core + broken_authorized_keys: + - ssh-rsa mykey + EOS + + system bin/"butane", "--strict", "--output=#{testpath}/example.ign", "#{testpath}/example.bu" + assert_path_exists testpath/"example.ign" + assert_match(/.*"sshAuthorizedKeys":\["ssh-rsa mykey"\].*/m, File.read(testpath/"example.ign").strip) + + output = shell_output("#{bin}/butane --strict #{testpath}/example.bu") + assert_match(/.*"sshAuthorizedKeys":\["ssh-rsa mykey"\].*/m, output.strip) + + shell_output("#{bin}/butane --strict --output=#{testpath}/broken.ign #{testpath}/broken.bu", 1) + refute_path_exists testpath/"broken.ign" + + assert_match version.to_s, shell_output("#{bin}/butane --version 2>&1") + end +end diff --git a/Formula/b/bvi.rb b/Formula/b/bvi.rb new file mode 100644 index 0000000000000..a048a4f69ee04 --- /dev/null +++ b/Formula/b/bvi.rb @@ -0,0 +1,34 @@ +class Bvi < Formula + desc "Vi-like binary file (hex) editor" + homepage "https://bvi.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bvi/bvi/1.5.0/bvi-1.5.0.src.tar.gz" + sha256 "6540716a1a3b2b9711635108da14b26baea488881d4a682121c0bddbba6b74cb" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "e18948359f9988ce1cfc894be133b8c70540c611b93ef222001470fad650608a" + sha256 arm64_sequoia: "9968f17b11435b15e8f5182ec678fc9006969d4932119006a3be55372c176d8a" + sha256 arm64_sonoma: "aa61abd709f9c346f50aa2284e38f2fdecca90e600dcf9f34a76505d0d256d83" + sha256 arm64_ventura: "dedbee4190affcaa87fde67b7027a64655245a4192eee436273029bbd1c1ce6b" + sha256 sonoma: "a5ca83f528845edfd49363d7900d3a2961d3d4e36dc35f4eeb4c842b72f9d223" + sha256 ventura: "13a2ff43c275882c8d8658690aab4a51d4b54cde10189c254f4862a6c38db90c" + sha256 arm64_linux: "da9dc6e14ca302a2cfcdbd83727273520610eafcf8a3b199d3ea430734424bc3" + sha256 x86_64_linux: "613c30ea6216543c1b1d27ed5c57e1cfb6bfabcc81a8d11c8e17a1f851b3bbe6" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + + test do + if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + out = shell_output("#{bin}/bvi -c q", 1) + assert_match out, "Input is not from a terminal" + else + system bin/"bvi", "-c", "q" + end + end +end diff --git a/Formula/b/bwa.rb b/Formula/b/bwa.rb new file mode 100644 index 0000000000000..c4e09b1b316b1 --- /dev/null +++ b/Formula/b/bwa.rb @@ -0,0 +1,40 @@ +class Bwa < Formula + desc "Burrow-Wheeler Aligner for pairwise alignment of DNA" + homepage "https://github.com/lh3/bwa" + url "https://github.com/lh3/bwa/archive/refs/tags/v0.7.19.tar.gz" + sha256 "cdff5db67652c5b805a3df08c4e813a822c65791913eccfb3cf7d528588f37bc" + license all_of: ["GPL-3.0-or-later", "MIT"] + head "https://github.com/lh3/bwa.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dc016b492675be407b846cf3e2563a31bf6a0544f638edc0428adf0d2c230daa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30ba4019988805cae03027361d588c146e9d66d1892e77d198f61debf7bdca55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a60e7929c8f1f41208c7bfceacb5efc01f59b80e3e7f3a851649c292828c78f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f491bc38742ec5a88f4bfcdb0ec21282194431c030e07f048cde10aca954314" + sha256 cellar: :any_skip_relocation, sonoma: "fe60cd80664c0121d756da12e3211b4b7aeab1ac0ea7cacc426d2b24c0e4f164" + sha256 cellar: :any_skip_relocation, ventura: "b82547f3bd7fa1aefccbb3951e45d7ac35697a040f4188920bfc91492fc520d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dde4bc264cfe51298a5c0fcf979c9f8892371f1543d55b54680585c10f7b8383" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b243ede1154f5e75c9c1af01f98be6b42be5e632d0054b3487e306b52e265eae" + end + + uses_from_macos "zlib" + + on_arm do + depends_on "sse2neon" => :build + end + + def install + system "make" + + # "make install" requested 26 Dec 2017 https://github.com/lh3/bwa/issues/172 + bin.install "bwa" + man1.install "bwa.1" + end + + test do + (testpath/"test.fasta").write ">0\nAGATGTGCTG\n" + system bin/"bwa", "index", "test.fasta" + assert_path_exists testpath/"test.fasta.bwt" + assert_match "AGATGTGCTG", shell_output("#{bin}/bwa mem test.fasta test.fasta") + end +end diff --git a/Formula/b/bwfmetaedit.rb b/Formula/b/bwfmetaedit.rb new file mode 100644 index 0000000000000..264ae73333f31 --- /dev/null +++ b/Formula/b/bwfmetaedit.rb @@ -0,0 +1,38 @@ +class Bwfmetaedit < Formula + desc "Tool for embedding, validating, and exporting BWF file metadata" + homepage "https://mediaarea.net/BWFMetaEdit" + url "https://mediaarea.net/download/binary/bwfmetaedit/25.04.1/BWFMetaEdit_CLI_25.04.1_GNU_FromSource.tar.xz" + sha256 "9a8830c32e561b2bac0467413de5d75d3853b7afdbbc8b830cbe6b4eb075c1b5" + license "0BSD" + + livecheck do + url "https://mediaarea.net/BWFMetaEdit/Download/Source" + regex(/href=.*?bwfmetaedit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4a576b9c54a6a0326ec348b601c0e658ce35e4c0d7d0781553d12d4ada6d1e8a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d85b31fff2a4763c289f8152dcceb7e37ed12a9049c9c373e569dab3ccf787cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71765c38e82677ee12feadb978f5ef2cbeebdb02804341066ddc22dd06ca7238" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b18ba9f78bd452fb382de7852b066c28bc34049aa5a7158478dadfa6fae469f1" + sha256 cellar: :any_skip_relocation, sonoma: "c0093ca11665ba05239cd1f85a9d6e1a1cf41ea0e0bc8c685de456c53d713939" + sha256 cellar: :any_skip_relocation, ventura: "efe96dc3b69b7704fd8cd1f0722913c27fac7c6a92c2fecd4c5c8c9a3d243006" + sha256 cellar: :any_skip_relocation, arm64_linux: "738627e85ae70d8e6fdd20fe07959c2406270b19bab59c2cec493830245941ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ab0427146edc6638cd7bdc09f485ca1108e3fd89230407db72c1d27005bacf8" + end + + def install + cd "Project/GNU/CLI" do + system "./configure", "--disable-debug", "--prefix=#{prefix}" + system "make", "install" + end + end + + test do + test_wav = test_fixtures("test.wav") + ret_status = OS.mac? ? 1 : 0 + output = shell_output("#{bin}/bwfmetaedit --out-tech #{test_wav} 2>&1", ret_status) + assert_match "FileName,FileSize,DateCreated,DateModified,Format,CodecID,Channels,SampleRate,BitRate", output + assert_match "#{test_wav}: Is read only", output if OS.mac? + end +end diff --git a/Formula/b/bwidget.rb b/Formula/b/bwidget.rb new file mode 100644 index 0000000000000..d036b3ef2a537 --- /dev/null +++ b/Formula/b/bwidget.rb @@ -0,0 +1,34 @@ +class Bwidget < Formula + desc "Tcl/Tk script-only set of megawidgets to provide the developer additional tools" + homepage "https://core.tcl-lang.org/bwidget/home" + url "https://downloads.sourceforge.net/project/tcllib/BWidget/1.10.1/bwidget-1.10.1.tar.gz" + sha256 "4aea02f38cf92fa4aa44732d4ed98648df839e6537d6f0417c3fe18e1a34f880" + license "TCL" + revision 1 + + livecheck do + url "https://sourceforge.net/projects/tcllib/rss?path=/BWidget" + regex(%r{url=.*?/bwidget[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "d524a18515be797d08ad291537351a3688c6ec100c38663f4729f50c938204af" + end + + depends_on "tcl-tk" + + def install + (lib/"bwidget").install Dir["*"] + end + + test do + # Fails with: no display name and no $DISPLAY environment variable + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + test_bwidget = <<~TCL + puts [package require BWidget] + exit + TCL + assert_equal version.to_s, pipe_output(Formula["tcl-tk"].bin/"tclsh", test_bwidget, 0).chomp + end +end diff --git a/Formula/b/bwm-ng.rb b/Formula/b/bwm-ng.rb new file mode 100644 index 0000000000000..f325c07209711 --- /dev/null +++ b/Formula/b/bwm-ng.rb @@ -0,0 +1,42 @@ +class BwmNg < Formula + desc "Console-based live network and disk I/O bandwidth monitor" + homepage "https://www.gropp.org/?id=projects&sub=bwm-ng" + url "https://github.com/vgropp/bwm-ng/archive/refs/tags/v0.6.3.tar.gz" + sha256 "c1a552b6ff48ea3e4e10110a7c188861abc4750befc67c6caaba8eb3ecf67f46" + license "GPL-2.0-or-later" + head "https://github.com/vgropp/bwm-ng.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ec3ddaf321252ebe934527a12aa3e1addb76f797cf5a618f8a9565c3d248d5af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "75b60058b57ac9733b0b3f0b7d83fd14bf2a23c5ef2b05fccc3c0494d773aab7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4457d6e94bb59ac3f932011679e08a9b5e5fe594f18c7413cbe41580713949b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08642acf1a9c6cceca48fe1a6ff7cbcf8e3faff906e8ca6b00b8056def0e9f4d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6813a187834a07be918ca68fd19356473c06507cc168aa6598c512f66fdf1a27" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5f572a2c3cba92b810273eec515a00b0dc406319efd33934a571e97a2f48fb9c" + sha256 cellar: :any_skip_relocation, sonoma: "5dfca0d64c98e4d39184d8dc404148c42a9ffb2b52cde20163237293d72bff98" + sha256 cellar: :any_skip_relocation, ventura: "4dff3336a435422ee54cb39a73754d6ac893020c7b583e2cee2cdf8957de6a76" + sha256 cellar: :any_skip_relocation, monterey: "5c348d9959e22e50abd4182becbe38b683712988be164097e2ba2c685b49c506" + sha256 cellar: :any_skip_relocation, big_sur: "174c1fe863ea893c778909824972bebf6691c399076db4ca638dc2cee3b8c065" + sha256 cellar: :any_skip_relocation, catalina: "8ece99c9c9349e80ac741aa8beafc3ea77ae62035279ed5da0c79d201d762882" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bfce1bb05275a58e441caf13c46aa439cc7bcef34efc5189720fd5490c56e52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55c116063a31ada221daff5f86798ab5cb90806e00e02f2b4ffda7092bd5caab" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + ENV.append "CFLAGS", "-std=gnu89" + + system "./autogen.sh" + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "
", shell_output("#{bin}/bwm-ng -o html") + end +end diff --git a/Formula/b/byacc.rb b/Formula/b/byacc.rb new file mode 100644 index 0000000000000..ec1ee01a7d933 --- /dev/null +++ b/Formula/b/byacc.rb @@ -0,0 +1,33 @@ +class Byacc < Formula + desc "(Arguably) the best yacc variant" + homepage "https://invisible-island.net/byacc/" + url "https://invisible-mirror.net/archives/byacc/byacc-20241231.tgz" + sha256 "192c2fae048d4e7f514ba451627f9c4e612765099f819c19191f9fde3e609673" + license :public_domain + + livecheck do + url "https://invisible-mirror.net/archives/byacc/" + regex(/href=.*?byacc[._-]v?(\d{6,8})\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a74b0dd5007d01217c1131bcf0208a952dafa4fead62d9503d63318c76d4264c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b612e162124adb2c0a376645ec5a6fd73a32a048f93ff3f0a9cf822755ec9c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0efb664c82544393a02605e60e18599b8aeffcdf2cfae244a7f7336de1164e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8ea708b5af936039ee437745f89d0db999464ab1dd68d7369e114b09315724c8" + sha256 cellar: :any_skip_relocation, sonoma: "652bcab4132cf85526b03cdbfa52294d455500e566febe2891e118ca43351146" + sha256 cellar: :any_skip_relocation, ventura: "50253d20fdb4a50ffd1066fa33baddcbd912128cfc7474622bfea06114c1a5d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4b9d40c105ff1ecc790ff99cc922270696f004172343b37112b81dfc5524a7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bb26e744e5e9602d7c1ff3766f2578fb34c1a8a497d3cd02932650d2b6c2023" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--program-prefix=b", "--prefix=#{prefix}", "--man=#{man}" + system "make", "install" + end + + test do + system bin/"byacc", "-V" + end +end diff --git a/Formula/b/byobu.rb b/Formula/b/byobu.rb new file mode 100644 index 0000000000000..b34d5b6e59e9b --- /dev/null +++ b/Formula/b/byobu.rb @@ -0,0 +1,54 @@ +class Byobu < Formula + desc "Text-based window manager and terminal multiplexer" + homepage "https://github.com/dustinkirkland/byobu" + url "https://github.com/dustinkirkland/byobu/archive/refs/tags/6.13.tar.gz" + sha256 "9690c629588e8f95d16b2461950d39934faaf8005dd2a283886d4e3bd6c86df6" + license "GPL-3.0-only" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "0b80059c6d18a7c12043587da070143235a585325503f1c2b2f04cc15a2a1829" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + depends_on "newt" + depends_on "tmux" + + on_macos do + depends_on "coreutils" + depends_on "gettext" + end + + conflicts_with "ctail", because: "both install `ctail` binaries" + + def install + cp "./debian/changelog", "./ChangeLog" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + + byobu_python = Formula["newt"].deps + .find { |d| d.name.match?(/^python@\d\.\d+$/) } + .to_formula + .libexec/"bin/python" + + lib.glob("byobu/include/*.py").each do |script| + byobu_script = "byobu-#{script.basename(".py")}" + + libexec.install(bin/byobu_script) + (bin/byobu_script).write_env_script(libexec/byobu_script, BYOBU_PYTHON: byobu_python) + end + end + + test do + system bin/"byobu-status" + assert_match "open terminal failed", shell_output("#{bin}/byobu-select-session 2>&1", 1) + end +end diff --git a/Formula/b/byteman.rb b/Formula/b/byteman.rb new file mode 100644 index 0000000000000..b6328d8044986 --- /dev/null +++ b/Formula/b/byteman.rb @@ -0,0 +1,66 @@ +class Byteman < Formula + desc "Java bytecode manipulation tool for testing, monitoring and tracing" + homepage "https://byteman.jboss.org/" + url "https://downloads.jboss.org/byteman/4.0.26/byteman-download-4.0.26-bin.zip" + sha256 "48375f14c7faa474b17e20666c730d0bdecf2b9b18bda4e6e9dacb0650c99479" + license "LGPL-2.1-or-later" + head "https://github.com/bytemanproject/byteman.git", branch: "main" + + livecheck do + url "https://byteman.jboss.org/downloads.html" + regex(/href=.*?byteman-download[._-]v?(\d+(?:\.\d+)+)-bin\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "22f4e5ae52fca43d524b4cb9e71a119ed480359f78fc782216f61c1d31cefa48" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/*.bat"]) + doc.install Dir["docs/*"], "README" + libexec.install ["bin", "lib", "contrib"] + pkgshare.install ["sample"] + + env = { JAVA_HOME: "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}", BYTEMAN_HOME: libexec } + Pathname.glob("#{libexec}/bin/*") do |file| + target = bin/File.basename(file, File.extname(file)) + # Drop the .sh from the scripts + target.write_env_script(libexec/"bin/#{File.basename(file)}", env) + end + end + + test do + (testpath/"src/main/java/BytemanHello.java").write <<~JAVA + class BytemanHello { + public static void main(String... args) { + System.out.println("Hello, Brew!"); + } + } + JAVA + + (testpath/"brew.btm").write <<~BTM + RULE trace main entry + CLASS BytemanHello + METHOD main + AT ENTRY + IF true + DO traceln("Entering main") + ENDRULE + + RULE trace main exit + CLASS BytemanHello + METHOD main + AT EXIT + IF true + DO traceln("Exiting main") + ENDRULE + BTM + + system "#{Formula["openjdk"].bin}/javac", "src/main/java/BytemanHello.java" + + actual = shell_output("#{bin}/bmjava -l brew.btm -cp src/main/java BytemanHello") + assert_match("Hello, Brew!", actual) + end +end diff --git a/Formula/b/bzip2.rb b/Formula/b/bzip2.rb new file mode 100644 index 0000000000000..4dbff33423c85 --- /dev/null +++ b/Formula/b/bzip2.rb @@ -0,0 +1,74 @@ +class Bzip2 < Formula + desc "Freely available high-quality data compressor" + homepage "https://sourceware.org/bzip2/" + url "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz" + sha256 "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" + license "bzip2-1.0.6" + + livecheck do + url "https://sourceware.org/pub/bzip2/" + regex(/href=.*?bzip2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e823d1ae6f9409cd524669dfe94dd9922e5661998be5ae416b237aa4713c8d54" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dddec821ca1677a0b509f565a4ad1e28d8df8ce8e26e48aa2efb7d2c37cf5d12" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f148a0cf9cec0d1711b5bd16c18047e0a9933acec37bfec30a182f29ae364577" + sha256 cellar: :any_skip_relocation, arm64_ventura: "52f70f97b2f8f2c6bc309e55970ed03ccd1b8110cf5f15fc16c2a930180a99f7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bcc8f2e728b154d43e76e8e81f77e934d905b8868b7be69e3b9b40b5868f7c34" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "12f184d77bb72cc7d9278af9bd34fd74c610f7aa144559e2aa2d9f4a4b09bd76" + sha256 cellar: :any_skip_relocation, sonoma: "0aa9de4f40daf644d2c5745e35a20fac2babda8df0218e58bd471d0132ba8457" + sha256 cellar: :any_skip_relocation, ventura: "2cf2591f8865d9a806736a6f1b74f0905477b5520dd730f025aa12d4c5e0749b" + sha256 cellar: :any_skip_relocation, monterey: "fc4dd056738e20b1c850c6834405e27071a992f7671137306c1764c7c0eef350" + sha256 cellar: :any_skip_relocation, big_sur: "d222e089bf7b4ab714b150ad754cb76b88b548f57c4bdbbaa4857d6e0541a096" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a85918b5e50c5e958e9a322630a2acab61aa4ac8857ab70c7967eeedded42e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a731afa70daaafec28359b4f10f1c68455c1955ae66cdbb6b6d52eee277bbd3e" + end + + keg_only :provided_by_macos + + def install + inreplace "Makefile", "$(PREFIX)/man", "$(PREFIX)/share/man" + + system "make", "install", "PREFIX=#{prefix}" + return if OS.mac? + + # Install shared libraries + system "make", "-f", "Makefile-libbz2_so", "clean" + system "make", "-f", "Makefile-libbz2_so" + lib.install "libbz2.so.#{version}", "libbz2.so.#{version.major_minor}" + lib.install_symlink "libbz2.so.#{version}" => "libbz2.so.#{version.major}" + lib.install_symlink "libbz2.so.#{version}" => "libbz2.so" + + # Create pkgconfig file based on 1.1.x repository. + # https://gitlab.com/bzip2/bzip2/-/blob/master/bzip2.pc.in + (lib/"pkgconfig/bzip2.pc").write <<~EOS + prefix=#{opt_prefix} + exec_prefix=${prefix} + bindir=${exec_prefix}/bin + libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: bzip2 + Description: Lossless, block-sorting data compression + Version: #{version} + Libs: -L${libdir} -lbz2 + Cflags: -I${includedir} + EOS + end + + test do + testfilepath = testpath + "sample_in.txt" + zipfilepath = testpath + "sample_in.txt.bz2" + + testfilepath.write "TEST CONTENT" + + system bin/"bzip2", testfilepath + system bin/"bunzip2", zipfilepath + + assert_equal "TEST CONTENT", testfilepath.read + end +end diff --git a/Formula/b/bzip3.rb b/Formula/b/bzip3.rb new file mode 100644 index 0000000000000..1dc6bd4781dd6 --- /dev/null +++ b/Formula/b/bzip3.rb @@ -0,0 +1,35 @@ +class Bzip3 < Formula + desc "Better and stronger spiritual successor to BZip2" + homepage "https://github.com/kspalaiologos/bzip3" + url "https://github.com/kspalaiologos/bzip3/releases/download/1.5.3/bzip3-1.5.3.tar.gz" + sha256 "c48823353084df2a5a0dba44fd5295abd078e40b49f09700d08af4d9b1e31d67" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "81921e9c4facfdfe8650998141d3a5f3269003d0bad236ec57f90707ea3a73e8" + sha256 cellar: :any, arm64_sequoia: "e15d757bd8cc8bf4184b63572e4e9e4aa2098fe23b9ec7f2cd0fd5698f0f9198" + sha256 cellar: :any, arm64_sonoma: "6e0f80b2d8873b8ccd668c4086ab8526898cf96021e58c89872f67649d23edcb" + sha256 cellar: :any, arm64_ventura: "1bb455120d20c0c2635e1d12e5b2fb542c63324debf078a8b50b1f535c661fcf" + sha256 cellar: :any, sonoma: "046095415fe0bd81f8234e3a9bcd5904b405c5e125b8d492f7d77c5d29a9381e" + sha256 cellar: :any, ventura: "4f16fb9cc53ec9127302c9a03838fccbed6189f987bad93ec6a8a855fbcbc76a" + sha256 cellar: :any_skip_relocation, arm64_linux: "205609d980a9f5e65292fcceb69322379ccb3a7c58cf32d26669e5fb2c43cd04" + sha256 cellar: :any_skip_relocation, x86_64_linux: "234e3a3449f0710e43724ff50fae9e819ed354869954bd989f005951a7ac386a" + end + + def install + system "./configure", "--disable-silent-rules", "--disable-arch-native", *std_configure_args + system "make", "install" + end + + test do + testfilepath = testpath + "sample_in.txt" + zipfilepath = testpath + "sample_in.txt.bz3" + + testfilepath.write "TEST CONTENT" + + system bin/"bzip3", testfilepath + system bin/"bunzip3", "-f", zipfilepath + + assert_equal "TEST CONTENT", testfilepath.read + end +end diff --git a/Formula/b/bzt.rb b/Formula/b/bzt.rb new file mode 100644 index 0000000000000..2fbcdb763a584 --- /dev/null +++ b/Formula/b/bzt.rb @@ -0,0 +1,280 @@ +class Bzt < Formula + include Language::Python::Virtualenv + + desc "BlazeMeter Taurus" + homepage "https://gettaurus.org/" + url "https://files.pythonhosted.org/packages/ff/7a/84abef5f6b22ed50b25dfbdc73e65af2ab70df182e31bd4c85161b2a5821/bzt-1.16.46.tar.gz" + sha256 "0e0b0feaf5a93e14a746aa14fab56faffedcd2cd80213f6eba7a995c34c7bdf7" + license "Apache-2.0" + revision 1 + head "https://github.com/Blazemeter/taurus.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "fccff6f39e7d0eed8258d20d94713011b3b6facb6bdbd292fdf7d67319191b09" + sha256 cellar: :any, arm64_sequoia: "95398ae41c0f76670f708daa7c20f99a2fd0138541732b9bc604246ee84083ac" + sha256 cellar: :any, arm64_sonoma: "49f853afc44f35db6e69d263a7d01d6c1c4a1123bd01dd56ab26fa42731e6450" + sha256 cellar: :any, sonoma: "4e7d19102b7eb270a8e1cd86664a6f0291ac40b78e241eb430034a5ce21448e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fe5dcb23f5c41a253d1535318f287145e4aa725de09e580433a7cf93d2767b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1f558297bb47a57020c7fd6c5d323cc5cf6371458520c187b90257767bf5555" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "numpy" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["certifi", "numpy"] + + resource "aiodogstatsd" do + url "https://files.pythonhosted.org/packages/8d/ea/d2d79661f213f09df0e9f56d25dbae41501880822e5c85a0a6d6857baa55/aiodogstatsd-0.16.0.post0.tar.gz" + sha256 "f783c7d6d74edd160b34141ff5f069c9a935bb32636823e39e36f0d1dbe14931" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "astunparse" do + url "https://files.pythonhosted.org/packages/f3/af/4182184d3c338792894f34a62672919db7ca008c89abee9b564dd34d8029/astunparse-1.6.3.tar.gz" + sha256 "5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "bidict" do + url "https://files.pythonhosted.org/packages/9a/6e/026678aa5a830e07cd9498a05d3e7e650a4f56a42f267a53d22bcda1bdc9/bidict-0.23.1.tar.gz" + sha256 "03069d763bc387bbd20e7d49914e75fc4132a41937fa3405417e1a5a2d006d71" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/a2/61/f083b5ac52e505dfc1c624eafbf8c7589a0d7f32daa398d2e7590efa5fda/colorlog-6.10.1.tar.gz" + sha256 "eb4ae5cb65fe7fec7773c2306061a8e63e02efc2c72eba9d27b0fa23c94f1321" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/72/0a/c3ea9573b1dc2e151abfe88c7fe0c26d1892fe6ed02d0cdb30f0d57029d5/cssselect-1.3.0.tar.gz" + sha256 "57f8a99424cfab289a1b6a816a43075a4b00948c86b4dcf3ef4ee7e15f7ab0c7" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/e3/58/6a8321cc0791876dc2509d7a22fc75535a1a7aa770b3496772f58b0a53a4/cython-3.1.6.tar.gz" + sha256 "ff4ccffcf98f30ab5723fc45a39c0548a3f6ab14f01d73930c5bfaea455ff01c" + end + + resource "dill" do + url "https://files.pythonhosted.org/packages/12/80/630b4b88364e9a8c8c5797f4602d0f76ef820909ee32f0bacb9f90654042/dill-0.4.0.tar.gz" + sha256 "0633f1d2df477324f53a895b02c901fb961bdbf65a17122586ea7019292cbcf0" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "fuzzyset2" do + url "https://files.pythonhosted.org/packages/49/33/44f03c3642922580229651ef07a6ade59352710ef56db99887eb21bc2ecf/fuzzyset2-0.2.5.tar.gz" + sha256 "150bc83ef37228ee1d6fc20e4c11dea0ecc64c0acbf251cfd973316738957a16" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hdrpy" do + url "https://files.pythonhosted.org/packages/47/8c/159be762f787888651f9895a60d8564d2c1df5b2581cc733823b45759cfd/hdrpy-0.3.3.tar.gz" + sha256 "8461ed2c0d577468e5499f8b685d9bf9660b72b8640bff02c78ba1f1b9bf5185" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "influxdb" do + url "https://files.pythonhosted.org/packages/12/d4/4c1bd3a8f85403fad3137a7e44f7882b0366586b7c27d12713493516f1c7/influxdb-5.3.2.tar.gz" + sha256 "58c647f6043712dd86e9aee12eb4ccfbbb5415467bc9910a48aa8c74c1108970" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "molotov" do + url "https://files.pythonhosted.org/packages/54/22/5820c7cad221514a04d9cdada884476e35c5972d7b84f88755094beab4fc/molotov-2.6.tar.gz" + sha256 "0f52d260b4566709882a12710eff9b5863604f88c9bc03749cab4f9de462771a" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "multiprocess" do + url "https://files.pythonhosted.org/packages/72/fd/2ae3826f5be24c6ed87266bc4e59c46ea5b059a103f3d7e7eb76a52aeecb/multiprocess-0.70.18.tar.gz" + sha256 "f9597128e6b3e67b23956da07cf3d2e5cba79e2f4e0fba8d7903636663ec6d0d" + end + + resource "progressbar33" do + url "https://files.pythonhosted.org/packages/71/fc/7c8e01f41a6e671d7b11be470eeb3d15339c75ce5559935f3f55890eec6b/progressbar33-2.4.tar.gz" + sha256 "51fe0d9b3b4023db2f983eeccdfc8c9846b84db8443b9bee002c7f58f4376eff" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-engineio" do + url "https://files.pythonhosted.org/packages/c9/d8/63e5535ab21dc4998ba1cfe13690ccf122883a38f025dca24d6e56c05eba/python_engineio-4.12.3.tar.gz" + sha256 "35633e55ec30915e7fc8f7e34ca8d73ee0c080cec8a8cd04faf2d7396f0a7a7a" + end + + resource "python-socketio" do + url "https://files.pythonhosted.org/packages/c0/3f/02f5970c82285bd015ec433078bfc3275580b03715ed6024607dbe0f1966/python_socketio-5.14.3.tar.gz" + sha256 "cd8da5e0666e741b4be19e07882e880f57a4751d1645f92c2bc746c95f23b1eb" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyvirtualdisplay" do + url "https://files.pythonhosted.org/packages/86/9f/23e5a82987c26d225139948a224a93318d7a7c8b166d4dbe4de7426dc4e4/PyVirtualDisplay-3.0.tar.gz" + sha256 "09755bc3ceb6eb725fb07eca5425f43f2358d3bf08e00d2a9b792a1aedd16159" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rapidfuzz" do + url "https://files.pythonhosted.org/packages/d3/28/9d808fe62375b9aab5ba92fa9b29371297b067c2790b2d7cda648b1e2f8d/rapidfuzz-3.14.3.tar.gz" + sha256 "2491937177868bc4b1e469087601d53f925e8d270ccc21e07404b4b5814b7b5f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/bb/71/b6365e6325b3290e14957b2c3a804a529968c77a049b2ed40c095f749707/setuptools-79.0.1.tar.gz" + sha256 "128ce7b8f33c3079fd1b067ecbb4051a66e8526e7b65f6cec075dfc650ddfa88" + end + + resource "simple-websocket" do + url "https://files.pythonhosted.org/packages/b0/d4/bfa032f961103eba93de583b161f0e6a5b63cebb8f2c7d0c6e6efe1e3d2e/simple_websocket-1.1.0.tar.gz" + sha256 "7939234e7aa067c534abdab3a9ed933ec9ce4691b0713c78acb195560aa52ae4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "terminaltables3" do + url "https://files.pythonhosted.org/packages/55/9b/9abd7feb0cf552061cfa452c22773f3158cdad877ad5623f13edfa07116f/terminaltables3-4.0.0.tar.gz" + sha256 "4e3eefe209aa89005a0a34d1525739424569729ee29b5e64a8dd51c5ebdab77f" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/bb/d3/09683323e2290732a39dc92ca5031d5e5ddda56f8d236f885a400535b29a/urwid-3.0.3.tar.gz" + sha256 "300804dd568cda5aa1c5b204227bd0cfe7a62cef2d00987c5eb2e4e64294ed9b" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/bzt -h") + + scenario = "execution.scenario.requests.0=https://gettaurus.org/" + output = shell_output("#{bin}/bzt -o execution.executor=locust -o execution.iterations=1 -o #{scenario}") + assert_match "INFO: Done performing with code: 0", output + end +end diff --git a/Formula/b2-tools.rb b/Formula/b2-tools.rb deleted file mode 100644 index 0f08185e9ffbb..0000000000000 --- a/Formula/b2-tools.rb +++ /dev/null @@ -1,36 +0,0 @@ -class B2Tools < Formula - include Language::Python::Virtualenv - - desc "B2 Cloud Storage Command-Line Tools" - homepage "https://github.com/Backblaze/B2_Command_Line_Tool" - url "https://github.com/Backblaze/B2_Command_Line_Tool/archive/v1.3.8.tar.gz" - sha256 "2ed276b9eb6796470280e4be27ef96018e338a87efa9cd70115ffbb6b030a6ae" - - bottle do - cellar :any_skip_relocation - sha256 "583fdcbde3f7e4aa636a21cd1dc1b3620b24f5c32898d5b9e50c39d345797873" => :mojave - sha256 "6ef673a1922b3b9e516f13b167000baba348ae303f28ae659cfef2816866c660" => :high_sierra - sha256 "912e96dfd2c7701e2390380a68e7008d33d26e82877fbcc062f5dc25e0687fc9" => :sierra - end - - depends_on "python" - - conflicts_with "boost-build", :because => "both install `b2` binaries" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", "b2" - venv.pip_install_and_link buildpath - - bash_completion.install "contrib/bash_completion/b2" => "b2-tools-completion.bash" - pkgshare.install (buildpath/"contrib").children - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - cmd = "#{bin}/b2 authorize_account BOGUSACCTID BOGUSAPPKEY 2>&1" - assert_match "unable to authorize account", shell_output(cmd, 1) - end -end diff --git a/Formula/b2sum.rb b/Formula/b2sum.rb deleted file mode 100644 index 957a6b0ca695c..0000000000000 --- a/Formula/b2sum.rb +++ /dev/null @@ -1,32 +0,0 @@ -class B2sum < Formula - desc "BLAKE2 b2sum reference binary" - homepage "https://github.com/BLAKE2/BLAKE2" - url "https://github.com/BLAKE2/BLAKE2/archive/20160619.tar.gz" - sha256 "cbac833ccae56b5c6173dbeaf871aa99b32745cf7a994c7451d4533ecda55633" - - bottle do - cellar :any_skip_relocation - sha256 "a82ef919d2964758ec362f58a177f74d114a4c3186d2ca1b499dfe9f9ea602de" => :mojave - sha256 "788c7a6c48666983e7ad84b1a360e7cff97769c2ceeb720f854cc11cd3c2225b" => :high_sierra - sha256 "26e11b434c3416172d848b237f67ca5e171c7c11188a5f86c83a5d54a53a8a3f" => :sierra - sha256 "ff4a36110ddee427728c3c7027b6e64d4ecdcab4bbe73bf69cf200cbfd877657" => :el_capitan - sha256 "ac07e18f25467617297e60a4a46d2309241ecf16adc642d8ef0abfbd6dd2cd70" => :yosemite - sha256 "d2adbbbe2cce0efe380586ebbfd6a765fdc092c9d205134119613b0dbf9964ab" => :mavericks - end - - def install - cd "b2sum" do - system "make", "NO_OPENMP=1" - system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man}" - end - end - - test do - checksum = <<~EOS - ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392 - aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923 - - EOS - assert_equal checksum.delete!("\n"), - pipe_output("#{bin}/b2sum -", "abc").chomp - end -end diff --git a/Formula/b43-fwcutter.rb b/Formula/b43-fwcutter.rb deleted file mode 100644 index 00d305c6f99a3..0000000000000 --- a/Formula/b43-fwcutter.rb +++ /dev/null @@ -1,34 +0,0 @@ -class B43Fwcutter < Formula - desc "Extract firmware from Braodcom 43xx driver files" - homepage "https://wireless.kernel.org/en/users/Drivers/b43" - url "https://bues.ch/b43/fwcutter/b43-fwcutter-019.tar.bz2" - mirror "https://launchpad.net/ubuntu/+archive/primary/+files/b43-fwcutter_019.orig.tar.bz2" - sha256 "d6ea85310df6ae08e7f7e46d8b975e17fc867145ee249307413cfbe15d7121ce" - - bottle do - cellar :any_skip_relocation - sha256 "51b5702dd05e2afc1f8f0e4c10ccf38023610706fae51112a220284bd9976daa" => :mojave - sha256 "abbde23073e94982c1f47ea1884abf4b855f8ab0ed8d0e2434de4ca32bfc8dca" => :high_sierra - sha256 "f5238356964126642e9dd5c88de5564f221db86d488ca826055629d504a71426" => :sierra - sha256 "d24bbb9e1669ef33319b23a37a8ebd4dddaf8d1ce2c9e24abff13d678e3633d4" => :el_capitan - sha256 "fed62452f6d8b74976575b0b2fc3f5fac351981ac85768160bb188a6c55ff170" => :yosemite - sha256 "b2d662d6f951714738626f19698922875b4f97d149fbc8a79aeac0034f75d594" => :mavericks - sha256 "e423ba3a40a826611d5af02c7267b9d260219c1012add5291b3df09002abfa5f" => :mountain_lion - end - - def install - inreplace "Makefile" do |m| - # Don't try to chown root:root on generated files - m.gsub! /install -o 0 -g 0/, "install" - m.gsub! /install -d -o 0 -g 0/, "install -d" - # Fix manpage installation directory - m.gsub! "$(PREFIX)/man", man - end - # b43-fwcutter has no ./configure - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "#{bin}/b43-fwcutter", "--version" - end -end diff --git a/Formula/babel.rb b/Formula/babel.rb deleted file mode 100644 index 9a72f3f983a6c..0000000000000 --- a/Formula/babel.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "language/node" -require "json" - -class Babel < Formula - desc "Compiler for writing next generation JavaScript" - homepage "https://babeljs.io/" - url "https://registry.npmjs.org/@babel/cli/-/cli-7.2.3.tgz" - sha256 "c11ee392ed2d7ee30126028c5daccc5d98ae6ba4753ae693114591101c98c144" - - bottle do - sha256 "819911f333897be72ef27919d33666bdf304f7e427659254bf8c40c8546937ad" => :mojave - sha256 "74246882b2f2e75c67d895406a9d6a3ce04a7ad554787503f73264e1b4c60650" => :high_sierra - sha256 "ae17cdae5cdb4358c96bda4ebf76a34d2f429e0676219647dfd9d3c75039f4dd" => :sierra - end - - depends_on "node" - - resource "babel-core" do - url "https://registry.npmjs.org/@babel/core/-/core-7.2.2.tgz" - sha256 "b632e5a565b000645d7bc0010331773481cc5dee7d4360360dccaa9e51c4785e" - end - - def install - (buildpath/"node_modules/@babel/core").install resource("babel-core") - - # declare babel-core as a bundledDependency of babel-cli - pkg_json = JSON.parse(IO.read("package.json")) - pkg_json["dependencies"]["@babel/core"] = resource("babel-core").version - pkg_json["bundledDependencies"] = ["@babel/core"] - IO.write("package.json", JSON.pretty_generate(pkg_json)) - - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"script.js").write <<~EOS - [1,2,3].map(n => n + 1); - EOS - - system bin/"babel", "script.js", "--out-file", "script-compiled.js" - assert_predicate testpath/"script-compiled.js", :exist?, "script-compiled.js was not generated" - - # Uncomment this for the next release, - # see https://github.com/Homebrew/homebrew-core/pull/35304#issuecomment-449335627. - # assert_equal version, resource("babel-core").version - end -end diff --git a/Formula/babeld.rb b/Formula/babeld.rb deleted file mode 100644 index 1749d57e7a740..0000000000000 --- a/Formula/babeld.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Babeld < Formula - desc "Loop-avoiding distance-vector routing protocol" - homepage "https://www.irif.univ-paris-diderot.fr/~jch/software/babel/" - url "https://www.irif.univ-paris-diderot.fr/~jch/software/files/babeld-1.8.2.tar.gz" - sha256 "07edecb132386d5561a767482bc5200e04239b18e48c2f0f47ae1c78d60fe5dc" - head "https://github.com/jech/babeld.git" - - bottle do - cellar :any_skip_relocation - sha256 "34f5992046489bd70733203a0c5f4583553a057989551f6ed917cd852ab3c5c4" => :mojave - sha256 "f0ff0f699974757e42a82a33d932bc72d0dd75a1f3f48a392594258498f9151f" => :high_sierra - sha256 "ff8c0a94366c55ca90190fc42c8d0856db5359f9d8f1ff2646b11b09252a17ae" => :sierra - sha256 "a4dd075f51dcb309632f19761340cd7bafc7fc14f69f8f6acfbcf7e360dd0f2a" => :el_capitan - end - - def install - system "make", "LDLIBS=''" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - shell_output("#{bin}/babeld -I #{testpath}/test.pid -L #{testpath}/test.log", 1) - expected = <<~EOS - Couldn't tweak forwarding knob.: Operation not permitted - kernel_setup failed. - EOS - assert_equal expected, (testpath/"test.log").read - end -end diff --git a/Formula/babl.rb b/Formula/babl.rb deleted file mode 100644 index c814d2af126d3..0000000000000 --- a/Formula/babl.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Babl < Formula - desc "Dynamic, any-to-any, pixel format translation library" - homepage "http://www.gegl.org/babl/" - url "https://download.gimp.org/pub/babl/0.1/babl-0.1.60.tar.bz2" - sha256 "a3d1eeccb6057ccbc189dc926ebaca96cd4896f3391f857b86334d2245f0604f" - - bottle do - sha256 "efb6b0840251a3ea273d8676b519140ddfe06532236012cf64c64d55d9dbfa98" => :mojave - sha256 "3daf384bb830c95c6eda08a3010ebb0052bc501740f722ac3cf03db35c0e34f4" => :high_sierra - sha256 "0c67ab09a6858974a62fad5ef8272c04264b0d520002880b8d03c04350bb4e9c" => :sierra - end - - head do - # Use Github instead of GNOME's git. The latter is unreliable. - url "https://github.com/GNOME/babl.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - babl_init(); - const Babl *srgb = babl_format ("R'G'B' u8"); - const Babl *lab = babl_format ("CIE Lab float"); - const Babl *rgb_to_lab_fish = babl_fish (srgb, lab); - babl_exit(); - return 0; - } - EOS - system ENV.cc, "-I#{include}/babl-0.1", "-L#{lib}", "-lbabl-0.1", testpath/"test.c", "-o", "test" - system testpath/"test" - end -end diff --git a/Formula/backupninja.rb b/Formula/backupninja.rb deleted file mode 100644 index 41210cd5d8906..0000000000000 --- a/Formula/backupninja.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Backupninja < Formula - desc "Backup automation tool" - homepage "https://0xacab.org/riseuplabs/backupninja" - url "https://sourcearchive.raspbian.org/main/b/backupninja/backupninja_1.0.2.orig.tar.gz" - mirror "https://debian.ethz.ch/ubuntu/ubuntu/pool/universe/b/backupninja/backupninja_1.0.2.orig.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/backupninja_1.0.2.orig.tar.gz" - sha256 "fdb399de331493c8f959a784318349b19a01fbeece275da2ecd70ec9847a80b6" - - bottle do - cellar :any_skip_relocation - sha256 "fc931f546efa005cd351b37688a7f82386524e6c78304889ecf426f045db3d2f" => :mojave - sha256 "9018c721fb3774083fac0c4994afe6a0151bafaa5459242e37eec3c7c67a26dc" => :high_sierra - sha256 "9018c721fb3774083fac0c4994afe6a0151bafaa5459242e37eec3c7c67a26dc" => :sierra - sha256 "9018c721fb3774083fac0c4994afe6a0151bafaa5459242e37eec3c7c67a26dc" => :el_capitan - end - - depends_on "dialog" - depends_on "gawk" - - skip_clean "etc/backup.d" - - def install - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - system "make", "install", "SED=sed" - end - - def post_install - (var/"log").mkpath - end - - test do - assert_match "root", shell_output("#{sbin}/backupninja -h", 1) - end -end diff --git a/Formula/bacula-fd.rb b/Formula/bacula-fd.rb deleted file mode 100644 index a74f13428b2e2..0000000000000 --- a/Formula/bacula-fd.rb +++ /dev/null @@ -1,68 +0,0 @@ -class BaculaFd < Formula - desc "Network backup solution" - homepage "https://www.bacula.org/" - url "https://downloads.sourceforge.net/project/bacula/bacula/9.2.0/bacula-9.2.0.tar.gz" - sha256 "df6bc7d81dbfe218ee58f9088dc031fce76e0c2e265126646f72ed32610456c7" - - bottle do - sha256 "0caea93b38810c1b73a262145db3d12565f6f13d49cef4e73c5e39d72c413178" => :mojave - sha256 "e5721a004aa365ad12c53c4cb593261ba9e2c809d877480a9efd98d2c6986e73" => :high_sierra - sha256 "f4b1f49978b3a4b5082a7514ee4995397e3c40768f6a87f460f262c92805cb96" => :sierra - sha256 "cf30893eb978f8da240416e6bcece5154caf59ecc70afb1d8217cf18ffb9421b" => :el_capitan - end - - depends_on "openssl" - depends_on "readline" - - conflicts_with "bareos-client", - :because => "Both install a `bconsole` executable." - - def install - # * sets --disable-conio in order to force the use of readline - # (conio support not tested) - # * working directory in /var/lib/bacula, reasonable place that - # matches Debian's location. - system "./configure", "--prefix=#{prefix}", - "--sbindir=#{bin}", - "--with-working-dir=#{var}/lib/bacula", - "--with-pid-dir=#{var}/run", - "--with-logdir=#{var}/log/bacula", - "--enable-client-only", - "--disable-conio", - "--with-readline=#{Formula["readline"].opt_prefix}" - - system "make" - system "make", "install" - - (var/"lib/bacula").mkpath - end - - def post_install - (var/"run").mkpath - end - - plist_options :startup => true, :manual => "bacula-fd" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - ProgramArguments - - #{opt_bin}/bacula-fd - -f - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/bacula-fd -? 2>&1", 1) - end -end diff --git a/Formula/badtouch.rb b/Formula/badtouch.rb deleted file mode 100644 index 10362aaec86c2..0000000000000 --- a/Formula/badtouch.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Badtouch < Formula - desc "Scriptable network authentication cracker" - homepage "https://github.com/kpcyrd/badtouch" - url "https://github.com/kpcyrd/badtouch/archive/v0.6.1.tar.gz" - sha256 "62181ac05a68a552e1984dd42206f6a5ca195e51addc48cbfdf55a60afc7c3ae" - - bottle do - sha256 "0adb1b9292c93963822e090e4860c6deadbdd2cc7da9d0e49639fa4a181cb425" => :mojave - sha256 "4965a902bbe8a22452039b145d5937f785fdac750674dc3c44ada3ca822c4aa4" => :high_sierra - sha256 "0d24c83275c2988cb09befda551377ee9b803fffdfca094bb4649dbdc2624899" => :sierra - sha256 "f579fb45cbfd1ee3908f5afd25c91c017d68ab380a8d2d36dc125fcd5031b293" => :el_capitan - end - - depends_on "rust" => :build - depends_on "openssl" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix - - system "cargo", "install", "--root", prefix, "--path", "." - man1.install "docs/badtouch.1" - end - - test do - (testpath/"true.lua").write <<~EOS - descr = "always true" - - function verify(user, password) - return true - end - EOS - system "#{bin}/badtouch", "oneshot", "-vvx", testpath/"true.lua", "foo" - end -end diff --git a/Formula/bagit.rb b/Formula/bagit.rb deleted file mode 100644 index a9670a9e6d797..0000000000000 --- a/Formula/bagit.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Bagit < Formula - desc "Library for creation, manipulation, and validation of bags" - homepage "https://github.com/LibraryOfCongress/bagit-java" - url "https://github.com/LibraryOfCongress/bagit-java/releases/download/v4.12.3/bagit-v4.12.3.zip" - sha256 "7736d00fafe575ea298788a8d697a2af490dd12f856b43cd57bf579a374199e1" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - # put logs in var, not in the Cellar - (var/"log/bagit").mkpath - inreplace "conf/log4j.properties", "${app.home}/logs", "#{var}/log/bagit" - - libexec.install Dir["*"] - - bin.install_symlink libexec/"bin/bagit" - end - - test do - system bin/"bagit" - end -end diff --git a/Formula/balance.rb b/Formula/balance.rb deleted file mode 100644 index cbe50a1e619b6..0000000000000 --- a/Formula/balance.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Balance < Formula - desc "Software load balancer" - homepage "https://www.inlab.net/balance/" - url "https://www.inlab.net/wp-content/uploads/2018/05/balance-3.57.tar.gz" - sha256 "b355f98932a9f4c9786cb61012e8bdf913c79044434b7d9621e2fa08370afbe1" - - bottle do - cellar :any_skip_relocation - sha256 "1b572db3df89cacc7d1fc1f26d9247900f5bada4efe14ba48051900c70d1dece" => :mojave - sha256 "77589c441e2c89d6fb3df19b51487fb4684327fe63c5fe768224d10f81868d3c" => :high_sierra - sha256 "02b241cd5085873f6f2e78c99c01b1be6c89a3a2ff9fc12e17600035096dc44e" => :sierra - sha256 "c6af3ec64f795a6ba24400e83b3ab3753564a57f8546f0137368860bd2605421" => :el_capitan - sha256 "07f517fc19b99e5d52f6a90576ccd718650bd6a291d7c808f0d8b8193bce7779" => :yosemite - sha256 "ee916620a28cde87c90824125bf418b61eea80bc99e3aa32936e39af8acf0432" => :mavericks - sha256 "225ecddbc89a491c8ee38988d0a18d175db79d7dec5553ff35d765d2d3ee6638" => :mountain_lion - end - - def install - system "make" - bin.install "balance" - man1.install "balance.1" - end - - test do - output = shell_output("#{bin}/balance 2>&1", 64) - assert_match "this is balance #{version}", output - end -end diff --git a/Formula/ballerburg.rb b/Formula/ballerburg.rb deleted file mode 100644 index 76090cbc47ed8..0000000000000 --- a/Formula/ballerburg.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Ballerburg < Formula - desc "Castle combat game" - homepage "https://baller.tuxfamily.org/" - url "https://download.tuxfamily.org/baller/ballerburg-1.2.0.tar.gz" - sha256 "0625f4b213c1180f2cb2179ef2bc6ce35c7e99db2b27306a8690c389ceac6300" - head "https://git.tuxfamily.org/baller/baller.git" - - bottle do - cellar :any - sha256 "e31d8c383d0abfbd5ff700683d225b3d34345cd9c89c8fdaec34813cfbee47d2" => :mojave - sha256 "23ecdb1ee06b96cff2e51117b3ff0bf8f0b6f29195e3d2d6323ca8dd72c79074" => :high_sierra - sha256 "fa38cec8799ff4dcd33735146d4d93c986eb42c72bf6a9f1b3bd997acb5613c1" => :sierra - sha256 "314236d328ffdbaa4ddbcfbe38566ab0669df3935a9a051d3366a8d0e87d3de9" => :el_capitan - sha256 "46502878f24bf976bc5798ff74c145059f642ca2e9cb9d8467e296ad5b582f00" => :yosemite - end - - depends_on "cmake" => :build - depends_on "sdl" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end -end diff --git a/Formula/ballerina.rb b/Formula/ballerina.rb deleted file mode 100644 index ac50a8271f891..0000000000000 --- a/Formula/ballerina.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ballerina < Formula - desc "The flexible, powerful and beautiful programming language" - homepage "https://ballerina.io/" - url "https://product-dist.ballerina.io/downloads/0.990.2/ballerina-0.990.2.zip" - sha256 "612ecebfb1c68908cb2ec25ed3d4f13ad35a6fb137aea49909fe40992f682642" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - # Remove Windows files - rm Dir["bin/*.bat"] - - chmod 0755, "bin/ballerina" - - inreplace ["bin/ballerina"] do |s| - s.gsub! /^BALLERINA_HOME=.*$/, "BALLERINA_HOME=#{libexec}" - s.gsub! /\r?/, "" - end - - bin.install "bin/ballerina" - libexec.install Dir["*"] - # Add symlinks for the Language Server - prefix.install_symlink libexec/"bre" - prefix.install_symlink libexec/"lib" - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - (testpath/"helloWorld.bal").write <<~EOS - import ballerina/io; - public function main(string... args) { - io:println("Hello, World!"); - } - EOS - output = shell_output("#{bin}/ballerina run helloWorld.bal") - assert_equal "Hello, World!", output.chomp - end -end diff --git a/Formula/bam.rb b/Formula/bam.rb deleted file mode 100644 index d3161c73abcc4..0000000000000 --- a/Formula/bam.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Bam < Formula - desc "Build system that uses Lua to describe the build process" - homepage "https://matricks.github.io/bam/" - url "https://github.com/matricks/bam/archive/v0.5.1.tar.gz" - sha256 "cc8596af3325ecb18ebd6ec2baee550e82cb7b2da19588f3f843b02e943a15a9" - head "https://github.com/matricks/bam.git" - - bottle do - cellar :any_skip_relocation - sha256 "195777b4263d8e5d84e91123ab1c47a362a5d92aa2c5c1cf7ac5c45b7728eb1d" => :mojave - sha256 "59aebec505aba51189ccedb1872affd1c48ca84598caa591c2e0c955817e7cd7" => :high_sierra - sha256 "f237da39dd743732f3cfa0a5029b3cce4b332fb08e4326183eece8fd50dcf789" => :sierra - sha256 "4ded8f152aa05211053796e77b9b7a9e5671b9d5871c374a85ee74e6b9cb8e50" => :el_capitan - end - - def install - system "./make_unix.sh" - bin.install "bam" - end - - test do - (testpath/"hello.c").write <<~EOS - #include - int main() { - printf("hello\\n"); - return 0; - } - EOS - - (testpath/"bam.lua").write <<~EOS - settings = NewSettings() - objs = Compile(settings, Collect("*.c")) - exe = Link(settings, "hello", objs) - EOS - - system bin/"bam", "-v" - assert_equal "hello", shell_output("./hello").chomp - end -end diff --git a/Formula/bamtools.rb b/Formula/bamtools.rb deleted file mode 100644 index 4eae4833f6d8f..0000000000000 --- a/Formula/bamtools.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Bamtools < Formula - desc "C++ API and command-line toolkit for BAM data" - homepage "https://github.com/pezmaster31/bamtools" - url "https://github.com/pezmaster31/bamtools/archive/v2.5.1.tar.gz" - sha256 "4abd76cbe1ca89d51abc26bf43a92359e5677f34a8258b901a01f38c897873fc" - head "https://github.com/pezmaster31/bamtools.git" - - bottle do - cellar :any_skip_relocation - sha256 "5c1195094d84ce0e5ec63660597029dad111639e7212537c1d083444714ac294" => :mojave - sha256 "cd3886cfb77b71ef9924d5475e4dbae2d42c4c66ef3880de33ca202855ce92b0" => :high_sierra - sha256 "5e72d5b1b5b18551bbd91c7f3b7a2dd6e763b13add38b9a3a798bb5a450be64e" => :sierra - sha256 "920e533776328d79f47bb562af5cfa00d855223818916e00614ee81d821f211c" => :el_capitan - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "api/BamWriter.h" - using namespace BamTools; - int main() { - BamWriter writer; - writer.Close(); - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}/bamtools", "-L#{lib}", - "-lbamtools", "-lz", "-o", "test" - system "./test" - end -end diff --git a/Formula/bandcamp-dl.rb b/Formula/bandcamp-dl.rb deleted file mode 100644 index 04632f34e08c0..0000000000000 --- a/Formula/bandcamp-dl.rb +++ /dev/null @@ -1,102 +0,0 @@ -class BandcampDl < Formula - include Language::Python::Virtualenv - - desc "Simple python script to download Bandcamp albums" - homepage "https://github.com/iheanyi/bandcamp-dl" - url "https://github.com/iheanyi/bandcamp-dl/archive/v0.0.8-12.tar.gz" - version "0.0.8-12" - sha256 "3252f52780f280ba18818d40cda1c89bdb99ee33d7911320ec2ce4c374df2d6b" - revision 1 - head "https://github.com/iheanyi/bandcamp-dl.git" - - bottle do - cellar :any_skip_relocation - sha256 "50d7b4c3692ef76fa071c0a4c5ca78c25901fac4a07ad9d3d7b58f6b0228af3a" => :mojave - sha256 "b56b8c31c2a86b66f5944bf7a85213ce00fd6d7e87e7ce02212be3ad532e2d94" => :high_sierra - sha256 "57ba4b30e2ee269ba946bf9a784212f669d8f829ec8e586436c895d6dc0f0b10" => :sierra - sha256 "d0ec20e1cdd9b41230d038ba8b93c4d09c185768bfc60c77a98c13a7f2465935" => :el_capitan - end - - depends_on "python" - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/9d/36/49d0ee152b6a1631f03a541532c6201942430060aa97fe011cf01a2cce64/Unidecode-1.0.22.tar.gz" - sha256 "8c33dd588e0c9bc22a76eaa0c715a5434851f726131bd44a6c26471746efabf5" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/fa/8d/1d14391fdaed5abada4e0f63543fef49b8331a34ca60c88bd521bcf7f782/beautifulsoup4-4.6.0.tar.gz" - sha256 "808b6ac932dccb0a4126558f7dfdcf41710dd44a4ef497a0bb59a77f9f078e89" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/15/d4/2f888fc463d516ff7bf2379a4e9a552fef7f22a94147655d9b1097108248/certifi-2018.1.18.tar.gz" - sha256 "edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "demjson" do - url "https://files.pythonhosted.org/packages/96/67/6db789e2533158963d4af689f961b644ddd9200615b8ce92d6cad695c65a/demjson-2.2.4.tar.gz" - sha256 "31de2038a0fdd9c4c11f8bf3b13fe77bc2a128307f965c8d5fb4dc6d6f6beb79" - end - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "mock" do - url "https://files.pythonhosted.org/packages/0c/53/014354fc93c591ccc4abff12c473ad565a2eb24dcd82490fae33dbf2539f/mock-2.0.0.tar.gz" - sha256 "b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba" - end - - resource "mutagen" do - url "https://files.pythonhosted.org/packages/2c/6a/0b2caf9364db074b616b1b8c26ce7166a883c21b0e40bd50f6db02307afe/mutagen-1.40.0.tar.gz" - sha256 "b2a2c2ce87863af12ed7896f341419cd051a3c72c3c6733db9e83060dcadee5e" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/d5/d6/f2bf137d71e4f213b575faa9eb426a8775732432edb67588a8ee836ecb80/pbr-3.1.1.tar.gz" - sha256 "05f61c71aaefc02d8e37c0a3eeb9815ff526ea28b3b76324769e6158d7f95be1" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "unicode-slugify" do - url "https://files.pythonhosted.org/packages/8c/ba/1a05f61c7fd72df85ae4dc1c7967a3e5a4b6c61f016e794bc7f09b2597c0/unicode-slugify-0.1.3.tar.gz" - sha256 "34cf3afefa6480efe705a4fc0eaeeaf7f49754aec322ba3e8b2f27dc1cbcf650" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/bandcamp-dl", "--artist=iamsleepless", "--album=rivulets" - assert_predicate testpath/"iamsleepless/rivulets/01 - rivulets.mp3", :exist? - system "#{bin}/bandcamp-dl", "https://iamsleepless.bandcamp.com/track/under-the-glass-dome" - assert_predicate testpath/"iamsleepless/under-the-glass-dome/Single - under-the-glass-dome.mp3", :exist? - end -end diff --git a/Formula/baobab.rb b/Formula/baobab.rb deleted file mode 100644 index c89c7ab87a003..0000000000000 --- a/Formula/baobab.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Baobab < Formula - desc "Gnome disk usage analyzer" - homepage "https://wiki.gnome.org/Apps/Baobab" - url "https://download.gnome.org/sources/baobab/3.30/baobab-3.30.0.tar.xz" - sha256 "5e4dd06f241eb32f00850efa1a4541cee088de480be2b52d788143187410a74f" - - bottle do - rebuild 1 - sha256 "e8319cfc39f4120159194d06eb9314d10118cce307b3f14cf5eb1b1d19a933fa" => :mojave - sha256 "5334181b0761c0b329727064cc0af772774a5a25ab047e1bca187f62f0558ca9" => :high_sierra - sha256 "e256084a6b1a30cd87c04b37cefdef405c63bb1b6720e210138bbcd63f02aaad" => :sierra - end - - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python" => :build - depends_on "vala" => :build - depends_on "adwaita-icon-theme" - depends_on "gtk+3" - depends_on "hicolor-icon-theme" - - def install - # stop meson_post_install.py from doing what needs to be done in the post_install step - ENV["DESTDIR"] = "/" - mkdir "build" do - system "meson", "--prefix=#{prefix}", ".." - system "ninja" - system "ninja", "install" - end - end - - def post_install - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - end - - test do - assert_match version.to_s, shell_output("#{bin}/baobab --version") - end -end diff --git a/Formula/bar.rb b/Formula/bar.rb deleted file mode 100644 index 131a995848dc5..0000000000000 --- a/Formula/bar.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Bar < Formula - desc "Provide progress bars for shell scripts" - homepage "http://www.theiling.de/projects/bar.html" - url "http://www.theiling.de/downloads/bar-1.4-src.tar.bz2" - sha256 "8034c405b6aa0d474c75ef9356cde1672b8b81834edc7bd94fc91e8ae097033e" - - bottle :unneeded - - def install - bin.install "bar" - end - - test do - (testpath/"test1").write "pumpkin" - (testpath/"test2").write "latte" - assert_match /latte/, shell_output("#{bin}/bar test1 test2") - end -end diff --git a/Formula/bareos-client.rb b/Formula/bareos-client.rb deleted file mode 100644 index aabdcdf4d6213..0000000000000 --- a/Formula/bareos-client.rb +++ /dev/null @@ -1,86 +0,0 @@ -class BareosClient < Formula - desc "Client for Bareos (Backup Archiving REcovery Open Sourced)" - homepage "https://www.bareos.org/" - url "https://github.com/bareos/bareos/archive/Release/17.2.7.tar.gz" - sha256 "99a5f907e3422532c783ee254dcf5c737d2b1b53522c00924d3e1009289d2fd2" - - bottle do - sha256 "01f5bffbfc61c4727bd33e1ac7a3fac8141dcd912c926ef1334727eb44ca703b" => :mojave - sha256 "960cf9d487fd3d121e32a3c36e33770022088033bde312464c0b279f01f8b9a8" => :high_sierra - sha256 "dd6c16847877563bf2efe7d590ece4f03ebeec9725016a0ffbb1927522dec29c" => :sierra - sha256 "396b873eb5b9a55611ce2f8342547d2dc452f636e01acca5323db0dcb92c3a0b" => :el_capitan - end - - depends_on "openssl" - depends_on "readline" - - conflicts_with "bacula-fd", - :because => "Both install a `bconsole` executable." - - def install - system "./configure", "--prefix=#{prefix}", - "--with-working-dir=#{var}/lib/bareos", - "--with-archivedir=#{var}/bareos", - "--with-confdir=#{etc}/bareos", - "--with-configtemplatedir=#{lib}/bareos/defaultconfigs", - "--with-scriptdir=#{lib}/bareos/scripts", - "--with-plugindir=#{lib}/bareos/plugins", - "--with-fd-password=XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX", - "--with-mon-fd-password=XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX", - "--with-basename=XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX", - "--with-hostname=XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX", - "--with-python", - "--enable-client-only" - - # The file platforms/osx/Makefile is intended for other environment (not homebrew) - # and would break the build process. - # Therefore it is removed until this has been fixed upstream, - # see https://bugs.bareos.org/view.php?id=900 - rm "platforms/osx/Makefile" - - system "make", "install" - end - - def post_install - # If no configuration files are present, - # deploy them (copy them and replace variables). - unless (etc/"bareos/bareos-fd.d").exist? - system lib/"bareos/scripts/bareos-config", "deploy_config", - lib/"bareos/defaultconfigs", etc/"bareos", "bareos-fd" - system lib/"bareos/scripts/bareos-config", "deploy_config", - lib/"bareos/defaultconfigs", etc/"bareos", "bconsole" - end - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/bareos-fd - -f - - StandardOutPath - #{var}/run/bareos-fd.log - StandardErrorPath - #{var}/run/bareos.log - RunAtLoad - - - - EOS - end - - test do - # Check if bareos-fd starts at all. - assert_match version.to_s, shell_output("#{sbin}/bareos-fd -? 2>&1", 1) - # Check if the configuration is valid. - system sbin/"bareos-fd", "-t" - end -end diff --git a/Formula/baresip.rb b/Formula/baresip.rb deleted file mode 100644 index e1062e82e0a7f..0000000000000 --- a/Formula/baresip.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Baresip < Formula - desc "Modular SIP useragent" - homepage "http://www.creytiv.com/baresip.html" - url "http://www.creytiv.com/pub/baresip-0.5.10.tar.gz" - sha256 "393fb010410d3fc6a4879cfda235f0ec98439be5d1dca02c15f3416f7110a7fb" - - bottle do - sha256 "a7d010f0c6ea77cfe38e34a26d163fda8994c2e903988b70d8771e685eeb3c5e" => :mojave - sha256 "2d21997680aa9d6faba15c4e786afddf9c76f2fc51887475de59d56262fcf785" => :high_sierra - sha256 "b60def84ebf98e806916f400f602036824b03d3b8b1dd97d44929fe2004ad1ff" => :sierra - sha256 "f23e3075e1d9b114d1b4022d831f9d4639d3a17438b2f79eb6919dc9819c3387" => :el_capitan - end - - depends_on "libre" - depends_on "librem" - - def install - # baresip doesn't like the 10.11 SDK when on Yosemite - if MacOS::Xcode.installed? && MacOS::Xcode.version.to_i >= 7 - ENV.delete("SDKROOT") - ENV.delete("HOMEBREW_SDKROOT") if MacOS::Xcode.without_clt? - end - - libre = Formula["libre"] - system "make", "install", "PREFIX=#{prefix}", - "LIBRE_MK=#{libre.opt_share}/re/re.mk", - "LIBRE_INC=#{libre.opt_include}/re", - "LIBRE_SO=#{libre.opt_lib}", - "MOD_AUTODETECT=", - "USE_AVCAPTURE=1", - "USE_COREAUDIO=1", - "USE_G711=1", - "USE_OPENGL=1", - "USE_STDIO=1", - "USE_UUID=1" - end - - test do - system "#{bin}/baresip", "-f", "#{ENV["HOME"]}/.baresip", "-t" - end -end diff --git a/Formula/bartycrouch.rb b/Formula/bartycrouch.rb deleted file mode 100644 index f13d13db636d5..0000000000000 --- a/Formula/bartycrouch.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Bartycrouch < Formula - desc "Incrementally update your Strings files" - homepage "https://github.com/Flinesoft/BartyCrouch" - url "https://github.com/Flinesoft/BartyCrouch/archive/3.13.1.tar.gz" - sha256 "86a48d807e2028061cbdcd63ad021122cc60408327a8de32daf332344332bd92" - - bottle do - cellar :any_skip_relocation - sha256 "a26c3afa9894c89d09350f6d233744fd104ac07b63f0d6ae3c533264957b8e05" => :mojave - sha256 "9fada7c618c2293819746b7802d4b71c4c3615ec342be6b8c899e4551297b159" => :high_sierra - sha256 "659b955035f9dbc317b7e1d74d7add56ae7cb874464545bc0ed5dd87cd144642" => :sierra - end - - depends_on :xcode => ["9.0", :build] - - def install - xcodebuild "-project", "BartyCrouch.xcodeproj", - "-scheme", "BartyCrouch CLI", - "SYMROOT=build", - "DSTROOT=#{prefix}", - "INSTALL_PATH=/bin", - "-verbose", - "install" - end - - test do - (testpath/"Test.swift").write <<~EOS - import Foundation - - class Test { - func test() { - NSLocalizedString("test", comment: "") - } - } - EOS - - (testpath/"en.lproj/Localizable.strings").write <<~EOS - /* No comment provided by engineer. */ - "oldKey" = "Some translation"; - EOS - - system bin/"bartycrouch", "code", "-p", testpath, "-l", testpath, "-a" - assert_match /"oldKey" = "/, File.read("en.lproj/Localizable.strings") - assert_match /"test" = "/, File.read("en.lproj/Localizable.strings") - end -end diff --git a/Formula/base64.rb b/Formula/base64.rb deleted file mode 100644 index 6e0352e47b42f..0000000000000 --- a/Formula/base64.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Base64 < Formula - desc "Encode and decode base64 files" - homepage "https://www.fourmilab.ch/webtools/base64/" - url "https://www.fourmilab.ch/webtools/base64/base64-1.5.tar.gz" - sha256 "2416578ba7a7197bddd1ee578a6d8872707c831d2419bdc2c1b4317a7e3c8a2a" - - bottle do - cellar :any_skip_relocation - sha256 "790e40a7ee037b0b99cc63d2085b121893ba80dfb43465c380568e7bacf3f83a" => :mojave - sha256 "c3a8113c031b07426e6eda7da7604db9308999f456eeca5f3f2d5c8d85ba3a0d" => :high_sierra - sha256 "3cd13d14c225413a5bc3b24f8f5dab48c2a942b64bf9162ad3a8ea8320a74bd1" => :sierra - sha256 "0ab522634adf5c9eefb08c11d51d2b6e0477d8ea607afdb8eefe204de764f180" => :el_capitan - sha256 "5681332029a2ed1fe1272b2ef9877a6348501897822c6a8955b26bb904426b1a" => :yosemite - sha256 "42e0864be73790c541237c3a2d41183cf1baacad346cb16c97bd3576f5f50cfc" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking" - system "make" - bin.install "base64" - man1.install "base64.1" - end - - test do - path = testpath/"a.txt" - path.write "hello" - assert_equal "aGVsbG8=", shell_output("#{bin}/base64 #{path}").strip - end -end diff --git a/Formula/basex.rb b/Formula/basex.rb deleted file mode 100644 index 0223a2c4de5c0..0000000000000 --- a/Formula/basex.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Basex < Formula - desc "Light-weight XML database and XPath/XQuery processor" - homepage "http://basex.org" - url "http://files.basex.org/releases/9.1.1/BaseX911.zip" - version "9.1.1" - sha256 "0ed5d81aceb37dcca41ad1c991c8769e399ae9736645619fe029c29dde70f158" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm Dir["bin/*.bat"] - rm_rf "repo" - rm_rf "data" - rm_rf "etc" - prefix.install_metafiles - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - assert_equal "1\n2\n3\n4\n5\n6\n7\n8\n9\n10", shell_output("#{bin}/basex '1 to 10'") - end -end diff --git a/Formula/bash-completion.rb b/Formula/bash-completion.rb deleted file mode 100644 index 2e94404ff7f6b..0000000000000 --- a/Formula/bash-completion.rb +++ /dev/null @@ -1,62 +0,0 @@ -# NOTE: version 2 is out, but it requires Bash 4, and macOS ships -# with 3.2.57. If you've upgraded bash, use bash-completion@2 instead. -class BashCompletion < Formula - desc "Programmable completion for Bash 3.2" - homepage "https://salsa.debian.org/debian/bash-completion" - url "https://src.fedoraproject.org/repo/pkgs/bash-completion/bash-completion-1.3.tar.bz2/a1262659b4bbf44dc9e59d034de505ec/bash-completion-1.3.tar.bz2" - sha256 "8ebe30579f0f3e1a521013bcdd183193605dab353d7a244ff2582fb3a36f7bec" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "9219c2b46362677e9ae6e19b344b774c3e9f163ae6bf6cf2686da06419aaec89" => :mojave - sha256 "b069be5574bdf6d12fd1fda17c3162467b68165541166d95d1a9474653a63abc" => :high_sierra - sha256 "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" => :sierra - sha256 "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" => :el_capitan - sha256 "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" => :yosemite - end - - conflicts_with "bash-completion@2", :because => "Differing version of same formula" - - # Backports the following upstream patch from 2.x: - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740971 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/c1d87451da3b5b147bed95b2dc783a1b02520ac5/bash-completion/bug-740971.patch" - sha256 "bd242a35b8664c340add068bcfac74eada41ed26d52dc0f1b39eebe591c2ea97" - end - - # Backports (a variant of) an upstream patch to fix man completion. - patch :DATA - - def install - inreplace "bash_completion" do |s| - s.gsub! "/etc/bash_completion", etc/"bash_completion" - s.gsub! "readlink -f", "readlink" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - Add the following line to your ~/.bash_profile: - [ -f #{etc}/bash_completion ] && . #{etc}/bash_completion - EOS - end - - test do - system "bash", "-c", ". #{etc}/profile.d/bash_completion.sh" - end -end -__END__ ---- a/completions/man -+++ b/completions/man -@@ -27,7 +27,7 @@ - fi - - uname=$( uname -s ) -- if [[ $uname == @(Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then -+ if [[ $uname == @(Darwin|Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then - manpath=$( manpath 2>/dev/null || command man --path ) - else - manpath=$MANPATH diff --git a/Formula/bash-completion@2.rb b/Formula/bash-completion@2.rb deleted file mode 100644 index 4f044cbe91967..0000000000000 --- a/Formula/bash-completion@2.rb +++ /dev/null @@ -1,46 +0,0 @@ -class BashCompletionAT2 < Formula - desc "Programmable completion for Bash 4.1+" - homepage "https://github.com/scop/bash-completion" - url "https://github.com/scop/bash-completion/releases/download/2.8/bash-completion-2.8.tar.xz" - sha256 "c01f5570f5698a0dda8dc9cfb2a83744daa1ec54758373a6e349bd903375f54d" - - bottle do - cellar :any_skip_relocation - sha256 "ed117a12f9b0fff798402a52c6823e3f7b167bcaadbbe1e42798870aa04ac80e" => :mojave - sha256 "08ccf4c84786d7881c5d58fd9122b62e828859c57b28652df923a105f9a94b8b" => :high_sierra - sha256 "08ccf4c84786d7881c5d58fd9122b62e828859c57b28652df923a105f9a94b8b" => :sierra - sha256 "08ccf4c84786d7881c5d58fd9122b62e828859c57b28652df923a105f9a94b8b" => :el_capitan - end - - head do - url "https://github.com/scop/bash-completion.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "bash" - - conflicts_with "bash-completion", :because => "Differing version of same formula" - - def install - inreplace "bash_completion", "readlink -f", "readlink" - - system "autoreconf", "-i" if build.head? - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" - ENV.deparallelize - system "make", "install" - end - - def caveats; <<~EOS - Add the following to your ~/.bash_profile: - if [ -f #{HOMEBREW_PREFIX}/share/bash-completion/bash_completion ]; then - . #{HOMEBREW_PREFIX}/share/bash-completion/bash_completion - fi - EOS - end - - test do - system "test", "-f", "#{share}/bash-completion/bash_completion" - end -end diff --git a/Formula/bash-git-prompt.rb b/Formula/bash-git-prompt.rb deleted file mode 100644 index 3f542497843e4..0000000000000 --- a/Formula/bash-git-prompt.rb +++ /dev/null @@ -1,32 +0,0 @@ -class BashGitPrompt < Formula - desc "Informative, fancy bash prompt for Git users" - homepage "https://github.com/magicmonty/bash-git-prompt" - url "https://github.com/magicmonty/bash-git-prompt/archive/2.7.1.tar.gz" - sha256 "5e5fc6f5133b65760fede8050d4c3bc8edb8e78bc7ce26c16db442aa94b8a709" - head "https://github.com/magicmonty/bash-git-prompt.git" - - bottle :unneeded - - def install - share.install "gitprompt.sh", "gitprompt.fish", "git-prompt-help.sh", - "gitstatus.py", "gitstatus.sh", "gitstatus_pre-1.7.10.sh", - "prompt-colors.sh" - - (share/"themes").install Dir["themes/*.bgptheme"], "themes/Custom.bgptemplate" - doc.install "README.md" - end - - def caveats; <<~EOS - You should add the following to your .bashrc (or .bash_profile): - if [ -f "#{opt_share}/gitprompt.sh" ]; then - __GIT_PROMPT_DIR="#{opt_share}" - source "#{opt_share}/gitprompt.sh" - fi - EOS - end - - test do - output = shell_output("/bin/sh #{share}/gitstatus.sh 2>&1") - assert_match "Not a git repository", output - end -end diff --git a/Formula/bash-preexec.rb b/Formula/bash-preexec.rb deleted file mode 100644 index 5375acccd3cd6..0000000000000 --- a/Formula/bash-preexec.rb +++ /dev/null @@ -1,24 +0,0 @@ -class BashPreexec < Formula - desc "preexec and precmd functions for Bash (just like Zsh)" - homepage "https://github.com/rcaloras/bash-preexec" - url "https://github.com/rcaloras/bash-preexec/archive/0.3.7.tar.gz" - sha256 "56c33779763f9960dee863f4d87bc58f8da0ad9120b2c60dd12ba61c71c72da4" - head "https://github.com/rcaloras/bash-preexec.git" - - bottle :unneeded - - def install - (prefix/"etc/profile.d").install "bash-preexec.sh" - end - - def caveats; <<~EOS - Add the following line to your bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile) - [ -f #{etc}/profile.d/bash-preexec.sh ] && . #{etc}/profile.d/bash-preexec.sh - EOS - end - - test do - # Just testing that the file is installed - assert_predicate testpath/"#{prefix}/etc/profile.d/bash-preexec.sh", :exist? - end -end diff --git a/Formula/bash-snippets.rb b/Formula/bash-snippets.rb deleted file mode 100644 index 7a2a1a59a1b1f..0000000000000 --- a/Formula/bash-snippets.rb +++ /dev/null @@ -1,22 +0,0 @@ -class BashSnippets < Formula - desc "Collection of small bash scripts for heavy terminal users" - homepage "https://github.com/alexanderepstein/Bash-Snippets" - url "https://github.com/alexanderepstein/Bash-Snippets/archive/v1.22.1.tar.gz" - sha256 "72a4d11ddd2e8e1c48fcee816cd43a34e34348102474c6b76c9cb31d1e95c8eb" - - bottle :unneeded - - conflicts_with "cheat", :because => "Both install a `cheat` executable" - - def install - system "./install.sh", "--prefix=#{prefix}", "all" - end - - test do - output = shell_output("#{bin}/weather Paramus").lines.first.chomp - assert_equal "Weather report: Paramus, United States of America", output - output = shell_output("#{bin}/qrify This is a test") - assert_match "████ ▄▄▄▄▄ █▀ █▀▄█ ▄▄▄▄▄ ████", output - assert_match "AAPL stock info", shell_output("#{bin}/stocks Apple") - end -end diff --git a/Formula/bash.rb b/Formula/bash.rb deleted file mode 100644 index 5f8eb627d0bb7..0000000000000 --- a/Formula/bash.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Bash < Formula - desc "Bourne-Again SHell, a UNIX command interpreter" - homepage "https://www.gnu.org/software/bash/" - url "https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.0.tar.gz" - mirror "https://mirrors.kernel.org/gnu/bash/bash-5.0.tar.gz" - mirror "https://ftpmirror.gnu.org/bash/bash-5.0.tar.gz" - mirror "https://gnu.cu.be/bash/bash-5.0.tar.gz" - mirror "https://mirror.unicorncloud.org/gnu/bash/bash-5.0.tar.gz" - version "5.0.0" - sha256 "b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d" - head "https://git.savannah.gnu.org/git/bash.git" - - bottle do - sha256 "d868e75449043299465b836dd340447d9db3d0a13f318c3ba1d3a57f02cad45b" => :mojave - sha256 "2b0c73d331f27d89dcfd32e29b748104e196a1b28e8f3cbb94214d3a8adc7282" => :high_sierra - sha256 "4471cac1a768f7daf38d035c2fedda4a0b0780598da8049fc75228e3a26c4fb0" => :sierra - end - - def install - # When built with SSH_SOURCE_BASHRC, bash will source ~/.bashrc when - # it's non-interactively from sshd. This allows the user to set - # environment variables prior to running the command (e.g. PATH). The - # /bin/bash that ships with macOS defines this, and without it, some - # things (e.g. git+ssh) will break if the user sets their default shell to - # Homebrew's bash instead of /bin/bash. - ENV.append_to_cflags "-DSSH_SOURCE_BASHRC" - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - In order to use this build of bash as your login shell, - it must be added to /etc/shells. - EOS - end - - test do - assert_equal "hello", shell_output("#{bin}/bash -c \"echo -n hello\"") - end -end diff --git a/Formula/bashdb.rb b/Formula/bashdb.rb deleted file mode 100644 index bd264b986c7ac..0000000000000 --- a/Formula/bashdb.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Bashdb < Formula - desc "Bash shell debugger" - homepage "https://bashdb.sourceforge.io" - url "https://downloads.sourceforge.net/project/bashdb/bashdb/4.4-0.94/bashdb-4.4-0.94.tar.bz2" - version "4.4-0.94" - sha256 "5931afc2f153aa595b4c59e53d303d845952ab6101227c34654a1b83686dc006" - - bottle do - cellar :any_skip_relocation - sha256 "cf1398e390505425398d0c5b8d4c00eadbc2f6f89a79f5c2fd49b7bb39627422" => :mojave - sha256 "b28d68c233e0aeea8c1f690d60ad4ab3a3a861f3479a0c9910ea38c7930beb04" => :high_sierra - sha256 "c16468585dfc75cdc28379afdbd5a506e7a842be3cbbb91249063b614b6ab94f" => :sierra - sha256 "c16468585dfc75cdc28379afdbd5a506e7a842be3cbbb91249063b614b6ab94f" => :el_capitan - sha256 "c16468585dfc75cdc28379afdbd5a506e7a842be3cbbb91249063b614b6ab94f" => :yosemite - end - - depends_on "bash" - depends_on :macos => :mountain_lion - - def install - system "./configure", "--with-bash=#{HOMEBREW_PREFIX}/bin/bash", - "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - assert_match version.to_s, pipe_output("#{bin}/bashdb --version 2>&1") - end -end diff --git a/Formula/bashish.rb b/Formula/bashish.rb deleted file mode 100644 index 6189f80124355..0000000000000 --- a/Formula/bashish.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Bashish < Formula - desc "Theme environment for text terminals" - homepage "https://bashish.sourceforge.io/" - url "https://downloads.sourceforge.net/project/bashish/bashish/2.2.4/bashish-2.2.4.tar.gz" - sha256 "3de48bc1aa69ec73dafc7436070e688015d794f22f6e74d5c78a0b09c938204b" - - bottle do - cellar :any_skip_relocation - sha256 "7f2b297190ede9e55c0def858e37b25682268e6f0bc3df2c507e347e7ac353a5" => :mojave - sha256 "b7caabd1274134f33dd458ac444bbe14a139de76b91f8bebb56349377b840a5e" => :high_sierra - sha256 "31134b56c7ad43b04ef186485af8581dbf8d8d8fcf615d259554d9c5adc7233f" => :sierra - sha256 "114d2ce95e530c6850bc36a52a1053ecf05185d774ed499bd1725811b3c1b88c" => :el_capitan - sha256 "cb3bfee8b595277be04660817eb269e97744d5f49dcac431ae7473982ad5d405" => :yosemite - sha256 "048bdedf5840f06f7ce38c153663d9c7b440f8829ade2474a47672a9e33b2c12" => :mavericks - end - - depends_on "dialog" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/bashish", "list" - end -end diff --git a/Formula/bastet.rb b/Formula/bastet.rb deleted file mode 100644 index ccd49fc12eb9e..0000000000000 --- a/Formula/bastet.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Bastet < Formula - desc "Bastard Tetris" - homepage "http://fph.altervista.org/prog/bastet.html" - url "https://github.com/fph/bastet/archive/0.43.2.tar.gz" - sha256 "f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f" - - bottle do - rebuild 1 - sha256 "d1315f05616c060c8b5e83a9ae494f2ffecd2f78d53ef554192bb0e12ef451ef" => :mojave - sha256 "188658452934d4ef5d48d6837fb0c6bf3e3875488e0c1da8dcf62ca37c1ee998" => :high_sierra - sha256 "8133c13d1b98d96eacf5d420d30378fbfcd9cbe898b0f13b188112618f4338f5" => :sierra - sha256 "e3745b716c09ce7f3834f4fc30163fa132f93feeec4c301dc9d46b0bc9ca564f" => :el_capitan - end - - depends_on "boost" - - # Fix compilation with Boost >= 1.65, remove for next release - patch do - url "https://github.com/fph/bastet/commit/0e03f8d4.patch?full_index=1" - sha256 "9b937d070a4faf150f60f82ace790c7a1119cff0685b52edf579740d2c415d7b" - end - - def install - inreplace %w[Config.cpp bastet.6], "/var", var - - system "make", "all" - - # this must exist for games to be saved globally - (var/"games").mkpath - touch "#{var}/games/bastet.scores2" - - bin.install "bastet" - man6.install "bastet.6" - end -end diff --git a/Formula/bat.rb b/Formula/bat.rb deleted file mode 100644 index 016983472c6b9..0000000000000 --- a/Formula/bat.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Bat < Formula - desc "Clone of cat(1) with syntax highlighting and Git integration" - homepage "https://github.com/sharkdp/bat" - url "https://github.com/sharkdp/bat/archive/v0.9.0.tar.gz" - sha256 "4ce9c118cf5da1159a882dea389f3c5737b5d98192e9a619b0fe8c1730341cc6" - - bottle do - sha256 "feb7b5af916d972b796c19cae512445b55072b22d6306df646b2c073b37ed081" => :mojave - sha256 "35447bd7311bdb54056cbd470dd9449b88ccecc4c62f45d237d51445f1a2a88e" => :high_sierra - sha256 "c7ccfa8aeda9b8d2a4e2f8dd6cdc6af2667c0bf036708a7c676fe915e9929ef5" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - man1.install "doc/bat.1" - end - - test do - pdf = test_fixtures("test.pdf") - output = shell_output("#{bin}/bat #{pdf} --color=never") - assert_match "Homebrew test", output - end -end diff --git a/Formula/batik.rb b/Formula/batik.rb deleted file mode 100644 index a0887fa6efa43..0000000000000 --- a/Formula/batik.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Batik < Formula - desc "Java-based toolkit for SVG images" - homepage "https://xmlgraphics.apache.org/batik/" - url "https://www.apache.org/dist/xmlgraphics/batik/binaries/batik-bin-1.10.tar.gz" - sha256 "226b3910a8bdc642c8e3a512f34a9b19bf942c17fef3ad7dc901ac34a2714322" - - bottle :unneeded - - def install - libexec.install "lib", Dir["*.jar"] - bin.write_jar_script libexec/"batik-rasterizer-#{version}.jar", "batik-rasterizer" - bin.write_jar_script libexec/"batik-#{version}.jar", "batik" - bin.write_jar_script libexec/"batik-ttf2svg-#{version}.jar", "batik-ttf2svg" - end - - test do - system bin/"batik-ttf2svg", "/Library/Fonts/Webdings.ttf", "-autorange", - "-o", "Webdings.svg", "-testcard" - assert_match "abcdefghijklmnopqrstuvwxyz", File.read("Webdings.svg") - end -end diff --git a/Formula/bats-core.rb b/Formula/bats-core.rb deleted file mode 100644 index 041cadfbee50e..0000000000000 --- a/Formula/bats-core.rb +++ /dev/null @@ -1,24 +0,0 @@ -class BatsCore < Formula - desc "Bash Automated Testing System" - homepage "https://github.com/bats-core/bats-core" - url "https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz" - sha256 "855d8b8bed466bc505e61123d12885500ef6fcdb317ace1b668087364717ea82" - - bottle :unneeded - - conflicts_with "bats", :because => "both install `bats` executables" - - def install - system "./install.sh", prefix - end - - test do - (testpath/"test.sh").write <<~EOS - @test "addition using bc" { - result="$(echo 2+2 | bc)" - [ "$result" -eq 4 ] - } - EOS - assert_match "addition", shell_output("#{bin}/bats test.sh") - end -end diff --git a/Formula/bats.rb b/Formula/bats.rb deleted file mode 100644 index 852489474f2b6..0000000000000 --- a/Formula/bats.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Bats < Formula - desc "TAP-compliant test framework for Bash scripts" - homepage "https://github.com/sstephenson/bats" - url "https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz" - sha256 "480d8d64f1681eee78d1002527f3f06e1ac01e173b761bc73d0cf33f4dc1d8d7" - head "https://github.com/sstephenson/bats.git" - - bottle :unneeded - - conflicts_with "bats-core", :because => "both install `bats` executables" - - def install - system "./install.sh", prefix - end - - test do - (testpath/"testing.sh").write <<~EOS - #!/usr/bin/env bats - @test "addition using bc" { - result="$(echo 2+2 | bc)" - [ "$result" -eq 4 ] - } - EOS - - chmod 0755, testpath/"testing.sh" - assert_match "addition", shell_output("./testing.sh") - end -end diff --git a/Formula/bazaar.rb b/Formula/bazaar.rb deleted file mode 100644 index ebc3449d3b659..0000000000000 --- a/Formula/bazaar.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Bazaar < Formula - desc "Friendly powerful distributed version control system" - homepage "https://bazaar.canonical.com/" - url "https://launchpad.net/bzr/2.7/2.7.0/+download/bzr-2.7.0.tar.gz" - sha256 "0d451227b705a0dd21d8408353fe7e44d3a5069e6c4c26e5f146f1314b8fdab3" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f9b9af659fcf9b507542510085ae40f2ff74a5a1f308a6979e26bfb2a764ac51" => :mojave - sha256 "102d9ec9fbed0c83402195d77f20bbcf94210face42bcddf98c3feda6c9587f7" => :high_sierra - sha256 "4a927398b0b1fc8ce43e16a227f40c63409a752338fd36600d05b907d960cab5" => :sierra - sha256 "6d1409dc49d838c0209bc59ebeb4ec5b70c5c1caef3b27b97f0ebedd6d8ff515" => :el_capitan - end - - # CVE-2017-14176 - # https://bugs.launchpad.net/brz/+bug/1710979 - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/b/bzr/bzr_2.7.0+bzr6622-9.debian.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/b/bzr/bzr_2.7.0+bzr6622-9.debian.tar.xz" - sha256 "fef6f9a8c3e2f227bf42d0f2f93ea60251a60cb420f7b561d97f0eb685f6ecb6" - apply "patches/27_fix_sec_ssh" - end - - def install - ENV.deparallelize # Builds aren't parallel-safe - - # Make and install man page first - system "make", "man1/bzr.1" - man1.install "man1/bzr.1" - - # Put system Python first in path - ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin" - - system "make" - inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python" - libexec.install "bzr", "bzrlib" - - (bin/"bzr").write_env_script(libexec/"bzr", :BZR_PLUGIN_PATH => "+user:#{HOMEBREW_PREFIX}/share/bazaar/plugins") - end - - test do - bzr = "#{bin}/bzr" - whoami = "Homebrew" - system bzr, "whoami", whoami - assert_match whoami, shell_output("#{bin}/bzr whoami") - system bzr, "init-repo", "sample" - system bzr, "init", "sample/trunk" - touch testpath/"sample/trunk/test.txt" - cd "sample/trunk" do - system bzr, "add", "test.txt" - system bzr, "commit", "-m", "test" - end - end -end diff --git a/Formula/bazel.rb b/Formula/bazel.rb deleted file mode 100644 index 685931a2a63b4..0000000000000 --- a/Formula/bazel.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Bazel < Formula - desc "Google's own build tool" - homepage "https://bazel.build/" - url "https://github.com/bazelbuild/bazel/releases/download/0.20.0/bazel-0.20.0-dist.zip" - sha256 "1945afa84fd8858b0a3c68c09915a4bc81065c61df2591387b2985e2297d30bd" - - bottle do - cellar :any_skip_relocation - sha256 "bead7d81f991084001c949b14443d2f10bd2bd4b89b189e15a451b4948bb412e" => :mojave - sha256 "fdbde21abf58899fb8c3bb7a5c24662946c92961fa23876429c2334354eb4377" => :high_sierra - sha256 "ce311e966933eac82e2d718dee42d29a6e9b3efbbb1bf508622ca27132c40f4c" => :sierra - end - - depends_on :java => "1.8" - depends_on :macos => :yosemite - - def install - ENV["EMBED_LABEL"] = "#{version}-homebrew" - # Force Bazel ./compile.sh to put its temporary files in the buildpath - ENV["BAZEL_WRKDIR"] = buildpath/"work" - - (buildpath/"sources").install buildpath.children - - cd "sources" do - system "./compile.sh" - system "./output/bazel", - "--output_user_root", - buildpath/"output_user_root", - "build", - "--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8", - "--java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8", - "scripts:bash_completion" - - bin.install "scripts/packages/bazel.sh" => "bazel" - bin.install "output/bazel" => "bazel-real" - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - - bash_completion.install "bazel-bin/scripts/bazel-complete.bash" - zsh_completion.install "scripts/zsh_completion/_bazel" - - prefix.install_metafiles - end - end - - test do - touch testpath/"WORKSPACE" - - (testpath/"ProjectRunner.java").write <<~EOS - public class ProjectRunner { - public static void main(String args[]) { - System.out.println("Hi!"); - } - } - EOS - - (testpath/"BUILD").write <<~EOS - java_binary( - name = "bazel-test", - srcs = glob(["*.java"]), - main_class = "ProjectRunner", - ) - EOS - - system bin/"bazel", - "build", - "--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8", - "--java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8", - "//:bazel-test" - assert_equal "Hi!\n", pipe_output("bazel-bin/bazel-test") - end -end diff --git a/Formula/bbcolors.rb b/Formula/bbcolors.rb deleted file mode 100644 index 38611e65dc48c..0000000000000 --- a/Formula/bbcolors.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Bbcolors < Formula - desc "Save and load color schemes for BBEdit and TextWrangler" - homepage "https://daringfireball.net/projects/bbcolors/" - url "https://daringfireball.net/projects/downloads/bbcolors_1.0.1.zip" - sha256 "6ea07b365af1eb5f7fb9e68e4648eec24a1ee32157eb8c4a51370597308ba085" - - bottle do - cellar :any_skip_relocation - sha256 "3eb2e91111f491b315d5bb077dacdf9dd03fa74a585ba780c59bdc071c104fe2" => :mojave - sha256 "b54a89cbcfcb6a0fb0b3c1279884f1fa54196e2c22a19424ea95827f419030d9" => :high_sierra - sha256 "cdc81c86b829ba9e051d693bccdb821ed78a8dc3a5df644fc156bfcd700d5686" => :sierra - sha256 "2a713dae009e44685d1ef02b01d5202a24087129dab70366d2e30800b7dfb9cb" => :el_capitan - sha256 "506d7f82fa38e1f694550be30a29554b8ecc8b303d47e9bb4fcadfc534ac55c7" => :yosemite - sha256 "68b63b5913be9e20b8ebc726c5272e030f7572aeb6baab709a70725f632c69b1" => :mavericks - sha256 "11e30dcfb7923267a89c670b8e919b6b6f38724f5c467e3b5f62ceb2b20d3799" => :mountain_lion - end - - def install - bin.install "bbcolors" - end - - test do - (testpath/"Library/Application Support/BBColors").mkpath - system "#{bin}/bbcolors", "-list" - end -end diff --git a/Formula/bbe.rb b/Formula/bbe.rb deleted file mode 100644 index 93d5ca251b003..0000000000000 --- a/Formula/bbe.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Bbe < Formula - desc "Sed-like editor for binary files" - homepage "https://sourceforge.net/projects/bbe-/" - url "https://downloads.sourceforge.net/project/bbe-/bbe/0.2.2/bbe-0.2.2.tar.gz" - sha256 "baaeaf5775a6d9bceb594ea100c8f45a677a0a7d07529fa573ba0842226edddb" - - bottle do - cellar :any_skip_relocation - sha256 "f1c5c6884c5e1740d5f649ac1caa4bb42df1a5ab6bba13970497f7c94454d346" => :mojave - sha256 "95cef154264d814bcdb543da64b8947ed8219411c3da20d854f30bd0aeb1332a" => :high_sierra - sha256 "4f533ae33e0c46a01bc11f1c8b99ef6baba62a376ddee1000de1fa199f18545a" => :sierra - sha256 "d9c63d7b9657e6f1c0e53048564f275283177e3513e202a7a9cfc69571bb5008" => :el_capitan - sha256 "ae0aa826fcd9f11e93428e9eaeedb14a56c193c861f09123999a8ba0f3d7f9cd" => :yosemite - sha256 "6b7c4c2c05ab444212260dfef6b2ab2ed7e9230844007651217259d1f957ed02" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/bbe", "--version" - end -end diff --git a/Formula/bbftp-client.rb b/Formula/bbftp-client.rb deleted file mode 100644 index 217ca46db4f13..0000000000000 --- a/Formula/bbftp-client.rb +++ /dev/null @@ -1,35 +0,0 @@ -class BbftpClient < Formula - desc "Secure file transfer software, optimized for large files" - homepage "https://software.in2p3.fr/bbftp/" - url "https://software.in2p3.fr/bbftp/dist/bbftp-client-3.2.1.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/bbftp-client-3.2.1.tar.gz" - sha256 "4000009804d90926ad3c0e770099874084fb49013e8b0770b82678462304456d" - revision 1 - - bottle do - sha256 "3870e56ecb6d593bddd4fee86e931392e689d1ce24a9f0de5953c379e5b218dd" => :mojave - sha256 "e95d1e5e6ea17e93d635f900d0ee4517587b9ea076fb2f6c8eaa96bae8e002e1" => :high_sierra - sha256 "027138bf779c95260fe90d543c9c5767c32c8f7c1afeb4c6ad872ecfdffc0a9b" => :sierra - sha256 "d813b37a04edcd071198dacd750fbac54fa3cd692fb7dda774aae88c5b8a2d9f" => :el_capitan - sha256 "d1b3299d2308aac2881b5049e55e912e871e98fe44a4d3586ad6afc4a565d2e6" => :yosemite - sha256 "8619a2f08f735d7e2387ba67ca53bf6f503f37835db08b127033d5c66019688d" => :mavericks - sha256 "613133ffd2d9eb3d064a7ecfd12939655362d9d6f7c951f93260c0a47ddd835c" => :mountain_lion - end - - depends_on "openssl" - - def install - # Fix ntohll errors; reported 14 Jan 2015. - ENV.append_to_cflags "-DHAVE_NTOHLL" if MacOS.version >= :yosemite - - cd "bbftpc" do - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--with-ssl=#{Formula["openssl"].opt_prefix}", "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - system "#{bin}/bbftp", "-v" - end -end diff --git a/Formula/bc.rb b/Formula/bc.rb deleted file mode 100644 index 8d80095d9eb39..0000000000000 --- a/Formula/bc.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Bc < Formula - desc "Arbitrary precision numeric processing language" - homepage "https://www.gnu.org/software/bc/" - url "https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz" - mirror "https://ftpmirror.gnu.org/bc/bc-1.07.1.tar.gz" - sha256 "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "78372f9830096b6d63fa7278e141924869a9aaee250b2ac1135594e67ba76c09" => :mojave - sha256 "0baf2e31191d80258636186bf9adcdf6b3f554f213d36cb3054213f736e52bf1" => :high_sierra - sha256 "1d8f0459c0b67aae275c43e01e5312146be72163acadd3d6c8f2bc440181508c" => :sierra - sha256 "e5c4b3fa712d705c3cc9bfae12242c9b4dc429e329c61d12aa01b65c1623a11f" => :el_capitan - end - - keg_only :provided_by_macos - - def install - # prevent user BC_ENV_ARGS from interfering with or influencing the - # bootstrap phase of the build, particularly - # BC_ENV_ARGS="--mathlib=./my_custom_stuff.b" - ENV.delete("BC_ENV_ARGS") - system "./configure", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--infodir=#{info}", - "--mandir=#{man}", - "--with-libedit" - system "make", "install" - end - - test do - system "#{bin}/bc", "--version" - assert_match "2", pipe_output("#{bin}/bc", "1+1\n") - end -end diff --git a/Formula/bcal.rb b/Formula/bcal.rb deleted file mode 100644 index 7040851351a80..0000000000000 --- a/Formula/bcal.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Bcal < Formula - desc "Storage conversion and expression calculator" - homepage "https://github.com/jarun/bcal" - url "https://github.com/jarun/bcal/archive/v2.1.tar.gz" - sha256 "c0b6cb911a773abdd555e6a9e0eb8a25934ceca038156e6250e117fa451beaa6" - - bottle do - cellar :any_skip_relocation - sha256 "ceb385dfbcab9d34a2c54655729f934edf6ccc0eb135ba0cd580f9c384e64629" => :mojave - sha256 "fc9abe164d34c568d66589d0cbeb1268044e763d6d6d93212badf10d5701aa04" => :high_sierra - sha256 "5564379751e03bc62269e9edc689089713ca9a5d8113e0f33ea4ff8c83406427" => :sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_match "9333353817", shell_output("#{bin}/bcal '56 gb / 6 + 4kib * 5 + 4 B'") - end -end diff --git a/Formula/bcftools.rb b/Formula/bcftools.rb deleted file mode 100644 index b3c901e0dc561..0000000000000 --- a/Formula/bcftools.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Bcftools < Formula - desc "Tools for BCF/VCF files and variant calling from samtools" - homepage "https://www.htslib.org/" - url "https://github.com/samtools/bcftools/releases/download/1.9/bcftools-1.9.tar.bz2" - sha256 "6f36d0e6f16ec4acf88649fb1565d443acf0ba40f25a9afd87f14d14d13070c8" - - bottle do - sha256 "778fdf169be86376f40ad9c14d2def00f49a486861f9b1f80b6034de0be5bc92" => :mojave - sha256 "4f7b1e8f7df9838484fc0f312d384008a7fc13a7efab375010a9f9d1a1abcec4" => :high_sierra - sha256 "6bff92a6b2c5aa70f43b6cdb83ee75ab795e41675c289e6a5ffb0428b9192edc" => :sierra - sha256 "17689cca5a46127c5b90cef24f40cd2446be3803ab0ba315469c254bad50fd74" => :el_capitan - end - - depends_on "gsl" - depends_on "htslib" - depends_on "xz" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-htslib=#{Formula["htslib"].opt_prefix}", - "--enable-libgsl" - system "make", "install" - pkgshare.install "test/query.vcf" - end - - test do - output = shell_output("#{bin}/bcftools stats #{pkgshare}/query.vcf") - assert_match "number of SNPs:\t3", output - assert_match "fixploidy", shell_output("#{bin}/bcftools plugin -l") - end -end diff --git a/Formula/bchunk.rb b/Formula/bchunk.rb deleted file mode 100644 index fd32b808e5298..0000000000000 --- a/Formula/bchunk.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Bchunk < Formula - desc "Convert CD images from .bin/.cue to .iso/.cdr" - homepage "http://he.fi/bchunk/" - url "http://he.fi/bchunk/bchunk-1.2.2.tar.gz" - sha256 "e7d99b5b60ff0b94c540379f6396a670210400124544fb1af985dd3551eabd89" - head "https://github.com/hessu/bchunk.git" - - bottle do - cellar :any_skip_relocation - sha256 "232935a7e7291016af594df742848d851ceca12ff9c06e183485c6a184c1df38" => :mojave - sha256 "d6183607b5b987345ee3380263819f1d5e12f2f3cc9f6fd55accfbf92c26d5ef" => :high_sierra - sha256 "95ef5fddc2234902187dde834690fb5957bd99ce11403e3d0f8881a705bb8f27" => :sierra - sha256 "665af973709071e982939f37ba39c79c6e41f7f18277d65670475ba9d8315f94" => :el_capitan - end - - def install - system "make" - bin.install "bchunk" - man1.install "bchunk.1" - end - - test do - (testpath/"foo.cue").write <<~EOS - foo.bin BINARY - TRACK 01 MODE1/2352 - INDEX 01 00:00:00 - EOS - - touch testpath/"foo.bin" - - system "#{bin}/bchunk", "foo.bin", "foo.cue", "foo" - assert_predicate testpath/"foo01.iso", :exist? - end -end diff --git a/Formula/bcpp.rb b/Formula/bcpp.rb deleted file mode 100644 index 2fea9fc1f4234..0000000000000 --- a/Formula/bcpp.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Bcpp < Formula - desc "C(++) beautifier" - homepage "https://invisible-island.net/bcpp/" - url "https://invisible-mirror.net/archives/bcpp/bcpp-20180401.tgz" - mirror "https://dl.bintray.com/homebrew/mirror/bcpp-20180401.tgz" - sha256 "3fee78476833a8d6c647f0b9f6ad85209cdb104a538349bc24538c7f7aede81f" - - bottle do - cellar :any_skip_relocation - sha256 "e27cfc6f4e0417a5ad0531f9b2dbf2630bc79d06404573c2a9a799717aa5dd4f" => :mojave - sha256 "25399ade6485e4272d264611a32db839905b56a3607f04ad9d66a5571469aa03" => :high_sierra - sha256 "339190468a41d319c161ab16933012517f68d11e5162d57b117bdc0220a51db0" => :sierra - sha256 "62ea91b7f94761da062c0f78757f48299bdd614ffba1cbc9e3e44794b305901e" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - etc.install "bcpp.cfg" - end - - test do - (testpath/"test.txt").write <<~EOS - test - test - test - test - EOS - system bin/"bcpp", "test.txt", "-fnc", "#{etc}/bcpp.cfg" - assert_predicate testpath/"test.txt.orig", :exist? - assert_predicate testpath/"test.txt", :exist? - end -end diff --git a/Formula/bcrypt.rb b/Formula/bcrypt.rb deleted file mode 100644 index 49a2abeffa235..0000000000000 --- a/Formula/bcrypt.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Bcrypt < Formula - desc "Cross platform file encryption utility using blowfish" - homepage "https://bcrypt.sourceforge.io/" - url "https://bcrypt.sourceforge.io/bcrypt-1.1.tar.gz" - sha256 "b9c1a7c0996a305465135b90123b0c63adbb5fa7c47a24b3f347deb2696d417d" - - bottle do - cellar :any_skip_relocation - sha256 "ef0fbaf77cad63f0450bde11bd6ba89fe2217ecb0f95b1952dd93c56730f615e" => :mojave - sha256 "70235a007382bbbaeddbfc52b503e86b6cadcb7d07b752d97c8ce0861bccd3a8" => :high_sierra - sha256 "913cfce96b6de1fce20ee1ff771ef22e3663f3da6c7529d7efc3a43b0e1d92b8" => :sierra - sha256 "d674203ce681f17519eee1ce7a3258615b2de5a8a12460d7de284af09028d7da" => :el_capitan - sha256 "dbd530bd84a1e92120aacf07f60e3b6131c92421702ab8b9f9e02d3b72a00ad6" => :yosemite - sha256 "2a0a662d778677d75222745b30e6c5e825078855d303cf853609f50b1ceca4a6" => :mavericks - sha256 "7f9c94e9c1527e596b316746d9705f524afb70c661abeb1279bf2c88ad061ddf" => :mountain_lion - end - - def install - system "make", "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LDFLAGS=-lz" - bin.install "bcrypt" - man1.install gzip("bcrypt.1") - end - - test do - (testpath/"test.txt").write("Hello World!") - pipe_output("#{bin}/bcrypt -r test.txt", "12345678\n12345678\n") - mv "test.txt.bfe", "test.out.txt.bfe" - pipe_output("#{bin}/bcrypt -r test.out.txt.bfe", "12345678\n") - assert_equal File.read("test.txt"), File.read("test.out.txt") - end -end diff --git a/Formula/bde.rb b/Formula/bde.rb deleted file mode 100644 index c464c2eed2a7d..0000000000000 --- a/Formula/bde.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Bde < Formula - desc "Basic Development Environment: foundational C++ libraries used at Bloomberg" - homepage "https://github.com/bloomberg/bde" - url "https://github.com/bloomberg/bde/archive/BDE_3.0.0.0.tar.gz" - sha256 "c6f295947c1af5f0d4e728e4d6801c4b29bb35a742faebc058f86b36722e8cdd" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f8a7566aaefef652418c0bebca94619c0e47877b25c11f88b57c2c09f157afe6" => :mojave - sha256 "4e8255cc3614d7d93e632d28ab697e5ad5749d5f9b463a4dc467466a596a4271" => :high_sierra - sha256 "605cff2b1687632dd90ffacc48cee0d1890415816379f8f63814411810a88d74" => :sierra - end - - resource "bde-tools" do - url "https://github.com/bloomberg/bde-tools/archive/v1.0.tar.gz" - sha256 "9b3936fecef23f8c072e62208d2068decfd13d144b771125afc9e0fb9ad16d30" - end - - def install - buildpath.install resource("bde-tools") - - system "python", "./bin/waf", "configure", "--prefix=#{prefix}" - system "python", "./bin/waf", "build" - system "python", "./bin/waf", "install" - end - - test do - # bde tests are incredibly performance intensive - # test below does a simple sanity check for linking against bsl. - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - using namespace BloombergLP; - bsl::string string(bslma::Default::globalAllocator()); - return 0; - } - EOS - system ENV.cxx, "-I#{include}/bsl", "test.cpp", "-L#{lib}", "-lbsl", "-o", "test" - system "./test" - end -end diff --git a/Formula/bdsup2sub.rb b/Formula/bdsup2sub.rb deleted file mode 100644 index 1ad9c907e5592..0000000000000 --- a/Formula/bdsup2sub.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Bdsup2sub < Formula - desc "Convert and tweak bitmap based subtitle streams" - homepage "https://github.com/mjuhasz/BDSup2Sub" - url "https://github.com/mjuhasz/BDSup2Sub/archive/5.1.2.tar.gz" - sha256 "9441f1f842547a008c1878711cdc62c6656c0efea88e29bdfa6f21ac24ba87cd" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "85a39af781d4dccdd6e2915d90cd892a2c6874d70e37bcd82d5c530d64f95a88" => :mojave - sha256 "178ef2ffa1129b31b099c923f6842302efc2b34bcbdd0e89782bf4ffc82c3c71" => :high_sierra - sha256 "36971d050455a728d555831b7b1c554ae658bbceb6a7a26687435e04861c2bb1" => :sierra - sha256 "59b0eccde943ecb9e614dc409ab7ddf7064479b75310c8a782bd7b777d7e25f2" => :el_capitan - end - - depends_on "maven" => :build - depends_on :java - - resource "macify" do - url "https://www.java2s.com/Code/JarDownload/macify/macify-1.4.jar.zip" - sha256 "c0ceb1b1ea3e0a59ef106ce3fe497297718ae69097a65a1519c69b8b9779c914" - end - - resource "java-image-scaling" do - url "https://www.java2s.com/Code/JarDownload/java-image/java-image-scaling-0.8.5.jar.zip" - sha256 "5b082321bd40eb79072615346373b972286b63d11432f0073fcc2c3ae4bc2799" - end - - def install - mkdir (buildpath/"repo") - (buildpath/"repo").install resource("macify") - inreplace "pom.xml", "macify", "macify\nsystem\n${project.basedir}/repo/macify-1.4.jar" - inreplace "pom.xml", %r{(.|\n)+}, "" - (buildpath/"repo").install resource("java-image-scaling") - inreplace "pom.xml", "java-image-scaling", - "java-image-scaling\nsystem\n${project.basedir}/repo/java-image-scaling-0.8.5.jar" - inreplace "pom.xml", "", - "1.61.6" - - system "mvn", "clean", "package", "-DskipTests" - libexec.install "target/BDSup2Sub-#{version}-jar-with-dependencies.jar" - bin.write_jar_script(libexec/"BDSup2Sub-#{version}-jar-with-dependencies.jar", "BDSup2Sub") - end - - test do - assert_match(/^BDSup2Sub #{version}$/, shell_output("#{bin}/BDSup2Sub -V")) - end -end diff --git a/Formula/bdw-gc.rb b/Formula/bdw-gc.rb deleted file mode 100644 index 5aa7796416e65..0000000000000 --- a/Formula/bdw-gc.rb +++ /dev/null @@ -1,60 +0,0 @@ -class BdwGc < Formula - desc "Garbage collector for C and C++" - homepage "https://www.hboehm.info/gc/" - url "https://github.com/ivmai/bdwgc/releases/download/v8.0.2/gc-8.0.2.tar.gz" - sha256 "4e8ca4b5b72a3a27971daefaa9b621f0a716695b23baa40b7eac78de2eeb51cb" - - bottle do - cellar :any - sha256 "456bcc98f7bfbf3450c0fe729940aae4819e8db6093799bcd00cdba1875201f4" => :mojave - sha256 "2f2ac45b40864ad3cc08fbbfdad80336842bc2bc950277fce147a81daebd5558" => :high_sierra - sha256 "43ec8fd9fc66fb60270a2380039a7af16124bb6748735d431d8add3e0d73cd7a" => :sierra - end - - head do - url "https://github.com/ivmai/bdwgc.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "libatomic_ops" => :build - depends_on "pkg-config" => :build - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-cplusplus" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include "gc.h" - - int main(void) - { - int i; - - GC_INIT(); - for (i = 0; i < 10000000; ++i) - { - int **p = (int **) GC_MALLOC(sizeof(int *)); - int *q = (int *) GC_MALLOC_ATOMIC(sizeof(int)); - assert(*p == 0); - *p = (int *) GC_REALLOC(q, 2 * sizeof(int)); - } - return 0; - } - EOS - - system ENV.cc, "-I#{include}", "-L#{lib}", "-lgc", "-o", "test", "test.c" - system "./test" - end -end diff --git a/Formula/beagle.rb b/Formula/beagle.rb deleted file mode 100644 index 329a5f49efdae..0000000000000 --- a/Formula/beagle.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Beagle < Formula - desc "Evaluate the likelihood of sequence evolution on trees" - homepage "https://github.com/beagle-dev/beagle-lib" - url "https://github.com/beagle-dev/beagle-lib/archive/v3.1.2.tar.gz" - sha256 "dd872b484a3a9f0bce369465e60ccf4e4c0cd7bd5ce41499415366019f236275" - - bottle do - cellar :any - sha256 "032c922981ee1707934cceb53318a26dab4a0ca6c392db63115f626a9f56b412" => :mojave - sha256 "d7834048b8aabdedcc824daf474cefe0436fdd8515da4df3f6c52a87d01395ef" => :high_sierra - sha256 "87e49bf8faeff280ba1211a7c0a0b1626750652b0498eef2ff01dfcff4290056" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "doxygen" => :build - depends_on :java => [:build, :test] - depends_on "libtool" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--without-cuda", - "--disable-libtool-dev" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "libhmsbeagle/platform.h" - int main() { return 0; } - EOS - (testpath/"T.java").write <<~EOS - class T { - static { System.loadLibrary("hmsbeagle-jni"); } - public static void main(String[] args) {} - } - EOS - system ENV.cxx, "-I#{include}/libhmsbeagle-1", - testpath/"test.cpp", "-o", "test" - system "./test" - system "javac", "T.java" - system "java", "-Djava.library.path=#{lib}", "T" - end -end diff --git a/Formula/beansdb.rb b/Formula/beansdb.rb deleted file mode 100644 index 1469677e9e5d1..0000000000000 --- a/Formula/beansdb.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Beansdb < Formula - desc "Yet another distributed key-value storage system" - homepage "https://github.com/douban/beansdb" - url "https://github.com/douban/beansdb/archive/v0.7.1.4.tar.gz" - sha256 "c89f267484dd47bab272b985ba0a9b9196ca63a9201fdf86963b8ed04f52ccdb" - head "https://github.com/douban/beansdb.git" - - bottle do - cellar :any_skip_relocation - sha256 "895c915b759be757dede0375aaf5abaf05a0f5f981d869c6c61367645fd2a564" => :mojave - sha256 "a8afd6d03a43a317c306f1de555edc6f804ddb4798ab88d93d9cfb3705887d8f" => :high_sierra - sha256 "0c93cb38fd445baab2c301b3cb76ce0b6c7af9d3e879113d4c78bf761756bc08" => :sierra - sha256 "5bb5311949ba21cde40848d1c1f58cf3317d8e8d604d3d0590dab2e9953a5ece" => :el_capitan - sha256 "e3c0bfa02e012ef1b0935fe13be8286dce080e8898b6519f5bf8c886ea77b9bc" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - - (var/"db/beansdb").mkpath - (var/"log").mkpath - end - - plist_options :manual => "beansdb" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/beansdb - -p - 7900 - -H - #{var}/db/beansdb - -T - 1 - -vv - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/beansdb.log - StandardOutPath - #{var}/log/beansdb.log - - - EOS - end - - test do - system "#{bin}/beansdb", "-h" - end -end diff --git a/Formula/beanstalkd.rb b/Formula/beanstalkd.rb deleted file mode 100644 index eb2dcd73cb8e6..0000000000000 --- a/Formula/beanstalkd.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Beanstalkd < Formula - desc "Generic work queue originally designed to reduce web latency" - homepage "https://beanstalkd.github.io/" - url "https://github.com/beanstalkd/beanstalkd/archive/v1.10.tar.gz" - sha256 "923b1e195e168c2a91adcc75371231c26dcf23868ed3e0403cd4b1d662a52d59" - - bottle do - cellar :any_skip_relocation - sha256 "21cef05beb1ef9976251362105694272b8eaa5622a4496359514f31dc5eafab9" => :mojave - sha256 "53ea84c7a2dc35bd061a6aebddd0285a57b72cf300846caeacd243a0bf2f07d3" => :high_sierra - sha256 "95a75ad2e7f06dfff9881762bddeb1fb06319a411165cba0114e4b7c9b1a4103" => :sierra - sha256 "6665ec5a9a493341134eca920517547340b672513f96317620c5095db3db9499" => :el_capitan - sha256 "1772e0af60fe42a471437285f29a9c03b52cd8ddd805eaf3339a9d644c4d1bb5" => :yosemite - sha256 "3d0c54d751784dd7ecfe1b482f30067ade6e7f99ec21d1e87e8f850fe2582f37" => :mavericks - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - plist_options :manual => "beanstalkd" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/beanstalkd - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/beanstalkd.log - StandardOutPath - #{var}/log/beanstalkd.log - - - EOS - end - - test do - system "#{bin}/beanstalkd", "-v" - end -end diff --git a/Formula/bear.rb b/Formula/bear.rb deleted file mode 100644 index 988c3caa10615..0000000000000 --- a/Formula/bear.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Bear < Formula - desc "Generate compilation database for clang tooling" - homepage "https://github.com/rizsotto/Bear" - url "https://github.com/rizsotto/Bear/archive/2.3.13.tar.gz" - sha256 "dc14c28bfbe0beef5ec93b4614a00bd419d5a793c8a678ba3b5544bd1dd580b6" - head "https://github.com/rizsotto/Bear.git" - - bottle do - cellar :any - sha256 "93a54f20fddef879b80fe80d67e21fe87442efcf0e3b0a78c73c581c7e84dd05" => :mojave - sha256 "20e01b1d5e5f0aea6051396f9aade81ac12175048639c5701406fbb211aaed71" => :high_sierra - sha256 "ad63b4ee2ca60eba9f30fefc1858c4923003f230f057e77d28fd7572c6e0048d" => :sierra - sha256 "ceb5198d21c4f266c7edd11ebd2331995bfe3a57c4f6ed7656ddfe230457485c" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "python@2" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/bear", "true" - assert_predicate testpath/"compile_commands.json", :exist? - end -end diff --git a/Formula/beast.rb b/Formula/beast.rb deleted file mode 100644 index 64f5dcb990024..0000000000000 --- a/Formula/beast.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Beast < Formula - desc "Bayesian Evolutionary Analysis Sampling Trees" - homepage "http://beast.community/" - url "https://github.com/beast-dev/beast-mcmc/archive/v1.10.4.tar.gz" - sha256 "e2f8a30e4f695bf0e58ac3e94778459a1db6cd0d476556d86c563e4b6a1181f7" - head "https://github.com/beast-dev/beast-mcmc.git" - - bottle do - cellar :any_skip_relocation - sha256 "3c894f422a0ee8e3a60a4fc4383b7c92e3373bcddf913034ef92541a346c5d8c" => :mojave - sha256 "a5c4138c07edad9c5fe6cb2a24c50c3b7e77abfa206f31e0b6d2f6ac62f2fa5b" => :high_sierra - sha256 "c3b2d7c0e17ee1072e0278ff8cfc4d27cee98450e3b23c29a2e0724c6278def8" => :sierra - end - - depends_on "ant" => :build - depends_on "beagle" - depends_on :java => "1.7+" - - def install - system "ant", "linux" - libexec.install Dir["release/Linux/BEASTv*/*"] - pkgshare.install_symlink libexec/"examples" - bin.install_symlink Dir[libexec/"bin/*"] - end - - test do - cp pkgshare/"examples/TestXML/ClockModels/testUCRelaxedClockLogNormal.xml", testpath - - # Run fewer generations to speed up tests - inreplace "testUCRelaxedClockLogNormal.xml", 'chainLength="10000000"', - 'chainLength="100000"' - - system "#{bin}/beast", "testUCRelaxedClockLogNormal.xml" - - %w[ops log trees].each do |ext| - output = "testUCRelaxedClockLogNormal." + ext - assert_predicate testpath/output, :exist?, "Failed to create #{output}" - end - end -end diff --git a/Formula/bedops.rb b/Formula/bedops.rb deleted file mode 100644 index 4f4cead441da7..0000000000000 --- a/Formula/bedops.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Bedops < Formula - desc "Set and statistical operations on genomic data of arbitrary scale" - homepage "https://github.com/bedops/bedops" - url "https://github.com/bedops/bedops/archive/v2.4.35.tar.gz" - sha256 "da0265cf55ef5094834318f1ea4763d7a3ce52a6900e74f532dd7d3088c191fa" - - bottle do - cellar :any_skip_relocation - sha256 "e881bf7969bf3d763f6e1bbe56041779ec32aeb10a193c7922ed84697f99191b" => :mojave - sha256 "d505812bddf22f9c7b912c5cd7b0f7a5f197bf2fa318ec67c38d899cbc5eaefd" => :high_sierra - sha256 "3944dbf5ed3a6c2ff825099cdf3d65e0f8aad2de67604ce0523a0468a8832894" => :sierra - sha256 "a860bbe9e2aa2d5289aa0d960bb01212841f71732eb1e913c8364de46f62708c" => :el_capitan - end - - needs :cxx11 - - def install - system "make" - system "make", "install", "BINDIR=#{bin}" - end - - test do - (testpath/"first.bed").write <<~EOS - chr1\t100\t200 - EOS - (testpath/"second.bed").write <<~EOS - chr1\t300\t400 - EOS - output = shell_output("#{bin}/bedops --complement first.bed second.bed") - assert_match "chr1\t200\t300", output - end -end diff --git a/Formula/bedtools.rb b/Formula/bedtools.rb deleted file mode 100644 index be3594a8d3493..0000000000000 --- a/Formula/bedtools.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Bedtools < Formula - desc "Tools for genome arithmetic (set theory on the genome)" - homepage "https://github.com/arq5x/bedtools2" - url "https://github.com/arq5x/bedtools2/archive/v2.27.1.tar.gz" - sha256 "edcac089d84e63a51f85c3c189469daa7d42180272130b046856faad3cf79112" - - bottle do - cellar :any_skip_relocation - sha256 "d564e46ed6f3a6a559f829175d01780dd71162a9a83115c4e5022b7a095e0ae9" => :mojave - sha256 "ca1a234e9bcdb62f4c71aad27a12c1b286c0a0dd9101b22c8a55492c35b50a68" => :high_sierra - sha256 "96e8d3f30f6b0f542b2fa17ce324d82c7c2ed1c8c579007fd7138dbbae63188e" => :sierra - sha256 "56d2a63e1193f1326505c9a1829b7a4c6257261734a775fce0829cd7accb84f3" => :el_capitan - end - - def install - system "make" - system "make", "install", "prefix=#{prefix}" - prefix.install "RELEASE_HISTORY" - end - - test do - (testpath/"t.bed").write "c\t1\t5\nc\t4\t9" - assert_equal "c\t1\t9", shell_output("#{bin}/bedtools merge -i t.bed").chomp - end -end diff --git a/Formula/bee.rb b/Formula/bee.rb deleted file mode 100644 index 2b11691de7a2f..0000000000000 --- a/Formula/bee.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Bee < Formula - desc "Tool for managing database changes" - homepage "https://github.com/bluesoft/bee" - url "https://github.com/bluesoft/bee/releases/download/1.63/bee-1.63.zip" - sha256 "8c17b9896ad2072e9a112a94fb8d5d8b4e09430da38b56bb29aaafb0713cb8b1" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm_rf Dir["bin/*.bat"] - libexec.install Dir["*"] - (bin/"bee").write_env_script libexec/"bin/bee", Language::Java.java_home_env("1.8") - end - - test do - (testpath/"bee.properties").write <<~EOS - test-database.driver=com.mysql.jdbc.Driver - test-database.url=jdbc:mysql://127.0.0.1/test-database - test-database.user=root - test-database.password= - EOS - (testpath/"bee").mkpath - system bin/"bee", "dbchange:create new-file" - end -end diff --git a/Formula/beecrypt.rb b/Formula/beecrypt.rb deleted file mode 100644 index 5185655c4e77c..0000000000000 --- a/Formula/beecrypt.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Beecrypt < Formula - desc "C/C++ cryptography library" - homepage "https://beecrypt.sourceforge.io" - url "https://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz" - sha256 "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d" - revision 7 - - bottle do - cellar :any - sha256 "d4b8e542e1d0c6b805ced58ccf5342a29c29342631d0b180ef8b7268ca745d68" => :mojave - sha256 "75381fee700b8a6659dad5de0ea92df8d2e0bed0e1cd34755c8b3bfc39f99b89" => :high_sierra - sha256 "9bb192a3b891680eedbacb38cd9a2daa694cbef4d1db7b844d1809fb5504d660" => :sierra - sha256 "aafed63c6eb816d71151cf20830d76375ef872d2502babfe20f94683b3fcbf33" => :el_capitan - sha256 "c321c1ab92e2f644460e3f2cba59495962735a3b046744692a171deebffba29b" => :yosemite - end - - depends_on "libtool" => :build - - # fix build with newer clang, gcc 4.7 (https://bugs.gentoo.org/show_bug.cgi?id=413951) - patch :p0, :DATA - - def install - cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-openmp", - "--without-java", - "--without-python" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "beecrypt/base64.h" - #include "beecrypt/sha256.h" - #include - - int main(void) - { - sha256Param hash; - const byte *string = (byte *) "abc"; - byte digest[32]; - byte *crc; - - sha256Reset(&hash); - sha256Update(&hash, string, sizeof(string) / sizeof(*string)); - sha256Process(&hash); - sha256Digest(&hash, digest); - - printf("%s\\n", crc = b64crc(digest, 32)); - - free(crc); - - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lbeecrypt", "-o", "test" - assert_match /ZF8D/, shell_output("./test") - end -end - -__END__ ---- include/beecrypt/c++/util/AbstractSet.h~ 2009-06-17 13:05:55.000000000 +0200 -+++ include/beecrypt/c++/util/AbstractSet.h 2012-06-03 17:45:55.229399461 +0200 -@@ -56,7 +56,7 @@ - if (c->size() != size()) - return false; - -- return containsAll(*c); -+ return this->containsAll(*c); - } - return false; - } diff --git a/Formula/befunge93.rb b/Formula/befunge93.rb deleted file mode 100644 index 001c0ba15b820..0000000000000 --- a/Formula/befunge93.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Befunge93 < Formula - desc "Esoteric programming language" - homepage "https://catseye.tc/node/Befunge-93.html" - url "https://catseye.tc/distfiles/befunge-93-2.23-2015.0101.zip" - version "2.23-2015.0101" - sha256 "7ca6509b9d25627f90b9ff81da896a8ab54853e87a5be918d79cf425bcb8246e" - head "https://github.com/catseye/Befunge-93.git" - - bottle do - cellar :any_skip_relocation - sha256 "b9119902c751f024359e163539e6d496d7e807929f7ddefa15c3ed0e99b10dd5" => :mojave - sha256 "90ce43353a46615332cf3a4228786f986ea93cac15dba1aeb79684e4f084afe4" => :high_sierra - sha256 "0b2b344570f71b3fa702675b2305b96632fde0a8da44085a15b15fe72863f66a" => :sierra - sha256 "fcebeb62391bd6e3eef571123af573766666ce9c40f139c889cc350bf6410d8b" => :el_capitan - sha256 "825c5d86e93d7cf0ecc2f3f16f626c27e658f1d4792bd6e74092b11f815097d7" => :yosemite - sha256 "a4f6102ac80c19ef969e7b2bbe70bdfd4f192df08d455b2b6162ce16e3616564" => :mavericks - end - - def install - system "make" - bin.install Dir["bin/bef*"] - end - - test do - (testpath/"test.bf").write '"dlroW olleH" ,,,,,,,,,,, @' - assert_match /Hello World/, shell_output("#{bin}/bef test.bf") - end -end diff --git a/Formula/bench.rb b/Formula/bench.rb deleted file mode 100644 index 9fc586a66f0ee..0000000000000 --- a/Formula/bench.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/haskell" - -class Bench < Formula - include Language::Haskell::Cabal - - desc "Command-line benchmark tool" - homepage "https://github.com/Gabriel439/bench" - url "https://hackage.haskell.org/package/bench-1.0.12/bench-1.0.12.tar.gz" - sha256 "a6376f4741588201ab6e5195efb1e9921bc0a899f77a5d9ac84a5db32f3ec9eb" - - bottle do - cellar :any_skip_relocation - sha256 "cd770017ec21cd829d97013812172c21dc6ce8b00426029a692f5dd5d82dc0fe" => :mojave - sha256 "c6cfcfc380c022f98a32a061268dca710f109600aa6d52c5b5e541855889ea14" => :high_sierra - sha256 "54eb5c88dc8c8d8fa43a16fa5439b2592f0fac57bf1eeb895b181de6b2d56f94" => :sierra - sha256 "7081e2d83fb8dee4d72fa203e0d6751eb70e1d38d64c5366f1f04cdd72fec90b" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - install_cabal_package - end - - test do - assert_match /time\s+[0-9.]+/, shell_output("#{bin}/bench pwd") - end -end diff --git a/Formula/bento4.rb b/Formula/bento4.rb deleted file mode 100644 index 3ca1903d86e75..0000000000000 --- a/Formula/bento4.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Bento4 < Formula - desc "Full-featured MP4 format and MPEG DASH library and tools" - homepage "https://www.bento4.com/" - url "https://github.com/axiomatic-systems/Bento4/archive/v1.5.1-624.tar.gz" - version "1.5.1-624" - sha256 "eda725298e77df83e51793508a3a2640eabdfda1abc8aa841eca69983de83a4c" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "c9300512cdb5392d0f714a4c5bb35842e7a560ad8772c75dbc4c31d60160ced4" => :mojave - sha256 "2936c7c89761533861eb2ce35d9745f4ff2b762a670430f6c6b9e8a5cb8f44c8" => :high_sierra - sha256 "698127156bc77e4e5efcea4a1693939aed88f507344a4b580a2ca13c930df8e3" => :sierra - end - - depends_on :xcode => :build - depends_on "python" - - conflicts_with "gpac", :because => "both install `mp42ts` binaries" - conflicts_with "mp4v2", - :because => "both install `mp4extract` and `mp4info` binaries" - - def install - cd "Build/Targets/universal-apple-macosx" do - xcodebuild "-target", "All", "-configuration", "Release", "SYMROOT=build" - programs = Dir["build/Release/*"].select do |f| - next if f.end_with? ".dylib" - next if f.end_with? "Test" - File.file?(f) && File.executable?(f) - end - bin.install programs - end - - rm Dir["Source/Python/wrappers/*.bat"] - inreplace Dir["Source/Python/wrappers/*"], - "BASEDIR=$(dirname $0)", "BASEDIR=#{libexec}/Python/wrappers" - libexec.install "Source/Python" - bin.install_symlink Dir[libexec/"Python/wrappers/*"] - end - - test do - system "#{bin}/mp4mux", "--track", test_fixtures("test.m4a"), "out.mp4" - assert_predicate testpath/"out.mp4", :exist?, "Failed to create out.mp4!" - end -end diff --git a/Formula/berkeley-db.rb b/Formula/berkeley-db.rb deleted file mode 100644 index 11240d4f4d8ad..0000000000000 --- a/Formula/berkeley-db.rb +++ /dev/null @@ -1,79 +0,0 @@ -class BerkeleyDb < Formula - desc "High performance key/value database" - homepage "https://www.oracle.com/technology/products/berkeley-db/index.html" - # Requires registration to download so we mirror it - url "https://dl.bintray.com/homebrew/mirror/berkeley-db-18.1.25.tar.gz" - sha256 "2ea8b8bc0611d9b4c2b9fee84a4a312dddfec007067af6e02ed46a26354181bb" - - bottle do - cellar :any - sha256 "033c836af359a4169a73b7778b837814d0df74fa514e5dd01efdc0b2272e830f" => :mojave - sha256 "b3ee1f3ef01f18bb4c958cac6b84b593718d9fb8e43cf480abd44dad2c6a1c8a" => :high_sierra - sha256 "95ffd72a00ed6faa8131b13482dd4592311410f8d4010934949b43b7a273c03e" => :sierra - sha256 "12b3dcf8c9549ee7a6afdafbc0ff7235fe069af06a28d26525e57b8f8ae37a61" => :el_capitan - end - - depends_on :java => [:optional, :build] - depends_on "openssl" - - def install - # BerkeleyDB dislikes parallel builds - ENV.deparallelize - # --enable-compat185 is necessary because our build shadows - # the system berkeley db 1.x - args = %W[ - --disable-debug - --prefix=#{prefix} - --mandir=#{man} - --enable-cxx - --enable-compat185 - --enable-sql - --enable-sql_codegen - --enable-dbm - --enable-stl - ] - args << "--enable-java" if build.with? "java" - - # BerkeleyDB requires you to build everything from the build_unix subdirectory - cd "build_unix" do - system "../dist/configure", *args - system "make", "install" - - # use the standard docs location - doc.parent.mkpath - mv prefix/"docs", doc - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main() { - Db db(NULL, 0); - assert(db.open(NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0) == 0); - - const char *project = "Homebrew"; - const char *stored_description = "The missing package manager for macOS"; - Dbt key(const_cast(project), strlen(project) + 1); - Dbt stored_data(const_cast(stored_description), strlen(stored_description) + 1); - assert(db.put(NULL, &key, &stored_data, DB_NOOVERWRITE) == 0); - - Dbt returned_data; - assert(db.get(NULL, &key, &returned_data, 0) == 0); - assert(strcmp(stored_description, (const char *)(returned_data.get_data())) == 0); - - assert(db.close(0) == 0); - } - EOS - flags = %W[ - -I#{include} - -L#{lib} - -ldb_cxx - ] - system ENV.cxx, "test.cpp", "-o", "test", *flags - system "./test" - assert_predicate testpath/"test.db", :exist? - end -end diff --git a/Formula/berkeley-db@4.rb b/Formula/berkeley-db@4.rb deleted file mode 100644 index 333a6c67f0146..0000000000000 --- a/Formula/berkeley-db@4.rb +++ /dev/null @@ -1,76 +0,0 @@ -class BerkeleyDbAT4 < Formula - desc "High performance key/value database" - homepage "https://www.oracle.com/technology/products/berkeley-db/index.html" - url "https://download.oracle.com/berkeley-db/db-4.8.30.tar.gz" - sha256 "e0491a07cdb21fb9aa82773bbbedaeb7639cbd0e7f96147ab46141e0045db72a" - - bottle do - cellar :any - rebuild 1 - sha256 "cb0243107a7db2e935f10533d1e9b34f12681861125e208463b240572b86507d" => :mojave - sha256 "03f1fc49446d69741f764d7e7388a6006fc5cdb2a0a710b1389b5b662b25e9b7" => :high_sierra - sha256 "93b2d7980cba62914bcce0a631a8f28212a17e2cfdce1f41db3d47ec3da37fde" => :sierra - end - - keg_only :versioned_formula - - # Fix build with recent clang - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/4c55b1/berkeley-db%404/clang.diff" - sha256 "86111b0965762f2c2611b302e4a95ac8df46ad24925bbb95a1961542a1542e40" - end - - def install - # BerkeleyDB dislikes parallel builds - ENV.deparallelize - - args = %W[ - --disable-debug - --prefix=#{prefix} - --mandir=#{man} - --enable-cxx - ] - - # BerkeleyDB requires you to build everything from the build_unix subdirectory - cd "build_unix" do - system "../dist/configure", *args - system "make", "install" - - # use the standard docs location - doc.parent.mkpath - mv prefix+"docs", doc - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main() { - Db db(NULL, 0); - assert(db.open(NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0) == 0); - - const char *project = "Homebrew"; - const char *stored_description = "The missing package manager for macOS"; - Dbt key(const_cast(project), strlen(project) + 1); - Dbt stored_data(const_cast(stored_description), strlen(stored_description) + 1); - assert(db.put(NULL, &key, &stored_data, DB_NOOVERWRITE) == 0); - - Dbt returned_data; - assert(db.get(NULL, &key, &returned_data, 0) == 0); - assert(strcmp(stored_description, (const char *)(returned_data.get_data())) == 0); - - assert(db.close(0) == 0); - } - EOS - flags = %W[ - -I#{include} - -L#{lib} - -ldb_cxx - ] - system ENV.cxx, "test.cpp", "-o", "test", *flags - system "./test" - assert_predicate testpath/"test.db", :exist? - end -end diff --git a/Formula/bettercap.rb b/Formula/bettercap.rb deleted file mode 100644 index b384fbcf7d8af..0000000000000 --- a/Formula/bettercap.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Bettercap < Formula - desc "Swiss army knife for network attacks and monitoring" - homepage "https://www.bettercap.org/" - url "https://github.com/bettercap/bettercap/archive/v2.11.tar.gz" - sha256 "4684008ede40ec1673a8371ec6dce5484732d5d459ed308e9c882975b7996904" - - bottle do - cellar :any_skip_relocation - sha256 "772c089bf5a99dba535e368a69a0ec4d738d786282bf52b180036f02c28699b9" => :mojave - sha256 "b42f39865281f48c282522e4add060419b1a2793bcff29e11808ca5b66ee2de1" => :high_sierra - sha256 "a96df7cb136db3415d16e2402d53a005f52982a2cfdc7c7d581a06e097e7c0a9" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/bettercap/bettercap").install buildpath.children - - cd "src/github.com/bettercap/bettercap" do - system "dep", "ensure", "-vendor-only" - system "make", "build" - bin.install "bettercap" - prefix.install_metafiles - end - end - - def caveats; <<~EOS - bettercap requires root privileges so you will need to run `sudo bettercap`. - You should be certain that you trust any software you grant root privileges. - EOS - end - - test do - assert_match "bettercap", shell_output("#{bin}/bettercap -help 2>&1", 2) - end -end diff --git a/Formula/betty.rb b/Formula/betty.rb deleted file mode 100644 index c8acad3383be3..0000000000000 --- a/Formula/betty.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Betty < Formula - desc "English-like interface for the command-line" - homepage "https://github.com/pickhardt/betty" - url "https://github.com/pickhardt/betty/archive/v0.1.7.tar.gz" - sha256 "ed71e88a659725e0c475888df044c9de3ab1474ff483f0a3bb432949035e62d3" - revision 1 - - bottle :unneeded - - depends_on "ruby" if MacOS.version <= :mountain_lion - - def install - libexec.install "lib", "main.rb" => "betty" - bin.write_exec_script libexec/"betty" - end - - test do - system bin/"betty", "what is your name" - system bin/"betty", "version" - end -end diff --git a/Formula/bfg.rb b/Formula/bfg.rb deleted file mode 100644 index baf5cb5365382..0000000000000 --- a/Formula/bfg.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Bfg < Formula - desc "Remove large files or passwords from Git history like git-filter-branch" - homepage "https://rtyley.github.io/bfg-repo-cleaner/" - url "https://search.maven.org/remotecontent?filepath=com/madgag/bfg/1.13.0/bfg-1.13.0.jar" - sha256 "bf22bab9dd42d4682b490d6bc366afdad6c3da99f97521032d3be8ba7526c8ce" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install "bfg-#{version}.jar" - bin.write_jar_script libexec/"bfg-#{version}.jar", "bfg" - end - - test do - system "#{bin}/bfg" - end -end diff --git a/Formula/bgpdump.rb b/Formula/bgpdump.rb deleted file mode 100644 index 6d658ad226a67..0000000000000 --- a/Formula/bgpdump.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Bgpdump < Formula - desc "C library for analyzing MRT/Zebra/Quagga dump files" - homepage "https://bitbucket.org/ripencc/bgpdump/wiki/Home" - url "https://bitbucket.org/ripencc/bgpdump/get/1.6.0.tar.gz" - sha256 "0a9f97ac79b6f093a54e39a6b952bd8fec7ca4d7352abf2509c464fdbdb2a79b" - - bottle do - cellar :any - sha256 "be587d92cf5ad81323a5054da8a9010c4ddf6740370c7158a3abd3a832475f02" => :mojave - sha256 "fb3bbc75887e67758164e3ce55f6a4061442f195538349b0be86e17745134aaa" => :high_sierra - sha256 "151caa6be8e75f495e3776d448364b096ba67c537a46264664e89b468eca7705" => :sierra - end - - depends_on "autoconf" => :build - - def install - system "./bootstrap.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/bgpdump", "-T" - end -end diff --git a/Formula/bgpq3.rb b/Formula/bgpq3.rb deleted file mode 100644 index 5a169a281273a..0000000000000 --- a/Formula/bgpq3.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Bgpq3 < Formula - desc "BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers" - homepage "http://snar.spb.ru/prog/bgpq3/" - url "https://github.com/snar/bgpq3/archive/v0.1.35.tar.gz" - sha256 "571b99dc4186618ad3c77317eef2c20a8e601ce665a6b0f1ffca6e3d8d804cde" - head "https://github.com/snar/bgpq3.git" - - bottle do - cellar :any_skip_relocation - sha256 "a16c482aa8e1a821d6747b2871174109ccbcf407e5799794f6307303fcffafcb" => :mojave - sha256 "2bf730bec0bca51bd9a3db7a3cd5e4bf36199717a8190db270a5f4751bb1a5e1" => :high_sierra - sha256 "052fb1ae9a1546b13f865b25f4ff5879f4a7c77350d14720442fc6cd898d833d" => :sierra - end - - # Makefile: upstream has been informed of the patch through email (multiple - # times) but no plans yet to incorporate it https://github.com/snar/bgpq3/pull/2 - # there was discussion about this patch for 0.1.18 and 0.1.19 as well - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/bgpq3", "AS-ANY" - end -end - -__END__ -diff --git a/Makefile.in b/Makefile.in -index c2d7e96..afec780 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -29,9 +29,10 @@ clean: - rm -rf *.o *.core core.* core - - install: bgpq3 -+ if test ! -d @prefix@/bin ; then mkdir -p @prefix@/bin ; fi - ${INSTALL} -c -s -m 755 bgpq3 @bindir@ -- if test ! -d @prefix@/man/man8 ; then mkdir -p @prefix@/man/man8 ; fi -- ${INSTALL} -m 644 bgpq3.8 @prefix@/man/man8 -+ if test ! -d @mandir@/man8 ; then mkdir -p @mandir@/man8 ; fi -+ ${INSTALL} -m 644 bgpq3.8 @mandir@/man8 - - depend: - makedepend -- $(CFLAGS) -- $(SRCS) diff --git a/Formula/bgpstream.rb b/Formula/bgpstream.rb deleted file mode 100644 index 02d2a5bf3ec1e..0000000000000 --- a/Formula/bgpstream.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Bgpstream < Formula - desc "For live and historical BGP data analysis" - homepage "https://bgpstream.caida.org/" - url "https://bgpstream.caida.org/bundles/caidabgpstreamwebhomepage/dists/bgpstream-1.1.0.tar.gz" - sha256 "b89cef45bcc5ae4011aa3c42f689ae9fd7b5c8fd25e06ab18589577b5e077f89" - revision 1 - - bottle do - cellar :any - sha256 "5de3479fc0a9c0d4e97c852584ac29f0b0df86302dba981c1120a6b94bdbe58b" => :mojave - sha256 "f6db5e754c3c44b70aa1f2af5436fce55ec8046d70d51fcce8f6f2f7e4bfa4a8" => :high_sierra - sha256 "56f712d3a9f3540b0056c9496c9a038b195eddcde7656cf8599d3a450858f12f" => :sierra - sha256 "28b012b8368630b46e02d0d94c9099e06db88022f02ce0bee6596fdd21755649" => :el_capitan - end - - depends_on "wandio" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "bgpstream.h" - int main() - { - bgpstream_t *bs = bs = bgpstream_create(); - if(!bs) { - return -1; - } - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lbgpstream", "-o", "test" - system "./test" - end -end diff --git a/Formula/bgrep.rb b/Formula/bgrep.rb deleted file mode 100644 index a1867a56a37b3..0000000000000 --- a/Formula/bgrep.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Bgrep < Formula - desc "Like grep but for binary strings" - homepage "https://github.com/tmbinc/bgrep" - url "https://github.com/tmbinc/bgrep/archive/bgrep-0.2.tar.gz" - sha256 "24c02393fb436d7a2eb02c6042ec140f9502667500b13a59795388c1af91f9ba" - head "https://github.com/tmbinc/bgrep.git" - - bottle do - cellar :any_skip_relocation - sha256 "8a3633a884feda24b875005550fddbd613987c89edc9418dd23783b4c2f7e8af" => :mojave - sha256 "c2357ea00756425fec65d8367e7b8653a4d6845b6aa044106b8952d8b8ead0ca" => :high_sierra - sha256 "eaed7c05fd07c77cd5aeb6f1232abcf5c9678b86fdaf7e7daf5049476acc690c" => :sierra - sha256 "29f0b2d7ab307eae228a03d4f42f677d9ff0884edc5c96771da36182cb592cd2" => :el_capitan - sha256 "af4dab94130c48930d064074da8492c5531842a348747b0dd39420db738f6ae9" => :yosemite - sha256 "b166d637dda09833c3b2c3396670347b087fef6366576303f87fb704b1d3eede" => :mavericks - end - - def install - system ENV.cc, ENV.cflags, "-o", "bgrep", "bgrep.c" - bin.install "bgrep" - end - - test do - path = testpath/"hi.prg" - path.binwrite [0x00, 0xc0, 0xa9, 0x48, 0x20, 0xd2, 0xff, - 0xa9, 0x49, 0x20, 0xd2, 0xff, 0x60].pack("C*") - - assert_equal "#{path}: 00000004\n#{path}: 00000009\n", - shell_output("#{bin}/bgrep 20d2ff #{path}") - end -end diff --git a/Formula/bib-tool.rb b/Formula/bib-tool.rb deleted file mode 100644 index 830c985d80b62..0000000000000 --- a/Formula/bib-tool.rb +++ /dev/null @@ -1,34 +0,0 @@ -class BibTool < Formula - desc "Manipulates BibTeX databases" - homepage "http://www.gerd-neugebauer.de/software/TeX/BibTool/en/" - url "https://github.com/ge-ne/bibtool/releases/download/BibTool_2_67/BibTool-2.67.tar.gz" - sha256 "5b6c4160975a926356e8e59d0e5c01ac2a7be337ecace2494918fc2a46d9d784" - - bottle do - sha256 "029ff0d913560a01dd20fa05f788feb8189660d7099be656c52ce829b89d9749" => :mojave - sha256 "dfd0882e8a92f9d883d838261ced3085f843b6faa439df00fa8988fc719c6946" => :high_sierra - sha256 "9611f8ab9db1f0ae2918bf22d3169a80eeacd0a4e457437b4b131c36e7687d41" => :sierra - sha256 "5f7813e70bfaa668da0b3f438237e0fef7628808c3b5cc56c26012e2cf54f09d" => :el_capitan - sha256 "39956f91c1332b2518841436655eeb828dd7562683e5bc1f55bc7a5e7c308c80" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}", "--without-kpathsea" - system "make" - system "make", "install" - end - - test do - (testpath/"test.bib").write <<~EOS - @article{Homebrew, - title = {Something}, - author = {Someone}, - journal = {Something}, - volume = {1}, - number = {2}, - pages = {3--4} - } - EOS - system "#{bin}/bibtool", "test.bib" - end -end diff --git a/Formula/bibclean.rb b/Formula/bibclean.rb deleted file mode 100644 index 5efa58ec0cc77..0000000000000 --- a/Formula/bibclean.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Bibclean < Formula - desc "BibTeX bibliography file pretty printer and syntax checker" - homepage "https://www.math.utah.edu/~beebe/software/bibclean/bibclean-03.html#HDR.3" - url "http://ftp.math.utah.edu/pub/bibclean/bibclean-2.17.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/bibclean-2.17.tar.gz" - sha256 "d79b191fda9658fa83cb43f638321ae98b4acec5bef23a029ef2fd695639ff24" - - bottle do - cellar :any_skip_relocation - sha256 "08446fff8a8c9f0b58238290cab9f14d06131db299df35702fece9804cbfedbe" => :mojave - sha256 "0716be98bca14351bf4f0ca3da343e6a79bb945a34929eadf7742824342f48ff" => :high_sierra - sha256 "addcead999d4c3ec3e5112c227512e200681e4775b163bfc24f2bff71ac15f77" => :sierra - sha256 "1e09e98ec9528bbe6386fc12274bf56fcdc69ddccdef119b0dd3381cebefc8c0" => :el_capitan - sha256 "6cba0c4e4d59324ed70a64718c6541dddba994c8cc509db1d7914a1e7f584dcb" => :yosemite - sha256 "8e72af36765c47807c07faec8d56d811e0b2cd2ca511adbefad95fbd65aa72cd" => :mavericks - end - - def install - ENV.deparallelize - - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}" - - # The following inline patches have been reported upstream. - inreplace "Makefile" do |s| - # Insert `mkdir` statements before `scp` statements because `scp` in macOS - # requires that the full path to the target already exist. - s.gsub! /[$][(]CP.*BIBCLEAN.*bindir.*BIBCLEAN[)]/, - "mkdir -p $(bindir) && $(CP) $(BIBCLEAN) $(bindir)/$(BIBCLEAN)" - s.gsub! /[$][(]CP.*bibclean.*mandir.*bibclean.*manext[)]/, - "mkdir -p $(mandir) && $(CP) bibclean.man $(mandir)/bibclean.$(manext)" - - # Correct `mandir` (man file path) in the Makefile. - s.gsub! /mandir.*prefix.*man.*man1/, "mandir = $(prefix)/share/man/man1" - - # Place all initialization files in $(prefix)/bibclean/share/ instead of - # ./bin/ to comply with standard Unix practice. - s.gsub! /install-ini.*uninstall-ini/, - "install-ini: uninstall-ini\n\tmkdir -p #{pkgshare}" - s.gsub! /[$][(]bindir[)].*bibcleanrc/, - "#{pkgshare}/.bibcleanrc" - s.gsub! /[$][(]bindir[)].*bibclean.key/, - "#{pkgshare}/.bibclean.key" - s.gsub! /[$][(]bindir[)].*bibclean.isbn/, - "#{pkgshare}/.bibclean.isbn" - end - - system "make", "all" - system "make", "check" - system "make", "install" - - ENV.prepend_path "PATH", pkgshare - bin.env_script_all_files(pkgshare, :PATH => ENV["PATH"]) - end - - test do - (testpath/"test.bib").write <<~EOS - @article{small, - author = {Test, T.}, - title = {Test}, - journal = {Test}, - year = 2014, - note = {test}, - } - EOS - - system "#{bin}/bibclean", "test.bib" - end -end diff --git a/Formula/bibtex2html.rb b/Formula/bibtex2html.rb deleted file mode 100644 index de90133b7bf68..0000000000000 --- a/Formula/bibtex2html.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Bibtex2html < Formula - desc "BibTeX to HTML converter" - homepage "https://www.lri.fr/~filliatr/bibtex2html/" - url "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz" - sha256 "d224dadd97f50199a358794e659596a3b3c38c7dc23e86885d7b664789ceff1d" - - bottle do - cellar :any_skip_relocation - sha256 "02401e21b763004e1297cc2b32c96a6dbf2fbc7a35859ec815d23b778c3b0014" => :mojave - sha256 "145c0eb8c54ea55a3fc9cbfc3cb034791890dc68d1ed267e315fee17300c718a" => :high_sierra - sha256 "2ac5800e2e29a1471d5ea6ccf3dff76201559f2e2e6471e536e25ec162cd79c3" => :sierra - sha256 "ba8aa5695eed41c522c20396b8509add1c0a45abead9e32a079e6c4a22507602" => :el_capitan - end - - depends_on "hevea" - depends_on "ocaml" - - def install - ENV["OCAMLPARAM"] = "safe-string=0,_" # OCaml 4.06.0 compat - - # See: https://trac.macports.org/ticket/26724 - inreplace "Makefile.in" do |s| - s.remove_make_var! "STRLIB" - end - - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.bib").write <<~EOS - @article{Homebrew, - title = {Something}, - author = {Someone}, - journal = {Something}, - volume = {1}, - number = {2}, - pages = {3--4} - } - EOS - system "#{bin}/bib2bib", "test.bib", "--remove", "pages", "-ob", "out.bib" - assert /pages\s*=\s*{3--4}/ !~ File.read("out.bib") - assert_match /pages\s*=\s*{3--4}/, File.read("test.bib") - end -end diff --git a/Formula/bibtexconv.rb b/Formula/bibtexconv.rb deleted file mode 100644 index 43d88b90e4556..0000000000000 --- a/Formula/bibtexconv.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Bibtexconv < Formula - desc "BibTeX file converter" - homepage "https://www.uni-due.de/~be0001/bibtexconv/" - url "https://www.uni-due.de/~be0001/bibtexconv/download/bibtexconv-1.1.12.tar.gz" - sha256 "dce954b9e81b31f9b2aaaac4a4b1e528d7cc901376be095b40ba44525db3fd76" - head "https://github.com/dreibh/bibtexconv.git" - - bottle do - cellar :any - sha256 "ed2cf1c4018b8605632c7d771da2eee7212ec1267d459fe77e1b1fd27ecafeaf" => :mojave - sha256 "ff0392f367020e150acc25eb36a5020ae78f43c97450ff144654d1c55da362c5" => :high_sierra - sha256 "22bef646b19754ee426d9e98158f1bbd7e18b59f674abc0c1c6f7c4012511122" => :sierra - sha256 "824b5ec5e79e9624510c834aa0ce76de90c3bb63100c4e995927fa4b06905706" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "openssl" - - def install - system "cmake", *std_cmake_args, - "-DCRYPTO_LIBRARY=#{Formula["openssl"].opt_lib}/libcrypto.dylib" - system "make", "install" - end - - test do - cp "#{opt_share}/doc/bibtexconv/examples/ExampleReferences.bib", testpath - - system bin/"bibtexconv", "#{testpath}/ExampleReferences.bib", - "-export-to-bibtex=UpdatedReferences.bib", - "-check-urls", "-only-check-new-urls", - "-non-interactive" - end -end diff --git a/Formula/bibutils.rb b/Formula/bibutils.rb deleted file mode 100644 index 83fd5c8e7edd4..0000000000000 --- a/Formula/bibutils.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Bibutils < Formula - desc "Bibliography conversion utilities" - homepage "https://sourceforge.net/p/bibutils/home/Bibutils/" - url "https://downloads.sourceforge.net/project/bibutils/bibutils_6.7_src.tgz" - sha256 "02a12b86ae5f1c4991d625aa4d982418bdfb4a8b5855ce1c0dd38a6436ac4c1c" - - bottle do - cellar :any_skip_relocation - sha256 "77c7e24e44776095769e2103d7bc37ebbd314e91c6c86a9a4e24ad42f15b16dd" => :mojave - sha256 "cf925ae310688ae93b2f93a4bb23deb16f06fa8f28f20b67aee17162eaa484c1" => :high_sierra - sha256 "97a7c39fa603ac3ebdbde752b0b34d55bc724df248c8ecc8293e9cf47a791823" => :sierra - sha256 "b0c558be47dbda2db57b3f13dcf830c37efcef97a5af1899aa3910027c9cdbed" => :el_capitan - end - - def install - system "./configure", "--install-dir", bin, - "--install-lib", lib - system "make", "install", "CC=#{ENV.cc}" - end - - test do - (testpath/"test.bib").write <<~EOS - @article{Homebrew, - title = {Something}, - author = {Someone}, - journal = {Something}, - volume = {1}, - number = {2}, - pages = {3--4} - } - EOS - - system "#{bin}/bib2xml", "test.bib" - end -end diff --git a/Formula/bigloo.rb b/Formula/bigloo.rb deleted file mode 100644 index 4b0497d0da5a7..0000000000000 --- a/Formula/bigloo.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Bigloo < Formula - desc "Scheme implementation with object system, C, and Java interfaces" - homepage "https://www-sop.inria.fr/indes/fp/Bigloo/" - url "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo4.3c.tar.gz" - version "4.3c" - sha256 "1f9557fccf9c17a83fcef458384f2fd748b42777aefa8370cd657ed33b7ccef2" - - bottle do - sha256 "5280c1fda3fee7c25845f8e14294884fb1b4963ff8e016baba77990d2465aafd" => :mojave - sha256 "fac0529651e08dd5ceff5d4a45babb7f86b196753de53fa2487a12f502f5e91e" => :high_sierra - sha256 "f3db359b927e3ac6175aac63ca06515738358d9509a137adf4cf8dbbc4ead0ce" => :sierra - end - - option "with-jvm", "Enable JVM support" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - depends_on "openssl" - depends_on "gmp" => :recommended - - fails_with :clang do - build 500 - cause <<~EOS - objs/obj_u/Ieee/dtoa.c:262:79504: fatal error: parser - recursion limit reached, program too complex - EOS - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man1} - --infodir=#{info} - --customgc=yes - --os-macosx - --native=yes - --disable-alsa - --disable-mpg123 - --disable-flac - --disable-srfi27 - ] - - args << "--jvm=yes" if build.with? "jvm" - args << "--no-gmp" if build.without? "gmp" - - system "./configure", *args - - # bigloo seems to either miss installing these dependencies, or maybe - # do it out of order with where they're used. - cd "libunistring" do - system "make", "install" - end - cd "pcre" do - system "make", "install" - end - - system "make" - system "make", "install" - - # Install the other manpages too - manpages = %w[bgldepend bglmake bglpp bgltags bglafile bgljfile bglmco bglprof] - manpages.each { |m| man1.install "manuals/#{m}.man" => "#{m}.1" } - end - - test do - program = <<~EOS - (display "Hello World!") - (newline) - (exit) - EOS - assert_match "Hello World!\n", pipe_output("#{bin}/bigloo -i -", program) - end -end diff --git a/Formula/binaryen.rb b/Formula/binaryen.rb deleted file mode 100644 index 64aaefb4a589c..0000000000000 --- a/Formula/binaryen.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Binaryen < Formula - desc "Compiler infrastructure and toolchain library for WebAssembly" - homepage "https://webassembly.org/" - url "https://github.com/WebAssembly/binaryen/archive/version_63.tar.gz" - sha256 "2bc3e9544c89a6a6559343fe6d73bb80f01f42721fb333668a9441b0f20a0a32" - head "https://github.com/WebAssembly/binaryen.git" - - bottle do - cellar :any - sha256 "a0e9f458477d5029bf72306f3c3fcf567583aba651bcc207637fd8327e53392e" => :mojave - sha256 "b861ef96d5db1cb753adb84b03d034b5632ebd2e375d9a19caff2c900133dd8a" => :high_sierra - sha256 "719fba82f58f5d48735584a12d1ee1c895a81e091a4a38b785e126f78fa5c2bb" => :sierra - end - - depends_on "cmake" => :build - depends_on :macos => :el_capitan # needs thread-local storage - - needs :cxx11 - - def install - ENV.cxx11 - - system "cmake", ".", *std_cmake_args - system "make", "install" - - pkgshare.install "test/" - end - - test do - system "#{bin}/wasm-opt", "#{pkgshare}/test/passes/O.wast" - system "#{bin}/asm2wasm", "#{pkgshare}/test/hello_world.asm.js" - end -end diff --git a/Formula/bind.rb b/Formula/bind.rb deleted file mode 100644 index fdf84fc359db8..0000000000000 --- a/Formula/bind.rb +++ /dev/null @@ -1,175 +0,0 @@ -class Bind < Formula - desc "Implementation of the DNS protocols" - homepage "https://www.isc.org/downloads/bind/" - url "https://ftp.isc.org/isc/bind9/9.12.3-P1/bind-9.12.3-P1.tar.gz" - version "9.12.3-P1" - sha256 "6cb79389d787368af27f01c65a9fa09be1fd062eda37c94819a1a0178d5ded73" - head "https://gitlab.isc.org/isc-projects/bind9.git" - - bottle do - sha256 "ac2ef54c475b05a9bcef553ff787260dd45b19111f67e92438f11f2c75b2bc56" => :mojave - sha256 "3f7376faca8e9e09b06e6eaf0758fae56474849d983c9bbf9c4a65b7cab1827e" => :high_sierra - sha256 "669c75f4ff17882d115d33f252dae41f73e9a535c7c16c40357da97a63eb03b0" => :sierra - end - - depends_on "json-c" - depends_on "openssl" - - def install - # Fix "configure: error: xml2-config returns badness" - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - # enable DNSSEC signature chasing in dig - ENV["STD_CDEFINES"] = "-DDIG_SIGCHASE=1" - - system "./configure", "--prefix=#{prefix}", - "--enable-threads", - "--enable-ipv6", - "--with-openssl=#{Formula["openssl"].opt_prefix}", - "--with-libjson=#{Formula["json-c"].opt_prefix}" - - # From the bind9 README: "Do not use a parallel "make" - ENV.deparallelize - system "make" - system "make", "install" - - (buildpath/"named.conf").write named_conf - system "#{sbin}/rndc-confgen", "-a", "-c", "#{buildpath}/rndc.key" - etc.install "named.conf", "rndc.key" - end - - def post_install - (var/"log/named").mkpath - - # Create initial configuration/zone/ca files. - # (Mirrors Apple system install from 10.8) - unless (var/"named").exist? - (var/"named").mkpath - (var/"named/localhost.zone").write localhost_zone - (var/"named/named.local").write named_local - end - end - - def named_conf; <<~EOS - // - // Include keys file - // - include "#{etc}/rndc.key"; - - // Declares control channels to be used by the rndc utility. - // - // It is recommended that 127.0.0.1 be the only address used. - // This also allows non-privileged users on the local host to manage - // your name server. - - // - // Default controls - // - controls { - inet 127.0.0.1 port 54 allow { any; } - keys { "rndc-key"; }; - }; - - options { - directory "#{var}/named"; - /* - * If there is a firewall between you and nameservers you want - * to talk to, you might need to uncomment the query-source - * directive below. Previous versions of BIND always asked - * questions using port 53, but BIND 8.1 uses an unprivileged - * port by default. - */ - // query-source address * port 53; - }; - // - // a caching only nameserver config - // - zone "localhost" IN { - type master; - file "localhost.zone"; - allow-update { none; }; - }; - - zone "0.0.127.in-addr.arpa" IN { - type master; - file "named.local"; - allow-update { none; }; - }; - - logging { - category default { - _default_log; - }; - - channel _default_log { - file "#{var}/log/named/named.log"; - severity info; - print-time yes; - }; - }; - EOS - end - - def localhost_zone; <<~EOS - $TTL 86400 - $ORIGIN localhost. - @ 1D IN SOA @ root ( - 42 ; serial (d. adams) - 3H ; refresh - 15M ; retry - 1W ; expiry - 1D ) ; minimum - - 1D IN NS @ - 1D IN A 127.0.0.1 - EOS - end - - def named_local; <<~EOS - $TTL 86400 - @ IN SOA localhost. root.localhost. ( - 1997022700 ; Serial - 28800 ; Refresh - 14400 ; Retry - 3600000 ; Expire - 86400 ) ; Minimum - IN NS localhost. - - 1 IN PTR localhost. - EOS - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - EnableTransactions - - Label - #{plist_name} - RunAtLoad - - ProgramArguments - - #{opt_sbin}/named - -f - -c - #{etc}/named.conf - - ServiceIPC - - - - EOS - end - - test do - system bin/"dig", "-v" - system bin/"dig", "brew.sh" - end -end diff --git a/Formula/bindfs.rb b/Formula/bindfs.rb deleted file mode 100644 index a91d0951cdad1..0000000000000 --- a/Formula/bindfs.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Bindfs < Formula - desc "FUSE file system for mounting to another location" - homepage "https://bindfs.org/" - url "https://bindfs.org/downloads/bindfs-1.13.9.tar.gz" - sha256 "acfa2ca9d604f4147c42758ccbb4a429855df26768dfe70521ba5d7a0596f8b5" - - bottle do - cellar :any - sha256 "9fa87b94c367fcd69ac713eb058269eaafde50ada3e32b2a910087b769f31932" => :mojave - sha256 "7af619973ac822cd21215f60f29b8468f61b6104158830e172be8231e773b05c" => :high_sierra - sha256 "89f82a2b44e1b8861c917e9f5a3479edc0136ba20a48fe5e1b7597514219b5e5" => :sierra - sha256 "be32d6c5fd45382418c52c28ee9722486d71b23cb8dffa42ecf1179442518c0f" => :el_capitan - end - - head do - url "https://github.com/mpartel/bindfs.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on :osxfuse - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - ] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - - system "make", "install" - end - - test do - system "#{bin}/bindfs", "-V" - end -end diff --git a/Formula/binkd.rb b/Formula/binkd.rb deleted file mode 100644 index 6de864bc4f9c5..0000000000000 --- a/Formula/binkd.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Binkd < Formula - desc "TCP/IP FTN Mailer" - homepage "http://binkd.grumbler.org/" - url "https://happy.kiev.ua/pub/fidosoft/mailer/binkd/binkd-1.0.4.tar.gz" - sha256 "917e45c379bbd1a140d1fe43179a591f1b2ec4004b236d6e0c4680be8f1a0dc0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1582b44b77979d7258c51baec8bb54f367fc21f8cc03838c9c1b1351ea9f77e7" => :mojave - sha256 "e890bed8ae5c89dfabd589e2c9654b2c8da6811bd24fbfd99aa4fc520a535e26" => :high_sierra - sha256 "d685be9cb23ecb98dc34c2ea185c47ec39e54db1a8ca88782d11cbd96c78862a" => :sierra - sha256 "d69c67a3cb68789a0a96196b5d2d92e44e6dd9bab3eb870ec9727987ae538c35" => :el_capitan - sha256 "e56862a339a1de58072d3ffb23981bff13a1eb69322c5e12e47949c171d5ceff" => :yosemite - sha256 "55690b37076bc21a7764f85ff97957bc0403b4b45ed6b12585c800d72785bfdb" => :mavericks - end - - def install - cp Dir["mkfls/unix/*"].select { |f| File.file? f }, "." - inreplace "binkd.conf", "/var/", "#{var}/" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{sbin}/binkd", "-v" - end -end diff --git a/Formula/binutils.rb b/Formula/binutils.rb deleted file mode 100644 index 020af51ea05f7..0000000000000 --- a/Formula/binutils.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Binutils < Formula - desc "FSF/GNU ld, ar, readelf, etc. for native development" - homepage "https://www.gnu.org/software/binutils/binutils.html" - url "https://ftp.gnu.org/gnu/binutils/binutils-2.31.1.tar.gz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.31.1.tar.gz" - sha256 "e88f8d36bd0a75d3765a4ad088d819e35f8d7ac6288049780e2fefcad18dde88" - revision 2 - - bottle do - sha256 "dbe26381158b6fe4c597761babd3e3057353f59fa1b20cd73842f651d02f37da" => :mojave - sha256 "fe41922c19581745c04cec1d4d91332111a18c5a160852478d301f6735753a2a" => :high_sierra - sha256 "983abea2ac000ceb1deb4a87088ffbada2f6047d904aa16c9ad2e56f3a363516" => :sierra - end - - keg_only :provided_by_macos, - "because Apple provides the same tools and binutils is poorly supported on macOS" - - # Adds support for macOS 10.14's new load commands. - # Will be in the next release. - # https://github.com/Homebrew/homebrew-core/issues/32516 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/91dc37fa4609cf1d040b5ede9f2eb971f3730597/binutils/add_mach_o_command.patch" - sha256 "abb053663a56c5caef35685ee60badf57e321b18f308e7cbd11626b48c876e8c" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--enable-deterministic-archives", - "--prefix=#{prefix}", - "--infodir=#{info}", - "--mandir=#{man}", - "--disable-werror", - "--enable-interwork", - "--enable-multilib", - "--enable-64-bit-bfd", - "--enable-targets=all" - system "make" - system "make", "install" - Dir["#{bin}/*"].each do |f| - bin.install_symlink f => "g" + File.basename(f) - end - end - - test do - assert_match "Usage:", shell_output("#{bin}/strings #{bin}/strings") - end -end diff --git a/Formula/binwalk.rb b/Formula/binwalk.rb deleted file mode 100644 index 2a68249b94d9b..0000000000000 --- a/Formula/binwalk.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Binwalk < Formula - desc "Searches a binary image for embedded files and executable code" - homepage "https://github.com/ReFirmLabs/binwalk" - url "https://github.com/ReFirmLabs/binwalk/archive/v2.1.1.tar.gz" - sha256 "1b70a5b03489d29f60fef18008a2164974234874faab48a4f47ec53d461d284a" - revision 6 - head "https://github.com/ReFirmLabs/binwalk.git" - - bottle do - sha256 "17b4cc76bf3e112f76d41bef4e87fba61fffc978f62e252a17f609a3fe9c006f" => :mojave - sha256 "d9456458ea694cc82774c881b5b0cd7779c512ca995a2e57b2f72829d75f33e3" => :high_sierra - sha256 "2eedae96bc9295d3729cf897967be3408d4496a86a4e11173bc64d220382e946" => :sierra - end - - depends_on "swig" => :build - depends_on "gcc" # for gfortran - depends_on "p7zip" - depends_on "python" - depends_on "ssdeep" - depends_on "xz" - - resource "numpy" do - url "https://files.pythonhosted.org/packages/45/ba/2a781ebbb0cd7962cc1d12a6b65bd4eff57ffda449fdbbae4726dc05fbc3/numpy-1.15.2.zip" - sha256 "27a0d018f608a3fe34ac5e2b876f4c23c47e38295c47dd0775cc294cd2614bc1" - end - - resource "scipy" do - url "https://files.pythonhosted.org/packages/07/76/7e844757b9f3bf5ab9f951ccd3e4a8eed91ab8720b0aac8c2adcc2fdae9f/scipy-1.1.0.tar.gz" - sha256 "878352408424dffaa695ffedf2f9f92844e116686923ed9aa8626fc30d32cfd1" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - %w[numpy scipy].each do |r| - resource(r).stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - touch "binwalk.test" - system "#{bin}/binwalk", "binwalk.test" - end -end diff --git a/Formula/bioawk.rb b/Formula/bioawk.rb deleted file mode 100644 index f4f072d7161b1..0000000000000 --- a/Formula/bioawk.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Bioawk < Formula - desc "AWK modified for biological data" - homepage "https://github.com/lh3/bioawk" - url "https://github.com/lh3/bioawk/archive/v1.0.tar.gz" - sha256 "5cbef3f39b085daba45510ff450afcf943cfdfdd483a546c8a509d3075ff51b5" - - bottle do - cellar :any_skip_relocation - sha256 "7082d4073e07ba3dfa849f95eb126d966a45f9fceb1d197595119a216e465727" => :mojave - sha256 "023f5cafaa31404e68b8fc6bcfbeee27e63eb5fbcab897d2f406fceda90ec9ff" => :high_sierra - sha256 "154d44dd9ea56db8170127711e991950d487e379ae12df76332e4b7512f79fe8" => :sierra - sha256 "df0810bc087f924cdddcdb73f00faf9772de9475e0e698c7af8a7d036b3a4c91" => :el_capitan - end - - def install - # Fix make: *** No rule to make target `ytab.h', needed by `b.o'. - ENV.deparallelize - - system "make" - bin.install "bioawk" - man1.install "awk.1" => "bioawk.1" - end - - test do - (testpath/"test.fasta").write <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT - CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - cmd = "#{bin}/bioawk -cfastx '{print length($seq)}' test.fasta" - assert_equal "70", shell_output(cmd).chomp - end -end diff --git a/Formula/biogeme.rb b/Formula/biogeme.rb deleted file mode 100644 index 440937cdccd4c..0000000000000 --- a/Formula/biogeme.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Biogeme < Formula - desc "Maximum likelihood estimation of choice models" - homepage "https://biogeme.epfl.ch/" - url "https://biogeme.epfl.ch/distrib/biogeme-2.6a.tar.gz" - sha256 "f6de0ea12f83ed183f31a41b9a56d1ec7226d2305549fb89ea7b1de8273ede49" - revision 4 - - bottle do - cellar :any - sha256 "058c5338d43d7a1b8a174583c6ab6dfe91fff41f476a6bd1a7561ec7758416db" => :mojave - sha256 "9e0f2c7228e239a0476147fb818ba1bb635443ee6f4d776fe7879dfa2faa5936" => :high_sierra - sha256 "aa71ee8900b00619fe1ac171c0196b3a4f56c4e1c1d7cecfd2230b7e289bf141" => :sierra - sha256 "cceacdb78b3866310b0dbe2cf59148ab9b0d2c398f2f5f13bea6a218ef69cc46" => :el_capitan - end - - depends_on "gtkmm3" - depends_on "python" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"minimal.py").write <<~EOS - from biogeme import * - rowIterator('obsIter') - BIOGEME_OBJECT.SIMULATE = Enumerate({'Test':1},'obsIter') - EOS - (testpath/"minimal.dat").write <<~EOS - TEST - 1 - EOS - system bin/"pythonbiogeme", "minimal", "minimal.dat" - end -end diff --git a/Formula/bison.rb b/Formula/bison.rb deleted file mode 100644 index eae62abf098a3..0000000000000 --- a/Formula/bison.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Bison < Formula - desc "Parser generator" - homepage "https://www.gnu.org/software/bison/" - url "https://ftp.gnu.org/gnu/bison/bison-3.2.4.tar.gz" - mirror "https://ftpmirror.gnu.org/bison/bison-3.2.4.tar.gz" - sha256 "cb673e2298d34b5e46ba7df0641afa734da1457ce47de491863407a587eec79a" - - bottle do - sha256 "41dc4a7c7d51d7579cccd1875cd3f683dbbdb07db47ea10d07e61d7502ebc380" => :mojave - sha256 "66e597575145349e5acaf9ff8b1a08a8582dc0ea3e2ec80c00a99ab2b6aa9aca" => :high_sierra - sha256 "f74574ab0ec6c7c6c5a143b0b46303752482be1d37b36c7b74c534fa7499e446" => :sierra - end - - keg_only :provided_by_macos, "some formulae require a newer version of bison" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.y").write <<~EOS - %{ #include - using namespace std; - extern void yyerror (char *s); - extern int yylex (); - %} - %start prog - %% - prog: // empty - | prog expr '\\n' { cout << "pass"; exit(0); } - ; - expr: '(' ')' - | '(' expr ')' - | expr expr - ; - %% - char c; - void yyerror (char *s) { cout << "fail"; exit(0); } - int yylex () { cin.get(c); return c; } - int main() { yyparse(); } - EOS - system "#{bin}/bison", "test.y" - system ENV.cxx, "test.tab.c", "-o", "test" - assert_equal "pass", shell_output("echo \"((()(())))()\" | ./test") - assert_equal "fail", shell_output("echo \"())\" | ./test") - end -end diff --git a/Formula/bison@2.7.rb b/Formula/bison@2.7.rb deleted file mode 100644 index 4b028917a3bd2..0000000000000 --- a/Formula/bison@2.7.rb +++ /dev/null @@ -1,58 +0,0 @@ -class BisonAT27 < Formula - desc "Parser generator" - homepage "https://www.gnu.org/software/bison/" - url "https://ftp.gnu.org/gnu/bison/bison-2.7.1.tar.gz" - mirror "https://ftpmirror.gnu.org/bison/bison-2.7.1.tar.gz" - sha256 "08e2296b024bab8ea36f3bb3b91d071165b22afda39a17ffc8ff53ade2883431" - revision 1 - - bottle do - sha256 "125fdf2eb737cdb8a3e795234f8e1fb5ec477f8590c534f7895497a6af82e04b" => :mojave - sha256 "ee0e758aa798809aaa3e94f1e3659c9d33497a577c25cfc03ecfe18c25862837" => :high_sierra - sha256 "7f1f717becaf0a818b154d3706b88f6c61a102b4f909e030005aaa5433abc34e" => :sierra - sha256 "3b49ff1a76807438bfb6805e513d372fba8d49c0259fe4f28e1587d47e42bf5c" => :el_capitan - end - - keg_only :versioned_formula - - if MacOS.version >= :high_sierra - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/b76d1e48dac/editors/nano/files/secure_snprintf.patch" - sha256 "57f972940a10d448efbd3d5ba46e65979ae4eea93681a85e1d998060b356e0d2" - end - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.y").write <<~EOS - %{ #include - using namespace std; - extern void yyerror (char *s); - extern int yylex (); - %} - %start prog - %% - prog: // empty - | prog expr '\\n' { cout << "pass"; exit(0); } - ; - expr: '(' ')' - | '(' expr ')' - | expr expr - ; - %% - char c; - void yyerror (char *s) { cout << "fail"; exit(0); } - int yylex () { cin.get(c); return c; } - int main() { yyparse(); } - EOS - system "#{bin}/bison", "test.y" - system ENV.cxx, "test.tab.c", "-o", "test" - assert_equal "pass", shell_output("echo \"((()(())))()\" | ./test") - assert_equal "fail", shell_output("echo \"())\" | ./test") - end -end diff --git a/Formula/bit.rb b/Formula/bit.rb deleted file mode 100644 index 9bf31c0dbab9c..0000000000000 --- a/Formula/bit.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "language/node" - -class Bit < Formula - desc "Distributed Code Component Manager" - homepage "https://www.bitsrc.io" - url "https://registry.npmjs.org/bit-bin/-/bit-bin-13.0.4.tgz" - sha256 "52bea96e4ac78e82473a0dd1c5356df22fc8790762e696f5094bf30b43f5039c" - head "https://github.com/teambit/bit.git" - - bottle do - sha256 "3d286af287aa77ac157fcc4e976719ed402cfa9244b6ae210ab05ee1db30a74f" => :mojave - sha256 "1eb42224719407cbf0e1f2f75d13744eb0f2a1fc4c60c4671d4412bf83837048" => :high_sierra - sha256 "069d3f199917d5c83492728ca8208ab23abcd3871bffb5522d2a4764bf830c2e" => :sierra - sha256 "8fdc4600be1890b2912fa026e8af8e8ec6b8257832de11740ad01d99ebe8fe25" => :el_capitan - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"Library/Caches/Bit/config/config.json").write <<~EOS - { "analytics_reporting": false, "error_reporting": false } - EOS - output = shell_output("#{bin}/bit init --skip-update") - assert_match "successfully initialized", output - end -end diff --git a/Formula/bitchx.rb b/Formula/bitchx.rb deleted file mode 100644 index a8ca2cf3b3af9..0000000000000 --- a/Formula/bitchx.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Bitchx < Formula - desc "Text-based, scriptable IRC client" - homepage "https://bitchx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/bitchx/ircii-pana/bitchx-1.2.1/bitchx-1.2.1.tar.gz" - sha256 "2d270500dd42b5e2b191980d584f6587ca8a0dbda26b35ce7fadb519f53c83e2" - - bottle do - sha256 "e247158fcd923d2d4737671a1d5c3f71481f280074361e720f0bae4faaa8d19a" => :mojave - sha256 "42821be4a7f1514e6559a7104ac6c30d12633399b38f64581138940254352bd0" => :high_sierra - sha256 "6ebed76309cfd3d35bcd700515e8fb97610102fbfa072a62e5769032c5e2dbe4" => :sierra - sha256 "c76cb88aaa53b51248620ce021b6ea771adc77716b04291dcbaa36d98021b20b" => :el_capitan - sha256 "ebb3d7dd9342843c47964d4c545e76136aeb4e200f9495cd2767d0e31fc37181" => :yosemite - sha256 "494fd5d6084f70158e82d49a067439770935d5aeeb6223d1c229a27e6f7f9e8f" => :mavericks - sha256 "f0d7c9d8eaccd526c39037903121e1e6a026ce93988610ed32ad3b5f864fb630" => :mountain_lion - end - - depends_on "openssl" - - def install - plugins = %w[acro aim arcfour amp autocycle blowfish cavlink encrypt - fserv hint identd nap pkga possum qbx qmail] - args = %W[ - --prefix=#{prefix} - --with-ssl - --with-plugins=#{plugins * ","} - --enable-ipv6 - --mandir=#{man} - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - def caveats; <<~EOS - On case-sensitive filesytems, it is necessary to run `BitchX` not `bitchx`. - For best visual appearance, your terminal emulator may need: - * Character encoding set to Western (ISO Latin 1). - (or a similar, compatible encoding) - * A font capable of extended ASCII characters: - See: https://www.google.com/search?q=perfect+dos+vga+437 - EOS - end - - test do - system bin/"BitchX", "-v" - end -end diff --git a/Formula/bitcoin.rb b/Formula/bitcoin.rb deleted file mode 100644 index 9813fe0ffe5c8..0000000000000 --- a/Formula/bitcoin.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Bitcoin < Formula - desc "Decentralized, peer to peer payment network" - homepage "https://bitcoin.org/" - url "https://bitcoin.org/bin/bitcoin-core-0.17.1/bitcoin-0.17.1.tar.gz" - sha256 "3e564fb5cf832f39e930e19c83ea53e09cfe6f93a663294ed83a32e194bda42a" - - bottle do - cellar :any - sha256 "9f31d9597cb82823d23baf05afbfa6a3e177a8a5ee043a4f618cb3b248515f8d" => :mojave - sha256 "dbdd16f4c04598c60c8a1b6835e42570582b8ee81a8ef509cd308b292658406c" => :high_sierra - sha256 "574444c09a0d32df7c4942daebc06946c7ce06b32a4ee8e044b2ddc51da8d0e3" => :sierra - end - - head do - url "https://github.com/bitcoin/bitcoin.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "berkeley-db@4" - depends_on "boost" - depends_on "libevent" - depends_on "miniupnpc" - depends_on "openssl" - depends_on "zeromq" - - needs :cxx11 - - def install - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && - MacOS::Xcode.version >= "8.0" - ENV.delete("SDKROOT") - end - - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-boost-libdir=#{Formula["boost"].opt_lib}", - "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "share/rpcauth" - end - - plist_options :manual => "bitcoind" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/bitcoind - - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/test_bitcoin" - end -end diff --git a/Formula/bitlbee.rb b/Formula/bitlbee.rb deleted file mode 100644 index 0f495badb9fa4..0000000000000 --- a/Formula/bitlbee.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Bitlbee < Formula - desc "IRC to other chat networks gateway" - homepage "https://www.bitlbee.org/" - head "https://github.com/bitlbee/bitlbee.git" - - stable do - url "https://get.bitlbee.org/src/bitlbee-3.5.1.tar.gz" - sha256 "9636d7fd89ebb3756c13a9a3387736ca6d56ccf66ec0580d512f07b21db0fa69" - - # Fixes a couple of bugs/potential crashes. - patch do - url "https://github.com/bitlbee/bitlbee/commit/17a58dfa.patch?full_index=1" - sha256 "3a5729fd68bedabd1df717124e1950897eaee9feaf8237f6d67746e73df6cc6b" - end - - patch do - url "https://github.com/bitlbee/bitlbee/commit/eb73d05e.patch?full_index=1" - sha256 "a54bdc82ff2959992e081586f5dd478a1719cd5037ebb0bfa54db6013853e0a5" - end - end - - bottle do - sha256 "4e397710ecbbb772f346151ea9c99dd2b5a80e05bf93d4f0be2e23fb21e1bbea" => :mojave - sha256 "75272001af19553b23bd5d999c76570e9f53c5f0386fe8377f4e8af6e525fb50" => :high_sierra - sha256 "a73fcc3ea892e02dff11eda82c9338230f16778d786dbcfecae89802fb0859cb" => :sierra - sha256 "f1e4ace83358ed1164d5d8cfbe7ffe239b5698d24211150b86dbf4d4fb589a37" => :el_capitan - sha256 "85eebf3ba9ee2e986ef1c54b99a8df958cf48a1d5112f765e5498d9be23b9426" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gnutls" - depends_on "libgcrypt" - - def install - args = %W[ - --prefix=#{prefix} - --plugindir=#{HOMEBREW_PREFIX}/lib/bitlbee/ - --debug=0 - --ssl=gnutls - --etcdir=#{etc}/bitlbee - --pidfile=#{var}/bitlbee/run/bitlbee.pid - --config=#{var}/bitlbee/lib/ - --ipsocket=#{var}/bitlbee/run/bitlbee.sock - ] - - system "./configure", *args - - # This build depends on make running first. - system "make" - system "make", "install" - # Install the dev headers too - system "make", "install-dev" - # This build has an extra step. - system "make", "install-etc" - end - - def post_install - (var/"bitlbee/run").mkpath - (var/"bitlbee/lib").mkpath - end - - plist_options :manual => "bitlbee -D" - - def plist; <<~EOS - - - - - Label - #{plist_name} - OnDemand - - ProgramArguments - - #{opt_sbin}/bitlbee - - ServiceDescription - bitlbee irc-im proxy - Sockets - - Listener - - SockFamily - IPv4 - SockProtocol - TCP - SockNodeName - 127.0.0.1 - SockServiceName - 6667 - SockType - stream - - - inetdCompatibility - - Wait - - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{sbin}/bitlbee -V", 1) - end -end diff --git a/Formula/bitrise.rb b/Formula/bitrise.rb deleted file mode 100644 index 1d327e9220fa8..0000000000000 --- a/Formula/bitrise.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Bitrise < Formula - desc "Command-line automation tool" - homepage "https://github.com/bitrise-io/bitrise" - url "https://github.com/bitrise-io/bitrise/archive/1.25.0.tar.gz" - sha256 "590494eb1e131f65b342f9055a429d96baca38d0518acd22b477644e276cc0b2" - - bottle do - cellar :any_skip_relocation - sha256 "00ceb0f4b1733d9f103abb9e39fe40851622d3ca743d60fbb0a2ccabbbde9470" => :mojave - sha256 "ed34b20c0a76c1c90b80ad33f2060b2d5c297d39b6dcf1aab8aabf2823037cd4" => :high_sierra - sha256 "b1343e2ddd20f4e16d297e2fa16b59a9598f0e1ba6bd14858454f0a52b312f3b" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - # Install bitrise - bitrise_go_path = buildpath/"src/github.com/bitrise-io/bitrise" - bitrise_go_path.install Dir["*"] - - cd bitrise_go_path do - prefix.install_metafiles - - system "go", "build", "-o", bin/"bitrise" - end - end - - test do - (testpath/"bitrise.yml").write <<~EOS - format_version: 1.3.1 - default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git - workflows: - test_wf: - steps: - - script: - inputs: - - content: printf 'Test - OK' > brew.test.file - EOS - - system "#{bin}/bitrise", "setup" - system "#{bin}/bitrise", "run", "test_wf" - assert_equal "Test - OK", (testpath/"brew.test.file").read.chomp - end -end diff --git a/Formula/bittwist.rb b/Formula/bittwist.rb deleted file mode 100644 index 761b289eb1658..0000000000000 --- a/Formula/bittwist.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Bittwist < Formula - desc "Libcap-based Ethernet packet generator" - homepage "https://bittwist.sourceforge.io" - url "https://downloads.sourceforge.net/project/bittwist/Mac%20OS%20X/Bit-Twist%202.0/bittwist-macosx-2.0.tar.gz" - sha256 "8954462ac9e21376d9d24538018d1225ef19ddcddf9d27e0e37fe7597e408eaa" - - bottle do - cellar :any_skip_relocation - sha256 "5a282944a4d5c10caaea1217aa1b9e6225a2a5d8f5fb941bb3a77eed747cdc90" => :mojave - sha256 "b19dd7e9297e5f4d26472e93f1fc90bbe5c2b7d11cd18ab04606d3176d064fb7" => :high_sierra - sha256 "b69084cc099ecb0fcea860d9d07fb8a271b1bd645bef603abfe0cb20f4979902" => :sierra - sha256 "215b6353dcedd6ad0908e725c68204f2aa8413bf32ae3eb0a3afa96eb6c17d60" => :el_capitan - sha256 "279cade886758dfabfbaa319c6afb302c7e254db0377f0eed1f1155afb800175" => :yosemite - sha256 "3dcd106243667b15b4be07203daffb1c97f815051734813c0e37384c6db3747c" => :mavericks - end - - def install - system "make" - system "make", "install", "prefix=#{prefix}" - end - - test do - system "#{bin}/bittwist", "-help" - system "#{bin}/bittwiste", "-help" - end -end diff --git a/Formula/bitwarden-cli.rb b/Formula/bitwarden-cli.rb deleted file mode 100644 index fac98dfd17115..0000000000000 --- a/Formula/bitwarden-cli.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/node" - -class BitwardenCli < Formula - desc "Secure and free password manager for all of your devices" - homepage "https://bitwarden.com/" - url "https://registry.npmjs.org/@bitwarden/cli/-/cli-1.5.0.tgz" - sha256 "166df57dc4be94b5a79ad6a2e03e79d3d039f0fc1af1a0d87e3730a7f4fc91f7" - - bottle do - cellar :any_skip_relocation - sha256 "596c4d0d1b3203d724824dd1b15ba05c704e6e8660259a6f6eaa9d7769be3ec6" => :mojave - sha256 "8ab907c1ba25570c0563bf471eefa335cfe9c0055e4e77a5b47b95b9f65adf12" => :high_sierra - sha256 "7e8334c0ba13423fe8cdb3dc85cc9989143863a5253e893113f515596545184d" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - assert_equal 10, shell_output("#{bin}/bw generate --length 10").chomp.length - - output = pipe_output("#{bin}/bw encode", "Testing", 0) - assert_equal "VGVzdGluZw==", output.chomp - end -end diff --git a/Formula/black.rb b/Formula/black.rb deleted file mode 100644 index 9156af9ea2725..0000000000000 --- a/Formula/black.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Black < Formula - include Language::Python::Virtualenv - - desc "Python code formatter" - homepage "https://black.readthedocs.io/en/stable/" - url "https://files.pythonhosted.org/packages/e8/5f/0f79fcd943ba465cbd4bf303c9794970c13a95e5456630de9f72e7f37ad4/black-18.9b0.tar.gz" - sha256 "e030a9a28f542debc08acceb273f228ac422798e5215ba2a791a6ddeaaca22a5" - - bottle do - cellar :any_skip_relocation - sha256 "bcb14738c971f7701f6b1911d9988cd62411ffbdc004ff5b1a0988fe92a2d993" => :mojave - sha256 "1991045f7a79c0321947b6fed7ac9d2d69bf548863dc07b202e90c401ee42a73" => :high_sierra - sha256 "495f31fe2eea2f0b1e104f2c7eee96694bda0a1a0ef1029b33565293e4f5cecf" => :sierra - end - - depends_on "python" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/e4/ac/a04671e118b57bee87dabca1e0f2d3bda816b7a551036012d0ca24190e71/attrs-18.1.0.tar.gz" - sha256 "e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/f5/f9/044110c267e6408013b85166a7cfcd352cf85275aa8ce700aa5c0eb407ba/toml-0.9.4.tar.gz" - sha256 "8e86bd6ce8cc11b9620cb637466453d94f5d57ad86f17e98a98d1f73e3baab2d" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - (testpath/"black_test.py").write <<~EOS - print( - 'It works!') - EOS - system bin/"black", "black_test.py" - assert_equal "print(\"It works!\")\n", (testpath/"black_test.py").read - end -end diff --git a/Formula/blackbox.rb b/Formula/blackbox.rb deleted file mode 100644 index 49f66a9633deb..0000000000000 --- a/Formula/blackbox.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Blackbox < Formula - desc "Safely store secrets in Git/Mercurial/Subversion" - homepage "https://github.com/StackExchange/blackbox" - url "https://github.com/StackExchange/blackbox/archive/v1.20181219.tar.gz" - sha256 "afd40d1676645ce9aaf4cdbf71352bf1a8f6d426998436cea3ae536881ef5f81" - - bottle :unneeded - - depends_on "gnupg" - - def install - libexec.install Dir["bin/*"] - bin.write_exec_script Dir[libexec/"*"].select { |f| File.executable? f } - end - - test do - (testpath/"batch.gpg").write <<~EOS - Key-Type: RSA - Key-Length: 2048 - Subkey-Type: RSA - Subkey-Length: 2048 - Name-Real: Testing - Name-Email: testing@foo.bar - Expire-Date: 1d - %no-protection - %commit - EOS - begin - system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" - system "git", "init" - system bin/"blackbox_initialize", "yes" - add_created_key = shell_output("#{bin}/blackbox_addadmin Testing 2>&1") - assert_match "", add_created_key - ensure - system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" - system Formula["gnupg"].opt_bin/"gpgconf", "--homedir", "keyrings/live", - "--kill", "gpg-agent" - end - end -end diff --git a/Formula/blahtexml.rb b/Formula/blahtexml.rb deleted file mode 100644 index 2553658abe19a..0000000000000 --- a/Formula/blahtexml.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Blahtexml < Formula - desc "Converts equations into Math ML" - homepage "http://gva.noekeon.org/blahtexml/" - url "http://gva.noekeon.org/blahtexml/blahtexml-0.9-src.tar.gz" - sha256 "c5145b02bdf03cd95b7b136de63286819e696639824961d7408bec4591bc3737" - revision 1 - - bottle do - cellar :any - sha256 "23f943fa053e861b0f6c9f2e9cfa1c74d6b8966ac698e6650386d44f7d7de31b" => :mojave - sha256 "c2696cdaa1724541f0d07900219247365e30061a471df0b80f6469b3bc2b4a14" => :high_sierra - sha256 "bcd628072b5b7d6625e2b2caad1c6f64483807facda1b2eff32795de1b25070f" => :sierra - sha256 "b1788b8622b704c67b11295f6bf84ab881298980f8101b5fed6cb7441b4edc82" => :el_capitan - end - - depends_on "xerces-c" - - # Add missing unistd.h includes, taken from MacPorts - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0632225f/blahtexml/patch-mainPng.cpp.diff" - sha256 "7d4bce5630881099b71beedbbc09b64c61849513b4ac00197b349aab2eba1687" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0632225f/blahtexml/patch-main.cpp.diff" - sha256 "d696d10931f2c2ded1cef50842b78887dba36679fbb2e0abc373e7b6405b8468" - end - - needs :cxx11 - - def install - ENV.cxx11 - - system "make", "blahtex-mac" - bin.install "blahtex" - system "make", "blahtexml-mac" - bin.install "blahtexml" - end - - test do - input = '\sqrt{x^2+\alpha}' - output = pipe_output("#{bin}/blahtex --mathml", input) - assert_match "x2 :mojave - sha256 "c16d8d858839b6fcfb8c024b3d001a3cd6deb4b1dfee3d37a4f37aabdc525651" => :high_sierra - sha256 "0d67fc57e7ac3fb1d208166b2795f6553c8279c57b67ce6b399e398c657a887d" => :sierra - end - - depends_on "lmdb" - - conflicts_with "proj", :because => "both install a `libproj.a` library" - - def install - cd "c++" do - # Use ./configure --without-boost to fix - # error: allocating an object of abstract class type 'ncbi::CNcbiBoostLogger' - # Boost is used only for unit tests. - # See https://github.com/Homebrew/homebrew-science/pull/3537#issuecomment-220136266 - system "./configure", "--prefix=#{prefix}", - "--without-debug", - "--without-boost" - - # Fix the error: install: ReleaseMT/lib/*.*: No such file or directory - system "make" - - system "make", "install" - end - end - - test do - (testpath/"test.fasta").write <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - output = shell_output("#{bin}/blastn -query test.fasta -subject test.fasta") - assert_match "Identities = 70/70", output - end -end diff --git a/Formula/blastem.rb b/Formula/blastem.rb deleted file mode 100644 index 96b8125943007..0000000000000 --- a/Formula/blastem.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Blastem < Formula - desc "Fast and accurate Genesis emulator" - homepage "https://www.retrodev.com/blastem/" - url "https://www.retrodev.com/repos/blastem/archive/3d48cb0c28be.tar.gz" - version "0.5.1" - sha256 "1929e39179ef46fd6b43b0bfd8f51dff29fc4ec001bd2e53811579707f5d9f1f" - head "https://www.retrodev.com/repos/blastem", :using => :hg - - bottle do - cellar :any - rebuild 1 - sha256 "bc38d936759fca569d4d4e74928134d43faee7775605bcba99f5bd3479e27a1a" => :mojave - sha256 "733eb0a2e78065fdbb4909a23e4e3f004bfe9ae8340fc9cf2a020201122ba02d" => :high_sierra - sha256 "c6f50055cec8cc49df276ff30beb14290c6587796c0684ae4caf7df7a9353e9f" => :sierra - sha256 "ddd56aef9836a1bca79a55aa3757879bf205942a23c666a0d9b8af772c7de5ad" => :el_capitan - end - - depends_on "freetype" => :build - depends_on "jpeg" => :build - depends_on "libpng" => :build # for xcftools - depends_on "pkg-config" => :build - depends_on "glew" - depends_on "python@2" - depends_on "sdl2" - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/8d/80/eca7a2d1a3c2dafb960f32f844d570de988e609f5fd17de92e1cf6a01b0a/Pillow-4.0.0.tar.gz" - sha256 "ee26d2d7e7e300f76ba7b796014c04011394d0c4a5ed9a288264a3e443abca50" - end - - resource "vasm" do - url "http://server.owl.de/~frank/tags/vasm1_7e.tar.gz" - sha256 "2878c9c62bd7b33379111a66649f6de7f9267568946c097ffb7c08f0acd0df92" - end - - resource "xcftools" do - url "http://henning.makholm.net/xcftools/xcftools-1.0.7.tar.gz" - sha256 "1ebf6d8405348600bc551712d9e4f7c33cc83e416804709f68d0700afde920a6" - end - - def install - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages" - - if MacOS.sdk_path_if_needed - ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" - ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/ffi" # libffi - end - - resource("Pillow").stage do - inreplace "setup.py" do |s| - sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" - s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" - s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')" - end - - begin - # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs - saved_sdkroot = ENV.delete "SDKROOT" - ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" unless MacOS::CLT.installed? - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - ensure - ENV["SDKROOT"] = saved_sdkroot - end - end - - resource("vasm").stage do - system "make", "CPU=m68k", "SYNTAX=mot" - (buildpath/"tool").install "vasmm68k_mot" - end - - # FIXME: xcftools is not in the core tap - # https://github.com/Homebrew/homebrew-core/pull/1216 - resource("xcftools").stage do - # Apply patch to build with libpng-1.5 or above - # https://anonscm.debian.org/cgit/collab-maint/xcftools.git/commit/?id=c40088b82c6a788792aae4068ddc8458de313a9b - inreplace "xcf2png.c", /png_(voidp|error_ptr)_NULL/, "NULL" - - system "./configure" - - # Avoid `touch` error from empty MANLINGUAS when building without NLS - ENV.deparallelize - touch "manpo/manpages.pot" - system "make", "manpo/manpages.pot" - touch "manpo/manpages.pot" - system "make" - (buildpath/"tool").install "xcf2png" - end - - ENV.prepend_path "PATH", buildpath/"tool" - - system "make", "menu.bin" - system "make" - libexec.install %w[blastem default.cfg menu.bin rom.db shaders] - bin.write_exec_script libexec/"blastem" - end - - test do - assert_equal "blastem #{version}", shell_output("#{bin}/blastem -b 1 -v").chomp - end -end diff --git a/Formula/blazeblogger.rb b/Formula/blazeblogger.rb deleted file mode 100644 index d685993d9297b..0000000000000 --- a/Formula/blazeblogger.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Blazeblogger < Formula - desc "CMS for the command-line" - homepage "http://blaze.blackened.cz/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/blazeblogger/blazeblogger-1.2.0.tar.gz" - sha256 "39024b70708be6073e8aeb3943eb3b73d441fbb7b8113e145c0cf7540c4921aa" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c7350b4fc7cb74eb436f431aed0e54160bb2da31593f623573b6396287342148" => :mojave - sha256 "7cb9d122a9c892a89d36a886c2be63536ca339def18d2766fde8f96e87c0d0cd" => :high_sierra - sha256 "8e6e405d5b586a95006ab1f47d2f5cef961a2dbdaa9759fb4427663edcd12adf" => :sierra - sha256 "0d6bf439fa6f880cb9457581da66082f49f514f8b0fd4b57ac81180948aaa5e1" => :el_capitan - sha256 "bac92237da25ffb0b9b31bd78fea353bf717cfb6f1381fbb0df333f555fbab91" => :yosemite - sha256 "d48ad0f2ce8de2cf98f111a491e47136debbd0e585ff20b9978eb00349e454b3" => :mavericks - end - - def install - # https://code.google.com/p/blazeblogger/issues/detail?id=51 - ENV.deparallelize - system "make", "prefix=#{prefix}", "compdir=#{prefix}", "install" - end - - test do - system bin/"blaze", "init" - system bin/"blaze", "config", "blog.title", "Homebrew!" - system bin/"blaze", "make" - assert_predicate testpath/"default.css", :exist? - assert_match "Homebrew!", File.read(".blaze/config") - end -end diff --git a/Formula/blazegraph.rb b/Formula/blazegraph.rb deleted file mode 100644 index 37cf28125b5a0..0000000000000 --- a/Formula/blazegraph.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Blazegraph < Formula - desc "Graph database supporting RDF data model, Sesame, and Blueprint APIs" - homepage "https://www.blazegraph.com/" - url "https://downloads.sourceforge.net/project/bigdata/bigdata/2.1.4/blazegraph.jar" - sha256 "b175d2b4aa9e2f65fcbf4d6f75f8dd12ef75022f82fb94df1fbd0bac5230af2a" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install "blazegraph.jar" - bin.write_jar_script libexec/"blazegraph.jar", "blazegraph" - end - - plist_options :startup => "true", :manual => "blazegraph start" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/blazegraph - RunAtLoad - - WorkingDirectory - #{opt_prefix} - - - EOS - end - - test do - server = fork do - exec bin/"blazegraph" - end - sleep 5 - Process.kill("TERM", server) - assert_predicate testpath/"blazegraph.jnl", :exist? - assert_predicate testpath/"rules.log", :exist? - end -end diff --git a/Formula/blink1.rb b/Formula/blink1.rb deleted file mode 100644 index 1c2ab803d2d47..0000000000000 --- a/Formula/blink1.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Blink1 < Formula - desc "Control blink(1) indicator light" - homepage "https://blink1.thingm.com/" - url "https://github.com/todbot/blink1-tool.git", - :tag => "v2.0.2", - :revision => "ddea93375101a9b43e0248205b5460a0e3b45f74" - head "https://github.com/todbot/blink1-tool.git" - - bottle do - cellar :any - sha256 "6a9aae3733db387dfa9e9c1bbacb9b3c7993f42486115254c8c67d9c716c455d" => :mojave - sha256 "0a19927c5f385f1aede59f406edc34d91cfa46b0b961d1f02bf7170e06888f4f" => :high_sierra - sha256 "9cc48de0d254d4e30d2ac0649d298e55ef0576b97da7b77f170261b9a913da43" => :sierra - end - - def install - system "make" - bin.install "blink1-tool" - lib.install "libBlink1.dylib" - include.install "blink1-lib.h" - end - - test do - system bin/"blink1-tool", "--version" - end -end diff --git a/Formula/blitz.rb b/Formula/blitz.rb deleted file mode 100644 index 6f3c008825652..0000000000000 --- a/Formula/blitz.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Blitz < Formula - desc "C++ class library for scientific computing" - homepage "https://blitz.sourceforge.io" - url "https://downloads.sourceforge.net/project/blitz/blitz/Blitz++%200.10/blitz-0.10.tar.gz" - sha256 "804ef0e6911d43642a2ea1894e47c6007e4c185c866a7d68bad1e4c8ac4e6f94" - - bottle do - cellar :any - rebuild 1 - sha256 "1d88c433d1c5dc863d670358624cc3d733f042cdb052848c673d5eafa8a6dc33" => :mojave - sha256 "1fbcdb2453e10ef03721f965050244519743a6161dfc581bda663597ecf44595" => :high_sierra - sha256 "b676b24071752779faadf53d71b53b0c632b8ba62d1cd7c1f90d40ee5b13a85b" => :sierra - end - - head do - url "https://github.com/blitzpp/blitz.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-fi" if build.head? - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--infodir=#{info}", - "--enable-shared", - "--disable-doxygen", - "--disable-dot", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"testfile.cpp").write <<~EOS - #include - #include - using namespace blitz; - int main(){ - Array A(3,1); - A = 17, 2, 97; - cout << "A = " << A << endl; - return 0;} - EOS - system ENV.cxx, "testfile.cpp", "-o", "testfile" - output = shell_output("./testfile") - var = "/A\ =\ \(0,2\)\ x\ \(0,0\)\n\[\ 17\ \n\ \ 2\ \n\ \ 97\ \]\n\n/" - assert_match output, var - end -end diff --git a/Formula/blitzwave.rb b/Formula/blitzwave.rb deleted file mode 100644 index 42bc17a8aae25..0000000000000 --- a/Formula/blitzwave.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Blitzwave < Formula - desc "C++ wavelet library" - homepage "https://oschulz.github.io/blitzwave" - url "https://github.com/oschulz/blitzwave/archive/v0.8.0.tar.gz" - sha256 "edb0b708a0587e77b8e0aa3387b44f4e838855c17e896a8277bb80fbe79b9a63" - - bottle do - cellar :any - sha256 "7bd4d442c43a1f5c2a6fbfbf77faa3d90096873a65d90317fa0dad223908b498" => :mojave - sha256 "5ad4f6c2447b6efdad752ffc05c2d31be8ad1abbe0c6654f77f33141edaf300e" => :high_sierra - sha256 "1722c7dfacc458ca54d05dcc06a5281bbe48935f66eaaf7374c2551ad50298a8" => :sierra - sha256 "be9ba4deb07a468b23f430fe2f0896206b120f70e07f94d48267448c0524d3bc" => :el_capitan - sha256 "609c85eec329a8aa988a2b026522642f41b392039936661ce428d13887dfa84d" => :yosemite - sha256 "af7d02c7520db927c0d835992719922753e89d26588a00a2a53601a1e5aabd8b" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "blitz" - - # an automake tweak to fix compiling - # reported upstream: https://github.com/oschulz/blitzwave/issues/2 - patch :DATA - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -diff --git a/configure.ac b/configure.ac -index 8d28d78..2bfe06f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -8,6 +8,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror]) - AC_PROG_CXX - AC_LIBTOOL_DLOPEN - AC_PROG_LIBTOOL -+AM_PROG_AR - - AC_CHECK_PROGS(DOXYGEN, doxygen, false) - AM_CONDITIONAL([COND_DOXYGEN], [test "$DOXYGEN" != "false"]) diff --git a/Formula/bloaty.rb b/Formula/bloaty.rb deleted file mode 100644 index f445ccdf17496..0000000000000 --- a/Formula/bloaty.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Bloaty < Formula - desc "Size profiler for binaries" - homepage "https://github.com/google/bloaty" - url "https://github.com/google/bloaty/releases/download/v1.0/bloaty-1.0.tar.bz2" - sha256 "e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0" - - bottle do - cellar :any_skip_relocation - sha256 "e0eaa91cfad61274a41ffb94f335cf61ad8217e9d47eff8bb77a390d7bcdb165" => :mojave - sha256 "1c06ab5eb36a968ba9755028760f1dfc4958273325e5d243d9562cb571912fa6" => :high_sierra - sha256 "aa8aa6c63e5cd626ce78146912c8abf79d2ed110d3ed0501482a88f421dce4b5" => :sierra - sha256 "2657c5809a086a8bba8d2ed81ca56f5640a5eab69723aa3ef342160c64c84cbd" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make" - bin.install buildpath/"bloaty" - end - - test do - system bin/"bloaty", bin/"bloaty" - end -end diff --git a/Formula/blockhash.rb b/Formula/blockhash.rb deleted file mode 100644 index 165eb1d3e42b5..0000000000000 --- a/Formula/blockhash.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Blockhash < Formula - desc "Perceptual image hash calculation tool" - homepage "https://github.com/commonsmachinery/blockhash" - url "https://github.com/commonsmachinery/blockhash/archive/v0.3.1.tar.gz" - sha256 "56e8d2fecf2c7658c9f8b32bfb2d29fdd0d0535ddb3082e44b45a5da705aca86" - head "https://github.com/commonsmachinery/blockhash.git" - - bottle do - cellar :any - sha256 "6ffdc13e9245f06147a95870dbf8b0b380bda2cb4fb0036988cf1d9f4a96ce2c" => :mojave - sha256 "c4b04968387672dded5493575dbc182f9a8cd43dce80943c5eaca9450cee1a44" => :high_sierra - sha256 "e684a55045cca7db8816b9fdb0881290c5cf80c20230dab454aef1d90f45adf4" => :sierra - sha256 "aadd5917fdb402fad8d6b7b02ca379cdefec0151edf0b8fa1135ccf1767e610f" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "imagemagick" - - resource "testdata" do - url "https://raw.githubusercontent.com/commonsmachinery/blockhash/ce08b465b658c4e886d49ec33361cee767f86db6/testdata/clipper_ship.jpg" - sha256 "a9f6858876adadc83c8551b664632a9cf669c2aea4fec0c09d81171cc3b8a97f" - end - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end - - test do - resource("testdata").stage testpath - hash = "00007ff07ff07fe07fe67ff07560600077fe701e7f5e000079fd40410001ffff" - result = shell_output("#{bin}/blockhash #{testpath}/clipper_ship.jpg") - assert_match hash, result - end -end diff --git a/Formula/bltool.rb b/Formula/bltool.rb deleted file mode 100644 index 49123793783b4..0000000000000 --- a/Formula/bltool.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Bltool < Formula - desc "Tool for command-line interaction with backloggery.com" - homepage "https://github.com/ToxicFrog/bltool" - url "https://github.com/ToxicFrog/bltool/releases/download/v0.2.4/bltool-0.2.4.zip" - sha256 "5bef751aac7140f8a705b29edd35a7bfa9f87c36039d84d4001f16a307b64ef6" - - head do - url "https://github.com/ToxicFrog/bltool.git" - depends_on "leiningen" => :build - end - - bottle :unneeded - - def install - if build.head? - system "lein", "uberjar" - bltool_jar = Dir["target/bltool-*-standalone.jar"][0] - else - bltool_jar = "bltool.jar" - end - - libexec.install bltool_jar - bin.write_jar_script libexec/File.basename(bltool_jar), "bltool" - end - - test do - (testpath/"test.edn").write <<~EOS - [{:id "12527736", - :name "Assassin's Creed", - :platform "360", - :progress "unfinished"}] - EOS - - system bin/"bltool", "--from", "edn", - "--to", "text", - "--input", "test.edn", - "--output", "test.txt" - - assert_match /12527736\s+360\s+unfinished\s+Assassin/, File.read("test.txt") - end -end diff --git a/Formula/bluepill.rb b/Formula/bluepill.rb deleted file mode 100644 index e74192a280f85..0000000000000 --- a/Formula/bluepill.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Bluepill < Formula - desc "iOS testing tool that runs UI tests using multiple simulators" - homepage "https://github.com/linkedin/bluepill" - url "https://github.com/linkedin/bluepill/archive/v3.1.1.tar.gz" - sha256 "35666939199643261cd50ec1044fc978a1835e3c77fe6cb0e3d49b4567d7ed26" - head "https://github.com/linkedin/bluepill.git" - - bottle do - cellar :any_skip_relocation - sha256 "8383eda347023b518d5b856621c1766547a44e520b79eaca417ffc957c8fb0b1" => :mojave - sha256 "0482489f804ea434f842457362f2f49c7ea9a0d158f2c54710337dcdc2a1dc70" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - - def install - xcodebuild "-workspace", "Bluepill.xcworkspace", - "-scheme", "bluepill", - "-configuration", "Release", - "SYMROOT=../" - bin.install "Release/bluepill", "Release/bp" - end - - test do - assert_match "Usage:", shell_output("#{bin}/bluepill -h") - assert_match "Usage:", shell_output("#{bin}/bp -h") - end -end diff --git a/Formula/blueutil.rb b/Formula/blueutil.rb deleted file mode 100644 index 01f40471e44e3..0000000000000 --- a/Formula/blueutil.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Blueutil < Formula - desc "Get/set bluetooth power and discoverable state" - homepage "https://github.com/toy/blueutil" - url "https://github.com/toy/blueutil/archive/v2.2.0.tar.gz" - sha256 "ad6c8d15896cbdf5526b85aac57df02f6e00aace178e2f6c5208256f9525e99a" - head "https://github.com/toy/blueutil.git" - - bottle do - cellar :any_skip_relocation - sha256 "5bf587580f0e5c125b111411b9fbe58185eca7f523b1aa854af752709d3de959" => :mojave - sha256 "4c3653d05a0b18bf2eb430c71236615e6c7bcf4d2317d30eceabb4baf79f0587" => :high_sierra - sha256 "a27c0893c6d6cd7370ae468e944693a3512ecc933c082513974666db3f25e6a9" => :sierra - end - - depends_on :xcode => :build - - def install - # Set to build with SDK=macosx10.6, but it doesn't actually need 10.6 - xcodebuild "SDKROOT=", "SYMROOT=build" - bin.install "build/Release/blueutil" - end - - test do - system "#{bin}/blueutil" - end -end diff --git a/Formula/bmake.rb b/Formula/bmake.rb deleted file mode 100644 index 3849ba8b513bb..0000000000000 --- a/Formula/bmake.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bmake < Formula - desc "Portable version of NetBSD make(1)" - homepage "http://www.crufty.net/help/sjg/bmake.html" - url "http://www.crufty.net/ftp/pub/sjg/bmake-20180919.tar.gz" - sha256 "b0dd038583fe4a627f52f109887b71d365d8c51ec87f0e3fcb3ab6a9124eccee" - - bottle do - sha256 "133b0f024e8722fc8329cb36017fad0bc78b10b6eacc30d4d7ae72f8cab0c7ee" => :mojave - sha256 "600a948d86983ed62fa409dcb4b7db0d6323866e79acf1cfced9b81973ed4859" => :high_sierra - sha256 "72b83c275872c5f86ae56272fd6477fff883bc29f79de80ef11592bc4aa84243" => :sierra - end - - def install - # Don't pre-roff cat pages. - inreplace "mk/man.mk", "MANTARGET?", "MANTARGET" - - # -DWITHOUT_PROG_LINK means "don't symlink as bmake-VERSION." - args = ["--prefix=#{prefix}", "-DWITHOUT_PROG_LINK", "--install"] - system "sh", "boot-strap", *args - - man1.install "bmake.1" - end - - test do - (testpath/"Makefile").write <<~EOS - all: hello - - hello: - \t@echo 'Test successful.' - - clean: - \trm -rf Makefile - EOS - system bin/"bmake" - system bin/"bmake", "clean" - end -end diff --git a/Formula/bmon.rb b/Formula/bmon.rb deleted file mode 100644 index 2a7b1e19284c8..0000000000000 --- a/Formula/bmon.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Bmon < Formula - desc "Interface bandwidth monitor" - homepage "https://github.com/tgraf/bmon" - url "https://github.com/tgraf/bmon/releases/download/v4.0/bmon-4.0.tar.gz" - sha256 "02fdc312b8ceeb5786b28bf905f54328f414040ff42f45c83007f24b76cc9f7a" - revision 2 - - bottle do - sha256 "d6ab26f7e09d506f05c836413bd2cad39912b97a4111dd4c5acbb22b7d88314a" => :mojave - sha256 "0e42dc7797916ba3b70729662c78a26fbc0e991c6568143888cded4595dbbf41" => :high_sierra - sha256 "2af9641dcfa37efcd37eb520b8ed1d2e82c12e23409ad074356959220f1b0a78" => :sierra - sha256 "dd09a67017c5ba3fffbe8ea14f79157126b069c89c3a452e42462fc65d222572" => :el_capitan - sha256 "9363be186d292bd7f2c7407713e1202efde1ca5aac6e4bddafc35a46e8989e3c" => :yosemite - end - - head do - url "https://github.com/tgraf/bmon.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "confuse" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system bin/"bmon", "-o", "ascii:quitafter=1" - end -end diff --git a/Formula/bnd.rb b/Formula/bnd.rb deleted file mode 100644 index 61828c036cbd3..0000000000000 --- a/Formula/bnd.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Bnd < Formula - desc "The Swiss Army Knife for OSGi bundles" - homepage "https://bnd.bndtools.org/" - url "https://search.maven.org/remotecontent?filepath=biz/aQute/bnd/biz.aQute.bnd/4.1.0/biz.aQute.bnd-4.1.0.jar" - sha256 "5ad18a5a8702fcfe42d5180ee4ba33cf4728d5f68055b2d3755a86222afac462" - - bottle :unneeded - - def install - libexec.install "biz.aQute.bnd-#{version}.jar" - bin.write_jar_script libexec/"biz.aQute.bnd-#{version}.jar", "bnd" - end - - test do - # Test bnd by resolving a launch.bndrun file against a trivial index. - test_sha = "baad835c6fa65afc1695cc92a9e1afe2967e546cae94d59fa9e49b557052b2b1" - test_bsn = "org.apache.felix.gogo.runtime" - test_version = "1.0.0" - test_version_next = "1.0.1" - test_file_name = "#{test_bsn}-#{test_version}.jar" - (testpath/"index.xml").write <<~EOS - - - - - - - - - - - - - - EOS - - (testpath/"launch.bndrun").write <<~EOS - -standalone: index.xml - -runrequires: osgi.identity;filter:='(osgi.identity=#{test_bsn})' - EOS - - (testpath/"cnf/build.bnd").write <<~EOS - EOS - - output = shell_output("#{bin}/bnd resolve resolve -b launch.bndrun") - assert_match /launch.bndrun\s+ok/, output - assert_match /#{test_bsn};version='\[#{test_version},#{test_version_next}\)/, output - end -end diff --git a/Formula/bochs.rb b/Formula/bochs.rb deleted file mode 100644 index b2850dad97c7c..0000000000000 --- a/Formula/bochs.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Bochs < Formula - desc "Open source IA-32 (x86) PC emulator written in C++" - homepage "https://bochs.sourceforge.io/" - url "https://downloads.sourceforge.net/project/bochs/bochs/2.6.9/bochs-2.6.9.tar.gz" - sha256 "ee5b677fd9b1b9f484b5aeb4614f43df21993088c0c0571187f93acb0866e98c" - revision 2 - - bottle do - rebuild 1 - sha256 "e891728542536430a5d04c6fcd645e53fe3521d9a4f0aa4f3ba7eff175b1066b" => :mojave - sha256 "2c21df2f382582ab435e1f9534aea7609a59c080d581ca0b1963f0e1720cdc66" => :high_sierra - sha256 "5a80b2f0e3447bebc7c29ba7f3b19b1038e84409f5c33766fb029a49ea64ad5a" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "sdl2" - - # Fix pointer cast issue - # https://sourceforge.net/p/bochs/patches/537/ - if DevelopmentTools.clang_build_version >= 900 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e9b520dd4c/bochs/xcode9.patch" - sha256 "373c670083a3e96f4012cfe7356d8b3584e2f0d10196b4294d56670124f5e5e7" - end - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-docbook - --enable-a20-pin - --enable-alignment-check - --enable-all-optimizations - --enable-avx - --enable-cdrom - --enable-clgd54xx - --enable-cpu-level=6 - --enable-debugger - --enable-debugger-gui - --enable-disasm - --enable-fpu - --enable-iodebug - --enable-large-ramfile - --enable-logging - --enable-long-phy-address - --enable-pci - --enable-plugins - --enable-readline - --enable-show-ips - --enable-smp - --enable-usb - --enable-vmx=2 - --enable-x86-64 - --with-nogui - --with-sdl2 - --with-term - ] - - system "./configure", *args - - system "make" - system "make", "install" - end - - test do - require "open3" - - (testpath/"bochsrc.txt").write <<~EOS - panic: action=fatal - error: action=report - info: action=ignore - debug: action=ignore - display_library: nogui - EOS - - expected = <<~EOS - Bochs is exiting with the following message: - \[BIOS \] No bootable device\. - EOS - - command = "#{bin}/bochs -qf bochsrc.txt" - - # When the debugger is enabled, bochs will stop on a breakpoint early - # during boot. We can pass in a command file to continue when it is hit. - (testpath/"debugger.txt").write("c\n") - command << " -rc debugger.txt" - - _, stderr, = Open3.capture3(command) - assert_match(expected, stderr) - end -end diff --git a/Formula/bogofilter.rb b/Formula/bogofilter.rb deleted file mode 100644 index ce3567e5a3eb5..0000000000000 --- a/Formula/bogofilter.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Bogofilter < Formula - desc "Mail filter via statistical analysis" - homepage "https://bogofilter.sourceforge.io" - url "https://downloads.sourceforge.net/project/bogofilter/bogofilter-1.2.4/bogofilter-1.2.4.tar.bz2" - sha256 "e10287a58d135feaea26880ce7d4b9fa2841fb114a2154bf7da8da98aab0a6b4" - revision 2 - - bottle do - sha256 "97a2da30e1c196c31eadbe5a3404258c79fdc9caed9b7c1daba9497442b02aee" => :mojave - sha256 "188368373c8bb9719a459b0f7905818dd4c8ce4303a59152cd47cc43557ff10b" => :high_sierra - sha256 "6366c9e1c254bbf94d2ada013d13fc78dc56c190e1ad148d5a0dded5bd263dbe" => :sierra - sha256 "9c717b7628a0c0428528338880d6cd5d480b3246c3888cbab5a87d3b8b3689e2" => :el_capitan - end - - depends_on "berkeley-db" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/bogofilter", "--version" - end -end diff --git a/Formula/bonnie++.rb b/Formula/bonnie++.rb deleted file mode 100644 index 01bfc942b562c..0000000000000 --- a/Formula/bonnie++.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bonniexx < Formula - desc "Benchmark suite for file systems and hard drives" - homepage "https://www.coker.com.au/bonnie++/" - url "https://www.coker.com.au/bonnie++/bonnie++-1.97.3.tgz" - mirror "https://fossies.org/linux/privat/bonnie++-1.97.3.tgz" - sha256 "e27b386ae0dc054fa7b530aab6bdead7aea6337a864d1f982bc9ebacb320746e" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "6547a5df668f438110419012a9437d2986751575473d03719e08de93466e99c7" => :mojave - sha256 "2039ecd2ab2e7a9cef39e603558aa792942f50e27b5ee3054bd39a66a2ba30a3" => :high_sierra - sha256 "3141753fc2d81aba9129baa76946cb4f2c4cef7ca634c30d86a4b284bfe6480a" => :sierra - sha256 "fd00a22a9744919520bdfd22f01e2ad07d409fbf76a3470b3a9a4c94f06901ed" => :el_capitan - sha256 "0607ae5fac5e62bdfd04b48a524277768145f7ab7f07e2d2f71b6c4b6b40f9eb" => :yosemite - end - - # Remove the #ifdef _LARGEFILE64_SOURCE macros which not only prohibits the - # intended functionality of splitting into 2 GB files for such filesystems but - # also incorrectly tests for it in the first place. The ideal fix would be to - # replace the AC_TRY_RUN() in configure.in if the fail code actually worked. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/57a21ef/bonnie%2B%2B/remove-large-file-support-macros.diff" - sha256 "4d38a57f8a3d99405d945bb27ffe81e0ab542b520f2de6fad021a6ad3ff8a3b6" - end - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{sbin}/bonnie++", "-s", "0" - end -end diff --git a/Formula/bookloupe.rb b/Formula/bookloupe.rb deleted file mode 100644 index e3a8133184250..0000000000000 --- a/Formula/bookloupe.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Bookloupe < Formula - desc "List common formatting errors in a Project Gutenberg candidate file" - homepage "http://www.juiblex.co.uk/pgdp/bookloupe/" - url "http://www.juiblex.co.uk/pgdp/bookloupe/bookloupe-2.0.tar.gz" - sha256 "15b1f5a0fa01e7c0a0752c282f8a354d3dc9edbefc677e6e42044771d5abe3c9" - - bottle do - cellar :any - sha256 "a0a98b728bad89aa1e75a6a6ac3cd359a8d619ba0903db6acff8dc111fb51593" => :mojave - sha256 "4fe58e56ba2306c1edd1d8d9c6cc73c8b8be1a2a9c90cb077c2d19a695af03c0" => :high_sierra - sha256 "8f914d9f48856a9de6e24aaa1fc392f9b99f18fcd49a2688d5dae3272772a96b" => :sierra - sha256 "78a85f95ef2f53a4c6fdba498ab703d8e41273842df43e23b6a8d0d5e043ceed" => :el_capitan - sha256 "787513fe860f0c5afd7d7705a10a4f2604a1210e2898f9eff3c46897c7fbefa1" => :yosemite - sha256 "a696f92c2cf476cdb6f89d01c3f962dbdd52c48ae8b04f0b34cd4de21f6957eb" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV["BOOKLOUPE"] = "#{bin}/bookloupe" - - Dir["#{pkgshare}/*.tst"].each do |test_file| - # Skip test that fails on macOS - # http://project.juiblex.co.uk/bugzilla/show_bug.cgi?id=39 - # (bugzilla page is not publicly accessible) - next if test_file.end_with?("/markup.tst") - - system "#{bin}/loupe-test", test_file - end - end -end diff --git a/Formula/boom-completion.rb b/Formula/boom-completion.rb deleted file mode 100644 index 57afaab5d607c..0000000000000 --- a/Formula/boom-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class BoomCompletion < Formula - desc "Bash and Zsh completion for Boom" - homepage "https://zachholman.com/boom" - url "https://github.com/holman/boom/archive/v0.5.0.tar.gz" - sha256 "d107accf1fb84d9c245bb25383486179605d3b397c439c2f4690341283b0b2dd" - head "https://github.com/holman/boom.git" - - bottle :unneeded - - def install - bash_completion.install "completion/boom.bash" => "boom" - zsh_completion.install "completion/boom.zsh" => "_boom" - end - - test do - assert_match "-F _boom_complete", - shell_output("source #{bash_completion}/boom && complete -p boom") - end -end diff --git a/Formula/boost-bcp.rb b/Formula/boost-bcp.rb deleted file mode 100644 index 045eadbe203b6..0000000000000 --- a/Formula/boost-bcp.rb +++ /dev/null @@ -1,27 +0,0 @@ -class BoostBcp < Formula - desc "Utility for extracting subsets of the Boost library" - homepage "https://www.boost.org/doc/tools/bcp/" - url "https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2" - sha256 "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7" - head "https://github.com/boostorg/boost.git" - - bottle do - cellar :any_skip_relocation - sha256 "8c16e424058e32535221951ee4e67cf37804814f476e421a1fd6b63c2a9faa26" => :mojave - sha256 "95e399c79e9b8a176ae3d9495dac2b3719d8d0a332f4aaeeb94876ec4d3b8d43" => :high_sierra - sha256 "6be0f07faacc2785bdcde5a830cca11fcafa1391b5d379f5672a2a9b401e566e" => :sierra - end - - depends_on "boost-build" => :build - - def install - cd "tools/bcp" do - system "b2" - prefix.install "../../dist/bin" - end - end - - test do - system bin/"bcp", "--help" - end -end diff --git a/Formula/boost-build.rb b/Formula/boost-build.rb deleted file mode 100644 index 8948897f6e8c4..0000000000000 --- a/Formula/boost-build.rb +++ /dev/null @@ -1,36 +0,0 @@ -class BoostBuild < Formula - desc "C++ build system" - homepage "https://www.boost.org/build/" - url "https://github.com/boostorg/build/archive/boost-1.68.0.tar.gz" - sha256 "0b8612f45c43da57f370234f52018d4a6a22e11e0fcd0dff4050a1650d82e294" - version_scheme 1 - head "https://github.com/boostorg/build.git" - - bottle do - cellar :any_skip_relocation - sha256 "968fdb513f199d9ff96f59369339c8f06ffe53262dbfd24579d19e67eb5cceaf" => :mojave - sha256 "2ad7e180a9526558f89b889a26c41c8b63745da4f4486abe2334947ff69950d3" => :high_sierra - sha256 "700eb1116d61b9025fcdffa4f995054facd97d4149144d96d5a41306dd23be1c" => :sierra - end - - conflicts_with "b2-tools", :because => "both install `b2` binaries" - - def install - system "./bootstrap.sh" - system "./b2", "--prefix=#{prefix}", "install" - end - - test do - (testpath/"hello.cpp").write <<~EOS - #include - int main (void) { std::cout << "Hello world"; } - EOS - (testpath/"Jamroot.jam").write("exe hello : hello.cpp ;") - - system bin/"b2", "release" - out = Dir["bin/darwin-*/release/hello"] - assert out.length == 1 - assert_predicate testpath/out[0], :exist? - assert_equal "Hello world", shell_output(out[0]) - end -end diff --git a/Formula/boost-mpi.rb b/Formula/boost-mpi.rb deleted file mode 100644 index 674358c31e5be..0000000000000 --- a/Formula/boost-mpi.rb +++ /dev/null @@ -1,90 +0,0 @@ -class BoostMpi < Formula - desc "C++ library for C++/MPI interoperability" - homepage "https://www.boost.org/" - url "https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2" - sha256 "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7" - head "https://github.com/boostorg/boost.git" - - bottle do - sha256 "f3530194eb7aa995cb9d02fbbd2bbc31ac8f6d985a2930e6a255af356933c4e8" => :mojave - sha256 "7b7870cdfd90c9bd3fbe165ed6b8a7b9c0d201df12e6b9e1a46ec96eff7a37b7" => :high_sierra - sha256 "78c183f2594864fdf99c7780c00323a667fb54e6ca10421951bb9cac498ed9bc" => :sierra - end - - depends_on "boost" - depends_on "open-mpi" - - needs :cxx11 - - def install - # "layout" should be synchronized with boost - args = ["--prefix=#{prefix}", - "--libdir=#{lib}", - "-d2", - "-j#{ENV.make_jobs}", - "--layout=tagged", - "--user-config=user-config.jam", - "threading=multi,single", - "link=shared,static"] - - # Trunk starts using "clang++ -x c" to select C compiler which breaks C++11 - # handling using ENV.cxx11. Using "cxxflags" and "linkflags" still works. - args << "cxxflags=-std=c++11" - if ENV.compiler == :clang - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" - end - - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - file.write "using mpi ;\n" - end - - system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}", "--with-libraries=mpi" - - system "./b2", *args - - lib.install Dir["stage/lib/*mpi*"] - - # libboost_mpi links to libboost_serialization, which comes from the main boost formula - boost = Formula["boost"] - MachO::Tools.change_install_name("#{lib}/libboost_mpi-mt.dylib", - "libboost_serialization-mt.dylib", - "#{boost.lib}/libboost_serialization-mt.dylib") - MachO::Tools.change_install_name("#{lib}/libboost_mpi.dylib", - "libboost_serialization.dylib", - "#{boost.lib}/libboost_serialization.dylib") - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - namespace mpi = boost::mpi; - - int main(int argc, char* argv[]) - { - mpi::environment env(argc, argv); - mpi::communicator world; - - if (world.rank() == 0) { - world.send(1, 0, std::string("Hello")); - std::string msg; - world.recv(1, 1, msg); - std::cout << msg << "!" << std::endl; - } else { - std::string msg; - world.recv(0, 0, msg); - std::cout << msg << ", "; - std::cout.flush(); - world.send(0, 1, std::string("world")); - } - - return 0; - } - EOS - boost = Formula["boost"] - system "mpic++", "test.cpp", "-L#{lib}", "-L#{boost.lib}", "-lboost_mpi", "-lboost_serialization", "-o", "test" - system "mpirun", "-np", "2", "./test" - end -end diff --git a/Formula/boost-python.rb b/Formula/boost-python.rb deleted file mode 100644 index d0c38abd2e5d0..0000000000000 --- a/Formula/boost-python.rb +++ /dev/null @@ -1,75 +0,0 @@ -class BoostPython < Formula - desc "C++ library for C++/Python2 interoperability" - homepage "https://www.boost.org/" - url "https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2" - sha256 "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7" - head "https://github.com/boostorg/boost.git" - - bottle do - cellar :any - sha256 "48b97ffce588620bfcb088feab4f8fb66672193e1f2e26202667ad0a7ca21880" => :mojave - sha256 "7df8a449456e24d5b54f52756effdcd2e7c21137df5c9c6a4ad0d58053b625b9" => :high_sierra - sha256 "d99c58b8b43289bee78a20fa8accc4b67077ee2c5d9c0b941502ed25e8690eb9" => :sierra - end - - depends_on "boost" - - needs :cxx11 - - def install - # "layout" should be synchronized with boost - args = ["--prefix=#{prefix}", - "--libdir=#{lib}", - "-d2", - "-j#{ENV.make_jobs}", - "--layout=tagged", - "threading=multi,single", - "link=shared,static"] - - # Trunk starts using "clang++ -x c" to select C compiler which breaks C++11 - # handling using ENV.cxx11. Using "cxxflags" and "linkflags" still works. - args << "cxxflags=-std=c++11" - if ENV.compiler == :clang - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" - end - - pyver = Language::Python.major_minor_version "python" - - system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}", - "--with-libraries=python", "--with-python=python" - - system "./b2", "--build-dir=build-python", "--stagedir=stage-python", - "python=#{pyver}", *args - - lib.install Dir["stage-python/lib/*py*"] - doc.install Dir["libs/python/doc/*"] - end - - test do - (testpath/"hello.cpp").write <<~EOS - #include - char const* greet() { - return "Hello, world!"; - } - BOOST_PYTHON_MODULE(hello) - { - boost::python::def("greet", greet); - } - EOS - - pyprefix = `python-config --prefix`.chomp - pyincludes = Utils.popen_read("python-config --includes").chomp.split(" ") - pylib = Utils.popen_read("python-config --ldflags").chomp.split(" ") - - system ENV.cxx, "-shared", "hello.cpp", "-L#{lib}", "-lboost_python27", - "-o", "hello.so", "-I#{pyprefix}/include/python2.7", - *pyincludes, *pylib - - output = <<~EOS - from __future__ import print_function - import hello - print(hello.greet()) - EOS - assert_match "Hello, world!", pipe_output("python", output, 0) - end -end diff --git a/Formula/boost-python3.rb b/Formula/boost-python3.rb deleted file mode 100644 index 9ac1860edff4a..0000000000000 --- a/Formula/boost-python3.rb +++ /dev/null @@ -1,102 +0,0 @@ -class BoostPython3 < Formula - desc "C++ library for C++/Python3 interoperability" - homepage "https://www.boost.org/" - url "https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2" - sha256 "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7" - head "https://github.com/boostorg/boost.git" - - bottle do - sha256 "df9783e900573cefa4eb6f454e2c96af5ba25faf0840c01c0f137b82575c580b" => :mojave - sha256 "0783713245f6341b55dd0e4bafb2a4783972ed05e4bbd03db0d821c10903aef3" => :high_sierra - sha256 "064d14b4acde429e7d8713236ebb60f72ae1419cbd84401c7428999118d5d3b5" => :sierra - end - - depends_on "boost" - depends_on "python" - - resource "numpy" do - url "https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip" - sha256 "a4a433b3a264dbc9aa9c7c241e87c0358a503ea6394f8737df1683c7c9a102ac" - end - - needs :cxx11 - - def install - # "layout" should be synchronized with boost - args = ["--prefix=#{prefix}", - "--libdir=#{lib}", - "-d2", - "-j#{ENV.make_jobs}", - "--layout=tagged", - "--user-config=user-config.jam", - "threading=multi,single", - "link=shared,static"] - - # Trunk starts using "clang++ -x c" to select C compiler which breaks C++11 - # handling using ENV.cxx11. Using "cxxflags" and "linkflags" still works. - args << "cxxflags=-std=c++11" - if ENV.compiler == :clang - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" - end - - # disable python detection in bootstrap.sh; it guesses the wrong include - # directory for Python 3 headers, so we configure python manually in - # user-config.jam below. - inreplace "bootstrap.sh", "using python", "#using python" - - pyver = Language::Python.major_minor_version "python3" - py_prefix = Formula["python3"].opt_frameworks/"Python.framework/Versions/#{pyver}" - - numpy_site_packages = buildpath/"homebrew-numpy/lib/python#{pyver}/site-packages" - numpy_site_packages.mkpath - ENV["PYTHONPATH"] = numpy_site_packages - resource("numpy").stage do - system "python3", *Language::Python.setup_install_args(buildpath/"homebrew-numpy") - end - - # Force boost to compile with the desired compiler - (buildpath/"user-config.jam").write <<~EOS - using darwin : : #{ENV.cxx} ; - using python : #{pyver} - : python3 - : #{py_prefix}/include/python#{pyver}m - : #{py_prefix}/lib ; - EOS - - system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}", - "--with-libraries=python", "--with-python=python3", - "--with-python-root=#{py_prefix}" - - system "./b2", "--build-dir=build-python3", "--stagedir=stage-python3", - "python=#{pyver}", *args - - lib.install Dir["stage-python3/lib/*py*"] - doc.install Dir["libs/python/doc/*"] - end - - test do - (testpath/"hello.cpp").write <<~EOS - #include - char const* greet() { - return "Hello, world!"; - } - BOOST_PYTHON_MODULE(hello) - { - boost::python::def("greet", greet); - } - EOS - - pyincludes = Utils.popen_read("python3-config --includes").chomp.split(" ") - pylib = Utils.popen_read("python3-config --ldflags").chomp.split(" ") - pyver = Language::Python.major_minor_version("python3").to_s.delete(".") - - system ENV.cxx, "-shared", "hello.cpp", "-L#{lib}", "-lboost_python#{pyver}", "-o", - "hello.so", *pyincludes, *pylib - - output = <<~EOS - import hello - print(hello.greet()) - EOS - assert_match "Hello, world!", pipe_output("python3", output, 0) - end -end diff --git a/Formula/boost-python@1.59.rb b/Formula/boost-python@1.59.rb deleted file mode 100644 index c0a6089565ca3..0000000000000 --- a/Formula/boost-python@1.59.rb +++ /dev/null @@ -1,88 +0,0 @@ -class BoostPythonAT159 < Formula - desc "C++ library for C++/Python interoperability" - homepage "https://www.boost.org" - url "https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2" - sha256 "727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca" - revision 1 - - bottle do - rebuild 1 - sha256 "41234d5b67b98b22b823c701b88874caaca57053e18f7069f3a40e308e882a2c" => :mojave - sha256 "ab4e76cbdd45a69200580916a736c1aa9d0b76d25ecedd72f3e017804375d43b" => :high_sierra - sha256 "50b61de8e17320c4bd1d095a165cbacb6505631b825133135e4517999079488e" => :sierra - sha256 "79d9b0b2a2af2ddf37af79cc611d27733b3dbba6c5ca5bb86868a5521e9e37dd" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "boost@1.59" - depends_on "python@2" - - def install - # fix make_setter regression - # https://github.com/boostorg/python/pull/40 - inreplace "boost/python/data_members.hpp", - "# if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)", - "# if !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)" - - # "layout" should be synchronized with boost - args = ["--prefix=#{prefix}", - "--libdir=#{lib}", - "-d2", - "-j#{ENV.make_jobs}", - "--layout=tagged", - "--user-config=user-config.jam", - "threading=multi,single", - "link=shared,static"] - - # disable python detection in bootstrap.sh; it guesses the wrong include directory - # for Python 3 headers, so we configure python manually in user-config.jam below. - inreplace "bootstrap.sh", "using python", "#using python" - - Language::Python.each_python(build) do |python, version| - py_prefix = `#{python} -c "from __future__ import print_function; import sys; print(sys.prefix)"`.strip - py_include = `#{python} -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(True))"`.strip - open("user-config.jam", "w") do |file| - # Force boost to compile with the desired compiler - file.write "using darwin : : #{ENV.cxx} ;\n" - file.write <<~EOS - using python : #{version} - : #{python} - : #{py_include} - : #{py_prefix}/lib ; - EOS - end - - system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}", "--with-libraries=python", - "--with-python=#{python}", "--with-python-root=#{py_prefix}" - - system "./b2", "--build-dir=build-#{python}", "--stagedir=stage-#{python}", - "python=#{version}", *args - end - - lib.install Dir["stage-python2.7/lib/*py*"] - doc.install Dir["libs/python/doc/*"] - end - - test do - (testpath/"hello.cpp").write <<~EOS - #include - char const* greet() { - return "Hello, world!"; - } - BOOST_PYTHON_MODULE(hello) - { - boost::python::def("greet", greet); - } - EOS - Language::Python.each_python(build) do |python, _| - boost_python = (python == "python3") ? "boost_python3" : "boost_python" - pyflags = `#{python}-config --includes`.strip.split(" ") + - `#{python}-config --ldflags`.strip.split(" ") - system ENV.cxx, "-shared", "hello.cpp", "-I#{Formula["boost159"].opt_include}", - "-L#{lib}", "-l#{boost_python}", "-o", "hello.so", *pyflags - output = `#{python} -c "from __future__ import print_function; import hello; print(hello.greet())"` - assert_match "Hello, world!", output - end - end -end diff --git a/Formula/boost.rb b/Formula/boost.rb deleted file mode 100644 index 9c2e827adcb61..0000000000000 --- a/Formula/boost.rb +++ /dev/null @@ -1,105 +0,0 @@ -class Boost < Formula - desc "Collection of portable C++ source libraries" - homepage "https://www.boost.org/" - url "https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2" - sha256 "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7" - revision 1 - head "https://github.com/boostorg/boost.git" - - bottle do - cellar :any - sha256 "52d3c80972a0af00b4a5779ca192ef1d2b5792e56acce6ab670b46546ba43418" => :mojave - sha256 "7562a990f0393b8186564fee26cfb908cc21b45bb3bfa52b55d7e78c8d82957f" => :high_sierra - sha256 "0c42d1ba47651b72a761218c2e00143bea3c7771c84319a847225b95dc861aa6" => :sierra - end - - depends_on "icu4c" - - needs :cxx14 - - def install - # Force boost to compile with the desired compiler - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - end - - # libdir should be set by --prefix but isn't - icu4c_prefix = Formula["icu4c"].opt_prefix - bootstrap_args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - --with-icu=#{icu4c_prefix} - ] - - # Handle libraries that will not be built. - without_libraries = ["python", "mpi"] - - # Boost.Log cannot be built using Apple GCC at the moment. Disabled - # on such systems. - without_libraries << "log" if ENV.compiler == :gcc - - bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" - - # layout should be synchronized with boost-python and boost-mpi - args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - -d2 - -j#{ENV.make_jobs} - --layout=tagged - --user-config=user-config.jam - -sNO_LZMA=1 - install - threading=multi,single - link=shared,static - ] - - # Boost is using "clang++ -x c" to select C compiler which breaks C++14 - # handling using ENV.cxx14. Using "cxxflags" and "linkflags" still works. - args << "cxxflags=-std=c++14" - if ENV.compiler == :clang - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" - end - - system "./bootstrap.sh", *bootstrap_args - system "./b2", "headers" - system "./b2", *args - end - - def caveats - s = "" - # ENV.compiler doesn't exist in caveats. Check library availability - # instead. - if Dir["#{lib}/libboost_log*"].empty? - s += <<~EOS - Building of Boost.Log is disabled because it requires newer GCC or Clang. - EOS - end - - s - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - using namespace boost::algorithm; - using namespace std; - - int main() - { - string str("a,b"); - vector strVec; - split(strVec, str, is_any_of(",")); - assert(strVec.size()==2); - assert(strVec[0]=="a"); - assert(strVec[1]=="b"); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-L#{lib}", "-lboost_system", "-o", "test" - system "./test" - end -end diff --git a/Formula/boost@1.55.rb b/Formula/boost@1.55.rb deleted file mode 100644 index 1a9710befd847..0000000000000 --- a/Formula/boost@1.55.rb +++ /dev/null @@ -1,119 +0,0 @@ -class BoostAT155 < Formula - desc "Collection of portable C++ source libraries" - homepage "https://www.boost.org" - url "https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2" - sha256 "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "655c9b514a797113af2e4199457ccb9dd8d8e0364f227390f0ca54b254439f2a" => :mojave - sha256 "15894f998719ef4130d2dea076accadb709a6d5d0809114452f5175585ccd454" => :high_sierra - sha256 "16a7e98e578adbf8c353bc868b9cd98e80b41928329743dba1b54ee53d76295c" => :sierra - end - - keg_only :versioned_formula - - # Patches boost::atomic for LLVM 3.4 as it is used on OS X 10.9 with Xcode 5.1 - # https://github.com/Homebrew/homebrew/issues/27396 - # https://github.com/Homebrew/homebrew/pull/27436 - patch :p2 do - url "https://github.com/boostorg/atomic/commit/6bb71fdd.diff?full_index=1" - sha256 "1574ef5c1c3ec28cf3786e40e4a8608f2bbb1c426ef2f14a2515e7a1a9313fab" - end - - patch :p2 do - url "https://github.com/boostorg/atomic/commit/e4bde20f.diff?full_index=1" - sha256 "fa6676d83993c59e3566fff105f7e99c193a54ef7dba5c3b327ebdb5b6dcba37" - end - - # Patch fixes upstream issue reported here (https://svn.boost.org/trac/boost/ticket/9698). - # Will be fixed in Boost 1.56 and can be removed once that release is available. - # See this issue (https://github.com/Homebrew/homebrew/issues/30592) for more details. - - patch :p2 do - url "https://github.com/boostorg/chrono/commit/143260d.diff?full_index=1" - sha256 "96ba2f3a028df323e9bdffb400cc7c30c0c67e3d681c8c5a867c40ae0549cb62" - end - - def install - # Patch boost::serialization for Clang - # https://svn.boost.org/trac/boost/raw-attachment/ticket/8757/0005-Boost.S11n-include-missing-algorithm.patch - inreplace "boost/archive/iterators/transform_width.hpp", - "#include ", - "#include \n#include " - - # Force boost to compile using the appropriate GCC version. - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - end - - # We specify libdir too because the script is apparently broken - bargs = %W[--prefix=#{prefix} --libdir=#{lib} --without-icu] - - # Handle libraries that will not be built. - without_libraries = ["mpi", "python"] - - # Boost.Log cannot be built using Apple GCC at the moment. Disabled - # on such systems. - without_libraries << "log" if ENV.compiler == :gcc - - bargs << "--without-libraries=#{without_libraries.join(",")}" - - args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - -d2 - -j#{ENV.make_jobs} - --layout=tagged - --user-config=user-config.jam - install - threading=multi,single - link=shared,static - ] - - system "./bootstrap.sh", *bargs - system "./b2", *args - end - - def caveats - s = "" - # ENV.compiler doesn"t exist in caveats. Check library availability - # instead. - if Dir["#{lib}/libboost_log*"].empty? - s += <<~EOS - Building of Boost.Log is disabled because it requires newer GCC or Clang. - EOS - end - - s - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - #include - using namespace boost::algorithm; - using namespace std; - int main() - { - string str("a,b"); - vector strVec; - split(strVec, str, is_any_of(",")); - assert(strVec.size()==2); - assert(strVec[0]=="a"); - assert(strVec[1]=="b"); - - assert(strcmp(BOOST_LIB_VERSION, "1_55") == 0); - - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-I#{include}", "-L#{lib}", "-lboost_system", "-o", "test" - system "./test" - end -end diff --git a/Formula/boost@1.57.rb b/Formula/boost@1.57.rb deleted file mode 100644 index eadecfdfca8ba..0000000000000 --- a/Formula/boost@1.57.rb +++ /dev/null @@ -1,95 +0,0 @@ -class BoostAT157 < Formula - desc "Collection of portable C++ source libraries" - homepage "https://www.boost.org" - url "https://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2" - sha256 "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967" - - bottle do - cellar :any - sha256 "662ca2c70c493d0ad0715f93daedf518dfda501bc55de18bc6f393f2e541c075" => :mojave - sha256 "a9eab1fbd081d88a4ee1d8102a038784b46ef98d77f11943793f8445341871ae" => :high_sierra - sha256 "2a5722e316d528b2ee1b290c2bda772c19c426f32c8bcb6609c250d68c59d6cb" => :sierra - sha256 "1c2b58d63f0d0f24a07cb60653cf1e674b78f4529c5e7b89ea4208d4db8fb494" => :el_capitan - sha256 "993b2b875755b7a1b0b7bbb97269545705fa3b30df3e4a03868c0e53a1dc7599" => :yosemite - end - - keg_only :versioned_formula - - def install - # Force boost to compile with the desired compiler - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - end - - # libdir should be set by --prefix but isn't - bootstrap_args = %W[ - --prefix=#{prefix} - --libdir=#{lib}" - --without-icu - ] - - # Handle libraries that will not be built. - without_libraries = ["python", "mpi"] - - # Boost.Log cannot be built using Apple GCC at the moment. Disabled - # on such systems. - without_libraries << "log" if ENV.compiler == :gcc - - bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" - - # layout should be synchronized with boost-python - args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - -d2 - -j#{ENV.make_jobs} - --layout=tagged - --user-config=user-config.jam - install - link=shared,static - threading=multi,single - ] - - system "./bootstrap.sh", *bootstrap_args - system "./b2", "headers" - system "./b2", *args - end - - def caveats - s = "" - # ENV.compiler doesn't exist in caveats. Check library availability - # instead. - if Dir["#{lib}/libboost_log*"].empty? - s += <<~EOS - Building of Boost.Log is disabled because it requires newer GCC or Clang. - EOS - end - - s - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - using namespace boost::algorithm; - using namespace std; - - int main() - { - string str("a,b"); - vector strVec; - split(strVec, str, is_any_of(",")); - assert(strVec.size()==2); - assert(strVec[0]=="a"); - assert(strVec[1]=="b"); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-I#{include}", "-L#{lib}", - "-lboost_system", "-o", "test" - system "./test" - end -end diff --git a/Formula/boost@1.59.rb b/Formula/boost@1.59.rb deleted file mode 100644 index 0c1afeb755e59..0000000000000 --- a/Formula/boost@1.59.rb +++ /dev/null @@ -1,111 +0,0 @@ -class BoostAT159 < Formula - desc "Collection of portable C++ source libraries" - homepage "https://www.boost.org" - url "https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2" - sha256 "727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca" - - bottle do - cellar :any - sha256 "ca391db45d5398ad1029527645bc35159083ba5b0c911728649231bdfe551ca2" => :mojave - sha256 "6566d6a5c983add1b25e56b95ef540ce32b6fff5625aebbda81efbaf1618c9aa" => :high_sierra - sha256 "8d21c9071cb5229469bef25efd3c598dc8d821c57581f4aa08fdfd265a88a9d9" => :sierra - sha256 "1e061c511462de8c8ab16004d34691b70c2ef65ea0e4ca85f099b8960cd99421" => :el_capitan - sha256 "62161b5048eb58ab7df1a3f7adccd51e4ae5f10a82a01af2afd26186231f6936" => :yosemite - end - - keg_only :versioned_formula - - # Fixed compilation of operator<< into a record ostream, when - # the operator right hand argument is not directly supported by - # formatting_ostream. Fixed https://svn.boost.org/trac/boost/ticket/11549 - # from https://github.com/boostorg/log/commit/7da193f.patch - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/2ccb6715b3/boost/boost159-questionable-operator.patch" - sha256 "a49fd7461d9f3b478d2bddac19adca93fe0fabab71ee67e8f140cbd7d42d6870" - end - - # Fixed missing symbols in libboost_log_setup (on mac/clang) - # from https://github.com/boostorg/log/commit/870284ed31792708a6139925d00a0aadf46bf09f - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/2ccb6715b3/boost/boost159-missing-symbols.patch" - sha256 "2c3a3bae1691df5f8fce8fbd4e5727d57bd4dd813748b70d7471c855c4f19d1c" - end - - def install - # Force boost to compile with the desired compiler - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - end - - # libdir should be set by --prefix but isn't - bootstrap_args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - --without-icu - ] - - # Handle libraries that will not be built. - without_libraries = ["python", "mpi"] - - # Boost.Log cannot be built using Apple GCC at the moment. Disabled - # on such systems. - without_libraries << "log" if ENV.compiler == :gcc - - bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" - - # layout should be synchronized with boost-python - args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - -d2 - -j#{ENV.make_jobs} - --layout=tagged - --user-config=user-config.jam - install - threading=multi,single - link=shared,static - ] - - system "./bootstrap.sh", *bootstrap_args - system "./b2", "headers" - system "./b2", *args - end - - def caveats - s = "" - # ENV.compiler doesn't exist in caveats. Check library availability - # instead. - if Dir["#{lib}/libboost_log*"].empty? - s += <<~EOS - Building of Boost.Log is disabled because it requires newer GCC or Clang. - EOS - end - - s - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - using namespace boost::algorithm; - using namespace std; - - int main() - { - string str("a,b"); - vector strVec; - split(strVec, str, is_any_of(",")); - assert(strVec.size()==2); - assert(strVec[0]=="a"); - assert(strVec[1]=="b"); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-I#{include}", "-L#{lib}", - "-lboost_system", "-o", "test" - system "./test" - end -end diff --git a/Formula/boost@1.60.rb b/Formula/boost@1.60.rb deleted file mode 100644 index d4b66b86c05fd..0000000000000 --- a/Formula/boost@1.60.rb +++ /dev/null @@ -1,123 +0,0 @@ -class BoostAT160 < Formula - desc "Collection of portable C++ source libraries" - homepage "https://www.boost.org/" - url "https://downloads.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.bz2" - sha256 "686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b" - - bottle do - cellar :any - sha256 "7a94d461c3b8a3859ad52e87ad82c7fc18f36b53a3a85dea88faa733a5c9f000" => :mojave - sha256 "50568fe023b32cf9664b023d65d43d7f8e79bfa73415186f63a3faf0b4ae7cc8" => :high_sierra - sha256 "8ab5b0be67a534c2340b488d27ebc51ccb088c49735949da4c0099359c6ef9f1" => :sierra - sha256 "f6ef8ae275a8d0c03969eceb248235dbeafd4316d1c97f6a9b79d8aa4ef71027" => :el_capitan - sha256 "489a6420dc137a356ad300cb10a519073adbf99573515601f6bb87ff5a6622b3" => :yosemite - end - - keg_only :versioned_formula - - # Handle compile failure with boost/graph/adjacency_matrix.hpp - # https://github.com/Homebrew/homebrew/pull/48262 - # https://svn.boost.org/trac/boost/ticket/11880 - # patch derived from https://github.com/boostorg/graph/commit/1d5f43d - patch :DATA - - # Fix auto-pointer registration in 1.60 - # https://github.com/boostorg/python/pull/59 - # patch derived from https://github.com/boostorg/python/commit/f2c465f - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/9e56b45/boost/boost1_60_0_python_class_metadata.diff" - sha256 "1a470c3a2738af409f68e3301eaecd8d07f27a8965824baf8aee0adef463b844" - end - - def install - # Force boost to compile with the desired compiler - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - end - - # libdir should be set by --prefix but isn't - bootstrap_args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - --without-icu - ] - - # Handle libraries that will not be built. - without_libraries = ["python", "mpi"] - - # Boost.Log cannot be built using Apple GCC at the moment. Disabled - # on such systems. - without_libraries << "log" if ENV.compiler == :gcc - - bootstrap_args << "--without-libraries=#{without_libraries.join(",")}" - - # layout should be synchronized with boost-python - args = %W[ - --prefix=#{prefix} - --libdir=#{lib} - -d2 - -j#{ENV.make_jobs} - --layout=tagged - --user-config=user-config.jam - install - threading=multi,single - link=shared,static - ] - - system "./bootstrap.sh", *bootstrap_args - system "./b2", "headers" - system "./b2", *args - end - - def caveats - s = "" - # ENV.compiler doesn't exist in caveats. Check library availability - # instead. - if Dir["#{lib}/libboost_log*"].empty? - s += <<~EOS - Building of Boost.Log is disabled because it requires newer GCC or Clang. - EOS - end - - s - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - using namespace boost::algorithm; - using namespace std; - - int main() - { - string str("a,b"); - vector strVec; - split(strVec, str, is_any_of(",")); - assert(strVec.size()==2); - assert(strVec[0]=="a"); - assert(strVec[1]=="b"); - return 0; - } - EOS - system ENV.cxx, "-I#{include}", "test.cpp", "-std=c++1y", "-L#{lib}", - "-lboost_system", "-o", "test" - system "./test" - end -end - -__END__ -diff -Nur boost_1_60_0/boost/graph/adjacency_matrix.hpp boost_1_60_0-patched/boost/graph/adjacency_matrix.hpp ---- boost_1_60_0/boost/graph/adjacency_matrix.hpp 2015-10-23 05:50:19.000000000 -0700 -+++ boost_1_60_0-patched/boost/graph/adjacency_matrix.hpp 2016-01-19 14:03:29.000000000 -0800 -@@ -443,7 +443,7 @@ - // graph type. Instead, use directedS, which also provides the - // functionality required for a Bidirectional Graph (in_edges, - // in_degree, etc.). -- BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same::value)>::value); -+ BOOST_STATIC_ASSERT(!(is_same::value)); - - typedef typename mpl::if_::type diff --git a/Formula/boot-clj.rb b/Formula/boot-clj.rb deleted file mode 100644 index ec8686b417155..0000000000000 --- a/Formula/boot-clj.rb +++ /dev/null @@ -1,18 +0,0 @@ -class BootClj < Formula - desc "Build tooling for Clojure" - homepage "https://boot-clj.com/" - url "https://github.com/boot-clj/boot-bin/releases/download/2.7.2/boot.sh" - sha256 "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3" - - bottle :unneeded - - depends_on :java - - def install - bin.install "boot.sh" => "boot" - end - - test do - system "#{bin}/boot", "repl", "-e", "(System/exit 0)" - end -end diff --git a/Formula/borg.rb b/Formula/borg.rb deleted file mode 100644 index 7914b21ca5ae1..0000000000000 --- a/Formula/borg.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "language/go" - -class Borg < Formula - desc "Terminal based search engine for bash commands" - homepage "https://github.com/ok-borg/borg" - url "https://github.com/ok-borg/borg/archive/v0.0.3.tar.gz" - sha256 "d90a55b9c25c2b1fa0c662f1f22fa79f19e77479ad10368756ddf2fa9bee21cc" - - bottle do - cellar :any_skip_relocation - sha256 "64101a697ea132b7987ad365a92bc06bb0362963fd00d41589c3f12c07d05571" => :mojave - sha256 "9fe24cedf3b86f48d3d70a22cd161145d690fb0592d6169ccc175e874a89a209" => :high_sierra - sha256 "bd251596f570c3ec103d60ad04f78626c69a79cc20fe99f5bc483ffce12b695f" => :sierra - sha256 "f88e6457bfdd91b124d18395f80c988ae0ef4020153f43028ccdfd4e5fdff0e8" => :el_capitan - sha256 "4b4c4781a4b90104c1bda9243bb3d8f901eba9e57a3e2f2d923bf573e5065819" => :yosemite - end - - depends_on "go" => :build - - go_resource "github.com/fatih/color" do - url "https://github.com/fatih/color.git", - :revision => "9131ab34cf20d2f6d83fdc67168a5430d1c7dc23" - end - - go_resource "github.com/juju/gnuflag" do - url "https://github.com/juju/gnuflag.git", - :revision => "4e76c56581859c14d9d87e1ddbe29e1c0f10195f" - end - - go_resource "gopkg.in/yaml.v2" do - url "https://gopkg.in/yaml.v2.git", - :revision => "a3f3340b5840cee44f372bddb5880fcbc419b46a" - end - - def install - ENV["GOPATH"] = buildpath - - Language::Go.stage_deps resources, buildpath/"src" - (buildpath/"src/github.com/ok-borg").mkpath - ln_s buildpath, buildpath/"src/github.com/ok-borg/borg" - system "go", "build", "-o", bin/"borg", "github.com/ok-borg/borg" - end - - test do - system "#{bin}/borg", "-p", "brew" - end -end diff --git a/Formula/bork.rb b/Formula/bork.rb deleted file mode 100644 index b248fe91471c2..0000000000000 --- a/Formula/bork.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Bork < Formula - desc "Bash-Operated Reconciling Kludge" - homepage "https://github.com/mattly/bork" - url "https://github.com/mattly/bork/archive/v0.11.1.tar.gz" - sha256 "4dabfca259cc529a19597c6f748f1492985ee2f6d7ac88cf70fa621b99f7a927" - head "https://github.com/mattly/bork.git" - - bottle :unneeded - - def install - prefix.install %w[bin docs lib test types] - end - - test do - expected_output = "checking: directory #{testpath}/foo\r" \ - "missing: directory #{testpath}/foo \n" \ - "verifying : directory #{testpath}/foo\n" \ - "* success\n" - assert_match expected_output, shell_output("#{bin}/bork do ok directory #{testpath}/foo", 1) - end -end diff --git a/Formula/botan.rb b/Formula/botan.rb deleted file mode 100644 index 7cda00a0112d9..0000000000000 --- a/Formula/botan.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Botan < Formula - desc "Cryptographic algorithms and formats library in C++" - homepage "https://botan.randombit.net/" - url "https://botan.randombit.net/releases/Botan-2.8.0.tgz" - sha256 "e7159b127e91e0c158245d61c638c50d443ec7b440b6b0161328c47b3aba3960" - head "https://github.com/randombit/botan.git" - - bottle do - sha256 "254a3808f9924a3e1daee51697234911d35d0d0b188ad33a9e3caea39083fc0b" => :mojave - sha256 "16ef82ba1f86ccc877d773b8baf06139d89721b85285f34c7539a824de6d67f0" => :high_sierra - sha256 "3190ec5c9f0d790edecb5996a7d675cd92bc7268e076bca5bdb88f358c4b706c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - needs :cxx11 - - def install - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --docdir=share/doc - --cpu=#{MacOS.preferred_arch} - --cc=#{ENV.compiler} - --os=darwin - --with-openssl - --with-zlib - --with-bzip2 - ] - - system "./configure.py", *args - system "make", "install" - end - - test do - (testpath/"test.txt").write "Homebrew" - (testpath/"testout.txt").write Utils.popen_read("#{bin}/botan base64_enc test.txt") - assert_match "Homebrew", shell_output("#{bin}/botan base64_dec testout.txt") - end -end diff --git a/Formula/bower.rb b/Formula/bower.rb deleted file mode 100644 index 24e8427975aff..0000000000000 --- a/Formula/bower.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/node" - -class Bower < Formula - desc "Package manager for the web" - homepage "https://bower.io/" - # Use Github tarball to avoid bowers npm 4+ incompatible bundled dep usage - url "https://github.com/bower/bower/archive/v1.8.4.tar.gz" - sha256 "62a6f019638e2a1628d2434a3c62cb62f8d88528fee9abaf6199d203e68cffbc" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "71091cd752679276938b3d522b3a3208028ac39d7567621c6be01d9ff8176208" => :mojave - sha256 "055539589006d7eeb83b1ce11bf54e120660790c5795fc73acf5842691984e6e" => :high_sierra - sha256 "aaaf74c6e92afb1cb2f2907a8e8380414915aac75a00e03c2356a6099b33520e" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - system bin/"bower", "install", "jquery" - assert_predicate testpath/"bower_components/jquery/dist/jquery.min.js", :exist?, "jquery.min.js was not installed" - end -end diff --git a/Formula/bowtie2.rb b/Formula/bowtie2.rb deleted file mode 100644 index eab45cb7fc981..0000000000000 --- a/Formula/bowtie2.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Bowtie2 < Formula - desc "Fast and sensitive gapped read aligner" - homepage "https://bowtie-bio.sourceforge.io/bowtie2/" - url "https://github.com/BenLangmead/bowtie2/archive/v2.3.4.3.tar.gz" - sha256 "f10fc386277677329f4b9d1cb6951e6b8e6c125f07438476bd3653c79ad00b07" - - bottle do - cellar :any - sha256 "c9c2753e56da817661b09b4822f2ec1e1eb00c429633424e2a502dbf29880495" => :mojave - sha256 "562800996db7ebac416557a1975f73dbf37b670bf86bb16e4ff5facb2bd69ef0" => :high_sierra - sha256 "95abc01c20f7f0d6db733f3f21ef8b4421e7bdbb22c919d7776933bec30d81e1" => :sierra - end - - depends_on "tbb" - - def install - tbb = Formula["tbb"] - system "make", "install", "WITH_TBB=1", "prefix=#{prefix}", - "EXTRA_FLAGS=-L #{tbb.opt_lib}", "INC=-I #{tbb.opt_include}" - - pkgshare.install "example", "scripts" - end - - test do - system "#{bin}/bowtie2-build", - "#{pkgshare}/example/reference/lambda_virus.fa", "lambda_virus" - assert_predicate testpath/"lambda_virus.1.bt2", :exist?, - "Failed to create viral alignment lambda_virus.1.bt2" - end -end diff --git a/Formula/boxes.rb b/Formula/boxes.rb deleted file mode 100644 index 80546b35c4c0d..0000000000000 --- a/Formula/boxes.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Boxes < Formula - desc "Draw boxes around text" - homepage "https://boxes.thomasjensen.com/" - url "https://github.com/ascii-boxes/boxes/archive/v1.2.tar.gz" - sha256 "ba237f6d4936bdace133d5f370674fd4c63bf0d767999a104bada6460c5d1913" - head "https://github.com/ascii-boxes/boxes.git" - - bottle do - sha256 "167012f25ea394f6fb7a907219701234d0611be994c0f6caa7ccb13b453e3a17" => :mojave - sha256 "6823ac1ae744b9c1c39dedd056674b39200990de61d3035962a7da5221a57ec2" => :high_sierra - sha256 "ebb5d353fb518ceb79ad3f52c0e53e867c5fc7bef1577cdca712ce91e522af56" => :sierra - sha256 "6f0a27e8bad4e4294bf4b4f82d1774eaf987cc7e8e6486f3204619ab84f01b13" => :el_capitan - sha256 "ae79b8cff43636d551a7f3e34dd74c5d6c15c526c79b6a9ad6b0fb2d3b60c0e0" => :yosemite - end - - def install - # distro uses /usr/share/boxes change to prefix - system "make", "GLOBALCONF=#{share}/boxes-config", "CC=#{ENV.cc}" - - bin.install "src/boxes" - man1.install "doc/boxes.1" - share.install "boxes-config" - end - - test do - assert_match "test brew", pipe_output("#{bin}/boxes", "test brew") - end -end diff --git a/Formula/bpm-tools.rb b/Formula/bpm-tools.rb deleted file mode 100644 index eff80eeb15f25..0000000000000 --- a/Formula/bpm-tools.rb +++ /dev/null @@ -1,20 +0,0 @@ -class BpmTools < Formula - desc "Detect tempo of audio files using beats-per-minute (BPM)" - homepage "http://www.pogo.org.uk/~mark/bpm-tools/" - url "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-0.3.tar.gz" - sha256 "37efe81ef594e9df17763e0a6fc29617769df12dfab6358f5e910d88f4723b94" - head "http://www.pogo.org.uk/~mark/bpm-tools.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cbfaeff9a82a4363fc1d3b329f490c05fd89b2eb7534e295daf9cbee0bc3d930" => :mojave - sha256 "12cab436d4ef0983a5961ebbb3daee3ad6965ef956fb5837708c8f1451b03670" => :high_sierra - sha256 "1ae085b87f736d2b87214589e44f248697bd7136789407b487adc1b83674f72e" => :sierra - end - - def install - system "make" - bin.install "bpm" - end -end diff --git a/Formula/brag.rb b/Formula/brag.rb deleted file mode 100644 index ce61e7970649f..0000000000000 --- a/Formula/brag.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Brag < Formula - desc "Download and assemble multipart binaries from newsgroups" - homepage "https://brag.sourceforge.io/" - url "https://downloads.sourceforge.net/project/brag/brag/1.4.3/brag-1.4.3.tar.gz" - sha256 "f2c8110c38805c31ad181f4737c26e766dc8ecfa2bce158197b985be892cece6" - - bottle :unneeded - - depends_on "uudeview" - - def install - bin.install "brag" - man1.install "brag.1" - end - - test do - system "#{bin}/brag", "-s", "nntp.perl.org", "-L" - end -end diff --git a/Formula/braid.rb b/Formula/braid.rb deleted file mode 100644 index bc95c83596922..0000000000000 --- a/Formula/braid.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Braid < Formula - desc "Simple tool to help track vendor branches in a Git repository" - homepage "https://cristibalan.github.io/braid/" - url "https://github.com/cristibalan/braid.git", - :tag => "v1.1.2", - :revision => "4a7eea721fd9c841e305b19ebd6e8c7006c52f53" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f43df0863e356c8cd8e6bbe4a791f5de6ef8780e6e43e4b497dfc965a828651d" => :mojave - sha256 "a874f82399695d859a6e8d48fa5bd04f60e0a3426891832355558f60985bdd05" => :high_sierra - sha256 "4fc6aff7f3dc2efe529f00027f9255ac184c0853b3a7646cabe09a4f33fb8e17" => :sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - resource "arrayfields" do - url "https://rubygems.org/gems/arrayfields-4.9.2.gem" - sha256 "1593f0bac948e24aa5e5099b7994b0fb5da69b6f29a82804ccf496bc125de4ab" - end - - resource "chronic" do - url "https://rubygems.org/gems/chronic-0.10.2.gem" - sha256 "766f2fcce6ac3cc152249ed0f2b827770d3e517e2e87c5fba7ed74f4889d2dc3" - end - - if MacOS.version <= :sierra - resource "json" do - url "https://rubygems.org/gems/json-2.1.0.gem" - sha256 "b76fd09b881088c6c64a12721a1528f2f747a1c2ee52fab4c1f60db8af946607" - end - end - - resource "fattr" do - url "https://rubygems.org/gems/fattr-2.3.0.gem" - sha256 "0430a798270a7097c8c14b56387331808b8d9bb83904ba643b196c895bdf5993" - end - - resource "main" do - url "https://rubygems.org/gems/main-6.2.2.gem" - sha256 "af04ee3eb4b7455eb5ab17e98ab86b0dad8b8420ad3ae605313644a4c6f49675" - end - - resource "map" do - url "https://rubygems.org/gems/map-6.6.0.gem" - sha256 "153a6f384515b14085805f5839d318f9d3c9dab676f341340fa4300150373cbc" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - r.verify_download_integrity(r.fetch) - system "gem", "install", r.cached_download, "--ignore-dependencies", - "--no-document", "--install-dir", libexec - end - system "gem", "build", "braid.gemspec" - system "gem", "install", "--ignore-dependencies", "braid-#{version}.gem" - bin.install libexec/"bin/braid" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - system "git", "init" - (testpath/"README").write "Testing" - (testpath/".gitignore").write "Library" - system "git", "add", "README", ".gitignore" - system "git", "commit", "-m", "Initial commit" - output = shell_output("#{bin}/braid add https://github.com/cristibalan/braid.git") - assert_match "Braid: Added mirror at '", output - assert_match "braid (", shell_output("#{bin}/braid status") - end -end diff --git a/Formula/brainfuck.rb b/Formula/brainfuck.rb deleted file mode 100644 index a08e27f0b167e..0000000000000 --- a/Formula/brainfuck.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Brainfuck < Formula - desc "Interpreter for the brainfuck language" - homepage "https://github.com/fabianishere/brainfuck" - url "https://github.com/fabianishere/brainfuck/archive/2.7.1.tar.gz" - sha256 "06534de715dbc614f08407000c2ec6d497770069a2d7c84defd421b137313d71" - head "https://github.com/fabianishere/brainfuck.git" - - bottle do - cellar :any - sha256 "a9e9509e4f0cd5345ffeac741c3a74d5575e17c99ea53822dd77fd4f98687b57" => :mojave - sha256 "cf3c31fcf7c4cf099b348d01e619d1791aa3a255199de80afbc637e331947abf" => :high_sierra - sha256 "354bb3372301325b49bfd4bd9b53084061af3bc3a3d6375e1c4635297c0dd008" => :sierra - sha256 "f8289bed7e6455b63f05baf367069f60fe478f6c78f064c06ab1e571a181c3b7" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args, "-DBUILD_SHARED_LIB=ON", - "-DBUILD_STATIC_LIB=ON", "-DINSTALL_EXAMPLES=ON" - system "make", "install" - end - - test do - output = shell_output("#{bin}/brainfuck -e '++++++++[>++++++++<-]>+.+.+.'") - assert_equal "ABC", output.chomp - end -end diff --git a/Formula/brew-cask-completion.rb b/Formula/brew-cask-completion.rb deleted file mode 100644 index d66ca8d9ca9f9..0000000000000 --- a/Formula/brew-cask-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class BrewCaskCompletion < Formula - desc "Fish completion for brew-cask" - homepage "https://github.com/xyb/homebrew-cask-completion" - url "https://github.com/xyb/homebrew-cask-completion/archive/v2.1.tar.gz" - sha256 "27c7ea3b7f7c060f5b5676a419220c4ce6ebf384237e859a61c346f61c8f7a1b" - revision 1 - head "https://github.com/xyb/homebrew-cask-completion.git" - - bottle :unneeded - - def install - fish_completion.install "brew-cask.fish" - end - - test do - assert_predicate fish_completion/"brew-cask.fish", :exist? - end -end diff --git a/Formula/brew-gem.rb b/Formula/brew-gem.rb deleted file mode 100644 index db97f6cf1f986..0000000000000 --- a/Formula/brew-gem.rb +++ /dev/null @@ -1,18 +0,0 @@ -class BrewGem < Formula - desc "Install RubyGems as Homebrew formulae" - homepage "https://github.com/sportngin/brew-gem" - url "https://github.com/sportngin/brew-gem/archive/v0.9.0.tar.gz" - sha256 "199835dc89739f4c9bab7e465e3e2e2140af0c974c57ee4ebd2048a05b09dde1" - head "https://github.com/sportngin/brew-gem.git" - - bottle :unneeded - - def install - lib.install Dir["lib/*"] - bin.install "bin/brew-gem" - end - - test do - system "#{bin}/brew-gem", "help" - end -end diff --git a/Formula/brew-php-switcher.rb b/Formula/brew-php-switcher.rb deleted file mode 100644 index 5be8d5c1d5c68..0000000000000 --- a/Formula/brew-php-switcher.rb +++ /dev/null @@ -1,21 +0,0 @@ -class BrewPhpSwitcher < Formula - desc "Switch Apache / Valet / CLI configs between PHP versions" - homepage "https://github.com/philcook/php-switcher" - url "https://github.com/philcook/brew-php-switcher/archive/v2.0.tar.gz" - sha256 "c2303b1b1a66ee90ed900c3beabacd6aa4e921dbcad5242e399c45d86899bc88" - head "https://github.com/philcook/brew-php-switcher.git" - - bottle :unneeded - - depends_on "php" => :test - - def install - bin.install "phpswitch.sh" - bin.install_symlink "phpswitch.sh" => "brew-php-switcher" - end - - test do - assert_match "usage: brew-php-switcher version", - shell_output("#{bin}/brew-php-switcher") - end -end diff --git a/Formula/brew-pip.rb b/Formula/brew-pip.rb deleted file mode 100644 index b83b78ec6ef66..0000000000000 --- a/Formula/brew-pip.rb +++ /dev/null @@ -1,16 +0,0 @@ -class BrewPip < Formula - desc "Install pip packages as homebrew formulae" - homepage "https://github.com/hanxue/brew-pip" - url "https://github.com/hanxue/brew-pip/archive/0.4.1.tar.gz" - sha256 "9049a6db97188560404d8ecad2a7ade72a4be4338d5241097d3e3e8e215cda28" - - bottle :unneeded - - def install - bin.install "bin/brew-pip" - end - - test do - system "#{bin}/brew-pip", "help" - end -end diff --git a/Formula/brightness.rb b/Formula/brightness.rb deleted file mode 100644 index 25808531aa268..0000000000000 --- a/Formula/brightness.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Brightness < Formula - desc "Change macOS display brightness from the command-line" - homepage "https://github.com/nriley/brightness" - url "https://github.com/nriley/brightness/archive/1.2.tar.gz" - sha256 "6094c9f0d136f4afaa823d299f5ea6100061c1cec7730bf45c155fd98761f86b" - - bottle do - cellar :any_skip_relocation - sha256 "de0ebf57bf951ab4e90a8bb90eeb0ec659a696a7c2f10a5c32d269cceee44dce" => :mojave - sha256 "08b29843308b1cd3603aba3f2e5e3d2e7dec34dbe62bdb5e506b7bacdcff8df5" => :high_sierra - sha256 "edd4123953a961e94ce78b076b116c987f668ca73e0a67339e908ead6ded8441" => :sierra - sha256 "675d9a1b7e39b75d2b569fa4f148fbc2342dbcd4a1b23045763c0103058ecc26" => :el_capitan - sha256 "360b009d1a2ffed665c9d9168b3f91edba44c8da8f08d2f307b09ee63f399e0d" => :yosemite - sha256 "222e314519f00aa2ad858c718f0dbed624f486f307828ed93a85d1df4e08a8f8" => :mavericks - end - - def install - system "make" - system "make", "prefix=#{prefix}", "install" - end - - test do - system "#{bin}/brightness", "-l" - end -end diff --git a/Formula/briss.rb b/Formula/briss.rb deleted file mode 100644 index 2a66965ac71c5..0000000000000 --- a/Formula/briss.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Briss < Formula - desc "Crop PDF files" - homepage "https://briss.sourceforge.io/" - url "https://downloads.sourceforge.net/project/briss/release%200.9/briss-0.9.tar.gz" - sha256 "45dd668a9ceb9cd59529a9fefe422a002ee1554a61be07e6fc8b3baf33d733d9" - - bottle :unneeded - - def install - libexec.install Dir["*.jar"] - bin.write_jar_script libexec/"briss-#{version}.jar", "briss" - end - - test do - cp test_fixtures("test.pdf"), testpath - system "#{bin}/briss", "-s", "test.pdf", "-d", "output.pdf" - assert_predicate testpath/"output.pdf", :exist? - end -end diff --git a/Formula/bro.rb b/Formula/bro.rb deleted file mode 100644 index d14fdc4cc40bf..0000000000000 --- a/Formula/bro.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Bro < Formula - desc "Network security monitor" - homepage "https://www.bro.org" - url "https://www.bro.org/downloads/bro-2.5.5.tar.gz" - sha256 "18f2aeb10b4d935d85c115a1e4a93464b9750be19b34997cf6196b29118e73cf" - head "https://github.com/bro/bro.git" - - bottle do - sha256 "93bc629294d559b5ef2b4a68ef07aa9b27332c850f70b23a9ea58a18fef00029" => :mojave - sha256 "e8c73068493bcfcdb6ee42569acf1472c936cc88b9947549728987b98d0678d7" => :high_sierra - sha256 "45e7f85b63de0658c6fd67b2bc032c73e7e1b41d0dd7fc5252ff400c56071747" => :sierra - sha256 "d1a8841214d9cf4d4fcb0916c568ed763a8c385a01f28fd394025aafebbcd971" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "swig" => :build - depends_on "geoip" - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl"].opt_prefix}", - "--localstatedir=#{var}", - "--conf-files-dir=#{etc}" - system "make", "install" - end - - test do - system "#{bin}/bro", "--version" - end -end diff --git a/Formula/brogue.rb b/Formula/brogue.rb deleted file mode 100644 index 772bad691e200..0000000000000 --- a/Formula/brogue.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Brogue < Formula - desc "Roguelike game" - homepage "https://sites.google.com/site/broguegame/" - # The OS X version doesn't contain a Makefile, so we - # need to download the Linux version - url "https://sites.google.com/site/broguegame/brogue-1.7.5-linux-amd64.tbz2" - version "1.7.5" - sha256 "a74ff18139564c597d047cfb167f74ab1963dd8608b6fb2e034e7635d6170444" - - bottle do - cellar :any_skip_relocation - sha256 "62d88540558c2f014403686898cf68d9a44c62e0095e285e77958b66e5c1ff3a" => :mojave - sha256 "864ae48cf80e2f1f3dc2a31a2ea4811177906eda30b11d12d5e3018ca4f1f3b8" => :high_sierra - sha256 "b5f6a25670f2eeb737bcde972b78801892971e2af4e3f7df1bbaa237eb4db50f" => :sierra - end - - # put the highscores file in HOMEBREW_PREFIX/var/brogue/ instead of a - # version-dependent location. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/c999df7dff/brogue/1.7.4.patch" - sha256 "ac5f86930a0190146ca35856266e8e8af06ac925bc8ae4c73c202352f258669c" - end - - def install - (var/"brogue").mkpath - - doc.install "Readme.rtf" => "README.rtf" - doc.install "agpl.txt" => "COPYING" - - system "make", "clean", "curses" - - # The files are installed in libexec - # and the provided `brogue` shell script, - # which is just a convenient way to launch the game, - # is placed in the `bin` directory. - inreplace "brogue", %r{`dirname \$0`/bin$}, libexec - bin.install "brogue" - libexec.install "bin/brogue", "bin/keymap" - end - - def caveats; <<~EOS - If you are upgrading from 1.7.2, you need to copy your highscores file: - cp #{HOMEBREW_PREFIX}/Cellar/#{name}/1.7.2/BrogueHighScores.txt #{var}/brogue/ - EOS - end - - test do - system "#{bin}/brogue", "--version" - end -end diff --git a/Formula/brotli.rb b/Formula/brotli.rb deleted file mode 100644 index 1af1a8074b281..0000000000000 --- a/Formula/brotli.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Brotli < Formula - desc "Generic-purpose lossless compression algorithm by Google" - homepage "https://github.com/google/brotli" - url "https://github.com/google/brotli/archive/v1.0.7.tar.gz" - sha256 "4c61bfb0faca87219ea587326c467b95acb25555b53d1a421ffa3c8a9296ee2c" - head "https://github.com/google/brotli.git" - - bottle do - cellar :any - sha256 "d2d4f821f8d9c52de15a4d3b5ddeab760ad9ae71105f1c859b7811adff9af9da" => :mojave - sha256 "700e223c43dff6781343568d3b0838c3ae66381307293c40312c1941b74fb9c6" => :high_sierra - sha256 "5f38b687e2e1bc18aeecc6598723bcbf0d6c89385e4b227678bc8d97e60890be" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "VERBOSE=1" - system "ctest", "-V" - system "make", "install" - end - - test do - (testpath/"file.txt").write("Hello, World!") - system "#{bin}/brotli", "file.txt", "file.txt.br" - system "#{bin}/brotli", "file.txt.br", "--output=out.txt", "--decompress" - assert_equal (testpath/"file.txt").read, (testpath/"out.txt").read - end -end diff --git a/Formula/browser.rb b/Formula/browser.rb deleted file mode 100644 index e315271b88644..0000000000000 --- a/Formula/browser.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Browser < Formula - desc "Pipe HTML to a browser" - homepage "https://gist.github.com/318247/" - url "https://gist.github.com/defunkt/318247/raw/7720fc969d58a9bfdc74d71deaa15c1eb7582fc1/browser" - # This the gist revision number - version "7" - sha256 "273343d6cf9ed543ccea47b85a2ad2ef2afe7b7a2b956f2e7a24ce0175326dcc" - - bottle :unneeded - - def install - bin.install "browser" - end - - test do - system "#{bin}/browser" - end -end diff --git a/Formula/bsdconv.rb b/Formula/bsdconv.rb deleted file mode 100644 index 2007f62cf7f15..0000000000000 --- a/Formula/bsdconv.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Bsdconv < Formula - desc "Charset/encoding converter library" - homepage "https://github.com/buganini/bsdconv" - url "https://github.com/buganini/bsdconv/archive/11.5.tar.gz" - sha256 "20137c6937a5785467296e12b18b1b9dff55f021bae3f3eb3eb4fa5826689692" - head "https://github.com/buganini/bsdconv.git" - - bottle do - sha256 "c4133e2b55be3a74a241941b4ee3bf4a1a9cacbbe0e5a41827b1229698d79215" => :mojave - sha256 "ddbd2053b0cff3e0d5c635b370138d5e4de8f5353621dbcabe616f014f3362c1" => :high_sierra - sha256 "9afd5dd285b98bf656bbd0e29fa3594128a312e525e079e4348b1a706e16b16a" => :sierra - sha256 "565a934e96be6ef7726d1c03dbd6eec63ac5ad82678192b544cfe2bff706b1b7" => :el_capitan - sha256 "ccb11937d94df29b9434925b9416291f9d927c2e4669fb39cad96c47912662e5" => :yosemite - end - - def install - system "make", "PREFIX=#{prefix}" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - output = pipe_output("#{bin}/bsdconv BIG5:UTF-8", "\263\134\273\134") - output.force_encoding("UTF-8") if output.respond_to?(:force_encoding) - assert_equal "許蓋", output - end -end diff --git a/Formula/bsdiff.rb b/Formula/bsdiff.rb deleted file mode 100644 index 5942e6c9ace7d..0000000000000 --- a/Formula/bsdiff.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Bsdiff < Formula - desc "Generate and apply patches to binary files" - homepage "https://www.daemonology.net/bsdiff" - url "https://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz" - sha256 "18821588b2dc5bf159aa37d3bcb7b885d85ffd1e19f23a0c57a58723fea85f48" - - bottle do - cellar :any_skip_relocation - sha256 "bca20f48516a5fe4afed7ed045a787e6976ff665b483ffe5719a652555f3be22" => :mojave - sha256 "3624be48c026da2a0ade8316548296ec4b2b100a0b9914acb77124374c9be0d2" => :high_sierra - sha256 "c21cd31202c096b99788346b22a3aeaddd72b397b2ae6cbd971926ba93d9f541" => :sierra - sha256 "4b4e2e68dc5ffa9a5fc02b6c59c4d8201d8d6df8d5e6aef5bd70854ecbe917b7" => :el_capitan - sha256 "79d0ef36a33a214595c66a70d8197a1eb148bcd3c1d1c782d28fc20f6a057d43" => :yosemite - sha256 "26899c5d4e34ccfde4633b78a8cbbdf3036f028dfb16767fb2ac64efb2296b56" => :mavericks - end - - depends_on "bsdmake" => :build - - patch :DATA - - def install - system "bsdmake" - bin.install "bsdiff" - man1.install "bsdiff.1" - end - - test do - (testpath/"bin1").write "\x01\x02\x03\x04" - (testpath/"bin2").write "\x01\x02\x03\x05" - - system "#{bin}/bsdiff", "bin1", "bin2", "bindiff" - end -end - -__END__ -diff --git a/bspatch.c b/bspatch.c -index 643c60b..543379c 100644 ---- a/bspatch.c -+++ b/bspatch.c -@@ -28,6 +28,7 @@ - __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59:06 cperciva Exp $"); - #endif - -+#include - #include - #include - #include diff --git a/Formula/bsdmake.rb b/Formula/bsdmake.rb deleted file mode 100644 index b496ae189a317..0000000000000 --- a/Formula/bsdmake.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Bsdmake < Formula - desc "BSD make (build tool)" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/bsdmake/bsdmake-24.tar.gz" - sha256 "82a948b80c2abfc61c4aa5c1da775986418a8e8eb3dd896288cfadf2e19c4985" - - bottle do - rebuild 1 - sha256 "acee008d57c2ebe6ad2ee5932d1521a254e16453c61cdd517da2c675f60c1eb4" => :mojave - sha256 "fa009c31c9fa5fc71f774cfe146f1338ca856158a606b796c3a1e7dbd64f3895" => :high_sierra - sha256 "3d5b8c21cf86cd6bb9eb28d1e8cbec434b370aa15e19540e366d045ea807c8c8" => :sierra - sha256 "b4052277ac6cf79ed579107fb73da96954c350d7bf29a124c55d87a0df8940b0" => :el_capitan - sha256 "18d7cb56f14eb2e404cf3abb163a354f57c5e45b72991efdd6566a15fcffe90f" => :yosemite - sha256 "5807a64aab8f81720718a4327d303d7955a09739b079aefd72a4f216519f0de7" => :mavericks - sha256 "7f64345157a82d82163606a09839619ec2ffc174242ceb942c2347526fee4f83" => :mountain_lion - end - - # MacPorts patches to make bsdmake play nice with our prefix system - # Also a MacPorts patch to circumvent setrlimit error - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/1fcaddfc/bsdmake/patch-Makefile.diff" - sha256 "1e247cb7d8769d50e675e3f66b6f19a1bc7663a7c0800fc29a2489f3f6397242" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/1fcaddfc/bsdmake/patch-mk.diff" - sha256 "b7146bfe7a28fc422e740e28e56e5bf0166a29ddf47a54632ad106bca2d72559" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/1fcaddfc/bsdmake/patch-pathnames.diff" - sha256 "b24d73e5fe48ac2ecdfbe381e9173f97523eed5b82a78c69dcdf6ce936706ec6" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/1fcaddfc/bsdmake/patch-setrlimit.diff" - sha256 "cab53527564d775d9bd9a6e4969f116fdd85bcf0ad3f3e57ec2dcc648f7ed448" - end - - def install - # Replace @PREFIX@ inserted by MacPorts patches - # Use "prefix" since this is sometimes a keg-only brew - # But first replace the X11 path if X11 is installed - inreplace "mk/sys.mk", "@PREFIX@", MacOS::X11.prefix || prefix - inreplace %w[mk/bsd.README - mk/bsd.cpu.mk - mk/bsd.doc.mk - mk/bsd.obj.mk - mk/bsd.own.mk - mk/bsd.port.mk - mk/bsd.port.subdir.mk - pathnames.h], - "@PREFIX@", prefix - - inreplace "mk/bsd.own.mk" do |s| - s.gsub! "@INSTALL_USER@", `id -un`.chomp - s.gsub! "@INSTALL_GROUP@", `id -gn`.chomp - end - - # See GNUMakefile - ENV.append "CFLAGS", "-D__FBSDID=__RCSID" - ENV.append "CFLAGS", "-mdynamic-no-pic" - - system "make", "-f", "Makefile.dist" - bin.install "pmake" => "bsdmake" - man1.install "make.1" => "bsdmake.1" - (share/"mk/bsdmake").install Dir["mk/*"] - end - - test do - (testpath/"Makefile").write <<~EOS - foo: - \ttouch $@ - EOS - - system "#{bin}/bsdmake" - assert_predicate testpath/"foo", :exist? - end -end diff --git a/Formula/bsdsfv.rb b/Formula/bsdsfv.rb deleted file mode 100644 index d6cfe595cec88..0000000000000 --- a/Formula/bsdsfv.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Bsdsfv < Formula - desc "SFV utility tools" - homepage "https://bsdsfv.sourceforge.io/" - url "https://downloads.sourceforge.net/project/bsdsfv/bsdsfv/1.18/bsdsfv-1.18.tar.gz" - sha256 "577245da123d1ea95266c1628e66a6cf87b8046e1a902ddd408671baecf88495" - - bottle do - cellar :any_skip_relocation - sha256 "e500396c1a26993727df9ccc8d878e0a4fbc353326206dffcbd18b9fc8071247" => :mojave - sha256 "28bee35fbc8c0be9e1182287c58340898d29d9ba0f910109974af6efcb5cd61f" => :high_sierra - sha256 "38b9d278b430e250b384c5ba2baf3e74dfe0771c5ceea45686022ecb01616ee2" => :sierra - sha256 "404ec03e044a019a487adfab90012a29a6655fe67b907d9b4e9a46d4f6c57a9b" => :el_capitan - sha256 "fd15cb46a9499bcd1182e8fe4a6ae1de9fb77ced85186601ef6c6579a22d9c51" => :yosemite - sha256 "7d0590952682b7baf619122a2942dacbf7ed455263c49b0314a85be7d51b1dc1" => :mavericks - end - - # bug report: - # https://sourceforge.net/p/bsdsfv/bugs/1/ - # Patch from MacPorts - patch :DATA - - def install - bin.mkpath - - inreplace "Makefile" do |s| - s.change_make_var! "INSTALL_PREFIX", prefix - s.change_make_var! "INDENT", "indent" - s.gsub! " ${INSTALL_PROGRAM} bsdsfv ${INSTALL_PREFIX}/bin", " ${INSTALL_PROGRAM} bsdsfv #{bin}/" - end - - system "make", "all" - system "make", "install" - end -end - -__END__ ---- a/bsdsfv.c 2012-09-25 07:31:03.000000000 -0500 -+++ b/bsdsfv.c 2012-09-25 07:31:08.000000000 -0500 -@@ -44,5 +44,5 @@ - typedef struct sfvtable { - char filename[FNAMELEN]; -- int crc; -+ unsigned int crc; - int found; - } SFVTABLE; diff --git a/Formula/bsponmpi.rb b/Formula/bsponmpi.rb deleted file mode 100644 index 9b22e5bbe308a..0000000000000 --- a/Formula/bsponmpi.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Bsponmpi < Formula - desc "Implements the BSPlib standard on top of MPI" - homepage "https://sourceforge.net/projects/bsponmpi/" - url "https://downloads.sourceforge.net/project/bsponmpi/bsponmpi/0.3/bsponmpi-0.3.tar.gz" - sha256 "bc90ca22155be9ff65aca4e964d8cd0bef5f0facef0a42bc1db8b9f822c92a90" - revision 2 - - bottle do - sha256 "52b8665fac6efd355024c52473016b3ce2ce832256ba486c0db7ef33f9ddd9ce" => :mojave - sha256 "b80c1f5b34b4530ae8cbf402418693e93bd400aa4fb14b998053a3c07024dd35" => :high_sierra - sha256 "caf59320e2eb005dc2de2daa363d15464e3c83519875503e3a498ab8963bb3aa" => :sierra - sha256 "10a864ad11ea1145898ae9bcd8897f107c034818e66faf3632d916d51a13a191" => :el_capitan - end - - depends_on "scons" => :build - depends_on "open-mpi" - - def install - # Don't install 'CVS' folders from tarball - rm_rf "include/CVS" - rm_rf "include/tools/CVS" - system "scons", "-Q", "mode=release" - prefix.install "lib", "include" - end -end diff --git a/Formula/btfs.rb b/Formula/btfs.rb deleted file mode 100644 index 73b2fa8650020..0000000000000 --- a/Formula/btfs.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Btfs < Formula - desc "BitTorrent filesystem based on FUSE" - homepage "https://github.com/johang/btfs" - url "https://github.com/johang/btfs/archive/v2.18.tar.gz" - sha256 "bb9679045540554232eff303fc4f615d28eb4023461eae3f65f08f2427ec9ef2" - revision 2 - head "https://github.com/johang/btfs.git" - - bottle do - cellar :any - sha256 "e03434b33a6b3f27436b7e31e22696d3c645c27840729559b156e42ac4f99715" => :mojave - sha256 "cd5cffcddc4a7a7013fd7a38edba49b70c6bb9dc6ef965db0d003682d2a032c3" => :high_sierra - sha256 "b5bda19961ac5e3e9729c16ee6b39de5370fc462cbffac63823f7ba0f174548e" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libtorrent-rasterbar" - depends_on :osxfuse - - def install - ENV.cxx11 - inreplace "configure.ac", "fuse >= 2.8.0", "fuse >= 2.7.3" - system "autoreconf", "--force", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/btfs", "--help" - end -end diff --git a/Formula/btparse.rb b/Formula/btparse.rb deleted file mode 100644 index fdc2e5b9baa8f..0000000000000 --- a/Formula/btparse.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Btparse < Formula - desc "BibTeX utility libraries" - homepage "https://www.gerg.ca/software/btOOL/" - url "https://www.gerg.ca/software/btOOL/btparse-0.34.tar.gz" - sha256 "e8e2b6ae5de85d1c6f0dc52e8210aec51faebeee6a6ddc9bd975b110cec62698" - - bottle do - cellar :any - sha256 "fde0cd871550d86f76b0ea302315b837cb0c018bbd20b8c4b7168043f4ba83ae" => :mojave - sha256 "217d4a3998eb3848424a13783333a0440fa78f77943bfe4d1a4b06d5d406b4f5" => :high_sierra - sha256 "02d9860c4b80590a96b5053cc9b6bfc7646fd204cef602c766665a53382ed116" => :sierra - sha256 "52b3216a39c5eab22adf83c51843c18789e680bf9bca531a29c2e76c01d00371" => :el_capitan - sha256 "a8488a0a2601b386d3f53d736d776d7a119d2910841959354cff91b9dec9d59f" => :yosemite - sha256 "987a65ea6cbd04b6cb70d3f9f64791a1a69d5c69d446c6c712f463957435d0fb" => :mavericks - sha256 "5ace9431c847dbe4a4d3f04045069eb51a036e9b5a2dce65ccdba7baf165540f" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.bib").write <<~EOS - @article{mxcl09, - title={{H}omebrew}, - author={{H}owell, {M}ax}, - journal={GitHub}, - volume={1}, - page={42}, - year={2009} - } - EOS - - system "#{bin}/bibparse", "-check", "test.bib" - end -end diff --git a/Formula/btpd.rb b/Formula/btpd.rb deleted file mode 100644 index a163fec9d51c9..0000000000000 --- a/Formula/btpd.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Btpd < Formula - desc "BitTorrent Protocol Daemon" - homepage "https://github.com/btpd/btpd" - url "https://github.com/downloads/btpd/btpd/btpd-0.16.tar.gz" - sha256 "296bdb718eaba9ca938bee56f0976622006c956980ab7fc7a339530d88f51eb8" - revision 1 - - bottle do - cellar :any - sha256 "6957aac8c38ccf8faa140f961de205bcd1bf7e7ee3dd68ae545dd0b94d16da19" => :mojave - sha256 "81d4cb1f1407e4619120e6551258888fc7266ab1d98968095fbbef76e80d1f42" => :high_sierra - sha256 "c951cbaadc8a4a04dbe95fe28fdb6f2ad760352c58fba5a36309ed3fdff69e16" => :sierra - sha256 "4dce615bca726cf8ea3adfd0ab5e18f4f1e3d95d1a4d98ce38d6f894b1206a25" => :el_capitan - sha256 "382f8e3ec6e514f5a5116b562c82e0f3b2ae786b625ba08ab222fe7db9a4bcff" => :yosemite - sha256 "62a5bcf9db33b7b543053ce0a7d6ce4ed1fdfc43c9fca2500adc289c8bf34dc8" => :mavericks - sha256 "c28477c4d39f288aeb979007ea65b933bc135de3b98182b4c81051e9baf1bf99" => :mountain_lion - end - - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /Torrents can be specified/, pipe_output("#{bin}/btcli --help 2>&1") - end -end diff --git a/Formula/bubbros.rb b/Formula/bubbros.rb deleted file mode 100644 index 06f0771367c80..0000000000000 --- a/Formula/bubbros.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Bubbros < Formula - desc "The Bub's Brothers: Clone of the famous Bubble Bobble game" - homepage "https://bub-n-bros.sourceforge.io" - url "https://downloads.sourceforge.net/project/bub-n-bros/bub-n-bros/1.6.2/bubbros-1.6.2.tar.gz" - sha256 "0ad8a359c4632071a9c85c2684bae32aa0fa278632c49f092dc4078cfb9858c4" - revision 1 - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "40db40b8456691091963eeb5e7183a79dfa392c3428261b582b29f1201398163" => :mojave - sha256 "e808145d3d1ae843d32a437be1ef8ad70c837bf4b2ccf66e4963cd6561d45c14" => :high_sierra - sha256 "afee50e9fa76478ba416a51cae53efa3ac6ff9fd457d58fb5b6b0b09d343e4c9" => :sierra - sha256 "989c2af93a6acef698f8e02dbed8c7a282a550cec60aba5b4029db830dcbeff1" => :el_capitan - end - - depends_on "python@2" # does not support Python 3 - - # Patches from debian https://sources.debian.net/patches/bubbros - patch do - url "https://sources.debian.net/data/main/b/bubbros/1.6.2-1/debian/patches/replace_sf_logo.patch" - sha256 "f984c69efeb1b5052ef7756800e0e386fc3dfac03da49d600db8a463e222d37f" - end - - patch do - url "https://sources.debian.net/data/main/b/bubbros/1.6.2-1/debian/patches/config_in_homedir.patch" - sha256 "2474b4438fb854a29552d5ddefd17a04f478756ea0135b4298b013d9093a228f" - end - - patch do - url "https://sources.debian.net/data/main/b/bubbros/1.6.2-1/debian/patches/disable_runtime_image_building.patch" - sha256 "e96f5233442a54a342409abe8280f2a735d447e9f53b36463dfc0fcfaef53ccb" - end - - patch do - url "https://sources.debian.net/data/main/b/bubbros/1.6.2-1/debian/patches/manpages.patch" - sha256 "ad0bd9b7f822e416d07af53d6720f1bc0ce4775593dd7bd84f3cdba294532f50" - end - - patch do - url "https://sources.debian.net/data/main/b/bubbros/1.6.2-1/debian/patches/remove_shabangs.patch" - sha256 "99ab1326b4b5267fb6c7bdb85b84e184126aa21099bffbedd36adb26b11933db" - end - - def install - system "make", "-C", "bubbob" - system "python", "bubbob/images/buildcolors.py" - - man6.install "doc/BubBob.py.1" => "bubbros.6" - man6.install "doc/Client.py.1" => "bubbros-client.6" - man6.install "doc/bb.py.1" => "bubbros-server.6" - - prefix.install Dir["*"] - - bin.mkpath - (bin/"bubbros").write shim_script("BubBob.py") - (bin/"bubbros-client").write shim_script("display/Client.py") - (bin/"bubbros-server").write shim_script("bubbob/bb.py") - end - - def shim_script(target); <<~EOS - #!/bin/bash - cd "#{prefix}" - python "#{target}" "$@" - EOS - end - - test do - system "#{bin}/bubbros-client --help; test $? -eq 2" - system "#{bin}/bubbros-server --help; test $? -eq 1" - end -end diff --git a/Formula/buildapp.rb b/Formula/buildapp.rb deleted file mode 100644 index dbdb94c45b05b..0000000000000 --- a/Formula/buildapp.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Buildapp < Formula - desc "Creates executables with SBCL" - homepage "https://www.xach.com/lisp/buildapp/" - url "https://github.com/xach/buildapp/archive/release-1.5.6.tar.gz" - sha256 "d77fb6c151605da660b909af058206f7fe7d9faf972e2c30876d42cb03d6a3ed" - revision 1 - head "https://github.com/xach/buildapp.git" - - bottle do - sha256 "86fa0142bbde84222c65edec4f082b99d7fbd67c4767723025fd12c9f60b2db4" => :mojave - sha256 "aa14506cc1ab8eb712c9b1fdb71af45c9041b327c9ecdf9d48541b652e3da3be" => :high_sierra - sha256 "15e1be1e7928770abfdb801e67435b9d7c1bc36923bc6d9d5281d9ceab0d9abd" => :sierra - sha256 "49d62ce2b8564d5456725d1a7cedafb38690d9bcdf5e7b6f279805665ed65833" => :el_capitan - end - - depends_on "sbcl" - - def install - bin.mkpath - system "make", "install", "DESTDIR=#{prefix}" - end - - test do - code = "(defun f (a) (declare (ignore a)) (write-line \"Hello, homebrew\"))" - system "#{bin}/buildapp", "--eval", code, - "--entry", "f", - "--output", "t" - assert_equal `./t`, "Hello, homebrew\n" - end -end diff --git a/Formula/buildifier.rb b/Formula/buildifier.rb deleted file mode 100644 index 5ab88923baef1..0000000000000 --- a/Formula/buildifier.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Buildifier < Formula - desc "Format bazel BUILD files with a standard convention" - homepage "https://github.com/bazelbuild/buildtools" - url "https://github.com/bazelbuild/buildtools.git", - :tag => "0.17.2", - :revision => "7926f6cd8f2568556b0efc23530743df4278e0fe" - - bottle do - cellar :any_skip_relocation - sha256 "f3c17f5b5dcc56bea01dbc84796cfaea83fe4bc991a3c4ba301f7a2c74b4975f" => :mojave - sha256 "9146773b6013b16d689769a97ca35b88f63ebfb905415618ad275569f1470f7a" => :high_sierra - sha256 "eaae6bfd07289eedced6fec304145d68b297b52440ce4407aaf74a88d2862fe1" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/bazelbuild").mkpath - ln_sf buildpath, buildpath/"src/github.com/bazelbuild/buildtools" - - commit = Utils.popen_read("git", "rev-parse", "HEAD").chomp - inreplace "buildifier/buildifier.go" do |s| - s.gsub! /^(var buildifierVersion = ")redacted/, "\\1#{version}" - s.gsub! /^(var buildScmRevision = ")redacted/, "\\1#{commit}" - end - - system "go", "build", "-o", bin/"buildifier", "buildifier/buildifier.go" - end - - test do - touch testpath/"BUILD" - system "#{bin}/buildifier", "-mode=check", "BUILD" - end -end diff --git a/Formula/buku.rb b/Formula/buku.rb deleted file mode 100644 index 27fc3242b0a40..0000000000000 --- a/Formula/buku.rb +++ /dev/null @@ -1,156 +0,0 @@ -class Buku < Formula - include Language::Python::Virtualenv - - desc "Powerful command-line bookmark manager" - homepage "https://github.com/jarun/Buku" - url "https://github.com/jarun/Buku/archive/v4.0.tar.gz" - sha256 "35a3ebeeb715ec1170360570c3e43cb1308b67a75979ae264aac9961c778d2af" - - bottle do - cellar :any - sha256 "100e3fc57f13252d6dcc696db05489ef101682c75cb36672a3cd9448989b7f1c" => :mojave - sha256 "0c4d313755bb83471bfc5e628a481ed75dc5b04d0895302f8d9e73a02d794565" => :high_sierra - sha256 "ff4114b5f5b115ddf1a316c7ef7103f35a558994b4166447c75c94802a7ab2d0" => :sierra - end - - depends_on "openssl" - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/88/df/86bffad6309f74f3ff85ea69344a078fc30003270c8df6894fca7a3c72ff/beautifulsoup4-4.6.3.tar.gz" - sha256 "90f8e61121d6ae58362ce3bed8cd997efb00c914eae0ff3d363c32f9a9822d10" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz" - sha256 "6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "html5lib" do - url "https://files.pythonhosted.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz" - sha256 "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/a5/74/05ffd00b4b5c08306939c485869f5dc40cbc27357195b0a98b18e4c48893/urllib3-1.24.tar.gz" - sha256 "41c3db2fc01e5b907288010dec72f9d0a74e37d6994e6eb56849f59fea2265ae" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - def install - venv = virtualenv_create(libexec, "python3") - venv.pip_install resources - - # Replace shebang with virtualenv python - inreplace "buku.py", "#!/usr/bin/env python3", "#!#{libexec}/bin/python" - - bin.install "buku.py" => "buku" - man1.install "buku.1" - bash_completion.install "auto-completion/bash/buku-completion.bash" - fish_completion.install "auto-completion/fish/buku.fish" - zsh_completion.install "auto-completion/zsh/_buku" - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - ENV["XDG_DATA_HOME"] = "#{testpath}/.local/share" - - # Firefox exported bookmarks file - (testpath/"bookmarks.html").write <<~EOS - - - Bookmarks -

Bookmarks Menu

- -

-


Bookmarks Toolbar

-
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -

-

Title unknown -

-

- EOS - - (testpath/"import").write <<~EOS - spawn #{bin}/buku --nc --import bookmarks.html - expect -re "DB file is being created at .*" - expect "You should encrypt it." - expect "Append tags when bookmark exist? (y/n): " - send "y\r" - expect "Add parent folder names as tags? (y/n): " - send "y\r" - expect { - -re ".*ERROR.*" { exit 1 } - "1. Title unknown" - } - spawn sleep 5 - EOS - system "/usr/bin/expect", "-f", "import" - - # Test online components -- fetch titles - system bin/"buku", "--update" - - # Test crypto functionality - (testpath/"crypto-test").write <<~EOS - # Lock bookmark database - spawn #{bin}/buku --lock - expect "Password: " - send "password\r" - expect "Password: " - send "password\r" - expect { - -re ".*ERROR.*" { exit 1 } - "File encrypted" - } - - # Unlock bookmark database - spawn #{bin}/buku --unlock - expect "Password: " - send "password\r" - expect { - -re ".*ERROR.*" { exit 1 } - "File decrypted" - } - EOS - system "/usr/bin/expect", "-f", "crypto-test" - - # Test database content and search - result = shell_output("#{bin}/buku --np --sany Homebrew") - assert_match "https://github.com/Homebrew/brew", result - assert_match "The Homebrew package manager", result - end -end diff --git a/Formula/bulk_extractor.rb b/Formula/bulk_extractor.rb deleted file mode 100644 index ff9f19828e74c..0000000000000 --- a/Formula/bulk_extractor.rb +++ /dev/null @@ -1,41 +0,0 @@ -class BulkExtractor < Formula - desc "Stream-based forensics tool" - homepage "https://github.com/simsong/bulk_extractor/wiki" - url "https://digitalcorpora.org/downloads/bulk_extractor/bulk_extractor-1.5.5.tar.gz" - sha256 "297a57808c12b81b8e0d82222cf57245ad988804ab467eb0a70cf8669594e8ed" - revision 2 - - bottle do - rebuild 1 - sha256 "a5ed0825ed227f6c7dafba8f65e7de56dd14994e80e4164dfee1cc52f49a5a34" => :mojave - sha256 "7666ded8016f96f93fcd4f8da586237b04651f518c58f467a2934a1672e3d04a" => :high_sierra - sha256 "2de4444284b48e482818bcfe9ab0002b2d15a3bcf94ca553e086dbf9833c6dc2" => :sierra - sha256 "d23689372ca9fff1fb214bd449c9adf6bf29a8876069a9a688bd8867af01f7a6" => :el_capitan - end - - depends_on "boost" - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - - # Install documentation - (pkgshare/"doc").install Dir["doc/*.{html,txt,pdf}"] - - (lib/"python2.7/site-packages").install Dir["python/*.py"] - end - - test do - input_file = testpath/"data.txt" - input_file.write "https://brew.sh\n(201)555-1212\n" - - output_dir = testpath/"output" - system "#{bin}/bulk_extractor", "-o", output_dir, input_file - - assert_match "https://brew.sh", (output_dir/"url.txt").read - assert_match "(201)555-1212", (output_dir/"telephone.txt").read - end -end diff --git a/Formula/bullet.rb b/Formula/bullet.rb deleted file mode 100644 index 8fca230c8602e..0000000000000 --- a/Formula/bullet.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Bullet < Formula - desc "Physics SDK" - homepage "https://bulletphysics.org/" - url "https://github.com/bulletphysics/bullet3/archive/2.88.tar.gz" - sha256 "21c135775527754fc2929db1db5144e92ad0218ae72840a9f162acb467a7bbf9" - head "https://github.com/bulletphysics/bullet3.git" - - bottle do - sha256 "441f12cab157a05a69e5a7de426296b096fef0b88d0ebf386ce15503e114814d" => :mojave - sha256 "febfaa699309bb100f9614fce6bdcbdf9f8521be10d2885bf5ad42073c351c4f" => :high_sierra - sha256 "cfcaf1990cc8f2fd8ebc8ecf93b10a448c51e6991eca5fab599c9c913e1d94e0" => :sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args + %W[ - -DBUILD_BULLET2_DEMOS=OFF - -DBUILD_PYBULLET=OFF - -DBUILD_UNIT_TESTS=OFF - -DCMAKE_INSTALL_RPATH=#{lib} - -DINSTALL_EXTRA_LIBS=ON - ] - - mkdir "build" do - system "cmake", "..", *args, "-DBUILD_SHARED_LIBS=ON" - system "make", "install" - - system "make", "clean" - - system "cmake", "..", *args, "-DBUILD_SHARED_LIBS=OFF" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "LinearMath/btPolarDecomposition.h" - int main() { - btMatrix3x3 I = btMatrix3x3::getIdentity(); - btMatrix3x3 u, h; - polarDecompose(I, u, h); - return 0; - } - EOS - - system ENV.cc, "test.cpp", "-I#{include}/bullet", "-L#{lib}", - "-lLinearMath", "-lc++", "-o", "test" - system "./test" - end -end diff --git a/Formula/bundler-completion.rb b/Formula/bundler-completion.rb deleted file mode 100644 index 2c1561bc71ea2..0000000000000 --- a/Formula/bundler-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class BundlerCompletion < Formula - desc "Bash completion for Bundler" - homepage "https://github.com/mernen/completion-ruby" - url "https://github.com/mernen/completion-ruby.git", - :revision => "f3e4345042b0cc48317e45b673dfd3d23904b9a7" - version "2" - head "https://github.com/mernen/completion-ruby.git" - - bottle :unneeded - - def install - bash_completion.install "completion-bundle" => "bundler" - end - - test do - assert_match "-F __bundle", - shell_output("source #{bash_completion}/bundler && complete -p bundle") - end -end diff --git a/Formula/bundletool.rb b/Formula/bundletool.rb deleted file mode 100644 index b704a02675ebf..0000000000000 --- a/Formula/bundletool.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Bundletool < Formula - desc "Command-line tool to manipulate Android App Bundles" - homepage "https://github.com/google/bundletool" - url "https://github.com/google/bundletool/releases/download/0.7.2/bundletool-all-0.7.2.jar" - sha256 "9d98a1497281388539f5a774ed0843c1d541f7b1bc5d0664d21a0eeaf4a00f19" - - bottle :unneeded - depends_on :java => "1.8+" - - resource "bundle" do - url "https://gist.githubusercontent.com/raw/ca85ede7ac072a44f48c658be55ff0d3/sample.aab" - sha256 "aac71ad62e1f20dd19b80eba5da5cb5e589df40922f288fb6a4b37a62eba27ef" - end - - def install - libexec.install "bundletool-all-#{version}.jar" - bin.write_jar_script libexec/"bundletool-all-#{version}.jar", "bundletool" - end - - test do - resource("bundle").stage do - expected = <<~EOS - App Bundle information - ------------ - Modules: - Module: base - File: dex/classes.dex - EOS - - assert_equal expected, shell_output("#{bin}/bundletool validate --bundle sample.aab") - end - end -end diff --git a/Formula/bup.rb b/Formula/bup.rb deleted file mode 100644 index 63fcae30c3ebb..0000000000000 --- a/Formula/bup.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Bup < Formula - desc "Backup tool" - homepage "https://github.com/bup/bup" - url "https://github.com/bup/bup/archive/0.29.2.tar.gz" - sha256 "7f54503f305eab5db5db41e1825477b8804870ca251f65bcfb4d89ad2598574f" - head "https://github.com/bup/bup.git" - - bottle do - cellar :any_skip_relocation - sha256 "3ca4593db392b93bad33bd522b2fd5c37bae9966b606e4c62a0fd8997901f1f0" => :mojave - sha256 "3a1eb0bb1d6f5e4da3e1afe9565d19d1be8eb455ceb20ef404b8c042ce416aa1" => :high_sierra - sha256 "81d72623d910ba47d6960b4bbc65e214aa9fdb41639d800dc850a5ad8981a5d7" => :sierra - end - - depends_on "pandoc" => :build - depends_on "python@2" # does not support Python 3 - - resource "backports_abc" do - url "https://files.pythonhosted.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-0.5.tar.gz" - sha256 "033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz" - sha256 "6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a" - end - - resource "singledispatch" do - url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz" - sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/e6/78/6e7b5af12c12bdf38ca9bfe863fcaf53dc10430a312d0324e76c1e5ca426/tornado-5.1.1.tar.gz" - sha256 "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409" - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - resources.each do |r| - r.stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - # set AC_CPP_PROG due to Mojave issue, see https://github.com/Homebrew/brew/issues/5153 - system "make", "AC_CPP_PROG=xcrun cpp" - system "make", "install", "DESTDIR=#{prefix}", "PREFIX=" - - mv bin/"bup", libexec/"bup.py" - (bin/"bup").write_env_script libexec/"bup.py", :PYTHONPATH => ENV["PYTHONPATH"] - end - - test do - system bin/"bup", "init" - assert_predicate testpath/".bup", :exist? - end -end diff --git a/Formula/burl.rb b/Formula/burl.rb deleted file mode 100644 index 61c82a9f5051d..0000000000000 --- a/Formula/burl.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Burl < Formula - desc "Shell script wrapper that offers helpful shortcuts for curl(1)" - homepage "https://github.com/tj/burl" - url "https://github.com/tj/burl/archive/1.0.1.tar.gz" - sha256 "634949b7859ddf7c75a89123608998f8dac8ced8c601fa2c2717569caeaa54e5" - - bottle :unneeded - - def install - bin.install "bin/burl" - end - - test do - system "#{bin}/burl", "-I", "github.com" - end -end diff --git a/Formula/burp.rb b/Formula/burp.rb deleted file mode 100644 index 5f8e38cf66f69..0000000000000 --- a/Formula/burp.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Burp < Formula - desc "Network backup and restore" - homepage "https://burp.grke.org/" - - stable do - url "https://downloads.sourceforge.net/project/burp/burp-2.1.32/burp-2.1.32.tar.bz2" - sha256 "56f8a13ae96e50f2274857a08c9f3d9f06ed6dee306d49fd189e3ff9f93c74fd" - - resource "uthash" do - url "https://github.com/troydhanson/uthash.git", - :revision => "1048ed82f22fe57f1e139821ae3a3ce6a52f1002" - end - end - - bottle do - sha256 "4cbdd3b5057ce83ac9237689bb0aae356e5d8a1a1f47032b2c282f512d7ab1a2" => :mojave - sha256 "63448a114768888ecf29a7e43dc47bfa7d6bf8dcf29100dd686427c767d5c1f1" => :high_sierra - sha256 "7227edca3f5ccc37bb27c129f6191440341f1d6513a720a45d0132aae52f2a69" => :sierra - sha256 "327c71e933b05d212cc522748e4928b52da9c968f7f2ca50cee31a7ec99add0b" => :el_capitan - end - - head do - url "https://github.com/grke/burp.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - resource "uthash" do - url "https://github.com/troydhanson/uthash.git" - end - end - - depends_on "pkg-config" => :build - depends_on "librsync" - depends_on "openssl" - - def install - resource("uthash").stage do - (buildpath/"uthash/include").install "src/uthash.h" - end - - ENV.prepend "CPPFLAGS", "-I#{buildpath}/uthash/include" - - system "autoreconf", "-fiv" if build.head? - - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}/burp", - "--sbindir=#{bin}", - "--localstatedir=#{var}" - - system "make", "install-all" - end - - def post_install - (var/"run").mkpath - (var/"spool/burp").mkpath - end - - def caveats; <<~EOS - Before installing the launchd entry you should configure your burp client in - #{etc}/burp/burp.conf - EOS - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - UserName - root - KeepAlive - - ProgramArguments - - #{opt_bin}/burp - -a - t - - StartInterval - 1200 - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - system bin/"burp", "-v" - end -end diff --git a/Formula/bvi.rb b/Formula/bvi.rb deleted file mode 100644 index bdd33caa1455c..0000000000000 --- a/Formula/bvi.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Bvi < Formula - desc "Vi-like binary file (hex) editor" - homepage "https://bvi.sourceforge.io" - url "https://downloads.sourceforge.net/bvi/bvi-1.4.0.src.tar.gz" - sha256 "015a3c2832c7c097d98a5527deef882119546287ba8f2a70c736227d764ef802" - - bottle do - sha256 "0a8c034737e4b28d4f6c83f3ff222a797f4488503ed44b9b0df9d8966c19d9ac" => :mojave - sha256 "832a212daacc98df05797371ff7fb6ff0bbe5b7ac824a430c04b2b7f04d0e1e7" => :high_sierra - sha256 "f918f3425865c4b8df97c32cf700f631d2c19e285adf01cc6ceadd429f7d0bfb" => :sierra - sha256 "47c35b91db7052ee938daa6ddd95e96d49982e8767a48a0821f054b543fedb7f" => :el_capitan - sha256 "4b5a3bdfa1bf083bde13338fc8fc5a8027880b3e79611ad064e44fd2f4d7a4a0" => :yosemite - sha256 "7ec90f6665011faa3f1715cf6cc855270a536993633d8a4600cdb0492db16686" => :mavericks - sha256 "75d2461715e5afacd35efcb188d580191db6ebe02607bc66ea52a813be21e29c" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/bvi", "-c", "q" - end -end diff --git a/Formula/bwa.rb b/Formula/bwa.rb deleted file mode 100644 index a238e42f6ac2a..0000000000000 --- a/Formula/bwa.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Bwa < Formula - desc "Burrow-Wheeler Aligner for pairwise alignment of DNA" - homepage "https://github.com/lh3/bwa" - url "https://github.com/lh3/bwa/releases/download/v0.7.17/bwa-0.7.17.tar.bz2" - sha256 "de1b4d4e745c0b7fc3e107b5155a51ac063011d33a5d82696331ecf4bed8d0fd" - - bottle do - cellar :any_skip_relocation - sha256 "6b07cef5ea1955d8a83e7b59ef8458a7604998f735f0eab85889fa3aedc7e953" => :mojave - sha256 "02da3eecd6569c193a55436f705c8d351d052e44b79a43d6afc50f7308603a73" => :high_sierra - sha256 "4db97125930b495fc34b6d161bea57171ac4bf2a5bf48ca1088a69a594874710" => :sierra - sha256 "bee09d138e9d8f45c12d6c99b48a3e6891b6e4d3f5c6a6847bfeaa28afc2f362" => :el_capitan - end - - def install - system "make" - - # "make install" requested 26 Dec 2017 https://github.com/lh3/bwa/issues/172 - bin.install "bwa" - man1.install "bwa.1" - end - - test do - (testpath/"test.fasta").write ">0\nAGATGTGCTG\n" - system bin/"bwa", "index", "test.fasta" - assert_predicate testpath/"test.fasta.bwt", :exist? - assert_match "AGATGTGCTG", shell_output("#{bin}/bwa mem test.fasta test.fasta") - end -end diff --git a/Formula/bwctl.rb b/Formula/bwctl.rb deleted file mode 100644 index 9fd7b2942bdb9..0000000000000 --- a/Formula/bwctl.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bwctl < Formula - desc "Command-line tool and daemon for network measuring tools" - homepage "https://software.internet2.edu/bwctl/" - url "https://software.internet2.edu/sources/bwctl/bwctl-1.5.4.tar.gz" - sha256 "e6dca6ca30c8ef4d68e6b34b011a9ff7eff3aba4a84efc19d96e3675182e40ef" - - bottle do - cellar :any_skip_relocation - sha256 "fbde1025f5c75ec448c07252cdaea22bcc62fa6f1247c46631c8400045bc4083" => :mojave - sha256 "6b2ff7de11ab2b22180d8f59349b403f74c5d5321c60e44cb1f493fa25a5e786" => :high_sierra - sha256 "23f32c2e2b5203c4b4fecfb33e2152e5d732305e60ef5b02e4bbf1a9f7355c73" => :sierra - sha256 "ac9e615919ebd84515022f9650f42194d9ad4b1c1f5f97509e1293962a96e943" => :el_capitan - sha256 "c8890647536e60b3ed8599eb3239ee59fde0382e9df8b7585ee7eeb20275fc39" => :yosemite - sha256 "f10efbf8f41f526130340cc6087ce3dfad83b71b69d21e0b01c11b3169d88bdd" => :mavericks - sha256 "b60c679e8b498ffc23e697cb025dc6decc4f4d939e2b0874ff36291967eee18d" => :mountain_lion - end - - depends_on "i2util" => :build - - def install - # configure mis-sets CFLAGS for I2util - # https://lists.internet2.edu/sympa/arc/perfsonar-user/2015-04/msg00016.html - # https://github.com/Homebrew/homebrew/pull/38212 - inreplace "configure", 'CFLAGS="-I$I2util_dir/include $CFLAGS"', 'CFLAGS="-I$with_I2util/include $CFLAGS"' - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-I2util=#{Formula["i2util"].opt_prefix}" - system "make", "install" - end - - test do - system "#{bin}/bwctl", "-V" - end -end diff --git a/Formula/bwfmetaedit.rb b/Formula/bwfmetaedit.rb deleted file mode 100644 index 5f757a7b8de3b..0000000000000 --- a/Formula/bwfmetaedit.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Bwfmetaedit < Formula - desc "Tool for embedding, validating, and exporting BWF file metadata" - homepage "https://mediaarea.net/BWFMetaEdit" - url "https://mediaarea.net/download/binary/bwfmetaedit/1.3.6/BWFMetaEdit_CLI_1.3.6_GNU_FromSource.tar.bz2" - version "1.3.6" - sha256 "1223de41f55fd7c33c9bb398a3af33c0f0bd0c1c9ee1add17175f15abd6d95d0" - - bottle do - cellar :any_skip_relocation - sha256 "95e67d6b1350f285fe7b6f08a5c6608fac81fbcc4d7f764a6dcaa04c3e01e956" => :mojave - sha256 "595ee66280c74d459e1db88d1b8afbace3a9ef8947e47a60f9f412eeceb29265" => :high_sierra - sha256 "2c76ff728a6ad6f372d5a55df1c22af9c5f52f90694a1bd6775d1fc466ecbead" => :sierra - sha256 "f6428c53fdf2b807b63584db27285984e479c1023d6cb8bf441bad9ac09766b3" => :el_capitan - end - - def install - cd "Project/GNU/CLI" do - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - pipe_output("#{bin}/bwfmetaedit --out-tech", test_fixtures("test.wav")) - end -end diff --git a/Formula/bwm-ng.rb b/Formula/bwm-ng.rb deleted file mode 100644 index 6cf5f20561d98..0000000000000 --- a/Formula/bwm-ng.rb +++ /dev/null @@ -1,37 +0,0 @@ -class BwmNg < Formula - desc "Console-based live network and disk I/O bandwidth monitor" - homepage "https://www.gropp.org/?id=projects&sub=bwm-ng" - url "https://github.com/vgropp/bwm-ng/releases/download/v0.6.1/bwm-ng-0.6.1.tar.gz" - mirror "https://www.gropp.org/bwm-ng/bwm-ng-0.6.1.tar.gz" - sha256 "027cf3c960cd96fc9ffacdf7713df62d0fc55eeef4a1388289f8a62ae5e50df0" - - bottle do - cellar :any_skip_relocation - sha256 "6648df57246fb31f985565fd2283aff2ee94c1b49101b065a4b33309362792fa" => :mojave - sha256 "7ffab079c543246df990e4bc0c5ed2c2329d887aa496a4a14c99a6dfccadacbf" => :high_sierra - sha256 "095250d62c0cdd0e28f79e0099421d8033a1d82832fa0b3f63e663eb9fe8b2f1" => :sierra - sha256 "a8e98c7fdf6a66485ecbbacf4539a8572061d17335ac6baf8305b07afa4a9a22" => :el_capitan - sha256 "2b6af853a216dca06b1e692f2f03a453962b384bd5fba7bc8566f277f71d9d5b" => :yosemite - sha256 "d68545d5c597faccc236df30879008b2902623e6c60d35474f3e9559d8f91d35" => :mavericks - sha256 "06cb4a90714cfb9ef2abf51ab4c08e18956eead594cf601c947b4cf6ac6bba05" => :mountain_lion - end - - head do - url "https://github.com/vgropp/bwm-ng.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - ENV.append "CFLAGS", "-std=gnu89" - - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "
", shell_output("#{bin}/bwm-ng -o html") - end -end diff --git a/Formula/byacc.rb b/Formula/byacc.rb deleted file mode 100644 index 827f8117b4699..0000000000000 --- a/Formula/byacc.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Byacc < Formula - desc "(Arguably) the best yacc variant" - homepage "https://invisible-island.net/byacc/" - url "https://invisible-mirror.net/archives/byacc/byacc-20180609.tgz" - sha256 "5bbb0b3ec3da5981a2488383b652499d6c1e0236b47d8bac5fcdfa12954f749c" - - bottle do - cellar :any_skip_relocation - sha256 "e72053297148f2e7d22d48f2c51ecb067e0ae64143dc87fc14590e237c0b84ec" => :mojave - sha256 "106b72206d7ebe96c906e333b16e4779f8491694b0823c2885b5051afac428d0" => :high_sierra - sha256 "e0badef8e7fb8fd74b8a36f4d5ebff45cb3d28d8d0e92182190321afc28edf4c" => :sierra - sha256 "36ffa710b56c85d26f679e5dd0e9e50c6fe2c7aea65d2af1848a2c9ef6f4c303" => :el_capitan - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--program-prefix=b", "--prefix=#{prefix}", "--man=#{man}" - system "make", "install" - end - - test do - system bin/"byacc", "-V" - end -end diff --git a/Formula/byobu.rb b/Formula/byobu.rb deleted file mode 100644 index c93e03af80751..0000000000000 --- a/Formula/byobu.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Byobu < Formula - desc "Text-based window manager and terminal multiplexer" - homepage "http://byobu.co/" - url "https://launchpad.net/byobu/trunk/5.127/+download/byobu_5.127.orig.tar.gz" - sha256 "4bafc7cb69ff5b0ab6998816d58cd1ef7175e5de75abc1dd7ffd6d5288a4f63b" - - bottle do - cellar :any_skip_relocation - sha256 "a38947144d88d06d05ae8443d045d2c0e230f20f5de8ca617dd4436a73d74c91" => :mojave - sha256 "072c0ed467ca88ca0f5f06a62e526f7e6a6891d52343a24a5bc2459c8227b739" => :high_sierra - sha256 "072c0ed467ca88ca0f5f06a62e526f7e6a6891d52343a24a5bc2459c8227b739" => :sierra - sha256 "072c0ed467ca88ca0f5f06a62e526f7e6a6891d52343a24a5bc2459c8227b739" => :el_capitan - end - - head do - url "https://github.com/dustinkirkland/byobu.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "coreutils" - depends_on "gnu-sed" # fails with BSD sed - depends_on "newt" - depends_on "tmux" - - conflicts_with "ctail", :because => "both install `ctail` binaries" - - def install - if build.head? - cp "./debian/changelog", "./ChangeLog" - system "autoreconf", "-fvi" - end - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - Add the following to your shell configuration file: - export BYOBU_PREFIX=#{HOMEBREW_PREFIX} - EOS - end - - test do - system bin/"byobu-status" - end -end diff --git a/Formula/byteman.rb b/Formula/byteman.rb deleted file mode 100644 index e81e6bf978177..0000000000000 --- a/Formula/byteman.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Byteman < Formula - desc "Java bytecode manipulation tool for testing, monitoring and tracing" - homepage "https://byteman.jboss.org/" - url "https://downloads.jboss.org/byteman/4.0.5/byteman-download-4.0.5-bin.zip" - sha256 "f65a9e169fdebade6dfb265ae284ecdcde82c744ae4c606f99d405325a75a5ba" - - bottle :unneeded - depends_on :java => "1.6+" - - def install - rm_rf Dir["bin/*.bat"] - doc.install Dir["docs/*"], "README" - libexec.install ["bin", "lib", "contrib"] - pkgshare.install ["sample"] - - env = Language::Java.java_home_env("1.6+").merge(:BYTEMAN_HOME => libexec) - Pathname.glob("#{libexec}/bin/*") do |file| - target = bin/File.basename(file, File.extname(file)) - # Drop the .sh from the scripts - target.write_env_script(libexec/"bin/#{File.basename(file)}", env) - end - end - - test do - (testpath/"src/main/java/BytemanHello.java").write <<~EOS - class BytemanHello { - public static void main(String... args) { - System.out.println("Hello, Brew!"); - } - } - EOS - - (testpath/"brew.btm").write <<~EOS - RULE trace main entry - CLASS BytemanHello - METHOD main - AT ENTRY - IF true - DO traceln("Entering main") - ENDRULE - - RULE trace main exit - CLASS BytemanHello - METHOD main - AT EXIT - IF true - DO traceln("Exiting main") - ENDRULE - EOS - # Compile example - system "javac", "src/main/java/BytemanHello.java" - # Expected successful output when Byteman runs example - expected = <<~EOS - Entering main - Hello, Brew! - Exiting main - EOS - actual = shell_output("#{bin}/bmjava -l brew.btm -cp src/main/java BytemanHello") - assert_equal(expected, actual) - end -end diff --git a/Formula/bzip2.rb b/Formula/bzip2.rb deleted file mode 100644 index 71719a75dbbe8..0000000000000 --- a/Formula/bzip2.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bzip2 < Formula - desc "Freely available high-quality data compressor" - homepage "https://en.wikipedia.org/wiki/Bzip2" - url "https://ftp.osuosl.org/pub/clfs/conglomeration/bzip2/bzip2-1.0.6.tar.gz" - mirror "https://fossies.org/linux/misc/bzip2-1.0.6.tar.gz" - sha256 "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "3376ceeaaacba0847d3e2a38569080606c8ea3b5d7596467abeef0dff74118d0" => :mojave - sha256 "197655415959a8e856f5926ebbae88715b8aef68fa8612aaf0bfe7e1c96723bf" => :high_sierra - sha256 "8911d7904862dc4930d024d0459390c510566241015bc06ec97f9e3fbb869101" => :sierra - sha256 "a22f768ce625a56cc2f4b3c7f08f4b1ba30f79865b786dc4c57a97f672badff4" => :el_capitan - sha256 "1468f967e8a35954509a8beb40bd29b60b730db158054aeddadc7586890737e8" => :yosemite - end - - keg_only :provided_by_macos - - def install - inreplace "Makefile", "$(PREFIX)/man", "$(PREFIX)/share/man" - - system "make", "install", "PREFIX=#{prefix}" - end - - test do - testfilepath = testpath + "sample_in.txt" - zipfilepath = testpath + "sample_in.txt.bz2" - - testfilepath.write "TEST CONTENT" - - system "#{bin}/bzip2", testfilepath - system "#{bin}/bunzip2", zipfilepath - - assert_equal "TEST CONTENT", testfilepath.read - end -end diff --git a/Formula/bzr-builder.rb b/Formula/bzr-builder.rb deleted file mode 100644 index d04833bff615a..0000000000000 --- a/Formula/bzr-builder.rb +++ /dev/null @@ -1,41 +0,0 @@ -class BzrBuilder < Formula - desc "Bazaar plugin to construct a branch based on a recipe" - homepage "https://launchpad.net/bzr-builder" - url "https://launchpad.net/bzr-builder/trunk/0.7.3/+download/bzr-builder-0.7.3.tar.gz" - sha256 "9f8a078eafd6700ccbefa4e7e3f7df3240e15a2003c9538135c4be945ac90c91" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/builder").install Dir["*"] - end - - test do - system "bzr", "whoami", "Homebrew" - system "bzr", "init-repo", "repo" - - cd "repo" do - system "bzr", "init", "trunk" - - cd "trunk" do - touch "readme.txt" - system "bzr", "add" - system "bzr", "commit", "-m", "initial import" - end - - (testpath/"repo/my.recipe").write <<~EOS - # bzr-builder format 0.3 deb-version 1.0+{revno}-{revno:packaging} - trunk - EOS - - system "bzr", "build", "my.recipe", "branch" - - cd "branch" do - assert_predicate testpath/"repo/branch/bzr-builder.manifest", :exist? - assert_predicate testpath/"repo/branch/readme.txt", :exist? - end - end - end -end diff --git a/Formula/bzr-colo.rb b/Formula/bzr-colo.rb deleted file mode 100644 index 650bbcabc6c1e..0000000000000 --- a/Formula/bzr-colo.rb +++ /dev/null @@ -1,46 +0,0 @@ -class BzrColo < Formula - desc "Git style colocated branches for Bazaar" - homepage "https://launchpad.net/bzr-colo" - url "https://launchpad.net/bzr-colo/trunk/0.4.0/+download/bzr-colo-0.4.0.tar.gz" - sha256 "f61c1abaf80f1e4a573fefd492b70938d27c4b8ca5611cdb0e0a4dc0ed71bbb3" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/colo").install Dir["*"] - end - - test do - system "bzr", "whoami", "Homebrew" - system "bzr", "colo-init", "foo" - file_path = (testpath/"foo/trunk/foo.txt") - - cd "foo" do - system "bzr", "colo-checkout", "trunk" - - cd "trunk" do - file_path.write("change") - system "bzr", "add" - system "bzr", "commit", "-m", "some change in trunk" - - system "bzr", "colo-branch", "branch1" - assert_match(/\* branch1/, shell_output("bzr colo-branches")) - - file_path.append_lines("change") - system "bzr", "commit", "-m", "some change in branch1" - assert_match(/some change in branch1/, shell_output("bzr log -l1")) - - system "bzr", "switch", "colo:trunk" - assert_match(/\* trunk/, shell_output("bzr colo-branches")) - assert_match(/some change in trunk/, shell_output("bzr log -l1")) - - system "bzr", "merge", "colo:branch1" - system "bzr", "commit", "-m", "this is so much worse than just using bzr" - assert_match(/this is so much worse than just using bzr/, shell_output("bzr log -r2")) - assert_match(/some change in trunk/, shell_output("bzr log -r1")) - end - end - end -end diff --git a/Formula/bzr-externals.rb b/Formula/bzr-externals.rb deleted file mode 100644 index 33d9a063c41ad..0000000000000 --- a/Formula/bzr-externals.rb +++ /dev/null @@ -1,43 +0,0 @@ -class BzrExternals < Formula - desc "Bazaar support for external branches like svn:externals" - homepage "https://launchpad.net/bzr-externals" - url "https://launchpad.net/bzr-externals/trunk/1.3.3/+download/bzr-externals-1.3.3.tar.gz" - sha256 "4ee33852f415cd5a982c4fa0bb548f86f2ae52368407c3e8d03d55bcfd7f3332" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/externals").install Dir["*"] - end - - test do - system "bzr", "whoami", "Homebrew" - - system "bzr", "init", "project1" - cd "project1" do - touch "readme1.txt" - system "bzr", "add" - system "bzr", "commit", "-m", "setup project1" - end - - system "bzr", "init", "project2" - cd "project2" do - touch "readme1.txt" - system "bzr", "branch", "../project1", "subproject" - mkdir ".bzrmeta" - (testpath/"project2/.bzrmeta/externals").write("../project1 subproject 1") - system "bzr", "add" - system "bzr", "commit", "-m", "setup project2" - end - - system "bzr", "branch", "project2", "project3" - cd "project3" do - assert_match(/setup project2/, shell_output("bzr log")) - cd "subproject" do - assert_match(/setup project1/, shell_output("bzr log")) - end - end - end -end diff --git a/Formula/bzr-extmerge.rb b/Formula/bzr-extmerge.rb deleted file mode 100644 index 01792c7a2f744..0000000000000 --- a/Formula/bzr-extmerge.rb +++ /dev/null @@ -1,18 +0,0 @@ -class BzrExtmerge < Formula - desc "External merge tool support for Bazaar" - homepage "https://launchpad.net/bzr-extmerge" - url "https://launchpad.net/bzr-extmerge/trunk/1.0.0/+download/bzr-extmerge-1.0.0.tar.gz" - sha256 "1b86d3a54fe669db19bc2a42a09eae52e449cc3ece8234377fd213e834f69cc0" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/extmerge").install Dir["*"] - end - - test do - assert_match /Calls an external merge program/, shell_output("bzr help extmerge") - end -end diff --git a/Formula/bzr-fastimport.rb b/Formula/bzr-fastimport.rb deleted file mode 100644 index 5519bb54f005c..0000000000000 --- a/Formula/bzr-fastimport.rb +++ /dev/null @@ -1,51 +0,0 @@ -class BzrFastimport < Formula - desc "Bazaar plugin for fast loading of revision control" - homepage "https://launchpad.net/bzr-fastimport" - url "https://launchpad.net/bzr-fastimport/trunk/0.13.0/+download/bzr-fastimport-0.13.0.tar.gz" - sha256 "5e296dc4ff8e9bf1b6447e81fef41e1217656b43368ee4056a1f024221e009eb" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "adb80d5f3694b382190564db1bf0f402dc4a63e5fc769846e79e61f258ff14ac" => :mojave - sha256 "af2955ee5a026c4573dbeb4be897babf2f8d3805636765b982b48793b8143c60" => :high_sierra - sha256 "420a665897be0a5e807a396720e51cb722b8ead02effee281d5843d56e3881be" => :sierra - sha256 "119240e135fcf0d170a009bd414b07fe13f65734afd5929de2527a62c66b6c79" => :el_capitan - sha256 "1155531ccdff247dcf8ab9cae133263199cbd708a1ae6ddc4d6e68133d1ab712" => :yosemite - sha256 "d784f0b66db2e31f53f7b21fa5263c3d050b490a45684d0f206c9488ca0335a6" => :mavericks - sha256 "fab457013d0f24e2d88b2dd76ad72d6b0101b9356e231bb0255b71866d318259" => :mountain_lion - end - - depends_on "bazaar" - depends_on "python@2" - - resource "python-fastimport" do - url "https://launchpad.net/python-fastimport/trunk/0.9.2/+download/python-fastimport-0.9.2.tar.gz" - sha256 "fd60f1173e64a5da7c5d783f17402f795721b7548ea3a75e29c39d89a60f261e" - end - - def install - resource("python-fastimport").stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - - (share/"bazaar/plugins/fastimport").install Dir["*"] - end - - def caveats; <<~EOS - In order to use this plugin you must set your PYTHONPATH in your #{shell_profile}: - - export PYTHONPATH="#{opt_libexec}/vendor/lib/python2.7/site-packages:$PYTHONPATH" - - EOS - end - - test do - ENV.prepend_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - bzr = Formula["bazaar"].bin/"bzr" - system bzr, "init" - assert_match(/fastimport #{version}/, - shell_output("#{bzr} plugins --verbose")) - system bzr, "fast-export", "--plain", "." - end -end diff --git a/Formula/bzr-rewrite.rb b/Formula/bzr-rewrite.rb deleted file mode 100644 index db721c0ba5d5d..0000000000000 --- a/Formula/bzr-rewrite.rb +++ /dev/null @@ -1,59 +0,0 @@ -class BzrRewrite < Formula - desc "Bazaar plugin to support rewriting revisions and rebasing" - homepage "https://launchpad.net/bzr-rewrite" - url "https://launchpad.net/bzr-rewrite/trunk/0.6.3/+download/bzr-rewrite-0.6.3.tar.gz" - sha256 "f4d0032a41a549a0bc3ac4248cd4599da859174ea33e56befcb095dd2c930794" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/rewrite").install Dir["*"] - end - - test do - file_path1 = testpath/"foo/trunk/file1.txt" - file_path2 = testpath/"foo/b1/file2.txt" - - system "bzr", "whoami", "Homebrew" - system "bzr", "init-repo", "foo" - - cd "foo" do - system "bzr", "init", "trunk" - cd "trunk" do - file_path1.write "change" - system "bzr", "add" - system "bzr", "commit", "-m", "trunk 1" - end - - system "bzr", "branch", "trunk", "b1" - cd "b1" do - file_path2.write "change" - system "bzr", "add" - system "bzr", "commit", "-m", "branch 1" - - file_path2.append_lines "change" - system "bzr", "commit", "-m", "branch 2" - end - - cd "trunk" do - file_path1.append_lines "change" - system "bzr", "commit", "-m", "trunk 2" - - file_path1.append_lines "change" - system "bzr", "commit", "-m", "trunk 3" - end - - cd "b1" do - system "bzr", "rebase", "../trunk" - - assert_match(/branch 2/, shell_output("bzr log -r5")) - assert_match(/branch 1/, shell_output("bzr log -r4")) - assert_match(/trunk 3/, shell_output("bzr log -r3")) - assert_match(/trunk 2/, shell_output("bzr log -r2")) - assert_match(/trunk 1/, shell_output("bzr log -r1")) - end - end - end -end diff --git a/Formula/bzr-upload.rb b/Formula/bzr-upload.rb deleted file mode 100644 index 11323fb790efe..0000000000000 --- a/Formula/bzr-upload.rb +++ /dev/null @@ -1,31 +0,0 @@ -class BzrUpload < Formula - desc "Bazaar plugin to incrementally upload changes to a dumb server" - homepage "https://launchpad.net/bzr-upload" - url "https://launchpad.net/bzr-upload/1.1/1.1.0/+download/bzr-upload-1.1.0.tar.gz" - sha256 "a48fc56d83114d9ab946cc358a5b33cb05e134787be135eb0a499317d6dec7fc" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/upload").install Dir["*"] - end - - test do - mkdir "destination" - - system "bzr", "whoami", "Homebrew" - system "bzr", "init", "project" - - cd "project" do - touch "readme.txt" - system "bzr", "add" - system "bzr", "commit", "-m", "initial import" - system "bzr", "upload", "../destination" - end - - assert_match("readme.txt", shell_output("ls -la destination")) - assert_match("bzr-upload.revid", shell_output("ls -la destination")) - end -end diff --git a/Formula/bzr-xmloutput.rb b/Formula/bzr-xmloutput.rb deleted file mode 100644 index 273439033bb95..0000000000000 --- a/Formula/bzr-xmloutput.rb +++ /dev/null @@ -1,28 +0,0 @@ -class BzrXmloutput < Formula - desc "Bazaar plugin that provides a option to generate XML output" - homepage "https://launchpad.net/bzr-xmloutput" - url "https://launchpad.net/bzr-xmloutput/trunk/0.8.8/+download/bzr-xmloutput-0.8.8.tar.gz" - sha256 "73b9b2f6ce4d9910031df7fd153d56d14f833c20a106f099bee5a33463f73b36" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/xmloutput").install Dir["*"] - end - - test do - system "bzr", "whoami", "Homebrew" - system "bzr", "init-repo", "sample" - system "bzr", "init", "sample/trunk" - touch testpath/"sample/trunk/test.txt" - - cd "sample/trunk" do - msg = "my commit" - system "bzr", "add", "test.txt" - system "bzr", "commit", "-m", msg - assert_match /.*#{msg}/, shell_output("bzr log --xml") - end - end -end diff --git a/Formula/bzrtools.rb b/Formula/bzrtools.rb deleted file mode 100644 index 6a3b55cc2b829..0000000000000 --- a/Formula/bzrtools.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Bzrtools < Formula - desc "Bazaar plugin that supplies useful additional utilities" - homepage "http://wiki.bazaar.canonical.com/BzrTools" - url "https://launchpad.net/bzrtools/stable/2.6.0/+download/bzrtools-2.6.0.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/b/bzrtools/bzrtools_2.6.0.orig.tar.gz" - sha256 "8b17fbba61dafc8dbefe1917a2ce084a8adc7650dee60add340615270dfb7f58" - - bottle :unneeded - - depends_on "bazaar" - - def install - (share/"bazaar/plugins/bzrtools").install Dir["*"] - end - - test do - system "bzr", "whoami", "Homebrew" - system "bzr", "init-repo", "sample" - system "bzr", "init", "sample/trunk" - touch testpath/"sample/trunk/test.txt" - - cd "sample/trunk" do - msg = "my commit" - system "bzr", "add", "test.txt" - system "bzr", "commit", "-m", msg - assert_match msg, shell_output("bzr heads") - end - end -end diff --git a/Formula/bzt.rb b/Formula/bzt.rb deleted file mode 100644 index 30c105d9d248f..0000000000000 --- a/Formula/bzt.rb +++ /dev/null @@ -1,250 +0,0 @@ -class Bzt < Formula - include Language::Python::Virtualenv - - desc "BlazeMeter Taurus" - homepage "https://gettaurus.org" - url "https://files.pythonhosted.org/packages/source/b/bzt/bzt-1.13.2.tar.gz" - sha256 "939d8c51f9eeffe35813f3370e2a88b06fdfa0238b3201c43fbe178d444e1504" - head "https://github.com/greyfenrir/taurus.git" - - bottle do - cellar :any_skip_relocation - sha256 "178b944a2a223a8fc841b53d4804408ab238edc176c84238abdcfc9836ff91d5" => :mojave - sha256 "486e3c5b365e471748e984bdddfe1e9a1a87e9d467f2d5fbedcfa925615b31d2" => :high_sierra - sha256 "666543689012d3c0875d31942818ae36e3bce7b1a2e59aa5c1530021568ba1d2" => :sierra - end - - depends_on "python@2" - - resource "apiritif" do - url "https://files.pythonhosted.org/packages/3e/4d/cc49edec3128c558e6476da68d165f1614b9250bca538aa86af2476d842e/apiritif-0.6.7.tar.gz" - sha256 "9667c04724aacf8f501f05178b6788dc138180c4909cb876a78d23b9a0f35af9" - end - - resource "Appium-Python-Client" do - url "https://files.pythonhosted.org/packages/40/2f/1a7cc0b95fb1863443500138ac5c587462b679da2647f93ffa1aeb7c43e4/Appium-Python-Client-0.31.tar.gz" - sha256 "54e57d5894070b62cf36b0c3805cce643980fee6561c9af97b5042d64e4d188f" - end - - resource "astunparse" do - url "https://files.pythonhosted.org/packages/14/53/3b080b8cff6a439d4371fcd02656b94b7325203b5c7f8cacc4789117b052/astunparse-1.6.1.tar.gz" - sha256 "d27b16fb33dea0778c5a2c01801554eae0d3f8a8d6f604f15627589c3d6f11ca" - end - - resource "atomicwrites" do - url "https://files.pythonhosted.org/packages/ac/ed/a311712ef6b4355035489f665e63e1a73f9eb371929e3c98e5efd451069e/atomicwrites-1.2.1.tar.gz" - sha256 "ec9ae8adaae229e4f8446952d204a3e4b5fdd2d099f9be3aaf556120135fb3ee" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/0f/9e/26b1d194aab960063b266170e53c39f73ea0d0d3f5ce23313e0ec8ee9bdf/attrs-18.2.0.tar.gz" - sha256 "10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "colorlog" do - url "https://files.pythonhosted.org/packages/2c/a8/8ce4f59cf1fcbb9ebe750fcbab723146d95687c37256ed367a11d9f74265/colorlog-3.1.4.tar.gz" - sha256 "418db638c9577f37f0fae4914074f395847a728158a011be2a193ac491b9779d" - end - - resource "cssselect" do - url "https://files.pythonhosted.org/packages/52/ea/f31e1d2e9eb130fda2a631e22eac369dc644e8807345fbed5113f2d6f92b/cssselect-1.0.3.tar.gz" - sha256 "066d8bc5229af09617e24b3ca4d52f1f9092d9e061931f4184cd572885c23204" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz" - sha256 "c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c" - end - - resource "EasyProcess" do - url "https://files.pythonhosted.org/packages/0d/f1/d2de7591e7dfc164d286fa16f051e6c0cf3141825586c3b04ae7cda7ac0f/EasyProcess-0.2.3.tar.gz" - sha256 "94e241cadc9a46f55b5c06000df85618849602e7e1865b8de87576b90a22e61f" - end - - resource "funcsigs" do - url "https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz" - sha256 "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50" - end - - resource "fuzzyset" do - url "https://files.pythonhosted.org/packages/92/21/4939957d219ff9f88b3b120061282199eda0ddd7393732a8c15cfcf51253/fuzzyset-0.0.15.tar.gz" - sha256 "861f156d69bfe22096047b8c07c8cbc78291022f4dabe55b81d2bd8235eb4402" - end - - resource "gevent" do - url "https://files.pythonhosted.org/packages/10/c1/9499b146bfa43aa4f1e0ed1bab1bd3209a4861d25650c11725036c731cf5/gevent-1.3.7.tar.gz" - sha256 "3f06f4802824c577272960df003a304ce95b3e82eea01dad2637cc8609c80e2c" - end - - resource "greenlet" do - url "https://files.pythonhosted.org/packages/f8/e8/b30ae23b45f69aa3f024b46064c0ac8e5fcb4f22ace0dca8d6f9c8bbe5e7/greenlet-0.4.15.tar.gz" - sha256 "9416443e219356e3c31f1f918a91badf2e37acf297e2fa13d24d1cc2380f8fbc" - end - - resource "hdrpy" do - url "https://files.pythonhosted.org/packages/47/8c/159be762f787888651f9895a60d8564d2c1df5b2581cc733823b45759cfd/hdrpy-0.3.3.tar.gz" - sha256 "8461ed2c0d577468e5499f8b685d9bf9660b72b8640bff02c78ba1f1b9bf5185" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "jsonpath-rw" do - url "https://files.pythonhosted.org/packages/71/7c/45001b1f19af8c4478489fbae4fc657b21c4c669d7a5a036a86882581d85/jsonpath-rw-1.4.0.tar.gz" - sha256 "05c471281c45ae113f6103d1268ec7a4831a2e96aa80de45edc89b11fac4fbec" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/4b/20/ddf5eb3bd5c57582d2b4652b4bbcf8da301bdfe5d805cb94e805f4d7464d/lxml-4.2.5.tar.gz" - sha256 "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/88/ff/6d485d7362f39880810278bdc906c13300db05485d9c65971dec1142da6a/more-itertools-4.3.0.tar.gz" - sha256 "c476b5d3a34e12d40130bc2f935028b5f636df8f372dc2c1c01dc19681b2039e" - end - - resource "nose" do - url "https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz" - sha256 "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98" - end - - resource "numpy" do - url "https://files.pythonhosted.org/packages/2d/80/1809de155bad674b494248bcfca0e49eb4c5d8bee58f26fe7a0dd45029e2/numpy-1.15.4.zip" - sha256 "3d734559db35aa3697dadcea492a423118c5c55d176da2f3be9c98d4803fc2a7" - end - - resource "pathlib2" do - url "https://files.pythonhosted.org/packages/bf/d7/a2568f4596b75d2c6e2b4094a7e64f620decc7887f69a1f2811931ea15b9/pathlib2-2.3.3.tar.gz" - sha256 "25199318e8cc3c25dcb45cbe084cc061051336d5a9ea2a12448d3d8cb748f742" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/65/25/81d0de17cd00f8ca994a4e74e3c4baf7cd25072c0b831dad5c7d9d6138f8/pluggy-0.8.0.tar.gz" - sha256 "447ba94990e8014ee25ec853339faf7b0fc8050cdc3289d4d71f7f410fb90095" - end - - resource "ply" do - url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" - sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" - end - - resource "progressbar33" do - url "https://files.pythonhosted.org/packages/71/fc/7c8e01f41a6e671d7b11be470eeb3d15339c75ce5559935f3f55890eec6b/progressbar33-2.4.tar.gz" - sha256 "51fe0d9b3b4023db2f983eeccdfc8c9846b84db8443b9bee002c7f58f4376eff" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/14/a2/8ac7dda36eac03950ec2668ab1b466314403031c83a95c5efc81d2acf163/psutil-5.4.5.tar.gz" - sha256 "ebe293be36bb24b95cdefc5131635496e88b17fabbcf1e4bc9b5c01f5e489cfe" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/c7/fa/eb6dd513d9eb13436e110aaeef9a1703437a8efa466ce6bb2ff1d9217ac7/py-1.7.0.tar.gz" - sha256 "bf92637198836372b520efcba9e020c330123be8ce527e535d185ed4b6f45694" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/24/f1/0e378fa418d9ac15d2d28296be916a55e351a6ffeb74105fe333c15ea58a/pytest-4.0.1.tar.gz" - sha256 "1d131cc532be0023ef8ae265e2a779938d0619bb6c2510f52987ffcba7fa1ee4" - end - - resource "python-Levenshtein" do - url "https://files.pythonhosted.org/packages/42/a9/d1785c85ebf9b7dfacd08938dd028209c34a0ea3b1bcdb895208bd40a67d/python-Levenshtein-0.12.0.tar.gz" - sha256 "033a11de5e3d19ea25c9302d11224e1a1898fe5abd23c61c7c360c25195e3eb1" - end - - resource "PyVirtualDisplay" do - url "https://files.pythonhosted.org/packages/39/37/f285403a09cc261c56b6574baace1bdcf4b8c7428c8a7239cbba137bc0eb/PyVirtualDisplay-0.2.1.tar.gz" - sha256 "012883851a992f9c53f0dc6a512765a95cf241bdb734af79e6bdfef95c6e9982" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/40/35/298c36d839547b50822985a2cf0611b3b978a5ab7a5af5562b8ebe3e1369/requests-2.20.1.tar.gz" - sha256 "ea881206e59f41dbd0bd445437d792e43906703fff75ca8ff43ccdb11f33f263" - end - - resource "scandir" do - url "https://files.pythonhosted.org/packages/16/2a/557af1181e6b4e30254d5a6163b18f5053791ca66e251e77ab08887e8fe3/scandir-1.9.0.tar.gz" - sha256 "44975e209c4827fc18a3486f257154d34ec6eaec0f90fef0cca1caa482db7064" - end - - resource "selenium" do - url "https://files.pythonhosted.org/packages/ed/9c/9030520bf6ff0b4c98988448a93c04fcbd5b13cd9520074d8ed53569ccfe/selenium-3.141.0.tar.gz" - sha256 "deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "terminaltables" do - url "https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/terminaltables-3.1.0.tar.gz" - sha256 "f3eb0eb92e3833972ac36796293ca0906e998dc3be91fbe1f8615b331b853b81" - end - - resource "texttable" do - url "https://files.pythonhosted.org/packages/bd/a8/45aa1c64f0aea4967766d9b46be3c0b03b096d8fb8c3cfe119884cfeed5e/texttable-1.5.0.tar.gz" - sha256 "1ba399c103c825202659c4d638946c15ffc565ad7846ee0672964786f437fb57" - end - - resource "unicodecsv" do - url "https://files.pythonhosted.org/packages/6f/a4/691ab63b17505a26096608cc309960b5a6bdf39e4ba1a793d5f9b1a53270/unicodecsv-0.14.1.tar.gz" - sha256 "018c08037d48649a0412063ff4eda26eaa81eff1546dbffa51fa5293276ff7fc" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/68/f0/545cbeae75f248c4ad7c2d062672cd7e046dd325a81b74fc02c62450d133/wheel-0.32.0.tar.gz" - sha256 "a26bc27230baaec9039972b7cb43db94b17c13e4d66a9ff6a4d46a0344c55c9a" - end - - def install - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - virtualenv_install_with_resources - end - - test do - cmd = "#{bin}/bzt -o execution.executor=nose -o execution.iterations=1 -o execution.scenario.requests.0=https://gettaurus.org/" - assert_match "INFO: Samples count: 1, 0.00% failures", shell_output(cmd) - end -end diff --git a/Formula/c-ares.rb b/Formula/c-ares.rb deleted file mode 100644 index 42e0d797630f9..0000000000000 --- a/Formula/c-ares.rb +++ /dev/null @@ -1,45 +0,0 @@ -class CAres < Formula - desc "Asynchronous DNS library" - homepage "https://c-ares.haxx.se/" - url "https://c-ares.haxx.se/download/c-ares-1.15.0.tar.gz" - sha256 "6cdb97871f2930530c97deb7cf5c8fa4be5a0b02c7cea6e7c7667672a39d6852" - - bottle do - cellar :any - sha256 "6c1782cd4a17e74f8f7b6258faa754ddcf9bf3a388cb862d6b5da8832668f9ef" => :mojave - sha256 "45fcb6953de6f43026bc28f3d8798ced5e5a0bbd28c18240fc0e9bc66174fc1e" => :high_sierra - sha256 "3d2c45de57a6c1e9fe867d67fa4509d2d42aae5fef8f5d5fc1ea34afff2ff22b" => :sierra - end - - head do - url "https://github.com/bagder/c-ares.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "./buildconf" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-debug" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - ares_library_init(ARES_LIB_INIT_ALL); - ares_library_cleanup(); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lcares", "-o", "test" - system "./test" - end -end diff --git a/Formula/c-blosc.rb b/Formula/c-blosc.rb deleted file mode 100644 index 7f640b7f46bab..0000000000000 --- a/Formula/c-blosc.rb +++ /dev/null @@ -1,32 +0,0 @@ -class CBlosc < Formula - desc "Blocking, shuffling and loss-less compression library" - homepage "http://blosc.org/" - url "https://github.com/Blosc/c-blosc/archive/v1.15.0.tar.gz" - sha256 "dbbb01f9fedcdf2c2ff73296353a9253f44ce9de89c081cbd8146170dce2ba8f" - - bottle do - cellar :any - sha256 "51df9dc2043e8bc48b89734da8cfdcf8c68a92d35f18ee960fd7a9a3fd0b0bfc" => :mojave - sha256 "f9485bcd4cb681e30a2df2505a54196e7ecab3c6eceb75f0ec97ac4aa5261d01" => :high_sierra - sha256 "9625ec4aeccb3804a56e6908d7b2e4a409819a5d42ffa778b4d79744014de1e4" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - blosc_init(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lblosc", "-o", "test" - system "./test" - end -end diff --git a/Formula/c-kermit.rb b/Formula/c-kermit.rb deleted file mode 100644 index 3d89b26533064..0000000000000 --- a/Formula/c-kermit.rb +++ /dev/null @@ -1,33 +0,0 @@ -class CKermit < Formula - desc "Scriptable network and serial communication for UNIX and VMS" - homepage "http://www.kermitproject.org/" - url "http://www.kermitproject.org/ftp/kermit/archives/cku302.tar.gz" - version "9.0.302" - sha256 "0d5f2cd12bdab9401b4c836854ebbf241675051875557783c332a6a40dac0711" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "3021e5f091b9bd56f3b5b1f289552ba83b1d6c10b229fac9aaeb8bbbecdc6f6e" => :mojave - sha256 "b6eae07c8d3365501f4e13af80b54ded073a2b1fc09fa885a445c7f52d96d589" => :high_sierra - sha256 "b19ecd36ee298cba626b1276c228cdb4ee57726cf5af64166d8ff2800067e926" => :sierra - sha256 "446776aff790c8f3b6f30be915dc18f4beffa973b92201384682beb7dc714562" => :el_capitan - sha256 "fe01b123ec7cddfbf46908bbf2071542a92f195d75733230896b5de78d92cdef" => :yosemite - sha256 "eebf4b834242dc754c00eb87ee5cee621d39f9369cfe67cdb620a1f81a197f20" => :mavericks - end - - def install - system "make", "macosx" - man1.mkpath - - # The makefile adds /man to the end of manroot when running install - # hence we pass share here, not man. If we don't pass anything it - # uses {prefix}/man - system "make", "prefix=#{prefix}", "manroot=#{share}", "install" - end - - test do - assert_match "C-Kermit #{version}", - shell_output("#{bin}/kermit -C VERSION,exit") - end -end diff --git a/Formula/c/c-ares.rb b/Formula/c/c-ares.rb new file mode 100644 index 0000000000000..66745fccc1233 --- /dev/null +++ b/Formula/c/c-ares.rb @@ -0,0 +1,57 @@ +class CAres < Formula + desc "Asynchronous DNS library" + homepage "https://c-ares.org/" + url "https://github.com/c-ares/c-ares/releases/download/v1.34.5/c-ares-1.34.5.tar.gz" + sha256 "7d935790e9af081c25c495fd13c2cfcda4792983418e96358ef6e7320ee06346" + license "MIT" + head "https://github.com/c-ares/c-ares.git", branch: "main" + + livecheck do + url :homepage + regex(/href=.*?c-ares[._-](\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f1ea4e3a48f43370fac2a1d2c285e87fadc48ab3dbda63b39d8eb04b025925d7" + sha256 cellar: :any, arm64_sequoia: "76858a7f6dd6df68f7e9d13aca30a299d5947b5b6d6ce979ee660dd4ecca2bb6" + sha256 cellar: :any, arm64_sonoma: "5bc958432063e6dc18633d06f1ef2a6939c60bfc60d3d9162183c71556e21198" + sha256 cellar: :any, arm64_ventura: "60dcb45f4148187db1aa35a2ea1fd195126448b0c013fb04ec2412788c09156a" + sha256 cellar: :any, sonoma: "c152939c8cbf3784c07d1c335fa4d8a279926613ef8a63fd8b86ce0c9fc2c1ce" + sha256 cellar: :any, ventura: "ec24a40eb0839a531fefd518d459d9096594c8d5f99073cb14dd90818aac1443" + sha256 cellar: :any_skip_relocation, arm64_linux: "7edb30f8604f12af709a3edd142cd1e4e0fa6d6ac9592ccd81687dac5344400a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "222c77a232de91b511238cf81f3290b5e5f7d788f7011a447ad92ae38089fa72" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DCARES_STATIC=ON + -DCARES_SHARED=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + ares_library_init(ARES_LIB_INIT_ALL); + ares_library_cleanup(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcares", "-o", "test" + system "./test" + + system bin/"ahost", "127.0.0.1" + end +end diff --git a/Formula/c/c-blosc.rb b/Formula/c/c-blosc.rb new file mode 100644 index 0000000000000..4d123d471f87c --- /dev/null +++ b/Formula/c/c-blosc.rb @@ -0,0 +1,47 @@ +class CBlosc < Formula + desc "Blocking, shuffling and loss-less compression library" + homepage "https://www.blosc.org/" + url "https://github.com/Blosc/c-blosc/archive/refs/tags/v1.21.6.tar.gz" + sha256 "9fcd60301aae28f97f1301b735f966cc19e7c49b6b4321b839b4579a0c156f38" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0e7738316917ed92787b41bf1c0a7445edf167d5928249342ab9caadb4fe08a6" + sha256 cellar: :any, arm64_sequoia: "2e382c2fc65f79ed2a7a71a30c625af2187aaca91132643af2087039a50736c6" + sha256 cellar: :any, arm64_sonoma: "7f9fa549976087279fb6135f6b068ef6a92eb7a76937b229e253dc0e7324a344" + sha256 cellar: :any, arm64_ventura: "deae8256b46bfb5973bcb30321c2e5e28a86e733ce074d3395d75f797d65126e" + sha256 cellar: :any, arm64_monterey: "2ab5b72ffe025c978945c4225be4eab02b012b82280dd59e88654a1d889964d7" + sha256 cellar: :any, sonoma: "f6837382559667940cba3903168bfaeff2bafbca5d39c41ca7586507f6e2623c" + sha256 cellar: :any, ventura: "ac3f9f476b9f5f72123b945f1f67aadad959762f55fb1179eaa3471208da5c27" + sha256 cellar: :any, monterey: "39017af35970c5dcbdc33dacdd2673bff743593aaa26a68a2328c8bb3e623dbf" + sha256 cellar: :any_skip_relocation, arm64_linux: "866cec70c5ebbb92e7115481a9aa3de619f6425c6539b1c446b83ec0b3326c41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "945cb54d12083813c6ef5c7a4dcaf747fbfd8db3dd37e8c4d3f69150354d69ae" + end + + depends_on "cmake" => :build + + # Update minimal cmake version + # Remove on next release. + patch do + url "https://github.com/Blosc/c-blosc/commit/051b9d2cb9437e375dead8574f66d80ebce47bee.patch?full_index=1" + sha256 "756460f653877c12575889f20640605ecc2e49ab72583fba62f59642098fcd63" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + blosc_init(); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lblosc", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/c-blosc2.rb b/Formula/c/c-blosc2.rb new file mode 100644 index 0000000000000..c439e9c2acd7f --- /dev/null +++ b/Formula/c/c-blosc2.rb @@ -0,0 +1,56 @@ +class CBlosc2 < Formula + desc "Fast, compressed, persistent binary data store library for C" + homepage "https://www.blosc.org" + url "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.21.3.tar.gz" + sha256 "4ac2e8b7413624662767b4348626f54ad621d6fbd315d0ba8be32a6ebaa21d41" + license "BSD-3-Clause" + head "https://github.com/Blosc/c-blosc2.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0285d84023efb6e0407e5094bce81f03e2c2b73edf38e92b4aa2db279eb0b927" + sha256 cellar: :any, arm64_sequoia: "8804b8809228eafa8d06c4b3acfe77b108fa63ce6f4df82a4ac03fd86016e454" + sha256 cellar: :any, arm64_sonoma: "c4061219864a47d710ac2d063cd7b25064949460bc7fdbdc46177626c2260a8c" + sha256 cellar: :any, sonoma: "0219fcdd5a1fe61c51d8604ed233283410edd60f2196a901a7a1dea2e29d5101" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d431a804e2c29bd36335d6d7b3f77b90b33228e8e02b6abaaeb136ea67b282d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70e777acc2ab3502e45149d7d429866a617627b1b309b5883c38467d3319fe40" + end + + depends_on "cmake" => :build + depends_on "lz4" + depends_on "zstd" + + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1400 + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1400 + + internal_complibs = buildpath.glob("internal-complibs/{lz4,zlib,zstd}-*") + odie "Failed to find vendored sources for removal!" if internal_complibs.count != 3 + rm_r internal_complibs + + args = %w[ + -DBUILD_TESTS=OFF + -DBUILD_FUZZERS=OFF + -DBUILD_BENCHMARKS=OFF + -DBUILD_EXAMPLES=OFF + -DPREFER_EXTERNAL_LZ4=ON + -DPREFER_EXTERNAL_ZLIB=ON + -DPREFER_EXTERNAL_ZSTD=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples/simple.c" + end + + test do + system ENV.cc, pkgshare/"simple.c", "-I#{include}", "-L#{lib}", "-lblosc2", "-o", "test" + assert_match "Successful roundtrip!", shell_output(testpath/"test") + end +end diff --git a/Formula/c/c-kermit.rb b/Formula/c/c-kermit.rb new file mode 100644 index 0000000000000..8d89b56f64d78 --- /dev/null +++ b/Formula/c/c-kermit.rb @@ -0,0 +1,194 @@ +class CKermit < Formula + desc "Scriptable network and serial communication for UNIX and VMS" + homepage "https://www.kermitproject.org/" + url "https://www.kermitproject.org/ftp/kermit/archives/cku302.tar.gz" + version "9.0.302" + sha256 "0d5f2cd12bdab9401b4c836854ebbf241675051875557783c332a6a40dac0711" + license "BSD-3-Clause" + + # C-Kermit archive file names only contain the patch version and the full + # version has to be obtained from text on the project page. + livecheck do + url "https://www.kermitproject.org/ckermit.html" + regex(/The current C-Kermit release is v?(\d+(?:\.\d+)+) /i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9f4e1eb3f4cea80c8e82892451358cc831f6aebcd024a7776a2ce89d86fd8c2c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cea3196c019d7d08ec77210cc9ce17c3339c84d5255f914bf773e5186ae709bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "399806a413435186dd70cd55cd12782354c3642259870b348f81ca40b6424cbb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ee8af35826f4b5be62d1c4b4e8b38eb39915da0b28d6b8f53ff9dfbb99f6698" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8315af8bc632253d0b2fdfde4b9da0fef5ad11af891b4e4eb8b51a35902f1e33" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "259f1f0d2e2a1af6545bec724db3e1f154169dbd33e2b8ef43364381b3664cfe" + sha256 cellar: :any_skip_relocation, sonoma: "b940d6c43c5b2298913376ff58726c674de4a741353460e7de2a94c7d01d99df" + sha256 cellar: :any_skip_relocation, ventura: "0772fae0e560c8e726c611bd1e5b55d03e77f6f42feb3f763cb12f15a0151dc9" + sha256 cellar: :any_skip_relocation, monterey: "e379dd0cdd6eb9eec792cdd48ca7c5b7cd9281288840b15ce1d860fbb78982b2" + sha256 cellar: :any_skip_relocation, big_sur: "c2867c176bc81a35f56d5fe29847500b7c5f8c3e05ac10b5986073502a888a0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c5ef16933a585d24b5186f5588e5cbb59d3a57af93e447660e159dc98a649f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d5959e91d9fce4bee2b835433a8d2cc589f8f9f37e02c0f1078dbe645e6351a" + end + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + + # Apply patch to fix build failure with glibc 2.28+ + # Apply patch to fix build failure on Sonoma (missing headers) + # Will be fixed in next release: https://www.kermitproject.org/ckupdates.html + patch :DATA + + def install + # Makefile only supports system libraries on Linux + if OS.linux? + inreplace "makefile" do |s| + s.gsub! "/usr/include/ncurses", "#{Formula["ncurses"].opt_include}/ncurses" + s.gsub! "/usr/lib/libncurses", "#{Formula["ncurses"].opt_lib}/libncurses" + s.gsub! "/usr/include/crypt", "#{Formula["libxcrypt"].opt_include}/crypt" + s.gsub! "/usr/lib/libcrypt", "#{Formula["libxcrypt"].opt_lib}/libcrypt" + end + end + + os = OS.mac? ? "macosx" : "linux" + system "make", os + man1.mkpath + + # The makefile adds /man to the end of manroot when running install + # hence we pass share here, not man. If we don't pass anything it + # uses {prefix}/man + system "make", "prefix=#{prefix}", "manroot=#{share}", "install" + end + + test do + assert_match "C-Kermit #{version}", + shell_output("#{bin}/kermit -C VERSION,exit") + end +end + +__END__ +diff -ru z/ckucmd.c k/ckucmd.c +--- z/ckucmd.c 2004-01-07 10:04:04.000000000 -0800 ++++ k/ckucmd.c 2019-01-01 15:52:44.798864262 -0800 +@@ -7103,7 +7103,7 @@ + + /* Here we must look inside the stdin buffer - highly platform dependent */ + +-#ifdef _IO_file_flags /* Linux */ ++#ifdef _IO_EOF_SEEN /* Linux */ + x = (int) ((stdin->_IO_read_end) - (stdin->_IO_read_ptr)); + debug(F101,"cmdconchk _IO_file_flags","",x); + #else /* _IO_file_flags */ +diff --git a/ckcdeb.h b/ckcdeb.h +index 34ff008..a066187 100644 +--- a/ckcdeb.h ++++ b/ckcdeb.h +@@ -2374,6 +2374,62 @@ _PROTOTYP( void bleep, (short) ); + #ifndef NETCMD + #define NETCMD + #endif /* NETCMD */ ++ ++#ifndef NO_OPENPTY /* Can use openpty() */ ++#ifndef HAVE_OPENPTY ++#ifdef __linux__ ++#define HAVE_OPENPTY ++#else ++#ifdef __FreeBSD__ ++#define HAVE_OPENPTY ++#else ++#ifdef __OpenBSD__ ++#define HAVE_OPENPTY ++#else ++#ifdef __NetBSD__ ++#define HAVE_OPENPTY ++#include ++#else ++#ifdef MACOSX10 ++#define HAVE_OPENPTY ++#endif /* MACOSX10 */ ++#endif /* __NetBSD__ */ ++#endif /* __OpenBSD__ */ ++#endif /* __FreeBSD__ */ ++#endif /* __linux__ */ ++#endif /* HAVE_OPENPTY */ ++#endif /* NO_OPENPTY */ ++/* ++ This needs to be expanded and checked. ++ The makefile assumes the library (at least for all linuxes) ++ is always libutil but I've only verified it for a few. ++ If a build fails because ++*/ ++#ifdef HAVE_OPENPTY ++#ifdef __linux__ ++#include ++#else ++#ifdef __NetBSD__ ++#include ++#else ++#ifdef __OpenBSD__ ++#include ++#else ++#ifdef __FreeBSD__ ++#include ++#else ++#ifdef MACOSX ++#include ++#else ++#ifdef QNX ++#include ++#endif /* QNX */ ++#endif /* MACOSX */ ++#endif /* __FreeBSD__ */ ++#endif /* __OpenBSD__ */ ++#endif /* __NetBSD__ */ ++#endif /* __linux__ */ ++#endif /* HAVE_OPENPTY */ + #endif /* NETPTY */ + + #ifndef CK_UTSNAME /* Can we call uname()? */ +diff --git a/ckcmai.c b/ckcmai.c +index a5640e5..0257050 100644 +--- a/ckcmai.c ++++ b/ckcmai.c +@@ -1590,6 +1590,12 @@ cc_clean(); /* This can't be right? */ + #endif /* GEMDOS */ + #endif /* NOCCTRAP */ + ++#ifdef TIMEH ++/* This had to be added for NetBSD 6.1 - it might have "effects" elsewhere */ ++/* Tue Sep 3 17:03:42 2013 */ ++#include ++#endif /* TIMEH */ ++ + #ifndef NOXFER + /* Info associated with a system ID */ + +diff --git a/ckuusx.c b/ckuusx.c +index d332bed..d3de9ae 100644 +--- a/ckuusx.c ++++ b/ckuusx.c +@@ -43,6 +43,10 @@ + #define NOHTERMCAP + #else + #ifdef MACOSX ++#ifndef OLDMACOSX ++#include /* macOS after 10.12 */ ++#include ++#endif /* OLDMACOSX */ + #define NOHTERMCAP + #endif /* MACOSX */ + #endif /* OPENBSD */ +diff --git a/ckwart.c b/ckwart.c +index 2f3bb75..71b9080 100644 +--- a/ckwart.c ++++ b/ckwart.c +@@ -493,7 +493,8 @@ warray(fp,nam,cont,siz,typ) FILE *fp; char *nam; int cont[],siz; char *typ; { + fprintf(fp,"%2d\n};\n",cont[siz-1]); + } + +-#ifndef STRATUS ++int ++#if 0 + #ifdef MAINTYPE + /* + If you get complaints about "main: return type is not blah", diff --git a/Formula/c/c.rb b/Formula/c/c.rb new file mode 100644 index 0000000000000..e743d7b962b54 --- /dev/null +++ b/Formula/c/c.rb @@ -0,0 +1,21 @@ +class C < Formula + desc 'Compile and execute C "scripts" in one go' + homepage "https://github.com/ryanmjacobs/c" + url "https://github.com/ryanmjacobs/c/archive/refs/tags/v0.15.1.tar.gz" + sha256 "ecfad78cb0ab56da44dcfed805f5c261ddefd6dc4a4e57eb2dcfcffa85330605" + license "MIT" + head "https://github.com/ryanmjacobs/c.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ea0ccaab4e1a14f38642b582e2ab9c5c53b3bc8a4a90e34e51f6d3eda5a15976" + end + + def install + bin.install "c" + end + + test do + (testpath/"test.c").write("int main(void){return 0;}") + system bin/"c", testpath/"test.c" + end +end diff --git a/Formula/c/c10t.rb b/Formula/c/c10t.rb new file mode 100644 index 0000000000000..ebba4a8b00f0d --- /dev/null +++ b/Formula/c/c10t.rb @@ -0,0 +1,178 @@ +class C10t < Formula + desc "Minecraft cartography tool" + homepage "https://github.com/udoprog/c10t" + url "https://github.com/udoprog/c10t/archive/refs/tags/1.7.tar.gz" + sha256 "0e5779d517105bfdd14944c849a395e1a8670bedba5bdab281a0165c3eb077dc" + license "BSD-3-Clause" + revision 12 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fa2cc5158958a49d439e6306581adb0a4284d84d02fcd4fbb2c1520751800dcf" + sha256 cellar: :any, arm64_sequoia: "ca8927a16ee21b13da4ccf12f9cc600c01c4a692b35f09bb061c81f9dabe1650" + sha256 cellar: :any, arm64_sonoma: "d785224c143b4df6cdf3ffc6e2a6cb5b8cb0cdfaf06ff6221a1d39b3ba71ad19" + sha256 cellar: :any, arm64_ventura: "c2056939dd01e763b8687f77646edba021fac9653ce866afa94144868934a04f" + sha256 cellar: :any, sonoma: "e51497da78d4b2948f1d71a6ccf360d98bc6135465f059820f593f0091e2987e" + sha256 cellar: :any, ventura: "aa46dea07945ea582d8046585db329c555ccca9136fe5ebf604f15e57746fd23" + sha256 cellar: :any_skip_relocation, arm64_linux: "b91294ec460d53d9509da20a9ca2df6675fc4a5f478d64a6762f9570911ff4f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd4e37bdf7a3cf012fb736e1b84539877c80ba65ccd2c812e26ee5df81ac95ba" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "freetype" + depends_on "libpng" + + uses_from_macos "zlib" + + # Needed to compile against newer boost + # Can be removed for the next version of c10t after 1.7 + # See: https://github.com/udoprog/c10t/pull/153 + patch do + url "https://github.com/udoprog/c10t/commit/4a392b9f06d08c70290f4c7591e84ecdbc73d902.patch?full_index=1" + sha256 "7197435e9384bf93f580fab01097be549c8c8f2c54a96ba4e2ae49a5d260e297" + end + + # Fix freetype detection; adapted from this upstream commit: + # https://github.com/udoprog/c10t/commit/2a2b8e49d7ed4e51421cc71463c1c2404adc6ab1 + patch do + url "https://gist.githubusercontent.com/mistydemeo/f7ab02089c43dd557ef4/raw/a0ae7974e635b8ebfd02e314cfca9aa8dc95029d/c10t-freetype.diff" + sha256 "9fbb7ccc643589ac1d648e105369e63c9220c26d22f7078a1f40b27080d05db4" + end + + # Ensure zlib header is included for libpng; fixed upstream + patch do + url "https://github.com/udoprog/c10t/commit/800977bb23e6b4f9da3ac850ac15dd216ece0cda.patch?full_index=1" + sha256 "c7a37f866b42ff352bb58720ad6c672cde940e1b8ab79de4b6fa0be968b97b66" + end + + # Fix build with Boost 1.85.0, issue ref: https://github.com/udoprog/c10t/issues/313 + # Fix build with Boost 1.89.0, issue ref: https://github.com/udoprog/c10t/issues/315 + patch :DATA + + def install + args = ["-DCMAKE_CXX_STANDARD=11", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"] + unless OS.mac? + args += %W[ + -DCMAKE_LINK_WHAT_YOU_USE=ON + -DZLIB_LIBRARY=#{Formula["zlib"].opt_lib}/libz.so.1 + -DZLIB_INCLUDE_DIR=#{Formula["zlib"].include} + ] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/c10t" + end + + test do + system bin/"c10t", "--list-colors" + end +end + +__END__ +diff --git a/src/cache.hpp b/src/cache.hpp +index 958b283..f8ddb06 100644 +--- a/src/cache.hpp ++++ b/src/cache.hpp +@@ -35,7 +35,7 @@ public: + cache_file(const fs::path cache_dir, const fs::path source_path, bool cache_compress) + : cache_dir(cache_dir), source_path(source_path), + cache_compress(cache_compress), +- cache_path(cache_dir / (fs::basename(source_path) + ".cmap")) ++ cache_path(cache_dir / (source_path.stem().string() + ".cmap")) + { + } + +@@ -44,7 +44,7 @@ public: + } + + bool exists() { +- return fs::is_regular(cache_path) ++ return fs::is_regular_file(cache_path) + && fs::last_write_time(cache_path) >= fs::last_write_time(source_path); + } + +diff --git a/src/fileutils.hpp b/src/fileutils.hpp +index 3b8f2a7..45b0cfb 100644 +--- a/src/fileutils.hpp ++++ b/src/fileutils.hpp +@@ -47,7 +47,7 @@ public: + ++itr ) + { + if (fs::is_directory(itr->status())) { +- if (!filter(fs::basename(itr->path()))) { ++ if (!filter(itr->path().stem().string())) { + continue; + } + +diff --git a/src/main.cpp b/src/main.cpp +index 78bd49c..5b539bd 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -1251,7 +1251,7 @@ int main(int argc, char *argv[]){ + + if (s.use_split) { + try { +- boost::format(fs::basename(s.output_path)) % 0 % 0; ++ boost::format(s.output_path.stem().string()) % 0 % 0; + } catch (boost::io::too_many_args& e) { + error << "The `-o' parameter must contain two number format specifiers `%d' (x and y coordinates) - example: -o out/base.%d.%d.png"; + goto exit_error; +diff --git a/src/mc/utils.cpp b/src/mc/utils.cpp +index a1b3e0e..2ef6b3e 100644 +--- a/src/mc/utils.cpp ++++ b/src/mc/utils.cpp +@@ -83,10 +83,10 @@ namespace mc { + throw invalid_argument("not a regular file"); + } + +- string extension = fs::extension(path); ++ string extension = path.extension().string(); + + std::vector parts; +- split(parts, fs::basename(path), '.'); ++ split(parts, path.stem().string(), '.'); + + if (parts.size() != 3 || extension.compare(".dat") != 0) { + throw invalid_argument("level data file name does not match ..dat"); +@@ -104,10 +104,10 @@ namespace mc { + throw invalid_argument("not a regular file"); + } + +- string extension = fs::extension(path); ++ string extension = path.extension().string(); + + std::vector parts; +- split(parts, fs::basename(path), '.'); ++ split(parts, path.stem().string(), '.'); + + if (parts.size() != 3 || extension.compare(".mcr") != 0) { + throw invalid_argument("level data file name does not match ..mcr"); +diff --git a/src/players.cpp b/src/players.cpp +index 21b0883..b4afef6 100644 +--- a/src/players.cpp ++++ b/src/players.cpp +@@ -32,7 +32,7 @@ void register_double(player *p, std::string name, nbt::Double value) { + + player::player(const fs::path path) : + path(path), +- name(fs::basename(path)), grammar_error(false), in_pos(false), ++ name(path.stem().string()), grammar_error(false), in_pos(false), + pos_c(0), xPos(0), yPos(0), zPos(0) + { + nbt::Parser parser(this); +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3f1531a..280cb2b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,7 +23,7 @@ find_package(ZLIB REQUIRED) + find_package(PNG REQUIRED) + find_package(FreeType REQUIRED) + find_package(Threads REQUIRED) +-find_package(Boost COMPONENTS thread filesystem system REQUIRED) ++find_package(Boost COMPONENTS thread filesystem REQUIRED) + + include_directories(${ZLIB_INCLUDE_DIR}) + include_directories(${PNG_INCLUDE_DIR}) diff --git a/Formula/c/c2048.rb b/Formula/c/c2048.rb new file mode 100644 index 0000000000000..6a1f82178dc4c --- /dev/null +++ b/Formula/c/c2048.rb @@ -0,0 +1,29 @@ +class C2048 < Formula + desc "Console version of 2048" + homepage "https://github.com/mevdschee/2048.c" + url "https://github.com/mevdschee/2048.c/archive/refs/tags/v1.0.3.tar.gz" + sha256 "f26b2af87c03e30139e6a509ef9512203f4e5647f3225b969b112841a9967087" + license "MIT" + head "https://github.com/mevdschee/2048.c.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0563e808fedace771b34dc5be651e242898101d1ba16e5af2d93fc9776dc9d45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aac8d147591dcc68329b42238cc2363f05fda1533e3e897fd0d2d67c830f6ac0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b575648a9003e0a7479ce49a0224cfb1e9f1d9e492f7a5b050ec096375a5135" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d6c6ade21d0fe28b3408b166d29ab5f6d16435f9dc4c8700fe6a7c490816009f" + sha256 cellar: :any_skip_relocation, sonoma: "0c43e42fd31143a4e0f008a2620e092b0a431b0fe0c68c5adc72acc975859cb1" + sha256 cellar: :any_skip_relocation, ventura: "6c6cc4ae173a335eda1f921c2f37dc34bb7b5a3cbba6b77c32f296ba5cd54be2" + sha256 cellar: :any_skip_relocation, arm64_linux: "483edc63ab9cf31614e368777afccc1934660e5e0b72b801e23fd869ae8133ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dabedc2a620cb0966fcf79c27b6135366a02fc7f37f3413c7cb65df0eec15644" + end + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/2048 test") + assert_match "All 13 tests executed successfully", output + end +end diff --git a/Formula/c/c2patool.rb b/Formula/c/c2patool.rb new file mode 100644 index 0000000000000..55e3f6571c2ba --- /dev/null +++ b/Formula/c/c2patool.rb @@ -0,0 +1,53 @@ +class C2patool < Formula + desc "CLI for working with C2PA manifests and media assets" + homepage "https://contentauthenticity.org" + url "https://github.com/contentauth/c2pa-rs/archive/refs/tags/c2patool-v0.24.0.tar.gz" + sha256 "227a4e3b2a21bf90c6696d0b557e04c6ecfd93aab3c7c7104490ca13a56585f9" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/contentauth/c2pa-rs.git", branch: "main" + + livecheck do + url :stable + regex(/^c2patool[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "083fb4728682fc44354c6526cfd30ca1e8f2f43c74a640186d0ededc2f3ead6f" + sha256 cellar: :any, arm64_sequoia: "740a22ec2d358bbfcbff4cd9988d33cf806623c0cc5c9d2b09f5fa3dd7ed4b27" + sha256 cellar: :any, arm64_sonoma: "f5b2008492c275aa784187a2517fcb328547722789f53092d2aef39ef1aca505" + sha256 cellar: :any, sonoma: "13c744d5e010afb3fc20f37e17575836d33e22ab3d14a2d6c3d8dc0940492f47" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ac6df8ab6220c938498c1cc083a1b9a6268a9677c14c9829193aa53c821c55b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42bcabe3893755127464e157ab1103c862ec8874b0647c50c2de03a861a5ff53" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "openssl@3" + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/c2patool -V").strip + + (testpath/"test.json").write <<~JSON + { + "assertions": [ + { + "label": "com.example.test", + "data": { + "my_key": "my_value" + } + } + ] + } + JSON + + system bin/"c2patool", test_fixtures("test.png"), "-m", "test.json", "-o", "signed.png", "--force" + + output = shell_output("#{bin}/c2patool signed.png") + assert_match "\"issuer\": \"C2PA Test Signing Cert\"", output + end +end diff --git a/Formula/c/c2rust.rb b/Formula/c/c2rust.rb new file mode 100644 index 0000000000000..6317666caefef --- /dev/null +++ b/Formula/c/c2rust.rb @@ -0,0 +1,41 @@ +class C2rust < Formula + desc "Migrate C code to Rust" + homepage "https://c2rust.com/" + url "https://github.com/immunant/c2rust/archive/refs/tags/v0.21.0.tar.gz" + sha256 "4b39ae895f00b046878d5f312eec11c4b7d38d08b08e9de249a4eef938750229" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "02b162aef7ff29ffb882c721e04343c576f9bc49b6f4b9855f4eabb3c7ef49a3" + sha256 cellar: :any, arm64_sequoia: "d9735069362304a255413ceac888da9a16f24550fc5bc00c7e5b51f4e18a273a" + sha256 cellar: :any, arm64_sonoma: "e34dbaa9defa0abdda3206a6d3573f01e7189c000164ddd38bdd15cd6c925c5e" + sha256 cellar: :any, sonoma: "948673e7583c5a65587427d3d395512b62680e7052317a309ab41212eedbf139" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa0c7fb22f978f82ae62ad7836e694d824b8a3aa5023288edbaef78ff0fc5430" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a44f295e493931b12b56000900bf345cba3616415b6d7007b7829f5b27af39c0" + end + + depends_on "cmake" => [:build, :test] + depends_on "rust" => :build + depends_on "llvm" + + # Backport fix for "Encountered unsupported BuiltinType kind 104 for type __mfp8" + patch do + url "https://github.com/immunant/c2rust/commit/a2c2149dae044629a49e996597ab58eb950072d0.patch?full_index=1" + sha256 "9ec18885f174526d3b6228c1e584dae942a5418f49089b4c0fc4439aecde7317" + end + + def install + system "cargo", "install", *std_cargo_args(path: "c2rust") + + pkgshare.install "examples" + end + + test do + cp_r pkgshare/"examples/qsort/.", testpath + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" + system "cmake", "--build", "build" + system bin/"c2rust", "transpile", "build/compile_commands.json" + assert_path_exists testpath/"qsort.c" + end +end diff --git a/Formula/c/c3c.rb b/Formula/c/c3c.rb new file mode 100644 index 0000000000000..4924fd9afbcfe --- /dev/null +++ b/Formula/c/c3c.rb @@ -0,0 +1,78 @@ +class C3c < Formula + desc "Compiler for the C3 language" + homepage "https://github.com/c3lang/c3c" + url "https://github.com/c3lang/c3c/archive/refs/tags/v0.7.7.tar.gz" + sha256 "d0a9ff906803a92a135959a5aa1b90d551385c09ea747af271163a28d3c45bf8" + license "LGPL-3.0-only" + head "https://github.com/c3lang/c3c.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e80fc151b7cb161970ec93f61f59dcf238a3233c726393a00543833a2f0a0c66" + sha256 cellar: :any, arm64_sequoia: "a5aba57516b663f6d6610eeac02714866f03b345cf4cccece6c6a043abdee26f" + sha256 cellar: :any, arm64_sonoma: "4efb6408e857804fa91fb09ab0325f5996c96a61991ffc9a73e6724f3b96b1a7" + sha256 cellar: :any, sonoma: "0ea035b50440fe62bdb821edb03190146b03d45df7588adc4bf32c9d670ab6c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "828ec0bb029d2ba0f3e40ca07e2c57bd2ed85e446900974dcf14773bd526e2c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2fc895816e6aac8acc7ba55331f0f68a9582328e77436b3ca6916fb78e861949" + end + + depends_on "cmake" => :build + depends_on "lld" + depends_on "llvm" + + uses_from_macos "curl" + + def install + lld = Formula["lld"] + llvm = Formula["llvm"] + + args = [ + "-DC3_LINK_DYNAMIC=ON", + "-DC3_USE_MIMALLOC=OFF", + "-DC3_USE_TB=OFF", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DLLVM=#{llvm.opt_lib/shared_library("libLLVM")}", + "-DLLD_COFF=#{lld.opt_lib/shared_library("liblldCOFF")}", + "-DLLD_COMMON=#{lld.opt_lib/shared_library("liblldCommon")}", + "-DLLD_ELF=#{lld.opt_lib/shared_library("liblldELF")}", + "-DLLD_MACHO=#{lld.opt_lib/shared_library("liblldMachO")}", + "-DLLD_MINGW=#{lld.opt_lib/shared_library("liblldMinGW")}", + "-DLLD_WASM=#{lld.opt_lib/shared_library("liblldWasm")}", + ] + args << "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" if OS.linux? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + return unless OS.mac? + + # The build copies LLVM runtime libraries into its `bin` directory. + # Let's replace those copies with a symlink instead. + libexec.install bin.children + bin.install_symlink libexec.children.select { |child| child.file? && child.executable? } + rm_r libexec/"c3c_rt" + libexec.install_symlink llvm.opt_lib/"clang"/llvm.version.major/"lib/darwin" => "c3c_rt" + end + + test do + (testpath/"test.c3").write <<~EOS + module hello_world; + import std::io; + + fn void main() + { + io::printn("Hello, world!"); + } + EOS + system bin/"c3c", "compile", "test.c3", "-o", "test" + assert_match "Hello, world!", shell_output("#{testpath}/test") + end +end diff --git a/Formula/c/c4core.rb b/Formula/c/c4core.rb new file mode 100644 index 0000000000000..d4a94fc0fd1c7 --- /dev/null +++ b/Formula/c/c4core.rb @@ -0,0 +1,70 @@ +class C4core < Formula + desc "C++ utilities" + homepage "https://github.com/biojppm/c4core" + url "https://github.com/biojppm/c4core/releases/download/v0.2.7/c4core-0.2.7-src.tgz" + sha256 "0856eb232833aa977675cee028c2f32fea631652b65991056d540a0909c2a075" + license all_of: ["MIT", "BSL-1.0"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "cf2facaac44932248601cf8650afa39a38cc71771584bc0155cff50aa06f3be2" + sha256 cellar: :any, arm64_sequoia: "88b0fd5e35a5a87acb98c73269e37e15155cef0c910a14a51d7309b8c70be32f" + sha256 cellar: :any, arm64_sonoma: "6fff2dd5ef75cb972b968cc94a6c76a2220cf7c202900bf6b6e1047b72564c6c" + sha256 cellar: :any, sonoma: "bd22f2bf0b7c2ef8a77630ab4ab3f7cf433e12de52c7bef0cee542da66ed523f" + sha256 cellar: :any_skip_relocation, arm64_linux: "8331d875c6235deb6ec8447ba76df7138befef5a7a171a71b247f61f5a1b4018" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84695f8ba51365e3d6c792d1f17b57c681869817a3c44f7b259765ccc0410b93" + end + + depends_on "cmake" => [:build, :test] + + conflicts_with "rapidyaml", because: "both install `c4core` files `include/c4`" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(c4core_test) + + find_package(c4core) + + add_executable(c4core_test test.cpp) + target_link_libraries(c4core_test c4core::c4core) + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include "c4/charconv.hpp" // header file for character conversion utilities + #include "c4/format.hpp" // header file for formatting utilities + #include + #include + + int main() { + // using c4core to do integer to string conversion + int number = 42; + char buf[64]; + c4::substr buf_sub(buf, sizeof(buf)); + size_t num_chars = c4::itoa(buf_sub, number); + buf[num_chars] = '\0'; // Ensuring the buffer is null-terminated + std::cout << "The number is: " << buf << std::endl; + + // For formatted output, first format into a buffer, then create a std::string from it + char format_buf[64]; + snprintf(format_buf, sizeof(format_buf), "Formatted number: %d", number); + std::string formatted_string = format_buf; + std::cout << formatted_string << std::endl; + + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + assert_equal <<~EOS, shell_output("./build/c4core_test") + The number is: 42 + Formatted number: 42 + EOS + end +end diff --git a/Formula/c/c7n.rb b/Formula/c/c7n.rb new file mode 100644 index 0000000000000..5671a771fc05e --- /dev/null +++ b/Formula/c/c7n.rb @@ -0,0 +1,152 @@ +class C7n < Formula + include Language::Python::Virtualenv + + desc "Rules engine for cloud security, cost optimization, and governance" + homepage "https://github.com/cloud-custodian/cloud-custodian" + url "https://github.com/cloud-custodian/cloud-custodian/archive/refs/tags/0.9.47.0.tar.gz" + sha256 "99af3f22ea8204e336d3f3f1c5ab13bf1d17fe3773147df01383f4825fc060e9" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3badbef6e1d7551575d0c96a3c7a0ba242d3ef4e42183e347152cbdc8c7bf204" + sha256 cellar: :any, arm64_sequoia: "6d9621adac20088702a85744df01c3da71642bfad35b232e1a1768b88339e0d1" + sha256 cellar: :any, arm64_sonoma: "26bbffa87085f66c5c95afa5efbca7ea8bddf7d73c539df9d2196b9382d3f166" + sha256 cellar: :any, sonoma: "ec7e3e73fe4d55fc17f29a8fcf5c52017ff2d1d9d9cd7614eff23fa8d6d4f803" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab5d8d979e14aa39ebe4174ae23e31588220bacc6482b6637760e8db2834d39e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69b24e2464b2eebfb4acde37e2564bf70a1c0b00891e17ebb0492359b19cc31d" + end + + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["cryptography", "rpds-py"] + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/5c/89/36c09108d8d35e6f722cdc9ff169f003c7458657ecf04c3a375dca973ccb/boto3-1.40.54.tar.gz" + sha256 "5f7dbf8539d26e0ee973baea49d0db8c1ee57707a785c5a23307241fdba04327" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/d1/c8/8c7509d7fa26de03d21673f18a1edc1ac98198ba261a2b943774ed4f1c44/botocore-1.40.54.tar.gz" + sha256 "808232d9fcbf2c295b6e7cd1897119ee2fb97e756edfb313aa6d27ba0b281c66" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "custodian", + base_name: "custodian", shell_parameter_format: :arg) + end + + test do + # trim last decimal point version to match semver returned from version command + assert_match version.major_minor_patch.to_s, shell_output("#{bin}/custodian version") + + (testpath/"good-policy.yml").write <<~YAML + policies: + - name: ec2-auto-tag-user + resource: ec2 + mode: + type: cloudtrail + role: arn:aws:iam::{account_id}:role/custodian-auto-tagger + # note {account_id} is optional. If you put that there instead of + # your actual account number, when the policy is provisioned it + # will automatically inherit the account_id properly + events: + - RunInstances + filters: + - tag:CreatorName: absent + actions: + - type: auto-tag-user + tag: CreatorName + principal_id_tag: CreatorId + YAML + + output = shell_output("#{bin}/custodian validate --verbose #{testpath}/good-policy.yml 2>&1") + assert_match "valid", output + + # has invalid "action" key instead of "actions" + (testpath/"bad-policy.yml").write <<~YAML + policies: + - name: ec2-auto-tag-user + resource: ec2 + filters: + - tag:CreatorName: absent + action: + - type: auto-tag-user + tag: CreatorName + principal_id_tag: CreatorId + YAML + + output = shell_output("#{bin}/custodian validate --verbose #{testpath}/bad-policy.yml 2>&1", 1) + assert_match "invalid", output + end +end diff --git a/Formula/c/ca-certificates.rb b/Formula/c/ca-certificates.rb new file mode 100644 index 0000000000000..453ca3131dc8f --- /dev/null +++ b/Formula/c/ca-certificates.rb @@ -0,0 +1,197 @@ +class CaCertificates < Formula + desc "Mozilla CA certificate store" + homepage "https://curl.se/docs/caextract.html" + url "https://curl.se/ca/cacert-2025-11-04.pem" + sha256 "8ac40bdd3d3e151a6b4078d2b2029796e8f843e3f86fbf2adbc4dd9f05e79def" + license "MPL-2.0" + + livecheck do + url :homepage + regex(/href=.*?cacert[._-](\d{4}-\d{2}-\d{2})\.pem/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "2e6d7369c7b548139ade8b63e371423fc758ede192bb2a794fd04f8065bc4eb5" + end + + def install + pkgshare.install "cacert-#{version}.pem" => "cacert.pem" + end + + def post_install + if OS.mac? + macos_post_install + else + linux_post_install + end + end + + def macos_post_install + ohai "Regenerating CA certificate bundle from keychain, this may take a while..." + + keychains = %w[ + /Library/Keychains/System.keychain + /System/Library/Keychains/SystemRootCertificates.keychain + ] + + certificates_list = Utils.safe_popen_read("/usr/bin/security", "find-certificate", "-a", "-p", *keychains) + certificates = certificates_list.scan( + /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, + ) + + # Check that the certificate has not expired + valid_certificates = certificates.select do |certificate| + begin + Utils.safe_popen_write("/usr/bin/openssl", "x509", "-inform", "pem", + "-checkend", "0", + "-noout") do |openssl_io| + openssl_io.write(certificate) + end + rescue ErrorDuringExecution + # Expired likely. + next + end + + # Only include certificates that are designed to act as a SSL root. + purpose = Utils.safe_popen_write("/usr/bin/openssl", "x509", "-inform", "pem", + "-purpose", + "-noout") do |openssl_io| + openssl_io.write(certificate) + end + purpose.include?("SSL server CA : Yes") + end + + # Check that the certificate is trusted in keychain + trusted_certificates = begin + tmpfile = Tempfile.new + + verify_args = %W[ + -l -L + -c #{tmpfile.path} + -p ssl + -R offline + ] + + valid_certificates.select do |certificate| + tmpfile.rewind + tmpfile.write certificate + tmpfile.truncate certificate.size + tmpfile.flush + Utils.safe_popen_read("/usr/bin/security", "verify-cert", *verify_args) + true + rescue ErrorDuringExecution + # Invalid. + false + end + ensure + tmpfile&.close! + end + + # Get SHA256 fingerprints for all trusted certificates + fingerprints = trusted_certificates.to_set do |certificate| + get_certificate_fingerprint(certificate, "/usr/bin/openssl") + end + + # Now process Mozilla certificates we downloaded. + # Read as raw bytes to avoid locale-dependent encoding errors + pem_certificates_list = (pkgshare/"cacert.pem").binread.force_encoding(Encoding::ASCII_8BIT) + pem_certificates = pem_certificates_list.scan( + /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, + ) + + # Append anything new. + trusted_certificates += pem_certificates.select do |certificate| + fingerprint = get_certificate_fingerprint(certificate, "/usr/bin/openssl") + fingerprints.add?(fingerprint) + end + + pkgetc.mkpath + (pkgetc/"cert.pem").atomic_write(trusted_certificates.join("\n") << "\n") + end + + def get_certificate_fingerprint(certificate, openssl_binary = "openssl") + Utils.safe_popen_write(openssl_binary, "x509", "-inform", "pem", + "-fingerprint", + "-sha256", + "-noout") do |openssl_io| + openssl_io.write(certificate) + end + end + + def load_certificates_from_file(file_path, trusted_certificates, fingerprints, certificate_type) + # Read as raw bytes to avoid locale-dependent encoding errors + certificates_list = file_path.binread.force_encoding(Encoding::ASCII_8BIT) + certificates = certificates_list.scan( + /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, + ) + loaded_count = 0 + certificates.each do |certificate| + fingerprint = get_certificate_fingerprint(certificate) + if fingerprints.add?(fingerprint) + trusted_certificates << certificate + loaded_count += 1 + end + rescue ErrorDuringExecution + # Skip invalid certificate + next + end + puts "Loaded #{loaded_count} #{certificate_type} certificates" if loaded_count.positive? + end + + def linux_post_install + rm(pkgetc/"cert.pem", force: true) + pkgetc.mkpath + + system_ca_certificates = Pathname.new("/etc/ssl/certs/ca-certificates.crt") + return if !system_ca_certificates.exist? || !system_ca_certificates.readable? + + # Integrate system certificates if OpenSSL is available + unless which("openssl") + opoo "Cannot find OpenSSL: skipping system certificates." + puts <<~EOS + To include custom system certificates run: + brew install openssl + brew postinstall ca-certificates + EOS + return + end + + trusted_certificates = [] + fingerprints = Set.new + + # First, load system certificates from standard Linux location + load_certificates_from_file(system_ca_certificates, trusted_certificates, fingerprints, "system") + + # Now process Mozilla certs and append only new ones + load_certificates_from_file(pkgshare/"cacert.pem", trusted_certificates, fingerprints, "Mozilla") + + (pkgetc/"cert.pem").atomic_write(trusted_certificates.join("\n") << "\n") + ohai "CA certificates have been bootstrapped from the system CA store." + ensure + # Ensure a PEM file always exists, even if the method exits early or fails + cp pkgshare/"cacert.pem", pkgetc/"cert.pem" unless (pkgetc/"cert.pem").exist? + end + + def caveats + on_macos do + <<~EOS + CA certificates have been bootstrapped using certificates from the system keychain. + EOS + end + + on_linux do + <<~EOS + CA certificates have been bootstrapped from both the Mozilla CA store and the system CA store at + + /etc/ssl/certs/ca-certificates.crt + + if this path exists and is readable. + EOS + end + end + + test do + assert_path_exists pkgshare/"cacert.pem" + assert_path_exists pkgetc/"cert.pem" + end +end diff --git a/Formula/c/cabal-install.rb b/Formula/c/cabal-install.rb new file mode 100644 index 0000000000000..cab911c59fa1b --- /dev/null +++ b/Formula/c/cabal-install.rb @@ -0,0 +1,66 @@ +class CabalInstall < Formula + desc "Command-line interface for Cabal and Hackage" + homepage "https://www.haskell.org/cabal/" + url "https://hackage.haskell.org/package/cabal-install-3.16.0.0/cabal-install-3.16.0.0.tar.gz" + sha256 "282a499fe3beeee0a2a50dc1adf264c204a090873679e2753e0355d6cf6c561a" + license "BSD-3-Clause" + head "https://github.com/haskell/cabal.git", branch: "3.16" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0144bed245e8dbc50270243010162b7e02c15cbb617e091a24ef4ef4d0e60630" + sha256 cellar: :any, arm64_sequoia: "0c9fd4abd5dcc2bd5b30c5a4d5200231f12631a05592a1053bd767a05e00bc58" + sha256 cellar: :any, arm64_sonoma: "681c54b7997d6fba9d6e126dec76e727eb478300ce7ce3982eee252fc6b4109a" + sha256 cellar: :any, arm64_ventura: "d2f8ed39fc3b8e068d158ec33dd2fa6c57dd44877a622b7a431190c4716f6446" + sha256 cellar: :any, sonoma: "8e4b24151c8f14fac714a5ad33eb21d92add3fb6b081248aa8cda69bec4653bb" + sha256 cellar: :any, ventura: "1ba4d13261deb28ca5cc41da5aeed93a10447024fb46d080e271ad41f2be145f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b52abb52d9b1c628fa91b2e59dec5cd20b6060ed9c74e462f2fb9b16f70da4d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa2b8c45e87fb83aca1bf2fc72ee85fa18962c2432bbb6927d0562907faf6aa3" + end + + depends_on "ghc" + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + # Make sure bootstrap version supports GHC provided by Homebrew + resource "bootstrap" do + on_macos do + on_arm do + url "https://downloads.haskell.org/~cabal/cabal-install-3.14.2.0/cabal-install-3.14.2.0-aarch64-darwin.tar.xz" + sha256 "c599c888c4c72731a2abbbab4c8443f9e604d511d947793864a4e9d7f9dfff83" + end + on_intel do + url "https://downloads.haskell.org/~cabal/cabal-install-3.14.2.0/cabal-install-3.14.2.0-x86_64-darwin.tar.xz" + sha256 "f9d0cac59deeeb1d35f72f4aa7e5cba3bfe91d838e9ce69b8bc9fc855247ce0f" + end + end + on_linux do + on_arm do + url "https://downloads.haskell.org/~cabal/cabal-install-3.14.2.0/cabal-install-3.14.2.0-aarch64-linux-deb10.tar.xz" + sha256 "63ee40229900527e456bb71835d3d7128361899c14e691cc7024a5ce17235ec3" + end + on_intel do + url "https://downloads.haskell.org/~cabal/cabal-install-3.14.2.0/cabal-install-3.14.2.0-x86_64-linux-ubuntu20_04.tar.xz" + sha256 "974a0c29cae721a150d5aa079a65f2e1c0843d1352ffe6aedd7594b176c3e1e6" + end + end + end + + def install + resource("bootstrap").stage buildpath + cabal = buildpath/"cabal" + cd "cabal-install" if build.head? + system cabal, "v2-update" + system cabal, "v2-install", *std_cabal_v2_args + bash_completion.install "bash-completion/cabal" + end + + test do + system bin/"cabal", "--config-file=#{testpath}/config", "user-config", "init" + system bin/"cabal", "--config-file=#{testpath}/config", "v2-update" + system bin/"cabal", "--config-file=#{testpath}/config", "info", "Cabal" + end +end diff --git a/Formula/c/cabextract.rb b/Formula/c/cabextract.rb new file mode 100644 index 0000000000000..7e569d1939bab --- /dev/null +++ b/Formula/c/cabextract.rb @@ -0,0 +1,48 @@ +class Cabextract < Formula + desc "Extract files from Microsoft cabinet files" + homepage "https://www.cabextract.org.uk/" + url "https://www.cabextract.org.uk/cabextract-1.11.tar.gz" + sha256 "b5546db1155e4c718ff3d4b278573604f30dd64c3c5bfd4657cd089b823a3ac6" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?cabextract[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dc0b66c1f358e20b4eac4f6c9d44c6bcc62143732eddb9bc998db15d892e37b3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8101eb79dccd718a2568420757be4c4f191ee6e11a8c8107a000f1691b081456" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "624bed1dfb0c77ecba2f8d6bd3deb022caae6d47af7d4edc314008aa001b036b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e4cd53d32db9ea97656f399dd9033eaa5ef5c8cc3226de8de09865e6c610435" + sha256 cellar: :any_skip_relocation, arm64_monterey: "371a13fefca5fbd78edd570020e5f0eaf82536c55e54a8efd01fe7570103cd01" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3d71ed3ba74cc371c392104c0f9c8f2fdc8e504e046140f5c1c74e95680fd6db" + sha256 cellar: :any_skip_relocation, sonoma: "dc0647788eb36c731bcd20897ac0e15b64d8cc51a950910098e2ef4ccaca0d4a" + sha256 cellar: :any_skip_relocation, ventura: "2e30506702df76799a4c685f6004e58cbf06b27a1bbb25fb401f802aa95bd80b" + sha256 cellar: :any_skip_relocation, monterey: "add98c9cb4c6d920c8acb6378ad9bec3bf1f95f531a522c07e4cfc6bf00c687f" + sha256 cellar: :any_skip_relocation, big_sur: "af25a0c0dadcae5b550953a5c2857533c65013ff65daaa67555d6bf0b204249c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8b8544edc056eb3c18bfb480b135d6375c1a6ae50e5ab6faa31db9eb96248e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5631eaa72da365accb3b576606fcfcc619879e83bfdd97c74233c073f6f42374" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + # probably the smallest valid .cab file + cab = <<~EOS.gsub(/\s+/, "") + 4d5343460000000046000000000000002c000000000000000301010001000000d20400003 + e00000001000000000000000000000000003246899d200061000000000000000000 + EOS + (testpath/"test.cab").binwrite [cab].pack("H*") + + system bin/"cabextract", "test.cab" + assert_path_exists testpath/"a" + end +end diff --git a/Formula/c/cabin.rb b/Formula/c/cabin.rb new file mode 100644 index 0000000000000..23e6a5f176d77 --- /dev/null +++ b/Formula/c/cabin.rb @@ -0,0 +1,67 @@ +class Cabin < Formula + desc "Package manager and build system for C++" + homepage "https://github.com/cabinpkg/cabin" + url "https://github.com/cabinpkg/cabin/archive/refs/tags/0.13.0.tar.gz" + sha256 "f9115bb0566800beedb41106e00f44a7eaf1dea0fa6528281e31de5f80864177" + license "Apache-2.0" + revision 2 + head "https://github.com/cabinpkg/cabin.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0e97d0864c66bf62ea7b014024bf7585c0069bd397ab840fc97725b4b4729f9e" + sha256 cellar: :any, arm64_sequoia: "c1dcf1c02d972158e65e66c8bc62c2d01509f5b42f45603d7394cff059fc5e1d" + sha256 cellar: :any, arm64_sonoma: "e9dcb2901837d96250d350e5c230b7a88c1bef5abd332936386f98cced784991" + sha256 cellar: :any, sonoma: "ef94594fcddda52162028ea8a91fcba55cf171219d3eb993464bd286363afebf" + sha256 cellar: :any_skip_relocation, arm64_linux: "233a2a68624ff57281778ea8496adc10d341fd0dd9e0b02ea72ec5b2da356c6a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d80d56f13208f944f50bdec29141ca1133a857f78952f9c9eb43a0c36e2e1d7d" + end + + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + depends_on "toml11" => :build + + depends_on "curl" + depends_on "fmt" + depends_on "libgit2" + depends_on "pkgconf" + depends_on "spdlog" + depends_on "tbb" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1499 + end + + on_ventura do + # Ventura seems to be missing the `source_location` header. + depends_on "llvm" => :build + end + + fails_with :clang do + build 1499 + cause "Requires C++20" + end + + fails_with :gcc do + version "11" + cause "Requires C++20" + end + + # allow to build with fmt 12.1.0, upstream pr ref, https://github.com/cabinpkg/cabin/pull/1231 + patch do + url "https://github.com/cabinpkg/cabin/commit/b506326b996cd4d5a6578ceb5bbbb7a903dbdf12.patch?full_index=1" + sha256 "baf74ab11f7a1f7e2a75916acdc7fed76114e24f02e09d057c261b2e469e5203" + end + + def install + # Avoid cloning `toml11` at build-time. + (buildpath/"build/DEPS/toml11").install_symlink Formula["toml11"].opt_include + system "make", "BUILD=release", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"cabin", "new", "hello_world" + cd "hello_world" do + assert_equal "Hello, world!", shell_output("#{bin}/cabin run").split("\n").last + end + end +end diff --git a/Formula/c/cabocha.rb b/Formula/c/cabocha.rb new file mode 100644 index 0000000000000..8ca6001a2844f --- /dev/null +++ b/Formula/c/cabocha.rb @@ -0,0 +1,63 @@ +class Cabocha < Formula + desc "Yet Another Japanese Dependency Structure Analyzer" + homepage "https://taku910.github.io/cabocha/" + # Files are listed in https://drive.google.com/drive/folders/0B4y35FiV1wh7cGRCUUJHVTNJRnM + url "https://distfiles.macports.org/cabocha/cabocha-0.69.tar.bz2" + mirror "https://mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/cabocha-20160909/cabocha-0.69.tar.bz2" + sha256 "9db896d7f9d83fc3ae34908b788ae514ae19531eb89052e25f061232f6165992" + license any_of: ["BSD-3-Clause", "LGPL-2.1-or-later"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "e3862dcd2820bd7abc7984b1ac9449398cad2ec280ca1f757b3809ef7ad8f227" + sha256 arm64_sequoia: "10a190b7fea68a71d42b2b95bbae271c6e9c86792c46023b85d8197d9fc1b1f5" + sha256 arm64_sonoma: "245d5a46edaedab3ee594cc9aa77d702087daae32db1ff28a70c6207bc0b01b2" + sha256 arm64_ventura: "50e7ebda3eb0424fd7e9f7654ecf854c8f3dff2673e257225013f3d3085e7967" + sha256 arm64_monterey: "c61f5a8df81d52575b991108e2683c27d94a4dcd62cd50d4396cb65234453b22" + sha256 arm64_big_sur: "6db92d4bc14b2b1045601758c9ad2d528fda7ce0029316a2b296c63c4953c54d" + sha256 sonoma: "c878b08aec360a527c8a78d449889abfc8b122e59589a9b21cba4826f213daa7" + sha256 ventura: "f4f6ff225aba6446a3d140dc258f66c55dd8b7077297fae888054c6e10d21c0d" + sha256 monterey: "7002f27098ec51a1832a5a39e1f8d55eb7d11b7fe37ce005ff0dfe7bb1be9e59" + sha256 big_sur: "1dd5c1474946aaab675326323c8f7e3d101687b50d5542464558f54a8c477cc8" + sha256 catalina: "0cf6edea1fa69790984c762aaff33bcea3d6cf5206e06cf489c53e8644cbc9a4" + sha256 arm64_linux: "96598b2e47622193fb852eda64753fecff40b088afff67c37538a57f5600e912" + sha256 x86_64_linux: "182dfe90c7dcc7c8bf00ece489a1d03b39b1dc66719a58c52efce8f8a8b30b96" + end + + depends_on "crf++" + depends_on "mecab" + depends_on "mecab-ipadic" + + def install + ENV["LIBS"] = "-liconv" if OS.mac? + + inreplace "Makefile.in" do |s| + s.change_make_var! "CFLAGS", ENV.cflags || "" + s.change_make_var! "CXXFLAGS", ENV.cflags || "" + end + + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --with-charset=UTF8 + --with-posset=IPA + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args + system "make", "install" + end + + test do + md5 = if OS.mac? + "md5" + else + "md5sum" + end + result = pipe_output(md5, pipe_output(bin/"cabocha", "CaboCha はフリーソフトウェアです。", 0)) + assert_equal "a5b8293e6ebcb3246c54ecd66d6e18ee", result.chomp.split.first + end +end diff --git a/Formula/c/cadaver.rb b/Formula/c/cadaver.rb new file mode 100644 index 0000000000000..071e4a2b91271 --- /dev/null +++ b/Formula/c/cadaver.rb @@ -0,0 +1,56 @@ +class Cadaver < Formula + desc "Command-line client for DAV" + homepage "https://notroj.github.io/cadaver/" + url "https://notroj.github.io/cadaver/cadaver-0.28.tar.gz" + sha256 "33e3a54bd54b1eb325b48316a7cacc24047c533ef88e6ef98b88dfbb60e12734" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?cadaver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "f2bf16931909ac6eec57117bf09175a2e0caa1082d2b6e2ae3b7a8245af29bc7" + sha256 arm64_sequoia: "d5bcd805b50034bd950a9a5ff34eb57460468f62e8e5790609b41efc0f643699" + sha256 arm64_sonoma: "2f7c951cd0fbd473492db2e3e32ca73bd1182d835aa2fa4e16bc18bb599b0fc0" + sha256 sonoma: "3149e1aad7c35c9a2d5bcde614fd25a8e53cfd8117c10044867ebcb827fe1cf9" + sha256 arm64_linux: "d8a6f3859f5db0c9cd26fbf52e655392bf1a06ca6298aca1d0ddf45e85a53122" + sha256 x86_64_linux: "ea95ccc4cb3825ef2732ea6df7864c87016b40915fed14dac542bdff5a0b6868" + end + + head do + url "https://github.com/notroj/cadaver.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "neon" + depends_on "openssl@3" + depends_on "readline" + + on_macos do + depends_on "gettext" + end + + def install + if build.head? + ENV["LIBTOOLIZE"] = "glibtoolize" + system "./autogen.sh" + end + system "./configure", "--with-ssl=openssl", + "--with-libs=#{Formula["openssl@3"].opt_prefix}", + "--with-neon=#{Formula["neon"].opt_prefix}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "cadaver #{version}", shell_output("#{bin}/cadaver -V", 255) + end +end diff --git a/Formula/c/caddy.rb b/Formula/c/caddy.rb new file mode 100644 index 0000000000000..721bddd01a853 --- /dev/null +++ b/Formula/c/caddy.rb @@ -0,0 +1,85 @@ +class Caddy < Formula + desc "Powerful, enterprise-ready, open source web server with automatic HTTPS" + homepage "https://caddyserver.com/" + url "https://github.com/caddyserver/caddy/archive/refs/tags/v2.10.2.tar.gz" + sha256 "f63f46b7ae68ced0a5c2e31df1b6dfc7656117d162a1bc7fed4bd4afd14ddc8f" + license "Apache-2.0" + head "https://github.com/caddyserver/caddy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bcbd54fcb23ed8c2be5bb2e1b23442931e798ede2ed7e8227cfb148f28925dc9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d1df2298f7b51056b57eef3a304d2807652d5c630d884de5560b271e5942e50e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1df2298f7b51056b57eef3a304d2807652d5c630d884de5560b271e5942e50e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1df2298f7b51056b57eef3a304d2807652d5c630d884de5560b271e5942e50e" + sha256 cellar: :any_skip_relocation, sonoma: "2eaf6b2c9831bbb7cac75b4b536625434d6bedd344ed6caaf2f916c34cb91016" + sha256 cellar: :any_skip_relocation, ventura: "2eaf6b2c9831bbb7cac75b4b536625434d6bedd344ed6caaf2f916c34cb91016" + sha256 cellar: :any_skip_relocation, arm64_linux: "29d001f80337e2bfcf0dc979b0a56953528df9f1ce3605fe18e3a6e506291182" + sha256 cellar: :any_skip_relocation, x86_64_linux: "529b5fc2dbf675f8440f68f83a56b39d804d08eb48a59c546764612e2fd93a52" + end + + depends_on "go" => :build + + resource "xcaddy" do + url "https://github.com/caddyserver/xcaddy/archive/refs/tags/v0.4.5.tar.gz" + sha256 "53c6a9e29965aaf19210ac6470935537040e782101057a199098feb33c2674f8" + end + + def install + revision = build.head? ? version.commit : "v#{version}" + + resource("xcaddy").stage do + system "go", "run", "cmd/xcaddy/main.go", "build", revision, "--output", bin/"caddy" + end + + generate_completions_from_executable("go", "run", "cmd/caddy/main.go", "completion") + + system bin/"caddy", "manpage", "--directory", buildpath/"man" + + man8.install Dir[buildpath/"man/*.8"] + end + + def caveats + <<~EOS + When running the provided service, caddy's data dir will be set as + `#{HOMEBREW_PREFIX}/var/lib` + instead of the default location found at https://caddyserver.com/docs/conventions#data-directory + EOS + end + + service do + run [opt_bin/"caddy", "run", "--config", etc/"Caddyfile"] + keep_alive true + error_log_path var/"log/caddy.log" + log_path var/"log/caddy.log" + environment_variables( + XDG_DATA_HOME: "#{HOMEBREW_PREFIX}/var/lib", + HOME: "#{HOMEBREW_PREFIX}/var/lib", + ) + end + + test do + port1 = free_port + port2 = free_port + + (testpath/"Caddyfile").write <<~EOS + { + admin 127.0.0.1:#{port1} + } + + http://127.0.0.1:#{port2} { + respond "Hello, Caddy!" + } + EOS + + fork do + exec bin/"caddy", "run", "--config", testpath/"Caddyfile" + end + sleep 2 + + assert_match "\":#{port2}\"", + shell_output("curl -s http://127.0.0.1:#{port1}/config/apps/http/servers/srv0/listen/0") + assert_match "Hello, Caddy!", shell_output("curl -s http://127.0.0.1:#{port2}") + + assert_match version.to_s, shell_output("#{bin}/caddy version") + end +end diff --git a/Formula/c/cadence-workflow.rb b/Formula/c/cadence-workflow.rb new file mode 100644 index 0000000000000..de9bb0bc845a9 --- /dev/null +++ b/Formula/c/cadence-workflow.rb @@ -0,0 +1,59 @@ +class CadenceWorkflow < Formula + desc "Distributed, scalable, durable, and highly available orchestration engine" + homepage "https://cadenceworkflow.io/" + url "https://github.com/uber/cadence.git", + tag: "v1.3.6", + revision: "a484e23286beae275868b67c4dffdd639a8646c4" + license "Apache-2.0" + head "https://github.com/uber/cadence.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1bf90a6d2f25b64bdd63e850cfc5dbdf9b34c0a45da4fefbe00288e257e82267" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41bbf5fee56a823da7d6aaf931bc4fd4e4b6232f02a2a2a3113a109875c7061a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4146169e8e4910ca1b5df6d9cef2ce48f52d80e8170841ae01725536014fd266" + sha256 cellar: :any_skip_relocation, sonoma: "fccecee66af960668bb2990e1e8537609186bf8f599fc3b3c0b3f2d9fa164518" + sha256 cellar: :any_skip_relocation, arm64_linux: "366aac1b326686254c4b9c03d2d82f3b2d5663ca8648ddba35b35a6bfb3cb88a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c91e03fb9cac3d080357949eb6f76e5205a4211f752ce1525c088ad2c3fa78d" + end + + depends_on "go" => :build + + conflicts_with "cadence", because: "both install an `cadence` executable" + + def install + system "make", ".just-build" + make_args = %w[ + cadence + cadence-server + cadence-canary + cadence-sql-tool + cadence-cassandra-tool + ] + make_args << "EMULATE_X86=" unless Hardware::CPU.intel? + system "make", *make_args + + bin.install "cadence" + bin.install "cadence-server" + bin.install "cadence-canary" + bin.install "cadence-sql-tool" + bin.install "cadence-cassandra-tool" + + (etc/"cadence").install "config", "schema" + end + + test do + output = shell_output("#{bin}/cadence-server start 2>&1", 1) + assert_match "no config files found within ./config", output + + output = shell_output("#{bin}/cadence --domain samples-domain domain desc 2>&1", 1) + assert_match "Error: Operation DescribeDomain failed", output + end +end diff --git a/Formula/c/cadence.rb b/Formula/c/cadence.rb new file mode 100644 index 0000000000000..30323f9c53249 --- /dev/null +++ b/Formula/c/cadence.rb @@ -0,0 +1,57 @@ +class Cadence < Formula + desc "Resource-oriented smart contract programming language" + homepage "https://cadence-lang.org/" + url "https://github.com/onflow/cadence/archive/refs/tags/v1.8.3.tar.gz" + sha256 "37f957e90c9c5acae3ac09a0f530d8376f2e307d073af615fbe56566e3443431" + license "Apache-2.0" + head "https://github.com/onflow/cadence.git", branch: "master" + + # Upstream uses GitHub releases to indicate that a version is released + # (there's also sometimes a notable gap between when a version is tagged and + # and the release is created), so the `GithubLatest` strategy is necessary. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "21623762ba5d5e85b6725f6d90e552d2c7a292d46d4451069454795a1c6163c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "21623762ba5d5e85b6725f6d90e552d2c7a292d46d4451069454795a1c6163c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21623762ba5d5e85b6725f6d90e552d2c7a292d46d4451069454795a1c6163c8" + sha256 cellar: :any_skip_relocation, sonoma: "ad985983609871e67ef317d2bef1e686fc10ff94bf49fe5bdf6937f2da2d47cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "36e978007a619cec91b35bafeb00da63ff3c2a7ca4cafdce64c64a00152153ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24134bd7a94e55a0787674b1734be3cb9b16a5501169994dd0f7814111048049" + end + + depends_on "go" => :build + + conflicts_with "cadence-workflow", because: "both install a `cadence` executable" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/main" + end + + test do + # from https://cadence-lang.org/docs/tutorial/hello-world + (testpath/"hello.cdc").write <<~EOS + access(all) contract HelloWorld { + + // Declare a public (access(all)) field of type String. + // + // All fields must be initialized in the initializer. + access(all) let greeting: String + + // The initializer is required if the contract contains any fields. + init() { + self.greeting = "Hello, World!" + } + + // Public function that returns our friendly greeting! + access(all) view fun hello(): String { + return self.greeting + } + } + EOS + system bin/"cadence", "hello.cdc" + end +end diff --git a/Formula/c/cadical.rb b/Formula/c/cadical.rb new file mode 100644 index 0000000000000..813a5465fa2ca --- /dev/null +++ b/Formula/c/cadical.rb @@ -0,0 +1,66 @@ +class Cadical < Formula + desc "Clean and efficient state-of-the-art SAT solver" + homepage "https://fmv.jku.at/cadical/" + url "https://github.com/arminbiere/cadical/archive/refs/tags/rel-2.1.3.tar.gz" + sha256 "abfe890aa4ccda7b8449c7ad41acb113cfb8e7e8fbf5e49369075f9b00d70465" + license "MIT" + + livecheck do + url :stable + regex(/^rel[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a0d83d4018bf1f43edf23a93b1d91f67d4a2b4c164c7c757ac1c973333e5918" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13599f5a5a95eca75c9cdac49ff39ed271834ec54068742d456b5a16db68d04e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e48caf86797f6b6d72afecdd0271e0d5665af282801e2fa556d3f86066a7fa76" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ad047a3437ab8c0c944c44c7cfa977704781bf69b176658a21324d4abf0a19e" + sha256 cellar: :any_skip_relocation, sonoma: "c7d6caa39c55c9c21a1e4224d2bb754bbc31a617ae795f63a68986db92f83d2b" + sha256 cellar: :any_skip_relocation, ventura: "f8b6bc085363d6e92db05d37cd4794a646ab858e8feb8f53d52845a3c1cee21c" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bd60910c6fe37fbbfe153494ef5d20d139c4afdcd242f356d7999243434c328" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ccda8639207be39bbcf10f84c36c520c433379be429100d86e6dca26a21ac09" + end + + def install + ENV.append_to_cflags "-fPIC" if OS.linux? + + system "./configure" + chdir "build" do + system "make" + bin.install "cadical" + lib.install "libcadical.a" + include.install "../src/cadical.hpp" + include.install "../src/ccadical.h" + include.install "../src/ipasir.h" + end + end + + test do + (testpath/"simple.cnf").write <<~EOS + p cnf 3 4 + 1 0 + -2 0 + -3 0 + -1 2 3 0 + EOS + result = shell_output("#{bin}/cadical simple.cnf", 20) + assert_match "s UNSATISFIABLE", result + + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + CaDiCaL::Solver solver; + solver.add(1); + solver.add(0); + int res = solver.solve(); + assert(res == 10); + res = solver.val(1); + assert(res > 0); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lcadical", "-o", "test", "-std=c++11" + system "./test" + end +end diff --git a/Formula/c/cadubi.rb b/Formula/c/cadubi.rb new file mode 100644 index 0000000000000..5441f65719d0d --- /dev/null +++ b/Formula/c/cadubi.rb @@ -0,0 +1,25 @@ +class Cadubi < Formula + desc "Creative ASCII drawing utility" + homepage "https://github.com/statico/cadubi/" + url "https://github.com/statico/cadubi/archive/refs/tags/v1.3.4.tar.gz" + sha256 "624f85bb16d8b0bc392d761d1121828d09cfc79b3ded5b1220e9b4262924a1a0" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "9c2832e6449cf5fd7ebbadd2427732b242633ba5ad041046e94e80da63e963e6" + end + + def install + inreplace "cadubi", "$Bin/help.txt", "#{doc}/help.txt" + bin.install "cadubi" + doc.install "help.txt" + man1.install "cadubi.1" + end + + test do + output = pipe_output("script -q /dev/null #{bin}/cadubi -v", "cat") + assert_match "cadubi (Creative ASCII Drawing Utility By Ian) #{version}", output + end +end diff --git a/Formula/c/caesiumclt.rb b/Formula/c/caesiumclt.rb new file mode 100644 index 0000000000000..1da3036aecc44 --- /dev/null +++ b/Formula/c/caesiumclt.rb @@ -0,0 +1,29 @@ +class Caesiumclt < Formula + desc "Fast and efficient lossy and/or lossless image compression tool" + homepage "https://github.com/Lymphatus/caesium-clt" + url "https://github.com/Lymphatus/caesium-clt/archive/refs/tags/v1.1.0.tar.gz" + sha256 "30e24c0f2c7f02f5bb0b3e1954ba0af90d9af8b7d06183564ce53cd91d1a67ec" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "253f921ea234e0213f2149cdfee4b4c1f3f71ef3e52772a148c115074eee2d63" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "033f92315638a9d405a0371a2032e5adcb0be7c301b490f49df682159c0c196a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0db7edd4df9b6c308b244ec1a0cdc55444efc66580e1ab6eb243c39c78a112e6" + sha256 cellar: :any_skip_relocation, sonoma: "4688a7e8a4c4da738f1c5cbdf84773941a8730e6779f17fab7cfc5741eb29ff4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4ba8edf270d503c2b038eab8081523953a659f69b69ce9d63ab3098f9bf46f38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6fac19b42939ee7b7af11c42580e47bd6b0ef00b846f8c1b37f71bdc4c73987" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"caesiumclt", "--lossless", "-Q", "--suffix", "_t", "--output", testpath, test_fixtures("test.jpg") + assert_path_exists testpath/"test_t.jpg" + system bin/"caesiumclt", "-q", "80", "-Q", "--suffix", "_b", "--output", testpath, test_fixtures("test.jpg") + assert_path_exists testpath/"test_b.jpg" + end +end diff --git a/Formula/c/caf.rb b/Formula/c/caf.rb new file mode 100644 index 0000000000000..4f4dccd9e9b83 --- /dev/null +++ b/Formula/c/caf.rb @@ -0,0 +1,50 @@ +class Caf < Formula + # Renamed from libccpa + desc "Implementation of the Actor Model for C++" + homepage "https://www.actor-framework.org/" + url "https://github.com/actor-framework/actor-framework/archive/refs/tags/1.1.0.tar.gz" + sha256 "9febd85d3a4f50dac760592043028a36bea62bba50c3ee2fc1eace954dd8ae27" + license "BSD-3-Clause" + head "https://github.com/actor-framework/actor-framework.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "faa09c3ddebe8332936b1cc01028494b75a7b80763b045256840983be78f3785" + sha256 cellar: :any, arm64_sequoia: "7678c03ac5833969bc5ef720b398e774d1e3156d268d34ce9d95349e7f885823" + sha256 cellar: :any, arm64_sonoma: "34839f1a22902b556f3ece25edc7e1b3123768f17ed76f2a0e5a24ae0f13110b" + sha256 cellar: :any, arm64_ventura: "c2b9cac897daf44e7c17dcf6b52790a4ed3b74d36a96b61f1794bf3077be02df" + sha256 cellar: :any, sonoma: "aa3ca3370d07b8ed67d9e319eccf4412e8b7cd8a654eadd8df8fbf1f2c2feff3" + sha256 cellar: :any, ventura: "967061c8c7b2f3b6adc948623502333c7d680616a6fe21941374aba7f836ae01" + sha256 cellar: :any_skip_relocation, arm64_linux: "980f1e6bf7b3462f90c1251a2fc22ca9cdee8f81e1ae631fd34cdd48469aad7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18dd86732ab832bc6b035af48f3fcc8d05c6ec4dca5ec068d09f43fc3b724335" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + def install + tools = pkgshare/"tools" + rpaths = [rpath, rpath(source: tools)] + args = ["-DCAF_ENABLE_TESTING=OFF", "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}"] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + using namespace caf; + void caf_main(actor_system& system) { + scoped_actor self{system}; + self->spawn([] { + std::cout << "test" << std::endl; + }); + } + CAF_MAIN() + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lcaf_core", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cafeobj.rb b/Formula/c/cafeobj.rb new file mode 100644 index 0000000000000..41a4b70c2decd --- /dev/null +++ b/Formula/c/cafeobj.rb @@ -0,0 +1,72 @@ +class Cafeobj < Formula + desc "New generation algebraic specification and programming language" + homepage "https://cafeobj.org/" + url "https://github.com/CafeOBJ/cafeobj/archive/refs/tags/v1.6.2.tar.gz" + sha256 "b5ea4267b7b4ff3d85a970b6330f706b81ef872968230608005c9b3d168b0065" + license all_of: [ + "BSD-2-Clause", + :public_domain, # comlib/let-over-lambda.lisp + "MIT", # asdf.lisp + ] + head "https://github.com/CafeOBJ/cafeobj.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "dce62a3729ca96afc0a108ddd59600066e98b82282fd448f3af759660d112537" + sha256 cellar: :any, arm64_sequoia: "f09b8ca7dd1989923e0c4655ea33c8a42a0c1d11bfbf42565abaccc48d0b530f" + sha256 cellar: :any, arm64_sonoma: "259398f625fe7637f8a2858d3ef6527afc3f37f6ca5ad6c981f531ac9d39fa90" + sha256 cellar: :any, sonoma: "04d7d82a328ad96e7dcf8fa3d9afabb1f84b0d386c1beed9eef271737ab9ac56" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f9e673420ee0cba67dc62168fc40be7d88e685929420bd0bc80ea7eba80fdc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fefc0da02032b0c3f03aee866a9e6db0fbc3b9bcee757a71f5a682703e12ff0b" + end + + depends_on "sbcl" => :build + depends_on "zstd" + + # Does not build with SBCL 2.5: https://github.com/CafeOBJ/cafeobj/issues/8 + resource "sbcl" do + url "https://downloads.sourceforge.net/project/sbcl/sbcl/2.4.11/sbcl-2.4.11-source.tar.bz2" + sha256 "4f03e5846f35834c10700bbe232da41ba4bdbf81bdccacb1d4de24297657a415" + end + + def install + resource("sbcl").stage do + ENV["SBCL_MACOSX_VERSION_MIN"] = MacOS.version.to_s if OS.mac? + system "sh", "make.sh", "--prefix=#{buildpath}/sbcl", "--with-sb-core-compression", "--with-sb-thread" + system "sh", "install.sh" + ENV.prepend_path "PATH", buildpath/"sbcl/bin" + end + + # Exclude unrecognized options + args = std_configure_args.reject { |s| s["--disable-debug"] || s["--disable-dependency-tracking"] } + + system "./configure", "--with-lisp=sbcl", "--with-lispdir=#{elisp}", *args + system "make", "install" + + # Work around patchelf corrupting the SBCL core which is appended to binary + # TODO: Find a better way to handle this in brew, either automatically or via DSL + if OS.linux? && build.bottle? && build.stable? + cp lib/"cafeobj-#{version.major_minor}/sbcl/cafeobj.sbcl", prefix + Utils::Gzip.compress(prefix/"cafeobj.sbcl") + end + end + + def post_install + if (prefix/"cafeobj.sbcl.gz").exist? + system "gunzip", prefix/"cafeobj.sbcl.gz" + (prefix/"cafeobj.sbcl").chmod (lib/"cafeobj-#{version.major_minor}/sbcl/cafeobj.sbcl").lstat.mode + (lib/"cafeobj-#{version.major_minor}/sbcl").install prefix/"cafeobj.sbcl" + end + end + + test do + system bin/"cafeobj", "-batch" + end +end diff --git a/Formula/c/cagent.rb b/Formula/c/cagent.rb new file mode 100644 index 0000000000000..7e5923fc6dd25 --- /dev/null +++ b/Formula/c/cagent.rb @@ -0,0 +1,43 @@ +class Cagent < Formula + desc "Agent Builder and Runtime by Docker Engineering" + homepage "https://github.com/docker/cagent" + url "https://github.com/docker/cagent/archive/refs/tags/v1.9.9.tar.gz" + sha256 "e6591bcc7f6d130222d4f3564d3c5f31658307cb397ebd2dba6308b025237521" + license "Apache-2.0" + head "https://github.com/docker/cagent.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8bea6c556cf3454d1421cac4c3e1b7ed34ecab40d2f4d95671f7dd9bcf814d15" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8bea6c556cf3454d1421cac4c3e1b7ed34ecab40d2f4d95671f7dd9bcf814d15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8bea6c556cf3454d1421cac4c3e1b7ed34ecab40d2f4d95671f7dd9bcf814d15" + sha256 cellar: :any_skip_relocation, sonoma: "b9618d24da244876d094ef4e106b47a07626bb2a7e04597c299d158ef53b2ca5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c590bf1bc0a5dc20b8dfd9758da0a17e15046e3e74b769df81bfd37b3c5cf9fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dc55e29368c31b31122658b03afcd8712720f0c5ceb4035bf0e09d8de7a1d2d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/docker/cagent/pkg/version.Version=v#{version} + -X github.com/docker/cagent/pkg/version.Commit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"cagent", "completion") + end + + test do + (testpath/"agent.yaml").write <<~YAML + version: "2" + agents: + root: + model: openai/gpt-4o + YAML + + assert_match("cagent version v#{version}", shell_output("#{bin}/cagent version")) + assert_match(/must be set.*OPENAI_API_KEY/m, shell_output("#{bin}/cagent exec --dry-run agent.yaml 2>&1", 1)) + end +end diff --git a/Formula/c/cahute.rb b/Formula/c/cahute.rb new file mode 100644 index 0000000000000..b45ccb1b7f43d --- /dev/null +++ b/Formula/c/cahute.rb @@ -0,0 +1,124 @@ +class Cahute < Formula + include Language::Python::Virtualenv + + desc "Library and set of utilities to interact with Casio calculators" + homepage "https://cahuteproject.org/" + url "https://ftp.cahuteproject.org/releases/cahute-0.6.tar.gz" + sha256 "2fb0a8f0b14d75fb0d8a6fa07f3feda9b4cfaad11115340285e2c9414565059c" + license "CECILL-2.1" + head "https://gitlab.com/cahute/cahute.git", branch: "develop" + + livecheck do + url "https://ftp.cahuteproject.org/releases/" + regex(/href=.*?cahute[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "cb42203525d8516537043a35201cf297d36c0ad965da1ea890b13f75c25bb2b3" + sha256 cellar: :any, arm64_sequoia: "a9f182ecca26940644fc57a55482d3cea23db23a9b7bc04d631d79ceaa4009c8" + sha256 cellar: :any, arm64_sonoma: "5538bcc49d7187f12c367f25303f72880ef2ec69aca596dc4c6d50cd315fefa2" + sha256 cellar: :any, arm64_ventura: "7fcf7b11c26bf1cee45ea46082d741952de45c82f3532f2849468495351ee161" + sha256 cellar: :any, sonoma: "56ce31df801211ccaf95a98f2d2dd9b8c79870d6aaa5784c039bd4a2b85936a7" + sha256 cellar: :any, ventura: "1aa7caddf5a84461d3633f09d878704f395ab7e0467f0817be79cd23ceaa10de" + sha256 cellar: :any_skip_relocation, arm64_linux: "82332e01cda2c06e1d9cc09981c57ab9c00edbf1eb62219ee4b0838ecb821c21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a58adf247829574b1deab7b035c71ec60e404e889241dc8e5910458508e09dec" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => :build + depends_on "libusb" + depends_on "sdl2" + + pypi_packages package_name: "", + extra_packages: "toml" + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + + system "cmake", "-S", ".", "-B", "build", "-DPython3_EXECUTABLE=#{venv.root}/bin/python", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Assume that there is no calculator connected while testing + assert_match "Could not connect to the calculator.", shell_output("#{bin}/p7 idle 2>&1", 1) + assert_match "Could not connect to the calculator.", shell_output("#{bin}/p7screen 2>&1", 1) + assert_match "Could not connect to the calculator.", shell_output("#{bin}/xfer9860 -i 2>&1", 1) + + # No calculator is connected, so this will also fail. Any test file will do. + shell_output("#{bin}/p7os flash #{test_fixtures "test.ico"} 2>&1", 1) + + # Taken from https://cahuteproject.org/developer-guides/detection/usb.html + (testpath/"usb-detect.c").write <<~C + #include + #include + + int my_callback(void *cookie, cahute_usb_detection_entry const *entry) { + char const *type_name; + + switch (entry->cahute_usb_detection_entry_type) { + case CAHUTE_USB_DETECTION_ENTRY_TYPE_SERIAL: + type_name = + "Serial calculator (fx-9860G, Classpad 300 / 330 (+) or " + "compatible)"; + break; + + case CAHUTE_USB_DETECTION_ENTRY_TYPE_SCSI: + type_name = "UMS calculator (fx-CG, fx-CP400+, fx-GIII)"; + break; + + default: + type_name = "(unknown)"; + } + + printf("New entry data:\\n"); + printf( + "- Address: %03d:%03d\\n", + entry->cahute_usb_detection_entry_bus, + entry->cahute_usb_detection_entry_address + ); + printf("- Type: %s\\n", type_name); + + return 0; + } + + int main(void) { + cahute_context *context; + int err; + + err = cahute_create_context(&context); + if (err) { + fprintf( + stderr, + "cahute_create_context() has returned error %s.\\n", + cahute_get_error_name(err) + ); + return 1; + } + + err = cahute_detect_usb(context, &my_callback, NULL); + if (err) + fprintf(stderr, "Cahute has returned error 0x%04X.\\n", err); + + cahute_destroy_context(context); + return 0; + } + C + + pkg_config_cflags = shell_output("pkg-config --cflags --libs cahute libusb-1.0").strip.split + system ENV.cc, "usb-detect.c", *pkg_config_cflags, "-o", "usb-detect" + system "./usb-detect" + end +end diff --git a/Formula/c/cai.rb b/Formula/c/cai.rb new file mode 100644 index 0000000000000..3e0b8140b8ad0 --- /dev/null +++ b/Formula/c/cai.rb @@ -0,0 +1,40 @@ +class Cai < Formula + desc "CLI tool for prompting LLMs" + homepage "https://github.com/ad-si/cai" + url "https://github.com/ad-si/cai/archive/refs/tags/v0.12.0.tar.gz" + sha256 "af2080ff5bdca09a26db9f6b809b5a480b24b75a833622832ca022e213fd5173" + license "ISC" + head "https://github.com/ad-si/cai.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bec82f6cf5bf77aa553f1f9ecfb5cf63840dedcdf3393e2885f5818e55d8aa72" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a6819ef2cd130e83a98ec23101d4c2cebd2fd45b52ef5d015e15a8b18ebb04a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69abed5efde26e64f867bd8fdd7e428f5f611fd839a48cc6f45df78a16331627" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c9d7292bd88ae5b997ea3e9cd01a838210efd4b1d9ae39c601265c81f24bb984" + sha256 cellar: :any_skip_relocation, sonoma: "44732608ba49fac105865075d4d85c79ed0551a4728e440f4f59933f8fca28ed" + sha256 cellar: :any_skip_relocation, ventura: "36a90f28a6668537a7acc45116a6c54de5d209110c6e0cd83d588473fcade6a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9057ca47aaeec34d15170ab08263d63a6304150677bb7b8d369111601b0ab2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "234ed79f33a701debfb463ed91b1a6843f8a728bd700a98b157994e947fd2a1a" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/cai anthropic claude-opus Which year did the Titanic sink 2>&1", 1) + assert_match "An API key must be provided", output + + output = shell_output("#{bin}/cai ollama llama3 Which year did the Titanic sink 2>&1", 1) + assert_match "error sending request for url", output + end +end diff --git a/Formula/c/caire.rb b/Formula/c/caire.rb new file mode 100644 index 0000000000000..21a558e7507b6 --- /dev/null +++ b/Formula/c/caire.rb @@ -0,0 +1,55 @@ +class Caire < Formula + desc "Content aware image resize tool" + homepage "https://github.com/esimov/caire" + url "https://github.com/esimov/caire/archive/refs/tags/v1.5.0.tar.gz" + sha256 "d63c5edff4f12bc14e787c0a8f3acb456119e1a03d4bd8bfcf70114abd44f941" + license "MIT" + head "https://github.com/esimov/caire.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "413a46b531e0f7f0fd954c70d65ca5158a8b01ae7748b56859eb07cf4eb97d31" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3aa63b8d899dde73b2137eb9bf77b51e970eaf124523887bb6db25a40fb8c6ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18a7667e7b36e996206c910087a5e667945d1bf7a111fd033e2934c915303237" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e03f494a7f6fa1411aa724859f27f555f3ba850d5b0a3f9dc76810e314e43a0" + sha256 cellar: :any_skip_relocation, sonoma: "70d79acf65528d8c7b30ef658380fac4d0c9cd6cf8ebdfe2a75d6e1e9ef2fb87" + sha256 cellar: :any_skip_relocation, ventura: "93d0172823e84beee86f213dfd1738de678668778bfd48d6ece7a73892cd8070" + sha256 cellar: :any_skip_relocation, arm64_linux: "3054ab90f891eee21ac084564e33c4b280c99870f66bae2beb1f198edd665f72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d6d577c0674569e1ec5951618888fff00373551779eeacbfa2712b95fe936d2" + end + + depends_on "go" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "vulkan-headers" => :build + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxfixes" + depends_on "libxkbcommon" + depends_on "mesa" + depends_on "wayland" + end + + def install + # Workaround to avoid patchelf corruption when cgo is required (for gioui.org/internal/vk) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/caire" + end + + test do + pid = fork do + system bin/"caire", "-in", test_fixtures("test.png"), "-out", testpath/"test_out.png", + "-width=1", "-height=1", "-perc=1" + assert_path_exists testpath/"test_out.png" + end + + assert_match version.to_s, shell_output("#{bin}/caire -help 2>&1") + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/c/cairo.rb b/Formula/c/cairo.rb new file mode 100644 index 0000000000000..9cd2c8f23adf1 --- /dev/null +++ b/Formula/c/cairo.rb @@ -0,0 +1,83 @@ +class Cairo < Formula + desc "Vector graphics library with cross-device output support" + homepage "https://cairographics.org/" + url "https://cairographics.org/releases/cairo-1.18.4.tar.xz" + sha256 "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb" + license any_of: ["LGPL-2.1-only", "MPL-1.1"] + head "https://gitlab.freedesktop.org/cairo/cairo.git", branch: "master" + + livecheck do + url "https://cairographics.org/releases/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)cairo[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0a59b15b0790cfdd761af1c0fcb82264fd3fbd9a75202bd2e194fc98999c12ec" + sha256 cellar: :any, arm64_sequoia: "c3c657a2dd0fac3e84d3c5d4e8327313f0ef217f26da2f73fbc50765fc9e9502" + sha256 cellar: :any, arm64_sonoma: "af9f8ed4d44e37149a44f1a6cfdca8bacb7034690dcaa39619485171b15cbc26" + sha256 cellar: :any, arm64_ventura: "36d4e7c07a598f0aaf9190b4cd5203daa9ca613af73b152c5c6db12ccd235869" + sha256 cellar: :any, sonoma: "a29a888d7f2cdf008c4e0525a72e3f5ad68c7917b830dad7c3d66f6e050fa4a2" + sha256 cellar: :any, ventura: "4ce538d943ce70f5f9c7f10c3655e1385ef65172d2e26add2fc721901b170dfd" + sha256 arm64_linux: "707c35672e01d67c2f6de3a7db40c9f6bf305d50ba71e58d4004896263743c89" + sha256 x86_64_linux: "829f25c2b757e94571913ec6857d454c26d0bc729a154f067ad33ac985c47a00" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "fontconfig" + depends_on "freetype" + depends_on "glib" + depends_on "libpng" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "libxrender" + depends_on "lzo" + depends_on "pixman" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + args = %w[ + --default-library=both + -Dfontconfig=enabled + -Dfreetype=enabled + -Dpng=enabled + -Dglib=enabled + -Dxcb=enabled + -Dxlib=enabled + -Dzlib=enabled + -Dglib=enabled + ] + args << "-Dquartz=enabled" if OS.mac? + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + + cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 600, 400); + cairo_t *context = cairo_create(surface); + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs cairo").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/c/cairomm.rb b/Formula/c/cairomm.rb new file mode 100644 index 0000000000000..76ba6aecc45f2 --- /dev/null +++ b/Formula/c/cairomm.rb @@ -0,0 +1,57 @@ +class Cairomm < Formula + desc "Vector graphics library with cross-device output support" + homepage "https://cairographics.org/cairomm/" + url "https://cairographics.org/releases/cairomm-1.18.0.tar.xz" + sha256 "b81255394e3ea8e8aa887276d22afa8985fc8daef60692eb2407d23049f03cfb" + license "LGPL-2.0-or-later" + + livecheck do + url "https://cairographics.org/releases/?C=M&O=D" + regex(/href=.*?cairomm[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f0343ad4ea24ef24041422413d36b5a8aae65628dd5d756c94114d22e09709ad" + sha256 cellar: :any, arm64_sequoia: "0a9512445631806965c6983c9081ca3502d04ae9d2ca70760152a5ea5add5ce6" + sha256 cellar: :any, arm64_sonoma: "9da9227f04ce5e2dfd54e6d1e39ce19ccb9edb062acf7751105c45174d971824" + sha256 cellar: :any, arm64_ventura: "b335188e992781cf00c6157bc3672aeb97462de721113c605a81f73b25a3188b" + sha256 cellar: :any, arm64_monterey: "badd15644a940fcdb2fbe0ad21e9c24073098a421dd6bc705ea4cf6bd9cd4699" + sha256 cellar: :any, sonoma: "0e38e709e43a068694a9a36c743930e133e0c1da6647de9ea82391e7a82052c9" + sha256 cellar: :any, ventura: "61f902ee74afad872595fa8664f5a3a7d702df38ab5299b445cf82d258e08d45" + sha256 cellar: :any, monterey: "f94ec9449571497fdf24911966394002d0d67c26081e21d7c5e471109a78e3f4" + sha256 arm64_linux: "3b866bb4f2e4ba2bf7772bd89e40e540473f7787f90bc0504991b80b5e578455" + sha256 x86_64_linux: "a7f537f71f9176e26a94e7b5db2a30f0ea266085486ca78af8e957e401d7de63" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "libpng" + depends_on "libsigc++" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) + { + Cairo::RefPtr surface = Cairo::ImageSurface::create(Cairo::Surface::Format::ARGB32, 600, 400); + Cairo::RefPtr cr = Cairo::Context::create(surface); + return 0; + } + CPP + + pkg_config_cflags = shell_output("pkg-config --cflags --libs cairo cairomm-1.16").chomp.split + system ENV.cxx, "-std=c++17", "test.cpp", *pkg_config_cflags, "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cairomm@1.14.rb b/Formula/c/cairomm@1.14.rb new file mode 100644 index 0000000000000..0df6f9de9ce74 --- /dev/null +++ b/Formula/c/cairomm@1.14.rb @@ -0,0 +1,57 @@ +class CairommAT114 < Formula + desc "Vector graphics library with cross-device output support" + homepage "https://cairographics.org/cairomm/" + url "https://cairographics.org/releases/cairomm-1.14.5.tar.xz" + sha256 "70136203540c884e89ce1c9edfb6369b9953937f6cd596d97c78c9758a5d48db" + license "LGPL-2.0-or-later" + + livecheck do + url "https://cairographics.org/releases/?C=M&O=D" + regex(/href=.*?cairomm[._-]v?(1\.14(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3c84812ac04258b3fe766341479b99b1e28a9572b995e7bd33e3184fdb29055a" + sha256 cellar: :any, arm64_sequoia: "87bd872e7129feb2db9ca965fe5e065ebef30f6a196f0c80d8012b60cef66bf2" + sha256 cellar: :any, arm64_sonoma: "cf8e7aa143ab206a8986997621217fc40e219d23a88e09d5a3d1ee1ce58d78c2" + sha256 cellar: :any, arm64_ventura: "76dbfad402d8573c6acfdbbf785ce70eb13e626318aa0c8f241864b43a8c8ee2" + sha256 cellar: :any, arm64_monterey: "bd41c2293acda52bcef8fa7332b90860007ecb37b864677f59d624f1fff457df" + sha256 cellar: :any, sonoma: "48cd095943b2001726bd9b8f678424725e73c3ac4d088e61cff65b973641ae0c" + sha256 cellar: :any, ventura: "a642e54afb60394f1dc138b3611b0c729f09d9aa0217a351823b1ae75816bcf2" + sha256 cellar: :any, monterey: "4ef3f6806bae703ef82e302f33c28d96136d3bbbdef56c36f9032cf6aaa10c46" + sha256 arm64_linux: "d23cd3b782f7fbaa3bdf7445334de4f170ab6349feefc443e3362944515a0190" + sha256 x86_64_linux: "4fce5fb84ea0095ce2f9e0996c926fc8bb54f55a458a9eb1be50a40241f8a6e5" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "libpng" + depends_on "libsigc++@2" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) + { + Cairo::RefPtr surface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 600, 400); + Cairo::RefPtr cr = Cairo::Context::create(surface); + return 0; + } + CPP + + pkg_config_cflags = shell_output("pkg-config --cflags --libs cairo cairomm-1.0").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", *pkg_config_cflags, "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cake.rb b/Formula/c/cake.rb new file mode 100644 index 0000000000000..4e4431429ef8a --- /dev/null +++ b/Formula/c/cake.rb @@ -0,0 +1,52 @@ +class Cake < Formula + desc "Cross platform build automation system with a C# DSL" + homepage "https://cakebuild.net/" + url "https://github.com/cake-build/cake/archive/refs/tags/v5.1.0.tar.gz" + sha256 "32e93073526d1c65d298d573a33b23d908484bb37fdd68b66bc36a9dde7921fb" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ac7e950f55d377f780683ba9a1123a7b009aa8ae938ba97195747b7d24ae1fb4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59c34254b7a1f561b3b67f465dea3505abf761a989dde7fb4d37780b0f3e9544" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ccfac27859b9dbedd76d793cd62795d05e2c9a38ae039b604a502744f9245798" + sha256 cellar: :any_skip_relocation, arm64_linux: "f80802dc899b201d304a2b137878fafc03c4315b0d0f326689b206f057b54d1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7eadcc16ddfb3c38cab715f1d0fbc9b280dfa21a82995dffd5a4f144b8e5759e" + end + + depends_on "dotnet" + + conflicts_with "coffeescript", because: "both install `cake` binaries" + + def install + # Ignore dotnet version specification and use homebrew one + rm "global.json" + + dotnet = Formula["dotnet"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --output #{libexec} + --no-self-contained + --use-current-runtime + -p:AppHostRelativeDotNet=#{dotnet.opt_libexec.relative_path_from(libexec)} + -p:Version=#{version} + ] + + system "dotnet", "publish", "src/Cake", *args + bin.install_symlink libexec/"Cake" => "cake" + end + + test do + (testpath/"build.cake").write <<~EOS + var target = Argument ("target", "info"); + + Task("info").Does(() => + { + Information ("Hello Homebrew"); + }); + + RunTarget ("info"); + EOS + assert_match "Hello Homebrew\n", shell_output("#{bin}/cake build.cake") + end +end diff --git a/Formula/c/calabash.rb b/Formula/c/calabash.rb new file mode 100644 index 0000000000000..a03f92f564f6f --- /dev/null +++ b/Formula/c/calabash.rb @@ -0,0 +1,50 @@ +class Calabash < Formula + desc "XProc (XML Pipeline Language) implementation" + homepage "https://xmlcalabash.com/" + url "https://github.com/ndw/xmlcalabash1/releases/download/1.5.7-120/xmlcalabash-1.5.7-120.zip" + sha256 "40a932910f36e78b445bd756acb405155d39b98541091298c0cf4971895cb8c3" + license any_of: ["GPL-2.0-only", "CDDL-1.0"] + + # According to ndw/xmlcalabash1#342, each release comes in "flavours" that + # target different Saxon versions (e.g. 1.5.4-110 targets Saxon 11.x). + # The "latest" release on GitHub may not target the same version as our + # `saxon` formula, so we have to check multiple releases to find the newest + # applicable version. + livecheck do + url :stable + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + strategy :github_releases do |json, regex| + saxon_suffix = "-#{Formula["saxon"].version.major}0" + + json.map do |release| + next if release["draft"] || release["prerelease"] + + match = release["tag_name"]&.match(regex) + next if match.blank? + + match[1] if match[1].end_with?(saxon_suffix) + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c9cd2c20bea227a53c297e2bf265302d5c8fc696e5a5efb99982ab4eaf7ed6b6" + end + + depends_on "openjdk" + depends_on "saxon" + + def install + libexec.install Dir["*"] + bin.write_jar_script libexec/"xmlcalabash-#{version}.jar", "calabash", "-Xmx1024m" + end + + test do + # This small XML pipeline (*.xpl) that comes with Calabash + # is basically its equivalent "Hello World" program. + system bin/"calabash", "#{libexec}/xpl/pipe.xpl" + end +end diff --git a/Formula/c/calc.rb b/Formula/c/calc.rb new file mode 100644 index 0000000000000..abd93ccf3b0ab --- /dev/null +++ b/Formula/c/calc.rb @@ -0,0 +1,56 @@ +class Calc < Formula + desc "Arbitrary precision calculator" + homepage "http://www.isthe.com/chongo/tech/comp/calc/" + url "https://github.com/lcn2/calc/archive/refs/tags/v2.15.1.1.tar.gz" + sha256 "ad432c3202885fb93a82985c0a9cdd4c82f3877acc8f12a1504f56c8359e6bee" + license "LGPL-2.1-or-later" + head "https://github.com/lcn2/calc.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "1b0afcde0fd8484cdcadea8a20e21a5c0b5d086aa43c56d63e7d8e21206247cc" + sha256 arm64_sequoia: "473e3761dcf18e6c8f0657eee8a690ba5b094c55bb79c44e28e110cd80ed58f3" + sha256 arm64_sonoma: "8897a859be300533821ba09c5c681158940be5ac85b4f4736a074bc3db3e1560" + sha256 arm64_ventura: "de564162098982b1546f3243c618ba8731160442d0efb0be360bc50044a1dd19" + sha256 sonoma: "3363fbda78c962b3b57f945a3c368add2c043ce8f344fec0d0d23177d71e82c9" + sha256 ventura: "eeaf9f4a77a5d6427d7f1802d9d4a402605d0aa66fcbadb9ced944520a13dff7" + sha256 arm64_linux: "b13ca7062d6d574f01430e5dac76a5450360f2c4eadf6772f258db194dd16040" + sha256 x86_64_linux: "762c4ff259e90fcbc371703b1a311a7716cb4ff228957d0499aebe46b163e2fb" + end + + depends_on "readline" + + on_linux do + depends_on "util-linux" # for `col` + end + + def install + ENV.deparallelize + + ENV["EXTRA_CFLAGS"] = ENV.cflags + ENV["EXTRA_LDFLAGS"] = ENV.ldflags + + args = [ + "BINDIR=#{bin}", + "LIBDIR=#{lib}", + "MANDIR=#{man1}", + "CALC_INCDIR=#{include}/calc", + "CALC_SHAREDIR=#{pkgshare}", + "USE_READLINE=-DUSE_READLINE", + "READLINE_LIB=-L#{Formula["readline"].opt_lib} -lreadline", + "READLINE_EXTRAS=-lhistory -lncurses", + ] + args << "INCDIR=#{MacOS.sdk_path}/usr/include" if OS.mac? + system "make", "install", *args + + libexec.install "#{bin}/cscript" + end + + test do + assert_equal "11", shell_output("#{bin}/calc 0xA + 1").strip + end +end diff --git a/Formula/c/calceph.rb b/Formula/c/calceph.rb new file mode 100644 index 0000000000000..78d34c3112c5d --- /dev/null +++ b/Formula/c/calceph.rb @@ -0,0 +1,59 @@ +class Calceph < Formula + desc "C library to access the binary planetary ephemeris files" + homepage "https://www.imcce.fr/inpop/calceph" + url "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-4.0.5.tar.gz" + sha256 "3460d8a3e10a86e7fe0228d5d9abcda589713b8ed3ee007ce061ae01f8c2e1ea" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?calceph[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4a1697db0c615f68049b055034beca20f3ebe94327c9976074176ef65141b89f" + sha256 cellar: :any, arm64_sequoia: "754230b9132b8db3b75dc7eae342772e8e3cd3404e8bda89e0ca63a6bdab9333" + sha256 cellar: :any, arm64_sonoma: "8330dada267fd61aed38edb48579a83e57694c70c78b5c5c9064fd672983266c" + sha256 cellar: :any, arm64_ventura: "0e7de121d382e0277e2d23e8627417493a97e8f7ca95b00f6bfc6b18a9064738" + sha256 cellar: :any, sonoma: "17b0aa7869f8977327c1ba0d5838fecc882dd85a3a6a6872806593f375ce0ad7" + sha256 cellar: :any, ventura: "614cddd90b7e738303e97d386fa1612ab57fd60766bf8fb8cc781af06adfde39" + sha256 cellar: :any_skip_relocation, arm64_linux: "527d6c7622d8df61721200858ab0e1eb2d538fb3e4742e19e1a7ab3ff3692c77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a14165e0bb191f70ea0b083004328096ed866efa64e5b301ddd394c4df12d67" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DENABLE_FORTRAN=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"testcalceph.c").write <<~C + #include + #include + + int errorfound; + static void myhandler (const char *msg) { + errorfound = 1; + } + + int main (void) { + errorfound = 0; + calceph_seterrorhandler (3, myhandler); + calceph_open ("example1.dat"); + assert (errorfound==1); + return 0; + } + C + system ENV.cc, "testcalceph.c", "-L#{lib}", "-lcalceph", "-o", "testcalceph" + system "./testcalceph" + end +end diff --git a/Formula/c/calcurse.rb b/Formula/c/calcurse.rb new file mode 100644 index 0000000000000..8255faec86e1e --- /dev/null +++ b/Formula/c/calcurse.rb @@ -0,0 +1,52 @@ +class Calcurse < Formula + desc "Text-based personal organizer" + homepage "https://calcurse.org/" + url "https://calcurse.org/files/calcurse-4.8.2.tar.gz" + sha256 "849ba852c7f37b6772365cb0c42a94cde0fe75efba91363e96a0e7ef797ba565" + license "BSD-2-Clause" + + livecheck do + url "https://calcurse.org/downloads/" + regex(/href=.*?calcurse[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "36702d8f775d240b6968de8c9920deb70f8a1c4174efb8807a65b137a17abe6d" + sha256 arm64_sequoia: "f120135e45863a612646065cb340a33af4dad61e43d7390ad13c04a1fb1cce97" + sha256 arm64_sonoma: "d242f4958c5af9df7208d7b933af6d7a37309754962b38b3979ac639edd28937" + sha256 arm64_ventura: "3a330a186dc9bbd742e76b1b366f4a5c2e687ef7f7cee377e8f313cf61dd2d67" + sha256 sonoma: "fc2881f5a9216f5709a37c284406ee3e648c396fd90dedeadebcbee6bd3e8fde" + sha256 ventura: "0141f2a451f9d2be67f5f4e0baef21e97ae4821b4733cdc1c6af2e174ca0a0a1" + sha256 arm64_linux: "3c4da058a54e0a401ac9416c0a57e27e7fd05f02d1ab00bd0f8b4caef798d287" + sha256 x86_64_linux: "d3e722c7e8f3f64fec8f389fa7d46f5799d20a6bb1805a5b0b84aa491325f408" + end + + head do + url "https://git.calcurse.org/calcurse.git", branch: "master" + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + def install + system "./autogen.sh" if build.head? + + system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] } + + # Specify XML_CATALOG_FILES for asciidoc + system "make", "XML_CATALOG_FILES=/usr/local/etc/xml/catalog" + system "make", "install" + end + + test do + system bin/"calcurse", "-v" + end +end diff --git a/Formula/c/calicoctl.rb b/Formula/c/calicoctl.rb new file mode 100644 index 0000000000000..ffc3bd5002f8d --- /dev/null +++ b/Formula/c/calicoctl.rb @@ -0,0 +1,43 @@ +class Calicoctl < Formula + desc "Calico CLI tool" + homepage "https://www.tigera.io/project-calico/" + url "https://github.com/projectcalico/calico.git", + tag: "v3.31.0", + revision: "b1f3c43f84370504e218eb5be8a34c81348f866a" + license "Apache-2.0" + head "https://github.com/projectcalico/calico.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "336b83584e2ed16a6fcd453ef30f9769c001845d7dd704604e4189566f0c8b3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "336b83584e2ed16a6fcd453ef30f9769c001845d7dd704604e4189566f0c8b3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "336b83584e2ed16a6fcd453ef30f9769c001845d7dd704604e4189566f0c8b3a" + sha256 cellar: :any_skip_relocation, sonoma: "e153fbcb33682c973cfa506856a76c287eef87a388f28191fcb98b140ce75a5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7157408c633c321162dca5cafa9d6b981e18d4802fb02b35eee75189c1ef6787" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ee134778550cdc7cbfed76e7897245f21e4196a9da67b72fd163da1d1337a50" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/projectcalico/calico/pkg/buildinfo.Version=#{version} + -X github.com/projectcalico/calico/pkg/buildinfo.GitRevision=#{Utils.git_short_head} + -X github.com/projectcalico/calico/pkg/buildinfo.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "calicoctl/calicoctl/calicoctl.go" + end + + test do + assert_match version.to_s, shell_output("#{bin}/calicoctl version") + + assert_match "invalid configuration: no configuration has been provided", + shell_output("#{bin}/calicoctl datastore migrate lock 2>&1", 1) + end +end diff --git a/Formula/c/camellia.rb b/Formula/c/camellia.rb new file mode 100644 index 0000000000000..0d98ebc5ece2d --- /dev/null +++ b/Formula/c/camellia.rb @@ -0,0 +1,60 @@ +class Camellia < Formula + desc "Image Processing & Computer Vision library written in C" + homepage "https://camellia.sourceforge.net/" + url "https://downloads.sourceforge.net/project/camellia/Unix_Linux%20Distribution/v2.7.0/CamelliaLib-2.7.0.tar.gz" + sha256 "a3192c350f7124d25f31c43aa17e23d9fa6c886f80459cba15b6257646b2f3d2" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(%r{url=.*?/CamelliaLib[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c02cf24237f1d621d5b395cb126efba1128b422026385868a8bf42ba2444d0fd" + sha256 cellar: :any, arm64_sequoia: "0679b21bf4e69b52af575fc7c30370b2fe0e70d2639b6fa550f3b4b3a3dfa392" + sha256 cellar: :any, arm64_sonoma: "c635eb57ac492aa11db11d6f08cfeee90951308007401fa2a20152db16cd57e1" + sha256 cellar: :any, arm64_ventura: "a5c4c63a17ade79c28f3e4486befcdba33df0693d28df9c5bad81dcf2cdf8696" + sha256 cellar: :any, arm64_monterey: "f406463c27cb4ffa13ace7d45ab4565f39b2298246ddb7b671d75f5bac5b0382" + sha256 cellar: :any, arm64_big_sur: "ecd83455b65819e9275ead160b6fca0a1a13e8b85d00c63e394ecdb5818b3a78" + sha256 cellar: :any, sonoma: "4ea29c13f4d2158b8c34fe8dd86b91ead0286cc3127faaa5314544a5e1877125" + sha256 cellar: :any, ventura: "60de7bb06d85c339db0c5e43ee8965bbd3b8ab6209c292018d02f635d208d9c5" + sha256 cellar: :any, monterey: "2a5a68dce9404d513ed22a4a26a2968af84cc2e4df607edf3013a2b24912205d" + sha256 cellar: :any, big_sur: "84ce9367fd905515a5532cd64be374177b369f8c1797808a2ec95b5c89799965" + sha256 cellar: :any, catalina: "c7d2e77a15331cebfeff928b67bd32ee5b0a9325ac5cbea022b2c6ddbe585ff6" + sha256 cellar: :any_skip_relocation, arm64_linux: "54fa3c308a4e301534567e1e0cf9a35c303c271ee8f213b9a4321b944d373c8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3eaafd00c8c6f8addff45fa1be46912ec2b411552450c48dbe09795c1ec7e370" + end + + def install + # Fix missing include - https://sourceforge.net/p/camellia/bugs/1/ + # cam_demo_cpp.cpp:212:52: error: ‘sprintf’ was not declared in this scope + if OS.linux? + inreplace "cam_demo_cpp.cpp", + "#include \r\n", + "#include \r\n#include \r\n" + end + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "camellia.h" + int main() { + CamImage image; // CamImage is an internal structure of Camellia + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lCamellia", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/camlp-streams.rb b/Formula/c/camlp-streams.rb new file mode 100644 index 0000000000000..8f7668bfe14bc --- /dev/null +++ b/Formula/c/camlp-streams.rb @@ -0,0 +1,42 @@ +class CamlpStreams < Formula + desc "Stream and Genlex libraries for use with Camlp4 and Camlp5" + homepage "https://github.com/ocaml/camlp-streams" + url "https://github.com/ocaml/camlp-streams/archive/refs/tags/v5.0.1.tar.gz" + sha256 "ad71f62406e9bb4e7fb5d4593ede2af6c68f8b0d96f25574446e142c3eb0d9a4" + license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" } + revision 5 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e7fe4bfbf60135b74ed63cd5430c8aaa06afc4b6755562448b43061c33dc92bb" + sha256 cellar: :any, arm64_sequoia: "bb52bd02f32203ab2afd5ba95e31870d7a1434958b1c738a05d9b74d4d5d8117" + sha256 cellar: :any, arm64_sonoma: "367be637dbd5fb4baadb86f92ca0c6758d896f78fae0ae48beb93be26004fcf3" + sha256 cellar: :any, sonoma: "9b129d7d4072cf67c52b0ae723390101a5790799788d34d9a169111c52220325" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c6078a8ea7c69644008875bd7f8a77025cd725f0ad98038136fe39c27536533" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fb3cdc0726e6a68db04b269e89f5e3e6754bbbbf2ac102628f19edb9f8dda3a" + end + + depends_on "dune" => :build + depends_on "ocaml-findlib" => :test + depends_on "ocaml" + + def install + system "dune", "build", "@install" + system "dune", "install", "--prefix=#{prefix}", "--libdir=#{lib}/ocaml", "--docdir=#{doc.parent}" + end + + test do + # Work around for https://github.com/Homebrew/homebrew-test-bot/issues/805 + if ENV["HOMEBREW_GITHUB_ACTIONS"] && !(Formula["ocaml-findlib"].etc/"findlib.conf").exist? + ENV["OCAMLFIND_CONF"] = Formula["ocaml-findlib"].opt_libexec/"findlib.conf" + end + + (testpath/"test.ml").write <<~EOS + let stream = Stream.of_list ([] : unit list) + EOS + system "ocamlfind", "ocamlopt", "-linkpkg", "-package", "camlp-streams", + "-warn-error", "+3", "-o", "test", "test.ml" + assert_path_exists testpath/"test" + end +end diff --git a/Formula/c/camlp5.rb b/Formula/c/camlp5.rb new file mode 100644 index 0000000000000..e6d4116c95cf4 --- /dev/null +++ b/Formula/c/camlp5.rb @@ -0,0 +1,61 @@ +class Camlp5 < Formula + desc "Preprocessor and pretty-printer for OCaml" + homepage "https://camlp5.github.io/" + url "https://github.com/camlp5/camlp5/archive/refs/tags/8.04.00.tar.gz" + sha256 "eb8c5bc0f47ce4b9518d37bcbf8be05ee80243c38e7019f8c3808456be8f15a8" + license "BSD-3-Clause" + revision 1 + head "https://github.com/camlp5/camlp5.git", branch: "master" + + livecheck do + url "https://opam.ocaml.org/packages/camlp5/" + regex(%r{href=.*?/refs/tags/(?:rel[._-]?)?v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "61dc0c7d0bf2a5e91afcba91ce127172c6ad3e2cd64d18950875ea6e914433f5" + sha256 arm64_sequoia: "2c10995a40dac4ff4e5686d498ea76a4c680b5e0ac0d2d4e26992e3488e94fa6" + sha256 arm64_sonoma: "3a07acb738d7410fa991e69d9bf9ee454c152c21060a1989715c6ce8db80c4a9" + sha256 sonoma: "83822f4200ee229c2d9c46b5c650efd37aba4cd0f73dc1effc815b841b649986" + sha256 arm64_linux: "9037191c4e95682c02785002444fd5cbbea75035025216a49cecda6bb60b92f7" + sha256 x86_64_linux: "a4411131337232c2a85b7dc0153fcc020ea43b177991952fe6bea444fd4f4cc7" + end + + depends_on "ocaml-findlib" => :build + depends_on "opam" => :build + depends_on "pkgconf" => :build + depends_on "camlp-streams" + depends_on "ocaml" + depends_on "pcre2" + + uses_from_macos "m4" => :build + + def install + ENV["OPAMROOT"] = opamroot = buildpath/".opam" + ENV["OPAMYES"] = "1" + + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + system "opam", "install", ".", "--deps-only", "--yes", "--no-depexts" + + system "./configure", "--prefix", prefix, "--mandir", man + system "opam", "exec", "--", "make", "world.opt" + system "opam", "exec", "--", "make", "install" + (lib/"ocaml/camlp5").install "etc/META" + libexec.install opamroot/"ocaml-system/lib/stublibs/dllpcre2_stubs.so" + bin.env_script_all_files libexec, CAML_LD_LIBRARY_PATH: libexec + end + + test do + ocaml = Formula["ocaml"] + (testpath/"hi.ml").write "print_endline \"Hi!\";;" + assert_equal "let _ = print_endline \"Hi!\"", + # The purpose of linking with the file "str.cma" is to ensure that the + # ocaml files are in sync with the camlp5 files. If camlp5 has been + # compiled with an older version of the ocaml compiler, then an error + # "interface mismatch" will occur. + shell_output("#{bin}/camlp5 #{lib}/ocaml/camlp5/pa_o.cmo " \ + "#{lib}/ocaml/camlp5/o_keywords.cmo " \ + "#{lib}/ocaml/camlp5/pr_o.cmo " \ + "#{ocaml.opt_lib}/ocaml/str/str.cma hi.ml") + end +end diff --git a/Formula/c/camlpdf.rb b/Formula/c/camlpdf.rb new file mode 100644 index 0000000000000..40ff5c1581d64 --- /dev/null +++ b/Formula/c/camlpdf.rb @@ -0,0 +1,56 @@ +class Camlpdf < Formula + desc "OCaml library for reading, writing and modifying PDF files" + homepage "https://github.com/johnwhitington/camlpdf" + url "https://github.com/johnwhitington/camlpdf/archive/refs/tags/v2.8.1.tar.gz" + sha256 "148994c70016f1b02fee1f5548ff7d36ba7d0a5716e03f95011160fcc495657b" + license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" } + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "11905e6ecf963dd498f8375ed474be764b50922044fc210d660376d250c49f98" + sha256 cellar: :any, arm64_sequoia: "aefadfc9531ad433514d250c0ded7c4ff496682302e30157f253ed8e90ef2bfd" + sha256 cellar: :any, arm64_sonoma: "e84c0baa3eb14d7aea916545164eeaa878a2f8bd3c9cabb80f815121018dc1c9" + sha256 cellar: :any, sonoma: "a27ffe411ba9917e6805e1ee6f7f1a3df9258b1fa143cf48bd866d604d52a559" + sha256 cellar: :any_skip_relocation, arm64_linux: "8012e43591114b66a5a4e7457170dd2fc2d47b2b0957bce6e5ac730ef75677ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b238372051d39a3ccfbbbd3da90454e8977f2798df5f0f2315b827b97bdad6cb" + end + + depends_on "ocaml-findlib" => :build + depends_on "ocaml" + + def install + # For OCamlmakefile + ENV.deparallelize + + # Work around for https://github.com/Homebrew/homebrew-test-bot/issues/805 + if ENV["HOMEBREW_GITHUB_ACTIONS"] && !(Formula["ocaml-findlib"].etc/"findlib.conf").exist? + ENV["OCAMLFIND_CONF"] = Formula["ocaml-findlib"].opt_libexec/"findlib.conf" + end + + ENV["OCAMLFIND_DESTDIR"] = lib/"ocaml" + + (lib/"ocaml").mkpath + cp Formula["ocaml"].opt_lib/"ocaml/Makefile.config", lib/"ocaml" + + # install in #{lib}/ocaml not #{HOMEBREW_PREFIX}/lib/ocaml + inreplace lib/"ocaml/Makefile.config" do |s| + s.change_make_var! "prefix", prefix + end + + system "make" + (lib/"ocaml/stublibs").mkpath # `make install` assumes this directory exists + system "make", "install", "STDLIBDIR=#{lib}/ocaml" + + rm lib/"ocaml/Makefile.config" # avoid conflict with ocaml + end + + test do + (testpath/"test.ml").write "Pdfutil.flprint \"camlpdf\"" + system Formula["ocaml"].opt_bin/"ocamlopt", "-I", lib/"ocaml/camlpdf", "-I", + Formula["ocaml"].opt_lib/"ocaml", "-o", "test", "camlpdf.cmxa", + "test.ml" + assert_match "camlpdf", shell_output("./test") + end +end diff --git a/Formula/c/canfigger.rb b/Formula/c/canfigger.rb new file mode 100644 index 0000000000000..117cc5a2bebd2 --- /dev/null +++ b/Formula/c/canfigger.rb @@ -0,0 +1,82 @@ +class Canfigger < Formula + desc "Simple configuration file parser library" + homepage "https://github.com/andy5995/canfigger/" + url "https://github.com/andy5995/canfigger/releases/download/v0.3.0/canfigger-0.3.0.tar.xz" + sha256 "3d813e69e0cc3a43c09cf565138ac1278f7bcea74053204f54e3872c094cb534" + license "GPL-3.0-or-later" + head "https://github.com/andy5995/canfigger.git", branch: "trunk" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6a1990da902b615052fa6d3b98704b8a0dc1320d7545feb2f9a86d8a9413288a" + sha256 cellar: :any, arm64_sequoia: "1eea36988f6c7adf32c10b85effe85af3344fd9c294de23c7d3f8b391222c56e" + sha256 cellar: :any, arm64_sonoma: "d55f2ee425decbb379da3105d48ec055a42b87f72efbffa6a875d53e74faebfb" + sha256 cellar: :any, arm64_ventura: "ca6dbe2e1c9d8841cf927367e9f472b1fed91d84ada7ac1295e78e7c135f6341" + sha256 cellar: :any, arm64_monterey: "4fa68580783fc78146550db423b46e27004fe2c83ff54135159e750b399f06e5" + sha256 cellar: :any, sonoma: "ae03386506e951da6525a8c437c62aee6e232ab8a52ab14bcb7c63de103d4903" + sha256 cellar: :any, ventura: "163c84d05419a4c6f58fbfaa5923ef2bea68a5c7fb8e89bb7080323840ffe6a5" + sha256 cellar: :any, monterey: "2481309bc1cc7485ae7fca15bcb396498b19a5ef370cb3a71c9e608b8bc16fd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8f836846182fc7b48b5375c1a69bb771b3ab32f38e4e7dece9c687960cd4739" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b3630e0553221aa87402808455550585ca65a0549a6ca12f1c6d1fa85366596" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", "-Dbuild_tests=false", "-Dbuild_examples=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.conf").write <<~EOS + Numbers = list, one , two, three, four, five, six, seven + EOS + + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + char *file = "test.conf"; + struct Canfigger *config = canfigger_parse_file(file, ','); + + if (!config) + return -1; + + while (config != NULL) + { + printf("Key: %s, Value: %s\\n", config->key, + config->value != NULL ? config->value : "NULL"); + + char *attr = NULL; + canfigger_free_current_attr_str_advance(config->attributes, &attr); + while (attr) + { + printf("Attribute: %s\\n", attr); + + canfigger_free_current_attr_str_advance(config->attributes, &attr); + } + + canfigger_free_current_key_node_advance(&config); + putchar('\\n'); + } + + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lcanfigger", "-o", "test" + assert_match <<~EOS, shell_output("./test") + Key: Numbers, Value: list + Attribute: one + Attribute: two + Attribute: three + Attribute: four + Attribute: five + Attribute: six + Attribute: seven + EOS + end +end diff --git a/Formula/c/capnp.rb b/Formula/c/capnp.rb new file mode 100644 index 0000000000000..cf2ac2b4fbccc --- /dev/null +++ b/Formula/c/capnp.rb @@ -0,0 +1,92 @@ +class Capnp < Formula + desc "Data interchange format and capability-based RPC system" + homepage "https://capnproto.org/" + url "https://capnproto.org/capnproto-c++-1.2.0.tar.gz" + sha256 "ed00e44ecbbda5186bc78a41ba64a8dc4a861b5f8d4e822959b0144ae6fd42ef" + license "MIT" + head "https://github.com/capnproto/capnproto.git", branch: "master" + + livecheck do + url "https://capnproto.org/install.html" + regex(/href=.*?capnproto-c\+\+[._-]v?(\d+(\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "5ffb6b5fe19040d81b1f2915fce9b22d2d1da019263c6d44585bc82cb4b10001" + sha256 arm64_sequoia: "32850d9930ecb4a82632d22ba68f5dc3ee221d9b4b00e7bbcfd57fc093b0e6b9" + sha256 arm64_sonoma: "5627bf9b2d201d61d69cd4fefcbea4170bfc6c37bcdacd11f541a170191836a6" + sha256 arm64_ventura: "628e24ec584599abf82afa1f517fa92a6064a9511175f646d26fc0eded6a28f9" + sha256 sonoma: "fa74eafe82cb0fb8753552e68548a15106b9e2543263b837d6221c5962ee3a6f" + sha256 ventura: "32dcff1c319cd23a163fc233426cd57e7f7170209f9344ecc485122dad3d7631" + sha256 arm64_linux: "22fbab45d8401d46c54dd930009a3d527beced94406743a17c280466b0622e81" + sha256 x86_64_linux: "0b35a0dde079a841e258c6d364e32e6f4cd543d00e94f240ae67e0c461192576" + end + + depends_on "cmake" => :build + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + # Build shared library + system "cmake", "-S", ".", "-B", "build_shared", + "-DCMAKE_CXX_STANDARD=20", # compile coroutine support, remove with 2.0 update + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_CXX_FLAGS=-fPIC", + *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + # Build static library + system "cmake", "-S", ".", "-B", "build_static", + "-DCMAKE_CXX_STANDARD=20", # compile coroutine support, remove with 2.0 update + "-DBUILD_SHARED_LIBS=OFF", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DCMAKE_CXX_FLAGS=-fPIC", + *std_cmake_args + system "cmake", "--build", "build_static" + lib.install buildpath.glob("build_static/src/capnp/*.a") + lib.install buildpath.glob("build_static/src/kj/*.a") + end + + test do + ENV["PWD"] = testpath.to_s + + file = testpath/"test.capnp" + text = "\"Is a happy little duck\"" + + file.write shell_output("#{bin}/capnp id").chomp + ";\n" + file.append_lines "const dave :Text = #{text};" + assert_match text, shell_output("#{bin}/capnp eval #{file} dave") + + (testpath/"person.capnp").write <<~EOS + @0x8e0594c8abeb307c; + struct Person { + id @0 :UInt32; + name @1 :Text; + email @2 :Text; + } + EOS + system bin/"capnp", "compile", "-oc++", testpath/"person.capnp" + + (testpath/"test.cpp").write <<~CPP + #include "person.capnp.h" + #include + #include + #include + void printPerson(int fd) { + ::capnp::PackedFdMessageReader message(fd); + Person::Reader person = message.getRoot(); + + std::cout << person.getName().cStr() << ": " + << person.getEmail().cStr() << std::endl; + } + CPP + system ENV.cxx, "-c", testpath/"test.cpp", "-I#{include}", "-o", "test.o", "-fPIC", "-std=c++1y" + system ENV.cxx, "-shared", testpath/"test.o", "-L#{lib}", "-fPIC", "-lcapnp", "-lkj" + end +end diff --git a/Formula/c/capstone.rb b/Formula/c/capstone.rb new file mode 100644 index 0000000000000..d10a16cf8581b --- /dev/null +++ b/Formula/c/capstone.rb @@ -0,0 +1,67 @@ +class Capstone < Formula + desc "Multi-platform, multi-architecture disassembly framework" + homepage "https://www.capstone-engine.org/" + url "https://github.com/capstone-engine/capstone/archive/refs/tags/5.0.6.tar.gz" + sha256 "240ebc834c51aae41ca9215d3190cc372fd132b9c5c8aa2d5f19ca0c325e28f9" + license "BSD-3-Clause" + head "https://github.com/capstone-engine/capstone.git", branch: "next" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3d11af12bdb07cb427b9acfd92976b1aaba30d6b19e202dab45e39c2b6fd8f3f" + sha256 cellar: :any, arm64_sequoia: "eb410c79448b4cb73f7b34ad6fd733d60c493d0f884be84ec40cef075615e629" + sha256 cellar: :any, arm64_sonoma: "808aee150aa07ab56497c7f4f8ea8c5a29508e12a51e04f5fd5a10b39552dd30" + sha256 cellar: :any, arm64_ventura: "9c34130c8f13ab1d2f151ef58e821d3227aefc60eccccf2ed3e9ba21b07266d4" + sha256 cellar: :any, sonoma: "3222d61b83d900f610bdfbd2f16f42ac8d216254974e1dde6750cf3cbdfdcbff" + sha256 cellar: :any, ventura: "bfdcb8212326f01615b010f6c5bb359d97e402f5f233e9addd8da64a031e46e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "b82b12f9c6415e7e7ded2519d7bd896bd55e8a48122dc9d7d48d1f7b65ef1ffa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5c2eda3e2bb749151141b634a542346c0b8fab09e0e7bbc49e841ea7f82b8d6" + end + + on_macos do + depends_on "gettext" + end + + def install + ENV["HOMEBREW_CAPSTONE"] = "1" + ENV["PREFIX"] = prefix + system "./make.sh" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # code comes from https://www.capstone-engine.org/lang_c.html + (testpath/"test.c").write <<~C + #include + #include + #include + #define CODE "\\x55\\x48\\x8b\\x05\\xb8\\x13\\x00\\x00" + + int main() + { + csh handle; + cs_insn *insn; + size_t count; + if (cs_open(CS_ARCH_X86, CS_MODE_64, &handle) != CS_ERR_OK) + return -1; + count = cs_disasm(handle, CODE, sizeof(CODE)-1, 0x1000, 0, &insn); + if (count > 0) { + size_t j; + for (j = 0; j < count; j++) { + printf("0x%"PRIx64":\\t%s\\t\\t%s\\n", insn[j].address, insn[j].mnemonic,insn[j].op_str); + } + cs_free(insn, count); + } else + printf("ERROR: Failed to disassemble given code!\\n"); + cs_close(&handle); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcapstone", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/caracal.rb b/Formula/c/caracal.rb new file mode 100644 index 0000000000000..d7673f4ee7439 --- /dev/null +++ b/Formula/c/caracal.rb @@ -0,0 +1,45 @@ +class Caracal < Formula + desc "Static analyzer for Starknet smart contracts" + homepage "https://github.com/crytic/caracal" + url "https://github.com/crytic/caracal/archive/refs/tags/v0.2.3.tar.gz" + sha256 "70a505b46d19cc389fa11bc17bed106e15ede6b076fb1f8b350a4ccabb4e7052" + license "AGPL-3.0-only" + head "https://github.com/crytic/caracal.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "736248b14af4194e38b8d5d8103f2f649cc1293391d0ca147f1ead5529e2d3d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8b9b99080c463030eb02044b0db946992bba13ef79f693498b6f154a41d5407" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ad1176b86b6cac2c478e4728cb7212521b8875c5454f3f5775287759d4f3edd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c586d3c8ef371164a618263e0227375fb6f235a8eb0a1565613dd5f1d01228e3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4d78f933e2351cb5e1d96665d594d638db68fe7237b286570de2f4d666a0f445" + sha256 cellar: :any_skip_relocation, sonoma: "0436cb1382e79a270c8b2bfbe77cc0943c712cb42e1103ad8d80f758574e7421" + sha256 cellar: :any_skip_relocation, ventura: "b853f1410774434cbeb8d6ee8c167c116f7579fb4d568f358644499b90dfeb18" + sha256 cellar: :any_skip_relocation, monterey: "d618e73c6a168a00114eba5d298212c0ba54b443cde9747eb9913e7236c23701" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcf41d78db1a48f3bf7ac67137292caa0ebaa23f153fe85c1e4b899b5b7cafa5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2409f8e727bd6d09a351013a764c7584f7bb4efafe549d4c5df7572f7d839d1f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + # sample test contracts + pkgshare.install "tests/detectors" + end + + test do + resource "corelib" do + url "https://github.com/starkware-libs/cairo/archive/refs/tags/v2.5.0.tar.gz" + sha256 "0c21b58bc7ae2e8a6d47acedc4d20f30a41957deb6e24f8adaf31183112f8a4d" + end + + resource("corelib").stage do + assert_match("controlled-library-call Impact: High Confidence: Medium", + shell_output("#{bin}/caracal detect #{pkgshare}/detectors/controlled_library_call.cairo " \ + "--corelib corelib/src/")) + end + end +end diff --git a/Formula/c/carapace.rb b/Formula/c/carapace.rb new file mode 100644 index 0000000000000..4eb5050966a34 --- /dev/null +++ b/Formula/c/carapace.rb @@ -0,0 +1,37 @@ +class Carapace < Formula + desc "Multi-shell multi-command argument completer" + homepage "https://carapace.sh" + url "https://github.com/carapace-sh/carapace-bin/archive/refs/tags/v1.5.4.tar.gz" + sha256 "e4e3119555fc846f3b69e4ca0f0364681840ea91058377f64aec7f98f9f12b34" + license "MIT" + head "https://github.com/carapace-sh/carapace-bin.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9c90f638c23b938830a050bbc2b6faa3d9aaf160ef24c4e0039310ae897d7830" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c90f638c23b938830a050bbc2b6faa3d9aaf160ef24c4e0039310ae897d7830" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c90f638c23b938830a050bbc2b6faa3d9aaf160ef24c4e0039310ae897d7830" + sha256 cellar: :any_skip_relocation, sonoma: "01d71d466dce8b39dbf16f64b89a34c2ac77c07c9a0a56489ee4645e0e5352c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6065367cbab1e8ffb423f92141c27e2e24d011b924840932c5d402a6dfd2d5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdaf47f1e4065632ce8af7ff634acee78004a8e3060d61adb7fec36d54eef360" + end + + depends_on "go" => :build + + def install + system "go", "generate", "./..." + ldflags = %W[ + -s -w + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:, tags: "release"), "./cmd/carapace" + + generate_completions_from_executable(bin/"carapace", "carapace") + end + + test do + assert_match version.to_s, shell_output("#{bin}/carapace --version 2>&1") + + system bin/"carapace", "--list" + system bin/"carapace", "--macro", "color.HexColors" + end +end diff --git a/Formula/c/cargo-about.rb b/Formula/c/cargo-about.rb new file mode 100644 index 0000000000000..661c2f1f3a5d5 --- /dev/null +++ b/Formula/c/cargo-about.rb @@ -0,0 +1,65 @@ +class CargoAbout < Formula + desc "Cargo plugin to generate list of all licenses for a crate" + homepage "https://github.com/EmbarkStudios/cargo-about" + url "https://github.com/EmbarkStudios/cargo-about/archive/refs/tags/0.8.2.tar.gz" + sha256 "f12d67fb4ed585ee3406e73eebb9c5f11823fd9f00627e407e74636789201d93" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/EmbarkStudios/cargo-about.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "14c332e8774f2e64e3dfd5aff4b677bdbffdb92a85f83552a36f57994f309588" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "55391deb209a919b0b3d6d24fff3344311bfd83c25f9e8e810cc2d415e53ea39" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "31158d1e2b49c9a50b4d77773ddbb688e34497e16c836cec11d7e40b732078f2" + sha256 cellar: :any_skip_relocation, sonoma: "0c2138a463c16380d34ce4d413a69e64df915d17efabb96389db907a2c2dd9b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5fbea296a1ae531cf4963f7ebb7ffe910981ce9f7b3df5974a734770a54609c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f6b7aa9a67adafd9f23da6146c74e5a22505bb165201ac849620bd944263f77" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + #[cfg(test)] + mod tests { + #[test] + fn test_it() { + assert_eq!(1 + 1, 2); + } + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + system bin/"cargo-about", "init" + assert_path_exists crate/"about.hbs" + + expected = <<~EOS + accepted = [ + "Apache-2.0", + "MIT", + ] + EOS + assert_equal expected, (crate/"about.toml").read + + output = shell_output("cargo about generate about.hbs") + assert_match "The above copyright notice and this permission notice", output + end + end +end diff --git a/Formula/c/cargo-all-features.rb b/Formula/c/cargo-all-features.rb new file mode 100644 index 0000000000000..1d6fa6b0451df --- /dev/null +++ b/Formula/c/cargo-all-features.rb @@ -0,0 +1,53 @@ +class CargoAllFeatures < Formula + desc "Cargo subcommands to build and test all feature flag combinations" + homepage "https://github.com/frewsxcv/cargo-all-features" + url "https://github.com/frewsxcv/cargo-all-features/archive/refs/tags/1.11.0.tar.gz" + sha256 "feddbd6a0d517e1813f51080a828a17841a2606c97c61be69b693c2fd1f5c30f" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/frewsxcv/cargo-all-features.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0d3cdd51661611f40f1d134e81810db8433a5a95fbbe13b567207d824279bb3b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0860aeb28cb90d8fe0b7fa368874ec7b4c382e0c9efb876c96d9f98c7b952bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9222951548258bb15a5c8627dbc09cd1e68b6e67a126c83d2e67a56ac1f2c912" + sha256 cellar: :any_skip_relocation, sonoma: "1ef859885303a5874fdda2dfc755c2b9fc75c2f096fb849f9d1b7abc1fbbd398" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ff2741da51727362a55ebca9ce66f6e3149488823e95361a4fef9c6abf54671" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfc7d5343f81c3efc965ef1910cfb8db224fea2d6b6c275dc9cbb71887f146ca" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + output = shell_output("cargo build-all-features") + assert_match "Running build crate=demo-crate features=[]", output + + output = shell_output("#{bin}/cargo-build-all-features --version") + assert_match "cargo-all-features #{version}", output + end + end +end diff --git a/Formula/c/cargo-audit.rb b/Formula/c/cargo-audit.rb new file mode 100644 index 0000000000000..266f18090ea3e --- /dev/null +++ b/Formula/c/cargo-audit.rb @@ -0,0 +1,46 @@ +class CargoAudit < Formula + desc "Audit Cargo.lock files for crates with security vulnerabilities" + homepage "https://rustsec.org/" + url "https://github.com/rustsec/rustsec/archive/refs/tags/cargo-audit/v0.21.2.tar.gz" + sha256 "caf8914af7f95ebb45590c95b5f9bfd71bd6f9f57c1ffcf69dc9d20f0430e578" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rustsec/rustsec.git", branch: "main" + + livecheck do + url :stable + regex(%r{^cargo-audit/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d16272e14487b35adfe88a9f7e60d21a6af8c2573b1d4566d9ab31ff11e4963" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37d7c8d731b959de676423b00493e59db64e57917bb0dc68d07179f2dd056f30" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4531b5306ab7477d604aa5eb69f29f1f78a55af839395781efa6ff299e08e7bc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "77555fa8e19f69321177e152579c220f879b9cd6b4f03030b9641fc593c230d2" + sha256 cellar: :any_skip_relocation, sonoma: "98ad36681ebb7db57784efcb950cd2905607770706f8b28c5b37c7821a29a500" + sha256 cellar: :any_skip_relocation, ventura: "afbfc3c37db364702cef9ca24de5e540e92e4c7ca63b04868f8cbc27a3a57337" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6291c84ef0972f444e797f761691f982502514ed9b25bf2dc34b2da82fed41f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4e7fd69c4d6cfc594f2a5285da7ed6ef174360ebeb0c8f232711617cbd50430" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args(path: "cargo-audit") + # test cargo-audit + pkgshare.install "cargo-audit/tests/support/base64_vuln" + end + + test do + output = shell_output("#{bin}/cargo-audit audit 2>&1", 2) + assert_path_exists HOMEBREW_CACHE/"cargo_cache/advisory-db" + assert_match "not found: Couldn't load Cargo.lock", output + + cp_r "#{pkgshare}/base64_vuln/.", testpath + assert_match "error: 1 vulnerability found!", shell_output("#{bin}/cargo-audit audit 2>&1", 1) + end +end diff --git a/Formula/c/cargo-auditable.rb b/Formula/c/cargo-auditable.rb new file mode 100644 index 0000000000000..6368e7a037248 --- /dev/null +++ b/Formula/c/cargo-auditable.rb @@ -0,0 +1,53 @@ +class CargoAuditable < Formula + desc "Make production Rust binaries auditable" + homepage "https://github.com/rust-secure-code/cargo-auditable" + url "https://github.com/rust-secure-code/cargo-auditable/archive/refs/tags/v0.7.1.tar.gz" + sha256 "e79d1daba3d9a6fc37193d67c9442bd8f90c228c27ead1f21fb6e51630917527" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rust-secure-code/cargo-auditable.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6ee1836e82bb023d377db57dc9d21c179beba39082e46f0abafbfe990c315fa8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3547558fd4a318feec42de8b7a39ea9fa75b95c6412f9ec5d48971a45bfe10e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29f7d6a08fc37bd514eb5d35954039fba284e67e15b9232ab4436596e4137795" + sha256 cellar: :any_skip_relocation, sonoma: "fb6a25176afcab86858046b11c8b8d50901cef1d3613c8573b1e94d32c9f5328" + sha256 cellar: :any_skip_relocation, arm64_linux: "10ca1603087a6db7314fda075f5955938e374ac0b4f6e3d6be66b9cf08bc2301" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb706e68ee793f24ea68f47d9ad3a5c407abe28146cc44d5ab95612d52c8da88" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args(path: "cargo-auditable") + man1.install "cargo-auditable/cargo-auditable.1" + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + system "cargo", "auditable", "build", "--release" + assert_path_exists crate/"target/release/demo-crate" + output = shell_output("./target/release/demo-crate") + assert_match "Hello BrewTestBot!", output + end + end +end diff --git a/Formula/c/cargo-binstall.rb b/Formula/c/cargo-binstall.rb new file mode 100644 index 0000000000000..29908c442b647 --- /dev/null +++ b/Formula/c/cargo-binstall.rb @@ -0,0 +1,40 @@ +class CargoBinstall < Formula + desc "Binary installation for rust projects" + homepage "https://github.com/cargo-bins/cargo-binstall" + url "https://github.com/cargo-bins/cargo-binstall/archive/refs/tags/v1.15.10.tar.gz" + sha256 "b34423a2cd3dc6a5d39ea70f12083789fdc658e3159d7c75bc90d77c549e5ce2" + license "GPL-3.0-only" + head "https://github.com/cargo-bins/cargo-binstall.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d15f78305033a248f5ce615fe627a2311f53f04cbaaf7962c1d5c95c568d4896" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "40b426bab8d05e1c0e38d50c2f7da17c188bbf1ec0d3ea67890f3ac6eb6e4ff1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b28a7ffd5b6d00ac3ad0dacfffc76e116cbab9cb87a8485c13405ca4d3a91bd" + sha256 cellar: :any_skip_relocation, sonoma: "f88ee1f55897c6de65fa59ca77ecec99f10cb7ccb4e7a19f2e82e557137cd2b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "51926208e114772d88d8101ceddb4d5acfa034098180a35b4574cf9f689e3381" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b99edbea09fb0315438cf38f7148f600bac5a1142749577db5d45e63ed7f8b7e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/bin") + end + + test do + ENV["BINSTALL_DISABLE_TELEMETRY"] = "true" + + output = shell_output("#{bin}/cargo-binstall --dry-run radio-sx128x") + assert_match "resolve: Resolving package: 'radio-sx128x'", output + + assert_equal version.to_s, shell_output("#{bin}/cargo-binstall -V").chomp + end +end diff --git a/Formula/c/cargo-binutils.rb b/Formula/c/cargo-binutils.rb new file mode 100644 index 0000000000000..0dc4a6ea07c80 --- /dev/null +++ b/Formula/c/cargo-binutils.rb @@ -0,0 +1,70 @@ +class CargoBinutils < Formula + desc "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain" + homepage "https://github.com/rust-embedded/cargo-binutils" + # missing github tag, use crate url instead + # upstream issue, https://github.com/rust-embedded/cargo-binutils/issues/163 + url "https://static.crates.io/crates/cargo-binutils/cargo-binutils-0.4.0.crate" + sha256 "1656b16634e00e0b9f55bebc83f2c6f021cead99cb08aec52a7b9395563674b8" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rust-embedded/cargo-binutils.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1462ea07e63a12bca4c626cb452706ea56780f777a580ba4080c87978b661af8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e345e71200c674756c1c5052eb06d5c5476ab91b0446b2f53fb4d21329e86f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0cfeba9cff1b593ea7a254f326889dc486aafac59023839634e961136c19bb60" + sha256 cellar: :any_skip_relocation, sonoma: "5abc3d0339e2790b66b6a2fbc35efc00b80b6738194e16306174debe08b02a9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "18d798e56c93c493b1902da4a8e741093f1cd6dff28ed0ac50ef6c4da439fe52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f02d15c4bedcd6f632dc69a1d2edfd39d8bd8e4388240e0d7e2823aa0fc88d3f" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + system "rustup", "component", "add", "llvm-tools-preview" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + edition = "2021" + license = "MIT" + + [profile.release] + debug = true + TOML + + expected = if OS.mac? + "__TEXT\t__DATA\t__OBJC\tothers\tdec\thex" + else + "text\t data\t bss\t dec\t hex" + end + assert_match expected, shell_output("cargo size --release") + + expected = if OS.mac? + "T _main" + else + "T main" + end + assert_match expected, shell_output("cargo nm --release") + end + end +end diff --git a/Formula/c/cargo-bloat.rb b/Formula/c/cargo-bloat.rb new file mode 100644 index 0000000000000..db204212fdfa9 --- /dev/null +++ b/Formula/c/cargo-bloat.rb @@ -0,0 +1,44 @@ +class CargoBloat < Formula + desc "Find out what takes most of the space in your executable" + homepage "https://github.com/RazrFalcon/cargo-bloat" + url "https://github.com/RazrFalcon/cargo-bloat/archive/refs/tags/v0.12.1.tar.gz" + sha256 "8195cebb94a740cd3b89611ae79d7d3e2d8fd8ec297f5a0f07efa7069ef05be7" + license "MIT" + head "https://github.com/RazrFalcon/cargo-bloat.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6333af27c70bd55ebf0d441657e9f2072171c3227cad67d63ddfb71e55b2b9eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "330a8ee78cfb647dd2d262e2a9e61bf5147e1329082864f71ab2162ad7a54c88" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9caa51f467a8ff4272b885a45091bd018e2defd629aa70d1a58686553ea9545" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9e785499e4d1ca0ea95076b21ec4f73098c5a2e7af38f9cd804465786f1745a1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d6cb18085aca63f0c6730d86532d74276a598d5587f7bd4cf64f6352593bb16b" + sha256 cellar: :any_skip_relocation, sonoma: "f643448f04a72a456a13efb160fe1470144128d55c7e3d7f44fe8c6a1027ec2b" + sha256 cellar: :any_skip_relocation, ventura: "d0de5a94dec7e213075d86b9bb4ac9c206c7308fcf34b75388477ca58825e189" + sha256 cellar: :any_skip_relocation, monterey: "a374eabb4b4da3740c97abcf9e2f4a030a21d3ac6c3ff503269d4a153086a00a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad9f82b783d911c4dd1396d2c81e785afa04fe18b5ceb48d6eb5dae823ea0fd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c271533c6e4ff7415d51ccb2fcbee8e514e0ec2142a48543a5c8dd705ac9e4a" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "new", "hello_world", "--bin" + cd "hello_world" do + output = shell_output("#{bin}/cargo-bloat --release -n 10 2>&1", 1) + assert_match "Error: can be run only via `cargo bloat`", output + output = shell_output("cargo bloat --release -n 10 2>&1") + assert_match "Analyzing target/release/hello_world", output + end + end +end diff --git a/Formula/c/cargo-bundle.rb b/Formula/c/cargo-bundle.rb new file mode 100644 index 0000000000000..0c0e6f5cb36b6 --- /dev/null +++ b/Formula/c/cargo-bundle.rb @@ -0,0 +1,75 @@ +class CargoBundle < Formula + desc "Wrap rust executables in OS-specific app bundles" + homepage "https://github.com/burtonageo/cargo-bundle" + url "https://github.com/burtonageo/cargo-bundle/archive/refs/tags/v0.9.0.tar.gz" + sha256 "8777ddbfaadf4def5f261d37c3b0b04a6ee27cdbd4e18569827ad0dee7e35b34" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/burtonageo/cargo-bundle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4314c3eafa5f0f536d922ddfb69008be6c35a47193f1a9eb224d8f0fad787c28" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3dfb4e342067506ec34a71e1c078145b8928dff18322a00ac9f831b7590a1722" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ef15f006adb11984837907dff71478d2cf0cac5069ad66e86e5f6576fa27d25" + sha256 cellar: :any_skip_relocation, sonoma: "6a18a9459c1c400d12e5ee3c4f151bac8c933c123434bed9db7d5bf98d44b5f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd9635077c69ed673b0eb30fc744faea59571b0778aaeffb2a3aec9bc95ac5f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d1a6bb6315ed444543895c018728a36dd13ac589bdd38a33feb0778f9eda2bb" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + on_linux do + depends_on "squashfs" => :test + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + # `cargo-bundle` does not like `TERM=dumb`. + # https://github.com/burtonageo/cargo-bundle/issues/118 + ENV["TERM"] = "xterm" + + testproject = "homebrew_test" + system "cargo", "new", testproject, "--bin" + cd testproject do + open("Cargo.toml", "w") do |toml| + toml.write <<~TOML + [package] + name = "#{testproject}" + version = "#{version}" + edition = "2021" + description = "Test Project" + + [package.metadata.bundle] + name = "#{testproject}" + identifier = "test.brew" + TOML + end + system "cargo", "bundle", "--release" + end + + bundle_subdir = if OS.mac? + "osx/#{testproject}.app" + else + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch + "deb/#{testproject}_#{version}_#{arch}.deb" + end + bundle_path = testpath/testproject/"target/release/bundle"/bundle_subdir + assert_path_exists bundle_path + return if OS.linux? # The test below has no equivalent on Linux. + + cargo_built_bin = testpath/testproject/"target/release"/testproject + cargo_bundled_bin = bundle_path/"Contents/MacOS"/testproject + assert_equal shell_output(cargo_built_bin), shell_output(cargo_bundled_bin) + end +end diff --git a/Formula/c/cargo-c.rb b/Formula/c/cargo-c.rb new file mode 100644 index 0000000000000..2c50c7dee5bab --- /dev/null +++ b/Formula/c/cargo-c.rb @@ -0,0 +1,61 @@ +class CargoC < Formula + desc "Helper program to build and install c-like libraries" + homepage "https://github.com/lu-zero/cargo-c" + url "https://github.com/lu-zero/cargo-c/archive/refs/tags/v0.10.18.tar.gz" + sha256 "0f2b699be7ad5cac05624701065ae521c7f6b8159bdbcb8103445fc2440d1a7e" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b1949b951da003b42de263c8170c825f9aefd44772af0ae956c57d80d3159f9" + sha256 cellar: :any, arm64_sequoia: "6794c0c0a72eefaeed40ce4c03e53d68836a95e6a91c527ff7c4457b3d73bd20" + sha256 cellar: :any, arm64_sonoma: "a88a4bb9e31fa64875e68d5baace6548ad6b553da41d8790e684b12fb1ada6a4" + sha256 cellar: :any, sonoma: "ee834e8d29c526dddbf7a0c12f101f892de9018e1d87461a1c51e89d658f0e1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c73b5c8b73687c41823fc7d91f3a56c828847262eba570661529f2db9e88fd8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e5780a504a0a80cf05c761ba78dd7233cbeb767e46d346620b04bc404a022ec" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + # curl-config on ventura builds do not report http2 feature, + # this is a workaround to allow to build against system curl + # see discussions in https://github.com/Homebrew/homebrew-core/pull/197727 + uses_from_macos "curl", since: :sonoma + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + # Ensure the correct `openssl` will be picked up. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + require "utils/linkage" + + cargo_error = "could not find `Cargo.toml`" + assert_match cargo_error, shell_output("#{bin}/cargo-cinstall cinstall 2>&1", 1) + assert_match cargo_error, shell_output("#{bin}/cargo-cbuild cbuild 2>&1", 1) + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-cbuild", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-cache.rb b/Formula/c/cargo-cache.rb new file mode 100644 index 0000000000000..123af201b65cb --- /dev/null +++ b/Formula/c/cargo-cache.rb @@ -0,0 +1,41 @@ +class CargoCache < Formula + desc "Display information on the cargo cache, plus optional cache pruning" + homepage "https://github.com/matthiaskrgr/cargo-cache" + url "https://github.com/matthiaskrgr/cargo-cache/archive/refs/tags/0.8.3.tar.gz" + sha256 "d0f71214d17657a27e26aef6acf491bc9e760432a9bc15f2571338fcc24800e4" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/matthiaskrgr/cargo-cache.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d569689e087953be570cbdb6dd283cdd09dd2242b864f1a3123e58353b3c39f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a88dd6bebd24182cbafb2adb0e6ee8cf348fdeb9e95111f0850725469a982136" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0eb3f619312917ccefece5cc1ea0711fc1d85f373122cca5b36970449317dddb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "00a91483c1c50bb2e583c1e5ab9a41898b6b8b435b2d3ac61bfc736c49797871" + sha256 cellar: :any_skip_relocation, sonoma: "54dcccbf025bbd1cf5b018742d3b14c919e47c3777a16934b32e49b02c7dac0b" + sha256 cellar: :any_skip_relocation, ventura: "859498190a594da4d6f10908b807b524638bf398f9b029da99500da6efe6429f" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ac3792893742e3bceaeaaa7aa28e36ff5de0e33a8a7e7abaa58d9fcf26230b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13787d990ce59471ceafc5846c2e2262453a91f5c2c121bad2a903af3d523796" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + output = shell_output(bin/"cargo-cache") + assert_match "0 installed binaries:", output + + assert_match version.to_s, shell_output("#{bin}/cargo-cache --version") + end +end diff --git a/Formula/c/cargo-careful.rb b/Formula/c/cargo-careful.rb new file mode 100644 index 0000000000000..18f9faf50f8c0 --- /dev/null +++ b/Formula/c/cargo-careful.rb @@ -0,0 +1,53 @@ +class CargoCareful < Formula + desc "Execute Rust code carefully, with extra checking along the way" + homepage "https://github.com/RalfJung/cargo-careful" + url "https://github.com/RalfJung/cargo-careful/archive/refs/tags/v0.4.8.tar.gz" + sha256 "fa822e2a0eec050af6c3ee59db02b896a66339594fa0e6f67dff532bb5bdc2fb" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/RalfJung/cargo-careful.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9233648b8da8a05412c84988f8185b630b002b7aeaa651d23fac2766bb5ca99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "23da051d8481eb4cbc975893d583d5a132185535f5551af82d683149b39cbde8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c235430e7f6b46d9786ae2211498e53741f710b2cafb30202e0ca0e924af7f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a7220ca95fb1ccb4ee0eb90f0837224b6c8eecf72ebe8dbcd3db5aad96098769" + sha256 cellar: :any_skip_relocation, sonoma: "70279ff00ffb65a2fbbb70151a3c316ec18e484dc455848467eedfb086d0336a" + sha256 cellar: :any_skip_relocation, ventura: "527c1522e7c2a0b65b8c19b966ff2eb0c3915840e14f8fe67cc709bcb32dc092" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0fbedac308d44d4efae6be65fc20159034df1954954c204111a01f0c1090d55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "642e2323e43bd6180710fd6f8aff52668f7a9ff781cf43f412bc5a58d64a1493" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + # Switch the default toolchain to nightly + system "rustup", "default", "nightly" + system "rustup", "set", "profile", "minimal" + system "rustup", "toolchain", "install", "nightly" + + (testpath/"src/main.rs").write <<~RUST + fn main() { + println!("Hello, world!"); + } + RUST + + (testpath/"Cargo.toml").write <<~TOML + [package] + name = "test-careful" + version = "0.1.0" + edition = "2021" + TOML + + system "cargo", "careful", "setup" + output = shell_output("cargo careful run") + assert_match "Hello, world!", output + end +end diff --git a/Formula/c/cargo-chef.rb b/Formula/c/cargo-chef.rb new file mode 100644 index 0000000000000..f1873520b5156 --- /dev/null +++ b/Formula/c/cargo-chef.rb @@ -0,0 +1,50 @@ +class CargoChef < Formula + desc "Cargo subcommand to speed up Rust Docker builds using Docker layer caching" + homepage "https://github.com/LukeMathWalker/cargo-chef" + url "https://github.com/LukeMathWalker/cargo-chef/archive/refs/tags/v0.1.73.tar.gz" + sha256 "7222b8b142b1f8a703f728c57faa62723b94767609b94223b736dfb0a192bbf9" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "08f570a5f9be5ac6e1438f4644dd9a389806b3e085ed812f62e603821d19dfc7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4358c4b2aeda9847b6c9e7d363616b6f296e973f84a1631948bbdc5ae28b5b03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5853f05d970b3e763e8edc305bffeeb648b1896fc88f46290fd1749c6da5062" + sha256 cellar: :any_skip_relocation, sonoma: "d7faa6f2f7ddee3436e5dadf804a4e6bb9f445ef33e9749b466114c685728798" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdc6e020bd6fafa627c01e14bcdbc36e08c7f3a17e62ff0601599655c968a307" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddcedd44100687d036260c46c0ba1ce9cbcd2c8a78d58ec1f60f6ab13d7d371e" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + (testpath/"Cargo.toml").write <<~TOML + [package] + name = "test_project" + version = "0.1.0" + edition = "2021" + TOML + + (testpath/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + + recipe_file = testpath/"recipe.json" + system bin/"cargo-chef", "chef", "prepare", "--recipe-path", recipe_file + assert_equal "Cargo.toml", JSON.parse(recipe_file.read)["skeleton"]["manifests"].first["relative_path"] + + assert_match "cargo-chef #{version}", shell_output("#{bin}/cargo-chef --version") + end +end diff --git a/Formula/c/cargo-clone.rb b/Formula/c/cargo-clone.rb new file mode 100644 index 0000000000000..a38b37f3188ca --- /dev/null +++ b/Formula/c/cargo-clone.rb @@ -0,0 +1,60 @@ +class CargoClone < Formula + desc "Cargo subcommand to fetch the source code of a Rust crate" + homepage "https://github.com/JanLikar/cargo-clone" + url "https://github.com/JanLikar/cargo-clone/archive/refs/tags/v1.2.4.tar.gz" + sha256 "58e86bd3440fc103572f6d8ff20ff1f99cf1e676cddb29975f204a9cb03f5b14" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/JanLikar/cargo-clone.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "676a220d3866238b221ede7cb1f9c6438843f77bc42e72357100b7524cdc6356" + sha256 cellar: :any, arm64_sequoia: "2ab584f9881aca397d0e8c2394281c9e372f9b77d8d99a7083b07207481d714a" + sha256 cellar: :any, arm64_sonoma: "7c899b4b1b143b9ec6973238b0f5133f6906dd945490751fe99bafa2acd1b496" + sha256 cellar: :any, arm64_ventura: "59a6cb1abb30e784f1725baae6dec12ab0e70dfe55feb9a5102e6aa771d08e1b" + sha256 cellar: :any, sonoma: "63fba34768f4c2a2c0d4ccc9dad2aa04932d6245028fc0fc5c59b0e3f9289c8f" + sha256 cellar: :any, ventura: "72052760b11c391fc5ad31c4bd8d3b3e05c2ab29e56802d6972942d909e72f20" + sha256 cellar: :any_skip_relocation, arm64_linux: "29cfd15121f91f34191bc8769ccc3dd927f153b6112d529557be54095909db05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9fbc19a7007107a7c769ba8d8bc06dbe960fc7e38d9ac2096b99f8cf8e58489" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "cargo-clone") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "default", "beta" + system "rustup", "set", "profile", "minimal" + + require "utils/linkage" + + system "cargo", "clone", "clone", "git2" + assert_path_exists "git2/Cargo.lock" + + dylibs = [ + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + ] + dylibs << (Formula["curl"].opt_lib/shared_library("libcurl")) if OS.linux? + + dylibs.each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-clone", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-component.rb b/Formula/c/cargo-component.rb new file mode 100644 index 0000000000000..365368ed1682a --- /dev/null +++ b/Formula/c/cargo-component.rb @@ -0,0 +1,37 @@ +class CargoComponent < Formula + desc "Create WebAssembly components based on the component model proposal" + homepage "https://github.com/bytecodealliance/cargo-component" + url "https://github.com/bytecodealliance/cargo-component/archive/refs/tags/v0.21.1.tar.gz" + sha256 "04ded8443b34687641d0bf01fa682ce46c1a9300af3f13ea5cf1bf5487d6f8b1" + license "Apache-2.0" + head "https://github.com/bytecodealliance/cargo-component.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3497716750d824a4bdf9a76887a0bf65d91f2e3cdea5cee1e61db5eeafb0dff1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "365e0a9252cbc901b8fc5b7185c36856710c2b6f2c61d5be3f4e2e7fad810644" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c25f9379640918aacf3a212b2c179de5c95e13036b1101bfb38447d3b5c8807f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8019d3e73441d400669124df50da4f6a201de87cee09a6a7192da9b5f46b24d3" + sha256 cellar: :any_skip_relocation, sonoma: "4004c115656b6d5d315e44b71d107bfd34653691c4b7fd033ccaabe8f9672542" + sha256 cellar: :any_skip_relocation, ventura: "498e8317e9c2a8dc95fae4fbcf42d4e35a2e9c238b8b204f3647e909d96771e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f75abc0af44a9a0dba2987bbc1abf62c6279b4422d6988de72e564937520436" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9294cc2f428022db86233513bf8f3712a0c3beaf4f16985aaf81199f82a1d19a" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "component", "new", "--lib", "brew-test" + assert_path_exists testpath/"brew-test/wit/world.wit" + end +end diff --git a/Formula/c/cargo-crev.rb b/Formula/c/cargo-crev.rb new file mode 100644 index 0000000000000..1fa1747491323 --- /dev/null +++ b/Formula/c/cargo-crev.rb @@ -0,0 +1,55 @@ +class CargoCrev < Formula + desc "Code review system for the cargo package manager" + homepage "https://github.com/crev-dev/cargo-crev" + url "https://github.com/crev-dev/cargo-crev/archive/refs/tags/v0.26.5.tar.gz" + sha256 "9bf1ec351c15243c598db86b8edc292fb36b9deb8c4e94dd5506abf3edd5a41a" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0c2058bf99742c715b0715ec0c960c94aca85b3bafaa122669c43eea9420515a" + sha256 cellar: :any, arm64_sequoia: "42cb4daca9c8d0ba31bf64d356570a0f8cfaeb29d0d49ba0bfc589edc5e2f97d" + sha256 cellar: :any, arm64_sonoma: "ff054705742a50eee0d2a398b38bc2878df9416e4794b3d918ded10b1fe3164a" + sha256 cellar: :any, arm64_ventura: "3da7ac06e686b48d9bd8f5dae16a3e0a73a0ec5f7ab1400598a83b03a7ee5800" + sha256 cellar: :any, sonoma: "b02ac8662057a7042863e0ecd62a066c4f2bad9497f3761323b63b3fd46664e5" + sha256 cellar: :any, ventura: "daa86a9f52d84f32cd2f88daefbc642c1d1fbf5926027f292f30a794c967d8eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "67ada93a107cf7b62feb2a4e7c18dfc667c2f37e7e65fcd377b4844d61a3d44d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29aea144a97853f74044bcb0b34d684ca20719eb25bf5325731ef19b7a75ed55" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + system "cargo", "install", "--no-default-features", *std_cargo_args(path: "./cargo-crev") + end + + test do + require "utils/linkage" + + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "crev", "config", "dir" + + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-crev", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-cyclonedx.rb b/Formula/c/cargo-cyclonedx.rb new file mode 100644 index 0000000000000..b0dcb71aad374 --- /dev/null +++ b/Formula/c/cargo-cyclonedx.rb @@ -0,0 +1,57 @@ +class CargoCyclonedx < Formula + desc "Creates CycloneDX Software Bill of Materials (SBOM) from Rust (Cargo) projects" + homepage "https://cyclonedx.org/" + url "https://github.com/CycloneDX/cyclonedx-rust-cargo/archive/refs/tags/cargo-cyclonedx-0.5.7.tar.gz" + sha256 "3ac7058fba657f8cfd56c6e1cfb47ad024fa76070a6286ecf26a16f0d88e3ce2" + license "Apache-2.0" + head "https://github.com/CycloneDX/cyclonedx-rust-cargo.git", branch: "main" + + livecheck do + url :stable + regex(/^cargo-cyclonedx[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68b837ec5f02542da6437fa257ea5be3b4d673c476a153aae8a7abf10fa2e664" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0929e7f65dd40618265f765e8018119e9b782336f723cdcab119a3e424264edd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "783adfef5d79bf8f14dc6f3f667a3188c390fc58e58765fe129ef4b566e1b0f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16cf33f5551919b50f72a9e1908a8acc903340ffa0807d07129bf8dda445d64b" + sha256 cellar: :any_skip_relocation, sonoma: "994e07617590f95137b4263cbe94e447f206a29e8407990f3aa61dadc001bde5" + sha256 cellar: :any_skip_relocation, ventura: "7eeb9c86c8531c6d8db94687704e5ddba41fb66b925ddff16242d6a79f92cc1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb031e5cd29ab00b10ed9979a9483256da08b39350505fc935221814ce743bdf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f69b0e972207579b8a06176252815648a3b6b33c43a468f66c919118bd72462a" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args(path: "cargo-cyclonedx") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + (testpath/"Cargo.toml").write <<~TOML + [package] + name = "test-project" + version = "0.1.0" + edition = "2021" + TOML + + (testpath/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + + system "cargo", "cyclonedx", "--format", "json", "--override-filename", "brewtest-bom" + assert_equal "CycloneDX", JSON.parse((testpath/"brewtest-bom.json").read)["bomFormat"] + + assert_match version.to_s, shell_output("cargo cyclonedx --version") + end +end diff --git a/Formula/c/cargo-deny.rb b/Formula/c/cargo-deny.rb new file mode 100644 index 0000000000000..8d7ee84fc5de1 --- /dev/null +++ b/Formula/c/cargo-deny.rb @@ -0,0 +1,54 @@ +class CargoDeny < Formula + desc "Cargo plugin for linting your dependencies" + homepage "https://github.com/EmbarkStudios/cargo-deny" + url "https://github.com/EmbarkStudios/cargo-deny/archive/refs/tags/0.18.5.tar.gz" + sha256 "d04cb7b0b9f75c483dc37d72970a8c759674d1a7b882aaae2c56a60fe18361ab" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/EmbarkStudios/cargo-deny.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a2ed484f08e2e6e3d93bc254f594ba0d7f1c88f6dc130bc4e2b3cabc6645c6c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "61bb9e6d331c959bd86cdb52705de6d7fb156263c2a61ca6450c7dbe4d454295" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1e3b675a931ce1082f02858cc9135e1a3f2d404725f54e2c0f554fc311a5129" + sha256 cellar: :any_skip_relocation, sonoma: "b5761a9c2b5d7801012768c43ca4e92aa9708400f93689d4121e6ac6130a6a35" + sha256 cellar: :any_skip_relocation, arm64_linux: "9dc21fd604fb064961dd751a4fd90f913e1198a65625525faf2dfd2c126a73b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0a9c2581c24de7fb54c4fe42d731a08c77b0d77e4121d83d5cbbb6377b1052e" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + #[cfg(test)] + mod tests { + #[test] + fn test_it() { + assert_eq!(1 + 1, 2); + } + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + TOML + + output = shell_output("cargo deny check 2>&1", 4) + assert_match "advisories ok, bans ok, licenses FAILED, sources ok", output + end + end +end diff --git a/Formula/c/cargo-depgraph.rb b/Formula/c/cargo-depgraph.rb new file mode 100644 index 0000000000000..2a9d5f4bf8a99 --- /dev/null +++ b/Formula/c/cargo-depgraph.rb @@ -0,0 +1,63 @@ +class CargoDepgraph < Formula + desc "Creates dependency graphs for cargo projects" + homepage "https://sr.ht/~jplatte/cargo-depgraph/" + url "https://git.sr.ht/~jplatte/cargo-depgraph/archive/v1.6.0.tar.gz" + sha256 "79f7425bc37c59fc4b083bdc35f43d29c2078b427ec6bb30565a4c04841ce364" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cd2394a3c3307df33e7845282787041cc43c4a0d3ba648c8a8f440c1b4e90ba0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd0ef62d3b9309511017388b14d90f770ef95ff5e37c789a36702692885cb051" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "060ce6579e0acf883ca67a613d5f33375205e56afa48a28876d81d9d653d275e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "694d37c938b1aea59687cda71bea7a8fba0656b191b716a3e8d58a71c2fec02f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "12ed5d4719fecb87d5a71f1bb8f82d574c3b5ba77d990430874aa49a33b9cdae" + sha256 cellar: :any_skip_relocation, sonoma: "b1f53651402919895849ba1d0a98940b941a1b35acbb75c1f8371ebdff55e8c7" + sha256 cellar: :any_skip_relocation, ventura: "2e44d01ca28d59eb203a1cc88f7f5037d755438880164a4c918062e453ed9898" + sha256 cellar: :any_skip_relocation, monterey: "8e01617fefdb9893ecf0ab91f8568ca65657e49aee84f48afd47957c8d7bd223" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b47a142d6c74f5cc74ae9e6614cb91d9b31d6a00f3167407293af2d386efff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df3185c78ab12934b6ebf2d15a4bbf0eb110774fbae01d4e10a2133ac8ba0039" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write "// Dummy file" + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + + [dependencies] + rustc-std-workspace-core = "1.0.0" # explicitly empty crate for testing + TOML + expected = <<~EOS + digraph { + 0 [ label = "demo-crate" shape = box] + 1 [ label = "rustc-std-workspace-core" ] + 0 -> 1 [ ] + } + + EOS + output = shell_output("#{bin}/cargo-depgraph depgraph") + assert_equal expected, output + end + end +end diff --git a/Formula/c/cargo-deps.rb b/Formula/c/cargo-deps.rb new file mode 100644 index 0000000000000..b744889b6ad22 --- /dev/null +++ b/Formula/c/cargo-deps.rb @@ -0,0 +1,60 @@ +class CargoDeps < Formula + desc "Cargo subcommand to building dependency graphs of Rust projects" + homepage "https://crates.io/crates/cargo-deps" + url "https://static.crates.io/crates/cargo-deps/cargo-deps-1.5.1.crate" + sha256 "958e78d8463edf62018d7d5e6f1c5866d59084a4f224c3be01f6eca8a2d3df47" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0822ff6250873cd04ec984afff6d6ca66363496d268d8902dc406f29bdafb403" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6817f6aba18ea54427289043559801aabc573370c80aed691e9ae78893046348" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dbfa6ef183d5a237a74186f332915c4704ce9926be46f30bf67d21a93443fc50" + sha256 cellar: :any_skip_relocation, arm64_monterey: "72e3032013ef5a554be4c6c0d1ce750a863cc8d6ba0d5aeb631bac9f96dbe832" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d6a439a94c145edf47da3e56d8ddc476d7d70e6f02e0e25bb62b5ef2436859ec" + sha256 cellar: :any_skip_relocation, sonoma: "faf4a08e986ea2ae4c5da48d6b92237a1cba2a5493c807b50c3a4f454555749f" + sha256 cellar: :any_skip_relocation, ventura: "dac2b73dceb1fd9ac07d9ef73b5c087c909c11af4cc67965be784628c2aea806" + sha256 cellar: :any_skip_relocation, monterey: "3f0b24ef58ceba9d2232c3ddf0f826b94c0a9347d0c9bc84055c1445d57a9972" + sha256 cellar: :any_skip_relocation, big_sur: "524f11ed7795845ff1014f495a783b0c3db46900b14c6e7490b093fbe4656308" + sha256 cellar: :any_skip_relocation, x86_64_linux: "205f88a20c0bf8fdabc555ecd1ec72a6103f65dcaaf5dc8c23f687e6d78249d3" + end + + disable! date: "2025-01-19", because: :repo_removed + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + system "cargo", "generate-lockfile" + + output = shell_output("cargo deps") + assert_match "digraph dependencies", output + + output = shell_output("#{bin}/cargo-deps --version") + assert_match "cargo-deps #{version}", output + end + end +end diff --git a/Formula/c/cargo-dist.rb b/Formula/c/cargo-dist.rb new file mode 100644 index 0000000000000..497039c11e3e8 --- /dev/null +++ b/Formula/c/cargo-dist.rb @@ -0,0 +1,45 @@ +class CargoDist < Formula + desc "Tool for building final distributable artifacts and uploading them to an archive" + homepage "https://opensource.axo.dev/cargo-dist/" + url "https://github.com/axodotdev/cargo-dist/archive/refs/tags/v0.30.2.tar.gz" + sha256 "8c04414848f64a81a663b4c9200d4d04dc25b950e62db04767c0c0379ca76ebb" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/axodotdev/cargo-dist.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7911b2452d430d728e34f4b36ae28eab3a0d222811a6ef55dd19bf3da8398927" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e10f25f117ceb9bc34214fd167ce5056ef191aada22b3e0492966e426c1fe6a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7fa6f9c4bf28f10050274ccee18a1c42d68ce59db03f1338eb680269dcf70376" + sha256 cellar: :any_skip_relocation, sonoma: "b4adf978a277afc38c52283fb33ee13b1ff60bde34978267f6691d09d1caff46" + sha256 cellar: :any_skip_relocation, arm64_linux: "67c60c60c20c1ce83fd95843b87a0f58347c6fc117258e1f1642536d3b257429" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7fd1a2dbe58f01b42709e86ae23ae97f704c907d413584f1d5c414f76410797" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + conflicts_with "nmh", because: "both install `dist` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "cargo-dist") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + assert_match version.to_s, shell_output("#{bin}/dist --version") + + system "cargo", "new", "--bin", "test_project" + cd "test_project" do + output = shell_output("#{bin}/dist init 2>&1", 255) + assert_match "added [profile.dist] to your workspace Cargo.toml", output + + output = shell_output("#{bin}/dist plan 2>&1", 255) + assert_match "You specified --artifacts, disabling host mode, but specified no targets to build", output + end + end +end diff --git a/Formula/c/cargo-docset.rb b/Formula/c/cargo-docset.rb new file mode 100644 index 0000000000000..1a72c6358e42b --- /dev/null +++ b/Formula/c/cargo-docset.rb @@ -0,0 +1,60 @@ +class CargoDocset < Formula + desc "Cargo subcommand to generate a Dash/Zeal docset for your Rust packages" + homepage "https://github.com/Robzz/cargo-docset" + url "https://github.com/Robzz/cargo-docset/archive/refs/tags/v0.3.1.tar.gz" + sha256 "98e7aec301ad5840d442f6027bba02b41de3f03b1f3c85b23adcc6dd7ca8c415" + license "Apache-2.0" + head "https://github.com/Robzz/cargo-docset.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "760e1422ff6844a8f4133e095dd22f59d046ba01b0eb9f880548b7af7a02ffe2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c4351f68e1d7fb4997246d0a1ff54e85b3aae4524bcb0cdc0bac379a88ecf54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d3967143668a150164b116c2f82996ed07bf150f8c2418d913fce73c0414cb4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a026716e38bb7746b1118556a35fd319beb8e46d9a07d02c886808cbf77bf31" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4cf48a777532c29c0a4885d1460892d9c68ce0f19115381b95ba10d1aebb174e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "873269e236d771aa5c98df63927b7a54db5213d2915c868f1a090033a97f59c7" + sha256 cellar: :any_skip_relocation, sonoma: "06d504afe6263dcde05f4b4966709b18af92315239c12375d7cddb7d0148ab72" + sha256 cellar: :any_skip_relocation, ventura: "86dafa007c5203f459d7b4d95db972d2820b94f97f8d4c7ae2578ad4d0651056" + sha256 cellar: :any_skip_relocation, monterey: "f8d40c7c3a89df7dff6b6a752a83896e621a6b81ccd3361568da5feba36a8c72" + sha256 cellar: :any_skip_relocation, big_sur: "ce6ee7c8b2ee612c55eb082cc14e34a109c99e517948ed6be22066e0d066b9f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c7778c8af189d1cbc622fe6b781799540665394faef8894ed1f7d971f56db36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d451753648a8173e81f0238eb79b57da1d774c2c444b3de0618277c38d9889f3" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + uses_from_macos "sqlite" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + output = shell_output("cargo docset --all-features") + assert_path_exists crate/"target/docset/demo-crate.docset" + assert_match "Docset succesfully generated", output + end + end +end diff --git a/Formula/c/cargo-edit.rb b/Formula/c/cargo-edit.rb new file mode 100644 index 0000000000000..940cac114d5e1 --- /dev/null +++ b/Formula/c/cargo-edit.rb @@ -0,0 +1,53 @@ +class CargoEdit < Formula + desc "Utility for managing cargo dependencies from the command-line" + homepage "https://killercup.github.io/cargo-edit/" + url "https://github.com/killercup/cargo-edit/archive/refs/tags/v0.13.7.tar.gz" + sha256 "f242010b4b0b8ccd245693858d26a35f70bef572a209f4977d192c1215e861c6" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6390900117e4d1ba9fa0d8c98af2c6f6c933fb5fa074f9dc72222ec507cccc0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4dd153dfa28471eea43c902a5d5c53227593bdf045813fb8b4c8412135ecc94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5b4453832e7c496de84ab14ad158088979f6400f44d5878e92c0990b28353c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "801024abe23a78a5c9a8d3b6306f61efee53301b891aed4e02c60da1f79aa9d0" + sha256 cellar: :any_skip_relocation, sonoma: "1e9919430c3cf41763128c572f7fd539c8bfc37723f58613bb80bf189e370bf6" + sha256 cellar: :any_skip_relocation, ventura: "f6d9c017b73a2620fbff53e05a218869695aedc66c59df1574f73125e7c9e351" + sha256 cellar: :any_skip_relocation, arm64_linux: "3730ef254e5450a69a9ca40b39e8aa032b0bbc6588aa36c26cb9bd3ca28648ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d9b69b980cd929b8a69f9f1c6bdcee2286b4e698f8bdffc1c3bf7d68b34802a" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write "// Dummy file" + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + + [dependencies] + clap = "2" + TOML + + system bin/"cargo-set-version", "set-version", "0.2.0" + assert_match 'version = "0.2.0"', (crate/"Cargo.toml").read + + system "cargo", "rm", "clap" + refute_match("clap", (crate/"Cargo.toml").read) + end + end +end diff --git a/Formula/c/cargo-expand.rb b/Formula/c/cargo-expand.rb new file mode 100644 index 0000000000000..8cea7c5702f28 --- /dev/null +++ b/Formula/c/cargo-expand.rb @@ -0,0 +1,36 @@ +class CargoExpand < Formula + desc "Show what Rust code looks like with macros expanded" + homepage "https://github.com/dtolnay/cargo-expand" + url "https://github.com/dtolnay/cargo-expand/archive/refs/tags/1.0.118.tar.gz" + sha256 "d9c412a4dff5052c05ab5afae8e3948f51a8892de121a6fc5c4957dbf599ea05" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/dtolnay/cargo-expand.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eccf5f8013596a6fa109d66722e400655fcc00845e84c1b59a61a18df1963017" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ea640cfa397909111bb29d08658950c5aa32049831ef23eb56270728604bc9e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7bf5d6ba0b646360a2f4604cc5719b40676f7d2ab3896c577e6993f31211d133" + sha256 cellar: :any_skip_relocation, sonoma: "1ddc9072c7f9c58eca6ee2e388bd8ef6bdc36dda7fceaba05f15caff32306dba" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5243cda443ca4b58cac6930c1a48f79b20644b2401acf55bcad1e40c4c5890e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3781dfaca54afef9a33b0fd12ad00552894d6b84e026e0e757b1149f7a2a6bb" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "stable" + + system "cargo", "new", "hello_world", "--lib" + cd "hello_world" do + output = shell_output("cargo expand 2>&1") + assert_match "use std::prelude", output + end + end +end diff --git a/Formula/c/cargo-flamegraph.rb b/Formula/c/cargo-flamegraph.rb new file mode 100644 index 0000000000000..7216a22df90df --- /dev/null +++ b/Formula/c/cargo-flamegraph.rb @@ -0,0 +1,51 @@ +class CargoFlamegraph < Formula + desc "Easy flamegraphs for Rust projects and everything else" + homepage "https://github.com/flamegraph-rs/flamegraph" + url "https://github.com/flamegraph-rs/flamegraph/archive/refs/tags/v0.6.9.tar.gz" + sha256 "dd9b83affab5f9c1eaad0de9034037780e634c96fef4dce8fa83900e58cc240c" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/flamegraph-rs/flamegraph.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f02254cf91b45fdeddf7e5696f43560732cc3056ec1faeccd81c035f9dabf94a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a59f05d6020179a23e317e1894113b9665760a2b2b1588e5042dad8933dc54a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c34cf2d2a3a4fc582c0fc98a118c0fb381a620b089631bf3e8d4d7268391e86" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2fe08c54e9de5f7c0db4022825d0da8e8df9f3fec8b1c1150c4f67912ab7aeaf" + sha256 cellar: :any_skip_relocation, sonoma: "a5206a7fe6e44731c1c64d08ba0e53c379b9f550bdf163e9f0378fe549fcebcb" + sha256 cellar: :any_skip_relocation, ventura: "ae76d5fc3ffbaf1275c38909818db298c0440b7e7b2648637258753fa6ffdb16" + sha256 cellar: :any_skip_relocation, arm64_linux: "42cf582472a881a89e88d319cee00bb773558e34c6a76a5e88993785cfc341a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3f4e20aa6e5f0e73072baff1801f85eb51fb11e80203f6c32a7b45d305e8571" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"flamegraph", "--completions") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + assert_match version.to_s, shell_output("#{bin}/flamegraph --version") + + system "cargo", "new", "testproj", "--bin" + cd "testproj" do + system "cargo", "build", "--release" + assert_match "WARNING: profiling without debuginfo", shell_output("cargo flamegraph 2>&1", 1) + end + + expected = if OS.mac? + "failed to sample program" + else + "perf is not installed or not present" + end + assert_match expected, shell_output("#{bin}/flamegraph -- echo 'hello world' 2>&1", 1) + end +end diff --git a/Formula/c/cargo-fuzz.rb b/Formula/c/cargo-fuzz.rb new file mode 100644 index 0000000000000..20c8fa0cd6e3a --- /dev/null +++ b/Formula/c/cargo-fuzz.rb @@ -0,0 +1,42 @@ +class CargoFuzz < Formula + desc "Command-line helpers for fuzzing" + homepage "https://rust-fuzz.github.io/book/cargo-fuzz.html" + url "https://github.com/rust-fuzz/cargo-fuzz/archive/refs/tags/0.13.1.tar.gz" + sha256 "3dae1ab57e738c1059635eb824062e4de79474080612f60a0ec0decf455d9e65" + license all_of: ["Apache-2.0", "MIT"] + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2d9d7d1111688f24dcda6cbc4daa6cd6a7bdbf7a24409c06dd83d2e55248c8fb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b956962a95b2090fda39a65ff4db87e26bd410c28d2e82671e767a260710e5ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a3493095a73a28d8e9567dd14965cbcdec67ad26d01d475b4cff7962652d14c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04f19b1a235620309d46c4b2a1123e8396a155da418bec5b3c8b850cf999cd09" + sha256 cellar: :any_skip_relocation, sonoma: "893e1c8a1a414cb0c30e0a16a6b6b5d682e499463f53a74e15b243e958f84c89" + sha256 cellar: :any_skip_relocation, ventura: "9c9bc902d389b13ce19eb7c502776e2ebec0ca489571bdac1b3f77dd2572af07" + sha256 cellar: :any_skip_relocation, arm64_linux: "831f04c442358ca91759ab573aa45d5fbb9d0a4363e82e079cd5dcb24dcd26f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0be5af994689c2d68c333c0a97d5e2b71e1f2efee008131929a92cc76f097fb5" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "init" + system bin/"cargo-fuzz", "init" + assert_path_exists testpath/"fuzz/Cargo.toml" + end +end diff --git a/Formula/c/cargo-geiger.rb b/Formula/c/cargo-geiger.rb new file mode 100644 index 0000000000000..172b6d5b48d87 --- /dev/null +++ b/Formula/c/cargo-geiger.rb @@ -0,0 +1,75 @@ +class CargoGeiger < Formula + desc "Detects usage of unsafe Rust in a Rust crate and its dependencies" + homepage "https://github.com/geiger-rs/cargo-geiger" + url "https://github.com/geiger-rs/cargo-geiger/archive/refs/tags/cargo-geiger-0.13.0.tar.gz" + sha256 "02a3999b58e45527932cc9fa60503b3197f011778dc1954909fb5fe9dd168f72" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/geiger-rs/cargo-geiger.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8997588d004ef7ef62ef41e3d153ce25a4c93feef26bb02f3c04decd9919b091" + sha256 cellar: :any, arm64_sequoia: "cac5e30bb6fb7f9ddfa71d2e37cdc8797cd4d9a23fb58efe9124640f90e758d1" + sha256 cellar: :any, arm64_sonoma: "1c9f1b649a75fd9ed039649aa5e6036579aa20cab80f897733d8039721336233" + sha256 cellar: :any, arm64_ventura: "7890875c7fac5293f1539c395f1c351baee3f36c0ed4bbfce8b8b978147f2657" + sha256 cellar: :any, sonoma: "e6a929160640559d7a5672c62f39f75f7758b58c42a9133cd34c1ca6d67b4404" + sha256 cellar: :any, ventura: "3a3eea35f5874bb431f9d15bc7e0482ba51eb875cf882b73712e54a3880bf8f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce942bfd54c6ee4970534db6283104d6359aa21a7900a2b52b87d85ab95ea688" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbc058716b342a7642895eb32a45da08a6aadaf12df134c2fddfaebcd8ad3556" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "cargo-geiger") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "default", "beta" + system "rustup", "set", "profile", "minimal" + + assert_match version.to_s, shell_output("#{bin}/cargo-geiger --version") + + mkdir "brewtest" do + (testpath/"brewtest/src/main.rs").write <<~RUST + fn main() { + let mut a: u8 = 0; + let p = &mut a as *mut u8; + unsafe { *p = 1; } + println!("{}", a); + } + RUST + + (testpath/"brewtest/Cargo.toml").write <<~TOML + [package] + name = "test" + version = "0.1.0" + edition = "2021" + TOML + + system "cargo", "build", "--offline" + assert_match "Metric output format: x/y", shell_output("cargo geiger --offline") + end + + require "utils/linkage" + + [ + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-geiger", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-generate.rb b/Formula/c/cargo-generate.rb new file mode 100644 index 0000000000000..7b76b8e405008 --- /dev/null +++ b/Formula/c/cargo-generate.rb @@ -0,0 +1,57 @@ +class CargoGenerate < Formula + desc "Use pre-existing git repositories as templates" + homepage "https://github.com/cargo-generate/cargo-generate" + url "https://github.com/cargo-generate/cargo-generate/archive/refs/tags/v0.23.5.tar.gz" + sha256 "59ddb9f0715e3e0ec8190e1c158f5cd013a2d19d855d4946970ea40d47b60570" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/cargo-generate/cargo-generate.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e0e4fd2ea3329c2746c7bc58b2c726bba93f05fabcc1aadb8a969cc370a5d42f" + sha256 cellar: :any, arm64_sequoia: "f68d984520cf08961e05406b99ac47babc34a4af29d8373cdf805a8d9aa15d8f" + sha256 cellar: :any, arm64_sonoma: "3e3d1dfd2e07f1e098ba5b088a028c15d6fe556af0c4d6c8fb0fe021c9f8a568" + sha256 cellar: :any, arm64_ventura: "2d52c1abed1cb03a8cf02eda228369e9f36fb70336d00db303bb2dd0b9d439f8" + sha256 cellar: :any, sonoma: "72008bfba612207a661570dc08d8ebccad9191f3e12f40fab26480c4272c69b5" + sha256 cellar: :any, ventura: "650b05e8dcaf802e5feda6b4f46e036ccc875129c0c088a8e0afbdd1943bb1ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e5372b43ee3e6d61d400774d926cd192c928014eb4bb56e213c74e858200c9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f0f024bb1eba7c418b21690dc2703a88cc57645c8c59b2eee67cddc280a9bae" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + # Ensure the correct `openssl` will be picked up. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", "--no-default-features", *std_cargo_args + end + + test do + require "utils/linkage" + + assert_match "No favorites defined", shell_output("#{bin}/cargo-generate gen --list-favorites") + + system bin/"cargo-generate", "gen", "--git", "https://github.com/ashleygwilliams/wasm-pack-template", + "--name", "brewtest" + assert_path_exists testpath/"brewtest" + assert_match "brewtest", (testpath/"brewtest/Cargo.toml").read + + linked_libraries = [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + ] + linked_libraries << (Formula["openssl@3"].opt_lib/shared_library("libcrypto")) if OS.mac? + linked_libraries.each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-generate", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-hack.rb b/Formula/c/cargo-hack.rb new file mode 100644 index 0000000000000..d7c92de5130b8 --- /dev/null +++ b/Formula/c/cargo-hack.rb @@ -0,0 +1,37 @@ +class CargoHack < Formula + desc "Cargo subcommand to provide options for testing and continuous integration" + homepage "https://github.com/taiki-e/cargo-hack" + url "https://github.com/taiki-e/cargo-hack/archive/refs/tags/v0.6.39.tar.gz" + sha256 "88ceb040dc3d82ef1f56cd398189240d3922a4ae711a338c5c4ecd52976956a8" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/taiki-e/cargo-hack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c806073573b84297a74fe131e3f506e419955ce023314c39ba9bac15ef097deb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f72e9abb25f9ff2cc8b386a981004e178d0ce06c4715a3210d2c53508c3f481" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cee9735e497e3f634a40a27ed4cdd10916c18ce448adf970957b8279045958a8" + sha256 cellar: :any_skip_relocation, sonoma: "8bafbec0826e9fdc7db8bb93b36ce0195672fd070bc01561f3aed46f1767347d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8f3590a9b38593d836f9d05e4010ef2435f68a3255be5f9a4d923b4bb83297d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7c568558a74ab119eff9121234e7ce6d09103167824a4071d981b3f690f0c1e" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "new", "hello_world" + cd "hello_world" do + assert_match "Finished `dev` profile [unoptimized + debuginfo]", shell_output("cargo hack check 2>&1") + end + end +end diff --git a/Formula/c/cargo-instruments.rb b/Formula/c/cargo-instruments.rb new file mode 100644 index 0000000000000..8c67fa7acd690 --- /dev/null +++ b/Formula/c/cargo-instruments.rb @@ -0,0 +1,29 @@ +class CargoInstruments < Formula + desc "Easily generate Instruments traces for your rust crate" + homepage "https://github.com/cmyr/cargo-instruments" + url "https://github.com/cmyr/cargo-instruments/archive/refs/tags/v0.4.12.tar.gz" + sha256 "0ecc0440dd36a40aed1cfc5222c93ec432f084b0ffa569ba9f48439c4bf41211" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a9230942af96929b1d806e7e6682650964ebe8d8799857ee46849dc3ea7fe20f" + sha256 cellar: :any, arm64_sequoia: "f69b6cb11b0a0e38d7818f503c5288c84db02dea3191f068f5bef43381385116" + sha256 cellar: :any, arm64_sonoma: "fff1288a25c52e3a201e9bce0bc4556b26567d07ba83fa2bbf7fa89bfc23882c" + sha256 cellar: :any, arm64_ventura: "cd3cc44b10b674703ac6a1817d5bf3f4dd507e43634dc4362f2035b0dd6a64fe" + sha256 cellar: :any, sonoma: "dc5005ed3ccfe1d4cee8631aae4600830633f29e39d7c88f5de7d56bbc65ae37" + sha256 cellar: :any, ventura: "04595ff1b1e2f49409c15dd038dbe436608954a58be356425106466c6c6c5258" + end + + depends_on "rust" => :build + depends_on :macos + depends_on "openssl@3" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output "#{bin}/cargo-instruments instruments", 1 + assert_match output, "could not find `Cargo.toml` in `#{Dir.pwd}` or any parent directory" + end +end diff --git a/Formula/c/cargo-llvm-cov.rb b/Formula/c/cargo-llvm-cov.rb new file mode 100644 index 0000000000000..d00d717ad7582 --- /dev/null +++ b/Formula/c/cargo-llvm-cov.rb @@ -0,0 +1,39 @@ +class CargoLlvmCov < Formula + desc "Cargo subcommand to easily use LLVM source-based code coverage" + homepage "https://github.com/taiki-e/cargo-llvm-cov" + # cannot use github tarball due to https://github.com/taiki-e/cargo-llvm-cov/pull/152#issuecomment-1107055622 + url "https://static.crates.io/crates/cargo-llvm-cov/cargo-llvm-cov-0.6.21.crate" + sha256 "42236fed339535379c8671218bd8050ddf2b937cb16f6012b44b6cf993ce7c9c" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/taiki-e/cargo-llvm-cov.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d7d8f20b13a4794ec223122f6bf339ebd6bd1be2e3601f054fa06e7c2f8a5d32" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "182be3be7cfb80a0f3ceaa1b0eb300f7a508881925a24ba3e597feb055b79911" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "64247f6a0db86435db9b5250006e9e9588d6e68ef861744505ec8313b241bc1f" + sha256 cellar: :any_skip_relocation, sonoma: "a3534abe44582f9c53641e8a19bdeed554637ea36cf0806884cc8015a5cefffd" + sha256 cellar: :any_skip_relocation, arm64_linux: "dad38bb25d4613a1965ef2d0d91f49f6536f90f553664553200c90f2cf7ab5e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c825d5543c26c470dfff85bf8d3db1c92c8c3973c7938a6e06710a29518e5cc0" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "new", "hello_world", "--lib" + cd "hello_world" do + system "cargo", "llvm-cov", "--html" + end + assert_path_exists testpath/"hello_world/target/llvm-cov/html/index.html" + end +end diff --git a/Formula/c/cargo-llvm-lines.rb b/Formula/c/cargo-llvm-lines.rb new file mode 100644 index 0000000000000..7c05d552ec68c --- /dev/null +++ b/Formula/c/cargo-llvm-lines.rb @@ -0,0 +1,38 @@ +class CargoLlvmLines < Formula + desc "Count lines of LLVM IR per generic function" + homepage "https://github.com/dtolnay/cargo-llvm-lines" + url "https://github.com/dtolnay/cargo-llvm-lines/archive/refs/tags/0.4.45.tar.gz" + sha256 "d1e6fb07760239c2f7ee1ee7e7a857ffb4f82df1378bbd0e4d2e8d75e74f13eb" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/dtolnay/cargo-llvm-lines.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f96bc5657cec596d1c8345a7b33c2b8eb0dcb5e80e677b8c1bcc55ee7153f05" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b003e01713c2c21b2ded471c1617b74d349574847e4ec18b9040e5aac73e5ddb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "78435265c11559ef3470087d97d951ff12c1fa29590c1f485daf1fedf186001b" + sha256 cellar: :any_skip_relocation, sonoma: "6710eaf6730d103df0bbddd44ff1b71b80dd1c69590798d5a325d71f97cafa1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "93bbb22430a1d3b4dd16d55a5ce5759a370b973cc8272aa528ae80881acedf89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b83bd2492130d970f7488f4c2ae35852e026a01a79f1668d52704a7977f4dc01" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "new", "hello_world", "--bin" + cd "hello_world" do + output = shell_output("cargo llvm-lines 2>&1") + assert_match "core::ops::function::FnOnce::call_once", output + end + end +end diff --git a/Formula/c/cargo-make.rb b/Formula/c/cargo-make.rb new file mode 100644 index 0000000000000..230f96b58e9bb --- /dev/null +++ b/Formula/c/cargo-make.rb @@ -0,0 +1,44 @@ +class CargoMake < Formula + desc "Rust task runner and build tool" + homepage "https://github.com/sagiegurari/cargo-make" + url "https://github.com/sagiegurari/cargo-make/archive/refs/tags/0.37.24.tar.gz" + sha256 "a7f6f7332862442e6020e8d8b2568a6fa8eed28156be0dddd61982e1e644cf02" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c85317163c83d67bdc08f66186d287ab4ade17702716118c30dffc60300d2416" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19d759576565d7abaf24e1333ae5e52383f998571025a563c7f994df57dd30fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d51b915c4a7eb13107f048b8086be05eac529766f6b61d94238f6de7f95e183c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03378097976272095569b5c44ec8cf5ed5220318ea3c0d03eaa3a4f1d91ce8e5" + sha256 cellar: :any_skip_relocation, sonoma: "086c607cd949bf09f50993d4a486137350c6a69df15bcc8bffcde33228aa330c" + sha256 cellar: :any_skip_relocation, ventura: "4d4e6df0408ec7ee1110e0380a32c280d1d657b744a302279fdfbc9811a7e8df" + sha256 cellar: :any_skip_relocation, arm64_linux: "a38ee58a40f555beed4820c611cb375ae11ced7c35f294b799434407f2287075" + sha256 cellar: :any_skip_relocation, x86_64_linux: "476ba3af76f954ed24d8cb84e7e57eab3a32b86d51d21f7e219be831264137f5" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + text = "it's working!" + (testpath/"Makefile.toml").write <<~TOML + [tasks.is_working] + command = "echo" + args = ["#{text}"] + TOML + + assert_match text, shell_output("cargo make is_working") + assert_match text, shell_output("#{bin}/cargo-make make is_working") + assert_match text, shell_output("#{bin}/makers is_working") + end +end diff --git a/Formula/c/cargo-msrv.rb b/Formula/c/cargo-msrv.rb new file mode 100644 index 0000000000000..951edfe5debd8 --- /dev/null +++ b/Formula/c/cargo-msrv.rb @@ -0,0 +1,54 @@ +class CargoMsrv < Formula + desc "Find the minimum supported Rust version (MSRV) for your project" + homepage "https://foresterre.github.io/cargo-msrv" + url "https://github.com/foresterre/cargo-msrv/archive/refs/tags/v0.18.4.tar.gz" + sha256 "9e8d743a9948ec91e4d82ce34b8f0f9e65385ed78739cb36376f65049d8b8da5" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/foresterre/cargo-msrv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c933cc8a8c2df5edcef6dd3eb66a17b7004d358d855d0409237cf69fbf2401d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a51548c6d0b81c3dd24e17569505ad9cb6760a5dbc111fa9dc4993f162ca0eca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "813162996051721d05770fdc9ed7f8878c76ba57e12e9525e9a3547bbc4356e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a4ae3bbd41c2cbd23e07ccd1c26f8ea854d63bc49daf043384ad980029268f2a" + sha256 cellar: :any_skip_relocation, sonoma: "45e5d88a23f0d0f1dfc83b86a6d7425008d0a86ad21520fc9a42837fd9de3cfa" + sha256 cellar: :any_skip_relocation, ventura: "b0048b375dbdcd010ac19829bc4d5b2733819578ebb2880f8cd772f72f88df53" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7e2393546f7f2b9a3cad3db9803e4c9a1bbdf83f2cf5e2a0cad963f1a03b930" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea9a3477964f0e30b7cae9881998f0f0520cf254e382e1c9680dbbe412d4bb89" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ENV["NO_COLOR"] = "1" + + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + assert_match version.to_s, shell_output("#{bin}/cargo-msrv --version") + + # Now proceed with creating your crate and calling cargo-msrv + (testpath/"demo-crate/src").mkpath + (testpath/"demo-crate/src/main.rs").write "fn main() {}" + (testpath/"demo-crate/Cargo.toml").write <<~EOS + [package] + name = "demo-crate" + version = "0.1.0" + edition = "2021" + rust-version = "1.78" + EOS + + cd "demo-crate" do + output = shell_output("#{bin}/cargo-msrv msrv show --output-format human --log-target stdout 2>&1") + assert_match "name: \"demo-crate\"", output + end + end +end diff --git a/Formula/c/cargo-nextest.rb b/Formula/c/cargo-nextest.rb new file mode 100644 index 0000000000000..8409e2992ae36 --- /dev/null +++ b/Formula/c/cargo-nextest.rb @@ -0,0 +1,58 @@ +class CargoNextest < Formula + desc "Next-generation test runner for Rust" + homepage "https://nexte.st" + url "https://github.com/nextest-rs/nextest/archive/refs/tags/cargo-nextest-0.9.110.tar.gz" + sha256 "12d272059ab8bdbfa9a30ceeacc249b2f70783c89a8abc60bb212284cfd21bc7" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^cargo-nextest[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c796d2f0bada7791ddf6d829300a8f135004353496a4b700245e2cad698f78a5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e332b22b2d47057b3e1fb79e799c86ac8e08a4b4e0ae423a5acc63cb8cb8338" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b04ece159a3d09de7abcb88ee2f0616ce179966898e70962e52f3ce1f391f95" + sha256 cellar: :any_skip_relocation, sonoma: "bd2b840381823c3bc717b4b3970450d74eee39a477b827aa79dbac5b71f8d082" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b04f3202f980144e835bda063beec58882aa930cdb899542671c41a726f0b74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "508b9bb7d1217d3c0b682995401ab32394725582c450fe9e6f7c0c723effe087" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", "--no-default-features", "--features", "default-no-update", + *std_cargo_args(path: "cargo-nextest") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + #[cfg(test)] + mod tests { + #[test] + fn test_it() { + assert_eq!(1 + 1, 2); + } + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + TOML + + output = shell_output("cargo nextest run 2>&1") + assert_match "Starting 1 test across 1 binary", output + end + end +end diff --git a/Formula/c/cargo-outdated.rb b/Formula/c/cargo-outdated.rb new file mode 100644 index 0000000000000..954ddfb1cc1ae --- /dev/null +++ b/Formula/c/cargo-outdated.rb @@ -0,0 +1,73 @@ +class CargoOutdated < Formula + desc "Cargo subcommand for displaying when Rust dependencies are out of date" + homepage "https://github.com/kbknapp/cargo-outdated" + url "https://github.com/kbknapp/cargo-outdated/archive/refs/tags/v0.18.0.tar.gz" + sha256 "a0acb73eca2cc65915db426e49a0b834d20ef2cb302bd2ce21c1d59f3cb1894b" + license "MIT" + head "https://github.com/kbknapp/cargo-outdated.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7aa16f918979213758af38c2f285cd5805574bbce7bbf2f05652137bd1975ca2" + sha256 cellar: :any, arm64_sequoia: "ab7387ccf1d8ebcd8e4c59c41dea28364316b5d03f99d47f8c4ef812879a2b36" + sha256 cellar: :any, arm64_sonoma: "e1ca3f3386b589beb3af60ffd8ffe53aa975a273d575066c97281479e1182f59" + sha256 cellar: :any, sonoma: "d701232c35a2768f0a1a8ac96c68bb16d4aa6353c96725d0339ba467b62fa057" + sha256 cellar: :any_skip_relocation, arm64_linux: "8cf595c0dd40841f29b17e81855161d5f03c5998ad482bb5f4ab054d112cdae8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dedf4524e646d5747c1061b9c84eac2378dde63de3b3f01c3d618c04496094cf" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "libgit2" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["OPENSSL_NO_VENDOR"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + + system "cargo", "install", *std_cargo_args + end + + test do + require "utils/linkage" + + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + + [lib] + path = "lib.rs" + + [dependencies] + libc = "0.1" + TOML + + (crate/"lib.rs").write "use libc;" + + output = shell_output("cargo outdated 2>&1") + # libc 0.1 is outdated + assert_match "libc", output + end + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-outdated", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-public-api.rb b/Formula/c/cargo-public-api.rb new file mode 100644 index 0000000000000..eec5397651a85 --- /dev/null +++ b/Formula/c/cargo-public-api.rb @@ -0,0 +1,62 @@ +class CargoPublicApi < Formula + desc "List and diff the public API of Rust library crates" + homepage "https://github.com/cargo-public-api/cargo-public-api" + url "https://github.com/cargo-public-api/cargo-public-api/archive/refs/tags/v0.50.1.tar.gz" + sha256 "779ba388aece1227bd074c39bf90eadff7e9edc1238d6d5691fd69b4bf8cd47c" + license "MIT" + head "https://github.com/cargo-public-api/cargo-public-api.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9197fe1047e7f21a85f96fa143486d6a4bbb4a3e126d3bfb19ad0581fc149c7e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c7444446cd605cd2a5b9410aa9b007aeefad52eebf8a91b5786606936984792" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f1a31b8ecd2e6a8aa2ca2d861b8a471a2ba43dbeaba4b6b7ef097b9633888f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "273416297384313a0efbe83b4fe6f6c615881e338950600d0a9be0880fcfc8a5" + sha256 cellar: :any_skip_relocation, sonoma: "0d046b185a172a1f9c85e4c9c506040765ac98a30ae8287f586bf6b0566cab84" + sha256 cellar: :any_skip_relocation, ventura: "e90934f1b896cf82b12ca0b4757d0b6b763432e93b3ce499aa2a22b8fab635b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c1719b63932b075d2536b9645446723c525fcc171e5de3d877b7351080d7ea9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "280e37e71e73d6afd1642f46824f81f5006bc2ba6f00b1fb47c4fca9d9f175fa" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + uses_from_macos "curl" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "cargo-public-api") + + generate_completions_from_executable(bin/"cargo-public-api", "completions") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + system "rustup", "toolchain", "install", "nightly" + + (testpath/"Cargo.toml").write <<~TOML + [package] + name = "test_package" + version = "0.1.0" + edition = "2021" + TOML + + (testpath/"src/lib.rs").write <<~RUST + pub fn public_function() -> i32 { + 42 + } + RUST + + output = shell_output("#{bin}/cargo-public-api diff") + assert_match "Added items to the public API", output + + assert_match version.to_s, shell_output("#{bin}/cargo-public-api --version") + end +end diff --git a/Formula/c/cargo-release.rb b/Formula/c/cargo-release.rb new file mode 100644 index 0000000000000..2f11420243a18 --- /dev/null +++ b/Formula/c/cargo-release.rb @@ -0,0 +1,50 @@ +class CargoRelease < Formula + desc "Cargo subcommand `release`: everything about releasing a rust crate" + homepage "https://github.com/crate-ci/cargo-release" + url "https://github.com/crate-ci/cargo-release/archive/refs/tags/v0.25.20.tar.gz" + sha256 "34edcc83ebc6839b22c9fadb0d7c8eddad6703e12f5bdd83180ecc60905af488" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/crate-ci/cargo-release.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1ec7651f8870696c6a56f558c7e082781016f1ed5135eadf5db4e7d9fc29061e" + sha256 cellar: :any, arm64_sequoia: "7d6ae72fcaeff6f00d9c993b41eb733b5201802e9cdd010687bc5ded15efa52a" + sha256 cellar: :any, arm64_sonoma: "c1f61f3b1993be45d83eefc8948fa590c54a39680e602b40800de56ed100ce3a" + sha256 cellar: :any, sonoma: "04728a3199ddc2bc9f5c6ba0a1be05cbdf8c1ced5ab3ab96d7597e21c688373e" + sha256 cellar: :any_skip_relocation, arm64_linux: "35e5bdf2d1a98eec330d6693dc4c3c8dc10caaec91dda9724ff81c9112645fd8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29f17ab779f49d8d8893a765f26e3f2d3ebe3d020c85fbd4ad8575165046af0c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "libgit2" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + system "cargo", "install", "--no-default-features", *std_cargo_args + end + + test do + require "utils/linkage" + + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "new", "hello_world", "--bin" + cd "hello_world" do + assert_match "tag = true", shell_output("cargo release config 2>&1").chomp + end + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-release", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-run-bin.rb b/Formula/c/cargo-run-bin.rb new file mode 100644 index 0000000000000..ad57ca46618f4 --- /dev/null +++ b/Formula/c/cargo-run-bin.rb @@ -0,0 +1,66 @@ +class CargoRunBin < Formula + desc "Build, cache, and run binaries from Cargo.toml to avoid global installs" + homepage "https://github.com/dustinblackman/cargo-run-bin" + url "https://github.com/dustinblackman/cargo-run-bin/archive/refs/tags/v1.7.4.tar.gz" + sha256 "fd492430a60ca488ad8c356f9c6389426f3fbcd59658e5b721855e171cb62841" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b42c4020debdc5882322126e1a9cde14f8c78fd37de35ab7d9c51ecaf58e5f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7c12e5d94ffbe160210e9acfb61d1d01363fdf40650bd738a9529417aeb3e39" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "baace800a845a4478368f4f44438fb55be90b595850584b8ba0333c01774cec8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18b37befe574ec3716f12943da256fb7b0c066dedacc9f45ec985a7c42bb3678" + sha256 cellar: :any_skip_relocation, sonoma: "52873150520a420f132bc02acf2a488597eb4957107a55da37633a26a7142d59" + sha256 cellar: :any_skip_relocation, ventura: "eae3e5a1faff8be5f6606211dc3fb2f38d6d0930f0dff73559667448d3decd36" + sha256 cellar: :any_skip_relocation, arm64_linux: "d06798a0e079e6d97a0f56bac16c87271a2c42aaa5185febb28edf71376e6218" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df0cd8b3c3dac21a4430ac243db6f937aa3765efa7855dce3918cbd4f2421c13" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal "cargo-run-bin #{version}", shell_output("#{bin}/cargo-bin -V").strip + + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + (testpath/"Cargo.toml").write <<~TOML + [package] + name = "homebrew_test" + version = "0.1.0" + edition = "2021" + + [[bin]] + name = "homebrew_test" + path = "src/main.rs" + + [package.metadata.bin] + cargo-nextest = { version = "0.9.57", locked = true } + TOML + + (testpath/"src/main.rs").write <<~RUST + fn main() { + println!("Hello, world!"); + } + RUST + + system "cargo", "build" + system bin/"cargo-bin", "--install" + system bin/"cargo-bin", "--sync-aliases" + + assert_match <<~TOML, File.read(testpath/".cargo/config.toml") + [alias] + nextest = ["bin", "cargo-nextest"] + TOML + + assert_match "next-generation test runner", shell_output("cargo nextest --help") + end +end diff --git a/Formula/c/cargo-shear.rb b/Formula/c/cargo-shear.rb new file mode 100644 index 0000000000000..8b59b0d576ed0 --- /dev/null +++ b/Formula/c/cargo-shear.rb @@ -0,0 +1,57 @@ +class CargoShear < Formula + desc "Detect and remove unused dependencies from `Cargo.toml` in Rust projects" + homepage "https://github.com/Boshen/cargo-shear" + url "https://github.com/Boshen/cargo-shear/archive/refs/tags/v1.6.2.tar.gz" + sha256 "b53adc104d32e59bf69b910956ae933cd9891ee6148741cd5231199f0e3b1fda" + license "MIT" + head "https://github.com/Boshen/cargo-shear.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c82f9708a2e86aadb6b4caa27d5da30b3aafeb0d9756b2864639062bc92c96c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "140dc1a6d8c6ada6b1ae30a8b678c20152a43105a6388dfc13e2d250eef35abd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "580917d0b28f0361f1fe1cc66de8641a9070617b66d0e6ee3517e27e2341dedd" + sha256 cellar: :any_skip_relocation, sonoma: "d4b606ce7ee6c59a923d3f237cfa3b09ca28802deed59e14d6e058fcc40ccbf4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2b52375f72aab3ef4951b7adf8bfe18477ae6a054e708a40694d104dcbb4d93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a2fc4fb89ea7e15af3d2d5a9c2edfb8aba5b8502d7f1b55394822701ee9f708" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + + [lib] + path = "lib.rs" + + [dependencies] + libc = "0.1" + bear = "0.2" + TOML + + (crate/"lib.rs").write "use libc;" + + output = shell_output("cargo shear", 1) + # bear is unused + assert_match <<~OUTPUT, output + demo-crate -- Cargo.toml: + bear + OUTPUT + end + end +end diff --git a/Formula/c/cargo-shuttle.rb b/Formula/c/cargo-shuttle.rb new file mode 100644 index 0000000000000..749cd87890b10 --- /dev/null +++ b/Formula/c/cargo-shuttle.rb @@ -0,0 +1,44 @@ +class CargoShuttle < Formula + desc "Build & ship backends without writing any infrastructure files" + homepage "https://shuttle.dev" + url "https://github.com/shuttle-hq/shuttle/archive/refs/tags/v0.57.3.tar.gz" + sha256 "f6726ccc4e0885d76b55751a252570459ac8a6a42503c6c1e09ed2b2aea44412" + license "Apache-2.0" + head "https://github.com/shuttle-hq/shuttle.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "53893034e05f07ba1cbe232d50113a1a05d9a5b94e6cc0726cfa59442c643a4b" + sha256 cellar: :any, arm64_sequoia: "c14bb2636101ce21da96496b34b948ea128387f28f87b5c33a02c7f7d61065b0" + sha256 cellar: :any, arm64_sonoma: "f348b0f5d6241bff629bc68e2bb802f18cc94abf4fed1256249e7da0575ac771" + sha256 cellar: :any, sonoma: "8e2dbea2a2da19ede37d07cbfad0cf727a59d4f9be669268978d5c16c357a08e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9aa6585bc4a09118827047e8ccbc07cae53f48f35236e0dd8837a0d1931881e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32ed2953148966df0689a01238a4b1122337cafbc037f4bbaf26798d27084ff8" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + + uses_from_macos "bzip2" + + conflicts_with "shuttle-cli", because: "both install `shuttle` binaries" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + system "cargo", "install", *std_cargo_args(path: "cargo-shuttle") + + # cargo-shuttle is for old platform, while shuttle is for new platform + # see discussion in https://github.com/shuttle-hq/shuttle/pull/1878/#issuecomment-2557487417 + %w[shuttle cargo-shuttle].each do |bin_name| + generate_completions_from_executable(bin/bin_name, "generate", "shell") + (man1/"#{bin_name}.1").write Utils.safe_popen_read(bin/bin_name, "generate", "manpage") + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/shuttle --version") + assert_match "Unauthorized", shell_output("#{bin}/shuttle account 2>&1", 1) + output = shell_output("#{bin}/shuttle deployment status 2>&1", 1) + assert_match "Failed to find a Rust project", output + end +end diff --git a/Formula/c/cargo-sort.rb b/Formula/c/cargo-sort.rb new file mode 100644 index 0000000000000..15c056122eac6 --- /dev/null +++ b/Formula/c/cargo-sort.rb @@ -0,0 +1,53 @@ +class CargoSort < Formula + desc "Tool to check that your Cargo.toml dependencies are sorted alphabetically" + homepage "https://github.com/devinr528/cargo-sort" + url "https://github.com/DevinR528/cargo-sort/archive/refs/tags/v2.0.2.tar.gz" + sha256 "3f0352b8d1ae0f6b778c50103a6877e98772f91783d776643f74041eaee376f5" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/devinr528/cargo-sort.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b141007885bd48b29b95d520568ef6530cf2b5f1b12240c37db72f99761bbdb5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e21317972556371a52e8f2b036339baf8055e9b11a5c49c686809926991eb197" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68e849f0b7dc34ee5ff08c25bd5c8ea7859317be046f89d3780dd277d922883b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8378775a5403d57969dcf037d9ac0061cc5c3dad764f3b39a971105f19ed7117" + sha256 cellar: :any_skip_relocation, sonoma: "7fe8639d02e0a7f56f36bdd0542be2dec4f4fe2d510d6a056cb00898496f926f" + sha256 cellar: :any_skip_relocation, ventura: "22f6daf72369124d93eecc42301be82a47a9eeebbebba9dce6c0f6a59bf1779f" + sha256 cellar: :any_skip_relocation, arm64_linux: "a66361ce4f11824e8bbdf8414fb391310b59165e73d88a5b773656587da08c54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "861e0677aea3b39d64cf6b6b783d0ca05be27b3f56a5db8cc39f478c925ae0bb" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + assert_match version.to_s, shell_output("#{bin}/cargo-sort --version") + + mkdir "brewtest" do + (testpath/"brewtest/Cargo.toml").write <<~TOML + [package] + name = "test" + version = "0.1.0" + edition = "2018" + + [dependencies] + c = "0.7.0" + a = "0.5.0" + b = "0.6.0" + TOML + + output = shell_output("#{bin}/cargo-sort --check 2>&1", 1) + assert_match "Dependencies for brewtest are not sorted", output + end + end +end diff --git a/Formula/c/cargo-spellcheck.rb b/Formula/c/cargo-spellcheck.rb new file mode 100644 index 0000000000000..4f20d1037e070 --- /dev/null +++ b/Formula/c/cargo-spellcheck.rb @@ -0,0 +1,55 @@ +class CargoSpellcheck < Formula + desc "Checks rust documentation for spelling and grammar mistakes" + homepage "https://github.com/drahnr/cargo-spellcheck" + url "https://github.com/drahnr/cargo-spellcheck/archive/refs/tags/v0.15.5.tar.gz" + sha256 "ab4027dea18ac252b1a3ad733f47899daa50dde3c90aa34f5f22534745f853d7" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/drahnr/cargo-spellcheck.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fd89e47b7c68ffcb850bdb181127c956b8a3697e2a186fa534d471d6c420e64f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e4c34eabd5c01a01e81429472363789f826a4107fb087feb88f6350cc459e7c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "429f9b37061d3e2f7d69e85f8e2457642d32b621966ebd25b20717af067be0ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7be9cb9bf49c88cd65a94b13c136ec844ab8f7d00b57b7404d944199f12cde65" + sha256 cellar: :any_skip_relocation, sonoma: "7476f53530cadc1d65a76aab700faa7c547fae7b4230c7df8e4d6b90e99183ad" + sha256 cellar: :any_skip_relocation, ventura: "43e0cd41ac0873292789d23e3b913ff9b0dab96db3fd25d2df8c1ed8ea335735" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bc18490d34f7837b8498c833e5fa539fab2e0fec341eeb8e14d3d11fe15b8f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bf9c80c76e0eadf342f2dd4dde6e6c6f07c1a713fe2feb7e9c096a3877310d7" + end + + depends_on "llvm" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "hunspell" + + def install + ENV["LIBCLANG_PATH"] = Formula["llvm"].opt_lib + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + assert_match version.to_s, shell_output("#{bin}/cargo-spellcheck --version") + + (testpath/"Cargo.toml").write <<~TOML + [package] + name = "test_project" + version = "0.1.0" + edition = "2021" + TOML + + (testpath/"src/lib.rs").write <<~RUST + //! This is a simple libary with a deliberate misspelling. + pub fn foo() {} + RUST + + output = shell_output("#{bin}/cargo-spellcheck check #{testpath}") + assert_match "libary", output + end +end diff --git a/Formula/c/cargo-sweep.rb b/Formula/c/cargo-sweep.rb new file mode 100644 index 0000000000000..9d0b96d337aab --- /dev/null +++ b/Formula/c/cargo-sweep.rb @@ -0,0 +1,52 @@ +class CargoSweep < Formula + desc "Utility for cleaning up unused build files generated by Cargo" + homepage "https://github.com/holmgr/cargo-sweep" + url "https://github.com/holmgr/cargo-sweep/archive/refs/tags/v0.8.0.tar.gz" + sha256 "f35aed1b18c7852684ed98be79e68585a9322cf868d75b71f017d24a1b7e3ee9" + license "MIT" + head "https://github.com/holmgr/cargo-sweep.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6898879b0fbfae34dea047911dced41d23ed79879886559688c94e4049255d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9a0c608db46539071bbb09fbb997fe699f2561ad815ad7a5eff7b5bdaa567b69" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfe52f10affe82206b30a9f30dfe4d6aaf71bc643395f0e52e14df646c7bc0d5" + sha256 cellar: :any_skip_relocation, sonoma: "93d76c136b91c6e38561e0773b714281b5f75f2cb367d9247f0cc543fd620425" + sha256 cellar: :any_skip_relocation, arm64_linux: "240f0d4bc302cacba4df9931d740029669d69b28e7b475fe69c578d1d7bfdc37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36c2b2a5eab5851f3217b5ea39694cf3f7e58b72be8a3fb858ecfaf65502cb2c" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", "--no-default-features", *std_cargo_args + end + + test do + assert_equal "cargo-sweep #{version}", shell_output("#{bin}/cargo-sweep -V").strip + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write <<~RUST + fn main() { + println!("Hello BrewTestBot!"); + } + RUST + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + license = "MIT" + TOML + + system "cargo", "build" + + output = shell_output("cargo sweep --time 0").strip + # test that there are some bytes cleaned + assert_match(/^\[INFO\] Cleaned \d+\.\d+ [KMG]iB/, output) + end + end +end diff --git a/Formula/c/cargo-udeps.rb b/Formula/c/cargo-udeps.rb new file mode 100644 index 0000000000000..06947cad0121d --- /dev/null +++ b/Formula/c/cargo-udeps.rb @@ -0,0 +1,71 @@ +class CargoUdeps < Formula + desc "Find unused dependencies in Cargo.toml" + homepage "https://github.com/est31/cargo-udeps" + url "https://github.com/est31/cargo-udeps/archive/refs/tags/v0.1.59.tar.gz" + sha256 "255929d3c9d53c3e09e53b38302e68b206b167bc4e10dc69cf7984c0fe1f5814" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "105b0e164ea8f62a30ed017afa00cdbd73ac425150e0590b34733f2cc66ecfab" + sha256 cellar: :any, arm64_sequoia: "e593bd0889697613a7a36c113cd85abfcf7b842d46f5e67f0cdaabdd8c615fa6" + sha256 cellar: :any, arm64_sonoma: "3c562d088f70891a780743d345b572bb445c02187d80352a5af1e9727bcd6577" + sha256 cellar: :any, sonoma: "eece9d19ad7c6509777a655e9381b8a10c865ecb5fdd5b71c02ac1b305edebd1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ac41605a30d8a759503500ae902e4849e64d7010c9d37557e9e4ac2a3f52c55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1ff57ca7e9f1ae32c8b262afcc8ce13361a449240efe65e2b66004314a5bf0c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", "--no-default-features", *std_cargo_args + end + + test do + require "utils/linkage" + + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + crate = testpath/"demo-crate" + mkdir crate do + (crate/"src/main.rs").write "// Dummy file" + (crate/"Cargo.toml").write <<~TOML + [package] + name = "demo-crate" + version = "0.1.0" + + [dependencies] + clap = "3" + TOML + + output = shell_output("cargo udeps 2>&1", 101) + # `cargo udeps` can be installed on Rust stable, but only runs with cargo with `cargo +nightly udeps` + assert_match "error: the option `Z` is only accepted on the nightly compiler", output + end + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"cargo-udeps", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/cargo-update.rb b/Formula/c/cargo-update.rb new file mode 100644 index 0000000000000..4674e2b42a679 --- /dev/null +++ b/Formula/c/cargo-update.rb @@ -0,0 +1,53 @@ +class CargoUpdate < Formula + desc "Cargo subcommand for checking and applying updates to installed executables" + homepage "https://github.com/nabijaczleweli/cargo-update" + url "https://github.com/nabijaczleweli/cargo-update/archive/refs/tags/v18.0.0.tar.gz" + sha256 "cfa56d6c5fb2d7d1536efb4765031731fe70bf1a8246757a7a9d6a4a046e640f" + license "MIT" + head "https://github.com/nabijaczleweli/cargo-update.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3c60c3bea3d800efc1f2ac66d117a4544b31d9e92ccde2e60e65e534ac16754b" + sha256 cellar: :any, arm64_sequoia: "56a8338b18b4980b7c1744cc2b5fbbf44078489ab9ef452c4d7aa9090322d142" + sha256 cellar: :any, arm64_sonoma: "9d69c9a9d118e83a99b6ac038ae9ba8221655fe55c3e4b12e4827e74f9fc358c" + sha256 cellar: :any, arm64_ventura: "ce025543bc177fe07820d3b64a55664d61945fa2f17b2502b2c4cf4d64fefdf4" + sha256 cellar: :any, sonoma: "2d3265e8c1ebf47db152196dc0203f8a180c914daa6065cc28f8e2183c14c43d" + sha256 cellar: :any, ventura: "521005f06bc948e75d409be52a2323a7e18bba69fafca15c793890b6295dadba" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6b411ecebb18145799d683784ab80492f737d4c392b3327ee1cc31e053eb59d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32753c7f3beb9525ee63d56bbf41c2bee392f17f3df1cbff1569f4256b863afa" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + # Ensure the correct `openssl` will be picked up. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + assert_match version.to_s, shell_output("cargo install-update --version") + + output = shell_output("cargo install-update -a") + assert_match "No packages need updating", output + end +end diff --git a/Formula/c/cargo-watch.rb b/Formula/c/cargo-watch.rb new file mode 100644 index 0000000000000..ad10aeb361a22 --- /dev/null +++ b/Formula/c/cargo-watch.rb @@ -0,0 +1,41 @@ +class CargoWatch < Formula + desc "Watches over your Cargo project's source" + homepage "https://watchexec.github.io/#cargo-watch" + url "https://github.com/watchexec/cargo-watch/archive/refs/tags/v8.5.3.tar.gz" + sha256 "1884674d19492727d762da91b9aebc05d29bdb34cdb1903cde36d81edbcc6514" + license "CC0-1.0" + head "https://github.com/watchexec/cargo-watch.git", branch: "8.x" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2498b5772d684e6b6021a83c7e4f5c390b089fb0e206a8fc000d2bb670736b6c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e89525ad4d4dcff0e84930435fafab04934a7ed2cf2701e5747a9d953c9e9b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d767cc28d20886e772e0ba5ea5b32be862b609d79ddaf8f8dd7dfde4e1cbb8a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d4f823712d892ad4cea59e3a9efb158f2aa03966df7f0ac970b9c5656476e9f3" + sha256 cellar: :any_skip_relocation, sonoma: "17bf2377ccc8158f7eee24184f71b4d655fd6257085aad7ee18a0afcec3354c4" + sha256 cellar: :any_skip_relocation, ventura: "28a8bfc9784300c03deddccfde05dd22bb83d018c735275e2f2ea4df77a20faa" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e1f3420f8e56134c4c42400399b67ea3e3389490ed5fd6d5fbce8b3b93289f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bc56bac3a510bfeb102997b3bdba25b01f83dddf771b116c46ef101dc8df988" + end + + deprecate! date: "2025-04-27", because: :repo_archived + + depends_on "rust" => :build + depends_on "rustup" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + output = shell_output("#{bin}/cargo-watch -x build 2>&1", 1) + assert_match "error: project root does not exist", output + + assert_equal "cargo-watch #{version}", shell_output("#{bin}/cargo-watch --version").strip + end +end diff --git a/Formula/c/cargo-zigbuild.rb b/Formula/c/cargo-zigbuild.rb new file mode 100644 index 0000000000000..4fc936aa1702b --- /dev/null +++ b/Formula/c/cargo-zigbuild.rb @@ -0,0 +1,44 @@ +class CargoZigbuild < Formula + desc "Compile Cargo project with zig as linker" + homepage "https://github.com/rust-cross/cargo-zigbuild" + url "https://github.com/rust-cross/cargo-zigbuild/archive/refs/tags/v0.20.1.tar.gz" + sha256 "0efcc28c320c14798859a85e15c9892372092d661a9e4d0cd03010d7ae761270" + license "MIT" + head "https://github.com/rust-cross/cargo-zigbuild.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0295adfc97e5e49159b7da84c2c8f844669a1dc02035a01ffab1c1f577fd14fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "139cca9e9f79e8f13d0e87fee0199442e42d3b1328c3d4c282795243f316f090" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c98f28208325ead1b7770ac0465a6f3010860142799a43b8ba276a1a58f73afd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0dc980ee43eff560c42878c0c1d47f6f165f667aea6ab2d7db743b5b96917e76" + sha256 cellar: :any_skip_relocation, sonoma: "87fc281f86cdc74f2725c2882759138055f158fb630893d281aecb0f7cab6311" + sha256 cellar: :any_skip_relocation, ventura: "1914d6e520ce2bbd687217cc655ae36aaec646429362a52973c0b0ae9d9f673a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fc410efe6c247a06e3136b2def0effccf52340633cdb04d61fb8f2ec32219be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c72e6d2ba004e31387a451a01982dbd3cc2399b660b56a4926281357432f2073" + end + + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "zig" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Remove errant CPATH environment variable for `cargo zigbuild` test + # https://github.com/ziglang/zig/issues/10377 + ENV.delete "CPATH" + ENV.delete "RUSTFLAGS" + + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + system "rustup", "target", "add", "aarch64-unknown-linux-gnu" + + system "cargo", "new", "hello_world", "--bin" + cd "hello_world" do + system "cargo", "zigbuild", "--target", "aarch64-unknown-linux-gnu" + end + end +end diff --git a/Formula/c/cariddi.rb b/Formula/c/cariddi.rb new file mode 100644 index 0000000000000..52f3dd4c0c668 --- /dev/null +++ b/Formula/c/cariddi.rb @@ -0,0 +1,30 @@ +class Cariddi < Formula + desc "Scan for endpoints, secrets, API keys, file extensions, tokens and more" + homepage "https://github.com/edoardottt/cariddi" + url "https://github.com/edoardottt/cariddi/archive/refs/tags/v1.4.3.tar.gz" + sha256 "cc8d9202af6e13fc44a79e6d4380592df3c28bdf7c078a92ff0f62732b9c6882" + license "GPL-3.0-or-later" + head "https://github.com/edoardottt/cariddi.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "930d5513059d88f7ae9930d6a52c6b22740b7f7244e4026c72896be4c2f9ddfc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "930d5513059d88f7ae9930d6a52c6b22740b7f7244e4026c72896be4c2f9ddfc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "930d5513059d88f7ae9930d6a52c6b22740b7f7244e4026c72896be4c2f9ddfc" + sha256 cellar: :any_skip_relocation, sonoma: "f4220d6066dcc119d35932ccfd13cec1bed4ff528c480336e3d6f1f000b79ced" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b1234dabf76b85b33d4dfb6822a1115ba0ba44ff787803f254f925a09b258c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c598cf7c84333d0e659ad87d1c96f67b79fd5ab367eea1311eddb993cb45cda" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cariddi" + end + + test do + output = pipe_output(bin/"cariddi", "http://testphp.vulnweb.com") + assert_match "http://testphp.vulnweb.com/login.php", output + + assert_match version.to_s, shell_output("#{bin}/cariddi -version 2>&1") + end +end diff --git a/Formula/c/carla.rb b/Formula/c/carla.rb new file mode 100644 index 0000000000000..455d8c46d4a1f --- /dev/null +++ b/Formula/c/carla.rb @@ -0,0 +1,73 @@ +class Carla < Formula + desc "Audio plugin host supporting LADSPA, LV2, VST2/3, SF2 and more" + homepage "https://kx.studio/Applications:Carla" + license "GPL-2.0-or-later" + revision 1 + + stable do + url "https://github.com/falkTX/Carla/archive/refs/tags/v2.5.10.tar.gz" + sha256 "ae2835b12081f7271a6b0b25d34b87d36b022c40370028ca4a10f90fcedfa661" + + # TODO: Use `pyqt` and `qt` from HEAD in 2.6.0 + depends_on "pyqt@5" + depends_on "qt@5" + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e262b34d4e21d5ca0d5abbd27a19ee022eb195a52c0622c814456e1cd95f1454" + sha256 cellar: :any, arm64_sequoia: "67daad4cbe5241d8c83ed16f26f4de4f4ca40c737895428da7c0924fb3bf6a6c" + sha256 cellar: :any, arm64_sonoma: "3757c8d6ac0389d6181b9dfb7ab66d48dc426bfe310715756f4c6b2fd408f11a" + sha256 cellar: :any, sonoma: "cd9c3cfbd45c97b0a82fc238c0dc96a4ba41f523459eddb07d8541319482c8b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "b951b632b5eed8b2600195552a1dea945cc16cc79d8a6a1059fec105f1e0742e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ed922b11d7bb6755b0745ad5a51fb581909d653263830b41639299272ae3ff3" + end + + head do + url "https://github.com/falkTX/Carla.git", branch: "main" + + depends_on "pyqt" + depends_on "qtbase" + depends_on "qtsvg" + end + + depends_on "pkgconf" => :build + + depends_on "fluid-synth" + depends_on "liblo" + depends_on "libmagic" + depends_on "libsndfile" + depends_on "python@3.14" + + on_linux do + depends_on "alsa-lib" + depends_on "freetype" + depends_on "libx11" + depends_on "mesa" + depends_on "pulseaudio" + depends_on "sdl2" + end + + def install + # Workaround for https://github.com/falkTX/Carla/issues/1926 + if build.stable? && OS.mac? && MacOS.version >= :sequoia + odie "Remove deployment target!" if version >= "2.6" + ENV["MACOSX_DEPLOYMENT_TARGET"] = "14.0" + end + + system "make" + system "make", "install", "PREFIX=#{prefix}" + + inreplace bin/"carla", "PYTHON=$(which python3 2>/dev/null)", + "PYTHON=#{which("python3.14")}" + end + + test do + system bin/"carla", "--version" + system lib/"carla/carla-discovery-native", "internal", ":all" + end +end diff --git a/Formula/c/carrot2.rb b/Formula/c/carrot2.rb new file mode 100644 index 0000000000000..92d6a1ca64544 --- /dev/null +++ b/Formula/c/carrot2.rb @@ -0,0 +1,63 @@ +class Carrot2 < Formula + desc "Search results clustering engine" + homepage "https://search.carrot2.org/" + url "https://github.com/carrot2/carrot2.git", + tag: "release/4.8.3", + revision: "e2e57a553b8d6015af23f43dfff245157a267bc8" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "851efb7ea413d096ad2ff96f9d2f726507065f8107922af401a87b7d65b8edce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "526625534a78b14fce2023d2927daec0b69b114c8974d4a868f3aafeeb935b47" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f977963b7a9c05ccf28d598b03b9ea585ab185613a314122ac39fbb74114a93" + sha256 cellar: :any_skip_relocation, sonoma: "6afd51b10e424be4f15eba55fc0458ab9146b7d9c9e6244a4c48cc36ed73fe18" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f457acbc704c8bf66dbcec5cb24d44017f572fe88187536ecc2d363204d24f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73d0c05cf12b9da21aae87335be309884c8c682f65195ac31872176a5b9da2a8" + end + + depends_on "gradle" => :build + depends_on "node@22" => :build + depends_on "yarn" => :build + depends_on "openjdk" + + on_linux do + on_arm do + depends_on "python-setuptools" => :build + end + end + + def install + # Make possible to build the formula with the latest available in Homebrew gradle + inreplace "gradle/wrapper/gradle-wrapper.properties", "gradle-8.14", "gradle-#{Formula["gradle"].version}" + + # Use yarn and node from Homebrew + inreplace "gradle/node/yarn-projects.gradle", "download = true", "download = false" + inreplace "gradle/libs.versions.toml" do |s| + s.gsub! "node = \"18.18.2\"", "node = \"#{Formula["node@22"].version}\"" + s.gsub! "yarn = \"1.22.19\"", "yarn = \"#{Formula["yarn"].version}\"" + end + + system "gradle", "assemble", "--no-daemon" + + cd "distribution/build/dist" do + inreplace "dcs/conf/logging/appender-file.xml", "${dcs:home}/logs", var/"log/carrot2" + libexec.install Dir["*"] + end + + (bin/"carrot2").write_env_script "#{libexec}/dcs/dcs", + JAVA_CMD: "exec '#{Formula["openjdk"].opt_bin}/java'", + SCRIPT_HOME: libexec/"dcs" + end + + service do + run opt_bin/"carrot2" + working_dir opt_libexec + end + + test do + port = free_port + spawn bin/"carrot2", "--port", port.to_s + sleep 20 + assert_match "Lingo", shell_output("curl -s localhost:#{port}/service/list") + end +end diff --git a/Formula/c/carthage.rb b/Formula/c/carthage.rb new file mode 100644 index 0000000000000..c9f4e3b42d171 --- /dev/null +++ b/Formula/c/carthage.rb @@ -0,0 +1,37 @@ +class Carthage < Formula + desc "Decentralized dependency manager for Cocoa" + homepage "https://github.com/Carthage/Carthage" + url "https://github.com/Carthage/Carthage.git", + tag: "0.40.0", + revision: "e33e133a5427129b38bfb1ae18d8f56b29a93204" + license "MIT" + head "https://github.com/Carthage/Carthage.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20456de113008e847a0b4abbafcb6e829a537d8aec2f60702114b5978b3839c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ab671fcc4b39986c412e44002456ec71e5ee23ac9574bcbe653f2c7f1e0c3c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "01fa70c2d94efb0b4da3c593708f931e383f99a93e8461fda85804d08564815d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48370b2f3289b9a3b1cfbdc41d0a7507cf12959f766aae5e26f99d03b92777aa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "576e684309365ad8e3d16a208267527747dbc97554c3646f78006d49843681f5" + sha256 cellar: :any_skip_relocation, sonoma: "6e5ee2180ddfa8a7e3675a49ad20ab17d4ffe2ce5519653ec7b738e62665ca1a" + sha256 cellar: :any_skip_relocation, ventura: "49ec2dc81b3753ea8d83f9b8e4308bf6603f1c8f674df847c7ec86f93d96c0ca" + sha256 cellar: :any_skip_relocation, monterey: "4f79410a86ad31251c4993ac3333181245633600ef66906634fbbf64e1c0661d" + end + + depends_on xcode: ["10.0", :build] + depends_on :macos + + def install + system "make", "prefix_install", "PREFIX=#{prefix}" + bash_completion.install "Source/Scripts/carthage-bash-completion" => "carthage" + zsh_completion.install "Source/Scripts/carthage-zsh-completion" => "_carthage" + fish_completion.install "Source/Scripts/carthage-fish-completion" => "carthage.fish" + end + + test do + (testpath/"Cartfile").write 'github "jspahrsummers/xcconfigs"' + system bin/"carthage", "update" + end +end diff --git a/Formula/c/carton.rb b/Formula/c/carton.rb new file mode 100644 index 0000000000000..639cc0d689d9f --- /dev/null +++ b/Formula/c/carton.rb @@ -0,0 +1,192 @@ +class Carton < Formula + desc "Perl module dependency manager (aka Bundler for Perl)" + homepage "https://metacpan.org/pod/Carton" + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz" + sha256 "9c4558ca97cd08b69fdfb52b28c3ddc2043ef52f0627b90e53d05a4087344175" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/perl-carton/carton.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7cf6c91209b768cb3e963c1eb14131efe738a851748d61d9adf402c274beeabf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "228551b5317d850f5ba6cc3dcf31eced4f9df54d28a804ce0dbf24652ca30e75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "378f8a49ede0e31685f2086f07967294534e910c18d5427542b2b9093dbe57c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8b540a262fd997261a20add377f931b7eb4ddfd496954a7af4adb7d692abca3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4ed93b6f36dcfcbda3cf60bd27d204ed6e3fef9837a2c604baf5134e5133a75d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ed93b6f36dcfcbda3cf60bd27d204ed6e3fef9837a2c604baf5134e5133a75d" + sha256 cellar: :any_skip_relocation, sonoma: "39ecbbd646dfc4ff3e31efbe751de4917316655add730757dc30c558310f1b4d" + sha256 cellar: :any_skip_relocation, ventura: "1488d2dde96fc144cd7e787b90930275bf1e291850bca2feb2a7639bab69c7d5" + sha256 cellar: :any_skip_relocation, monterey: "ae0fcb618fd8b91fb40d7e52ed07d1ccb8a76ef5fabe0f7a73772f7f63a9979f" + sha256 cellar: :any_skip_relocation, big_sur: "ae0fcb618fd8b91fb40d7e52ed07d1ccb8a76ef5fabe0f7a73772f7f63a9979f" + sha256 cellar: :any_skip_relocation, catalina: "ae0fcb618fd8b91fb40d7e52ed07d1ccb8a76ef5fabe0f7a73772f7f63a9979f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b81c0ac17f7fe741e5129166180f44ea13271b3dd283efd97dd4b5b4b0f9cb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b241c14b6caf27b5e0a7eb694e31c186a60670a72a47834eda4883947ce5b89" + end + + depends_on "perl" + + resource "CPAN::Common::Index" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Common-Index-0.010.tar.gz" + sha256 "c43ddbb22fd42b06118fe6357f53700fbd77f531ba3c427faafbf303cbf4eaf0" + end + + resource "CPAN::DistnameInfo" do + url "https://cpan.metacpan.org/authors/id/G/GB/GBARR/CPAN-DistnameInfo-0.12.tar.gz" + sha256 "2f24fbe9f7eeacbc269d35fc61618322fc17be499ee0cd9018f370934a9f2435" + end + + resource "CPAN::Meta::Check" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/CPAN-Meta-Check-0.014.tar.gz" + sha256 "28a0572bfc1c0678d9ce7da48cf521097ada230f96eb3d063fcbae1cfe6a351f" + end + + resource "Capture::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz" + sha256 "6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19" + end + + resource "Class::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-1.008.tar.gz" + sha256 "ee058a63912fa1fcb9a72498f56ca421a2056dc7f9f4b67837446d6421815615" + end + + resource "ExtUtils::Config" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.008.tar.gz" + sha256 "ae5104f634650dce8a79b7ed13fb59d67a39c213a6776cfdaa3ee749e62f1a8c" + end + + resource "ExtUtils::Helpers" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz" + sha256 "de901b6790a4557cf4ec908149e035783b125bf115eb9640feb1bc1c24c33416" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz" + sha256 "84735e3037bab1fdffa3c2508567ad412a785c91599db3c12593a50a1dd434ed" + end + + resource "ExtUtils::MakeMaker::CPANfile" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.09.tar.gz" + sha256 "2c077607d4b0a108569074dff76e8168659062ada3a6af78b30cca0d40f8e275" + end + + resource "File::Which" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz" + sha256 "3201f1a60e3f16484082e6045c896842261fc345de9fb2e620fd2a2c7af3a93a" + end + + resource "File::pushd" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-pushd-1.016.tar.gz" + sha256 "d73a7f09442983b098260df3df7a832a5f660773a313ca273fa8b56665f97cdc" + end + + resource "HTTP::Tinyish" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-0.17.tar.gz" + sha256 "47bd111e474566d733c41870e2374c81689db5e0b5a43adc48adb665d89fb067" + end + + resource "IPC::Run3" do + url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/IPC-Run3-0.048.tar.gz" + sha256 "3d81c3cc1b5cff69cca9361e2c6e38df0352251ae7b41e2ff3febc850e463565" + end + + resource "Menlo" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-1.9019.tar.gz" + sha256 "3b573f68e7b3a36a87c860be258599330fac248b518854dfb5657ac483dca565" + end + + resource "Menlo::Legacy" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-Legacy-1.9022.tar.gz" + sha256 "a6acac3fee318a804b439de54acbc7c27f0b44cfdad8551bbc9cd45986abc201" + end + + resource "Module::CPANfile" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Module-CPANfile-1.1004.tar.gz" + sha256 "88efbe2e9a642dceaa186430fedfcf999aaf0e06f6cced28a714b8e56b514921" + end + + resource "Parse::PMFile" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Parse-PMFile-0.43.tar.gz" + sha256 "be61e807204738cf0c52ed321551992fdc7fa8faa43ed43ff489d0c269900623" + end + + resource "Path::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.122.tar.gz" + sha256 "4bc6f76d0548ccd8b38cb66291a885bf0de453d0167562c7b82e8861afdcfb7c" + end + + resource "String::ShellQuote" do + url "https://cpan.metacpan.org/authors/id/R/RO/ROSCH/String-ShellQuote-1.04.tar.gz" + sha256 "e606365038ce20d646d255c805effdd32f86475f18d43ca75455b00e4d86dd35" + end + + resource "Tie::Handle::Offset" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Tie-Handle-Offset-0.004.tar.gz" + sha256 "ee9f39055dc695aa244a252f56ffd37f8be07209b337ad387824721206d2a89e" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.10.tar.gz" + sha256 "16325d5e308c7b7ab623d1bf944e1354c5f2245afcfadb8eed1e2cae9a0bd0b5" + end + + resource "Win32::ShellQuote" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Win32-ShellQuote-0.003001.tar.gz" + sha256 "aa74b0e3dc2d41cd63f62f853e521ffd76b8d823479a2619e22edb4049b4c0dc" + end + + resource "local::lib" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000029.tar.gz" + sha256 "8df87a10c14c8e909c5b47c5701e4b8187d519e5251e87c80709b02bb33efdd7" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + + (bin/"carton").write_env_script("#{libexec}/bin/carton", PERL5LIB: ENV["PERL5LIB"]) + man1.install_symlink libexec/"man/man1/carton.1" + man3.install_symlink Dir[libexec/"man/man3/Carton*"] + end + + test do + (testpath/"cpanfile").write <<~EOS + requires 'Perl::Tutorial'; + EOS + system bin/"carton", "install" + + expected = <<~EOS + NAME + Perl::Tutorial::HelloWorld - Hello World for Perl + + SYNOPSIS + #!/usr/bin/perl + # + # The traditional first program. + + # Strict and warnings are recommended. + use strict; + use warnings; + + # Print a message. + print "Hello, World!\\n"; + EOS + assert_match expected, + shell_output("#{bin}/carton exec perldoc Perl::Tutorial::HelloWorld") + end +end diff --git a/Formula/c/cartridge-cli.rb b/Formula/c/cartridge-cli.rb new file mode 100644 index 0000000000000..008be53f0bcdc --- /dev/null +++ b/Formula/c/cartridge-cli.rb @@ -0,0 +1,43 @@ +class CartridgeCli < Formula + desc "Tarantool Cartridge command-line utility" + homepage "https://tarantool.org/" + url "https://github.com/tarantool/cartridge-cli.git", + tag: "2.12.12", + revision: "7f7efcfd4aaf7a2b4061f8424b6843a462794ed6" + license "BSD-2-Clause" + head "https://github.com/tarantool/cartridge-cli.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13ac19b7e55935af401fefa00a9fbc09839e7f39074eb1a4703d82fc60599f53" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c347030987d8638b17325dedf3ecd8a8271de8f1333aa086f7cfb0777c0ff8ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bec51f07e6312f149f7d4dfadbbb9475de7dba2cae02d65f3ad4c5cc07b4305b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a7b997d1e63a70c5c0105897c6d0299d7df81b3b90d2a4b8c80966950a86bb4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8933d2dccd2dfaeaa4e7082fe7df22bef8c8a8937187e7985ce5a6d367ad7d9c" + sha256 cellar: :any_skip_relocation, sonoma: "874bc7b926c982d443adb209a19969ad5032f2e35d1a910244dec1811f998409" + sha256 cellar: :any_skip_relocation, ventura: "a64cba32bee84f91839d527ce7abc3ec6a2d615ba82958940095e4358aafc771" + sha256 cellar: :any_skip_relocation, monterey: "7f4458bfa8b116866c305eac02b5fac4fcbd2b210a903ad2026003fa1782119b" + sha256 cellar: :any_skip_relocation, arm64_linux: "3637454fe1c7db9dccdddebca64969bd78e4fff3f3ca69c773a2f409dec60974" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81f45b6fa23e7590d4aa466946ce87f8b8fa9dec0fb3863f853d3131c8659c61" + end + + depends_on "go" => :build + depends_on "mage" => :build + + def install + system "mage", "build" + bin.install "cartridge" + generate_completions_from_executable(bin/"cartridge", "gen", "completion", + shells: [:bash, :zsh], + shell_parameter_format: :none) + end + + test do + project_path = Pathname("test-project") + rm_r(project_path) if project_path.exist? + system bin/"cartridge", "create", "--name", project_path + assert_path_exists project_path + assert_path_exists project_path.join("init.lua") + end +end diff --git a/Formula/c/cascadia.rb b/Formula/c/cascadia.rb new file mode 100644 index 0000000000000..460dc7af8563b --- /dev/null +++ b/Formula/c/cascadia.rb @@ -0,0 +1,41 @@ +class Cascadia < Formula + desc "Go cascadia package command-line CSS selector" + homepage "https://github.com/suntong/cascadia" + url "https://github.com/suntong/cascadia/archive/refs/tags/v1.3.0.tar.gz" + sha256 "1ee285d683aa3956dbeb28cd9ee2c60f0ab3a5da8e66a98ca3fb718d3214b775" + license "MIT" + head "https://github.com/suntong/cascadia.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d3ddf72b0aa270f3513e2dec838ab2d8a9543d930e076fd2fc784b193116764c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00fe59bee9982cea9cb64dbcddf32a802c6eda7b57d368413bca58ad720ebf46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c632f95d33e3db0a0ec037480cc5763b0d9d157588f0bbd921b886c42ed6c47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "506f6721049179118bea0514854909832198d552c52bb122f1648c17b91ab7dc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "506f6721049179118bea0514854909832198d552c52bb122f1648c17b91ab7dc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "506f6721049179118bea0514854909832198d552c52bb122f1648c17b91ab7dc" + sha256 cellar: :any_skip_relocation, sonoma: "808dc91548c40f330a18db98b194dcd18d21462323040ec3342826279a50c137" + sha256 cellar: :any_skip_relocation, ventura: "bd7802721fdc17cfa6a5c99688899786c5d850679c83a3fa9cbbdb91a490ae53" + sha256 cellar: :any_skip_relocation, monterey: "bd7802721fdc17cfa6a5c99688899786c5d850679c83a3fa9cbbdb91a490ae53" + sha256 cellar: :any_skip_relocation, big_sur: "bd7802721fdc17cfa6a5c99688899786c5d850679c83a3fa9cbbdb91a490ae53" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a686246bda98826d65f1467fad2701e3ded1e2e872be2f41e8b356943004a09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "526b3788f4ac0884adfd8b6603bb0e8fe5719d77cca281ad5846b45f3c729106" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "Version #{version}", shell_output("#{bin}/cascadia --help") + + test_html = "aaabbb" + test_css_selector = "foo > bar" + expected_html_output = "aaa" + assert_equal expected_html_output, + pipe_output("#{bin}/cascadia --in --out --css '#{test_css_selector}'", test_html).strip + end +end diff --git a/Formula/c/cask.rb b/Formula/c/cask.rb new file mode 100644 index 0000000000000..fdf2e974207ad --- /dev/null +++ b/Formula/c/cask.rb @@ -0,0 +1,36 @@ +class Cask < Formula + desc "Emacs dependency management" + homepage "https://cask.readthedocs.io/" + url "https://github.com/cask/cask/archive/refs/tags/v0.9.1.tar.gz" + sha256 "755e71b7291678787afd497e34724004459add3e438d367e83891080f6d545a3" + license "GPL-3.0-or-later" + head "https://github.com/cask/cask.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "57e45b5a8f5624932427a20879ead2c11b3d007b2b2bfbf751995219c4b1e7fe" + end + + depends_on "coreutils" + depends_on "emacs" + + def install + bin.install "bin/cask" + # Lisp files must stay here: https://github.com/cask/cask/issues/305 + prefix.install Dir["*.el"] + prefix.install "package-build" + elisp.install_symlink prefix/"cask.el" + elisp.install_symlink prefix/"cask-bootstrap.el" + + # Stop cask performing self-upgrades. + touch prefix/".no-upgrade" + end + + test do + (testpath/"Cask").write <<~LISP + (source gnu) + (depends-on "chess") + LISP + system bin/"cask", "install" + (testpath/".cask").directory? + end +end diff --git a/Formula/c/cassandra-cpp-driver.rb b/Formula/c/cassandra-cpp-driver.rb new file mode 100644 index 0000000000000..508c8e6be54d3 --- /dev/null +++ b/Formula/c/cassandra-cpp-driver.rb @@ -0,0 +1,80 @@ +class CassandraCppDriver < Formula + desc "DataStax C/C++ Driver for Apache Cassandra" + homepage "https://docs.datastax.com/en/developer/cpp-driver/latest" + url "https://github.com/datastax/cpp-driver/archive/refs/tags/2.17.1.tar.gz" + sha256 "53b4123aad59b39f2da0eb0ce7fe0e92559f7bba0770b2e958254f17bffcd7cf" + license "Apache-2.0" + head "https://github.com/datastax/cpp-driver.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c04a494d22b97cca89c1ddb9cc56a0134bf5c4091356869585cb66eafc369c2a" + sha256 cellar: :any, arm64_sequoia: "168561f07967977a48fb1a0568b3a90d8c6f2e04eb725758924cc0d04b494b4e" + sha256 cellar: :any, arm64_sonoma: "6d7789edcadff5905b4108444595d617ff24e99d54a7014afc2ce5c1a8d64c95" + sha256 cellar: :any, arm64_ventura: "4b26c05be9b460b2359176859b9a4949d7f9d675f2ac9a3bf729e21c3dc5edc4" + sha256 cellar: :any, arm64_monterey: "c1589d2e2cc229a10e1d87e94612bbf55b9bdd4ab079a06563ce766b103c2c42" + sha256 cellar: :any, sonoma: "b02aef7c39651dd641588be99ffbd45d1febf4bd79acf506c26934a1582fe387" + sha256 cellar: :any, ventura: "4febd908b491a13787addbec6dad2dc98182f0d45cead041f8a493f0938f565c" + sha256 cellar: :any, monterey: "dc2ad2c4d0153746a2ca9f50525d95e1b45c25a4c3a4b19c0525b6522f261f98" + sha256 cellar: :any_skip_relocation, arm64_linux: "46a41b8a44c7b3ee0d5b84992a3ee52fc8c01edafbe1e875fcfcf9cce64b98ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "566d29b795409300c8444c185f335a91df5f05bfde6dd303d12154bd83b6ec6b" + end + + depends_on "cmake" => :build + depends_on "libuv" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + end + + def install + # Fix to error: Unsupported compiler: AppleClang + inreplace "CMakeLists.txt", 'STREQUAL "Clang"', 'STREQUAL "AppleClang"' if OS.mac? + + # Workaround for CMake 4 compatibility + args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DLIBUV_ROOT_DIR=#{Formula["libuv"].opt_prefix} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char* argv[]) { + CassCluster* cluster = cass_cluster_new(); + CassSession* session = cass_session_new(); + + CassFuture* future = cass_session_connect(session, cluster); + + // Because we haven't set any contact points, this connection + // should fail even if a server is running locally + CassError error = cass_future_error_code(future); + if (error != CASS_OK) { + printf("connection failed"); + } + + cass_future_free(future); + + cass_session_free(session); + cass_cluster_free(cluster); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcassandra", "-o", "test" + assert_equal "connection failed", shell_output("./test") + end +end diff --git a/Formula/c/cassandra-reaper.rb b/Formula/c/cassandra-reaper.rb new file mode 100644 index 0000000000000..3ad37a984e088 --- /dev/null +++ b/Formula/c/cassandra-reaper.rb @@ -0,0 +1,53 @@ +class CassandraReaper < Formula + desc "Management interface for Cassandra" + homepage "https://cassandra-reaper.io/" + url "https://github.com/thelastpickle/cassandra-reaper/releases/download/4.0.1/cassandra-reaper-4.0.1-release.tar.gz" + sha256 "51296815255194a94e4e04a96bd846c88e3767fd60118e7850a39b60bdd5d7ae" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "145736d91d9b5ec2354708a4774fb2f0945185d40da2309221754a0de567cee5" + end + + depends_on "openjdk" + + def install + inreplace Dir["resource/*.yaml"], " /var/log", " #{var}/log" + inreplace "bin/cassandra-reaper", "/usr/local/share", share + inreplace "bin/cassandra-reaper", "/usr/local/etc", etc + + libexec.install "bin/cassandra-reaper" + prefix.install "bin" + etc.install "resource" => "cassandra-reaper" + share.install "server/target" => "cassandra-reaper" + + (bin/"cassandra-reaper").write_env_script libexec/"cassandra-reaper", + Language::Java.overridable_java_home_env + end + + service do + run opt_bin/"cassandra-reaper" + keep_alive true + error_log_path var/"log/cassandra-reaper/service.err" + log_path var/"log/cassandra-reaper/service.log" + end + + test do + ENV["REAPER_AUTH_USER"] = "admin" + ENV["REAPER_AUTH_PASSWORD"] = "admin" + ENV["REAPER_READ_USER"] = "" + ENV["REAPER_READ_USER_PASSWORD"] = "" + + cp etc/"cassandra-reaper/cassandra-reaper.yaml", testpath + port = free_port + inreplace "cassandra-reaper.yaml" do |s| + s.gsub! "port: 8080", "port: #{port}" + s.gsub! "port: 8081", "port: #{free_port}" + s.gsub! "storageType: memory", "storageType: memory\npersistenceStoragePath: #{testpath}/persistence" + end + + spawn bin/"cassandra-reaper", testpath/"cassandra-reaper.yaml" + sleep 40 + assert_match "200 OK", shell_output("curl -Im3 -o- http://localhost:#{port}/webui/login.html") + end +end diff --git a/Formula/c/cassandra.rb b/Formula/c/cassandra.rb new file mode 100644 index 0000000000000..b8f99137dca60 --- /dev/null +++ b/Formula/c/cassandra.rb @@ -0,0 +1,150 @@ +class Cassandra < Formula + include Language::Python::Virtualenv + include Language::Python::Shebang + + desc "Eventually consistent, distributed key-value store" + homepage "https://cassandra.apache.org" + url "https://www.apache.org/dyn/closer.lua?path=cassandra/5.0.6/apache-cassandra-5.0.6-bin.tar.gz" + mirror "https://archive.apache.org/dist/cassandra/5.0.6/apache-cassandra-5.0.6-bin.tar.gz" + sha256 "50033c31dc620c17fb0d8931c7a950ffe66e457cbf6eff1b7f94cba929344d4c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0de4d2dcd50ab4a0b3aaa4dccf008d358d78226f7b21dfd3b2297ff667762c73" + sha256 cellar: :any, arm64_sequoia: "523dbf2e3fb561d07ea93d39fb220bc10eba243ff174fc89e8ceab85dea0e891" + sha256 cellar: :any, arm64_sonoma: "cbd471c203a18c9c22079fd08c3e2d18d7cb935b6082adfc08cb8b1deef77128" + sha256 cellar: :any, sonoma: "0efec8e3d2a3127251d8272d781b6aef07443702e56bf4a02089dd2428d54879" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bd31534c91dfd6979bbb6d169871918fc3854ff7ede8624f15a03f4bdd8c181" + sha256 cellar: :any_skip_relocation, x86_64_linux: "707e81f60da7fd7e2cd1a68af2cc3523a1ef66d1278bc2e1bedb44c108baff0b" + end + + depends_on "libev" + depends_on "openjdk@17" + depends_on "python@3.11" # required 3.8-3.11, https://github.com/apache/cassandra/blob/trunk/bin/cqlsh#L65-L73 + + conflicts_with "emqx", because: "both install `nodetool` binaries" + + pypi_packages package_name: "", + extra_packages: ["cassandra-driver", "wcwidth"] + + resource "cassandra-driver" do + url "https://files.pythonhosted.org/packages/06/47/4e0fbdf02a7a418997f16f59feba26937d9973b979d3f23d79fbd8f6186f/cassandra_driver-3.29.3.tar.gz" + sha256 "ff6b82ee4533f6fd4474d833e693b44b984f58337173ee98ed76bce08721a636" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "geomet" do + url "https://files.pythonhosted.org/packages/2a/8c/dde022aa6747b114f6b14a7392871275dea8867e2bd26cddb80cc6d66620/geomet-1.1.0.tar.gz" + sha256 "51e92231a0ef6aaa63ac20c443377ba78a303fd2ecd179dc3567de79f3c11605" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + (var/"lib/cassandra").mkpath + (var/"log/cassandra").mkpath + + python3 = "python3.11" + venv = virtualenv_create(libexec/"vendor", python3) + venv.pip_install resources + + inreplace "conf/cassandra.yaml", "/var/lib/cassandra", var/"lib/cassandra" + inreplace "conf/cassandra-env.sh", "/lib/", "/" + + inreplace "bin/cassandra", "-Dcassandra.logdir=$CASSANDRA_LOG_DIR", + "-Dcassandra.logdir=#{var}/log/cassandra" + inreplace "bin/cassandra.in.sh" do |s| + s.gsub! "CASSANDRA_HOME=\"`dirname \"$0\"`/..\"", + "CASSANDRA_HOME=\"#{libexec}\"" + # Store configs in etc, outside of keg + s.gsub! "CASSANDRA_CONF=\"$CASSANDRA_HOME/conf\"", + "CASSANDRA_CONF=\"#{etc}/cassandra\"" + # Jars installed to prefix, no longer in a lib folder + s.gsub! "\"$CASSANDRA_HOME\"/lib/*.jar", + "\"$CASSANDRA_HOME\"/*.jar" + # The jammm Java agent is not in a lib/ subdir either: + s.gsub! "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/lib/jamm-", + "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/jamm-" + # Storage path + s.gsub! "cassandra_storagedir=\"$CASSANDRA_HOME/data\"", + "cassandra_storagedir=\"#{var}/lib/cassandra\"" + + s.gsub! "#JAVA_HOME=/usr/local/jdk6", + "JAVA_HOME=#{Language::Java.overridable_java_home_env("17")[:JAVA_HOME]}" + end + + rm Dir["bin/*.bat", "bin/*.ps1"] + + # This breaks on `brew uninstall cassandra && brew install cassandra` + # https://github.com/Homebrew/homebrew/pull/38309 + pkgetc.install Dir["conf/*"] + + libexec.install Dir["*.txt", "{bin,interface,javadoc,pylib,lib/licenses}"] + libexec.install Dir["lib/*.jar"] + + pkgshare.install [libexec/"bin/cassandra.in.sh", libexec/"bin/stop-server"] + inreplace Dir[ + libexec/"bin/cassandra*", + libexec/"bin/debug-cql", + libexec/"bin/nodetool", + libexec/"bin/sstable*", + ], %r{`dirname "?\$0"?`/cassandra.in.sh}, + pkgshare/"cassandra.in.sh" + + # Make sure tools are installed + rm Dir[buildpath/"tools/bin/*.bat"] # Delete before install to avoid copying useless files + (libexec/"tools").install Dir[buildpath/"tools/lib/*.jar"] + + # Tools use different cassandra.in.sh and should be changed differently + mv buildpath/"tools/bin/cassandra.in.sh", buildpath/"tools/bin/cassandra-tools.in.sh" + inreplace buildpath/"tools/bin/cassandra-tools.in.sh" do |s| + # Tools have slightly different path to CASSANDRA_HOME + s.gsub! "CASSANDRA_HOME=\"`dirname $0`/../..\"", "CASSANDRA_HOME=\"#{libexec}\"" + # Store configs in etc, outside of keg + s.gsub! "CASSANDRA_CONF=\"$CASSANDRA_HOME/conf\"", "CASSANDRA_CONF=\"#{etc}/cassandra\"" + # Core Jars installed to prefix, no longer in a lib folder + s.gsub! "\"$CASSANDRA_HOME\"/lib/*.jar", "\"$CASSANDRA_HOME\"/*.jar" + # Tools Jars are under tools folder + s.gsub! "\"$CASSANDRA_HOME\"/tools/lib/*.jar", "\"$CASSANDRA_HOME\"/tools/*.jar" + # Storage path + s.gsub! "cassandra_storagedir=\"$CASSANDRA_HOME/data\"", "cassandra_storagedir=\"#{var}/lib/cassandra\"" + end + + pkgshare.install [buildpath/"tools/bin/cassandra-tools.in.sh"] + + # Update tools script files + inreplace Dir[buildpath/"tools/bin/*"], + "`dirname \"$0\"`/cassandra.in.sh", + pkgshare/"cassandra-tools.in.sh" + + venv_bin = libexec/"vendor/bin" + rw_info = python_shebang_rewrite_info(venv_bin/python3) + rewrite_shebang rw_info, libexec/"bin/cqlsh.py" + + # Make sure tools are available + bin.install Dir[buildpath/"tools/bin/*"] + bin.write_exec_script Dir[libexec/"bin/*"] + rm bin/"cqlsh" + (bin/"cqlsh").write_env_script libexec/"bin/cqlsh", PATH: "#{venv_bin}:$PATH" + end + + service do + run [opt_bin/"cassandra", "-f"] + keep_alive true + working_dir var/"lib/cassandra" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cassandra -v") + + output = shell_output("#{bin}/cqlsh localhost 2>&1", 1) + assert_match "Connection error", output + end +end diff --git a/Formula/c/cassowary.rb b/Formula/c/cassowary.rb new file mode 100644 index 0000000000000..c31e26d26fe37 --- /dev/null +++ b/Formula/c/cassowary.rb @@ -0,0 +1,32 @@ +class Cassowary < Formula + desc "Modern cross-platform HTTP load-testing tool written in Go" + homepage "https://github.com/rogerwelin/cassowary" + url "https://github.com/rogerwelin/cassowary/archive/refs/tags/v0.19.0.tar.gz" + sha256 "48f573bbb2b62cd00da68be7d79a8e9b2767ec8e512d6e0a7765c7b18081129f" + license "MIT" + head "https://github.com/rogerwelin/cassowary.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e8ed989ef0f8b0694a4975aa2ba038dbe078e737c339cb0841b78431ea1df22" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "af786d30b88554a9252cf4eafc40831f1fd796a03a76f4ee669ed565b1e526fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af786d30b88554a9252cf4eafc40831f1fd796a03a76f4ee669ed565b1e526fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af786d30b88554a9252cf4eafc40831f1fd796a03a76f4ee669ed565b1e526fc" + sha256 cellar: :any_skip_relocation, sonoma: "58016ae507acc0044612858a240461d94175a7cd772a5e2ba9290c790ecd9455" + sha256 cellar: :any_skip_relocation, ventura: "58016ae507acc0044612858a240461d94175a7cd772a5e2ba9290c790ecd9455" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f1affd04f536b966c985fb11c1a1466f6fe7b9cb73fd8460fbba2e80648e04d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7668f4bb871a15e8e62e10502746152ba54fba5ae49591de97281edc53c9c2b9" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/cassowary" + end + + test do + system(bin/"cassowary", "run", "-u", "http://www.example.com", "-c", "10", "-n", "100", "--json-metrics") + assert_match "\"base_url\":\"http://www.example.com\"", File.read("#{testpath}/out.json") + + assert_match version.to_s, shell_output("#{bin}/cassowary --version") + end +end diff --git a/Formula/c/castget.rb b/Formula/c/castget.rb new file mode 100644 index 0000000000000..c9c756fed35a9 --- /dev/null +++ b/Formula/c/castget.rb @@ -0,0 +1,72 @@ +class Castget < Formula + desc "Command-line podcast and RSS enclosure downloader" + homepage "https://castget.johndal.com/" + url "https://download.savannah.gnu.org/releases/castget/castget-2.0.1.tar.bz2" + sha256 "438b5f7ec7e31a45ed3756630fe447f42015acda53ec09202f48628726b5e875" + license "LGPL-2.1-only" + + livecheck do + url "https://download.savannah.gnu.org/releases/castget/" + regex(/href=.*?castget[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "979aca84c92c2cb5ab58080f1e6191bf96b4569f1899e2166cb76f0ddc2671a7" + sha256 cellar: :any, arm64_sequoia: "4ef2a3166dbe4c983bc4a83b891b28b430ecb348e0043da7f0a512cdf7391444" + sha256 cellar: :any, arm64_sonoma: "a2f710b3cc40945afaef214606dc94e036ab266e176158fcd5dbd3e11b3de117" + sha256 cellar: :any, arm64_ventura: "85bc8985e90ece6ae58bf9d7a1f68eda1d2d2b3744694f5d7dfcfaf82d9b33df" + sha256 cellar: :any, arm64_monterey: "dab2c9c9952ce1ecd3263ed1d6c1c002c772c9e7c310bde0b6277c46fd424edf" + sha256 cellar: :any, arm64_big_sur: "320ee21622d1bd939ea95055395d84e5d7cb2d6f091d0da9f05c9eb3d0cff7b9" + sha256 cellar: :any, sonoma: "429edbc96bddebb64265eb6450a5ef92b6205979ce49d643b02c37b5a6928551" + sha256 cellar: :any, ventura: "6fc622c18f0e57ca04747ce77b5663200f6669c6a1a4f01b071a13ae942ca231" + sha256 cellar: :any, monterey: "e504eb4b4d6c38f21fdb20a8424de8ac6e98ee4dd970c397da89c0f936520be6" + sha256 cellar: :any, big_sur: "b91da84bac0b31dfb521f193b519c984cf943f15974f9427fa3e780028ea07aa" + sha256 cellar: :any, catalina: "83d589037e4418829134060be140fce4b4b9883b9b68376f20257df68d9fff9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "830e5a5c2cc130c2134ccfa526f99794cb737726f810c23d773cfe060d84faeb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "590a6ec3e2fe983ff5c82e3b5b96b43c87f3a51fd7848216da86dc48ba01b8ca" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "id3lib" + + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.rss").write <<~XML + + + + Test podcast + Test podcast + http://www.podcast.test/ + + Test item + + + + + XML + + (testpath/"castgetrc").write <<~EOS + [test] + url=file://#{testpath/"test.rss"} + spool=#{testpath} + EOS + + system bin/"castget", "-C", testpath/"castgetrc" + assert_path_exists testpath/"test.mp3" + end +end diff --git a/Formula/c/castxml.rb b/Formula/c/castxml.rb new file mode 100644 index 0000000000000..a20481187ad55 --- /dev/null +++ b/Formula/c/castxml.rb @@ -0,0 +1,43 @@ +class Castxml < Formula + desc "C-family Abstract Syntax Tree XML Output" + homepage "https://github.com/CastXML/CastXML" + url "https://github.com/CastXML/CastXML/archive/refs/tags/v0.6.13.tar.gz" + sha256 "df954886464fe624887411e5f4e2a7db00da3d64a48f142d3aff973e2097e2d6" + license "Apache-2.0" + head "https://github.com/CastXML/castxml.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "93ed94817a78b0a29ce51bc14c0fd172cf21c5f7a2532342c3311931947ffd2a" + sha256 cellar: :any, arm64_sequoia: "2e6fee1a97c17d39ac0dbafa497d83e27a3c817d16fcc89ee399953d437022e4" + sha256 cellar: :any, arm64_sonoma: "583761b0bfb7e507d771a614e6e53fedb81c402e457553657a2cfc157cd52e22" + sha256 cellar: :any, arm64_ventura: "624ab7d9058b3422afe1836930f639330fd4528195d32a8158201cbb85710571" + sha256 cellar: :any, sonoma: "dc702848dffb57aaaecd4342651467aa4485c2586fa7298b83481528634e151a" + sha256 cellar: :any, ventura: "5c08e0f22751ca1313864edd717e4b60fd65fefb805f6e4dae5c88e91482faad" + sha256 cellar: :any_skip_relocation, arm64_linux: "d56da3651a01eeb3be02ed9b65649553a58152744f0f9cbd6be2ec7adbbe6970" + sha256 cellar: :any_skip_relocation, x86_64_linux: "590839164290bc19e3405d79ebc3ddeaab5f2a1cf65a289d4ec7dfbe8f48906b" + end + + depends_on "cmake" => :build + depends_on "llvm" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + int main() { + return 0; + } + CPP + system bin/"castxml", "-c", "-x", "c++", "--castxml-cc-gnu", ENV.cxx, + "--castxml-gccxml", "-o", "test.xml", "test.cpp" + end +end diff --git a/Formula/c/cataclysm.rb b/Formula/c/cataclysm.rb new file mode 100644 index 0000000000000..a9433a0fb07b1 --- /dev/null +++ b/Formula/c/cataclysm.rb @@ -0,0 +1,93 @@ +class Cataclysm < Formula + desc "Fork/variant of Cataclysm Roguelike" + homepage "https://github.com/CleverRaven/Cataclysm-DDA" + url "https://github.com/CleverRaven/Cataclysm-DDA/archive/refs/tags/0.H-RELEASE.tar.gz" + version "0.H" + sha256 "9fbd80d13321321d6ed1f5a736ab874e06d335429f2a51a39eefd2fa51feae68" + license "CC-BY-SA-3.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.(?:\d+|\w))+(?:[_-]\d+)?)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8dadb20312e5e2a96f0b9e07de09a0f84b4c7e754932a183861141a2a62b25fd" + sha256 cellar: :any, arm64_sequoia: "2cce9de78e3da9ad7fc8eeaa2998b468bff0d6d342ebd2dc5dd0683821569ac6" + sha256 cellar: :any, arm64_sonoma: "175fc6b0ea8289e9c76da22277ed6eb35dde251dd88416f2ef8edaea83f15213" + sha256 cellar: :any, arm64_ventura: "cbbbf7dcd3b21d4db6f5e7994677269b79e871c43eecde80ea9fa16c84065859" + sha256 cellar: :any, sonoma: "2fdb081a3ec309197e0909ad4d9fa32802595e661370b9c1a507d6942fa155d0" + sha256 cellar: :any, ventura: "7cac6a7e522742a8657f2f0bcbfa3a8814390c2ff47dfea131d7f03028517768" + sha256 cellar: :any_skip_relocation, arm64_linux: "c58fbd6b591afb768dcca07ff541c9f8871bc99a59ab34aae14e281048f06c47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e864a77dc73f1e8c043b4b7c0c7d728e23ce09f77d0c75cf258e87cf8cb3d42" + end + + head do + url "https://github.com/CleverRaven/Cataclysm-DDA.git", branch: "master" + on_macos do + depends_on "freetype" + end + end + + depends_on "gettext" => :build # for msgfmt + depends_on "pkgconf" => :build + depends_on "libogg" + depends_on "libvorbis" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_mixer" + depends_on "sdl2_ttf" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + os = OS.mac? ? "osx" : OS.kernel_name.downcase + args = %W[ + NATIVE=#{os} + RELEASE=1 + USE_HOME_DIR=1 + TILES=1 + SOUND=1 + RUNTESTS=0 + ASTYLE=0 + LINTJSON=0 + ] + + args << "OSX_MIN=#{MacOS.version}" if OS.mac? + args << "CLANG=1" if ENV.compiler == :clang + + system "make", *args + + # no make install, so we have to do it ourselves + libexec.install "cataclysm-tiles", "data", "gfx" + + inreplace "cataclysm-launcher" do |s| + s.change_make_var! "DIR", libexec + end + bin.install "cataclysm-launcher" => "cataclysm" + end + + test do + # Disable test on Linux because it fails with this error: + # Error while initializing the interface: SDL_Init failed: No available video device + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # make user config directory + user_config_dir = testpath/"Library/Application Support/Cataclysm/" + user_config_dir.mkpath + + # run cataclysm for 30 seconds + pid = spawn bin/"cataclysm" + begin + sleep 50 + assert_path_exists user_config_dir/"config", "User config directory should exist" + ensure + Process.kill("TERM", pid) + end + end +end diff --git a/Formula/c/catch2.rb b/Formula/c/catch2.rb new file mode 100644 index 0000000000000..127bf6f7a9f2c --- /dev/null +++ b/Formula/c/catch2.rb @@ -0,0 +1,43 @@ +class Catch2 < Formula + desc "Modern, C++-native, test framework" + homepage "https://github.com/catchorg/Catch2" + url "https://github.com/catchorg/Catch2/archive/refs/tags/v3.11.0.tar.gz" + sha256 "82fa1cb59dc28bab220935923f7469b997b259eb192fb9355db62da03c2a3137" + license "BSL-1.0" + head "https://github.com/catchorg/Catch2.git", branch: "devel" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "46eb4e040fc26befc55bd5b963b74cff2ce5c1290724eb72be40c8ec7cd362b4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "997ca95ba0337e4caf13577c3cc81624380b3c6f8ec8c4fdc539fa1ecc22064d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dbe41f2586b2426e9c21e309a4f5a11ee3abf89d9ecdc5daac2bb8de758fcf04" + sha256 cellar: :any_skip_relocation, sonoma: "ad3dd63a7d71ed3153303d746b01f93f907135c85678ca17f7ac467834dec835" + sha256 cellar: :any_skip_relocation, arm64_linux: "df57def370f1002bdbc57528222d5b2c6fe8f052fb3b4b9cde2d1d01c7c225de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10df67fe223b619f21e68f12202d006fb7fb192a52a3fbf43af5ec52a5acbc65" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_CXX_STANDARD=17", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + TEST_CASE("Basic", "[catch2]") { + int x = 1; + SECTION("Test section 1") { + x = x + 1; + REQUIRE(x == 2); + } + SECTION("Test section 2") { + REQUIRE(x == 1); + } + } + CPP + system ENV.cxx, "test.cpp", "-std=c++14", "-L#{lib}", "-lCatch2Main", "-lCatch2", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/catgirl.rb b/Formula/c/catgirl.rb new file mode 100644 index 0000000000000..07b110bf7328f --- /dev/null +++ b/Formula/c/catgirl.rb @@ -0,0 +1,49 @@ +class Catgirl < Formula + desc "Terminal IRC client" + homepage "https://git.causal.agency/catgirl/about/" + url "https://git.causal.agency/catgirl/snapshot/catgirl-2.2a.tar.gz" + sha256 "c6d760aaee134e052586def7a9103543f7281fde6531fbcb41086470794297c2" + license "GPL-3.0-or-later" + + livecheck do + url "https://git.causal.agency/catgirl" + regex(/href=.*?catgirl[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "351867ae899c5212701dff3cbc5aaf3e64ae7f250343de7d10b411365e1ab87e" + sha256 arm64_sequoia: "10113098841cbf331b3b7ecd70b8fcadc65ee0d863f9fd46671d28325e9e1066" + sha256 arm64_sonoma: "7a5ac77635d063e53136ba82f11f793ecabd86340ba3fffbce69463df086c316" + sha256 arm64_ventura: "e6bb55c082d4b2ceb8328bb4a7723aa3d56168258cad31f0fbc9afad664cb2cb" + sha256 sonoma: "13112c4d7607f8ca1f991a1980b1a72636d5359b5a8e6e09826ce5a6167abbff" + sha256 ventura: "86720e048ec46eba3a7ede53e34b6b944d802b451758ed5f1cc20a0f87d44f55" + sha256 arm64_linux: "ad047d854587f1e4456b6fc7c82afb23dffe5ca589de4affb3fa35da7c594bd6" + sha256 x86_64_linux: "b6849416058a2849403173bf34aba0a45d8c27f3a3ff2e43973f0480f6552c00" + end + + depends_on "ctags" => :build + depends_on "pkgconf" => :build + + depends_on "libretls" + uses_from_macos "ncurses" + + def install + args = %W[ + --disable-silent-rules + --mandir=#{man} + ] + + args << "--enable-sandman" if OS.mac? + + system "./configure", *std_configure_args, *args + system "make" + system "make", "install" + end + + test do + output = shell_output("#{bin}/catgirl 2>&1", 64) + assert_match "catgirl: host required", output + end +end diff --git a/Formula/c/catimg.rb b/Formula/c/catimg.rb new file mode 100644 index 0000000000000..bacc0aff91246 --- /dev/null +++ b/Formula/c/catimg.rb @@ -0,0 +1,43 @@ +class Catimg < Formula + desc "Insanely fast image printing in your terminal" + homepage "https://github.com/posva/catimg" + url "https://github.com/posva/catimg/archive/refs/tags/2.7.0.tar.gz" + sha256 "3a6450316ff62fb07c3facb47ea208bf98f62abd02783e88c56f2a6508035139" + license "MIT" + head "https://github.com/posva/catimg.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d92945a35325613398793b13459b570974bde19f5b0ad2fede646b1a44345dac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9760742a6ba00bbdef67c27c773d24b546c5060ef8be91965a6a3ae4f8b1d1a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "edf6de7eb7ba34dd5fc9387bfb41aae9a5f2f76eedaeeb01e644320d6465180f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7c748a7eab313176ecf7f82a9a4bafb26417dfec707fe041dd5f16033968e26" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ae44d54095f21fcd876b32c951923a3da0f2fd8f3ba2fe80520ee61ce5972992" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f5537238f20cc678e14f52ecdc1bdbf2b9d20d58d51a322ae044bad5c0df2418" + sha256 cellar: :any_skip_relocation, sonoma: "ebacd69c75d8f054d59415fe98ad8c11176fa2b40d45744e44c38da7b1392ba0" + sha256 cellar: :any_skip_relocation, ventura: "892769c3e47215a28fe78b4dc5732a1d173cea66586df1277de35c840c06117e" + sha256 cellar: :any_skip_relocation, monterey: "593c2a23f3f4c50b969ac816067faea700f62195c21e9566180c5e46312bec30" + sha256 cellar: :any_skip_relocation, big_sur: "4ed745935b27937d85de5e28e9f3345be90bfc725349247cb3b9770a720fe134" + sha256 cellar: :any_skip_relocation, catalina: "076781a169c35bba3b5bac8b4e5ea89497b9e21993da49739b4d3b690c4fad2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "22f06dfc593637fd0debc35c95cc80079c1e09cfde561ae5e8b8ce3644f0f6af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e8886c59a991514ea519ba43376028fab0c809f5a914afd623063b133af7f05" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DMAN_OUTPUT_PATH=#{man1} + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"catimg", test_fixtures("test.png") + end +end diff --git a/Formula/c/cattle.rb b/Formula/c/cattle.rb new file mode 100644 index 0000000000000..724bb33069e52 --- /dev/null +++ b/Formula/c/cattle.rb @@ -0,0 +1,86 @@ +class Cattle < Formula + desc "Brainfuck language toolkit" + homepage "https://kiyuko.org/software/cattle" + license "GPL-2.0-or-later" + + stable do + url "https://kiyuko.org/software/cattle/releases/cattle-1.4.0.tar.xz" + sha256 "9ba2d746f940978b5bfc6c39570dde7dc55d5b4d09d0d25f29252d6a25fb562f" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url "https://kiyuko.org/software/cattle/releases" + regex(/href=.*?cattle[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "e0a80736a4afb81659a8e8eaa4dee70a320bc7c8f7c756d14891c333f65748e6" + sha256 arm64_sequoia: "502399f17e0777926e50b1a067eff9ff5520bcbf5457fb73156376891726d411" + sha256 arm64_sonoma: "2e8272b2652bd83dda6c28b3b13464ef9adbd7f905bfa6a604e89bad92b5f652" + sha256 arm64_ventura: "dbe7b8b3f8f215b8d73218e64e6f884b248da90095f2dc6ea8f73abf3db72f79" + sha256 arm64_monterey: "a8cfe837a78af532853dc6fefce95c2b11212e287640a3b527ca6e30a99e8edb" + sha256 arm64_big_sur: "30cc03818912570ba2f48545b53a8217d2f8d0883e0308b55825d59aba1e342d" + sha256 sonoma: "0b70e1d36468fdea6a86e9e35425d7d35298a448c79d4a8a92fb6b02fa28a1fc" + sha256 ventura: "3ea680e66032aa529230bab1e7f3d63fe1fa49febb51b6f5629c09370bfff182" + sha256 monterey: "f6367afe418e8a7715ef32fc386228aae672034e62b35f84ac7ebe7476cb88ff" + sha256 big_sur: "d6d17fed746c28274bd67416616df6ed87b7c6eae25593792d1ce815760458d3" + sha256 catalina: "d721fea1c78f6b79eb7ae7e325442e276638919bdef0a21604e910501d4cc67f" + sha256 cellar: :any_skip_relocation, arm64_linux: "2174b375583cd65dd0bb371684b48fe05a346f16fad3c33d9bda51519a79d49f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cc3ad88464fb616899345d986acd64a8108ad271e4cc9d09370cd8055a1774f" + end + + head do + url "https://github.com/andreabolognani/cattle.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + end + + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + pkgshare.mkpath + cp_r ["examples", "tests"], pkgshare + rm Dir["#{pkgshare}/{examples,tests}/{Makefile.am,.gitignore}"] + + if build.head? + inreplace "autogen.sh", "libtoolize", "glibtoolize" + system "sh", "autogen.sh" + end + + mkdir "build" do + system "../configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + end + + test do + cp_r (pkgshare/"examples").children, testpath + cp_r (pkgshare/"tests").children, testpath + system ENV.cc, "common.c", "run.c", "-o", "test", + "-I#{include}/cattle-1.0", + "-I#{Formula["glib"].include}/glib-2.0", + "-I#{Formula["glib"].lib}/glib-2.0/include", + "-L#{lib}", + "-L#{Formula["glib"].lib}", + "-lcattle-1.0", "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" + assert_match "Unbalanced brackets", shell_output("./test program.c 2>&1", 1) + end +end diff --git a/Formula/c/cava.rb b/Formula/c/cava.rb new file mode 100644 index 0000000000000..bdc39aa5bd176 --- /dev/null +++ b/Formula/c/cava.rb @@ -0,0 +1,78 @@ +class Cava < Formula + desc "Console-based Audio Visualizer for ALSA" + homepage "https://github.com/karlstav/cava" + url "https://github.com/karlstav/cava/archive/refs/tags/0.10.6.tar.gz" + sha256 "b1ce6653659a138cbaebf0ef2643a1569525559c597162e90bf9304ac8781398" + license "MIT" + head "https://github.com/karlstav/cava.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c421542c3581b9cae41580a3887629139b91349b35ee9b0895e8d1227b4b50d7" + sha256 cellar: :any, arm64_sequoia: "334969b0165063868eae0939daf699d41dba964e7ae8a23e38b8a13509cfda64" + sha256 cellar: :any, arm64_sonoma: "07df7109a204021ff71a40549cce4b501068202042013afdeecd76377e5d79ed" + sha256 cellar: :any, arm64_ventura: "1f1500c5185be5012d79139a50d6a57381bcf64caa321c2cc3b290af89bae4fd" + sha256 cellar: :any, sonoma: "45f2092f455d81b05679d70223017d74e263299fd0a1e3c1dd43cd2d32f6088f" + sha256 cellar: :any, ventura: "0fce634640d2113ada60209af6796d063a43f4d5b4a8b3d9956b811b311ff4ff" + sha256 arm64_linux: "31f97961aee0b8d17b33a20c5c7f9866038efa26cad0fceb56d023355c1f162d" + sha256 x86_64_linux: "f008fbafb2cd10604b212ba163ccb1cb168f3f1927ad65d50f4dabe36e7aa562" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "fftw" + depends_on "iniparser" + depends_on "portaudio" + + uses_from_macos "vim" => :build # needed for xxd + uses_from_macos "ncurses" + + on_linux do + depends_on "alsa-lib" + depends_on "jack" + end + + def install + # change ncursesw to ncurses + inreplace "configure.ac", "ncursesw", "ncurses" + # force autogen.sh to look for and use our glibtoolize + inreplace "autogen.sh", "libtoolize", "glibtoolize" + + ENV.append "CPPFLAGS", "-I#{Formula["iniparser"].opt_include}/iniparser" + ENV.append "LDFLAGS", "-L#{Formula["iniparser"].opt_lib}" + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + cava_config = (testpath/"cava.conf") + cava_stdout = (testpath/"cava_stdout.log") + + cava_config.write <<~EOS + [general] + bars = 2 + sleep_timer = 1 + + [input] + method = fifo + source = /dev/zero + + [output] + method = raw + data_format = ascii + EOS + + pid = spawn(bin/"cava", "-p", cava_config, [:out, :err] => cava_stdout.to_s) + + sleep 5 + + assert_match "0;0;\n", cava_stdout.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/c/cayley.rb b/Formula/c/cayley.rb new file mode 100644 index 0000000000000..f2fbdb5b0bfb7 --- /dev/null +++ b/Formula/c/cayley.rb @@ -0,0 +1,85 @@ +class Cayley < Formula + desc "Graph database inspired by Freebase and Knowledge Graph" + homepage "https://github.com/cayleygraph/cayley" + url "https://github.com/cayleygraph/cayley.git", + tag: "v0.7.7", + revision: "dcf764fef381f19ee49fad186b4e00024709f148" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "003d129d37b6752ed0431b4a65c34f49edd46864957d45d294068da53c968178" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1886c195583c5d68c87f6e2cc50a52801990ea7bf973f2b8a61e2228e931adcf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "827ae743c95d1689023e7b2ed5bbdd09e0d2d773c5b4928a02fcba8800023995" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e67bcaea36c86606ed3578e19600d4afc712f7a611260881a633236b2a9ffc6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "63e5659661c157f2eec496d2c0075a7d91cd25d4985a35935a34fa5a4cdb6142" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ead8a905c38526bdc7812eb1d500cf9dcb90c8c9dbb73126e1b3da463a4520c9" + sha256 cellar: :any_skip_relocation, sonoma: "59af74bee63c364cc67532994d1fb3255b87f7b8157da1da469787451ce0f980" + sha256 cellar: :any_skip_relocation, ventura: "e38315fa183ffa0bd0ce497ef1800f148367fc33689c9d634a70d617ac8065f5" + sha256 cellar: :any_skip_relocation, monterey: "b621ff9b1017dac7f6cbe723abbd85256d04be2f31b4e527a569d2b5d66e54bb" + sha256 cellar: :any_skip_relocation, big_sur: "9217369e4d1d1863fd23a2694a3962510a52380b385c199008191c302629f0ac" + sha256 cellar: :any_skip_relocation, catalina: "7fe446d8eaa6ed43ae226027feec3878e437708d4a59c5aab761ab249bc9ba56" + sha256 cellar: :any_skip_relocation, arm64_linux: "45af8318168453a8135a1a54814d483f7e80f2ea13ebf20a11c66f24304b1b00" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3068fa07874df5d0abb42373433c4f0997d2693f20b859bfdddf36390ea15fe" + end + + depends_on "breezy" => :build + depends_on "go" => :build + depends_on "mercurial" => :build + + def install + dir = buildpath/"src/github.com/cayleygraph/cayley" + dir.install buildpath.children + + cd dir do + # Run packr to generate .go files that pack the static files into bytes that can be bundled into the Go binary. + system "go", "run", "github.com/gobuffalo/packr/v2/packr2" + + ldflags = %W[ + -s -w + -X github.com/cayleygraph/cayley/version.Version=#{version} + -X github.com/cayleygraph/cayley/version.GitHash=#{Utils.git_short_head} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/cayley" + + inreplace "cayley_example.yml", "./cayley.db", var/"cayley/cayley.db" + etc.install "cayley_example.yml" => "cayley.yml" + + # Install samples + system "gzip", "-d", "data/30kmoviedata.nq.gz" + (pkgshare/"samples").install "data/testdata.nq", "data/30kmoviedata.nq" + end + end + + def post_install + unless File.exist? var/"cayley" + (var/"cayley").mkpath + + # Initialize the database + system bin/"cayley", "init", "--config=#{etc}/cayley.yml" + end + end + + service do + run [opt_bin/"cayley", "http", "--config=#{etc}/cayley.conf"] + keep_alive true + error_log_path var/"log/cayley.log" + log_path var/"log/cayley.log" + working_dir var/"cayley" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cayley version") + + http_port = free_port + fork do + exec bin/"cayley", "http", "--host=127.0.0.1:#{http_port}" + end + sleep 3 + response = shell_output("curl -s -i 127.0.0.1:#{http_port}") + assert_match "HTTP/1.1 200 OK", response + end +end diff --git a/Formula/c/cbc.rb b/Formula/c/cbc.rb new file mode 100644 index 0000000000000..e530c41021618 --- /dev/null +++ b/Formula/c/cbc.rb @@ -0,0 +1,60 @@ +class Cbc < Formula + desc "Mixed integer linear programming solver" + homepage "https://github.com/coin-or/Cbc" + url "https://github.com/coin-or/Cbc/archive/refs/tags/releases/2.10.12.tar.gz" + sha256 "9ed71e4b61668462fc3794c102e26b4bb01a047efbbbcbd69ae7bde1f04f46a8" + license "EPL-2.0" + + livecheck do + url :stable + regex(%r{^releases/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e87c268c9db2c8b20388054604f1624339997bd8a2ce7cf8e2c3d4d7ca5b80b6" + sha256 cellar: :any, arm64_sequoia: "c4383cabc2ad9d393dc2a042d11c36b2c67e080b094e82492d92448671c52853" + sha256 cellar: :any, arm64_sonoma: "d962ac44681d69aab487032695474a6086701f67836717d92600457f1425403c" + sha256 cellar: :any, arm64_ventura: "b92f1a725cbf6d7dbdf498a8210612c378d7f4d01d8c449f41a9b29392baadbf" + sha256 cellar: :any, arm64_monterey: "75ee66a89db37032f0c32c8a3e5ff2f96ef38d30d87c7c6ed784f2756e5a1efb" + sha256 cellar: :any, sonoma: "d5f563de373bec931482fd4c4bbc47da6f5fd1a2de1fcd3593758d27f936495b" + sha256 cellar: :any, ventura: "24e0a951fa96cc00f232bc99fd59d2ba3c1617e3ac186a918ada15da579c8521" + sha256 cellar: :any, monterey: "8ada2dccef40eb4b06a043c3189e82add6b9d60f14f75cd7a3a8723fc718b2fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "064164adf65fadf8402ba9af954a2fcd87dcaedbd1b4b400c5e2dbdb2422d6aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a29a22d7f976bd09ed6a0473f64c8bf0ab84a6729fb3d9635133c9bc36dc3fd5" + end + + depends_on "pkgconf" => [:build, :test] + + depends_on "cgl" + depends_on "clp" + depends_on "coinutils" + depends_on "osi" + + on_macos do + depends_on "openblas" + end + + conflicts_with "libcouchbase", because: "both install `cbc` binaries" + + def install + # Work around for: + # Error 1: "mkdir: #{include}/cbc/coin: File exists." + (include/"cbc/coin").mkpath + + system "./configure", "--disable-silent-rules", + "--includedir=#{include}/cbc", + "--enable-cbc-parallel", + *std_configure_args + system "make", "install" + + pkgshare.install "Cbc/examples" + end + + test do + cp_r pkgshare/"examples/.", testpath + + pkg_config_flags = shell_output("pkg-config --cflags --libs cbc").chomp.split + system ENV.cxx, "-std=c++11", "sudoku.cpp", *pkg_config_flags, "-o", "sudoku" + assert_match "solution is valid", shell_output("./sudoku") + end +end diff --git a/Formula/c/cbfmt.rb b/Formula/c/cbfmt.rb new file mode 100644 index 0000000000000..200eb7e9a752b --- /dev/null +++ b/Formula/c/cbfmt.rb @@ -0,0 +1,55 @@ +class Cbfmt < Formula + desc "Format codeblocks inside markdown and org documents" + homepage "https://github.com/lukas-reineke/cbfmt" + url "https://github.com/lukas-reineke/cbfmt/archive/refs/tags/v0.2.0.tar.gz" + sha256 "42973e9b1e95f4f3d7e72ef17a41333dab1e04d3d91c7930aabfc08f72c14126" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8a548edda1fc0d3a727eee4b0a49e3a88d38ec88b2ac5c9108d5ccc449223954" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19d661d5df158a765e9d9103ffa76a63d069106a79da5e96425cb3f7860cc054" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9450f078799be6460d360bddede919f33f4afcf8480f951edadc5d93ad2b9887" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd536fee66c066b0027da4659d5b7e6ec316a98545fbc84b00a6833d919d2e78" + sha256 cellar: :any_skip_relocation, sonoma: "f40cb83e59d37c6826a8f99871de12db752fcc8f9830bc4857347ed733cd0b02" + sha256 cellar: :any_skip_relocation, ventura: "d08bb1b815be4f880c84e38c49cf1bf7c14ba83670350fc7c77305bebc97faa5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8b95c554dbf6e4179ba91f4eb93afc13949376af400131b280f0a792ba8bd03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bef8994fb32668715f46c8efcd584938cb5cdce740e65f98f9047698ee4e284f" + end + + depends_on "rust" => [:build, :test] + + def install + system "cargo", "install", *std_cargo_args + end + + test do + test_config = testpath/".cbfmt.toml" + test_config.write <<~TOML + [languages] + rust = ["rustfmt"] + TOML + + test_file = testpath/"test.md" + (testpath/"test.md").write <<~MARKDOWN + ```rust + fn main() { + println!("Hello, world!"); + } + ``` + MARKDOWN + + system bin/"cbfmt", "--config", test_config, "--write", test_file + + assert_equal <<~MARKDOWN, test_file.read + ```rust + fn main() { + println!("Hello, world!"); + } + ``` + MARKDOWN + + system bin/"cbfmt", "--config", test_config, "--check", test_file + + assert_match version.to_s, shell_output("#{bin}/cbfmt --version") + end +end diff --git a/Formula/c/cbindgen.rb b/Formula/c/cbindgen.rb new file mode 100644 index 0000000000000..9e26ebac8cf09 --- /dev/null +++ b/Formula/c/cbindgen.rb @@ -0,0 +1,39 @@ +class Cbindgen < Formula + desc "Project for generating C bindings from Rust code" + homepage "https://github.com/mozilla/cbindgen" + url "https://github.com/mozilla/cbindgen/archive/refs/tags/v0.29.0.tar.gz" + sha256 "6697f449d4a15d814d991249a611af961c97e36d9344c7ced6df35c5c25b40cc" + license "MPL-2.0" + + # Upstream uses GitHub releases to indicate that a version is released + # (there's also sometimes a notable gap between when a version is tagged and + # and the release is created), so the `GithubLatest` strategy is necessary. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8216edac1c20fb2c910c259c6116838c3abf45f7b9a75b9ce4fcbf8ac74fa859" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "33ebcfa85a68f3fbb5049b341f8a71e98cd1bbd830082c6096f19077a54c7990" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be04333695da79e4b6818b529ee29abeb7fbe23924e4a1fc4e330896197c0e13" + sha256 cellar: :any_skip_relocation, arm64_ventura: "352e74bc4454633c52d51bb110f3d5fdfd11a903c53f212b3c30a882856d350c" + sha256 cellar: :any_skip_relocation, sonoma: "822ffd8c1587adf873984e6920d3f049f0d647c84b24544dd3375baf60997c00" + sha256 cellar: :any_skip_relocation, ventura: "57d6a07db7d0c3d5cf9f3969dc8e9b69b5d666adaf32c40b4a85246d52ba5257" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bb26820809e7148dd6910c040dbdbda13d1eb7f7accf5bdc28bb86db7b278c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "140899590bd0b5406efefecd35f9a34915cf8a3a2683e54e9a06bace887d152a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + pkgshare.install "tests" + end + + test do + cp pkgshare/"tests/rust/extern.rs", testpath + output = shell_output("#{bin}/cbindgen extern.rs") + assert_match "extern int32_t foo()", output + end +end diff --git a/Formula/c/cbmbasic.rb b/Formula/c/cbmbasic.rb new file mode 100644 index 0000000000000..bc552d626bc9f --- /dev/null +++ b/Formula/c/cbmbasic.rb @@ -0,0 +1,39 @@ +class Cbmbasic < Formula + desc "Commodore BASIC V2 as a scripting language" + homepage "https://github.com/mist64/cbmbasic" + url "https://downloads.sourceforge.net/project/cbmbasic/cbmbasic/1.0/cbmbasic-1.0.tgz" + sha256 "2735dedf3f9ad93fa947ad0fb7f54acd8e84ea61794d786776029c66faf64b04" + license "BSD-2-Clause" + head "https://github.com/mist64/cbmbasic.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a998e7b4ececefdb1441daedfc1d7e21499bf353d7d2b38f43ce9506eb7e876" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "12b112458c348c5267a9dd565cd6eb627e77e5f7601aa8262192ef0547f5c824" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6009d0ea2c22b727d92fa669b8d2d2207caf0cd9651d74a771c2dd35f24596aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8382a3a84c232895e8581de79435c6c7629079ec8dbdec6b8d193f73715e4ca8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4e090b459f2e44ad8f04e3e70a25b909fe16771f4b2fa325cc06ea233b019803" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b693c2b8fbfe49736bdc0ae4bce13d96295da75a6683e593c021c9335f6c57fd" + sha256 cellar: :any_skip_relocation, sonoma: "b6c3dab8aa52d31126d5945c15334343b4d83adc3c9ba4b0502709d6c4cc7bc1" + sha256 cellar: :any_skip_relocation, ventura: "032eb3fb2490ed7ae7d4017bffd81e1052fbae0929427a6efc55cb2e612dae18" + sha256 cellar: :any_skip_relocation, monterey: "1328d1be681fd3f2be33cbab9b19e59a71e1ed0a5191c89bf7595ebcf0ef3236" + sha256 cellar: :any_skip_relocation, big_sur: "29f1eb35e6acf1bf907d2c89c0f5938507718b290cdeef92dfcee473b00f8fe5" + sha256 cellar: :any_skip_relocation, catalina: "f4e101b38bb21ff46ce301f2c9a0f59f567df9a3265c4906969f1e4426160d9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d449cf17cf6a0c1b07c3f46721f68ec826913f703e7e98daeb6b5e42cfe2867" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e08527ac4b01d5d2c747776b5d8be5ae6e402862a87bafe7331c3c3b49d6170" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `RAM'; cbmbasic.o:(.bss+0x10): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "make", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}" + bin.install "cbmbasic" + end + + test do + assert_match(/READY.\r\n 1/, pipe_output(bin/"cbmbasic", "PRINT 1\n", 0)) + end +end diff --git a/Formula/c/cbmc.rb b/Formula/c/cbmc.rb new file mode 100644 index 0000000000000..ff55f91d82f01 --- /dev/null +++ b/Formula/c/cbmc.rb @@ -0,0 +1,56 @@ +class Cbmc < Formula + desc "C Bounded Model Checker" + homepage "https://www.cprover.org/cbmc/" + url "https://github.com/diffblue/cbmc.git", + tag: "cbmc-6.7.1", + revision: "d148ae6e880a3ef167bb71e9ed28169578899dce" + license "BSD-4-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fd360f1afc8ab4e7588a122b3e4ad50b340fe8d27264fc28e4b8279938f00181" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8eb1a58c31b2d9e058603bc51256b2afa472812b6e12a80147f8fee69789cf9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af3b37f03018ca7726d7aea58b6764e21e56bd5e634541741e4a68bb783d1c44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6bcf9127d1034a739e807d8397cfa2809a94a3285a045b1d3c82aac8104beed9" + sha256 cellar: :any_skip_relocation, sonoma: "2fb85f758134ea23ef3c6bdd617fb3af20c4142f913f6add2073e1de4446d7e2" + sha256 cellar: :any_skip_relocation, ventura: "6a17570d917844ac3345bc76dd4ed7348277ed57dec7d51b40f67731b63bb43b" + sha256 cellar: :any_skip_relocation, arm64_linux: "de45dce8bac8c72bc9259c0bf60d2bea6bcc4330b1b01bc4af0a78293f6f5c33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd031a9018c40d31592c3ce172a2499f58d0e5bc5c63ac812ce5431e7c9d480b" + end + + depends_on "cmake" => :build + depends_on "maven" => :build + depends_on "openjdk@21" => :build + depends_on "rust" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + # Fixes: *** No rule to make target 'bin/goto-gcc', + # needed by '/tmp/cbmc-20240525-215493-ru4krx/regression/goto-gcc/archives/libour_archive.a'. Stop. + ENV.deparallelize + ENV["JAVA_HOME"] = Formula["openjdk@21"].opt_prefix + + system "cmake", "-S", ".", "-B", "build", "-Dsat_impl=minisat2;cadical", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # lib contains only `jar` files + libexec.install lib + end + + test do + # Find a pointer out of bounds error + (testpath/"main.c").write <<~C + #include + int main() { + char *ptr = malloc(10); + char c = ptr[10]; + } + C + assert_match "VERIFICATION FAILED", + shell_output("#{bin}/cbmc --pointer-check main.c", 10) + end +end diff --git a/Formula/c/cbonsai.rb b/Formula/c/cbonsai.rb new file mode 100644 index 0000000000000..bc075b23f8197 --- /dev/null +++ b/Formula/c/cbonsai.rb @@ -0,0 +1,30 @@ +class Cbonsai < Formula + desc "Console Bonsai is a bonsai tree generator, written in C using ncurses" + homepage "https://gitlab.com/jallbrit/cbonsai" + url "https://gitlab.com/jallbrit/cbonsai/-/archive/v1.4.2/cbonsai-v1.4.2.tar.gz" + sha256 "75cf844940e5ef825a74f2d5b1551fe81883551b600fecd00748c6aa325f5ab0" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "37e1bd7792b0722a35a28ac8e248d711f23ece8fc43fcfacfddcd8fa72db9f94" + sha256 cellar: :any, arm64_sequoia: "869d5f9329619e9bc7fafd702f44e2f3725cde753cc0c4b8653599b70153d0c1" + sha256 cellar: :any, arm64_sonoma: "71feed554a3774e5ded7a663fc43519ef0a9c633805495464326a0d078feed8c" + sha256 cellar: :any, arm64_ventura: "75af3e2e01e01d53c62a195d5f9f43d30f799a8126c342e668201dddcea5022b" + sha256 cellar: :any, sonoma: "2ec9072aa232ecf1242b783d7db8b61023532e28e1a11789dc9f49fdd185bc9d" + sha256 cellar: :any, ventura: "c9ce84ec6ca012fb023bd5648e585660ca47aaa525686aba6c2404ff22580a91" + sha256 cellar: :any_skip_relocation, arm64_linux: "5607d8b16bcd0d2f736cef0014baeef29eeec6fed5ffa98bbf017728d0d62a92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b8bee402d858d1ade576595f3e0727f3f65bfab1b9a500c7de7a08fe861c935" + end + + depends_on "pkgconf" => :build + depends_on "scdoc" => :build + depends_on "ncurses" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"cbonsai", "-p" + end +end diff --git a/Formula/c/cc65.rb b/Formula/c/cc65.rb new file mode 100644 index 0000000000000..636da09e854bb --- /dev/null +++ b/Formula/c/cc65.rb @@ -0,0 +1,45 @@ +class Cc65 < Formula + desc "6502 C compiler" + homepage "https://cc65.github.io/cc65/" + url "https://github.com/cc65/cc65/archive/refs/tags/V2.19.tar.gz" + sha256 "157b8051aed7f534e5093471e734e7a95e509c577324099c3c81324ed9d0de77" + license "Zlib" + head "https://github.com/cc65/cc65.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f920a8752f63358eadceb552629837af0fe7e35461c0d98c0430ede6cda0a4c5" + sha256 arm64_sequoia: "55807c89176cd3d4570b3728a7fabf1ac2c7014d11f6aec4ca5ed7fdd58c364b" + sha256 arm64_sonoma: "41632cc243d34d069cc66bd938aaa297265ab1f5438c59bfef49d8c49965c0a2" + sha256 arm64_ventura: "753141cb314e207064134c09d9f31ce82f9d2ca720925f321cb81100ef3ee347" + sha256 arm64_monterey: "9353c4052546b46967c63aabc48e64633164669129e6406f8afc2dcaac17fb89" + sha256 arm64_big_sur: "47405e34cd591b17d9ed65842f25ac7c6d9f61e98f21b9c403596257d7e23dae" + sha256 sonoma: "f253df296eb1aeb17bc02fef52e836d45b77b3364337abf68d53d26cbda218a5" + sha256 ventura: "18dc69ba26b9bee5ef93a34ec4e38111c7cf6c8fe0d4fdee174ed9980718e66e" + sha256 monterey: "2598003d7c24868193167d8095f1c4c22a4f46627073e480dbf7c67bba340ce3" + sha256 big_sur: "d0010fe7f4b58daea95dd57f4116668bd2bedfbd5392e73412162292034d456d" + sha256 catalina: "a773d68d33b81899ebe7c10d294c0d6e2c2eab9063206f787b1e8c5b8e36f437" + sha256 arm64_linux: "668380deeb544b5843f43f62f70d7d8acf4e25063764429c77a5ebc276a49ce0" + sha256 x86_64_linux: "a07773f9ba0bcbe345f8e3c27495b9f149ff0a4df6245748cb8152a75b13880f" + end + + def install + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + Library files have been installed to: + #{pkgshare} + EOS + end + + test do + (testpath/"foo.c").write "int main (void) { return 0; }" + + system bin/"cl65", "foo.c" # compile and link + assert_path_exists testpath/"foo" # binary + end +end diff --git a/Formula/c/ccache.rb b/Formula/c/ccache.rb new file mode 100644 index 0000000000000..302bd2b6f2c75 --- /dev/null +++ b/Formula/c/ccache.rb @@ -0,0 +1,130 @@ +class Ccache < Formula + desc "Object-file caching compiler wrapper" + homepage "https://ccache.dev/" + url "https://github.com/ccache/ccache/releases/download/v4.12.1/ccache-4.12.1.tar.xz" + sha256 "42e6c4b260cffd92dfa755e26390f45f5842e8c1a5f64f2b2e68adfbe82d1542" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/ccache/ccache.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "b1823027cc9ddf18617fc404ed6cf8f0584737ee06a40dbc25909c95bb82cbc4" + sha256 arm64_sequoia: "61b8061879a3a53cbc68a8c88530fe3dff9176fa14305e93335497175bc4c693" + sha256 cellar: :any, arm64_sonoma: "ecd78770fd6144834a6c2cf31ee49ebe16af10633d2257b537ad48c341faf088" + sha256 cellar: :any, sonoma: "a71e2cda87b7cdfef7122d7a34a57143788451019ad847f923cf1f7a2bea2c4b" + sha256 arm64_linux: "bbff4bc77fd29faf79f008e91b25ec41c2b035d7d92fe19c7d59630f4bde4db2" + sha256 x86_64_linux: "ee8b0c87d10df5ee4db44f43afbf534b9b5abd07c852ba640d325a65e60fa4e8" + end + + depends_on "asciidoctor" => :build + depends_on "cmake" => :build + depends_on "cpp-httplib" => :build + depends_on "doctest" => :build + depends_on "pkgconf" => :build + depends_on "span-lite" => :build + depends_on "tl-expected" => :build + depends_on "blake3" + depends_on "fmt" + depends_on "hiredis" + depends_on "xxhash" + depends_on "zstd" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", + "-DENABLE_IPO=TRUE", + "-DREDIS_STORAGE_BACKEND=ON", + "-DDEPS=LOCAL", + *std_cmake_args + system "cmake", "--build", "build" + + # Homebrew compiler shim actively prevents ccache usage (see caveats), which will break the test suite. + # We run the test suite for ccache because it provides a more in-depth functional test of the software + # (especially with IPO enabled), adds negligible time to the build process, and we don't actually test + # this formula properly in the test block since doing so would be too complicated. + # See https://github.com/Homebrew/homebrew-core/pull/83900#issuecomment-90624064 + with_env(CC: DevelopmentTools.locate(DevelopmentTools.default_compiler)) do + system "ctest", "-j#{ENV.make_jobs}", "--test-dir", "build" + end + + system "cmake", "--install", "build" + + libexec.mkpath + + %w[ + clang + clang++ + cc + gcc gcc2 gcc3 gcc-3.3 gcc-4.0 + gcc-4.2 gcc-4.3 gcc-4.4 gcc-4.5 gcc-4.6 gcc-4.7 gcc-4.8 gcc-4.9 + gcc-5 gcc-6 gcc-7 gcc-8 gcc-9 gcc-10 gcc-11 gcc-12 gcc-13 gcc-14 + gcc-15 + c++ c++3 c++-3.3 c++-4.0 + c++-4.2 c++-4.3 c++-4.4 c++-4.5 c++-4.6 c++-4.7 c++-4.8 c++-4.9 + c++-5 c++-6 c++-7 c++-8 c++-9 c++-10 c++-11 c++-12 c++-13 c++-14 + c++-15 + g++ g++2 g++3 g++-3.3 g++-4.0 + g++-4.2 g++-4.3 g++-4.4 g++-4.5 g++-4.6 g++-4.7 g++-4.8 g++-4.9 + g++-5 g++-6 g++-7 g++-8 g++-9 g++-10 g++-11 g++-12 g++-13 g++-14 + g++-15 + i686-w64-mingw32-gcc i686-w64-mingw32-g++ + x86_64-w64-mingw32-gcc x86_64-w64-mingw32-g++ + ].each do |prog| + libexec.install_symlink bin/"ccache" => prog + end + end + + def caveats + <<~EOS + To install symlinks for compilers that will automatically use + ccache, prepend this directory to your PATH: + #{opt_libexec} + + If this is an upgrade and you have previously added the symlinks to + your PATH, you may need to modify it to the path specified above so + it points to the current version. + + NOTE: ccache can prevent some software from compiling. + ALSO NOTE: The brew command, by design, will never use ccache. + EOS + end + + test do + ENV.prepend_path "PATH", opt_libexec + assert_equal "#{opt_libexec}/gcc", shell_output("which gcc").chomp + assert_match etc.to_s, shell_output("#{bin}/ccache --show-stats --verbose") + + # Calling `--help` can catch issues with fmt upgrades. + # https://github.com/orgs/Homebrew/discussions/5830 + system bin/"ccache", "--help" + + (testpath/"test.c").write <<~C + #include + int main(void) { + printf("hello, world"); + return 0; + } + C + + # Test that we link with xxhash correctly. + assert_equal "6ef4b356229ca145dca726e94e88ad10", shell_output("#{bin}/ccache --checksum-file test.c").chomp + # Test that we link with blake3 correctly. + file_hash = shell_output("#{bin}/ccache --hash-file test.c").chomp + assert_equal "5af3d23skapbcgbs975geemfqv6r6utsu", file_hash + + system bin/"ccache", ENV.cc, "-c", "test.c" + system bin/"ccache", "debug=true", ENV.cc, "-c", "test.c" + + input_text = testpath.glob("test.o.*.ccache-input-text").first.read + assert_match File.basename(ENV.cc), input_text + assert_match "test.c", input_text + assert_match file_hash, input_text + + # The format of the log file seems to differ on Linux. + # It's not clear how to make the assertion below work for it. + return unless OS.mac? + + log = testpath.glob("test.o.*.ccache-log").first + assert_match "cache hit", log.read + end +end diff --git a/Formula/c/ccal.rb b/Formula/c/ccal.rb new file mode 100644 index 0000000000000..8afb9aa352289 --- /dev/null +++ b/Formula/c/ccal.rb @@ -0,0 +1,40 @@ +class Ccal < Formula + desc "Create Chinese calendars for print or browsing" + homepage "https://ccal.chinesebay.com/ccal/ccal.htm" + url "https://ccal.chinesebay.com/ccal/ccal-2.5.3.tar.gz" + sha256 "3d4cbdc9f905ce02ab484041fbbf7f0b7a319ae6a350c6c16d636e1a5a50df96" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?ccal[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "886e52e30ce5de3a7be8fecca2367e09629a0832f48d286d61b122e77fc98f95" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "514253e54ddbf113dd2bfbb6c18e70d7640e05a7fad9f5a833f4d62a582e571e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e29b7227b250b957eef3c4ad4f111147c20d81d511fbbdcd0940ae3eed77671" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5501517c464734afd6d7dde343bcce5508be8a298f861181d7bb41b799098ca9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c64a8df40556f6f6778bfa5f5dbe5b3f19bd96d8ff83d208fedc4bf13cabd032" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e9555bba354683597a63cf86554624a01afbf7cc897c0e292b10edc3657f4572" + sha256 cellar: :any_skip_relocation, sonoma: "ee50d26ab3751fc41169edaddf069136ead8167383d537d21d7580216ebb7c5f" + sha256 cellar: :any_skip_relocation, ventura: "ebcd46da3c774e8cfee8e5a480e9d6aa665646bef41eed5774056eb62dd03ae2" + sha256 cellar: :any_skip_relocation, monterey: "ad4cbfca5bf91baacefb99faef58acc28a6cf0517d31ba2b94e365d69bf43086" + sha256 cellar: :any_skip_relocation, big_sur: "82e5a0c59583063fdfa23e254f77ac5d7972a8fb5a3e36138233c7a47245abdf" + sha256 cellar: :any_skip_relocation, catalina: "ea42afd04ed210cf6e0bedac3ab4ce6b3e37421ba8d79478769d2e117c38a41f" + sha256 cellar: :any_skip_relocation, arm64_linux: "c88444adaeb8ba5d457d6332da395b62ee03b8ffc25ec9001db44db2ce0fb15c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3d0a1bcea11bb75c5a13e8217bab044677bb6d8e905d84a2c4ba53d8b0b8e5e" + end + + def install + system "make", "-e", "BINDIR=#{bin}", "install" + system "make", "-e", "MANDIR=#{man}", "install-man" + end + + test do + assert_match "Year JiaWu, Month 1X", shell_output("#{bin}/ccal 2 2014") + end +end diff --git a/Formula/c/ccat.rb b/Formula/c/ccat.rb new file mode 100644 index 0000000000000..637d9fad604e4 --- /dev/null +++ b/Formula/c/ccat.rb @@ -0,0 +1,45 @@ +class Ccat < Formula + desc "Like cat but displays content with syntax highlighting" + homepage "https://github.com/owenthereal/ccat" + url "https://github.com/owenthereal/ccat/archive/refs/tags/v1.1.0.tar.gz" + sha256 "b02d2c8d573f5d73595657c7854c9019d3bd2d9e6361b66ce811937ffd2bfbe1" + license "MIT" + head "https://github.com/owenthereal/ccat.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "21843d1726a746b8fcfffac1d1cfb9f28c56ecaa54d596ee041f531d78e02cdd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57638eda46f68bfaf966e488fb3f7f49c7fde0386cda8f751af2669186abc1e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "777e245e58e51da009c714af7dfcf24f69bc26531a88dea591045f5067b6c7c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d047b4aededd042be8d667533534bfa4fdf3335051b8f88013659030ceecfa0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8119ea94a08924e3ba9bdd1cc8cfd77afb85ca66d90ad58fce246e47afe6da9b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2203ed8600403a7ebedf60ff3b1f7eac6bdd0793521d759c43f5a4c6ee0d0f42" + sha256 cellar: :any_skip_relocation, sonoma: "f75a66af97ef4956e89708382fa2165831f39e5528dc6da3cfd6a95bb51880b9" + sha256 cellar: :any_skip_relocation, ventura: "d4bb45ec8cf50520f4f7199174f8881149e16c2720b1ec0feb6926c92306049a" + sha256 cellar: :any_skip_relocation, monterey: "e099e55ef5f1c7d3c8eaf14c0d5bcb9ec4de6314ea4e992307ea59369a136b37" + sha256 cellar: :any_skip_relocation, big_sur: "56555b8a3744a0af29b6bddcab2587457bb8622f78484b38fbbaceab88ea3f5b" + sha256 cellar: :any_skip_relocation, catalina: "aec38270a3b41a57fe6d05df08eea67042f2b65a2a5de30b2452afefd81a6d9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "74f9f37c1766000c954ceaba33a4238b8879a243dfc90f0fa215c5d98e2dd155" + sha256 cellar: :any_skip_relocation, x86_64_linux: "340dbf0c6e8f10d588a4a7c63edc14fe38c64cac809c2107f911d57f59a74f8c" + end + + depends_on "go" => :build + + conflicts_with "ccrypt", because: "both install `ccat` binaries" + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + system "./script/build" + bin.install "ccat" + end + + test do + (testpath/"test.txt").write <<~EOS + I am a colourful cat + EOS + + assert_match(/I am a colourful cat/, shell_output("#{bin}/ccat test.txt")) + end +end diff --git a/Formula/c/ccd2iso.rb b/Formula/c/ccd2iso.rb new file mode 100644 index 0000000000000..aa2fc9afaacc9 --- /dev/null +++ b/Formula/c/ccd2iso.rb @@ -0,0 +1,40 @@ +class Ccd2iso < Formula + desc "Convert CloneCD images to ISO images" + homepage "https://ccd2iso.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ccd2iso/ccd2iso/ccd2iso-0.3/ccd2iso-0.3.tar.gz" + sha256 "f874b8fe26112db2cdb016d54a9f69cf286387fbd0c8a55882225f78e20700fc" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b0fdfe74cdd573d4b411974eb51ff6d8dd0be85e2ca817a42517d7651f21f638" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7196c00e29751b4d90307dcc66d0d0f329dcce6bc4c9ce9ae88aceef81e55ee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c3859a54807a7d37e25bf568c22dd063ad9d613713242cc8e266e69f985cc59" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9e1e557828fbb5b8b991d0710a5e2489a82bc8dad3b6136d2ddd17f2ced86c5a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3a6f9de23756982dfeb30537a00671d0a3d51edb2e322a9d4285c3a89da3be63" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a5744e3d028a63b27e0a6b9c8f0c839effbd4385f41af50bb44725d5310b61ee" + sha256 cellar: :any_skip_relocation, sonoma: "4783fb7a6000284fc3d8e6e1bdd1a6ee87cd1f92428412e6f436344903ccf28b" + sha256 cellar: :any_skip_relocation, ventura: "3fd3ad509a9207e16d00d0b00d34a3ee7b15318303d1a1ec5e94ddf40785e8d8" + sha256 cellar: :any_skip_relocation, monterey: "16d7cbbc96fab04752d418f7e4f196e2d0d36e494a27002bf76f907d160cba50" + sha256 cellar: :any_skip_relocation, big_sur: "1bd1d2fedb8cd0bfe682f80bffeced5c7e273a2d24c2dd01a7b777e4d3ee0115" + sha256 cellar: :any_skip_relocation, catalina: "741bb587861701e9900ede511e2db1e73815428eb2f0f2c697313dad70609853" + sha256 cellar: :any_skip_relocation, arm64_linux: "929e63160bead9e5533fea39f455a370513e0879b1c66205b570ef1f87e9feea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eca2835beb5b622b6f0b2b781524e638e67a65b8d4f683cb0984c74c34c1603b" + end + + def install + # Missing header file, see https://sourceforge.net/p/ccd2iso/bugs/11/ + inreplace "src/ccd2iso.c", "#include \n", "#include \n#include \n" + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match( + /^#{Regexp.escape(version)}$/, shell_output("#{bin}/ccd2iso --version") + ) + end +end diff --git a/Formula/c/ccfits.rb b/Formula/c/ccfits.rb new file mode 100644 index 0000000000000..82a3a9447fd3d --- /dev/null +++ b/Formula/c/ccfits.rb @@ -0,0 +1,57 @@ +class Ccfits < Formula + desc "Object oriented interface to the cfitsio library" + homepage "https://heasarc.gsfc.nasa.gov/docs/software/fitsio/CCfits/" + url "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/ccfits/v2.7/CCfits-2.7.tar.gz" + sha256 "f63546d2feecbf732cc08aaaa80a2eb5334ada37fb2530181b7363a5dbdeb01a" + license "CFITSIO" + + livecheck do + url "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/ccfits/" + regex(/href=.*v?(\d+(?:\.\d+)+)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e095d123708d4f5c4c57b26c82155a75405f6e19f29c955ac7b52f4121d2df1d" + sha256 cellar: :any, arm64_sequoia: "da6f787ac55d5f93ad25617af795ac878443371ca2bab55bf9fd64736d592cfd" + sha256 cellar: :any, arm64_sonoma: "057ee421d9fde174bd2e7dde06b8e72ed3c987c782f08e41f433d40025d31c0c" + sha256 cellar: :any, arm64_ventura: "b0490e303998fd2eab1ecffd498b1fa052581b27d92b7cdde9265a52a4e713c6" + sha256 cellar: :any, sonoma: "a7d684bbb48a13f09a4b8e6d70228d2d06cfcfb975a52070e4e9adcc250f3a88" + sha256 cellar: :any, ventura: "512d95b2fae5a3be154661f93801a8ff9232c87e14a6284492fa74e053793f9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "555829bdb3662a54aca6af2aaf711c1c1ca388066e279f6bf725b2013bd23954" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fe8e6f44ecc655e7951eab676f718f070e76e4d00bbfca35c8e42478ae1b0a6" + end + + depends_on "cfitsio" + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + ] + + # Remove references to brew's shims + args << "pfk_cxx_lib_path=/usr/bin/g++" if OS.linux? + + system "./configure", *args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + CCfits::FITS::setVerboseMode(true); + std::cout << "the answer is " << CCfits::VTbyte << std::endl; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", + "-L#{lib}", "-lCCfits" + assert_match "the answer is -11", shell_output("./test") + end +end diff --git a/Formula/c/ccheck.rb b/Formula/c/ccheck.rb new file mode 100644 index 0000000000000..e73f72560a79b --- /dev/null +++ b/Formula/c/ccheck.rb @@ -0,0 +1,37 @@ +class Ccheck < Formula + desc "Check X509 certificate expiration from the command-line, with TAP output" + homepage "https://github.com/nerdlem/ccheck" + url "https://github.com/nerdlem/ccheck/archive/refs/tags/v1.0.1.tar.gz" + sha256 "2325ea8476cce5111b8f848ca696409092b1d1d9c41bd46de7e3145374ed32cf" + license "GPL-2.0-or-later" + head "https://github.com/nerdlem/ccheck.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26489d1d45ade5e4462eaa3083558f872018bcd9d9e47b98e122f2dd086b402a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0f8816e58c6387289a2ba6392a03b40c93f1f4e6fe840ff840b7550a476a7c2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26ab4d218b0474e6c6d7ad9c11f89b17a7d98e846d5305972722edc87e5b0205" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44342aa8159dc8a960a1c59447e4de8a178cf1e6ed40baae0ebdd7fd3a58f194" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eefb4874302348bbafd636ba38bc958b940c488a0acafc92357002d47e8fadf3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a31268fedbbe48cd989d6900c96b34b98e8354fe1e397dc96fb454a32376528e" + sha256 cellar: :any_skip_relocation, sonoma: "7bcefa37758f67958aa0862ba81fd0593e451b4d0487e933320851156c0dde70" + sha256 cellar: :any_skip_relocation, ventura: "74350527eafdf458bb565391577cced252ce386c30bc03e8a3692fcb4198b933" + sha256 cellar: :any_skip_relocation, monterey: "f4784bc20e952229a571074101e28e68c82393c0ef224b141a0cecd93fa641b1" + sha256 cellar: :any_skip_relocation, big_sur: "226e757f5a2253c0dacce3e97e6b325e9bb889c1ba775fb7cb38a9b797458b73" + sha256 cellar: :any_skip_relocation, catalina: "edc3a16f072eeca5647916de805bc80a753d00548b860a052f670b4698464632" + sha256 cellar: :any_skip_relocation, arm64_linux: "02a98653ebd2b7dda5b82236bb39ca74772bf3d4ebce62a02e6039899d25f790" + sha256 cellar: :any_skip_relocation, x86_64_linux: "441d2d833959bcf2908a40acf3677e974c2409719f2d353289431cb0bea40d04" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_equal "brew-ccheck.libertad.link:443 TLS", + shell_output("#{bin}/ccheck brew-ccheck.libertad.link:443").strip + end +end diff --git a/Formula/c/ccls.rb b/Formula/c/ccls.rb new file mode 100644 index 0000000000000..50b9d8d2bc26b --- /dev/null +++ b/Formula/c/ccls.rb @@ -0,0 +1,48 @@ +class Ccls < Formula + desc "C/C++/ObjC language server" + homepage "https://github.com/MaskRay/ccls" + # NOTE: Upstream often does not mark the latest release on GitHub, so + # this can be updated with the new tag. + # https://github.com/Homebrew/homebrew-core/pull/106939 + # https://github.com/MaskRay/ccls/issues/786 + # https://github.com/MaskRay/ccls/issues/895 + url "https://github.com/MaskRay/ccls/archive/refs/tags/0.20250815.tar.gz" + sha256 "179eff95569faca76a1cdbd0d8f773c2cbbafa90e0fcce3d67a8a680066dce7a" + license "Apache-2.0" + head "https://github.com/MaskRay/ccls.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "cedfe8609cd57d53caafa870ced7749a053d17120f8217c674a348024584afa9" + sha256 arm64_sequoia: "74dbcee249ebd76e4622ebb433e037d3cadb84c441ca1f4c8933de00faa43051" + sha256 arm64_sonoma: "b498e68e4856fd358cf8c9d3dffcb31f2ff419912e078c39924f284c4e951690" + sha256 sonoma: "85fc2afb1dc84dcffda8178a99831864564dd839cd03874d5d1613c84ff72634" + sha256 arm64_linux: "66532e0dd148b2300b52e6999b7907f59931938b8422703dbef2c52fcc86724f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "001beaf77e3e2f2b127a5755ec07f3076fc7cf89ab8d3f78cd689a2f05fef240" + end + + depends_on "cmake" => :build + depends_on "rapidjson" => :build + depends_on "llvm" + + def llvm + deps.reject { |d| d.build? || d.test? } + .map(&:to_formula) + .find { |f| f.name.match?(/^llvm(@\d+)?$/) } + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: llvm.opt_lib)}" if OS.linux? + resource_dir = Utils.safe_popen_read(llvm.opt_bin/"clang", "-print-resource-dir").chomp + resource_dir.gsub! llvm.prefix.realpath, llvm.opt_prefix + system "cmake", "-S", ".", "-B", "build", "-DCLANG_RESOURCE_DIR=#{resource_dir}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/ccls -index=#{testpath} 2>&1") + + resource_dir = output.match(/resource-dir=(\S+)/)[1] + assert_path_exists "#{resource_dir}/include" + end +end diff --git a/Formula/c/ccm.rb b/Formula/c/ccm.rb new file mode 100644 index 0000000000000..321809d3669e1 --- /dev/null +++ b/Formula/c/ccm.rb @@ -0,0 +1,64 @@ +class Ccm < Formula + include Language::Python::Virtualenv + + desc "Create and destroy an Apache Cassandra cluster on localhost" + homepage "https://github.com/apache/cassandra-ccm" + url "https://files.pythonhosted.org/packages/f1/12/091e82033d53b3802e1ead6b16045c5ecfb03374f8586a4ae4673a914c1a/ccm-3.1.5.tar.gz" + sha256 "f07cc0a37116d2ce1b96c0d467f792668aa25835c73beb61639fa50a1954326c" + license "Apache-2.0" + revision 5 + head "https://github.com/apache/cassandra-ccm.git", branch: "trunk" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "6fbe9512a270d798879c5cc6cb046decd6985c4536d491224f99497059e227c2" + sha256 cellar: :any, arm64_sequoia: "6432c47b854ccce393f4f2f66cfb65f850f42fba0c81b2cc4b95b42373585078" + sha256 cellar: :any, arm64_sonoma: "b7a9a7372609b81930b20be11a6ba60eaeb54fdc5c341d4e579183fb95a05db2" + sha256 cellar: :any, sonoma: "f600df26b5ec2b2faa832b8f51df49e1f35a6f413c27455227673a7174e07f26" + sha256 cellar: :any_skip_relocation, arm64_linux: "eca12a71a357123c77e9a02335cc5397022bb8cd8740032803ad8df3aeff39ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1adba747d9849aec8a4b4f9277fac2429d7342ab6782f6385ee0bd641e4428fc" + end + + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages extra_packages: ["cassandra-driver", "setuptools"] + + resource "cassandra-driver" do + url "https://files.pythonhosted.org/packages/b2/6f/d25121afaa2ea0741d05d2e9921a7ca9b4ce71634b16a8aaee21bd7af818/cassandra-driver-3.29.2.tar.gz" + sha256 "c4310a7d0457f51a63fb019d8ef501588c491141362b53097fbc62fa06559b7c" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "geomet" do + url "https://files.pythonhosted.org/packages/cf/21/58251b3de99e0b5ba649ff511f7f9e8399c3059dd52a643774106e929afa/geomet-0.2.1.post1.tar.gz" + sha256 "91d754f7c298cbfcabd3befdb69c641c27fe75e808b27aa55028605761d17e95" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Usage", shell_output(bin/"ccm", 1) + end +end diff --git a/Formula/c/cconv.rb b/Formula/c/cconv.rb new file mode 100644 index 0000000000000..c9b138bae7d3f --- /dev/null +++ b/Formula/c/cconv.rb @@ -0,0 +1,43 @@ +class Cconv < Formula + desc "Iconv based simplified-traditional Chinese conversion tool" + homepage "https://github.com/xiaoyjy/cconv" + url "https://github.com/xiaoyjy/cconv/archive/refs/tags/v0.6.3.tar.gz" + sha256 "82f46a94829f5a8157d6f686e302ff5710108931973e133d6e19593061b81d84" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bfb30a39eb38f85420bced927f9c1db3d53a584cf4536a474621ad27a4936303" + sha256 cellar: :any, arm64_sequoia: "09a537e89790d6af0c6c2f1bd9331b1860b86800285c55c5f4420317aeac02ce" + sha256 cellar: :any, arm64_sonoma: "da6b870d250ca95eff392c8da4c1e703d292a764c02df3b44f3a2ebf1ff06e31" + sha256 cellar: :any, arm64_ventura: "90c54593dd333d215cd536457021fde2a90c768b9d3cbac601be53d4b793f268" + sha256 cellar: :any, arm64_monterey: "26691ab7b01031ee988442fb08c173d48da19e26d9cc494c829284b0248ee6d2" + sha256 cellar: :any, arm64_big_sur: "58c753e4b4b6887b81202d33c63ac6ef153d7166c6542661ab3dcbb322f173bf" + sha256 cellar: :any, sonoma: "ea6d3aef081f06fc31212ce8b68db8ac79eb590f10ab100e0706ecd8e85e5763" + sha256 cellar: :any, ventura: "d1848162e06e023be64aa6c61f22e3b2185409e0549c0ae2ad7629590cf10d80" + sha256 cellar: :any, monterey: "0e2e409ca1a2358465d8a780c94df0041cf7f162139eebdb86e9b6443376fac8" + sha256 cellar: :any, big_sur: "f39720a1d032edbcdbf6ccfd6a5f8c9dc46faaf95e479904cfde25ec5c7622d6" + sha256 cellar: :any, catalina: "06b6bafaadcaa16329ba0cdeee7d11a13e94f126a4011b54253e31a1ea82108e" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb747250621542e8deeda2696a06b14ce399459ce02ace26986e858446535c50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7176512194c3bed0f8db76bf768136559dd09bfaaa3562908acaa748ccbd288" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + ENV.append "LDFLAGS", "-liconv" if OS.mac? + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + rm(include/"unicode.h") + end + + test do + encodings = "GB2312, GBK, GB-HANS, GB-HANT, GB18030, BIG5, UTF8, UTF8-CN, UTF8-TW, UTF8-HK" + assert_match encodings, shell_output("#{bin}/cconv -l") + end +end diff --git a/Formula/c/ccrypt.rb b/Formula/c/ccrypt.rb new file mode 100644 index 0000000000000..6d647e186ff5c --- /dev/null +++ b/Formula/c/ccrypt.rb @@ -0,0 +1,47 @@ +class Ccrypt < Formula + desc "Encrypt and decrypt files and streams" + homepage "https://ccrypt.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ccrypt/1.11/ccrypt-1.11.tar.gz" + sha256 "b19c47500a96ee5fbd820f704c912f6efcc42b638c0a6aa7a4e3dc0a6b51a44f" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cebf96f7115ebb2be8b7f058e24de430aa06506c3dcfa5aaf9c0ff67d1bd780b" + sha256 arm64_sequoia: "030055fedb7e4f4136631b6cb57863d19dfbc34c422410ef246422471f6ee0b9" + sha256 arm64_sonoma: "6494f1e4ac165f00a8f1cadecc17a33175e0bc2e13d2c6111c4c0825416a43c2" + sha256 arm64_ventura: "8670e0da25badd930fe04316614c22caceec629bba9ae2fd4b1576f25d1c724f" + sha256 arm64_monterey: "6df2f69dee386a1f37820245fdcf2f2f6e52389e1617b8bcd72dfae25d829207" + sha256 arm64_big_sur: "df71b344abdb49c98de85ee062d3e505afdcdb203cde01d165e326b52e7bb891" + sha256 sonoma: "86ff4e2d100a5abd9a6a96ce38ef6aa7ff85aecb65c749d71d2f86f4f7cc8824" + sha256 ventura: "d4f607f5cf6620bf41ff3bb79f0343f0e6a01960e419d5fe254ecf0e007440ca" + sha256 monterey: "77326e57d8ebf598daed98540cde9e40b67dc5f759c5ea01a48a8defec9c2347" + sha256 big_sur: "f416ae1ffac238640025b992cfedb05ab6894d0ef6c60742b3ab95757bd137f0" + sha256 catalina: "e09c7818b7de98e36d433080334e169ac970e1a020114ddab1fdbbd54135ddbc" + sha256 arm64_linux: "66d34366219e543be249e3763823d38d772d6569159611ea1b2f6efa1daef601" + sha256 x86_64_linux: "3e2c5e49110742fb547d82b661695d2044a2404869e7224c1de1be036dd253de" + end + + conflicts_with "ccat", because: "both install `ccat` binaries" + + def install + args = ["--mandir=#{man}", "--with-lispdir=#{elisp}"] + args << "--disable-libcrypt" if OS.linux? # https://sourceforge.net/p/ccrypt/bugs/28/#22b5 + + system "./configure", *args, *std_configure_args + system "make", "install" + system "make", "check" + end + + test do + touch "homebrew.txt" + system bin/"ccrypt", "-e", testpath/"homebrew.txt", "-K", "secret" + assert_path_exists testpath/"homebrew.txt.cpt" + refute_path_exists testpath/"homebrew.txt" + + system bin/"ccrypt", "-d", testpath/"homebrew.txt.cpt", "-K", "secret" + assert_path_exists testpath/"homebrew.txt" + refute_path_exists testpath/"homebrew.txt.cpt" + end +end diff --git a/Formula/c/cctz.rb b/Formula/c/cctz.rb new file mode 100644 index 0000000000000..48f654918c6cf --- /dev/null +++ b/Formula/c/cctz.rb @@ -0,0 +1,62 @@ +class Cctz < Formula + desc "C++ library for translating between absolute and civil times" + homepage "https://github.com/google/cctz" + url "https://github.com/google/cctz/archive/refs/tags/v2.5.tar.gz" + sha256 "47d2d68e7cb5af3296dc7e69b0f4a765589f1b2f4af4b9c42e772414c428b421" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6284d05bd82c833d038e7fe7a1b46288db768f917dc7a54c0cbd0ec60ef49474" + sha256 cellar: :any, arm64_sequoia: "2712e262130449fd148e9e269ef211baaf180ad6fdee8e53ae0677d5edff39c1" + sha256 cellar: :any, arm64_sonoma: "e08d896c8857b05cfd0f0acd71c0c4da9d7f4d87885ab70e3f942156c6052c59" + sha256 cellar: :any, arm64_ventura: "0142de2c33e7260a2d5733ab54fdce84958d0d511d4f6b9b46f4b89c42b83aa4" + sha256 cellar: :any, sonoma: "48dd11816116da849effe5f734883373c47b676c25e9704bccd477b4ffa76cdd" + sha256 cellar: :any, ventura: "dddb31e05731af18d90829688081aaeffb2aaa4a8dda83975e88a1abf1c0c5f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "032ab04e69e1f663c647f6e40ffbc590a349b4cbae8b69a6d33193169f4a4210" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12c1b89beed6a56b0b9220e98b9eb6fc671b7d8876a753426a424318d809355a" + end + + depends_on "cmake" => :build + + def install + args = ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON"] + + system "cmake", "-S", ".", "-B", "build_shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", "-DBUILD_SHARED_LIBS=OFF", *args, *std_cmake_args + system "cmake", "--build", "build_static" + lib.install "build_static/libcctz.a" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + #include + + std::string format(const std::string& fmt, const std::tm& tm) { + char buf[100]; + std::strftime(buf, sizeof(buf), fmt.c_str(), &tm); + return buf; + } + + int main() { + const std::time_t now = std::time(nullptr); + std::tm tm_utc, tm_local; + + #if defined(_WIN32) || defined(_WIN64) + gmtime_s(&tm_utc, &now); + localtime_s(&tm_local, &now); + #else + gmtime_r(&now, &tm_utc); + localtime_r(&now, &tm_local); + #endif + std::cout << format("UTC: %Y-%m-%d %H:%M:%S\\n", tm_utc) << format("Local: %Y-%m-%d %H:%M:%S\\n", tm_local); + } + CPP + system ENV.cxx, "test.cc", "-I#{include}", "-L#{lib}", "-std=c++11", "-lcctz", "-o", "test" + system testpath/"test" + end +end diff --git a/Formula/c/ccusage.rb b/Formula/c/ccusage.rb new file mode 100644 index 0000000000000..1fd9f4e2eaea9 --- /dev/null +++ b/Formula/c/ccusage.rb @@ -0,0 +1,22 @@ +class Ccusage < Formula + desc "CLI tool for analyzing Claude Code usage from local JSONL files" + homepage "https://github.com/ryoppippi/ccusage" + url "https://registry.npmjs.org/ccusage/-/ccusage-17.1.3.tgz" + sha256 "c8ae49b3540427f418d00b9f245533e82c845f970eda19acb1c217c93082245c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6ee1b11a72db2e366c3a361ddb17ff5b1fac7b8112d81099fbe2497c45619dc2" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "No valid Claude data directories found.", shell_output("#{bin}/ccusage 2>&1", 1) + end +end diff --git a/Formula/c/cd-discid.rb b/Formula/c/cd-discid.rb new file mode 100644 index 0000000000000..7559e1a4b9e62 --- /dev/null +++ b/Formula/c/cd-discid.rb @@ -0,0 +1,49 @@ +class CdDiscid < Formula + desc "Read CD and get CDDB discid information" + homepage "https://linukz.org/cd-discid.shtml" + license "GPL-2.0-or-later" + revision 2 + head "https://github.com/taem/cd-discid.git", branch: "master" + + stable do + url "https://linukz.org/download/cd-discid-1.4.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/c/cd-discid/cd-discid_1.4.orig.tar.gz" + sha256 "ffd68cd406309e764be6af4d5cbcc309e132c13f3597c6a4570a1f218edd2c63" + + # macOS fix; see https://github.com/Homebrew/homebrew/issues/46267 + # Already fixed in upstream head; remove when bumping version to >1.4 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/cd-discid/1.4.patch" + sha256 "f53b660ae70e91174ab86453888dbc3b9637ba7fcaae4ea790855b7c3d3fe8e6" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6296e37d4a08d066d58baffa8ea53abf75c592f126ffcee9418ef293a9528a8e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9956c0cddca69b3a816e8bc553c0455adac71f67ee30041a9065ac7c4384c219" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6714fb89edba30f77536f171b99da060ec3fa80a419a0f27f5ab2b9a26f2a266" + sha256 cellar: :any_skip_relocation, arm64_ventura: "618a12cac73126b2818a93e91870571b7c78604ac0c4ab4e9f93e6c398a9d33a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "671ac240cb3b94484690d12ec1d85cc96d90ffbf848cfb4adeebd8f5f32c1fbd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7effbc8d5fb1325aa629f1ec607d75c64c9547b0aa70deb4f05b07e5a6b94c84" + sha256 cellar: :any_skip_relocation, sonoma: "2627114d338684f14e54e6cdeac94b9eecd648e45b7328c33ed86c98edd26abb" + sha256 cellar: :any_skip_relocation, ventura: "29d889c70841d76b9e01b6d2ab4d482fd7ee7e8ac67ba36a4720b457444f48b1" + sha256 cellar: :any_skip_relocation, monterey: "d90c6640e3b67fb2140a10da27714f30a302187bb0f0b13477a53936a2a66456" + sha256 cellar: :any_skip_relocation, big_sur: "6ffa8010d3a9ebbd8475901bca190ed9fe786ff7b9ff32ff161347b10ecd87fd" + sha256 cellar: :any_skip_relocation, catalina: "0a9f85136e9727175a4d861f759236d62cf24f19170e27bfd9bf8aeddbc4c8b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "92144152a7fa53e3cbe4c6eced912ab7a569079a1d40fb9a72c73635f70027c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6e37cc61545d58bebb66ffffada804ca5e39e47e503684c7ed84cfa856dbb14" + end + + # Last commit was 9 years ago, upstream site is gone + deprecate! date: "2025-10-16", because: :unmaintained + + def install + system "make", "CC=#{ENV.cc}" + bin.install "cd-discid" + man1.install "cd-discid.1" + end + + test do + assert_equal "cd-discid #{version}.", shell_output("#{bin}/cd-discid --version 2>&1").chomp + end +end diff --git a/Formula/c/cdargs.rb b/Formula/c/cdargs.rb new file mode 100644 index 0000000000000..884d342577d31 --- /dev/null +++ b/Formula/c/cdargs.rb @@ -0,0 +1,60 @@ +class Cdargs < Formula + desc "Directory bookmarking system - Enhanced cd utilities" + homepage "https://github.com/cbxbiker61/cdargs" + url "https://github.com/cbxbiker61/cdargs/archive/refs/tags/2.1.tar.gz" + sha256 "062515c3fbd28c68f9fa54ff6a44b81cf647469592444af0872b5ecd7444df7d" + license "GPL-2.0-or-later" + head "https://github.com/cbxbiker61/cdargs.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7276e0e92053255d34a6ab190a36dbbc58154253ba76d69f61f224d435c2675a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5be93566bc13d241d79bfa4c097b9a460750d889864bab0ee4276bd021a10f90" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fed4d372bf68ed5208d3ea9a33934d90089839d309da6600377430af6682c2a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48b0cc0d5f0f06a74cb14d049f2cb4540be4e14d3e6a8e1b651ff64a34c249ed" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cc63406b9216e6ae1ed24d3e7840776919dd1ad9a566610544fcf3c3520461b8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fb52b8d939ea7fde7c8579710b1bad8617e987214f2bfb730300b2e761ebf4dd" + sha256 cellar: :any_skip_relocation, sonoma: "ddc21725211421991e9335eec785ca97fde89ceb4840942d46dd2238d426277e" + sha256 cellar: :any_skip_relocation, ventura: "86be7bd36de93c3cd56ab18d4b4887a25abe3ece14e85fcf55867e73f453c586" + sha256 cellar: :any_skip_relocation, monterey: "8ab5eb91d90bb095fac13138ae4d86bd641075608aa173545fcca1c08f01bea1" + sha256 cellar: :any_skip_relocation, big_sur: "4c2ee17afed909adb4511fbbd7521e0cc4a852fd383f94735f1de76e63ffeeeb" + sha256 cellar: :any_skip_relocation, catalina: "0a40505138d5465211cc963f438683e38b88518b9f854e58b75d245e7a6fcd16" + sha256 arm64_linux: "2ad0944191220f6159c473279b6575743b2516589d835031c7bd914698dc1b93" + sha256 x86_64_linux: "064d2b42b2a03248b41e077184e0244c28b65b7b0a7fab0711f4c9725fce3ba1" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + uses_from_macos "ncurses" + + # fixes zsh usage using the patch provided at the cdargs homepage + # (See https://www.skamphausen.de/cgi-bin/ska/CDargs) + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/cdargs/1.35.patch" + sha256 "adb4e73f6c5104432928cd7474a83901fe0f545f1910b51e4e81d67ecef80a96" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + rm Dir["contrib/Makefile*"] + prefix.install "contrib" + bash_completion.install_symlink "#{prefix}/contrib/cdargs-bash.sh" + end + + def caveats + <<~EOS + Support files for bash, tcsh, and emacs have been installed to: + #{prefix}/contrib + EOS + end + + test do + system bin/"cdargs", "--version" + end +end diff --git a/Formula/c/cdb.rb b/Formula/c/cdb.rb new file mode 100644 index 0000000000000..92ba9361f693c --- /dev/null +++ b/Formula/c/cdb.rb @@ -0,0 +1,53 @@ +class Cdb < Formula + desc "Create and read constant databases" + homepage "https://cr.yp.to/cdb.html" + url "https://cr.yp.to/cdb/cdb-0.75.tar.gz" + sha256 "1919577799a50c080a8a05a1cbfa5fa7e7abc823d8d7df2eeb181e624b7952c5" + license :public_domain + + livecheck do + url "https://cr.yp.to/cdb/install.html" + regex(/href=.*?cdb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "77ead498a54dabedd9d9692d71df773d9988ef4a8153f076466a554b818984c5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8ea510b1e7233cd4f071d380ee73c44e72ea5d220798faa58ee7ac41280350f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a7bad3e2c174916e5e286dcf7e7d576a9996f8f199cf001b91d8232e0719c46" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7516272a59a2e3f387bd50b183a2238d9c5333b788cd1f3484ca15ca3c198c8c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6641aee9a21258f66441e250aa172ea092731be3ead3ae1b85393188d16dd61d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c9136d67f3a62785add35b9b205169b9ace86da2c86edf4fe1c16cb833465bf5" + sha256 cellar: :any_skip_relocation, sonoma: "18e027480cd5c20f0bda1d96fbb527596dda5f724f910a8d5062daf16dc7defb" + sha256 cellar: :any_skip_relocation, ventura: "88b43291068dbbea67161b415370ea6d09c0663ab3ec8eb052ff02bb8df9bec4" + sha256 cellar: :any_skip_relocation, monterey: "6417a2118fe06cb58aaa4a1d8181e9192c6598b4b8712ee2e3fdba0537996aaa" + sha256 cellar: :any_skip_relocation, big_sur: "9684789ff31a9f66e863c5ddce337ddc056fbea3f2d321d5752a6ec00a3d88c1" + sha256 cellar: :any_skip_relocation, catalina: "055cbaab9c15fe3f4b29dac36558497937eea6643c8ccf0cc4a9ee2c427fcff2" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d6ce5f6553dc71dabdde82a193e896ca52984ddfd00566aae92429c2bc008d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e39c6409d00f0176fd3bd2def3b15b555d5ea89d3b0f6dc9710f1ce61a442e99" + end + + # Fix build failure because of missing #include errno.h on Linux. + # Patch has been submitted to the cdb mailing list. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/cdb/errno.patch" + sha256 "9116b3577b29e01372a92ccbdbfa5f2b0957ae1b9f42f7df9bac101252f3538c" + end + + def install + inreplace "conf-home", "/usr/local", prefix + # Fix compile with newer Clang + inreplace "conf-cc", "gcc -O2", "gcc -O2 -Wno-implicit-function-declaration -Wno-implicit-int" + system "make", "setup" + end + + test do + record = "+4,8:test->homebrew\n\n" + pipe_output("#{bin}/cdbmake db dbtmp", record, 0) + assert_path_exists testpath/"db" + assert_equal(record, + pipe_output("#{bin}/cdbdump", (testpath/"db").binread, 0)) + end +end diff --git a/Formula/c/cddlib.rb b/Formula/c/cddlib.rb new file mode 100644 index 0000000000000..8adb1917ab57e --- /dev/null +++ b/Formula/c/cddlib.rb @@ -0,0 +1,91 @@ +class Cddlib < Formula + desc "Double description method for general polyhedral cones" + homepage "https://www.inf.ethz.ch/personal/fukudak/cdd_home/" + url "https://github.com/cddlib/cddlib/releases/download/0.94n/cddlib-0.94n.tar.gz" + sha256 "b87ee07ba2c1d0ab92a3e4eccacdf568f981a095a392e3b9efd7e7e4a9e125b1" + license "GPL-2.0-or-later" + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "d689cf16077c6e02f851c4d2a45b73539c9ad2eab766ab75cbf3ab7c21b50267" + sha256 cellar: :any, arm64_sequoia: "ac504ee11eb267b9968a1ea970356608880054457bfebd24f18820b1dc6010a1" + sha256 cellar: :any, arm64_sonoma: "afc609fa9a3560208e7441ad073a6959aa9f474483016b8aa5be9aef8a65ab0b" + sha256 cellar: :any, arm64_ventura: "368d7e7af37feb06abebe16bebd54583353543abe5be0d57290c9f9ae96e3bbb" + sha256 cellar: :any, sonoma: "e202144c2c75c4e40345c13eb02b22ea80fe6177b91fd5bfd04ad5546f19c351" + sha256 cellar: :any, ventura: "24fc8bc926b2943d0ef8b447a76cc4d0facbd52a4e9691b20272b748b272484e" + sha256 cellar: :any_skip_relocation, arm64_linux: "30e583fcfb964d44dbad623186b1fe4e5376711d0b911bcc3ece78148878db07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebc67a9e27992e7053430117534a76f2fce8ec8f91aad21418bc85bbdadd8fad" + end + + # Regenerate `configure` to avoid `-flat_namespace` bug. + # None of our usual patches apply. + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "gmp" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "setoper.h" + #include "cdd.h" + + #include + + int main(int argc, char *argv[]) + { + dd_set_global_constants(); /* First, this must be called once to use cddlib. */ + //std::cout << "Welcome to cddlib " << dd_DDVERSION << std::endl; + + dd_ErrorType error=dd_NoError; + dd_LPSolverType solver; /* either DualSimplex or CrissCross */ + dd_LPPtr lp; + + dd_rowrange m; + dd_colrange n; + dd_NumberType numb; + dd_MatrixPtr A; + dd_ErrorType err; + + numb=dd_Real; /* set a number type */ + m=4; /* number of rows */ + n=3; /* number of columns */ + A=dd_CreateMatrix(m,n); + dd_set_si2(A->matrix[0][0],4,3); dd_set_si(A->matrix[0][1],-2); dd_set_si(A->matrix[0][2],-1); + dd_set_si2(A->matrix[1][0],2,3); dd_set_si(A->matrix[1][1], 0); dd_set_si(A->matrix[1][2],-1); + dd_set_si(A->matrix[2][0],0); dd_set_si(A->matrix[2][1], 1); dd_set_si(A->matrix[2][2], 0); + dd_set_si(A->matrix[3][0],0); dd_set_si(A->matrix[3][1], 0); dd_set_si(A->matrix[3][2], 1); + + dd_set_si(A->rowvec[0],0); dd_set_si(A->rowvec[1], 3); dd_set_si(A->rowvec[2], 4); + + A->objective=dd_LPmax; + lp=dd_Matrix2LP(A, &err); /* load an LP */ + + std::cout << std::endl << "--- LP to be solved ---" << std::endl; + dd_WriteLP(stdout, lp); + + std::cout << std::endl << "--- Running dd_LPSolve ---" << std::endl; + solver=dd_DualSimplex; + dd_LPSolve(lp, solver, &error); /* Solve the LP */ + + //dd_WriteLPResult(stdout, lp, error); + + std::cout << "optimal value:" << std::endl << *lp->optvalue << std::endl; + + dd_FreeLPData(lp); + dd_FreeMatrix(A); + + dd_free_global_constants(); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}/cddlib", "-L#{lib}", "-lcdd", "-o", "test" + assert_equal "3.66667", shell_output("./test").split[-1] + end +end diff --git a/Formula/c/cdebug.rb b/Formula/c/cdebug.rb new file mode 100644 index 0000000000000..1e704f829e2df --- /dev/null +++ b/Formula/c/cdebug.rb @@ -0,0 +1,47 @@ +class Cdebug < Formula + desc "Swiss army knife of container debugging" + homepage "https://github.com/iximiuz/cdebug" + url "https://github.com/iximiuz/cdebug/archive/refs/tags/v0.0.18.tar.gz" + sha256 "c28d6c079177aa8de850e2edcbd284ac08cd3f9d77aac851928e1cc85a77fbcb" + license "Apache-2.0" + head "https://github.com/iximiuz/cdebug.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b4a235c72e6296441f3af201d4ba7a01dd0c4465e5515184dc05baff66986b41" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3cea617c367a9f6d5e3266264ce47fac44590794eb7a61b877f29077056acce5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a99dd51424bd5ab2caf6c9cd72ccf714cc47a4de4074011d74f0d037602d8cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9905753cb70ea35ccc41d3b699b61d4d2c1048de56f0d0c2e73aaba4a678dd06" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f0825f6e7d64ec4f997804b7df677dfed0614cbdf63e8894629956dbf7e07131" + sha256 cellar: :any_skip_relocation, sonoma: "d8bbecf15e4a887884194ce9d3de0e054c2967cd6b3f6b6604ca7d2979b416f0" + sha256 cellar: :any_skip_relocation, ventura: "44591eccd5959f57814791f5f28b62ab873ecb32bc8cf95ecbe1acf1dfec2374" + sha256 cellar: :any_skip_relocation, monterey: "162efaee908ca5548c0b1cd599171b845a19283be9d7daa8c299c4d81d306ca9" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b13d0364e917932705d8a3604ee37b1c7e4570322043fa0012d29138ed74dc8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fb21211a688f48562c5aeb2aa0e58922af7e31ab33486722d2bb58514b64c17" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.commit=#{tap.user} + -X main.version=#{version} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"cdebug", "completion") + end + + test do + # need docker daemon during runtime + expected = if OS.mac? + "cdebug: Cannot connect to the Docker daemon" + else + "cdebug: Permission denied while trying to connect to the Docker daemon socket" + end + assert_match expected, shell_output("#{bin}/cdebug exec nginx 2>&1", 1) + + assert_match "cdebug version #{version}", shell_output("#{bin}/cdebug --version") + end +end diff --git a/Formula/c/cdecl.rb b/Formula/c/cdecl.rb new file mode 100644 index 0000000000000..f9f27bf1d0749 --- /dev/null +++ b/Formula/c/cdecl.rb @@ -0,0 +1,40 @@ +class Cdecl < Formula + desc "Turn English phrases to C or C++ declarations" + homepage "https://github.com/paul-j-lucas/cdecl" + url "https://github.com/paul-j-lucas/cdecl/releases/download/cdecl-18.5/cdecl-18.5.tar.gz" + sha256 "e4e212db3f997a9afe629fa4868062e0a92d6dd79ff374eca07b331220936362" + license all_of: [ + "GPL-3.0-or-later", + "LGPL-2.1-or-later", # gnulib + :public_domain, # original cdecl + ] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "56aa55de1ab7ef2b67721aa53069a6d33eb434205f240542a46d5b96d809001e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b2f274ad2494839a778687184c6ca3e9198fd683a5fd2bfca3b46fbcf1df5f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7beca9265e60378772ef71fed480cf2167e132e50d13ffd3d8b92f9c569725ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "26117d6cd0032b763032c2c785378b6c2f9a3862ea20917093db3e4ccbb73b5c" + sha256 cellar: :any_skip_relocation, sonoma: "b91d922ad48991f96f16944eccee5f54ae39ed8d320291a7b9f6931216e083d4" + sha256 cellar: :any_skip_relocation, ventura: "985fcee26f14ad895451b660826f8fcb1e353af4388dad3c612ead2841f566cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "886a5496e3d7a8567c4491f4f10f50c2c321388dbb71d37ce1a7430ca9e3ec5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b37cd9a2dd7818ea45acfe2295e085f2c92381f83b97339ec48760b1685d827e" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + on_linux do + depends_on "readline" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_equal "declare a as pointer to integer", + shell_output("#{bin}/cdecl explain int *a").strip + end +end diff --git a/Formula/c/cdi.rb b/Formula/c/cdi.rb new file mode 100644 index 0000000000000..37fbe35d5e967 --- /dev/null +++ b/Formula/c/cdi.rb @@ -0,0 +1,66 @@ +class Cdi < Formula + desc "C and Fortran Interface to access Climate and NWP model Data" + homepage "https://code.mpimet.mpg.de/projects/cdi" + url "https://code.mpimet.mpg.de/attachments/download/30033/cdi-2.5.3.tar.gz" + sha256 "1ebf6098b195c0bb13614015b62a63efd2ef3d4ee94f4c69cadcf236854b2303" + license "GPL-2.0-only" + + livecheck do + url "https://code.mpimet.mpg.de/projects/cdi/files" + regex(/href=.*?cdi[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "80dceb1f3e1acebdf751f86d7433164bff63a0f88deba2a916b5d70642c87267" + sha256 cellar: :any, arm64_sequoia: "cfc00e9f19ee18c4fd3db9f33e71a3312d28857a8a5911756d17bb36cf3047db" + sha256 cellar: :any, arm64_sonoma: "be8fbcfc9050ffe9e353d9b0fc31df5fea966babd9625fe014a82724c46f26ab" + sha256 cellar: :any, arm64_ventura: "95ecbbe3065c0a09587de975457e992a2c881844acb54303c4de76e62da81ce4" + sha256 cellar: :any, sonoma: "c39d215b041512c361686a609de5d5af7994a791bb0d9b163408f29e4dd3a352" + sha256 cellar: :any, ventura: "1441d2209aa2d2d8f7a373fe47e6eda539fdeb0ba9b4899c911baefe9770ae06" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e5351f6875be7fe43b7dd1075999ea63de9c4728c7bb70acf55d50bf27e61af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac2b729c7c93b160f854c4b4d0966f0926b7a32c5685780f24aa080a526146cb" + end + + depends_on "eccodes" + depends_on "hdf5" + depends_on "libaec" + depends_on "netcdf" + depends_on "proj" + + uses_from_macos "python" => :build + + on_linux do + depends_on "util-linux" + end + + def install + args = %W[ + --disable-silent-rules + --with-eccodes=#{Formula["eccodes"].opt_prefix} + --with-netcdf=#{Formula["netcdf"].opt_prefix} + --with-hdf5=#{Formula["hdf5"].opt_prefix} + --with-szlib=#{Formula["libaec"].opt_prefix} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + // Print CDI version + cdiPrintVersion(); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcdi", "-o", "test" + assert_match "CDI library version : #{version}", shell_output("./test") + end +end diff --git a/Formula/c/cdk.rb b/Formula/c/cdk.rb new file mode 100644 index 0000000000000..aba9e8cb77c57 --- /dev/null +++ b/Formula/c/cdk.rb @@ -0,0 +1,32 @@ +class Cdk < Formula + desc "Curses development kit provides predefined curses widget for apps" + homepage "https://invisible-island.net/cdk/" + url "https://invisible-mirror.net/archives/cdk/cdk-5.0-20251014.tgz" + sha256 "0ed46949c680a5f42e342cc48a2ce60bcfc2cc8b9eebb176877b5a91f829435c" + license "BSD-4-Clause-UC" + + livecheck do + url "https://invisible-mirror.net/archives/cdk/" + regex(/href=.*?cdk[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "587f92b6b6ccac672d9779aa539cf6407f5c6663981a65526048728d590e94fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5d30b788e217dea97bcfbe00f8870aada4f82830a049b1c4438332d4defe9c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23214535daa04a6a731dde13d8b663639ccd32484a906a0fcfe90ab4a4935c05" + sha256 cellar: :any_skip_relocation, sonoma: "1061220f7666a70e7cd12c14259d5f682566f4639a9cb058e90fbc9ee03700e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "86b9027c86caf2acea7f70048b810073b50f0160cac2d7205925d57bfd1a0376" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53cf8a5b7aeae3d90f495dfc46900335106846aee7543d41fdc23476b1ff35e3" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", "--with-ncurses" + system "make", "install" + end + + test do + assert_match lib.to_s, shell_output("#{bin}/cdk5-config --libdir") + end +end diff --git a/Formula/c/cdk8s.rb b/Formula/c/cdk8s.rb new file mode 100644 index 0000000000000..6811823283f77 --- /dev/null +++ b/Formula/c/cdk8s.rb @@ -0,0 +1,23 @@ +class Cdk8s < Formula + desc "Define k8s native apps and abstractions using object-oriented programming" + homepage "https://cdk8s.io/" + url "https://registry.npmjs.org/cdk8s-cli/-/cdk8s-cli-2.202.12.tgz" + sha256 "8753a3d8bd4d3b920710fcd8a1d31cb0eb161eead6b06b8d98fa5e9be06ddd75" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "97c980a71fbc8e11c5dae337c0eedcd0db15c7ea34fbd94df298f30ff3aa0476" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/cdk8s init python-app 2>&1", 1) + assert_match "Initializing a project from the python-app template", output + end +end diff --git a/Formula/c/cdktf.rb b/Formula/c/cdktf.rb new file mode 100644 index 0000000000000..5087a25f1b5b9 --- /dev/null +++ b/Formula/c/cdktf.rb @@ -0,0 +1,44 @@ +class Cdktf < Formula + desc "Cloud Development Kit for Terraform" + homepage "https://github.com/hashicorp/terraform-cdk" + url "https://registry.npmjs.org/cdktf-cli/-/cdktf-cli-0.21.0.tgz" + sha256 "5885318063a55b44f87c917fe5806379937f7aecad5fe766bc898a1519de56b6" + license "MPL-2.0" + revision 1 + + bottle do + sha256 arm64_tahoe: "f578d63eb4a956b48e9c9c16aaab47f11f03fdd7116d0d725a6e952d280e7ccd" + sha256 arm64_sequoia: "7d373a388353fd948c21d43f7bb49483bdacc5f43a8c7e0a00a7bc456bcabe07" + sha256 arm64_sonoma: "3af0f208b1aa7e65a16754356dac5b7ce395313a27bcf9c26e35908f025e529e" + sha256 sonoma: "4fe3dd2844bd6a15198b8796c15d6d7b6f4b74a56de6815eeba5d7ba82444459" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce0176ec3db721cdab92513cf302e9ba61985c010e79f5e0da270bd6fe32056e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d87963c5ad6b246c64cd56cbe1cd35868e4d4758aa7c6bbf560c12c50cfe0b1" + end + + depends_on "opentofu" => :test + depends_on "node@24" + + def install + system "npm", "install", *std_npm_args + (bin/"cdktf").write_env_script libexec/"bin/cdktf", PATH: "#{Formula["node@24"].opt_bin}:${PATH}" + + # remove non-native architecture pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/cdktf-cli/node_modules" + node_pty_prebuilds = node_modules/"@cdktf/node-pty-prebuilt-multiarch/prebuilds" + node_pty_prebuilds.glob("linux-{x64,arm64}/node.abi*.musl.node").map(&:unlink) + node_pty_prebuilds.each_child { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + + generate_completions_from_executable(libexec/"bin/cdktf", "completion", + shells: [:bash, :zsh], shell_parameter_format: :none) + end + + test do + ENV["TERRAFORM_BINARY_NAME"] = "tofu" + + touch "unwanted-file" + output = shell_output("#{bin}/cdktf init --template=python 2>&1", 1) + assert_match "ERROR: Cannot initialize a project in a non-empty directory", output + end +end diff --git a/Formula/c/cdlabelgen.rb b/Formula/c/cdlabelgen.rb new file mode 100644 index 0000000000000..38884ce3acf6e --- /dev/null +++ b/Formula/c/cdlabelgen.rb @@ -0,0 +1,34 @@ +class Cdlabelgen < Formula + desc "CD/DVD inserts and envelopes" + homepage "https://www.aczoom.com/tools/cdinsert/" + url "https://www.aczoom.com/pub/tools/cdlabelgen-4.3.0.tgz" + sha256 "94202a33bd6b19cc3c1cbf6a8e1779d7c72d8b3b48b96267f97d61ced4e1753f" + license "BSD-3-Clause" + + livecheck do + url "https://www.aczoom.com/pub/tools/" + regex(/href=.*?cdlabelgen[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b59e22a5f1b438e89d6ae6cc662a70c09c9fd3aeee92538cf6a049296a0ca2be" + end + + def install + man1.mkpath + system "make", "install", "BASE_DIR=#{prefix}" + end + + test do + args = %W[ + --category TestTitle + --cover-template #{pkgshare}/template.ps + --output-file testout.eps + ] + system bin/"cdlabelgen", *args + assert_path_exists "testout.eps" + end +end diff --git a/Formula/c/cdncheck.rb b/Formula/c/cdncheck.rb new file mode 100644 index 0000000000000..7b619c62ba33e --- /dev/null +++ b/Formula/c/cdncheck.rb @@ -0,0 +1,34 @@ +class Cdncheck < Formula + desc "Utility to detect various technology for a given IP address" + homepage "https://projectdiscovery.io" + url "https://github.com/projectdiscovery/cdncheck/archive/refs/tags/v1.2.8.tar.gz" + sha256 "b316fb688df924bfc302a1ce7848ef4edb02d6ca9dad38e627efb55b2e97a077" + license "MIT" + head "https://github.com/projectdiscovery/cdncheck.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10b090c0e761caf3ebb233bb6dab85dccd76f5ce05619f471fd289af3824f394" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4326c9938c2cc3acca36c7089241d8b8d509e1134944cf072bb0efbfc7564c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96dd0e60e1e181343293c877a2da2272fcfb2879cb7cfe9364556a14b87fb718" + sha256 cellar: :any_skip_relocation, sonoma: "2d6fe9e088855c7c172570305cbf2e2c23efbf0f09294ec0bfb267f3d625a6fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "581fca942a86f1769c09cf810e60553b5459fb2d64b7d987cd9769b7ac899e3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27ced57cb1df78828ec242abf5a974364af35cf6cb3a827bc539568b7222a8bd" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cdncheck" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cdncheck -version 2>&1") + + assert_match "Found result: 1", shell_output("#{bin}/cdncheck -i 173.245.48.12/32 2>&1") + end +end diff --git a/Formula/c/cdo.rb b/Formula/c/cdo.rb new file mode 100644 index 0000000000000..5edbcc6a51d20 --- /dev/null +++ b/Formula/c/cdo.rb @@ -0,0 +1,69 @@ +class Cdo < Formula + desc "Climate Data Operators" + homepage "https://code.mpimet.mpg.de/projects/cdo" + url "https://code.mpimet.mpg.de/attachments/download/30045/cdo-2.5.3.tar.gz" + sha256 "470fee8f4d2b4eddf9ec82d0adccf1f6b4821ddf34b33bfe6b7069b6b6457b40" + license "GPL-2.0-only" + + livecheck do + url "https://code.mpimet.mpg.de/projects/cdo/news" + regex(/Version (\d+(?:\.\d+)+) released/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "82e7955ead510a28bc78d5d6dd99a08f74dd84336ed802ed9f128df71f863b03" + sha256 cellar: :any, arm64_sequoia: "2ac35b8e2f62fa629e955a49f4ec8bcbfb07bdf44a84bfae5ae01a0459c417ef" + sha256 cellar: :any, arm64_sonoma: "9079697b7d6700ac704ade7477db4b30e12b8289fb1a271dd81f097c6b208b17" + sha256 cellar: :any, sonoma: "95b578a3fd686b5612651a6e8959c01a384a130488e63f738e83e8409da46858" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b76ea61927b7760207e8b7bfe1baf3ec7497ed0ada3d9d027952ce28f30df35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebde9c2c85fc32e9c52d2dcdaab37454ba8e711adaa76f2e66cffc07bae84fa2" + end + + depends_on "eccodes" + depends_on "hdf5" + depends_on "libaec" + depends_on "netcdf" + depends_on "proj" + + uses_from_macos "python" => :build + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1500 + end + + on_linux do + depends_on "util-linux" + end + + fails_with :clang do + build 1500 + cause "Requires C++20 support" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + args = %W[ + --disable-openmp + --with-eccodes=#{Formula["eccodes"].opt_prefix} + --with-netcdf=#{Formula["netcdf"].opt_prefix} + --with-hdf5=#{Formula["hdf5"].opt_prefix} + --with-szlib=#{Formula["libaec"].opt_prefix} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + data = <<~EOF.unpack1("m") + R1JJQgABvAEAABz/AAD/gAEBAABkAAAAAAEAAAoAAAAAAAAAAAAgAP8AABIACgB+9IBrbIABLrwA4JwTiBOIQAAAAAAAAXQIgAPEFI2rEBm9AACVLSuNtwvRALldqDul2GV1pw1CbXsdub2q9a/17Yi9o11DE0UFWwRjqsvH80wgS82o3UJ9rkitLcPgxJDVaO9No4XV6EWNPeUSSC7txHi7/aglVaO5uKKtwr2slV5DYejEoKOwpdirLXPIGUAWCya7ntil1amLu4PCtafNp5OpPafFqVWmxaQto72sMzGQJeUxcJkbqEWnOKM9pTOlTafdqPCoc6tAq0WqFarTq2i5M1NdRq2AHWzFpFWj1aJtmAOrhaJzox2nwKr4qQWofaggqz2rkHcog2htuI2YmOB9hZDIpxXA3ahdpzOnDarjqj2k0KlIqM2oyJsjjpODmGu1YtU6WHmNZ5uljcbVrduuOK1DrDWjGKM4pQCmfdVFprWbnVd7Vw1QY1s9VnNzvZiLmGucPZwVnM2bm5yFqb2cHdRQqs2hhZrrm1VGeEQgOduhjbWrqAWfzaANnZOdWJ0NnMWeJQA3Nzc3AAAAAA== + EOF + File.binwrite("test.grb", data) + system bin/"cdo", "-f", "nc", "copy", "test.grb", "test.nc" + assert_path_exists testpath/"test.nc" + end +end diff --git a/Formula/c/cdogs-sdl.rb b/Formula/c/cdogs-sdl.rb new file mode 100644 index 0000000000000..94de8a39496a3 --- /dev/null +++ b/Formula/c/cdogs-sdl.rb @@ -0,0 +1,61 @@ +class CdogsSdl < Formula + desc "Classic overhead run-and-gun game" + homepage "https://cxong.github.io/cdogs-sdl/" + url "https://github.com/cxong/cdogs-sdl/archive/refs/tags/2.3.2.tar.gz" + sha256 "e2f56262629b175d4a387f6491696edc0a5b9420c9be8e9aa12b60feaa4fefa1" + license "GPL-2.0-or-later" + head "https://github.com/cxong/cdogs-sdl.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "493a195761b03422dbb086028bdb68d23ce467a4f531e300030b3d3ae6feafd2" + sha256 arm64_sequoia: "4e24f31b8ee89a741c871ea1bf432a051a0dbbc5c44c3445f8d924f7a6c98e96" + sha256 arm64_sonoma: "5ccba356364ef62cbe33de604239191571d00368b296efbcf5443bd344c88f08" + sha256 sonoma: "83fb9b4b19b256cf9410d96234f13e086290f460bb94aaf8877dd16436e465cb" + sha256 arm64_linux: "ff74f2369565cd06639a6b9ffe97af60510dd98ce4b1110c5e584244b48bc1e7" + sha256 x86_64_linux: "0aff885c980dc56d382465c2b9dfbca48e4694bd49298867407159afc8fc2f26" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "python@3.14" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_mixer" + + on_linux do + depends_on "glib" + depends_on "gtk+3" + depends_on "mesa" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCDOGS_DATA_DIR=#{pkgshare}/", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + + bin.install %w[build/src/cdogs-sdl build/src/cdogs-sdl-editor] + pkgshare.install %w[data dogfights graphics missions music sounds] + doc.install Dir["doc/*"] + end + + test do + pid = spawn bin/"cdogs-sdl" + + max_sleep_time = 90 + time_slept = 0 + time_slept += sleep(5) while !(testpath/".config/cdogs-sdl").exist? && time_slept < max_sleep_time + + assert_path_exists testpath/".config/cdogs-sdl" + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/c/cdpr.rb b/Formula/c/cdpr.rb new file mode 100644 index 0000000000000..293380b6ffccc --- /dev/null +++ b/Formula/c/cdpr.rb @@ -0,0 +1,48 @@ +class Cdpr < Formula + desc "Cisco Discovery Protocol Reporter" + homepage "https://www.monkeymental.com/" + url "https://downloads.sourceforge.net/project/cdpr/cdpr/2.4/cdpr-2.4.tgz" + sha256 "32d3b58d8be7e2f78834469bd5f48546450ccc2a86d513177311cce994dfbec5" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "82a48884ef52f0eac1769644d8efa9ee572031be613669d16b3b23c1e09f1393" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dfd6f6ef21a6f1fbc38367d4000fdf6a6dd9910b5959bc7c418e2a89b94d1476" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a2af70f28e705ac6064aa5d51bb4fe7d00483b6588673768fef2239a516ffcf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f35e7e9e3c93e119f7357b74debf967a8703ec468e1f73f7dd7ebb79220ba631" + sha256 cellar: :any_skip_relocation, arm64_monterey: "09f09ac98ad3c7e738e0d31bc9d37bdec2cd3745aa5d8d28db3953ef27541561" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f2818981f1d2a090f072741028fc22ca8b420f6956661678b2768311f11f7064" + sha256 cellar: :any_skip_relocation, sonoma: "cc072ad444adf7814675187844074684fcf33b12dc87e7044d6151864adbb40b" + sha256 cellar: :any_skip_relocation, ventura: "bb8bee00358b95fe993e2afb2af08573ead8e170b15f788fe96c8d23d4f186fd" + sha256 cellar: :any_skip_relocation, monterey: "6dd8c4aa87c35167d8fb95ed0e450da18e3697a3dd6cf28e50b443e872b4a104" + sha256 cellar: :any_skip_relocation, big_sur: "256d525f93fcdfb7f8c765ca45c6c3b422f00386045a9feb3bd99a083382c9c8" + sha256 cellar: :any_skip_relocation, catalina: "62e58521757a1dd5020d962dc9a5d00647e920a66347b5d5e58c1e8920db822f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea696f5689ebc5dd7ca3dfc9621e40da5ceb24b4016607c713a7f05d5de2a130" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a2162fee06fc9c03e01a2a6787a18f1d8a0c241a0c315d76878b09ea787c7b6" + end + + uses_from_macos "libpcap" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `timeout'; /tmp/ccw1Bjcf.o:(.bss+0x0): first defined here + # multiple definition of `cdprs'; /tmp/ccw1Bjcf.o:(.bss+0x4): first defined here + # multiple definition of `handle'; /tmp/ccw1Bjcf.o:(.bss+0x8): first defined here + cflags = [] + cflags << "-fcommon" if OS.linux? + + # Makefile hardcodes gcc and other atrocities + system ENV.cc, *cflags, "cdpr.c", "cdprs.c", "conffile.c", "-lpcap", "-o", "cdpr" + bin.install "cdpr" + end + + def caveats + "run cdpr sudo'd in order to avoid the error: 'No interfaces found! Make sure pcap is installed.'" + end + + test do + system bin/"cdpr", "-h" + end +end diff --git a/Formula/c/cdrdao.rb b/Formula/c/cdrdao.rb new file mode 100644 index 0000000000000..8bdab01e75696 --- /dev/null +++ b/Formula/c/cdrdao.rb @@ -0,0 +1,50 @@ +class Cdrdao < Formula + desc "Record CDs in Disk-At-Once mode" + homepage "https://cdrdao.sourceforge.net/" + url "https://github.com/cdrdao/cdrdao/archive/refs/tags/rel_1_2_5.tar.gz" + sha256 "b347189ab550ae5bd1a19d323cdfd8928039853c23aa5e33d7273ab8c750692a" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "8bdc4963c13e5aa89fb923d6d15138740b978665301706598eccb6a41dd98d4b" + sha256 arm64_sequoia: "e743e2ad68e18dab5d0c92398fe17efabfe6a0bdc3ff070680446b6cb40ab6e9" + sha256 arm64_sonoma: "e4d1ccc44373ea37015384940c9bdfef60f847aa866cbb4406e7e39e50251b46" + sha256 arm64_ventura: "9bba142c6ea1c60866164731f20b0318488bef4e95dc337e471da95a44a3e6fc" + sha256 arm64_monterey: "d2ff09195a2c3bba86481154a011e24ead7e9c5b21b3d62555a73fb1b2474928" + sha256 arm64_big_sur: "98cd14947ae08e97b3db38fd3ce134357f5b231de5a50aef0968ff7f3f9acbff" + sha256 sonoma: "b83a5d9a865e9e5ff9080e702870029780a7478ca1f62b4d1a5e1e50479782e2" + sha256 ventura: "ba6051c32784b80330a170abb8eb259fc277fb30aeaeb2fa8c0327f15bc3ee7b" + sha256 monterey: "4f53224ac3e0a2f4b7a88664f38258dfcbd82b1cc1e87330b5598a962b570a03" + sha256 big_sur: "8646d1973bae91ad66f3b3318a7fb1e91f321eef9be18db2cc533a7833af292e" + sha256 arm64_linux: "db49fc2472974c0e6f5ed25432f5b8612deb979f98bf77f72912767cc30bd473" + sha256 x86_64_linux: "4bfec99cba6093c485d981592128baa27150a47cf28e4f6bf80d887aeda6352b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "lame" + depends_on "libao" + depends_on "libvorbis" + depends_on "mad" + + # Fixes build on macOS prior to 12. + # Remove when merged and released. + patch do + url "https://github.com/cdrdao/cdrdao/commit/105d72a61f510e3c47626476f9bbc9516f824ede.patch?full_index=1" + sha256 "0e235c0c34abaad56edb03a2526b3792f6f7ea12a8144cee48998cf1326894eb" + end + + def install + system "./autogen.sh" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + assert_match "ERROR: No device specified, no default device found.", + shell_output("#{bin}/cdrdao drive-info 2>&1", 1) + end +end diff --git a/Formula/c/cdrtools.rb b/Formula/c/cdrtools.rb new file mode 100644 index 0000000000000..8779a261b255d --- /dev/null +++ b/Formula/c/cdrtools.rb @@ -0,0 +1,75 @@ +class Cdrtools < Formula + desc "CD/DVD/Blu-ray premastering and recording software" + homepage "https://cdrtools.sourceforge.net/private/cdrecord.html" + url "https://downloads.sourceforge.net/project/cdrtools/alpha/cdrtools-3.02a09.tar.gz" + mirror "https://fossies.org/linux/misc/cdrtools-3.02a09.tar.gz" + sha256 "c7e4f732fb299e9b5d836629dadf5512aa5e6a5624ff438ceb1d056f4dcb07c2" + license "CDDL-1.0" + + livecheck do + # For 3.0.2a we are temporarily using the "alpha" due to a long wait for release. + # This can go back to "url :stable" later + url "https://downloads.sourceforge.net/project/cdrtools/alpha" + regex(%r{url=.*?/cdrtools[._-]v?(\d+(?:\.\d+)+(a\d\d)?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f288c36da4a1fb214eea796214193de02c0193d7e1237829114fe5b978e5e0f4" + sha256 arm64_sequoia: "12e1334974f92d034d839c30e8d1c4ff5d8a5e7341ae9d2f4013cc6bd1b73859" + sha256 arm64_sonoma: "ed19c02f2ca445c89d139595e826a29bcfd41dba4c8e67c461b86deaa277af14" + sha256 arm64_ventura: "5bce367688103071cb34a38002f0c2dc767b3e55912c2605e27c705013ed3285" + sha256 arm64_monterey: "954f46597d28f0a8ca1eca8de6ca79182a3904472944e484c7406663f7b6a95c" + sha256 arm64_big_sur: "06bd97603df2dba522d6cb18b50815b3cb4f6b619b3244e6d870009831129a37" + sha256 sonoma: "f406e331c0d3bb1622f48e71a6d0b68994f10123758f23c86492ba552fc22035" + sha256 ventura: "3e1fd6e949d4a3f1d08a7fb658c6804c314775fad778c1c0171a07a84d301143" + sha256 monterey: "464dd4f91af02239f99ee4f67109ffd830efdd8eb51e409649e352fe4946e74a" + sha256 big_sur: "dd2f2609309ef54a2b9289ef79032222714f01c86ecb280d8d79ebc520488ae6" + sha256 catalina: "411c2dc1a6931d3c7c299d7c9d73129efbf45a39a421518158a3852de554fcaf" + sha256 arm64_linux: "a4ccf338b3311fd3f83255a94da5bc352d00e458deb031f311c26a7b1b48206d" + sha256 x86_64_linux: "4933b72c86f84c6378d621ecc1e5ac26621ef8b5b8e890b0841d389edc64db12" + end + + depends_on "smake" => :build + + conflicts_with "dvdrtools", + because: "both dvdrtools and cdrtools install binaries by the same name" + + def install + # Fix for newer clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-implicit-function-declaration" + + # Speed-up the build by skipping the compilation of the profiled libraries. + # This could be done by dropping each occurrence of *_p.mk from the definition + # of MK_FILES in every lib*/Makefile. But it is much easier to just remove all + # lib*/*_p.mk files. The latter method produces warnings but works fine. + rm(Dir["lib*/*_p.mk"]) + # CFLAGS is required to work around autoconf breakages as of 3.02a + system "smake", "INS_BASE=#{prefix}", "INS_RBASE=#{prefix}", + "CFLAGS=#{ENV.cflags}", + "install" + # cdrtools tries to install some generic smake headers, libraries and + # manpages, which conflict with the copies installed by smake itself + rm_r(include/"schily") + %w[libschily.a libdeflt.a libfind.a].each do |file| + (lib/file).unlink + end + rm_r(man5) + end + + test do + system bin/"cdrecord", "-version" + system bin/"cdda2wav", "-version" + date = shell_output("date") + mkdir "subdir" do + (testpath/"subdir/testfile.txt").write(date) + system bin/"mkisofs", "-r", "-o", "../test.iso", "." + end + assert_path_exists testpath/"test.iso" + system bin/"isoinfo", "-R", "-i", "test.iso", "-X" + assert_path_exists testpath/"testfile.txt" + assert_equal date, File.read("testfile.txt") + end +end diff --git a/Formula/c/cdsclient.rb b/Formula/c/cdsclient.rb new file mode 100644 index 0000000000000..96ed1e1ae95f2 --- /dev/null +++ b/Formula/c/cdsclient.rb @@ -0,0 +1,40 @@ +class Cdsclient < Formula + desc "Tools for querying CDS databases for astronomical data" + homepage "https://cdsarc.u-strasbg.fr/doc/cdsclient.html" + url "https://cdsarc.u-strasbg.fr/ftp/pub/sw/cdsclient-4.07.tar.gz" + sha256 "4a0a02cb1dc48bc9a0873ebb3ef9b031f9288baf13a3573f885a8504f9c317c5" + license "GPL-3.0-only" + + # This directory listing page also links to `python-cdsclient` tarballs, so + # we have to use a stricter regex (instead of the usual `href=.*?`). + livecheck do + url "https://cdsarc.u-strasbg.fr/ftp/pub/sw/" + regex(/href=["']?cdsclient[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "47fd63a71583aeb84d0624a2d5914cb6e20c2364bc906d4da8263f583024c59a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0523647ffcb98339e8c9f2424d20afa561ae87caf6734eea0142439b9a655397" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a9a0d2c2f3822aa4a2c23f64d1921c3bd2c3f25d64004ad90868f9ccc303cef3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ce712b39898660b3b383ecbb7cea31aac7681fb14980982f99c3b59cc5d130dc" + sha256 cellar: :any_skip_relocation, sonoma: "c8a738375e2a386b461f29a111dbb0da50e05ab784af7e07b588553a2bf9b759" + sha256 cellar: :any_skip_relocation, ventura: "4fc95c54e491a0973791f1f741d6a5e4a1190147c3d404d99f9fdb90f7a35d4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b2b835d82cb1b820e6e01b5b797c1ca9bedd08ebff78c1c85ae58951fe6ad95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "244a0d04795c89d1e51cdd4b671bf438c0698bb1177555122403cfa4c071079d" + end + + def install + system "./configure", "--prefix=#{prefix}", "--libdir=#{lib}" + man.mkpath + system "make", "install", "MANDIR=#{man}" + pkgshare.install bin/"abibcode.awk" + end + + test do + assert_match <<~EOS, shell_output("#{bin}/catcat VIII/59/ReadMe") + VIII/59 the FIRST Survey, version 1999Jul (White+ 1999) + EOS + + assert_match "Usage: lscat CDS-catalogue(s)", shell_output("#{bin}/lscat 2>&1", 1) + end +end diff --git a/Formula/c/cdxgen.rb b/Formula/c/cdxgen.rb new file mode 100644 index 0000000000000..2147dcf639f1f --- /dev/null +++ b/Formula/c/cdxgen.rb @@ -0,0 +1,95 @@ +class Cdxgen < Formula + desc "Creates CycloneDX Software Bill-of-Materials (SBOM) for projects" + homepage "https://github.com/CycloneDX/cdxgen" + url "https://registry.npmjs.org/@cyclonedx/cdxgen/-/cdxgen-11.11.0.tgz" + sha256 "14646334e390b67f43603e98a5b3b255121e076034e8b27a16a4be1aad496c92" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "82ef33a8c5d5b7e21eeac485827380bcf3d358c634da3da42dbde8b997fdec0c" + sha256 cellar: :any, arm64_sequoia: "a5ddc6e487c5153c06440f39239f3eb4978273210acc21cee21ac2373b42180c" + sha256 cellar: :any, arm64_sonoma: "d04fe949a452c4449b68e9738afab01db83c5468bd2b8320f8777ddee54ea892" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef991349af0871611bf596ef2f0f94d8e9cfe9ed2fce955dd88fc6033f6e0563" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f211b23698b2d1fd75a722482482731f96a2a66518547b2e16c10953cea5edc" + end + + depends_on "dotnet" # for dosai + depends_on "node" + depends_on "ruby" + depends_on "sourcekitten" + depends_on "sqlite" # needs sqlite3_enable_load_extension + depends_on "trivy" + + resource "dosai" do + url "https://github.com/owasp-dep-scan/dosai/archive/refs/tags/v2.0.3.tar.gz" + sha256 "c66f96ab143e5e62262b963142b55f9ca7ae6708d175f62c0130b805dac226a5" + end + + def install + # https://github.com/CycloneDX/cdxgen/blob/master/lib/managers/binary.js + # https://github.com/AppThreat/atom/blob/main/wrapper/nodejs/rbastgen.js + cdxgen_env = { + RUBY_CMD: "${RUBY_CMD:-#{Formula["ruby"].opt_bin}/ruby}", + SOURCEKITTEN_CMD: "${SOURCEKITTEN_CMD:-#{Formula["sourcekitten"].opt_bin}/sourcekitten}", + TRIVY_CMD: "${TRIVY_CMD:-#{Formula["trivy"].opt_bin}/trivy}", + } + + system "npm", "install", "--sqlite=#{Formula["sqlite"].opt_prefix}", *std_npm_args + bin.install Dir[libexec/"bin/*"] + bin.env_script_all_files libexec/"bin", cdxgen_env + + # Remove/replace pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/@cyclonedx/cdxgen/node_modules" + cdxgen_plugins = node_modules/"@cyclonedx/cdxgen-plugins-bin-#{os}-#{arch}/plugins" + rm_r(cdxgen_plugins/"dosai") + rm_r(cdxgen_plugins/"sourcekitten") + rm_r(cdxgen_plugins/"trivy") + # Remove pre-built osquery plugins for macOS arm builds + rm_r(cdxgen_plugins/"osquery") if OS.mac? && Hardware::CPU.arm? + + resource("dosai").stage do + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "1" + dosai_cmd = "dosai-#{os}-#{arch}" + dotnet = Formula["dotnet"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --no-self-contained + --output #{cdxgen_plugins}/dosai + --use-current-runtime + -p:AppHostRelativeDotNet=#{dotnet.opt_libexec.relative_path_from(cdxgen_plugins/"dosai")} + -p:AssemblyName=#{dosai_cmd} + -p:DebugType=None + -p:PublishSingleFile=true + ] + system "dotnet", "publish", "Dosai", *args + end + + # Reinstall for native dependencies + cd node_modules/"@appthreat/atom-parsetools/plugins/rubyastgen" do + rm_r("bundle") + system "./setup.sh" + end + end + + test do + (testpath/"Gemfile.lock").write <<~EOS + GEM + remote: https://rubygems.org/ + specs: + hello (0.0.1) + PLATFORMS + arm64-darwin-22 + DEPENDENCIES + hello + BUNDLED WITH + 2.4.12 + EOS + + assert_match "BOM includes 1 components and 2 dependencies", shell_output("#{bin}/cdxgen -p") + + assert_match version.to_s, shell_output("#{bin}/cdxgen --version") + end +end diff --git a/Formula/c/cekit.rb b/Formula/c/cekit.rb new file mode 100644 index 0000000000000..45dcd65196aaa --- /dev/null +++ b/Formula/c/cekit.rb @@ -0,0 +1,99 @@ +class Cekit < Formula + include Language::Python::Virtualenv + + desc "Container Evolution Kit" + homepage "https://cekit.io" + url "https://files.pythonhosted.org/packages/19/bf/e6f731ca9eae441dbf08d4af91ed3fc76eb021f1e5870dff3692936bb50b/cekit-4.15.0.tar.gz" + sha256 "3ced63835728e6fe43c63583ca0b1a45e65b573230ec9cb73dcd3aa9aa0a5aa9" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "5a7bd13fc7d7409f321604e7130ad10e9371672477f82812ed804de5e861e7eb" + sha256 cellar: :any, arm64_sequoia: "f2f4c51e06c24076f37fb1f73f4c8be5b65961e38e0f26542574a09ba0ebebb5" + sha256 cellar: :any, arm64_sonoma: "653ca4927f72621e4590e9a38099fe985cc0c8bf8f36725d916eee7940299af0" + sha256 cellar: :any, sonoma: "50f771db67098b4ddad445157f31c68daa2a02df6be18fce5c4b48d40806853e" + sha256 cellar: :any_skip_relocation, arm64_linux: "24e51037651c7b645a0b1ff7296b92789e4a2ac74215e27ef8348c87669da698" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95b7f381c7ec6609a3f012a517b3d696c57d3b4609fc76d061252c3035249c50" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/a2/61/f083b5ac52e505dfc1c624eafbf8c7589a0d7f32daa398d2e7590efa5fda/colorlog-6.10.1.tar.gz" + sha256 "eb4ae5cb65fe7fec7773c2306061a8e63e02efc2c72eba9d27b0fa23c94f1321" + end + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pykwalify" do + url "https://files.pythonhosted.org/packages/d5/77/2d6849510dbfce5f74f1f69768763630ad0385ad7bb0a4f39b55de3920c7/pykwalify-1.8.0.tar.gz" + sha256 "796b2ad3ed4cb99b88308b533fb2f559c30fa6efb4fa9fda11347f483d245884" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cekit", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/cekit --version") + (testpath/"test.yml").write <<~YAML + schema_version: 1 + from: "scratch" + name: &name "test" + version: &version "0.0.1" + description: "Test Description" + YAML + assert_match "INFO Finished!", +shell_output("#{bin}/cekit --descriptor #{testpath}/test.yml build --dry-run docker 2>&1") + system bin/"cekit", "--descriptor", "#{testpath}/test.yml", "build", "--dry-run", "docker" + assert_path_exists testpath/"target/image/Dockerfile" + assert_match "FROM scratch", File.read(testpath/"target/image/Dockerfile") + end +end diff --git a/Formula/c/celero.rb b/Formula/c/celero.rb new file mode 100644 index 0000000000000..1b620080456f4 --- /dev/null +++ b/Formula/c/celero.rb @@ -0,0 +1,54 @@ +class Celero < Formula + desc "C++ Benchmark Authoring Library/Framework" + homepage "https://github.com/DigitalInBlue/Celero" + url "https://github.com/DigitalInBlue/Celero/archive/refs/tags/v2.9.1.tar.gz" + sha256 "c857d1fa7b20943bcec78ae043686cf77c9447d72537d8d2ba142531bfdc8fad" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e8ca29a93a9121f3b3753d3489bce47b34c9466131283e79eb7056bbad5d898a" + sha256 cellar: :any, arm64_sequoia: "32c259b5e2ceb2ea4ff8ef5a327c8d133bbb5aff95c64636c1adcedab2ed5936" + sha256 cellar: :any, arm64_sonoma: "acde51368a04ee57318cf5624248db326858806a426505feaa15b17964235406" + sha256 cellar: :any, arm64_ventura: "c4d45dd58e34abae054e11fb16505fed2c1401c367ac79c0e055f19d6afa50f5" + sha256 cellar: :any, sonoma: "0fcf1555bd7ec8845edcb9365b0b4c8dd72a0559dd6b4b6875be2a624a951971" + sha256 cellar: :any, ventura: "a231fb0188c070c3f56194cdca30804bd02d4a7cbd573470fcb58a0de9286dd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "89551d7946653975b6474506e1169006a32dd276ff6d36caf0c2c601cb39430f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06957574cf0c8ea5e37d6a2c6fa4b67398faab55dfead8964f439de11ca0c3a2" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCELERO_COMPILE_DYNAMIC_LIBRARIES=ON + -DCELERO_ENABLE_EXPERIMENTS=OFF + -DCELERO_ENABLE_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + CELERO_MAIN + + BASELINE(DemoSleep, Baseline, 60, 1) { + std::this_thread::sleep_for(std::chrono::microseconds(10000)); + } + BENCHMARK(DemoSleep, HalfBaseline, 60, 1) { + std::this_thread::sleep_for(std::chrono::microseconds(5000)); + } + BENCHMARK(DemoSleep, TwiceBaseline, 60, 1) { + std::this_thread::sleep_for(std::chrono::microseconds(20000)); + } + CPP + system ENV.cxx, "-std=c++14", "test.cpp", "-L#{lib}", "-lcelero", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/censys.rb b/Formula/c/censys.rb new file mode 100644 index 0000000000000..d75599b670327 --- /dev/null +++ b/Formula/c/censys.rb @@ -0,0 +1,86 @@ +class Censys < Formula + include Language::Python::Virtualenv + + desc "Command-line interface for the Censys APIs (censys.io)" + homepage "https://github.com/censys/censys-python" + url "https://files.pythonhosted.org/packages/ba/ef/c858baa23fa4edb496ba58ec329f9fa5df67b91ca755afa4219962231675/censys-2.2.18.tar.gz" + sha256 "9410596197dc21d26dd5dfc83c0d58fde3768409d0f0ab0bc77570ec93473649" + license "Apache-2.0" + head "https://github.com/censys/censys-python.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "8b16246c6a82f70061e1f50c491d96780a2e0cca4935d533719e9106453a4263" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "backoff" do + url "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz" + sha256 "03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + venv = virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "censys", + shell_parameter_format: :arg) + + # Build an `:all` bottle by replacing comments + file = venv.site_packages.glob("argcomplete-*.dist-info/METADATA") + inreplace file, "/opt/homebrew/bin/bash", "$HOMEBREW_PREFIX/bin/bash" + end + + test do + assert_equal "Censys Python Version: #{version}", shell_output("#{bin}/censys --version").strip + assert_match "401 (Error Code: unknown), Unauthorized", pipe_output("#{bin}/censys asm config 2>&1", "test", 1) + end +end diff --git a/Formula/c/center-im.rb b/Formula/c/center-im.rb new file mode 100644 index 0000000000000..86378f43ecd73 --- /dev/null +++ b/Formula/c/center-im.rb @@ -0,0 +1,68 @@ +class CenterIm < Formula + desc "Text-mode multi-protocol instant messaging client" + homepage "https://github.com/petrpavlu/centerim5" + url "https://github.com/petrpavlu/centerim5/releases/download/v5.0.1/centerim5-5.0.1.tar.gz" + sha256 "b80b999e0174b81206255556cf00de6548ea29fa6f3ea9deb1f9ab59d8318313" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "0144e5a04086b115b6c21b4c9dd9448ec8a43f965737aaa7ca21213d5d78a1dd" + sha256 arm64_sequoia: "70d910d088f565556129872ef5a54c802a0ff2e938e05d2f9315efcd4794fe4f" + sha256 arm64_sonoma: "65761f72dce3b59dfa0b058aa2eff754ffb132b9c61e9cf36d595f9ad12b3054" + sha256 arm64_ventura: "aeaea7b73d4df68699def112fc0b0108d22af0680a9f8bc1d323b9c605044091" + sha256 arm64_monterey: "5234f05e2c0871d7df29fa263734ee54feb09de3ee6fbd327ec0d8e3655530ab" + sha256 sonoma: "02f27aa633b15c66529bd3d7c9d11f382b4998816fad2f048b1efd11be44cc2b" + sha256 ventura: "c39b856a9f8a148f92c600bafb203b135e95ccb34e6a28fa891602c3b6d81858" + sha256 monterey: "a8442a0d0e8ba9888577ddfd2d8c76699cb0eb20a1e96c0b0b143186ad27e63c" + sha256 arm64_linux: "2a1f98a1195968b86f0fd44b1c115daeb2a54d38161b85339641223ab121fd37" + sha256 x86_64_linux: "7148aa25f016c25825f9ed5fb6526d14737ba38208779727937801f2c7dbc42f" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libsigc++@2" + depends_on "ncurses" + depends_on "pidgin" # for libpurple + + on_macos do + depends_on "gettext" + end + + def install + # Work around build error on macOS due to `version` file confusing system header. + # Also allow CMake to correctly set the version number inside binary. + # Issue ref: https://github.com/petrpavlu/centerim5/issues/1 + mv "version", ".tarball-version" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/centerim5 --version") + + # FIXME: Unable to run TUI test in Linux CI. + # Error is "Placing the terminal into raw mode failed." + return if ENV["HOMEBREW_GITHUB_ACTIONS"] && OS.linux? + + ENV["TERM"] = "xterm" + File.open("output.txt", "w") do |file| + $stdout.reopen(file) + pid = spawn bin/"centerim5", "--basedir", testpath + sleep 25 + Process.kill("TERM", pid) + end + assert_match "Welcome to CenterIM", (testpath/"output.txt").read + assert_path_exists testpath/"prefs.xml" + end +end diff --git a/Formula/c/cereal.rb b/Formula/c/cereal.rb new file mode 100644 index 0000000000000..d596c3cdede19 --- /dev/null +++ b/Formula/c/cereal.rb @@ -0,0 +1,87 @@ +class Cereal < Formula + desc "C++11 library for serialization" + homepage "https://uscilab.github.io/cereal/" + license "BSD-3-Clause" + revision 1 + head "https://github.com/USCiLab/cereal.git", branch: "master" + + stable do + url "https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.2.tar.gz" + sha256 "16a7ad9b31ba5880dac55d62b5d6f243c3ebc8d46a3514149e56b5e7ea81f85f" + + # clang 19+ build patch, upstream pr ref, https://github.com/USCiLab/cereal/pull/835 + patch do + url "https://github.com/USCiLab/cereal/commit/409db5e910279224bd7e78f8188450c7e7d34d87.patch?full_index=1" + sha256 "ad413ad34abb4ad515777013f1824f6f8eef879d3391f35cb0bf4b7e30937a7c" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "dc981dc92c83e4642a9ae88b2f9c19df8eed192e09c458ff80d4ad7216c71f25" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DJUST_INSTALL_CEREAL=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + struct MyRecord + { + uint8_t x, y; + float z; + + template + void serialize( Archive & ar ) + { + ar( x, y, z ); + } + }; + + struct SomeData + { + int32_t id; + std::shared_ptr> data; + + template + void save( Archive & ar ) const + { + ar( data ); + } + + template + void load( Archive & ar ) + { + static int32_t idGen = 0; + id = idGen++; + ar( data ); + } + }; + + int main() + { + std::ofstream os("out.cereal", std::ios::binary); + cereal::BinaryOutputArchive archive( os ); + + SomeData myData; + archive( myData ); + + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-o", "test" + system "./test" + assert_path_exists testpath/"out.cereal" + end +end diff --git a/Formula/c/ceres-solver.rb b/Formula/c/ceres-solver.rb new file mode 100644 index 0000000000000..662d2c67426d5 --- /dev/null +++ b/Formula/c/ceres-solver.rb @@ -0,0 +1,95 @@ +class CeresSolver < Formula + desc "C++ library for large-scale optimization" + homepage "http://ceres-solver.org/" + license "BSD-3-Clause" + revision 3 + head "https://ceres-solver.googlesource.com/ceres-solver.git", branch: "master" + + stable do + url "http://ceres-solver.org/ceres-solver-2.2.0.tar.gz" + sha256 "48b2302a7986ece172898477c3bcd6deb8fb5cf19b3327bc49969aad4cede82d" + + # Backport support for eigen 5.0.0 + patch :DATA # https://github.com/ceres-solver/ceres-solver/commit/f0720aeb84ec7bb479fe3618b30fa54981baf8fd + patch do + url "https://github.com/ceres-solver/ceres-solver/commit/f9b7b6651b108136a16df44d91fb31735645f5a7.patch?full_index=1" + sha256 "019006cc850b19b442e108118c599c98b18af8eb06ab37c22e6698c55d55a512" + end + end + + livecheck do + url "http://ceres-solver.org/installation.html" + regex(/href=.*?ceres-solver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "81b100c1ef3f92810a9b4f2b9a602b7a1e6b6d7e11a88a677a2886f53fcaccb6" + sha256 cellar: :any, arm64_sequoia: "dae580fccf96c376fc90bca15973a3375dd56dfe6a3760a19041ec52fc6c621e" + sha256 cellar: :any, arm64_sonoma: "66b7cfa4fabfc643db7d86944657198286a8665f2c00302071091680b6fa03b3" + sha256 cellar: :any, sonoma: "d997d14192319044b9a573c2d550779dd24c90c574f2c285ca5d705de509f648" + sha256 cellar: :any_skip_relocation, arm64_linux: "3dc978b76da56deeec522b9c78fee5348c3d34849704c218cef09c63604aea85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e9385fbe9eeb9f92b0a190ad029bbf9aa916d05c8784afcce5f86b307848ac8" + end + + depends_on "cmake" => [:build, :test] + depends_on "eigen" + depends_on "gflags" + depends_on "glog" + depends_on "metis" + depends_on "openblas" + depends_on "suite-sparse" + depends_on "tbb" + + def install + system "cmake", "-S", ".", "-B", "homebrew-build", + "-DBUILD_SHARED_LIBS=ON", + "-DBUILD_EXAMPLES=OFF", + "-DLIB_SUFFIX=''", + *std_cmake_args + system "cmake", "--build", "homebrew-build" + system "cmake", "--install", "homebrew-build" + pkgshare.install "examples", "data" + end + + test do + cp pkgshare/"examples/helloworld.cc", testpath + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(helloworld) + find_package(Ceres REQUIRED COMPONENTS SuiteSparse) + add_executable(helloworld helloworld.cc) + target_link_libraries(helloworld Ceres::ceres) + CMAKE + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + assert_match "CONVERGENCE", shell_output("./build/helloworld") + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f53e9981b..af932c6a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -234,17 +234,9 @@ unset(CERES_COMPILE_OPTIONS) + + # Eigen. + # Eigen delivers Eigen3Config.cmake since v3.3.3 +-find_package(Eigen3 3.3 REQUIRED) ++find_package(Eigen3 3.3.4 REQUIRED NO_MODULE) + if (Eigen3_FOUND) + message("-- Found Eigen version ${Eigen3_VERSION}: ${Eigen3_DIR}") +- if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)" AND +- Eigen3_VERSION VERSION_LESS 3.3.4) +- # As per issue #289: https://github.com/ceres-solver/ceres-solver/issues/289 +- # the bundle_adjustment_test will fail for Eigen < 3.3.4 on aarch64. +- message(FATAL_ERROR "-- Ceres requires Eigen version >= 3.3.4 on aarch64. " +- "Detected version of Eigen is: ${Eigen3_VERSION}.") +- endif() +- + if (EIGENSPARSE) + message("-- Enabling use of Eigen as a sparse linear algebra library.") + list(APPEND CERES_COMPILE_OPTIONS CERES_USE_EIGEN_SPARSE) diff --git a/Formula/c/cern-ndiff.rb b/Formula/c/cern-ndiff.rb new file mode 100644 index 0000000000000..fb35e72ee8d63 --- /dev/null +++ b/Formula/c/cern-ndiff.rb @@ -0,0 +1,52 @@ +class CernNdiff < Formula + desc "Numerical diff tool" + # NOTE: ndiff is a sub-project of Mad-X at the moment. + homepage "https://mad.web.cern.ch/mad/" + url "https://github.com/MethodicalAcceleratorDesign/MAD-X/archive/refs/tags/5.09.03.tar.gz" + sha256 "cd57f9451e3541a820814ad9ef72b6e01d09c6f3be56802fa2e95b1742db7797" + license "GPL-3.0-only" + head "https://github.com/MethodicalAcceleratorDesign/MAD-X.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e193003d9dc156d3c9f2740ace0ca73ce36299ef0de327abadf3d8a971235186" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d45e67a3d9f934e921d76dccfcbb31f4b1b3af041dac06b4505cdc4bae2fe73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89e85cfeaa7bb36ccf6c86e8e8cd1c969656c81ee54f73a4b544d47b4d9ef04d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9951fa4368100f6c4d2b600e7da2d15c3c1c4031e94666fa822f935502251afd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "62a8a71d7515060897bea3dbe97136b0dac99454a403e370e859f482b4e129d3" + sha256 cellar: :any_skip_relocation, sonoma: "807d3f5b977b2d2012901b5c9ed066ecd3ff4561a7758a03e503021a2e0594b2" + sha256 cellar: :any_skip_relocation, ventura: "141fb295ae4157e0b8f53d4ec91a465baa6380d8611652da5915f40298a50060" + sha256 cellar: :any_skip_relocation, monterey: "9ae23c61ad53062f561cc9a70e52a54d90add55b98962c06ea76e129359acc4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "bcf2ffd38ba56b8c9c6c12a5da6be040a8fc0e73c338a46ddc47fa4d78e9df87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b79c1e4f9d23f8dd06659de060aa2fe4bf0b863a2f9d1e1da8cab2c3347c108b" + end + + depends_on "cmake" => :build + + conflicts_with "ndiff", "nmap", because: "both install `ndiff` binaries" + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", "tools/numdiff", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Avoid installing MAD-X license as numdiff is under a different license + rm "License.txt" + prefix.install "tools/numdiff/LICENSE" + end + + test do + (testpath/"lhs.txt").write("0.0 2e-3 0.003") + (testpath/"rhs.txt").write("1e-7 0.002 0.003") + (testpath/"test.cfg").write("* * abs=1e-6") + + system bin/"ndiff", "lhs.txt", "rhs.txt", "test.cfg" + end +end diff --git a/Formula/c/certbot.rb b/Formula/c/certbot.rb new file mode 100644 index 0000000000000..06a5966d56037 --- /dev/null +++ b/Formula/c/certbot.rb @@ -0,0 +1,157 @@ +class Certbot < Formula + include Language::Python::Virtualenv + + desc "Tool to obtain certs from Let's Encrypt and autoenable HTTPS" + homepage "https://certbot.eff.org/" + url "https://files.pythonhosted.org/packages/3d/d7/358779f99a2336010a27e12c9fc99b14602b9a5410f890390fa3be08e598/certbot-5.1.0.tar.gz" + sha256 "d652a598f67af78ecf122860e85cd2e9c19a2bbe79a71775eccf6e8d642a4fca" + license "Apache-2.0" + head "https://github.com/certbot/certbot.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c09b2ea3fc550f751eb1d5ad0d52eafb175b27f3a1458c2001513d2a334782ca" + sha256 cellar: :any, arm64_sequoia: "40bdade7dec7114f9a424fd6c3dc55f18edcefd986156c038ba008a972f7c7d8" + sha256 cellar: :any, arm64_sonoma: "d24e51faa94e7ea253adaa5fdf41f8b2843e36ad508e501168535d99ca92269e" + sha256 cellar: :any, sonoma: "fbf8e8f6985f305ee4589bf1926b53b2d29f6ba6cd924e956cf887af18ee5d9f" + sha256 cellar: :any_skip_relocation, arm64_linux: "2288efdba2a92d39631903b55483e892520ca1a943e78f8aaef53886e5c66c0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86ee16d7ddaa6c48cb7f9e8b37482c7b3c2795758076fbcafb1aae42a3da6aad" + end + + depends_on "augeas" + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: ["certifi", "cryptography"], + extra_packages: ["certbot-apache", "certbot-nginx", "certbot-dns-cloudflare"] + + resource "acme" do + url "https://files.pythonhosted.org/packages/07/f6/897be0abeb0e64f0e6136a8a6369a54d2a603a44cb7a411f6d77dbafb4ac/acme-5.1.0.tar.gz" + sha256 "7b97820857d9baffed98bca50ab82bb6a636e447865d7a013a7bdd7972f03cda" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "certbot-apache" do + url "https://files.pythonhosted.org/packages/dd/83/a38084ea9df81a1eda38b98fecf32ad2affa323487d752835e79ed5a8b9c/certbot_apache-5.1.0.tar.gz" + sha256 "83f7e7578bb06c57b3d27f82ebd3c113e6f7fc8a41dc722cdc143ac98064b0ef" + end + + resource "certbot-dns-cloudflare" do + url "https://files.pythonhosted.org/packages/30/a4/c2b7ed26d6704ea9126e2fb4d2be97d0afc2fedaa88a80ce61a6a8fec0d2/certbot_dns_cloudflare-5.1.0.tar.gz" + sha256 "6fea3d5e2c3db018f83bc074315a48588fb680c900f7fef3349eae6a2cfc4c6c" + end + + resource "certbot-nginx" do + url "https://files.pythonhosted.org/packages/fb/8a/08667f1f55ba95cbb2231a5cbb9f6dcdde0c3eca4f16194074016a98ec6c/certbot_nginx-5.1.0.tar.gz" + sha256 "fe41cdd8f54b0587b65b686aa142191ad1bf4f7abaa708a79d5ad662757fb07a" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "cloudflare" do + url "https://files.pythonhosted.org/packages/9b/8f/d3a435435c42d4b05ce2274432265c5890f91f6047e6dab52e50c811a4ea/cloudflare-2.19.4.tar.gz" + sha256 "3b6000a01a237c23bccfdf6d20256ea5111ec74a826ae9e74f9f0e5bb5b2383f" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "josepy" do + url "https://files.pythonhosted.org/packages/9d/19/4ebe24c42c341c5868dff072b78d503fc1b0725d88ea619d2db68f5624a9/josepy-2.1.0.tar.gz" + sha256 "9beafbaa107ec7128e6c21d86b2bc2aea2f590158e50aca972dca3753046091f" + end + + resource "jsonlines" do + url "https://files.pythonhosted.org/packages/35/87/bcda8e46c88d0e34cad2f09ee2d0c7f5957bccdb9791b0b934ec84d84be4/jsonlines-4.0.0.tar.gz" + sha256 "0c6d2c09117550c089995247f605ae4cf77dd1533041d366351f6f298822ea74" + end + + resource "parsedatetime" do + url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" + sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyrfc3339" do + url "https://files.pythonhosted.org/packages/b4/7f/3c194647ecb80ada6937c38a162ab3edba85a8b6a58fa2919405f4de2509/pyrfc3339-2.1.0.tar.gz" + sha256 "c569a9714faf115cdb20b51e830e798c1f4de8dabb07f6ff25d221b5d09d8d7f" + end + + resource "python-augeas" do + url "https://files.pythonhosted.org/packages/44/f6/e09619a5a4393fe061e24a6f129c3e1fbb9f25f774bfc2f5ae82ba5e24d3/python-augeas-1.2.0.tar.gz" + sha256 "d2334710e12bdec8b6633a7c2b72df4ca24ab79094a3c9e699494fdb62054a10" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + if build.head? + head_packages = %w[acme certbot certbot-apache certbot-nginx certbot-dns-cloudflare] + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources.reject { |r| head_packages.include? r.name } + venv.pip_install_and_link head_packages.map { |pkg| buildpath/pkg } + pkgshare.install buildpath/"certbot/examples" + else + virtualenv_install_with_resources + pkgshare.install buildpath/"examples" + end + end + + test do + assert_match version.to_s, pipe_output("#{bin}/certbot --version 2>&1") + # This throws a bad exit code but we can check it actually is failing + # for the right reasons by asserting. --version never fails even if + # resources are missing or outdated/too new/etc. + assert_match "Either run as root", shell_output("#{bin}/certbot 2>&1", 1) + end +end diff --git a/Formula/c/certgraph.rb b/Formula/c/certgraph.rb new file mode 100644 index 0000000000000..1771c8684c661 --- /dev/null +++ b/Formula/c/certgraph.rb @@ -0,0 +1,39 @@ +class Certgraph < Formula + desc "Crawl the graph of certificate Alternate Names" + homepage "https://github.com/lanrat/certgraph" + url "https://github.com/lanrat/certgraph/archive/refs/tags/v0.1.2.tar.gz" + sha256 "233b6bf6c081d88c63ed26b2d11d09a74e55f3dfc860823fdf946dc455a1d135" + license "GPL-2.0-or-later" + version_scheme 1 + head "https://github.com/lanrat/certgraph.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "61e0de8d4c9914e75649461e35b23e1e698bfb56e2870bc9e0d34e9169d5857f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5df3eb13c0ca4209724b54ee672565073bc8cecea87b3f4819bba9d878c82fb1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5df3eb13c0ca4209724b54ee672565073bc8cecea87b3f4819bba9d878c82fb1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5df3eb13c0ca4209724b54ee672565073bc8cecea87b3f4819bba9d878c82fb1" + sha256 cellar: :any_skip_relocation, sonoma: "4141330eed9a89e2b7ae519914a527f90ae919796a14ed641dfae691bc643f50" + sha256 cellar: :any_skip_relocation, ventura: "4141330eed9a89e2b7ae519914a527f90ae919796a14ed641dfae691bc643f50" + sha256 cellar: :any_skip_relocation, arm64_linux: "1491f25410592de4a87b0681981015401a7456c8d618b7ddcfc6afcdb51c41d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac679b05635a7ad66dc2a1e5fbcfaa8cb536b9fa2b24b569704fb306ecc3673f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + output = shell_output("#{bin}/certgraph github.io") + assert_match "githubusercontent.com", output + assert_match "pages.github.com", output + + assert_match version.to_s, shell_output("#{bin}/certgraph --version") + end +end diff --git a/Formula/c/certifi.rb b/Formula/c/certifi.rb new file mode 100644 index 0000000000000..7d9ecbaf4ba29 --- /dev/null +++ b/Formula/c/certifi.rb @@ -0,0 +1,50 @@ +class Certifi < Formula + desc "Mozilla CA bundle for Python" + homepage "https://github.com/certifi/python-certifi" + url "https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz" + sha256 "47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43" + license "MPL-2.0" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "33b92b7c105cc455a61116ec9277b93c3480ad07542a11633615f8ea2945c022" + end + + depends_on "python@3.14" => [:build, :test] + depends_on "python@3.12" => :test # keep on oldest python to support (externally managed and not EOL) + depends_on "ca-certificates" + + def pythons + deps.filter_map { |dep| dep.to_formula if dep.name.start_with?("python@") } + end + + def install + oldest_python, python = pythons.sort_by(&:version) + python_exe = python.opt_libexec/"bin/python" + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + + # Use brewed ca-certificates PEM file instead of the bundled copy + site_packages = prefix/Language::Python.site_packages(python_exe) + rm site_packages/"certifi/cacert.pem" + (site_packages/"certifi").install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" => "cacert.pem" + + python.versioned_formulae.each do |extra_python| + next if extra_python.version < oldest_python.version + + # Cannot use Python.site_packages as that requires formula to be installed + extra_site_packages = lib/"python#{extra_python.version.major_minor}/site-packages" + site_packages.find do |path| + (extra_site_packages/path.relative_path_from(site_packages)).dirname.install_symlink path if path.file? + end + end + end + + test do + pythons.each do |python| + python_exe = python.opt_libexec/"bin/python" + output = shell_output("#{python_exe} -m certifi").chomp + assert_equal Formula["ca-certificates"].pkgetc/"cert.pem", Pathname(output).realpath + end + end +end diff --git a/Formula/c/certigo.rb b/Formula/c/certigo.rb new file mode 100644 index 0000000000000..bf33ff201dc35 --- /dev/null +++ b/Formula/c/certigo.rb @@ -0,0 +1,59 @@ +class Certigo < Formula + desc "Utility to examine and validate certificates in a variety of formats" + homepage "https://github.com/square/certigo" + url "https://github.com/square/certigo/archive/refs/tags/v1.17.1.tar.gz" + sha256 "4ac183d25d89246519cce0c7d3ed3e3be261ac72f4ed3b15b9e0690c91778ed4" + license "Apache-2.0" + head "https://github.com/square/certigo.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8ac461d690d136c9732b38b3aed77b6ee45044facc3bff02c8c1ab10c9da38d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "178bf6b7f2d571b80251d754e9d1103940ece8b33cb89660973bbae84d0e376c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e8007c62003b39a369bb73c7768c22d92b66ff8615ea03218db7cd7b513ee25" + sha256 cellar: :any_skip_relocation, arm64_ventura: "90657fc29a0515bac14c9386da4f44941322a733c99d39553cb70679246e561a" + sha256 cellar: :any_skip_relocation, sonoma: "af2deb051e563fb696a4d9eabbb2b048264d0039502f3b06497d374031205e9a" + sha256 cellar: :any_skip_relocation, ventura: "0d9f5fa9aa9d3f134bb7fc49847e3527f5d3cdc256b8a6aefe6f004e183e6693" + sha256 cellar: :any_skip_relocation, arm64_linux: "4386ccf3e4676d87da7bf027d5eadc56eb40bf7fe9bfd000643b442a14235b9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6cd101ccf0fc12278a68a8c7de6fb9d0f24b7230bc9a4b81a5f5e642cc8f245" + end + + depends_on "go" => :build + + def install + system "./build" + bin.install "bin/certigo" + + generate_completions_from_executable(bin/"certigo", shell_parameter_format: "--completion-script-", + shells: [:bash, :zsh]) + end + + test do + (testpath/"test.crt").write <<~EOS + -----BEGIN CERTIFICATE----- + MIIDLDCCAhQCCQCa74bQsAj2/jANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJV + UzELMAkGA1UECBMCQ0ExEDAOBgNVBAoTB2NlcnRpZ28xEDAOBgNVBAsTB2V4YW1w + bGUxGDAWBgNVBAMTD2V4YW1wbGUtZXhwaXJlZDAeFw0xNjA2MTAyMjE0MTJaFw0x + NjA2MTEyMjE0MTJaMFgxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UE + ChMHY2VydGlnbzEQMA4GA1UECxMHZXhhbXBsZTEYMBYGA1UEAxMPZXhhbXBsZS1l + eHBpcmVkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs6JY7Hm/NAsH + 3nuMOOSBno6WmwsTYEw3hk4eyprWiI/NpoiaiZVCGahT8NAKqLDW5t9vgKz6c4ff + i5/aQ2scichq3QS7pELAYlS4b+ey3dA6hj62MOTTO4Ad5bFbbRZG+Mdm2Ayvl6eV + 6catQhMvxt7aIoY9+bodyIYC1zZVqwQ5sOT+CPLDnxK+GvhoyD2jL/XwZplWiIVL + oX6eEpKIo/QtB6mSU216F/PuAzl/BJond+RzF9mcxJjdZYZlhwT8+o8oXEMI4vEf + 3yzd+zB/mjuxDJR2iw3bSL+zZr2GV/CsMLG/jmvbpIuyI/p5eTy0alz+iHOiyeCN + 9pgD6jyonwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAMUuv/zVYniJ94GdOVcNJ/ + bL3CxR5lo6YB04S425qsVrmOex3IQBL1fUduKSSxh5nF+6nzhRzRrDzp07f9pWHL + ZHt6rruVhE1Eqt7TKKCtZg0d85lmx5WddL+yWc5cI1UtCohB9+iZDPUBUR9RcszQ + dGD9PmxnPc9soEcQw/3iNffhMMpLRhPaRW9qtJU8wk16DZunWR8E0Oeq42jVTnb4 + ZiD1Idajj0tj/rT5/M1K/ZLEiOzXVpo/+l/+hoXw9eVnRa2nBwjoiZ9cMuGKUpHm + YSv7SyFevNwDwcxcAq6uVitKi0YCqHiNZ7Ye3/BGRDUFpK2IASUo8YbXYNyA/6nu + -----END CERTIFICATE----- + EOS + system bin/"certigo", "dump", "test.crt" + end +end diff --git a/Formula/c/certstrap.rb b/Formula/c/certstrap.rb new file mode 100644 index 0000000000000..701778a561700 --- /dev/null +++ b/Formula/c/certstrap.rb @@ -0,0 +1,42 @@ +class Certstrap < Formula + desc "Tools to bootstrap CAs, certificate requests, and signed certificates" + homepage "https://github.com/square/certstrap" + url "https://github.com/square/certstrap/archive/refs/tags/v1.3.0.tar.gz" + sha256 "4b32289c20dfad7bf8ab653c200954b3b9981fcbf101b699ceb575c6e7661a90" + license "Apache-2.0" + head "https://github.com/square/certstrap.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cf87aa3c176fdb86b78366aa5214e745017886c8d6607699953cbdc9dae54f85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9bf9827e91f136d8e5b85211375f3130beabfd11963c8a7f6145f8870856816" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c49235a2ea7bfbf33766c4434aa3ad53321d02387bff504f963317f3f8c9797f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5d6395c92d4c7e13c3f56b8d9e6a640583fa3644321093850cb106af2e91877" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cd72ace92ab23822ee98e6e0a374132f17b24ed473029266918891a4c6eea074" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "10cf4c0c8f42e97dac415a9ec0e34f8948a2c94602498e0125efc71ae038a553" + sha256 cellar: :any_skip_relocation, sonoma: "66b6eb6258724c6fecf57cb0dbcd037f9949a8e3fae020d04c0ce4d67b2b9b23" + sha256 cellar: :any_skip_relocation, ventura: "9c310c91576bc1115ed87292c77f1eeb073d9d29551ddc0a035a10c184a5507d" + sha256 cellar: :any_skip_relocation, monterey: "f5a6dd11e17cddf336dcbf0a89da75c5e0d96eeae71bd96377ecdc353bbd6d65" + sha256 cellar: :any_skip_relocation, big_sur: "d97b07034dafd41e77947288ec901c169c2afbe12e302e30a188f55a5f6050b0" + sha256 cellar: :any_skip_relocation, catalina: "bc00650c04cae6f16bf49b6fe7f22db094fe8c948b39a1cf3ae1bebeaf4ba8a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe8dd3c67c30b994bca7946bbb6b94f90ba70d0fe2df2c71032332ae2d9cf608" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87ccd6d8769ae051ec3c65a3072f704be545747acdd3c0f31a6326c1467ed50a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + system bin/"certstrap", "init", "--common-name", "Homebrew Test CA", "--passphrase", "beerformyhorses" + end +end diff --git a/Formula/c/certsync.rb b/Formula/c/certsync.rb new file mode 100644 index 0000000000000..413030539e01c --- /dev/null +++ b/Formula/c/certsync.rb @@ -0,0 +1,185 @@ +class Certsync < Formula + include Language::Python::Virtualenv + + desc "Dump NTDS with golden certificates and UnPAC the hash" + homepage "https://github.com/zblurx/certsync" + url "https://files.pythonhosted.org/packages/c8/75/3928920bdbfb0af317446236fad17b47a1d6aad507f1ae2eed6bbf7e7ad9/certsync-0.1.6.tar.gz" + sha256 "bbfffd10f36edcb8c4d2d5033f2a2e1e7d641e41d6c5bd11069e7b0827fa1c8d" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2cb1b6fdf1effccaf50ce5e24349ba2e2fef571fe7e3048596f619d5ff3e931" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eac68d574cf547671ddcc45b561dab031a8e97fe13428e8650b80b22696648e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16de351d6edbb4921446f3e025dcbce5061ab2e32c1948e6c54f25e1561d4f61" + sha256 cellar: :any_skip_relocation, sonoma: "b0df58285b8b772943480242b1defe0306d9aa6d1542cb710a0b861994994e5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ed904a1a0ef1ad87c310cab3329c8190a9760cb2f09e8cac36973ff384a574e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "170093674865b39eb2f6a9e70b36b4e83da328e9b7683201b380ed7eb944a1de" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: ["certifi", "cryptography"], + extra_packages: "pycryptodomex" + + resource "asn1crypto" do + url "https://files.pythonhosted.org/packages/de/cf/d547feed25b5244fcb9392e288ff9fdc3280b10260362fc45d37a798a6ee/asn1crypto-1.5.1.tar.gz" + sha256 "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "certipy-ad" do + url "https://files.pythonhosted.org/packages/ff/fd/349505ced12b137fc05c174fde5b798fcefa032dfbd8bf70549a65598e42/certipy-ad-4.8.2.tar.gz" + sha256 "03aa7e898eff2946c32494f82c2f156afbbc966fd157e599780ab19d638eaf50" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "dsinternals" do + url "https://files.pythonhosted.org/packages/ef/e4/2ceffa1b0e1751e3470deaa4512f22d46b8e51ec2227c679b73dbe4165e5/dsinternals-1.2.4.tar.gz" + sha256 "030f935a70583845f68d6cfc5a22be6ce3300907788ba74faba50d6df859e91d" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz" + sha256 "bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "impacket" do + url "https://files.pythonhosted.org/packages/5f/da/248137b069d292d4ff019c39015356f3b4eb52a08dc77397ff0fbe5166d0/impacket-0.12.0.tar.gz" + sha256 "89587d1b836a5220d74848c934757962b382886dca8b1b4a0c44d693f2600643" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "ldap3" do + url "https://files.pythonhosted.org/packages/43/ac/96bd5464e3edbc61595d0d69989f5d9969ae411866427b2500a8e5b812c0/ldap3-2.9.1.tar.gz" + sha256 "f3e7fc4718e3f09dda568b57100095e0ce58633bcabbed8667ce3f8fbaa4229f" + end + + resource "ldapdomaindump" do + url "https://files.pythonhosted.org/packages/14/48/2757e0453f828e33f7b41e5489976fbe7d504d513e07da53eb904030a288/ldapdomaindump-0.10.0.tar.gz" + sha256 "cbc66b32a7787473ffd169c5319acde46c02fdc9d444556e6448e0def91d3299" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" + sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz" + sha256 "c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/eb/81/022190e5d21344f6110064f6f52bf0c3b9da86e9e5a64fc4a884856a577d/pyOpenSSL-24.0.0.tar.gz" + sha256 "6aa33039a93fffa4563e655b61d11364d01264be8ccb49906101e02a334530bf" + end + + resource "pyspnego" do + url "https://files.pythonhosted.org/packages/f9/e4/8b32a91aeba6fbc6943a630c44b2fe038615e5c7dec8814316fafdcf4bf4/pyspnego-0.12.0.tar.gz" + sha256 "e1d9cd3520a87a1d6db8d68783b17edc4e1464eae3d51ead411a51c82dbaae67" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-ntlm" do + url "https://files.pythonhosted.org/packages/15/74/5d4e1815107e9d78c44c3ad04740b00efd1189e5a9ec11e5275b60864e54/requests_ntlm-1.3.0.tar.gz" + sha256 "b29cc2462623dffdf9b88c43e180ccb735b4007228a542220e882c58ae56c668" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "unicrypto" do + url "https://files.pythonhosted.org/packages/87/2f/70e4cfaa94471f3f3f2680d02b12a63a113c26e0395c6423ac1fd590f7ad/unicrypto-0.0.11.tar.gz" + sha256 "44ab77bbf0e9ea6a4e957bc03d015cf837b9533c5319129e44d950be273d40a5" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/certsync -randomize -dc-ip localhost 2>&1") + assert_match "Got error: nameserver localhost is not a dns.nameserver.Nameserver", output + + assert_match "Dump NTDS with golden certificates", shell_output("#{bin}/certsync -h") + end +end diff --git a/Formula/c/cf-terraforming.rb b/Formula/c/cf-terraforming.rb new file mode 100644 index 0000000000000..084a8811d6906 --- /dev/null +++ b/Formula/c/cf-terraforming.rb @@ -0,0 +1,35 @@ +class CfTerraforming < Formula + desc "CLI to facilitate terraforming your existing Cloudflare resources" + homepage "https://github.com/cloudflare/cf-terraforming" + url "https://github.com/cloudflare/cf-terraforming/archive/refs/tags/v0.24.0.tar.gz" + sha256 "5109ba7f50a40864eb15ab554ae0b74aa3ac5009591c229c6b1b5079d363be24" + license "MPL-2.0" + head "https://github.com/cloudflare/cf-terraforming.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3a279f891b3ce513eee2c4f64b529c365878ad5f861c00dca84077f444157e7c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28683d6606573c88c483e8504c0ceff67e6802bf0c07e4a7204dc0eae319fa20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28683d6606573c88c483e8504c0ceff67e6802bf0c07e4a7204dc0eae319fa20" + sha256 cellar: :any_skip_relocation, arm64_ventura: "28683d6606573c88c483e8504c0ceff67e6802bf0c07e4a7204dc0eae319fa20" + sha256 cellar: :any_skip_relocation, sonoma: "c22adb6824e29a681c55b087f37cb83d0a8d3bd9027b1263560c9b581b32440f" + sha256 cellar: :any_skip_relocation, ventura: "c22adb6824e29a681c55b087f37cb83d0a8d3bd9027b1263560c9b581b32440f" + sha256 cellar: :any_skip_relocation, arm64_linux: "c18622778e78519c038ef000c55909a1c5dd78f58938a1168eee4f9afb0b6880" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dafd75c99e8d1865471886ac10edac8df40e8bcb8d89a533ad82003089185026" + end + + depends_on "go" => :build + + def install + proj = "github.com/cloudflare/cf-terraforming" + ldflags = "-s -w -X #{proj}/internal/app/cf-terraforming/cmd.versionString=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/cf-terraforming" + + generate_completions_from_executable(bin/"cf-terraforming", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/cf-terraforming version") + output = shell_output("#{bin}/cf-terraforming generate 2>&1", 1) + assert_match "you must define a resource type to generate", output + end +end diff --git a/Formula/c/cf.rb b/Formula/c/cf.rb new file mode 100644 index 0000000000000..fefec7732ceea --- /dev/null +++ b/Formula/c/cf.rb @@ -0,0 +1,40 @@ +class Cf < Formula + desc "Filter to replace numeric timestamps with a formatted date time" + homepage "https://ee.lbl.gov/" + url "https://ee.lbl.gov/downloads/cf/cf-1.2.8.tar.gz" + sha256 "52ce4302f7f9dd67227e5a3d09fc289127bf0ad256d24d8e1698733ea2e1fd48" + license "BSD-3-Clause" + + livecheck do + url "https://ee.lbl.gov/downloads/cf/" + regex(/href=.*?cf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9a58bff4b385a95708503e3e0888e6a62230018f8d56396c46ffd8ecb8f5a8f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "64ecc0262ba8398d5321ccc5ce9b6d39d0776e9d4d3a79804e0ccbb02fe59139" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe6582539aa71c5a8bece92c29a4802f15dd735d147c834ca0bbd8e7213a84d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b5a8edb4e24cdae78ee7b41c64f408d447e80ec4d58e0bebffd23e46e8b2e4c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "889ed10c47853e2fdcdeb6f6bc4fc677f524b26bec7f5e91b94e5f763cb4ac70" + sha256 cellar: :any_skip_relocation, sonoma: "8adfb68d96bb5baf3559102add0b8242e1c2d2eb4f4ec577624adf49b326b034" + sha256 cellar: :any_skip_relocation, ventura: "dbc2e7870bf045b37011c48612b393f9416a3f4e9cb2a8e49b1908eef5bd6adf" + sha256 cellar: :any_skip_relocation, monterey: "43b2f71f97887ebeb6cff4a87be8599161afe5d081db33cf01b1a1bbace464c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "465bafd8f283eff64e7b301eb57b3ddf87d783be1bc965e7efcec56636a2b49d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78ac7581dae658e0e16a2413c5c9fda7725460394f707c3f78c65b99f9557692" + end + + conflicts_with "cloudfoundry-cli", because: "both install `cf` binaries" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + bin.mkpath + man1.mkpath + system "make", "install" + system "make", "install-man" + end + + test do + assert_match "Jan 20 00:35:44", pipe_output("#{bin}/cf -u", "1074558944") + end +end diff --git a/Formula/c/cf2tf.rb b/Formula/c/cf2tf.rb new file mode 100644 index 0000000000000..63c8552e92f08 --- /dev/null +++ b/Formula/c/cf2tf.rb @@ -0,0 +1,158 @@ +class Cf2tf < Formula + include Language::Python::Virtualenv + + desc "Cloudformation templates to Terraform HCL converter" + homepage "https://github.com/DontShaveTheYak/cf2tf" + url "https://files.pythonhosted.org/packages/ba/c4/cd7ddd8c942b71a2db200c42e9ed8c336111db94e2399d3903db6e77eef2/cf2tf-0.9.1.tar.gz" + sha256 "cc334b8373412745b3790bed9db71e02d4c41e274e1774b3b23626bdd78bf357" + license "GPL-3.0-only" + revision 2 + head "https://github.com/DontShaveTheYak/cf2tf.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "13b9c480f4ffba697ed5ee2e5f2ae654a447b151879c7a0a3386a138c8f702f4" + sha256 cellar: :any, arm64_sequoia: "15fb2e619a34279b53cafdd8dc48e426d3eb8a6c6cf3f1796337d51c5e31213e" + sha256 cellar: :any, arm64_sonoma: "1019e60fe4e7b0fee00aff315635b30b31eb8ef9ea5e748cf45f40d7f4e039e8" + sha256 cellar: :any, sonoma: "672575e333a88b144dde2401f2be63a6ede894d6adae1ab19bc02fc4071ba191" + sha256 cellar: :any_skip_relocation, arm64_linux: "247b964be1c86b09559ac508413e9c7f4135bd12e282855b2aef8e8067ff2c75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bc13d4f4942443b65281289c9de53e073a38fcb45825667ea207bdbfc1d77c2" + end + + depends_on "cmake" => :build + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "cfn-flip" do + url "https://files.pythonhosted.org/packages/ca/75/8eba0bb52a6c58e347bc4c839b249d9f42380de93ed12a14eba4355387b4/cfn_flip-1.3.0.tar.gz" + sha256 "003e02a089c35e1230ffd0e1bcfbbc4b12cc7d2deb2fcc6c4228ac9819307362" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-log" do + url "https://files.pythonhosted.org/packages/32/32/228be4f971e4bd556c33d52a22682bfe318ffe57a1ddb7a546f347a90260/click-log-0.4.0.tar.gz" + sha256 "3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" + sha256 "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rapidfuzz" do + url "https://files.pythonhosted.org/packages/ed/fc/a98b616db9a42dcdda7c78c76bdfdf6fe290ac4c5ffbb186f73ec981ad5b/rapidfuzz-3.14.1.tar.gz" + sha256 "b02850e7f7152bd1edff27e9d584505b84968cacedee7a734ec4050c655a803c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "thefuzz" do + url "https://files.pythonhosted.org/packages/81/4b/d3eb25831590d6d7d38c2f2e3561d3ba41d490dc89cd91d9e65e7c812508/thefuzz-0.22.1.tar.gz" + sha256 "7138039a7ecf540da323792d8592ef9902b1d79eb78c147d4f20664de79f3680" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # Unpin Python for 3.14 + # Issue ref: https://github.com/DontShaveTheYak/cf2tf/issues/415 + inreplace "pyproject.toml", 'python = ">=3.9,<3.14"', 'python = ">=3.9"' + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cf2tf", shell_parameter_format: :click) + end + + test do + (testpath/"test.yaml").write <<~YAML + AWSTemplateFormatVersion: '2010-09-09' + Description: 'Hello World S3 Bucket CloudFormation Stack' + Resources: + HelloWorldS3Bucket: + Type: 'AWS::S3::Bucket' + Properties: + BucketName: hello-world-s3-bucket + AccessControl: PublicRead + YAML + + expected = <<~HCL + resource "aws_s3_bucket" "hello_world_s3_bucket" { + bucket = "hello-world-s3-bucket" + acl = "public-read" + } + HCL + + system bin/"cf2tf", "test.yaml", "-o", testpath + assert_match expected, (testpath/"resource.tf").read + + assert_match version.to_s, shell_output("#{bin}/cf2tf --version") + end +end diff --git a/Formula/c/cf4ocl.rb b/Formula/c/cf4ocl.rb new file mode 100644 index 0000000000000..d607cbf205616 --- /dev/null +++ b/Formula/c/cf4ocl.rb @@ -0,0 +1,88 @@ +class Cf4ocl < Formula + desc "C Framework for OpenCL" + homepage "https://nunofachada.github.io/cf4ocl/" + url "https://github.com/nunofachada/cf4ocl/archive/refs/tags/v2.1.0.tar.gz" + sha256 "662c2cc4e035da3e0663be54efaab1c7fedc637955a563a85c332ac195d72cfa" + license all_of: ["LGPL-3.0-or-later", "GPL-3.0-or-later"] + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "1a609601f5b9aa94b1ae423edc608e7145c727f27a83107288eeef900a3dc4aa" + sha256 cellar: :any, arm64_sonoma: "c4ad35eb918184b01d089142977aa5ed79a8d66dca5159a91b1b95df9bcec116" + sha256 cellar: :any, arm64_ventura: "e48f59a0665212145258089b5c0f9a63eb539348b30aeb76ca4d77fcc2c8468f" + sha256 cellar: :any, arm64_monterey: "fcab7173eab0b7c577e19e44c2a05f285a095a1c3045b5ce7e64d1101f42a957" + sha256 cellar: :any, sonoma: "2592b539d6a3f8c08b93e8c0d8d477ef49da07f094a8719729b44fd97eb7273a" + sha256 cellar: :any, ventura: "002efc993e534155ef8c5fc6446d7c9112e717e9f3babc2ca2d785456aa5e680" + sha256 cellar: :any, monterey: "a245ed9722b10e435d68cf38a28dc92e6d40c3bc9f1c47a698f00ca1ae562362" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9e0c414903014a5ff0feadf1dea46a6bf9ebf725e94c95cbe1af659789e864c" + end + + disable! date: "2025-01-18", because: :repo_archived + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + # Fix build failure on Linux caused by undefined Windows-only constants. + # Upstreamed here: https://github.com/nunofachada/cf4ocl/pull/40 + patch :DATA + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # OpenCL is not supported on virtualized arm64 macOS so will return error code + result = (OS.mac? && Hardware::CPU.arm? && Hardware::CPU.virtualized?) ? 15 : 0 + + assert_match "Platform #0:", shell_output("#{bin}/ccl_devinfo 2>&1", result) + end +end + +__END__ +diff --git a/src/lib/ccl_event_wrapper.c b/src/lib/ccl_event_wrapper.c +index 0bfbf8a..0ba8bf9 100644 +--- a/src/lib/ccl_event_wrapper.c ++++ b/src/lib/ccl_event_wrapper.c +@@ -282,6 +282,7 @@ const char* ccl_event_get_final_name(CCLEvent* evt) { + case CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR: + final_name = "GL_FENCE_SYNC_OBJECT_KHR"; + break; ++ #if defined(__MSC_VER) + case CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR: + final_name = "ACQUIRE_D3D10_OBJECTS_KHR"; + break; +@@ -300,6 +301,7 @@ const char* ccl_event_get_final_name(CCLEvent* evt) { + case CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR: + final_name = "RELEASE_D3D11_OBJECTS_KHR"; + break; ++ #endif + case CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR: + final_name = "ACQUIRE_EGL_OBJECTS_KHR"; + break; +diff --git a/src/lib/ccl_oclversions.h b/src/lib/ccl_oclversions.h +index 4e82c9f..598a7e6 100644 +--- a/src/lib/ccl_oclversions.h ++++ b/src/lib/ccl_oclversions.h +@@ -33,7 +33,7 @@ + #include + #else + #include +- #ifdef CL_VERSION_1_2 ++ #if defined(CL_VERSION_1_2) && defined(__MSC_VER) + #include + #endif + #endif diff --git a/Formula/c/cfengine.rb b/Formula/c/cfengine.rb new file mode 100644 index 0000000000000..9a976c476f0d0 --- /dev/null +++ b/Formula/c/cfengine.rb @@ -0,0 +1,85 @@ +class Cfengine < Formula + desc "Help manage and understand IT infrastructure" + homepage "https://cfengine.com/" + url "https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-community-3.26.0.tar.gz" + sha256 "d3c3884b314dae48a6884e919d0a12acac5aea95d970544e4632a1773857d19b" + license all_of: ["BSD-3-Clause", "GPL-2.0-or-later", "GPL-3.0-only", "LGPL-2.0-or-later"] + + livecheck do + url "https://cfengine-package-repos.s3.amazonaws.com/release-data/community/releases.json" + strategy :json do |json| + json["releases"]&.map do |release| + next if release["beta"] || release["debug"] + + release["version"] + end + end + end + + bottle do + sha256 arm64_tahoe: "0a07472ef5f9a2305a665e37d9ff83f0bad0607a455064628b341b4e0f40a163" + sha256 arm64_sequoia: "51f499240230fc071b43493aa72cdac33aa55b7aa49222fa93dab9962a4e7259" + sha256 arm64_sonoma: "096ddf9dd1540b96e9d6b6e66ea17775ac8a592fb00a69039778600dc14e0424" + sha256 arm64_ventura: "71439dc718bd1f1d9ebbdc5a06273c923ef4681292a8a930278226d46850d535" + sha256 sonoma: "9ac7d8f3466920e0fde4efcea9b193f154938d97ea54d2d1e8800a06d7de5779" + sha256 ventura: "055717afdc6d0b9a07be143b0231de307e70cbf96296838abb55006e336de6d1" + sha256 arm64_linux: "dfb03291570f5ace211e4a2eff2d51803bd3e58575cac4fff641496c7ca334f1" + sha256 x86_64_linux: "319184eb2a6a3dd75f182ce3a655b8cbe3e006fedd7c592702cbb7c265d14cde" + end + + depends_on "librsync" + depends_on "lmdb" + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "curl", since: :ventura # uses CURLOPT_PROTOCOLS_STR, available since curl 7.85.0 + uses_from_macos "libxml2" + + on_linux do + depends_on "linux-pam" + end + + resource "masterfiles" do + url "https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-3.26.0.tar.gz" + sha256 "fc8b0ad20e803e0d1e9dcda7afb2f3f5110357ac0e553ed95cf2cbea9652451d" + + livecheck do + formula :parent + end + end + + def install + odie "masterfiles resource needs to be updated" if version != resource("masterfiles").version + + args = %W[ + --with-workdir=#{var}/cfengine + --with-lmdb=#{Formula["lmdb"].opt_prefix} + --with-pcre2=#{Formula["pcre2"].opt_prefix} + --without-mysql + --without-postgresql + ] + + args << "--with-systemd-service=no" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make", "install" + (pkgshare/"CoreBase").install resource("masterfiles") + end + + def post_install + workdir = var/"cfengine" + secure_dirs = %W[ + #{workdir}/inputs + #{workdir}/outputs + #{workdir}/ppkeys + #{workdir}/plugins + ] + chmod 0700, secure_dirs + chmod 0750, workdir/"state" + chmod 0755, workdir/"modules" + end + + test do + assert_equal "CFEngine Core #{version}", shell_output("#{bin}/cf-agent -V").chomp + end +end diff --git a/Formula/c/cffi.rb b/Formula/c/cffi.rb new file mode 100644 index 0000000000000..c742071f99b34 --- /dev/null +++ b/Formula/c/cffi.rb @@ -0,0 +1,66 @@ +class Cffi < Formula + desc "C Foreign Function Interface for Python" + homepage "https://cffi.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "04b0f56120f37b235dc1a8063149e279bad1cc9132727b25158393db8c930c2c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0c87ffc33c6042cf8c12508099ccbed120d6b76ecef0e0745d728960d48e13b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d588e61a2f80a3c6609fe497c391fc01dc24e2af1fcae3a520a353af32bc827" + sha256 cellar: :any_skip_relocation, tahoe: "1252a16612b1585b96a870ac5c1d0af6beb31c1cfa76449e6599f87b5ec81698" + sha256 cellar: :any_skip_relocation, sequoia: "050dfb668072267e2bb9e2eb03a02b31f6d15ecbce1c823ab0af521da3f05223" + sha256 cellar: :any_skip_relocation, sonoma: "76c34aa7a07dff752819c015de41f2ba14d42441cc07cd7e4a4be7fd8baa8083" + sha256 arm64_linux: "cb50ba60bbd5cb6b2da0637c3f3090d07d3a68665076c5f553c65bfb061b1734" + sha256 x86_64_linux: "bad3335bd82f947b8283832392a0c37035e500e5732dd63b0f9878dcaf05d639" + end + + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "pycparser" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: "pycparser" + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python| + system python, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + end + + test do + assert_empty resources, "This formula should not have any resources!" + (testpath/"sum.c").write <<~C + int sum(int a, int b) { return a + b; } + C + + libsum = testpath/shared_library("libsum") + system ENV.cc, "-shared", "sum.c", "-o", libsum + + (testpath/"sum.py").write <<~PYTHON + from cffi import FFI + ffi = FFI() + + declaration = """ + int sum(int a, int b); + """ + + ffi.cdef(declaration) + lib = ffi.dlopen("#{libsum}") + print(lib.sum(1, 2)) + PYTHON + + pythons.each do |python| + assert_equal 3, shell_output("#{python} sum.py").to_i + end + end +end diff --git a/Formula/c/cfitsio.rb b/Formula/c/cfitsio.rb new file mode 100644 index 0000000000000..f262112d909c5 --- /dev/null +++ b/Formula/c/cfitsio.rb @@ -0,0 +1,60 @@ +class Cfitsio < Formula + desc "C access to FITS data files with optional Fortran wrappers" + homepage "https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html" + url "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.6.3.tar.gz" + sha256 "fad44fff274fdda5ffcc0c0fff3bc3c596362722b9292fc8944db91187813600" + license "CFITSIO" + + livecheck do + url :homepage + regex(/href=.*?cfitsio[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f1f544bfb17b7c775fb0d6e0ef066776eef812632068d0a907e38c3bb8112da0" + sha256 cellar: :any, arm64_sequoia: "4740877f5ef82d5de96cd115c90726d69cbb6bdbf173e658455a478014980d14" + sha256 cellar: :any, arm64_sonoma: "4dc73f475934e5f188eefc117f64ad8ef0eac412b3b0aa65901156594b145334" + sha256 cellar: :any, sonoma: "58d81f8c8d8af06c7ce37007789748cdfa283c2d3ef63d6dc3d217d32c295688" + sha256 cellar: :any_skip_relocation, arm64_linux: "3250dc2bc7f30d60e50d4739d6cce788e91afc5a0f3a350d8412eeea7fbf1fb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ff756bf08e864fbe6416cbe1513a6a88d4c377fa63188a0e2f9c87cbb1ce3ff" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + uses_from_macos "zlib" + + def install + # Incorporates upstream commits: + # https://github.com/HEASARC/cfitsio/commit/8ea4846049ba89e5ace4cc03d7118e8b86490a7e + # https://github.com/HEASARC/cfitsio/commit/6aee9403917f8564d733938a6baa21b9695da442 + # Review for removal in next release + inreplace "cfitsio.pc.cmake" do |f| + f.sub!(/exec_prefix=.*/, "exec_prefix=${prefix}") + f.sub!(/libdir=.*/, "libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@") + f.sub!(/includedir=.*/, "includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@") + end + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_INSTALL_INCLUDEDIR=include + -DUSE_PTHREADS=ON + -DTESTS=OFF + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"testprog").install Dir["testprog*", "utilities/testprog.c"] + end + + test do + cp Dir["#{pkgshare}/testprog/testprog*"], testpath + flags = shell_output("pkg-config --cflags --libs #{name}").split + system ENV.cc, "testprog.c", "-o", "testprog", *flags + system "./testprog > testprog.lis" + cmp "testprog.lis", "testprog.out" + cmp "testprog.fit", "testprog.std" + end +end diff --git a/Formula/c/cflow.rb b/Formula/c/cflow.rb new file mode 100644 index 0000000000000..2c9be9a9618ac --- /dev/null +++ b/Formula/c/cflow.rb @@ -0,0 +1,74 @@ +class Cflow < Formula + desc "Generate call graphs from C code" + homepage "https://www.gnu.org/software/cflow/" + url "https://ftpmirror.gnu.org/gnu/cflow/cflow-1.8.tar.bz2" + mirror "https://ftp.gnu.org/gnu/cflow/cflow-1.8.tar.bz2" + sha256 "8321627b55b6c7877f6a43fcc6f9f846a94b1476a081a035465f7a78d3499ab8" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "7677a8663bf8dbc2178670bc1db544f12fbb8c87d644c3863457e40ff6a6ea84" + sha256 arm64_sequoia: "6d482293b619d39dba15d8a1956ab25b4434ae53fe93ac269e9ffd2af7f33cdd" + sha256 arm64_sonoma: "e2f7275d45e7808088c8912fb70dca9f5f1bc98e9375ef67fc9ecca3b5f6bba9" + sha256 arm64_ventura: "723f38543a7356fd374a9753005605a93d705b6c9723c8ef40ae31176b54e05d" + sha256 sonoma: "8347d85dfa5f30c5e3697842e7130d6ef3b712eb250eb945d312a97040020581" + sha256 ventura: "18555eed054a739c2bf0a562deebc509ab53c96964937b3cbc223d9a1617b2ee" + sha256 arm64_linux: "dbcdfdec9d78e04d94d2ed339ead98ffd3d1c45ff101d5f06d546582bcbc19c0" + sha256 x86_64_linux: "fc739d521aacfc482f787c8843057c122317b3a91434bafd55cf94f182ef4f93" + end + + def install + system "./configure", "--prefix=#{prefix}", + "--infodir=#{info}", + "--disable-debug", + "--disable-dependency-tracking", + "--with-lispdir=#{elisp}" + + # Replace C++11 attribute syntax with GCC-style attribute for Clang compatibility + if OS.mac? && DevelopmentTools.clang_build_version >= 1500 + inreplace "config.h", /\[\[__maybe_unused__\]\]/, "__attribute__((__unused__))" + end + + system "make", "install" + end + + test do + (testpath/"whoami.c").write <<~C + #include + #include + #include + #include + + int + who_am_i (void) + { + struct passwd *pw; + char *user = NULL; + + pw = getpwuid (geteuid ()); + if (pw) + user = pw->pw_name; + else if ((user = getenv ("USER")) == NULL) + { + fprintf (stderr, "I don't know!\n"); + return 1; + } + printf ("%s\n", user); + return 0; + } + + int + main (int argc, char **argv) + { + if (argc > 1) + { + fprintf (stderr, "usage: whoami\n"); + return 1; + } + return who_am_i (); + } + C + + assert_match "getpwuid()", shell_output("#{bin}/cflow --main who_am_i #{testpath}/whoami.c") + end +end diff --git a/Formula/c/cfn-flip.rb b/Formula/c/cfn-flip.rb new file mode 100644 index 0000000000000..00d0dc5c96272 --- /dev/null +++ b/Formula/c/cfn-flip.rb @@ -0,0 +1,71 @@ +class CfnFlip < Formula + include Language::Python::Virtualenv + + desc "Convert AWS CloudFormation templates between JSON and YAML formats" + homepage "https://github.com/awslabs/aws-cfn-template-flip" + url "https://files.pythonhosted.org/packages/ca/75/8eba0bb52a6c58e347bc4c839b249d9f42380de93ed12a14eba4355387b4/cfn_flip-1.3.0.tar.gz" + sha256 "003e02a089c35e1230ffd0e1bcfbbc4b12cc7d2deb2fcc6c4228ac9819307362" + license "Apache-2.0" + revision 2 + + bottle do + rebuild 4 + sha256 cellar: :any, arm64_tahoe: "91cf666b7be505945d1297f00adaae08f845a5949371a5575a3b6f05877bdd47" + sha256 cellar: :any, arm64_sequoia: "beb6acb08ffbc695cd400c5fce04973519ba0cf0521562134de52d76c2a6a8d1" + sha256 cellar: :any, arm64_sonoma: "b1c4ca4f9eb9015da077c27998e7b4e4406607566eb1a366327cb4d65b9700f5" + sha256 cellar: :any, sonoma: "50abc0dcca0ad672acefca8f38926dbe775070472bb28b96f4d899755399256f" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fc33742bd230258121b4e247daea5aec24567465769ab928f4fcb270630cd7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1aa60a3fda02c52177a0b6497ba0c7e35a00972d0126a9f78bd2ac179893d22c" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cfn-flip", shell_parameter_format: :click) + end + + test do + (testpath/"test.json").write <<~JSON + { + "Resources": { + "Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Ref": "AWS::StackName" + } + } + } + } + } + JSON + + expected = <<~YAML + Resources: + Bucket: + Type: AWS::S3::Bucket + Properties: + BucketName: !Ref 'AWS::StackName' + YAML + + assert_match expected, shell_output("#{bin}/cfn-flip test.json") + end +end diff --git a/Formula/c/cfn-format.rb b/Formula/c/cfn-format.rb new file mode 100644 index 0000000000000..0e69f5d6e293d --- /dev/null +++ b/Formula/c/cfn-format.rb @@ -0,0 +1,38 @@ +class CfnFormat < Formula + desc "Command-line tool for formatting AWS CloudFormation templates" + homepage "https://github.com/aws-cloudformation/rain" + url "https://github.com/aws-cloudformation/rain/archive/refs/tags/v1.23.1.tar.gz" + sha256 "37fb974ee0eb36ceb80f38f13141883f3779a81c79562d0ad15afcd74753485e" + license "Apache-2.0" + head "https://github.com/aws-cloudformation/rain.git", branch: "main" + + livecheck do + formula "rain" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "546ff7fcd3f577db757d87e79f03bef32c0e4b5e1042bad3e86d429ac753ad94" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d80d5ebfd7bdf016d23d94f2920dc15047432c4d28b92e79c04f8380c10d0e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7d80d5ebfd7bdf016d23d94f2920dc15047432c4d28b92e79c04f8380c10d0e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d80d5ebfd7bdf016d23d94f2920dc15047432c4d28b92e79c04f8380c10d0e8" + sha256 cellar: :any_skip_relocation, sonoma: "c099d1a070b7e49d77c97cb34792a3abad5ae2f29609258646835191a426efd8" + sha256 cellar: :any_skip_relocation, ventura: "c099d1a070b7e49d77c97cb34792a3abad5ae2f29609258646835191a426efd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "e50eb2a517b06b81a5802531ca22bf9333e975a63fe39160d6120e6abdd5cd14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0594cf1b143356dc4d4b586dbbd5ff9a8dc67b1bc329666e9657d7987074a2cd" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cfn-format" + end + + test do + (testpath/"test.template").write <<~YAML + Resources: + Bucket: + Type: AWS::S3::Bucket + YAML + assert_equal "test.template: formatted OK", shell_output("#{bin}/cfn-format -v test.template").strip + end +end diff --git a/Formula/c/cfn-lint.rb b/Formula/c/cfn-lint.rb new file mode 100644 index 0000000000000..17f54e057b498 --- /dev/null +++ b/Formula/c/cfn-lint.rb @@ -0,0 +1,158 @@ +class CfnLint < Formula + include Language::Python::Virtualenv + + desc "Validate CloudFormation templates against the CloudFormation spec" + homepage "https://github.com/aws-cloudformation/cfn-lint/" + url "https://files.pythonhosted.org/packages/07/32/9355c1309345622aaee6e997e1417dcd2382e05c14e09c49584c4fbe83a7/cfn_lint-1.40.4.tar.gz" + sha256 "7c8bcf3cf5f2cf8d96fd30fdee1115bfc2480a4c619afc8bce36d551fbb228e1" + license "MIT-0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b82ed5b49f4580dd1fa04376a99c33a7d55375229a6f8ea2e221733c128a35d1" + sha256 cellar: :any, arm64_sequoia: "95a91fefe83285d9ebd2c953d8fe8e3b483787a3101dffdfb69e418342154aae" + sha256 cellar: :any, arm64_sonoma: "dfdfe7ecd98c17b63d58be24738bcffe23e1caf10a60aded6392d82a4dd93e5f" + sha256 cellar: :any, sonoma: "f9518647994329ddb4f4a7be6bbdad8def63b7a060a8656276bf5714df7e8149" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0b36771ff0def2ab0ad4b1a7194b99ab653452fafc00e0d34839183220580c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68a1320fc4e66ad68974f3631212061d12d7a61bdcaa54de17928509e1e927f4" + end + + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["pydantic-core", "rpds-py"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/e8/7f/db344c656949fa286ff8a14ff2c64355b6ca0cb6ebaf260678041acb8d9c/aws_sam_translator-1.101.0.tar.gz" + sha256 "234c1ca29d47f2cd276858371d4a646bc5cdb0de1e07724721d9358d6de005aa" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b1/04/619bf4f1191021aa54514a3da4fbe91f7a04bf827fad0c1d562f8b3db474/boto3-1.40.65.tar.gz" + sha256 "52e2715838d65e6b000e0077a942ce2d3e1a38f9764414ad01a602912eccf924" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/cf/a6/8e3209425650c96916b31324594db3ea9ec2eecc2b0acf6bbda0d2a6b1b2/botocore-1.40.65.tar.gz" + sha256 "cdbbf9d90a9e9c4a6000055013d98b92efc4ceb1bce0d9bcd70e14461dc22ab3" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "mpmath" do + url "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz" + sha256 "7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/cc/a9/546676f25e573a4cf00fe8e119b78a37b6a8fe2dc95cda877b30889c9c45/regex-2025.11.3.tar.gz" + sha256 "1fedc720f9bb2494ce31a58a1631f9c82df6a09b49c19517ea5cc280b4541e01" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sympy" do + url "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz" + sha256 "d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/cfn-lint --version") + + (testpath/"test.yml").write <<~YAML + --- + AWSTemplateFormatVersion: '2010-09-09' + Resources: + # Helps tests map resource types + IamPipeline: + Type: "AWS::CloudFormation::Stack" + Properties: + TemplateURL: !Sub 'https://s3.${AWS::Region}.amazonaws.com/bucket-dne-${AWS::Region}/${AWS::AccountId}/pipeline.yaml' + Parameters: + DeploymentName: iam-pipeline + Deploy: 'auto' + YAML + system bin/"cfn-lint", "test.yml" + end +end diff --git a/Formula/c/cfnctl.rb b/Formula/c/cfnctl.rb new file mode 100644 index 0000000000000..303d0b6b7346f --- /dev/null +++ b/Formula/c/cfnctl.rb @@ -0,0 +1,42 @@ +class Cfnctl < Formula + desc "Brings the Terraform cli experience to AWS Cloudformation" + homepage "https://github.com/rogerwelin/cfnctl" + url "https://github.com/rogerwelin/cfnctl/archive/refs/tags/v0.1.1.tar.gz" + sha256 "8e987272db5cb76769631a29a02a7ead2171539148e09c57549bc6b9ed707be3" + license "Apache-2.0" + head "https://github.com/rogerwelin/cfnctl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "16608ad765e5b6736d2470bf0473b1d2ed1aa6431f6446fe8a7f34f90f496364" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d18150beed91b47a03146e5cceaa9d117dbde79fc14bdc923fd32b83443af4e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d18150beed91b47a03146e5cceaa9d117dbde79fc14bdc923fd32b83443af4e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d18150beed91b47a03146e5cceaa9d117dbde79fc14bdc923fd32b83443af4e5" + sha256 cellar: :any_skip_relocation, sonoma: "09f3b8deeefea7efd4bbdc4f7abc993cf90e9c8791fd32bc45685bd290bc0372" + sha256 cellar: :any_skip_relocation, ventura: "09f3b8deeefea7efd4bbdc4f7abc993cf90e9c8791fd32bc45685bd290bc0372" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d041b39ff1b823af16f06c2e647a5c30d8d9ff0705aefb9791002e0a3bd953f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c656851efb6ce909bc879ba960c4d134c824d725909b01799dea6a29405cfe9" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X cli.version=#{version}"), "./cmd/cfnctl" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cfnctl version") + + ENV["AWS_DEFAULT_REGION"] = "us-east-1" + ENV["AWS_ACCESS_KEY_ID"] = "dummy" + ENV["AWS_SECRET_ACCESS_KEY"] = "dummy" + + (testpath/"test.yaml").write <<~YAML + Resources: + Bucket: + Type: AWS::S3::Bucket + YAML + + output = shell_output("#{bin}/cfnctl validate --template-file test.yaml 2>&1") + assert_match "ValidateTemplate, https response error StatusCode: 403", output + end +end diff --git a/Formula/c/cfonts.rb b/Formula/c/cfonts.rb new file mode 100644 index 0000000000000..2e64c9bf37fac --- /dev/null +++ b/Formula/c/cfonts.rb @@ -0,0 +1,49 @@ +class Cfonts < Formula + desc "Sexy ANSI fonts for the console" + homepage "https://github.com/dominikwilkowski/cfonts" + url "https://github.com/dominikwilkowski/cfonts/archive/refs/tags/v1.3.0rust.tar.gz" + sha256 "e9d4a5946242a42f34114cf3f0af077a89bf528adca64170749b4a4f9e2966a3" + license "GPL-3.0-or-later" + head "https://github.com/dominikwilkowski/cfonts.git", branch: "released" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)[._-]?rust$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f46ca452dd65aeaff877569858af6fa472cd5110e70f5e0aae8348424cdc9517" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "12145976d033447c9e14e635645be9ef4a4722217642249eb3cc599168cd882f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6520755bbccd53b9faf41915e310be59067bf36be7651f5025e6a9ec0e88ae9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8308a8c123feed85a6026b36ea3cb135d4480efbdfabca638945f68cb59ca67b" + sha256 cellar: :any_skip_relocation, sonoma: "aa7c8429f052b8ce53015ccfcda717230dce8d7085bfd93a399b3a58c845f4da" + sha256 cellar: :any_skip_relocation, ventura: "14888787b2cbaf85dbfb0e64d82fefee14fe43ce3fc89506ed8099ec25e3b1ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa5ed6124f164c73452b19b8e7c04c9ed22286275adc2f34609f20cb8a243653" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f51801962e384e5762855f70db76503ecc871f1ea012fc6dae86d9e5ac2d3d11" + end + + depends_on "rust" => :build + + def install + chdir "rust" do + system "make" + system "cargo", "install", *std_cargo_args + bin.install "target/release/cfonts" + end + end + + test do + system bin/"cfonts", "--version" + assert_match <<~EOS, shell_output("#{bin}/cfonts t") + \n + ████████╗ + ╚══██╔══╝ + ██║ \s + ██║ \s + ██║ \s + ╚═╝ \s + \n + EOS + assert_match "\n\ntest\n\n\n", shell_output("#{bin}/cfonts test -f console") + end +end diff --git a/Formula/c/cfr-decompiler.rb b/Formula/c/cfr-decompiler.rb new file mode 100644 index 0000000000000..157ab462742d6 --- /dev/null +++ b/Formula/c/cfr-decompiler.rb @@ -0,0 +1,85 @@ +class CfrDecompiler < Formula + desc "Yet Another Java Decompiler" + homepage "https://www.benf.org/other/cfr/" + url "https://github.com/leibnitz27/cfr.git", + tag: "0.152", + revision: "68477be3ff7171ee17ddd1a26064b9b253f1604f" + license "MIT" + head "https://github.com/leibnitz27/cfr.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?cfr[._-]v?(\d+(?:\.\d+)+)\.jar/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9f2ede10e95cb821c217666b2d683599416db1dfc2322f6f906e3206f35495d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c353a0377fae2693e2c537b0e688bc99e883e0d918451061307cebf05789c16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f63cb5e80ccaf8885580a6b7fddd4afa691bd875a8f6bee8ee059a385b7b4e32" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba4ca41c352f4dd210c5c399a898ab7f6ab79cc7487ff6f8339b8467d030a998" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d83fad35c7406de903ee6b096ae977a648c1baeca9818c72dcc0a0fafe03b950" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "77864492e8a8dc89b6305770070c9f7fe4df482fff4c223d4f61e15f65636a68" + sha256 cellar: :any_skip_relocation, sonoma: "0a450d930591e8c9da2fa0c5ea0f3bae35e5aacb44473713a5594998e0ecfa19" + sha256 cellar: :any_skip_relocation, ventura: "2974cd0863aa3f0b78ebe4d6a5be26e162e13ff464918996cb99ea144a41e0ba" + sha256 cellar: :any_skip_relocation, monterey: "129adb6ff234dcd57cf9c1de12827bd3ab7ccf551c0986a7f2e6e435c9d36d8b" + sha256 cellar: :any_skip_relocation, big_sur: "20388572ac11cf3d8d0ad14ab428c8d5178e17e44eb32d20094fd3d384c72a81" + sha256 cellar: :any_skip_relocation, arm64_linux: "03afb187594d2a088f3a6a111f7a34645860e0d51fb55afd82d6faa3404304ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b236e8effb84d1da66a9eec9c6b4d857d3471da8de57543ac7d029adb09b9eed" + end + + depends_on "maven" => :build + depends_on "openjdk@11" + + def install + # build + ENV["JAVA_HOME"] = Formula["openjdk@11"].opt_prefix + system Formula["maven"].bin/"mvn", "package" + + cd "target" do + # switch on jar names + if build.head? + lib_jar = Dir["cfr-*-SNAPSHOT.jar"] + doc_jar = Dir["cfr-*-SNAPSHOT-javadoc.jar"] + odie "Unexpected number of artifacts!" if (lib_jar.length != 1) || (doc_jar.length != 1) + lib_jar = lib_jar[0] + doc_jar = doc_jar[0] + else + lib_jar = "cfr-#{version}.jar" + doc_jar = "cfr-#{version}-javadoc.jar" + end + + # install library and binary + libexec.install lib_jar + bin.write_jar_script libexec/lib_jar, "cfr-decompiler", java_version: "11" + + # install library docs + doc.install doc_jar + mkdir doc/"javadoc" + cd doc/"javadoc" do + system Formula["openjdk@11"].bin/"jar", "-xf", doc/doc_jar + rm_r("META-INF") + end + end + end + + test do + fixture = <<~JAVA + /* + * Decompiled with CFR #{version}. + */ + class T { + T() { + } + + public static void main(String[] stringArray) { + System.out.println("Hello brew!"); + } + } + JAVA + (testpath/"T.java").write fixture + system Formula["openjdk@11"].bin/"javac", "T.java" + output = pipe_output("#{bin}/cfr-decompiler --comments false T.class") + assert_match fixture, output + end +end diff --git a/Formula/c/cfripper.rb b/Formula/c/cfripper.rb new file mode 100644 index 0000000000000..23ac5843e45ec --- /dev/null +++ b/Formula/c/cfripper.rb @@ -0,0 +1,146 @@ +class Cfripper < Formula + include Language::Python::Virtualenv + + desc "Library and CLI tool to analyse CloudFormation templates for security issues" + homepage "https://cfripper.readthedocs.io" + url "https://files.pythonhosted.org/packages/15/05/17d7f4ed22ad71c79c4d0c708101c3e72f643beb85ab70cb6a15e22aba17/cfripper-1.19.0.tar.gz" + sha256 "9b973e29ad884dd21408e652d5972b9860c8b3b490d0214b84989b641459073d" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "62636a0a0ac83a974736836a0535180cd8413ca7fbf84160789d408cbec6e52f" + sha256 cellar: :any, arm64_sequoia: "34e8eacd27aa7b88abbd33fd0e2f7bb7bf6bbaff223ebe928f314e3a73c3a80b" + sha256 cellar: :any, arm64_sonoma: "212a55a21762447152de7c968af4aeb4abfc8becac01bce610b3cd37faa9de1e" + sha256 cellar: :any, sonoma: "2036096c932bf41a06147867efe9b2669a7aa6a5444207c938fdae0ece115709" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c98889daea3e017c7ae769e03a04bc121a4a3c69f9db51ef5ca32e610f42d2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9acbf3c2b5c63032d5865d6a7ed8326d9add6e75ed23630ecf64519a19fc4100" + end + + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "pydantic-core" + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b4/69/2612a06d584786500ba7ea068927e95e24719da3b6734bd23c50788f5982/boto3-1.40.62.tar.gz" + sha256 "3dbe7e1e7dc9127a4b1f2020a14f38ffe64fad84df00623e8ab6a5d49a82ea28" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/50/d6/dc11fecf450c60175fd568791e2324e059e81bc4adac85d83f272ab293f5/botocore-1.40.62.tar.gz" + sha256 "1e8e57c131597dc234d67428bda1323e8f0a687ea13ea570253159ab9256fa28" + end + + resource "cfn-flip" do + url "https://files.pythonhosted.org/packages/ca/75/8eba0bb52a6c58e347bc4c839b249d9f42380de93ed12a14eba4355387b4/cfn_flip-1.3.0.tar.gz" + sha256 "003e02a089c35e1230ffd0e1bcfbbc4b12cc7d2deb2fcc6c4228ac9819307362" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pycfmodel" do + url "https://files.pythonhosted.org/packages/7b/a4/82753381cef5f9b0153a730b426fc5adfa272ff612d6d4fd150a037231f8/pycfmodel-1.1.3.tar.gz" + sha256 "f42a2a05ab23dd3e204176037d359de6ec84a493a36d640a5beb86b4947e8880" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydash" do + url "https://files.pythonhosted.org/packages/2f/24/91c037f47e434172c2112d65c00c84d475a6715425e3315ba2cbb7a87e66/pydash-8.0.5.tar.gz" + sha256 "7cc44ebfe5d362f4f5f06c74c8684143c5ac481376b059ff02570705523f9e2e" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cfripper", shell_parameter_format: :click) + end + + test do + (testpath/"test.json").write <<~JSON + { + "AWSTemplateFormatVersion": "2010-09-09", + "Resources": { + "RootRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::999999999:role/someuser@bla.com" + }, + "Action": "sts:AssumeRole" + } + ] + }, + "Path": "/", + "Policies": [] + } + } + } + } + JSON + + output = shell_output("#{bin}/cfripper #{testpath}/test.json --format txt 2>&1") + assert_match "no AWS Account ID was found in the config.", output + assert_match "Valid: True", output + + assert_match version.to_s, shell_output("#{bin}/cfripper --version") + end +end diff --git a/Formula/c/cfssl.rb b/Formula/c/cfssl.rb new file mode 100644 index 0000000000000..c15ff3c6ddc5b --- /dev/null +++ b/Formula/c/cfssl.rb @@ -0,0 +1,62 @@ +class Cfssl < Formula + desc "CloudFlare's PKI toolkit" + homepage "https://cfssl.org/" + url "https://github.com/cloudflare/cfssl/archive/refs/tags/v1.6.5.tar.gz" + sha256 "b682452402f403b6ee668bb042bd9b753fe48df84fa7a18a1c32606ffd4918af" + license "BSD-2-Clause" + head "https://github.com/cloudflare/cfssl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "601f2a0f658414311595bde5f9ac2c35b557ba0c4d5383fb73a9ae36743be9a5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "423c61fc2dd3289c74cfd8d2eb4bb30029da5bcaa991c6bcdd4a1bab69b70aee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "856a862e8c5986e402c4ffde122f70fd2b9743a2545a18b8a01a237ef023c8f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f00e10322e3ca648154246d1f33b622d3043030842d571c320f423f10baa20a" + sha256 cellar: :any_skip_relocation, sonoma: "7343337bf340f001683abb5f00711d3d1e504ec77cdac8dd8f1905368fb312a7" + sha256 cellar: :any_skip_relocation, ventura: "b4ce95ba0600589a5dd79efd12ab197f688b10ae8c732943b8171520cad39ffe" + sha256 cellar: :any_skip_relocation, arm64_linux: "74ef31d5f9c24be580f7ca74e48173640cc28a381eba8463bf56c6a0c81d2e9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46934407006530d046e2171da9988fdc1cf8cc5e519924d7ba050ee6dee8f0fb" + end + + depends_on "go" => :build + depends_on "libtool" + + def install + ldflags = "-s -w -X github.com/cloudflare/cfssl/cli/version.version=#{version}" + + (buildpath/"cmd").each_child(false) do |cmd| + system "go", "build", *std_go_args(ldflags:, output: bin/cmd), "./cmd/#{cmd}" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/cfssl version") + assert_match version.to_s, shell_output("#{bin}/cfssljson --version") + + (testpath/"request.json").write <<~JSON + { + "CN" : "Your Certificate Authority", + "hosts" : [], + "key" : { + "algo" : "rsa", + "size" : 4096 + }, + "names" : [ + { + "C" : "US", + "ST" : "Your State", + "L" : "Your City", + "O" : "Your Organization", + "OU" : "Your Certificate Authority" + } + ] + } + JSON + response_json = shell_output("#{bin}/cfssl genkey -initca request.json") + response = JSON.parse(response_json) + assert_match(/^-----BEGIN CERTIFICATE-----.*/, response["cert"]) + assert_match(/.*-----END CERTIFICATE-----$/, response["cert"]) + assert_match(/^-----BEGIN RSA PRIVATE KEY-----.*/, response["key"]) + assert_match(/.*-----END RSA PRIVATE KEY-----$/, response["key"]) + end +end diff --git a/Formula/c/cfv.rb b/Formula/c/cfv.rb new file mode 100644 index 0000000000000..1fa8972b59639 --- /dev/null +++ b/Formula/c/cfv.rb @@ -0,0 +1,31 @@ +class Cfv < Formula + include Language::Python::Virtualenv + + desc "Test and create various files (e.g., .sfv, .csv, .crc., .torrent)" + homepage "https://github.com/cfv-project/cfv" + url "https://files.pythonhosted.org/packages/90/e2/4982f414f04c47c5344739ecc6dfd70fe75139d0672e0b080929aea309f9/cfv-3.2.0.tar.gz" + sha256 "090d453fc9beeb9cf37ae8edf7ebae3d9686ac9382d4bea5df9191b429e6403c" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ab4f236a2f53235d5d8acc132cf81c3c5c44c663e019d0107710aa2d5766b7fc" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test/test.txt").write "Homebrew!" + + cd "test" do + assert_match version.to_s, shell_output("#{bin}/cfv --version") + + system bin/"cfv", "-t", "sha1", "-C", "test.txt" + assert_path_exists Pathname.pwd/"test.sha1" + assert_match "9afe8b4d99fb2dd5f6b7b3e548b43a038dc3dc38", File.read("test.sha1") + end + end +end diff --git a/Formula/c/cgal.rb b/Formula/c/cgal.rb new file mode 100644 index 0000000000000..b62cb63143564 --- /dev/null +++ b/Formula/c/cgal.rb @@ -0,0 +1,83 @@ +class Cgal < Formula + desc "Computational Geometry Algorithms Library" + homepage "https://www.cgal.org/" + url "https://github.com/CGAL/cgal/releases/download/v6.1/CGAL-6.1.tar.xz" + sha256 "618da8a8b3f5be46b4f0a47a1efb3c9e6c03d6aab0f5531d56d355d32701d79f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1cb25e46dd6fd689eb3d5ca560f4f18410647f824a8e694e599eff18b7df2b84" + end + + depends_on "cmake" => [:build, :test] + depends_on "qtbase" => :test + depends_on "boost" + depends_on "eigen" + depends_on "gmp" + depends_on "mpfr" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # These cause different bottles to be built between macOS and Linux for some reason. + %w[README.md readme.md].each { |file| (buildpath/file).unlink if (buildpath/file).exist? } + end + + test do + # https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2draw_triangulation_2_8cpp-example.html + # https://doc.cgal.org/latest/Algebraic_foundations/Algebraic_foundations_2interoperable_8cpp-example.html + (testpath/"surprise.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + #include + + typedef CGAL::Exact_predicates_inexact_constructions_kernel K; + typedef CGAL::Triangulation_2 Triangulation; + typedef Triangulation::Point Point; + + template + typename CGAL::Coercion_traits::Type + binary_func(const A& a , const B& b){ + typedef CGAL::Coercion_traits CT; + typename CT::Cast cast; + return cast(a)*cast(b); + } + + int main(int argc, char**) { + std::cout<< binary_func(double(3), int(5)) << std::endl; + std::cout<< binary_func(int(3), double(5)) << std::endl; + std::ifstream in("data/triangulation_prog1.cin"); + std::istream_iterator begin(in); + std::istream_iterator end; + Triangulation t; + t.insert(begin, end); + if(argc == 3) // do not test Qt6 at runtime + CGAL::draw(t); + return EXIT_SUCCESS; + } + CPP + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.15) + project(surprise) + find_package(CGAL COMPONENTS Qt6) + add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) + add_executable(surprise surprise.cpp) + target_link_libraries(surprise PUBLIC CGAL::CGAL_Qt6) + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + assert_equal "15\n15", shell_output("./build/surprise").chomp + end +end diff --git a/Formula/c/cgdb.rb b/Formula/c/cgdb.rb new file mode 100644 index 0000000000000..c4eface7b599a --- /dev/null +++ b/Formula/c/cgdb.rb @@ -0,0 +1,77 @@ +class Cgdb < Formula + desc "Curses-based interface to the GNU Debugger" + homepage "https://cgdb.github.io/" + url "https://cgdb.me/files/cgdb-0.8.0.tar.gz" + sha256 "0d38b524d377257b106bad6d856d8ae3304140e1ee24085343e6ddf1b65811f1" + license "GPL-2.0-or-later" + + livecheck do + url "https://cgdb.me/files/" + regex(/href=.*?cgdb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "960dae291afe8d9e0ce627ee8c4d0fd2a521fdc7f0b731f4c7c5d7830a60ae2f" + sha256 arm64_sequoia: "dac79a6089d98cfbe4c2b9083d34c0558227e6888546e76c0d425550cb808f30" + sha256 arm64_sonoma: "f30227f01c96e73fa96c6eae457149108dc258cad4845ba3a36bdad6b3d25d67" + sha256 arm64_ventura: "2c71862edb76b37a42f6d41f2f461a56313bb6e56139ab78fe32ee0fe1cea7c5" + sha256 arm64_monterey: "cf029cddf3d08875c2f363d6ed9df10bfb944830d448557784e669138a3aefa5" + sha256 arm64_big_sur: "1dfbebad73683e283033ce308c131a9509a1db30df30830f8177c08f631b69c4" + sha256 sonoma: "c4c164c45ecb6b54b8bc50593eec22c19f33671ebaa9a228895eb8806d5dc052" + sha256 ventura: "d959481de39f00122a3274092eebb71c62892c0a2abbee8f59fbb3c1040a5c16" + sha256 monterey: "8fd498ac0f53354ec1b2298e5b6d0bf5d11f2047ca0df29b44b3b31a6bf89682" + sha256 big_sur: "82301d4bbc42f2feea9b20676554ed96360d7ce7626b5ef02afb6e76983818f6" + sha256 catalina: "0cf4c2cd5ed2f6b831581d06d3f9614007aaecc16bc4ba0a1fce85afa81a11ee" + sha256 arm64_linux: "6a3ab90cdc4efe81a78b89511057f673b90bb5585cfd707fb9565b2c4cd6627d" + sha256 x86_64_linux: "cb3a12c3700e55375cffe843a4bdf8e4fe2541219dc1da35304f7dbece2f5809" + end + + head do + url "https://github.com/cgdb/cgdb.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "help2man" => :build + depends_on "readline" + + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + # patch for readline check code, upstream pr ref, https://github.com/cgdb/cgdb/pull/359 + patch :DATA + + def install + system "sh", "autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-readline=#{Formula["readline"].opt_prefix}" + system "make", "install" + end + + test do + system bin/"cgdb", "--version" + end +end + +__END__ +diff --git a/configure b/configure +index c564dc1..e13c67c 100755 +--- a/configure ++++ b/configure +@@ -6512,7 +6512,7 @@ else + #include + #include + +-main() ++int main() + { + FILE *fp; + fp = fopen("conftest.rlv", "w"); diff --git a/Formula/c/cgif.rb b/Formula/c/cgif.rb new file mode 100644 index 0000000000000..5692b93eb8e9c --- /dev/null +++ b/Formula/c/cgif.rb @@ -0,0 +1,43 @@ +class Cgif < Formula + desc "GIF encoder written in C" + homepage "https://github.com/dloebl/cgif" + url "https://github.com/dloebl/cgif/archive/refs/tags/v0.5.0.tar.gz" + sha256 "d6cb312c7da2c6c9f310811aa3658120c0316ba130c48a012e7baf3698920fe9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d29102987685f8ac154c88b240a697f35303fc8ea7dabeb718a91263e1844788" + sha256 cellar: :any, arm64_sequoia: "302d61d9b591b20873769ea9edd032b629eeb3db0219db60ce1a859721c82c5e" + sha256 cellar: :any, arm64_sonoma: "29171ccc9b3ebc3e1b60a99d5400975fc4cd5c20f3a3775c287be888436bab6b" + sha256 cellar: :any, arm64_ventura: "a7a100fb46e624b13b2a12e7258c34b3b58168be2e225dde9bd5e81cb32a1da9" + sha256 cellar: :any, sonoma: "8be64e82ba90c5d7cb752718025686e5278b2c1c6b1288271470cc14bfe72573" + sha256 cellar: :any, ventura: "c0d7610317c79caa96c7f7723648a3b18b3bf84f9cb155c60508fae6dac84570" + sha256 cellar: :any_skip_relocation, arm64_linux: "e060a0a26f4df895af8ea1f707162a95865c156967340e7a7a853719577cb074" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9873a9a54823b42865b83a5cd468edd8b5864768b990b05445814c0a623befda" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"try.c").write <<~C + #include + int main() { + CGIF_Config config = {0}; + CGIF *cgif; + + cgif = cgif_newgif(&config); + + return 0; + } + C + system ENV.cc, "try.c", "-L#{lib}", "-lcgif", "-o", "try" + system "./try" + end +end diff --git a/Formula/c/cgit.rb b/Formula/c/cgit.rb new file mode 100644 index 0000000000000..dcfb47ea17486 --- /dev/null +++ b/Formula/c/cgit.rb @@ -0,0 +1,78 @@ +class Cgit < Formula + desc "Hyperfast web frontend for Git repositories written in C" + homepage "https://git.zx2c4.com/cgit/" + url "https://git.zx2c4.com/cgit/snapshot/cgit-1.2.3.tar.xz" + sha256 "5a5f12d2f66bd3629c8bc103ec8ec2301b292e97155d30a9a61884ea414a6da4" + license "GPL-2.0-only" + revision 1 + + livecheck do + url "https://git.zx2c4.com/cgit/refs/tags" + regex(/href=.*?cgit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "28b1bf891e59492271011fffcc6d9796cce12af986e68d6fe5eca10caaaeea83" + sha256 arm64_sequoia: "451caf4e50e0fb28a7bcdc287bfef5c75770e81b82fd21157868131ee0a5bff3" + sha256 arm64_sonoma: "6405d9f29445c303d1a5c89d9f15a512940414aba9194a5e421eca6d5ef60e8d" + sha256 arm64_ventura: "8435a3e97f7d97b0a81af4d65387edba8da214f8d348cac06a0200dfd861ca83" + sha256 arm64_monterey: "3e517a8b04d86f340eeba6bdd52d3a187db3e604137b5d0cc3f5a0a5547d65b3" + sha256 arm64_big_sur: "27b3ceaddc63451dd3b57c153dc9f4810326884929e4839ef430d43d2b39d197" + sha256 sonoma: "498e122cc325bc2df8e2950640523ee0305ddd99eaf06ba85ada870727157740" + sha256 ventura: "2f2b6641da929056912b8999d35801a707380714abc20dc56d5c38445f017066" + sha256 monterey: "3e955c47ed5c722d9124b1a2efc90b7ac46e5cc89c0bf8772b2dd9061bb54a56" + sha256 big_sur: "9e0084dfe5c75d91bf5b6494f6e15534cff838ac52a866e4c8667062dcdd2eb2" + sha256 catalina: "787b27262a5998a5dba017d0f75bfa3dadef68b7e3730d87719b1ab48536814d" + sha256 arm64_linux: "24b850675c1e7ea4ac15cf76ba4666649e9d6ae82e43e84136185247e50929a7" + sha256 x86_64_linux: "472e74b2dec4db2de6714623b092f441e17d9806e5316c3597895329fde2abc3" + end + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "openssl@3" => :build # Uses CommonCrypto on macOS + end + + # git version is mandated by cgit: see GIT_VER variable in Makefile + # https://git.zx2c4.com/cgit/tree/Makefile?h=v1.2#n17 + resource "git" do + url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.1.tar.gz" + sha256 "4999ae0ee6cc7dfb280d7051e39a82a5630b00c1d8cd54890f07b4b7193d25aa" + end + + # cgit 1.2.2+ needs memrchr, for which macOS provides no implementation + # https://lists.zx2c4.com/pipermail/cgit/2020-August/004510.html + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/cgit/memrchr-impl.patch" + sha256 "3ab5044db3001b411b58309d70f00b0dee54df991ebc66da9406711ed4007f0f" + end + + def install + resource("git").stage(buildpath/"git") + system "make", "prefix=#{prefix}", + "CGIT_SCRIPT_PATH=#{pkgshare}", + "CGIT_DATA_PATH=#{var}/www/htdocs/cgit", + "CGIT_CONFIG=#{etc}/cgitrc", + "CACHE_ROOT=#{var}/cache/cgit", + "install" + end + + test do + (testpath/"cgitrc").write <<~EOS + repo.url=test + repo.path=#{testpath} + repo.desc=the master foo repository + repo.owner=fooman@example.com + EOS + + ENV["CGIT_CONFIG"] = testpath/"cgitrc" + # no "Status" line means 200 + refute_match(/Status: .+/, shell_output("#{pkgshare}/cgit.cgi")) + end +end diff --git a/Formula/c/cgl.rb b/Formula/c/cgl.rb new file mode 100644 index 0000000000000..06f2825819830 --- /dev/null +++ b/Formula/c/cgl.rb @@ -0,0 +1,57 @@ +class Cgl < Formula + desc "Cut Generation Library" + homepage "https://github.com/coin-or/Cgl" + url "https://github.com/coin-or/Cgl/archive/refs/tags/releases/0.60.9.tar.gz" + sha256 "558421ccd6aa91d6922dd1baa04e37aa4c75ba0472118dc11779e5d6a19bfb38" + license "EPL-2.0" + + livecheck do + url :stable + regex(%r{^releases/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c48862206356a3de287f28c00be2ab401847f28ae124e7c55daed083d4a95a0" + sha256 cellar: :any, arm64_sequoia: "a7679c76ba69e2c4c25830db38c6a956c4cf1955fe31ca27ced5413a1652d89e" + sha256 cellar: :any, arm64_sonoma: "79654b7ed9a9b9c474e4c8bf053e57682176e5efcb63e7274a3c827b306b4a66" + sha256 cellar: :any, arm64_ventura: "ebf1b7f9467644c64d0baf2ae15736ae7ed7cf676ad31c5bf7f9c625da43f8db" + sha256 cellar: :any, arm64_monterey: "65c034c952249a5363b4558a1213c8319dd5217bf8f717f80122900bcd874dce" + sha256 cellar: :any, sonoma: "1fda61fd0c019c89b0fe7bcd9accd0bcb9bd197ecbd076b6992d976c1386d97c" + sha256 cellar: :any, ventura: "f7bf34059c2124bd1de50fbe0278cfb0ca25eb47d76be096ce65dc58da4b074d" + sha256 cellar: :any, monterey: "38248f24ef74fe3200d8df1fd272def97d964612e2a65d079a9eef3f4ec961cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fe70eaaab988117b3ef31682155ac14f031617fb0b0c2693655ccbfbdfab509" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59464aa62dd9a8016b3b46d99246b734bc9eaee228eaca8aac5c757e709158ad" + end + + depends_on "pkgconf" => [:build, :test] + + depends_on "clp" + depends_on "coinutils" + depends_on "osi" + + on_macos do + depends_on "openblas" + end + + def install + system "./configure", "--disable-silent-rules", "--includedir=#{include}/cgl", *std_configure_args + system "make", "install" + + pkgshare.install "Cgl/examples" + end + + test do + resource "homebrew-coin-or-tools-data-sample-p0033-mps" do + url "https://raw.githubusercontent.com/coin-or-tools/Data-Sample/releases/1.2.12/p0033.mps" + sha256 "8ccff819023237c79ef32e238a5da9348725ce9a4425d48888baf3a0b3b42628" + end + + resource("homebrew-coin-or-tools-data-sample-p0033-mps").stage testpath + cp pkgshare/"examples/cgl1.cpp", testpath + + pkg_config_flags = shell_output("pkg-config --cflags --libs cgl").chomp.split + system ENV.cxx, "-std=c++11", "cgl1.cpp", *pkg_config_flags, "-o", "test" + output = shell_output("./test p0033 min") + assert_match "Cut generation phase completed", output + end +end diff --git a/Formula/c/cglm.rb b/Formula/c/cglm.rb new file mode 100644 index 0000000000000..7ba04566559c9 --- /dev/null +++ b/Formula/c/cglm.rb @@ -0,0 +1,48 @@ +class Cglm < Formula + desc "Optimized OpenGL/Graphics Math (glm) for C" + homepage "https://github.com/recp/cglm" + url "https://github.com/recp/cglm/archive/refs/tags/v0.9.6.tar.gz" + sha256 "be5e7d384561eb0fca59724a92b7fb44bf03e588a7eae5123a7d796002928184" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ff546743d100ac764a31e90c9022f32f4c8ca42cd067a8ba62103bd96ef94bde" + sha256 cellar: :any, arm64_sequoia: "2a4e8d2c345846e569a51d36bf21c611c83c91ac112c6fd75a084c662eeeef52" + sha256 cellar: :any, arm64_sonoma: "9225092fc1d388b4a5f960a647b8a80e37364698fa073ead2911a6409f06af3d" + sha256 cellar: :any, arm64_ventura: "82d198d51c5aadf126647acd3854e2182291c1b693faba90cdbafd2d66e26d55" + sha256 cellar: :any, sonoma: "7d9694362e4b318417b226674b69b217246e14325d404190197c3f993473cdb2" + sha256 cellar: :any, ventura: "2decb2f877d789d9982abca215c65c2a641f13dcd0f4b30439b1d2bdbed27318" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a339de32e874c67b2b66f5e2a8b300ba03edfe549ff0afbb01566ac90893a18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e6d1b5f157811a284f493a0b8847b5e011c96557579ae56aafaabf2ef6fb77b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + vec3 x = {1.0f, 0.0f, 0.0f}, + y = {0.0f, 1.0f, 0.0f}, + z = {0.0f, 0.0f, 1.0f}; + vec3 r; + + glm_cross(x, y, r); + assert(glm_vec3_eqv_eps(r, z)); + return 0; + } + C + system ENV.cc, "-I#{include}", testpath/"test.c", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cgns.rb b/Formula/c/cgns.rb new file mode 100644 index 0000000000000..025e0abafa606 --- /dev/null +++ b/Formula/c/cgns.rb @@ -0,0 +1,64 @@ +class Cgns < Formula + desc "CFD General Notation System" + homepage "https://cgns.github.io/" + url "https://github.com/CGNS/CGNS/archive/refs/tags/v4.5.0.tar.gz" + sha256 "c72355219318755ba0a8646a8e56ee1c138cf909c1d738d258d2774fa4b529e9" + license "BSD-3-Clause" + head "https://github.com/CGNS/CGNS.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "b331f93f59e5f71811c11ec52ba9f1338688326246c98446191fe2444ef20294" + sha256 arm64_sequoia: "60d460320a92ecb06f0102b192002150f3822f71b0ca08afac1d0d2b2d7a03ee" + sha256 arm64_sonoma: "059388e3ab976982dd8766d5331ee7c675d465199dadd0e51081332f739f5bcc" + sha256 arm64_ventura: "46b2bb044517369bba1c9dad5b820a3d4f9afeff452e662210d5dba46d1376f9" + sha256 sonoma: "b0c10740cb9177010cf815816c1f31882d8ac61213022d68729dc2f3b65c43f2" + sha256 ventura: "73cdae1cc580e91901eb1716e3c63fe55ed314a7f7855b9359f668b32151630b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5febb80e3e67c84e95a514afb3f9c084b5efa0f74290b74a49c48a69cedacec6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc3307b328259a4c034e3a8a14c4bae802f8a3d054858f2abb2f942a0e8927ed" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "hdf5" + depends_on "libaec" + + uses_from_macos "zlib" + + def install + args = %w[ + -DCGNS_ENABLE_64BIT=YES + -DCGNS_ENABLE_FORTRAN=YES + -DCGNS_ENABLE_HDF5=YES + ] + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Avoid references to Homebrew shims + inreplace include/"cgnsBuild.defs", Superenv.shims_path/ENV.cc, ENV.cc + end + + test do + (testpath/"test.c").write <<~C + #include + #include "cgnslib.h" + int main(int argc, char *argv[]) + { + int filetype = CG_FILE_NONE; + if (cg_is_cgns(argv[0], &filetype) != CG_ERROR) + return 1; + return 0; + } + C + flags = %W[-L#{lib} -lcgns] + flags << "-Wl,-rpath,#{lib},-rpath,#{Formula["libaec"].opt_lib}" if OS.linux? + system Formula["hdf5"].opt_prefix/"bin/h5cc", "test.c", *flags + system "./a.out" + end +end diff --git a/Formula/c/cgoban.rb b/Formula/c/cgoban.rb new file mode 100644 index 0000000000000..244f39cffb490 --- /dev/null +++ b/Formula/c/cgoban.rb @@ -0,0 +1,45 @@ +class Cgoban < Formula + desc "Go-related services" + homepage "https://cgoban1.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cgoban1/cgoban1/1.9.14/cgoban-1.9.14.tar.gz" + sha256 "3b8a6fc0e989bf977fcd9a65a367aa18e34c6e25800e78dd8f0063fa549c9b62" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bcd2fe4d496b2e85dec96463a19aef542173bb207e4529f47935cb679f4ed277" + sha256 cellar: :any, arm64_sequoia: "a775648cbc6f12427ef0a6b83a920bf6b565e3b70b60ce75974d926eba786595" + sha256 cellar: :any, arm64_sonoma: "22f4fb53b56e19bad2463577a3b74aafa0728e5b09946077cd997694d80f3fb4" + sha256 cellar: :any, arm64_ventura: "6cfdc10b3ee48e9bdf8d2017b7ef9d046c902e6dde142212c7dc901b4b8ecbff" + sha256 cellar: :any, arm64_monterey: "a4c0a38fed9e2acdd4f7c33cf88f690a55c13fc102490da8220c649c967d2250" + sha256 cellar: :any, arm64_big_sur: "4cbe85bec961d2960ef76b905fac08ef7c01bb01ad5b380934dbc365f3a17768" + sha256 cellar: :any, sonoma: "861f7f32052627099d664033ac3025404c15ed5d2db473f4376b2c90e739d5e1" + sha256 cellar: :any, ventura: "b0695f58c0e104e1bac7d68944abdf2d2a0432b47726a94474fe7bd16399b22b" + sha256 cellar: :any, monterey: "38db7de0defae5cc7cd3af37eb7ae2c9a3230d972d1136e5ad0768b845762a32" + sha256 cellar: :any, big_sur: "a224cfdd74e8cc232edf360168bc0a7061abf5ce58b8c0723e5df156cb00604d" + sha256 cellar: :any, catalina: "e61d461ae44716ab681151657ff73af5b438f306419142a247543b14de951ab4" + sha256 cellar: :any_skip_relocation, arm64_linux: "1dac96bacc582d1c69554faf9807257de09dde86d19a47b71bb5df991f851a45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19e955a8b73f238d18ccfe0737230ad8db200a27e7f00ae1f27ade5d5f8568b2" + end + + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-x", + "--x-includes=#{Formula["libx11"].opt_include}", + "--x-libraries=#{Formula["libx11"].opt_lib}" + system "make", "install" + end + + test do + assert_match "version #{version}", shell_output("#{bin}/cgoban --version") + end +end diff --git a/Formula/c/cgrep.rb b/Formula/c/cgrep.rb new file mode 100644 index 0000000000000..93bd0e026e982 --- /dev/null +++ b/Formula/c/cgrep.rb @@ -0,0 +1,81 @@ +class Cgrep < Formula + desc "Context-aware grep for source code" + homepage "https://github.com/awgn/cgrep" + # TODO: Check if `rawfilepath` workaround can be removed + url "https://github.com/awgn/cgrep/archive/refs/tags/v8.2.0.tar.gz" + sha256 "e874b3b2ce4c8a4a01d5bbf52269d25da631b18c39bfe1b261052bcde1b62240" + license "GPL-2.0-or-later" + head "https://github.com/awgn/cgrep.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "52f7d3bb9d8209371249400ffa5c6ab140f9f3e44fa14f84bdff378461ccf5bd" + sha256 cellar: :any, arm64_sequoia: "4fcba62459d97b4b3d889a52f070eea7728735e6a287bcb73b15ee028a613984" + sha256 cellar: :any, arm64_sonoma: "3a47ba098507366b8413d0207215e2eab9710e1662a74197b321c80e6dda78ad" + sha256 cellar: :any, sonoma: "b99c98fac686d596beb95f3e40a7c14d90b3ef434d70af621b4da5ad7b12602b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2559ee78b9e6004910f9f2c74eb8d877cc775a5441d39b49abab80edb3c3e87b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b86b9d5cc3c3f7a0caac9c10484d904532258db1b58d60ac4155b3160040513" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "pcre" + + uses_from_macos "libffi" + + conflicts_with "aerleon", because: "both install `cgrep` binaries" + + resource "rawfilepath" do + on_macos do + url "https://hackage.haskell.org/package/rawfilepath-1.1.1/rawfilepath-1.1.1.tar.gz" + sha256 "43f879da83b7b07c30e76a3c31d5362b7b6bb8e235c2698872b92b9fcce3bf69" + end + end + + # Import missing `toShortByteString` function. + # The upstream fixed this https://github.com/awgn/cgrep/commit/42016a46e4aebe6db37a084016d2f49a9627face + # but the tarball is still missing it + patch :DATA + + def install + # Work around "error: call to undeclared function 'execvpe'" by imitating part of removed + # hack in https://github.com/haskell/unix/commit/b8eb2486b15d564e73ef9307e175ac24a186acd2 + # Issue ref: https://github.com/xtendo-org/rawfilepath/issues/13 + if OS.mac? + (buildpath/"cabal.project.local").write "packages: . rawfilepath/" + (buildpath/"rawfilepath").install resource("rawfilepath") + inreplace "rawfilepath/cbits/runProcess.c", " execvpe(", " __hsunix_execvpe(" + end + # Help resolver pick package versions compatible with newer GHC + constraints = ["--constraint=async>=2"] + + system "cabal", "v2-update" + system "cabal", "v2-install", *constraints, *std_cabal_v2_args + end + + test do + (testpath/"t.rb").write <<~RUBY + # puts test comment. + puts "test literal." + RUBY + + assert_match ":1", shell_output("#{bin}/cgrep --count --comment test t.rb") + assert_match ":1", shell_output("#{bin}/cgrep --count --literal test t.rb") + assert_match ":1", shell_output("#{bin}/cgrep --count --code puts t.rb") + assert_match ":2", shell_output("#{bin}/cgrep --count puts t.rb") + end +end +__END__ +diff --git a/src/CGrep/Output.hs b/src/CGrep/Output.hs +index 8312e39..a751fff 100644 +--- a/src/CGrep/Output.hs ++++ b/src/CGrep/Output.hs +@@ -91,6 +91,7 @@ import Options ( + ) + import Data.ByteString.Short (ShortByteString) + import System.OsString.Data.ByteString.Short (fromShort) ++import OsPath (toShortByteString) + + data Output = Output + { outFilePath :: OsPath diff --git a/Formula/c/cgvg.rb b/Formula/c/cgvg.rb new file mode 100644 index 0000000000000..81e60f3085a00 --- /dev/null +++ b/Formula/c/cgvg.rb @@ -0,0 +1,29 @@ +class Cgvg < Formula + desc "Command-line source browsing tool" + homepage "https://uzix.org/cgvg.html" + url "https://uzix.org/cgvg/cgvg-1.6.3.tar.gz" + sha256 "d879f541abcc988841a8d86f0c0781ded6e70498a63c9befdd52baf4649a12f3" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?cgvg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "06ba6e4b8f27a86f39d20fa7d6b0b456d584d9973f15c5a7916145ae46c4d989" + end + + def install + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test").write "Homebrew" + assert_match "1 Homebrew", shell_output("#{bin}/cg Homebrew '#{testpath}/test'") + end +end diff --git a/Formula/chadwick.rb b/Formula/c/chadwick.rb similarity index 76% rename from Formula/chadwick.rb rename to Formula/c/chadwick.rb index 23906c4466407..8d1bedd6a3828 100644 --- a/Formula/chadwick.rb +++ b/Formula/c/chadwick.rb @@ -1,17 +1,26 @@ class Chadwick < Formula - desc "Tools for parsing Retrosheet MLB play-by-play files" - homepage "https://chadwick.sourceforge.io" - url "https://downloads.sourceforge.net/project/chadwick/chadwick-0.6/chadwick-0.6.5/chadwick-0.6.5.tar.gz" - sha256 "fed87dee762eb8550253ac86b42e5ffcd5abbd87509b708e523fffed105ab547" + desc "Tools for manipulating baseball data" + homepage "https://chadwick.readthedocs.io" + url "https://github.com/chadwickbureau/chadwick/releases/download/v0.10.0/chadwick-0.10.0.tar.gz" + sha256 "a4128934286edf5f9938923aad2000f7549dcccfb3b3f149a417534ef7eb29e9" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review bottle do - cellar :any - sha256 "1fef298b5a3cfdeea069b05a4cffd3df89627374ac3d3f161e7295db8976cdb8" => :mojave - sha256 "9696854624d829ac76b9185425c9d123495f4905ad40d9a82cf25908cab66c0c" => :high_sierra - sha256 "9e861062afe571d353e11df00146c5eafb3bad33cc747bc0b63b2441f1d52d10" => :sierra - sha256 "9b62dbf5675819d3ba2f770ab04086702d22054133c37096582a744624c41fce" => :el_capitan - sha256 "3975fe87dde078bf3fe1bfa23738e81dc2da185f8ea021a536e653749e33f944" => :yosemite - sha256 "f1d8a2d60be50146451c1581e536e5f22929c8846d8c6e625ee9ee2910348a35" => :mavericks + sha256 cellar: :any, arm64_tahoe: "a25e4a468f0a8202822cbed14f6b357e9bb08d39ac2ab2b6440b76a1a5fbd468" + sha256 cellar: :any, arm64_sequoia: "7f2f912f0bd0d1e01b9c5c79756c1871ee38ca5db5867eb00a8b329a964c6e4a" + sha256 cellar: :any, arm64_sonoma: "b4995539e3c7049d6d714ddcc248caaca634d951bac7276e5c39b3bdb6a5efa7" + sha256 cellar: :any, arm64_ventura: "47081e4a3818a66fccc361021b5f240dbd8b35dc262a0a952e4d669f8c6963a6" + sha256 cellar: :any, sonoma: "674fb89cebb20d3c283cd3ebf3adf86349ceffcb0257aba582ad5f542505fc46" + sha256 cellar: :any, ventura: "8065fe16594fa33d3a306ee0ce5fec37b948736f322ee9be2e8ff273db8d0feb" + sha256 cellar: :any_skip_relocation, arm64_linux: "98e955a622c79cad9c246dd9889bc67ea5d24175599c788b7f2b510d44aaab5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29fda27d9cbc2fbf9caef380fe3d1a950d4586b8826f0ceed226b71cf6fbfaa9" end def install @@ -29,9 +38,9 @@ def install date_xml_slug = date_xml.delete "/" # game_id and attributes for the retrosheet "team file" - attr = { :game_id => "ATL#{date_xml_slug}0", :home => "ATL", :home_name => "Braves", - :home_city => "Atlanta", :visitor => "NYN", :visitor_name => "Mets", - :visitor_city => "New York" } + attr = { game_id: "ATL#{date_xml_slug}0", home: "ATL", home_name: "Braves", + home_city: "Atlanta", visitor: "NYN", visitor_name: "Mets", + visitor_city: "New York" } # retrosheet "event file" name, chadwick's xml name?, our value attr_map_info = [ @@ -46,9 +55,9 @@ def install ] # expected (computed) score related data in chadwick's output - exp_linescore = { :away_runs => "1", :away_hits => "1", :away_errors => "0", - :home_runs => "0", :home_hits => "3", :home_errors => "0" } - exp_ing_ln_score = { :away => ["0", "0", "1"], :home => ["0", "0", "0"] } + exp_linescore = { away_runs: "1", away_hits: "1", away_errors: "0", + home_runs: "0", home_hits: "3", home_errors: "0" } + exp_ing_ln_score = { away: ["0", "0", "1"], home: ["0", "0", "0"] } exp_innings_cnt = exp_ing_ln_score.values[0].size exp_tmplayers_cnt = 9 # expected player count for each team diff --git a/Formula/c/chafa.rb b/Formula/c/chafa.rb new file mode 100644 index 0000000000000..8b72a90cbf119 --- /dev/null +++ b/Formula/c/chafa.rb @@ -0,0 +1,59 @@ +class Chafa < Formula + desc "Versatile and fast Unicode/ASCII/ANSI graphics renderer" + homepage "https://hpjansson.org/chafa/" + url "https://hpjansson.org/chafa/releases/chafa-1.16.2.tar.xz" + sha256 "657898dd9a89b45130a44c1efe1fc03e2c7bd00c2f543ed7111613cb9e7861df" + license "LGPL-3.0-or-later" + + livecheck do + url "https://hpjansson.org/chafa/releases/?C=M&O=D" + regex(/href=.*?chafa[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "eb1e2282d672d0439434d1519b04e6d8e3202ab7edd295cb9f284514de065a07" + sha256 cellar: :any, arm64_sequoia: "44ef52795c501e98e7d1e213967f665589688c4fa487bbbbdb1ec76d8cca4038" + sha256 cellar: :any, arm64_sonoma: "ce061ba4632caaf54e69ac1695387fdfcac2869f649c3d62b629c0317d72d4ed" + sha256 cellar: :any, sonoma: "b253a0f400639cd5d42b2edb999f3feac3e09e5c17f93eeb95824a8d18abbe5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "07c973106fe70ff89574a8cf91014d5b1367825dbc8b66998a00445750f14dc8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe1447ecf41721b3491d0a545ba0175dc6ee00527bf4bcd1e03acda061e1482d" + end + + head do + url "https://github.com/hpjansson/chafa.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "freetype" + depends_on "glib" + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libavif" + depends_on "librsvg" + depends_on "libtiff" + depends_on "webp" + + on_macos do + depends_on "gdk-pixbuf" + depends_on "gettext" + end + + def install + with_env(NOCONFIGURE: "1") { system "./autogen.sh" } if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + man1.install "docs/chafa.1" if build.stable? + end + + test do + output = shell_output("#{bin}/chafa #{test_fixtures("test.png")}") + assert_equal 3, output.lines.count + output = shell_output("#{bin}/chafa --version") + assert_match(/Loaders:.* AVIF.* JPEG.* JXL.* SVG.* TIFF.* WebP/, output) + end +end diff --git a/Formula/c/chain-bench.rb b/Formula/c/chain-bench.rb new file mode 100644 index 0000000000000..e24a768f49f66 --- /dev/null +++ b/Formula/c/chain-bench.rb @@ -0,0 +1,44 @@ +class ChainBench < Formula + desc "Software supply chain auditing tool based on CIS benchmark" + homepage "https://github.com/aquasecurity/chain-bench" + url "https://github.com/aquasecurity/chain-bench/archive/refs/tags/v0.1.10.tar.gz" + sha256 "5bfeaacd9cf7d272e88597135bff7f329d455a810aaf2b6a763ac55e18d383c1" + license "Apache-2.0" + head "https://github.com/aquasecurity/chain-bench.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d780b713131c76718e610afb3af9d1a0048adc90e0cfafd230e3903ff3223331" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43d2b953458c68d99277c0e0ac73cb2f28c89b6257f5bb4cc4ca41c20ba76d1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7eb818aaaee9a6ac713d2736e6b8daab233d79c28dafe50179e45754e89b3245" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cda1d20699ec3fc5285084a2add027d00aa96216143ece4e56fed47d66290ffb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "141af4bf17cd7756e628464ad2be2b5ec6e4ff00eaa93cb24fac29058caf7eb6" + sha256 cellar: :any_skip_relocation, sonoma: "88a17d348438cfaea5db46f351f25e04b999ab8c492746e33a98181f388b7066" + sha256 cellar: :any_skip_relocation, ventura: "f216f3a45abcce8098f49f2a9a675942d71782c366650da687042d8cfdd750f3" + sha256 cellar: :any_skip_relocation, monterey: "6ca7f92390b22adcace2a4c101c478ba43ab3893344ca91ebfbccf486c33e70a" + sha256 cellar: :any_skip_relocation, arm64_linux: "82978e4dba20b61bf99f3a39aeec86dbc9c3af3207809a47ddd8bdc0bfa02035" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43866b2132dbeded7af6e31783e3d629368d0bf9a0f1c744f4d5c464f11f9122" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X=main.version=#{version}"), "./cmd/chain-bench" + + generate_completions_from_executable(bin/"chain-bench", "completion") + end + + test do + repo_url = "https://github.com/Homebrew/homebrew-core" + assert_match "Fetch Starting", shell_output("#{bin}/chain-bench scan --repository-url #{repo_url}") + + assert_match version.to_s, shell_output("#{bin}/chain-bench --version") + end +end diff --git a/Formula/c/chainhook.rb b/Formula/c/chainhook.rb new file mode 100644 index 0000000000000..9dd8c7ee2d208 --- /dev/null +++ b/Formula/c/chainhook.rb @@ -0,0 +1,38 @@ +class Chainhook < Formula + desc "Reorg-aware indexing engine for the Stacks & Bitcoin blockchains" + homepage "https://github.com/hirosystems/chainhook" + url "https://github.com/hirosystems/chainhook/archive/refs/tags/v1.9.0.tar.gz" + sha256 "fea917fcd18032a280a965bd84b57894008110ec15191f4efca6aaab26011443" + license "GPL-3.0-only" + head "https://github.com/hirosystems/chainhook.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b4e136b469e884c9fabfd7d76b71d162f5fd42859f549a77353bcbdd62155b38" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82ff4a5ec7b4aa312786066af2837d17fc1b0ed2d330f48edb953507f533eb28" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "beb89ff5c70e198adff8eab6d5df70cb71dfd23880b1180159734603622caf58" + sha256 cellar: :any_skip_relocation, arm64_ventura: "152b922139083becc46220117c5e0d231c350aaf45f26d64364cad7dfe084d41" + sha256 cellar: :any_skip_relocation, sonoma: "50368ff655ea8363902b44d6e6c5894c79617d6a8b4b1b69929956415c597e4b" + sha256 cellar: :any_skip_relocation, ventura: "95789e890d61682e76409bcab394b10516c01313f6753c487f6b7acf59b2b4ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1fb33e311ed22c4819728973a18c07e67fcf7af7efae1a1952cf2dfdd9b31c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "540c3aa91b988100dbe13c53b58ce83e9a5719e33aaa0abc006f6634079d3a97" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" => :build # for libclang + + def install + system "cargo", "install", "--features", "cli,debug", "--no-default-features", + *std_cargo_args(path: "components/chainhook-cli") + end + + test do + pipe_output("#{bin}/chainhook config new --mainnet", "n\n") + assert_match "mode = \"mainnet\"", (testpath/"Chainhook.toml").read + end +end diff --git a/Formula/c/chainloop-cli.rb b/Formula/c/chainloop-cli.rb new file mode 100644 index 0000000000000..1fd641e40c7f9 --- /dev/null +++ b/Formula/c/chainloop-cli.rb @@ -0,0 +1,41 @@ +class ChainloopCli < Formula + desc "CLI for interacting with Chainloop" + homepage "https://docs.chainloop.dev" + url "https://github.com/chainloop-dev/chainloop/archive/refs/tags/v1.52.0.tar.gz" + sha256 "3b1b8cb1b43e23cd64265ddeadbaead2e5fef68612ebe2edab52ff38cec09710" + license "Apache-2.0" + head "https://github.com/chainloop-dev/chainloop.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "08e0b6af39a17fadf46c7064a5320738c96b30c7c1d8b66e0851f036b87133d8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "171b57e8e0f40a97aea667a2841a28e953d73e5e07d941b78459d13a5ff5c981" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e012b4cc93111cc361017e13a4be99c6d57e336530e9edb43e9906fd02791067" + sha256 cellar: :any_skip_relocation, sonoma: "07a214f013d241fc54bbb1a1d80095c06d6e9a251fe72c6abca339521517e10c" + sha256 cellar: :any_skip_relocation, arm64_linux: "8977e313f41c82f763906a1e2a1ee93d6261ecd63e68bfe57892dfbb4af6e04e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9129b8a1a39d013ddce6cf8baeeb95410ba53534d82794b114217182a344b66e" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/chainloop-dev/chainloop/app/cli/cmd.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"chainloop"), "./app/cli" + + generate_completions_from_executable(bin/"chainloop", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/chainloop version 2>&1") + + output = shell_output("#{bin}/chainloop artifact download 2>&1", 1) + assert_match "run chainloop auth login", output + end +end diff --git a/Formula/c/chainsaw.rb b/Formula/c/chainsaw.rb new file mode 100644 index 0000000000000..ce561619ff167 --- /dev/null +++ b/Formula/c/chainsaw.rb @@ -0,0 +1,35 @@ +class Chainsaw < Formula + desc "Rapidly Search and Hunt through Windows Forensic Artefacts" + homepage "https://github.com/WithSecureLabs/chainsaw" + url "https://github.com/WithSecureLabs/chainsaw/archive/refs/tags/v2.13.1.tar.gz" + sha256 "ab372bb555b5a39fb2763c2409ebf272cfa28e241f35ca960d3d50c678850199" + license "GPL-3.0-only" + head "https://github.com/WithSecureLabs/chainsaw.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "960ea01eafda5c685b6ad706bb50cc4409d6b948bb8a61753bf684b4d2451eb1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "271499760db41371da2ae96a5d0f71a439229e041b0de109fcd6de5906967477" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0698c0872d94dab76f819b4aa9cb745c9ce65f23ecd3b8d970615d647bea675a" + sha256 cellar: :any_skip_relocation, sonoma: "360897aefbfafb29ea194a1142404d2af6efff31feae54ea68358f4ea8f8aabb" + sha256 cellar: :any_skip_relocation, arm64_linux: "019bdca5c0944cd1b1c5ac89661d78c4b2f8e95978ae3e936ac8b7137461f964" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7264216d9d1a71105738bb626d3091000fdb4b135eaab2e1aca999518371bd22" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + mkdir "chainsaw" do + output = shell_output("#{bin}/chainsaw lint --kind chainsaw . 2>&1") + assert_match "Validated 0 detection rules out of 0", output + + output = shell_output("#{bin}/chainsaw dump --json . 2>&1", 1) + assert_match "Dumping the contents of forensic artefact", output + end + + assert_match version.to_s, shell_output("#{bin}/chainsaw --version") + end +end diff --git a/Formula/c/chaiscript.rb b/Formula/c/chaiscript.rb new file mode 100644 index 0000000000000..53a363cfbafa1 --- /dev/null +++ b/Formula/c/chaiscript.rb @@ -0,0 +1,52 @@ +class Chaiscript < Formula + desc "Easy to use embedded scripting language for C++" + homepage "https://chaiscript.com/" + url "https://github.com/ChaiScript/ChaiScript/archive/refs/tags/v6.1.0.tar.gz" + sha256 "3ca9ba6434b4f0123b5ab56433e3383b01244d9666c85c06cc116d7c41e8f92a" + license "BSD-3-Clause" + head "https://github.com/ChaiScript/ChaiScript.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5a5e765882d43b75315f316297eca0a972b83c5e5c77c6b00bcc28ec4602bf64" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "23f3944333ce9fa19f2664e512b9e6c98ba1e3dad79a9d409788ad2c70832494" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4cb81d66432b2941bf247d97c156f7764a7c4e76446691925b25cea785cd9f0d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6424e3a8c19e9c654db8954af3910392f6849bd0b6dfc4725ff62c757988d8ec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "009f1ecb9cc7606337465866c209225a1282bda0bdef0a6bad35ba3e8582bad0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cf3080dd47601b28622c198749587901d6d7eb59b5b3716a7bf72bc292be7cfe" + sha256 cellar: :any_skip_relocation, sonoma: "ec4acd72304685e0abc9b1cfe7d958377c1c67f428be643f08e027a4d8fbf283" + sha256 cellar: :any_skip_relocation, ventura: "8a621c59024cf368be41bd03f834837b8473da66dbf3bdd8f5721fb3af3b0a67" + sha256 cellar: :any_skip_relocation, monterey: "b8b2cadc6c93e131b1b46f2bb75a14b6b74c7ab89fac6a3165116c403d153c8f" + sha256 cellar: :any_skip_relocation, big_sur: "60056d2144073414ba1ad75e67b2ced0280a0596e5b7eea36d4475d5109f5c5b" + sha256 cellar: :any_skip_relocation, catalina: "d8f971e8ca36046cb2ddfa59c4a39091bce3cb1178f2be35d4f5a7a98ec2c932" + sha256 cellar: :any_skip_relocation, arm64_linux: "48c885b02e7e02084d00622d66b9348f78a108ac315106752a19d5a0a58e65c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34af5a03731cb336dad74d83505e8c9485092a275b632da30ca2d34a73d31461" + end + + depends_on "cmake" => :build + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() { + chaiscript::ChaiScript chai; + assert(chai.eval("123") == 123); + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-ldl", "-lpthread", "-std=c++14", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/chakra.rb b/Formula/c/chakra.rb new file mode 100644 index 0000000000000..8ed4d88fc0a8d --- /dev/null +++ b/Formula/c/chakra.rb @@ -0,0 +1,90 @@ +class Chakra < Formula + desc "Core part of the JavaScript engine that powers Microsoft Edge" + homepage "https://github.com/chakra-core/ChakraCore" + license "MIT" + revision 9 + head "https://github.com/chakra-core/ChakraCore.git", branch: "master" + + stable do + url "https://github.com/chakra-core/ChakraCore/archive/refs/tags/v1.11.24.tar.gz" + sha256 "b99e85f2d0fa24f2b6ccf9a6d2723f3eecfe986a9d2c4d34fa1fd0d015d0595e" + + depends_on arch: :x86_64 # https://github.com/chakra-core/ChakraCore/issues/6860 + + # Fix build with modern compilers. + # Remove with 1.12. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/chakra/clang10.patch" + sha256 "5337b8d5de2e9b58f6908645d9e1deb8364d426628c415e0e37aa3288fae3de7" + end + + # Support Python 3. + # Remove with 1.12. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/chakra/python3.patch" + sha256 "61c61c5376bc28ac52ec47e6d4c053eb27c04860aa4ba787a78266840ce57830" + end + + # Backport fixes needed to build with newer Clang on Linux + patch do + url "https://github.com/chakra-core/ChakraCore/commit/a2aae95cfb16cda814c557cc70c4bdb5156fd30f.patch?full_index=1" + sha256 "07c94241591be4f8c30b5ea68d7fa08e8e71186f26b124ee871eaf17b2590a28" + end + patch do + url "https://github.com/chakra-core/ChakraCore/commit/46af28eb9e01dee240306c03edb5fa736055b5b7.patch?full_index=1" + sha256 "d59f8bb5bbf716e4971b3a50d5fe2ca84c5901b354981e395a6c37adad8b2bb2" + end + end + + bottle do + sha256 cellar: :any, sonoma: "7b16aa6c8b2677f2dba55987d78f4cc867d357aeba2b6b3d97e76e42c6c69c4b" + sha256 cellar: :any, ventura: "dc7589f199baf02f63525cd1b5adb4e971d87b9c2369eb3e031dd4234acefac6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb090973883ca8832598f8d020bb6c3454567a7a1dd8537325a636be45fb0300" + end + + # Can be considered for un-deprecation if upstream does a new release + deprecate! date: "2025-03-28", because: "fails to run on Linux after rebuild and last release was 2020-12-08" + + depends_on "cmake" => :build + depends_on "icu4c@76" + + uses_from_macos "llvm" => :build + uses_from_macos "python" => :build + + fails_with :gcc do + cause "requires Clang, see https://github.com/chakra-core/ChakraCore/issues/2038" + end + + def install + # Use ld_classic to work around 'ld: Assertion failed: (0 && "lto symbol should not be in layout")' + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + # Workaround to build with ICU 76+ + ENV.append_to_cflags "-DU_SHOW_CPLUSPLUS_HEADER_API=0" + + icu4c_dep = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + args = %W[ + --custom-icu=#{icu4c_dep.to_formula.opt_include} + --jobs=#{ENV.make_jobs} + -y + ] + # LTO requires ld.gold, but Chakra has no way to specify to use that over regular ld. + args << "--lto-thin" if OS.mac? && !Hardware::CPU.arm? + # JIT is not supported on ARM and build fails since Xcode 16 + args << "--no-jit" if Hardware::CPU.arm? || DevelopmentTools.clang_build_version >= 1600 + + system "./build.sh", *args + + libexec.install "out/Release/ch" => "chakra" + include.install Dir["out/Release/include/*"] + lib.install "out/Release/#{shared_library("libChakraCore")}" + + # Non-statically built chakra expects libChakraCore to be in the same directory + bin.install_symlink libexec/"chakra" + libexec.install_symlink lib.children + end + + test do + (testpath/"test.js").write("print('Hello world!');\n") + assert_equal "Hello world!", shell_output("#{bin}/chakra test.js").chomp + end +end diff --git a/Formula/c/chalk-cli.rb b/Formula/c/chalk-cli.rb new file mode 100644 index 0000000000000..e48bdd88a19b9 --- /dev/null +++ b/Formula/c/chalk-cli.rb @@ -0,0 +1,24 @@ +class ChalkCli < Formula + desc "Terminal string styling done right" + homepage "https://github.com/chalk/chalk-cli" + url "https://registry.npmjs.org/chalk-cli/-/chalk-cli-6.0.0.tgz" + sha256 "480a85e48da024092e1b63fe260f810880f5f82322d82f62304f32e970112216" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "888e67d06c5fbe66c72de1de9f759ed9f32fd7a88d9f2158c3626b13f9ecbca6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "hello, world!", pipe_output("#{bin}/chalk bold cyan --stdin", "hello, world!") + end +end diff --git a/Formula/c/chamber.rb b/Formula/c/chamber.rb new file mode 100644 index 0000000000000..6216767ad2b7f --- /dev/null +++ b/Formula/c/chamber.rb @@ -0,0 +1,40 @@ +class Chamber < Formula + desc "CLI for managing secrets through AWS SSM Parameter Store" + homepage "https://github.com/segmentio/chamber" + url "https://github.com/segmentio/chamber/archive/refs/tags/v3.1.3.tar.gz" + sha256 "2509cb2a1e3c0959ee21a6724513f327d1c7127352fab4e316469a2ee9cad56b" + license "MIT" + head "https://github.com/segmentio/chamber.git", branch: "master" + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+(?:-ci\d)?)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7621167746f4aca41da55a4403f5c4dde4731eaa985915addd17e59ba95dda2b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "697dd0e5e98d6ab28cd992438dcda8e4dfa9e7a30cbc8084eaa4f20dbc76e68b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "697dd0e5e98d6ab28cd992438dcda8e4dfa9e7a30cbc8084eaa4f20dbc76e68b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "697dd0e5e98d6ab28cd992438dcda8e4dfa9e7a30cbc8084eaa4f20dbc76e68b" + sha256 cellar: :any_skip_relocation, sonoma: "32e4902a1ff7ca48ca609d7f33c479f026032d2b25caf7c7a04766e9d02ec236" + sha256 cellar: :any_skip_relocation, ventura: "32e4902a1ff7ca48ca609d7f33c479f026032d2b25caf7c7a04766e9d02ec236" + sha256 cellar: :any_skip_relocation, arm64_linux: "a00e00b1421e33e30e10ed0e0845dc806f28404f5db4478d535e02681c443fa9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b21ad171679fdce9e7fb937c1ab5c067b8155388178391cf79b3905b91300fa" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=v#{version}") + generate_completions_from_executable(bin/"chamber", "completion") + end + + test do + ENV["AWS_REGION"] = "us-east-1" + output = shell_output("#{bin}/chamber list service 2>&1", 1) + assert_match "Error: Failed to list store contents: operation error SSM", output + + assert_match version.to_s, shell_output("#{bin}/chamber version") + end +end diff --git a/Formula/c/changelogen.rb b/Formula/c/changelogen.rb new file mode 100644 index 0000000000000..4f1bfe864448d --- /dev/null +++ b/Formula/c/changelogen.rb @@ -0,0 +1,26 @@ +class Changelogen < Formula + desc "Generate Beautiful Changelogs using Conventional Commits" + homepage "https://github.com/unjs/changelogen" + url "https://registry.npmjs.org/changelogen/-/changelogen-0.6.2.tgz" + sha256 "cd5e783f11a9496293d2c7790e36574981296192849a9d904dec617e65e257b2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8f81b6116ef1eb1212acc82b881c4bd1c099d9a3221c76ea12203be07f73f2a9" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system "git", "init" + touch "test" + system "git", "add", "test" + system "git", "commit", "-m", "feat: initial commit" + assert_match "Generating changelog", shell_output("#{bin}/changelogen 2>&1") + end +end diff --git a/Formula/c/changie.rb b/Formula/c/changie.rb new file mode 100644 index 0000000000000..45082848fede7 --- /dev/null +++ b/Formula/c/changie.rb @@ -0,0 +1,35 @@ +class Changie < Formula + desc "Automated changelog tool for preparing releases" + homepage "https://changie.dev/" + url "https://github.com/miniscruff/changie/archive/refs/tags/v1.22.1.tar.gz" + sha256 "da365f000aacf5cfc19cfa7bf42cb2751a16722ddc237755bcbccb21ac39de46" + license "MIT" + head "https://github.com/miniscruff/changie.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "415b25229f2f6001643104bb38e88a5b6d69f21edd51a3f272fba466b44426ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0c2054b5806ebaa4c334630133fc4dfd9c4220a86580236d18e4b047b6eef5e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c2054b5806ebaa4c334630133fc4dfd9c4220a86580236d18e4b047b6eef5e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0c2054b5806ebaa4c334630133fc4dfd9c4220a86580236d18e4b047b6eef5e3" + sha256 cellar: :any_skip_relocation, sonoma: "5368c47524415aa9e4e26e54957479396c530ddefd197b9b0b1d40718e80ff03" + sha256 cellar: :any_skip_relocation, ventura: "5368c47524415aa9e4e26e54957479396c530ddefd197b9b0b1d40718e80ff03" + sha256 cellar: :any_skip_relocation, arm64_linux: "540829d6fb7e6eb0cb2a12367505dfc522866be46ec513f94ce5663a9b4a6959" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b73b899d74730298d81313dd97bbc2e68a6ca234bcd10c0781023b9d5cf683be" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"changie", "completion") + end + + test do + system bin/"changie", "init" + assert_match "All notable changes to this project", (testpath/"CHANGELOG.md").read + + assert_match version.to_s, shell_output("#{bin}/changie --version") + end +end diff --git a/Formula/c/chaos-client.rb b/Formula/c/chaos-client.rb new file mode 100644 index 0000000000000..d79d29b497169 --- /dev/null +++ b/Formula/c/chaos-client.rb @@ -0,0 +1,31 @@ +class ChaosClient < Formula + desc "Client to communicate with Chaos DB API" + homepage "https://chaos.projectdiscovery.io" + url "https://github.com/projectdiscovery/chaos-client/archive/refs/tags/v0.5.2.tar.gz" + sha256 "322f0c200887c2b0e6c412c70ad5de741a30e7687028966cfe26aa7534218369" + license "MIT" + head "https://github.com/projectdiscovery/chaos-client.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a285bcf99b8a399a6c8c64334ebd2b381373c7e3b0e0f25fe4cc6872b3e47ee1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0fad8ac3817b56bacd3383d334d2a33c7542dc71ee557afce144a82d759eac5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ee39f40b5e740afd156a0ef79b7cad536369095b04ff72a75c958f50c0bce92" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5a847c1647361de8fe446c786e5954939b70d4bdce2fba6b191da934b3f67c01" + sha256 cellar: :any_skip_relocation, sonoma: "beba47d0434fe37e817143e1f41e8025678220d0e428f4347fba7d11fe6951b8" + sha256 cellar: :any_skip_relocation, ventura: "d0d8eeea7253bc21784261ea3b5127928bc9b0eb174291c879094378c548c4a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d1ef6c9c127554af8fd43ab70371318ea225d9c9689f18dcb56e2e78b749562" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d4734d00dfa7a505a34db36e3121a9b8562da89f79923164f65f742fb50fc55" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"chaos"), "./cmd/chaos" + end + + test do + assert_match version.to_s, shell_output("#{bin}/chaos -version 2>&1") + + assert_match "PDCP_API_KEY not specified", shell_output("#{bin}/chaos -d brew.sh 2>&1", 1) + end +end diff --git a/Formula/c/chaoskube.rb b/Formula/c/chaoskube.rb new file mode 100644 index 0000000000000..e1392c48d8860 --- /dev/null +++ b/Formula/c/chaoskube.rb @@ -0,0 +1,37 @@ +class Chaoskube < Formula + desc "Periodically kills random pods in your Kubernetes cluster" + homepage "https://github.com/linki/chaoskube" + url "https://github.com/linki/chaoskube/archive/refs/tags/v0.37.0.tar.gz" + sha256 "ee2db89df0136c86997aa867951010e901f59273d840ed43a826d4d5fd89bd9d" + license "MIT" + head "https://github.com/linki/chaoskube.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf153893fbed4119d54ae61ebc6fb88b744170113ed9836dddad1f010fcf2ccb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36f62ac923f7050c352df7f8ec5068a18987b997c9ddb178ae4e1855da9aec6b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "435adc6fb662974a4945b8188eb64a69c906e54c8e2e9d47cf63c34200422b79" + sha256 cellar: :any_skip_relocation, sonoma: "48a6e3c9d3bc29a859fd5708a788780af9c820457076578a6d45b8a4c7262bb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c497205d2196f6073ce552f34321bfee4198ec338d3da8c376fcb1c9885e41ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f4ba35835dbf476ee584b33bc93e97a02f28a250598d8d8b61e397656ad3a6c" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + output = shell_output("#{bin}/chaoskube --labels 'env!=prod' 2>&1", 1) + assert_match "dryRun=true interval=10m0s maxRuntime=-1s", output + assert_match "Neither --kubeconfig nor --master was specified. Using the inClusterConfig.", output + + assert_match version.to_s, shell_output("#{bin}/chaoskube --version 2>&1") + end +end diff --git a/Formula/c/chapel.rb b/Formula/c/chapel.rb new file mode 100644 index 0000000000000..caf14257433c4 --- /dev/null +++ b/Formula/c/chapel.rb @@ -0,0 +1,231 @@ +class Chapel < Formula + include Language::Python::Shebang + + desc "Programming language for productive parallel computing at scale" + homepage "https://chapel-lang.org/" + url "https://github.com/chapel-lang/chapel/releases/download/2.6.0/chapel-2.6.0.tar.gz" + sha256 "e469c35be601cf1f59af542ab885e8a14aa2b087b79af0d5372a4421976c74b6" + license "Apache-2.0" + revision 1 + head "https://github.com/chapel-lang/chapel.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a92b26a348ec2ddb493ed332a170b57eed2b17eab774390b6aa8f242bcd4c2bd" + sha256 arm64_sequoia: "86a6958d62cc8fd122bfeb781812cf1df71f08c2cb956f0bf8a9ff945a4608f2" + sha256 arm64_sonoma: "44e172c1d40ec21a7c8344ffb0b81ad22c2cb7f8920ba5a4db11a2b2fe543947" + sha256 sonoma: "7b593fdea9a9da9357cc2f27753a81b2c241fb8cc326970c1de74af178567018" + sha256 arm64_linux: "6bbc5a340c4d98538f0007bac67b7c60129746cbfbd9e639b258e588d4b36853" + sha256 x86_64_linux: "c12cedbb7591a5fb87cb7f763d5ac078caff965d94326fe3f279470dacb49aab" + end + + depends_on "cmake" + depends_on "gmp" + depends_on "hwloc" + depends_on "jemalloc" + depends_on "llvm@20" + depends_on "pkgconf" + depends_on "python@3.14" + + def llvm + deps.map(&:to_formula).find { |f| f.name.match? "^llvm" } + end + + # determine the C backend to use based on the system + def cbackend + on_macos do + return "clang" + end + on_linux do + return "gnu" + end + end + + def install + # Always detect Python used as dependency rather than needing aliased Python formula + python = "python3.14" + # It should be noted that this will expand to: 'for cmd in python3.14 python3 python python2; do' + # in our find-python.sh script. + inreplace "util/config/find-python.sh", /^(for cmd in )(python3 )/, "\\1#{python} \\2" + + # a lot of scripts have a python3 or python shebang, which does not point to python3.12 anymore + Pathname.glob("**/*.py") do |pyfile| + rewrite_shebang detected_python_shebang, pyfile + end + + libexec.install Dir["*"] + # Chapel uses this ENV to work out where to install. + ENV["CHPL_HOME"] = libexec + ENV["CHPL_GMP"] = "system" + + # This ENV avoids a problem where cmake cache is invalidated by subsequent make calls + ENV["CHPL_CMAKE_USE_CC_CXX"] = "1" + ENV["CHPL_CMAKE_PYTHON"] = python + + # This ENV avoids issues with GASNet picking up the wrong linker + ENV["CHPL_IGNORE_GASNET_LD"] = "1" + + # don't try to set CHPL_LLVM_GCC_PREFIX since the llvm + # package should be configured to use a reasonable GCC + (libexec/"chplconfig").write <<~EOS + CHPL_RE2=bundled + CHPL_GMP=system + CHPL_TARGET_MEM=jemalloc + CHPL_TARGET_JEMALLOC=system + CHPL_HWLOC=system + CHPL_LLVM=system + CHPL_LLVM_CONFIG=#{llvm.opt_bin}/llvm-config + CHPL_LLVM_GCC_PREFIX=none + CHPL_TARGET_CPU=native + EOS + # NOTE: CHPL_TARGET_CPU=native could cause problems for users cross-compiling, + # should we only set this for CHPL_COMM=none? + + # Must be built from within CHPL_HOME to prevent build bugs. + # https://github.com/Homebrew/legacy-homebrew/pull/35166 + cd libexec do + system "./util/printchplenv", "--all" + system "make" + with_env(CHPL_TARGET_COMPILER: cbackend) do + system "make" + end + with_env( + CHPL_COMM: "gasnet", + CHPL_COMM_SUBSTRATE: "udp", + CHPL_GASNET_CFG_OPTIONS: "--disable-auto-conduit-detect --enable-udp", + ) do + system "make" + # C backend requires https://github.com/chapel-lang/chapel/pull/27652 + # to be resolved + # with_env(CHPL_TARGET_COMPILER: cbackend) do + # system "make" + # end + end + with_env(CHPL_LOCALE_MODEL: "gpu", CHPL_GPU: "cpu") do + system "make" + end + + with_env(CHPL_PIP_FROM_SOURCE: "1") do + system "make", "chpldoc" + system "make", "chplcheck" + system "make", "chpl-language-server" + end + system "make", "mason" + system "make", "cleanall" + + rm_r("third-party/llvm/llvm-src/") + rm_r("third-party/gasnet/gasnet-src/") + rm_r("third-party/libfabric/libfabric-src/") + rm_r("third-party/libunwind/libunwind-src/") + rm_r("third-party/gmp/gmp-src/") + rm_r("third-party/qthread/qthread-src/") + + # + # the following makes sure GASNet doesn't pickup incorrect paths during the build + # + # clobber the gasnet include + rm_r Dir.glob("third-party/gasnet/install/**/include") + # clobber GASNET_CC=, GASNET_CXX=, and GASNET_LD= from the *.pc files + gasnet_pc_files = Dir.glob("third-party/gasnet/install/**/lib/pkgconfig/gasnet-*-par.pc") + gasnet_pc_files.each do |pc_file| + inreplace pc_file, /^GASNET_CC=.*$/, "" + inreplace pc_file, /^GASNET_CXX=.*$/, "" + inreplace pc_file, /^GASNET_LD=.*$/, "" + end + # remove the gasnet_tools-par.pc files + rm_r Dir.glob("third-party/gasnet/install/**/lib/pkgconfig/gasnet_tools-par.pc") + end + + # Install chpl and other binaries (e.g. chpldoc) into bin/ as exec scripts. + platform = if OS.linux? && Hardware::CPU.is_64_bit? + "linux64-#{Hardware::CPU.arm? ? "aarch64" : Hardware::CPU.arch}" + else + "#{OS.kernel_name.downcase}-#{Hardware::CPU.arch}" + end + + bin.install libexec.glob("bin/#{platform}/*") + bin.env_script_all_files libexec/"bin"/platform, CHPL_HOME: libexec, CHPL_IGNORE_GASNET_LD: 1 + man1.install_symlink libexec.glob("man/man1/*.1") + (lib/"cmake/chpl").install libexec.glob("lib/cmake/chpl/*") + + chplrun_udp = libexec/"bin"/platform/"chplrun-udp" + chplrun_udp.write <<~EOS + #!/bin/bash + GASNET_SPAWNFN=L \ + GASNET_ROUTE_OUTPUT=0 \ + GASNET_QUIET=Y \ + GASNET_MASTERIP=127.0.0.1 \ + GASNET_WORKERIP=127.0.0.0 \ + CHPL_RT_OVERSUBSCRIBED=yes \ + exec "$@" + EOS + chplrun_udp.chmod 0755 + bin.install_symlink chplrun_udp => "chplrun-udp" + end + + def caveats + <<~EOS + By default, compiled Chapel programs will be single-locale only. + To compile and run multi-locale Chapel programs locally: + + Compile your program with: + `chpl --comm=gasnet --comm-substrate=udp` + And then run it with: + `chplrun-udp ./your_program_name` + + To simulate GPU execution, you can compile your program with: + `chpl --locale-model=gpu --gpu=cpu` + EOS + end + + test do + # Hide ld warning until formula uses LLVM 21+ or if we apply backports to `llvm@20` + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? && MacOS.version >= :tahoe + + ENV["CHPL_HOME"] = libexec + ENV["CHPL_INCLUDE_PATH"] = HOMEBREW_PREFIX/"include" + ENV["CHPL_LIB_PATH"] = HOMEBREW_PREFIX/"lib" + ENV["CHPL_IGNORE_GASNET_LD"] = "1" + ENV["CHPL_RT_SILENCE_UNUSED_CORES"] = "1" + + cd libexec do + system "util/test/checkChplInstall" + system "util/test/checkChplDoc" + with_env(CHPL_TARGET_COMPILER: cbackend) do + system "util/test/checkChplInstall" + end + with_env(CHPL_COMM: "gasnet", CHPL_COMM_SUBSTRATE: "udp") do + with_env( + GASNET_SPAWNFN: "L", + GASNET_ROUTE_OUTPUT: "0", + GASNET_QUIET: "Y", + GASNET_MASTERIP: "127.0.0.1", + GASNET_WORKERIP: "127.0.0.0", + CHPL_RT_OVERSUBSCRIBED: "yes", + ) do + system "util/test/checkChplInstall" + # C backend requires https://github.com/chapel-lang/chapel/pull/27652 + # to be resolved + # with_env(CHPL_TARGET_COMPILER: cbackend) do + # system "util/test/checkChplInstall" + # end + end + end + with_env(CHPL_LOCALE_MODEL: "gpu", CHPL_GPU: "cpu") do + system "util/test/checkChplInstall" + end + end + system bin/"chpl", "--print-passes", "--print-commands", libexec/"examples/hello.chpl" + system bin/"chpl", "--target-compiler", cbackend, "--print-passes", + "--print-commands", libexec/"examples/hello.chpl" + system bin/"chpldoc", "--version" + system bin/"mason", "--version" + + # Test chplcheck, if it works CLS probably does too. + # chpl-language-server will hang indefinitely waiting for a LSP client + system bin/"chplcheck", "--list-rules" + system bin/"chplcheck", libexec/"examples/hello.chpl" + end +end diff --git a/Formula/c/chardet.rb b/Formula/c/chardet.rb new file mode 100644 index 0000000000000..fe2b1e0013109 --- /dev/null +++ b/Formula/c/chardet.rb @@ -0,0 +1,26 @@ +class Chardet < Formula + include Language::Python::Virtualenv + + desc "Python character encoding detector" + homepage "https://chardet.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + license "LGPL-2.1-or-later" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "3c508a057b1c86120b7985200af556d301600d3352727e6a91b5118acaea2474" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.txt").write "你好" + output = shell_output("#{bin}/chardetect #{testpath}/test.txt") + assert_match "test.txt: utf-8 with confidence 0.7525", output + end +end diff --git a/Formula/c/charls.rb b/Formula/c/charls.rb new file mode 100644 index 0000000000000..cbd0deb28e797 --- /dev/null +++ b/Formula/c/charls.rb @@ -0,0 +1,56 @@ +class Charls < Formula + desc "C++ JPEG-LS library implementation" + homepage "https://github.com/team-charls/charls" + url "https://github.com/team-charls/charls/archive/refs/tags/2.4.2.tar.gz" + sha256 "d1c2c35664976f1e43fec7764d72755e6a50a80f38eca70fcc7553cad4fe19d9" + license "BSD-3-Clause" + head "https://github.com/team-charls/charls.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a1c092740b2d8128a1c4bfe89a332c4bc132a936a6f058d34af8470c465d429c" + sha256 cellar: :any, arm64_sequoia: "4c5a430f93616eee0bbf2464f5b950ebced3874e71fe95dd8c50c78d30752af8" + sha256 cellar: :any, arm64_sonoma: "76dca903581c658d0db0f4f7102cf6f766def35e259b8f5fd1b7b215f294b684" + sha256 cellar: :any, arm64_ventura: "2472b5bdd282eb272b5f83b1e09fac00a4285802abf5215a08af4b6e2d8a2f6a" + sha256 cellar: :any, arm64_monterey: "e0ee8a676b172678dd39668e90fa18b348c3cdd3415e1e6d0aee0aa8cae7f7ba" + sha256 cellar: :any, arm64_big_sur: "b0cf01cbfa53eacc7cfee7771face7e9b1627f3e9b648fe0ef797b900e4f1a36" + sha256 cellar: :any, sonoma: "b2f37034db31c89e31bcbabfab4daff049e26f37ccaadf8ccbba0ba261ac029e" + sha256 cellar: :any, ventura: "2c5587e6cc5f98c3fde8baee24ddda28bcf57fea3823ad50b8a723bccd2d92ed" + sha256 cellar: :any, monterey: "d7b1f60902af614082b112fb145a04cbe2ee474867a9ac0a5e6311e7763b406e" + sha256 cellar: :any, big_sur: "6d5ed0ccde713e3301144a103d26aadc8b5e737800536c68cb1b53ba992ffb34" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a1ff310d136b6dcce83438562977bd6ea391e315eb9eb066bbd62fbab5cc5dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c047efbbea396272b84c00659b8f68a03b7130c19b1835f9f83c5be28351a7e5" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCHARLS_BUILD_TESTS=OFF + -DCHARLS_BUILD_FUZZ_TEST=OFF + -DCHARLS_BUILD_SAMPLES=OFF + -DBUILD_SHARED_LIBS=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + charls::jpegls_encoder encoder; + std::cout << "ok" << std::endl; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++14", "-I#{include}", "-L#{lib}", "-lcharls", "-o", "test" + assert_equal "ok", shell_output(testpath/"test").chomp + end +end diff --git a/Formula/c/charm-tools.rb b/Formula/c/charm-tools.rb new file mode 100644 index 0000000000000..60237f73d1f8f --- /dev/null +++ b/Formula/c/charm-tools.rb @@ -0,0 +1,233 @@ +class CharmTools < Formula + include Language::Python::Virtualenv + + desc "Tools for authoring and maintaining juju charms" + homepage "https://github.com/juju/charm-tools" + url "https://files.pythonhosted.org/packages/da/8c/26dcc9b99c6fbacd989f5d54b7a3a976cfa5b8ac26f6992d134091add085/charm_tools-3.0.8.tar.gz" + sha256 "ad1e8aaf8f6aece19f3f7db1d45010b471be998b54a0b2861f24b62912f24b9d" + license "GPL-3.0-only" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "8b7c31459c1d8582047d79f8189c632deb16d126215605f117186d866bee8b07" + sha256 cellar: :any, arm64_sequoia: "b9bf1be845d1f2954c4a718ee1b854222b8bc45dbe165fbd1a5f40cbb0185130" + sha256 cellar: :any, arm64_sonoma: "a3826f2a3b51fcd9677d48ee893a240a719a7f48e56083b5f5f21ec90e57c966" + sha256 cellar: :any, sonoma: "9f20b909364fe5d9d3bdef216eaa78b297e2884fce1354f4b215965df23f0c7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "27e82e59687b12734a32041d42c8928d5cd8620c4835a46592ea0c040f62ef28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7366a0245c76bc92f9b038df28c3f88182e4f7d07e0d2f47472416d2ae29981a" + end + + depends_on "certifi" + depends_on "charm" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.14" + + on_linux do + depends_on "gmp" + end + + pypi_packages exclude_packages: ["cheetah3", "certifi", "cryptography"], + extra_packages: "ct3" + + # `ruamel-yaml` is manually updated to support Python 3.14 + # PR ref: https://github.com/juju/charm-tools/pull/685 + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "blessings" do + url "https://files.pythonhosted.org/packages/5c/f8/9f5e69a63a9243448350b44c87fae74588aa634979e6c0c501f26a4f6df7/blessings-1.7.tar.gz" + sha256 "98e5854d805f50a5b58ac2333411b0482516a8210f23f43308baeb58d77c157d" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colander" do + url "https://files.pythonhosted.org/packages/fa/3c/592bbb25f6199234167d713c220044473e2e57906d7ad7a34e13b7dc1144/colander-1.8.3.tar.gz" + sha256 "259592a0d6a89cbe63c0c5771f9c0c2522387415af8d715f599583eac659f7d4" + end + + resource "ct3" do + url "https://files.pythonhosted.org/packages/a4/61/aa8c457288d06dd160e495b9ede433ba847a29cac41d6dfe56746720acff/ct3-3.4.0.tar.gz" + sha256 "ddc493b775b02b09737b1fb628a973dbe9aa91d694045a6764a8e3f5296fa1eb" + end + + resource "dict2colander" do + url "https://files.pythonhosted.org/packages/aa/7e/5ed2ba3dc2f06457b76d4bc8c93559179472bf87e6982f9a9e5cea30e84e/dict2colander-0.2.tar.gz" + sha256 "6f668d60896991dcd271465b755f00ffd6f87f81e0d4d054be62a16c086978c7" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/36/3d/ca032d5ac064dff543aa13c984737795ac81abc9fb130cd2fcff17cfabc7/jsonschema-4.17.3.tar.gz" + sha256 "0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d" + end + + resource "jujubundlelib" do + url "https://files.pythonhosted.org/packages/57/57/039c6b7e6a01df336f38549eec0836b61166f012528449e37a0ced4e9ddc/jujubundlelib-0.5.7.tar.gz" + sha256 "7e2b1a679faab13c4d56256e31e0cc616d55841abd32598951735bf395ca47e3" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/55/fe/282f4c205add8e8bb3a1635cbbac59d6def2e0891b145aa553a0e40dd2d0/keyring-23.13.1.tar.gz" + sha256 "ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "otherstuf" do + url "https://files.pythonhosted.org/packages/4f/b5/fe92e1d92610449f001e04dd9bf7dc13b8e99e5ef8859d2da61a99fc8445/otherstuf-1.1.0.tar.gz" + sha256 "7722980c3b58845645da2acc838f49a1998c8a6bdbdbb1ba30bcde0b085c4f4c" + end + + resource "parse" do + url "https://files.pythonhosted.org/packages/4f/78/d9b09ba24bb36ef8b83b71be547e118d46214735b6dfb39e4bfde0e9b9dd/parse-1.20.2.tar.gz" + sha256 "b41d604d16503c79d81af5165155c0b20f6c8d6c559efa66b4b695c3e5a0a0ce" + end + + resource "path" do + url "https://files.pythonhosted.org/packages/96/1c/3950c87aa25437af5f1663cc8627d44ff26f8c5117a5053c9fc3f641027c/path-16.16.0.tar.gz" + sha256 "a6a6d916c910dc17e0ddc883358756c5a33d1b6dbdf5d6de86554f399053af58" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/32/1a/6baf904503c3e943cae9605c9c88a43b964dea5b59785cf956091b341b08/pathspec-0.10.3.tar.gz" + sha256 "56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyrsistent" do + url "https://files.pythonhosted.org/packages/ce/3a/5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca/pyrsistent-0.20.0.tar.gz" + sha256 "4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requirements-parser" do + url "https://files.pythonhosted.org/packages/c2/f9/76106e710015f0f8da37bff8db378ced99ae2553cc4b1cffb0aef87dc4ac/requirements-parser-0.5.0.tar.gz" + sha256 "3336f3a3ae23e06d3f0f88595e4052396e3adf91688787f637e5d2ca1a904069" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stuf" do + url "https://files.pythonhosted.org/packages/76/62/171e06b6d2d3072ea333de19632c61a44f83199e20cbf4924d12827cf66a/stuf-0.9.16.tar.bz2" + sha256 "e61d64a2180c19111e129d36bfae66a0cb9392e1045827d6495db4ac9cb549b0" + end + + resource "translationstring" do + url "https://files.pythonhosted.org/packages/14/39/32325add93da9439775d7fe4b4887eb7986dbc1d5675b0431f4531f560e5/translationstring-1.4.tar.gz" + sha256 "bf947538d76e69ba12ab17283b10355a9ecfbc078e6123443f43f2107f6376f3" + end + + resource "types-setuptools" do + url "https://files.pythonhosted.org/packages/19/bd/1e5f949b7cb740c9f0feaac430e301b8f1c5f11a81e26324299ea671a237/types_setuptools-80.9.0.20250822.tar.gz" + sha256 "070ea7716968ec67a84c7f7768d9952ff24d28b65b6594797a464f1b3066f965" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "vergit" do + url "https://files.pythonhosted.org/packages/d8/dc/2ef077a97a05633bbe7a46b9cb4b87fbf994a9aaa52b44a8f1086d20951f/vergit-1.0.2.tar.gz" + sha256 "ea82a4d6057d4891a4b16e0881bd756ceea2b66253edc05dd619450f88a5ff31" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + def install + # Unpin ruamel.yaml to support Python 3.14 + # PR ref for 3.13: https://github.com/juju/charm-tools/pull/685 + inreplace "setup.py", "ruamel.yaml<0.18", "ruamel.yaml<0.19" + + venv = virtualenv_install_with_resources without: "ct3" + resource("ct3").stage do + # Package was renamed due to PyPI 2FA requirement and charm-tools use of + # `pkg_resources` raises an exception on missing requirement + # https://github.com/CheetahTemplate3/cheetah3/commit/673259b2d139b4ea970b1c2da12607b7ac39cbec + inreplace "SetupConfig.py", "name = 'CT3'", "name = 'cheetah3'" + venv.pip_install Pathname.pwd + end + end + + test do + system bin/"charm-create", "brewtest" + assert_path_exists testpath/"brewtest/metadata.yaml" + + assert_match version.to_s, shell_output("#{bin}/charm-version") + end +end diff --git a/Formula/c/charm.rb b/Formula/c/charm.rb new file mode 100644 index 0000000000000..5b87167793d52 --- /dev/null +++ b/Formula/c/charm.rb @@ -0,0 +1,37 @@ +class Charm < Formula + desc "Tool for managing Juju Charms" + homepage "https://github.com/juju/charmstore-client" + url "https://github.com/juju/charmstore-client/archive/refs/tags/v2.5.2.tar.gz" + sha256 "3dd52c9a463bc09bedb3a07eb0977711aec77611b9c0d7f40cd366a66aa2ca03" + license "GPL-3.0-only" + head "https://github.com/juju/charmstore-client.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "23c05ff713871756c9636e01d7de20645150e6180d9426f8fe33a3f4ff0e6885" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2ddeaf1bab0b233267484c6bdac331a9113af93d5819e6f48ef7642b4696dc1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e2ddeaf1bab0b233267484c6bdac331a9113af93d5819e6f48ef7642b4696dc1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e2ddeaf1bab0b233267484c6bdac331a9113af93d5819e6f48ef7642b4696dc1" + sha256 cellar: :any_skip_relocation, sonoma: "4a50613b56ac6dbd9bd7c8def6f03899188f3a4a0992098e75e6d49493b4cd19" + sha256 cellar: :any_skip_relocation, ventura: "4a50613b56ac6dbd9bd7c8def6f03899188f3a4a0992098e75e6d49493b4cd19" + sha256 cellar: :any_skip_relocation, arm64_linux: "60e259f6541281a54f94e6b9dea178bacc9d348330e7b781441995f35e97eb73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "393502f468997806b663a548026487a0cc7bdceec9bfce3bfa6cccba45551d59" + end + + depends_on "breezy" => :build + depends_on "go" => :build + + def install + # Charm requires bzr (bazaar vcs) for fetching launchpad.net/lpad Go module. + ENV["GOVCS"] = "launchpad.net:bzr" + system "go", "build", *std_go_args, "./cmd/charm" + end + + test do + assert_match "show-plan - show plan details", shell_output("#{bin}/charm 2>&1") + + assert_match "ERROR missing plan url", shell_output("#{bin}/charm show-plan 2>&1", 2) + end +end diff --git a/Formula/c/charmcraft.rb b/Formula/c/charmcraft.rb new file mode 100644 index 0000000000000..91586bf372376 --- /dev/null +++ b/Formula/c/charmcraft.rb @@ -0,0 +1,390 @@ +class Charmcraft < Formula + include Language::Python::Virtualenv + + desc "Tool to build charms and publish them on Charmhub" + homepage "https://charmhub.io" + url "https://files.pythonhosted.org/packages/48/e7/0528770d02d99ab1d840b69131fba020294e84da734e18fb8f41735fdc63/charmcraft-3.5.3.tar.gz" + sha256 "9e3e10af1cb707d3e054a79e328bffd42eb70721255b9e7715fcb66a8c87cf8f" + license "Apache-2.0" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "e4d0d54b43ebc1bb85d00e527207a9a0f6d84407f4e6a9d104cb6d9535e16984" + sha256 cellar: :any, arm64_sequoia: "66ea0baa8ef6bb54af54e8def0a6e177d0fd3fa1e097b6da9e2d026c9e41f759" + sha256 cellar: :any, arm64_sonoma: "e523509653cb7087f465eb69e98062842a971f12c2131cc77f21ef555443452f" + sha256 cellar: :any, sonoma: "624af8baece62c63309d504d51fb1b2bad4190fc87f420de64dc7d49be12565d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7da6097d1caa5f1289be708123deab9ac6a718705be99b1775a8530bf6d61afa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "860de8c06e8c575a64bcbb1ae6c4933a23a6e2666e3b5a1ad70d2420aeb30fe5" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libsodium" + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "pygit2" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core pygit2 rpds-py], + extra_packages: ["jeepney", "secretstorage"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "craft-application" do + url "https://files.pythonhosted.org/packages/86/86/20bac2f1a4e45097c01040328ff8ffd5313533d03231db08435559c684c3/craft_application-4.10.0.tar.gz" + sha256 "7a9cda0e854877fb80464e03274e69b97540a618e0c53cbc500b6fce25b9b8c4" + end + + resource "craft-archives" do + url "https://files.pythonhosted.org/packages/41/4c/63ce5d6c91b4b269f862460392bd70fd0594f7902641b5d0bc82aa3f1c41/craft_archives-2.2.0.tar.gz" + sha256 "0bfd6dc3c2710605b97292df952032af24bf94ebf2f284f355d70f1bb2e3fe20" + end + + resource "craft-cli" do + url "https://files.pythonhosted.org/packages/35/0a/f1612fe57295b6a69ff256dbd0826b90f70b27dda90988f972fa6f8968cc/craft_cli-3.2.0.tar.gz" + sha256 "557345bf1d82e93d6525f35837ddd2b216de4152f5572306ec59d805231d348b" + end + + resource "craft-grammar" do + url "https://files.pythonhosted.org/packages/c7/35/584fc928bffd1346c4b9c55170cbe4c09f89ec185d0d9d7e2626f876e80d/craft_grammar-2.3.0.tar.gz" + sha256 "0b7ae3aa595f0f3d1f82ed2e696c99b35283c18a60c7a68840bc185bd123e4d8" + end + + resource "craft-parts" do + url "https://files.pythonhosted.org/packages/ff/0e/32408579efd9061321c8df73754f47347e0eb26c04621b61bf173b9e2fc3/craft_parts-2.26.0.tar.gz" + sha256 "53d73015ec55ca5ad5dfc84113db26b06191928bc82ac1e18e8582381390b6d6" + end + + resource "craft-platforms" do + url "https://files.pythonhosted.org/packages/44/78/f2c3ef342c9e9fee0127516aee113a28c487a999d35ce4aa944a58bd5939/craft_platforms-0.10.0.tar.gz" + sha256 "85b8630c0f7436b0832466c1dba8deb040502fdadc1d225fbed15d1e1e38f729" + end + + resource "craft-providers" do + url "https://files.pythonhosted.org/packages/22/85/e5939f44987d0a9ae7f87edce35d6c792e2924aebd6cdcc5caa5895524ee/craft_providers-3.1.0.tar.gz" + sha256 "5ec6ef0715497fbf9d7f477088b12d0cca5356965486d40fb80b629824d4391b" + end + + resource "craft-store" do + url "https://files.pythonhosted.org/packages/c4/64/af2af291aef5ea2b5fc56d9be151324eabb55c4ed89bc4f11343faa377b5/craft_store-3.3.0.tar.gz" + sha256 "02304296d7d5b896bb8d07660c3a29eaff461fc12d40fd2a21a39230f53c288b" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "launchpadlib" do + url "https://files.pythonhosted.org/packages/30/ec/e659321733decaafe95d4cf964ce360b153de48c5725d5f27cefe97bf5f8/launchpadlib-2.1.0.tar.gz" + sha256 "b4c25890bb75050d54c08123d2733156b78a59a2555f5461f69b0e44cd91242f" + end + + resource "lazr-restfulclient" do + url "https://files.pythonhosted.org/packages/ea/a3/45d80620a048c6f5d1acecbc244f00e65989914bca370a9179e3612aeec8/lazr.restfulclient-0.14.6.tar.gz" + sha256 "43f12a1d3948463b1462038c47b429dcb5e42e0ba7f2e16511b02ba5d2adffdb" + end + + resource "lazr-uri" do + url "https://files.pythonhosted.org/packages/58/53/de9135d731a077b1b4a30672720870abdb62577f18b1f323c87e6e61b96c/lazr_uri-1.0.7.tar.gz" + sha256 "ed0cf6f333e450114752afb1ce0c299c36ac4b109063eb50354c4f87f825a3ee" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "macaroonbakery" do + url "https://files.pythonhosted.org/packages/4b/ae/59f5ab870640bd43673b708e5f24aed592dc2673cc72caa49b0053b4af37/macaroonbakery-1.3.4.tar.gz" + sha256 "41ca993a23e4f8ef2fe7723b5cd4a30c759735f1d5021e990770c8a0e0f33970" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "overrides" do + url "https://files.pythonhosted.org/packages/36/86/b585f53236dec60aba864e050778b25045f857e17f6e5ea0ae95fe80edd2/overrides-7.7.0.tar.gz" + sha256 "55158fa3d93b98cc75299b1e67078ad9003ca27945c76162c1c0766d6f91820a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pylxd" do + url "https://files.pythonhosted.org/packages/9b/8e/6a31a694560adaba20df521c3102bdecec06a0fea9c73ff1466834e2df30/pylxd-2.3.5.tar.gz" + sha256 "d67973dd2dc1728e3e1b41cc973e11e6cbceae87878d193ac04cc2b65a7158ef" + end + + resource "pymacaroons" do + url "https://files.pythonhosted.org/packages/37/b4/52ff00b59e91c4817ca60210c33caf11e85a7f68f7b361748ca2eb50923e/pymacaroons-0.13.0.tar.gz" + sha256 "1e6bba42a5f66c245adf38a5a4006a99dcc06a0703786ea636098667d42903b8" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyrfc3339" do + url "https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.1.tar.gz" + sha256 "81b8cbe1519cdb79bed04910dd6fa4e181faf8c88dff1e1b987b5f7ab23a5b1a" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-debian" do + url "https://files.pythonhosted.org/packages/bf/4b/3c4cf635311b6203f17c2d693dc15e898969983dd3f729bee3c428aa60d4/python-debian-1.0.1.tar.gz" + sha256 "3ada9b83a3d671b58081782c0969cffa0102f6ce433fbbc7cf21275b8b5cc771" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "requests-unixsocket2" do + url "https://files.pythonhosted.org/packages/12/04/e5c07a329a0087f8a342231b6e054d83279c17ccc81da5aa18071c8ea75e/requests_unixsocket2-1.0.1.tar.gz" + sha256 "87953038ae42befb6efbdf504d6dda2554a0b0d13b65e42f7319793b5527a303" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "snap-helpers" do + url "https://files.pythonhosted.org/packages/50/2a/221ab0a9c0200065bdd8a5d2b131997e3e19ce81832fdf8138a7f5247216/snap-helpers-0.4.2.tar.gz" + sha256 "ef3b8621e331bb71afe27e54ef742a7dd2edd9e8026afac285beb42109c8b9a9" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wadllib" do + url "https://files.pythonhosted.org/packages/da/54/82866d8c2bf602ed9df52c8f8b7a45e94f8c2441b3d1e9e46d34f0e3270f/wadllib-2.0.0.tar.gz" + sha256 "1edbaf23e4fa34fea70c9b380baa2a139b1086ae489ebcccc4b3b65fc9737427" + end + + resource "ws4py" do + url "https://files.pythonhosted.org/packages/cb/55/dd8a5e1f975d1549494fe8692fc272602f17e475fe70de910cdd53aec902/ws4py-0.6.0.tar.gz" + sha256 "9f87b19b773f0a0744a38f3afa36a803286dd3197f0bb35d9b75293ec7002d19" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV["SODIUM_INSTALL"] = "system" + ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CHARMCRAFT"] = version + virtualenv_install_with_resources + end + + test do + system bin/"charmcraft", "version" + system bin/"charmcraft", "help" + system bin/"charmcraft", "init", "--author", "Foo Bar", "-p", testpath/"charm" + assert_path_exists testpath/"charm/charmcraft.yaml" + end +end diff --git a/Formula/c/chars.rb b/Formula/c/chars.rb new file mode 100644 index 0000000000000..1871ffa3fecd9 --- /dev/null +++ b/Formula/c/chars.rb @@ -0,0 +1,38 @@ +class Chars < Formula + desc "Command-line tool to display information about unicode characters" + homepage "https://github.com/boinkor-net/chars/" + url "https://github.com/boinkor-net/chars/archive/refs/tags/v0.7.0.tar.gz" + sha256 "2f79843a3b1173870b41ebce491a54812b13a44090d0ae30a6f572caa91f0736" + license "MIT" + head "https://github.com/boinkor-net/chars.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2f8ce443f25310a09c925063e8900fa1385d6bc02501595f7b47d92d813a7031" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "217f90ce26ac0d657e7ff5fc13bb07fa945453e9877adbf436af02380e65c8a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d2b320036c7ea379db3cee9a29ed6b5c55441c7ad984c14d7942d4949069e2b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec2d1f5493c3b1f8a47bda9daf15bef446399aebac55becc11a01248248b9f4f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ba84b41f4ab585ec74835948f68e71c3588745dd6f8a748484a7a76e6ae45272" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1a6953f523530f24505bd9d08be048287eba3f2caf1e766fdab8d7bda2891d30" + sha256 cellar: :any_skip_relocation, sonoma: "239b19d1fd2b822b711d04eb752572145d1d4c310b4235ac4d18ba9de08af71f" + sha256 cellar: :any_skip_relocation, ventura: "68c80f7eecac24a7730af591f936abe6e7d5c4189710c9da22afe81e967f4b98" + sha256 cellar: :any_skip_relocation, monterey: "65532ff891fc1197305aee0b466e0bd7fdeec5f5aec9c6559449e7255949c12a" + sha256 cellar: :any_skip_relocation, big_sur: "eedb2d02f6e1f3889cb6db4d5769b99b7be2bd7441872b7c6e9861c2582a482e" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f63205aa2f88bd033b5cf88619caf0d457c4dff156eae6ee5ac433775dbc1bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef3b72700c113acb7f3fbf7b977d2e2b16906384325d0f606ada0929c2eab9a9" + end + + depends_on "rust" => :build + + def install + cd "chars" do + system "cargo", "install", *std_cargo_args + end + end + + test do + output = shell_output "#{bin}/chars 1C" + assert_match "Control character", output + assert_match "FS", output + assert_match "File Separator", output + end +end diff --git a/Formula/c/chart-releaser.rb b/Formula/c/chart-releaser.rb new file mode 100644 index 0000000000000..3ff239fe723b4 --- /dev/null +++ b/Formula/c/chart-releaser.rb @@ -0,0 +1,40 @@ +class ChartReleaser < Formula + desc "Hosting Helm Charts via GitHub Pages and Releases" + homepage "https://github.com/helm/chart-releaser/" + url "https://github.com/helm/chart-releaser/archive/refs/tags/v1.8.1.tar.gz" + sha256 "288fd5a6c6b761312103f499a0e6a797f5ca11ae903f5ab88a6557712b962715" + license "Apache-2.0" + head "https://github.com/helm/chart-releaser.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "27092d541b6e311d481975577cd01d6e509d7dbc7f3ddfaa0d79a4e0403a9669" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac48c960c540e8c832e43cc300ba9f111ef826b42d4b3ebbaff903935a0ff148" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abeb352ebc9327bebb195149adaaf36e73a54a4a4e22ea943484d57d7791206f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "95bdc0d6c088802e3c2ee6d70494f72204bcd2f569fad4a31cf132e5340f120b" + sha256 cellar: :any_skip_relocation, sonoma: "ddc5b4d029ee37526c683ec7a4256dfc3341a4b8d875a5b3eae9d203b94c74c2" + sha256 cellar: :any_skip_relocation, ventura: "d62fedebe1170d0a230308039b7e13d2bf9843ef03956e9f65b4872041ee3843" + sha256 cellar: :any_skip_relocation, arm64_linux: "794471d16801611983bb9aeed61f96500f7f985c9eaa12d8d9a419fff04f2ffa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c54dcb307cf826eb4cca3dacac438de2f0110d4b84d4dfe36b39146c633229e5" + end + + depends_on "go" => :build + depends_on "helm" => :test + + def install + ldflags = %W[ + -s -w + -X github.com/helm/chart-releaser/cr/cmd.Version=#{version} + -X github.com/helm/chart-releaser/cr/cmd.GitCommit=#{tap.user} + -X github.com/helm/chart-releaser/cr/cmd.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"cr"), "./cr" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cr version") + + system "helm", "create", "testchart" + system bin/"cr", "package", "--package-path", testpath/"packages", testpath/"testchart" + assert_path_exists testpath/"packages/testchart-0.1.0.tgz" + end +end diff --git a/Formula/c/chart-testing.rb b/Formula/c/chart-testing.rb new file mode 100644 index 0000000000000..b94bbd055cb32 --- /dev/null +++ b/Formula/c/chart-testing.rb @@ -0,0 +1,49 @@ +class ChartTesting < Formula + desc "Testing and linting Helm charts" + homepage "https://github.com/helm/chart-testing" + url "https://github.com/helm/chart-testing.git", + tag: "v3.14.0", + revision: "2651b49048950c5473b1f533c900d17614bc6aa0" + license "Apache-2.0" + head "https://github.com/helm/chart-testing.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1df796ab13d24fd7f6a786393a10807fd0e783d4b47ab4a4e9de1c11ded7245" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c1df796ab13d24fd7f6a786393a10807fd0e783d4b47ab4a4e9de1c11ded7245" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1df796ab13d24fd7f6a786393a10807fd0e783d4b47ab4a4e9de1c11ded7245" + sha256 cellar: :any_skip_relocation, sonoma: "83e6618ea266830c8b9968f7e6b6ac17ee3490210627753528cc46389aa2a4a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "92c94595c95d8aa4d96cfce81c4baa6d018e3a6ffba221de525cdd31d1b43f3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebc6e33ee4183e77342abc7a8ce58eb172d8ca344f12c833adef315f01b5fcad" + end + + depends_on "go" => :build + depends_on "helm" => :test + depends_on "yamllint" => :test + depends_on "yamale" + + conflicts_with "coreos-ct", because: "both install `ct` binaries" + + def install + # Fix default search path for configuration files, needed for ARM + inreplace "pkg/config/config.go", "/usr/local/etc", etc + ldflags = %W[ + -s -w + -X github.com/helm/chart-testing/v#{version.major}/ct/cmd.Version=#{version} + -X github.com/helm/chart-testing/v#{version.major}/ct/cmd.GitCommit=#{Utils.git_head} + -X github.com/helm/chart-testing/v#{version.major}/ct/cmd.BuildDate=#{time.strftime("%F")} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"ct"), "./ct" + etc.install "etc" => "ct" + end + + test do + assert_match "Lint and test", shell_output("#{bin}/ct --help") + assert_match(/Version:\s+#{version}/, shell_output("#{bin}/ct version")) + + # Lint an empty Helm chart that we create with `helm create` + system "helm", "create", "testchart" + output = shell_output("#{bin}/ct lint --charts ./testchart --validate-chart-schema=false " \ + "--validate-maintainers=false").lines.last.chomp + assert_match "All charts linted successfully", output + end +end diff --git a/Formula/c/chatblade.rb b/Formula/c/chatblade.rb new file mode 100644 index 0000000000000..6c2ee9bc41e49 --- /dev/null +++ b/Formula/c/chatblade.rb @@ -0,0 +1,156 @@ +class Chatblade < Formula + include Language::Python::Virtualenv + + desc "CLI Swiss Army Knife for ChatGPT" + homepage "https://github.com/npiv/chatblade" + url "https://files.pythonhosted.org/packages/ff/02/e7dfd50d98139472851d03d793c39aebe1364a960648312d252137b0ec25/chatblade-0.7.0.tar.gz" + sha256 "bfa5f96aa02b869df76e6f0910b0c2528c44de7b2f95ae08de7d192cb30c7892" + license "GPL-3.0-only" + revision 3 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "1afc59e5fc46ba955998dd61ab88dafde251a504d0934e4a19c971c0614ea6a9" + sha256 cellar: :any, arm64_sequoia: "8b77b289ac5e7895308d2a5f6f61355a47dfc7b18eaf8ffaf008ae20733adb4e" + sha256 cellar: :any, arm64_sonoma: "77bc45bb28c79bf0ab23bf0807e34b9ae7de980bd381eab523ec585598f87c69" + sha256 cellar: :any, sonoma: "a3d0005e0ed04bdbe4b9d77d1d95afe01a42d09ab75c6d8772844bab32e68f2d" + sha256 cellar: :any_skip_relocation, arm64_linux: "36dae3baa8cb3c7d320400f2d860b7e6b98ff0ca8b2a0a3d6e168563d7c4ea06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d42a6723ec44d54885f0d9bca1e4be66a4d25d42ddeba4f3008e5c8f8fb943dd" + end + + depends_on "rust" => :build # for tiktoken + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.13" # Pydantic v1 is incompatible with Python 3.14, issue ref: https://github.com/npiv/chatblade/issues/103 + + pypi_packages exclude_packages: %w[certifi pydantic-core] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/ae/79/f7b778570826fbdc091eac48c4de43304bb605a0045a0b36bb092963546e/openai-1.35.15.tar.gz" + sha256 "307007e2036d57115612c1ecb50e9bc98fcc93537109a9f9efa1b4eedb2ea968" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/f5/52/0763d1d976d5c262df53ddda8d8d4719eedf9594d046f117c25a27261a19/platformdirs-4.2.2.tar.gz" + sha256 "38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pylatexenc" do + url "https://files.pythonhosted.org/packages/5d/ab/34ec41718af73c00119d0351b7a2531d2ebddb51833a36448fc7b862be60/pylatexenc-2.10.tar.gz" + sha256 "3dd8fd84eb46dc30bee1e23eaab8d8fb5a7f507347b23e5f38ad9675c84f40d3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/b3/01/c954e134dc440ab5f96952fe52b4fdc64225530320a910473c1fe270d9aa/rich-13.7.1.tar.gz" + sha256 "9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tiktoken" do + url "https://files.pythonhosted.org/packages/37/02/576ff3a6639e755c4f70997b2d315f56d6d71e0d046f4fb64cb81a3fb099/tiktoken-0.8.0.tar.gz" + sha256 "9ccbb2740f24542534369c5635cfd9b2b3c2490754a78ac8831d99f89f94eeb2" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "gpt-3.5-turbo", shell_output("#{bin}/chatblade -t count tokens") + end +end diff --git a/Formula/c/chawan.rb b/Formula/c/chawan.rb new file mode 100644 index 0000000000000..23471a065e5ec --- /dev/null +++ b/Formula/c/chawan.rb @@ -0,0 +1,39 @@ +class Chawan < Formula + desc "TUI web browser with CSS, inline image and JavaScript support" + homepage "https://sr.ht/~bptato/chawan/" + url "https://git.sr.ht/~bptato/chawan/archive/v0.2.2.tar.gz" + sha256 "30b4108247244f6b0721d44f84ba90cebf8ce5892ed9502d7e7c3fed92f65489" + license "Unlicense" + head "https://git.sr.ht/~bptato/chawan", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7a73b25243813225cdf93d521d5e287ed8bfc47bb8d637f049c399192dd59562" + sha256 cellar: :any, arm64_sequoia: "b9be1da4b16cde2ad0788b0e0bf4ba6bd49129abff764b306be0cfe945de0fa5" + sha256 cellar: :any, arm64_sonoma: "bf1828157ded27c5ab4b92b37cdc856f3423c935effb72ac4e935f0d3e7a00d8" + sha256 cellar: :any, arm64_ventura: "c5390f8597c1de9aa5ebd4883878dd0472b1f051e1a917c5098878fc3e411c20" + sha256 cellar: :any, sonoma: "d7ca58a40cac91a237133c3a60e909e23e2cc2eca528eef93ed214df0b061cd7" + sha256 cellar: :any, ventura: "2d1ba741fd41220c65b43c3f5c885fb18731aff4ccaead85032241e926a783b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f5c33dd69d3e449674adddb59224ebfcada16aaca4c8b02fa6ce77198e420b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28de6c68815eced2c3d09e239e8ef11d8e0ea36a23385752a9067b8da71738d3" + end + + depends_on "nim" => :build + depends_on "pkgconf" => :build + + depends_on "brotli" + depends_on "libssh2" + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "ncurses" + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cha --version") + assert_match "Example Domain", shell_output("#{bin}/cha --dump https://example.com") + end +end diff --git a/Formula/c/chdig.rb b/Formula/c/chdig.rb new file mode 100644 index 0000000000000..565390c467f01 --- /dev/null +++ b/Formula/c/chdig.rb @@ -0,0 +1,35 @@ +class Chdig < Formula + desc "Dig into ClickHouse with TUI interface" + homepage "https://github.com/azat/chdig" + url "https://github.com/azat/chdig/archive/refs/tags/v25.10.1.tar.gz" + sha256 "bb6b3e9dc8a25a9b99ca0fa5419982139b3515ede61092591afccb76fb8b773c" + license "MIT" + head "https://github.com/azat/chdig.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c9731d8efb07fc6d06bc5b259da60ea94d44292a360a48ac4d601baf0d2cd1a3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3856626060f6c5587a8e459e5a9289c067d3fb1bff87690f9880b8c7cee3a06b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f446ed4cb5826e166aae1ca595d0f892622def2024dbea9b762323867970468" + sha256 cellar: :any_skip_relocation, sonoma: "d2e48785e9af0fd527e23e30b86454407d3ab563e30e008b37b90cd39f213b38" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ebbcddd73ee1867ea42961109c6fc988f62890f5460c609af35bfcf8f917c18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17fad0142bad85ed4a58f4b474f8d8ab2432f24aeb62cef027ae632d802ff391" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"chdig", "--completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/chdig --version") + + # failed with Linux CI, `No such device or address (os error 6)` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + output = shell_output("#{bin}/chdig --url 255.255.255.255 dictionaries 2>&1", 1) + assert_match "Error: Cannot connect to ClickHouse", output + end +end diff --git a/Formula/c/cheapglk.rb b/Formula/c/cheapglk.rb new file mode 100644 index 0000000000000..cde15ed4facca --- /dev/null +++ b/Formula/c/cheapglk.rb @@ -0,0 +1,58 @@ +class Cheapglk < Formula + desc "Extremely minimal Glk library" + homepage "https://www.eblong.com/zarf/glk/" + url "https://www.eblong.com/zarf/glk/cheapglk-107.tar.gz" + version "1.0.7" + sha256 "87b9a19d741c71a8d3bffbb0fd7833410672006d3815717c70860e1681043d4c" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?cheapglk[._-]v?(?:\d+(?:\.\d+)*)\.t[^>]+?>\s*?CheapGlk library v?(\d+(?:\.\d+)+)/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "22ed56d38b62431e69151ad10604e0e8831a5f4b88d2f0d7105bb71d00708cf3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5600c759374d421d057d4901d84f12c4a0526ef88c23d6d838b699eb409a6c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "796c71e7b1eb29c4bbf1702e4a10d2f8ec25dd66d987ad7a570a8cfb1841db06" + sha256 cellar: :any_skip_relocation, arm64_ventura: "baf814604181f0dcaf9105bd843e5dc6583bd13f1a4cefe21145d8c98218dff2" + sha256 cellar: :any_skip_relocation, sonoma: "5a18e98d351775e2419fa5a15484bdcadad75fc7861518fd4069900c14117b8d" + sha256 cellar: :any_skip_relocation, ventura: "fe810d9b9aa201d3a740860c1433858f84965b6ce5ac5ca9b448c4f982e1d382" + sha256 cellar: :any_skip_relocation, arm64_linux: "18c73a83fb777146fd406d1f6da79a8cf3eb530d271eecd761e0c881233cefde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70161bfc4d712eed8c06bc1542de58ac63726e196b5a2cf22ea449f8a627e089" + end + + keg_only "it conflicts with other Glk libraries" + + def install + system "make" + + lib.install "libcheapglk.a" + include.install "glk.h", "glkstart.h", "gi_blorb.h", "gi_dispa.h", "Make.cheapglk" + end + + test do + (testpath/"test.c").write <<~C + #include "glk.h" + #include "glkstart.h" + + glkunix_argumentlist_t glkunix_arguments[] = { + { NULL, glkunix_arg_End, NULL } + }; + + int glkunix_startup_code(glkunix_startup_t *data) + { + return TRUE; + } + + void glk_main() + { + glk_exit(); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcheapglk", "-o", "test" + assert_match version.to_s, pipe_output("./test", "echo test", 0) + end +end diff --git a/Formula/c/cheat.rb b/Formula/c/cheat.rb new file mode 100644 index 0000000000000..a843cd1547aaf --- /dev/null +++ b/Formula/c/cheat.rb @@ -0,0 +1,40 @@ +class Cheat < Formula + desc "Create and view interactive cheat sheets for *nix commands" + homepage "https://github.com/cheat/cheat" + url "https://github.com/cheat/cheat/archive/refs/tags/4.4.2.tar.gz" + sha256 "6968ffdebb7c2a8390dea45f97884af3c623cda6c2d36c4c04443ed2454da431" + license "MIT" + head "https://github.com/cheat/cheat.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e9bdff27a92bab0dd90d21017d8e6ca8c4f09fd9d027b581775d5e091a8f861f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "892bbbee98b8e75d5368a898b7f5c3a2968f5f85a7792a4cfbe7d47ba48b811b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "892bbbee98b8e75d5368a898b7f5c3a2968f5f85a7792a4cfbe7d47ba48b811b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "892bbbee98b8e75d5368a898b7f5c3a2968f5f85a7792a4cfbe7d47ba48b811b" + sha256 cellar: :any_skip_relocation, sonoma: "4ce8ddab97ab046dbed22b3a584a66bf97e55246c51e1324d18c6959d32170a9" + sha256 cellar: :any_skip_relocation, ventura: "4ce8ddab97ab046dbed22b3a584a66bf97e55246c51e1324d18c6959d32170a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "de9fb22d8e57c93c2b3d7209f8200d7db98507bb160db8f7285e3be0cd7b061e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "056c862aa6f3f46ba541558de9ae41a0e0c81424934830c0f1e12b4530d2692b" + end + + depends_on "go" => :build + + conflicts_with "bash-snippets", because: "both install a `cheat` executable" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cheat" + + bash_completion.install "scripts/cheat.bash" => "cheat" + fish_completion.install "scripts/cheat.fish" + zsh_completion.install "scripts/cheat.zsh" => "_cheat" + man1.install "doc/cheat.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cheat --version") + + output = shell_output("#{bin}/cheat --init 2>&1") + assert_match "editor: EDITOR_PATH", output + end +end diff --git a/Formula/c/check-jsonschema.rb b/Formula/c/check-jsonschema.rb new file mode 100644 index 0000000000000..b79aaec8df475 --- /dev/null +++ b/Formula/c/check-jsonschema.rb @@ -0,0 +1,167 @@ +class CheckJsonschema < Formula + include Language::Python::Virtualenv + + desc "JSON Schema CLI" + homepage "https://github.com/python-jsonschema/check-jsonschema" + url "https://files.pythonhosted.org/packages/c3/fd/c2bd16532a2e5ad3318d62b0295ca9274ac3e09f795d6e2adff1174663c0/check_jsonschema-0.34.1.tar.gz" + sha256 "024ca6b1d645fdc33025f915ea4aa72a84df002b12209ee172a7bfd089f34832" + license "Apache-2.0" + head "https://github.com/python-jsonschema/check-jsonschema.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e6d684c8b0b6f7e8ed7dc387ebbe20a3fd4510389f1ab8b1febd3d26964a5047" + sha256 cellar: :any, arm64_sequoia: "1a7d9a4b0dad774dfbb427f05c0a742e71069719e6f31669fa9a9b465eef4720" + sha256 cellar: :any, arm64_sonoma: "711eaf7a5b78dde776221204e5f63e27b41e1ec6b0bdce562e4a4ba7dcca8711" + sha256 cellar: :any, sonoma: "ed7004c5a86535508efb36d1c5a42f63cdf15fdb4606b278b110f46481f7af3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1a7ca3afedc443404df79093223b013b267e54f611ff59f60baf431269ae865" + sha256 cellar: :any_skip_relocation, x86_64_linux: "964272ef42f5e5ed81ca6560d6999960ec69f8c6e191e821742331103b87928c" + end + + depends_on "rust" => :build # for regress + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "rpds-py"], + extra_packages: %w[fqdn isoduration jsonpointer rfc3339-validator rfc3987 uri-template + webcolors] + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "isoduration" do + url "https://files.pythonhosted.org/packages/7c/1a/3c8edc664e06e6bd06cce40c6b22da5f1429aa4224d0c590f3be21c91ead/isoduration-20.11.0.tar.gz" + sha256 "ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regress" do + url "https://files.pythonhosted.org/packages/02/bf/faa406189856f9b566fa1c42d173188d3e86cd5116484a663922365e0004/regress-2025.10.1.tar.gz" + sha256 "dcc0a8af0cdbc3d6e0d4725f113335d0a5ffbba86ae3ca18d2b5b352c5f2c8ed" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rfc3339-validator" do + url "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" + sha256 "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + end + + resource "rfc3987" do + url "https://files.pythonhosted.org/packages/14/bb/f1395c4b62f251a1cb503ff884500ebd248eed593f41b469f89caa3547bd/rfc3987-1.3.8.tar.gz" + sha256 "d3c4d257a560d544e9826b38bc81db676890c79ab9d7ac92b39c7a253d5ca733" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "uri-template" do + url "https://files.pythonhosted.org/packages/31/c7/0336f2bd0bcbada6ccef7aaa25e443c118a704f828a0620c6fa0207c1b64/uri-template-1.3.0.tar.gz" + sha256 "0e00f8eb65e18c7de20d595a14336e9f337ead580c70934141624b6d1ffdacc7" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "webcolors" do + url "https://files.pythonhosted.org/packages/7b/29/061ec845fb58521848f3739e466efd8250b4b7b98c1b6c5bf4d40b419b7e/webcolors-24.11.1.tar.gz" + sha256 "ecb3d768f32202af770477b8b65f318fa4f566c22948673a977b00d589dd80f6" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"check-jsonschema", shell_parameter_format: :click) + end + + test do + (testpath/"test.json").write <<~JSON + { + "name" : "Eggs", + "price" : 34.99 + } + JSON + + (testpath/"test.schema").write <<~JSON + { + "type": "object", + "properties": { + "price": {"type": "number"}, + "name": {"type": "string"} + } + } + JSON + + out = shell_output("#{bin}/check-jsonschema --schemafile #{testpath}/test.schema #{testpath}/test.json") + assert_match "ok -- validation done", out + end +end diff --git a/Formula/c/check.rb b/Formula/c/check.rb new file mode 100644 index 0000000000000..1cc9a3358b3c3 --- /dev/null +++ b/Formula/c/check.rb @@ -0,0 +1,47 @@ +class Check < Formula + desc "C unit testing framework" + homepage "https://libcheck.github.io/check/" + url "https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz" + sha256 "a8de4e0bacfb4d76dd1c618ded263523b53b85d92a146d8835eb1a52932fa20a" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ce6a229334822ebeb404ea91776ddb2727e76754724dbc6b7dae91cc274748cd" + sha256 cellar: :any, arm64_sequoia: "11f6f6c67483ebc4a230480a1b068882a8476afc52517d2d68de0ecc24ea305b" + sha256 cellar: :any, arm64_sonoma: "62db788052873713c484655c217bb221f71c794df5df63b7a68083df8805f598" + sha256 cellar: :any, arm64_ventura: "15a4e3c82d688948f0adc02dc5998f1abd24855aa16a4d0b673f46bc46bdcb0a" + sha256 cellar: :any, arm64_monterey: "81a1070f08dca8980cc77fc26b7938410cd1d1317e54cec0612763fe6920f5ab" + sha256 cellar: :any, arm64_big_sur: "ca05134bbcea8deffd6eabf0c11bed130f3b3bd4d9c917da88cc591220c469c8" + sha256 cellar: :any, sonoma: "2a257d478a28129338329e653fd58134afb39e0d863096e0d5a15ee155b0eeef" + sha256 cellar: :any, ventura: "ce18575f3c364179df6701ae91c328d1c2c50a68d700596f867e5bbc1e1b1eca" + sha256 cellar: :any, monterey: "2b5cbf39a06e76028c9c1bbffa68021bce7b25f58df0c8715155190b35e78867" + sha256 cellar: :any, big_sur: "98151987096a97d4b1ffeada7645c42ea6784d01149455d4a26800b27ad3b8d7" + sha256 cellar: :any, catalina: "83176da74de92f8ae589d98726f97466f7ccfa91e2b0b58603c4f909d8ce50a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2fcfa1c29e058586a152276fb76da860bcae0f064cbe67fe9c9fca46928affb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8c8c28c6d8e01000caec0a7705ee896a15be80f27ce3297fe7e2733fb58f6c5" + end + + on_linux do + depends_on "gawk" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.tc").write <<~EOS + #test test1 + ck_assert_msg(1, "This should always pass"); + EOS + + system "#{bin/"checkmk"} test.tc > test.c" + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcheck", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/check_postgres.rb b/Formula/c/check_postgres.rb new file mode 100644 index 0000000000000..0000f2b9a33c0 --- /dev/null +++ b/Formula/c/check_postgres.rb @@ -0,0 +1,53 @@ +class CheckPostgres < Formula + desc "Monitor Postgres databases" + homepage "https://bucardo.org/wiki/Check_postgres" + url "https://bucardo.org/downloads/check_postgres-2.26.0.tar.gz" + sha256 "a3b135c1a205179410ee7b694e528704ebc12358781c98d3763d835872366995" + license "BSD-2-Clause" + head "https://github.com/bucardo/check_postgres.git", branch: "master" + + livecheck do + url "https://bucardo.org/check_postgres/" + regex(/latest version.*?v?(\d+(?:\.\d+)+)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20317c9b4534bb9bb63f3318637c8d3b65162a78c7201f9f24d3e5f62efe178e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "357245d50daeb670b0e7acdf6ba808e045a3246a6a1666cded448100b78ffda5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8138d47d70f097677e5f9ae0d88e797e66395026b1d0615781492cb28294b96d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af79787c77281d36ab2852d98a020ed94c4360e494ad58ac8fff38852c0f9cab" + sha256 cellar: :any_skip_relocation, arm64_monterey: "af79787c77281d36ab2852d98a020ed94c4360e494ad58ac8fff38852c0f9cab" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b229c41507d787d0783e608304dedc416e9a5b7b343fd2cce91a12c9aa92d4b4" + sha256 cellar: :any_skip_relocation, sonoma: "599f04f4bd0fe98038e513c562f2ca8a0cb5fbaee326b2a78ac3e1c38fcaa7e3" + sha256 cellar: :any_skip_relocation, ventura: "f4023f4278d08648ad51b4c531a72e961e648736578efb14e6d44296af328496" + sha256 cellar: :any_skip_relocation, monterey: "f4023f4278d08648ad51b4c531a72e961e648736578efb14e6d44296af328496" + sha256 cellar: :any_skip_relocation, big_sur: "b37868aa190bf21cf2272f588d4e815b0621c873d824e1a13ab15bea6ceb2d4e" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f1875eadbc232cfbc4e6a861d84981b2535167f18cdce21c64c5bdb6cda6550" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15350f09487ed7fd501105b3abd217be8287cfdb4075b71673e179b1ba24cacc" + end + + depends_on "libpq" + uses_from_macos "perl" + + def install + system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}", "INSTALLSITEMAN1DIR=#{man1}" + system "make", "install" + + mkdir_p libexec/"bin" + mv bin/"check_postgres.pl", libexec/"bin/check_postgres.pl" + inreplace [libexec/"bin/check_postgres.pl", man1/"check_postgres.1p"], "check_postgres.pl", "check_postgres" + + (bin/"check_postgres").write_env_script libexec/"bin/check_postgres.pl", PATH: "#{Formula["libpq"].opt_bin}:$PATH" + + rm_r(prefix/"lib") + end + + test do + # This test verifies that check_postgres fails correctly, assuming + # that no server is running at that port. + output = shell_output("#{bin}/check_postgres --action=connection --port=65432", 2) + assert_match "POSTGRES_CONNECTION CRITICAL", output + end +end diff --git a/Formula/c/checkbashisms.rb b/Formula/c/checkbashisms.rb new file mode 100644 index 0000000000000..78073f9d31f01 --- /dev/null +++ b/Formula/c/checkbashisms.rb @@ -0,0 +1,40 @@ +class Checkbashisms < Formula + desc "Checks for bashisms in shell scripts" + homepage "https://launchpad.net/ubuntu/+source/devscripts/" + url "https://deb.debian.org/debian/pool/main/d/devscripts/devscripts_2.25.23.tar.xz" + sha256 "56d85897ce80e35fad4b13795e70fdcf809cbf2a435e19fa9a820839ededd9bc" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/d/devscripts/" + regex(/href=.*?devscripts[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "3fc2ab2221668cc4b9c4bc71070a3842958544b1dded16eda5bc000ed6bd0374" + end + + def install + inreplace "scripts/checkbashisms.pl" do |s| + s.gsub! "###VERSION###", version.to_s + s.gsub! "#!/usr/bin/perl", "#!/usr/bin/perl -T" + end + + bin.install "scripts/checkbashisms.pl" => "checkbashisms" + man1.install "scripts/checkbashisms.1" + end + + test do + (testpath/"test.sh").write <<~SHELL + #!/bin/sh + + if [[ "home == brew" ]]; then + echo "dog" + fi + SHELL + expected = <<~EOS + (alternative test command ([[ foo ]] should be [ foo ])): + EOS + assert_match expected, shell_output("#{bin}/checkbashisms #{testpath}/test.sh 2>&1", 1) + end +end diff --git a/Formula/c/checkdmarc.rb b/Formula/c/checkdmarc.rb new file mode 100644 index 0000000000000..22dbcc7dd0662 --- /dev/null +++ b/Formula/c/checkdmarc.rb @@ -0,0 +1,95 @@ +class Checkdmarc < Formula + include Language::Python::Virtualenv + + desc "Command-line parser for SPF and DMARC DNS records" + homepage "https://domainaware.github.io/checkdmarc/" + url "https://files.pythonhosted.org/packages/79/71/223433ae1ed258e57f58077bcd937dcf7bfee8e6208d349ac7cc33735a3c/checkdmarc-5.12.25.tar.gz" + sha256 "bad9bdcf838383598f915dcd6e20162f7c412e912163191074018defd3f11e8d" + license "Apache-2.0" + head "https://github.com/domainaware/checkdmarc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d31afc978cd562bf8ce61abf8566cef6ad311e4728aed890b89c4f5dcdee0264" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "cryptography"] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "expiringdict" do + url "https://files.pythonhosted.org/packages/fc/62/c2af4ebce24c379b949de69d49e3ba97c7e9c9775dc74d18307afa8618b7/expiringdict-1.2.2.tar.gz" + sha256 "300fb92a7e98f15b05cf9a856c1415b3bc4f2e132be07daa326da6414c23ee09" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-resources" do + url "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz" + sha256 "185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c" + end + + resource "pem" do + url "https://files.pythonhosted.org/packages/05/86/16c0b6789816f8d53f2f208b5a090c9197da8a6dae4d490554bb1bedbb09/pem-23.1.0.tar.gz" + sha256 "06503ff2441a111f853ce4e8b9eb9d5fedb488ebdbf560115d3dd53a1b4afc73" + end + + resource "publicsuffixlist" do + url "https://files.pythonhosted.org/packages/48/6a/48ca44608f4b1b975c5b7972bccf490511c126634dccc2bbc21fb8840ad5/publicsuffixlist-1.0.2.20251030.tar.gz" + sha256 "bc4429d7c6ebf35508050b5f556f1702c4778bd88c85388fb43290ab22615bdc" + end + + resource "pyleri" do + url "https://files.pythonhosted.org/packages/93/6a/4a2a8a05a4945b253d40654149056ae03b9d5747f3c1c423bb93f1e6d13f/pyleri-1.4.3.tar.gz" + sha256 "17ac2a2e934bf1d9432689d558e9787960738d64aa789bc3a6760c2823cb67d2" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "timeout-decorator" do + url "https://files.pythonhosted.org/packages/80/f8/0802dd14c58b5d3d72bb9caa4315535f58787a1dc50b81bbbcaaa15451be/timeout-decorator-0.5.0.tar.gz" + sha256 "6a2f2f58db1c5b24a2cc79de6345760377ad8bdc13813f5265f6c3e63d16b3d7" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/checkdmarc -v") + + assert_match "\"base_domain\": \"example.com\"", shell_output("#{bin}/checkdmarc example.com") + end +end diff --git a/Formula/c/checkmake.rb b/Formula/c/checkmake.rb new file mode 100644 index 0000000000000..306c7bdc399d1 --- /dev/null +++ b/Formula/c/checkmake.rb @@ -0,0 +1,57 @@ +class Checkmake < Formula + desc "Linter/analyzer for Makefiles" + homepage "https://github.com/checkmake/checkmake" + url "https://github.com/checkmake/checkmake/archive/refs/tags/0.2.2.tar.gz" + sha256 "4e5914f1ee3e5f384d605406f30799bf556a06b9785d5b0e555fd88b43daf19c" + license "MIT" + head "https://github.com/checkmake/checkmake.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e7fd519185b64fed252c60bd351ec0d1829dec01f8ba15573b0484c3446722e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c64480b72e17320c970baf104cb6c69a2c9aa54365dd66c2a0a97a9ac0a2581d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7140ec560527466720bbd18e7337f47243ce479bac151a7dea0a84f70a8fd9da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d48a73b85de9be214bafa9ab4cf9712cf1934f898d3fc7b3b6160507a788e3b7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4ddd0a9fa6c9c4e9ba3cd4b04986f6f34f55e3787bd6c6e9dde0dee30a577937" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "56a6b97b1e5c3dc5b6a589e0d52b526eb2a0529dfce6a9b8a4a85b93a9bd9da3" + sha256 cellar: :any_skip_relocation, sonoma: "ee0863d4827ecd46eed6829e6142d37abc0d918629bb3700336817cbadb3b203" + sha256 cellar: :any_skip_relocation, ventura: "836d536fe0255fc744a2fa630572e54477f8e59ab19006ddfebb09be51fd14c0" + sha256 cellar: :any_skip_relocation, monterey: "16692c95f5e36286cfeedfe914b239200d428b7ed64c1ae61c931c1568dcdbdd" + sha256 cellar: :any_skip_relocation, big_sur: "e8f88660a76082b44e64c8485238aaf46d5e18575ea11ce47c93a2466af24bcd" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f014f3713165ff2f13b59b28db7d7a7672d57b12514284477372bd097dea574" + sha256 cellar: :any_skip_relocation, x86_64_linux: "920aea0127e9224ec538e4c4f1f1e4fafec0f6e10610687e60c20d053cc02f0e" + end + + depends_on "go" => :build + depends_on "pandoc" => :build + + def install + ENV["BUILDER_NAME"] = "Homebrew" + ENV["BUILDER_EMAIL"] = "homebrew@brew.sh" + ENV["PREFIX"] = prefix + system "make" + system "make", "install" + end + + test do + sh = testpath/"Makefile" + sh.write <<~EOS + clean: + \trm bar + \trm foo + + foo: bar + \ttouch foo + + bar: + \ttouch bar + + all: foo + + test: + \t@echo test + + .PHONY: clean test + EOS + assert_match "phonydeclared", shell_output("#{bin}/checkmake #{sh}", 2) + end +end diff --git a/Formula/c/checkov.rb b/Formula/c/checkov.rb new file mode 100644 index 0000000000000..4eaf11b79c87f --- /dev/null +++ b/Formula/c/checkov.rb @@ -0,0 +1,523 @@ +class Checkov < Formula + include Language::Python::Virtualenv + + desc "Prevent cloud misconfigurations during build-time for IaC tools" + homepage "https://www.checkov.io/" + url "https://files.pythonhosted.org/packages/4b/8b/916dd7e5793a2e68aa0689ce4fe07d2de98d2e40d3a4b5f4b29b5df3c597/checkov-3.2.470.tar.gz" + sha256 "7a2630753bf0c491d75359b11c805a705a3b66b1ab44328ec196c7b252d1a5ce" + license "Apache-2.0" + + livecheck do + url "https://pypi.org/rss/project/checkov/releases.xml" + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :xml do |xml, regex| + xml.get_elements("//item/title").map { |item| item.text[regex, 1] } + end + throttle 10 + end + + bottle do + rebuild 4 + sha256 cellar: :any, arm64_tahoe: "1c5d26972a9f2555fd31f35be957e050e8b9fb5209d8349e27a3f9ce697ccfe5" + sha256 cellar: :any, arm64_sequoia: "97d1fa800d102836bf921875d1debc63d5601aaa234868849dd972ae4f2cebf5" + sha256 cellar: :any, arm64_sonoma: "1c8c7f01b5215278ad57fe0c9c73660b632ab232c959534ad9387e5f51721eee" + sha256 cellar: :any, sonoma: "0290be3fed94dd119a5bdf5e952100968d68c01c6f0c17d729c7a917a671a2e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c3e93f2adc776bd52bf5dbdb9d6091cf7bb233eed67bf213be9d36fbef668d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "175170b55014a96b089a19eaaaf448cfeeca19048ca980d865de5fc63d25ca7e" + end + + depends_on "cmake" => :build # for igraph + depends_on "rust" => :build # for orjson + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "numpy" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libffi" + + pypi_packages exclude_packages: %w[certifi numpy pydantic-core rpds-py] + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/17/0a/163e5260cecc12de6abc259d158d9da3b8ec062ab863107dcdb1166cdcef/aiodns-3.5.0.tar.gz" + sha256 "11264edbab51896ecf546c18eb0dd56dff0428c6aa6d2cd87e643e07300eb310" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiomultiprocess" do + url "https://files.pythonhosted.org/packages/02/d4/1e69e17dda5df91734b70d03dbbf9f222ddb438e1f3bf4ea8fa135ce46de/aiomultiprocess-0.9.1.tar.gz" + sha256 "f0231dbe0291e15325d7896ebeae0002d95a4f2675426ca05eb35f24c60e495b" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "asteval" do + url "https://files.pythonhosted.org/packages/b1/ba/31fb900dc07b946450f495d68d0cdeea40d9abda285bff1b9fcea09c08ac/asteval-1.0.5.tar.gz" + sha256 "bac3c8dd6d2b789e959cfec9bb296fb8338eec066feae618c462132701fbc665" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "bc-detect-secrets" do + url "https://files.pythonhosted.org/packages/7a/22/389df1a2d5f539593ce22671a401fedbc78d8054b4644dde2c2263f1f343/bc_detect_secrets-1.5.45.tar.gz" + sha256 "f05cc539d1865d6f8d65cbd51968e85ec570ee1375447a5a29a5623ca8ea9f2b" + end + + resource "bc-jsonpath-ng" do + url "https://files.pythonhosted.org/packages/3a/ad/b6745e21e050fac1ea499fdcafb689391ebf2ff01f2a96da275bb189c2ed/bc-jsonpath-ng-1.6.1.tar.gz" + sha256 "6ea4e379c4400a511d07605b8d981950292dd098a5619d143328af4e841a2320" + end + + resource "bc-python-hcl2" do + url "https://files.pythonhosted.org/packages/60/43/8ee6ea8a19952045c15e6c9b164a9f88c2575b4bb86655c6da861b874986/bc_python_hcl2-0.4.3.tar.gz" + sha256 "fae62b2a41a675ad330d134d82576526db755f72bbd0e5a850de3d85fc24c40e" + end + + resource "beartype" do + url "https://files.pythonhosted.org/packages/e8/77/af43bdf737723b28130f2cb595ec0f23e0e757d211fe068fd0ccdb77d786/beartype-0.22.4.tar.gz" + sha256 "68284c7803efd190b1b4639a0ab1a17677af9571b8a2ef5a169d10cb8955b01f" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/73/c6/a18789b17138bc4f3001bfee42c07f85b9432475f5e8188c5699d481a376/boto3-1.35.49.tar.gz" + sha256 "ddecb27f5699ca9f97711c52b6c0652c2e63bf6c2bfbc13b819b4f523b4d30ff" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/7c/9c/1df6deceee17c88f7170bad8325aa91452529d683486273928eecfd946d8/botocore-1.35.99.tar.gz" + sha256 "1eab44e969c39c5f3d9a3104a0836c24715579a455f12b3979a31d7cde51b3c3" + end + + resource "cached-property" do + url "https://files.pythonhosted.org/packages/76/4b/3d870836119dbe9a5e3c9a61af8cc1a8b69d75aea564572e385882d5aefb/cached_property-2.0.1.tar.gz" + sha256 "484d617105e3ee0e4f1f58725e72a8ef9e93deee462222dbd51cd91230897641" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/6c/81/3747dad6b14fa2cf53fcf10548cf5aea6913e96fab41a3c198676f8948a5/cachetools-5.5.2.tar.gz" + sha256 "1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-option-group" do + url "https://files.pythonhosted.org/packages/ef/ff/d291d66595b30b83d1cb9e314b2c9be7cfc7327d4a0d40a15da2416ea97b/click_option_group-0.5.9.tar.gz" + sha256 "f94ed2bc4cf69052e0f29592bd1e771a1789bd7bfc482dd0bc482134aff95823" + end + + resource "cloudsplaining" do + url "https://files.pythonhosted.org/packages/27/c3/a41d0974e00291798d3a5a18c7c0c7fd2880d8fbf69ebe115e89325bde85/cloudsplaining-0.7.0.tar.gz" + sha256 "2d8a1d1a3261368a39359bb23aa7d6ac9add274728ff24877b710cdfa96d96af" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "contextlib2" do + url "https://files.pythonhosted.org/packages/c7/13/37ea7805ae3057992e96ecb1cffa2fa35c2ef4498543b846f90dd2348d8f/contextlib2-21.6.0.tar.gz" + sha256 "ab1e2bfe1d01d968e1b7e8d9023bc51ef3509bba217bb730cee3827e1ee82869" + end + + resource "cyclonedx-python-lib" do + url "https://files.pythonhosted.org/packages/36/8f/a2de02ce7263312b51cb3946593b608ef996949295b69b31a9ed0e71ec92/cyclonedx_python_lib-7.6.2.tar.gz" + sha256 "31186c5725ac0cfcca433759a407b1424686cdc867b47cc86e6cf83691310903" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dockerfile-parse" do + url "https://files.pythonhosted.org/packages/92/df/929ee0b5d2c8bd8d713c45e71b94ab57c7e11e322130724d54f469b2cd48/dockerfile-parse-2.0.1.tar.gz" + sha256 "3184ccdc513221983e503ac00e1aa504a2aa8f84e5de673c46b0b6eee99ec7bc" + end + + resource "dpath" do + url "https://files.pythonhosted.org/packages/1f/2c/a4213cdbbc43b8fdf34b6e2afb415fd5d46e171d32a4bb92e7924548aa9f/dpath-2.1.3.tar.gz" + sha256 "d1a7a0e6427d0a4156c792c82caf1f0109603f68ace792e36ca4596fd2cb8d9d" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/72/33d1bb4be61f1327d3cd76fc41e2d001a6b748a0648d944c646643f123fe/importlib_metadata-7.2.1.tar.gz" + sha256 "509ecb2ab77071db5137c655e24ceb3eee66e7bbc6574165d0d114d9fc4bbe68" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "junit-xml" do + url "https://files.pythonhosted.org/packages/98/af/bc988c914dd1ea2bc7540ecc6a0265c2b6faccc6d9cdb82f20e2094a8229/junit-xml-1.9.tar.gz" + sha256 "de16a051990d4e25a3982b2dd9e89d671067548718866416faec14d9de56db9f" + end + + resource "lark" do + url "https://files.pythonhosted.org/packages/da/34/28fff3ab31ccff1fd4f6c7c7b0ceb2b6968d8ea4950663eadcb5720591a0/lark-1.3.1.tar.gz" + sha256 "b426a7a6d6d53189d318f2b6236ab5d6429eaf09259f1ca33eb716eed10d2905" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/97/ae/7497bc5e1c84af95e585e3f98585c9f06c627fac6340984c4243053e8f44/networkx-2.6.3.tar.gz" + sha256 "c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/c6/fe/ed708782d6709cc60eb4c2d8a361a440661f74134675c72990f2c48c785f/orjson-3.11.4.tar.gz" + sha256 "39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/8c/33/e50adf6a6cd4cde7ccd140e4538d898cea7a609f7aee5d6365e5cd44b6c8/packageurl-python-0.13.4.tar.gz" + sha256 "6eb5e995009cc73387095e0b507ab65df51357d25ddc5fce3d3545ad6dcbbee8" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "policy-sentry" do + url "https://files.pythonhosted.org/packages/a4/05/75e8953eb5fa564e45fc5afc61696d38ce779169309ca270224561926fa8/policy_sentry-0.13.2.tar.gz" + sha256 "db2b39f92989077f83fc4dd1d064e3ff20b69cfed82168ebdc060e7dce292e77" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "py-serializable" do + url "https://files.pythonhosted.org/packages/16/cf/6e482507764034d6c41423a19f33fdd59655052fdb2ca4358faa3b0bcfd1/py_serializable-1.1.2.tar.gz" + sha256 "89af30bc319047d4aa0d8708af412f6ce73835e18bacf1a080028bb9e2f42bdb" + end + + resource "pycares" do + url "https://files.pythonhosted.org/packages/8d/ad/9d1e96486d2eb5a2672c4d9a2dd372d015b8d7a332c6ac2722c4c8e6bbbf/pycares-4.11.0.tar.gz" + sha256 "c863d9003ca0ce7df26429007859afd2a621d3276ed9fef154a9123db9252557" + end + + resource "pycep-parser" do + url "https://files.pythonhosted.org/packages/a5/fa/be9c4c78d36f095ce4801021f367febe232b4f299e172bb271e4a895968e/pycep_parser-0.5.1.tar.gz" + sha256 "683bb001077c09f98408285b1b6ba10cfb3941610966c45d0638a0e1a5e1d2a4" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rdflib" do + url "https://files.pythonhosted.org/packages/18/ea/30bd9eb0d4a25dd0ab929153ed23698c907c6124389aa72eea5b7b703ab8/rdflib-7.4.0.tar.gz" + sha256 "c8ee16c31848c19c174aed96185327ea139ca3d392fac7fa882ddf5687f8f533" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rustworkx" do + url "https://files.pythonhosted.org/packages/e7/b0/66d96f02120f79eeed86b5c5be04029b6821155f31ed4907a4e9f1460671/rustworkx-0.17.1.tar.gz" + sha256 "59ea01b4e603daffa4e8827316c1641eef18ae9032f0b1b14aa0181687e3108e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/c0/0a/1cdbabf9edd0ea7747efdf6c9ab4e7061b085aa7f9bfc36bb1601563b069/s3transfer-0.10.4.tar.gz" + sha256 "29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/4e/e8/01e1b46d9e04cdaee91c9c736d9117304df53361a191144c8eccda7f0ee9/schema-0.7.5.tar.gz" + sha256 "f06717112c61895cabc4707752b88716e8420a8819d71404501e114f91043197" + end + + resource "semantic-version" do + url "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz" + sha256 "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "spdx-tools" do + url "https://files.pythonhosted.org/packages/f1/99/3470b28dc4b64fd29db3b1dcf5e84c743ec88e25ea7b214794f5930f0319/spdx-tools-0.8.3.tar.gz" + sha256 "68b8f9ce2893b5216bd90b2e63f1c821c2884e4ebc4fd295ebbf1fa8b8a94b93" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/b8/85/147a0529b4e80b6b9d021ca8db3a820fcac53ec7374b87073d004aaf444c/termcolor-2.3.0.tar.gz" + sha256 "b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "unidiff" do + url "https://files.pythonhosted.org/packages/a3/48/81be0ac96e423a877754153699731ef439fd7b80b4c8b5425c94ed079ebd/unidiff-0.7.5.tar.gz" + sha256 "2e5f0162052248946b9f0970a40e9e124236bf86c82b70821143a6fc1dea2574" + end + + resource "uritools" do + url "https://files.pythonhosted.org/packages/36/b1/e482d43db3209663b82a59e37cf31f641254180190667c6b0bf18a297de8/uritools-5.0.0.tar.gz" + sha256 "68180cad154062bd5b5d9ffcdd464f8de6934414b25462ae807b00b8df9345de" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "checkov", + shell_parameter_format: :arg) + end + + test do + (testpath/"test.tf").write <<~HCL + resource "aws_s3_bucket" "foo-bucket" { + region = "us-east-1" + bucket = "test" + acl = "public-read" + force_destroy = true + + versioning { + enabled = true + } + } + HCL + + output = shell_output("#{bin}/checkov -f #{testpath}/test.tf 2>&1") + assert_match "Passed checks: 1, Failed checks: 0, Skipped checks: 0", output + + (testpath/"test2.tf").write <<~HCL + resource "aws_s3_bucket" "foo-bucket" { + region = "us-east-1" + bucket = "test" + acl = "public-read" + force_destroy = true + + #checkov:skip=CKV_AWS_52 + #checkov:skip=CKV_AWS_20:The bucket is a public static content host + versioning { + enabled = true + } + } + HCL + output = shell_output("#{bin}/checkov -f #{testpath}/test2.tf 2>&1") + assert_match "Passed checks: 1, Failed checks: 0, Skipped checks: 0", output + end +end diff --git a/Formula/c/checkstyle.rb b/Formula/c/checkstyle.rb new file mode 100644 index 0000000000000..7031d3a7b40b1 --- /dev/null +++ b/Formula/c/checkstyle.rb @@ -0,0 +1,33 @@ +class Checkstyle < Formula + desc "Check Java source against a coding standard" + homepage "https://checkstyle.sourceforge.io/" + url "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-12.1.1/checkstyle-12.1.1-all.jar" + sha256 "28b5305b55e0102140b6367e2e27fbe483de4eeae244390b0bf8a7bb3b843878" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "9ca4c12aea8e02dbf8846259fa25367df5bf5cd6e5d97b8ba77c2e282d115dad" + end + + depends_on "openjdk" + + def install + libexec.install "checkstyle-#{version}-all.jar" + bin.write_jar_script libexec/"checkstyle-#{version}-all.jar", "checkstyle" + end + + test do + path = testpath/"foo.java" + path.write "public class Foo{ }\n" + + output = shell_output("#{bin}/checkstyle -c /sun_checks.xml #{path}", 2) + errors = output.lines.select { |line| line.start_with?("[ERROR] #{path}") } + assert_match "#{path}:1:17: '{' is not preceded with whitespace.", errors.join(" ") + assert_equal errors.size, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/c/cheops.rb b/Formula/c/cheops.rb new file mode 100644 index 0000000000000..f3dfdd976c6a2 --- /dev/null +++ b/Formula/c/cheops.rb @@ -0,0 +1,41 @@ +class Cheops < Formula + desc "CHEss OPponent Simulator" + homepage "https://logological.org/cheops" + url "https://files.nothingisreal.com/software/cheops/cheops-1.3.tar.bz2" + mirror "https://github.com/logological/cheops/releases/download/1.3/cheops-1.3.tar.bz2" + sha256 "a3ce2e94f73068159827a1ec93703b5075c7edfdf5b0c1aba4d71b3e43fe984e" + license "GPL-3.0-or-later" + + livecheck do + url "https://files.nothingisreal.com/software/cheops/" + regex(/href=.*?cheops[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e22eb2ee77f28f3738d572be8a83cee17e20ee6c0a23919defdcc601443f4e5b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a19ba4057d685a8f61ecc2d198d517ae6859cf4a0479a153f3959ef832d45e20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1de166d2e9dde915555db3c19377561aaea388583f255b84819ed8a0e0c1aeae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "665487e5600fb7c185f31a9a5dcc5a5e9e819bd13b6cfdcf4ccf613a4e6f8cb7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "da2855e699980221437085582629f794572878a32f953cdaef9e58f12a5f0cac" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cfc230c6ec9f5369e775cf965cfd15838da419a0a214d390960a249fa0e7582c" + sha256 cellar: :any_skip_relocation, sonoma: "076e721715c1e395dc11889d8bbd2a2128a36e496846de3537ed93f510f90bb1" + sha256 cellar: :any_skip_relocation, ventura: "1d04d8df7dddb24564f4ce0698f8a59ce7cd9aafcf600e27281ef65b307b42cf" + sha256 cellar: :any_skip_relocation, monterey: "56ebbbfb9dd3b62443b41aedea7561887f7b5bdd2414ea1a06ee9e344778d514" + sha256 cellar: :any_skip_relocation, big_sur: "ab84f53943ac8bae4739c5a14913ff9ecf3fec74271d20f056189d215c46e481" + sha256 cellar: :any_skip_relocation, catalina: "df2ae1cf5f9b1b9ec0dc161da4d20fe4b24a5155c87e2c2466cbc26db9fce951" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7c9ea482150858e6ca729be10c9d215d50cea55d411b237c3ebf45cf355c7f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94c3e683dcb5922d7060a9a8253825d79d5a699492770e3e59caca9674c9e09a" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"cheops", "--version" + end +end diff --git a/Formula/c/cherrytree.rb b/Formula/c/cherrytree.rb new file mode 100644 index 0000000000000..c1ba6af0e13a9 --- /dev/null +++ b/Formula/c/cherrytree.rb @@ -0,0 +1,99 @@ +class Cherrytree < Formula + desc "Hierarchical note taking application featuring rich text and syntax highlighting" + homepage "https://www.giuspen.com/cherrytree/" + url "https://www.giuspen.com/software/cherrytree_1.6.2.tar.xz" + sha256 "28c89a0b2512961e9d9393a5b8f7778f99331583c9bdbe682c4897b853727158" + license "GPL-3.0-or-later" + revision 2 + head "https://github.com/giuspen/cherrytree.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?cherrytree[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "4861f30a11171876c9d9d3dd87e287207e5051447e3a1abdb9c836ed60995bf0" + sha256 arm64_sequoia: "f32dda941721b0348f1e303072aa487f4adca0c3e57d7a03dc702d153e4d0702" + sha256 arm64_sonoma: "2abbe4d50087250e8be3bdafdbc05dad5d866aca0139571380d6655eabf2efd6" + sha256 sonoma: "a288aa9b4f8cd3642647ea1dc716176856065d8d80f6a04567125e58529cdd9b" + sha256 arm64_linux: "efdfafaecde3a64938c2c09951818891a58b8b8b2386fa0c29944e1d5dd143e0" + sha256 x86_64_linux: "e864d38a8b3d33940345256406294f96f713c28d018197700e373524ea8728f9" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "adwaita-icon-theme" + depends_on "atkmm@2.28" + depends_on "cairo" + depends_on "cairomm@1.14" + depends_on "fmt" + depends_on "fribidi" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "gspell" + depends_on "gtk+3" + depends_on "gtkmm3" + depends_on "gtksourceview4" + depends_on "libsigc++@2" + depends_on "libxml++" + depends_on "pango" + depends_on "pangomm@2.46" + depends_on "spdlog" + depends_on "sqlite" # try to change to uses_from_macos after python is not a dependency + depends_on "uchardet" + depends_on "vte3" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "at-spi2-core" + depends_on "enchant" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # (cherrytree:46081): Gtk-WARNING **: 17:33:48.386: cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + (testpath/"homebrew.ctd").write <<~XML + + + + + this is a + simple + + command line + + test + + for + + homebrew + + + print('hello world') + + + XML + + system bin/"cherrytree", testpath/"homebrew.ctd", "--export_to_txt_dir", testpath, "--export_single_file" + assert_path_exists testpath/"homebrew.ctd.txt" + assert_match "rich text", (testpath/"homebrew.ctd.txt").read + assert_match "this is a simple command line test for homebrew", (testpath/"homebrew.ctd.txt").read + assert_match "code", (testpath/"homebrew.ctd.txt").read + assert_match "print('hello world')", (testpath/"homebrew.ctd.txt").read + end +end diff --git a/Formula/c/chezmoi.rb b/Formula/c/chezmoi.rb new file mode 100644 index 0000000000000..ee8e47567ac7b --- /dev/null +++ b/Formula/c/chezmoi.rb @@ -0,0 +1,51 @@ +class Chezmoi < Formula + desc "Manage your dotfiles across multiple diverse machines, securely" + homepage "https://chezmoi.io/" + url "https://github.com/twpayne/chezmoi/releases/download/v2.67.0/chezmoi-2.67.0.tar.gz" + sha256 "2e634ed8b793f6bee75a4976c8f591d35ae8f9c3a5030065302478c39b24d5c7" + license "MIT" + head "https://github.com/twpayne/chezmoi.git", branch: "master" + + # Upstream uses GitHub releases to indicate that a version is released, + # so the `GithubLatest` strategy is necessary. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "45c487c1aff18c53d64db26665daed47cf0f9edcf3bbd060bcd3299a0a811795" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6df5a319d895cf353eba87bbb1f91ca69d0458e432a3b4e9e9390f167e5b511" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0eb5941d03f3517198f3d485433170299601b4cf30cea8ba17a07fce3dd35730" + sha256 cellar: :any_skip_relocation, sonoma: "ef41413402747b0779b480c0efb9304fe6925774238328767b33de9ade718482" + sha256 cellar: :any_skip_relocation, arm64_linux: "879102f5bf2c61a0e7ab83af5916cda592f383acec9785876d71d689e7f6a014" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39d67c93b3b11d9cad8148fca3af69c048ef6e2bc05cc074ef928ac0e46c6b1d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{File.read("COMMIT")} + -X main.date=#{time.iso8601} + -X main.builtBy=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + bash_completion.install "completions/chezmoi-completion.bash" => "chezmoi" + fish_completion.install "completions/chezmoi.fish" + zsh_completion.install "completions/chezmoi.zsh" => "_chezmoi" + end + + test do + # test version to ensure that version number is embedded in binary + assert_match(/commit [0-9a-f]{40}/, shell_output("#{bin}/chezmoi --version")) + assert_match "version v#{version}", shell_output("#{bin}/chezmoi --version") + assert_match "built by #{tap.user}", shell_output("#{bin}/chezmoi --version") + + system bin/"chezmoi", "init" + assert_path_exists testpath/".local/share/chezmoi" + end +end diff --git a/Formula/c/chezscheme.rb b/Formula/c/chezscheme.rb new file mode 100644 index 0000000000000..94fd172d065e6 --- /dev/null +++ b/Formula/c/chezscheme.rb @@ -0,0 +1,44 @@ +class Chezscheme < Formula + desc "Implementation of the Chez Scheme language" + homepage "https://cisco.github.io/ChezScheme/" + url "https://github.com/cisco/ChezScheme/releases/download/v10.3.0/csv10.3.0.tar.gz" + sha256 "d237d9874c6e8b0ccf7758daa8286a6e825528b13ce3b2bca56eb1f73cddbc2c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5fd70e9cfb444bc9a5ff5c872e7af6a625b8812455d08af0594550c890f5215d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b32cc85a153a2455e113b5542b0081abf642707131220539c02e4dba63a91d3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "36a2d7bded5e28332d54e0657a1c291cd60e5aa80bedd51ba4749197dcaddd90" + sha256 cellar: :any_skip_relocation, sonoma: "f2e2ccd0bb129de10fe9129a4b0f1eb1b2fb01a4159f9c62678c49346fe3ef93" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b5ab9ca95255ace1bab78af45b899944ee8e3c9e3750965536541acc5c5ef9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c507bb094a948903427b7a955d0f1ff52a74907b1ffaecff6af5a31686811600" + end + + depends_on "libx11" => :build + depends_on "xterm" => :build + uses_from_macos "ncurses" + + def install + inreplace "c/version.h", "/usr/X11R6", Formula["libx11"].opt_prefix + inreplace "c/expeditor.c", "/usr/X11/bin/resize", Formula["xterm"].opt_bin/"resize" + + system "./configure", + "--installprefix=#{prefix}", + "--threads", + "--installschemename=chez" + system "make" + system "make", "install" + end + + test do + (testpath/"hello.ss").write <<~SCHEME + (display "Hello, World!") (newline) + SCHEME + + expected = <<~EOS + Hello, World! + EOS + + assert_equal expected, shell_output("#{bin}/chez --script hello.ss") + end +end diff --git a/Formula/c/chibi-scheme.rb b/Formula/c/chibi-scheme.rb new file mode 100644 index 0000000000000..45a84c9628919 --- /dev/null +++ b/Formula/c/chibi-scheme.rb @@ -0,0 +1,35 @@ +class ChibiScheme < Formula + desc "Small footprint Scheme for use as a C Extension Language" + homepage "https://github.com/ashinn/chibi-scheme" + url "https://github.com/ashinn/chibi-scheme/releases/download/0.11/chibi-scheme-0.11.0.tgz" + version "0.11" + sha256 "74d4edd9a904e30da7b4defe4c0d7aac63c5254e64869935f5de86acf59db6b2" + license "BSD-3-Clause" + head "https://github.com/ashinn/chibi-scheme.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "51f839c6bfe00f60d7929f8b55aa8ce3de8b3f0b34a82a886ec782f7850e746b" + sha256 arm64_sequoia: "91aa4dee44f150abda4aed2001a7ed4a78abc923a0a550ea863b69d79d53998c" + sha256 arm64_sonoma: "3aa850015f232c2e5eb9c4622ac5ad7356ebb07ad3562db673cc02eaf15550fa" + sha256 arm64_ventura: "9bc3a2cee147f70c2370b3b2de9f081907c8a5e4399f2115eeddd76dc72dcc61" + sha256 arm64_monterey: "9e59a68ef1ebcabbf717e8b7f87e7b769f0f380ccdb64e46d4385bdccb53aec9" + sha256 sonoma: "a406562fbc9f63a108759d19021614d67153b3d2821a4141e8a3d789e9d1b349" + sha256 ventura: "a25bba1715b6a6c6005aed9b6e36ee15f61440fe46bd26a2e765060dc764cc13" + sha256 monterey: "f82edaec5b649ae9c309a3f26c54444d55a25bf24fdbfb026774c9241a978d78" + sha256 arm64_linux: "51315bc7f7e0820bae24c13d724c4a67d5240f7fa0ff60041aa9f8bf742f0760" + sha256 x86_64_linux: "395662059e73c41bc156117acff16a06d156e785d8ddd352788fd0b13df9540c" + end + + def install + ENV.deparallelize + + # "make" and "make install" must be done separately + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/chibi-scheme -mchibi -e \"(for-each write '(0 1 2 3 4 5 6 7 8 9))\"") + assert_equal "0123456789", output + end +end diff --git a/Formula/c/chicken.rb b/Formula/c/chicken.rb new file mode 100644 index 0000000000000..fa1a81cc4a75a --- /dev/null +++ b/Formula/c/chicken.rb @@ -0,0 +1,55 @@ +class Chicken < Formula + desc "Compiler for the Scheme programming language" + homepage "https://www.call-cc.org/" + url "https://code.call-cc.org/releases/5.4.0/chicken-5.4.0.tar.gz" + sha256 "3c5d4aa61c1167bf6d9bf9eaf891da7630ba9f5f3c15bf09515a7039bfcdec5f" + license "BSD-3-Clause" + head "https://code.call-cc.org/git/chicken-core.git", branch: "master" + + livecheck do + url "https://code.call-cc.org/releases/current/" + regex(/href=.*?chicken[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "1385cbc267e0063638f30daade9a4b1ddd0561c99f50f6bc0eb4c429fd8344b6" + sha256 arm64_sequoia: "3154b68c1bdb7f409b86ecdba7f00d3b0042f616dfca65b72a53aeabd51e52b3" + sha256 arm64_sonoma: "937abf3f4f1b9c2c8fe12d091fe009e47be5c293db051314f37044c6ea18e58f" + sha256 arm64_ventura: "14359300f7a220a4b7756217f35ff22dd678c36bce8f24366d2f450cee37df81" + sha256 arm64_monterey: "eeef1d3351f9ce6633fc224ad133b68af57ab1f57c224d756a877629018b3c0b" + sha256 sonoma: "4fb9fc2a51936c8219769352d50a5dc71a1a70437709a489e94125adb86c643c" + sha256 ventura: "c61f762a256633c5f9940a33d53c43204fe25e7e08283d30ed07f80b29753ea6" + sha256 monterey: "2772973cddc536ee5432553792f1bbc58812943ce2c51a0313db2dddaccae735" + sha256 arm64_linux: "1f5eb88a7eee5c47a26bd91ce9c9fd9c34a5dfcf8973f78e7294fb7897cfe07d" + sha256 x86_64_linux: "1091828584dfe4b0eaf42f4dac05b789f9933f2888cdccd56536363e3e107868" + end + + conflicts_with "mono", because: "both install `csc`, `csi` binaries" + + def install + ENV.deparallelize + + args = %W[ + PREFIX=#{prefix} + C_COMPILER=#{ENV.cc} + LIBRARIAN=ar + ARCH=#{Hardware::CPU.arch.to_s.tr("_", "-")} + LINKER_OPTIONS=-Wl,-rpath,#{rpath},-rpath,#{HOMEBREW_PREFIX}/lib + ] + + if OS.mac? + args << "POSTINSTALL_PROGRAM=install_name_tool" + args << "PLATFORM=macosx" + else + args << "PLATFORM=linux" + end + + system "make", *args + system "make", "install", *args + end + + test do + assert_equal "25", shell_output("#{bin}/csi -e '(print (* 5 5))'").strip + system bin/"csi", "-ne", "(import (chicken tcp))" + end +end diff --git a/Formula/c/chiko.rb b/Formula/c/chiko.rb new file mode 100644 index 0000000000000..a6fd22aec1ff1 --- /dev/null +++ b/Formula/c/chiko.rb @@ -0,0 +1,35 @@ +class Chiko < Formula + desc "Ultimate Beauty gRPC Client for your Terminal" + homepage "https://github.com/felangga/chiko" + url "https://github.com/felangga/chiko/archive/refs/tags/v0.1.2.tar.gz" + sha256 "3b345707bbe64ce32832de5633722128c566ae7538dc64b16bc71657d71af737" + license "MIT" + head "https://github.com/felangga/chiko.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40bd4f8fe02009f8091081b96d71671733465e89cba12f91ea4c8143e83ce464" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "40bd4f8fe02009f8091081b96d71671733465e89cba12f91ea4c8143e83ce464" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40bd4f8fe02009f8091081b96d71671733465e89cba12f91ea4c8143e83ce464" + sha256 cellar: :any_skip_relocation, sonoma: "d21b7229e25566e804edbb72c60baf9b35aae035a42ce44d6f80fdd258766340" + sha256 cellar: :any_skip_relocation, arm64_linux: "5142ae134d09ee4d591f0f7ccec829d5fd3f526bfb9d9803f975aa8ab861d002" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c6dc0a7efc00433416340ad06cd4e3b927c1937754c802b9570011e902bdd27" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/chiko" + end + + test do + ENV["TERM"] = "xterm" + require "pty" + + PTY.spawn(bin/"chiko") do |r, w, _pid| + w.write "q" + assert_match "The Ultimate Beauty GRPC Client", r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end +end diff --git a/Formula/c/chinadns-c.rb b/Formula/c/chinadns-c.rb new file mode 100644 index 0000000000000..9caa7ae6f3e73 --- /dev/null +++ b/Formula/c/chinadns-c.rb @@ -0,0 +1,41 @@ +class ChinadnsC < Formula + desc "Port of ChinaDNS to C: fix irregularities with DNS in China" + homepage "https://github.com/shadowsocks/ChinaDNS" + url "https://github.com/shadowsocks/ChinaDNS/releases/download/1.3.2/chinadns-1.3.2.tar.gz" + sha256 "abfd433e98ac0f31b8a4bd725d369795181b0b6e8d1b29142f1bb3b73bbc7230" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3ad68ee0eade8b16d3698f5f38f91dedb795c40f6776be6458feb36576fc3e48" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7f5135d04a85b3d2eb3db7d807d091f45b6c7047613d73538fe8e3fd92d2fcd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b959cce820a04d88db10395e6823303d9dba2a789215626b8eea0777f88dada1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "962e197fda53c506ca1a8a11ab883c4e7b154a12ea747219b4add76e8fc2cc0d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b400b323f97ff6d0570ed5b2ccffc2325516dea3c12d6ee18c5903ee2d607f3e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a5921a1eb32cce03417035e20ed9fc3c52569bbe3cc963f4a5d8dacd8a61bd4" + sha256 cellar: :any_skip_relocation, sonoma: "46f3927a44604a56d4263e14756379a34d06e4a5037f8e98c7cb73f2cba42f80" + sha256 cellar: :any_skip_relocation, ventura: "25c8e721baf2e9622339fd932f96af2e331aceafe6188f196536455cf4e77f20" + sha256 cellar: :any_skip_relocation, monterey: "3269038188274afa37cfbc4155f9aac9d63c5e47ac0e1cae9b10eb3e6eab63b5" + sha256 cellar: :any_skip_relocation, big_sur: "d15cde6788156aa67dffd280752d52f5aac1ef1e8f56c8e5864ce05b9c81647a" + sha256 cellar: :any_skip_relocation, catalina: "0c4820f0e5a12421b0e64c3cb993608560817a446b8747e7119838cb271b9044" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b321cf1fe2ef28e58d94d640c4e5fe6fd31b0974efec84541ccf7c431b9a48a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7158e876b817917183a78e96e891dcd9ff9cefe333d1b139c73f9209fd585b0" + end + + head do + url "https://github.com/shadowsocks/ChinaDNS.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"chinadns", "-h" + end +end diff --git a/Formula/c/chipmunk-physics.rb b/Formula/c/chipmunk-physics.rb new file mode 100644 index 0000000000000..47fc4b824e541 --- /dev/null +++ b/Formula/c/chipmunk-physics.rb @@ -0,0 +1,59 @@ +class ChipmunkPhysics < Formula + desc "2D rigid body physics library written in C" + # cannot resolve host bug report, https://github.com/slembcke/Chipmunk2D/issues/261 + homepage "https://github.com/slembcke/Chipmunk2D" + url "https://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.3.tgz" + mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/chipmunk/Chipmunk-7.0.3.tgz" + sha256 "048b0c9eff91c27bab8a54c65ad348cebd5a982ac56978e8f63667afbb63491a" + license "MIT" + head "https://github.com/slembcke/Chipmunk2D.git", branch: "master" + + livecheck do + url "https://chipmunk-physics.net/downloads.php" + regex(/>\s*Chipmunk2D\s+v?(\d+(?:\.\d+)+)\s* :build + + def install + inreplace "src/cpHastySpace.c", "#include ", "#include " if OS.linux? + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_DEMOS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + doc.install Dir["doc/*"] + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void){ + cpVect gravity = cpv(0, -100); + cpSpace *space = cpSpaceNew(); + cpSpaceSetGravity(space, gravity); + + cpSpaceFree(space); + return 0; + } + C + system ENV.cc, testpath/"test.c", "-o", testpath/"test", "-pthread", + "-I#{include}/chipmunk", "-L#{lib}", "-lchipmunk" + system "./test" + end +end diff --git a/Formula/c/chisel-tunnel.rb b/Formula/c/chisel-tunnel.rb new file mode 100644 index 0000000000000..b6891a5251f70 --- /dev/null +++ b/Formula/c/chisel-tunnel.rb @@ -0,0 +1,45 @@ +class ChiselTunnel < Formula + desc "Fast TCP/UDP tunnel over HTTP" + homepage "https://github.com/jpillora/chisel" + url "https://github.com/jpillora/chisel/archive/refs/tags/v1.11.3.tar.gz" + sha256 "818e1a3470597119e687a6657edb373a449455757ca4351dc5f3a1a89bba1513" + license "MIT" + head "https://github.com/jpillora/chisel.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b638b4ba292b0585336998be698480619bbcffed2eb44677e72818c6717f8868" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b638b4ba292b0585336998be698480619bbcffed2eb44677e72818c6717f8868" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b638b4ba292b0585336998be698480619bbcffed2eb44677e72818c6717f8868" + sha256 cellar: :any_skip_relocation, sonoma: "d3e5be84bf2849ddbf931b4142f069382fbdf7c6d567d377ac23153fcedd1a8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7e97edd404a431b1228dce95381e116f68c600d06d47ee86d3f7de42738391d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e04c08eb9c095bee99af08292b4f6a9e730441c40d7f60365f6831e384ec1dcc" + end + + depends_on "go" => :build + + conflicts_with "chisel", because: "both install `chisel` binaries" + conflicts_with "foundry", because: "both install `chisel` binaries" + + def install + ldflags = "-s -w -X github.com/jpillora/chisel/share.BuildVersion=v#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"chisel") + end + + test do + _, write = IO.pipe + server_port = free_port + + server_pid = fork do + exec "#{bin}/chisel server -p #{server_port}", out: write, err: write + end + + sleep 2 + + begin + assert_match "Connected", shell_output("curl -v 127.0.0.1:#{server_port} 2>&1") + ensure + Process.kill("TERM", server_pid) + Process.wait(server_pid) + end + end +end diff --git a/Formula/c/chisel.rb b/Formula/c/chisel.rb new file mode 100644 index 0000000000000..2e3f776eb5d44 --- /dev/null +++ b/Formula/c/chisel.rb @@ -0,0 +1,64 @@ +class Chisel < Formula + desc "Collection of LLDB commands to assist debugging iOS apps" + homepage "https://github.com/facebook/chisel" + url "https://github.com/facebook/chisel/archive/refs/tags/2.0.1.tar.gz" + sha256 "6f019d5e7ab5eb06542a9eccbbe29e7d26165d3676828a32e143575ff102d5f9" + license "MIT" + head "https://github.com/facebook/chisel.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ed2b84f0afab7caab553110d8413051300b932dc2fe782bce00381188704a5a1" + sha256 cellar: :any, arm64_sequoia: "92fa2160807b42dd0d79091402d8b8023722679230ed86dd5c2243704e7040cc" + sha256 cellar: :any, arm64_sonoma: "89a8bed56025f46a5c032e263df373455be3117b3f0dee5c3fd1acdbc01def32" + sha256 cellar: :any, arm64_ventura: "7ee4917934831d56a5925fb22554c0dd136f8553df9c92067e4564e527371e82" + sha256 cellar: :any, arm64_monterey: "1aa32fddf646ce4a2772d5e10b39fddbe54a6383299346321d5d0dd067388471" + sha256 cellar: :any, arm64_big_sur: "bd381685bf1bf3682e51c355acbca980b35659b8161f226329b3a0196aab55df" + sha256 cellar: :any, sonoma: "ebce92f9d0f82970678bc0f6c289093edda33030e98a3c14a79e40ff22cf1441" + sha256 cellar: :any, ventura: "a07aface409179d4adea4e96654390ac19f6cc2422d0fa1e87d6331f68aa7782" + sha256 cellar: :any, monterey: "712007f0f4abd29073239839bd606dba927353444cf6baf4b058aedc92c17f0c" + sha256 cellar: :any, big_sur: "bec2fe6d1e6afec5b3b1c79f5f11b9f2219ff8e22d81e1b343cf525b91ea220e" + sha256 cellar: :any, catalina: "7ef6b79ffa9641e0617b2aec1b4f3dfcea59fc4059887c0d734baa1bda20441d" + end + + depends_on xcode: :build + depends_on :macos + + conflicts_with "chisel-tunnel", because: "both install `chisel` binaries" + + def install + libexec.install Dir["*.py", "commands"] + + # == LD_DYLIB_INSTALL_NAME Explanation == + # Brew will update binaries to ensure their internal paths are usable, but + # modifying a code signed binary will invalidate the signature. To prevent + # broken signing, this build specifies the target install name up front, + # in which case brew doesn't perform its modifications. + ld_dylib_install_name = opt_prefix/"lib/Chisel.framework/Chisel" + + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "Chisel/Chisel.xcodeproj", + "-scheme", "Chisel", + "-configuration", "Release", + "-sdk", "iphonesimulator", + "LD_DYLIB_INSTALL_NAME=#{ld_dylib_install_name}", + "DSTROOT=#{prefix}", + "INSTALL_PATH=/lib", + "install" + end + + def caveats + <<~EOS + Add the following line to ~/.lldbinit to load chisel when Xcode launches: + command script import #{opt_libexec}/fbchisellldb.py + EOS + end + + test do + ENV["PYTHONPATH"] = Utils.safe_popen_read("/usr/bin/lldb", "--python-path").chomp + # This *must* be `/usr/bin/python3`. `fbchisellldb.py` does `import lldb`, + # which will segfault if imported with a Python that does not match `/usr/bin/lldb`. + system "/usr/bin/python3", libexec/"fbchisellldb.py" + end +end diff --git a/Formula/c/chkbit.rb b/Formula/c/chkbit.rb new file mode 100644 index 0000000000000..9c7d99c22e3b7 --- /dev/null +++ b/Formula/c/chkbit.rb @@ -0,0 +1,30 @@ +class Chkbit < Formula + desc "Check your files for data corruption" + homepage "https://github.com/laktak/chkbit" + url "https://github.com/laktak/chkbit/archive/refs/tags/v6.5.0.tar.gz" + sha256 "c1ec3df9885c18fbd5746ee64c371c06210908c7f6f33816f2249a09382b46e1" + license "MIT" + head "https://github.com/laktak/chkbit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ff0e2506eb1569a45176b1938513958dc811b6c2a9ef28b9133d197c2e812c0b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ff0e2506eb1569a45176b1938513958dc811b6c2a9ef28b9133d197c2e812c0b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ff0e2506eb1569a45176b1938513958dc811b6c2a9ef28b9133d197c2e812c0b" + sha256 cellar: :any_skip_relocation, sonoma: "f568b25f86e3842a96442768c476490160642cdf5673a4bbd2c11b4cc2d4a84c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f29b9baaa482b1f598348a28ba90758f34ab1ead57f7ab2d07d97ee38d3e9d56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e3b4852c4e043f8aa33e0fe5eaebab33d10761eb833d639ff8c9d1e8f9f938b" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.appVersion=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/chkbit" + end + + test do + assert_match version.to_s, shell_output("#{bin}/chkbit version").chomp + system bin/"chkbit", "init", "split", testpath + assert_path_exists testpath/".chkbit" + end +end diff --git a/Formula/c/chkrootkit.rb b/Formula/c/chkrootkit.rb new file mode 100644 index 0000000000000..361ff51e56e75 --- /dev/null +++ b/Formula/c/chkrootkit.rb @@ -0,0 +1,42 @@ +class Chkrootkit < Formula + desc "Rootkit detector" + homepage "https://www.chkrootkit.org/" + url "ftp://ftp.chkrootkit.org/pub/seg/pac/chkrootkit-0.58b.tar.gz" + mirror "https://fossies.org/linux/misc/chkrootkit-0.58b.tar.gz" + sha256 "75ed2ace81f0fa3e9c3fb64dab0e8857ed59247ea755f5898416feb2c66807b9" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?download[^>]*>chkrootkit v?(\d+(?:\.\d+)+[a-z]?)/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5d6c88090d0b0df29d22316c63db70ba590217ff88ca82e0fe9986a282503bb9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b2e02512815e0752d64b43908190240ac58c5f3895200c876b5328f78ce9345" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81fe5bf8ee342b99e6048b3908f49c0c6cb21edd0374cebf439808986106c7e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5533e32cc63a4c5de2e644afa929f5d55dc87999f6dfdab84bc5cc943a85c527" + sha256 cellar: :any_skip_relocation, sonoma: "27f7982730e34a76130cbc1d775845f17480053cd8fb46a76bf8317d36f57771" + sha256 cellar: :any_skip_relocation, ventura: "3845af7aac3b4114fbf0eac4fb38c79afc0fd2a6a3eb8063f2598cc697e79221" + sha256 cellar: :any_skip_relocation, arm64_linux: "1939dc0c9796b737d27bfdc51196fbbb0c8239e184472387bc17aa5f1fe10af5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93aec292d7e8a289ffccd9cd35591ee1ea2dd6ad8e11b3b9320171afc9710e6b" + end + + def install + ENV.deparallelize + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", + "STATIC=", "sense", "all" + + bin.install Dir[buildpath/"*"].select { |f| File.executable? f } + doc.install %w[README README.chklastlog README.chkwtmp] + end + + test do + assert_equal "chkrootkit version #{version}", + shell_output("#{bin}/chkrootkit -V 2>&1", 1).strip + end +end diff --git a/Formula/c/chmlib.rb b/Formula/c/chmlib.rb new file mode 100644 index 0000000000000..ac6bd66ee317b --- /dev/null +++ b/Formula/c/chmlib.rb @@ -0,0 +1,107 @@ +class Chmlib < Formula + desc "Library for dealing with Microsoft ITSS/CHM files" + homepage "http://www.jedrea.com/chmlib/" + url "http://www.jedrea.com/chmlib/chmlib-0.40.tar.gz" + sha256 "512148ed1ca86dea051ebcf62e6debbb00edfdd9720cde28f6ed98071d3a9617" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?chmlib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "023b19e53523d58babcd983aba314c758781ecfdcde1b76881d4b7f99503b7dc" + sha256 cellar: :any, arm64_sequoia: "035ec89221398776eb098d776c5f451a7d065e3f0ceaf665742c7c9bf9568f16" + sha256 cellar: :any, arm64_sonoma: "c102db33eb3d9dfc3f42ef40bd044a59f1d88471c8057106909311ca4285d488" + sha256 cellar: :any, arm64_ventura: "fb27ebeee48d99f6637aae0da57043863119406a49fafe09deac78badcb723f8" + sha256 cellar: :any, arm64_monterey: "23e464348836e12bf5835bfdf1acbcdcce344151d12cfa2a055d689c205b6e82" + sha256 cellar: :any, arm64_big_sur: "3ab46a541a6aeb2ac904a74fa1433e48bfca91a382e8e8b27290d0597581f520" + sha256 cellar: :any, sonoma: "a2d5310e0320a5d7bcf868c63302811c1148351cbd52c53f5d8a526542244525" + sha256 cellar: :any, ventura: "73986282be1f4d01cfdaebb1aa2b68683143a60acd35cf67235ed8d4f8f0df31" + sha256 cellar: :any, monterey: "4d4a29e60712457e4ea3838947a95959dbc0f68338514edd3817d6ee122afbf4" + sha256 cellar: :any, big_sur: "af369d3e427b36281f053f65a0d5be2a269c2a0fb80c87443baa066892d0652c" + sha256 cellar: :any, catalina: "96d7cb33260c72012f24f383054b7f2505f815f0e3e24298229b5712f8a66cfa" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc0799919a7cc91ec7505ec8e8a7290baa38342a10e4e4ca9017f417ffda95c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61a085287bba377e847d027575fd848cbadc0f6b5bd8f2efc008cc54d8f32d32" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + # Add aarch64 to 64-bit integer platform list. + # Fix implicit function declarations, for C99 compatibility: https://github.com/jedwing/CHMLib/pull/17 + patch :DATA + + def install + args = %W[ + --disable-io64 + --enable-examples + --prefix=#{prefix} + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + struct chmFile* chm = chm_open("file-that-doesnt-exist.chm"); + return chm != 0; // Fail if non-null. + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lchm", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/src/chm_lib.c b/src/chm_lib.c +index 6c6736c..06908c0 100644 +--- a/src/chm_lib.c ++++ b/src/chm_lib.c +@@ -164,7 +164,7 @@ typedef unsigned long long UInt64; + + /* x86-64 */ + /* Note that these may be appropriate for other 64-bit machines. */ +-#elif __x86_64__ || __ia64__ ++#elif __x86_64__ || __ia64__ || __aarch64__ + typedef unsigned char UChar; + typedef short Int16; + typedef unsigned short UInt16; +diff --git a/src/chm_http.c b/src/chm_http.c +index 237e85a..1df2adb 100644 +--- a/src/chm_http.c ++++ b/src/chm_http.c +@@ -43,6 +43,8 @@ + #include + #include + #include ++#include ++#include + + /* threading includes */ + #include +diff --git a/src/chm_lib.c b/src/chm_lib.c +index ffd213c..9eb9d1b 100644 +--- a/src/chm_lib.c ++++ b/src/chm_lib.c +@@ -48,6 +48,8 @@ + * * + ***************************************************************************/ + ++#define _LARGEFILE64_SOURCE /* for pread64 */ ++ + #include "chm_lib.h" + + #ifdef CHM_MT diff --git a/Formula/c/chocolate-doom.rb b/Formula/c/chocolate-doom.rb new file mode 100644 index 0000000000000..f2edaa343b816 --- /dev/null +++ b/Formula/c/chocolate-doom.rb @@ -0,0 +1,63 @@ +class ChocolateDoom < Formula + desc "Accurate source port of Doom" + homepage "https://www.chocolate-doom.org/" + url "https://github.com/chocolate-doom/chocolate-doom/archive/refs/tags/chocolate-doom-3.1.1.tar.gz" + sha256 "1edcc41254bdc194beb0d33e267fae306556c4d24110a1d3d3f865717f25da23" + license "GPL-2.0-only" + head "https://github.com/chocolate-doom/chocolate-doom.git", branch: "master" + + livecheck do + url :stable + regex(/^chocolate-doom[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c2c512540ff8466c3ce24619831d65d9890388c6489c3cfa448e688a7ca0084e" + sha256 cellar: :any, arm64_sequoia: "bec38408dc088130d0e681ec1820f8f921ecf57bcbacf74732a619036451c5eb" + sha256 cellar: :any, arm64_sonoma: "7cdb454c4ab4b9cf1efa96893ee583c91eefc069e6a0008380928e7697d715ba" + sha256 cellar: :any, arm64_ventura: "c72861921c9a3d836f81f7eb678bdf0c2e77a086734981ee14a3d53e8c41ba17" + sha256 cellar: :any, sonoma: "c46dce1d3dd20058a9a8fa66f962e7854cb11e96ebe5ddec38cbf8da6ae695d2" + sha256 cellar: :any, ventura: "bd4cf1f84d8871d1e9ab1aaa95032852d4d0e6e7abccd2f6c6c54b68e4f4c876" + sha256 cellar: :any_skip_relocation, arm64_linux: "813f46eafb096fa5742e69f32953f9ca658e696930dadb24347cb560dd9d3c11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8abf7f8788b954ce7158be70e901dbd050139aa6f76975108dc2b8a2e6877a81" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "fluid-synth" + depends_on "libpng" + depends_on "libsamplerate" + depends_on "sdl2" + depends_on "sdl2_mixer" + depends_on "sdl2_net" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install", "execgamesdir=#{bin}" + rm_r(share/"applications") + rm_r(share/"icons") + end + + def caveats + <<~EOS + Note that this formula only installs a Doom game engine, and no + actual levels. The original Doom levels are still under copyright, + so you can copy them over and play them if you already own them. + Otherwise, there are tons of free levels available online. + Try starting here: + #{homepage} + EOS + end + + test do + testdata = <<~EOS + Invalid IWAD file + EOS + (testpath/"test_invalid.wad").write testdata + + expected_output = "Wad file test_invalid.wad doesn't have IWAD or PWAD id" + assert_match expected_output, shell_output("#{bin}/chocolate-doom -nogui -iwad test_invalid.wad 2>&1", 255) + end +end diff --git a/Formula/c/choose-gui.rb b/Formula/c/choose-gui.rb new file mode 100644 index 0000000000000..b1a8e22883695 --- /dev/null +++ b/Formula/c/choose-gui.rb @@ -0,0 +1,31 @@ +class ChooseGui < Formula + desc "Fuzzy matcher that uses std{in,out} and a native GUI" + homepage "https://github.com/chipsenkbeil/choose" + url "https://github.com/chipsenkbeil/choose/archive/refs/tags/1.5.0.tar.gz" + sha256 "34dd16ac0b5e1b8b2468d677a985690e3bac01cb0c45e2eaf5d493df968cca2b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a304499bd015b6f52efa885ef54587d334935a0aac8317c71093d76047621cb6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d10306e841ecc9d2386cd713ca9174944a7fd1dfa00f27edbcdfad164abb516" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f81fb4fca698277ad669366d63027a63a071e5fdc1d94e2adf8adc21948004df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "852c47ffe1bc97a5ec0bbda87d566099d049b03c2a42c98cfa1be1daab225f83" + sha256 cellar: :any_skip_relocation, sonoma: "226d6aa34398a30e22e4e675451d96f698a39e0e316381ca95b5579f904e2d16" + sha256 cellar: :any_skip_relocation, ventura: "e4af99e87b62cf372f365988114caf338c1a66bb87a2b624aedff0b0f5dd2bd4" + end + + depends_on xcode: :build + depends_on :macos + + conflicts_with "choose-rust", because: "both install a `choose` binary" + + def install + xcodebuild "SDKROOT=", "SYMROOT=build", "clean" + xcodebuild "-arch", Hardware::CPU.arch, "SDKROOT=", "SYMROOT=build", "-configuration", "Release", "build" + bin.install "build/Release/choose" + end + + test do + system bin/"choose", "-h" + end +end diff --git a/Formula/c/choose-rust.rb b/Formula/c/choose-rust.rb new file mode 100644 index 0000000000000..12b74cb160dbe --- /dev/null +++ b/Formula/c/choose-rust.rb @@ -0,0 +1,31 @@ +class ChooseRust < Formula + desc "Human-friendly and fast alternative to cut and (sometimes) awk" + homepage "https://github.com/theryangeary/choose" + url "https://github.com/theryangeary/choose/archive/refs/tags/v1.3.7.tar.gz" + sha256 "8f51a315fbbe0688c4a2078ba8bc8446d36943b6cce6ed9bbd6a11f33bd1a134" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "29ee75f6320e3145ddb814c62a382081af35cc61dce9290994f0448b12def968" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94d22bef03f4ecbe41375afaeeb48a7e0d9cdd0c687479cdb4afc71218fe2857" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3ac961f6aaf56fd0b23dbf244cf436dde01de4d72fefe423c2e0c445cb3a38f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff8a2e46f3d9b02165fde562429102217e9cd118b741920a8a5092cfaaa24746" + sha256 cellar: :any_skip_relocation, sonoma: "2c5aff224bd3e37c218473daf84fe3050e30159dff63181ca049085f6574fff9" + sha256 cellar: :any_skip_relocation, ventura: "a7efcf3746c49ccb1df9cf23f3d7b28758b83f2438578e861242af8bb89652dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "45c43e8c557f4f2eaa9aefe2b02814db19366c069712e4d8fd102f64e0967910" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33e20443e1345bb0e001ca5b793b47d95dfacb06a14c2fd83c1778ad64c2c45f" + end + + depends_on "rust" => :build + + conflicts_with "choose-gui", because: "both install a `choose` binary" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + input = "foo, foobar,bar, baz" + assert_equal "foobar bar", pipe_output("#{bin}/choose -f ',\\s*' 1..=2", input).strip + end +end diff --git a/Formula/c/choose.rb b/Formula/c/choose.rb new file mode 100644 index 0000000000000..dee43952ea2d5 --- /dev/null +++ b/Formula/c/choose.rb @@ -0,0 +1,54 @@ +class Choose < Formula + include Language::Python::Shebang + + desc "Make choices on the command-line" + homepage "https://github.com/geier/choose" + url "https://github.com/geier/choose/archive/refs/tags/v0.1.0.tar.gz" + sha256 "d09a679920480e66bff36c76dd4d33e8ad739a53eace505d01051c114a829633" + license "MIT" + revision 4 + head "https://github.com/geier/choose.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4cd084aeff66d38306336992370937b0f8473abd64f70c8561145df065581ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3057d3a685e175581c474a109b02b02e9ebd3cf5e4ab50d0319611de5446ce18" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bded43dc4b0b911ac3259b481dfb745b08d554e293a0467b15b5bcc4e4357c57" + sha256 cellar: :any_skip_relocation, sonoma: "7a48f740c534a14757cf6f5b72b233ce9923b266557d55eb43dd31e063e171fa" + sha256 cellar: :any_skip_relocation, ventura: "5b1c0d8199073bcd41b9edffd02784c4fe752388d3c53f4a2240aef48ce0fcfe" + sha256 cellar: :any_skip_relocation, arm64_linux: "74f310201e1c96729b74ec6d9df81f518b7dfc17b8eb57cfef044ef00008f8fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4b42fd68579b38ed93b464f8e309b6642c884cae2f1281bcb576b678929945b" + end + + deprecate! date: "2024-05-19", because: :unmaintained + disable! date: "2025-05-19", because: :unmaintained + + depends_on "python@3.13" + + resource "urwid" do + url "https://files.pythonhosted.org/packages/5f/cf/2f01d2231e7fb52bd8190954b6165c89baa17e713c690bdb2dfea1dcd25d/urwid-2.2.2.tar.gz" + sha256 "5f83b241c1cbf3ec6c4b8c6b908127e0c9ad7481c5d3145639524157fc4e1744" + end + + def install + python3 = "python3.13" + ENV.prepend_create_path "PYTHONPATH", libexec/Language::Python.site_packages(python3) + + resource("urwid").stage do + system python3, "-m", "pip", "install", *std_pip_args(prefix: libexec, build_isolation: true), "." + end + + bin.install "choose" + rewrite_shebang detected_python_shebang, bin/"choose" + bin.env_script_all_files(libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"]) + end + + test do + assert_predicate bin/"choose", :executable? + + # [Errno 6] No such device or address: '/dev/tty' + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_equal "homebrew-test", pipe_output(bin/"choose", "homebrew-test\n").strip + end +end diff --git a/Formula/c/chordii.rb b/Formula/c/chordii.rb new file mode 100644 index 0000000000000..c7aac667d2ed2 --- /dev/null +++ b/Formula/c/chordii.rb @@ -0,0 +1,52 @@ +class Chordii < Formula + desc "Text file to music sheet converter" + homepage "https://www.vromans.org/johan/projects/Chordii/" + url "https://downloads.sourceforge.net/project/chordii/chordii/4.5/chordii-4.5.3b.tar.gz" + sha256 "edb19be9de456366e592a75a5ce1c0a75352a55d5b4e5f282c953c7e7f2d87b5" + license "GPL-3.0-or-later" + + livecheck do + url "https://sourceforge.net/projects/chordii/rss?path=/chordii" + regex(%r{url=.*?/chordii[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d07735a1513b3c86ea5fa4db756e4c2238c7bb4ab60bfda160e56940c5abca28" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d957516291bf50268bfc7a90bfb72ae62ae3e54e249a6156033f0938c9d4fbbf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d68e6d5490b3ee5a4f07fc445faa9716fd72ce3fbf89285d9eceb2cfa2696dcf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a978e9a6f9374a3129e063dbc1c530c3d783a59ace97773a42c25e9046d0608" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a3296c96f2502beef0d8730a8fe434f997b831737cfa352d8882b59303becc16" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "048b6fde3228875e2f6e9267c71eb6228b3b0382ce638f9b2e29199ec3cf7aa2" + sha256 cellar: :any_skip_relocation, sonoma: "108b4600c4d39a1ebffbe13cb9a0841a53cfff76de078409b8a213386611219e" + sha256 cellar: :any_skip_relocation, ventura: "533776ba55d08f2e8f35a1efe53ba52e97e1d360029f97dfb10dedc5c7920857" + sha256 cellar: :any_skip_relocation, monterey: "2b6187af85a480a5e77c8b39a539b6ecd2e2be2f66314088a97a83024f8bb584" + sha256 cellar: :any_skip_relocation, big_sur: "d7c6ea34e2f65484ebc2d74c2f658f09ef78e2893bb6ee7f7674f1c72f8d8f98" + sha256 cellar: :any_skip_relocation, catalina: "ed1f635a737973af4b9f4f784757cdf0ddbb3f946cb285917c171392a9b59d4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "03f604ff4981449be5916104ec86dc67e1c1df565f0f064b9689149f82b9b58d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8dc33f2a8fd3dda76dc87a7a919c7e590a4853a0736bc92c20d25e0d8382db6d" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"homebrew.cho").write <<~EOS + {title:Homebrew} + {subtitle:I can't write lyrics. Send help} + + [C]Thank [G]You [F]Everyone, + [C]We couldn't maintain [F]Homebrew without you, + [G]Here's an appreciative song from us to [C]you. + EOS + + system bin/"chordii", "--output=#{testpath}/homebrew.ps", "homebrew.cho" + assert_path_exists testpath/"homebrew.ps" + end +end diff --git a/Formula/c/chroma.rb b/Formula/c/chroma.rb new file mode 100644 index 0000000000000..832aeb85d9bd2 --- /dev/null +++ b/Formula/c/chroma.rb @@ -0,0 +1,32 @@ +class Chroma < Formula + desc "General purpose syntax highlighter in pure Go" + homepage "https://github.com/alecthomas/chroma" + url "https://github.com/alecthomas/chroma/archive/refs/tags/v2.20.0.tar.gz" + sha256 "63aec3843db10acb8d6455ffd768ea987e3a5687f88b61aa33e6e5003c2786ac" + license "MIT" + head "https://github.com/alecthomas/chroma.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8f46b9ff72f1b5fc85d4b08dff366ccc7619730ca277c2e6f380d63efa6f53f4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cdb12c76b2e422651a57d5825f0a932e63df62c452366ee34c6412ccd71fb7ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cdb12c76b2e422651a57d5825f0a932e63df62c452366ee34c6412ccd71fb7ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cdb12c76b2e422651a57d5825f0a932e63df62c452366ee34c6412ccd71fb7ec" + sha256 cellar: :any_skip_relocation, sonoma: "3f935044062a7903bbd3585905a8bb564844236dcd232806fdb69828b18d1df0" + sha256 cellar: :any_skip_relocation, ventura: "3f935044062a7903bbd3585905a8bb564844236dcd232806fdb69828b18d1df0" + sha256 cellar: :any_skip_relocation, arm64_linux: "66d7f12d81a4ac8193b49343b87b9b3a377c5b0d47558841afdd81b3e88075bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2601da81eafe25841d6fd42c87f7b312a29166f7ccc3dfe53d17ac73e1057bd" + end + + depends_on "go" => :build + + def install + cd "cmd/chroma" do + system "go", "build", *std_go_args(ldflags: "-s -w") + end + end + + test do + json_output = JSON.parse(shell_output("#{bin}/chroma --json #{test_fixtures("test.diff")}")) + assert_equal "GenericHeading", json_output[0]["type"] + end +end diff --git a/Formula/c/chromaprint.rb b/Formula/c/chromaprint.rb new file mode 100644 index 0000000000000..752836b9282e7 --- /dev/null +++ b/Formula/c/chromaprint.rb @@ -0,0 +1,35 @@ +class Chromaprint < Formula + desc "Core component of the AcoustID project (Audio fingerprinting)" + homepage "https://acoustid.org/chromaprint" + url "https://github.com/acoustid/chromaprint/releases/download/v1.6.0/chromaprint-1.6.0.tar.gz" + sha256 "9d33482e56a1389a37a0d6742c376139fa43e3b8a63d29003222b93db2cb40da" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4dc6986a45afaf618fee24fad316ea1380dd32ee8c682f0d6486cbe7c4178a29" + sha256 cellar: :any, arm64_sequoia: "6830a8d152f94b3e23993d6dd85e1edefc1ededcc4af3e98a089b61fe71b1342" + sha256 cellar: :any, arm64_sonoma: "ed56a1cf3fc3d3748c593fc9e38d783b8299023000d3197526443410519141b3" + sha256 cellar: :any, arm64_ventura: "55c4b88f06efd67cfe9f17948f10266ed4ce565bcfdbcb18e5610bd6f31f6978" + sha256 cellar: :any, sonoma: "4df5e7cfb646cbc99f90997aefa13232f3531739d76fa4e985cdb09addba8a30" + sha256 cellar: :any, ventura: "80d91f255c8ccc0bda1d0d60c3064ce6aa03962dcbf8bf9546b58abd3dd8d75f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f10d33931b5924245417ef9c879ce51712326b150bf839da05b1d8eb8560f9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1ca1441154c133e79dd7bc470b21978df7882ccd8949c33ff1fb0d2f38eea72" + end + + depends_on "cmake" => :build + depends_on "ffmpeg" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_TOOLS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + out = shell_output("#{bin}/fpcalc -json -format s16le -rate 44100 -channels 2 -length 10 /dev/zero") + assert_equal "AQAAO0mUaEkSRZEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", JSON.parse(out)["fingerprint"] + end +end diff --git a/Formula/c/chrome-cli.rb b/Formula/c/chrome-cli.rb new file mode 100644 index 0000000000000..d4629edec4996 --- /dev/null +++ b/Formula/c/chrome-cli.rb @@ -0,0 +1,38 @@ +class ChromeCli < Formula + desc "Control Google Chrome from the command-line" + homepage "https://github.com/prasmussen/chrome-cli" + url "https://github.com/prasmussen/chrome-cli/archive/refs/tags/1.11.0.tar.gz" + sha256 "e719cf5342f907cb06811c39c7a6ca087e584d08d1185e2eded9953dd218d918" + license "MIT" + head "https://github.com/prasmussen/chrome-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d551c02cfc196db2d8e930c9c58c6aa6c397ad2cddd4990a6b368db465b3a467" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "628f12ae25a466c35328cd1578c6428ece0942416f07e5df663919edf68d1c6c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "807ae024d63682ce4573ea99c27172c606f370b96a21cff8a4626ba3aee8018b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d06011bc7b3936bbcb44f2f4ab49b4749000af5c325d29afd85090148c8481ad" + sha256 cellar: :any_skip_relocation, sonoma: "390e82e1ed87e9d5882ae863c68f7cdc2baad2cde72f862fc5efca511a4743c9" + sha256 cellar: :any_skip_relocation, ventura: "46815e7636eaca21c421825509183052781caf166ba76957eb13aa74c6e8fc5d" + end + + depends_on xcode: :build + depends_on :macos + + def install + # Release builds + xcodebuild "-arch", Hardware::CPU.arch.to_s, "SYMROOT=build" + bin.install "build/Release/chrome-cli" + + # Install wrapper scripts for chrome compatible browsers + bin.install "scripts/chrome-canary-cli" + bin.install "scripts/chromium-cli" + bin.install "scripts/brave-cli" + bin.install "scripts/vivaldi-cli" + bin.install "scripts/edge-cli" + bin.install "scripts/arc-cli" + end + + test do + system bin/"chrome-cli", "version" + end +end diff --git a/Formula/c/chrome-devtools-mcp.rb b/Formula/c/chrome-devtools-mcp.rb new file mode 100644 index 0000000000000..d6de0a0cd123d --- /dev/null +++ b/Formula/c/chrome-devtools-mcp.rb @@ -0,0 +1,38 @@ +class ChromeDevtoolsMcp < Formula + desc "Chrome DevTools for coding agents" + homepage "https://github.com/chromedevtools/chrome-devtools-mcp" + url "https://registry.npmjs.org/chrome-devtools-mcp/-/chrome-devtools-mcp-0.9.0.tgz" + sha256 "0dcd3a564ff913416a5a256b139fb22a04b34bbf81330148eb9fc98313302df0" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "55982715db1dd4668a09c432ac5da68ed0a700eda4feeaf3250125e43ecca420" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + node_modules = libexec/"lib/node_modules/chrome-devtools-mcp/node_modules" + + # Remove incompatible pre-built `bare-fs`/`bare-os`/`bare-url` binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules.glob("{bare-fs,bare-os,bare-url}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + assert_match version.to_s, shell_output("#{bin}/chrome-devtools-mcp --version") + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output(bin/"chrome-devtools-mcp", json, 0) + assert_match "The CPU throttling rate representing the slowdown factor 1-20x", output + end +end diff --git a/Formula/c/chrome-export.rb b/Formula/c/chrome-export.rb new file mode 100644 index 0000000000000..714e7fbb46ecd --- /dev/null +++ b/Formula/c/chrome-export.rb @@ -0,0 +1,40 @@ +class ChromeExport < Formula + include Language::Python::Shebang + + desc "Convert Chrome's bookmarks and history to HTML bookmarks files" + homepage "https://github.com/bdesham/chrome-export" + url "https://github.com/bdesham/chrome-export/archive/refs/tags/v2.0.2.tar.gz" + sha256 "41b667b407bc745a57105cc7969ec80cd5e50d67e1cce73cf995c2689d306e97" + license "ISC" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4eb537cddb8040188b19d7e91771f1e85f31760b36b053f57d606e2356110f2a" + end + + uses_from_macos "python" + + def install + bin.install "export-chrome-bookmarks", "export-chrome-history" + rewrite_shebang detected_python_shebang(use_python_from_path: true), *bin.children + + man1.install buildpath.glob("man_pages/*.1") + pkgshare.install "test" + end + + test do + cp_r (pkgshare/"test").children, testpath + system bin/"export-chrome-bookmarks", "Bookmarks", + "bookmarks_actual_output.html" + assert_path_exists testpath/"bookmarks_actual_output.html" + assert_equal (testpath/"bookmarks_expected_output.html").read, + (testpath/"bookmarks_actual_output.html").read + system bin/"export-chrome-history", "History", "history_actual_output.html" + assert_path_exists testpath/"history_actual_output.html" + assert_equal (testpath/"history_expected_output.html").read, + (testpath/"history_actual_output.html").read + end +end diff --git a/Formula/c/chronograf.rb b/Formula/c/chronograf.rb new file mode 100644 index 0000000000000..2e98bccd60105 --- /dev/null +++ b/Formula/c/chronograf.rb @@ -0,0 +1,76 @@ +class Chronograf < Formula + desc "Open source monitoring and visualization UI for the TICK stack" + homepage "https://docs.influxdata.com/chronograf/latest/" + url "https://github.com/influxdata/chronograf/archive/refs/tags/1.10.8.tar.gz" + sha256 "6bf4e5176d4b0f039c078c5c71a80a460813f6f40028c76828d35392cb4c2d02" + license "AGPL-3.0-or-later" + head "https://github.com/influxdata/chronograf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b173f2fbad114a2efe46f6f8a4f210b21b4c90166273c8cd8b57c43801e131f0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2aa264c77b7a1580f44f13fe423a5057a8cca42ed6c1681e65dd99ac673365f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "338e3d49164c033aff7aaacb29efa9f7c138f169c13bd7e7cc9c6ced32e8f986" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba7d5a5e977bc21bd5b38c992c9e662971edef12bfffdb564fe0aae14f85a325" + sha256 cellar: :any_skip_relocation, sonoma: "2f4bc398a63f400a368e0ac15b5c76695fa4931d1a12cfeebdefeb8f2099ab41" + sha256 cellar: :any_skip_relocation, ventura: "bf4bceda8fe5e269e3fb1e431afa340871ea7fbb6508fbef4e633b7cbf191231" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa7a72d163fef81177dba41159edde265a214d4fcbde8d4e05e441802689b0f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbb34f30e0bfcd31f6a12a844471439e68c0fa470f8d14eb70f01b0172e19944" + end + + depends_on "go" => :build + # Avoid C++20 from Node 23+ until "@parcel/watcher >= 2.2.0" for "node-addon-api >= 4" + # Issue ref: https://github.com/nodejs/node-addon-api/issues/1007 + depends_on "node@22" => :build + depends_on "python-setuptools" => :build + depends_on "yarn" => :build + depends_on "influxdb" + depends_on "kapacitor" + + def install + # Check if workarounds can be removed + if build.stable? + yarn_lock = File.read("yarn.lock") + + # distutils usage removed in https://github.com/nodejs/node-gyp/commit/707927cd579205ef2b4b17e61c1cce24c056b452 + node_gyp_version = Version.new(yarn_lock[%r{/node-gyp[._-]v?(\d+(?:\.\d+)+)\.t}i, 1]) + odie "Remove `python-setuptools` dependency!" if node_gyp_version >= 10 + + # node 22 (V8 12) fix in https://github.com/nodejs/nan/commit/1b630ddb3412cde35b64513662b440f9fd71e1ff + nan_version = Version.new(yarn_lock[%r{/nan[._-]v?(\d+(?:\.\d+)+)\.t}i, 1]) + odie "Remove `nan` resolution workaround!" if nan_version >= "2.19.0" + end + + # Workaround to build with newer node until `nan` dependency is updated + # https://github.com/influxdata/chronograf/issues/6040 + package_json = JSON.parse(File.read("package.json")) + (package_json["resolutions"] ||= {})["nan"] = "2.23.0" + File.write("package.json", JSON.pretty_generate(package_json)) + + ENV["npm_config_build_from_source"] = "true" + ENV.deparallelize + system "make" + bin.install "chronograf" + end + + service do + run opt_bin/"chronograf" + keep_alive true + error_log_path var/"log/chronograf.log" + log_path var/"log/chronograf.log" + working_dir var + end + + test do + port = free_port + pid = fork do + exec bin/"chronograf", "--port=#{port}" + end + sleep 10 + output = shell_output("curl -s 0.0.0.0:#{port}/chronograf/v1/") + sleep 1 + assert_match %r{/chronograf/v1/layouts}, output + ensure + Process.kill("SIGTERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/c/chrony.rb b/Formula/c/chrony.rb new file mode 100644 index 0000000000000..ef4050732b3ca --- /dev/null +++ b/Formula/c/chrony.rb @@ -0,0 +1,40 @@ +class Chrony < Formula + desc "Versatile implementation of the Network Time Protocol (NTP)" + homepage "https://chrony-project.org" + url "https://chrony-project.org/releases/chrony-4.8.tar.gz" + sha256 "33ea8eb2a4daeaa506e8fcafd5d6d89027ed6f2f0609645c6f149b560d301706" + license "GPL-2.0-only" + + livecheck do + url "https://chrony-project.org/download.html" + regex(/href=.*?chrony[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e361230f241f273ef878f5f2bdc2899a414a7973dbd65854e44dfaaa70efc95e" + sha256 cellar: :any, arm64_sequoia: "c69f2a33c2f23e19668207e8a7f019476d48ddd21aac4ac297e447c4f368a8d7" + sha256 cellar: :any, arm64_sonoma: "d625684f40a9cfb51d98b1ca92f212e940074e4303931fd2e4cf3598b4c2f51c" + sha256 cellar: :any, arm64_ventura: "c9f89d4196e6a7cc762937dea9cb6c2409240399ae95b5077901ae0bf66ead25" + sha256 cellar: :any, sonoma: "0f77335cd443a3cf8415f1bd44a82b8c0493aee02037130f829bce8dae1c9604" + sha256 cellar: :any, ventura: "fdd09def3431e2f0d55de1d4c9d6196c7ebb3cef7d82d0ba5160ebbcfe8243a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c392cca54e58164bdfd794709eb64f0a3effb3f3f996dbc112e440459d8ffa45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb65a129ec2f9117babdb703ec57e86857110f0e8cf8e74c14fa22f9c51ffd20" + end + + depends_on "pkgconf" => :build + depends_on "gnutls" + depends_on "nettle" + + uses_from_macos "libedit" + + def install + system "./configure", "--localstatedir=#{var}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.conf").write "pool pool.chrony.eu iburst\n" + output = shell_output("#{sbin}/chronyd -Q -f #{testpath}/test.conf 2>&1") + assert_match(/System clock wrong by -?\d+\.\d+ seconds \(ignored\)/, output) + end +end diff --git a/Formula/c/chrpath.rb b/Formula/c/chrpath.rb new file mode 100644 index 0000000000000..f8630c8639c99 --- /dev/null +++ b/Formula/c/chrpath.rb @@ -0,0 +1,37 @@ +class Chrpath < Formula + desc "Tool to edit the rpath in ELF binaries" + homepage "https://tracker.debian.org/pkg/chrpath" + url "https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_0.18.orig.tar.gz" + sha256 "f09c49f0618660ca11fc6d9580ddde904c7224d4c6d0f6f2d1f9bcdc9102c9aa" + license "GPL-2.0-or-later" + + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "1bef0961b466971c9b4d4fc0ae4ddd059c17f465c8cac8c87e3ea03f3d04d357" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a820a2841f592b3045eb6e0dc4bdbb6a86789402dea2d97367ec0a58f7d3706f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on :linux + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + assert_match "chrpath version #{version}", shell_output("#{bin}/chrpath -v") + (testpath/"test.c").write "int main(){return 0;}" + system ENV.cc, "test.c", "-Wl,-rpath,/usr/local/lib" + assert_match "a.out: RUNPATH=/usr/local/lib", shell_output("#{bin}/chrpath a.out") + assert_match "a.out: new RUNPATH: /usr/lib/", shell_output("#{bin}/chrpath -r /usr/lib/ a.out") + assert_match "a.out: RUNPATH=/usr/lib/", shell_output("#{bin}/chrpath a.out") + system bin/"chrpath", "-d", "a.out" + assert_match "a.out: no rpath or runpath tag found.", shell_output("#{bin}/chrpath a.out", 2) + end +end diff --git a/Formula/c/chruby-fish.rb b/Formula/c/chruby-fish.rb new file mode 100644 index 0000000000000..626fa972e3806 --- /dev/null +++ b/Formula/c/chruby-fish.rb @@ -0,0 +1,26 @@ +class ChrubyFish < Formula + desc "Thin wrapper around chruby to make it work with the Fish shell" + homepage "https://github.com/JeanMertz/chruby-fish" + url "https://github.com/JeanMertz/chruby-fish/archive/refs/tags/v1.0.0.tar.gz" + sha256 "db1023255fa55c9a01b06404cd394cccf790d42985cf85706211e5a0dda4fd9f" + license "MIT" + head "https://github.com/JeanMertz/chruby-fish.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c4fc2b36d5552646f11abaef2bf3c8f18a3de7c6126e2c1d3ff653c83f095825" + end + + depends_on "chruby" + depends_on "fish" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match "chruby: #{version}", shell_output("fish -c '. #{share}/fish/vendor_functions.d/chruby.fish; chruby --version'") + end +end diff --git a/Formula/c/chruby.rb b/Formula/c/chruby.rb new file mode 100644 index 0000000000000..0369616e8ed49 --- /dev/null +++ b/Formula/c/chruby.rb @@ -0,0 +1,34 @@ +class Chruby < Formula + desc "Ruby environment tool" + homepage "https://github.com/postmodern/chruby" + url "https://github.com/postmodern/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz" + sha256 "7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd" + license "MIT" + head "https://github.com/postmodern/chruby.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "a93d7f31af99177bb1884086e94e0c9dcb99ba4ef1ffb1f6fe33bff584c385de" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + Add the following to the ~/.bash_profile or ~/.zshrc file: + source #{opt_pkgshare}/chruby.sh + + To enable auto-switching of Rubies specified by .ruby-version files, + add the following to ~/.bash_profile or ~/.zshrc: + source #{opt_pkgshare}/auto.sh + EOS + end + + test do + assert_equal "chruby version #{version}", shell_output("#{bin}/chruby-exec --version").strip + end +end diff --git a/Formula/c/chsrc.rb b/Formula/c/chsrc.rb new file mode 100644 index 0000000000000..dc5e9a624e538 --- /dev/null +++ b/Formula/c/chsrc.rb @@ -0,0 +1,27 @@ +class Chsrc < Formula + desc "Change Source for every software on every platform from the command-line" + homepage "https://github.com/RubyMetric/chsrc" + url "https://github.com/RubyMetric/chsrc/archive/refs/tags/v0.2.3.tar.gz" + sha256 "d33df6abe8269c8abdaadc5b1cfde8a53676d1a52db659688ffdf3a605647ce9" + license "GPL-3.0-or-later" + head "https://github.com/RubyMetric/chsrc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6e5284d12fc7a7a26591a964f35f638c46d8ad339d9e046323b12f6ae14a94c2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "207c14f7c2c966a785ac0618f4d199c35eaee2fc39f33a44e619aad1df67b376" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60d5f9128a554a8566f137a271383d94479deb92ea6608d05426ed73dddfe14e" + sha256 cellar: :any_skip_relocation, sonoma: "b756dd9f5c1fb8a5cbc2c27c852e44546894d2c1193fee7c3701d69072e3d83a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5632382efd3b6d53327894bc60d3c942ad917c49698769a26fef6025bdfaed6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d5a78177dfb3efb005d5ed2d05591296f45eff83d5c94f2865a345d70999e36" + end + + def install + system "make" + bin.install "chsrc" + end + + test do + assert_match(/mirrorz\s*MirrorZ.*MirrorZ/, shell_output("#{bin}/chsrc list")) + assert_match version.to_s, shell_output("#{bin}/chsrc --version") + end +end diff --git a/Formula/c/chuck.rb b/Formula/c/chuck.rb new file mode 100644 index 0000000000000..ca4a84d11c2af --- /dev/null +++ b/Formula/c/chuck.rb @@ -0,0 +1,43 @@ +class Chuck < Formula + desc "Concurrent, on-the-fly audio programming language" + homepage "https://chuck.cs.princeton.edu/" + url "https://chuck.cs.princeton.edu/release/files/chuck-1.5.5.5.tgz" + mirror "https://chuck.stanford.edu/release/files/chuck-1.5.5.5.tgz" + sha256 "7f16d35b4c1c2a7d6aea9b1186109eea91c52533c57d95130a6946afb805a115" + license "GPL-2.0-or-later" + head "https://github.com/ccrma/chuck.git", branch: "main" + + livecheck do + url "https://chuck.cs.princeton.edu/release/files/" + regex(/href=.*?chuck[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c746d03444877cf75da06d1e1b2d95a4ff42bad0f5ffee77f1e51e6405a9f7ad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dfb510c4471835f9aa3c4aeec20ec28622ae84ed148328e0bc1efd27c7468cc7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8144f55c7d4f24572be41c4fbce7100c2f34cc7d51e7903c276e667fe5c9f95" + sha256 cellar: :any_skip_relocation, sonoma: "a5b88313214f020e0fd3c5506a60194ec1710738c040eca7dc7a19e808822074" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f41b03c808cbc565f640814a0fb66efc3dfc44ed0a3f156fe933edcdf0ed7cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab6fc6fa3ba97bc03f9540b6b383182b0cca6c23bf550f4ffdaab813af2621ac" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "libsndfile" + depends_on "pulseaudio" + end + + def install + os = OS.mac? ? "mac" : "linux-pulse" + system "make", "-C", "src", os + bin.install "src/chuck" + pkgshare.install "examples" + end + + test do + assert_match "device", shell_output("#{bin}/chuck --probe 2>&1") + end +end diff --git a/Formula/c/cidr.rb b/Formula/c/cidr.rb new file mode 100644 index 0000000000000..f448d638a8919 --- /dev/null +++ b/Formula/c/cidr.rb @@ -0,0 +1,35 @@ +class Cidr < Formula + desc "CLI to perform various actions on CIDR ranges" + homepage "https://github.com/bschaatsbergen/cidr" + url "https://github.com/bschaatsbergen/cidr/archive/refs/tags/v2.3.0.tar.gz" + sha256 "caa803f91b634bfa955c4898abf3085b83c5c3cbcd56f81cc64f29510a99f707" + license "MIT" + head "https://github.com/bschaatsbergen/cidr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dcbc8cd8981394e22863784293723d4f498d4e99e7bd887303f627fd8800bcd0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcbc8cd8981394e22863784293723d4f498d4e99e7bd887303f627fd8800bcd0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dcbc8cd8981394e22863784293723d4f498d4e99e7bd887303f627fd8800bcd0" + sha256 cellar: :any_skip_relocation, sonoma: "69746c5df310b241ba471f7007baa62bd134d3b29e9ad6f84a0ae4b57a8a043b" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbc02e2c488fce47f5d8c777a0bb2691fc83f671bd8f3fa38fef07042e99ac7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88883882ac33253f400a15c6e38dccb0d502bef37985da5f0f3af8e0d3be53a5" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[ + -s -w + -X github.com/bschaatsbergen/cidr/cmd.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/cidr --version") + assert_equal "65536\n", shell_output("#{bin}/cidr count 10.0.0.0/16") + assert_equal "1\n", shell_output("#{bin}/cidr count 10.0.0.0/32") + assert_equal "false\n", shell_output("#{bin}/cidr overlaps 10.106.147.0/24 10.106.149.0/23") + end +end diff --git a/Formula/c/cidr2range.rb b/Formula/c/cidr2range.rb new file mode 100644 index 0000000000000..6eb650b180a38 --- /dev/null +++ b/Formula/c/cidr2range.rb @@ -0,0 +1,43 @@ +class Cidr2range < Formula + desc "Converts CIDRs to IP ranges" + homepage "https://ipinfo.io" + url "https://github.com/ipinfo/cli/archive/refs/tags/cidr2range-1.2.0.tar.gz" + sha256 "54af7600dc8c775f28d8fdc9debd86154e9293f07eb73f7372931d9c94744c81" + license "Apache-2.0" + head "https://github.com/ipinfo/cli.git", branch: "master" + + livecheck do + url :stable + regex(/^cidr2range[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3382d71c74172fa8b5cdd02e8668ab6103ad35ab7f2269ad7f51d0fd2c35ceb7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17e1e7697199411cdab3f8d1be909e6bfa407a2f8017cc142d83732a540bbecf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9368ce012f4056691b6b10d17a1f434bae5c76988d7c6c067e37d73a7e44da15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b7f537be2b192ed4da4662bf9685430324ebeaa0221257b719e7349c94d00831" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ec7676939e1927567d72bd8477a34bd7dc614b7fccbacdde465214fa0e115789" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a2681a24c80b987299ae03be56a7b0e9fde805cfa6ae297140fd15d9f5822e21" + sha256 cellar: :any_skip_relocation, sonoma: "a206f918aa7497cc7b06f79c825c199a9810f8793d3cffaea868c738c3eaaa85" + sha256 cellar: :any_skip_relocation, ventura: "ed20ee84a173326de144a8bbd9fc3b9223121a74c06c2bfbae62a9938ba8b5c3" + sha256 cellar: :any_skip_relocation, monterey: "488509c006b7fe25a2d366655e12a4cbe6dfe782bac351e3c2fb7c0caac9da04" + sha256 cellar: :any_skip_relocation, big_sur: "4b60567820427b73945cea5ce77d6a73c10954d36f82c9f0e1d87aa5ae6d6432" + sha256 cellar: :any_skip_relocation, catalina: "89f76772d934321dcf4e6c9417071cce8074a3666946decc12c3d5a861001d31" + sha256 cellar: :any_skip_relocation, arm64_linux: "d28a210ccb7d1d612f7bc936c4cf66c5a5bcab1e3f8d483f9e08bebe3a834ba0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8d60c39ba96620c8b8cd5f34e81a02365f0c09db476a3e7626670a12e80c2a8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args, "./cidr2range" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/cidr2range --version").chomp + assert_equal "1.1.1.0-1.1.1.3", shell_output("#{bin}/cidr2range 1.1.1.0/30").chomp + assert_equal "0.0.0.0-255.255.255.255", shell_output("#{bin}/cidr2range 1.1.1.0/0").chomp + end +end diff --git a/Formula/c/cidrmerge.rb b/Formula/c/cidrmerge.rb new file mode 100644 index 0000000000000..47e6293c51443 --- /dev/null +++ b/Formula/c/cidrmerge.rb @@ -0,0 +1,40 @@ +class Cidrmerge < Formula + desc "CIDR merging with network exclusion" + homepage "https://cidrmerge.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cidrmerge/cidrmerge/cidrmerge-1.5.3/cidrmerge-1.5.3.tar.gz" + sha256 "21b36fc8004d4fc4edae71dfaf1209d3b7c8f8f282d1a582771c43522d84f088" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1557d597adadd169e8de642a61a2adcc610583022f4fbfc391a80c6bc7fe46e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37c60d84cb5235c7e6f49d9be574b422aad1c9bcd2767a1ac54f037d068a1635" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fe9d3fcede14ef8846b83305b225df17a92af3f0430277e47a93042abca5487" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66c685d8c347fd583afe154475091c456ec7c9e7f0891542fbe1a46bebfad216" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1917c09d7f9dd006a7688c9be3e1673c3a93950f9e58d23eb6b2dab14b2a334f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "49083b84e43debb1921bf1e3788dd5614bcbac3d70b68d099734421fa94f7fd5" + sha256 cellar: :any_skip_relocation, sonoma: "42b18c978627a6d1ab10408d503ce83e15312adf053fd190c064c3d62b344ece" + sha256 cellar: :any_skip_relocation, ventura: "ec886d391031fb25d40a8430fb5a73e07b7c8cfb33963ec78ad10cf13dceb0fe" + sha256 cellar: :any_skip_relocation, monterey: "a447eb73e2385698470c99081afdc04f33f15ad684573828f2e8531eb7a84786" + sha256 cellar: :any_skip_relocation, big_sur: "5f11e096d4f5b0af52ec6822f2fba79bd053c083b114f41fcc9ca40112daf5db" + sha256 cellar: :any_skip_relocation, catalina: "5828da34c41143336cced7cc8051efd63d525c1a1a4788c6c1235d4bc75cf3df" + sha256 cellar: :any_skip_relocation, arm64_linux: "a91cbef65b241fab63d8e66b0e8f438f38e683da0cb0c622395b0e6ff1738e00" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1587da7aaa0f1a2617f1a3880601c40a1aa1f342eb5b67fb68bb7c47db896452" + end + + def install + system "make" + bin.install "cidrmerge" + end + + test do + input = <<~EOS + 10.1.1.0/24 + 10.1.1.1/32 + 192.1.4.5/32 + 192.1.4.4/32 + EOS + assert_equal "10.1.1.0/24\n192.1.4.4/31\n", pipe_output(bin/"cidrmerge", input) + end +end diff --git a/Formula/c/cifer.rb b/Formula/c/cifer.rb new file mode 100644 index 0000000000000..4a32f198c022e --- /dev/null +++ b/Formula/c/cifer.rb @@ -0,0 +1,57 @@ +class Cifer < Formula + desc "Work on automating classical cipher cracking in C" + homepage "https://code.google.com/p/cifer/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cifer/cifer-1.2.0.tar.gz" + sha256 "436816c1f9112b8b80cf974596095648d60ffd47eca8eb91fdeb19d3538ea793" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0ddcaf5c7910b356424491a71c0b42587701427aba17e0fdc02a9c088c148590" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d9f5339ed8c92d74cc50214716df2c6082a559fdf26b004ff69e0468e3faf0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b6a222301feeb2df2db2337c86c5c5e0223e17d5df33bab506f5be9b9d7cd62" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e91e9087a69d7922fe1fe9f84e11e9f222c45d5b1b1cd794f1e7f0bf3a295c2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "66851780bbfe9071936bd7f230dc0f0744f5dc16ae6bd5986d9494d31563b75b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5f826a8dc0534a56e2c372abeba0f05124f79e96502243d1c89548777d2156b2" + sha256 cellar: :any_skip_relocation, sonoma: "bf13c997d4f8277ffb99f4e05669a4dc91eaafa1ab520df56c36a1fcfcf8d39f" + sha256 cellar: :any_skip_relocation, ventura: "8d266e4601b71e979f7580f3fe3eeb6aafe4aa5c350bf5db2f1fcf4950e556ed" + sha256 cellar: :any_skip_relocation, monterey: "efc874dcf1bfb9fb07faab3de50b204897e1daf172f74fd00d75a0a5e421036f" + sha256 cellar: :any_skip_relocation, big_sur: "f58f511d07f6a8daf8c868915c1de59f23d33c089da52271da83180e321bab5b" + sha256 cellar: :any_skip_relocation, catalina: "ce4a7d9b846388eae2309dbd0a1f0493b533cbefef85ae50ff97648b6a46600c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1788d000c6819db964bdee6be927657035fd8e7b716987a200b8b569a3153cf1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58a55640d9031cea1c50d8ad9db0128993f4e5895ccf7a9069f762c34682e165" + end + + on_linux do + depends_on "readline" + + # Fix order of linker flags for GCC + patch :DATA + end + + def install + system "make", "prefix=#{prefix}", + "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "LDFLAGS=#{ENV.ldflags}", + "install" + end + + test do + assert_match version.to_s, pipe_output(bin/"cifer") + end +end + +__END__ +--- a/Makefile ++++ b/Makefile +@@ -54,7 +54,7 @@ allfiles := $(wildcard *) + all : cifer + + cifer : $(objects) +- $(CC) $(CFLAGS) $(LINKLIBS) -o $@ $(objects) ++ $(CC) $(CFLAGS) -o $@ $(objects) $(LINKLIBS) + + src/%.o : src/%.c $(headers) + $(CC) $(DEFS) -c $(CFLAGS) $< -o $@ diff --git a/Formula/c/cig.rb b/Formula/c/cig.rb new file mode 100644 index 0000000000000..87e2cc725eb44 --- /dev/null +++ b/Formula/c/cig.rb @@ -0,0 +1,50 @@ +class Cig < Formula + desc "CLI app for checking the state of your git repositories" + homepage "https://github.com/stevenjack/cig" + url "https://github.com/stevenjack/cig/archive/refs/tags/v0.1.5.tar.gz" + sha256 "545a4a8894e73c4152e0dcf5515239709537e0192629dc56257fe7cfc995da24" + license "MIT" + head "https://github.com/stevenjack/cig.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "24af56532b56382a0a26334284d11ace630a49d376ae8af4f808aede18cf17a5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba2a840628b58188b54acff96a557a2930ac6fa2a862cf3f075bc15a681dd0ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37fe43627668c9628145abd430354349ebd669b3a1f5b78dc4a8ae69567619e1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e3b74f7b2d3b2d121ccb6946718893b4f0c09d6bae5e5a6a7d48b8144da9b452" + sha256 cellar: :any_skip_relocation, arm64_monterey: "48e80e3f418f825caceccd69e9ec911f5c03b8fa7f38883edfd66d353f70a481" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2d4f345393a0553e40003b46523a07e2bb0162bba0309ca9c0d322f606e73b76" + sha256 cellar: :any_skip_relocation, sonoma: "682d89954b0a95f6be978817ea4a9c8c96d33e03f227c79e0abc4969a48ea9d1" + sha256 cellar: :any_skip_relocation, ventura: "340790bf6ab897640e1a1f350d8c106d3bc2835ad71cec69b7a717894749cc35" + sha256 cellar: :any_skip_relocation, monterey: "fbca3e3336ec9a9848091d2b1845a48dc915ae798da5e1d54fe6aa4ee2261da6" + sha256 cellar: :any_skip_relocation, big_sur: "c41c70e517158f1a31bb4b29a6fa01b12570001353b8800d55aadd4ddc99080e" + sha256 cellar: :any_skip_relocation, catalina: "3ccce3238efd259041dbb0f0427d5ac06cc4dfafdfbfd336ddd0023e02e9dd7d" + sha256 cellar: :any_skip_relocation, arm64_linux: "be676ae224ae098307465166f39eea0d6bcefb82ac48d6c86b76d79e87a4847b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cda091fe20f715097967b89ee16f611d3f26faac9eb4d3f7861ec5d9cb91201" + end + + depends_on "go" => :build + + # Patch to remove godep dependency. + # Remove when the following PR is merged into release: + # https://github.com/stevenjack/cig/pull/44 + patch do + url "https://github.com/stevenjack/cig/compare/2d834ee..f0e78f0.patch?full_index" + sha256 "3aa14ecfa057ec6aba08d6be3ea0015d9df550b4ede1c3d4eb76bdc441a59a47" + end + + def install + system "go", "build", *std_go_args + end + + test do + repo_path = "#{testpath}/test" + system "git", "init", "--bare", repo_path + (testpath/".cig.yaml").write <<~YAML + test_project: #{repo_path} + YAML + system bin/"cig", "--cp=#{testpath}" + end +end diff --git a/Formula/c/cilium-cli.rb b/Formula/c/cilium-cli.rb new file mode 100644 index 0000000000000..a1bab4dbdc6f2 --- /dev/null +++ b/Formula/c/cilium-cli.rb @@ -0,0 +1,47 @@ +class CiliumCli < Formula + desc "CLI to install, manage & troubleshoot Kubernetes clusters running Cilium" + homepage "https://cilium.io" + url "https://github.com/cilium/cilium-cli/archive/refs/tags/v0.18.8.tar.gz" + sha256 "fbd0d4e20e10280cbfd94b52c34451cbddc79d39098d219685b46565eeaacd33" + license "Apache-2.0" + head "https://github.com/cilium/cilium-cli.git", branch: "main" + + # Upstream uses GitHub releases to indicate that a version is released + # (there's also sometimes a notable gap between when a version is tagged and + # and the release is created), so the `GithubLatest` strategy is necessary. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d3f1ad4fe99f0db3b7a55a3dc0c6960df36c930249bb173ef5c6cd3e9ac404d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea7feec4179ab1be8ba3fc575a1ed2b2684f81f36bb16ce6262f22e455e043c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42e4dff7371fc951d677f1119e983ce4fccc4992318fd64f6d5fa5b3a9a35d71" + sha256 cellar: :any_skip_relocation, sonoma: "7d0a3151767cd9bcc71fa3cf31be3b146bcaa5f39f805c92fe2ca9a1c38c087b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d93503a969c05a21bb0769013821eada73cc1222556bdeda72d884039524b825" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c1ee65b1d69eeb8de16caed9b4023bf2b0f6924e3d754ec522ad9929367c60b" + end + + depends_on "go" => :build + + def install + cilium_version_url = "https://raw.githubusercontent.com/cilium/cilium/main/stable.txt" + cilium_version = Utils.safe_popen_read("curl", cilium_version_url).strip + + ldflags = %W[ + -s -w + -X github.com/cilium/cilium/cilium-cli/defaults.CLIVersion=v#{version} + -X github.com/cilium/cilium/cilium-cli/defaults.Version=#{cilium_version} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"cilium"), "./cmd/cilium" + + generate_completions_from_executable(bin/"cilium", "completion") + end + + test do + assert_match("cilium-cli: v#{version}", shell_output("#{bin}/cilium version")) + assert_match("Kubernetes cluster unreachable", shell_output("#{bin}/cilium install 2>&1", 1)) + assert_match("Error: Unable to enable Hubble", shell_output("#{bin}/cilium hubble enable 2>&1", 1)) + end +end diff --git a/Formula/c/cimg.rb b/Formula/c/cimg.rb new file mode 100644 index 0000000000000..f6f42b59d6826 --- /dev/null +++ b/Formula/c/cimg.rb @@ -0,0 +1,30 @@ +class Cimg < Formula + desc "C++ toolkit for image processing" + homepage "https://cimg.eu/" + url "https://cimg.eu/files/CImg_3.6.3.zip" + sha256 "507d3c7aaf58146505bb26395f67c7e84f566c712a8f611149fd250efbf1fd1b" + license "CECILL-2.0" + + livecheck do + url "https://cimg.eu/files/" + regex(/href=.*?CImg[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c72c456aa0e7caf19b69c758e175cd968d336962ae9ae58fac6bf0ec23f31e4a" + end + + def install + include.install "CImg.h" + prefix.install "Licence_CeCILL-C_V1-en.txt", "Licence_CeCILL_V2-en.txt" + pkgshare.install "examples", "plugins" + end + + test do + cp_r pkgshare/"examples", testpath + cp_r pkgshare/"plugins", testpath + cp include/"CImg.h", testpath + system "make", "-C", "examples", "image2ascii" + system "examples/image2ascii" + end +end diff --git a/Formula/c/circleci.rb b/Formula/c/circleci.rb new file mode 100644 index 0000000000000..4de995870abe0 --- /dev/null +++ b/Formula/c/circleci.rb @@ -0,0 +1,48 @@ +class Circleci < Formula + desc "Enables you to reproduce the CircleCI environment locally" + homepage "https://circleci.com/docs/guides/toolkit/local-cli/" + # Updates should be pushed no more frequently than once per week. + url "https://github.com/CircleCI-Public/circleci-cli.git", + tag: "v0.1.33494", + revision: "7cc65701e3bd9e1732fe5e449b5929f1e5f04618" + license "MIT" + head "https://github.com/CircleCI-Public/circleci-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3530f1cfb9fb2eae631a668f97a12da2b3350f0f4e59a1417b54f8a83c061865" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4960ec4f4ae3f47d6eb20c489169d6e7af4e0c4c2ed3b10b019f9e50e2aaff51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "534c268c21763f97dc58981753d1d0cc593ef090a4e6ac48c55589acb7beb0ee" + sha256 cellar: :any_skip_relocation, sonoma: "6477db3c9c4d5fdab400d51617836d1ad5e67c07580760f754d7f55f96af3f46" + sha256 cellar: :any_skip_relocation, arm64_linux: "610e912a5e57af0db997039d35a0557d8b9aeedb868083ff9fa56d5d1c15168f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a132d97bf7b3e565a5c3a0b649cce62126f12bc220f666aeef8559fe03af25de" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/CircleCI-Public/circleci-cli/version.packageManager=#{tap.user.downcase} + -X github.com/CircleCI-Public/circleci-cli/version.Version=#{version} + -X github.com/CircleCI-Public/circleci-cli/version.Commit=#{Utils.git_short_head} + -X github.com/CircleCI-Public/circleci-cli/telemetry.SegmentEndpoint=https://api.segment.io + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"circleci", "--skip-update-check", "completion", + shells: [:bash, :zsh]) + end + + test do + ENV["CIRCLECI_CLI_TELEMETRY_OPTOUT"] = "1" + # assert basic script execution + assert_match(/#{version}\+.{7}/, shell_output("#{bin}/circleci version").strip) + (testpath/".circleci.yml").write("{version: 2.1}") + output = shell_output("#{bin}/circleci config pack #{testpath}/.circleci.yml") + assert_match "version: 2.1", output + # assert update is not included in output of help meaning it was not included in the build + assert_match(/update.+This command is unavailable on your platform/, shell_output("#{bin}/circleci help 2>&1")) + assert_match "update is not available because this tool was installed using homebrew.", + shell_output("#{bin}/circleci update") + end +end diff --git a/Formula/c/circumflex.rb b/Formula/c/circumflex.rb new file mode 100644 index 0000000000000..e70d25a047fef --- /dev/null +++ b/Formula/c/circumflex.rb @@ -0,0 +1,34 @@ +class Circumflex < Formula + desc "Hacker News in your terminal" + homepage "https://github.com/bensadeh/circumflex" + url "https://github.com/bensadeh/circumflex/archive/refs/tags/3.8.tar.gz" + sha256 "1041d27ef87a6fb123740d6423cd3fd66ced0ccf43d834c8d421aad3c8e8c96b" + license "AGPL-3.0-only" + head "https://github.com/bensadeh/circumflex.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "452a6764489fafe9f61ed53a7e83a578ae1ab2ccc4c307a22e3a3f25157f5483" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7703a8fe49c3a13299c37b9bd75f42674a245a866148a0d71d0b050be0e5b441" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7703a8fe49c3a13299c37b9bd75f42674a245a866148a0d71d0b050be0e5b441" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7703a8fe49c3a13299c37b9bd75f42674a245a866148a0d71d0b050be0e5b441" + sha256 cellar: :any_skip_relocation, sonoma: "9b50ad11b46f45cde111438cb6f63bf91c204d55dc054175b74da06cea8b68da" + sha256 cellar: :any_skip_relocation, ventura: "9b50ad11b46f45cde111438cb6f63bf91c204d55dc054175b74da06cea8b68da" + sha256 cellar: :any_skip_relocation, arm64_linux: "53c94f24dca42570b50974959436b94e090dc99d380e9226b29b72f9f1c43630" + sha256 cellar: :any_skip_relocation, x86_64_linux: "186c35290bbefbbf90f8e42467aebf479c405be7d4803a66dee198b6dbbcf879" + end + + depends_on "go" => :build + depends_on "less" + + def install + system "go", "build", *std_go_args(output: bin/"clx", ldflags: "-s -w") + man1.install "share/man/clx.1" + end + + test do + assert_match "List of visited IDs cleared", shell_output("#{bin}/clx clear 2>&1") + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + assert_match "Y Combinator", shell_output("#{bin}/clx article 1") + end +end diff --git a/Formula/c/citus.rb b/Formula/c/citus.rb new file mode 100644 index 0000000000000..8a4ffa8375fa5 --- /dev/null +++ b/Formula/c/citus.rb @@ -0,0 +1,71 @@ +class Citus < Formula + desc "PostgreSQL-based distributed RDBMS" + homepage "https://www.citusdata.com" + url "https://github.com/citusdata/citus/archive/refs/tags/v13.1.0.tar.gz" + sha256 "2383287bea45dfce54cde9ffc98f3e27bb7cde4deb3f096f9c7a12d1819f5113" + license "AGPL-3.0-only" + head "https://github.com/citusdata/citus.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "53dd71a80fbbef595f76a96e456f3009217c1d3f932bdacf89adabc071543f75" + sha256 cellar: :any, arm64_sequoia: "8c988a2119282e61fbf4e03a3941e924a8bc4082489c57d75a90333fd8cd4da0" + sha256 cellar: :any, arm64_sonoma: "0dbb0ab2b0813fb92d808337c653d8b384d832b24d3f5f37ab67f9b19cf46d20" + sha256 cellar: :any, arm64_ventura: "f0ae78c43c959b67705ee5b84642a93e521e5d03e612f7486838dcfc4e2c8696" + sha256 cellar: :any, sonoma: "9634120c90c62ba5cb60f14b35202846a2f74de81a337fd18aea5bc6b3987dba" + sha256 cellar: :any, ventura: "b2e437f3451c31e0f2e35c2299e8366392fa906cfc6ac1d700198ef7bffab45b" + sha256 cellar: :any_skip_relocation, arm64_linux: "26c688fd7bf247840977ed194d72ee71094ff4a8a5d0bfc0dca6bb13cbde62cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e0a57a5ba1a3a10d2c49bec152040f606c0d9f697a92f954e9570604476e983" + end + + depends_on "lz4" + depends_on "openssl@3" + depends_on "postgresql@17" + depends_on "zstd" + + uses_from_macos "curl" + + def postgresql + deps.map(&:to_formula) + .find { |f| f.name.start_with?("postgresql@") } + end + + def install + ENV["PG_CONFIG"] = postgresql.opt_bin/"pg_config" + + system "./configure", *std_configure_args + system "make" + # Override the hardcoded install paths set by the PGXS makefiles. + system "make", "install", "bindir=#{bin}", + "datadir=#{share/postgresql.name}", + "pkglibdir=#{lib/postgresql.name}", + "pkgincludedir=#{include/postgresql.name}" + end + + test do + ENV["LC_ALL"] = "C" + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + system pg_ctl, "initdb", "-D", testpath/"test" + (testpath/"test/postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'citus' + port = #{port} + EOS + system pg_ctl, "start", "-D", testpath/"test", "-l", testpath/"log" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"citus\";", "postgres" + ensure + system pg_ctl, "stop", "-D", testpath/"test" + end + end +end diff --git a/Formula/c/cityhash.rb b/Formula/c/cityhash.rb new file mode 100644 index 0000000000000..2f6e84aa6edb0 --- /dev/null +++ b/Formula/c/cityhash.rb @@ -0,0 +1,63 @@ +class Cityhash < Formula + desc "Hash functions for strings" + homepage "https://github.com/google/cityhash" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cityhash/cityhash-1.1.1.tar.gz" + sha256 "76a41e149f6de87156b9a9790c595ef7ad081c321f60780886b520aecb7e3db4" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a48224df147a6510be1f81144df6c5060ec5c053121bed9ff26e3bc0344585ed" + sha256 cellar: :any, arm64_sequoia: "ce559172129f8c960379c6cfc4f513d8dce917f386f4471f1a1ab5766a0acffd" + sha256 cellar: :any, arm64_sonoma: "5a0d0a8fd944f2ce605734f896bf19bf634378f6754d604b026a22692f461361" + sha256 cellar: :any, arm64_ventura: "8b40df9470428bbabbd02a72658b34469a59c14d41f2782d0c6cd657aaa7613e" + sha256 cellar: :any, arm64_monterey: "a7bdc9022f63b8137aa89ffa935b059bbb00fef7a017a4e374f85a006b6a407a" + sha256 cellar: :any, arm64_big_sur: "e43f909c5fb775ca6c05675798d12343b1187820316716a844634e1a3419e21f" + sha256 cellar: :any, sonoma: "bcc3ba4da5829115dcae4e1f57a6795a33ca041d356a1f97f02a440bbe8d033a" + sha256 cellar: :any, ventura: "e28b61cd0edb007b53f6effd11dda5b1b40e694dd6fb19a23aaf2c30105e5952" + sha256 cellar: :any, monterey: "af8607ad49fe965c7d64547928d2813259a2d55dd8556f5a82bbcb6e54dfefc4" + sha256 cellar: :any, big_sur: "8ef1413a8bdd03a86b054f673462e82cdea4230fb9a75f98ada2d996bdcd0893" + sha256 cellar: :any, catalina: "ddca5903f40b8ec22ca0a2da4f116a03dc45d0f383c508f4f0370cd5899b80c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "729ba06d00e0929bb6e553259a22690423d14593d2b792695ec29ec80d21455e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f381c56f8063574fc86fa4eace73e99bf9be10155f90c1881362e70aea75826a" + end + + on_linux do + on_arm do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if OS.linux? && Hardware::CPU.arm? + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() { + const char* a = "This is my test string"; + uint64_t result = CityHash64(a, sizeof(a)); + printf("%" PRIx64 "\\n", result); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lcityhash", "-o", "test" + assert_equal "ab7a556ed7598b04", shell_output("./test").chomp + end +end diff --git a/Formula/c/civl.rb b/Formula/c/civl.rb new file mode 100644 index 0000000000000..df95847bed7cb --- /dev/null +++ b/Formula/c/civl.rb @@ -0,0 +1,54 @@ +class Civl < Formula + desc "Concurrency Intermediate Verification Language" + homepage "https://vsl.cis.udel.edu/civl/" + url "https://vsl.cis.udel.edu/lib/sw/civl/1.22/r5854/release/CIVL-1.22_5854.tgz" + version "1.22-5854" + sha256 "daf5c5a7295909d45a26d8775a8e7677495d69ab9c303638394ec189c4956b0e" + license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later", "BSD-3-Clause"] + + livecheck do + url "https://vsl.cis.udel.edu/lib/sw/civl/current/latest/release/" + regex(/href=.*?CIVL[._-]v?(\d+(?:[._-]\d+)+)\.t/i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match[0].tr("_", "-") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "71c991aa3a7b29a8c41578d2220e02bbaad9b42d000b3119a0f054bd57892f82" + end + + depends_on "openjdk" + depends_on "z3" + + def install + underscored_version = version.to_s.tr("-", "_") + libexec.install "lib/civl-#{underscored_version}.jar" + bin.write_jar_script libexec/"civl-#{underscored_version}.jar", "civl" + pkgshare.install "doc", "emacs", "licenses" + (pkgshare/"examples/concurrency/").install "examples/concurrency/locksBad.cvl" + end + + test do + (testpath/".sarl").write <<~EOS + prover { + aliases = z3; + kind = Z3; + version = "#{Formula["z3"].version} - 64 bit"; + path = "#{Formula["z3"].opt_bin}/z3"; + timeout = 10.0; + showQueries = false; + showInconclusives = false; + showErrors = true; + } + EOS + # Test with example suggested in manual. + example = pkgshare/"examples/concurrency/locksBad.cvl" + assert_match "The program MAY NOT be correct.", + shell_output("#{bin}/civl verify #{example}") + assert_path_exists testpath/"CIVLREP/locksBad_log.txt" + end +end diff --git a/Formula/c/cjdns.rb b/Formula/c/cjdns.rb new file mode 100644 index 0000000000000..979b1108443e9 --- /dev/null +++ b/Formula/c/cjdns.rb @@ -0,0 +1,47 @@ +class Cjdns < Formula + desc "Advanced mesh routing system with cryptographic addressing" + homepage "https://github.com/cjdelisle/cjdns/" + url "https://github.com/cjdelisle/cjdns/archive/refs/tags/cjdns-v22.1.tar.gz" + sha256 "3fcd4dcbfbf8d34457c6b22c1024edb8be4a771eea34391a7e7437af72f52083" + license all_of: ["GPL-3.0-or-later", "GPL-2.0-or-later", "BSD-3-Clause", "MIT"] + head "https://github.com/cjdelisle/cjdns.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d18396bceef1747e59f66a52cccbaf6b6220c4f75af427b2c165d4140cb4b537" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dad7a92383088d864b11ebfbef03b9ea181c3e89d0c38c804d895035de1a9b74" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7c7ed9f1030ae11d154c8b56ecbf1960fe592c0b40ea624bd27ac593ffeead3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "87f5189b5d62e3cd6ab280ac7b4a36c9010fbe609b430de711f4b3bdc91ff0ab" + sha256 cellar: :any_skip_relocation, sonoma: "2e182079b505d888dd89e0b828adea13b426b51cfdfc54364ef01341671efe43" + sha256 cellar: :any_skip_relocation, ventura: "939b5ef351d3ec8cb836663699f5dcdd572dcde5d9714478d3fc56fdc31b56c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d2ad655726d1aa6d7e12b602cbb2f9f8103a8bd15dc284565ffe5f1ee1cbd1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d720c9e5a2d4070720a817659ee69b25c14afbd725d772a9018bebb084a4ac75" + end + + depends_on "node" => :build + depends_on "rust" => :build + + # rust 1.89 build patch, upstream pr ref, https://github.com/cjdelisle/cjdns/pull/1271 + patch do + url "https://github.com/cjdelisle/cjdns/commit/53007ebb2e18e8052054675f979fcaeea5de0437.patch?full_index=1" + sha256 "04b9a820806a5f5318fcedae3335a5c91daeb6a52555d42b9d6120ad41ed177e" + end + + def install + system "./do" + bin.install "cjdroute" + bin.install "cjdnstool" + + man1.install "doc/man/cjdroute.1" + man5.install "doc/man/cjdroute.conf.5" + end + + test do + sample_conf = JSON.parse(shell_output("#{bin}/cjdroute --genconf")) + assert_equal "NONE", sample_conf["admin"]["password"] + + help_output = shell_output("#{bin}/cjdnstool --help") + assert_match "cexec", help_output + end +end diff --git a/Formula/c/cjson.rb b/Formula/c/cjson.rb new file mode 100644 index 0000000000000..c9ccd26f6925e --- /dev/null +++ b/Formula/c/cjson.rb @@ -0,0 +1,58 @@ +class Cjson < Formula + desc "Ultralightweight JSON parser in ANSI C" + homepage "https://github.com/DaveGamble/cJSON" + url "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.19.tar.gz" + sha256 "7fa616e3046edfa7a28a32d5f9eacfd23f92900fe1f8ccd988c1662f30454562" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3949c4efc1e2bb3de33dff83f7bb3322465f4e459b05b9c8ecafb50f9589453a" + sha256 cellar: :any, arm64_sequoia: "02864d4e743d0b31edf050ab99325b77cbd34bde4a0fee2258c4903fb7cac621" + sha256 cellar: :any, arm64_sonoma: "a55942b2cb916d0ee9e84a1d658ba2b71915296e5e9a943fb1b9f99e73449a27" + sha256 cellar: :any, arm64_ventura: "ca30e93594455cda8c6d73e1b409a0b7cb71b294d6044d5d58ea0bb6e088b648" + sha256 cellar: :any, sonoma: "38330ec91289eb1a460d5f0db4bdf61dd897d919fd1bd217eb2fd0fdf7c11fe3" + sha256 cellar: :any, ventura: "4c462770205bcd357dc350b46f6a5a3ef62f4ddf34a13d10b4064eaa57389f94" + sha256 cellar: :any_skip_relocation, arm64_linux: "3110d0581424dd08bfe03086bc2325c6c0a6610486e4f18f3453bd36d9fb36c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26f2f08e3a78ef1026622802b4147d2ba47c6ae9df9114d68343c55d6fd63183" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DENABLE_CJSON_UTILS=ON + -DENABLE_CJSON_TEST=Off + -DBUILD_SHARED_AND_STATIC_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + char *s = "{\\"key\\":\\"value\\"}"; + cJSON *json = cJSON_Parse(s); + if (!json) { + return 1; + } + cJSON *item = cJSON_GetObjectItem(json, "key"); + if (!item) { + return 1; + } + cJSON_Delete(json); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcjson", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/ckan.rb b/Formula/c/ckan.rb new file mode 100644 index 0000000000000..e9cbcf3747032 --- /dev/null +++ b/Formula/c/ckan.rb @@ -0,0 +1,39 @@ +class Ckan < Formula + desc "Comprehensive Kerbal Archive Network" + homepage "https://github.com/KSP-CKAN/CKAN/" + url "https://github.com/KSP-CKAN/CKAN/releases/download/v1.36.0/ckan.exe" + sha256 "4f0f2cf3a16d073ffddaeab68a61599b89fcf0d082a5e3d3a7276802862c1375" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "0c13567285bd77c9390aa195b9e323b21cabfdfecc58d212fb54aec8e5dbc684" + end + + depends_on "mono" + + def install + (libexec/"bin").install "ckan.exe" + (bin/"ckan").write <<~SHELL + #!/bin/sh + exec mono "#{libexec}/bin/ckan.exe" "$@" + SHELL + end + + def caveats + <<~EOS + To use the CKAN GUI, install the ckan-app cask. + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/ckan version") + + output = shell_output("#{bin}/ckan update", 1) + assert_match "I don't know where a game instance is installed", output + end +end diff --git a/Formula/c/cksfv.rb b/Formula/c/cksfv.rb new file mode 100644 index 0000000000000..9c840761ebc85 --- /dev/null +++ b/Formula/c/cksfv.rb @@ -0,0 +1,42 @@ +class Cksfv < Formula + desc "File verification utility" + homepage "https://zakalwe.fi/~shd/foss/cksfv/" + url "https://zakalwe.fi/~shd/foss/cksfv/files/cksfv-1.3.15.tar.bz2" + sha256 "a173be5b6519e19169b6bb0b8a8530f04303fe3b17706927b9bd58461256064c" + license "GPL-2.0-or-later" + + livecheck do + url "https://zakalwe.fi/~shd/foss/cksfv/files/" + regex(/href=.*?cksfv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "98f4a00c83288bac3479fcd9e301409f3445d816bad334c6bd7632f302f8b638" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96608dc540a21f5e14b2a1731b0d6350c00063db4528a1bcb56186188a157c00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "25cb1cccb8aed81f49c5c9eee87e80c6148164a13060e59f429a61d91307a1c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0664f91348b09bb20a99e87161d8d54d4ea946ff10a1f4798098441b2f1badd5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "581d29d48ab1ac605ffae68890cbd12419387331fdeb794f0055300a00af7ca5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a024ad7db7fd8bcc1ad251d6392963533b3d2733b3d9f1fa49dcdcdd11573b57" + sha256 cellar: :any_skip_relocation, sonoma: "89cb6ff3014a5bfb4616958a5970fb391432c8302547f97e5ecaec39fa2e5808" + sha256 cellar: :any_skip_relocation, ventura: "d03a7d8bb5705f8d841cc7353a0a81df246c8bcb081fb3006fa1441adf39e8d2" + sha256 cellar: :any_skip_relocation, monterey: "4d6559a12aabd7031e1a56b343681e73a378e3df6dd8eca6409089761c26e97a" + sha256 cellar: :any_skip_relocation, big_sur: "a747f42a401eae71dd1931f2d09e8d215646f645ce3024a3702b6af36b22d242" + sha256 cellar: :any_skip_relocation, catalina: "9e0b05988d3af7d666d08c8d3f4d8792f043f899a88e689d819e0b1dfd4bc2b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d94e6b9d42a2d3ce811f6cf4ed4d1a05cd76e8d77482362b0ee26dcf4c6598f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff8e6905611d7301b37271fdb5486d8d7598c4568a1035fe36269f7f97210723" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + path = testpath/"foo" + path.write "abcd" + + assert_match "#{path} ED82CD11", shell_output("#{bin}/cksfv #{path}") + end +end diff --git a/Formula/c/clac.rb b/Formula/c/clac.rb new file mode 100644 index 0000000000000..c23c767440afe --- /dev/null +++ b/Formula/c/clac.rb @@ -0,0 +1,26 @@ +class Clac < Formula + desc "Command-line, stack-based calculator with postfix notation" + homepage "https://github.com/soveran/clac" + url "https://github.com/soveran/clac/archive/refs/tags/0.3.4.tar.gz" + sha256 "3ee19329cc2e2d3a4d70eab9aa9e89f0e6f07becaa89e9156e5eb2cf94dc568a" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5d6980c6518c868fc7755967f1fb4c9e1801f01552cc273d88ef196c190f09bc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4567b96d52b717dcd08a39d9540400ec62706fef56604355c19d97be23fa263" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7c0e290434255b7da84b9f7338d97fdfebfd94f1d644354630e7f4da4db61dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18c5e0e27145bcbf03d697cad009393e0cc358a5c68d02a18d10f0d97934b9c5" + sha256 cellar: :any_skip_relocation, sonoma: "99f0efd095f5a0ae1da2ed0251a1753cce042069a49a299c29b17c8edfc5c558" + sha256 cellar: :any_skip_relocation, ventura: "f4b1d600a712d9d93e03393fc16bc762f6aeb33edd9840fb0df0d9d79aca8e47" + sha256 cellar: :any_skip_relocation, arm64_linux: "72f2128ed4ab7836c72efdb33e23fc6376a383e9f0bdc057490c2f7cf9b67339" + sha256 cellar: :any_skip_relocation, x86_64_linux: "388b23eacd1cd72f8101ce8f2858d9ad232de844cdcf7f3a9948f98e5d56cea2" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + assert_equal "7", shell_output("#{bin}/clac '3 4 +'").strip + end +end diff --git a/Formula/c/clair.rb b/Formula/c/clair.rb new file mode 100644 index 0000000000000..d02acd18ac6f2 --- /dev/null +++ b/Formula/c/clair.rb @@ -0,0 +1,55 @@ +class Clair < Formula + desc "Vulnerability Static Analysis for Containers" + homepage "https://github.com/quay/clair" + url "https://github.com/quay/clair/archive/refs/tags/v4.8.0.tar.gz" + sha256 "354cfddb1e4594fd5982fdf55096f8b0e19649bcc5024156170a409aabcf3081" + license "Apache-2.0" + head "https://github.com/quay/clair.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ffe483117f1b13ffd763e48a0aac9971d8abdef55e907df19e58827db27c6b6d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f5862c80475a7b964fb8c18e038f7b209e13fc8952a8ca72e80cea7dddff7e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f5862c80475a7b964fb8c18e038f7b209e13fc8952a8ca72e80cea7dddff7e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f5862c80475a7b964fb8c18e038f7b209e13fc8952a8ca72e80cea7dddff7e2" + sha256 cellar: :any_skip_relocation, sonoma: "09f69fddde54e84dbe00daf2152697499f26c31736bb91666d23daafc55e6fd6" + sha256 cellar: :any_skip_relocation, ventura: "09f69fddde54e84dbe00daf2152697499f26c31736bb91666d23daafc55e6fd6" + sha256 cellar: :any_skip_relocation, arm64_linux: "58d1cd30b14ef94926e917fc0ce7bff127d5542f9fde081377c347f5639cd185" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3bd46a3c89a414ca9d775b54ebfc1e1fd15c72be92fe5897ef1218fe151a42f" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/clair" + (etc/"clair").install "config.yaml.sample" + end + + test do + http_port = free_port + db_port = free_port + (testpath/"config.yaml").write <<~YAML + --- + introspection_addr: "localhost:#{free_port}" + http_listen_addr: "localhost:#{http_port}" + indexer: + connstring: host=localhost port=#{db_port} user=clair dbname=clair sslmode=disable + matcher: + indexer_addr: "localhost:#{http_port}" + connstring: host=localhost port=#{db_port} user=clair dbname=clair sslmode=disable + notifier: + indexer_addr: "localhost:#{http_port}" + matcher_addr: "localhost:#{http_port}" + connstring: host=localhost port=#{db_port} user=clair dbname=clair sslmode=disable + YAML + + output = shell_output("#{bin}/clair -conf #{testpath}/config.yaml -mode combo 2>&1", 1) + # requires a Postgres database + assert_match "service initialization failed: failed to initialize indexer: failed to create ConnPool", output + end +end diff --git a/Formula/c/clamav.rb b/Formula/c/clamav.rb new file mode 100644 index 0000000000000..a91a90660df32 --- /dev/null +++ b/Formula/c/clamav.rb @@ -0,0 +1,85 @@ +class Clamav < Formula + desc "Anti-virus software" + homepage "https://www.clamav.net/" + url "https://github.com/Cisco-Talos/clamav/releases/download/clamav-1.5.1/clamav-1.5.1.tar.gz" + mirror "https://www.clamav.net/downloads/production/clamav-1.5.1.tar.gz" + sha256 "64fe4a16a5622c1d71efe9ed7f2c2fbd37f8f237da9f11ff66b73038df71db91" + license "GPL-2.0-or-later" + head "https://github.com/Cisco-Talos/clamav.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "f9061e21e5e8be51c643545c9fc6aa4dbfaef9294c12c36fa29e9575b46db211" + sha256 arm64_sequoia: "1556cc710f507cd3ba785385a840522136aa3bf23f442d2356848f64316c6a62" + sha256 arm64_sonoma: "be240b782663b9a07eead860d8637d184d0ce4c150af1ed0b75c68cf12824100" + sha256 sonoma: "8a53341ce3a8a53afb34938cc95f2f3830c8eabb46899ef7571f0eef65cc2c59" + sha256 arm64_linux: "16dc07361e61b82370eed46a4404c40be03dcc47e38e7edabc5dc087479f59c2" + sha256 x86_64_linux: "f6e72d49678590c275b2feb564926d5d7ad8c64525289c47fed5880d0d674f87" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "json-c" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "yara" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + skip_clean "share/clamav" + + def install + args = %W[ + -DAPP_CONFIG_DIRECTORY=#{etc}/clamav + -DDATABASE_DIRECTORY=#{var}/lib/clamav + -DENABLE_JSON_SHARED=ON + -DENABLE_STATIC_LIB=ON + -DENABLE_SHARED_LIB=ON + -DENABLE_EXAMPLES=OFF + -DENABLE_TESTS=OFF + -DENABLE_MILTER=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"lib/clamav").mkpath + end + + service do + run [opt_sbin/"clamd", "--foreground"] + keep_alive true + require_root true + end + + def caveats + <<~EOS + To finish installation & run clamav you will need to edit + the example conf files at #{etc}/clamav/ + EOS + end + + test do + assert_match "Database directory: #{var}/lib/clamav", shell_output("#{bin}/clamconf") + + (testpath/"freshclam.conf").write <<~EOS + DNSDatabaseInfo current.cvd.clamav.net + DatabaseMirror database.clamav.net + EOS + + system bin/"freshclam", "--datadir=#{testpath}", "--config-file=#{testpath}/freshclam.conf" + system bin/"clamscan", "--database=#{testpath}", testpath + end +end diff --git a/Formula/c/clamz.rb b/Formula/c/clamz.rb new file mode 100644 index 0000000000000..380434aebbe4d --- /dev/null +++ b/Formula/c/clamz.rb @@ -0,0 +1,42 @@ +class Clamz < Formula + desc "Download MP3 files from Amazon's music store" + homepage "https://code.google.com/archive/p/clamz/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/clamz/clamz-0.5.tar.gz" + sha256 "5a63f23f15dfa6c2af00ff9531ae9bfcca0facfe5b1aa82790964f050a09832b" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0d263cb2b16259b06794b4470e155967eab994f538c670fdcb2db680c5c5f03f" + sha256 cellar: :any, arm64_sequoia: "60807a8f262d22bbae1e13db11d9a7d9765896cc3c0e08ab919194f94e114705" + sha256 cellar: :any, arm64_sonoma: "5a7a2bdd3815fdb9fd2647df980edcb43919b173cde53f5fd298b381b231d943" + sha256 cellar: :any, arm64_ventura: "b862bbcf8083563c7cd92b4325eabe6d69c8b7b178dd999181c2f0daa000e400" + sha256 cellar: :any, arm64_monterey: "33fb7758d8552198b057d9ee8b7bf3e5c1e3b4ba580deb9a00f44edc468feda6" + sha256 cellar: :any, arm64_big_sur: "865348260858f74e779a47308f521ad54168b7a5d521313993a5f7f28fa53f44" + sha256 cellar: :any, sonoma: "e154f03f65107c9f7b3527cfc5d60bc42073ee99e0345c3c250e71a09333d6d6" + sha256 cellar: :any, ventura: "b86ee0daaee591232ce488b2a0a6e5d13266b59d715bba72e9e1158b2c6376fc" + sha256 cellar: :any, monterey: "60b4d942e6b8fb59c134cd5776893216f6f5c9d44ac39023c81e1ed43f761e75" + sha256 cellar: :any, big_sur: "d7f6f8dc57d5498a54cd78356bc3097aa713a9000e876a6d3aaa12a10540d9d4" + sha256 cellar: :any, catalina: "6dc5a22ec8b190b91bc3e825a23063f6096f447ed24cabf6d5bcb19da8ef58f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "57bbb9e4a40a6fba879e65f49b79177fe87c2c6a0592b4b06abc4a937535071c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bedccbcf92f7884cf99615ea347345f035a6693e953b6ebf90e51695e4351c95" + end + + depends_on "pkgconf" => :build + depends_on "libgcrypt" + depends_on "libgpg-error" + + uses_from_macos "curl" + uses_from_macos "expat" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/clamz --version 2>&1") + end +end diff --git a/Formula/c/clang-build-analyzer.rb b/Formula/c/clang-build-analyzer.rb new file mode 100644 index 0000000000000..fc35c4869ae93 --- /dev/null +++ b/Formula/c/clang-build-analyzer.rb @@ -0,0 +1,39 @@ +class ClangBuildAnalyzer < Formula + desc "Tool to analyze compilation time" + homepage "https://github.com/aras-p/ClangBuildAnalyzer" + url "https://github.com/aras-p/ClangBuildAnalyzer/archive/refs/tags/v1.6.0.tar.gz" + sha256 "868a8d34ecb9b65da4e5874342062a12c081ce4385c7ddd6ce7d557a0c5c292d" + license all_of: ["Unlicense", "Zlib", "MIT", "BSL-1.0", "BSD-3-Clause", "Apache-2.0", + "BSD-2-Clause", "Apache-2.0" => { with: "LLVM-exception" }] + head "https://github.com/aras-p/ClangBuildAnalyzer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "14419000811d5bef08eaa62f796264dc5268bb9a95a7b907c6e38936f06ab1ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e93f14923fdb699565dced9177cb214af4e3da61fca3d4de41461eefa32c0b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "85f62673e238f3a630999432c37ba819a013b594b81df913fe28a90a66801e17" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1fd243d037fbb89eaf7fdb5283d6154c7b8f0140b4507c5384c8c2b318d3c710" + sha256 cellar: :any_skip_relocation, sonoma: "d4af487341370185ae6ebb035629646ffcfc5590961e8250eba3b93e82618ef6" + sha256 cellar: :any_skip_relocation, ventura: "408f71d00639f0865e7d41c01b54406c490e5ac27bbece37352ae90b1d443512" + sha256 cellar: :any_skip_relocation, arm64_linux: "72c0d64de559f8b07488a1d052faf7790fa89194449e5a349a4acb6fa120c919" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcdefa484105d4b981757deb4ce19d98c2c5fb8eda65ba1ccbb332958188e064" + end + + depends_on "cmake" => :build + uses_from_macos "llvm" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cxx").write <<~CPP + int main() {} + CPP + ENV.clang + system ENV.cxx, "-c", "-ftime-trace", testpath/"test.cxx" + system bin/"ClangBuildAnalyzer", "--all", testpath, "test.db" + system bin/"ClangBuildAnalyzer", "--analyze", "test.db" + end +end diff --git a/Formula/c/clang-format.rb b/Formula/c/clang-format.rb new file mode 100644 index 0000000000000..67a3caab4c071 --- /dev/null +++ b/Formula/c/clang-format.rb @@ -0,0 +1,109 @@ +class ClangFormat < Formula + desc "Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript" + homepage "https://clang.llvm.org/docs/ClangFormat.html" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + version_scheme 1 + head "https://github.com/llvm/llvm-project.git", branch: "main" + + stable do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.5/llvm-21.1.5.src.tar.xz" + sha256 "c9d6ca5073255192850471a276b3a00a6555c6dd09df6cb3eab77801f0a1cae0" + + resource "clang" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.5/clang-21.1.5.src.tar.xz" + sha256 "eee4de3b3f01ea6dd6b0936ac8be319eef0a65d0022def258c70110e3743807c" + + livecheck do + formula :parent + end + end + + resource "cmake" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.5/cmake-21.1.5.src.tar.xz" + sha256 "48013d5714a96419bf993a2e5e4c5827377e8cf9c565070731fb2305d50d9511" + + livecheck do + formula :parent + end + end + + resource "third-party" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.5/third-party-21.1.5.src.tar.xz" + sha256 "4ccc00ec2e7bd0cc121eaa34fa25a0480bfb8a5722faf1694720e0be99b753e6" + + livecheck do + formula :parent + end + end + end + + livecheck do + url :stable + regex(/llvmorg[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2ba9a5248830b4f0ae5826b72817d3856742e747c129e3d87212a3bbc10f4765" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5015d5ed204d6ce1476250ac2e320b9c1fd6bc7ec18d5bc0ccebaa1808c4a0c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b1ea4471139715bd24eeecd14d217aa7ff3b473af8872f1c05219e5bc47c43a" + sha256 cellar: :any_skip_relocation, sonoma: "f1b2bcce8f182825860dca57c0efc859ec2bd2f049280dd22e4443239ce90877" + sha256 cellar: :any_skip_relocation, arm64_linux: "6765ebbad06995cea97f46efe0568b9ab52a8bb125a608ed8e5a2569f53e5fee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1f6eb4e7a881a4e46542c060f7592c857e5b923d7445751c5bf057b594d8564" + end + + depends_on "cmake" => :build + + uses_from_macos "python" + + on_linux do + keg_only "it conflicts with llvm" + end + + def install + odie "clang resource needs to be updated" if build.stable? && version != resource("clang").version + odie "cmake resource needs to be updated" if build.stable? && version != resource("cmake").version + odie "third-party resource needs to be updated" if build.stable? && version != resource("third-party").version + + llvmpath = if build.head? + ln_s buildpath/"clang", buildpath/"llvm/tools/clang" + + buildpath/"llvm" + else + (buildpath/"src").install buildpath.children + (buildpath/"src/tools/clang").install resource("clang") + (buildpath/"cmake").install resource("cmake") + (buildpath/"third-party").install resource("third-party") + + buildpath/"src" + end + + system "cmake", "-S", llvmpath, "-B", "build", + "-DLLVM_EXTERNAL_PROJECTS=clang", + "-DLLVM_INCLUDE_BENCHMARKS=OFF", + *std_cmake_args + system "cmake", "--build", "build", "--target", "clang-format" + + bin.install "build/bin/clang-format" + bin.install llvmpath/"tools/clang/tools/clang-format/git-clang-format" + (share/"clang").install llvmpath.glob("tools/clang/tools/clang-format/clang-format*") + end + + test do + system "git", "init" + system "git", "commit", "--allow-empty", "-m", "initial commit", "--quiet" + + # NB: below C code is messily formatted on purpose. + (testpath/"test.c").write <<~C + int main(char *args) { \n \t printf("hello"); } + C + system "git", "add", "test.c" + + assert_equal "int main(char* args) { printf(\"hello\"); }\n", + shell_output("#{bin}/clang-format -style=Google test.c") + + ENV.prepend_path "PATH", bin + assert_match "test.c", shell_output("git clang-format", 1) + end +end diff --git a/Formula/c/clang-format@11.rb b/Formula/c/clang-format@11.rb new file mode 100644 index 0000000000000..31167bdd454f1 --- /dev/null +++ b/Formula/c/clang-format@11.rb @@ -0,0 +1,56 @@ +class ClangFormatAT11 < Formula + desc "Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript" + homepage "https://clang.llvm.org/docs/ClangFormat.html" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/llvm-11.1.0.src.tar.xz" + sha256 "ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "85290508842e9f1649d4faa323396d04640dec3435cf08e62bacb90b1da36986" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6042bc3d6961fbe848bedd13b7e0f45a351d0e843091e14235e616622d128b00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d680a9a2a892531dfd38de0cd43dee55268a7eafea7ab72f21b00f06705a04fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1948c72aaec14b99817bf4fff1b6e07172f57975318a0b570c01f35be45cdd98" + sha256 cellar: :any_skip_relocation, arm64_monterey: "04eb4f41a69b4e4f1c3d4b020cfcafe07556fec0ce45bc2ffb1ad858e8ce389c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "08840589ede996c8040c994dbf2fd257892fbab226721bd4212f759bb88ecf08" + sha256 cellar: :any_skip_relocation, sonoma: "ed31b4214f10d7c730040ef07fba68c7eb2cf99ff6e8118feda8c02114c16fa2" + sha256 cellar: :any_skip_relocation, ventura: "155903a7ad58a6f720625d6690e892003c3e8b743df77a9f24d2007df207e48f" + sha256 cellar: :any_skip_relocation, monterey: "e59f3acdd1ccb01100c1e22093b61c5d442b3eb290857e9226ace3e070376b20" + sha256 cellar: :any_skip_relocation, big_sur: "d05a3e8c962d0170d27dd1cba184cd9fc7fabad7792e60402dc530c1849b33f6" + sha256 cellar: :any_skip_relocation, catalina: "34600b6ed222dfaa3ad410e6abbbc2ec86da0cc8f6906156d443665f57472db0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b4ef3bd69407a87625451feb91e7487e215d247de4d5c7308953ec3a12fa6ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd67883368c8948f35545a2bce2356f8af91f1c518b17e5e41fc95d286dc9a00" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + uses_from_macos "ncurses" + uses_from_macos "zlib" + + resource "clang" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang-11.1.0.src.tar.xz" + sha256 "0a8288f065d1f57cb6d96da4d2965cbea32edc572aa972e466e954d17148558b" + end + + def install + (buildpath/"tools/clang").install resource("clang") + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build", "--target", "clang-format" + + bin.install buildpath/"build/bin/clang-format" => "clang-format-11" + bin.install buildpath/"tools/clang/tools/clang-format/git-clang-format" => "git-clang-format-11" + end + + test do + # NB: below C code is messily formatted on purpose. + (testpath/"test.c").write <<~C + int main(char *args) { \n \t printf("hello"); } + C + + assert_equal "int main(char *args) { printf(\"hello\"); }\n", + shell_output("#{bin}/clang-format-11 -style=Google test.c") + end +end diff --git a/Formula/c/clang-include-graph.rb b/Formula/c/clang-include-graph.rb new file mode 100644 index 0000000000000..3f2caae117fd8 --- /dev/null +++ b/Formula/c/clang-include-graph.rb @@ -0,0 +1,93 @@ +class ClangIncludeGraph < Formula + desc "Simple tool for visualizing and analyzing C/C++ project include graph" + homepage "https://github.com/bkryza/clang-include-graph" + url "https://github.com/bkryza/clang-include-graph/archive/refs/tags/0.2.0.tar.gz" + sha256 "174bbf961a2426030102bcf444eb2ca4ac10c05cfd5b993fef24bf4d492c420c" + license "Apache-2.0" + revision 1 + head "https://github.com/bkryza/clang-include-graph.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "aad5df5768245a0b88ceff76506a765f0df23bd8155314672078c8c7f908c1c7" + sha256 cellar: :any, arm64_sequoia: "1dcf28b2cb5e85ce7e9e4df7b49116379b136a29080b2b24352abf9506d929ab" + sha256 cellar: :any, arm64_sonoma: "c5c859ea9dc8db2514453cebfaf4846f3acf6161ea8d61af7094e796cb89ae78" + sha256 cellar: :any, arm64_ventura: "3c49c334711fc607b50f515649c0b5f672115d96730277e470cbc257814080fa" + sha256 cellar: :any, sonoma: "0208ffb84627e2640ae7ac5116404135521bc06dc9d26bd89c54ed93828d253d" + sha256 cellar: :any, ventura: "2881cc324541f78701595a7da62ad81953008c4a94dd83731d07fa1051f62ca8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7c5ea386dc885ad6201ae8f87d5c147fa8734b210b4f762fed674583290f52e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d2c12a4e136658553b94afc26a1e7b152f20613e414e79302d87a618ee40ac3e" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "llvm" + + def llvm + deps.map(&:to_formula) + .find { |f| f.name.match?(/^llvm(@\d+)?$/) } + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: llvm.opt_lib)}" if OS.linux? && llvm.versioned_formula? + args = %w[ + -DBUILD_TESTS=OFF + ] + + # If '.git' directory is not available during build, we need + # to provide the version using a CMake option + args << "-DGIT_VERSION=#{version}" if build.stable? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Check if clang-include-graph is linked properly + system bin/"clang-include-graph", "--version" + system bin/"clang-include-graph", "--help" + + # Initialize a minimal C++ CMake project and try to generate a + # PlantUML diagram from it + (testpath/"test.h").write <<~CPP + #pragma once + namespace A { + struct AA { size_t s; }; + } + CPP + (testpath/"test.cc").write <<~CPP + #include "test.h" + #include + int main(int argc, char** argv) { A::AA a; return 0; } + CPP + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.15) + + project(clang-include-graph-test CXX) + + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + + add_executable(clang-include-graph-test test.cc) + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + + system bin/"clang-include-graph", "-d", testpath/"build", "--plantuml", + "--relative-to", testpath, "--relative-only", "--output", testpath/"test.puml" + + expected_output = Regexp.new(<<~EOS, Regexp::MULTILINE) + @startuml + file "test.h" as F_0 + file "test.cc" as F_1 + F_0 <-- F_1 + @enduml + EOS + + assert_path_exists testpath/"test.puml" + + assert_match expected_output, (testpath/"test.puml").read + end +end diff --git a/Formula/c/clang-uml.rb b/Formula/c/clang-uml.rb new file mode 100644 index 0000000000000..04a699737b4d0 --- /dev/null +++ b/Formula/c/clang-uml.rb @@ -0,0 +1,101 @@ +class ClangUml < Formula + desc "Customizable automatic UML diagram generator for C++ based on Clang" + homepage "https://github.com/bkryza/clang-uml" + url "https://github.com/bkryza/clang-uml/archive/refs/tags/0.6.2.tar.gz" + sha256 "004540c328699f81abebceb33a4661b548ab3a5f74096da2c025b9971b2b17ff" + license "Apache-2.0" + revision 1 + head "https://github.com/bkryza/clang-uml.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "94db4fad5ce558e1a5e168f27b2e376a02fdfa4228974a58f425a2ede82a9152" + sha256 cellar: :any, arm64_sequoia: "1aa0e9d5dc458d3bca6664861311b45e3dcc08a38af59064bc73b5d1d0fdb997" + sha256 cellar: :any, arm64_sonoma: "9409c54c5f610eac2f82d7da271e3acb10d70779fb0485ef4c91175e19c613ce" + sha256 cellar: :any, arm64_ventura: "e6d5bd9d6d67fd95d41493d856a64599d93a914698e7f336f36b7deaf1142523" + sha256 cellar: :any, sonoma: "04b037156babbfc2e70fca150f5951175b281f576d13da8fa91aa637747c2bb8" + sha256 cellar: :any, ventura: "303669e141b74c565d7908a283ae344ac5df43eb5e12eebd2c4d0cb4bbae9059" + sha256 cellar: :any_skip_relocation, arm64_linux: "2607fb8181dff212b77959e57371b6285067db22235a48fba19e0888070bf3d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70c49308718e4d29cc4b6b1670b902e596599a87af20563f1af2da2bf4ba0d94" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "llvm" + depends_on "yaml-cpp" + + def llvm + deps.map(&:to_formula) + .find { |f| f.name.match?(/^llvm(@\d+)?$/) } + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: llvm.opt_lib)}" if OS.linux? && llvm.versioned_formula? + args = %w[ + -DBUILD_TESTS=OFF + ] + + # If '.git' directory is not available during build, we need + # to provide the version using a CMake option + args << "-DGIT_VERSION=#{version}" if build.stable? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bash_completion.install "packaging/autocomplete/clang-uml" + zsh_completion.install "packaging/autocomplete/_clang-uml" + end + + test do + # Check if clang-uml is linked properly + system bin/"clang-uml", "--version" + system bin/"clang-uml", "--help" + + # Initialize a minimal C++ CMake project and try to generate a + # PlantUML diagram from it + (testpath/"test.cc").write <<~CPP + #include + namespace A { + struct AA { size_t s; }; + } + int main(int argc, char** argv) { A::AA a; return 0; } + CPP + (testpath/".clang-uml").write <<~YAML + compilation_database_dir: build + output_directory: diagrams + diagrams: + test_class: + type: class + include: + namespaces: + - A + YAML + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.15) + + project(clang-uml-test CXX) + + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + + add_executable(clang-uml-test test.cc) + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + + system bin/"clang-uml", "--no-metadata", "--query-driver", "." + + expected_output = Regexp.new(<<~EOS, Regexp::MULTILINE) + @startuml + class "A::AA" as C_\\d+ + class C_\\d+ { + __ + \\+s : size_t + } + @enduml + EOS + + assert_path_exists testpath/"diagrams"/"test_class.puml" + + assert_match expected_output, (testpath/"diagrams/test_class.puml").read + end +end diff --git a/Formula/c/clangql.rb b/Formula/c/clangql.rb new file mode 100644 index 0000000000000..ea091310a3f05 --- /dev/null +++ b/Formula/c/clangql.rb @@ -0,0 +1,38 @@ +class Clangql < Formula + desc "Run a SQL like language to perform queries on C/C++ files" + homepage "https://github.com/AmrDeveloper/ClangQL" + url "https://github.com/AmrDeveloper/ClangQL/archive/refs/tags/0.10.0.tar.gz" + sha256 "216a8faf76cd59f149bac4800cf7bebd5c709d6f97abbe4fffde2f9585f7c518" + license "MIT" + head "https://github.com/AmrDeveloper/ClangQL.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5484745fc6477175c2d3ff2a4e66d362db6e5a515a2b35d87d9f7ab8351a0bdf" + sha256 cellar: :any, arm64_sequoia: "4d7d3dec4acffb5b26561003d115b54fb8c0ca6c137e5796ffc97e21c0a5d521" + sha256 cellar: :any, arm64_sonoma: "35f90c49a03e4b853dfbf18b9dd32f1c42f84ca169937c500e6ed905c02663d3" + sha256 cellar: :any, arm64_ventura: "f604b5653930a425e60e2cc950b37d8e29a03d376c9274a0593238c40120047c" + sha256 cellar: :any, sonoma: "0f65e6b0883e4400c4e34d798512f45ec72418f20032b58d6df2584d0890a2dd" + sha256 cellar: :any, ventura: "699ff49df43c3573ec8af08088f74a3cf22446455b3a04ad70236f1119963f74" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4f5f96f98ecc434bb4384c83c3d5d1e9569b3865b037749ac54ba12806d4ff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc5764fcf9ee640feb9dc8867101bfc613365aa5c96963d16070486039acc88f" + end + + depends_on "rust" => :build + depends_on "llvm" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.c").write <<~C + int main() + { + return 0; + } + C + + output = JSON.parse(shell_output("#{bin}/clangql -f test.c -q 'SELECT name FROM functions' -o json")) + assert_equal "main", output.first["name"] + end +end diff --git a/Formula/c/clarinet.rb b/Formula/c/clarinet.rb new file mode 100644 index 0000000000000..74d8952ed8a14 --- /dev/null +++ b/Formula/c/clarinet.rb @@ -0,0 +1,34 @@ +class Clarinet < Formula + desc "Command-line tool and runtime for the Clarity smart contract language" + homepage "https://www.hiro.so/clarinet" + url "https://github.com/hirosystems/clarinet/archive/refs/tags/v3.8.1.tar.gz" + sha256 "421193b19d89c7a1e01cac9fe0c7a18549bc26d9954c59e6681106b2a4403bbc" + license "GPL-3.0-only" + head "https://github.com/hirosystems/clarinet.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4e28eb85cee90900ded151418b127065cd3b1a062fd06d50a9bf04e63e11ec73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "98b04240ac72915d99887ef54377c63c9ecd2df29c85f7ca7afc86acd6f75f31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3cef0ae12e1ff2ea32463ca943e17fdd2de4201264e834c4ec0136fbee368da0" + sha256 cellar: :any_skip_relocation, sonoma: "98a0cbcea99b17eb542ef0c5483180e588d0f4870b4998960c30bf7e6831ae59" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a0834f30a483741dea101912a79a7a46daaf1654ccd57e5879fec3f62dadf77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6edd941df6de42e8081856ff976adf7c48bee118534a504d00bd41fa7e384fc" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "components/clarinet-cli") + end + + test do + pipe_output("#{bin}/clarinet new test-project", "n\n") + assert_match "name = \"test-project\"", (testpath/"test-project/Clarinet.toml").read + system bin/"clarinet", "check", "--manifest-path", "test-project/Clarinet.toml" + end +end diff --git a/Formula/c/classads.rb b/Formula/c/classads.rb new file mode 100644 index 0000000000000..714c943b982df --- /dev/null +++ b/Formula/c/classads.rb @@ -0,0 +1,70 @@ +class Classads < Formula + desc "Classified Advertisements (used by HTCondor Central Manager)" + homepage "https://research.cs.wisc.edu/htcondor/classad/" + url "https://ftp.cs.wisc.edu/condor/classad/c++/classads-1.0.10.tar.gz" + sha256 "cde2fe23962abb6bc99d8fc5a5cbf88f87e449b63c6bca991d783afb4691efb3" + license "Apache-2.0" + + livecheck do + url :homepage + regex(/href=.*?classads[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "246c662700cc0ac2a7d9e7e5bf715215a00d01cf386d6ef285c071e090384efb" + sha256 cellar: :any, arm64_sequoia: "5ed81428780f7cec908f7100cf6acaa0e6dc048636e9b0154c50b45ac4373e13" + sha256 cellar: :any, arm64_sonoma: "661d3187c8f61482409ea38879746f2d43e6f2a910b8ea361b4e3507668383af" + sha256 cellar: :any, arm64_ventura: "0eab6257d1140e45a9de7be3672d4d78e62a639348cc30b00fab1f68048b5e84" + sha256 cellar: :any, arm64_monterey: "7f4e50e3dc7c4c163e872815a050edb28feca33f5a56998023a187f11da1fcae" + sha256 cellar: :any, arm64_big_sur: "86c8c701a789392ad203154ec4dc6a7cd41401bdd0e667ce2c830c171f94bfd5" + sha256 cellar: :any, sonoma: "fa2d8e7c0713d7cdcf49ffe76d836058aa692553b6e6a970cda711696fa31680" + sha256 cellar: :any, ventura: "ea9ce2a0d341634d85367e39140f3e3aa7921e94830cdfe9c9f748acb35d857b" + sha256 cellar: :any, monterey: "3543be5b0a443e9600bab626a336244bdee95bf7a79856def626e740e6d0a0f8" + sha256 cellar: :any, big_sur: "738e16888e4030668b0bf2b7fe190b559b4c1d92dfcd09f95f190cef8deddcfb" + sha256 cellar: :any, catalina: "6217077882b497726e1b05407038fcff6ae512cabe8580f35731c5c3a3523538" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5e99703af8185a5f39c39f6bf7f56707c17bab75d5a599c40294925d8f1d94e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21874caebbec12fa4ee41c6f4830146dc725dfec2658b8c08eb02dc7d2585583" + end + + # PCRE2 commit ref: https://github.com/htcondor/htcondor/commit/b7d84f79384dec9c500611afed87d71d77148176 + depends_on "pcre" # PCRE2 needs new release. Upstream fix in HTCondor requires new CMake build system. + + on_macos do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # Allow compilation on ARM, where finite() is not available. + # Different fix upstream: https://github.com/htcondor/htcondor/commit/ae841558fcffa4cad12f019975292ad27b917f47 + patch :DATA + + def install + args = ["--enable-namespace"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + # Run autoreconf on macOS to rebuild configure script so that it doesn't try + # to build with a flat namespace. + system "autoreconf", "--force", "--verbose", "--install" if OS.mac? + system "./configure", *args, *std_configure_args + system "make", "install" + end +end + +__END__ +diff -pur classads-1.0.10/util.cpp classads-1.0.10-new/util.cpp +--- classads-1.0.10/util.cpp 2011-04-09 01:36:36 ++++ classads-1.0.10-new/util.cpp 2022-11-10 11:16:47 +@@ -430,7 +430,7 @@ int classad_isinf(double x) + #endif + int classad_isinf(double x) + { +- if (finite(x) || x != x) { ++ if (isfinite(x) || x != x) { + return 0; + } else if (x > 0) { + return 1; diff --git a/Formula/c/claude-cmd.rb b/Formula/c/claude-cmd.rb new file mode 100644 index 0000000000000..69c2e69357c29 --- /dev/null +++ b/Formula/c/claude-cmd.rb @@ -0,0 +1,23 @@ +class ClaudeCmd < Formula + desc "Claude Code Commands Manager" + homepage "https://github.com/kiliczsh/claude-cmd" + url "https://registry.npmjs.org/claude-cmd/-/claude-cmd-1.1.1.tgz" + sha256 "c6b990f7c55ec1281dca603b284d55b468ca7bbdfe217fc8091f5a8f85f16367" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5ae7ff8473e44498a079bf31fc5072742d7104998ac1ecd499706159d4136fa6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/claude-cmd list") + assert_match "No commands installed yet", output + end +end diff --git a/Formula/c/claude-code-router.rb b/Formula/c/claude-code-router.rb new file mode 100644 index 0000000000000..cb21132fd8fcd --- /dev/null +++ b/Formula/c/claude-code-router.rb @@ -0,0 +1,23 @@ +class ClaudeCodeRouter < Formula + desc "Tool to route Claude Code requests to different models and customize any request" + homepage "https://github.com/musistudio/claude-code-router" + url "https://registry.npmjs.org/@musistudio/claude-code-router/-/claude-code-router-1.0.65.tgz" + sha256 "47c1b64a75bc554d6de540cde652b6c77591cc6edc6068e82fde04368382be16" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "65572088d2d4b1c7185c79f140cd53c12785423d315da5dfb7ce2916113ef344" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/ccr version") + assert_match "Status: Not Running", shell_output("#{bin}/ccr status") + end +end diff --git a/Formula/c/claude-code-templates.rb b/Formula/c/claude-code-templates.rb new file mode 100644 index 0000000000000..4699d69c2e165 --- /dev/null +++ b/Formula/c/claude-code-templates.rb @@ -0,0 +1,25 @@ +class ClaudeCodeTemplates < Formula + desc "CLI tool for configuring and monitoring Claude Code" + homepage "https://www.aitmpl.com/agents" + url "https://registry.npmjs.org/claude-code-templates/-/claude-code-templates-1.27.0.tgz" + sha256 "3ee7fa8c3a60d2fe5bb7cd8650381a337af803acbd55dc47314292930d4bf770" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "29a77311b7c48121d23552b94157e98d776ce0da5f3e55d8fa034b8e83526a94" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/cct --version") + + output = shell_output("#{bin}/cct --command testing/generate-tests --yes") + assert_match "Successfully installed 1 components", output + end +end diff --git a/Formula/c/claude-hooks.rb b/Formula/c/claude-hooks.rb new file mode 100644 index 0000000000000..296b589954798 --- /dev/null +++ b/Formula/c/claude-hooks.rb @@ -0,0 +1,25 @@ +class ClaudeHooks < Formula + desc "Hook system for Claude Code" + homepage "https://github.com/johnlindquist/claude-hooks" + url "https://registry.npmjs.org/claude-hooks/-/claude-hooks-2.4.0.tgz" + sha256 "b55f6dbdec8ec51f26f459bf2888ae9cd6deae1a1e3ac992904080e118b6e80b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a8961c6143bc341ef7586a528fa3d52f32c72463e9ef14b8bf73f3aaeaee273e" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/claude-hooks --version") + + output = shell_output("#{bin}/claude-hooks init 2>&1", 1) + assert_match "Claude Hooks Setup", output + end +end diff --git a/Formula/c/claude-squad.rb b/Formula/c/claude-squad.rb new file mode 100644 index 0000000000000..139acd40a31b8 --- /dev/null +++ b/Formula/c/claude-squad.rb @@ -0,0 +1,31 @@ +class ClaudeSquad < Formula + desc "Manage multiple AI agents like Claude Code, Aider and Codex in your terminal" + homepage "https://smtg-ai.github.io/claude-squad/" + url "https://github.com/smtg-ai/claude-squad/archive/refs/tags/v1.0.13.tar.gz" + sha256 "f621646464912f19196e1bf9da928fb3230854917d0cdfa112db4229f9e18053" + license "AGPL-3.0-only" + head "https://github.com/smtg-ai/claude-squad.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e0b1bb8aa53f96586525577631be36fc7b2a9b04eb812cda3bbfdb1c706e6d7c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1cfac1e30a04b1c13f84169a26471b35e1dfa316235c3a20078304cfa840f9ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1cfac1e30a04b1c13f84169a26471b35e1dfa316235c3a20078304cfa840f9ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1cfac1e30a04b1c13f84169a26471b35e1dfa316235c3a20078304cfa840f9ed" + sha256 cellar: :any_skip_relocation, sonoma: "cc839785050b1cda8d2a5994c87b6424e9cbb6bf7e44956e781a6e3f27f45501" + sha256 cellar: :any_skip_relocation, ventura: "cc839785050b1cda8d2a5994c87b6424e9cbb6bf7e44956e781a6e3f27f45501" + sha256 cellar: :any_skip_relocation, arm64_linux: "df6a88d6bbda2a5bae08218ba787e5c274c0541f5589c613925ec9a65b87f25a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccdf7ad9252d0b8921928319a70fc9afcb63a1cc1a2b90f6e0255eda0e0b336b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"claude-squad", "completion") + end + + test do + output = shell_output(bin/"claude-squad") + assert_includes output, "claude-squad must be run from within a git repository" + end +end diff --git a/Formula/c/claudekit.rb b/Formula/c/claudekit.rb new file mode 100644 index 0000000000000..24b4c64005cf2 --- /dev/null +++ b/Formula/c/claudekit.rb @@ -0,0 +1,24 @@ +class Claudekit < Formula + desc "Intelligent guardrails and workflow automation for Claude Code" + homepage "https://github.com/carlrannaberg/claudekit" + url "https://registry.npmjs.org/claudekit/-/claudekit-0.9.4.tgz" + sha256 "b6b8887e129ac42773d2e6884e39300bcf44b7e24bdb5124d3c809fd9bde4d94" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6d6a3fc977278f8f2ee982329648ef0181c69e47823b60f36d4e4fdb51a7dea0" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/claudekit --version") + assert_match "Hooks:", shell_output("#{bin}/claudekit list") + assert_match ".claudekit/config.json not found", shell_output("#{bin}/claudekit doctor 2>&1", 1) + end +end diff --git a/Formula/c/claws-mail.rb b/Formula/c/claws-mail.rb new file mode 100644 index 0000000000000..f6d2cdb0ca29a --- /dev/null +++ b/Formula/c/claws-mail.rb @@ -0,0 +1,63 @@ +class ClawsMail < Formula + desc "User-friendly, lightweight, and fast email client" + homepage "https://www.claws-mail.org/" + url "https://www.claws-mail.org/releases/claws-mail-4.3.1.tar.gz" + sha256 "8fc4f0e0f274297063e5e7682089a32b65ac1b2d21cfa13c54b980520952def2" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.claws-mail.org/releases.php" + regex(/href=.*?claws-mail[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "9a5ba88479f83d1f077cdb054acbaf51cc275172b3e0886bf8918a4d7cd73c88" + sha256 arm64_sequoia: "f08e86cad864b6ab6f0693ce3cc7de801eabd3adff964961a06a3fab48a144ab" + sha256 arm64_sonoma: "d1de6f91523ebe6eaec2e2742aa8d0db011603e93b1e48a892a7e6c7f3e2d7a2" + sha256 arm64_ventura: "bd11011eb704199e5d74c02ec1bc6ba4b33df94fe3d1998c121cd3e6b00b5ac2" + sha256 sonoma: "49dee2906de335de26346eed694ef5087d07bee8b4f143f0ceb9e5ba4c314a61" + sha256 ventura: "c1477bdb2ea050ab85f3b2dbf71eef8dcd75ce3b5a16856f94fb078e359608f2" + sha256 arm64_linux: "154f375276dabb568e96a0e9a1c83946a48b66908743375a7c1e2326b77f440b" + sha256 x86_64_linux: "d9eaeeda84f67ba660d9f70f6011a3e21883ee632b8918cc400f2e806afb28e2" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gnutls" + depends_on "gtk+3" + depends_on "libetpan" + depends_on "nettle" + depends_on "pango" + + uses_from_macos "zlib" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "libice" + depends_on "libsm" + end + + def install + if OS.mac? + ENV["LIBETPAN_CFLAGS"] = "-I#{Formula["libetpan"].opt_include}" + ENV["LIBETPAN_LIBS"] = "-F#{Formula["libetpan"].opt_frameworks} -framework libetpan" + end + system "./configure", "--disable-silent-rules", + "--disable-archive-plugin", + "--disable-dillo-plugin", + "--disable-notification-plugin", + *std_configure_args + system "make", "install" + end + + test do + assert_equal ".claws-mail", shell_output("#{bin}/claws-mail --config-dir").strip + end +end diff --git a/Formula/c/clazy.rb b/Formula/c/clazy.rb new file mode 100644 index 0000000000000..632b50c3a17d5 --- /dev/null +++ b/Formula/c/clazy.rb @@ -0,0 +1,73 @@ +class Clazy < Formula + desc "Qt oriented static code analyzer" + homepage "https://www.kdab.com/" + url "https://download.kde.org/stable/clazy/1.15/src/clazy-1.15.tar.xz" + sha256 "43189460b366ea3126242878c36ee8a403e37ec4baef7e61ccfa124b1414e7a9" + license "LGPL-2.0-or-later" + revision 1 + head "https://invent.kde.org/sdk/clazy.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "da50e82eb5510ebef091dd80296b72730a94d477bfa864ee87e8856f804c8e45" + sha256 cellar: :any, arm64_sequoia: "92b3ccdbef548d7966861ace46c31f90af6e8c0c641f68f1a0768fa817c5f862" + sha256 cellar: :any, arm64_sonoma: "33da10d4e320a5730af1514d6e00ac84bc8d354b8a6d69a4e2578aa9524b7473" + sha256 cellar: :any, arm64_ventura: "f6af64aef4696d355d87c6def7d18b3cc7cd6d36a5a2932bccecc3d893371d99" + sha256 cellar: :any, sonoma: "cf75552ce773a8e7b822c4b2f7c6bbbaef2b1977ed6715c022de3769fb0ff906" + sha256 cellar: :any, ventura: "5152cbc2134bfcb219b9e0c95ec62500910cd775248a8168db30fe09057b8ddc" + sha256 cellar: :any_skip_relocation, arm64_linux: "5864e4e777baf1d2c91a147981eded0fd897b199af58de11bfbfd7857afa31d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ec42d9e2bb8e000491b657536396520554521bc03cf1d6f41638af98b007e20" + end + + depends_on "cmake" => [:build, :test] + depends_on "qtbase" => :test + depends_on "llvm" + + on_macos do + depends_on "coreutils" # for greadlink + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCLAZY_LINK_CLANG_DYLIB=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + + project(test VERSION 1.0.0 LANGUAGES CXX) + + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + + find_package(Qt6 COMPONENTS Core REQUIRED) + add_executable(test test.cpp) + target_link_libraries(test PRIVATE Qt6::Core) + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include + void test() + { + qgetenv("Foo").isEmpty(); + } + int main() { return 0; } + CPP + + llvm = deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+(\.\d+)*)?$/) } + ENV["CLANGXX"] = llvm.opt_bin/"clang++" + system "cmake", "-DCMAKE_CXX_COMPILER=#{bin}/clazy", "." + assert_match "warning: qgetenv().isEmpty() allocates. Use qEnvironmentVariableIsEmpty() instead", + shell_output("make VERBOSE=1 2>&1") + end +end diff --git a/Formula/c/clblas.rb b/Formula/c/clblas.rb new file mode 100644 index 0000000000000..0dbce1a67f5c9 --- /dev/null +++ b/Formula/c/clblas.rb @@ -0,0 +1,73 @@ +class Clblas < Formula + desc "Library containing BLAS functions written in OpenCL" + homepage "https://github.com/clMathLibraries/clBLAS" + url "https://github.com/clMathLibraries/clBLAS/archive/refs/tags/v2.12.tar.gz" + sha256 "7269c7cb06a43c5e96772010eba032e6d54e72a3abff41f16d765a5e524297a9" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e6c3905b2128cd5fece2722262321cf7b446cb8119cc0c96f33e87a0e534a9d1" + sha256 cellar: :any, arm64_sequoia: "e01b9a3b09dc996c6feb5b474e99f463b4079417aa0c24c69d5ace2cb896b036" + sha256 cellar: :any, arm64_sonoma: "932e8b3b551e5d7e9bd274802aed00a7de5844a2fa3ead6b52647ffb7e2bdbed" + sha256 cellar: :any, arm64_ventura: "ddd0d6b3d160284e87fee5d6cbb6585632cd24842c1f26954205acb665e3c74a" + sha256 cellar: :any, arm64_monterey: "ec2838495fac090d05c5eb2e2f5cb8fd3640bb238fc068459900e50cc7f28674" + sha256 cellar: :any, arm64_big_sur: "8ade8c33c4231863fb5ebda26cd90cd1e1b5f30193c9b7bb113939e2c588c9e9" + sha256 cellar: :any, sonoma: "07b22046dd5a9005ac31e41f688afd50aea6284d716ec67ab304d587d0f40f9e" + sha256 cellar: :any, ventura: "d8bc99eb36031d7e6f662b40b2d8ef98a1d60fe414959c2ec5f23c590ebcf353" + sha256 cellar: :any, monterey: "2be6e0730bf2740496eb4b90b90077ce65185ab8fc1c0714edb8ea834904a8ec" + sha256 cellar: :any, big_sur: "3f4f8ceae96d4b24049e7b81e89f7bc5785bcd7968bf5378fb54cafd259b6d92" + sha256 cellar: :any_skip_relocation, arm64_linux: "b645eb13199f77329df60710febfdbf4ca896fab88df65e3c03b2c4e221fc675" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afc8e13fe7b5d465840eac248a461975d7fd33b89ba74a238cb743c1ac6c7c1f" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + + uses_from_macos "python" => :build + + on_linux do + depends_on "opencl-headers" => [:build, :test] + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + # Fix missing stdlib.h includes. + # PR ref: https://github.com/clMathLibraries/clBLAS/pull/360 + patch do + url "https://github.com/clMathLibraries/clBLAS/commit/68ce5f0b824d7cf9d71b09bb235cf219defcc7b4.patch?full_index=1" + sha256 "df5dc87e9ae543a043608cf790d01b985627b5b6355356c860cfd45a47ba2c36" + end + + def install + # Workaround for CMake 4 and CMP0048 as project looks unmaintained. + # Can consider deprecating if bandicoot migrates to alternative like CLBlast: + # https://gitlab.com/bandicoot-lib/bandicoot-code/-/issues/34 + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + version_str = "#{version.major.to_i}.#{version.minor.to_i}.#{version.patch.to_i}" + inreplace "src/CMakeLists.txt", "project(clBLAS C CXX)", + "project(clBLAS VERSION #{version_str} LANGUAGES C CXX)" + + system "cmake", "-S", "src", "-B", "build", + "-DBUILD_CLIENT=OFF", + "-DBUILD_KTEST=OFF", + "-DBUILD_TEST=OFF", + "-DCMAKE_MACOSX_RPATH:BOOL=ON", + "-DPYTHON_EXECUTABLE=#{which("python3")}", + "-DSUFFIX_LIB:STRING=", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "src/samples/example_srot.c" + end + + test do + # We do not run the test, as it fails on CI machines + # ("clGetDeviceIDs() failed with -1") + opencl_lib = OS.mac? ? ["-framework", "OpenCL"] : ["-lOpenCL"] + system ENV.cc, pkgshare/"example_srot.c", "-I#{include}", "-L#{lib}", + "-lclBLAS", *opencl_lib, "-Wno-implicit-function-declaration" + end +end diff --git a/Formula/c/clblast.rb b/Formula/c/clblast.rb new file mode 100644 index 0000000000000..bdd027cd76b22 --- /dev/null +++ b/Formula/c/clblast.rb @@ -0,0 +1,45 @@ +class Clblast < Formula + desc "Tuned OpenCL BLAS library" + homepage "https://github.com/CNugteren/CLBlast" + url "https://github.com/CNugteren/CLBlast/archive/refs/tags/1.6.3.tar.gz" + sha256 "c05668c7461e8440fce48c9f7a8966a6f9e0923421acd7c0357ece9b1d83f20e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cfd48f3ebe4c5fd8a8154ffea4e8064d76a3f7629a07afafffcbfb34df4d6b5b" + sha256 cellar: :any, arm64_sequoia: "62eea554bf1f9118b780962ec97537478020d4a4850942d200fd100319ebc25a" + sha256 cellar: :any, arm64_sonoma: "51694bd4a8eefd817e62561ef30afa0807dd169cf8b8b3ed3599afd8240f0772" + sha256 cellar: :any, arm64_ventura: "4ae97edde32865dae186f21292d0885d402be3e4622b76fb77f5b6240035f560" + sha256 cellar: :any, arm64_monterey: "b2190d5fe22baa139b0c6d4884af910db597fdcf1f6b02cc8dcbd377991f1e4b" + sha256 cellar: :any, sonoma: "7af136b15b5d8fc47a2c392052a7b35ec447c4530c3f57fab3675e45e55d1e96" + sha256 cellar: :any, ventura: "05968756c5c41c794e4134f1dc93756efe8beca0f76cd6959a7ba839f75ae791" + sha256 cellar: :any, monterey: "3fbca33d20a9d99bc166e1af71058bfb56ed064ea5fbfdc733e1373afc553587" + sha256 cellar: :any_skip_relocation, arm64_linux: "07ccdb7ac4ae569a10b3373edeb168b25505896269b7921f7f624094acf9b27a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fc7ca301aa5cfd50033c67343f4fddcedffc6536274423081e71a2f86282e8e" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "opencl-headers" => [:build, :test] + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + def install + # Backport support for CMake 4, remove in next release + inreplace "CMakeLists.txt", "cmake_minimum_required(VERSION 2.8.11)", "cmake_minimum_required(VERSION 3.10)" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "samples" # for a simple library linking test + end + + test do + opencl_library = OS.mac? ? ["-framework", "OpenCL"] : ["-lOpenCL"] + system ENV.cc, pkgshare/"samples/sgemm.c", "-I#{include}", "-L#{lib}", + "-lclblast", *opencl_library + end +end diff --git a/Formula/c/clean.rb b/Formula/c/clean.rb new file mode 100644 index 0000000000000..3ebcd4e3a3c16 --- /dev/null +++ b/Formula/c/clean.rb @@ -0,0 +1,40 @@ +class Clean < Formula + desc "Search for files matching a regex and delete them" + homepage "https://clean.sourceforge.net/" + url "https://downloads.sourceforge.net/project/clean/clean/3.4/clean-3.4.tar.bz2" + sha256 "761f3a9e1ed50747b6a62a8113fa362a7cc74d359ac6e8e30ba6b30d59115320" + license :public_domain + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bc6ccc5a72395c51b6aebf78f3301e538b0c8d4ee67f42943cd4d0e15354b842" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a1e4fead81bdadea6bd617523d7628f215ae6ee6a440a761d9a8b93348471ed8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "399d484d9371d60bfebc828c350804935fef8f0657964aa5da9abe3e84fbbf65" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8475c766c7581cc3723005a48d44c53f439740ebb004a213e813fe7fc9b110b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9b2545a16176fab56b543171ae6b9bb8bcc322b5db0098f5a080effc88835207" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4b10d60c05907f49e588abdd62e34d1f3ab34be1abb2dca155a82172ea366aa7" + sha256 cellar: :any_skip_relocation, sonoma: "c1543a0abeb13df58fb46711b11431b7bb359c217f68bf29d70b5ddc780d86b7" + sha256 cellar: :any_skip_relocation, ventura: "eca64055ebc6c1f717ddc8d84d352dc9f1fd4f3d3d81dcdfd41b2e65c382364c" + sha256 cellar: :any_skip_relocation, monterey: "50f24835f266da1bb10c707e7f1561a3f9366b11bc6e61ac4919f806ddf7e182" + sha256 cellar: :any_skip_relocation, big_sur: "bca0f382d8835a36dd3ac9c4157f88f543291b21febea6c68769762f9067e2e0" + sha256 cellar: :any_skip_relocation, catalina: "c4846ab5fe761673db9a5575b56ec21b4ae0d4d75a974015d946d25fde0def12" + sha256 cellar: :any_skip_relocation, arm64_linux: "266d2fa27082248fc098a2be833381912903c104ee4e95f2461b8d75736dfc63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68f82459bafc17933f5010fe2f35355f8d967809ae62d1ac91e13409f7baec88" + end + + def install + system "make" + bin.install "clean" + man1.install "clean.1" + end + + test do + touch testpath/"backup1234" + touch testpath/"backup1234.testing-rm" + + system bin/"clean", "-f", "-l", "-e", "*.testing-rm" + assert_path_exists testpath/"backup1234" + refute_path_exists testpath/"backup1234.testing-rm" + end +end diff --git a/Formula/c/clearlooks-phenix.rb b/Formula/c/clearlooks-phenix.rb new file mode 100644 index 0000000000000..b0585bb6bdb91 --- /dev/null +++ b/Formula/c/clearlooks-phenix.rb @@ -0,0 +1,27 @@ +class ClearlooksPhenix < Formula + desc "GTK+3 port of the Clearlooks Theme" + homepage "https://github.com/jpfleury/clearlooks-phenix" + url "https://github.com/jpfleury/clearlooks-phenix/archive/refs/tags/7.1.tar.gz" + sha256 "8219c025341b2eaa992cba01e7ff6da3397e5a005fc4ae1038fdb371efcfb0ce" + license "GPL-3.0-or-later" + head "https://github.com/jpfleury/clearlooks-phenix.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "37f83957b60d7f567870434c313d3d02340d40ff4cc32a7deb81134fe2570b96" + end + + depends_on "gtk+3" + + def install + (share/"themes/Clearlooks-Phenix").install %w[gtk-2.0 gtk-3.0 index.theme] + end + + def post_install + system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", + HOMEBREW_PREFIX/"share/themes/Clearlooks-Phenix" + end + + test do + assert_path_exists testpath/"#{share}/themes/Clearlooks-Phenix/index.theme" + end +end diff --git a/Formula/c/clens.rb b/Formula/c/clens.rb new file mode 100644 index 0000000000000..8d5f9f42870d1 --- /dev/null +++ b/Formula/c/clens.rb @@ -0,0 +1,39 @@ +class Clens < Formula + desc "Library to help port code from OpenBSD to other operating systems" + homepage "https://github.com/conformal/clens" + url "https://github.com/conformal/clens/archive/refs/tags/CLENS_0_7_0.tar.gz" + sha256 "0cc18155c2c98077cb90f07f6ad8334314606c4be0b6ffc13d6996171c7dc09d" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae9f115b19edd75f00e434a0cbc10025f607c99482ca901323005abf3a9fc93a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27badceb51069c0b5dcc5673744b149caa21eaf48719005480dbc0b6dcd8a153" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c2082a66bc51ab50ef09640e4a4526111455a6545a21e9907c62469ea686d82" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e42ef7f7f467d0bbe324659c9fe2a89c0049968a580bd1115d93a8423af0fe1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "513fdfc8d9f7c710d81ade46ff26f9d74283c096029c55c99282e03682ffba97" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6e62d3fb708d1585bda7aeef47488d5b765a7b3af5bba0e2d2544a12b08cb892" + sha256 cellar: :any_skip_relocation, sonoma: "da3d996540074d18fd0b1b9929b3c8d49604639ad47a44d398f8d3da1eb63546" + sha256 cellar: :any_skip_relocation, ventura: "930fc11da5b772ab93d361d1172b0cf4c2b0abc44c2f9acdeb7f37b5f6be17f5" + sha256 cellar: :any_skip_relocation, monterey: "4e55d83091142894a16911836b98bd00e4188720709eb4c5fdc8203442d57097" + sha256 cellar: :any_skip_relocation, big_sur: "602ace92e6b121b004a43a851209b95b0769bc84d9ea0c7725f29f3d2531324f" + sha256 cellar: :any_skip_relocation, catalina: "fef1ad76413e8e15683a4066276ed7f37f821edcbda4e6d648bd60e09a33a30d" + sha256 cellar: :any_skip_relocation, arm64_linux: "30170cc04b93089a889764fdb8ffffe69b24b762fcfdf51dc2419e6ff51f5d27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b5d5f5cba941676c726e09e2b14c9069dfebf9db9d6cb2b75fc321a2481aedf" + end + + on_linux do + depends_on "libbsd" + end + + patch do + url "https://github.com/conformal/clens/commit/83648cc9027d9f76a1bc79ddddcbed1349b9d5cd.patch?full_index=1" + sha256 "c70833eff6f98eab6166e9c341bb444eae542617f4937a29514fe5c6bbd3d8b0" + end + + def install + ENV.deparallelize + system "make", "all", "install", "LOCALBASE=#{prefix}" + end +end diff --git a/Formula/c/clhep.rb b/Formula/c/clhep.rb new file mode 100644 index 0000000000000..fc6c61da495a6 --- /dev/null +++ b/Formula/c/clhep.rb @@ -0,0 +1,46 @@ +class Clhep < Formula + desc "Class Library for High Energy Physics" + homepage "https://proj-clhep.web.cern.ch/proj-clhep/" + url "https://gitlab.cern.ch/CLHEP/CLHEP/-/archive/CLHEP_2_4_7_2/CLHEP-CLHEP_2_4_7_2.tar.gz" + sha256 "c40c239fa2c5810b60f4e9ddd6a8cc2ce81b962aa170994748cd2a2b5ac87f84" + license "GPL-3.0-only" + head "https://gitlab.cern.ch/CLHEP/CLHEP.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cf183afa1e10e5cf5a22b0c8e56acd6dc3ee832cb38abc08c4f65ccc6d61be32" + sha256 cellar: :any, arm64_sequoia: "4d6bda58d173b42913d91dded7b7ad721b358260a8382934fafdb464cafbc786" + sha256 cellar: :any, arm64_sonoma: "3645180de75c594150af1353381b28d732b2d75944a6110d67d4d9ae408de220" + sha256 cellar: :any, sonoma: "820fbd323a9a40b44053ae03d2c0598df6d8d5b58fcefe07ff4dd1fdb4704d52" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf31c521a79cc3bff39ab122f7ae26bbea6b4e5d5304df4420378a90ad7388ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08488a8b36a245edbb41e6f91f84e8a264d6f4cf35fc1e0b89041bd37f3c44fd" + end + + depends_on "cmake" => :build + + def install + # Build directory is not allowed inside source folder + (buildpath/"CLHEP").install buildpath.children + system "cmake", "-S", "CLHEP", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + CLHEP::Hep3Vector aVec(1, 2, 3); + std::cout << "r: " << aVec.mag(); + std::cout << " phi: " << aVec.phi(); + std::cout << " cos(theta): " << aVec.cosTheta() << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "-L#{lib}", "-lCLHEP", "-I#{include}/CLHEP", + testpath/"test.cpp", "-o", "test" + assert_equal "r: 3.74166 phi: 1.10715 cos(theta): 0.801784", + shell_output("./test").chomp + end +end diff --git a/Formula/c/cli11.rb b/Formula/c/cli11.rb new file mode 100644 index 0000000000000..a007159284097 --- /dev/null +++ b/Formula/c/cli11.rb @@ -0,0 +1,46 @@ +class Cli11 < Formula + desc "Simple and intuitive command-line parser for C++11" + homepage "https://cliutils.github.io/CLI11/book/" + url "https://github.com/CLIUtils/CLI11/archive/refs/tags/v2.6.1.tar.gz" + sha256 "377691f3fac2b340f12a2f79f523c780564578ba3d6eaf5238e9f35895d5ba95" + license "BSD-3-Clause" + head "https://github.com/CLIUtils/CLI11.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9863ce10be83ea49e2f65e5e29965cc604d2c400f23eb078aff7950a3f6e2f58" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCLI11_BUILD_DOCS=OFF + -DCLI11_BUILD_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "CLI/App.hpp" + #include "CLI/Formatter.hpp" + #include "CLI/Config.hpp" + + int main(int argc, char** argv) { + CLI::App app{"App description"}; + + std::string filename = "default"; + app.add_option("-r,--result", filename, "A test string"); + + CLI11_PARSE(app, argc, argv); + std::cout << filename << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}" + assert_equal "foo\n", shell_output("./test -r foo") + end +end diff --git a/Formula/c/cli53.rb b/Formula/c/cli53.rb new file mode 100644 index 0000000000000..64e2b9a3e656b --- /dev/null +++ b/Formula/c/cli53.rb @@ -0,0 +1,29 @@ +class Cli53 < Formula + desc "Command-line tool for Amazon Route 53" + homepage "https://github.com/barnybug/cli53" + url "https://github.com/barnybug/cli53/archive/refs/tags/v0.8.25.tar.gz" + sha256 "7fc01388af416b88f164244e1c7269a122b8203485313970196913982b80e56d" + license "MIT" + head "https://github.com/barnybug/cli53.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9095f0aee379f36b2ffdd4d9d11bdcc19806ec0bf49a2c7f9ae2b23e30d69ae4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4b9ffd175d7e981bdd4c7c2356e6268b94c6b5347a2d50d5781318a9ac53136" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4b9ffd175d7e981bdd4c7c2356e6268b94c6b5347a2d50d5781318a9ac53136" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e4b9ffd175d7e981bdd4c7c2356e6268b94c6b5347a2d50d5781318a9ac53136" + sha256 cellar: :any_skip_relocation, sonoma: "cdb240862a0674ac5a321b32faaac47bd536dc774b45be2c27d8d9252f3feaa2" + sha256 cellar: :any_skip_relocation, ventura: "cdb240862a0674ac5a321b32faaac47bd536dc774b45be2c27d8d9252f3feaa2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c9813986e728f56443c377c9117e35bcb63e306e76e8186a5b5eb7e08f817c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a78fd47c4eac438afac66284ad3aa5b4f2dd37232b5330405d1fe6657d480f76" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cli53" + end + + test do + assert_match "list domains", shell_output("#{bin}/cli53 help list") + end +end diff --git a/Formula/c/cliam.rb b/Formula/c/cliam.rb new file mode 100644 index 0000000000000..86ea3a016bb95 --- /dev/null +++ b/Formula/c/cliam.rb @@ -0,0 +1,49 @@ +class Cliam < Formula + desc "Cloud agnostic IAM permissions enumerator" + homepage "https://github.com/securisec/cliam" + url "https://github.com/securisec/cliam/archive/refs/tags/2.2.0.tar.gz" + sha256 "3fd407787b49645da3ac14960c751cd90acf1cfacec043c57bbf4d81be9b2d9e" + license "GPL-3.0-or-later" + head "https://github.com/securisec/cliam.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bdbb9e4d7e3ab70487a38e936259d6930f3cfcf8595a0d386fe31fed365f326a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "97fc79aa1d589ee7a6deff3bee41579070570cb721217851da1a327c9a9a9efb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "437320520b17ed0562c0aaa5cb931385823cdb79396d80e1a00b38502f3ef1e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "692e06fb736fd26d5e37dbe2a17c29df8903ac8ebf268ad12540dc07b1cc86c4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f9b5d99ab7fe62e8f523bd2db18f4353aa586cbebdec4f57b19e309039b4d6df" + sha256 cellar: :any_skip_relocation, sonoma: "2a6d64eb832b3f1c9697a494a1e81a126ca99642242e5bbd9eb0b7d5f49801f4" + sha256 cellar: :any_skip_relocation, ventura: "5fd86d65d9168a5cf41321b8e972326c9a5d0f387cda0829aa20e95fa55bc016" + sha256 cellar: :any_skip_relocation, monterey: "2ffb08eafd8af22b575ec3380b2a17e61ea6bafce22d9335c951aba4e8d9e7b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f73cfe2097f8574bed1d44bc8fd29cd66a95e122dbb8866d17724a1ff2a7aa1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25ab86af9ed168ceecfafde29cbc74503b4c929ab102e94492c8e423145b55d6" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/securisec/cliam/cli/version.BuildDate=#{time.iso8601} + -X github.com/securisec/cliam/cli/version.GitCommit= + -X github.com/securisec/cliam/cli/version.GitBranch= + -X github.com/securisec/cliam/cli/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cli" + + generate_completions_from_executable(bin/"cliam", "completion") + end + + test do + output = shell_output("#{bin}/cliam aws utils sts-get-caller-identity " \ + "--profile brewtest 2>&1", 1) + assert_match "SharedCredsLoad: failed to load shared credentials file", output + + output = shell_output("#{bin}/cliam gcp rest enumerate", 1) + assert_match "accessapproval", output + + assert_match version.to_s, shell_output("#{bin}/cliam version") + end +end diff --git a/Formula/c/clib.rb b/Formula/c/clib.rb new file mode 100644 index 0000000000000..2f78ac685bcf5 --- /dev/null +++ b/Formula/c/clib.rb @@ -0,0 +1,39 @@ +class Clib < Formula + desc "Package manager for C programming" + homepage "https://github.com/clibs/clib" + url "https://github.com/clibs/clib/archive/refs/tags/2.8.7.tar.gz" + sha256 "83d5767e363c3ed4b4271000b9ce63b6e11b6c4740df910e0074f844fb34258e" + license "MIT" + head "https://github.com/clibs/clib.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d7797f34c701c848a575c010bec48357e4564ef4abd287e8e39aeed7c0287124" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d55c0d80cdf3962c6f472fbf9f977bbc1f38108789a35f28083eb901be9a1d51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "adaa04956400da4720ab59df6f5751b1f04e98dd297890f3289eafd55bcd7f3a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7209d89f9749907745dffd80fa70d85b722ce4e907020cc55a63dd3d9066e6d0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f1a9ccc23f7f02055c2df418f3131adea4c9341c0d859d7fe1b84e37d2b82e08" + sha256 cellar: :any_skip_relocation, sonoma: "638ea5f7900fa5e5e1fee0f597c2268979333dcf56dc303f2ca8a36d73957bb5" + sha256 cellar: :any_skip_relocation, ventura: "6c143f9e0b7d3f78e90b7ddd112ac7c73b5f31500401753e6ebc6ec8d18a6e8a" + sha256 cellar: :any_skip_relocation, monterey: "eaaf603e0f7a35bc6ea1f9b51a0704968e608aaee2f587035a37ef108d091faa" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2ddfdb8e4c91c7d17caf7f0b1e3fb36b14c86c2b31e40952bd9d917c02eda90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b575c125079396fdd1f4fd5b96a0d23048052aa8f0c9ff29986ac5209b14e649" + end + + uses_from_macos "curl" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/clib --version") + + pipe_output("#{bin}/clib init", "brewtest\n0.0.1\n", 0) + assert_match "brewtest", (testpath/"clib.json").read + end +end diff --git a/Formula/c/click.rb b/Formula/c/click.rb new file mode 100644 index 0000000000000..a8eef3e6ea66f --- /dev/null +++ b/Formula/c/click.rb @@ -0,0 +1,80 @@ +class Click < Formula + desc "Command-line interactive controller for Kubernetes" + homepage "https://github.com/databricks/click" + url "https://github.com/databricks/click/archive/refs/tags/v0.6.3.tar.gz" + sha256 "da64d1d205b6136f318dea967eec4e9d67569be8f332875afcc6b31c9a0ef1b7" + license "Apache-2.0" + head "https://github.com/databricks/click.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "96815f530661c69c118a128df96453746171c7f504e63d55d9ddf03baf1c6dbf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e987eede7eef110c096c8093ccfbf321f3835378f8a65619627eabe348e0d985" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aece6aa76034deb2d8e1437d85f4e4c94195de67eb7948d19b2fc2423824808c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a828f3d797aa3aca5596984e8b8f51afdbe123c3f8e7fa4fa6e760f66a4e57e4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "902ecbe1a647d12fe9fa8fc5de1e6c0336e8f4d1b979c24c71da8ee0c446ee14" + sha256 cellar: :any_skip_relocation, sonoma: "14315013a9e3ecd0882de00d7d5d25588e0d3ed6d098d23f61a1714e93effa39" + sha256 cellar: :any_skip_relocation, ventura: "b3e56cb51e4c684096a2f9c2fbc736423e2d0b38a96f6f423d0d269a149fb66b" + sha256 cellar: :any_skip_relocation, monterey: "db3b2aed30f0a4b6cf38f1834d3710ba051a8cce3d3e6bb2ee895b2493e4b30c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b49f975c698d3f29c6055c055b11661315b87e270fe773604fe24902cee603d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b30c2c15da3c503a541a5f751928abf68496261df9374a23c6d5dce58b9d2b8" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Default state configuration file to avoid warning on startup + (testpath/"config/click.config").write <<~YAML + --- + namespace: ~ + context: ~ + editor: ~ + terminal: ~ + YAML + + # Fake K8s configuration + (testpath/"config/config").write <<~YAML + apiVersion: v1 + clusters: + - cluster: + insecure-skip-tls-verify: true + server: 'https://localhost:6443' + name: test-cluster + contexts: + - context: + cluster: test-cluster + user: test-user + name: test-context + current-context: test-context + kind: Config + preferences: + colors: true + users: + - name: test-cluster + user: + client-certificate-data: >- + invalid + client-key-data: >- + invalid + YAML + + # This test cannot test actual K8s connectivity, but it is enough to prove click starts + output = pipe_output("#{bin}/click --config_dir #{testpath}/config", "quit") + assert_equal "[\e[38;5;9m\e[1mnone\e[0m] [\e[38;5;10m\e[1mnone\e[0m] [\e[38;5;3mnone\e[39m] > ", output + end +end diff --git a/Formula/c/clickhouse-cpp.rb b/Formula/c/clickhouse-cpp.rb new file mode 100644 index 0000000000000..4e74788033cfb --- /dev/null +++ b/Formula/c/clickhouse-cpp.rb @@ -0,0 +1,99 @@ +class ClickhouseCpp < Formula + desc "C++ client library for ClickHouse" + homepage "https://github.com/ClickHouse/clickhouse-cpp" + url "https://github.com/ClickHouse/clickhouse-cpp/archive/refs/tags/v2.6.0.tar.gz" + sha256 "f694395ab49e7c2380297710761a40718278cefd86f4f692d3f8ce4293e1335f" + license "Apache-2.0" + head "https://github.com/ClickHouse/clickhouse-cpp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6e3824acd6cbc7fb6eb0fca264341b71ce231bb8bcf9c49a8d2068233963616" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f2fe3c51ac226cc47312483cf41ae089775ba3352d0c9165d4d2fc31f737992" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44b493b2c517dbcf968bc3573dfdf9c0dd45573095272fc3a53922aca7ce51af" + sha256 cellar: :any_skip_relocation, sonoma: "1e34322b12d40a1c6a31a8a17448aed7c6ded46057340afe14bf3fe0be89acdc" + sha256 cellar: :any_skip_relocation, arm64_linux: "13b147b1c1087b24fb84ca2dc42691de39e60f24e12f774af1c1c701073646c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1f392feecc378fec9d916616f84fc2ba97d96fb6910098cf5ceeb4b22e026bd" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "lz4" + depends_on "openssl@3" + depends_on "zstd" + + def install + # We use the vendored version (1.0.2) of `cityhash` because newer versions + # break hash compatibility. See: + # https://github.com/ClickHouse/clickhouse-cpp/pull/301#issuecomment-1520592157 + rm_r(Dir["contrib/*"] - ["contrib/cityhash"]) + args = %W[ + -DWITH_OPENSSL=ON + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_SYSTEM_ABSEIL=ON + -DWITH_SYSTEM_CITYHASH=OFF + -DWITH_SYSTEM_LZ4=O + -DWITH_SYSTEM_ZSTD=ON + ] + # Upstream only allows building static libs on macOS + # See: https://github.com/ClickHouse/clickhouse-cpp/pull/219#issuecomment-1362928064 + args << "-DBUILD_SHARED_LIBS=ON" unless OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Install vendored `cityhash`. + (libexec/"lib").install "build/contrib/cityhash/cityhash/libcityhash.a" if OS.mac? + end + + test do + (testpath/"main.cpp").write <<~CPP + #include + + #include + + #include + #include + + int main(int argc, char* argv[]) + { + int exit_code = EXIT_SUCCESS; + + try + { + // Expecting a typical "failed to connect" error. + clickhouse::Client client( + clickhouse::ClientOptions() + .SetHost("example.com") + .SetSendRetries(1) + .SetRetryTimeout(std::chrono::seconds(1)) + .SetTcpKeepAliveCount(1) + .SetTcpKeepAliveInterval(std::chrono::seconds(1)) + ); + } + catch (const std::exception& ex) + { + std::fprintf(stdout, "Exception: %s\\n", ex.what()); + exit_code = EXIT_FAILURE; + } + catch (...) + { + std::fprintf(stdout, "Exception: unknown\\n"); + exit_code = EXIT_FAILURE; + } + + return exit_code; + } + CPP + + args = %W[ + -std=c++17 -I#{include} -L#{lib} -lclickhouse-cpp-lib + -L#{Formula["openssl@3"].opt_lib} -lcrypto -lssl + -L#{Formula["lz4"].opt_lib} -llz4 + -L#{Formula["zstd"].opt_lib} -lzstd + ] + args += %W[-L#{libexec}/lib -lcityhash] if OS.mac? + system ENV.cxx, "main.cpp", *args, "-o", "test-client" + assert_match "Exception: fail to connect: ", shell_output("./test-client", 1) + end +end diff --git a/Formula/c/clickhouse-odbc.rb b/Formula/c/clickhouse-odbc.rb new file mode 100644 index 0000000000000..2c01194c5e8e6 --- /dev/null +++ b/Formula/c/clickhouse-odbc.rb @@ -0,0 +1,129 @@ +class ClickhouseOdbc < Formula + desc "Official ODBC driver implementation for accessing ClickHouse as a data source" + homepage "https://github.com/ClickHouse/clickhouse-odbc" + # Git modules are all for bundled libraries so can use tarball without them + url "https://github.com/ClickHouse/clickhouse-odbc/archive/refs/tags/v1.2.1.20220905.tar.gz" + sha256 "ca8666cbc7af9e5d4670cd05c9515152c34543e4f45e2bc8fa94bee90d724f1b" + license "Apache-2.0" + revision 9 + head "https://github.com/ClickHouse/clickhouse-odbc.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c71ebb157e02d5764dbc6761479d4b5df17140fb166f2a9f41a62b297c950f54" + sha256 cellar: :any, arm64_sequoia: "823b627489c0eb6132863b4801bbb35d72d0a0a94e6a05e1db727626d6610a97" + sha256 cellar: :any, arm64_sonoma: "e3319686c6b8b190cac07657b005815d52b5e9ae2cdce502dc0547b2beec2d33" + sha256 cellar: :any, arm64_ventura: "fd57a1b662562034e4438ef7a3f504a13b9bb41fd1fdf0fba65881457c3dbad9" + sha256 cellar: :any, sonoma: "9e6d19fe3f32091196b620af7a2505a67e1bff07af8379a328f98e99ae5f8c6e" + sha256 cellar: :any, ventura: "b05b85f7872bdea82c386d7f6f8a865237e6691539f9f7fa51d0b91513fabde0" + sha256 cellar: :any_skip_relocation, arm64_linux: "83be34ed8d3397d1b48962b0c5584093442d667208061fab3f699401d943f580" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d8fcd33563bd470e0c3642123a9be187196aa6678061134a4590d4679e841a1" + end + + depends_on "cmake" => :build + depends_on "folly" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "openssl@3" + depends_on "poco" + depends_on "utf8proc" + + on_macos do + depends_on "libiodbc" + depends_on "pcre2" + end + + on_linux do + depends_on "unixodbc" + end + + # build patch for utf8proc, no needed for newer version, as folly got removed per https://github.com/ClickHouse/clickhouse-odbc/pull/456 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/clickhouse-odbc/1.2.1.20220905-Utf8Proc.patch" + sha256 "29f3aeaa05609d53b942903868cb52ddcfcb3b35d32e8075d152cd2ca0ff5242" + end + + def install + # Remove bundled libraries + %w[folly googletest nanodbc poco ssl].each { |l| rm_r(buildpath/"contrib"/l) } + + icu4c_dep = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + args = %W[ + -DCH_ODBC_PREFER_BUNDLED_THIRD_PARTIES=OFF + -DCH_ODBC_THIRD_PARTY_LINK_STATIC=OFF + -DICU_ROOT=#{icu4c_dep.to_formula.opt_prefix} + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + ] + args += if OS.mac? + ["-DODBC_PROVIDER=iODBC", "-DODBC_DIR=#{Formula["libiodbc"].opt_prefix}"] + else + ["-DODBC_PROVIDER=UnixODBC", "-DODBC_DIR=#{Formula["unixodbc"].opt_prefix}"] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"my.odbcinst.ini").write <<~INI + [ODBC Drivers] + ClickHouse ODBC Test Driver A = Installed + ClickHouse ODBC Test Driver W = Installed + + [ClickHouse ODBC Test Driver A] + Description = ODBC Driver for ClickHouse (ANSI) + Driver = #{lib/shared_library("libclickhouseodbc")} + Setup = #{lib/shared_library("libclickhouseodbc")} + UsageCount = 1 + + [ClickHouse ODBC Test Driver W] + Description = ODBC Driver for ClickHouse (Unicode) + Driver = #{lib/shared_library("libclickhouseodbcw")} + Setup = #{lib/shared_library("libclickhouseodbcw")} + UsageCount = 1 + INI + + (testpath/"my.odbc.ini").write <<~INI + [ODBC Data Sources] + ClickHouse ODBC Test DSN A = ClickHouse ODBC Test Driver A + ClickHouse ODBC Test DSN W = ClickHouse ODBC Test Driver W + + [ClickHouse ODBC Test DSN A] + Driver = ClickHouse ODBC Test Driver A + Description = DSN for ClickHouse ODBC Test Driver (ANSI) + Url = https://default:password@example.com:8443/query?database=default + + [ClickHouse ODBC Test DSN W] + Driver = ClickHouse ODBC Test Driver W + Description = DSN for ClickHouse ODBC Test Driver (Unicode) + Url = https://default:password@example.com:8443/query?database=default + INI + + ENV["ODBCSYSINI"] = testpath + ENV["ODBCINSTINI"] = "my.odbcinst.ini" + ENV["ODBCINI"] = "#{ENV["ODBCSYSINI"]}/my.odbc.ini" + + if OS.mac? + ENV["ODBCINSTINI"] = "#{ENV["ODBCSYSINI"]}/#{ENV["ODBCINSTINI"]}" + + assert_match "SQL>", + pipe_output("#{Formula["libiodbc"].bin}/iodbctest 'DSN=ClickHouse ODBC Test DSN A'", "exit\n") + + assert_match "SQL>", + pipe_output("#{Formula["libiodbc"].bin}/iodbctestw 'DSN=ClickHouse ODBC Test DSN W'", "exit\n") + elsif OS.linux? + assert_match "Connected!", + pipe_output("#{Formula["unixodbc"].bin}/isql 'ClickHouse ODBC Test DSN A'", "quit\n") + + assert_match "Connected!", + pipe_output("#{Formula["unixodbc"].bin}/iusql 'ClickHouse ODBC Test DSN W'", "quit\n") + end + end +end diff --git a/Formula/c/clickhouse-sql-parser.rb b/Formula/c/clickhouse-sql-parser.rb new file mode 100644 index 0000000000000..7186dccf1aaff --- /dev/null +++ b/Formula/c/clickhouse-sql-parser.rb @@ -0,0 +1,28 @@ +class ClickhouseSqlParser < Formula + desc "Writing clickhouse sql parser in pure Go" + homepage "https://github.com/AfterShip/clickhouse-sql-parser" + url "https://github.com/AfterShip/clickhouse-sql-parser/archive/refs/tags/v0.4.15.tar.gz" + sha256 "b07b0d2cbbea62daefd4412778f7acd061f8298402c43036c9330b222b15d6e4" + license "MIT" + head "https://github.com/AfterShip/clickhouse-sql-parser.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8f1c26f976b3a1aeb151025394087b0623a5334585e813297fe4897bce78ce5b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f1c26f976b3a1aeb151025394087b0623a5334585e813297fe4897bce78ce5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f1c26f976b3a1aeb151025394087b0623a5334585e813297fe4897bce78ce5b" + sha256 cellar: :any_skip_relocation, sonoma: "349af1263521d225df38c673230d8c92bc57834b0fa800394fad2d449f5f4bee" + sha256 cellar: :any_skip_relocation, arm64_linux: "65f5e7c7b77854ac1b71795ec594da3da8bc6676abb92f05eb2682da2dfa9d43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "291aca143b72d22d597f0442feb41149872a343a7c0f82d45a0cb19debc38c39" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/clickhouse-sql-parser -format \"SELECT 1\"") + assert_match "SELECT 1", output + end +end diff --git a/Formula/c/cliclick.rb b/Formula/c/cliclick.rb new file mode 100644 index 0000000000000..adf5b30627918 --- /dev/null +++ b/Formula/c/cliclick.rb @@ -0,0 +1,37 @@ +class Cliclick < Formula + desc "Tool for emulating mouse and keyboard events" + homepage "https://www.bluem.net/jump/cliclick/" + url "https://github.com/BlueM/cliclick/archive/refs/tags/5.1.tar.gz" + sha256 "58bb36bca90fdb91b620290ba9cc0f885b80716cb7309b9ff4ad18edc96ce639" + license "BSD-3-Clause" + head "https://github.com/BlueM/cliclick.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5c8f28d14d1ce1102ef17284756944a808bab97b0ee2d8dcb66ee1b58350d6fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "275cd8511ab45ec069851af600597c453ed20b7c63fc6fc01d9cc9693a965282" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c0d008172484bc0a36ea4582ff2e462396620bd2d180a02427585aec66f48e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4abfe0f72c6ab0473639cfd9a523927384f4d5de04c034e4c343db8f7f97291a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f06719b325bfd00c2aa4af5d8f4017c1d84b85228b191955d63a0d064ffd219a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c7a5cbf3668f3cc8ef45be0f90d2de0bb5803abaf750d0ca77d1f19464e81e22" + sha256 cellar: :any_skip_relocation, sonoma: "cc2e503d5ee81ceb4c7aab8878587ec9510074bb1706cb68d49379e574ed3136" + sha256 cellar: :any_skip_relocation, ventura: "2f0979882eaa7e88c3da7c8c77522a2c36eb4f587b52a8dea60459156d7bbe39" + sha256 cellar: :any_skip_relocation, monterey: "021849385e2be5067946b18bb27d5fdad68d82d40d776f4e6ef98abe45379d68" + sha256 cellar: :any_skip_relocation, big_sur: "2a52d08ab8c32e39912191316022fbc11e264b41cebe15ce6276e1a73d801011" + sha256 cellar: :any_skip_relocation, catalina: "65b6fcb0620720f8cc572bd3cc7ab260664e39629b9ff4fdf26e5fa24f81e6ea" + end + + depends_on :macos + + def install + # Uses obsolete CGWindowListCreateImage and open PR doesn't work + # Issue ref: https://github.com/BlueM/cliclick/issues/178 + ENV["MACOSX_DEPLOYMENT_TARGET"] = "14.0" if MacOS.version >= :sequoia + + system "make" + bin.install "cliclick" + end + + test do + system bin/"cliclick", "p:OK" + end +end diff --git a/Formula/c/clifm.rb b/Formula/c/clifm.rb new file mode 100644 index 0000000000000..6d67b4fad7d7a --- /dev/null +++ b/Formula/c/clifm.rb @@ -0,0 +1,54 @@ +class Clifm < Formula + desc "Command-line Interface File Manager" + homepage "https://github.com/leo-arch/clifm" + url "https://github.com/leo-arch/clifm/archive/refs/tags/v1.26.3.tar.gz" + sha256 "902badc747aee1eb1a3a5556ff3fd9d83d2aa987d24e058024064df8a4b6b71f" + license "GPL-2.0-or-later" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "606eee20afbd49cf30c128a1d67597857a9ae6b9571ade1692b6b47c127cc793" + sha256 arm64_sequoia: "50da01bf2201fa1a3f38e3401769043c91d9a6e16447c84b69c24959be309431" + sha256 arm64_sonoma: "05c5608e9362190c29944eea4d20bfd2db6b9842e3b3ee9102157fe88c63c903" + sha256 sonoma: "745c6a4820bfe4a199910d16ca5ee9e94f477220950c63be83acae3d99f4517f" + sha256 arm64_linux: "868153da39f2d3707183b9f34f27149e03b0dc55ec37cda4e449c629d06ab7e4" + sha256 x86_64_linux: "2ec659b9dc72bf9dff2ca1842e8cb154e3eab97871f7ad11a249223555972083" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "libmagic" + depends_on "readline" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "acl" + depends_on "libcap" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # fix `clifm: dumb: Unsupported terminal.` error + ENV["TERM"] = "xterm" + + output = shell_output("#{bin}/clifm nonexist 2>&1", 2) + assert_match "clifm: 'nonexist': No such file or directory", output + assert_match version.to_s, shell_output("#{bin}/clifm --version") + end +end diff --git a/Formula/c/clinfo.rb b/Formula/c/clinfo.rb new file mode 100644 index 0000000000000..8459a653088dd --- /dev/null +++ b/Formula/c/clinfo.rb @@ -0,0 +1,43 @@ +class Clinfo < Formula + desc "Print information about OpenCL platforms and devices" + homepage "https://github.com/Oblomov/clinfo" + url "https://github.com/Oblomov/clinfo/archive/refs/tags/3.0.25.02.14.tar.gz" + sha256 "48b77dc33315e6f760791a2984f98ea4bff28504ff37d460d8291585f49fcd3a" + license "CC0-1.0" + head "https://github.com/Oblomov/clinfo.git", branch: "master" + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4f9f30aecde66c0eb0938f035b92db105242a3fe45ece3bc6c9c7d4b97f663d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "66be00f1c03820544063ebb39af878d24e1571a45e7c9bbc4cd6c1f2c576a927" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e0a75e7745ea32b3db3afb79fadd612b0e432e8412ed3f8e90768b46502b415" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f291734139a5f97270e79760822919be0824e9f273c732f796590c343e18e54" + sha256 cellar: :any_skip_relocation, sonoma: "b844184911efd1eea8fc994b07e2e02c1ffbbc63c3fcb771ebd1ea588d02e337" + sha256 cellar: :any_skip_relocation, ventura: "e13ffb6563cda2a028befe3a148ddb8bbe6c38f6fbf3cf4d9a82fd2a3ba7a8c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbdeca056b99bf6960da8a6ab7c8533da3aba2efbf6afea09d5fa7be08bbba5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90e95ee551467da22ea1a32580ad4e42ff3ea26a1cdb66e3a63dd9b53e01f5f1" + end + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + def install + system "make", "MANDIR=#{man}", "PREFIX=#{prefix}", "install" + end + + test do + # OpenCL does not work on virtualized arm64 macOS. + if Hardware::CPU.virtualized? && Hardware::CPU.arm? && OS.mac? + assert_match "number of devices : error -30", shell_output("#{bin}/clinfo 2>&1", 1) + else + assert_match(/Device Type +[CG]PU/, shell_output(bin/"clinfo")) + end + end +end diff --git a/Formula/c/cling.rb b/Formula/c/cling.rb new file mode 100644 index 0000000000000..7294e12f90584 --- /dev/null +++ b/Formula/c/cling.rb @@ -0,0 +1,75 @@ +class Cling < Formula + desc "C++ interpreter" + homepage "https://root.cern/cling/" + url "https://github.com/root-project/cling/archive/refs/tags/v1.2.tar.gz" + sha256 "beee8e461424d267ee2dec88b3de57326bc8e3470b4ceae2744de7d3d3aba1eb" + license all_of: [ + { any_of: ["LGPL-2.1-only", "NCSA"] }, + { "Apache-2.0" => { with: "LLVM-exception" } }, # llvm + ] + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "7661fbd1fa95f13e2cf3fa662dd9b260b72d50704807ee055e9c37a17fbb3603" + sha256 arm64_sequoia: "2180b446aa9cee44f570e641dd6ec247844271c9113f44e5669d743cf7b90e4f" + sha256 arm64_sonoma: "b50cf5b6af8e38837eb7cbe80ddc5972e4b7574b7631129dd58ab74a36d1426f" + sha256 arm64_ventura: "63a6979bd28f2e05a9a4639f7d5eeec99268be12af84074bf5afe731c63537a5" + sha256 sonoma: "616917ec942914038178ab9c18baf11f09adb518fd09a1bc453d8c570d87303e" + sha256 ventura: "2e72a1bb7d132bfd0d3630d7d556b04ad7440bab3c6ce4ba6b9a1feb823bc81e" + sha256 arm64_linux: "a8e84114fbe1eb79d64b4eb40107f97bdaf8820bde24dce48adb47c47d95e18d" + sha256 x86_64_linux: "0babe63deefb1727a2da1fcb90c9c95a296a04317cb87ccd923f652f8b034121" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + uses_from_macos "libedit" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + # https://github.com/root-project/cling?tab=readme-ov-file#building-from-source + # `git ls-remote --heads https://github.com/root-project/llvm-project.git cling-latest` + # grab the latest tag https://github.com/root-project/llvm-project/commit/ + resource "llvm" do + url "https://github.com/root-project/llvm-project/archive/refs/tags/cling-llvm18-20240821-01.tar.gz" + sha256 "47676c77bfa7c63cd6101bcea2611ac0cf363cb5ceb87955ea9e2b3e832ea887" + end + + def install + # Skip modification of CLING_OSX_SYSROOT to the unversioned SDK path + # Related: https://github.com/Homebrew/homebrew-core/issues/135714 + # Related: https://github.com/root-project/cling/issues/457 + inreplace "lib/Interpreter/CMakeLists.txt", '"MacOSX[.0-9]+\.sdk"', '"SKIP"' + + (buildpath/"llvm").install resource("llvm") + + system "cmake", "-S", "llvm/llvm", "-B", "build", + "-DCLING_CXX_PATH=clang++", + "-DLLVM_BUILD_TOOLS=OFF", + "-DLLVM_ENABLE_PROJECTS=clang", + "-DLLVM_EXTERNAL_CLING_SOURCE_DIR=#{buildpath}", + "-DLLVM_EXTERNAL_PROJECTS=cling", + "-DLLVM_TARGETS_TO_BUILD=host;NVPTX", + *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # We use an exec script as a symlink causes issues finding headers + bin.write_exec_script libexec/"bin/cling" + end + + test do + test = <<~EOS + '#include ' 'printf("Hello!")' + EOS + assert_equal "Hello!(int) 6", shell_output("#{bin}/cling #{test}").chomp + end +end diff --git a/Formula/c/clingo.rb b/Formula/c/clingo.rb new file mode 100644 index 0000000000000..2f00a60f6e3e5 --- /dev/null +++ b/Formula/c/clingo.rb @@ -0,0 +1,68 @@ +class Clingo < Formula + desc "ASP system to ground and solve logic programs" + homepage "https://potassco.org/clingo/" + url "https://github.com/potassco/clingo/archive/refs/tags/v5.8.0.tar.gz" + sha256 "4ddd5975e79d7a0f8d126039f1b923a371b1a43e0e0687e1537a37d6d6d5cc7c" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f4a0ef85978edfdfb395006c8ce603575282b12859dc1d25fe2edf6e57d9879b" + sha256 cellar: :any, arm64_sequoia: "75b64a722804b1c96506cc085e207c8f3cb3e14b23b0836dbac7a2ee9170f64f" + sha256 cellar: :any, arm64_sonoma: "71587c5bf9b5336b95d5c62170e2515978065f398f85dab7bbdb3831e38d007e" + sha256 cellar: :any, sonoma: "062bf230ada4dbb858940bf7316dd2f9b217b6d92fb2cc8543ddf38633e97a8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "608cc630ce095d1f32ad28dd0105a54e69aecbb38340e33883dd8e6747713e02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c13546d050e4d818f0e7aba365840f6e1d825e1a1ac1de4e10249e8821305f9" + end + + head do + url "https://github.com/potassco/clingo.git", branch: "master" + depends_on "bison" => :build + depends_on "re2c" => :build + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "cffi" + depends_on "lua" + depends_on "python@3.14" + + # This formula replaced the clasp & gringo formulae. + # https://github.com/Homebrew/homebrew-core/pull/20281 + link_overwrite "bin/clasp" + link_overwrite "bin/clingo" + link_overwrite "bin/gringo" + link_overwrite "bin/lpconvert" + link_overwrite "bin/reify" + + def python3 + which("python3.14") + end + + def install + site_packages = Language::Python.site_packages(python3) + + system "cmake", "-S", ".", "-B", "build", + "-DCLINGO_BUILD_WITH_PYTHON=ON", + "-DCLINGO_BUILD_PY_SHARED=ON", + "-DPYCLINGO_USE_INSTALL_PREFIX=ON", + "-DPYCLINGO_USER_INSTALL=OFF", + "-DCLINGO_BUILD_WITH_LUA=ON", + "-DPython_EXECUTABLE=#{python3}", + "-DPYCLINGO_INSTALL_DIR=#{site_packages}", + "-DPYCLINGO_DYNAMIC_LOOKUP=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "clingo version", shell_output("#{bin}/clingo --version") + system python3, "-c", "import clingo" + end +end diff --git a/Formula/c/clip.rb b/Formula/c/clip.rb new file mode 100644 index 0000000000000..04eabe03ec144 --- /dev/null +++ b/Formula/c/clip.rb @@ -0,0 +1,68 @@ +class Clip < Formula + desc "Create high-quality charts from the command-line" + homepage "https://github.com/asmuth/clip" + license "Apache-2.0" + revision 5 + head "https://github.com/asmuth/clip.git", branch: "master" + + stable do + url "https://github.com/asmuth/clip/archive/refs/tags/v0.7.tar.gz" + sha256 "f38f455cf3e9201614ac71d8a871e4ff94a6e4cf461fd5bf81bdf457ba2e6b3e" + + # Fix build with fmt 10, the issue is fixed on HEAD because the logic was changed + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "db658e6fcb0e356d9c460e6a9d68a284b7cfc259410427072fe0a3e980a79c3b" + sha256 cellar: :any, arm64_sequoia: "39474a5890b2367e6ef4e94946bfd9298d939b124cca416f7c497a9594c767b0" + sha256 cellar: :any, arm64_sonoma: "23bb3a919a00675c27a554bb7a23452d619cd19cd7cdb8259f73549500cce43d" + sha256 cellar: :any, sonoma: "abf0e00a25e56c1791a9c02c00ce5aa0daacb4fb905e67710b6542d165a56e3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8681f1d1300b0344c10090065c88c6bd20a3131963d9253084bc9178428c25f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11bab1e5129fadb9ee981a3fce1a5d5398e5ca11b7dee3a10dc325b8db8b80bf" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "fmt" + depends_on "fontconfig" + depends_on "freetype" + depends_on "fribidi" + depends_on "harfbuzz" + depends_on "libpng" + + conflicts_with "geomview", because: "both install `clip` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test", testpath + system bin/"clip", "--export", "chart.svg", "test/examples/charts_basic_areachart.clp" + assert_path_exists testpath/"chart.svg" + end +end + +__END__ +diff --git a/src/graphics/export_svg.cc b/src/graphics/export_svg.cc +index 12aa4ef7..2316063b 100644 +--- a/src/graphics/export_svg.cc ++++ b/src/graphics/export_svg.cc +@@ -159,7 +159,7 @@ Status svg_add_path( + case StrokeStyle::DASH: { + std::string dash_pattern; + for (const auto& v : stroke_style.dash_pattern) { +- dash_pattern += fmt::format("{} ", v); ++ dash_pattern += fmt::format("{} ", v.value); + } + + stroke_opts += svg_attr("stroke-dasharray", dash_pattern); diff --git a/Formula/c/clipboard.rb b/Formula/c/clipboard.rb new file mode 100644 index 0000000000000..49c10e2709450 --- /dev/null +++ b/Formula/c/clipboard.rb @@ -0,0 +1,65 @@ +class Clipboard < Formula + desc "Cut, copy, and paste anything, anywhere, all from the terminal" + homepage "https://getclipboard.app" + url "https://github.com/Slackadays/Clipboard/archive/refs/tags/0.10.0.tar.gz" + sha256 "741717ee505a7852fab5c69740b019e2b33f81d948232894ce294ed0a55e70fb" + license "GPL-3.0-or-later" + head "https://github.com/Slackadays/Clipboard.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5aa10de8e148bedda7f84cab8c848b785ab77c5cd5753cfbce5eb88574499c5" + sha256 cellar: :any, arm64_sequoia: "4133bfd9353d194c8b0597eaab4640752c07d53027c733ed1c1056b84a1f74c3" + sha256 cellar: :any, arm64_sonoma: "f479da9e04d1fe86620fe54f9149d90b4d15eb6945a44380193bd190333e9497" + sha256 cellar: :any, arm64_ventura: "d0415d6ed62ac9d27c7d360ca0d97ba7114c430c4c54fcca252cb3bbae73e39c" + sha256 cellar: :any, sonoma: "c551b2ece1d81249476f06ee13336c52a948fdf469b02b02b892a16bab58862d" + sha256 cellar: :any, ventura: "da3319d484d5bff0daff721c5236718d7dc65dd31e2b4352beee5aa4f70e2c91" + sha256 cellar: :any_skip_relocation, arm64_linux: "222d40b953ed0218c7d3f4b51708294764afd22cb6f9fbdffa5c6cd9465a6c34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d390684f0efa26d3fe4a5a5b93f98daaf10c678cf1b0a638ae52aeca7ec1ebb" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1300 + end + + on_linux do + depends_on "wayland-protocols" => :build + depends_on "alsa-lib" + depends_on "libx11" + depends_on "wayland" + end + + fails_with :clang do + build 1300 + cause "Requires C++20 support" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1300 + + # `-Os` is slow and buggy. + # https://github.com/Homebrew/homebrew-core/issues/136551 + # https://github.com/Slackadays/Clipboard/issues/147 + ENV.O3 + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["CLIPBOARD_FORCETTY"] = "1" + ENV["CLIPBOARD_NOGUI"] = "1" + system bin/"cb", "copy", test_fixtures("test.png") + system bin/"cb", "paste" + assert_path_exists testpath/"test.png" + end +end diff --git a/Formula/c/clipper.rb b/Formula/c/clipper.rb new file mode 100644 index 0000000000000..3b95368f334ea --- /dev/null +++ b/Formula/c/clipper.rb @@ -0,0 +1,56 @@ +class Clipper < Formula + desc "Share macOS clipboard with tmux and other local and remote apps" + homepage "https://github.com/wincent/clipper" + url "https://github.com/wincent/clipper/archive/refs/tags/2.1.0.tar.gz" + sha256 "9c13254e418a45c2577bd8a0b61d9736d474eec81947c615f48f53dacf3df756" + license "BSD-2-Clause" + head "https://github.com/wincent/clipper.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c0df619d149a439aa768fe0ad2f378c814df645516f1b97e7208af8570e9bc4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ba6f81698c0137f48012644d531c866531753698d1401afbf4812ac6afac002" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4430a2ed4f0c3c46fbfbbe3b439ec13693f5d9b4d644a93a58abcda5ee22463" + sha256 cellar: :any_skip_relocation, arm64_ventura: "786decdda1515fb47e7defc2d5b4b8f8663ae3bc5af905a8333394404f5bac4e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b590d188d9161d5bb518cd7459350e26884a94d0a6b34a28d88ff8a8bd7a6e26" + sha256 cellar: :any_skip_relocation, sonoma: "357b34301d35c90be7799c7cc702370ec0877e975e62c9033f2e2f1b8c5cfdf5" + sha256 cellar: :any_skip_relocation, ventura: "3af42ac07c4fd9f399ad8ddf10762d992610911b6afc59ea0ef02290d8c74b5b" + sha256 cellar: :any_skip_relocation, monterey: "86f8afc1e505c633c5c592cff7710184ce48e195ec038514682f1cdd78d3525c" + end + + depends_on "go" => :build + depends_on :macos + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "clipper.go" + end + + service do + run opt_bin/"clipper" + environment_variables LANG: "en_US.UTF-8" + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + test_data = "a simple string! to test clipper, with söme spéciål characters!! 🐎\n".freeze + + cmd = [opt_bin/"clipper", "-a", testpath/"clipper.sock", "-l", testpath/"clipper.log"].freeze + ohai cmd.join " " + + require "open3" + Open3.popen3({ "LANG" => "en_US.UTF-8" }, *cmd) do |_, _, _, clipper| + sleep 0.5 # Give it a moment to launch and create its socket. + begin + sock = UNIXSocket.new testpath/"clipper.sock" + assert_equal test_data.bytesize, sock.sendmsg(test_data) + sock.close + sleep 0.5 + assert_equal test_data, `LANG=en_US.UTF-8 pbpaste` + ensure + Process.kill "TERM", clipper.pid + end + end + end +end diff --git a/Formula/c/clipper2.rb b/Formula/c/clipper2.rb new file mode 100644 index 0000000000000..9b5d2990f198d --- /dev/null +++ b/Formula/c/clipper2.rb @@ -0,0 +1,56 @@ +class Clipper2 < Formula + desc "Polygon clipping and offsetting library" + homepage "https://github.com/AngusJohnson/Clipper2" + url "https://github.com/AngusJohnson/Clipper2/releases/download/Clipper2_1.5.4/Clipper2_1.5.4.zip" + sha256 "e5cbe4acdfbd381496feacd5692110f60914ce2998e7350b124fb11429574f75" + license "BSL-1.0" + + livecheck do + url :stable + regex(/^Clipper2[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6c32c400b83531261299a333feafd72ee660ec63811bac621debed98d986b04b" + sha256 cellar: :any, arm64_sequoia: "5344952baad694ee32003946b5ed28a8212f58564a79df0ee97a245a2e35fb31" + sha256 cellar: :any, arm64_sonoma: "dab66cd4bfc560cc95579a0586f44cd3a8a6c477abad07e5dce0d9812a97f9db" + sha256 cellar: :any, arm64_ventura: "c3634a45b7e445d258db0179b7946b08e4e746ec3d04c8f4c9a71f6d351a99b7" + sha256 cellar: :any, sonoma: "e488dd77e4e22dcc5c7031904749e89f67483e28d9c3e300674d4907ebc610c4" + sha256 cellar: :any, ventura: "beeaceb4432c6aba698d3e23f55e35f5aabc4aeb2a69323a94791b37b9e73532" + sha256 cellar: :any_skip_relocation, arm64_linux: "3827936a12835ab57ea26493a4b38da08705e0d0e743384a58f80b7817cf1acd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8346e821c65cac35259db00c4a43d56bd53dc4cc581bf0922b963968c2b9bd17" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCLIPPER2_EXAMPLES=OFF + -DCLIPPER2_TESTS=OFF + -DBUILD_SHARED_LIBS=ON + ] + + system "cmake", "-S", "CPP", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + inreplace "CPP/Examples/SimpleClipping/SimpleClipping.cpp" do |s| + s.gsub! "\"clipper2/clipper.h\"", "" + s.gsub! "\"../../Utils/clipper.svg.utils.h\"", "\"clipper.svg.utils.h\"" + s.gsub!(/System\(".*"\);/, "") + end + + inreplace "CPP/Utils/clipper.svg.utils.h", "\"clipper.svg.h\"", "" + + pkgshare.install "CPP/Examples/SimpleClipping/SimpleClipping.cpp", "CPP/Utils/clipper.svg.utils.h" + end + + test do + system ENV.cxx, pkgshare/"SimpleClipping.cpp", + "-std=c++17", "-I#{include}", "-L#{lib}", + "-lClipper2", "-lClipper2utils", + "-o", "test" + system "./test" + refute_empty (testpath/"solution.svg").read + end +end diff --git a/Formula/c/clippy.rb b/Formula/c/clippy.rb new file mode 100644 index 0000000000000..142c1b25498cb --- /dev/null +++ b/Formula/c/clippy.rb @@ -0,0 +1,36 @@ +class Clippy < Formula + desc "Copy files from your terminal that actually paste into GUI apps" + homepage "https://github.com/neilberkman/clippy" + url "https://github.com/neilberkman/clippy/archive/refs/tags/v1.6.1.tar.gz" + sha256 "273dede89fa4e71e89e08110e2fa311e6113163200a729b10fa4bae7438e1734" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d56315c8b5715ce38f80305fee1a5419ceeff3b377ebf4af44baca9442c8ceb3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6baf95c9b46564042bc070913757346e2412ae936e89abe732afd696539cdb70" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ffa61a2bb334c1c15f2f9acbc48728e0489b6f17108fbab93cb07d43c28b00e1" + sha256 cellar: :any_skip_relocation, sonoma: "3d29c8e5773677d027e66ddf636619055b6e97531e4861081795514b0c1a365a" + end + + depends_on "go" => :build + depends_on :macos + + def install + ldflags = %W[ + -s -w + -X github.com/neilberkman/clippy/cmd/internal/common.Version=#{version} + -X github.com/neilberkman/clippy/cmd/internal/common.Commit=#{tap.user} + -X github.com/neilberkman/clippy/cmd/internal/common.Date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/clippy" + system "go", "build", *std_go_args(ldflags:, output: bin/"pasty"), "./cmd/pasty" + end + + test do + assert_match version.to_s, shell_output("#{bin}/clippy --version") + assert_match version.to_s, shell_output("#{bin}/pasty --version") + + (testpath/"test.txt").write("test content") + system bin/"clippy", "-t", testpath/"test.txt" + end +end diff --git a/Formula/c/cliproxyapi.rb b/Formula/c/cliproxyapi.rb new file mode 100644 index 0000000000000..00d5163ad44b5 --- /dev/null +++ b/Formula/c/cliproxyapi.rb @@ -0,0 +1,45 @@ +class Cliproxyapi < Formula + desc "Wrap Gemini CLI, Codex, Claude Code, Qwen Code as an API service" + homepage "https://github.com/router-for-me/CLIProxyAPI" + url "https://github.com/router-for-me/CLIProxyAPI/archive/refs/tags/v6.3.8.tar.gz" + sha256 "ac220a8636f7330dad5011db8f5de0f19cd39d8fd7e55b987832be6551cf803e" + license "MIT" + + bottle do + sha256 arm64_tahoe: "49e0f324c934122be1363fbdd409527fd41770fa8daebd15a44555b76a20b12f" + sha256 arm64_sequoia: "49e0f324c934122be1363fbdd409527fd41770fa8daebd15a44555b76a20b12f" + sha256 arm64_sonoma: "49e0f324c934122be1363fbdd409527fd41770fa8daebd15a44555b76a20b12f" + sha256 cellar: :any_skip_relocation, sonoma: "8354163a50f15f7bbc60718482d29a75a20cd84fcc7f501307a60315be9c0336" + sha256 arm64_linux: "c5262292e3a1f1c89a78d9ec625cde5ca8c38a1fa249a47c795ca88bec54e55a" + sha256 x86_64_linux: "f00343ce7a9866e8084ad7299041dae75a4df2a0453cbf01936d9a083b4ff693" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + -X main.Commit=#{tap.user} + -X main.BuildDate=#{time.iso8601} + -X main.DefaultConfigPath=#{etc/"cliproxyapi.conf"} + ] + + system "go", "build", *std_go_args(ldflags:), "cmd/server/main.go" + etc.install "config.example.yaml" => "cliproxyapi.conf" + end + + service do + run [opt_bin/"cliproxyapi"] + keep_alive true + end + + test do + require "pty" + PTY.spawn(bin/"cliproxyapi", "-login", "-no-browser") do |r, _w, pid| + sleep 5 + Process.kill "TERM", pid + assert_match "accounts.google.com", r.read_nonblock(1024) + end + end +end diff --git a/Formula/c/clipsafe.rb b/Formula/c/clipsafe.rb new file mode 100644 index 0000000000000..c4e6b080b71c5 --- /dev/null +++ b/Formula/c/clipsafe.rb @@ -0,0 +1,200 @@ +class Clipsafe < Formula + desc "Command-line interface to Password Safe" + homepage "https://waxandwane.org/clipsafe.html" + url "https://waxandwane.org/download/clipsafe-1.1.tar.gz" + sha256 "7a70b4f467094693a58814a42d272e98387916588c6337963fa7258bda7a3e48" + license "GPL-2.0-or-later" + revision 4 + + livecheck do + url :homepage + regex(/href=.*?clipsafe[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0d6770ba30e28cfbf9d6df26db38b2eb322ce9a67edf75a168ab3dc725b13ec7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6f89dd5bba339827c6fe702e1bb88c77ef5bd58e30b464129c7ff2e6b72d2120" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5ae9bff8d772fa615a3e159c320a243211726b81664e11def14db996a23d6e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "289ae273376bacbbf897381fef5c151aad366d4e1ccc1bcbf6699301b01674bf" + sha256 cellar: :any_skip_relocation, sonoma: "8281bce81f78a416ee70c5fb1df8c86aea559c868576110c08734923e903187e" + sha256 cellar: :any_skip_relocation, ventura: "6625778c29a89af7ba98e2eec0e67aba28c2cb47e485580eca23ab1fdbe3f7db" + sha256 cellar: :any_skip_relocation, arm64_linux: "438b90a56328efe95721d4b24ba38bca5dc4c1f285926248bf36fffa82ff4b66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bd51459f433734d20a9d13266afbbf23ddd6603b95f35818387d507de902205" + end + + uses_from_macos "perl" + + on_linux do + resource "Digest::SHA" do + url "https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-6.02.tar.gz" + sha256 "2c66a6bea3eac9c210315ac7bf0af3e2e35679c4b65d8bae1ad4be3a58039b06" + end + + resource "Specio::Exporter" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-0.47.tar.gz" + sha256 "f41307f14444f8777e572f27eeb6a964084399e7e382c47c577827ad8a286a1c" + end + + resource "File::ShareDir::Install" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-0.13.tar.gz" + sha256 "45befdf0d95cbefe7c25a1daf293d85f780d6d2576146546e6828aad26e580f9" + end + + resource "DateTime" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.57.tar.gz" + sha256 "84643299a40f113361a0898e4e636638aa5d7668760047a3cbbcbc4ad57fd86b" + end + + resource "DateTime::Locale" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.34.tar.gz" + sha256 "b3c4db7d0afba9762315379f1e64d798ff21fc99f987e8cfedc07a2f7cf20340" + end + + resource "DateTime::TimeZone" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-2.52.tar.gz" + sha256 "8bc5c42082874b0e9c9ef949fa19035ac9b6904ebcda1931aa2d8a13f3950d8f" + end + + resource "namespace::autoclean" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/namespace-autoclean-0.29.tar.gz" + sha256 "45ebd8e64a54a86f88d8e01ae55212967c8aa8fed57e814085def7608ac65804" + end + + resource "namespace::clean" do + url "https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI/namespace-clean-0.27.tar.gz" + sha256 "8a10a83c3e183dc78f9e7b7aa4d09b47c11fb4e7d3a33b9a12912fd22e31af9d" + end + + resource "B::Hooks::EndOfScope" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/B-Hooks-EndOfScope-0.26.tar.gz" + sha256 "39df2f8c007a754672075f95b90797baebe97ada6d944b197a6352709cb30671" + end + + resource "Module::Implementation" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Module-Implementation-0.09.tar.gz" + sha256 "c15f1a12f0c2130c9efff3c2e1afe5887b08ccd033bd132186d1e7d5087fd66d" + end + + resource "Module::Runtime" do + url "https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz" + sha256 "68302ec646833547d410be28e09676db75006f4aa58a11f3bdb44ffe99f0f024" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + end + + resource "Variable::Magic" do + url "https://cpan.metacpan.org/authors/id/V/VP/VPIT/Variable-Magic-0.62.tar.gz" + sha256 "3f9a18517e33f006a9c2fc4f43f01b54abfe6ff2eae7322424f31069296b615c" + end + + resource "Sub::Exporter::Progressive" do + url "https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz" + sha256 "d535b7954d64da1ac1305b1fadf98202769e3599376854b2ced90c382beac056" + end + + resource "Package::Stash" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-0.40.tar.gz" + sha256 "5a9722c6d9cb29ee133e5f7b08a5362762a0b5633ff5170642a5b0686e95e066" + end + + resource "Module::Build" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz" + sha256 "7e0f4c692c1740c1ac84ea14d7ea3d8bc798b2fb26c09877229e04f430b2b717" + end + + resource "Params::Validate" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-Validate-1.30.tar.gz" + sha256 "9a3a35583d3125d07e8c802c1f92f5be7d526e76dd496e944da270b1e273d812" + end + + resource "Sub::Identify" do + url "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Sub-Identify-0.14.tar.gz" + sha256 "068d272086514dd1e842b6a40b1bedbafee63900e5b08890ef6700039defad6f" + end + + resource "Class::Singleton" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHAY/Class-Singleton-1.6.tar.gz" + sha256 "27ba13f0d9512929166bbd8c9ef95d90d630fc80f0c9a1b7458891055e9282a4" + end + + resource "MRO::Compat" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/MRO-Compat-0.15.tar.gz" + sha256 "0d4535f88e43babd84ab604866215fc4d04398bd4db7b21852d4a31b1c15ef61" + end + + resource "Role::Tiny" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.002004.tar.gz" + sha256 "d7bdee9e138a4f83aa52d0a981625644bda87ff16642dfa845dcb44d9a242b45" + end + + resource "Eval::Closure" do + url "https://cpan.metacpan.org/authors/id/D/DO/DOY/Eval-Closure-0.14.tar.gz" + sha256 "ea0944f2f5ec98d895bef6d503e6e4a376fea6383a6bc64c7670d46ff2218cad" + end + + resource "Devel::StackTrace" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-2.04.tar.gz" + sha256 "cd3c03ed547d3d42c61fa5814c98296139392e7971c092e09a431f2c9f5d6855" + end + + resource "Params::ValidationCompiler" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-0.30.tar.gz" + sha256 "dc5bee23383be42765073db284bed9fbd819d4705ad649c20b644452090d16cb" + end + + resource "Exception::Class" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Exception-Class-1.45.tar.gz" + sha256 "5482a77ef027ca1f9f39e1f48c558356e954936fc8fbbdee6c811c512701b249" + end + + resource "Class::Data::Inheritable" do + url "https://cpan.metacpan.org/authors/id/R/RS/RSHERER/Class-Data-Inheritable-0.09.tar.gz" + sha256 "44088d6e90712e187b8a5b050ca5b1c70efe2baa32ae123e9bd8f59f29f06e4d" + end + + resource "File::ShareDir" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-1.118.tar.gz" + sha256 "3bb2a20ba35df958dc0a4f2306fc05d903d8b8c4de3c8beefce17739d281c958" + end + + resource "Class::Inspector" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Class-Inspector-1.36.tar.gz" + sha256 "cc295d23a472687c24489d58226ead23b9fdc2588e522f0b5f0747741700694e" + end + end + + resource "Crypt::Twofish" do + url "https://cpan.metacpan.org/authors/id/A/AM/AMS/Crypt-Twofish-2.18.tar.gz" + sha256 "5881555d6187972a2382aa0d4db2d74c970b06774c621b6ca523739236d2d501" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + if File.exist? "Makefile.PL" + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + else + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + end + + bin.install "clipsafe" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + system bin/"clipsafe", "--help" + end +end diff --git a/Formula/c/clisp.rb b/Formula/c/clisp.rb new file mode 100644 index 0000000000000..e961498a0c5a8 --- /dev/null +++ b/Formula/c/clisp.rb @@ -0,0 +1,71 @@ +class Clisp < Formula + desc "GNU CLISP, a Common Lisp implementation" + homepage "https://clisp.sourceforge.io/" + license "GPL-2.0-or-later" + revision 1 + head "https://gitlab.com/gnu-clisp/clisp.git", branch: "master" + + stable do + url "https://alpha.gnu.org/gnu/clisp/clisp-2.49.92.tar.bz2" + sha256 "bd443a94aa9b02da4c4abbcecfc04ffff1919c0a8b0e7e35649b86198cd6bb89" + + # Fix build on ARM + # Remove once https://gitlab.com/gnu-clisp/clisp/-/commit/39b68a14d9a1fcde8a357c088c7317b19ff598ad is released, + # which contains the necessary patch to the bundled gnulib + # https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=00e688fc22c7bfb0bba2bd8a7b2a7d22d21d31ef + patch :DATA + end + + livecheck do + url "https://alpha.gnu.org/gnu/clisp/?C=M&O=D" + regex(/href=.*?clisp[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :page_match + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7c6012970cf0b4c270ea9144deb1aa018a820f333dd0a23c98116a6da81cdccd" + sha256 cellar: :any, arm64_sequoia: "ddfc9a191f0afb4b3763164759e47df9e6eabec853dd60a1575a83d040309003" + sha256 cellar: :any, arm64_sonoma: "82b6891a410f0c7c212fed6e18527102ad9180d0003ccf3e24bb8d8071d37353" + sha256 cellar: :any, sonoma: "a4225bd790a152ba74e307d69ff945b69aa0c04fc43b1c98b67298085300c129" + sha256 arm64_linux: "21dbffbe262f2cd831a5b80be895bb1747d5e58091f28d5067be710cab22d832" + sha256 x86_64_linux: "ac69bd943aac71e7e7d782747b3e3369923e13cb8de3990c3afe6adf90e42ba2" + end + + depends_on "libffcall" + depends_on "libsigsegv" + depends_on "readline" + uses_from_macos "libxcrypt" + + def install + system "./configure", *std_configure_args, + "--with-readline=yes", + "--elispdir=#{elisp}" + + cd "src" do + system "make" + system "make", "install" + end + end + + test do + (testpath/"main.lisp").write <<~LISP + (format t "Hello, World!") + LISP + assert_equal "Hello, World!", shell_output("#{bin}/clisp main.lisp").chomp + end +end + +__END__ +--- a/src/gllib/vma-iter.c ++++ b/src/gllib/vma-iter.c +@@ -1327,7 +1327,7 @@ + In 64-bit processes, we could use vm_region_64 or mach_vm_region. + I choose vm_region_64 because it uses the same types as vm_region, + resulting in less conditional code. */ +-# if defined __ppc64__ || defined __x86_64__ ++# if defined __aarch64__ || defined __ppc64__ || defined __x86_64__ + struct vm_region_basic_info_64 info; + mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64; diff --git a/Formula/c/clitest.rb b/Formula/c/clitest.rb new file mode 100644 index 0000000000000..d73cf2fcc2866 --- /dev/null +++ b/Formula/c/clitest.rb @@ -0,0 +1,31 @@ +class Clitest < Formula + desc "Command-Line Tester" + homepage "https://github.com/aureliojargas/clitest" + url "https://github.com/aureliojargas/clitest/archive/refs/tags/0.5.0.tar.gz" + sha256 "4005de0bc27e4676e418ab1e1e64861272aa74af1212c73a1173760fc449b049" + license "MIT" + head "https://github.com/aureliojargas/clitest.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f1cbfc94748a8712ab8a8845fd800d0009519c4d5ffbbcf03efce267406b91e5" + end + + def install + bin.install "clitest" + end + + test do + (testpath/"test.txt").write <<~EOS + $ echo "Hello World" #=> Hello World + $ cd /tmp + $ pwd #=> /tmp + $ cd "$OLDPWD" + $ + EOS + assert_match "OK: 4 of 4 tests passed", + shell_output("#{bin}/clitest #{testpath}/test.txt") + end +end diff --git a/Formula/c/clive.rb b/Formula/c/clive.rb new file mode 100644 index 0000000000000..7e1a15a4495ed --- /dev/null +++ b/Formula/c/clive.rb @@ -0,0 +1,32 @@ +class Clive < Formula + desc "Automates terminal operations" + homepage "https://github.com/koki-develop/clive" + url "https://github.com/koki-develop/clive/archive/refs/tags/v0.12.13.tar.gz" + sha256 "0cad5cb387d02120c9ffdca84e8fe2d1a94abc3212ae14ecb39c403dfa43f06b" + license "MIT" + head "https://github.com/koki-develop/clive.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8453e96034ffae1201417b2f0fc748fcc923ece46ade09b2ec7a8673e1e8196" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8453e96034ffae1201417b2f0fc748fcc923ece46ade09b2ec7a8673e1e8196" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8453e96034ffae1201417b2f0fc748fcc923ece46ade09b2ec7a8673e1e8196" + sha256 cellar: :any_skip_relocation, sonoma: "b11df80e6486a90008055d418d3286a8e29d3f59da8450d31edf542f1a25b488" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab130a9b1fb5e5ac176a03eb9c4fee933f467c231647daa18ea779fcb5ceaede" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1dab03d63f2c6b8910a0eeda77fa78d40bc02929ab6650efe5294ec79ed8f07d" + end + + depends_on "go" => :build + depends_on "ttyd" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/koki-develop/clive/cmd.version=v#{version}") + end + + test do + system bin/"clive", "init" + assert_path_exists testpath/"clive.yml" + + system bin/"clive", "validate" + assert_match version.to_s, shell_output("#{bin}/clive --version") + end +end diff --git a/Formula/c/cljfmt.rb b/Formula/c/cljfmt.rb new file mode 100644 index 0000000000000..376e0635af62c --- /dev/null +++ b/Formula/c/cljfmt.rb @@ -0,0 +1,46 @@ +class Cljfmt < Formula + desc "Formatting Clojure code" + homepage "https://github.com/weavejester/cljfmt" + url "https://github.com/weavejester/cljfmt/archive/refs/tags/0.15.3.tar.gz" + sha256 "b40ef8ccd0bb64fcda56b28c043d995c772b391ec0b605bc1e0bb7ef64df1f10" + license "EPL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "424546f6441f0834947fa5568d85106db9878f7264f2bb5d8a6abd821fbae7d7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4fc27186eb7a97f8504db70784b617237ce1759d36104418c2229ba5b08d226d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "065cae91b219fe64fc8e9ce4a44727e4499b1d57c7d95b5e9ba47661f81fd63d" + sha256 cellar: :any_skip_relocation, sonoma: "176c32a079c0641b79feb7d16b5d5880df3ad4c7c6c16a960759dd7a73a6f3e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "2da9f2ff77a62b11fdc298538599f17f5210dfe72537b6f76392d6f7f8a21889" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90853940705e21ad035433f25c774c6123607aa8b9afc170655691575f8a0bed" + end + + depends_on "leiningen" => :build + depends_on "openjdk" + + def install + cd "cljfmt" do + system "lein", "uberjar" + libexec.install "target/cljfmt-#{version}-standalone.jar" => "cljfmt.jar" + end + + bin.write_jar_script libexec/"cljfmt.jar", "cljfmt" + end + + test do + (testpath/"test.clj").write <<~CLOJURE + (ns test.core) + (defn foo [] (println "hello")) + CLOJURE + + system bin/"cljfmt", "fix", "--verbose", "test.clj" + + assert_equal <<~CLOJURE, (testpath/"test.clj").read + (ns test.core) + (defn foo [] (println "hello")) + CLOJURE + + system bin/"cljfmt", "check", "test.clj" + + assert_match version.to_s, shell_output("#{bin}/cljfmt --version") + end +end diff --git a/Formula/c/cln.rb b/Formula/c/cln.rb new file mode 100644 index 0000000000000..9fb27ce698795 --- /dev/null +++ b/Formula/c/cln.rb @@ -0,0 +1,53 @@ +class Cln < Formula + desc "Class Library for Numbers" + homepage "https://www.ginac.de/CLN/" + url "https://www.ginac.de/CLN/cln-1.3.7.tar.bz2" + sha256 "7c7ed8474958337e4df5bb57ea5176ad0365004cbb98b621765bc4606a10d86b" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?cln[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "198d7aa1178fc5df110461b2718466f2cefdedf75a0e4c88287dc130da5ddefc" + sha256 cellar: :any, arm64_sequoia: "2279ade96381f9ac79cf40c1e29b2ea4fc998a25895b54a7fc0f77cc72d1782d" + sha256 cellar: :any, arm64_sonoma: "128ed65c291ea5059320c7618340ca04b5a59126a36b6e22de91622175d62339" + sha256 cellar: :any, arm64_ventura: "c47f98e423d29abd0de4bb322a4587817db8652d09909b07ec2eff44ff08b0fa" + sha256 cellar: :any, arm64_monterey: "a7a3af1288376ee0313842c9212c7e33743fcb6d8d17df95348d5360ea657d9c" + sha256 cellar: :any, sonoma: "5c8b028628b234da5d4f97a734728ff9f73f381a3bae4ed565c8e21040190fc3" + sha256 cellar: :any, ventura: "815ff9c38056bcaa56fb7a445ebb32efa14323f26d42da224014e9ff9a57a236" + sha256 cellar: :any, monterey: "16fc46bc77d40dc5ad8060ac9375fe869c136fd1ea9f1da3df466e2a4bdb3960" + sha256 cellar: :any_skip_relocation, arm64_linux: "c34b349259faf1c3c86953d6ce41a6b6136ef5a20b775e7907f9476b9d8eaa57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1303657d924cdb1730d63a5b49b652cb84d07ff7694c528e997e37d796b68ec" + end + + head do + url "git://www.ginac.de/cln.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "wget" => :build + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + end + + depends_on "gmp" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make" + system "make", "check" + system "make", "install" + end + + test do + assert_match "3.14159", shell_output("#{bin}/pi 6") + end +end diff --git a/Formula/c/cloc.rb b/Formula/c/cloc.rb new file mode 100644 index 0000000000000..121083d821d50 --- /dev/null +++ b/Formula/c/cloc.rb @@ -0,0 +1,101 @@ +class Cloc < Formula + desc "Statistics utility to count lines of code" + homepage "https://github.com/AlDanial/cloc/" + url "https://github.com/AlDanial/cloc/archive/refs/tags/v2.06.tar.gz" + sha256 "10d78427fda66aaa10ec733adb03d910c49376fe9068aacebb17aa657a7a3a05" + license "GPL-2.0-or-later" + head "https://github.com/AlDanial/cloc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "98da5dbf7c3e919ca2852b18771ee89616ce565c77dee9741fae7ddbfa5fe40d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe4188eee9b775b155e22cfa70c45df2b98e3873acc2ecde4680b8ad60605167" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe4188eee9b775b155e22cfa70c45df2b98e3873acc2ecde4680b8ad60605167" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dea4656e3a2afbd9e1b794a2af5293107474e0d3ddb2effc35d7c22af4f22484" + sha256 cellar: :any_skip_relocation, sonoma: "26e3648038206fb1275209efb8ecea59f898935edc39a2664b5bc1aeb558a78c" + sha256 cellar: :any_skip_relocation, ventura: "a65608ead2dfd9c37c0b752029d0b1183d6c1f95221f87fce919b082a82ea1fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "592d22654dfd545f6145e652023aa00b13c977d0fb9e5ddeffb016ad2e109b77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6091233b75cdeb91a58b8aca46b325c9e9b9778c9ac57549a9675f525fdca30d" + end + + uses_from_macos "perl" + + resource "Regexp::Common" do + url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz" + sha256 "ee07853aee06f310e040b6bf1a0199a18d81896d3219b9b35c9630d0eb69089b" + end + + resource "Algorithm::Diff" do + url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Algorithm-Diff-1.201.tar.gz" + sha256 "0022da5982645d9ef0207f3eb9ef63e70e9713ed2340ed7b3850779b0d842a7d" + end + + resource "Parallel::ForkManager" do + url "https://cpan.metacpan.org/authors/id/Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz" + sha256 "c1b2970a8bb666c3de7caac4a8f4dbcc043ab819bbc337692ec7bf27adae4404" + end + + resource "Sub::Quote" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Sub-Quote-2.006008.tar.gz" + sha256 "94bebd500af55762e83ea2f2bc594d87af828072370c7110c60c238a800d15b2" + end + + resource "Moo::Role" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-2.005005.tar.gz" + sha256 "fb5a2952649faed07373f220b78004a9c6aba387739133740c1770e9b1f4b108" + end + + resource "Module::Runtime" do + url "https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz" + sha256 "68302ec646833547d410be28e09676db75006f4aa58a11f3bdb44ffe99f0f024" + end + + resource "Role::Tiny" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.002004.tar.gz" + sha256 "d7bdee9e138a4f83aa52d0a981625644bda87ff16642dfa845dcb44d9a242b45" + end + + resource "Devel::GlobalDestruction" do + on_linux do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Devel-GlobalDestruction-0.14.tar.gz" + sha256 "34b8a5f29991311468fe6913cadaba75fd5d2b0b3ee3bb41fe5b53efab9154ab" + end + end + + resource "Sub::Exporter::Progressive" do + on_linux do + url "https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz" + sha256 "d535b7954d64da1ac1305b1fadf98202769e3599376854b2ced90c382beac056" + end + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + # These are shipped as standard with OS X/macOS' default Perl, but + # because upstream has chosen to use "#!/usr/bin/env perl" cloc will + # use whichever Perl is in the PATH, which isn't guaranteed to include + # these modules. Vendor them to be safe. + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + system "make", "-C", "Unix", "prefix=#{libexec}", "install" + bin.install libexec/"bin/cloc" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + man1.install libexec/"share/man/man1/cloc.1" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + return 0; + } + C + + assert_match "1,C,0,0,4", shell_output("#{bin}/cloc --csv .") + end +end diff --git a/Formula/c/clog.rb b/Formula/c/clog.rb new file mode 100644 index 0000000000000..feb34755ff2a3 --- /dev/null +++ b/Formula/c/clog.rb @@ -0,0 +1,59 @@ +class Clog < Formula + desc "Colorized pattern-matching log tail utility" + homepage "https://gothenburgbitfactory.org/clog/docs/" + url "https://github.com/GothenburgBitFactory/clog/releases/download/v1.3.0/clog-1.3.0.tar.gz" + sha256 "fed44a8d398790ab0cf426c1b006e7246e20f3fcd56c0ec4132d24b05d5d2018" + license "MIT" + head "https://github.com/GothenburgBitFactory/clog.git", branch: "master" + + livecheck do + url "https://gothenburgbitfactory.org" + regex(/href=.*?clog[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c14c0f289d7f795ec4a4cf88ded115bbd95cbe14d1d2da796fc8e2cfd7b63090" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "324768db7056ee6258ee9bc6a19b15e325061e637a4074201e299f110979f81b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ca002e0ad80711f5ca0edc944efd4ab5c0eb5698eecce8913f53e961d7040a90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9bb8aee30f0a25183545a2a3e775fac4f8605aad93e63cb0928c8d196f3812a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "503a96204475c67ba2d564cc98b0964bbff48da89e4c2b3f0d4125a7fb32ffc4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ce662c5bd6dfdc6dca64911cbdc37ebcfe5aac7eaea48215f94d3b94bba0b37c" + sha256 cellar: :any_skip_relocation, sonoma: "b62659f2528522acc8a52ac736dfc66a49b97fb8cc07afa46f5b3cf2bd357d11" + sha256 cellar: :any_skip_relocation, ventura: "4c5b54b76cf6efd8d72d07b3dfa526605c1a69c93109155a9fd2d1e985e71455" + sha256 cellar: :any_skip_relocation, monterey: "71bcca7b6cb4bf84c6c0c678d45b593f551e9b351bcb0fd557e7e7c0b90648c7" + sha256 cellar: :any_skip_relocation, big_sur: "864d26fdc6960a6b4daf9ca76ef52e5e2db4a8ece187dbc7d8b87939e4823d32" + sha256 cellar: :any_skip_relocation, catalina: "0a5985eee7c41d2199e64105cb0d32b8e065b57257841f48b2eb36a3a662bc7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d94d1596bb077ec7890f1bee8650ecf592c75c9415e310eb55f541df1d52c13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74b571a8740f2d0d8798ed8ee046d9239404ec6789987b98eb48b25c122c00e3" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + Next step is to create a .clogrc file in your home directory. See 'man clog' + for details and a sample file. + EOS + end + + test do + # Create a rule to suppress any line containing the word 'ignore' + (testpath/".clogrc").write "default rule /ignore/ --> suppress" + + # Test to ensure that a line that does not match the above rule is not suppressed + assert_equal "do not suppress", pipe_output("#{bin}/clog --file #{testpath}/.clogrc", "do not suppress").chomp + + # Test to ensure that a line that matches the above rule is suppressed + assert_empty pipe_output("#{bin}/clog --file #{testpath}/.clogrc", "ignore this line").chomp + end +end diff --git a/Formula/c/clojure-lsp.rb b/Formula/c/clojure-lsp.rb new file mode 100644 index 0000000000000..ad4b1a31b49f2 --- /dev/null +++ b/Formula/c/clojure-lsp.rb @@ -0,0 +1,50 @@ +class ClojureLsp < Formula + desc "Language Server (LSP) for Clojure" + homepage "https://github.com/clojure-lsp/clojure-lsp" + url "https://github.com/clojure-lsp/clojure-lsp/releases/download/2025.08.25-14.21.46/clojure-lsp-standalone.jar" + version "2025.08.25-14.21.46" + sha256 "27cf511e0c4b24749141f6d22d3d0c857ee40ccb191168caf11186232c7a7629" + license "MIT" + version_scheme 1 + head "https://github.com/clojure-lsp/clojure-lsp.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d{4}(?:[.-]\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "f85f25bcac2090ac9f7ac050341e4b34af1a1432d9e4b8d5c53df2a71a012bc8" + end + + depends_on "openjdk" + + def install + libexec.install "clojure-lsp-standalone.jar" + bin.write_jar_script libexec/"clojure-lsp-standalone.jar", "clojure-lsp" + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "processId": 88075, + "rootUri": null, + "capabilities": {}, + "trace": "verbose", + "workspaceFolders": null + } + } + JSON + + Open3.popen3(bin/"clojure-lsp") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/c/clojure.rb b/Formula/c/clojure.rb new file mode 100644 index 0000000000000..9f08ce2d298d2 --- /dev/null +++ b/Formula/c/clojure.rb @@ -0,0 +1,36 @@ +class Clojure < Formula + desc "Dynamic, general-purpose programming language" + homepage "https://clojure.org" + url "https://github.com/clojure/brew-install/releases/download/1.12.3.1577/clojure-tools-1.12.3.1577.tar.gz" + mirror "https://download.clojure.org/install/clojure-tools-1.12.3.1577.tar.gz" + sha256 "bbf8513ae88b9873e9781ae86adcb560b81209c66fe94cbe72428af39b1ebacc" + license "EPL-1.0" + version_scheme 1 + + livecheck do + url "https://raw.githubusercontent.com/clojure/homebrew-tools/master/Formula/clojure.rb" + regex(/url ".*?clojure-tools-v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c40319a62a7f5296cd44674e63fd3ae2a770669303df7eabcce5d4e2acbc3a84" + end + + depends_on "openjdk" + depends_on "rlwrap" + + uses_from_macos "ruby" => :build + + def install + system "./install.sh", prefix + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + ENV["TERM"] = "xterm" + system("#{bin}/clj", "-e", "nil") + %w[clojure clj].each do |clj| + assert_equal "2", shell_output("#{bin}/#{clj} -e \"(+ 1 1)\"").strip + end + end +end diff --git a/Formula/c/clojurescript.rb b/Formula/c/clojurescript.rb new file mode 100644 index 0000000000000..9352eab36714a --- /dev/null +++ b/Formula/c/clojurescript.rb @@ -0,0 +1,42 @@ +class Clojurescript < Formula + desc "Clojure to JS compiler" + homepage "https://github.com/clojure/clojurescript" + url "https://github.com/clojure/clojurescript/releases/download/r1.12.42/cljs.jar" + sha256 "41ab539bee3904cb0b3ccdf15422f0157701e5c4092f4f65d4b01f367772e4d5" + license "EPL-1.0" + head "https://github.com/clojure/clojurescript.git", branch: "master" + + livecheck do + url :stable + regex(/r?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "d73ca669b51b1426ba1bb5e70fdc04bf2e07ff64b7261f8cc39d1762726ee08c" + end + + depends_on "openjdk" + + def install + libexec.install "cljs.jar" + bin.write_jar_script libexec/"cljs.jar", "cljsc" + end + + def caveats + <<~EOS + This formula is useful if you need to use the ClojureScript compiler directly. + For a more integrated workflow use Leiningen, Boot, or Maven. + EOS + end + + test do + (testpath/"t.cljs").write <<~CLOJURE + (ns hello) + (defn ^:export greet [n] + (str "Hello " n)) + CLOJURE + + system bin/"cljsc", testpath/"t.cljs" + end +end diff --git a/Formula/c/cloog.rb b/Formula/c/cloog.rb new file mode 100644 index 0000000000000..d9918eb93ddd5 --- /dev/null +++ b/Formula/c/cloog.rb @@ -0,0 +1,62 @@ +class Cloog < Formula + desc "Generate code for scanning Z-polyhedra" + homepage "https://github.com/periscop/cloog" + url "https://github.com/periscop/cloog/releases/download/cloog-0.21.1/cloog-0.21.1.tar.gz" + sha256 "d370cf9990d2be24bfb24750e355bac26110051248cabf2add61f9b3867fb1d7" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "398e809f0432ab4350d43531f5918d4d2610c63a69e3ff3d7843275c8eb332bd" + sha256 cellar: :any, arm64_sequoia: "a094bf71fc868a36e66ae12b4a3de5ad0c887f9f92278a473722273bad35fd64" + sha256 cellar: :any, arm64_sonoma: "ead03f190330ee52bead39f8d29fdb67667882b5acecaa490f6d63c2bc750cac" + sha256 cellar: :any, arm64_ventura: "cead91fed1a94c7121eb28dbd53060c3bf70a83c62a0546e50d2ec486e1e1e63" + sha256 cellar: :any, arm64_monterey: "9d8c88f5f09bcc01984b15f0ba5d2fe143ee4e129f7dafce268cb36831f33480" + sha256 cellar: :any, arm64_big_sur: "c0c6fe61fc3cab274494d0afc7c1d3391b58890544efd5f43e4ab13c3c7fccfe" + sha256 cellar: :any, sonoma: "df4fcfc84b3e7d63f3443caca892be8d75bcd7d59f42ec2353d8358f646253db" + sha256 cellar: :any, ventura: "d46074ebafa3ac16eedd35381930c80446da0db12109746fc39ad316dc9f98a2" + sha256 cellar: :any, monterey: "3a6c23a37dcb685ec5ecdd08921dcad09c121d3e0763c0df609e6a9c85fcd964" + sha256 cellar: :any, big_sur: "9e572d9cca3d5da40666ea38027e38e4189f8c8471d4fe12376828f234b12721" + sha256 cellar: :any_skip_relocation, arm64_linux: "63b976028eeb44aef31fa6c5643249a4ce8881125d7567ffd710f0743cbb71d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0f9fc5de0ae2ddc6bc734ae97b67cf0173ba90da90db87f5402d36c3bcc0ef6" + end + + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "isl" + + def install + # Avoid doc build. + ENV["ac_cv_prog_TEXI2DVI"] = "" + + system "./configure", "--disable-silent-rules", + "--with-gmp=system", + "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}", + "--with-isl=system", + "--with-isl-prefix=#{Formula["isl"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cloog").write <<~EOS + c + + 0 2 + 0 + + 1 + + 1 + 0 2 + 0 0 0 + 0 + + 0 + EOS + + assert_match %r{Generated from #{testpath}/test.cloog by CLooG}, + shell_output("#{bin}/cloog #{testpath}/test.cloog") + end +end diff --git a/Formula/c/closure-compiler.rb b/Formula/c/closure-compiler.rb new file mode 100644 index 0000000000000..549720619d6a9 --- /dev/null +++ b/Formula/c/closure-compiler.rb @@ -0,0 +1,36 @@ +class ClosureCompiler < Formula + desc "JavaScript optimizing compiler" + homepage "https://developers.google.com/closure/compiler" + url "https://search.maven.org/remotecontent?filepath=com/google/javascript/closure-compiler/v20250820/closure-compiler-v20250820.jar" + sha256 "171d24354ffe7dcd378fe4dfb30e4673859391f4da11a70ba04fdac0dd4d82d2" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/google/javascript/closure-compiler/" + regex(/href=.*?v?(\d{8})/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b7d3823d6b9653cc45f639978af74461621cefa1f9433ca893d2db3fbc6932b0" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + bin.write_jar_script libexec/"closure-compiler-v#{version}.jar", "closure-compiler" + end + + test do + (testpath/"test.js").write <<~JS + (function(){ + var t = true; + return t; + })(); + JS + system bin/"closure-compiler", + "--js", testpath/"test.js", + "--js_output_file", testpath/"out.js" + assert_equal (testpath/"out.js").read.chomp, "(function(){return!0})();" + end +end diff --git a/Formula/c/cloud-nuke.rb b/Formula/c/cloud-nuke.rb new file mode 100644 index 0000000000000..6e2451a1e4c20 --- /dev/null +++ b/Formula/c/cloud-nuke.rb @@ -0,0 +1,33 @@ +class CloudNuke < Formula + desc "CLI tool to nuke (delete) cloud resources" + homepage "https://gruntwork.io/" + url "https://github.com/gruntwork-io/cloud-nuke/archive/refs/tags/v0.45.0.tar.gz" + sha256 "a3896893005844f1be0c4de9f13f3a040257fbb7bbfbedd876bc5193882663ee" + license "MIT" + head "https://github.com/gruntwork-io/cloud-nuke.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2937f79e295bb7a75b1e0c5d9d6f010308523fbeb0c0254b00913dbbe5f81ae8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2937f79e295bb7a75b1e0c5d9d6f010308523fbeb0c0254b00913dbbe5f81ae8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2937f79e295bb7a75b1e0c5d9d6f010308523fbeb0c0254b00913dbbe5f81ae8" + sha256 cellar: :any_skip_relocation, sonoma: "c3cfa5229d2f049d38c0eecc7e578dae23e5cace47f0c0d7c42fea9db941ada6" + sha256 cellar: :any_skip_relocation, arm64_linux: "391d109bad3758f7bb439175276e03f8f6b9b19a52c1309285b1c6f22402ed6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a41fe54b15fedd197b1dc4f47fe67549726cca4a425189166de63cb7b2ebfd9" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.VERSION=v#{version}") + end + + test do + assert_match "A CLI tool to nuke (delete) cloud resources", shell_output("#{bin}/cloud-nuke --help 2>1&") + assert_match "ec2", shell_output("#{bin}/cloud-nuke aws --list-resource-types") + end +end diff --git a/Formula/c/cloud-provider-kind.rb b/Formula/c/cloud-provider-kind.rb new file mode 100644 index 0000000000000..436e908721291 --- /dev/null +++ b/Formula/c/cloud-provider-kind.rb @@ -0,0 +1,35 @@ +class CloudProviderKind < Formula + desc "Cloud provider for KIND clusters" + homepage "https://github.com/kubernetes-sigs/cloud-provider-kind" + url "https://github.com/kubernetes-sigs/cloud-provider-kind/archive/refs/tags/v0.9.0.tar.gz" + sha256 "bfeeabdeb12d742608492e56b3ac261d3208ded72f9335b3195695654a00909f" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/cloud-provider-kind.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bd6809959e5c4db2f5d16a0a3377d298d23831a8aa0889b15d5e43c1cdefdeb3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "501076b26258448230a71be544bf5a3f11cb7c160f69d3c87123b0f46191112e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f662274498463cd4691da354b29effaf4c8f9650c7f767e6801bb362a42e0931" + sha256 cellar: :any_skip_relocation, sonoma: "0cc93b9511006780da356d6c60689522cf1b346f4a890f80cd22fd64eaa3b5a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "571409c17bfae88192e6422fefb598b2ccdb3ed7467c3506cfb6e850973a4ce5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32d44aaa54e496caea95f534a143997243d4e96acda85d7fb8f42b7aac59bf3e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + status_output = shell_output("#{bin}/cloud-provider-kind 2>&1", 255) + if OS.mac? + # Should error out as requires root on Mac + assert_match "Please run this again with `sudo`", status_output + elsif OS.linux? + # Should error out because without docker or podman + assert_match "can not detect cluster provider", status_output + end + end +end diff --git a/Formula/c/cloud-sql-proxy.rb b/Formula/c/cloud-sql-proxy.rb new file mode 100644 index 0000000000000..ac428f638650a --- /dev/null +++ b/Formula/c/cloud-sql-proxy.rb @@ -0,0 +1,28 @@ +class CloudSqlProxy < Formula + desc "Utility for connecting securely to your Cloud SQL instances" + homepage "https://github.com/GoogleCloudPlatform/cloud-sql-proxy" + url "https://github.com/GoogleCloudPlatform/cloud-sql-proxy/archive/refs/tags/v2.19.0.tar.gz" + sha256 "6bea89b43b858590a4f6f7cc48a8490eb8415f22caca408c4ed8eabd47241bcc" + license "Apache-2.0" + head "https://github.com/GoogleCloudPlatform/cloud-sql-proxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "85c59b49db506c90b7e0fd7021e2fc23fab86f059c5495c8d4ddeba3445a216c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d226886f846c2820a04a0847ffaff462bb0a69b36003441c0345662e85ab2965" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97de612d87d437ef257efa9f3e6a4ac1303e483312e577742be73cc94c6e18e5" + sha256 cellar: :any_skip_relocation, sonoma: "fc89b81086c31a78ac326ab5c9b652e647db6e473b302cba779ed19d7c3db7f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "262f4f71466a8f0a9d48d001213b61a224127019b67f82c48b3c8fcc7b2021b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1b5459568292af592670a9c9dd7bdbda210c844ddc94416541f58e49dc95e68" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "cloud-sql-proxy version #{version}", shell_output("#{bin}/cloud-sql-proxy --version") + assert_match "could not find default credentials", shell_output("#{bin}/cloud-sql-proxy test 2>&1", 1) + end +end diff --git a/Formula/c/cloudflare-cli4.rb b/Formula/c/cloudflare-cli4.rb new file mode 100644 index 0000000000000..b9f74d5a9d578 --- /dev/null +++ b/Formula/c/cloudflare-cli4.rb @@ -0,0 +1,81 @@ +class CloudflareCli4 < Formula + include Language::Python::Virtualenv + + desc "CLI for Cloudflare API v4" + homepage "https://github.com/cloudflare/python-cloudflare-cli4" + url "https://files.pythonhosted.org/packages/77/fd/87b3e026dcee2a6b891f2b6c98b8f0bc98a175c4b731c046b528298c07c5/cloudflare_cli4-2.19.4.post3.tar.gz" + sha256 "36efe09d188678e8c99e654b79162758594107342d11f88192423aa47fd6c0b8" + license "MIT" + head "https://github.com/cloudflare/python-cloudflare-cli4.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "45d4269a239052f396465cd77b821cd0421fa83a2e6f6718a6bfc161aa4db747" + sha256 cellar: :any, arm64_sequoia: "55109780bff2167333275b2fd30d67d39e3c465c87f5d91253450658442bd9e9" + sha256 cellar: :any, arm64_sonoma: "a2ed9d9d284e3f72270c6fc46d5834eaffcb202230c07ba2d1868a71c14b7298" + sha256 cellar: :any, sonoma: "40d77cc9a76671db05e512e56828dafc71086815ce4b3ee276c3c198d1ee41b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "5cd742e1eac5cec8d1e707828b3f75512b380c734d673796a2482cea05524d83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4eca2e272adf73d7d87976a8cd33e132623b6adfdc18b977d7af0128f725f085" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz" + sha256 "47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jsonlines" do + url "https://files.pythonhosted.org/packages/35/87/bcda8e46c88d0e34cad2f09ee2d0c7f5957bccdb9791b0b934ec84d84be4/jsonlines-4.0.0.tar.gz" + sha256 "0c6d2c09117550c089995247f605ae4cf77dd1533041d366351f6f298822ea74" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/".cloudflare/cloudflare.cfg").write <<~EOS + [CloudFlare] + email = BrewTestBot@example.com + token = 00000000000000000000000000000000 + [Work] + token = 00000000000000000000000000000000 + EOS + + output = shell_output("#{bin}/cli4 --profile Work /zones 2>&1", 1) + assert_match "cli4: /zones - 6111 Invalid format for Authorization header", output + assert_match version.major_minor_patch.to_s, shell_output("#{bin}/cli4 --version 2>&1", 1) + end +end diff --git a/Formula/c/cloudflare-quiche.rb b/Formula/c/cloudflare-quiche.rb new file mode 100644 index 0000000000000..1091d3193dd7d --- /dev/null +++ b/Formula/c/cloudflare-quiche.rb @@ -0,0 +1,67 @@ +class CloudflareQuiche < Formula + desc "Savoury implementation of the QUIC transport protocol and HTTP/3" + homepage "https://docs.quic.tech/quiche/" + url "https://github.com/cloudflare/quiche.git", + tag: "0.24.6", + revision: "020a43a0a5eed76f57dd3ce5012149aa576c594d" + license "BSD-2-Clause" + head "https://github.com/cloudflare/quiche.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "94cf2f6d446be6967e0ff5c897119207150b727f19393c6274be619010818ec6" + sha256 cellar: :any, arm64_sequoia: "9fdfdfd55a6503b9aca9a34c7e35077df3041cafb794804f35346ff340821d57" + sha256 cellar: :any, arm64_sonoma: "ad2a4fbf4f65847baa4aeec6d238951104c14aba3a982c7b0eeb6f98df0ed157" + sha256 cellar: :any, arm64_ventura: "9f08f4d1db96fe372ed1d5a548fdedf54102442bffe182f33ebc4fd745fdc8fc" + sha256 cellar: :any, sonoma: "dae3a219d175e8bdc73500e2765719dc3a4feac6bb71e0402be87dba907ba1c3" + sha256 cellar: :any, ventura: "95150c13315bb303844632259de94ef54a66bc5ccf1bbf985bb2b1aca92236f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a72afc04e7c22ff6967b255960cf8fa23a3ce06c2b7d1be375088f3315002470" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d774a224f07c7e4ad2144a6df48c39502100c3396e569e8f91c295019d0d799a" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "apps") + + system "cargo", "build", "--jobs", ENV.make_jobs, "--lib", "--features", "ffi,pkg-config-meta", "--release" + lib.install "target/release/libquiche.a" + include.install "quiche/include/quiche.h" + + # install dylib with version and symlink + full_versioned_dylib = shared_library("libquiche", version.major_minor_patch.to_s) + lib.install "target/release/#{shared_library("libquiche")}" => full_versioned_dylib + lib.install_symlink full_versioned_dylib => shared_library("libquiche") + lib.install_symlink full_versioned_dylib => shared_library("libquiche", version.major.to_s) + lib.install_symlink full_versioned_dylib => shared_library("libquiche", version.major_minor.to_s) + + # install pkgconfig file + pc_path = "target/release/quiche.pc" + # the pc file points to the tmp dir, so we need inreplace + inreplace pc_path do |s| + s.gsub!(/includedir=.+/, "includedir=#{include}") + s.gsub!(/libdir=.+/, "libdir=#{lib}") + end + (lib/"pkgconfig").install pc_path + end + + test do + assert_match "it does support HTTP/3!", shell_output("#{bin}/quiche-client https://http3.is/") + (testpath/"test.c").write <<~C + #include + int main() { + quiche_config *config = quiche_config_new(0xbabababa); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lquiche", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cloudflare-wrangler.rb b/Formula/c/cloudflare-wrangler.rb new file mode 100644 index 0000000000000..b1fa363b2e705 --- /dev/null +++ b/Formula/c/cloudflare-wrangler.rb @@ -0,0 +1,28 @@ +class CloudflareWrangler < Formula + desc "CLI tool for Cloudflare Workers" + homepage "https://github.com/cloudflare/workers-sdk" + url "https://registry.npmjs.org/wrangler/-/wrangler-4.45.4.tgz" + sha256 "33313b57c8e3d0b35428fd124eee4ffb0af3fd1cbc6793b58cd4474093ae41d2" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "823d7d6158e511a8d367e7d06d1dbca08f6da6b944551305f472cc8674de54fd" + sha256 cellar: :any, arm64_sequoia: "49a119bfbaf17a29419cf5557315ccf889f84cf88768125415edc0acbb9f6a30" + sha256 cellar: :any, arm64_sonoma: "49a119bfbaf17a29419cf5557315ccf889f84cf88768125415edc0acbb9f6a30" + sha256 cellar: :any, sonoma: "d357c0d724fda33719bf7ebc52453120c2bed31f0e450967f986b1096d362b1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "399bafc635ee8aadbf0e8f2f0cbeab87d126f8c687b6e84c490d9695ce6a9641" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4604129ccebe8bf5cf734aa3b185f7c302631ec7d14fefc3e1d47e45c0fac75" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/wrangler*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/wrangler -v") + assert_match "Required Worker name missing", shell_output("#{bin}/wrangler secret list 2>&1", 1) + end +end diff --git a/Formula/c/cloudflared.rb b/Formula/c/cloudflared.rb new file mode 100644 index 0000000000000..de85a71a3a818 --- /dev/null +++ b/Formula/c/cloudflared.rb @@ -0,0 +1,58 @@ +class Cloudflared < Formula + desc "Cloudflare Tunnel client (formerly Argo Tunnel)" + homepage "https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/" + url "https://github.com/cloudflare/cloudflared/archive/refs/tags/2025.10.1.tar.gz" + sha256 "703424cd8e42090d52287502c4daa1f40d927a4eddd2e7dc3248da49ea2aa726" + license "Apache-2.0" + head "https://github.com/cloudflare/cloudflared.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e2d016cd4996abee1390848ba7cb3f6bb1401d663351c8b53dded60468d58fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14b33aee860607ee5c7fc835d0a9c512e6cacc9d995146e24bca0b27b76be9ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c6e5bc9a5bdb1ee0981ac4675f8abe30f9fce9a8ed6d115c408c88cfaaea952" + sha256 cellar: :any_skip_relocation, sonoma: "6f4fc60e953405fb6eb612b482ecfa6b23d0a2ea4fd2fcdd4bff7629d31cb642" + sha256 cellar: :any_skip_relocation, arm64_linux: "83141a476c3b75a2fece573f02ae5924db3541d7650ec48e836f395c4adf2b55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4aa1f02996d300b467d6abef7bd3ab590368fe5ba17af421e4f36ce9a4ae7d2c" + end + + depends_on "go" => :build + + def install + # We avoid using the `Makefile` to ensure usage of our own `go` toolchain. + # Set `gobuildid` to create an LC_UUID load command. + # This is needed to grant user permissions for local network access. + ldflags = %W[ + -B gobuildid + -X main.Version=#{version} + -X main.BuildTime=#{time.iso8601} + -X github.com/cloudflare/cloudflared/cmd/cloudflared/updater.BuiltForPackageManager=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/cloudflared" + inreplace "cloudflared_man_template" do |s| + s.gsub! "${DATE}", time.iso8601 + s.gsub! "${VERSION}", version.to_s + end + man1.install "cloudflared_man_template" => "cloudflared.1" + end + + service do + run [opt_bin/"cloudflared"] + keep_alive successful_exit: false + log_path var/"log/cloudflared.log" + error_log_path var/"log/cloudflared.log" + end + + test do + help_output = shell_output("#{bin}/cloudflared help") + assert_match "cloudflared - Cloudflare's command-line tool and agent", help_output + assert_match version.to_s, help_output + assert_equal "unable to find config file\n", shell_output("#{bin}/cloudflared 2>&1", 1) + assert_match "Error locating origin cert", shell_output("#{bin}/cloudflared tunnel run abcd 2>&1", 1) + assert_match "cloudflared was installed by #{tap.user}. Please update using the same method.", + shell_output("#{bin}/cloudflared update 2>&1") + + return unless OS.mac? + + refute_empty shell_output("dwarfdump --uuid #{bin}/cloudflared").chomp + end +end diff --git a/Formula/c/cloudformation-cli.rb b/Formula/c/cloudformation-cli.rb new file mode 100644 index 0000000000000..3a51f8dcb10b3 --- /dev/null +++ b/Formula/c/cloudformation-cli.rb @@ -0,0 +1,308 @@ +class CloudformationCli < Formula + include Language::Python::Virtualenv + + desc "CloudFormation Provider Development Toolkit" + homepage "https://github.com/aws-cloudformation/cloudformation-cli/" + url "https://files.pythonhosted.org/packages/12/ed/36f14b63957e99d9f2cbb5ac5671eed9fb93569e57add60534d47fc630e4/cloudformation-cli-0.2.39.tar.gz" + sha256 "63bd83ad0b40b6ad21983dfe05f0717aeaa36cb3f935ef6825f8ca73d7a8e5a7" + license "Apache-2.0" + revision 3 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "eef5752e9d87f41dbea07e1e67e84842b9568535439ff836cba69f03e329b921" + sha256 cellar: :any, arm64_sequoia: "037b9531d4c56c2496c94acc72b4dde6a9051d8d8da2cdaa2a30b9b24715395f" + sha256 cellar: :any, arm64_sonoma: "ebbb4138852d9a95a44ca992a04682df86b51e9cdc03217e1f5220e97c1cc495" + sha256 cellar: :any, sonoma: "3f2668e9b6078f8c79e3c3f3f93426ae90d08a788600ff66a86ada7168e7a5da" + sha256 cellar: :any_skip_relocation, arm64_linux: "027d18b580bc24c9360ef20a566d53a97b5ae198ce117d859ab3bbb2ac279475" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da57d95fc8d20d6b1c0e226a94e2b67fe671c8658d62ec1c8ff7760ae9f85d59" + end + + depends_on "go" => :test + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.13" # Pydantic v1 is incompatible with Python 3.14, issue ref: https://github.com/aws/serverless-application-model/issues/3831 + + pypi_packages exclude_packages: %w[certifi pydantic-core], + extra_packages: %w[cloudformation-cli-go-plugin cloudformation-cli-java-plugin + cloudformation-cli-python-plugin setuptools] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/e8/7f/db344c656949fa286ff8a14ff2c64355b6ca0cb6ebaf260678041acb8d9c/aws_sam_translator-1.101.0.tar.gz" + sha256 "234c1ca29d47f2cd276858371d4a646bc5cdb0de1e07724721d9358d6de005aa" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/08/d2/e508e5f42dc1c8a7412f5170751e626a18ed32c6e95c5df30bde6c5addf1/boto3-1.40.64.tar.gz" + sha256 "b92d6961c352f2bb8710c9892557d4b0e11258b70967d4e740e1c97375bcd779" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/c1/15/109cb31c156a64bfaf4c809d2638fd95d8ba39b6deb7f1d0526c05257fd7/botocore-1.40.64.tar.gz" + sha256 "a13af4009f6912eafe32108f6fa584fb26e24375149836c2bcaaaaec9a7a9e58" + end + + resource "cfn-flip" do + url "https://files.pythonhosted.org/packages/ca/75/8eba0bb52a6c58e347bc4c839b249d9f42380de93ed12a14eba4355387b4/cfn_flip-1.3.0.tar.gz" + sha256 "003e02a089c35e1230ffd0e1bcfbbc4b12cc7d2deb2fcc6c4228ac9819307362" + end + + resource "cfn-lint" do + url "https://files.pythonhosted.org/packages/68/d3/daf6b773ac204ac34e3a06b16dc6667ba4d1cd6cbd046b90ad28cc635936/cfn_lint-1.40.3.tar.gz" + sha256 "3f51f7fc66be9a31762d17f821839b32071a891e2d71ed6ab33dbc71a4dec938" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "cloudformation-cli-go-plugin" do + url "https://files.pythonhosted.org/packages/bd/e2/07731582bdbdeac245da88cfa3154530a26688d14fa4153f49271608c9ca/cloudformation-cli-go-plugin-2.2.0.tar.gz" + sha256 "d79ea4341d204cebd4fd290aef847efb84adf33719bf19444ec45208b8c12f14" + end + + resource "cloudformation-cli-java-plugin" do + url "https://files.pythonhosted.org/packages/16/f1/d2a2c9a2c3d6452bf57d6335db969203c0a9834e90877e6652caa2af5e89/cloudformation-cli-java-plugin-2.2.3.tar.gz" + sha256 "787288f69c7c85347ce543bc3bc88db5cdcb1295938b73980c2002412963222b" + end + + resource "cloudformation-cli-python-plugin" do + url "https://files.pythonhosted.org/packages/ae/f1/bd758290777dd9b87b2ffebd9b4271a95188aed0acb9f6bc44af940ccb31/cloudformation-cli-python-plugin-2.1.10.tar.gz" + sha256 "3883751baaa1c6f9778e946e2758f129b7276b9192e21f921fc815b0765961d6" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "hypothesis" do + url "https://files.pythonhosted.org/packages/12/77/1a89c2498e678d7ad4040f3012b5ec4ea2e44b9f3ec9a7b703f0af02e917/hypothesis-6.143.0.tar.gz" + sha256 "37dcd5cf9396deb832553dabe6c75003c0d3bcbbb77ac3db9321971dc914d2d0" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz" + sha256 "c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/36/3d/ca032d5ac064dff543aa13c984737795ac81abc9fb130cd2fcff17cfabc7/jsonschema-4.17.3.tar.gz" + sha256 "0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mpmath" do + url "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz" + sha256 "7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f" + end + + resource "nested-lookup" do + url "https://files.pythonhosted.org/packages/fd/42/7d6a06916aba63124eb30d2ff638cf76054f6aeea529d47f1859c3b5ccae/nested-lookup-0.2.25.tar.gz" + sha256 "6fa832748c90381f2291d850809e32492519ee5f253d6a5acbc29d937eca02e8" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "ordered-set" do + url "https://files.pythonhosted.org/packages/4c/ca/bfac8bc689799bcca4157e0e0ced07e70ce125193fc2e166d2e685b7e2fe/ordered-set-4.1.0.tar.gz" + sha256 "694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyrsistent" do + url "https://files.pythonhosted.org/packages/ce/3a/5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca/pyrsistent-0.20.0.tar.gz" + sha256 "4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "pytest-localserver" do + url "https://files.pythonhosted.org/packages/ec/33/e77476a3dee691845a052d6a3b75c715c803566fdf744b43080f92c1107a/pytest_localserver-0.9.0.post0.tar.gz" + sha256 "8033a36fb382d2bc4850f9acfe2c3fb5654cd5f0d163af6daf47f290db7d5ff0" + end + + resource "pytest-random-order" do + url "https://files.pythonhosted.org/packages/a8/ad/a2a32d91effe0f84a300b9ba6c9d000bd52f31b77f8e49d8fd8653a9ddc3/pytest_random_order-1.2.0.tar.gz" + sha256 "12b2d4ee977ec9922b5e3575afe13c22cbdb06e3d03e550abc43df137b90439a" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "sympy" do + url "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz" + sha256 "d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517" + end + + resource "types-dataclasses" do + url "https://files.pythonhosted.org/packages/4b/6a/dec8fbc818b1e716cb2d9424f1ea0f6f3b1443460eb6a70d00d9d8527360/types-dataclasses-0.6.6.tar.gz" + sha256 "4b5a2fcf8e568d5a1974cd69010e320e1af8251177ec968de7b9bb49aa49f7b9" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + cloudformation java, go, python plugins are installed, but the Go and Java are not bundled with the installation. + EOS + end + + test do + require "expect" + require "open3" + + Open3.popen2(bin/"cfn", "init") do |stdin, stdout, wait_thread| + stdout.expect "Do you want to develop a new resource(r) or a module(m) or a hook(h)?." + stdin.write "r\n" + stdout.expect "What's the name of your resource type?" + stdin.write "brew::formula::test\n" + stdout.expect "Select a language for code generation:" + stdin.write "1\n" + stdout.expect "Enter the GO Import path" + stdin.write "example\n" + stdout.expect "Initialized a new project in" + wait_thread.join + end + + rpdk_config = JSON.parse((testpath/".rpdk-config").read) + assert_equal "brew::formula::test", rpdk_config["typeName"] + assert_equal "go", rpdk_config["language"] + assert_path_exists testpath/"rpdk.log" + end +end diff --git a/Formula/c/cloudformation-guard.rb b/Formula/c/cloudformation-guard.rb new file mode 100644 index 0000000000000..baec00665f489 --- /dev/null +++ b/Formula/c/cloudformation-guard.rb @@ -0,0 +1,59 @@ +class CloudformationGuard < Formula + desc "Checks CloudFormation templates for compliance using a declarative syntax" + homepage "https://github.com/aws-cloudformation/cloudformation-guard" + url "https://github.com/aws-cloudformation/cloudformation-guard/archive/refs/tags/3.1.12.tar.gz" + sha256 "089a6268bb97c49edef45d99e5730d4c3cb0febb2a2f5ba38e2558568f685461" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0b4d01e76e66cb01e01240a44c4379aa90fca024975e54b2e5ea383c22ffc37b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c6b065811bdf93dbb06dca229b3567045a25420cecf828554efc9ee49eddb48" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8ab0907195c7ae28169278e5274755b2affe21fc43ec24fb15bc90fb722e7d3e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e3a03945d1830b0118ce9a305347d0287b06e0d664552f6cc16ffb9a289d609" + sha256 cellar: :any_skip_relocation, sonoma: "418c4452b9314131ffb0c60433b5f1451207a7875fefdbc8054421661425106b" + sha256 cellar: :any_skip_relocation, ventura: "8903293b6db67437a424372618aae457b596c26fb5e09c8499b32457287b349e" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c178ce6736fa7670859ff07a5483c92c0f2d5e492514f108ccb759f96cc30fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97922a5fb353ad0da865d66940eceae6268e5648f82411bb8377a4a56ea78a23" + end + + depends_on "rust" => :build + + # rust 1.89 build patch, upstream pr ref, https://github.com/aws-cloudformation/cloudformation-guard/pull/650 + patch do + url "https://github.com/aws-cloudformation/cloudformation-guard/commit/e1d2ff2a38345d80004f4b2ffc4da24086b9c520.patch?full_index=1" + sha256 "2074bd7c8890f8168993a9c425178ff38414347becc5d25bd6a1f0fdfccfb345" + end + + def install + system "cargo", "install", *std_cargo_args(path: "guard") + + generate_completions_from_executable(bin/"cfn-guard", "completions", "--shell") + + doc.install "docs" + doc.install "guard-examples" + end + + test do + (testpath/"test-template.yml").write <<~YAML + --- + AWSTemplateFormatVersion: '2010-09-09' + Resources: + # Helps tests map resource types + Volume: + Type: "AWS::EC2::Volume" + Properties: + Size : 99 + Encrypted: true, + AvailabilityZone : us-east-1b + YAML + + (testpath/"test-ruleset").write <<~EOS + rule migrated_rules { + let aws_ec2_volume = Resources.*[ Type == "AWS::EC2::Volume" ] + %aws_ec2_volume.Properties.Size == 99 + } + EOS + system bin/"cfn-guard", "validate", "-r", "test-ruleset", "-d", "test-template.yml" + end +end diff --git a/Formula/c/cloudfoundry-cli.rb b/Formula/c/cloudfoundry-cli.rb new file mode 100644 index 0000000000000..e2d812590fc32 --- /dev/null +++ b/Formula/c/cloudfoundry-cli.rb @@ -0,0 +1,45 @@ +class CloudfoundryCli < Formula + desc "Official command-line client for Cloud Foundry" + homepage "https://docs.cloudfoundry.org/cf-cli" + url "https://github.com/cloudfoundry/cli/archive/refs/tags/v8.14.1.tar.gz" + sha256 "231cdb5c10615447b122b605ff2280d734dc6d8dd82f559287415813448f70f2" + license "Apache-2.0" + head "https://github.com/cloudfoundry/cli.git", branch: "main" + + livecheck do + url :stable + regex(/^v?((?!9\.9\.9)\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7f997ee1cdfeb86af40b6d2ca6cefc7369334a23cfe7668b3aa1e2c2e1cdd4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "040d4b8bcc2b715e55c2c12259010504c5bf169a1502a3080e268ad0ca1a11bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "040d4b8bcc2b715e55c2c12259010504c5bf169a1502a3080e268ad0ca1a11bc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "040d4b8bcc2b715e55c2c12259010504c5bf169a1502a3080e268ad0ca1a11bc" + sha256 cellar: :any_skip_relocation, sonoma: "00ad7b993423c6e8505ca1f02b5c883c762557a072817afa5429bd4e66e7267a" + sha256 cellar: :any_skip_relocation, ventura: "00ad7b993423c6e8505ca1f02b5c883c762557a072817afa5429bd4e66e7267a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9349993cb64f02c076fa6fd17d9590d88b60db4a3cd732fc0974c188d7cc82f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c498a547bb200f0950495d1f7bf1466c5fce72c111ab78510e39462669274f9b" + end + + depends_on "go" => :build + + conflicts_with "cf", because: "both install `cf` binaries" + + def install + ldflags = %W[ + -s -w + -X code.cloudfoundry.org/cli/version.binaryVersion=#{version} + -X code.cloudfoundry.org/cli/version.binarySHA=#{tap.user} + -X code.cloudfoundry.org/cli/version.binaryBuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"cf") + end + + test do + assert_match version.to_s, shell_output("#{bin}/cf --version") + + expected = OS.linux? ? "Request error" : "lookup brew: no such host" + assert_match expected, shell_output("#{bin}/cf login -a brew 2>&1", 1) + end +end diff --git a/Formula/c/cloudfox.rb b/Formula/c/cloudfox.rb new file mode 100644 index 0000000000000..d658c8c561c34 --- /dev/null +++ b/Formula/c/cloudfox.rb @@ -0,0 +1,36 @@ +class Cloudfox < Formula + desc "Automating situational awareness for cloud penetration tests" + homepage "https://github.com/BishopFox/cloudfox" + url "https://github.com/BishopFox/cloudfox/archive/refs/tags/v1.15.0.tar.gz" + sha256 "7ed3113aea2b057223bb1d224548ce83f16ed0934691af5981ae6dfa6166795b" + license "MIT" + head "https://github.com/BishopFox/cloudfox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "201030be96bf3a072eba58a3ec197eb5a939fe672af1b5ee37a27156d1037778" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c459c773fb676c576e07f18b588508ff09bc36def968828c3cd056cb8bc7db1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4c459c773fb676c576e07f18b588508ff09bc36def968828c3cd056cb8bc7db1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c459c773fb676c576e07f18b588508ff09bc36def968828c3cd056cb8bc7db1" + sha256 cellar: :any_skip_relocation, sonoma: "2f0eccb09e0f8c082b4e721ac1d8b05716f9e9fb1c375c943bff2094d783d870" + sha256 cellar: :any_skip_relocation, ventura: "2f0eccb09e0f8c082b4e721ac1d8b05716f9e9fb1c375c943bff2094d783d870" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d1032c5ab9a1f795dccbc308d6e1caa6bdb984e611755ede2ad44dca0595b4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5964869f0ce17839b73d033bc3ea5909b135b9a8e2d1a5b13bcac7d61177d2c3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"cloudfox", "completion") + end + + test do + ENV["AWS_ACCESS_KEY_ID"] = "test" + ENV["AWS_SECRET_ACCESS_KEY"] = "test" + + output = shell_output("#{bin}/cloudfox aws principals 2>&1") + assert_match "Could not get caller's identity", output + + assert_match version.to_s, shell_output("#{bin}/cloudfox --version") + end +end diff --git a/Formula/c/cloudiscovery.rb b/Formula/c/cloudiscovery.rb new file mode 100644 index 0000000000000..e4d19099dd746 --- /dev/null +++ b/Formula/c/cloudiscovery.rb @@ -0,0 +1,165 @@ +class Cloudiscovery < Formula + include Language::Python::Virtualenv + + desc "Help you discover resources in the cloud environment" + homepage "https://github.com/Cloud-Architects/cloudiscovery" + url "https://files.pythonhosted.org/packages/d3/c2/9a5f93ac5376f83903c8550bde45e2888da3fb092b63e02e19d6c852134c/cloudiscovery-2.4.4.tar.gz" + sha256 "1170ea352a3c7d5643652ebe96b068482734cd995b9c92dc820206f1b87407e5" + license "Apache-2.0" + revision 4 + + bottle do + sha256 cellar: :any, arm64_tahoe: "c32030707c34eeebb3293e6c35c6120584a5ed79e488b74d00c54cc34e95a6e6" + sha256 cellar: :any, arm64_sequoia: "256b308ecc554b73243bb67c3c915c41803a6412945ee1673e8cfbb0458341ba" + sha256 cellar: :any, arm64_sonoma: "ce19aa2a03d018c44b919ecc49c54b3d315a768fb316b28fd8184e3f3af79df4" + sha256 cellar: :any, arm64_ventura: "d59e08945ea884a6d7afbb865d2dfa337d418d067650992dbd4baacbe580c09e" + sha256 cellar: :any, sonoma: "92c2c35b1e56b7ff6155b90ba40ba5c532fb1fbe5c93626864b2c9fc48761dd3" + sha256 cellar: :any, ventura: "c052b8e19b166db9e82edb7639de2172aa0957104ecac1f3ecc719ffa6a563e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "8593099c3de3b948acb078b4081af7be5fcba58c5cbb2f0ea8b808adf26972f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f6eb22585831e39b87ea1cf6370d5846ba9aa987633425c803ee14d12ec0349" + end + + deprecate! date: "2024-10-11", because: :unmaintained + disable! date: "2025-10-11", because: :unmaintained + + depends_on "libyaml" + depends_on "python@3.12" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/2f/3b/f421b30e32c33ce63f0de3b32ea12954039a4595c693db4ea4900babe742/boto3-1.38.41.tar.gz" + sha256 "c6710fc533c8e1f5d1f025c74ffe1222c3659094cd51c076ec50c201a54c8f22" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/98/46/cb33f5a0b00086a97c4eebbc4e0211fe85d66d45e53a9545b33805f25b31/botocore-1.38.41.tar.gz" + sha256 "98e3fed636ebb519320c4b2d078db6fa6099b052b4bb9b5c66632a5a7fe72507" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/8a/89/817ad5d0411f136c484d535952aef74af9b25e0d99e90cdffbe121e6d628/cachetools-6.1.0.tar.gz" + sha256 "b4c4f404392848db3ce7aac34950d17be4d864da4b8b66911008e430bc544587" + end + + resource "cfgv" do + url "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz" + sha256 "e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560" + end + + resource "diagrams" do + url "https://files.pythonhosted.org/packages/42/61/44cc86725be481d87c7f35de39cdc21e57ad38dca90d81a2dd14a166ecd2/diagrams-0.23.4.tar.gz" + sha256 "b7ada0b119b5189dd021b1dc1467fad3704737452bb18b1e06d05e4d1fa48ed7" + end + + resource "diskcache" do + url "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz" + sha256 "2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz" + sha256 "a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "graphviz" do + url "https://files.pythonhosted.org/packages/fa/83/5a40d19b8347f017e417710907f824915fba411a9befd092e52746b63e9f/graphviz-0.20.3.zip" + sha256 "09d6bc81e6a9fa392e7ba52135a9d49f1ed62526f96499325930e87ca1b5925d" + end + + resource "identify" do + url "https://files.pythonhosted.org/packages/a2/88/d193a27416618628a5eea64e3223acd800b40749a96ffb322a9b55a49ed1/identify-2.6.12.tar.gz" + sha256 "d8de45749f1efb108badef65ee8386f0f7bb19a7f26185f74de6367bffbaf0e6" + end + + resource "ipaddress" do + url "https://files.pythonhosted.org/packages/b9/9a/3e9da40ea28b8210dd6504d3fe9fe7e013b62bf45902b458d1cdc3c34ed9/ipaddress-1.0.23.tar.gz" + sha256 "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7/Jinja2-2.11.3.tar.gz" + sha256 "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/MarkupSafe-2.0.1.tar.gz" + sha256 "594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a" + end + + resource "nodeenv" do + url "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz" + sha256 "6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pre-commit" do + url "https://files.pythonhosted.org/packages/08/39/679ca9b26c7bb2999ff122d50faa301e49af82ca9c066ec061cfbc0c6784/pre_commit-4.2.0.tar.gz" + sha256 "601283b9757afd87d40c4c4a9b2b5de9637a8ea02eaff7adc2d0fb4e04841146" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/ed/5d/9dcc100abc6711e8247af5aa561fc07c4a046f72f659c3adea9a449e191a/s3transfer-0.13.0.tar.gz" + sha256 "f5e6db74eb7776a37208001113ea7aa97695368242b364d73e91c981ac522177" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz" + sha256 "e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af" + end + + # drop setuptools dep, upstream pr ref, https://github.com/Cloud-Architects/cloudiscovery/pull/192 + patch do + url "https://github.com/Cloud-Architects/cloudiscovery/commit/905c1dc15812000dc7ed2beb9d5193bd6bbe6131.patch?full_index=1" + sha256 "7a75658504faa46ad9c5424a836d7a1df25e56b64bec88d57ccddf7c06025d5d" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "{aws-vpc,aws-iot,aws-policy,aws-all,aws-limit,aws-security}", + shell_output("#{bin}/cloudiscovery --help 2>&1") + + assert_match "Neither region parameter nor region config were passed", + shell_output("#{bin}/cloudiscovery aws-vpc --vpc-id vpc-123 2>&1") + end +end diff --git a/Formula/c/cloudlist.rb b/Formula/c/cloudlist.rb new file mode 100644 index 0000000000000..0034e53060cdd --- /dev/null +++ b/Formula/c/cloudlist.rb @@ -0,0 +1,32 @@ +class Cloudlist < Formula + desc "Tool for listing assets from multiple cloud providers" + homepage "https://github.com/projectdiscovery/cloudlist" + url "https://github.com/projectdiscovery/cloudlist/archive/refs/tags/v1.2.2.tar.gz" + sha256 "53efb4bff46b533fab0bbb0003c3fddb5874e64cde8beda977856af3e8fdb064" + license "MIT" + head "https://github.com/projectdiscovery/cloudlist.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "05ee74dbd140cf4d1fe0390ee4e72107f3d0c2676396cc2960595bb1ab222a49" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3eeeff6d7b3312e6bd66a20976b56b8d6ce218432349e0b5c033bef25917bb9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b3a031f1ad78d063784809b8c086edfb9b92047ddae1c53ae6948debfc7e3e2a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a14d6684860a6ef496dc5b65862ef0f29060d49292d96fd5a447ade69f862f0" + sha256 cellar: :any_skip_relocation, sonoma: "432374a4bd4b58a1f7e8fc2b636236cc51629ed2dcd78489733844b5a4f3e632" + sha256 cellar: :any_skip_relocation, ventura: "bc9838edd6c20e8d284902868aa1e88d05199fed36c5726723d263fc21ef5eba" + sha256 cellar: :any_skip_relocation, arm64_linux: "bedbbb60c02445c4637a38c8758de70b2d9f5e3ac19f4f3c181e361536b4f8f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3114ba22694e7c5f3b4cd24c016b5556fb2a570c461efe3cad27f27c34a3f63" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cloudlist" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cloudlist -version 2>&1") + + output = shell_output bin/"cloudlist", 1 + assert_match output, "invalid provider configuration file provided" + end +end diff --git a/Formula/c/cloudpan189-go.rb b/Formula/c/cloudpan189-go.rb new file mode 100644 index 0000000000000..620dc60646a87 --- /dev/null +++ b/Formula/c/cloudpan189-go.rb @@ -0,0 +1,38 @@ +class Cloudpan189Go < Formula + desc "Command-line client tool for Cloud189 web disk" + homepage "https://github.com/tickstep/cloudpan189-go" + url "https://github.com/tickstep/cloudpan189-go/archive/refs/tags/v0.1.3.tar.gz" + sha256 "a215b75369af535aed214c94b66ebb3239b6ef5fcbc2f74039cf9c3eda4b04c1" + license "Apache-2.0" + head "https://github.com/tickstep/cloudpan189-go.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d292a2bd969d609f7f5f005b2f8e59a4a3807dfd6271d2e01d1b0d5807d1bae4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "793542588a08328d55060fc0faeb3808bde9656eee00e8df0b9ca98ad70ed9b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c66a3ce0426a356d4b5c05fe95fc6213ed4c867048157ebbc862ca9196af857e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6870cbe4123a3eae721cc676130d2146794d9a3631268d48c579430a923173f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b6870cbe4123a3eae721cc676130d2146794d9a3631268d48c579430a923173f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b6870cbe4123a3eae721cc676130d2146794d9a3631268d48c579430a923173f" + sha256 cellar: :any_skip_relocation, sonoma: "0259637185f73febd2da780378accfa232b124b8cb46aa376a64ce5adc319140" + sha256 cellar: :any_skip_relocation, ventura: "6ab13514be4a47d60c22436daad9bd2ca0612b61eff549630d8548cb24405424" + sha256 cellar: :any_skip_relocation, monterey: "6ab13514be4a47d60c22436daad9bd2ca0612b61eff549630d8548cb24405424" + sha256 cellar: :any_skip_relocation, big_sur: "6ab13514be4a47d60c22436daad9bd2ca0612b61eff549630d8548cb24405424" + sha256 cellar: :any_skip_relocation, arm64_linux: "42247f05683ad756a121dfabe4afd9074ad416ea13d681670e686dfb1b4cb68f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21c193bc56690eef410bdbbce6d6b774fcf658f16b114ea0222afee18591d361" + end + + depends_on "go" => :build + + def install + # TODO: remove `-checklinkname=0` workaround when fixed + # https://github.com/tickstep/cloudpan189-go/issues/101 + system "go", "build", *std_go_args(ldflags: "-s -w -checklinkname=0") + end + + test do + system bin/"cloudpan189-go", "run", "touch", "output.txt" + assert_path_exists testpath/"output.txt" + end +end diff --git a/Formula/c/cloudprober.rb b/Formula/c/cloudprober.rb new file mode 100644 index 0000000000000..2cb0eaec10284 --- /dev/null +++ b/Formula/c/cloudprober.rb @@ -0,0 +1,33 @@ +class Cloudprober < Formula + desc "Active monitoring software to detect failures before your customers do" + homepage "https://cloudprober.org" + url "https://github.com/cloudprober/cloudprober/archive/refs/tags/v0.14.1.tar.gz" + sha256 "273b4046f3d0c83879cd36af651e07ce3ea65c84edba215f76788adeaf35ad3a" + license "Apache-2.0" + head "https://github.com/cloudprober/cloudprober.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a5e186d2b53a8186f0dc6a15cb4b778b2f7b89016fa061d7aa7bccebf84afc1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b25397a6b90e68b277ab8b630d9f26fd817500c8fb581da6ee5e8780aad843d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1316599890cee7e1dac639c78d3d06eb0db7062bba46b07c01b1f0b203885361" + sha256 cellar: :any_skip_relocation, arm64_ventura: "35a877e14eac6e8f94d5970beefc091025951c74f19252c617e177b3d3f97018" + sha256 cellar: :any_skip_relocation, sonoma: "0350fc4bd2488211cc0df6e1dab417af67f93994d772ea9338ff3358bdfd884c" + sha256 cellar: :any_skip_relocation, ventura: "cf8f6c807ffe18af74f85c4563e1cf4c49b59cc772a8c95622f8be886269d0e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "35d464a5fedb85512d339040eb43710422b50d8d8d32cca686ea38d621d4ed62" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6441c40f98cf187f97e9b9ad75b00252173f5ab7cde05a6651b218e34c7944f9" + end + + depends_on "go" => :build + + def install + system "make", "cloudprober", "VERSION=v#{version}" + bin.install "cloudprober" + end + + test do + io = IO.popen("#{bin}/cloudprober --logtostderr", err: [:child, :out]) + io.any? do |line| + line.include?("Initialized status surfacer") + end + end +end diff --git a/Formula/c/cloudquery.rb b/Formula/c/cloudquery.rb new file mode 100644 index 0000000000000..9945ef3110e1d --- /dev/null +++ b/Formula/c/cloudquery.rb @@ -0,0 +1,46 @@ +class Cloudquery < Formula + desc "Data movement tool to sync data from any source to any destination" + homepage "https://www.cloudquery.io" + url "https://github.com/cloudquery/cloudquery/archive/refs/tags/cli-v6.30.1.tar.gz" + sha256 "87c1d9c3bf83e847dca87db9786351c98aee1f8364449992a40e56b931b925b7" + license "MPL-2.0" + head "https://github.com/cloudquery/cloudquery.git", branch: "main" + + livecheck do + url :stable + regex(/^cli-v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69fd6d49d38728dc813d30c6f9ceb7c98a717183e2c18a0469f246675c2751d2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "69fd6d49d38728dc813d30c6f9ceb7c98a717183e2c18a0469f246675c2751d2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69fd6d49d38728dc813d30c6f9ceb7c98a717183e2c18a0469f246675c2751d2" + sha256 cellar: :any_skip_relocation, sonoma: "b5e4f1c52d0ffa1c7cb28642802c5d68a8157c56a6be9bcc901ccf3915ced0c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8f4123c6ff28c6e6a64409469ff2db49951196807f82f224f04e7b3f66cf0ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "135ff7e9ef403ec0ddc807bc621c084505b4878d5c228d5d6946d91b20af9b74" + end + + depends_on "go" => :build + + def install + cd "cli" do + ldflags = "-s -w -X github.com/cloudquery/cloudquery/cli/v6/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + end + + test do + system bin/"cloudquery", "init", "--source", "aws", "--destination", "bigquery" + + assert_path_exists testpath/"cloudquery.log" + assert_match <<~YAML, (testpath/"aws_to_bigquery.yaml").read + kind: source + spec: + # Source spec section + name: aws + path: cloudquery/aws + YAML + + assert_match version.to_s, shell_output("#{bin}/cloudquery --version") + end +end diff --git a/Formula/c/cloudsplaining.rb b/Formula/c/cloudsplaining.rb new file mode 100644 index 0000000000000..b24f0b780f518 --- /dev/null +++ b/Formula/c/cloudsplaining.rb @@ -0,0 +1,155 @@ +class Cloudsplaining < Formula + include Language::Python::Virtualenv + + desc "AWS IAM Security Assessment tool" + homepage "https://cloudsplaining.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/d1/64/ba28b9b1854a40bcaae318da0e0fe147bd25999e496a8382a5a67c463db1/cloudsplaining-0.8.2.tar.gz" + sha256 "733085a7648e45714a24e629d05d3dfd592d2925b21fe001c19f55a6d6c1581a" + license "BSD-3-Clause" + head "https://github.com/salesforce/cloudsplaining.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b029c54550a9c69b7d18214faad6276c3a717c66e00aaa038288a86b4e6b3693" + sha256 cellar: :any, arm64_sequoia: "66f00293ed3edd39ad132ca5742c804ecd3a702ec77e716d962db936d117bdf3" + sha256 cellar: :any, arm64_sonoma: "fb0b9ee33848dc1be4541ef3bce0de0449a899ae227e80fc8ead297ec62e9204" + sha256 cellar: :any, sonoma: "4cdce525a9d48bf240fceb6c904654d8883e7a6165e9e377f1674105b9596430" + sha256 cellar: :any_skip_relocation, arm64_linux: "8aa4fe725c6e96f20396dd8f147cb5bb686e643bdc8cfcb6b2afbbc104cd82fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "153a121eb5c89605f357fda4fd5ded4a3454ee91cd6ae82d1ceb50aebc2a913c" + end + + depends_on "rust" => :build # for orjson + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/70/02/d3ee174681961dc2ebfe81f326e1b5e1ba338b7ff939e1e94eef76e7c65a/boto3-1.40.51.tar.gz" + sha256 "ed1b7750df07b2f2ece0141ff2ed0489db2ec2b5311a956d00a496b05fd4fadb" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ca/33/9e197d872adf1eadf8ecc259d0f451143326ff044d236b8971ff8bf980ee/botocore-1.40.51.tar.gz" + sha256 "a06de20408c3009e59e8f161a1146f1801d279d0923ab950349154900951bb20" + end + + resource "cached-property" do + url "https://files.pythonhosted.org/packages/76/4b/3d870836119dbe9a5e3c9a61af8cc1a8b69d75aea564572e385882d5aefb/cached_property-2.0.1.tar.gz" + sha256 "484d617105e3ee0e4f1f58725e72a8ef9e93deee462222dbd51cd91230897641" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-option-group" do + url "https://files.pythonhosted.org/packages/ef/ff/d291d66595b30b83d1cb9e314b2c9be7cfc7327d4a0d40a15da2416ea97b/click_option_group-0.5.9.tar.gz" + sha256 "f94ed2bc4cf69052e0f29592bd1e771a1789bd7bfc482dd0bc482134aff95823" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/be/4d/8df5f83256a809c22c4d6792ce8d43bb503be0fb7a8e4da9025754b09658/orjson-3.11.3.tar.gz" + sha256 "1c0603b1d2ffcd43a411d64797a19556ef76958aef1c182f22dc30860152a98a" + end + + resource "policy-sentry" do + url "https://files.pythonhosted.org/packages/2c/62/5ef0720302fff4a3b194c99ee7c6570a7b8086589588f2d5aab352deee35/policy_sentry-0.14.1.tar.gz" + sha256 "dda37098a5e8038c5d8a0e6b4e644736cd3cfec167b53007604dd92f8a20ea97" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/fb/2e/8da627b65577a8f130fe9dfa88ce94fcb24b1f8b59e0fc763ee61abef8b8/schema-0.7.8.tar.gz" + sha256 "e86cc08edd6fe6e2522648f4e47e3a31920a76e82cce8937535422e310862ab5" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cloudsplaining", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/cloudsplaining --version") + + output = shell_output("#{bin}/cloudsplaining download 2>&1", 1) + assert_match "botocore.exceptions.NoCredentialsError: Unable to locate credentials", output + end +end diff --git a/Formula/c/clozure-cl.rb b/Formula/c/clozure-cl.rb new file mode 100644 index 0000000000000..1292fcb6c67dc --- /dev/null +++ b/Formula/c/clozure-cl.rb @@ -0,0 +1,89 @@ +class ClozureCl < Formula + desc "Common Lisp implementation with a long history" + homepage "https://ccl.clozure.com" + url "https://github.com/Clozure/ccl/archive/refs/tags/v1.13.tar.gz" + sha256 "bca7f8d70d49059f8937b82bc64f47f7d01c07dd18760002ec41b41c444f838c" + license "Apache-2.0" + head "https://github.com/Clozure/ccl.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, sonoma: "dbf1d6fa306b45dd024bcb4affa6ecdae29269e2de18b6d97c9ed0a7bba5eeea" + sha256 cellar: :any_skip_relocation, ventura: "77beee69a1b3748ed9f627c31b5ee91bd6914ee614e6b49fc027e1ab76f3ce86" + sha256 cellar: :any_skip_relocation, monterey: "df21345c80cded7b9d732d1158a904bd0fe8118bd91da58fe99d3614c02f1e1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d0f7c8987f103a1002a96a696df47d99765c6604ab91630121a0e1209c6afbb" + end + + # https://github.com/Clozure/ccl/issues/11 + depends_on arch: :x86_64 + + on_macos do + # Can be undeprecated if upstream decides to support arm64 macOS + # https://docs.brew.sh/Support-Tiers#future-macos-support + # TODO: Make linux-only when removing macOS support + deprecate! date: "2025-09-25", because: :unsupported + disable! date: "2026-09-25", because: :unsupported + end + + on_linux do + depends_on "m4" + end + + resource "bootstrap" do + on_macos do + url "https://github.com/Clozure/ccl/releases/download/v1.13/darwinx86.tar.gz" + sha256 "0eceab57e519f82bd6db011c596eb2a28e2a510abcd76e217d49a10e90f4002f" + end + + on_linux do + url "https://github.com/Clozure/ccl/releases/download/v1.13/linuxx86.tar.gz" + sha256 "dd7dcb1631305cc7e32aef67caaa89662e05999dd30e72fbfa554a96f9473e13" + end + end + + def install + resource("bootstrap").stage do + if OS.mac? + buildpath.install "dx86cl64.image" + buildpath.install "darwin-x86-headers64" + else + buildpath.install "lx86cl64" + buildpath.install "lx86cl64.image" + buildpath.install "x86-headers64" + end + end + + ENV["CCL_DEFAULT_DIRECTORY"] = buildpath + + if OS.mac? + system "make", "-C", "lisp-kernel/darwinx8664" + system "./dx86cl64", "-n", "-l", "lib/x8664env.lisp", + "-e", "(ccl:xload-level-0)", + "-e", "(ccl:compile-ccl)", + "-e", "(quit)" + (buildpath/"image").write('(ccl:save-application "dx86cl64.image")\n(quit)\n') + system "cat image | ./dx86cl64 -n --image-name x86-boot64.image" + else + system "./lx86cl64", "-n", "-l", "lib/x8664env.lisp", + "-e", "(ccl:rebuild-ccl :full t)", + "-e", "(quit)" + (buildpath/"image").write('(ccl:save-application "lx86cl64.image")\n(quit)\n') + system "cat image | ./lx86cl64 -n --image-name x86-boot64" + end + + prefix.install "doc/README" + doc.install Dir["doc/*"] + libexec.install Dir["*"] + bin.install libexec/"scripts/ccl64" + bin.env_script_all_files(libexec/"bin", CCL_DEFAULT_DIRECTORY: libexec) + end + + test do + output = shell_output("#{bin}/ccl64 -n -e '(write-line (write-to-string (* 3 7)))' -e '(quit)'") + assert_equal "21", output.strip + end +end diff --git a/Formula/c/clp.rb b/Formula/c/clp.rb new file mode 100644 index 0000000000000..827fbbbb23795 --- /dev/null +++ b/Formula/c/clp.rb @@ -0,0 +1,71 @@ +class Clp < Formula + desc "Linear programming solver" + homepage "https://github.com/coin-or/Clp" + url "https://github.com/coin-or/Clp/archive/refs/tags/releases/1.17.10.tar.gz" + sha256 "0d79ece896cdaa4a3855c37f1c28e6c26285f74d45f635046ca0b6d68a509885" + license "EPL-2.0" + + livecheck do + url :stable + regex(%r{^(?:releases/)?v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f875557c40925c2c5b0776bf226aa6c8a9f49594d16d7535c50c7e1984176144" + sha256 cellar: :any, arm64_sequoia: "5ddbd8974678d1107ae7c8a2fe698263e0cf12e8c5e2b03d13ce58a11d80c62e" + sha256 cellar: :any, arm64_sonoma: "523d06de70cf0898e482d4e7145cb74cc40ff7bae931db5aeb252c2b047842d4" + sha256 cellar: :any, arm64_ventura: "3f3334798b217d9de284e6cce8072a63b8df974dc55f43f506a388bdfc98ee3d" + sha256 cellar: :any, arm64_monterey: "de2b76d01b18509c8db1af0b8bf777eb6ab5083feb3517f0be57b7e158495484" + sha256 cellar: :any, sonoma: "73f92e5e65141f07f3b878b8fa5a212f70dadc4b9d19f803cf45e3a00edddd0c" + sha256 cellar: :any, ventura: "d6f0d8287373e84ba11e9db75999a442879a6802f24520616c4bf6b204d63ffc" + sha256 cellar: :any, monterey: "a1bca012e38bffd8377562a7fcf4ec3739dc57cd08fd7918f16e0a56a202eeca" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d629ba3d4e212476ae6e6c4172ccc97bf88acac38f1982de82aa07560da98a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3de80fe042a6689294193c7efbb4d794ee37c3e1194dcdb311b740acb6ffba09" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "coinutils" + depends_on "openblas" + depends_on "osi" + + resource "coin-or-tools-data-sample-p0033-mps" do + url "https://raw.githubusercontent.com/coin-or-tools/Data-Sample/releases/1.2.12/p0033.mps" + sha256 "8ccff819023237c79ef32e238a5da9348725ce9a4425d48888baf3a0b3b42628" + end + + def install + # Work around https://github.com/coin-or/Clp/issues/109: + # Error 1: "mkdir: #{include}/clp/coin: File exists." + mkdir include/"clp/coin" + + args = [ + "--datadir=#{pkgshare}", + "--disable-silent-rules", + "--includedir=#{include}/clp", + "--with-blas-incdir=#{Formula["openblas"].opt_include}", + "--with-blas-lib=-L#{Formula["openblas"].opt_lib} -lopenblas", + "--with-lapack-incdir=#{Formula["openblas"].opt_include}", + "--with-lapack-lib=-L#{Formula["openblas"].opt_lib} -lopenblas", + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + resource("coin-or-tools-data-sample-p0033-mps").stage testpath + system bin/"clp", "-import", testpath/"p0033.mps", "-primals" + (testpath/"test.cpp").write <<~CPP + #include + int main() { + ClpSimplex model; + int status = model.readMps("#{testpath}/p0033.mps", true); + if (status != 0) { return status; } + status = model.primal(); + return status; + } + CPP + pkg_config_flags = shell_output("pkg-config --cflags --libs clp").chomp.split + system ENV.cxx, "test.cpp", *pkg_config_flags + system "./a.out" + end +end diff --git a/Formula/c/clpbar.rb b/Formula/c/clpbar.rb new file mode 100644 index 0000000000000..9232ce19e75ce --- /dev/null +++ b/Formula/c/clpbar.rb @@ -0,0 +1,39 @@ +class Clpbar < Formula + desc "Command-line progress bar" + homepage "https://clpbar.sourceforge.net/" + url "https://downloads.sourceforge.net/project/clpbar/clpbar/bar-1.11.1/bar_1.11.1.tar.gz" + sha256 "fa0f5ec5c8400316c2f4debdc6cdcb80e186e668c2e4471df4fec7bfcd626503" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "428cfe8bba0bbe5074e6ea1f27f05ead41dd9fd65007b4ae9a9490e1673911af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0b9fe17e86d7a2f3af256a5a55343351fb8d8affe328a5293290ba83fc4d5ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6475090688882a9c4e55d754641a2739da88bad7cc68b3b5825c0454e8bcf89a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d3ff5e627cdb58179f1ea37f38cfa62e3ffc2751984d4d0c53c787f34f40f9c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d56041768cea07ca805047e0d319a5ed863e6b2d61cbfa626c3744c2ba53e08f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3e3c00a0a305c5ce2cc71cfb00fea55f9993976d1f63a73e7ea64022d47550be" + sha256 cellar: :any_skip_relocation, sonoma: "a4d8adb0e57f2e29c8ed5f2cf86793d5e3e1d96f2ee4df1dddeece67ac939b28" + sha256 cellar: :any_skip_relocation, ventura: "536fa2e325dad3dfa4bb63876bc54c9ebea202dadd68d8a87c517842906df821" + sha256 cellar: :any_skip_relocation, monterey: "90f14242e4340c8c8a9ec84271d5e629c03314df3761fc6033430cd3d9ae33ec" + sha256 cellar: :any_skip_relocation, big_sur: "4ba23543dd87e39ec0baea12951bcc835b65b67b8ef56b024a39d282781f3b62" + sha256 cellar: :any_skip_relocation, catalina: "86aefc9d1110a945b62a9dbd9d1efe2a1c4ebaade84ad56d00084857439914a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8ddd40caccc3e89ff5a39180cf69afcbec356f9579d9c40c5798cddfbfd46c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34f612cc13329af2cb8bb90f7457a5222538acbd7304ad2ebf0a16650bec2dfc" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--program-prefix='clp'", *args, *std_configure_args + system "make", "install" + end + + test do + output = pipe_output("#{bin}/clpbar 2>&1", shell_output("dd if=/dev/zero bs=1024 count=5")) + assert_match "Copied: 5120B (5.0KB)", output + end +end diff --git a/Formula/c/clucene.rb b/Formula/c/clucene.rb new file mode 100644 index 0000000000000..7970f912a97e9 --- /dev/null +++ b/Formula/c/clucene.rb @@ -0,0 +1,46 @@ +class Clucene < Formula + desc "C++ port of Lucene: high-performance, full-featured text search engine" + homepage "https://clucene.sourceforge.net/" + url "https://downloads.sourceforge.net/project/clucene/clucene-core-unstable/2.3/clucene-core-2.3.3.4.tar.gz" + sha256 "ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab" + license any_of: ["Apache-2.0", "LGPL-2.1-only"] + head "https://git.code.sf.net/p/clucene/code.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "a72d28c7e47cae2af5817ed8f2765308aa0b4eac7eafb7fa46451cd8cb6eb039" + sha256 cellar: :any, arm64_sonoma: "3923df21bb6184b548889e7d9ed0204048007bbe4fc537d57711a25db4d22558" + sha256 cellar: :any, arm64_ventura: "ecbe0c9275432a532b57742e33a764144a27b26be4801db7d2c6b024f15eff75" + sha256 cellar: :any, arm64_monterey: "cbbe283763a33bd7c68aa833fef9209403f4de79cb991772dca74bb6e99b60dd" + sha256 cellar: :any, sonoma: "2ea84f1cd35e34945fa6334d250ce6cd89f111f37e3986e78bbbd058b586ee87" + sha256 cellar: :any, ventura: "e0ca763506918ccefd484e57ed1c3633ed58cf5948973fb69102b7a2a537bf4f" + sha256 cellar: :any, monterey: "80cc75e161baf8ec7e7c37c7a1b835e86e2190a8a9209ae449318096cada552a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a142b08aa18a0d5ddd94a39ba005c40fba111cd0bf0cef1cb4ace20ad3b4cea" + end + + disable! date: "2024-12-16", because: :unmaintained + + depends_on "cmake" => :build + uses_from_macos "zlib" + + # Portability fixes for 10.9+ + # Upstream ticket: https://sourceforge.net/p/clucene/bugs/219/ + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/clucene/patch-src-shared-CLucene-LuceneThreads.h.diff" + sha256 "42cb23fa6bd66ca8ea1d83a57a650f71e0ad3d827f5d74837b70f7f72b03b490" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/clucene/patch-src-shared-CLucene-config-repl_tchar.h.diff" + sha256 "b7dc735f431df409aac63dcfda9737726999eed4fdae494e9cbc1d3309e196ad" + end + + def install + # Work around build failure on ARM macOS + inreplace "src/shared/CMakeLists.txt", ";fstat64;", ";" if OS.mac? && Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end +end diff --git a/Formula/c/clusterawsadm.rb b/Formula/c/clusterawsadm.rb new file mode 100644 index 0000000000000..d4779db2c584a --- /dev/null +++ b/Formula/c/clusterawsadm.rb @@ -0,0 +1,39 @@ +class Clusterawsadm < Formula + desc "Home for bootstrapping, AMI, EKS, and other helpers in Cluster API Provider AWS" + homepage "https://cluster-api-aws.sigs.k8s.io/clusterawsadm/clusterawsadm.html" + url "https://github.com/kubernetes-sigs/cluster-api-provider-aws.git", + tag: "v2.9.2", + revision: "d3a7da16f7a772ac412d1a37b345af8c55ddcd9d" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/cluster-api-provider-aws.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "adaba1291b1c9e5e0ec72e380a906b43bc5d630d81ebbc373bc74a2f8ef8dbab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c9c6d3b573c851d0de7965795eab3363009c4b66a8ff3454a9d2e6048d18e3f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ba272bfd8d9c49bab7f15c7ad81be389a97581a98022478d5b372d67172ff84d" + sha256 cellar: :any_skip_relocation, sonoma: "afceea38832dc90112e6131b01cf0c0621d962bee11bcb0852d445556c3153f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5b8045c30f9a8b773f355657010b1e8c0af01dada71e2767b28405600662e9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "deb6230d326662e3d8cb0f05fae6a8be9f5bc5ae93c258b2a85e011cc8c890b4" + end + + depends_on "go" => :build + + def install + system "make", "clusterawsadm" + bin.install Dir["bin/*"] + + generate_completions_from_executable(bin/"clusterawsadm", "completion") + end + + test do + output = shell_output("KUBECONFIG=/homebrew.config #{bin}/clusterawsadm resource list --region=us-east-1 2>&1", 1) + assert_match "Error: required flag(s) \"cluster-name\" not set", output + + assert_match version.to_s, shell_output("#{bin}/clusterawsadm version") + end +end diff --git a/Formula/c/clusterctl.rb b/Formula/c/clusterctl.rb new file mode 100644 index 0000000000000..11a33d3ce0e5f --- /dev/null +++ b/Formula/c/clusterctl.rb @@ -0,0 +1,50 @@ +class Clusterctl < Formula + desc "Home for the Cluster Management API work, a subproject of sig-cluster-lifecycle" + homepage "https://cluster-api.sigs.k8s.io" + url "https://github.com/kubernetes-sigs/cluster-api/archive/refs/tags/v1.11.2.tar.gz" + sha256 "9b5d8f09553998ef168b05d831bbbcf20b40bc974309eb16d88363531734a589" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/cluster-api.git", branch: "main" + + # Upstream creates releases on GitHub for the two most recent major/minor + # versions (e.g., 0.3.x, 0.4.x), so the "latest" release can be incorrect. We + # don't check the Git tags for this project because a version may not be + # considered released until the GitHub release is created. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b268e38ea70df1766a80ed4c63508787b1af9bdd012616ac918a34bb18e87622" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5333d683d4e5579b4ae162fd1bda298fc95571234b80d02bd29e95fad28f742e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f31aac967863adcecf3eda175f8f04fd0a0a1bf92f9162453f477892a74c0ff7" + sha256 cellar: :any_skip_relocation, sonoma: "d675723187c43c90ad3dcf61ada2aaaf99c7b6440436cedf7eedaad614506110" + sha256 cellar: :any_skip_relocation, arm64_linux: "56504238bb26ed3f3cbffb58e893d2bf5b8624aa85e2b2317bcbc870361ce737" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ffdbd19f1718d8f724c131e60d3dbd498065e2d5af634051fbd30313a0474e8" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/cluster-api/version.gitMajor=#{version.major} + -X sigs.k8s.io/cluster-api/version.gitMinor=#{version.minor} + -X sigs.k8s.io/cluster-api/version.gitVersion=v#{version} + -X sigs.k8s.io/cluster-api/version.gitCommit=#{tap.user} + -X sigs.k8s.io/cluster-api/version.gitTreeState=clean + -X sigs.k8s.io/cluster-api/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/clusterctl" + + generate_completions_from_executable(bin/"clusterctl", "completion") + end + + test do + output = shell_output("KUBECONFIG=/homebrew.config #{bin}/clusterctl init --infrastructure docker 2>&1", 1) + assert_match "clusterctl requires either a valid kubeconfig or in cluster config to connect to " \ + "the management cluster", output + end +end diff --git a/Formula/c/clzip.rb b/Formula/c/clzip.rb new file mode 100644 index 0000000000000..522d11b3efedc --- /dev/null +++ b/Formula/c/clzip.rb @@ -0,0 +1,38 @@ +class Clzip < Formula + desc "C language version of lzip" + homepage "https://www.nongnu.org/lzip/clzip.html" + url "https://download.savannah.gnu.org/releases/lzip/clzip/clzip-1.15.tar.gz" + mirror "https://download-mirror.savannah.gnu.org/releases/lzip/clzip/clzip-1.15.tar.gz" + sha256 "287e8515268ff8d16244878e0e2e2d733c03d92dd2b2b84915d75ef4de6c261f" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/clzip/" + regex(/href=.*?clzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7bd7da69d8efd7a71e3ac572bcd83ce05f1f4ef26a19a171c30490f3ebc7d917" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5296e7aa0bef00a127b4838e95fc81a0a5aafa526979dcbf798d95ed06131075" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1162da004f92fdba81258c665f2dad66f1a892a4bc2603cd4f92f1c111df8c75" + sha256 cellar: :any_skip_relocation, arm64_ventura: "27ab76d3e0409fbbd117d0b4c5d71ee222c065c2b6b909e1d68b15d88ce69a5d" + sha256 cellar: :any_skip_relocation, sonoma: "6a87893c127e69f726be285c873af960f1ac01f252b91e64ab6d3c2fa8b01240" + sha256 cellar: :any_skip_relocation, ventura: "e953203c1637aca538d76ebf6ceb376df49300d304a08bb911ee73735e34d50e" + sha256 cellar: :any_skip_relocation, arm64_linux: "418e07ff6dd8397ddc3ccbea8cffc1a28b6d99f9905c4044b950c95695d208b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9efa76a36107aacb246f72c688c5154bf86b4898ea6e8e3a9c97dc7d93ac157a" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + pkgshare.install "testsuite" + end + + test do + cp_r pkgshare/"testsuite", testpath + cd "testsuite" do + ln_s bin/"clzip", "clzip" + system "./check.sh" + end + end +end diff --git a/Formula/c/cmake-docs.rb b/Formula/c/cmake-docs.rb new file mode 100644 index 0000000000000..af83bb215d21c --- /dev/null +++ b/Formula/c/cmake-docs.rb @@ -0,0 +1,38 @@ +class CmakeDocs < Formula + desc "Documentation for CMake" + homepage "https://www.cmake.org/" + url "https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/cmake-4.1.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/cmake-4.1.2.tar.gz" + sha256 "643f04182b7ba323ab31f526f785134fb79cba3188a852206ef0473fee282a15" + license "BSD-3-Clause" + head "https://gitlab.kitware.com/cmake/cmake.git", branch: "master" + + livecheck do + formula "cmake" + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "bee4f476ab70b8c52ab3a0ccdd50fd6d4b192657d33f23973a3e1a05c6b5ed84" + end + + depends_on "cmake" => :build + depends_on "sphinx-doc" => :build + + def install + args = %w[ + -DCMAKE_DOC_DIR=share/doc/cmake + -DCMAKE_MAN_DIR=share/man + -DSPHINX_MAN=ON + -DSPHINX_HTML=ON + ] + system "cmake", "-S", "Utilities/Sphinx", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_path_exists share/"doc/cmake/html" + assert_path_exists man + end +end diff --git a/Formula/c/cmake-language-server.rb b/Formula/c/cmake-language-server.rb new file mode 100644 index 0000000000000..d198a7ed2dc0f --- /dev/null +++ b/Formula/c/cmake-language-server.rb @@ -0,0 +1,65 @@ +class CmakeLanguageServer < Formula + include Language::Python::Virtualenv + + desc "Language Server for CMake" + homepage "https://github.com/regen100/cmake-language-server" + url "https://files.pythonhosted.org/packages/cf/ad/54c337fd2093a7c7c13528ac1393aeda009cdc16be954041834328845237/cmake_language_server-0.1.11.tar.gz" + sha256 "005f48367ec569457a7229a58f6762044fddacac647858b39d725ae2b3cd695b" + license "MIT" + head "https://github.com/regen100/cmake-language-server.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4067002616d19dd610a111948026e3ef733dbffb44c86238cf882fe3b2b26359" + end + + depends_on "python@3.14" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "cattrs" do + url "https://files.pythonhosted.org/packages/64/65/af6d57da2cb32c076319b7489ae0958f746949d407109e3ccf4d115f147c/cattrs-24.1.2.tar.gz" + sha256 "8028cfe1ff5382df59dd36474a86e02d817b06eaf8af84555441bac915d2ef85" + end + + resource "lsprotocol" do + url "https://files.pythonhosted.org/packages/9d/f6/6e80484ec078d0b50699ceb1833597b792a6c695f90c645fbaf54b947e6f/lsprotocol-2023.0.1.tar.gz" + sha256 "cc5c15130d2403c18b734304339e51242d3018a05c4f7d0f198ad6e0cd21861d" + end + + resource "pygls" do + url "https://files.pythonhosted.org/packages/86/b9/41d173dad9eaa9db9c785a85671fc3d68961f08d67706dc2e79011e10b5c/pygls-1.3.1.tar.gz" + sha256 "140edceefa0da0e9b3c533547c892a42a7d2fd9217ae848c330c53d266a55018" + end + + def install + # Unpin python for 3.14: https://github.com/regen100/cmake-language-server/pull/104 + inreplace "pyproject.toml", 'requires-python = ">=3.8.0,<3.14"', 'requires-python = ">=3.8.0"' + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/cmake-language-server --version") + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "processId": 88075, + "rootUri": null, + "capabilities": {}, + "trace": "verbose", + "workspaceFolders": null + } + } + JSON + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output(bin/"cmake-language-server", input) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/c/cmake-lint.rb b/Formula/c/cmake-lint.rb new file mode 100644 index 0000000000000..2ce7b8b214c98 --- /dev/null +++ b/Formula/c/cmake-lint.rb @@ -0,0 +1,32 @@ +class CmakeLint < Formula + include Language::Python::Virtualenv + + desc "Static code checker for CMake files" + homepage "https://github.com/cmake-lint/cmake-lint" + url "https://files.pythonhosted.org/packages/9f/46/9b6c39837be138179347611ec8cb79bf00ff3b54966ee8b63e031a05cf76/cmakelint-1.4.3.tar.gz" + sha256 "98a1e485318b41eeaf4dee3469ca3039d4745985353ecea208d6dd2c1204c71d" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "37812acbfd761cf26c9e8f96c3a71a89d458b3e8973f3a9d5b97eb9757236871" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.cmake").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(TestProject) + CMAKE + + output = shell_output("#{bin}/cmakelint test.cmake 2>&1") + assert_match "Total Errors: 0", output + + assert_match version.to_s, shell_output("#{bin}/cmakelint --version 2>&1") + end +end diff --git a/Formula/c/cmake.rb b/Formula/c/cmake.rb new file mode 100644 index 0000000000000..be9d41fe7296c --- /dev/null +++ b/Formula/c/cmake.rb @@ -0,0 +1,87 @@ +class Cmake < Formula + desc "Cross-platform make" + homepage "https://www.cmake.org/" + url "https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/cmake-4.1.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/cmake-4.1.2.tar.gz" + sha256 "643f04182b7ba323ab31f526f785134fb79cba3188a852206ef0473fee282a15" + license "BSD-3-Clause" + head "https://gitlab.kitware.com/cmake/cmake.git", branch: "master" + + # The "latest" release on GitHub has been an unstable version before, and + # there have been delays between the creation of a tag and the corresponding + # release, so we check the website's downloads page instead. + livecheck do + url "https://cmake.org/download/" + regex(/href=.*?cmake[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9a87dd3bdc0751b398eb60ca9bbbdb35a494478423af6b5a1ecc3594df48f6a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f6862c61ce225fa3e425ec99d811c70d259b09e5a9fa922f13e9b0aaea9a220" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "92c8a2a4e305acf797ed64ece87d2bbfe4310acc02422230db10bca7d5a73998" + sha256 cellar: :any_skip_relocation, tahoe: "f31908c094e7684d31648b9628181285370bc1532b49a5f8d94e228b82cda8a0" + sha256 cellar: :any_skip_relocation, sequoia: "c477caf087157cdc8f27ffd83bbd26b049bd3d6985d4ea04cefe263b293e1ff0" + sha256 cellar: :any_skip_relocation, sonoma: "8a2400076fd63421f9881b62a333f65ec617aeb3a5a267f237d818142adfc483" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d48b1640ee9d76e6d832d547a41b484abaf60490b9ace68b40b40f3f74f3b2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b65a9e9ca9b0d077cdc02f088936435614deab98c73a1ed974b0875067fdb5b8" + end + + uses_from_macos "ncurses" + + on_linux do + depends_on "openssl@3" + end + + conflicts_with cask: "cmake-app" + + # The completions were removed because of problems with system bash + + # The `with-qt` GUI option was removed due to circular dependencies if + # CMake is built with Qt support and Qt is built with MySQL support as MySQL uses CMake. + # For the GUI application please instead use `brew install --cask cmake`. + + def install + args = %W[ + --prefix=#{prefix} + --no-system-libs + --parallel=#{ENV.make_jobs} + --datadir=/share/cmake + --docdir=/share/doc/cmake + --mandir=/share/man + ] + if OS.mac? + args += %w[ + --system-zlib + --system-bzip2 + --system-curl + ] + end + + system "./bootstrap", *args, "--", *std_cmake_args, + "-DCMake_INSTALL_BASH_COMP_DIR=#{bash_completion}", + "-DCMake_INSTALL_EMACS_DIR=#{elisp}", + "-DCMake_BUILD_LTO=ON" + system "make" + system "make", "install" + end + + def caveats + <<~EOS + To install the CMake documentation, run: + brew install cmake-docs + EOS + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{version.major_minor}) + find_package(Ruby) + CMAKE + system bin/"cmake", "." + + # These should be supplied in a separate cmake-docs formula. + refute_path_exists doc/"html" + refute_path_exists man + end +end diff --git a/Formula/c/cmark-gfm.rb b/Formula/c/cmark-gfm.rb new file mode 100644 index 0000000000000..a85bd90464eef --- /dev/null +++ b/Formula/c/cmark-gfm.rb @@ -0,0 +1,44 @@ +class CmarkGfm < Formula + desc "C implementation of GitHub Flavored Markdown" + homepage "https://github.com/github/cmark-gfm" + url "https://github.com/github/cmark-gfm/archive/refs/tags/0.29.0.gfm.13.tar.gz" + version "0.29.0.gfm.13" + sha256 "5abc61798ebd9de5660bc076443c07abad2b8d15dbc11094a3a79644b8ad243a" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "77d33326d768ca3fba2c4a8be10c3515997fc81c948f9df681d56eb92671fbcc" + sha256 cellar: :any, arm64_sequoia: "85d7af0fca04c40443c4ed376656271c88814f43c935ec59a1704382fd59f35e" + sha256 cellar: :any, arm64_sonoma: "02ea9335249ea4b4749ebdb3770deadd78e9e135431ad4552ff23941fe83edb9" + sha256 cellar: :any, arm64_ventura: "db367b57679f3f5ff972e89fb35c51fb30bbb343ce8e13b9202bf202ca8ae24b" + sha256 cellar: :any, arm64_monterey: "88f430ffc95c1e948082963bd58dc7b710033f69b7aa74b11d4f4fd7c567603a" + sha256 cellar: :any, arm64_big_sur: "1cc456ff30491754d4ee3a1197e3e409ca1f5563183b50bbde899e0864f8942e" + sha256 cellar: :any, sonoma: "eda0aadb3e858244f38c388210772ece97d5146ef6aa64c34586752422596b22" + sha256 cellar: :any, ventura: "e69573db28aff177eec22651c2ccb5b7be8863b8d4f1edd816ab67eb9da9c05b" + sha256 cellar: :any, monterey: "4cca4929db9ff31ee827b74d4683662af0a48e4577f95507216073ffff37a22b" + sha256 cellar: :any, big_sur: "f0ae4dd8836af5cb5e7de552916c9c8dc9fe2b839c79be70f504cf5777ec14e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "473b7bbb4354fa15345f5c648c9d6c3f2a619966f30014fd2ea1e12be75514ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cc57585e59c81673c7cb0c374c59f900778886de3329127706534eb8851a0b5" + end + + depends_on "cmake" => :build + uses_from_macos "python" => :build + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = pipe_output("#{bin}/cmark-gfm --extension autolink", "https://brew.sh") + assert_equal '

https://brew.sh

', output.chomp + end +end diff --git a/Formula/c/cmark.rb b/Formula/c/cmark.rb new file mode 100644 index 0000000000000..c4f59a8cf98be --- /dev/null +++ b/Formula/c/cmark.rb @@ -0,0 +1,33 @@ +class Cmark < Formula + desc "Strongly specified, highly compatible implementation of Markdown" + homepage "https://commonmark.org/" + url "https://github.com/commonmark/cmark/archive/refs/tags/0.31.1.tar.gz" + sha256 "3da93db5469c30588cfeb283d9d62edfc6ded9eb0edc10a4f5bbfb7d722ea802" + license "BSD-2-Clause" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "8af79b78d1aa446d6c5532ec3553358c627f8a0b7cdfc2ea8663748e860cbe72" + sha256 cellar: :any, arm64_sequoia: "93bab92b2ba9b451da62ad4a762d078cafc8d4e400c23a7322f2f9dd9fcc8ea3" + sha256 cellar: :any, arm64_sonoma: "06bf4e3da615bfa454360952b105d18bdc02ad6191220845bd3a6a776769da87" + sha256 cellar: :any, arm64_ventura: "4381cbbe681dbf83352e58b8b0fdfafed4610e8017f8fb62c1e1769d90916431" + sha256 cellar: :any, sonoma: "42a5bb96e297ac635bea30d77ee9a80f7b7c5ae4c810ba3a1c34aca53e87d4aa" + sha256 cellar: :any, ventura: "b00c642cf2f806489f91071dfcf1bc20fcf342154a8bf21a60563639694232c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e16d3511204042385b697dfd4df300f5dd6114dbe86316ca93b03d1260375d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59a6fd552de7099141ad135382c032bed8efa0714e91ec20490c1e05342ec5fa" + end + + depends_on "cmake" => :build + uses_from_macos "python" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = pipe_output(bin/"cmark", "*hello, world*") + assert_equal "

hello, world

", output.chomp + end +end diff --git a/Formula/c/cmatrix.rb b/Formula/c/cmatrix.rb new file mode 100644 index 0000000000000..65b42a7e8dc79 --- /dev/null +++ b/Formula/c/cmatrix.rb @@ -0,0 +1,41 @@ +class Cmatrix < Formula + desc "Console Matrix" + homepage "https://github.com/abishekvashok/cmatrix/" + url "https://github.com/abishekvashok/cmatrix/archive/refs/tags/v2.0.tar.gz" + sha256 "ad93ba39acd383696ab6a9ebbed1259ecf2d3cf9f49d6b97038c66f80749e99a" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3e9a355625f0fde46f71845797d28ee84f3613df8ede85373b754f13ca156170" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4dc801fdcf6bbf449a1b6a73a68c1ab8cfe990de6d9fbcf686c40998cd5c9f31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "094d50d50af7e5365fffbd5b1f1ac6b9879d4250cd39477f45c40b136c0a6404" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f50d6041ffb188ea575444bb3df18ba70d321c92e37ff40baab7ecc944dc297" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5c7aa22beeabe078fe1e0f9a3cac02a1b8b895750a9f311ee621891b276d7012" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7df6894acc7156eefd61ac4cdfd5332b3e4165436d29cdc102ea03f03fb183ad" + sha256 cellar: :any_skip_relocation, sonoma: "68d9ab783759a41f8c263c9b1d63e77056978571e738018a45ce1e3f7d9a48d7" + sha256 cellar: :any_skip_relocation, ventura: "1a281dff3f4e52cbc909ec3d56da455b5ac56bd918cd652ea9e3d2ee27fe6509" + sha256 cellar: :any_skip_relocation, monterey: "6e3f0b2e04f4f87f62b138124b750591e5012fb3f5ebea8558371a11d7630724" + sha256 cellar: :any_skip_relocation, big_sur: "745b7d4d2da66a0c4d159909cb16b0b6a29647a96ac6ae74fcf3b993fd730e6c" + sha256 cellar: :any_skip_relocation, catalina: "fcc9c366c560e89ee2b4f61d1bdece14379a2c598719fd2eef784564bf9ed677" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3001650675f0947543d0556e8b3338984368e8fb81eb6ffa4555523b34d2644" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15aea39b9be08c26c94c9e2f8c82e977aaa7bf0884fbc4543114a52321e6cbc2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "ncurses" + + def install + system "autoreconf", "-i" + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make" + system "make", "install" + end + + test do + system bin/"cmatrix", "-V" + end +end diff --git a/Formula/c/cmctl.rb b/Formula/c/cmctl.rb new file mode 100644 index 0000000000000..b07b0e25a6bb8 --- /dev/null +++ b/Formula/c/cmctl.rb @@ -0,0 +1,75 @@ +class Cmctl < Formula + desc "Command-line tool to manage cert-manager" + homepage "https://cert-manager.io" + url "https://github.com/cert-manager/cmctl/archive/refs/tags/v2.3.0.tar.gz" + sha256 "087b556ab87a9f9d976be4bf72ed5593f080426e7d3cc59ad73130e5bedd0ab5" + license "Apache-2.0" + head "https://github.com/cert-manager/cmctl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5f306641bb0149945609ccd1a619f0ca5b50e62972a12ab437ccd98ad30b3069" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "debfac1b07f3c1c7eeb262887f5210c5114f5465e7dbeb34ffc6c9c817e05a55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b828e8243bf67ab2d609c418e33a68a3536ff29ef2c6ccb57660b7095b1ff1b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "485d5fc7e498e8bf39e1a98362fb3cd6cd30eb4ba5706d0efbcd90d93a2823d3" + sha256 cellar: :any_skip_relocation, sonoma: "2b2c32bef8d8e14d354c229dcabfc4f7ee1d602dda5bc1963f254f421a5ab4f7" + sha256 cellar: :any_skip_relocation, ventura: "ecf8e20f865dcca9caebc3064684f900127de414a294d15318a7bc1285a8123e" + sha256 cellar: :any_skip_relocation, arm64_linux: "0010011f34104b4b842af43700519b3bf42400108e75923615d7da890ef098a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbefa5718ace5b54307ea7c5a94049235106980b3b1c16680ab008a6bb91882a" + end + + depends_on "go" => :build + + def install + project = "github.com/cert-manager/cmctl/v2" + ldflags = %W[ + -s -w + -X #{project}/pkg/build.name=cmctl + -X #{project}/pkg/build/commands.registerCompletion=true + -X github.com/cert-manager/cert-manager/pkg/util.AppVersion=v#{version} + -X github.com/cert-manager/cert-manager/pkg/util.AppGitCommit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"cmctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/cmctl version --client") + # The binary name ("cmctl") is templated into the help text at build time, so we verify that it is + assert_match "cmctl", shell_output("#{bin}/cmctl help") + # We can't make a Kubernetes cluster in test, so we check that when we use a remote command + # we find the error about connecting + assert_match "error: error finding the scope of the object", shell_output("#{bin}/cmctl check api 2>&1", 1) + # The convert command *can* be tested locally. + (testpath/"cert.yaml").write <<~YAML + apiVersion: cert-manager.io/v1beta1 + kind: Certificate + metadata: + name: test-certificate + spec: + secretName: test + issuerRef: + name: test-issuer + kind: Issuer + commonName: example.com + YAML + + expected_output = <<~YAML + apiVersion: cert-manager.io/v1 + kind: Certificate + metadata: + creationTimestamp: null + name: test-certificate + spec: + commonName: example.com + issuerRef: + kind: Issuer + name: test-issuer + secretName: test + status: {} + YAML + + assert_equal expected_output, shell_output("#{bin}/cmctl convert -f cert.yaml") + end +end diff --git a/Formula/c/cmdshelf.rb b/Formula/c/cmdshelf.rb new file mode 100644 index 0000000000000..84f1e9287cade --- /dev/null +++ b/Formula/c/cmdshelf.rb @@ -0,0 +1,35 @@ +class Cmdshelf < Formula + desc "Better scripting life with cmdshelf" + homepage "https://github.com/toshi0383/cmdshelf" + url "https://github.com/toshi0383/cmdshelf/archive/refs/tags/2.0.2.tar.gz" + sha256 "dea2ea567cfa67196664629ceda5bc775040b472c25e96944c19c74892d69539" + license any_of: ["Apache-2.0", "MIT"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1861366a11845c9df0ea980488fa0717b74897c9a4e15db3fe69b1b6060c5022" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9774fb5ac602f84fb7b56c0409d688e0d70d810a36336a4ecdfb3a61cf5e40c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c510678189b00d66e3fe93ceae94f0475d8904e9d5c47f5dfcf99ba7b766a07" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5e08b8759ea2720bb5409922772fd9432a3c9db493db0567b2f45139aa589b4" + sha256 cellar: :any_skip_relocation, sonoma: "4658ed5c59252828c4d8137ccc105228477dcb18512284899fce0ea2359791b6" + sha256 cellar: :any_skip_relocation, ventura: "10633921cd251385fd77106fb77d8fded40f0ffab37e9137d8d5004ea6867d1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "987be95a898af28fd47ade9f5279020f1bf1674ed3b279b7f32b21cda9b1ac6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f54c84920fa8bd1abe7126270c1f1046a5a8d4932baad7b14982a9dbb4ec2189" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + man.install Dir["docs/man/*"] + bash_completion.install "cmdshelf-completion.bash" => "cmdshelf" + end + + test do + system bin/"cmdshelf", "remote", "add", "test", "git@github.com:toshi0383/scripts.git" + list_output = shell_output("#{bin}/cmdshelf remote list").chomp + assert_equal "test:git@github.com:toshi0383/scripts.git", list_output + end +end diff --git a/Formula/c/cmigemo.rb b/Formula/c/cmigemo.rb new file mode 100644 index 0000000000000..61935faf924b0 --- /dev/null +++ b/Formula/c/cmigemo.rb @@ -0,0 +1,68 @@ +class Cmigemo < Formula + desc "Migemo is a tool that supports Japanese incremental search with Romaji" + homepage "https://www.kaoriya.net/software/cmigemo" + license "MIT" + head "https://github.com/koron/cmigemo.git", branch: "master" + + stable do + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cmigemo/cmigemo-default-src-20110227.zip" + sha256 "4aa759b2e055ef3c3fbeb9e92f7f0aacc1fd1f8602fdd2f122719793ee14414c" + + # Patch per discussion at: https://github.com/Homebrew/legacy-homebrew/pull/7005 + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b8bf233fe044c8a2bd5bc24fc9bf11eed7aeb0464f67bd7d7ad48f6d9e8edbbf" + sha256 cellar: :any, arm64_sequoia: "68bc0630d1414e71d16c8a0f39add12897a7f874119a8eeae19e44f28df8706c" + sha256 cellar: :any, arm64_sonoma: "f5e1a00386582c24b8b0659a907f9f92a52aa22a428d054969d180f43d2a340a" + sha256 cellar: :any, arm64_ventura: "4da77419c2e50f2a97340f7d6ad6a125895c46ed40900ba6c60ffb73256185c3" + sha256 cellar: :any, arm64_monterey: "772f9659f6828e8404a849a9f52accab024a59e012d7b1c671a47facf7afdead" + sha256 cellar: :any, arm64_big_sur: "231afa328130c08c9ae6429cedbd5221633dca46fa478477f5ff441ec6c1ff8a" + sha256 cellar: :any, sonoma: "98d5b0ab1db6fa4d3ce9aea1932b88cf9dd973e1130a0fe1a5803bfd69fa8012" + sha256 cellar: :any, ventura: "20da1760b82a2a4b9857dbddc20f48ea095f655df971cf06d3dcfa9abc2932d5" + sha256 cellar: :any, monterey: "19cbf239012e58e7d04dafdf6b10b52f46331f1db420343d7a51331f98b86395" + sha256 cellar: :any, big_sur: "a113cec93a42734d9751b9199f7aef92d77649d7921128f9f04d83260dd0effb" + sha256 cellar: :any, catalina: "81ea6aecbf5b3dec1ebc423d3503bd134d79f4fbfbb91b291e90c1b5a9fef1a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6b4c7d33ec77482edaa20121f9060c0661de32d941565e67da798e5adc37b8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3551bebcc00f059d5acf9e60c4e757596c4c8349cb2870a00fcfdb75aa079db1" + end + + depends_on "nkf" => :build + + def install + chmod 0755, "./configure" + system "./configure", "--prefix=#{prefix}" + os = if OS.mac? + "osx" + else + "gcc" + end + system "make", os + ENV.deparallelize # Install can fail on multi-core machines unless serialized + system "make", "#{os}-dict" + system "make", "-C", "dict", "utf-8" if build.stable? + system "make", "#{os}-install" + end + + def caveats + <<~EOS + See also https://github.com/emacs-jp/migemo to use cmigemo with Emacs. + You will have to save as migemo.el and put it in your load-path. + EOS + end +end + +__END__ +--- a/src/wordbuf.c 2011-08-15 02:57:05.000000000 +0900 ++++ b/src/wordbuf.c 2011-08-15 02:57:17.000000000 +0900 +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + #include "wordbuf.h" + + #define WORDLEN_DEF 64 diff --git a/Formula/c/cminpack.rb b/Formula/c/cminpack.rb new file mode 100644 index 0000000000000..4d696f1e92733 --- /dev/null +++ b/Formula/c/cminpack.rb @@ -0,0 +1,75 @@ +class Cminpack < Formula + desc "Solves nonlinear equations and nonlinear least squares problems" + homepage "http://devernay.free.fr/hacks/cminpack/cminpack.html" + url "https://github.com/devernay/cminpack/archive/refs/tags/v1.3.11.tar.gz" + sha256 "45675fac0a721a1c7600a91a9842fe1ab313069db163538f2923eaeddb0f46de" + license "Minpack" + head "https://github.com/devernay/cminpack.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bf36741d02460936e3bb3dd0819e61ac8a3c2645d177c8fc7bbe64cc10583b88" + sha256 cellar: :any, arm64_sequoia: "a3742c503095e979488e41caa028da813433223e16d138233a03b6a50566c8fe" + sha256 cellar: :any, arm64_sonoma: "6e56f9a0fa73e882dd63c5cbbb06f5fbe27db19fef627207cc5d253db3b4ccd0" + sha256 cellar: :any, arm64_ventura: "ba4c53b942a58d25cca56a66bc8b66383042b4fc675bacd71e07a88257035818" + sha256 cellar: :any, sonoma: "fb0d98cea9e085b73c79cd908d32e853f2eed59ec62bed48fa75ea2c5695fa7e" + sha256 cellar: :any, ventura: "86f126b5834472ae2a8db9c866c2e3233b9b29551d50a6df956015b0b8f16745" + sha256 cellar: :any_skip_relocation, arm64_linux: "84ceb2a64c3d2be1e1fdec4a80fb793d1ee1cca486edaca6d0070d8865f7e244" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90f55468bdd04566bbf3e98f914a13aab28e016a20f3f80c63804159611f9997" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + -DCMINPACK_LIB_INSTALL_DIR=lib + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + man3.install Dir["docs/*.3"] + doc.install Dir["docs/*"] + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + int m = 2; + int n = 2; + double x[2] = {-1.2, 1.0}; + double fvec[2] = {0}; + double fjac[4] = {0}; + double tol = 1e-8; + int info = -1; + int ipvt[2] = {0}; + int ldfjac = 2; + int lwa = m * n + 5 * n + m; + double wa[lwa]; + + for (int i = 0; i < lwa; i++) { + wa[i] = 0; + } + + info = lmder1(NULL, NULL, 0, n, x, fvec, fjac, ldfjac, tol, ipvt, wa, lwa); + + if (info >= 0) { + printf("Success: lmder1 returned %d\\n", info); + } else { + printf("Error: lmder1 returned %d\\n", info); + } + + return info; + } + C + + system ENV.cc, "test.c", "-I#{include}/cminpack-1", + "-L#{lib}", "-lcminpack", "-lm", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cmix.rb b/Formula/c/cmix.rb new file mode 100644 index 0000000000000..c8d753ca83cf9 --- /dev/null +++ b/Formula/c/cmix.rb @@ -0,0 +1,34 @@ +class Cmix < Formula + desc "Data compression program with high compression ratio" + homepage "https://www.byronknoll.com/cmix.html" + url "https://github.com/byronknoll/cmix/archive/refs/tags/v20.tar.gz" + sha256 "a95b0d7430d61b558731e7627f41e170cb7802d1a8a862f38628f8d921dc61b2" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "087b737dfd467bda8b0ce62227d8bf0946754ee55507130a0cd84ddbdf3b42c3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8eebb90a33656eaff7664633fa0422d594d6c5e3fd2c8270e9831516844b610a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e9ba39f214720c1b65d25eb08fd16b0a84cfc424143817bb8fcbb33a863cea3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe893125d8092e5bdabbb902ff589d2368a012c863cfe71def0d98652ad6fb8f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "301859a5c0ae275d3e4bd543662fa0e8ec55c80f386c95acc82aca75bf3adf1f" + sha256 cellar: :any_skip_relocation, sonoma: "161b8e7138face7fa88bb94541da7444183ea3b02c819e8a406120349cc3d12b" + sha256 cellar: :any_skip_relocation, ventura: "257458d58bd2f6e17013d22904190dde42b96f5c6e28dff73b5874832db82439" + sha256 cellar: :any_skip_relocation, monterey: "a9241607506b03b1e9c0a77a09be19a3ae069f8e98d2507de654410774839a13" + sha256 cellar: :any_skip_relocation, arm64_linux: "87e851c4cc26bcfe1fab20b165cd369351d5cfd27586dec415e373bf1c1d1674" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0092c27accca6642f12d8c0d79423e5722dd17cbd20a93c194f231999d0e8655" + end + + def install + system "make" + bin.install "cmix" + end + + test do + (testpath/"foo").write "test" + system bin/"cmix", "-c", "foo", "foo.cmix" + system bin/"cmix", "-d", "foo.cmix", "foo.unpacked" + assert_equal "test", shell_output("cat foo.unpacked") + end +end diff --git a/Formula/c/cmocka.rb b/Formula/c/cmocka.rb new file mode 100644 index 0000000000000..9677fd3ad883f --- /dev/null +++ b/Formula/c/cmocka.rb @@ -0,0 +1,57 @@ +class Cmocka < Formula + desc "Unit testing framework for C" + homepage "https://cmocka.org/" + url "https://cmocka.org/files/1.1/cmocka-1.1.8.tar.xz" + sha256 "58435b558766d7f4c729ba163bdf3aec38bed3bc766dab684e3526ed0aa7c780" + license "Apache-2.0" + head "https://git.cryptomilk.org/projects/cmocka.git", branch: "master" + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "fd067cb88fba94b330304b9f20529a3188486cfd9404e670562f8193c9016ab7" + sha256 cellar: :any, arm64_sequoia: "9c21cefd986895363495212fe84bb3d5709aebb98626758c2b740b823105034c" + sha256 cellar: :any, arm64_sonoma: "c43364a4f0f426476007f0afce352c2648465f3e728f6ecf6a9005afc743bf14" + sha256 cellar: :any, arm64_ventura: "4a6cc1b109d9339b23d43814ce6fe2ee9aa91d1e4870833a1912d9ce27d00760" + sha256 cellar: :any, sonoma: "cf789d33088219b798f05cef3b6a1409d71631a4a407e290b3c306adde8aad23" + sha256 cellar: :any, ventura: "75ebb525e7d69931007433bb05779454d23fe4a85bc848c6885a8200333fa3b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6256a27596e358ee8cd3a9be47564820e92f096853bede4ef3000c1381e435ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5315f47810674b24ac96c441e67ae317c34ca4656520de3292ed810d5d1a8d2" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DWITH_STATIC_LIB=ON + -DWITH_CMOCKERY_SUPPORT=ON + -DUNIT_TESTING=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + static void null_test_success(void **state) { + (void) state; /* unused */ + } + + int main(void) { + const struct CMUnitTest tests[] = { + cmocka_unit_test(null_test_success), + }; + return cmocka_run_group_tests(tests, NULL, NULL); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcmocka", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cmockery.rb b/Formula/c/cmockery.rb new file mode 100644 index 0000000000000..e40be0f40df93 --- /dev/null +++ b/Formula/c/cmockery.rb @@ -0,0 +1,56 @@ +class Cmockery < Formula + desc "Unit testing and mocking library for C" + homepage "https://github.com/google/cmockery" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cmockery/cmockery-0.1.2.tar.gz" + sha256 "b9e04bfbeb45ceee9b6107aa5db671c53683a992082ed2828295e83dc84a8486" + # Installed COPYING is BSD-3-Clause but source code uses Apache-2.0. + # TODO: Change license to Apache-2.0 on next version as COPYING was replaced by LICENSE.txt + license all_of: ["BSD-3-Clause", "Apache-2.0"] + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "8c4679ab8e8779a11746c1d18156b83b3446ff6d332b06e6548585b84fc51101" + sha256 cellar: :any, arm64_sonoma: "96b7a50e99334762c47dbc4bb42797533aca4aa0141ec6f424f507a292bd69a4" + sha256 cellar: :any, arm64_ventura: "0f6c19c77f86e9f39f372d29d58e853214b1b6b3fcf20f6373caac86703c2279" + sha256 cellar: :any, arm64_monterey: "9e210bb4657cf606373fa730ab8b6d7d730fd98d61b1d5d0b06f81221e33b3c9" + sha256 cellar: :any, sonoma: "4131cb44e21e3d538d40dfe05a22e74ecb606f6d62824033a16f8c16500425a7" + sha256 cellar: :any, ventura: "794e2b0c95e15b2afdfb0c4d2a2cd958a44010ca8af935106859f12d12d2c505" + sha256 cellar: :any, monterey: "cfab88dcbb19db85f57560657a7658e4eb6353ca0ca104ffa27b78c4bf877b95" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc649e007cdf15b3e39dd4c06b20e7910c4732b09e67a13c18c567fad0f9e444" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55dae4a89d4badbbe3628527d765ac03feb8a344607af7ddf7b7d6396cf78a29" + end + + # see thread, https://github.com/google/cmockery/issues/72 + deprecate! date: "2024-07-07", because: :unmaintained + disable! date: "2025-07-07", because: :unmaintained + + on_macos do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # This patch will be integrated upstream in 0.1.3, this is due to malloc.h being already in stdlib on OSX + # It is safe to remove it on the next version + # More info on https://code.google.com/p/cmockery/issues/detail?id=3 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/cmockery/0.1.2.patch" + sha256 "4e1ba6ac1ee11350b7608b1ecd777c6b491d952538bc1b92d4ed407669ec712d" + end + + def install + # workaround for Xcode 14.3 + ENV.append "CFLAGS", "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + # Fix -flat_namespace being used on Big Sur and later. + # Need to regenerate configure since existing patches don't apply. + system "autoreconf", "--force", "--install", "--verbose" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/c/cmockery2.rb b/Formula/c/cmockery2.rb new file mode 100644 index 0000000000000..95ebc4b3e51c4 --- /dev/null +++ b/Formula/c/cmockery2.rb @@ -0,0 +1,45 @@ +class Cmockery2 < Formula + desc "Reviving cmockery unit test framework from Google" + homepage "https://github.com/lpabon/cmockery2" + url "https://github.com/lpabon/cmockery2/archive/refs/tags/v1.3.9.tar.gz" + sha256 "c38054768712351102024afdff037143b4392e1e313bdabb9380cab554f9dbf2" + license "Apache-2.0" + head "https://github.com/lpabon/cmockery2.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "adb401dab84cc193ef9d46a7d61ad44f333405afcdedf16722d94e23d211bf4c" + sha256 cellar: :any, arm64_sonoma: "ae822535550629aa3551bb7260330ca338c95c2f3c6b86641362524716aaa320" + sha256 cellar: :any, arm64_ventura: "9eefe7b0693c469ebd0406452350e1af83f0b343de3d114f0cceadd976e1b549" + sha256 cellar: :any, arm64_monterey: "05efcc1ad197d369912094e402f2ba56c68df59c578c8583b274407e9d35a35d" + sha256 cellar: :any, arm64_big_sur: "68744e2b1c76021e1ab34568873fcac417629d253cd0213e0040c674aab4928e" + sha256 cellar: :any, sonoma: "5b98766f552222e7648b31e07c1174a14906743da633235a6ac285f9ad7d99b6" + sha256 cellar: :any, ventura: "02bafd61618754d288f9acad0b9aeadbaf30c38aa807e7cc1f1362737284c7c8" + sha256 cellar: :any, monterey: "2f28862d0c9e7a03b64b3222ebdccc3dbf2eae2914dfafcb8862156df0701c30" + sha256 cellar: :any, big_sur: "9c468c19fff8a8bfaaa8603629b116cf5ec3913e42d126d349c0c8087cd7ee7c" + sha256 cellar: :any, catalina: "dc794b321aa10ede37917259ba4491dc59271826f2921c5b652b1d67e744b961" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6ac6d81a0948d2367a87348f13d73d93551be94be3c90040222d0530decce9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3277107c3831686b1fbd803f8d5613f1c29800293c144b982b018f61b63b1870" + end + + # last commit was 7 years ago, cmockery is also deprecated + deprecate! date: "2024-07-07", because: :unmaintained + disable! date: "2025-07-07", because: :unmaintained + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + (share/"example").install "src/example/calculator.c" + end + + test do + system ENV.cc, share/"example/calculator.c", "-L#{lib}", "-lcmockery", "-o", "calculator" + system "./calculator" + end +end diff --git a/Formula/c/cmrc.rb b/Formula/c/cmrc.rb new file mode 100644 index 0000000000000..e4fe0873fc304 --- /dev/null +++ b/Formula/c/cmrc.rb @@ -0,0 +1,48 @@ +class Cmrc < Formula + desc "CMake Resource Compiler" + homepage "https://github.com/vector-of-bool/cmrc" + license "MIT" + head "https://github.com/vector-of-bool/cmrc.git", branch: "master" + + stable do + url "https://github.com/vector-of-bool/cmrc/archive/refs/tags/2.0.1.tar.gz" + sha256 "edad5faaa0bea1df124b5e8cb00bf0adbd2faeccecd3b5c146796cbcb8b5b71b" + + # cmake 4.0 build patch, upstream pr ref, https://github.com/vector-of-bool/cmrc/pull/48 + patch do + url "https://github.com/vector-of-bool/cmrc/commit/91c9522ee59654e2f4d9701947a4600a4436d076.patch?full_index=1" + sha256 "feea3f04cdf49295497f3c48dd3ad5938716e47a9b29aacc98dc6580493d74ff" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "bccb869a3fb9486fbd2594d68a8be7fb57819f27764bbf9b3888cdc54d746ce7" + end + + depends_on "cmake" => [:build, :test] + + def install + (share/"cmake").install "CMakeRC.cmake" + (share/"CMakeRC/cmake").install_symlink share/"cmake/CMakeRC.cmake" => "CMakeRCConfig.cmake" + end + + test do + cmakelists = testpath/"CMakeLists.txt" + cmakelists.write <<~CMAKE + cmake_minimum_required(VERSION 3.30) + include(CMakeRC) + CMAKE + system "cmake", "-S", ".", "-B", "build1", "-DCMAKE_MODULE_PATH=#{share}/cmake", *std_cmake_args + + cmakelists.unlink + cmakelists.write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + find_package(CMakeRC CONFIG REQUIRED) + CMAKE + + system "cmake", "-S", ".", "-B", "build2", *std_cmake_args + end +end diff --git a/Formula/c/cmt.rb b/Formula/c/cmt.rb new file mode 100644 index 0000000000000..d5dd2622ce9b1 --- /dev/null +++ b/Formula/c/cmt.rb @@ -0,0 +1,56 @@ +class Cmt < Formula + desc "Write consistent git commit messages based on a custom template" + homepage "https://github.com/smallhadroncollider/cmt" + url "https://github.com/smallhadroncollider/cmt/archive/refs/tags/0.7.1.tar.gz" + sha256 "364faaf5f44544f952b511be184a724e2011fba8f0f88fdfc05fef6985dd32f6" + license "BSD-3-Clause" + revision 1 + head "https://github.com/smallhadroncollider/cmt.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c4312c62896766f5c5de69f30689cec1baea9b91154ed2f980e0d20265c66ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d945a981f841441e0acf9c519e4efddb1d75c143bc3e17fd54b672a67852f197" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e470479ac38df0931dfbc279eb13d1534f8b9568c0ff07a26719721a8696c055" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bd8742e482d7e247250d6fb0ea34acaedf547eb5f5436fa56aff4f62531fb25b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2559564dc48042c6480d568cbb11da90489e7a1bcb6c8a86bfdc7845eb500a93" + sha256 cellar: :any_skip_relocation, sonoma: "87193557534f7e98aa1bf7c868e5dff198a8567518e975160f4a72a3efc29e4c" + sha256 cellar: :any_skip_relocation, ventura: "07eb661284422f132a1336c2219c399642dd92e02e26bbf7569424f317fdb235" + sha256 cellar: :any_skip_relocation, monterey: "58badcf7f79e80d809dd05183a8dc16f0b368b055cd6ef3eae495c251888908d" + sha256 cellar: :any_skip_relocation, big_sur: "22ba275206a22888107bf70ec7a9e53a74f1dc5daf66349a979dadfc174d99ff" + sha256 cellar: :any_skip_relocation, catalina: "350dea5c83e8b86cdba45f71fafcd0b8cf98c1a2e229a6d7ac51d8c7b679c38e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6a48e225aa97777da3fb586c4908417e8690d1b0346c7691122287b3848bddb" + end + + deprecate! date: "2024-04-05", because: :repo_archived + disable! date: "2025-04-08", because: :repo_archived + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "hpack" => :build + + def install + system "hpack" + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + (testpath/".cmt").write <<~EOS + {} + + Homebrew Test: ${*} + EOS + + expected = <<~EOS + *** Result *** + + Homebrew Test: Blah blah blah + + + run: cmt --prev to commit + EOS + + assert_match expected, shell_output("#{bin}/cmt --dry-run --no-color 'Blah blah blah'") + end +end diff --git a/Formula/c/cmu-pocketsphinx.rb b/Formula/c/cmu-pocketsphinx.rb new file mode 100644 index 0000000000000..31650494ef584 --- /dev/null +++ b/Formula/c/cmu-pocketsphinx.rb @@ -0,0 +1,34 @@ +class CmuPocketsphinx < Formula + desc "Lightweight speech recognition engine for mobile devices" + homepage "https://cmusphinx.github.io/" + url "https://github.com/cmusphinx/pocketsphinx/archive/refs/tags/v5.0.4.tar.gz" + sha256 "9acd63cfdc76bbc85b7b6c6610b7a9cf30c79d5b36a31de7dc2f969e962653d7" + license "BSD-2-Clause" + head "https://github.com/cmusphinx/pocketsphinx.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "c1a4f7025051837a5d8fa4386b9a2b30f64c965eaab47ab2a88bb4d480837fbc" + sha256 arm64_sequoia: "7b31ea299662e699efe85ccea3092117e8e2ed25233771078c469e7f4c82521d" + sha256 arm64_sonoma: "13fcebdc39149f153302f6c2859a8b96bdc49dd2e0c10dada760ee946bb2d07e" + sha256 arm64_ventura: "152c0f76cb442ab833dcdcbd9f17398fc47b5dbbd650694c89be3b92acf53c9c" + sha256 sonoma: "2baa0d2ffe3d6d3608a51c20831cb299d4c85cf19cb048a5f04148e2abf9f163" + sha256 ventura: "9a9bfbfacda1094ff4bc6b6d213111e1ce9bcaec0ef0e8c5d17439988a30fa68" + sha256 arm64_linux: "9780ac9cbd3ab1a9defa7729ed9c647e9fd6f9a72195225a786615c6ecbf6692" + sha256 x86_64_linux: "5b035c6fbe339151707b82694ad2f9d793c2b6bb2f62bad2990d088bcbf2422b" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "install" + end +end diff --git a/Formula/c/cmuclmtk.rb b/Formula/c/cmuclmtk.rb new file mode 100644 index 0000000000000..80279457f4a11 --- /dev/null +++ b/Formula/c/cmuclmtk.rb @@ -0,0 +1,121 @@ +class Cmuclmtk < Formula + desc "Language model tools (from CMU Sphinx)" + homepage "https://cmusphinx.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cmusphinx/cmuclmtk/0.7/cmuclmtk-0.7.tar.gz" + sha256 "d23e47f00224667c059d69ac942f15dc3d4c3dd40e827318a6213699b7fa2915" + license "BSD-2-Clause" + + # We check the "cmuclmtk" directory page since versions aren't present in the + # RSS feed as of writing. + livecheck do + url "https://sourceforge.net/projects/cmusphinx/files/cmuclmtk/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/?["' >]}i) + strategy :page_match + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e382dbebb03c49d129bb2eacd23102d828d9814296bb751f275e2bd5cd4ac8e4" + sha256 cellar: :any, arm64_sequoia: "17749777bf2cedd02ab511ce2bab36a69389ea9c1f0b03c8a92927e3e54a5fae" + sha256 cellar: :any, arm64_sonoma: "1fe5f5fcb73a7580ae29500204bc6efb7073a5b9359dbadf0b045bc358de7697" + sha256 cellar: :any, arm64_ventura: "5c31b85c5a4c5696e53b70dca952b11cd009b4c2755dd8339d1fde8b61921047" + sha256 cellar: :any, arm64_monterey: "6f336006d80dbcfce530db381fb28d6207953c9ba792f71c31f041b983b85c53" + sha256 cellar: :any, arm64_big_sur: "d3069c3fbd0f41bdb0b3435b7b388f9e6051639421658663185bde9a449185b8" + sha256 cellar: :any, sonoma: "1585ae5f93e266d9189c985072808f6731b1ce52c75cc58d2caf4c27ec9edf4f" + sha256 cellar: :any, ventura: "a8e37d15ba21ee7acd391691ebf4f27b585ca9badde68492b828c1a218ef6799" + sha256 cellar: :any, monterey: "0d6891a3cb5d5be6b4071bcf68a9e3449d9a79c37b4c660f1044bbc93ecafcfa" + sha256 cellar: :any, big_sur: "e126c9d5de2e1f4e23d4fea7e8ac51c6fc2d4328a968c907879f4ea86524fbbc" + sha256 cellar: :any, catalina: "fb552e12a3c59e2ca6a9dd89e9ec229e5b815edef28093c3902fc4ee54b52207" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbf62c45fadfecaf2d9cd51668c6ea132d904afe1e456f099f067427667b1284" + sha256 cellar: :any_skip_relocation, x86_64_linux: "708324bb6cf751c76f927c6a648416ee38012499dddfc80c4b2c50cf36431c4d" + end + + depends_on "pkgconf" => :build + + conflicts_with "julius", because: "both install `binlm2arpa` binaries" + + # Fix errors: call to undeclared function '***'; + # ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + patch :DATA + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + output = pipe_output("#{bin}/text2wfreq", "Hello Hello Homebrew") + assert_match "Hello 2", output + assert_match "Homebrew 1", output + end +end + +__END__ +diff --git a/src/libs/rr_mkdtemp.c b/src/libs/rr_mkdtemp.c +index 50441ce..ee1f1c5 100755 +--- a/src/libs/rr_mkdtemp.c ++++ b/src/libs/rr_mkdtemp.c +@@ -36,6 +36,7 @@ + + #include + #include ++#include + + #include <../win32/compat.h> + +diff --git a/src/programs/text2idngram.c b/src/programs/text2idngram.c +index 1ec1cc2..b9ba37b 100644 +--- a/src/programs/text2idngram.c ++++ b/src/programs/text2idngram.c +@@ -53,6 +53,8 @@ + #include + #include + #include ++#include ++#include + + #include "../liblmest/toolkit.h" + #include "../libs/general.h" +diff --git a/src/programs/text2wngram.c b/src/programs/text2wngram.c +index 22ba67d..2790fde 100644 +--- a/src/programs/text2wngram.c ++++ b/src/programs/text2wngram.c +@@ -41,11 +41,14 @@ + #include + #include + #include ++#include ++#include + + #include "../liblmest/toolkit.h" + #include "../libs/pc_general.h" + #include "../libs/general.h" + #include "../win32/compat.h" ++#include "../libs/ac_lmfunc_impl.h" + + int cmp_strings(const void *string1,const void *string2) { + +diff --git a/src/programs/wngram2idngram.c b/src/programs/wngram2idngram.c +index 3f2ba57..e363282 100644 +--- a/src/programs/wngram2idngram.c ++++ b/src/programs/wngram2idngram.c +@@ -47,6 +47,8 @@ + #include + #include + #include ++#include ++#include + + #include "../liblmest/toolkit.h" + #include "../libs/general.h" diff --git a/Formula/c/cmus.rb b/Formula/c/cmus.rb new file mode 100644 index 0000000000000..2e170bca18283 --- /dev/null +++ b/Formula/c/cmus.rb @@ -0,0 +1,75 @@ +class Cmus < Formula + desc "Music player with an ncurses based interface" + homepage "https://cmus.github.io/" + url "https://github.com/cmus/cmus/archive/refs/tags/v2.12.0.tar.gz" + sha256 "44b96cd5f84b0d84c33097c48454232d5e6a19cd33b9b6503ba9c13b6686bfc7" + license "GPL-2.0-or-later" + revision 3 + head "https://github.com/cmus/cmus.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "ccb3ef033e545c2f1610612c73c28ee5b2d195829f8a061137ff6345ba7198ec" + sha256 arm64_sequoia: "e09385ddb5a370d854f4608b76c5a263541547ac91b7cc4a6517e1f3099a19a3" + sha256 arm64_sonoma: "a9d12ff2708a54953541bc5ae8ccb1ef3fd24aeb3365dbc8834337076faebd72" + sha256 arm64_ventura: "ae3c328349aeb668ccb369a9aa2a6147e6718aec702cffc145de37a0f3b82e0e" + sha256 sonoma: "f67433b09c4f9f4c52ac189f99277c1698d8869196bf992265784b18ab63c443" + sha256 ventura: "af29c51757aea6aaf9c7aab6758ec590e31f7f5e323a7c682f76496fb8e1599e" + sha256 arm64_linux: "6d9800c3e1c74383aa02badeb42de89294de79afacb0fdeb7e09770e40ef9b4b" + sha256 x86_64_linux: "6fa906d04b003647aec2093fa275eee0d2ca65d1601b6048b76dfa2016e0ba4e" + end + + depends_on "pkgconf" => :build + depends_on "faad2" + depends_on "ffmpeg@7" # FFmpeg 8 issue: https://github.com/cmus/cmus/issues/1446 + depends_on "flac" + depends_on "libao" # See https://github.com/cmus/cmus/issues/1130 + depends_on "libcue" + depends_on "libogg" + depends_on "libvorbis" + depends_on "mad" + depends_on "mp4v2" + depends_on "ncurses" + depends_on "opusfile" + + on_linux do + depends_on "alsa-lib" + depends_on "pulseaudio" + end + + def install + args = [ + "prefix=#{prefix}", + "mandir=#{man}", + "CONFIG_WAVPACK=n", + "CONFIG_MPC=n", + "CONFIG_AO=y", + ] + system "./configure", *args + system "make", "install" + end + + test do + plugins = shell_output("#{bin}/cmus --plugins") + expected_plugins = %w[ + aac + cue + ffmpeg + flac + mad + mp4 + opus + vorbis + wav + ao + ] + expected_plugins += if OS.mac? + %w[coreaudio] + else + %w[alsa pulse] + end + + expected_plugins.each do |plugin| + assert_match plugin, plugins, "#{plugin} plugin not found!" + end + end +end diff --git a/Formula/c/cmusfm.rb b/Formula/c/cmusfm.rb new file mode 100644 index 0000000000000..e992f0862c430 --- /dev/null +++ b/Formula/c/cmusfm.rb @@ -0,0 +1,95 @@ +class Cmusfm < Formula + desc "Last.fm standalone scrobbler for the cmus music player" + homepage "https://github.com/Arkq/cmusfm" + url "https://github.com/Arkq/cmusfm/archive/refs/tags/v0.5.0.tar.gz" + sha256 "17aae8fc805e79b367053ad170854edceee5f4c51a9880200d193db9862d8363" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "844a2f8e9ddbf09e79945a32979812f92c35e5db032bcf204bd50c1af307ee81" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9de4e6485544f8cbe0c2fb56acde11a3f0e689ee244f6ae40048739c36c12f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60311618694710c592998896b3bf6c6dce1019991e563dbc3e43d1989fe3b4f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "edb2e0a7092079e3ad015e27ea37ff940d6ef9a6fed73ff2355d6d7b23d04c0d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7580167d4bd0c71cdafc4dff2ede95d0081dab49e0f0b555fffa1e29eba03381" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "25de6ec5f582426deea7f1bae8f97e9adf9074f598d2a1a28c14c5d5ecc64602" + sha256 cellar: :any_skip_relocation, sonoma: "9c1f739ee0182295d4f332171a975ed2118961d2c44848aad416732c3ef193b6" + sha256 cellar: :any_skip_relocation, ventura: "f1346608b765ed2219f6b963d80b8b72a90b430a10894fe924d64d2d67c535a4" + sha256 cellar: :any_skip_relocation, monterey: "b2e90bb7f3dbb25e7149d8e6c47a54725095b5dca2ecbdd2ad91d0d383824a28" + sha256 cellar: :any_skip_relocation, big_sur: "6ef7f13482b03d75ce2eb9c4ce72123f997f68c246477445b9aeb1d4e0d49e61" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5e8154717f9cbf0a3824cc58471ba1e88308beaec32533e2d51fcb91032ccbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85080d3911b11f136d5baf6e3304d50c7bc8918aee103308068cd817162e993f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libfaketime" => :test + + uses_from_macos "curl" + + on_linux do + depends_on "openssl@3" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + mkdir "build" do + system "../configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + end + + test do + cmus_home = testpath/".config/cmus" + cmusfm_conf = cmus_home/"cmusfm.conf" + cmusfm_sock = cmus_home/"cmusfm.socket" + cmusfm_cache = cmus_home/"cmusfm.cache" + faketime_conf = testpath/".faketimerc" + + test_artist = "Test Artist" + test_title = "Test Title" + test_duration = 260 + status_args = %W[ + artist #{test_artist} + title #{test_title} + duration #{test_duration} + ] + + mkpath cmus_home + touch cmusfm_conf + + begin + server = fork do + faketime_conf.write "+0" + if OS.mac? + ENV["DYLD_INSERT_LIBRARIES"] = Formula["libfaketime"].lib/"faketime"/"libfaketime.1.dylib" + ENV["DYLD_FORCE_FLAT_NAMESPACE"] = "1" + else + ENV["LD_PRELOAD"] = Formula["libfaketime"].lib/"faketime"/"libfaketime.so.1" + end + ENV["FAKETIME_NO_CACHE"] = "1" + exec bin/"cmusfm", "server" + end + loop do + sleep 0.5 + assert_equal nil, Process.wait(server, Process::WNOHANG) + break if cmusfm_sock.exist? + end + + system bin/"cmusfm", "status", "playing", *status_args + sleep 5 + faketime_conf.atomic_write "+#{test_duration}" + system bin/"cmusfm", "status", "stopped", *status_args + ensure + Process.kill :TERM, server + Process.wait server + end + + assert_path_exists cmusfm_cache + strings = shell_output "strings #{cmusfm_cache}" + assert_match(/^#{test_artist}$/, strings) + assert_match(/^#{test_title}$/, strings) + end +end diff --git a/Formula/c/cnats.rb b/Formula/c/cnats.rb new file mode 100644 index 0000000000000..19f3fe42b7324 --- /dev/null +++ b/Formula/c/cnats.rb @@ -0,0 +1,41 @@ +class Cnats < Formula + desc "C client for the NATS messaging system" + homepage "https://github.com/nats-io/nats.c" + url "https://github.com/nats-io/nats.c/archive/refs/tags/v3.11.0.tar.gz" + sha256 "9ee45cd502a49dbd29bed491286a4926e5e53f14a8aacad413c0cf4a057abee0" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7cea1673189ed951c74e4220e22362fee2c6875f741312f6fab6ae90abfa9771" + sha256 cellar: :any, arm64_sequoia: "7866177a01aa325578321f2e60d64c485220dd462fdd266d07edcc4d2752f115" + sha256 cellar: :any, arm64_sonoma: "041326a64ef5f7c2c22dc50d30e445fd54bd5b6d3cb529dafc81317a28270bc7" + sha256 cellar: :any, sonoma: "025ea609d4ad1513a2ee6ab2130123fdeeb0e16006072c84b63735c8678f3e53" + sha256 cellar: :any_skip_relocation, arm64_linux: "c063627a562b5f5965a08c358ef8e21fe8dcdc5b049252165506eb98246ad47a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "092bae28e028eda4a513dfda93c4976b17e297ae036ee473a47732b37126cb3a" + end + + depends_on "cmake" => :build + depends_on "libevent" + depends_on "libuv" + depends_on "openssl@3" + depends_on "protobuf-c" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + printf("%s\\n", nats_GetVersion()); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lnats", "-o", "test" + assert_equal version, shell_output("./test").strip + end +end diff --git a/Formula/c/cntb.rb b/Formula/c/cntb.rb new file mode 100644 index 0000000000000..174a6070d8f86 --- /dev/null +++ b/Formula/c/cntb.rb @@ -0,0 +1,39 @@ +class Cntb < Formula + desc "Contabo Command-Line Interface (CLI)" + homepage "https://github.com/contabo/cntb" + url "https://github.com/contabo/cntb/archive/refs/tags/v1.5.5.tar.gz" + sha256 "4597e2c616287a1e4de66feddd73ac5feb7b9e89e756482c646c4d1e8c959c86" + license "GPL-3.0-only" + head "https://github.com/contabo/cntb.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ac6cd4334a1e67e96476b417a43f127487bfdeda97f793e7abd2cda8b205e5c9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef9426c451eb50163a08bb2f0275194db90e6a560582add3fd63f45b758c4429" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef9426c451eb50163a08bb2f0275194db90e6a560582add3fd63f45b758c4429" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef9426c451eb50163a08bb2f0275194db90e6a560582add3fd63f45b758c4429" + sha256 cellar: :any_skip_relocation, sonoma: "f47955a60a9a69949e5a441a87de1b0ecc29fbad2b5e32a3fba24a7751f08031" + sha256 cellar: :any_skip_relocation, ventura: "f47955a60a9a69949e5a441a87de1b0ecc29fbad2b5e32a3fba24a7751f08031" + sha256 cellar: :any_skip_relocation, arm64_linux: "53157a86cb8a7c98d7400dbf0c87c726d85659ae2f1d446285c7c654e7e89d32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a72c88c25cfe526dbcac849cb91034c978c6f207588098e78440410795469e5e" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X contabo.com/cli/cntb/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"cntb", "completion") + end + + test do + # version command should work + assert_match "cntb #{version}", shell_output("#{bin}/cntb version") + # authentication shouldn't work with invalid credentials + out = shell_output("#{bin}/cntb get instances --oauth2-user=invalid \ + --oauth2-password=invalid --oauth2-clientid=invalid \ + --oauth2-client-secret=invalid \ + --oauth2-tokenurl=https://example.com 2>&1", 1) + assert_match 'level=fatal msg="Could not get access token due to an error', out + end +end diff --git a/Formula/c/cntlm.rb b/Formula/c/cntlm.rb new file mode 100644 index 0000000000000..1002a3a81716b --- /dev/null +++ b/Formula/c/cntlm.rb @@ -0,0 +1,72 @@ +class Cntlm < Formula + desc "NTLM authentication proxy with tunneling" + homepage "https://cntlm.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cntlm/cntlm/cntlm%200.92.3/cntlm-0.92.3.tar.bz2" + sha256 "7b603d6200ab0b26034e9e200fab949cc0a8e5fdd4df2c80b8fc5b1c37e7b930" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/cntlm[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "730084818967f10d47a8458853ebb7a56bce4c2280759bda2f3c31d1edae9da3" + sha256 arm64_sequoia: "ac09c6fb2f75321560a0fedd69a9d520f9a62ee176cd7b8a03d8ea5964385f1a" + sha256 arm64_sonoma: "d0c3faca50823ec43395e72762071b26b1fe3860b7fa855f3f12080fb66025e3" + sha256 arm64_ventura: "f4674d812c8b17f3e78bea4dfd0bccf3149de7c0be14f9027d2f07724f3eaf32" + sha256 arm64_monterey: "ec776bb3b8bd91670fdf97e67fefc1ae8c2a4f2901cbb2b007622d22b8e697d7" + sha256 arm64_big_sur: "edfcd9088709ea81afc22ec95e7fc9e3c2707dfbcf25582955af0d6288dc4d11" + sha256 sonoma: "d0bdc1e0168ffef33d215c83d0af2e4164c9930c6b5a4ea5abe3b1504707c24e" + sha256 ventura: "3bb0d9bd593c362c6303a22d404efc85a9ffcc648110808b3271654574326284" + sha256 monterey: "473e65aea1b1536ccbd7390fa121cf0273f47c0184b08bf0398d28aa0e128e92" + sha256 big_sur: "fccbf3803f9aff9aa6b0bb9b8f0e17c28b80e1b85ef0d712082744bdd417eda9" + sha256 catalina: "7239fa52155edd2040ed7bff62b954351bb5e96fd226b4f0e1f7e956c64223d7" + sha256 arm64_linux: "7d3ee84edf54985c366adab8d382412f0bae76dbcd117fd740cc36b009fead4f" + sha256 x86_64_linux: "523184cb07c5b9c17d65a2a36f767ed37726570ec5ac3239ae49be84e12c5f6b" + end + + def install + system "./configure" + system "make", "CC=#{ENV.cc}", "SYSCONFDIR=#{etc}" + # install target fails - @adamv + bin.install "cntlm" + man1.install "doc/cntlm.1" + etc.install "doc/cntlm.conf" + end + + def caveats + "Edit #{etc}/cntlm.conf to configure Cntlm" + end + + service do + run [opt_bin/"cntlm", "-f"] + require_root true + end + + test do + assert_match "version #{version}", shell_output("#{bin}/cntlm -h 2>&1", 1) + + bind_port = free_port + (testpath/"cntlm.conf").write <<~EOS + # Cntlm Authentication Proxy Configuration + Username testuser + Domain corp-uk + Password password + Proxy localhost:#{free_port} + NoProxy localhost, 127.0.0.*, 10.*, 192.168.* + Listen #{bind_port} + EOS + + fork do + exec "#{bin}/cntlm -c #{testpath}/cntlm.conf -v" + end + sleep 2 + # "unreacheable" is a typo in upstreams code. There haven't been + # any updates to `cntlm` in over a decade, so this can't be fixed. + assert_match "502 Parent proxy unreacheable", shell_output("curl -s localhost:#{bind_port}") + end +end diff --git a/Formula/c/coal.rb b/Formula/c/coal.rb new file mode 100644 index 0000000000000..011123bb984d4 --- /dev/null +++ b/Formula/c/coal.rb @@ -0,0 +1,85 @@ +class Coal < Formula + desc "Extension of the Flexible Collision Library" + homepage "https://github.com/coal-library/coal" + url "https://github.com/coal-library/coal/releases/download/v3.0.2/coal-3.0.2.tar.gz" + sha256 "899eb343ee7d86ae6312401bc969d1d2cb8103a5a67af5e1f06061a9c5fb0743" + license "BSD-2-Clause" + revision 1 + head "https://github.com/coal-library/coal.git", branch: "devel" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ea2e9ddb3b82550873fc31804dc8c22238d53d2142e73fb64d66b61dc603a614" + sha256 cellar: :any, arm64_sequoia: "6f120192065eff865e85cbe4b60e0c5a8ac444aa00af0a3e3d3cc85b4445b9c5" + sha256 cellar: :any, arm64_sonoma: "5f2d9e5e74b679dc2d6ace787f9db7592b13d41dbcf49efc04c6c942b2be00a7" + sha256 cellar: :any, sonoma: "8ac75a9345115b33e7f40877e21679db8092653df4af3a0c60ee36d7b6e5fd09" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdb978552dd20e4a493c30b00c8eff2ce83ea54d848d631e33c9f8b9ec29e6a9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bbc8e8cfb74069c0b95ecccbfe8b4e731c4265eb483b1f7d3013925c769d984" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "assimp" + depends_on "boost" + depends_on "boost-python3" + depends_on "eigen" + depends_on "eigenpy" + depends_on "octomap" + depends_on "python@3.14" + + # Workaround for Boost 1.89.0 until upstream fix. + # Issue ref: https://github.com/coal-library/coal/issues/743 + patch :DATA + + def python3 + "python3.14" + end + + def install + ENV.prepend_path "PYTHONPATH", Formula["eigenpy"].opt_prefix/Language::Python.site_packages(python3) + ENV.prepend_path "Eigen3_DIR", Formula["eigen"].opt_share/"eigen3/cmake" + + # enable backward compatibility with hpp-fcl + args = %W[ + -DPYTHON_EXECUTABLE=#{which(python3)} + -DCOAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + %w[hppfcl coal].each do |module_name| + system python3, "-c", <<~PYTHON + exec(""" + import #{module_name} + radius = 0.5 + sphere = #{module_name}.Sphere(0.5) + assert sphere.radius == radius + """) + PYTHON + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec28225..cdbcddc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,7 +167,7 @@ if(COAL_ENABLE_LOGGING) + ADD_PROJECT_DEPENDENCY(Boost REQUIRED log) + endif() + if(BUILD_PYTHON_INTERFACE) +- find_package(Boost REQUIRED COMPONENTS system) ++ find_package(Boost REQUIRED) + endif(BUILD_PYTHON_INTERFACE) + + if(Boost_VERSION_STRING VERSION_LESS 1.81) diff --git a/Formula/c/cobalt.rb b/Formula/c/cobalt.rb new file mode 100644 index 0000000000000..da204d8ae95fd --- /dev/null +++ b/Formula/c/cobalt.rb @@ -0,0 +1,28 @@ +class Cobalt < Formula + desc "Static site generator written in Rust" + homepage "https://cobalt-org.github.io/" + url "https://github.com/cobalt-org/cobalt.rs/archive/refs/tags/v0.20.2.tar.gz" + sha256 "0e3b6b34271b78f0cdbd0851a6c7b37e1b4562d546f4f93124a7c7c038b2315f" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7848829328461e664a481412e65a757cd8afd812f6a5fd3e7aabe3ad97846ee0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd41dd2db1d29bf4f2c9b04a8eba05d6989b90e3dc93bd9eb4fdd775b28b8a75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "111fad02160c367d7c97beafb94c88128355b67536836de8ff1c4bbf3984a604" + sha256 cellar: :any_skip_relocation, sonoma: "b7abe100a92a43c73916f395495e1f1afce41ee1c5a9b2cf1f00ca70ffb1f6fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa683dc8a5589631e0cffd6d5b162272fda2e864270cf559afcf3dae2b90263e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84fa98dcf3ef131f628b6d16018bbc67771f194ae7f69dda9e6a132cf9c2a893" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"cobalt", "init" + system bin/"cobalt", "build" + assert_path_exists testpath/"_site/index.html" + end +end diff --git a/Formula/c/cobo-cli.rb b/Formula/c/cobo-cli.rb new file mode 100644 index 0000000000000..a1e1d9e68455e --- /dev/null +++ b/Formula/c/cobo-cli.rb @@ -0,0 +1,177 @@ +class CoboCli < Formula + include Language::Python::Virtualenv + + desc "Build, test, and manage your integration with Cobo Wallet-as-a-Service" + homepage "https://github.com/CoboGlobal/cobo-cli" + url "https://files.pythonhosted.org/packages/a6/b7/7a4cbb7b9a426d1d1f15c58f162b5ca7f7e410516d0ce96680967c56d5ba/cobo_cli-0.0.7.tar.gz" + sha256 "aed9356a758067dc3f0e80a635d86bd2254673188d3889bb5e847ecf6efe0554" + license "MIT" + head "https://github.com/CoboGlobal/cobo-cli.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "6c1d6b8c7c0353444fcacd8548543080f290f061d6c60ee418f55fe1b56ac872" + sha256 cellar: :any, arm64_sequoia: "d67331b508f5f7e8a8b3c325f2a8178a7ceb093b4c338258e71b0d1384c4782a" + sha256 cellar: :any, arm64_sonoma: "67928d85ded6afbfff4fe7773173df6ee44200a08d45c376aa49e59e13e81d39" + sha256 cellar: :any, sonoma: "062b87a78b485728b1004739e882a9397d251a833a3978330c289200b885f39e" + sha256 cellar: :any_skip_relocation, arm64_linux: "37e00296eaf626bcb32e2ced5c8b1559fd2e34a3279a4c8998cb6bde986c4a3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39afd6d11c8751b2c4ee5049f223a75a784aec8aed915f1d959254a91aeb0434" + end + + depends_on "certifi" => :no_linkage + depends_on "libsodium" + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "dataclasses-json" do + url "https://files.pythonhosted.org/packages/64/a4/f71d9cf3a5ac257c993b5ca3f93df5f7fb395c725e7f1e6479d2514173c3/dataclasses_json-0.6.7.tar.gz" + sha256 "b6b3e528266ea45b9535223bc53ca645f5208833c29229e847b3f26a1cc55fc0" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "email-validator" do + url "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz" + sha256 "9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "marshmallow" do + url "https://files.pythonhosted.org/packages/ab/5e/5e53d26b42ab75491cda89b871dab9e97c840bf12c63ec58a1919710cd06/marshmallow-3.26.1.tar.gz" + sha256 "e6d8affb6cb61d39d26402096dc0aee12d5a26d490a121f118d2e81dc0719dc6" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz" + sha256 "64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "typing-inspect" do + url "https://files.pythonhosted.org/packages/dc/74/1789779d91f1961fa9438e9a8710cdae6bd138c80d7303996933d117264a/typing_inspect-0.9.0.tar.gz" + sha256 "b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cobo", shell_parameter_format: :click) + end + + test do + assert_match "Available webhook event types:", shell_output("#{bin}/cobo webhook events") + + assert_match version.to_s, shell_output("#{bin}/cobo version") + end +end diff --git a/Formula/c/cobra-cli.rb b/Formula/c/cobra-cli.rb new file mode 100644 index 0000000000000..68a442a8f2940 --- /dev/null +++ b/Formula/c/cobra-cli.rb @@ -0,0 +1,33 @@ +class CobraCli < Formula + desc "Tool to generate cobra applications and commands" + homepage "https://cobra.dev" + url "https://github.com/spf13/cobra-cli/archive/refs/tags/v1.3.0.tar.gz" + sha256 "9c9729828a035eff012330d5e720eec28d2cb6a1dbaa048e485285977da77d15" + license "Apache-2.0" + head "https://github.com/spf13/cobra-cli.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c2388295cd0c715263114639062592b03f4366be723c206fdb1bd65a74dc3f09" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d05baad8dd6bcebac5c184b14d30a29ac84e15c8f5cb74a19f604c87d4a42869" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d05baad8dd6bcebac5c184b14d30a29ac84e15c8f5cb74a19f604c87d4a42869" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d05baad8dd6bcebac5c184b14d30a29ac84e15c8f5cb74a19f604c87d4a42869" + sha256 cellar: :any_skip_relocation, sonoma: "66330dc06dd3a086ca90c0c5fa45e3b69295fbe30a029a70f4f7dc70c7b6daef" + sha256 cellar: :any_skip_relocation, ventura: "66330dc06dd3a086ca90c0c5fa45e3b69295fbe30a029a70f4f7dc70c7b6daef" + sha256 cellar: :any_skip_relocation, arm64_linux: "9958c8c2360e475734d0f1c3fd89d040887059714787b5458b306121d73b67c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "116ebe675a0b8b1f1c398867a95cf3fa0c27b097e64ae5772e836c83113f4ddb" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"cobra-cli", "completion") + end + + test do + system "go", "mod", "init", "brew.sh/test" + assert_match "Your Cobra application is ready", shell_output("#{bin}/cobra-cli init") + end +end diff --git a/Formula/c/coccinelle.rb b/Formula/c/coccinelle.rb new file mode 100644 index 0000000000000..bb041c3e583f4 --- /dev/null +++ b/Formula/c/coccinelle.rb @@ -0,0 +1,68 @@ +class Coccinelle < Formula + desc "Program matching and transformation engine for C code" + homepage "https://coccinelle.gitlabpages.inria.fr/website/" + url "https://github.com/coccinelle/coccinelle.git", + tag: "1.3.0", + revision: "e1906ad639c5eeeba2521639998eafadf989b0ac" + license "GPL-2.0-only" + head "https://github.com/coccinelle/coccinelle.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 3 + sha256 arm64_tahoe: "6674635eed7e10d0c59addbe4334400c00fce2757a0b976dcf6bc9c26f7a7232" + sha256 arm64_sequoia: "0faa904330204e02b784ec7e6c99a15617729ad7ac81f6ed66402b6f7e666d12" + sha256 arm64_sonoma: "0b15c96cad2e7deb89c174cfe2ee50d29cae1fa30e7dcc622784e7efad86e635" + sha256 sonoma: "c3c10e081708afbc74243fe20cb096da013911b3cd7ffe4a0bb759e8c05170ad" + sha256 arm64_linux: "fe10716f2b88622a10a28155bf96c10a20ddca724fc73edd6a2b758cd4fe39bc" + sha256 x86_64_linux: "2d29e8edd51256bcc58964055ca65ebf75a7ebaf953be4d8300cb127817bdd8a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "hevea" => :build + depends_on "ocaml-findlib" => :build + depends_on "opam" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "ocaml" + depends_on "pcre" + + uses_from_macos "unzip" => :build + + def install + ENV["OPAMROOT"] = buildpath/".opam" + ENV["OPAMYES"] = "1" + ENV["OPAMVERBOSE"] = "1" + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + system "opam", "install", ".", "--deps-only", "--yes", "--no-depexts" + system "./autogen" + system "opam", "exec", "--", "./configure", "--disable-silent-rules", + "--enable-ocaml", + "--enable-opt", + "--without-pdflatex", + "--with-bash-completion=#{bash_completion}", + *std_configure_args + ENV.deparallelize + system "opam", "exec", "--", "make" + system "make", "install" + + pkgshare.install "demos/simple.cocci", "demos/simple.c" + end + + test do + system bin/"spatch", "-sp_file", "#{pkgshare}/simple.cocci", "#{pkgshare}/simple.c", "-o", "new_simple.c" + expected = <<~C + int main(int i) { + f("ca va", 3); + f(g("ca va pas"), 3); + } + C + + assert_equal expected, (testpath/"new_simple.c").read + end +end diff --git a/Formula/c/cocoapods.rb b/Formula/c/cocoapods.rb new file mode 100644 index 0000000000000..9d9d9041bd3a4 --- /dev/null +++ b/Formula/c/cocoapods.rb @@ -0,0 +1,38 @@ +class Cocoapods < Formula + desc "Dependency manager for Cocoa projects" + homepage "https://cocoapods.org/" + url "https://github.com/CocoaPods/CocoaPods/archive/refs/tags/1.16.2.tar.gz" + sha256 "3067f21a0025aedb5869c7080b6c4b3fa55d397b94fadc8c3037a28a6cee274c" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e0caae17dd3fbb66ff2ddfd2f0b729841b2b79150674f8123be0c4e67ba2810" + sha256 cellar: :any, arm64_sequoia: "c0bd1f8e2bdb31e76d8919d8c5181c5ffacab9aa03b9be9cd77c4fcfdd2f0527" + sha256 cellar: :any, arm64_sonoma: "46d7033d09663c83d43346815b67d4abac9c68b2cff38a7a0eaf55fcf459f56d" + sha256 cellar: :any, arm64_ventura: "95765343247a0af19d81ab36c3ab8e379e7729f688da64ae723f49c7deba34d7" + sha256 cellar: :any, sonoma: "783c64ac3c486bae33e11edf68a56380245d3fe783e1c60e2548a08e05adedef" + sha256 cellar: :any, ventura: "b1358f53cd22a76793b935b5b3d4fa384cbe292d85d6a02fccf7232ea038890d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9adde4afac9cbde48d0356f24619557eb25ff14ccdf26c7038c76c783d88c676" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb0ed8f654a355942ff4df4236ad181fa474aad5188cf2de73e6412b9df098b1" + end + + depends_on "pkgconf" => :build + depends_on "ruby" + uses_from_macos "libffi" + + conflicts_with cask: "cocoapods-app", because: "both install `pod` binaries" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "cocoapods.gemspec" + system "gem", "install", "cocoapods-#{version}.gem" + # Other executables don't work currently. + bin.install libexec/"bin/pod", libexec/"bin/xcodeproj" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + system bin/"pod", "list" + end +end diff --git a/Formula/c/cocogitto.rb b/Formula/c/cocogitto.rb new file mode 100644 index 0000000000000..ac519c5c9cb4c --- /dev/null +++ b/Formula/c/cocogitto.rb @@ -0,0 +1,51 @@ +class Cocogitto < Formula + desc "Conventional Commits toolbox" + homepage "https://docs.cocogitto.io/" + url "https://github.com/cocogitto/cocogitto/archive/refs/tags/6.5.0.tar.gz" + sha256 "b807f6201dcbebbd97e0e8e34d8f2f14885b1b1c529b465463fe7a4dc8209ff5" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a704fbe771aa230e5f98656e922a01efe4312a6e33dbfb78bbb04ee87a06463c" + sha256 cellar: :any, arm64_sequoia: "36bbcd4bfb64967dca2190df496432a21ba77d3883b25200ca631ec94b3371a3" + sha256 cellar: :any, arm64_sonoma: "c02747e437f09dfcb70359ad8e859c86e5fd4c01d41f1cd1ec0ae6ca6bdefd10" + sha256 cellar: :any, sonoma: "b6563dc90f933912cabfcb22ea6260e97d6fe610c5ea679c0a0e98fed2d2fff4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c71d19c76a15b2cd48561419e940279ede41de5bf7236dcf99cf977db39a363e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "740669b61556b1b7213dd4037ad17e6e36bd5ea9f5b2130a6154ccc0f43066ce" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + + conflicts_with "cog", because: "both install `cog` binaries" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"cog", "generate-completions") + + system bin/"cog", "generate-manpages", buildpath + man1.install Dir["*.1"] + end + + test do + # Check that a typical Conventional Commit is considered correct. + system "git", "init", "--initial-branch=main" + (testpath/"some-file").write("") + system "git", "add", "some-file" + system "git", "config", "user.name", "'A U Thor'" + system "git", "config", "user.email", "author@example.com" + system "git", "commit", "-m", "chore: initial commit" + assert_equal "No errored commits", shell_output("#{bin}/cog check 2>&1").strip + + linkage_with_libgit2 = (bin/"cog").dynamically_linked_libraries.any? do |dll| + next false unless dll.start_with?(HOMEBREW_PREFIX.to_s) + + File.realpath(dll) == (Formula["libgit2"].opt_lib/shared_library("libgit2")).realpath.to_s + end + + assert linkage_with_libgit2, "No linkage with libgit2! Cargo is likely using a vendored version." + end +end diff --git a/Formula/c/coconut.rb b/Formula/c/coconut.rb new file mode 100644 index 0000000000000..0388a4ed9c975 --- /dev/null +++ b/Formula/c/coconut.rb @@ -0,0 +1,88 @@ +class Coconut < Formula + include Language::Python::Virtualenv + + desc "Simple, elegant, Pythonic functional programming" + homepage "https://coconut-lang.org/" + url "https://files.pythonhosted.org/packages/93/75/414f33186846444da53b4e834d5ccfb0577d0e09b997819c183fa509f70a/coconut-3.1.2.tar.gz" + sha256 "ef0656ee2df4594007f998f4a9c2a1b9bfbc40541a400cbaa00ccbbac50e5414" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6a1429eacd7ba88e78c7cc9e1c8b0208845c4d7dcc675315fcb831e6ad797c4e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6502a220c4da2b19a4dc7194abb01a95c02f02e3f5d9837a440b95452a6d691" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c59cb4b6a3e3c16a8e12dcb6ccef7119f35649fe14cfcecf74da20dac3ea268" + sha256 cellar: :any_skip_relocation, sonoma: "913e4387061d7e486ca1f85b02eb080af9078121ec3a29784433f090292f0e45" + sha256 cellar: :any_skip_relocation, arm64_linux: "b84d98135ff77c2dbadbd696b92746185826c2dcdb78111c6d10bf916e65c6c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59e33f91e69d5216ddc4d2dec613b7ea6e23e8f17a37946b8539cf52d1349f1e" + end + + depends_on "python@3.13" # planning to support Python 3.14, issue ref: https://github.com/evhub/coconut/issues/866 + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "async-generator" do + url "https://files.pythonhosted.org/packages/ce/b6/6fa6b3b598a03cba5e80f829e0dadbb49d7645f523d209b2fb7ea0bbb02a/async_generator-1.10.tar.gz" + sha256 "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144" + end + + resource "cpyparsing" do + url "https://files.pythonhosted.org/packages/d6/f8/76a0f8c9b16d7d4ac21a409a2d0e532095ff17217d4876d70f3be3f1297f/cpyparsing-2.4.7.2.4.1.tar.gz" + sha256 "d917f01a74b3fc614f939eb99fc328a08c9b1de58095660c0f29597744bf1d30" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/e1/88/bdd0a41e5857d5d703287598cbf08dad90aed56774ea52ae071bae9071b6/psutil-7.1.3.tar.gz" + sha256 "6c86281738d77335af7aec228328e944b30930899ea760ecf33a4dba66be5e74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"hello.coco").write <<~EOS + "hello, world!" |> print + EOS + assert_match "hello, world!", shell_output("#{bin}/coconut -r hello.coco") + end +end diff --git a/Formula/c/cocot.rb b/Formula/c/cocot.rb new file mode 100644 index 0000000000000..a366c17f14d13 --- /dev/null +++ b/Formula/c/cocot.rb @@ -0,0 +1,34 @@ +class Cocot < Formula + desc "Code converter on tty" + homepage "https://vmi.jp/software/cygwin/cocot.html" + url "https://github.com/vmi/cocot/archive/refs/tags/cocot-1.2-20171118.tar.gz" + sha256 "b718630ce3ddf79624d7dcb625fc5a17944cbff0b76574d321fb80c61bb91e4c" + license "BSD-3-Clause" + head "https://github.com/vmi/cocot.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6a142983575a21225d725208388e9952675f5b32b1e8b99b5cf26c32ab137a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e50202bee861bf0692cb72d1228e2ad10fa93cc047d61480b3e0c558c81746f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f9cbd95ef6d76b5354943e896cd03342392a266eeffe2784499ce138ad1fd22" + sha256 cellar: :any_skip_relocation, arm64_ventura: "efe840ebc69a0212b0563b64b05e44426624ee8ed3c0aa6ef8f8101d1ca7ea0c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8f91587cce3e6d8aee833b0eefcbc49b50d8851455e523390f9a8899f39cd50d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "835a54f7142add9b9a3ab35097a6821fc9c100568b54c2d7fa52c283fd5ca6af" + sha256 cellar: :any_skip_relocation, sonoma: "cb231dd02c02f24677d3b8b5b74c451efdd11f8300f108abed6e85f467ce3b89" + sha256 cellar: :any_skip_relocation, ventura: "8c309ff7d2661f534506c63909107b699d469d782d659e86f765b9e2a28bd319" + sha256 cellar: :any_skip_relocation, monterey: "d01d5f49b3bc174be130e15d2fbe1a2515064c5eef1a6e402ab9d2957c181874" + sha256 cellar: :any_skip_relocation, big_sur: "2b1f6c60de8b11f5c3a3c454f30f551d2faf251185cfefacba11adbf61c12aaa" + sha256 cellar: :any_skip_relocation, catalina: "c56c078fce103138a45bd1c715dc3854b9eddf207575fada0e736b866d4f46bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a9115e39b97cc0ff0b0097a76904c4e2947ea30efc4904fd9a214efa9b59c7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2cd1dd3dbbe2f6474e43965f09859c3d9921a6b7e21507c2a2c70fe69335c01" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/c/coda-cli.rb b/Formula/c/coda-cli.rb new file mode 100644 index 0000000000000..01abf7f359c1d --- /dev/null +++ b/Formula/c/coda-cli.rb @@ -0,0 +1,81 @@ +class CodaCli < Formula + include Language::Python::Shebang + + desc "Shell integration for Panic's Coda" + homepage "http://justinhileman.info/coda-cli/" + url "https://github.com/bobthecow/coda-cli/archive/refs/tags/v1.0.5.tar.gz" + sha256 "5ed407313a8d1fc6cc4d5b1acc14a80f7e6fad6146f2334de510e475955008b9" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "483e4c98217844164a568e721fa48ab165e16c6649b3320c2f7811850c1504cb" + end + + # originally written in py2, and has not been updated since 2012-05-30 + deprecate! date: "2024-08-03", because: :unmaintained + disable! date: "2025-08-03", because: :unmaintained + + uses_from_macos "python" + + # update to use python3 + patch :DATA + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "coda" + bin.install "coda" + end + + test do + system bin/"coda", "-h" + end +end + +__END__ +diff --git a/coda b/coda +index 2f36414..704adae 100755 +--- a/coda ++++ b/coda +@@ -49,13 +49,13 @@ License: + Distributed under the MIT License - http://creativecommons.org/licenses/MIT/ + + """ +-import sys, os, time, commands, optparse, signal ++import sys, os, time, subprocess, optparse, signal + from tempfile import mkstemp + from pipes import quote + + version = '1.0.5' + +-if commands.getoutput("mdfind \"kMDItemCFBundleIdentifier == 'com.panic.Coda2'\"") != "": ++if subprocess.getoutput("mdfind \"kMDItemCFBundleIdentifier == 'com.panic.Coda2'\"") != "": + bundle_id = 'com.panic.Coda2' + else: + bundle_id = 'com.panic.Coda' +@@ -81,7 +81,7 @@ parser.version = "%%prog: %s" % version + signal.signal(signal.SIGINT, lambda *x: sys.exit(1)) + + def osascript(scpt): +- return commands.getoutput("osascript 2>/dev/null </dev/null < :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + conflicts_with cask: "visual-studio-code" + + def install + # Ensure that the `openssl` crate picks up the intended library. + # https://crates.io/crates/openssl#manual-configuration + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + ENV["VSCODE_CLI_NAME_LONG"] = "Code OSS" + ENV["VSCODE_CLI_VERSION"] = version + + cd "cli" do + system "cargo", "install", *std_cargo_args + end + end + + test do + require "utils/linkage" + + assert_match "Successfully removed all unused servers", + shell_output("#{bin}/code tunnel prune") + assert_match version.to_s, shell_output("#{bin}/code --version") + + linked_libraries = [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ] + + linked_libraries.each do |library| + assert Utils.binary_linked_to_library?(bin/"code", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/code-minimap.rb b/Formula/c/code-minimap.rb new file mode 100644 index 0000000000000..76667bac92418 --- /dev/null +++ b/Formula/c/code-minimap.rb @@ -0,0 +1,34 @@ +class CodeMinimap < Formula + desc "High performance code minimap generator" + homepage "https://github.com/wfxr/code-minimap" + url "https://github.com/wfxr/code-minimap/archive/refs/tags/v0.6.8.tar.gz" + sha256 "c68d4387bd0b86684a1b7c643d6281b79e018da318657254f2502ad032d52355" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "97083f16317681dbf3befcdddd9ed9810fc25c2d9296f372b7b05387d3570342" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3716b4399f2bf71a5152c87ec0c92b3c5303294219d8da389df76a13d9717276" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd478a065e694fc8adb510435dc95b6d208687e21c8dc0a5c62fad2649ec1e9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "85d8ed4137ca95bc5f7460e53888d5ada7def591e478d05341d0fd8cc0474a25" + sha256 cellar: :any_skip_relocation, sonoma: "83ddd0a6939195e5989578e2040ea16117c4dfbbb71be9112f7e0afac7496280" + sha256 cellar: :any_skip_relocation, ventura: "d8195bd613d46d3ed7941deb5a442b3db073a7a663796ad24d4cde971ece9f6f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9eff4702e7834b9189408f5427607ec63a01517e9d977e81fe66b202fe039fa2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15fc2163649169a8c43ac0fafa401259eee14214593ec73cbf82911631d443eb" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/bash/code-minimap.bash" => "code-minimap" + fish_completion.install "completions/fish/code-minimap.fish" + zsh_completion.install "completions/zsh/_code-minimap" + end + + test do + (testpath/"test.txt").write("hello world") + assert_equal "⠉⠉⠉⠉⠉⠁\n", shell_output("#{bin}/code-minimap #{testpath}/test.txt") + end +end diff --git a/Formula/c/code-server.rb b/Formula/c/code-server.rb new file mode 100644 index 0000000000000..5cc2352bdc2ef --- /dev/null +++ b/Formula/c/code-server.rb @@ -0,0 +1,83 @@ +class CodeServer < Formula + desc "Access VS Code through the browser" + homepage "https://github.com/coder/code-server" + url "https://registry.npmjs.org/code-server/-/code-server-4.105.1.tgz" + sha256 "4a716e1f6294eecde5ffdbfa2af146df91991ce53115d4d3e8e86d101b2101c9" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e94eb55d2deb5c2076abe720bbd5149e4828db1ff294bdb72bd2dc473c19ec14" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93d9c0755bdc8d848c0bbf0c395283f58e1d87cb1e23b75735fc1f516c452d19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8ee927ed6da8dfdd3a198ec68e753dc1a84fda1981bf57d55a6f6f225813c39" + sha256 cellar: :any_skip_relocation, sonoma: "2a80402618b04f77cbc21372b45a97f1d75f0eaf7678c6247246c381627f544e" + sha256 cellar: :any_skip_relocation, arm64_linux: "3224ec50593d8b165dba3df4f78edb2e0c9346e61b7f9f805f01ea18ef075cee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b94ac571bb34fcefda67d9b2fc18b929341667927dba4ea063bc5d10016a33d" + end + + depends_on "pkgconf" => :build + depends_on "node@22" + uses_from_macos "python" => :build + + on_linux do + depends_on "krb5" + depends_on "libsecret" + depends_on "libx11" + depends_on "libxkbfile" + end + + def install + # Fix broken node-addon-api: https://github.com/nodejs/node/issues/52229 + ENV.append "CXXFLAGS", "-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT" + + system "npm", "install", *std_npm_args(prefix: false), "--unsafe-perm", "--omit", "dev" + + libexec.install Dir["*"] + bin.install_symlink libexec/"out/node/entry.js" => "code-server" + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + vscode = libexec/"lib/vscode/node_modules/@parcel" + permitted_dir = OS.linux? ? "watcher-#{os}-#{arch}-glibc" : "watcher-#{os}-#{arch}" + vscode.glob("watcher-*").each do |dir| + next unless (Pathname.new(dir)/"watcher.node").exist? + + rm_r(dir) if permitted_dir != dir.basename.to_s + end + end + + def caveats + <<~EOS + The launchd service runs on http://127.0.0.1:8080. Logs are located at #{var}/log/code-server.log. + EOS + end + + service do + run opt_bin/"code-server" + keep_alive true + error_log_path var/"log/code-server.log" + log_path var/"log/code-server.log" + working_dir Dir.home + end + + test do + assert_match version.to_s, shell_output("#{bin}/code-server --version") + + port = free_port + output = "" + + PTY.spawn "#{bin}/code-server --auth none --port #{port}" do |r, _w, pid| + sleep 3 + Process.kill("TERM", pid) + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + ensure + Process.wait(pid) + end + assert_match "HTTP server listening on", output + assert_match "Session server listening on", output + end +end diff --git a/Formula/c/code2prompt.rb b/Formula/c/code2prompt.rb new file mode 100644 index 0000000000000..62029c8380418 --- /dev/null +++ b/Formula/c/code2prompt.rb @@ -0,0 +1,54 @@ +class Code2prompt < Formula + desc "CLI tool to convert your codebase into a single LLM prompt" + homepage "https://code2prompt.dev/" + url "https://github.com/mufeedvh/code2prompt/archive/refs/tags/v4.0.2.tar.gz" + sha256 "ea587473f2c66afa533f54d76abc45ad23623eaa3650ee7e8d0bc618ee75c0e7" + license "MIT" + head "https://github.com/mufeedvh/code2prompt.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "39e9acc3e7ddee5b590994cdf30e5d1e1424e85aeaa759b84fd3f8df710cdcf2" + sha256 cellar: :any, arm64_sequoia: "e9f49fee5ddea12d9683e131a68c8241eab35381ad1d5d79ab7bb5e69dec80ff" + sha256 cellar: :any, arm64_sonoma: "c9ce03e8d805ca949b997a55a513632bcb6e02da39efac5d30fd12981253b239" + sha256 cellar: :any, sonoma: "a6ec265b32a19d46f22f677ed9d15229652acc4c929f72ab9f3e4076db84f906" + sha256 cellar: :any_skip_relocation, arm64_linux: "34fd986896b0f0837cd417c3cd219bb236ce5f9ef3d45688680f85eaef95b96e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "35b7d1ba2ae1c91fd857bdd897e3b8a9fb033fdeb7013bf131ba641146aab464" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # Ensure the correct `openssl` will be picked up. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "crates/code2prompt") + end + + test do + require "utils/linkage" + + assert_match version.to_s, shell_output("#{bin}/code2prompt --version") + + (testpath/"test.py").write <<~PYTHON + def hello_world(): + print("Hello, world!") + PYTHON + + system bin/"code2prompt", "--no-clipboard", "--output-file", "test.json", "--output-format", "json", "test.py" + json_output = (testpath/"test.json").read + assert_match "ChatGPT models, text-embedding-ada-002", JSON.parse(json_output)["model_info"] + + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"code2prompt", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/c/codeberg-cli.rb b/Formula/c/codeberg-cli.rb new file mode 100644 index 0000000000000..77ce7fead89f1 --- /dev/null +++ b/Formula/c/codeberg-cli.rb @@ -0,0 +1,38 @@ +class CodebergCli < Formula + desc "CLI for Codeberg" + homepage "https://codeberg.org/Aviac/codeberg-cli" + url "https://codeberg.org/Aviac/codeberg-cli/archive/v0.5.1.tar.gz" + sha256 "6f91dd631ec630d7b558abcc783757ea189e934aee5ea645691268f859d0c197" + license "AGPL-3.0-or-later" + head "https://codeberg.org/Aviac/codeberg-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "91efe8b40f25e6644cc11fd3be27808838492721f99a5ed795f609dc1c3cf7a7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "323ef96918f9740c6e431bfbc748326684ed9d4f421b982da6da272dbc8f1dc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8fc01fcd334144beb505210380e83dd7514146db1d31fce07887b6d57d894280" + sha256 cellar: :any_skip_relocation, sonoma: "222220b93d6966eeec23533a3854e5f75fb75c8a95e460a32434a57ff20f8809" + sha256 cellar: :any_skip_relocation, arm64_linux: "b6c32a32a1d231c45e72cde7ee83d0204a36e7d8296473370a5ee09a4793767f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b0183090aff316d6d089bba04b428e0f96a3838de815fca3308ec1be70f2430" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"berg", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/berg --version") + + assert_match "Successfully created berg config", shell_output("#{bin}/berg config generate") + + output = shell_output("#{bin}/berg repo info Aviac/codeberg-cli 2>&1", 1) + assert_match "Couldn't find login data", output + end +end diff --git a/Formula/c/codebook-lsp.rb b/Formula/c/codebook-lsp.rb new file mode 100644 index 0000000000000..914904e0654b4 --- /dev/null +++ b/Formula/c/codebook-lsp.rb @@ -0,0 +1,51 @@ +class CodebookLsp < Formula + desc "Code-aware spell checker language server" + homepage "https://github.com/blopker/codebook" + url "https://github.com/blopker/codebook/archive/refs/tags/v0.3.16.tar.gz" + sha256 "e8ff980e3d3e0cbcfa132d2de28bd0a2720ad9cf6d17b8369c6d7b9c1fbe61a8" + license "MIT" + head "https://github.com/blopker/codebook.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "53976323dec7978ab02caeb4d92aa5e52035d0fb818ed45ce16219698ccc24c1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4c7658cdc860115d5701b66bc1419fd21a141b2f3a66283231bc3d1b741be31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9f07bf22f209fb4b947c005d8b9ee76471b3e09277c0eed607d24e018840a27" + sha256 cellar: :any_skip_relocation, sonoma: "2bb76e26f79d2b69d274a7a25f3fa724fc8c57785734f80678514e549afba879" + sha256 cellar: :any_skip_relocation, arm64_linux: "95ffe8540b216c0bc43d208846496d8bb08f6ab14ab8ec3d10fde4c780fc7854" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3526d95440920c554eb7a92d3ad9c93ade729fb481e8be4087a301650b58c7de" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/codebook-lsp") + end + + test do + assert_match "codebook-lsp #{version}", shell_output("#{bin}/codebook-lsp --version") + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"codebook-lsp", "serve") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 1 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/c/codec2.rb b/Formula/c/codec2.rb new file mode 100644 index 0000000000000..451fe4f3079d3 --- /dev/null +++ b/Formula/c/codec2.rb @@ -0,0 +1,54 @@ +class Codec2 < Formula + desc "Open source speech codec" + homepage "https://www.rowetel.com/?page_id=452" + # Linked from https://freedv.org/ + url "https://github.com/drowe67/codec2/archive/refs/tags/1.2.0.tar.gz" + sha256 "cbccae52b2c2ecc5d2757e407da567eb681241ff8dadce39d779a7219dbcf449" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :git do |tags, regex| + malformed_tags = ["v1.03"].freeze + tags.map do |tag| + next if malformed_tags.include?(tag) + + tag[regex, 1] + end + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "efb5e3717cb204bc90d294e0353ed8e610795cd64950a17755eb74add01fcc95" + sha256 cellar: :any, arm64_sequoia: "c440a292877b0280780fead2695c9693ab407f28189cccf7ffe3f23e9957e2d0" + sha256 cellar: :any, arm64_sonoma: "ffb282985d9999fa657f2b7975abb94b565728ccb48e35dd91b731f5836bc9fe" + sha256 cellar: :any, arm64_ventura: "011a69e95c4b665d2d1581d2c357d5cb0eb68c69ff5b6923035d5aeaab50d495" + sha256 cellar: :any, arm64_monterey: "49b0ee03a567601d41a18395e125cd93722d7dfc5431839b2abc55b463c1d509" + sha256 cellar: :any, arm64_big_sur: "52df3ab6255b2191b5666056a05f058b5cae3a739b18917bd33e1187fcb0916d" + sha256 cellar: :any, sonoma: "7b47833fb368ab52135288ccc77a4ba01f66a8c92fd396e473be77a151ae2ee4" + sha256 cellar: :any, ventura: "8731a4ab8dc22a3713b9fdbe5ef39e86fa9cf7b3da039d64806e8332fa9fbed8" + sha256 cellar: :any, monterey: "f2352930bb0c8ef374521c8137dabc2104b3318560fb6c5fade441766a32d515" + sha256 cellar: :any, big_sur: "612d1193fd4999926f62174fe2efcccbd695f4e2ef0af50b707c145607a042e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "21f453f1166d76a11abea03a8c8c128234eeb1ba4e87719d0b7b7759f4cf2e86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a63d4e33df59bb6bf81e6db934047a941a95fba6478da884dd7b0a53f418b163" + end + + depends_on "cmake" => :build + + def install + mkdir "build_osx" do + system "cmake", "..", *std_cmake_args, "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath}" + system "make", "install" + + bin.install "demo/c2demo" + bin.install Dir["src/c2*"] + end + end + + test do + # 8 bytes of raw audio data (silence). + (testpath/"test.raw").write([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].pack("C*")) + system bin/"c2enc", "2400", "test.raw", "test.c2" + end +end diff --git a/Formula/c/codecov-cli.rb b/Formula/c/codecov-cli.rb new file mode 100644 index 0000000000000..3e6e4815180f2 --- /dev/null +++ b/Formula/c/codecov-cli.rb @@ -0,0 +1,111 @@ +class CodecovCli < Formula + include Language::Python::Virtualenv + + desc "Codecov's command-line interface" + homepage "https://cli.codecov.io/" + url "https://files.pythonhosted.org/packages/18/8a/7ffb9a25cef38d2313c5c407026f90e8f07f92f2b787a697b00a1058feb4/codecov_cli-11.2.4.tar.gz" + sha256 "07a2f080f32be52dc7948b10a289279c8758e0e3f235d48b513562e0ba68c2c0" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c5642987e6af96a43db21f9f77f1f9e9884d99152850f2d4991be153db4053f" + sha256 cellar: :any, arm64_sequoia: "e8ffd249a86f49a57366907819b41a72251caa8ea1d9e2aa9f923e2fa2453904" + sha256 cellar: :any, arm64_sonoma: "509090478deb7f4040d6869265702780a6c486c5c7bb9c8033c8fe18ef5f698d" + sha256 cellar: :any, sonoma: "f2f7c99521314e8a9e4893330cabdcb485ac20f88a5702793863ec951bd5a172" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a21ceac6c63bcf9971637549f9cb872ee79377073cc8759349ce957eb295eb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af223ada0d675032642f8e77c53566697f4dd810549d6a787c899eae02a3c7a0" + end + + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "ijson" do + url "https://files.pythonhosted.org/packages/2d/30/7ab4b9e88e7946f6beef419f74edcc541df3ea562c7882257b4eaa82417d/ijson-3.4.0.post0.tar.gz" + sha256 "9aa02dc70bb245670a6ca7fba737b992aeeb4895360980622f7e568dbf23e41e" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "responses" do + url "https://files.pythonhosted.org/packages/6d/db/b949a6bf2a75c64caea0a6b39d05e433aa2e51bea78ae9d5dda1110b31a5/responses-0.21.0.tar.gz" + sha256 "b82502eb5f09a0289d8e209e7bad71ef3978334f56d09b444253d5ad67bf5253" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/31/04/ec8c1dd9250847303d98516e917978cb1c7083024770d86d657d2ccb5a70/sentry_sdk-2.42.1.tar.gz" + sha256 "8598cc6edcfe74cb8074ba6a7c15338cdee93d63d3eb9b9943b4b568354ad5b6" + end + + resource "test-results-parser" do + url "https://files.pythonhosted.org/packages/e9/25/c6459ae54e5b57944417a8f72662d186ab43b0eae956193d6de281619ce4/test_results_parser-0.5.4.tar.gz" + sha256 "2fbfd809a2c1f746360146809b6df30690c992463d7d43e7b1fed31c1a7c15b4" + + # Bump `pyo3` to support Python 3.14 + # Upstream version 0.5.4 is actually same as 0.5.1 and the next of 0.5.3 is not developing, + # so manually add the patch here. + # Issue ref: https://github.com/codecov/test-results-parser/issues/86 + # Related PR ref: https://github.com/codecov/test-results-parser/pull/87 + patch do + url "https://raw.githubusercontent.com/Homebrew/Homebrew-core/0a81f140/Patches/codecov-cli/support-python3.14.patch" + sha256 "e6401a73c44388aa4ee4330436d91693f1a8d1ab8430d1d47a1730ec229a872f" + end + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"codecovcli", shell_parameter_format: :click) + end + + test do + assert_equal "codecovcli, version #{version}\n", shell_output("#{bin}/codecovcli --version") + + (testpath/"coverage.json").write <<~JSON + { + "meta": { "format": 2 }, + "files": {}, + "totals": { + "covered_lines": 0, + "num_statements": 0, + "percent_covered": 100, + } + } + JSON + + output = shell_output("#{bin}/codecovcli do-upload --commit-sha=mocksha --dry-run 2>&1") + assert_match "Found 1 coverage files to report", output + assert_match "Process Upload complete", output + end +end diff --git a/Formula/c/codelimit.rb b/Formula/c/codelimit.rb new file mode 100644 index 0000000000000..f6660e64d8401 --- /dev/null +++ b/Formula/c/codelimit.rb @@ -0,0 +1,161 @@ +class Codelimit < Formula + include Language::Python::Virtualenv + + desc "Your Refactoring Alarm" + homepage "https://github.com/getcodelimit/codelimit" + url "https://files.pythonhosted.org/packages/b7/e5/36aae3a408a00642a7ffa95c200799bdcecb8402e495f4ceffca44a7ab13/codelimit-0.21.0.tar.gz" + sha256 "bd43892398acd2e20fa97d37cb6180e679745c6125253a055a55f75357bf8afb" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5f04ca0afd719ddb69156e84389ed86650b571603e5774a78ea38736724a65fd" + sha256 cellar: :any, arm64_sequoia: "1177d901936a9af8cfbe5d042c37a1540439dc9d8645ad43c49b98684d6dfe24" + sha256 cellar: :any, arm64_sonoma: "b781aa74f65ecdfe8e669375fbf6d8ff76f50f53af121f33cf62588478323ccc" + sha256 cellar: :any, sonoma: "640c5f083d4a9635fcfc298c704e3c7414a8a9f269077339d63c3e03c93013bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "12aa59499a5eb983aa676b90c10338b422ea0d5edcb8430ea9ec353e2a7c35e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b050b194c0f96ee988ea1c1d4a34e196648a0da82ecadf6635e718a0c4aea053" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/ba/fa/3ae643cd525cf6844d3dc810481e5748107368eb49563c15a5fb9f680750/aiohttp-3.13.1.tar.gz" + sha256 "4b7ee9c355015813a6aa085170b96ec22315dabc3d866fd77d147927000e9464" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "sh" do + url "https://files.pythonhosted.org/packages/59/52/f43920223c93e31874677c681b8603d36a40d3d8502d3a37f80d3995d43e/sh-2.2.2.tar.gz" + sha256 "653227a7c41a284ec5302173fbc044ee817c7bad5e6e4d8d55741b9aeb9eb65b" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + (testpath/"test.py").write <<~PYTHON + def foo(): + print('Hello world!') + PYTHON + + assert_includes shell_output("#{bin}/codelimit check #{testpath}/test.py"), "Refactoring not necessary" + end +end diff --git a/Formula/c/codequery.rb b/Formula/c/codequery.rb new file mode 100644 index 0000000000000..569341fe23d38 --- /dev/null +++ b/Formula/c/codequery.rb @@ -0,0 +1,43 @@ +class Codequery < Formula + desc "Code-understanding, code-browsing or code-search tool" + homepage "https://ruben2020.github.io/codequery/" + url "https://github.com/ruben2020/codequery/archive/refs/tags/v1.0.1.tar.gz" + sha256 "40781a7499adddddcb9b7ab2d1d840453aed08f91f5ebc7c339c2f13f63a9403" + license "MPL-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ec9b55288deede50bb5a39e76846aa3a0c7179be2a1ceb1f682b6de5291abdc3" + sha256 cellar: :any, arm64_sequoia: "683318cd26452dda4e8b6f103fcf5c0bacb6d886da49b3492e87dc8bab7ef35e" + sha256 cellar: :any, arm64_sonoma: "1078139feee794760c6e6c42f33c49d308d4f308098e9913636d8054fe1da150" + sha256 cellar: :any, sonoma: "57c3b03bff1a8f7a3311aff6a89c0fb2c530f2f361857af15a9b158ced25476b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9ef3ff7ab094e9ed1e668874c8dd629a2bceee86fc78f7ad08a90ab72491170" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18b9c0955396a9cd0b50d7b05d4e4b7edc97f8a7a32e693c64f5cfe7f16bbd1b" + end + + depends_on "cmake" => :build + depends_on "qttools" => :build + depends_on "qt5compat" + depends_on "qtbase" + depends_on "sqlite" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "test" + end + + test do + # Copy test files as `cqmakedb` gets confused if we just symlink them. + cp (pkgshare/"test").children, testpath + + system bin/"cqmakedb", "-s", "./codequery.db", + "-c", "./cscope.out", + "-t", "./tags", + "-p" + output = shell_output("#{bin}/cqsearch -s ./codequery.db -t info_platform") + assert_match "info_platform", output + end +end diff --git a/Formula/c/coder.rb b/Formula/c/coder.rb new file mode 100644 index 0000000000000..0aa6744962f4f --- /dev/null +++ b/Formula/c/coder.rb @@ -0,0 +1,45 @@ +class Coder < Formula + desc "Tool for provisioning self-hosted development environments with Terraform" + homepage "https://coder.com" + url "https://github.com/coder/coder/archive/refs/tags/v2.26.3.tar.gz" + sha256 "ac5257f4ea23f29d648f8f2ed2cb537db082d79102f3f0b5177016d7a8cae3a0" + license "AGPL-3.0-only" + head "https://github.com/coder/coder.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "611d1d9389f2fcaa89b308ef3fb55789ebb406dc2fb5395978cc870fa39667c2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78c4dd4fe3c555e8da662d9b92a2920215a3623c0d6a4d7736d93259707bfc82" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6b5841b96c3440bd24ffe1f191b9a5ced27a22531b3dd29c93405d222bbdd77" + sha256 cellar: :any_skip_relocation, sonoma: "4443f935b76310291095cccf5e4000eeda02e5f7b6604b90bfbc43eac5c437f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbf18c6cab54cddd64c21d7f76e4e4dcb1e7867d9a82f25629ab49c24ab36bd0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba11a0c8c5a0f1d15c20af624895550e9981dff33e0134cabb50fe57bc20e1cc" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/coder/coder/v2/buildinfo.tag=#{version} + -X github.com/coder/coder/v2/buildinfo.agpl=true + ] + system "go", "build", *std_go_args(ldflags:, tags: "slim"), "./cmd/coder" + end + + test do + version_output = shell_output("#{bin}/coder version") + assert_match version.to_s, version_output + assert_match "AGPL", version_output + assert_match "Slim build", version_output + + assert_match "You are not logged in", shell_output("#{bin}/coder netcheck 2>&1", 1) + end +end diff --git a/Formula/c/codesnap.rb b/Formula/c/codesnap.rb new file mode 100644 index 0000000000000..6451e1b3bccf2 --- /dev/null +++ b/Formula/c/codesnap.rb @@ -0,0 +1,39 @@ +class Codesnap < Formula + desc "Generates code snapshots in various formats" + homepage "https://github.com/codesnap-rs/codesnap" + url "https://github.com/codesnap-rs/codesnap/archive/refs/tags/v0.12.10.tar.gz" + sha256 "b5cecb80f845730333f7f6ea06f167b575a85481908e8852de9b7f3befda7cb0" + license "MIT" + head "https://github.com/codesnap-rs/codesnap.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e16246614205fcfe53498a692c2e6a66098ae70df598ae887efff210143e2f5f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c4836c7c5a9336feebecf9df06836d8407f42cbca631046a53c440df0eb3725" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6f7fb9c1ff617a55ad48c92a3ccf93f872d9ddce64a5f67a22c3f3a0127d9a3" + sha256 cellar: :any_skip_relocation, sonoma: "7f65cdff2c2863ddc9fb13f14e1ad402a0ddde2607bd0f674d4f94690c4419c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "866f9040025c3827ce73bdfd384ec1bd0f920e0bfb7b156502e61c14d51d98db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "710db0d1d1560ef56ed2c574a12e93362fd656d1c26216e5fcc656fc5648aeb6" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + + pkgshare.install "cli/examples" + end + + test do + assert_match version.to_s, shell_output("#{bin}/codesnap --version") + + # Fails in Linux CI with "no default font found" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "SUCCESS", shell_output("#{bin}/codesnap -f #{pkgshare}/examples/cli.sh -o cli.png") + end +end diff --git a/Formula/c/codespell.rb b/Formula/c/codespell.rb new file mode 100644 index 0000000000000..80d6874086b7c --- /dev/null +++ b/Formula/c/codespell.rb @@ -0,0 +1,25 @@ +class Codespell < Formula + include Language::Python::Virtualenv + + desc "Fix common misspellings in source code and text files" + homepage "https://github.com/codespell-project/codespell" + url "https://files.pythonhosted.org/packages/15/e0/709453393c0ea77d007d907dd436b3ee262e28b30995ea1aa36c6ffbccaf/codespell-2.4.1.tar.gz" + sha256 "299fcdcb09d23e81e35a671bbe746d5ad7e8385972e65dbb833a2eaac33c01e5" + license "GPL-2.0-only" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "308dbc9408f1a32d94900b6c12ba7d741f6f15da6a1c74ae9d03c3081c9da409" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/codespell --version") + assert_equal "1: teh\n\tteh ==> the\n", pipe_output("#{bin}/codespell -", "teh", 65) + end +end diff --git a/Formula/c/codevis.rb b/Formula/c/codevis.rb new file mode 100644 index 0000000000000..35e4701e671cc --- /dev/null +++ b/Formula/c/codevis.rb @@ -0,0 +1,43 @@ +class Codevis < Formula + desc "Turns your code into one large image" + homepage "https://github.com/sloganking/codevis" + url "https://github.com/sloganking/codevis/archive/refs/tags/v0.8.4.tar.gz" + sha256 "a4578a1218fc82be8866defe49db4ce6a23088446c18ca3494d3ebc16f931d3f" + license "MIT" + head "https://github.com/sloganking/codevis.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b343098901a405f0c2b847cb154a759404fb0959aad0ce0acae6041394190b79" + sha256 cellar: :any, arm64_sequoia: "809aab83526ed594b872942f4edb8cdae2530d7f9abb37fcf148690bf37adbe0" + sha256 cellar: :any, arm64_sonoma: "51ea40fc3d8a3ec373285257f809f4b3eb034b1ca70fd8929600c71df31ae06e" + sha256 cellar: :any, arm64_ventura: "ea1a0d87b40ef80b9703fd13aea536c990a22486e29ffd3da58fe69d358d67ff" + sha256 cellar: :any, sonoma: "fb7c8b97b77b706314852bd71838810c67e783903409ce94edf69b00ad1a36a4" + sha256 cellar: :any, ventura: "acc82b560737c762384696f71560573a66d2327f827265819ebf99c52851bdb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "85a8bfe022daaca844396a7daae091b2e374f5d83b7d15149d6a47bd414f3269" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de3939e0b77b99e6d62c786955215be6273d5cedae6ccc7e63c3b9a775f7c2cd" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" + + def install + ENV["RUSTONIG_DYNAMIC_LIBONIG"] = "1" + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/codevis --version") + + (testpath/"main.c").write <<~C + #include + int main() { printf("Hello, World!\\n"); return 0; } + C + + output = shell_output("#{bin}/codevis --input-dir #{testpath} 2>&1") + assert_match "search unicode files done 2 files", output + assert_path_exists testpath/"output.png" + end +end diff --git a/Formula/c/coffeescript.rb b/Formula/c/coffeescript.rb new file mode 100644 index 0000000000000..9e2c19cede21a --- /dev/null +++ b/Formula/c/coffeescript.rb @@ -0,0 +1,41 @@ +class Coffeescript < Formula + desc "Unfancy JavaScript" + homepage "https://coffeescript.org/" + url "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz" + sha256 "590e2036bd24d3b54e598b56df2e0737a82c2aa966c1020338508035f3b4721f" + license "MIT" + head "https://github.com/jashkenas/coffeescript.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "8b60f70c34df82c6fb506f905b11ecf0cda8421c03fb775e19ac0a2e9f348edf" + end + + depends_on "node" + + conflicts_with "cake", because: "both install `cake` binaries" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.coffee").write <<~EOS + square = (x) -> x * x + list = [1, 2, 3, 4, 5] + + math = + root: Math.sqrt + square: square + cube: (x) -> x * square x + + cubes = (math.cube num for num in list) + EOS + + system bin/"coffee", "--compile", "test.coffee" + assert_path_exists testpath/"test.js", "test.js was not generated" + end +end diff --git a/Formula/c/cog.rb b/Formula/c/cog.rb new file mode 100644 index 0000000000000..df8aa753b2544 --- /dev/null +++ b/Formula/c/cog.rb @@ -0,0 +1,56 @@ +class Cog < Formula + desc "Containers for machine learning" + homepage "https://cog.run/" + url "https://github.com/replicate/cog/archive/refs/tags/v0.16.8.tar.gz" + sha256 "a032ffa750f96c1947034249e2bba898c16dc6b474a074dac72ca1124bdf7a9d" + license "Apache-2.0" + head "https://github.com/replicate/cog.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b0d7ce713afad995b4ce295fc28d5b9753777f5f6c4beee10cadf8c315e5d0d5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0d7ce713afad995b4ce295fc28d5b9753777f5f6c4beee10cadf8c315e5d0d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0d7ce713afad995b4ce295fc28d5b9753777f5f6c4beee10cadf8c315e5d0d5" + sha256 cellar: :any_skip_relocation, sonoma: "a2126cde70b8e56011c8857b31833b011f72ac77c76bfe79bff379127b835d92" + sha256 cellar: :any_skip_relocation, arm64_linux: "d21db0e8c506a414a5939f36c796074fe92eaa971ec46b68f6651f10aa026e79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ae6769d10f569e271aab438fd913a1ba0bbec0935dca42cfc0d7bd155dac67c" + end + + depends_on "go" => :build + depends_on "python@3.14" => :build + + conflicts_with "cocogitto", because: "both install `cog` binaries" + + def python3 + "python3.14" + end + + def install + # Prevent Makefile from running `pip install build` by manually creating wheel. + # Otherwise it can end up installing binary wheels. + system python3, "-m", "pip", "wheel", "--verbose", "--no-deps", "--no-binary=:all:", "." + (buildpath/"pkg/dockerfile/embed").install buildpath.glob("cog-*.whl").first + + ldflags = %W[ + -s -w + -X github.com/replicate/cog/pkg/global.Version=#{version} + -X github.com/replicate/cog/pkg/global.Commit=#{tap.user} + -X github.com/replicate/cog/pkg/global.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/cog" + + generate_completions_from_executable(bin/"cog", "completion") + end + + test do + system bin/"cog", "init" + assert_match "Configuration for Cog", (testpath/"cog.yaml").read + + assert_match "cog version #{version}", shell_output("#{bin}/cog --version") + end +end diff --git a/Formula/c/cogapp.rb b/Formula/c/cogapp.rb new file mode 100644 index 0000000000000..55d9070fbaa85 --- /dev/null +++ b/Formula/c/cogapp.rb @@ -0,0 +1,37 @@ +class Cogapp < Formula + include Language::Python::Virtualenv + + desc "Small bits of Python computation for static files" + homepage "https://cog.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/64/ea/4ffa8095e0b675e9961cbdcad002c09d35d4ab76ff99d61a014e9e6bcd53/cogapp-3.6.0.tar.gz" + sha256 "ec2a9170bfa644bf0d91996fdb5576c13d7e5e848bb2378a6f92727b48f92604" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a7137db8332857614eecfd870f6e44bbd9d5504fff07c508c684043b98ff4760" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/cog -v") + + (testpath/"test.cpp").write <<~CPP + /*[[[cog + import cog + fnames = ['DoSomething', 'DoAnotherThing', 'DoLastThing'] + for fn in fnames: + cog.outl("void %s();" % fn) + ]]]*/ + //[[[end]]] + CPP + + output = shell_output("#{bin}/cog test.cpp") + assert_match "void DoSomething();\nvoid DoAnotherThing();\nvoid DoLastThing();", output + end +end diff --git a/Formula/c/coin3d.rb b/Formula/c/coin3d.rb new file mode 100644 index 0000000000000..db467e53138ee --- /dev/null +++ b/Formula/c/coin3d.rb @@ -0,0 +1,101 @@ +class Coin3d < Formula + desc "Open Inventor 2.1 API implementation (Coin)" + homepage "https://coin3d.github.io/" + license "BSD-3-Clause" + + stable do + url "https://github.com/coin3d/coin/releases/download/v4.0.6/coin-4.0.6-src.tar.gz" + sha256 "e04a600809593feb2acbec4282803d1673926ddfa1d9fcd402f35ec26fc52e7e" + + resource "soqt" do + url "https://github.com/coin3d/soqt/releases/download/v1.6.4/soqt-1.6.4-src.tar.gz" + sha256 "1387d702df5578fdbc16b9c0a12dd52a68c0478f5e112cb6a45c033f02ba4d24" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "40a953c5da778240ee206304efd942c4c6417e30520700ac37f54b17840d9559" + sha256 cellar: :any, arm64_sequoia: "f97cbf252a50387b2589db4f56bc474c45235095a017bcb1afd033e09c1f7c23" + sha256 cellar: :any, arm64_sonoma: "a516f84b868ed0911b2d7ca6d3bbc29252501955a146147c8cad25f2914aced7" + sha256 cellar: :any, sonoma: "758e7e7da2579c5462b5beff4370099d7d640d513c4ba2688b3a9d539b29270d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8857329b9b978a804adfa800124678ae573b981cd815f31a8017cf3d1c5fa6ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0f975512d3180a87c61ed8c5fb7b4a49c95065239a5379779261e98dd749f5d" + end + + head do + url "https://github.com/coin3d/coin.git", branch: "master" + + resource "soqt" do + url "https://github.com/coin3d/soqt.git", branch: "master" + end + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "qtbase" + + uses_from_macos "expat" + + on_linux do + depends_on "libx11" + depends_on "libxi" + depends_on "mesa" + depends_on "mesa-glu" + end + + def python3 + "python3.13" + end + + def install + system "cmake", "-S", ".", "-B", "_build", + "-DCOIN_BUILD_MAC_FRAMEWORK=OFF", + "-DCOIN_BUILD_DOCUMENTATION=ON", + "-DCOIN_BUILD_TESTS=OFF", + "-DUSE_EXTERNAL_EXPAT=ON", + *std_cmake_args(find_framework: "FIRST") + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + resource("soqt").stage do + system "cmake", "-S", ".", "-B", "_build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DSOQT_BUILD_MAC_FRAMEWORK=OFF", + "-DSOQT_BUILD_DOCUMENTATION=OFF", + "-DSOQT_BUILD_TESTS=OFF", + *std_cmake_args(find_framework: "FIRST") + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + end + + def caveats + "The Python bindings (Pivy) are now in the `pivy` formula." + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + SoDB::init(); + SoDB::cleanup(); + return 0; + } + CPP + + opengl_flags = if OS.mac? + ["-Wl,-framework,OpenGL"] + else + ["-L#{Formula["mesa"].opt_lib}", "-lGL"] + end + + system ENV.cc, "test.cpp", "-L#{lib}", "-lCoin", *opengl_flags, "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cointop.rb b/Formula/c/cointop.rb new file mode 100644 index 0000000000000..2cc45c3ee48b3 --- /dev/null +++ b/Formula/c/cointop.rb @@ -0,0 +1,38 @@ +class Cointop < Formula + desc "Interactive terminal based UI application for tracking cryptocurrencies" + homepage "https://cointop.sh" + url "https://github.com/cointop-sh/cointop/archive/refs/tags/v1.6.10.tar.gz" + sha256 "18da0d25288deec7156ddd1d6923960968ab4adcdc917f85726b97d555d9b1b7" + license "Apache-2.0" + head "https://github.com/cointop-sh/cointop.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "748c6976d944ab4c0d683821fa1eded84813b7072c533fc88e8d3fc34a290b7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b47869b3c333a5ac0f97d68d6a6af6b2e9c2242f6bbc15409d223199f5821cce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1387a159944a0ae1559545b5bb501dcca6604d558852c6d8da0520758db8e6f0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b6439f989983c4513b8d0744b6e05d56e7c79a7ca2e25ef6fa4ed0547c7aae90" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7d21f1ec4932e705f02abb72f4df4e2131701ec33468669f5c237b27b550c56a" + sha256 cellar: :any_skip_relocation, sonoma: "4f4382e37410132227a7df21cab8aa4b189a0e58a3e30f09f38b0f728295db7e" + sha256 cellar: :any_skip_relocation, ventura: "bd19ac7d0982181775335fa3bffba8a68a31154df656ee2b14f69ff1137aca59" + sha256 cellar: :any_skip_relocation, monterey: "e2120a9df18b3d4cb3bca96477d1a4849ed9bdf3b0310958b43d555f49bcaa5a" + sha256 cellar: :any_skip_relocation, big_sur: "b320c63a712d387811bc0732362b0e0e25799fd3d28ff775272a459755d7efa7" + sha256 cellar: :any_skip_relocation, catalina: "6d5851a8c19e542358d91a02a0a6c9dbac8571e50865403026620b24890f3ea1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ac984c14974abe0006d84d1e802a2eddb376e2603f88fd42b60decab2a8c2ad" + end + + deprecate! date: "2024-02-25", because: :repo_archived + disable! date: "2025-02-26", because: :repo_archived + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-X github.com/cointop-sh/cointop/cointop.version=#{version}") + + generate_completions_from_executable(bin/"cointop", "completion") + end + + test do + system bin/"cointop", "test" + end +end diff --git a/Formula/c/coinutils.rb b/Formula/c/coinutils.rb new file mode 100644 index 0000000000000..20ad788fe5d4f --- /dev/null +++ b/Formula/c/coinutils.rb @@ -0,0 +1,69 @@ +class Coinutils < Formula + desc "COIN-OR utilities" + homepage "https://github.com/coin-or/CoinUtils" + url "https://github.com/coin-or/CoinUtils/archive/refs/tags/releases/2.11.12.tar.gz" + sha256 "eef1785d78639b228ae2de26b334129fe6a7d399c4ac6f8fc5bb9054ba00de64" + license "EPL-2.0" + head "https://github.com/coin-or/CoinUtils.git", branch: "master" + + livecheck do + url :homepage + regex(%r{^(?:releases/)?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bcac1e4a99cbcd2b8e5afefcc9f5c27b2e8a6ea031ad5629fe4cc6affda2bfec" + sha256 cellar: :any, arm64_sequoia: "750ce0c23f2af2c0387d6677502cfc0ae5d51e26abae222dc5f09330a971d697" + sha256 cellar: :any, arm64_sonoma: "5d9193efa0d87646822efcf4184544d50b3e0340d85fc65de79f24b170a09c37" + sha256 cellar: :any, arm64_ventura: "b041fbad7adfee8ff45bef91c76c6c154599b662199b350268acd4206b6c3790" + sha256 cellar: :any, arm64_monterey: "1a3df4e2351ee15be1d0dd33f63516457cd82ec3ee25a018f53d79cbac19a2cc" + sha256 cellar: :any, sonoma: "fd5cccbd3701e3df7a839b033758d9f89875145301eab36151f7199c20f41773" + sha256 cellar: :any, ventura: "74fa09ea8b717beaba24b5320e452f0d2d1856b567add648ca67181e47902338" + sha256 cellar: :any, monterey: "5e926b104d3e5bfa2764a33aafca6eabc9f381ffecb385fa3e10bfa69035e76d" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bc2f75c35c2574e870abd5529474cb0b15f705884d70b8ad351327aa7fe3b80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4edc2b29842e702e87695df91ab2044beec5cc72aaf454af76e8265eac83bef" + end + + depends_on "pkgconf" => :build + depends_on "openblas" + + uses_from_macos "zlib" + + def install + args = [ + "--datadir=#{pkgshare}", + "--includedir=#{include}/coinutils", + "--with-blas-incdir=#{Formula["openblas"].opt_include}", + "--with-blas-lib=-L#{Formula["openblas"].opt_lib} -lopenblas", + "--with-lapack-incdir=#{Formula["openblas"].opt_include}", + "--with-lapack-lib=-L#{Formula["openblas"].opt_lib} -lopenblas", + ] + + system "./configure", *args, *std_configure_args + system "make" + # Deparallelize due to error 1: "mkdir: #{include}/coinutils/coin: File exists." + # https://github.com/coin-or/Clp/issues/109 + ENV.deparallelize { system "make", "install" } + end + + test do + resource "homebrew-coin-or-tools-data-sample-p0201-mps" do + url "https://raw.githubusercontent.com/coin-or-tools/Data-Sample/releases/1.2.11/p0201.mps" + sha256 "8352d7f121289185f443fdc67080fa9de01e5b9bf11b0bf41087fba4277c07a4" + end + + testpath.install resource("homebrew-coin-or-tools-data-sample-p0201-mps") + + (testpath/"test.cpp").write <<~CPP + #include + int main() { + CoinMpsIO mpsIO; + return mpsIO.readMps("#{testpath}/p0201.mps"); + } + CPP + + system ENV.cxx, "test.cpp", "-I#{opt_include}/coinutils/coin", + "-L#{opt_lib}", "-lCoinUtils" + system "./a.out" + end +end diff --git a/Formula/c/colfer.rb b/Formula/c/colfer.rb new file mode 100644 index 0000000000000..9df2272b58c0d --- /dev/null +++ b/Formula/c/colfer.rb @@ -0,0 +1,46 @@ +class Colfer < Formula + desc "Schema compiler for binary data exchange" + homepage "https://github.com/pascaldekloe/colfer" + url "https://github.com/pascaldekloe/colfer/archive/refs/tags/v1.8.1.tar.gz" + sha256 "5d184c8a311543f26c957fff6cad3908b9b0a4d31e454bb7f254b300d004dca7" + license "CC0-1.0" + head "https://github.com/pascaldekloe/colfer.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6753b9901bb37c362353210bd3fb81d2330d08285934c9fe54f79abdf644cd2f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46194d5083a34ae3e54cdd690610c1dd5fa385e2311cb1bd61e852029a53ec85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8310235bd0dec3a5cb4464aa1cd9c2ece726e5ef0100c9fb80f6443507e273c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea5a224dfc033cc2a6e2bce8e9f55add8735770539d5db1e4787902594b92a7c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bf8074276dffcfb264832e08687f3dcb0618ff7f51806bfe0b316983c08a186a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e909fd6305c6b00a1499756f250666ccb80a285b2cd1115aa95edb6e31593ea7" + sha256 cellar: :any_skip_relocation, sonoma: "d38a815f95a05e91d15d094baa7f760c02195758f3a95488b3f48866b6336a55" + sha256 cellar: :any_skip_relocation, ventura: "a625b32ffe11cfdbf95699c28f73d5ccceec37b0d2fbf1fae720d41e55be902a" + sha256 cellar: :any_skip_relocation, monterey: "cf4fd7e02a61239f90e3de47e6016ba6cd9c89d31c7728a1a857be854a85add2" + sha256 cellar: :any_skip_relocation, big_sur: "9ee59a49a4e15f40a620d526039cb8ef82e5c323f59f6df3074f1aa153c3fea4" + sha256 cellar: :any_skip_relocation, catalina: "dfdb2743960de62ee18ab35a7ead3d2d8de4207cc6ffa11ff0d8ebf393a591e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce8f82ed2dc94b3000d7d4f591058affc15e693b64e62204b39b012915f9068e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e68acefc34743620979a02b3adce372b7a0a0a93c0e3a6c51480bfa2c02c29f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(output: bin/"colf"), "./cmd/colf" + end + + test do + (testpath/"try.colf").write <<~EOS + // Package try is an integration test. + package try + + // O is an arbitrary data structure. + type O struct { + S text + } + EOS + system bin/"colf", "C", testpath/"try.colf" + system ENV.cc, "-c", "Colfer.c" + end +end diff --git a/Formula/c/colima.rb b/Formula/c/colima.rb new file mode 100644 index 0000000000000..eea0448c80c11 --- /dev/null +++ b/Formula/c/colima.rb @@ -0,0 +1,52 @@ +class Colima < Formula + desc "Container runtimes on MacOS (and Linux) with minimal setup" + homepage "https://github.com/abiosoft/colima/blob/main/README.md" + url "https://github.com/abiosoft/colima.git", + tag: "v0.9.1", + revision: "0cbf719f5409ce04b9f0607b681c005d2ff7d94a" + license "MIT" + head "https://github.com/abiosoft/colima.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a7f242382c46be1f99eddc585491ea078110f1e6e9e07b7f1f12fd0dd2460bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7625efabf5dfe6080f76b2af352aabe20a0722b9884d8f5b14bc4a9f5ab586eb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bfd91649e2535ca35ea4f40beac828631a028e9e5e7a869df3ae7a124100e61b" + sha256 cellar: :any_skip_relocation, sonoma: "fcd7375b90de4cf308fcb89f7a542fd947b43e4703eb4c268c7b75f7e0003524" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5314fdeb1945dd23572eb317918b1a11c62452bcbe23e0d7270a5a67abea38d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ba50c768eb2d2f6cccec94cf3d784aad48848dd9544ee7a25a7a1be269e22f8" + end + + depends_on "go" => :build + depends_on "lima" + + def install + project = "github.com/abiosoft/colima" + ldflags = %W[ + -s -w + -X #{project}/config.appVersion=#{version} + -X #{project}/config.revision=#{Utils.git_head} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/colima" + + generate_completions_from_executable(bin/"colima", "completion") + end + + service do + run [opt_bin/"colima", "start", "-f"] + keep_alive successful_exit: true + environment_variables PATH: std_service_path_env + error_log_path var/"log/colima.log" + log_path var/"log/colima.log" + working_dir Dir.home + end + + test do + assert_match version.to_s, shell_output("#{bin}/colima version 2>&1") + assert_match "colima is not running", shell_output("#{bin}/colima status 2>&1", 1) + end +end diff --git a/Formula/c/collada-dom.rb b/Formula/c/collada-dom.rb new file mode 100644 index 0000000000000..d518b1c4bed54 --- /dev/null +++ b/Formula/c/collada-dom.rb @@ -0,0 +1,121 @@ +class ColladaDom < Formula + desc "C++ library for loading and saving COLLADA data" + homepage "https://www.khronos.org/collada/wiki/Portal:COLLADA_DOM" + url "https://github.com/rdiankov/collada-dom/archive/refs/tags/v2.5.0.tar.gz" + sha256 "3be672407a7aef60b64ce4b39704b32816b0b28f61ebffd4fbd02c8012901e0d" + license "MIT" + revision 13 + head "https://github.com/rdiankov/collada-dom.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "79f4fe2716ff40c5d428aa426e196a4e7f4d35650ba98aa8e94ff6b7240872d1" + sha256 cellar: :any, arm64_sequoia: "121ac6caf851ce8419fdcd32022e39581347816399d24dcb831c042d0a4e1ff9" + sha256 cellar: :any, arm64_sonoma: "4369bf4e5c16cf901edbbdaec4b1e374fa42dee2a527c6cfc6c55bdc5e7dd4c2" + sha256 cellar: :any, arm64_ventura: "c3386425b2597b815b79002e2bfa629e4c8c92b50119def90c2e63153f86eacb" + sha256 cellar: :any, sonoma: "d649bd1ff5c6c3db62909c949f9ce6f6713b46fed91255ef93be32742ca58b7b" + sha256 cellar: :any, ventura: "3c00de7fa89c1d6e750d77308ccc56f46e0698e4192e42c33d420e0534ab9535" + sha256 cellar: :any_skip_relocation, arm64_linux: "62ec1ee257626dd9e7f5c1c874695a99a388401a0597d8f4bf9c9fc22caef0a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "405679197a0c02d886159df43321ac8d3553bb91089aa61da54a83c3643ee18f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "minizip" + depends_on "uriparser" + + uses_from_macos "libxml2" + + # Fix build failure with `boost` 1.85.0 and 1.89.0. + # Issue ref: https://github.com/rdiankov/collada-dom/issues/42 + patch :DATA + + def install + # Remove bundled libraries to avoid fallback + rm_r(buildpath/"dom/external-libs") + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_CXX_STANDARD=11", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + using namespace std; + + int main() + { + cout << GetCOLLADA_VERSION() << endl; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}/collada-dom2.5", + "-L#{lib}", "-lcollada-dom2.5-dp", "-o", "test" + + # This is the DAE file version, not the package version + assert_equal "1.5.0", shell_output("./test").chomp + end +end + +__END__ +diff --git a/dom/include/dae.h b/dom/include/dae.h +index e53388b..a14276a 100644 +--- a/dom/include/dae.h ++++ b/dom/include/dae.h +@@ -25,7 +25,7 @@ + #pragma warning(disable: 4180 4245) + #endif + #ifndef NO_BOOST +-#include ++#include + #endif + #ifdef _MSC_VER + #pragma warning(pop) +diff --git a/dom/src/dae/daeUtils.cpp b/dom/src/dae/daeUtils.cpp +index de30ca0..011a852 100644 +--- a/dom/src/dae/daeUtils.cpp ++++ b/dom/src/dae/daeUtils.cpp +@@ -18,7 +18,7 @@ + #endif + + #ifndef NO_BOOST +-#include // THIS WAS NOT COMMENTED. ++#include // THIS WAS NOT COMMENTED. + #endif + + #include // for tmpnam +diff --git a/dom/src/dae/daeZAEUncompressHandler.cpp b/dom/src/dae/daeZAEUncompressHandler.cpp +index da2a344..2550000 100644 +--- a/dom/src/dae/daeZAEUncompressHandler.cpp ++++ b/dom/src/dae/daeZAEUncompressHandler.cpp +@@ -271,7 +271,7 @@ bool daeZAEUncompressHandler::checkAndExtractInternalArchive( const std::string& + bool error = false; + + boost::filesystem::path archivePath(filePath); +- std::string dir = archivePath.branch_path().string(); ++ std::string dir = archivePath.parent_path().string(); + + const std::string& randomSegment = cdom::getRandomFileName(); + std::string tmpDir = dir + cdom::getFileSeparator() + randomSegment + cdom::getFileSeparator(); +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 20635b2..adcc250 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -159,7 +159,7 @@ endif() + if( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + set(Boost_LIBRARY_DIRS $ENV{BOOST_LIBRARYDIR}) + endif() +-find_package(Boost COMPONENTS filesystem system REQUIRED) ++find_package(Boost COMPONENTS filesystem REQUIRED) + + message(STATUS "found boost version: ${Boost_VERSION}") + diff --git a/Formula/c/collectd.rb b/Formula/c/collectd.rb new file mode 100644 index 0000000000000..bb411bf2d70a9 --- /dev/null +++ b/Formula/c/collectd.rb @@ -0,0 +1,103 @@ +class Collectd < Formula + desc "Statistics collection and monitoring daemon" + homepage "https://collectd.org/" + license "MIT" + revision 8 + + stable do + url "https://storage.googleapis.com/collectd-tarballs/collectd-5.12.0.tar.bz2" + sha256 "5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url "https://www.collectd.org/download.html" + regex(/href=.*?collectd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "b5f482fbf1af2823274e44bcb25a86fc6b402c26e635f3f8666b5f504cbc7540" + sha256 arm64_sequoia: "58f7a44814b1a467e4f68fcf719069fe352920ce6e800fc5d60e8ad2e6af1332" + sha256 arm64_sonoma: "ceb6cf730de48b1f6eadfc3784060f0b6ed437c3a4fcb7f991e75853eb0d8295" + sha256 arm64_ventura: "756fa1c1b080652bc6654718c11f5955b1a674b319eb848609e0416415a0cde1" + sha256 sonoma: "74e6ebaf66605da54399207a4f083833b39a90f6ff9edb92c82673f874af5e09" + sha256 ventura: "cea97da9e5ba92d5d02fb688cc72bf698f245e5d849f44f2d3419f64f1ed5000" + sha256 arm64_linux: "ee5c347f93b603ae28b0cc8f952a7ed5cca462dee6e429cf80d7e6475b8bc6e8" + sha256 x86_64_linux: "5e73f288cbe0d9d1bd8e35b1782593ab8ef268d41bd05e34913bc63678d926d1" + end + + head do + url "https://github.com/collectd/collectd.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libgcrypt" + depends_on "libtool" + depends_on "net-snmp" + depends_on "protobuf-c" + depends_on "riemann-client" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "perl" + + on_macos do + depends_on "libgpg-error" + end + + def install + # Workaround for: Built-in generator --c_out specifies a maximum edition + # PROTO3 which is not the protoc maximum 2023. + # Remove when fixed in `protobuf-c`: + # https://github.com/protobuf-c/protobuf-c/pull/711 + ENV["PROTOC_C"] = Formula["protobuf"].opt_bin/"protoc" + + args = %W[ + --localstatedir=#{var} + --disable-java + --enable-write_riemann + ] + args << "--with-perl-bindings=PREFIX=#{prefix} INSTALLSITEMAN3DIR=#{man3}" if OS.linux? + + system "./build.sh" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + service do + run [opt_sbin/"collectd", "-f", "-C", etc/"collectd.conf"] + keep_alive true + error_log_path var/"log/collectd.log" + log_path var/"log/collectd.log" + end + + test do + log = testpath/"collectd.log" + (testpath/"collectd.conf").write <<~EOS + LoadPlugin logfile + + File "#{log}" + + LoadPlugin memory + EOS + begin + pid = fork { exec sbin/"collectd", "-f", "-C", "collectd.conf" } + sleep 3 + assert_path_exists log, "Failed to create log file" + assert_match "plugin \"memory\" successfully loaded.", log.read + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/c/colmap.rb b/Formula/c/colmap.rb new file mode 100644 index 0000000000000..dff03390e95ac --- /dev/null +++ b/Formula/c/colmap.rb @@ -0,0 +1,66 @@ +class Colmap < Formula + desc "Structure-from-Motion and Multi-View Stereo" + homepage "https://colmap.github.io/" + url "https://github.com/colmap/colmap/archive/refs/tags/3.12.6.tar.gz" + sha256 "f66d34be7a738fa753d1b71aec4fb7411d8c117beb58d1f2ba84ee2696c96410" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "636dda7a476847cd390b24ccfaa54588a068b4cc5a21b0ff55ef2f116272f27a" + sha256 cellar: :any, arm64_sequoia: "aee8f246d50e04e7c3cc551627e890632f9038a9abd97fe421e71cec2217c38f" + sha256 cellar: :any, arm64_sonoma: "8799ef68c3de223d423ce3fc3dab7dfc2adf1d0b9afeff0f30ab37305e06b577" + sha256 cellar: :any, sonoma: "0eec12940518cd5aa0866ba3b875580d6ef6691eaadf7b3d93cf2a21fc40ffae" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5c13c1c6f5217714b9b805c33155242824fb00bb38161ce2e06d720ce75fd90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04bed90470071ac42ca664ed2e86df2f58ddce598bff88bbde1619b5236ed96d" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "ceres-solver" + depends_on "cgal" + depends_on "eigen" + depends_on "faiss" + depends_on "flann" + depends_on "freeimage" + depends_on "gflags" + depends_on "glew" + depends_on "glog" + depends_on "gmp" + depends_on "lz4" + depends_on "metis" + depends_on "openssl@3" + depends_on "poselib" + depends_on "qtbase" + depends_on "suite-sparse" + + uses_from_macos "curl" + uses_from_macos "sqlite" + + on_macos do + depends_on "libomp" + depends_on "mpfr" + depends_on "sqlite" + end + + on_linux do + depends_on "mesa" + end + + def install + args = %w[ + -DCUDA_ENABLED=OFF + -DFETCH_POSELIB=OFF + -DFETCH_FAISS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"colmap", "database_creator", "--database_path", (testpath / "db") + assert_path_exists (testpath / "db") + end +end diff --git a/Formula/c/color-code.rb b/Formula/c/color-code.rb new file mode 100644 index 0000000000000..f4b1c0a141057 --- /dev/null +++ b/Formula/c/color-code.rb @@ -0,0 +1,46 @@ +class ColorCode < Formula + desc "Free advanced MasterMind clone" + homepage "http://colorcode.laebisch.com/" + url "http://colorcode.laebisch.com/download/ColorCode-0.8.7.tar.gz" + sha256 "10d6bb0ab532e603c30caf7fafc5541fa1de5c31f2e154ebc6e1bed410de182a" + license "GPL-3.0-or-later" + + livecheck do + url "http://colorcode.laebisch.com/download" + regex(/href=.*?ColorCode[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ad3f82efc9695c34bf0108765bd03a823567321fb844bbd2dfed5ed7b679ba4d" + sha256 cellar: :any, arm64_sequoia: "eca15102195ecbf35b9b5db261ad63a1e7849f68048a9872757c99a300af2198" + sha256 cellar: :any, arm64_sonoma: "5279b770c1208847aa8bc485ffe5d60a457a22867ba8ae3b9b72a6ccb10b9cee" + sha256 cellar: :any, arm64_ventura: "656617a979b49e4b6cb0ea002e6d2a5d715a042bbbab3d4d4c0524f0b0b93845" + sha256 cellar: :any, arm64_monterey: "c295af784bbc09fa4459c60004d9b525f9e3b5b8796394e1127b20453bf2e724" + sha256 cellar: :any, sonoma: "7d1b463d79dd8300b303a00ab0f578d1468e43cdce5c7a13b1638cf68f91c49e" + sha256 cellar: :any, ventura: "b954f75bdcddf2b8e43abe941bd31564c24e9571b08f9cd4e4631a58cee0003c" + sha256 cellar: :any, monterey: "af2e8d3a61997ad1b25189d2a9b148cbf7fdb34d5f0c92c8c118ba477b68e586" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8bbc4be9fdd3d92db8ca9620bac00252cd3eee18dce7ebdbdfab5d83d13aa33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd2a46ae5f69b106738617bd41d8fe1d2a71a34dcb876850ac1c698b4ca09496" + end + + # No means of contact or public tracker page to discuss/view Qt 6 status. + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "cmake" => :build + depends_on "qt@5" + + def install + system "cmake", "-S", "src", "-B", "build_cmake", *std_cmake_args + system "cmake", "--build", "build_cmake" + bin.install "build_cmake/colorcode" + end + + test do + # We cannot write a more substantial test because executing the binary + # opens a GUI, which is not supported by Homebrew's test environment + system bin/"colorcode", "-h" + end +end diff --git a/Formula/c/colordiff.rb b/Formula/c/colordiff.rb new file mode 100644 index 0000000000000..4ebb013abd900 --- /dev/null +++ b/Formula/c/colordiff.rb @@ -0,0 +1,36 @@ +class Colordiff < Formula + desc "Color-highlighted diff(1) output" + homepage "https://www.colordiff.org/" + url "https://www.colordiff.org/colordiff-1.0.21.tar.gz" + sha256 "9b30f4257ef0f0806dea5a27c9ad8edc3f7999f05ddaff6f0627064dc927e615" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?colordiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5a83886f7e7aacfc46cc6a759f91dd8b80a068cf0bb6b4fa4815c4b310ecefd8" + end + + depends_on "coreutils" => :build # GNU install + + def install + man1.mkpath + system "make", "INSTALL=ginstall", + "INSTALL_DIR=#{bin}", + "ETC_DIR=#{etc}", + "MAN_DIR=#{man1}", + "install" + end + + test do + cp HOMEBREW_PREFIX+"bin/brew", "brew1" + cp HOMEBREW_PREFIX+"bin/brew", "brew2" + system bin/"colordiff", "brew1", "brew2" + end +end diff --git a/Formula/c/colormake.rb b/Formula/c/colormake.rb new file mode 100644 index 0000000000000..e181721d22fbc --- /dev/null +++ b/Formula/c/colormake.rb @@ -0,0 +1,38 @@ +class Colormake < Formula + desc "Wrapper around make to colorize the output" + homepage "https://github.com/pagekite/Colormake" + url "https://github.com/pagekite/Colormake/archive/refs/tags/0.9.20140503.tar.gz" + sha256 "a3f9fae9a455ac96be1cce0371b28bda33a9af73b06fa8e4329aa2f693d68d22" + license "GPL-2.0-or-later" + head "https://github.com/pagekite/Colormake.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a628cc6cde2a938abc044ae867405b3232bc9c999b10729652fbe3088535da44" + end + + def install + inreplace "colormake", "colormake.pl", "#{libexec}/colormake.pl" + + # Prefers symlinks than the original duplicate files + File.unlink "colormake-short", "clmake", "clmake-short" + File.symlink "colormake", "colormake-short" + File.symlink "colormake", "clmake" + File.symlink "colormake", "clmake-short" + + # Adds missing clmake.1 referenced in colormake.1 itself + File.symlink "colormake.1", "clmake.1" + + # Installs auxiliary script, commands and mans + libexec.install "colormake.pl" + bin.install "colormake", "clmake", "colormake-short", "clmake-short" + man1.install "colormake.1", "clmake.1" + end + + test do + (testpath/"Makefile").write("all:\n\techo Hello World!\n") + assert_match "Hello World!", shell_output(bin/"colormake") + end +end diff --git a/Formula/c/colortail.rb b/Formula/c/colortail.rb new file mode 100644 index 0000000000000..fe889879bd6b6 --- /dev/null +++ b/Formula/c/colortail.rb @@ -0,0 +1,30 @@ +class Colortail < Formula + desc "Like tail(1), but with various colors for specified output" + homepage "https://github.com/joakim666/colortail" + url "https://github.com/joakim666/colortail/releases/download/0.3.5/colortail-0.3.5.tar.gz" + sha256 "8d259560c6f4a4aaf1f4bbdb2b62d3e1053e7e19fefad7de322131b7e80e294d" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9862416bf5401f2a2a61f90bdac87795f7445e95cf4baf6e0d0d73e984740a99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46881ac8087481d7f575b911883807e424a02ab942a7af58d9c38b4d2b73ef85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51277f3ef27c9d547f2f07a3e81cfddb744b1e1a566e6e020c5c9a92f804f5f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e6f802573fbe0d69c824e53529faf6e89703247cc1a99e0889c8ac04bb731b5" + sha256 cellar: :any_skip_relocation, sonoma: "6c5d498dedf3d26bf0636d10e5a82bdda798dbb480f89ab07a19fdc75159053a" + sha256 cellar: :any_skip_relocation, ventura: "2b9245f09d0796f87a0e4d615631bd7a678135dc25d5243128b8c47104bae3aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "78b490e972fd2d3c0b3f1a1975bdd221f61e990caf05acd383bf5a79ef675a48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7f6aa1cfcfd61cef470944acee240c93f2442639355dea39fe06e414d168cab" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.txt").write "Hello\nWorld!\n" + assert_match(/World!/, shell_output("#{bin}/colortail -n 1 test.txt")) + end +end diff --git a/Formula/c/comby.rb b/Formula/c/comby.rb new file mode 100644 index 0000000000000..bc231b123f8dc --- /dev/null +++ b/Formula/c/comby.rb @@ -0,0 +1,102 @@ +class Comby < Formula + desc "Tool for changing code across many languages" + homepage "https://comby.dev" + url "https://github.com/comby-tools/comby/archive/refs/tags/1.8.1.tar.gz" + sha256 "04d51cf742bbbf5e5fda064a710be44537fac49bff598d0e9762a3a799d666e2" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e1ce03e0fb0b0363900de5e46b8be9a46cefe3cf343ea7da2a3e8627a83c6975" + sha256 cellar: :any, arm64_sequoia: "02e4b812a3a7196017189b30aba83d058f72fbe37107c554c517538eeb153fee" + sha256 cellar: :any, arm64_sonoma: "6547d31a4235741700836ce54b0fdf64bbc0ca2ac42e31ce003c1d86bef079f0" + sha256 cellar: :any, arm64_ventura: "0c2cc4ae48e83842879b731399da84e9eb6891bf2c62a10087250db18c257a38" + sha256 cellar: :any, arm64_monterey: "c5e30b40a5bfca4e550da1ff541deeb4a467eef42298de85c72110e373b68c11" + sha256 cellar: :any, sonoma: "1d1399b5fb4f1c0c1fc167a8a758392a8e7fd261ee351f40460079d110dbc27b" + sha256 cellar: :any, ventura: "615cb295eabe9a99891de27aff6950ce729664949a92c705b5e5ce1d61f20687" + sha256 cellar: :any, monterey: "660da52140d4812766f9f942966068c6076d8122b41dfc2a2a2c21e0de2066cb" + sha256 arm64_linux: "09a23c45c18a469df962efd914eb19de9b967f1dd63dd21f9124733f31434e54" + sha256 x86_64_linux: "6a87649180d98f7555771ceb9d6062a1ce98f2aaaff996f52f9f8249bf300a8c" + end + + depends_on "autoconf" => :build + depends_on "gmp" => :build + depends_on "ocaml@4" => :build # https://github.com/comby-tools/comby/issues/358 + depends_on "opam" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "libev" + depends_on "pcre" + + uses_from_macos "m4" + uses_from_macos "sqlite" + uses_from_macos "unzip" + uses_from_macos "zlib" + + # Workaround for error due to `-mpopcnt` on arm64 macOS with Xcode 16.3+. + # TODO: Remove once base >= 0.17.3 or if fix is backported to 0.14 and released + on_sequoia :or_newer do + on_arm do + resource "base" do + url "https://github.com/janestreet/base/archive/refs/tags/v0.14.3.tar.gz" + sha256 "e34dc0dd052a386c84f5f67e71a90720dff76e0edd01f431604404bee86ebe5a" + end + + # Getting fixed file from 0.17.3 as commit doesn't cleanly apply + # https://github.com/janestreet/base/commit/68f18ed6a5e94dda1ed423c3435d1515259dcc7d + resource "discover.ml" do + url "https://raw.githubusercontent.com/janestreet/base/refs/tags/v0.17.3/src/discover/discover.ml" + sha256 "07654aaab7e891ccae019d008155aaf2a48cfd64b5dc402c0779554d6e59967a" + end + end + end + + def install + ENV.deparallelize + opamroot = buildpath/".opam" + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + # Workaround for https://github.com/comby-tools/comby/issues/381 + system "opam", "pin", "add", "tar-unix", "2.6.0" + # Workaround for https://github.com/janestreet/base/issues/164 + if OS.mac? && MacOS.version >= :sequoia + resource("base").stage do + resource("discover.ml").stage("src/discover") + system "opam", "install", ".", "--yes", "--no-depexts", "--working-dir" + end + end + system "opam", "install", ".", "--deps-only", "--yes", "--no-depexts" + + ENV.prepend_path "LIBRARY_PATH", opamroot/"default/lib/hack_parallel" # for -lhp + system "opam", "exec", "--", "make", "release" + + bin.install "_build/default/src/main.exe" => "comby" + end + + test do + expect = <<~DIFF + --- test.c + +++ test.c + @@ -1,3 +1,3 @@ + int main(void) { + - printf("hello world!"); + + printf("comby, hello!"); + } + DIFF + + (testpath/"test.c").write <<~C + int main(void) { + printf("hello world!"); + } + C + + match = 'printf(":[1] :[2]!")' + rewrite = 'printf("comby, :[1]!")' + + assert_equal expect, shell_output("#{bin}/comby '#{match}' '#{rewrite}' test.c -diff") + end +end diff --git a/Formula/c/commandbox.rb b/Formula/c/commandbox.rb new file mode 100644 index 0000000000000..6eda2df064266 --- /dev/null +++ b/Formula/c/commandbox.rb @@ -0,0 +1,40 @@ +class Commandbox < Formula + desc "CFML embedded server, package manager, and app scaffolding tools" + homepage "https://www.ortussolutions.com/products/commandbox" + url "https://downloads.ortussolutions.com/ortussolutions/commandbox/6.2.1/commandbox-bin-6.2.1.zip" + sha256 "c8f4c9befda31046fd535542024b21ae121ce12fa517f6c1405f88b432ce1f1a" + license "Apache-2.0" + + livecheck do + url :homepage + regex(/Download CommandBox v?(\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "89fa62b33dfb9f7f9e0ff49252d252cf366d496ae3191d9fda916b4a6c999ef4" + end + + depends_on "openjdk" + + resource "apidocs" do + url "https://downloads.ortussolutions.com/ortussolutions/commandbox/6.2.1/commandbox-apidocs-6.2.1.zip" + sha256 "ff1c3eed5fd1036de851b57a6be25041844ca00516b7aa4ce6d1365eb8be47d5" + + livecheck do + formula :parent + end + end + + def install + odie "apidocs resource needs to be updated" if version != resource("apidocs").version + + (libexec/"bin").install "box" + (bin/"box").write_env_script libexec/"bin/box", Language::Java.java_home_env + doc.install resource("apidocs") + end + + test do + system bin/"box", "--commandbox_home=~/", "version" + system bin/"box", "--commandbox_home=~/", "help" + end +end diff --git a/Formula/c/commitizen.rb b/Formula/c/commitizen.rb new file mode 100644 index 0000000000000..92ab6ea8c028a --- /dev/null +++ b/Formula/c/commitizen.rb @@ -0,0 +1,126 @@ +class Commitizen < Formula + include Language::Python::Virtualenv + + desc "Defines a standard way of committing rules and communicating it" + homepage "https://commitizen-tools.github.io/commitizen/" + url "https://files.pythonhosted.org/packages/77/19/927ac5b0eabb9451e2d5bb45b30813915c9a1260713b5b68eeb31358ea23/commitizen-4.9.1.tar.gz" + sha256 "b076b24657718f7a35b1068f2083bd39b4065d250164a1398d1dac235c51753b" + license "MIT" + head "https://github.com/commitizen-tools/commitizen.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b1f2a57f4cdaf58dc2080805516b86619dcc4be4a8ce4a70558cccf02664594d" + sha256 cellar: :any, arm64_sequoia: "e1f236b01e9a2300233d67c494263d10a5959ad1082960347ffad742ddb4010a" + sha256 cellar: :any, arm64_sonoma: "73edb092a82884f6c682490ffd55179936310d966ff015a1d84c77feafa92e4c" + sha256 cellar: :any, sonoma: "ba6b0ad432d0e1011fc2355f79ec0c0c5de28cb085abdf74c6e1931bfbfe96d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "44940a59607090b9cbfe6a25a6700ec86546959955f369ffbd89df580df54109" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b47592d60ccb6684d2a02d06006ccbf2917ea37abbd63e0898cec559882483b3" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "decli" do + url "https://files.pythonhosted.org/packages/0c/59/d4ffff1dee2c8f6f2dd8f87010962e60f7b7847504d765c91ede5a466730/decli-0.6.3.tar.gz" + sha256 "87f9d39361adf7f16b9ca6e3b614badf7519da13092f2db3c80ca223c53c7656" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/f6/45/eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5/questionary-2.1.1.tar.gz" + sha256 "3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" + sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable( + libexec/"bin/register-python-argcomplete", "cz", + base_name: "cz", + shell_parameter_format: :arg + ) + end + + test do + # Generates a changelog after an example commit + system "git", "init" + touch "example" + system "git", "add", "example" + system "yes | #{bin}/cz commit" + system bin/"cz", "changelog" + + # Verifies the checksum of the changelog + expected_sha = "97da642d3cb254dbfea23a9405fb2b214f7788c8ef0c987bc0cde83cca46f075" + output = File.read(testpath/"CHANGELOG.md") + assert_match Digest::SHA256.hexdigest(output), expected_sha + end +end diff --git a/Formula/c/commitlint.rb b/Formula/c/commitlint.rb new file mode 100644 index 0000000000000..ff6d7f9b15748 --- /dev/null +++ b/Formula/c/commitlint.rb @@ -0,0 +1,30 @@ +class Commitlint < Formula + desc "Lint commit messages according to a commit convention" + homepage "https://commitlint.js.org/#/" + url "https://registry.npmjs.org/commitlint/-/commitlint-20.1.0.tgz" + sha256 "d8872521d20a82e70e97afc4f46624d6a1d422b07830f32f80c14354805fd20a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3b1c7eaddcc640fe4440ef0c07ed9afb1b88dcd0c87593ca487fce4a355fd920" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"commitlint.config.js").write <<~JS + module.exports = { + rules: { + 'type-enum': [2, 'always', ['foo']], + }, + }; + JS + assert_match version.to_s, shell_output("#{bin}/commitlint --version") + assert_empty pipe_output(bin/"commitlint", "foo: message") + end +end diff --git a/Formula/c/compiledb.rb b/Formula/c/compiledb.rb new file mode 100644 index 0000000000000..9dd2c5f6d9e58 --- /dev/null +++ b/Formula/c/compiledb.rb @@ -0,0 +1,46 @@ +class Compiledb < Formula + include Language::Python::Virtualenv + + desc "Generate a Clang compilation database for Make-based build systems" + homepage "https://github.com/nickdiego/compiledb" + url "https://files.pythonhosted.org/packages/0e/62/d0fc807871757841c32e6fbe433ebad422528a468336a0cf82fea226f41d/compiledb-0.10.7.tar.gz" + sha256 "97752d8810b6977654a11a22cdc41bf6b71473bcdb5da312bc135f36d6af8271" + license "GPL-3.0-or-later" + head "https://github.com/nickdiego/compiledb.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "be28658b5cf0b082588b3ab1e46a5f76327e79efb90c417ded660671559de3ff" + end + + depends_on "python@3.14" + + resource "bashlex" do + url "https://files.pythonhosted.org/packages/76/60/aae0bb54f9af5e0128ba90eb83d8d0d506ee8f0475c4fdda3deeda20b1d2/bashlex-0.18.tar.gz" + sha256 "5bb03a01c6d5676338c36fd1028009c8ad07e7d61d8a1ce3f513b7fff52796ee" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"compiledb", shell_parameter_format: :click) + end + + test do + (testpath/"Makefile").write <<~MAKE + all: + cc main.c -o test + MAKE + (testpath/"main.c").write <<~C + int main(void) { return 0; } + C + + system bin/"compiledb", "-n", "make" + assert_path_exists testpath/"compile_commands.json", "compile_commands.json should be created" + end +end diff --git a/Formula/c/composer.rb b/Formula/c/composer.rb new file mode 100644 index 0000000000000..e9bd931574ed6 --- /dev/null +++ b/Formula/c/composer.rb @@ -0,0 +1,81 @@ +class Composer < Formula + desc "Dependency Manager for PHP" + homepage "https://getcomposer.org/" + url "https://getcomposer.org/download/2.8.12/composer.phar" + sha256 "f446ea719708bb85fcbf4ef18def5d0515f1f9b4d703f6d820c9c1656e10a2f2" + license "MIT" + + livecheck do + url "https://getcomposer.org/download/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/composer\.phar}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "42978dd11168f2f7f1a564fe4a9a784d1c365f21be2d1f249b612af2f10562ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42978dd11168f2f7f1a564fe4a9a784d1c365f21be2d1f249b612af2f10562ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42978dd11168f2f7f1a564fe4a9a784d1c365f21be2d1f249b612af2f10562ac" + sha256 cellar: :any_skip_relocation, sonoma: "4019389d975b1ed145a9f9ea3800fb9261f707beca864b20b3dffb12e23d8c7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "4019389d975b1ed145a9f9ea3800fb9261f707beca864b20b3dffb12e23d8c7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4019389d975b1ed145a9f9ea3800fb9261f707beca864b20b3dffb12e23d8c7b" + end + + depends_on "php" + + # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix + on_macos do + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + bin.install "composer.phar" => "composer" + end + + test do + (testpath/"composer.json").write <<~JSON + { + "name": "homebrew/test", + "authors": [ + { + "name": "Homebrew" + } + ], + "require": { + "php": ">=5.3.4" + }, + "autoload": { + "psr-0": { + "HelloWorld": "src/" + } + } + } + JSON + + (testpath/"src/HelloWorld/Greetings.php").write <<~PHP + :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/comrak --version") + + (testpath/"test.md").write <<~MARKDOWN + # Hello, World! + + This is a test of the **comrak** Markdown parser. + MARKDOWN + + output = shell_output("#{bin}/comrak test.md") + assert_match "

Hello, World!

", output + assert_match "

This is a test of the comrak Markdown parser.

", output + end +end diff --git a/Formula/c/comtrya.rb b/Formula/c/comtrya.rb new file mode 100644 index 0000000000000..5ddfffcb9e9eb --- /dev/null +++ b/Formula/c/comtrya.rb @@ -0,0 +1,40 @@ +class Comtrya < Formula + desc "Configuration and dotfile management tool" + homepage "https://comtrya.dev" + url "https://github.com/comtrya/comtrya/archive/refs/tags/v0.9.2.tar.gz" + sha256 "7bbd6ac04314e2dd541d8104908a2e8991a7489daab5563d01d28a3e48c08350" + license "MIT" + head "https://github.com/comtrya/comtrya.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d47418f399155160faedb236b13d882ae55200aa9cc211e4f5ad4c77013aec29" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46bf7dfc1bc293ec74fc38268c4ea93141cc02e9da597659c9b7211e31b1d7ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a8832ef28773fb65085509c65d978081f9d1fd773ddbcb4b56449cbeb94a87f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b68a181a0d187ff39d38f05615a38fb5c238130c609deb71f382e0a7c790a77" + sha256 cellar: :any_skip_relocation, sonoma: "2beda410c50174b01333927b00eece60fc67fb8d88af2306497f6771b7327155" + sha256 cellar: :any_skip_relocation, ventura: "91d872c1955cdba479855aa1a57cd647e91d3ccd19585eab397221619e6d17e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "feefd9e00ca885fbb8b67fa3ad298ff77d90beb29f458780ed4f2e50e7882795" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e52d28d153e028d22f1e74375a63f0bd43281bd6370f65cbe0d35305e79c4c2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "app") + + generate_completions_from_executable(bin/"comtrya", "gen-completions") + end + + test do + assert_match "comtrya #{version}", shell_output("#{bin}/comtrya --version") + + resource "testmanifest" do + url "https://raw.githubusercontent.com/comtrya/comtrya/refs/heads/main/examples/onlyvariants/main.yaml" + sha256 "0715e12cbbb95c8d6c36bb02ae4b49f9fa479e2f28356b8c1f3b5adfb000b93f" + end + + resource("testmanifest").stage do + system bin/"comtrya", "-d", "main.yaml", "apply" + end + end +end diff --git a/Formula/c/conan.rb b/Formula/c/conan.rb new file mode 100644 index 0000000000000..9b5ae11218b68 --- /dev/null +++ b/Formula/c/conan.rb @@ -0,0 +1,106 @@ +class Conan < Formula + include Language::Python::Virtualenv + + desc "Distributed, open source, package manager for C/C++" + homepage "https://conan.io" + url "https://files.pythonhosted.org/packages/95/f6/9617b34c095f991337740bf56da0c94924fdb758653a3304a33523ede10d/conan-2.22.1.tar.gz" + sha256 "c33f4d538f0827e7664813a5e2b5db5ce6a7aa58fb3d0eb6145b2261b56b005c" + license "MIT" + head "https://github.com/conan-io/conan.git", branch: "develop2" + + bottle do + sha256 cellar: :any, arm64_tahoe: "dff953099ef137382962ccfdbd1e619f4ecee49857080ff4d5d3869ebd943f25" + sha256 cellar: :any, arm64_sequoia: "23bfad8813fa05d5dd8d11febfc3e8ce6ede373e4d0fccfcb03a2d15058364ca" + sha256 cellar: :any, arm64_sonoma: "d468d081e5bed49803830caa5db7a21e418b8a5544b5cf223aa33523ad53cd22" + sha256 cellar: :any, sonoma: "52c7b1b8921755c486364e73033d5129f8daaf175406603c383c7d4bab690349" + sha256 cellar: :any_skip_relocation, arm64_linux: "4df6d44df88330c040ee588ce474768ab036ad909b1dede3b338e7ed7911db12" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02744bee24621814cabeb9f7d7318fbe8c6a425be3d75499c16e3f7fa2d68800" + end + + depends_on "pkgconf" => :build + depends_on "cmake" => :test + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi", + extra_packages: "distro" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/4b/89/eaa3a3587ebf8bed93e45aa79be8c2af77d50790d15b53f6dfc85b57f398/distro-1.8.0.tar.gz" + sha256 "02e111d1dc6a50abb8eed6bf31c3e48ed8b0830d1ea2a1b78c61765c2513fdd8" + end + + resource "fasteners" do + url "https://files.pythonhosted.org/packages/2d/18/7881a99ba5244bfc82f06017316ffe93217dbbbcfa52b887caa1d4f2a6d3/fasteners-0.20.tar.gz" + sha256 "55dce8792a41b56f727ba6e123fcaee77fd87e638a6863cec00007bfea84c8d8" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "patch-ng" do + url "https://files.pythonhosted.org/packages/ee/c0/53a2f017ac5b5397a7064c2654b73c3334ac8461315707cbede6c12199eb/patch-ng-1.18.1.tar.gz" + sha256 "52fd46ee46f6c8667692682c1fd7134edc65a2d2d084ebec1d295a6087fc0291" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"conan", "profile", "detect" + system bin/"conan", "install", "--requires=zlib/1.3.1", + "--build=missing", + "--lockfile-out=conan.lock" + lockfile = JSON.parse(File.read("conan.lock", mode: "r")) + refute_predicate lockfile["requires"].select { |req| req.start_with?("zlib/1.3.1") }, :empty? + end +end diff --git a/Formula/c/conan@1.rb b/Formula/c/conan@1.rb new file mode 100644 index 0000000000000..67e39093554af --- /dev/null +++ b/Formula/c/conan@1.rb @@ -0,0 +1,155 @@ +class ConanAT1 < Formula + include Language::Python::Virtualenv + + desc "Distributed, open source, package manager for C/C++" + homepage "https://conan.io" + url "https://files.pythonhosted.org/packages/ee/e8/0893952ee0c0f78100a7da72aeb81f68925933ecbb730bfd664e7a4c6f1f/conan-1.66.0.tar.gz" + sha256 "04d2ad0f6ec6f055d95fa0a157b55fdea9328ae67f51b11e7d26e9d9d2f76ab9" + license "MIT" + revision 3 + + livecheck do + url "https://github.com/conan-io/conan.git" + regex(/^v?(1(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "347415104db865374e09109080fa117d919130b502de713bc9062501e4ff8564" + sha256 cellar: :any, arm64_sequoia: "7dcfb73f071f82c9a5a5a2c081b54030c8c7aa87f11293897d499400972a9b78" + sha256 cellar: :any, arm64_sonoma: "22c8bfd4738a91ec58429ca930af4d1cdcb2c2e13f4b3759e1c0fa576502f392" + sha256 cellar: :any, arm64_ventura: "e1d35af5f0d27ff9afbc35cf1c81373919968f71928bd78c6ec249d165b7f3ad" + sha256 cellar: :any, sonoma: "583dee8e43b2560874eea8d5d9b55ad6c557b802763d457a9682e03234d669f6" + sha256 cellar: :any, ventura: "8660e16c3f77b91771d8f5568b8fa7adf05c6867dfb097e322c51f95a087e0cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "6adb3426b67add70f591333351e37feed8d4afed2d8c85b1872c4b980f8a483b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e88aafef9632abd643dd8e617093529b01fddffcf6a8e57f867f59d07f684930" + end + + keg_only :versioned_formula + + # Upstream comments mention 1.x is no longer supported: + # https://github.com/conan-io/conan/pull/17938#issuecomment-3051751396 + # https://github.com/conan-io/conan/issues/18874#issuecomment-3249873665 + deprecate! date: "2025-10-27", because: :unsupported + disable! date: "2026-10-27", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "cmake" => :test + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.12" # https://github.com/conan-io/conan/issues/17220#issuecomment-2437381133 + + pypi_packages exclude_packages: "certifi", + extra_packages: "distro" + + resource "bottle" do + url "https://files.pythonhosted.org/packages/fd/04/1c09ab851a52fe6bc063fd0df758504edede5cc741bd2e807bf434a09215/bottle-0.12.25.tar.gz" + sha256 "e1a9c94970ae6d710b3fb4526294dfeb86f2cb4a81eff3a4b98dc40fb0e5e021" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "fasteners" do + url "https://files.pythonhosted.org/packages/5f/d4/e834d929be54bfadb1f3e3b931c38e956aaa3b235a46a3c764c26c774902/fasteners-0.19.tar.gz" + sha256 "b4f37c3ac52d8a445af3a66bce57b33b5e90b97c696b7b984f530cf8f0ded09c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "node-semver" do + url "https://files.pythonhosted.org/packages/f1/4e/1d9a619dcfd9f42d0e874a5b47efa0923e84829886e6a47b45328a1f32f1/node-semver-0.6.1.tar.gz" + sha256 "4016f7c1071b0493f18db69ea02d3763e98a633606d7c7beca811e53b5ac66b7" + end + + resource "patch-ng" do + url "https://files.pythonhosted.org/packages/c1/b2/ad3cd464101435fdf642d20e0e5e782b4edaef1affdf2adfc5c75660225b/patch-ng-1.17.4.tar.gz" + sha256 "627abc5bd723c8b481e96849b9734b10065426224d4d22cd44137004ac0d4ace" + end + + resource "pluginbase" do + url "https://files.pythonhosted.org/packages/f3/07/753451e80d2b0bf3bceec1162e8d23638ac3cb18d1c38ad340c586e90b42/pluginbase-1.0.1.tar.gz" + sha256 "ff6c33a98fce232e9c73841d787a643de574937069f0d18147028d70d7dee287" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + # patch to add apple clang 17, upstream pr ref, https://github.com/conan-io/conan/pull/18445 + patch do + url "https://github.com/conan-io/conan/commit/21089afd5d260c4d2d688ca8a44fb406d1dd1a75.patch?full_index=1" + sha256 "ede46dfde4ab3b96299854ff6f6adde4267a8e8939799f3f79a694aae696129a" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"conan", "search", "zlib", "--remote", "conancenter" + + system bin/"conan", "install", "zlib/1.3.1@", "--build" + assert_path_exists testpath/".conan/data/zlib/1.3.1" + end +end diff --git a/Formula/c/concurrencykit.rb b/Formula/c/concurrencykit.rb new file mode 100644 index 0000000000000..249b71ba7a8ac --- /dev/null +++ b/Formula/c/concurrencykit.rb @@ -0,0 +1,51 @@ +class Concurrencykit < Formula + desc "Aid design and implementation of concurrent systems" + # site not accessible bug report, https://github.com/concurrencykit/ck/issues/225 + homepage "https://github.com/concurrencykit/ck" + url "https://github.com/concurrencykit/ck/archive/refs/tags/0.7.2.tar.gz" + sha256 "568ebe0bc1988a23843fce6426602e555b7840bf6714edcdf0ed530214977f1b" + license "BSD-2-Clause" + head "https://github.com/concurrencykit/ck.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "78b475639766ea82bbc20c59535a1c87c7da041f39734ba5055f7bb91c1a3822" + sha256 cellar: :any, arm64_sequoia: "64b9e71ccc8a487ee176d5aa42ba6a9506ea3b76982e567cfe666306b5613656" + sha256 cellar: :any, arm64_sonoma: "61349da656422bd19044368a9dd6a07e9e6a45e77e301baff35e8af1a8331087" + sha256 cellar: :any, arm64_ventura: "0a0a6868102744de167a27d8ce774ac1542b268713588998879cc782ce7d0f50" + sha256 cellar: :any, arm64_monterey: "2b96f7b0f8b586812621ca5711c4cc59d4916e69658ff7b95c11166730611069" + sha256 cellar: :any, sonoma: "d94a55b7f88f9cf03147ec862d25be282781c0c6fbcc6d2dbc1bd70ec0abfeb1" + sha256 cellar: :any, ventura: "e1adfa5622f3b5dfc3fe5832ae5a8b7241e914483654bbbd7dfc5fda4d90afa7" + sha256 cellar: :any, monterey: "9f009724d28dad411a65eae3aad260b7fdb26a4ea6d8fda2125b21350eff06ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "fadc30ccce380bdd39bd85a9c26b4a15a733feb0378fbbb3399618575f2156bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae7af3262f13d4917f84f0522cc36cc8709e482f458067578c6e58f0a26737ac" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() + { + ck_spinlock_t spinlock; + ck_spinlock_init(&spinlock); + return 0; + } + C + system ENV.cc, "-I#{include}", "-L#{lib}", "-lck", + testpath/"test.c", "-o", testpath/"test" + system "./test" + end +end diff --git a/Formula/c/concurrentqueue.rb b/Formula/c/concurrentqueue.rb new file mode 100644 index 0000000000000..8134706c43ade --- /dev/null +++ b/Formula/c/concurrentqueue.rb @@ -0,0 +1,37 @@ +class Concurrentqueue < Formula + desc "Fast multi-producer, multi-consumer lock-free concurrent queue for C++11" + homepage "https://github.com/cameron314/concurrentqueue" + url "https://github.com/cameron314/concurrentqueue/archive/refs/tags/v1.0.4.tar.gz" + sha256 "87fbc9884d60d0d4bf3462c18f4c0ee0a9311d0519341cac7cbd361c885e5281" + license all_of: [ + { any_of: ["BSD-2-Clause", "BSL-1.0"] }, + "Zlib", + ] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "64a380746e2547d26f64b5ce8945cc4af4e0169a2dffdc89ebbb534dc5e0061e" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + moodycamel::ConcurrentQueue q; + q.enqueue(25); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/conda-lock.rb b/Formula/c/conda-lock.rb new file mode 100644 index 0000000000000..c386d17070e90 --- /dev/null +++ b/Formula/c/conda-lock.rb @@ -0,0 +1,306 @@ +class CondaLock < Formula + include Language::Python::Virtualenv + + desc "Lightweight lockfile for conda environments" + homepage "https://github.com/conda/conda-lock" + url "https://files.pythonhosted.org/packages/92/f9/f69356267a3ba56adb3ab531cb797990d32938532eaeb8097a09d4f8f681/conda_lock-3.0.4.tar.gz" + sha256 "7ba6f8067834b3aae8662ed6316c5f15def431f129ddf423f7957c6181523db6" + license "MIT" + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_tahoe: "56dcf5bde0e9b506de76bfebd2285ae10bcb18f9e348f1796dc4ff0401a91102" + sha256 cellar: :any, arm64_sequoia: "3f1519335e50c7b727b35708e80c6d3daf64534ef40ff48360c1273145d19675" + sha256 cellar: :any, arm64_sonoma: "9b69f09e352578597bf849cb3505424b9754d8411e62e9ffbc19c2038743a869" + sha256 cellar: :any, sonoma: "00c61284ee743b702e5c0b2f668ee429bc50e4acaa5f7b60ff24a0523a4bef97" + sha256 cellar: :any_skip_relocation, arm64_linux: "d54a8a95a462fbd6ae148329a2a0f5bd037726145bab07d20a6dfb50a2b874ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31678978edfd662e8d390e030763762bc987daff858251cb8f5ca1ba24893073" + end + + depends_on "micromamba" => :test + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "zstd" + + on_linux do + depends_on "cryptography" # for secretstorage + end + + pypi_packages exclude_packages: ["certifi", "cryptography", "pydantic-core"], + extra_packages: ["jeepney", "secretstorage", "xattr"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "boltons" do + url "https://files.pythonhosted.org/packages/63/54/71a94d8e02da9a865587fb3fff100cb0fc7aa9f4d5ed9ed3a591216ddcc7/boltons-25.0.0.tar.gz" + sha256 "e110fbdc30b7b9868cb604e3f71d4722dd8f4dcb4a5ddd06028ba8f1ab0b5ace" + end + + resource "build" do + url "https://files.pythonhosted.org/packages/25/1c/23e33405a7c9eac261dff640926b8b5adaed6a6eb3e1767d441ed611d0c0/build-1.3.0.tar.gz" + sha256 "698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397" + end + + resource "cachecontrol" do + url "https://files.pythonhosted.org/packages/58/3a/0cbeb04ea57d2493f3ec5a069a117ab467f85e4a10017c6d854ddcbff104/cachecontrol-0.14.3.tar.gz" + sha256 "73e7efec4b06b20d9267b441c1f733664f989fb8688391b670ca812d70795d11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "conda-package-streaming" do + url "https://files.pythonhosted.org/packages/35/7f/06f826c49dec99476795f6ceb072f340b8ffa4f13ee025033aab49a86379/conda_package_streaming-0.12.0.tar.gz" + sha256 "422b2ff81c41e509593f5ece478a85bac72b189a6d039a9b753c74ae07ea9eb9" + end + + resource "crashtest" do + url "https://files.pythonhosted.org/packages/6e/5d/d79f51058e75948d6c9e7a3d679080a47be61c84d3cc8f71ee31255eb22b/crashtest-0.4.1.tar.gz" + sha256 "80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "dulwich" do + url "https://files.pythonhosted.org/packages/d4/8b/0f2de00c0c0d5881dc39be147ec2918725fb3628deeeb1f27d1c6cf6d9f4/dulwich-0.22.8.tar.gz" + sha256 "701547310415de300269331abe29cb5717aa1ea377af826bf513d0adfb1c209b" + end + + resource "ensureconda" do + url "https://files.pythonhosted.org/packages/d4/80/49c5df6f90d1bad1d2b071c2f4937edb0cc9bd060ffef274bb16878a7a4f/ensureconda-1.6.0.tar.gz" + sha256 "52b3279cd48002cd0ed5f42a00dd1e4a9086a99d1fa68375e8920fde95f77738" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/20/b5/23b216d9d985a956623b6bd12d4086b60f0059b27799f23016af04a74ea1/fastjsonschema-2.21.2.tar.gz" + sha256 "b1eb43748041c880796cd077f1a07c3d94e93ae84bba5ed36800a33554ae05de" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "installer" do + url "https://files.pythonhosted.org/packages/05/18/ceeb4e3ab3aa54495775775b38ae42b10a92f42ce42dfa44da684289b8c8/installer-0.7.0.tar.gz" + sha256 "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pkginfo" do + url "https://files.pythonhosted.org/packages/24/03/e26bf3d6453b7fda5bd2b84029a426553bb373d6277ef6b5ac8863421f87/pkginfo-1.12.1.2.tar.gz" + sha256 "5cd957824ac36f140260964eba3c6be6442a8359b8c48f4adf90210f33a04b7b" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyproject-hooks" do + url "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz" + sha256 "1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "trove-classifiers" do + url "https://files.pythonhosted.org/packages/ca/9a/778622bc06632529817c3c524c82749a112603ae2bbcf72ee3eb33a2c4f1/trove_classifiers-2025.9.11.17.tar.gz" + sha256 "931ca9841a5e9c9408bc2ae67b50d28acf85bef56219b56860876dd1f2d024dd" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz" + sha256 "643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c" + end + + resource "xattr" do + url "https://files.pythonhosted.org/packages/08/d5/25f7b19af3a2cb4000cac4f9e5525a40bec79f4f5d0ac9b517c0544586a0/xattr-1.3.0.tar.gz" + sha256 "30439fabd7de0787b27e9a6e1d569c5959854cb322f64ce7380fedbfa5035036" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz" + sha256 "7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b" + end + + def install + without = ["zstandard"] + without += OS.mac? ? ["jeepney", "secretstorage"] : ["xattr"] + venv = virtualenv_install_with_resources(without:) + + resource("zstandard").stage do + system_zstd = "--config-settings=--build-option=--system-zstd" + system venv.root/"bin/python", "-m", "pip", "install", system_zstd, *std_pip_args(prefix: false), "." + end + + generate_completions_from_executable(bin/"conda-lock", shell_parameter_format: :click) + end + + test do + assert_equal "#{name}, version #{version}", shell_output("#{bin}/conda-lock --version").strip + + (testpath/"environment.yml").write <<~YAML + name: testenv + channels: + - conda-forge + dependencies: + - python=3.14 + YAML + system bin/"conda-lock", "-p", "osx-64", "-p", "osx-arm64", + "--conda", Formula["micromamba"].opt_bin/"mamba" + assert_path_exists testpath/"conda-lock.yml" + end +end diff --git a/Formula/c/conda-zsh-completion.rb b/Formula/c/conda-zsh-completion.rb new file mode 100644 index 0000000000000..033f85467142a --- /dev/null +++ b/Formula/c/conda-zsh-completion.rb @@ -0,0 +1,23 @@ +class CondaZshCompletion < Formula + desc "Zsh completion for conda" + homepage "https://github.com/conda-incubator/conda-zsh-completion" + url "https://github.com/conda-incubator/conda-zsh-completion/archive/refs/tags/v0.11.tar.gz" + sha256 "584d5817e276f01f5d789e01ba5c6688667b38d3c9f4ad2cd735a9901e27aa33" + license "WTFPL" + head "https://github.com/conda-incubator/conda-zsh-completion.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e960cb656df12a852dc6861e660084b853f1eeb3ab3acd8569d78ccb23f699d4" + end + + uses_from_macos "zsh" => :test + + def install + zsh_completion.install "_conda" + end + + test do + assert_match(/^_conda \(\) \{/, + shell_output("zsh -c 'fpath=(#{zsh_completion} $fpath); autoload _conda; which _conda'")) + end +end diff --git a/Formula/c/conduit.rb b/Formula/c/conduit.rb new file mode 100644 index 0000000000000..501e9c6126fec --- /dev/null +++ b/Formula/c/conduit.rb @@ -0,0 +1,48 @@ +class Conduit < Formula + desc "Streams data between data stores. Kafka Connect replacement. No JVM required" + homepage "https://conduit.io/" + url "https://github.com/ConduitIO/conduit/archive/refs/tags/v0.14.0.tar.gz" + sha256 "4747b7a8b1cce5a32490ff3bb9c31e0d0cb4a97da75e2d4f9f97a33af9a8c4f1" + license "Apache-2.0" + head "https://github.com/ConduitIO/conduit.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "118277b357cfc6c3d7f2696c118bb887d70dfed444d7b582da092cdd2108b62b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c73e20dfa33416ce64040037ca7598f323225b06bf11ff7d9caf0992e7bb0910" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "badd297ac7b2138dbdfcfb4fbe66459a7e5dac5fbeeb6f7d81ddeb919978ad94" + sha256 cellar: :any_skip_relocation, arm64_ventura: "53d9b586efdc7a2e87004979dc51313c4858388b9d8a3aab4610843cd0a83b82" + sha256 cellar: :any_skip_relocation, sonoma: "c3ca928abb6ada159254a94275ab9e9b7c67f2e310be6278ac24e590b340a724" + sha256 cellar: :any_skip_relocation, ventura: "cfed5653e00116ee2b17fab9b0678514fecef893e04e58de7b46bbbaf69d8338" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f3a72e785383509d2ea012a2a9502c3de4cebb273300693e38464d4a9dd259d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ce98054ac53225a6aa027d7b5929a116e13dce0bd82ea35887fb0b6c0913922" + end + + depends_on "go" => :build + + def install + system "make", "VERSION=#{version}" + bin.install "conduit" + end + + test do + assert_match version.to_s, shell_output("#{bin}/conduit --version") + + File.open("output.txt", "w") do |file| + # redirect stdout to the file + $stdout.reopen(file) + pid = spawn bin/"conduit", "run", "--api.enabled", "true", + "--api.grpc.address", ":0", + "--api.http.address", ":0" + sleep(5) + # Kill process + Process.kill("SIGKILL", pid) + end + assert_match "grpc API started", (testpath/"output.txt").read + assert_match "http API started", (testpath/"output.txt").read + end +end diff --git a/Formula/c/condure.rb b/Formula/c/condure.rb new file mode 100644 index 0000000000000..1cf7c6db9bafc --- /dev/null +++ b/Formula/c/condure.rb @@ -0,0 +1,117 @@ +class Condure < Formula + include Language::Python::Virtualenv + + desc "HTTP/WebSocket connection manager" + homepage "https://github.com/fanout/condure" + url "https://github.com/fanout/condure/archive/refs/tags/1.10.1.tar.gz" + sha256 "eb2df8e1a80d9fe4f66c41d2e9fbcd1205d8239ccd9b6cd914de5567356b7c70" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "2a4528aa522e4ddbe348f49b19bf850d4ed951fe83b1f79e7255c31bb306072d" + sha256 cellar: :any, arm64_sequoia: "92dcf182f721ba12441208f5bc9e30db1e4c7b9554fdf5171fe437908b0084aa" + sha256 cellar: :any, arm64_sonoma: "46afbd4ff699d9ce78a3d21d84ca4bdd00352224c8c52e886151507a1ec42b39" + sha256 cellar: :any, sonoma: "a4e7bb7e82ba9a4b56b5576fa2436afbdc08a249498eac340b79aac364186f79" + sha256 cellar: :any_skip_relocation, arm64_linux: "301e1520aa5aa53f17e491deea87faba6995fefa5e02d781c8b4540fe3a1dab5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c6e2d3e37b6cbbb3d4b6ca8a593e6760110bd181d4e0821f3041e90fc9c9859" + end + + # https://github.com/fanout/condure/commit/d70f63b6ed4b60e85fcbf4284a0eab964c94df38 + # project has been merged into [Pushpin](https://github.com/fastly/pushpin) + # The `pushpin-connmgr` program can be used as a drop-in substitute. + deprecate! date: "2025-01-10", because: :repo_archived, replacement_formula: "pushpin" + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "cython" => :test # use brew cython as building it in test can cause time out + depends_on "python@3.14" => :test + depends_on "openssl@3" + depends_on "zeromq" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/3a/33/1a3683fc9a4bd64d8ccc0290da75c8f042184a1a49c146d28398414d3341/pyzmq-25.1.2.tar.gz" + sha256 "93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + end + + resource "tnetstring3" do + url "https://files.pythonhosted.org/packages/d9/fd/737a371f539842f6fcece47bb6b941700c9f924e8543cd35c4f3a2e7cc6c/tnetstring3-0.3.1.tar.gz" + sha256 "5acab57cce3693d119265a8ac019a9bcdc52a9cacb3ba37b5b3a1746a1c14d56" + end + + # Apply Debian patch to fix build on arm64 linux + patch do + url "https://salsa.debian.org/rust-team/debcargo-conf/-/raw/de3f91dfb0ed10587e653ee1f96dca16d710eb5c/src/condure/debian/patches/fix-build-unsigned-char.diff" + sha256 "00ce6b20a13086fca07756d0aaa19c3280a411c29abb221cd8233f006bf0496e" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ipcfile = testpath/"client" + runfile = testpath/"test.py" + + python3 = "python3.14" + ENV.append_path "PYTHONPATH", Formula["cython"].opt_libexec/Language::Python.site_packages(python3) + venv = virtualenv_create(testpath/"vendor", python3) + venv.pip_install resources.reject { |r| r.name == "pyzmq" } + venv.pip_install(resource("pyzmq"), build_isolation: false) + + runfile.write <<~PYTHON + import threading + from urllib.request import urlopen + import tnetstring + import zmq + def server_worker(c): + ctx = zmq.Context() + sock = ctx.socket(zmq.REP) + sock.connect('ipc://#{ipcfile}') + c.acquire() + c.notify() + c.release() + while True: + m_raw = sock.recv() + req = tnetstring.loads(m_raw[1:]) + resp = {} + resp[b'id'] = req[b'id'] + resp[b'code'] = 200 + resp[b'reason'] = b'OK' + resp[b'headers'] = [[b'Content-Type', b'text/plain']] + resp[b'body'] = b'test response\\n' + sock.send(b'T' + tnetstring.dumps(resp)) + c = threading.Condition() + c.acquire() + server_thread = threading.Thread(target=server_worker, args=(c,)) + server_thread.daemon = True + server_thread.start() + c.wait() + c.release() + with urlopen('http://localhost:10000/test') as f: + body = f.read() + assert(body == b'test response\\n') + PYTHON + + pid = fork do + exec bin/"condure", "--listen", "10000,req", "--zclient-req", "ipc://#{ipcfile}" + end + + begin + system testpath/"vendor/bin/python3", runfile + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/c/confd.rb b/Formula/c/confd.rb new file mode 100644 index 0000000000000..6bc1e40e77146 --- /dev/null +++ b/Formula/c/confd.rb @@ -0,0 +1,65 @@ +class Confd < Formula + desc "Manage local application configuration files using templates" + homepage "https://github.com/kelseyhightower/confd" + url "https://github.com/kelseyhightower/confd/archive/refs/tags/v0.16.0.tar.gz" + sha256 "4a6c4d87fab77aa9827370541024a365aa6b4c8c25a3a9cab52f95ba6b9a97ea" + license "MIT" + head "https://github.com/kelseyhightower/confd.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e942ea00a80dc2d920a1f6bbee2903b81b82d3a0578e97f46ab169bad181a798" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51310afd5fe23174446bd8cec35b69abf7f13075e1035b714a700f40582d05f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4320090003f15247aa5f860a784bf57f9791b917aab9504f27b576f7b692e028" + sha256 cellar: :any_skip_relocation, arm64_ventura: "99f4686a6b8780c84e9382061d6b1538aab608d6e33e7e208aef6ec39f1f4b79" + sha256 cellar: :any_skip_relocation, arm64_monterey: "346a9185c6665e85a0b7a810cfdabb1cd397d628a58a40935028a39d3dac6da0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f2eb5cdb05b9f92b2472331857765f5b4922183d4cde23e61c44d7bb3d080dfe" + sha256 cellar: :any_skip_relocation, sonoma: "20ef434c3daa75110a05e2634555a72bc2ffe40a257b151d3f08e1e92dd88547" + sha256 cellar: :any_skip_relocation, ventura: "c98a1cbef3ada8032619ae238d2a83b61a743079f06e2a31f436f7e9bd08374f" + sha256 cellar: :any_skip_relocation, monterey: "ba0c1ddd10c298a6283a5d5bcad10304211a68b0d139e27f30c7ef34ae8d2aab" + sha256 cellar: :any_skip_relocation, big_sur: "8c337c7afdcf9d7bf7662f94d24fa326990e69344f6c23700ba2a5c0c540592e" + sha256 cellar: :any_skip_relocation, catalina: "34d59b3c47493cd00685c62997ac0385f52f90a5d99adb9ed5c98576c6c02452" + sha256 cellar: :any_skip_relocation, arm64_linux: "844a6849db16075e11b3679e03bfc034b52365c0ef44f341835d80c4fb965617" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a67a6ca1953e416e2d1278d6426f8c98e778d829cbff9485d6e12cddd0067b50" + end + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + (buildpath/"src/github.com/kelseyhightower/confd").install buildpath.children + cd "src/github.com/kelseyhightower/confd" do + system "go", "install", "github.com/kelseyhightower/confd" + bin.install buildpath/"bin/confd" + end + end + + test do + templatefile = testpath/"templates/test.tmpl" + templatefile.write <<~EOS + version = {{getv "/version"}} + EOS + + conffile = testpath/"conf.d/conf.toml" + conffile.write <<~TOML + [template] + prefix = "/" + src = "test.tmpl" + dest = "./test.conf" + keys = [ + "/version" + ] + TOML + + keysfile = testpath/"keys.yaml" + keysfile.write <<~YAML + version: v1 + YAML + + system bin/"confd", "-backend", "file", "-file", "keys.yaml", "-onetime", "-confdir=." + assert_path_exists testpath/"test.conf" + refute_predicate (testpath/"test.conf").size, :zero? + end +end diff --git a/Formula/c/config-file-validator.rb b/Formula/c/config-file-validator.rb new file mode 100644 index 0000000000000..cc513658888a7 --- /dev/null +++ b/Formula/c/config-file-validator.rb @@ -0,0 +1,32 @@ +class ConfigFileValidator < Formula + desc "CLI tool to validate different configuration file types" + homepage "https://boeing.github.io/config-file-validator/" + url "https://github.com/Boeing/config-file-validator/archive/refs/tags/v1.8.1.tar.gz" + sha256 "e7c50fded0e036ef56d2479a2fee1eba35ea7fd232a4ba7c98ab087e4ae521ed" + license "Apache-2.0" + head "https://github.com/Boeing/config-file-validator.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00d8fa20356bcbc53c4ef85a293cb05510901e713d8f33d3f4c5f260afc8551e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00d8fa20356bcbc53c4ef85a293cb05510901e713d8f33d3f4c5f260afc8551e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "00d8fa20356bcbc53c4ef85a293cb05510901e713d8f33d3f4c5f260afc8551e" + sha256 cellar: :any_skip_relocation, sonoma: "84aaa61b1cc799fe5cee90dab4f458f5630912e27e5d1209f7232f49d9082afb" + sha256 cellar: :any_skip_relocation, arm64_linux: "931710a4e774c8dc61d225089715b7bedfff3086713b09c1251eb1e8b612b5c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0bcb1d4be243ae3e6606946650aec179de717df9e26654867e850993f66fbc2" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/Boeing/config-file-validator.version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"validator"), "./cmd/validator" + end + + test do + assert_match version.to_s, shell_output("#{bin}/validator -version") + + test_file = testpath/"test.json" + test_file.write('{"valid": "json"}') + assert_match "✓ #{test_file}", shell_output("#{bin}/validator #{test_file}") + end +end diff --git a/Formula/c/configen.rb b/Formula/c/configen.rb new file mode 100644 index 0000000000000..1c449813311a8 --- /dev/null +++ b/Formula/c/configen.rb @@ -0,0 +1,56 @@ +class Configen < Formula + desc "Configuration file code generator for use in Xcode projects" + homepage "https://github.com/theappbusiness/ConfigGenerator" + url "https://github.com/theappbusiness/ConfigGenerator/archive/refs/tags/1.1.2.tar.gz" + sha256 "24a0d51f90b36d56c2f75ced9653cf34fe396fd687305903b31eeb822d520608" + license "MIT" + head "https://github.com/theappbusiness/ConfigGenerator.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6065f7176f6749015d33a8b03a07fd9d4274686f797b8aadc81e2632669b242c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4afca8fd4567771c799d14425f4085ddc23a1ca5f89e32890dba233919e3ae9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5af8473413de2042d5216b397e93a126cb21577eafbcab7bbe3657047c676de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1c460c8a01dbdd8cccb66749dea6543bb63430129ea4717ecc9a03e27b6674bd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a677709fb477a2e97d7791393044062418f5143928cf69d2d373e075c1209cc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d7aa87ea082759093c1192bf7e0ee69c1146ef4626534731ff506a83ec682641" + sha256 cellar: :any_skip_relocation, sonoma: "bd5e05cf96b07a4b0e59472fcbab58190b321cda1584cf5b3801e941c3ca11e0" + sha256 cellar: :any_skip_relocation, ventura: "ef53a9ef9dc4b97d7d735ba7b75663734b4f4d84020610ffb724bb3bd2ceaafb" + sha256 cellar: :any_skip_relocation, monterey: "3fde28a899b11fd837c3d30b27b26485a1e33f7bf951fe469d7fe8ea6ec41e0b" + sha256 cellar: :any_skip_relocation, big_sur: "78a7c0604f2a98b2f488b2bfefebff47e08342e69d5f47b7123f15f71bcb9653" + sha256 cellar: :any_skip_relocation, catalina: "9bdb2988618d5a1e9291a8579207d9dad1092f377d29d13af68cf6ef5afcb202" + end + + depends_on xcode: ["10.2", :build] + depends_on :macos + + def install + xcodebuild "-arch", Hardware::CPU.arch, "SYMROOT=build", "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/configen" + end + + test do + (testpath/"test.plist").write <<~XML + + + + + testURL + https://example.com/api + retryCount + 2 + + + XML + + (testpath/"test.map").write <<~EOS + testURL : URL + retryCount : Int + EOS + system bin/"configen", "-p", "test.plist", "-h", "test.map", "-n", "AppConfig", "-o", testpath + assert_path_exists testpath/"AppConfig.swift", "Failed to create config class!" + assert_match "static let testURL: URL = URL(string: \"https://example.com/api\")", File.read("AppConfig.swift") + assert_match "static let retryCount: Int = 2", File.read("AppConfig.swift") + end +end diff --git a/Formula/c/conftest.rb b/Formula/c/conftest.rb new file mode 100644 index 0000000000000..c8d0335a6d026 --- /dev/null +++ b/Formula/c/conftest.rb @@ -0,0 +1,35 @@ +class Conftest < Formula + desc "Test your configuration files using Open Policy Agent" + homepage "https://www.conftest.dev/" + url "https://github.com/open-policy-agent/conftest/archive/refs/tags/v0.63.0.tar.gz" + sha256 "eb182a93a0d58533bbfc3d50e3c64bf825426c65511a45f3a8f8ef995cbff6ae" + license "Apache-2.0" + head "https://github.com/open-policy-agent/conftest.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "06b90408a016d5e90a11f97f59890f4ecec26d9fe71ac1c299b33c4c14671b9c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9775c12b8041da285ea8a497dba7b0d3373b74461b57bf14239f84a6e811c2b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b34f54d3055277e9bc8cdd15bbf81bf1b6426a1e0e3073d88c7175d58a4cea56" + sha256 cellar: :any_skip_relocation, sonoma: "c28970942ab7e31e1bb5d4d7205454749058a87c437e388b072130c16d5af82f" + sha256 cellar: :any_skip_relocation, arm64_linux: "75f65e553044f0b35df573c059af0ff4fa8594de28171064a79b85ae8427afb1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff739d08b8a7fa4a052bd3296ac37c48221a3ca7237d525528ca996a268c8862" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/open-policy-agent/conftest/internal/commands.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"conftest", "completion") + end + + test do + assert_match "Test your configuration files using Open Policy Agent", shell_output("#{bin}/conftest --help") + + # Using the policy parameter changes the default location to look for policies. + # If no policies are found, a non-zero status code is returned. + (testpath/"test.rego").write("package main") + system bin/"conftest", "verify", "-p", "test.rego" + end +end diff --git a/Formula/c/confuse.rb b/Formula/c/confuse.rb new file mode 100644 index 0000000000000..8922e6c61a240 --- /dev/null +++ b/Formula/c/confuse.rb @@ -0,0 +1,57 @@ +class Confuse < Formula + desc "Configuration file parser library written in C" + homepage "https://github.com/libconfuse/libconfuse" + url "https://github.com/libconfuse/libconfuse/releases/download/v3.3/confuse-3.3.tar.xz" + sha256 "1dd50a0320e135a55025b23fcdbb3f0a81913b6d0b0a9df8cc2fdf3b3dc67010" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8c9faf9f2e1e5d1d0745acf79b46347b499053b9bcba4e4f4f89296bd5f8aad3" + sha256 cellar: :any, arm64_sequoia: "4a559294bf3ec51132b479ee9b90c5e90dea6183c11707471b89a4d06b0ab371" + sha256 cellar: :any, arm64_sonoma: "6d46500c283c20fcf41348fc34293d30a85e0fac9955ea849369deeaf84b3a2b" + sha256 cellar: :any, arm64_ventura: "1c7aa3d075082f2742747ac5034f60c90b448c694ccc5b3330b71f1afdd81f81" + sha256 cellar: :any, arm64_monterey: "633330ab55c7992ac1a9dcb3d990029d1445aab0d3e5c3a8c5759af2554b33d4" + sha256 cellar: :any, arm64_big_sur: "1eeec2cb7b54cf11c1e13448f191ed97d4f2477c215130b6402256678019f36e" + sha256 cellar: :any, sonoma: "38fa9c049ceed5cb948bb4c113f0c394a713873cb942f9e3ff97b6e40730927d" + sha256 cellar: :any, ventura: "5a520e7ca6ac3a7260b385c7e47cb144f888df00125a9300647b29abe4a732e9" + sha256 cellar: :any, monterey: "bcdcdab60caa250aa1a5b38346dda7bd0a88ffb6359d73d8fab8aa046d5bc2fe" + sha256 cellar: :any, big_sur: "370cd5df07249d44cbf0a848001be19d41341f404d229dcdcb3b5ae6ead4300c" + sha256 cellar: :any, catalina: "13ad01ca606e746ab7f6bcd42b0da08abdcc29ccaaa9e8106f9d28bfe96bffd7" + sha256 arm64_linux: "0be4562183f1ec990e0a9f2e082e82528048a0261b292013a8fc5b3f06e4b7db" + sha256 x86_64_linux: "a5fbe815c75f10344684dab03501ecab39cec4b157e46d955f6e2c70062d120b" + end + + depends_on "pkgconf" => :build + + def install + system "./configure", *std_configure_args + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + cfg_opt_t opts[] = + { + CFG_STR("hello", NULL, CFGF_NONE), + CFG_END() + }; + + int main(void) + { + cfg_t *cfg = cfg_init(opts, CFGF_NONE); + if (cfg_parse_buf(cfg, "hello=world") == CFG_SUCCESS) + printf("%s\\n", cfg_getstr(cfg, "hello")); + cfg_free(cfg); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lconfuse", "-o", "test" + assert_match "world", shell_output("./test") + end +end diff --git a/Formula/c/conman.rb b/Formula/c/conman.rb new file mode 100644 index 0000000000000..c3b459adf6ac4 --- /dev/null +++ b/Formula/c/conman.rb @@ -0,0 +1,61 @@ +class Conman < Formula + desc "Serial console management program supporting a large number of devices" + homepage "https://github.com/dun/conman" + url "https://github.com/dun/conman/archive/refs/tags/conman-0.3.1.tar.gz" + sha256 "cd47d3d9a72579b470dd73d85cd3fec606fa5659c728ff3c1c57e970f4da72a2" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "3e0eeafbb0e2a0f4be6952f0a557232cf2ab06d7316fe798202562e7c1af9eb4" + sha256 arm64_sequoia: "1173da53dd141c2960aea7c848be0ea4c65897ba0c47e5549656f4142879e2c0" + sha256 arm64_sonoma: "12e867d583636858f7ed1b9feb145c2783448252837b0a384f22247f7c9ca605" + sha256 arm64_ventura: "a0be94a97c0d77a9078b71d6f7be6066c5ba7f0fbb43d9c129a014804b4221f0" + sha256 arm64_monterey: "3a7279a18eaecf1db5ce2308b7e3e534c58eb23dd8ab06767fdf003309551eac" + sha256 arm64_big_sur: "ba4ee04b659ea6b5663821a4a5262fe7e04cdb715fe216275f9b88c7305d80d2" + sha256 sonoma: "744c637c568d133c33075924f83f9c86b2dfcc3fee60c21fecc1144d9a0313dc" + sha256 ventura: "694da5ae8b52314bdf7500b9c266f122ea7507c6c3f3355d329e4b13f8c9c6db" + sha256 monterey: "e18ed06db8ac7678344e9c55726026570a350b80f8d771b24fa14ec87547d85b" + sha256 big_sur: "d589fec5d6868bd0437e053d6cacbb739716033735fa6a2d5f5e4dda70a8eae5" + sha256 arm64_linux: "b5e5d177019a93e60a157a8662ee5fcd5a40100d6472cfcb22707c985808494c" + sha256 x86_64_linux: "af3f62841fa09e43d3e42e41f7a1d5eaaa57112851b87221ea46a96a0fad6d52" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "freeipmi" + + def install + system "./bootstrap" + system "./configure", *std_configure_args, "--disable-silent-rules", "--sysconfdir=#{etc}" + system "make", "install" + inreplace pkgshare.glob("examples/*.exp"), "/usr/share/", "#{opt_share}/" + end + + def caveats + <<~EOS + Before starting the conmand service, configure some consoles in #{etc}/conman.conf. + EOS + end + + service do + run [opt_sbin/"conmand", "-F", "-c", etc/"conman.conf"] + keep_alive true + end + + test do + assert_match "conman-#{version}", shell_output("#{bin}/conman -V 2>&1") + assert_match "conman-#{version} FREEIPMI", shell_output("#{sbin}/conmand -V 2>&1") + + conffile = testpath/"conman.conf" + conffile.write <<~EOS + console name="test-sleep1" dev="/bin/sleep 30" + console name="test-sleep2" dev="/bin/sleep 30" + EOS + + fork { exec "#{sbin}/conmand", "-F", "-c", conffile } + sleep 5 + assert_match(/test-sleep\d\ntest-sleep\d\n/, shell_output("#{bin}/conman -q 2>&1")) + end +end diff --git a/Formula/c/conmon.rb b/Formula/c/conmon.rb new file mode 100644 index 0000000000000..4fcb24d6a0b24 --- /dev/null +++ b/Formula/c/conmon.rb @@ -0,0 +1,29 @@ +class Conmon < Formula + desc "OCI container runtime monitor" + homepage "https://github.com/containers/conmon" + url "https://github.com/containers/conmon/archive/refs/tags/v2.1.13.tar.gz" + sha256 "350992cb2fe4a69c0caddcade67be20462b21b4078dae00750e8da1774926d60" + license "Apache-2.0" + head "https://github.com/containers/conmon.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "9090fd08bb3338252d8e29fa36aa5d06bdc6a3f5dd75a00bdaa83c565fe8860f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "125e9b47951f23df145b1c27f6836cde4b0930547844929479b988ec01f61138" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "libseccomp" + depends_on :linux + depends_on "systemd" + + def install + system "make", "install", "PREFIX=#{prefix}", "LIBEXECDIR=#{libexec}" + end + + test do + assert_match "conmon: Container ID not provided. Use --cid", shell_output("#{bin}/conmon 2>&1", 1) + end +end diff --git a/Formula/c/connect.rb b/Formula/c/connect.rb new file mode 100644 index 0000000000000..80aaa74edb69e --- /dev/null +++ b/Formula/c/connect.rb @@ -0,0 +1,41 @@ +class Connect < Formula + desc "Provides SOCKS and HTTPS proxy support to SSH" + homepage "https://github.com/gotoh/ssh-connect" + url "https://github.com/gotoh/ssh-connect/archive/refs/tags/1.105.tar.gz" + sha256 "96c50fefe7ecf015cf64ba6cec9e421ffd3b18fef809f59961ef9229df528f3e" + license "GPL-2.0-or-later" + head "https://github.com/gotoh/ssh-connect.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5bd03526673481e20e14cd61063eaa3592fc7731b79e6c656467328eceaf8238" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "576b1a89b5a70f0a4dc4545f97662550db8c16d6c4f064cd51ade4dcea550b6c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7176837fc0b291396e82f4915fdea4b4255c0181faa541e6fe9f21f0b8fed74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25da554388b8d7ccd2dd52576434f92ab8628120d6ba7389959b5e71e9483b97" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e45ad845a768453d0d0dc278dc9fb39f3a7601f33b79d8c1b5d8e404f1dc3377" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "33e6c06bbe902eea4790679f99c9aef340cce1e647238a13c151300afa46ee1a" + sha256 cellar: :any_skip_relocation, sonoma: "8f8bbad21f93b510add271f6f1075807264dfcd93abcfd5da7e3faa9d32338a8" + sha256 cellar: :any_skip_relocation, ventura: "768f3960aaffa61d2b6ff11169d90eed94e3a189c6d5c69fb6d176b7d97c8d4d" + sha256 cellar: :any_skip_relocation, monterey: "087274a2b2cd22db73d094b35dbb04389fabe7ce7b3d5d68a18a877bdbf50ac1" + sha256 cellar: :any_skip_relocation, big_sur: "90d0c91146180552a3a023ceba3850804139eb30b146151efe9c6d889ab9c99d" + sha256 cellar: :any_skip_relocation, catalina: "a08dfce847d75746d2b31ed3561e961fdcf950b051c5860e6d137ff5e1bcd1c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "1346ceb5b2146940e418e2a95a04d071eda3b97ec0f287231d05856f59639d70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69ef58829a226ee7573f34e1b8a6282a7f26dfb8d730700eeff992f65a8f84ac" + end + + def install + system "make" + bin.install "connect" + end + + test do + system bin/"connect" + end +end diff --git a/Formula/c/conserver.rb b/Formula/c/conserver.rb new file mode 100644 index 0000000000000..467a2a94e624a --- /dev/null +++ b/Formula/c/conserver.rb @@ -0,0 +1,49 @@ +class Conserver < Formula + desc "Allows multiple users to watch a serial console at the same time" + homepage "https://www.conserver.com/" + url "https://github.com/bstansell/conserver/releases/download/v8.2.7/conserver-8.2.7.tar.gz" + sha256 "0607f2147a4d384f1e677fbe4e6c68b66a3f015136b21bcf83ef9575985273d8" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "441d8801740d8c42e668c2f308fb4d03098c196b004deed51a7bed08dbf0bb3f" + sha256 cellar: :any, arm64_sequoia: "1d058954be5b4a37f181a78bcff594873c263c8173ba390161dd1a26be990260" + sha256 cellar: :any, arm64_sonoma: "6070a08f377c33c31c8aea3edabfdeb4c9bdf830c6d4a6586ee44b0444d47eda" + sha256 cellar: :any, arm64_ventura: "74dc851dc7fbf69e4ef2dd38eb0d60f6741a16cb2a22d0d963d26aca9dc8c5ca" + sha256 cellar: :any, arm64_monterey: "52680e8e2d323b4cde6de75a037d04e729c4321b238135ac58a7565fced2bd5b" + sha256 cellar: :any, sonoma: "ae11c71a862224b9c9543f9f7260ce46a4e99e217394686df0349ebe9535fd03" + sha256 cellar: :any, ventura: "6a0660b32b3125db2e2606e0bcbe3c1bb20b736d992965d23a833e51c584eca9" + sha256 cellar: :any, monterey: "17d0fb890c0930ee9754f6e9689b3b7f311172a163b43aa4d2722a25627257d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "621d9c50cfade726658698f2deb892540cc0cd5c4d3cc5d1733c7f5fd13cfb43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2df28d58e8e82327adc6b6a0b60bd10f6d92d17eb918668a72ceea68ae8f952b" + end + + depends_on "openssl@3" + + uses_from_macos "krb5" + uses_from_macos "libxcrypt" + + conflicts_with "uffizzi", because: "both install `console` binaries" + + def install + system "./configure", "--prefix=#{prefix}", "--with-openssl", "--with-ipv6", "--with-gssapi", "--with-striprealm" + system "make" + system "make", "install" + end + + test do + console = fork do + exec bin/"console", "-n", "-p", "8000", "test" + end + sleep 1 + Process.kill("TERM", console) + end +end diff --git a/Formula/c/console_bridge.rb b/Formula/c/console_bridge.rb new file mode 100644 index 0000000000000..55cb793a52ade --- /dev/null +++ b/Formula/c/console_bridge.rb @@ -0,0 +1,55 @@ +class ConsoleBridge < Formula + desc "Robot Operating System-independent package for logging" + homepage "https://wiki.ros.org/console_bridge/" + url "https://github.com/ros/console_bridge/archive/refs/tags/1.0.2.tar.gz" + sha256 "303a619c01a9e14a3c82eb9762b8a428ef5311a6d46353872ab9a904358be4a4" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3a7225a144262d03cbc7d58b1eb2494c190060d9c1b4d3dbc36507c3911dbc37" + sha256 cellar: :any, arm64_sequoia: "4e7abd68f93d725996578fc7af640e0403cb35142fabc9654177802ea92f7903" + sha256 cellar: :any, arm64_sonoma: "826ec53bb4f99a675cc5e7deb5fa6823690af3983ab80f2fe01d46d3a9c1577b" + sha256 cellar: :any, arm64_ventura: "e4e12d390436e00eeaeda56b85f5f575dc89f8f9f412b39e59f42f34b4c66610" + sha256 cellar: :any, arm64_monterey: "1b5e67f0fda0825deb5642b40c0b980ee38f04125c6b312e4d64a4c9e80c9f5e" + sha256 cellar: :any, arm64_big_sur: "c5518eeec5ec1bbf97b9079e07fdd9723521f9db974f000f86f2857160d35ffd" + sha256 cellar: :any, sonoma: "507b02bd48a829824c07978c45c184fc16e8ac72a5221cc77bcc47b709d7d4a0" + sha256 cellar: :any, ventura: "65e60c19d1083cde663749983a1555e7389fba22756e97dd06adbc6ae7e520d7" + sha256 cellar: :any, monterey: "0e109671b38bf1d36b7e42250c2510a262452b97bc97a0a4d8ecd9c151c41182" + sha256 cellar: :any, big_sur: "8baf855a418a19417acc6ede52912bb003c5108b782fcf9bc29402b21c6b09a7" + sha256 cellar: :any, catalina: "7bedc8fd46f9d2a3404e3736e7231a5e303f9418b9a73354ee09d60ee233e644" + sha256 cellar: :any_skip_relocation, arm64_linux: "497a00b597bdcb80058eb55536dede9ba832ab45d3c70c4f1554be27e54cea0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2beccdecabf5d8427ee97904c16ff9f0aa2fc7bb508971ebbe10c5b1b9a2389" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + # Fix build with CMake 4.0+. Remove on next release. + patch do + url "https://github.com/ros/console_bridge/commit/81ec67f6daf3cd19ef506e00f02efb1645597b9c.patch?full_index=1" + sha256 "b2746b536b72e391c1a37363a1d8e2203d50229057bf0767f3ceae8e57784a16" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + CONSOLE_BRIDGE_logDebug("Testing Log"); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs console_bridge").chomp.split + system ENV.cxx, "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/c/consul-backinator.rb b/Formula/c/consul-backinator.rb new file mode 100644 index 0000000000000..d04e14df58e3c --- /dev/null +++ b/Formula/c/consul-backinator.rb @@ -0,0 +1,39 @@ +class ConsulBackinator < Formula + desc "Consul backup and restoration application" + homepage "https://github.com/myENA/consul-backinator" + url "https://github.com/myENA/consul-backinator/archive/refs/tags/v1.6.6.tar.gz" + sha256 "b668801ca648ecf888687d7aa69d84c3f2c862f31b92076c443fdea77c984c58" + license "MPL-2.0" + head "https://github.com/myENA/consul-backinator.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ab0ec7b817355e3a6546b2b0d77026eb3c0bb22c99e7d5c582d8fb9d98b982df" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8839abd4d9ee77b2e2378c281bb982e4af742ea32996c592cbd70e39f882a131" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8dd6cbcb9488966e0c5452941ff2568e991cef265c705f3e20a465bb1346c238" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a382c9d7060ffefb09aa0aa62509ab46dddd90f9d65d0248bb6c75003869be3a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "aed17c5c263df3f56c445b9ed9416206802102d3cefbf38ab893f7237c94e622" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "579fbf5bed18b1db8efc3d97621580316dc3d2d903fe085be3cd3dbd3ef72930" + sha256 cellar: :any_skip_relocation, sonoma: "1b12b3e564f5f6de0d630fa46e944d7a24baf806a4ad5051a2812a68cd7fc4ef" + sha256 cellar: :any_skip_relocation, ventura: "409a9b3e6b4b37408200b6613c2d1e2bc1adbe49a83913330d19cbf525fa4841" + sha256 cellar: :any_skip_relocation, monterey: "541a6f16a60cca90b1f70c474d46b0a20bd6d9965e3190d60ae653983915c8bb" + sha256 cellar: :any_skip_relocation, big_sur: "f0289e669896c287102e265b0d164021c0eed4d0906d972d4b85df9084dd01a3" + sha256 cellar: :any_skip_relocation, catalina: "b984053374292f96bb3b095aa9338f15aa9962be4473f8eaaf64a43598f39c5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f6e773350096ff9841f971fd31552892b987271c04a1a887b39f953cd0d972f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5b914861d80658228a91c3946d85609b07a780a9747e0302ebd4be3a5d1ea94" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.appVersion=#{version}") + end + + test do + assert_equal version.to_s, shell_output("#{bin}/consul-backinator --version 2>&1").strip + + assert_match "[Error] Failed to backup key data:", + shell_output("#{bin}/consul-backinator backup 2>&1", 1) + end +end diff --git a/Formula/c/consul-template.rb b/Formula/c/consul-template.rb new file mode 100644 index 0000000000000..ff7df541fcfbb --- /dev/null +++ b/Formula/c/consul-template.rb @@ -0,0 +1,37 @@ +class ConsulTemplate < Formula + desc "Generic template rendering and notifications with Consul" + homepage "https://github.com/hashicorp/consul-template" + url "https://github.com/hashicorp/consul-template/archive/refs/tags/v0.41.3.tar.gz" + sha256 "d2a5d9dea3f34be634bc733be0ba1d8448cd341c93392efc187d36e97dd7c2f2" + license "MPL-2.0" + head "https://github.com/hashicorp/consul-template.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1889950f795aee8a149340d2dcf723352b3507e4d53fd3df648bd8e100122288" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1889950f795aee8a149340d2dcf723352b3507e4d53fd3df648bd8e100122288" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1889950f795aee8a149340d2dcf723352b3507e4d53fd3df648bd8e100122288" + sha256 cellar: :any_skip_relocation, sonoma: "75156483736f9da5b276b57c049de6b4df3dea713cab494ec5a9f718555cd78d" + sha256 cellar: :any_skip_relocation, arm64_linux: "843d9021bdc182bd9c404ec0be971997fd911b3d2efc767ab84427b84e8ab8ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "138cdf61a6ec80fc904a2288e863cdf4bc226c9c055651fa29488d47f4404d33" + end + + depends_on "go" => :build + + def install + project = "github.com/hashicorp/consul-template" + ldflags = %W[ + -s -w + -X #{project}/version.Name=consul-template + -X #{project}/version.GitCommit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + (testpath/"template").write <<~EOS + {{"homebrew" | toTitle}} + EOS + system bin/"consul-template", "-once", "-template", "template:test-result" + assert_equal "Homebrew", (testpath/"test-result").read.chomp + end +end diff --git a/Formula/c/container-canary.rb b/Formula/c/container-canary.rb new file mode 100644 index 0000000000000..f5a7ba70f4f3e --- /dev/null +++ b/Formula/c/container-canary.rb @@ -0,0 +1,48 @@ +class ContainerCanary < Formula + desc "Test and validate container requirements against versioned manifests" + homepage "https://github.com/NVIDIA/container-canary" + url "https://github.com/NVIDIA/container-canary/archive/refs/tags/v0.5.0.tar.gz" + sha256 "3f0ceab899931d221f4d88ca01783d98446198a04ce56c8065a111a78872cff6" + license "Apache-2.0" + head "https://github.com/NVIDIA/container-canary.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7f05da274de16c17ed5b55914e94aa49245b13947f2684c45bb38241a3b64923" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d8aa6baa36bc85bd7f15afc41f04bfd76098b1e9d5f682ea1ea35a2373db933" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e092b3c8ee848f790f0288d740df5b7f52148f017fb32701c58f8884970593f" + sha256 cellar: :any_skip_relocation, sonoma: "644611fee14fa1426fbf69f998a4090763e39542e957146c21b5f65d80cde033" + sha256 cellar: :any_skip_relocation, arm64_linux: "c605a4323c42a1525fda0f8c1252f9ded6731329219aeadf9c782751731339c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fa7d10e14e625b54c9b2ea110d3f4db00f62293f944c764f3b45257425ea6aa" + end + + depends_on "go" => :build + depends_on "docker" => :test + + def install + ldflags = %W[ + -s -w + -X github.com/nvidia/container-canary/internal.Version=#{version} + -X github.com/nvidia/container-canary/internal.Buildtime=#{Time.now.utc.iso8601} + -X github.com/nvidia/container-canary/internal.Commit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"canary") + + generate_completions_from_executable(bin/"canary", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + + resource "awesome_validator" do + url "https://raw.githubusercontent.com/NVIDIA/container-canary/refs/heads/main/examples/awesome.yaml" + sha256 "7f5e2f78df709d4179c1ae1b549669f80a4307c4f698080fac27efae96b02a42" + end + + assert_match version.to_s, shell_output("#{bin}/canary version 2>&1") + + testpath.install resource("awesome_validator") + test_image = "busybox:latest" + output = shell_output("#{bin}/canary validate --file awesome.yaml #{test_image} 2>&1", 1) + assert_match "Error: Docker requires root privileges to run", output + end +end diff --git a/Formula/c/container-compose.rb b/Formula/c/container-compose.rb new file mode 100644 index 0000000000000..718514bf1e564 --- /dev/null +++ b/Formula/c/container-compose.rb @@ -0,0 +1,27 @@ +class ContainerCompose < Formula + desc "Manage Apple Container with Docker Compose files" + homepage "https://github.com/mcrich23/container-compose" + url "https://github.com/Mcrich23/container-compose/archive/refs/tags/0.5.0.tar.gz" + sha256 "6a89d3c388762cf20a0ba421cf9096dd9995952083131decd9b06fdc87380d9e" + license "MIT" + head "https://github.com/mcrich23/container-compose.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "0d34c45230d457ddb5cc2398256e90e43eb37a5d01f00d97a432f6fe7e896fc3" + end + + depends_on xcode: ["26.0", :build] + depends_on arch: :arm64 + depends_on macos: :sequoia + depends_on :macos + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/container-compose" + end + + test do + output = shell_output("#{bin}/container-compose down 2>&1", 1) + assert_match "compose.yml not found at #{testpath}", output + end +end diff --git a/Formula/c/container-diff.rb b/Formula/c/container-diff.rb new file mode 100644 index 0000000000000..c2c65ec7d1418 --- /dev/null +++ b/Formula/c/container-diff.rb @@ -0,0 +1,35 @@ +class ContainerDiff < Formula + desc "Diff your Docker containers" + homepage "https://github.com/GoogleContainerTools/container-diff" + url "https://github.com/GoogleContainerTools/container-diff/archive/refs/tags/v0.19.0.tar.gz" + sha256 "ba369effbe0d9f556cbcdadd5882eeb6346a105c11e5f07ffccb7e834cadefe6" + license "Apache-2.0" + head "https://github.com/GoogleContainerTools/container-diff.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2898b404cdcdb47d75ad4069400f5d2d3d05ae2f75a94992c85ba0cb413a050" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "70cfaa088dfd3e673531d526e3ee2d5944c9053d072e02bad34c54a4bfc52fad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f6a6f3491565f8c9b363cefd180da62191b2195b880f5ac9a16301c16466800" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e010839ef7bb91c0e7b3ab6ee2d98026c9a0388a9aa67e8015c6a7b3df3df755" + sha256 cellar: :any_skip_relocation, sonoma: "560bf523cf4f39b7c1998e32890701a84bcaefa91e0e5ef4f05f42fec3ee630c" + sha256 cellar: :any_skip_relocation, ventura: "7756cf737cf1e62421dcc1e22e2e3cac47ecf36a9c795a334ba63a25b7e1ab8b" + sha256 cellar: :any_skip_relocation, monterey: "04e68045306c93d183aa5724a64519e14afa6e04512039e455e9cc7b855b4d53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47f4eb5a2a2d4663d512ba9fefca353f0508c9234e181d4a51d9d8dc0015bd7e" + end + + deprecate! date: "2024-04-05", because: :repo_archived + disable! date: "2025-04-08", because: :repo_archived + + depends_on "go" => :build + + def install + pkg = "github.com/GoogleContainerTools/container-diff/version" + system "go", "build", *std_go_args(ldflags: "-s -w -X #{pkg}.version=#{version}") + end + + test do + image = "daemon://gcr.io/google-appengine/golang:2018-01-04_15_24" + output = shell_output("#{bin}/container-diff analyze #{image} 2>&1", 1) + assert_match "error retrieving image daemon://gcr.io/google-appengine/golang:2018-01-04_15_24", output + end +end diff --git a/Formula/c/container-structure-test.rb b/Formula/c/container-structure-test.rb new file mode 100644 index 0000000000000..5502738694f05 --- /dev/null +++ b/Formula/c/container-structure-test.rb @@ -0,0 +1,66 @@ +class ContainerStructureTest < Formula + desc "Validate the structure of your container images" + homepage "https://github.com/GoogleContainerTools/container-structure-test" + url "https://github.com/GoogleContainerTools/container-structure-test/archive/refs/tags/v1.21.1.tar.gz" + sha256 "e29075885dac64ae88ef44d6d37b6f8f7e1cf6aa6cb298f641ce96fc279270bc" + license "Apache-2.0" + head "https://github.com/GoogleContainerTools/container-structure-test.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26c63631775802c40ec12552e68fb579894b0bbd9ff5064924d479650f613c06" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "26c63631775802c40ec12552e68fb579894b0bbd9ff5064924d479650f613c06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26c63631775802c40ec12552e68fb579894b0bbd9ff5064924d479650f613c06" + sha256 cellar: :any_skip_relocation, sonoma: "6b1ca5ac1b3121bdc1e9e8f1863f73e4096d43f120f2dcdac202c241d1a03520" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa26ede2c6eef7a15882029892e8719407487e80e3fb968bddad65ac4e89348a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c3b923e12b6368b5a1991186d56cbae3db6a19f2fa1134bdd4a23b6d548560c" + end + + depends_on "go" => :build + + def install + project = "github.com/GoogleContainerTools/container-structure-test" + ldflags = %W[ + -s -w + -X #{project}/pkg/version.version=#{version} + -X #{project}/pkg/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/container-structure-test" + end + + test do + # Small Docker image to run tests against + resource "homebrew-test_resource" do + url "https://gist.github.com/AndiDog/1fab301b2dbc812b1544cd45db939e94/raw/5160ab30de17833fdfe183fc38e4e5f69f7bbae0/busybox-1.31.1.tar", using: :nounzip + sha256 "ab5088c314316f39ff1d1a452b486141db40813351731ec8d5300db3eb35a316" + end + + (testpath/"test.yml").write <<~YAML + schemaVersion: "2.0.0" + + fileContentTests: + - name: root user + path: "/etc/passwd" + expectedContents: + - "root:x:0:0:root:/root:/bin/sh\\n.*" + + fileExistenceTests: + - name: Basic executable + path: /bin/test + shouldExist: yes + permissions: '-rwxr-xr-x' + YAML + + args = %w[ + --driver tar + --json + --image busybox-1.31.1.tar + --config test.yml + ].join(" ") + + resource("homebrew-test_resource").stage testpath + json_text = shell_output("#{bin}/container-structure-test test #{args}") + res = JSON.parse(json_text) + assert_equal res["Pass"], 2 + assert_equal res["Fail"], 0 + end +end diff --git a/Formula/c/container.rb b/Formula/c/container.rb new file mode 100644 index 0000000000000..e7b0b0b649bd8 --- /dev/null +++ b/Formula/c/container.rb @@ -0,0 +1,92 @@ +class Container < Formula + desc "Create and run Linux containers using lightweight virtual machines" + homepage "https://apple.github.io/container/documentation/" + url "https://github.com/apple/container/archive/refs/tags/0.6.0.tar.gz" + sha256 "c402f0ad004a613721806919b1981a778b6bbffc5d8d5b51367a698db2c8c0f0" + license "Apache-2.0" + head "https://github.com/apple/container.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "5678bca5c30245424555b8ececbb3c69dc003144aed0d6344c6dd8380a43ae0c" + end + + depends_on xcode: ["26.0", :build] + depends_on arch: :arm64 + depends_on macos: :tahoe + depends_on :macos + + def install + if build.head? + ENV["GIT_COMMIT"] = Utils.git_head + else + ENV["RELEASE_VERSION"] = version + end + + # Replace variable install root path with Homebrew prefix + inreplace [ + "./Sources/ContainerCommands/Application.swift", + "./Sources/ContainerCommands/DefaultCommand.swift", + "./Sources/ContainerPlugin/InstallRoot.swift", + ] do |s| + s.gsub!("CommandLine.executablePathUrl", + "URL(fileURLWithPath: \"#{prefix}\")") + s.gsub!(/\n\s*\.deletingLastPathComponent\(\)/, "") + s.gsub!(/\n\s*\.appendingPathComponent\(".."\)/, "") + end + + system "swift", "build", "--disable-sandbox", "--configuration", "release" + + release_dir = buildpath/".build/release" + + bin.install release_dir/"container" + bin.install release_dir/"container-apiserver" + libexec.install "scripts/ensure-container-stopped.sh" + + # Container requires binaries and plugins to be signed with specific entitlements + codesign "--identifier=com.apple.container.cli", bin/"container" + codesign "--identifier=com.apple.container.apiserver", bin/"container-apiserver" + + [ + "container-core-images", + "container-network-vmnet", + "container-runtime-linux", + ].each do |plugin| + (libexec/"container-plugins/#{plugin}/bin").install release_dir/plugin + (libexec/"container-plugins/#{plugin}").install "config/#{plugin}-config.json" => "config.json" + + entitlement_args = [] + entitlement_args << "--entitlements=signing/#{plugin}.entitlements" if plugin != "container-core-images" + + codesign "--prefix=com.apple.container.", *entitlement_args, libexec/"container-plugins/#{plugin}/bin/#{plugin}" + end + + generate_completions_from_executable bin/"container", "--generate-completion-script" + end + + def codesign(*args) + system "/usr/bin/codesign", "-f", "-s", "-", *args + end + + # container APIs aren't guaranteed to be backward compatible, + # so we stop the system service to ensure no components are out of sync. + # Ref: https://github.com/apple/container/issues/551#issuecomment-3246928923 + def post_install + system libexec/"ensure-container-stopped.sh" + end + + service do + run [opt_bin/"container", "system", "start"] + keep_alive true + working_dir var + log_path var/"log/container.log" + error_log_path var/"log/container.log" + end + + test do + # Cannot fully test, as it needs to write outside testpath + assert_match version.to_s, shell_output("#{bin}/container --version") + + output = "Error: interrupted: \"internalError: \"failed to list containers\"" + assert_match output, shell_output("#{bin}/container list 2>&1", 1) + end +end diff --git a/Formula/c/contentful-cli.rb b/Formula/c/contentful-cli.rb new file mode 100644 index 0000000000000..8964495f89d5d --- /dev/null +++ b/Formula/c/contentful-cli.rb @@ -0,0 +1,30 @@ +class ContentfulCli < Formula + desc "Contentful command-line tools" + homepage "https://github.com/contentful/contentful-cli" + url "https://registry.npmjs.org/contentful-cli/-/contentful-cli-3.9.12.tgz" + sha256 "0d08e949d2b7b895609ca406d6ae04ec83f4af35b102c1e8e3828ac2fdcfd6f9" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b47c2cca69ffed0a4b4ca27e8671e411b1f7df37eb856b51bedc00afddaaef02" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b47c2cca69ffed0a4b4ca27e8671e411b1f7df37eb856b51bedc00afddaaef02" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b47c2cca69ffed0a4b4ca27e8671e411b1f7df37eb856b51bedc00afddaaef02" + sha256 cellar: :any_skip_relocation, sonoma: "b47c2cca69ffed0a4b4ca27e8671e411b1f7df37eb856b51bedc00afddaaef02" + sha256 cellar: :any_skip_relocation, arm64_linux: "b47c2cca69ffed0a4b4ca27e8671e411b1f7df37eb856b51bedc00afddaaef02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee916dcc28ce5414e501f8b690f45d0526bf323b9d08496b749d294409ab6c77" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/contentful space list 2>&1", 1) + assert_match "🚨 Error: You have to be logged in to do this.", output + assert_match "You can log in via contentful login", output + assert_match "Or provide a management token via --management-token argument", output + end +end diff --git a/Formula/c/context7-mcp.rb b/Formula/c/context7-mcp.rb new file mode 100644 index 0000000000000..5fbfa74c2d780 --- /dev/null +++ b/Formula/c/context7-mcp.rb @@ -0,0 +1,28 @@ +class Context7Mcp < Formula + desc "Up-to-date code documentation for LLMs and AI code editors" + homepage "https://github.com/upstash/context7" + url "https://registry.npmjs.org/@upstash/context7-mcp/-/context7-mcp-1.0.26.tgz" + sha256 "4d4be0443718ab0ff8ad9a1e172e8c5f01f0c77f4f00d8477e4baa4375113945" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9b0d37bf60eb023bb9403c0b63d285d1cb8b536c38242e9489b7b3074422df03" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + output = pipe_output(bin/"context7-mcp", json, 0) + assert_match "resolve-library-id", output + assert_match "get-library-docs", output + end +end diff --git a/Formula/c/convco.rb b/Formula/c/convco.rb new file mode 100644 index 0000000000000..94cf972c7567b --- /dev/null +++ b/Formula/c/convco.rb @@ -0,0 +1,48 @@ +class Convco < Formula + desc "Conventional commits, changelog, versioning, validation" + homepage "https://convco.github.io" + url "https://github.com/convco/convco/archive/refs/tags/v0.6.2.tar.gz" + sha256 "6f8e58f8572a785e32d287cad80d174303a5db5abc4ce0cf50022e05125549dd" + license "MIT" + head "https://github.com/convco/convco.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a6b41d26f7fb4fbccc99373e356bd899e89d0e41f568c07182d5b1e5b2a18fdf" + sha256 cellar: :any, arm64_sequoia: "e1c093220b014473d3a149c15ae6b832e5bd00a29f53e4536e7e61c5f5d23fc7" + sha256 cellar: :any, arm64_sonoma: "8735477bfe61112d9b04356962c578a92ce2b446cb05086932e9ef8d2c452a28" + sha256 cellar: :any, arm64_ventura: "e66f77d70c4c03b8a9057b0bb1625bc299a53f6ff009df8360a337ec1295cc76" + sha256 cellar: :any, sonoma: "e43a535594de8583f7313f689d34110c44d8470848187d3996f1c3ec1ff91d0f" + sha256 cellar: :any, ventura: "cb1e5727f7cfee8c3a2c83e916cf870a99ee440d238727cc3d89c8d062eedc69" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a970e8d83d06d8484d388e474354b61c547792c1e27ed72ad2f8eb0d6008b80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "889fe4c5139b8dd815723ed30fad7566fdee06967247cfae99bf5604ec394991" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + + system "cargo", "install", "--no-default-features", *std_cargo_args + + bash_completion.install "target/completions/convco.bash" => "convco" + zsh_completion.install "target/completions/_convco" => "_convco" + fish_completion.install "target/completions/convco.fish" => "convco.fish" + end + + test do + system "git", "init" + system "git", "commit", "--allow-empty", "-m", "invalid" + assert_match(/FAIL \w+ first line doesn't match `\[optional scope\]: ` invalid\n/, + shell_output("#{bin}/convco check", 1).lines.first) + + # Verify that we are using the libgit2 library + linkage_with_libgit2 = (bin/"convco").dynamically_linked_libraries.any? do |dll| + next false unless dll.start_with?(HOMEBREW_PREFIX.to_s) + + File.realpath(dll) == (Formula["libgit2"].opt_lib/shared_library("libgit2")).realpath.to_s + end + assert linkage_with_libgit2, "No linkage with libgit2! Cargo is likely using a vendored version." + end +end diff --git a/Formula/c/convertlit.rb b/Formula/c/convertlit.rb new file mode 100644 index 0000000000000..3a76cd1f8427c --- /dev/null +++ b/Formula/c/convertlit.rb @@ -0,0 +1,63 @@ +class Convertlit < Formula + desc "Convert Microsoft Reader format eBooks into open format" + homepage "http://www.convertlit.com/" + url "http://www.convertlit.com/clit18src.zip" + version "1.8" + sha256 "d70a85f5b945104340d56f48ec17bcf544e3bb3c35b1b3d58d230be699e557ba" + license "GPL-2.0-or-later" + + # The archive filenames don't use periods in the version, so we have to match + # the version from the link text. + livecheck do + url "http://www.convertlit.com/download.php" + regex(/href=.*?clit[._-]?v?\d+(?:\.\d+)*src\.zip[^>]+>\s*?Convert LIT v?(\d+(?:\.\d+)+)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0cfe39c84460ec28081f4e2fa92771253085837c8986d9d3121c573eb1a6a072" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "af81e33973b458225160387d713ab4646496719b4c0a3ae064dccf92c7e3efbd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0df27834c193ce4b6f3d17a63c072818bd667f2d98b653f166c024d3bdafbdb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "723db1f95f54e5f9003305056b3e67c5d2e6eb424fb18cc4e366a2dbe53756d4" + sha256 cellar: :any_skip_relocation, sonoma: "061b39d2c0b09a6bd68c6f1219b396e558cd4cbe8dcbaf64968079bb2c2a9253" + sha256 cellar: :any_skip_relocation, ventura: "47c22a8704d183095db27702edb6dbe248f4cbf88b3aeb788ea2686656ddf05a" + sha256 cellar: :any_skip_relocation, arm64_linux: "28b8504282e33b2b346b2bc88313fcaac3d9525327d576341adb40b7da58b0af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9e0dbeb09435b5d6c8a8f0e728d345185e14bb1bd4a799c05a1cefde6938046" + end + + depends_on "libtommath" + + def install + # Workaround for Xcode 14.3 + %w[ + lib/Makefile + clit18/Makefile + ].each do |file| + inreplace file do |s| + if DevelopmentTools.clang_build_version >= 1403 + s.gsub! " -Wall ", " -Wall -Wno-implicit-function-declaration " + end + end + end + + inreplace "clit18/Makefile" do |s| + s.gsub! "-I ../libtommath-0.30", "#{HOMEBREW_PREFIX}/include" + s.gsub! "../libtommath-0.30/libtommath.a", "#{HOMEBREW_PREFIX}/lib/libtommath.a" + end + + system "make", "-C", "lib" + system "make", "-C", "clit18" + bin.install "clit18/clit" + end + + test do + (testpath/"test.lit").write("fake .lit file content") + (testpath/"exploded").mkpath + output = shell_output("#{bin}/clit test.lit #{testpath}/exploded 2>&1", 255) + assert_match "LIT FORMAT ERROR: File is too small", output + + assert_match version.to_s, shell_output(bin/"clit", 255) + end +end diff --git a/Formula/c/convmv.rb b/Formula/c/convmv.rb new file mode 100644 index 0000000000000..4c02c84f8a489 --- /dev/null +++ b/Formula/c/convmv.rb @@ -0,0 +1,31 @@ +class Convmv < Formula + desc "Filename encoding conversion tool" + homepage "https://www.j3e.de/linux/convmv/" + url "https://www.j3e.de/linux/convmv/convmv-2.06.tar.gz" + sha256 "a37192e266742e7fe33ec19a3be49aea7fd4d066887863a6e193fa345bf2e592" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?convmv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f95c51cf5841e30e334f11d1e579e5075e71453bcf4632f5e85455cb901acc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d59b68a858b0dd231b5a56326a0ed13f26522b7d3e220c490689779b6ffd059" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc6eb872156f54e09640f970659174fdbcc703bdf3ed10dcd09543074bc2696b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "12704ce771827fcbb7967d0a67fa7e4dd5ff5eb774d7307b59f0a6f386e00cf5" + sha256 cellar: :any_skip_relocation, sonoma: "8dc432373d4dc9621367bc0cffc256d2484cd4a55e9d1403b2dfc4bae2d34edc" + sha256 cellar: :any_skip_relocation, ventura: "96f7dc349fbdb3646f2c0be800a546714c2c06500de40de309931d199b9dd737" + sha256 cellar: :any_skip_relocation, arm64_linux: "6dbc0d946de621b8eafb49874bf80e72b104c1756413ff227c720e470ab53458" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dbc0d946de621b8eafb49874bf80e72b104c1756413ff227c720e470ab53458" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"convmv", "--list" + end +end diff --git a/Formula/c/convox.rb b/Formula/c/convox.rb new file mode 100644 index 0000000000000..6cbb960f58a77 --- /dev/null +++ b/Formula/c/convox.rb @@ -0,0 +1,40 @@ +class Convox < Formula + desc "Command-line interface for the Convox PaaS" + homepage "https://convox.com/" + url "https://github.com/convox/convox/archive/refs/tags/3.22.5.tar.gz" + sha256 "fdafc9a8092eb5f8fc35d619eb054d38544ac694dbc850cc1e05ecd2e06b6cbc" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/convox/convox.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "827531fe08a2f748cf51b59356e125a5a9ce85de98030c52625b77c966d76cb7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea1317845d1c194c14e585c875bb771742beee0e2d9a58b2000d70789b43c0e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d59ed0ad745587b23ec9d898c9d1ae0cc3c7b67b3469d38da9295dd0f57b2a31" + sha256 cellar: :any_skip_relocation, sonoma: "1a4a0112c28f6503b398c3657971717407c604cfa6085da7be564e04ed4109ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "6cd3102fd2d68ab542ce688ec5642339e1987a62f47b92b05af080483911a1a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98644763aeb65dacbfdf6bee97874867090b6cb0460d1a22e84661679042d183" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "systemd" # for libudev + end + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", "-mod=readonly", *std_go_args(ldflags:), "./cmd/convox" + end + + test do + assert_equal "Authenticating with localhost... ERROR: invalid login\n", + shell_output("#{bin}/convox login -t invalid localhost 2>&1", 1) + end +end diff --git a/Formula/c/cookcli.rb b/Formula/c/cookcli.rb new file mode 100644 index 0000000000000..250bf108f905a --- /dev/null +++ b/Formula/c/cookcli.rb @@ -0,0 +1,61 @@ +class Cookcli < Formula + desc "CLI-tool for cooking recipes formated using Cooklang" + homepage "https://cooklang.org" + url "https://github.com/cooklang/cookcli/archive/refs/tags/v0.18.2.tar.gz" + sha256 "a5ed312d5b516a1b085c5fe8fda4e3c2153b9c4d397f7067eb721577a29e48a2" + license "MIT" + head "https://github.com/cooklang/cookcli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a65a83e148603628312018e5d8d8e81ca71ae7e5eb1982d943a82960d2313c09" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "66e8b917706f82bf59d25469a04d95012e73d82fe62d365aba1be4d175595b54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fef84853c93c5c1c1c56093462232ac4b22037a59df225f0ff4ea0fa44df76d8" + sha256 cellar: :any_skip_relocation, sonoma: "b8941e03984f9ddfdf9e1e8b06a22e6249f151ebc02a2179b7b11ac2aaf3877b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7eb674f01d27a36f544e315376d54fdeba307c7bff7176885ebf947236868cf6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0862f7c5025150525b765da495a8f50205ab467b248f9410e6ca7b9ac6dfc133" + end + + depends_on "node" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + def install + ENV["OPENSSL_NO_VENDOR"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + + # Install npm dependencies and build CSS + system "npm", "install", *std_npm_args(prefix: false), "--ignore-scripts" + system "npm", "run", "build-css" + + # Build and install the binary + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/cook --version") + + (testpath/"pancakes.cook").write <<~COOK + Crack the @eggs{3} into a #blender, then add the @plain flour{125%g}, + @milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth. + COOK + (testpath/"expected.md").write <<~MARKDOWN + ## Ingredients + + - *3* eggs + - *125 g* plain flour + - *250 ml* milk + - *1 pinch* sea salt + + ## Cookware + + - blender + + ## Steps + + 1. Crack the eggs into a blender, then add the plain flour, milk and sea salt, + and blitz until smooth. + MARKDOWN + assert_match (testpath/"expected.md").read, + shell_output("#{bin}/cook recipe read --format markdown pancakes.cook") + end +end diff --git a/Formula/c/cookiecutter.rb b/Formula/c/cookiecutter.rb new file mode 100644 index 0000000000000..db9dc55265482 --- /dev/null +++ b/Formula/c/cookiecutter.rb @@ -0,0 +1,139 @@ +class Cookiecutter < Formula + include Language::Python::Virtualenv + + desc "Utility that creates projects from templates" + homepage "https://github.com/cookiecutter/cookiecutter" + url "https://files.pythonhosted.org/packages/52/17/9f2cd228eb949a91915acd38d3eecdc9d8893dde353b603f0db7e9f6be55/cookiecutter-2.6.0.tar.gz" + sha256 "db21f8169ea4f4fdc2408d48ca44859349de2647fbe494a9d6c3edfc0542c21c" + license "BSD-3-Clause" + revision 8 + head "https://github.com/cookiecutter/cookiecutter.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "6bc7e5c56d5e2c19fcca6d70ec137e0311143d9780f29df5773ed02b9bef852f" + sha256 cellar: :any, arm64_sequoia: "5d7cc58488c0c4cd858356e2492af161e6aeeccb3fea9e7871c9f18a33810de6" + sha256 cellar: :any, arm64_sonoma: "13cd214ef9423739c57d8514100cdd6b0c8c9d93f0b6e58b34b13de5ba11ec13" + sha256 cellar: :any, sonoma: "2d85d4004a7645f653925dbf41b574f5d6b2d25f20e756a4e57aa62305264b1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8153afbbaae372ba970365ff60fdae8a42737772968d5ae1783c71c975b6e83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e70a264e368782b3f6b6b433936cfbe6d15aa6237e85b7077a46d782413cb339" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "binaryornot" do + url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" + sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-slugify" do + url "https://files.pythonhosted.org/packages/87/c7/5e1547c44e31da50a460df93af11a535ace568ef89d7a811069ead340c4a/python-slugify-8.0.4.tar.gz" + sha256 "59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "text-unidecode" do + url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" + sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/fc/83/24ed25dd0c6277a1a170c180ad9eef5879ecc9a4745b58d7905a4588c80d/types_python_dateutil-2.9.0.20251008.tar.gz" + sha256 "c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cookiecutter", shell_parameter_format: :click) + end + + test do + system "git", "clone", "https://github.com/audreyr/cookiecutter-pypackage.git" + system bin/"cookiecutter", "--no-input", "cookiecutter-pypackage" + assert (testpath/"python-boilerplate").directory? + end +end diff --git a/Formula/c/coordgen.rb b/Formula/c/coordgen.rb new file mode 100644 index 0000000000000..aed10cae2b8f9 --- /dev/null +++ b/Formula/c/coordgen.rb @@ -0,0 +1,62 @@ +class Coordgen < Formula + desc "Schrodinger-developed 2D Coordinate Generation" + homepage "https://github.com/schrodinger/coordgenlibs" + url "https://github.com/schrodinger/coordgenlibs/archive/refs/tags/v3.0.2.tar.gz" + sha256 "f67697434f7fec03bca150a6d84ea0e8409f6ec49d5aab43badc5833098ff4e3" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b6016edb22f9c1467d088684311a5de1a03f156031c99884f5a04bd55b4b368f" + sha256 cellar: :any, arm64_sequoia: "f3291f603f1f55c41163e4acab534a3fc8fb192582deff462ec8894764ba5bb9" + sha256 cellar: :any, arm64_sonoma: "fc7b1c0c8932a1a8a254c4091a749de3d78d34103a666478ff62ce9f0e0abac8" + sha256 cellar: :any, arm64_ventura: "eaa02e2c8e3b39f293800cb03bd5bac05306e852725dca1d65592c1a655d2abb" + sha256 cellar: :any, sonoma: "aec4514a4bb6382e5570aaab3970f1b4bc326d47eec90d82650fd58f37c32150" + sha256 cellar: :any, ventura: "0fe50a8d4e7c4a55ac999494491ea9eb246bf8610d22e5f57697d92a9978a2f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd0cef4b484abbdb1a50646919aedd7e34dd3dab36e460b90a3bc0e5b7c31e26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff923bc755c574b2b66e0e70123d183dfbe781db2aedc2ec47451c5a7b1586d3" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "maeparser" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", # https://github.com/schrodinger/coordgenlibs/pull/130 + "-DCOORDGEN_BUILD_EXAMPLE=OFF", + "-DCOORDGEN_BUILD_TESTS=OFF", + "-DCOORDGEN_USE_MAEPARSER=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + sketcherMinimizer minimizer; + auto* min_mol = new sketcherMinimizerMolecule(); + auto a1 = min_mol->addNewAtom(); + a1->setAtomicNumber(7); + auto a2 = min_mol->addNewAtom(); + a2->setAtomicNumber(6); + auto b1 = min_mol->addNewBond(a1, a2); + b1->setBondOrder(1); + minimizer.initialize(min_mol); + minimizer.runGenerateCoordinates(); + auto c1 = a1->getCoordinates(); + auto c2 = a2->getCoordinates(); + std::cout << c1 << " " << c2; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-L#{lib}", "-lcoordgen" + assert_equal "(-50, 0) (0, 0)", shell_output("./test") + end +end diff --git a/Formula/c/copa.rb b/Formula/c/copa.rb new file mode 100644 index 0000000000000..b99b69e99e15b --- /dev/null +++ b/Formula/c/copa.rb @@ -0,0 +1,45 @@ +class Copa < Formula + desc "Tool to directly patch container images given the vulnerability scanning results" + homepage "https://github.com/project-copacetic/copacetic" + url "https://github.com/project-copacetic/copacetic/archive/refs/tags/v0.12.0.tar.gz" + sha256 "886aa760e9bdff174686d3c601cfb2f53e824299796ace3eef94dae03cdf15e1" + license "Apache-2.0" + head "https://github.com/project-copacetic/copacetic.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "060791ddc07d2321fa05d42f8e63e304f8c221f4d15a7228983659ae97bed2b8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "060791ddc07d2321fa05d42f8e63e304f8c221f4d15a7228983659ae97bed2b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "060791ddc07d2321fa05d42f8e63e304f8c221f4d15a7228983659ae97bed2b8" + sha256 cellar: :any_skip_relocation, sonoma: "c0a80b6a01b98ef9fdaee6b12cd169afba86feaa4a1c3b111ed660534ec9cf4e" + sha256 cellar: :any_skip_relocation, arm64_linux: "927754db957c23f31677bed21ae2e86beeeafe35574dfa56529e720d7cbbbd1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aacb7d00031baaa5fa2e28cf78bc9e5dafdd790b28a26f77dcbdcf72ccab5883" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/project-copacetic/copacetic/pkg/version.GitVersion=#{version} + -X github.com/project-copacetic/copacetic/pkg/version.GitCommit=#{tap.user} + -X github.com/project-copacetic/copacetic/pkg/version.BuildDate=#{time.iso8601} + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + (testpath/"report.json").write <<~JSON + { + "SchemaVersion": 2, + "ArtifactName": "nginx:1.21.6", + "ArtifactType": "container_image" + } + JSON + output = shell_output("#{bin}/copa patch --image=mcr.microsoft.com/oss/nginx/nginx:1.21.6 \ + --report=report.json 2>&1", 1) + assert_match "Error: no patchable vulnerabilities found", output + + assert_match version.to_s, shell_output("#{bin}/copa --version") + end +end diff --git a/Formula/c/copier.rb b/Formula/c/copier.rb new file mode 100644 index 0000000000000..24df57461f81f --- /dev/null +++ b/Formula/c/copier.rb @@ -0,0 +1,138 @@ +class Copier < Formula + include Language::Python::Virtualenv + + desc "Utility for rendering projects templates" + homepage "https://copier.readthedocs.io/" + url "https://files.pythonhosted.org/packages/82/c6/1f61fe2b011347c0b9d7637d02ef3dc1c2874640a4fd5fb059ea8b5493f2/copier-9.10.3.tar.gz" + sha256 "6e965d8f719678ee3bc5e611ef0d1b182d6b01a3d5385a5f1ba43aaade51caf7" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c2289766b14d93be1c341020fa10d061f13495d0af78f18e62b29c3a850c514b" + sha256 cellar: :any, arm64_sequoia: "109d69d1e1560b1f66d79ea88a6b6d7fb735a5b0c42eb2eddde3e82f7fde04d5" + sha256 cellar: :any, arm64_sonoma: "3248a3328078e4af02d53de422ab1ca70a762f3228dab45d449c8fabe503060a" + sha256 cellar: :any, sonoma: "c08df2eac6358fea05838125ac343a8af5cd2e058510aef5835f680a555cc151" + sha256 cellar: :any_skip_relocation, arm64_linux: "f35f8a00e3362974b5ba087cfa6ec84ddeccc27568a538298e8b24dac6ae6837" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a03023fb56dfdc277dbe7eb9dd7def1ff067e589dee36c9d75cbbb98c5a1d2b0" + end + + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "pydantic-core" + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "dunamai" do + url "https://files.pythonhosted.org/packages/f1/2f/194d9a34c4d831c6563d2d990720850f0baef9ab60cb4ad8ae0eff6acd34/dunamai-1.25.0.tar.gz" + sha256 "a7f8360ea286d3dbaf0b6a1473f9253280ac93d619836ad4514facb70c0719d1" + end + + resource "funcy" do + url "https://files.pythonhosted.org/packages/70/b8/c6081521ff70afdff55cd9512b2220bbf4fa88804dae51d1b57b4b58ef32/funcy-2.0.tar.gz" + sha256 "3963315d59d41c6f30c04bc910e10ab50a3ac4a225868bfa96feed133df075cb" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jinja2-ansible-filters" do + url "https://files.pythonhosted.org/packages/1a/27/fa186af4b246eb869ffca8ffa42d92b05abaec08c99329e74d88b2c46ec7/jinja2-ansible-filters-1.3.2.tar.gz" + sha256 "07c10cf44d7073f4f01102ca12d9a2dc31b41d47e4c61ed92ef6a6d2669b356b" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "plumbum" do + url "https://files.pythonhosted.org/packages/f0/5d/49ba324ad4ae5b1a4caefafbce7a1648540129344481f2ed4ef6bb68d451/plumbum-1.9.0.tar.gz" + sha256 "e640062b72642c3873bd5bdc3effed75ba4d3c70ef6b6a7b907357a84d909219" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/f6/45/eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5/questionary-2.1.1.tar.gz" + sha256 "3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + params = %w[ + -d python=true + -d js=true + -d ansible=false + -d biggest_kbs=1000 + -d main_branches=null + -d github=true + ] + system bin/"copier", "copy", *params, "--vcs-ref=v0.1.0", + "https://github.com/copier-org/autopretty.git", "template" + assert (testpath/"template").directory? + assert_path_exists testpath/"template/.copier-answers.autopretty.yml" + end +end diff --git a/Formula/c/copilot.rb b/Formula/c/copilot.rb new file mode 100644 index 0000000000000..0da66a96cf151 --- /dev/null +++ b/Formula/c/copilot.rb @@ -0,0 +1,48 @@ +class Copilot < Formula + desc "CLI tool for Amazon ECS and AWS Fargate" + homepage "https://aws.github.io/copilot-cli/" + url "https://github.com/aws/copilot-cli/archive/refs/tags/v1.34.1.tar.gz" + sha256 "42f37960360063a9a277d40d9e1c0b284bc49a12dbf996696551154737d94475" + license "Apache-2.0" + head "https://github.com/aws/copilot-cli.git", branch: "mainline" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6956e0e2fd50ea21db1b36dc6a23a1577c302f659b4b8d1d48d08b0c74df87a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13faf4886169d8f186deaf7635b8c970f23155a7cc871f1b002ff7cd6c4c3cad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "612ed50072ab9efa44768a26c50204ae34f6239eaebf4943420f3974346e5099" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6386f436762921c82276a71a96f3cb039c19feb6686cd1f0425ead33221ad52f" + sha256 cellar: :any_skip_relocation, sonoma: "f6bd3082d39efbe86dda980e542f93186871646ec9ac23b951f7683d3422f6c9" + sha256 cellar: :any_skip_relocation, ventura: "1ec11fa87d97cc7efe7093979126094c6f67ca0f4834df821d60431a2d92e91a" + sha256 cellar: :any_skip_relocation, arm64_linux: "c72c7b0fdb9e03d19111e4eb6b77e4146779cd18a42a2820666fd5f73e6c4d0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbed548a000b6f038d80263542e7f794a6ceaae95ecfd3c2cc321bcf9d89d5bf" + end + + depends_on "go" => :build + depends_on "node" => :build + + def install + ENV.deparallelize + system "make", "VERSION=#{version}" + bin.install "bin/local/copilot" + generate_completions_from_executable(bin/"copilot", "completion") + end + + test do + ENV["AWS_REGION"] = ENV["AWS_SECRET_ACCESS_KEY"] = "test" + ENV["AWS_ACCESS_KEY_ID"] = "eu-west-1" + begin + _, stdout, wait_thr = Open3.popen2("#{bin}/copilot init 2>&1") + assert_match "Note: It's best to run this command in the root of your Git repository", stdout.gets("\n") + ensure + Process.kill 9, wait_thr.pid + end + + output = shell_output("#{bin}/copilot pipeline init 2>&1", 1) + assert_match "Run `copilot app init` to create an application", output + end +end diff --git a/Formula/c/copyparty.rb b/Formula/c/copyparty.rb new file mode 100644 index 0000000000000..8da2f9d70546e --- /dev/null +++ b/Formula/c/copyparty.rb @@ -0,0 +1,126 @@ +class Copyparty < Formula + include Language::Python::Virtualenv + + desc "Portable file server" + homepage "https://github.com/9001/copyparty" + url "https://files.pythonhosted.org/packages/f6/9b/03b643d8b90a8fa9cf2fcd6c88997b599f98c9a9b34adb20a0fbaf178344/copyparty-1.19.20.tar.gz" + sha256 "ad43594dccf9375bd3a98a51e2a8c1bc361ae3f2aabad6467d9e3be9233cac34" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8075c095ff16e2f170c1167b86aaf4ae23023b4dd0ebc282f09dfa3812067f17" + sha256 cellar: :any, arm64_sequoia: "f575ff825256c729f27308252145bdf9df4823791432356407ab89fb28c66c64" + sha256 cellar: :any, arm64_sonoma: "f78f0f39b32b08a9688aa2e743b31022919f0aeed12c308de210b1e67633cf53" + sha256 cellar: :any, sonoma: "d2d6a27cfe06ca8041cc47707fda542fcb35185a7c5e4e11a68bfd6743f602d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e55925b87c63c8c8d8a733e32f63792e5db1c6e66c62bf67035cf9f153ee243" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3952aa6538e1c1e721eccc1c97608fbd6282ea04440999c942c96c52b02b824" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "cryptography" => :no_linkage + depends_on "glib" + depends_on "python@3.14" + depends_on "vips" + depends_on "zeromq" + + on_macos do + depends_on "gettext" + end + + pypi_packages package_name: "copyparty[thumbnails2,audiotags,ftpd,ftps,tftpd,pwhash,zeromq]", + exclude_packages: ["cffi", "cryptography", "pycparser"] + + resource "argon2-cffi" do + url "https://files.pythonhosted.org/packages/0e/89/ce5af8a7d472a67cc819d5d998aa8c82c5d860608c4db9f46f1162d7dab9/argon2_cffi-25.1.0.tar.gz" + sha256 "694ae5cc8a42f4c4e2bf2ca0e64e51e23a040c6a517a85074683d3959e1346c1" + end + + resource "argon2-cffi-bindings" do + url "https://files.pythonhosted.org/packages/5c/2d/db8af0df73c1cf454f71b2bbe5e356b8c1f8041c979f505b3d3186e520a9/argon2_cffi_bindings-25.1.0.tar.gz" + sha256 "b957f3e6ea4d55d820e40ff76f450952807013d361a65d7f28acc0acbf29229d" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "partftpy" do + url "https://files.pythonhosted.org/packages/8c/96/642bb3ddcb07a2c6764eb29aa562d1cf56877ad6c330c3c8921a5f05606d/partftpy-0.4.0.tar.gz" + sha256 "e50db3cae27cf763c66666fe61783464f5bf0caf110cbd6e1348f91cf77859ed" + end + + resource "pyasynchat" do + url "https://files.pythonhosted.org/packages/8a/fd/aacc6309abcc5a388c66915829cd8175daccac583828fde40a1eea5768e4/pyasynchat-1.0.4.tar.gz" + sha256 "3f5333df649e46c56d48c57e6a4b7163fd07f626bfd884e22ef373ab3c3a4670" + end + + resource "pyasyncore" do + url "https://files.pythonhosted.org/packages/25/6e/956e2bc9b47e3310cd524036f506b779a77788c2a1eb732e544240ad346f/pyasyncore-1.0.4.tar.gz" + sha256 "2c7a8b9b750ba6260f1e5a061456d61320a80579c6a43d42183417da89c7d5d6" + end + + resource "pyftpdlib" do + url "https://files.pythonhosted.org/packages/fc/67/3299ce20585601d21e05153eb9275cb799ae408fe15ab93e48e4582ea9fe/pyftpdlib-2.1.0.tar.gz" + sha256 "5e92e7ba37c3e458ec458e5c201e2deb992cb6011c963e6a8512a634d8d80116" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "pyvips" do + url "https://files.pythonhosted.org/packages/4c/a2/d8ecd2f7ffa084870ba071a584aac44800a89f3c77b305999be7dc8b7bb3/pyvips-3.0.0.tar.gz" + sha256 "79459975e4a16089b0eaafed26eb1400ae66ebc16d3ff3a7d2241abcf19dc9e8" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/04/0b/3c9baedbdf613ecaa7aa07027780b8867f57b6293b6ee50de316c9f3222b/pyzmq-27.1.0.tar.gz" + sha256 "ac0765e3d44455adb6ddbf4417dcce460fc40a05978c08efdf2948072f6db540" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + If you need to generate thumbnails for video/audio files: + brew install ffmpeg + If you need to automatically create a CA and server-cert on startup: + brew install cfssl + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/copyparty --version") + + require "pty" + + port = free_port + PTY.spawn(bin/"copyparty", "-q", "-p", port.to_s, "-lo", testpath/"log.txt") do |_r, w, pid| + sleep 3 + w.close + ensure + Process.kill "TERM", pid + Process.wait pid + end + + assert_path_exists testpath/"log.txt" + output = File.read(testpath/"log.txt") + assert_match "listening @ [::]:#{port}", output + end +end diff --git a/Formula/c/core-lightning.rb b/Formula/c/core-lightning.rb new file mode 100644 index 0000000000000..376639487de8a --- /dev/null +++ b/Formula/c/core-lightning.rb @@ -0,0 +1,93 @@ +class CoreLightning < Formula + include Language::Python::Virtualenv + + desc "Lightning Network implementation focusing on spec compliance and performance" + homepage "https://github.com/ElementsProject/lightning" + url "https://github.com/ElementsProject/lightning/releases/download/v25.09.1/clightning-v25.09.1.zip" + sha256 "99a1fe49232e9d71f8dc797d145be4e4bea7e1ed3abe0b0bdd3f16df2772fa14" + license "MIT" + head "https://github.com/ElementsProject/lightning.git", branch: "master" + + livecheck do + url :stable + regex(/^v(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "70aa6057c849236f1e0c4b625bcb5e29703769d663f360310efd8e3624887f19" + sha256 arm64_sequoia: "a7ae8998f5246d1097e67687a53011f2f5987efceb2cc697e1401bb5a0db941e" + sha256 arm64_sonoma: "aca23c8a7c92915d114f847b91ea621c0899d1dc9d9e9669b86ff6b1115fba25" + sha256 sonoma: "dd86eb93762b74191a800ee3e1734ad1faa0ba0f43c335e0fe8b4949247d45c2" + sha256 arm64_linux: "a5cd79bc56ae075e6379f236c5d8abfbad2e0a71502aeda914b1c74cfff26c9e" + sha256 x86_64_linux: "283da980920cb731ac4668bdbcb7c06cb6307b131075956c0a5df4ed0d82533e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on "lowdown" => :build + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "python@3.14" => :build + depends_on "rust" => :build + depends_on "bitcoin" + depends_on "libsodium" + + uses_from_macos "jq" => :build, since: :sequoia + uses_from_macos "python" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + depends_on "gnu-sed" => :build + end + + pypi_packages package_name: "", + extra_packages: ["mako", "setuptools"] + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + # Configure script overwrites `PKG_CONFIG_PATH` on macOS + # PR: https://github.com/ElementsProject/lightning/pull/8146 + patch do + url "https://github.com/botantony/lightning/commit/cca721a9f3c5a15f6792b0dc1941959dbd93ac2f.patch?full_index=1" + sha256 "ee375b92de3d49f4bdf33acf2eb672b693f5806ee418a380e37f3a6a4047c91d" + end + + def install + rm_r(["external/libsodium", "external/lowdown"]) + + venv = virtualenv_create(buildpath/"venv", "python3.14") + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + + rm_r Dir["#{bin}/*.dSYM"] + end + + test do + lightningd_output = shell_output("#{bin}/lightningd --daemon --network regtest --log-file lightningd.log 2>&1", 1) + assert_match "Could not connect to bitcoind using bitcoin-cli. Is bitcoind running?", lightningd_output + + lightningcli_output = shell_output("#{bin}/lightning-cli --network regtest getinfo 2>&1", 2) + assert_match "lightning-cli: Connecting to 'lightning-rpc': No such file or directory", lightningcli_output + end +end diff --git a/Formula/c/coredns.rb b/Formula/c/coredns.rb new file mode 100644 index 0000000000000..017a90390b13c --- /dev/null +++ b/Formula/c/coredns.rb @@ -0,0 +1,52 @@ +class Coredns < Formula + desc "DNS server that chains plugins" + homepage "https://coredns.io/" + url "https://github.com/coredns/coredns/archive/refs/tags/v1.13.1.tar.gz" + sha256 "13a09a07177fcf341c963b5e4ea20a52483f471e3ced90b5396ea620bfc1d835" + license "Apache-2.0" + head "https://github.com/coredns/coredns.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3d770ea67e106e39d7a59769f5af7bc18ef877451437531c108d200fdf9797f8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef2c8ef22ce4fffb737dd2acba134857759fad6f9afe3639209563b43ee55019" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9d124964b6a73d49b74ad17d2f6dbc311bb393aac259b6837eefd849cbb999a" + sha256 cellar: :any_skip_relocation, sonoma: "6f0def3f3867a40cbfcf0b954a76a7a135c09c922318ddd322390ceb88cfad83" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1f1e30ef573ccb33aedfba63556f926eeaf70b1ada7c837dcea6b992471aeb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8622a05a0f0703f6c224d85cb78abce9d281b17272b9d2453ff89b2ff9116b4c" + end + + depends_on "go" => :build + + on_linux do + depends_on "bind" => :test # for `dig` + end + + def install + system "make" + bin.install "coredns" + end + + service do + run [opt_bin/"coredns", "-conf", etc/"coredns/Corefile"] + keep_alive true + require_root true + working_dir HOMEBREW_PREFIX + log_path var/"log/coredns.log" + error_log_path var/"log/coredns.log" + end + + test do + port = free_port + fork do + exec bin/"coredns", "-dns.port=#{port}" + end + sleep(2) + output = shell_output("dig @127.0.0.1 -p #{port} example.com.") + assert_match(/example\.com\.\t\t0\tIN\tA\t127\.0\.0\.1\n/, output) + end +end diff --git a/Formula/c/coreos-ct.rb b/Formula/c/coreos-ct.rb new file mode 100644 index 0000000000000..6c00cf40458b0 --- /dev/null +++ b/Formula/c/coreos-ct.rb @@ -0,0 +1,47 @@ +class CoreosCt < Formula + desc "Convert a Container Linux Config into Ignition" + homepage "https://flatcar-linux.org/docs/latest/provisioning/config-transpiler/" + url "https://github.com/flatcar/container-linux-config-transpiler/archive/refs/tags/v0.9.4.tar.gz" + sha256 "c173ced842a6d178000f9bf01b26e9a8c296b1256ab713834f18d3f0883c4263" + license "Apache-2.0" + head "https://github.com/flatcar/container-linux-config-transpiler.git", branch: "flatcar-master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bbe2be9e5b17ddf5d2be97069bc9552adbe793b6739c6b6dfd07028af3aa1cc3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7d99702fcc4911d60fec259d493be5b357097f417690bf799329dc35ac5415c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d904642f1bd2aa1d5ed2408c184c77d538c0ec27ab6fbdc442414f1d69c895fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a0e3189ec955041eb885241c04183bedc694f19ff2382aca9a7b80424e1b3d9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "daecb2d366f73487e19a3357e64fe02be095ba9a92ac8d6ed4350d3281d5f9dc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "01ee0a8cdf60e4f9ceefbb28529c508ff16cc8dcc8e6b9d3ea3ab2c5bf05e8a6" + sha256 cellar: :any_skip_relocation, sonoma: "fb8712c14dc8c22531d57db5761aae9c52864bfb8c1c4efa3aa0a478a316c145" + sha256 cellar: :any_skip_relocation, ventura: "5b29ea3c72c04112fe9d88b6f9253ee6853289b0a697f9468f0bf747d92cb977" + sha256 cellar: :any_skip_relocation, monterey: "d5b7543e14bd73c528cbfca81b32f56c18d17018ef4e7edf7d16870223eaaee2" + sha256 cellar: :any_skip_relocation, big_sur: "9517910a97a3643010e7d0ccc65dab68a6e85a7321780a0d3e095686530b6502" + sha256 cellar: :any_skip_relocation, catalina: "acb5592eabf664da5576e643378d903d9c30b3ed57c2ecaba8b0d48c8f561041" + sha256 cellar: :any_skip_relocation, arm64_linux: "1aea93999354ff21f48cf727352ce20bb8f0b1c52abee5c33f321020bb375cdf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebf7582f950db123c1c3e6281ca2947c95abe58b116af11681a24085d1eb1e82" + end + + depends_on "go" => :build + + conflicts_with "chart-testing", because: "both install `ct` binaries" + + def install + system "make", "all", "VERSION=v#{version}" + bin.install "./bin/ct" + end + + test do + (testpath/"input").write <<~EOS + passwd: + users: + - name: core + ssh_authorized_keys: + - ssh-rsa mykey + EOS + output = shell_output("#{bin}/ct -pretty -in-file #{testpath}/input").lines.map(&:strip).join + assert_match(/.*"sshAuthorizedKeys":\s*\["ssh-rsa mykey"\s*\].*/m, output.strip) + end +end diff --git a/Formula/c/coreutils.rb b/Formula/c/coreutils.rb new file mode 100644 index 0000000000000..62c84308833c1 --- /dev/null +++ b/Formula/c/coreutils.rb @@ -0,0 +1,151 @@ +class Coreutils < Formula + desc "GNU File, Shell, and Text utilities" + homepage "https://www.gnu.org/software/coreutils/" + url "https://ftpmirror.gnu.org/gnu/coreutils/coreutils-9.8.tar.xz" + mirror "https://ftp.gnu.org/gnu/coreutils/coreutils-9.8.tar.xz" + sha256 "e6d4fd2d852c9141a1c2a18a13d146a0cd7e45195f72293a4e4c044ec6ccca15" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a05deb3349451dbbe11abd0b339a835f97a989f08345afb8c3a45952a0df6ee3" + sha256 arm64_sequoia: "67c097eb1b01d8a5525c871e84260187d6308ae2965c013b0416bae62853c9dd" + sha256 arm64_sonoma: "fce6e52bd1afd5e8e91446f0def571ff4339bac5d866a1c77d1d392a2ea07a18" + sha256 sonoma: "69a6d4f328369ab2afc40032b6b44b68d765f308474cf6ad634fa1499ec38769" + sha256 arm64_linux: "1f948fa0dbd69feab36f771aada788c3a651486d8a5e9734b01094df55e0c634" + sha256 x86_64_linux: "d812e26edfa73bad913099488a6e6b86761c4275568592525d4e295142692af9" + end + + head do + url "https://git.savannah.gnu.org/git/coreutils.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "gettext" => :build + depends_on "texinfo" => :build + depends_on "wget" => :build + depends_on "xz" => :build + end + + depends_on "gmp" + uses_from_macos "gperf" => :build + + on_macos do + conflicts_with "uutils-coreutils", because: "coreutils and uutils-coreutils install the same binaries" + end + + on_sonoma :or_older do + conflicts_with "md5sha1sum", because: "both install `md5sum` and `sha1sum` binaries" + end + + on_linux do + depends_on "acl" + depends_on "attr" + end + + conflicts_with "b2sum", because: "both install `b2sum` binaries" + conflicts_with "gfold", because: "both install `gfold` binaries" + conflicts_with "idutils", because: "both install `gid` and `gid.1`" + + # https://github.com/Homebrew/homebrew-core/pull/36494 + def breaks_macos_users + %w[dir dircolors vdir] + end + + # Coreutils 9.8 had a bug in `tail` that made it seek to the wrong place in + # files. Only update src/tail.c from the upstream commit otherwise `autoconf` + # will be invoked. + # https://github.com/coreutils/coreutils/commit/914972e80dbf82aac9ffe3ff1f67f1028e1a788b.patch?full_index=1 + patch :DATA + + def install + ENV.runtime_cpu_detection + system "./bootstrap" if build.head? + + args = %W[ + --prefix=#{prefix} + --program-prefix=g + --with-libgmp + --without-selinux + ] + + system "./configure", *args + system "make", "install" + + no_conflict = if OS.mac? + [] + else + %w[ + b2sum base32 basenc chcon dir dircolors factor hostid md5sum nproc numfmt pinky ptx realpath runcon + sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf stdbuf tac timeout truncate vdir + ] + end + + # Symlink all commands into libexec/gnubin without the 'g' prefix + coreutils_filenames(bin).each do |cmd| + (libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd + + # Find non-conflicting commands on macOS + which_cmd = which(cmd) + no_conflict << cmd if OS.mac? && (which_cmd.nil? || !which_cmd.to_s.start_with?(%r{(/usr)?/s?bin})) + end + # Symlink all man(1) pages into libexec/gnuman without the 'g' prefix + coreutils_filenames(man1).each do |cmd| + (libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}" => cmd + end + (libexec/"gnubin").install_symlink "../gnuman" => "man" + + no_conflict -= breaks_macos_users if OS.mac? + # Symlink non-conflicting binaries + no_conflict.each do |cmd| + bin.install_symlink "g#{cmd}" => cmd + man1.install_symlink "g#{cmd}.1" => "#{cmd}.1" + end + end + + def caveats + msg = "Commands also provided by macOS and the commands #{breaks_macos_users.join(", ")}" + on_linux do + msg = "All commands" + end + <<~EOS + #{msg} have been installed with the prefix "g". + If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH with: + PATH="#{opt_libexec}/gnubin:$PATH" + EOS + end + + def coreutils_filenames(dir) + filenames = [] + dir.find do |path| + next if path.directory? || path.basename.to_s == ".DS_Store" + + filenames << path.basename.to_s.sub(/^g/, "") + end + filenames.sort + end + + test do + (testpath/"test").write("test") + (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test") + system bin/"gsha1sum", "-c", "test.sha1" + system bin/"gln", "-f", "test", "test.sha1" + end +end + +__END__ + +diff --git a/src/tail.c b/src/tail.c +index b8bef1d91cdb6cde2b666b6c1575376e075eaeb8..c7779c77dfe4cf5a672a265b6e796c7153590170 100644 +--- a/src/tail.c ++++ b/src/tail.c +@@ -596,7 +596,7 @@ file_lines (char const *prettyname, int fd, struct stat const *sb, + goto free_buffer; + } + +- pos = xlseek (fd, -bufsize, SEEK_CUR, prettyname); ++ pos = xlseek (fd, -(bufsize + bytes_read), SEEK_CUR, prettyname); + bytes_read = read (fd, buffer, bufsize); + if (bytes_read < 0) + { diff --git a/Formula/c/corkscrew.rb b/Formula/c/corkscrew.rb new file mode 100644 index 0000000000000..c7ffb9d8106f6 --- /dev/null +++ b/Formula/c/corkscrew.rb @@ -0,0 +1,56 @@ +class Corkscrew < Formula + desc "Tunnel SSH through HTTP proxies" + homepage "https://packages.debian.org/sid/corkscrew" + url "https://deb.debian.org/debian/pool/main/c/corkscrew/corkscrew_2.0.orig.tar.gz" + sha256 "0d0fcbb41cba4a81c4ab494459472086f377f9edb78a2e2238ed19b58956b0be" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/c/corkscrew/" + regex(/href=.*?corkscrew[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ddf9f9bccfc3f8abdac5ab156b3adebb82d263eec75503ca53b657dba4e310f3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d17faa8d3e8eb0fe11107515daf53fd0f9d22caaaa0d32993ca6e961ee9559cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f7a6be3731dfae7b92f6da9091b3e4665473c77b58c6f4d21d2cf6c6c511750" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1bd52cc5c72e9ca3461dc63fdfb584ac3622a57effae88f14a8e7eab146a57b8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d1add42728d114c019b0621bbd8aa9f3f95c433e006f38bdba71d9387e667357" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7882ab8fa538eb9eee596f56fa6f65c14f1f3e467a822ce7a39ea197d2fe08a5" + sha256 cellar: :any_skip_relocation, sonoma: "58a7a24041d6103063a3f4f8c96e1729afc175370aa27df66d0604a887fb61c3" + sha256 cellar: :any_skip_relocation, ventura: "16b81ff2ca5d308f0eb953399f4ec771870ff1019d93b69630f1218fbd185dc5" + sha256 cellar: :any_skip_relocation, monterey: "51bb3c53d276f9abc51f7b6338ef96f3b2bd7686d8b331eb0ffdb52b51bdf9f1" + sha256 cellar: :any_skip_relocation, big_sur: "af93a7005479f2004b385e484c633f42577d7cd99272d5e7ec4c17e3d0239a7b" + sha256 cellar: :any_skip_relocation, catalina: "83db433b1d34ad662d310504a476bcd5848955b0cc78087203b8e25164e4c8a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "6961a98bcd314dd0590a00dcddf7101d673b5c6933b938b271e4f93a82d22c78" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aad5bc0cad7686b7741300366d92107ed90c84eabc8868d309a2f61c96b3135d" + end + + depends_on "libtool" => :build + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + port = free_port + + fork do + server = TCPServer.new port + socket = server.accept + Open3.popen3("#{bin}/corkscrew 127.0.0.1 #{port} www.google.com 80") do |_, stdout, _| + socket.write "GET /index.html HTTP/1.1\r\n\r\n" + assert_match "HTTP/1.1", stdout.gets("\r\n\r\n") + end + end + end +end diff --git a/Formula/c/cornelis.rb b/Formula/c/cornelis.rb new file mode 100644 index 0000000000000..43f49081eba1b --- /dev/null +++ b/Formula/c/cornelis.rb @@ -0,0 +1,39 @@ +class Cornelis < Formula + desc "Neovim support for Agda" + homepage "https://github.com/agda/cornelis" + url "https://github.com/agda/cornelis/archive/refs/tags/v2.8.0.tar.gz" + sha256 "41787428319dbde15b51ce427451d4a48f14d54a7c42902d004458e232ca3022" + license "BSD-3-Clause" + head "https://github.com/agda/cornelis.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "103d80490d25947c1dd3d7161b76f5b5a63845afc8c961a8d9664cc61a5d3f90" + sha256 cellar: :any, arm64_sequoia: "bf400828f83abba48acb6c2ec8e25ed1e96917c925f213ab6d39c4113a53409b" + sha256 cellar: :any, arm64_sonoma: "d25401f92c4d9d180780f1230eb0ccf39b1b80974f12b9d248392e4a3aeea090" + sha256 cellar: :any, arm64_ventura: "6ec7c5adf4a3de1e3f1bb14c16b8331a5ddea0e53e89e6a4fdfb3a7d9ee1acba" + sha256 cellar: :any, sonoma: "a8a253190ca8160a77009bd98428a911e7b1744347a5cb3064425b1a82bb3ac6" + sha256 cellar: :any, ventura: "424458fd634c9cba6e292d05a251d1bee0ec1d7b877c833f41604f557d6f7b91" + sha256 cellar: :any_skip_relocation, arm64_linux: "c535f472a6eee69b4e10dab39e5907adc21ee787b494863bc6f8b5bbcc83bb88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99250a940957d3ed12ff7037381f5b1a2599a479d2a4900327f01f0e42bc81f0" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "hpack" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + system "hpack" + system "cabal", "v2-update" + system "cabal", "v2-install", ".", *std_cabal_v2_args + end + + test do + expected = "\x94\x00\x01\xC4\x15nvim_create_namespace\x91\xC4\bcornelis" + actual = pipe_output("#{bin}/cornelis NAME", nil, 0) + assert_equal expected, actual + end +end diff --git a/Formula/c/corral.rb b/Formula/c/corral.rb new file mode 100644 index 0000000000000..1745a54033396 --- /dev/null +++ b/Formula/c/corral.rb @@ -0,0 +1,35 @@ +class Corral < Formula + desc "Dependency manager for the Pony language" + homepage "https://github.com/ponylang/corral" + url "https://github.com/ponylang/corral/archive/refs/tags/0.9.0.tar.gz" + sha256 "7da78ceb96338b746e3c28ad16454d86fd30da576fa66e8489d781311fd1983b" + license "BSD-2-Clause" + head "https://github.com/ponylang/corral.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "262882a485d75653fe712782ce3a6a7549b0cff09ce0194b7694ad5e9f5629fd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0ca70a8407b60091e292c9e4a4a87eb6e99223b2a77a3d4eacdbc266b3c6e68f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b72cbd12bb1ab538b5a248447a80f347c32f27b080e0c319a6f2e085ac090be8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "419d53d57549fbe043f3d2b6cfd5218bfaa5cd90f68f9008ed5fcacfee7ae894" + sha256 cellar: :any_skip_relocation, sonoma: "302e3e94dbda399084f2bfc722c5599c9e1cb33b25008a5c25cc3d4229975b5e" + sha256 cellar: :any_skip_relocation, ventura: "9574ca600bd03323add5967beaf3d5725b0cb56f5d7f63dc631ef0e140e0cadf" + sha256 cellar: :any_skip_relocation, arm64_linux: "6974ea725f2dceb7d0a07970485b9c4adc614950541c4be3be9b3631f8ef4dbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6f801892caef51faa6d39a3efd96262d11469b3a44216253e7238b70149826f" + end + + depends_on "ponyc" + + def install + system "make", "prefix=#{prefix}", "install" + end + + test do + (testpath/"test/main.pony").write <<~PONY + actor Main + new create(env: Env) => + env.out.print("Hello World!") + PONY + system bin/"corral", "run", "--", "ponyc", "test" + assert_equal "Hello World!", shell_output("./test1").chomp + end +end diff --git a/Formula/c/corrosion.rb b/Formula/c/corrosion.rb new file mode 100644 index 0000000000000..d9c1c1f235b86 --- /dev/null +++ b/Formula/c/corrosion.rb @@ -0,0 +1,38 @@ +class Corrosion < Formula + desc "Easy Rust and C/C++ Integration" + homepage "https://github.com/corrosion-rs/corrosion" + url "https://github.com/corrosion-rs/corrosion/archive/refs/tags/v0.5.2.tar.gz" + sha256 "6bc02411e29183a896aa60c58db6819ec6cf57c08997481d0b0da9029356b529" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "af95a14b6420bdb22ebdbbb598bc72ba54e70b8ecbe794a172f5b7cd56a2fc09" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "213e69cddff12529c1bd8485dfb76e9b61bcc7feecdf723235e279e86cf41ee2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41055a8da503deea745e481139bf3d04e87ee88a7af701c1957f399e7b9131ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1e046b09209f1c0fce88cfc906738e0a00b3e60e5cf98c104b0ad2471719fbb" + sha256 cellar: :any_skip_relocation, sonoma: "231d7baa0ee29f9f394036d6e97da54f345ea3421a21eb5fb7ba69bfc1327caf" + sha256 cellar: :any_skip_relocation, ventura: "a1e7ae46039d0ec8956ef7cfa52d5df75aa684a9a371175d19a8d756293b8c68" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d86f4310814d7d52641fd650781e7f3524a83e92bf8103bf5b5790005bc1da3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c62e44eec11b2e17fada82c09418a214e0e231326415c6e0a0d1328433ded6b" + end + + depends_on "cmake" => [:build, :test] + depends_on "rust" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test/rust2cpp/rust2cpp/.", testpath + inreplace "CMakeLists.txt", "include(../../test_header.cmake)", "find_package(Corrosion REQUIRED)" + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + + assert_match "Hello, Cpp! I'm Rust!", shell_output("./build/cpp-exe") + end +end diff --git a/Formula/c/corsixth.rb b/Formula/c/corsixth.rb new file mode 100644 index 0000000000000..d965369edb2b8 --- /dev/null +++ b/Formula/c/corsixth.rb @@ -0,0 +1,122 @@ +class Corsixth < Formula + desc "Open source clone of Theme Hospital" + homepage "https://github.com/CorsixTH/CorsixTH" + url "https://github.com/CorsixTH/CorsixTH/archive/refs/tags/v0.69.1.tar.gz" + sha256 "08eec141bdd8adf265f341a8452601f844a3eaab0378535b2655198fd373a7f8" + license "MIT" + revision 1 + head "https://github.com/CorsixTH/CorsixTH.git", branch: "master" + + # Upstream uses GitHub releases to indicate that a version is released + # (there's also sometimes a notable gap between when a version is tagged and + # and the release is created), so the `GithubLatest` strategy is necessary. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "d753e18ec56907c2b0033343d131b80390f15d1ba7ad9db9e5ccb43bb98b43af" + sha256 arm64_sequoia: "3cb067dfba410ffb3801e0e70d5d4a79841742cdf81b1d295aa378b2702f0d20" + sha256 arm64_sonoma: "915084f0279e8c300639051bc5ac2451afdc29676b48bd3ecb4c61d18710c9b6" + sha256 arm64_ventura: "753909b4988900d132e387f99e064d2979063e1543e984e5825880f561db419f" + sha256 sonoma: "c5f817b34df2a948e14936c85ccabf8b13bbc58208031a142f68d9904e8bf67c" + sha256 ventura: "529c7ad432164591a315b326e0aaa2c0f50ff96ab75265072cb29a5f588c844b" + sha256 arm64_linux: "eab424f31ed2b847de8ad0be1637b02471ea557609652143bb361c849f6603fb" + sha256 x86_64_linux: "649e38315d446085d93dfcf3014a204d878ceb68ff4d999cf7a42d4071af90ab" + end + + depends_on "cmake" => :build + depends_on "luarocks" => :build + depends_on "ffmpeg" + depends_on "freetype" + depends_on "lpeg" + depends_on "lua" + depends_on "sdl2" + depends_on "sdl2_mixer" + + uses_from_macos "curl" + + on_linux do + depends_on "mesa" + end + + resource "luafilesystem" do + url "https://github.com/keplerproject/luafilesystem/archive/refs/tags/v1_8_0.tar.gz" + sha256 "16d17c788b8093f2047325343f5e9b74cccb1ea96001e45914a58bbae8932495" + end + + def install + # Make sure I point to the right version! + lua = Formula["lua"] + + ENV["TARGET_BUILD_DIR"] = "." + ENV["FULL_PRODUCT_NAME"] = "CorsixTH.app" + + luapath = libexec/"vendor" + # Append `;;` to keep default search path. + ENV["LUA_PATH"] = luapath/"share/lua"/lua.version.major_minor/"?.lua;;" + ENV["LUA_CPATH"] = luapath/"lib/lua"/lua.version.major_minor/"?.so;;" + + resources.each do |r| + r.stage do + system "luarocks", "build", r.name, "--tree=#{luapath}" + end + end + + datadir = OS.mac? ? prefix/"CorsixTH.app/Contents/Resources/" : pkgshare + args = std_cmake_args + %W[ + -DLUA_INCLUDE_DIR=#{lua.opt_include}/lua + -DLUA_LIBRARY=#{lua.opt_lib/shared_library("liblua")} + -DLUA_PROGRAM_PATH=#{lua.opt_bin}/lua + -DCORSIX_TH_DATADIR=#{datadir} + ] + # On Linux, install binary to libexec/bin so we can put an env script with LUA_PATH in bin. + args << "-DCMAKE_INSTALL_BINDIR=#{libexec}/bin" unless OS.mac? + + system "cmake", ".", *args + system "make" + if OS.mac? + resources = %w[ + CorsixTH/CorsixTH.lua + CorsixTH/Lua + CorsixTH/Levels + CorsixTH/Campaigns + CorsixTH/Graphics + CorsixTH/Bitmap + ] + cp_r resources, "CorsixTH/CorsixTH.app/Contents/Resources/" + prefix.install "CorsixTH/CorsixTH.app" + else + system "make", "install" + end + + lua_env = { LUA_PATH: ENV["LUA_PATH"], LUA_CPATH: ENV["LUA_CPATH"] } + bin_path = OS.mac? ? prefix/"CorsixTH.app/Contents/MacOS/CorsixTH" : libexec/"bin/corsix-th" + (bin/"CorsixTH").write_env_script(bin_path, lua_env) + end + + test do + if OS.mac? + lua = Formula["lua"] + + app = prefix/"CorsixTH.app/Contents/MacOS/CorsixTH" + assert_includes app.dynamically_linked_libraries, "#{lua.opt_lib}/liblua.dylib" + end + + PTY.spawn(bin/"CorsixTH") do |r, _w, pid| + sleep 30 + sleep 30 if OS.mac? && Hardware::CPU.intel? + Process.kill "KILL", pid + + output = "" + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + + assert_match "Welcome to CorsixTH", output + end + end +end diff --git a/Formula/c/cortex.rb b/Formula/c/cortex.rb new file mode 100644 index 0000000000000..88b4eb031defb --- /dev/null +++ b/Formula/c/cortex.rb @@ -0,0 +1,92 @@ +class Cortex < Formula + desc "Long term storage for Prometheus" + homepage "https://cortexmetrics.io/" + url "https://github.com/cortexproject/cortex/archive/refs/tags/v1.19.1.tar.gz" + sha256 "f60a9584860d8e38333aa3914024ce09ee470397fdca9c9f3b22dac7f7873a41" + license "Apache-2.0" + head "https://github.com/cortexproject/cortex.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b62776abeb120125c7ea599f3fc47c7d7228a9b2f60111aee5ebb5bbf77e2571" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b62776abeb120125c7ea599f3fc47c7d7228a9b2f60111aee5ebb5bbf77e2571" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b62776abeb120125c7ea599f3fc47c7d7228a9b2f60111aee5ebb5bbf77e2571" + sha256 cellar: :any_skip_relocation, sonoma: "eaa377fe286bbe156180c732c1195df0a09e7905a5557ea73f1d7e2e2f9d94b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "849cadc60a79f7fac521fcf187b5bdcea6b5778bd1087963ca42d424ddc66d33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f14f66931599bc196ad88eccf933599f6d0e69104754f48a3b97ac3839b87ec8" + end + + depends_on "go" => :build + + conflicts_with "cortexso", because: "both install `cortex` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cortex" + inreplace "docs/configuration/single-process-config-blocks.yaml", "/tmp", var + etc.install "docs/configuration/single-process-config-blocks.yaml" => "cortex.yaml" + end + + service do + run [opt_bin/"cortex", "-config.file=#{etc}/cortex.yaml"] + keep_alive true + error_log_path var/"log/cortex.log" + log_path var/"log/cortex.log" + working_dir var + end + + test do + require "open3" + require "timeout" + + port = free_port + + # A minimal working config modified from + # https://github.com/cortexproject/cortex/blob/master/docs/configuration/single-process-config-blocks.yaml + (testpath/"data/alerts").mkpath + (testpath/"cortex.yaml").write <<~YAML + server: + http_listen_port: #{port} + ingester: + lifecycler: + ring: + kvstore: + store: inmemory + replication_factor: 1 + blocks_storage: + backend: filesystem + filesystem: + dir: #{testpath}/data/tsdb + + alertmanager: + external_url: http://localhost/alertmanager + + alertmanager_storage: + backend: local + local: + # Make sure file exist + path: #{testpath}/data/alerts + YAML + + Open3.popen3( + bin/"cortex", "-config.file=cortex.yaml", + "-server.grpc-listen-port=#{free_port}" + ) do |_, _, stderr, wait_thr| + Timeout.timeout(5) do + stderr.each do |line| + refute_match "level=error", line + # It is important to wait for this line. Finishing the test too early + # may shadow errors that only occur when modules are fully loaded. + break if line.include? "Cortex started" + end + output = shell_output("curl -s http://localhost:#{port}/services") + assert_match "Running", output + end + ensure + Process.kill "TERM", wait_thr.pid + end + end +end diff --git a/Formula/c/cortexso.rb b/Formula/c/cortexso.rb new file mode 100644 index 0000000000000..969c00d2cfa6c --- /dev/null +++ b/Formula/c/cortexso.rb @@ -0,0 +1,57 @@ +class Cortexso < Formula + desc "Drop-in, local AI alternative to the OpenAI stack" + homepage "https://jan.ai/cortex" + url "https://registry.npmjs.org/cortexso/-/cortexso-0.1.1.tgz" + sha256 "48efc16761eebfdd60e50211049554e7b781b30e56461042c6bf100e84d8d244" + license "Apache-2.0" + head "https://github.com/janhq/cortex.git", branch: "dev" + + bottle do + rebuild 2 + sha256 arm64_tahoe: "7c1735405ae8b08c0d395345a7ae8121a1e1669c955674a352352c54b981cadb" + sha256 arm64_sequoia: "fade5cc5bf426b17bf2f05dcd3e00d1973abff9916fdca7c1083f330a5354538" + sha256 arm64_sonoma: "0c1084a5601dfc13ccd2aed4ab3ffbf0d3784f739e9b814ab6e22fda00a7ed1b" + sha256 arm64_ventura: "ea7343468eadc0574cb6ce2cf2b6614b8750a5977f9228ef3d1dd42a4e0b8641" + sha256 sonoma: "b7e87930b4f4b3315d382bc46ca4c2207fe5b410c9054cee4e373f432738a7b3" + sha256 ventura: "72e19258cda334b426b5fc40cddc58e7c184778c2e97c9f0f7636b1debe53e38" + sha256 cellar: :any_skip_relocation, arm64_linux: "386e435cfaf38bc9e5730faf70bf67ed64e9c4b3f208646b832e0d4082866bdc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95cb135c5a9c3bc7194792b0dce8173b5bc261640f57ee4a8be05e31ec7cbfa3" + end + + deprecate! date: "2025-07-19", because: :repo_archived + + depends_on "node" + depends_on "sqlite" # needs sqlite3_enable_load_extension + + on_linux do + # Workaround for old `node-gyp` that needs distutils. + # TODO: Remove when `node-gyp` is v10+ + depends_on "python-setuptools" => :build + end + + conflicts_with "cortex", because: "both install `cortex` binaries" + + def install + system "npm", "install", "--sqlite=#{Formula["sqlite"].opt_prefix}", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Replace pre-built binaries + rm_r(libexec/"lib/node_modules/cortexso/node_modules/cpu-instructions/prebuilds") + cd libexec/"lib/node_modules/cortexso/node_modules/cpu-instructions" do + system "npm", "run", "build" + Pathname.glob("prebuilds/*/cpu-instructions.node").map { |f| f.rename(f.dirname/"cpuinfo.node") } + end + end + + test do + port = free_port + pid = fork { exec bin/"cortex", "serve", "--port", port.to_s } + sleep 10 + sleep 10 if OS.mac? && Hardware::CPU.intel? + begin + assert_match "OK", shell_output("curl -s localhost:#{port}/v1/health") + ensure + Process.kill "SIGTERM", pid + end + end +end diff --git a/Formula/c/cosign.rb b/Formula/c/cosign.rb new file mode 100644 index 0000000000000..135576399b9fa --- /dev/null +++ b/Formula/c/cosign.rb @@ -0,0 +1,43 @@ +class Cosign < Formula + desc "Container Signing" + homepage "https://github.com/sigstore/cosign" + url "https://github.com/sigstore/cosign.git", + tag: "v3.0.2", + revision: "84449696f0658a5ef5f2abba87fdd3f8b17ca1be" + license "Apache-2.0" + head "https://github.com/sigstore/cosign.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3dde83c263a87a98a67686edeb287e53faedaac9fd5188ba03b9b22f47d84d8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb0297b357500987bc8917e99463eaebb96db64b1886f66f5294bda83f2f3f7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f86385cce585dd213d5be6ecd7be138f4fb93e21985dcb9b103991ce6f62b12" + sha256 cellar: :any_skip_relocation, sonoma: "5e2a743b73c998651ad33d7dcc8fd8cdc3153266481009a67c99d7a2ce41fc1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c3805e3ab0d025c34ac4fcf72933801d7943c35c620988e3221c54f53fa5bbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e397f86eef678c27cab993b67aa18ee9e94394edd2faf39fff12cbede91c360" + end + + depends_on "go" => :build + + def install + pkg = "sigs.k8s.io/release-utils/version" + ldflags = %W[ + -s -w + -X #{pkg}.gitVersion=#{version} + -X #{pkg}.gitCommit=#{Utils.git_head} + -X #{pkg}.gitTreeState="clean" + -X #{pkg}.buildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/cosign" + + generate_completions_from_executable(bin/"cosign", "completion") + end + + test do + assert_match "Private key written to cosign.key", + pipe_output("#{bin}/cosign generate-key-pair 2>&1", "foo\nfoo\n") + assert_path_exists testpath/"cosign.pub" + + assert_match version.to_s, shell_output("#{bin}/cosign version 2>&1") + end +end diff --git a/Formula/c/cot.rb b/Formula/c/cot.rb new file mode 100644 index 0000000000000..aeb261304b8e9 --- /dev/null +++ b/Formula/c/cot.rb @@ -0,0 +1,31 @@ +class Cot < Formula + desc "Rust web framework for lazy developers" + homepage "https://cot.rs" + url "https://github.com/cot-rs/cot/archive/refs/tags/cot-v0.4.0.tar.gz" + sha256 "590ada9692fb28426f94280c1642bf2aa6c36fdc2c940ac71bc33011c4969b8d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a8ffcfb65d79e650fad48210f0e4047194bf48f7ac0e39fcd01f2bbb172de4b4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0918e6397771642e1d6b4c341e70172239d0e47f66bab6b4492c3ee5bcd2a339" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7becb7d2b615af5fdfbd8315ad84c7b1f5e3d0f6b1400d0b3e0e85a218d59fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a15ca90aa6c119e9d9cffb663514908d9d1ae708af9879379a34fad5d47a198" + sha256 cellar: :any_skip_relocation, sonoma: "a170f45a7999ec42ee9986877a0d75066b4d16f047ef2736fb2a4c48d14320e3" + sha256 cellar: :any_skip_relocation, ventura: "3179696b655c6e8e09d70d497e9efe8672ada1b9e243f55845904e7d0de9fe07" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c716a0e45b1a9eb0c66a3289bd62a724184e60685608df828620c69e70b512a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c61947e23edbe24f383949d80128c5e537c2641bf07a1409aec859bfc316091" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cot-cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/cot --version") + + system bin/"cot", "new", "test-project" + assert_path_exists testpath/"test-project/Cargo.toml" + end +end diff --git a/Formula/c/cotila.rb b/Formula/c/cotila.rb new file mode 100644 index 0000000000000..bea8eea65f79e --- /dev/null +++ b/Formula/c/cotila.rb @@ -0,0 +1,48 @@ +class Cotila < Formula + desc "Compile-time linear algebra system for C++" + homepage "https://github.com/calebzulawski/cotila" + url "https://github.com/calebzulawski/cotila/archive/refs/tags/1.2.1.tar.gz" + sha256 "898ebfdf562cd1a3622870e17a703b38559cf2c607b2d5f79e6b3a55563af619" + license "Apache-2.0" + head "https://github.com/calebzulawski/cotila.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8144c977b0567dff23206cbf5e24f7fc4aed78092dd187517e8813ca1e12f495" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + constexpr cotila::vector v1 {{1., -2., 3.}}; + constexpr cotila::vector v2 {1., 2., 3.}; + static_assert(v2 == cotila::abs(v1)); + + constexpr cotila::matrix m1 {{{1., 2., 3.}, {4., 5., 6.}}}; + constexpr cotila::matrix m2 {{{1., 4.}, {2., 5.}, {3., 6.}}}; + static_assert(m2 == cotila::transpose(m1)); + + constexpr cotila::matrix, 2, 2> m3 {{{{1., 0.}, {2., 1.}}, {{3., -1.}, {4., 2.}}}}; + constexpr cotila::matrix m4 {{{{1., 0.}, {3., 1.}}, {{2., -1.}, {4., -2.}}}}; + static_assert(m4 == cotila::hermitian(m3)); + + constexpr double s = cotila::sqrt(4.); + static_assert(s == 2.); + std::cout << s << std::endl; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-o", "test" + assert_equal "2\n", shell_output("./test") + end +end diff --git a/Formula/c/cotp.rb b/Formula/c/cotp.rb new file mode 100644 index 0000000000000..76c26186f74a1 --- /dev/null +++ b/Formula/c/cotp.rb @@ -0,0 +1,35 @@ +class Cotp < Formula + desc "TOTP/HOTP authenticator app with import functionality" + homepage "https://github.com/replydev/cotp" + url "https://github.com/replydev/cotp/archive/refs/tags/v1.9.7.tar.gz" + sha256 "6234805a8eb20a71d2acb07ad8d7827bd5c98c653b7eb733bab0f90cbb9f6212" + license "GPL-3.0-only" + head "https://github.com/replydev/cotp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1e40cfa0d477e95401ba5ab31c28936fb21ee4161487332139359b16aee9a7e8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f105e5170e4dfd99ac9c5705cfec4da962dd9d042c65391850ef52bf2188acb0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0d63eadd60c67e5ea688de26b2c2a593920df9912aee283b956e5de75070e8d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1af2f1c6dcccbc35ffd95afeec227c814d5d2c93f2ede99e39c40c2720473128" + sha256 cellar: :any_skip_relocation, sonoma: "66ffb02a6f5d8a79f14f4600ca48689e8dee207b0d9a8cde8dd38a6d4df7b8f6" + sha256 cellar: :any_skip_relocation, ventura: "7cd768133c3bfdbd0ea5fb6be8d5b1180054e80df9f22ddb3cd4469c314fc211" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1a5443da0a3e40a0bf4eeaa1628856e1450941b2525b8d11718f1cd015853b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1db73eb628d909682aa79db0465904835d5ca56e52f372f196e3c1c23d9837a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Proper test needs password input, so use error message for executable check + assert_match <<~EOS, shell_output("#{bin}/cotp edit 2>&1", 2) + error: the following required arguments were not provided: + --index + EOS + + assert_match version.to_s, shell_output("#{bin}/cotp --version") + end +end diff --git a/Formula/c/coturn.rb b/Formula/c/coturn.rb new file mode 100644 index 0000000000000..45487646cf719 --- /dev/null +++ b/Formula/c/coturn.rb @@ -0,0 +1,57 @@ +class Coturn < Formula + desc "Free open source implementation of TURN and STUN Server" + homepage "https://github.com/coturn/coturn" + url "https://github.com/coturn/coturn/archive/refs/tags/4.7.0.tar.gz" + sha256 "adbc90550d326e1b0fef4ccf9955c0ea32e63792acedcbc9cdbe9f71f380e622" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "a2aed13b2bfe94023e08c3071184104c18fe5d3a991d8d6fd0421e565ee85ee1" + sha256 arm64_sequoia: "fa977d739b4f45c90e117848b494943dc4c5862d4f7dca2eec9329b5f98ea1b7" + sha256 arm64_sonoma: "ef170c3be32ccca9f426c5ee91f2f1b2d6b23eab2d14b61a9dbef90634b3c184" + sha256 arm64_ventura: "370b0e1c912d181a353d10d5f809bb929a7ee62efd4e4b256f93be4d5f3ef8b2" + sha256 sonoma: "dfcd872aa3063d9c3fe48429a3eb0db83244f5c489133d58d019c0aaaf7e67f4" + sha256 ventura: "ca058c6f5813d62c5c96ee2a530f2af73788e1906f06c4dc8cebad1503d977e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "b38bb0504053fe35dc664db2c484db9490abe48835b14f90742240b3eafcc419" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f113db4b6046a08adfa26a0602d4a3855d6fef9f75958a0039a5778e7594aa12" + end + + depends_on "pkgconf" => :build + depends_on "hiredis" + depends_on "libevent" + depends_on "libpq" + depends_on "openssl@3" + + def install + ENV["SSL_CFLAGS"] = "-I#{Formula["openssl@3"].opt_include}" + ENV["SSL_LIBS"] = "-L#{Formula["openssl@3"].opt_lib} -lssl -lcrypto" + system "./configure", "--disable-silent-rules", + "--mandir=#{man}", + "--localstatedir=#{var}", + "--includedir=#{include}", + "--docdir=#{doc}", + *std_configure_args + + system "make", "install" + + man.mkpath + man1.install Dir["man/man1/*"] + end + + service do + run [opt_bin/"turnserver", "-c", etc/"turnserver.conf"] + keep_alive true + error_log_path var/"log/coturn.log" + log_path var/"log/coturn.log" + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"turnadmin", "-l" + end +end diff --git a/Formula/c/couchbase-shell.rb b/Formula/c/couchbase-shell.rb new file mode 100644 index 0000000000000..800f4a5361cf0 --- /dev/null +++ b/Formula/c/couchbase-shell.rb @@ -0,0 +1,38 @@ +class CouchbaseShell < Formula + desc "Modern and fun shell for Couchbase Server and Capella" + homepage "https://couchbase.sh" + url "https://github.com/couchbaselabs/couchbase-shell/archive/refs/tags/v1.1.0.tar.gz" + sha256 "2679e5e2655ea0744efe66cce665481d95676ef26d284ea0341311068ccfb972" + license "Apache-2.0" + head "https://github.com/couchbaselabs/couchbase-shell.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "decf67dd604aa1e82b3bb6cf51ec528cd6f840efb2887c613c1050daf01daa85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e4207cdae2d36437ad70fed865a844849ade6670facd075383a78a8152e8726" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "baeb1763d305776f71ac2519a2504f5904c4b166eca40f59dd2f6a5c4df1bb93" + sha256 cellar: :any_skip_relocation, arm64_ventura: "99354510fd9b1979a7da10ef2c67b282b0b029aca9450e3bbb8e1f2fca08801f" + sha256 cellar: :any_skip_relocation, sonoma: "cf75c7a65c8cddad02ca437e145f899dfae38e471df20f709f1119109a74b3c5" + sha256 cellar: :any_skip_relocation, ventura: "a379e347f9b4325c6521cb7e30b24f122b3738324e013ea77d224eaf3df56dcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "1789ab9a9d879369b2f7942f59ff171b8fa197f9c1f95029ff5914895cfc4ddc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfbddc03319d40472bdae18473f650e51a29c68b9e2574a58b36f363f43faca0" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + depends_on "libxcb" + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "homebrew_test", shell_output("#{bin}/cbsh -c '{ foo: 1, bar: homebrew_test} | get bar'") + end +end diff --git a/Formula/c/couchdb-lucene.rb b/Formula/c/couchdb-lucene.rb new file mode 100644 index 0000000000000..5ac21c3786f7c --- /dev/null +++ b/Formula/c/couchdb-lucene.rb @@ -0,0 +1,95 @@ +class CouchdbLucene < Formula + desc "Full-text search of CouchDB documents using Lucene" + homepage "https://github.com/rnewson/couchdb-lucene" + url "https://github.com/rnewson/couchdb-lucene/archive/refs/tags/v2.1.0.tar.gz" + sha256 "8297f786ab9ddd86239565702eb7ae8e117236781144529ed7b72a967224b700" + license "Apache-2.0" + revision 2 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e51dc09d265658f719623e8e19ae3500b9e798fddb6baacbfe17f31d5ed41dfd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f739d9de763e66d5ccfbfb3d14034352e0d9e0c4e37799aca78487b395f029a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eaa814fcca3f76e89a767b2ee41759690e5cfe7b90fac27e9b1c8be31c54126b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5729f57b791c90e176835e8ec3b21889b0a8e8b9dcd57c3e995cf377b8b0cd84" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dd2d73a35db77da8eaed04fc2f1afb87dcc995c1f79acbae54e831c36782b286" + sha256 cellar: :any_skip_relocation, sonoma: "a0bc6e1e6d57a43c6e38f9a10179104dcb080a9c1256026bfd1b6b3502ebbd2b" + sha256 cellar: :any_skip_relocation, ventura: "3db1128166f7c71200fcccf92414e16fc1a0f20921bd00a46460f508716aacbe" + sha256 cellar: :any_skip_relocation, monterey: "0bdd89c21b0a7f779e79afe8b44f816aa84a47680f78888d3ef9ca60d9bc59d6" + sha256 cellar: :any_skip_relocation, big_sur: "8c75a95f3c1909e99602f51ed4c55fc2eb495910d8772b9b693347c633141715" + sha256 cellar: :any_skip_relocation, catalina: "5888b91cbf5c0fe4744ee9f1cf0ca204f9dd89e125a06fc928375b1d2770ae87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d08b00d0ef852160eb6f5fef96f8cc9387b2fa4c29a792cfe9a13ccdf2d690b" + end + + disable! date: "2024-12-13", because: :repo_archived + + depends_on "maven" => :build + depends_on "couchdb" + depends_on "openjdk" + + def install + system "mvn" + system "tar", "-xzf", "target/couchdb-lucene-#{version}-dist.tar.gz", "--strip", "1" + + rm_r(Dir["bin/*.bat"]) + libexec.install Dir["*"] + + env = Language::Java.overridable_java_home_env + env["CL_BASEDIR"] = libexec/"bin" + Dir.glob("#{libexec}/bin/*") do |path| + bin_name = File.basename(path) + cmd = "cl_#{bin_name}" + (bin/cmd).write_env_script libexec/"bin/#{bin_name}", env + (libexec/"clbin").install_symlink bin/cmd => bin_name + end + + ini_path.write(ini_file) unless ini_path.exist? + end + + def ini_path + etc/"couchdb/local.d/couchdb-lucene.ini" + end + + def ini_file + <<~EOS + [httpd_global_handlers] + _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>} + EOS + end + + def caveats + <<~EOS + All commands have been installed with the prefix 'cl_'. + + If you really need to use these commands with their normal names, you + can add a "clbin" directory to your PATH from your bashrc like: + + PATH="#{opt_libexec}/clbin:$PATH" + EOS + end + + service do + run opt_bin/"cl_run" + environment_variables HOME: "~" + run_type :immediate + keep_alive true + end + + test do + # This seems to be the easiest way to make the test play nicely in our + # sandbox. If it works here, it'll work in the normal location though. + cp_r Dir[opt_prefix/"*"], testpath + inreplace "bin/cl_run", "CL_BASEDIR=\"#{libexec}/bin\"", + "CL_BASEDIR=\"#{testpath}/libexec/bin\"" + port = free_port + inreplace "libexec/conf/couchdb-lucene.ini", "port=5985", "port=#{port}" + + fork do + exec "#{testpath}/bin/cl_run" + end + sleep 5 + + output = JSON.parse shell_output("curl --silent localhost:#{port}") + assert_equal "Welcome", output["couchdb-lucene"] + assert_equal version, output["version"] + end +end diff --git a/Formula/c/couchdb.rb b/Formula/c/couchdb.rb new file mode 100644 index 0000000000000..21c17d455d23b --- /dev/null +++ b/Formula/c/couchdb.rb @@ -0,0 +1,79 @@ +class Couchdb < Formula + desc "Apache CouchDB database server" + homepage "https://couchdb.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=couchdb/source/3.5.0/apache-couchdb-3.5.0.tar.gz" + mirror "https://archive.apache.org/dist/couchdb/source/3.5.0/apache-couchdb-3.5.0.tar.gz" + sha256 "6a98b90a9a980bbef2c35b4996a8e71a2f1ae5227546c85f04c436101bdf78bf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bd3b94f54a24f135c734c12ccfad7c224d5fa0aaaed5e6952dc4ed59bf104cc4" + sha256 cellar: :any, arm64_sequoia: "494834ac7eb89abaa626f40da8e36d66d1baa25208461e4291ee8b137a966046" + sha256 cellar: :any, arm64_sonoma: "a2bc0d8e0b255d86fcf372d4018c9f93e9b3c7edc909b6c620eb29d3a24a8076" + sha256 cellar: :any, arm64_ventura: "330edda7ac863727ff503967b804b4478b56ed77da7bdf224e003f170e079233" + sha256 cellar: :any, sonoma: "d20b7f7a61e7ee14a2cf4bf79c6c2ab9a0bd04e87b1c9b21caec8960ec2eef5b" + sha256 cellar: :any, ventura: "caf1090e2e3afa205a16fd65a7eaf2648b357345485f33b2d739398f9d0ac6bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9f7686fac2918b759cf2b144a4bab228da34dbd4b6562ce8a615b68634cc9d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6950b0cef1186e7176df89242bab15c8840cae22df96f1adbbef0f18cf6c4b78" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "erlang" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "openssl@3" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + conflicts_with "ejabberd", because: "both install `jiffy` lib" + + def install + system "./configure", "--disable-spidermonkey", "--js-engine=quickjs" + system "make", "release" + # setting new database dir + inreplace "rel/couchdb/etc/default.ini", "./data", "#{var}/couchdb/data" + # remove windows startup script + rm("rel/couchdb/bin/couchdb.cmd") + # install files + prefix.install Dir["rel/couchdb/*"] + end + + def post_install + # creating database directory + (var/"couchdb/data").mkpath + end + + def caveats + <<~EOS + CouchDB 3.x requires a set admin password set before startup. + Add one to your #{etc}/local.ini before starting CouchDB e.g.: + [admins] + admin = youradminpassword + EOS + end + + service do + run opt_bin/"couchdb" + keep_alive true + end + + test do + cp_r prefix/"etc", testpath + port = free_port + inreplace "#{testpath}/etc/default.ini", "port = 5984", "port = #{port}" + inreplace "#{testpath}/etc/default.ini", "#{var}/couchdb/data", "#{testpath}/data" + inreplace "#{testpath}/etc/local.ini", ";admin = mysecretpassword", "admin = mysecretpassword" + + fork do + exec "#{bin}/couchdb -couch_ini #{testpath}/etc/default.ini #{testpath}/etc/local.ini" + end + sleep 30 + + output = JSON.parse shell_output("curl --silent localhost:#{port}") + assert_equal "Welcome", output["couchdb"] + end +end diff --git a/Formula/c/countdown.rb b/Formula/c/countdown.rb new file mode 100644 index 0000000000000..acffcf82a3089 --- /dev/null +++ b/Formula/c/countdown.rb @@ -0,0 +1,33 @@ +class Countdown < Formula + desc "Terminal countdown timer" + homepage "https://github.com/antonmedv/countdown" + url "https://github.com/antonmedv/countdown/archive/refs/tags/v1.5.0.tar.gz" + sha256 "ac83ec593674a367913413796e8708680cbb6504c8f68ce17152d800a92ccf3b" + license "MIT" + head "https://github.com/antonmedv/countdown.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3783ce1aac69480284935fffe165cf53ff59b361d303ab22344d276bf1ee1d25" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3ebc66b0ed891535e467c0061b52f350fae80fd2a3b77de1b1eb4eeb16580e39" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38a5941ae73ed1aceb80861659045b316492a0ca982022a747912f8585a67895" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38a5941ae73ed1aceb80861659045b316492a0ca982022a747912f8585a67895" + sha256 cellar: :any_skip_relocation, arm64_monterey: "38a5941ae73ed1aceb80861659045b316492a0ca982022a747912f8585a67895" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "38a5941ae73ed1aceb80861659045b316492a0ca982022a747912f8585a67895" + sha256 cellar: :any_skip_relocation, sonoma: "ddf45211af332196f188371a462c0af25b115d64e08d568c20370e5be9992b2f" + sha256 cellar: :any_skip_relocation, ventura: "ddf45211af332196f188371a462c0af25b115d64e08d568c20370e5be9992b2f" + sha256 cellar: :any_skip_relocation, monterey: "ddf45211af332196f188371a462c0af25b115d64e08d568c20370e5be9992b2f" + sha256 cellar: :any_skip_relocation, big_sur: "ddf45211af332196f188371a462c0af25b115d64e08d568c20370e5be9992b2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ba3dbb9ff589c36b45a9af95aad49d3c41536914f4337b9d4f982e501c7c14d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa3d5f2c9b3e7e4661b7aa92583175cd869bcfc37750b4a66dcb3e641be91554" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + pipe_output bin/"countdown", "0m0s" + end +end diff --git a/Formula/c/counterfeiter.rb b/Formula/c/counterfeiter.rb new file mode 100644 index 0000000000000..f046d1e21815a --- /dev/null +++ b/Formula/c/counterfeiter.rb @@ -0,0 +1,41 @@ +class Counterfeiter < Formula + desc "Tool for generating self-contained, type-safe test doubles in go" + homepage "https://github.com/maxbrunsfeld/counterfeiter" + url "https://github.com/maxbrunsfeld/counterfeiter/archive/refs/tags/v6.12.0.tar.gz" + sha256 "243a7bf5bc1a9c5a6706a02167484095dea53117ddff85a95c3bbe6e6f747ad7" + license "MIT" + head "https://github.com/maxbrunsfeld/counterfeiter.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "130d2eceffe514edcb9963172d3ba53e4f7f305c6bcba02a1b017f04bf6d66d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "130d2eceffe514edcb9963172d3ba53e4f7f305c6bcba02a1b017f04bf6d66d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "130d2eceffe514edcb9963172d3ba53e4f7f305c6bcba02a1b017f04bf6d66d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "130d2eceffe514edcb9963172d3ba53e4f7f305c6bcba02a1b017f04bf6d66d3" + sha256 cellar: :any_skip_relocation, sonoma: "1885bde70e3079aae4cdab53b2f9dcdb26d8858216b032fa08c62aabb1707fd3" + sha256 cellar: :any_skip_relocation, ventura: "1885bde70e3079aae4cdab53b2f9dcdb26d8858216b032fa08c62aabb1707fd3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d77971fadf28f655e931e5be98eef407164e43ddf83920f24e005e429d5b3d7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddf079abd97a86edf1595a3b43b5f04783f0fdd6ccd69f8a127e6d672c7a81cb" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + ENV["GOROOT"] = Formula["go"].opt_libexec + + output = shell_output("#{bin}/counterfeiter -p os 2>&1") + assert_path_exists testpath/"osshim" + assert_match "Writing `Os` to `osshim/os.go`...", output + + output = shell_output("#{bin}/counterfeiter -generate 2>&1", 1) + assert_match "no buildable Go source files", output + end +end diff --git a/Formula/c/counts.rb b/Formula/c/counts.rb new file mode 100644 index 0000000000000..395be37046fa1 --- /dev/null +++ b/Formula/c/counts.rb @@ -0,0 +1,55 @@ +class Counts < Formula + desc "Tool for ad hoc profiling" + homepage "https://github.com/nnethercote/counts" + url "https://github.com/nnethercote/counts/archive/refs/tags/1.0.6.tar.gz" + sha256 "4d3394b32afa98b91fd624a9c4df690d07fa1d6559cd87bb82a4bde6131fbc5f" + license "Unlicense" + head "https://github.com/nnethercote/counts.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "24d9ace69ae8a6c2bdb85fcb5c1c42b53f73209bb2a9958cd02e2b1aaff40fe4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "104e0c1a70c346de9a881f3604a940409c21292be6f728bad0d317423d7e3302" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "199acdd7193a93a8431adcd011441e85c609dcd6b31060fca9663d623d841ab1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2fd0e4ee5182e9000723388e231d8fe2f7ba902e33224c6f1f48bb7e186e3c23" + sha256 cellar: :any_skip_relocation, sonoma: "c5408f15252264a19fabff4a2370e9b222c2c1519f94016d807eacf44831ec13" + sha256 cellar: :any_skip_relocation, ventura: "da24a18685e6e26d88c71a4e10dc1639234f798e29c85e118e06728a792a4c4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "43508d50d22d1ced7b27695086b8c16a38b217a48aeb999d80e60ad2835d544e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d38003ebf1f3fd5c46e7ce4e87190f617d81a20ac8bc9ff91f8cdb4eddb9374" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.txt").write <<~EOS + a 1 + b 2 + c 3 + d 4 + d 4 + c 3 + c 3 + d 4 + b 2 + d 4 + EOS + + output = shell_output("#{bin}/counts test.txt") + expected = <<~EOS + 10 counts + ( 1) 4 (40.0%, 40.0%): d 4 + ( 2) 3 (30.0%, 70.0%): c 3 + ( 3) 2 (20.0%, 90.0%): b 2 + ( 4) 1 (10.0%,100.0%): a 1 + EOS + + assert_equal expected, output + + assert_match "counts-#{version}", shell_output("#{bin}/counts --version", 1) + end +end diff --git a/Formula/c/coursier.rb b/Formula/c/coursier.rb new file mode 100644 index 0000000000000..dcf2fab7a8060 --- /dev/null +++ b/Formula/c/coursier.rb @@ -0,0 +1,34 @@ +class Coursier < Formula + desc "Pure Scala Artifact Fetching" + homepage "https://get-coursier.io/" + url "https://github.com/coursier/coursier/releases/download/v2.1.24/coursier.jar" + sha256 "8c724dc204534353ea8263ba0af624979658f7ab62395f35b04f03ce5714f330" + license "Apache-2.0" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "3e90a3dd8a4c8ac572b350cf5b92a71035a97ab67fcf57c4207025cad73cc863" + end + + depends_on "openjdk" + + def install + (libexec/"bin").install "coursier.jar" + chmod 0755, libexec/"bin/coursier.jar" + (bin/"coursier").write_env_script libexec/"bin/coursier.jar", Language::Java.overridable_java_home_env + + generate_completions_from_executable("bash", bin/"coursier", "completions", shells: [:bash, :zsh]) + end + + test do + system bin/"coursier", "list" + assert_match "scalafix", shell_output("#{bin}/coursier search scalafix") + end +end diff --git a/Formula/c/cowsay.rb b/Formula/c/cowsay.rb new file mode 100644 index 0000000000000..c55c7c37a4cfb --- /dev/null +++ b/Formula/c/cowsay.rb @@ -0,0 +1,24 @@ +class Cowsay < Formula + desc "Apjanke's fork of the classic cowsay project" + homepage "https://cowsay.diamonds" + url "https://github.com/cowsay-org/cowsay/archive/refs/tags/v3.8.4.tar.gz" + sha256 "c15bc10712835d3a9bcda780dc9453362567bf48d1185905dc7ef2334d79aadd" + license "GPL-3.0-only" + head "https://github.com/cowsay-org/cowsay.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "345e99255a69e9cb188a5a8e6bd8e6f50c334830c8a72877fc6b504c95e5cbd1" + end + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + output = shell_output("#{bin}/cowsay moo") + assert_match "moo", output # bubble + assert_match "^__^", output # cow + end +end diff --git a/Formula/c/cp2k.rb b/Formula/c/cp2k.rb new file mode 100644 index 0000000000000..38dab81296e2f --- /dev/null +++ b/Formula/c/cp2k.rb @@ -0,0 +1,123 @@ +class Cp2k < Formula + desc "Quantum chemistry and solid state physics software package" + homepage "https://www.cp2k.org/" + url "https://github.com/cp2k/cp2k/releases/download/v2025.1/cp2k-2025.1.tar.bz2" + sha256 "65c8ad5488897b0f995919b9fa77f2aba4b61677ba1e3c19bb093d5c08a8ce1d" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "444d3d295a337c9248256b7fedff8a3659b739645d968839dd926623098ff329" + sha256 arm64_sequoia: "46b2e75543dc15952e00a6614a0257225b5ed00d8c038cfb3546061a8e6446bb" + sha256 arm64_sonoma: "c2b1c3f70cc13fb9c89b8b5713a1702715e3ee01584ddb1113780ddfceeaf7ac" + sha256 arm64_ventura: "1f4f74b1fcb70f1f88625059dfa197e5fd00cdd6560de061f8b7a709a3abec28" + sha256 sonoma: "d6b69ff15f5582ebe7093c86e9664aae11e1e2670eb428d83f774c2507592133" + sha256 ventura: "da3a27206ed2d1345338e3c764cf485cf003f13db52b38ec99be75eece741913" + sha256 arm64_linux: "0e8bcf5883b48d160e1c7f8e0b58f4cec83251fa118875fa88ed15bde4df5730" + sha256 x86_64_linux: "92120af9f50b710a84a8637f0294803f1ec745d4c49f3a9d19258955ded5e5bb" + end + + depends_on "cmake" => :build + depends_on "fypp" => :build + depends_on "pkgconf" => :build + + depends_on "fftw" + depends_on "gcc" # for gfortran + depends_on "libxc" + depends_on "open-mpi" + depends_on "openblas" + depends_on "scalapack" + + uses_from_macos "python" => :build + + fails_with :clang do + cause "needs OpenMP support for C/C++ and Fortran" + end + + resource "libint" do + url "https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz" + sha256 "1cd72206afddb232bcf2179c6229fbf6e42e4ba8440e701e6aa57ff1e871e9db" + end + + def install + resource("libint").stage do + # Work around failure: ld: Assertion failed: (slot < _sideTableBuffer.size()), function addAtom + if DevelopmentTools.clang_build_version == 1500 && Hardware::CPU.arm? + inreplace "Makefile.in", "$(LTLINKLIBOPTS)", "\\0 -Wl,-ld_classic" + end + + system "./configure", "--disable-static", + "--enable-shared", + "--enable-fortran", + "--with-pic", + *std_configure_args(prefix: libexec) + system "make" + ENV.deparallelize { system "make", "install" } + ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" + end + + # TODO: Add workaround to link to LLVM OpenMP (libomp) with gfortran after migrating OpenBLAS + omp_args = [] + # if OS.mac? + # omp_args << "-DOpenMP_Fortran_LIB_NAMES=omp" + # omp_args << "-DOpenMP_omp_LIBRARY=#{Formula["libomp"].opt_lib}/libomp.dylib" + # end + + # TODO: Remove dbcsr build along with corresponding CMAKE_PREFIX_PATH + # and add -DCP2K_BUILD_DBCSR=ON once `cp2k` build supports this option. + system "cmake", "-S", "exts/dbcsr", "-B", "build_psmp/dbcsr", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DWITH_EXAMPLES=OFF", + *omp_args, *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build_psmp/dbcsr" + system "cmake", "--install", "build_psmp/dbcsr" + # Need to build another copy for non-MPI variant. + system "cmake", "-S", "exts/dbcsr", "-B", "build_ssmp/dbcsr", + "-DUSE_MPI=OFF", + "-DWITH_EXAMPLES=OFF", + *omp_args, *std_cmake_args(install_prefix: buildpath/"dbcsr") + system "cmake", "--build", "build_ssmp/dbcsr" + system "cmake", "--install", "build_ssmp/dbcsr" + + # Avoid trying to access /proc/self/statm on macOS + ENV.append "FFLAGS", "-D__NO_STATM_ACCESS" if OS.mac? + + # Set -lstdc++ to allow gfortran to link libint + cp2k_cmake_args = %W[ + -DCMAKE_SHARED_LINKER_FLAGS=-lstdc++ + -DCMAKE_INSTALL_RPATH=#{rpath};#{rpath(target: libexec/"lib")} + -DCP2K_BLAS_VENDOR=OpenBLAS + -DCP2K_USE_LIBINT2=ON + -DCP2K_USE_LIBXC=ON + ] + omp_args + std_cmake_args + + system "cmake", "-S", ".", "-B", "build_psmp/cp2k", + "-DCMAKE_PREFIX_PATH=#{libexec}", + *cp2k_cmake_args + system "cmake", "--build", "build_psmp/cp2k" + system "cmake", "--install", "build_psmp/cp2k" + + # Only build the main executable for non-MPI variant as libs conflict. + # Can consider shipping MPI and non-MPI variants as separate formulae + # or removing one variant depending on usage. + system "cmake", "-S", ".", "-B", "build_ssmp/cp2k", + "-DBUILD_SHARED_LIBS=OFF", + "-DCMAKE_PREFIX_PATH=#{buildpath}/dbcsr;#{libexec}", + "-DCP2K_USE_MPI=OFF", + *cp2k_cmake_args + system "cmake", "--build", "build_ssmp/cp2k", "--target", "cp2k-bin" + bin.install Dir["build_ssmp/cp2k/bin/*.ssmp"] + + (pkgshare/"tests").install "tests/Fist/water.inp" + end + + test do + system bin/"cp2k.ssmp", pkgshare/"tests/water.inp" + system "mpirun", bin/"cp2k.psmp", pkgshare/"tests/water.inp" + end +end diff --git a/Formula/c/cpanminus.rb b/Formula/c/cpanminus.rb new file mode 100644 index 0000000000000..cda26679f410d --- /dev/null +++ b/Formula/c/cpanminus.rb @@ -0,0 +1,43 @@ +class Cpanminus < Formula + desc "Get, unpack, build, and install modules from CPAN" + homepage "https://github.com/miyagawa/cpanminus" + # Don't use git tags, their naming is misleading + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7048.tar.gz" + sha256 "59b60907ab9fa4f72ca2004fbe6054911439ae9a906890b4d842a87b25f20f3c" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + version_scheme 1 + + head "https://github.com/miyagawa/cpanminus.git", branch: "devel" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e7998b2229d3419be9c48b534addac8852e302f9ab56bdfe13203fc5dcd8c274" + end + + depends_on "perl" => :build + + def install + cd "App-cpanminus" if build.head? + + system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}", + "INSTALLSITEMAN1DIR=#{man1}", + "INSTALLSITEMAN3DIR=#{man3}" + system "make", "install" + + inreplace_files = [ + buildpath/"README", + bin/"cpanm", + lib/"perl5/App/cpanminus/fatscript.pm", + lib/"perl5/App/cpanminus.pm", + man3/"App::cpanminus.3", + ] + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX, audit_result: build.stable? + + # Needed for dependents that might use Homebrew perl or system perl. + inreplace bin/"cpanm", %r{^#!#{Regexp.escape(Formula["perl"].opt_bin)}/perl$}, "#!/usr/bin/env perl" + end + + test do + assert_match "cpan.metacpan.org", stable.url, "Don't use git tags, their naming is misleading" + system bin/"cpanm", "--local-lib=#{testpath}/perl5", "Test::More" + end +end diff --git a/Formula/c/cpdf.rb b/Formula/c/cpdf.rb new file mode 100644 index 0000000000000..78c87f2b40408 --- /dev/null +++ b/Formula/c/cpdf.rb @@ -0,0 +1,58 @@ +class Cpdf < Formula + desc "PDF Command-line Tools" + homepage "https://github.com/johnwhitington/cpdf-source" + url "https://github.com/johnwhitington/cpdf-source/archive/refs/tags/v2.8.1.tar.gz" + sha256 "bdd7caf1e5e55e65e4ece96eeeb3e5894c195ca5a9a274ddc27ac50a321d5c75" + license "AGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c3a25d6ed520e5a2a997da0992156246005d2449a26fb7a96132520764c0ea18" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e97a2d112914e6eac5e522a8663deb1771ef04e8296fdf34db39558a0dadca23" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b36ddb34c391665d5337de6b63118487263285b5917528d4c52847510af548d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91772514307f75224ff0558fcc18999cf76cb7603851a5f94258e272bfb3a5a0" + sha256 cellar: :any_skip_relocation, sonoma: "5e63b9e7612e18c9c577aa502c7be73ee534e46650c51911372ab8ec032e0b8c" + sha256 cellar: :any_skip_relocation, ventura: "ede4654c045aea5a2aff498c6bd77f3ff8d284df6c7dfc5c5ed0bd491c96d188" + sha256 cellar: :any_skip_relocation, arm64_linux: "b190429b65b7f9dec51957e6f876901572d403a056db2bb37939b64b50d2df0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bcaa237cb5ad235f05cab8067bac39d4a57aa49195462872f409195a744b4aa" + end + + depends_on "ocaml-findlib" => :build + depends_on "camlpdf" + depends_on "ocaml" + + def install + # For OCamlmakefile + ENV.deparallelize + + # Work around for https://github.com/Homebrew/homebrew-test-bot/issues/805 + if ENV["HOMEBREW_GITHUB_ACTIONS"] && !(Formula["ocaml-findlib"].etc/"findlib.conf").exist? + ENV["OCAMLFIND_CONF"] = Formula["ocaml-findlib"].opt_libexec/"findlib.conf" + end + + ENV["OCAMLFIND_DESTDIR"] = lib/"ocaml" + + (lib/"ocaml").mkpath + cp Formula["ocaml"].opt_lib/"ocaml/Makefile.config", lib/"ocaml" + + # install in #{lib}/ocaml not #{HOMEBREW_PREFIX}/lib/ocaml + inreplace lib/"ocaml/Makefile.config" do |s| + s.change_make_var! "prefix", prefix + end + + system "make" + (lib/"ocaml/stublibs").mkpath # `make install` assumes this directory exists + system "make", "install", "STDLIBDIR=#{lib}/ocaml" + + rm lib/"ocaml/Makefile.config" # avoid conflict with ocaml + + bin.install "cpdf" + end + + test do + system bin/"cpdf", "-create-pdf", "-o", "out.pdf" + assert_match version.to_s, shell_output(bin/"cpdf") + assert_path_exists testpath/"out.pdf" + end +end diff --git a/Formula/c/cpi.rb b/Formula/c/cpi.rb new file mode 100644 index 0000000000000..a95bd52790715 --- /dev/null +++ b/Formula/c/cpi.rb @@ -0,0 +1,57 @@ +class Cpi < Formula + desc "Tiny c++ interpreter" + homepage "https://treefrogframework.github.io/cpi/" + url "https://github.com/treefrogframework/cpi/archive/refs/tags/v2.2.2.tar.gz" + sha256 "f1cf314377e3576b2fae021c82efc252f03cf17cd7b8186cc6937bb3b0ff71cb" + license "MIT" + head "https://github.com/treefrogframework/cpi.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ebc8bcf9165cc4f7d1fde637a79c4b871072c74b93358687311e97cd7e126cfd" + sha256 cellar: :any, arm64_sequoia: "6bea475fa5b517cf42faebb459b104fc8d868dfe5e03cf097e37eb7fb0512a0d" + sha256 cellar: :any, arm64_sonoma: "391aa4186fc5c5c6f976bcf61bbd8ec7f311e352194b8595ad97da4db246a260" + sha256 cellar: :any, sonoma: "80aa4416afead86fe0621e8c53874dbfd951ff6fc40e8a7641c26cd1a382ab31" + sha256 cellar: :any_skip_relocation, arm64_linux: "5748c1ce40a957f82c6e288901004c36c8b4aec5d8580828c561fd153e6388ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be937b51660f2d5f2664a132c73b928706be340356100c74b7ebb507c7ec436b" + end + + depends_on "qtbase" + + uses_from_macos "llvm" + + def install + system "qmake", "CONFIG+=release", "target.path=#{bin}" + system "make" + system "make", "install" + end + + test do + (testpath/"test1.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello world" << std::endl; + return 0; + } + CPP + + assert_match "Hello world", shell_output("#{bin}/cpi #{testpath}/test1.cpp") + + (testpath/"test2.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + if (argc != 2) return 0; + + std::cout << sqrt(atoi(argv[1])) << std::endl; + return 0; + } + // CompileOptions: -lm + CPP + + assert_match "1.41421", shell_output("#{bin}/cpi #{testpath}/test2.cpp 2") + end +end diff --git a/Formula/c/cpio.rb b/Formula/c/cpio.rb new file mode 100644 index 0000000000000..c0144dc5dabc0 --- /dev/null +++ b/Formula/c/cpio.rb @@ -0,0 +1,45 @@ +class Cpio < Formula + desc "Copies files into or out of a cpio or tar archive" + homepage "https://www.gnu.org/software/cpio/" + url "https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.bz2" + mirror "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.bz2" + sha256 "937610b97c329a1ec9268553fb780037bcfff0dcffe9725ebc4fd9c1aa9075db" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1aa072a11ce1402aaf38319e6fc087b9bf4fa029f2b76cc748b0d122f0cdce0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fced3fb939f4c350d3ba4b81b2b071d9510728ea28135429cdc150d40f7a1477" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fd07e72e7f35a4b9e3c7114906c3d791c59adc2cf91b5cf9fed06962e08be3d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75fbea8507a8460214cc41c28fdf6926422d246f970e67a701e5e946703a8705" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bdad2638579eb0a993bad15fd244fafe6ce6383c58b4d09df5c98d8902cbbc2c" + sha256 cellar: :any_skip_relocation, sonoma: "e260092a61bec8fc1530706591dca1fc31b01588d87edc3d1f0114f0960039e6" + sha256 cellar: :any_skip_relocation, ventura: "7ae883284d803554f4f3076ab924591d1238a2e73847d852decf8c4e78757494" + sha256 cellar: :any_skip_relocation, monterey: "a1c05981aecaf5198d77c3d1b306e4923494c1d22d0f6bbfd1b1f344b35732b9" + sha256 arm64_linux: "dd5fa00e86db6b05086c040acbecdb7b0867c3eded3b4a49cf5033afbcba5bb2" + sha256 x86_64_linux: "33defec9f9f862c3db63da0e7ca4020a8fe6552fb51f3adfdf6d01837ce7fdda" + end + + keg_only :shadowed_by_macos, "macOS provides cpio" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + + return if OS.mac? + + # Delete rmt, which causes conflict with `gnu-tar` + (libexec/"rmt").unlink + (man8/"rmt.8").unlink + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + CPP + system "ls #{testpath} | #{bin}/cpio -ov > #{testpath}/directory.cpio" + assert_path_exists "#{testpath}/directory.cpio" + end +end diff --git a/Formula/c/cpl.rb b/Formula/c/cpl.rb new file mode 100644 index 0000000000000..c093da734aa5a --- /dev/null +++ b/Formula/c/cpl.rb @@ -0,0 +1,61 @@ +class Cpl < Formula + desc "ISO-C libraries for developing astronomical data-reduction tasks" + homepage "https://www.eso.org/sci/software/cpl/" + url "https://ftp.eso.org/pub/dfs/pipelines/libraries/cpl/cpl-7.3.2.tar.gz" + sha256 "a50c265a8630e61606567d153d3c70025aa958a28473a2411585b96894be7720" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://ftp.eso.org/pub/dfs/pipelines/libraries/cpl/" + regex(/href=.*?cpl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c6ae6b7cb1a84a01d0cf02626e62fa069c69ce1ddd58da71a7dbc650f4c233b5" + sha256 cellar: :any, arm64_sequoia: "44e6e7500a5c7a392a2b4d6ec6aeb8572da5c72ed27650293780e481d3fd05bf" + sha256 cellar: :any, arm64_sonoma: "710c0bce11e34ef18dcba1f2c592b82827daa9027a2e6ffdf7a5523db746f4c3" + sha256 cellar: :any, arm64_ventura: "867112ff76fc10a5a8ccf3871398c4057aba8aac147f0452f4b74e60f30c1417" + sha256 cellar: :any, arm64_monterey: "dc4fd5e0d10ebb4d9d3ae0d4c2138765e28e9185f2810fa9f5397ceb6874d409" + sha256 cellar: :any, arm64_big_sur: "1546444c73b9c83ad97136d5fe48bcd6bee09dd72ed9de6b8ce650a6cbf28610" + sha256 cellar: :any, sonoma: "a66a7bc13c9683f48d18ad24928ff5effa8737e61ac08da1717de9bb24d5de24" + sha256 cellar: :any, ventura: "fc6cfb837a591afec3369fa882e5abbd9d806f9d67ed83bd9f345ce3d89a4415" + sha256 cellar: :any, monterey: "a74afb54620905b6ae184bf64d73f67713e1016e27f97a6db6b793c72b4ba646" + sha256 cellar: :any, big_sur: "2fff6fb7574c82deb23328136b2666cd181d864fe09eb42780bea78cf63327a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcd05867d38798a06a3afcac0afff080e67484785148b6d412031f44a9e44d4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90683dbc3fc0a9636c4fe77573a82895cd369ff2449d140a6ba5e84db6d571dc" + end + + depends_on "cfitsio" + depends_on "fftw" + depends_on "wcslib" + + conflicts_with "gdal", because: "both install cpl_error.h" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-cfitsio=#{Formula["cfitsio"].prefix}", + "--with-fftw=#{Formula["fftw"].prefix}", + "--with-wcslib=#{Formula["wcslib"].prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(){ + cpl_init(CPL_INIT_DEFAULT); + cpl_msg_info("hello()", "Hello, world!"); + cpl_end(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lcplcore", "-lcext", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cpm.rb b/Formula/c/cpm.rb new file mode 100644 index 0000000000000..8c8d97465a5e9 --- /dev/null +++ b/Formula/c/cpm.rb @@ -0,0 +1,228 @@ +class Cpm < Formula + desc "Fast CPAN module installer" + homepage "https://metacpan.org/pod/cpm" + url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/App-cpm-0.997024.tar.gz" + sha256 "df02d482d90332ed61dd2a7c80732395e941eb915374f00af546e1c079542805" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/skaji/cpm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dbead6c7e33c44e7ff776c9956e7cd967c6e32f90fe0024878af23eec6e2808a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dbead6c7e33c44e7ff776c9956e7cd967c6e32f90fe0024878af23eec6e2808a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dbead6c7e33c44e7ff776c9956e7cd967c6e32f90fe0024878af23eec6e2808a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dbead6c7e33c44e7ff776c9956e7cd967c6e32f90fe0024878af23eec6e2808a" + sha256 cellar: :any_skip_relocation, sonoma: "14c29a0ad8003123cf2fc5678c9d4a3007c2d9ad8370cde04b239d3bb17b4a73" + sha256 cellar: :any_skip_relocation, ventura: "14c29a0ad8003123cf2fc5678c9d4a3007c2d9ad8370cde04b239d3bb17b4a73" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fe4c6156af388c2e7da92af459701b3ff4363d28ef5572c5376a79f83268b3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6cbb93b5de45609b18ad6872d33b2a118002cf6dcf47d4ef6fe75e4c4f6ec0e" + end + + depends_on "perl" + + conflicts_with "yaze-ag", because: "both install `cpm` binaries" + + resource "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.052.tar.gz" + sha256 "bd10452c9f24d4b4fe594126e3ad231bab6cebf16acda40a4e8dc784907eb87f" + end + + resource "CPAN::Common::Index" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Common-Index-0.010.tar.gz" + sha256 "c43ddbb22fd42b06118fe6357f53700fbd77f531ba3c427faafbf303cbf4eaf0" + end + + resource "CPAN::DistnameInfo" do + url "https://cpan.metacpan.org/authors/id/G/GB/GBARR/CPAN-DistnameInfo-0.12.tar.gz" + sha256 "2f24fbe9f7eeacbc269d35fc61618322fc17be499ee0cd9018f370934a9f2435" + end + + resource "CPAN::Meta::Check" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/CPAN-Meta-Check-0.018.tar.gz" + sha256 "f619d2df5ea0fd91c8cf83eb54acccb5e43d9e6ec1a3f727b3d0ac15d0cf378a" + end + + resource "Capture::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.50.tar.gz" + sha256 "ca6e8d7ce7471c2be54e1009f64c367d7ee233a2894cacf52ebe6f53b04e81e5" + end + + resource "Class::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-1.008.tar.gz" + sha256 "ee058a63912fa1fcb9a72498f56ca421a2056dc7f9f4b67837446d6421815615" + end + + resource "Command::Runner" do + url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Command-Runner-0.201.tar.gz" + sha256 "38e3294ae9ffd015625d7746a0803cc329de92fb0f0edae9a29cd8232cf458d3" + end + + resource "Darwin::InitObjC" do + url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Darwin-InitObjC-0.001.tar.gz" + sha256 "9a5f2887cb2fd427d64937743ffe3e748eab38b5b64906185fc243861e189f91" + end + + resource "ExtUtils::Config" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.010.tar.gz" + sha256 "82e7e4e90cbe380e152f5de6e3e403746982d502dd30197a123652e46610c66d" + end + + resource "ExtUtils::Helpers" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.028.tar.gz" + sha256 "c8574875cce073e7dc5345a7b06d502e52044d68894f9160203fcaab379514fe" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.014.tar.gz" + sha256 "ae65d20cc3c7e14b3cd790915c84510f82dfb37a4c9b88aa74b2e843af417d01" + end + + resource "ExtUtils::MakeMaker::CPANfile" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.09.tar.gz" + sha256 "2c077607d4b0a108569074dff76e8168659062ada3a6af78b30cca0d40f8e275" + end + + resource "File::Copy::Recursive" do + url "https://cpan.metacpan.org/authors/id/D/DM/DMUEY/File-Copy-Recursive-0.45.tar.gz" + sha256 "d3971cf78a8345e38042b208bb7b39cb695080386af629f4a04ffd6549df1157" + end + + resource "File::Which" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz" + sha256 "3201f1a60e3f16484082e6045c896842261fc345de9fb2e620fd2a2c7af3a93a" + end + + resource "File::pushd" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-pushd-1.016.tar.gz" + sha256 "d73a7f09442983b098260df3df7a832a5f660773a313ca273fa8b56665f97cdc" + end + + resource "HTTP::Tinyish" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-0.19.tar.gz" + sha256 "e9ce94a9913f9275d312ded4ddb34f76baf011b6b8d6029ff2871d5bd7bae468" + end + + resource "IPC::Run3" do + url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/IPC-Run3-0.049.tar.gz" + sha256 "9d048ae7b9ae63871bae976ba01e081d887392d904e5d48b04e22d35ed22011a" + end + + resource "Menlo" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-1.9019.tar.gz" + sha256 "3b573f68e7b3a36a87c860be258599330fac248b518854dfb5657ac483dca565" + end + + resource "Menlo::Legacy" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-Legacy-1.9022.tar.gz" + sha256 "a6acac3fee318a804b439de54acbc7c27f0b44cfdad8551bbc9cd45986abc201" + end + + resource "Module::CPANfile" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Module-CPANfile-1.1004.tar.gz" + sha256 "88efbe2e9a642dceaa186430fedfcf999aaf0e06f6cced28a714b8e56b514921" + end + + resource "Module::cpmfile" do + url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Module-cpmfile-0.006.tar.gz" + sha256 "1bc976e2937724896c9f6eae9e5dca981e27f98430b92de270ee3514fd00ac0f" + end + + resource "Parallel::Pipes" do + url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Parallel-Pipes-0.201.tar.gz" + sha256 "b73cbdd4202b29eab97e0c08dcd59d9273633610e8721cf449078656bd591a7c" + end + + resource "Parse::PMFile" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Parse-PMFile-0.47.tar.gz" + sha256 "26817cf3d72e245452375dcff9e923a061ee0a40bbf060d3a08ebe60a334aaae" + end + + resource "String::ShellQuote" do + url "https://cpan.metacpan.org/authors/id/R/RO/ROSCH/String-ShellQuote-1.04.tar.gz" + sha256 "e606365038ce20d646d255c805effdd32f86475f18d43ca75455b00e4d86dd35" + end + + resource "Tie::Handle::Offset" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Tie-Handle-Offset-0.004.tar.gz" + sha256 "ee9f39055dc695aa244a252f56ffd37f8be07209b337ad387824721206d2a89e" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.32.tar.gz" + sha256 "9632067d34e14e0dae2da94631c4f25a387fcc48d06fa29330e8b3c04c4e913d" + end + + resource "Win32::ShellQuote" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Win32-ShellQuote-0.003001.tar.gz" + sha256 "aa74b0e3dc2d41cd63f62f853e521ffd76b8d823479a2619e22edb4049b4c0dc" + end + + resource "YAML::PP" do + url "https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-PP-v0.39.0.tar.gz" + sha256 "32f53c65781277dcbe50827b4cbf217eceeff264779e3a6c98c94229eb149f58" + end + + resource "local::lib" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000029.tar.gz" + sha256 "8df87a10c14c8e909c5b47c5701e4b8187d519e5251e87c80709b02bb33efdd7" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + build_pl = [ + "Module::Build::Tiny", + "Module::cpmfile", + "Command::Runner", + "Darwin::InitObjC", + "Parallel::Pipes", + ] + + resources.each do |r| + r.stage do + next if build_pl.include? r.name + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + build_pl.each do |name| + resource(name).stage do + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + + (bin/"cpm").write_env_script("#{libexec}/bin/cpm", PERL5LIB: ENV["PERL5LIB"]) + man1.install_symlink libexec/"man/man1/cpm.1" + man3.install_symlink Dir[libexec/"man/man3/App::cpm*"].reject { |f| File.empty?(f) } + end + + test do + system bin/"cpm", "install", "Perl::Tutorial" + + expected = <<~EOS + NAME + Perl::Tutorial::HelloWorld - Hello World for Perl + + SYNOPSIS + #!/usr/bin/perl + # + # The traditional first program. + + # Strict and warnings are recommended. + use strict; + use warnings; + + # Print a message. + print "Hello, World!\\n"; + EOS + assert_match expected, + shell_output("PERL5LIB=local/lib/perl5 perldoc Perl::Tutorial::HelloWorld") + end +end diff --git a/Formula/c/cpmtools.rb b/Formula/c/cpmtools.rb new file mode 100644 index 0000000000000..5a122376443d5 --- /dev/null +++ b/Formula/c/cpmtools.rb @@ -0,0 +1,67 @@ +class Cpmtools < Formula + desc "Tools to access CP/M file systems" + homepage "http://www.moria.de/~michael/cpmtools/" + url "http://www.moria.de/~michael/cpmtools/files/cpmtools-2.23.tar.gz" + sha256 "7839b19ac15ba554e1a1fc1dbe898f62cf2fd4db3dcdc126515facc6b929746f" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?cpmtools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "efe04ea8503804dc1106da71858d617f5daffe04adb89a312aa32116396af00d" + sha256 arm64_sequoia: "e689ad1b8bec7b7fb8b2f39ddccca66072998a172b7ef8788eeb6e54d06c4395" + sha256 arm64_sonoma: "229e3ca8bb433a8ca06a17c2d7b433648e9705c56bdfdc8d8084440d8244a3e1" + sha256 arm64_ventura: "2fbd054f0433e92761ef5fa76de830ac7bfeeb08525eede726f9d3d969e165df" + sha256 arm64_monterey: "2324010d143ab9616a622b9d147b7aaf256feed91b05ee18226c8bfaa14f956a" + sha256 arm64_big_sur: "c3488e8102d67d29360061444be429adab96c2f6bff0d679af380846be8b9926" + sha256 sonoma: "bd45e97e460395206b013112e9cf49de6420d1f3c90c317488f32b413245132f" + sha256 ventura: "ee486061d9a3338f5b29ac3e999b18379685bf81503c52c4ce567eb0b1ecdd4d" + sha256 monterey: "01243a514e68e3d3dcc59a183a17e52c8101bd53ec3482692aa53b0790f90026" + sha256 big_sur: "feb6336a2eca5551ead4c111c3b3dc2f6d30b1b4f26b5b9845afe70ff4362165" + sha256 catalina: "21f01ac740cd1f784a1cb888ae1959df797deb5a06535c3ac9340feb04582339" + sha256 arm64_linux: "0a727fbd579fed896a13912602e3471abef4497d7c3119f8e2b2ab94949912fb" + sha256 x86_64_linux: "c0808ec1572a5afa52930067fef0ea776df7de12aacd3357e014edfb9e80a3e6" + end + + depends_on "autoconf" => :build + depends_on "libdsk" + + uses_from_macos "ncurses" + + def install + # The ./configure script that comes with the 2.21 tarball is too old to work with Xcode 12 + system "autoconf", "--force" + system "./configure", "--prefix=#{prefix}", "--with-libdsk" + + bin.mkpath + man1.mkpath + man5.mkpath + + system "make", "install" + end + + test do + # make a disk image + image = testpath/"disk.cpm" + system bin/"mkfs.cpm", "-f", "ibm-3740", image + + # copy a file into the disk image + src = testpath/"foo" + src.write "a" * 128 + # Note that the "-T raw" is needed to make cpmtools work correctly when linked against libdsk: + system bin/"cpmcp", "-T", "raw", "-f", "ibm-3740", image, src, "0:foo" + + # check for the file in the cp/m directory + assert_match "foo", shell_output("#{bin}/cpmls -T raw -f ibm-3740 #{image}") + + # copy the file back out of the image + dest = testpath/"bar" + system bin/"cpmcp", "-T", "raw", "-f", "ibm-3740", image, "0:foo", dest + assert_equal src.read, dest.read + end +end diff --git a/Formula/c/cpp-gsl.rb b/Formula/c/cpp-gsl.rb new file mode 100644 index 0000000000000..bc66b98abe048 --- /dev/null +++ b/Formula/c/cpp-gsl.rb @@ -0,0 +1,33 @@ +class CppGsl < Formula + desc "Microsoft's C++ Guidelines Support Library" + homepage "https://github.com/Microsoft/GSL" + url "https://github.com/Microsoft/GSL/archive/refs/tags/v4.2.0.tar.gz" + sha256 "2c717545a073649126cb99ebd493fa2ae23120077968795d2c69cbab821e4ac6" + license "MIT" + head "https://github.com/Microsoft/GSL.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "480c96e8568e4f3ffaeea6e8290842770321092bf1f1e0ce03c3645456cfc275" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DGSL_TEST=false", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + gsl::span z; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++14" + system "./test" + end +end diff --git a/Formula/c/cpp-httplib.rb b/Formula/c/cpp-httplib.rb new file mode 100644 index 0000000000000..7479f24600219 --- /dev/null +++ b/Formula/c/cpp-httplib.rb @@ -0,0 +1,80 @@ +class CppHttplib < Formula + desc "C++ header-only HTTP/HTTPS server and client library" + homepage "https://github.com/yhirose/cpp-httplib" + url "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.27.0.tar.gz" + sha256 "cc57615af359efda816122dcfca37bcbb9f1591396f50a1fd1ad70bbe6050581" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b23a9514d14c4ce3525ed35d623b58a74ae414c2b3760aa47d1d2e018027a8e1" + end + + depends_on "cmake" => :build + depends_on "openssl@3" => :build + uses_from_macos "zlib" => :build + + fails_with :clang do + build 1300 + cause <<~EOS + include/httplib.h:5278:19: error: no viable overloaded '=' + request.matches = {}; + ~~~~~~~~~~~~~~~ ^ ~~ + EOS + end + + def install + # Set args for consistent dependencies used in generated CMake config + args = %w[ + -DHTTPLIB_REQUIRE_OPENSSL=ON + -DHTTPLIB_REQUIRE_ZLIB=ON + -DHTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"server.cpp").write <<~CPP + #include + using namespace httplib; + + int main(void) { + Server svr; + + svr.Get("/hi", [](const Request &, Response &res) { + res.set_content("Hello World!", "text/plain"); + }); + + svr.listen("0.0.0.0", 8080); + } + CPP + (testpath/"client.cpp").write <<~CPP + #include + #include + using namespace httplib; + using namespace std; + + int main(void) { + Client cli("localhost", 8080); + if (auto res = cli.Get("/hi")) { + cout << res->status << endl; + cout << res->get_header_value("Content-Type") << endl; + cout << res->body << endl; + return 0; + } else { + return 1; + } + } + CPP + system ENV.cxx, "server.cpp", "-I#{include}", "-lpthread", "-std=c++11", "-o", "server" + system ENV.cxx, "client.cpp", "-I#{include}", "-lpthread", "-std=c++11", "-o", "client" + + fork do + exec "./server" + end + sleep 3 + assert_match "Hello World!", shell_output("./client") + end +end diff --git a/Formula/c/cpp-lazy.rb b/Formula/c/cpp-lazy.rb new file mode 100644 index 0000000000000..3e58738f90ff3 --- /dev/null +++ b/Formula/c/cpp-lazy.rb @@ -0,0 +1,44 @@ +class CppLazy < Formula + desc "C++11 (and onwards) library for lazy evaluation" + homepage "https://github.com/Kaaserne/cpp-lazy" + url "https://github.com/Kaaserne/cpp-lazy/archive/refs/tags/v8.0.1.tar.gz" + sha256 "b237a7df04006f62c19eedaf7adbf9eb8d4dd4fd3daee39ca13d3aac97254f90" + license "MIT" + head "https://github.com/Kaaserne/cpp-lazy.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "e28490a02ee004b28f274c2bf585135b73cd5f4c92bf2d7e51cf17f6175d2ec7" + end + + depends_on "cmake" => :build + depends_on "fmt" => :test + depends_on "pkgconf" => :test + + def install + args = %w[ + -DCPP-LAZY_USE_STANDALONE=ON + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + std::array arr = {1, 2, 3, 4}; + std::string result = lz::map(arr, [](int i) { return i + 1; }).toString(" "); // == "1 2 3 4" + } + CPP + ENV.prepend_path "PKG_CONFIG_PATH", Formula["fmt"].opt_lib/"pkgconfig" + cxxflags = shell_output("pkg-config --cflags fmt").strip + ldflags = shell_output("pkg-config --libs fmt").strip + system ENV.cxx, "test.cpp", "-std=c++11", "-o", "test", *cxxflags.split, *ldflags.split + system "./test" + end +end diff --git a/Formula/c/cpp-peglib.rb b/Formula/c/cpp-peglib.rb new file mode 100644 index 0000000000000..ee048d41f55bd --- /dev/null +++ b/Formula/c/cpp-peglib.rb @@ -0,0 +1,60 @@ +class CppPeglib < Formula + desc "Header-only PEG (Parsing Expression Grammars) library for C++" + homepage "https://github.com/yhirose/cpp-peglib" + url "https://github.com/yhirose/cpp-peglib/archive/refs/tags/v1.9.1.tar.gz" + sha256 "f57aa0f14372cbb772af29e3a4549a8033ea07eb25c39949cba6178e0e2ba9cc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1faee0c9bfafa9d959755e07b3b67d7cd6cdd6d90044ea73d39b00a85b139dca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e8a5a22292f52bfe919d39d201e60dc711526eae0022c8fc304f6007448fdc3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc7e6670b936f8d5c3b876ad586274c5368087d430e8cc025d48c4984fd73bee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5b7c05e469149aa8d2e58804ee8077848a568e4b0fa04464b834df1da72c8e03" + sha256 cellar: :any_skip_relocation, sonoma: "c792060f2dc7c50971f47fced6a91ad21ce4b2716370b310f30a152c6ee7336c" + sha256 cellar: :any_skip_relocation, ventura: "bcac68f110273496870596a4b0cdaac43759abc62c03332c5242c938c16d95fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "3dba6d295fb60a0018b6cb8618de1bcc9f0e76560c0b43d63e57f62e9a7a72c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76d939b93adb7280e5a2a7632acb1341317f6a243656e51be439b5d5cb0566a0" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_TESTS=OFF + -DPEGLIB_BUILD_LINT=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bin.install "build/lint/peglint" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + peg::parser parser(R"( + START <- [0-9]+ + )"); + + std::string input = "12345"; + return parser.parse(input) ? 0 : 1; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-o", "test" + system "./test" + + (testpath/"grammar.peg").write <<~EOS + START <- [0-9]+ EOF + EOF <- !. + EOS + + (testpath/"source.txt").write "12345" + + output = shell_output("#{bin}/peglint --profile #{testpath}/grammar.peg #{testpath}/source.txt") + assert_match "success", output + end +end diff --git a/Formula/c/cppad.rb b/Formula/c/cppad.rb new file mode 100644 index 0000000000000..ca77c77a68c64 --- /dev/null +++ b/Formula/c/cppad.rb @@ -0,0 +1,58 @@ +class Cppad < Formula + desc "Differentiation of C++ Algorithms" + homepage "https://www.coin-or.org/CppAD" + url "https://github.com/coin-or/CppAD/archive/refs/tags/20250000.2.tar.gz" + sha256 "d6688c7530913dfd286f7db71b007fd96df10a9e8b43ad74539e4450c9917ebf" + license "EPL-2.0" + version_scheme 1 + head "https://github.com/coin-or/CppAD.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "77cd98371fd178e41517c2cc91dcddd126557de19b9d4c4799924c715c0c47ee" + sha256 cellar: :any, arm64_sequoia: "6f65c18d0662a88d692f107f438a055b1f2668d5ec7416e563b88b482db789f8" + sha256 cellar: :any, arm64_sonoma: "617a8aad764f2c8c33d8e3a252cffaed40eeda79e2248bd7590b254c3053f242" + sha256 cellar: :any, arm64_ventura: "4b210a927c2c5f55f16ebf358b83ad441d7931b616ee3c72525513db2aff1ba1" + sha256 cellar: :any, sonoma: "be977a43d7368711e1cdba74d19b0a9d14babf25c9cccafb98cc28c2ed83725a" + sha256 cellar: :any, ventura: "cf71330f98f3ec66673d6475e72b5521656149487d9181f4b11c54703b4e94d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e490b1de9def38d581e819d73a01f770be148c6ae6541a987a7ab92e9a2b2b1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b72d08633d4877ffe165ccdc0569d2c5ba34607534b93d395b52ab1a4aefe882" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + def install + ENV.cxx11 + + system "cmake", "-S", ".", "-B", "build", "-Dcppad_prefix=#{prefix}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "example" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(void) { + extern bool acos(void); + bool ok = acos(); + assert(ok); + return static_cast(!ok); + } + CPP + + system ENV.cxx, "#{pkgshare}/example/general/acos.cpp", "-std=c++11", "-I#{include}", + "-L#{lib}", "-lcppad_lib", + "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cppcheck.rb b/Formula/c/cppcheck.rb new file mode 100644 index 0000000000000..c00f882e10e4d --- /dev/null +++ b/Formula/c/cppcheck.rb @@ -0,0 +1,134 @@ +class Cppcheck < Formula + desc "Static analysis of C and C++ code" + homepage "https://sourceforge.net/projects/cppcheck/" + url "https://github.com/danmar/cppcheck/archive/refs/tags/2.18.0.tar.gz" + sha256 "dc74e300ac59f2ef9f9c05c21d48ae4c8dd1ce17f08914dd30c738ff482e748f" + license "GPL-3.0-or-later" + head "https://github.com/danmar/cppcheck.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a53316e5dda8adbc073f148dba329587526ba3e54157fc7f3a787bf6564d70a8" + sha256 arm64_sequoia: "21609bea72c672a96df641fb801021593d132ba01c644b8afdf7a7abab513807" + sha256 arm64_sonoma: "4434fdc861417f4ed8a30be05626e6a882520aa7c86861a44774f7a247976d45" + sha256 sonoma: "b2f0389b3f98b42c7f3dc33c3b7b0899d85789df0d30ca7c6815e5ab77ce1d93" + sha256 arm64_linux: "7ade4ca187c1cf2ff5fc385a0da4306bc437d313bf1a9d2cf8b1ebac74aaf2b6" + sha256 x86_64_linux: "944a5e6a09e9ef9fd3988e2f878e07e43092ffde06b4e14a1b64bbdf601cd79b" + end + + depends_on "cmake" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "pcre" + depends_on "tinyxml2" + + uses_from_macos "libxml2" => :build + + def python3 + which("python3.14") + end + + def install + ENV.deparallelize + + args = %W[ + -DHAVE_RULES=ON + -DUSE_BUNDLED_TINYXML2=OFF + -DPYTHON_EXECUTABLE=#{python3} + -DFILESDIR=#{pkgshare} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Execution test with an input .cpp file + test_cpp_file = testpath/"test.cpp" + test_cpp_file.write <<~CPP + #include + using namespace std; + + int main() + { + cout << "Hello World!" << endl; + return 0; + } + + class Example + { + public: + int GetNumber() const; + explicit Example(int initialNumber); + private: + int number; + }; + + Example::Example(int initialNumber) + { + number = initialNumber; + } + CPP + system bin/"cppcheck", test_cpp_file + + # Test the "out of bounds" check + test_cpp_file_check = testpath/"testcheck.cpp" + test_cpp_file_check.write <<~CPP + int main() + { + char a[10]; + a[10] = 0; + return 0; + } + CPP + output = shell_output("#{bin}/cppcheck #{test_cpp_file_check} 2>&1") + assert_match "out of bounds", output + + # Test the addon functionality: sampleaddon.py imports the cppcheckdata python + # module and uses it to parse a cppcheck dump into an OOP structure. We then + # check the correct number of detected tokens and function names. + addons_dir = pkgshare/"addons" + cppcheck_module = "#{name}data" + expect_token_count = 51 + expect_function_names = "main,GetNumber,Example" + assert_parse_message = "Error: sampleaddon.py: failed: can't parse the #{name} dump." + + sample_addon_file = testpath/"sampleaddon.py" + sample_addon_file.write <<~PYTHON + #!/usr/bin/env #{python3} + """A simple test addon for #{name}, prints function names and token count""" + import sys + from importlib import machinery, util + # Manually import the '#{cppcheck_module}' module + spec = machinery.PathFinder().find_spec("#{cppcheck_module}", ["#{addons_dir}"]) + cpp_check_data = util.module_from_spec(spec) + spec.loader.exec_module(cpp_check_data) + + for arg in sys.argv[1:]: + # Parse the dump file generated by #{name} + configKlass = cpp_check_data.parsedump(arg) + if len(configKlass.configurations) == 0: + sys.exit("#{assert_parse_message}") # Parse failure + fConfig = configKlass.configurations[0] + # Pick and join the function names in a string, separated by ',' + detected_functions = ','.join(fn.name for fn in fConfig.functions) + detected_token_count = len(fConfig.tokenlist) + # Print the function names on the first line and the token count on the second + print("%s\\n%s" %(detected_functions, detected_token_count)) + PYTHON + + system bin/"cppcheck", "--dump", test_cpp_file + test_cpp_file_dump = "#{test_cpp_file}.dump" + assert_path_exists testpath/test_cpp_file_dump + output = shell_output("#{python3} #{sample_addon_file} #{test_cpp_file_dump}") + assert_match "#{expect_function_names}\n#{expect_token_count}", output + end +end diff --git a/Formula/c/cppcms.rb b/Formula/c/cppcms.rb new file mode 100644 index 0000000000000..7418e54a1e4ce --- /dev/null +++ b/Formula/c/cppcms.rb @@ -0,0 +1,125 @@ +class Cppcms < Formula + include Language::Python::Shebang + + desc "Free High Performance Web Development Framework" + homepage "http://cppcms.com/wikipp/en/page/main" + url "https://downloads.sourceforge.net/project/cppcms/cppcms/1.2.1/cppcms-1.2.1.tar.bz2" + sha256 "10fec7710409c949a229b9019ea065e25ff5687103037551b6f05716bf6cac52" + license "MIT" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/cppcms[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "c67928d45ecdf779f5cbde1a74527f1f474063e8038fc6103222f6066c058ff8" + sha256 cellar: :any, arm64_sequoia: "b274decb22153c7de85e5fa491fe54493186b6b6258de506695aa6e725a3a1b5" + sha256 cellar: :any, arm64_sonoma: "c81184c372aced3829c5dc2df3c748b19afe1522ca7b25195559ed4de6777ba0" + sha256 cellar: :any, sonoma: "5afdc34fc8074dc1589f9d84f34fd7db0374c83fe57ddf69b8898898b8d524f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a621276dcd5bf2942c3cbf70f4ccb2033603598b9cd0b69a04302f93a173c274" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf5e4745de3da3bc5794c0d8d36e434288d41627aca22209d837bf526dc81b9e" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "pcre" + depends_on "python@3.14" + + uses_from_macos "zlib" + + def install + ENV.cxx11 + + # Look explicitly for python3 and ignore python2 + inreplace "CMakeLists.txt", "find_program(PYTHON NAMES python2 python)", "find_program(PYTHON NAMES python3)" + + # Adjust cppcms_tmpl_cc for Python 3 compatibility (and rewrite shebang to use brewed Python) + rewrite_shebang detected_python_shebang, "bin/cppcms_tmpl_cc" + inreplace "bin/cppcms_tmpl_cc" do |s| + s.gsub! "import StringIO", "import io" + s.gsub! "StringIO.StringIO()", "io.StringIO()" + s.gsub! "md5(header_define)", "md5(header_define.encode('utf-8'))" + end + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"hello.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + + class hello : public cppcms::application { + public: + hello(cppcms::service& srv): cppcms::application(srv) {} + virtual void main(std::string url); + }; + + void hello::main(std::string /*url*/) + { + response().out() << + "\\n" + "\\n" + "

Hello World

\\n" + "\\n" + "\\n"; + } + + int main(int argc,char ** argv) + { + try { + cppcms::service srv(argc,argv); + srv.applications_pool().mount( + cppcms::applications_factory() + ); + srv.run(); + return 0; + } + catch(std::exception const &e) { + std::cerr << e.what() << std::endl; + return -1; + } + } + CPP + + port = free_port + (testpath/"config.json").write <<~JSON + { + "service" : { + "api" : "http", + "port" : #{port}, + "worker_threads": 1 + }, + "daemon" : { + "enable" : false + }, + "http" : { + "script_names" : [ "/hello" ] + } + } + JSON + system ENV.cxx, "hello.cpp", "-std=c++11", "-L#{lib}", "-lcppcms", "-o", "hello" + pid = spawn "./hello", "-c", "config.json" + + sleep 5 # grace time for server start + begin + assert_match "Hello World", shell_output("curl http://127.0.0.1:#{port}/hello") + ensure + Process.kill "SIGTERM", pid + end + end +end diff --git a/Formula/c/cppi.rb b/Formula/c/cppi.rb new file mode 100644 index 0000000000000..bc0479b6c0f26 --- /dev/null +++ b/Formula/c/cppi.rb @@ -0,0 +1,48 @@ +class Cppi < Formula + desc "Indent C preprocessor directives to reflect their nesting" + homepage "https://www.gnu.org/software/cppi/" + url "https://ftpmirror.gnu.org/gnu/cppi/cppi-1.18.tar.xz" + mirror "https://ftp.gnu.org/gnu/cppi/cppi-1.18.tar.xz" + sha256 "12a505b98863f6c5cf1f749f9080be3b42b3eac5a35b59630e67bea7241364ca" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3e9b12e9a7ee2a641efd09fadfb1da89946c3c9f2145f06e08660109196df0f4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad3274881902eed64b3d3a8d0c846e7dcb09e13d6dd972551de0cc2fa09f89a0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60bcb5a1dba625e152384d1dfbcebbec2bfc552a6744a42ac8c9131a50d22f51" + sha256 cellar: :any_skip_relocation, arm64_ventura: "95ef8763f3cea6d0b2e699b1a7a0fcfbc8a60e568ee6d2587927b591b772940f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bbc7be8b21e6ba9f0f4eec49b22f43f5900af2628c8437c5b14e235169a8c22d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "00d594375b23e688f18b3abe9f6b892c23a83c5ecc4e8d27ce8a414c3f2070d6" + sha256 cellar: :any_skip_relocation, sonoma: "a7bda8ab50226a4110e0d025d6ce5ae5b1a6ad85a1111f8a0f58442af264ad86" + sha256 cellar: :any_skip_relocation, ventura: "eeed7bf193f6800050418eca626511ba5e3c76fb4ebd4f11ad67e93f1924b569" + sha256 cellar: :any_skip_relocation, monterey: "d1f346b4ed988e78ec44e4019b64c182bb660290d3cafdb65ab005321a554bec" + sha256 cellar: :any_skip_relocation, big_sur: "831418bd1a4c710184c6efb0b4a0476077f876cceedb9245dcf994ac7322e91b" + sha256 cellar: :any_skip_relocation, catalina: "24e10e144f6a86bb893f886cb631b9f57a3c3073fc19a0829e512c87db465ef0" + sha256 arm64_linux: "9f29c60a3728f80b7695a91ea71da089355422a06565faafa05074b6ddfef69d" + sha256 x86_64_linux: "4c51c1d89a082e419ba33ab1c257fae2b1882125070d2e89ab2e49258164a7e5" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + system "make", "check" + system "make", "install" + end + + test do + test = <<~C + #ifdef TEST + #include + #endif + C + assert_equal <<~C, pipe_output(bin/"cppi", test, 0) + #ifdef TEST + # include + #endif + C + end +end diff --git a/Formula/c/cppinsights.rb b/Formula/c/cppinsights.rb new file mode 100644 index 0000000000000..d11aad039971a --- /dev/null +++ b/Formula/c/cppinsights.rb @@ -0,0 +1,57 @@ +class Cppinsights < Formula + desc "See your source code with the eyes of a compiler" + homepage "https://cppinsights.io/" + url "https://github.com/andreasfertig/cppinsights/archive/refs/tags/v_20.1.tar.gz" + sha256 "672ecc237bc0231510025c9662c0f4880feebb076af46d16840adfb16e8fc4e8" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "d5c9c97206cb629ff2c8cf50b1887e49ef2e0e8609e26be97303e9b207059c4b" + sha256 cellar: :any, arm64_sequoia: "9dac7d041487c65d0a6fa2162d5dfd29f99e025df2bb0cdf967ef63c028f3308" + sha256 cellar: :any, arm64_sonoma: "b43c96e5aab90cc4145b8e095421669c51e8a1c14e52f0cb0f153c500910cd16" + sha256 cellar: :any, arm64_ventura: "f251f47deb6a56d12b091c7f08d7677e1082466aca2ea495e4c35b486f17c73d" + sha256 cellar: :any, sonoma: "d76e33b7686ef11f0b351c0a4ef632f5463d7fc38757558ed76a12b39d45b355" + sha256 cellar: :any, ventura: "6f215532b131c95676f95194a0f93d1f450143b68953124ee8fe59cd5cc77c59" + sha256 cellar: :any_skip_relocation, arm64_linux: "e66e5256dd17aa4f719f90514fdf2f6be53b55c591e9f1355e64389a72005e03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "532cca65ef3d681fd80b71e4c0d7140bea31c37916d727357ceb0fdbe23a46cf" + end + + depends_on "cmake" => :build + depends_on "llvm@20" + + # TODO: Restore compiler selection when using unversioned `llvm` + # fails_with :clang do + # build 1500 + # cause "Requires Clang > 15.0" + # end + + def install + llvm = Formula["llvm@20"] + + # TODO: Restore ENV.llvm_clang when using unversioned `llvm` + if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + ENV["CC"] = llvm.opt_bin/"clang" + ENV["CXX"] = llvm.opt_bin/"clang++" + inreplace "CMakeLists.txt", "add_definitions(-Werror)", "" + end + + args = %W[ + -DINSIGHTS_LLVM_CONFIG=#{llvm.opt_bin}/llvm-config + -DINSIGHTS_USE_SYSTEM_INCLUDES=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + int main() { + int arr[5]{2,3,4}; + } + CPP + assert_match "{2, 3, 4, 0, 0}", shell_output("#{bin}/insights ./test.cpp") + end +end diff --git a/Formula/c/cpplint.rb b/Formula/c/cpplint.rb new file mode 100644 index 0000000000000..1589d9ec9ea5f --- /dev/null +++ b/Formula/c/cpplint.rb @@ -0,0 +1,32 @@ +class Cpplint < Formula + include Language::Python::Virtualenv + + desc "Static code checker for C++" + homepage "https://pypi.org/project/cpplint/" + url "https://files.pythonhosted.org/packages/c5/83/47a9e7513ba4d943a9dac2f6752b444377c91880f4f4968799b4f42d89cc/cpplint-2.0.2.tar.gz" + sha256 "8a5971e4b5490133e425284f0c566c7ade0b959e61018d2c9af3ff7f357ddc57" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "439258003bfc9b3bc95292234c4e295da040ba5057bd3dcac53204824e3b0caa" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + + # install test data + pkgshare.install "samples" + end + + test do + output = shell_output("#{bin}/cpplint --version") + assert_match "cpplint #{version}", output.strip + + test_file = pkgshare/"samples/v8-sample/src/interface-descriptors.h" + output = shell_output("#{bin}/cpplint #{test_file} 2>&1", 1) + assert_match "Total errors found: 2", output + end +end diff --git a/Formula/c/cppman.rb b/Formula/c/cppman.rb new file mode 100644 index 0000000000000..3e34b282e9a2d --- /dev/null +++ b/Formula/c/cppman.rb @@ -0,0 +1,85 @@ +class Cppman < Formula + include Language::Python::Virtualenv + + desc "C++ 98/11/14/17/20 manual pages from cplusplus.com and cppreference.com" + homepage "https://github.com/aitjcize/cppman" + url "https://files.pythonhosted.org/packages/f7/ec/3965a47a4bfb8426037061ab429320cc306c229827db1c213eda52fe4a4d/cppman-0.5.9.tar.gz" + sha256 "15a4e40ab025b4dcec5a73a50df26b7ddaef7c148fcb197940fff2484f9e9903" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1a95cc1c58b520b23b42327ee31062260c4b4ba4f9f84c6ed04f8ee8fffcdebe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "220b9a45ca0d042bd6ac5b367bcf39b4fd3a4336d6d61f6b3d98eee1310db2bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d06e98c5d58b5ed41584aec6f8be57eb1bcf56f447edc0a6bf795c74cfdffba4" + sha256 cellar: :any_skip_relocation, sonoma: "68a96323828f982d28b348af2eb139a34dae85a248495fde981a082c687a97cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "63e61096985aefe69be35fdac8f537198efb7fcc85c9bceb5cc439266cae2e61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e88d120761abc8d4909f0544824d057a3010c5a0232699f3a2af5d87e9e3bc6b" + end + + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_system :linux, macos: :ventura_or_newer do + depends_on "groff" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "bs4" do + url "https://files.pythonhosted.org/packages/c9/aa/4acaf814ff901145da37332e05bb510452ebed97bc9602695059dd46ef39/bs4-0.0.2.tar.gz" + sha256 "a48685c58f50fe127722417bae83fe6badf500d54b55f7e39ffe43b798653925" + end + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + + # Avoid ast.Str removed in 3.14+: https://github.com/html5lib/html5lib-python/pull/583 + patch do + url "https://github.com/html5lib/html5lib-python/commit/379f9476c2a5ee370cd7ec856ee9092cace88499.patch?full_index=1" + sha256 "97ae2474704eedf72dc5d5c46ad86e2144c10022ea950cb1c42a9ad894705014" + end + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/80/61/d3dc048cd6c7be6fe45b80cedcbdd4326ba4d550375f266d9f4246d0f4bc/lxml-5.3.2.tar.gz" + sha256 "773947d0ed809ddad824b7b14467e1a481b8976e87278ac4a730c2f7c7fcddc1" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/76/ad/cd3e3465232ec2416ae9b983f27b9e94dc8171d56ac99b345319a9475967/typing_extensions-4.13.1.tar.gz" + sha256 "98795af00fb9640edec5b8e31fc647597b4691f099ad75f469a2616be1a76dff" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + def install + virtualenv_install_with_resources + # NOTE: Excluding bash completion which uses GNU xargs so has issues on macOS + fish_completion.install_symlink libexec/"share/fish/vendor_completions.d/cppman.fish" + zsh_completion.install_symlink libexec/"share/zsh/vendor-completions/_cppman" + end + + test do + assert_match "std::extent", shell_output("#{bin}/cppman -f :extent") + end +end diff --git a/Formula/c/cppp.rb b/Formula/c/cppp.rb new file mode 100644 index 0000000000000..a969c2e2a32fc --- /dev/null +++ b/Formula/c/cppp.rb @@ -0,0 +1,55 @@ +class Cppp < Formula + desc "Partial Preprocessor for C" + homepage "https://www.muppetlabs.com/~breadbox/software/cppp.html" + url "https://www.muppetlabs.com/~breadbox/pub/software/cppp-2.9.tar.gz" + sha256 "76a95b46c3e36d55c0a98175c0aa72b17b219e68062c2c2c26f971e749951c07" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?cppp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "29bae12103813789942c21786cc253702a2d5eae6baeff11561afc12bbafde7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b14311322cdff7ec30e93ba573bf916eae962c7d2488e7f85a88a4b8bead0a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a2fe122f6b616feaab1f4ef815061564ace5069c55fdc8c5fc568a35bb6e2fec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86f812c4083a5ef978178a692f617081b97377aaf2f8fb063cc49abecc65538f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d1926109416735a823a7ab9a534be30f4c5a64f9cc72d36b52e125c70f8d28d3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "32559caedf75a13cad737826acd6d83b2d7e8cc69c5ecc18bdaecb37856d5a26" + sha256 cellar: :any_skip_relocation, sonoma: "3061445285d21e97da5f8e8e67207ffc7443f5dd08e4fbeacd7dbe06ba8fbece" + sha256 cellar: :any_skip_relocation, ventura: "dcc13b4d0b56a0b9b880254b8c0771b9734f6c41804fe9da6b51d5e5cfaa647f" + sha256 cellar: :any_skip_relocation, monterey: "f815f392d7b8ec92a327c2d543bf962a70cae5f1f6991e1e4d695ee25c1fecb8" + sha256 cellar: :any_skip_relocation, big_sur: "549a5a56c7173307a1fe50415ac029d31ffa80d4aba09bca2c387dff8b6fd71e" + sha256 cellar: :any_skip_relocation, catalina: "539d3f0e5376e354018c7d91eb458194fc2654785af7075bb646584618493f9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "37b5825a280e3bdc38d0c6269d58195cc091002b0404427fd8c7c45f59a8542a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afb41f54440bb5ee1dc17adb0729f4577dbe156e2c63548becd5d0cc5abd2691" + end + + def install + system "make" + bin.install "cppp" + end + + test do + (testpath/"hello.c").write <<~C + /* Comments stand for code */ + #ifdef FOO + /* FOO is defined */ + # ifdef BAR + /* FOO & BAR are defined */ + # else + /* BAR is not defined */ + # endif + #else + /* FOO is not defined */ + # ifndef BAZ + /* FOO & BAZ are undefined */ + # endif + #endif + C + system bin/"cppp", "-DFOO", "hello.c" + end +end diff --git a/Formula/c/cpprestsdk.rb b/Formula/c/cpprestsdk.rb new file mode 100644 index 0000000000000..fe3a8378ebae3 --- /dev/null +++ b/Formula/c/cpprestsdk.rb @@ -0,0 +1,133 @@ +class Cpprestsdk < Formula + desc "C++ libraries for cloud-based client-server communication" + homepage "https://github.com/microsoft/cpprestsdk" + # do not pull bundled libraries in submodules + url "https://github.com/microsoft/cpprestsdk/archive/refs/tags/v2.10.19.tar.gz" + sha256 "4b0d14e5bfe77ce419affd253366e861968ae6ef2c35ae293727c1415bd145c8" + license "MIT" + revision 3 + head "https://github.com/microsoft/cpprestsdk.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e077422f309a8ed21fa46f8a1ffefcba57b2b394b0e9cf501b62d62f214e067" + sha256 cellar: :any, arm64_sequoia: "308579b3f28e24db2678b00d3f2c0ca285fc47eacd8a2fddf35f2404562b142c" + sha256 cellar: :any, arm64_sonoma: "01eb9f54ecdc29035230667a6beb5adc50940dc3f52169334394d1c7e8cc08c9" + sha256 cellar: :any, arm64_ventura: "3cd4baefa8081807c066f32526e4292e4692482ab7e59f3b101ed8176bf47213" + sha256 cellar: :any, sonoma: "87bde89b79cd019ab64d60f98df68a31ea20cf6e1a615e6905a5fa57abc149f0" + sha256 cellar: :any, ventura: "750ea4343b57683dc552cd5a5cae40944dd90595863fa27419e5dbd4fb4fd87f" + sha256 cellar: :any_skip_relocation, arm64_linux: "8464f7f1c4a87916539c39a3c7d1cb6ac5d2a1fd6cc1a8fd16e33cd83fdad88d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24cc62c99aeecd2a910e156a9d39846f757b37d54b385740e6c2d3ea50adbd56" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # Apply FreeBSD patches for libc++ >= 19 needed in Xcode 16.3 + # https://github.com/microsoft/cpprestsdk/pull/1829 + on_sequoia :or_newer do + patch do + url "https://github.com/microsoft/cpprestsdk/commit/d17f091b5a753b33fb455e92b590fc9f4e921119.patch?full_index=1" + sha256 "bc68dd08310ba22dc5ceb7506c86a6d4c8bfefa46581eea8cd917354a8b8ae34" + end + patch do + url "https://github.com/microsoft/cpprestsdk/commit/6df13a8c0417ef700c0f164bcd0686ad46f66fd9.patch?full_index=1" + sha256 "4205e818f5636958589d2c1e5841a31acfe512eda949d63038e23d8c089a9636" + end + patch do + url "https://github.com/microsoft/cpprestsdk/commit/4188ad89b2cf2e8de3cc3513adcf400fbfdc5ce7.patch?full_index=1" + sha256 "3bc72590cbaf6d04e3e5230558647e5b38e7f494cd0e5d3ea5c866ac25f9130a" + end + patch do + url "https://github.com/microsoft/cpprestsdk/commit/32b322b564e5e540ff02393ffe3bd3bade8d299c.patch?full_index=1" + sha256 "737567e533405f7f6ef0a83bafef7fdeea95c96947f66be0973e5f362e1b82f5" + end + end + + # Apply vcpkg patch to support Boost 1.87.0+ + # Issue ref: https://github.com/microsoft/cpprestsdk/issues/1815 + # Issue ref: https://github.com/microsoft/cpprestsdk/issues/1323 + patch do + url "https://raw.githubusercontent.com/microsoft/vcpkg/566f9496b7e00ee0cc00aca0ab90493d122d148a/ports/cpprestsdk/fix-asio-error.patch" + sha256 "8fa4377a86afb4cdb5eb2331b5fb09fd7323dc2de90eb2af2b46bb3585a8022e" + end + + # Workaround to build with Boost 1.89.0 + patch :DATA + + def install + system "cmake", "-S", "Release", "-B", "build", + "-DBUILD_SAMPLES=OFF", + "-DBUILD_TESTS=OFF", + # Disable websockets feature due to https://github.com/zaphoyd/websocketpp/issues/1157 + # Needs upstream response and fix in `websocketpp` formula (do not use bundled copy) + "-DCPPREST_EXCLUDE_WEBSOCKETS=ON", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + int main() { + web::http::client::http_client client(U("https://brew.sh/")); + std::cout << client.request(web::http::methods::GET).get().extract_string().get() << std::endl; + } + CPP + boost = Formula["boost"] + system ENV.cxx, "test.cc", "-std=c++11", + "-I#{boost.include}", "-I#{Formula["openssl@3"].include}", "-I#{include}", + "-L#{boost.lib}", "-L#{Formula["openssl@3"].lib}", "-L#{lib}", + "-lssl", "-lcrypto", "-lboost_random", "-lboost_chrono", "-lboost_thread", + "-lboost_filesystem", "-lcpprest", + "-o", "test_cpprest" + assert_match "The Missing Package Manager for macOS (or Linux)", shell_output("./test_cpprest") + end +end + +__END__ +diff --git a/Release/cmake/cpprest_find_boost.cmake b/Release/cmake/cpprest_find_boost.cmake +index 3c857baf..60158173 100644 +--- a/Release/cmake/cpprest_find_boost.cmake ++++ b/Release/cmake/cpprest_find_boost.cmake +@@ -46,7 +46,7 @@ function(cpprest_find_boost) + endif() + cpprestsdk_find_boost_android_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS random system thread filesystem chrono atomic) + elseif(UNIX) +- find_package(Boost REQUIRED COMPONENTS random system thread filesystem chrono atomic date_time regex) ++ find_package(Boost REQUIRED COMPONENTS random thread filesystem chrono atomic date_time regex) + else() + find_package(Boost REQUIRED COMPONENTS system date_time regex) + endif() +@@ -88,7 +88,6 @@ function(cpprest_find_boost) + target_link_libraries(cpprestsdk_boost_internal INTERFACE + Boost::boost + Boost::random +- Boost::system + Boost::thread + Boost::filesystem + Boost::chrono +diff --git a/Release/cmake/cpprestsdk-config.in.cmake b/Release/cmake/cpprestsdk-config.in.cmake +index 72476b06..811e79ac 100644 +--- a/Release/cmake/cpprestsdk-config.in.cmake ++++ b/Release/cmake/cpprestsdk-config.in.cmake +@@ -17,9 +17,9 @@ endif() + + if(@CPPREST_USES_BOOST@) + if(UNIX) +- find_dependency(Boost COMPONENTS random system thread filesystem chrono atomic date_time regex) ++ find_dependency(Boost COMPONENTS random thread filesystem chrono atomic date_time regex) + else() +- find_dependency(Boost COMPONENTS system date_time regex) ++ find_dependency(Boost COMPONENTS date_time regex) + endif() + endif() + include("${CMAKE_CURRENT_LIST_DIR}/cpprestsdk-targets.cmake") diff --git a/Formula/c/cpptest.rb b/Formula/c/cpptest.rb new file mode 100644 index 0000000000000..516dad6aa9759 --- /dev/null +++ b/Formula/c/cpptest.rb @@ -0,0 +1,62 @@ +class Cpptest < Formula + desc "Unit testing framework handling automated tests in C++" + homepage "https://cpptest.sourceforge.io/" + url "https://downloads.sourceforge.net/project/cpptest/cpptest/cpptest-2.0.0/cpptest-2.0.0.tar.bz2" + mirror "https://github.com/cpptest/cpptest/releases/download/2.0.0/cpptest-2.0.0.tar.bz2" + sha256 "7c258936a407bcd1635a9b7719fbdcd6c6e044b5d32f53bbf6fbf6f205e5e429" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b7ba7a08b1659d230bf822ed02e72535423504b3b5fe659cac6b16f6aa64d3bd" + sha256 cellar: :any, arm64_sequoia: "2e9bd9882a2be0879ed9c30b86dda312e9fdaf6f0913d1e52960e0c057454857" + sha256 cellar: :any, arm64_sonoma: "02e96560cb00bb0e4a31cbeb0e1af8fe4d24071dc8693551a444a8ca899f64de" + sha256 cellar: :any, arm64_ventura: "cc624fd1da48ba38d19025509d327580fc4d8b2603deaa398e1bdecbad88d676" + sha256 cellar: :any, arm64_monterey: "c19519f153ca1eb3480428285c87c41f4f6e9216815ce028e8f4edb6ae2ca05c" + sha256 cellar: :any, arm64_big_sur: "b76d3ce8ecaa806713abfbb903789702daa297cff3e491e670f531725c5e90b4" + sha256 cellar: :any, sonoma: "da7e6e96d0971b33f75b13306310d9b73b20e353c359c65e0f8acb4af6a7b443" + sha256 cellar: :any, ventura: "64ecd7007cbc36505613a0a664d0bdac0328ff7d59767fb73abe78a2ea3db85d" + sha256 cellar: :any, monterey: "3607c24f58bd5195dd7258797f9a74c48d74fa724ac4dcf9aa60610cee085966" + sha256 cellar: :any, big_sur: "89c6ffcf939917d09725840bb55497a8477ddf951895a8f62377a8ff11e11b6b" + sha256 cellar: :any, catalina: "531646bba9e8aedff87216058a90e2fdc245b11ef55ad3f5c3aaaf717fd998cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3e97b7775d83ef913b5d0e0c7ba785f2d12b16de00747f7aa5a6734a032ff1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebb0d38cb3fb4038067867b4b10ff93cdc330528dc0f163d4af0a87a427a7375" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + class TestCase: public Test::Suite + { + public: + TestCase() { TEST_ADD(TestCase::test); } + void test() { TEST_ASSERT(1 + 1 == 2); } + }; + + int main() + { + TestCase ts; + Test::TextOutput output(Test::TextOutput::Verbose); + assert(ts.run(output)); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-lcpptest", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cpptoml.rb b/Formula/c/cpptoml.rb new file mode 100644 index 0000000000000..72d9a86e119df --- /dev/null +++ b/Formula/c/cpptoml.rb @@ -0,0 +1,62 @@ +class Cpptoml < Formula + desc "Header-only library for parsing TOML" + homepage "https://github.com/skystrife/cpptoml" + url "https://github.com/skystrife/cpptoml/archive/refs/tags/v0.1.1.tar.gz" + sha256 "23af72468cfd4040984d46a0dd2a609538579c78ddc429d6b8fd7a10a6e24403" + license "MIT" + revision 1 + head "https://github.com/skystrife/cpptoml.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c7277d9959d90daba22c6e5e464e5d9877c6dce18d25932a5a7d53feac061139" + end + + depends_on "cmake" => :build + + # Fix library support for GCC 11+ by adding include for limits header. + # Upstream PR: https://github.com/skystrife/cpptoml/pull/123 + patch do + url "https://github.com/skystrife/cpptoml/commit/c55a516e90133d89d67285429c6474241346d27a.patch?full_index=1" + sha256 "29d720fa096f0afab8a6a42b3382e98ce09a8d2958d0ad2980cf7c70060eb2c1" + end + + def install + args = %W[ + -DENABLE_LIBCXX=#{(ENV.compiler == :clang) ? "ON" : "OFF"} + -DCPPTOML_BUILD_EXAMPLES=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include "cpptoml.h" + #include + + int main() { + auto brew = cpptoml::parse_file("brew.toml"); + auto s = brew->get_as("str"); + + if (s) { + std::cout << *s << std::endl; + return 0; + } + + return 1; + } + CPP + + (testpath/"brew.toml").write <<~TOML + str = "Hello, Homebrew." + TOML + + system ENV.cxx, "-std=c++11", "-I#{include}", "test.cc", "-o", "test" + assert_equal "Hello, Homebrew.", shell_output("./test").strip + end +end diff --git a/Formula/c/cpptrace.rb b/Formula/c/cpptrace.rb new file mode 100644 index 0000000000000..6bd9edf3ae3ba --- /dev/null +++ b/Formula/c/cpptrace.rb @@ -0,0 +1,51 @@ +class Cpptrace < Formula + desc "Simple, portable, and self-contained stacktrace library for C++11 and newer" + homepage "https://github.com/jeremy-rifkin/cpptrace" + url "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v1.0.4.tar.gz" + sha256 "5c9f5b301e903714a4d01f1057b9543fa540f7bfcc5e3f8bd1748e652e24f9ea" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "714c67c234ab6bd2171290fd8d6738e1a79baf2ac93f3fb9ddcba22f510b8492" + sha256 cellar: :any, arm64_sequoia: "1e2015f8f8175f025a2afef193c218f2bcf6491a597b3a24383680cd608511d2" + sha256 cellar: :any, arm64_sonoma: "ca98f143e04d55612619460edaec82fc6645d9ee938efe0ed63fc988a7acea2a" + sha256 cellar: :any, sonoma: "6c3fa5f1410a4005238b36afa5c1e444f8e8716b540731dec1092a1a70dad5e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "425e59efde03a6d782b628dda04c279f8d889e77af26cedf375dfb036c860c0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14595a27d917a2b8d41000b814f5db6dfcadec7b7a0b6a6c3ecd5ac020114e3e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "dwarfutils" + depends_on "zstd" + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCPPTRACE_DEMANGLE_WITH_CXXABI=ON + -DCPPTRACE_FIND_LIBDWARF_WITH_PKGCONFIG=ON + -DCPPTRACE_GET_SYMBOLS_WITH_LIBDWARF=ON + -DCPPTRACE_UNWIND_WITH_EXECINFO=ON + -DCPPTRACE_USE_EXTERNAL_GTEST=ON + -DCPPTRACE_USE_EXTERNAL_LIBDWARF=ON + -DCPPTRACE_USE_EXTERNAL_ZSTD=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + cpptrace::generate_trace().print(); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-o", "test", "-lcpptrace" + system "./test" + end +end diff --git a/Formula/c/cppunit.rb b/Formula/c/cppunit.rb new file mode 100644 index 0000000000000..dd44ab8322a77 --- /dev/null +++ b/Formula/c/cppunit.rb @@ -0,0 +1,39 @@ +class Cppunit < Formula + desc "Unit testing framework for C++" + homepage "https://wiki.freedesktop.org/www/Software/cppunit/" + url "https://dev-www.libreoffice.org/src/cppunit-1.15.1.tar.gz" + sha256 "89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7" + license "LGPL-2.1-only" + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?cppunit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "106d4a437b3dae596bfb93cc8e04de0e28d97d3446a5ad900f926168c8773f45" + sha256 cellar: :any, arm64_sequoia: "081175312ba1bb288369cb84ff8a8e3bf11cf9c451b80dac6cedc211590d020a" + sha256 cellar: :any, arm64_sonoma: "192272d9c0a8a984f6efd69def9b47c5f3eda974f27daebb448362501b8e81d2" + sha256 cellar: :any, arm64_ventura: "45a8c4e8ca0defb8adee6028c2d213c7868bac9fdc9a4e814ad1b45aea1c3c14" + sha256 cellar: :any, arm64_monterey: "7acd81de05bc607287b7133050c269e2ea86ac4e1141cb71ae85af4cd62e7f50" + sha256 cellar: :any, arm64_big_sur: "42291951a34e6fae578a9c25d2a5c399dc1e13ec3f700c017f96d7576acabbf1" + sha256 cellar: :any, sonoma: "7f1cbdf09781f2a7ad3ab585deed44b6e230815e50c2fa2a533513f11c4272a8" + sha256 cellar: :any, ventura: "7e5529650f22b5b4e19ff31a2af7134a11a112b8cbdbbd383cb50b0257e6fe7b" + sha256 cellar: :any, monterey: "a373aa7f91fd426cccdf9c8775439b21e620f529488030af40f5bd8ea79013e1" + sha256 cellar: :any, big_sur: "8890cb5c9b85681b735c3756d301df29beb98e2c0d0b10f2fad073e6f1870101" + sha256 cellar: :any, catalina: "3e194b84577c733e5641f305a1cb5cc76355f13037898afc56c3096f98bb78fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0a96b2919d44c81f063814b1e9272618b0144729a1c09f4f2878c63cbc7ee97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1024a59b0bca4572448d7ed2e1152688d1b9be616d3b0644c15de8cd982c32a5" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "Usage", shell_output("#{bin}/DllPlugInTester", 2) + end +end diff --git a/Formula/c/cpputest.rb b/Formula/c/cpputest.rb new file mode 100644 index 0000000000000..4c9fc18e18eb6 --- /dev/null +++ b/Formula/c/cpputest.rb @@ -0,0 +1,60 @@ +class Cpputest < Formula + desc "C /C++ based unit xUnit test framework" + homepage "https://cpputest.github.io/" + url "https://github.com/cpputest/cpputest/releases/download/v4.0/cpputest-4.0.tar.gz" + sha256 "21c692105db15299b5529af81a11a7ad80397f92c122bd7bf1e4a4b0e85654f7" + license "BSD-3-Clause" + head "https://github.com/cpputest/cpputest.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "abff3233390673fd95af1c7bccd0b1b9c9687db0057b816cdb43b996f1d0bf73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "04a3efc8b2286e305c60c9bb9f71d34f8fbfee43d875192e0a97546c92e67658" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1854435e03a5f52bbf7fec9ce30d2502c2b00ecf037428d2aa44b3ee3018985" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7482a5b8049dbd3dd105d73392d98cdc45596f2411069245d4ecc4e75f75e857" + sha256 cellar: :any_skip_relocation, arm64_monterey: "12658e53f9987e135b9e375e9f143a9a2a259591057cb230ebe8fc2a8edd138b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "51cc4f2febbce066e2c57af7a50c816cbb02ec5c61394657e9fb4fef5977e8d0" + sha256 cellar: :any_skip_relocation, sonoma: "c287a3cab4f7364184c2ec63cf45c249eb8d3faf6a4b21c529cdc20ace922ec1" + sha256 cellar: :any_skip_relocation, ventura: "ee957c107b4c8972e0acdf8b23db196e710a3eddbc9efe76bb14f9cf1f0e5e8d" + sha256 cellar: :any_skip_relocation, monterey: "2ebba02ed9e1c87a6805e2c402433e59c9c9a0e377e179dc65e3d7c9f56dbbea" + sha256 cellar: :any_skip_relocation, big_sur: "37ccb80c5598e80ecacd6b5b33a610ce38666e9878cb7365a0f79e5705df49a0" + sha256 cellar: :any_skip_relocation, catalina: "9e06d26ed7a552c818c7f1d6bb68ef16e7185238a14bdf0ae337a410ecb46384" + sha256 cellar: :any_skip_relocation, arm64_linux: "d93627b9eacfae5a05edbc1a678dfb89652ca842905d10993b35861913fde598" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4fb771aa9c96a9d5fa6f88f1172d94ed171b1b2ce87a353828771b48d732c68" + end + + depends_on "cmake" => :build + + def install + # Backport support for CMake 4. Remove in the next release + # https://github.com/cpputest/cpputest/commit/fbb8526750aa370e642da7c21a98d6efdf7a3f37 + inreplace "CMakeLists.txt", /(cmake_minimum_required\(VERSION) 3\.1\)/, "\\1 3.8)" if build.stable? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "CppUTest/CommandLineTestRunner.h" + + TEST_GROUP(HomebrewTest) + { + }; + + TEST(HomebrewTest, passing) + { + CHECK(true); + } + int main(int ac, char** av) + { + return CommandLineTestRunner::RunAllTests(ac, av); + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lCppUTest", "-o", "test" + assert_match "OK (1 tests", shell_output("./test") + end +end diff --git a/Formula/c/cppzmq.rb b/Formula/c/cppzmq.rb new file mode 100644 index 0000000000000..b55f55625d353 --- /dev/null +++ b/Formula/c/cppzmq.rb @@ -0,0 +1,30 @@ +class Cppzmq < Formula + desc "Header-only C++ binding for libzmq" + homepage "https://www.zeromq.org" + url "https://github.com/zeromq/cppzmq/archive/refs/tags/v4.11.0.tar.gz" + sha256 "0fff4ff311a7c88fdb76fceefba0e180232d56984f577db371d505e4d4c91afd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5aad9277c9ee7b3140a55c7602ffc5f2be20dd46ea77fcae0ca4bb75c47fb372" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "zeromq" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCPPZMQ_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/hello_world.cpp", testpath + system ENV.cxx, "-std=c++11", "hello_world.cpp", "-I#{include}", + "-L#{Formula["zeromq"].opt_lib}", "-lzmq", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/cpr.rb b/Formula/c/cpr.rb new file mode 100644 index 0000000000000..e4bf6de793bbc --- /dev/null +++ b/Formula/c/cpr.rb @@ -0,0 +1,68 @@ +class Cpr < Formula + desc "C++ Requests, a spiritual port of Python Requests" + homepage "https://docs.libcpr.org/" + url "https://github.com/libcpr/cpr/archive/refs/tags/1.12.0.tar.gz" + sha256 "f64b501de66e163d6a278fbb6a95f395ee873b7a66c905dd785eae107266a709" + license "MIT" + head "https://github.com/libcpr/cpr.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d52043cae85a04a494aced7d6776a03d523f59918f12d67e58386f66e24ce0c6" + sha256 cellar: :any, arm64_sequoia: "09b831bfeb3f9574473d0389d56c54a98d6114401fc2461a459b81fae35441b7" + sha256 cellar: :any, arm64_sonoma: "62774379c35c472b5ce32cd7a1044201f746fde63b6caa1fa0ca1aa6f063ceba" + sha256 cellar: :any, arm64_ventura: "1daf2a4ac0df3bde82610f88f16d84dbb470e5bcd5466376500d43b43fc14997" + sha256 cellar: :any, sonoma: "6c4d6d71ee53bbe0ba524f3c91c00c33dd3256ac7f36ce5f66735d07203b8fc9" + sha256 cellar: :any, ventura: "444ed2abda55e8ddbed0ae3f2baf2dd1c90828a158e96f8dbcd7b40288a68fc7" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce24deaf7cfd5c547c270bd903be2d12afb258dcd140938c1b27a98474bce2ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4986278145e9f1ba77fc0caff4fe08c91437e40cd7b18114cf4d44ba6dbe06e7" + end + + depends_on "cmake" => :build + uses_from_macos "curl", since: :monterey # Curl 7.68+ + + on_linux do + depends_on "openssl@3" + end + + def install + args = %W[ + -DCPR_USE_SYSTEM_CURL=ON + -DCPR_BUILD_TESTS=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + std_cmake_args + + ENV.append_to_cflags "-Wno-error=deprecated-declarations" + system "cmake", "-S", ".", "-B", "build-shared", "-DBUILD_SHARED_LIBS=ON", *args + system "cmake", "--build", "build-shared" + system "cmake", "--install", "build-shared" + + system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=OFF", *args + system "cmake", "--build", "build-static" + lib.install "build-static/lib/libcpr.a" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(int argc, char** argv) { + auto r = cpr::Get(cpr::Url{"https://example.org"}); + std::cout << r.status_code << std::endl; + + return 0; + } + CPP + + args = %W[ + -I#{include} + -L#{lib} + -lcpr + ] + args << "-I#{Formula["curl"].opt_include}" if !OS.mac? || MacOS.version <= :big_sur + + system ENV.cxx, "test.cpp", "-std=c++17", *args, "-o", testpath/"test" + assert_match "200", shell_output("./test") + end +end diff --git a/Formula/c/cproto.rb b/Formula/c/cproto.rb new file mode 100644 index 0000000000000..9e87fd1354c38 --- /dev/null +++ b/Formula/c/cproto.rb @@ -0,0 +1,41 @@ +class Cproto < Formula + desc "Generate function prototypes for functions in input files" + homepage "https://invisible-island.net/cproto/" + url "https://invisible-mirror.net/archives/cproto/cproto-4.7y.tgz" + mirror "https://deb.debian.org/debian/pool/main/c/cproto/cproto_4.7y.orig.tar.gz" + sha256 "0bd1d8be8ff0a4ca43f947f95750d34f64eda93c9e2ca79100fd60140b7c6331" + license :public_domain + + livecheck do + url "https://invisible-mirror.net/archives/cproto/" + regex(/href=.*?cproto[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "58bffd226d337b3dafa76c0826592375412dbd7c168f4c0a1c77c97a029f7f5a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb3de8c47565f6ec10acd1481ad063139c9147a86d9fe9082dcf21bc29905889" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "122d4b64c1aace8c5424428c5a92a62904571e65837713fc4b851e9f94b8aa54" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d0ad1d890320e7f0c515df9b7b8dc3539f9a4325e41dd4d7f6a0425976fcf2e" + sha256 cellar: :any_skip_relocation, sonoma: "ce7a3c81d6c61db780af378231e6c03f34ae2b9781391ea6a8a08d35c606a960" + sha256 cellar: :any_skip_relocation, ventura: "66e49c9ef793c0c0c3b874224283e1aba46de0b03c91bbc406816ad4462cbfe6" + sha256 cellar: :any_skip_relocation, arm64_linux: "b439e277afd138e4921a535b01d8e2ea791e3bcb2c0d5c4dfc43ca85535d78f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79811b19af9c17898e97d36b997ceefee377b25273d783de07ec8c01a59f2d51" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + + system "make", "install" + end + + test do + (testpath/"woot.c").write("int woot() {\n}") + assert_match(/int woot.void.;/, shell_output("#{bin}/cproto woot.c")) + end +end diff --git a/Formula/c/cpu_features.rb b/Formula/c/cpu_features.rb new file mode 100644 index 0000000000000..ec35b01f404d5 --- /dev/null +++ b/Formula/c/cpu_features.rb @@ -0,0 +1,53 @@ +class CpuFeatures < Formula + desc "Cross platform C99 library to get cpu features at runtime" + homepage "https://github.com/google/cpu_features" + url "https://github.com/google/cpu_features/archive/refs/tags/v0.10.1.tar.gz" + sha256 "52639b380fced11d738f8b151dbfee63fb94957731d07f1966c812e5b90cbad4" + license "Apache-2.0" + head "https://github.com/google/cpu_features.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fd159612cdd2ab4419b292cc51c82f58faf76bf9914958b5e9349f35ab2c3ac5" + sha256 cellar: :any, arm64_sequoia: "945475dbda6e53ed6b0099e872921e81866dc0417ff7374afd0d6338d382eb0a" + sha256 cellar: :any, arm64_sonoma: "735d42534147a399b2918ed40ee5cabcb2766a5c2eadbd02cb22208f296184c5" + sha256 cellar: :any, arm64_ventura: "e2e94da759d6d2f19a74806f3892dc53d737bdc487438c7e600863b1873230c2" + sha256 cellar: :any, sonoma: "473045353940853796b7698a7fb015255acd4fba2721ae20440669a7cf6fed51" + sha256 cellar: :any, ventura: "e5e805ca6fae1c04da955ebfd6eac72e60f28eee7219a51d91bda7a7340d1ed3" + sha256 cellar: :any_skip_relocation, arm64_linux: "71a88007b4da1b4346f18463e45ab8722c8177f62155ba53fd7cd8451145ef1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f4909cd169aaa589c4f32fb189f6457127355b2064689303bf96a720c120494" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Install static lib too + system "cmake", "-S", ".", "-B", "build/static", *std_cmake_args + system "cmake", "--build", "build/static" + lib.install "build/static/libcpu_features.a" + end + + test do + output = shell_output(bin/"list_cpu_features") + assert_match(/^arch\s*:/, output) + if Hardware::CPU.arm? + assert_match(/^implementer\s*:/, output) + assert_match(/^variant\s*:/, output) + assert_match(/^part\s*:/, output) + assert_match(/^revision\s*:/, output) + else + assert_match(/^brand\s*:/, output) + assert_match(/^family\s*:/, output) + assert_match(/^model\s*:/, output) + assert_match(/^stepping\s*:/, output) + assert_match(/^uarch\s*:/, output) + end + assert_match(/^flags\s*:/, output) + end +end diff --git a/Formula/c/cpufetch.rb b/Formula/c/cpufetch.rb new file mode 100644 index 0000000000000..b258218b8c310 --- /dev/null +++ b/Formula/c/cpufetch.rb @@ -0,0 +1,81 @@ +class Cpufetch < Formula + desc "CPU architecture fetching tool" + homepage "https://github.com/Dr-Noob/cpufetch" + url "https://github.com/Dr-Noob/cpufetch/archive/refs/tags/v1.07.tar.gz" + sha256 "dc3ec8f9c9d41d8434702a778cc150b196d5d178fd768a964f57d22f268a2c17" + license "GPL-2.0-only" + head "https://github.com/Dr-Noob/cpufetch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cbdea8515700936d548b6baab978624be7e9fcc94dd3121a5962d58074cec48c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a1b091ed4c78aede110a601f2f57ced0b6c30754f1032d284d613b3bd3a3ab78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e068fc8cc1764d15ecf55a8e01e80a3780070f1808b331e88679c74b593045a5" + sha256 cellar: :any_skip_relocation, sonoma: "0554f98200441b7743a72bfe61a55f753c2d19f56d8af453924248da7efb7db5" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d1bcfcfcb32100c81cf2c17b3e8a9c08c1260935f8572db1a7f3e8ace87a3d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5544e250a55c6c3506d74586d7d566194dbbba1c97bb6b10acacc5ede672ebe3" + end + + # Compile with `src/common/sysctl.c` on x86_64 Macs + # https://github.com/Dr-Noob/cpufetch/issues/375 + patch :DATA + + def install + system "make" + bin.install "cpufetch" + man1.install "cpufetch.1" + end + + test do + # This fails in our Docker container. + return if ENV["HOMEBREW_GITHUB_ACTIONS"].present? && OS.linux? + + ephemeral_arm = ENV["HOMEBREW_GITHUB_ACTIONS"].present? && + Hardware::CPU.arm? && + OS.mac? && + MacOS.version > :big_sur + expected_result, line = if ephemeral_arm + [1, 1] + elsif OS.mac? && Hardware::CPU.intel? + [0, 1] + else + [0, 0] + end + actual = shell_output("#{bin}/cpufetch --debug 2>&1", expected_result).lines[line].strip + + system_name = OS.mac? ? "macOS" : OS.kernel_name + arch = (OS.mac? && Hardware::CPU.arm?) ? "ARM" : "x86 / x86_64" + expected = "cpufetch v#{version} (#{system_name} #{arch} build)" + + assert_match expected, actual + end +end + +__END__ +diff --git a/Makefile b/Makefile +index d07f036..c88baba 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,6 +20,11 @@ ifneq ($(OS),Windows_NT) + COMMON_HDR += $(SRC_COMMON)freq.h + endif + ++ ifeq ($(os), Darwin) ++ SOURCE += $(SRC_COMMON)sysctl.c ++ HEADERS += $(SRC_COMMON)sysctl.h ++ endif ++ + ifeq ($(arch), $(filter $(arch), x86_64 amd64 i386 i486 i586 i686)) + SRC_DIR=src/x86/ + SOURCE += $(COMMON_SRC) $(SRC_DIR)cpuid.c $(SRC_DIR)apic.c $(SRC_DIR)cpuid_asm.c $(SRC_DIR)uarch.c +@@ -51,11 +56,6 @@ ifneq ($(OS),Windows_NT) + ifeq ($(is_sve_flag_supported), yes) + SVE_FLAGS += -march=armv8-a+sve + endif +- +- ifeq ($(os), Darwin) +- SOURCE += $(SRC_COMMON)sysctl.c +- HEADERS += $(SRC_COMMON)sysctl.h +- endif + else ifeq ($(arch), $(filter $(arch), riscv64 riscv32)) + SRC_DIR=src/riscv/ + SOURCE += $(COMMON_SRC) $(SRC_DIR)riscv.c $(SRC_DIR)uarch.c $(SRC_COMMON)soc.c $(SRC_DIR)soc.c $(SRC_DIR)udev.c diff --git a/Formula/c/cpuid.rb b/Formula/c/cpuid.rb new file mode 100644 index 0000000000000..9db73b9794827 --- /dev/null +++ b/Formula/c/cpuid.rb @@ -0,0 +1,32 @@ +class Cpuid < Formula + desc "CPU feature identification for Go" + homepage "https://github.com/klauspost/cpuid" + url "https://github.com/klauspost/cpuid/archive/refs/tags/v2.3.0.tar.gz" + sha256 "467c058227b86d527bff7e2e1504748f99ca27cb69f3908189ceb18b1df8428a" + license "MIT" + head "https://github.com/klauspost/cpuid.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8db225f084a6723c03356505200ac635cb94bb3ce0204900eb62137ce559eaaa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b65f000226c41729001db3a206845dafeaf87d39f5ec12465ee02797718399f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b65f000226c41729001db3a206845dafeaf87d39f5ec12465ee02797718399f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b65f000226c41729001db3a206845dafeaf87d39f5ec12465ee02797718399f" + sha256 cellar: :any_skip_relocation, sonoma: "3fb55a4d8942c9131a331f392d2b56e4e1515163850a5afcb8e1a17ec100aa61" + sha256 cellar: :any_skip_relocation, ventura: "3fb55a4d8942c9131a331f392d2b56e4e1515163850a5afcb8e1a17ec100aa61" + sha256 cellar: :any_skip_relocation, arm64_linux: "555f1ed20e4de1ce5bdc1ea1d5ed9cf01c1bb64f968cf1c1125200d988869acc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de235784ecef52744cafc99dd9b01aae03ff3763514153d8305ecd4d9b2b0c39" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cpuid" + end + + test do + json = shell_output("#{bin}/cpuid -json") + assert_match "BrandName", json + assert_match "VendorID", json + assert_match "VendorString", json + end +end diff --git a/Formula/c/cpulimit.rb b/Formula/c/cpulimit.rb new file mode 100644 index 0000000000000..b10e42d4ad9f8 --- /dev/null +++ b/Formula/c/cpulimit.rb @@ -0,0 +1,43 @@ +class Cpulimit < Formula + desc "CPU usage limiter" + homepage "https://github.com/opsengine/cpulimit" + url "https://github.com/opsengine/cpulimit/archive/refs/tags/v0.2.tar.gz" + sha256 "64312f9ac569ddcadb615593cd002c94b76e93a0d4625d3ce1abb49e08e2c2da" + license "GPL-2.0-or-later" + head "https://github.com/opsengine/cpulimit.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b5d88d4e5afdf6bf19d2069b78a12afb77e1f5e2ddf3b34b1cae55528a8f7bd6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7eca714845ccc7a47497489a5075812b50700960acc1eb7eeefbfd5921851a76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8dab4e4b11b19e8c01a57593d15ec399ab4f25b8ccdc72299e3f67092d1beaf8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e94ecdb44d2b8f104510da469aaa27a879cbf41518c88315f346116203b9c944" + sha256 cellar: :any_skip_relocation, arm64_monterey: "993f9fe777c7feb2f2da49486e0b7febf6a6d822e64ff4f40f578ddc0f21d7f4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f09919436a14d7b1598720ca832435b2500aebe0839f5055a253f52c59642a5d" + sha256 cellar: :any_skip_relocation, sonoma: "611be2cfc0a3c0908bb2992fe8733f85aff851db7ea94fa9dcf2d5b20736fa43" + sha256 cellar: :any_skip_relocation, ventura: "e26ef5c56d8a24d533ebbe33a65dda99defac0f32504edff34358992b39fa1cb" + sha256 cellar: :any_skip_relocation, monterey: "71ef4e07ccd817edc04f0b60f0bdb2a4a2efa7acdb1fdbdf31216871cfe6b61c" + sha256 cellar: :any_skip_relocation, big_sur: "f3f394e17febb7af49a1cb35c46e33856263dc58016d959aad2d2a250aae1d7d" + sha256 cellar: :any_skip_relocation, catalina: "7330907348c0a181c75b069dba7ee628e8c524c9bb9510487dbfd43730173db5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4ffc1c3a63a8b4ae82354e6fed41658b2f094cbbe602a37659df8c9f10efc55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e7b26fdf597d68a1f482095c11f606dc5fc6f88a27e88bf14a3e976cec0998a" + end + + # process_group.c:64:15: error: call to undeclared function 'basename'; + # ISO C99 and later do not support implicit function declarations + # (https://github.com/opsengine/cpulimit/pull/109) + patch do + url "https://github.com/opsengine/cpulimit/commit/4c1e021037550c437c7da3a276b95b5bf79e967e.patch?full_index=1" + sha256 "0e1cda1dfad54cefd2af2d0677c76192d5db5c18f3ee73318735b5122ccf0e34" + end + + def install + system "make" + bin.install "src/cpulimit" + end + + test do + system bin/"cpulimit", "--limit=10", "ls" + end +end diff --git a/Formula/c/cql-proxy.rb b/Formula/c/cql-proxy.rb new file mode 100644 index 0000000000000..257c57d9e1b1c --- /dev/null +++ b/Formula/c/cql-proxy.rb @@ -0,0 +1,31 @@ +class CqlProxy < Formula + desc "DataStax cql-proxy enables Cassandra apps to use Astra DB without code changes" + homepage "https://github.com/datastax/cql-proxy" + url "https://github.com/datastax/cql-proxy/archive/refs/tags/v0.2.0.tar.gz" + sha256 "9c08158674244b297c3019f0c755e84742d8824f380f185e035419a2de539d77" + license "Apache-2.0" + head "https://github.com/datastax/cql-proxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03f84d5e2eb848b641075a1e2b2298a8a7755cc06a4cad38abcb57d9d64dbe6d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9bb3a1b8bf92e37379d4765635babee8424e20556d77448c7ddf8527879ca08e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9bb3a1b8bf92e37379d4765635babee8424e20556d77448c7ddf8527879ca08e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9bb3a1b8bf92e37379d4765635babee8424e20556d77448c7ddf8527879ca08e" + sha256 cellar: :any_skip_relocation, sonoma: "3dbc0fb6ba197d0580cad3327f8d6f10a4a3425fc9aa93a96043e45932a969a7" + sha256 cellar: :any_skip_relocation, ventura: "3dbc0fb6ba197d0580cad3327f8d6f10a4a3425fc9aa93a96043e45932a969a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "c66d460a5288fdc86c5316e917e2041da66e9a240cd7496706dfff88ac9d4f57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5329be03e21ee3e5a58454aca78a6a08034b955efce86e2e2d14caff0e101b3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + touch "secure.txt" + output = shell_output("#{bin}/cql-proxy -b secure.txt --bind 127.0.0.1 2>&1", 2) + assert_match "unable to open", output + end +end diff --git a/Formula/c/cql.rb b/Formula/c/cql.rb new file mode 100644 index 0000000000000..6acfeefd99ddf --- /dev/null +++ b/Formula/c/cql.rb @@ -0,0 +1,57 @@ +class Cql < Formula + desc "Decentralized SQL database with blockchain features" + homepage "https://covenantsql.io" + url "https://github.com/CovenantSQL/CovenantSQL/archive/refs/tags/v0.8.1.tar.gz" + sha256 "73abb65106e5045208aa4a7cda56bc7c17ba377557ae47d60dad39a63f9c88a6" + license "Apache-2.0" + head "https://github.com/CovenantSQL/CovenantSQL.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b2ed7ce113b81fa92f86a376923fd42bd294320b892005b8996f8950fe40e19a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6ea4a0d072fb6b236bdb26357b95284f657ddfe7e4eca59274b267a14c5692b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c03c9a76a84d78e47afb1a032404aed4f24da0496af2910b9df0870c9938bc16" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c8e9a72ff6ac7a64ad0d7cfb5919ebbe5fda03e57db8d5241e87470226546c2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6f3d16b39545a07b7811657ed8de92063b3f4fc13f96e8b092be420ff80d0ed6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a5f446cb406f5aafce83406573b0a808f718e4e8b3df3d112692b824d4912e45" + sha256 cellar: :any_skip_relocation, sonoma: "09ba7649987d1e9ff1cf09c6a9f092fd2dad9f869e081a0f138f9b5cb6c40fc0" + sha256 cellar: :any_skip_relocation, ventura: "3fcb9c1f88fcf471a71342c7b339f1f5da89003b4ca0f205780422d3ee705cf2" + sha256 cellar: :any_skip_relocation, monterey: "29676dd87b84617809ee42f862ddbeabb56a52df5ddffa4acc9e8fe807e7244a" + sha256 cellar: :any_skip_relocation, big_sur: "ba7c4a2af433caab8ca7d413629cb7a7f16c603bbe982029b0b9cf651e58b3d5" + sha256 cellar: :any_skip_relocation, catalina: "aca52c8e6eb35cda498056f2047efbed677cda2632d9993f19b6b26f558dd82b" + sha256 cellar: :any_skip_relocation, arm64_linux: "954bda484c06dd6041bc1e3e0e8c582db2b0257060a4f457df0557f1c9f6c591" + sha256 cellar: :any_skip_relocation, x86_64_linux: "35126cd0a047a47d7f08b3dc2a2967eee1d2263ef55c8eccafe4b4bfa9047385" + end + + depends_on "go" => :build + + # Support go 1.17, remove after next release + patch do + url "https://github.com/CovenantSQL/CovenantSQL/commit/c1d5d81f5c27f0d02688bba41e29b84334eb438c.patch?full_index=1" + sha256 "ebb9216440dc7061a99ad05be3dc7634db4260585f82966104a29a7c323c903d" + end + + def install + ENV["CGO_ENABLED"] = "1" + + ldflags = %W[ + -s -w + -X main.version=v#{version} + -X github.com/CovenantSQL/CovenantSQL/conf.RoleTag=C + -X github.com/CovenantSQL/CovenantSQL/utils/log.SimpleLog=Y + ] + system "go", "build", *std_go_args(ldflags:, tags: "sqlite_omit_load_extension"), "./cmd/cql" + + bash_completion.install "bin/completion/cql-completion.bash" + zsh_completion.install "bin/completion/_cql" + end + + test do + testconf = testpath/"confgen" + system bin/"cql", "generate", testconf + assert_path_exists testconf/"private.key" + assert_path_exists testconf/"config.yaml" + end +end diff --git a/Formula/c/cqlkit.rb b/Formula/c/cqlkit.rb new file mode 100644 index 0000000000000..afe8971f89348 --- /dev/null +++ b/Formula/c/cqlkit.rb @@ -0,0 +1,34 @@ +class Cqlkit < Formula + desc "CLI tool to export Cassandra query as CSV and JSON format" + homepage "https://github.com/tenmax/cqlkit" + url "https://github.com/tenmax/cqlkit/releases/download/v0.3.3/cqlkit-0.3.3.zip" + sha256 "0574b4b6fe893078e993a80f95a183b89955129ab8929f5032b7faacf611952c" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "d046672e2ea78accbef7eb841a473b6074a2b42f683d6c9b4e07979f63c60c29" + end + + depends_on "openjdk" + + def install + libexec.install %w[bin lib] + rm(Dir["#{libexec}/bin/*.bat"]) + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + output = shell_output("#{bin}/cql2cql -c localhost -q 'select peer from system.peers' 2>&1", 1) + assert_match(/.*Error: All host\(s\) tried for query failed.*/, output) + output = shell_output("#{bin}/cql2csv -c localhost -q 'select peer from system.peers' 2>&1", 1) + assert_match(/.*Error: All host\(s\) tried for query failed.*/, output) + output = shell_output("#{bin}/cql2json -c localhost -q 'select peer from system.peers' 2>&1", 1) + assert_match(/.*Error: All host\(s\) tried for query failed.*/, output) + output = shell_output("#{bin}/cqlkit -c localhost -q 'select peer from system.peers' 2>&1", 1) + assert_match(/.*Error: All host\(s\) tried for query failed.*/, output) + end +end diff --git a/Formula/c/crabz.rb b/Formula/c/crabz.rb new file mode 100644 index 0000000000000..26112edd343a0 --- /dev/null +++ b/Formula/c/crabz.rb @@ -0,0 +1,39 @@ +class Crabz < Formula + desc "Like pigz, but in Rust" + homepage "https://github.com/sstadick/crabz" + url "https://github.com/sstadick/crabz/archive/refs/tags/v0.10.0.tar.gz" + sha256 "2bbd8eb669a6570b104a0eb412d2492d5a9296524964cd676440069d27f52e6c" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/sstadick/crabz.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "184c885b4adbe8d9fae4388cea1347debaa6e62a0c9c5726e1b6623a5062c1f0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a63f077a041350830a61b22d164dc5f00dba1db420d109d28de740fd9ab3b5c2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14ea54436bae9bf5efd138c72b306a6d112576b01db726e4137966b7b253ad27" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5750118d971ca993668011b90381d97b09d2a739212f1ccdf931cc28a5dd38f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d7ae6a787a7a1797943ebbf743f8d5e833b18241fe6e85c678dfca850040059d" + sha256 cellar: :any_skip_relocation, sonoma: "577d2a7fbd81e94e01cea85c3b3da2c759a88146189c66d5a61f9b32f6d9ad10" + sha256 cellar: :any_skip_relocation, ventura: "bf7734ca7c9ba5fbf35a9ee9689d24545e069ddcc7cea47305d3db9be1bfbfbc" + sha256 cellar: :any_skip_relocation, monterey: "b6af3a466b9ed8b122cc9ec0b8e80bf0c8e60c0ff0ec32d5976bc6bbacb04fdb" + sha256 cellar: :any_skip_relocation, arm64_linux: "36844bc642d323b46061d065ce3f0ef54fb344950a711ace63ce737ab8c91272" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5843ff105bb50beb4e6712e6479edb8e3be80d5f1508e10fb7743d19ca9a6277" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + test_data = "a" * 1000 + (testpath/"example").write test_data + system bin/"crabz", "-f", "gzip", testpath/"example", "-o", testpath/"example.gz" + assert_path_exists testpath/"example.gz" + system bin/"crabz", "-d", testpath/"example.gz", "-o", testpath/"example2" + assert_equal test_data, (testpath/"example2").read + + assert_match "crabz cargo:#{version}", shell_output("#{bin}/crabz --version") + end +end diff --git a/Formula/c/cracklib.rb b/Formula/c/cracklib.rb new file mode 100644 index 0000000000000..c9cf28c905fd9 --- /dev/null +++ b/Formula/c/cracklib.rb @@ -0,0 +1,66 @@ +class Cracklib < Formula + desc "LibCrack password checking library" + homepage "https://github.com/cracklib/cracklib" + url "https://github.com/cracklib/cracklib/releases/download/v2.10.3/cracklib-2.10.3.tar.bz2" + sha256 "f3dcb54725d5604523f54a137b378c0427c1a0be3e91cfb8650281a485d10dae" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "eb24373673fd2e119b1b5523ba59a6287127610d553be024c05cdfa1bfdb029b" + sha256 arm64_sequoia: "9d98bf420b98834ad967baf58c7282e2e8e280c967dd1dc8b5e7ae878fe81666" + sha256 arm64_sonoma: "9496d3be435158f297c9428e967289ec4fe41d442c02bf0ade3a432c91c05a36" + sha256 arm64_ventura: "5798b58bebd1cd635c356812c0aa23c606b78395c193669efcb0bc8691b9d5b6" + sha256 sonoma: "106cf73076dbca2480f870e24c63057044b6c1bcebb4423ef74aae8c65dc154f" + sha256 ventura: "766a21b910e679477f796177b5241589b2abb2fd834bc6b32144ba7d731a8dc0" + sha256 arm64_linux: "447895f60058339604a3bfb9956e48b4494e4c2be57cf102e3cbbf0aa5717516" + sha256 x86_64_linux: "3032a4afab1d0877faa7b2e27740d11632a394b3478d5e7aeb690b6badef3cc6" + end + + head do + url "https://github.com/cracklib/cracklib.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + resource "cracklib-words" do + url "https://github.com/cracklib/cracklib/releases/download/v2.10.3/cracklib-words-2.10.3.bz2" + sha256 "ec25ac4a474588c58d901715512d8902b276542b27b8dd197e9c2ad373739ec4" + end + + def install + buildpath.install (buildpath/"src").children if build.head? + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + system "./configure", "--disable-silent-rules", + "--sbindir=#{bin}", + "--without-python", + "--with-default-dict=#{var}/cracklib/cracklib-words", + *std_configure_args + system "make", "install" + + share.install resource("cracklib-words") + end + + def post_install + (var/"cracklib").mkpath + cp share/"cracklib-words-#{resource("cracklib-words").version}", var/"cracklib/cracklib-words" + system "#{bin}/cracklib-packer < #{var}/cracklib/cracklib-words" + end + + test do + assert_match "password: it is based on a dictionary word", pipe_output(bin/"cracklib-check", "password", 0) + end +end diff --git a/Formula/c/cram.rb b/Formula/c/cram.rb new file mode 100644 index 0000000000000..69df8335e00db --- /dev/null +++ b/Formula/c/cram.rb @@ -0,0 +1,32 @@ +class Cram < Formula + include Language::Python::Virtualenv + + desc "Functional testing framework for command-line applications" + homepage "https://bitheap.org/cram" + url "https://files.pythonhosted.org/packages/38/85/5a8a3397b2ccb2ffa3ba871f76a4d72c16531e43d0e58fc89a0f2983adbd/cram-0.7.tar.gz" + sha256 "7da7445af2ce15b90aad5ec4792f857cef5786d71f14377e9eb994d8b8337f2f" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3a0f3b04ef44d789fb07fe79107eb12c410dfc5794a730f3ab2825c890a76228" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/cram --version") + + (testpath/"test.t").write <<~EOS + Simple cram test + $ echo "Hello World" + Hello World + EOS + expected = "Ran 1 tests, 0 skipped, 0 failed." + assert_match expected, shell_output("#{bin}/cram test.t") + end +end diff --git a/Formula/c/crane.rb b/Formula/c/crane.rb new file mode 100644 index 0000000000000..8bcd54d660fe7 --- /dev/null +++ b/Formula/c/crane.rb @@ -0,0 +1,38 @@ +class Crane < Formula + desc "Tool for interacting with remote images and registries" + homepage "https://github.com/google/go-containerregistry" + url "https://github.com/google/go-containerregistry/archive/refs/tags/v0.20.6.tar.gz" + sha256 "53f17964ade63f63b2c66231a6e1ea606345cfcc325e49a5267017bb475bdcb4" + license "Apache-2.0" + head "https://github.com/google/go-containerregistry.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "72a180ee36aec8354893bd572f691fecff83c1b23e93dd22462180c59b4bf0b0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bf1acaf4cde02176b9f0a3684e4d062b9cc8758977ee056dfbcab5cd2fae028f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf1acaf4cde02176b9f0a3684e4d062b9cc8758977ee056dfbcab5cd2fae028f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf1acaf4cde02176b9f0a3684e4d062b9cc8758977ee056dfbcab5cd2fae028f" + sha256 cellar: :any_skip_relocation, sonoma: "693d1829b69430956cfcfc35a90e0f2b2099fbf2b50a8ec05389f45e2502d9b1" + sha256 cellar: :any_skip_relocation, ventura: "693d1829b69430956cfcfc35a90e0f2b2099fbf2b50a8ec05389f45e2502d9b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "745a10f878a8c14f61b769ff7f09f9536a27f04c93ec4a47008d6b0ca4ddb895" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82c5b30322c819286dc77c9f3af7e04ba387a3a0358e6fabf23325fba2f43542" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/google/go-containerregistry/cmd/crane/cmd.Version=#{version} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/crane" + + generate_completions_from_executable(bin/"crane", "completion") + end + + test do + json_output = shell_output("#{bin}/crane manifest gcr.io/go-containerregistry/crane") + manifest = JSON.parse(json_output) + assert_equal manifest["schemaVersion"], 2 + end +end diff --git a/Formula/c/crash.rb b/Formula/c/crash.rb new file mode 100644 index 0000000000000..f78c6d2b8a4bc --- /dev/null +++ b/Formula/c/crash.rb @@ -0,0 +1,30 @@ +class Crash < Formula + desc "Kernel debugging shell for Java that allows gdb-like syntax" + homepage "https://www.crashub.org/" + url "https://search.maven.org/remotecontent?filepath=org/crashub/crash.distrib/1.3.2/crash.distrib-1.3.2.tar.gz" + sha256 "9607a84c34b01e5df999ac5bde6de2357d2a0dfb7c5c0ce2a5aea772b174ef01" + license "LGPL-2.1-or-later" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/crashub/crash.distrib/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f2b6a3446992c7b2b38b4db049afc77e08c1eeaa3780d12686e298d4f705420b" + end + + resource "docs" do + url "https://search.maven.org/remotecontent?filepath=org/crashub/crash.distrib/1.3.2/crash.distrib-1.3.2-docs.tar.gz" + sha256 "b3bf1efe50fb640224819f822835e3897c038ab5555049f2279a5b26171178bb" + end + + def install + doc.install resource("docs") + libexec.install Dir["crash/*"] + bin.install_symlink "#{libexec}/bin/crash.sh" + end +end diff --git a/Formula/c/crates-tui.rb b/Formula/c/crates-tui.rb new file mode 100644 index 0000000000000..bd11a8a9dca3c --- /dev/null +++ b/Formula/c/crates-tui.rb @@ -0,0 +1,47 @@ +class CratesTui < Formula + desc "TUI for exploring crates.io using Ratatui" + homepage "https://github.com/ratatui/crates-tui" + url "https://github.com/ratatui/crates-tui/archive/refs/tags/v0.1.25.tar.gz" + sha256 "b02e2fa3b7225b5638f9ab8716c3cf21dfb32d96aee140ead2f451005abd58c2" + license "MIT" + head "https://github.com/ratatui/crates-tui.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a4d3f4d546495d9eada59e3329b86c0172422e4796be32ca05c01eb3303e6f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f56fcc14fa7ac18c23012b124c2c1332b496ca0e9ade5a07a6d531a5f7bb4e62" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30f81c73519341098deba38f9709c99347db6b33612bba1550711e68a45a0501" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3bb365cdc581270ec3b678e116906be8804b8456f9177a9da96c82596c5c4d8a" + sha256 cellar: :any_skip_relocation, sonoma: "8a9d22f1366b378bcc6815bcfaaf8757f7411e2ebcbadd8d25fdcaaee58e2162" + sha256 cellar: :any_skip_relocation, ventura: "b2a38ed0df2652636b17333925225751941160871dd6a2f33a41e3d178a92271" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7d2f55e2a85701ef682ebd95b1e545419d31ce1342eb665b044441309e0f1d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d61432d14ad58729837802eb342892a52a6fda9c600efdea3e25f6f3f4f570d7" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/crates-tui --version") + + # failed with Linux CI, `No such device or address (os error 6)` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + begin + output_log = testpath/"output.log" + pid = spawn bin/"crates-tui", [:out, :err] => output_log.to_s + sleep 2 + assert_match "New Crates", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/c/crc32c.rb b/Formula/c/crc32c.rb new file mode 100644 index 0000000000000..ccda3eb4f3f1b --- /dev/null +++ b/Formula/c/crc32c.rb @@ -0,0 +1,68 @@ +class Crc32c < Formula + desc "Implementation of CRC32C with CPU-specific acceleration" + homepage "https://github.com/google/crc32c" + url "https://github.com/google/crc32c/archive/refs/tags/1.1.2.tar.gz" + sha256 "ac07840513072b7fcebda6e821068aa04889018f24e10e46181068fb214d7e56" + license "BSD-3-Clause" + head "https://github.com/google/crc32c.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e3aaa27057bb4e44a84d7fcdef9f8fea950c18d34017a3212f4f4ee9d0e6f03" + sha256 cellar: :any, arm64_sequoia: "8ea83fd9714095d17ddcb3b8a8f70d2c5694f35b7b6edc17aa8b32e6952295c8" + sha256 cellar: :any, arm64_sonoma: "df5ea233eee7c04d4c606c33132e5a769761ea6466f711832c22393ce0ce7170" + sha256 cellar: :any, arm64_ventura: "3ada0a95e5f4b33f6a5caf7e56d9bfe608b44f01c7fd1be0db8f30d4102a473d" + sha256 cellar: :any, arm64_monterey: "f36a8347a3c402b0f13b407fe0c99e1a2b067722cebf22f62a2f9916be2118fe" + sha256 cellar: :any, arm64_big_sur: "1e4ac6f8e18ad96c1d7b5e899902b6ce75d56953582066570de4ecc2329409a9" + sha256 cellar: :any, sonoma: "9e3b13f21f27370340084fa45100b87ce3aa6a9f6fb403789683695958a33217" + sha256 cellar: :any, ventura: "838b9ec85a464004ec90f99348eaca5a2432de5ea2cd671d8bf454f5b4106612" + sha256 cellar: :any, monterey: "54317f1800ac7c165ada3b28a40c675e0848626901e654939e86966de36e4579" + sha256 cellar: :any, big_sur: "af7b55946ef4fb6f20e4ef31c77c0d23cc7e8e34861f8e96b367f801c611592b" + sha256 cellar: :any, catalina: "f4301aa03c705f8ab3fddd34090b30975306f4e159d32bd4f305dcac73914544" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cd8632d65ac971ce60b6023b00c4f0058db967cc33dcaba57bfd8a0fb336934" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d1d82ebed58e6c35064358c5a04428b6bb053413be7b11b2c14e4cbcd156205" + end + + depends_on "cmake" => :build + + def install + # Backport support for CMake 4. Remove on the next release when inreplace fails + # https://github.com/google/crc32c/commit/2bbb3be42e20a0e6c0f7b39dc07dc863d9ffbc07 + inreplace "CMakeLists.txt", /(cmake_minimum_required\(VERSION) 3\.1\)/, "\\1 3.16)" if build.stable? + + args = %w[ + -DCRC32C_BUILD_TESTS=0 + -DCRC32C_BUILD_BENCHMARKS=0 + -DCRC32C_USE_GLOG=0 + ] + + system "cmake", "-S", ".", "-B", "build-static", *args, *std_cmake_args + system "cmake", "--build", "build-static" + system "cmake", "--install", "build-static" + + system "cmake", "-S", ".", "-B", "build-shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build-shared" + system "cmake", "--install", "build-shared" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() + { + std::uint32_t expected = 0xc99465aa; + std::uint32_t result = crc32c::Crc32c(std::string("hello world")); + assert(result == expected); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lcrc32c", "-std=c++11", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/crcany.rb b/Formula/c/crcany.rb new file mode 100644 index 0000000000000..8cded05429141 --- /dev/null +++ b/Formula/c/crcany.rb @@ -0,0 +1,53 @@ +class Crcany < Formula + desc "Compute any CRC, a bit at a time, a byte at a time, and a word at a time" + homepage "https://github.com/madler/crcany" + url "https://github.com/madler/crcany/archive/refs/tags/v2.1.tar.gz" + sha256 "e07cf86f2d167ea628e6c773369166770512f54a34a3d5c0acd495eb947d8a1b" + license "Zlib" + head "https://github.com/madler/crcany.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "310705bfcb672936583047b27aa427f521040ed64ac1caf7857658f0ad573bb5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "edc3456fd296ee992ccd6dc5f64082b1b52789679ea5068c8326874ec600863c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c585ae637459f4db4fb77502ca167aa4375e1b518a193020a01353f98b8a064f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3146496202ceb4f73456d12996ad9cbdc506119617f4c5454882c3b3c7a0dcff" + sha256 cellar: :any_skip_relocation, arm64_monterey: "06926e476afee66cf7594c159afb442dde00ff967b2658d6420ad728354cf8cf" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "55fb14e87a929f10fabaf64463015c1cbea366ad0035199802acf5f3871b13de" + sha256 cellar: :any_skip_relocation, sonoma: "5a01329d39b966b06f4333eb90d44c5997139e55ef3e62954c09c52d392321ca" + sha256 cellar: :any_skip_relocation, ventura: "f032e8a58904a3325852630bb6749c920bf1461636eca319b2aa9d6617f5bc5d" + sha256 cellar: :any_skip_relocation, monterey: "3f78920ca550faf57358c20b567af28ab3fc29955df0f3f50fac0ce6319f9ee7" + sha256 cellar: :any_skip_relocation, big_sur: "c7092bf62c6bcb2e59db55725e0cc5e7fca8135382844bdc8e8e2023d1db5b1c" + sha256 cellar: :any_skip_relocation, catalina: "f84a1c61faf5e8fcf8e411faaa78ab2c6b3e8b0decd12745e895ed854a37775f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b23fda4ece11205730aa4f947f916627f75e7609b1e56ff65a8c9744f10b1518" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8ef2be75d86b017a0d85c1abb309cec9bc01695c4ccf9ae9db2ce8fd2d04293" + end + + def install + system "make" + bin.install "crcany" + end + + test do + output = shell_output("#{bin}/crcany -list") + assert_match "CRC-3/GSM (3gsm)", output + assert_match "CRC-64/XZ (64xz)", output + + input = "test" + filename = "foobar" + (testpath/filename).write input + + expected = <<~EOS + CRC-3/GSM: 0x0 + EOS + assert_equal expected, pipe_output("#{bin}/crcany -3gsm", input) + assert_equal expected, shell_output("#{bin}/crcany -3gsm #{filename}") + + expected = <<~EOS + CRC-64/XZ: 0xfa15fda7c10c75a5 + EOS + assert_equal expected, pipe_output("#{bin}/crcany -64xz", input) + assert_equal expected, shell_output("#{bin}/crcany -64xz #{filename}") + end +end diff --git a/Formula/c/crd2pulumi.rb b/Formula/c/crd2pulumi.rb new file mode 100644 index 0000000000000..b6e405788c44d --- /dev/null +++ b/Formula/c/crd2pulumi.rb @@ -0,0 +1,70 @@ +class Crd2pulumi < Formula + desc "Generate typed CustomResources from a Kubernetes CustomResourceDefinition" + homepage "https://github.com/pulumi/crd2pulumi" + url "https://github.com/pulumi/crd2pulumi/archive/refs/tags/v1.6.0.tar.gz" + sha256 "65ba960325bfbd288b1cbe4675e1c24fd2fe6422b2cffc46a74fa801063beba6" + license "Apache-2.0" + head "https://github.com/pulumi/crd2pulumi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c380a1dbe25ab6bc39fd1a6fb7f4d676ffbdfdd1ac6f5fe6de532f16e95663a8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ab981239750c76bf83cb6d29fd9c0486596c22a125318e760bb9b4877ca050b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "037495a268751f289edfd7c1ef440dcb609ec7e21c139c26d78279fe7613daf5" + sha256 cellar: :any_skip_relocation, sonoma: "ef183fcd4992a46265574b8946c96993beb1cdf93a9d15a928b4970ca6f8eaef" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d7228a160a405a73fdd32f62e83b3cbae37e5f2f5459e079ce184c96d0432e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20318e7be374b5f94eb7ad06a0cd7580ca2d1648cfeeb619f6d835824af47f6c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/pulumi/crd2pulumi/cmd.Version=#{version}") + + generate_completions_from_executable(bin/"crd2pulumi", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/crd2pulumi version") + + test_crd = testpath/"crd.yaml" + test_crd.write <<~YAML + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + name: widgets.example.com + spec: + group: example.com + names: + kind: Widget + plural: widgets + singular: widget + scope: Namespaced + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + size: + type: string + color: + type: string + YAML + + # Generate TypeScript code from the CRD + system bin/"crd2pulumi", "--nodejsPath", testpath/"typescript", test_crd, "--force" + + assert_path_exists testpath/"typescript/example/v1/widget.ts" + assert_match "this file was generated by crd2pulumi", (testpath/"typescript/provider.ts").read + + # Generate Python code from the CRD + system bin/"crd2pulumi", "--pythonPath", testpath/"python", "--python", test_crd + assert_path_exists testpath/"python/pulumi_crds/example/v1/Widget.py" + assert_match "this file was generated by crd2pulumi", (testpath/"python/pulumi_crds/provider.py").read + end +end diff --git a/Formula/c/create-api.rb b/Formula/c/create-api.rb new file mode 100644 index 0000000000000..ef67e4a4f0e0d --- /dev/null +++ b/Formula/c/create-api.rb @@ -0,0 +1,46 @@ +class CreateApi < Formula + desc "Delightful code generator for OpenAPI specs" + homepage "https://github.com/CreateAPI/CreateAPI" + url "https://github.com/CreateAPI/CreateAPI/archive/refs/tags/0.2.0.tar.gz" + sha256 "9f61943314797fe4f09b40be72e1f72b0a616c66cb1b66cd042f97a596ffd869" + license "MIT" + revision 1 + head "https://github.com/CreateAPI/CreateAPI.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "669393e0173057f300559c44055716228c89dbf1dd91a0d898eef408c98ec184" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad0253916ad9e261c6f172f26a86114522ff41915bc71e8d4db3c85692b4ff55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d13191abe5e4a79f12ddb325118fb1d5ad2abeae2269e7a3e6b404d9913584bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d56775719688b44d0b8425c3662879424a79a337db732cb052006cbc9db988a" + sha256 cellar: :any_skip_relocation, sonoma: "0a285919042a7d87a437dd6baf16cd3cdeb19b957bd655c2f88ffbbca59d3d5c" + sha256 cellar: :any_skip_relocation, ventura: "b6fc15cf43f820ec337a72ebbf119e8837f3bd801d7d06f0125b9aaec2997dfb" + sha256 arm64_linux: "2abf5d3b403a7046f7ae8d806181047a7820356c4c8c6fc70bd5b55ddbd2263c" + sha256 x86_64_linux: "958733d65c7aff3b75b64ac6f5a547961d6bc0fa0242e078dddc5686e4a05ded" + end + + depends_on xcode: "13.0" + + uses_from_macos "swift" + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "--configuration", "release" + bin.install ".build/release/create-api" + pkgshare.install "Tests/Support/Specs/cookpad.json" => "test-spec.json" + generate_completions_from_executable(bin/"create-api", "--generate-completion-script") + end + + test do + system bin/"create-api", "generate", pkgshare/"test-spec.json", "--config-option", "module=TestPackage" + cd "CreateAPI" do + system "swift", "build", "--disable-sandbox" + end + end +end diff --git a/Formula/c/create-dmg.rb b/Formula/c/create-dmg.rb new file mode 100644 index 0000000000000..70f8a661297ea --- /dev/null +++ b/Formula/c/create-dmg.rb @@ -0,0 +1,27 @@ +class CreateDmg < Formula + desc "Shell script to build fancy DMGs" + homepage "https://github.com/create-dmg/create-dmg" + url "https://github.com/create-dmg/create-dmg/archive/refs/tags/v1.2.2.tar.gz" + sha256 "18e8dd7db06c9d6fb590c7877e1714b79b709f17d1d138bd65e4910cc82391bc" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "ed92cefd6df282057e6c1a162eb453d4c8d3b34a4a8637bf292813817badef81" + end + + depends_on :macos + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + File.write(testpath/"Brew-Eula.txt", "Eula") + (testpath/"Test-Source").mkpath + (testpath/"Test-Source/Brew.app").mkpath + system bin/"create-dmg", "--sandbox-safe", "--eula", + testpath/"Brew-Eula.txt", testpath/"Brew-Test.dmg", testpath/"Test-Source" + end +end diff --git a/Formula/c/credo.rb b/Formula/c/credo.rb new file mode 100644 index 0000000000000..939a35a72d22c --- /dev/null +++ b/Formula/c/credo.rb @@ -0,0 +1,47 @@ +class Credo < Formula + desc "Static code analysis tool for the Elixir" + homepage "https://github.com/rrrene/credo" + url "https://github.com/rrrene/credo/archive/refs/tags/v1.7.13.tar.gz" + sha256 "ca18ed9ac620e4b4a98e0f5a6de8f1d42392044c379ed1a0e78dfc8d527a4c8c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10d29c8c19d86bd860c27cb32695834f3bbacb358d6fcf5362813ef776834316" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0a96ad392fd102d2744382c4210c84ee1b1f09d14ca7e5b711b674a333f98b0c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e199a5d1557a339b0948553811812506394f31f4d50aa2dd1f09ac294aafa496" + sha256 cellar: :any_skip_relocation, sonoma: "dee7856f05b7b654cf02f50d4297cb77cd6b1c2be655a0a529a2b1143c5ecd82" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d2127b0a2b23a7507de9f7928feb17dd78ba9a3f82d66f7b8b03bb89d10f19e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0388d189d43aa6b20a7937caf2cfdab48eb5f12ae390d2e9a4d53493451100b9" + end + + depends_on "elixir" + + def install + ENV["MIX_ENV"] = "prod" + ENV["MIX_HOME"] = buildpath/".mix" + ENV["HEX_HOME"] = buildpath/".hex" + + system "mix", "deps.get", "--only", "prod" + system "mix", "compile" + system "mix", "escript.build" + + bin.install "credo" + end + + test do + assert_match version.to_s, shell_output("#{bin}/credo --version") + + (testpath/"test.ex").write <<~EOS + defmodule Test do + @moduledoc """ + Test module for Credo. + """ + def test_fun do + [1, 2, 3] |> Enum.map(fn(x) -> x * x end) + end + end + EOS + + assert_match "2 mods/funs, found no issues", shell_output("#{bin}/credo #{testpath}/test.ex") + end +end diff --git a/Formula/c/credstash.rb b/Formula/c/credstash.rb new file mode 100644 index 0000000000000..27f8a4db5701d --- /dev/null +++ b/Formula/c/credstash.rb @@ -0,0 +1,67 @@ +class Credstash < Formula + include Language::Python::Virtualenv + + desc "Little utility for managing credentials in the cloud" + homepage "https://github.com/fugue/credstash" + url "https://files.pythonhosted.org/packages/b4/89/f929fda5fec87046873be2420a4c0cb40a82ab5e30c6d9cb22ddec41450b/credstash-1.17.1.tar.gz" + sha256 "6c04e8734ef556ab459018da142dd0b244093ef176b3be5583e582e9a797a120" + license "Apache-2.0" + revision 12 + head "https://github.com/fugue/credstash.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2c0a44cd0e973c1d8e9d7d0dd2f07a4f952d6cb57a323adb598e603d5fa45567" + end + + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "cryptography" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/70/02/d3ee174681961dc2ebfe81f326e1b5e1ba338b7ff939e1e94eef76e7c65a/boto3-1.40.51.tar.gz" + sha256 "ed1b7750df07b2f2ece0141ff2ed0489db2ec2b5311a956d00a496b05fd4fadb" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ca/33/9e197d872adf1eadf8ecc259d0f451143326ff044d236b8971ff8bf980ee/botocore-1.40.51.tar.gz" + sha256 "a06de20408c3009e59e8f161a1146f1801d279d0923ab950349154900951bb20" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["AWS_ACCESS_KEY_ID"] = "test" + ENV["AWS_SECRET_ACCESS_KEY"] = "test" + output = shell_output("#{bin}/credstash put test test 2>&1", 1) + assert_match "Could not generate key using KMS key", output + end +end diff --git a/Formula/c/creduce.rb b/Formula/c/creduce.rb new file mode 100644 index 0000000000000..c769d3b58d4db --- /dev/null +++ b/Formula/c/creduce.rb @@ -0,0 +1,153 @@ +class Creduce < Formula + desc "Reduce a C/C++ program while keeping a property of interest" + homepage "https://github.com/csmith-project/creduce" + license "BSD-3-Clause" + revision 5 + head "https://github.com/csmith-project/creduce.git", branch: "master" + + # Remove when patches are no longer needed. + stable do + # TODO: Check if we can use unversioned `llvm` at version bump. + url "https://github.com/csmith-project/creduce/archive/refs/tags/creduce-2.10.0.tar.gz" + sha256 "de320cd83bd77ec1a591f36dd6a4d0d1c47a0a28d850a6ebd348540feeab2297" + + # Use shared libraries. + # Remove with the next release. + patch do + url "https://github.com/csmith-project/creduce/commit/e9bb8686c5ef83a961f63744671c5e70066cba4e.patch?full_index=1" + sha256 "d5878a2c8fb6ebc5a43ad25943a513ff5226e42b842bb84f466cdd07d7bd626a" + end + + # Port to LLVM 15.0. + # Remove with the next release. + patch do + url "https://github.com/csmith-project/creduce/commit/e507cca4ccb32585c5692d49b8d907c1051c826c.patch?full_index=1" + sha256 "71d772bf7d48a46019a07e38c04559c0d517bf06a07a26d8e8101273e1fabd8f" + end + patch do + url "https://github.com/csmith-project/creduce/commit/8d56bee3e1d2577fc8afd2ecc03b1323d6873404.patch?full_index=1" + sha256 "d846e2a04c211f2da9a87194181e3644324c933ec48a7327a940e4f4b692cbae" + end + + # Port to LLVM 16.0 + # Remove with the next release + patch do + url "https://github.com/csmith-project/creduce/commit/8ab9a69caf13ce24172737e8bfd09de51a1ecb6a.patch?full_index=1" + sha256 "fb5dfed2f0255ea524f0c0074a5b162ae2acbcabb9ff1f31adf45ca025dd4419" + end + + # Port to LLVM 17.0 + # Remove with the next release + patch do + url "https://github.com/csmith-project/creduce/commit/a4f6cf3689d44513fd944b1090ca8fd6d5ae8cd5.patch?full_index=1" + sha256 "2752eba5204de7f0eeac215bdabc2fb02441b79cbd17e5584e021cc29b8521c5" + end + + # Port to LLVM 18.0 + # Remove with the next release + patch do + url "https://github.com/csmith-project/creduce/commit/98baa64699aedb943520f175a5e731582df2806f.patch?full_index=1" + sha256 "7a5a04ed394de464c09174997020a6cca0cc05154f58a3e855f20c8423fc8865" + end + end + + livecheck do + url :stable + regex(/^(?:creduce[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ef5fc676679f474e69748993a5a795c53eb1eabea3ac94e8901002cfb43475df" + sha256 cellar: :any, arm64_sequoia: "752bcd060b5ab5d04efc96dfd67d9128e6fd66a2d9b14b5e59735ba758d2d61b" + sha256 cellar: :any, arm64_sonoma: "c489f889cd95d689d226e4965582120a96b1119eb4fb2902c481c6b9338122aa" + sha256 cellar: :any, arm64_ventura: "56cd23ed4e8cdf7a2928f740332b07eed6f3d5b8a22416cf30ab746fbecbe0a7" + sha256 cellar: :any, sonoma: "487aebd04b8609040875fb262122692867f20507b7c71e25a8914a920521242d" + sha256 cellar: :any, ventura: "937ef76ad140358b5458b394b8376746972ce80915e3fa91fc7b6065a94bc5ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "7355a04a779fd118356fba1c777127451b6ef219c6d89797db1b379b5eebb977" + sha256 cellar: :any_skip_relocation, x86_64_linux: "299566ba27c179eb7e3aa48dfc766b6b3bfe6a4892a929b5777aede0b4e54a05" + end + + depends_on "astyle" + depends_on "llvm@18" # LLVM 19 issue: https://github.com/csmith-project/creduce/issues/276 + + uses_from_macos "flex" => :build + uses_from_macos "perl" + + resource "Exporter::Lite" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Exporter-Lite-0.08.tar.gz" + sha256 "c05b3909af4cb86f36495e94a599d23ebab42be7a18efd0d141fc1586309dac2" + end + + resource "File::Which" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.23.tar.gz" + sha256 "b79dc2244b2d97b6f27167fc3b7799ef61a179040f3abd76ce1e0a3b0bc4e078" + end + + resource "Getopt::Tabular" do + url "https://cpan.metacpan.org/authors/id/G/GW/GWARD/Getopt-Tabular-0.3.tar.gz" + sha256 "9bdf067633b5913127820f4e8035edc53d08372faace56ba6bfa00c968a25377" + end + + resource "Regexp::Common" do + url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz" + sha256 "ee07853aee06f310e040b6bf1a0199a18d81896d3219b9b35c9630d0eb69089b" + end + + resource "URI::Escape" do + on_linux do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/URI-1.72.tar.gz" + sha256 "35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32" + end + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + llvm = deps.find { |dep| dep.name.match?(/^llvm(@\d+)?$/) } + .to_formula + # Avoid ending up with llvm's Cellar path hard coded. + ENV["CLANG_FORMAT"] = llvm.opt_bin/"clang-format" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + + # Work around build failure seen on Apple Clang 13.1.6 by using LLVM Clang + # Undefined symbols for architecture x86_64: + # "std::__1::basic_stringbuf, ... + if DevelopmentTools.clang_build_version == 1316 + ENV["CC"] = llvm.opt_bin/"clang" + ENV["CXX"] = llvm.opt_bin/"clang++" + end + + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--bindir=#{libexec}" + system "make" + system "make", "install" + + (bin/"creduce").write_env_script("#{libexec}/creduce", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + (testpath/"test1.c").write <<~C + int main() { + printf("%d\n", 0); + } + C + (testpath/"test1.sh").write <<~BASH + #!/usr/bin/env bash + + #{ENV.cc} -Wall #{testpath}/test1.c 2>&1 | grep 'Wimplicit-function-declaration' + BASH + + chmod 0755, testpath/"test1.sh" + system bin/"creduce", "test1.sh", "test1.c" + end +end diff --git a/Formula/c/crf++.rb b/Formula/c/crf++.rb new file mode 100644 index 0000000000000..5d7e569e18b42 --- /dev/null +++ b/Formula/c/crf++.rb @@ -0,0 +1,58 @@ +class Crfxx < Formula + desc "Conditional random fields for segmenting/labeling sequential data" + homepage "https://taku910.github.io/crfpp/" + url "https://mirrors.sohu.com/gentoo/distfiles/f2/CRF%2B%2B-0.58.tar.gz" + mirror "https://drive.google.com/uc?id=0B4y35FiV1wh7QVR6VXJ5dWExSTQ&export=download" + sha256 "9d1c0a994f25a5025cede5e1d3a687ec98cd4949bfb2aae13f2a873a13259cb2" + license any_of: ["LGPL-2.1-only", "BSD-3-Clause"] + head "https://github.com/taku910/crfpp.git", branch: "master" + + # Archive files from upstream are hosted on Google Drive, so we can't identify + # versions from the tarballs, as the links on the homepage don't include this + # information. This identifies versions from the "News" sections, which works + # for now but may encounter issues in the future due to the loose regex. + livecheck do + url :homepage + regex(/CRF\+\+ v?(\d+(?:\.\d+)+)[\s<]/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "6dc7eda56c3ad4d066a9f4a244ec02d9bdb4b1fe482abfd632fdace270c68936" + sha256 cellar: :any, arm64_sequoia: "af1f4415e133ec77e5dddfd4d967b16069928b8da16a49ee2fa27c77cb3ef616" + sha256 cellar: :any, arm64_sonoma: "a30d515cc61679d50afd7639ee093286fc343c2dcc6719f53b38413196673bb7" + sha256 cellar: :any, arm64_ventura: "b2ace94562fd7e5a8abd1d05d40511e346e7a49ee504c448eba428f8c3b8a9db" + sha256 cellar: :any, arm64_monterey: "3a9ccdc1221e5b2516710ef51b3b50473d7d580f2676fca2c8f69cabcd7e6f61" + sha256 cellar: :any, arm64_big_sur: "763da462b53ce92f9feae23750b038b96e79b121b7bdfa4c0d1c99701c3345d4" + sha256 cellar: :any, sonoma: "9745ec5432d1ed8f4f5dc546e35fdfc82d4f5e723eb4065f298a2e46478d9911" + sha256 cellar: :any, ventura: "1233d831712132c1221d609f9ea56f217179ccae1d93c2fdb288efa2077d9eb0" + sha256 cellar: :any, monterey: "37c3083f194d7a03c220805f33d1469babee06cf05d0938a44f4f47a023dc86c" + sha256 cellar: :any, big_sur: "fcf0862271c392bc7b69a4e02a74dd9bd85615b6be0273009e7611bb78298f61" + sha256 cellar: :any, catalina: "6706e1cb8b242ed58885402da7b41cd1552f206407fc18c200907f3c64a7b9c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1b5ccbfaf09a9ce9fbb265f798cb224a2237dc4728b7348a304a0fe3d412602" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cc105b0deaa5661ba6cde2ac18b289ef676aacfad93f569e659d1ce6035127f" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "CXXFLAGS=#{ENV.cflags}", "install" + end + + test do + # Using "; true" because crf_test -v and -h exit nonzero under normal operation + output = shell_output("#{bin}/crf_test --help; true") + assert_match "CRF++: Yet Another CRF Tool Kit", output + end +end diff --git a/Formula/c/crfsuite.rb b/Formula/c/crfsuite.rb new file mode 100644 index 0000000000000..dd2d7f94dc95b --- /dev/null +++ b/Formula/c/crfsuite.rb @@ -0,0 +1,69 @@ +class Crfsuite < Formula + desc "Fast implementation of conditional random fields" + homepage "https://www.chokkan.org/software/crfsuite/" + url "https://github.com/chokkan/crfsuite/archive/refs/tags/0.12.tar.gz" + sha256 "ab83084ed5d4532ec772d96c3e964104d689f2c295915e80299ea3c315335b00" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "65a13d4653a19e899bdbcec57f9d7dc4852dce18c753e31c42102f7ce734bda6" + sha256 cellar: :any, arm64_sequoia: "a927557fa509ed7f639826d4ba8c469eb580b53dcceeab6268a6519fc1b41813" + sha256 cellar: :any, arm64_sonoma: "80a144cb4f7425ae6d43e321080cbaad697626aba0356c787ab62a53514a5804" + sha256 cellar: :any, arm64_ventura: "7c00ca61a741c84e661cb89f208a79105453f051fb766390ca4afb6d5cbc815c" + sha256 cellar: :any, arm64_monterey: "de3937f3b5caa7a27f48b183cca1a3dbe64fe0ba642f624f35a5d3e1827fa13f" + sha256 cellar: :any, arm64_big_sur: "8f4faf686ec2dd149e8c55505fb18f4f2fd246cf0966ed315c19eb811855aeb1" + sha256 cellar: :any, sonoma: "80c120367694a16a8aa47bea0107a4bbdf34cd765b1cb111e6ee59bc76815df3" + sha256 cellar: :any, ventura: "9044e7b8b91b781be38409cc180e7889fdf5430699025628726dc21919324704" + sha256 cellar: :any, monterey: "72d451e62bf3ab7b5b2d73d9cb4757946e1c0aa75c3c5f28c1c2d899d052bdd1" + sha256 cellar: :any, big_sur: "72b8c9d618a16bd4287990ae6c7b46bfdfd964cbe20582d4fa10f5b4b12f09ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "057472092e2730abbd995d9b23b61f77e9b6f5f829f36b63786110ef657c27f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45a6dd13114c20e2a4bd3d82033e463316b635d8c7a61c582e299bca8832ec58" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "liblbfgs" + + uses_from_macos "python" => :test + + conflicts_with "freeling", because: "both install `crfsuite` binaries" + + # Fix autoconf failure. + patch do + url "https://github.com/chokkan/crfsuite/commit/a6a4a38ccc4738deb0e90fc9ff2c11868922aa11.patch?full_index=1" + sha256 "8c572cb9d737e058b0a86c6eab96d1ffa8951016b50eee505491c2dae7c7c74d" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + + args = std_configure_args + args << "--disable-sse2" if Hardware::CPU.arm? + system "./configure", *args + + system "make", "install" + pkgshare.install "example" + end + + test do + resource "homebrew-conll2000-training-data" do + url "https://www.cnts.ua.ac.be/conll2000/chunking/train.txt.gz" + sha256 "bcbbe17c487d0939d48c2d694622303edb3637ca9c4944776628cd1815c5cb34" + end + + resource("homebrew-conll2000-training-data").stage testpath + + # Use spawn instead of {shell,pipe}_output to directly read and write + # from files. The data is too big to read into memory and then pass to + # the command for this test to complete within the allotted timeout. + command = ["python3", pkgshare/"example/chunking.py"] + pid = spawn(*command, in: "train.txt", out: "train.crfsuite.txt") + Process.wait(pid) + + system bin/"crfsuite", "learn", "--model", "CoNLL2000.model", "train.crfsuite.txt" + assert_path_exists testpath/"CoNLL2000.model" + end +end diff --git a/Formula/c/cri-tools.rb b/Formula/c/cri-tools.rb new file mode 100644 index 0000000000000..39fa1affc4952 --- /dev/null +++ b/Formula/c/cri-tools.rb @@ -0,0 +1,44 @@ +class CriTools < Formula + desc "CLI and validation tools for Kubelet Container Runtime Interface (CRI)" + homepage "https://github.com/kubernetes-sigs/cri-tools" + url "https://github.com/kubernetes-sigs/cri-tools/archive/refs/tags/v1.34.0.tar.gz" + sha256 "1ee70b05e10afd5549878b6239e008799db5cee070ed686dd3286684a88fd0d4" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/cri-tools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b0959ec5b12690f6aa20c53645ad595f554ce6d4b092f3a5d8922942c84f7f6a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ee7ddd1b9eb269e3e60520c8abaa0aa19f97eb4689a20e6201d2c9b3a2f0c51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ee7ddd1b9eb269e3e60520c8abaa0aa19f97eb4689a20e6201d2c9b3a2f0c51" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ee7ddd1b9eb269e3e60520c8abaa0aa19f97eb4689a20e6201d2c9b3a2f0c51" + sha256 cellar: :any_skip_relocation, sonoma: "16789ad6c1b650496e6b505c63744108560e233fe8636fb9f6165b8a26510e62" + sha256 cellar: :any_skip_relocation, ventura: "16789ad6c1b650496e6b505c63744108560e233fe8636fb9f6165b8a26510e62" + sha256 cellar: :any_skip_relocation, arm64_linux: "197e68cd972782f026480369c8ac3cd41ef6a19e0ad588428c73078c4fb0f700" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fa73189113a9e83b3bed5b286aef529f27f41f7beacbe92636e28b226e7b8d0" + end + + depends_on "go" => :build + + def install + ENV["BINDIR"] = bin + + if build.head? + system "make", "install" + else + system "make", "install", "VERSION=#{version}" + end + + generate_completions_from_executable(bin/"crictl", "completion") + end + + test do + crictl_output = shell_output( + "#{bin}/crictl --runtime-endpoint unix:///var/run/nonexistent.sock --timeout 10ms info 2>&1", 1 + ) + error = "transport: Error while dialing: dial unix /var/run/nonexistent.sock: connect: no such file or directory" + assert_match error, crictl_output + + critest_output = shell_output("#{bin}/critest --ginkgo.dryRun 2>&1") + assert_match "PASS", critest_output + end +end diff --git a/Formula/c/crispy-doom.rb b/Formula/c/crispy-doom.rb new file mode 100644 index 0000000000000..11e98c4d06e5d --- /dev/null +++ b/Formula/c/crispy-doom.rb @@ -0,0 +1,47 @@ +class CrispyDoom < Formula + desc "Limit-removing enhanced-resolution Doom source port based on Chocolate Doom" + homepage "https://github.com/fabiangreffrath/crispy-doom" + url "https://github.com/fabiangreffrath/crispy-doom/archive/refs/tags/crispy-doom-7.1.tar.gz" + sha256 "f0eb02afb81780165ddc81583ed5648cbee8b3205bcc27e181b3f61eb26f8416" + license "GPL-2.0-only" + head "https://github.com/fabiangreffrath/crispy-doom.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "eea3fa7dc16aaa3a18807238c95263dcd290e04d8d9e893959d75f7fcc708059" + sha256 cellar: :any, arm64_sequoia: "c12f350743f1a9d205256cf1ee7ecd86e0f80a9f67d5815ad09ca85c6aaa3a96" + sha256 cellar: :any, arm64_sonoma: "af9be4cadc170f38e4268496261f83f4ebe1c28d713168c7c926ddcaa0417fce" + sha256 cellar: :any, sonoma: "d0cace8c3b2d61918d02efbf75187e3257791d96926d63a8cfb308b83f24d999" + sha256 cellar: :any_skip_relocation, arm64_linux: "371753cc38f1f6d57feafe1a9c0fb10ed1d7b90120dbc873426d80b62876528f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "460172d447f43fa89378fc732207f52c113c8588960c67b0df061c9b059c47fd" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "fluid-synth" + depends_on "libpng" + depends_on "libsamplerate" + depends_on "sdl2" + depends_on "sdl2_mixer" + depends_on "sdl2_net" + + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + "--disable-sdltest", + *std_configure_args + system "make", "install", "execgamesdir=#{bin}" + end + + test do + testdata = <<~EOS + Invalid IWAD file + EOS + (testpath/"test_invalid.wad").write testdata + + expected_output = "Wad file test_invalid.wad doesn't have IWAD or PWAD id" + assert_match expected_output, shell_output("#{bin}/crispy-doom -nogui -iwad test_invalid.wad 2>&1", 255) + end +end diff --git a/Formula/c/criterion.rb b/Formula/c/criterion.rb new file mode 100644 index 0000000000000..af8a748540615 --- /dev/null +++ b/Formula/c/criterion.rb @@ -0,0 +1,47 @@ +class Criterion < Formula + desc "Cross-platform C and C++ unit testing framework for the 21st century" + homepage "https://github.com/Snaipe/Criterion" + url "https://github.com/Snaipe/Criterion/releases/download/v2.4.3/criterion-2.4.3.tar.xz" + sha256 "8ec64e482a70b3bfc1836ace0988b3316e6c3cfeac883fb5a674dcea5083ea16" + license "MIT" + head "https://github.com/Snaipe/Criterion.git", branch: "bleeding" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a9672d4007899f8d5441fafd3738863c93829abce3bc43031981c82b5c11f17c" + sha256 cellar: :any, arm64_sequoia: "5d8ff893cb861d388519fd9fb8e01c4afab12bbce21842bc6292970fad1369f6" + sha256 cellar: :any, arm64_sonoma: "3f4b8ccceaf763235dc669387c0ee13af6cf4ef58b0f06403ba2fc54b172e796" + sha256 cellar: :any, sonoma: "262cc7f448b90131c51d7bf5bbc82d49707551f73fbfa53d7a0d917e077c80f3" + sha256 arm64_linux: "554c2d54bc12923dfe181c740f6a82af803485926fded8afa8daf3508239a341" + sha256 x86_64_linux: "6c9a32199fe0c88d3bfd6b9f4d40f17e573147152190cebb00fb72e58f287c16" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libgit2" + depends_on "nanomsg" + depends_on "nanopb" + + uses_from_macos "libffi" + + def install + system "meson", "setup", "build", "--force-fallback-for=boxfort,debugbreak,klib", *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "--skip-subprojects", "-C", "build" + end + + test do + (testpath/"test-criterion.c").write <<~C + #include + + Test(suite_name, test_name) + { + cr_assert(1); + } + C + + system ENV.cc, "test-criterion.c", "-I#{include}", "-L#{lib}", "-lcriterion", "-o", "test-criterion" + system "./test-criterion" + end +end diff --git a/Formula/c/crm114.rb b/Formula/c/crm114.rb new file mode 100644 index 0000000000000..24900d1159193 --- /dev/null +++ b/Formula/c/crm114.rb @@ -0,0 +1,37 @@ +class Crm114 < Formula + desc "Examine, sort, filter or alter logs or data streams" + homepage "https://sourceforge.net/projects/crm114/" + url "http://deb.debian.org/debian/pool/main/c/crm114/crm114_20100106.orig.tar.gz" + sha256 "fb626472eca43ac2bc03526d49151c5f76b46b92327ab9ee9c9455210b938c2b" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bdadfd33ce2fbca99f2c353e6a59651f68de4353cf8ba8ec319986a39531e3d5" + sha256 cellar: :any, arm64_sonoma: "02293e7f49287e46515f25f788207339c207a9caed0b57c31853b691a9e0358c" + sha256 cellar: :any, arm64_ventura: "9791c36069114cb7235007258500b450c2d28aec42bc0753fae806bb2ef71dd4" + sha256 cellar: :any, arm64_monterey: "0cdce09555c1d90f1e577367c906921bbd8ea8fb37af61598a8ec80307fe7bf5" + sha256 cellar: :any, arm64_big_sur: "24d3e83ee6c91b1fbed3b83aefbd17c2a93119b12d6cf7a9cea10090e52af6a8" + sha256 cellar: :any, sonoma: "12d3f28c5983f5db9162b528870730c5f05fdd10427ffa679bb3d00850208a94" + sha256 cellar: :any, ventura: "df00326ae71fa1bca46f3d78d63ad58b99346c3603b6bd7c6e95f5940c0705b5" + sha256 cellar: :any, monterey: "6ba9e53e2cbfd76a236595fff2cd7d0bd816dd41c4b48ec3e7d673bf12a40f69" + sha256 cellar: :any, big_sur: "c00ea54f01bfa748d4a48123c7140fd4e8abb200b8c42ca0ab016272f72eeb8c" + sha256 cellar: :any, catalina: "f6ebd35ffbae26d9cf77de3f165c13ec170b8123d527369f43e9a862f14eb287" + sha256 cellar: :any_skip_relocation, arm64_linux: "56e301508f1430b1797bed7cce7c08b449b8b6064a8e73fc1f6f238688a2b49b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "159ba6e29e2da48573b2305e5d8afa7e6cb5806337fa6e2dc4375f8f77d781ca" + end + + # The homepage has disappeared along with the `stable` tarball and the + # SourceForge project only contains files from 2002-2004. + deprecate! date: "2024-07-24", because: :unmaintained + disable! date: "2025-07-26", because: :unmaintained + + depends_on "tre" + + def install + ENV.append "CFLAGS", "-std=gnu89" + ENV.append "CFLAGS", "-fcommon" if OS.linux? + inreplace "Makefile", "LDFLAGS += -static -static-libgcc", "" + bin.mkpath + system "make", "prefix=#{prefix}", "install" + end +end diff --git a/Formula/c/croaring.rb b/Formula/c/croaring.rb new file mode 100644 index 0000000000000..b9f87e622e532 --- /dev/null +++ b/Formula/c/croaring.rb @@ -0,0 +1,46 @@ +class Croaring < Formula + desc "Roaring bitmaps in C (and C++)" + homepage "https://roaringbitmap.org" + url "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.4.2.tar.gz" + sha256 "11cc5d37b2d719e02936c71db83d3a5d1f3d27c59005348f4ee6417a63617b77" + license "Apache-2.0" + head "https://github.com/RoaringBitmap/CRoaring.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bdd7b03a75bb611081f0dbf5f2e76c6d363273f6362d241dddaac0cb9281c8fe" + sha256 cellar: :any, arm64_sequoia: "c9318da7633a08b64712d5944091440bcb2dc2b41220696e851044acf56f5648" + sha256 cellar: :any, arm64_sonoma: "3c7f1be6487e91eb0128295a3b8058fd493b2853355de73cf6b0bb0c593f535d" + sha256 cellar: :any, sonoma: "ee21ef439042bec0b9340e8c9d1adca939c83c34f3157434c0eb42f86a90abdc" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2aa6345f1775c548acb09d3c5a48bce22b6f3e259b2d1ecd2ca94b051a10923" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c551dda816710eba9e09b5744fd9a668c38a32464774217ca3b28de876536416" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DENABLE_ROARING_TESTS=OFF", + "-DROARING_BUILD_STATIC=OFF", + "-DBUILD_SHARED_LIBS=ON", + "-DROARING_BUILD_LTO=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + roaring_bitmap_t *r1 = roaring_bitmap_create(); + for (uint32_t i = 100; i < 1000; i++) roaring_bitmap_add(r1, i); + printf("cardinality = %d\\n", (int) roaring_bitmap_get_cardinality(r1)); + roaring_bitmap_free(r1); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lroaring", "-o", "test" + assert_equal "cardinality = 900\n", shell_output("./test") + end +end diff --git a/Formula/c/croc.rb b/Formula/c/croc.rb new file mode 100644 index 0000000000000..8b99a83f59deb --- /dev/null +++ b/Formula/c/croc.rb @@ -0,0 +1,42 @@ +class Croc < Formula + desc "Securely send things from one computer to another" + homepage "https://github.com/schollz/croc" + url "https://github.com/schollz/croc/archive/refs/tags/v10.2.7.tar.gz" + sha256 "eea957c840041e11cc214b5f9c31801b0f8b51621d6629b89ba5743788d8e7c6" + license "MIT" + head "https://github.com/schollz/croc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a8fa0ad31ca554185a8fdf72401aeb5784d6d5bc20a6f8cd93d723829c02aed4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8fa0ad31ca554185a8fdf72401aeb5784d6d5bc20a6f8cd93d723829c02aed4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8fa0ad31ca554185a8fdf72401aeb5784d6d5bc20a6f8cd93d723829c02aed4" + sha256 cellar: :any_skip_relocation, sonoma: "c95cc1b65e3f08afb81fb9b241465daeec7bdf5b044b06f803545c9165d073a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "35bccd61ddaf84eaaf08877a5328a8dbbd2e8a97a9d972a2749573fe7f983c90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91bb81e86e2399372843b839b37149a8d0cae04e6e88321e83903c4286954dfa" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # As of https://github.com/schollz/croc/pull/701 an alternate method is used to provide the secret code + ENV["CROC_SECRET"] = "homebrew-test" + + port=free_port + + fork do + exec bin/"croc", "relay", "--ports=#{port}" + end + sleep 3 + + fork do + exec bin/"croc", "--relay=localhost:#{port}", "send", "--code=homebrew-test", "--text=mytext" + end + sleep 3 + + assert_match shell_output("#{bin}/croc --relay=localhost:#{port} --overwrite --yes homebrew-test").chomp, "mytext" + end +end diff --git a/Formula/c/cromwell.rb b/Formula/c/cromwell.rb new file mode 100644 index 0000000000000..2724c49208fc9 --- /dev/null +++ b/Formula/c/cromwell.rb @@ -0,0 +1,74 @@ +class Cromwell < Formula + desc "Workflow Execution Engine using Workflow Description Language" + homepage "https://github.com/broadinstitute/cromwell" + url "https://github.com/broadinstitute/cromwell/releases/download/91/cromwell-91.jar" + sha256 "a1378c7b2df9ba8e86a82adff0e2216d44d4b39a338106e4d39a5034cece4731" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4c4d24f21645c14be3422137a30674b4486bfe3d98e22f1f2f82f52b7ea34a59" + end + + head do + url "https://github.com/broadinstitute/cromwell.git", branch: "develop" + depends_on "sbt" => :build + end + + depends_on "openjdk" + + resource "womtool" do + url "https://github.com/broadinstitute/cromwell/releases/download/91/womtool-91.jar" + sha256 "96a6a63f3c05dba40d704665024fde88dac8cea2f2575a47c55548d3ba600390" + + livecheck do + formula :parent + end + end + + def install + odie "womtool resource needs to be updated" if build.stable? && version != resource("womtool").version + + if build.head? + system "sbt", "assembly" + libexec.install Dir["server/target/scala-*/cromwell-*.jar"][0] => "cromwell.jar" + libexec.install Dir["womtool/target/scala-*/womtool-*.jar"][0] => "womtool.jar" + else + libexec.install "cromwell-#{version}.jar" => "cromwell.jar" + resource("womtool").stage do + libexec.install "womtool-#{version}.jar" => "womtool.jar" + end + end + + bin.write_jar_script libexec/"cromwell.jar", "cromwell", "$JAVA_OPTS" + bin.write_jar_script libexec/"womtool.jar", "womtool" + end + + test do + (testpath/"hello.wdl").write <<~EOS + task hello { + String name + + command { + echo 'hello ${name}!' + } + output { + File response = stdout() + } + } + + workflow test { + call hello + } + EOS + + (testpath/"hello.json").write <<~JSON + { + "test.hello.name": "world" + } + JSON + + result = shell_output("#{bin}/cromwell run --inputs hello.json hello.wdl") + + assert_match "test.hello.response", result + end +end diff --git a/Formula/c/crossplane.rb b/Formula/c/crossplane.rb new file mode 100644 index 0000000000000..497653ad6821d --- /dev/null +++ b/Formula/c/crossplane.rb @@ -0,0 +1,58 @@ +class Crossplane < Formula + desc "Build control planes without needing to write code" + homepage "https://github.com/crossplane/crossplane" + url "https://github.com/crossplane/crossplane/archive/refs/tags/v2.0.2.tar.gz" + sha256 "dcdd06b770a6b697c8b9ba25ea7a96e4c8dd1fd4938a659ba49561f027cb38f7" + license "Apache-2.0" + head "https://github.com/crossplane/crossplane.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "225405ddd4eb2794e84e5e05d2c1fa0efeac35a8af825663a8d4f9fe0500fc71" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef2f1f1e259006e374d12cf9e5639c3e5c3e5be8875d29007876f139bf855002" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5419bbb090cbdaf3e53ff93b9c2a552c0538d597389489a017f1d52a263548da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73c6aee4d00a87cc71fd82a5baf877b600a02a7d749bd126367dd8c35fb42aef" + sha256 cellar: :any_skip_relocation, sonoma: "14e107d4a74a2bba610e2ddda7851fe24f59ee63d7b076134cdd21772e2b302b" + sha256 cellar: :any_skip_relocation, ventura: "dd0f4e555ef54697b0abde16f136258898c3cb80a2615a21ed9d0609629212aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ea26c034711ab889ed1add6434a5327e3d3b63cb5932619effa1ab8247e518c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e7bc62e23e11691f46e8db131ad0eb7beb32d0c78907388732b6df3591a0880" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/crossplane/crossplane/v#{version.major}/internal/version.version=v#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/crank" + end + + test do + assert_match "Client Version: v#{version}", shell_output("#{bin}/crossplane version --client") + + (testpath/"composition.yaml").write <<~YAML + apiVersion: apiextensions.crossplane.io/v1 + kind: Composition + metadata: + name: example + spec: + compositeTypeRef: + apiVersion: example.org/v1alpha1 + kind: XExample + mode: Pipeline + pipeline: + - step: example + functionRef: + name: example-function + YAML + + output = shell_output("#{bin}/crossplane beta convert composition-environment " \ + "composition.yaml -o converted.yaml 2>&1") + assert_match "No changes needed", output + end +end diff --git a/Formula/c/crosstool-ng.rb b/Formula/c/crosstool-ng.rb new file mode 100644 index 0000000000000..fcae39ece8286 --- /dev/null +++ b/Formula/c/crosstool-ng.rb @@ -0,0 +1,81 @@ +class CrosstoolNg < Formula + desc "Tool for building toolchains" + homepage "https://crosstool-ng.github.io/" + url "http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.28.0.tar.xz" + sha256 "5750e29a2bda5cd8d67900592576b1670a1987a4dcd5e4f6beae09138a1f5699" + license "GPL-2.0-only" + head "https://github.com/crosstool-ng/crosstool-ng.git", branch: "master" + + livecheck do + url "https://crosstool-ng.github.io/download/" + regex(/href=.*?crosstool-ng[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a8ff126a8c7e5be835e5b9ca34fde60183b12e038a84d6778ceb349d198b3a47" + sha256 cellar: :any, arm64_sequoia: "19ca62b038fe2d81cca3c0a7e21c3ab649a8d16c948eb779f888138cfc46abaf" + sha256 cellar: :any, arm64_sonoma: "360739dd3cd49d742e279f6d2ad2a99db93e3980f3e10b6f150451fe58409276" + sha256 cellar: :any, sonoma: "9416e83f34a15f21252eb6d4e91850d62477a5ecad86778ae92322153fed5312" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4e308a1106873d2467839381200620a02112b77840187989ad730f19b5dc6bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2cf9a85553d3767dc3f0b1d9c34958e284b5e6c948d46b63d5c81b1c216d422e" + end + + depends_on "help2man" => :build + depends_on "autoconf" + depends_on "automake" + depends_on "binutils" + depends_on "bison" + depends_on "flex" + depends_on "libtool" + depends_on "lzip" + depends_on "m4" + depends_on "ncurses" + depends_on "python@3.14" + depends_on "xz" + + uses_from_macos "flex" => :build + uses_from_macos "gperf" => :build + uses_from_macos "unzip" => :build + + on_macos do + depends_on "bash" + depends_on "coreutils" + depends_on "gawk" + depends_on "gettext" + depends_on "gnu-sed" + depends_on "grep" + depends_on "make" + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./bootstrap" if build.head? + + ENV["BISON"] = Formula["bison"].opt_bin/"bison" + ENV["M4"] = Formula["m4"].opt_bin/"m4" + ENV["PYTHON"] = Formula["python@3.14"].opt_bin/"python3.14" + + if OS.mac? + ENV["MAKE"] = Formula["make"].opt_bin/"gmake" + ENV.append "LDFLAGS", "-lintl" + else + ENV.append "CFLAGS", "-I#{Formula["ncurses"].include}/ncursesw" + end + + system "./configure", "--prefix=#{prefix}" + + # Must be done in two steps + system "make" + system "make", "install" + + inreplace [bin/"ct-ng", pkgshare/"paths.sh"], Superenv.shims_path/"gmake", "gmake" unless OS.mac? + end + + test do + assert_match "This is crosstool-NG", shell_output("make -rf #{bin}/ct-ng version") + end +end diff --git a/Formula/c/crow.rb b/Formula/c/crow.rb new file mode 100644 index 0000000000000..239c92831ea29 --- /dev/null +++ b/Formula/c/crow.rb @@ -0,0 +1,35 @@ +class Crow < Formula + desc "Fast and Easy to use microframework for the web" + homepage "https://crowcpp.org" + url "https://github.com/CrowCpp/Crow/archive/refs/tags/v1.3.0.tar.gz" + sha256 "a485c2d27d98b85655f4b8b5628aeab847bae10a41b89b07a8fb7aae52c0298f" + license "BSD-3-Clause" + head "https://github.com/CrowCpp/Crow.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "33b5c29fbed6fa014606740e9b63fea1c582007dabbd013f4c84b082adbe7962" + end + + depends_on "cmake" => :build + depends_on "asio" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCROW_BUILD_EXAMPLES=OFF", "-DCROW_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + crow::SimpleApp app; + CROW_ROUTE(app, "/")([](const crow::request&, crow::response&) {}); + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++17", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/crowdin.rb b/Formula/c/crowdin.rb new file mode 100644 index 0000000000000..9797a49ecde16 --- /dev/null +++ b/Formula/c/crowdin.rb @@ -0,0 +1,46 @@ +class Crowdin < Formula + desc "Command-line tool that allows to manage your resources with crowdin.com" + homepage "https://support.crowdin.com/cli-tool/" + url "https://github.com/crowdin/crowdin-cli/releases/download/4.11.0/crowdin-cli.zip" + sha256 "e6742afe9e9977f082f50ab0c319370aedc2a022f678d80d187542de94469d52" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "10913fdfb25ebd7e22078c0b99701b64593c98bd8adf7a12f4dd006ecee15cf4" + end + + depends_on "openjdk" + + def install + libexec.install "crowdin-cli.jar" + bin.write_jar_script libexec/"crowdin-cli.jar", "crowdin" + end + + test do + (testpath/"crowdin.yml").write <<~YAML + "project_id": "12" + "api_token": "54e01--your-personal-token--2724a" + "base_path": "." + "base_url": "https://api.crowdin.com" # https://{organization-name}.crowdin.com + + "preserve_hierarchy": true + + "files": [ + { + "source" : "/t1/**/*", + "translation" : "/%two_letters_code%/%original_file_name%" + } + ] + YAML + + system bin/"crowdin", "init" + + assert "Failed to collect project info", + shell_output("#{bin}/crowdin upload sources --config #{testpath}/crowdin.yml 2>&1", 102) + end +end diff --git a/Formula/c/cruft.rb b/Formula/c/cruft.rb new file mode 100644 index 0000000000000..461162408938e --- /dev/null +++ b/Formula/c/cruft.rb @@ -0,0 +1,172 @@ +class Cruft < Formula + include Language::Python::Virtualenv + + desc "Utility that creates projects from templates and maintains the cruft afterwards" + homepage "https://cruft.github.io/cruft/" + url "https://files.pythonhosted.org/packages/d1/7e/0e20012f2aa156e5d6a70483a8d90accb7ed4966dddb0c58987d9f6eba12/cruft-2.16.0.tar.gz" + sha256 "184662853fbc1c16c0137fe0e9444e0cbe95e40362f5ebb2d9fae33d9223e73f" + license "MIT" + revision 3 + head "https://github.com/cruft/cruft.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e6fe55691b83f44849da1d37bc8fdeb216c4214efb2103826aaeedbd99c5b73b" + sha256 cellar: :any, arm64_sequoia: "be54325a6602521f8866cad57ba97ca3361b24933077b5a4b414c0705bdd600b" + sha256 cellar: :any, arm64_sonoma: "406f88495a175ea05d5bacca77776818564a1f402c1176a45bc37f2fab2a86b5" + sha256 cellar: :any, sonoma: "e5520e760837d3bb2cf53ae4a34fc5a03de313518b2dbd34085d0cd5b2ec79b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1d699525978ae2526324305100d6967279803ef2bb51f1ab5c034b43f04f071" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0da3c1cde9269374c36719cfa14ae6c2465b9b09bda1f98d573a893872914b5b" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "binaryornot" do + url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" + sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "cookiecutter" do + url "https://files.pythonhosted.org/packages/52/17/9f2cd228eb949a91915acd38d3eecdc9d8893dde353b603f0db7e9f6be55/cookiecutter-2.6.0.tar.gz" + sha256 "db21f8169ea4f4fdc2408d48ca44859349de2647fbe494a9d6c3edfc0542c21c" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-slugify" do + url "https://files.pythonhosted.org/packages/87/c7/5e1547c44e31da50a460df93af11a535ace568ef89d7a811069ead340c4a/python-slugify-8.0.4.tar.gz" + sha256 "59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "text-unidecode" do + url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" + sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/21/ca/950278884e2ca20547ff3eb109478c6baf6b8cf219318e6bc4f666fad8e8/typer-0.19.2.tar.gz" + sha256 "9ad824308ded0ad06cc716434705f691d4ee0bfd0fb081839d2e426860e7fdca" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/fc/83/24ed25dd0c6277a1a170c180ad9eef5879ecc9a4745b58d7905a4588c80d/types_python_dateutil-2.9.0.20251008.tar.gz" + sha256 "c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"cruft", "create", "--no-input", "https://github.com/audreyr/cookiecutter-pypackage.git" + assert (testpath/"python-boilerplate").directory? + assert_path_exists testpath/"python-boilerplate/.cruft.json" + end +end diff --git a/Formula/c/crun.rb b/Formula/c/crun.rb new file mode 100644 index 0000000000000..dbb1da43ec5b2 --- /dev/null +++ b/Formula/c/crun.rb @@ -0,0 +1,36 @@ +class Crun < Formula + desc "Fast and lightweight fully featured OCI runtime and C library" + homepage "https://github.com/containers/crun" + url "https://github.com/containers/crun/releases/download/1.24/crun-1.24.tar.zst" + sha256 "2cc1ceaa609bc4c25c8e316d30e35406d6588aaf9dafcd5294b6cac912499faf" + license any_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "3f9504dcf24e5bb7cd2a86880319d61b15db169bf043cac3fff62333a9430c4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08a155f155816f7597290a986dbb5b57557ab852a894cc370736101fcfdba068" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "go-md2man" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + + depends_on "libcap" + depends_on "libseccomp" + depends_on :linux + depends_on "systemd" + depends_on "yajl" + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + assert_empty shell_output("#{bin}/crun --root=#{testpath} list -q").strip + end +end diff --git a/Formula/c/crunch.rb b/Formula/c/crunch.rb new file mode 100644 index 0000000000000..dcadb2c1e67b2 --- /dev/null +++ b/Formula/c/crunch.rb @@ -0,0 +1,38 @@ +class Crunch < Formula + desc "Wordlist generator" + homepage "https://sourceforge.net/projects/crunch-wordlist/" + url "https://downloads.sourceforge.net/project/crunch-wordlist/crunch-wordlist/crunch-3.6.tgz" + sha256 "6a8f6c3c7410cc1930e6854d1dadc6691bfef138760509b33722ff2de133fe55" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d449463edb9406d92410104b8302202c4aebd190cc181d8fea3e4fea2e8ef0c3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "902a5ca993d69c4678b0243e7ba59b08c85c85091fdecea036ec25d863da4388" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05a40b6394c4668a8d19480118b9a19ae1341f16608edce7190fc75072075b42" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7012aebe6b421760ccec1550bb6ca1684f5808d8b7f4aa4b31a939f4a50fcf58" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f7f96f0cb4350722c3b04aca1d7d0d9a94b9084649888216d1ec4f089809fe8c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dfc7c5b56963d28a58c64a2a28d0c19b61dfce141b83c9facaad0d8d606949b2" + sha256 cellar: :any_skip_relocation, sonoma: "3e90eb0b16dc80dc8105256d758e8e561604795087b3f596ef3296bc1c01cb6f" + sha256 cellar: :any_skip_relocation, ventura: "21786261bea2b66d97b4f2b089929175cf79690491b1d45768900cb9384f69b0" + sha256 cellar: :any_skip_relocation, monterey: "7797dae15adc8701e4d93c3a0455adb8796aca9f7e366bfa12448ce9aeac7153" + sha256 cellar: :any_skip_relocation, big_sur: "9cd9d5ae5afb6b6223e720b99d30990f1884cd8ed4e0b5654a9ab2d72cc4d132" + sha256 cellar: :any_skip_relocation, catalina: "67570938790b20aaabcb31c8ac86d4356702b87ce2ae8ea01d19553f531397a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "abf2c62b42c660eeb58ac32c84c77ee4f425cef5b69a4eeedc2e00cea490a001" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2da41fe3124d8d6fbfd6df0fa1eefd803b2fee839332cdce61b9c8a1e15e977d" + end + + def install + system "make", "CC=#{ENV.cc}", "LFS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + bin.install "crunch" + man1.install "crunch.1" + share.install Dir["*.lst"] + end + + test do + system bin/"crunch", "-v" + end +end diff --git a/Formula/c/crunchy-cli.rb b/Formula/c/crunchy-cli.rb new file mode 100644 index 0000000000000..cb1625ba23f55 --- /dev/null +++ b/Formula/c/crunchy-cli.rb @@ -0,0 +1,43 @@ +class CrunchyCli < Formula + desc "Command-line downloader for Crunchyroll" + homepage "https://github.com/crunchy-labs/crunchy-cli" + url "https://github.com/crunchy-labs/crunchy-cli/archive/refs/tags/v3.6.7.tar.gz" + sha256 "743c2d5dd603ee14e63af8ac8cbae1cd80acce6bfa87934571e379bcf01949e6" + license "MIT" + head "https://github.com/crunchy-labs/crunchy-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a1e9883dac18b6296214f9145e6ff940b68cdb9fba356cb1437081956a92f0d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eff25dab580ce0fab83a7bd145c4135f60bc7a33ea7dc2beff2ff1dcec221238" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ab6f53c667b82494a40e421fcc8f708e2443e19903991e2352acc4412911ae4c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "26658e2958c936ebb325748349492bab65d7c85c3d7e8b26f6e954661dbfb299" + sha256 cellar: :any_skip_relocation, sonoma: "fcd5a79d345f349e356ce9dcb3946a9bc3285e05fd1dac90d10480639afa7e05" + sha256 cellar: :any_skip_relocation, ventura: "e22153bc82c7d620d0b974c7028a3600730146ec5cd001dbca81267a38ad7199" + sha256 cellar: :any_skip_relocation, monterey: "2da874bb0fa697266a2575eae4f75602575f9e3a6137719dd535ec5fd72c28a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "526cbfcb29933de4562ca839a7b009505f7a5092a2c1c83902c4c669f935594d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2bfb8108c92d7926879b6c3067632692db81b020f9d52166f17e788a6b64b391" + end + + deprecate! date: "2024-07-16", because: :repo_archived + disable! date: "2025-07-17", because: :repo_archived + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "ffmpeg" + depends_on "openssl@3" + + def install + system "cargo", "install", "--no-default-features", "--features", "openssl-tls", *std_cargo_args + man1.install Dir["target/release/manpages/*"] + bash_completion.install "target/release/completions/crunchy-cli.bash" + fish_completion.install "target/release/completions/crunchy-cli.fish" + zsh_completion.install "target/release/completions/_crunchy-cli" + end + + test do + agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" + opts = "--anonymous --user-agent '#{agent}'" + output = shell_output("#{bin}/crunchy-cli #{opts} login 2>&1", 1).strip + assert_match(/(An error occurred: Anonymous login cannot be saved|Triggered Cloudflare bot protection)/, output) + end +end diff --git a/Formula/c/cryfs.rb b/Formula/c/cryfs.rb new file mode 100644 index 0000000000000..c42164be932a2 --- /dev/null +++ b/Formula/c/cryfs.rb @@ -0,0 +1,64 @@ +class Cryfs < Formula + include Language::Python::Virtualenv + + desc "Encrypts your files so you can safely store them in Dropbox, iCloud, etc." + homepage "https://www.cryfs.org" + url "https://github.com/cryfs/cryfs/releases/download/1.0.1/cryfs-1.0.1.tar.gz" + sha256 "5383cd77c4ef606bb44568e9130c35a996f1075ee1bdfb68471ab8bc8229e711" + license "LGPL-3.0-or-later" + revision 5 + head "https://github.com/cryfs/cryfs.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "47146379f054330f91b6ade148957e79a93cce9c6f6bc1cd0070bb39decba471" + sha256 cellar: :any_skip_relocation, x86_64_linux: "823beaba77708c4fef1ecf93dc955667cafa57893f687f9d136ad276fb22b227" + end + + depends_on "cmake" => :build + depends_on "curl" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "range-v3" => :build + depends_on "boost" + depends_on "fmt" + depends_on "libfuse@2" # FUSE 3 issue: https://github.com/cryfs/cryfs/issues/419 + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "spdlog" + + # Backport fix for Boost.Process 1.88.0+. Remove in the next release + patch do + url "https://github.com/cryfs/cryfs/commit/91e2c9b8fd5f7a1b0e57ad1310534606ce70c338.patch?full_index=1" + sha256 "50551c3d73502a9e9796d95f751969e9865a03e6d7429123388ae1f52eb47131" + end + + # Fix build with Boost 1.89.0, pr ref: https://github.com/cryfs/cryfs/pull/500 + patch do + url "https://github.com/cryfs/cryfs/commit/f2f3c19979545c4789647e648cc1480ce647f42a.patch?full_index=1" + sha256 "35491d35bb341c8651bac6c7348b4d8d42df19304a09824d0eb94206180231d6" + end + + def install + ENV.runtime_cpu_detection # for bundled cryptopp + system "cmake", "-B", "build", "-S", ".", "-DCRYFS_UPDATE_CHECKS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["CRYFS_FRONTEND"] = "noninteractive" + + # Test showing help page + assert_match "CryFS", shell_output("#{bin}/cryfs 2>&1", 10) + assert_match version.to_s, shell_output("#{bin}/cryfs --version") + + # Test mounting a filesystem. This command will ultimately fail because homebrew tests + # don't have the required permissions to mount fuse filesystems, but before that + # it should display "Mounting filesystem". If that doesn't happen, there's something + # wrong. For example there was an ABI incompatibility issue between the crypto++ version + # the cryfs bottle was compiled with and the crypto++ library installed by homebrew to. + mkdir "basedir" + mkdir "mountdir" + expected_output = "fuse: device not found, try 'modprobe fuse' first" + assert_match expected_output, pipe_output("#{bin}/cryfs -f basedir mountdir 2>&1", "password") + end +end diff --git a/Formula/c/cryptography.rb b/Formula/c/cryptography.rb new file mode 100644 index 0000000000000..c2bbd1b7d0a59 --- /dev/null +++ b/Formula/c/cryptography.rb @@ -0,0 +1,55 @@ +class Cryptography < Formula + desc "Cryptographic recipes and primitives for Python" + homepage "https://cryptography.io/en/latest/" + url "https://files.pythonhosted.org/packages/9f/33/c00162f49c0e2fe8064a62cb92b93e50c74a72bc370ab92f86112b33ff62/cryptography-46.0.3.tar.gz" + sha256 "a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1" + license any_of: ["Apache-2.0", "BSD-3-Clause"] + head "https://github.com/pyca/cryptography.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "48db931aa0ccdb25a9b4fa9c3af4641c555e10952d62ef75a8be9c0f54a0704b" + sha256 cellar: :any, arm64_sequoia: "cfd504439fd34e6bdf82e3f06c24b275ff748ccdb82b650999da3203e7f5e513" + sha256 cellar: :any, arm64_sonoma: "3c2fd65437f27093fa4ab4986c3a046627fdadf1d615fd388457a3d279b0eb50" + sha256 cellar: :any, sonoma: "1bb86940ea28a29574da8f153d959e9df4177848c8b5da1381f6408f6212bcb4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7b6143dff90f57c28d5d50d91b67927bac7dfda96c101ede76be85ec7936bc7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf9589e0106293376c67e6fda53bab16f494565a74b1608c05a9357f08edcb0d" + end + + depends_on "maturin" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "rust" => :build + depends_on "cffi" + depends_on "openssl@3" + + pypi_packages exclude_packages: ["cffi", "pycparser"] + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + # TODO: Avoid building multiple times as binaries are already built in limited API mode + pythons.each do |python3| + system python3, "-m", "pip", "install", *std_pip_args, "." + end + end + + test do + (testpath/"test.py").write <<~PYTHON + from cryptography.fernet import Fernet + key = Fernet.generate_key() + f = Fernet(key) + token = f.encrypt(b"homebrew") + print(f.decrypt(token)) + PYTHON + + pythons.each do |python3| + assert_match "b'homebrew'", shell_output("#{python3} test.py") + end + end +end diff --git a/Formula/c/cryptol.rb b/Formula/c/cryptol.rb new file mode 100644 index 0000000000000..c15d1205fe2e5 --- /dev/null +++ b/Formula/c/cryptol.rb @@ -0,0 +1,43 @@ +class Cryptol < Formula + desc "Domain-specific language for specifying cryptographic algorithms" + homepage "https://www.cryptol.net/" + url "https://hackage.haskell.org/package/cryptol-3.3.0/cryptol-3.3.0.tar.gz" + sha256 "3ba3d1083c3aacd6c5ad5bbe4fddb9d9519717af4d3c6fe05d9c0c698fb737b0" + license "BSD-3-Clause" + head "https://github.com/GaloisInc/cryptol.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0b483d4d43bc85f9116569c83cfe63447e2cba780e009303cadc55466e0f8713" + sha256 cellar: :any, arm64_sequoia: "f7b7abf27af0b5ca3f8b8d3fd5288e0ecb9c6afaaeb83bae498a598d4fc30bd8" + sha256 cellar: :any, arm64_sonoma: "a03b8f86803c0144c2cbdcb7d632cb0a3386fd489ecf213bd6d3b673b034554a" + sha256 cellar: :any, arm64_ventura: "03e540dd50bd3460edb5ad7fb9f2177b4835b4f28be31b9c234bf81a270f6042" + sha256 cellar: :any, sonoma: "e25c25b3fef0ea6a40a48f8c91b8c85e51d047b7ab0a241a673ef87e8e8dce8c" + sha256 cellar: :any, ventura: "d2a976bb8d59a3420de74f51a86ea8334405959a719b17af0728320bae796518" + sha256 cellar: :any_skip_relocation, arm64_linux: "553cf6f09cadf9872eb2c416530e93b543e10f0140f343754781e8dae33587a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "810c037408fef1a2d44064270af18b78d964fc198b06898944ee0d7121cf38e3" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + depends_on "z3" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + (testpath/"helloworld.icry").write <<~EOS + :prove \\(x : [8]) -> x == x + :prove \\(x : [32]) -> x + zero == x + EOS + expected = /Q\.E\.D\..*Q\.E\.D/m + assert_match expected, shell_output("#{bin}/cryptol -b helloworld.icry") + end +end diff --git a/Formula/c/cryptominisat.rb b/Formula/c/cryptominisat.rb new file mode 100644 index 0000000000000..f50632a66ccdb --- /dev/null +++ b/Formula/c/cryptominisat.rb @@ -0,0 +1,108 @@ +class Cryptominisat < Formula + desc "Advanced SAT solver" + homepage "https://www.msoos.org/cryptominisat5/" + url "https://github.com/msoos/cryptominisat/archive/refs/tags/5.12.1.tar.gz" + sha256 "fa504ae5846c80a3650fda620383def7f3d1d9d5d08824b57e13c4d41e881d89" + # Everything that's needed to run/build/install/link the system is MIT licensed. This allows + # easy distribution and running of the system everywhere. + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e18323988f4b9cfbe9bb913ed9c71ae2136810154aa92b79aae4988e49577d31" + sha256 cellar: :any, arm64_sequoia: "522fce8ee008386a1431ef14b1a6c9f71f9469b18c2ccd273bb415d687943430" + sha256 cellar: :any, arm64_sonoma: "2ef59704360415707ecd49a707e5981972b77a1701d97316ec039d1c6c6fbc4a" + sha256 cellar: :any, sonoma: "d18984954ac374a9a479df3972636b8371c31f15650afd7efd2427025447838d" + sha256 arm64_linux: "9f7f65846e6a8cc116f56a0d3dc8bb223abc1f101724cec7bf733df930ec44cb" + sha256 x86_64_linux: "1ead5cf6b9ce64e9366c7d5379fc9049ef3836609df6d11fbd9e6b38d136d3e9" + end + + depends_on "cmake" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "gmp" + + uses_from_macos "zlib" + + # Currently using latest commit from `mate-only-libraries-1.8.0` branch. + # Check cryptominisat README.markdown and/or CI workflow to see if branch has changed. + resource "cadical" do + url "https://github.com/meelgroup/cadical/archive/c90592eab35a4a26ad901367db3cd727c5ab79c5.tar.gz" + sha256 "ac54f000b26083c44873e0ce581dac1cb56f91a8835082287b391af089547c3d" + end + + # Currently using a git checkout of `mate` branch as the generate script runs `git show`. + # Check cryptominisat README.markdown and/or CI workflow to see if branch has changed. + resource "cadiback" do + url "https://github.com/meelgroup/cadiback.git", + revision: "ea65a9442fc2604ee5f4ffd0f0fdd0bf481d5b42" + end + + # Apply Arch Linux patch to avoid rebuilding C++ library for Python bindings + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/cryptominisat/-/raw/20200db986b018b724363352954cfef8006da079/python-system-libs.patch" + sha256 "0fb932fbf83c351568f54fc238827709e6cc2646d124af751050cfde0c255254" + end + + # Apply Arch Linux patch to avoid paths to non-installed static libraries in CMake config file + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/cryptominisat/-/raw/f8e0e60b7d4fd9aa185a1a1a55dcd2b7ea123d58/link-private.patch" + sha256 "a5006f49e8adf1474725d2a3e4205cdd65beb2f100f5538b2f89e14de0613e0f" + end + + def python3 + "python3.14" + end + + def install + # fix audit failure with `lib/libcryptominisat5.5.7.dylib` + inreplace "src/GitSHA1.cpp.in", "@CMAKE_CXX_COMPILER@", ENV.cxx + + (buildpath/name).install buildpath.children + (buildpath/"cadical").install resource("cadical") + (buildpath/"cadiback").install resource("cadiback") + + cd "cadical" do + system "./configure" + system "make", "-C", "build", "libcadical.a" + end + + cd "cadiback" do + system "./configure" + system "make", "libcadiback.a" + end + + system "cmake", "-S", name, "-B", "build", "-DMIT=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(source: prefix/Language::Python.site_packages(python3))}" + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./#{name}" + end + + test do + (testpath/"simple.cnf").write <<~EOS + p cnf 3 4 + 1 0 + -2 0 + -3 0 + -1 2 3 0 + EOS + result = shell_output("#{bin}/cryptominisat5 simple.cnf", 20) + assert_match "s UNSATISFIABLE", result + + (testpath/"test.py").write <<~PYTHON + import pycryptosat + solver = pycryptosat.Solver() + solver.add_clause([1]) + solver.add_clause([-2]) + solver.add_clause([-1, 2, 3]) + print(solver.solve()[1]) + PYTHON + assert_equal "(None, True, False, True)\n", shell_output("#{python3} test.py") + end +end diff --git a/Formula/c/cryptopp.rb b/Formula/c/cryptopp.rb new file mode 100644 index 0000000000000..d12c4dc9c4cf5 --- /dev/null +++ b/Formula/c/cryptopp.rb @@ -0,0 +1,101 @@ +class Cryptopp < Formula + desc "Free C++ class library of cryptographic schemes" + homepage "https://cryptopp.com/" + url "https://cryptopp.com/cryptopp890.zip" + mirror "https://github.com/weidai11/cryptopp/releases/download/CRYPTOPP_8_9_0/cryptopp890.zip" + version "8.9.0" + sha256 "4cc0ccc324625b80b695fcd3dee63a66f1a460d3e51b71640cdbfc4cd1a3779c" + license all_of: [:public_domain, "BSL-1.0"] + head "https://github.com/weidai11/cryptopp.git", branch: "master" + + livecheck do + url :head + regex(/^CRYPTOPP[._-]V?(\d+(?:[._-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "53bc84217451c7ae2716346f62519e9b100409180949df14259c0159c04166e5" + sha256 cellar: :any, arm64_sequoia: "bdd7bfce252e592dc412d8b735a4fac2c9d5868607abbf9253a581c288c21dd9" + sha256 cellar: :any, arm64_sonoma: "cb1da0fe0980b17d853b47b0c9fb35d1f3706170054535b1778a4ae0239a2e59" + sha256 cellar: :any, arm64_ventura: "2d9ecda6fcc0053372db8935aeb739998802bc0023e667f6df8836b15385b848" + sha256 cellar: :any, sonoma: "7b027167f9f423f7c74506cfc69bdf95a6bf81a43a352e779763dda2dc6275c8" + sha256 cellar: :any, ventura: "8ce970a2b184c1e9f086a267e076218f8b7d59c5675bdbe8660e7ca47526a0a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec942ec0a779138e44ad756701c4d75a2ad6cc2c0aba9b6778503886c3ea57fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f784742a258c83ac87f661ea435fbe4ec565c57dc517f8dca6af6f549981c5f" + end + + def install + ENV.cxx11 + ENV.runtime_cpu_detection # https://github.com/weidai11/cryptopp/blob/master/cpu.h + + system "make", "all", "libcryptopp.pc", "PREFIX=#{prefix}" + system "make", "test" + system "make", "install-lib", "PREFIX=#{prefix}" + end + + test do + # Test program modified from: + # https://www.cryptopp.com/wiki/Advanced_Encryption_Standard + (testpath/"test.cc").write <<~CPP + #ifdef NDEBUG + #undef NDEBUG + #endif + #include + #include + #include + + #include + #include + #include + #include + + int main(int argc, char *argv[]) { + using namespace CryptoPP; + + AutoSeededRandomPool prng; + + SecByteBlock key(AES::DEFAULT_KEYLENGTH); + SecByteBlock iv(AES::BLOCKSIZE); + + prng.GenerateBlock(key, key.size()); + prng.GenerateBlock(iv, iv.size()); + + std::string plain = "Hello, Homebrew!"; + std::string cipher; + std::string recovered; + + try { + CBC_Mode::Encryption e; + e.SetKeyWithIV(key, key.size(), iv); + StringSource s(plain, true, + new StreamTransformationFilter(e, new StringSink(cipher))); + } catch (const Exception &e) { + std::cerr << e.what() << std::endl; + exit(1); + } + + try { + CBC_Mode::Decryption d; + d.SetKeyWithIV(key, key.size(), iv); + StringSource s(cipher, true, + new StreamTransformationFilter(d, new StringSink(recovered))); + } catch (const Exception &e) { + std::cerr << e.what() << std::endl; + exit(1); + } + + assert(plain == recovered); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cc", "-I#{include}", "-L#{lib}", + "-lcryptopp", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/crystal-icr.rb b/Formula/c/crystal-icr.rb new file mode 100644 index 0000000000000..2cbe2b81cfc43 --- /dev/null +++ b/Formula/c/crystal-icr.rb @@ -0,0 +1,42 @@ +class CrystalIcr < Formula + desc "Interactive console for Crystal programming language" + homepage "https://github.com/crystal-community/icr" + url "https://github.com/crystal-community/icr/archive/refs/tags/v0.9.0.tar.gz" + sha256 "2530293e94b60d69919a79b49e83270f1462058499ad37a762233df8d6e5992c" + license "MIT" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c52591afce68da74a66cae841087ab3924e09a340d7a44cabb5dc44aec6be0fa" + sha256 arm64_sequoia: "39cdaf2148c5f0a4bd256139cda76e88414ff6f88546030ff3897f879f066e13" + sha256 arm64_sonoma: "8dced8d90ae05f60022cad48273fe5dedbdb270c676f1f814bee7600f8b6451b" + sha256 arm64_ventura: "a541b6b20507872a2b45a244c6842a1509553d178a596e1d0d19a799f1ab3e56" + sha256 arm64_monterey: "3944027c41242611a14ec6226bc7eaf63e6275483df6b6820115d39c27ca76f2" + sha256 sonoma: "1c5da529830479e589129eb4bbe877aca87e67d1855a5ee4019917c98b88d688" + sha256 ventura: "32a63575106616c8855062c261bbd3c02b07fd0ee30dd3aaac50226b375a37c3" + sha256 monterey: "b134f903e53188ad2d8c2a891441c86a48467e4134e774bec72a04ff74085a58" + sha256 arm64_linux: "0aae032bd0c90aeb0da487eea0ef7da34b12d2dde7a062ff78df1073bf2bf919" + sha256 x86_64_linux: "a65683caabc652020da6d97ce2d2a8acc7552af5c75c6afce6010d9c4b0ce156" + end + + depends_on "bdw-gc" + depends_on "crystal" + depends_on "libevent" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "readline" + + uses_from_macos "zlib" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match "icr version #{version}", shell_output("#{bin}/icr -v") + end +end diff --git a/Formula/c/crystal.rb b/Formula/c/crystal.rb new file mode 100644 index 0000000000000..9ef7b852450c5 --- /dev/null +++ b/Formula/c/crystal.rb @@ -0,0 +1,184 @@ +class Crystal < Formula + desc "Fast and statically typed, compiled language with Ruby-like syntax" + homepage "https://crystal-lang.org/" + license "Apache-2.0" + + stable do + # TODO: Replace arm64 linux bootstrap with official when available + url "https://github.com/crystal-lang/crystal/archive/refs/tags/1.18.2.tar.gz" + sha256 "f2cd4b20f649ef716fcfa758972f36bb35f2f67e13991e3055226a0d101c19ca" + + resource "shards" do + url "https://github.com/crystal-lang/shards/archive/refs/tags/v0.19.1.tar.gz" + sha256 "2a49e7ffa4025e0b3e8774620fa8dbc227d3d1e476211fefa2e8166dcabf82b5" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d9d9d8a302e0e077addabd4582a87016c9a42cfe838ccca342c93ce74701041e" + sha256 cellar: :any, arm64_sequoia: "557108f40e134b73ab0981588304d99938afb1a499127511fe2acf373d3f567b" + sha256 cellar: :any, arm64_sonoma: "9671d7644ca65fae47d0749ff85b266914a4e9de2406e29e7e68f987bbca6883" + sha256 cellar: :any, sonoma: "bb4a5e74c1eb39ae63cc8a7dfe9b577a72fd28d36a0600a2459e445e6de3bf73" + sha256 cellar: :any_skip_relocation, arm64_linux: "cff98960a55b4706772a4879d5520e216d19132a77dc3b70d3705cc34e36c098" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5306fac9bd46d271cd52e90c6c632e9a2f8e846b30dcfcae518f137d79525a20" + end + + head do + url "https://github.com/crystal-lang/crystal.git", branch: "master" + + resource "shards" do + url "https://github.com/crystal-lang/shards.git", branch: "master" + end + end + + depends_on "bdw-gc" + depends_on "gmp" # std uses it but it's not linked + depends_on "libevent" + depends_on "libyaml" + depends_on "llvm" + depends_on "openssl@3" # std uses it but it's not linked + depends_on "pcre2" + depends_on "pkgconf" # @[Link] will use pkg-config if available + + uses_from_macos "libffi" # for the interpreter + + # It used to be the case that every new crystal release was built from a + # previous release, except patches. Crystal is updating its policy to + # allow 4 minor releases of compatibility unless otherwise specified. + # Therefore, the boot version should have the MINOR component be + # between the current minor - 4 and current minor - 1. + # + # See: https://github.com/Homebrew/homebrew-core/pull/81318 + resource "boot" do + boot_version = Version.new("1.10.1-1") + version boot_version + + on_macos do + url "https://github.com/crystal-lang/crystal/releases/download/#{boot_version.major_minor_patch}/crystal-#{boot_version}-darwin-universal.tar.gz" + # version boot_version + sha256 "e6490e6d09745483bacea43c4d8974273632526c1f98f13db5aae0a5fc2c7924" + end + + on_linux do + on_arm do + # NOTE: Since there are no official arm64 linux builds, we use the recommended[^1] + # community-maintained builds. Upstream CI also uses 84codes docker images[^2]. + # The version used is 1.11.0 as there was an issue building with 1.10.1. + # + # [^1]: https://github.com/crystal-lang/crystal/issues/9833#issuecomment-1766007872 + # [^2]: https://github.com/crystal-lang/crystal/blob/master/.github/workflows/aarch64.yml#L70 + url "https://packagecloud.io/84codes/crystal/packages/any/any/crystal_1.11.0-124_arm64.deb/download.deb?distro_version_id=35" + sha256 "fc42e49f703a9b60c81a87be67ea68726125cf7fddce2d4cafceb4324dca1ec8" + end + on_intel do + url "https://github.com/crystal-lang/crystal/releases/download/#{boot_version.major_minor_patch}/crystal-#{boot_version}-linux-x86_64.tar.gz" + # version boot_version + sha256 "1742e3755d3653d1ba07c0291f10a517fa392af87130dba4497ed9d82c12348b" + end + end + end + + # Check version in `shard.lock` in shards repo. + resource "molinillo" do + url "https://github.com/crystal-lang/crystal-molinillo/archive/refs/tags/v0.2.0.tar.gz" + sha256 "e231cf2411a6a11a1538983c7fb52b19e650acc3338bd3cdf6fdb13d6463861a" + end + + def install + llvm = deps.find { |dep| dep.name.match?(/^llvm(@\d+)?$/) } + .to_formula + non_keg_only_runtime_deps = deps.filter_map { |dep| dep.to_formula unless dep.build? } + .reject(&:keg_only?) + + if OS.linux? && Hardware::CPU.arm? + resource("boot").stage do + system "ar", "x", Dir["*.deb"].first + system "tar", "xf", "data.tar.gz" + (buildpath/"boot").install Dir["usr/*"] + end + else + resource("boot").stage "boot" + end + ENV.append_path "PATH", "boot/bin" + ENV["LLVM_CONFIG"] = llvm.opt_bin/"llvm-config" + ENV["CRYSTAL_LIBRARY_PATH"] = ENV["HOMEBREW_LIBRARY_PATHS"] + ENV.append_path "CRYSTAL_LIBRARY_PATH", MacOS.sdk_path_if_needed/"usr/lib" if OS.mac? && MacOS.sdk_path_if_needed + non_keg_only_runtime_deps.each do |dep| + # Our just built `crystal` won't link with some dependents (e.g. `bdw-gc`, `libevent`) + # unless they're explicitly added to `CRYSTAL_LIBRARY_PATH`. The keg-only dependencies + # are already in `HOMEBREW_LIBRARY_PATHS`, so there is no need to add them. + ENV.prepend_path "CRYSTAL_LIBRARY_PATH", dep.opt_lib + end + + crystal_install_dir = OS.linux? ? libexec : bin + stdlib_install_dir = pkgshare + + # Avoid embedding HOMEBREW_PREFIX references in `crystal` binary. + config_library_path = "\\$$ORIGIN/#{HOMEBREW_PREFIX.relative_path_from(crystal_install_dir)}/lib" + config_path = "\\$$ORIGIN/#{stdlib_install_dir.relative_path_from(crystal_install_dir)}/src" + + release_flags = ["release=true", "FLAGS=--no-debug"] + crystal_build_opts = release_flags + [ + "CRYSTAL_CONFIG_LIBRARY_PATH=#{config_library_path}", + "CRYSTAL_CONFIG_PATH=#{config_path}", + "interpreter=true", + ] + crystal_build_opts << "CRYSTAL_CONFIG_BUILD_COMMIT=#{Utils.git_short_head}" if build.head? + + # Build crystal + (buildpath/".build").mkpath + system "make", "deps" + system "make", "crystal", *crystal_build_opts + + # Build shards (with recently built crystal) + resource("shards").stage do + require "yaml" + + shard_lock = YAML.load_file("shard.lock") + required_molinillo_version = shard_lock.dig("shards", "molinillo", "version") + available_molinillo_version = resource("molinillo").version.to_s + odie "`molinillo` resource is outdated!" if required_molinillo_version != available_molinillo_version + + resource("molinillo").stage "lib/molinillo" + + shards_build_opts = release_flags + [ + "CRYSTAL=#{buildpath}/bin/crystal", + "SHARDS=false", + ] + shards_build_opts << "SHARDS_CONFIG_BUILD_COMMIT=#{Utils.git_short_head}" if build.head? + system "make", "bin/shards", *shards_build_opts + + # Install shards + bin.install "bin/shards" + man1.install "man/shards.1" + man5.install "man/shard.yml.5" + end + + # Install crystal + crystal_install_dir.install ".build/crystal" + stdlib_install_dir.install "src" + + bash_completion.install "etc/completion.bash" => "crystal" + zsh_completion.install "etc/completion.zsh" => "_crystal" + fish_completion.install "etc/completion.fish" => "crystal.fish" + + man1.install "man/crystal.1" + + return unless OS.linux? + + # Wrapper script so that Crystal can find libraries in HOMEBREW_PREFIX + (bin/"crystal").write_env_script( + crystal_install_dir/"crystal", + LD_RUN_PATH: "${LD_RUN_PATH:+${LD_RUN_PATH}:}#{HOMEBREW_PREFIX}/lib", + ) + end + + test do + assert_match "1", shell_output("#{bin}/crystal eval puts 1") + end +end diff --git a/Formula/c/crystalline.rb b/Formula/c/crystalline.rb new file mode 100644 index 0000000000000..1ecee32d95ded --- /dev/null +++ b/Formula/c/crystalline.rb @@ -0,0 +1,63 @@ +class Crystalline < Formula + desc "Language Server Protocol implementation for Crystal" + homepage "https://github.com/elbywan/crystalline" + url "https://github.com/elbywan/crystalline/archive/refs/tags/v0.17.1.tar.gz" + sha256 "3e8f4c3f41830092300219ef91c3d03e15536774ef18a5395ff6a9fffc27be5b" + license "MIT" + revision 1 + + bottle do + sha256 arm64_tahoe: "76adf0ed068bbdca5fea8ae6c46e97e72ac2a9b0f942cd895b7b82f949833508" + sha256 arm64_sequoia: "9880d25d405a18e5b15ca3285d636fe7e88c7f8d2c23d475f9d7389d83c7bccb" + sha256 arm64_sonoma: "fa4289ff006887a7cf83a094eb5429785fdedfad7423626de75fd20dbb9e843d" + sha256 arm64_ventura: "5e25f739442d1ec0a9c2d246be380a397dfb4eabe27e5c2525f9deb758b37afa" + sha256 sonoma: "93f3fdfd3110c2c4335ff7c620fda4f2656c82b8af01af4531df3155a964630e" + sha256 ventura: "36692b831edc7d4b9e9fa77f2fc04e36c1accc353ae9dd6ef91d0fbdde501990" + sha256 arm64_linux: "b74e77b5867ae143deb672dbd7387706bcd957c7851845222183c49ad0b914c8" + sha256 x86_64_linux: "28e4ffc22551602bec7b10f5e27f0e4011f8778e651c7bb43fe749d1b229b1ed" + end + + depends_on "bdw-gc" + depends_on "crystal" + depends_on "libevent" + depends_on "libyaml" + depends_on "llvm" + depends_on "pcre2" + + def install + system "shards", "install" + system "crystal", "build", "./src/crystalline.cr", + "--release", "--no-debug", + "-Dpreview_mt", + "--progress", "--stats", "--time", + "-o", "crystalline" + + bin.install "crystalline" + end + + test do + payload = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "processId": 88075, + "rootUri": null, + "capabilities": {}, + "trace": "verbose", + "workspaceFolders": null + } + } + JSON + + request = <<~LSP_REQUEST + Content-Length: #{payload.size} + + #{payload} + LSP_REQUEST + + output = pipe_output(bin/"crystalline", request, 0) + assert_match "Content-Length", output + end +end diff --git a/Formula/c/crytic-compile.rb b/Formula/c/crytic-compile.rb new file mode 100644 index 0000000000000..0f71125e101df --- /dev/null +++ b/Formula/c/crytic-compile.rb @@ -0,0 +1,60 @@ +class CryticCompile < Formula + include Language::Python::Virtualenv + + desc "Abstraction layer for smart contract build systems" + homepage "https://github.com/crytic/crytic-compile" + url "https://files.pythonhosted.org/packages/78/9b/6834afa2cc6fb3d958027e4c9c24c09735f9c6caeef4e205c22838f772bf/crytic_compile-0.3.10.tar.gz" + sha256 "0d7e03b4109709dd175a4550345369548f99fc1c96183c34ccc4dd21a7c41601" + license "AGPL-3.0-only" + head "https://github.com/crytic/crytic-compile.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5a352c8aee829e9c5cad5e597833e9cacc98ebc1e53039080f2e48a4741f2824" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e180c9e83e24af0987c15781f0336bdf3ad71576bd092ac7ce4e78bdfba7eb8d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "852c7196751e2ddeef00ef657db51f254a4538e2f155076706f5badb30b69ac5" + sha256 cellar: :any_skip_relocation, sonoma: "d4914fbfdcedfb9db8e06479ada69122d01636ddea56564cfd9622fb906fc802" + sha256 cellar: :any_skip_relocation, arm64_linux: "432cefc67997dfee5eedf62f8342bdf57e69c14830cee6fd081d061f74776317" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4572987a38327c4bf837c921838ee9af402983a33a1c1f13552b58399dbfa57c" + end + + depends_on "python@3.14" + + resource "cbor2" do + url "https://files.pythonhosted.org/packages/3a/89/01df16cdc9c60c07956756c90fe92c684021003079e358a78e213bce45a2/cbor2-5.7.0.tar.gz" + sha256 "3f6d843f4db4d0ec501c46453c22a4fbebb1abfb5b740e1bcab34c615cd7406b" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "solc-select" do + url "https://files.pythonhosted.org/packages/e0/55/55b19b5f6625e7f1a8398e9f19e61843e4c651164cac10673edd412c0678/solc_select-1.1.0.tar.gz" + sha256 "94fb6f976ab50ffccc5757d5beaf76417b27cbe15436cfe2b30cdb838f5c7516" + end + + def install + virtualenv_install_with_resources + end + + test do + resource "testdata" do + url "https://github.com/crytic/slither/raw/d0a4f5595d7177b3b7d4bd35e1384bf35ebc22d4/tests/ast-parsing/compile/variable-0.8.0.sol-0.8.15-compact.zip", using: :nounzip + sha256 "2f165f629882d0250d03a56cb67a84e9741375349195915a04385b0666394478" + end + + resource("testdata").stage do + system bin/"crytic-compile", "variable-0.8.0.sol-0.8.15-compact.zip", + "--export-format=solc", "--export-dir=#{testpath}/export" + end + + assert_path_exists testpath/"export/combined_solc.json" + end +end diff --git a/Formula/c/cscope.rb b/Formula/c/cscope.rb new file mode 100644 index 0000000000000..5b7c8d9fafc87 --- /dev/null +++ b/Formula/c/cscope.rb @@ -0,0 +1,59 @@ +class Cscope < Formula + desc "Tool for browsing source code" + homepage "https://cscope.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cscope/cscope/v15.9/cscope-15.9.tar.gz" + sha256 "c5505ae075a871a9cd8d9801859b0ff1c09782075df281c72c23e72115d9f159" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(%r{url=.*?/cscope[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a0a30f47c29cb9473180bfe1c3670ceff999e1cd694babbe88d90e012cca0827" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "690ea8542348fc155da1a174f6e98cf08d81be181a222853a504124c9071c08b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45fbc22efa33e380eeca6976ad47869871115e9be506b16dfce771783ccd7c0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "955599d1da5c49055ac99ef74278c40fa33079472e106115a5b3d754758167e0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b85e2ad5e9ddcdb57a2cca430520e64f70cefd2b182bae70c216360e72757611" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "149cb1ebe576bca4c8c928ed98005054e9ac2b8822c80ce9582d500453bce0ad" + sha256 cellar: :any_skip_relocation, sonoma: "151c5fc8f429b052dedb87188017857da6fd4966f47bb1de1044a77adc2bb9ab" + sha256 cellar: :any_skip_relocation, ventura: "2de1fac38c80a9b6643ebaaf7990928e7ea2764c435489d8fda616e661620d03" + sha256 cellar: :any_skip_relocation, monterey: "0baacd94730059e4a03e8980f1332ca38ed48f98dc70950103a71f4435347f2e" + sha256 cellar: :any_skip_relocation, big_sur: "41553bf0bbc2ce6e41712381fcbc2d86eca0dd4618d138ca70037df8a1bf4e01" + sha256 cellar: :any_skip_relocation, catalina: "212b5f945f2a2eae2d07893bb08c490098f4f3e58ec8865499bec550882de29e" + sha256 cellar: :any_skip_relocation, arm64_linux: "57d5c5b934b8aa1bca7f20239d413f6522e192b107cd8f0ecabb75d2f3b390fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aed0460f7dc9a9355d4fb019760284424d56012224f12df098c8fe9912c904c2" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + void func() + { + printf("Hello World!"); + } + + int main() + { + func(); + return 0; + } + C + (testpath/"cscope.files").write "./test.c\n" + system bin/"cscope", "-b", "-k" + assert_match(/test\.c.*func/, shell_output("#{bin}/cscope -L1func")) + end +end diff --git a/Formula/c/csfml.rb b/Formula/c/csfml.rb new file mode 100644 index 0000000000000..9a11f7129c168 --- /dev/null +++ b/Formula/c/csfml.rb @@ -0,0 +1,49 @@ +class Csfml < Formula + # Don't update CSFML until there's a corresponding SFML release + desc "SMFL bindings for C" + homepage "https://www.sfml-dev.org/" + url "https://github.com/SFML/CSFML/archive/refs/tags/2.6.1.tar.gz" + sha256 "f3f3980f6b5cad85b40e3130c10a2ffaaa9e36de5f756afd4aacaed98a7a9b7b" + license "Zlib" + revision 1 + head "https://github.com/SFML/CSFML.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e33a6a3f34a298c1d64efc5460ed274423457ed95052252dfe1b803b79c26e5" + sha256 cellar: :any, arm64_sequoia: "e1e1172b80909989105f3813e7d1dba2ce0caca2a7efdd2717724e624b7e9cb0" + sha256 cellar: :any, arm64_sonoma: "1a1763c3710588f2e1eff5569802b195f89582cdc9e5dd842cd818135fede023" + sha256 cellar: :any, arm64_ventura: "0f5543e8c4f83ba20d16b986870afdb4d127326e9b4545b2d98bab4430be4000" + sha256 cellar: :any, sonoma: "c63caf00bb7ab923a8d49448b410dd7c269fc1a6e8f194326286d610b972f6af" + sha256 cellar: :any, ventura: "d2d7e9b7eef45f2cd6fa0a48c3f0e606f9690945c8bc7ef396eeeb6640bd62e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "8233ef7ba98f94386973b6594231a3fdae9706f0c769aa5ae4b23a2ce12a103f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4c772a79cfa52cd66d37f85c6964473519693d3661f593ede05b4103ae09983" + end + + depends_on "cmake" => :build + depends_on "sfml@2" # milestone to support sfml 3.0, https://github.com/SFML/CSFML/milestone/1 + + def install + args = %W[ + -DCMAKE_MODULE_PATH=#{Formula["sfml@2"].share}/SFML/cmake/Modules/ + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main (void) + { + sfWindow * w = sfWindow_create (sfVideoMode_getDesktopMode (), "Test", 0, NULL); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcsfml-window", "-o", "test" + # Disable this part of the test on Linux because display is not available. + system "./test" if OS.mac? + end +end diff --git a/Formula/c/csmith.rb b/Formula/c/csmith.rb new file mode 100644 index 0000000000000..feee8f3f553c9 --- /dev/null +++ b/Formula/c/csmith.rb @@ -0,0 +1,64 @@ +class Csmith < Formula + desc "Generates random C programs conforming to the C99 standard" + homepage "https://github.com/csmith-project/csmith" + url "https://github.com/csmith-project/csmith/archive/refs/tags/csmith-2.3.0.tar.gz" + sha256 "9d024a6b202f6a1b9e01351218a85888c06b67b837fe4c6f8ef5bd522fae098c" + license "BSD-2-Clause" + head "https://github.com/csmith-project/csmith.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:csmith[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5dd099418eb9b36019dfabac7bad13d6d2c0eb6d01700c57fbb6323b6c8331d2" + sha256 cellar: :any, arm64_sequoia: "8da68f418cb134b12223efaea3b1a32c75d51a975458ec0b95ea5cfb90b2810a" + sha256 cellar: :any, arm64_sonoma: "52a3fef01ef8a1161d9695787c592c17d405fba995615a6420d5723b8fd49e09" + sha256 cellar: :any, arm64_ventura: "289f49509657abe2bebc5f5b18f95df1c27860bb9cb9cfb6c5b740bb7ee77010" + sha256 cellar: :any, arm64_monterey: "27b069ffcef5994e076353234fed07390d0a2462abc2b851669f619f30f6881c" + sha256 cellar: :any, arm64_big_sur: "79b39e5332514e816d46c871b31a283e9d16adc4d39f2b5177c3569ce2508c4a" + sha256 cellar: :any, sonoma: "d848b6c49abb0999c8ab6da4ee3ed292cd014338ad26bc5a1e007f58f7cefb03" + sha256 cellar: :any, ventura: "4e49e28ba325a522c1fc7581bb550bad3d7e411aad88b2eb13e64e049bfb44fc" + sha256 cellar: :any, monterey: "2ea649dec15e5b7387bde10f8c564c168455ab7b0bca454e669aba28413b10d6" + sha256 cellar: :any, big_sur: "1194af6247da39f02e322f002dacb9654fb1b614a77ecab2a384bb8715493d01" + sha256 cellar: :any, catalina: "fdce1186c77ea774ed5575cd59bc194ab35725d3117c9a57bd54ce351a620965" + sha256 cellar: :any_skip_relocation, arm64_linux: "7dcd32413bf5de8028c02d4e648fca8799aa716f58ae19a7df00eada072888da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "527b8e04eb83e46dd0a24ea321f71bed291f11a158338c1106241365ba3a849b" + end + + uses_from_macos "m4" => :build + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + # Workaround for newer Clang until upstream fix + # https://github.com/csmith-project/csmith/issues/163 + # https://github.com/csmith-project/csmith/issues/177 + # https://github.com/csmith-project/csmith/pull/165 + ENV.append_to_cflags "-Wno-enum-constexpr-conversion" if DevelopmentTools.clang_build_version >= 1700 + + system "./configure", *std_configure_args + system "make" + system "make", "install" + mv "#{bin}/compiler_test.in", share + (include/"csmith-#{version}/runtime").install Dir["runtime/*.h"] + end + + def caveats + <<~EOS + It is recommended that you set the environment variable 'CSMITH_PATH' to + #{include}/csmith-#{version} + EOS + end + + test do + system bin/"csmith", "-o", "test.c" + end +end diff --git a/Formula/c/csound.rb b/Formula/c/csound.rb new file mode 100644 index 0000000000000..1886591bef5cc --- /dev/null +++ b/Formula/c/csound.rb @@ -0,0 +1,285 @@ +class Csound < Formula + desc "Sound and music computing system" + homepage "https://csound.com" + license "LGPL-2.1-or-later" + revision 12 + head "https://github.com/csound/csound.git", branch: "develop" + + # Remove `stable` block when patches are no longer needed + stable do + url "https://github.com/csound/csound.git", + tag: "6.18.1", + revision: "a1580f9cdf331c35dceb486f4231871ce0b00266" + + # Fix build failure due to mismatched pointer types on macOS 14+ + patch do + url "https://github.com/csound/csound/commit/596667daba1ed99eda048e491ff8f36200f09429.patch?full_index=1" + sha256 "ab6d09d1a2cede584e151b514fc4cff56b88f79008e725c3a76df64b59caf866" + end + + patch do + url "https://github.com/csound/csound/commit/2a071ae8ca89bc21b5c80037f8c95a01bb670ac9.patch?full_index=1" + sha256 "c7026330b5c89ab399e74aff17019067705011b7e35b9c75f9ed1a5878f53b4b" + end + + # Fix build failure due to incorrect member name on macOS 15+ + patch do + url "https://github.com/csound/csound/commit/bb9bafcfa17a87d3733eda1e25a812fd0be08ac6.patch?full_index=1" + sha256 "b1492e344a7cc067989ef600a08319d388bebb344fee616d83dce969f3afe8cb" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a8aebe90e991a45430d2eadb0932002e15dbdb9b01c4653b6b39844fc66b8568" + sha256 arm64_sequoia: "19ed28cda2e8ca7f3f8a4f4b4fc6cc20dd15740990beffe2f9fa7f908f7d7d18" + sha256 arm64_sonoma: "a64a23abe5e2f809c23777aaa62e6eff3a7848f632f4a34fa225f4ced50085af" + sha256 sonoma: "9951ff6fd1277d43ea3e0f3702671927c23fe934d6690f9f5b6a4649ce9401fd" + sha256 arm64_linux: "04f341aa5454a4e08af8ec407965194b08975f03ee010f0a901254a64d8b1738" + sha256 x86_64_linux: "33f09e66f709e4d770cdc4b2ab1f89bb9be4107f708d70acb86d790f19731fde" + end + + depends_on "asio" => :build + depends_on "cmake" => :build + depends_on "eigen" => :build + depends_on "swig" => :build + depends_on "faust" + depends_on "fltk" + depends_on "fluid-synth" + depends_on "gettext" + depends_on "hdf5" + depends_on "jack" + depends_on "lame" + depends_on "liblo" + depends_on "libpng" + depends_on "libsamplerate" + depends_on "libsndfile" + depends_on "libwebsockets" + depends_on "numpy" + depends_on "openjdk" + depends_on "openssl@3" + depends_on "portaudio" + depends_on "portmidi" + depends_on "python@3.14" + depends_on "stk" + depends_on "wiiuse" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "libx11" + end + + conflicts_with "libextractor", because: "both install `extract` binaries" + + resource "ableton-link" do + url "https://github.com/Ableton/link/archive/refs/tags/Link-3.1.3.tar.gz" + sha256 "b0eba86d40a46b01ab821cdfb53041bfc693f0266538ea8163f1cea7ac42f476" + end + + resource "csound-plugins" do + url "https://github.com/csound/plugins/archive/refs/tags/1.0.2.tar.gz" + sha256 "8c2f0625ad1d38400030f414b92d82cfdec5c04b7dc178852f3e1935abf75d30" + + # Fix build on macOS 12.3+ by replacing old system Python/Python.h with Homebrew's Python.h + patch do + url "https://github.com/csound/plugins/commit/13800c4dd58e3c214e5d7207180ad7115b4e2f27.patch?full_index=1" + sha256 "e088cc300845408f3956f070fa34a900b700c7860678bc6d37f7506d615787a6" + end + end + + resource "getfem" do + url "https://download.savannah.gnu.org/releases/getfem/stable/getfem-5.4.2.tar.gz" + sha256 "80b625d5892fe9959c3b316340f326e3ece4e98325eb0a81dd5b9ddae563b1d1" + end + + def python3 + which("python3.14") + end + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + site_packages = prefix/Language::Python.site_packages(python3) + rpaths = [rpath] + rpaths << rpath(target: frameworks) if OS.mac? + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + "-DBUILD_JAVA_INTERFACE=ON", + "-DBUILD_LUA_INTERFACE=OFF", + "-DBUILD_TESTS=OFF", + "-DCS_FRAMEWORK_DEST=#{frameworks}", + "-DJAVA_MODULE_INSTALL_DIR=#{libexec}", + "-DPYTHON3_MODULE_INSTALL_DIR=#{site_packages}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + if OS.mac? + include.install_symlink frameworks/"CsoundLib64.framework/Headers" => "csound" + site_packages.install buildpath/"interfaces/ctcsound.py" + else + # On Linux, csound depends on binutils, but both formulae install `srconv` binaries + (bin/"srconv").unlink + end + + resource("csound-plugins").stage do + resource("ableton-link").stage buildpath/"ableton-link" + resource("getfem").stage { cp_r "src/gmm", buildpath } + + # Can remove minimum policy in a release with + # https://github.com/csound/plugins/commit/0a95ad72b5eb0a81bc680c2ac04da9a7c220715b + args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DABLETON_LINK_HOME=#{buildpath}/ableton-link + -DBUILD_ABLETON_LINK_OPCODES=ON + -DBUILD_CHUA_OPCODES=ON + -DBUILD_CUDA_OPCODES=OFF + -DBUILD_FAUST_OPCODES=ON + -DBUILD_FLUID_OPCODES=ON + -DBUILD_HDF5_OPCODES=ON + -DBUILD_IMAGE_OPCODES=ON + -DBUILD_JACK_OPCODES=ON + -DBUILD_LINEAR_ALGEBRA_OPCODES=ON + -DBUILD_MP3OUT_OPCODE=ON + -DBUILD_OPENCL_OPCODES=OFF + -DBUILD_PYTHON_OPCODES=ON + -DBUILD_STK_OPCODES=ON + -DBUILD_WEBSOCKET_OPCODE=ON + -DBUILD_WIIMOTE_OPCODES=ON + -DGMM_INCLUDE_DIR=#{buildpath} + -DPython3_EXECUTABLE=#{python3} + -DUSE_FLTK=ON + ] + args += if OS.mac? + %W[ + -DBUILD_P5GLOVE_OPCODES=ON + -DCSOUND_FRAMEWORK=#{frameworks}/CsoundLib64.framework + -DCSOUND_INCLUDE_DIR=#{frameworks}/CsoundLib64.framework/Headers + -DPLUGIN_INSTALL_DIR=#{frameworks}/CsoundLib64.framework/Resources/Opcodes64 + ] + else + %w[ + -DBUILD_P5GLOVE_OPCODES=OFF + ] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + end + + def caveats + caveats = <<~EOS + To use the Java bindings, you may need to add to your shell profile + e.g. ~/.profile or ~/.zshrc: + export CLASSPATH="#{opt_libexec}/csnd6.jar:." + and link the native shared library into your Java Extensions folder: + EOS + + on_macos do + caveats = <<~EOS + #{caveats}\ + mkdir -p ~/Library/Java/Extensions + ln -s "#{opt_libexec}/lib_jcsound6.jnilib" ~/Library/Java/Extensions + EOS + end + + on_linux do + caveats = <<~EOS + srconv is not installed because it conflicts with binutils. To run srconv: + csound --utility=srconv + + #{caveats}\ + sudo mkdir -p /usr/java/packages/lib + sudo ln -s "#{opt_libexec}/lib_jcsound6.jnilib" /usr/java/packages/lib + EOS + end + + caveats + end + + test do + (testpath/"test.orc").write <<~ORC + 0dbfs = 1 + gi_peer link_create + FLrun + gi_fluidEngineNumber fluidEngine + gi_realVector la_i_vr_create 1 + pyinit + instr 1 + a_, a_, a_ chuap 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + a_signal STKPlucked 440, 1 + a_, a_ hrtfstat a_signal, 0, 0, sprintf("hrtf-%d-left.dat", sr), sprintf("hrtf-%d-right.dat", sr), 9, sr + hdf5write "test.h5", a_signal + mp3out a_signal, a_signal, "test.mp3" + out a_signal + endin + ORC + + (testpath/"test.sco").write <<~SCO + i 1 0 1 + e + SCO + + if OS.mac? + ENV["OPCODE6DIR64"] = frameworks/"CsoundLib64.framework/Resources/Opcodes64" + ENV["SADIR"] = frameworks/"CsoundLib64.framework/Versions/Current/samples" + else + ENV["OPCODE6DIR64"] = lib/"csound/plugins64-6.0" + ENV["SADIR"] = share/"samples" + end + ENV["RAWWAVE_PATH"] = Formula["stk"].pkgshare/"rawwaves" + + system bin/"csound", "test.orc", "test.sco" + + assert_path_exists testpath/"test.#{OS.mac? ? "aif" : "wav"}" + assert_path_exists testpath/"test.h5" + assert_path_exists testpath/"test.mp3" + + (testpath/"opcode-existence.orc").write <<~ORC + gi_programHandle faustcompile "process = _;", "--vectorize --loop-variant 1" + JackoInfo + instr 1 + i_ websocket 8888, 0 + i_ wiiconnect 1, 1 + endin + ORC + system bin/"csound", "--orc", "--syntax-check-only", "opcode-existence.orc" + + if OS.mac? + (testpath/"mac-opcode-existence.orc").write <<~ORC + instr 1 + p5gconnect + endin + ORC + system bin/"csound", "--orc", "--syntax-check-only", "mac-opcode-existence.orc" + end + + system python3, "-c", "import ctcsound" + + (testpath/"test.java").write <<~JAVA + import csnd6.*; + public class test { + public static void main(String args[]) { + csnd6.csoundInitialize(csnd6.CSOUNDINIT_NO_ATEXIT | csnd6.CSOUNDINIT_NO_SIGNAL_HANDLER); + } + } + JAVA + system Formula["openjdk"].bin/"javac", "-classpath", "#{libexec}/csnd6.jar", "test.java" + system Formula["openjdk"].bin/"java", "-classpath", "#{libexec}/csnd6.jar:.", + "-Djava.library.path=#{libexec}", "test" + end +end diff --git a/Formula/c/cspell.rb b/Formula/c/cspell.rb new file mode 100644 index 0000000000000..518540fa98602 --- /dev/null +++ b/Formula/c/cspell.rb @@ -0,0 +1,25 @@ +class Cspell < Formula + desc "Spell checker for code" + homepage "https://cspell.org" + url "https://registry.npmjs.org/cspell/-/cspell-9.2.2.tgz" + sha256 "efe6bd85b62f77142780ff2ec0604213128cdec2a243172b606d849df1a07786" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d2442352d735807b29b17fa9755f23446f797a45be8ca58cf01165642c745790" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + # Skip linking cspell-esm binary, which is identical to cspell. + bin.install_symlink libexec/"bin/cspell" + end + + test do + (testpath/"test.rb").write("misspell_worrd = 1") + output = shell_output("#{bin}/cspell test.rb", 1) + assert_match "test.rb:1:10 - Unknown word (worrd)", output + end +end diff --git a/Formula/c/cspice.rb b/Formula/c/cspice.rb new file mode 100644 index 0000000000000..b7763c7a1c3c8 --- /dev/null +++ b/Formula/c/cspice.rb @@ -0,0 +1,65 @@ +class Cspice < Formula + desc "Observation geometry system for robotic space science missions" + homepage "https://naif.jpl.nasa.gov/naif/toolkit.html" + url "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z" + version "67" + sha256 "6f4980445fee4d363dbce6f571819f4a248358d2c1bebca47e0743eedfe9935e" + license :cannot_represent + + # The `stable` tarball is unversioned, so we have to identify the latest + # version from text on the homepage. + livecheck do + url :homepage + regex(/current SPICE Toolkit version is (?:<[^>]+?>)?N0*(\d+)/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "040bfcb0ac95b84d33600b31a20d6bb50a81f606a713077d86bc4fe47f115108" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c978ab6a4a6d85e200924e49a41e2da477561637bbd46f49d150614777d8d1ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e57b6904ce0cce29f3b74d3ca47e289dbdfd0eea10cf8762720986bad78fe5b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75fb24feb4462f0b49be4c6b1f473f2854b3b34a25bc9ec6e3fd4c2e91664250" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a3e9574c472567a3814aed8f11bcc0874d6dc4ce2e1e867351e5668366d60a6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "27847bdbb741a1195069b815bef8bcbdbcbc183ab3b7034a83eb7854348d7f04" + sha256 cellar: :any_skip_relocation, sonoma: "03e8ae8aec875223b2706a0c593879fb1eb483eab90ee30d9a89ac1cdd0bae61" + sha256 cellar: :any_skip_relocation, ventura: "08f343b41a74f34b570617df5af195429f90a0d1feb1303a8edcf49f77476080" + sha256 cellar: :any_skip_relocation, monterey: "b6317d5408e0c56164299671a459ed55c3581a219b4e0b7c699c08fe6abbcb3d" + sha256 cellar: :any_skip_relocation, big_sur: "081d234c0862319ab53275de9eb9f6e006d53afe43c63d53425bd089ea9b493c" + sha256 cellar: :any_skip_relocation, catalina: "900cfe839cf53dc03c1e227332d24849e55209a606dba515412ae74a955144f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "eab82a1e15614b89d2873ae64760df4da1053990b6f7e288d97a618a2d0c4ab2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c49763f72469907d773eef66b54ae8dce74c3df9f2f5dee29468de3ea9f0953" + end + + on_linux do + depends_on "tcsh" + end + + conflicts_with "openhmd", because: "both install `simple` binaries" + conflicts_with "enscript", because: "both install `states` binaries" + conflicts_with "pwntools", because: "both install `version` binaries" + + def install + # Use brewed csh on Linux because it is not installed in CI. + unless OS.mac? + inreplace Dir["src/*/*.csh"] do |s| + s.gsub! "/bin/csh", Formula["tcsh"].opt_bin/"csh" + s.gsub! '= "-m64 ', '= "' if Hardware::CPU.arm? + end + end + + rm(Dir["lib/*"]) + rm(Dir["exe/*"]) + system "csh", "makeall.csh" + mv "exe", "bin" + pkgshare.install "doc", "data" + prefix.install "bin", "include", "lib" + + lib.install_symlink "cspice.a" => "libcspice.a" + lib.install_symlink "csupport.a" => "libcsupport.a" + end + + test do + system bin/"tobin", "#{pkgshare}/data/cook_01.tsp", "DELME" + end +end diff --git a/Formula/c/csprecon.rb b/Formula/c/csprecon.rb new file mode 100644 index 0000000000000..9cc3baf28c4df --- /dev/null +++ b/Formula/c/csprecon.rb @@ -0,0 +1,28 @@ +class Csprecon < Formula + desc "Discover new target domains using Content Security Policy" + homepage "https://github.com/edoardottt/csprecon" + url "https://github.com/edoardottt/csprecon/archive/refs/tags/v0.4.3.tar.gz" + sha256 "d86f960f21d029a5ac6e6b4087f1b1dcc7ad7632007d8646b8185d3e39fbc7d6" + license "MIT" + head "https://github.com/edoardottt/csprecon.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f621fc56cd9c69ff6203214c6936e73109a4c86ac723d964739879ee7c014e3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f621fc56cd9c69ff6203214c6936e73109a4c86ac723d964739879ee7c014e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f621fc56cd9c69ff6203214c6936e73109a4c86ac723d964739879ee7c014e3" + sha256 cellar: :any_skip_relocation, sonoma: "c57841b2a41ce3cd03545bfd6ab3b1ffdd5fb887c6eb1e6b1a0ef68598d9db35" + sha256 cellar: :any_skip_relocation, arm64_linux: "78623ece065d4f95d47da3454d2434bce1033e32043227a8335c14c5c79dcf68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be01fa962035939cc3a2f94335fc4f227fe06080725cb025a85c6234c2b2bef1" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/csprecon" + end + + test do + output = shell_output("#{bin}/csprecon -u https://brew.sh") + assert_match "avatars.githubusercontent.com", output + end +end diff --git a/Formula/c/css-crush.rb b/Formula/c/css-crush.rb new file mode 100644 index 0000000000000..f4f5db35d9a6f --- /dev/null +++ b/Formula/c/css-crush.rb @@ -0,0 +1,31 @@ +class CssCrush < Formula + desc "Extensible PHP based CSS preprocessor" + homepage "https://the-echoplex.net/csscrush" + url "https://github.com/peteboere/css-crush/archive/refs/tags/v5.0.0.tar.gz" + sha256 "4fde4e991fa64e97f28c796c2267e155bca9de963713cc20d93c1618fd5285b6" + license "MIT" + head "https://github.com/peteboere/css-crush.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "76b89826d8214ed32749b25d382cbfd780d61e56c9043c52695ef0458a403ee2" + end + + depends_on "php" + + def install + libexec.install Dir["*"] + (bin/"csscrush").write <<~SHELL + #!/bin/sh + php "#{libexec}/cli.php" "$@" + SHELL + end + + test do + (testpath/"test.crush").write <<~EOS + @define foo #123456; + p { color: $(foo); } + EOS + + assert_equal "p{color:#123456}", shell_output("#{bin}/csscrush #{testpath}/test.crush").strip + end +end diff --git a/Formula/c/csshx.rb b/Formula/c/csshx.rb new file mode 100644 index 0000000000000..a63bc8a4ec8f4 --- /dev/null +++ b/Formula/c/csshx.rb @@ -0,0 +1,25 @@ +class Csshx < Formula + desc "Cluster ssh tool for Terminal.app" + homepage "https://github.com/brockgr/csshx" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/csshx/csshX-0.74.tgz" + mirror "https://distfiles.macports.org/csshX/csshX-0.74.tgz" + sha256 "eaa9e52727c8b28dedc87398ed33ffa2340d6d0f3ea9d261749c715cb7a0e9c8" + # same terms as Perl + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/brockgr/csshx.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b8bdc972870bbf205b870ecd86251a2975d517f0da679aecdc0299b9472ef338" + end + + def install + bin.install "csshX" + end + + test do + assert_match version.to_s, shell_output("#{bin}/csshX --version 2>&1", 2) + end +end diff --git a/Formula/c/csview.rb b/Formula/c/csview.rb new file mode 100644 index 0000000000000..8c4dea089da68 --- /dev/null +++ b/Formula/c/csview.rb @@ -0,0 +1,41 @@ +class Csview < Formula + desc "High performance csv viewer for cli" + homepage "https://github.com/wfxr/csview" + url "https://github.com/wfxr/csview/archive/refs/tags/v1.3.4.tar.gz" + sha256 "91fadcddef511265f4bf39897ce4a65c457ac89ffd8dd742dc209d30bf04d6aa" + license any_of: ["MIT", "Apache-2.0"] + head "https://github.com/wfxr/csview.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8737fd09dc38bfd517f18fbc77fdeefaa5e81be68c1cbf2f9229cf4496c63267" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25e89b345b9a280bb3e1ed9131878aa372277f1b8ac5647938f4056fd8267a97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e558ed523b25a07d5d6110f2686154c2f1b43ee5fe4e28cc63d1287f475292c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "726c20bdf56990f680feea91504782ff3ed966ff27a4d63ac2fd7d8e9244e70c" + sha256 cellar: :any_skip_relocation, sonoma: "b0cfc60d188ba14a0d17909bcf78e21673ee65aee2d0bfadd28ffaa741ce2816" + sha256 cellar: :any_skip_relocation, ventura: "46a886931cb6f7876fa7dca415a2d25f61063e69a4d47dd1fa7eb2726f2bc41e" + sha256 cellar: :any_skip_relocation, arm64_linux: "cff3b9c1289a699084743bfaf49933d7c30903cd8096fb63f1f1d7039accb762" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1dcad326ae8950b1557bdf2dc4e6477ae867a0f4f05211373bde145c87154e7c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + zsh_completion.install "completions/zsh/_csview" + bash_completion.install "completions/bash/csview.bash" => "csview" + fish_completion.install "completions/fish/csview.fish" + end + + test do + (testpath/"test.csv").write("a,b,c\n1,2,3") + assert_equal <<~EOS, shell_output("#{bin}/csview #{testpath}/test.csv") + ┌───┬───┬───┐ + │ a │ b │ c │ + ├───┼───┼───┤ + │ 1 │ 2 │ 3 │ + └───┴───┴───┘ + EOS + end +end diff --git a/Formula/c/csvkit.rb b/Formula/c/csvkit.rb new file mode 100644 index 0000000000000..6eb093ed09fcb --- /dev/null +++ b/Formula/c/csvkit.rb @@ -0,0 +1,119 @@ +class Csvkit < Formula + include Language::Python::Virtualenv + + desc "Suite of command-line tools for converting to and working with CSV" + homepage "https://csvkit.readthedocs.io/" + url "https://files.pythonhosted.org/packages/80/e2/b6317dc421111a8158ce186095208127b4d53d823b40d9268cffbf06b73b/csvkit-2.1.0.tar.gz" + sha256 "b91e8f5a485888c3c515b15cc2525ce4be5cfcd4f4766ead83113e787b5fd536" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "92d9573398de98581eb6b73ebe4d61dbe0870bb59cf6a34e5a29120698ed9658" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2dfc10d5827129c968d81d25e1455eab59eca545dc5c988d290f1fa63aa95a46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a15bac677ba32f18d58d8634910a49a759f284f04ace89870705beb9c273dc9" + sha256 cellar: :any_skip_relocation, sonoma: "61e3d3d9ff3949dfe2a063f0b5de368664661751e46e48f8bae0225705fc7ff9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b6dad0194b2430c9e7b8e79712adf3f0f72c6bb1d68535e0bbb94d5eacc5a76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c03696c5dbecaff49514791c5dee48a877b9e8e0ae969eed310649a06c22c465" + end + + depends_on "python@3.14" + + resource "agate" do + url "https://files.pythonhosted.org/packages/38/a5/3773a25b4b4867efbe69dd34f374020e1c66415ac96afc572ac7aa47d90c/agate-1.13.0.tar.gz" + sha256 "24bc3d3cbd165aa3ab0ef9e798dd4c53ad703012d450fe89b9c26b239505c445" + end + + resource "agate-dbf" do + url "https://files.pythonhosted.org/packages/e7/b1/4de32f53777a304f63fb781b0ec4520af4e011ba477d7214672b3c92d2da/agate-dbf-0.2.3.tar.gz" + sha256 "98a2b53757136cc74dc297e59e2101d34f6d48f41f74156bb6c0de26bba2aa3f" + end + + resource "agate-excel" do + url "https://files.pythonhosted.org/packages/07/93/350f95d3cca0e1f43d55d48879bc33dd54b8c5619ebdac7d2adf42a3cc92/agate-excel-0.4.1.tar.gz" + sha256 "28426618c90747111e6d566e983d838f1e2fae641ea6970d7acb0e9d4b384091" + end + + resource "agate-sql" do + url "https://files.pythonhosted.org/packages/11/9e/004234db38834e805cf8df6dff5d5d819a9909b247ef57d4c23208b04332/agate-sql-0.7.2.tar.gz" + sha256 "9b1b30284a573fd416759437273dcc5c81022bdf2facb24b4aa029a62afd53b0" + end + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "dbfread" do + url "https://files.pythonhosted.org/packages/ad/ae/a5891681f5012724d062a4ca63ec2ff539c73d5804ba594e7e0e72099d3f/dbfread-2.0.7.tar.gz" + sha256 "07c8a9af06ffad3f6f03e8fe91ad7d2733e31a26d2b72c4dd4cfbae07ee3b73d" + end + + resource "et-xmlfile" do + url "https://files.pythonhosted.org/packages/d3/38/af70d7ab1ae9d4da450eeec1fa3918940a5fafb9055e934af8d6eb0c2313/et_xmlfile-2.0.0.tar.gz" + sha256 "dab3f4764309081ce75662649be815c4c9081e88f0837825f90fd28317d4da54" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "leather" do + url "https://files.pythonhosted.org/packages/ed/6e/48a05e2f7f62a616d675cfee182643f2dd8023bf7429aa326f4bebd629c8/leather-0.4.0.tar.gz" + sha256 "f964bec2086f3153a6c16e707f20cb718f811f57af116075f4c0f4805c608b95" + end + + resource "olefile" do + url "https://files.pythonhosted.org/packages/69/1b/077b508e3e500e1629d366249c3ccb32f95e50258b231705c09e3c7a4366/olefile-0.47.zip" + sha256 "599383381a0bf3dfbd932ca0ca6515acd174ed48870cbf7fee123d698c192c1c" + end + + resource "openpyxl" do + url "https://files.pythonhosted.org/packages/3d/f9/88d94a75de065ea32619465d2f77b29a0469500e99012523b91cc4141cd1/openpyxl-3.1.5.tar.gz" + sha256 "cf0e3cf56142039133628b5acffe8ef0c12bc902d2aadd3e0fe5878dc08d1050" + end + + resource "parsedatetime" do + url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" + sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" + end + + resource "python-slugify" do + url "https://files.pythonhosted.org/packages/87/c7/5e1547c44e31da50a460df93af11a535ace568ef89d7a811069ead340c4a/python-slugify-8.0.4.tar.gz" + sha256 "59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856" + end + + resource "pytimeparse" do + url "https://files.pythonhosted.org/packages/37/5d/231f5f33c81e09682708fb323f9e4041408d8223e2f0fb9742843328778f/pytimeparse-1.1.8.tar.gz" + sha256 "e86136477be924d7e670646a98561957e8ca7308d44841e21f5ddea757556a0a" + end + + resource "sqlalchemy" do + url "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz" + sha256 "0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22" + end + + resource "text-unidecode" do + url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" + sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "xlrd" do + url "https://files.pythonhosted.org/packages/07/5a/377161c2d3538d1990d7af382c79f3b2372e880b65de21b01b1a2b78691e/xlrd-2.0.2.tar.gz" + sha256 "08b5e25de58f21ce71dc7db3b3b8106c1fa776f3024c54e45b45b374e89234c9" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "2,6", pipe_output("#{bin}/csvcut -c 1,3", "2,4,6,8", 0).chomp + end +end diff --git a/Formula/c/csvlens.rb b/Formula/c/csvlens.rb new file mode 100644 index 0000000000000..5c5952ef12699 --- /dev/null +++ b/Formula/c/csvlens.rb @@ -0,0 +1,38 @@ +class Csvlens < Formula + desc "Command-line csv viewer" + homepage "https://github.com/YS-L/csvlens" + url "https://github.com/YS-L/csvlens/archive/refs/tags/v0.14.0.tar.gz" + sha256 "d653c97c55c8638d2137dfc3b8dcb62f6d76a6786eadc468086e23214cbea3c4" + license "MIT" + head "https://github.com/YS-L/csvlens.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40ee60cc736bf14bc4d12a582b71f554ddab353783f17d8a262121982686c37b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e9f1365b85960a42dd7fe79bd2a9a8c97aff0cdfd28b45ddc57e80d59310958" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96a69533a99b6d7f4378703a132584f9eff2b621849cd8d7c23de6bc73c3a3f2" + sha256 cellar: :any_skip_relocation, sonoma: "4169b6cd7e73acbebf7e459e90e8cae6e1c429d60b4903dcce1581aacd83f474" + sha256 cellar: :any_skip_relocation, arm64_linux: "baafd5f83232eb68564ab84148a75bddbe0dcb593b3436b8d5013bc8469fb68a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "092886e9e8b21b94574be7eecc864aaddcc66aa3e7cab7acc560c63d4354c943" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + require "pty" + require "io/console" + (testpath/"test.csv").write("A,B,C\n100,42,300") + PTY.spawn(bin/"csvlens", "#{testpath}/test.csv", "--echo-column", "B") do |r, w, _pid| + r.winsize = [10, 10] + sleep 5 + # Select the column B by pressing enter. The answer 42 should be printed out. + w.write "\r" + assert r.read.end_with?("42\r\n") + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end +end diff --git a/Formula/c/csvprintf.rb b/Formula/c/csvprintf.rb new file mode 100644 index 0000000000000..3972d99537c5e --- /dev/null +++ b/Formula/c/csvprintf.rb @@ -0,0 +1,35 @@ +class Csvprintf < Formula + desc "Command-line utility for parsing CSV files" + homepage "https://github.com/archiecobbs/csvprintf" + url "https://github.com/archiecobbs/csvprintf/archive/refs/tags/1.3.3.tar.gz" + sha256 "3f90068fe61f66389fc097e0125776181615acd57cd90487076914ef310e3e6a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "195a5a242cc43ded9929dcfacfdf78386b10940a70ea842883e38e8a698ee620" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe74428364889047aaca99b9798a649740f1d4502c0c1158a1b196b615342e24" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f2d8a70df57f7851ffbf367718df7196e1e1eac96dce7782b010542d248b35c" + sha256 cellar: :any_skip_relocation, sonoma: "caba266a509fc8a19393e6e8adcc6f99833c61a609ab32f61dd5ba0368ca1ecf" + sha256 cellar: :any_skip_relocation, arm64_linux: "4739a1dfdcd3f8519c77a6033454467d9324b8ff4ef4bb0b83a0fd2524479b20" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c6a79c7e283a1012043142168a5eae7da1ef5f7bf3c31c449cf231fe52029ec" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "libxslt" + + def install + ENV.append "LDFLAGS", "-liconv" if OS.mac? + + system "./autogen.sh" + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_equal "Fred Smith\n", + pipe_output("#{bin}/csvprintf -i '%2$s %1$s\n'", "Last,First\nSmith,Fred\n") + end +end diff --git a/Formula/c/csvq.rb b/Formula/c/csvq.rb new file mode 100644 index 0000000000000..a5a84f375024e --- /dev/null +++ b/Formula/c/csvq.rb @@ -0,0 +1,49 @@ +class Csvq < Formula + desc "SQL-like query language for csv" + homepage "https://mithrandie.github.io/csvq" + url "https://github.com/mithrandie/csvq/archive/refs/tags/v1.18.1.tar.gz" + sha256 "69f98d0d26c055cbe4ebfe2cedf79c744bebafac604ea55fb0081826b1ac7b74" + license "MIT" + head "https://github.com/mithrandie/csvq.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3981b6e29e04cdf062302717b93fc6bbde7c240d24b23fe0c4fb853ea53fc8df" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "303a36f17339ff457769472ba232b72a6fbee8e92f08ff5c84e72f5293a03090" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2fd21285e2daab0a8c6e02fbec8b218b72f6347b9f5e281d7184ef36bf638ae1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4da92f08fc5206cb67e4748463b1d29289da9630dd5e3b5e394063ff48e465da" + sha256 cellar: :any_skip_relocation, arm64_monterey: "16b40bdb339f355cea536c697d0f1990c20e6ec3bf9f606d50a3c494b56ef23a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "adcd391cbcc84b77d0ada56fd670bd511eb7c8adf2b516ed185809595b4bcfb9" + sha256 cellar: :any_skip_relocation, sonoma: "2214b4419d5a50f23ba7dc51eeb3ddcb250d2422d970793733955bd1e14b064e" + sha256 cellar: :any_skip_relocation, ventura: "3062a442b7fbdfe309ca430277257a6f9a86a6b98e4f3558f6342d56278e2a37" + sha256 cellar: :any_skip_relocation, monterey: "39141ce5a0342df70a2546b77a1800f9e4e4e71763d4464a53095009b07dc96d" + sha256 cellar: :any_skip_relocation, big_sur: "f2ab039ef6309cf727c9b908609c64d555539649c051baa792ccdfef3cc9d5b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f98ed8f73aef226ce5e326da496a85afbe069f613ff64273e2e1417630610d56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d32956ca38f3f9d768739765fc3f7f3449e0c8f67d45dc2d55981e93fcc8edeb" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + system bin/"csvq", "--version" + + (testpath/"test.csv").write <<~CSV + a,b,c + 1,2,3 + CSV + expected = <<~CSV + a,b + 1,2 + CSV + result = shell_output("#{bin}/csvq --format csv 'SELECT a, b FROM `test.csv`'") + assert_equal expected, result + end +end diff --git a/Formula/c/csvtk.rb b/Formula/c/csvtk.rb new file mode 100644 index 0000000000000..ebd94482993ce --- /dev/null +++ b/Formula/c/csvtk.rb @@ -0,0 +1,44 @@ +class Csvtk < Formula + desc "Cross-platform, efficient and practical CSV/TSV toolkit in Golang" + homepage "https://bioinf.shenwei.me/csvtk" + url "https://github.com/shenwei356/csvtk/archive/refs/tags/v0.35.0.tar.gz" + sha256 "2b6c5a74a612f83bf95256fb4d926b929e9014a58a6d2969b00f078e33b8f1c9" + license "MIT" + head "https://github.com/shenwei356/csvtk.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0ba1d0a8b8cc3fdbeb287117d25f6bdc0af13885f4a5b86720a74182410bee8a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0ba1d0a8b8cc3fdbeb287117d25f6bdc0af13885f4a5b86720a74182410bee8a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ba1d0a8b8cc3fdbeb287117d25f6bdc0af13885f4a5b86720a74182410bee8a" + sha256 cellar: :any_skip_relocation, sonoma: "85b122875a0c82ed4864a5a27276508bbf36dcff24487e124970749018fdd19e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c577606d627853521966817c24d4bdc5a24519288fde79de5079bc8f72c9bd8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50207f4035d14dc12d0b0ca5f7acc39900d43c24a9b5c2cd31964c6b157c42e7" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./csvtk" + + # We do this because the command to generate completions doesn't print them + # to stdout and only writes them to a file + system bin/"csvtk", "genautocomplete", "--shell", "bash", "--file", "csvtk.bash" + system bin/"csvtk", "genautocomplete", "--shell", "zsh", "--file", "_csvtk" + system bin/"csvtk", "genautocomplete", "--shell", "fish", "--file", "csvtk.fish" + bash_completion.install "csvtk.bash" => "csvtk" + zsh_completion.install "_csvtk" + fish_completion.install "csvtk.fish" + end + + test do + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/shenwei356/csvtk/e7b72224a70b7d40a8a80482be6405cb7121fb12/testdata/1.csv" + sha256 "3270b0b14178ef5a75be3f2e3fdcf93152e3949f9f8abb3382cb00755b62505b" + end + + resource("homebrew-testdata").stage do + assert_equal "3,bar,handsome\n", + shell_output("#{bin}/csvtk grep -H -N -n -f 2 -p handsome 1.csv") + end + end +end diff --git a/Formula/c/csvtomd.rb b/Formula/c/csvtomd.rb new file mode 100644 index 0000000000000..b06ec1ea0d159 --- /dev/null +++ b/Formula/c/csvtomd.rb @@ -0,0 +1,54 @@ +class Csvtomd < Formula + include Language::Python::Virtualenv + + desc "CSV to Markdown table converter" + homepage "https://github.com/mplewis/csvtomd" + url "https://files.pythonhosted.org/packages/9d/59/ea3c8b102f9c72e5d276a169f7f343432213441c39a6eac7a8f444c66681/csvtomd-0.3.0.tar.gz" + sha256 "a1fbf1db86d4b7b62a75dc259807719b2301ed01db5d1d7d9bb49c4a8858778b" + license "MIT" + revision 3 + + bottle do + rebuild 7 + sha256 cellar: :any_skip_relocation, all: "5ec7258739ce76c3ca9987d824d27efcd6897ba1f75e72fe59dc975f5e4b1246" + end + + deprecate! date: "2025-01-10", because: :repo_archived + + depends_on "python@3.14" + + # ValueError: invalid mode: 'rU' + patch :DATA + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.csv").write <<~CSV + column 1,column 2 + hello,world + CSV + markdown = <<~MARKDOWN.strip + column 1 | column 2 + ----------|---------- + hello | world + MARKDOWN + assert_equal markdown, shell_output("#{bin}/csvtomd test.csv").strip + end +end + +__END__ +diff --git a/csvtomd/csvtomd.py b/csvtomd/csvtomd.py +index a0589a3..137f8da 100755 +--- a/csvtomd/csvtomd.py ++++ b/csvtomd/csvtomd.py +@@ -146,7 +146,7 @@ def main(): + if filename == '-': + table = csv_to_table(sys.stdin, args.delimiter) + else: +- with open(filename, 'rU') as f: ++ with open(filename, 'r') as f: + table = csv_to_table(f, args.delimiter) + # Print filename for each table if --no-filenames wasn't passed and + # more than one CSV was provided diff --git a/Formula/c/ctags.rb b/Formula/c/ctags.rb new file mode 100644 index 0000000000000..f3f4d07e19c9e --- /dev/null +++ b/Formula/c/ctags.rb @@ -0,0 +1,111 @@ +class Ctags < Formula + desc "Reimplementation of ctags(1)" + homepage "https://ctags.sourceforge.net/" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 2 + + stable do + url "https://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz" + sha256 "0e44b45dcabe969e0bbbb11e30c246f81abe5d32012db37395eb57d66e9e99c7" + + # also fixes https://sourceforge.net/p/ctags/bugs/312/ + # merged upstream but not yet in stable + patch :p2 do + url "https://gist.githubusercontent.com/naegelejd/9a0f3af61954ae5a77e7/raw/16d981a3d99628994ef0f73848b6beffc70b5db8/Ctags%20r782" + sha256 "26d196a75fa73aae6a9041c1cb91aca2ad9d9c1de8192fce8cdc60e4aaadbcbb" + end + + # Use Debian patch to fix build with glibc 2.34+ + patch do + on_linux do + url "https://sources.debian.org/data/main/e/exuberant-ctags/1%3A5.9~svn20110310-18/debian/patches/use-conventional-unused-marker.patch" + sha256 "65e92a8472e00386466888e441fd0f1223aabcf1d3812102f41fa34be003a668" + end + end + end + + livecheck do + url :stable + regex(%r{url=.*?/ctags[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b09e6e1c3e9649115863ee3cea2062958a73f832210c98061679f217f3ad98a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "614a735ab93afb5ed2a2f12a66819e0b35a1c644021670057d0cac0fbe9910ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b28f3ab751719782670837ff160aa2aee6889b8e0e064da834ac525d383b2e7a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1663c12c3c741cbb744beaeeeeef5b149e3683aa62f3bdb41c8516bb161194e3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fe6b329a45efc1ac2048d4fce13b8fed5758f1814b5cc8a55bd4f542d846b59f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8e8ee6051008e73c999dbc8476221f220ef87fdf9cbc409a308df6a956e114e6" + sha256 cellar: :any_skip_relocation, sonoma: "a421a97ec72230b9a77ee06040aa5cae3170974a0fb5e130938df3bed16eb6e8" + sha256 cellar: :any_skip_relocation, ventura: "936d4fd1280ecbcff4c3b07a5af8a07c2115c0ffa36bb7aa4418ac2a23d284f2" + sha256 cellar: :any_skip_relocation, monterey: "dac2afa169f02a036b20d719540124fb030d8e3342a754bd6bbb405f94f417ca" + sha256 cellar: :any_skip_relocation, big_sur: "9986b3f6897b60cbdf5d73b4ad819d2d30726043dc0d665b77ba2def399a60b4" + sha256 cellar: :any_skip_relocation, catalina: "2292b70a7b744c2238507417e40c2dc7273c6d919c9fe037bf668cf00863ad92" + sha256 cellar: :any_skip_relocation, arm64_linux: "7300588a624817e1bc68e4fac3a1cb1dec65cfb7073c383910b6ace2d87ddea9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8630326626ccee22ad669f9e7c459735a8dc72c765ae40ec218f31e015dc76a" + end + + head do + url "https://svn.code.sf.net/p/ctags/code/trunk" + depends_on "autoconf" => :build + end + + conflicts_with "universal-ctags", because: "both install `ctags` binaries" + + # fixes https://sourceforge.net/p/ctags/bugs/312/ + patch :p2 do + on_macos do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/ctags/5.8.patch" + sha256 "9b5b04d2b30d27abe71094b4b9236d60482059e479aefec799f0e5ace0f153cb" + end + end + + def install + if build.head? + system "autoheader" + system "autoconf" + end + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--prefix=#{prefix}", + "--enable-macro-patterns", + "--mandir=#{man}", + "--with-readlib" + system "make", "install" + end + + def caveats + <<~EOS + Under some circumstances, emacs and ctags can conflict. By default, + emacs provides an executable `ctags` that would conflict with the + executable of the same name that ctags provides. To prevent this, + Homebrew removes the emacs `ctags` and its manpage before linking. + EOS + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + void func() + { + printf("Hello World!"); + } + + int main() + { + func(); + return 0; + } + C + system bin/"ctags", "-R", "." + assert_match(/func.*test\.c/, File.read("tags")) + assert_match "+regex", shell_output("#{bin}/ctags --version") + end +end diff --git a/Formula/c/ctail.rb b/Formula/c/ctail.rb new file mode 100644 index 0000000000000..2c362de108bbf --- /dev/null +++ b/Formula/c/ctail.rb @@ -0,0 +1,49 @@ +class Ctail < Formula + desc "Tool for operating tail across large clusters of machines" + homepage "https://github.com/pquerna/ctail" + url "https://github.com/pquerna/ctail/archive/refs/tags/ctail-0.1.0.tar.gz" + sha256 "864efb235a5d076167277c9f7812ad5678b477ff9a2e927549ffc19ed95fa911" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "90852c66651a883f061c0c6d2b2c1281e6b8e1cad687fd14e94a056f4fb62554" + sha256 cellar: :any, arm64_sequoia: "21800dfc7f1557473cc6fe1b4e0716d4fb100c86acbd6bbfe3751b36b02a37f6" + sha256 cellar: :any, arm64_sonoma: "4022c3a7de59341455b5be26f2ff72dfc10c4488b0268e18d30057bee351fc3e" + sha256 cellar: :any, arm64_ventura: "2b40393969bdf9a4676ee936099af2cfbe92c006e87ce6c62b44761d24328b10" + sha256 cellar: :any, arm64_monterey: "0b339ed01671f93d78b97a473d2ab4710182097276def040447573b274003e59" + sha256 cellar: :any, arm64_big_sur: "d4f6bf36550a739d7ad22a28200fe2cfb4fc18798fb2af832f380a1b2411803a" + sha256 cellar: :any, sonoma: "9b6bcfa6fb51cc9b44d58409377b3042acd54ad8eef8d60e69639699eb3e9ba9" + sha256 cellar: :any, ventura: "c168ea95ba0e8639c4f1152c19a8cbb831ac1cd7f108c2fc9ac37eab03e0ed23" + sha256 cellar: :any, monterey: "be4aa07bfd921f4903112f0ff6dbccc979b86cae77cdd75fe4ae9e2bcb3ff101" + sha256 cellar: :any, big_sur: "31c851cee6019ade6def5da7a50b2d901d04e1038d9d01d6985ac57a700a810f" + sha256 cellar: :any, catalina: "0821eb3a9bf969519149b7cb3038db2dc25836bc335c057e0ff263aa5fc2f7b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4eddd733efe18c74eadb393d0ab41d51a5b4972857c6022a39c955595e2ab2f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "583c009e46c529593648a48442ba5544aa1ac7ebb3cf1309c2e1eb08ed9f9439" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "apr" + depends_on "apr-util" + + conflicts_with "byobu", because: "both install `ctail` binaries" + + def install + # Workaround for ancient config files not recognizing aarch64 macos. + system "autoreconf", "--force", "--install", "--verbose" if Hardware::CPU.arm? + + system "./configure", *std_configure_args, + "--with-apr=#{Formula["apr"].opt_bin}", + "--with-apr-util=#{Formula["apr-util"].opt_bin}" + system "make", "LIBTOOL=glibtool --tag=CC" + system "make", "install" + end + + test do + system bin/"ctail", "-h" + end +end diff --git a/Formula/c/ctemplate.rb b/Formula/c/ctemplate.rb new file mode 100644 index 0000000000000..3bd4d4493c157 --- /dev/null +++ b/Formula/c/ctemplate.rb @@ -0,0 +1,55 @@ +class Ctemplate < Formula + desc "Template language for C++" + homepage "https://github.com/olafvdspek/ctemplate" + url "https://github.com/OlafvdSpek/ctemplate/archive/refs/tags/ctemplate-2.4.tar.gz" + sha256 "ccc4105b3dc51c82b0f194499979be22d5a14504f741115be155bd991ee93cfa" + license "BSD-3-Clause" + revision 1 + head "https://github.com/olafvdspek/ctemplate.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "d6900c980a0644c4e4e8d8884d7393e6bf9fb28108901ad207206d93c5ff0508" + sha256 cellar: :any, arm64_sequoia: "acd3dba90331797c66b476e02edfb172fc67566fa46866d4b6c72605bb331030" + sha256 cellar: :any, arm64_sonoma: "da3b3f971024e8235955c5e6c2c3b0ae8626e229f2e5e26d5edceaf5fe10e6c0" + sha256 cellar: :any, arm64_ventura: "ee9935e535f7fc5ad36e78a17cdfa370dd804442065fb9d71f42939042b9a239" + sha256 cellar: :any, arm64_monterey: "60926618dc8939dee2953a3eed541ffbcda70ae70ea9e4811de4c635f351c3dc" + sha256 cellar: :any, arm64_big_sur: "229589ee690294f135322334b902cacb32c86b9be7775320920300f8716d2a2a" + sha256 cellar: :any, sonoma: "182d6a82a8d4b2a529965002e528c53b0d6449ecbd2d5f83388dbc79132ef31d" + sha256 cellar: :any, ventura: "8395eba52adc92de5ec11316fd65082dba1f5c934750cd86d7ec68ab7c40251d" + sha256 cellar: :any, monterey: "3403981879581767866598b52b148046e46362102620c6220a06464add516197" + sha256 cellar: :any, big_sur: "d47aa3297f5e44511790bb0fb1bf4e7eb5d37c599b9c9b661133d68f821b7048" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8952fd11178e7d1378d3be330d5cb5d393d15837544f375700badd9044d5d38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "376a70935eec4f3f5965bcd0b39603f25459b8995d12d124c3ab10184e15f3ae" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + uses_from_macos "python" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char** argv) { + ctemplate::TemplateDictionary dict("example"); + dict.SetValue("NAME", "Jane Doe"); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", + "-lctemplate_nothreads", "-o", "test" + system "./test" + end +end diff --git a/Formula/c/ctl.rb b/Formula/c/ctl.rb new file mode 100644 index 0000000000000..d19f6cb95f787 --- /dev/null +++ b/Formula/c/ctl.rb @@ -0,0 +1,40 @@ +class Ctl < Formula + desc "Programming language for digital color management" + homepage "https://github.com/ampas/CTL" + url "https://github.com/ampas/CTL/archive/refs/tags/ctl-1.5.4.tar.gz" + sha256 "fb84925320d053827fce965d7aeea5bb8690d7093bb083c8e3915d7a600e25fc" + license "AMPAS" + revision 2 + head "https://github.com/ampas/CTL.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "dfa050e2d9a41d8d9b2bde93e1286f9a172ed202cc0d9f61fe81a33244f6af03" + sha256 cellar: :any, arm64_sequoia: "46dad0ccf20d7fcb923bc2cfff9d592d1abd347fa0a5418947f1acacc0fc1222" + sha256 cellar: :any, arm64_sonoma: "358beba8b7c3c72f2a578ecb251ad557e2e82b9bba028680dc604296f7048d4a" + sha256 cellar: :any, arm64_ventura: "2dc49c04d46726e0f208cb2fd4be22d4e1bd65eae9f33874c4aa113c54c654b7" + sha256 cellar: :any, sonoma: "2b54cfdfaa8dbbe90bce3b74e6544d991d41144878ca942d3b5b75f44dbe5e89" + sha256 cellar: :any, ventura: "8a867471142e5b9f7f14107377999df21db03c4ea8fcd06a5ff8729b97d37fec" + sha256 cellar: :any_skip_relocation, arm64_linux: "82d4fc648be73e03f07fb79130a9eeda876df66e24a80d3050d49f4cdbaa4c3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "abe0b96ef6367426b3ce5b52182f714f5f496c5d18c5a91b42e3882924d5780a" + end + + depends_on "cmake" => :build + depends_on "aces_container" + depends_on "imath" + depends_on "libtiff" + depends_on "openexr" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCTL_BUILD_TESTS=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "transforms an image", shell_output("#{bin}/ctlrender -help", 1) + end +end diff --git a/Formula/c/ctlptl.rb b/Formula/c/ctlptl.rb new file mode 100644 index 0000000000000..36741869ccbfe --- /dev/null +++ b/Formula/c/ctlptl.rb @@ -0,0 +1,38 @@ +class Ctlptl < Formula + desc "Making local Kubernetes clusters fun and easy to set up" + homepage "https://github.com/tilt-dev/ctlptl" + url "https://github.com/tilt-dev/ctlptl/archive/refs/tags/v0.8.43.tar.gz" + sha256 "4169e420f72754601c1c2748d5caf32297bf54d76f6e13fe9e6fe1eccadba2e1" + license "Apache-2.0" + head "https://github.com/tilt-dev/ctlptl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "563cd1573b10e263363451ed4eab6b7f73dfc82a8cb6a91081cbdc48caf1ce69" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84d55c589d2404f0d9bc9ef50aedcdd07e6edbdf0144ea4ec56e22eeacfc7c21" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab6561e0570beca2772f5dbb23289d8f44152314498af4df7c269af9011f52c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e645578d47b9624166d3135bea522db384ccaa1d2dc270635e476e30a2b6a9e" + sha256 cellar: :any_skip_relocation, sonoma: "60dcca8a2ebcee6a48d441fe768377f7bad5d6c17d46eae917f5b9e4106b64d0" + sha256 cellar: :any_skip_relocation, ventura: "46d19cf3ffa4b668f93eef17a2f4cf24179d08fc0a05d85fa3c9b2e907fbb095" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf1739b5baaf62399a6b4232011e76de80757143e720c14f9762be303a8c73a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adf5696d68c18d41745364a3336dc0e5ee89ffc3857c093252d9252d2bb070c1" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/ctlptl" + + generate_completions_from_executable(bin/"ctlptl", "completion") + end + + test do + assert_match "v#{version}", shell_output("#{bin}/ctlptl version") + assert_empty shell_output("#{bin}/ctlptl get") + assert_match "not found", shell_output("#{bin}/ctlptl delete cluster nonexistent 2>&1", 1) + end +end diff --git a/Formula/c/ctop.rb b/Formula/c/ctop.rb new file mode 100644 index 0000000000000..f6b5d4b058ab2 --- /dev/null +++ b/Formula/c/ctop.rb @@ -0,0 +1,38 @@ +class Ctop < Formula + desc "Top-like interface for container metrics" + homepage "https://bcicen.github.io/ctop/" + url "https://github.com/bcicen/ctop.git", + tag: "v0.7.7", + revision: "11a1cb10f416b4ca5e36c22c1acc2d11dbb24fb4" + license "MIT" + head "https://github.com/bcicen/ctop.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ddb01679cc99906cb9a7e87ce4784d8306356a4b80dbb50d2c325c7e43f893c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd09dd7c11239dd436500639b817a7c935a16033630cfc78b5f6a3acbb763089" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "217bb4ee91c955c570491fc44d7ed650854aaa3cb6e08f6269b33b1595bc36f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "010e50edd98d6e9a43e3d4351281eae20f62df79a3f9d82d4da5309e2b30b2a4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cacf1e287ff25e701de9c1472d462377e8bf90cc5733defe595b5c0f5848ab64" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ec4b96f4c4eddacb20dbb142c430ed9b8ba975519e7b383eb0613bf7f62092a0" + sha256 cellar: :any_skip_relocation, sonoma: "76890ee3cbad12abb395444caa1d5a07e684f891e282dedf568e0eac14d422f9" + sha256 cellar: :any_skip_relocation, ventura: "45a367803950a7c4953b036d94c821a08b6229585ccfabd2134b4ef500753091" + sha256 cellar: :any_skip_relocation, monterey: "523a700771377a75e6da967df31d5f878d9a8ab52ab4412e10aa294ac183074f" + sha256 cellar: :any_skip_relocation, big_sur: "6dc1e0a2f6cb7fe27e7657e3bb0ba2825e8f730f4a1da6e98273f9f88aff0b2b" + sha256 cellar: :any_skip_relocation, catalina: "0a358054ae920a6c520fbee9fc3d3d18b5a78d12aa77918240ead37aa56fae1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4a567b1feba7fa72b0a76efbef9d14c8e7de8f3e4329109fa8c0338e058251d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30607fe87d023df1ab88efe82c18af28e5276cfb8281de6b51bdedea41b5179e" + end + + depends_on "go" => :build + + def install + system "make", "build" + bin.install "ctop" + end + + test do + system bin/"ctop", "-v" + end +end diff --git a/Formula/c/ctpv.rb b/Formula/c/ctpv.rb new file mode 100644 index 0000000000000..3867f60a337e9 --- /dev/null +++ b/Formula/c/ctpv.rb @@ -0,0 +1,45 @@ +class Ctpv < Formula + desc "Image previews for lf file manager" + homepage "https://github.com/NikitaIvanovV/ctpv" + url "https://github.com/NikitaIvanovV/ctpv/archive/refs/tags/v1.1.tar.gz" + sha256 "29e458fbc822e960f052b47a1550cb149c28768615cc2dddf21facc5c86f7463" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "891ba106991bf7d6a64f1216540cb3332c5eed558e8b7c30733d1d47b766d5dc" + sha256 cellar: :any, arm64_sequoia: "37152d389946123d23de9ee5d1bcda011032a94ba42e1df5ce82363c4224ae56" + sha256 cellar: :any, arm64_sonoma: "5b92c898bfc950574c2a7b15d19dc064610d2a7df9c0825839ae83d864d49a35" + sha256 cellar: :any_skip_relocation, arm64_ventura: "07d558283ff80cd3054aee902b229c0c0b23ae63190cb2ea1d0b235e1263ec15" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5071c8b89a29f293d184780ec3214faca02fc5196329043f99a8cff76657982a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "98372ed14dc5b89f3b3e6fabdd24b51c754d081e04a5177dbf0f3fd2a8aa3eea" + sha256 cellar: :any, sonoma: "0b11166fde3dd51d0ca4419bbf8457858f139e1eeb23cdba43749b3742b71c7f" + sha256 cellar: :any_skip_relocation, ventura: "885b4e98aa3ba62f36f7924dd6a4006aaf873bed1c5aeb30fc6599413e48ca03" + sha256 cellar: :any_skip_relocation, monterey: "7749f4c22614e7fbb0724661417495a36559551debb40f76e5e85cf507d2a86b" + sha256 cellar: :any_skip_relocation, big_sur: "13ba1dd46f7dd11e21a82467ed1fd1640308482e789b8236fffe612e0f4280b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc5045108cb40264a0d6870ca7c21f4d32be00b365d47af2d659523a46406f84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8c9583347b626f784679ab68dccf83766e98d58b0fb1357a4852271f92a1161" + end + + depends_on "libmagic" + depends_on "openssl@3" + + fails_with :clang do + build 1300 + cause "Requires Clang 14 or later" + end + + def install + # Workaround for arm64 linux, issue ref: https://github.com/NikitaIvanovV/ctpv/issues/101 + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + system "make", "PREFIX=#{prefix}", "install" + end + + test do + file = test_fixtures("test.diff") + output = shell_output("#{bin}/ctpv #{file}") + assert_match shell_output("cat #{file}"), output + end +end diff --git a/Formula/c/ctrld.rb b/Formula/c/ctrld.rb new file mode 100644 index 0000000000000..d6ca2ae9d9b3a --- /dev/null +++ b/Formula/c/ctrld.rb @@ -0,0 +1,39 @@ +class Ctrld < Formula + desc "Highly configurable, multi-protocol DNS forwarding proxy" + homepage "https://github.com/Control-D-Inc/ctrld" + url "https://github.com/Control-D-Inc/ctrld/archive/refs/tags/v1.4.7.tar.gz" + sha256 "2842b983c4fa7726073596ebf2bcbeb53e1932c1c1f061e49b636cb5327d7ba4" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aa1d8f3181a7ef21c13128a232cb9a2c9db4880658b6a844b9f6533d6e82195a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aa1d8f3181a7ef21c13128a232cb9a2c9db4880658b6a844b9f6533d6e82195a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aa1d8f3181a7ef21c13128a232cb9a2c9db4880658b6a844b9f6533d6e82195a" + sha256 cellar: :any_skip_relocation, sonoma: "f73a8919ef8d3a5f6b449490e3a13c38d80aba2366c712fd10f69ff4d46fe5b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6722b92d1883ae94828b8f529f2a4ded2252c8e4af1d4646cc843ecb8e35bf91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b57fe6595f991cf2d951dcad47167e2b15928dfa4adc231014710c8dad741f8" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/Control-D-Inc/ctrld/cmd/cli.version=#{version} + -X github.com/Control-D-Inc/ctrld/cmd/cli.commit=homebrew + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/ctrld" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ctrld --version") + + output_log = testpath/"output.log" + pid = spawn bin/"ctrld", "start", [:out, :err] => output_log.to_s + sleep 3 + assert_match "Please relaunch process with admin/root privilege.", output_log.read + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/c/cuba.rb b/Formula/c/cuba.rb new file mode 100644 index 0000000000000..3311418797a60 --- /dev/null +++ b/Formula/c/cuba.rb @@ -0,0 +1,42 @@ +class Cuba < Formula + desc "Library for multidimensional numerical integration" + homepage "https://feynarts.de/cuba/" + url "https://feynarts.de/cuba/Cuba-4.2.2.tar.gz" + sha256 "8d9f532fd2b9561da2272c156ef7be5f3960953e4519c638759f1b52fe03ed52" + license "LGPL-3.0-only" + + livecheck do + url :homepage + regex(/href=.*?Cuba[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "656aad080bcb7bc9dffcda4e7f23362e1c8799a8ca39ca9543605254b33fae82" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d9f2c34f9e6c4b4e8216db0ccaea18f75b925714037f9893da4aaf54de2b785" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "126460773e9096dfca2a9f028be96d8218e7bf3e8bfddd940477763b8b04b49f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "357899b8a6077f7f5da7bf4c50b77a6947515b6a8ba1dfbe1fd8a8297795afac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8ce1fa8a1cf71b27ebeb02406214231dcafcab672b7c38bc5a664c9e2c69d424" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d8f141d10928d1ce281f6bb744886de1ba9f2274476d3b6b257bcc9d587231e3" + sha256 cellar: :any_skip_relocation, sonoma: "3e78f98e4776716cb73bfeedcd8c3d273ed3b8b4cb83afd69f73fae24c99a601" + sha256 cellar: :any_skip_relocation, ventura: "7a6e2801aa15f48ce5ef6aa1c7c2d70a0eb05d9a95d9e75ebd1982dc23345d08" + sha256 cellar: :any_skip_relocation, monterey: "238e6efde7346d58330b4ebbe562a5f52375d66bd21555867883c3fe2c0405e5" + sha256 cellar: :any_skip_relocation, big_sur: "897095ff3030916d5470e15f85ca3a0d0460416484232cc7c821dc6e98c4406d" + sha256 cellar: :any_skip_relocation, catalina: "566d4ddc7e4e3a278dceb6b83abc5ce1298b9ca715ac152695bf1e5fbb8cacc4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1ea99bdba4aae35094b0b0c80c4220f111209ed57d6ac254e68c20dfbaeb1d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6d0398225a7a9364431992f44347ee9fad5bb3a049f5ed628aabb23bd405ed7" + end + + def install + ENV.deparallelize # Makefile does not support parallel build + system "./configure", "--prefix=#{prefix}" + system "make", "install" + pkgshare.install "demo" + end + + test do + system ENV.cc, pkgshare/"demo/demo-c.c", "-o", "demo", "-L#{lib}", "-lcuba", "-lm" + system "./demo" + end +end diff --git a/Formula/c/cubeb.rb b/Formula/c/cubeb.rb new file mode 100644 index 0000000000000..4aa74c5ece428 --- /dev/null +++ b/Formula/c/cubeb.rb @@ -0,0 +1,116 @@ +class Cubeb < Formula + desc "Cross-platform audio library" + homepage "https://github.com/mozilla/cubeb" + license "ISC" + + stable do + url "https://github.com/mozilla/cubeb/archive/refs/tags/cubeb-0.2.tar.gz" + sha256 "cac10876da4fa3b3d2879e0c658d09e8a258734562198301d99c1e8228e66907" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "527ff86b71c3491f320043c8143e5c52542fc498577a31dbede4c285bb3ed639" + sha256 cellar: :any, arm64_sequoia: "82458e11a000c10cb1268c1e9118c0d0e447fc40d49bb6e0426288ea87d05e1b" + sha256 cellar: :any, arm64_sonoma: "478c0b66412477519eeb295fe7788436e843af7f98e10df61de6f8a942235772" + sha256 cellar: :any, arm64_ventura: "b16ab1b2aea0c4cec3a8015e3ead96e97c59719c655ec87d94ed5b54d81b30f8" + sha256 cellar: :any, arm64_monterey: "506fb6090f05b4275bde1aff78c0eb1bf72959fbeac5c53018c728863ef1195f" + sha256 cellar: :any, arm64_big_sur: "e56366a9d51f95c573e9bcc0a7f8985e4607cf88a9e6a87c0f2193a363c18a93" + sha256 cellar: :any, sonoma: "f209a91dc7b5b2bfbc35abce746a13a921301638b8dfa819845ca21387c4b17b" + sha256 cellar: :any, ventura: "0041ddd0e681a15e761608af2f419790b7f367629b45afd420c19ceb94f731b8" + sha256 cellar: :any, monterey: "0734f84782c17da435dc805f42c1af96506669ed1337aa8a0a20f486975d771a" + sha256 cellar: :any, big_sur: "06c2e45c008f9b2c6068c5ccb4adf3d4d7ca75e4b0b25429af1577391a6b2d8b" + sha256 cellar: :any, catalina: "98061577ff4699c6d87158764616203f1bc758a858c88683fd7f7f10f90e74b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "77b3bb04b39d06f00b3e2fc82d5cb29b4d4d370655fda6e9d1654841b429024f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d67a504265f1431f6a44b2d28d235ce3f565e4872bed9e2e26ef6d7ee9b6e41" + end + + head do + url "https://github.com/mozilla/cubeb.git", branch: "master" + + depends_on "cmake" => :build + end + + depends_on "pkgconf" => :build + + on_linux do + depends_on "pulseaudio" + end + + def install + if build.head? + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DBUILD_TESTS=OFF", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + else + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + #define TEST(test, msg) \ + if ((test)) { \ + printf("PASS: %s\\n", msg); \ + } else { \ + printf("FAIL: %s\\n", msg); \ + goto end; \ + } + + /* Dummy callbacks to use for audio stream test */ + static long data_callback(cubeb_stream *stream, void *user, void *buffer, + long nframes) { + return nframes; + } + static void state_callback(cubeb_stream *stream, void *user_ptr, + cubeb_state state) {} + + int main() { + int ret; + cubeb *ctx; + char const *backend_id; + cubeb_stream *stream; + cubeb_stream_params params; + + /* Verify that the library initialises itself successfully */ + ret = cubeb_init(&ctx, "test_context"); + TEST(ret == CUBEB_OK, "initialise cubeb context"); + + /* Verify backend id can be retrieved */ + backend_id = cubeb_get_backend_id(ctx); + TEST(backend_id != NULL, "retrieve backend id"); + + /* Verify that an audio stream gets opened successfully */ + params.format = CUBEB_SAMPLE_S16LE; /* use commonly supported */ + params.rate = 48000; /* parameters, so that the test */ + params.channels = 1; /* doesn't give a false fail */ + ret = cubeb_stream_init(ctx, &stream, "test_stream", params, 100, + data_callback, state_callback, NULL); + TEST(ret == CUBEB_OK, "initialise stream"); + + end: + /* Cleanup and return */ + cubeb_stream_destroy(stream); + cubeb_destroy(ctx); + return 0; + } + C + system ENV.cc, "-o", "test", "#{testpath}/test.c", "-L#{lib}", "-lcubeb" + refute_match(/FAIL:.*/, shell_output("#{testpath}/test"), + "Basic sanity test failed.") + end +end diff --git a/Formula/c/cubejs-cli.rb b/Formula/c/cubejs-cli.rb new file mode 100644 index 0000000000000..0dd1f69a320e5 --- /dev/null +++ b/Formula/c/cubejs-cli.rb @@ -0,0 +1,30 @@ +class CubejsCli < Formula + desc "Cube.js command-line interface" + homepage "https://cube.dev/" + url "https://registry.npmjs.org/cubejs-cli/-/cubejs-cli-1.5.1.tgz" + sha256 "cc7b1817e0694cb87b7d1a0b2d8536dac52535c17ca71f01a448992985b121c5" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "33d6ea80c7761744cf1b6acb232c16252c7fffa8ab0f400844e366a0c46603e6" + sha256 cellar: :any, arm64_sequoia: "a5642d55fd2036d7337cae80f101aa5a3b98cc4014457dc5977bb0535e0c1f54" + sha256 cellar: :any, arm64_sonoma: "a5642d55fd2036d7337cae80f101aa5a3b98cc4014457dc5977bb0535e0c1f54" + sha256 cellar: :any, sonoma: "0a3b223e741dc8580d73c750ce63ed4ae9af340d48682a2a65aa3e1ab05ad1f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "869caa00d38151d120b6cf439cde00e9c4bfc219a90a5a7f58377dc022c4b37e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d98666fe3305db50a538fb929a98cc854cb0ae9ea82e99e030b07f00e676865" + end + + depends_on "node" + uses_from_macos "zlib" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/cubejs --version") + system bin/"cubejs", "create", "hello-world", "-d", "postgres" + assert_path_exists testpath/"hello-world/model/cubes/orders.yml" + end +end diff --git a/Formula/c/cubelib.rb b/Formula/c/cubelib.rb new file mode 100644 index 0000000000000..295578c445e7f --- /dev/null +++ b/Formula/c/cubelib.rb @@ -0,0 +1,61 @@ +class Cubelib < Formula + desc "Performance report explorer for Scalasca and Score-P" + homepage "https://scalasca.org/software/cube-4.x/download.html" + url "https://apps.fz-juelich.de/scalasca/releases/cube/4.9/dist/cubelib-4.9.tar.gz" + sha256 "a0658f5bf3f74bf7dcf465ab6e30476751ad07eb93618801bdcf190ba3029443" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?cubelib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "57795d60a4a4a37d27de29d8acd7470440e41227ea33692fc211b5526b7d91c0" + sha256 arm64_sequoia: "066378b05ed9eb15c6bbf9202e641a932e72e5c4e24ed5071a8df8b95f36fbe3" + sha256 arm64_sonoma: "0e1252ac62492b97973bbd9194104d68094c7b0c2fe66238a009e7883b027ad1" + sha256 arm64_ventura: "6db4378728b7fef0376f751dff698b109b1690cbbd8847ca2ed9d4dc5708c2c2" + sha256 sonoma: "3b34171b089bddc118864151d5f16a6f9fd7ecf2061530b43a5f3d2f92ac9bd5" + sha256 ventura: "6e8cee9a4b318d0bf9846d6ee66d82550f33188ea584415fc74f548a4ff0dee3" + sha256 arm64_linux: "680d72e8b1a84ed6e454e16a859fcc5be4438e265ed62637b8ad0e6c57117999" + sha256 x86_64_linux: "f23523ee48a74275d61f881645e96f3a1f37f18a8ca70570e2a915a62930f2dc" + end + + depends_on "pkgconf" => :build + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + directory "build-frontend" + end + + def install + ENV.deparallelize + + args = %w[--disable-silent-rules] + if ENV.compiler == :clang + args << "--with-nocross-compiler-suite=clang" + args << "CXXFLAGS=-stdlib=libc++" + args << "LDFLAGS=-stdlib=libc++" + end + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + inreplace pkgshare/"cubelib.summary", "#{Superenv.shims_path}/", "" + end + + test do + cp_r "#{share}/doc/cubelib/example/", testpath + chdir "#{testpath}/example" do + # build and run tests + system "make", "-f", "Makefile.frontend", "all" + system "make", "-f", "Makefile.frontend", "run" + end + end +end diff --git a/Formula/c/cucumber-cpp.rb b/Formula/c/cucumber-cpp.rb new file mode 100644 index 0000000000000..a17f8fb22eadf --- /dev/null +++ b/Formula/c/cucumber-cpp.rb @@ -0,0 +1,103 @@ +class CucumberCpp < Formula + desc "Support for writing Cucumber step definitions in C++" + homepage "https://cucumber.io" + url "https://github.com/cucumber/cucumber-cpp.git", + tag: "v0.7.0", + revision: "ceb025fb720f59b3c8d98ab0de02925e7eab225c" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "a84c27a7c5c122364e12ee74e3140a6ccd22656fc6df6da1cf8dc29b3161cf3b" + sha256 cellar: :any, arm64_sequoia: "35387bbcd3b131388528b44ac54f5d695d1fbc9c927d3b172d4793cba0c0ebb0" + sha256 cellar: :any, arm64_sonoma: "ff5c68f821cd56afe208298382d865e998f272cf64e8c9810a6154d570317176" + sha256 cellar: :any, sonoma: "9bf81577eead937163e41fcfa5c32bc9d913bca9364a3d5da546cef5a7fd3252" + sha256 cellar: :any_skip_relocation, arm64_linux: "29733451777a0846cf111ee7f5c165009c1a7ae22543252252282006a997b046" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4aced1fbb5e0c5eefff25bd4a29efdd7a719e1d14e68f915e89d1c04eef0659e" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "ruby" => :test + depends_on "asio" + depends_on "tclap" + + # Backport support for Asio 1.33+ + patch do + url "https://github.com/cucumber/cucumber-cpp/commit/da6345bd1d0b0ac4cf4bc71866c98d55c72522a8.patch?full_index=1" + sha256 "1ad7f6513ee2d41c5625933b05249704c14484a7029acd330c5f665a11e6a66f" + end + + def install + # TODO: Remove Cuke args on next release as they are the defaults + args = %w[ + -DCUKE_ENABLE_BOOST_TEST=OFF + -DCUKE_ENABLE_GTEST=OFF + -DCUKE_ENABLE_QT=OFF + -DCUKE_TESTS_UNIT=OFF + -DBUILD_SHARED_LIBS=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + doc.install "examples" + end + + test do + ENV.prepend_path "PATH", Formula["ruby"].opt_bin + ENV["GEM_HOME"] = testpath + ENV["BUNDLE_PATH"] = testpath + + system "gem", "install", "cucumber:9.2.1", "cucumber-wire:7.0.0", "--no-document" + + (testpath/"features/test.feature").write <<~CUCUMBER + Feature: Test + Scenario: Just for test + Given A given statement + When A when statement + Then A then statement + CUCUMBER + (testpath/"features/step_definitions/cucumber.wire").write <<~EOS + host: localhost + port: 3902 + EOS + (testpath/"features/support/wire.rb").write <<~RUBY + require 'cucumber/wire' + RUBY + (testpath/"test.cpp").write <<~CPP + #include + GIVEN("^A given statement$") { + } + WHEN("^A when statement$") { + } + THEN("^A then statement$") { + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lcucumber-cpp", "-pthread" + + begin + pid = spawn "./test" + sleep 1 + expected = <<~EOS + Feature: Test + + Scenario: Just for test + Given A given statement + When A when statement + Then A then statement + + 1 scenario (1 passed) + 3 steps (3 passed) + EOS + assert_match expected, shell_output("#{testpath}/bin/cucumber --quiet") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/c/cucumber-ruby.rb b/Formula/c/cucumber-ruby.rb new file mode 100644 index 0000000000000..cd463f3cf43d3 --- /dev/null +++ b/Formula/c/cucumber-ruby.rb @@ -0,0 +1,133 @@ +class CucumberRuby < Formula + desc "Cucumber for Ruby" + homepage "https://cucumber.io" + url "https://github.com/cucumber/cucumber-ruby/archive/refs/tags/v10.1.1.tar.gz" + sha256 "fa45ef239cce94bf1d2455b9afa557833adfe14b0d056fff51211a0a1959c591" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "2aceddfdb79578d359d8320eb3bab1f04511e459813a1b28e6767a2397e7b39f" + sha256 cellar: :any, arm64_sequoia: "3d7a5f633260a999fcab1857900c37aec93373689b9869e8484b56187fed0ef7" + sha256 cellar: :any, arm64_sonoma: "1e822c38dad4670a97ffd0456ded75deab670b99682c2c0a010c617844983ac8" + sha256 cellar: :any, sonoma: "adde4676146e2264f613be3bc430b107ab6b5c2e73b0adcea03656a75e6f5844" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fa4dacc7b0986a30b77f0dc46969f7fc9b728ca5892d1601f4619c6e5ff5716" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19b6e962a229393ad00ce81d9847c2a5b125d6d5a6c3d49dda39afecbffa48e8" + end + + depends_on "pkgconf" => :build + depends_on "ruby" + + uses_from_macos "libffi" + + # Runtime dependencies of cucumber + # List with `gem install --explain cucumber` + # https://rubygems.org/gems/cucumber/versions/10.0.0/dependencies + + resource "memoist3" do + url "https://rubygems.org/downloads/memoist3-1.0.0.gem" + sha256 "686e42402cf150a362050c23143dc57b0ef88f8c344943ff8b7845792b50d56f" + end + + resource "ffi" do + url "https://rubygems.org/gems/ffi-1.17.2.gem" + sha256 "297235842e5947cc3036ebe64077584bff583cd7a4e94e9a02fdec399ef46da6" + end + + resource "sys-uname" do + url "https://rubygems.org/gems/sys-uname-1.4.1.gem" + sha256 "ed2278ec670ee8af5eb5420d3a98e22188051f6241180db7c779993db2739a16" + end + + resource "multi_test" do + url "https://rubygems.org/gems/multi_test-1.1.0.gem" + sha256 "e9e550cdd863fb72becfe344aefdcd4cbd26ebf307847f4a6c039a4082324d10" + end + + resource "mini_mime" do + url "https://rubygems.org/gems/mini_mime-1.1.5.gem" + sha256 "8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef" + end + + resource "logger" do + url "https://rubygems.org/gems/logger-1.7.0.gem" + sha256 "196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203" + end + + resource "diff-lcs" do + url "https://rubygems.org/gems/diff-lcs-1.6.2.gem" + sha256 "9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962" + end + + resource "cucumber-messages" do + url "https://rubygems.org/gems/cucumber-messages-27.2.0.gem" + sha256 "46e2a1454620db3d0811ad990b9a96cd47bfdb5e2ad4f2ae0b41822332979fff" + end + + resource "cucumber-html-formatter" do + url "https://rubygems.org/gems/cucumber-html-formatter-21.15.1.gem" + sha256 "a08d7c30c357bfd4ea746312ed36e75dab5ba069e5ebc364ecfd5508540920e0" + end + + resource "bigdecimal" do + url "https://rubygems.org/gems/bigdecimal-3.3.0.gem" + sha256 "e116f692049da02a180f7b1d49859e828eb3a70d01e2efd8f78fb675738554f5" + end + + resource "cucumber-cucumber-expressions" do + url "https://rubygems.org/gems/cucumber-cucumber-expressions-18.0.1.gem" + sha256 "8398a0bf636af33ff3b61e459a309295eb02745b9e21bd7af0eaaa2a1e6be3e5" + end + + resource "cucumber-tag-expressions" do + url "https://rubygems.org/gems/cucumber-tag-expressions-6.1.2.gem" + sha256 "f790e4e820b80d453e83c6a462ed6de36b9477b046543322f646c1e8c275916d" + end + + resource "cucumber-gherkin" do + url "https://rubygems.org/gems/cucumber-gherkin-32.2.0.gem" + sha256 "a33699d3be9c7fe1b6d4a26c1aa18150f274a90c871a6bc1811d5795a52e4ad6" + end + + resource "cucumber-core" do + url "https://rubygems.org/gems/cucumber-core-15.2.1.gem" + sha256 "636a329f877c7ba478b5d9090f810c1b21796f9b601fa33532133ad1910b8588" + end + + resource "cucumber-ci-environment" do + url "https://rubygems.org/gems/cucumber-ci-environment-10.0.1.gem" + sha256 "bb6e3fcec85c981dff4561997e8675a7123eead5fe9e587d2ad7568adbe18631" + end + + resource "builder" do + url "https://rubygems.org/gems/builder-3.3.0.gem" + sha256 "497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f" + end + + resource "base64" do + url "https://rubygems.org/gems/base64-0.3.0.gem" + sha256 "27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + system "gem", "build", "cucumber.gemspec" + system "gem", "install", "--ignore-dependencies", "cucumber-#{version}.gem" + bin.install libexec/"bin/cucumber" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + assert_match(/creating\s+features/, shell_output("#{bin}/cucumber --init")) + assert_path_exists testpath/"features" + end +end diff --git a/Formula/c/cue.rb b/Formula/c/cue.rb new file mode 100644 index 0000000000000..fad3842ad7a28 --- /dev/null +++ b/Formula/c/cue.rb @@ -0,0 +1,50 @@ +class Cue < Formula + desc "Validate and define text-based and dynamic configuration" + homepage "https://cuelang.org/" + url "https://github.com/cue-lang/cue/archive/refs/tags/v0.14.2.tar.gz" + sha256 "adf74a28a010456a50941a556011aed5ad9063d5685bd43183ca278e66acb65e" + license "Apache-2.0" + head "https://github.com/cue-lang/cue.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6205930c02a1ce05f3e717c949095995b9b0270bb88fd4242c859f014caae015" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6205930c02a1ce05f3e717c949095995b9b0270bb88fd4242c859f014caae015" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6205930c02a1ce05f3e717c949095995b9b0270bb88fd4242c859f014caae015" + sha256 cellar: :any_skip_relocation, sonoma: "0a7e4becd18d7d9bfa6675746a5fba7d82c328d0c06771633041e5f4aec9d0fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "05042470c80912f63cf48a9082675f1cb36ca838d32f4196ad7c5d0bc4ce2dcf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfe4c9314cf82f87861849389b2a2cc6866611f26fc267e447bc792c0c29d3b9" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X cuelang.org/go/cmd/cue/cmd.version=v#{version}"), "./cmd/cue" + + generate_completions_from_executable(bin/"cue", "completion") + end + + test do + (testpath/"ranges.yml").write <<~YAML + min: 5 + max: 10 + --- + min: 10 + max: 5 + YAML + + (testpath/"check.cue").write <<~CUE + min?: *0 | number // 0 if undefined + max?: number & >min // must be strictly greater than min if defined. + CUE + + expected = <<~EOS + max: invalid value 5 (out of bound >10): + ./check.cue:2:16 + ./ranges.yml:5:6 + EOS + + assert_equal expected, shell_output("#{bin}/cue vet ranges.yml check.cue 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/cue version") + end +end diff --git a/Formula/c/cuetools.rb b/Formula/c/cuetools.rb new file mode 100644 index 0000000000000..16aa81ec5518f --- /dev/null +++ b/Formula/c/cuetools.rb @@ -0,0 +1,65 @@ +class Cuetools < Formula + desc "Utilities for .cue and .toc files" + homepage "https://github.com/svend/cuetools" + url "https://github.com/svend/cuetools/archive/refs/tags/1.4.1.tar.gz" + sha256 "24a2420f100c69a6539a9feeb4130d19532f9f8a0428a8b9b289c6da761eb107" + license "GPL-2.0-only" + head "https://github.com/svend/cuetools.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "608a2dff1244ef93b65739924ea96977afc75052374eb4da5fbb261b48f29413" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c25785b0909d4b8ecee88b331ae515e491427126db45af75fbbcc1e94bd287a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d73bc896a9509dae8389723d55e686f56d361f361ce19913092d7e3c294acdd1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66cbde230df93cb4cd662c02ff028989e141f6c2cf0e50769a60c4c3bac95c48" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6b8f56e6ee35c74523629176408833a619c16aba5b81ab260222ed1682f7f938" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d6065775e7e6286464caa093613104c747720e1b9ea98f29f71abea5a365ac05" + sha256 cellar: :any_skip_relocation, sonoma: "d081a481b29edd36ca8444f1f5a959f825b15326713f4f44445cc203c43726a5" + sha256 cellar: :any_skip_relocation, ventura: "812f65a66d659a29eae61ad58c82c9ab2f993fd1ae26b8ec5f6577e07d5983f5" + sha256 cellar: :any_skip_relocation, monterey: "65929af8ca94c0c28f16886667d1869924da3bb193ed10797af30f0e43de1744" + sha256 cellar: :any_skip_relocation, big_sur: "f649575d3661f08e573a8e72aa3e45580ed8f75f89fbe2409b2684732ab0f0a3" + sha256 cellar: :any_skip_relocation, catalina: "dc2d7bfcb8fd048421265da986fdb381007d64c7d2a45d45a53b896bad78bf18" + sha256 cellar: :any_skip_relocation, arm64_linux: "333e324eaa7d67aaacbc2eaad315abc19fdc6fe52dd20220cb7fef4f0b73859d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45fd4566e2ce0650ad162fb32f3a12f30523efeded3f6d30612cdd8efca73ffc" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + # see https://github.com/svend/cuetools/pull/18 + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cue").write <<~CUE + FILE "sampleimage.bin" BINARY + TRACK 01 MODE1/2352 + INDEX 01 00:00:00 + CUE + system bin/"cueconvert", testpath/"test.cue", testpath/"test.toc" + assert_path_exists testpath/"test.toc" + end +end + +__END__ +diff --git a/configure.ac b/configure.ac +index f54bb92..84ab467 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,5 +1,5 @@ + AC_INIT([cuetools], [1.4.0], [svend@ciffer.net]) +-AM_INIT_AUTOMAKE([-Wall -Werror foreign]) ++AM_INIT_AUTOMAKE([-Wall -Werror -Wno-extra-portability foreign]) + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_RANLIB diff --git a/Formula/c/cunit.rb b/Formula/c/cunit.rb new file mode 100644 index 0000000000000..b288b0a2fdb97 --- /dev/null +++ b/Formula/c/cunit.rb @@ -0,0 +1,70 @@ +class Cunit < Formula + desc "Lightweight unit testing framework for C" + homepage "https://cunit.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2" + sha256 "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214" + license "LGPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "79ec3ecdcc6e1f8b253b5093c45c25a272005796cebb0ca2c7cfb6f8d21d0d90" + sha256 cellar: :any, arm64_sequoia: "ed2227559e5ab1d8239ee28d11b8728832ac2301041631b31702a12be8f0d3fe" + sha256 cellar: :any, arm64_sonoma: "92297087d6f77632f4db7fb8c436ba6f70c9da28fdc11e56cb975a86ea27cc90" + sha256 cellar: :any, arm64_ventura: "346705eb07dd79665dba7f918a7c33af02a2dbacb975d5c99c0d7f45afb1ecaa" + sha256 cellar: :any, arm64_monterey: "fd5bba3a249137e905676e8a80118c9aaaa8f2795ab0d7fab44407d8fe75e07f" + sha256 cellar: :any, arm64_big_sur: "699850740de719430e01f95dcd1391d00d67f3b8e4a29201bdfc73cab9d2d04a" + sha256 cellar: :any, sonoma: "2b467d2ee01bc6ac502daa3dda52f38483699972d8171e49b85083d6c2c7812e" + sha256 cellar: :any, ventura: "1091cec262b92bf2b8ce1b1e579afd1841ab3edbc9151fefb733a4707cd69b6c" + sha256 cellar: :any, monterey: "ffad854086ea13dde40c23736591da90c3d66ef95677e14d90f2c49891f1302a" + sha256 cellar: :any, big_sur: "2d5e3e62c0d0cd5cbf119d93249ca2ab671bebf53c77947d5c59daaad55aefed" + sha256 cellar: :any, catalina: "5a03cc656131d1bcde14ec200be947c5b3caee6f5138e426b2b27b0286c59ee7" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ccc99f7c608efe03b30e0e008a0cfcac24582f6189157a155e1cb6fe7901ed4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0cf6507f41f3b367c36329688073277d4db50e61b048e39360f1e58cf2482e6" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + inreplace "bootstrap", "libtoolize", "glibtoolize" + system "sh", "bootstrap", prefix + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "CUnit/Basic.h" + + int noop(void) { return 0; } + + void test42(void) { CU_ASSERT(42 == 42); } + + int main(void) + { + CU_pSuite pSuite = NULL; + if (CUE_SUCCESS != CU_initialize_registry()) + return CU_get_error(); + pSuite = CU_add_suite("Suite_1", noop, noop); + if (NULL == pSuite) { + CU_cleanup_registry(); + return CU_get_error(); + } + if (NULL == CU_add_test(pSuite, "test of 42", test42)) { + CU_cleanup_registry(); + return CU_get_error(); + } + CU_basic_set_mode(CU_BRM_VERBOSE); + CU_basic_run_tests(); + CU_cleanup_registry(); + return CU_get_error(); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lcunit", "-o", "test" + assert_match "test of 42 ...passed", shell_output("./test") + end +end diff --git a/Formula/c/cups.rb b/Formula/c/cups.rb new file mode 100644 index 0000000000000..dbd7b5b6cb21c --- /dev/null +++ b/Formula/c/cups.rb @@ -0,0 +1,56 @@ +class Cups < Formula + desc "Common UNIX Printing System" + homepage "https://github.com/OpenPrinting/cups" + # This is the author's fork of CUPS. Debian have switched to this fork: + # https://lists.debian.org/debian-printing/2020/12/msg00006.html + url "https://github.com/OpenPrinting/cups/releases/download/v2.4.14/cups-2.4.14-source.tar.gz" + sha256 "660288020dd6f79caf799811c4c1a3207a48689899ac2093959d70a3bdcb7699" + license "Apache-2.0" + head "https://github.com/OpenPrinting/cups.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(\d+(?:\.\d+)+(?:op\d*)?)$/i) + end + + bottle do + sha256 arm64_tahoe: "82a53180db14fe9e4d21d0a1786c75c5bb065dd60dc6393c7f69a64b024cddb7" + sha256 arm64_sequoia: "70ee985cb5ece4650a0ae16a9d692317f169432bf1d69d2bc136d4cc9a5ce8b0" + sha256 arm64_sonoma: "911492a3ff757deb8a13cf83c58405407c814007d54e8d5713ff9332a7873dc7" + sha256 arm64_ventura: "e44a25e754a0773c56fa56016b7bee4ae69e09f9d5c14888311aaa89947d8de2" + sha256 sonoma: "7ed7bab4ea5f5205214298ad2b2552b5b34ac633c319a08b6bb9a7a37bce066b" + sha256 ventura: "b73cb43b4abe94d517d0015151eae6a43b86be634b754cdbb81b4e8b617caa85" + sha256 arm64_linux: "42760db0b5250393a5e633f3c3056e30e5179b94217c656bcfe36cf1a1ea053a" + sha256 x86_64_linux: "a648e8c6b2a9b0637ebb075a772614a7f242b7a7ae1cf77e64315000030a1948" + end + + keg_only :provided_by_macos + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "krb5" + uses_from_macos "zlib" + + def install + system "./configure", "--with-components=core", + "--with-tls=openssl", + "--without-bundledir", + *std_configure_args + system "make", "install" + end + + test do + port = free_port.to_s + pid = spawn "#{bin}/ippeveprinter", "-p", port, "Homebrew Test Printer" + + begin + sleep 2 + sleep 2 if OS.mac? && Hardware::CPU.intel? + assert_match("Homebrew Test Printer", shell_output("curl localhost:#{port}")) + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/c/curl.rb b/Formula/c/curl.rb new file mode 100644 index 0000000000000..59e5aa0b7fc35 --- /dev/null +++ b/Formula/c/curl.rb @@ -0,0 +1,136 @@ +class Curl < Formula + desc "Get a file from an HTTP, HTTPS or FTP server" + homepage "https://curl.se" + # Don't forget to update both instances of the version in the GitHub mirror URL. + url "https://curl.se/download/curl-8.16.0.tar.bz2" + mirror "https://github.com/curl/curl/releases/download/curl-8_16_0/curl-8.16.0.tar.bz2" + mirror "http://fresh-center.net/linux/www/curl-8.16.0.tar.bz2" + mirror "http://fresh-center.net/linux/www/legacy/curl-8.16.0.tar.bz2" + sha256 "9459180ab4933b30d0778ddd71c91fe2911fab731c46e59b3f4c8385b1596c91" + license "curl" + + livecheck do + url "https://curl.se/download/" + regex(/href=.*?curl[._-]v?(.*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4e07029f638dd578dd22d267eb829966b391f8f844e94e0cad1c951b77bf2f9c" + sha256 cellar: :any, arm64_sequoia: "75474687cf0837b5658d6f4af211cf8d83403d1106845947850426b11dc0651c" + sha256 cellar: :any, arm64_sonoma: "6c417ac2b92ff32b75cfdfa74e7561a351e3a98a59bd1950b6381bdfcffa061d" + sha256 cellar: :any, arm64_ventura: "dc3a619c320850493cddb46e43449297a8a149e993be40a834dd463fe8584804" + sha256 cellar: :any, sonoma: "8d206c6b15c5fa824dcaceaf8719fd6c15300ad5f43e552c5435342d3409ab82" + sha256 cellar: :any, ventura: "913e149f132fe197528674c605122b65aded074f234679685865f581f6ace84c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d946b8686c1043e3400bebb75abeb597f02be8ecf76d103f8563dae2f418a2a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1ecafe13b24606512adb4c2fa189f1bddfcefa8ad160e360eb3e4ad5419d6dc" + end + + head do + url "https://github.com/curl/curl.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + keg_only :provided_by_macos + + depends_on "pkgconf" => [:build, :test] + depends_on "brotli" + depends_on "libnghttp2" + depends_on "libnghttp3" + depends_on "libngtcp2" + depends_on "libssh2" + depends_on "openssl@3" + depends_on "rtmpdump" + depends_on "zstd" + + uses_from_macos "krb5" + uses_from_macos "openldap" + uses_from_macos "zlib" + + on_system :linux, macos: :monterey_or_older do + depends_on "libidn2" + end + + def install + tag_name = "curl-#{version.to_s.tr(".", "_")}" + if build.stable? && stable.mirrors.grep(%r{\Ahttps?://(www\.)?github\.com/}).first.exclude?(tag_name) + odie "Tag name #{tag_name} is not found in the GitHub mirror URL! " \ + "Please make sure the URL is correct." + end + + # Use our `curl` formula with `wcurl` + inreplace "scripts/wcurl", 'CMD="curl "', "CMD=\"#{opt_bin}/curl \"" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + args = %W[ + --disable-silent-rules + --with-ssl=#{Formula["openssl@3"].opt_prefix} + --without-ca-bundle + --without-ca-path + --with-ca-fallback + --with-default-ssl-backend=openssl + --with-librtmp + --with-libssh2 + --with-nghttp3 + --with-ngtcp2 + --without-libpsl + --with-zsh-functions-dir=#{zsh_completion} + --with-fish-functions-dir=#{fish_completion} + ] + + args << if OS.mac? + "--with-gssapi" + else + "--with-gssapi=#{Formula["krb5"].opt_prefix}" + end + + args += if OS.mac? && MacOS.version >= :ventura + %w[ + --with-apple-idn + --without-libidn2 + ] + else + %w[ + --without-apple-idn + --with-libidn2 + ] + end + + system "./configure", *args, *std_configure_args + system "make", "install" + system "make", "install", "-C", "scripts" + libexec.install "scripts/mk-ca-bundle.pl" + end + + test do + # Fetch the curl tarball and see that the checksum matches. + # This requires a network connection, but so does Homebrew in general. + filename = testpath/"test.tar.gz" + system bin/"curl", "-L", stable.url, "-o", filename + filename.verify_checksum stable.checksum + + # Verify QUIC and HTTP3 support + system bin/"curl", "--verbose", "--http3-only", "--head", "https://cloudflare-quic.com" + + # Check dependencies linked correctly + curl_features = shell_output("#{bin}/curl-config --features").split("\n") + %w[brotli GSS-API HTTP2 HTTP3 IDN libz SSL zstd].each do |feature| + assert_includes curl_features, feature + end + curl_protocols = shell_output("#{bin}/curl-config --protocols").split("\n") + %w[LDAPS RTMP SCP SFTP].each do |protocol| + assert_includes curl_protocols, protocol + end + + system libexec/"mk-ca-bundle.pl", "test.pem" + assert_path_exists testpath/"test.pem" + assert_path_exists testpath/"certdata.txt" + + with_env(PKG_CONFIG_PATH: lib/"pkgconfig") do + system "pkgconf", "--cflags", "libcurl" + end + end +end diff --git a/Formula/c/curlcpp.rb b/Formula/c/curlcpp.rb new file mode 100644 index 0000000000000..c6fdcb0a6be31 --- /dev/null +++ b/Formula/c/curlcpp.rb @@ -0,0 +1,86 @@ +class Curlcpp < Formula + desc "Object oriented C++ wrapper for CURL (libcurl)" + homepage "https://josephp91.github.io/curlcpp" + url "https://github.com/JosephP91/curlcpp/archive/refs/tags/3.1.tar.gz" + sha256 "ba7aeed9fde9e5081936fbe08f7a584e452f9ac1199e5fabffbb3cfc95e85f4b" + license "MIT" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fe8f2d32c516113abdc6caa797a8d42f11ca2aa9fbb618043ec76cbbab0749a1" + sha256 cellar: :any, arm64_sequoia: "c436767f9b31dfaf4bcb0b173c8a05c338954f2cfe310cc6a5a4b0abd07f19e1" + sha256 cellar: :any, arm64_sonoma: "cf6ac3204eff880beee1d8e79aad0fcff5df2a9a9c7599b969a313892ea0d579" + sha256 cellar: :any, arm64_ventura: "fc4bb565327be35db477f5c94e99ac541107af06b9139a42484aba7f631c00b2" + sha256 cellar: :any, sonoma: "38e40220123c5b9ffde970e0ba30d802b54caef5782019935677f597829ec37a" + sha256 cellar: :any, ventura: "5676d84a6ce7dc9f2a65f19cb8752ca24f5f974c27d315e421b7ca1e82bdcdbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "15859545f41a80de5e299a010837b61f5c9b6cd77f9433ab595061009f932737" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7b8f28ef1d8782146a24e1687c1044b5f10149c721b098bf4514f8186b9649d" + end + + depends_on "cmake" => :build + + uses_from_macos "curl" + + # remove use of CURLOPT_CLOSEPOLICY (removed since curl 8.10+), upstream pr ref, https://github.com/JosephP91/curlcpp/pull/159 + patch do + on_linux do + url "https://github.com/JosephP91/curlcpp/commit/bc3800510f30ed74c90227b166d134cd13fd63cf.patch?full_index=1" + sha256 "0954b32d0304ad9b4acecf3f647242b2c5736f4c6576a390e665e57883dcf10f" + end + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=SHARED", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + #include "curlcpp/curl_easy.h" + #include "curlcpp/curl_form.h" + #include "curlcpp/curl_ios.h" + #include "curlcpp/curl_exception.h" + + using std::cout; + using std::endl; + using std::ostringstream; + + using curl::curl_easy; + using curl::curl_ios; + using curl::curl_easy_exception; + using curl::curlcpp_traceback; + + int main() { + // Create a stringstream object + ostringstream str; + // Create a curl_ios object, passing the stream object. + curl_ios writer(str); + + // Pass the writer to the easy constructor and watch the content returned in that variable! + curl_easy easy(writer); + easy.add("https://google.com"); + easy.add(1L); + + try { + easy.perform(); + } catch (curl_easy_exception &error) { + // If you want to print the last error. + std::cerr< :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "glib" + depends_on "libfuse@2" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + ENV.append "CPPFLAGS", "-D__off_t=off_t" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/c/curlie.rb b/Formula/c/curlie.rb new file mode 100644 index 0000000000000..ba777f2551b4e --- /dev/null +++ b/Formula/c/curlie.rb @@ -0,0 +1,31 @@ +class Curlie < Formula + desc "Power of curl, ease of use of httpie" + homepage "https://rs.github.io/curlie/" + url "https://github.com/rs/curlie/archive/refs/tags/v1.8.2.tar.gz" + sha256 "846ca3c5f2cca60c15eaef24949cf49607f09bdd68cbe9d81a2a026e434fa715" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0e6a403c17aeeb561d9109f7219acbfb130d19516330eb7c91981d2cd8f5aa4a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "63443e27253ec013a3bb25c18a4c1f0da439ce63cf484e5dd18fdc5e56be082f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63443e27253ec013a3bb25c18a4c1f0da439ce63cf484e5dd18fdc5e56be082f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "63443e27253ec013a3bb25c18a4c1f0da439ce63cf484e5dd18fdc5e56be082f" + sha256 cellar: :any_skip_relocation, sonoma: "0989be89b84c97a2e8b9e1efcf124844728919f3ff7b9aab9bb3d832f042358e" + sha256 cellar: :any_skip_relocation, ventura: "0989be89b84c97a2e8b9e1efcf124844728919f3ff7b9aab9bb3d832f042358e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9cbe19380adf9f5226a886617ebaddb6fda4fb1fb1a130851a128f88f46011b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8923e92fa583529ba8dcbdea7eacda66601bece881eeb33217787198a3434dad" + end + + depends_on "go" => :build + + uses_from_macos "curl" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "httpbin.org", + shell_output("#{bin}/curlie -X GET httpbin.org/headers 2>&1") + end +end diff --git a/Formula/c/curlpp.rb b/Formula/c/curlpp.rb new file mode 100644 index 0000000000000..002f12e08f999 --- /dev/null +++ b/Formula/c/curlpp.rb @@ -0,0 +1,71 @@ +class Curlpp < Formula + desc "C++ wrapper for libcURL" + homepage "https://www.curlpp.org/" + url "https://github.com/jpbarrette/curlpp/archive/refs/tags/v0.8.1.tar.gz" + sha256 "97e3819bdcffc3e4047b6ac57ca14e04af85380bd93afe314bee9dd5c7f46a0a" + license "MIT" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9a08aba8e10cfb6a543680b097a11d64a4422b7123058bcf8736e71ce334440b" + sha256 cellar: :any, arm64_sequoia: "52b67581206f16051deeb149813b5353107b51044d7d43946426f5d299ef4343" + sha256 cellar: :any, arm64_sonoma: "ffb42c2d6ac1204ba4179cea16388cf29cac5fd50d6dd610fefaba45aa64fd3a" + sha256 cellar: :any, arm64_ventura: "c9053e831abf0b1097eddc879ca50933409a7a1bd5cbcff29a2f7db8a2e4b327" + sha256 cellar: :any, sonoma: "5a84433043f3cd206ad6d9e772b8434cb8b297cbfc880640e374f9740cec45e4" + sha256 cellar: :any, ventura: "4f3de6c2c0b73744aa28d4a1744f7dc79a7155b32e39c7fce99f49e9dc9131ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "373f4b8a4898d60713521a626ebe7133cfeb40680ad167ddf8b4624f4483b925" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9983e70bd0a3e56372fd7f83bd535e33840b5169bfd104f44f0b29f0f97d92d1" + end + + depends_on "cmake" => :build + + uses_from_macos "curl" + + patch do + # build patch for curl 8.10+ + on_linux do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/curlpp/curl-8.10.patch" + sha256 "77212f725bc4916432bff3cd6ecf009e6a24dcec31048a9311b02af8c9b7b338" + end + end + + def install + ENV.cxx11 + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + inreplace bin/"curlpp-config", Superenv.shims_path/ENV.cc, ENV.cc + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() { + try { + curlpp::Cleanup myCleanup; + curlpp::Easy myHandle; + myHandle.setOpt(new curlpp::options::Url("https://google.com")); + myHandle.perform(); + } catch (curlpp::RuntimeError & e) { + std::cout << e.what() << std::endl; + return -1; + } catch (curlpp::LogicError & e) { + std::cout << e.what() << std::endl; + return -1; + } + + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", + "-L#{lib}", "-lcurlpp", "-lcurl" + system "./test" + end +end diff --git a/Formula/c/curseofwar.rb b/Formula/c/curseofwar.rb new file mode 100644 index 0000000000000..1fc11152623de --- /dev/null +++ b/Formula/c/curseofwar.rb @@ -0,0 +1,38 @@ +class Curseofwar < Formula + desc "Fast-paced action strategy game" + homepage "https://a-nikolaev.github.io/curseofwar/" + url "https://github.com/a-nikolaev/curseofwar/archive/refs/tags/v1.3.0.tar.gz" + sha256 "2a90204d95a9f29a0e5923f43e65188209dc8be9d9eb93576404e3f79b8a652b" + license "GPL-3.0-or-later" + head "https://github.com/a-nikolaev/curseofwar.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0cdb7f580eebe419880f3cfc725410eb05f0f10ec349f48c4c9cd68dfed8d368" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7cb41ed1daf26dfe62143dec8cc795d6fe88d2748eac64f6ec5df187f8695b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4503064e7da38e232ca3d43b46d1ccc8739312ca92bd18b352707e115333f854" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b2f8bf83947f4824e28c212a1fd901c499aab1c20b7c7310cebd07b0da6600f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "25ddaaccdd08f5cb640149db8d7c78b01dcab50eff1c610b4e6f674b790d3629" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ebc08cc6d912fdb3df613a397b1ac467e910a280fc2a4955971d53bb7555045b" + sha256 cellar: :any_skip_relocation, sonoma: "52b1807644417d7313772959d0f645fff5fb7f05c0283b9876d7116b7ec1620f" + sha256 cellar: :any_skip_relocation, ventura: "a188c211e65d756a13002d91f5e2b8dfd72fc0043a449f2e0661eeb85ab63449" + sha256 cellar: :any_skip_relocation, monterey: "896a5aef76086dee7da0fd8cc17ef67635592b9cc38a68945a53e0224a1bdad6" + sha256 cellar: :any_skip_relocation, big_sur: "ee70d95dcc146e21ceb5921f9fc6d5c77874af2571b69d0850eec729dc1cc0a4" + sha256 cellar: :any_skip_relocation, catalina: "ddd5726a8951c2ec18c9f26bbed80d2d22baeef02eb6e1f313d4591f0db7064b" + sha256 cellar: :any_skip_relocation, arm64_linux: "039f9f3db262c2aab1c8b50ac39a8212ad2f3beca7aba8d4d3ca53187b0159e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c3b72a5583689d3c22ed79c41229339e374695ea4975f38ba74cc72ea37cfe7" + end + + uses_from_macos "ncurses" + + def install + system "make", "VERSION=#{version}" + bin.install "curseofwar" + man6.install "curseofwar.6" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/curseofwar -v", 1).chomp + end +end diff --git a/Formula/c/cutter-cli.rb b/Formula/c/cutter-cli.rb new file mode 100644 index 0000000000000..096afa3c2ffb1 --- /dev/null +++ b/Formula/c/cutter-cli.rb @@ -0,0 +1,55 @@ +class CutterCli < Formula + desc "Unit Testing Framework for C and C++" + homepage "https://github.com/clear-code/cutter" + url "https://github.com/clear-code/cutter/archive/refs/tags/1.2.9.tar.gz" + sha256 "9ee1d9edf465110cad864889e70df681f4f5df55470a302593e5d9208249940e" + license "LGPL-3.0-or-later" + head "https://github.com/clear-code/cutter.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "2fdeb139a7a097e21c0b3af2d95875b73e8377865422a960b87dc4a632a09122" + sha256 arm64_sequoia: "4269bdfaa7adb093818d5bf76cb5ae1a87759872845b0d8b95e6dcee2c779c8f" + sha256 arm64_sonoma: "315fa8bf0c67e9fa5bd8843219545f6d8fcf17acab28dc78d1b4451e55730295" + sha256 sonoma: "26430181959f637d2eff67e251bca6e8514d9f3c23c888ca04cd65ead28b1092" + sha256 arm64_linux: "80317a429c5daf9d5160e61074aadf4f89a2f853067c3883ae46fcefd368d82e" + sha256 x86_64_linux: "25bb198a72fcaa22ec6b5240ed0e0c3da587e0cfae7c1663e2b464a5de2af13f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "gtk-doc" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "glib" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" unless OS.mac? + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--prefix=#{prefix}", + "--disable-glibtest", + "--disable-goffice", + "--disable-gstreamer", + "--disable-libsoup" + system "make" + system "make", "install" + end + + test do + touch "1.txt" + touch "2.txt" + system bin/"cut-diff", "1.txt", "2.txt" + end +end diff --git a/Formula/c/cvs-fast-export.rb b/Formula/c/cvs-fast-export.rb new file mode 100644 index 0000000000000..126155c60f467 --- /dev/null +++ b/Formula/c/cvs-fast-export.rb @@ -0,0 +1,60 @@ +class CvsFastExport < Formula + include Language::Python::Shebang + + desc "Export an RCS or CVS history as a fast-import stream" + homepage "http://www.catb.org/~esr/cvs-fast-export/" + url "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-1.68.tar.gz" + sha256 "841c60d9af70ca260fec572f2ef08ed523314f6cacfda40bb44dacb9dbcda841" + license "GPL-2.0-or-later" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a588033b25137b05eb8ae709e17fb689d36d7951138960f11cba6f3a122cfa37" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be684c4690ae50c5b8d35704827eee375b29fa7aacd6c1d3e16a96e1e73d552f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c2463a58adaea270f14076290f5fad917c46438e4a08f68583cfc1e4c493315" + sha256 cellar: :any_skip_relocation, sonoma: "d9a118a01f3633866024f0ccf210ed45b1bd3b2d08b9f56ed072abdcb11c1bb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4f8a83d4bb3915ac036b726f5e5b68a43db5874c076afe363b3fc1ef6e194d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61a5bca34f0a70c12aff21f7ec5f3188f7703036d40e150b76c6c91bd4de92fd" + end + + head do + url "https://gitlab.com/esr/cvs-fast-export.git", branch: "master" + depends_on "bison" => :build + end + + depends_on "asciidoctor" => :build + depends_on "cvs" => :test + + uses_from_macos "python" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "install", "prefix=#{prefix}" + rewrite_shebang detected_python_shebang(use_python_from_path: true), *bin.children + end + + test do + cvsroot = testpath/"cvsroot" + cvsroot.mkpath + system "cvs", "-d", cvsroot, "init" + + test_content = "John Barleycorn" + + mkdir "cvsexample" do + (testpath/"cvsexample/testfile").write(test_content) + ENV["CVSROOT"] = cvsroot + system "cvs", "import", "-m", "example import", "cvsexample", "homebrew", "start" + end + + assert_match test_content, shell_output("find #{testpath}/cvsroot | #{bin}/cvs-fast-export") + end +end diff --git a/Formula/c/cvs.rb b/Formula/c/cvs.rb new file mode 100644 index 0000000000000..2640b16dde69c --- /dev/null +++ b/Formula/c/cvs.rb @@ -0,0 +1,145 @@ +# Based on: +# Apple Open Source: https://opensource.apple.com/source/cvs/cvs-47/ +# MacPorts: https://github.com/macports/macports-ports/blob/master/devel/cvs/Portfile +# Creating a useful testcase: https://mrsrl.stanford.edu/~brian/cvstutorial/ + +class Cvs < Formula + desc "Version control system" + homepage "https://www.nongnu.org/cvs/" + url "https://ftpmirror.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2" + sha256 "78853613b9a6873a30e1cc2417f738c330e75f887afdaf7b3d0800cb19ca515e" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] + revision 4 + + livecheck do + url "https://ftpmirror.gnu.org/non-gnu/cvs/source/feature/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9db42bbcbdc91ec57b9c1039d1e44c4497322339705b60c38573d07beb644b3d" + sha256 cellar: :any, arm64_sequoia: "395bcc270613244fc0be159a5cc843cff6696397961958634363d4b1a2241454" + sha256 cellar: :any, arm64_sonoma: "e561f130192a57e7fe98eab345f97fd548bdabb62e78a9131a91c3c87f0a4429" + sha256 cellar: :any, arm64_ventura: "b04bc5783e3ce63a89075a9f824c2f3257ddb6974f22827315bd2848a0d96a05" + sha256 cellar: :any, arm64_monterey: "facb582f400a539914188f2c526148db296f6a9c626b298b6749a528a6955b6e" + sha256 cellar: :any, arm64_big_sur: "69072386044a5fb88c0855933f336ada641c7d4f0b5a26859b83609de094d975" + sha256 cellar: :any, sonoma: "242d715445ff0ce9c2a1968f51b2c15c5aef9069a7f0c957d79cd9dd01069f75" + sha256 cellar: :any, ventura: "12844f5aacd63941b0751fcda0524b48b3846caf9f5c348b132408d320e22bcb" + sha256 cellar: :any, monterey: "90e39df5b90cb3ae770fb19ec618350b02e7c16ca1bf5748cddbb2302c7f764f" + sha256 cellar: :any, big_sur: "f82f03a64e86b956f63f2a9b420bb6db7f792bcc65e829278def0939fca4b947" + sha256 cellar: :any, catalina: "0d792dc4be608c3abdadc97ba8fabca3d72a94e8903c9516ca529d51eb6fe2e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a0ae39e62086e0c6ee0bbb9843d6fbdaf09164b07a288c6dcccf2995acb9dee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9ec7ba1c5450d7df8c3c5f623579a78ba970b29eb1dcbb991cfcfc5ae2630d2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + + uses_from_macos "krb5" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "vim" => :build # a text editor must be detected by the configure script + depends_on "linux-pam" + end + + patch :p0 do + url "https://github.com/apple-oss-distributions/cvs/archive/refs/tags/cvs-47.tar.gz" + sha256 "57652695bbfbc33eacb8f1ecb3ca5e2df0f773e4abb307b840bf948e3840f3d3" + patches = ["patches/PR5178707.diff", + "patches/ea.diff", + "patches/endian.diff", + "patches/fixtest-client-20.diff", + "patches/fixtest-recase.diff", + "patches/i18n.diff", + "patches/initgroups.diff", + "patches/remove-info.diff", + "patches/tag.diff", + "patches/zlib.diff"] + + on_macos { patches << "patches/nopic.diff" } + apply(*patches.compact) + end + + patch do + # Fixes error: 'Illegal instruction: 4'; '%n used in a non-immutable format string' on 10.13 + # Patches the upstream-provided gnulib on all platforms as is recommended + on_macos do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/cvs/vasnprintf-high-sierra-fix.diff" + sha256 "affa485332f66bb182963680f90552937bf1455b855388f7c06ef6a3a25286e2" + end + # Fixes error: %n in writable segment detected on Linux + on_linux do + url "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-vcs/cvs/files/cvs-1.12.13.1-fix-gnulib-SEGV-vasnprintf.patch?id=6c49fbac47ddb2c42ee285130afea56f349a2d40" + sha256 "4f4b820ca39405348895d43e0d0f75bab1def93fb7a43519f6c10229a7c64952" + end + end + + # Fixes "cvs [init aborted]: cannot get working directory: No such file or directory" on Catalina. + # Original patch idea by Jason White from stackoverflow + patch :DATA + + def install + # Do the same work as patches/remove-libcrypto.diff but by + # changing autoconf's input instead of editing ./configure directly + inreplace "m4/acx_with_gssapi.m4", "AC_SEARCH_LIBS([RC4]", "# AC_SEARCH_LIBS([RC4]" + + # Fix syntax error which breaks building against modern gettext + inreplace "configure.in", "AM_GNU_GETTEXT_VERSION dnl", "AM_GNU_GETTEXT_VERSION(0.21) dnl" + + # Existing configure script needs updating for arm64 etc + system "autoreconf", "--verbose", "--install", "--force" + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + system "./configure", "--infodir=#{info}", + "--mandir=#{man}", + "--sysconfdir=#{etc}", + "--with-gssapi", + "--enable-pam", + "--enable-encryption", + "--with-external-zlib", + "--enable-case-sensitivity", + "--with-editor=vim", + "ac_cv_func_working_mktime=no", + *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + cvsroot = testpath/"cvsroot" + cvsroot.mkpath + system bin/"cvs", "-d", cvsroot, "init" + + mkdir "cvsexample" do + ENV["CVSROOT"] = cvsroot + system bin/"cvs", "import", "-m", "dir structure", "cvsexample", "homebrew", "start" + end + end +end + +__END__ +--- cvs-1.12.13/lib/xgetcwd.c.orig 2019-10-10 22:52:37.000000000 -0500 ++++ cvs-1.12.13/lib/xgetcwd.c 2019-10-10 22:53:32.000000000 -0500 +@@ -25,8 +25,9 @@ + #include "xgetcwd.h" + + #include ++#include + +-#include "getcwd.h" ++/* #include "getcwd.h" */ + #include "xalloc.h" + + /* Return the current directory, newly allocated. diff --git a/Formula/c/cvsutils.rb b/Formula/c/cvsutils.rb new file mode 100644 index 0000000000000..d34e731871c16 --- /dev/null +++ b/Formula/c/cvsutils.rb @@ -0,0 +1,31 @@ +class Cvsutils < Formula + desc "CVS utilities for use in working directories" + homepage "https://www.red-bean.com/cvsutils/" + url "https://www.red-bean.com/cvsutils/releases/cvsutils-0.2.6.tar.gz" + sha256 "174bb632c4ed812a57225a73ecab5293fcbab0368c454d113bf3c039722695bb" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.red-bean.com/cvsutils/releases/" + regex(/href=.*?cvsutils[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9efd138b85d862065f5a5d36e02a4ec04c40b6f669bfe7feb09a08f233991d50" + end + + uses_from_macos "perl" + + def install + ENV["CONFIG_SHELL"] = "/bin/bash" # for all bottle + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"cvsu", "--help" + end +end diff --git a/Formula/c/cvsync.rb b/Formula/c/cvsync.rb new file mode 100644 index 0000000000000..1102bcbf2e328 --- /dev/null +++ b/Formula/c/cvsync.rb @@ -0,0 +1,63 @@ +class Cvsync < Formula + desc "Portable CVS repository synchronization utility" + homepage "https://www.cvsync.org/" + url "https://www.cvsync.org/dist/cvsync-0.24.19.tar.gz" + sha256 "75d99fc387612cb47141de4d59cb3ba1d2965157230f10015fbaa3a1c3b27560" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?cvsync[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "c43def4368772309b8643caeb7345217880da0440f8eb42c8602238e3a676d93" + sha256 cellar: :any, arm64_sequoia: "c5f77cf63c61c0042ebacea31bc3d2e7548afc08ec738fd6f0a8baf3180b4795" + sha256 cellar: :any, arm64_sonoma: "db4846fa5c20e6e946dd8b3398ca22de82c934b97018ddab899c0bed8a178d22" + sha256 cellar: :any, arm64_ventura: "86f6fe30422f903827d29782f74e2eff93e7a2f0a86b4775747c9077cde03564" + sha256 cellar: :any, arm64_monterey: "151a5a709d78dfd6fe1db43686e7d0a7bf9464184133b5a79152a8d21aeb44e0" + sha256 cellar: :any, arm64_big_sur: "284f786b36c5890da6c1d889cbf02a50c116a03661183b088dedb6a3ccdf4c05" + sha256 cellar: :any, sonoma: "86a6fb35c944b4b2a19b677659c002eb56dc6d1cd83202f8126e9b06de97d2b0" + sha256 cellar: :any, ventura: "ac33e5ee664d62d33043535d589ca4e526780073fed1801bc642d16f528a3402" + sha256 cellar: :any, monterey: "8f9856b5b0be6da7e213fb287be69259d8aaf8425fa057702242109f393aeae9" + sha256 cellar: :any, big_sur: "c53b78803c36ffe5b389b7891a51c8197b05e9d660c5100417fa5fd9f743cfd8" + sha256 cellar: :any, catalina: "358f4234cde20c14d3af19a226c294154361a8159802755029f43a7f6d81fd27" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e81c7a636af467de3b7818076920c840934e74b7e4bd8d0d69d3529967cf003" + sha256 cellar: :any_skip_relocation, x86_64_linux: "450f89a4983c03d8b007667d044047796ed721e7a6ce3fac437260c25d33219d" + end + + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + ENV["PREFIX"] = prefix + ENV["MANDIR"] = man + ENV["CVSYNC_DEFAULT_CONFIG"] = etc/"cvsync.conf" + ENV["CVSYNCD_DEFAULT_CONFIG"] = etc/"cvsyncd.conf" + ENV["HASH_TYPE"] = "openssl" + + # Makefile from 2005 assumes Darwin doesn't define `socklen_t' and defines + # it with a CC macro parameter making gcc unhappy about double define. + inreplace "mk/network.mk", + /^CFLAGS \+= -Dsocklen_t=int/, "" + + # Remove owner and group parameters from install. + inreplace "mk/base.mk", + /^INSTALL_(.{3})_OPTS\?=.*/, 'INSTALL_\1_OPTS?= -c -m ${\1MODE}' + + # These paths must exist or "make install" fails. + bin.mkpath + lib.mkpath + man1.mkpath + + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cvsync -h 2>&1", 1) + end +end diff --git a/Formula/c/cwb3.rb b/Formula/c/cwb3.rb new file mode 100644 index 0000000000000..b46529fda863d --- /dev/null +++ b/Formula/c/cwb3.rb @@ -0,0 +1,143 @@ +class Cwb3 < Formula + desc "Tools for managing and querying large text corpora with linguistic annotations" + homepage "https://cwb.sourceforge.io/" + license "GPL-2.0-or-later" + + stable do + url "https://downloads.sourceforge.net/project/cwb/cwb/cwb-3.5/source/cwb-3.5.0-src.tar.gz" + sha256 "20bbd00b7c830389ce384fe70124bc0f55ea7f3d70afc3a159e6530d51b24059" + depends_on "pcre" + end + + livecheck do + url "https://sourceforge.net/projects/cwb/rss?path=/cwb" + regex(%r{url=.*?/cwb[._-]v?(\d+(?:\.\d+)+)-src\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7a3579de1550f7bd94b6b892045f4ed90f563a2b957e65bc62d60dd143d8bc76" + sha256 cellar: :any, arm64_sequoia: "c5b9638ab57fd314a6ca3d6af0fe467535a2d3a2d10f567c5c479bda9f3ac36b" + sha256 cellar: :any, arm64_sonoma: "6e7f9c944d5b1222ea9b1001a4ed77c80ee60fd97418b1326e201def09c26ce9" + sha256 cellar: :any, arm64_ventura: "933ced8d74d9a2be889a4c0b65f19df7730c3ef071fd15e5b143183a929c0ce1" + sha256 cellar: :any, arm64_monterey: "0095bcb1957680c0111d0350bb709ea9c5944eb0375654ef76b7d9f455fbc531" + sha256 cellar: :any, arm64_big_sur: "1cd5c987e8f41b62244439ba320bb77f92b7bfbb528d31b75726071ad9822a58" + sha256 cellar: :any, sonoma: "06940a67c3f3607c0bb4c8209bb08911d30062233dbba8191837d7fd558c5652" + sha256 cellar: :any, ventura: "bb8314de701f695b87f82eb7b8377268ca56a333e05895b607c081ba8f6f45ad" + sha256 cellar: :any, monterey: "9271d4472d3ce7e71c65755e33ba8d303edcc603ce7e493c12d6c870a7f84f0f" + sha256 cellar: :any, big_sur: "af3c7316e0a0678d7cf11d151c109cbbd0f36b9df36c9b1d2c210ce6654e6030" + sha256 cellar: :any, catalina: "a15fdf57dceb390674290d8a1aaabdf93385b60a675de29a0af5219d85116d95" + sha256 cellar: :any_skip_relocation, arm64_linux: "721f450a9de637e6d42681135441d0d7228867ac58b1087d186c67d82321857f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36c736d9eee76fc6c3db520901f42677e8dfc1ea390b319264c4e0d75b612ccc" + end + + head do + url "svn://svn.code.sf.net/p/cwb/code/cwb/trunk" + depends_on "pcre2" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "readline" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + resource("tutorial_data") do + url "https://cwb.sourceforge.io/files/encoding_tutorial_data.zip" + sha256 "bbd37514fdbdfd25133808afec6a11037fb28253e63446a9e548fb437cbdc6f0" + end + + def install + args = %W[ + PLATFORM=homebrew-formula + SITE=homebrew-formula + FULL_MESSAGES=1 + PREFIX=#{prefix} + HOMEBREW_ROOT=#{HOMEBREW_PREFIX} + ] + + system "make", "all", *args + ENV.deparallelize + system "make", "install", *args + + # Avoid rebuilds when dependencies are bumped. + inreplace bin/"cwb-config" do |s| + s.gsub! Formula["glib"].prefix.realpath, Formula["glib"].opt_prefix + pcre = build.head? ? "pcre2" : "pcre" + s.gsub! Formula[pcre].prefix.realpath, Formula[pcre].opt_prefix + end + end + + def default_registry + HOMEBREW_PREFIX/"share/cwb/registry" + end + + def post_install + # make sure default registry exists + default_registry.mkpath + end + + def caveats + <<~STOP + CWB default registry directory: #{default_registry} + STOP + end + + test do + resource("tutorial_data").stage do + Pathname("registry").mkdir + Pathname("data").mkdir + + system(bin/"cwb-encode", "-c", "ascii", + "-d", "data", "-R", "registry/ex", "-f", "example.vrt", + "-P", "pos", "-P", "lemma", "-S", "s:0") + assert_path_exists Pathname("registry")/"ex", "registry file has been created" + assert_path_exists Pathname("data")/"lemma.lexicon", "lexicon file for p-attribute lemma has been created" + + system(bin/"cwb-makeall", "-r", "registry", "EX") + assert_path_exists Pathname("data")/"lemma.corpus.rev", +"reverse index file for p-attribute lemma has been created" + + assert_equal("Tokens:\t5\nTypes:\t5\n", + shell_output("#{bin}/cwb-lexdecode -r registry -S EX"), + "correct token & type count for p-attribute") + assert_equal("0\t4\n", + shell_output("#{bin}/cwb-s-decode -r registry EX -S s"), + "correct span for s-attribute") + + assert_equal("3\n", + shell_output("#{bin}/cqpcl -r registry -D EX 'A=[pos = \"\\w{2}\"]; size A;'"), + "CQP query works correctly") + + Pathname("test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + int *id, n_id, n_token; + Corpus *C = cl_new_corpus("registry", "ex"); + Attribute *word = cl_new_attribute(C, "word", ATT_POS); + id = cl_regex2id(word, "\\\\p{Ll}+", 0, &n_id); + if (n_id > 0) + n_token = cl_idlist2freq(word, id, n_id); + else + n_token = 0; + printf("%d\\n", n_token); + return 0; + } + C + cppflags = Utils.safe_popen_read("#{bin}/cwb-config", "-I").strip.split + ldflags = Utils.safe_popen_read("#{bin}/cwb-config", "-L").strip.split + system ENV.cc, "-o", "test", *cppflags, "test.c", *ldflags + assert_equal("3\n", shell_output("./test"), + "compiled test program works") + end + end +end diff --git a/Formula/c/cweb.rb b/Formula/c/cweb.rb new file mode 100644 index 0000000000000..49669f095397a --- /dev/null +++ b/Formula/c/cweb.rb @@ -0,0 +1,60 @@ +class Cweb < Formula + desc "Literate documentation system for C, C++, and Java" + homepage "https://cs.stanford.edu/~knuth/cweb.html" + url "https://github.com/ascherer/cweb/archive/refs/tags/cweb-4.12.2.tar.gz" + sha256 "519ac1c03610eea18956ed62d2996dc5a629f0c3af91f38cf4621d5deab749fd" + # See discussions in this thread, https://github.com/ascherer/cweb/issues/29 + license :cannot_represent + + livecheck do + url :stable + regex(/^cweb[._-]v?(\d+(?:\.\d+)+[a-z]?)$/i) + end + + bottle do + sha256 arm64_tahoe: "c4403e23d80b3754ac094fd08d07b191d100d6bfdf8f3f9dbbb9ee7dbebfa984" + sha256 arm64_sequoia: "d3d86635f9c5d0fd3990b130c780fd9b2a91d21222ec7668dbb47db1aedd82d6" + sha256 arm64_sonoma: "8446ab44aec9607410a76075d9df7c63248a47dd1b5ff4d7eb16450dc48a1e0c" + sha256 arm64_ventura: "54586e839f7763712907f8552ec891853658ea488122d6683927afb9c64adf97" + sha256 sonoma: "1fa6f4ec70dd19e629766b8878d44fb2fc8cf31bfbcd5dd47099855902bb45c1" + sha256 ventura: "7f10cc21dc5400577161bee0ba422d268045fd28217e8d6c7f53da392b47211f" + sha256 arm64_linux: "be157573864df0fa318a5fd47f27989ab95b0d50ecdee9f545afa6b5b7b63989" + sha256 x86_64_linux: "b62b4d08b2391b41b90db3eabd9cec94c6bc3317aefa6b3659d9bbb61f6239b6" + end + + conflicts_with "texlive", because: "both install `cweb` binaries" + + def install + ENV.deparallelize + + macrosdir = share/"texmf/tex/generic" + cwebinputs = lib/"cweb" + + # make install doesn't use `mkdir -p` so this is needed + [bin, man1, macrosdir, elisp, cwebinputs].each(&:mkpath) + + system "make", "install", + "DESTDIR=#{bin}/", + "MANDIR=#{man1}", + "MANEXT=1", + "MACROSDIR=#{macrosdir}", + "EMACSDIR=#{elisp}", + "CWEBINPUTS=#{cwebinputs}" + end + + test do + (testpath/"test.w").write <<~EOS + @* Hello World + This is a minimal program written in CWEB. + + @c + #include + void main() { + printf("Hello world!"); + } + EOS + system bin/"ctangle", "test.w" + system ENV.cc, "test.c", "-o", "hello" + assert_equal "Hello world!", pipe_output("./hello") + end +end diff --git a/Formula/c/cxgo.rb b/Formula/c/cxgo.rb new file mode 100644 index 0000000000000..cce9f9493cced --- /dev/null +++ b/Formula/c/cxgo.rb @@ -0,0 +1,61 @@ +class Cxgo < Formula + desc "Transpiling C to Go" + homepage "https://github.com/gotranspile/cxgo" + url "https://github.com/gotranspile/cxgo/archive/refs/tags/v0.5.2.tar.gz" + sha256 "942393dc381dcf47724c93b5d6c4cd7695c0000628ecb7f30c5b99be4676ae83" + license "MIT" + head "https://github.com/gotranspile/cxgo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b38c152f871497a6febc7e9628a1907f13eccd9a35c9212a009bc26f2a6d9371" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ebcf34c360a23231c3a1a78a54ad1904ba3cbd3e7f2938844247bf0324b02639" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ebcf34c360a23231c3a1a78a54ad1904ba3cbd3e7f2938844247bf0324b02639" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ebcf34c360a23231c3a1a78a54ad1904ba3cbd3e7f2938844247bf0324b02639" + sha256 cellar: :any_skip_relocation, sonoma: "ce0073283d4a255dd5ba29fc637074fa24d59266c50826512b2217c8591e7427" + sha256 cellar: :any_skip_relocation, ventura: "ce0073283d4a255dd5ba29fc637074fa24d59266c50826512b2217c8591e7427" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f849761eee11fc2b5b1a2b99d81685a384ccb0db1a558387aa9141f0c031845" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9cd5c2c79e9d44ec6bcb1dc71849d89e7c9f415b5f3abd4b757c31992bca295" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/cxgo" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + printf("Hello, World!"); + return 0; + } + C + + expected = <<~GO + package main + + import ( + \t"github.com/gotranspile/cxgo/runtime/stdio" + \t"os" + ) + + func main() { + \tstdio.Printf("Hello, World!") + \tos.Exit(0) + } + GO + + system bin/"cxgo", "file", testpath/"test.c" + assert_equal expected, (testpath/"test.go").read + + assert_match version.to_s, shell_output("#{bin}/cxgo version") + end +end diff --git a/Formula/c/cxxopts.rb b/Formula/c/cxxopts.rb new file mode 100644 index 0000000000000..a4e990aaa7e8c --- /dev/null +++ b/Formula/c/cxxopts.rb @@ -0,0 +1,65 @@ +class Cxxopts < Formula + desc "Lightweight C++ command-line option parser" + homepage "https://github.com/jarro2783/cxxopts" + url "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.3.1.tar.gz" + sha256 "3bfc70542c521d4b55a46429d808178916a579b28d048bd8c727ee76c39e2072" + license "MIT" + head "https://github.com/jarro2783/cxxopts.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5c90eb7984473c65039f6dce14c4d9df760f5545777d8901dd5725a87f72a43c" + end + + depends_on "cmake" => :build + + def install + # set `CXXOPTS_CMAKE_DIR` and `CMAKE_INSTALL_LIBDIR_ARCHIND` to create an `:all` bottle. + args = %w[ + -DCMAKE_INSTALL_LIBDIR_ARCHIND=share + -DCXXOPTS_BUILD_EXAMPLES=OFF + -DCXXOPTS_BUILD_TESTS=OFF + -DCXXOPTS_CMAKE_DIR=share/cmake/cxxopts + ] + + # We don't need to run `cmake --build` because this is header-only. + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--install", "build" + + return unless (lib/"pkgconfig").directory? + + share.install lib/"pkgconfig" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + #include + + int main(int argc, char *argv[]) { + cxxopts::Options options(argv[0]); + + std::string input; + options.add_options() + ("e,echo", "String to be echoed", cxxopts::value(input)) + ("h,help", "Print this help", cxxopts::value()->default_value("false")); + + auto result = options.parse(argc, argv); + + if (result.count("help")) { + std::cout << options.help() << std::endl; + std::exit(0); + } + + std::cout << input << std::endl; + + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cc", "-I#{include}", "-o", "test" + assert_equal "echo string", shell_output("./test -e 'echo string'").strip + assert_equal "echo string", shell_output("./test --echo='echo string'").strip + end +end diff --git a/Formula/c/cxxtest.rb b/Formula/c/cxxtest.rb new file mode 100644 index 0000000000000..206808bfb0941 --- /dev/null +++ b/Formula/c/cxxtest.rb @@ -0,0 +1,45 @@ +class Cxxtest < Formula + include Language::Python::Virtualenv + + desc "C++ unit testing framework similar to JUnit, CppUnit and xUnit" + homepage "https://github.com/CxxTest/cxxtest" + url "https://github.com/CxxTest/cxxtest/releases/download/4.4/cxxtest-4.4.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/c/cxxtest/cxxtest_4.4.orig.tar.gz" + sha256 "1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8" + license "LGPL-3.0-only" + revision 3 + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "aa6fedcd740d5f396b372bfae35f71164499faf2b62c1737befbcada3ea4d7f8" + end + + depends_on "python@3.14" + + def install + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install_and_link buildpath/"python" + + include.install "cxxtest" + doc.install Dir["doc/*"] + end + + test do + testfile = testpath/"MyTestSuite1.hpp" + testfile.write <<~CPP + #include + + class MyTestSuite1 : public CxxTest::TestSuite { + public: + void testAddition(void) { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } + }; + CPP + + system bin/"cxxtestgen", "--error-printer", "-o", testpath/"runner.cpp", testfile + system ENV.cxx, "-o", testpath/"runner", testpath/"runner.cpp" + system testpath/"runner" + end +end diff --git a/Formula/c/cyclonedx-gomod.rb b/Formula/c/cyclonedx-gomod.rb new file mode 100644 index 0000000000000..920ec5e5e7cac --- /dev/null +++ b/Formula/c/cyclonedx-gomod.rb @@ -0,0 +1,50 @@ +class CyclonedxGomod < Formula + desc "Creates CycloneDX Software Bill of Materials (SBOM) from Go modules" + homepage "https://cyclonedx.org/" + url "https://github.com/CycloneDX/cyclonedx-gomod/archive/refs/tags/v1.9.0.tar.gz" + sha256 "4490e44e2478a3f8b62e568a530b604ace14bd12d26c0fb41656a24ffec566c7" + license "Apache-2.0" + head "https://github.com/CycloneDX/cyclonedx-gomod.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6f3bdc7fcd931ac2cca24cc768c523fd1aaf378932c7619db84d027b381db9a2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "265722bab2f4df44779e227d2a45ee302a98730f803ff0edbc35b4bd5d20f160" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "265722bab2f4df44779e227d2a45ee302a98730f803ff0edbc35b4bd5d20f160" + sha256 cellar: :any_skip_relocation, arm64_ventura: "265722bab2f4df44779e227d2a45ee302a98730f803ff0edbc35b4bd5d20f160" + sha256 cellar: :any_skip_relocation, sonoma: "f4aa6ed9b23eb79645acb210d928c754478c4b35c1883658e4db783eefaf61b6" + sha256 cellar: :any_skip_relocation, ventura: "f4aa6ed9b23eb79645acb210d928c754478c4b35c1883658e4db783eefaf61b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bfff00a31c04f53d5ec3cc06a9a86ae5313fb340a8728b4cebca137ef73a177" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5fd68398150bd54eb229bffe89f2a83af73ab907b17df5f328fbeffd40753c9" + end + + depends_on "go" => [:build, :test] + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cyclonedx-gomod" + end + + test do + (testpath/"go.mod").write <<~GOMOD + module github.com/Homebrew/brew-test + + go 1.21 + GOMOD + + (testpath/"main.go").write <<~GO + package main + + import ( + "fmt" + "time" + ) + + func main() { + fmt.Println("testing cyclonedx-gomod") + } + GO + + output = shell_output("#{bin}/cyclonedx-gomod mod 2>&1") + assert_match "failed to determine version of main module", output + assert_match " github.com/Homebrew/brew-test", output + end +end diff --git a/Formula/c/cyclonedx-python.rb b/Formula/c/cyclonedx-python.rb new file mode 100644 index 0000000000000..1e40a2c90dc38 --- /dev/null +++ b/Formula/c/cyclonedx-python.rb @@ -0,0 +1,193 @@ +class CyclonedxPython < Formula + include Language::Python::Virtualenv + + desc "Creates CycloneDX Software Bill of Materials (SBOM) from Python projects" + homepage "https://cyclonedx.org/" + url "https://files.pythonhosted.org/packages/18/b4/d6a3eee8622389893480758ada629842b8667e326ec8da311dbc7f5087f4/cyclonedx_bom-7.2.1.tar.gz" + sha256 "ead9923a23c71426bcc83ea371c87945b85f76c31728625dde35ecfe0fa2e712" + license "Apache-2.0" + head "https://github.com/CycloneDX/cyclonedx-python.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9e715c97bf7bdd3965b5035201236d47166d9efb6bd8009337a6a37608beca98" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36ed41e90be9c27639a2d6cd3c0f54e32e1a60d31d859fe4d8a56db206b33131" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2171d0842fd1a65c6c7026d27d66084cddecb2091f336414dcc742e978778f2f" + sha256 cellar: :any_skip_relocation, sonoma: "85c827e6be4dfc474d804742e89067c54055042ab5b815412ad193565d0648cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "faa16a2b7e8a0fb9357118dffde70eceb31cb3855fa1bf24b15f1fe49adde4da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f89d893a3ac4835d6ce96c2213ddd71b197315d214bd68d184f745e1393e664" + end + + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "rpds-py" + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "cyclonedx-python-lib" do + url "https://files.pythonhosted.org/packages/58/e4/e923543e0d7729a02be1bf686cf1b2f4047a8df6493ffba5f43968790838/cyclonedx_python_lib-11.4.0.tar.gz" + sha256 "1de90231a600340cc6a7bacb35fbe97c75241b39788beaa33a0f49bf4afd4e6c" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "isoduration" do + url "https://files.pythonhosted.org/packages/7c/1a/3c8edc664e06e6bd06cce40c6b22da5f1429aa4224d0c590f3be21c91ead/isoduration-20.11.0.tar.gz" + sha256 "ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "lark" do + url "https://files.pythonhosted.org/packages/da/34/28fff3ab31ccff1fd4f6c7c7b0ceb2b6968d8ea4950663eadcb5720591a0/lark-1.3.1.tar.gz" + sha256 "b426a7a6d6d53189d318f2b6236ab5d6429eaf09259f1ca33eb716eed10d2905" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/3a/f0/de0ac00a4484c0d87b71e3d9985518278d89797fa725e90abd3453bccb42/packageurl_python-0.17.5.tar.gz" + sha256 "a7be3f3ba70d705f738ace9bf6124f31920245a49fa69d4b416da7037dd2de61" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pip-requirements-parser" do + url "https://files.pythonhosted.org/packages/5e/2a/63b574101850e7f7b306ddbdb02cb294380d37948140eecd468fae392b54/pip-requirements-parser-32.0.1.tar.gz" + sha256 "b4fa3a7a0be38243123cf9d1f3518da10c51bdb165a2b2985566247f9155a7d3" + end + + resource "py-serializable" do + url "https://files.pythonhosted.org/packages/73/21/d250cfca8ff30c2e5a7447bc13861541126ce9bd4426cd5d0c9f08b5547d/py_serializable-2.1.0.tar.gz" + sha256 "9d5db56154a867a9b897c0163b33a793c804c80cee984116d02d49e4578fc103" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "rfc3339-validator" do + url "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" + sha256 "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + end + + resource "rfc3986-validator" do + url "https://files.pythonhosted.org/packages/da/88/f270de456dd7d11dcc808abfa291ecdd3f45ff44e3b549ffa01b126464d0/rfc3986_validator-0.1.1.tar.gz" + sha256 "3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055" + end + + resource "rfc3987-syntax" do + url "https://files.pythonhosted.org/packages/2c/06/37c1a5557acf449e8e406a830a05bf885ac47d33270aec454ef78675008d/rfc3987_syntax-1.1.0.tar.gz" + sha256 "717a62cbf33cffdd16dfa3a497d81ce48a660ea691b1ddd7be710c22f00b4a0d" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "uri-template" do + url "https://files.pythonhosted.org/packages/31/c7/0336f2bd0bcbada6ccef7aaa25e443c118a704f828a0620c6fa0207c1b64/uri-template-1.3.0.tar.gz" + sha256 "0e00f8eb65e18c7de20d595a14336e9f337ead580c70934141624b6d1ffdacc7" + end + + resource "webcolors" do + url "https://files.pythonhosted.org/packages/7b/29/061ec845fb58521848f3739e466efd8250b4b7b98c1b6c5bf4d40b419b7e/webcolors-24.11.1.tar.gz" + sha256 "ecb3d768f32202af770477b8b65f318fa4f566c22948673a977b00d589dd80f6" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + (testpath/"requirements.txt").write <<~REQUIREMENTS + requests==2.31.0 + REQUIREMENTS + system bin/"cyclonedx-py", "requirements", testpath/"requirements.txt", "-o", "cyclonedx.json" + assert_match "pkg:pypi/requests@2.31.0", (testpath/"cyclonedx.json").read + end +end diff --git a/Formula/c/cycode.rb b/Formula/c/cycode.rb new file mode 100644 index 0000000000000..74c6c2083d402 --- /dev/null +++ b/Formula/c/cycode.rb @@ -0,0 +1,295 @@ +class Cycode < Formula + include Language::Python::Virtualenv + + desc "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning" + homepage "https://github.com/cycodehq/cycode-cli" + url "https://files.pythonhosted.org/packages/07/fa/25cfa71d899cbdc25affcc2327c8a5deebb836e15f71736ac4724a615ff2/cycode-3.6.0.tar.gz" + sha256 "eda03190995542f3635088bf69ca41af45c8831006043810a9e9fedadd2feaef" + license "MIT" + head "https://github.com/cycodehq/cycode-cli.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7d9a759b204c6aed8db99d472ff1a135d2a964f40d9d6754ade4bba5da2fd1d1" + sha256 cellar: :any, arm64_sequoia: "9fae99fa2f941f4fc63d8ec5b1571214649096f00ee4204b1efbdb1d302d233f" + sha256 cellar: :any, arm64_sonoma: "9fbe9841281f133b3082bbc5fbb2ce317155958cabc9e1f8fb7bee7d92d24b25" + sha256 cellar: :any, sonoma: "2714a6f9d0b10f36c24ed431ccbeb9079ec211cc09c59ccf300c8819b1a85d84" + sha256 cellar: :any_skip_relocation, arm64_linux: "03e37f9bd69de7a4fafcd79fdb1cd27b9eebd11ef4ae973c1620de9f5999e27a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1ef3fead5473bee8d5b4f38935275378f0a079d64dac807643d8506d55803c3" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "pydantic-core", "rpds-py"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "binaryornot" do + url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" + sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "marshmallow" do + url "https://files.pythonhosted.org/packages/70/40/faa10dc4500bca85f41ca9d8cefab282dd23d0fcc7a9b5fab40691e72e76/marshmallow-3.22.0.tar.gz" + sha256 "4972f529104a220bb8637d595aa4c9762afbe7f7a77d82dc58c1615d70c5823e" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/69/2b/916852a5668f45d8787378461eaa1244876d77575ffef024483c94c0649c/mcp-1.19.0.tar.gz" + sha256 "213de0d3cd63f71bc08ffe9cc8d4409cc87acffd383f6195d2ce0457c021b5c1" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "patch-ng" do + url "https://files.pythonhosted.org/packages/ee/c0/53a2f017ac5b5397a7064c2654b73c3334ac8461315707cbede6c12199eb/patch-ng-1.18.1.tar.gz" + sha256 "52fd46ee46f6c8667692682c1fd7134edc65a2d2d084ebec1d295a6087fc0291" + end + + resource "pathvalidate" do + url "https://files.pythonhosted.org/packages/fa/2a/52a8da6fe965dea6192eb716b357558e103aea0a1e9a8352ad575a8406ca/pathvalidate-3.3.1.tar.gz" + sha256 "b18c07212bfead624345bb8e1d6141cdcf15a39736994ea0b94035ad2b1ba177" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/b3/18/09875b4323b03ca9025bae7e6539797b27e4fc032998a466b4b9c3d24653/sentry_sdk-2.43.0.tar.gz" + sha256 "52ed6e251c5d2c084224d73efee56b007ef5c2d408a4a071270e82131d336e20" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz" + sha256 "ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "tenacity" do + url "https://files.pythonhosted.org/packages/cd/94/91fccdb4b8110642462e653d5dcb27e7b674742ad68efd146367da7bdb10/tenacity-9.0.0.tar.gz" + sha256 "807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/6c/89/c527e6c848739be8ceb5c44eb8208c52ea3515c6cf6406aa61932887bf58/typer-0.15.4.tar.gz" + sha256 "89507b104f9b6a0730354f27c39fae5b63ccd0c95b1ce1f1a6ba0cfd329997c3" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/fc/83/24ed25dd0c6277a1a170c180ad9eef5879ecc9a4745b58d7905a4588c80d/types_python_dateutil-2.9.0.20251008.tar.gz" + sha256 "c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/c8/93/65e479b023bbc46dab3e092bda6b0005424ea3217d711964ccdede3f9b1b/urllib3-1.26.19.tar.gz" + sha256 "3e3d753a8618b86d7de333b4223005f68720bcd6a7d2bcb9fbd2229ec7c1e429" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + def install + # Unpin python for 3.14: https://github.com/cycodehq/cycode-cli/pull/354 + inreplace "pyproject.toml", 'python = ">=3.9,<3.14"', 'python = ">=3.9"' + + virtualenv_install_with_resources + # `shellingham` auto-detection doesn't work in Homebrew CI build environment so + # disable it to allow `typer` to use argument as shell for completions + # Ref: https://typer.tiangolo.com/features/#user-friendly-cli-apps + ENV["_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION"] = "1" + generate_completions_from_executable(bin/"cycode", "--show-completion") + end + + test do + status = shell_output("#{bin}/cycode status") + assert_match version.to_s, status + assert_match "Is authenticated: False", status + assert_match "Ignore by type is missing", shell_output("#{bin}/cycode ignore 2>&1", 1) + assert_match "Cycode client id needed.", shell_output("#{bin}/cycode scan path 2>&1", 1) + output = shell_output("#{bin}/cycode scan -t test 2>&1", 2) + assert_match "Invalid value for '--scan-type' / '-t'", output + end +end diff --git a/Formula/c/cyctl.rb b/Formula/c/cyctl.rb new file mode 100644 index 0000000000000..64a3e34c321c6 --- /dev/null +++ b/Formula/c/cyctl.rb @@ -0,0 +1,54 @@ +class Cyctl < Formula + desc "Customizable UI for Kubernetes workloads" + homepage "https://cyclops-ui.com/" + url "https://github.com/cyclops-ui/cyclops/archive/refs/tags/v0.21.1.tar.gz" + sha256 "f5c14b153cac83b6cd401eed86df219dce0fd4a8843858104cb470bdf691a714" + license "Apache-2.0" + head "https://github.com/cyclops-ui/cyclops.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f07fdf29bb7e364b84535e67758c692c44763a245bdb63eb718135d16ee79188" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a91093fae1c86d9f72483bd78e6b3d24257276cfc656ae5d62637616e301024c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a91093fae1c86d9f72483bd78e6b3d24257276cfc656ae5d62637616e301024c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a91093fae1c86d9f72483bd78e6b3d24257276cfc656ae5d62637616e301024c" + sha256 cellar: :any_skip_relocation, sonoma: "19a8bf0780b4bec03bda21046b752f0ee013089ea7b6f988b0a4ad0c914cf6ee" + sha256 cellar: :any_skip_relocation, ventura: "19a8bf0780b4bec03bda21046b752f0ee013089ea7b6f988b0a4ad0c914cf6ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "763911aa14516e73ccd145994385626fe1fba341bf34b3cf974a9d98fdc2b016" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c0f445325ef4060e628b0ee17b4204e6263846f482632163913e45aac934ecd" + end + + depends_on "go" => :build + + def install + cd "cyctl" do + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/cyclops-ui/cycops-cyctl/common.CliVersion=#{version}") + end + end + + test do + assert_match "cyctl version #{version}", shell_output("#{bin}/cyctl --version") + + (testpath/".kube/config").write <<~YAML + apiVersion: v1 + clusters: + - cluster: + certificate-authority-data: test + server: http://127.0.0.1:8080 + name: test + contexts: + - context: + cluster: test + user: test + name: test + current-context: test + kind: Config + preferences: {} + users: + - name: test + user: + token: test + YAML + + assert_match "Error from server (NotFound)", shell_output("#{bin}/cyctl delete templates deployment.yaml 2>&1") + end +end diff --git a/Formula/c/cyme.rb b/Formula/c/cyme.rb new file mode 100644 index 0000000000000..79df7dc9cafd3 --- /dev/null +++ b/Formula/c/cyme.rb @@ -0,0 +1,36 @@ +class Cyme < Formula + desc "List system USB buses and devices" + homepage "https://github.com/tuna-f1sh/cyme" + url "https://github.com/tuna-f1sh/cyme/archive/refs/tags/v2.2.7.tar.gz" + sha256 "c40dab4c2e4c1e4444a277b5ac77fff38afb474bbaffc0b057f973c20e114c8f" + license "GPL-3.0-or-later" + head "https://github.com/tuna-f1sh/cyme.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5bbc0fd8c75d1705f331978e8110e00bfe5537b8639aba02b8fbd8b9e3da880d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45b212bd167cdf293f25e42b6f09e06004f6008890ecc3b09de941fbcb2ce107" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "299f484aa2fc84fe0fdb0813472abeb598ac755a1c7e0a04fcd2b4cac70d7e55" + sha256 cellar: :any_skip_relocation, sonoma: "fd45d47fc242dea064fee61afcde3c009a7cff857950b8b7db6056cfcdfd6433" + sha256 cellar: :any_skip_relocation, arm64_linux: "450126379d02d9d52a19962976bb86ac5cda9de901297751f6471e93eb86df39" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71c2087864e5c1c096cb87e044d1ccace0db515bfe018818d51783a7c90bf89a" + end + + depends_on "rust" => :build + depends_on "libusb" + + def install + system "cargo", "install", *std_cargo_args + man1.install "doc/cyme.1" + bash_completion.install "doc/cyme.bash" => "cyme" + zsh_completion.install "doc/_cyme" + fish_completion.install "doc/cyme.fish" + end + + test do + # Test fails on headless CI + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + output = JSON.parse(shell_output("#{bin}/cyme --tree --json")) + assert_predicate output["buses"], :present? + end +end diff --git a/Formula/c/cypher-shell.rb b/Formula/c/cypher-shell.rb new file mode 100644 index 0000000000000..5f6b74d074bc3 --- /dev/null +++ b/Formula/c/cypher-shell.rb @@ -0,0 +1,30 @@ +class CypherShell < Formula + desc "Command-line shell where you can execute Cypher against Neo4j" + homepage "https://neo4j.com" + url "https://dist.neo4j.org/cypher-shell/cypher-shell-2025.10.1.zip" + sha256 "7434f54404a4b05b5ebf0a609aa3f7ebf11e5096a23aca1ffa8a52e2a06799e6" + license "GPL-3.0-only" + version_scheme 1 + + livecheck do + url "https://neo4j.com/deployment-center/" + regex(/href=.*?cypher-shell[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "88c71c5e0f5fa61f90260c60d7f1ef54601e2115277b25d94825213390b21ee8" + end + + depends_on "openjdk@21" + + def install + libexec.install Dir["*"] + (bin/"cypher-shell").write_env_script libexec/"bin/cypher-shell", Language::Java.overridable_java_home_env("21") + end + + test do + refute_match "unsupported version of the Java runtime", shell_output("#{bin}/cypher-shell -h 2>&1", 1) + # The connection will fail and print the name of the host + assert_match "doesntexist", shell_output("#{bin}/cypher-shell -a bolt://doesntexist 2>&1", 1) + end +end diff --git a/Formula/c/cyphernetes.rb b/Formula/c/cyphernetes.rb new file mode 100644 index 0000000000000..8473e4895d945 --- /dev/null +++ b/Formula/c/cyphernetes.rb @@ -0,0 +1,35 @@ +class Cyphernetes < Formula + desc "Kubernetes Query Language" + homepage "https://cyphernet.es" + url "https://github.com/AvitalTamir/cyphernetes/archive/refs/tags/v0.18.2.tar.gz" + sha256 "98c48dbc4263854c74c9216274c8ec1cb327d9accbf0458f86c2231de8c889e9" + license "Apache-2.0" + head "https://github.com/AvitalTamir/cyphernetes.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b380ece361c7b87ff3e6994d6f5a688d79d7a4e489cf74c768a3bbffc346a51f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8e2d361e03bd89d0b809099a72eac56a8ab8ad739965a12cf7786733198e937" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8e2d361e03bd89d0b809099a72eac56a8ab8ad739965a12cf7786733198e937" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f8e2d361e03bd89d0b809099a72eac56a8ab8ad739965a12cf7786733198e937" + sha256 cellar: :any_skip_relocation, sonoma: "47d0c969b66651f145c08a2dc6c600677bb6e9ab82c94a56e502a416a8e17440" + sha256 cellar: :any_skip_relocation, ventura: "47d0c969b66651f145c08a2dc6c600677bb6e9ab82c94a56e502a416a8e17440" + sha256 cellar: :any_skip_relocation, arm64_linux: "33ffd997179ea645d2516af81580a4160ed9a9cf6e1fef5e7e5469e729d8bd13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "daa7cab1009d82326c2ad177bb5fbc6f03a8fd84ab4344a1784e3b30f1bd4208" + end + + depends_on "go" => :build + + def install + system "make", "operator-manifests" + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/cyphernetes" + + generate_completions_from_executable(bin/"cyphernetes", "completion") + end + + test do + output = shell_output("#{bin}/cyphernetes query 'MATCH (d:Deployment)->(s:Service) RETURN d' 2>&1", 1) + assert_match("Error creating provider: failed to create config: invalid configuration", output) + + assert_match version.to_s, shell_output("#{bin}/cyphernetes version") + end +end diff --git a/Formula/c/cyrus-sasl.rb b/Formula/c/cyrus-sasl.rb new file mode 100644 index 0000000000000..926c0e96065af --- /dev/null +++ b/Formula/c/cyrus-sasl.rb @@ -0,0 +1,58 @@ +class CyrusSasl < Formula + desc "Simple Authentication and Security Layer" + homepage "https://www.cyrusimap.org/sasl/" + url "https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz" + sha256 "7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c" + license "BSD-3-Clause-Attribution" + revision 2 + + bottle do + sha256 arm64_tahoe: "17e620e6b3ab58620c3b6d2f06eca63d45ed857243b19f67b607ed144a68acd0" + sha256 arm64_sequoia: "da30f7a99a52b40b17ca249fe2a518a556aba23a8bec5cca7b1c5b4dac577239" + sha256 arm64_sonoma: "8cb90c0b643e0626e2dc31287654b45a6bbda61a2077879a8d29a47b793ded55" + sha256 arm64_ventura: "a842b727db6d438e03d495a94f5dd63e2f7a6634809cbe3b621195e180d56f64" + sha256 arm64_monterey: "ac7a6ac5d43047181241674de948c84e57fd26e2ae070dcb2bad243f57ffb0db" + sha256 arm64_big_sur: "dfa2cf772e87d85128b4ae58ed7f6d85ff078d673e5a49496fcad0b17af7b3e4" + sha256 sonoma: "5112a83906ea31b699c5a1ee149729298c160585cdc1c65702a81b6de5318193" + sha256 ventura: "b0ad0b2d1e4394623692dd7c32014677dcc364c32bae2a9a27913485ca07f91d" + sha256 monterey: "1e9df5f50cc72d9561b8f8985d3a7520db0de782c45a8d32530c1cd5bf9e9db5" + sha256 big_sur: "abf53f0d9551994232096d88a1e312c50ec2f9465730e734c3af75db46016103" + sha256 arm64_linux: "66658e5a01892c2952754447404b14f73a888c1cd5b97dbed3c6244dc4d62a2a" + sha256 x86_64_linux: "f1bc6d528c1c0e53c2eecb599e5127070654a7bdfb9acb0232cfd08bfaf38efd" + end + + keg_only :provided_by_macos + + depends_on "krb5" + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + + def install + system "./configure", + "--disable-macos-framework", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main(void) { + char buf[123] = "\\0"; + unsigned len = 0; + int ret = sasl_encode64("Hello, world!", 13, buf, sizeof buf, &len); + assert(ret == SASL_OK); + printf("%u %s", len, buf); + return 0; + } + CPP + + system ENV.cxx, "-o", "test", "test.cpp", "-I#{include}", "-L#{lib}", "-lsasl2" + assert_equal "20 SGVsbG8sIHdvcmxkIQ==", shell_output("./test") + end +end diff --git a/Formula/c/cython.rb b/Formula/c/cython.rb new file mode 100644 index 0000000000000..3da38b2364466 --- /dev/null +++ b/Formula/c/cython.rb @@ -0,0 +1,53 @@ +class Cython < Formula + desc "Compiler for writing C extensions for the Python language" + homepage "https://cython.org/" + url "https://files.pythonhosted.org/packages/e3/58/6a8321cc0791876dc2509d7a22fc75535a1a7aa770b3496772f58b0a53a4/cython-3.1.6.tar.gz" + sha256 "ff4ccffcf98f30ab5723fc45a39c0548a3f6ab14f01d73930c5bfaea455ff01c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e57711fde75b27b25be18fbe65e6cda1e71a8402ce959ad439f114f0a1868a42" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68f812f586f358bb46f6d59996bee4d40b73533102c6a5cd86c5d1042879dab2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a23dd70860cdc2262380f4bdd1bd5b0ea3f6543a7f7a207902a29c05a804793a" + sha256 cellar: :any_skip_relocation, sonoma: "e5a0f8878f755b196d05122846ce0b91504e62e5ec2d9e7f7ad30fb86e55c59f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0345ed2901daf5c30595b73ead2b96b9f027669159f9f38d73be67162ef8822d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46bdac74bc3ab3cc21a8c535b2c73775c74708b6536966fc7bc9ec06e17289b1" + end + + keg_only <<~EOS + this formula is mainly used internally by other formulae. + Users are advised to use `pip` to install cython + EOS + + depends_on "python-setuptools" => [:build, :test] + depends_on "python@3.14" + + def python3 + "python3.14" + end + + def install + ENV.prepend_create_path "PYTHONPATH", libexec/Language::Python.site_packages(python3) + system python3, "-m", "pip", "install", *std_pip_args(prefix: libexec), "." + + bin.install (libexec/"bin").children + bin.env_script_all_files(libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"]) + end + + test do + ENV.prepend_path "PYTHONPATH", libexec/Language::Python.site_packages(python3) + + phrase = "You are using Homebrew" + (testpath/"package_manager.pyx").write "print '#{phrase}'" + (testpath/"setup.py").write <<~PYTHON + from distutils.core import setup + from Cython.Build import cythonize + + setup( + ext_modules = cythonize("package_manager.pyx") + ) + PYTHON + system python3, "setup.py", "build_ext", "--inplace" + assert_match phrase, shell_output("#{python3} -c 'import package_manager'") + end +end diff --git a/Formula/c/czg.rb b/Formula/c/czg.rb new file mode 100644 index 0000000000000..f69eb7f5bd7e3 --- /dev/null +++ b/Formula/c/czg.rb @@ -0,0 +1,26 @@ +class Czg < Formula + desc "Interactive Commitizen CLI that generate standardized commit messages" + homepage "https://github.com/Zhengqbbb/cz-git" + url "https://registry.npmjs.org/czg/-/czg-1.12.0.tgz" + sha256 "3cddc98d072707ab6f40d65057b40bb7b57ee7f7cd00cea572f2c8a4ccd60a0a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7c6a8d80823d004678e69bc17eaa306e0f93dae326b93e0a5d0456fbcc8d35cc" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_equal "#{version}\n", shell_output("#{bin}/czg --version") + # test: git staging verifies is working + system "git", "init" + assert_match ">>> No files added to staging! Did you forget to run `git add` ?", + shell_output("NO_COLOR=1 #{bin}/czg 2>&1", 1) + end +end diff --git a/Formula/c/czkawka.rb b/Formula/c/czkawka.rb new file mode 100644 index 0000000000000..d7bf4b9ba3854 --- /dev/null +++ b/Formula/c/czkawka.rb @@ -0,0 +1,64 @@ +class Czkawka < Formula + desc "Duplicate file utility" + homepage "https://github.com/qarmin/czkawka" + url "https://github.com/qarmin/czkawka/archive/refs/tags/10.0.0.tar.gz" + sha256 "66ff3c231abe2feaeb377f52bb188eb81686c162d7f3fd28ed5b7374f0046c48" + license all_of: ["MIT", "CC-BY-4.0"] + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "9e864b494ab69223c4cc4c2c13a6fd0c18ee3901a57ee9849049246f8e4f7ea9" + sha256 cellar: :any, arm64_sequoia: "5a04f342abe94f8043873f428335a0c6a84250fb7286858c8e1a5fd8fb39c2e6" + sha256 cellar: :any, arm64_sonoma: "cdc99a59f5fccc3c03a9d5c0c929a2488a3ff24244b1cba6e7d62ac3c9da204f" + sha256 cellar: :any, arm64_ventura: "45bbeb2050f67f8cc1934ab21318b957d65fde3855f0936c4c7a3a35c75aed5c" + sha256 cellar: :any, sonoma: "6870706cdfd71b70bad879a332f4f23bd30cec361447cf71a2da7a4c230e97f5" + sha256 cellar: :any, ventura: "fbd0d1f670f060de6b6ccd83c49d594fc0b65b7a9ba1d28e37065a1b9e7ded10" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe11fc2b2f976a53a49a791eabf16b1cfa43ca223d5b7073fc9608fc7ef5bd86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "193dceccee09d909d8be8dd0c328a6af8a522c282ebd53d21aad91cb936b74aa" + end + + depends_on "rust" => :build + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "dav1d" + depends_on "ffmpeg" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk4" + depends_on "libheif" + depends_on "librsvg" + depends_on "pango" + depends_on "pkgconf" + depends_on "webp-pixbuf-loader" + + uses_from_macos "bzip2" + + on_macos do + depends_on "gettext" + depends_on "graphene" + depends_on "harfbuzz" + end + + def install + system "cargo", "install", "--features", "heif,libraw,libavif", *std_cargo_args(path: "czkawka_cli") + system "cargo", "install", "--features", "heif,libraw,libavif", *std_cargo_args(path: "czkawka_gui") + end + + def post_install + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + ENV.prepend_path "XDG_DATA_DIRS", HOMEBREW_PREFIX/"share" + end + + def caveats + <<~EOS + czkawka_gui requires $XDG_DATA_DIRS to contain "#{HOMEBREW_PREFIX}/share". + EOS + end + + test do + system bin/"czkawka_cli", "dup", "--directories", testpath, "--file-to-save", "results.txt" + assert_match "Not found any duplicates", File.read("results.txt") + + assert_match version.to_s, shell_output("#{bin}/czkawka_cli --version") + end +end diff --git a/Formula/c/czmq.rb b/Formula/c/czmq.rb new file mode 100644 index 0000000000000..d749dd15c874d --- /dev/null +++ b/Formula/c/czmq.rb @@ -0,0 +1,97 @@ +class Czmq < Formula + desc "High-level C binding for ZeroMQ" + homepage "http://czmq.zeromq.org/" + license "MPL-2.0" + + stable do + url "https://github.com/zeromq/czmq/releases/download/v4.2.1/czmq-4.2.1.tar.gz" + sha256 "5d720a204c2a58645d6f7643af15d563a712dad98c9d32c1ed913377daa6ac39" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + # Fix `Abort trap: 6` + # https://github.com/zeromq/czmq/issues/2155 + # remove in next release + patch do + url "https://github.com/zeromq/czmq/commit/7f744f730941dc8ca68750cd977a38a655d1a646.patch?full_index=1" + sha256 "efd3749181bedaab37348ca0fe2efa3db77c4b9d46a49f410476d8473cb20c01" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "256774bf2e64754f05e01944246e707c92472656a9d9b7680962a0ecf6372ddf" + sha256 cellar: :any, arm64_sequoia: "563fccc28279b87f02a5545f8e041090ead4e42f04f5df7e50b421abbb88f1eb" + sha256 cellar: :any, arm64_sonoma: "cce35246b601a70fecc64be08943a2c893d9ad2dd2567a3ec3c17a270a8a80b4" + sha256 cellar: :any, arm64_ventura: "e51e2cc5ccca8943ab12a1587eb9b6aa533603ea2575db6928827bdaa0d807d1" + sha256 cellar: :any, arm64_monterey: "47bd6d29801b9d1a33d2d1e0655192e500e8c2a7698083d0838b178c068d5cd4" + sha256 cellar: :any, arm64_big_sur: "f1fd8af878b29414140b01fd729603d328a6f3ed3a520c967db05a231361c9bf" + sha256 cellar: :any, sonoma: "dc9cc7878cc5660a6b8a16c59bc158519aa391e26d2e9ddec744895bb52c0b9b" + sha256 cellar: :any, ventura: "67d8bb3b5214620f2e55a65b779e4d92affde8d6468ac25eccc5b4d1ac504ee8" + sha256 cellar: :any, monterey: "300244e12b2cc498876e3b6a346f8ad24ccf1a256d8dc84c4e00b594c71c4bce" + sha256 cellar: :any, big_sur: "d5abd045c165de80872c22ecf503132110c26e35d05b0b50c78dec97fd31e628" + sha256 cellar: :any_skip_relocation, arm64_linux: "55340fbd1cbc1236fd899f432fcbf4501f9ec3761c7e3d141a0efd3e807fe75d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "376bc4229fd95f09cf0fed87437a5b7ede0698f2846abd1199cde96aae7a86fe" + end + + head do + url "https://github.com/zeromq/czmq.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "asciidoc" => :build + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + depends_on "lz4" + depends_on "zeromq" + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make" + system "make", "ZSYS_INTERFACE=lo0", "check-verbose" + system "make", "install" + rm Dir["#{bin}/*.gsl"] + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) + { + zsock_t *push = zsock_new_push("inproc://hello-world"); + zsock_t *pull = zsock_new_pull("inproc://hello-world"); + + zstr_send(push, "Hello, World!"); + char *string = zstr_recv(pull); + puts(string); + zstr_free(&string); + + zsock_destroy(&pull); + zsock_destroy(&push); + + return 0; + } + C + + flags = ENV.cflags.to_s.split + %W[ + -I#{include} + -L#{lib} + -lczmq + ] + system ENV.cc, "-o", "test", "test.c", *flags + assert_equal "Hello, World!\n", shell_output("./test") + end +end diff --git a/Formula/c10t.rb b/Formula/c10t.rb deleted file mode 100644 index 150e519ec3daa..0000000000000 --- a/Formula/c10t.rb +++ /dev/null @@ -1,50 +0,0 @@ -class C10t < Formula - desc "Minecraft cartography tool" - homepage "https://github.com/udoprog/c10t" - url "https://github.com/udoprog/c10t/archive/1.7.tar.gz" - sha256 "0e5779d517105bfdd14944c849a395e1a8670bedba5bdab281a0165c3eb077dc" - revision 1 - - bottle do - cellar :any - sha256 "1bdc623e16b1854d4865ce29e7fb6e0724262ea2b998111c6ab908b5dbd5af17" => :mojave - sha256 "ad850802e7b161e55c19bcb89d2af5a10a536574bf25a1c45a2693299d6182d2" => :high_sierra - sha256 "fbfab463dd8a2af17bb3b8d07d448d8411f9393d98b1b35f6862a7dc92da7c82" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "freetype" - - # Needed to compile against newer boost - # Can be removed for the next version of c10t after 1.7 - # See: https://github.com/udoprog/c10t/pull/153 - patch do - url "https://github.com/udoprog/c10t/commit/4a392b9f06d08c70290f4c7591e84ecdbc73d902.diff?full_index=1" - sha256 "5e1c6d9906c3cf2aaaceca2570236585d3404ab4107cfb9169697e9cab30072d" - end - - # Fix freetype detection; adapted from this upstream commit: - # https://github.com/udoprog/c10t/commit/2a2b8e49d7ed4e51421cc71463c1c2404adc6ab1 - patch do - url "https://gist.githubusercontent.com/mistydemeo/f7ab02089c43dd557ef4/raw/a0ae7974e635b8ebfd02e314cfca9aa8dc95029d/c10t-freetype.diff" - sha256 "9fbb7ccc643589ac1d648e105369e63c9220c26d22f7078a1f40b27080d05db4" - end - - # Ensure zlib header is included for libpng; fixed upstream - patch do - url "https://github.com/udoprog/c10t/commit/800977bb23e6b4f9da3ac850ac15dd216ece0cda.diff?full_index=1" - sha256 "5275cb43178b2f6915b14d214ec47c9182e63ff23771426b71f3c0a5450721bf" - end - - def install - inreplace "test/CMakeLists.txt", "boost_unit_test_framework", "boost_unit_test_framework-mt" - system "cmake", ".", *std_cmake_args - system "make" - bin.install "c10t" - end - - test do - system "#{bin}/c10t", "--list-colors" - end -end diff --git a/Formula/c14-cli.rb b/Formula/c14-cli.rb deleted file mode 100644 index ca882a9502b1d..0000000000000 --- a/Formula/c14-cli.rb +++ /dev/null @@ -1,32 +0,0 @@ -class C14Cli < Formula - desc "Manage your Online C14 archives from the command-line" - homepage "https://github.com/online-net/c14-cli" - url "https://github.com/online-net/c14-cli/archive/0.3.tar.gz" - sha256 "d4a2e839394cb5f169bfb3be0102569a310dd7315aba3cdb1dfcd9d9c6e43543" - head "https://github.com/online-net/c14-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "3eed580ea37aefbc419ec97a233f07c79549c4a155d7bf4c4809c5034380c24f" => :mojave - sha256 "4001f6779bdc27b3e3587e3a0502e65d94f78a6f108efd714b96c2d865bb592d" => :high_sierra - sha256 "a146090fbcacb6982155419c4f8e38d9ccb8fa6283c5d2611ccf30ea1960ed84" => :sierra - sha256 "399d93ad762d178607ca3da8d766cc4716ac33968c058a849f080d68dea634d7" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = buildpath - (buildpath/"src/github.com/online-net/c14-cli").install Dir["*"] - - system "go", "build", "-ldflags", - "-X github.com/online-net/c14-cli/pkg/version.GITCOMMIT=homebrew", - "-o", bin/"c14", "github.com/online-net/c14-cli/cmd/c14/" - end - - test do - output = shell_output(bin/"c14 help") - assert_match "Interact with C14 from the command line.", output - end -end diff --git a/Formula/c2048.rb b/Formula/c2048.rb deleted file mode 100644 index e0ebff78c453a..0000000000000 --- a/Formula/c2048.rb +++ /dev/null @@ -1,34 +0,0 @@ -class C2048 < Formula - desc "Console version of 2048" - homepage "https://github.com/mevdschee/2048.c" - url "https://github.com/mevdschee/2048.c.git", :revision => "578a5f314e1ce31b57e645a8c0a2c9d9d5539cde" - version "0+20150805" - head "https://github.com/mevdschee/2048.c.git" - - bottle do - cellar :any_skip_relocation - sha256 "dd0cc60f407ccb43f471d7123b9a09fa0b2161ee083638a432ee25795a96ca8f" => :mojave - sha256 "e5f553baf87fc7ac9f0fa4471d3e9be29328df167700181d9663f61293436888" => :high_sierra - sha256 "d2f33783cf7cd2ac69eaed113d940aca31e02e5863fcdb40e200e3fe9a4d0623" => :sierra - sha256 "8f9e75196f87718be0c572f731cecba0c8cd4e8dc35f8b3027392cd6e1c45f5d" => :el_capitan - sha256 "c06bde9e58788a1a4f16b6d0ace89be02cf07f86211e0c78af5fdaa7d70a3614" => :yosemite - end - - def install - system "make" - bin.install "2048" - end - - def caveats; <<~EOS - The game supports different color schemes. - For the black-to white: - 2048 blackwhite - For the blue-to-red: - 2048 bluered - EOS - end - - test do - system "#{bin}/2048", "test" - end -end diff --git a/Formula/cabal-install.rb b/Formula/cabal-install.rb deleted file mode 100644 index 9bdf65afc3fce..0000000000000 --- a/Formula/cabal-install.rb +++ /dev/null @@ -1,30 +0,0 @@ -class CabalInstall < Formula - desc "Command-line interface for Cabal and Hackage" - homepage "https://www.haskell.org/cabal/" - url "https://hackage.haskell.org/package/cabal-install-2.4.1.0/cabal-install-2.4.1.0.tar.gz" - sha256 "69bcb2b54a064982412e1587c3c5c1b4fada3344b41b568aab25730034cb21ad" - head "https://github.com/haskell/cabal.git", :branch => "2.4" - - bottle do - cellar :any_skip_relocation - sha256 "4c9ad9914b483ffb64f4449bd6446cb8c0ddfeeff42eddde9137884af3471825" => :mojave - sha256 "a2f4ba064479e169fcc615f924758c8c7ee9f54a8ba2cd9569f19550e7394951" => :high_sierra - sha256 "f0b7ed1302d197f84eaedc7ae1a3ad8099fe3b0ed02fb5d03590caf3c8e1627c" => :sierra - end - - depends_on "ghc" - - fails_with :clang if MacOS.version <= :lion # Same as ghc.rb - - def install - cd "cabal-install" if build.head? - - system "sh", "bootstrap.sh", "--sandbox" - bin.install ".cabal-sandbox/bin/cabal" - bash_completion.install "bash-completion/cabal" - end - - test do - system "#{bin}/cabal", "--config-file=#{testpath}/config", "info", "Cabal" - end -end diff --git a/Formula/cabextract.rb b/Formula/cabextract.rb deleted file mode 100644 index e71cec6774e92..0000000000000 --- a/Formula/cabextract.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Cabextract < Formula - desc "Extract files from Microsoft cabinet files" - homepage "https://www.cabextract.org.uk/" - url "https://www.cabextract.org.uk/cabextract-1.9.tar.gz" - sha256 "1bbc793d83c73288acd7e28ce33ec04955a76c73bf6471424ff835d725fcc4c1" - - bottle do - cellar :any_skip_relocation - sha256 "41b602b3d06f9414fd8d6b964b8735e345c133d51b2e12f52a1bc277083389b5" => :mojave - sha256 "6f52b4c2e1debdcc2d5fa8d47c3678ec8dd703afc7c7b193596f1fe319eaa9cc" => :high_sierra - sha256 "0fd78ce411d50aacad23db777441ae624977604036c2674b9eed24853ce13bca" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # probably the smallest valid .cab file - cab = <<~EOS.gsub(/\s+/, "") - 4d5343460000000046000000000000002c000000000000000301010001000000d20400003 - e00000001000000000000000000000000003246899d200061000000000000000000 - EOS - (testpath/"test.cab").binwrite [cab].pack("H*") - - system "#{bin}/cabextract", "test.cab" - assert_predicate testpath/"a", :exist? - end -end diff --git a/Formula/cabocha.rb b/Formula/cabocha.rb deleted file mode 100644 index 3cc5ca6bcebf4..0000000000000 --- a/Formula/cabocha.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Cabocha < Formula - desc "Yet Another Japanese Dependency Structure Analyzer" - homepage "https://taku910.github.io/cabocha/" - # Files are listed in https://drive.google.com/drive/folders/0B4y35FiV1wh7cGRCUUJHVTNJRnM - url "https://dl.bintray.com/homebrew/mirror/cabocha-0.69.tar.bz2" - mirror "https://mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/cabocha-20160909/cabocha-0.69.tar.bz2" - sha256 "9db896d7f9d83fc3ae34908b788ae514ae19531eb89052e25f061232f6165992" - - bottle do - sha256 "7142730e5fa6dd1203d6f34168f85d7704050cf620891a9d0db4f9eefc49370a" => :mojave - sha256 "beafa5ccf84633bed67d405f22ac8e570d2dc2fe0e10fccf8c11076639c672ae" => :high_sierra - sha256 "27bd41bab80ab64fb32e5bc8b568864b874f0dec16817d38c37abd3c7582c694" => :sierra - sha256 "bf3ed6bc9333b43919264913c40a86997a7601a83abf6dcfa1dfe14745b3fc7c" => :el_capitan - sha256 "fe97decdca655899faffd6356bb8ddbb52d4949222690835374c3aeb9a65cdb2" => :yosemite - sha256 "794df46e362f3146b2bab17ba132978609954b0ba0a51ffa4d6d4e8845548764" => :mavericks - sha256 "b1aaf6623ac7332459c795ebd992ed92224b0d0b9e20fb57dd0313fbeea7647c" => :mountain_lion - end - - depends_on "crf++" - depends_on "mecab" - depends_on "mecab-ipadic" - - def install - ENV["LIBS"] = "-liconv" - - inreplace "Makefile.in" do |s| - s.change_make_var! "CFLAGS", ENV.cflags - s.change_make_var! "CXXFLAGS", ENV.cflags - end - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-charset=UTF8 - --with-posset=IPA - ] - - system "./configure", *args - system "make", "install" - end - - test do - result = `echo "CaboCha はフリーソフトウェアです。" | cabocha | md5`.chomp - assert_equal "a5b8293e6ebcb3246c54ecd66d6e18ee", result - end -end diff --git a/Formula/cadaver.rb b/Formula/cadaver.rb deleted file mode 100644 index e23d58d0d133d..0000000000000 --- a/Formula/cadaver.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Cadaver < Formula - desc "Command-line client for DAV" - homepage "https://directory.fsf.org/wiki/Cadaver" - url "https://mirrorservice.org/sites/download.salixos.org/i486/extra-14.2/source/network/cadaver/cadaver-0.23.3.tar.gz" - mirror "https://src.fedoraproject.org/repo/pkgs/cadaver/cadaver-0.23.3.tar.gz/502ecd601e467f8b16056d2acca39a6f/cadaver-0.23.3.tar.gz" - mirror "https://web.archive.org/web/20170629224036/www.webdav.org/cadaver/cadaver-0.23.3.tar.gz" - sha256 "fd4ce68a3230ba459a92bcb747fc6afa91e46d803c1d5ffe964b661793c13fca" - revision 2 - - bottle do - sha256 "91c567ec5f2d8b2ce2c0b78868a07ef9fa3340c8bdd651a59d21ee208d6bb49c" => :mojave - sha256 "25a0e28cd5861306d85971db60a3f0e3141cf8506aa8def86fbdb5b2f5bc073a" => :high_sierra - sha256 "a67a574144407776beb82dbe6ddafc74f426e2c159e144d1bddb9b30c0719892" => :sierra - sha256 "33ea3e322fb91ce080693dfc11fc631eb4103a20c8b3b5eaa06dcc02d61a44bf" => :el_capitan - sha256 "cbfcae8d96f1c55f58220c319cf75fb953abfc765c3eb76d3dfb3973fff8d343" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "neon" - depends_on "openssl" - depends_on "readline" - - # enable build with the latest neon - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", - "--with-ssl=openssl", - "--with-libs=#{Formula["openssl"].opt_prefix}", - "--with-neon=#{Formula["neon"].opt_prefix}" - system "make", "-C", "lib/intl" - system "make", "install" - end - - test do - assert_match "cadaver #{version}", shell_output("#{bin}/cadaver -V", 255) - end -end - -__END__ ---- cadaver-0.23.3-orig/configure 2009-12-16 01:36:26.000000000 +0300 -+++ cadaver-0.23.3/configure 2013-11-04 22:44:00.000000000 +0400 -@@ -10328,7 +10328,7 @@ - $as_echo "$ne_cv_lib_neon" >&6; } - if test "$ne_cv_lib_neon" = "yes"; then - ne_cv_lib_neonver=no -- for v in 27 28 29; do -+ for v in 27 28 29 30; do - case $ne_libver in - 0.$v.*) ne_cv_lib_neonver=yes ;; - esac -@@ -10975,8 +10975,8 @@ - fi - - else -- { $as_echo "$as_me:$LINENO: incompatible neon library version $ne_libver: wanted 0.27 28 29" >&5 --$as_echo "$as_me: incompatible neon library version $ne_libver: wanted 0.27 28 29" >&6;} -+ { $as_echo "$as_me:$LINENO: incompatible neon library version $ne_libver: wanted 0.27 28 29 30" >&5 -+$as_echo "$as_me: incompatible neon library version $ne_libver: wanted 0.27 28 29 30" >&6;} - neon_got_library=no - fi - diff --git a/Formula/caddy.rb b/Formula/caddy.rb deleted file mode 100644 index 34b35004204b9..0000000000000 --- a/Formula/caddy.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Caddy < Formula - desc "Alternative general-purpose HTTP/2 web server" - homepage "https://caddyserver.com/" - url "https://github.com/mholt/caddy/archive/v0.11.1.tar.gz" - sha256 "e24ddb1690a265fb3c40efa5bc720964b85b9d2cad8d994ee4ed6271761984bf" - head "https://github.com/mholt/caddy.git" - - bottle do - cellar :any_skip_relocation - sha256 "6774dca72da13a2966185fb1f0d869dee16ef4186630b9e9143c49420cca84fa" => :mojave - sha256 "72a1f55a34741b3d3b437e4fa6d04b4cdf21eb15e233c0b3d73a5e03324b7387" => :high_sierra - sha256 "23238e3befc4e2c79d35edd743cce9c9946f12495d3b0c470df800f9160a1b18" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - - (buildpath/"src/github.com/mholt").mkpath - ln_s buildpath, "src/github.com/mholt/caddy" - - system "go", "build", "-ldflags", - "-X github.com/mholt/caddy/caddy/caddymain.gitTag=#{version}", - "-o", bin/"caddy", "github.com/mholt/caddy/caddy" - end - - plist_options :manual => "caddy -conf #{HOMEBREW_PREFIX}/etc/Caddyfile" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/caddy - -conf - #{etc}/Caddyfile - - RunAtLoad - - - - EOS - end - - test do - begin - io = IO.popen("#{bin}/caddy") - sleep 2 - ensure - Process.kill("SIGINT", io.pid) - Process.wait(io.pid) - end - - io.read =~ /0\.0\.0\.0:2015/ - end -end diff --git a/Formula/cadubi.rb b/Formula/cadubi.rb deleted file mode 100644 index 47a05c5d8f739..0000000000000 --- a/Formula/cadubi.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Cadubi < Formula - desc "Creative ASCII drawing utility" - homepage "https://github.com/statico/cadubi/" - url "https://github.com/statico/cadubi/archive/v1.3.4.tar.gz" - sha256 "624f85bb16d8b0bc392d761d1121828d09cfc79b3ded5b1220e9b4262924a1a0" - - bottle :unneeded - - def install - inreplace "cadubi", "$Bin/help.txt", "#{doc}/help.txt" - bin.install "cadubi" - doc.install "help.txt" - man1.install "cadubi.1" - end - - test do - output = pipe_output("script -q /dev/null #{bin}/cadubi -v", "cat") - assert_match "cadubi (Creative ASCII Drawing Utility By Ian) #{version}", output - end -end diff --git a/Formula/caf.rb b/Formula/caf.rb deleted file mode 100644 index b6b04151cbb63..0000000000000 --- a/Formula/caf.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Caf < Formula - # Renamed from libccpa - desc "Implementation of the Actor Model for C++" - homepage "https://actor-framework.org/" - url "https://github.com/actor-framework/actor-framework/archive/0.16.3.tar.gz" - sha256 "8596923b42dba6363d06bd053f179416ac96cdf3864e98a2ea78723a0a95a46f" - head "https://github.com/actor-framework/actor-framework.git" - - bottle do - cellar :any - sha256 "436387129e226973bd885fb53195e51fd3c22235af24efe75765d895389ac255" => :mojave - sha256 "f1322c0374e8e6ccb2922c42602a67bf435ef77f0cebd3133f34af3b58f7f6b9" => :high_sierra - sha256 "16951a14af79ba3aa234b6a536e8e132e2a5739bba7759170a656bfa2eb88ff4" => :sierra - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - system "./configure", "--prefix=#{prefix}", "--no-examples", - "--build-static", "--no-opencl" - system "make", "--directory=build" - system "make", "--directory=build", "test" - system "make", "--directory=build", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace caf; - void caf_main(actor_system& system) { - scoped_actor self{system}; - self->spawn([] { - std::cout << "test" << std::endl; - }); - self->await_all_other_actors_done(); - } - CAF_MAIN() - EOS - ENV.cxx11 - system *(ENV.cxx.split + %W[test.cpp -L#{lib} -lcaf_core -o test]) - system "./test" - end -end diff --git a/Formula/caffe.rb b/Formula/caffe.rb deleted file mode 100644 index 323dab465602c..0000000000000 --- a/Formula/caffe.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Caffe < Formula - desc "Fast open framework for deep learning" - homepage "https://caffe.berkeleyvision.org/" - url "https://github.com/BVLC/caffe/archive/1.0.tar.gz" - sha256 "71d3c9eb8a183150f965a465824d01fe82826c22505f7aa314f700ace03fa77f" - revision 8 - - bottle do - rebuild 1 - sha256 "52da439d2c0c5f56cb5c547133422ae9928e6fa850bdfefe921b9183a8597130" => :mojave - sha256 "12b1b7e9b2b8e887cf5c5216c6a2b32476246ccbe08bb28102dab22cfa43a7c5" => :high_sierra - sha256 "39a55cf3eefc4bcc7e1787fc5413b34ffe82003af3f8c97f2843c9f257961c32" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "gflags" - depends_on "glog" - depends_on "hdf5" - depends_on "leveldb" - depends_on "lmdb" - depends_on "opencv" - depends_on "protobuf" - depends_on "snappy" - depends_on "szip" - - resource "test_model_weights" do - url "http://dl.caffe.berkeleyvision.org/bvlc_reference_caffenet.caffemodel" - sha256 "472d4a06035497b180636d8a82667129960371375bd10fcb6df5c6c7631f25e0" - end - - # Fix compilation with OpenCV 4 - # https://github.com/BVLC/caffe/issues/6652 - patch do - url "https://github.com/BVLC/caffe/pull/6638.diff?full_index=1" - sha256 "6a6368d715284fabfa96660b6d24d1f4f419f3e6cdddab9a7293954fee4ec2bc" - end - - needs :cxx11 - - def install - ENV.cxx11 - - args = std_cmake_args + %w[ - -DALLOW_LMDB_NOLOCK=OFF - -DBUILD_SHARED_LIBS=ON - -DBUILD_docs=OFF - -DBUILD_matlab=OFF - -DBUILD_python=OFF - -DBUILD_python_layer=OFF - -DCPU_ONLY=ON - -DUSE_LEVELDB=ON - -DUSE_LMDB=ON - -DUSE_NCCL=OFF - -DUSE_OPENCV=ON - -DUSE_OPENMP=OFF - ] - - system "cmake", ".", *args - system "make", "install" - pkgshare.install "models" - end - - test do - model = "bvlc_reference_caffenet" - m_path = "#{pkgshare}/models/#{model}" - resource("test_model_weights").stage do - system "#{bin}/caffe", "test", - "-model", "#{m_path}/deploy.prototxt", - "-solver", "#{m_path}/solver.prototxt", - "-weights", "#{model}.caffemodel" - end - end -end diff --git a/Formula/cairo.rb b/Formula/cairo.rb deleted file mode 100644 index fabefb762956a..0000000000000 --- a/Formula/cairo.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Cairo < Formula - desc "Vector graphics library with cross-device output support" - homepage "https://cairographics.org/" - url "https://cairographics.org/releases/cairo-1.16.0.tar.xz" - sha256 "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331" - - bottle do - sha256 "204d0a3df9ebebef6f553b4a583351f14b84ca8682537941f2c04ba971999444" => :mojave - sha256 "f518c9e6cd207647eedff70720fc99a85eaf143da866f4e679ffb0b6c6c50098" => :high_sierra - sha256 "1b0421e0159c06862b742e7868dbef23985afc2f1e282c4d985ff13725995a6d" => :sierra - end - - head do - url "https://anongit.freedesktop.org/git/cairo", :using => :git - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "fontconfig" - depends_on "freetype" - depends_on "glib" - depends_on "libpng" - depends_on "pixman" - - def install - if build.head? - ENV["NOCONFIGURE"] = "1" - system "./autogen.sh" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-gobject=yes", - "--enable-svg=yes", - "--enable-tee=yes", - "--enable-quartz-image", - "--enable-xcb=no", - "--enable-xlib=no", - "--enable-xlib-xrender=no" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - - cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 600, 400); - cairo_t *context = cairo_create(surface); - - return 0; - } - EOS - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gettext = Formula["gettext"] - glib = Formula["glib"] - libpng = Formula["libpng"] - pixman = Formula["pixman"] - flags = %W[ - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/cairo - -I#{libpng.opt_include}/libpng16 - -I#{pixman.opt_include}/pixman-1 - -L#{lib} - -lcairo - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/cairomm.rb b/Formula/cairomm.rb deleted file mode 100644 index 777ef69c7289f..0000000000000 --- a/Formula/cairomm.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Cairomm < Formula - desc "Vector graphics library with cross-device output support" - homepage "https://cairographics.org/cairomm/" - url "https://cairographics.org/releases/cairomm-1.12.2.tar.gz" - sha256 "45c47fd4d0aa77464a75cdca011143fea3ef795c4753f6e860057da5fb8bd599" - - bottle do - cellar :any - sha256 "bbea26f62be4ffee655db277b96bbaa49303ff5c3a1e8730c24c6f821e50b9c6" => :mojave - sha256 "80db0528a9b198b3cf17d3b450982a26fd1619a15ace2087f6f52f1347b89499" => :high_sierra - sha256 "da41ea7c4cd90ab7183f4eba82f6921fd70b8a3ad0301054f2152214efe33373" => :sierra - sha256 "4fec10a5e15cceceee0b93e11bf000d9f6365cfc1c97dbc255b4a4d7d7d6c8dd" => :el_capitan - sha256 "ce58504dbe14cd1a27aeecd7eed1d95c6fa7819b8ff6ab451e02462cdc699e83" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "libpng" - depends_on "libsigc++" - - needs :cxx11 - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main(int argc, char *argv[]) - { - Cairo::RefPtr surface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 600, 400); - Cairo::RefPtr cr = Cairo::Context::create(surface); - return 0; - } - EOS - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gettext = Formula["gettext"] - glib = Formula["glib"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++"] - pixman = Formula["pixman"] - flags = %W[ - -I#{cairo.opt_include}/cairo - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/cairomm-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/cairomm-1.0/include - -I#{pixman.opt_include}/pixman-1 - -L#{cairo.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -lcairo - -lcairomm-1.0 - -lsigc-2.0 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/cake.rb b/Formula/cake.rb deleted file mode 100644 index 57274df721a51..0000000000000 --- a/Formula/cake.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Cake < Formula - desc "Cross platform build automation system with a C# DSL" - homepage "https://cakebuild.net/" - url "https://github.com/cake-build/cake/releases/download/v0.32.0/Cake-bin-net461-v0.32.0.zip" - sha256 "2cc8ead783887dfc116624f3e5b36d2eb1a31c9328afa644235b69df80f8670a" - - bottle :unneeded - - depends_on "mono" - - conflicts_with "coffeescript", :because => "both install `cake` binaries" - - def install - libexec.install Dir["*.dll"] - libexec.install Dir["*.exe"] - libexec.install Dir["*.xml"] - - bin.mkpath - (bin/"cake").write <<~EOS - #!/bin/bash - mono #{libexec}/Cake.exe "$@" - EOS - end - - test do - (testpath/"build.cake").write <<~EOS - var target = Argument ("target", "info"); - - Task("info").Does(() => - { - Information ("Hello Homebrew"); - }); - - RunTarget ("info"); - EOS - assert_match "Hello Homebrew\n", shell_output("#{bin}/cake build.cake") - end -end diff --git a/Formula/calabash.rb b/Formula/calabash.rb deleted file mode 100644 index df3f3d08e63b0..0000000000000 --- a/Formula/calabash.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Calabash < Formula - desc "XProc (XML Pipeline Language) implementation" - homepage "https://xmlcalabash.com/" - url "https://github.com/ndw/xmlcalabash1/releases/download/1.1.22-98/xmlcalabash-1.1.22-98.zip" - sha256 "da28fd3b0b0085308e814c09c7c33609d573f73f93e66d216772bf2b5b346888" - - bottle :unneeded - - depends_on "saxon" - - def install - libexec.install Dir["*"] - bin.write_jar_script libexec/"xmlcalabash-#{version}.jar", "calabash", "-Xmx1024m" - end - - test do - # This small XML pipeline (*.xpl) that comes with Calabash - # is basically its equivalent "Hello World" program. - system "#{bin}/calabash", "#{libexec}/xpl/pipe.xpl" - end -end diff --git a/Formula/calc.rb b/Formula/calc.rb deleted file mode 100644 index 072c65d75ef28..0000000000000 --- a/Formula/calc.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Calc < Formula - desc "Arbitrary precision calculator" - homepage "http://www.isthe.com/chongo/tech/comp/calc/" - url "https://downloads.sourceforge.net/project/calc/calc/2.12.7.1/calc-2.12.7.1.tar.bz2" - sha256 "eb1dc5dd680019e30264109167e20539fe9ac869049d8b1639781a51d1dea84c" - - bottle do - sha256 "4e766215d68c33ce4eccf7856549aa179a44b76008230cf8560057798262e3e7" => :mojave - sha256 "cdd8b3cb08bc725934ad4ae10c691325a97ee7a1e441d30469729fa98222827a" => :high_sierra - sha256 "4af7c47ad39d8992203f12e7d8085e0c83735bff0b3c2e4df4e64e31edfe6ddf" => :sierra - end - - depends_on "readline" - - def install - ENV.deparallelize - - ENV["EXTRA_CFLAGS"] = ENV.cflags - ENV["EXTRA_LDFLAGS"] = ENV.ldflags - - readline = Formula["readline"] - - system "make", "install", "INCDIR=#{MacOS.sdk_path}/usr/include", - "BINDIR=#{bin}", - "LIBDIR=#{lib}", - "MANDIR=#{man1}", - "CALC_INCDIR=#{include}/calc", - "CALC_SHAREDIR=#{pkgshare}", - "USE_READLINE=-DUSE_READLINE", - "READLINE_LIB=-L#{readline.opt_lib} -lreadline", - "READLINE_EXTRAS=-lhistory -lncurses" - libexec.install "#{bin}/cscript" - end - - test do - assert_equal "11", shell_output("#{bin}/calc 0xA + 1").strip - end -end diff --git a/Formula/calcurse.rb b/Formula/calcurse.rb deleted file mode 100644 index a8c2debf4ba3c..0000000000000 --- a/Formula/calcurse.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Calcurse < Formula - desc "Text-based personal organizer" - homepage "https://calcurse.org/" - url "https://calcurse.org/files/calcurse-4.3.0.tar.gz" - sha256 "31ecc3dc09e1e561502b4c94f965ed6b167c03e9418438c4a7ad5bad2c785f9a" - head "https://git.calcurse.org/calcurse.git" - - bottle do - sha256 "c3f0fc356930d24114a2ef1c16679f1184ba60a4f5bb888b822f6a343f7ae5b5" => :mojave - sha256 "0fbabcf326ec92cf28ec57ff76f77e1a6fa41217f7d11ef5090c18b7bfc5b8aa" => :high_sierra - sha256 "0a4237919a02a48d0c661ae43a4da579c69bf826921af07d14d9ade6f835374a" => :sierra - sha256 "4cca241225bacb88ffd8c9f97e8c7b4027068551523f07874975362995eacf54" => :el_capitan - end - - depends_on "gettext" - - if build.head? - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./autogen.sh" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - # Specify XML_CATALOG_FILES for asciidoc - system "make", "XML_CATALOG_FILES=/usr/local/etc/xml/catalog" - system "make", "install" - end - - test do - system bin/"calcurse", "-v" - end -end diff --git a/Formula/calicoctl.rb b/Formula/calicoctl.rb deleted file mode 100644 index ba309afa2254d..0000000000000 --- a/Formula/calicoctl.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Calicoctl < Formula - desc "Calico CLI tool" - homepage "https://www.projectcalico.org" - url "https://github.com/projectcalico/calicoctl.git", - :tag => "v3.1.3", - :revision => "231083c2ce934b7946ebed3ed96f4fc1a3ba4f69" - - bottle do - cellar :any_skip_relocation - sha256 "f16fc8a7934c3dd46552224353a1a36a5ed1fc9c5265a81e48f1dc4226646b9e" => :mojave - sha256 "0a050b4fd951cd8cf7593a436fe99571d6e7ce325a2449a12d6168972a1c714c" => :high_sierra - sha256 "1d8f80446c3395ea05dce58b3ff04f9ec9b5bafee6598c0c5704475e00f1786d" => :sierra - sha256 "f3c800eb604d967120d6b26897b25a85b2e877d05502baaa17ecd1d8dbbdb24a" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - dir = buildpath/"src/github.com/projectcalico/calicoctl" - dir.install buildpath.children - cd dir do - system "glide", "install", "-strip-vendor" - system "make", "binary" - bin.install "dist/calicoctl-darwin-amd64" => "calicoctl" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/calicoctl version", 1) - end -end diff --git a/Formula/camellia.rb b/Formula/camellia.rb deleted file mode 100644 index 3a220bfe83ff9..0000000000000 --- a/Formula/camellia.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Camellia < Formula - desc "Image Processing & Computer Vision library written in C" - homepage "https://camellia.sourceforge.io/" - url "https://downloads.sourceforge.net/project/camellia/Unix_Linux%20Distribution/v2.7.0/CamelliaLib-2.7.0.tar.gz" - sha256 "a3192c350f7124d25f31c43aa17e23d9fa6c886f80459cba15b6257646b2f3d2" - - bottle do - cellar :any - sha256 "347284dc085d1cd6acad286e8797ba3e001190e7cb04934b1f96d1e67481f302" => :mojave - sha256 "fc8cb8a0f24226fd1f93b32192f290107d44283196e1edb48458b184597aa729" => :high_sierra - sha256 "b4783ca8cf782a63d09daa1ff363c2fb4c4ea6dd4e75b8beb29167f536227730" => :sierra - sha256 "a80b2f52fd6811c5c4017bceac418d241c30342c93c1e9ae8911ed5274630e9c" => :el_capitan - sha256 "94196d40772f262cedb88f3dcf8b66c84fcc78cd419b439bd9619c25d602c8b1" => :yosemite - sha256 "73db73665d4a3972bc5c0b6250d3bc050de83e54330c88e9282b970bf5ececce" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/camlp4.rb b/Formula/camlp4.rb deleted file mode 100644 index 4f12b3bcc9edf..0000000000000 --- a/Formula/camlp4.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Camlp4 < Formula - desc "Tool to write extensible parsers in OCaml" - homepage "https://github.com/ocaml/camlp4" - url "https://github.com/ocaml/camlp4/archive/4.07+1.tar.gz" - version "4.07+1" - sha256 "ecdb8963063f41b387412317685f79823a26b3f53744f0472058991876877090" - head "https://github.com/ocaml/camlp4.git", :branch => "trunk" - - bottle do - cellar :any_skip_relocation - sha256 "83245cd4c3c676b924ca2e50a22e3ce2691fe8222b57ceb20a668e61cedf2134" => :mojave - sha256 "a54248473ee2730cd7a78f204bf98067ddda11aeafaebbe5c2842021ae766f43" => :high_sierra - sha256 "fa95192b50365b2b75ea025aa99b9f9bbaf5c1362c612d1eac1b4eebee012dc5" => :sierra - sha256 "bf8b4e53abfca6f7721315d0f898406cd3dcbafc02675f582dd6fb9d08c1cf82" => :el_capitan - end - - depends_on "ocaml" - # since OCaml 4.03.0, ocamlbuild is no longer part of ocaml - depends_on "ocamlbuild" - - def install - # this build fails if jobs are parallelized - ENV.deparallelize - system "./configure", "--bindir=#{bin}", - "--libdir=#{HOMEBREW_PREFIX}/lib/ocaml", - "--pkgdir=#{HOMEBREW_PREFIX}/lib/ocaml/camlp4" - system "make", "all" - system "make", "install", "LIBDIR=#{lib}/ocaml", - "PKGDIR=#{lib}/lib/ocaml/camlp4" - end - - test do - (testpath/"foo.ml").write "type t = Homebrew | Rocks" - system "#{bin}/camlp4", "-parser", "OCaml", "-printer", "OCamlr", - "foo.ml", "-o", testpath/"foo.ml.out" - assert_equal "type t = [ Homebrew | Rocks ];", - (testpath/"foo.ml.out").read.strip - end -end diff --git a/Formula/camlp5.rb b/Formula/camlp5.rb deleted file mode 100644 index 71e134d3e9189..0000000000000 --- a/Formula/camlp5.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Camlp5 < Formula - desc "Preprocessor and pretty-printer for OCaml" - homepage "https://camlp5.github.io/" - url "https://github.com/camlp5/camlp5/archive/rel707.tar.gz" - version "7.07" - sha256 "a2c493b833b217adf94d2000eb19015b990c4e441beb35cf36b1d33ed2351991" - head "https://gforge.inria.fr/anonscm/git/camlp5/camlp5.git" - - bottle do - sha256 "0cdb0b94b785a28f1043e8c40faeb2b9be5ba667efcb4fbe20323b988800780a" => :mojave - sha256 "532e7fb56feb3c13f4d9a37cffd7e3d5e2539ff3e5d081055c7d704fdbd99801" => :high_sierra - sha256 "726a57e231f5baa986089594895442dd1edf807352c797edd24d40da69a9c4d0" => :sierra - end - - depends_on "ocaml" - - def install - system "./configure", "--prefix", prefix, "--mandir", man - system "make", "world.opt" - system "make", "install" - (lib/"ocaml/camlp5").install "etc/META" - end - - test do - (testpath/"hi.ml").write "print_endline \"Hi!\";;" - assert_equal "let _ = print_endline \"Hi!\"", - shell_output("#{bin}/camlp5 #{lib}/ocaml/camlp5/pa_o.cmo #{lib}/ocaml/camlp5/pr_o.cmo hi.ml") - end -end diff --git a/Formula/cap-completion.rb b/Formula/cap-completion.rb deleted file mode 100644 index 6a6a47200c118..0000000000000 --- a/Formula/cap-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class CapCompletion < Formula - desc "Bash completion for Capistrano" - homepage "https://github.com/bashaus/capistrano-autocomplete" - url "https://github.com/bashaus/capistrano-autocomplete/archive/v1.0.0.tar.gz" - sha256 "66a94420be44d82ff18f366778e05decde3f16ad05d35fd8ec7b51860b102c0c" - - bottle :unneeded - - def install - bash_completion.install "cap" - end - - test do - assert_match "-F _cap", - shell_output("source #{bash_completion}/cap && complete -p cap") - end -end diff --git a/Formula/capnp.rb b/Formula/capnp.rb deleted file mode 100644 index 98006be5fe25f..0000000000000 --- a/Formula/capnp.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Capnp < Formula - desc "Data interchange format and capability-based RPC system" - homepage "https://capnproto.org/" - url "https://capnproto.org/capnproto-c++-0.7.0.tar.gz" - sha256 "c9a4c0bd88123064d483ab46ecee777f14d933359e23bff6fb4f4dbd28b4cd41" - head "https://github.com/capnproto/capnproto.git" - - bottle do - cellar :any_skip_relocation - sha256 "86b0a4f0bbc70a1bc04cbdd1b2312974e2acd56e606a2865e1dfbc48f07c2d1e" => :mojave - sha256 "a4720c5dc1b0866536b4649a87e16149d29cdaa730ced45acd7e557918dc5285" => :high_sierra - sha256 "56c4c541de5388071f53d582a12b7d0672c476ecf15130122d527bde2af4f358" => :sierra - sha256 "c828367f66d7b83289de33b8b3d47cc32dcc1b8da555469bdf886f2a7febdf2b" => :el_capitan - end - - depends_on "cmake" => :build - - needs :cxx14 - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - file = testpath/"test.capnp" - text = "\"Is a happy little duck\"" - - file.write Utils.popen_read("#{bin}/capnp id").chomp + ";\n" - file.append_lines "const dave :Text = #{text};" - assert_match text, shell_output("#{bin}/capnp eval #{file} dave") - end -end diff --git a/Formula/capstone.rb b/Formula/capstone.rb deleted file mode 100644 index f63fc7e5104f5..0000000000000 --- a/Formula/capstone.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Capstone < Formula - desc "Multi-platform, multi-architecture disassembly framework" - homepage "https://www.capstone-engine.org/" - url "https://github.com/aquynh/capstone/archive/4.0.tar.gz" - sha256 "26c6461618670d59215635602ef5fb6f90bf6724006983af88e4983d6af1e67a" - head "https://github.com/aquynh/capstone.git" - - bottle do - cellar :any - sha256 "288c67f6ebc09c9d3ad06eaa3d55fae6205085930a418747d92b36ff3bf3d4cb" => :mojave - sha256 "677c4090d56e51d1066977a9718c5f1556a4de7eb840a0006c6d86d149862b2d" => :high_sierra - sha256 "9f3886107e2bf01d4bd4a4dd9f7fc9f138dd65d90ee293962a9678a934191ff2" => :sierra - end - - def install - ENV["HOMEBREW_CAPSTONE"] = "1" - ENV["PREFIX"] = prefix - system "./make.sh" - system "./make.sh", "install" - end - - test do - # code comes from https://www.capstone-engine.org/lang_c.html - (testpath/"test.c").write <<~EOS - #include - #include - #include - #define CODE "\\x55\\x48\\x8b\\x05\\xb8\\x13\\x00\\x00" - - int main() - { - csh handle; - cs_insn *insn; - size_t count; - if (cs_open(CS_ARCH_X86, CS_MODE_64, &handle) != CS_ERR_OK) - return -1; - count = cs_disasm(handle, CODE, sizeof(CODE)-1, 0x1000, 0, &insn); - if (count > 0) { - size_t j; - for (j = 0; j < count; j++) { - printf("0x%"PRIx64":\\t%s\\t\\t%s\\n", insn[j].address, insn[j].mnemonic,insn[j].op_str); - } - cs_free(insn, count); - } else - printf("ERROR: Failed to disassemble given code!\\n"); - cs_close(&handle); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lcapstone", "-o", "test" - system "./test" - end -end diff --git a/Formula/cargo-completion.rb b/Formula/cargo-completion.rb deleted file mode 100644 index 6964cfccb4936..0000000000000 --- a/Formula/cargo-completion.rb +++ /dev/null @@ -1,22 +0,0 @@ -class CargoCompletion < Formula - desc "Bash and Zsh completion for Cargo" - homepage "https://github.com/rust-lang/cargo" - url "https://github.com/rust-lang/cargo/archive/0.32.0.tar.gz" - sha256 "c62e41489179a9b8e1ae0dbed379c278f9de805abba41608a05c069478a739fd" - version_scheme 1 - head "https://github.com/rust-lang/cargo.git" - - bottle :unneeded - - def install - bash_completion.install "src/etc/cargo.bashcomp.sh" => "cargo" - zsh_completion.install "src/etc/_cargo" - end - - test do - # we need to define a dummy 'cargo' command to force the script to define - # the completion function - assert_match "-F _cargo", - shell_output("cargo() { true;} && source #{bash_completion}/cargo && complete -p cargo") - end -end diff --git a/Formula/carina.rb b/Formula/carina.rb deleted file mode 100644 index ca06a1662561f..0000000000000 --- a/Formula/carina.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Carina < Formula - desc "Command-line client for Carina" - homepage "https://github.com/getcarina/carina" - url "https://github.com/getcarina/carina.git", - :tag => "v2.1.3", - :revision => "2b3ec267e298e095d7c2f81a2d82dc50a720e81c" - head "https://github.com/getcarina/carina.git" - - bottle do - cellar :any_skip_relocation - sha256 "4db2ef26df674487552ac898f0b844407041b7326925a4d60370e57f81bc6bdb" => :mojave - sha256 "33040c78e42a9611b87dda596e8a346c028b2ad84d8a4ba5cf2a12800e693ab8" => :high_sierra - sha256 "ee6c8cdf2eddda983618f7de29bf3bcc7e81d8d9a7085a037d67cd7cdb25377a" => :sierra - sha256 "34086f8b3418d96c3ee5c2f50ad5ffc7ee839fd26b36d0e8911c364a8c82586e" => :el_capitan - sha256 "0706998cd1dc286030e20382ac69a96c744ec558784685f769aa4276966dcd12" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV.prepend_create_path "PATH", buildpath/"bin" - - carinapath = buildpath/"src/github.com/getcarina/carina" - carinapath.install Dir["{*,.git}"] - - cd carinapath do - system "make", "get-deps" - system "make", "local", "VERSION=#{version}" - bin.install "carina" - prefix.install_metafiles - end - end - - test do - system "#{bin}/carina", "--version" - end -end diff --git a/Formula/carla.rb b/Formula/carla.rb deleted file mode 100644 index 5c5fc5be27aa0..0000000000000 --- a/Formula/carla.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Carla < Formula - desc "Audio plugin host supporting LADSPA, LV2, VST2/3, SF2 and more" - homepage "https://kxstudio.linuxaudio.org/Applications:Carla" - url "https://github.com/falkTX/Carla/archive/v1.9.12.tar.gz" - sha256 "f4711cb857ea5c409b4602ab2254956d4f24311ed292048f9013163c953e0f30" - head "https://github.com/falkTX/Carla.git" - - bottle do - sha256 "b58bb67d7296dde12f72e1acd0b577974629ca1181b8598cddd8dc1febb38706" => :mojave - sha256 "5894be46ea05fb86e31c401cbc05a789bcd4d9007bd19ac10bb6eb4f41bb49b2" => :high_sierra - sha256 "1f80475093e48c1fdd3f4c3c21b3e797f25064f6c501d279e6108ef3962fe471" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "fluid-synth" - depends_on "liblo" - depends_on "libmagic" - depends_on "pyqt" - depends_on "python" - - def install - args = [] - if ENV.compiler == :clang && MacOS.version <= :mountain_lion - args << "MACOS_OLD=true" - end - - system "make", *args - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"carla", "--version" - system lib/"carla/carla-discovery-native", "internal", ":all" - end -end diff --git a/Formula/carrot2.rb b/Formula/carrot2.rb deleted file mode 100644 index b56335257b840..0000000000000 --- a/Formula/carrot2.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Carrot2 < Formula - desc "Search results clustering engine" - homepage "https://project.carrot2.org" - url "https://github.com/carrot2/carrot2/releases/download/release%2F3.16.0/carrot2-dcs-3.16.0.zip" - sha256 "94b40cc10925261be15f623f19f9ac1289c5bab048ba58a0d27a36d16d54d1e4" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - bin.install libexec/"dcs.sh" => "carrot2" - inreplace bin/"carrot2", "java", "cd #{libexec} && exec java" - end - - plist_options :manual => "carrot2" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - AbandonProcessGroup - - WorkingDirectory - #{opt_libexec} - ProgramArguments - - #{opt_bin}/carrot2 - - - - EOS - end - - test do - cp_r Dir["#{prefix}/*"], testpath - inreplace testpath/"bin/carrot2", "cd #{libexec}", "cd #{testpath}/libexec" - begin - pid = fork { exec testpath/"bin/carrot2" } - sleep 5 - output = shell_output("curl -s -F dcs.c2stream=@#{libexec}/examples/shared/data-mining.xml http://localhost:8080/dcs/rest") - assert_match /data mining/m, output - ensure - Process.kill "INT", pid - end - end -end diff --git a/Formula/carthage.rb b/Formula/carthage.rb deleted file mode 100644 index 7ad838e89c94c..0000000000000 --- a/Formula/carthage.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Carthage < Formula - desc "Decentralized dependency manager for Cocoa" - homepage "https://github.com/Carthage/Carthage" - url "https://github.com/Carthage/Carthage.git", - :tag => "0.31.2", - :revision => "8dea448b9b2814dadb6130dbf8bae4171487dd69", - :shallow => false - head "https://github.com/Carthage/Carthage.git", :shallow => false - - bottle do - cellar :any - sha256 "dcfbfc02d18e352a771997008648aa8dd765188a736733fa45d8af5fea7f81a5" => :mojave - sha256 "86222951266058640d2794f06f592b7961cf60016184657e8a2269e8f3503a5c" => :high_sierra - end - - depends_on :xcode => ["9.4", :build] - - def install - system "make", "prefix_install", "PREFIX=#{prefix}" - bash_completion.install "Source/Scripts/carthage-bash-completion" => "carthage" - zsh_completion.install "Source/Scripts/carthage-zsh-completion" => "_carthage" - fish_completion.install "Source/Scripts/carthage-fish-completion" => "carthage.fish" - end - - test do - (testpath/"Cartfile").write 'github "jspahrsummers/xcconfigs"' - system bin/"carthage", "update" - end -end diff --git a/Formula/cash-cli.rb b/Formula/cash-cli.rb deleted file mode 100644 index 7029781e0f926..0000000000000 --- a/Formula/cash-cli.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class CashCli < Formula - desc "Exchange Currency Rates using your terminal" - homepage "https://github.com/xxczaki/cash-cli" - url "https://registry.npmjs.org/cash-cli/-/cash-cli-2.0.8.tgz" - sha256 "d2c6b10d44a8b7aca356db64d5eb46a77ee754394c43fb0dd0772bdebc5a3167" - - bottle do - cellar :any_skip_relocation - sha256 "98fee94b992b289ab84a08b9ea43e9587e8fa86e75c294a8c8b7717b20bdd9da" => :mojave - sha256 "3ac61cd27c3c40573c5bb1fa23dbdba5fec078d2db6d98ce3a43db6dd9f50f80" => :high_sierra - sha256 "37ce72e5a5f1af96b3f72cda091ddca5612ff9e0049583319e696d518123adcc" => :sierra - sha256 "a68ed7c9a690f7baa19e944644f88712731be10027b9526d535d507456628010" => :el_capitan - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - assert_match "Conversion of INR 100", shell_output("#{bin}/cash 100 INR USD GBP") - end -end diff --git a/Formula/cask.rb b/Formula/cask.rb deleted file mode 100644 index 0c83472857775..0000000000000 --- a/Formula/cask.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Cask < Formula - desc "Emacs dependency management" - homepage "https://cask.readthedocs.org/" - url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" - sha256 "02f8bb20b33b23fb11e7d2a1d282519dfdb8b3090b9672448b8c2c2cacd3e478" - head "https://github.com/cask/cask.git" - - bottle :unneeded - - depends_on "emacs" - - def install - bin.install "bin/cask" - prefix.install "templates" - # Lisp files must stay here: https://github.com/cask/cask/issues/305 - prefix.install Dir["*.el"] - elisp.install_symlink "#{prefix}/cask.el" - elisp.install_symlink "#{prefix}/cask-bootstrap.el" - - # Stop cask performing self-upgrades. - touch prefix/".no-upgrade" - end - - test do - (testpath/"Cask").write <<~EOS - (source gnu) - (depends-on "chess") - EOS - system bin/"cask", "install" - (testpath/".cask").directory? - end -end diff --git a/Formula/cassandra.rb b/Formula/cassandra.rb deleted file mode 100644 index 4fa02228d4483..0000000000000 --- a/Formula/cassandra.rb +++ /dev/null @@ -1,158 +0,0 @@ -class Cassandra < Formula - desc "Eventually consistent, distributed key-value store" - homepage "https://cassandra.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=cassandra/3.11.3/apache-cassandra-3.11.3-bin.tar.gz" - sha256 "d82e0670cb41b091e88fff55250ce945c4ea026c87a5517d3cf7b6b351d5e2ba" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "a6ae486599a6c1db4967b60943df85b577aa3211609995a48bae4611bd307e53" => :mojave - sha256 "7f17997644594255c20d7611cf9893bac5a34614d8c23dab292ce2103c6034b3" => :high_sierra - sha256 "5cd12938ab686fcc7c1175bdcae065a08d3cab2d8d7802e9a942f27d70863df9" => :sierra - end - - depends_on "cython" - depends_on "python" - - # Only >=Yosemite has new enough setuptools for successful compile of the below deps. - resource "setuptools" do - url "https://files.pythonhosted.org/packages/d3/3e/1d74cdcb393b68ab9ee18d78c11ae6df8447099f55fe86ee842f9c5b166c/setuptools-40.0.0.zip" - sha256 "012adb8e25fbfd64c652e99e7bab58799a3aaf05d39ab38561f69190a909015f" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/1f/9e/7b2ff7e965fc654592269f2906ade1c7d705f1bf25b7d469fa153f7d19eb/futures-3.2.0.tar.gz" - sha256 "9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "thrift" do - url "https://files.pythonhosted.org/packages/c6/b4/510617906f8e0c5660e7d96fbc5585113f83ad547a3989b80297ac72a74c/thrift-0.11.0.tar.gz" - sha256 "7d59ac4fdcb2c58037ebd4a9da5f9a49e3e034bf75b3f26d9fe48ba3d8806e6b" - end - - resource "cql" do - url "https://files.pythonhosted.org/packages/0b/15/523f6008d32f05dd3c6a2e7c2f21505f0a785b6dc8949cad325306858afc/cql-1.4.0.tar.gz" - sha256 "7857c16d8aab7b736ab677d1016ef8513dedb64097214ad3a50a6c550cb7d6e0" - end - - resource "cassandra-driver" do - url "https://files.pythonhosted.org/packages/4b/10/a464029e6bcfcde7ba9db5b0b8a25b28b2f09d3e270b68ce04a96f2b1876/cassandra-driver-3.14.0.tar.gz" - sha256 "b65218e2582277f5b77d1436e420db8616f63e3437a9e839cdcd7172d760e861" - end - - def install - (var/"lib/cassandra").mkpath - (var/"log/cassandra").mkpath - - xy = Language::Python.major_minor_version "python3" - pypath = libexec/"vendor/lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", pypath - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - inreplace "conf/cassandra.yaml", "/var/lib/cassandra", "#{var}/lib/cassandra" - inreplace "conf/cassandra-env.sh", "/lib/", "/" - - inreplace "bin/cassandra", "-Dcassandra.logdir\=$CASSANDRA_HOME/logs", "-Dcassandra.logdir\=#{var}/log/cassandra" - inreplace "bin/cassandra.in.sh" do |s| - s.gsub! "CASSANDRA_HOME=\"`dirname \"$0\"`/..\"", "CASSANDRA_HOME=\"#{libexec}\"" - # Store configs in etc, outside of keg - s.gsub! "CASSANDRA_CONF=\"$CASSANDRA_HOME/conf\"", "CASSANDRA_CONF=\"#{etc}/cassandra\"" - # Jars installed to prefix, no longer in a lib folder - s.gsub! "\"$CASSANDRA_HOME\"/lib/*.jar", "\"$CASSANDRA_HOME\"/*.jar" - # The jammm Java agent is not in a lib/ subdir either: - s.gsub! "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/lib/jamm-", "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/jamm-" - # Storage path - s.gsub! "cassandra_storagedir\=\"$CASSANDRA_HOME/data\"", "cassandra_storagedir\=\"#{var}/lib/cassandra\"" - end - - rm Dir["bin/*.bat", "bin/*.ps1"] - - # This breaks on `brew uninstall cassandra && brew install cassandra` - # https://github.com/Homebrew/homebrew/pull/38309 - (etc/"cassandra").install Dir["conf/*"] - - libexec.install Dir["*.txt", "{bin,interface,javadoc,pylib,lib/licenses}"] - libexec.install Dir["lib/*.jar"] - - pkgshare.install [libexec/"bin/cassandra.in.sh", libexec/"bin/stop-server"] - inreplace Dir["#{libexec}/bin/cassandra*", "#{libexec}/bin/debug-cql", "#{libexec}/bin/nodetool", "#{libexec}/bin/sstable*"], - %r{`dirname "?\$0"?`/cassandra.in.sh}, - "#{pkgshare}/cassandra.in.sh" - - # Make sure tools are installed - rm Dir[buildpath/"tools/bin/*.bat"] # Delete before install to avoid copying useless files - (libexec/"tools").install Dir[buildpath/"tools/lib/*.jar"] - - # Tools use different cassandra.in.sh and should be changed differently - mv buildpath/"tools/bin/cassandra.in.sh", buildpath/"tools/bin/cassandra-tools.in.sh" - inreplace buildpath/"tools/bin/cassandra-tools.in.sh" do |s| - # Tools have slightly different path to CASSANDRA_HOME - s.gsub! "CASSANDRA_HOME=\"`dirname $0`/../..\"", "CASSANDRA_HOME=\"#{libexec}\"" - # Store configs in etc, outside of keg - s.gsub! "CASSANDRA_CONF=\"$CASSANDRA_HOME/conf\"", "CASSANDRA_CONF=\"#{etc}/cassandra\"" - # Core Jars installed to prefix, no longer in a lib folder - s.gsub! "\"$CASSANDRA_HOME\"/lib/*.jar", "\"$CASSANDRA_HOME\"/*.jar" - # Tools Jars are under tools folder - s.gsub! "\"$CASSANDRA_HOME\"/tools/lib/*.jar", "\"$CASSANDRA_HOME\"/tools/*.jar" - # Storage path - s.gsub! "cassandra_storagedir\=\"$CASSANDRA_HOME/data\"", "cassandra_storagedir\=\"#{var}/lib/cassandra\"" - end - - pkgshare.install [buildpath/"tools/bin/cassandra-tools.in.sh"] - - # Update tools script files - inreplace Dir[buildpath/"tools/bin/*"], - "`dirname \"$0\"`/cassandra.in.sh", - "#{pkgshare}/cassandra-tools.in.sh" - - # Make sure tools are available - bin.install Dir[buildpath/"tools/bin/*"] - bin.write_exec_script Dir["#{libexec}/bin/*"] - - rm %W[#{bin}/cqlsh #{bin}/cqlsh.py] # Remove existing exec scripts - (bin/"cqlsh").write_env_script libexec/"bin/cqlsh", :PYTHONPATH => pypath - (bin/"cqlsh.py").write_env_script libexec/"bin/cqlsh.py", :PYTHONPATH => pypath - end - - plist_options :manual => "cassandra -f" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cassandra - -f - - RunAtLoad - - WorkingDirectory - #{var}/lib/cassandra - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/cassandra -v") - - output = shell_output("#{bin}/cqlsh localhost 2>&1", 1) - assert_match "Connection error", output - end -end diff --git a/Formula/cassandra@2.1.rb b/Formula/cassandra@2.1.rb deleted file mode 100644 index a2c659ea9198c..0000000000000 --- a/Formula/cassandra@2.1.rb +++ /dev/null @@ -1,125 +0,0 @@ -class CassandraAT21 < Formula - desc "Distributed key-value store" - homepage "https://cassandra.apache.org" - url "https://archive.apache.org/dist/cassandra/2.1.13/apache-cassandra-2.1.13-bin.tar.gz" - sha256 "102fffe21b1641696cbdaef0fb5a2fecf01f28da60c81a1dede06c2d8bdb6325" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "06a230958e519d62cef3f7bd5ac2461c1973bb729041418e538a33b20c6ff8aa" => :mojave - sha256 "e59fc6d1b1fe38a291fd7c14f4f0cecdb2362baea74523f288447e70c9cd563c" => :high_sierra - sha256 "4e1891d12596d4cf47b715b6d0110702d74b572da05e7453a5454251964bcaba" => :sierra - end - - keg_only :versioned_formula - - depends_on "python@2" # does not support Python 3 - - # Only Yosemite has new enough setuptools for successful compile of the below deps. - resource "setuptools" do - url "https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-12.0.5.tar.gz" - sha256 "bda326cad34921060a45004b0dd81f828d471695346e303f4ca53b8ba6f4547f" - end - - resource "thrift" do - url "https://files.pythonhosted.org/packages/source/t/thrift/thrift-0.9.2.tar.gz" - sha256 "08f665e4b033c9d2d0b6174d869273104362c80e77ee4c01054a74141e378afa" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/source/f/futures/futures-2.2.0.tar.gz" - sha256 "151c057173474a3a40f897165951c0e33ad04f37de65b6de547ddef107fd0ed3" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/source/s/six/six-1.9.0.tar.gz" - sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5" - end - - resource "cql" do - url "https://files.pythonhosted.org/packages/source/c/cql/cql-1.4.0.tar.gz" - sha256 "7857c16d8aab7b736ab677d1016ef8513dedb64097214ad3a50a6c550cb7d6e0" - end - - resource "cassandra-driver" do - url "https://files.pythonhosted.org/packages/source/c/cassandra-driver/cassandra-driver-2.6.0.tar.gz" - sha256 "753505a02b4c6f9b5ef18dec36a13f17fb458c98925eea62c94a8839d5949717" - end - - def install - (var+"lib/cassandra").mkpath - (var+"log/cassandra").mkpath - - pypath = libexec/"vendor/lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", pypath - %w[setuptools thrift futures six cql cassandra-driver].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - inreplace "conf/cassandra.yaml", "/var/lib/cassandra", "#{var}/lib/cassandra" - inreplace "conf/cassandra-env.sh", "/lib/", "/" - - inreplace "bin/cassandra", "-Dcassandra.logdir\=$CASSANDRA_HOME/logs", "-Dcassandra.logdir\=#{var}/log/cassandra" - inreplace "bin/cassandra.in.sh" do |s| - s.gsub! "CASSANDRA_HOME=\"`dirname \"$0\"`/..\"", "CASSANDRA_HOME=\"#{libexec}\"" - # Store configs in etc, outside of keg - s.gsub! "CASSANDRA_CONF=\"$CASSANDRA_HOME/conf\"", "CASSANDRA_CONF=\"#{etc}/cassandra\"" - # Jars installed to prefix, no longer in a lib folder - s.gsub! "\"$CASSANDRA_HOME\"/lib/*.jar", "\"$CASSANDRA_HOME\"/*.jar" - # The jammm Java agent is not in a lib/ subdir either: - s.gsub! "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/lib/jamm-", "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/jamm-" - # Storage path - s.gsub! "cassandra_storagedir\=\"$CASSANDRA_HOME/data\"", "cassandra_storagedir\=\"#{var}/lib/cassandra\"" - end - - rm Dir["bin/*.bat", "bin/*.ps1"] - - # This breaks on `brew uninstall cassandra && brew install cassandra` - # https://github.com/Homebrew/homebrew/pull/38309 - (etc+"cassandra").install Dir["conf/*"] - - libexec.install Dir["*.txt", "{bin,interface,javadoc,pylib,lib/licenses}"] - libexec.install Dir["lib/*.jar"] - - share.install [libexec+"bin/cassandra.in.sh", libexec+"bin/stop-server"] - inreplace Dir["#{libexec}/bin/cassandra*", "#{libexec}/bin/debug-cql", "#{libexec}/bin/nodetool", "#{libexec}/bin/sstable*"], - %r{`dirname "?\$0"?`/cassandra.in.sh}, - "#{share}/cassandra.in.sh" - - bin.write_exec_script Dir["#{libexec}/bin/*"] - rm bin/"cqlsh" # Remove existing exec script - (bin/"cqlsh").write_env_script libexec/"bin/cqlsh", :PYTHONPATH => pypath - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/cassandra@2.1/bin/cassandra -f" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cassandra - -f - - RunAtLoad - - WorkingDirectory - #{var}/lib/cassandra - - - EOS - end - - test do - system "#{bin}/cassandra", "-v" - end -end diff --git a/Formula/cassandra@2.2.rb b/Formula/cassandra@2.2.rb deleted file mode 100644 index 8843178effe01..0000000000000 --- a/Formula/cassandra@2.2.rb +++ /dev/null @@ -1,127 +0,0 @@ -class CassandraAT22 < Formula - desc "Eventually consistent, distributed key-value db" - homepage "https://cassandra.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=/cassandra/2.2.11/apache-cassandra-2.2.11-bin.tar.gz" - mirror "https://archive.apache.org/dist/cassandra/2.2.11/apache-cassandra-2.2.11-bin.tar.gz" - sha256 "866e1acd88e6e2ec0c3d201bea4c3e4494c5f6189dd810366ec9b6154bad6964" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "686148484fd214ef747ca608490003c4c146e01dd9a088132eaf53e0fb46daa6" => :mojave - sha256 "966571457ede3a2376f92f3837eaa16276b267c93bcb3a660cdf721cb5315493" => :high_sierra - sha256 "fca0ff60134260f53cec82c02c7c338ea0f978aa2f7ae2d451fe465d7c0966b6" => :sierra - end - - keg_only :versioned_formula - - depends_on "cython" => :build - depends_on "python@2" # does not support Python 3.7 - - # Only >=Yosemite has new enough setuptools for successful compile of the below deps. - resource "setuptools" do - url "https://files.pythonhosted.org/packages/a4/c8/9a7a47f683d54d83f648d37c3e180317f80dc126a304c45dc6663246233a/setuptools-36.5.0.zip" - sha256 "ce2007c1cea3359870b80657d634253a0765b0c7dc5a988d77ba803fc86f2c64" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/cc/26/b61e3a4eb50653e8a7339d84eeaa46d1e93b92951978873c220ae64d0733/futures-3.1.1.tar.gz" - sha256 "51ecb45f0add83c806c68e4b06106f90db260585b25ef2abfcda0bd95c0132fd" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "thrift" do - url "https://files.pythonhosted.org/packages/a3/ea/84a41e03f1ab14fb314c8bcf1c451090efa14c5cdfb9797d1079f502b54e/thrift-0.10.0.zip" - sha256 "b7f6c09155321169af03f9fb20dc15a4a0c7481e7c334a5ba8f7f0d864633209" - end - - resource "cql" do - url "https://files.pythonhosted.org/packages/0b/15/523f6008d32f05dd3c6a2e7c2f21505f0a785b6dc8949cad325306858afc/cql-1.4.0.tar.gz" - sha256 "7857c16d8aab7b736ab677d1016ef8513dedb64097214ad3a50a6c550cb7d6e0" - end - - resource "cassandra-driver" do - url "https://files.pythonhosted.org/packages/5a/96/a5b2458a0483d3cefdf13064d40119754c1552ea34b7f0e8c6e03e66eb0a/cassandra-driver-3.11.0.tar.gz" - sha256 "643bed0fac08ee91630f0f35556bb62c3b4b007c20d4e6e8d349f769ea648150" - end - - def install - (var+"lib/cassandra").mkpath - (var+"log/cassandra").mkpath - - pypath = libexec/"vendor/lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", pypath - %w[setuptools thrift futures six cql cassandra-driver].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - inreplace "conf/cassandra.yaml", "/var/lib/cassandra", "#{var}/lib/cassandra" - inreplace "conf/cassandra-env.sh", "/lib/", "/" - - inreplace "bin/cassandra", "-Dcassandra.logdir\=$CASSANDRA_HOME/logs", "-Dcassandra.logdir\=#{var}/log/cassandra" - inreplace "bin/cassandra.in.sh" do |s| - s.gsub! "CASSANDRA_HOME=\"`dirname \"$0\"`/..\"", "CASSANDRA_HOME=\"#{libexec}\"" - # Store configs in etc, outside of keg - s.gsub! "CASSANDRA_CONF=\"$CASSANDRA_HOME/conf\"", "CASSANDRA_CONF=\"#{etc}/cassandra\"" - # Jars installed to prefix, no longer in a lib folder - s.gsub! "\"$CASSANDRA_HOME\"/lib/*.jar", "\"$CASSANDRA_HOME\"/*.jar" - # The jammm Java agent is not in a lib/ subdir either: - s.gsub! "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/lib/jamm-", "JAVA_AGENT=\"$JAVA_AGENT -javaagent:$CASSANDRA_HOME/jamm-" - # Storage path - s.gsub! "cassandra_storagedir\=\"$CASSANDRA_HOME/data\"", "cassandra_storagedir\=\"#{var}/lib/cassandra\"" - end - - rm Dir["bin/*.bat", "bin/*.ps1"] - - # This breaks on `brew uninstall cassandra && brew install cassandra` - # https://github.com/Homebrew/homebrew/pull/38309 - (etc+"cassandra").install Dir["conf/*"] - - libexec.install Dir["*.txt", "{bin,interface,javadoc,pylib,lib/licenses}"] - libexec.install Dir["lib/*.jar"] - - share.install [libexec+"bin/cassandra.in.sh", libexec+"bin/stop-server"] - inreplace Dir["#{libexec}/bin/cassandra*", "#{libexec}/bin/debug-cql", "#{libexec}/bin/nodetool", "#{libexec}/bin/sstable*"], - %r{`dirname "?\$0"?`/cassandra.in.sh}, - "#{share}/cassandra.in.sh" - - bin.write_exec_script Dir["#{libexec}/bin/*"] - rm bin/"cqlsh" # Remove existing exec script - (bin/"cqlsh").write_env_script libexec/"bin/cqlsh", :PYTHONPATH => pypath - end - - plist_options :manual => "cassandra -f" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cassandra - -f - - RunAtLoad - - WorkingDirectory - #{var}/lib/cassandra - - - EOS - end - - test do - system "#{bin}/cassandra", "-v" - end -end diff --git a/Formula/castxml.rb b/Formula/castxml.rb deleted file mode 100644 index 4ecd0c76c9632..0000000000000 --- a/Formula/castxml.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Castxml < Formula - desc "C-family Abstract Syntax Tree XML Output" - homepage "https://github.com/CastXML/CastXML" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/c/castxml/castxml_0.1+git20180702.orig.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/c/castxml/castxml_0.1+git20180702.orig.tar.xz" - version "0.1+git20180702" - sha256 "00c58b28523496fbeda731656bb022ad55e7c390609f189ebe03b4468292da40" - head "https://github.com/CastXML/castxml.git" - - bottle do - cellar :any - sha256 "48412e52013e09c3830b4eb5653bd447c2b5be398db9b05f71ca1065fa582867" => :mojave - sha256 "094c47bde5f666aad5078e7b8652f71aca7f14cecb233977e7949e6e721ec685" => :high_sierra - sha256 "0664be25be8a34110f61ff8cfba1b871aa956b9dfa0e8e0b89e3c75a8b2f6b4f" => :sierra - sha256 "7c6ed31aa80033884da9f2a3265caaf7a5796736ca1d0f1743e1d93aad2cf993" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "llvm" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - int main() { - return 0; - } - EOS - system "#{bin}/castxml", "-c", "-x", "c++", "--castxml-cc-gnu", "clang++", "--castxml-gccxml", "-o", "test.xml", "test.cpp" - end -end diff --git a/Formula/cataclysm.rb b/Formula/cataclysm.rb deleted file mode 100644 index d51dc4f0f06a0..0000000000000 --- a/Formula/cataclysm.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Cataclysm < Formula - desc "Fork/variant of Cataclysm Roguelike" - homepage "https://github.com/CleverRaven/Cataclysm-DDA" - url "https://github.com/CleverRaven/Cataclysm-DDA/archive/0.C.tar.gz" - version "0.C" - sha256 "69e947824626fffb505ca4ec44187ec94bba32c1e5957ba5c771b3445f958af6" - revision 1 - head "https://github.com/CleverRaven/Cataclysm-DDA.git" - - bottle do - cellar :any - sha256 "1c28c1bc74e941c741f682d9460af8ff2200a6189bc3cae5467f4b461e5a918e" => :mojave - sha256 "c7bbaff919572a6c1bc00fb30b5038c567106de67c8a41d5b84f7c2acec8555a" => :high_sierra - sha256 "305fe2048d73af85ae4d7cfbb71f23532ec66de88d75959648c1186d8f8da035" => :sierra - sha256 "436d0b956cd5c0470926a416dc22e98ad0b846172c7ab58737665eb0e62eecfa" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "libogg" - depends_on "libvorbis" - depends_on "lua" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - depends_on "sdl2_ttf" - - needs :cxx11 - - def install - ENV.cxx11 - - args = %W[ - NATIVE=osx - RELEASE=1 - OSX_MIN=#{MacOS.version} - LUA=1 - USE_HOME_DIR=1 - TILES=1 - SOUND=1 - ] - - args << "CLANG=1" if ENV.compiler == :clang - - system "make", *args - - # no make install, so we have to do it ourselves - libexec.install "cataclysm-tiles", "data", "gfx", "lua" - - inreplace "cataclysm-launcher" do |s| - s.change_make_var! "DIR", libexec - end - bin.install "cataclysm-launcher" => "cataclysm" - end - - test do - # make user config directory - user_config_dir = testpath/"Library/Application Support/Cataclysm/" - user_config_dir.mkpath - - # run cataclysm for 5 seconds - game = fork do - system bin/"cataclysm" - end - - sleep 5 - Process.kill("HUP", game) - - assert_predicate user_config_dir/"config", - :exist?, "User config directory should exist" - assert_predicate user_config_dir/"templates", - :exist?, "User template directory should exist" - assert_predicate user_config_dir/"save", - :exist?, "User save directory should exist" - end -end diff --git a/Formula/catimg.rb b/Formula/catimg.rb deleted file mode 100644 index 855205a0cd58f..0000000000000 --- a/Formula/catimg.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Catimg < Formula - desc "Insanely fast image printing in your terminal" - homepage "https://github.com/posva/catimg" - url "https://github.com/posva/catimg/archive/2.5.0.tar.gz" - sha256 "8bbeeb18d4a5531dd8b86b130cc823cb9d0942f7b6e7013de70c251259a3a922" - head "https://github.com/posva/catimg.git" - - bottle do - cellar :any_skip_relocation - sha256 "d2a0ff1ae2c6f1946f162703cad1563c35ab93234758f7b18a268026b07040f6" => :mojave - sha256 "db1ad25fc273bee78a2920f4fd5cec756c1d37a1e3a3bd1e88f95109dc88525c" => :high_sierra - sha256 "77826c8737fe10c660d830cfd1f1effd26f4c5957b9f1a907ae70537bf4be2f7" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", "-DMAN_OUTPUT_PATH=#{man1}", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/catimg", test_fixtures("test.png") - end -end diff --git a/Formula/cattle.rb b/Formula/cattle.rb deleted file mode 100644 index d4c421b87707c..0000000000000 --- a/Formula/cattle.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Cattle < Formula - desc "Brainfuck language toolkit" - homepage "https://github.com/andreabolognani/cattle" - url "https://kiyuko.org/software/cattle/releases/cattle-1.2.2.tar.gz" - sha256 "e8e9baba41c4b25a1fdac552c5b03ad62a4dbb782e9866df3c3463baf6411826" - revision 1 - - bottle do - sha256 "9fe38957085b82d4f32b8301a4541b7f66400d27677b38852f81f7e0b7dbc497" => :mojave - sha256 "957d2f936937bd3682063bc0e7386b22ade2ee3398ad8ad29700bf395f2bc4f4" => :high_sierra - sha256 "6387555e1f0f6804d9d9d967af83c370129d3fc7b4f8644b41b50a6d7b10baf9" => :sierra - sha256 "42652ee8648cb83d278d274b149c644f9785a13c281edcd8d9dab9baf293da33" => :el_capitan - end - - head do - url "https://github.com/andreabolognani/cattle.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gtk-doc" => :build - depends_on "libtool" => :build - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - def install - pkgshare.mkpath - cp_r ["examples", "tests"], pkgshare - rm Dir["#{pkgshare}/{examples,tests}/{Makefile.am,.gitignore}"] - - if build.head? - inreplace "autogen.sh", "libtoolize", "glibtoolize" - system "sh", "autogen.sh" - end - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - cp_r (pkgshare/"examples").children, testpath - cp_r (pkgshare/"tests").children, testpath - system ENV.cc, "common.c", "run.c", "-o", "test", - "-I#{include}/cattle-1.0", - "-I#{Formula["glib"].include}/glib-2.0", - "-I#{Formula["glib"].lib}/glib-2.0/include", - "-L#{lib}", - "-L#{Formula["glib"].lib}", - "-lcattle-1.0", "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" - assert_match "Unbalanced brackets", shell_output("./test program.c 2>&1", 1) - end -end diff --git a/Formula/cayley.rb b/Formula/cayley.rb deleted file mode 100644 index a0ef8ebb95ed4..0000000000000 --- a/Formula/cayley.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Cayley < Formula - desc "Graph database inspired by Freebase and Knowledge Graph" - homepage "https://github.com/cayleygraph/cayley" - url "https://github.com/cayleygraph/cayley/archive/v0.7.5.tar.gz" - sha256 "4fcc8bf44f775dbbbd6146713f6fbdc80f2d88e2e8b93767f62eb5d635a56739" - head "https://github.com/google/cayley.git" - - bottle do - cellar :any_skip_relocation - sha256 "377e5180df5cf802155e5d2af615f226706c0f02774b50a53b2b5d44480a151d" => :mojave - sha256 "ce7a9c57fbf969e0cf60bc9cdf8f6e1d57e254dc506a9e509cc4d7052bbb53df" => :high_sierra - sha256 "a745c0d7c87f43e62232be852ec8df3b8ee5e18cb6595725b5588843521164a4" => :sierra - end - - depends_on "bazaar" => :build - depends_on "dep" => :build - depends_on "go" => :build - depends_on "mercurial" => :build - - def install - ENV["GOPATH"] = buildpath - - (buildpath/"src/github.com/cayleygraph/cayley").install buildpath.children - cd "src/github.com/cayleygraph/cayley" do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-o", bin/"cayley", "-ldflags", - "-X main.Version=#{version}", ".../cmd/cayley" - - inreplace "cayley_example.yml", "./cayley.db", var/"cayley/cayley.db" - etc.install "cayley_example.yml" => "cayley.yml" - - (pkgshare/"assets").install "docs", "static", "templates" - - # Install samples - system "gzip", "-d", "data/30kmoviedata.nq.gz" - (pkgshare/"samples").install "data/testdata.nq", "data/30kmoviedata.nq" - end - end - - def post_install - unless File.exist? var/"cayley" - (var/"cayley").mkpath - - # Initialize the database - system bin/"cayley", "init", "--config=#{etc}/cayley.yml" - end - end - - plist_options :manual => "cayley http --assets=#{HOMEBREW_PREFIX}/share/cayley/assets --config=#{HOMEBREW_PREFIX}/etc/cayley.conf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cayley - http - --assets=#{opt_pkgshare}/assets - --config=#{etc}/cayley.conf - - RunAtLoad - - WorkingDirectory - #{var}/cayley - StandardErrorPath - #{var}/log/cayley.log - StandardOutPath - #{var}/log/cayley.log - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/cayley version") - end -end diff --git a/Formula/cbmbasic.rb b/Formula/cbmbasic.rb deleted file mode 100644 index 995f7a36d6a0d..0000000000000 --- a/Formula/cbmbasic.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Cbmbasic < Formula - desc "Commodore BASIC V2 as a scripting language" - homepage "https://github.com/mist64/cbmbasic" - url "https://downloads.sourceforge.net/project/cbmbasic/cbmbasic/1.0/cbmbasic-1.0.tgz" - sha256 "2735dedf3f9ad93fa947ad0fb7f54acd8e84ea61794d786776029c66faf64b04" - head "https://github.com/mist64/cbmbasic.git" - - bottle do - cellar :any_skip_relocation - sha256 "c922c6bd9691307444d7c28ebe9d09299aa43efc7987e30f23bad572f990c81d" => :mojave - sha256 "99490e603e86319b7c4307657bf58511dacb801dddb30ed7c4269feaa19eb6bc" => :high_sierra - sha256 "018c1d1fa3050bdbd88c092f19c1ca787098ea1183e1227671507af3fca07b52" => :sierra - sha256 "92762d9b7f5f21190b98d23e7fedf787cccc14e1c82699b60036948beaf1e7d1" => :el_capitan - sha256 "d7285a8376e20ac008e51814a97f155f8ac80ce94a809c953ee63932a1d2c1d7" => :yosemite - sha256 "ffe1126f8e12f15471abadf280fa83b8e77770170749805a28fdaa1a1adf51b0" => :mavericks - sha256 "04ac2ecc60ab69d7d4c6150260aeb8c63dc0bb3974d554241b8470792332be56" => :mountain_lion - end - - def install - system "make", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}" - bin.install "cbmbasic" - end - - test do - assert_match(/READY.\r\n 1/, pipe_output("#{bin}/cbmbasic", "PRINT 1\n", 0)) - end -end diff --git a/Formula/cc65.rb b/Formula/cc65.rb deleted file mode 100644 index 1325259bae53c..0000000000000 --- a/Formula/cc65.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Cc65 < Formula - desc "6502 C compiler" - homepage "https://cc65.github.io/cc65/" - url "https://github.com/cc65/cc65/archive/V2.17.tar.gz" - sha256 "73b89634655bfc6cef9aa0b8950f19657a902ee5ef0c045886e418bb116d2eac" - head "https://github.com/cc65/cc65.git" - - bottle do - sha256 "d8238bad77a894edec5e5caefd7ae6c738177a04455024a7c2cb3d44db3a4d85" => :mojave - sha256 "12c9533c600dda022dc121f51f668648cd89a98e407e02aeb2119c21d8e8cc54" => :high_sierra - sha256 "f470bfeec0cc01b3da7656945e401815a852f2d6fbca5197f9dd41dc3391a539" => :sierra - sha256 "46e8dc043981d55e0b62e77cd12dae35b1ab13b3164f1510010e73bbe8ee76a9" => :el_capitan - end - - conflicts_with "grc", :because => "both install `grc` binaries" - - def install - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - end - - def caveats - <<~EOS - Library files have been installed to: - #{pkgshare} - EOS - end - - test do - (testpath/"foo.c").write "int main (void) { return 0; }" - - system bin/"cl65", "foo.c" # compile and link - assert_predicate testpath/"foo", :exist? # binary - end -end diff --git a/Formula/ccache.rb b/Formula/ccache.rb deleted file mode 100644 index 4d4ebb2e79a65..0000000000000 --- a/Formula/ccache.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Ccache < Formula - desc "Object-file caching compiler wrapper" - homepage "https://ccache.samba.org/" - url "https://www.samba.org/ftp/ccache/ccache-3.5.tar.xz" - sha256 "bdd44b72ae4506a2e2deef9fefb15c606a474bbca7658cd2be26105155eec012" - - bottle do - sha256 "b244a2503467746f01416f745f4cfce9b975943c17c490be0e1b6b9ec4a388a0" => :mojave - sha256 "80f1c0d8a93e7ca12ab3a368d4f92cb00455c7562e35505d5a5a0555c3f98c67" => :high_sierra - sha256 "3e7e577c26ae4c80cf98a93570f4f32a81fa07f1559e32211f1fd0bce01e2158" => :sierra - end - - head do - url "https://github.com/ccache/ccache.git" - - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" if build.head? - - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install" - - libexec.mkpath - - %w[ - clang - clang++ - cc - gcc gcc2 gcc3 gcc-3.3 gcc-4.0 gcc-4.2 gcc-4.3 gcc-4.4 gcc-4.5 gcc-4.6 gcc-4.7 gcc-4.8 gcc-4.9 gcc-5 gcc-6 gcc-7 - c++ c++3 c++-3.3 c++-4.0 c++-4.2 c++-4.3 c++-4.4 c++-4.5 c++-4.6 c++-4.7 c++-4.8 c++-4.9 c++-5 c++-6 c++-7 - g++ g++2 g++3 g++-3.3 g++-4.0 g++-4.2 g++-4.3 g++-4.4 g++-4.5 g++-4.6 g++-4.7 g++-4.8 g++-4.9 g++-5 g++-6 g++-7 - ].each do |prog| - libexec.install_symlink bin/"ccache" => prog - end - end - - def caveats; <<~EOS - To install symlinks for compilers that will automatically use - ccache, prepend this directory to your PATH: - #{opt_libexec} - - If this is an upgrade and you have previously added the symlinks to - your PATH, you may need to modify it to the path specified above so - it points to the current version. - - NOTE: ccache can prevent some software from compiling. - ALSO NOTE: The brew command, by design, will never use ccache. - EOS - end - - test do - ENV.prepend_path "PATH", opt_libexec - assert_equal "#{opt_libexec}/gcc", shell_output("which gcc").chomp - system "#{bin}/ccache", "-s" - end -end diff --git a/Formula/ccal.rb b/Formula/ccal.rb deleted file mode 100644 index 0919e735a6ee0..0000000000000 --- a/Formula/ccal.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ccal < Formula - desc "Create Chinese calendars for print or browsing" - homepage "https://ccal.chinesebay.com/ccal" - url "https://ccal.chinesebay.com/ccal/ccal-2.5.3.tar.gz" - sha256 "3d4cbdc9f905ce02ab484041fbbf7f0b7a319ae6a350c6c16d636e1a5a50df96" - - bottle do - cellar :any_skip_relocation - sha256 "618a97f2a627d06c22fe6483f0ef1f40815815cd0b7f7d56c49681285a0cab43" => :mojave - sha256 "1d836266f41a1123f7421b92390b0affe29ca15105b6bad5ae458c147940693c" => :high_sierra - sha256 "8ab4cd19d0e0e86ec136ef120dd8308682a34b43f17981cddc4e80d1e17042f2" => :sierra - sha256 "2a09b1b16f9b1ea0c89a807ebd2b9cfe43e22d1e35cd576780b1a3c986b4b0d1" => :el_capitan - sha256 "d3dc167fb2ac1507616dbf5ce5310fd5c67153d680ff242da23a44f199da7fb3" => :yosemite - sha256 "f79240c70ea10dd661005105e552d8dcc993acfb31c399b3f74f4abf9d2c0162" => :mavericks - end - - def install - system "make", "-e", "BINDIR=#{bin}", "install" - system "make", "-e", "MANDIR=#{man}", "install-man" - end - - test do - assert_match "Year JiaWu, Month 1X", shell_output("#{bin}/ccal 2 2014") - end -end diff --git a/Formula/ccat.rb b/Formula/ccat.rb deleted file mode 100644 index 8bc7827876aba..0000000000000 --- a/Formula/ccat.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ccat < Formula - desc "Like cat but displays content with syntax highlighting" - homepage "https://github.com/jingweno/ccat" - url "https://github.com/jingweno/ccat/archive/v1.1.0.tar.gz" - sha256 "b02d2c8d573f5d73595657c7854c9019d3bd2d9e6361b66ce811937ffd2bfbe1" - - bottle do - cellar :any_skip_relocation - sha256 "0170dc610f0561cd562a2614f5bb0139cad5d37133a4181318a0edc08b3182c9" => :mojave - sha256 "895c26dc74369ef72990fd79447e654f5266dda9c662d3bed2926caab7180678" => :high_sierra - sha256 "aab86cfae41d1f4f9c93ad3a1680f21a5a0e9fad61190101582235174e4e214c" => :sierra - sha256 "10eb7df98a05c968f006bbda2c6f690bd7d5053e4bb6d2c9c4a043616648a23b" => :el_capitan - sha256 "063b4cab434b5d16e8884aad6eb7d18068c33f9ec884fabf5ada3ad821428897" => :yosemite - sha256 "04342b5be5ffffaa696799b006b592cad530b0fcd510514ad9c72bc70c5865ba" => :mavericks - end - - depends_on "go" => :build - - conflicts_with "ccrypt", :because => "both install `ccat` binaries" - - def install - system "./script/build" - bin.install "ccat" - end - - test do - (testpath/"test.txt").write <<~EOS - I am a colourful cat - EOS - - assert_match(/I am a colourful cat/, shell_output("#{bin}/ccat test.txt")) - end -end diff --git a/Formula/ccd2iso.rb b/Formula/ccd2iso.rb deleted file mode 100644 index 59681af5bafea..0000000000000 --- a/Formula/ccd2iso.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Ccd2iso < Formula - desc "Convert CloneCD images to ISO images" - homepage "https://ccd2iso.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ccd2iso/ccd2iso/ccd2iso-0.3/ccd2iso-0.3.tar.gz" - sha256 "f874b8fe26112db2cdb016d54a9f69cf286387fbd0c8a55882225f78e20700fc" - - bottle do - cellar :any_skip_relocation - sha256 "710ddc04aac005477e9aaa73e882bc1d8cbe96412ac949ff4a7501c6a53ca018" => :mojave - sha256 "9d33b636be5f43c1e40955323c2f5d4a02d603c990aab2c89e98b5cb16a5cf93" => :high_sierra - sha256 "c855496f0265a8f806228cddc1c15d5a1d6e7186f4bb43c0a317a6256d8e8e85" => :sierra - sha256 "e74b2779ef3d832bc899422285c2d03ea33aa6ab979ca835914343999b444671" => :el_capitan - sha256 "020f198fa4476dc640fa14e8efa7ad04985143e7007c45610b890bdc7db47599" => :yosemite - sha256 "46facd34e7bbf203fe76dcd6e99bcf066eb245992aef01f1d703a9ce7a69cac3" => :mavericks - sha256 "a1b425ff8a3eca4faa223119b1c5b4bd4cfc4be5a1f8bf953e3776cca4426155" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match( - /^#{Regexp.escape(version)}$/, shell_output("#{bin}/ccd2iso --version") - ) - end -end diff --git a/Formula/ccextractor.rb b/Formula/ccextractor.rb deleted file mode 100644 index 142c6f99ec5fc..0000000000000 --- a/Formula/ccextractor.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Ccextractor < Formula - desc "Free, GPL licensed closed caption tool" - homepage "https://www.ccextractor.org/" - url "https://github.com/CCExtractor/ccextractor/archive/v0.87.tar.gz" - sha256 "10c3d88fba531aa6f5f6937e8eccc4df2ac96abaa4d77cb4a1b1349a8b94346f" - head "https://github.com/ccextractor/ccextractor.git" - - bottle do - cellar :any_skip_relocation - sha256 "d08337e5455f14055cc355013190441bbf0238c19d0d2b1669d86a973a9f8fc1" => :mojave - sha256 "44c4b3599f3e4f9ca362473751b6cd040d0a06b32f2a22e2087f22413ff6e45b" => :high_sierra - sha256 "8d5bbddf6f2f173e1e65dab7b43ae70987938ef6b255f7d61d99cb9427357e2a" => :sierra - end - - def install - cd "mac" do - system "./build.command" - bin.install "ccextractor" - end - (pkgshare/"examples").install "docs/ccextractor.cnf.sample" - end - - test do - touch testpath/"test" - pid = fork do - exec bin/"ccextractor", testpath/"test" - end - Process.wait(pid) - assert_predicate testpath/"test.srt", :exist? - end -end diff --git a/Formula/cclive.rb b/Formula/cclive.rb deleted file mode 100644 index aa348bf54f141..0000000000000 --- a/Formula/cclive.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Cclive < Formula - desc "Command-line video extraction utility" - homepage "https://cclive.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cclive/0.7/cclive-0.7.16.tar.xz" - sha256 "586a120faddcfa16f5bb058b5c901f1659336c6fc85a0d3f1538882a44ee10e1" - revision 3 - - bottle do - cellar :any - sha256 "2ea1ae5e7b943c10a475487b07bce6bd6ae9c31b566925b8d517acfd9274b292" => :mojave - sha256 "5f249a48060074837ea7d628783ed52d7bf764a613cb643c7e0af8ae47d2e1e4" => :high_sierra - sha256 "561b79d162682fe1f604ade8123482b3dc9ebd958834a074f4cc1f67b77f7fb8" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "pcre" - depends_on "quvi" - - conflicts_with "clozure-cl", :because => "both install a ccl binary" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - url = "https://youtu.be/VaVZL7F6vqU" - output = shell_output("#{bin}/cclive --no-download #{url} 2>&1") - assert_match "Martin Luther King Jr Day", output - end -end diff --git a/Formula/ccm.rb b/Formula/ccm.rb deleted file mode 100644 index 171accfb52c33..0000000000000 --- a/Formula/ccm.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Ccm < Formula - desc "Create and destroy an Apache Cassandra cluster on localhost" - homepage "https://github.com/pcmanus/ccm" - url "https://files.pythonhosted.org/packages/fc/ab/b51afd466cc4acf2192e230ddb6fd3adb56066f05c7be1852af7bd655068/ccm-3.1.4.tar.gz" - sha256 "a98268c2d8e5534d8d2d94267060e9ee9105b35e43d704bac0fa495a773acf7d" - revision 1 - head "https://github.com/pcmanus/ccm.git" - - bottle do - cellar :any_skip_relocation - sha256 "7459ea7995ce0dfe7289e55b0d4b78dca3a41909b2a067c908226da64df67051" => :mojave - sha256 "00bf2f352fc8ea1d34560c269db3d8674f7aacf73a691a26a959d3073127473c" => :high_sierra - sha256 "4888764eb18e9bb810507cce436275d9af23d81ed52d26b168ba23fd1d40c9a7" => :sierra - end - - depends_on "python" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz" - sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "cassandra-driver" do - url "https://files.pythonhosted.org/packages/2d/77/2e344b58ffe8b11271735c1ee88fa668c897c5b72ed1913067dd86e1a966/cassandra-driver-3.13.0.tar.gz" - sha256 "61b670fb2ba95d51d91fa7b589aae3666df494713f5d1ed78bb5c510778d77f0" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - %w[PyYAML six cassandra-driver].each do |r| - resource(r).stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - assert_match "Usage", shell_output("#{bin}/ccm", 1) - end -end diff --git a/Formula/cconv.rb b/Formula/cconv.rb deleted file mode 100644 index a313e44e5b023..0000000000000 --- a/Formula/cconv.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Cconv < Formula - desc "Iconv based simplified-traditional Chinese conversion tool" - homepage "https://github.com/xiaoyjy/cconv" - url "https://github.com/xiaoyjy/cconv/archive/v0.6.3.tar.gz" - sha256 "82f46a94829f5a8157d6f686e302ff5710108931973e133d6e19593061b81d84" - - bottle do - cellar :any - sha256 "ffaf8b5cab0618e52cfedff14a5084cfe54e0b1b6480433e2ffb4beee8e47ec9" => :mojave - sha256 "c4d197f979340a89d5a87e05eae6a39db38863f89b6ddda42f924472d87a5b0d" => :high_sierra - sha256 "2e885b9571a8814f2b23b088f3f0d45f47b1fe762f040c3e66b1a81f84673646" => :sierra - sha256 "bda78602260276dd3e5187a5a9d6bbcfb95ff40aa513840569e490d5dc96aab2" => :el_capitan - sha256 "a77d6efc52430482ff2c64db8ba20444b50faf79491c95f8f6bd9f3f29050c53" => :yosemite - sha256 "e4c46fb9d36be065327eada53be03aa8a83665add22340805ef96d0fa5fdb8d6" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - ENV.append "LDFLAGS", "-liconv" - - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - rm_f include/"unicode.h" - end - - test do - system bin/"cconv", "-l" - end -end diff --git a/Formula/ccrypt.rb b/Formula/ccrypt.rb deleted file mode 100644 index 727857710bca5..0000000000000 --- a/Formula/ccrypt.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ccrypt < Formula - desc "Encrypt and decrypt files and streams" - homepage "https://ccrypt.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ccrypt/1.11/ccrypt-1.11.tar.gz" - sha256 "b19c47500a96ee5fbd820f704c912f6efcc42b638c0a6aa7a4e3dc0a6b51a44f" - - bottle do - sha256 "49054d9d502ab13e65ab873cc9d355ab75438372a7770c38c4c7c35c84c31e3a" => :mojave - sha256 "a4d270d5b5f467870f0b265f6f2d1861762d853df46756a34ac7e6a6d83e2121" => :high_sierra - sha256 "048295cb4f95c9f0f3c5f1a619141e08c0326b6d8252c62c97608fb028cb48f7" => :sierra - sha256 "a98ea0f3dbee5e9086bea342ac8291303970b1d8a85344be2b4d91330a919ae9" => :el_capitan - end - - conflicts_with "ccat", :because => "both install `ccat` binaries" - - fails_with :clang do - build 318 - cause "Tests fail when optimizations are enabled" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-lispdir=#{share}/emacs/site-lisp/ccrypt" - system "make", "install" - system "make", "check" - end - - test do - touch "homebrew.txt" - system bin/"ccrypt", "-e", testpath/"homebrew.txt", "-K", "secret" - assert_predicate testpath/"homebrew.txt.cpt", :exist? - refute_predicate testpath/"homebrew.txt", :exist? - - system bin/"ccrypt", "-d", testpath/"homebrew.txt.cpt", "-K", "secret" - assert_predicate testpath/"homebrew.txt", :exist? - refute_predicate testpath/"homebrew.txt.cpt", :exist? - end -end diff --git a/Formula/ccze.rb b/Formula/ccze.rb deleted file mode 100644 index 5ff8b9ee855ec..0000000000000 --- a/Formula/ccze.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Ccze < Formula - desc "Robust and modular log colorizer" - homepage "https://packages.debian.org/wheezy/ccze" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/c/ccze/ccze_0.2.1.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/c/ccze/ccze_0.2.1.orig.tar.gz" - sha256 "8263a11183fd356a033b6572958d5a6bb56bfd2dba801ed0bff276cfae528aa3" - revision 1 - - bottle do - sha256 "d1993c584b39fc35c9b03d62677a5944301a64d96a8e72db89f2ba4974939990" => :mojave - sha256 "6aa074341d1442c6795ece5581a5b404277254d4fdf3a42004d23e32e73824dd" => :high_sierra - sha256 "7f1d8fb98c7ca95eb938ff2bae748ad081772542234bbd25151cc37e0f097461" => :sierra - sha256 "795fc9b842f53197ec45774d909fb14efd463a64215fbec799ad870bb78a6834" => :el_capitan - sha256 "11c34c8ad4df9993b7f465c7c7a7fdb2588e3c75d678f3b22f36166ca1c04520" => :yosemite - sha256 "40b61bc0353350f43c97f611d26c0826e4e4ce5df0284b1f544e89460af25722" => :mavericks - end - - depends_on "pcre" - - def install - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823334 - inreplace "src/ccze-compat.c", "#if HAVE_SUBOPTARg", "#if HAVE_SUBOPTARG" - # Allegedly from Debian & fixes compiler errors on old OS X releases. - # https://github.com/Homebrew/legacy-homebrew/pull/20636 - inreplace "src/Makefile.in", "-Wreturn-type -Wswitch -Wmulticharacter", - "-Wreturn-type -Wswitch" - - system "./configure", "--prefix=#{prefix}", - "--with-builtins=all" - system "make", "install" - # Strange but true: using --mandir above causes the build to fail! - share.install prefix/"man" - end - - test do - system "#{bin}/ccze", "--help" - end -end diff --git a/Formula/cd-discid.rb b/Formula/cd-discid.rb deleted file mode 100644 index 618d715a6e77a..0000000000000 --- a/Formula/cd-discid.rb +++ /dev/null @@ -1,76 +0,0 @@ -class CdDiscid < Formula - desc "Read CD and get CDDB discid information" - homepage "http://linukz.org/cd-discid.shtml" - revision 2 - head "https://github.com/taem/cd-discid.git" - - stable do - url "http://linukz.org/download/cd-discid-1.4.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/c/cd-discid/cd-discid_1.4.orig.tar.gz" - sha256 "ffd68cd406309e764be6af4d5cbcc309e132c13f3597c6a4570a1f218edd2c63" - - # macOS fix; see https://github.com/Homebrew/homebrew/issues/46267 - # Already fixed in upstream head; remove when bumping version to >1.4 - patch :DATA - end - - bottle do - cellar :any_skip_relocation - sha256 "158d91563b2e79574c0a336f775b49033d85ce3b290f122dae853dea45841f5b" => :mojave - sha256 "26b88be0312f960484625161d94adf9a44aa88ef5817ba28b61af520a6e17e03" => :high_sierra - sha256 "6b0d9c55a1adfce8a2c6e9eabd00c37118a05b60678564e7a9695d876bca117b" => :sierra - sha256 "f0c17cfc3c345c661104a6f29562b766cac2a80747feea0c26cda04ece3c8326" => :el_capitan - sha256 "3331be095997a1e5e6acb9f82f5e5473ed51c0f35976229371dc1d0c703c2e3b" => :yosemite - sha256 "86f0066d344a2a0a37e3c00d08255d4a505b41cc2c38e7d33ac643d16af8ad71" => :mavericks - end - - def install - system "make", "CC=#{ENV.cc}" - bin.install "cd-discid" - man1.install "cd-discid.1" - end - - test do - assert_equal "cd-discid #{version}.", shell_output("#{bin}/cd-discid --version 2>&1").chomp - end -end - -__END__ -diff --git a/cd-discid.c b/cd-discid.c -index 9b0b40a..2c96641 100644 ---- a/cd-discid.c -+++ b/cd-discid.c -@@ -93,7 +93,7 @@ - #define cdth_trk1 lastTrackNumberInLastSessionLSB - #define cdrom_tocentry CDTrackInfo - #define cdte_track_address trackStartAddress --#define DEVICE_NAME "/dev/disk1" -+#define DEVICE_NAME "/dev/rdisk1" - - #else - #error "Your OS isn't supported yet." -@@ -236,8 +236,7 @@ int main(int argc, char *argv[]) - * TocEntry[last-1].lastRecordedAddress + 1, so we compute the start - * of leadout from the start+length of the last track instead - */ -- TocEntry[last].cdte_track_address = TocEntry[last - 1].trackSize + -- TocEntry[last - 1].trackStartAddress; -+TocEntry[last].cdte_track_address = htonl(ntohl(TocEntry[last-1].trackSize) + ntohl(TocEntry[last-1].trackStartAddress)); - #else /* FreeBSD, Linux, Solaris */ - for (i = 0; i < last; i++) { - /* tracks start with 1, but I must start with 0 on OpenBSD */ -@@ -260,12 +259,12 @@ int main(int argc, char *argv[]) - /* release file handle */ - close(drive); - --#if defined(__FreeBSD__) -+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) - TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address); - #endif - - for (i = 0; i < last; i++) { --#if defined(__FreeBSD__) -+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) - TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address); - #endif - cksum += cddb_sum((TocEntry[i].cdte_track_address + CD_MSF_OFFSET) / CD_FRAMES); diff --git a/Formula/cdargs.rb b/Formula/cdargs.rb deleted file mode 100644 index 3b8c614d89c80..0000000000000 --- a/Formula/cdargs.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Cdargs < Formula - desc "Bookmarks for the shell" - homepage "https://www.skamphausen.de/cgi-bin/ska/CDargs" - url "https://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz" - sha256 "ee35a8887c2379c9664b277eaed9b353887d89480d5749c9ad957adf9c57ed2c" - - bottle do - cellar :any_skip_relocation - sha256 "d06682d3e4d5ad57b05b00ee2d15f6b34da528e420ea038604b4897c570efd8d" => :mojave - sha256 "10a170bfe1b70f6c8909ddb6fb88b7615219d6847576e72ee1e4011aba482e9b" => :high_sierra - sha256 "5ba84d6dff14f5743296721a91e6d01ce984bf6e4589ce2128041b1ed9560a3a" => :sierra - sha256 "de9d5777eb0179f9ffacb5bcbb0ff0ce7f0c1fb208bb992290eb5a36e1d3f159" => :el_capitan - sha256 "cf098fc4187835ef1c970b38ab41719e0900c01d2772572f697e9773a6c632e6" => :yosemite - sha256 "2bb555d4cf65f3d11595350135582599fd6ccf988bc7bb76c58155ddcef29223" => :mavericks - end - - # fixes zsh usage using the patch provided at the cdargs homepage - # (See https://www.skamphausen.de/cgi-bin/ska/CDargs) - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install-strip" - - rm Dir["contrib/Makefile*"] - prefix.install "contrib" - bash_completion.install_symlink "#{prefix}/contrib/cdargs-bash.sh" - end - - def caveats - <<~EOS - Support files for bash, tcsh, and emacs have been installed to: - #{prefix}/contrib - EOS - end - - test do - system "#{bin}/cdargs", "--version" - end -end - -__END__ -diff --git a/contrib/cdargs-bash.sh b/contrib/cdargs-bash.sh -index 8a197ef..f3da067 100644 ---- a/contrib/cdargs-bash.sh -+++ b/contrib/cdargs-bash.sh -@@ -11,6 +11,12 @@ - CDARGS_SORT=0 # set to 1 if you want mark to sort the list - CDARGS_NODUPS=1 # set to 1 if you want mark to delete dups - -+# Support ZSH via its BASH completion emulation -+if [ -n "$ZSH_VERSION" ]; then -+ autoload bashcompinit -+ bashcompinit -+fi -+ - # --------------------------------------------- # - # Run the cdargs program to get the target # - # directory to be used in the various context # -@@ -166,7 +172,7 @@ function mark () - local tmpfile - - # first clear any bookmarks with this same alias, if file exists -- if [[ "$CDARGS_NODUPS" && -e "$HOME/.cdargs" ]]; then -+ if [ "$CDARGS_NODUPS" ] && [ -e "$HOME/.cdargs" ]; then - tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e "s/\\/$//"` - tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM - grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs"; diff --git a/Formula/cdb.rb b/Formula/cdb.rb deleted file mode 100644 index 92639c5574779..0000000000000 --- a/Formula/cdb.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Cdb < Formula - desc "Create and read constant databases" - homepage "https://cr.yp.to/cdb.html" - url "https://cr.yp.to/cdb/cdb-0.75.tar.gz" - sha256 "1919577799a50c080a8a05a1cbfa5fa7e7abc823d8d7df2eeb181e624b7952c5" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "49748511d9e05e7ae4158ca4e4bbf14af858686f0104c85240de06b2acfe9b9c" => :mojave - sha256 "f187d9ff7ddb1a1532e83924d32d02521afc943738e4b21c79da5712340b0bbb" => :high_sierra - sha256 "16b08929c8c42feeb2df4eaed5b46967eca487aaa20585dc5869ba44a28f0fe8" => :sierra - sha256 "ac5a34c222875d86113275127632fe02ccc15c0332c7719cdac8321aa0f83bc4" => :el_capitan - sha256 "4181f08e221e9cebd1cb9f7dd0082fef86d8f8571831491464340b68be238186" => :yosemite - sha256 "e0be7db3074bc27f430c2b7536b4f3676cafc9d7e574971cdb592340be0fec06" => :mavericks - end - - def install - inreplace "conf-home", "/usr/local", prefix - system "make", "setup" - end - - test do - record = "+4,8:test->homebrew\n\n" - pipe_output("#{bin}/cdbmake db dbtmp", record, 0) - assert_predicate testpath/"db", :exist? - assert_equal(record, - pipe_output("#{bin}/cdbdump", (testpath/"db").binread, 0)) - end -end diff --git a/Formula/cdecl.rb b/Formula/cdecl.rb deleted file mode 100644 index 8ad7edab6c90a..0000000000000 --- a/Formula/cdecl.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Cdecl < Formula - desc "Turn English phrases to C or C++ declarations" - homepage "https://cdecl.org/" - url "https://cdecl.org/files/cdecl-blocks-2.5.tar.gz" - sha256 "9ee6402be7e4f5bb5e6ee60c6b9ea3862935bf070e6cecd0ab0842305406f3ac" - - bottle do - cellar :any_skip_relocation - sha256 "beed8e3f4c2de0b75bd12bd65e6d9ce4a7cb626fac5cd8c5e20426d2b9325840" => :mojave - sha256 "a2469d514723e35850b252b97d3bf90f9311c276455b218383d276ccb0c88ee4" => :high_sierra - sha256 "1d424613881cf9109d824664fc77fc947f2968b9850d448db4b02c6f0a562b5c" => :sierra - sha256 "4f0e990d88823aa9f3d1dcea71ffa442c13640ce82cc9da41f90a1be5ef457dc" => :el_capitan - sha256 "e8f53a0e5b3649f0c691c60380b9c77af573387240f3479a41550583fcc4e22c" => :yosemite - sha256 "b1e1618d0f1bcbb801c669c314c36c72e47e8829950a8bf0899d0517f3036ccc" => :mavericks - end - - def install - # Fix namespace clash with Lion's getline - inreplace "cdecl.c", "getline", "cdecl_getline" - - bin.mkpath - man1.mkpath - - ENV.append "CFLAGS", "-DBSD -DUSE_READLINE -std=gnu89" - - system "make", "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LIBS=-lreadline", - "BINDIR=#{bin}", - "MANDIR=#{man1}", - "install" - end - - test do - assert_equal "declare a as pointer to int", - shell_output("#{bin}/cdecl explain int *a").strip - end -end diff --git a/Formula/cdk.rb b/Formula/cdk.rb deleted file mode 100644 index a873432897380..0000000000000 --- a/Formula/cdk.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Cdk < Formula - desc "Curses development kit provides predefined curses widget for apps" - homepage "https://invisible-island.net/cdk/" - url "https://invisible-mirror.net/archives/cdk/cdk-5.0-20180306.tgz" - version "5.0.20180306" - sha256 "cca9e345c6728c235eb3188af9266327c09c01da124a30b0cbd692ac08c6ebd0" - - bottle do - cellar :any_skip_relocation - sha256 "0d5c973c46791f4aaceb9e343cb57029f28327ea94fa480f2601872b60e8fb24" => :mojave - sha256 "4fa97741c58623aedd6f8e41147cf503b21a318ae035341871212841bab0fbb0" => :high_sierra - sha256 "58c136c407b21c5d34db2ae0f206887639f4077482a607060010ba172a6c1433" => :sierra - sha256 "7d8e6706f54a83fe58b0ae7480bc7ff0fff3374a1d3f4615286057c336f31c37" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", "--with-ncurses" - system "make", "install" - end - - test do - assert_match lib.to_s, shell_output("#{bin}/cdk5-config --libdir") - end -end diff --git a/Formula/cdlabelgen.rb b/Formula/cdlabelgen.rb deleted file mode 100644 index 78cbdff0e422b..0000000000000 --- a/Formula/cdlabelgen.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Cdlabelgen < Formula - desc "CD/DVD inserts and envelopes" - homepage "https://www.aczoom.com/tools/cdinsert/" - url "https://www.aczoom.com/pub/tools/cdlabelgen-4.3.0.tgz" - sha256 "94202a33bd6b19cc3c1cbf6a8e1779d7c72d8b3b48b96267f97d61ced4e1753f" - - bottle do - cellar :any_skip_relocation - sha256 "5162ba8c34a6aeef369b5004d1608fa2b8de5a33350f1d7629f08eed8b18d5d9" => :mojave - sha256 "ece93bae3d8b9e6e5c37b347849836dc970183efcea603d7d3b6f8f0dbaebd4a" => :high_sierra - sha256 "a874e660972a4ac722e56e13749a17f3c76c5fa61691f44d70afb13c88e4e65f" => :sierra - sha256 "34758541efaf3e124ff531d09cdf3f511651be8602f179de1e5ecd606b0aa60b" => :el_capitan - sha256 "caeda225b0c542c388723e7ac464844d8924705e14313a1665526564d3bb12bc" => :yosemite - sha256 "bf49f61ddb7f79e9699bfca3e0867b5869359be85de43184b77abadece71a645" => :mavericks - end - - def install - man1.mkpath - system "make", "install", "BASE_DIR=#{prefix}" - end - - test do - system "#{bin}/cdlabelgen", "-c", "TestTitle", "--output-file", "testout.eps" - File.file?("testout.eps") - end -end diff --git a/Formula/cdogs-sdl.rb b/Formula/cdogs-sdl.rb deleted file mode 100644 index 60b15a356e0ba..0000000000000 --- a/Formula/cdogs-sdl.rb +++ /dev/null @@ -1,40 +0,0 @@ -class CdogsSdl < Formula - desc "Classic overhead run-and-gun game" - homepage "https://cxong.github.io/cdogs-sdl/" - url "https://github.com/cxong/cdogs-sdl/archive/0.6.2.tar.gz" - sha256 "d6f421c760b15b706bdfc79ed8d18802dc2e8efeefabb69a31679c9b51f328ab" - head "https://github.com/cxong/cdogs-sdl.git" - - bottle do - sha256 "9530302fcce7df71e0e5cb97390af1fa8a8e7e4ccc4deeff92a0a0509d5a704a" => :mojave - sha256 "aabf4faff2a2da410e14079a9520ea715106a294edf8748edad7bf480cedd605" => :high_sierra - sha256 "b612f4fdf5d7f15e2ff88a5045437d1d411e254e6cda143d3256870bc5b2a30c" => :sierra - sha256 "c154d6101f4b903488527a604b570e28703a19854da31d56e082444fe5dda1a5" => :el_capitan - sha256 "535668e2f4619dde88da207249a2bbaaecd34d0972ce6f87947868518d7a6a54" => :yosemite - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - - def install - args = std_cmake_args - args << "-DCDOGS_DATA_DIR=#{pkgshare}/" - system "cmake", ".", *args - system "make" - prefix.install "src/cdogs-sdl.app" - bin.write_exec_script "#{prefix}/cdogs-sdl.app/Contents/MacOS/cdogs-sdl" - pkgshare.install %w[data dogfights graphics missions music sounds] - doc.install Dir["doc/*"] - end - - test do - server = fork do - system "#{bin}/cdogs-sdl" - end - sleep 5 - Process.kill("TERM", server) - end -end diff --git a/Formula/cdparanoia.rb b/Formula/cdparanoia.rb deleted file mode 100644 index ee34f3cd38db4..0000000000000 --- a/Formula/cdparanoia.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Cdparanoia < Formula - desc "Audio extraction tool for sampling CDs" - homepage "https://www.xiph.org/paranoia/" - url "https://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-10.2.src.tgz" - sha256 "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df" - - bottle do - cellar :any - sha256 "68b478e2d9e8f7121040f99551a45cab8dd8cd91d94e8690ea17103d884daeaf" => :mojave - sha256 "8b8b1eeb36773ce01ef09232e2e7270fc759aedd1814218cbd8eb9f668a4bf73" => :high_sierra - sha256 "709190d769f7b8c61d19867ae2faf902a2f84dec6f0d5506bd71c56a99e4a67a" => :sierra - sha256 "135250473fe692dc976ecbf7324676fa8cef3cdb48a091287bb183c31548fed9" => :el_capitan - sha256 "3cd7bbd1a4a0a7992287b255cf0d6409bdb5f4a3fed245b0fd2296e535e9f2de" => :yosemite - sha256 "14ec797a041edffe73fef897853a833e5588278c03511f27499e55efb68c848d" => :mavericks - end - - depends_on "autoconf" => :build - - # Patches via MacPorts - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/2a22152/cdparanoia/osx_interface.patch" - sha256 "3eca8ff34d2617c460056f97457b5ac62db1983517525e5c73886a2dea9f06d9" - end - - def install - system "autoconf" - # Libs are installed as keg-only because most software that searches for cdparanoia - # will fail to link against it cleanly due to our patches - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--libdir=#{libexec}" - system "make", "all" - system "make", "install" - end - - test do - system "#{bin}/cdparanoia", "--version" - end -end diff --git a/Formula/cdpr.rb b/Formula/cdpr.rb deleted file mode 100644 index 38d5952d0cb7a..0000000000000 --- a/Formula/cdpr.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Cdpr < Formula - desc "Cisco Discovery Protocol Reporter" - homepage "http://www.monkeymental.com/" - url "https://downloads.sourceforge.net/project/cdpr/cdpr/2.4/cdpr-2.4.tgz" - sha256 "32d3b58d8be7e2f78834469bd5f48546450ccc2a86d513177311cce994dfbec5" - - bottle do - cellar :any_skip_relocation - sha256 "ae75b31d4fb195d0735784d7fb86924821ad07dfc5c5b4ff91597f6e0ceb5fba" => :mojave - sha256 "ce836a4189c94a1441cb417f36699fca01e3cf30b69bcc5a3ec8307c51d0f66e" => :high_sierra - sha256 "c6603372329fd2dc0c60266b3f3eb6c9f7cc5c0ce7f351b05977ab39a18cde7c" => :sierra - sha256 "0bdc868c9b11510e2d9e6551dee970c20406215153906d8bc42790d8510ac429" => :el_capitan - sha256 "3f0fbd6fe9862b367f64354ad6ce3b2deacd35ae627f8d73d5095739325be378" => :yosemite - sha256 "d23bf22f119337fdb04c7a016046ceb6c724d63015f19620d55c3e4883827f21" => :mavericks - end - - def install - # Makefile hardcodes gcc and other atrocities - system ENV.cc, ENV.cflags, "cdpr.c", "cdprs.c", "conffile.c", ENV.ldflags, "-lpcap", "-o", "cdpr" - bin.install "cdpr" - end - - def caveats - "run cdpr sudo'd in order to avoid the error: 'No interfaces found! Make sure pcap is installed.'" - end - - test do - system "#{bin}/cdpr", "-h" - end -end diff --git a/Formula/cdrdao.rb b/Formula/cdrdao.rb deleted file mode 100644 index 6500966db2ff2..0000000000000 --- a/Formula/cdrdao.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Cdrdao < Formula - desc "Record CDs in Disk-At-Once mode" - homepage "https://cdrdao.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cdrdao/cdrdao-1.2.4.tar.bz2" - sha256 "358d9cb83370ceaecdc60564cbf14c2ea2636eac60a966e2461c011ba09853b4" - - bottle do - sha256 "f8894deccbd18e7d5362ace73618666d9a79b233cea5dc6af367ab9e257332e0" => :mojave - sha256 "1efaa356872419da65763a5e28faf262b79f5a37e2eb83c06c22e9846bae188f" => :high_sierra - sha256 "cd0c72a2c84f084e4f5fe28df185e9154409645138e55502ffb9c4075ae4dfea" => :sierra - sha256 "d49e947354162d163937e801fd00468823b16d8462e179f6cfe20a84eb19ffb5" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "lame" - depends_on "libao" - depends_on "libvorbis" - depends_on "mad" - - # first patch fixes build problems under 10.6 - # see https://sourceforge.net/p/cdrdao/patches/23/ - patch do - url "https://sourceforge.net/p/cdrdao/patches/_discuss/thread/205354b0/141e/attachment/cdrdao-mac.patch" - sha256 "ee1702dfd9156ebb69f5d84dcab04197e11433dd823e80923fd497812041179e" - end - - # second patch fixes device autodetection on macOS - # see https://trac.macports.org/ticket/27819 - # upstream bug report: - # https://sourceforge.net/p/cdrdao/bugs/175/ - patch :p0, :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end -end - -__END__ ---- dao/main.cc 2013-11-26 12:00:00.000000000 -0400 -+++ dao/main.cc 2013-11-26 12:00:00.000000000 -0400 -@@ -1242,7 +1242,7 @@ - const char* getDefaultDevice(DaoDeviceType req) - { - int i, len; -- static char buf[128]; -+ static char buf[1024]; - - // This function should not be called if the command issues - // doesn't actually require a device. -@@ -1270,7 +1270,7 @@ - if (req == NEED_CDRW_W && !rww) - continue; - -- strncpy(buf, sdata[i].dev.c_str(), 128); -+ strncpy(buf, sdata[i].dev.c_str(), 1024); - delete[] sdata; - return buf; - } diff --git a/Formula/cdrtools.rb b/Formula/cdrtools.rb deleted file mode 100644 index 7ea794678b0f5..0000000000000 --- a/Formula/cdrtools.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Cdrtools < Formula - desc "CD/DVD/Blu-ray premastering and recording software" - homepage "http://cdrecord.org/" - url "https://downloads.sourceforge.net/project/cdrtools/cdrtools-3.01.tar.bz2" - mirror "https://fossies.org/linux/misc/cdrtools-3.01.tar.bz2" - sha256 "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f" - revision 1 - - bottle do - rebuild 1 - sha256 "4a7ba59af434b1302056aafd200f273470e91d27c9ad2a19f05a834ee41dc3be" => :mojave - sha256 "465c4ba80bc7733b2ac85a9d17ca7149a32072d453d750795374e8c2021e207b" => :high_sierra - sha256 "f97ea5375a9dd443000397890ab8424905f02ea278ab8dd4568ff4c7288d038a" => :sierra - sha256 "4724b3dfe367cf28dbd98dad6ddd47179e5b5d1b599a8fff8f0fa8cc4621acb2" => :el_capitan - sha256 "5370586e423d9b842b7ebd0cdb3dd2c763c433be9896bcab636cc56ecd5e0634" => :yosemite - sha256 "1b3f3ab5baf44ad31f8d09e36de6df59901ce036cc681c54187fe5f41dc8bb94" => :mavericks - end - - depends_on "smake" => :build - - conflicts_with "dvdrtools", - :because => "both dvdrtools and cdrtools install binaries by the same name" - - patch do - url "https://downloads.sourceforge.net/project/cdrtools/cdrtools-3.01-fix-20151126-mkisofs-isoinfo.patch" - sha256 "4e07a2be599c0b910ab3401744cec417dbdabf30ea867ee59030a7ad1906498b" - end - - def install - # Speed-up the build by skipping the compilation of the profiled libraries. - # This could be done by dropping each occurence of *_p.mk from the definition - # of MK_FILES in every lib*/Makefile. But it is much easier to just remove all - # lib*/*_p.mk files. The latter method produces warnings but works fine. - rm_f Dir["lib*/*_p.mk"] - system "smake", "INS_BASE=#{prefix}", "INS_RBASE=#{prefix}", "install" - # cdrtools tries to install some generic smake headers, libraries and - # manpages, which conflict with the copies installed by smake itself - (include/"schily").rmtree - %w[libschily.a libdeflt.a libfind.a].each do |file| - (lib/file).unlink - end - man5.rmtree - end - - test do - system "#{bin}/cdrecord", "-version" - system "#{bin}/cdda2wav", "-version" - date = shell_output("date") - mkdir "subdir" do - (testpath/"subdir/testfile.txt").write(date) - system "#{bin}/mkisofs", "-r", "-o", "../test.iso", "." - end - assert_predicate testpath/"test.iso", :exist? - system "#{bin}/isoinfo", "-R", "-i", "test.iso", "-X" - assert_predicate testpath/"testfile.txt", :exist? - assert_equal date, File.read("testfile.txt") - end -end diff --git a/Formula/center-im.rb b/Formula/center-im.rb deleted file mode 100644 index 0278832a7d3ea..0000000000000 --- a/Formula/center-im.rb +++ /dev/null @@ -1,60 +0,0 @@ -class CenterIm < Formula - desc "Text-mode multi-protocol instant messaging client" - homepage "https://www.centerim.org/index.php/Main_Page" - url "https://www.centerim.org/download/releases/centerim-4.22.10.tar.gz" - sha256 "93ce15eb9c834a4939b5aa0846d5c6023ec2953214daf8dc26c85ceaa4413f6e" - revision 1 - - bottle do - rebuild 1 - sha256 "f75ad82d6a94767e1db97ff86a1a9e7fd97b53bdfbda02281f7732ec960d6bd6" => :mojave - sha256 "800a4ecf2a11219b619134a85ba492b8256a48d3363135f711da9ca8aab34139" => :high_sierra - sha256 "5f7c56eb5b9cc982df5a17c5cd043ac4968de36e396c219e0f544e9e34e46669" => :sierra - sha256 "315556554c3e5b972b0d99145fd6d0971837c2bbd981b849ca89e7a9c069335b" => :el_capitan - sha256 "5a51f0130fcd601aeed50ae6f66008aaa0ec96f6ac3e7bc828b627f04b46b9f2" => :yosemite - sha256 "673992c76745d9509dd32e71c964946018584db447b37d02a21f332b508c619d" => :mavericks - sha256 "934ab216ab1f6eb9033cfb1bbbe720f2a7fa5190eb64c245d2140694c832a965" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "openssl" - - # Fix build with clang; 4.22.10 is an outdated release and 5.0 is a rewrite, - # so this is not reported upstream - patch :DATA - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/677cb38/center-im/patch-libjabber_jconn.c.diff" - sha256 "ed8d10075c23c7dec2a782214cb53be05b11c04e617350f6f559f3c3bf803cfe" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-msn", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - - # /bin/gawk does not exist on macOS - inreplace bin/"cimformathistory", "/bin/gawk", "/usr/bin/awk" - end - - test do - assert_match /trillian/, shell_output("#{bin}/cimconv") - end -end - -__END__ -diff --git a/libicq2000/libicq2000/sigslot.h b/libicq2000/libicq2000/sigslot.h -index b7509c0..024774f 100644 ---- a/libicq2000/libicq2000/sigslot.h -+++ b/libicq2000/libicq2000/sigslot.h -@@ -82,6 +82,7 @@ - #ifndef SIGSLOT_H__ - #define SIGSLOT_H__ - -+#include - #include - #include - diff --git a/Formula/cereal.rb b/Formula/cereal.rb deleted file mode 100644 index f899a28eefa8e..0000000000000 --- a/Formula/cereal.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Cereal < Formula - desc "C++11 library for serialization" - homepage "https://uscilab.github.io/cereal/" - url "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz" - sha256 "1921f26d2e1daf9132da3c432e2fd02093ecaedf846e65d7679ddf868c7289c4" - head "https://github.com/USCiLab/cereal.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "4edf85b9241c722b6938386d01edf3b6c8cc57060ffb38a9d5d70ef76273ab61" => :mojave - sha256 "f7df56c0cb700d08a326948a052486c3899a0a38c0ede5af78b4d1d69a22fcf0" => :high_sierra - sha256 "d0cf1bf42b9a95b861b96d456c528996e5918821b9f63e8d8dbf3bb44381378c" => :sierra - sha256 "c4a716ed280100209d328085a3996c3116041bfaa78b9eeb837367de338efb95" => :el_capitan - sha256 "c4a716ed280100209d328085a3996c3116041bfaa78b9eeb837367de338efb95" => :yosemite - end - - depends_on "cmake" => :build - - # error: chosen constructor is explicit in copy-initialization - # Reported 3 Sep 2016: https://github.com/USCiLab/cereal/issues/339 - depends_on :macos => :yosemite - - def install - system "cmake", ".", "-DJUST_INSTALL_CEREAL=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - - struct MyRecord - { - uint8_t x, y; - float z; - - template - void serialize( Archive & ar ) - { - ar( x, y, z ); - } - }; - - struct SomeData - { - int32_t id; - std::shared_ptr> data; - - template - void save( Archive & ar ) const - { - ar( data ); - } - - template - void load( Archive & ar ) - { - static int32_t idGen = 0; - id = idGen++; - ar( data ); - } - }; - - int main() - { - std::ofstream os("out.cereal", std::ios::binary); - cereal::BinaryOutputArchive archive( os ); - - SomeData myData; - archive( myData ); - - return 0; - } - EOS - system ENV.cc, "-std=c++11", "-stdlib=libc++", "-lc++", "-o", "test", "test.cpp" - system "./test" - end -end diff --git a/Formula/ceres-solver.rb b/Formula/ceres-solver.rb deleted file mode 100644 index d8ff44e051b4e..0000000000000 --- a/Formula/ceres-solver.rb +++ /dev/null @@ -1,52 +0,0 @@ -class CeresSolver < Formula - desc "C++ library for large-scale optimization" - homepage "http://ceres-solver.org/" - url "http://ceres-solver.org/ceres-solver-1.14.0.tar.gz" - sha256 "4744005fc3b902fed886ea418df70690caa8e2ff6b5a90f3dd88a3d291ef8e8e" - revision 4 - head "https://ceres-solver.googlesource.com/ceres-solver.git" - - bottle do - cellar :any - sha256 "184378b425aa3279412a018696a3048cc238cfad865a00890cd89f59956bbdd8" => :mojave - sha256 "1b9002dd288c3022ebf285032499019f4eb1a72bbc6b89814e5cdb08ad7ef4c3" => :high_sierra - sha256 "0c273ca28ec78baed86d81b890bbc3fba76af2bb5c5fdbc9e1d97a490f6a4d40" => :sierra - end - - depends_on "cmake" - depends_on "eigen" - depends_on "gflags" - depends_on "glog" - depends_on "metis" - depends_on "suite-sparse" - - def install - system "cmake", ".", *std_cmake_args, - "-DBUILD_SHARED_LIBS=ON", - "-DEIGEN_INCLUDE_DIR=#{Formula["eigen"].opt_include}/eigen3", - "-DMETIS_LIBRARY=#{Formula["metis"].opt_lib}/libmetis.dylib", - "-DGLOG_INCLUDE_DIR_HINTS=#{Formula["glog"].opt_include}", - "-DGLOG_LIBRARY_DIR_HINTS=#{Formula["glog"].opt_lib}", - "-DTBB=OFF" - system "make" - system "make", "install" - pkgshare.install "examples", "data" - doc.install "docs/html" unless build.head? - end - - test do - cp pkgshare/"examples/helloworld.cc", testpath - (testpath/"CMakeLists.txt").write <<~EOS - cmake_minimum_required(VERSION 2.8) - project(helloworld) - find_package(Ceres REQUIRED) - include_directories(${CERES_INCLUDE_DIRS}) - add_executable(helloworld helloworld.cc) - target_link_libraries(helloworld ${CERES_LIBRARIES}) - EOS - - system "cmake", "-DCeres_DIR=#{share}/Ceres", "." - system "make" - assert_match "CONVERGENCE", shell_output("./helloworld") - end -end diff --git a/Formula/cern-ndiff.rb b/Formula/cern-ndiff.rb deleted file mode 100644 index 6a5cad09b00e8..0000000000000 --- a/Formula/cern-ndiff.rb +++ /dev/null @@ -1,31 +0,0 @@ -class CernNdiff < Formula - desc "Numerical diff tool" - # Note: ndiff is a sub-project of Mad-X at the moment.. - homepage "https://mad.web.cern.ch/mad/" - url "https://github.com/MethodicalAcceleratorDesign/MAD-X/archive/v5.04.02.tar.gz" - sha256 "4bd4670e63fb99521f17702b99913bb767b31953680937a64a97314f5b2e715b" - head "https://github.com/MethodicalAcceleratorDesign/MAD-X.git" - - bottle do - cellar :any_skip_relocation - sha256 "51ade6e0cb3717a6123da78cef16a2e77cfc7544f613ee24df0b5122d8c27963" => :mojave - sha256 "4dd0bd56b604a2d94d569498749baab86242c8fe4eb20c12364f510a8643435f" => :high_sierra - sha256 "dbc2378692211fed755ffef20423329fb5f20ebbd02411adf1a77f23df9333fb" => :sierra - end - - depends_on "cmake" => :build - - def install - cd "tools/numdiff" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"lhs.txt").write("0.0 2e-3 0.003") - (testpath/"rhs.txt").write("1e-7 0.002 0.003") - (testpath/"test.cfg").write("* * abs=1e-6") - system "#{bin}/ndiff", "lhs.txt", "rhs.txt", "test.cfg" - end -end diff --git a/Formula/certbot.rb b/Formula/certbot.rb deleted file mode 100644 index 99fe9bfa64c24..0000000000000 --- a/Formula/certbot.rb +++ /dev/null @@ -1,189 +0,0 @@ -class Certbot < Formula - include Language::Python::Virtualenv - - desc "Tool to obtain certs from Let's Encrypt and autoenable HTTPS" - homepage "https://certbot.eff.org/" - url "https://github.com/certbot/certbot/archive/v0.30.0.tar.gz" - sha256 "c3473681662c7b47136d550c1fb253e3d7c29629e106b3665732abfa9fb12ced" - head "https://github.com/certbot/certbot.git" - - bottle do - cellar :any - sha256 "4fd7278f266e4f6327563db2043f35d0b6858c0765b2100fe4f0117104e09bc1" => :mojave - sha256 "4d91b61ed27ffc08f24ee1c79740ce8333ea0cbf07918e11c8d57ec506a174ed" => :high_sierra - sha256 "4948e067d225ebb689e08f02c1f01628d31150411dbbd6fb7cd32b01584b8f14" => :sierra - end - - depends_on "augeas" - depends_on "dialog" - depends_on "openssl" - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "ConfigArgParse" do - url "https://files.pythonhosted.org/packages/77/61/ae928ce6ab85d4479ea198488cf5ffa371bd4ece2030c0ee85ff668deac5/ConfigArgParse-0.13.0.tar.gz" - sha256 "e6441aa58e23d3d122055808e5e2220fd742dff6e1e51082d2a4e4ed145dd788" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/f3/39/d3904df7c56f8654691c4ae1bdb270c1c9220d6da79bd3b1fbad91afd0e1/cryptography-2.4.2.tar.gz" - sha256 "05a6052c6a9f17ff78ba78f8e6eb1d777d25db3b763343a1ae89a7a8670386dd" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz" - sha256 "67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "josepy" do - url "https://files.pythonhosted.org/packages/b6/19/d6bee2676ce84d7ea2ea2ee1fb16cf63024afcc1e3c9455ea3e044f77318/josepy-1.1.0.tar.gz" - sha256 "fb5c62c77d26e04df29cb5ecd01b9ce69b6fcc9e521eb1ca193b7faa2afa7086" - end - - resource "mock" do - url "https://files.pythonhosted.org/packages/0c/53/014354fc93c591ccc4abff12c473ad565a2eb24dcd82490fae33dbf2539f/mock-2.0.0.tar.gz" - sha256 "b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba" - end - - resource "parsedatetime" do - url "https://files.pythonhosted.org/packages/e3/b3/02385db13f1f25f04ad7895f35e9fe3960a4b9d53112775a6f7d63f264b6/parsedatetime-2.4.tar.gz" - sha256 "3d817c58fb9570d1eec1dd46fa9448cd644eeed4fb612684b02dfda3a79cb84b" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/33/07/6e68a96ff240a0e7bb1f6e21093532386a98a82d56512e1e3da6d125f7aa/pbr-5.1.1.tar.gz" - sha256 "f59d71442f9ece3dffc17bc36575768e1ee9967756e6b6535f0ee1f0054c3d68" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz" - sha256 "0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04" - end - - resource "pyRFC3339" do - url "https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.1.tar.gz" - sha256 "81b8cbe1519cdb79bed04910dd6fa4e181faf8c88dff1e1b987b5f7ab23a5b1a" - end - - resource "python-augeas" do - url "https://files.pythonhosted.org/packages/b4/d7/62d335d9df28e2f78207dcd12bbbcee89a7b5ba6d247feaddc9d04f27e1e/python-augeas-1.0.3.tar.gz" - sha256 "d062f4a44aee797aa9296f5a82cd8c3df5036ca23df6b9ac48cbaa3b4f29a664" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/cd/71/ae99fc3df1b1c5267d37ef2c51b7d79c44ba8a5e37b48e3ca93b4d74d98b/pytz-2018.7.tar.gz" - sha256 "31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz" - sha256 "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/86/f9/e80fa23edca6c554f1994040064760c12b51daff54b55f9e379e899cd3d4/requests-toolbelt-0.8.0.tar.gz" - sha256 "f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "zope.component" do - url "https://files.pythonhosted.org/packages/49/72/69a2b1eea2b37077e24fa84d287382550c649ecd0b1f25122f4d591ba468/zope.component-4.5.tar.gz" - sha256 "6edfd626c3b593b72895a8cfcf79bff41f4619194ce996a85bce31ac02b94e55" - end - - resource "zope.deferredimport" do - url "https://files.pythonhosted.org/packages/88/dd/b6024072643d2321aac68b4157108c64da2a7d97e61e7c98349e7c61fb3e/zope.deferredimport-4.3.tar.gz" - sha256 "2ddef5a7ecfff132a2dd796253366ecf9748a446e30f1a0b3a636aec9d9c05c5" - end - - resource "zope.deprecation" do - url "https://files.pythonhosted.org/packages/34/da/46e92d32d545dd067b9436279d84c339e8b16de2ca393d7b892bc1e1e9fd/zope.deprecation-4.4.0.tar.gz" - sha256 "0d453338f04bacf91bbfba545d8bcdf529aa829e67b705eac8c1a7fdce66e2df" - end - - resource "zope.event" do - url "https://files.pythonhosted.org/packages/4c/b2/51c0369adcf5be2334280eed230192ab3b03f81f8efda9ddea6f65cc7b32/zope.event-4.4.tar.gz" - sha256 "69c27debad9bdacd9ce9b735dad382142281ac770c4a432b533d6d65c4614bcf" - end - - resource "zope.hookable" do - url "https://files.pythonhosted.org/packages/41/b5/378175b959565de41f45c775cdfbf8897aaeaf29a258b94e40bd2661ce46/zope.hookable-4.2.0.tar.gz" - sha256 "c1df3929a3666fc5a0c80d60a0c1e6f6ef97c7f6ed2f1b7cf49f3e6f3d4dde15" - end - - resource "zope.interface" do - url "https://files.pythonhosted.org/packages/4e/d0/c9d16bd5b38de44a20c6dc5d5ed80a49626fafcb3db9f9efdc2a19026db6/zope.interface-4.6.0.tar.gz" - sha256 "1b3d0dcabc7c90b470e59e38a9acaa361be43b3a6ea644c0063951964717f0e5" - end - - resource "zope.proxy" do - url "https://files.pythonhosted.org/packages/7c/f5/e9ed65cdf8c93d24d7512ef89e21b241bc9ae75d90bc8608cc142f4c26f9/zope.proxy-4.3.1.tar.gz" - sha256 "563c2454b2d0f23bca54d2e0e4d781149b7b06cb5df67e253ca3620f37202dd2" - end - - def install - venv = virtualenv_install_with_resources - - # Shipped with certbot, not external resources. - %w[acme certbot-apache certbot-nginx].each do |r| - venv.pip_install buildpath/r - end - pkgshare.install "examples" - end - - test do - assert_match version.to_s, pipe_output("#{bin}/certbot --version 2>&1") - # This throws a bad exit code but we can check it actually is failing - # for the right reasons by asserting. --version never fails even if - # resources are missing or outdated/too new/etc. - assert_match "Either run as root", shell_output("#{bin}/certbot 2>&1", 1) - end -end diff --git a/Formula/certigo.rb b/Formula/certigo.rb deleted file mode 100644 index afc4c527ceec6..0000000000000 --- a/Formula/certigo.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Certigo < Formula - desc "Utility to examine and validate certificates in a variety of formats" - homepage "https://github.com/square/certigo" - url "https://github.com/square/certigo/archive/v1.11.0.tar.gz" - sha256 "2a0e7291c921f9e662743183d0a0695d7b34efb9972cda7f80cf3f9a292bcda0" - head "https://github.com/square/certigo.git" - - bottle do - cellar :any_skip_relocation - sha256 "46fa9befb01dd5aa3a923848f1178ed219500400a1d2e2ba644bcb44c6508273" => :mojave - sha256 "01c67dccacfe76630409daaa8cd8ef53a6680a1c5f6adac6be1cef3adac9a12f" => :high_sierra - sha256 "55c18b8cf5af060425447fcedac72f9f187efdb17fab4ef37de9577251767797" => :sierra - end - - depends_on "go" => :build - - def install - system "./build" - bin.install "bin/certigo" - end - - test do - (testpath/"test.crt").write <<~EOS - -----BEGIN CERTIFICATE----- - MIIDLDCCAhQCCQCa74bQsAj2/jANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJV - UzELMAkGA1UECBMCQ0ExEDAOBgNVBAoTB2NlcnRpZ28xEDAOBgNVBAsTB2V4YW1w - bGUxGDAWBgNVBAMTD2V4YW1wbGUtZXhwaXJlZDAeFw0xNjA2MTAyMjE0MTJaFw0x - NjA2MTEyMjE0MTJaMFgxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UE - ChMHY2VydGlnbzEQMA4GA1UECxMHZXhhbXBsZTEYMBYGA1UEAxMPZXhhbXBsZS1l - eHBpcmVkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs6JY7Hm/NAsH - 3nuMOOSBno6WmwsTYEw3hk4eyprWiI/NpoiaiZVCGahT8NAKqLDW5t9vgKz6c4ff - i5/aQ2scichq3QS7pELAYlS4b+ey3dA6hj62MOTTO4Ad5bFbbRZG+Mdm2Ayvl6eV - 6catQhMvxt7aIoY9+bodyIYC1zZVqwQ5sOT+CPLDnxK+GvhoyD2jL/XwZplWiIVL - oX6eEpKIo/QtB6mSU216F/PuAzl/BJond+RzF9mcxJjdZYZlhwT8+o8oXEMI4vEf - 3yzd+zB/mjuxDJR2iw3bSL+zZr2GV/CsMLG/jmvbpIuyI/p5eTy0alz+iHOiyeCN - 9pgD6jyonwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAMUuv/zVYniJ94GdOVcNJ/ - bL3CxR5lo6YB04S425qsVrmOex3IQBL1fUduKSSxh5nF+6nzhRzRrDzp07f9pWHL - ZHt6rruVhE1Eqt7TKKCtZg0d85lmx5WddL+yWc5cI1UtCohB9+iZDPUBUR9RcszQ - dGD9PmxnPc9soEcQw/3iNffhMMpLRhPaRW9qtJU8wk16DZunWR8E0Oeq42jVTnb4 - ZiD1Idajj0tj/rT5/M1K/ZLEiOzXVpo/+l/+hoXw9eVnRa2nBwjoiZ9cMuGKUpHm - YSv7SyFevNwDwcxcAq6uVitKi0YCqHiNZ7Ye3/BGRDUFpK2IASUo8YbXYNyA/6nu - -----END CERTIFICATE----- - EOS - system bin/"certigo", "dump", "test.crt" - end -end diff --git a/Formula/certstrap.rb b/Formula/certstrap.rb deleted file mode 100644 index 6a150e598b198..0000000000000 --- a/Formula/certstrap.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Certstrap < Formula - desc "Tools to bootstrap CAs, certificate requests, and signed certificates" - homepage "https://github.com/square/certstrap" - url "https://github.com/square/certstrap/archive/v1.1.1.tar.gz" - sha256 "412ba90a4a48d535682f3c7529191cd30cd7a731e57065dcf4242155cec49d5e" - - bottle do - cellar :any_skip_relocation - sha256 "9f9e9e2396f8399f8ac9aaea91179bded59b4aac7a2928ed3f5e615c84388e9c" => :mojave - sha256 "2151866d10f1ba703fbdc8b11632da00eb3588d4041be018721fcaf6278fec14" => :high_sierra - sha256 "58a68f5a88ff0dc4321aeac2aad21fef2edfa85564d6766d3a9149ceebb2cf4b" => :sierra - sha256 "dde1e9de937ea5cd7454bc7163a4fddd56ef75209edc7e6036121f57fa47fe23" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/square").mkpath - ln_s buildpath, "src/github.com/square/certstrap" - system "go", "build", "-o", bin/"certstrap" - end - - test do - system "#{bin}/certstrap", "init", "--common-name", "Homebrew Test CA", "--passphrase", "beerformyhorses" - end -end diff --git a/Formula/ceylon.rb b/Formula/ceylon.rb deleted file mode 100644 index 97b7980186c1c..0000000000000 --- a/Formula/ceylon.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ceylon < Formula - desc "Programming language for writing large programs in teams" - homepage "https://ceylon-lang.org/" - url "https://ceylon-lang.org/download/dist/1_3_3" - sha256 "4ec1f1781043ee369c3e225576787ce5518685f2206eafa7d2fd5cfe6ac9923d" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8" - - def install - man1.install Dir["doc/man/man1/*"] - doc.install Dir["doc/*"] - bin.install "bin/ceylon" - bin.install "bin/ceylon-sh-setup" - libexec.install Dir["*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - cd "#{libexec}/samples/helloworld" do - system "#{bin}/ceylon", "compile", "--out", "#{testpath}/modules", "--encoding", "UTF-8", "com.example.helloworld" - system "#{bin}/ceylon", "doc", "--out", "#{testpath}/modules", "--encoding", "UTF-8", "--non-shared", "com.example.helloworld" - system "#{bin}/ceylon", "run", "--rep", "#{testpath}/modules", "com.example.helloworld/1.0", "John" - end - end -end diff --git a/Formula/cf.rb b/Formula/cf.rb deleted file mode 100644 index 3ae782b0eaf3a..0000000000000 --- a/Formula/cf.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Cf < Formula - desc "Filter to replace numeric timestamps with a formated date time" - homepage "https://ee.lbl.gov/" - url "https://ee.lbl.gov/downloads/cf/cf-1.2.5.tar.gz" - sha256 "ef65e9eb57c56456dfd897fec12da8617c775e986c23c0b9cbfab173b34e5509" - - bottle do - cellar :any_skip_relocation - sha256 "0cbd888d1a69516d55ce6572208b6adbdcbe9df7195199ac5d6e678e3e794f85" => :mojave - sha256 "b94cceb52c7da6995ed4acd014350e6d9b1dbeb7d03b0c8f2256a12e7f520b01" => :high_sierra - sha256 "5f37fd5ff05bdc66d21e9006f8907f1d19c92743bdffc2a5463251f6f681bd20" => :sierra - sha256 "658dbcf6f4868922582db207b8713c8a9009bc99d3d976866ecfacbb9f95dfd5" => :el_capitan - sha256 "4b4d294a9bd632f4daa07e643f7e33e3ffcf419d4df76c6656d2c688795f0d3c" => :yosemite - sha256 "ea165ebb43cf7e6d55e34b43df6dc31bc3b8a3d5d3441cb4106630b168e8c90b" => :mavericks - sha256 "600d033a2a3c1cbfc1be26fb4185779805b4b44b3fc08b32b28c7c36c0ffdddd" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - bin.mkpath - man1.mkpath - system "make", "install" - system "make", "install-man" - end - - test do - assert_match /Jan 20 00:35:44/, `echo 1074558944 | #{bin}/cf -u` - end -end diff --git a/Formula/cf4ocl.rb b/Formula/cf4ocl.rb deleted file mode 100644 index 307a49fdbc284..0000000000000 --- a/Formula/cf4ocl.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cf4ocl < Formula - desc "C Framework for OpenCL" - homepage "https://fakenmc.github.io/cf4ocl/" - url "https://github.com/fakenmc/cf4ocl/archive/v2.1.0.tar.gz" - sha256 "662c2cc4e035da3e0663be54efaab1c7fedc637955a563a85c332ac195d72cfa" - - bottle do - cellar :any - sha256 "24da666d72883cf284895400ef6ac4ae3629213e771b230107e92b6fe31c77bd" => :mojave - sha256 "85c9806ab00b5d3bf3165bc8efb5e4fe663cc4ebeed840910dc716753a77f05e" => :high_sierra - sha256 "5dbbea6e4ea10e6087b197c4779c6907229a9e44639b3c4672f46a8e0bf6ccc8" => :sierra - sha256 "b8846c70badd3c21ce06a77b4693b86a4c95b7010da10a8aa219957b63d45862" => :el_capitan - sha256 "996ae5013abe7b7cd028425e3a4d8a27aef854a1a4f086480b3626b83f629b99" => :yosemite - sha256 "fdb0ae96786ea4b8079b0dadad53a9f497b754f52c312958fa09523aa3a0e856" => :mavericks - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"ccl_devinfo" - end -end diff --git a/Formula/cfengine.rb b/Formula/cfengine.rb deleted file mode 100644 index ef8255bbd2aa2..0000000000000 --- a/Formula/cfengine.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Cfengine < Formula - desc "Help manage and understand IT infrastructure" - homepage "https://cfengine.com/" - url "https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-3.12.0.tar.gz" - sha256 "d71ba98a272390c6fa8bc20e8ea27f0050a0a72a3e6b206a4762b4646be332ec" - - bottle do - sha256 "b1e2079b0bd8aa12ab6232d555c4707f4ccb0cb5ec8f771dffcc29d7bc900f6a" => :mojave - sha256 "6d17d250d32a04ba47bd234abb1c5ee8d7fd69df1dfc517b1ab95c3995a270f3" => :high_sierra - sha256 "67ee78d55c3b1e1877f0e03954dc270ff1874e0151d05d9a402365d118aa2bfa" => :sierra - sha256 "468f1d8fc3726456fe25f14af8795e0410aa7bc558f7e841ce99082e738de149" => :el_capitan - end - - depends_on "libxml2" if MacOS.version < :mountain_lion - depends_on "lmdb" - depends_on "openssl" - depends_on "pcre" - - resource "masterfiles" do - url "https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-3.12.0.tar.gz" - sha256 "1c50e3d8c702097e13a21258626d936d6ff2e6492e893dfe286ff0d6204d7a65" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-workdir=#{var}/cfengine", - "--with-lmdb=#{Formula["lmdb"].opt_prefix}", - "--with-pcre=#{Formula["pcre"].opt_prefix}", - "--without-mysql", - "--without-postgresql" - system "make", "install" - (pkgshare/"CoreBase").install resource("masterfiles") - end - - test do - assert_equal "CFEngine Core #{version}", shell_output("#{bin}/cf-agent -V").chomp - end -end diff --git a/Formula/cfitsio.rb b/Formula/cfitsio.rb deleted file mode 100644 index 66a6a152d299f..0000000000000 --- a/Formula/cfitsio.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Cfitsio < Formula - desc "C access to FITS data files with optional Fortran wrappers" - homepage "https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html" - url "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3450.tar.gz" - version "3.450" - sha256 "bf6012dbe668ecb22c399c4b7b2814557ee282c74a7d5dc704eb17c30d9fb92e" - revision 1 - - bottle do - cellar :any - sha256 "bfb59c9b5b42df93624a3f4a6eca92d89ea58667b560ace653dae5a726f7fb93" => :mojave - sha256 "9426e79aa95e40fa1f1e785738cc91df524ad040d4d25cca351ab29f7624f5fe" => :high_sierra - sha256 "a7b46f6352f302b0302ba5c5ce5edc89d5d0d1b4b231ed87954493c721d2f9a7" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--enable-reentrant" - system "make", "shared" - system "make", "install" - (pkgshare/"testprog").install Dir["testprog*"] - end - - test do - cp Dir["#{pkgshare}/testprog/testprog*"], testpath - system ENV.cc, "testprog.c", "-o", "testprog", "-I#{include}", - "-L#{lib}", "-lcfitsio" - system "./testprog > testprog.lis" - cmp "testprog.lis", "testprog.out" - cmp "testprog.fit", "testprog.std" - end -end diff --git a/Formula/cflow.rb b/Formula/cflow.rb deleted file mode 100644 index 086a60130c3e7..0000000000000 --- a/Formula/cflow.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Cflow < Formula - desc "Generate call graphs from C code" - homepage "https://www.gnu.org/software/cflow/" - url "https://ftp.gnu.org/gnu/cflow/cflow-1.5.tar.bz2" - mirror "https://ftpmirror.gnu.org/cflow/cflow-1.5.tar.bz2" - sha256 "6fe40a106a9ffd6a5489938b939d4301c04fa28a09596294b4f787abca1c037b" - - bottle do - cellar :any_skip_relocation - sha256 "5f5ef480f430e4b9ecec48f82dd057667c19b567de02a7eaf60eb56cb82969a1" => :mojave - sha256 "d97871418bd311cd914ac0b7dbcf900d599ea706c8bb91d20cf9c63406c3d066" => :high_sierra - sha256 "40efaa5c5298d6aa3ca2bce884ede21d21cb59df94eee0bc121a588dcb58257b" => :sierra - sha256 "4bde642d869a9ea7347ad91bdb87a0de3c93f3766e8b74bb6e74a763278724c3" => :el_capitan - sha256 "ae1fcbcfbf28417dfcc4836f32446ece545e9fceee61f34617d6364a2dd106e0" => :yosemite - sha256 "b50f226680f8b0e3acaea2e09781cd6d7b03bdf1191fe338658d9aacef448a9f" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--infodir=#{info}", - "--disable-debug", - "--disable-dependency-tracking", - "--with-lispdir=#{elisp}" - system "make", "install" - end - - test do - (testpath/"whoami.c").write <<~EOS - #include - #include - #include - #include - - int - who_am_i (void) - { - struct passwd *pw; - char *user = NULL; - - pw = getpwuid (geteuid ()); - if (pw) - user = pw->pw_name; - else if ((user = getenv ("USER")) == NULL) - { - fprintf (stderr, "I don't know!\n"); - return 1; - } - printf ("%s\n", user); - return 0; - } - - int - main (int argc, char **argv) - { - if (argc > 1) - { - fprintf (stderr, "usage: whoami\n"); - return 1; - } - return who_am_i (); - } - EOS - - assert_match /getpwuid()/, shell_output("#{bin}/cflow --main who_am_i #{testpath}/whoami.c") - end -end diff --git a/Formula/cfr-decompiler.rb b/Formula/cfr-decompiler.rb deleted file mode 100644 index c1ad1e63b5b7a..0000000000000 --- a/Formula/cfr-decompiler.rb +++ /dev/null @@ -1,35 +0,0 @@ -class CfrDecompiler < Formula - desc "Yet Another Java Decompiler" - homepage "https://www.benf.org/other/cfr/" - url "https://www.benf.org/other/cfr/cfr_0_132.jar" - sha256 "e10b1667835cf5b73f09cf37eb122192ce29583c29f5c3a4e134a43e7669f5ba" - - bottle :unneeded - - depends_on :java => "1.6+" - - def install - jar_version = version.to_s.tr(".", "_") - libexec.install "cfr_#{jar_version}.jar" - bin.write_jar_script libexec/"cfr_#{jar_version}.jar", "cfr-decompiler" - end - - test do - fixture = <<~EOS - import java.io.PrintStream; - - class T { - T() { - } - - public static void main(String[] arrstring) { - System.out.println("Hello brew!"); - } - } - EOS - (testpath/"T.java").write fixture - system "javac", "T.java" - output = pipe_output("#{bin}/cfr-decompiler T.class") - assert_match fixture, output - end -end diff --git a/Formula/cfssl.rb b/Formula/cfssl.rb deleted file mode 100644 index 5808e5fa4b93e..0000000000000 --- a/Formula/cfssl.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Cfssl < Formula - desc "CloudFlare's PKI toolkit" - homepage "https://cfssl.org/" - url "https://github.com/cloudflare/cfssl/archive/1.3.2.tar.gz" - sha256 "69ddddb25beebe65e6fe316b9ab3472eae1cd21b2f377447ddc104624233e419" - head "https://github.com/cloudflare/cfssl.git" - - bottle do - cellar :any_skip_relocation - sha256 "a27ed12dd059541da98e774f8ad32351a5936276abda210b92eff5c29f3997de" => :mojave - sha256 "fcb0d745472f74dd799bfff8099a2330a8262fb24358a679b4dd417c8ef0552b" => :high_sierra - sha256 "046cddc312759ba84d66a0f0242eb32aa54b4015011ce8ebb7d8e0978306e1e9" => :sierra - sha256 "c354f5d2b7767ccd9ec5b50901a7be8e541f1ba0eb6c7c3d2ddc3b89ea3fb574" => :el_capitan - end - - depends_on "go" => :build - depends_on "libtool" - - def install - ENV["GOPATH"] = buildpath - cfsslpath = buildpath/"src/github.com/cloudflare/cfssl" - cfsslpath.install Dir["{*,.git}"] - cd "src/github.com/cloudflare/cfssl" do - system "go", "build", "-o", "#{bin}/cfssl", "cmd/cfssl/cfssl.go" - system "go", "build", "-o", "#{bin}/cfssljson", "cmd/cfssljson/cfssljson.go" - system "go", "build", "-o", "#{bin}/cfsslmkbundle", "cmd/mkbundle/mkbundle.go" - end - end - - def caveats; <<~EOS - `mkbundle` has been installed as `cfsslmkbundle` to avoid conflict - with Mono and other tools that ship the same executable. - EOS - end - - test do - (testpath/"request.json").write <<~EOS - { - "CN" : "Your Certificate Authority", - "hosts" : [], - "key" : { - "algo" : "rsa", - "size" : 4096 - }, - "names" : [ - { - "C" : "US", - "ST" : "Your State", - "L" : "Your City", - "O" : "Your Organization", - "OU" : "Your Certificate Authority" - } - ] - } - EOS - shell_output("#{bin}/cfssl genkey -initca request.json > response.json") - response = JSON.parse(File.read(testpath/"response.json")) - assert_match(/^-----BEGIN CERTIFICATE-----.*/, response["cert"]) - assert_match(/.*-----END CERTIFICATE-----$/, response["cert"]) - assert_match(/^-----BEGIN RSA PRIVATE KEY-----.*/, response["key"]) - assert_match(/.*-----END RSA PRIVATE KEY-----$/, response["key"]) - end -end diff --git a/Formula/cfv.rb b/Formula/cfv.rb deleted file mode 100644 index bbbf1b8fe5885..0000000000000 --- a/Formula/cfv.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Cfv < Formula - desc "Test and create various files (e.g., .sfv, .csv, .crc., .torrent)" - homepage "https://cfv.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cfv/cfv/1.18.3/cfv-1.18.3.tar.gz" - sha256 "ff28a8aa679932b83eb3b248ed2557c6da5860d5f8456ffe24686253a354cff6" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "251348813c0a811e6ac298432967d19e42bfa73bbc3217eaa0b63bec4b78d98d" => :mojave - sha256 "7452ead7901f4f4ab2683cd391af82f856eba1a57c11d07c038ca18507535dac" => :high_sierra - sha256 "449f4b10a0371005f04bffa6271364824a83fbb68cb15208168c19457b987b6e" => :sierra - sha256 "49b83783b5737a364504fdd9fd09672134e0103c7bb8152741d67fca455fde04" => :el_capitan - sha256 "df85f8ee2901bb0b3033a3158d04848bb2fbc455f8af12d7d6eb6869c1471ed9" => :yosemite - sha256 "f251efc545293925f29093f8574495ebbbfe1cbad2a285a7a531e357310e3d1f" => :mavericks - sha256 "7d34208fb03b4f45e61bac26348e928b6cceb3aee1bf113a4d285e0935641520" => :mountain_lion - end - - def install - system "make", "prefix=#{prefix}", "mandir=#{man}", "install" - end - - test do - (testpath/"test/test.txt").write "Homebrew!" - cd "test" do - system bin/"cfv", "-t", "sha1", "-C", "test.txt" - assert_predicate Pathname.pwd/"test.sha1", :exist? - assert_match /9afe8b4d99fb2dd5f6b7b3e548b43a038dc3dc38/, File.read("test.sha1") - end - end -end diff --git a/Formula/cgal.rb b/Formula/cgal.rb deleted file mode 100644 index a222684bae2a3..0000000000000 --- a/Formula/cgal.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Cgal < Formula - desc "Computational Geometry Algorithm Library" - homepage "https://www.cgal.org/" - url "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.13/CGAL-4.13.tar.xz" - sha256 "3e3dd7a64febda58be54c3cbeba329ab6a73b72d4d7647ba4931ecd1fad0e3bc" - - bottle do - cellar :any - sha256 "d969597f4c3fb993bf19363e4e92f0f74427e25f6f855fa28d1f9792084aea9b" => :mojave - sha256 "e6978f966bdd5a050f80185d8e506a38016a8adad6010b039b9ef42558ed14eb" => :high_sierra - sha256 "349890c9c6f40272b3173c15412701f6588003047e5ebc3e0cd2a03c870ba83d" => :sierra - end - - option "with-qt", "Build ImageIO and Qt components of CGAL" - - deprecated_option "imaging" => "with-qt" - deprecated_option "with-imaging" => "with-qt" - deprecated_option "with-qt5" => "with-qt" - - depends_on "cmake" => :build - depends_on "boost" - depends_on "eigen" - depends_on "gmp" - depends_on "mpfr" - depends_on "qt" => :optional - - def install - args = std_cmake_args + %W[ - -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON - -DCMAKE_INSTALL_NAME_DIR=#{HOMEBREW_PREFIX}/lib - -DWITH_Eigen3=ON - -DWITH_LAPACK=ON - ] - - if build.without? "qt" - args << "-DWITH_CGAL_Qt5=OFF" << "-DWITH_CGAL_ImageIO=OFF" - else - args << "-DWITH_CGAL_Qt5=ON" << "-DWITH_CGAL_ImageIO=ON" - end - - system "cmake", ".", *args - system "make", "install" - end - - test do - # https://doc.cgal.org/latest/Algebraic_foundations/Algebraic_foundations_2interoperable_8cpp-example.html - (testpath/"surprise.cpp").write <<~EOS - #include - #include - #include - template - typename CGAL::Coercion_traits::Type - binary_func(const A& a , const B& b){ - typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((CT::Are_explicit_interoperable::value)); - typename CT::Cast cast; - return cast(a)*cast(b); - } - int main(){ - std::cout<< binary_func(double(3), int(5)) << std::endl; - std::cout<< binary_func(int(3), double(5)) << std::endl; - return 0; - } - EOS - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lCGAL", - "surprise.cpp", "-o", "test" - assert_equal "15\n15", shell_output("./test").chomp - end -end diff --git a/Formula/cgdb.rb b/Formula/cgdb.rb deleted file mode 100644 index 0757da9886209..0000000000000 --- a/Formula/cgdb.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Cgdb < Formula - desc "Curses-based interface to the GNU Debugger" - homepage "https://cgdb.github.io/" - url "https://cgdb.me/files/cgdb-0.7.0.tar.gz" - sha256 "bf7a9264668db3f9342591b08b2cc3bbb08e235ba2372877b4650b70c6fb5423" - - bottle do - sha256 "c2da299ad0559c7c6cd8a4782bef9856ad84d09c2333d9e7c0f7342aab2ccb35" => :mojave - sha256 "03ab0851b336b8f22b310f13774bd4737af6576f6732d116e4b8c7d1cf15ed0f" => :high_sierra - sha256 "a81736f1e3b84ef7de58710b815bc90d845e4b5a0330146aca1fea31a75be81f" => :sierra - sha256 "b2b8787372078b3d6568b232497a18da791c3197708f6814a69ced881d5c9055" => :el_capitan - sha256 "4957746e9d5b84d9a39b07031ae1249d244bca262caf4ce84d744ddef8956c95" => :yosemite - end - - head do - url "https://github.com/cgdb/cgdb.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "help2man" => :build - depends_on "readline" - - def install - system "sh", "autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-readline=#{Formula["readline"].opt_prefix}" - system "make", "install" - end - - test do - system "#{bin}/cgdb", "--version" - end -end diff --git a/Formula/cgit.rb b/Formula/cgit.rb deleted file mode 100644 index 822c3d976b054..0000000000000 --- a/Formula/cgit.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Cgit < Formula - desc "Hyperfast web frontend for Git repositories written in C" - homepage "https://git.zx2c4.com/cgit/" - url "https://git.zx2c4.com/cgit/snapshot/cgit-1.2.1.tar.xz" - sha256 "3c547c146340fb16d4134326e7524bfb28ffa681284f1e3914bde1c27a9182bf" - - bottle do - sha256 "fd47d6d609f90119f930c5b63efcba5c47efc6be390459576751d558f82f3d32" => :mojave - sha256 "99191e176752e4f4d2069ed941c0efdd0927463b011ebc1c6f0cd9d6cac26331" => :high_sierra - sha256 "f60bf2a6028c022202ae9df8053a89e67be606a07a7ce630b89dbeddb2c6022d" => :sierra - end - - depends_on "gettext" - depends_on "openssl" - - # git version is mandated by cgit: see GIT_VER variable in Makefile - # https://git.zx2c4.com/cgit/tree/Makefile?h=v1.2#n17 - resource "git" do - url "https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz" - sha256 "94faf2c0b02a7920b0b46f4961d8e9cad08e81418614102898a55f980fa3e7e4" - end - - def install - resource("git").stage(buildpath/"git") - system "make", "prefix=#{prefix}", - "CGIT_SCRIPT_PATH=#{pkgshare}", - "CGIT_DATA_PATH=#{var}/www/htdocs/cgit", - "CGIT_CONFIG=#{etc}/cgitrc", - "CACHE_ROOT=#{var}/cache/cgit", - "install" - end - - test do - (testpath/"cgitrc").write <<~EOS - repo.url=test - repo.path=#{testpath} - repo.desc=the master foo repository - repo.owner=fooman@example.com - EOS - - ENV["CGIT_CONFIG"] = testpath/"cgitrc" - # no "Status" line means 200 - assert_no_match /Status: .+/, shell_output("#{pkgshare}/cgit.cgi") - end -end diff --git a/Formula/cglm.rb b/Formula/cglm.rb deleted file mode 100644 index 245cbec1a5945..0000000000000 --- a/Formula/cglm.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Cglm < Formula - desc "Optimized OpenGL/Graphics Math (glm) for C" - homepage "https://github.com/recp/cglm" - url "https://github.com/recp/cglm/archive/v0.5.1.tar.gz" - sha256 "1a8f8a3a2e20cd9a8b31c248b515b4875124aa4c0cbac73e2878fa9229314106" - - bottle do - cellar :any - sha256 "91086beaccfc748dac69196aef01e950cafc625e78d495928e27aec5da7b96ed" => :mojave - sha256 "184d8201e30f3971d67182022c49ca29d60b9135dba6efb25dbc168b9a2d4b2a" => :high_sierra - sha256 "15e03edbf21b61bf283c74cb5ed81bb0778c56288e422eb128077ac6ffb17717" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() { - vec3 x = {1.0f, 0.0f, 0.0f}, - y = {0.0f, 1.0f, 0.0f}, - z = {0.0f, 0.0f, 1.0f}; - vec3 r; - - glm_cross(x, y, r); - assert(glm_vec3_eqv_eps(r, z)); - return 0; - } - EOS - system ENV.cc, "-I#{include}", testpath/"test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/cgoban.rb b/Formula/cgoban.rb deleted file mode 100644 index 8359237a44a9c..0000000000000 --- a/Formula/cgoban.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Cgoban < Formula - desc "Go-related services" - homepage "http://www.igoweb.org/~wms/comp/cgoban/index.html" - url "http://www.igoweb.org/~wms/comp/cgoban/cgoban-1.9.12.tar.gz" - sha256 "b9e8b0d2f793fecbc26803d673de11d8cdc88af9d286a6d49b7523f8b4fa20e1" - - bottle do - cellar :any_skip_relocation - sha256 "9784461d9756059fa03d3239c3497ee3087fcaa67bcf235bdec2bab543560fae" => :mojave - sha256 "14efcd85d7d9f5a15fe0693eb8ebd4b1ee8b49fb7604681be91c14964af0cee3" => :high_sierra - sha256 "4f88f760ce464806c607e9a29da5f701cc6d395f27110cd866579fdf8737931a" => :sierra - sha256 "f6f9b32dddefb3474dca91d55c0aecdacec7e3b7ccbb2cb8c9b151b41e16f4d0" => :el_capitan - sha256 "65b5a814e1b4e3c115c1fb873d8a740ee4c0b39eff33331336d9bfac073e1a27" => :yosemite - end - - depends_on :x11 - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules" - - bin.mkpath - man6.mkpath - - system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man}" - end - - test do - system "#{bin}/cgoban", "--version" - end -end diff --git a/Formula/cgrep.rb b/Formula/cgrep.rb deleted file mode 100644 index 57e0271e55bab..0000000000000 --- a/Formula/cgrep.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "language/haskell" - -class Cgrep < Formula - include Language::Haskell::Cabal - - desc "Context-aware grep for source code" - homepage "https://github.com/awgn/cgrep" - url "https://github.com/awgn/cgrep/archive/v6.6.27.tar.gz" - sha256 "1c623478e1b93a43eb1f151d20fa1096439a84b6ce7024bb9856f10c6ffeca59" - head "https://github.com/awgn/cgrep.git" - - bottle do - cellar :any - sha256 "a5a9e0f032374564c3c4636c2aef31dc41c5a0b441a69356bfdc4db27d30e934" => :mojave - sha256 "d5c98ba9f21a7946ca53394fc66f7145593a8d33427e4d0867b73f2342dbe5af" => :high_sierra - sha256 "8fc2929f882103c18dae410dcf66f667d4c32dae6dd13a9c7b0ae0c87c980ef9" => :sierra - sha256 "a3570fdcf951b804efe6994162af327c2984650e3d1fe4a1a54e3a473af8630a" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "pcre" - - def install - install_cabal_package - end - - test do - (testpath/"t.rb").write <<~EOS - # puts test comment. - puts "test literal." - EOS - - assert_match ":1", shell_output("#{bin}/cgrep --count --comment test t.rb") - assert_match ":1", shell_output("#{bin}/cgrep --count --literal test t.rb") - assert_match ":1", shell_output("#{bin}/cgrep --count --code puts t.rb") - assert_match ":2", shell_output("#{bin}/cgrep --count puts t.rb") - end -end diff --git a/Formula/cgvg.rb b/Formula/cgvg.rb deleted file mode 100644 index 6f69257e6fa00..0000000000000 --- a/Formula/cgvg.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Cgvg < Formula - desc "Command-line source browsing tool" - homepage "http://www.uzix.org/cgvg.html" - url "http://www.uzix.org/cgvg/cgvg-1.6.3.tar.gz" - sha256 "d879f541abcc988841a8d86f0c0781ded6e70498a63c9befdd52baf4649a12f3" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9f1f8ad71fda5ecf4341a28420e5c1629a4b5285edb5d40fbe13ace1965ea239" => :mojave - sha256 "05dcddf73d630ab2f67e00ea63af02f6b29b503c2e938829daa67d7f619fb556" => :high_sierra - sha256 "12b8a6abb31e2e8d7ba044663b33990884ec24d1b0c0776901480cbecd47113f" => :sierra - sha256 "a8232322755cb4c369193dca37fecb968ff689c6463611680e12f216f46507c4" => :el_capitan - sha256 "de0c8b890aa68670097790093fdceccfe1d69598c18ea5385069efc2f73a3c5d" => :yosemite - sha256 "d05cafffec1008fff858f9c0210d37d4d081aa34d8a490b968a8b824866a69be" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test").write "Homebrew" - assert_match /1 Homebrew/, shell_output("#{bin}/cg Homebrew '#{testpath}/test'") - end -end diff --git a/Formula/chaiscript.rb b/Formula/chaiscript.rb deleted file mode 100644 index 884f07abf4a7a..0000000000000 --- a/Formula/chaiscript.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Chaiscript < Formula - desc "Easy to use embedded scripting language for C++" - homepage "https://chaiscript.com/" - url "https://github.com/ChaiScript/ChaiScript/archive/v6.1.0.tar.gz" - sha256 "3ca9ba6434b4f0123b5ab56433e3383b01244d9666c85c06cc116d7c41e8f92a" - head "https://github.com/ChaiScript/ChaiScript.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "37f73c985ecbb3d1050f73c5020080fd6b8632780b3cacdc635c6198d9afd7d8" => :mojave - sha256 "905850906c705182fe0c3011314d52b852585121f91c91a03ad20cc1b4a1a830" => :high_sierra - sha256 "ce45ec71bbf6917d01c5d3ac872b31637189b90216848166ec91df5c65a82d07" => :sierra - sha256 "18a4b79b3b413b01d2801e0a49b054137c3307bc0fc930353b63e0746e43c16d" => :el_capitan - end - - depends_on "cmake" => :build - depends_on :macos => :el_capitan # needs thread-local storage - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main() { - chaiscript::ChaiScript chai; - assert(chai.eval("123") == 123); - } - EOS - - system ENV.cxx, "test.cpp", "-L#{lib}", "-std=c++14", "-o", "test" - system "./test" - end -end diff --git a/Formula/chakra.rb b/Formula/chakra.rb deleted file mode 100644 index cf47c5f898925..0000000000000 --- a/Formula/chakra.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Chakra < Formula - desc "The core part of the JavaScript engine that powers Microsoft Edge" - homepage "https://github.com/Microsoft/ChakraCore" - url "https://github.com/Microsoft/ChakraCore/archive/v1.11.4.tar.gz" - sha256 "3b5163d9baa1c85ad6ae296b9e9522ff7dfcb9d3f8660059b919f1f387e15b98" - - bottle do - cellar :any - sha256 "e57aee095dedacc5e6bac0c9143f909b532ffa07fb09dbf17bbbaf0fdf8f3b2f" => :mojave - sha256 "b88565f0bf70b963483e0b55da228e8a08e0b4614e43de525f5f05c4144c9344" => :high_sierra - sha256 "6c786bab34409473d2cc118ffc249963f8b95ef1b413f3f9ca477b9bcfdd888d" => :sierra - end - - depends_on "cmake" => :build - depends_on "icu4c" - - def install - args = [ - "--lto-thin", - "--icu=#{Formula["icu4c"].opt_include}", - "--extra-defines=U_USING_ICU_NAMESPACE=1", # icu4c 61.1 compatability - "-j=#{ENV.make_jobs}", - "-y", - ] - - # Build dynamically for the shared library - system "./build.sh", *args - # Then statically to get a usable binary - system "./build.sh", "--static", *args - - bin.install "out/Release/ch" => "chakra" - include.install Dir["out/Release/include/*"] - lib.install "out/Release/libChakraCore.dylib" - end - - test do - (testpath/"test.js").write("print('Hello world!');\n") - assert_equal "Hello world!", shell_output("#{bin}/chakra test.js").chomp - end -end diff --git a/Formula/chamber.rb b/Formula/chamber.rb deleted file mode 100644 index 038db3fbe26b7..0000000000000 --- a/Formula/chamber.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Chamber < Formula - desc "CLI for managing secrets through AWS SSM Parameter Store" - homepage "https://github.com/segmentio/chamber" - url "https://github.com/segmentio/chamber/archive/v2.3.2.tar.gz" - sha256 "760557880353beca3cc9aef3183507ff31696ad65d4b3341eaa52c30393146ab" - head "https://github.com/segmentio/chamber.git" - - bottle do - cellar :any_skip_relocation - sha256 "1f0d20b4517f5f288e6dd5bd712dbaa8627cadf5e3f192c2c4e82532fb2f0683" => :mojave - sha256 "cdbe6be1a7f516cff12be94469e3007bba0f709fc8a28621a8406b32327e9a34" => :high_sierra - sha256 "8f40df94bce52835b9e7b65a59de8417125793b632b440bfb645dbe189e1483c" => :sierra - end - - depends_on "go" => :build - depends_on "govendor" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - ENV["CGO_ENABLED"] = "0" - - path = buildpath/"src/github.com/segmentio/chamber" - path.install Dir["{*,.git}"] - - cd "src/github.com/segmentio/chamber" do - system "govendor", "sync" - system "go", "build", "-o", bin/"chamber", - "-ldflags", "-X main.Version=#{version}" - prefix.install_metafiles - end - end - - test do - ENV.delete "AWS_REGION" - output = shell_output("#{bin}/chamber list service 2>&1", 1) - assert_match "MissingRegion", output - - ENV["AWS_REGION"] = "us-west-2" - output = shell_output("#{bin}/chamber list service 2>&1", 1) - assert_match "NoCredentialProviders", output - end -end diff --git a/Formula/chapel.rb b/Formula/chapel.rb deleted file mode 100644 index 38f16ee507534..0000000000000 --- a/Formula/chapel.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Chapel < Formula - desc "Emerging programming language designed for parallel computing" - homepage "https://chapel-lang.org/" - url "https://github.com/chapel-lang/chapel/releases/download/1.18.0/chapel-1.18.0.tar.gz" - sha256 "68471e1f398b074edcc28cae0be26a481078adc3edea4df663f01c6bd3b6ae0d" - - bottle do - sha256 "ec5a061a5bbb87ab2ae8914575754c21ff517438c87f34246f5407b03c05277b" => :mojave - sha256 "a661717fffa4d53c89956e241fd830956a0b34c9ad6869a9fc0698918d0c1718" => :high_sierra - sha256 "b884c781ec6b7feef055421be8518e43ce917cb0aada966a2a6e993df4eec162" => :sierra - sha256 "703fd9c9a452a7d71bfe71d2c3ce5978ff1a95260e412857172ffbd91e5d829e" => :el_capitan - end - - def install - libexec.install Dir["*"] - # Chapel uses this ENV to work out where to install. - ENV["CHPL_HOME"] = libexec - # This is for mason - ENV["CHPL_REGEXP"] = "re2" - - # Must be built from within CHPL_HOME to prevent build bugs. - # https://github.com/Homebrew/legacy-homebrew/pull/35166 - cd libexec do - system "make" - system "make", "chpldoc" - system "make", "test-venv" - system "make", "mason" - system "make", "cleanall" - end - - prefix.install_metafiles - - # Install chpl and other binaries (e.g. chpldoc) into bin/ as exec scripts. - bin.install Dir[libexec/"bin/darwin/*"] - bin.env_script_all_files libexec/"bin/darwin/", :CHPL_HOME => libexec - man1.install_symlink Dir["#{libexec}/man/man1/*.1"] - end - - test do - ENV["CHPL_HOME"] = libexec - cd libexec do - system "make", "check" - end - end -end diff --git a/Formula/charm-tools.rb b/Formula/charm-tools.rb deleted file mode 100644 index 032f094e44a09..0000000000000 --- a/Formula/charm-tools.rb +++ /dev/null @@ -1,260 +0,0 @@ -class CharmTools < Formula - include Language::Python::Virtualenv - - desc "Tools for authoring and maintaining juju charms" - homepage "https://github.com/juju/charm-tools" - url "https://files.pythonhosted.org/packages/99/4d/16d7398fe5eefc602a8870fb3e93597aabe681b0f1497749148695cba4a1/charm-tools-2.2.3.tar.gz" - sha256 "ea659f59041cb3dff0be862d657830591e656a9a259931064edab7477875245b" - revision 3 - - bottle do - cellar :any - sha256 "276a8198e27a384e9d45392f485f184170cc324586740e046c6b55a44539a559" => :mojave - sha256 "68365eeb6730d2d7645a791c7d60206d733f19d56c16deb31e5b42cc0378bc28" => :high_sierra - sha256 "4dc6ab436414c0ffd0c07601bec4240b2907c090b7a7a300c5ec6bc49e960a01" => :sierra - sha256 "11a6747479a401661fcd32e6233e581ec0f065a0fc737ee3da163c23d73bb00d" => :el_capitan - end - - depends_on "charm" - depends_on "libyaml" - depends_on "mercurial" - depends_on "openssl" - depends_on "python@2" - - # Additionally include ndg-httpsclient for requests[security] - resource "Cheetah" do - url "https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz" - sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550" - end - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/29/82/dfe242bcfd9eec0e7bf93a80a8f8d8515a95b980c44f5c0b45606397a423/Markdown-2.6.9.tar.gz" - sha256 "73af797238b95768b3a9b6fe6270e250e5c09d988b8e5b223fd5efa4e06faf81" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/75/5e/b84feba55e20f8da46ead76f14a3943c8cb722d40360702b2365b91dec00/PyYAML-3.11.tar.gz" - sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8" - end - - resource "SecretStorage" do - url "https://files.pythonhosted.org/packages/a5/a5/0830cfe34a4cfd0d1c3c8b614ede1edb2aaf999091ac8548dd19cb352e79/SecretStorage-2.3.1.tar.gz" - sha256 "3af65c87765323e6f64c83575b05393f9e003431959c9395d1791d51497f29b6" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/31/53/8bca924b30cb79d6d70dbab6a99e8731d1e4dd3b090b7f3d8412a8d8ffbc/asn1crypto-0.23.0.tar.gz" - sha256 "0874981329cfebb366d6584c3d16e913f2a0eb026c9463efcc4aaf42a9d94d70" - end - - resource "blessings" do - url "https://files.pythonhosted.org/packages/af/4a/61acd1c6c29662d3fcbcaee5ba95c20b1d315c5a33534732b6d81e0dc8e8/blessings-1.6.tar.gz" - sha256 "edc5713061f10966048bf6b40d9a514b381e0ba849c64e034c4ef6c1847d3007" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz" - sha256 "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6" - end - - resource "colander" do - url "https://files.pythonhosted.org/packages/4d/bc/48b9751b5c532ec74e78f3a8c09d26994f8e748e4895bbc5d2f6c8c5734b/colander-1.0b1.tar.gz" - sha256 "8a342bf278227be6ac96e90befa949c235e667254db17e773e79d834459be971" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/f3/7c/ec4f94489719803cb14d35e9625d1f5a613b9c4b8d01ee52a4c77485e681/cryptography-2.1.3.tar.gz" - sha256 "68a26c353627163d74ee769d4749f2ee243866e9dac43c93bb33ebd8fbed1199" - end - - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/f9/e5/99ebb176e47f150ac115ffeda5fedb6a3dbb3c00c74a59fd84ddf12f5857/ecdsa-0.13.tar.gz" - sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "functools32" do - url "https://files.pythonhosted.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz" - sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d" - end - - resource "httplib2" do - url "https://files.pythonhosted.org/packages/e4/2e/a7e27d2c36076efeb8c0e519758968b20389adf57a9ce3af139891af2696/httplib2-0.10.3.tar.gz" - sha256 "e404d3b7bd86c1bc931906098e7c1305d6a3a6dcef141b8bb1059903abb3ceeb" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/4e/13/774faf38b445d0b3a844b65747175b2e0500164b7c28d78e34987a5bfe06/ipaddress-1.0.18.tar.gz" - sha256 "5d8534c8e185f2d8a1fda1ef73f2c8f4b23264e8e30063feeb9511d492a413e1" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/58/0d/c816f5ea5adaf1293a1d81d32e4cdfdaf8496973aa5049786d7fdb14e7e7/jsonschema-2.5.1.tar.gz" - sha256 "36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41" - end - - resource "jujubundlelib" do - url "https://files.pythonhosted.org/packages/f5/79/862a0f62f725ed537e298e04942742a6c0110d2da4404040d77ca3e0d8d5/jujubundlelib-0.5.5.tar.gz" - sha256 "125383aee2f60af66bb909682aa0757d8e0be083e3f8125473e18a9f3f2d4f3d" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/37/0c/034139cd798dac3ceb4fcb4ed85e20c27f3e579c25cdaf066aad1552da3d/keyring-10.4.0.tar.gz" - sha256 "901a3f4ed0dfba473060281b58fd3b649ce70f59cb34a9cf6cb5551218283b26" - end - - resource "launchpadlib" do - url "https://files.pythonhosted.org/packages/e6/2b/721606eba8d52e66c6aa436d05ef4b8def963e3d6cbfbb61a05b3891bda3/launchpadlib-1.10.5.tar.gz" - sha256 "b9c32cf960de042ba73e77ac4d4d0f694135713715f0afa1ca2630ffb03ba2a7" - end - - resource "lazr.restfulclient" do - url "https://files.pythonhosted.org/packages/aa/3e/87b8658c0e4fe272c4da0c4f9d0e219c42ee7ddb149a063b8c3a95f265af/lazr.restfulclient-0.13.5.tar.gz" - sha256 "722f27a8baefa83c347fe3a6330de5fe381d8473d3bb7c5726762cabf9556800" - end - - resource "lazr.uri" do - url "https://files.pythonhosted.org/packages/ea/bf/71ad2f5eaf7885d36e3cbd0a87cf3812ad043cf99c9fa6cc6ab4c94ee862/lazr.uri-1.0.3.tar.gz" - sha256 "5c620b5993c8c6a73084176bfc51de64972b8373620476ed841931a49752dc8b" - end - - resource "libcharmstore" do - url "https://files.pythonhosted.org/packages/06/57/710e53ba029bbcdd86da4b9be293105ef4eb14178e283cf57188e89ba55c/libcharmstore-0.0.7.tar.gz" - sha256 "19a6c83d565a0b91726f4289b664a68bbc766f8c80cc6d9f8230b030706cf990" - end - - resource "ndg-httpsclient" do - url "https://files.pythonhosted.org/packages/25/4c/28c412126f0394dbb3d8005465357581f087fc7ec100b0e83838a90009b7/ndg_httpsclient-0.4.3.tar.gz" - sha256 "7bfd8c5cfcbc241a93ca6a4e45f952650f5c7ecf7c49b1dbcf5f4d390240be0b" - end - - resource "oauth" do - url "https://files.pythonhosted.org/packages/e2/10/d7d6ae26ef7686109a10b3e88d345c4ec6686d07850f4ef7baefb7eb61e1/oauth-1.0.1.tar.gz" - sha256 "e769819ff0b0c043d020246ce1defcaadd65b9c21d244468a45a7f06cb88af5d" - end - - resource "otherstuf" do - url "https://files.pythonhosted.org/packages/4f/b5/fe92e1d92610449f001e04dd9bf7dc13b8e99e5ef8859d2da61a99fc8445/otherstuf-1.1.0.tar.gz" - sha256 "7722980c3b58845645da2acc838f49a1998c8a6bdbdbb1ba30bcde0b085c4f4c" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/23/1d/1d0254566e13a86e61931f24d2cf72cc32d1286636b581ac2999a2ec1787/paramiko-1.18.4.tar.gz" - sha256 "c5f9e14d44bd4940244a7dccde6019d97472122f07585e1081fc4c7327ea2765" - end - - resource "parse" do - url "https://files.pythonhosted.org/packages/13/71/e0b5c968c552f75a938db18e88a4e64d97dc212907b4aca0ff71293b4c80/parse-1.8.2.tar.gz" - sha256 "8048dde3f5ca07ad7ac7350460952d83b63eaacecdac1b37f45fd74870d849d2" - end - - resource "path.py" do - url "https://files.pythonhosted.org/packages/90/bb/3440e0734cb2dcfbf3644546dad7dfc08b197d5dd52877de95f95fd459b2/path.py-8.1.2.tar.gz" - sha256 "ada95d117c4559abe64080961daf5badda68561afdd34c278f8ca20f2fa466d2" - end - - resource "pathspec" do - url "https://files.pythonhosted.org/packages/14/9d/c9d790d373d6f6938d793e9c549b87ad8670b6fa7fc6176485e6ef11c1a4/pathspec-0.3.4.tar.gz" - sha256 "7605ca5c26f554766afe1d177164a2275a85bb803b76eba3428f422972f66728" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/d5/d6/f2bf137d71e4f213b575faa9eb426a8775732432edb67588a8ee836ecb80/pbr-3.1.1.tar.gz" - sha256 "05f61c71aaefc02d8e37c0a3eeb9815ff526ea28b3b76324769e6158d7f95be1" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/ee/6a/cd78737dd990297205943cc4dcad3d3c502807fd2c5b18c5f33dc90ca214/pyOpenSSL-17.3.0.tar.gz" - sha256 "29630b9064a82e04d8242ea01d7c93d70ec320f5e3ed48e95fcabc6b1d0f6c76" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/3c/a6/4d6c88aa1694a06f6671362cb3d0350f0d856edea4685c300785200d1cd9/pyasn1-0.3.7.tar.gz" - sha256 "187f2a66d617683f8e82d5c00033b7c8a0287e1da88a9d577aebec321cad4965" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f9/6d/07c44fb1ebe04d069459a189e7dab9e4abfe9432adcd4477367c25332748/requests-2.9.1.tar.gz" - sha256 "c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f" - end - - resource "ruamel.base" do - url "https://files.pythonhosted.org/packages/ea/77/60a0945f4b4eac4b6bd74d1b8e103ae58d0f07b934f962bb4c49e6ec205e/ruamel.base-1.0.0.tar.gz" - sha256 "c041333a0f0f00cd6593eb36aa83abb1a9e7544e83ba7a42aa7ac7476cee5cf3" - end - - resource "ruamel.ordereddict" do - url "https://files.pythonhosted.org/packages/b1/8f/3b1b407ff387e006a4a33e62182b212077bed41676451d60327955a50c3c/ruamel.ordereddict-0.4.13.tar.gz" - sha256 "bf0a198c8ce5d973c24e5dba12d3abc254996788ca6ad8448eabc6aa710db149" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/e1/fe/0021f94b54f7aa5a730b765f5a4eead9675be98c7f46c206c240fb9ef819/ruamel.yaml-0.10.23.tar.gz" - sha256 "895347f81297f5542e1071092c6760ed13d86547764ebbaedbc2972eb8385dd8" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "stuf" do - url "https://files.pythonhosted.org/packages/76/62/171e06b6d2d3072ea333de19632c61a44f83199e20cbf4924d12827cf66a/stuf-0.9.16.tar.bz2" - sha256 "e61d64a2180c19111e129d36bfae66a0cb9392e1045827d6495db4ac9cb549b0" - end - - resource "testresources" do - url "https://files.pythonhosted.org/packages/9d/57/8e3986cd95a80dd23195f599befa023eb85d031d2d870c47124fa5ccbf06/testresources-2.0.1.tar.gz" - sha256 "ee9d1982154a1e212d4e4bac6b610800bfb558e4fb853572a827bc14a96e4417" - end - - resource "theblues" do - url "https://files.pythonhosted.org/packages/ab/09/21a4718cb6f06573153de35af742e4c251ca9b628c9001d06f6ed4b2cae5/theblues-0.3.8.tar.gz" - sha256 "649f4013d3b9024f7990a7e0b42aed2196daea64a7c8501dde4f1f57ab8aa031" - end - - resource "translationstring" do - url "https://files.pythonhosted.org/packages/5e/eb/bee578cc150b44c653b63f5ebe258b5d0d812ddac12497e5f80fcad5d0b4/translationstring-1.3.tar.gz" - sha256 "4ee44cfa58c52ade8910ea0ebc3d2d84bdcad9fa0422405b1801ec9b9a65b72d" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz" - sha256 "02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a" - end - - resource "wadllib" do - url "https://files.pythonhosted.org/packages/7e/94/9e5f9ad89001215f67619adc2ed3ac771dbbdb23bc7d91bf0bce4aff7bd6/wadllib-1.3.2.tar.gz" - sha256 "140e43fc16d4352a98a90a450c6326bee5e6de73ae373a569947f3b505405034" - end - - def install - ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin" - ENV.prepend "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/ffi" - - virtualenv_install_with_resources - end - - test do - system "#{bin}/charm-version" - end -end diff --git a/Formula/charm.rb b/Formula/charm.rb deleted file mode 100644 index 780db3c5f714c..0000000000000 --- a/Formula/charm.rb +++ /dev/null @@ -1,59 +0,0 @@ -require "language/go" - -class Charm < Formula - desc "Tool for managing Juju Charms" - homepage "https://github.com/juju/charmstore-client" - url "https://github.com/juju/charmstore-client/archive/v2.3.0.tar.gz" - sha256 "778d20848939a8162fa19acb5284b3c761047c3fa5ab49b36a83464eb4904261" - - bottle do - cellar :any_skip_relocation - sha256 "836809b833edd8b3b19717aaaf2569120365afbafa28ed7f7ba7e56524f85ee6" => :mojave - sha256 "96340b518ffcf81070c7a2fdc67b4e461b99fe97ed08214da4e05e426fdb6909" => :high_sierra - sha256 "e420ff6fb6d45f0041a8e3a75b75b97e9a5ea1a2e5a519940d024a04cb3a121c" => :sierra - sha256 "a75b8dcc4d0bd766e18a55dae39e786dae8186310eece4d88e0541e6e76aeb13" => :el_capitan - end - - depends_on "bazaar" => :build - depends_on "go" => :build - - go_resource "github.com/kisielk/gotool" do - url "https://github.com/kisielk/gotool.git", - :revision => "80517062f582ea3340cd4baf70e86d539ae7d84d" - end - - go_resource "github.com/pelletier/go-toml" do - url "https://github.com/pelletier/go-toml.git", - :revision => "603baefff989777996bf283da430d693e78eba3a" - end - - go_resource "golang.org/x/tools" do - url "https://go.googlesource.com/tools.git", - :revision => "fd2d2c45eb2dff7b87eab4303a1016b4dbf95e81" - end - - go_resource "github.com/rogpeppe/godeps" do - url "https://github.com/rogpeppe/godeps.git", - :revision => "404a7e748cd352bb0d7449dedc645546eebbfc6e" - end - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/juju/charmstore-client" - dir.install buildpath.children - [buildpath/".brew_home"] - ENV.prepend_create_path "PATH", buildpath/"bin" - Language::Go.stage_deps resources, buildpath/"src" - cd("src/github.com/rogpeppe/godeps") { system "go", "install" } - - cd dir do - system "godeps", "-x", "-u", "dependencies.tsv" - system "go", "build", "github.com/juju/charmstore-client/cmd/charm" - bin.install "charm" - prefix.install_metafiles - end - end - - test do - system "#{bin}/charm" - end -end diff --git a/Formula/chcase.rb b/Formula/chcase.rb deleted file mode 100644 index cd3b0bb844b28..0000000000000 --- a/Formula/chcase.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Chcase < Formula - desc "Perl file-renaming script" - homepage "http://www.primaledge.ca/chcase.html" - url "http://www.primaledge.ca/chcase" - version "2.0" - sha256 "386e6f294157957adbd433a10591d9d78cd54d13e1347fb15a19e70f03319ed3" - - bottle :unneeded - - # add a shebang so that brew properly sets it executable - patch :DATA - - def install - bin.install "chcase" - end - - test do - system bin/"chcase", "-e" - end -end - -__END__ -diff --git a/chcase b/chcase -index 689fc79..93efae8 ---- a/chcase -+++ b/chcase -@@ -1,3 +1,4 @@ -+#!/bin/sh -- # -*- perl -*- - eval 'exec perl $0 ${1+"$@"}' - if 0; - # don't modify below here diff --git a/Formula/cheapglk.rb b/Formula/cheapglk.rb deleted file mode 100644 index 52b51c8cd0c62..0000000000000 --- a/Formula/cheapglk.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Cheapglk < Formula - desc "Extremely minimal Glk library" - homepage "https://www.eblong.com/zarf/glk/" - url "https://www.eblong.com/zarf/glk/cheapglk-106.tar.gz" - version "1.0.6" - sha256 "2753562a173b4d03ae2671df2d3c32ab7682efd08b876e7e7624ebdc8bf1510b" - - bottle do - cellar :any_skip_relocation - sha256 "d57b00a86e3d1c76f43d8f034c1dfe77d23da3d34637449040fdedd21f6a4a63" => :mojave - sha256 "47c6f59d902a306b30c6255f65fd7626e32d5c39800fd80daeada852e95994f2" => :high_sierra - sha256 "d76d29db8ea0201fcef949e02cbddb1c06311dece796a263192ffef487a3aa2c" => :sierra - sha256 "497a5399738c026d318d3213b764f20fb80ccea94181919fad2e80eb75086055" => :el_capitan - sha256 "8351c9dec39fd8e860e50a8e693e1c648def81c3ddcbdd3a856f656d585b0082" => :yosemite - end - - keg_only "it conflicts with other Glk libraries" - - def install - system "make" - - lib.install "libcheapglk.a" - include.install "glk.h", "glkstart.h", "gi_blorb.h", "gi_dispa.h", "Make.cheapglk" - end - - test do - (testpath/"test.c").write <<~EOS - #include "glk.h" - #include "glkstart.h" - - glkunix_argumentlist_t glkunix_arguments[] = { - { NULL, glkunix_arg_End, NULL } - }; - - int glkunix_startup_code(glkunix_startup_t *data) - { - return TRUE; - } - - void glk_main() - { - glk_exit(); - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcheapglk", "-o", "test" - assert_match version.to_s, pipe_output("./test", "echo test", 0) - end -end diff --git a/Formula/cheat.rb b/Formula/cheat.rb deleted file mode 100644 index 95dd787308abc..0000000000000 --- a/Formula/cheat.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Cheat < Formula - include Language::Python::Virtualenv - - desc "Create and view interactive cheat sheets for *nix commands" - homepage "https://github.com/chrisallenlane/cheat" - url "https://github.com/chrisallenlane/cheat/archive/2.3.1.tar.gz" - sha256 "f944612b1d1b97dbe87c6cc3c68932df983482f53a09b0446c318ee7399c865c" - head "https://github.com/chrisallenlane/cheat.git" - - bottle do - cellar :any_skip_relocation - sha256 "edc4911e3dc71c8307700c08aa1bd737146fc076842c250ad8d26de77c46d6dd" => :mojave - sha256 "8fc5907164a0a1b4de27f7433e2908047dd743e8a34b9674f649e10db892c17c" => :high_sierra - sha256 "1d585e8e457dec3245644177ce4b8716df1edca9a39fe958ebbb96be8917175b" => :sierra - end - - depends_on "python" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - def install - virtualenv_install_with_resources - - bash_completion.install "cheat/autocompletion/cheat.bash" - zsh_completion.install "cheat/autocompletion/cheat.zsh" => "_cheat" - end - - test do - system bin/"cheat", "tar" - end -end diff --git a/Formula/check.rb b/Formula/check.rb deleted file mode 100644 index 11aee9fc4ae8d..0000000000000 --- a/Formula/check.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Check < Formula - desc "C unit testing framework" - homepage "https://libcheck.github.io/check/" - url "https://github.com/libcheck/check/releases/download/0.12.0/check-0.12.0.tar.gz" - sha256 "464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234" - - bottle do - cellar :any - sha256 "57498a48acaa07afcea73fc831986e4dbd8dd8742d35a600e6bbe3f328c32f08" => :mojave - sha256 "fd175fded31ecc36ad06beeb18e05fd4d5f5bc538e1a445e86b703bf34373fd8" => :high_sierra - sha256 "6ad1ff9e52d767968efb2b73b563b171561421818a86185c03639f65f0a22ab3" => :sierra - sha256 "5de09e615daf7e12f1b10485b7bc8cb5382e04f856dc516056bae0a30b5f6b49" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.tc").write <<~EOS - #test test1 - ck_assert_msg(1, "This should always pass"); - EOS - - system "#{bin/"checkmk"} test.tc > test.c" - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcheck", "-o", "test" - system "./test" - end -end diff --git a/Formula/check_postgres.rb b/Formula/check_postgres.rb deleted file mode 100644 index e6b9fa1b6c7ce..0000000000000 --- a/Formula/check_postgres.rb +++ /dev/null @@ -1,33 +0,0 @@ -class CheckPostgres < Formula - desc "Monitor Postgres databases" - homepage "https://bucardo.org/wiki/Check_postgres" - url "https://bucardo.org/downloads/check_postgres-2.23.0.tar.gz" - sha256 "93cdbe92bb451525219b131a6810d9da0525000f6795160f70751b105c858615" - head "https://github.com/bucardo/check_postgres.git" - - bottle do - cellar :any_skip_relocation - sha256 "7bb41d490549f9dd7f98dfbbd9da8d0faf59770eae547cd4b891473dfc20feaa" => :mojave - sha256 "6d722bc7277678495996ecaecf62f5b61ea5de5f225286cab5ad36be3d467a9a" => :high_sierra - sha256 "6d722bc7277678495996ecaecf62f5b61ea5de5f225286cab5ad36be3d467a9a" => :sierra - sha256 "6d722bc7277678495996ecaecf62f5b61ea5de5f225286cab5ad36be3d467a9a" => :el_capitan - end - - depends_on "postgresql" - - def install - system "perl", "Makefile.PL", "PREFIX=#{prefix}" - system "make", "install" - mv bin/"check_postgres.pl", bin/"check_postgres" - inreplace [bin/"check_postgres", man1/"check_postgres.1p"], "check_postgres.pl", "check_postgres" - rm_rf prefix/"Library" - rm_rf prefix/"lib" - end - - test do - # This test verifies that check_postgres fails correctly, assuming - # that no server is running at that port. - output = shell_output("#{bin}/check_postgres --action=connection --port=65432", 2) - assert_match /POSTGRES_CONNECTION CRITICAL/, output - end -end diff --git a/Formula/checkbashisms.rb b/Formula/checkbashisms.rb deleted file mode 100644 index 28929366cd616..0000000000000 --- a/Formula/checkbashisms.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Checkbashisms < Formula - desc "Checks for bashisms in shell scripts" - homepage "https://launchpad.net/ubuntu/+source/devscripts/" - url "https://deb.debian.org/debian/pool/main/d/devscripts/devscripts_2.18.11.tar.xz" - sha256 "d5738c616914f5b78ff57a142b4055c560c71910eed23f2fc8ef93386ac6ad7d" - - bottle :unneeded - - def install - inreplace "scripts/checkbashisms.pl" do |s| - s.gsub! "###VERSION###", version - s.gsub! "#!/usr/bin/perl", "#!/usr/bin/perl -T" - end - - bin.install "scripts/checkbashisms.pl" => "checkbashisms" - man1.install "scripts/checkbashisms.1" - end - - test do - (testpath/"test.sh").write <<~EOS - #!/bin/sh - - if [[ "home == brew" ]]; then - echo "dog" - fi - EOS - expected = <<~EOS - (alternative test command ([[ foo ]] should be [ foo ])): - EOS - assert_match expected, shell_output("#{bin}/checkbashisms #{testpath}/test.sh 2>&1", 1) - end -end diff --git a/Formula/checkstyle.rb b/Formula/checkstyle.rb deleted file mode 100644 index 9247b06084415..0000000000000 --- a/Formula/checkstyle.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Checkstyle < Formula - desc "Check Java source against a coding standard" - homepage "https://checkstyle.sourceforge.io/" - url "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.16/checkstyle-8.16-all.jar" - sha256 "7116dfaa3f962efb33b58b1e7a9cd79cc350312193bcbfc072c4d61b6a8d8480" - - bottle :unneeded - - def install - libexec.install "checkstyle-#{version}-all.jar" - bin.write_jar_script libexec/"checkstyle-#{version}-all.jar", "checkstyle" - end - - test do - path = testpath/"foo.java" - path.write "public class Foo{ }\n" - - output = Utils.popen_read("#{bin}/checkstyle -c /sun_checks.xml #{path}") - errors = output.lines.select { |line| line.start_with?("[ERROR] #{path}") } - assert_match "#{path}:1:17: '{' is not preceded with whitespace.", errors.join(" ") - assert_equal errors.size, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/cheops.rb b/Formula/cheops.rb deleted file mode 100644 index 48e1e1d262d46..0000000000000 --- a/Formula/cheops.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Cheops < Formula - desc "CHEss OPponent Simulator" - homepage "https://logological.org/cheops" - url "https://files.nothingisreal.com/software/cheops/cheops-1.3.tar.bz2" - mirror "https://github.com/logological/cheops/releases/download/1.3/cheops-1.3.tar.bz2" - sha256 "a3ce2e94f73068159827a1ec93703b5075c7edfdf5b0c1aba4d71b3e43fe984e" - - bottle do - cellar :any_skip_relocation - sha256 "27251202d9707a3b1687094971a644aa5d34c163bb62bea0eec85373b58922c0" => :mojave - sha256 "a7028a380957e407304abae6f3f8d056c6363681e91792e19bbf1cde19aa44cf" => :high_sierra - sha256 "f6087558b906474548d121bf3e745a7291dbc307d0c9ef16b3b6edd92d9dc830" => :sierra - sha256 "3ed8f3d4920c6c44b4d25f16402564db5639acb1e3f104329f244cd52051a9f6" => :el_capitan - sha256 "de719231c43b1494c0a77fe0ef97868399bd67e3c3386fecfd6564f26f4acbdf" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/cheops", "--version" - end -end diff --git a/Formula/cherokee.rb b/Formula/cherokee.rb deleted file mode 100644 index 9be11b6ce10e8..0000000000000 --- a/Formula/cherokee.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Cherokee < Formula - desc "Modern, user friendly web server" - homepage "http://cherokee-project.com/" - url "https://src.fedoraproject.org/repo/pkgs/cherokee/cherokee-1.2.103.tar.gz/527b3de97ef9727bfd5f6832043cf916/cherokee-1.2.103.tar.gz" - sha256 "790777e7b4355b60698443161e45b5a20a9d0ab8c4c47924e00d19da8b74dfcd" - - bottle do - sha256 "f582bd9e3157068f8d8c996cffa803a256ec70e356473b96ba8856b3f20f9ccd" => :mojave - sha256 "e149e2a50f0954be520def65943abf020f44460ceeb41d428627c5d65be2d177" => :high_sierra - sha256 "db0adb2f4e099777e5309d1b2ca2102c8ae576eb45a51c827f0e2fb7866b66ed" => :sierra - sha256 "f6944776619d9338169b1676cc10d9960c27cb7a88b1189a4e02e1f577d4e2d6" => :el_capitan - sha256 "af00f0cc177c2c16063aa3abe8dfe025568874db126edfacce4a33c8a3fbd5cb" => :yosemite - sha256 "ef4d94b51cc425dd704d0007cf9980024035406cb00345158fd84b1901c04437" => :mavericks - end - - depends_on "gettext" - depends_on "openssl" - - # OS X 10.9 patch - patch do - url "https://github.com/cherokee/webserver/commit/d0213768fdc6cf3aee61fe0be398d7825c01198f.diff?full_index=1" - sha256 "dc4c678e55b906a5a1437f93789232a6eb016e80214e92b0032f50c68ae2997b" - end - - def install - if build.head? - ENV["LIBTOOL"] = "glibtool" - ENV["LIBTOOLIZE"] = "glibtoolize" - cmd = "./autogen.sh" - else - cmd = "./configure" - end - - system cmd, "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}/cherokee", - "--with-wwwuser=#{ENV["USER"]}", - "--with-wwwgroup=www", - "--enable-internal-pcre", - # Don't install to /Library - "--with-wwwroot=#{etc}/cherokee/htdocs", - "--with-cgiroot=#{etc}/cherokee/cgi-bin" - system "make", "install" - - prefix.install "org.cherokee.webserver.plist" - (prefix+"org.cherokee.webserver.plist").chmod 0644 - (pkgshare/"admin/server.py").chmod 0755 - end - - def caveats - <<~EOS - Cherokee is setup to run with your user permissions as part of the - www group on port 80. This can be changed in the cherokee-admin - but be aware the new user will need permissions to write to: - #{var}/cherokee - for logging and runtime files. - - By default, documents will be served out of: - #{etc}/cherokee/htdocs - - And CGI scripts from: - #{etc}/cherokee/cgi-bin - - If this is your first install, automatically load on startup with: - sudo cp #{prefix}/org.cherokee.webserver.plist /Library/LaunchDaemons - sudo launchctl load -w /Library/LaunchDaemons/org.cherokee.webserver.plist - - If this is an upgrade and you already have the plist loaded: - sudo launchctl unload -w /Library/LaunchDaemons/org.cherokee.webserver.plist - sudo cp #{prefix}/org.cherokee.webserver.plist /Library/LaunchDaemons - sudo launchctl load -w /Library/LaunchDaemons/org.cherokee.webserver.plist - EOS - end - - test do - assert_match "Version: #{version}", shell_output("#{sbin}/cherokee -i") - end -end diff --git a/Formula/chezscheme.rb b/Formula/chezscheme.rb deleted file mode 100644 index a4b07f7c9468b..0000000000000 --- a/Formula/chezscheme.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Chezscheme < Formula - desc "Chez Scheme" - homepage "https://cisco.github.io/ChezScheme/" - url "https://github.com/cisco/ChezScheme/archive/v9.5.tar.gz" - sha256 "a1d9f93bd8a683ea3d8f2f1b4880f85ea40bf9a482ee6b84cb0fe0ab6148a98c" - - bottle do - sha256 "7599610cda8eeda8b10921d4e8092f939b02fa32810201fea5df0bcb7b0623d4" => :mojave - sha256 "6d2cbd144310fa2c0fcd8aed0e673ed5b301bea98351122b98aad497ca474db1" => :high_sierra - sha256 "e3a63252006520a340f1a208506cca2c4210e08865b322bfd9be7cf83babbeaf" => :sierra - sha256 "684d39c61e2d1279106dba378d1d1d9de0b1a10a7668a73d9c59f44e6a450f1c" => :el_capitan - end - - depends_on :x11 => :build - - def install - # dyld: lazy symbol binding failed: Symbol not found: _clock_gettime - # Reported 20 Feb 2017 https://github.com/cisco/ChezScheme/issues/146 - if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "c/stats.c" do |s| - s.gsub! "CLOCK_MONOTONIC", "UNDEFINED_GIBBERISH" - s.gsub! "CLOCK_PROCESS_CPUTIME_ID", "UNDEFINED_GIBBERISH" - s.gsub! "CLOCK_REALTIME", "UNDEFINED_GIBBERISH" - s.gsub! "CLOCK_THREAD_CPUTIME_ID", "UNDEFINED_GIBBERISH" - end - end - - system "./configure", - "--installprefix=#{prefix}", - "--threads", - "--installschemename=chez" - system "make", "install" - end - - test do - (testpath/"hello.ss").write <<~EOS - (display "Hello, World!") (newline) - EOS - - expected = <<~EOS - Hello, World! - EOS - - assert_equal expected, shell_output("#{bin}/chez --script hello.ss") - end -end diff --git a/Formula/chgems.rb b/Formula/chgems.rb deleted file mode 100644 index 72123a9eb01e6..0000000000000 --- a/Formula/chgems.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Chgems < Formula - desc "Chroot for Ruby gems" - homepage "https://github.com/postmodern/chgems#readme" - url "https://github.com/postmodern/chgems/archive/v0.3.2.tar.gz" - sha256 "515d1bfebb5d5183a41a502884e329fd4c8ddccb14ba8a6548a1f8912013f3dd" - head "https://github.com/postmodern/chgems.git" - - bottle do - cellar :any_skip_relocation - sha256 "9b24233632189a803f6e65fcd408bf8220b25ad225fda970a141eb0f7bad4d8c" => :mojave - sha256 "a9913aa39c5901bc434ce9774d5ccf3e618fa20784a709f7185bc3e26430b367" => :high_sierra - sha256 "01e2e0335391df51b5fb2003e79d4994a48b4515077904b4e924062a0bf79b3c" => :sierra - sha256 "395b45c3493721bccfc7fdefa2d81ec61b7f07f8cfd799eac5f1e96011a618f3" => :el_capitan - sha256 "aac706b654c0e5a617bfa9dab9310334d874d561f2eca10a16778a3b49804545" => :yosemite - sha256 "d3e7aba5d1fb3da9f66a1e5fd3149c6eec3afb37286ade3e40f235bdbafc8d78" => :mavericks - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = shell_output("#{bin}/chgems . gem env") - assert_match "rubygems.org", output - end -end diff --git a/Formula/chibi-scheme.rb b/Formula/chibi-scheme.rb deleted file mode 100644 index e382632caa833..0000000000000 --- a/Formula/chibi-scheme.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ChibiScheme < Formula - desc "Small footprint Scheme for use as a C Extension Language" - homepage "http://synthcode.com/wiki/chibi-scheme" - url "http://synthcode.com/scheme/chibi/chibi-scheme-0.8.0.tgz" - sha256 "c39287628cb7762d6cd51fbdab39e797ef7f7e576a3c7650a8a2a02b4f35749a" - head "https://github.com/ashinn/chibi-scheme.git" - - bottle do - sha256 "a26682417fc6eeef25d87b9ad844fa4b3a1ec9a607b5d80da337d44f4766363a" => :mojave - sha256 "532cd642ab70f1e37ed670206fab9828f0a0b3e93dc20fadb786305f50e80a19" => :high_sierra - sha256 "c6efeccee97565c675a3f149855dd9550a6f8b7313694b52429e42e4cee9001d" => :sierra - sha256 "283522e8939e5a2b724b476ce3a1830f4bb48e70b778ffef14030498cd877b16" => :el_capitan - end - - def install - ENV.deparallelize - - # "make" and "make install" must be done separately - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = `#{bin}/chibi-scheme -mchibi -e "(for-each write '(0 1 2 3 4 5 6 7 8 9))"` - assert_equal "0123456789", output - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/chicken.rb b/Formula/chicken.rb deleted file mode 100644 index f7701b6d88a05..0000000000000 --- a/Formula/chicken.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Chicken < Formula - desc "Compiler for the Scheme programming language" - homepage "https://www.call-cc.org/" - url "https://code.call-cc.org/releases/5.0.0/chicken-5.0.0.tar.gz" - sha256 "a8b94bb94c5d6a4348cedd75dc334ac80924bcd9a7a7a3d6af5121e57ef66595" - head "https://code.call-cc.org/git/chicken-core.git" - - bottle do - sha256 "eee1a269507e626190797aa7768d581aca9cd83e21313f91ffde0139fd629009" => :mojave - sha256 "aea05c909bd9f831daa2fcdc9c3f04a09aab0bb5634afd8162034504da6a5801" => :high_sierra - sha256 "2083f2b685d91839bee340267d65713b3aa4024fed2b987fc3f51798910aef20" => :sierra - end - - def install - ENV.deparallelize - - args = %W[ - PLATFORM=macosx - PREFIX=#{prefix} - C_COMPILER=#{ENV.cc} - LIBRARIAN=ar - POSTINSTALL_PROGRAM=install_name_tool - ARCH=x86-64 - ] - - system "make", *args - system "make", "install", *args - end - - test do - assert_equal "25", shell_output("#{bin}/csi -e '(print (* 5 5))'").strip - end -end diff --git a/Formula/chinadns-c.rb b/Formula/chinadns-c.rb deleted file mode 100644 index 5e58f96acdfee..0000000000000 --- a/Formula/chinadns-c.rb +++ /dev/null @@ -1,33 +0,0 @@ -class ChinadnsC < Formula - desc "Port of ChinaDNS to C: fix irregularities with DNS in China" - homepage "https://github.com/shadowsocks/ChinaDNS" - url "https://github.com/shadowsocks/ChinaDNS/releases/download/1.3.2/chinadns-1.3.2.tar.gz" - sha256 "abfd433e98ac0f31b8a4bd725d369795181b0b6e8d1b29142f1bb3b73bbc7230" - - bottle do - cellar :any_skip_relocation - sha256 "61ccebe523d9e2417385c911beca6a01ee7d2810f1a665fca9a4f6a0e7b81623" => :mojave - sha256 "5b0b51abe8a40dee4b1296e81da179aff05ba42befc869e06e081d7e6fc4e726" => :high_sierra - sha256 "fa51351f3cdfb63fa672d2011c08ac8a1f9a260bcfaacb13e4657f39e721b96f" => :sierra - sha256 "a620bce8421a9773233c51886c6845995569a1fda80e252efa86f6271c1d274c" => :el_capitan - sha256 "329351a4f82e4f871cbc2b384902b0c84040bd1df222970d67be7513bbead207" => :yosemite - sha256 "4266825a8ecbb6a84d459b41465fe9318a918b171880ac8ddfd8bdf3e37573d1" => :mavericks - sha256 "c994af6ca279fa06b42ca3a851d550a04d279b2337c06fb21e91a0fe42708036" => :mountain_lion - end - - head do - url "https://github.com/shadowsocks/ChinaDNS.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/chinadns", "-h" - end -end diff --git a/Formula/chipmunk.rb b/Formula/chipmunk.rb deleted file mode 100644 index 1663d13dcd598..0000000000000 --- a/Formula/chipmunk.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Chipmunk < Formula - desc "2D rigid body physics library written in C" - homepage "https://chipmunk-physics.net/" - url "https://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.2.tgz" - mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/chipmunk/Chipmunk-7.0.2.tgz" - sha256 "288c8465fcaa671bab890c0b24627816efa10da2c5eabbeb36feb0d6deb1ca5a" - head "https://github.com/slembcke/Chipmunk2D.git" - - bottle do - cellar :any - sha256 "a01faa519baf4dda632dae3a4d00e7e2833298ef03f5ebc3d96b605ebf9f6a53" => :mojave - sha256 "9ea9773afde1b99b00d08aa462562175e0c42c961027d5d2f0e84d51565f6609" => :high_sierra - sha256 "11d92de45ec0fa8a25872f5ac18c92e3d1686c1d515d05d48731d19f5d3c30b3" => :sierra - sha256 "8848acb3fa314fad434f5eb143788831544453598d047342fe20c99045225d26" => :el_capitan - sha256 "58cc2257eb17a9d67fee0c9bb8350f88a3092f149f74deba3aba591c47ae9c00" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DBUILD_DEMOS=OFF", *std_cmake_args - system "make", "install" - - doc.install Dir["doc/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(void){ - cpVect gravity = cpv(0, -100); - cpSpace *space = cpSpaceNew(); - cpSpaceSetGravity(space, gravity); - - cpSpaceFree(space); - return 0; - } - EOS - system ENV.cc, "-I#{include}/chipmunk", "-L#{lib}", "-lchipmunk", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/chisel.rb b/Formula/chisel.rb deleted file mode 100644 index 98b72f14638ce..0000000000000 --- a/Formula/chisel.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Chisel < Formula - desc "Collection of LLDB commands to assist debugging iOS apps" - homepage "https://github.com/facebook/chisel" - url "https://github.com/facebook/chisel/archive/1.8.1.tar.gz" - sha256 "2f803ac99c20d2ae86d4485eb3d1be29010c5e3088ccf0a2b19021657022e3fb" - head "https://github.com/facebook/chisel.git" - - bottle do - cellar :any - sha256 "29c17de80f280349701f53c1103e9654717c6f70d4075ae3da640bec2c04ba74" => :mojave - sha256 "8886d6402a50e4b920f5d55809ec9b51e934b7073f02bdf112ab98fb4466b665" => :high_sierra - sha256 "85d31eb6edf4a19059f7e3c019a07ad2462bb1df42cab53eac24baef3a3c703e" => :sierra - end - - def install - libexec.install Dir["*.py", "commands"] - prefix.install "PATENTS" - - # == LD_DYLIB_INSTALL_NAME Explanation == - # This make invocation calls xcodebuild, which in turn performs ad hoc code - # signing. Note that ad hoc code signing does not need signing identities. - # Brew will update binaries to ensure their internal paths are usable, but - # modifying a code signed binary will invalidate the signature. To prevent - # broken signing, this build specifies the target install name up front, - # in which case brew doesn't perform its modifications. - system "make", "-C", "Chisel", "install", "PREFIX=#{lib}", \ - "LD_DYLIB_INSTALL_NAME=#{opt_prefix}/lib/Chisel.framework/Chisel" - end - - def caveats; <<~EOS - Add the following line to ~/.lldbinit to load chisel when Xcode launches: - command script import #{opt_libexec}/fblldb.py - EOS - end - - test do - xcode_path = `xcode-select --print-path`.strip - lldb_rel_path = "Contents/SharedFrameworks/LLDB.framework/Resources/Python" - ENV["PYTHONPATH"] = "#{xcode_path}/../../#{lldb_rel_path}" - system "python", "#{libexec}/fblldb.py" - end -end diff --git a/Formula/chkrootkit.rb b/Formula/chkrootkit.rb deleted file mode 100644 index bff2837aec68c..0000000000000 --- a/Formula/chkrootkit.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Chkrootkit < Formula - desc "Rootkit detector" - homepage "http://www.chkrootkit.org/" - url "ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit-0.52.tar.gz" - mirror "https://fossies.org/linux/misc/chkrootkit-0.52.tar.gz" - sha256 "c578c0b9c8ae0729c2de7075f896f3d168e768c52e319a7706c9a7e46ff7a211" - - bottle do - cellar :any_skip_relocation - sha256 "2563d001fbe410534061a3d3d0476dea7ecb5da2d54828badaee6e547c680d94" => :mojave - sha256 "97e158e6ce44a0f9a96b7cdaf827446632f1c74a51068417b6588dd80c15116d" => :high_sierra - sha256 "2ddd7a341ced3bdfd2a622e48e19627fccaeaff174c7241c42cc0e3305557a16" => :sierra - sha256 "18d66e7ae08f00fef387e72c8f8f9f74042f32247e52adabf5b838c4ffc83d58" => :el_capitan - sha256 "889be3584a64397ade2ccf4bf373a1e9c85b73880d209f6e10d7e19eecc122e7" => :yosemite - end - - def install - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", - "STATIC=", "sense", "all" - - bin.install Dir[buildpath/"*"].select { |f| File.executable? f } - doc.install %w[README README.chklastlog README.chkwtmp] - end - - test do - assert_equal "chkrootkit version #{version}", - shell_output("#{bin}/chkrootkit -V 2>&1", 1).strip - end -end diff --git a/Formula/chmlib.rb b/Formula/chmlib.rb deleted file mode 100644 index 561de78d3f56d..0000000000000 --- a/Formula/chmlib.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Chmlib < Formula - desc "Library for dealing with Microsoft ITSS/CHM files" - homepage "http://www.jedrea.com/chmlib" - url "http://www.jedrea.com/chmlib/chmlib-0.40.tar.gz" - mirror "https://download.tuxfamily.org/slitaz/sources/packages/c/chmlib-0.40.tar.gz" - sha256 "512148ed1ca86dea051ebcf62e6debbb00edfdd9720cde28f6ed98071d3a9617" - - bottle do - cellar :any - rebuild 2 - sha256 "1718a0a9343788718b4207596ebff457f5214879319292cc1608254374720944" => :mojave - sha256 "426b95744d071ad76399ee240400ab74bcec9057735cbfeb2d433501105060ef" => :high_sierra - sha256 "9781c76f933beca002df542d2db0644e51766568d9399f9e73dc39b9e896f539" => :sierra - sha256 "6b834a6ae6e95f8daaa726fd6ae1a2d3e60335f98862fea9e790c24e5a6411d1" => :el_capitan - sha256 "bdc19058cbf1690e960bd88d06f6c8b2ff47f8b743947eb82c259ba394881a65" => :yosemite - sha256 "366c564a2cd0185d84ff6892f5d773f80ddee50f6db39e763060b3ebb31413b3" => :mavericks - sha256 "a62f8bdc1ffa2dc6084a61c78a1027c2215e0a2986ffeae755701769c667b3a8" => :mountain_lion - end - - def install - system "./configure", "--disable-io64", "--enable-examples", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/chocolate-doom.rb b/Formula/chocolate-doom.rb deleted file mode 100644 index d07b2126518f9..0000000000000 --- a/Formula/chocolate-doom.rb +++ /dev/null @@ -1,53 +0,0 @@ -class ChocolateDoom < Formula - desc "Accurate source port of Doom" - homepage "https://www.chocolate-doom.org/" - url "https://www.chocolate-doom.org/downloads/3.0.0/chocolate-doom-3.0.0.tar.gz" - sha256 "73aea623930c7d18a7a778eea391e1ddfbe90ad1ac40a91b380afca4b0e1dab8" - - bottle do - cellar :any - sha256 "795d7fce11f480361f5112d4fc63c7d091e97071edca114287eb0b06218426a9" => :mojave - sha256 "af7016b2d60ca7dd02d91287994633b2674436587464e824294dc930566ffef1" => :high_sierra - sha256 "837b44e4c36513df3d615d02ce986119049e1188c975343476d84380e43b0a19" => :sierra - sha256 "a853675774b68249fd1aedc56a7c796fbc3177f7b64fbff666d21efd4c711611" => :el_capitan - end - - head do - url "https://github.com/chocolate-doom/chocolate-doom.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "libpng" - depends_on "libsamplerate" - depends_on "sdl2" - depends_on "sdl2_mixer" - depends_on "sdl2_net" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-sdltest" - system "make", "install", "execgamesdir=#{bin}" - (share/"applications").rmtree - (share/"icons").rmtree - end - - def caveats; <<~EOS - Note that this formula only installs a Doom game engine, and no - actual levels. The original Doom levels are still under copyright, - so you can copy them over and play them if you already own them. - Otherwise, there are tons of free levels available online. - Try starting here: - #{homepage} - EOS - end - - test do - assert_match "Chocolate Doom #{version}", shell_output("#{bin}/chocolate-doom -nogui", 255) - end -end diff --git a/Formula/choose-gui.rb b/Formula/choose-gui.rb deleted file mode 100644 index 155b5f9de5478..0000000000000 --- a/Formula/choose-gui.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ChooseGui < Formula - desc "Fuzzy matcher that uses std{in,out} and a native GUI" - homepage "https://github.com/sdegutis/choose" - url "https://github.com/sdegutis/choose/archive/1.0.tar.gz" - sha256 "b1d16c6e143e2a9e9b306cd169ce54535689321d8f016308ff26c82c3d2931bf" - - bottle do - cellar :any_skip_relocation - sha256 "a4c32058d0658cbaa5562974eb2d98149f6adde6b95b91bfb464e8e8e12ff267" => :mojave - sha256 "bcd4c1c75dad408adfa451351a719ad126e2dadb26a49a4316d7d170ed0c6702" => :high_sierra - sha256 "5968418e6ee9717884d32f98e840cf02549165a9efc8f42e32549e3ae800c4cd" => :sierra - sha256 "100c28baee98417c8ce7041956c4a62fe9126b6b36a0f3e186b33500b6b1f2fb" => :el_capitan - sha256 "fd41325edc44dde3a61c52e310b0faa35314ce9c331b04673f55b6ebd5da28ba" => :yosemite - end - - depends_on :xcode => :build - depends_on :macos => :yosemite - - conflicts_with "choose", :because => "both install a `choose` binary" - - def install - xcodebuild "SDKROOT=", "SYMROOT=build" - bin.install "build/Release/choose" - end - - test do - system "#{bin}/choose", "-h" - end -end diff --git a/Formula/choose.rb b/Formula/choose.rb deleted file mode 100644 index dda7086e7512e..0000000000000 --- a/Formula/choose.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Choose < Formula - desc "Make choices on the command-line" - homepage "https://github.com/geier/choose" - url "https://github.com/geier/choose/archive/v0.1.0.tar.gz" - sha256 "d09a679920480e66bff36c76dd4d33e8ad739a53eace505d01051c114a829633" - revision 1 - head "https://github.com/geier/choose.git" - - bottle do - cellar :any_skip_relocation - sha256 "dba7080c2cbfec86cece9b777e0e8bbddc978d9d16869d8c40dedca3db5fa2f7" => :mojave - sha256 "0798c4a91ff53f4ab075f9509c20fa40c809d7d692be156089e934673a6d73f8" => :high_sierra - sha256 "9a91c98c4f1ff7d3a639e324d7926d39b21fca78cb32d2ef153510ac8d2306e1" => :sierra - end - - depends_on "python" - - conflicts_with "choose-gui", :because => "both install a `choose` binary" - - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - resource("urwid").stage do - system "python3", *Language::Python.setup_install_args(libexec) - end - - bin.install "choose" - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - # There isn't really a better test than that the executable exists - # and is executable because you can't run it without producing an - # interactive selection ui. - assert_predicate bin/"choose", :executable? - end -end diff --git a/Formula/chordii.rb b/Formula/chordii.rb deleted file mode 100644 index be7b6c6aaee63..0000000000000 --- a/Formula/chordii.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Chordii < Formula - desc "Text file to music sheet converter" - homepage "https://www.vromans.org/johan/projects/Chordii/" - url "https://downloads.sourceforge.net/project/chordii/chordii/4.5/chordii-4.5.3.tar.gz" - sha256 "140d24a8bc8c298e8db1b9ca04cf02890951aa048a656adb7ee7212c42ce8d06" - - bottle do - cellar :any_skip_relocation - sha256 "d43e4f2dacabc0c4caeeaeff753d68616a4e5113def336afc9a4d599f3a9f87f" => :mojave - sha256 "92b70657704a64aa528b4d0171f2e67e57046969b61aeee6c70b174e6d7cc89b" => :high_sierra - sha256 "5eed38c2781095a1ea852e8407d791ee09c87f06e8d596e49e3abb685f8234ad" => :sierra - sha256 "99c022cf0741bca48fd78d1bc5b5f0488e720321133a1357412d2342527a1dd8" => :el_capitan - sha256 "02cca7ec07939f7b29f1f2c844d250caaa9b7ba7d19e51f9e3eeb636d51b72d4" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"homebrew.cho").write <<~EOS - {title:Homebrew} - {subtitle:I can't write lyrics. Send help} - - [C]Thank [G]You [F]Everyone, - [C]We couldn't maintain [F]Homebrew without you, - [G]Here's an appreciative song from us to [C]you. - EOS - - system bin/"chordii", "--output=#{testpath}/homebrew.ps", "homebrew.cho" - assert_predicate testpath/"homebrew.ps", :exist? - end -end diff --git a/Formula/chromaprint.rb b/Formula/chromaprint.rb deleted file mode 100644 index 75474bfc9deab..0000000000000 --- a/Formula/chromaprint.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Chromaprint < Formula - desc "Core component of the AcoustID project (Audio fingerprinting)" - homepage "https://acoustid.org/chromaprint" - url "https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-1.4.3.tar.gz" - sha256 "ea18608b76fb88e0203b7d3e1833fb125ce9bb61efe22c6e169a50c52c457f82" - - bottle do - cellar :any - sha256 "88b395f32a669162b2d270c9f38711fe884aabacc7c7ce9062dbf420d5445a21" => :mojave - sha256 "3d0ae4279d4d3fa0fad24c434e82032384256ed1613e89e7b601e1f02ceaa596" => :high_sierra - sha256 "fc91e7116562484496de75f3e3e0a7a61771b9826b6f3a4497af411df2683290" => :sierra - sha256 "799c9c907b020aed48763162b996a672d42b3b8dde5a53381e28818ccd0981dc" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end -end diff --git a/Formula/chrome-cli.rb b/Formula/chrome-cli.rb deleted file mode 100644 index 738f77e28275b..0000000000000 --- a/Formula/chrome-cli.rb +++ /dev/null @@ -1,42 +0,0 @@ -class ChromeCli < Formula - desc "Control Google Chrome from the command-line" - homepage "https://github.com/prasmussen/chrome-cli" - url "https://github.com/prasmussen/chrome-cli/archive/1.6.0.tar.gz" - sha256 "ff1fba560743cba7b661e8daef52d4494acc084da4a21c3fad211f7cdf5e971f" - head "https://github.com/prasmussen/chrome-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "45226a0320842d8e3d717ffdf6e8828b9d1b5f52609757670f4d542fd722ee68" => :mojave - sha256 "b34f789eefdbb6312b05e4e55a71e9deaf889fe740e2d976cdf4279a0d74dd36" => :high_sierra - sha256 "31abf08f56dc906ec882cb4d7dc167424177c8849b8de8ecb71098afb249fc84" => :sierra - sha256 "e1d04616371d4c7147f884886d2e61df3bdea48c388dc50a684434f89b417792" => :el_capitan - end - - depends_on :xcode => :build - depends_on :macos => :mountain_lion - - def install - # Release builds - xcodebuild "SDKROOT=", "SYMROOT=build" - bin.install "build/Release/chrome-cli" - - # Canary builds; see: - # https://github.com/prasmussen/chrome-cli/issues/15 - rm_rf "build" - inreplace "chrome-cli/App.m", "com.google.Chrome", "com.google.Chrome.canary" - xcodebuild "SDKROOT=", "SYMROOT=build" - bin.install "build/Release/chrome-cli" => "chrome-canary-cli" - - # Chromium builds; see: - # https://github.com/prasmussen/chrome-cli/issues/31 - rm_rf "build" - inreplace "chrome-cli/App.m", "com.google.Chrome.canary", "org.Chromium.chromium" - xcodebuild "SDKROOT=", "SYMROOT=build" - bin.install "build/Release/chrome-cli" => "chromium-cli" - end - - test do - system "#{bin}/chrome-cli", "version" - end -end diff --git a/Formula/chrome-export.rb b/Formula/chrome-export.rb deleted file mode 100644 index f0cd7436c1005..0000000000000 --- a/Formula/chrome-export.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ChromeExport < Formula - desc "Convert Chrome’s bookmarks and history to HTML bookmarks files" - homepage "https://github.com/bdesham/chrome-export" - url "https://github.com/bdesham/chrome-export/archive/v2.0.1.tar.gz" - sha256 "9ba4b5b5c4881785bb6840a434cd3f1ce553c6e37fad0c5be1ac3533ef94f269" - revision 1 - - bottle :unneeded - - def install - bin.install "export-chrome-bookmarks" - bin.install "export-chrome-history" - pkgshare.install "test" - end - - test do - cp_r (pkgshare/"test").children, testpath - system bin/"export-chrome-bookmarks", "Bookmarks", - "bookmarks_actual_output.html" - assert_predicate testpath/"bookmarks_actual_output.html", :exist? - assert_equal (testpath/"bookmarks_expected_output.html").read, - (testpath/"bookmarks_actual_output.html").read - system bin/"export-chrome-history", "History", "history_actual_output.html" - assert_predicate testpath/"history_actual_output.html", :exist? - assert_equal (testpath/"history_expected_output.html").read, - (testpath/"history_actual_output.html").read - end -end diff --git a/Formula/chronograf.rb b/Formula/chronograf.rb deleted file mode 100644 index 6e63556c4c6f9..0000000000000 --- a/Formula/chronograf.rb +++ /dev/null @@ -1,87 +0,0 @@ -require "language/node" - -class Chronograf < Formula - desc "Open source monitoring and visualization UI for the TICK stack" - homepage "https://docs.influxdata.com/chronograf/latest/" - url "https://github.com/influxdata/chronograf/archive/1.7.5.tar.gz" - sha256 "53c458b91982b679bcfee400155c9978c64a6c620846e366326dfc65885fbf11" - head "https://github.com/influxdata/chronograf.git" - - bottle do - cellar :any_skip_relocation - sha256 "a99a6c673c4d14d9800b90697a4df81d4ea8171c4f633a5960d0bc2cd8d53ae6" => :mojave - sha256 "be2b0f7d3c94ac052e1afd571a9857cd6dd7805d13a09849206e60b4d2c79253" => :high_sierra - sha256 "6ad031bd62b46af55cf9f8661815c3b7c29704664be12e1119bb012343ec64cb" => :sierra - end - - depends_on "go" => :build - depends_on "node" => :build - depends_on "yarn" => :build - depends_on "influxdb" - depends_on "kapacitor" - - def install - ENV["GOPATH"] = buildpath - ENV.prepend_create_path "PATH", buildpath/"bin" - Language::Node.setup_npm_environment - chronograf_path = buildpath/"src/github.com/influxdata/chronograf" - chronograf_path.install buildpath.children - - # fixes yarn + upath@1.0.4 incompatibility, remove once upath is upgraded to 1.0.5+ - Pathname.new("#{ENV["HOME"]}/.yarnrc").write("ignore-engines true\n") - - cd chronograf_path do - system "make", "dep" - system "make", ".jssrc" - system "make", "chronograf" - bin.install "chronograf" - prefix.install_metafiles - end - end - - plist_options :manual => "chronograf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/chronograf - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/chronograf.log - StandardOutPath - #{var}/log/chronograf.log - - - EOS - end - - test do - begin - pid = fork do - exec "#{bin}/chronograf" - end - sleep 1 - output = shell_output("curl -s 0.0.0.0:8888/chronograf/v1/") - sleep 1 - assert_match %r{/chronograf/v1/layouts}, output - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/chruby-fish.rb b/Formula/chruby-fish.rb deleted file mode 100644 index 7bbd6563e61b8..0000000000000 --- a/Formula/chruby-fish.rb +++ /dev/null @@ -1,25 +0,0 @@ -class ChrubyFish < Formula - desc "Thin wrapper around chruby to make it work with the Fish shell" - homepage "https://github.com/JeanMertz/chruby-fish#readme" - url "https://github.com/JeanMertz/chruby-fish/archive/v0.8.2.tar.gz" - sha256 "e3726d39da219f5339f86302f7b5d7b62ca96570ddfcc3976595f1d62e3b34e1" - head "https://github.com/JeanMertz/chruby-fish.git" - - bottle do - cellar :any_skip_relocation - sha256 "ba0ca145d65c92efa34f257219a96d94c4a82800ac5e37b71e3208ed61a82293" => :mojave - sha256 "1ebd01df8a1edd51c2b73568c1db57b38a672b530fd0a55d063595370d0c301d" => :high_sierra - sha256 "1ebd01df8a1edd51c2b73568c1db57b38a672b530fd0a55d063595370d0c301d" => :sierra - end - - depends_on "chruby" - depends_on "fish" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_match /chruby-fish/, shell_output("fish -c '. #{share}/chruby/chruby.fish; chruby --version'") - end -end diff --git a/Formula/chruby.rb b/Formula/chruby.rb deleted file mode 100644 index 2fff840797fb1..0000000000000 --- a/Formula/chruby.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Chruby < Formula - desc "Ruby environment tool" - homepage "https://github.com/postmodern/chruby#readme" - url "https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz" - sha256 "7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd" - head "https://github.com/postmodern/chruby.git" - - bottle do - cellar :any_skip_relocation - sha256 "4b3e7d6e76cd5d914b0bb4871a0a0f33c9b997a9c579ca4450191c87c3dc4f53" => :mojave - sha256 "d59074fe39429eb9979acd0e81e6b9a142aa73595971cee42ab91bbe850c6105" => :high_sierra - sha256 "17dc507695fed71749b5a58152d652bb7b92a4574f200b631a39f5f004e86cca" => :sierra - sha256 "ff70dff83817f093d39384a40d3dfb2aaccc1cbe475d58383d4ef157085f2c64" => :el_capitan - sha256 "eb14810c552b693c5ae82a577be81398e7dfeadc5489666bb0ff89581f09bfe4" => :yosemite - sha256 "c7ede5a22e512d3c22406f222b539fe05b78dfb9721cfff8ce94ed0357883ba5" => :mavericks - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - def caveats; <<~EOS - Add the following to the ~/.bash_profile or ~/.zshrc file: - source #{opt_pkgshare}/chruby.sh - - To enable auto-switching of Rubies specified by .ruby-version files, - add the following to ~/.bash_profile or ~/.zshrc: - source #{opt_pkgshare}/auto.sh - EOS - end - - test do - assert_equal "chruby version #{version}", shell_output("#{bin}/chruby-exec --version").strip - end -end diff --git a/Formula/chuck.rb b/Formula/chuck.rb deleted file mode 100644 index b8c165d68b031..0000000000000 --- a/Formula/chuck.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Chuck < Formula - desc "Concurrent, on-the-fly audio programming language" - homepage "http://chuck.cs.princeton.edu/" - url "http://chuck.cs.princeton.edu/release/files/chuck-1.4.0.0.tgz" - sha256 "2caee332b8d48e2fddad0f8a0a1811b6cf4c5afab73ae8a17b85ec759cce27ac" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "3dea1fba4982d2770ccfb10c90363a1a1342281900814dc9d617a41b758bc479" => :mojave - sha256 "8b3feed2d5a3773ee2479a05af8628e83a5fb8e355f3e269202c72fa7ff80258" => :high_sierra - sha256 "17e8770cd31f86a3cb890bca8c648a2e7321511130016b47b67b08eaceeab2b9" => :sierra - end - - depends_on :xcode => :build - - def install - # Support for newer macOS versions - inreplace "src/core/makefile.x/makefile.osx", - "10\\.(6|7|8|9|10|11|12|13)", - "10\\.(6|7|8|9|10|11|12|1[0-9])" - - system "make", "-C", "src", "osx" - bin.install "src/chuck" - pkgshare.install "examples" - end - - test do - assert_match "device", shell_output("#{bin}/chuck --probe 2>&1") - end -end diff --git a/Formula/cidrmerge.rb b/Formula/cidrmerge.rb deleted file mode 100644 index 3d71a9a5f4bf5..0000000000000 --- a/Formula/cidrmerge.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Cidrmerge < Formula - desc "CIDR merging with white listing (network exclusion)" - homepage "https://cidrmerge.sourceforge.io" - url "https://downloads.sourceforge.net/project/cidrmerge/cidrmerge/cidrmerge-1.5.3/cidrmerge-1.5.3.tar.gz" - sha256 "21b36fc8004d4fc4edae71dfaf1209d3b7c8f8f282d1a582771c43522d84f088" - - bottle do - cellar :any_skip_relocation - sha256 "aa994dfc09a72377c001b0f94a0d8674034fe626e2d1a8bba0d6d514e849564b" => :mojave - sha256 "61d2b647e77f706f53ef22dcb1ad362d39bed01f2bed08270bc6110824233146" => :high_sierra - sha256 "8f2cf233141b0ea465c05d3487718176bb40023a05ecf7c275fdae9c36a5eef1" => :sierra - sha256 "7e607252679cd1648e6c9f48ebbeaa2379ce089ad87815bd6636e65dcedebc7b" => :el_capitan - sha256 "20c6f57fc6081c8d27d2e68b81e3d4c5cd68e7c799dc30e076f45ee71b42e69d" => :yosemite - sha256 "89b2d5b31bd190e0aa8837b84f3a684cf01b4501321e898507e5d8dd809f09d7" => :mavericks - sha256 "c4d8b6b3a17f6117b9df0c9159cc55b11d060b3abf475cbd1962b35d0ef3292a" => :mountain_lion - end - - def install - system "make" - bin.install "cidrmerge" - end - - test do - input = <<~EOS - 10.1.1.0/24 - 10.1.1.1/32 - 192.1.4.5/32 - 192.1.4.4/32 - EOS - assert_equal "10.1.1.0/24\n192.1.4.4/31\n", pipe_output("#{bin}/cidrmerge", input) - end -end diff --git a/Formula/cifer.rb b/Formula/cifer.rb deleted file mode 100644 index 04e1d54793354..0000000000000 --- a/Formula/cifer.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cifer < Formula - desc "Work on automating classical cipher cracking in C" - homepage "https://code.google.com/p/cifer/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cifer/cifer-1.2.0.tar.gz" - sha256 "436816c1f9112b8b80cf974596095648d60ffd47eca8eb91fdeb19d3538ea793" - - bottle do - cellar :any_skip_relocation - sha256 "ed647fac83a0f0605c4fbf0492be1568199a60473e20ac455feb4ff1abea1946" => :mojave - sha256 "04d95a6448d38450079196139c6e6d5b5811265444c9abf8fe93b7424181a222" => :high_sierra - sha256 "875e676d7866fd3ba2c8b70806838068775ffbc1102c56ca52d041155b2ade43" => :sierra - sha256 "86cbc00f11a5818f48ee67bdc0fa5f2692cc7f37ae6c2c5eb237338c7dc6919b" => :el_capitan - sha256 "bde7d97d9ef2a07c481ff8c5ec717fb2ec455fdef864db2a1a7b3056aa1934d2" => :yosemite - sha256 "f4e2f4024a8daf1e2a1fc071113947561c803503fa242b7df7970e8979cf10be" => :mavericks - sha256 "8e7b415f5012c001c47484a29e55c608b51e82f5fc5be41787b061765e405d64" => :mountain_lion - end - - def install - system "make", "prefix=#{prefix}", - "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}", - "install" - end - - test do - assert_match version.to_s, pipe_output("#{bin}/cifer") - end -end diff --git a/Formula/cig.rb b/Formula/cig.rb deleted file mode 100644 index a1146cde0f026..0000000000000 --- a/Formula/cig.rb +++ /dev/null @@ -1,52 +0,0 @@ -require "language/go" - -class Cig < Formula - desc "CLI app for checking the state of your git repositories" - homepage "https://github.com/stevenjack/cig" - url "https://github.com/stevenjack/cig/archive/v0.1.5.tar.gz" - sha256 "545a4a8894e73c4152e0dcf5515239709537e0192629dc56257fe7cfc995da24" - head "https://github.com/stevenjack/cig.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a7298ca161ad636a1efb286bf336975d3d17c90625d40433c1207983562c5e3e" => :mojave - sha256 "a48e341826857fe9753dc444fa86d5ce121f4acc28a67e79c4955156c9707ccd" => :high_sierra - sha256 "8d6219bd7d8f795608a58bf95fed5489cf8aa8266b3d06e6ff506037fa449ead" => :sierra - sha256 "c64c5aaab66ee0853e0b3437c002dcf233fd543a019e4b411f9cf3f9555de702" => :el_capitan - sha256 "d349ccf020a30a7db72333a4aa1a8f73bcb2b3c6f0984c7a0e88de38bc07ed4c" => :yosemite - sha256 "b61176af3e53d2505f36ee3deafbb92a5f02f6c0841fefdcdfdd084821a95837" => :mavericks - end - - depends_on "go" => :build - depends_on "godep" => :build - - go_resource "github.com/kr/fs" do - url "https://github.com/kr/fs.git", - :revision => "2788f0dbd16903de03cb8186e5c7d97b69ad387b" - end - - go_resource "golang.org/x/tools" do - url "https://github.com/golang/tools.git", - :revision => "473fd854f8276c0b22f17fb458aa8f1a0e2cf5f5" - end - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/stevenjack/" - ln_sf buildpath, buildpath/"src/github.com/stevenjack/cig" - Language::Go.stage_deps resources, buildpath/"src" - - system "godep", "go", "build", "-o", "cig", "." - bin.install "cig" - end - - test do - repo_path = "#{testpath}/test" - system "git", "init", "--bare", repo_path - (testpath/".cig.yaml").write <<~EOS - test_project: #{repo_path} - EOS - system "#{bin}/cig", "--cp=#{testpath}" - end -end diff --git a/Formula/cimg.rb b/Formula/cimg.rb deleted file mode 100644 index 6db54b67a6e55..0000000000000 --- a/Formula/cimg.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Cimg < Formula - desc "C++ toolkit for image processing" - homepage "http://cimg.eu/" - url "http://cimg.eu/files/CImg_2.3.6.zip" - sha256 "8d7e1a07ae8d2500d1512a214c529c8860f41e371c83931698b30f057f94e146" - - bottle :unneeded - - def install - include.install "CImg.h" - prefix.install "Licence_CeCILL-C_V1-en.txt", "Licence_CeCILL_V2-en.txt" - pkgshare.install "examples", "plugins" - end - - test do - cp_r pkgshare/"examples", testpath - cp_r pkgshare/"plugins", testpath - cp include/"CImg.h", testpath - system "make", "-C", "examples", "mmacosx" - system "examples/image2ascii" - end -end diff --git a/Formula/circleci.rb b/Formula/circleci.rb deleted file mode 100644 index 8c1a0de16a737..0000000000000 --- a/Formula/circleci.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Circleci < Formula - desc "Enables you to reproduce the CircleCI environment locally" - homepage "https://circleci.com/docs/2.0/local-cli/" - # Updates should be pushed no more frequently than once per week. - url "https://github.com/CircleCI-Public/circleci-cli.git", - :tag => "v0.1.4786", - :revision => "bad101fb126ffbb15669b67f441d9848a6798b4f" - - bottle do - cellar :any_skip_relocation - sha256 "4bc9fabd3450a06f1b8579374819b963d8628eab639782f2e2d0280e9ab3268d" => :mojave - sha256 "e7fc632bc38193b425ed8ae5b44ed64eac6bb1444dedd33399ab162bca16598a" => :high_sierra - sha256 "0aa8a7ae8a436796a3006804c764deb705aa85e6c9f577614599804e23101ffa" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GO111MODULE"] = "on" - - dir = buildpath/"src/github.com/CircleCI-Public/circleci-cli" - dir.install buildpath.children - - cd dir do - commit = Utils.popen_read("git rev-parse --short HEAD").chomp - ldflags = %W[ - -s -w - -X github.com/CircleCI-Public/circleci-cli/cmd.PackageManager=homebrew - -X github.com/CircleCI-Public/circleci-cli/version.Version=#{version} - -X github.com/CircleCI-Public/circleci-cli/version.Commit=#{commit} - ] - system "go", "build", "-ldflags", ldflags.join(" "), - "-o", bin/"circleci" - prefix.install_metafiles - end - end - - test do - # assert basic script execution - assert_match /#{version}\+.{7}/, shell_output("#{bin}/circleci version").strip - # assert script fails because 2.1 config is not supported for local builds - (testpath/".circleci.yml").write("{version: 2.1}") - output = shell_output("#{bin}/circleci build -c #{testpath}/.circleci.yml 2>&1", 255) - assert_match "Local builds do not support that version at this time", output - # assert update is not included in output of help meaning it was not included in the build - assert_match "update This command is unavailable on your platform", shell_output("#{bin}/circleci help") - assert_match "`update` is not available because this tool was installed using `homebrew`.", shell_output("#{bin}/circleci update") - end -end diff --git a/Formula/citus.rb b/Formula/citus.rb deleted file mode 100644 index 66bd9abddd191..0000000000000 --- a/Formula/citus.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Citus < Formula - desc "PostgreSQL-based distributed RDBMS" - homepage "https://www.citusdata.com" - url "https://github.com/citusdata/citus/archive/v8.1.1.tar.gz" - sha256 "859de72a95acff17d86d5a6e910126543798bff6cdd8f5f134268c03eabeaab3" - head "https://github.com/citusdata/citus.git" - - bottle do - cellar :any - sha256 "d86ee02356f6b9b8880e2091bb1ed17749b6b3152532a83ceda3e4804a01bf6c" => :mojave - sha256 "b598fc9bea152e053f46a207dd30e8def999564a39263eb074c43ca943014ed5" => :high_sierra - sha256 "586f98a4655030fa9f2158433f86ea6e4c3e5670ffd61cc2c3f7f50f28aabc76" => :sierra - end - - depends_on "postgresql" - depends_on "readline" - - def install - ENV["PG_CONFIG"] = Formula["postgresql"].opt_bin/"pg_config" - - system "./configure" - - # workaround for https://github.com/Homebrew/homebrew/issues/49948 - system "make", "libpq=-L#{Formula["postgresql"].opt_lib} -lpq" - - # Use stage directory to prevent installing to pg_config-defined dirs, - # which would not be within this package's Cellar. - mkdir "stage" - system "make", "install", "DESTDIR=#{buildpath}/stage" - - bin.install Dir["stage/**/bin/*"] - lib.install Dir["stage/**/lib/*"] - include.install Dir["stage/**/include/*"] - (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] - end - - test do - pg_bin = Formula["postgresql"].opt_bin - pg_port = "55561" - system "#{pg_bin}/initdb", testpath/"test" - pid = fork do - exec("#{pg_bin}/postgres", - "-D", testpath/"test", - "-c", "shared_preload_libraries=citus", - "-p", pg_port) - end - - begin - sleep 2 - - count_workers_query = "SELECT COUNT(*) FROM master_get_active_worker_nodes();" - - system "#{pg_bin}/createdb", "-p", pg_port, "test" - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION citus;" - - assert_equal "0", shell_output("#{pg_bin}/psql -p #{pg_port} -d test -Atc" \ - "'#{count_workers_query}'").strip - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/cityhash.rb b/Formula/cityhash.rb deleted file mode 100644 index aaec0e0b0ca08..0000000000000 --- a/Formula/cityhash.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Cityhash < Formula - desc "Hash functions for strings" - homepage "https://github.com/google/cityhash" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cityhash/cityhash-1.1.1.tar.gz" - sha256 "76a41e149f6de87156b9a9790c595ef7ad081c321f60780886b520aecb7e3db4" - - bottle do - cellar :any - sha256 "4d7f25360b715d36177c70f06f7c21f39d38b6b8aa9f8a5befe80818baa3545f" => :mojave - sha256 "37e8244399c42c6f3bdb2fad91562607e96bc3380378d318ceecbc16ec8d52be" => :high_sierra - sha256 "62d8d1409dfe744d4de7a1727824b06c5a80b248433c2d8bd8a4efcd444346cb" => :sierra - sha256 "b09962ca43b3bb3321e1e57bf74a0936142ec5c94e198113ac3aa14e669e4d28" => :el_capitan - sha256 "2b155183e2422811593d91b415ac2e90a00b7d6972f284e54b3214940250935e" => :yosemite - sha256 "6c361a421b5f59c32c1098d4c29dd0c8f3048cf288c8880e954448926ed26184" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main() { - const char* a = "This is my test string"; - uint64_t result = CityHash64(a, sizeof(a)); - printf("result: %llx\\n", result); - return result != 0xab7a556ed7598b04LL; - } - EOS - system ENV.cxx, "-L#{lib}", "-lcityhash", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/civl.rb b/Formula/civl.rb deleted file mode 100644 index 793d44ab89f8c..0000000000000 --- a/Formula/civl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Civl < Formula - desc "The Concurrency Intermediate Verification Language" - homepage "https://vsl.cis.udel.edu/civl/" - url "https://vsl.cis.udel.edu/lib/sw/civl/1.7/r3157/release/CIVL-1.7_3157.tgz" - version "1.7-3157" - sha256 "49ed0467ea281bf5a436b2caf4f87862d3f613fa9e6e746ce52cfd409c3f4403" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8+" - depends_on "z3" - - def install - libexec.install "lib/civl-1.7_3157.jar" - bin.write_jar_script libexec/"civl-1.7_3157.jar", "civl" - pkgshare.install "doc", "emacs", "examples", "licenses" - end - - test do - # Test with example suggested in manual. - example = pkgshare/"examples/concurrency/locksBad.cvl" - assert_match "The program MAY NOT be correct.", - shell_output("#{bin}/civl verify #{example}") - assert_predicate testpath/"CIVLREP/locksBad_log.txt", :exist? - end -end diff --git a/Formula/cjdns.rb b/Formula/cjdns.rb deleted file mode 100644 index ed3c754857a3b..0000000000000 --- a/Formula/cjdns.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Cjdns < Formula - desc "Advanced mesh routing system with cryptographic addressing" - homepage "https://github.com/cjdelisle/cjdns/" - url "https://github.com/cjdelisle/cjdns/archive/cjdns-v20.2.tar.gz" - sha256 "b114f4e89c971d2c288e3d8265396248a37134895b0e0468bf55030de84b4d2a" - head "https://github.com/cjdelisle/cjdns.git" - - bottle do - cellar :any_skip_relocation - sha256 "62b8418625dc9550f4eded4ee1c7062b8c5d85da97aacd6899fff13578d3a836" => :mojave - sha256 "5e516be5ce8d028803865ce5ea136ccc671250424f560efbd6ab1454976ff42d" => :high_sierra - sha256 "0bd392fc17fb41ad9004458c0098df2dc165accf5c9d676efe21373c22f857db" => :sierra - sha256 "095639122e0a992531834d8c1b77113386064fa6214eabf06a0716d3ee678291" => :el_capitan - end - - depends_on "node" => :build - - def install - system "./do" - bin.install "cjdroute" - (pkgshare/"test").install "build_darwin/test_testcjdroute_c" => "cjdroute_test" - end - - test do - system "#{pkgshare}/test/cjdroute_test", "all" - end -end diff --git a/Formula/ck.rb b/Formula/ck.rb deleted file mode 100644 index 8c90570cade92..0000000000000 --- a/Formula/ck.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Ck < Formula - desc "Concurrency primitives and non-blocking data structures library" - homepage "http://concurrencykit.org/" - url "http://concurrencykit.org/releases/ck-0.6.0.tar.gz" - sha256 "d7e27dd0a679e45632951e672f8288228f32310dfed2d5855e9573a9cf0d62df" - - bottle do - cellar :any - sha256 "6e2e0d09b44b40f9b7de309b651986e24666d33912e53fc2aefe98bdd1953345" => :mojave - sha256 "1b22dfdda525fb4bd152a435f12753c83d13a585bbe5b201304a4b3fdfdc7e74" => :high_sierra - sha256 "29ded4898ebd1f8dfa7fc5adb377a7b3404b8a9c1d11db5ab2e85c3cb6f62ad7" => :sierra - sha256 "4e74455ae32382c6eb1b7077d1166e72c2d1f8f66c5c74fc0fc975323c6e1e40" => :el_capitan - sha256 "c01c837e8999093e50cc565681fe22436289c0cbd5bed288d758fca95f414622" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - ck_spinlock_t spinlock; - ck_spinlock_init(&spinlock); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lck", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/ckan.rb b/Formula/ckan.rb deleted file mode 100644 index 704ed55983d40..0000000000000 --- a/Formula/ckan.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Ckan < Formula - desc "The Comprehensive Kerbal Archive Network" - homepage "https://github.com/KSP-CKAN/CKAN/" - url "https://github.com/KSP-CKAN/CKAN/releases/download/v1.25.4/ckan.exe" - sha256 "e992982615c6afcfe5f52d9872df22f4a2fadb3bf97c37931393ea767e7c3ffc" - - bottle :unneeded - - depends_on "mono" - - def install - (libexec/"bin").install "ckan.exe" - (bin/"ckan").write <<~EOS - #!/bin/sh - exec mono "#{libexec}/bin/ckan.exe" "$@" - EOS - end - - def caveats; <<~EOS - To use the CKAN GUI, install the ckan-app cask. - EOS - end - - test do - system bin/"ckan", "version" - end -end diff --git a/Formula/cksfv.rb b/Formula/cksfv.rb deleted file mode 100644 index 0f1daf5c617ed..0000000000000 --- a/Formula/cksfv.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Cksfv < Formula - desc "File verification utility" - homepage "http://zakalwe.fi/~shd/foss/cksfv/" - url "http://zakalwe.fi/~shd/foss/cksfv/files/cksfv-1.3.14.tar.bz2" - sha256 "8f3c246f3a4a1f0136842a2108568297e66e92f5996e0945d186c27bca07df52" - - bottle do - cellar :any_skip_relocation - sha256 "fcefe9fe38fb4555760f8d7e651f19aca85115583f896ba602b1396e71547743" => :mojave - sha256 "095a3a02e99d3f018472202e65231212c818750cd91d42c32a95957b407c1d4b" => :high_sierra - sha256 "4414da8e35f9d69a0e04e4a1942745f98b5234891a04935627248e2e6954e17d" => :sierra - sha256 "41d81d535cfa41b4eb03709e646b0bdc36a78f99c8e15746b7eb289a98afbb97" => :el_capitan - sha256 "9885cadccdeec56d0f665bad80655cfba3397c3ff2958c7a44af514a69bc8114" => :yosemite - sha256 "3838548d5febbed5d9db37e8634397a589bcec766ee5ec84949a17dae9b34cdd" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - path = testpath/"foo" - path.write "abcd" - - assert_match "#{path} ED82CD11", shell_output("#{bin}/cksfv #{path}") - end -end diff --git a/Formula/clac.rb b/Formula/clac.rb deleted file mode 100644 index 200937dc63c09..0000000000000 --- a/Formula/clac.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Clac < Formula - desc "Command-line, stack-based calculator with postfix notation" - homepage "https://github.com/soveran/clac" - url "https://github.com/soveran/clac/archive/0.3.2.tar.gz" - sha256 "37a926982a3cc5016b42c554deaa5c64fa3932ebacd5bd15003508cf79a666dd" - - bottle do - cellar :any_skip_relocation - sha256 "f88ab13f5b80ecad66b4104df24a41932deb7da4a6bed46f1dbe3ad18889817f" => :mojave - sha256 "b6e5fd38ba066369ed384eb016cbc0a56411ec46f22b0e7399f21009a16b8720" => :high_sierra - sha256 "7e1fa4bcd0c7aed8586f7036e3d1fce149a5d4b321f496163ea5aaedbad60596" => :sierra - sha256 "21200708adb21d70fde9197daa3a73c9029b420a992878761e9054ec5389c6af" => :el_capitan - end - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - assert_equal "7", shell_output("#{bin}/clac '3 4 +'").strip - end -end diff --git a/Formula/clamav.rb b/Formula/clamav.rb deleted file mode 100644 index 63972ce4bf912..0000000000000 --- a/Formula/clamav.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Clamav < Formula - desc "Anti-virus software" - homepage "https://www.clamav.net/" - url "https://www.clamav.net/downloads/production/clamav-0.100.2.tar.gz" - sha256 "4a2e4f0cd41e62adb5a713b4a1857c49145cd09a69957e6d946ecad575206dd6" - - bottle do - sha256 "3c3cf0708c41acea618c1fa44514860e2f628525fff24b32bf7d9b889b0eae6d" => :mojave - sha256 "b32daa605ce566aeee7f8f6f69bc4b38f4ee5500284f74111eedefb22bfffc02" => :high_sierra - sha256 "23f15b3fd6bb54d16ca0d12c070160d42d7683a619045a1488049e410f279e8c" => :sierra - end - - head do - url "https://github.com/Cisco-Talos/clamav-devel.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "pcre" - depends_on "json-c" => :optional - depends_on "yara" => :optional - - skip_clean "share/clamav" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --libdir=#{lib} - --sysconfdir=#{etc}/clamav - --with-openssl=#{Formula["openssl"].opt_prefix} - --with-pcre=#{Formula["pcre"].opt_prefix} - --disable-zlib-vcheck - --enable-llvm=no - ] - - args << (build.with?("json-c") ? "--with-libjson=#{Formula["json-c"].opt_prefix}" : "--without-libjson") - args << "--disable-yara" if build.without? "yara" - args << "--with-zlib=#{MacOS.sdk_path}/usr" unless MacOS::CLT.installed? - - pkgshare.mkpath - system "autoreconf", "-fvi" if build.head? - system "./configure", *args - system "make", "install" - end - - def caveats; <<~EOS - To finish installation & run clamav you will need to edit - the example conf files at #{etc}/clamav/ - EOS - end - - test do - system "#{bin}/clamav-config", "--version" - end -end diff --git a/Formula/clamz.rb b/Formula/clamz.rb deleted file mode 100644 index 43bc687c62fef..0000000000000 --- a/Formula/clamz.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Clamz < Formula - desc "Download MP3 files from Amazon's music store" - homepage "https://code.google.com/archive/p/clamz/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/clamz/clamz-0.5.tar.gz" - sha256 "5a63f23f15dfa6c2af00ff9531ae9bfcca0facfe5b1aa82790964f050a09832b" - revision 1 - - bottle do - cellar :any - sha256 "031520225192a8498bc21a4e69c539ea0811ed2773b7085ecf1e10b502f648de" => :mojave - sha256 "0a0d293bb616f176c756c402b9d5d7528e42caa1767374d45b721b5a2e82094d" => :high_sierra - sha256 "fd35e22d601781e32cf9c5264f351c989d732d0a516617e3431522fef55bde61" => :sierra - sha256 "b960106e00e01e4dd8ff259feab6e0a1e399d373aa79d2b5d622f2ccf6f1e41b" => :el_capitan - sha256 "e0ba09e61f28b4d224f20b0922277b849bff48ce8c7738e8d22fe1a514d56fe2" => :yosemite - sha256 "70f9f355c7f53a6201b5e175dbc6db9b1f8b275327250a1e70e06d5c139c2a53" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libgcrypt" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/clamz --version 2>&1") - end -end diff --git a/Formula/clang-format.rb b/Formula/clang-format.rb deleted file mode 100644 index 8ee1504fd8a38..0000000000000 --- a/Formula/clang-format.rb +++ /dev/null @@ -1,68 +0,0 @@ -class ClangFormat < Formula - desc "Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript" - homepage "https://clang.llvm.org/docs/ClangFormat.html" - version "2018-12-18" - - stable do - depends_on "subversion" => :build - url "http://llvm.org/svn/llvm-project/llvm/tags/google/stable/2018-12-18/", :using => :svn - - resource "clang" do - url "http://llvm.org/svn/llvm-project/cfe/tags/google/stable/2018-12-18/", :using => :svn - end - - resource "libcxx" do - url "https://releases.llvm.org/7.0.0/libcxx-7.0.0.src.tar.xz" - sha256 "9b342625ba2f4e65b52764ab2061e116c0337db2179c6bce7f9a0d70c52134f0" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "c7b2d5141522cde00e586a0291dbaaf651285905abc52669ee58767fb001798e" => :mojave - sha256 "499498f37f6fc02104e369fec3e8d3352b043cf56ceb52cda5ea57a60e5a8868" => :high_sierra - sha256 "856dedad614fd9a3f490b9d92e734f9ac7d9b3f345bf09b6083d5c1509d90d6d" => :sierra - end - - head do - url "https://git.llvm.org/git/llvm.git" - - resource "clang" do - url "https://git.llvm.org/git/clang.git" - end - - resource "libcxx" do - url "https://git.llvm.org/git/libcxx.git" - end - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - - def install - (buildpath/"projects/libcxx").install resource("libcxx") - (buildpath/"tools/clang").install resource("clang") - - mkdir "build" do - args = std_cmake_args - args << "-DCMAKE_OSX_SYSROOT=/" unless MacOS::Xcode.installed? - args << "-DLLVM_ENABLE_LIBCXX=ON" - args << ".." - system "cmake", "-G", "Ninja", *args - system "ninja", "clang-format" - bin.install "bin/clang-format" - end - bin.install "tools/clang/tools/clang-format/git-clang-format" - (share/"clang").install Dir["tools/clang/tools/clang-format/clang-format*"] - end - - test do - # NB: below C code is messily formatted on purpose. - (testpath/"test.c").write <<~EOS - int main(char *args) { \n \t printf("hello"); } - EOS - - assert_equal "int main(char *args) { printf(\"hello\"); }\n", - shell_output("#{bin}/clang-format -style=Google test.c") - end -end diff --git a/Formula/classads.rb b/Formula/classads.rb deleted file mode 100644 index 4bf3fd4fcaf91..0000000000000 --- a/Formula/classads.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Classads < Formula - desc "Classified Advertisements (used by HTCondor Central Manager)" - homepage "https://research.cs.wisc.edu/htcondor/classad/" - url "http://ftp.cs.wisc.edu/condor/classad/c++/classads-1.0.10.tar.gz" - sha256 "cde2fe23962abb6bc99d8fc5a5cbf88f87e449b63c6bca991d783afb4691efb3" - - bottle do - cellar :any - rebuild 1 - sha256 "2c2987f20d62b7c0926071bfe5c2c9825b30b4c6dba4dd20e2d2f34c5369ef44" => :mojave - sha256 "febef9dc12fdea8d1dbd1687f835ac8a58d8a7534ce2a0735d6102872058ec59" => :high_sierra - sha256 "d51471a725a552974a309b8add05ca731264f7a0fbaedee1c85b97475c204cb7" => :sierra - sha256 "52bd3bb21e7a2491ad96f01988b802ab183c5e93d3123e9cc57b75e1a0076171" => :el_capitan - sha256 "2ec01b2285391e8c1a696c783db281dc69c05e0f2c483792129799b8ad304d7e" => :yosemite - sha256 "b2ba8857a9e07ece0c19ac04a78893322bb22b361e28d5eb23abfa2515e965c9" => :mavericks - end - - depends_on "pcre" - - def install - system "./configure", "--enable-namespace", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/clblas.rb b/Formula/clblas.rb deleted file mode 100644 index 29d3c8b029d81..0000000000000 --- a/Formula/clblas.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Clblas < Formula - desc "Library containing BLAS functions written in OpenCL" - homepage "https://github.com/clMathLibraries/clBLAS" - url "https://github.com/clMathLibraries/clBLAS/archive/v2.12.tar.gz" - sha256 "7269c7cb06a43c5e96772010eba032e6d54e72a3abff41f16d765a5e524297a9" - - bottle do - cellar :any - sha256 "de18e1f78894ad83aa80a1d2a6d21973d61507be13a657055bd19b1f11b80c0b" => :mojave - sha256 "47e08f87365e11a57d2ffc2fb81a3cfcd8bd784c438c1e08e1fe4116fc774553" => :high_sierra - sha256 "22a6cc8252ed5d431ccea7d51631f57bcee3876be7f65a0ac0fbaabfe09a9484" => :sierra - sha256 "e18aa93ecbd78f5f70607653a1e1c48f73952aeef1a568e2205362368c40ba4c" => :el_capitan - sha256 "ac0d50729480e60afd56862a49f92408cb0ed61967ba91fcdc9e024e06f39917" => :yosemite - end - - depends_on "boost" => :build - depends_on "cmake" => :build - - def install - system "cmake", "src", *std_cmake_args, - "-DBUILD_CLIENT=OFF", - "-DBUILD_KTEST=OFF", - "-DBUILD_TEST=OFF", - "-DCMAKE_MACOSX_RPATH:BOOL=ON", - "-DSUFFIX_LIB:STRING=" - system "make", "install" - pkgshare.install "src/samples/example_srot.c" - end - - test do - # We do not run the test, as it fails on CI machines - # ("clGetDeviceIDs() failed with -1") - system ENV.cc, pkgshare/"example_srot.c", "-I#{include}", "-L#{lib}", - "-lclBLAS", "-framework", "OpenCL" - end -end diff --git a/Formula/clblast.rb b/Formula/clblast.rb deleted file mode 100644 index 022357c08fbc7..0000000000000 --- a/Formula/clblast.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Clblast < Formula - desc "Tuned OpenCL BLAS library" - homepage "https://github.com/CNugteren/CLBlast" - url "https://github.com/CNugteren/CLBlast/archive/1.5.0.tar.gz" - sha256 "b3198d84d175fd18b0674c0c36f5fb8b7c61a00662afb8596eb5b0b9ab98630c" - - bottle do - cellar :any - sha256 "8044e1c69fa9f1ec704c04913d4fbaafa07538cb80e929a1f4845aa471730d2d" => :mojave - sha256 "4bc63e9ac1f49a693fcb0d69eaa755549c2c29feac5c40a216b43a1b78100848" => :high_sierra - sha256 "7948c069f411f9d3c96aff149a76b7d8b41ae583b9a54a423ebab84275a58f5b" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - pkgshare.install "samples" # for a simple library linking test - end - - test do - system ENV.cc, pkgshare/"samples/sgemm.c", "-I#{include}", "-L#{lib}", - "-lclblast", "-framework", "OpenCL" - end -end diff --git a/Formula/clean.rb b/Formula/clean.rb deleted file mode 100644 index aca96d950cad1..0000000000000 --- a/Formula/clean.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Clean < Formula - desc "Search for files matching a regex and delete them" - homepage "https://clean.sourceforge.io/" - url "https://downloads.sourceforge.net/project/clean/clean/3.4/clean-3.4.tar.bz2" - sha256 "761f3a9e1ed50747b6a62a8113fa362a7cc74d359ac6e8e30ba6b30d59115320" - - bottle do - cellar :any_skip_relocation - sha256 "e715ac664f19bed88572c18765770713b8483bcf9fd0617e6739ada3fa8d68d7" => :mojave - sha256 "d2f22ecaf65e902d6e0f878ec9585dd915f05d58121e95cfb5cff53d7905fad8" => :high_sierra - sha256 "925b26f91800733aeda229bdaee74ecf4a70e1c94cb4e1b33ac3fc4f3948186d" => :sierra - sha256 "7a433c07eb3c8a3846d352ddf27a6ac32fdc6528b6b2e6212f78318ff0f04a6a" => :el_capitan - sha256 "f06ca56bca5a139222603fac5d84555a1af9812a2dd669e44501b2022a16eef8" => :yosemite - sha256 "a847561f68c5d636ee3c0802dccfc7a7b1a5cf66030f026b074c000f6cea258d" => :mavericks - end - - def install - system "make" - bin.install "clean" - man1.install "clean.1" - end - - test do - touch testpath/"backup1234" - touch testpath/"backup1234.testing-rm" - - system bin/"clean", "-f", "-l", "-e", "*.testing-rm" - assert_predicate testpath/"backup1234", :exist? - refute_predicate testpath/"backup1234.testing-rm", :exist? - end -end diff --git a/Formula/clearlooks-phenix.rb b/Formula/clearlooks-phenix.rb deleted file mode 100644 index b739732a9572b..0000000000000 --- a/Formula/clearlooks-phenix.rb +++ /dev/null @@ -1,25 +0,0 @@ -class ClearlooksPhenix < Formula - desc "GTK+3 port of the Clearlooks Theme" - homepage "https://github.com/jpfleury/clearlooks-phenix" - url "https://github.com/jpfleury/clearlooks-phenix/archive/7.0.1.tar.gz" - sha256 "2a9b21400f9960422e31dc4dabb4f320a16b76776a9574f0986bb00e97d357f4" - revision 1 - head "https://github.com/jpfleury/clearlooks-phenix.git" - - bottle :unneeded - - depends_on "gtk+3" - - def install - (share/"themes/Clearlooks-Phenix").install %w[gtk-2.0 gtk-3.0 index.theme] - end - - def post_install - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", - HOMEBREW_PREFIX/"share/themes/Clearlooks-Phenix" - end - - test do - assert_predicate testpath/"#{share}/themes/Clearlooks-Phenix/index.theme", :exist? - end -end diff --git a/Formula/clens.rb b/Formula/clens.rb deleted file mode 100644 index 0e81c614f10ac..0000000000000 --- a/Formula/clens.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Clens < Formula - desc "Library to help port code from OpenBSD to other operating systems" - homepage "https://github.com/conformal/clens" - url "https://github.com/conformal/clens/archive/CLENS_0_7_0.tar.gz" - sha256 "0cc18155c2c98077cb90f07f6ad8334314606c4be0b6ffc13d6996171c7dc09d" - - bottle do - cellar :any_skip_relocation - sha256 "3550adf8f1e9eb8e62ac6c64f3b3c8cae0fba0d0f958f6e6da99e74f4e4d5e19" => :mojave - sha256 "e9dfe6e9228a928f9cb1a4048d92ec576be5f89f48408401b7f3020c1482a7c6" => :high_sierra - sha256 "f034c79bf5a16265db249c673b2d2a3e6850676dba739adeb6e90394d8f77475" => :sierra - sha256 "f6c68d7dce9d824274e16e3867926528cc79d161418fac0a0052e37dc6604668" => :el_capitan - sha256 "b08580c90a8ed647005c437158972a1dbd770792c2db74391eec8ed5f4ec1b6e" => :yosemite - sha256 "e3642b0982f846103eace85598f242e982ead98bbc8963b58e4192b2d1b1ae84" => :mavericks - end - - patch do - url "https://github.com/conformal/clens/commit/83648cc9027d9f76a1bc79ddddcbed1349b9d5cd.diff?full_index=1" - sha256 "efd43aa84f7ff1582c3716282ac1b3b650c16af9a0f55039d20bfd4b085188e2" - end - - def install - ENV.deparallelize - system "make", "all", "install", "LOCALBASE=#{prefix}" - end -end diff --git a/Formula/cless.rb b/Formula/cless.rb deleted file mode 100644 index bcf587cf3183e..0000000000000 --- a/Formula/cless.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "language/haskell" - -class Cless < Formula - include Language::Haskell::Cabal - - desc "Display file contents with colorized syntax highlighting" - homepage "https://github.com/tanakh/cless" - url "https://github.com/tanakh/cless/archive/0.3.0.0.tar.gz" - sha256 "382ad9b2ce6bf216bf2da1b9cadd9a7561526bfbab418c933b646d03e56833b2" - revision 1 - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "3244447865fa989bf33235e88637e0d6c19032c7a2d099c1c0fc7645d0cd043e" => :mojave - sha256 "b0f4cd35cfb88bae1816f87df9a6eac25ffc5b68bc03ed7d92c8bba493add8c1" => :high_sierra - sha256 "3585e128d1f855aede1e5bb6adec957c64e6777b126cc93a4165d68ccc304038" => :sierra - sha256 "660d59f6fe5f0b319091559c727a8b1b241f62244b877fc35ecdf34d69bf7713" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - # GHC 8 compat - # Reported 25 May 2016: https://github.com/tanakh/cless/issues/3 - # Also see "fix compilation with GHC 7.10", which has the base bump but not - # the transformers bump: https://github.com/tanakh/cless/pull/2 - (buildpath/"cabal.config").write("allow-newer: base,transformers\n") - - install_cabal_package - end - - test do - system "#{bin}/cless", "--help" - system "#{bin}/cless", "--list-langs" - system "#{bin}/cless", "--list-styles" - end -end diff --git a/Formula/clfft.rb b/Formula/clfft.rb deleted file mode 100644 index b3b2a9856e7db..0000000000000 --- a/Formula/clfft.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Clfft < Formula - desc "FFT functions written in OpenCL" - homepage "https://github.com/clMathLibraries/clFFT" - url "https://github.com/clMathLibraries/clFFT/archive/v2.12.2.tar.gz" - sha256 "e7348c146ad48c6a3e6997b7702202ad3ee3b5df99edf7ef00bbacc21e897b12" - - bottle do - cellar :any - sha256 "2f502a8f1c11e5c01dd0141d83935cfd0e357dd75a352848564260c49da400aa" => :mojave - sha256 "1e3aca16a694b761c0267c0dfdd9933d43cddd3ed0ea9d20fd4016222a7748f9" => :high_sierra - sha256 "009c0a8a81d783393abc8ca6307631c50e50ba72dc09e3f2cda5f2e2d8aa617c" => :sierra - sha256 "369c0df6b06b7ea116120e177a44a54760cc4d7132a1fb59a83ef52a99a6b5f4" => :el_capitan - sha256 "3c91564548f9b7844de09de3d54b77b43e7855c17def6d3efac5866e357635f0" => :yosemite - end - - depends_on "boost" => :build - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "../src", "-DBUILD_EXAMPLES:BOOL=OFF", "-DBUILD_TEST:BOOL=OFF", *std_cmake_args - system "make", "install" - end - pkgshare.install "src/examples" - end - - test do - system ENV.cxx, pkgshare/"examples/fft1d.c", "-I#{include}", "-L#{lib}", - "-lclFFT", "-framework", "OpenCL", "-o", "fft1d" - assert_match "one dimensional array of size N = 16", shell_output("./fft1d") - end -end diff --git a/Formula/clhep.rb b/Formula/clhep.rb deleted file mode 100644 index 7e1e5cca0d87c..0000000000000 --- a/Formula/clhep.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Clhep < Formula - desc "Class Library for High Energy Physics" - homepage "https://proj-clhep.web.cern.ch/proj-clhep/" - url "https://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/clhep-2.4.1.0.tgz" - sha256 "d14736eb5c3d21f86ce831dc1afcf03d423825b35c84deb6f8fd16773528c54d" - - bottle do - cellar :any - sha256 "c067826cdae1e029b9e08a21e485484ad11947394060ffce21247d6f638dc49e" => :mojave - sha256 "ce6e421df5e06d3f85bc36c9eb4bb1e5ee5635d2a7b6a5c28d04490c12deb155" => :high_sierra - sha256 "3cfaf1bea915e52b57c44d7df7c40312fb7e0fab6cac5b8a8310ac4dcc55b74d" => :sierra - sha256 "4be2ee76db5d27890df9f0237e7c0342bcfae9f622dd3bfa156f6bbd79a2a2ee" => :el_capitan - end - - head do - url "https://gitlab.cern.ch/CLHEP/CLHEP.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "cmake" => :build - - def install - mv (buildpath/"CLHEP").children, buildpath if build.stable? - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main() { - CLHEP::Hep3Vector aVec(1, 2, 3); - std::cout << "r: " << aVec.mag(); - std::cout << " phi: " << aVec.phi(); - std::cout << " cos(theta): " << aVec.cosTheta() << std::endl; - return 0; - } - EOS - system ENV.cxx, "-L#{lib}", "-lCLHEP", "-I#{include}/CLHEP", - testpath/"test.cpp", "-o", "test" - assert_equal "r: 3.74166 phi: 1.10715 cos(theta): 0.801784", - shell_output("./test").chomp - end -end diff --git a/Formula/cli53.rb b/Formula/cli53.rb deleted file mode 100644 index 7003c6bdda335..0000000000000 --- a/Formula/cli53.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cli53 < Formula - desc "Command-line tool for Amazon Route 53" - homepage "https://github.com/barnybug/cli53" - url "https://github.com/barnybug/cli53/archive/0.8.12.tar.gz" - sha256 "cf8511bd283fe9fdc7fdf493706e9f8b4902f27b9d51e6a6dc601e16472cd129" - - bottle do - cellar :any_skip_relocation - sha256 "c110e5d1411afd1642eeccd1f10b9642f1e1b17252e5122013ae73692e30e2c0" => :mojave - sha256 "54a6761f3ce9942a371cbb0a946e437b91a9e85f8e2d2c883786dab17df5bbb6" => :high_sierra - sha256 "8905b12ce358fa01a303182323f67f84b773199c6c7e2253354969f46931ae5b" => :sierra - sha256 "80a40487ecd7a8d71531e01a95a4063909ee02bbf5d36f5992314b7a300ecd06" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/barnybug" - ln_s buildpath, buildpath/"src/github.com/barnybug/cli53" - - system "make", "build" - bin.install "cli53" - end - - test do - assert_match "list domains", shell_output("#{bin}/cli53 help list") - end -end diff --git a/Formula/clib.rb b/Formula/clib.rb deleted file mode 100644 index 2adb74c8e82ee..0000000000000 --- a/Formula/clib.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Clib < Formula - desc "Package manager for C programming" - homepage "https://github.com/clibs/clib" - url "https://github.com/clibs/clib/archive/1.8.1.tar.gz" - sha256 "f5718e316771571971cb4e5a0142f91b47c6bfe32997fd869fc5a90ec091a066" - head "https://github.com/clibs/clib.git" - - bottle do - cellar :any_skip_relocation - sha256 "e7fa3d823b125697f59f95c5671ddc591b91223e45cc59555ee62de7e5df752d" => :mojave - sha256 "0dee597cc5870323ea38804337d3c3bd7b681a53303031399d31c12e1c1f1f55" => :high_sierra - sha256 "054b42c0cb78315e454759303b7f25945a9ed18ee76f32a14d58a6911861f37d" => :sierra - sha256 "64a97a9de695bc96f596d5a626428b8758ae0365b67c161bcd9519ccdf7dcfc4" => :el_capitan - sha256 "ea221a1093f4bdb63209c30fc29a888ae5312baa9f50f1bc8c5b56dac75cbb46" => :yosemite - end - - def install - ENV["PREFIX"] = prefix - system "make", "install" - end - - test do - system "#{bin}/clib", "install", "stephenmathieson/rot13.c" - end -end diff --git a/Formula/click.rb b/Formula/click.rb deleted file mode 100644 index 6b5d0ae798619..0000000000000 --- a/Formula/click.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Click < Formula - desc "The command-line interactive controller for Kubernetes" - homepage "https://github.com/databricks/click" - url "https://github.com/databricks/click/archive/v0.3.2.tar.gz" - sha256 "eed648409bf78a05658a9d097e5099ca17bf19df70122e2067859ae94c5575d5" - head "https://github.com/databricks/click.git" - - bottle do - sha256 "20757fac7b6ce08e1bd3df5275988cbaff40319c1c990428ada624ae313a0aed" => :mojave - sha256 "998198613be6e5007df66eee76b9ba108078c58534869a03233e8fed93661b32" => :high_sierra - sha256 "f165b40c17fceaa2ceac1a745124008255986e1e8e6da98973aadc49095f62ea" => :sierra - sha256 "fcfc3052c5457fae773d76e93d680c3033f54df048f66dd4c38148c684d986aa" => :el_capitan - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - mkdir testpath/"config" - # Default state configuration file to avoid warning on startup - (testpath/"config/click.config").write <<~EOS - --- - namespace: ~ - context: ~ - editor: ~ - terminal: ~ - EOS - - # Fake K8s configuration - (testpath/"config/config").write <<~EOS - apiVersion: v1 - clusters: - - cluster: - insecure-skip-tls-verify: true - server: 'https://localhost:6443' - name: test-cluster - contexts: - - context: - cluster: test-cluster - user: test-user - name: test-context - current-context: test-context - kind: Config - preferences: - colors: true - users: - - name: test-cluster - user: - client-certificate-data: >- - invalid - client-key-data: >- - invalid - EOS - - # This test cannot test actual K8s connectivity, but it is enough to prove click starts - (testpath/"click-test").write <<~EOS - spawn "#{bin}/click" --config_dir "#{testpath}/config" - expect "*\\[*none*\\]* *\\[*none*\\]* *\\[*none*\\]* >" - send "quit\\r" - EOS - system "expect", "-f", "click-test" - end -end diff --git a/Formula/cliclick.rb b/Formula/cliclick.rb deleted file mode 100644 index 877b9db41f39f..0000000000000 --- a/Formula/cliclick.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Cliclick < Formula - desc "Tool for emulating mouse and keyboard events" - homepage "https://www.bluem.net/jump/cliclick/" - url "https://github.com/BlueM/cliclick/archive/4.0.1.tar.gz" - sha256 "78f9584524b2cb4710a964f4d8e23667479f1dab37240d1ffbc8dfa9841ff1c2" - head "https://github.com/BlueM/cliclick.git" - - bottle do - cellar :any_skip_relocation - sha256 "bc373ee9ec978d416491fd82b3c25d02755b004b0abc1f5a73ff0b39e57b6b33" => :mojave - sha256 "c371cb5b700e4a5f6495545b5f83e5414fc0e0cb98be05231a7abdf6c6607ff4" => :high_sierra - sha256 "bb47d1d8f4c81f31dc9372b5c06d3f74ecb25026805936f62e08744d1b888ecb" => :sierra - sha256 "e8eca6037032ad2b68b9e8c4faa40adb770b10f868448e47852571f1829aa462" => :el_capitan - end - - def install - system "make" - bin.install "cliclick" - end - - test do - system bin/"cliclick", "p:OK" - end -end diff --git a/Formula/clinfo.rb b/Formula/clinfo.rb deleted file mode 100644 index 13270280a90d4..0000000000000 --- a/Formula/clinfo.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Clinfo < Formula - desc "Print information about OpenCL platforms and devices" - homepage "https://github.com/Oblomov/clinfo" - url "https://github.com/Oblomov/clinfo/archive/2.2.18.04.06.tar.gz" - sha256 "f77021a57b3afcdebc73107e2254b95780026a9df9aa4f8db6aff11c03f0ec6c" - - bottle do - cellar :any_skip_relocation - sha256 "9678520a5637d07faa9cb50e9d490c5ea44da41ce332b70c0115ad6c2d2d14cc" => :mojave - sha256 "d10832aa0b4a2f8602efca713aa85a2a78ae6df19d61d9c256c3e3cd4c37aba1" => :high_sierra - sha256 "bc0233b23ba9f5ac6f037b206eb22ae66583853864c1334652bbc69b239307a3" => :sierra - sha256 "1d456b254b9686f01649e08cf0c76a3b208f1873deae3d8920e22f57cc0f258a" => :el_capitan - end - - def install - system "make", "MANDIR=#{man}", "PREFIX=#{prefix}", "install" - end - - test do - assert_match /Device Type +CPU/, shell_output(bin/"clinfo") - end -end diff --git a/Formula/cling.rb b/Formula/cling.rb deleted file mode 100644 index 2876ac5f7c10f..0000000000000 --- a/Formula/cling.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Cling < Formula - desc "The cling C++ interpreter" - homepage "https://root.cern.ch/cling" - url "https://github.com/root-project/cling.git", - :tag => "v0.5", - :revision => "0f1d6d24d4417fc02b73589c8b1d813e92de1c3f" - revision 2 - - bottle do - sha256 "361280b6e0673f196308e51b418955e2eab0df5289c278f5c196936909963363" => :mojave - sha256 "2741d55c70dd4440a1a812ba4826688ee6d05dbb39dd083754ed72a37c997524" => :high_sierra - sha256 "aafa124f8ef48c2839563f5485f2f747964d26a5a21b07d938e6a78e2db27eb4" => :sierra - end - - depends_on "cmake" => :build - - resource "clang" do - url "http://root.cern.ch/git/clang.git", - :tag => "cling-patches-r302975", - :revision => "1f8b137c7eb06ed8e321649ef7e3f3e7a96f361c" - end - - resource "llvm" do - url "http://root.cern.ch/git/llvm.git", - :tag => "cling-patches-r302975", - :revision => "2a34248cb945d63ded5ee55128e68efd7e5b87c8" - end - - def install - (buildpath/"src").install resource("llvm") - (buildpath/"src/tools/cling").install buildpath.children - [buildpath/"src"] - (buildpath/"src/tools/clang").install resource("clang") - mkdir "build" do - system "cmake", *std_cmake_args, "../src", - "-DCMAKE_INSTALL_PREFIX=#{libexec}", - "-DCLING_CXX_PATH=clang++" - system "make", "install" - end - bin.install_symlink libexec/"bin/cling" - prefix.install_metafiles buildpath/"src/tools/cling" - end - - test do - test = <<~EOS - '#include ' 'printf("Hello!")' - EOS - assert_equal "Hello!(int) 6", shell_output("#{bin}/cling #{test}").chomp - end -end diff --git a/Formula/clingo.rb b/Formula/clingo.rb deleted file mode 100644 index 838093c151314..0000000000000 --- a/Formula/clingo.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Clingo < Formula - desc "ASP system to ground and solve logic programs" - homepage "https://potassco.org/" - url "https://github.com/potassco/clingo/archive/v5.3.0.tar.gz" - sha256 "b0d406d2809352caef7fccf69e8864d55e81ee84f4888b0744894977f703f976" - - bottle do - sha256 "7d5361d6a0eeae3dd864ca98abcca889c6020d3e6b00158065d2a22bb07ef247" => :mojave - sha256 "3e86b87aafa82aec26e952283c53f64a4856a7e7baae383c75f76e48fdea36ad" => :high_sierra - sha256 "2c5f76428bc4b2ee00588770b95de5793a7cd3aac22cdbf211e48df4c260f3fb" => :sierra - sha256 "29f93ed547c63e8881840cf9dd6b68b154cbff5436a002ddc584f16789e44fc3" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "lua" - depends_on "python" - - # This formula replaced the clasp & gringo formulae. - # https://github.com/Homebrew/homebrew-core/pull/20281 - link_overwrite "bin/clasp" - link_overwrite "bin/clingo" - link_overwrite "bin/gringo" - link_overwrite "bin/lpconvert" - link_overwrite "bin/reify" - - needs :cxx14 - - def install - system "cmake", ".", "-DCLINGO_BUILD_WITH_PYTHON=ON", - "-DCLINGO_BUILD_PY_SHARED=ON", - "-DPYCLINGO_USE_INSTALL_PREFIX=ON", - "-DCLINGO_BUILD_WITH_LUA=ON", - "-DPYTHON_EXECUTABLE=#{Formula["python"].opt_bin}/python3", - "-DPYCLINGO_DYNAMIC_LOOKUP=OFF", - *std_cmake_args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/clingo --version") - end -end diff --git a/Formula/clipper.rb b/Formula/clipper.rb deleted file mode 100644 index 1cae798aced93..0000000000000 --- a/Formula/clipper.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Clipper < Formula - desc "Share macOS clipboard with tmux and other local and remote apps" - homepage "https://wincent.com/products/clipper" - url "https://github.com/wincent/clipper/archive/2.0.0.tar.gz" - sha256 "9c9fa0b198d11513777d40c88e2529b2f2f84d7045a500be5946976a5cdcfe83" - - bottle do - cellar :any_skip_relocation - sha256 "ba99d879f6edccf9555855897bcc8b029b46ae5866bba052c3f826eaaa6cc717" => :mojave - sha256 "918667f51ab58ce6518c3777d42d3cabb9323d14fbcf805a55b1fb7952cfe05e" => :high_sierra - sha256 "e3c2f97b33d9e2648cd4efe1ede9e9d427d0cd71778891324a4def3b4f98562a" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - system "go", "build", "clipper.go" - bin.install "clipper" - end - - plist_options :manual => "clipper" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - ProgramArguments - - #{opt_bin}/clipper - - EnvironmentVariables - - LANG - en_US.UTF-8 - - - - EOS - end - - test do - TEST_DATA = "a simple string! to test clipper, with söme spéciål characters!! 🐎\n".freeze - - cmd = [opt_bin/"clipper", "-a", testpath/"clipper.sock", "-l", testpath/"clipper.log"].freeze - ohai cmd.join " " - - require "open3" - Open3.popen3({ "LANG" => "en_US.UTF-8" }, *cmd) do |_, _, _, clipper| - sleep 0.5 # Give it a moment to launch and create its socket. - begin - sock = UNIXSocket.new testpath/"clipper.sock" - assert_equal TEST_DATA.bytesize, sock.sendmsg(TEST_DATA) - sock.close - sleep 0.5 - assert_equal TEST_DATA, `LANG=en_US.UTF-8 pbpaste` - ensure - Process.kill "TERM", clipper.pid - end - end - end -end diff --git a/Formula/clipsafe.rb b/Formula/clipsafe.rb deleted file mode 100644 index 794ef8ae3d265..0000000000000 --- a/Formula/clipsafe.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Clipsafe < Formula - desc "Command-line interface to Password Safe" - homepage "http://waxandwane.org/clipsafe.html" - url "http://waxandwane.org/download/clipsafe-1.1.tar.gz" - sha256 "7a70b4f467094693a58814a42d272e98387916588c6337963fa7258bda7a3e48" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "c3c42621d02672ee0cabd443b871760320c1b82ba61b48bca61076acab10d097" => :mojave - sha256 "211d670b61c6a68650736df3deb3ae783c320491ba3205e035cc28c014fca705" => :high_sierra - sha256 "7c894e55e215fffa121aef718dbf7fa0f2c71531cf7970ae8d27f4b5eb939877" => :sierra - sha256 "ffd255c6ff1bd4c403bc4040f1751eef61b4ae341c33b226bf9a696b2836b02e" => :el_capitan - sha256 "01dbb7b4cf71ae2b174cfec45cdf4a69e211a5154bc6541fb19e1b5aa20f8389" => :yosemite - end - - depends_on :macos => :mountain_lion - - resource "Crypt::Twofish" do - url "https://cpan.metacpan.org/authors/id/A/AM/AMS/Crypt-Twofish-2.17.tar.gz" - sha256 "eed502012f0c63927a1a32e3154071cc81175d1992a893ec41f183b6e3e5d758" - end - - resource "Digest::SHA" do - url "https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-5.96.tar.gz" - sha256 "2b8e0a9b6e359d5e14159661647cc0fbde06beb7f2a24bf003f5fad0a3a2786a" - end - - resource "DateTime" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.35.tar.gz" - sha256 "42da13b8b15373c1a1790ef4217742d34f7f80f7e5c51c377cc9eed3c7641525" - end - - resource "DateTime::Locale" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.05.tar.gz" - sha256 "692d674558589e2a6ad2d68cf58a6e4e4b1bfe2f7f76caf20cb91b975a51d155" - end - - resource "DateTime::TimeZone" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-2.01.tar.gz" - sha256 "1f673c8156fa42b2030aae46fd7e4c117f229da99dfbc7c57ef9eadd5eaa69e1" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec+"lib/perl5" - - resource("Crypt::Twofish").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - resource("Digest::SHA").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - resource("DateTime").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - resource("DateTime::Locale").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - resource("DateTime::TimeZone").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - bin.install "clipsafe" - bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - system bin/"clipsafe", "--help" - end -end diff --git a/Formula/clisp.rb b/Formula/clisp.rb deleted file mode 100644 index 37ddef904d88f..0000000000000 --- a/Formula/clisp.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Clisp < Formula - desc "GNU CLISP, a Common Lisp implementation" - homepage "https://clisp.sourceforge.io/" - url "https://ftp.gnu.org/gnu/clisp/release/2.49/clisp-2.49.tar.bz2" - mirror "https://ftpmirror.gnu.org/clisp/release/2.49/clisp-2.49.tar.bz2" - sha256 "8132ff353afaa70e6b19367a25ae3d5a43627279c25647c220641fed00f8e890" - revision 1 - - bottle do - sha256 "3cc305f1620b8235b6b96b417470a8581fcd6d454a8f2a1e2e87335e8ee69be0" => :mojave - sha256 "8c545b817e493f5edfb1928ac8fa1d06571cfb3da135094bd701b22e99c6e423" => :high_sierra - sha256 "dd77ffe7a77e9bdb8cc57a11d923108c4967229feb214e511a5a1866a1f7ec50" => :sierra - sha256 "c4503ba2f9fcc24cb8415179db6a7437bfa8e1cab25b619fcb7be8e2770e9fe6" => :el_capitan - sha256 "7335dec5039d4bf0f56cf75521834d93caca2f36fcf45e42fe489964fa7d0c49" => :yosemite - end - - depends_on "libsigsegv" - depends_on "readline" - - patch :DATA - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e2cc7c1/clisp/patch-src_lispbibl_d.diff" - sha256 "fd4e8a0327e04c224fb14ad6094741034d14cb45da5b56a2f3e7c930f84fd9a0" - end - - def install - ENV.deparallelize # This build isn't parallel safe. - ENV.O0 # Any optimization breaks the build - - # Clisp requires to select word size explicitly this way, - # set it in CFLAGS won't work. - ENV["CC"] = "#{ENV.cc} -m64" - - # Work around "configure: error: unrecognized option: `--elispdir" - # Upstream issue 16 Aug 2016 https://sourceforge.net/p/clisp/bugs/680/ - inreplace "src/makemake.in", "${datarootdir}/emacs/site-lisp", elisp - - system "./configure", "--prefix=#{prefix}", - "--with-readline=yes" - - cd "src" do - # Multiple -O options will be in the generated Makefile, - # make Homebrew's the last such option so it's effective. - inreplace "Makefile" do |s| - s.change_make_var! "CFLAGS", "#{s.get_make_var("CFLAGS")} #{ENV["CFLAGS"]}" - end - - # The ulimit must be set, otherwise `make` will fail and tell you to do so - system "ulimit -s 16384 && make" - - if MacOS.version >= :lion - opoo <<~EOS - `make check` fails so we are skipping it. - However, there will likely be other issues present. - Please take them upstream to the clisp project itself. - EOS - else - # Considering the complexity of this package, a self-check is highly recommended. - system "make", "check" - end - - system "make", "install" - end - end - - test do - system "#{bin}/clisp", "--version" - end -end - -__END__ -diff --git a/src/stream.d b/src/stream.d -index 5345ed6..cf14e29 100644 ---- a/src/stream.d -+++ b/src/stream.d -@@ -3994,7 +3994,7 @@ global object iconv_range (object encoding, uintL start, uintL end, uintL maxint - nonreturning_function(extern, error_unencodable, (object encoding, chart ch)); - - /* Avoid annoying warning caused by a wrongly standardized iconv() prototype. */ --#ifdef GNU_LIBICONV -+#if defined(GNU_LIBICONV) && !defined(__APPLE_CC__) - #undef iconv - #define iconv(cd,inbuf,inbytesleft,outbuf,outbytesleft) \ - libiconv(cd,(ICONV_CONST char **)(inbuf),inbytesleft,outbuf,outbytesleft) diff --git a/Formula/cln.rb b/Formula/cln.rb deleted file mode 100644 index 7b239448af0c4..0000000000000 --- a/Formula/cln.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Cln < Formula - desc "Class Library for Numbers" - homepage "https://www.ginac.de/CLN/" - url "https://www.ginac.de/CLN/cln-1.3.4.tar.bz2" - sha256 "2d99d7c433fb60db1e28299298a98354339bdc120d31bb9a862cafc5210ab748" - - bottle do - cellar :any - rebuild 1 - sha256 "fb15fc6efff1c2266f858dc081bb5d2d67e8e2ae2abc50a23883879fab343f22" => :mojave - sha256 "8ba5137f3ca736e16650418d4ea075f0e2c85ea87d88824e68f367bf5c4216dd" => :high_sierra - sha256 "da1f2677ac3df8180bfebd9fa59804610d4b3e0020adcc47ffe839ad831006e4" => :sierra - sha256 "b816f165673f58fb952669c7fa542b2fe52257e6572853785efee0048ea35d6a" => :el_capitan - sha256 "95e74408a4b9dca4e7a939d2ff79e9ab16f3193622027d3d741eb6fc9cc7695d" => :yosemite - sha256 "048947d9343c8848897be272cae74d98cd869fa3d64fa6f2bfe82cb68ca100b9" => :mavericks - end - - depends_on "gmp" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking" - system "make" - system "make", "check" - system "make", "install" - end - - test do - assert_match "3.14159", shell_output("#{bin}/pi 6") - end -end diff --git a/Formula/cloc.rb b/Formula/cloc.rb deleted file mode 100644 index d2f8d2d23bac3..0000000000000 --- a/Formula/cloc.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Cloc < Formula - desc "Statistics utility to count lines of code" - homepage "https://github.com/AlDanial/cloc/" - url "https://github.com/AlDanial/cloc/releases/download/1.80/cloc-1.80.tar.gz" - sha256 "082f53530eee3f9ee84ec449eca59a77ff114250cd7daf9519679537b5b21d67" - head "https://github.com/AlDanial/cloc.git" - - bottle do - cellar :any_skip_relocation - sha256 "bfab4c34974f66e6f48442cfc06fb9421547ab9c53aceddce2ddda408e77ffbd" => :mojave - sha256 "6f0f297361bcaaba9b0924ab4a7401932cd8b208cc06587bc6c0881bb58935a3" => :high_sierra - sha256 "9651d13839bda437d0cd39e8a07e6f6688957525c049565d40d01287ae7185c9" => :sierra - end - - resource "Regexp::Common" do - url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz" - sha256 "ee07853aee06f310e040b6bf1a0199a18d81896d3219b9b35c9630d0eb69089b" - end - - resource "Algorithm::Diff" do - url "https://cpan.metacpan.org/authors/id/T/TY/TYEMQ/Algorithm-Diff-1.1903.tar.gz" - sha256 "30e84ac4b31d40b66293f7b1221331c5a50561a39d580d85004d9c1fff991751" - end - - resource "Parallel::ForkManager" do - url "https://cpan.metacpan.org/authors/id/Y/YA/YANICK/Parallel-ForkManager-1.20.tar.gz" - sha256 "7cc4c1c3b0e676b61ffa90f82f4128e8057327449ca86a9beb2f39217023f289" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - # These are shipped as standard with OS X/macOS' default Perl, but - # because upstream has chosen to use "#!/usr/bin/env perl" cloc will - # use whichever Perl is in the PATH, which isn't guaranteed to include - # these modules. Vendor them to be safe. - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - system "make", "-C", "Unix", "prefix=#{libexec}", "install" - bin.install libexec/"bin/cloc" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - man1.install libexec/"share/man/man1/cloc.1" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - return 0; - } - EOS - - assert_match "1,C,0,0,4", shell_output("#{bin}/cloc --csv .") - end -end diff --git a/Formula/clockywock.rb b/Formula/clockywock.rb deleted file mode 100644 index 060dfa9328fd5..0000000000000 --- a/Formula/clockywock.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Clockywock < Formula - desc "Ncurses analog clock" - homepage "https://soomka.com/" - url "https://soomka.com/clockywock-0.3.1a.tar.gz" - sha256 "278c01e0adf650b21878e593b84b3594b21b296d601ee0f73330126715a4cce4" - - bottle do - cellar :any_skip_relocation - sha256 "3b3b0faab6694a2572ad18b332b0711d43a7bf73715d0826df0adeacef0c64ed" => :mojave - sha256 "4d1b976443480421f6b666121b31b350d7881b26832a65f13866a81fda61aa9e" => :high_sierra - sha256 "d25af48f1f063a64f514a632ffd1c017ba4dd2c0abc2b428489147247eb8cfaf" => :sierra - sha256 "12ce1b232f8dfa658e774f8ae08b99f40ca6ae12ee2d5df41af67412412c2b43" => :el_capitan - sha256 "fccbf3e83841993156fa544c0b0f30a92058facf07ce5b1e622aec78e2573aff" => :yosemite - sha256 "c4919f759cc8446bc8d83ff71a52de61bd8ba8db11eccfb43270e54c1949227f" => :mavericks - end - - def install - system "make" - bin.install "clockywock" - man7.install "clockywock.7" - end - - test do - system "#{bin}/clockywock", "-h" - end -end diff --git a/Formula/clog.rb b/Formula/clog.rb deleted file mode 100644 index fb98dd9eb67d4..0000000000000 --- a/Formula/clog.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Clog < Formula - desc "Colorized pattern-matching log tail utility" - homepage "https://taskwarrior.org/docs/clog/" - url "https://gothenburgbitfactory.org/download/clog-1.3.0.tar.gz" - sha256 "fed44a8d398790ab0cf426c1b006e7246e20f3fcd56c0ec4132d24b05d5d2018" - head "https://github.com/GothenburgBitFactory/clog.git", :branch => "1.4.0", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "ec11a01ddd6a6ad70a655c74f569af9a6b56cf66f87ea448e296a1e208449ba4" => :mojave - sha256 "b5309f9e692f111a0b68599ff465da02783d2f28a4b10d958c19e616177eb37a" => :high_sierra - sha256 "97e07b94ea058c766f4d036cc503fc6ec08ca64cddced33d63723e4611534595" => :sierra - sha256 "8f42168b8e165c4c1f1265b410ef62087b370075cc27269f1908eb0f373645c5" => :el_capitan - sha256 "a6c42c7d0795252434a3e1fc0307fc40490a4f29a9186408fa3ed7d82ba5f02e" => :yosemite - sha256 "61ce3b9c332f9487f9981d8bb93d62fd4b6dfd0bbf0aa8f680b3fd625b2d8576" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - def caveats; <<~EOS - Next step is to create a .clogrc file in your home directory. See 'man clog' - for details and a sample file. - EOS - end - - test do - # Create a rule to suppress any line containing the word 'ignore' - (testpath/".clogrc").write "default rule /ignore/ --> suppress" - - # Test to ensure that a line that does not match the above rule is not suppressed - assert_equal "do not suppress", pipe_output("#{bin}/clog --file #{testpath}/.clogrc", "do not suppress").chomp - - # Test to ensure that a line that matches the above rule is suppressed - assert_equal "", pipe_output("#{bin}/clog --file #{testpath}/.clogrc", "ignore this line").chomp - end -end diff --git a/Formula/clojure.rb b/Formula/clojure.rb deleted file mode 100644 index 17f3c5638fa3a..0000000000000 --- a/Formula/clojure.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Clojure < Formula - desc "The Clojure Programming Language" - homepage "https://clojure.org" - url "https://download.clojure.org/install/clojure-tools-1.10.0.411.tar.gz" - sha256 "f0836d56a32f8c76e20d75d442e04ef5c29b023e69d284baaf0ff298b8b17001" - - bottle :unneeded - - depends_on :java => "1.8+" - depends_on "rlwrap" - - def install - system "./install.sh", prefix - end - - test do - ENV["TERM"] = "xterm" - system("#{bin}/clj -e nil") - %w[clojure clj].each do |clj| - assert_equal "2", shell_output("#{bin}/#{clj} -e \"(+ 1 1)\"").strip - end - end -end diff --git a/Formula/clojurescript.rb b/Formula/clojurescript.rb deleted file mode 100644 index b95a33d7bc61d..0000000000000 --- a/Formula/clojurescript.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Clojurescript < Formula - desc "Clojure to JS compiler" - homepage "https://github.com/clojure/clojurescript" - url "https://github.com/clojure/clojurescript/releases/download/r1.10.439/cljs.jar" - sha256 "969d36628b2d65f1cb206b157342b17732d30a1c4c5d250056d97802a8742cef" - head "https://github.com/clojure/clojurescript.git" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install "cljs.jar" - bin.write_jar_script libexec/"cljs.jar", "cljsc" - end - - def caveats; <<~EOS - This formula is useful if you need to use the ClojureScript compiler directly. - For a more integrated workflow use Leiningen, Boot, or Maven. - EOS - end - - test do - (testpath/"t.cljs").write <<~EOS - (ns hello) - (defn ^:export greet [n] - (str "Hello " n)) - EOS - - system "#{bin}/cljsc", testpath/"t.cljs" - end -end diff --git a/Formula/cloog.rb b/Formula/cloog.rb deleted file mode 100644 index 0fd1c01bc5f16..0000000000000 --- a/Formula/cloog.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Cloog < Formula - desc "Generate code for scanning Z-polyhedra" - homepage "https://www.bastoul.net/cloog/" - url "https://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.4.tar.gz" - sha256 "325adf3710ce2229b7eeb9e84d3b539556d093ae860027185e7af8a8b00a750e" - revision 3 - - bottle do - cellar :any - sha256 "f26e41c339aaf9d6207d9843f9e9a0c93d623d6cfb4e1b9d1f536afee85e25ea" => :mojave - sha256 "32b9d6ae3b69a1ac153d83997999add0a5836214c21d41fe18a0ef2dd44b3123" => :high_sierra - sha256 "f517f774f48f11a1fdcf7d0023bdeacbd919cb22085a539fba539fac80025826" => :sierra - sha256 "2e4ac62185b9291272f07381c19bba476eac505a40ff974aa8017b9ec4359b13" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gmp" - - resource "isl" do - url "http://isl.gforge.inria.fr/isl-0.18.tar.xz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/i/isl/isl_0.18.orig.tar.xz" - sha256 "0f35051cc030b87c673ac1f187de40e386a1482a0cfdf2c552dd6031b307ddc4" - end - - def install - resource("isl").stage do - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}", - "--with-gmp=system", - "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}" - system "make", "install" - end - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-gmp=system", - "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}", - "--with-isl=system", - "--with-isl-prefix=#{libexec}" - system "make", "install" - end - - test do - cloog_source = <<~EOS - c - - 0 2 - 0 - - 1 - - 1 - 0 2 - 0 0 0 - 0 - - 0 - EOS - - output = pipe_output("#{bin}/cloog /dev/stdin", cloog_source) - assert_match %r{Generated from /dev/stdin by CLooG}, output - end -end diff --git a/Formula/closure-compiler.rb b/Formula/closure-compiler.rb deleted file mode 100644 index d06b4b13271d9..0000000000000 --- a/Formula/closure-compiler.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ClosureCompiler < Formula - desc "JavaScript optimizing compiler" - homepage "https://github.com/google/closure-compiler" - url "https://search.maven.org/remotecontent?filepath=com/google/javascript/closure-compiler/v20181008/closure-compiler-v20181008.jar" - sha256 "7725742500734a34d3cd86734442e80fa8d4c10d00763a0dd6523574cfb5eea2" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install Dir["*"] - bin.write_jar_script libexec.children.first, "closure-compiler" - end - - test do - (testpath/"test.js").write <<~EOS - (function(){ - var t = true; - return t; - })(); - EOS - system bin/"closure-compiler", - "--js", testpath/"test.js", - "--js_output_file", testpath/"out.js" - assert_equal (testpath/"out.js").read.chomp, "(function(){return!0})();" - end -end diff --git a/Formula/closure-linter.rb b/Formula/closure-linter.rb deleted file mode 100644 index baa5e7e3d81be..0000000000000 --- a/Formula/closure-linter.rb +++ /dev/null @@ -1,41 +0,0 @@ -class ClosureLinter < Formula - desc "Check JavaScript files for style and documentation" - homepage "https://developers.google.com/closure/utilities/" - url "https://github.com/google/closure-linter/archive/v2.3.19.tar.gz" - sha256 "cd472f560be5af80afccbe94c9d9b534f7c30085510961ad408f8a314ea5c4c2" - head "https://github.com/google/closure-linter.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0c3cb911fb4d4597e7dc00b2cbea553a62477d9024cea8c457cfe515a8730f21" => :mojave - sha256 "d44e482bf8061224657e04f76ac54d964fc04bbcc746dd3f38cd713d587242e9" => :high_sierra - sha256 "d44e482bf8061224657e04f76ac54d964fc04bbcc746dd3f38cd713d587242e9" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - resource "python-gflags" do - url "https://files.pythonhosted.org/packages/source/p/python-gflags/python-gflags-2.0.tar.gz" - sha256 "0dff6360423f3ec08cbe3bfaf37b339461a54a21d13be0dd5d9c9999ce531078" - end - - def install - ENV["PYTHONPATH"] = libexec+"lib/python2.7/site-packages" - - resources.each do |r| - r.stage { system "python", *Language::Python.setup_install_args(libexec) } - end - - system "python", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*js*"] - bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - (testpath/"test.js").write("var test = 1;\n") - assert_equal "1 files checked, no errors found.", shell_output("#{bin}/gjslint test.js").chomp - system "#{bin}/fixjsstyle", "test.js" - end -end diff --git a/Formula/closure-stylesheets.rb b/Formula/closure-stylesheets.rb deleted file mode 100644 index 7911e51b74205..0000000000000 --- a/Formula/closure-stylesheets.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ClosureStylesheets < Formula - desc "Extended CSS preprocessor, linter, and internationalizer" - homepage "https://github.com/google/closure-stylesheets" - url "https://github.com/google/closure-stylesheets/releases/download/v1.5.0/closure-stylesheets.jar" - version "1.5.0" - sha256 "aa4e9b23093187a507a4560d13e59411fc92e285bc911b908a6bcf39479df03c" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install "closure-stylesheets.jar" - bin.write_jar_script libexec/"closure-stylesheets.jar", "closure-stylesheets" - end - - test do - (testpath/"test.gss").write <<~EOS - @def A 5px; - @def B 10px; - .test { - width: add(A, B); - } - EOS - system bin/"closure-stylesheets", testpath/"test.gss", "-o", testpath/"out.css" - assert_equal (testpath/"out.css").read.chomp, ".test{width:15px}" - end -end diff --git a/Formula/cloud-watch.rb b/Formula/cloud-watch.rb deleted file mode 100644 index 2462c18c9a311..0000000000000 --- a/Formula/cloud-watch.rb +++ /dev/null @@ -1,38 +0,0 @@ -class CloudWatch < Formula - desc "Amazon CloudWatch command-line Tool" - homepage "https://aws.amazon.com/developertools/2534" - url "https://ec2-downloads.s3.amazonaws.com/CloudWatch-2010-08-01.zip" - version "1.0.20.0" - sha256 "7b241dc6b49ea2aafdeb66f859be9d30128fb0ab5833074f6596762c9bd84417" - - bottle :unneeded - - depends_on :java - - def install - env = Language::Java.java_home_env - env[:AWS_CLOUDWATCH_HOME] = libexec - env[:SERVICE_HOME] = libexec - rm Dir["bin/*.cmd"] # Remove Windows versions - libexec.install Dir["*"] - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "service" - (bin/basename).write_env_script file, env - end - end - - def caveats - <<~EOS - Before you can use these tools you must export some variables to your $SHELL. - export AWS_ACCESS_KEY="" - export AWS_SECRET_KEY="" - export AWS_CREDENTIAL_FILE="" - EOS - end - - test do - assert_match "w.x.y.z", shell_output("#{bin}/mon-version") - end -end diff --git a/Formula/clozure-cl.rb b/Formula/clozure-cl.rb deleted file mode 100644 index 204793eddddc2..0000000000000 --- a/Formula/clozure-cl.rb +++ /dev/null @@ -1,52 +0,0 @@ -class ClozureCl < Formula - desc "Common Lisp implementation with a long history" - homepage "https://ccl.clozure.com" - url "https://github.com/Clozure/ccl/archive/v1.11.5.tar.gz" - sha256 "07c7e05c1d50ccbf1f7602a1d436b6d6da5dcda7656b89b74daa4cf833fc7929" - head "https://github.com/Clozure/ccl.git" - - bottle do - cellar :any_skip_relocation - sha256 "ab7c724028ac881bbff74bbc692d51e2afaf7f912930520e3e8c78063e5a37b9" => :high_sierra - sha256 "89b7b51d2b1ed683182f3585101bbf101dad10d2c851f383dbec7e1342162cd7" => :sierra - sha256 "6cb7aa8d20a8657bc70cd35cce042cd50841b7d2b2533ff233ecbd8fae2e6a49" => :el_capitan - end - - depends_on :xcode => :build - - conflicts_with "cclive", :because => "both install a ccl binary" - - resource "bootstrap" do - url "https://github.com/Clozure/ccl/releases/download/v1.11.5/ccl-1.11.5-darwinx86.tar.gz" - sha256 "5adbea3d8b4a2e29af30d141f781c6613844f468c0ccfa11bae908c3e9641939" - end - - def install - tmpdir = Pathname.new(Dir.mktmpdir) - tmpdir.install resource("bootstrap") - buildpath.install tmpdir/"dx86cl64.image" - buildpath.install tmpdir/"darwin-x86-headers64" - cd "lisp-kernel/darwinx8664" do - system "make" - end - - ENV["CCL_DEFAULT_DIRECTORY"] = buildpath - - system "./dx86cl64", "-n", "-l", "lib/x8664env.lisp", - "-e", "(ccl:xload-level-0)", - "-e", "(ccl:compile-ccl)", - "-e", "(quit)" - system "echo \"(ccl:save-application \\\"dx86cl64.image\\\")\\n(quit)\" | ./dx86cl64 -n --image-name x86-boot64.image" - - prefix.install "doc/README" - doc.install Dir["doc/*"] - libexec.install Dir["*"] - bin.install Dir["#{libexec}/scripts/ccl64"] - bin.env_script_all_files(libexec/"bin", :CCL_DEFAULT_DIRECTORY => libexec) - end - - test do - output = shell_output("#{bin}/ccl64 -n -e '(write-line (write-to-string (* 3 7)))' -e '(quit)'") - assert_equal "21", output.strip - end -end diff --git a/Formula/clpbar.rb b/Formula/clpbar.rb deleted file mode 100644 index b8eca29ef6bc0..0000000000000 --- a/Formula/clpbar.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Clpbar < Formula - desc "Command-line progress bar" - homepage "https://clpbar.sourceforge.io/" - url "https://downloads.sourceforge.net/project/clpbar/clpbar/bar-1.11.1/bar_1.11.1.tar.gz" - sha256 "fa0f5ec5c8400316c2f4debdc6cdcb80e186e668c2e4471df4fec7bfcd626503" - - bottle do - cellar :any_skip_relocation - sha256 "6d00ea5044914b14d7e7c901eac63641085496b6fd474c9491e46109c6599709" => :mojave - sha256 "eb3648e3cc14ab0712c6a71d3df6eab53bd66bad86a402df1716df3db09c0358" => :high_sierra - sha256 "769dbb64e877ab1f52a496063bbfdac32911f38e6e25b4fc70a5cfe937923f5f" => :sierra - sha256 "b54fa0ce24de6dda141e3fc025b67f2e0216b01a3664ec5992a98f8087881ddd" => :el_capitan - sha256 "edaa21e4d80bbf174e3c040d3c786eb48e381ca8e9477dfbafb06b4ec0bfd19f" => :yosemite - sha256 "36f1ece44bec7c54d2235fbfba5122d3a3d0430532498dc5c35601a59f9c4616" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--program-prefix='clp'" - system "make", "install" - end - - test do - output = shell_output("dd if=/dev/zero bs=1024 count=5 | #{bin}/clpbar 2>&1") - assert_match "Copied: 5120B (5.0KB)", output - end -end diff --git a/Formula/clucene.rb b/Formula/clucene.rb deleted file mode 100644 index de64eacfad928..0000000000000 --- a/Formula/clucene.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Clucene < Formula - desc "C++ port of Lucene: high-performance, full-featured text search engine" - homepage "https://clucene.sourceforge.io/" - url "https://downloads.sourceforge.net/project/clucene/clucene-core-unstable/2.3/clucene-core-2.3.3.4.tar.gz" - sha256 "ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab" - head "https://git.code.sf.net/p/clucene/code.git" - - bottle do - cellar :any - rebuild 1 - sha256 "1e19a680030d8c4863deb4d5a5bc40675c58df5c21e5e7217f2ed8fcbc624d21" => :mojave - sha256 "3986feb447660b2732e2983f54d22086b10da442cb2d7b6ceac45a91ad58f09b" => :high_sierra - sha256 "5d25768dc355533553e6c1605a1dc89985ddd26b4d17d10078c39d6b085c03fb" => :sierra - sha256 "5ee0c98072c18c75dd8c25fd309ccb49f033300d474367a8e325ec601c427f66" => :el_capitan - sha256 "182db4f73e058e9d28b77cbbd642c40ecc403fbf1d9dc8357387b2c54dba8d1e" => :yosemite - sha256 "f85cdb67e53bc6eb380ae1bd8e087b42faca7c65f665f9719209adfa8aaa7b31" => :mavericks - sha256 "97f955d2b9fa3ab41f65d9871f82a357cad400237cbaf553d585bae62207d51f" => :mountain_lion - end - - depends_on "cmake" => :build - - # Portability fixes for 10.9+ - # Upstream ticket: https://sourceforge.net/p/clucene/bugs/219/ - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/ec8d133/clucene/patch-src-shared-CLucene-LuceneThreads.h.diff" - sha256 "42cb23fa6bd66ca8ea1d83a57a650f71e0ad3d827f5d74837b70f7f72b03b490" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/ec8d133/clucene/patch-src-shared-CLucene-config-repl_tchar.h.diff" - sha256 "b7dc735f431df409aac63dcfda9737726999eed4fdae494e9cbc1d3309e196ad" - end - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end -end diff --git a/Formula/clutter-gst.rb b/Formula/clutter-gst.rb deleted file mode 100644 index 3d0739903c526..0000000000000 --- a/Formula/clutter-gst.rb +++ /dev/null @@ -1,117 +0,0 @@ -class ClutterGst < Formula - desc "ClutterMedia interface using GStreamer for video and audio" - homepage "https://developer.gnome.org/clutter-gst/" - url "https://download.gnome.org/sources/clutter-gst/3.0/clutter-gst-3.0.26.tar.xz" - sha256 "d8618a6d9accec0f2a8574c5e1220051f8505fb82b20336c26bdbd482aa6cb3a" - revision 1 - - bottle do - sha256 "4b5dba13db6ed368bd34224d1b3ad0f1d73a0092a398fd7c8a25a23a646c5bf7" => :high_sierra - sha256 "bc573f8872242e53f361fcb7819c9141fb7a36807595de5b4ce127b791dc1373" => :sierra - sha256 "887250619929ceed1616de68dfeb95818ff87a3c67e739897b728fdb0df539f4" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "clutter" - depends_on "gdk-pixbuf" - depends_on "gst-plugins-base" - depends_on "gstreamer" - - def install - args = %W[ - --disable-dependency-tracking - --disable-debug - --prefix=#{prefix} - --enable-introspection=yes - --disable-silent-rules - --disable-gtk-doc-html - ] - - # the source code requires gdk-pixbuf but configure doesn't look for it - ENV.append "CFLAGS", `pkg-config --cflags gdk-pixbuf-2.0`.chomp - ENV.append "LIBS", `pkg-config --libs gdk-pixbuf-2.0`.chomp - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - clutter_gst_init(&argc, &argv); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - clutter = Formula["clutter"] - cogl = Formula["cogl"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gst_plugins_base = Formula["gst-plugins-base"] - gstreamer = Formula["gstreamer"] - json_glib = Formula["json-glib"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{clutter.opt_include}/clutter-1.0 - -I#{cogl.opt_include}/cogl - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gst_plugins_base.opt_include}/gstreamer-1.0 - -I#{gstreamer.opt_include}/gstreamer-1.0 - -I#{gstreamer.opt_lib}/gstreamer-1.0/include - -I#{include}/clutter-gst-3.0 - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{clutter.opt_lib} - -L#{cogl.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gst_plugins_base.opt_lib} - -L#{gstreamer.opt_lib} - -L#{json_glib.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lclutter-1.0 - -lclutter-gst-3.0 - -lcogl - -lcogl-pango - -lcogl-path - -lgio-2.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgstbase-1.0 - -lgstreamer-1.0 - -lgstvideo-1.0 - -lintl - -ljson-glib-1.0 - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/clutter-gtk.rb b/Formula/clutter-gtk.rb deleted file mode 100644 index 18d163d6c9512..0000000000000 --- a/Formula/clutter-gtk.rb +++ /dev/null @@ -1,114 +0,0 @@ -class ClutterGtk < Formula - desc "GTK+ integration library for Clutter" - homepage "https://wiki.gnome.org/Projects/Clutter" - url "https://download.gnome.org/sources/clutter-gtk/1.8/clutter-gtk-1.8.4.tar.xz" - sha256 "521493ec038973c77edcb8bc5eac23eed41645117894aaee7300b2487cb42b06" - revision 1 - - bottle do - sha256 "6e59404c7b4172bfb03b701bd7090dd3c9e917a1f3013e5669a05704369add8a" => :mojave - sha256 "20e4d6eafb36559b56406f5e26e8989d7d636945cabe9f6d4aa29a1661e46500" => :high_sierra - sha256 "2b0b873bc1f679f76216ee07ebc79fa0dffb8a0be3f7239868141f342e2a700e" => :sierra - sha256 "ce3e5e2f2a6107b17b521812fe7ab985e8d6e1cf57b8a3aa84a19cb760809e16" => :el_capitan - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "clutter" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "gtk+3" - - def install - args = %W[ - --disable-dependency-tracking - --disable-debug - --prefix=#{prefix} - --enable-introspection=yes - --disable-silent-rules - --disable-gtk-doc-html - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GOptionGroup *group = gtk_clutter_get_option_group(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - clutter = Formula["clutter"] - cogl = Formula["cogl"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gtkx3 = Formula["gtk+3"] - json_glib = Formula["json-glib"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{clutter.opt_include}/clutter-1.0 - -I#{cogl.opt_include}/cogl - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/gio-unix-2.0/ - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{include}/clutter-gtk-1.0 - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{clutter.opt_lib} - -L#{cogl.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gtkx3.opt_lib} - -L#{json_glib.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lclutter-1.0 - -lclutter-gtk-1.0 - -lcogl - -lcogl-pango - -lcogl-path - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgtk-3 - -lintl - -ljson-glib-1.0 - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/clutter.rb b/Formula/clutter.rb deleted file mode 100644 index 21246b4f348d5..0000000000000 --- a/Formula/clutter.rb +++ /dev/null @@ -1,106 +0,0 @@ -class Clutter < Formula - desc "Generic high-level canvas library" - homepage "https://wiki.gnome.org/Projects/Clutter" - url "https://download.gnome.org/sources/clutter/1.26/clutter-1.26.2.tar.xz" - sha256 "e7233314983055e9018f94f56882e29e7fc34d8d35de030789fdcd9b2d0e2e56" - revision 1 - - bottle do - sha256 "87e40791a3825261a8b37eb2e159f0b32bbd9be6aacb3bb288df0b39b1c4d1b1" => :mojave - sha256 "cd1bad834964168854f060603548fb495a629cbf98a119050cb1ff2a4ef41b67" => :high_sierra - sha256 "feebbe98a8c3cc1ad25202719451b4e9db64c145583ea1bd3b0d540e23cc8bf6" => :sierra - sha256 "fe6f945a3aac285dd0f21d1bdf0e4da08ac179c7cde03198af98c69166ccce6e" => :el_capitan - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "atk" - depends_on "cairo" # for cairo-gobject - depends_on "cogl" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "json-glib" - depends_on "pango" - - def install - args = %W[ - --disable-dependency-tracking - --disable-debug - --prefix=#{prefix} - --enable-introspection=yes - --disable-silent-rules - --disable-Bsymbolic - --disable-examples - --disable-gtk-doc-html - --enable-gdk-pixbuf=yes - --without-x --enable-x11-backend=no - --enable-quartz-backend=yes - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GOptionGroup *group = clutter_get_option_group_without_init(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - cogl = Formula["cogl"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gettext = Formula["gettext"] - glib = Formula["glib"] - json_glib = Formula["json-glib"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{cogl.opt_include}/cogl - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/clutter-1.0 - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{cogl.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{json_glib.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lclutter-1.0 - -lcogl - -lcogl-pango - -lcogl-path - -lgio-2.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lintl - -ljson-glib-1.0 - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/cmake.rb b/Formula/cmake.rb deleted file mode 100644 index 1d17d346bbaf2..0000000000000 --- a/Formula/cmake.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Cmake < Formula - desc "Cross-platform make" - homepage "https://www.cmake.org/" - url "https://github.com/Kitware/CMake/releases/download/v3.13.2/cmake-3.13.2.tar.gz" - sha256 "c925e7d2c5ba511a69f43543ed7b4182a7d446c274c7480d0e42cd933076ae25" - head "https://cmake.org/cmake.git" - - bottle do - cellar :any_skip_relocation - sha256 "6ef34cdd1596e3db55071cf0a88a943ef99f2b466e1a34ead5756da7bf22db58" => :mojave - sha256 "ac6cf789fde63484d649116a13874671d5dbb5608c7f51b0c06c98539a194e06" => :high_sierra - sha256 "57333ced72341ebd56f68cfdf52eb7b1b4c63d9948c71c8846ee20b4dc63174d" => :sierra - end - - depends_on "sphinx-doc" => :build - - # The completions were removed because of problems with system bash - - # The `with-qt` GUI option was removed due to circular dependencies if - # CMake is built with Qt support and Qt is built with MySQL support as MySQL uses CMake. - # For the GUI application please instead use `brew cask install cmake`. - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - # Avoid the following compiler error: - # SecKeychain.h:102:46: error: shift expression '(1853123693 << 8)' overflows - ENV.append_to_cflags "-fpermissive" if MacOS.version <= :lion - - args = %W[ - --prefix=#{prefix} - --no-system-libs - --parallel=#{ENV.make_jobs} - --datadir=/share/cmake - --docdir=/share/doc/cmake - --mandir=/share/man - --sphinx-build=#{Formula["sphinx-doc"].opt_bin}/sphinx-build - --sphinx-html - --sphinx-man - --system-zlib - --system-bzip2 - --system-curl - ] - - # There is an existing issue around macOS & Python locale setting - # See https://bugs.python.org/issue18378#msg215215 for explanation - ENV["LC_ALL"] = "en_US.UTF-8" - - system "./bootstrap", *args, "--", "-DCMAKE_BUILD_TYPE=Release" - system "make" - system "make", "install" - - elisp.install "Auxiliary/cmake-mode.el" - end - - test do - (testpath/"CMakeLists.txt").write("find_package(Ruby)") - system bin/"cmake", "." - end -end diff --git a/Formula/cmark-gfm.rb b/Formula/cmark-gfm.rb deleted file mode 100644 index 8c91c1298783a..0000000000000 --- a/Formula/cmark-gfm.rb +++ /dev/null @@ -1,33 +0,0 @@ -class CmarkGfm < Formula - desc "C implementation of GitHub Flavored Markdown" - homepage "https://github.com/github/cmark-gfm" - url "https://github.com/github/cmark-gfm/archive/0.28.3.gfm.19.tar.gz" - version "0.28.3.gfm.19" - sha256 "d2c8cb255e227d07533a32cfd4a052e189f697e2a9681d8b17d15654259e2e4b" - - bottle do - cellar :any - sha256 "9dc3b3299af2f9b6c296b5274072a4fc4bdb4e03ef128b15c67b8a4d8276b87f" => :mojave - sha256 "c9c688f80020c67d59047cb9b1d8d1b668c8ebc615d9c1ac3043b3afc4a26420" => :high_sierra - sha256 "d809dd43688fdaa9abc423540bf0702a00304a4de01a7e0af90ea682aefd2ab5" => :sierra - end - - depends_on "cmake" => :build - depends_on "python" => :build - - conflicts_with "cmark", :because => "both install a `cmark.h` header" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "test" - system "make", "install" - end - end - - test do - output = pipe_output("#{bin}/cmark-gfm --extension autolink", "https://brew.sh") - assert_equal '

https://brew.sh

', output.chomp - end -end diff --git a/Formula/cmark.rb b/Formula/cmark.rb deleted file mode 100644 index 5b81d3cc05ad6..0000000000000 --- a/Formula/cmark.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Cmark < Formula - desc "Strongly specified, highly compatible implementation of Markdown" - homepage "https://commonmark.org/" - url "https://github.com/commonmark/cmark/archive/0.28.3.tar.gz" - sha256 "acc98685d3c1b515ff787ac7c994188dadaf28a2d700c10c1221da4199bae1fc" - - bottle do - cellar :any - sha256 "71124568c50ed9e71eeab7ae42efcb0c2bba219f0dfa1d28754266399409ed92" => :mojave - sha256 "c0999bf5cc1d453259d34c1c2332572cf6cf07ff848021257529bb4be98def00" => :high_sierra - sha256 "15f85443980a06a2faed8de4b3165a8e6830d15a6adb90689bd1f1faa6fb8f3c" => :sierra - sha256 "5b24b8685ed9a8912cdc8479ebccd12027bed33b02554980c0e6588cbccb581c" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "python" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DCMAKE_INSTALL_LIBDIR=lib", *std_cmake_args - system "make" - system "make", "test" - system "make", "install" - end - end - - test do - output = pipe_output("#{bin}/cmark", "*hello, world*") - assert_equal "

hello, world

", output.chomp - end -end diff --git a/Formula/cmatrix.rb b/Formula/cmatrix.rb deleted file mode 100644 index 7db22f4b3635d..0000000000000 --- a/Formula/cmatrix.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Cmatrix < Formula - desc "Console Matrix" - homepage "https://www.asty.org/cmatrix/" - url "https://www.asty.org/cmatrix/dist/cmatrix-1.2a.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/c/cmatrix/cmatrix_1.2a.orig.tar.gz" - sha256 "1fa6e6caea254b6fe70a492efddc1b40ad7ccb950a5adfd80df75b640577064c" - - bottle do - cellar :any_skip_relocation - sha256 "6ae9acaacb6023d2837e2cbf5f7b09acd65035771f61e3c75efc58a4cbcf7dd7" => :mojave - sha256 "f5969f9baee33db8614d7fa1b54f3d923474b8516deb7f8d77f31160be174af2" => :high_sierra - sha256 "ae46840a9d0e08909665694d161a3a8e0962a5936c523812057dc39d61eda8fd" => :sierra - sha256 "da919a1964d6ef0633eac14bd7138ab91f6676d4dfc36fd5e27f956943714d22" => :el_capitan - sha256 "14ae5c06eac81783ee61e3547d9de174f6742c688a254e172d7c2e566f14b426" => :yosemite - sha256 "8479d25ddc608462c974bbc1a9fb229f6ffa99d19368fcd43f667bc6a6d8493f" => :mavericks - sha256 "49e2833e6d6967528475c3124f4b2927b7169030704d63811b34d20a01ea79e3" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/cmatrix", "-V" - end -end diff --git a/Formula/cmdshelf.rb b/Formula/cmdshelf.rb deleted file mode 100644 index 5e88c3fd7b916..0000000000000 --- a/Formula/cmdshelf.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Cmdshelf < Formula - desc "Better scripting life with cmdshelf" - homepage "https://github.com/toshi0383/cmdshelf" - url "https://github.com/toshi0383/cmdshelf/archive/2.0.2.tar.gz" - sha256 "dea2ea567cfa67196664629ceda5bc775040b472c25e96944c19c74892d69539" - - bottle do - sha256 "a36461b526e0a974d0f0245b2a197e35413db272db06b819b2e5b7bbbce0200c" => :mojave - sha256 "3164b78efb9862ea0171b1d88e43fe96d6f01119de756b7a661191f918047b76" => :high_sierra - sha256 "50af031ee7ce0ae0eefd79801c30530b7fb7cdf65adf56f6c015e6fce6a2b01b" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - man.install Dir["docs/man/*"] - bash_completion.install "cmdshelf-completion.bash" - end - - test do - system "#{bin}/cmdshelf", "remote", "add", "test", "git@github.com:toshi0383/scripts.git" - list_output = shell_output("#{bin}/cmdshelf remote list").chomp - assert_equal "test:git@github.com:toshi0383/scripts.git", list_output - end -end diff --git a/Formula/cmigemo.rb b/Formula/cmigemo.rb deleted file mode 100644 index 1fd097c0cca1d..0000000000000 --- a/Formula/cmigemo.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Cmigemo < Formula - desc "Migemo is a tool that supports Japanese incremental search with Romaji" - homepage "https://www.kaoriya.net/software/cmigemo" - head "https://github.com/koron/cmigemo.git" - - stable do - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cmigemo/cmigemo-default-src-20110227.zip" - sha256 "4aa759b2e055ef3c3fbeb9e92f7f0aacc1fd1f8602fdd2f122719793ee14414c" - - # Patch per discussion at: https://github.com/Homebrew/legacy-homebrew/pull/7005 - patch :DATA - end - bottle do - cellar :any - sha256 "28db47c1cedcff4dc6ee2d48bd07a147ae18f400e035e6a583d6b8e6cb36dfa1" => :mojave - sha256 "a56e9422e30145d388649e9c85bf814adb58688c2c5e374385f4260b8daa049a" => :high_sierra - sha256 "612544771bde1676044d35e8cb1f64134788580b76c59ced3b651e8996d46b51" => :sierra - sha256 "866dfa4f493c088c1b2eb3cff23ed04e33862f7bc5dcff0976ce5b7cb4835dd2" => :el_capitan - sha256 "4ab378bb5f5d2462a6043d9226aade8b87974b52a7fec8a24e3814f93ac936f6" => :yosemite - sha256 "f4b8738e34c2b8b7d8489c70a6e15e1634e9d2b0f20b2180be4dd6d43eca6c4a" => :mavericks - end - - depends_on "nkf" => :build - - def install - chmod 0755, "./configure" - system "./configure", "--prefix=#{prefix}" - system "make", "osx" - system "make", "osx-dict" - system "make", "-C", "dict", "utf-8" if build.stable? - ENV.deparallelize # Install can fail on multi-core machines unless serialized - system "make", "osx-install" - end - - def caveats; <<~EOS - See also https://github.com/emacs-jp/migemo to use cmigemo with Emacs. - You will have to save as migemo.el and put it in your load-path. - EOS - end -end - -__END__ ---- a/src/wordbuf.c 2011-08-15 02:57:05.000000000 +0900 -+++ b/src/wordbuf.c 2011-08-15 02:57:17.000000000 +0900 -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include "wordbuf.h" - - #define WORDLEN_DEF 64 diff --git a/Formula/cminpack.rb b/Formula/cminpack.rb deleted file mode 100644 index 6b4b4bb714429..0000000000000 --- a/Formula/cminpack.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Cminpack < Formula - desc "Solves nonlinear equations and nonlinear least squares problems" - homepage "http://devernay.free.fr/hacks/cminpack/cminpack.html" - url "https://github.com/devernay/cminpack/archive/v1.3.6.tar.gz" - sha256 "3c07fd21308c96477a2c900032e21d937739c233ee273b4347a0d4a84a32d09f" - head "https://github.com/devernay/cminpack.git" - - bottle do - cellar :any - sha256 "414aa14e16da767cfb9559b5293f1bb46ca1e3c326905611e69fe59bd3e415d3" => :mojave - sha256 "32a6b48cfe87b229bb1529a7c895762a5f3fa50b30703260ccca724c6af72a2a" => :high_sierra - sha256 "16664c7714c7e4337d453cc709dcee658662b7b61735608a278d81314557a08f" => :sierra - sha256 "ea2b1e1a4d1323e47df94c5fff2b66a8d3ecd2800f5f1dab788994e37192c628" => :el_capitan - sha256 "83b0004c7f4a707f51ee402f9d99f85f3c2d7f865c33f96f0a7ee85abfdb8ec1" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - - man3.install Dir["doc/*.3"] - doc.install Dir["doc/*"] - pkgshare.install "examples" - end - - test do - cp pkgshare/"examples/thybrdc.c", testpath - system ENV.cc, pkgshare/"examples/thybrdc.c", "-o", "test", - "-I#{include}/cminpack-1", "-L#{lib}", "-lcminpack", "-lm" - assert_match "number of function evaluations", shell_output("./test") - end -end diff --git a/Formula/cmocka.rb b/Formula/cmocka.rb deleted file mode 100644 index 81c4260ce6e3d..0000000000000 --- a/Formula/cmocka.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Cmocka < Formula - desc "Unit testing framework for C" - homepage "https://cmocka.org/" - url "https://cmocka.org/files/1.1/cmocka-1.1.3.tar.xz" - sha256 "43eabcf72a9c80e3d03f7c8a1c04e408c18d2db5121eb058a3ef732a9dfabfaf" - head "https://git.cryptomilk.org/projects/cmocka.git" - - bottle do - cellar :any - sha256 "4f2dda00b968d99edbd3bd2aa3143ea7dd2ff37972f7e607cb4063ac059684c6" => :mojave - sha256 "d304c4817bc9efe26cf406ce282ded888b4364be6d0752ddb3012542ae384a52" => :high_sierra - sha256 "d888978c74742f86fee309289e99b9eaa379cf5c9c2692ad668021e5fa3213a4" => :sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args - args << "-DWITH_STATIC_LIB=ON" << "-DWITH_CMOCKERY_SUPPORT=ON" << "-DUNIT_TESTING=ON" - if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" - end - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - - static void null_test_success(void **state) { - (void) state; /* unused */ - } - - int main(void) { - const struct CMUnitTest tests[] = { - cmocka_unit_test(null_test_success), - }; - return cmocka_run_group_tests(tests, NULL, NULL); - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcmocka", "-o", "test" - system "./test" - end -end diff --git a/Formula/cmockery.rb b/Formula/cmockery.rb deleted file mode 100644 index cef9176cfa4ee..0000000000000 --- a/Formula/cmockery.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Cmockery < Formula - desc "Unit testing and mocking library for C" - homepage "https://github.com/google/cmockery" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/cmockery/cmockery-0.1.2.tar.gz" - sha256 "b9e04bfbeb45ceee9b6107aa5db671c53683a992082ed2828295e83dc84a8486" - - bottle do - cellar :any - sha256 "d239e243454b5bac5d0bab915ff506199c97bd27bf188c0938911c5c091af020" => :mojave - sha256 "8ee7bb6453fae2cdfc129f6aad3ac9a8766a396ec7df9d38444f6b688697c3ea" => :high_sierra - sha256 "f3b1c3d5c96ea9e30dc008e557239e972a18e65b3dd1ee8a593a0eb6e11d7858" => :sierra - sha256 "6cc440503b2fce7def7d584aacf8e9142ad430de799b466f609f57fd9beb4ede" => :el_capitan - sha256 "a6ac86af8d5b7f5964a480cc91bfbdaf260c59eae2c4b79663ebab2dfdb7d062" => :yosemite - sha256 "673662bebae6bc4e43b60137ebad7141af0eeecffa41f4e7c61065b0f2262d25" => :mavericks - end - - # This patch will be integrated upstream in 0.1.3, this is due to malloc.h being already in stdlib on OSX - # It is safe to remove it on the next version - # More info on https://code.google.com/p/cmockery/issues/detail?id=3 - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -diff -uNr cmockery-0.1.2.orig/src/cmockery.c cmockery-0.1.2/src/cmockery.c ---- cmockery-0.1.2.orig/src/cmockery.c 2008-08-29 19:55:53.000000000 -0600 -+++ cmockery-0.1.2/src/cmockery.c 2009-05-31 15:29:25.000000000 -0600 -@@ -13,7 +13,12 @@ - * See the License for the specific language governing permissions and - * limitations under the License. - */ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+#ifdef HAVE_MALLOC_H - #include -+#endif - #include - #ifndef _WIN32 - #include -diff -uNr cmockery-0.1.2.orig/src/example/allocate_module.c cmockery-0.1.2/src/example/allocate_module.c ---- cmockery-0.1.2.orig/src/example/allocate_module.c 2008-08-29 16:23:29.000000000 -0600 -+++ cmockery-0.1.2/src/example/allocate_module.c 2009-05-31 15:29:48.000000000 -0600 -@@ -13,7 +13,13 @@ - * See the License for the specific language governing permissions and - * limitations under the License. - */ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+#ifdef HAVE_MALLOC_H - #include -+#endif -+#include - - #if UNIT_TESTING - extern void* _test_malloc(const size_t size, const char* file, const int line); -diff -uNr cmockery-0.1.2.orig/src/example/calculator.c cmockery-0.1.2/src/example/calculator.c ---- cmockery-0.1.2.orig/src/example/calculator.c 2008-08-29 16:23:29.000000000 -0600 -+++ cmockery-0.1.2/src/example/calculator.c 2009-05-31 15:30:08.000000000 -0600 -@@ -16,8 +16,13 @@ - - // A calculator example used to demonstrate the cmockery testing library. - -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif - #include -+#ifdef HAVE_MALLOC_H - #include -+#endif - #include - #include - #include diff --git a/Formula/cmockery2.rb b/Formula/cmockery2.rb deleted file mode 100644 index 148b96f8772e7..0000000000000 --- a/Formula/cmockery2.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Cmockery2 < Formula - desc "Reviving cmockery unit test framework from Google" - homepage "https://github.com/lpabon/cmockery2" - url "https://github.com/lpabon/cmockery2/archive/v1.3.9.tar.gz" - sha256 "c38054768712351102024afdff037143b4392e1e313bdabb9380cab554f9dbf2" - head "https://github.com/lpabon/cmockery2.git" - - bottle do - cellar :any - sha256 "a36cbb449fcca235226fcfa94439f2370f22d3d6f1986c710c1e640959f8a271" => :mojave - sha256 "3651caa0ed8c5e2ec5dc0fe8932a53e20c2af28d3887161d1cdfe9c46fb9f220" => :high_sierra - sha256 "661b4a8751a4dbe7e52b19cd9452d8b7dd61c929d73da27ac4fca5623a0dff6c" => :sierra - sha256 "61b64aeaf89d205742bbb254148502cd2df83bcf05d20377bdce8637f275bee5" => :el_capitan - sha256 "ea94ba8420bd5bc01412b52ce9c03b392b933f279d1bce7a8ff8f7502bc83f88" => :yosemite - sha256 "ce0cc1a3151655d4bb970ca92c87c5ebb5ed660c3c445e763edc4b835ca7e9a6" => :mavericks - sha256 "c7fbc1a75a2c4c517cea269fdd9567c6ebd74d6917624e4d084932edf13bb77b" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - (share+"example").install "src/example/calculator.c" - end - - test do - system ENV.cc, share+"example/calculator.c", "-L#{lib}", "-lcmockery", "-o", "calculator" - system "./calculator" - end -end diff --git a/Formula/cmu-pocketsphinx.rb b/Formula/cmu-pocketsphinx.rb deleted file mode 100644 index aee29c9a4e6aa..0000000000000 --- a/Formula/cmu-pocketsphinx.rb +++ /dev/null @@ -1,37 +0,0 @@ -class CmuPocketsphinx < Formula - desc "Lightweight speech recognition engine for mobile devices" - homepage "https://cmusphinx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cmusphinx/pocketsphinx/0.8/pocketsphinx-0.8.tar.gz" - sha256 "874c4c083d91c8ff26a2aec250b689e537912ff728923c141c4dac48662cce7a" - - bottle do - sha256 "cc655d82bfce35b2976e4dd0867fceb02b233363e7e101c62b09e60e2be9f8bb" => :mojave - sha256 "628d162751962337c769090867c3f9921d10b09f704f8f208b63abbefef205eb" => :high_sierra - sha256 "12abc8b527906e7ed0d2f6f0a6b6cb5c00f548fe94fcce995bdc80f43b4cf17b" => :sierra - sha256 "2f1f4738dbcf7641a530b82c4dc6447ecadb5f9b60cd2484c33c379efb5c46e5" => :el_capitan - sha256 "dea4e6a8e131f68c94a6b9fb783a0445476354a90629001d5007fe3b4e5247bd" => :yosemite - sha256 "9d49cd11915d906db23021eeaed8bed1ee5e565eaad03a1a96cbb03448ae6867" => :mavericks - end - - head do - url "https://github.com/cmusphinx/pocketsphinx.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "swig" => :build - end - - depends_on "pkg-config" => :build - depends_on "cmu-sphinxbase" - - def install - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/cmu-sphinxbase.rb b/Formula/cmu-sphinxbase.rb deleted file mode 100644 index ba8b8c9836d96..0000000000000 --- a/Formula/cmu-sphinxbase.rb +++ /dev/null @@ -1,57 +0,0 @@ -class CmuSphinxbase < Formula - desc "Lightweight speech recognition engine for mobile devices" - homepage "https://cmusphinx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cmusphinx/sphinxbase/0.8/sphinxbase-0.8.tar.gz" - sha256 "55708944872bab1015b8ae07b379bf463764f469163a8fd114cbb16c5e486ca8" - - bottle do - cellar :any - rebuild 1 - sha256 "b55c9f16e8b89fc515d9bf8bd6ed91f532d0c82a46be01cd9792bb27076a6a51" => :mojave - sha256 "2ebde8d649a3e78c3e219c83e1f12e6cee924f5404b0d68e8fe7d220c8dad0f5" => :high_sierra - sha256 "fde603304716876e192bef822f8df21c26e09688d43580d3f9a61c78e03dbbb0" => :sierra - end - - head do - url "https://github.com/cmusphinx/sphinxbase.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "swig" => :build - end - - depends_on "pkg-config" => :build - # If these are found, they will be linked against and there is no configure - # switch to turn them off. - depends_on "libsamplerate" - depends_on "libsndfile" - - def install - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "cmd_ln.h" - - int main(int argc, char **argv) { - cmd_ln_t *config = NULL; - - config = cmd_ln_init(NULL, NULL, TRUE, - "-hello", "world", NULL); - cmd_ln_free_r(config); - return 0; - } - EOS - system ENV.cxx, "-L#{lib}", "-lsphinxbase", "-I#{include}/sphinxbase", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/cmuclmtk.rb b/Formula/cmuclmtk.rb deleted file mode 100644 index bb586383df411..0000000000000 --- a/Formula/cmuclmtk.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Cmuclmtk < Formula - desc "Language model tools (from CMU Sphinx)" - homepage "https://cmusphinx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cmusphinx/cmuclmtk/0.7/cmuclmtk-0.7.tar.gz" - sha256 "d23e47f00224667c059d69ac942f15dc3d4c3dd40e827318a6213699b7fa2915" - - bottle do - cellar :any - sha256 "5c71a1746a8ca516dc5d11858a7d0d85341cafeea31797b926eba3a9ed83d9ea" => :mojave - sha256 "85a6d2a8fcad4e2b6e7d9d22ec74dd5e5f463dabc5b2f01373d3a48178b2ce6e" => :high_sierra - sha256 "716c78af6b276392a20fb02d58ff60e705509117da932d62d3ff8c6e4dd0bf5d" => :sierra - sha256 "c647327d709c3b4a93d5541f8b340d2726540c9efdcbc53d1124043c8c4989bd" => :el_capitan - sha256 "320a3590af1e9a1bee6827eb71e4d91fb283952f178b7f0393406a120046d4ee" => :yosemite - sha256 "37703a65f22b994f724e54ebcf19ab8204b6d7a27e17d176af13440f611642a3" => :mavericks - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/cmus.rb b/Formula/cmus.rb deleted file mode 100644 index 7f8be852918b3..0000000000000 --- a/Formula/cmus.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Cmus < Formula - desc "Music player with an ncurses based interface" - homepage "https://cmus.github.io/" - url "https://github.com/cmus/cmus/archive/v2.7.1.tar.gz" - sha256 "8179a7a843d257ddb585f4c65599844bc0e516fe85e97f6f87a7ceade4eb5165" - revision 2 - head "https://github.com/cmus/cmus.git" - - bottle do - sha256 "2242cd0ccda51a15e634040efbc2928df30602884c28aee5e5e22f2820f46f9d" => :mojave - sha256 "7bd5e8f8d29efe7840caefc7f455a8e61bf02b467991a133a0b76cf89e8584fe" => :high_sierra - sha256 "48171d7e6cd31ec1451a14c1c5275249f872c68c493910b39b1fa1d49eda04ad" => :sierra - sha256 "deeed1d9ef93f0a8263b18a08239cab7a22983afe4278310f9944b79ab3df560" => :el_capitan - sha256 "150534ed291aeb39a6c1a84a6efa6f1e4b518c0e3eae4e18efac9a5496e826af" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "faad2" - depends_on "flac" - depends_on "libao" - depends_on "libcue" - depends_on "libogg" - depends_on "libvorbis" - depends_on "mad" - depends_on "mp4v2" - depends_on "ffmpeg" => :optional - depends_on "jack" => :optional - depends_on "opusfile" => :optional - - def install - system "./configure", "prefix=#{prefix}", "mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/cmus", "--plugins" - end -end diff --git a/Formula/cnats.rb b/Formula/cnats.rb deleted file mode 100644 index 355de03aec336..0000000000000 --- a/Formula/cnats.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Cnats < Formula - desc "C client for the NATS messaging system" - homepage "https://github.com/nats-io/cnats" - url "https://github.com/nats-io/cnats/archive/v1.8.0.tar.gz" - sha256 "aea6b1266ff7f169caeaa0f2b5efaf6081256a9ec17c38de417fdde36dddc4fd" - - bottle do - cellar :any - sha256 "32c955ee1bc0a09b634422a54b210091155dd5a9c3328dcc0279f5c719fc3c75" => :mojave - sha256 "55a68b75889ad00cfdceeefc319b9fcf1f48d27becc17ee94f2c2bcfe08324f1" => :high_sierra - sha256 "ca720f973960eab911465daf560eed2bc7e65ab40d2f106b23fe46060b82c3cc" => :sierra - end - - depends_on "cmake" => :build - depends_on "libevent" - depends_on "libuv" - depends_on "openssl" - - def install - system "cmake", ".", "-DNATS_INSTALL_PREFIX=#{prefix}", - "-DBUILD_TESTING=OFF", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - printf("%s\\n", nats_GetVersion()); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lnats", "-o", "test" - assert_equal version, shell_output("./test").strip - end -end diff --git a/Formula/cntlm.rb b/Formula/cntlm.rb deleted file mode 100644 index 7ee0dd8ef43f1..0000000000000 --- a/Formula/cntlm.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Cntlm < Formula - desc "NTLM authentication proxy with tunneling" - homepage "https://cntlm.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cntlm/cntlm/cntlm%200.92.3/cntlm-0.92.3.tar.bz2" - sha256 "7b603d6200ab0b26034e9e200fab949cc0a8e5fdd4df2c80b8fc5b1c37e7b930" - - bottle do - rebuild 1 - sha256 "fe1829953a68060bd18b9ba151ad7a1d82c401a80787f391970f87dd2b960d81" => :mojave - sha256 "97bf4da991ae873495d574675c4bca87dd184322ff6855818d19d6ef4eb28a0d" => :high_sierra - sha256 "aee92f33d388d2c759c9ff881ebc1c9da35b2295d4050e489ebd72f48401a163" => :sierra - sha256 "e41938ee125ee2ac25f72833b79f2c6326f421ac54f2bcf1ec46de6ebf59fa44" => :el_capitan - end - - def install - system "./configure" - system "make", "CC=#{ENV.cc}", "SYSCONFDIR=#{etc}" - # install target fails - @adamv - bin.install "cntlm" - man1.install "doc/cntlm.1" - etc.install "doc/cntlm.conf" - end - - def caveats - "Edit #{etc}/cntlm.conf to configure Cntlm" - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cntlm - -f - - KeepAlive - - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end -end diff --git a/Formula/coccinelle.rb b/Formula/coccinelle.rb deleted file mode 100644 index a7ca84e973b0f..0000000000000 --- a/Formula/coccinelle.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Coccinelle < Formula - desc "Program matching and transformation engine for C code" - homepage "http://coccinelle.lip6.fr/" - url "http://coccinelle.lip6.fr/distrib/coccinelle-1.0.6.tgz" - sha256 "8452ed265c209dae99cbb33b67bc7912e72f8bca1e24f33f1a88ba3d7985e909" - revision 1 - - bottle do - rebuild 1 - sha256 "ee482fedbe053e43b24930b0fd568db3c94f1179b6ce796c6445a75f13dad858" => :high_sierra - sha256 "00da6a22f987eb816c239e5852a423fdccf8c077143358eb623d4cf933ce0a7d" => :sierra - sha256 "96f2460057f45cc77e03c1980edff643cdc26a2d2cced838567c798d3ee89748" => :el_capitan - end - - depends_on "hevea" => :build - depends_on "opam" => :build - depends_on "camlp4" - depends_on "ocaml" - - def install - ENV["OCAMLPARAM"] = "safe-string=0,_" # OCaml 4.06.0 compat - - opamroot = buildpath/"opamroot" - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - system "opam", "init", "--no-setup" - system "opam", "install", "ocamlfind" - system "./configure", "--disable-dependency-tracking", - "--enable-release", - "--enable-ocaml", - "--enable-opt", - "--enable-ocaml", - "--with-pdflatex=no", - "--prefix=#{prefix}" - system "opam", "config", "exec", "--", "make" - system "make", "install" - - pkgshare.install "demos/simple.cocci", "demos/simple.c" - end - - test do - system "#{bin}/spatch", "-sp_file", "#{pkgshare}/simple.cocci", - "#{pkgshare}/simple.c", "-o", "new_simple.c" - expected = <<~EOS - int main(int i) { - f("ca va", 3); - f(g("ca va pas"), 3); - } - EOS - assert_equal expected, (testpath/"new_simple.c").read - end -end diff --git a/Formula/cockroach.rb b/Formula/cockroach.rb deleted file mode 100644 index bae9e969b5c53..0000000000000 --- a/Formula/cockroach.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Cockroach < Formula - desc "Distributed SQL database" - homepage "https://www.cockroachlabs.com" - url "https://binaries.cockroachdb.com/cockroach-v2.1.3.src.tgz" - version "2.1.3" - sha256 "16d851a131e17002af04ad56e4adfec8182bf5ec55496ef2fcefe0461e16933e" - head "https://github.com/cockroachdb/cockroach.git" - - bottle do - cellar :any_skip_relocation - sha256 "d7c3a0f504755d798464727c872ab82dcf177ae90c786c24c14c7a177b535e51" => :mojave - sha256 "92c64365d3fb1495bb10b78dfe8f9b4fca5d9b62e56eed5c4ead582ac53c6120" => :high_sierra - sha256 "f9944ae962f012b3cc5225807e40cfd54be5f515907c18c6f48767ccb466c819" => :sierra - end - - depends_on "autoconf" => :build - depends_on "cmake" => :build - depends_on "go" => :build - depends_on "make" => :build - depends_on "xz" => :build - - def install - # The GNU Make that ships with macOS Mojave (v3.81 at the time of writing) has a bug - # that causes it to loop infinitely when trying to build cockroach. Use - # the more up-to-date make that Homebrew provides. - ENV.prepend_path "PATH", Formula["make"].opt_libexec/"gnubin" - # Build only the OSS components - system "make", "buildoss" - system "make", "install", "prefix=#{prefix}", "BUILDTYPE=release" - end - - def caveats; <<~EOS - For local development only, this formula ships a launchd configuration to - start a single-node cluster that stores its data under: - #{var}/cockroach/ - Instead of the default port of 8080, the node serves its admin UI at: - #{Formatter.url("http://localhost:26256")} - - Do NOT use this cluster to store data you care about; it runs in insecure - mode and may expose data publicly in e.g. a DNS rebinding attack. To run - CockroachDB securely, please see: - #{Formatter.url("https://www.cockroachlabs.com/docs/secure-a-cluster.html")} - EOS - end - - plist_options :manual => "cockroach start --insecure" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cockroach - start - --store=#{var}/cockroach/ - --http-port=26256 - --insecure - --host=localhost - - WorkingDirectory - #{var} - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - begin - # Redirect stdout and stderr to a file, or else `brew test --verbose` - # will hang forever as it waits for stdout and stderr to close. - system "#{bin}/cockroach start --insecure --background &> start.out" - pipe_output("#{bin}/cockroach sql --insecure", <<~EOS) - CREATE DATABASE bank; - CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL); - INSERT INTO bank.accounts VALUES (1, 1000.50); - EOS - output = pipe_output("#{bin}/cockroach sql --insecure --format=csv", - "SELECT * FROM bank.accounts;") - assert_equal <<~EOS, output - id,balance - 1,1000.50 - EOS - ensure - system "#{bin}/cockroach", "quit", "--insecure" - end - end -end diff --git a/Formula/cocoapods.rb b/Formula/cocoapods.rb deleted file mode 100644 index 7835ee43c9454..0000000000000 --- a/Formula/cocoapods.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cocoapods < Formula - desc "Dependency manager for Cocoa projects" - homepage "https://cocoapods.org/" - url "https://github.com/CocoaPods/CocoaPods/archive/1.5.3.tar.gz" - sha256 "04593483efe1279c93cfc2bf25866a6e1a3d0c49c0c10602b060611c1e8b5e20" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "5e0fa01f44b64e0c230fa768cd211a86d0cf28c7415128cd46b162e90616a199" => :mojave - sha256 "e711a156660e3580237f315c2cfa38d5fd54d4211cc471f77de75c9db3f47321" => :high_sierra - sha256 "2c50c930d1680af39c7a4f21d2ef3714b04074aa6c3d586d4026925d7e30b452" => :sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - def install - ENV["GEM_HOME"] = libexec - system "gem", "build", "cocoapods.gemspec" - system "gem", "install", "cocoapods-#{version}.gem" - # Other executables don't work currently. - bin.install libexec/"bin/pod", libexec/"bin/xcodeproj" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - system "#{bin}/pod", "list" - end -end diff --git a/Formula/cocot.rb b/Formula/cocot.rb deleted file mode 100644 index 2d4fe8e9e46d2..0000000000000 --- a/Formula/cocot.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Cocot < Formula - desc "Code converter on tty" - homepage "https://vmi.jp/software/cygwin/cocot.html" - url "https://github.com/vmi/cocot/archive/cocot-1.2-20171118.tar.gz" - sha256 "b718630ce3ddf79624d7dcb625fc5a17944cbff0b76574d321fb80c61bb91e4c" - head "https://github.com/vmi/cocot.git" - - bottle do - cellar :any_skip_relocation - sha256 "c5b0aa39597693d037438bd0f411965754539aaf50fbb2cb3b2a61082b6f4178" => :mojave - sha256 "0070eb38e06043e3c1a4ad1b77205a6ed978ed300e8d0bb407391fecb191b050" => :high_sierra - sha256 "a91ba93032e33b6a062b82f2df0b9170d5269cf0312d75eb6f16341fca54f9bd" => :sierra - sha256 "60cbdadb074b019535319e5089d5c55c43b68e0b52a73b01cec3a9a8311e51a4" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/coda-cli.rb b/Formula/coda-cli.rb deleted file mode 100644 index 251e3bf4682dc..0000000000000 --- a/Formula/coda-cli.rb +++ /dev/null @@ -1,16 +0,0 @@ -class CodaCli < Formula - desc "Shell integration for Panic's Coda" - homepage "http://justinhileman.info/coda-cli/" - url "https://github.com/bobthecow/coda-cli/archive/v1.0.5.tar.gz" - sha256 "5ed407313a8d1fc6cc4d5b1acc14a80f7e6fad6146f2334de510e475955008b9" - - bottle :unneeded - - def install - bin.install "coda" - end - - test do - system "#{bin}/coda", "-h" - end -end diff --git a/Formula/codec2.rb b/Formula/codec2.rb deleted file mode 100644 index 1174b674e276f..0000000000000 --- a/Formula/codec2.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Codec2 < Formula - desc "Open source speech codec" - homepage "https://www.rowetel.com/?page_id=452" - # Linked from https://freedv.org/ - url "https://hobbes1069.fedorapeople.org/freetel/codec2/codec2-0.8.1.tar.xz" - sha256 "a07cdaacf59c3f7dbb1c63b769d443af486c434b3bd031fb4edd568ce3e613d6" - - bottle do - cellar :any - sha256 "92031b75a027390385864b1c2a4bde522da712162b7c6f8187a1b2adf74f8504" => :mojave - sha256 "37a6ae2407ae97ae632078020e89163e9b58d3613207bcf534401f6660128108" => :high_sierra - sha256 "d90f5373ac39385b8fffee0605afe2e27c195f44ef211f98d7b5d89c7200508d" => :sierra - sha256 "896b96db4b2d4349ca56dc0e4daaf2bebfc28908197c013aefe89d86fe57317c" => :el_capitan - end - - depends_on "cmake" => :build - - def install - mkdir "build_osx" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - # 8 bytes of raw audio data (silence). - (testpath/"test.raw").write([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].pack("C*")) - system "#{bin}/c2enc", "2400", "test.raw", "test.c2" - end -end diff --git a/Formula/codemod.rb b/Formula/codemod.rb deleted file mode 100644 index 436fbad47d27c..0000000000000 --- a/Formula/codemod.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Codemod < Formula - desc "Large-scale codebase refactors assistant tool" - homepage "https://github.com/facebook/codemod" - url "https://files.pythonhosted.org/packages/9b/e3/cb31bfcf14f976060ea7b7f34135ebc796cde65eba923f6a0c4b71f15cc2/codemod-1.0.0.tar.gz" - sha256 "06e8c75f2b45210dd8270e30a6a88ae464b39abd6d0cab58a3d7bfd1c094e588" - revision 1 - version_scheme 1 - head "https://github.com/facebook/codemod.git" - - bottle do - cellar :any_skip_relocation - sha256 "46a429f995bc5491ef76d75c3fd850aae40e5414ead2080361f06e69a39c79ec" => :mojave - sha256 "cbf4fa912e1a717b55992756b44d10e7eb8640cc541d255625cecb0e65c41377" => :high_sierra - sha256 "cbf4fa912e1a717b55992756b44d10e7eb8640cc541d255625cecb0e65c41377" => :sierra - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - # work around some codemod terminal bugs - ENV["TERM"] = "xterm" - ENV["LINES"] = "25" - ENV["COLUMNS"] = "80" - (testpath/"file1").write <<~EOS - foo - bar - potato - baz - EOS - (testpath/"file2").write <<~EOS - eeny potato meeny miny moe - EOS - system bin/"codemod", "--include-extensionless", "--accept-all", "potato", "pineapple" - assert_equal %w[foo bar pineapple baz], File.read("file1").lines.map(&:strip) - assert_equal ["eeny pineapple meeny miny moe"], File.read("file2").lines.map(&:strip) - end -end diff --git a/Formula/codequery.rb b/Formula/codequery.rb deleted file mode 100644 index 4ba1343b4b733..0000000000000 --- a/Formula/codequery.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Codequery < Formula - desc "Code-understanding, code-browsing or code-search tool" - homepage "https://github.com/ruben2020/codequery" - url "https://github.com/ruben2020/codequery/archive/v0.21.1.tar.gz" - sha256 "c20050dc6963472c7cb7ed4621c7187e24089fa458eb68748ef9d2aae53d991f" - - bottle do - cellar :any - sha256 "1765b7bf67fd6eaef6b4464bfe06a0ae467165acca5dd17e78d371165a5db91a" => :mojave - sha256 "fe67cc5adc84bb2558ad4e67c5b02bfba8b80f3a18bc036801e4c1e1d81c96eb" => :high_sierra - sha256 "21a673797bdc3ff9c7453930499e7e29e7f1320eb4dbddec67f7127dee34a989" => :sierra - sha256 "15e18f6bb87bd489b33f4322af5d6351e28ec805aef291d6c0df50d80fb7958d" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "qt" - - def install - args = std_cmake_args - args << "-DBUILD_QT5=ON" - - share.install "test" - mkdir "build" do - system "cmake", "..", "-G", "Unix Makefiles", *args - system "make" - system "make", "install" - end - end - - test do - # Copy test files as `cqmakedb` gets confused if we just symlink them. - test_files = (share/"test").children - cp test_files, testpath - - system "#{bin}/cqmakedb", "-s", "./codequery.db", - "-c", "./cscope.out", - "-t", "./tags", - "-p" - output = shell_output("#{bin}/cqsearch -s ./codequery.db -t info_platform") - assert_match "info_platform", output - end -end diff --git a/Formula/coffeescript.rb b/Formula/coffeescript.rb deleted file mode 100644 index 7bff1f2ab183a..0000000000000 --- a/Formula/coffeescript.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "language/node" - -class Coffeescript < Formula - desc "Unfancy JavaScript" - homepage "https://coffeescript.org/" - url "https://registry.npmjs.org/coffeescript/-/coffeescript-2.3.2.tgz" - sha256 "c74eb245cbd411eefc34d44bc2570b470682c434e029afac9ece0175db9faa5a" - head "https://github.com/jashkenas/coffeescript.git" - - bottle do - cellar :any_skip_relocation - sha256 "9a34ee70f2b0806edf10c621a777bcab5b674b6a2c3babb21a62637175b79052" => :mojave - sha256 "49da6599ee49ee6644fbb8cef4da0f333a36e5169b49882e151ea95c3e0288c5" => :high_sierra - sha256 "bbb0b28041b6aa10e4730d1cafa2e682438fb7384165651cf4b6ab72386fd669" => :sierra - sha256 "750778791fbd6e5896a10bacc345ca18bbb28e29abd270227f4bbfc73d7426c1" => :el_capitan - end - - depends_on "node" - - conflicts_with "cake", :because => "both install `cake` binaries" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.coffee").write <<~EOS - square = (x) -> x * x - list = [1, 2, 3, 4, 5] - - math = - root: Math.sqrt - square: square - cube: (x) -> x * square x - - cubes = (math.cube num for num in list) - EOS - - system bin/"coffee", "--compile", "test.coffee" - assert_predicate testpath/"test.js", :exist?, "test.js was not generated" - end -end diff --git a/Formula/cogl.rb b/Formula/cogl.rb deleted file mode 100644 index ee8306b736645..0000000000000 --- a/Formula/cogl.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Cogl < Formula - desc "Low level OpenGL abstraction library developed for Clutter" - homepage "https://developer.gnome.org/cogl/" - url "https://download.gnome.org/sources/cogl/1.22/cogl-1.22.2.tar.xz" - sha256 "39a718cdb64ea45225a7e94f88dddec1869ab37a21b339ad058a9d898782c00d" - revision 1 - - bottle do - sha256 "e8101f1075c0f7754670e94355b6adee2981cbc06f2cd06221e06009a730213f" => :mojave - sha256 "d5cf5821953809ef2d1cefbffec2f6e44a6eaa65ce377e867e938b03983f7125" => :high_sierra - sha256 "29ba6e0eea677529b8558de0fc4a81b0ca3c26a6a8c517b92d3108785476d206" => :sierra - sha256 "cb19f43f005213580caec8ef9bacb024df5839b0d5a2a337ec6c189340d78548" => :el_capitan - end - - head do - url "https://gitlab.gnome.org/GNOME/cogl.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "glib" - depends_on "gtk-doc" - depends_on "pango" - - # Lion's grep fails, which later results in compilation failures: - # libtool: link: /usr/bin/grep -E -e [really long regexp] ".libs/libcogl.exp" > ".libs/libcogl.expT" - # grep: Regular expression too big - if MacOS.version == :lion - resource "grep" do - url "https://ftp.gnu.org/gnu/grep/grep-2.20.tar.xz" - mirror "https://ftpmirror.gnu.org/grep/grep-2.20.tar.xz" - sha256 "f0af452bc0d09464b6d089b6d56a0a3c16672e9ed9118fbe37b0b6aeaf069a65" - end - end - - def install - # Don't dump files in $HOME. - ENV["GI_SCANNER_DISABLE_CACHE"] = "yes" - - if MacOS.version == :lion - resource("grep").stage do - system "./configure", "--disable-dependency-tracking", - "--disable-nls", - "--prefix=#{buildpath}/grep" - system "make", "install" - ENV["GREP"] = "#{buildpath}/grep/bin/grep" - end - end - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-cogl-pango=yes - --enable-introspection=yes - --disable-glx - --without-x - ] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - doc.install "examples" - end - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - return 0; - } - EOS - system ENV.cc, "-I#{include}/cogl", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/cointop.rb b/Formula/cointop.rb deleted file mode 100644 index b03d9d18a93b2..0000000000000 --- a/Formula/cointop.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cointop < Formula - desc "Interactive terminal based UI application for tracking cryptocurrencies" - homepage "https://cointop.sh" - url "https://github.com/miguelmota/cointop/archive/1.1.2.tar.gz" - sha256 "69070f6b610f31f64245052910b4bd940a3e722f7326e7959c95f47ebe1c38ba" - - bottle do - cellar :any_skip_relocation - sha256 "e0c4f46d2bc2910a7fd5866a57738106e07eadfae20aebd59661e03385829ab8" => :mojave - sha256 "a88422c7be92ecaf8a0683f9c15a0c335503cab244962372f59d66fa71864cbb" => :high_sierra - sha256 "61afdc62170ab00c9c12133e3e90d0f1168b6792cef7e26d23337f86aec8bd74" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - src = buildpath/"src/github.com/miguelmota/cointop" - src.install buildpath.children - src.cd do - system "go", "build", "-o", bin/"cointop" - prefix.install_metafiles - end - end - - test do - system bin/"cointop", "-test" - end -end diff --git a/Formula/collada-dom.rb b/Formula/collada-dom.rb deleted file mode 100644 index 798442f4aebbf..0000000000000 --- a/Formula/collada-dom.rb +++ /dev/null @@ -1,48 +0,0 @@ -class ColladaDom < Formula - desc "C++ library for loading and saving COLLADA data" - homepage "https://www.khronos.org/collada/wiki/Portal:COLLADA_DOM" - head "https://github.com/rdiankov/collada-dom.git" - - stable do - url "https://downloads.sourceforge.net/project/collada-dom/Collada%20DOM/Collada%20DOM%202.4/collada-dom-2.4.0.tgz" - sha256 "5ca2d12f744bdceff0066ed3067b3b23d6859581fb0d657f98ba4487d8fa3896" - - # Fix build of minizip: quoting arguments to cmake's add_definitions doesn't work the way they thought it did. - # Fixed in 2.4.2; remove this when version gets bumped - # https://github.com/rdiankov/collada-dom/issues/3 - patch :DATA - end - - bottle do - sha256 "59315cc7de779a0111beba6d3d7144c47827815f3b394de90fbfcf086e6b28d2" => :mojave - sha256 "21de8eab55b0011919fff439eeabc87f7dc1fe6a886ef0c2c3205fd21532d338" => :high_sierra - sha256 "100e69e1bc65b07f00dcb9d9baf290a727e39ecbf01d27b9a62d26ac14abb59b" => :sierra - sha256 "98e726f47020580acc1a10be5366394fb137fc4729e3446e5e0130a69b2d38da" => :el_capitan - sha256 "2be8761c8bd277b4cc720c900fff84cedbc2736a55329a9d107ded2712e97d75" => :yosemite - sha256 "5ddb31dec3a705e99ca17ec2c6ef1bafb101eac16167d451c3e6eda2dc9c0761" => :mavericks - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "pcre" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end -end - -__END__ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 72b6deb..0c7f7ce 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -100,7 +100,7 @@ endif() - - if( APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - # apple doesn't have 64bit versions of file opening functions, so add them -- add_definitions("-Dfopen64=fopen -Dfseeko64=fseeko -Dfseek64=fseek -Dftell64=ftell -Dftello64=ftello") -+ add_definitions(-Dfopen64=fopen -Dfseeko64=fseeko -Dfseek64=fseek -Dftell64=ftell -Dftello64=ftello) - endif() - - set(COLLADA_DOM_INCLUDE_INSTALL_DIR "include/collada-dom") diff --git a/Formula/collectd.rb b/Formula/collectd.rb deleted file mode 100644 index bcdbf6acdbadd..0000000000000 --- a/Formula/collectd.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Collectd < Formula - desc "Statistics collection and monitoring daemon" - homepage "https://collectd.org/" - url "https://collectd.org/files/collectd-5.8.1.tar.bz2" - sha256 "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da" - - bottle do - sha256 "ffa5b1bd3d607e47410ba26ef11b3d7132f42049a035c9b87ddadad385c3546f" => :mojave - sha256 "61e26ab9d8127ddf942dcd163c6c78f50890b05f309ed7e329c7b8f859205c96" => :high_sierra - sha256 "486dbe8acc823c12263308eddadf22e56c862161e190c7b2f1b57e6feeb99384" => :sierra - end - - head do - url "https://github.com/collectd/collectd.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "libgcrypt" - depends_on "libtool" - depends_on "net-snmp" - depends_on "riemann-client" - - fails_with :clang do - build 318 - cause <<~EOS - Clang interacts poorly with the collectd-bundled libltdl, - causing configure to fail. - EOS - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --localstatedir=#{var} - --disable-java - --enable-write_riemann - ] - - system "./build.sh" if build.head? - system "./configure", *args - system "make", "install" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/sbin/collectd -f -C #{HOMEBREW_PREFIX}/etc/collectd.conf" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{sbin}/collectd - -f - -C - #{etc}/collectd.conf - - RunAtLoad - - StandardErrorPath - #{var}/log/collectd.log - StandardOutPath - #{var}/log/collectd.log - - - EOS - end - - test do - log = testpath/"collectd.log" - (testpath/"collectd.conf").write <<~EOS - LoadPlugin logfile - - File "#{log}" - - LoadPlugin memory - EOS - begin - pid = fork { exec sbin/"collectd", "-f", "-C", "collectd.conf" } - sleep 1 - assert_predicate log, :exist?, "Failed to create log file" - assert_match "plugin \"memory\" successfully loaded.", log.read - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/collector-sidecar.rb b/Formula/collector-sidecar.rb deleted file mode 100644 index f6c27dee9b9fe..0000000000000 --- a/Formula/collector-sidecar.rb +++ /dev/null @@ -1,62 +0,0 @@ -class CollectorSidecar < Formula - desc "Manage log collectors through Graylog" - homepage "https://github.com/Graylog2/collector-sidecar" - url "https://github.com/Graylog2/collector-sidecar/archive/0.1.7.tar.gz" - sha256 "6a1bcfd746ae417f3200db7bcc25ca2b61099f8e84fa4621ae3d010226b53784" - - bottle do - sha256 "359e7f94011d08bf83936c5419fb2392341815f125d90a21638b78776d98d631" => :mojave - sha256 "1d776ff4aab044186ff5e4e7c92de549340f6a2a1cb68e1bd72055c482b3210c" => :high_sierra - sha256 "4cdb998258223bdcacaa6b36d3c486444dd95aa72a91a818ddb0a92ae0a208f1" => :sierra - end - - depends_on "glide" => :build - depends_on "go" => :build - depends_on "mercurial" => :build - depends_on "filebeat" - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - (buildpath/"src/github.com/Graylog2/collector-sidecar").install buildpath.children - - cd "src/github.com/Graylog2/collector-sidecar" do - inreplace "main.go", "/etc", etc - - inreplace "collector_sidecar.yml" do |s| - s.gsub! "/usr", HOMEBREW_PREFIX - s.gsub! "/etc", etc - s.gsub! "/var", var - end - - system "glide", "install" - system "make", "build" - (etc/"graylog/collector-sidecar").install "collector_sidecar.yml" - bin.install "graylog-collector-sidecar" - prefix.install_metafiles - end - end - - plist_options :manual => "graylog-collector-sidecar" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/graylog-collector-sidecar - RunAtLoad - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/graylog-collector-sidecar -version") - end -end diff --git a/Formula/color-code.rb b/Formula/color-code.rb deleted file mode 100644 index ffcd8c29836d7..0000000000000 --- a/Formula/color-code.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ColorCode < Formula - desc "Free advanced MasterMind clone" - homepage "http://colorcode.laebisch.com/" - url "http://colorcode.laebisch.com/download/ColorCode-0.8.5.tar.gz" - sha256 "7c128db12af6ab11439eb710091b4a448100553a4d11d3a7c8dafdfbc57c1a85" - revision 1 - - bottle do - cellar :any - sha256 "5f2a2c56ba83fb2bddac500099a41121e89e1a029393b62e45c65e894ebd4863" => :mojave - sha256 "d184a0b2db2fb9bff024968e3b13c53339599c9a51510c9e1e76ddc073b64834" => :high_sierra - sha256 "761681dc9bcdb911c692d954ffde633471db71ea30ad9babad16237b734e7005" => :sierra - sha256 "1f8e9c02a931f025d172594e30ae20dbd745c6acc5e91f4d8c54b2fa426cff1c" => :el_capitan - sha256 "559f6c6ac094ff6d6e5f7157c3042ae819cd4a4233292c36dca21db85b152b90" => :yosemite - end - - depends_on "qt" - - def install - system "qmake" - system "make" - prefix.install "ColorCode.app" - bin.write_exec_script "#{prefix}/ColorCode.app/Contents/MacOS/colorcode" - end - - test do - system "#{bin}/colorcode", "-h" - end -end diff --git a/Formula/colordiff.rb b/Formula/colordiff.rb deleted file mode 100644 index fdf35711bbe6b..0000000000000 --- a/Formula/colordiff.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Colordiff < Formula - desc "Color-highlighted diff(1) output" - homepage "https://www.colordiff.org/" - url "https://www.colordiff.org/colordiff-1.0.18.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/colordiff-1.0.18.tar.gz" - sha256 "29cfecd8854d6e19c96182ee13706b84622d7b256077df19fbd6a5452c30d6e0" - - bottle do - cellar :any_skip_relocation - sha256 "63483bb1f9e86ffb85de6c7bfaba178da41e2f4577e58efd3d893d8b66263101" => :mojave - sha256 "1b381f5726976016f7996abd414eb24b19bfd63dcc7a8a628e51ca4e3507b4d1" => :high_sierra - sha256 "c4d57d0ae142725bd320600864843ce040457c7652a3e403e1c65a6e53b42afd" => :sierra - sha256 "19c797b186c5b2ec4e4692a21d25f3c8e48addea3cc8aaa2809cf37dcc0f1100" => :el_capitan - sha256 "19c797b186c5b2ec4e4692a21d25f3c8e48addea3cc8aaa2809cf37dcc0f1100" => :yosemite - end - - conflicts_with "cdiff", :because => "both install `cdiff` binaries" - - patch :DATA - - def install - man1.mkpath - system "make", "INSTALL_DIR=#{bin}", - "ETC_DIR=#{etc}", - "MAN_DIR=#{man1}", - "install" - end - - test do - cp HOMEBREW_PREFIX+"bin/brew", "brew1" - cp HOMEBREW_PREFIX+"bin/brew", "brew2" - system "#{bin}/colordiff", "brew1", "brew2" - end -end - -__END__ -diff --git a/Makefile b/Makefile -index 6ccbfc7..e5d64e7 100644 ---- a/Makefile -+++ b/Makefile -@@ -28,8 +29,8 @@ install: - if [ ! -f ${DESTDIR}${INSTALL_DIR}/cdiff ] ; then \ - install cdiff.sh ${DESTDIR}${INSTALL_DIR}/cdiff; \ - fi -- install -Dm 644 colordiff.1 ${DESTDIR}${MAN_DIR}/colordiff.1 -- install -Dm 644 cdiff.1 ${DESTDIR}${MAN_DIR}/cdiff.1 -+ install -m 644 colordiff.1 ${DESTDIR}${MAN_DIR}/colordiff.1 -+ install -m 644 cdiff.1 ${DESTDIR}${MAN_DIR}/cdiff.1 - if [ -f ${DESTDIR}${ETC_DIR}/colordiffrc ]; then \ - mv -f ${DESTDIR}${ETC_DIR}/colordiffrc \ - ${DESTDIR}${ETC_DIR}/colordiffrc.old; \ -@@ -37,7 +38,6 @@ install: - install -d ${DESTDIR}${ETC_DIR}; \ - fi - cp colordiffrc ${DESTDIR}${ETC_DIR}/colordiffrc -- -chown root.root ${DESTDIR}${ETC_DIR}/colordiffrc - chmod 644 ${DESTDIR}${ETC_DIR}/colordiffrc - - uninstall: diff --git a/Formula/colormake.rb b/Formula/colormake.rb deleted file mode 100644 index d78fd3fcf07dd..0000000000000 --- a/Formula/colormake.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Colormake < Formula - desc "Wrapper around make to colorize the output" - homepage "https://github.com/pagekite/Colormake" - url "https://github.com/pagekite/Colormake/archive/0.9.20140503.tar.gz" - sha256 "a3f9fae9a455ac96be1cce0371b28bda33a9af73b06fa8e4329aa2f693d68d22" - head "https://github.com/pagekite/Colormake.git" - - bottle :unneeded - - def install - inreplace "colormake", "colormake.pl", "#{libexec}/colormake.pl" - - # Prefers symlinks than the original duplicate files - File.unlink "colormake-short", "clmake", "clmake-short" - File.symlink "colormake", "colormake-short" - File.symlink "colormake", "clmake" - File.symlink "colormake", "clmake-short" - - # Adds missing clmake.1 referenced in colormake.1 itself - File.symlink "colormake.1", "clmake.1" - - # Installs auxiliary script, commands and mans - libexec.install "colormake.pl" - bin.install "colormake", "clmake", "colormake-short", "clmake-short" - man1.install "colormake.1", "clmake.1" - end - - test do - (testpath/"Makefile").write("all:\n\techo Hello World!\n") - assert_match /Hello World!/, shell_output("#{bin}/colormake") - end -end diff --git a/Formula/colorsvn.rb b/Formula/colorsvn.rb deleted file mode 100644 index a5b10f49df73d..0000000000000 --- a/Formula/colorsvn.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Colorsvn < Formula - desc "Subversion output colorizer" - homepage "http://colorsvn.tigris.org/" - url "http://colorsvn.tigris.org/files/documents/4414/49311/colorsvn-0.3.3.tar.gz" - sha256 "db58d5b8f60f6d4def14f8f102ff137b87401257680c1acf2bce5680b801394e" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "46d8260b22e8a86b2bb573bffff4c6b8cea06dd8e3b2fe7e35e4b66960eb38ee" => :mojave - sha256 "4135712b5dd13e852b9c3ec5b7e95f22f5ec89e28e9f600a9372bd260b2851cf" => :high_sierra - sha256 "5c56662f331161022c31f665d980e077d6a01328864c6c59c137de3b0b57e4f2" => :sierra - sha256 "bf4048c281332c5cfcae4fc74c0fa233ad84c3fe2c111e633101d593284fe601" => :el_capitan - sha256 "88c79f8a9bc43d118449ce9d97061af4633f15f942a0a48caef5e1b327aea0e5" => :yosemite - sha256 "2711d058fa4c892f350b6309a82f7eeb85455bc1b336afc75587c467121a553d" => :mavericks - end - - patch :DATA - - def install - # `configure` uses `which` to find the `svn` binary that is then hard-coded - # into the `colorsvn` binary and its configuration file. Unfortunately, this - # picks up our SCM wrapper from `Library/ENV/` that is not supposed to be - # used outside of our build process. Do the lookup ourselves to fix that. - svn_binary = which_all("svn").reject do |bin| - bin.to_s.start_with?("#{HOMEBREW_REPOSITORY}/Library/ENV/") - end.first - inreplace ["configure", "configure.in"], "\nORIGSVN=`which svn`", - "\nORIGSVN=#{svn_binary}" - - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--sysconfdir=#{etc}" - inreplace ["colorsvn.1", "colorsvn-original"], "/etc", etc - system "make" - system "make", "install" - end - - def caveats; <<~EOS - You probably want to set an alias to svn in your bash profile. - So source #{etc}/profile.d/colorsvn-env.sh or add the line - - alias svn=colorsvn - - to your bash profile. - - So when you type "svn" you'll run "colorsvn". - EOS - end - - test do - assert_match /svn: E155007/, shell_output("#{bin}/colorsvn info 2>&1", 1) - end -end - -__END__ -diff --git a/Makefile.in b/Makefile.in -index 84a3d97..54c2f74 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -13,8 +13,6 @@ srcdir=@srcdir@ - mandir=@mandir@ - sysconfdir=@sysconfdir@ - --confdir=/etc -- - CP=@CP@ - PERL=@PERL@ - RM=@RM@ -f -@@ -36,10 +34,10 @@ colorsvn: - install: colorsvn - $(INSTALL) -d $(DESTDIR)$(bindir) && \ - $(INSTALL) -m 755 $(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE) && \ -- $(INSTALL) -d $(DESTDIR)/$(confdir) && \ -- $(INSTALL) -m 644 $(CONFIGFILE) $(DESTDIR)/$(confdir)/$(CONFIGFILE) && \ -- $(INSTALL) -d $(DESTDIR)/$(confdir)/profile.d && \ -- $(INSTALL) -m 755 $(PROFFILE) $(DESTDIR)/$(confdir)/profile.d/$(PROFFILE) && \ -+ $(INSTALL) -d $(DESTDIR)/$(sysconfdir) && \ -+ $(INSTALL) -m 644 $(CONFIGFILE) $(DESTDIR)/$(sysconfdir)/$(CONFIGFILE) && \ -+ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/profile.d && \ -+ $(INSTALL) -m 755 $(PROFFILE) $(DESTDIR)/$(sysconfdir)/profile.d/$(PROFFILE) && \ - if [ -f $(srcdir)/colorsvn.1 ] ; then \ - $(INSTALL) -d $(DESTDIR)$(mandir)/man1/ ; \ - $(INSTALL) -m 644 $(srcdir)/colorsvn.1 $(DESTDIR)$(mandir)/man1/ ; \ -@@ -54,6 +52,6 @@ clean: - - uninstall: - $(RM) $(DESTDIR)$(bindir)/$(PACKAGE) && \ -- $(RM) $(DESTDIR)/$(confdir)/$(CONFIGFILE) && \ -- $(RM) $(DESTDIR)/$(confdir)/profile.d/$(PROFFILE) -+ $(RM) $(DESTDIR)/$(sysconfdir)/$(CONFIGFILE) && \ -+ $(RM) $(DESTDIR)/$(sysconfdir)/profile.d/$(PROFFILE) diff --git a/Formula/colortail.rb b/Formula/colortail.rb deleted file mode 100644 index 17974f0894000..0000000000000 --- a/Formula/colortail.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Colortail < Formula - desc "Like tail(1), but with various colors for specified output" - homepage "https://github.com/joakim666/colortail" - url "https://github.com/joakim666/colortail.git", - :revision => "f44fce0dbfd6bd38cba03400db26a99b489505b5" - version "0.3.4" - - bottle do - cellar :any_skip_relocation - sha256 "f68bafd58bcff89453bf8f81331eb968c5bde460821a885523863ec4ee9482fb" => :mojave - sha256 "a7974ddb2f0bd3a7946bb5d06fe637f94c7a8776f9cd811bf8fbd530caa92816" => :high_sierra - sha256 "44e09610d285f503fbae67f930ae7bea894c737d1e2c9c634332188340a70e3e" => :sierra - sha256 "e0c8c9af739ce911c0d09eaee26b615444c17f48de27c680cbaf27739e45d8f5" => :el_capitan - sha256 "1be1c0067a5621f5edcabf64ec06a775d334924e4ea01bccd1c42830f6c9d0c6" => :yosemite - sha256 "8570fbda1625d70eac83d0e53a1d32d0cd7b32f9fb0b8dea38d32a3228dc6688" => :mavericks - sha256 "cba08e3d00b530eca42cd2d95dc0c3ed9419f199e7f26edc068b5b1074c3fe51" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - # Upstream PR to fix the build on ML - patch do - url "https://github.com/joakim666/colortail/commit/36dd0437bb364fd1493934bdb618cc102a29d0a5.diff?full_index=1" - sha256 "87e4a6b24f447312cc3ea3d8b65af54a37d0723e682dfb70b9a0c4b21e0e102c" - end - - def install - system "./autogen.sh", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.txt").write "Hello\nWorld!\n" - assert_match(/World!/, shell_output("#{bin}/colortail -n 1 test.txt")) - end -end diff --git a/Formula/commandbox.rb b/Formula/commandbox.rb deleted file mode 100644 index b5499173c78ee..0000000000000 --- a/Formula/commandbox.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Commandbox < Formula - desc "CFML embedded server, package manager, and app scaffolding tools" - homepage "https://www.ortussolutions.com/products/commandbox" - url "https://downloads.ortussolutions.com/ortussolutions/commandbox/4.5.0/commandbox-bin-4.5.0.zip" - sha256 "26eb515fc41138f0d7b2503d6242c57fa4db9f6cfb6a5d0783a9974ec203813d" - - bottle :unneeded - - depends_on :java => "1.8" - - resource "apidocs" do - url "https://downloads.ortussolutions.com/ortussolutions/commandbox/4.5.0/commandbox-apidocs-4.5.0.zip" - sha256 "58632f302ccda65c1260fc2081eeacb7823e1b34d780c77697fc34dcca61d5ba" - end - - def install - libexec.install "box" - (bin/"box").write_env_script libexec/"box", Language::Java.java_home_env("1.8") - doc.install resource("apidocs") - end - - test do - system "#{bin}/box", "--commandbox_home=~/", "version" - system "#{bin}/box", "--commandbox_home=~/", "help" - end -end diff --git a/Formula/compcert.rb b/Formula/compcert.rb deleted file mode 100644 index d633e9fc3db8a..0000000000000 --- a/Formula/compcert.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Compcert < Formula - desc "Formally verified C compiler" - homepage "http://compcert.inria.fr" - url "https://github.com/AbsInt/CompCert/archive/v3.4.tar.gz" - sha256 "7098136318ea1db90d9807a58fd27e90306e8022cb7d6e335ca2c13f3787ec89" - - bottle do - cellar :any_skip_relocation - sha256 "67ecedda2c906df96558f64d918fb4b1eacf82f51931d090db17c4533eeb8bc0" => :mojave - sha256 "037513cdd7b75ba60e9ab3fb2e78201e7bb3eb36bc02aa8493377e7e8ada3e58" => :high_sierra - sha256 "54a044c3b9f387eb400c2a7e881a2b2df040d02786fbd37da8948db2a362ae9a" => :sierra - sha256 "6d33c7c5f3e1fb223a164392b1cdaa7c548d8bf8f44f0c0a7472bc4683a8a4de" => :el_capitan - end - - depends_on "coq" => :build - depends_on "menhir" => :build - depends_on "ocaml" => :build - - def install - # We pass -ignore-coq-version, otherwise every new version of coq - # breaks the strict version check. - system "./configure", "-prefix", prefix, "x86_64-macosx", - "-ignore-coq-version" - system "make", "all" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - int printf(const char *fmt, ...); - int main(int argc, char** argv) { - printf("Hello, world!\\n"); - return 0; - } - EOS - system bin/"ccomp", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/compface.rb b/Formula/compface.rb deleted file mode 100644 index d977097fe0199..0000000000000 --- a/Formula/compface.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Compface < Formula - desc "Convert to and from the X-Face format" - homepage "https://web.archive.org/web/20170720045032/freecode.com/projects/compface" - url "https://mirrorservice.org/sites/ftp.xemacs.org/pub/xemacs/aux/compface-1.5.2.tar.gz" - mirror "https://ftp.heanet.ie/mirrors/ftp.xemacs.org/aux/compface-1.5.2.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/compface/compface-1.5.2.tar.gz" - sha256 "a6998245f530217b800f33e01656be8d1f0445632295afa100e5c1611e4f6825" - - bottle do - cellar :any_skip_relocation - sha256 "10d7c5d38196576ac2d21278ead512819c9e393fa8caf81d75a70d7b09c7aaa8" => :mojave - sha256 "15f3ed9a165fa2f4966fde4de5b8b1c62d583425e0c3d9961b26348f6355bfcc" => :high_sierra - sha256 "092d90367b0fa75ff8a1be3982cda127226fb9805c681170f66fe27c148c8d1b" => :sierra - sha256 "50200eb6f7cb61be39420d2e127eb4e2af9391a514f7cfbd26fa9203ca137d21" => :el_capitan - sha256 "4f7a202ead9c7b6ba1498be71c937500d64cad15ae451ec37c54a8fba70816a0" => :yosemite - sha256 "3208feb3c0055906ee163662c0d5b5cbe561222128a0979f6e159110973ee3fa" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}" - - system "make", "install" - end - - test do - system bin/"uncompface" - end -end diff --git a/Formula/compose2kube.rb b/Formula/compose2kube.rb deleted file mode 100644 index 04a6e5509e225..0000000000000 --- a/Formula/compose2kube.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Compose2kube < Formula - desc "Convert docker-compose service files to Kubernetes objects" - homepage "https://github.com/kelseyhightower/compose2kube" - url "https://github.com/kelseyhightower/compose2kube/archive/0.0.2.tar.gz" - sha256 "d09b86994949f883c5aa4d041a12f6c5a8989f3755a2fb49a2abac2ad5380c30" - revision 1 - head "https://github.com/kelseyhightower/compose2kube.git" - - bottle do - cellar :any_skip_relocation - sha256 "ebc7d22f93d1b4032f3d4975b23734e0e2bc1539c91e3f2100778c406f5cdddf" => :mojave - sha256 "f657b3850b4f6fa2f941ed7de472ca0908f9ac3aefe3ab8502aac14753369135" => :high_sierra - sha256 "1d2cb6b785c7cc7b06a5bcaf0a39fda3ad66548b2ff09fbd23bdf293f1c1ebf0" => :sierra - sha256 "90b2466bb93be95570354475aa1cadf5b35af8944f84abfa612cea4d210d6b67" => :el_capitan - sha256 "210e6242a05505b20208e03d278c272c1d90e54b747908119400ed018636d2a6" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/kelseyhightower/compose2kube").install buildpath.children - cd "src/github.com/kelseyhightower/compose2kube" do - system "go", "build", "-o", bin/"compose2kube" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/compose2kube -h 2>&1", 2) - end -end diff --git a/Formula/composer.rb b/Formula/composer.rb deleted file mode 100644 index 7e5e10453d2ed..0000000000000 --- a/Formula/composer.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Composer < Formula - desc "Dependency Manager for PHP" - homepage "https://getcomposer.org/" - url "https://getcomposer.org/download/1.8.0/composer.phar" - sha256 "0901a84d56f6d6ae8f8b96b0c131d4f51ccaf169d491813d2bcedf2a6e4cefa6" - - bottle :unneeded - - def install - bin.install "composer.phar" => "composer" - end - - test do - (testpath/"composer.json").write <<~EOS - { - "name": "homebrew/test", - "authors": [ - { - "name": "Homebrew" - } - ], - "require": { - "php": ">=5.3.4" - }, - "autoload": { - "psr-0": { - "HelloWorld": "src/" - } - } - } - EOS - - (testpath/"src/HelloWorld/greetings.php").write <<~EOS - :mojave - sha256 "4731753456896083c5e47b6ef0bd5470d1de05591ceb12e3383dd49435288531" => :high_sierra - sha256 "80d64b919e69891083d1c66b52998222976fbd3c25a6108dadd5d445fc62e4df" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libffi" - depends_on "openssl" - depends_on "python" - - def install - inreplace "conans/requirements.txt", "PyYAML>=3.11, <3.14.0", "PyYAML>=3.11" - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", "PyYAML==3.13", buildpath - system libexec/"bin/pip", "uninstall", "-y", name - venv.pip_install_and_link buildpath - end - - test do - system bin/"conan", "install", "zlib/1.2.11@conan/stable", "--build" - assert_predicate testpath/".conan/data/zlib/1.2.11", :exist? - end -end diff --git a/Formula/concurrencykit.rb b/Formula/concurrencykit.rb deleted file mode 100644 index 6e2b40eded148..0000000000000 --- a/Formula/concurrencykit.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Concurrencykit < Formula - desc "Aid design and implementation of concurrent systems" - homepage "http://concurrencykit.org" - url "http://concurrencykit.org/releases/ck-0.6.0.tar.gz" - mirror "https://github.com/concurrencykit/ck/archive/0.6.0.tar.gz" - sha256 "d7e27dd0a679e45632951e672f8288228f32310dfed2d5855e9573a9cf0d62df" - head "https://github.com/concurrencykit/ck.git" - - bottle do - cellar :any - sha256 "d219f60638ce9501978e8494b64eef8861685f78c9e3eeefa295043a05ba75a2" => :mojave - sha256 "4bb00e2cc25ebe7e103ca8923c3376e86b3b7b360fc73beb8078d15af1239571" => :high_sierra - sha256 "1597c3fde162ccc3c8c729003da472f3f414509b18a2e64a1fade268ee8798e0" => :sierra - sha256 "897667302b03467c291ff141082b21ec2f31fc82ef5940f791196a14cec24909" => :el_capitan - sha256 "914d6e5afd3412f8892770f73233e1cca915b2a2315c811fc6a8d6fa5ab811ce" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lck", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/configen.rb b/Formula/configen.rb deleted file mode 100644 index 9dc621932f01e..0000000000000 --- a/Formula/configen.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Configen < Formula - desc "Configuration file code generator for use in Xcode projects" - homepage "https://github.com/theappbusiness/ConfigGenerator" - url "https://github.com/theappbusiness/ConfigGenerator/archive/v1.0.2.tar.gz" - sha256 "272f6bc4cfc7b72831096a0579a708511410799b2ed551f835951b60d9708aef" - head "https://github.com/theappbusiness/ConfigGenerator.git" - - bottle do - cellar :any_skip_relocation - sha256 "8c01dbbe02fbfcb5fd77db3a9deebdc90628a3dc6cc0836bc2ab732700e95fb8" => :mojave - sha256 "00d49b86720671684ac9ca4376ec793bfce9eadeabdb977ad1218a143c305406" => :high_sierra - sha256 "1317e904f74d0bacab2912d3eca95a4f58d6625ecd3fb22781c009348e2bdc68" => :sierra - end - - depends_on :xcode => ["9.0", :build] - - def install - xcodebuild "SYMROOT=build" - bin.install "build/Release/configen" - end - - test do - (testpath/"test.plist").write <<~EOS - - - - - testURL - https://example.com/api - retryCount - 2 - - - EOS - (testpath/"test.map").write <<~EOS - testURL : URL - retryCount : Int - EOS - system bin/"configen", "-p", "test.plist", "-h", "test.map", "-n", "AppConfig", "-o", testpath - assert_predicate testpath/"AppConfig.swift", :exist?, "Failed to create config class!" - assert_match "static let testURL: URL = URL(string: \"https://example.com/api\")", File.read("AppConfig.swift") - assert_match "static let retryCount: Int = 2", File.read("AppConfig.swift") - end -end diff --git a/Formula/confluent-oss.rb b/Formula/confluent-oss.rb deleted file mode 100644 index 22ca9b594e9ad..0000000000000 --- a/Formula/confluent-oss.rb +++ /dev/null @@ -1,25 +0,0 @@ -class ConfluentOss < Formula - desc "Developer-optimized distribution of Apache Kafka" - homepage "https://www.confluent.io/product/confluent-open-source/" - url "https://packages.confluent.io/archive/5.1/confluent-5.1.0-2.11.tar.gz" - version "5.1.0" - sha256 "2b65f4ca70ffa155991530d6ea1f27b9a043b38ecf81ced85a22b527d60b0ea3" - - bottle :unneeded - - depends_on :java => "1.8" - - conflicts_with "kafka", :because => "kafka also ships with identically named Kafka related executables" - - def install - prefix.install "bin" - rm_rf "#{bin}/windows" - prefix.install "etc" - prefix.install "share" - end - - test do - system "#{bin}/confluent", "current" - assert_match "schema-registry", shell_output("#{bin}/confluent list") - end -end diff --git a/Formula/confuse.rb b/Formula/confuse.rb deleted file mode 100644 index 93d0ef9b96cdf..0000000000000 --- a/Formula/confuse.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Confuse < Formula - desc "Configuration file parser library written in C" - homepage "https://github.com/martinh/libconfuse" - url "https://github.com/martinh/libconfuse/releases/download/v3.2.2/confuse-3.2.2.tar.xz" - sha256 "a9240b653d02e8cfc52db48e8c4224426e528e1faa09b65e8ca08a197fad210b" - - bottle do - cellar :any - sha256 "24e05e5b2e29feab1222d9087e064349131023b97b3e5b8f847c8babe968cea2" => :mojave - sha256 "6e5f40a3ca684e8aeef00fe121a0742214a434d23ed45810d0b7b6c1e5ff65ac" => :high_sierra - sha256 "8a34f5dee392fb5c572df1e636821b1b6af62a197aca7a2de0c49b4f55bb2874" => :sierra - sha256 "8547a54095de338b895476e8fc2cfabc27ed9039996f37bdcb48040759c67f79" => :el_capitan - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - cfg_opt_t opts[] = - { - CFG_STR("hello", NULL, CFGF_NONE), - CFG_END() - }; - - int main(void) - { - cfg_t *cfg = cfg_init(opts, CFGF_NONE); - if (cfg_parse_buf(cfg, "hello=world") == CFG_SUCCESS) - printf("%s\\n", cfg_getstr(cfg, "hello")); - cfg_free(cfg); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lconfuse", "-o", "test" - assert_match /world/, shell_output("./test") - end -end diff --git a/Formula/conjure-up.rb b/Formula/conjure-up.rb deleted file mode 100644 index 57b5ca0c0cbf1..0000000000000 --- a/Formula/conjure-up.rb +++ /dev/null @@ -1,260 +0,0 @@ -class ConjureUp < Formula - include Language::Python::Virtualenv - - desc "Big software deployments so easy it's almost magical" - homepage "https://conjure-up.io/" - url "https://github.com/conjure-up/conjure-up/archive/2.6.0.tar.gz" - sha256 "b39afd2fdff2affb29c4255133c2e8b7984f291feb209a4b7cf6e2c492a93cb1" - - bottle do - cellar :any - sha256 "f979ba47dc174f8ba0c54fe5aef6788218e54b2c47d3e92895af6fb6f61819b8" => :mojave - sha256 "30f18ecddf24005e85b4f155b6fb1acfae01b71bccd669d505d4946985eb99f1" => :high_sierra - sha256 "2fac93758693efeedfecf58cda5fff8f2ce2cd6608096d378699792d63e65cc5" => :sierra - sha256 "4f06009d8c2cc5ae0e58f8f3fb91a340e46b6964c2462463ad362632c51c982d" => :el_capitan - end - - depends_on "awscli" - depends_on "jq" - depends_on "juju" - depends_on "juju-wait" - depends_on "libyaml" - depends_on "pwgen" - depends_on "python" - depends_on "redis" - - # list generated from the 'requirements.txt' file in the repository root - resource "aiofiles" do - url "https://files.pythonhosted.org/packages/28/51/913ed4312b63b0a1b6cad5a761b2c163eb20e353c7a3f19f08e04e8675e5/aiofiles-0.3.1.tar.gz" - sha256 "6c4936cea65175277183553dbc27d08b286a24ae5bd86f44fbe485dfcf77a14a" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz" - sha256 "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d/certifi-2018.4.16.tar.gz" - sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "env" do - url "https://github.com/battlemidget/env/archive/1.0.0.tar.gz" - sha256 "a26b5c973df792ecfc1fc6b18cf696ccaf4c02c918b2878e81c6d495debaa340" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/Jinja2-2.9.6.tar.gz" - sha256 "ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff" - end - - resource "juju" do - url "https://files.pythonhosted.org/packages/ae/35/168c89f79ae296a67ec7ce4fb54a21344feafd0c91444de53d7c2a3b8b60/juju-0.9.1.tar.gz" - sha256 "530f96c7088f83dbb7faf00a48604f0d94c149ca88ef6535cfd65e0adcd13adb" - end - - resource "juju-wait" do - url "https://files.pythonhosted.org/packages/e4/34/a40b2df17343f75b6befd814b031f9fd37d61ffc309bd711fdbdb2c01eae/juju-wait-2.6.3.tar.gz" - sha256 "52228937c6feffaa888aa286f40ce7601258ddc3a71264d466b3b809d9242c02" - end - - resource "jujubundlelib" do - url "https://files.pythonhosted.org/packages/fe/6c/a70cd143c77c3a5d6935e6b9e46261e8cab4db7911691650d0bbde8a1a78/jujubundlelib-0.5.6.tar.gz" - sha256 "80e4fbc2b8593082f57de03703df8c5ba69ed1cf73519d499f5d49c51ec91949" - end - - resource "kv" do - url "https://files.pythonhosted.org/packages/c7/02/69ad28c7669bb1cebc0ca1bb92eaf07f6b3b67c4f79cf1dcc5082f18d7a4/kv-0.3.tar.gz" - sha256 "d40755e7358e2b2a624feb9e442b06168b04cf14abf4d7aa749725dfbc5034e5" - end - - resource "macaroonbakery" do - url "https://files.pythonhosted.org/packages/38/27/a3d58ded98c6fb926a01ec45c55095ade186a0a366663dd033e0a296d17a/macaroonbakery-1.1.3.tar.gz" - sha256 "6b5a009dd6f5605f97feaeb8e9807767f8a5de54455c2c6aaa0e918faca04a13" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "melddict" do - url "https://files.pythonhosted.org/packages/89/99/c2dd9897264764544cb02de5fe0ffc277c091e973908b0894abe8900be7a/melddict-1.0.1.tar.gz" - sha256 "70ad91f4a7fb7ee32498e828604fe10c6ceb68a5779ca9d41e5469a6c24826ea" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/df/5f/3f4aae7b28db87ddef18afed3b71921e531ca288dc604eb981e9ec9f8853/oauthlib-2.1.0.tar.gz" - sha256 "ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/29/65/83181630befb17cd1370a6abb9a87957947a43c2332216e5975353f61d64/paramiko-2.4.1.tar.gz" - sha256 "33e36775a6c71790ba7692a73f948b329cf9295a72b0102144b031114bd2a4f3" - end - - resource "PrettyTable" do - url "https://files.pythonhosted.org/packages/ef/30/4b0746848746ed5941f052479e7c23d2b56d174b82f4fd34a25e389831f5/prettytable-0.7.2.tar.bz2" - sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36" - end - - resource "progressbar2" do - url "https://files.pythonhosted.org/packages/ab/d1/44d8235bac6fca2480f256a47630aa759638f3d6ad4d3ebe8ec0ae38409d/progressbar2-3.20.0.tar.gz" - sha256 "a16d34da27bfa9800605f1de3342138e102797a4b8198864c8822e94caa0e5f7" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/7f/51/7429b4009ccd54717d54b3a273d16df1a269845b39bcca3b4b7023a48078/protobuf-3.6.0.tar.gz" - sha256 "a37836aa47d1b81c2db1a6b7a5e79926062b5d76bd962115a0e615551be2b48d" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/57/93/47a2e3befaf194ccc3d05ffbcba2cdcdd22a231100ef7e4cf63f085c900b/psutil-5.2.2.tar.gz" - sha256 "44746540c0fab5b95401520d29eb9ffe84b3b4a235bd1d1971cbe36e1f38dd13" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/0d/33/3466a3210321a02040e3ab2cd1ffc6f44664301a5d650a7e44be1dc341f2/pyasn1-0.4.3.tar.gz" - sha256 "fb81622d8f3509f0026b0683fe90fea27be7284d3826a5f2edf97f69151ab0fc" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pymacaroons" do - url "https://files.pythonhosted.org/packages/37/b4/52ff00b59e91c4817ca60210c33caf11e85a7f68f7b361748ca2eb50923e/pymacaroons-0.13.0.tar.gz" - sha256 "1e6bba42a5f66c245adf38a5a4006a99dcc06a0703786ea636098667d42903b8" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b261f/PyNaCl-1.2.1.tar.gz" - sha256 "e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9" - end - - resource "pyRFC3339" do - url "https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.1.tar.gz" - sha256 "81b8cbe1519cdb79bed04910dd6fa4e181faf8c88dff1e1b987b5f7ab23a5b1a" - end - - resource "python-utils" do - url "https://files.pythonhosted.org/packages/30/95/d01fbd09ced38a16b7357a1d6cefe1327b9273885bffd6371cbec3e23af7/python-utils-2.3.0.tar.gz" - sha256 "34aaf26b39b0b86628008f2ae0ac001b30e7986a8d303b61e1357dfcdad4f6d3" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/ca/a9/62f96decb1e309d6300ebe7eee9acfd7bccaeedd693794437005b9067b44/pytz-2018.5.tar.gz" - sha256 "ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277" - end - - resource "pyvmomi" do - url "https://files.pythonhosted.org/packages/95/82/40f8c37a4c5264a2d581c24eb5f191cbdfe7f574d4013180edc84bbbf401/pyvmomi-6.5.0.2017.5-1.tar.gz" - sha256 "c28292594281901e894c39a0c06b4126a9c019b3d804c47fb116472299dbb42d" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "raven" do - url "https://files.pythonhosted.org/packages/8f/80/e8d734244fd377fd7d65275b27252642512ccabe7850105922116340a37b/raven-6.9.0.tar.gz" - sha256 "3fd787d19ebb49919268f06f19310e8112d619ef364f7989246fc8753d469888" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/80/14/ad120c720f86c547ba8988010d5186102030591f71f7099f23921ca47fe5/requests-oauthlib-0.8.0.tar.gz" - sha256 "883ac416757eada6d3d07054ec7092ac21c7f35cb1d2cf82faf205637081f468" - end - - resource "sh" do - url "https://files.pythonhosted.org/packages/d8/97/39aa189a8392522cc24f14f392955cbeac48e2818d776241c37eb6d0eb3c/sh-1.12.13.tar.gz" - sha256 "979928ca113cade663bb1a0ff710e3eb9147596cf28a7ee4c04f9d85804f7b9f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "theblues" do - url "https://files.pythonhosted.org/packages/ab/09/21a4718cb6f06573153de35af742e4c251ca9b628c9001d06f6ed4b2cae5/theblues-0.3.8.tar.gz" - sha256 "649f4013d3b9024f7990a7e0b42aed2196daea64a7c8501dde4f1f57ab8aa031" - end - - resource "ubuntui" do - url "https://files.pythonhosted.org/packages/e8/18/a8cf8f69de1b5bfc135bec5f46a14832e3f9eae3abf7b7978602dc49ed4b/ubuntui-0.1.9.tar.gz" - sha256 "7249c2bfbdfe5bc4f86ac7a94fe606064f8f068f1436de35cca71b6cd6f57c78" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/85/5d/9317d75b7488c335b86bd9559ca03a2a023ed3413d0e8bfe18bea76f24be/urwid-1.3.1.tar.gz" - sha256 "cfcec03e36de25a1073e2e35c2c7b0cc6969b85745715c3a025a31d9786896a1" - end - - resource "websockets" do - url "https://files.pythonhosted.org/packages/4e/2a/56e60bb4c3696bc736998cc13c3fa1a36210609d7e1a3f2519857b420245/websockets-6.0.tar.gz" - sha256 "8f3b956d11c5b301206382726210dc1d3bee1a9ccf7aadf895aaf31f71c3716c" - end - - def install - venv = virtualenv_create(libexec, "python3") - venv.pip_install resource("cffi") # needs to be installed prior to bcrypt - res = resources.map(&:name).to_set - ["cffi"] - - res.each do |r| - venv.pip_install resource(r) - end - venv.pip_install_and_link buildpath - bin.install_symlink "#{libexec}/bin/kv-cli" - end - - test do - assert_match "No spells found, syncing from registry, please wait", - shell_output("#{bin}/conjure-up openstack-base metal --show-env") - assert_predicate testpath/".cache/conjure-up-spells/spells-index.yaml", - :exist? - end -end diff --git a/Formula/connect.rb b/Formula/connect.rb deleted file mode 100644 index 182093d98549b..0000000000000 --- a/Formula/connect.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Connect < Formula - desc "Provides SOCKS and HTTPS proxy support to SSH" - homepage "https://bitbucket.org/gotoh/connect/wiki/Home" - url "https://bitbucket.org/gotoh/connect/get/1.105.tar.gz" - sha256 "e7c98d31787f93b51c62ee05e0b558cfb577cda8198834a6d5b4d32528bf63ee" - - bottle do - cellar :any_skip_relocation - sha256 "9950d137f925a1a64a241235fa355ec0b73238e1d89c9b31cc979ce8ccba3f98" => :mojave - sha256 "406798ed3fe31bdf93780ea4f33b3be0c14b3d262ff09c3fa11eb6bad509a643" => :high_sierra - sha256 "20658283a4ed9ee93c6a6faeb2b33d0b3721ababb31068b6d898da5db77b0a68" => :sierra - sha256 "af244ce650bc1ebd50209b62d98c9780df9ff3b90b2b7496f7b74426f33349a6" => :el_capitan - sha256 "1285bb995a9eed5ce5198da853bd33ce49c04ac0caa328b651be5d0421e784f4" => :yosemite - sha256 "4f1dffe41e3164e12fe447c123e17a998cdc936d5dddb7cdc6195fb1b2293fcb" => :mavericks - end - - def install - system "make" - bin.install "connect" - end - - test do - system bin/"connect" - end -end diff --git a/Formula/conserver.rb b/Formula/conserver.rb deleted file mode 100644 index 2350459fe07ef..0000000000000 --- a/Formula/conserver.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Conserver < Formula - desc "Allows multiple users to watch a serial console at the same time" - homepage "https://www.conserver.com/" - url "https://github.com/conserver/conserver/releases/download/v8.2.2/conserver-8.2.2.tar.gz" - sha256 "05ea1693bf92b42ad2f0a9389c60352ccd35c2ea93c8fc8e618d0153362a7d81" - - bottle do - sha256 "3332bc506c85754b3b601989941613c83932ea28b4fb8aef87e45dfa576807c2" => :mojave - sha256 "3fca2dc202bf6d68cc8294be8c2703bef813ad6583d51c3d9c4da12dbc975a89" => :high_sierra - sha256 "c3885b3a01be7c4d0a4ed943906c4cb13be485b770271ac94cf9e439fdb9ca9a" => :sierra - sha256 "d9f2d169e4a3adf0e46b7047991dba382147da1bd0923969bd0bec7bf7f14900" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - console = fork do - exec bin/"console", "-n", "-p", "8000", "test" - end - sleep 1 - Process.kill("TERM", console) - end -end diff --git a/Formula/console_bridge.rb b/Formula/console_bridge.rb deleted file mode 100644 index f958e0eb58dae..0000000000000 --- a/Formula/console_bridge.rb +++ /dev/null @@ -1,36 +0,0 @@ -class ConsoleBridge < Formula - desc "Robot Operating System-independent package for logging" - homepage "https://wiki.ros.org/console_bridge/" - url "https://github.com/ros/console_bridge/archive/0.4.2.tar.gz" - sha256 "f44641bed7268d72354476c8c5ff936f0e600e4170e1ff7f61a4b6e1f3fc20ff" - - bottle do - cellar :any - sha256 "6cfc06d8ae110d740f208b162127d4e0a2cabf479ece89b8e80cdeb4246596f5" => :mojave - sha256 "db387172475ff9b2316e108c3948949a5772d15bd031f4cfdc2cbc78720ea737" => :high_sierra - sha256 "1685e012b79d53b1797db76c370a1fb8e1e88eefc589d79cc09a67e834552aaf" => :sierra - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - CONSOLE_BRIDGE_logDebug("Testing Log"); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lconsole_bridge", "-std=c++11", - "-o", "test" - system "./test" - end -end diff --git a/Formula/consul-backinator.rb b/Formula/consul-backinator.rb deleted file mode 100644 index bfa1d7ab690ab..0000000000000 --- a/Formula/consul-backinator.rb +++ /dev/null @@ -1,39 +0,0 @@ -class ConsulBackinator < Formula - desc "Consul backup and restoration application" - homepage "https://github.com/myENA/consul-backinator" - url "https://github.com/myENA/consul-backinator/archive/v1.6.5.tar.gz" - sha256 "e464d597a3a28c6376e0d602c9484a465476db13684585bd52c6b5d81b07019d" - head "https://github.com/myENA/consul-backinator.git" - - bottle do - cellar :any_skip_relocation - sha256 "b7504895bfee3e1f3c9318de55a7c60cb256d3d433766f3178fcea7260c04863" => :mojave - sha256 "f77ec3bd0fa7598d79ca30469140e989ddae59dbb5512d0aa22f0c21190dcd02" => :high_sierra - sha256 "c52eaf11b850dea9c74b96d94157d25ee1912e52423628105c8b8d9240a2e52a" => :sierra - sha256 "bb39c88ad9e3e5aa6b12ea08bbd6ec2b31601d0c14f943aaaf10bfcf14cc5b8d" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - - dir = buildpath/"src/github.com/myENA/consul-backinator" - dir.install buildpath.children - - cd dir do - system "glide", "install" - system "go", "build", "-v", "-ldflags", - "-X main.appVersion=#{version}", "-o", - bin/"consul-backinator" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/consul-backinator --version 2>&1") - assert_equal version.to_s, output.strip - end -end diff --git a/Formula/consul-template.rb b/Formula/consul-template.rb deleted file mode 100644 index 2cb27f02fc7ba..0000000000000 --- a/Formula/consul-template.rb +++ /dev/null @@ -1,44 +0,0 @@ -class ConsulTemplate < Formula - desc "Generic template rendering and notifications with Consul" - homepage "https://github.com/hashicorp/consul-template" - url "https://github.com/hashicorp/consul-template.git", - :tag => "v0.19.5", - :revision => "f8c8205caf458dfd0ecab69d029ab112803aa587" - head "https://github.com/hashicorp/consul-template.git" - - bottle do - cellar :any_skip_relocation - sha256 "921d8401cb88f770060bbe6f59eb5a0499764b8539b42682cddaaf8db526ecc2" => :mojave - sha256 "859b8ac6cb1aaff1d1b7be4b41d0eef356d86634eb76a2601d3cce1626d03bb4" => :high_sierra - sha256 "4bc3abb371cf2a3f6243800d7b9325a0479639d488a20911eff3ff11a68f2a15" => :sierra - sha256 "dec98da73d913cf2a2d4364826427eb42dab3638d09ac198e7f9e449082aa8ad" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["XC_OS"] = "darwin" - ENV["XC_ARCH"] = "amd64" - dir = buildpath/"src/github.com/hashicorp/consul-template" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - project = "github.com/hashicorp/consul-template" - commit = Utils.popen_read("git rev-parse --short HEAD").chomp - ldflags = ["-X #{project}/version.Name=consul-template", - "-X #{project}/version.GitCommit=#{commit}"] - system "go", "build", "-o", bin/"consul-template", "-ldflags", - ldflags.join(" ") - prefix.install_metafiles - end - end - - test do - (testpath/"template").write <<~EOS - {{"homebrew" | toTitle}} - EOS - system bin/"consul-template", "-once", "-template", "template:test-result" - assert_equal "Homebrew", (testpath/"test-result").read.chomp - end -end diff --git a/Formula/consul.rb b/Formula/consul.rb deleted file mode 100644 index 4f2a6eb91b03d..0000000000000 --- a/Formula/consul.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Consul < Formula - desc "Tool for service discovery, monitoring and configuration" - homepage "https://www.consul.io" - url "https://github.com/hashicorp/consul.git", - :tag => "v1.4.0", - :revision => "0bddfa23a2ebe3c0773d917fc104f53d74f7a5ec" - head "https://github.com/hashicorp/consul.git", - :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "a106bef2a6dd84ffcb39f609ba9a182c0fe896e1946ce6975ad1894e7a3c56fd" => :mojave - sha256 "2872d4822591f96abe68383cd465cfb6b9ee29aecf87eaa057e6503fead61d17" => :high_sierra - sha256 "f8bae32cc832a7c94708ea5931c2387214db541ffc5fccbea15c8287b146cfa3" => :sierra - end - - depends_on "go" => :build - depends_on "gox" => :build - - def install - # Avoid running `go get` - inreplace "GNUmakefile", "go get -u -v $(GOTOOLS)", "" - - ENV["XC_OS"] = "darwin" - ENV["XC_ARCH"] = "amd64" - ENV["GOPATH"] = buildpath - contents = Dir["{*,.git,.gitignore}"] - (buildpath/"src/github.com/hashicorp/consul").install contents - - (buildpath/"bin").mkpath - - cd "src/github.com/hashicorp/consul" do - system "make" - bin.install "bin/consul" - prefix.install_metafiles - end - end - - plist_options :manual => "consul agent -dev -advertise 127.0.0.1" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/consul - agent - -dev - -advertise - 127.0.0.1 - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/consul.log - StandardOutPath - #{var}/log/consul.log - - - EOS - end - - test do - fork do - exec "#{bin}/consul", "agent", "-data-dir", "." - end - sleep 3 - system "#{bin}/consul", "leave" - end -end diff --git a/Formula/contacts.rb b/Formula/contacts.rb deleted file mode 100644 index 6d093bcfd6dee..0000000000000 --- a/Formula/contacts.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Use a sha1 instead of a tag, as the author has not provided a tag for -# this release. In fact, the author no longer uses this software, so it -# is a candidate for removal if no new maintainer is found. -class Contacts < Formula - desc "Command-line tool to access macOS's Contacts (formerly 'Address Book')" - homepage "http://www.gnufoo.org/contacts/contacts.html" - url "https://github.com/dhess/contacts/archive/4092a3c6615d7a22852a3bafc44e4aeeb698aa8f.tar.gz" - version "1.1a-3" - sha256 "e3dd7e592af0016b28e9215d8ac0fe1a94c360eca5bfbdafc2b0e5d76c60b871" - - bottle do - cellar :any_skip_relocation - sha256 "ad45d22cee04997d286b7e07f19328cd59dcb3a335a6a93e5ed24a8b995080f1" => :mojave - sha256 "27b7b256aa6f034b245c6cc1e6c7def038bbf183e73f94db942a220aa876ef0d" => :high_sierra - sha256 "21bf2ec23b9f096ed09acd44dbd7c2cc59891c01a821a6695e58d69c54647c0e" => :sierra - sha256 "7f6c6817310dacf83041d2017e8841b49e26df0d09039692576b6fe0fed52ecc" => :el_capitan - sha256 "9a9c89e40f9ccf4ec45cf63414eaf31266dfc9b71dc96d8c02f7ab2b38e8f346" => :mavericks - sha256 "548051ca4c3209a63dda33a6c17103b8cd3ea817bc4090963dbb12ee1763dcc6" => :mountain_lion - sha256 "842a3ef87a54aab40009788d034f6095f3c10223867d1b8d5b6e3c933b5e4800" => :lion - end - - depends_on :xcode => :build - - def install - system "make", "SDKROOT=#{MacOS.sdk_path}" - bin.install "build/Deployment/contacts" - man1.install gzip("contacts.1") - end - - test do - output = shell_output("#{bin}/contacts -h 2>&1", 2) - assert_match "displays contacts from the AddressBook database", output - end -end diff --git a/Formula/container-diff.rb b/Formula/container-diff.rb deleted file mode 100644 index b61414944642e..0000000000000 --- a/Formula/container-diff.rb +++ /dev/null @@ -1,32 +0,0 @@ -class ContainerDiff < Formula - desc "Diff your Docker containers" - homepage "https://github.com/GoogleContainerTools/container-diff" - url "https://github.com/GoogleContainerTools/container-diff/archive/v0.14.0.tar.gz" - sha256 "5dbafdc38524dad60286da2d7a7d303285de2e08e070ce3dcc1488dbfecd116b" - - bottle do - cellar :any_skip_relocation - sha256 "08c168cd3c1886e1a97238bb71ed345d2bfaebcabf53bb09f0ca31c8f3282919" => :mojave - sha256 "ee1bcd0d01a88f6858a5792b5bd335d381c0102edae28ffc6ca2f7829a73b702" => :high_sierra - sha256 "34b9450a1cf011216a2b308087b5648cbeca33781947f2046270810c2cf950cb" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/GoogleContainerTools").mkpath - ln_sf buildpath, buildpath/"src/github.com/GoogleContainerTools/container-diff" - - cd "src/github.com/GoogleContainerTools/container-diff" do - system "make" - bin.install "out/container-diff" - end - end - - test do - image = "daemon://gcr.io/google-appengine/golang:2018-01-04_15_24" - output = shell_output("#{bin}/container-diff analyze #{image} 2>&1", 1) - assert_match "Cannot connect to the Docker daemon", output - end -end diff --git a/Formula/convertlit.rb b/Formula/convertlit.rb deleted file mode 100644 index e7757673c1335..0000000000000 --- a/Formula/convertlit.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Convertlit < Formula - desc "Convert Microsoft Reader format eBooks into open format" - homepage "http://www.convertlit.com/" - url "http://www.convertlit.com/clit18src.zip" - version "1.8" - sha256 "d70a85f5b945104340d56f48ec17bcf544e3bb3c35b1b3d58d230be699e557ba" - - bottle do - cellar :any_skip_relocation - sha256 "7d06d34736082be89b9e6c0db2fa42c4d2b4fb15469bef2922003d3d299680c8" => :mojave - sha256 "f41e31b1f6f53d1441bf670e75e0315f6a0f0e938de75e9973678ed565b6b4b8" => :high_sierra - sha256 "43e28e7711f27843223b29d351ba0ce03a4deee76bbc99c4bdac50969b8eaeb7" => :sierra - sha256 "66b05c2c6371f16620c82b31b507413556b511b859644322c65f4ceea4a83a64" => :el_capitan - sha256 "024a9fdb4b58a3e04c12ec300facbac636b3510f8726726c4be93c60cf272ab1" => :yosemite - sha256 "366ce6afb71223d3f14939c5d4d382a90cf56df7920cb41dca0eeae72e809702" => :mavericks - end - - depends_on "libtommath" - - def install - inreplace "clit18/Makefile" do |s| - s.gsub! "-I ../libtommath-0.30", "#{HOMEBREW_PREFIX}/include" - s.gsub! "../libtommath-0.30/libtommath.a", "#{HOMEBREW_PREFIX}/lib/libtommath.a" - end - - system "make", "-C", "lib" - system "make", "-C", "clit18" - bin.install "clit18/clit" - end -end diff --git a/Formula/convmv.rb b/Formula/convmv.rb deleted file mode 100644 index 96dd926eafb0b..0000000000000 --- a/Formula/convmv.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Convmv < Formula - desc "Filename encoding conversion tool" - homepage "https://www.j3e.de/linux/convmv/" - url "https://www.j3e.de/linux/convmv/convmv-2.05.tar.gz" - sha256 "53b6ac8ae4f9beaee5bc5628f6a5382bfd14f42a5bed3d881b829d7b52d81ca6" - - bottle do - cellar :any_skip_relocation - sha256 "8e5a0c8207cb0c57f1640c5a8c9a4a05cd9c8ffc68d922774cae4bfa56b691e6" => :mojave - sha256 "856021a73afb22052e496ced9eb1a7386d810a6d75903aac99feb98298801ea8" => :high_sierra - sha256 "cc6cf7ff9cfd8909a76e29dd6ddbdddc9ad95638e154b72a36fe6c255e3a367d" => :sierra - sha256 "43278a7c7ef7720e20fed3179ff8519230678d3fd4e98f4b0e8e796b5fdb40ac" => :el_capitan - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/convmv", "--list" - end -end diff --git a/Formula/convox.rb b/Formula/convox.rb deleted file mode 100644 index 3b8f851087a2b..0000000000000 --- a/Formula/convox.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Convox < Formula - desc "Command-line interface for the Rack PaaS on AWS" - homepage "https://convox.com/" - url "https://github.com/convox/rack/archive/20181211140404.tar.gz" - sha256 "8b2a95cd527f47cbfaa04701d5cb008de4ce417f0c2db35dd90cc3918807c226" - - bottle do - cellar :any_skip_relocation - sha256 "b7e3ac63e24ce3118aa60c27be8114324600a316f9b02fd9aec6480fac513492" => :mojave - sha256 "064a3777d6151c43a9a23594c084132d965e77722c0b69dac79862917f311f08" => :high_sierra - sha256 "8c30cb8a07dd581090ddc667feb813a77ba15b77e8f1e57d93d4275b2e3907f2" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/convox/rack").install Dir["*"] - system "go", "build", "-ldflags=-X main.version=#{version}", - "-o", bin/"convox", "-v", "github.com/convox/rack/cmd/convox" - prefix.install_metafiles - end - - test do - system bin/"convox" - end -end diff --git a/Formula/cookiecutter.rb b/Formula/cookiecutter.rb deleted file mode 100644 index 3e6ad05653218..0000000000000 --- a/Formula/cookiecutter.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Cookiecutter < Formula - include Language::Python::Virtualenv - - desc "Utility that creates projects from templates" - homepage "https://github.com/audreyr/cookiecutter" - url "https://github.com/audreyr/cookiecutter/archive/1.6.0.tar.gz" - sha256 "0c9018699b556b83d7c37b27fe0cc17485b90b6e1f47365b3cdddf77f6ca9d36" - revision 1 - head "https://github.com/audreyr/cookiecutter.git" - - bottle do - cellar :any_skip_relocation - sha256 "1e94cf29799e53ebf73c20b1a638f66de638956105e3085df99692d0346c1968" => :mojave - sha256 "b4934159cb33a5b992acd3b8e579d20b95b2571e8fc8625bb51752d8e6f2a405" => :high_sierra - sha256 "d8122f6df952099b7cba6d05930a12c1f4ec4c4dca65dfbd2cc9c536edbcc055" => :sierra - end - - depends_on "python" - - resource "arrow" do - url "https://files.pythonhosted.org/packages/54/db/76459c4dd3561bbe682619a5c576ff30c42e37c2e01900ed30a501957150/arrow-0.10.0.tar.gz" - sha256 "805906f09445afc1f0fc80187db8fe07670e3b25cdafa09b8d8ac264a8c0c722" - end - - resource "binaryornot" do - url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" - sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/20/d0/3f7a84b0c5b89e94abbd073a5f00c7176089f526edb056686751d5064cbd/certifi-2017.7.27.1.tar.gz" - sha256 "40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/Jinja2-2.9.6.tar.gz" - sha256 "ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff" - end - - resource "jinja2-time" do - url "https://files.pythonhosted.org/packages/de/7c/ee2f2014a2a0616ad3328e58e7dac879251babdb4cb796d770b5d32c469f/jinja2-time-0.2.0.tar.gz" - sha256 "d14eaa4d315e7688daa4969f616f226614350c48730bfa1692d2caebd8c90d40" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "poyo" do - url "https://files.pythonhosted.org/packages/9f/7a/d92b5cc1d2f6bf0f1c1cd427e1665a3b3889563ba25fbb66f50356954c45/poyo-0.4.1.tar.gz" - sha256 "103b4ee3e1c7765098fe1cabe43f828db2e2a6079646561a2117e1a809f352d6" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-2.6.1.tar.gz" - sha256 "891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "whichcraft" do - url "https://files.pythonhosted.org/packages/e5/cd/7fb54d4b3d43ed59ecb704fb96876831e0b493c4e24eecddd4ecb2442f5e/whichcraft-0.4.1.tar.gz" - sha256 "9e0d51c9387cb7e9f28b7edb549e6a03da758f7784f991eb4397d7f7808c57fd" - end - - def install - virtualenv_install_with_resources - end - - test do - system "git", "clone", "https://github.com/audreyr/cookiecutter-pypackage.git" - system bin/"cookiecutter", "--no-input", "cookiecutter-pypackage" - assert (testpath/"python_boilerplate").directory? - end -end diff --git a/Formula/coq.rb b/Formula/coq.rb deleted file mode 100644 index fc1e9163672cb..0000000000000 --- a/Formula/coq.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Coq < Formula - desc "Proof assistant for higher-order logic" - homepage "https://coq.inria.fr/" - url "https://github.com/coq/coq/archive/V8.8.2.tar.gz" - sha256 "f9f843b21fda18195fbf80c706bce8ac70ccb43cbd82f6916747dc6c22d05044" - head "https://github.com/coq/coq.git" - - bottle do - sha256 "45d2d54d36f617c14ba51b947b1b018d53c035d03adfc0025e69972560301136" => :mojave - sha256 "07db19453e504dcc0ec4ea96e54c4b7bcbee6fd9126dd2da0c0ad179ede6237e" => :high_sierra - sha256 "5598f52047139121c42cea869f01ed54b6f66e787918664f173e36bae5963e43" => :sierra - end - - depends_on "ocaml-findlib" => :build - depends_on "camlp5" - depends_on "ocaml" - depends_on "ocaml-num" - - def install - system "./configure", "-prefix", prefix, - "-mandir", man, - "-emacslib", elisp, - "-coqdocdir", "#{pkgshare}/latex", - "-coqide", "no", - "-with-doc", "no" - system "make", "world" - ENV.deparallelize { system "make", "install" } - end - - test do - (testpath/"testing.v").write <<~EOS - Require Coq.omega.Omega. - Require Coq.ZArith.ZArith. - - Inductive nat : Set := - | O : nat - | S : nat -> nat. - Fixpoint add (n m: nat) : nat := - match n with - | O => m - | S n' => S (add n' m) - end. - Lemma add_O_r : forall (n: nat), add n O = n. - Proof. - intros n; induction n; simpl; auto; rewrite IHn; auto. - Qed. - - Import Coq.omega.Omega. - Import Coq.ZArith.ZArith. - Open Scope Z. - Lemma add_O_r_Z : forall (n: Z), n + 0 = n. - Proof. - intros; omega. - Qed. - EOS - system("#{bin}/coqc", "#{testpath}/testing.v") - end -end diff --git a/Formula/corectl.rb b/Formula/corectl.rb deleted file mode 100644 index 5cbebbf955ffb..0000000000000 --- a/Formula/corectl.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Corectl < Formula - desc "CoreOS over macOS made very simple" - homepage "https://github.com/TheNewNormal/corectl" - url "https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz" - sha256 "9bdf7bc8c6a7bd861e2b723c0566d0a093ed5d5caf370a065a1708132b4ab98a" - revision 1 - head "https://github.com/TheNewNormal/corectl.git", :branch => "golang" - - bottle do - cellar :any - sha256 "0b7b837ae2b500b08b342dd0b2cf13cf5a21b56321e9da285767cde2b5c3b56d" => :mojave - sha256 "468a78c0f43c9d150313edadd23e4a373fa689243fcd0f6c48af79feb0b1854d" => :high_sierra - sha256 "9b83542911995f649091f49cd839c949e975ae71caa220cdc224dbb86f8fd638" => :sierra - sha256 "1d90b568db5c0ec1025b0bacb5b06b794b8e24d198cdcf036d2ff81ebd6168da" => :el_capitan - sha256 "ae67e7433832ac259736eaa9879e18d7b724f6ffc823f487b31eb1447780f72a" => :yosemite - end - - depends_on "aspcud" => :build - depends_on "go" => :build - depends_on "ocaml" => :build - depends_on "opam" => :build - depends_on "libev" - depends_on :macos => :yosemite - - def install - ENV["GOPATH"] = buildpath - - path = buildpath/"src/github.com/TheNewNormal/#{name}" - path.install Dir["*"] - - opamroot = path/"opamroot" - opamroot.mkpath - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - - args = [] - args << "VERSION=#{version}" if build.stable? - - cd path do - system "opam", "init", "--no-setup" - - # Upstream issue "OCaml 4.05.0 support - cannot build in Homebrew" - # Reported 23 Jul 2017 https://github.com/TheNewNormal/corectl/issues/119 - inreplace "opamroot/compilers/4.04.2/4.04.2/4.04.2.comp", - '["./configure"', '["./configure" "-no-graph"' - system "opam", "switch", "4.04.2" - - system "opam", "config", "exec", "--", "opam", "install", "uri", - "ocamlfind", "qcow-format", "conf-libev", "io-page<2", - "mirage-block-unix>2.3.0", "lwt<3.1.0" - (opamroot/"system/bin").install_symlink opamroot/"4.04.2/bin/qcow-tool" - system "opam", "config", "exec", "--", "make", "tarball", *args - - bin.install Dir["bin/*"] - - prefix.install_metafiles - man1.install Dir["documentation/man/*.1"] - pkgshare.install "examples" - end - end - - def caveats; <<~EOS - Starting with 0.7 "corectl" has a client/server architecture. So before you - can use the "corectl" cli, you have to start the server daemon: - - $ corectld start - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/corectl version") - end -end diff --git a/Formula/coreos-ct.rb b/Formula/coreos-ct.rb deleted file mode 100644 index 7b8472819c6ce..0000000000000 --- a/Formula/coreos-ct.rb +++ /dev/null @@ -1,33 +0,0 @@ -class CoreosCt < Formula - desc "Convert a Container Linux Config into Ignition" - homepage "https://coreos.com/os/docs/latest/configuration.html" - url "https://github.com/coreos/container-linux-config-transpiler/archive/v0.9.0.tar.gz" - sha256 "140c2a5bfd2562a069882e66c4aee01290417f35ef0db06e11e74b2ccf52de7f" - - bottle do - cellar :any_skip_relocation - sha256 "883c46865e141d74fa7f0815fc51d3f9ea3145019f28dcec402fc457d3f67e27" => :mojave - sha256 "5acd28f4e5dd0c74938cc7e7e10c5501badbab1d05316537a9afa173ff64f44e" => :high_sierra - sha256 "8f09ba9875fe34e55de7fd25514493f41276d5c5e9f3cd37e00288fb6d44323e" => :sierra - sha256 "9a48da5217b7e4b57e56702ee884fbc3067ccd895c2144cf7b02571cbcb80b42" => :el_capitan - end - - depends_on "go" => :build - - def install - system "make", "all", "VERSION=v#{version}" - bin.install "./bin/ct" - end - - test do - (testpath/"input").write <<~EOS - passwd: - users: - - name: core - ssh_authorized_keys: - - ssh-rsa mykey - EOS - output = shell_output("#{bin}/ct -pretty -in-file #{testpath}/input") - assert_match /.*"sshAuthorizedKeys":\s*["ssh-rsa mykey"\s*].*/m, output.strip - end -end diff --git a/Formula/coreutils.rb b/Formula/coreutils.rb deleted file mode 100644 index 672f1d17d2991..0000000000000 --- a/Formula/coreutils.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Coreutils < Formula - desc "GNU File, Shell, and Text utilities" - homepage "https://www.gnu.org/software/coreutils" - url "https://ftp.gnu.org/gnu/coreutils/coreutils-8.30.tar.xz" - mirror "https://ftpmirror.gnu.org/coreutils/coreutils-8.30.tar.xz" - sha256 "e831b3a86091496cdba720411f9748de81507798f6130adeaef872d206e1b057" - - bottle do - rebuild 1 - sha256 "6c14c4e69e2c5c17120067fd48c0ba54b949601d3b4f2dfc25f1668e5b367ca2" => :mojave - sha256 "5cd709bbc36209bd91cef80fcb871d5121b6e0ac146b38fdbbfafcf71617fddd" => :high_sierra - sha256 "a41b91ee571a16aab28996c80891e57ed6c5358d5a7f2ecf6ad13e927e33ea81" => :sierra - end - - head do - url "https://git.savannah.gnu.org/git/coreutils.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "gettext" => :build - depends_on "texinfo" => :build - depends_on "wget" => :build - depends_on "xz" => :build - end - - conflicts_with "ganglia", :because => "both install `gstat` binaries" - conflicts_with "gegl", :because => "both install `gcut` binaries" - conflicts_with "idutils", :because => "both install `gid` and `gid.1`" - conflicts_with "aardvark_shell_utils", :because => "both install `realpath` binaries" - - def install - if MacOS.version == :el_capitan - # Work around unremovable, nested dirs bug that affects lots of - # GNU projects. See: - # https://github.com/Homebrew/homebrew/issues/45273 - # https://github.com/Homebrew/homebrew/issues/44993 - # This is thought to be an el_capitan bug: - # https://lists.gnu.org/archive/html/bug-tar/2015-10/msg00017.html - ENV["gl_cv_func_getcwd_abort_bug"] = "no" - - # renameatx_np and RENAME_EXCL are available at compile time from Xcode 8 - # (10.12 SDK), but the former is not available at runtime. - inreplace "lib/renameat2.c", "defined RENAME_EXCL", "defined UNDEFINED_GIBBERISH" - end - - system "./bootstrap" if build.head? - - args = %W[ - --prefix=#{prefix} - --program-prefix=g - --without-gmp - ] - system "./configure", *args - system "make", "install" - - # Symlink all commands into libexec/gnubin without the 'g' prefix - coreutils_filenames(bin).each do |cmd| - (libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd - end - # Symlink all man(1) pages into libexec/gnuman without the 'g' prefix - coreutils_filenames(man1).each do |cmd| - (libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}" => cmd - end - - # Symlink non-conflicting binaries - bin.install_symlink "grealpath" => "realpath" - man1.install_symlink "grealpath.1" => "realpath.1" - end - - def caveats; <<~EOS - All commands have been installed with the prefix "g". - If you need to use these commands with their normal names, you - can add a "gnubin" directory to your PATH from your bashrc like: - PATH="#{opt_libexec}/gnubin:$PATH" - - Additionally, you can access their man pages with normal names if you add - the "gnuman" directory to your MANPATH from your bashrc as well: - MANPATH="#{opt_libexec}/gnuman:$MANPATH" - EOS - end - - def coreutils_filenames(dir) - filenames = [] - dir.find do |path| - next if path.directory? || path.basename.to_s == ".DS_Store" - filenames << path.basename.to_s.sub(/^g/, "") - end - filenames.sort - end - - test do - (testpath/"test").write("test") - (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test") - system bin/"gsha1sum", "-c", "test.sha1" - system bin/"gln", "-f", "test", "test.sha1" - end -end diff --git a/Formula/corkscrew.rb b/Formula/corkscrew.rb deleted file mode 100644 index 017918b2aaeb6..0000000000000 --- a/Formula/corkscrew.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Corkscrew < Formula - desc "Tunnel SSH through HTTP proxies" - homepage "https://packages.debian.org/sid/corkscrew" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/c/corkscrew/corkscrew_2.0.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/c/corkscrew/corkscrew_2.0.orig.tar.gz" - sha256 "0d0fcbb41cba4a81c4ab494459472086f377f9edb78a2e2238ed19b58956b0be" - - bottle do - cellar :any_skip_relocation - sha256 "c9a878e744506cee8a10b370ec59a2ebfb43b0a84c73ff02b67ba24f68c17938" => :mojave - sha256 "53e2a491ecc6b1446ed3dcf1fc9a8c44ca9735acd9d0626e7806dc80b5285e79" => :high_sierra - sha256 "85d9050689df4cf0ec3275957fad60609ea1a9511079f20f05470e1b767c94f2" => :sierra - sha256 "f7e4e63df01aa33a6518f4f6c2c0ccbb0c7b8aaca95052d4aa827b5e56ed8e5c" => :el_capitan - sha256 "5a0916aa242a22808bbbb652664f1e44620c1c78b896982f67c9a5a1b85a5efc" => :yosemite - sha256 "79ca3f19c2a8df1cd7b43410ab600d32c4fc7038f99998acb656e5cc61807f25" => :mavericks - sha256 "8844bb407417189b8ded9d8843017a86306f7832b776906d18db5817503faa84" => :mountain_lion - end - - depends_on "libtool" => :build - - def install - cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - require "open3" - require "webrick" - require "webrick/httpproxy" - - pid = fork do - proxy = WEBrick::HTTPProxyServer.new :Port => 8080 - proxy.start - end - - sleep 1 - - begin - Open3.popen3("#{bin}/corkscrew 127.0.0.1 8080 www.google.com 80") do |stdin, stdout, _| - stdin.write "GET /index.html HTTP/1.1\r\n\r\n" - assert_match "HTTP/1.1", stdout.gets("\r\n\r\n") - end - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/corsixth.rb b/Formula/corsixth.rb deleted file mode 100644 index 1fe557c61312a..0000000000000 --- a/Formula/corsixth.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Corsixth < Formula - desc "Open source clone of Theme Hospital" - homepage "https://github.com/CorsixTH/CorsixTH" - url "https://github.com/CorsixTH/CorsixTH/archive/v0.62.tar.gz" - sha256 "b219270310255493c881a09bb4a5569f34a72cdaf3c3be920c1036a2450317ce" - head "https://github.com/CorsixTH/CorsixTH.git" - - bottle do - rebuild 1 - sha256 "70626a4eebd24a186e7a41cb7fea3aaacc2d6942cda1b3bccebceb035b592d24" => :mojave - sha256 "05097a9e407ea4d7407fd869c44341e6f85e81ac22471f39778ebf319345f82a" => :high_sierra - sha256 "cfdcbdee3fe6f3bebc10ff7c2c4009d46e15ba42a78717741931dc36dd097f14" => :sierra - sha256 "b599f6fedf4dfe0c62d40b191007c51fa25f066c761e2fd251349b48ef0d59d8" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "luarocks" => :build - depends_on :xcode => :build - depends_on "ffmpeg" - depends_on "freetype" - depends_on "lua" - depends_on "sdl2" - depends_on "sdl2_mixer" - - resource "lpeg" do - url "https://ftp.openbsd.org/pub/OpenBSD/distfiles/lpeg-1.0.1.tar.gz" - mirror "https://ftp.heanet.ie/mirrors/ftp.openbsd.org/distfiles/lpeg-1.0.1.tar.gz" - sha256 "62d9f7a9ea3c1f215c77e0cadd8534c6ad9af0fb711c3f89188a8891c72f026b" - end - - resource "luafilesystem" do - url "https://github.com/keplerproject/luafilesystem/archive/v1_7_0_2.tar.gz" - sha256 "23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59" - end - - def install - ENV["TARGET_BUILD_DIR"] = "." - ENV["FULL_PRODUCT_NAME"] = "CorsixTH.app" - - luapath = libexec/"vendor" - ENV["LUA_PATH"] = "#{luapath}/share/lua/5.3/?.lua" - ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so" - - resources.each do |r| - r.stage do - system "luarocks", "build", r.name, "--tree=#{luapath}" - end - end - - system "cmake", ".", "-DLUA_INCLUDE_DIR=#{Formula["lua"].opt_include}/lua", - "-DLUA_LIBRARY=#{Formula["lua"].opt_lib}/liblua.dylib", - "-DLUA_PROGRAM_PATH=#{Formula["lua"].opt_bin}/lua", - *std_cmake_args - system "make" - prefix.install "CorsixTH/CorsixTH.app" - - env = { :LUA_PATH => ENV["LUA_PATH"], :LUA_CPATH => ENV["LUA_CPATH"] } - (bin/"CorsixTH").write_env_script(prefix/"CorsixTH.app/Contents/MacOS/CorsixTH", env) - end - - test do - app = prefix/"CorsixTH.app/Contents/MacOS/CorsixTH" - assert_includes MachO::Tools.dylibs(app), - "#{Formula["lua"].opt_lib}/liblua.5.3.dylib" - end -end diff --git a/Formula/cosi.rb b/Formula/cosi.rb deleted file mode 100644 index 26fd8b94532a3..0000000000000 --- a/Formula/cosi.rb +++ /dev/null @@ -1,103 +0,0 @@ -require "language/go" - -class Cosi < Formula - desc "Implementation of scalable collective signing" - homepage "https://github.com/dedis/cosi" - url "https://github.com/dedis/cosi/archive/0.8.5.tar.gz" - sha256 "7dd25c83a838ebadff3c8f6b8a5bd84702cf74e5e6eb545359b7816f89b85e73" - - bottle do - cellar :any_skip_relocation - sha256 "f368b353b76109a1ef3d4f3859bbac2179bf09bb8ce8a7d349a816d12e9fa298" => :mojave - sha256 "91a07519054c07be10182099d75adf74d017a74053d14985653e272ec1238fff" => :high_sierra - sha256 "b387fbd7aa15c4348e56fd1e28adbabee656cd142c979ea556e2d5e8dc56d4b1" => :sierra - sha256 "e73fd1b11e66d3931c91d6504b9958d44059aa4f3bbc547ed6cc8bdbc3717c6e" => :el_capitan - sha256 "2953f8c62a93c976bf450d9605cab850d6d442e9e1885f3a455243942e59f6dd" => :yosemite - sha256 "73d73bd817f6700c751a9065133ea460115ee5e5dbbff89d0655137bee30ef1f" => :mavericks - end - - depends_on "go" => :build - - go_resource "github.com/BurntSushi/toml" do - url "https://github.com/BurntSushi/toml.git", - :revision => "f0aeabca5a127c4078abb8c8d64298b147264b55" - end - - go_resource "github.com/daviddengcn/go-colortext" do - url "https://github.com/daviddengcn/go-colortext.git", - :revision => "511bcaf42ccd42c38aba7427b6673277bf19e2a1" - end - - go_resource "github.com/dedis/crypto" do - url "https://github.com/dedis/crypto.git", - :revision => "d9272cb478c0942e1d60049e6df219cba2067fcd" - end - - go_resource "github.com/dedis/protobuf" do - url "https://github.com/dedis/protobuf.git", - :revision => "6948fbd96a0f1e4e96582003261cf647dc66c831" - end - - go_resource "github.com/montanaflynn/stats" do - url "https://github.com/montanaflynn/stats.git", - :revision => "60dcacf48f43d6dd654d0ed94120ff5806c5ca5c" - end - - go_resource "github.com/satori/go.uuid" do - url "https://github.com/satori/go.uuid.git", - :revision => "f9ab0dce87d815821e221626b772e3475a0d2749" - end - - go_resource "golang.org/x/net" do - url "https://go.googlesource.com/net.git", - :revision => "0c607074acd38c5f23d1344dfe74c977464d1257" - end - - go_resource "gopkg.in/codegangsta/cli.v1" do - url "https://gopkg.in/codegangsta/cli.v1.git", - :revision => "01857ac33766ce0c93856370626f9799281c14f4" - end - - go_resource "gopkg.in/dedis/cothority.v0" do - url "https://gopkg.in/dedis/cothority.v0.git", - :revision => "e5eb384290e5fd98b8cb150a1348661aa2d49e2a" - end - - def install - mkdir_p buildpath/"src/github.com/dedis" - ln_s buildpath, buildpath/"src/github.com/dedis/cosi" - - ENV["GOPATH"] = "#{buildpath}/Godeps/_workspace:#{buildpath}" - - Language::Go.stage_deps resources, buildpath/"src" - - system "go", "build", "-o", "cosi" - prefix.install "dedis_group.toml" - bin.install "cosi" - end - - test do - (testpath/"config.toml").write <<~EOS - Public = "7b6d6361686d0c76d9f4b40961736eb5d0849f7db3f8bfd8f869b8015d831d45" - Private = "01a80f4fef21db2aea18e5288fe9aa71324a8ad202609139e5cfffc4ffdc4484" - Addresses = ["0.0.0.0:6879"] - EOS - (testpath/"group.toml").write <<~EOS - [[servers]] - Addresses = ["127.0.0.1:6879"] - Public = "e21jYWhtDHbZ9LQJYXNutdCEn32z+L/Y+Gm4AV2DHUU=" - EOS - begin - file = prefix/"README.md" - sig = "README.sig" - pid = fork { exec bin/"cosi", "server", "-config", "config.toml" } - sleep 2 - assert_match "Success", shell_output("#{bin}/cosi check -g group.toml") - system bin/"cosi", "sign", "-g", "group.toml", "-o", sig, file - out = shell_output("#{bin}/cosi verify -g group.toml -s #{sig} #{file}") - assert_match "OK", out - ensure - Process.kill("TERM", pid) - end - end -end diff --git a/Formula/coturn.rb b/Formula/coturn.rb deleted file mode 100644 index be17d692f1829..0000000000000 --- a/Formula/coturn.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Coturn < Formula - desc "Free open source implementation of TURN and STUN Server" - homepage "https://github.com/coturn/coturn" - url "http://turnserver.open-sys.org/downloads/v4.5.0.7/turnserver-4.5.0.7.tar.gz" - sha256 "86248c541a1184eb388c54d4178cffbf16ef53504fbb60106e575194f078b221" - - bottle do - sha256 "33e924b07dcc67b74ab28fb262f5bfe09e526ca2fb17cf9c195962b167e654af" => :mojave - sha256 "275b217ccdf59713da3850782079387a78f24d0c1a35a9b23e67e01695f9e340" => :high_sierra - sha256 "079bdbb8abae75b20318710269f57b16c53088bae5c55d15073e6199f0526008" => :sierra - sha256 "2aef5b4ca2b27abfefaa9b90fec75328839f7e02b601d83d9b3afe984240c49f" => :el_capitan - end - - depends_on "libevent" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--mandir=#{man}", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - system "#{bin}/turnadmin", "-l" - end -end diff --git a/Formula/couchdb-lucene.rb b/Formula/couchdb-lucene.rb deleted file mode 100644 index a8007835b23e5..0000000000000 --- a/Formula/couchdb-lucene.rb +++ /dev/null @@ -1,109 +0,0 @@ -class CouchdbLucene < Formula - desc "Full-text search of CouchDB documents using Lucene" - homepage "https://github.com/rnewson/couchdb-lucene" - url "https://github.com/rnewson/couchdb-lucene/archive/v2.1.0.tar.gz" - sha256 "8297f786ab9ddd86239565702eb7ae8e117236781144529ed7b72a967224b700" - - bottle do - cellar :any_skip_relocation - sha256 "f3e85424a41a44baaf289687576b1d2bf39ae76e68d504d6260f90fb2ab08594" => :mojave - sha256 "7e921fbcc3d95efef140e77283d8f6a2627f70afdcc02c7202f1c3a8d1042477" => :high_sierra - sha256 "772001fc7739ea21f359763b35125e4de4b2739872b7bba8fc933d1f59d25a18" => :sierra - sha256 "cd92c8cd8f4759a2525c02b54fbefccde7e15afd071f7bd9d3c2b1ef5dd00fef" => :el_capitan - end - - depends_on "maven" => :build - depends_on "couchdb" - depends_on :java - - def install - system "mvn" - system "tar", "-xzf", "target/couchdb-lucene-#{version}-dist.tar.gz", "--strip", "1" - - prefix.install_metafiles - rm_rf Dir["bin/*.bat"] - libexec.install Dir["*"] - - Dir.glob("#{libexec}/bin/*") do |path| - bin_name = File.basename(path) - cmd = "cl_#{bin_name}" - (bin/cmd).write shim_script(bin_name) - (libexec/"clbin").install_symlink bin/cmd => bin_name - end - - ini_path.write(ini_file) unless ini_path.exist? - end - - def shim_script(target); <<~EOS - #!/bin/bash - export CL_BASEDIR=#{libexec}/bin - exec "$CL_BASEDIR/#{target}" "$@" - EOS - end - - def ini_path - etc/"couchdb/local.d/couchdb-lucene.ini" - end - - def ini_file; <<~EOS - [httpd_global_handlers] - _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>} - EOS - end - - def caveats; <<~EOS - All commands have been installed with the prefix 'cl_'. - - If you really need to use these commands with their normal names, you - can add a "clbin" directory to your PATH from your bashrc like: - - PATH="#{opt_libexec}/clbin:$PATH" - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/couchdb-lucene/bin/cl_run" - - def plist; <<~EOS - - - - - Label - #{plist_name} - EnvironmentVariables - - HOME - ~ - - ProgramArguments - - #{opt_bin}/cl_run - - StandardOutPath - /dev/null - StandardErrorPath - /dev/null - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - # This seems to be the easiest way to make the test play nicely in our - # sandbox. If it works here, it'll work in the normal location though. - cp_r Dir[opt_prefix/"*"], testpath - inreplace "bin/cl_run", "CL_BASEDIR=#{libexec}/bin", - "CL_BASEDIR=#{testpath}/libexec/bin" - - io = IO.popen("#{testpath}/bin/cl_run") - sleep 2 - Process.kill("SIGINT", io.pid) - Process.wait(io.pid) - io.read !~ /Exception/ - end -end diff --git a/Formula/couchdb.rb b/Formula/couchdb.rb deleted file mode 100644 index 8c89527541da5..0000000000000 --- a/Formula/couchdb.rb +++ /dev/null @@ -1,220 +0,0 @@ -class Couchdb < Formula - desc "Document database server" - homepage "https://couchdb.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=/couchdb/source/1.7.1/apache-couchdb-1.7.1.tar.gz" - mirror "https://archive.apache.org/dist/couchdb/source/1.7.1/apache-couchdb-1.7.1.tar.gz" - sha256 "91200aa6fbc6fa5e2f3d78ef40e39d8c1ec7c83ea1c2cd730d270658735b2cad" - revision 8 - - bottle do - sha256 "81a9ef09e872ead7a3ae847f57f6cd01f4e7e46384c456b1cf4162cf7eecab42" => :mojave - sha256 "726a7e2329d938f0d64552a2b5c724fc665b5de8b1d046c9fdbd270cf941ba44" => :high_sierra - sha256 "3b5ed55595f163362f6a583a13fae6353c79b2cf9e66f0d35bcf7e5f13a38613" => :sierra - end - - head do - url "https://github.com/apache/couchdb.git" - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "help2man" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - end - - option "with-geocouch", "Build with GeoCouch spatial index extension" - - depends_on "erlang@19" - depends_on "icu4c" - depends_on "spidermonkey" - - resource "geocouch" do - url "https://github.com/couchbase/geocouch/archive/couchdb1.3.x.tar.gz" - sha256 "1bad2275756e2f03151d7b2706c089b3059736130612de279d879db91d4b21e7" - end - - def install - # CouchDB >=1.3.0 supports vendor names and versioning - # in the welcome message - inreplace "etc/couchdb/default.ini.tpl.in" do |s| - s.gsub! "%package_author_name%", "Homebrew" - s.gsub! "%version%", pkg_version - end - - unless build.stable? - # workaround for the auto-generation of THANKS file which assumes - # a developer build environment incl access to git sha - touch "THANKS" - system "./bootstrap" - end - - system "./configure", "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sysconfdir=#{etc}", - "--disable-init", - "--with-erlang=#{Formula["erlang@19"].opt_lib}/erlang/usr/include", - "--with-js-include=#{HOMEBREW_PREFIX}/include/js", - "--with-js-lib=#{HOMEBREW_PREFIX}/lib" - system "make" - system "make", "install" - - install_geocouch if build.with? "geocouch" - - # Use our plist instead to avoid faffing with a new system user. - (prefix/"Library/LaunchDaemons/org.apache.couchdb.plist").delete - (lib/"couchdb/bin/couchjs").chmod 0755 - end - - def geocouch_share - share/"couchdb-geocouch" - end - - def install_geocouch - resource("geocouch").stage(buildpath/"geocouch") - ENV["COUCH_SRC"] = "#{buildpath}/src/couchdb" - - cd "geocouch" do - system "make" - - linked_geocouch_share = (HOMEBREW_PREFIX/"share/couchdb-geocouch") - geocouch_share.mkpath - geocouch_share.install "ebin" - # Install geocouch.plist for launchctl support. - geocouch_plist = geocouch_share/"geocouch.plist" - cp buildpath/"etc/launchd/org.apache.couchdb.plist.tpl.in", geocouch_plist - geocouch_plist.chmod 0644 - inreplace geocouch_plist, "org.apache.couchdb", \ - "geocouch" - inreplace geocouch_plist, "HOME", <<~EOS.lstrip.chop - ERL_FLAGS - -pa #{linked_geocouch_share}/ebin - HOME - EOS - inreplace geocouch_plist, "%bindir%/%couchdb_command_name%", \ - HOMEBREW_PREFIX/"bin/couchdb" - # Turn off RunAtLoad and KeepAlive (to simplify experience for first-timers) - inreplace geocouch_plist, "RunAtLoad\n ", - "RunAtLoad\n " - inreplace geocouch_plist, "KeepAlive\n ", - "KeepAlive\n " - # Install geocouch.ini into couchdb. - (etc/"couchdb/default.d").install "etc/couchdb/default.d/geocouch.ini" - - # Install tests into couchdb. - test_files = Dir["share/www/script/test/*.js"] - (pkgshare/"www/script/test").install test_files - # Complete the install by referencing the geocouch tests in couch_tests.js - # (which runs the tests). - test_lines = ["// GeoCouch Tests..."] - test_lines.concat(test_files.map { |file| file.gsub(%r{^.*\/(.*)$}, 'loadTest("\1");') }) - test_lines << "// ...GeoCouch Tests" - (pkgshare/"www/script/couch_tests.js").append_lines test_lines - end - end - - def post_install - (var/"lib/couchdb").mkpath - (var/"log/couchdb").mkpath - (var/"run/couchdb").mkpath - # default.ini is owned by CouchDB and marked not user-editable - # and must be overwritten to ensure correct operation. - if (etc/"couchdb/default.ini.default").exist? - # but take a backup just in case the user didn't read the warning. - mv etc/"couchdb/default.ini", etc/"couchdb/default.ini.old" - mv etc/"couchdb/default.ini.default", etc/"couchdb/default.ini" - end - end - - def caveats - str = <<~EOS - To test CouchDB run: - curl http://127.0.0.1:5984/ - The reply should look like: - {"couchdb":"Welcome","uuid":"....","version":"#{version}","vendor":{"version":"#{version}-1","name":"Homebrew"}} - EOS - str += "\n#{geocouch_caveats}" if build.with? "geocouch" - str - end - - def geocouch_caveats; <<~EOS - GeoCouch Caveats: - FYI: geocouch installs as an extension of couchdb, so couchdb effectively - becomes geocouch. However, you can use couchdb normally (using geocouch - extensions optionally). NB: one exception: the couchdb test suite now - includes several geocouch tests. - To start geocouch manually and verify any geocouch version information (-V), - ERL_FLAGS="-pa #{geocouch_share}/ebin" couchdb -V - For general convenience, export your ERL_FLAGS (erlang flags, above) in - your login shell, and then start geocouch: - export ERL_FLAGS="-pa #{geocouch_share}/ebin" - couchdb - Alternately, prepare launchctl to start/stop geocouch as follows: - cp #{geocouch_share}/geocouch.plist ~/Library/LaunchAgents - chmod 0644 ~/Library/LaunchAgents/geocouch.plist - launchctl load ~/Library/LaunchAgents/geocouch.plist - Then start, check status of, and stop geocouch with the following three - commands. - launchctl start geocouch - launchctl list geocouch - launchctl stop geocouch - Finally, access, test, and configure your new geocouch with: - http://127.0.0.1:5984 - http://127.0.0.1:5984/_utils/couch_tests.html?script/couch_tests.js - http://127.0.0.1:5984/_utils - And... relax. - -=- - To uninstall geocouch from your couchdb installation, uninstall couchdb - and re-install it without the '--with-geocouch' option. - brew uninstall couchdb - brew install couchdb - To see these instructions again, just run 'brew info couchdb'. - EOS - end - - plist_options :manual => "couchdb" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/couchdb - - RunAtLoad - - - - EOS - end - - test do - # ensure couchdb embedded spidermonkey vm works - system "#{bin}/couchjs", "-h" - - (testpath/"var/lib/couchdb").mkpath - (testpath/"var/log/couchdb").mkpath - (testpath/"var/run/couchdb").mkpath - cp_r etc/"couchdb", testpath - inreplace "#{testpath}/couchdb/default.ini", "/usr/local/var", testpath/"var" - - pid = fork do - ENV["ERL_LIBS"] = geocouch_share if build.with? "geocouch" - exec "#{bin}/couchdb -A #{testpath}/couchdb" - end - sleep 2 - - begin - assert_match "Homebrew", shell_output("curl -# localhost:5984") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/couchpotatoserver.rb b/Formula/couchpotatoserver.rb deleted file mode 100644 index 84cdba8bcca1f..0000000000000 --- a/Formula/couchpotatoserver.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Couchpotatoserver < Formula - desc "Download movies automatically" - homepage "https://couchpota.to" - url "https://github.com/CouchPotato/CouchPotatoServer/archive/build/3.0.1.tar.gz" - sha256 "f08f9c6ac02f66c6667f17ded1eea4c051a62bbcbadd2a8673394019878e92f7" - head "https://github.com/CouchPotato/CouchPotatoServer.git" - - bottle :unneeded - - def install - prefix.install_metafiles - libexec.install Dir["*"] - (bin+"couchpotatoserver").write(startup_script) - end - - def caveats - "CouchPotatoServer defaults to port 5050." - end - - plist_options :manual => "couchpotatoserver" - - def plist; <<~EOS - - - - Label - #{plist_name} - Program - #{opt_bin}/couchpotatoserver - ProgramArguments - - --quiet - --daemon - - RunAtLoad - - UserName - #{`whoami`.chomp} - - - EOS - end - - def startup_script; <<~EOS - #!/bin/bash - python "#{libexec}/CouchPotato.py"\ - "--pid_file=#{var}/run/couchpotatoserver.pid"\ - "--data_dir=#{etc}/couchpotatoserver"\ - "$@" - EOS - end - - test do - system "#{bin}/couchpotatoserver", "--help" - end -end diff --git a/Formula/cowsay.rb b/Formula/cowsay.rb deleted file mode 100644 index 0691da1f4c090..0000000000000 --- a/Formula/cowsay.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Cowsay < Formula - desc "Configurable talking characters in ASCII art" - # Historical homepage: https://web.archive.org/web/20120225123719/www.nog.net/~tony/warez/cowsay.shtml - homepage "https://github.com/tnalpgge/rank-amateur-cowsay" - url "https://github.com/tnalpgge/rank-amateur-cowsay/archive/cowsay-3.04.tar.gz" - sha256 "d8b871332cfc1f0b6c16832ecca413ca0ac14d58626491a6733829e3d655878b" - - bottle do - cellar :any_skip_relocation - sha256 "bff466bf07d7aba50b954b4b37b15eb338da542244450843ed6f1fd8223a5eab" => :mojave - sha256 "9dd1c2263533507d55a6cfc8747ad6a68c0c042c7631512f0611001831dd441c" => :high_sierra - sha256 "17a1a4620885c9a4b7104b43072ed32348b37f6bb43a1120fe23a46d893e87ea" => :sierra - sha256 "360390af15a3c4793e07eda95f55f4a5466ffafc766cb6b62f9790146080a62a" => :el_capitan - sha256 "a622af361a6139bc930b371fbde7cfc54bbe8bebfbbe0782e59248fadb10b95f" => :yosemite - sha256 "185bfafd379cd6f6d6202fdae0750fdd2998cc94f33ea349bd4872a0274cb1dc" => :mavericks - end - - def install - system "/bin/sh", "install.sh", prefix - mv prefix/"man", share - end - - test do - output = shell_output("#{bin}/cowsay moo") - assert_match "moo", output # bubble - assert_match "^__^", output # cow - end -end diff --git a/Formula/cp2k.rb b/Formula/cp2k.rb deleted file mode 100644 index c118870de457d..0000000000000 --- a/Formula/cp2k.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Cp2k < Formula - desc "Quantum chemistry and solid state physics software package" - homepage "https://www.cp2k.org/" - url "https://github.com/cp2k/cp2k/releases/download/v5.1.0/cp2k-5.1.tar.bz2" - sha256 "e23613b593354fa82e0b8410e17d94c607a0b8c6d9b5d843528403ab09904412" - revision 3 - - bottle do - sha256 "e6661ebbbe0fc750e0ac29b5af3c446ddf9cada8f591e4213a92062ff6712143" => :mojave - sha256 "17cdb9a1f81822af9d6c1c38a5b5039048d6eac2872e21cbd7b180e10d5661f7" => :high_sierra - sha256 "dbf6ab8c96d9b9e6e8042af33d82fd709712987044620ef10cd4b8cf7be6b8f4" => :sierra - end - - depends_on "fftw" - depends_on "gcc" # for gfortran - depends_on "libxc" - depends_on "open-mpi" - depends_on "scalapack" - - fails_with :clang # needs OpenMP support - - resource "libint" do - url "https://downloads.sourceforge.net/project/libint/v1-releases/libint-1.1.5.tar.gz" - sha256 "31d7dd553c7b1a773863fcddc15ba9358bdcc58f5962c9fcee1cd24f309c4198" - end - - def install - resource("libint").stage do - system "./configure", "--prefix=#{libexec}" - system "make" - ENV.deparallelize { system "make", "install" } - end - - fcflags = %W[ - -I#{Formula["libxc"].opt_include} - -I#{Formula["fftw"].opt_include} - -I#{libexec}/include - ] - - libs = %W[ - -L#{Formula["libxc"].opt_lib} - -lxcf90 - -lxc - -L#{libexec}/lib - -lderiv - -lint - -L#{Formula["fftw"].opt_lib} - -lfftw3 - ] - - # CP2K configuration is done through editing of arch files - inreplace Dir["arch/Darwin-IntelMacintosh-gfortran.*"].each do |s| - s.gsub! /DFLAGS *=/, "DFLAGS = -D__LIBXC -D__FFTW3 -D__LIBINT" - s.gsub! /FCFLAGS *=/, "FCFLAGS = #{fcflags.join(" ")}" - s.gsub! /LIBS *=/, "LIBS = #{libs.join(" ")}" - end - - # MPI versions link to scalapack - inreplace Dir["arch/Darwin-IntelMacintosh-gfortran.p*"], - /LIBS *=/, "LIBS = -L#{Formula["scalapack"].opt_prefix}/lib" - - # OpenMP versions link to specific fftw3 library - inreplace Dir["arch/Darwin-IntelMacintosh-gfortran.*smp"], - "-lfftw3", "-lfftw3 -lfftw3_threads" - - # Now we build - cd "makefiles" do - %w[sopt ssmp popt psmp].each do |exe| - system "make", "ARCH=Darwin-IntelMacintosh-gfortran", "VERSION=#{exe}" - bin.install "../exe/Darwin-IntelMacintosh-gfortran/cp2k.#{exe}" - bin.install "../exe/Darwin-IntelMacintosh-gfortran/cp2k_shell.#{exe}" - end - end - - (pkgshare/"tests").install "tests/Fist/water512.inp" - end - - test do - system "#{bin}/cp2k.sopt", "#{pkgshare}/tests/water512.inp" - system "#{bin}/cp2k.ssmp", "#{pkgshare}/tests/water512.inp" - system "mpirun", "#{bin}/cp2k.popt", "#{pkgshare}/tests/water512.inp" - system "mpirun", "#{bin}/cp2k.psmp", "#{pkgshare}/tests/water512.inp" - end -end diff --git a/Formula/cpanminus.rb b/Formula/cpanminus.rb deleted file mode 100644 index 21cd1389c2728..0000000000000 --- a/Formula/cpanminus.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Cpanminus < Formula - desc "Get, unpack, build, and install modules from CPAN" - homepage "https://github.com/miyagawa/cpanminus" - url "https://github.com/miyagawa/cpanminus/archive/1.9019.tar.gz" - sha256 "d0a37547a3c4b6dbd3806e194cd6cf4632158ebed44d740ac023e0739538fb46" - head "https://github.com/miyagawa/cpanminus.git" - - bottle :unneeded - - def install - cd "App-cpanminus" do - bin.install "cpanm" - end - end - - test do - system "#{bin}/cpanm", "Test::More" - end -end diff --git a/Formula/cpansearch.rb b/Formula/cpansearch.rb deleted file mode 100644 index 134bc5adc64b1..0000000000000 --- a/Formula/cpansearch.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cpansearch < Formula - desc "CPAN module search written in C" - homepage "https://github.com/c9s/cpansearch" - url "https://github.com/c9s/cpansearch/archive/0.2.tar.gz" - sha256 "09e631f361766fcacd608a0f5b3effe7b66b3a9e0970a458d418d58b8f3f2a74" - head "https://github.com/c9s/cpansearch.git" - - bottle do - cellar :any - rebuild 1 - sha256 "69d0e81fd62ba200820ccb848d4b10d970cf01146724653652434d36743a5356" => :mojave - sha256 "5d9c3bb958793897bc8933394d1a6a62df3c60a0f96bd8ac33f6486a3f62e8cd" => :high_sierra - sha256 "29e1acab7f1755337460172f853968b116d831b43948f6727f5565f3b9ce248e" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000 - - def install - system "make" - bin.install "cpans" - end - - test do - output = shell_output("#{bin}/cpans --fetch https://cpan.metacpan.org/") - assert_match "packages recorded", output - end -end diff --git a/Formula/cpmtools.rb b/Formula/cpmtools.rb deleted file mode 100644 index 34a33c1e95021..0000000000000 --- a/Formula/cpmtools.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Cpmtools < Formula - desc "Tools to access CP/M file systems" - homepage "http://www.moria.de/~michael/cpmtools/" - url "http://www.moria.de/~michael/cpmtools/files/cpmtools-2.20.tar.gz" - sha256 "d8c7e78a9750994124f3aab6e461da8fa0021acc7dbad76eafbac8b0ed8279d3" - revision 1 - - bottle do - sha256 "2a7281836c39574fe905ee34110756703298b774984d6796663c55d04dee7ea2" => :mojave - sha256 "c4d8d3aa660ecea66f519582bd216b37e2f23b0c6714e70ad297c913fb297fe9" => :high_sierra - sha256 "996f6ec337721c7d57a6c5b033ed4653b6a1f5f4998304c85e2a809c7e1cf0f0" => :sierra - sha256 "e3fdab874e376cacefccd916de4c96bfaada75d1cc5af6f53e6bf9a625d3aa72" => :el_capitan - end - - depends_on "libdsk" - - def install - system "./configure", "--prefix=#{prefix}", "--with-libdsk" - - bin.mkpath - man1.mkpath - man5.mkpath - - system "make", "install" - end - - test do - # make a disk image - image = testpath/"disk.cpm" - system "#{bin}/mkfs.cpm", "-f", "ibm-3740", image - - # copy a file into the disk image - src = testpath/"foo" - src.write "a" * 128 - system "#{bin}/cpmcp", "-f", "ibm-3740", image, src, "0:foo" - - # check for the file in the cp/m directory - assert_match "foo", shell_output("#{bin}/cpmls -f ibm-3740 #{image}") - - # copy the file back out of the image - dest = testpath/"bar" - system "#{bin}/cpmcp", "-f", "ibm-3740", image, "0:foo", dest - assert_equal src.read, dest.read - end -end diff --git a/Formula/cppad.rb b/Formula/cppad.rb deleted file mode 100644 index 6e1fc2b99dbe5..0000000000000 --- a/Formula/cppad.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Cppad < Formula - desc "Differentiation of C++ Algorithms" - homepage "https://www.coin-or.org/CppAD" - # Stable versions have numbers of the form 201x0000.y - url "https://github.com/coin-or/CppAD/archive/20180000.0.tar.gz" - sha256 "a5226e4c5aa2ad6d95668f987b39939315bf134a0a793231984e6d42d6488cca" - version_scheme 1 - head "https://github.com/coin-or/CppAD.git" - - bottle do - cellar :any_skip_relocation - sha256 "15cc465d5de68c2d4a785fedbdcc5e25f9c9eeddbd7ed7b9b755296012340cc2" => :mojave - sha256 "b34a0370d6dad092cddb2198d27ff976d2bd146aefbaf16673f35e711776eda7" => :high_sierra - sha256 "b34a0370d6dad092cddb2198d27ff976d2bd146aefbaf16673f35e711776eda7" => :sierra - sha256 "b34a0370d6dad092cddb2198d27ff976d2bd146aefbaf16673f35e711776eda7" => :el_capitan - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-Dcppad_prefix=#{prefix}" - system "make", "install" - end - pkgshare.install "example" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main(void) { - extern bool acos(void); - bool ok = acos(); - assert(ok); - return static_cast(!ok); - } - EOS - - system ENV.cxx, "#{pkgshare}/example/general/acos.cpp", "-I#{include}", - "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/cppcheck.rb b/Formula/cppcheck.rb deleted file mode 100644 index ed550d38a8d8a..0000000000000 --- a/Formula/cppcheck.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Cppcheck < Formula - desc "Static analysis of C and C++ code" - homepage "https://sourceforge.net/projects/cppcheck/" - url "https://github.com/danmar/cppcheck/archive/1.86.tar.gz" - sha256 "86ea85c2ee5ec31a7410bfc7c206b87e600d284089428750d66d1ce1ffa0c9a6" - head "https://github.com/danmar/cppcheck.git" - - bottle do - sha256 "62bc7a5de5fcd3ab3bed91c3e845496553bd4ec1d7dccf043e724e4bfdf36083" => :mojave - sha256 "f284c2e2b62b1a341c7c0c65d70e1c8e89e260e8a3c6346d0a2f40fe27e381de" => :high_sierra - sha256 "b67435545ca439c8cba2656ce28f71f8b66c01c2c42f7c6ad650eeeaff0aa655" => :sierra - end - - depends_on "pcre" - - needs :cxx11 - - def install - ENV.cxx11 - - system "make", "HAVE_RULES=yes", "CFGDIR=#{prefix}/cfg" - - # CFGDIR is relative to the prefix for install, don't add #{prefix}. - system "make", "DESTDIR=#{prefix}", "BIN=#{bin}", "CFGDIR=/cfg", "install" - - # Move the python addons to the cppcheck pkgshare folder - (pkgshare/"addons").install Dir.glob(bin/"*.py") - end - - test do - # Execution test with an input .cpp file - test_cpp_file = testpath/"test.cpp" - test_cpp_file.write <<~EOS - #include - using namespace std; - - int main() - { - cout << "Hello World!" << endl; - return 0; - } - - class Example - { - public: - int GetNumber() const; - explicit Example(int initialNumber); - private: - int number; - }; - - Example::Example(int initialNumber) - { - number = initialNumber; - } - EOS - system "#{bin}/cppcheck", test_cpp_file - - # Test the "out of bounds" check - test_cpp_file_check = testpath/"testcheck.cpp" - test_cpp_file_check.write <<~EOS - int main() - { - char a[10]; - a[10] = 0; - return 0; - } - EOS - output = shell_output("#{bin}/cppcheck #{test_cpp_file_check} 2>&1") - assert_match "out of bounds", output - - # Test the addon functionality: sampleaddon.py imports the cppcheckdata python - # module and uses it to parse a cppcheck dump into an OOP structure. We then - # check the correct number of detected tokens and function names. - addons_dir = pkgshare/"addons" - cppcheck_module = "#{name}data" - expect_token_count = 55 - expect_function_names = "main,GetNumber,Example" - assert_parse_message = "Error: sampleaddon.py: failed: can't parse the #{name} dump." - - sample_addon_file = testpath/"sampleaddon.py" - sample_addon_file.write <<~EOS - #!/usr/bin/env python - """A simple test addon for #{name}, prints function names and token count""" - import sys - import imp - # Manually import the '#{cppcheck_module}' module - CFILE, FNAME, CDATA = imp.find_module("#{cppcheck_module}", ["#{addons_dir}"]) - CPPCHECKDATA = imp.load_module("#{cppcheck_module}", CFILE, FNAME, CDATA) - - for arg in sys.argv[1:]: - # Parse the dump file generated by #{name} - configKlass = CPPCHECKDATA.parsedump(arg) - if len(configKlass.configurations) == 0: - sys.exit("#{assert_parse_message}") # Parse failure - fConfig = configKlass.configurations[0] - # Pick and join the function names in a string, separated by ',' - detected_functions = ','.join(fn.name for fn in fConfig.functions) - detected_token_count = len(fConfig.tokenlist) - # Print the function names on the first line and the token count on the second - print "%s\\n%s" %(detected_functions, detected_token_count) - EOS - - system "#{bin}/cppcheck", "--dump", test_cpp_file - test_cpp_file_dump = "#{test_cpp_file}.dump" - assert_predicate testpath/test_cpp_file_dump, :exist? - output = shell_output("python #{sample_addon_file} #{test_cpp_file_dump}") - assert_match "#{expect_function_names}\n#{expect_token_count}", output - end -end diff --git a/Formula/cppcms.rb b/Formula/cppcms.rb deleted file mode 100644 index fb089648bb7a8..0000000000000 --- a/Formula/cppcms.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Cppcms < Formula - desc "Free High Performance Web Development Framework" - homepage "http://cppcms.com/wikipp/en/page/main" - url "https://downloads.sourceforge.net/project/cppcms/cppcms/1.2.1/cppcms-1.2.1.tar.bz2" - sha256 "10fec7710409c949a229b9019ea065e25ff5687103037551b6f05716bf6cac52" - - bottle do - cellar :any - sha256 "a8080faa8c88e67f769390bb4f2b7ea90f008551c35e8e9df8b926d32e8adb3a" => :mojave - sha256 "9bb4d1f81736af36f781083a13ca6a17525ef14f331d60c308370978275d878b" => :high_sierra - sha256 "ad90e817edf7dbec0cf35fecd3b8422bda8ceafc790a61f3c33d30f4e843d419" => :sierra - sha256 "c42e2ea6f03634f436ae3bd3fb816ef3e0de10e86421fafa63b93f0d2005f957" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "openssl" - depends_on "pcre" - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"hello.cpp").write <<~EOS - #include - #include - #include - #include - #include - #include - - class hello : public cppcms::application { - public: - hello(cppcms::service& srv): cppcms::application(srv) {} - virtual void main(std::string url); - }; - - void hello::main(std::string /*url*/) - { - response().out() << - "\\n" - "\\n" - "

Hello World

\\n" - "\\n" - "\\n"; - } - - int main(int argc,char ** argv) - { - try { - cppcms::service srv(argc,argv); - srv.applications_pool().mount( - cppcms::applications_factory() - ); - srv.run(); - return 0; - } - catch(std::exception const &e) { - std::cerr << e.what() << std::endl; - return -1; - } - } - EOS - - (testpath/"config.json").write <<~EOS - { - "service" : { - "api" : "http", - "port" : 8080, - "worker_threads": 1 - }, - "daemon" : { - "enable" : false - }, - "http" : { - "script_names" : [ "/hello" ] - } - } - EOS - system ENV.cxx, "-o", "hello", "-std=c++11", "-stdlib=libc++", "-lc++", - "-L#{lib}", "-lcppcms", "hello.cpp" - pid = fork { exec "./hello", "-c", "config.json" } - - sleep 1 # grace time for server start - begin - assert_match(/Hello World/, shell_output("curl http://127.0.0.1:8080/hello")) - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/cppi.rb b/Formula/cppi.rb deleted file mode 100644 index 6aed6265df49f..0000000000000 --- a/Formula/cppi.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Cppi < Formula - desc "Indent C preprocessor directives to reflect their nesting" - homepage "https://www.gnu.org/software/cppi/" - url "https://ftp.gnu.org/gnu/cppi/cppi-1.18.tar.xz" - mirror "https://ftpmirror.gnu.org/cppi/cppi-1.18.tar.xz" - sha256 "12a505b98863f6c5cf1f749f9080be3b42b3eac5a35b59630e67bea7241364ca" - - bottle do - cellar :any_skip_relocation - sha256 "9091ecb45e38512cdeb73d92078d1ee9c7bd8e5bce9d1698da9a53e2ae3f8b3c" => :mojave - sha256 "bc8253f982b219088603021d510a6e7ee6d692ff5f693da19b32d0431bc9c9b4" => :high_sierra - sha256 "d4c044247ba8a12f1462089bfa22602547894f0a9081fce21c4800e192a526ae" => :sierra - sha256 "970e44d2a7a340fe29577f92c4b6dfcbac17f3aef35e6085197b668c4cd9013f" => :el_capitan - sha256 "f8198f4b6e76d9310d66d20cb0a5b2b6adc70bee83f0bbeaca8b45b6529ccc60" => :yosemite - sha256 "a37872a422b21892119583f4fe9670ff403d2e40ceb14f50166e2b501938c544" => :mavericks - sha256 "9924d9e02cf7b197d666ffc8e9a56a5d4e442a5fa8c598872c714c7a2dfb37f3" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - test = <<~EOS - #ifdef TEST - #include - #endif - EOS - assert_equal <<~EOS, pipe_output("#{bin}/cppi", test, 0) - #ifdef TEST - # include - #endif - EOS - end -end diff --git a/Formula/cppp.rb b/Formula/cppp.rb deleted file mode 100644 index f3c458dfbdd5a..0000000000000 --- a/Formula/cppp.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Cppp < Formula - desc "Partial Preprocessor for C" - homepage "https://www.muppetlabs.com/~breadbox/software/cppp.html" - url "https://www.muppetlabs.com/~breadbox/pub/software/cppp-2.6.tar.gz" - sha256 "d42cd410882c3b660c77122b232f96c209026fe0a38d819c391307761e651935" - - bottle do - cellar :any_skip_relocation - sha256 "cee25209e4a2ef97d118eac091fa7d5cb6c4ba91329bd713b7ae998e92aaf3c3" => :mojave - sha256 "93bc70ed7bfe05cf901c8cb8400253c0bce2d245cbb5f47698e8c81c81ed6a85" => :high_sierra - sha256 "af58094ee1d80d6d09163b42755d827aa5b8be15b636a6ad087b334978ad2e38" => :sierra - sha256 "3bb773301b97402f783e506f3ccc339d7363df6e292d255d6b3209e5be8d1c1a" => :el_capitan - sha256 "7c18c1844a89ca3a0ee7084b06c908de2288378eaeac09c7872b0eae97129fc3" => :yosemite - sha256 "2765ea90bea4f32ba431ef1f53699a61c2abaf0d3035ed32fb579d42794c9567" => :mavericks - end - - def install - system "make" - bin.install "cppp" - end - - test do - (testpath/"hello.c").write <<~EOS - /* Comments stand for code */ - #ifdef FOO - /* FOO is defined */ - # ifdef BAR - /* FOO & BAR are defined */ - # else - /* BAR is not defined */ - # endif - #else - /* FOO is not defined */ - # ifndef BAZ - /* FOO & BAZ are undefined */ - # endif - #endif - EOS - system "#{bin}/cppp", "-DFOO", "hello.c" - end -end diff --git a/Formula/cpprestsdk.rb b/Formula/cpprestsdk.rb deleted file mode 100644 index 172be45428dd7..0000000000000 --- a/Formula/cpprestsdk.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Cpprestsdk < Formula - desc "C++ libraries for cloud-based client-server communication" - homepage "https://github.com/Microsoft/cpprestsdk" - # pull from git tag to get submodules - url "https://github.com/Microsoft/cpprestsdk.git", - :tag => "v2.10.8", - :revision => "204a52610234ac5180e80a6883b62c0ad085f51e" - head "https://github.com/Microsoft/cpprestsdk.git", :branch => "development" - - bottle do - cellar :any - sha256 "8e324363564023e408419aa863e195dbf53b9d13631e18861e8953016b0e9763" => :mojave - sha256 "9948512053df55dbad7d8c19a011e111da9f5068ac482fc6c3abc2d3e78afbc1" => :high_sierra - sha256 "778ad062735d15707e11a3a7a0c6628d7d948fead333100be5c6ad9c13ce7456" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "openssl" - - def install - system "cmake", "-DBUILD_SAMPLES=OFF", "-DBUILD_TESTS=OFF", "Release", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cc").write <<~EOS - #include - #include - int main() { - web::http::client::http_client client(U("https://github.com/")); - std::cout << client.request(web::http::methods::GET).get().extract_string().get() << std::endl; - } - EOS - flags = ["-stdlib=libc++", "-std=c++11", "-I#{include}", - "-I#{Formula["boost"].include}", - "-I#{Formula["openssl"].include}", "-L#{lib}", - "-L#{Formula["openssl"].lib}", "-L#{Formula["boost"].lib}", - "-lssl", "-lcrypto", "-lboost_random", "-lboost_chrono", - "-lboost_thread-mt", "-lboost_system-mt", "-lboost_regex", - "-lboost_filesystem", "-lcpprest"] + ENV.cflags.to_s.split - system ENV.cxx, "-o", "test_cpprest", "test.cc", *flags - system "./test_cpprest" - end -end diff --git a/Formula/cpptest.rb b/Formula/cpptest.rb deleted file mode 100644 index 85a5db60fe3fd..0000000000000 --- a/Formula/cpptest.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Cpptest < Formula - desc "Unit testing framework handling automated tests in C++" - homepage "https://cpptest.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cpptest/cpptest/cpptest-1.1.2/cpptest-1.1.2.tar.gz" - sha256 "9e4fdf156b709397308536eb6b921e3aea1f463c6613f9a0c1dfec9614386027" - - bottle do - cellar :any - rebuild 1 - sha256 "9d91d78a8a3081d6ed690810ecb4bcf3bf3010874ba859e30c0c948f7ba30db9" => :mojave - sha256 "bd7d2b0055d1de9cce94d3695aa7c160fbe3d0780e9650c73a7543bd5726162a" => :high_sierra - sha256 "f243764e911fe4c056f782ebee8cd84316214d961b14322b4cedc92f60478d49" => :sierra - sha256 "216442c844ddb2886e6877cd129fda3c589dadf8ac07572e6aa05c1c3cff4669" => :el_capitan - sha256 "e6b364e203c882063362e4a0ef6e6482420ab57b1ec24699b6da31b50f792f14" => :yosemite - sha256 "c1f68d40bd58366d28846395169868d86a012b8d65473aa8845401619052d568" => :mavericks - sha256 "a3f5cf0532bf9b72b73bf2fa52862b88fbc318ebd0ee9712a09771a071371fbc" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - class TestCase: public Test::Suite - { - public: - TestCase() { TEST_ADD(TestCase::test); } - void test() { TEST_ASSERT(1 + 1 == 2); } - }; - - int main() - { - TestCase ts; - Test::TextOutput output(Test::TextOutput::Verbose); - assert(ts.run(output)); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lcpptest", "-o", "test" - system "./test" - end -end diff --git a/Formula/cppunit.rb b/Formula/cppunit.rb deleted file mode 100644 index 67c8d18294302..0000000000000 --- a/Formula/cppunit.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Cppunit < Formula - desc "Unit testing framework for C++" - homepage "https://wiki.freedesktop.org/www/Software/cppunit/" - url "https://dev-www.libreoffice.org/src/cppunit-1.14.0.tar.gz" - sha256 "3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780" - - bottle do - cellar :any - sha256 "3a62b16c2f36115f58f28277602c2cda352bb8e3dc5d559708db19f22ac5eb9e" => :mojave - sha256 "2740f149428280c1dd20ac94612eacca944d29dac0838eee4eeb0eef2ae1fdd6" => :high_sierra - sha256 "3c620068fba4bf15b6138ffc4042ab2111a67201310523104c07c314115520bb" => :sierra - sha256 "a2d2bf8be8ffb614f0490801e38558681b8b01a9fc7ff4be5f785d3db7f71157" => :el_capitan - sha256 "8078fbe4b7fd092a197c452af4caf3f5eaeb27dce16afd46e1da2a1ec1ae7f6d" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "Usage", shell_output("#{bin}/DllPlugInTester", 2) - end -end diff --git a/Formula/cpputest.rb b/Formula/cpputest.rb deleted file mode 100644 index 2581117801ea9..0000000000000 --- a/Formula/cpputest.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Cpputest < Formula - desc "C /C++ based unit xUnit test framework" - homepage "https://www.cpputest.org/" - url "https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz" - sha256 "c81dccc5a1bfc7fc6511590c0a61def5f78e3fb19cb8e1f889d8d3395a476456" - head "https://github.com/cpputest/cpputest.git" - - bottle do - cellar :any_skip_relocation - sha256 "0b9d6f1c2a89d9e69ec470882b40903d5d6aee5c784397c9b85f6874ea7c71ed" => :mojave - sha256 "35e26ea6ad2e7f6a86646a73b24aced18f79791792052cf41fab20ab07c8c117" => :high_sierra - sha256 "47343762cc3b1b76538115940177a710897254ddf3e968c6a7161c0dd4dc505c" => :sierra - sha256 "8c0b631188acc7fc0e6e5a8a2502871e4856990786fcb1268b32da7058304297" => :el_capitan - sha256 "415557e97a8e876764595006b205bd9c61fce448558d22863306ca6b22a30e12" => :yosemite - sha256 "12d974e118f21b0858c74db544604b7c984d72610a74883ffed12639965d7b99" => :mavericks - end - - depends_on "cmake" => :build - - def install - cd "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "CppUTest/CommandLineTestRunner.h" - int main(int ac, char** av) - { - return CommandLineTestRunner::RunAllTests(ac, av); - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lCppUTest", "-o", "test" - assert_match /OK \(0 tests/, shell_output("./test") - end -end diff --git a/Formula/cproto.rb b/Formula/cproto.rb deleted file mode 100644 index 7c997bddd7181..0000000000000 --- a/Formula/cproto.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Cproto < Formula - desc "Generate function prototypes for functions in input files" - homepage "https://invisible-island.net/cproto/" - url "https://invisible-mirror.net/archives/cproto/cproto-4.7m.tgz" - mirror "https://mirrors.kernel.org/debian/pool/main/c/cproto/cproto_4.7m.orig.tar.gz" - sha256 "4b482e80f1b492e94f8dcda74d25a7bd0381c870eb500c18e7970ceacdc07c89" - - bottle do - cellar :any_skip_relocation - sha256 "b19c734b22ab4d5ad304fdb82e2d4b1fea25d0d1d8d3ccb1337adef143cf36d7" => :mojave - sha256 "4f557a3b96ce60956b1fed9abc873f9bd844ca93492731db3971fd0ada78fa15" => :high_sierra - sha256 "4dcee9160c276855b7bd94235dc15e4d153c161b4f81f8a1e041fda8da5b4cc7" => :sierra - sha256 "21d0972269ad52cd7098b921f2500bb8bf827fabe1e0718c24fdfd2d844b7f7e" => :el_capitan - sha256 "4bd2276c002322ce4d28030d60c0858e1efd4311e0f9de5460917cc5b70bc362" => :yosemite - sha256 "a73eaa28daa6281fc987fb22b2bb50bd9962f4a4d4857e7371b8edf605822ca7" => :mavericks - sha256 "8eedeacb18a2f3316171a4646f2a7cd2ec993005fd3a930072fbbc9fbd76c598" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - (testpath/"woot.c").write("int woot() {\n}") - assert_match(/int woot.void.;/, shell_output("#{bin}/cproto woot.c")) - end -end diff --git a/Formula/cpulimit.rb b/Formula/cpulimit.rb deleted file mode 100644 index de6d8328fbfcc..0000000000000 --- a/Formula/cpulimit.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Cpulimit < Formula - desc "CPU usage limiter" - homepage "https://github.com/opsengine/cpulimit" - url "https://github.com/opsengine/cpulimit/archive/v0.2.tar.gz" - sha256 "64312f9ac569ddcadb615593cd002c94b76e93a0d4625d3ce1abb49e08e2c2da" - head "https://github.com/opsengine/cpulimit.git" - - bottle do - cellar :any_skip_relocation - sha256 "b9c7f99cbc62eb7c02b19c63a9b7e3f9186175707ff853a7107447fd7b2ee249" => :mojave - sha256 "077ab8835a3b44ce77e3b8bf867633115b1d056046b232e49aeac96ac30e731c" => :high_sierra - sha256 "fa5bc8d713837693c6bbd6139bec5e48b8a1d46ef669b2e042715dd1318b1655" => :sierra - sha256 "9d7320465152a12ba75ce924beada5a3ce365b14becaa75e08ee8334c2cb2f6a" => :el_capitan - sha256 "7ff9d929c5a1178b250b756cefcbecc4b202c72f03073e9eb43f4a47420930a8" => :yosemite - sha256 "c24a495cd69c62693bcb0bd2a44c41c5bca84f0b9754019681816c1d2b47fe3e" => :mavericks - end - - def install - system "make" - bin.install "src/cpulimit" - end - - test do - system "#{bin}/cpulimit", "--limit=10", "ls" - end -end diff --git a/Formula/cputhrottle.rb b/Formula/cputhrottle.rb deleted file mode 100644 index ea460788ed96d..0000000000000 --- a/Formula/cputhrottle.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Cputhrottle < Formula - desc "Limit the CPU usage of a process" - homepage "http://www.willnolan.com/cputhrottle/cputhrottle.html" - url "http://www.willnolan.com/cputhrottle/cputhrottle-1.0.0.tar.gz" - sha256 "08243656d0abf6dd5fd9542d33553507ce395ee4e0a1aeb5df08ca78bc83ec21" - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "1ccf8955c3a4f740ae831c8d1620ff50bf7e09b3f989b0968b7420596901ba68" => :mojave - sha256 "14cfa66d900ac9b9623452b1734476d9a2b7c90358ea3f0f3f028169d08b1f52" => :high_sierra - sha256 "e7b1f37f5624959be9ebd8b7ddb44eb90907e2d08f1a1755ed818e38370a30c9" => :sierra - sha256 "44fe4915b0be45c45c9ce09036869b54c2172742d787c3888b3cb5a7f0a30330" => :el_capitan - end - - def install - system "make", "all" - bin.install "cputhrottle" - end - - test do - # Needs root for proper functionality test. - output = pipe_output("#{bin}/cputhrottle 2>&1") - assert_match "Please supply PID to throttle", output - end -end diff --git a/Formula/cquery.rb b/Formula/cquery.rb deleted file mode 100644 index 92d38be619c04..0000000000000 --- a/Formula/cquery.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Cquery < Formula - desc "C/C++ language server" - homepage "https://github.com/cquery-project/cquery" - # pull from git tag to get submodules - url "https://github.com/cquery-project/cquery.git", - :tag => "v20180718", - :revision => "b523aa928acf8ffb3de6b22c79db7366a9672489" - head "https://github.com/cquery-project/cquery.git" - - bottle do - sha256 "e35aabf6a4b2b0ac21c59b6e6121aa3bc8cc623ca7fe1bd763dd6430d3339eae" => :mojave - sha256 "ee46fd2b279edc3b52df5ca9b84bdce404bb888f8a7d31e092b3fda33285a02b" => :high_sierra - sha256 "ac3ad5aada30ca31d70f36e6e3ba76d96aa0e235ccdd62259a086578fe182b44" => :sierra - end - - depends_on "cmake" => :build - depends_on "llvm" - - # error: 'shared_timed_mutex' is unavailable: introduced in macOS 10.12 - depends_on :macos => :sierra - - needs :cxx14 - - def install - system "cmake", ".", "-DSYSTEM_CLANG=ON", *std_cmake_args - system "make", "install" - end - - test do - system bin/"cquery", "--test-unit" - end -end diff --git a/Formula/cracklib.rb b/Formula/cracklib.rb deleted file mode 100644 index 320bfbba5953a..0000000000000 --- a/Formula/cracklib.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Cracklib < Formula - desc "LibCrack password checking library" - homepage "https://github.com/cracklib/cracklib" - url "https://github.com/cracklib/cracklib/releases/download/cracklib-2.9.6/cracklib-2.9.6.tar.gz" - sha256 "17cf76943de272fd579ed831a1fd85339b393f8d00bf9e0d17c91e972f583343" - - bottle do - rebuild 1 - sha256 "a21962259717ab187dc477310b0e68b28449135839312f7c632f0e46414efcf1" => :mojave - sha256 "52c1e0acde52e27553ca3884dba490596ebc4a45019181bbb355ed9bad50e778" => :high_sierra - sha256 "e2cfe716fb290d4dd26558290707596146e15ca8da510b38897c128f961779b6" => :sierra - sha256 "12665f56731ad7a8c56143d5f263b99e7a8484cbb0e2f22b955978f63e724138" => :el_capitan - end - - depends_on "gettext" - - resource "cracklib-words" do - url "https://github.com/cracklib/cracklib/releases/download/cracklib-2.9.6/cracklib-words-2.9.6.bz2" - sha256 "460307bb9b46dfd5068d62178285ac2f70279e64b968972fe96f5ed07adc1a77" - end - - # Upstream commit from 25 Aug 2016 "Apply patch to fix CVE-2016-6318" - patch :p2 do - url "https://github.com/cracklib/cracklib/commit/47e5dec.patch?full_index=1" - sha256 "7b3604d503208365951038b04990eef24b8ef90ce845fd84e2d2ab88a9a4f56b" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sbindir=#{bin}", - "--without-python", - "--with-default-dict=#{var}/cracklib/cracklib-words" - system "make", "install" - - share.install resource("cracklib-words") - end - - def post_install - (var/"cracklib").mkpath - cp share/"cracklib-words-#{version}", var/"cracklib/cracklib-words" - system "#{bin}/cracklib-packer < #{var}/cracklib/cracklib-words" - end - - test do - assert_match /password: it is based on a dictionary word/, pipe_output("#{bin}/cracklib-check", "password", 0) - end -end diff --git a/Formula/crash.rb b/Formula/crash.rb deleted file mode 100644 index 84f9c020ff8a8..0000000000000 --- a/Formula/crash.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Crash < Formula - desc "Kernel debugging shell for Java that allows gdb-like syntax" - homepage "https://www.crashub.org/" - url "https://search.maven.org/remotecontent?filepath=org/crashub/crash.distrib/1.3.2/crash.distrib-1.3.2.tar.gz" - sha256 "9607a84c34b01e5df999ac5bde6de2357d2a0dfb7c5c0ce2a5aea772b174ef01" - - bottle :unneeded - - resource "docs" do - url "https://search.maven.org/remotecontent?filepath=org/crashub/crash.distrib/1.3.2/crash.distrib-1.3.2-docs.tar.gz" - sha256 "b3bf1efe50fb640224819f822835e3897c038ab5555049f2279a5b26171178bb" - end - - def install - doc.install resource("docs") - libexec.install Dir["crash/*"] - bin.install_symlink "#{libexec}/bin/crash.sh" - end -end diff --git a/Formula/crc32c.rb b/Formula/crc32c.rb deleted file mode 100644 index 0d489b6a91d07..0000000000000 --- a/Formula/crc32c.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Crc32c < Formula - desc "CRC32C implementation with CPU-specific acceleration" - homepage "https://github.com/google/crc32c" - url "https://github.com/google/crc32c/archive/1.0.6.tar.gz" - sha256 "6b3b1d861bb8307658b2407bc7a4c59e566855ef5368a60b35c893551e4788e9" - head "https://github.com/google/crc32c.git" - - bottle do - cellar :any - sha256 "5d65f03fb8cd7aa5349daa78ac5d8a13a87dcd0e58edfdab98510be8d9569888" => :mojave - sha256 "5a27559831f37f190ffef95e05fa093230c0ac3e46a17f33d18a775358edfd33" => :high_sierra - sha256 "6c43bab5aed9edb9963dd6a92704291884d06472ac72550cdf4dcd9b49e6177e" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DCRC32C_BUILD_TESTS=0", "-DCRC32C_BUILD_BENCHMARKS=0", "-DCRC32C_USE_GLOG=0", *std_cmake_args - system "make", "install" - system "make", "clean" - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", "-DCRC32C_BUILD_TESTS=0", "-DCRC32C_BUILD_BENCHMARKS=0", "-DCRC32C_USE_GLOG=0", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - - int main() - { - std::uint32_t expected = 0xc99465aa; - std::uint32_t result = crc32c::Crc32c(std::string("hello world")); - assert(result == expected); - return 0; - } - EOS - - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lcrc32c", "-o", "test" - system "./test" - end -end diff --git a/Formula/create-dmg.rb b/Formula/create-dmg.rb deleted file mode 100644 index aea440098b42b..0000000000000 --- a/Formula/create-dmg.rb +++ /dev/null @@ -1,25 +0,0 @@ -class CreateDmg < Formula - desc "Shell script to build fancy DMGs" - homepage "https://github.com/andreyvit/create-dmg" - url "https://github.com/andreyvit/create-dmg/archive/v1.0.0.5.tar.gz" - sha256 "de76c8a7a1f4705720d61d39de7c87b7bc2acc7c35f6ec8d6d2dbdafcedc21b6" - - bottle do - cellar :any_skip_relocation - sha256 "f79816fe786969d0c2bbf6c025d1616b04add290a20def2492f73295b36bc76c" => :mojave - sha256 "d99f697bf1d22dba54a87890b30f383bf4aec7ca5b54f180646041f9d046c243" => :high_sierra - sha256 "d99f697bf1d22dba54a87890b30f383bf4aec7ca5b54f180646041f9d046c243" => :sierra - end - - def install - system "support/brew-me.sh" - bin.install "create-dmg" - end - - test do - File.write(testpath/"Brew-Eula.txt", "Eula") - (testpath/"Test-Source").mkpath - (testpath/"Test-Source/Brew.app").mkpath - system "#{bin}/create-dmg", "--sandbox-safe", "--eula", testpath/"Brew-Eula.txt", testpath/"Brew-Test.dmg", testpath/"Test-Source" - end -end diff --git a/Formula/credstash.rb b/Formula/credstash.rb deleted file mode 100644 index 2a6a13c9cc2c6..0000000000000 --- a/Formula/credstash.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Credstash < Formula - include Language::Python::Virtualenv - - desc "Little utility for managing credentials in the cloud" - homepage "https://github.com/fugue/credstash" - url "https://files.pythonhosted.org/packages/5f/fa/c10fd986419d489e72ed1e0d94424e848ad1dba82ed5299b472ac8618689/credstash-1.15.0.tar.gz" - sha256 "814560f99ae2409e2c6d906d878f9dadada5d1d0a950aafb6b2c0d535291bdfb" - revision 1 - head "https://github.com/fugue/credstash.git" - - bottle do - cellar :any - sha256 "adeb4cbdc25722569a31ae0b73bb960ca76637cf6a4985f03af31d10f1c191f2" => :mojave - sha256 "2e240848df290a77439f73f34cb2b4cf24419efc18097fb6e538a9f91103ef75" => :high_sierra - sha256 "c19c7338c9de8fba9712aa61e9ab038f6077665bf388cb82584c1b8cc54c1067" => :sierra - end - - depends_on "openssl" - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/4c/3c/920aa91d9628d1c79f4793ee23dd8f3049cacebde4947856892397c0ccf9/boto3-1.9.22.tar.gz" - sha256 "2482bd7681e5d7ff7c1b3d53b8b4d23498ec4d6e14a25522339e6a55a7d273fd" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/cb/8a/129ec483b581ead78ee08033b9db247c218eb20a59167f4c5aa03aa83055/botocore-1.12.22.tar.gz" - sha256 "24d91aab646c5f63b6ad6fd8907228c62d181cd1dc2309b54345663940514867" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/9a/66/c6a5ae4dbbaf253bd662921b805e4972451a6d214d0dc9fb3300cb642320/s3transfer-0.1.13.tar.gz" - sha256 "90dc18e028989c609146e241ea153250be451e05ecc0c2832565231dacdf59c1" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["AWS_ACCESS_KEY_ID"] = "test" - ENV["AWS_SECRET_ACCESS_KEY"] = "test" - output = shell_output("#{bin}/credstash put test test 2>&1", 1) - assert_match "Could not generate key using KMS key", output - end -end diff --git a/Formula/creduce.rb b/Formula/creduce.rb deleted file mode 100644 index 199ab06e631a4..0000000000000 --- a/Formula/creduce.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Creduce < Formula - desc "Reduce a C/C++ program while keeping a property of interest" - homepage "https://embed.cs.utah.edu/creduce/" - url "https://embed.cs.utah.edu/creduce/creduce-2.8.0.tar.gz" - sha256 "77f622453a7fc52aa061a89aed457f23ab538b12270df0a2a79b6957fd381def" - revision 1 - head "https://github.com/csmith-project/creduce.git" - - bottle do - cellar :any - sha256 "3fba90ded1f41ed4eac24b7555ea1c25ea208f8bf6310faebce62ad5468a7b38" => :mojave - sha256 "b21a9e4c372448314e03a62c3407acd8dc5f3235d578a100c47ed65cdbc8dcf4" => :high_sierra - sha256 "6f7525027fddd4976486f08102696cb2351ec5f0808404bf4dcfb1b81003a4d0" => :sierra - sha256 "2cbc72f40a90bd98abca8a39667bff10c861caa160f3a0f17434c9c79476b669" => :el_capitan - end - - depends_on "astyle" - depends_on "clang-format" - depends_on "delta" - depends_on "llvm" - - depends_on :macos => :mavericks - - resource "Exporter::Lite" do - url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Exporter-Lite-0.08.tar.gz" - sha256 "c05b3909af4cb86f36495e94a599d23ebab42be7a18efd0d141fc1586309dac2" - end - - resource "File::Which" do - url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.22.tar.gz" - sha256 "e8a8ffcf96868c6879e82645db4ff9ef00c2d8a286fed21971e7280f52cf0dd4" - end - - resource "Getopt::Tabular" do - url "https://cpan.metacpan.org/authors/id/G/GW/GWARD/Getopt-Tabular-0.3.tar.gz" - sha256 "9bdf067633b5913127820f4e8035edc53d08372faace56ba6bfa00c968a25377" - end - - resource "Regexp::Common" do - url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz" - sha256 "ee07853aee06f310e040b6bf1a0199a18d81896d3219b9b35c9630d0eb69089b" - end - - resource "Term::ReadKey" do - url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz" - sha256 "4a9383cf2e0e0194668fe2bd546e894ffad41d556b41d2f2f577c8db682db241" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - # Avoid ending up with llvm's Cellar path hard coded. - ENV["CLANG_FORMAT"] = Formula["llvm"].opt_bin/"clang-format" - - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - end - - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--bindir=#{libexec}" - system "make" - system "make", "install" - - (bin/"creduce").write_env_script("#{libexec}/creduce", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - (testpath/"test1.c").write <<~EOS - #include - - int main() { - int i = -1; - unsigned int j = i; - printf("%d\n", j); - } - - EOS - (testpath/"test1.sh").write <<~EOS - #!/usr/bin/env bash - - clang -Weverything "$(dirname "${BASH_SOURCE[0]}")"/test1.c 2>&1 | \ - grep 'implicit conversion changes signedness' - - EOS - - chmod 0755, testpath/"test1.sh" - system "#{bin}/creduce", "test1.sh", "test1.c" - end -end diff --git a/Formula/crf++.rb b/Formula/crf++.rb deleted file mode 100644 index db28f34ba64af..0000000000000 --- a/Formula/crf++.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Crfxx < Formula - desc "Conditional random fields for segmenting/labeling sequential data" - homepage "https://taku910.github.io/crfpp/" - url "https://ftp.heanet.ie/mirrors/gentoo.org/distfiles/CRF++-0.58.tar.gz" - mirror "https://drive.google.com/uc?id=0B4y35FiV1wh7QVR6VXJ5dWExSTQ&export=download" - sha256 "9d1c0a994f25a5025cede5e1d3a687ec98cd4949bfb2aae13f2a873a13259cb2" - - bottle do - cellar :any - rebuild 2 - sha256 "478347b2973b7ace27af0bc55b3ed3fca14e158433b512a8e92d9cc8f3336872" => :mojave - sha256 "fa5bcfa302710b90736e3fd21709d4da3619a86251b876d52c9adbb57a3b17f7" => :high_sierra - sha256 "5c958b605baab60e1b01eb3bbb67851119025c84e1c4c1b2c0a0dd2b272f70ea" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "CXXFLAGS=#{ENV.cflags}", "install" - end - - test do - # Using "; true" because crf_test -v and -h exit nonzero under normal operation - output = shell_output("#{bin}/crf_test --help; true") - assert_match "CRF++: Yet Another CRF Tool Kit", output - end -end diff --git a/Formula/crm114.rb b/Formula/crm114.rb deleted file mode 100644 index deb44d4eed315..0000000000000 --- a/Formula/crm114.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Crm114 < Formula - desc "Examine, sort, filter or alter logs or data streams" - homepage "https://crm114.sourceforge.io/" - url "https://crm114.sourceforge.io/tarballs/crm114-20100106-BlameMichelson.src.tar.gz" - sha256 "fb626472eca43ac2bc03526d49151c5f76b46b92327ab9ee9c9455210b938c2b" - - bottle do - cellar :any - sha256 "38a8c208a23dc67027eb63e9a8a6782cdb0763caa061fbf74525003d028d0558" => :mojave - sha256 "1871f19d45d9d9d5f84663acde3f7e9177fd9a44bfe50532ed123314e360f690" => :high_sierra - sha256 "5e22ac9266e49f8281f3afbd613b3f16eb76113fc1f1e2256206513ab6220d42" => :sierra - sha256 "d48449acfcd105d07e11c0ac7c47fdb21b88d3346c0b51377b9e44b8c8726073" => :el_capitan - sha256 "151316bd14f7cfce5cea3b765cf4e7801e31c63b72dd786fb38989d8b9380eb3" => :yosemite - sha256 "30c0c390671485747b7fd2e19bd8735ccfe3bfaae8864dc361bf2abe917ba342" => :mavericks - end - - depends_on "tre" - - def install - ENV.append "CFLAGS", "-std=gnu89" - inreplace "Makefile", "LDFLAGS += -static -static-libgcc", "" - bin.mkpath - system "make", "prefix=#{prefix}", "install" - end -end diff --git a/Formula/cromwell.rb b/Formula/cromwell.rb deleted file mode 100644 index 2165c59ea28c1..0000000000000 --- a/Formula/cromwell.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Cromwell < Formula - desc "Workflow Execution Engine using Workflow Description Language" - homepage "https://github.com/broadinstitute/cromwell" - url "https://github.com/broadinstitute/cromwell/releases/download/36/cromwell-36.jar" - sha256 "063a3f45f0f5fb3c15ee6f2fd86265fedddcd850b98877f1833defdfd3f7b988" - - head do - url "https://github.com/broadinstitute/cromwell.git" - depends_on "sbt" => :build - end - - bottle :unneeded - - depends_on "akka" - depends_on :java => "1.8+" - - resource "womtool" do - url "https://github.com/broadinstitute/cromwell/releases/download/36/womtool-36.jar" - sha256 "acd33d91b7326c07ec795b14301758347006c8bd5a54d56f42b058edfef72a2a" - end - - def install - if build.head? - system "sbt", "assembly" - libexec.install Dir["target/scala-*/cromwell-*.jar"][0] - libexec.install Dir["womtool/target/scala-2.12/womtool-*.jar"][0] - else - libexec.install Dir["cromwell-*.jar"][0] - resource("womtool").stage do - libexec.install Dir["womtool-*.jar"][0] - end - end - bin.write_jar_script Dir[libexec/"cromwell-*.jar"][0], "cromwell", "$JAVA_OPTS" - bin.write_jar_script Dir[libexec/"womtool-*.jar"][0], "womtool" - end - - test do - (testpath/"hello.wdl").write <<~EOS - task hello { - String name - - command { - echo 'hello ${name}!' - } - output { - File response = stdout() - } - } - - workflow test { - call hello - } - EOS - - (testpath/"hello.json").write <<~EOS - { - "test.hello.name": "world" - } - EOS - - result = shell_output("#{bin}/cromwell run --inputs hello.json hello.wdl") - - assert_match "test.hello.response", result - end -end diff --git a/Formula/cronolog.rb b/Formula/cronolog.rb deleted file mode 100644 index 8faeef52437b1..0000000000000 --- a/Formula/cronolog.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Cronolog < Formula - desc "Web log rotation" - homepage "https://web.archive.org/web/20140209202032/cronolog.org/" - url "https://www.mirrorservice.org/sites/distfiles.macports.org/cronolog/cronolog-1.6.2.tar.gz" - mirror "https://fossies.org/linux/www/old/cronolog-1.6.2.tar.gz" - sha256 "65e91607643e5aa5b336f17636fa474eb6669acc89288e72feb2f54a27edb88e" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c99140b690aae4c8e28b53ba787ed5aef53d3fbc867186aca47cab021068db40" => :mojave - sha256 "47a40bdccb74cb45e3df9e73306162ecc7206c26760521c6a9d8760872769b6b" => :high_sierra - sha256 "66ad5bfa0080775875d2b72cc2bbd66bc8ee8de7ca1d482217414ba5b805f977" => :sierra - sha256 "964df15660a5c0ec25bedec56aeb128ae93794a8ad721c1c600e377df9be1c2d" => :el_capitan - sha256 "f3f485105f7466422a507bafef3acfd741f18b8ab26438c267d10dbf4701282e" => :yosemite - sha256 "288bcd1671de08659b7d2f67141aa5178d797870597837c569dccfaae460afd8" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}" - system "make", "install" - end -end diff --git a/Formula/crosstool-ng.rb b/Formula/crosstool-ng.rb deleted file mode 100644 index a738f506b70e3..0000000000000 --- a/Formula/crosstool-ng.rb +++ /dev/null @@ -1,57 +0,0 @@ -class CrosstoolNg < Formula - desc "Tool for building toolchains" - homepage "https://crosstool-ng.github.io/" - url "http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.23.0.tar.xz" - sha256 "68a43ea98ccf9cb345cb6eec494a497b224fee24c882e8c14c6713afbbe79196" - revision 3 - head "https://github.com/crosstool-ng/crosstool-ng.git" - - bottle do - cellar :any - sha256 "1431c7979e1c9e9162a885644d170d17c00754d6fa1832f2f0474a5e43a015fb" => :mojave - sha256 "eb263584b93acaea45ee6418a5ec8a0e6d3851c2c56d2225e47d3056177ce190" => :high_sierra - sha256 "e997043c6f35b1ac4cc8a83a274e3fb1f684d68e7d322c76cea46594af9ce4fc" => :sierra - end - - depends_on "help2man" => :build - depends_on "autoconf" - depends_on "automake" - depends_on "binutils" - depends_on "coreutils" - depends_on "flex" - depends_on "gawk" - depends_on "gnu-sed" - depends_on "grep" - depends_on "libtool" - depends_on "m4" - depends_on "make" - depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000 - depends_on "xz" - - if build.head? - depends_on "bash" - depends_on "bison" - depends_on "gettext" - end - - def install - if build.head? - system "./bootstrap" - ENV["BISON"] = "#{Formula["bison"].opt_bin}/bison" - ENV.append "LDFLAGS", "-lintl" - end - - ENV["M4"] = "#{Formula["m4"].opt_bin}/m4" - ENV["MAKE"] = "#{Formula["make"].opt_bin}/gmake" - - system "./configure", "--prefix=#{prefix}" - - # Must be done in two steps - system "make" - system "make", "install" - end - - test do - assert_match "This is crosstool-NG", shell_output("make -rf #{bin}/ct-ng version") - end -end diff --git a/Formula/crowdin.rb b/Formula/crowdin.rb deleted file mode 100644 index ae3b85430d252..0000000000000 --- a/Formula/crowdin.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Crowdin < Formula - desc "Command-line tool that allows to manage your resources with crowdin.com" - homepage "https://support.crowdin.com/cli-tool/" - url "https://downloads.crowdin.com/cli/v2/crowdin-cli-2.0.25.zip" - sha256 "4260ee8ea25cf3bc218222fe7010173e8dbe96c5527a473d6d222604af555ad0" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install "crowdin-cli.jar" - bin.write_jar_script libexec/"crowdin-cli.jar", "crowdin" - end - - test do - system bin/"crowdin" - end -end diff --git a/Formula/crunch.rb b/Formula/crunch.rb deleted file mode 100644 index 77091c61ed296..0000000000000 --- a/Formula/crunch.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Crunch < Formula - desc "Wordlist generator" - homepage "https://sourceforge.net/projects/crunch-wordlist/" - url "https://downloads.sourceforge.net/project/crunch-wordlist/crunch-wordlist/crunch-3.6.tgz" - sha256 "6a8f6c3c7410cc1930e6854d1dadc6691bfef138760509b33722ff2de133fe55" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "ad3bd04ba230c46df88ab4ab7a74efa3182cd65b804b65a28a327f74700641e8" => :mojave - sha256 "c59cb398b0ed4f28e8d56c49709991f5ea61b61bad4d672f1a481730948cdeb0" => :high_sierra - sha256 "737d46b90aaa933abe03e111ece79e3f6a0ecb372cc1903b9dba3a33208111b9" => :sierra - sha256 "84c0c275e63cc5c27fd468587f67ae5f1ab31a3923fe2eda27b4e33477356844" => :el_capitan - sha256 "406d94f00713b83bbf41b36453605a5f85f154f88aec9b3ae23e7646ddcc03c1" => :yosemite - sha256 "379e5d6a2a8a9baaa9b337f3e702e25ccca6025fd8b49e2685031e67d8ce8666" => :mavericks - end - - def install - system "make", "CC=#{ENV.cc}", "LFS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - - bin.install "crunch" - man1.install "crunch.1" - share.install Dir["*.lst"] - end - - test do - system "#{bin}/crunch", "-v" - end -end diff --git a/Formula/crush-tools.rb b/Formula/crush-tools.rb deleted file mode 100644 index c02612519ab15..0000000000000 --- a/Formula/crush-tools.rb +++ /dev/null @@ -1,41 +0,0 @@ -class CrushTools < Formula - desc "Command-line tools for processing delimited text data" - homepage "https://github.com/google/crush-tools" - url "https://github.com/google/crush-tools/releases/download/20150716/crush-tools-20150716.tar.gz" - sha256 "ef2f9c919536a2f13b3065af3a9a9756c90ede53ebd67d3e169c90ad7cd1fb05" - - bottle do - cellar :any - sha256 "148684da73eef05ce20f602fdc2d0a9795afbdb6db9cd324c74860c6600ff835" => :mojave - sha256 "729196f80c05c5e395c145752a7a54cc1488a6cf1767b43ed9f639c2f3f3c463" => :high_sierra - sha256 "28286e04a7baf7790f446f2f474a74387e6c0282df70d89ade39c84187394ce4" => :sierra - sha256 "0c7c58b9f2ec87237934eda55932b200c6d7b7f6dbb07a35e0a49ed389e984d3" => :el_capitan - sha256 "90c901bd6daf8178407232c6b3be7f3c5056e9cf2ab88750d09b151e0973d4ff" => :yosemite - sha256 "f1319787a7aafc6610f0217299791c428e5784d11cc93c8cd623e8a5cba5c414" => :mavericks - sha256 "4fe244ac195a6051551f610c9435de7bf65beaa0b3c00ef5ff39945e9d2f3b3f" => :mountain_lion - end - - head do - url "https://github.com/google/crush-tools.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pcre" - - conflicts_with "aggregate", :because => "both install an `aggregate` binary" - conflicts_with "num-utils", :because => "both install an `range` binary" - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "1 2 6 7 8 9 10", shell_output("#{bin}/range 1,2,6-10").strip - assert_equal "o", shell_output("#{bin}/tochar 111") - end -end diff --git a/Formula/cryfs.rb b/Formula/cryfs.rb deleted file mode 100644 index e3108ab1e2722..0000000000000 --- a/Formula/cryfs.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Cryfs < Formula - desc "Encrypts your files so you can safely store them in Dropbox, iCloud, etc." - homepage "https://www.cryfs.org" - url "https://github.com/cryfs/cryfs/releases/download/0.9.9/cryfs-0.9.9.tar.xz" - sha256 "aa8d90bb4c821cf8347f0f4cbc5f68a1e0f4eb461ffd8f1ee093c4d37eac2908" - - bottle do - cellar :any - sha256 "9ad2ecacb4813c16b2b706d4cf6b4348ff86ef019fe6c5a7d9c39fb418010c46" => :mojave - sha256 "8f58cac3f867d51a95f09e17e15b893dc4415df18476963dd8cdd72c9a99f56c" => :high_sierra - sha256 "db97f7cd1d28b3036165d4f8142688b73e3bce12416d0a1a0b9eff03d44a0245" => :sierra - sha256 "2fab8415b94e7b2f782ec642e2e4fb0ce345524f5fd014cc21d14b2b410c8635" => :el_capitan - end - - head do - url "https://github.com/cryfs/cryfs.git", :branch => "develop", :shallow => false - depends_on "libomp" - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "cryptopp" - depends_on "openssl" - depends_on :osxfuse - - needs :cxx11 - - def install - configure_args = [ - "-DBUILD_TESTING=off", - ] - - if build.head? - libomp = Formula["libomp"] - configure_args.concat( - [ - "-DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I#{libomp.include}'", - "-DOpenMP_CXX_LIB_NAMES=omp", - "-DOpenMP_omp_LIBRARY=#{libomp.lib}/libomp.dylib", - ], - ) - end - - system "cmake", ".", *configure_args, *std_cmake_args - system "make", "install" - end - - test do - ENV["CRYFS_FRONTEND"] = "noninteractive" - assert_match "CryFS", shell_output("#{bin}/cryfs", 10) - end -end diff --git a/Formula/cryptol.rb b/Formula/cryptol.rb deleted file mode 100644 index a910f4f1244ca..0000000000000 --- a/Formula/cryptol.rb +++ /dev/null @@ -1,36 +0,0 @@ -require "language/haskell" - -class Cryptol < Formula - include Language::Haskell::Cabal - - desc "Domain-specific language for specifying cryptographic algorithms" - homepage "https://www.cryptol.net/" - url "https://hackage.haskell.org/package/cryptol-2.6.0/cryptol-2.6.0.tar.gz" - sha256 "5f8abbfa2765ac0f6bb887edbec7032677d107c39581a4c78614e97382738f42" - head "https://github.com/GaloisInc/cryptol.git" - - bottle do - cellar :any_skip_relocation - sha256 "f1184304ff56086e3701cf243ed3daadf11aa92adf257b294bdf2ea0d1d7fb65" => :mojave - sha256 "2c248ddca38fc90b2ff5f7c8c671f298216d1a5e6bc699b77ccc99aebdb7b5a5" => :high_sierra - sha256 "2c9e9921e770cb5837fa0d25408e3120a2d5929d98ca2a8163eeba04db4001fe" => :sierra - sha256 "11dc3aa5ee61b11449f98cd3450237b92727abbf384580d339c564cd6fdefa6d" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "z3" - - def install - install_cabal_package :using => ["alex", "happy"] - end - - test do - (testpath/"helloworld.icry").write <<~EOS - :prove \\(x : [8]) -> x == x - :prove \\(x : [32]) -> x + zero == x - EOS - expected = /Q\.E\.D\..*Q\.E\.D/m - assert_match expected, shell_output("#{bin}/cryptol -b helloworld.icry") - end -end diff --git a/Formula/cryptopp.rb b/Formula/cryptopp.rb deleted file mode 100644 index b8a7f343f8bd5..0000000000000 --- a/Formula/cryptopp.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Cryptopp < Formula - desc "Free C++ class library of cryptographic schemes" - homepage "https://www.cryptopp.com/" - url "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_0_0.tar.gz" - sha256 "65e8b7ab068a91427f9ebbdd14ffee2ccfed34defd1902325c87a3eb16efbe6d" - - # https://cryptopp.com/wiki/Config.h#Options_and_Defines - bottle :disable, "Library and clients must be built on the same microarchitecture" - - def install - system "make", "shared", "all", "CXX=#{ENV.cxx}" - system "./cryptest.exe", "v" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace CryptoPP; - using namespace std; - - int main() - { - byte digest[SHA1::DIGESTSIZE]; - string data = "Hello World!"; - SHA1().CalculateDigest(digest, (byte*) data.c_str(), data.length()); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lcryptopp", "-o", "test" - system "./test" - end -end diff --git a/Formula/crystal-icr.rb b/Formula/crystal-icr.rb deleted file mode 100644 index b0aae7020b855..0000000000000 --- a/Formula/crystal-icr.rb +++ /dev/null @@ -1,23 +0,0 @@ -class CrystalIcr < Formula - desc "Interactive console for Crystal programming language" - homepage "https://github.com/crystal-community/icr" - url "https://github.com/crystal-community/icr/archive/v0.6.0.tar.gz" - sha256 "970d5ecbde6bb370c8178339db42e7812b7a2f3a5db3eec868cc18c19523c0ea" - - bottle do - sha256 "02a8c6c556b777a289a5e16f0844e00594015c8c9aef4ee1ab14d48aa605524d" => :mojave - sha256 "1eaf80242e1ab6800378fb531d5fa843a6131d661ef73fccf174ad590f2ae43c" => :high_sierra - sha256 "1fe165c33497947f796d274122ca01ee0b387480edd7f1400af1ed15932f5ac9" => :sierra - end - - depends_on "crystal" - depends_on "readline" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_match "icr version #{version}", shell_output("#{bin}/icr -v") - end -end diff --git a/Formula/crystal.rb b/Formula/crystal.rb deleted file mode 100644 index 34b9a112c68d7..0000000000000 --- a/Formula/crystal.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Crystal < Formula - desc "Fast and statically typed, compiled language with Ruby-like syntax" - homepage "https://crystal-lang.org/" - - stable do - url "https://github.com/crystal-lang/crystal/archive/0.27.0.tar.gz" - sha256 "43c8ac1b5c59ccea3cd58c9bd2a7af07a56f96cf1eff1e54d93f648b5340e83a" - - resource "shards" do - url "https://github.com/crystal-lang/shards/archive/v0.8.1.tar.gz" - sha256 "75c74ab6acf2d5c59f61a7efd3bbc3c4b1d65217f910340cb818ebf5233207a5" - end - end - - bottle do - sha256 "fd57919e22be24ecf51e0da2d13c3a54ae8bc166bdcd1264deaacfc964b1c3bd" => :mojave - sha256 "3c0396e3353fdefc933ec377941fb8c36ce12e2d4e458c1123c95ca1210a0731" => :high_sierra - sha256 "27250e0754f7b3d592ab5499e65078c87c1c19d5257023bde50c0ab6b446f318" => :sierra - end - - head do - url "https://github.com/crystal-lang/crystal.git" - - resource "shards" do - url "https://github.com/crystal-lang/shards.git" - end - end - - depends_on "libatomic_ops" => :build # for building bdw-gc - depends_on "pkg-config" => :build - depends_on "bdw-gc" - depends_on "gmp" # std uses it but it's not linked - depends_on "libevent" - depends_on "libyaml" - depends_on "llvm@6" - depends_on "pcre" - - resource "boot" do - url "https://github.com/crystal-lang/crystal/releases/download/0.26.1/crystal-0.26.1-1-darwin-x86_64.tar.gz" - version "0.26.1-1" - sha256 "3ad9616204d36ee4171e15892ee32216eab06f87f1f6cf5e32b45196dd4231d7" - end - - def install - (buildpath/"boot").install resource("boot") - - if build.head? - ENV["CRYSTAL_CONFIG_BUILD_COMMIT"] = Utils.popen_read("git rev-parse --short HEAD").strip - end - - ENV["CRYSTAL_CONFIG_PATH"] = prefix/"src:lib" - ENV.append_path "PATH", "boot/bin" - - system "make", "deps" - (buildpath/".build").mkpath - - system "bin/crystal", "build", - "-D", "without_openssl", - "-D", "without_zlib", - "-o", ".build/crystal", - "src/compiler/crystal.cr", - "--release", "--no-debug" - - resource("shards").stage do - system buildpath/"bin/crystal", "build", "-o", buildpath/".build/shards", "src/shards.cr" - end - - bin.install ".build/shards" - bin.install ".build/crystal" - prefix.install "src" - bash_completion.install "etc/completion.bash" => "crystal" - zsh_completion.install "etc/completion.zsh" => "_crystal" - end - - test do - assert_match "1", shell_output("#{bin}/crystal eval puts 1") - end -end diff --git a/Formula/cscope.rb b/Formula/cscope.rb deleted file mode 100644 index 88d86d93dd9ba..0000000000000 --- a/Formula/cscope.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Cscope < Formula - desc "Tool for browsing source code" - homepage "https://cscope.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz" - sha256 "4889d091f05aa0845384b1e4965aa31d2b20911fb2c001b2cdcffbcb7212d3af" - - bottle do - cellar :any_skip_relocation - sha256 "d13055e5d40c7b29ca273be19d611db2d9c157198bddbaf85bf6ca58323e0dc4" => :mojave - sha256 "c341d01145d24da1e42347e3c8924569e97158c826ab5a118c2708baa3733ecc" => :high_sierra - sha256 "7065f35c7c69268a0c293c7108e936c92c83fa6c1aff78d9fb6eb4d6178cb3c9" => :sierra - sha256 "97930be35cbcd08980651597acf931adbb50a80df10960d6564497f19d9c8032" => :el_capitan - sha256 "71d86771790165c777341e4457dd193008cfb2fb24628a138cb45fec61e6b42d" => :yosemite - sha256 "cb2f63522d072307cacf63e8eabf4c284f2e8c1b2ff8c6de3aeb6fb8759a1212" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - void func() - { - printf("Hello World!"); - } - - int main() - { - func(); - return 0; - } - EOS - (testpath/"cscope.files").write "./test.c\n" - system "#{bin}/cscope", "-b", "-k" - assert_match /test\.c.*func/, shell_output("#{bin}/cscope -L1func") - end -end diff --git a/Formula/csfml.rb b/Formula/csfml.rb deleted file mode 100644 index 526ad9004ee5b..0000000000000 --- a/Formula/csfml.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Csfml < Formula - # Don't update CSFML until there's a corresponding SFML release - desc "SMFL bindings for C" - homepage "https://www.sfml-dev.org/" - url "https://github.com/SFML/CSFML/archive/2.4.tar.gz" - sha256 "4e3d9a03afafbd3a507c39457a7619b68616ec79e870b975e09665e924f9c4c6" - head "https://github.com/SFML/CSFML.git" - - bottle do - cellar :any - sha256 "47ee888d4a09fcacbf1fbc242455a167bd7e3a8525e26883c22a1b511d04c037" => :mojave - sha256 "f6507fafb4cbb87b11f6763c5683926b618e0f3795567329669efcff80264ae3" => :high_sierra - sha256 "9ad1dd48f601df0772a86cbb1101d75b29a89c8ef6269974187cbb4202f21e6a" => :sierra - sha256 "041543d0017f035714db20025d1b115227780ae5ac10de4ae9a56ad39fade888" => :el_capitan - sha256 "94edea36f26da5c9e87e2bfb114faa9dd479eb4f2dd7beeab5c00969708954a8" => :yosemite - end - - depends_on "cmake" => :build - depends_on "sfml" - - def install - system "cmake", ".", "-DCMAKE_MODULE_PATH=#{Formula["sfml"].share}/SFML/cmake/Modules/", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main (void) - { - sfWindow * w = sfWindow_create (sfVideoMode_getDesktopMode (), "Test", 0, NULL); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lcsfml-window", "-o", "test" - system "./test" - end -end diff --git a/Formula/csmith.rb b/Formula/csmith.rb deleted file mode 100644 index 01cc777e36c24..0000000000000 --- a/Formula/csmith.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Csmith < Formula - desc "Generates random C programs conforming to the C99 standard" - homepage "https://embed.cs.utah.edu/csmith/" - url "https://embed.cs.utah.edu/csmith/csmith-2.3.0.tar.gz" - sha256 "f247cc0aede5f8a0746271b40a5092b5b5a2d034e5e8f7a836c879dde3fb65d5" - head "https://github.com/csmith-project/csmith.git" - - bottle do - cellar :any - sha256 "7c3759ccefa73b295acd5e7e631c40594f6983e26e903b54a88a9e0dfdfcaa96" => :mojave - sha256 "e8e818a9898b4145c5622810958fa8616f8b57156f09aeaf3045873210f0856a" => :high_sierra - sha256 "2e78da57153124cb3feca12955d0bbadbc4e90dbff6c34a08532aea55c75ba8e" => :sierra - sha256 "472992fd577ec20b025397c840823abf8f88d719e7d86bba427446a38cc5584d" => :el_capitan - sha256 "277a9e03f3bfdd03f1e3136ef867604c7f6c4f9763346223bb41b47f0fa72f0d" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - mv "#{bin}/compiler_test.in", share - (include/"csmith-#{version}/runtime").install Dir["runtime/*.h"] - end - - def caveats; <<~EOS - It is recommended that you set the environment variable 'CSMITH_PATH' to - #{include}/csmith-#{version} - EOS - end - - test do - system "#{bin}/csmith", "-o", "test.c" - end -end diff --git a/Formula/cspice.rb b/Formula/cspice.rb deleted file mode 100644 index a6fbd5f7e1b42..0000000000000 --- a/Formula/cspice.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Cspice < Formula - desc "Observation geometry system for robotic space science missions" - homepage "https://naif.jpl.nasa.gov/naif/toolkit.html" - url "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z" - mirror "https://dl.bintray.com/homebrew/mirror/cspice-66.tar.Z" - version "66" - sha256 "f5d48c4b0d558c5d71e8bf6fcdf135b0943210c1ff91f8191dfc447419a6b12e" - - bottle do - cellar :any_skip_relocation - sha256 "dac29486067ad080407dfd76641a8902103ce333750d5e2c9723409806f2ab61" => :high_sierra - sha256 "5ffb3eec6da9aa84ff58330734d024df9ea1378b1cc93365736b66d4315c47b9" => :sierra - sha256 "ceec1738779c07c06bd21b5c81816fb66854b728a1a098fe5ac1f37a176ee32f" => :el_capitan - sha256 "ff72f9d54707e03e86016b286117528720134acd4f23bd6e6b4402c8cd4def73" => :yosemite - end - - conflicts_with "openhmd", :because => "both install `simple` binaries" - conflicts_with "libftdi0", :because => "both install `simple` binaries" - conflicts_with "enscript", :because => "both install `states` binaries" - conflicts_with "fondu", :because => "both install `tobin` binaries" - - def install - rm_f Dir["lib/*"] - rm_f Dir["exe/*"] - system "csh", "makeall.csh" - mv "exe", "bin" - pkgshare.install "doc", "data" - prefix.install "bin", "include", "lib" - - lib.install_symlink "cspice.a" => "libcspice.a" - lib.install_symlink "csupport.a" => "libcsupport.a" - end - - test do - system "#{bin}/tobin", "#{pkgshare}/data/cook_01.tsp", "DELME" - end -end diff --git a/Formula/css-crush.rb b/Formula/css-crush.rb deleted file mode 100644 index 5b271f8da2009..0000000000000 --- a/Formula/css-crush.rb +++ /dev/null @@ -1,26 +0,0 @@ -class CssCrush < Formula - desc "Extensible PHP based CSS preprocessor" - homepage "http://the-echoplex.net/csscrush" - url "https://github.com/peteboere/css-crush/archive/v2.4.0.tar.gz" - sha256 "75c8d868adf5a537a47fedff28c53fe4e6764264239573a858a0048036280d6c" - head "https://github.com/peteboere/css-crush.git" - - bottle :unneeded - - def install - libexec.install Dir["*"] - (bin+"csscrush").write <<~EOS - #!/bin/sh - php "#{libexec}/cli.php" "$@" - EOS - end - - test do - (testpath/"test.crush").write <<~EOS - @define foo #123456; - p { color: $(foo); } - EOS - - assert_equal "p{color:#123456}", shell_output("#{bin}/csscrush #{testpath}/test.crush").strip - end -end diff --git a/Formula/cssembed.rb b/Formula/cssembed.rb deleted file mode 100644 index b65aa1a75f0d5..0000000000000 --- a/Formula/cssembed.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Cssembed < Formula - desc "Automatic data URI embedding in CSS files" - homepage "https://www.nczonline.net/blog/2009/11/03/automatic-data-uri-embedding-in-css-files/" - url "https://github.com/downloads/nzakas/cssembed/cssembed-0.4.5.jar" - sha256 "8955016c0d32de8755d9ee33d365d1ad658a596aba48537a810ce62f3d32a1af" - - bottle :unneeded - - def install - libexec.install "cssembed-#{version}.jar" - bin.write_jar_script libexec/"cssembed-#{version}.jar", "cssembed" - end -end diff --git a/Formula/csshx.rb b/Formula/csshx.rb deleted file mode 100644 index 2be20ced5bebc..0000000000000 --- a/Formula/csshx.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Csshx < Formula - desc "Cluster ssh tool for Terminal.app" - homepage "https://github.com/brockgr/csshx" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/csshx/csshX-0.74.tgz" - mirror "https://distfiles.macports.org/csshX/csshX-0.74.tgz" - sha256 "eaa9e52727c8b28dedc87398ed33ffa2340d6d0f3ea9d261749c715cb7a0e9c8" - head "https://github.com/brockgr/csshx.git" - - bottle :unneeded - - def install - bin.install "csshX" - end - - test do - assert_match version.to_s, shell_output("#{bin}/csshX --version 2>&1", 2) - end -end diff --git a/Formula/csup.rb b/Formula/csup.rb deleted file mode 100644 index 38640971e4264..0000000000000 --- a/Formula/csup.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Csup < Formula - desc "Rewrite of CVSup in C" - homepage "https://bitbucket.org/mux/csup" - url "https://bitbucket.org/mux/csup/get/REL_20120305.tar.gz" - sha256 "6b9a8fa2d2e70d89b2780cbc3f93375915571497f59c77230d4233a27eef77ef" - revision 1 - head "https://bitbucket.org/mux/csup", :using => :hg - - bottle do - rebuild 1 - sha256 "3aa3e72c6f104818b1d20d3da7a91082372f1a2291dd4df44a646091b7cdbb92" => :mojave - sha256 "14207f528521fa0ebec31802647c97a7fc68705333b9b85e13b1ca49abc3ecfa" => :high_sierra - sha256 "48e552e85834b44fbaf0c09fef9e0f6e4b8768684973dd8ad632e778d228aa75" => :sierra - sha256 "e5fc8b0e31fa2f93dccde05ad0b431150c8fb925ee2ab357878f01f1ba5264c2" => :el_capitan - end - - depends_on "openssl" - - def install - system "make" - bin.install "csup" - man1.install "csup.1" - end - - test do - system "#{bin}/csup", "-v" - end -end diff --git a/Formula/csv-fix.rb b/Formula/csv-fix.rb deleted file mode 100644 index 5a010a2f5653f..0000000000000 --- a/Formula/csv-fix.rb +++ /dev/null @@ -1,32 +0,0 @@ -class CsvFix < Formula - desc "Tool for manipulating CSV data" - homepage "https://neilb.bitbucket.io/csvfix/" - url "https://bitbucket.org/neilb/csvfix/get/version-1.6.tar.gz" - sha256 "32982aa0daa933140e1ea5a667fb71d8adc731cc96068de3a8e83815be62c52b" - - bottle do - cellar :any_skip_relocation - sha256 "93a9586c3ef8614be909c0e5ac5bb463536dab6fcbfc00bb1e94fc6affbe7248" => :mojave - sha256 "e02b2cb8929617c91a258c313481097146259a9ed68094bd759c30c3cc75806e" => :high_sierra - sha256 "b52224f7cd1dd228ffe751c67993f854a8a59f17d6099d40fca02374f1949d02" => :sierra - sha256 "ba19053a978b57b6b962f8fa24d099d964ceb90cd28304e3a6c2a7fe0d3abc32" => :el_capitan - sha256 "b8dbaf2e14e35cc4c1d7b5d04a5615377f7eeb4d9b1f25fe554b8711511c28f6" => :yosemite - sha256 "0b86933c8e32830d5abd0f26ef83b1a60e0254da67542b695fd50ab1e3ba2e68" => :mavericks - end - - needs :cxx11 - - def install - # clang on Mt. Lion will try to build against libstdc++, - # despite -std=gnu++0x - ENV.libcxx - - system "make", "lin" - bin.install "csvfix/bin/csvfix" - end - - test do - assert_equal '"foo","bar"', - pipe_output("#{bin}/csvfix trim", "foo , bar \n").chomp - end -end diff --git a/Formula/csvkit.rb b/Formula/csvkit.rb deleted file mode 100644 index a13174a15e8d4..0000000000000 --- a/Formula/csvkit.rb +++ /dev/null @@ -1,126 +0,0 @@ -class Csvkit < Formula - include Language::Python::Virtualenv - - desc "Suite of command-line tools for converting to and working with CSV" - homepage "https://csvkit.readthedocs.io/" - url "https://files.pythonhosted.org/packages/01/69/476d4e74d84bcc5196f6b6a87b419363e163bc8c31d0660166f9e447bd97/csvkit-1.0.3.tar.gz" - sha256 "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c" - - bottle do - cellar :any_skip_relocation - sha256 "8a19e9c93534cc8df3ffa41c588a97888a18982e8d7918a64fab85c999b44411" => :mojave - sha256 "538553279108f93aa58cfcfcef0b9e1ea5b348afa333d46e0b47de3113b47522" => :high_sierra - sha256 "e5df4e6c87d70f4bef969071019603b2985c62c0e5f3ea454639e917ac678065" => :sierra - sha256 "bbffc0f3b3d118135dd52b7830687fb369d2f8d79f556ae8520e6e677a1faf4c" => :el_capitan - end - - depends_on "python" - - resource "agate" do - url "https://files.pythonhosted.org/packages/d4/1c/99fb34c81c68012c71e8d35a1f16a6b25952322e23c911c81327c8464be8/agate-1.6.1.tar.gz" - sha256 "c93aaa500b439d71e4a5cf088d0006d2ce2c76f1950960c8843114e5f361dfd3" - end - - resource "agate-dbf" do - url "https://files.pythonhosted.org/packages/61/81/17a635599352eab163958905a70261f9eb1d7c4b54036d1c2115adf88162/agate-dbf-0.2.0.tar.gz" - sha256 "0666c1ad06cd4b2860351cebbd88bd4b05b2d1abd41b25cf91f8f6715035735e" - end - - resource "agate-excel" do - url "https://files.pythonhosted.org/packages/02/c0/b82c6f830946203ec16d83eb8a6b250309ba8dcec14640b94eb69d88d30c/agate-excel-0.2.2.tar.gz" - sha256 "8923f71ee2b5b7b21e52fb314a769b28fb902f647534f5cbbb41991d8710f4c7" - end - - resource "agate-sql" do - url "https://files.pythonhosted.org/packages/c7/0c/8ff3f82bf7ca84b2f12362553029830a582a2065499259e9498f08964c99/agate-sql-0.5.3.tar.gz" - sha256 "877b7b85adb5f0325455bba8d50a1623fa32af33680b554feca7c756a15ad9b4" - end - - resource "Babel" do - url "https://files.pythonhosted.org/packages/be/cc/9c981b249a455fa0c76338966325fc70b7265521bad641bf2932f77712f4/Babel-2.6.0.tar.gz" - sha256 "8cba50f48c529ca3fa18cf81fa9403be176d374ac4d60738b839122dfaaa3d23" - end - - resource "dbfread" do - url "https://files.pythonhosted.org/packages/ad/ae/a5891681f5012724d062a4ca63ec2ff539c73d5804ba594e7e0e72099d3f/dbfread-2.0.7.tar.gz" - sha256 "07c8a9af06ffad3f6f03e8fe91ad7d2733e31a26d2b72c4dd4cfbae07ee3b73d" - end - - resource "et_xmlfile" do - url "https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz" - sha256 "614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "jdcal" do - url "https://files.pythonhosted.org/packages/3b/d5/181cab9a39dbe8060bd073acae2518e0378e66ff7509c4c6db0881d58e01/jdcal-1.4.tar.gz" - sha256 "ea0a5067c5f0f50ad4c7bdc80abad3d976604f6fb026b0b3a17a9d84bb9046c9" - end - - resource "leather" do - url "https://files.pythonhosted.org/packages/a0/44/1acad8bfe958874c66825a4bdddbd277a549580b88c5daf3a4c128c521b0/leather-0.3.3.tar.gz" - sha256 "076d1603b5281488285718ce1a5ce78cf1027fe1e76adf9c548caf83c519b988" - end - - resource "openpyxl" do - url "https://files.pythonhosted.org/packages/f6/13/3c1263b852377738eaa60f99602fb58cc8ad2fd1badb0b724b0d5b532727/openpyxl-2.5.4.tar.gz" - sha256 "9239b74faf175dc4276a5fc277655fc53c2f704ded39e680d35e6a39e1913f69" - end - - resource "parsedatetime" do - url "https://files.pythonhosted.org/packages/e3/b3/02385db13f1f25f04ad7895f35e9fe3960a4b9d53112775a6f7d63f264b6/parsedatetime-2.4.tar.gz" - sha256 "3d817c58fb9570d1eec1dd46fa9448cd644eeed4fb612684b02dfda3a79cb84b" - end - - resource "python-slugify" do - url "https://files.pythonhosted.org/packages/70/c1/98bfb2c981787dcec4613c5da2c17d6f54613935b0e3a877e87a9fa974e4/python-slugify-1.2.5.tar.gz" - sha256 "5dbb360b882b2dabe0471a1a92f604504d83c2a73c71f2098d004ab62e695534" - end - - resource "pytimeparse" do - url "https://files.pythonhosted.org/packages/37/5d/231f5f33c81e09682708fb323f9e4041408d8223e2f0fb9742843328778f/pytimeparse-1.1.8.tar.gz" - sha256 "e86136477be924d7e670646a98561957e8ca7308d44841e21f5ddea757556a0a" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/ca/a9/62f96decb1e309d6300ebe7eee9acfd7bccaeedd693794437005b9067b44/pytz-2018.5.tar.gz" - sha256 "ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "SQLAlchemy" do - url "https://files.pythonhosted.org/packages/28/99/ad4dd8240ff8a98c8786fef6d2b392fb2309b0c2bcf23fdfbf3a4cb1a499/SQLAlchemy-1.2.9.tar.gz" - sha256 "e21e5561a85dcdf16b8520ae4daec7401c5c24558e0ce004f9b60be75c4b6957" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/9d/36/49d0ee152b6a1631f03a541532c6201942430060aa97fe011cf01a2cce64/Unidecode-1.0.22.tar.gz" - sha256 "8c33dd588e0c9bc22a76eaa0c715a5434851f726131bd44a6c26471746efabf5" - end - - resource "xlrd" do - url "https://files.pythonhosted.org/packages/86/cf/bb010f16cefa8f26ac9329ca033134bcabc7a27f5c3d8de961bacc0f80b3/xlrd-1.1.0.tar.gz" - sha256 "8a21885513e6d915fe33a8ee5fdfa675433b61405ba13e2a69e62ee36828d7e2" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_equal "2,6", pipe_output("#{bin}/csvcut -c 1,3", "2,4,6,8", 0).chomp - end -end diff --git a/Formula/csvprintf.rb b/Formula/csvprintf.rb deleted file mode 100644 index 8bde6606e6259..0000000000000 --- a/Formula/csvprintf.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Csvprintf < Formula - desc "Command-line utility for parsing CSV files" - homepage "https://github.com/archiecobbs/csvprintf" - url "https://github.com/archiecobbs/csvprintf/archive/1.0.4.tar.gz" - sha256 "022188ced570203d6084e6eab68f7ad96054a4ab8aa54db1857a8fd076280568" - - bottle do - cellar :any_skip_relocation - sha256 "42e857e3fe76d351204fb76fd017a257f3362382af49f6c7c03e156af6bd5bb0" => :mojave - sha256 "99340f4265ad7a952d3f4fdcce154a10e46c7c8c06979b9e7c5d5016810a8c87" => :high_sierra - sha256 "236d5de27a77cadffa4cc014b9f2416b7d952f8cedb96ced98096f0bbdc928cb" => :sierra - sha256 "79c0236e6eeb86a283831f3123430f700862d229bc0b5d64b0a0251d8832e092" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - ENV.append "LDFLAGS", "-liconv" - system "./autogen.sh" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "Fred Smith\n", - pipe_output("#{bin}/csvprintf -i '%2$s %1$s\n'", "Last,First\nSmith,Fred\n") - end -end diff --git a/Formula/csvtomd.rb b/Formula/csvtomd.rb deleted file mode 100644 index f31e03c7f8aea..0000000000000 --- a/Formula/csvtomd.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Csvtomd < Formula - include Language::Python::Virtualenv - - desc "CSV to Markdown table converter" - homepage "https://github.com/mplewis/csvtomd" - url "https://files.pythonhosted.org/packages/2f/41/289bedde7fb32d817d5802eff68b99546842cb34df840665ec39b363f258/csvtomd-0.2.1.tar.gz" - sha256 "d9fdf166c3c299ad5800b3cb1661f223b98237f38f22e9d253d45d321f70ec72" - revision 4 - - bottle do - cellar :any_skip_relocation - sha256 "4ca9e89b41c681120bdf0900fbf5833463115b8d5373a64227ba61ceb252cfef" => :mojave - sha256 "9676da327548cff3c4e1235b7d9071939315b22f8a7fcce3c555b308890b8338" => :high_sierra - sha256 "b38719288a0ba84c2a2143ac0f13965eac1f796e2a6ab20918fc59d304415f2b" => :sierra - sha256 "d343b9087bbaf2b5a5be09f71d23ff9b07742cc262f5fd66b7b220d2db73b4b2" => :el_capitan - end - - depends_on "python" - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"test.csv").write <<~EOS - column 1,column 2 - hello,world - EOS - markdown = <<~EOS.strip - column 1 | column 2 - ----------|---------- - hello | world - EOS - assert_equal markdown, shell_output("#{bin}/csvtomd test.csv").strip - end -end diff --git a/Formula/ctags.rb b/Formula/ctags.rb deleted file mode 100644 index ce48b7833305a..0000000000000 --- a/Formula/ctags.rb +++ /dev/null @@ -1,117 +0,0 @@ -class Ctags < Formula - desc "Reimplementation of ctags(1)" - homepage "https://ctags.sourceforge.io/" - revision 1 - - stable do - url "https://downloads.sourceforge.net/ctags/ctags-5.8.tar.gz" - sha256 "0e44b45dcabe969e0bbbb11e30c246f81abe5d32012db37395eb57d66e9e99c7" - - # also fixes https://sourceforge.net/p/ctags/bugs/312/ - # merged upstream but not yet in stable - patch :p2 do - url "https://gist.githubusercontent.com/naegelejd/9a0f3af61954ae5a77e7/raw/16d981a3d99628994ef0f73848b6beffc70b5db8/Ctags%20r782" - sha256 "26d196a75fa73aae6a9041c1cb91aca2ad9d9c1de8192fce8cdc60e4aaadbcbb" - end - end - - bottle do - rebuild 1 - sha256 "2812884a8f1217767103dc5e0ceb9c7048b5a4d9a34071f76e3c8f9b0f00895c" => :mojave - sha256 "497e0220e354a9ec7e0735d3ba68a27892f1f69973d6992e36667ea197a236bc" => :high_sierra - sha256 "56bc233d09bc3591ad1f3a9c5282f9f9cf0729b0d5a0ee001d4ea6f68f2b0ab7" => :sierra - sha256 "a17ee0cd08909484aeeca9177b356e14655d5f75ecaa4b36a3bd2e2248d8ac91" => :el_capitan - end - - head do - url "http://svn.code.sf.net/p/ctags/code/trunk" - depends_on "autoconf" => :build - end - - # fixes https://sourceforge.net/p/ctags/bugs/312/ - patch :p2, :DATA - - def install - if build.head? - system "autoheader" - system "autoconf" - end - system "./configure", "--prefix=#{prefix}", - "--enable-macro-patterns", - "--mandir=#{man}", - "--with-readlib" - system "make", "install" - end - - def caveats - <<~EOS - Under some circumstances, emacs and ctags can conflict. By default, - emacs provides an executable `ctags` that would conflict with the - executable of the same name that ctags provides. To prevent this, - Homebrew removes the emacs `ctags` and its manpage before linking. - - However, if you install emacs with the `--keep-ctags` option, then - the `ctags` emacs provides will not be removed. In that case, you - won't be able to install ctags successfully. It will build but not - link. - EOS - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - void func() - { - printf("Hello World!"); - } - - int main() - { - func(); - return 0; - } - EOS - system "#{bin}/ctags", "-R", "." - assert_match /func.*test\.c/, File.read("tags") - end -end - -__END__ -diff -ur a/ctags-5.8/read.c b/ctags-5.8/read.c ---- a/ctags-5.8/read.c 2009-07-04 17:29:02.000000000 +1200 -+++ b/ctags-5.8/read.c 2012-11-04 16:19:27.000000000 +1300 -@@ -18,7 +18,6 @@ - #include - #include - --#define FILE_WRITE - #include "read.h" - #include "debug.h" - #include "entry.h" -diff -ur a/ctags-5.8/read.h b/ctags-5.8/read.h ---- a/ctags-5.8/read.h 2008-04-30 13:45:57.000000000 +1200 -+++ b/ctags-5.8/read.h 2012-11-04 16:19:18.000000000 +1300 -@@ -11,12 +11,6 @@ - #ifndef _READ_H - #define _READ_H - --#if defined(FILE_WRITE) || defined(VAXC) --# define CONST_FILE --#else --# define CONST_FILE const --#endif -- - /* - * INCLUDE FILES - */ -@@ -95,7 +89,7 @@ - /* - * GLOBAL VARIABLES - */ --extern CONST_FILE inputFile File; -+extern inputFile File; - - /* - * FUNCTION PROTOTYPES diff --git a/Formula/ctail.rb b/Formula/ctail.rb deleted file mode 100644 index ab19e8b9c05ad..0000000000000 --- a/Formula/ctail.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Ctail < Formula - desc "Tool for operating tail across large clusters of machines" - homepage "https://github.com/pquerna/ctail" - url "https://github.com/pquerna/ctail/archive/ctail-0.1.0.tar.gz" - sha256 "864efb235a5d076167277c9f7812ad5678b477ff9a2e927549ffc19ed95fa911" - - bottle do - cellar :any - rebuild 1 - sha256 "d81e805d4a80fd83b36fa579dff3c71a364b7bbc50ff6addf74a0d3790a92643" => :mojave - sha256 "de6e121995f86ec3dbfddf8bee861d9389c548648316f4901cbde691ca26a8d5" => :high_sierra - sha256 "829ed2ea1ac94bf32fd1817f714b87301abf2c488cf151675239d5d9bf6f6ef8" => :sierra - sha256 "80a2ae43fba99e6eb5eb4b50b52ee0e32213d521f59e147a109444439b86365d" => :el_capitan - sha256 "e23b4f67bc165d9d4549963b41b9ee89a5fa2e18040277750c4800da016a919e" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "apr" - depends_on "apr-util" - - conflicts_with "byobu", :because => "both install `ctail` binaries" - - def install - system "./configure", - "--prefix=#{prefix}", - "--disable-debug", - "--with-apr=#{Formula["apr"].opt_bin}", - "--with-apr-util=#{Formula["apr-util"].opt_bin}" - system "make", "LIBTOOL=glibtool --tag=CC" - system "make", "install" - end - - test do - system "#{bin}/ctail", "-h" - end -end diff --git a/Formula/ctemplate.rb b/Formula/ctemplate.rb deleted file mode 100644 index 68c67b3a4d6b0..0000000000000 --- a/Formula/ctemplate.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Ctemplate < Formula - desc "Template language for C++" - homepage "https://github.com/olafvdspek/ctemplate" - url "https://github.com/OlafvdSpek/ctemplate/archive/ctemplate-2.3.tar.gz" - sha256 "99e5cb6d3f8407d5b1ffef96b1d59ce3981cda3492814e5ef820684ebb782556" - head "https://github.com/olafvdspek/ctemplate.git" - - bottle do - cellar :any - sha256 "0f0dd5a902d31e3ff1e6868b425e4aeb9ec9d094337fea48f85cad7b7e0d747f" => :mojave - sha256 "6cddb070bbc9b662305513c142119cb83fac09d1c1579b925f6f2bbddb0773fe" => :high_sierra - sha256 "f2bbb674557034e487ad218f871145c9f27b02b908e10b2fd15f457c960191e0" => :sierra - sha256 "3cb0314574a76b022e365c293f50eff604def9a9171b45c4e3af1c56f5310927" => :el_capitan - sha256 "f405ef2681e4e0aff1a034226733e4466d6f916ae540fa7a3a52e3d94f529f26" => :yosemite - sha256 "335fb8f9b6ac20aeb09efba90dcdba941b7c0cef2571dcb50fb2040f515386c7" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/ctl.rb b/Formula/ctl.rb deleted file mode 100644 index 5fe8bdd0b51ea..0000000000000 --- a/Formula/ctl.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ctl < Formula - desc "Programming language for digital color management" - homepage "https://github.com/ampas/CTL" - url "https://github.com/ampas/CTL/archive/ctl-1.5.2.tar.gz" - sha256 "d7fac1439332c4d84abc3c285b365630acf20ea041033b154aa302befd25e0bd" - revision 2 - - bottle do - sha256 "16f2a8692af07f7710d558e4de69a88705df2dd153e00dc36fdfb0d3a2accc0e" => :mojave - sha256 "edb2ab8944366710827ab289c0c0c6846642524fd0928dfab8cb8be033cd465d" => :high_sierra - sha256 "6668abc43f329b3220882182fa9f45c04e273f9f3d91a78a9c352df55d85171c" => :sierra - sha256 "744fa25276716928e3b7e43e1f176151fdcf1b60fab95b2f3308467d77bf75a6" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "aces_container" - depends_on "ilmbase" - depends_on "libtiff" - depends_on "openexr" - - def install - ENV.delete "CTL_MODULE_PATH" - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - assert_match /transforms an image/, shell_output("#{bin}/ctlrender -help", 1) - end -end diff --git a/Formula/ctop.rb b/Formula/ctop.rb deleted file mode 100644 index b3bbfbafdd682..0000000000000 --- a/Formula/ctop.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Ctop < Formula - desc "Top-like interface for container metrics" - homepage "https://bcicen.github.io/ctop/" - url "https://github.com/bcicen/ctop/archive/v0.7.1.tar.gz" - sha256 "baa632235c43ed84557a13b475a1972a8327a55babb6dd08d2d72643f8442ed2" - - bottle do - cellar :any_skip_relocation - sha256 "3c581ea1e2572f43ac4410fcbb5f39e706a031d45998ad54cc1ba474fa2c1cb1" => :mojave - sha256 "0d2f00fb47786a5a95578da90f80979683e76d431ad90c62088d082af4ecdeff" => :high_sierra - sha256 "3d3968570b78e240fe94f16eb4235f016ba1f5943e3030eb177b0a7a71989934" => :sierra - sha256 "149adb4dfa66b7492992c07f1007743f69a6069d380a43d0e14dfffba7bc8988" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/bcicen/ctop").install buildpath.children - cd "src/github.com/bcicen/ctop" do - system "make", "build" - bin.install "ctop" - prefix.install_metafiles - end - end - - test do - system "#{bin}/ctop", "-v" - end -end diff --git a/Formula/ctunnel.rb b/Formula/ctunnel.rb deleted file mode 100644 index 1235cf4c2b580..0000000000000 --- a/Formula/ctunnel.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ctunnel < Formula - desc "Cryptographic or plain tunnels for TCP/UDP connections" - homepage "https://github.com/alienrobotarmy/ctunnel" - url "https://www.alienrobotarmy.com/ctunnel/0.7/ctunnel-0.7.tar.gz" - sha256 "3c90e14af75f7c31372fcdeb8ad24b5f874bfb974aa0906f25a059a2407a358f" - revision 1 - - bottle do - cellar :any - sha256 "7d3debbf6a8fe8155e846e255e8330502a400c4d2da4d1c30c038fdbb9ba30cd" => :mojave - sha256 "9a2394bdea7bf5ca99f5e92f6d99e8729fc6e81da0d6353f22cefe3e8df4baa4" => :high_sierra - sha256 "dfcf3349529b7b2ab47298a9090d916be9eb3b9c0d72cd644f0e4b1de09796be" => :sierra - sha256 "6a5de1059ec2e138e68530fd62f51b102e29d6ecfb83eaa22e3f79bc0d9acf4c" => :el_capitan - sha256 "70736b739ab67933916bff1ce0d4ea9105c0faef9576646a5f7abf5e80f2b9b3" => :yosemite - sha256 "3a442229dba723b14300c711e84b3dd0740b1b0488c6d4b59121193cba7195c7" => :mavericks - end - - depends_on "openssl" - - def install - # Do not require tuntap - inreplace "Makefile.cfg", "TUNTAP=yes", "TUNTAP=no" - - system "make" - bin.mkpath - system "make", "-B", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/ctunnel", "-h" - end -end diff --git a/Formula/cuba.rb b/Formula/cuba.rb deleted file mode 100644 index a9eda22dcd7b3..0000000000000 --- a/Formula/cuba.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Cuba < Formula - desc "Library for multidimensional numerical integration" - homepage "http://www.feynarts.de/cuba/" - url "http://www.feynarts.de/cuba/Cuba-4.2.tar.gz" - sha256 "6b75bb8146ae6fb7da8ebb72ab7502ecd73920efc3ff77a69a656db9530a5eef" - - bottle do - cellar :any_skip_relocation - sha256 "4520616f7170177dd546ec6d71d3c52e592c93e8a7e24b9c2e252382011a7b4d" => :mojave - sha256 "a607f8cbcfa954ac20a407fce07dc6cc65bfaab6b06079cc5d1eb85400532e74" => :high_sierra - sha256 "b3317c5c1d2f902d60aaa175f3e35d906f2ac6ab179b87de09e0f9110125b4ff" => :sierra - sha256 "6f1bf18403892cea4d5d692256e31dd11d170ecadaf996f960c454084e51b243" => :el_capitan - end - - def install - ENV.deparallelize # Makefile does not support parallel build - system "./configure", "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "demo" - end - - test do - system ENV.cc, "-o", "demo", "-L#{lib}", "-lcuba", - "#{pkgshare}/demo/demo-c.c" - system "./demo" - end -end diff --git a/Formula/cubeb.rb b/Formula/cubeb.rb deleted file mode 100644 index 792ca69d2de73..0000000000000 --- a/Formula/cubeb.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Cubeb < Formula - desc "Cross-platform audio library" - homepage "https://github.com/kinetiknz/cubeb" - url "https://github.com/kinetiknz/cubeb/archive/cubeb-0.2.tar.gz" - sha256 "cac10876da4fa3b3d2879e0c658d09e8a258734562198301d99c1e8228e66907" - head "https://github.com/kinetiknz/cubeb.git" - - bottle do - cellar :any - sha256 "d34baf923b56edec2ae8201857c55426584f35b47ef8e2e6577a38f684fbab75" => :mojave - sha256 "618debffabe494dcde3e0d7e2231078df124ead8ee342886ab38ad7373f73e37" => :high_sierra - sha256 "f89e89027370ea9da99f72f0af0529f9b63fbe31c434d3ccafdc7230664a41c2" => :sierra - sha256 "f7e738b374bb07e1c420e56dfeb72caa814495b446c71d8158ef98c9b33d3a60" => :el_capitan - sha256 "b3cff6ba7008cc764f94281f7759f5d6d2a09a3bdb92f5f6e93be7d6f3ec2405" => :yosemite - sha256 "f239e3b4cc459b4e0e3f4630229242a351dc833dcb385e7badb16208a53f3265" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "autoreconf", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - #define TEST(test, msg) \ - if ((test)) { \ - printf("PASS: %s\\n", msg); \ - } else { \ - printf("FAIL: %s\\n", msg); \ - goto end; \ - } - - /* Dummy callbacks to use for audio stream test */ - static long data_callback(cubeb_stream *stream, void *user, void *buffer, - long nframes) { - return nframes; - } - static void state_callback(cubeb_stream *stream, void *user_ptr, - cubeb_state state) {} - - int main() { - int ret; - cubeb *ctx; - char const *backend_id; - cubeb_stream *stream; - cubeb_stream_params params; - - /* Verify that the library initialises itself successfully */ - ret = cubeb_init(&ctx, "test_context"); - TEST(ret == CUBEB_OK, "initialse cubeb context"); - - /* Verify backend id can be retrieved */ - backend_id = cubeb_get_backend_id(ctx); - TEST(backend_id != NULL, "retrieve backend id"); - - /* Verify that an audio stream gets opened successfully */ - params.format = CUBEB_SAMPLE_S16LE; /* use commonly supported */ - params.rate = 48000; /* parametrs, so that the test */ - params.channels = 1; /* doesn't give a false fail */ - ret = cubeb_stream_init(ctx, &stream, "test_stream", params, 100, - data_callback, state_callback, NULL); - TEST(ret == CUBEB_OK, "initialise stream"); - - end: - /* Cleanup and return */ - cubeb_stream_destroy(stream); - cubeb_destroy(ctx); - return 0; - } - EOS - system "cc", "-o", "test", "#{testpath}/test.c", "-L#{lib}", "-lcubeb" - assert_no_match(/FAIL:.*/, shell_output("#{testpath}/test"), - "Basic sanity test failed.") - end -end diff --git a/Formula/cucumber-cpp.rb b/Formula/cucumber-cpp.rb deleted file mode 100644 index 149257153a814..0000000000000 --- a/Formula/cucumber-cpp.rb +++ /dev/null @@ -1,78 +0,0 @@ -class CucumberCpp < Formula - desc "Support for writing Cucumber step definitions in C++" - homepage "https://cucumber.io" - url "https://github.com/cucumber/cucumber-cpp/archive/v0.5.tar.gz" - sha256 "9e1b5546187290b265e43f47f67d4ce7bf817ae86ee2bc5fb338115b533f8438" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "827eac837946e4fc99ca98ee2525db95adbc24451e4a413212965ad154ce57ee" => :mojave - sha256 "21a25abb3df833d589d2ca423ac2cd4f29cb26c7022a9c1411469082e9e387ff" => :high_sierra - sha256 "ce44809b64223f96c9af2d7b36f2f7b2715801b2538265af801e87f413fc7546" => :sierra - end - - depends_on "cmake" => :build - depends_on "ruby" => :test if MacOS.version <= :sierra - depends_on "boost" - - def install - args = std_cmake_args - args << "-DCUKE_DISABLE_GTEST=on" - args << "-DCUKE_DISABLE_CPPSPEC=on" - args << "-DCUKE_DISABLE_FUNCTIONAL=on" - args << "-DCUKE_DISABLE_BOOST_TEST=on" - system "cmake", ".", *args - system "cmake", "--build", "." - system "make", "install" - end - - test do - ENV["GEM_HOME"] = testpath - ENV["BUNDLE_PATH"] = testpath - system "gem", "install", "cucumber", "-v", "3.0.0" - - (testpath/"features/test.feature").write <<~EOS - Feature: Test - Scenario: Just for test - Given A given statement - When A when statement - Then A then statement - EOS - (testpath/"features/step_definitions/cucumber.wire").write <<~EOS - host: localhost - port: 3902 - EOS - (testpath/"test.cpp").write <<~EOS - #include - GIVEN("^A given statement$") { - } - WHEN("^A when statement$") { - } - THEN("^A then statement$") { - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", - "-lcucumber-cpp", "-I#{Formula["boost"].opt_include}", - "-L#{Formula["boost"].opt_lib}", "-lboost_regex", "-lboost_system", - "-lboost_program_options", "-lboost_filesystem", "-lboost_chrono" - begin - pid = fork { exec "./test" } - expected = <<~EOS - Feature: Test - - Scenario: Just for test # features\/test.feature:2 - Given A given statement # test.cpp:2 - When A when statement # test.cpp:4 - Then A then statement # test.cpp:6 - - 1 scenario \(1 passed\) - 3 steps \(3 passed\) - EOS - assert_match expected, shell_output(testpath/"bin/cucumber") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/cuetools.rb b/Formula/cuetools.rb deleted file mode 100644 index 6f8d892c1b01b..0000000000000 --- a/Formula/cuetools.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Cuetools < Formula - desc "Utilities for .cue and .toc files" - homepage "https://github.com/svend/cuetools" - url "https://github.com/svend/cuetools/archive/1.4.1.tar.gz" - sha256 "24a2420f100c69a6539a9feeb4130d19532f9f8a0428a8b9b289c6da761eb107" - head "https://github.com/svend/cuetools.git" - - bottle do - cellar :any_skip_relocation - sha256 "1e36c3c8d2d53947b73a9f0a0aed74145e2b1890f83764de02f1d12566d0300f" => :mojave - sha256 "4393d6db857a9568a34de3a09ff049fbec9a55a95b029eacd24e35d6ce792074" => :high_sierra - sha256 "9456e5957a78f993f5a8cef76aa583ac6a42a8298fb05bded243dbaf810f9a44" => :sierra - sha256 "7f0effc75d64fca0f2695b5f7ddb4d8713cc83522d40dcd37842e83c120ac117" => :el_capitan - sha256 "81d06ef2e3d98061f332a535b810102c1be0505371c1ac1aed711cf2ae8de5a3" => :yosemite - sha256 "95216c0df3840b2602e61dd3bef7d4c9b65cec0315e5b23ac87329320d9f6be9" => :mavericks - sha256 "cc5240434bb054a51ebb4e4bb3adc8e97844da66aa425fc667f54ecf53ad9aa6" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - # see https://github.com/svend/cuetools/pull/18 - patch :DATA - - def install - system "autoreconf", "-i" - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.cue").write <<~EOS - FILE "sampleimage.bin" BINARY - TRACK 01 MODE1/2352 - INDEX 01 00:00:00 - EOS - system "cueconvert", testpath/"test.cue", testpath/"test.toc" - assert_predicate testpath/"test.toc", :exist? - end -end - -__END__ -diff --git a/configure.ac b/configure.ac -index f54bb92..84ab467 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,5 +1,5 @@ - AC_INIT([cuetools], [1.4.0], [svend@ciffer.net]) --AM_INIT_AUTOMAKE([-Wall -Werror foreign]) -+AM_INIT_AUTOMAKE([-Wall -Werror -Wno-extra-portability foreign]) - AC_PROG_CC - AC_PROG_INSTALL - AC_PROG_RANLIB diff --git a/Formula/cunit.rb b/Formula/cunit.rb deleted file mode 100644 index e0bd992a9e1c2..0000000000000 --- a/Formula/cunit.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Cunit < Formula - desc "Lightweight unit testing framework for C" - homepage "https://cunit.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2" - sha256 "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214" - - bottle do - cellar :any - sha256 "561baccf9e285cd65021b70342d1ba37b456a2f35c0324dfd2a65ea427641d27" => :mojave - sha256 "23fdc88eeb1c4cf8d58e281e046f2e45a56860c0091e5c76f757f01679d143d2" => :high_sierra - sha256 "dc987998ebcfc175c9c9e70c6b83db4197bd5b79d383235b85ee8a30835785df" => :sierra - sha256 "0b92535641c86f38bf7a3a1b08a07aa6523e4c0135792dd92829e00579a5e3a9" => :el_capitan - sha256 "63c1d2905cf9214281b8dad71a7d86fcf57d46ccbeb026a43dc73dddac569840" => :yosemite - sha256 "4add1b332febce1ba3ee01ab98213be0729f3d2cad14f435f4064fec0273c3cd" => :mavericks - sha256 "758213aea9b80d97eb4d30da882933e80e69685ae035ef298f2d39bde84eba06" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - inreplace "bootstrap", "libtoolize", "glibtoolize" - system "sh", "bootstrap", prefix - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include "CUnit/Basic.h" - - int noop(void) { return 0; } - - void test42(void) { CU_ASSERT(42 == 42); } - - int main(void) - { - CU_pSuite pSuite = NULL; - if (CUE_SUCCESS != CU_initialize_registry()) - return CU_get_error(); - pSuite = CU_add_suite("Suite_1", noop, noop); - if (NULL == pSuite) { - CU_cleanup_registry(); - return CU_get_error(); - } - if (NULL == CU_add_test(pSuite, "test of 42", test42)) { - CU_cleanup_registry(); - return CU_get_error(); - } - CU_basic_set_mode(CU_BRM_VERBOSE); - CU_basic_run_tests(); - CU_cleanup_registry(); - return CU_get_error(); - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-lcunit", "-o", "test" - assert_match "test of 42 ...passed", shell_output("./test") - end -end diff --git a/Formula/curaengine.rb b/Formula/curaengine.rb deleted file mode 100644 index be0daa4c60c3f..0000000000000 --- a/Formula/curaengine.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Curaengine < Formula - desc "C++ 3D printing GCode generator" - homepage "https://github.com/Ultimaker/CuraEngine" - url "https://github.com/Ultimaker/CuraEngine/archive/15.04.6.tar.gz" - sha256 "4f2e3c5e74001b39cf5894a1e3f436a7724be0ae9ee30cd02bd2e3fd676ca4b1" - head "https://github.com/Ultimaker/CuraEngine.git" - - bottle do - cellar :any_skip_relocation - sha256 "03459dc8fd06bc5522b8d0084ac2dd05f238316f009e8fa792f5e55218f5852e" => :mojave - sha256 "b29d96d522832565490392c1945bec5be2fe5b48f2331fd121f706e06d7b6912" => :high_sierra - sha256 "2f2c5d334057a9e99ef969f7f2cb66d357ab0c98e501a22103b4c53faa0ca8e8" => :sierra - end - - def install - system "make", "VERSION=#{version}" - bin.install "build/CuraEngine" - end - - test do - (testpath/"t.stl").write <<~EOS - solid t - facet normal 0 -1 0 - outer loop - vertex 0.83404 0 0.694596 - vertex 0.36904 0 1.5 - vertex 1.78814e-006 0 0.75 - endloop - endfacet - endsolid Star - EOS - - system "#{bin}/CuraEngine", "#{testpath}/t.stl" - end -end diff --git a/Formula/curl-openssl.rb b/Formula/curl-openssl.rb deleted file mode 100644 index 338080fb051fc..0000000000000 --- a/Formula/curl-openssl.rb +++ /dev/null @@ -1,57 +0,0 @@ -class CurlOpenssl < Formula - desc "Get a file from an HTTP, HTTPS or FTP server" - homepage "https://curl.haxx.se/" - url "https://curl.haxx.se/download/curl-7.63.0.tar.bz2" - sha256 "9bab7ed4ecff77020a312d84cc5fb7eb02d58419d218f267477a724a17fd8dd8" - - bottle do - sha256 "84c070944750b1ab555478769569326a5af985de9242b64a4f59041cd51b4a3b" => :mojave - sha256 "d3cac8f1bd6593c58358e9e7c3b187182f9b7be5ed1edd4f372c4afb83eea052" => :high_sierra - sha256 "075a6eb711c03a18bd6a5a39ac537224e2cd3acec447b358015239d925547f72" => :sierra - end - - keg_only :provided_by_macos - - depends_on "pkg-config" => :build - depends_on "brotli" - depends_on "nghttp2" - depends_on "openldap" - depends_on "openssl" - - def install - # Allow to build on Lion, lowering from the upstream setting of 10.8 - ENV.append_to_cflags "-mmacosx-version-min=10.7" if MacOS.version <= :lion - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-ares - --with-ca-bundle=#{etc}/openssl/cert.pem - --with-ca-path=#{etc}/openssl/certs - --with-gssapi - --without-libidn2 - --without-libmetalink - --without-librtmp - --without-libssh2 - --with-ssl=#{Formula["openssl"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - libexec.install "lib/mk-ca-bundle.pl" - end - - test do - # Fetch the curl tarball and see that the checksum matches. - # This requires a network connection, but so does Homebrew in general. - filename = (testpath/"test.tar.gz") - system "#{bin}/curl", "-L", stable.url, "-o", filename - filename.verify_checksum stable.checksum - - system libexec/"mk-ca-bundle.pl", "test.pem" - assert_predicate testpath/"test.pem", :exist? - assert_predicate testpath/"certdata.txt", :exist? - end -end diff --git a/Formula/curl.rb b/Formula/curl.rb deleted file mode 100644 index 720b8f0c320de..0000000000000 --- a/Formula/curl.rb +++ /dev/null @@ -1,107 +0,0 @@ -class Curl < Formula - desc "Get a file from an HTTP, HTTPS or FTP server" - homepage "https://curl.haxx.se/" - url "https://curl.haxx.se/download/curl-7.63.0.tar.bz2" - mirror "http://curl.mirror.anstey.ca/curl-7.63.0.tar.bz2" - sha256 "9bab7ed4ecff77020a312d84cc5fb7eb02d58419d218f267477a724a17fd8dd8" - - bottle do - cellar :any - sha256 "9cb9b63ba604679be2bbaa9ad5f2cc864d1f4312ca02c46aa2d7ca3e7728f702" => :mojave - sha256 "1cb7daf7992bebe4fa3a966d4fdb410f606c8899519a30de7a0de53052085fbd" => :high_sierra - sha256 "2f577b9aebe369d2d024f9fbbbb2158fc7d48f6014c39c53af9451a5294cca5a" => :sierra - end - - head do - url "https://github.com/curl/curl.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - keg_only :provided_by_macos - - option "with-rtmpdump", "Build with RTMP support" - option "with-libssh2", "Build with scp and sftp support" - option "with-c-ares", "Build with C-Ares async DNS support" - option "with-gssapi", "Build with GSSAPI/Kerberos authentication support." - option "with-libmetalink", "Build with libmetalink support." - option "with-nghttp2", "Build with HTTP/2 support (requires OpenSSL)" - - deprecated_option "with-rtmp" => "with-rtmpdump" - deprecated_option "with-ssh" => "with-libssh2" - deprecated_option "with-ares" => "with-c-ares" - - # HTTP/2 support requires OpenSSL 1.0.2+ or LibreSSL 2.1.3+ for ALPN Support - # which is currently not supported by Secure Transport (DarwinSSL). - if MacOS.version < :mountain_lion || build.with?("nghttp2") - depends_on "openssl" - else - option "with-openssl", "Build with OpenSSL instead of Secure Transport" - depends_on "openssl" => :optional - end - - depends_on "pkg-config" => :build - depends_on "c-ares" => :optional - depends_on "libmetalink" => :optional - depends_on "libssh2" => :optional - depends_on "nghttp2" => :optional - depends_on "rtmpdump" => :optional - - def install - system "./buildconf" if build.head? - - # Allow to build on Lion, lowering from the upstream setting of 10.8 - ENV.append_to_cflags "-mmacosx-version-min=10.7" if MacOS.version <= :lion - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - ] - - # cURL has a new firm desire to find ssl with PKG_CONFIG_PATH instead of using - # "--with-ssl" any more. "when possible, set the PKG_CONFIG_PATH environment - # variable instead of using this option". Multi-SSL choice breaks w/o using it. - if MacOS.version < :mountain_lion || build.with?("openssl") || build.with?("nghttp2") - ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["openssl"].opt_lib}/pkgconfig" - args << "--with-ssl=#{Formula["openssl"].opt_prefix}" - args << "--with-ca-bundle=#{etc}/openssl/cert.pem" - args << "--with-ca-path=#{etc}/openssl/certs" - else - args << "--with-darwinssl" - args << "--without-ca-bundle" - args << "--without-ca-path" - end - - args << (build.with?("libssh2") ? "--with-libssh2" : "--without-libssh2") - args << (build.with?("libmetalink") ? "--with-libmetalink" : "--without-libmetalink") - args << (build.with?("gssapi") ? "--with-gssapi" : "--without-gssapi") - args << (build.with?("rtmpdump") ? "--with-librtmp" : "--without-librtmp") - - if build.with? "c-ares" - args << "--enable-ares=#{Formula["c-ares"].opt_prefix}" - else - args << "--disable-ares" - end - - system "./configure", *args - system "make", "install" - system "make", "install", "-C", "scripts" - libexec.install "lib/mk-ca-bundle.pl" - end - - test do - # Fetch the curl tarball and see that the checksum matches. - # This requires a network connection, but so does Homebrew in general. - filename = (testpath/"test.tar.gz") - system "#{bin}/curl", "-L", stable.url, "-o", filename - filename.verify_checksum stable.checksum - - system libexec/"mk-ca-bundle.pl", "test.pem" - assert_predicate testpath/"test.pem", :exist? - assert_predicate testpath/"certdata.txt", :exist? - end -end diff --git a/Formula/curlftpfs.rb b/Formula/curlftpfs.rb deleted file mode 100644 index 8b5bb0fd026cc..0000000000000 --- a/Formula/curlftpfs.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Curlftpfs < Formula - desc "Filesystem for accessing FTP hosts based on FUSE and libcurl" - homepage "https://curlftpfs.sourceforge.io/" - url "https://downloads.sourceforge.net/project/curlftpfs/curlftpfs/0.9.2/curlftpfs-0.9.2.tar.gz" - sha256 "4eb44739c7078ba0edde177bdd266c4cfb7c621075f47f64c85a06b12b3c6958" - head ":pserver:anonymous:@curlftpfs.cvs.sourceforge.net:/cvsroot/curlftpfs", :using => :cvs - - bottle do - cellar :any - sha256 "a04c06fd0dfa0af43f5fc8fe267842a4458689ff497530dee8c719b651afe271" => :mojave - sha256 "96a8dfe5202c586e8e338b59cf546c22e4dd481d7ba14e4f0d601ffb438e0ef9" => :high_sierra - sha256 "44f2aecc6d790eff800e1e38b5f28e9fb5cf17b9a1adf6daaf23d42196796e8c" => :sierra - sha256 "21b0fc7553f564b464b4158deaf22beeae6d2791786b6eb9af0f16de854b8009" => :el_capitan - sha256 "4d610ca926b0698aa25633af0fa5ad1e9352de396f16c7f26e9beff682d4020f" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on :osxfuse - depends_on :x11 - - def install - ENV.append "CPPFLAGS", "-D__off_t=off_t" - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/curlish.rb b/Formula/curlish.rb deleted file mode 100644 index 2457e691b3cff..0000000000000 --- a/Formula/curlish.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Curlish < Formula - desc "Curl wrapper that adds support for OAuth 2.0" - homepage "https://pythonhosted.org/curlish/" - url "https://github.com/fireteam/curlish/archive/1.22.tar.gz" - sha256 "6fdd406e6614b03b16be15b7b51568a7a041d2fb631be4e8caa223c0c3a28f00" - head "https://github.com/fireteam/curlish.git" - - bottle do - cellar :any_skip_relocation - sha256 "a767b51cddedc06e3ec75d92cf84b97f0c651e6e27c12b9949f5aaad3b066be4" => :mojave - sha256 "913484a16fdeb402a8f1d0834401f9d9eeaf2d3fd38bfc9c96f4a3978050d9f0" => :high_sierra - sha256 "ce2ef65c8c9f59f11b4edf7906af5504df8573e01ee7d6f6f996fc0647285433" => :sierra - sha256 "5d97c4e9f5c4cd9246bc3be9e785fed094cb522c3110f1ca41408415875b08cc" => :el_capitan - sha256 "6cd32ca680c05b00761eb422a067316d4bb172c171f3e4015da66ed319cec3d2" => :yosemite - sha256 "f5a8b12596157c853a1f9179e4e47e9bc1259ab75e84efe61343e99bec6f62ab" => :mavericks - sha256 "b01c4e78526de36f3b4e0fcac7ec049e2a4dd9366c8d32eae5692a3e626f99a4" => :mountain_lion - end - - depends_on "python@2" # does not support Python 3 - - def install - bin.install "curlish.py" => "curlish" - end - - test do - system "#{bin}/curlish", "https://brew.sh/" - end -end diff --git a/Formula/curlpp.rb b/Formula/curlpp.rb deleted file mode 100644 index 8b245e4507d01..0000000000000 --- a/Formula/curlpp.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Curlpp < Formula - desc "C++ wrapper for libcURL" - homepage "https://www.curlpp.org/" - url "https://github.com/jpbarrette/curlpp/archive/v0.8.1.tar.gz" - sha256 "97e3819bdcffc3e4047b6ac57ca14e04af85380bd93afe314bee9dd5c7f46a0a" - - bottle do - cellar :any - sha256 "4a8dc2ab4cb65ed349477a0cced49ea3e6ee19aa49983313f8221bf2da303bf4" => :mojave - sha256 "0e5f9adbb17bd9e725fbe7ec11ada7a6d73e4a8ffb2448570b6ed16ed9fd2701" => :high_sierra - sha256 "0d721493b94879cdf25162903fd5d10299b5d8386942efb0969c470afeef6b35" => :sierra - sha256 "fd5c8375a1f4ef8aa20cfb740e8bac45c381ce6dbadc90f731e47b00c8a404b3" => :el_capitan - sha256 "fd39edf63c0745f9d39a76f7b428eba285af313967ad4697d4fb08b705ee3eef" => :yosemite - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - - int main() { - try { - curlpp::Cleanup myCleanup; - curlpp::Easy myHandle; - myHandle.setOpt(new curlpp::options::Url("https://google.com")); - myHandle.perform(); - } catch (curlpp::RuntimeError & e) { - std::cout << e.what() << std::endl; - return -1; - } catch (curlpp::LogicError & e) { - std::cout << e.what() << std::endl; - return -1; - } - - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", - "-L#{lib}", "-lcurlpp", "-lcurl" - system "./test" - end -end diff --git a/Formula/curseofwar.rb b/Formula/curseofwar.rb deleted file mode 100644 index 6f91f04a214e8..0000000000000 --- a/Formula/curseofwar.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Curseofwar < Formula - desc "Fast-paced action strategy game" - homepage "https://a-nikolaev.github.io/curseofwar/" - url "https://github.com/a-nikolaev/curseofwar/archive/v1.2.0.tar.gz" - sha256 "91b7781e26341faa6b6999b6baf6e74ef532fa94303ab6a2bf9ff6d614a3f670" - head "https://github.com/a-nikolaev/curseofwar.git" - - bottle do - cellar :any_skip_relocation - sha256 "4ce2eaede3f4636c0ddb7a16d65ae6b750c9e20342715841e5cacefd3d61b0b7" => :mojave - sha256 "b43f143f9fe919e2d88b241865513967054550a852fd62747ed759ac1a53500b" => :high_sierra - sha256 "8a19536dcb6b4a3f508c800980d6300399d1b9d7af1683df7ea7f4dd502cf238" => :sierra - sha256 "014a448d16cef523e97f898c952a74b08b379569f22d951189e90c9ee5056c11" => :el_capitan - sha256 "6b1368e3d4875b19c9817c413037edbeaf49120519032b725207079b86913c8a" => :yosemite - end - - def install - system "make" - bin.install "curseofwar" - man6.install "curseofwar.6" - end - - test do - assert_equal version.to_s, shell_output("#{bin}/curseofwar -v", 1).chomp - end -end diff --git a/Formula/cutter.rb b/Formula/cutter.rb deleted file mode 100644 index 550cd9be5f7ef..0000000000000 --- a/Formula/cutter.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Cutter < Formula - desc "Unit Testing Framework for C and C++" - homepage "https://cutter.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cutter/cutter/1.2.6/cutter-1.2.6.tar.gz" - sha256 "459becce78ec4c568f4f5a5e20c73ea36be283bf955f4a252e8491b634339065" - head "https://github.com/clear-code/cutter.git" - - bottle do - sha256 "467273fc313c512fb5de5a24a060feb86a8f5a87339c0402888512569f09c2c1" => :mojave - sha256 "565dd12a8b27f69e53a556ad02a448bb18648990a481e004920710a439a892c7" => :high_sierra - sha256 "ac8c646277a7b623f23ed44aba41c75d52c22d26ed7e0f01759baf9026a9e323" => :sierra - sha256 "10fdffef5ec4b8983db6547225491720d17cfbcdcbd34b9524facd9f48da04b6" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-glibtest", - "--disable-goffice", - "--disable-gstreamer", - "--disable-libsoup" - system "make" - system "make", "install" - end - - test do - touch "1.txt" - touch "2.txt" - system bin/"cut-diff", "1.txt", "2.txt" - end -end diff --git a/Formula/cvs.rb b/Formula/cvs.rb deleted file mode 100644 index e58955598e07a..0000000000000 --- a/Formula/cvs.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Based on: -# Apple Open Source: https://opensource.apple.com/source/cvs/cvs-45/ -# MacPorts: https://trac.macports.org/browser/trunk/dports/devel/cvs/Portfile -# Creating a useful testcase: https://mrsrl.stanford.edu/~brian/cvstutorial/ - -class Cvs < Formula - desc "Version control system" - homepage "https://www.nongnu.org/cvs/" - url "https://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2" - sha256 "78853613b9a6873a30e1cc2417f738c330e75f887afdaf7b3d0800cb19ca515e" - revision 1 - - bottle do - sha256 "6a2788027cadb1df5de3581f4e6c0a78e30a2b98dd8cbf26fc7ec030d9a8fc18" => :mojave - sha256 "11b8be2fda1de3c8b77b20bdc283ceb12ba511826a0d3b79147dbfaeb83420db" => :high_sierra - sha256 "01f9517d330037a248bc6d36c8127a4f99eb364a8a0d1cc5f8520cca261b7163" => :sierra - sha256 "32dcf27cf028e270e826ba9850bde2f403f77c2c16a4b534d59cf68c0446e1fb" => :el_capitan - end - - patch :p0 do - url "https://opensource.apple.com/tarballs/cvs/cvs-45.tar.gz" - sha256 "4d200dcf0c9d5044d85d850948c88a07de83aeded5e14fa1df332737d72dc9ce" - apply "patches/PR5178707.diff", - "patches/ea.diff", - "patches/endian.diff", - "patches/fixtest-client-20.diff", - "patches/fixtest-recase.diff", - "patches/i18n.diff", - "patches/initgroups.diff", - "patches/nopic.diff", - "patches/remove-libcrypto.diff", - "patches/remove-info.diff", - "patches/tag.diff", - "patches/zlib.diff" - end - - # Fixes error: 'Illegal instruction: 4'; '%n used in a non-immutable format string' on 10.13 - # Patches the upstream-provided gnulib on all platforms as is recommended - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/24118ec737c7/cvs/vasnprintf-high-sierra-fix.diff" - sha256 "affa485332f66bb182963680f90552937bf1455b855388f7c06ef6a3a25286e2" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--infodir=#{info}", - "--mandir=#{man}", - "--sysconfdir=#{etc}", - "--with-gssapi", - "--enable-pam", - "--enable-encryption", - "--with-external-zlib", - "--enable-case-sensitivity", - "--with-editor=vim", - "ac_cv_func_working_mktime=no" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - cvsroot = testpath/"cvsroot" - cvsroot.mkpath - system "#{bin}/cvs", "-d", cvsroot, "init" - - mkdir "cvsexample" do - ENV["CVSROOT"] = cvsroot - system "#{bin}/cvs", "import", "-m", "dir structure", "cvsexample", "homebrew", "start" - end - end -end diff --git a/Formula/cvs2svn.rb b/Formula/cvs2svn.rb deleted file mode 100644 index 3e6109e131aeb..0000000000000 --- a/Formula/cvs2svn.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Cvs2svn < Formula - desc "Tool for converting from CVS to Subversion" - homepage "http://cvs2svn.tigris.org/" - url "http://cvs2svn.tigris.org/files/documents/1462/49543/cvs2svn-2.5.0.tar.gz" - sha256 "6409d118730722f439760d41c08a5bfd05e5d3ff4a666050741e4a5dc2076aea" - - bottle do - cellar :any_skip_relocation - sha256 "e0d7b7b145ca61199a8d3df0c8573e8b6b189cc5a347271ccd02569842e530c8" => :mojave - sha256 "ff57f2529923038acef70f6e307d42500986ccdbdcd2e182b2bdae140e02c23f" => :high_sierra - sha256 "979b006250f9c1ecb03b6b7695e15bf7a7981738a584aec6ddcea3af680770fb" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - def install - system "python", "setup.py", "install", "--prefix=#{prefix}" - system "make", "man" - man1.install gzip("cvs2svn.1", "cvs2git.1", "cvs2bzr.1") - prefix.install %w[ BUGS COMMITTERS HACKING - cvs2bzr-example.options - cvs2git-example.options - cvs2hg-example.options - cvs2svn-example.options contrib ] - doc.install Dir["{doc,www}/*"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/cvs2svn --version") - end -end diff --git a/Formula/cvsps.rb b/Formula/cvsps.rb deleted file mode 100644 index 4b19732333094..0000000000000 --- a/Formula/cvsps.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Cvsps < Formula - desc "Create patchset information from CVS" - homepage "http://www.catb.org/~esr/cvsps/" - url "http://www.catb.org/~esr/cvsps/cvsps-3.13.tar.gz" - sha256 "5f078a6e02c394f663893751f128caf643fe00a30b559e87db6f45190c623799" - - bottle do - cellar :any_skip_relocation - sha256 "661a264420cedda6c6940ef81e88e91ca8d433c4c48cb79a5bb3f3d60c541974" => :mojave - sha256 "964d2f695e15f6377f18482820f69f1efcaf305e9ea45b4bd3b6da1ad55238b8" => :high_sierra - sha256 "fafd244bbd5ea71ef8940ec6d1d4319b6d2036c68dbafd923ed3aa1126e92c0a" => :sierra - sha256 "166312c7b7c2aacd431120ddee3f8ca798809ee955c626cd545688c8fec5e460" => :el_capitan - sha256 "fb968620dcdb28706f395b439fa5b2de09a5de2fec23fbb20a929234872d3978" => :yosemite - sha256 "72af55d9573f7de107155e0a5e2160a2ef45d729e3970be27e60ecacc4baebbf" => :mavericks - end - - depends_on "asciidoc" - depends_on "docbook" - - def install - # otherwise asciidoc will fail to find docbook - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - system "make", "all", "cvsps.1" - system "make", "install", "prefix=#{prefix}" - end -end diff --git a/Formula/cvsutils.rb b/Formula/cvsutils.rb deleted file mode 100644 index 3b74121004b32..0000000000000 --- a/Formula/cvsutils.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Cvsutils < Formula - desc "CVS utilities for use in working directories" - homepage "https://www.red-bean.com/cvsutils/" - url "https://www.red-bean.com/cvsutils/releases/cvsutils-0.2.6.tar.gz" - sha256 "174bb632c4ed812a57225a73ecab5293fcbab0368c454d113bf3c039722695bb" - - bottle do - cellar :any_skip_relocation - sha256 "e497ac1ba036fec1ccd8d34b2ec6262f9721ab805d0636f073c5406ef4fbd922" => :mojave - sha256 "102456ac28b63271b03a5722e8421d6273005c54203f4f818678be065479463b" => :high_sierra - sha256 "d1f2e13e0df6dbb767a04f7e206114c119f9e6435f227e07e14b4d200e6aba8f" => :sierra - sha256 "f8e35c8b0ed2db868e7dd12f653c20d7d2709059fb5a773fd49084a2655f4ca0" => :el_capitan - sha256 "ccefce4b4a1053e9a32e4f43318c7bf73c7154f0bee1be1cf1777e8fd3e8eabf" => :yosemite - sha256 "ab6140058099bdc798e0e294640504035d5c976a8752742044a161c416e2e31e" => :mavericks - sha256 "b30e0da765a551698ec56c09750842bf93e1db4c6596d2a741670aa5ce616c3a" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/cvsu", "--help" - end -end diff --git a/Formula/cvsync.rb b/Formula/cvsync.rb deleted file mode 100644 index 646f92dc44208..0000000000000 --- a/Formula/cvsync.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Cvsync < Formula - desc "Portable CVS repository synchronization utility" - homepage "https://www.cvsync.org/" - url "https://www.cvsync.org/dist/cvsync-0.24.19.tar.gz" - sha256 "75d99fc387612cb47141de4d59cb3ba1d2965157230f10015fbaa3a1c3b27560" - - bottle do - rebuild 1 - sha256 "d013612af119b2f7361bc76264fb3f803798bc95570b935f7b661ed22f272599" => :mojave - sha256 "77f37d3a029bced4283a805186c371c11525cf678d760cbe0095a248afe6c6a8" => :high_sierra - sha256 "fcea1a0cb513de493fdf74adca3ca2a6d07ca78638521412d8bc9dbed0c0b5c4" => :sierra - sha256 "f76f09e679c8bfe1454cc0602fe38c119ec94af456716ead97add4244f2eb2b0" => :el_capitan - end - - depends_on "openssl" - - def install - ENV["PREFIX"] = prefix - ENV["MANDIR"] = man - ENV["CVSYNC_DEFAULT_CONFIG"] = etc/"cvsync.conf" - ENV["CVSYNCD_DEFAULT_CONFIG"] = etc/"cvsyncd.conf" - ENV["HASH_TYPE"] = "openssl" - - # Makefile from 2005 assumes Darwin doesn't define `socklen_t' and defines - # it with a CC macro parameter making gcc unhappy about double define. - inreplace "mk/network.mk", - /^CFLAGS \+= \-Dsocklen_t=int/, "" - - # Remove owner and group parameters from install. - inreplace "mk/base.mk", - /^INSTALL_(.{3})_OPTS\?=.*/, 'INSTALL_\1_OPTS?= -c -m ${\1MODE}' - - # These paths must exist or "make install" fails. - bin.mkpath - lib.mkpath - man1.mkpath - - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/cvsync -h 2>&1", 1) - end -end diff --git a/Formula/cweb.rb b/Formula/cweb.rb deleted file mode 100644 index 24937599f9bdf..0000000000000 --- a/Formula/cweb.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Cweb < Formula - desc "Literate documentation system for C, C++, and Java" - homepage "https://cs.stanford.edu/~knuth/cweb.html" - url "https://cs.stanford.edu/pub/cweb/cweb-3.64b.tar.gz" - mirror "https://www.ctan.org/tex-archive/web/c_cpp/cweb/cweb-3.64b.tar.gz" - sha256 "038b0bf4d8297f0a98051ca2b4664abbf9d72b0b67963a2c7700d2f11cd25595" - - bottle do - sha256 "77291255506b068cd1856498a048708baf94d29a60267fe5ab221e46cd1a383f" => :mojave - sha256 "e6888449565ebd6620ebc6851dbef48765a0654b3e5d429cfffb617ca33e2479" => :high_sierra - sha256 "377a987173b8274ab97de6d8978816372d6f380a0fe4c9e0b09cfcd7d27ab66e" => :sierra - sha256 "86ff3ceca459e8f087644249378a19a7f53f4ebbd5c74ddfbbe6ea795003a1a2" => :el_capitan - sha256 "27c017af8f2e004888240d99a14b29ea9ac8d1fa5339d228b6a79ecda8031e4e" => :yosemite - end - - def install - ENV.deparallelize - - macrosdir = share/"texmf/tex/generic" - cwebinputs = lib/"cweb" - - # make install doesn't use `mkdir -p` so this is needed - [bin, man1, macrosdir, elisp, cwebinputs].each(&:mkpath) - - system "make", "install", - "DESTDIR=#{bin}/", - "MANDIR=#{man1}", - "MANEXT=1", - "MACROSDIR=#{macrosdir}", - "EMACSDIR=#{elisp}", - "CWEBINPUTS=#{cwebinputs}" - end - - test do - (testpath/"test.w").write <<~EOS - @* Hello World - This is a minimal program written in CWEB. - - @c - #include - void main() { - printf("Hello world!"); - } - EOS - system bin/"ctangle", "test.w" - system ENV.cc, "test.c", "-o", "hello" - assert_equal "Hello world!", pipe_output("./hello") - end -end diff --git a/Formula/cwlogs.rb b/Formula/cwlogs.rb deleted file mode 100644 index d81ad49a7b5a2..0000000000000 --- a/Formula/cwlogs.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Cwlogs < Formula - desc "CLI tool for reading logs from Cloudwatch Logs" - homepage "https://github.com/segmentio/cwlogs" - url "https://github.com/segmentio/cwlogs/archive/v1.2.0.tar.gz" - sha256 "3f7b56b49c42c1de0e697fc391abad07b03434cff36b153249dd2af3107e064e" - - bottle do - cellar :any_skip_relocation - sha256 "094c93934776870df7b417ea5099a604fd8312e1bfa67f27628fa73f2c5dc388" => :mojave - sha256 "1c07bb31b455ea7e28f55854424b9fbcba9f9ab9e352f759377d7152b1b3c367" => :high_sierra - sha256 "b3528646611cd4f462bafe83c25c84f551e191629a93a84b11c872f9e86b720f" => :sierra - sha256 "6384495666e5235c5969ccd1688092fe335a5147b31156e1cb658a41594ae594" => :el_capitan - end - - depends_on "go" => :build - depends_on "govendor" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - ENV["CGO_ENABLED"] = "0" - - path = buildpath/"src/github.com/segmentio/cwlogs" - path.install Dir["{*,.git}"] - - cd "src/github.com/segmentio/cwlogs" do - system "govendor", "sync" - system "go", "build", "-o", bin/"cwlogs", - "-ldflags", "-X main.Version=#{version}" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/cwlogs help") - assert_match "cloudwatch logs", output - end -end diff --git a/Formula/cxxtest.rb b/Formula/cxxtest.rb deleted file mode 100644 index 39e632a3690e7..0000000000000 --- a/Formula/cxxtest.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Cxxtest < Formula - desc "xUnit-style unit testing framework for C++" - homepage "https://cxxtest.com/" - url "https://github.com/CxxTest/cxxtest/releases/download/4.4/cxxtest-4.4.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/c/cxxtest/cxxtest_4.4.orig.tar.gz" - sha256 "1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0c97b74f6bc2cee5e0683fcec6bd07da544b5f3e9cd25b9631b6291b86490392" => :mojave - sha256 "4ef0fbb78839714da6108883475dce9536df2e59dd9dc7bf42677a86d00f4356" => :high_sierra - sha256 "4ef0fbb78839714da6108883475dce9536df2e59dd9dc7bf42677a86d00f4356" => :sierra - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", lib/"python#{xy}/site-packages" - - cd "./python" do - system "python3", *Language::Python.setup_install_args(prefix) - end - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - - include.install "cxxtest" - doc.install Dir["doc/*"] - end - - test do - testfile = testpath/"MyTestSuite1.h" - testfile.write <<~EOS - #include - - class MyTestSuite1 : public CxxTest::TestSuite { - public: - void testAddition(void) { - TS_ASSERT(1 + 1 > 1); - TS_ASSERT_EQUALS(1 + 1, 2); - } - }; - EOS - - system bin/"cxxtestgen", "--error-printer", "-o", testpath/"runner.cpp", testfile - system ENV.cxx, "-o", testpath/"runner", testpath/"runner.cpp" - system testpath/"runner" - end -end diff --git a/Formula/cython.rb b/Formula/cython.rb deleted file mode 100644 index 658a1c4442333..0000000000000 --- a/Formula/cython.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Cython < Formula - desc "Compiler for writing C extensions for the Python language" - homepage "https://cython.org/" - url "https://files.pythonhosted.org/packages/c1/f2/d1207fd0dfe5cb4dbb06a035eb127653821510d896ce952b5c66ca3dafa4/Cython-0.29.2.tar.gz" - sha256 "2ac187ff998a95abb7fae452b5178f91e1a713698c9ced89836c94e6b1d3f41e" - - bottle do - cellar :any_skip_relocation - sha256 "2ccd16ca82d623d7efff95ddf2c37ef66ec2f0535acc54d8a9d3cba394fead52" => :mojave - sha256 "2e1cbec07446df0a447b197955e4ec58172e75bece4736e5f1e1383347db5a79" => :high_sierra - sha256 "2504bb8f8fdd713352fea8acc3d606e7a66147a81ecb1e280953841df3a5993e" => :sierra - end - - keg_only <<~EOS - this formula is mainly used internally by other formulae. - Users are advised to use `pip` to install cython - EOS - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - xy = Language::Python.major_minor_version "python3" - ENV.prepend_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - phrase = "You are using Homebrew" - (testpath/"package_manager.pyx").write "print '#{phrase}'" - (testpath/"setup.py").write <<~EOS - from distutils.core import setup - from Cython.Build import cythonize - - setup( - ext_modules = cythonize("package_manager.pyx") - ) - EOS - system "python3", "setup.py", "build_ext", "--inplace" - assert_match phrase, shell_output("python3 -c 'import package_manager'") - end -end diff --git a/Formula/czmq.rb b/Formula/czmq.rb deleted file mode 100644 index 90b73aa009db2..0000000000000 --- a/Formula/czmq.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Czmq < Formula - desc "High-level C binding for ZeroMQ" - homepage "http://czmq.zeromq.org/" - url "https://github.com/zeromq/czmq/releases/download/v4.1.1/czmq-4.1.1.tar.gz" - sha256 "f00ff419881dc2a05d0686c8467cd89b4882677fc56f31c0e2cc81c134cbb0c0" - - bottle do - cellar :any - sha256 "38d2b6120f6d06c9a45c895f52949a2ddd01f72d7e91d3ff83cd39c954492300" => :mojave - sha256 "1e414d17fd6c0a4dd9939e84091b5073c23d2477569d12b0ee08d6a425abea14" => :high_sierra - sha256 "c0b2b82ae2edfa4dc97f48789ed87050dc0fb602e85a2b510fee6336afe17a5c" => :sierra - sha256 "d6966061fd61f2440713473c4f65bb9fd541be2f3be78e1d3f56ca54d366202e" => :el_capitan - end - - head do - url "https://github.com/zeromq/czmq.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - option "with-drafts", "Build and install draft classes and methods" - - depends_on "asciidoc" => :build - depends_on "pkg-config" => :build - depends_on "xmlto" => :build - depends_on "zeromq" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] - args << "--enable-drafts" if build.with? "drafts" - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - system "make", "ZSYS_INTERFACE=lo0", "check-verbose" - system "make", "install" - rm Dir["#{bin}/*.gsl"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(void) - { - zsock_t *push = zsock_new_push("inproc://hello-world"); - zsock_t *pull = zsock_new_pull("inproc://hello-world"); - - zstr_send(push, "Hello, World!"); - char *string = zstr_recv(pull); - puts(string); - zstr_free(&string); - - zsock_destroy(&pull); - zsock_destroy(&push); - - return 0; - } - EOS - - flags = ENV.cflags.to_s.split + %W[ - -I#{include} - -L#{lib} - -lczmq - ] - system ENV.cc, "-o", "test", "test.c", *flags - assert_equal "Hello, World!\n", shell_output("./test") - end -end diff --git a/Formula/d/d2.rb b/Formula/d/d2.rb new file mode 100644 index 0000000000000..6c986d7575049 --- /dev/null +++ b/Formula/d/d2.rb @@ -0,0 +1,42 @@ +class D2 < Formula + desc "Modern diagram scripting language that turns text to diagrams" + homepage "https://d2lang.com/" + url "https://github.com/terrastruct/d2/archive/refs/tags/v0.7.1.tar.gz" + sha256 "b784d6472d53fdaaa7ecc9bdbe23456e2b4a90e18736828028b3f951537e56a1" + license "MPL-2.0" + head "https://github.com/terrastruct/d2.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "61a38ce31638ad307378e0031fce216fbf8e5082132ac4866ab5ca81e7337010" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a82ceeada44a2e61646f59f749286ee4347ca364fe568007235089844fe473f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a82ceeada44a2e61646f59f749286ee4347ca364fe568007235089844fe473f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2a82ceeada44a2e61646f59f749286ee4347ca364fe568007235089844fe473f" + sha256 cellar: :any_skip_relocation, sonoma: "cfca943125fe7319b8bd9a09256b9e62a6185d378b2394c307273a488567616e" + sha256 cellar: :any_skip_relocation, ventura: "cfca943125fe7319b8bd9a09256b9e62a6185d378b2394c307273a488567616e" + sha256 cellar: :any_skip_relocation, arm64_linux: "06d2bb3e6e93b2734ef66111772aefb0120938dabfb2697dad37e119e09f0157" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74e100511019db1329966018c384c0be60853e9e2bb5de50e8d4b092da92552a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X oss.terrastruct.com/d2/lib/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + man1.install "ci/release/template/man/d2.1" + end + + test do + test_file = testpath/"test.d2" + test_file.write <<~EOS + homebrew-core -> brew: depends + EOS + + system bin/"d2", "test.d2" + assert_path_exists testpath/"test.svg" + + assert_match "dagre is a directed graph layout library for JavaScript", + shell_output("#{bin}/d2 layout dagre") + + assert_match version.to_s, shell_output("#{bin}/d2 version") + end +end diff --git a/Formula/d/daemon.rb b/Formula/d/daemon.rb new file mode 100644 index 0000000000000..41244fd892126 --- /dev/null +++ b/Formula/d/daemon.rb @@ -0,0 +1,37 @@ +class Daemon < Formula + desc "Turn other processes into daemons" + homepage "https://libslack.org/daemon/" + url "https://libslack.org/daemon/download/daemon-0.8.4.tar.gz" + sha256 "fa28859ad341cb0a0b012c11c271814f870482013b49f710600321d379887cd1" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?daemon[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9accc09cd67f7ea55479b1d0aec44f2fc6a2d88df38e3d93e51900b970ae8f29" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f167ab77722eb90a0346e5ecaaef90b7e4c25dc74ad5ce5797d3417cc4d672e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3632a8d5eb5d95e5b9df3741e91a1de29f493fc755f9fd6b4e64a10edcea5ddf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "101e6130d15ab59ff302b56ac933ec41f4daf94820e0177acd7b500c6afabc29" + sha256 cellar: :any_skip_relocation, arm64_monterey: "91563d72f29b423fb13d3b486e8e6bc0b8e1bf8d8d1a682df7b4ae14da077855" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "76f97fb46b1d1568f0cdf54c251c187c9cb5e0205e9951fae178d09e13ac5aef" + sha256 cellar: :any_skip_relocation, sonoma: "2d183e8493116bd6a715e34ae2db121fe7b6c04b2f6b255daf6c171ddda1510a" + sha256 cellar: :any_skip_relocation, ventura: "fbe58edeb92d71e3ba4e5e7f3f6e9bfd5cb9710357bbd6098c92065f38d27b62" + sha256 cellar: :any_skip_relocation, monterey: "708784508effbf7aa7c2d5680fd52c7c1ae572ffdbd08d672d8ec7eab33534f9" + sha256 cellar: :any_skip_relocation, big_sur: "ab2a22bdc41a9a0a551bf77c6ea2ad5f3a75b6ad75def292d6ebd4f59979ce93" + sha256 cellar: :any_skip_relocation, arm64_linux: "87c4ae0cde212781fe52c0ac599a2b867063595596d7b3260497969b9d610f6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "861a0eb58cced7a2c88edb3309eef07521084b317725b9fe4f67acf71b83f331" + end + + def install + system "./configure" + system "make" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"daemon", "--version" + end +end diff --git a/Formula/d/daemonize.rb b/Formula/d/daemonize.rb new file mode 100644 index 0000000000000..4897abab6bf8d --- /dev/null +++ b/Formula/d/daemonize.rb @@ -0,0 +1,48 @@ +class Daemonize < Formula + desc "Run a command as a UNIX daemon" + homepage "https://software.clapper.org/daemonize/" + url "https://github.com/bmc/daemonize/archive/refs/tags/release-1.7.8.tar.gz" + sha256 "20c4fc9925371d1ddf1b57947f8fb93e2036eb9ccc3b43a1e3678ea8471c4c60" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "44f7c8ffc66e91dd8390c9918dfac5d913fb1ff3099a5e29965b49e6c4560c21" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac1001a5e4588bc098b708492cf6c90fe91b88ae7c28be94038fa25d1d15aaea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "36f15dfa0b033d4e984a19e769caae8a42a3e4facf10d87f54f68ec275ae10ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd11e888912a0afdfac36c26b95f4d27b7aafaa2ce3ac41c14388683f9027df0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2b4a5d09904220ebd65f8fb46dc9ff521fe01fd024a80d1fbcf587ff5324e21f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "49b53c082bc201f7dcfe760c727b7f748ce6306fcdbf656d1609384dc75e52fc" + sha256 cellar: :any_skip_relocation, sonoma: "150530a6f011ca60ce9ed72707c51d2a31c2260e7b4540afbed8c35bc718c765" + sha256 cellar: :any_skip_relocation, ventura: "d271ade4fea6639e817bb38815fde49a53e006a5b51a60f4d0b54fb08e07337d" + sha256 cellar: :any_skip_relocation, monterey: "4c32da9480f4d9f48e28390f9201c7667dfabbb874f5acd4e7af28b04de2e748" + sha256 cellar: :any_skip_relocation, big_sur: "a9dc01cd71295518a9477676bee344b3f3f25d5725777635c0c708d8dc7fdde0" + sha256 cellar: :any_skip_relocation, catalina: "a5c898ee425aecfb5c3d41e75da436ebbd44ad2fa343fa85b60573bd4fd8c7a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f2837cbc66d881b57213af108138f2b18bc05a5ade76c9ae7ce5dc4ca515781" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccae89928e0e598a4b36e6077c509bb4a36020519b4aa49aa3bd58b42de2a3ce" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + dummy_script_file = testpath/"script.sh" + output_file = testpath/"outputfile.txt" + pid_file = testpath/"pidfile.txt" + dummy_script_file.write <<~SH + #!/bin/sh + echo "#{version}" >> "#{output_file}" + SH + chmod 0700, dummy_script_file + system "#{sbin}/daemonize", "-p", pid_file, dummy_script_file + assert_path_exists pid_file, "The file containing the PID of the child process was not created." + sleep(4) # sleep while waiting for the dummy script to finish + assert_path_exists output_file, "The file which should have been created by the child process doesn't exist." + assert_match version.to_s, output_file.read + end +end diff --git a/Formula/d/daemonlogger.rb b/Formula/d/daemonlogger.rb new file mode 100644 index 0000000000000..409a8aaebec9f --- /dev/null +++ b/Formula/d/daemonlogger.rb @@ -0,0 +1,43 @@ +class Daemonlogger < Formula + desc "Network packet logger and soft tap daemon" + homepage "https://sourceforge.net/projects/daemonlogger/" + url "https://downloads.sourceforge.net/project/daemonlogger/daemonlogger-1.2.1.tar.gz" + sha256 "79fcd34d815e9c671ffa1ea3c7d7d50f895bb7a79b4448c4fd1c37857cf44a0b" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0ced73ca63e8d048dbc4692cbadf68f13d834fb8e5bf642be31d4573d58d17bb" + sha256 cellar: :any, arm64_sequoia: "0be691de00ba4892bb91171da20c25ed0d3bda987d6d7345b35e095d06b8b848" + sha256 cellar: :any, arm64_sonoma: "d6fae15e4986a7f8046ff53a00d64927c225c75a03741c491b2a8bbd9c87f8f2" + sha256 cellar: :any, arm64_ventura: "beee453bd9b0404bd4a145fb466eaf3ed8212d24570bc4eb0fa5480cda06c4c9" + sha256 cellar: :any, arm64_monterey: "5df034d135e6be79eee9c27f0b53cc1b9531b8d027c40f6e7c9b76561a0476d6" + sha256 cellar: :any, arm64_big_sur: "cebaf67384c1d536a827bd4da514b70f2342315cfc013fa3e0e9fd0c658c22a4" + sha256 cellar: :any, sonoma: "7a5a4ce158ed37a04fb7fb7bd1fae312eb4e212eb795f78a63826b8ff40e38e7" + sha256 cellar: :any, ventura: "f85bf445ce68b5ab5914671739bebfe81ed91f7ee0bed9d4e92667e42edf6c5e" + sha256 cellar: :any, monterey: "1c2f08e5d06fd71339d5f2c3f730b2e15ef60ceee56c23efa98026f65ec94954" + sha256 cellar: :any, big_sur: "37a025cbb7898243913ad07bb094b2195e27587b5458d465fea790d30f13af67" + sha256 cellar: :any, catalina: "8f2af84c9d476a7bd11e30185794bf107a92ae32f92b84f38f5a629f368ad6c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f113a27d6f67fb9de34fd6b13d6736aa466df7d0d6d9eb91c21446937500b596" + sha256 cellar: :any_skip_relocation, x86_64_linux: "462b6ecbf94169210be2591de29de97b69a701cc810485fb956bf7892e1b57fa" + end + + depends_on "libdnet" + + uses_from_macos "libpcap" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"daemonlogger", "-h" + end +end diff --git a/Formula/d/daemontools.rb b/Formula/d/daemontools.rb new file mode 100644 index 0000000000000..4dd70486e6a01 --- /dev/null +++ b/Formula/d/daemontools.rb @@ -0,0 +1,92 @@ +class Daemontools < Formula + desc "Collection of tools for managing UNIX services" + homepage "https://cr.yp.to/daemontools.html" + url "https://cr.yp.to/daemontools/daemontools-0.76.tar.gz" + sha256 "a55535012b2be7a52dcd9eccabb9a198b13be50d0384143bd3b32b8710df4c1f" + license :public_domain + revision 2 + + livecheck do + url "https://cr.yp.to/daemontools/install.html" + regex(/href=.*?daemontools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4d2dc1ed742ae4b8ab911aef610c8315ea79b9dce79a4a9d21028f413352bd6c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1caba2a88c37b416bf48c950f376693b1412a06f54bc62c815a6e8679f30b41d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4079bdac80d383b3423b5daf190a2abc5583db2d5e33939ccd0e3c637ab57033" + sha256 cellar: :any_skip_relocation, arm64_ventura: "414c519a3f46d28c74e28d95f882b68dae09dcd9604b8f207c93539d4af34cd3" + sha256 cellar: :any_skip_relocation, sonoma: "b2fbc29b09bf37004b7a31ff2a7f57bd705e757cef0b1970b2b9723f624bc8d9" + sha256 cellar: :any_skip_relocation, ventura: "813c64aa076209409ab420484007a7d43e7bfa86ce26842829d8800501e9b138" + sha256 cellar: :any_skip_relocation, arm64_linux: "78eeabb0f8b6f6d678f97dfcf0a84e51c1b0f667e5fba8c6a1ef4707f85a91ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f527c08fac6754686403613d81fe344434ead8477130d596ffa05862b4962fe" + end + + resource "man" do + url "https://deb.debian.org/debian/pool/main/d/daemontools/daemontools_0.76-8.1.debian.tar.xz" + sha256 "b9a1ed0ea88172d921738237c48e67cbe3b04e5256fea8ec00f32116c9ef74c0" + end + + # Fix build failure due to missing #include on Linux. + # Patch submitted to author by email. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/daemontools/errno.patch" + sha256 "b7beb4cfe150b5cad1f50f4879d91cd8fc72e581940da4a716b99467d3a14937" + end + + # Fix build failure due to missing headers for POSIX-related functions. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/daemontools/posix-headers.patch" + sha256 "288afdf9b7ba4f05a791f714ddea22b0a18020f54face020e45311135f0c92c1" + end + + def install + cd "daemontools-#{version}" do + inreplace ["package/run", "src/svscanboot.sh"] do |s| + s.gsub! "/service", "#{etc}/service" + s.gsub! "/command", bin.to_s + end + + # Work around build error from root requirement: "Oops. Your getgroups() returned 0, + # and setgroups() failed; this means that I can't reliably do my shsgr test. Please + # either ``make'' as root or ``make'' while you're in one or more supplementary groups." + inreplace "src/Makefile", "( cat warn-shsgr; exit 1 )", "cat warn-shsgr" if OS.linux? + + system "package/compile" + bin.install Dir["command/*"] + end + + resource("man").stage do + man8.install Dir["daemontools-man/*.8"] + end + end + + def post_install + (etc/"service").mkpath + + Pathname.glob("/service/*") do |original| + target = "#{etc}/service/#{original.basename}" + ln_s original, target unless File.exist?(target) + end + end + + def caveats + <<~EOS + Services are stored in: + #{etc}/service/ + EOS + end + + service do + run opt_bin/"svscanboot" + keep_alive true + require_root true + end + + test do + assert_match "Homebrew", shell_output("#{bin}/softlimit -t 1 echo 'Homebrew'") + end +end diff --git a/Formula/d/dafny.rb b/Formula/d/dafny.rb new file mode 100644 index 0000000000000..a07b586af52c9 --- /dev/null +++ b/Formula/d/dafny.rb @@ -0,0 +1,56 @@ +class Dafny < Formula + desc "Verification-aware programming language" + homepage "https://github.com/dafny-lang/dafny/blob/master/README.md" + url "https://github.com/dafny-lang/dafny/archive/refs/tags/v4.11.0.tar.gz" + sha256 "05417a2250cea13494318a60d86bd0dc6d9622bd625d9f4fbeb42854462e6798" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e05c17dd373fc4990bfdbb912d8fa47eb1981a5fd34ec150283f53eddaa0c9e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "296346300fcb84014e88bcd5e6a43a3f59c1f5b90f6c4f9c9ff5e6664459f104" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "399f9dc444e83573e736e553df66faeb0c492abe5efc5d547c64b6f5732825e4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "212a957c6cff6a2b3709544c5ed25d75231aa25cd7c46f0dd2b4b7407add8b8f" + sha256 cellar: :any_skip_relocation, ventura: "531c8d8608f45143c240ebcdb7c7bc92a47cf23d20b972f9d0d435318198a569" + sha256 cellar: :any_skip_relocation, arm64_linux: "61c5799971f66478103d85b42562172496531a3aa2e8e8566befc75079bb7154" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af77022b146755d7d3504323a153d62fd2d234fd23b831884555d1d6a037e16f" + end + + # Upstream uses v8 and v9 is not yet compatible + depends_on "gradle@8" => :build + depends_on "openjdk" => [:build, :test] + + depends_on "dotnet@8" + depends_on "z3" + + def install + # Use our `gradle` to build rather than wrapper which uses its own copy + rm("Source/DafnyRuntime/DafnyRuntimeJava/gradlew") + inreplace "Source/DafnyRuntime/DafnyRuntime.csproj", 'Command="./gradlew ', 'Command="gradle ' + + system "make", "exe" + libexec.install Dir["Binaries/*", "Scripts/quicktest.sh"] + + (bin/"dafny").write <<~EOS + #!/bin/bash + exec "#{Formula["dotnet@8"].opt_bin}/dotnet" "#{libexec}/Dafny.dll" "$@" + EOS + end + + test do + (testpath/"test.dfy").write <<~EOS + method Main() { + var i: nat :| true; + assert i as int >= -1; + print "hello, Dafny\\n"; + } + EOS + assert_equal "\nDafny program verifier finished with 1 verified, 0 errors\n", + shell_output("#{bin}/dafny verify #{testpath}/test.dfy") + assert_equal "\nDafny program verifier finished with 1 verified, 0 errors\nhello, Dafny\n", + shell_output("#{bin}/dafny run #{testpath}/test.dfy") + + ENV["JAVA_HOME"] = Language::Java.java_home + assert_match(/^\nDafny program verifier finished with 1 verified, 0 errors\n(.*\n)*hello, Dafny\n$/, + shell_output("#{bin}/dafny run --target:java #{testpath}/test.dfy")) + end +end diff --git a/Formula/d/dagger.rb b/Formula/d/dagger.rb new file mode 100644 index 0000000000000..df2f27d77c665 --- /dev/null +++ b/Formula/d/dagger.rb @@ -0,0 +1,46 @@ +class Dagger < Formula + desc "Portable devkit for CI/CD pipelines" + homepage "https://dagger.io" + url "https://github.com/dagger/dagger/archive/refs/tags/v0.19.4.tar.gz" + sha256 "5d3a2c8dea67eb5b928513a34b58f782c51efbd72373396f15ef78555015171b" + license "Apache-2.0" + head "https://github.com/dagger/dagger.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26244d55e8152ef8af0605c6d0ee6e1c2b0067ad323fd4b34133cdea1e11d437" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "26244d55e8152ef8af0605c6d0ee6e1c2b0067ad323fd4b34133cdea1e11d437" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26244d55e8152ef8af0605c6d0ee6e1c2b0067ad323fd4b34133cdea1e11d437" + sha256 cellar: :any_skip_relocation, sonoma: "3b17043e9a12700a6c892e8781827bc586ec377dfddece6f014bcb9484861b78" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4a94f7f2178a276d5007ceefb97bcd0c645424a57e1f296dca9fc7b1174fb95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cc3e08f0797185eae853c60d07e699ec8a4e47b3889886c75e7599325140338" + end + + depends_on "go" => :build + depends_on "docker" => :test + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[ + -s -w + -X github.com/dagger/dagger/engine.Version=v#{version} + -X github.com/dagger/dagger/engine.Tag=v#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/dagger" + + generate_completions_from_executable(bin/"dagger", "completion") + end + + test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + + assert_match "dagger v#{version}", shell_output("#{bin}/dagger version") + + output = shell_output("#{bin}/dagger query brewtest 2>&1", 1) + assert_match "Cannot connect to the Docker daemon", output + end +end diff --git a/Formula/d/dagu.rb b/Formula/d/dagu.rb new file mode 100644 index 0000000000000..0a359430bb7f8 --- /dev/null +++ b/Formula/d/dagu.rb @@ -0,0 +1,55 @@ +class Dagu < Formula + desc "Lightweight and powerful workflow engine" + homepage "https://dagu.cloud" + url "https://github.com/dagu-org/dagu/archive/refs/tags/v1.24.0.tar.gz" + sha256 "9e9ce84361026ff6049a40b2ade9ad88d2497887955087b6640c96f6b7adfe14" + license "GPL-3.0-only" + head "https://github.com/dagu-org/dagu.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aff164be29dd6c9b1e0c26ba7c28e31c83c4400c9fc6e1c9651d67315e0a6887" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7daefac41d99a2dcb4fa277e065b273b5ed975a9b2defc9fdbd7fb2e98316805" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "57607e24b8665a71f4f5057d32e46ea9c8e801dbcc1d213223bc44768bd57263" + sha256 cellar: :any_skip_relocation, sonoma: "04c56540e325ab4ea06a8d48312f1ea2a29f964b56ffa9b2bed0a351d8c84fd3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8780e86ca2c6b46e5a8fc0ba576eddaefee3a19f0afe607a50a10cb72480fb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f439b0702e5869d91096392a9053b9863cf8237f7bc4664561f24aa5646bbf41" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "pnpm" => :build + + def install + system "pnpm", "--dir=ui", "install", "--frozen-lockfile" + system "pnpm", "--dir=ui", "run", "build" + (buildpath/"internal/frontend/assets").install (buildpath/"ui/dist").children + + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd" + end + + service do + run [opt_bin/"dagu", "start-all"] + keep_alive true + error_log_path var/"log/dagu.log" + log_path var/"log/dagu.log" + working_dir var + end + + test do + assert_match version.to_s, shell_output("#{bin}/dagu version 2>&1") + + (testpath/"hello.yaml").write <<~YAML + steps: + - name: hello + command: echo "Hello from Dagu!" + + - name: world + command: echo "Running step 2" + YAML + + system bin/"dagu", "start", "hello.yaml" + shell_output = shell_output("#{bin}/dagu status hello.yaml") + assert_match "The DAG completed successfully", shell_output + end +end diff --git a/Formula/d/daktilo.rb b/Formula/d/daktilo.rb new file mode 100644 index 0000000000000..63c364ac0473b --- /dev/null +++ b/Formula/d/daktilo.rb @@ -0,0 +1,41 @@ +class Daktilo < Formula + desc "Plays typewriter sounds every time you press a key" + homepage "https://daktilo.cli.rs" + url "https://github.com/orhun/daktilo/archive/refs/tags/v0.6.0.tar.gz" + sha256 "594987ad0697a29e3d0dc25b220e5680cfaecedf2175fd6c17ba827fc7bc2978" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ff1fd88a5f22968066a2fa40a1bf920755081c46b445c51fd1513efd7de2d59" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08b93c796ccf69e6ad63d6a0109ddd3e497ba5dafcf0d050f818ea1ea4211b0d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da61f9a129b3f86817d89889f0495546ab29e75c26aa4e0bfaf876cad604b19f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "546b3ee3d5da434c32614c51c92610ce80486b3685cc656c3228f1307c4188c9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5c6934cd904014b23e31eff5febfd720868a370c85875a7662e8322e7e409aef" + sha256 cellar: :any_skip_relocation, sonoma: "7e60d9deb2d00237f924690c9ad83c21fa0e9a39a2d5e21815b53d0a97e7a4aa" + sha256 cellar: :any_skip_relocation, ventura: "076a61558f93da37b2a31f97496fd4f687e578be0929488e931fbe3b806575fd" + sha256 cellar: :any_skip_relocation, monterey: "58cde688813e9da476cab1935487bbbaa337a781808602c6c34d3612e752a684" + sha256 cellar: :any_skip_relocation, arm64_linux: "551661528d988f6e25e8723edb9b1d515d143178d237843da60fd52f946a5993" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d862c33b912fb26fb8564fdc3bef5f666265f8945c9cd17c2b7fc030ee3e3ce7" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "libx11" + depends_on "libxi" + depends_on "libxtst" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/daktilo") + end + + test do + assert_match version.to_s, shell_output("#{bin}/daktilo --version") + + output = shell_output("#{bin}/daktilo -l") + assert_match "kick.mp3,hat.mp3,snare.mp3,kick.mp3,hat.mp3,kick.mp3,snare.mp3,hat.mp3", output + end +end diff --git a/Formula/d/dalfox.rb b/Formula/d/dalfox.rb new file mode 100644 index 0000000000000..02f60b504c9a3 --- /dev/null +++ b/Formula/d/dalfox.rb @@ -0,0 +1,37 @@ +class Dalfox < Formula + desc "XSS scanner and utility focused on automation" + homepage "https://dalfox.hahwul.com" + url "https://github.com/hahwul/dalfox/archive/refs/tags/v2.12.0.tar.gz" + sha256 "b87848b17cac23352d674e63fee554ae6b976a53fe3e62822512232030430cd5" + license "MIT" + head "https://github.com/hahwul/dalfox.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "adb975deecc8e03c75c980ad6787452fed58a5d12951d11537c94eefcb11a841" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "511a887b38f2fca677528e0c5c90f540a85b931ea28d4474062b83c92b23f31b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "511a887b38f2fca677528e0c5c90f540a85b931ea28d4474062b83c92b23f31b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "511a887b38f2fca677528e0c5c90f540a85b931ea28d4474062b83c92b23f31b" + sha256 cellar: :any_skip_relocation, sonoma: "54a0c02b8dbfb0aec78818fa5aa7f843f0936ce46afc5b0a52fc69c79c8add7a" + sha256 cellar: :any_skip_relocation, ventura: "54a0c02b8dbfb0aec78818fa5aa7f843f0936ce46afc5b0a52fc69c79c8add7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bba9992dda0d565c0eab6acc973e014c947dc98cdf6db426da990ffbf577c49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45314adf0430c025d71fc1154ece4ea12e4f80da6335beb55f12fcea02c3575d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"dalfox", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dalfox version 2>&1") + + url = "http://testphp.vulnweb.com/listproducts.php?cat=123&artist=123&asdf=ff" + output = shell_output("#{bin}/dalfox url \"#{url}\" 2>&1") + assert_match "Finish Scan!", output + end +end diff --git a/Formula/d/damask-grid.rb b/Formula/d/damask-grid.rb new file mode 100644 index 0000000000000..04b115afd0f16 --- /dev/null +++ b/Formula/d/damask-grid.rb @@ -0,0 +1,107 @@ +class DamaskGrid < Formula + desc "Grid solver of DAMASK - Multi-physics crystal plasticity simulation package" + homepage "https://damask-multiphysics.org" + url "https://damask-multiphysics.org/download/damask-3.0.2.tar.xz" + sha256 "82f9b3aefde87193c12a7c908f42b711b278438f6cad650918989e37fb6dbde4" + license "AGPL-3.0-only" + revision 1 + + # The first-party website doesn't always reflect the newest version, so we + # check GitHub releases for now. + livecheck do + url "https://github.com/damask-multiphysics/damask" + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "af5453a9caa4ceb66ae92013124cb47ec4816c2633551012a28c786de869f7ea" + sha256 cellar: :any, arm64_sequoia: "dbe12573573118c4e67b5035d500d16a2f4883f5cef5c99b371b1683ee517a7f" + sha256 cellar: :any, arm64_sonoma: "467cf16fa9ef3fbcf8159d71a8ae6d18f8d9422a71dd41d3e8ff39f3c5d5ef1c" + sha256 cellar: :any, sonoma: "b7f9a6d18fa58333c98ae6303e3ada4e2a3571dd278f5cae2e3be19ce28aa5e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "139bc698159d3ec3f16266958e5a48bc716c48ac89129190bc44433c318eef5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24734feb1be5d996087cfc5b2aae66041d3ab99321587fa5b922ab9551fc1c25" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "fftw" + depends_on "gcc" + depends_on "hdf5-mpi" + depends_on "metis" + depends_on "open-mpi" + depends_on "openblas" + depends_on "petsc" + depends_on "scalapack" + + uses_from_macos "zlib" + + # Support PETSc 3.24.x + # https://github.com/damask-multiphysics/DAMASK/commit/dc9aa42f04b9f5172b499c94328a22fed0ec6d9a + patch :DATA + + def install + ENV["PETSC_DIR"] = Formula["petsc"].opt_prefix + args = %w[ + -DDAMASK_SOLVER=grid + ] + system "cmake", "-S", ".", "-B", "build-grid", *args, *std_cmake_args + system "cmake", "--build", "build-grid", "--target", "install" + + pkgshare.install "examples/grid" + end + + test do + cp_r pkgshare/"grid", testpath + cd "grid" do + inreplace "tensionX.yaml" do |s| + s.gsub! " t: 10", " t: 1" + s.gsub! " t: 60", " t: 1" + s.gsub! "N: 60", "N: 1" + s.gsub! "N: 40", "N: 1" + end + + args = %w[ + -w . + -m material.yaml + -g 20grains16x16x16.vti + -l tensionX.yaml + -j output + ] + system "#{bin}/DAMASK_grid", *args + assert_path_exists "output.hdf5", "output.hdf5 must exist" + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 628e68d..4fb5df2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,8 +10,11 @@ endif() + # Dummy project to determine compiler names and version + project(Prerequisites LANGUAGES) + set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") +-pkg_check_modules(PETSC_MIN REQUIRED PETSc>=3.12.0 QUIET) #CMake does not support version range +-pkg_check_modules(PETSC REQUIRED PETSc<3.24.0) ++set(PETSC_VERSION_MINOR_MIN "15") ++set(PETSC_VERSION_MINOR_MAX "24") ++ ++pkg_check_modules(PETSC_MIN REQUIRED PETSc>=3.${PETSC_VERSION_MINOR_MIN}.0 QUIET) #CMake does not support version range ++pkg_check_modules(PETSC REQUIRED PETSc<=3.${PETSC_VERSION_MINOR_MAX}.99) + + pkg_get_variable(CMAKE_Fortran_COMPILER PETSc fcompiler) + pkg_get_variable(CMAKE_C_COMPILER PETSc ccompiler) +diff --git a/src/CLI.f90 b/src/CLI.f90 +index 3bc472e..a285230 100644 +--- a/src/CLI.f90 ++++ b/src/CLI.f90 +@@ -21,7 +21,7 @@ + !> @brief Parse command line interface for PETSc-based solvers + !-------------------------------------------------------------------------------------------------- + #define PETSC_MINOR_MIN 12 +-#define PETSC_MINOR_MAX 23 ++#define PETSC_MINOR_MAX 24 + + module CLI + use, intrinsic :: ISO_fortran_env diff --git a/Formula/d/dante.rb b/Formula/d/dante.rb new file mode 100644 index 0000000000000..cf46eb2c54782 --- /dev/null +++ b/Formula/d/dante.rb @@ -0,0 +1,46 @@ +class Dante < Formula + desc "SOCKS server and client, implementing RFC 1928 and related standards" + homepage "https://www.inet.no/dante/" + url "https://www.inet.no/dante/files/dante-1.4.4.tar.gz" + sha256 "1973c7732f1f9f0a4c0ccf2c1ce462c7c25060b25643ea90f9b98f53a813faec" + license "BSD-Inferno-Nettverk" + + livecheck do + url "https://www.inet.no/dante/download.html" + regex(/href=.*?dante[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0e07933bcf9bcb90be5f3f0ff41bf6784fe6e3ad0c9f9eac9453513766c163ec" + sha256 cellar: :any, arm64_sequoia: "641448e8ab837bdf0b8a87a78e06af469dad0f91f571af7a60a011613493a8df" + sha256 cellar: :any, arm64_sonoma: "182ff68f6b022decb171a5fb8b6d0493bc5aa10da185047874467d053c3ac600" + sha256 cellar: :any, arm64_ventura: "1323b5c036625451c134161ec41b96efeb9bb6b0f10109fac0eb8680d3e87b0e" + sha256 cellar: :any, sonoma: "eacc7bdd820155843dc2d63c0854c269fde6b593b8848de7aa44b3519f8da57b" + sha256 cellar: :any, ventura: "314f9bdede43b188b66a6e477362f7a05067aad5139596a511a3f6268bd718ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "6411a6d10e9db93d0f71d4475e9ddd3eac46276060ff2ecf64d4affc2ba78bcc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bcee07022a78c86b18501024615b999f7d3127a155a47bfbd2e2eec01cdb6e65" + end + + uses_from_macos "libxcrypt" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--disable-debug", + "--disable-silent-rules", + # Enabling dependency tracking disables universal + # build, avoiding causing size or memmove detection issues. + "--enable-dependency-tracking", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}/dante" + system "make", "install" + end + + test do + system sbin/"sockd", "-v" + end +end diff --git a/Formula/d/daq.rb b/Formula/d/daq.rb new file mode 100644 index 0000000000000..5e9c51c33d62b --- /dev/null +++ b/Formula/d/daq.rb @@ -0,0 +1,59 @@ +class Daq < Formula + desc "Network intrusion prevention and detection system" + homepage "https://www.snort.org/" + url "https://github.com/snort3/libdaq/archive/refs/tags/v3.0.21.tar.gz" + mirror "https://fossies.org/linux/misc/libdaq-3.0.21.tar.gz" + sha256 "60ad9405c1c6b75955e0784511b173570a601491ccdb6399da53ca811c446a96" + license "GPL-2.0-only" + head "https://github.com/snort3/libdaq.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "dd1c882f91f69810f19b796c223dade48cef32c16a8384c87e14ba43a94f3457" + sha256 cellar: :any, arm64_sequoia: "a31103738088040c119a6c928d672e9d7850bd559a8d5ec34e021d6ada529b93" + sha256 cellar: :any, arm64_sonoma: "64b327ce1b26052302ffad7a91262cff734a62e3834197abb846c65ea7b90916" + sha256 cellar: :any, arm64_ventura: "111f99b9a9a16d7fbb4eb1cbd72da7ea8a4ab9bbdec31609cfd81941716e924a" + sha256 cellar: :any, sonoma: "5be0087b396a54e4f15b6a449bccdc0924ab4fe2e087182a66619b51315b89ec" + sha256 cellar: :any, ventura: "644fd14758656d2fa0ee57d93f0d5002f2bf8b68892c271c351e96db5f8b7937" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b7f3e4fd9bad98b570e98396c40e671f2fc6922abf7729c995fcd52ef8f8b67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfac765b31161f237bbd8d7fa19b7a83d3330765975db2dfaa536eebac39e35b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + uses_from_macos "libpcap" + + def install + system "./bootstrap" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + extern const DAQ_ModuleAPI_t pcap_daq_module_data; + static DAQ_Module_h static_modules[] = { &pcap_daq_module_data, NULL }; + + int main() + { + int rval = daq_load_static_modules(static_modules); + assert(rval == 1); + DAQ_Module_h module = daq_modules_first(); + assert(module != NULL); + printf("[%s] - Type: 0x%x", daq_module_get_name(module), daq_module_get_type(module)); + module = daq_modules_next(); + assert(module == NULL); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ldaq", "-ldaq_static_pcap", "-lpcap", "-lpthread", "-o", "test" + assert_match "[pcap] - Type: 0xb", shell_output("./test") + end +end diff --git a/Formula/d/dar.rb b/Formula/d/dar.rb new file mode 100644 index 0000000000000..3240ef3b48063 --- /dev/null +++ b/Formula/d/dar.rb @@ -0,0 +1,43 @@ +class Dar < Formula + desc "Backup directory tree and files" + homepage "http://dar.linux.free.fr/doc/index.html" + url "https://downloads.sourceforge.net/project/dar/dar/2.8.1/dar-2.8.1.tar.gz" + sha256 "217843cfb55ca99ccb38349f4778efd24de461aeee6f3d70ceacd1d9a4f492a4" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/dar[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "1f5d17e89b08bd7a9b94571a18186f14dc97917cd6c21cf4c2642954b19fd24d" + sha256 arm64_sequoia: "405575d7a811c346f3249384f847cd5fd7f4d512afc0c2b49057956f56a98426" + sha256 arm64_sonoma: "61f89387b2e95c92a88d23d1ac764d03d425d7d33f5d7fdaed7b5e8f7f81957b" + sha256 sonoma: "2b2d95e0808b63e83c3a33053c3e9a2e4b5e5872d096be9b735ea492f155324e" + sha256 arm64_linux: "5a387cee02160605f77c00c04c7178f7c566dc20da753d0397be0e9b6638d419" + sha256 x86_64_linux: "84ca78d59f5a46310edc3985a6779e4f2a6700a83b7515bfba1843963626abd2" + end + + depends_on "argon2" + depends_on "libgcrypt" + depends_on "lzo" + + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}", + "--disable-build-html", + "--disable-dar-static", + "--disable-dependency-tracking", + "--disable-libxz-linking", + "--enable-mode=64" + system "make", "install" + end + + test do + mkdir "Library" + system bin/"dar", "-c", "test", "-R", "./Library" + system bin/"dar", "-d", "test", "-R", "./Library" + end +end diff --git a/Formula/d/darcs.rb b/Formula/d/darcs.rb new file mode 100644 index 0000000000000..4c4beec38de4b --- /dev/null +++ b/Formula/d/darcs.rb @@ -0,0 +1,99 @@ +class Darcs < Formula + desc "Distributed version control system that tracks changes, via Haskell" + homepage "https://darcs.net/" + url "https://hackage.haskell.org/package/darcs-2.18.5/darcs-2.18.5.tar.gz" + sha256 "e310692989e313191824f532a26c5eae712217444214266503d5eb5867f951ab" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9ef3739cd7aef89964796218a15346faed915fbfcd207775c54809560b2bea6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "507dfc31c10438735098621aed6c75916d2b807bc7a72f957dbc0e808ff65916" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2772f85e77f266ccecd9f8c5dbabf09b965b789d92b1d7c202989317cb832e7e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "22caed7f5b40475b198b0474c056c477f8d6b6cbbb980b14a813829d362d9261" + sha256 cellar: :any_skip_relocation, sonoma: "d73fa876ba56773601ad0aba9d459a14bd08f9678a1c1ef412b099b2f10bb11f" + sha256 cellar: :any_skip_relocation, ventura: "22ad293dec66d2b02d524e7f2b2f7a41d667af225130a832d26023cad73088a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "7aa0e49c8fb1a0af523aba68346a85b97441475d0e415c7d4d22487ef96adf88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "caaab41754cacb2f6265623542eae257e1c2dfd5ef0d585632ca1dcad59cfc91" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + depends_on "gmp" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + # Backport fixes for newer GHC[^1] and Cabal[^2]. Darcs uses a different + # patch file format and cannot be applied with the external patch DSL. + # + # * darcs diff --hash 32646b190e019de21a103e950c4eccdd66f7eadc + # * darcs diff --hash 50d9b0b402a896c83aa7929a50a0e0449838600f + # * darcs diff --hash 8da98f5de14034aa79a2860212fa34e99585e188 + # + # [^1]: https://bugs.darcs.net/patch2422 + # [^2]: https://bugs.darcs.net/patch2426 + patch :DATA + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + mkdir "my_repo" do + system bin/"darcs", "init" + Pathname("foo").write "hello homebrew!" + system bin/"darcs", "add", "foo" + system bin/"darcs", "record", "-am", "add foo", "--author=homebrew" + end + system bin/"darcs", "get", "my_repo", "my_repo_clone" + assert_equal "hello homebrew!", (testpath/"my_repo_clone/foo").read + end +end + +__END__ +diff -rN -u old-darcs.net/darcs.cabal new-darcs.net/darcs.cabal +--- old-darcs.net/darcs.cabal 2025-01-05 10:09:26 ++++ new-darcs.net/darcs.cabal 2025-01-05 10:09:26 +@@ -123,7 +123,7 @@ + -- ---------------------------------------------------------------------- + + custom-setup +- setup-depends: base >= 4.10 && < 4.20, ++ setup-depends: base >= 4.10 && < 4.21, + Cabal >= 2.4 && < 3.11, + process >= 1.2.3.0 && < 1.7, + filepath >= 1.4.1 && < 1.5.0.0, +@@ -412,7 +412,7 @@ + else + build-depends: unix >= 2.7.1.0 && < 2.9 + +- build-depends: base >= 4.10 && < 4.20, ++ build-depends: base >= 4.10 && < 4.21, + safe >= 0.3.20 && < 0.4, + stm >= 2.1 && < 2.6, + binary >= 0.5 && < 0.11, +diff -rN -u old-darcs.net/Setup.hs new-darcs.net/Setup.hs +--- old-darcs.net/Setup.hs 2025-01-05 10:24:34 ++++ new-darcs.net/Setup.hs 2025-01-05 10:24:34 +@@ -8,7 +8,7 @@ + import Distribution.Package ( packageVersion ) + import Distribution.Version( Version ) + import Distribution.Simple.LocalBuildInfo +- ( LocalBuildInfo(..), absoluteInstallDirs ) ++ ( LocalBuildInfo(..), absoluteInstallDirs, buildDir ) + import Distribution.Simple.InstallDirs (mandir, CopyDest (NoCopyDest)) + import Distribution.Simple.Setup + (buildVerbosity, copyDest, copyVerbosity, fromFlag, +diff -rN -u old-darcs.net/darcs.cabal new-darcs.net/darcs.cabal +--- old-darcs.net/darcs.cabal 2025-01-05 10:24:34 ++++ new-darcs.net/darcs.cabal 2025-01-05 10:24:34 +@@ -124,7 +124,7 @@ + + custom-setup + setup-depends: base >= 4.10 && < 4.21, +- Cabal >= 2.4 && < 3.11, ++ Cabal >= 2.4 && < 3.13, + process >= 1.2.3.0 && < 1.7, + filepath >= 1.4.1 && < 1.5.0.0, + directory >= 1.2.7 && < 1.4 diff --git a/Formula/d/dark-mode.rb b/Formula/d/dark-mode.rb new file mode 100644 index 0000000000000..cc9f34ee4cacf --- /dev/null +++ b/Formula/d/dark-mode.rb @@ -0,0 +1,45 @@ +class DarkMode < Formula + desc "Control the macOS dark mode from the command-line" + homepage "https://github.com/sindresorhus/dark-mode" + url "https://github.com/sindresorhus/dark-mode/archive/refs/tags/v3.0.2.tar.gz" + sha256 "fda7d4337fe3f0af92267fb517a17f11a267b5f8f38ec2db0c416526efd42619" + license "MIT" + head "https://github.com/sindresorhus/dark-mode.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6217678dfa4b8d1be25c7db9e62e604458cf16219b6cc5a4630f5c5d4bdb9f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1ba7fd046acc377adb6e03543dfa8a5c4376e930ecce45b2ba464b23c808192" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "98777785e6fb000da0969b716bb7ee5397ce75872031c7c7d9ebed750cf38d2b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "220d410b3879326e6d7b359cf4ca5e4feeafa76b12998e4fcd64ef420ffc1f29" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e1e6bb2d24e1d8c7e2c8bc07bdfffbe0a9c13136e92066b97a24dcbbda938220" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dc8e59edc2327ebe14e1b5c1d40a9fe8a7138749ec5ae092ff752c28c83e97aa" + sha256 cellar: :any_skip_relocation, sonoma: "1daf58b83385b1dd3e852d8ca4b051a875e510e02115b6d0502082fa52ef0058" + sha256 cellar: :any_skip_relocation, ventura: "46d4c9a2055387cd9a0abf38f563e803034e4a946313dae838f30d6025633421" + sha256 cellar: :any_skip_relocation, monterey: "312e08579ba705193ec21f3f10f3b52ac69b752d301788846752f3e160105abf" + sha256 cellar: :any_skip_relocation, big_sur: "8ec98a0dfe32ff7933e9f44a4f4933e1e0da4929076e72ed79cbc296240c17dd" + sha256 cellar: :any_skip_relocation, catalina: "5533a6c879d399a84a61b0ee6d03e5baaa23c8d598ebc8c3ad1dbd0db6da8958" + end + + depends_on xcode: :build + depends_on :macos + + def install + # https://github.com/sindresorhus/dark-mode/blob/main/build + Dir.mktmpdir do |tmpdir| + xcodebuild "-arch", Hardware::CPU.arch, + "-derivedDataPath", tmpdir, + "-scheme", "dark-mode", + "-configuration", "Release", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", + "OBJROOT=.build", + "SYMROOT=.build" + end + bin.install ".build/Release/dark-mode" + end + + test do + assert_match(/\A(on|off)\z/, shell_output("#{bin}/dark-mode status").chomp) + end +end diff --git a/Formula/d/darker.rb b/Formula/d/darker.rb new file mode 100644 index 0000000000000..285daff17b395 --- /dev/null +++ b/Formula/d/darker.rb @@ -0,0 +1,81 @@ +class Darker < Formula + include Language::Python::Virtualenv + + desc "Apply Black formatting only in regions changed since last commit" + homepage "https://github.com/akaihola/darker" + url "https://files.pythonhosted.org/packages/df/78/ad6af1661c2eca0ec69b7ff7c99d95dcae29c5e0071c7ebc98e6670f4663/darker-3.0.0.tar.gz" + sha256 "eb53776f037fcf42b1f5a56f62fb841cd871d95a78a388536dc91dc4355ce8bb" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2c171dadbb8488ede92f3763ecf9fd9e3a06e706363c1f4661d5394280035a4e" + end + + depends_on "python@3.14" + + resource "black" do + url "https://files.pythonhosted.org/packages/4b/43/20b5c90612d7bdb2bdbcceeb53d588acca3bb8f0e4c5d5c751a2c8fdd55a/black-25.9.0.tar.gz" + sha256 "0474bca9a0dd1b51791fcc507a4e02078a1c63f6d4e4ae5544b9848c7adfb619" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "darkgraylib" do + url "https://files.pythonhosted.org/packages/ed/f8/098b981e982f5bd4616e42409debde17783757405781c01e3fc9ead5012d/darkgraylib-2.4.0.tar.gz" + sha256 "d270b2c5a50be3575f50d26ec22adcd934f9a7a9edcd3c5400fddf8fb1e89af7" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pytokens" do + url "https://files.pythonhosted.org/packages/30/5f/e959a442435e24f6fb5a01aec6c657079ceaca1b3baf18561c3728d681da/pytokens-0.1.10.tar.gz" + sha256 "c9a4bfa0be1d26aebce03e6884ba454e842f186a59ea43a6d3b25af58223c044" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/darker --version") + + (testpath/"darker_test.py").write <<~PYTHON + print( + 'It works!') + PYTHON + system bin/"darker", "darker_test.py" + assert_equal 'print("It works!")', (testpath/"darker_test.py").read.strip + end +end diff --git a/Formula/d/darkhttpd.rb b/Formula/d/darkhttpd.rb new file mode 100644 index 0000000000000..001a47c51e515 --- /dev/null +++ b/Formula/d/darkhttpd.rb @@ -0,0 +1,27 @@ +class Darkhttpd < Formula + desc "Small static webserver without CGI" + homepage "https://unix4lyfe.org/darkhttpd/" + url "https://github.com/emikulic/darkhttpd/archive/refs/tags/v1.17.tar.gz" + sha256 "4fee9927e2d8bb0a302f0dd62f9ff1e075748fa9f5162c9481a7a58b41462b56" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d789a550bcdedb7039ec2eb15b5c6a57f93d8848fc471ab97caa8ce324fa04e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c69e08e8c2ebf5a9a688b1b8ef04023479a883c4cb59fb37f4d079e552bfcb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "442e6a89ba63bf57480ce24b9f1b1328df91acfcd2232965ff60649a4f72cf28" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c91049fd08525931a2723036bc87b1bd4e43eac4f35faaef7fdb299be8e509d2" + sha256 cellar: :any_skip_relocation, sonoma: "e7fb32f512690f230d1ef4febeace561eaa4dc0837b40cf5b59a71f0f91da6d6" + sha256 cellar: :any_skip_relocation, ventura: "cba66b5df314cfe3df8307c5c35b5aaae430e9019038ee2392c58f2e3bcc3b47" + sha256 cellar: :any_skip_relocation, arm64_linux: "f98b866298dad9e43a231d2414160dec2b5782fc859edc12f766a49a3eaebb11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "576d06ada412f04a6d4d8bea220aeb09a85f108cfe4457a4002d0c849996b44c" + end + + def install + system "make" + bin.install "darkhttpd" + end + + test do + system bin/"darkhttpd", "--help" + end +end diff --git a/Formula/d/darkice.rb b/Formula/d/darkice.rb new file mode 100644 index 0000000000000..a4ddca368785d --- /dev/null +++ b/Formula/d/darkice.rb @@ -0,0 +1,57 @@ +class Darkice < Formula + desc "Live audio streamer" + homepage "http://www.darkice.org/" + url "https://github.com/rafael2k/darkice/releases/download/v1.5/darkice-1.5.tar.gz" + sha256 "18b4c4573a7ccfe09c1094eb5798159e2a9892106ea62d753933f6f2a746058e" + license "GPL-3.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "164c7248bbc46a4a79b4156816e541a874247a98fb95d7d43759182022983c0d" + sha256 cellar: :any, arm64_sequoia: "63d77f3484a28636bd7c5a7a804a0d8e3e410e3b07b4859d27ce0a8b9b714233" + sha256 cellar: :any, arm64_sonoma: "089a73da66e99a1289c3259dc974acf0ffcc053af05facf3b760f8b0d7c4b0e9" + sha256 cellar: :any, arm64_ventura: "22abd05d4b3d880d9b1ad6abaf636f7d31c65ff3d20a7ce54c888d5464b32369" + sha256 cellar: :any, arm64_monterey: "d70aab113619347c2b1ab5dc69b265a0dcacab27c30a81ad852c12417960e670" + sha256 cellar: :any, sonoma: "01555e1eff33f033c509891563900a3bd69bbaa658570d298e40f5ed6438a0eb" + sha256 cellar: :any, ventura: "f922c9ca8895e789a65b11fdabda217f1301d91ce1c19890de8e433a19f8c5f8" + sha256 cellar: :any, monterey: "47f4bafaa04a5c4eb24783771215f643bf032dbd911145812b3b27d8d3034b39" + sha256 cellar: :any_skip_relocation, arm64_linux: "95f5d5e05e922c398d1f8277465fe2d1350cf7f330d1aa7228026a52a674397d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e96398becc4f8c42c2fa104ea86e96207756ee073a301d0acb0fe56fd665ebcb" + end + + depends_on "pkgconf" => :build + + depends_on "faac" + depends_on "jack" + depends_on "lame" + depends_on "libogg" + depends_on "libsamplerate" + depends_on "libvorbis" + depends_on "two-lame" + + on_linux do + depends_on "alsa-lib" + end + + def install + ENV.cxx11 + system "./configure", "--sysconfdir=#{etc}", + "--with-lame-prefix=#{Formula["lame"].opt_prefix}", + "--with-faac-prefix=#{Formula["faac"].opt_prefix}", + "--with-twolame", + "--with-jack", + "--with-vorbis", + "--with-samplerate", + "--without-opus", + *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/darkice -h", 1) + end +end diff --git a/Formula/d/darklua.rb b/Formula/d/darklua.rb new file mode 100644 index 0000000000000..eca3ca5815ab2 --- /dev/null +++ b/Formula/d/darklua.rb @@ -0,0 +1,76 @@ +class Darklua < Formula + desc "Command-line tool that transforms Lua code" + homepage "https://darklua.com/" + url "https://github.com/seaofvoices/darklua/archive/refs/tags/v0.17.2.tar.gz" + sha256 "6afa725dfbc89686359072a69c10ec2d4f319612db73f80fa4e83f0fda514289" + license "MIT" + head "https://github.com/seaofvoices/darklua.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d951ca61ebe373fe7e69d59cfe711edb1d708a9243ebfb7893579fb47c8ab210" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "460be7c614fb4638e270e891c6151a5ff52e0921138aa7959f41697d49dba980" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a71c633f36b175216c553ca8f6b6553f88429ed21c2a9c04ff10b74aa0b4a45f" + sha256 cellar: :any_skip_relocation, sonoma: "2331fba9c74ea75c2a663f16683050ed7e00991f5777e23d6d150152dc5244ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4166b93ee7a64962bc924d89d34a2406e641fec4c185c3e7e6e3645bf0e5543" + sha256 cellar: :any_skip_relocation, x86_64_linux: "947d96bdf59b50c7def06b4cca785e2553edde09bcb88e4e738048ed16faf973" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/".darklua.json").write <<~JSON + { + rules: [ + 'remove_spaces', + 'remove_comments', + 'compute_expression', + 'remove_unused_if_branch', + 'remove_unused_while', + 'filter_after_early_return', + 'remove_empty_do', + 'remove_unused_variable', + 'remove_method_definition', + 'convert_index_to_field', + 'remove_nil_declaration', + 'rename_variables', + 'remove_function_call_parens', + ], + } + JSON + + (testpath/"test.lua").write <<~LUA + -- paste code here to preview the darklua transform + local foo = 1 + local redundant_variable = "" + print(foo) + + for _, v in ipairs{1, 2, 3} do + for _, b in ipairs{5, 6, 7} do + print(v + b) + end + end + LUA + + (testpath/"expected.lua").write <<~LUA + + local a=1 + + print(a) + + for b,c in ipairs{1,2,3}do + for d,e in ipairs{5,6,7}do + print(c+e) + end + end + LUA + + system bin/"darklua", "process", testpath/"test.lua", testpath/"output.lua" + assert_path_exists testpath/"output.lua" + # remove `\n` from `expected.lua` file + assert_equal (testpath/"output.lua").read, (testpath/"expected.lua").read.chomp + end +end diff --git a/Formula/d/darkstat.rb b/Formula/d/darkstat.rb new file mode 100644 index 0000000000000..e3c1333bcafc7 --- /dev/null +++ b/Formula/d/darkstat.rb @@ -0,0 +1,40 @@ +class Darkstat < Formula + desc "Network traffic analyzer" + homepage "https://unix4lyfe.org/darkstat/" + url "https://github.com/emikulic/darkstat/archive/refs/tags/3.0.722.tar.gz" + sha256 "5c8e66d4c478b6d7e58f4c842823a09125509bf6851017ff70e32b32ce95b01b" + license all_of: ["BSD-4-Clause-UC", "GPL-2.0-only", "GPL-3.0-or-later", "X11"] + head "https://github.com/emikulic/darkstat.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3dd43f8c27edbf9e7ee2d7769cb50512977b31ea1519a6c14e3bdc8777364519" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9303731ebb9fd40e5c9a4260103eab5442b2cf96228b11d3a4a139271d6da972" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c69728d3c494174d2e4ed2a260acc4217e0d759dd488881d5a78cd40e76d140" + sha256 cellar: :any_skip_relocation, sonoma: "ba08516ebe6c57072222ca80429a0a14cf94b898c0de73f940b215ae80af3ef1" + sha256 cellar: :any_skip_relocation, arm64_linux: "81a77615427806e270297ddeca7d4c126952a4ffd83a362d87675d2b5e00e650" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59ec9f41c65df91ffc821e53c8f36a3eade1dd7cf7ead1003d0852f432cdcde7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + # Patch reported to upstream on 2017-10-08 + # Work around `redefinition of clockid_t` issue on 10.12 SDK or newer + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/darkstat/clock_gettime.patch" + sha256 "001b81d417a802f16c5bc4577c3b840799511a79ceedec27fc7ff1273df1018b" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system sbin/"darkstat", "--verbose", "-r", test_fixtures("test.pcap") + end +end diff --git a/Formula/d/dart-sdk.rb b/Formula/d/dart-sdk.rb new file mode 100644 index 0000000000000..10c2bc0602c75 --- /dev/null +++ b/Formula/d/dart-sdk.rb @@ -0,0 +1,54 @@ +class DartSdk < Formula + desc "Dart Language SDK, including the VM, dart2js, core libraries, and more" + homepage "https://dart.dev" + url "https://github.com/dart-lang/sdk/archive/refs/tags/3.9.4.tar.gz" + sha256 "b7413dd8d13e09b0eca5b197a7d2c4dbc0fa0624cf234eb24f9d09aba05ebb99" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c0322feac8b63067a9ae15a596ff217cddefb60ce1cf3268203eb595bf8771fe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9bc208243c6193cb4d9fa5c2f9ea72c320f06cd80c19388d73e8f7edaaa2c185" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44eb73795c9618c29a903c40a8f993b28c4640db826fd6c662735bbde4ee3fd4" + sha256 cellar: :any_skip_relocation, sonoma: "5a555caadc2aab0f1433bf158a8a7319ccadd228d83d5481ff4a8110009096a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "3736f543a2a0a651ad3890d748e2148b191af4cd1a11a7f6681c9fa910e811ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07150c7dc91ab6163dbae3ad74cb67cfda014d687b2bc957ff8fd896a63dfec7" + end + + depends_on "ninja" => :build + depends_on "rust" => :build + + uses_from_macos "curl" => :build + uses_from_macos "python" => :build + uses_from_macos "xz" => :build + + # always pull the latest commit from https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/refs/heads/main + resource "depot-tools" do + url "https://chromium.googlesource.com/chromium/tools/depot_tools.git", + revision: "49ffe22ecdd00d319d5750ba494e4ba5ac6bb855" + end + + def install + resource("depot-tools").stage(buildpath/"depot-tools") + + ENV["DEPOT_TOOLS_UPDATE"] = "0" + ENV.append_path "PATH", "#{buildpath}/depot-tools" + + system "gclient", "config", "--name", "sdk", "https://dart.googlesource.com/sdk.git@#{version}" + system "gclient", "sync", "--no-history" + + chdir "sdk" do + arch = Hardware::CPU.arm? ? "arm64" : "x64" + system "./tools/build.py", "--mode=release", "--arch=#{arch}", "create_sdk" + out = OS.linux? ? "out" : "xcodebuild" + libexec.install Dir["#{out}/Release#{arch.upcase}/dart-sdk/*"] + end + bin.install_symlink libexec/"bin/dart" + end + + test do + system bin/"dart", "create", "dart-test" + chdir "dart-test" do + assert_match "Hello world: 42!", shell_output("#{bin}/dart run") + end + end +end diff --git a/Formula/d/dartsim.rb b/Formula/d/dartsim.rb new file mode 100644 index 0000000000000..09ed2d5f82464 --- /dev/null +++ b/Formula/d/dartsim.rb @@ -0,0 +1,81 @@ +class Dartsim < Formula + desc "Dynamic Animation and Robotics Toolkit" + homepage "https://dartsim.github.io/" + url "https://github.com/dartsim/dart/archive/refs/tags/v6.15.0.tar.gz" + sha256 "bbf954e283f464f6d0a8a5ab43ce92fd49ced357ccdd986c7cb4c29152df8692" + license "BSD-2-Clause" + revision 6 + + bottle do + sha256 arm64_tahoe: "1920dc73653aeb057dcf27644f2ec2b57749ee6c9d2328733712cd0876d4df98" + sha256 arm64_sequoia: "512ffe161072bb701ec6ed1e939a6a0d0491d935bf4ac052581244536e6dbafd" + sha256 arm64_sonoma: "0f4b0b2c0c2cee8f18a90256f92c5b0ab9fb3c6b892523ed81e3c010f4230681" + sha256 sonoma: "8350a51f816311c2176eba807319e59be607f54aa6ed8a9dd9bddc69e9893f58" + sha256 arm64_linux: "b40c3209d705b7b5c0ea8de6f0110603c4d58e3cecba626d552ffb60134c2894" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1eb956106ba43d5d4bf5428d9dd93d27a68a3006536e0efae5a7703dbf032c6" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "assimp" + depends_on "bullet" + depends_on "eigen" + depends_on "fcl" + depends_on "flann" + depends_on "fmt" + depends_on "ipopt" + depends_on "libccd" + depends_on "nlopt" + depends_on "octomap" + depends_on "ode" + depends_on "open-scene-graph" + depends_on "spdlog" + depends_on "tinyxml2" + depends_on "urdfdom" + + uses_from_macos "python" => :build + + on_linux do + depends_on "mesa" + end + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DDART_BUILD_DARTPY=OFF + -DDART_ENABLE_SIMD=OFF + ] + + if OS.mac? + # Force to link to system GLUT (see: https://cmake.org/Bug/view.php?id=16045) + glut_lib = "#{MacOS.sdk_path}/System/Library/Frameworks/GLUT.framework" + args << "-DGLUT_glut_LIBRARY=#{glut_lib}" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Clean up the build file garbage that has been installed. + rm_r Dir["#{share}/doc/dart/**/CMakeFiles/"] + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + auto world = std::make_shared(); + assert(world != nullptr); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{Formula["eigen"].include}/eigen3", + "-I#{include}", "-L#{lib}", "-ldart", + "-L#{Formula["assimp"].opt_lib}", "-lassimp", + "-L#{Formula["libccd"].opt_lib}", "-lccd", + "-L#{Formula["fcl"].opt_lib}", "-lfcl", + "-std=c++17", "-o", "test" + system "./test" + end +end diff --git a/Formula/d/dasel.rb b/Formula/d/dasel.rb new file mode 100644 index 0000000000000..08c6ecf87df44 --- /dev/null +++ b/Formula/d/dasel.rb @@ -0,0 +1,36 @@ +class Dasel < Formula + desc "JSON, YAML, TOML, XML, and CSV query and modification tool" + homepage "https://github.com/TomWright/dasel" + url "https://github.com/TomWright/dasel/archive/refs/tags/v2.8.1.tar.gz" + sha256 "ba8da9569f38e7f33453c03ac988382291a01004a96c307d52cccadb9ef7837e" + license "MIT" + head "https://github.com/TomWright/dasel.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67ac40035b003307bfb9f4d59db4894475daf364f7e7f6baa9bcccd89f122ba6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fda15f41f7ba3f9dcf3b59430a7f807f1f4685a994868364fbf25aa1c470fba9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fda15f41f7ba3f9dcf3b59430a7f807f1f4685a994868364fbf25aa1c470fba9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fda15f41f7ba3f9dcf3b59430a7f807f1f4685a994868364fbf25aa1c470fba9" + sha256 cellar: :any_skip_relocation, sonoma: "3bde39da341ff23150659a08e3514a08a6d1d71faf33ab2d6f53c94c93c18f68" + sha256 cellar: :any_skip_relocation, ventura: "3bde39da341ff23150659a08e3514a08a6d1d71faf33ab2d6f53c94c93c18f68" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f3b14cee8db40c659ed7745967c0df0bdc30ea978bfccc4fec3bd102aec8714" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09b557e95eb7bb0822d238132e746fdc26245dcfeccbad94a007722ed8a7805d" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/tomwright/dasel/v2/internal.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/dasel" + + generate_completions_from_executable(bin/"dasel", "completion") + end + + test do + assert_equal "\"Tom\"", shell_output("echo '{\"name\": \"Tom\"}' | #{bin}/dasel -r json 'name'").chomp + assert_match version.to_s, shell_output("#{bin}/dasel --version") + end +end diff --git a/Formula/d/dash-mpd-cli.rb b/Formula/d/dash-mpd-cli.rb new file mode 100644 index 0000000000000..c2b0b7869165c --- /dev/null +++ b/Formula/d/dash-mpd-cli.rb @@ -0,0 +1,39 @@ +class DashMpdCli < Formula + desc "Download media content from a DASH-MPEG or DASH-WebM MPD manifest" + homepage "https://emarsden.github.io/dash-mpd-cli/" + url "https://github.com/emarsden/dash-mpd-cli/archive/refs/tags/v0.2.27.tar.gz" + sha256 "01a4a513ddebdc9affed8f6e51575df7b7bc2bcdeb785f8e321c84b46c94eb63" + license "MIT" + head "https://github.com/emarsden/dash-mpd-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b99abd1d086ada37d7ec0a71660b6226c8671168f62d634286df5c21aae49bb9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0fdcd9132ca030f6acea166e063ce79f1ecd3051bf922f0b605152b4210dda0a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7114a3a27fb5dac5d261bd2093ab61ba5a3f6616e248cbe4bd84cbbe40b901f0" + sha256 cellar: :any_skip_relocation, sonoma: "f96174fd46c1142421281112246e56f809a785e9aecf5f7cf89e20d4d961b055" + sha256 cellar: :any_skip_relocation, arm64_linux: "11320e002d70017702eda32585de782d6fb6dd20e479ffa111d37c556e7de46b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ad451329d0d7739fa06ae39c29c1e4e37eec28aa7c344665b5d55ec8d76122c" + end + + depends_on "protobuf" => :build + depends_on "rust" => :build + depends_on "bento4" + depends_on "ffmpeg" + depends_on "mkvtoolnix" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + resource "testfile" do + url "https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd" + sha256 "4fb9ea292aba0db94ddfe8c941b8423d98decb51dca851afbc203e409bd487d4" + end + + dash_manifest_url = resource("testfile").url + + output = shell_output("#{bin}/dash-mpd-cli --simulate --verbose #{dash_manifest_url} 2>&1") + assert_match "video avc1.4d401f | 7493 Kbps | 768x576", output.chomp + end +end diff --git a/Formula/d/dash-shell.rb b/Formula/d/dash-shell.rb new file mode 100644 index 0000000000000..31d613692276f --- /dev/null +++ b/Formula/d/dash-shell.rb @@ -0,0 +1,39 @@ +class DashShell < Formula + desc "POSIX-compliant descendant of NetBSD's ash (the Almquist SHell)" + homepage "http://gondor.apana.org.au/~herbert/dash/" + url "http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.13.1.tar.gz" + sha256 "d9271bce09c127d9866e25c011582ddc75ab988958a04bc4d8553a3b8f30e370" + license "BSD-3-Clause" + head "https://git.kernel.org/pub/scm/utils/dash/dash.git", branch: "master" + + livecheck do + url "http://gondor.apana.org.au/~herbert/dash/files/" + regex(/href=.*?dash[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9d493aa8aa6589e372227e67dbb93708fdcf992d9064e75009f3917ab7b3e0d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6dfc2b72fdef57ba537e5fcf2e83e0d66a33f60043ec3f47a21a58249da4971d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b51e19b98c71255053e593f7b7879699e84fd38672d68dc6093de6f3061b29fd" + sha256 cellar: :any_skip_relocation, sonoma: "4eaea3dee21db06c3b043fd6db4a100ccf760a06a0c96477b74c514a4b4167a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f50cf54fb40c64c35822a9190e5336ae9c3b59d4923c18ebc82ea68cb4294a0d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25031c85030fc02517ad9872f31804b6b4d03af43b4672c2a901c01dcc7cdc84" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "libedit" + + def install + ENV["ac_cv_func_stat64"] = "no" if OS.mac? && Hardware::CPU.arm? + system "./autogen.sh" if build.head? + system "./configure", "--with-libedit", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"dash", "-c", "echo Hello!" + end +end diff --git a/Formula/d/dashing.rb b/Formula/d/dashing.rb new file mode 100644 index 0000000000000..86e7c7b93c187 --- /dev/null +++ b/Formula/d/dashing.rb @@ -0,0 +1,59 @@ +class Dashing < Formula + desc "Generate Dash documentation from HTML files" + homepage "https://github.com/technosophos/dashing" + url "https://github.com/technosophos/dashing/archive/refs/tags/0.4.0.tar.gz" + sha256 "81b21acae83c144f10d9eea05a0b89f0dcdfa694c3760c2a25bd4eab72a2a3b9" + license "MIT" + revision 1 + head "https://github.com/technosophos/dashing.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "78209eefb9ac2ea5604da56e5128386f4f14f0e520377a1ec2a3541eebe452de" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44a8c08c0183e0bd8a4981e81213332334e5c818a26008c90ca6bf6a5895f206" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aba051824c3bbf06b791ce36a5362d6c7b10becfe692c91dcc3b784d275565f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6afd8514bfadafabffcf92070f6daf79070d39d0cfa6f246c0baf83720f1632" + sha256 cellar: :any_skip_relocation, arm64_monterey: "068ec0d62e2f599509d34a2d366895dce2464eaa9aa1939a553dd1e31c8238d5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "72b9d5ea8aaf171f9a46e099f190a9adf9ad90b6bd90dcdc54eaa922e2c277f9" + sha256 cellar: :any_skip_relocation, sonoma: "ab329a945ab070afaf9b8b6b210b207b823e4a929922766029c281ae630c7079" + sha256 cellar: :any_skip_relocation, ventura: "304de6dcdcc89d4f94952b0b1d547a6e77abdd355c2825ba3260057c289c26e5" + sha256 cellar: :any_skip_relocation, monterey: "a0c325204c959b5956248606f6b7fcb4437c6dfa2c75f739d4624fb912ecaa55" + sha256 cellar: :any_skip_relocation, big_sur: "7297bb9c8b50feeda73af51b59acfcac18f9d2beb57738de293146aaca7cd089" + sha256 cellar: :any_skip_relocation, catalina: "43702cf1fbdeb449e9205716635cba4c62449e575f9a6ab45eeb4aeb166fdf9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ac970aad0a46e0f50606334b2218aa1b2103347300e59e01fc2cc942580e7d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "982d82dc58980aa81fadf686557c5c075ddb95b9ef0f8456e7b32b6ed49aa382" + end + + depends_on "go" => :build + + resource "redux_saga_docs_tarball" do + url "https://github.com/dmitrytut/redux-saga-docset/archive/7df9e3070934c0f4b92d66d2165312bf78ecd6a0.tar.gz" + sha256 "08e5cc1fc0776fd60492ae90961031b1419ea6ed02e2c2d9db2ede67d9d67852" + end + + def install + system "go", "build", *std_go_args(ldflags: "-X main.version=#{version}") + end + + test do + # Make sure that dashing creates its settings file and then builds an actual + # docset for Dash + testpath.install resource("redux_saga_docs_tarball") + innerpath = testpath + system bin/"dashing", "create" + assert_path_exists innerpath/"dashing.json" + system bin/"dashing", "build", "." + innerpath /= "dashing.docset/Contents" + assert_path_exists innerpath/"Info.plist" + innerpath /= "Resources" + assert_path_exists innerpath/"docSet.dsidx" + innerpath /= "Documents" + assert_path_exists innerpath/"README.md" + innerpath /= "docs" + assert_path_exists innerpath/"index.html" + innerpath /= "introduction" + assert_path_exists innerpath/"SagaBackground.html" + end +end diff --git a/Formula/d/dasht.rb b/Formula/d/dasht.rb new file mode 100644 index 0000000000000..baae82d23e2e7 --- /dev/null +++ b/Formula/d/dasht.rb @@ -0,0 +1,29 @@ +class Dasht < Formula + desc "Search API docs offline, in your terminal or browser" + homepage "https://sunaku.github.io/dasht" + url "https://github.com/sunaku/dasht/archive/refs/tags/v2.4.0.tar.gz" + sha256 "5ea43b0f7461e124d46b991892dedc8dcf506ccd5e9dc94324f7bdf6e580ff73" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "14af08c8719ce7e688faa8b061141624a912960bc57d53499161428f08820b21" + end + + depends_on "socat" + depends_on "sqlite" + depends_on "w3m" + depends_on "wget" + + def install + bin.install Dir["bin/*"] + man.install "man/man1" + end + + test do + system bin/"dasht-docsets-install", "--force", "bash" + assert_equal "Bash\n", shell_output(bin/"dasht-docsets") + end +end diff --git a/Formula/d/dasm.rb b/Formula/d/dasm.rb new file mode 100644 index 0000000000000..ae49576aee23a --- /dev/null +++ b/Formula/d/dasm.rb @@ -0,0 +1,45 @@ +class Dasm < Formula + desc "Macro assembler with support for several 8-bit microprocessors" + homepage "https://dasm-assembler.github.io/" + url "https://github.com/dasm-assembler/dasm/archive/refs/tags/2.20.14.1.tar.gz" + sha256 "ec71ffd10eeaa70bf7587ee0d79a92cd3f0a017c0d6d793e37d10359ceea663a" + license "GPL-2.0-or-later" + version_scheme 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f614d82306309db519d1ec6ab82849fa699b8a688a1d22ca8ae02342178697b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "018a5c5e7494685ffa0c9f40846072fff6ba4508efc1b07bd1d45235e02a4eff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d556e6302cb3fa636be29a938b48905d5685697dc0875a7f9e469ab4e1307f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58360e2858c11aa4bcfefad632932d52bdf5fa38bbe3914f555a9ec515ac7278" + sha256 cellar: :any_skip_relocation, arm64_monterey: "60b9a619d4394ab4079ce4f909549c604aabfd32f1a3ecd96b8e7c30c1cfb823" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "edc22129ec5a851546aa675a89dc4e6895eac68428914d806cfc03a4bb119eeb" + sha256 cellar: :any_skip_relocation, sonoma: "5f0b00c2325e27d6b47e040d6ccacacef637757f4d0d92dfce6303f133264f8e" + sha256 cellar: :any_skip_relocation, ventura: "4a267314f9ad2a37150c159fabbaea9620311f61c5b9ac60007e369d8709db9e" + sha256 cellar: :any_skip_relocation, monterey: "39de6472c8ffb52fbeaff1d112b4961b3d0912bbd1777f35db5f7fab46955fe7" + sha256 cellar: :any_skip_relocation, big_sur: "0de7ec1bbb50537c46364d86188b6ef07c2e6d6efeee6b013be29eab793290d3" + sha256 cellar: :any_skip_relocation, catalina: "354cf4953e70e7518fc7ee0b0861a0be21fa80770a60d18a2c0ea0d31deb979d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8448f39661a2328dc9579d23cdf837c9dd28ee9d449c446e58f0d8a19b4592b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "255217da42c9f1a4b35791323593c0107306e2090fcc69b471d5afb193de7355" + end + + def install + system "make" + prefix.install "bin", "docs", "machines" + end + + test do + path = testpath/"a.asm" + path.write <<~ASM + ; Instructions must be preceded by whitespace + processor 6502 + org $c000 + jmp $fce2 + ASM + + system bin/"dasm", path + code = (testpath/"a.out").binread.unpack("C*") + assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code + end +end diff --git a/Formula/d/datafusion.rb b/Formula/d/datafusion.rb new file mode 100644 index 0000000000000..0d05f6ca32c17 --- /dev/null +++ b/Formula/d/datafusion.rb @@ -0,0 +1,30 @@ +class Datafusion < Formula + desc "Apache Arrow DataFusion and Ballista query engines" + homepage "https://arrow.apache.org/datafusion" + url "https://github.com/apache/datafusion/archive/refs/tags/50.3.0.tar.gz" + sha256 "0dfef181973c89bc645497c141409102ab627ed7137e99b020d0c4efd6ed9c4b" + license "Apache-2.0" + head "https://github.com/apache/datafusion.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ff863741789a18995d581582708f784a449e5f264d439482e00345b2f1beefc5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4876d1442e1389ef07c8289737685a191df5b21758f20dd78403c638725b8c3f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "644c938cb324e08336183883225f02419960426152fee747717635bfa01bf2aa" + sha256 cellar: :any_skip_relocation, sonoma: "de4c71efe8d9e4283be8b3be210c99e41f1e6070c5998e9c5aca03f040aed6dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bc0f4394b2798117f502735d8eefb5fcaaa32c47004780a00ca5893b7ff21a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63f4fc2d4950f5247c1f7c459b0e124f7d7dddb754e6107282c300935ee71006" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "datafusion-cli") + end + + test do + (testpath/"datafusion_test.sql").write <<~SQL + select 1+2 as n; + SQL + assert_equal "[{\"n\":3}]", shell_output("#{bin}/datafusion-cli -q --format json -f datafusion_test.sql").strip + end +end diff --git a/Formula/d/datalad.rb b/Formula/d/datalad.rb new file mode 100644 index 0000000000000..253027f737a48 --- /dev/null +++ b/Formula/d/datalad.rb @@ -0,0 +1,209 @@ +class Datalad < Formula + include Language::Python::Virtualenv + + desc "Data distribution geared toward scientific datasets" + homepage "https://www.datalad.org" + url "https://files.pythonhosted.org/packages/e9/36/0fa094173c8676a9f1187179941ba619a016afb6cfa46c92171c8edb2edf/datalad-1.2.3.tar.gz" + sha256 "48f19d3e4fc7b2725240e6c47d6710f3bc46ad6b42455ff76dd3f6e34226f39f" + license "MIT" + head "https://github.com/datalad/datalad.git", branch: "maint" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e24d7e7dd58cecd80ab668ac21a21cafd594a140c3eb013cf82046b9137509a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "80666c4f9125ded64c4d1bc0f58424e7b94179165ff604d930c7e3a283f5397a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f97231caf8b645675d9173ccf891804633252f73c842532a37c7c8a37e3f617a" + sha256 cellar: :any_skip_relocation, sonoma: "82d23ff20db27e9f4ac0e5999354d241422271e369133c98601a7b72c8746c96" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c2196c510131a36022352394570e26f69276544f4b4ed32fe35966698e8ba86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a3d2aca82edb1c6262821a00ed9b0d430a17cd5bfc1d2c6a1ba5a92eaee4ffb" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "git-annex" + depends_on "p7zip" + depends_on "python@3.14" + + pypi_packages package_name: "datalad[misc]", + exclude_packages: ["certifi", "cryptography"], + extra_packages: ["jeepney", "secretstorage"] + + resource "annexremote" do + url "https://files.pythonhosted.org/packages/5f/04/d7a39a2ab1de54fd7bfbb26feb4487baa71be4e10f9c677ee5ee6fade89b/annexremote-1.6.6.tar.gz" + sha256 "5f78d0753c0763d95fc4c52050bd6212bb32457d32f6575dc66a83178e0283a7" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b4/69/2612a06d584786500ba7ea068927e95e24719da3b6734bd23c50788f5982/boto3-1.40.62.tar.gz" + sha256 "3dbe7e1e7dc9127a4b1f2020a14f38ffe64fad84df00623e8ab6a5d49a82ea28" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/50/d6/dc11fecf450c60175fd568791e2324e059e81bc4adac85d83f272ab293f5/botocore-1.40.62.tar.gz" + sha256 "1e8e57c131597dc234d67428bda1323e8f0a687ea13ea570253159ab9256fa28" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "fasteners" do + url "https://files.pythonhosted.org/packages/2d/18/7881a99ba5244bfc82f06017316ffe93217dbbbcfa52b887caa1d4f2a6d3/fasteners-0.20.tar.gz" + sha256 "55dce8792a41b56f727ba6e123fcaee77fd87e638a6863cec00007bfea84c8d8" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "keyrings-alt" do + url "https://files.pythonhosted.org/packages/5c/7b/e3bf53326e0753bee11813337b1391179582ba5c6851b13e0d9502d15a50/keyrings_alt-5.0.2.tar.gz" + sha256 "8f097ebe9dc8b185106502b8cdb066c926d2180e13b4689fd4771a3eab7d69fb" + end + + resource "looseversion" do + url "https://files.pythonhosted.org/packages/64/7e/f13dc08e0712cc2eac8e56c7909ce2ac280dbffef2ffd87bd5277ce9d58b/looseversion-1.3.0.tar.gz" + sha256 "ebde65f3f6bb9531a81016c6fef3eb95a61181adc47b7f949e9c0ea47911669e" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "patool" do + url "https://files.pythonhosted.org/packages/26/3e/9537c0921cddfb84f786ad6808d7b9edcee1cf606a53d0d7272fb27487d5/patool-4.0.2.tar.gz" + sha256 "e7f62d222f4a8a6c48dbfb38056dc7f9e5778ccc07c1f16d9653a316812f83ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-gitlab" do + url "https://files.pythonhosted.org/packages/5e/c4/0b613303b4f0fcda69b3d2e03d0a1fb1b6b079a7c7832e03a8d92461e9fe/python_gitlab-7.0.0.tar.gz" + sha256 "e4d934430f64efc09e6208b782c61cc0a3389527765e03ffbef17f4323dce441" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "datalad", "--shell") + end + + test do + system bin/"datalad", "create", "-d", "testdata" + assert_path_exists testpath/"testdata" + end +end diff --git a/Formula/d/datamash.rb b/Formula/d/datamash.rb new file mode 100644 index 0000000000000..2e644fc2a7fe7 --- /dev/null +++ b/Formula/d/datamash.rb @@ -0,0 +1,36 @@ +class Datamash < Formula + desc "Tool to perform numerical, textual & statistical operations" + homepage "https://www.gnu.org/software/datamash/" + url "https://ftpmirror.gnu.org/gnu/datamash/datamash-1.9.tar.gz" + mirror "https://ftp.gnu.org/gnu/datamash/datamash-1.9.tar.gz" + sha256 "f382ebda03650dd679161f758f9c0a6cc9293213438d4a77a8eda325aacb87d2" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "024c8e8b9117739fa27275f1dcf4a683282b2e255041fd532097da1c49abe802" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8cf2d4dc46574a42e8602a933b68fedf07cf904e14fc08f945d615df872ae42" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d6e596a1a0d53bcc0f2e44085d0e64ef58fc9938e053674655043ee5e1bf328" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1e3e7fd79737698b216342e9907bad5c7d15663c49fd00c8c4a7a7f8247c7f3a" + sha256 cellar: :any_skip_relocation, sonoma: "9d5449a221d1ace4e0fff4dd2667c6252607d2485354cd5c6e51fbfe36edeaa4" + sha256 cellar: :any_skip_relocation, ventura: "55bac91ad338c873452f9b72c1a931f576cdb7868a71d67a959dc43e45150cac" + sha256 arm64_linux: "0637020b7f156bd493ce38b8f948ef5f200511d7aeba5496f8f7ec598d29d756" + sha256 x86_64_linux: "ed1618d4b6571bddde83d2d6a00f5f730a0448355e75e1ecc9d44cf00759b509" + end + + head do + url "https://git.savannah.gnu.org/git/datamash.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + end + + def install + system "./bootstrap" if build.head? + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + assert_equal "55", pipe_output("#{bin}/datamash sum 1", shell_output("seq 10")).chomp + end +end diff --git a/Formula/d/datasette.rb b/Formula/d/datasette.rb new file mode 100644 index 0000000000000..ba6f5ffbc7616 --- /dev/null +++ b/Formula/d/datasette.rb @@ -0,0 +1,177 @@ +class Datasette < Formula + include Language::Python::Virtualenv + + desc "Open source multi-tool for exploring and publishing data" + homepage "https://docs.datasette.io/en/stable/" + url "https://files.pythonhosted.org/packages/db/94/e6408997861e9de3ec61fb8107efe9eaf70f765ad2cd4e20b552dd340899/datasette-0.65.1.tar.gz" + sha256 "d8be37ae6dafbfd8e510d49c0dc0fc6696081614d048a507eed86dd2ae433223" + license "Apache-2.0" + revision 3 + head "https://github.com/simonw/datasette.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "349932b16385c2189a3df1789afda893f3e59da5e98d2868bf7986e359e8da9b" + sha256 cellar: :any, arm64_sequoia: "3fce6466ed62ccbc392a11889c1542b56d8038b5047d08d8e66d092c307fca33" + sha256 cellar: :any, arm64_sonoma: "b684528b70648d7c731ef6c1c77bcb46a0da7766a5d574da83861909ecb78b86" + sha256 cellar: :any, sonoma: "4da3a5da516a61d8c822a96e5da938cb23df434b32e8e26321cd4ebdefd2fdf8" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5ad89d6be6428a2657051951724985bfbb337fa343f406aeb00d11f6d153c99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a1f66a4b4decc0ff4cd005f18bfec0ee0cfcb90f209c0664fc0c15f679b4606" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz" + sha256 "a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "asgi-csrf" do + url "https://files.pythonhosted.org/packages/0a/59/2b54a274b9c9cbe1c0edbe5d324925ffd88a31567fb50dc2138e0160bdef/asgi_csrf-0.11.tar.gz" + sha256 "e19a4f87d5af3feabde04c57921ee15510c3bfb0565627df9cb20bcb303282c2" + end + + resource "asgiref" do + url "https://files.pythonhosted.org/packages/46/08/4dfec9b90758a59acc6be32ac82e98d1fbfc321cb5cfa410436dbacf821c/asgiref-3.10.0.tar.gz" + sha256 "d89f2d8cd8b56dada7d52fa7dc8075baa08fb836560710d38c292a7a3f78c04e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "flexcache" do + url "https://files.pythonhosted.org/packages/55/b0/8a21e330561c65653d010ef112bf38f60890051d244ede197ddaa08e50c1/flexcache-0.3.tar.gz" + sha256 "18743bd5a0621bfe2cf8d519e4c3bfdf57a269c15d1ced3fb4b64e0ff4600656" + end + + resource "flexparser" do + url "https://files.pythonhosted.org/packages/82/99/b4de7e39e8eaf8207ba1a8fa2241dd98b2ba72ae6e16960d8351736d8702/flexparser-0.4.tar.gz" + sha256 "266d98905595be2ccc5da964fe0a2c3526fbbffdc45b65b3146d75db992ef6b2" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "hupper" do + url "https://files.pythonhosted.org/packages/bd/e6/bb064537288eee2be97f3e0fcad8e7242bc5bbe9664ae57c7d29b3fa18c2/hupper-1.12.1.tar.gz" + sha256 "06bf54170ff4ecf4c84ad5f188dee3901173ab449c2608ad05b9bfd6b13e32eb" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "janus" do + url "https://files.pythonhosted.org/packages/d8/7f/69884b6618be4baf6ebcacc716ee8680a842428a19f403db6d1c0bb990aa/janus-2.0.0.tar.gz" + sha256 "0970f38e0e725400496c834a368a67ee551dc3b5ad0a257e132f5b46f2e77770" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mergedeep" do + url "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz" + sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + # Fix to replace deprecated asyncio methods and SyntaxWarning, remove in next release + # Commit ref + # - https://github.com/simonw/datasette/commit/852f5014853943fa27f43ddaa2d442545b3259fb + # - https://github.com/simonw/datasette/commit/909448fb7a0c940a822477d5a25a6525c2060b68 + patch do + url "https://raw.githubusercontent.com/Homebrew/Homebrew-core/f33ebd86/Patches/datasette/support-python3.14.patch" + sha256 "1e031573c391fd10baef7e8e8858939b5e9086bba798e9ad9acfe2e41bd25cad" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"datasette", shell_parameter_format: :click) + end + + test do + assert_match "15", shell_output("#{bin}/datasette --get '/_memory.json?sql=select+3*5'") + assert_match "Datasette:", shell_output("#{bin}/datasette --get '/'") + end +end diff --git a/Formula/d/datatype99.rb b/Formula/d/datatype99.rb new file mode 100644 index 0000000000000..646cea24d1834 --- /dev/null +++ b/Formula/d/datatype99.rb @@ -0,0 +1,52 @@ +class Datatype99 < Formula + desc "Algebraic data types for C99" + homepage "https://github.com/Hirrolot/datatype99" + url "https://github.com/Hirrolot/datatype99/archive/refs/tags/v1.6.5.tar.gz" + sha256 "f38c077afdb91b7d754321be5d3c4a43ed5420c1ad51514d1de20023960f9a8e" + license "MIT" + head "https://github.com/Hirrolot/datatype99.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "de27c538560d8993175a1c972437f30e9de4d719154b3a4851f154610cb577b1" + end + + depends_on "metalang99" + + def install + include.install "datatype99.h" + end + + test do + (testpath/"test.c").write <<~C + #include <datatype99.h> + #include <stdio.h> + + datatype( + BinaryTree, + (Leaf, int), + (Node, BinaryTree *, int, BinaryTree *) + ); + + int sum(const BinaryTree *tree) { + match(*tree) { + of(Leaf, x) return *x; + of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs); + } + + return -1; + } + + #define TREE(tree) ((BinaryTree *)(BinaryTree[]){tree}) + #define NODE(left, number, right) TREE(Node(left, number, right)) + #define LEAF(number) TREE(Leaf(number)) + + int main(void) { + const BinaryTree *tree = NODE(NODE(LEAF(1), 2, NODE(LEAF(3), 4, LEAF(5))), 6, LEAF(7)); + printf("%d", sum(tree)); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-I#{Formula["metalang99"].opt_include}", "-o", "test" + assert_equal "28", shell_output("./test") + end +end diff --git a/Formula/d/datetime-fortran.rb b/Formula/d/datetime-fortran.rb new file mode 100644 index 0000000000000..8ab46ae11d09b --- /dev/null +++ b/Formula/d/datetime-fortran.rb @@ -0,0 +1,48 @@ +class DatetimeFortran < Formula + desc "Fortran time and date manipulation library" + homepage "https://github.com/wavebitscientific/datetime-fortran" + url "https://github.com/wavebitscientific/datetime-fortran/releases/download/v1.7.0/datetime-fortran-1.7.0.tar.gz" + sha256 "cff4c1f53af87a9f8f31256a3e04176f887cc3e947a4540481ade4139baf0d6f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "695983e52548982491c67fd9f018cf42e9d1a5b0de590d932a6af1dabbf51317" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f396ad5136d8087e6de3dfdbf70616503a1b929fae3bf4cca376bc88d3eea23" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a58282caee75e7ce6eab6efde945c00d6a025c34bb0c835462592e229d51924d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bcc7d71f13bb6e54b53bafe5755a5c44d8bf9af567347420206d32fadf2a08c2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "17b99bbbc87ea9bdc282aa0138a56d91922e19de55208ecb8110d2f5cb32d488" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a94f87cd83073ecb65477288b6e0cd0e4a82002f4625b2dd27fad436b2b8673" + sha256 cellar: :any_skip_relocation, sonoma: "3d987d5e46bf84112aa565f409f0750523bfbaf7b46f2e6946fdb41c7a4840d2" + sha256 cellar: :any_skip_relocation, ventura: "f12bb3de09be467e5be1c6934110f5c5f9952bd9822c754995bae144610968d9" + sha256 cellar: :any_skip_relocation, monterey: "0307d4a29c988223ddd6fcfa2049fa86774bf68da91d6925492a19fe47aaec54" + sha256 cellar: :any_skip_relocation, big_sur: "a90fa3af5145c4f7f2a922071ea5edf3c8f2abeef78da13b85bcda8523239693" + sha256 cellar: :any_skip_relocation, arm64_linux: "c69feef25cb84ecf1e957bab83ebab3d802320c59b890a90a1b60778603c57a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5d30fcf0a1ad22b28261d2f0e848e02c4ac9705cb559c5a19ffa9e2db8c3356" + end + + head do + url "https://github.com/wavebitscientific/datetime-fortran.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + end + + depends_on "gcc" # for gfortran + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + (pkgshare/"test").install "tests/datetime_tests.f90" + end + + test do + system "gfortran", "-I#{include}", pkgshare/"test/datetime_tests.f90", + "-L#{lib}", "-ldatetime", "-o", "test" + system "./test" + end +end diff --git a/Formula/d/dateutils.rb b/Formula/d/dateutils.rb new file mode 100644 index 0000000000000..fe14945287878 --- /dev/null +++ b/Formula/d/dateutils.rb @@ -0,0 +1,40 @@ +class Dateutils < Formula + desc "Tools to manipulate dates with a focus on financial data" + homepage "https://www.fresse.org/dateutils/" + url "https://github.com/hroptatyr/dateutils/releases/download/v0.4.11/dateutils-0.4.11.tar.xz" + sha256 "b8fea0b09714bbadf202b9b3434cce6b59c282e7869268d0c08b85880fdbb446" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "90799580c0526cfb486b63cfe21575a026d74bd84bb056f7a8a711375adbc8f5" + sha256 arm64_sequoia: "bbfe40e57ba5e294c140bde89dd3d4de4bc40d2c00a791a4a644c0f41b95327e" + sha256 arm64_sonoma: "c75426bef62674c457efcf5fcdd60503ea93af78ab5f6de87482368f7242027a" + sha256 arm64_ventura: "bba65693686a7f03b0955fa474f749452689f33c12c6ce824d107c7af109b1d5" + sha256 arm64_monterey: "e486bf17d2170960a1759478948e5512e0b1ae7a56f7050900d51689d461bc1b" + sha256 sonoma: "9942401d4ccb1dfccbefab2d8f07d1bb6c087eef8fe499fa2878e736f4783f51" + sha256 ventura: "4a175bd0dd49c33c55b6b70f90e5f52541a3af70f6e289247f919e882f191b66" + sha256 monterey: "96425fd7ec4be82236ab3dc31532b1a15dcde6fea5ba84b23a1ddb8e98f2c659" + sha256 arm64_linux: "f3e8c09d527d268d8b5155c4c7f2fcb918b85370a3c0fc5a6b4cba84dfb614b1" + sha256 x86_64_linux: "9660d3c687240196d8b0f0bd9b33a085f5af1e09dc1452fbc25e712a3735637a" + end + + head do + url "https://github.com/hroptatyr/dateutils.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/dconv 2012-03-04 -f \"%Y-%m-%c-%w\"").strip + assert_equal "2012-03-01-07", output + end +end diff --git a/Formula/d/datree.rb b/Formula/d/datree.rb new file mode 100644 index 0000000000000..ab11c1096e7ab --- /dev/null +++ b/Formula/d/datree.rb @@ -0,0 +1,58 @@ +class Datree < Formula + desc "CLI tool to run policies against Kubernetes manifests YAML files or Helm charts" + homepage "https://datree.io/" + url "https://github.com/datreeio/datree/archive/refs/tags/1.9.19.tar.gz" + sha256 "a8b6bf3d3cf0e325590ba3901db6a00e1a268f4a0652f9892af3c7c98efe196b" + license "Apache-2.0" + head "https://github.com/datreeio/datree.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "035d6e28e854bc8d9eed9dca0248383b78e2630f639777546ca5eee4689cfb41" + sha256 cellar: :any_skip_relocation, arm64_ventura: "275cf0f3c28393d717867f2d22a04bf626d1b819bec4e49e90e8f93ebf32da9e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "313779ac5a9953737346a6b4ffd0f33b1992a406bf065f92db9cb3658e64de77" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9abf7cc92fcbd039333ff189b6ddd620b3be7cabd7078c60e254c0667fee21a1" + sha256 cellar: :any_skip_relocation, ventura: "e8dbc00a2dc36b8e3aef0802b5cdb7ff93a28de799ce708f64a9ad1a1f1db254" + sha256 cellar: :any_skip_relocation, monterey: "299cb372940354ddb7b9849ba09e6bf777c541f703d1d4a892452bbb58f56f47" + sha256 cellar: :any_skip_relocation, big_sur: "7ceb9370ceecf72744d60f1705df1bf65514f5a17ee3eed4b582587c66a3e10f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a786ae16a4d3a8ae959cdc9f6571df8e528822389f852c5ddaacb9c27995492" + end + + # project is deprecated per https://github.com/datreeio/datree/pull/964 + disable! date: "2024-12-22", because: :unmaintained + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/datreeio/datree/cmd.CliVersion=#{version} + ] + system "go", "build", *std_go_args(ldflags:, tags: "main") + + generate_completions_from_executable(bin/"datree", "completion") + end + + test do + (testpath/"invalidK8sSchema.yaml").write <<~YAML + apiversion: v1 + kind: Service + metadata: + name: my-service + spec: + selector: + app: MyApp + ports: + - protocol: TCP + port: 80 + targetPort: 9376 + YAML + + # Set to work in the offline mode + system bin/"datree", "config", "set", "offline", "local" + + assert_match "k8s schema validation error: For field (root): Additional property apiversion is not allowed", + shell_output("#{bin}/datree test #{testpath}/invalidK8sSchema.yaml --no-record 2>&1", 2) + + assert_match "#{version}\n", shell_output("#{bin}/datree version") + end +end diff --git a/Formula/d/dav1d.rb b/Formula/d/dav1d.rb new file mode 100644 index 0000000000000..e581d76feb3ea --- /dev/null +++ b/Formula/d/dav1d.rb @@ -0,0 +1,42 @@ +class Dav1d < Formula + desc "AV1 decoder targeted to be small and fast" + homepage "https://code.videolan.org/videolan/dav1d" + url "https://code.videolan.org/videolan/dav1d/-/archive/1.5.2/dav1d-1.5.2.tar.bz2" + sha256 "c748a3214cf02a6d23bc179a0e8caea9d6ece1e46314ef21f5508ca6b5de6262" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "51d9f8e8087862533fde9901158fb784bed69ecdd74b4aea75879ec068a7fa94" + sha256 cellar: :any, arm64_sequoia: "606c3c39ebbc55f12524f3688148441fc1c699f2e0f15afad248eed30b95c73b" + sha256 cellar: :any, arm64_sonoma: "04256162edd9c60143369b2e12434ab380818a1f4fc5ad6aeb9c1d9699567b4a" + sha256 cellar: :any, sonoma: "186f73868478cc6a624c80ef01b0d65f3526b606f4f63e0ef1b6a7f93894b2a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2f4a237c9208f3666398ccec5288d71a5c7bc3e18b9f5b273cf5c520771c2c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a234b082021158b85cc97bd0587acf1bd3b4e2712fcc31c66c21364bb426a4be" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + on_intel do + depends_on "nasm" => :build + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + resource "homebrew-00000000.ivf" do + url "https://code.videolan.org/videolan/dav1d-test-data/raw/1.1.0/8-bit/data/00000000.ivf" + sha256 "52b4351f9bc8a876c8f3c9afc403d9e90f319c1882bfe44667d41c8c6f5486f3" + end + + testpath.install resource("homebrew-00000000.ivf") + system bin/"dav1d", "-i", testpath/"00000000.ivf", "-o", testpath/"00000000.md5" + + assert_path_exists (testpath/"00000000.md5") + assert_match "0b31f7ae90dfa22cefe0f2a1ad97c620", (testpath/"00000000.md5").read + end +end diff --git a/Formula/d/davix.rb b/Formula/d/davix.rb new file mode 100644 index 0000000000000..3096fa6f2474e --- /dev/null +++ b/Formula/d/davix.rb @@ -0,0 +1,54 @@ +class Davix < Formula + desc "Library and tools for advanced file I/O with HTTP-based protocols" + homepage "https://github.com/cern-fts/davix" + url "https://github.com/cern-fts/davix/releases/download/R_0_8_10/davix-0.8.10.tar.gz" + sha256 "66aa9adadee6ff2bae14caba731597ba7a7cd158763d9d80a9cfe395afc17403" + license "LGPL-2.1-or-later" + head "https://github.com/cern-fts/davix.git", branch: "devel" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7ffd6da2f53277824faae653bafa6c3c62a9ff515ccf15436bc564b4745b3175" + sha256 cellar: :any, arm64_sequoia: "da21e84d94a79ee04801da53369791a3150a7b2d258f0157b2d93340d24652d6" + sha256 cellar: :any, arm64_sonoma: "05c4246253f683448f3ede09b02520e196a33b4e69a312cbdc9f10b526adbfa2" + sha256 cellar: :any, arm64_ventura: "32f192b3827668aff416b3ab09450becae5e481f2fb40594b91b863b2da567d6" + sha256 cellar: :any, sonoma: "f83caf6a8ef4a3b2a82e5d45eeedbc3ff89a8e2c9d7abfed2995424974d386ab" + sha256 cellar: :any, ventura: "5e2607d54a8b793c3d657acd19018c224cca7fc327e25b2ea938019694d41c40" + sha256 cellar: :any_skip_relocation, arm64_linux: "57869e453d9e1b81e021f7fc6f1d0584edafd15ebe40721857b86c1fad964eaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e988353573b61da496468299b761a23199d418796f39d1a19e0c37b870be6883" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "openssl@3" + + uses_from_macos "python" => :build + uses_from_macos "curl", since: :monterey # needs CURLE_AUTH_ERROR, available since curl 7.66.0 + uses_from_macos "libxml2" + + on_linux do + depends_on "util-linux" + end + + def install + # Remove `-DCMAKE_POLICY_VERSION_MINIMUM=3.5` once fixed upstream + # Issue ref: https://github.com/cern-fts/davix/issues/139 + args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DCMAKE_INSTALL_RPATH=#{rpath} + -DLIB_SUFFIX= + -DBENCH_TESTS=FALSE + -DDAVIX_TESTS=FALSE + -DEMBEDDED_LIBCURL=FALSE + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"davix-get", "https://brew.sh" + end +end diff --git a/Formula/d/davmail.rb b/Formula/d/davmail.rb new file mode 100644 index 0000000000000..e8515b2fd05e1 --- /dev/null +++ b/Formula/d/davmail.rb @@ -0,0 +1,70 @@ +class Davmail < Formula + desc "POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway" + homepage "https://davmail.sourceforge.net/" + url "https://downloads.sourceforge.net/project/davmail/davmail/6.5.1/davmail-6.5.1-3873.zip" + version "6.5.1" + sha256 "dcd9b9643b8c2e5657284f6765df2f22eb0dd1c323764915e1fc24e116604792" + license "GPL-2.0-or-later" + + livecheck do + url "https://sourceforge.net/projects/davmail/rss?path=/davmail" + regex(%r{url=.*?/davmail[._-]v?(\d+(?:\.\d+)+)(?:-\d+)?\.(?:t|zip)}i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, all: "432242b2d490bc649d6e15a485613330c3e4734cfe876f9bcf37de05adf68fcb" + end + + depends_on "openjdk" + + uses_from_macos "netcat" => :test + + def install + libexec.install Dir["*"] + bin.write_jar_script libexec/"davmail.jar", "davmail", "-Djava.awt.headless=true" + end + + service do + run opt_bin/"davmail" + run_type :interval + interval 300 + keep_alive false + environment_variables PATH: std_service_path_env + log_path File::NULL + error_log_path File::NULL + end + + test do + caldav_port = free_port + imap_port = free_port + ldap_port = free_port + pop_port = free_port + smtp_port = free_port + + (testpath/"davmail.properties").write <<~EOS + davmail.server=true + davmail.mode=auto + davmail.url=https://example.com + + davmail.caldavPort=#{caldav_port} + davmail.imapPort=#{imap_port} + davmail.ldapPort=#{ldap_port} + davmail.popPort=#{pop_port} + davmail.smtpPort=#{smtp_port} + EOS + + fork do + exec bin/"davmail", testpath/"davmail.properties" + end + + sleep 10 + + system "nc", "-z", "localhost", caldav_port + system "nc", "-z", "localhost", imap_port + system "nc", "-z", "localhost", ldap_port + system "nc", "-z", "localhost", pop_port + system "nc", "-z", "localhost", smtp_port + end +end diff --git a/Formula/d/db-vcs.rb b/Formula/d/db-vcs.rb new file mode 100644 index 0000000000000..b8dc7427ce62f --- /dev/null +++ b/Formula/d/db-vcs.rb @@ -0,0 +1,25 @@ +class DbVcs < Formula + desc "Version control for MySQL databases" + homepage "https://github.com/infostreams/db" + url "https://github.com/infostreams/db/archive/refs/tags/1.1.tar.gz" + sha256 "90f07c13c388896ba02032544820f8ff3a23e6f9dc1e320a1a653dd77e032ee7" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "babb3e6342f742d8b4ffa1773605d2c946d01c67829bcaaaa71b701781d99ddf" + end + + def install + libexec.install "db" + libexec.install "bin/" + bin.install_symlink libexec/"db" + end + + test do + output = shell_output("#{bin}/db server add localhost", 2) + assert_match "fatal: Not a db repository", output + end +end diff --git a/Formula/d/dbacl.rb b/Formula/d/dbacl.rb new file mode 100644 index 0000000000000..a2ba7cef8cb1c --- /dev/null +++ b/Formula/d/dbacl.rb @@ -0,0 +1,73 @@ +class Dbacl < Formula + desc "Digramic Bayesian classifier" + homepage "https://dbacl.sourceforge.net/" + url "https://downloads.sourceforge.net/project/dbacl/dbacl/1.14.1/dbacl-1.14.1.tar.gz" + sha256 "ff0dfb67682e863b1c3250acc441ce77c033b9b21d8e8793e55b622e42005abd" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "71b6ff99f31ad16b0e638be6e6c0470c61ccc8b9d51bfcabbe46ea7444976a77" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9caea8b960e8ffc974ad321a472a70e46f5cb401dacfbef096309743c49e2c9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "239b148299a11f7847b2ee32de7d24cd4cdc2f4f0dfbb36c61b57a18a6332142" + sha256 cellar: :any_skip_relocation, arm64_ventura: "09a812fe378bbee0cfaeb31af232529e2e682379077a6435fcd2acb268047825" + sha256 cellar: :any_skip_relocation, arm64_monterey: "66ed22f1faf6f76848af60768dc3cd915f92859fb4c527657e06768d0499e443" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "267668662863b785760b49c085001924efb548d2a01e9be3a14e330233a58943" + sha256 cellar: :any_skip_relocation, sonoma: "5c7721036d54906209c3ad37dc14fc001dd0646240e9fbce53298cc7495202ed" + sha256 cellar: :any_skip_relocation, ventura: "016b9c97da07866abe32a76f55a0e8e28744cb34aa5a71eae7e3b2033f8a71d7" + sha256 cellar: :any_skip_relocation, monterey: "70c98f90cec395f2366d669999f11334f95c8e97657f9845307c3bc37d67278a" + sha256 cellar: :any_skip_relocation, big_sur: "643c9891b075b1f8a766269cc1a9f5ec6b541e23055124f7cb2d289650bf08d0" + sha256 cellar: :any_skip_relocation, catalina: "d81fd1fc86703610737cfd9d24f8c3c8db2e97ef4148f1f7f91a43c81c8762c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e4f747f411c297f6c0eedf5f0da68f7c48df9190beba950accc13837ef5a912" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27ddb0fca1dfb2cc615befe472927ff657b689dad255e26913ce118f7d83dfcb" + end + + def install + args = [] + if OS.linux? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + # Work around error: unknown type name 'locale_t' + ENV.append "CFLAGS", "-std=gnu99" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"mark-twain.txt").write <<~EOS + The report of my death was an exaggeration. + The secret of getting ahead is getting started. + Travel is fatal to prejudice, bigotry, and narrow-mindedness. + I have never let my schooling interfere with my education. + Whenever you find yourself on the side of the majority, it is time to pause and reflect. + Kindness is the language which the deaf can hear and the blind can see. + The two most important days in your life are the day you are born and the day you find out why. + Truth is stranger than fiction, but it is because Fiction is obliged to stick to possibilities; Truth isn't. + If you tell the truth, you don't have to remember anything. + It's not the size of the dog in the fight, it's the size of the fight in the dog. + EOS + + (testpath/"william-shakespeare.txt").write <<~EOS + Hell is empty and all the devils are here. + All that glitters is not gold + To thine own self be true, and it must follow, as the night the day, thou canst not then be false to any man. + Love all, trust a few, do wrong to none. + To be, or not to be, that is the question + Be not afraid of greatness: some are born great, some achieve greatness, and some have greatness thrust upon them. + The lady doth protest too much, methinks. + So full of artless jealousy is guilt, It spills itself in fearing to be spilt. + If music be the food of love, play on. + There is nothing either good or bad, but thinking makes it so. + The course of true love never did run smooth. + EOS + + system bin/"dbacl", "-l", "twain", "mark-twain.txt" + system bin/"dbacl", "-l", "shake", "william-shakespeare.txt" + + output = pipe_output("#{bin}/dbacl -v -c twain -c shake", "to be or not to be") + assert_equal "shake", output.strip + end +end diff --git a/Formula/d/dbg-macro.rb b/Formula/d/dbg-macro.rb new file mode 100644 index 0000000000000..435cd0d4b480c --- /dev/null +++ b/Formula/d/dbg-macro.rb @@ -0,0 +1,38 @@ +class DbgMacro < Formula + desc "Dbg(…) macro for C++" + homepage "https://github.com/sharkdp/dbg-macro" + url "https://github.com/sharkdp/dbg-macro/archive/refs/tags/v0.5.1.tar.gz" + sha256 "fffea75f067c69995853dc790626887788e2c4c9eb0a5a0014a4501d2b6b9909" + license "MIT" + head "https://github.com/sharkdp/dbg-macro.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "45a4f08e47ff977a2979b29715ffe68e0dc3654a33697bcbaf53bae69b6846e5" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCATCH_BUILD_TESTING=OFF + -DDBG_MACRO_ENABLE_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include <dbg.h> + int main() { + dbg(42, "hello world", false); + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-o", "test" + system "./test" + end +end diff --git a/Formula/d/dbhash.rb b/Formula/d/dbhash.rb new file mode 100644 index 0000000000000..c90766e228cf5 --- /dev/null +++ b/Formula/d/dbhash.rb @@ -0,0 +1,45 @@ +class Dbhash < Formula + desc "Computes the SHA1 hash of schema and content of a SQLite database" + homepage "https://www.sqlite.org/dbhash.html" + url "https://www.sqlite.org/2025/sqlite-src-3500400.zip" + version "3.50.4" + sha256 "b7b4dc060f36053902fb65b344bbbed592e64b2291a26ac06fe77eec097850e9" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "8cd5c857d5b3c7b1b4729da7fb1a31d7495d7b9510946ea817d94d86811acc1a" + sha256 cellar: :any, arm64_sequoia: "03ec5a59f4028205cfb489469eb1ea3f809b188e8ea33893c23223c4c2c27fc3" + sha256 cellar: :any, arm64_sonoma: "67033dfb28cd954f57f06c5d805e4fd2ceb0e1c2845e5412650a90da5b475033" + sha256 cellar: :any, arm64_ventura: "ecf3c1db5545e7834176ffbadebd6765a5bfbac6e945d241be4cbabd83f931e5" + sha256 cellar: :any, tahoe: "a15856ff4813915838b8c78f4a2b83fba138c5f7a87a8b08c72571e6b625dcf4" + sha256 cellar: :any, sequoia: "15c3d7c8ac7609eabf238953fe218796dd6840c6b56aac07edf829dd09640ff1" + sha256 cellar: :any, sonoma: "084b6b0ea8b6fe7befb8f1f106103c3652eaa7acaf2059e661f89706823c5f8f" + sha256 cellar: :any, ventura: "3692e62a8afd45243951f3ab2be729521efd7453e2c6728938f4978984f25e9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8aab1565a476ee250ddd7d075ff7582c22e65c21f3a125d3f52d1f587c963f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4df125f697bf1d1aade0a1c4d90f44cebdc610a383c8dc470f290a465cd47144" + end + + uses_from_macos "tcl-tk" => :build + uses_from_macos "sqlite" => :test + + def install + system "./configure", "--disable-debug", "--prefix=#{prefix}" + system "make", "dbhash" + bin.install "dbhash" + end + + test do + dbpath = testpath/"test.sqlite" + sqlpath = testpath/"test.sql" + sqlpath.write "create table test (name text);" + system "sqlite3 #{dbpath} < #{sqlpath}" + assert_equal "b6113e0ce62c5f5ca5c9f229393345ce812b7309", + shell_output("#{bin}/dbhash #{dbpath}").strip.split.first + end +end diff --git a/Formula/d/dblab.rb b/Formula/d/dblab.rb new file mode 100644 index 0000000000000..86fecedcc6138 --- /dev/null +++ b/Formula/d/dblab.rb @@ -0,0 +1,32 @@ +class Dblab < Formula + desc "Database client every command-line junkie deserves" + homepage "https://dblab.app/" + url "https://github.com/danvergara/dblab/archive/refs/tags/v0.34.2.tar.gz" + sha256 "fdcf88a1b4bbfea0d401a8ed13b930408e6fd85bde341565cb7a7a649a274d94" + license "MIT" + head "https://github.com/danvergara/dblab.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be097cf2cf94dbb10382dc368996a9c95b32865554f1e9a7acc23fa3c9d17e26" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a2e16b662a989bb2d732a07266615f44dfbcb2c3fe3eaf1b32e1f87b1ef82bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9dd0afebfc7e381b9768647680bd8ef9f7e7ff7a5fb4045ae7c37ae0e1f73897" + sha256 cellar: :any_skip_relocation, sonoma: "8378b8e347bddbd141046e1730fa6aeb328e38a0a57d080aaeb7e38c4ba72cd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "90871ef01ab6711087c15e2492a0c22621887c808ad8e88daab39d34556fdf2b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52c4d6943a392e8b2f56ebc43419b71f5fda6390d4cb824fda9fd2b5cf015216" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + + generate_completions_from_executable(bin/"dblab", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dblab --version") + + output = shell_output("#{bin}/dblab --url mysql://user:password@tcp\\(localhost:3306\\)/db 2>&1", 1) + assert_match "connect: connection refused", output + end +end diff --git a/Formula/d/dbmate.rb b/Formula/d/dbmate.rb new file mode 100644 index 0000000000000..28b1a33520c37 --- /dev/null +++ b/Formula/d/dbmate.rb @@ -0,0 +1,36 @@ +class Dbmate < Formula + desc "Lightweight, framework-agnostic database migration tool" + homepage "https://github.com/amacneil/dbmate" + url "https://github.com/amacneil/dbmate/archive/refs/tags/v2.28.0.tar.gz" + sha256 "129cb7f978e4316d6d02d2038eb346a94e1f988bcfb30a83aa99c6685c71d359" + license "MIT" + head "https://github.com/amacneil/dbmate.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "94d782af69a13dbcc25556ac48a5d2ea24f39bc8f97a2597ac5e47adef8f962f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c3fd4526ae0a3f19647d02d26344a6e0d51eedc58072ddf28362d1cb0799fc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b8c469c5164e9778c6fcae14ac12da99375b8164cd76131d2e44ceabc69ae74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25879f4d7bc0b90053f582e98665facca06e8bb5230326ba1c8c91be83660409" + sha256 cellar: :any_skip_relocation, sonoma: "17a7a0033fdf4715bd0f7dcec07f8615c8e96ec1e5adeb31715c1966ccd35100" + sha256 cellar: :any_skip_relocation, ventura: "9a183cc4e1a8a57584a405b83de7176fb2f4223ff49764f0b058fa54a8b49fd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef7b2a9b29cee7d6155613d801c09ab0842f610bbc845b35dc06f32a27197c8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ae1180123b5339d27719e6d0700f05830f4e3fd29c001bdedca1ff2e107f14f" + end + + depends_on "go" => :build + + def install + tags = %w[ + sqlite_omit_load_extension sqlite_json sqlite_fts5 + ] + system "go", "build", *std_go_args(ldflags: "-s -w", tags:) + end + + test do + (testpath/".env").write("DATABASE_URL=sqlite3:test.sqlite3") + system bin/"dbmate", "create" + assert_path_exists testpath/"test.sqlite3", "failed to create test.sqlite3" + end +end diff --git a/Formula/d/dbml-cli.rb b/Formula/d/dbml-cli.rb new file mode 100644 index 0000000000000..0a0cb1110660f --- /dev/null +++ b/Formula/d/dbml-cli.rb @@ -0,0 +1,42 @@ +class DbmlCli < Formula + desc "Convert DBML file to SQL and vice versa" + homepage "https://www.dbml.org/cli/" + url "https://registry.npmjs.org/@dbml/cli/-/cli-5.1.0.tgz" + sha256 "f8a6031d8f66ac08c4b0937e592e50100d16a4cdfaad7e883c3f15f144dca7ad" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c6c867ef377c6591fd1f0da8a8bfede2f64cc7beaa79ce8f098527c3472f288d" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + sql_file = testpath/"test.sql" + sql_file.write <<~SQL + CREATE TABLE "staff" ( + "id" INT PRIMARY KEY, + "name" VARCHAR, + "age" INT, + "email" VARCHAR + ); + SQL + + expected_dbml = <<~SQL + Table "staff" { + "id" INT [pk] + "name" VARCHAR + "age" INT + "email" VARCHAR + } + SQL + + assert_match version.to_s, shell_output("#{bin}/dbml2sql --version") + assert_equal expected_dbml, shell_output("#{bin}/sql2dbml #{sql_file}").chomp + end +end diff --git a/Formula/d/dbus-glib.rb b/Formula/d/dbus-glib.rb new file mode 100644 index 0000000000000..c5c1e45181433 --- /dev/null +++ b/Formula/d/dbus-glib.rb @@ -0,0 +1,45 @@ +class DbusGlib < Formula + desc "GLib bindings for the D-Bus message bus system" + homepage "https://wiki.freedesktop.org/www/Software/DBusBindings/" + url "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.114.tar.gz" + sha256 "c09c5c085b2a0e391b8ee7d783a1d63fe444e96717cc1814d61b5e8fc2827a7c" + license all_of: [ + "GPL-2.0-or-later", # dbus/dbus-bash-completion-helper.c + any_of: ["AFL-2.1", "GPL-2.0-or-later"], + ] + + livecheck do + url "https://dbus.freedesktop.org/releases/dbus-glib/" + regex(/href=.*?dbus-glib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "401e43f50e9b03988ef5f057f5c4bfc097e593ae90403e9a5536a004bcefb7be" + sha256 cellar: :any, arm64_sequoia: "c6b0c2054217bf77789f11c4cf02732d2397576cdb25ed828845bc8c6808dbd7" + sha256 cellar: :any, arm64_sonoma: "2fccf8368eafc625c759030d1c3528bd42e60e5212f1d9c8255875280c20c799" + sha256 cellar: :any, arm64_ventura: "d257be9b74a17d6e35a8b8c5e89491ff2fb9f83a828f442e787110c27a9c5cd2" + sha256 cellar: :any, sonoma: "4c988a24f589781b5bb28327a21c4747b63f791f322373697a5ce5638b618cc2" + sha256 cellar: :any, ventura: "92ba5dadd11f3b7371bdc9d508ca8223f565649e61eb22e678d1de9faaa272de" + sha256 cellar: :any_skip_relocation, arm64_linux: "8249f4716373f900407265373ce487766766565b614a81875194881fc6a01117" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc8cacd16db1b5c793b1d76dc356a774f6bdac23866e441276e9d28faaf2125a" + end + + depends_on "pkgconf" => :build + depends_on "dbus" + depends_on "glib" + + uses_from_macos "expat" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"dbus-binding-tool", "--help" + end +end diff --git a/Formula/d/dbus.rb b/Formula/d/dbus.rb new file mode 100644 index 0000000000000..7e1bc6d4eb05b --- /dev/null +++ b/Formula/d/dbus.rb @@ -0,0 +1,160 @@ +class Dbus < Formula + # releases: even (1.12.x) = stable, odd (1.13.x) = development + desc "Message bus system, providing inter-application communication" + homepage "https://wiki.freedesktop.org/www/Software/dbus" + url "https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz" + mirror "https://deb.debian.org/debian/pool/main/d/dbus/dbus_1.16.2.orig.tar.xz" + sha256 "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2" + license any_of: ["AFL-2.1", "GPL-2.0-or-later"] + revision 1 + head "https://gitlab.freedesktop.org/dbus/dbus.git", branch: "main" + + livecheck do + url "https://dbus.freedesktop.org/releases/dbus/" + regex(/href=.*?dbus[._-]v?(\d+\.\d*?[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "708eed3cc7031e486c760cc9debe777b7e8de93faf74320b66d3bc42e27499c3" + sha256 arm64_sequoia: "5a51451acabb5ae56b5682e88a82dfa43cc6a2b653ca068198546bb72324bd0c" + sha256 arm64_sonoma: "1be729814991108cc593bb8472e376947898f8bf94b73271c2238c329514a3ba" + sha256 arm64_ventura: "29098b5b3f154677a61c30b402b17fe2912e9efe1cd7917ee6ae754209fe1f29" + sha256 sonoma: "438a1da22c323246b958e0fbc63c5e7405dba77e9274809ebd73ab8c886a19d7" + sha256 ventura: "2f10ec74399e7ffb843022aa22bf11b088ab6b00d34da46d623fca78900f166b" + sha256 arm64_linux: "f636ed77fc07ab232ec75012b8b5a69cee10f8f239d48b1d5622baa83d9d9d7e" + sha256 x86_64_linux: "42841a5373f596cbccd52b4cf3eae4f3ec6a853309b14e36e869a7030fabd21a" + end + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "python" => :build + uses_from_macos "expat" + + # Remove deprecated keys from launchd plist. + # PR ref: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/179 + patch :DATA + + def install + # Fix the TMPDIR to one D-Bus doesn't reject due to odd symbols + ENV["TMPDIR"] = "/tmp" + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + args = %W[ + -Dlocalstatedir=#{var} + -Dsysconfdir=#{etc} + -Dxml_docs=enabled + -Ddoxygen_docs=disabled + -Dmodular_tests=disabled + ] + + args << "-Dlaunchd_agent_dir=#{prefix}" << "-Ddbus_user=daemon" if OS.mac? + inreplace "bus/org.freedesktop.dbus-session.plist.in", "@DBUS_DAEMONDIR@", opt_bin + + # rpath is not set for meson build + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}" + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # Manually create plist for system bus service + (prefix/"org.freedesktop.dbus-system.plist").write system_plist if OS.mac? + mkdir etc/"dbus-1/system.d" + mkdir etc/"dbus-1/session.d" + end + + def post_install + # Generate D-Bus's UUID for this machine + system bin/"dbus-uuidgen", "--ensure=#{var}/lib/dbus/machine-id" + end + + def caveats + on_macos do + <<~EOS + To start the session bus now and at login: + + brew services start dbus + + To start the system bus now and on boot, install and activate the included daemon: + + sudo cp -f $(brew --prefix dbus)/org.freedesktop.dbus-system.plist /Library/LaunchDaemons + sudo launchctl bootstrap system /Library/LaunchDaemons/org.freedesktop.dbus-system.plist + + If the daemon is already installed and running, restart it: + + sudo launchctl kickstart -k system/org.freedesktop.dbus-system + EOS + end + end + + service do + name macos: "org.freedesktop.dbus-session" + end + + def system_plist + <<~PLIST + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + <plist version="1.0"> + <dict> + <key>Label</key> + <string>org.freedesktop.dbus-system</string> + <key>KeepAlive</key> + <dict> + <key>SuccessfulExit</key> + <false/> + </dict> + <key>ProgramArguments</key> + <array> + <string>#{opt_bin}/dbus-daemon</string> + <string>--nofork</string> + <string>--system</string> + <string>--nopidfile</string> + </array> + <key>Sockets</key> + <dict> + <key>unix_domain_listener</key> + <dict> + <key>SockPathName</key> + <string>#{var}/run/dbus/system_bus_socket</string> + <key>SockPathMode</key> + <integer>511</integer> + </dict> + </dict> + </dict> + </plist> + PLIST + end + + test do + assert_match version.to_s, shell_output("#{bin}/dbus-daemon --version") + end +end + +__END__ +diff --git a/bus/org.freedesktop.dbus-session.plist.in b/bus/org.freedesktop.dbus-session.plist.in +index 40ff370..3c77fa9 100644 +--- a/bus/org.freedesktop.dbus-session.plist.in ++++ b/bus/org.freedesktop.dbus-session.plist.in +@@ -5,15 +5,6 @@ + <key>Label</key> + <string>org.freedesktop.dbus-session</string> + +- <key>ServiceIPC</key> +- <true/> +- +- <!-- Please uncomment on 10.4; OnDemand doesn't work properly there. --> +- <!-- +- <key>OnDemand</key> +- <false /> +- --> +- + <key>ProgramArguments</key> + <array> + <string>@DBUS_DAEMONDIR@/dbus-daemon</string> diff --git a/Formula/d/dbxml.rb b/Formula/d/dbxml.rb new file mode 100644 index 0000000000000..8ae16d55b0274 --- /dev/null +++ b/Formula/d/dbxml.rb @@ -0,0 +1,83 @@ +class Dbxml < Formula + desc "Embeddable XML database with XQuery support and other advanced features" + homepage "https://www.oracle.com/database/technologies/related/berkeleydb.html" + url "https://download.oracle.com/berkeley-db/dbxml-6.1.4.tar.gz" + sha256 "a8fc8f5e0c3b6e42741fa4dfc3b878c982ff8f5e5f14843f6a7e20d22e64251a" + license "AGPL-3.0-only" + revision 4 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "539f926de917e73802a9590c4cfd28df6c3a54be13814265f6d80ec1943541cf" + sha256 cellar: :any, arm64_sequoia: "b0de74f456722a21e4f77551d538b11d362b0fd48124c6eaa6b70b8d561f7480" + sha256 cellar: :any, arm64_sonoma: "efe2992cccae75a67b24df080b1ed9432e17754f929f445370baa20cdfde17c6" + sha256 cellar: :any, arm64_ventura: "3b54187469d0a475dcd814126f9f15c82a9b66699edc45653e112ee24164ad2d" + sha256 cellar: :any, sonoma: "f5f58b63b160c729ff6350cec92474f1a9eed2ac3207413cd275b4ed6f19bbed" + sha256 cellar: :any, ventura: "67ce232d02670a98765d472293a358fb71f1d2ba3160786d218b4b3249275009" + sha256 cellar: :any_skip_relocation, arm64_linux: "30a75d75523b43d1a4b2eaeb6997cf8ebee9ed3d2e854c9387b1f474c65f79f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "936250b2d49f27ab6123d1eb1cc6405b22777dd95617d4aead5f958ac19e2a05" + end + + depends_on "berkeley-db" + depends_on "xerces-c" + depends_on "xqilla" + + uses_from_macos "zlib" + + # No public bug tracker or mailing list to submit this to, unfortunately. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dbxml/c%2B%2B11.patch" + sha256 "98d518934072d86c15780f10ceee493ca34bba5bc788fd9db1981a78234b0dc4" + end + + def install + ENV.cxx11 + + inreplace "dbxml/configure" do |s| + s.gsub! %r{=`ls ("\$with_berkeleydb"/lib)/libdb-\*\.la \| sed -e 's/\.\*db-\\\(\.\*\\\)\.la/}, + "=`find \\1 -name #{shared_library("libdb-*")} -maxdepth 1 ! -type l " \ + "| sed -e 's/#{shared_library(".*db-\\(.*\\)")}/" + s.gsub! "lib/libdb-*.la", "lib/#{shared_library("libdb-*")}" + s.gsub! "libz.a", shared_library("libz") + end + + args = %W[ + --with-xqilla=#{Formula["xqilla"].opt_prefix} + --with-xerces=#{Formula["xerces-c"].opt_prefix} + --with-berkeleydb=#{Formula["berkeley-db"].opt_prefix} + ] + args << "--with-zlib=#{Formula["zlib"].opt_prefix}" unless OS.mac? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + cd "dbxml" do + system "./configure", *std_configure_args, *args + system "make", "install" + end + end + + test do + (testpath/"simple.xml").write <<~XML + <breakfast_menu> + <food> + <name>Belgian Waffles</name> + <calories>650</calories> + </food> + <food> + <name>Homestyle Breakfast</name> + <calories>950</calories> + </food> + </breakfast_menu> + XML + + (testpath/"dbxml.script").write <<~EOS + createContainer "" + putDocument simple "simple.xml" f + cquery 'sum(//food/calories)' + print + quit + EOS + assert_equal "1600", shell_output("#{bin}/dbxml -s #{testpath}/dbxml.script").chomp + end +end diff --git a/Formula/d/dc3dd.rb b/Formula/d/dc3dd.rb new file mode 100644 index 0000000000000..58d5df6470e16 --- /dev/null +++ b/Formula/d/dc3dd.rb @@ -0,0 +1,79 @@ +class Dc3dd < Formula + desc "Patched GNU dd that is intended for forensic acquisition of data" + homepage "https://sourceforge.net/projects/dc3dd/" + url "https://downloads.sourceforge.net/project/dc3dd/dc3dd/7.3.1/dc3dd-7.3.1.zip" + sha256 "bd1b66d20a4020ab94b512e56d76cb5f86470d0216081586d596366927cb8d8b" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "1319a1907495f80e22c8e4047ff2a3764821774313b674853ac89f0f95159c1d" + sha256 arm64_sequoia: "1cdfecc59688663ad056a3dc3db19a87d5e7c6356f9f88c33695126b0270639c" + sha256 arm64_sonoma: "31e4adf9ec3c885a693cc149e6319e6ca2b4e8af140a4b72c6a537196daa2e21" + sha256 arm64_ventura: "e0f138b256f063d582d624d041ff18933e3cdec9921cbea06b4500f766a6a2cf" + sha256 arm64_monterey: "f77cd62b64d5ae2680254fd0568f82a5cc86afe8340d9cf523b54e88c9ad1f26" + sha256 arm64_big_sur: "a4f247d8b8f6f68e697c325989fd79d1c019e7d8babcbd48d0327480a676c43b" + sha256 sonoma: "45804b97f88239ae78085257aee9c32a397e183d8f83035cd84d0a8fb4d2aa66" + sha256 ventura: "f65cccfafa99f62c687eb87c64cfdb3492f8050e86a268045d73f53f5c5dfe97" + sha256 monterey: "b8270f518be57090a150e2d78048b8f2e6a81e16092007e48bef6e5e567a4cf3" + sha256 big_sur: "f61a5f9196c0c30c9087d92b22522db1c344137406a3272381add30d49c9621f" + sha256 arm64_linux: "f56498b96fad1eb7f15ad686bf19360f92844322299627e0e20c57c3a5d5c219" + sha256 x86_64_linux: "bdaae1ff1efcea3319dbf1e84f68c1d51a1b12e8a8eae4c13f2e2069084051c7" + end + + depends_on "gettext" + + uses_from_macos "perl" => :build + + resource "gettext-pm" do + url "https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/gettext-1.07.tar.gz" + sha256 "909d47954697e7c04218f972915b787bd1244d75e3bd01620bc167d5bbc49c15" + end + + def install + ENV.prepend_create_path "PERL5LIB", buildpath/"gettext-pm/lib/perl5" + resource("gettext-pm").stage do + inreplace "Makefile.PL", "$libs = \"-lintl\"", + "$libs = \"-L#{Formula["gettext"].opt_lib} -lintl\"" + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}/gettext-pm" + system "make" + system "make", "install" + end + + # Fix to error: call to undeclared function 'strtod_l'; + if OS.mac? && DevelopmentTools.clang_build_version >= 1700 + inreplace "lib/c-strtod.c", + "#include <stdlib.h>", + "#include <stdlib.h>\n#include <xlocale.h>" + end + + # Fixes error: 'Illegal instruction: 4'; '%n used in a non-immutable format string' on 10.13 + # Patch comes from gnulib upstream (see https://sourceforge.net/p/dc3dd/bugs/17/) + inreplace "lib/vasnprintf.c", + "# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) " \ + "|| ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))", + "# if !(defined __APPLE__ && defined __MACH__)" + + chmod 0555, ["build-aux/install-sh", "configure"] + + args = %W[ + --disable-debug + --disable-dependency-tracking + --prefix=#{prefix} + --infodir=#{info} + gl_cv_func_stpncpy=yes + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args + system "make" + system "make", "install" + prefix.install %w[Options_Reference.txt Sample_Commands.txt] + end + + test do + system bin/"dc3dd", "--help" + end +end diff --git a/Formula/d/dcadec.rb b/Formula/d/dcadec.rb new file mode 100644 index 0000000000000..d503fdc9640ce --- /dev/null +++ b/Formula/d/dcadec.rb @@ -0,0 +1,44 @@ +class Dcadec < Formula + desc "DTS Coherent Acoustics decoder with support for HD extensions" + homepage "https://github.com/foo86/dcadec" + url "https://github.com/foo86/dcadec.git", + tag: "v0.2.0", + revision: "0e074384c9569e921f8facfe3863912cdb400596" + license "LGPL-2.1-or-later" + head "https://github.com/foo86/dcadec.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3ae8134706fc28f0b3e951bd4dddbba4c3e13b58b61484e5988180fba679570f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a38744f8f827e1d1b9b8cec9c825699c2d2b3f5186a05d9dc72b44ad1c5f390" + sha256 cellar: :any_skip_relocation, arm64_ventura: "47bf0a1d239ce33c7fd85c57dd7b8aad67e69aaca2a28206d45a6f7f14d189d1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d458c3484034748b9b1fee9074d5f3018354447d11914f132c6e41899de17491" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "359384000edd00fc8e030bb59f9ebc15a301eb250351a20f2da062cc202caa54" + sha256 cellar: :any_skip_relocation, sonoma: "fab285a35daca6aeee378d7c8a9f380c9da0def5f548b2fa4a421d59b9408ead" + sha256 cellar: :any_skip_relocation, ventura: "d372f413acbf37b65b3f39e2f7140d8731dab8216a683b4153428c574e87a3e6" + sha256 cellar: :any_skip_relocation, monterey: "702e3f8b57be59604d5969be08fb64067763e5aac353154b233ad74a3f5a3276" + sha256 cellar: :any_skip_relocation, big_sur: "2679a012566efff2d1ad05021648975dc2960d2ff42720d53b001631311d4a51" + sha256 cellar: :any_skip_relocation, catalina: "0622b87f5b7f7c71346443f12d5e3d6eabd02aa63dce433c7248d405a9fbc036" + sha256 cellar: :any_skip_relocation, arm64_linux: "6218f10d2a60bde3becd795bf87e6a806219c7c88b5fcd426ce44cb95e8baef6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f727365cbd24d678682c06e73ff49a7fdf92b17a5a1c6b82068522e4d0e0b1f" + end + + # Ref https://github.com/foo86/dcadec/commit/b93deed1a231dd6dd7e39b9fe7d2abe05aa00158 + deprecate! date: "2024-06-30", because: :deprecated_upstream + disable! date: "2025-07-02", because: :deprecated_upstream + + def install + system "make", "all" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + resource "homebrew-testdata" do + url "https://github.com/foo86/dcadec-samples/raw/fa7dcf8c98c6d/xll_71_24_96_768.dtshd" + sha256 "d2911b34183f7379359cf914ee93228796894e0b0f0055e6ee5baefa4fd6a923" + end + + resource("homebrew-testdata").stage do + system bin/"dcadec", resource("homebrew-testdata").cached_download + end + end +end diff --git a/Formula/d/dcd.rb b/Formula/d/dcd.rb new file mode 100644 index 0000000000000..d3e8b7f4c8bd4 --- /dev/null +++ b/Formula/d/dcd.rb @@ -0,0 +1,48 @@ +class Dcd < Formula + desc "Auto-complete program for the D programming language" + homepage "https://github.com/dlang-community/DCD" + url "https://github.com/dlang-community/DCD.git", + tag: "v0.15.2", + revision: "4946d49abdc35810254151923bab30fb3cc2c004" + license "GPL-3.0-or-later" + head "https://github.com/dlang-community/dcd.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "27e72e0e89866c4a7b0a6c42abf17b57d58fd7f856ed1c79c39b50760691c202" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df136836a7f0fd898d199c404fb3a51b47612950fbd325ccc712689fa79a0f49" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e65b4d941203d3b3afbaa704b02d9180b5dc2d6f46f45fdd816a78ba5528418" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b667329fc26ff55eba9b62027200818deef9378c15f5524e0031f35d471bf9e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1007cccd0a4c996e5a5515f978eefb67e57598d372ba7e43467d1c2220c80920" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b6ce58f93e86c4d23bbb23da6acb37c31d707cc2da062b9c541ff6ea65b303c6" + sha256 cellar: :any_skip_relocation, sonoma: "fb5f1ff6bb06fc3ce9684604f04dc94e0f68a83df3ac59d6b511d923ae57746c" + sha256 cellar: :any_skip_relocation, ventura: "6c9cb410387c80d7d596bb925cf90cc0d1dfc8c0f9d3780b0ad1302540352265" + sha256 cellar: :any_skip_relocation, monterey: "70550825ebf34833947ca9e7bcb9ec03292d6ecbf77e6691d4791eaadc4218ea" + sha256 cellar: :any_skip_relocation, big_sur: "5711120e29181ce752e1616c5777eea9864ac15d6583dc634aa3a9d9f47de647" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1c5f7d42c7c39ac7e2bf1e937faf6fc06b909f3ddb01e53be9018f37b2793eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "658abefb0b260e852fb16078e353b453929f6f04fa8af8f636ed2d5e2aa89fca" + end + + depends_on "ldc" => :build + + def install + system "make", "ldc" + bin.install "bin/dcd-client", "bin/dcd-server" + end + + test do + port = free_port + + # spawn a server, using a non-default port to avoid + # clashes with pre-existing dcd-server instances + server = fork do + exec bin/"dcd-server", "-p", port.to_s + end + # Give it generous time to load + sleep 0.5 + # query the server from a client + system bin/"dcd-client", "-q", "-p", port.to_s + ensure + Process.kill "TERM", server + Process.wait server + end +end diff --git a/Formula/d/dcfldd.rb b/Formula/d/dcfldd.rb new file mode 100644 index 0000000000000..de2f6a8992621 --- /dev/null +++ b/Formula/d/dcfldd.rb @@ -0,0 +1,34 @@ +class Dcfldd < Formula + desc "Enhanced version of dd for forensics and security" + homepage "https://github.com/resurrecting-open-source-projects/dcfldd" + url "https://github.com/resurrecting-open-source-projects/dcfldd/archive/refs/tags/v1.9.3.tar.gz" + sha256 "e5813e97bbc8f498f034f5e05178489c1be86de015e8da838de59f90f68491e7" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "015e2488081449c7a4a21ab1494158bfe4c12ce23ab2f173b1d90aa606350340" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27d926c612143e59fa534f10bf44f138501302ab3d7a5990c46ee4c43a66aaae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3111fcd6917b2ac2b3d6d9076c2dcb144a97c1887e15f982ffd3d36e9d90c4e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03d0c6c64483793ba34e2a79dd3dfd73753df1cfbf66995c517c7290a752c2c9" + sha256 cellar: :any_skip_relocation, sonoma: "7b4bf86232cb89e6da8244cc8cf38f4cc075636792c8f5f52f19a424ac315c9d" + sha256 cellar: :any_skip_relocation, ventura: "c89731f9220e739bc26473f6e17adbb3246cf93dfe9835b77a96552edfb9994b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f82b6d7c901bd91e1425a1a135656959b45485a8f79d38c805a7991726e13a58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44661f718a486d0d5bcc1b024d830cd7e72c4621577bb6d40d032b68a641f510" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"dcfldd", "--version" + end +end diff --git a/Formula/d/dcled.rb b/Formula/d/dcled.rb new file mode 100644 index 0000000000000..34260e4424889 --- /dev/null +++ b/Formula/d/dcled.rb @@ -0,0 +1,49 @@ +class Dcled < Formula + desc "Linux driver for dream cheeky USB message board" + homepage "https://www.jeffrika.com/~malakai/dcled/index.html" + url "https://www.jeffrika.com/~malakai/dcled/dcled-2.2.tgz" + sha256 "0da78c04e1aa42d16fa3df985cf54b0fbadf2d8ff338b9bf59bfe103c2a959c6" + license :cannot_represent + + livecheck do + url :homepage + regex(/href=.*?dcled[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5369329587a6c3ec28976ebbd89fc4f8361b2472e38ee6518ebdf95dc04cddd1" + sha256 cellar: :any, arm64_sequoia: "1e3b757bcbd17baa0865903e7639f2bdeede51da0e38b5859047810ec34ae39b" + sha256 cellar: :any, arm64_sonoma: "3cf40a7a9200cbfd9e23603df8f307172f6858dabf1ced162d4ce2e5fac039dd" + sha256 cellar: :any, arm64_ventura: "4ac7c81b9155f3196eccb25a230494545976a8570e91fe9c5e6544e5e860be92" + sha256 cellar: :any, arm64_monterey: "338db9a99977a15fec8a4e2c2bf4432150c21e13e570c1caa852b99a689a9b3b" + sha256 cellar: :any, arm64_big_sur: "bd8fb1848c3296e5eaadf1436f891a2a6ab8142135947a2806db1d2e5212695d" + sha256 cellar: :any, sonoma: "6f565465c16d2a490c1f0beb0c6dd483c156102cde2a8bf3b58a41bd84bb194e" + sha256 cellar: :any, ventura: "42bb46504f3936e2e6698f4a7da7e7de0db98a2edb55fa83ce91ff8c238c1cbd" + sha256 cellar: :any, monterey: "65cd5df08d1292e7f046bcada635cfd63708fcf75f7cc4e9f23b3bb402e0bbc1" + sha256 cellar: :any, big_sur: "5c36acee3c790871237cb7a3400c6fe4e37daa90258c10b89043ac2aad3a6dc4" + sha256 cellar: :any, catalina: "83a87a0f780dc73c21151690f3b1d0654d33e2baad358122be9d24a0610cea64" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e3b1302c4e78c0539f141a055e2df647c9c4ed4e8f4010c808e7e42163fe741" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0c7a6b33e48eb8e369235f0bd1e84d10c161a41eaec0ab93854bec94df8aee0" + end + + depends_on "libusb" + + def install + # Fix compile with newer Clang + if DevelopmentTools.clang_build_version >= 1403 + inreplace "Makefile", "-Wunused-variable", "-Wunused-variable -Wno-implicit-function-declaration" + end + + system "make", "CC=#{ENV.cc}", + "LIBUSB_CFLAGS=-I#{Formula["libusb"].opt_include}/libusb-1.0" + system "make", "install", + "FONTDIR=#{share}/#{name}", + "INSTALLDIR=#{bin}" + end + + test do + system bin/"dcled", "--help" + end +end diff --git a/Formula/d/dcm2niix.rb b/Formula/d/dcm2niix.rb new file mode 100644 index 0000000000000..0b21e25943fa6 --- /dev/null +++ b/Formula/d/dcm2niix.rb @@ -0,0 +1,45 @@ +class Dcm2niix < Formula + desc "DICOM to NIfTI converter" + homepage "https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage" + url "https://github.com/rordenlab/dcm2niix/archive/refs/tags/v1.0.20250506.tar.gz" + sha256 "1b24658678b6c24141e58760dbea9fe2786ffdd736bcc37a36d9cdabc731bafa" + license "BSD-3-Clause" + version_scheme 1 + head "https://github.com/rordenlab/dcm2niix.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "887894cb6a9d368dcb707572a92a3fedbc7f274b2f5b4308b1a6dffbb9e661ad" + sha256 arm64_sequoia: "cc953772d891f078f91fd15f340853dfba970634f20e22165987259f607b7155" + sha256 arm64_sonoma: "ca821734148aff6d0baebd8c83c68f2fc20f26ac06e7b3351344fed94a8e4e39" + sha256 arm64_ventura: "260b608922b27a33915650bc66b36fd0aaa4415f139f09a5402877484cd60f1f" + sha256 cellar: :any_skip_relocation, sonoma: "91a28ea73ffecf684bbc7d96d7ad551927c1cfc334f57f294708e04edaa422ea" + sha256 cellar: :any_skip_relocation, ventura: "ac1a9f60a17fedba7485333d8992fa1bac206d6083e6cc23ba8e70b3db7e950f" + sha256 cellar: :any_skip_relocation, arm64_linux: "71555b10ff6f721b9ab11c482a6d8d0385987d34cebd7d19186e70fcc43fa903" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d28346e349db8dd0a7cdb4b08242e52f79ca6c6a5214aa7a6987cb3142e870e" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-sample.dcm" do + url "https://raw.githubusercontent.com/dangom/sample-dicom/master/MR000000.dcm" + sha256 "4efd3edd2f5eeec2f655865c7aed9bc552308eb2bc681f5dd311b480f26f3567" + end + + resource("homebrew-sample.dcm").stage testpath + system bin/"dcm2niix", "-f", "%d_%e", "-z", "n", "-b", "y", testpath + assert_path_exists testpath/"localizer_1.nii" + assert_path_exists testpath/"localizer_1.json" + end +end diff --git a/Formula/d/dcmtk.rb b/Formula/d/dcmtk.rb new file mode 100644 index 0000000000000..90606ac89d077 --- /dev/null +++ b/Formula/d/dcmtk.rb @@ -0,0 +1,59 @@ +class Dcmtk < Formula + desc "OFFIS DICOM toolkit command-line utilities" + homepage "https://dicom.offis.de/dcmtk.php.en" + url "https://dicom.offis.de/download/dcmtk/dcmtk369/dcmtk-3.6.9.tar.gz" + sha256 "b93ff5561244916a6e1e7e3ecccf2e26e6932c4edb5961268401cea7d4ab9c16" + license "BSD-3-Clause" + head "https://git.dcmtk.org/dcmtk.git", branch: "master" + + livecheck do + url "https://dicom.offis.de/en/dcmtk/dcmtk-software-development/" + regex(/href=.*?dcmtk[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "421d412e19d5ccd1b9d83b43ed604c5bafbb7710b6f1a4a04531411ce8022056" + sha256 arm64_sequoia: "6349ba68f65ba257caa778ea8ab86fbf2b70141baf5a0a8f7bfa3759765c42a8" + sha256 arm64_sonoma: "86d3578d795ba30a2a75a9c3d5fa8c5f692bc54c38ed5c2a901cdd10c8e15023" + sha256 arm64_ventura: "fd350d43be22126a196b194747b45df08b58919507fd61bde058c153a97ccf33" + sha256 sonoma: "b5496a75247e5fd852d750a503dc788829bcc3e9532a90fae42d64508bf72ba6" + sha256 ventura: "acaae376685ecc370ccf3f6b363b6c1d8b1ace7f752999103eb01eaf44e4716a" + sha256 arm64_linux: "daba3c30c6cf392a687cc367de332af8ff31c125542b6c474349b2b7c9ad5277" + sha256 x86_64_linux: "bf2a2675135b64915b5c5b427c536289e68a904007d0d0ef0c999845005aae14" + end + + depends_on "cmake" => :build + + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + args = std_cmake_args + ["-DDCMTK_WITH_ICU=OFF"] + + system "cmake", "-S", ".", "-B", "build/shared", *args, + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", ".", "-B", "build/static", *args, + "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build/static" + lib.install Dir["build/static/lib/*.a"] + + inreplace lib/"cmake/dcmtk/DCMTKConfig.cmake", "#{Superenv.shims_path}/", "" + end + + test do + system bin/"pdf2dcm", "--verbose", + test_fixtures("test.pdf"), testpath/"out.dcm" + system bin/"dcmftest", testpath/"out.dcm" + end +end diff --git a/Formula/d/dcos-cli.rb b/Formula/d/dcos-cli.rb new file mode 100644 index 0000000000000..91bba68b96182 --- /dev/null +++ b/Formula/d/dcos-cli.rb @@ -0,0 +1,44 @@ +class DcosCli < Formula + desc "Command-line interface for managing DC/OS clusters" + homepage "https://docs.d2iq.com/mesosphere/dcos/latest/cli" + url "https://github.com/dcos/dcos-cli/archive/refs/tags/1.2.0.tar.gz" + sha256 "d75c4aae6571a7d3f5a2dad0331fe3adab05a79e2966c0715409d6a2be2c6105" + license "Apache-2.0" + head "https://github.com/dcos/dcos-cli.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ce669ecdf711ee9694e40d12a22866fae9e14c59ac55436cc6284133c25b88d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "566aeb81f1c506438c9f5b503f775c540dfef7a4aa5e728e710e50a2e0c10993" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4cf3b69223bb06a5b08f8f48eb320a2b45ef2fcf8e3f63c2e5fb49881872b7bb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4b7c3e8a7a0d91d84fd13cad41079bd7d718928b1acbaede6f7c5fc0f419b1bc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f86f45ed4b5244b46a83cb5bf5bc5ac869dfbae3af926f175bee78a0ebd9b47a" + sha256 cellar: :any_skip_relocation, sonoma: "1d67f61c89ee09f845b39d1d44fdc61eac503144bf0da039bbd50fff50722c66" + sha256 cellar: :any_skip_relocation, ventura: "f467b1082fdb605f19a24bfa1b316f06a81e5f1c9dfdb2f522582e7d3c30ee65" + sha256 cellar: :any_skip_relocation, monterey: "26c6a023e4d2cf388c41f684d52f3d427f57d0a6eacd54a286c5f7c56efb7957" + sha256 cellar: :any_skip_relocation, big_sur: "1391a435f38b3a70514d0ef7f0a20f19a2d7027e64cad5c1b413730a89aaec4f" + sha256 cellar: :any_skip_relocation, catalina: "3f64db455d356a65dbb8be7bce2346b9b8afec968082bdad1efafb174bbde1b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "82c1abd40c451322835120c0c1ab9a8ffe507b0c7d55c77ffa78d995d9e6086d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ca96957a95df6e3084eeddf3d45cd52a26bdd69446647af7e52f297c6b1f1ce" + end + + # D2iQ (formerly Mesosphere) has shutdown last year + deprecate! date: "2024-07-07", because: :unmaintained + disable! date: "2025-07-07", because: :unmaintained + + depends_on "go" => :build + + def install + ENV["NO_DOCKER"] = "1" + ENV["VERSION"] = version.to_s + kernel_name = OS.kernel_name.downcase + + system "make", kernel_name + bin.install "build/#{kernel_name}/dcos" + end + + test do + run_output = shell_output("#{bin}/dcos --version 2>&1") + assert_match "dcoscli.version=#{version}", run_output + end +end diff --git a/Formula/d/dcp.rb b/Formula/d/dcp.rb new file mode 100644 index 0000000000000..ba2249f5a14bc --- /dev/null +++ b/Formula/d/dcp.rb @@ -0,0 +1,36 @@ +class Dcp < Formula + desc "Docker cp made easy" + homepage "https://github.com/exdx/dcp" + url "https://github.com/exdx/dcp/archive/refs/tags/v0.4.1.tar.gz" + sha256 "7d9caa94c6a099762f367901cb0ccbe63130026f903e5477f4403d0cfff98b53" + license "MIT" + head "https://github.com/exdx/dcp.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "08061eec2befb7c29aed3087ba5e6ac7a6459410d80c5630d0b47efd3ba65ba0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb44281e662eb5bae136d9e3d6d6e0b84b230fa0622d0b3abab0a60bae216fa9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a86398dd892b4756ffcfb7d9c6027b6cd4fa9e1372b3e6ed7a3a83b85cd7b6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c19bb89a51b9907d81b97a6ed2a2535f2c1833db9abab6d86fa3d7bdebf35212" + sha256 cellar: :any_skip_relocation, arm64_monterey: "80dea57c8adb3236af493486d9882e0552f3a53a7bfe5ba06c452778b152129d" + sha256 cellar: :any_skip_relocation, sonoma: "5609d9e502179089eb3822add208ff8e14643d3cb7f47ef2691f9760dff81647" + sha256 cellar: :any_skip_relocation, ventura: "c81ed8916ea09601f859c03baa6adb8356aa5377f461144beefb8aa6eb9f76c2" + sha256 cellar: :any_skip_relocation, monterey: "e35a830f17b84a9a76f9d559bb4b8fefd775be1386e2448863f362c8b55862ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b17162fddf2af0a22a18023eb38288ed084201a241572cb7a3bb66cbbe615b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8559472fddad82054a7b8d277036a6b45d75ea986e9df3196da8514678e6993b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/dcp busybox 2>&1", 1) + assert_match "docker socket not found: falling back to podman configuration", output + + assert_match version.to_s, shell_output("#{bin}/dcp --version") + end +end diff --git a/Formula/d/dcraw.rb b/Formula/d/dcraw.rb new file mode 100644 index 0000000000000..70ab4e4e95bf1 --- /dev/null +++ b/Formula/d/dcraw.rb @@ -0,0 +1,46 @@ +class Dcraw < Formula + desc "Digital camera RAW photo decoding software" + homepage "https://www.dechifro.org/dcraw/" + url "https://www.dechifro.org/dcraw/archive/dcraw-9.28.0.tar.gz" + mirror "https://mirrorservice.org/sites/distfiles.macports.org/dcraw/dcraw-9.28.0.tar.gz" + sha256 "2890c3da2642cd44c5f3bfed2c9b2c1db83da5cec09cc17e0fa72e17541fb4b9" + license "GPL-2.0-or-later" + revision 3 + + livecheck do + url "https://distfiles.macports.org/dcraw/" + regex(/href=.*?dcraw[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "06e4e4b56c7abf6a3401a398f2b0caca6851a348dc87215c53ccb1eef0b38e18" + sha256 cellar: :any, arm64_sequoia: "a083652ace0c260b03d51e3a34412dd5f9213cf146dca60f6d5d2a1ecbc8c191" + sha256 cellar: :any, arm64_sonoma: "031ab39857064c76f12dd142d9d95aab39f43b0474049c846c82fe3b024876c8" + sha256 cellar: :any, arm64_ventura: "5c293d628459ac1405a5d558d975f2e655e6a59626a4a634fd6496b094a7589c" + sha256 cellar: :any, arm64_monterey: "3335474ee80fb8359df924187d878380b76ee055ca0ade45f1b8872cf71b1614" + sha256 cellar: :any, arm64_big_sur: "fcf8d42c26fe0f0c75b9247286ab8dc90cca127b4946dc5755cfd44d5afd66a5" + sha256 cellar: :any, sonoma: "9021dfd0fd80939f8cf06808522ac0bc3a4ab8daece0489c782ac798946a5e6a" + sha256 cellar: :any, ventura: "2ece1b23d5c77ada535e6e4ae803b9d8060296838cfe92818c191b1e49dceba8" + sha256 cellar: :any, monterey: "82b85b19458214ddae5f12e22a13e160b5a771d1111020d559a3b19bfed3798f" + sha256 cellar: :any, big_sur: "baf800fb4217afc09f8fc06f3512780898018e72e8862be65f016ea1b89fb91d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2783cb8eca424cae5dece8fd11a9aa41c533d14861791aaf66cd60391e75619a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e450712cc23c8501e21e7ff438480b0debcb27703a6ba4dcea9e6b00a2ec6fac" + end + + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "little-cms2" + + def install + ENV.append "LDLIBS", "-lm -ljpeg -llcms2 -ljasper" + system "make", "dcraw" + bin.install "dcraw" + man1.install "dcraw.1" + end + + test do + assert_match "\"dcraw\" v9", shell_output(bin/"dcraw", 1) + end +end diff --git a/Formula/d/ddate.rb b/Formula/d/ddate.rb new file mode 100644 index 0000000000000..f3663686116ae --- /dev/null +++ b/Formula/d/ddate.rb @@ -0,0 +1,37 @@ +class Ddate < Formula + desc "Converts boring normal dates to fun Discordian Date" + homepage "https://github.com/bo0ts/ddate" + url "https://github.com/bo0ts/ddate/archive/refs/tags/v0.2.2.tar.gz" + sha256 "d53c3f0af845045f39d6d633d295fd4efbe2a792fd0d04d25d44725d11c678ad" + license :public_domain + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "faa847a8ef33784d6e5337a6357a890437b7965ce6e8353940535165af5e050e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "12ef0c2a08ae6e73c6cf73a94e662c513cd9d8cb46ed1567653236d5ca5e7b4a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "124fa6334391f5ba314292ba2e47b535cebe68a79272ee5a9d3ad9d457ef4558" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe29278ae4f80f7c8db1de60b5aebf6d80b309b8b3d7cf866f1d092f7a4c518f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "967dbd56914c5b0d578b93c936f311f2af91dade23abefb8d3e6d6d8814b142c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f45b9a3b64d14ae95d1aabb359535c7394fbb9781618992e0d8987009d1b306b" + sha256 cellar: :any_skip_relocation, sonoma: "9daa4cc00d03cc5d16024c68429face569f89d68be9206173980833855e44857" + sha256 cellar: :any_skip_relocation, ventura: "dc6a83d4395ba0e0cc54890798b9dec02958912ad7f17fbadf2ca46c8236e9c8" + sha256 cellar: :any_skip_relocation, monterey: "f8c316d4c6b48ac80d5673f55bec768501c725d500ba9b926fdd347adf55cd79" + sha256 cellar: :any_skip_relocation, big_sur: "9e7f00a11029e70caa333a3c33367e564631fcea1d08b36f02437af7b03f810c" + sha256 cellar: :any_skip_relocation, catalina: "2b9be177e37cb4650bae50a9527315e700592bdd8a5546cfb7b40cf201bb680c" + sha256 cellar: :any_skip_relocation, arm64_linux: "85848eab10e14e64a60ffd85a3c5bbd2e72fc3d554ad28fcff82db7f9a44a686" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75baa9706ec0453896edf597bc5a9c52c012ea9188555654f698794f578d9f62" + end + + def install + system ENV.cc, "ddate.c", "-o", "ddate" + bin.install "ddate" + man1.install "ddate.1" + end + + test do + output = shell_output("#{bin}/ddate 20 6 2014").strip + assert_equal "Sweetmorn, Confusion 25, 3180 YOLD", output + end +end diff --git a/Formula/d/ddcctl.rb b/Formula/d/ddcctl.rb new file mode 100644 index 0000000000000..161ec15011d6a --- /dev/null +++ b/Formula/d/ddcctl.rb @@ -0,0 +1,35 @@ +class Ddcctl < Formula + desc "DDC monitor controls (brightness) for Mac OSX command-line" + homepage "https://github.com/kfix/ddcctl" + url "https://github.com/kfix/ddcctl/archive/refs/tags/v1.tar.gz" + sha256 "1b6eddd0bc20594d55d58832f2d2419ee899e74ffc79c389dcdac55617aebb90" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0377e06b8510577260ae7a490fd2dc63ca9477a43384559cc454409ac9c89dbd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0badc9ed3ff51d2791d383be14e194131ad46573340e4c6bd2723207c624482" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6572e1da056641ec5b483f2b5a77eb188753ccb3c9001936733c8c6ceb9ae8b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44ff8d31bf1287d9bf29c3f47b6fdc3034c3fe3eb801619cf2ca948ef69bcebf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c1650674a1529617dccc1fb61904f9586b17f9f61a63dbd740598019b1c6f25f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "909d9e837d2acb1d41ecf63535e1b352b825a17f3ff82a217bb45e79aff4b364" + sha256 cellar: :any_skip_relocation, sonoma: "d8365113eb8f035269bdd0b58913d39ceaf9e6fbe4f9b0412b2b3bb1c5f7b20a" + sha256 cellar: :any_skip_relocation, ventura: "eaaacf4646080a84a4b1b958a7bb8bfc959a1b4e13718a0957cd9f65e6ed7b7b" + sha256 cellar: :any_skip_relocation, monterey: "2d8fd10cd210b815094fe4cdb168e6f63fdfe3320f559ce115fcdc490ea27f72" + sha256 cellar: :any_skip_relocation, big_sur: "3576d7627c47fd48bbc6abb8c200547cae4b0f074c11116f612c771c6172942b" + sha256 cellar: :any_skip_relocation, catalina: "eb787a2b87a3c356933abf84b5f4de0050534ae6112ad4a38ed057df3d9fc73a" + end + + depends_on :macos + + def install + bin.mkpath + system "make", "install", "INSTALL_DIR=#{bin}" + end + + test do + output = shell_output("#{bin}/ddcctl -d 100 -b 100", 1) + assert_match(/found \d external display/, output) + end +end diff --git a/Formula/d/ddclient.rb b/Formula/d/ddclient.rb new file mode 100644 index 0000000000000..a1052b21914b8 --- /dev/null +++ b/Formula/d/ddclient.rb @@ -0,0 +1,120 @@ +class Ddclient < Formula + desc "Update dynamic DNS entries" + homepage "https://ddclient.net/" + url "https://github.com/ddclient/ddclient/archive/refs/tags/v4.0.0.tar.gz" + sha256 "4b37c99ac0011102d7db62f1ece7ff899b06df3d4b172e312703931a3c593c93" + license "GPL-2.0-or-later" + head "https://github.com/ddclient/ddclient.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c11ba50e7c4728b6c4e9f70b9daa3b0216fcad489c71f94e2a386ce31ce0cc49" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "295bbe6bc8b84952958cac5b33b021419cb51002f95c8c6a1f1eb67ff9b2cb72" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "295bbe6bc8b84952958cac5b33b021419cb51002f95c8c6a1f1eb67ff9b2cb72" + sha256 cellar: :any_skip_relocation, arm64_ventura: "295bbe6bc8b84952958cac5b33b021419cb51002f95c8c6a1f1eb67ff9b2cb72" + sha256 cellar: :any_skip_relocation, sonoma: "295bbe6bc8b84952958cac5b33b021419cb51002f95c8c6a1f1eb67ff9b2cb72" + sha256 cellar: :any_skip_relocation, ventura: "295bbe6bc8b84952958cac5b33b021419cb51002f95c8c6a1f1eb67ff9b2cb72" + sha256 cellar: :any_skip_relocation, arm64_linux: "d72d15c820e4ca74fe4dab7e004c7346b33d8aaf793a84f7169f0a804cf4e61b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c48a16e4d1c11696c5561210e47f3bb922c10f7b7bfdd0f6d3298bf0814d0caf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + + resource "IO::Socket::INET6" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-2.73.tar.gz" + sha256 "b6da746853253d5b4ac43191b4f69a4719595ee13a7ca676a8054cf36e6d16bb" + end + + resource "IO::Socket::SSL" do + url "https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.084.tar.gz" + sha256 "a60d1e04e192363155329560498abd3412c3044295dae092d27fb6e445c71ce1" + end + + resource "JSON::PP" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-PP-4.16.tar.gz" + sha256 "8bc2f162bafc42645c489905ad72540f0d3c284b360c96299095183c30cc9789" + end + + resource "Net::SSLeay" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.92.tar.gz" + sha256 "47c2f2b300f2e7162d71d699f633dd6a35b0625a00cbda8c50ac01144a9396a9" + end + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV["PERL_MM_USE_DEFAULT"] = "1" + ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + end + + system "./autogen" + system "./configure", *std_configure_args, "--sysconfdir=#{etc}", "--localstatedir=#{var}", "CURL=curl" + system "make", "install", "CURL=curl" + + # Install sample files + inreplace "sample-ddclient-wrapper.sh", "/etc/ddclient", "#{etc}/ddclient" + inreplace "sample-etc_cron.d_ddclient", "/usr/bin/ddclient", "#{opt_bin}/ddclient" + + doc.install %w[sample-ddclient-wrapper.sh sample-etc_cron.d_ddclient] + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) if OS.linux? + end + + def post_install + (var/"run").mkpath + chmod "go-r", pkgetc/"ddclient.conf" + end + + def caveats + <<~EOS + For ddclient to work, you will need to customise the configuration + file at `#{etc}/ddclient.conf`. + + Note: don't enable daemon mode in the configuration file; see + additional information below. + + The next reboot of the system will automatically start ddclient. + + You can adjust the execution interval by changing the value of + StartInterval (in seconds) in /Library/LaunchDaemons/#{launchd_service_path.basename}. + EOS + end + + service do + run [opt_bin/"ddclient", "-file", etc/"ddclient.conf"] + run_type :interval + interval 300 + require_root true + end + + test do + begin + pid = fork do + exec bin/"ddclient", "-file", etc/"ddclient.conf", "-debug", "-verbose", "-noquiet" + end + sleep 1 + ensure + Process.kill "TERM", pid + Process.wait + end + $CHILD_STATUS.success? + end +end diff --git a/Formula/d/ddcutil.rb b/Formula/d/ddcutil.rb new file mode 100644 index 0000000000000..4b10cb71eaca0 --- /dev/null +++ b/Formula/d/ddcutil.rb @@ -0,0 +1,41 @@ +class Ddcutil < Formula + desc "Control monitor settings using DDC/CI and USB" + homepage "https://www.ddcutil.com" + url "https://www.ddcutil.com/tarballs/ddcutil-2.2.1.tar.gz" + sha256 "71c8760c383dd5fa21817839b86b9850ac6d558e133e2d6fea88dfaf04448ae6" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.ddcutil.com/releases/" + regex(/href=.*?ddcutil[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "82dbb304e63bb4f56aca9c3dc86655d39970e2923d079ce64323e169e36d0866" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d298710ca164306270b140ff563533ed29feabc306dadb2d345ed5968a720d4c" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "i2c-tools" + depends_on "jansson" + depends_on "kmod" + depends_on "libdrm" + depends_on "libusb" + depends_on "libx11" + depends_on "libxext" + depends_on "libxrandr" + depends_on :linux + depends_on "systemd" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "The following tests probe the runtime environment using multiple overlapping methods.", + shell_output("#{bin}/ddcutil environment") + end +end diff --git a/Formula/d/ddd.rb b/Formula/d/ddd.rb new file mode 100644 index 0000000000000..1ae1823fec8bf --- /dev/null +++ b/Formula/d/ddd.rb @@ -0,0 +1,93 @@ +class Ddd < Formula + desc "Graphical front-end for command-line debuggers" + homepage "https://www.gnu.org/software/ddd/" + url "https://ftpmirror.gnu.org/gnu/ddd/ddd-3.4.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/ddd/ddd-3.4.1.tar.gz" + sha256 "b87517a6c3f9611566347e283a2cf931fa369919b553536a2235e63402f4ee89" + license all_of: [ + "GPL-3.0-or-later", + "GFDL-1.1-no-invariants-or-later", # ddd/ddd-themes.info + "GFDL-1.3-no-invariants-or-later", # ddd/ddd.info + "HPND-sell-variant", # ddd/motif/LabelH.C + "MIT-open-group", # ddd/athena_ddd/PannerM.C + ] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "25083bd2eeac8896b1406a713d5ca294cacb800fee16e0368e434e6715b72644" + sha256 arm64_sequoia: "3c31137211b8185a0b8e3ceffce6474c803cf8790348211ad0690162697a1613" + sha256 arm64_sonoma: "73e84236c870313e5a43e936998545961609c5f43104e6b57cd693a03dc52a5d" + sha256 arm64_ventura: "d287abe1d656058174b03b2e1215e7eee7d996fad1e041fd8d14e573b3e0716f" + sha256 arm64_monterey: "e2f58c650c498dd2ab90369baee0dad09b169e503e8616894f6814ba543310a8" + sha256 sonoma: "19e15c98f1732a8c5032734ecdab5f4aec373ef3991bc65c7ce4e5f81b526861" + sha256 ventura: "47ff49d7888461a987aee0ae62749dc96d6c44c6825f09a61d637f13cd736198" + sha256 monterey: "33047c998d6856a9425df4fa92fd9f3fdfe7717921def4bb814ae82ceb928927" + sha256 arm64_linux: "dc505cec52e34353405b1d359a97aa65f7b06a89cbba7be62ce119bd17c6d24d" + sha256 x86_64_linux: "52266be4e6e825db9c2941e2ab44002d1d3707b379e0339d3ddf12af18f81ad6" + end + + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxaw" + depends_on "libxft" + depends_on "libxmu" + depends_on "libxpm" + depends_on "libxt" + depends_on "openmotif" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gnu-sed" => :build + depends_on "libice" + depends_on "libsm" + depends_on "libxext" + depends_on "libxp" + + on_intel do + depends_on "gdb" => :test + end + end + + on_linux do + depends_on "gdb" => :test + end + + def install + # Use GNU sed due to ./unumlaut.sed: RE error: illegal byte sequence + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + # Help configure find freetype headers + ENV.append_to_cflags "-I#{Formula["freetype"].opt_include}/freetype2" + + system "./configure", "--disable-silent-rules", + "--enable-builtin-app-defaults", + "--enable-builtin-manual", + *std_configure_args + + # From MacPorts: make will build the executable "ddd" and the X resource + # file "Ddd" in the same directory, as HFS+ is case-insensitive by default + # this will loosely FAIL + system "make", "EXEEXT=exe" + + ENV.deparallelize + system "make", "install", "EXEEXT=exe" + mv bin/"dddexe", bin/"ddd" + end + + test do + output = shell_output("#{bin}/ddd --version") + output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) + assert_match version.to_s, output + + if OS.mac? && Hardware::CPU.arm? + # gdb is not supported on macOS ARM. Other debuggers like --perl need window + # and using --nw causes them to just pass through to normal execution. + # Since it is tricky to test window/XQuartz on CI, just check no crash. + assert_equal "Test", shell_output("#{bin}/ddd --perl --nw -e \"print 'Test'\"") + else + assert_match testpath.to_s, pipe_output("#{bin}/ddd --gdb --nw true 2>&1", "pwd\nquit") + end + end +end diff --git a/Formula/d/ddgr.rb b/Formula/d/ddgr.rb new file mode 100644 index 0000000000000..9129541b26499 --- /dev/null +++ b/Formula/d/ddgr.rb @@ -0,0 +1,31 @@ +class Ddgr < Formula + include Language::Python::Shebang + + desc "DuckDuckGo from the terminal" + homepage "https://github.com/jarun/ddgr" + url "https://github.com/jarun/ddgr/archive/refs/tags/v2.2.tar.gz" + sha256 "a858e0477ea339b64ae0427743ebe798a577c4d942737d8b3460bce52ac52524" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "fe1e5b35a67ae65335a46b0cc9fa8d362f9196aa64a527f7f73210d95fd97848" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "ddgr" + system "make", "install", "PREFIX=#{prefix}" + bash_completion.install "auto-completion/bash/ddgr-completion.bash" => "ddgr" + fish_completion.install "auto-completion/fish/ddgr.fish" + zsh_completion.install "auto-completion/zsh/_ddgr" + end + + test do + ENV["PYTHONIOENCODING"] = "utf-8" + assert_match "q:Homebrew", shell_output("#{bin}/ddgr --debug --noprompt Homebrew 2>&1") + end +end diff --git a/Formula/d/ddh.rb b/Formula/d/ddh.rb new file mode 100644 index 0000000000000..1af0b10ac253b --- /dev/null +++ b/Formula/d/ddh.rb @@ -0,0 +1,53 @@ +class Ddh < Formula + desc "Fast duplicate file finder" + homepage "https://github.com/darakian/ddh" + url "https://github.com/darakian/ddh/archive/refs/tags/0.13.0.tar.gz" + sha256 "87010f845fa68945d2def4a05a3eb796222b67c5d3cea41e576cfaf2ab078ef8" + license "LGPL-3.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b2788b0596f11e1662e743517535b5b5d61a034fa8b6ad5d4df84853905e58e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c38c189b4375eb8031c68bcd0c6f070ec7ce5c851306322d0b15d5c0a797f242" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7bea4c9d500b99400e8d5c043cb3b2fd9e2312198af614f23d1c99274b802809" + sha256 cellar: :any_skip_relocation, arm64_ventura: "572994664d86a2abf9505e70949230fa17b613dc7e594425f58a21ea7eb749f1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "073c663ddac4ba5e99753ce7e281dc9c3fc6d575cc8b4ef2490e6fa99cd1a6eb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f5f09cae94b0d72be22b34cd17a879a15cf7e2d69460af1a384e82a30ef963e" + sha256 cellar: :any_skip_relocation, sonoma: "c66e8a238ae7fe72ee07cb89113274e147d75519c5169a751d62104feda7d25b" + sha256 cellar: :any_skip_relocation, ventura: "b6d9b4efbd475c242879125f200dd62ce1a5ac036faa100a098c5b5b80e04084" + sha256 cellar: :any_skip_relocation, monterey: "029526e26902af6c10c161f6558b088f3eab0adebdcf6f0f10cd2abca092e053" + sha256 cellar: :any_skip_relocation, big_sur: "49eb05e9c24cbbfd4c8483046102211c865b95c218bce76269a48a3b5440584b" + sha256 cellar: :any_skip_relocation, catalina: "74c576492d6d3809831b378c382e885b05425eda763b280ab17fa5cafb222a08" + sha256 cellar: :any_skip_relocation, arm64_linux: "fba06bfb3b2ac0e4e9c5163d60477a6bd69719ea8f7c629d47ebce573cadaed4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "119fff1c3e34608d859d79aef5a4958176a9685000f7686941bf6b26d5f3f5c6" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test/file1").write "brew test" + (testpath/"test/file2").write "brew test" + + expected = <<~EOS + 2 Total files (with duplicates): 0 Kilobytes + 1 Total files (without duplicates): 0 Kilobytes + 0 Single instance files: 0 Kilobytes + 1 Shared instance files: 0 Kilobytes (2 instances) + Standard results written to Results.txt + EOS + + assert_equal expected, shell_output("#{bin}/ddh -d test") + + assert_match "Duplicates", (testpath/"Results.txt").read + end +end diff --git a/Formula/d/ddns-go.rb b/Formula/d/ddns-go.rb new file mode 100644 index 0000000000000..c8d60c1f42a08 --- /dev/null +++ b/Formula/d/ddns-go.rb @@ -0,0 +1,40 @@ +class DdnsGo < Formula + desc "Simple and easy-to-use DDNS" + homepage "https://github.com/jeessy2/ddns-go" + url "https://github.com/jeessy2/ddns-go/archive/refs/tags/v6.13.2.tar.gz" + sha256 "a729096b6d0d769223a21dfd82040b264d6f672d6018d08157f400de321d381e" + license "MIT" + head "https://github.com/jeessy2/ddns-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5fa70da4c968bc0a22d4f8a1ce94e3b949c47f58d2b79e03507d3a0acc6ef04c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fa70da4c968bc0a22d4f8a1ce94e3b949c47f58d2b79e03507d3a0acc6ef04c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5fa70da4c968bc0a22d4f8a1ce94e3b949c47f58d2b79e03507d3a0acc6ef04c" + sha256 cellar: :any_skip_relocation, sonoma: "21c572af67b4b5c1f5c798d05bdcccd31f8bf46551b3acb55068a24998d36540" + sha256 cellar: :any_skip_relocation, arm64_linux: "e535c0730fe244ea812e334758a50b4ab64f2d5f37aaffd7027534f90bf9e38d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00a185f4a0136b8fa577c3ad1f900d7b0ad24408a57372598a5aa2d23a31b04e" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=v#{version} + -X main.buildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/ddns-go -v") + + port = free_port + spawn "#{bin}/ddns-go -l :#{port} -c #{testpath}/ddns-go.yaml" + sleep 1 + + system "curl", "--silent", "localhost:#{port}/clearLog" + output = shell_output("curl --silent localhost:#{port}/logs") + assert_match "Temporary Redirect", output + end +end diff --git a/Formula/d/ddrescue.rb b/Formula/d/ddrescue.rb new file mode 100644 index 0000000000000..e67c59e791a9d --- /dev/null +++ b/Formula/d/ddrescue.rb @@ -0,0 +1,29 @@ +class Ddrescue < Formula + desc "GNU data recovery tool" + homepage "https://www.gnu.org/software/ddrescue/ddrescue.html" + url "https://ftpmirror.gnu.org/gnu/ddrescue/ddrescue-1.29.1.tar.lz" + mirror "https://ftp.gnu.org/gnu/ddrescue/ddrescue-1.29.1.tar.lz" + sha256 "ddd7d45df026807835a2ec6ab9c365df2ef19e8de1a50ffe6886cd391e04dd75" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "729d6d7adbd0125a8639834b89a066e3a76f75005db9ef984f81fef433b8e797" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e476b59ccb2c4e24c8318a351ebb15663bfde3c084278d0adf4327e249de30b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "341eba2a95b1cf48b8c5d07411ebfdeaa180a6b103eb7e52e0f76a6120c4ce5d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75a1da03c8dc5b41d6d2e7157bc938c287d62a50334a369483da7d221c0755ed" + sha256 cellar: :any_skip_relocation, sonoma: "2277f04febdcaacfcaa8d3bbbe08ea89be1f9be6b6e94bbe927e035c634f6e6c" + sha256 cellar: :any_skip_relocation, ventura: "f87510cf76af9fd9ceb1a54ab75c2431f165c231f58b86906ca157a4ce25cd3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5a833745d143f8cdfefb829e0ab7eff79790390e7d02f3eb05a69d00094b9bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e07569c6bae809a4554d8054e5cf0e110cceb71954e641d1bfc3a4d1b455bed" + end + + def install + system "./configure", "--prefix=#{prefix}", + "CXX=#{ENV.cxx}" + system "make", "install" + end + + test do + system bin/"ddrescue", "--force", "--size=64Ki", "/dev/zero", File::NULL + end +end diff --git a/Formula/d/deadfinder.rb b/Formula/d/deadfinder.rb new file mode 100644 index 0000000000000..027cb7145ea29 --- /dev/null +++ b/Formula/d/deadfinder.rb @@ -0,0 +1,50 @@ +class Deadfinder < Formula + desc "Finds broken links" + homepage "https://rubygems.org/gems/deadfinder" + url "https://github.com/hahwul/deadfinder/archive/refs/tags/1.9.1.tar.gz" + sha256 "60942329779ba01d92532bdd3a937bfd04686693b911e6193692daee9634b4e6" + license "MIT" + head "https://github.com/hahwul/deadfinder.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "448e26881179bf3f0f022981f67d1347c8d3161e06a4d1ad745f9769d646bbf1" + sha256 cellar: :any, arm64_sequoia: "811b46222ba9c98fd2b3a151dd4242dbaa14fe6b3c1b32539740aa0ed4143406" + sha256 cellar: :any, arm64_sonoma: "6213001f424bb7679faa42135fd6d97a4fad66812c79e6001be753310868c974" + sha256 cellar: :any, sonoma: "610e13ff9a7ee7ae751855dc9ada543f44edeb0077e3083c63e8e82cfa12d79e" + sha256 cellar: :any_skip_relocation, arm64_linux: "38563a363b2664a1b9460d15020697a0800027508947d164d9bdc2e9215208dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16b97dbdf95b938d559ebba67ed8f6a66993d3b17b18d026faa55cb8ec22bb96" + end + + depends_on "pkgconf" => :build + depends_on "ruby" + + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + def install + ENV["BUNDLE_FORCE_RUBY_PLATFORM"] = "1" + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg + ENV["BUNDLE_WITHOUT"] = "development test" + ENV["GEM_HOME"] = libexec + ENV["NOKOGIRI_USE_SYSTEM_LIBRARIES"] = "1" + + system "bundle", "install" + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + + # Remove mkmf.log files to avoid shims references + rm Dir["#{libexec}/extensions/*/*/*/mkmf.log"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/deadfinder version") + + assert_match "Task completed", shell_output("#{bin}/deadfinder url https://brew.sh") + end +end diff --git a/Formula/d/deark.rb b/Formula/d/deark.rb new file mode 100644 index 0000000000000..ffdc4300b5323 --- /dev/null +++ b/Formula/d/deark.rb @@ -0,0 +1,39 @@ +class Deark < Formula + desc "File conversion utility for older formats" + homepage "https://entropymine.com/deark/" + url "https://entropymine.com/deark/releases/deark-1.7.1.tar.gz" + sha256 "f7e7d286e0e3b8003e1e758b59f8aee1fa2dd24e1c9aceb03d4e603cb8efcad4" + license "MIT" + + livecheck do + url "https://entropymine.com/deark/releases/" + regex(/href=.*?deark[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ca11890ec7e64ca56ca323a81f7aa13b16f2b17920055c57ae0c5cba61c5f909" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c414593cf0e104f8d6e2533a60bb8b84cdea746979c0a78ee77579f16160bb02" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "853f3505aa76f132c3decc2beeb078dbbc820ac029c9d0b380bc92fccc6caefa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "76255d15e1004ad0f221385140922b681d0b86a60fc6cd8fe38d885e1e6b7ac0" + sha256 cellar: :any_skip_relocation, sonoma: "f59ec8540e631ef2638cea25659f5d0d440ad080ddc776883bd8bc87bbf65eb8" + sha256 cellar: :any_skip_relocation, ventura: "2e7c24cf96486214b2a7674e5b3d4f4454b74a1c4e6858620128dc9b73b187c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "db7f69c2b1b09fd39dba3c04c1f9fa598d5d5d7e5c0ff7867bafba85b937d636" + sha256 cellar: :any_skip_relocation, x86_64_linux: "866c1952cc923ea0347d00d07766bde3cc678f46cb39df4ab34fcb3b635ec3af" + end + + def install + system "make" + bin.install "deark" + end + + test do + require "base64" + + (testpath/"test.gz").write ::Base64.decode64 <<~EOS + H4sICKU51VoAA3Rlc3QudHh0APNIzcnJ11HwyM9NTSpKLVfkAgBuKJNJEQAAAA== + EOS + system bin/"deark", "test.gz" + file = (testpath/"output.000.test.txt").readlines.first + assert_match "Hello, Homebrew!", file + end +end diff --git a/Formula/d/debianutils.rb b/Formula/d/debianutils.rb new file mode 100644 index 0000000000000..82bec73b78287 --- /dev/null +++ b/Formula/d/debianutils.rb @@ -0,0 +1,47 @@ +class Debianutils < Formula + desc "Miscellaneous utilities specific to Debian" + homepage "https://tracker.debian.org/pkg/debianutils" + url "https://deb.debian.org/debian/pool/main/d/debianutils/debianutils_5.23.2.tar.xz" + sha256 "79e524b7526dba2ec5c409d0ee52ebec135815cf5b2907375d444122e0594b69" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?debianutils[._-]v?(\d+(?:\.\d+)+).dsc/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "329887b6a8522b5f303b0787af83a7b26ae386d7feb87c069c4ce2387a9ab785" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "697c3bde9f2847949cd3b06bcb526b7afc8526828d5c9498b6826a77f5e69f3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05a1e2686176a116605d4ab6e5264340ca9dd83aca4533ada3f2cd56dc7a5dff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "467ec22e22e45c4bf5ac0ec66521805fd548a2067fd35255e3cfc29a773aca36" + sha256 cellar: :any_skip_relocation, sonoma: "08d55d96cb4eae2950159943ba4f0e010adfeb01c8541a2d14edce96a4bcb945" + sha256 cellar: :any_skip_relocation, ventura: "cf09f6c0bd7042a1c473c9970ab98f28abc2fb3e7fb77cf51f7180ad05b07299" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f255a4df75b8734c998aa1ba8215d945bc542ad7c119854f48cefbaa6ab8909" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3425081c6784a3a440bad62d02f8d0111decbf747bcf7df94676bd4b74e36e76" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build # for libintl + depends_on "libtool" => :build + depends_on "po4a" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + + # Some commands are Debian Linux specific and we don't want them, so install specific tools + bin.install "run-parts", "ischroot", "tempfile" + man1.install "ischroot.1", "tempfile.1" + man8.install "run-parts.8" + end + + test do + output = shell_output("#{bin}/tempfile -d #{Dir.pwd}").strip + assert_path_exists Pathname.new(output) + end +end diff --git a/Formula/d/debugbreak.rb b/Formula/d/debugbreak.rb new file mode 100644 index 0000000000000..5ba3508196774 --- /dev/null +++ b/Formula/d/debugbreak.rb @@ -0,0 +1,32 @@ +class Debugbreak < Formula + desc "Break into the debugger programmatically" + homepage "https://github.com/scottt/debugbreak" + url "https://github.com/scottt/debugbreak/archive/refs/tags/v1.0.tar.gz" + sha256 "62089680cc1cd0857519e2865b274ed7534bfa7ddfce19d72ffee41d4921ae2f" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c3d74ba626694bb1db1d81d3efac9b1a9ca9c71521212bb937bfd897d677272f" + end + + def install + include.install "debugbreak.h" + pkgshare.install "debugbreak-gdb.py" + end + + test do + (testpath/"test.c").write <<~C + #include <debugbreak.h> + int main() { + debug_break(); /* will break into debugger */ + return 0; + } + C + system ENV.cc, "-I#{include}", "test.c", "-o", "test" + pid = Process.spawn("./test") + assert_equal Signal.list.fetch("TRAP"), Process::Status.wait(pid).termsig + end +end diff --git a/Formula/d/decasify.rb b/Formula/d/decasify.rb new file mode 100644 index 0000000000000..633f6aa51ec81 --- /dev/null +++ b/Formula/d/decasify.rb @@ -0,0 +1,44 @@ +class Decasify < Formula + desc "Utility for casting strings to title-case according to locale-aware style guides" + homepage "https://github.com/alerque/decasify" + url "https://github.com/alerque/decasify/releases/download/v0.10.1/decasify-0.10.1.tar.zst" + sha256 "5cf9781df864c211d191f73ae014da7de1e02cad6507850728fea5a0b9f946e7" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "22067e4a0be17cd26d20e8b85a197563931e6d19303bd7598d8bf8e3027677ea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "35c382d68af07363f18cc1384c4f532d7844423e80da9463e99e1e5f6f0ac799" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae81a1439bc5fd75fe76d00beac0d7ca2f3a353406cda1ea185d04a4669c3e62" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d08eb9e9cf5109f3f98550bfd95e9034c708f892164f564aef14caef1b050dc" + sha256 cellar: :any_skip_relocation, sonoma: "9ba5797890e07052e2551b57eb6bbb658f8b5dc153acc3fee17c08a0dca66a6c" + sha256 cellar: :any_skip_relocation, ventura: "b5c26c8f65ce573687bcfc1dde10b6533f7e459ac015da51aefdf881449a98e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc2aa4d7df5cb0248eaf037e5b9a1865439d15cab73d3ca02a26cb3efacca67e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd970ae1d4b0e1b67a015c65d80e633657761fbc357a0c9e60075ca991c83658" + end + + head do + url "https://github.com/alerque/decasify.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "jq" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + system "./bootstrap.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "decasify v#{version}", shell_output("#{bin}/decasify --version") + assert_match "Ben ve İvan", shell_output("#{bin}/decasify -l tr -c title 'ben VE ivan'") + end +end diff --git a/Formula/d/deck.rb b/Formula/d/deck.rb new file mode 100644 index 0000000000000..a5cf412119bc2 --- /dev/null +++ b/Formula/d/deck.rb @@ -0,0 +1,30 @@ +class Deck < Formula + desc "Creates slide deck using Markdown and Google Slides" + homepage "https://github.com/k1LoW/deck" + url "https://github.com/k1LoW/deck/archive/refs/tags/v1.21.6.tar.gz" + sha256 "3bef75b2511d670e2b9bf1e862fc1699ccb1d86a40e064321c1d9cca4a9b32e1" + license "MIT" + head "https://github.com/k1LoW/deck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be0c9c52497dfc33f9027af097de5c963330a962a725ca046a4fc17fea6acfa0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be0c9c52497dfc33f9027af097de5c963330a962a725ca046a4fc17fea6acfa0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be0c9c52497dfc33f9027af097de5c963330a962a725ca046a4fc17fea6acfa0" + sha256 cellar: :any_skip_relocation, sonoma: "db30dd298903cf219ba499df9afb3b25540e985bddbd8248ecdeeb64c8bfdaf6" + sha256 cellar: :any_skip_relocation, arm64_linux: "f02e666613be605d6904a322de2e9c395001b4699e9f39e95cc326bd753d6981" + sha256 cellar: :any_skip_relocation, x86_64_linux: "581c6721da01acf1c7f3ed248f8adba69139c1adf14e0dfbf8b5525289c3b0bf" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/deck" + + generate_completions_from_executable(bin/"deck", "completion", shells: [:zsh, :bash, :fish]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/deck --version") + assert_match "presentation ID is required", shell_output("#{bin}/deck export 2>&1", 1) + end +end diff --git a/Formula/d/decker.rb b/Formula/d/decker.rb new file mode 100644 index 0000000000000..81f845793f3a0 --- /dev/null +++ b/Formula/d/decker.rb @@ -0,0 +1,35 @@ +class Decker < Formula + desc "HyperCard-like multimedia sketchpad" + homepage "https://beyondloom.com/decker/" + url "https://github.com/JohnEarnest/Decker/archive/refs/tags/v1.60.tar.gz" + sha256 "7ead137f20588711c50e04a432c84f1ac1ca7fa71f3e7bf547b315ce34891a9a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "39400735705c94667f90a70c48b4b194f350ae38c30f04a07fff4921e0ab3de6" + sha256 cellar: :any, arm64_sequoia: "36f133feb00168761d7846d90c6c705bfc3afe3ce940fe57a1859b35c1bb824d" + sha256 cellar: :any, arm64_sonoma: "6f0240e034e4156247dff2b47ddada4970161997914c3d72860520c4b434c3a3" + sha256 cellar: :any, sonoma: "6c44cd3c87d02fde0406653c72bbb97173c167bbc5c1df36529319f017494c79" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7210b26ed5b205182d5a9d806c740703fa312f4b402a38640944e931face441" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c7dfa7957186df10d33c95aaedc70092c45a61c3b6ee570a97ee86061498564" + end + + depends_on "sdl2" + depends_on "sdl2_image" + + on_linux do + depends_on "vim" => :build # uses xxd + end + + def install + extra_flags = "-I#{HOMEBREW_PREFIX}/include/SDL2" + system "make", "EXTRA_FLAGS=#{extra_flags}", "lilt" + system "make", "EXTRA_FLAGS=#{extra_flags}", "decker" + system "make", "PREFIX=#{prefix}", "install" + pkgshare.install "examples" + end + + test do + assert_match '"depth":', shell_output("#{bin}/lilt #{pkgshare}/examples/lilt/mandel.lil") + end +end diff --git a/Formula/d/decompose.rb b/Formula/d/decompose.rb new file mode 100644 index 0000000000000..083e44bc6eadd --- /dev/null +++ b/Formula/d/decompose.rb @@ -0,0 +1,30 @@ +class Decompose < Formula + desc "Reverse-engineering tool for docker environments" + homepage "https://github.com/s0rg/decompose" + url "https://github.com/s0rg/decompose/archive/refs/tags/v1.11.5.tar.gz" + sha256 "1f2575d792bc5e04c57090534b871a9fac8b1f02a444beee76bf67a298f19090" + license "MIT" + head "https://github.com/s0rg/decompose.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e424bcddda5b1200be42ce59fcba05e78308a31d6d48ad6b9799672a9e3b6cc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e424bcddda5b1200be42ce59fcba05e78308a31d6d48ad6b9799672a9e3b6cc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e424bcddda5b1200be42ce59fcba05e78308a31d6d48ad6b9799672a9e3b6cc2" + sha256 cellar: :any_skip_relocation, sonoma: "0ef475c1f47feea38981477e905c87127065416859e8db2b8445a00f062bb738" + sha256 cellar: :any_skip_relocation, arm64_linux: "9bf094ca260f9a4782ccc4cb19de95defff7c9706df99e8f9d4ae76efb8dcd4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a277b280703412ce4157ede52547d5095ed81a683567a4418756bfc82da3ad4" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.GitTag=#{version} -X main.GitHash=#{tap.user} -X main.BuildDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/decompose" + end + + test do + assert_match version.to_s, shell_output("#{bin}/decompose -version") + + assert_match "Building graph", shell_output("#{bin}/decompose -local 2>&1", 1) + end +end diff --git a/Formula/d/defaultbrowser.rb b/Formula/d/defaultbrowser.rb new file mode 100644 index 0000000000000..30a9d19230706 --- /dev/null +++ b/Formula/d/defaultbrowser.rb @@ -0,0 +1,35 @@ +class Defaultbrowser < Formula + desc "Command-line tool for getting & setting the default browser" + homepage "https://github.com/kerma/defaultbrowser" + url "https://github.com/kerma/defaultbrowser/archive/refs/tags/1.1.tar.gz" + sha256 "56249f05da912bbe828153d775dc4f497f5a8b453210c2788d6a439418ac2ea3" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "543a41c1fafa5da62bd86dd329b951a9a7d23b5aa2187b805f454c813308ddbc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7921f729c6afa9a924ffc175918d74e9767059e645491af9cae1df09fa80bfa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "babed0d9771439d08249d6ca58d8c468a2f646074a44ba3f8f1b90505054ad7f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75b63c5b51b3304105737dbbc18f4acca44aa2355dc06a06160220e5c07f42ef" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fdbee46ea9cdc0bf6adbea67eed257663c77d745af838f4a2e71f69987242d6c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "19e88d5316731019db1bafd3361af53fe3a4dd40348ac5a30bf34754b250f992" + sha256 cellar: :any_skip_relocation, sonoma: "3820ffb79652325db2076af61b4d5c879b3dd1acd20c56a88160c164f0cfe63b" + sha256 cellar: :any_skip_relocation, ventura: "6312f36faa5128d899e9410d89ecbf6425fc2e5aff3ce30398092f6c13ad8768" + sha256 cellar: :any_skip_relocation, monterey: "cb836a15dc466342c11bb7cdf35370b261b77723d81438664f89e84513a06f8f" + sha256 cellar: :any_skip_relocation, big_sur: "e796471951ee1290e11172aea1fff0b59c70cdbbfef43303bf11a3178e676a7f" + sha256 cellar: :any_skip_relocation, catalina: "e03bfa37fde424b0d7e76e6d2f99a26bad458e9d2bdf912db06d83d64bfe5a17" + end + + depends_on :macos + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # defaultbrowser outputs a list of browsers by default; + # safari is pretty much guaranteed to be in that list + assert_match "safari", shell_output(bin/"defaultbrowser") + end +end diff --git a/Formula/d/define.rb b/Formula/d/define.rb new file mode 100644 index 0000000000000..029fb59391d90 --- /dev/null +++ b/Formula/d/define.rb @@ -0,0 +1,37 @@ +class Define < Formula + desc "Command-line dictionary (thesaurus) app, with access to multiple sources" + homepage "https://github.com/Rican7/define" + url "https://github.com/Rican7/define/archive/refs/tags/v0.4.0.tar.gz" + sha256 "b8f0a83bbf345330d1081634e3b865527d4924be8e771501283abf17c4304514" + license "MIT" + head "https://github.com/Rican7/define.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b47971b7497fb628d7adea9bd2d657fc4b46ddd2215f8bc388287db13c845d0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "70a825ed3661f2536ed9680f5921d5074247464c0e7f3fd3d7c7c93bef9dc7c7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4882bc1b7b4cf9f7bfa1181ab067820042a45077ba6941b9a0966546959e7e5f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c301e8ee5532ce47928989534de2bb2b07c2b1361b47dad059bb3aabbeb5642d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "301a61ee7318cdac3c0e4fdbec3bb4a38dfe7c59a33c56f73b5849024ecfc525" + sha256 cellar: :any_skip_relocation, sonoma: "5a7046386262e0c8ead170a8ae73d20ee45eaaf0827fa6e5877d34a27dfa3f1c" + sha256 cellar: :any_skip_relocation, ventura: "52b5e52db7f2a1cd770fb042a28781496fc7c15bcd441fc9d2b0ec24ccfba3c6" + sha256 cellar: :any_skip_relocation, monterey: "f7e89c50d429ffd8a461b0124838d1425fa7b9e06f87889952ce942dc8fb3cb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9855c15c07669af36ff3940ef7df1b025483855f2b74f0d1c61833a399dd66a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5ed09144379f9439b144f3f4e93e394203057f479d9edb6309fadf11183d17c" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/Rican7/define/internal/version.identifier=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match "Free Dictionary API", shell_output("#{bin}/define --list-sources") + + output = shell_output("#{bin}/define -s FreeDictionaryAPI homebrew") + assert_match "A beer brewed by enthusiasts rather than commercially", output + + assert_match "define #{version}", shell_output("#{bin}/define --version") + end +end diff --git a/Formula/d/deheader.rb b/Formula/d/deheader.rb new file mode 100644 index 0000000000000..f1995f0cba7fb --- /dev/null +++ b/Formula/d/deheader.rb @@ -0,0 +1,50 @@ +class Deheader < Formula + include Language::Python::Shebang + + desc "Analyze C/C++ files for unnecessary headers" + homepage "http://www.catb.org/~esr/deheader/" + url "http://www.catb.org/~esr/deheader/deheader-1.11.tar.gz" + sha256 "553fd064a0e46ff5a88efd121e68d7613c5ffa405d1e7f775ce03111eae30882" + license "BSD-2-Clause" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "2caa30192b0b43e4892d9742d759b65d3cee8109c87e7169fd371a896cfd424e" + end + + head do + url "https://gitlab.com/esr/deheader.git", branch: "master" + depends_on "xmlto" => :build + end + + uses_from_macos "python" + + def install + system "make", "XML_CATALOG_FILES=#{etc}/xml/catalog" if build.head? + + bin.install "deheader" + man1.install "deheader.1" + + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"deheader" + end + + test do + (testpath/"test.c").write <<~C + #include <stdio.h> + #include <string.h> + int main(void) { + printf("%s", "foo"); + return 0; + } + C + assert_equal "121", shell_output("#{bin}/deheader test.c | tr -cd 0-9") + end +end diff --git a/Formula/d/dehydrated.rb b/Formula/d/dehydrated.rb new file mode 100644 index 0000000000000..8969ac45259de --- /dev/null +++ b/Formula/d/dehydrated.rb @@ -0,0 +1,24 @@ +class Dehydrated < Formula + desc "LetsEncrypt/acme client implemented as a shell-script" + homepage "https://dehydrated.io" + url "https://github.com/dehydrated-io/dehydrated/archive/refs/tags/v0.7.2.tar.gz" + sha256 "34d0e316dd86108cf302fddfe1c6d7b72c2fa98bed338ddd6c0155da2ec75a94" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "069a4a6c4658ce2051150ae2ee9245b5d40ceb175912ab8428ecd7e1a7519bcd" + end + + def install + bin.install "dehydrated" + man1.install "docs/man/dehydrated.1" + + # Build an `:all` bottle + inreplace bin/"dehydrated", "/usr/local/etc/dehydrated", "#{HOMEBREW_PREFIX}/etc/dehydrated" + end + + test do + system bin/"dehydrated", "--help" + end +end diff --git a/Formula/d/deja-gnu.rb b/Formula/d/deja-gnu.rb new file mode 100644 index 0000000000000..932d43d130163 --- /dev/null +++ b/Formula/d/deja-gnu.rb @@ -0,0 +1,37 @@ +class DejaGnu < Formula + desc "Framework for testing other programs" + homepage "https://www.gnu.org/software/dejagnu/" + url "https://ftpmirror.gnu.org/gnu/dejagnu/dejagnu-1.6.3.tar.gz" + mirror "https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.3.tar.gz" + sha256 "87daefacd7958b4a69f88c6856dbd1634261963c414079d0c371f589cd66a2e3" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8b7481a7c316dd293ddffc9a58fcfbd5289be84f4c2d39d6f4e69da6dd36bd80" + end + + head do + url "https://git.savannah.gnu.org/git/dejagnu.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "expect" + + def install + ENV.deparallelize # Or fails on Mac Pro + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--mandir=#{man}", *std_configure_args + # DejaGnu has no compiled code, so go directly to "make check" + system "make", "check" + system "make", "install" + end + + test do + system bin/"runtest" + end +end diff --git a/Formula/d/delve.rb b/Formula/d/delve.rb new file mode 100644 index 0000000000000..efbad4cc5a565 --- /dev/null +++ b/Formula/d/delve.rb @@ -0,0 +1,31 @@ +class Delve < Formula + desc "Debugger for the Go programming language" + homepage "https://github.com/go-delve/delve" + url "https://github.com/go-delve/delve/archive/refs/tags/v1.25.2.tar.gz" + sha256 "dda9adaafefa469662846d49a82cb7053605bce90bf2986d3f31be6929440ed0" + license "MIT" + head "https://github.com/go-delve/delve.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6587fb615e8b4dd36c02460095951d424f745b663c78b521ab74640789ddcbe2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "05b92a6ee63c24fcc526ed0cd7694e0c2e4b612106bd5ddbce0c857a67b35098" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05b92a6ee63c24fcc526ed0cd7694e0c2e4b612106bd5ddbce0c857a67b35098" + sha256 cellar: :any_skip_relocation, arm64_ventura: "05b92a6ee63c24fcc526ed0cd7694e0c2e4b612106bd5ddbce0c857a67b35098" + sha256 cellar: :any_skip_relocation, sonoma: "a1abdeab694792837edd47b8690b56221fe9dd276331a00bddf731ff83fd7b28" + sha256 cellar: :any_skip_relocation, ventura: "a1abdeab694792837edd47b8690b56221fe9dd276331a00bddf731ff83fd7b28" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0aac6d3203dbf6d33ef97f6f9f82ffad10c0ab4a76e012d9b615a8a4c5e9d11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d5f85e2ce1893ad6633373f0bd8845c0769ea5a4d9aee719e3234663c342412" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"dlv"), "./cmd/dlv" + + generate_completions_from_executable(bin/"dlv", "completion") + end + + test do + assert_match(/^Version: #{version}$/, shell_output("#{bin}/dlv version")) + end +end diff --git a/Formula/d/demumble.rb b/Formula/d/demumble.rb new file mode 100644 index 0000000000000..16ffb57438577 --- /dev/null +++ b/Formula/d/demumble.rb @@ -0,0 +1,37 @@ +class Demumble < Formula + desc "More powerful symbol demangler (a la c++filt)" + homepage "https://github.com/nico/demumble" + url "https://github.com/nico/demumble/archive/refs/tags/v1.3.0.tar.gz" + sha256 "29501fbd5522820a1672aea0292105b8706899e4e4b283ff51c126f79b3b2c41" + license "Apache-2.0" + head "https://github.com/nico/demumble.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "89efb9561af007453bc3c3ee5704c1958b917ad339ba809f9fc82ce6e664af19" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9d309fe6c5f674b30ec35a6e96839df670025d244eeaa5858ec82ec344e0088" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e34a9ee99465347fe0a36b113f79cdd98999262e29101b5a9699f0c190dde14e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a474a2fcc23b8ba6b7793248e428d1540601110a208e1ad0667fd2a7f8ed9751" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e5313425d4a9c7313925d1d36284a65d02ad1cc1a05ec63f3ae955bf70f321e7" + sha256 cellar: :any_skip_relocation, sonoma: "82fd0c99b4a2fc69cfb3992bbd6d79d18db9426050f9a78d3fdda12e81ae0982" + sha256 cellar: :any_skip_relocation, ventura: "3ba5801427e3a2ac99c397cb763935a7634eb7570e160d6b2f6024df4242a5d0" + sha256 cellar: :any_skip_relocation, monterey: "681cdce237bff42a2aa28ba656a68a7d3be054238f835851d065527226b44d06" + sha256 cellar: :any_skip_relocation, arm64_linux: "12aa9a00e75ae42f67f02ecc5be3492d5bf8e232052e8a69f16f870d8210a5b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e10f9d48f1ae69c4f432c8d1af2a69617a607d8f305cdf277062c1f764bafea3" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + + # CMakeLists.txt does not contain install rules + bin.install "build/demumble" + end + + test do + mangled = "__imp_?FLAGS_logtostderr@fLB@@3_NA" + demangled = "__imp_bool fLB::FLAGS_logtostderr" + assert_equal demangled, pipe_output(bin/"demumble", mangled) + end +end diff --git a/Formula/d/deno.rb b/Formula/d/deno.rb new file mode 100644 index 0000000000000..f4d0ea09f0b9a --- /dev/null +++ b/Formula/d/deno.rb @@ -0,0 +1,99 @@ +class Deno < Formula + desc "Secure runtime for JavaScript and TypeScript" + homepage "https://deno.com/" + url "https://github.com/denoland/deno/releases/download/v2.5.6/deno_src.tar.gz" + sha256 "62d3e8f87aed734cdce27660ebfed1c31b6b279f21f36070cdc64e828ae3bfb0" + license "MIT" + head "https://github.com/denoland/deno.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "871665778a8c0c47e08c015ea306602a87724084af607d9240945ecd25a6c045" + sha256 cellar: :any, arm64_sequoia: "bf884efe04ab87e287967e39aa9c39be38ed69430ab8243ca248fa3e89093af8" + sha256 cellar: :any, arm64_sonoma: "226116dd9a574107a2acea853afb68490bf237b0b80ae8bfa2a31b49c52fc983" + sha256 cellar: :any, sonoma: "efe8a5c311b761a6460f6d7ef89372c3efc164c86250b034a208889fd1694eb5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e414376d3a199003eb6ca2611ce5d7e12c85c9570aa935104aea8dbea64d9849" + sha256 cellar: :any_skip_relocation, x86_64_linux: "275b9f3112cd2a440f1c27b6aa6a4321e0d23e8d563a34d126d42d167c734896" + end + + depends_on "cmake" => :build + depends_on "lld" => :build + depends_on "llvm" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on xcode: ["15.0", :build] # v8 12.9+ uses linker flags introduced in xcode 15 + depends_on "little-cms2" + depends_on "sqlite" # needs `sqlite3_unlock_notify` + + uses_from_macos "python" => :build + uses_from_macos "libffi" + + on_linux do + depends_on "glib" => :build + depends_on "pcre2" => :build + end + + def llvm + Formula["llvm"] + end + + def install + inreplace "Cargo.toml" do |s| + # https://github.com/Homebrew/homebrew-core/pull/227966#issuecomment-3001448018 + s.gsub!(/^lto = true$/, 'lto = "thin"') + + # Avoid vendored dependencies. + s.gsub!(/^libffi-sys = "(.+)"$/, + 'libffi-sys = { version = "\\1", features = ["system"] }') + s.gsub!(/^rusqlite = { version = "(.+)", features = \["unlock_notify", "bundled", "session"/, + 'rusqlite = { version = "\\1", features = ["unlock_notify", "session"') + end + + ENV["LCMS2_LIB_DIR"] = Formula["little-cms2"].opt_lib + # env args for building a release build with our python3 and ninja + ENV["PYTHON"] = which("python3") + ENV["NINJA"] = which("ninja") + # Build with llvm and link against system libc++ (no runtime dep) + ENV["CLANG_BASE_PATH"] = llvm.prefix + + # use our clang version, and disable lld because the build assumes the lld + # supports features from newer clang versions (>=20) + ENV["GN_ARGS"] = "clang_version=#{llvm.version.major} use_lld=#{OS.linux?}" + + system "cargo", "install", "--no-default-features", "-vv", *std_cargo_args(path: "cli") + generate_completions_from_executable(bin/"deno", "completions") + end + + test do + require "utils/linkage" + + IO.popen("deno run -A -r https://fresh.deno.dev fresh-project", "r+") do |pipe| + pipe.puts "n" + pipe.puts "n" + pipe.close_write + pipe.read + end + + assert_match "# Fresh project", (testpath/"fresh-project/README.md").read + + (testpath/"hello.ts").write <<~TYPESCRIPT + console.log("hello", "deno"); + TYPESCRIPT + assert_match "hello deno", shell_output("#{bin}/deno run hello.ts") + assert_match "Welcome to Deno!", + shell_output("#{bin}/deno run https://deno.land/std@0.100.0/examples/welcome.ts") + + linked_libraries = [ + Formula["sqlite"].opt_lib/shared_library("libsqlite3"), + ] + unless OS.mac? + linked_libraries += [ + Formula["libffi"].opt_lib/shared_library("libffi"), + ] + end + linked_libraries.each do |library| + assert Utils.binary_linked_to_library?(bin/"deno", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/d/denominator.rb b/Formula/d/denominator.rb new file mode 100644 index 0000000000000..4c35210176243 --- /dev/null +++ b/Formula/d/denominator.rb @@ -0,0 +1,30 @@ +class Denominator < Formula + desc "Portable Java library for manipulating DNS clouds" + homepage "https://github.com/Netflix/denominator/tree/v4.7.1/cli" + url "https://search.maven.org/remotecontent?filepath=com/netflix/denominator/denominator-cli/4.7.1/denominator-cli-4.7.1-fat.jar" + sha256 "f2d09aaebb63ccb348dcba3a5cc3e94a42b0eae49e90ac0ec2b0a14adfbe5254" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/netflix/denominator/denominator-cli/maven-metadata.xml" + regex(%r{<version>v?(\d+(?:\.\d+)+)</version>}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "3da7d5704460e94f75bd1241c7d285971b2c22f23633c2cea058cccefc6a65e5" + end + + depends_on "openjdk" + + def install + (libexec/"bin").install "denominator-cli-#{version}-fat.jar" + bin.write_jar_script libexec/"bin/denominator-cli-#{version}-fat.jar", "denominator" + end + + test do + system bin/"denominator", "providers" + end +end diff --git a/Formula/d/dep-tree.rb b/Formula/d/dep-tree.rb new file mode 100644 index 0000000000000..09a02654e5838 --- /dev/null +++ b/Formula/d/dep-tree.rb @@ -0,0 +1,50 @@ +class DepTree < Formula + desc "Tool for visualizing dependencies between files and enforcing dependency rules" + homepage "https://github.com/gabotechs/dep-tree" + url "https://github.com/gabotechs/dep-tree/archive/refs/tags/v0.23.4.tar.gz" + sha256 "84f303594bce854527fe85208867a5060314ff3b24990d7c0f2846d364d81d4a" + license "MIT" + head "https://github.com/gabotechs/dep-tree.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "db5b0ba7c68023a7131be5df7f465f19b3e648954cdbcc32b18a64de497e6b5c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "277fe984bf29633301f181b12e8d447023ed0424dea708b6e32f48b32debce3b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "277fe984bf29633301f181b12e8d447023ed0424dea708b6e32f48b32debce3b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "277fe984bf29633301f181b12e8d447023ed0424dea708b6e32f48b32debce3b" + sha256 cellar: :any_skip_relocation, sonoma: "d53ad18af48f54b65b6ef9660a05f770517521c78864484a9c5578c596bd3fa3" + sha256 cellar: :any_skip_relocation, ventura: "d53ad18af48f54b65b6ef9660a05f770517521c78864484a9c5578c596bd3fa3" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d5805e360613eb12e4edf87da4ce8087ea292717af71ff5101dfa67f9710d27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79b4c548fcefaef96ec701766efffd0d20fa2a412d52d8d26a2f51a4e39fcf73" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"foo.js").write <<~JS + import { bar } from './bar' + JS + (testpath/"bar.js").write <<~JS + export const bar = 'bar' + JS + (testpath/"package.json").write <<~JSON + { "name": "foo" } + JSON + expected = <<~JSON + { + "tree": { + "foo.js": { + "bar.js": null + } + }, + "circularDependencies": [], + "errors": {} + } + JSON + + assert_equal expected, shell_output("#{bin}/dep-tree tree --json #{testpath}/foo.js") + end +end diff --git a/Formula/d/dependabot.rb b/Formula/d/dependabot.rb new file mode 100644 index 0000000000000..05ebcc2ec35c5 --- /dev/null +++ b/Formula/d/dependabot.rb @@ -0,0 +1,36 @@ +class Dependabot < Formula + desc "Tool for testing and debugging Dependabot update jobs" + homepage "https://github.com/dependabot/cli" + url "https://github.com/dependabot/cli/archive/refs/tags/v1.78.0.tar.gz" + sha256 "bb0b0c82ec8ff4b951983848c024cc7ea602177d95af7fc57a8da4ebc717b8af" + license "MIT" + head "https://github.com/dependabot/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6b30341a78b47c310bce433dc77361b47d788154ff83e257859fbb45f72f679" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6b30341a78b47c310bce433dc77361b47d788154ff83e257859fbb45f72f679" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f6b30341a78b47c310bce433dc77361b47d788154ff83e257859fbb45f72f679" + sha256 cellar: :any_skip_relocation, sonoma: "9ea0b10613197b26a93c1ca74cb66592938d9e45f38f9c30406531a7b6849169" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fcdb7150022f6d84fe4b5668e371368aa3ac94ef3fa777f3db39a7b63351df2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f6fd2dd0b5fc321f3a86045349814432dbe347d94707c5614707f10a85c58c2" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/dependabot/cli/cmd/dependabot/internal/cmd.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/dependabot" + + generate_completions_from_executable(bin/"dependabot", "completion") + end + + test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + assert_match("dependabot version #{version}", shell_output("#{bin}/dependabot --version")) + output = shell_output("#{bin}/dependabot update bundler Homebrew/homebrew 2>&1", 1) + assert_match("Cannot connect to the Docker daemon", output) + end +end diff --git a/Formula/d/dependency-check.rb b/Formula/d/dependency-check.rb new file mode 100644 index 0000000000000..e83cf157bf144 --- /dev/null +++ b/Formula/d/dependency-check.rb @@ -0,0 +1,54 @@ +class DependencyCheck < Formula + desc "OWASP dependency-check" + homepage "https://owasp.org/www-project-dependency-check/" + url "https://github.com/dependency-check/DependencyCheck/releases/download/v12.1.8/dependency-check-12.1.8-release.zip" + sha256 "bd51cf867950ffcfc4e074c43948127f450fceedc93f628d52815588412d38a6" + license "Apache-2.0" + head "https://github.com/dependency-check/DependencyCheck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1cbe9cd1451b89d47b296fa44ab4a5c41167b99edbd2693c13fcd6ad1336b382" + end + + depends_on "openjdk" + + def install + rm(Dir["bin/*.bat"]) + + chmod 0755, "bin/dependency-check.sh" + libexec.install Dir["*"] + + (bin/"dependency-check").write_env_script libexec/"bin/dependency-check.sh", + JAVA_HOME: Formula["openjdk"].opt_prefix + + (var/"dependencycheck").mkpath + libexec.install_symlink var/"dependencycheck" => "data" + + (etc/"dependencycheck").mkpath + jar = "dependency-check-core-#{version}.jar" + corejar = libexec/"lib/#{jar}" + system "unzip", "-o", corejar, "dependencycheck.properties", "-d", libexec/"etc" + (etc/"dependencycheck").install_symlink libexec/"etc/dependencycheck.properties" + end + + test do + # wait a random amount of time as multiple tests are being on different OS + # the sleep 1 seconds to 30 seconds assists with the NVD Rate Limiting issues + sleep(rand(1..30)) + output = shell_output("#{bin}/dependency-check --version") + assert_match "Dependency-Check Core version #{version}", output + + (testpath/"temp-props.properties").write <<~EOS + cve.startyear=2017 + analyzer.assembly.enabled=false + analyzer.dependencymerging.enabled=false + analyzer.dependencybundling.enabled=false + EOS + system bin/"dependency-check", "-P", "temp-props.properties", "-f", "XML", + "--project", "dc", "-s", libexec, "-d", testpath, "-o", testpath, + "--nvdDatafeed", "https://dependency-check.github.io/DependencyCheck/hb_nvd/", + "--disableKnownExploited", + "--disableOssIndex" # disable oss index due to username/password requirement + assert_path_exists testpath/"dependency-check-report.xml" + end +end diff --git a/Formula/d/deployer.rb b/Formula/d/deployer.rb new file mode 100644 index 0000000000000..11d11d7df2dcd --- /dev/null +++ b/Formula/d/deployer.rb @@ -0,0 +1,22 @@ +class Deployer < Formula + desc "Deployment tool written in PHP with support for popular frameworks" + homepage "https://deployer.org/" + url "https://github.com/deployphp/deployer/releases/download/v7.5.12/deployer.phar" + sha256 "b55c6609653e888c672d327c407f8bba6324b9c9cc24f9dcfb3f4b3922760632" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7ad0768ee13aaf77122d729f2248c27da237354fd1efc5bc0f41aeda11e5631b" + end + + depends_on "php" + + def install + bin.install "deployer.phar" => "dep" + end + + test do + system bin/"dep", "init", "--no-interaction" + assert_path_exists testpath/"deploy.php" + end +end diff --git a/Formula/d/depqbf.rb b/Formula/d/depqbf.rb new file mode 100644 index 0000000000000..8056c62f18d54 --- /dev/null +++ b/Formula/d/depqbf.rb @@ -0,0 +1,53 @@ +class Depqbf < Formula + desc "Solver for quantified boolean formulae (QBF)" + homepage "https://lonsing.github.io/depqbf/" + url "https://github.com/lonsing/depqbf/archive/refs/tags/version-6.03.tar.gz" + sha256 "9684bb1562bfe14559007401f52975554373546d3290a19618ee71d709bce76e" + license "GPL-3.0-or-later" + head "https://github.com/lonsing/depqbf.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5494cf1ffc209c33da83751528490bb7b8324e9cfde890d66231916ffa9c9eb9" + sha256 cellar: :any, arm64_sequoia: "77fb774ec31c1de16c6136751d66b3cb04d9a7bf0e2fb8c4e51a56db412310c4" + sha256 cellar: :any, arm64_sonoma: "dce4afe9355597c29c7656a5fcdda35983fe58b95ae72e966a6967a0360dd9d1" + sha256 cellar: :any, arm64_ventura: "221268b1bc924d55e1f8f3554b85f4ae91475792834f699217b03cce46ea63a3" + sha256 cellar: :any, arm64_monterey: "204b1a36f581b9609dcf0a47c0778169d0f26748e6a5fd869a1e7bba826be6f8" + sha256 cellar: :any, arm64_big_sur: "afc477a7b941f95abf0a3e7db86d60b2ee9ef9e8b2f4ecb84d84044a9dbb0bdf" + sha256 cellar: :any, sonoma: "2417e97e2936f086ff114fd6658d2c717a2a26a6541ef2ab2108a82200e324ee" + sha256 cellar: :any, ventura: "209da2f6f71ffd18105f99dd6333a0547865da8725e109138fe9e3e138b8300c" + sha256 cellar: :any, monterey: "135536ee418fef5b3e8002301dca15913770d3b2d81c8b08b9bb2fef67bb56cc" + sha256 cellar: :any, big_sur: "e86513b7cd6ad6ac68c7aa8a1738d8586fe6e20a7a46237dcbc3d54d735ff6d0" + sha256 cellar: :any, catalina: "432518e2ccee50695a9e79b4fe558142d78945ef96fcdbf7cccf090d72ec6543" + sha256 cellar: :any_skip_relocation, arm64_linux: "27916b378549105a9812407772165660f12c3ac27be9af6995fd09f5bee27827" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e13e19078a40264180e470c713e834493e8189f3b45a263318f17d1b4830f73" + end + + resource "nenofex" do + url "https://github.com/lonsing/nenofex/archive/refs/tags/version-1.1.tar.gz" + sha256 "972755fd9833c9cd050bdbc5a9526e2b122a5550fda1fbb3ed3fc62912113f05" + end + + resource "picosat" do + url "https://fmv.jku.at/picosat/picosat-960.tar.gz" + sha256 "edb3184a04766933b092713d0ae5782e4a3da31498629f8bb2b31234a563e817" + end + + def install + (buildpath/"nenofex").install resource("nenofex") + (buildpath/"picosat-960").install resource("picosat") + system "./compile.sh" + bin.install "depqbf" + lib.install "libqdpll.a" + if OS.mac? + lib.install "libqdpll.1.0.dylib" + else + lib.install "libqdpll.so.1.0" + end + end + + test do + system bin/"depqbf", "-h" + end +end diff --git a/Formula/d/der-ascii.rb b/Formula/d/der-ascii.rb new file mode 100644 index 0000000000000..b0dc2c1316838 --- /dev/null +++ b/Formula/d/der-ascii.rb @@ -0,0 +1,33 @@ +class DerAscii < Formula + desc "Reversible DER and BER pretty-printer" + homepage "https://github.com/google/der-ascii" + url "https://github.com/google/der-ascii/archive/refs/tags/v0.7.0.tar.gz" + sha256 "e59e795eb12ed7618f8ac6fe3969277145536b1705c205d387f1bbc53c418160" + license "Apache-2.0" + head "https://github.com/google/der-ascii.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d4a18fe39f98ab330d0be623e93e92fc7fc21663a21e8fedb2e0c4108e42acce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4a18fe39f98ab330d0be623e93e92fc7fc21663a21e8fedb2e0c4108e42acce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4a18fe39f98ab330d0be623e93e92fc7fc21663a21e8fedb2e0c4108e42acce" + sha256 cellar: :any_skip_relocation, sonoma: "9f90e0345b09d95c169528d54c1910032ff8cda324a16fd80db4e9c5c8320dfd" + sha256 cellar: :any_skip_relocation, arm64_linux: "841b6ec4e24ecd59cece4aef187231f63b7fe67e61534ed43cd9c3d1aa80055a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7313f36585dbab7370d770765e0e8e974dfa6da731d44e0340c193307b83659" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(output: bin/"ascii2der", ldflags: "-s -w"), "./cmd/ascii2der" + system "go", "build", *std_go_args(output: bin/"der2ascii", ldflags: "-s -w"), "./cmd/der2ascii" + + pkgshare.install "samples" + end + + test do + cp pkgshare/"samples/cert.txt", testpath + system bin/"ascii2der", "-i", "cert.txt", "-o", "cert.der" + output = shell_output("#{bin}/der2ascii -i cert.der") + assert_match "Internet Widgits Pty Ltd", output + end +end diff --git a/Formula/d/derby.rb b/Formula/d/derby.rb new file mode 100644 index 0000000000000..ce49d0faf07e8 --- /dev/null +++ b/Formula/d/derby.rb @@ -0,0 +1,52 @@ +class Derby < Formula + desc "Apache Derby is an embedded relational database running on JVM" + homepage "https://db.apache.org/derby/" + url "https://www.apache.org/dyn/closer.lua?path=db/derby/db-derby-10.17.1.0/db-derby-10.17.1.0-bin.tar.gz" + mirror "https://archive.apache.org/dist/db/derby/db-derby-10.17.1.0/db-derby-10.17.1.0-bin.tar.gz" + sha256 "cbcfe4a0f07aab943cf89978f38d9047a9783233a770c54074bf555a65bedd42" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "687e0c8f8bfbcd850af4ef20e9588aa7b6a0ff52087896b3e05f2505abefa70e" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/*.bat"]) + libexec.install %w[lib test index.html LICENSE NOTICE RELEASE-NOTES.html + KEYS docs javadoc demo] + bin.install Dir["bin/*"] + bin.env_script_all_files libexec/"bin", + JAVA_HOME: Formula["openjdk"].opt_prefix, + DERBY_INSTALL: libexec, + DERBY_HOME: libexec + end + + def post_install + (var/"derby").mkpath + end + + service do + run [opt_bin/"NetworkServerControl", "-h", "127.0.0.1", "start"] + keep_alive true + working_dir var/"derby" + end + + test do + assert_match "libexec/lib/derby.jar] #{version}", + shell_output("#{bin}/sysinfo") + + pid = fork do + exec "#{bin}/startNetworkServer" + end + + begin + sleep 12 + exec "#{bin}/stopNetworkServer" + ensure + Process.wait(pid) + end + end +end diff --git a/Formula/d/descope.rb b/Formula/d/descope.rb new file mode 100644 index 0000000000000..16a1d0155ed80 --- /dev/null +++ b/Formula/d/descope.rb @@ -0,0 +1,33 @@ +class Descope < Formula + desc "Command-line utility for performing common tasks on Descope projects" + homepage "https://www.descope.com" + url "https://github.com/descope/descopecli/archive/refs/tags/v0.8.13.tar.gz" + sha256 "0f2aea0e65687db859563206c421567c4a5b664b5975fc621b4c2bada17ac6e5" + license "MIT" + head "https://github.com/descope/descopecli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "97080d5c4a5b566f9c676fe756ef90e23d10a736a33db8297e2fe6ba7ac6a1b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "056ade67fc5866133bd18e5c5a3f618fc89267f07b094e88ee363d5dc36581e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "056ade67fc5866133bd18e5c5a3f618fc89267f07b094e88ee363d5dc36581e4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "056ade67fc5866133bd18e5c5a3f618fc89267f07b094e88ee363d5dc36581e4" + sha256 cellar: :any_skip_relocation, sonoma: "a88224f03a533ea45d3a160caf9c19a3b49b1e5e1fcdd31877c9a8c6178654c5" + sha256 cellar: :any_skip_relocation, ventura: "a88224f03a533ea45d3a160caf9c19a3b49b1e5e1fcdd31877c9a8c6178654c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "50f25ac41fc1933b3a543c758d39100c3ddaeb85bfedb3abe7d82f1f867a1c63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32af76968ad226b9496568e0bf4c05252aa06a9ac12e4887d114f219d7ba5c97" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"descope", "completion") + end + + test do + assert_match "working with audit logs", shell_output("#{bin}/descope audit") + assert_match "managing projects", shell_output("#{bin}/descope project") + assert_match version.to_s, shell_output("#{bin}/descope --version") + end +end diff --git a/Formula/d/desed.rb b/Formula/d/desed.rb new file mode 100644 index 0000000000000..165240862392b --- /dev/null +++ b/Formula/d/desed.rb @@ -0,0 +1,58 @@ +class Desed < Formula + desc "Debugger for Sed" + homepage "https://soptik.tech/articles/building-desed-the-sed-debugger.html" + url "https://github.com/SoptikHa2/desed/archive/refs/tags/v1.2.2.tar.gz" + sha256 "73c75eaa65cccde5065a947e45daf1da889c054d0f3a3590d376d7090d4f651a" + license "GPL-3.0-or-later" + head "https://github.com/SoptikHa2/desed.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "96d7601c2d5624d9675565db1db7cf42269d14f4c0020658042019738a126f45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a633dbad86f2cacfe936a808372d3259ecbde4fcbb100d444d4dfe04b846c848" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f2a66cf69929b5532c8a46f34b39bb89edde7339f0e60523f613af7443e9b84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c94d25fc45f6e6e18e492b7a1b0a99bc050010ef581964235718147f41a8721d" + sha256 cellar: :any_skip_relocation, sonoma: "2160dd4cfb4d6c16d5563112a6871a012c2968e2313514c48cf7323fa2d1e714" + sha256 cellar: :any_skip_relocation, ventura: "8d561d9e6c8f3d55f5a708ce24cc786b2975f227ec86414cf312409adc5130c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d7939fa70a8187c637bc200bbdcf9f3ff97950032b92425a2c9ccdbdb8141f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74c7143b9c97e0dfa4bd338b665434834ffd17d5c1cd3582f346ae7498b5f2ad" + end + + depends_on "rust" => :build + depends_on "gnu-sed" => :test + + def install + system "cargo", "install", *std_cargo_args + man1.install "desed.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/desed --version") + # desed is a TUI application + # Just test that it opens when files are provided + assert_match "No such file or directory", shell_output("#{bin}/desed test.sed test.txt 2>&1") + + (testpath/"test.txt").write <<~EOS + 1 2 3 4 5 1 2 3 4 5 + 232 1 4 526 2 1 1 5 + EOS + (testpath/"test.sed").write <<~SED + = + :bbb + s/1/2/ + t bbb + H + p + G + G + p + SED + + begin + pid = spawn bin/"desed", testpath/"test.sed", testpath/"test.txt" + sleep 2 + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/d/desk.rb b/Formula/d/desk.rb new file mode 100644 index 0000000000000..921e9b8a2e771 --- /dev/null +++ b/Formula/d/desk.rb @@ -0,0 +1,32 @@ +class Desk < Formula + desc "Lightweight workspace manager for the shell" + homepage "https://github.com/jamesob/desk" + url "https://github.com/jamesob/desk/archive/refs/tags/v0.6.0.tar.gz" + sha256 "620bfba5b285d4d445e3ff9e399864063d7b0e500ef9c70d887fb7b157576c45" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "95e0acae98be5f6f5d3105ff2c6236d3e9648b8bbc1ab350e7735ed3935db8fe" + end + + def install + bin.install "desk" + bash_completion.install "shell_plugins/bash/desk" + zsh_completion.install "shell_plugins/zsh/_desk" + fish_completion.install "shell_plugins/fish/desk.fish" + end + + test do + (testpath/".desk/desks/test-desk.sh").write <<~SHELL + # + # Description: A test desk + # + SHELL + list = pipe_output("#{bin}/desk list") + assert_match "test-desk", list + assert_match "A test desk", list + end +end diff --git a/Formula/d/desktop-file-utils.rb b/Formula/d/desktop-file-utils.rb new file mode 100644 index 0000000000000..aadf2609e3164 --- /dev/null +++ b/Formula/d/desktop-file-utils.rb @@ -0,0 +1,64 @@ +class DesktopFileUtils < Formula + desc "Command-line utilities for working with desktop entries" + homepage "https://wiki.freedesktop.org/www/Software/desktop-file-utils/" + url "https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.28.tar.xz" + sha256 "4401d4e231d842c2de8242395a74a395ca468cd96f5f610d822df33594898a70" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "58ea38ae424ae85f68fef1140c866a220bee2ade0ec766bc833a23a4b66a554b" + sha256 arm64_sequoia: "8bb73bc697264796509115e1b1e59f08624c671897793b6f2ca099441bb98c39" + sha256 arm64_sonoma: "3edd064195ecd88f224ddb354c5ddca08ccb5b3834ced11f6a32d70c684ee2f9" + sha256 arm64_ventura: "742e551aae92506d4b627e8f34ef64ab38620c07fe776a8d8a9fe2a7fb564cbc" + sha256 sonoma: "0cc6bbad9d64a2b2edc4c55c06a5417e55c2566b15f3401828d1d64a7ad0953f" + sha256 ventura: "4d17379ae5028f3dfebc90aa1f4747edebb77f38ed58d53712e688bd05a0d864" + sha256 arm64_linux: "afe8ceef438b1ce5f1199ed7aab6c5ed1e0fe9478bba9b4c230246d11e21f2f7" + sha256 x86_64_linux: "ea37203ffdaf572e7da0e0991f31dad7effa361f41ed2eb9b549b1745996f308" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # fix lisp file install location + mkdir_p share/"emacs/site-lisp/desktop-file-utils" + mv share/"emacs/site-lisp/desktop-entry-mode.el", share/"emacs/site-lisp/desktop-file-utils" + end + + test do + (testpath/"test.desktop").write <<~DESKTOP + [Desktop Entry] + Version=1.0 + Type=Application + Name=Foo Viewer + Comment=The best viewer for Foo objects available! + TryExec=fooview + Exec=fooview %F + Icon=fooview + MimeType=image/x-foo; + Actions=Gallery;Create; + + [Desktop Action Gallery] + Exec=fooview --gallery + Name=Browse Gallery + + [Desktop Action Create] + Exec=fooview --create-new + Name=Create a new Foo! + Icon=fooview-new + DESKTOP + + system bin/"desktop-file-validate", "test.desktop" + end +end diff --git a/Formula/d/detach.rb b/Formula/d/detach.rb new file mode 100644 index 0000000000000..c2a9d6f6c9398 --- /dev/null +++ b/Formula/d/detach.rb @@ -0,0 +1,44 @@ +class Detach < Formula + desc "Execute given command in detached process" + homepage "http://inglorion.net/software/detach/" + url "http://inglorion.net/download/detach-0.2.3.tar.bz2" + sha256 "b2070e708d4fe3a84197e2a68f25e477dba3c2d8b1f9ce568f70fc8b8e8a30f0" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?detach[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26af0691540557a38f48cea373f6a0a9085bf2ba7a71bfcb7aa67e844ce3f466" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7d0f80127112fcf6691ce7b4b90aa1fc5ee9ddee51d755b1a895f47419f2455" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5ad00a2d77cb8c391aea1df731916286b2a9758b6948397e4943f10baec5269" + sha256 cellar: :any_skip_relocation, arm64_ventura: "43dbfbe7fe5ea211f28aff3bd251dad03ddb486ff8230bc35084b0c8111a0058" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f208e16128573ea8b839c8fe27a6f23e72dcf99064f088e4d552aec5358cf54f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "934338f4dbae7773162dfa2a6b83d3c72a0740747bd4494509a9d5ee20bf37b5" + sha256 cellar: :any_skip_relocation, sonoma: "32f4187991a03c5192da3a66e0c7d109f17a349848124cd38b782ca7dfa14e37" + sha256 cellar: :any_skip_relocation, ventura: "94bd75041180a9e7cf48d3c352d2ef788a3f9ca382a77ecc1195b221c375b99c" + sha256 cellar: :any_skip_relocation, monterey: "469c22339c28e7497bead225e1597d5ae4ccadd2589e355be65041bd2c2ac5c9" + sha256 cellar: :any_skip_relocation, big_sur: "9db6ee661710f178b17fc1096596ee74b07b257e233da7fb45cb9280cbeb24a1" + sha256 cellar: :any_skip_relocation, catalina: "dbd06a1dcb4592035dff0b4df0cc3259c2dbb444acdb1553ab2a2d4edf3fff57" + sha256 cellar: :any_skip_relocation, arm64_linux: "8fba912efb0e2473b0c089087b8a7239fbf21952e15fa541b41d8542f2277d96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38838383187537acd5cd6c52ea5d375055201ad74494107a5150ac684374028d" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + bin.install "detach" + man1.install "detach.1" + end + + test do + system bin/"detach", "-p", "#{testpath}/pid", "sh", "-c", "sleep 10" + pid = (testpath/"pid").read.to_i + ppid = shell_output("ps -p #{pid} -o ppid=").to_i + assert_equal 1, ppid + Process.kill "TERM", pid + end +end diff --git a/Formula/d/detect-secrets.rb b/Formula/d/detect-secrets.rb new file mode 100644 index 0000000000000..ffa41ace131d0 --- /dev/null +++ b/Formula/d/detect-secrets.rb @@ -0,0 +1,60 @@ +class DetectSecrets < Formula + include Language::Python::Virtualenv + + desc "Enterprise friendly way of detecting and preventing secrets in code" + homepage "https://github.com/Yelp/detect-secrets" + url "https://files.pythonhosted.org/packages/69/67/382a863fff94eae5a0cf05542179169a1c49a4c8784a9480621e2066ca7d/detect_secrets-1.5.0.tar.gz" + sha256 "6bb46dcc553c10df51475641bb30fd69d25645cc12339e46c824c1e0c388898a" + license "Apache-2.0" + revision 4 + head "https://github.com/Yelp/detect-secrets.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "d2be2f21660550de2a51efb56ad6c35659b4977c9fce31bebd515849aac7c960" + sha256 cellar: :any, arm64_sequoia: "7a8f7a1cff5872eed1f79a05ab426478a004263349d042ad4371846ae2480c80" + sha256 cellar: :any, arm64_sonoma: "16e3fb793a96f9d35aefcb76d9e635c4d66ae443657cdef707e42704f06b45bc" + sha256 cellar: :any, sonoma: "14030d68163cd6708c3a99bdcce8f3a8f515f538fc7f36efa4dcd2f56089d75a" + sha256 cellar: :any_skip_relocation, arm64_linux: "52d2f1d1c924036c3518f46d9fa564f637f79c017d10bbcd8f1bb9a8fb1209ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1ef641b9e98ec1c977d015d9c67b5cc7998dd3ab320798068cf46c6d458c2ab" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "ArtifactoryDetector", shell_output("#{bin}/detect-secrets scan --list-all-plugins 2>&1") + end +end diff --git a/Formula/d/detekt.rb b/Formula/d/detekt.rb new file mode 100644 index 0000000000000..a63636f4b4d9b --- /dev/null +++ b/Formula/d/detekt.rb @@ -0,0 +1,38 @@ +class Detekt < Formula + desc "Static code analysis for Kotlin" + homepage "https://github.com/detekt/detekt" + url "https://github.com/detekt/detekt/releases/download/v1.23.8/detekt-cli-1.23.8-all.jar" + sha256 "2ce2ff952e150baf28a29cda70a363b0340b3e81a55f43e51ec5edffc3d066c1" + license "Apache-2.0" + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "37152acb3b7195f62c6e972c3deb2d8423a59f907e1e3452a94628c6e4023ea0" + end + + depends_on "openjdk@21" + + def install + libexec.install "detekt-cli-#{version}-all.jar" + bin.write_jar_script libexec/"detekt-cli-#{version}-all.jar", "detekt", java_version: "21" + end + + test do + # generate default config for testing + system bin/"detekt", "--generate-config" + assert_match "empty-blocks:", File.read(testpath/"detekt.yml") + + (testpath/"input.kt").write <<~KOTLIN + fun main() { + + } + KOTLIN + + shell_output("#{bin}/detekt --input input.kt --report txt:output.txt --config #{testpath}/detekt.yml", 2) + assert_equal "EmptyFunctionBlock", shell_output("cat output.txt").slice(/\w+/) + end +end diff --git a/Formula/d/detox.rb b/Formula/d/detox.rb new file mode 100644 index 0000000000000..999b59f888f07 --- /dev/null +++ b/Formula/d/detox.rb @@ -0,0 +1,33 @@ +class Detox < Formula + desc "Utility to replace problematic characters in filenames" + homepage "https://detox.sourceforge.net/" + url "https://github.com/dharple/detox/archive/refs/tags/v3.0.1.tar.gz" + sha256 "15dc32ca5856a3edc2fff237c8cbcb29979a25292aac738a272181d2152699ea" + license "BSD-3-Clause" + + bottle do + sha256 arm64_tahoe: "1f4a2308f134605e6af719dcad7dfcdd2f6ecc048b4c69f65c1b27c6af0a6ffa" + sha256 arm64_sequoia: "ce9b57a452b95589a2aec98663da824fb08d5336b90e4b0d49929a620cbc1f3b" + sha256 arm64_sonoma: "7f8d15ffabb295011c2d6e4e1681196d26b88dc31841787d2fd08a061afe4f47" + sha256 arm64_ventura: "e38cc831cb81dff39a77a3355a4f91c7fc8e9e896400b0931b4997620a068234" + sha256 sonoma: "bfbb8acca19b7f2214f490a072f9bf8157f01cd160d6339aaf6e0935b8cfe519" + sha256 ventura: "a7d62b75598031b522a02dbe8c93368751e5cfde317e16ca86305dd2bc506471" + sha256 arm64_linux: "5cf76b955859cefac2d10cda631e81c26b519e202f70be163f0c73e52bdac572" + sha256 x86_64_linux: "648e5e31695aa59ab1f7bff5524363e84a513c0f07d65050487dd6366002178c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"rename this").write "foobar" + assert_equal "rename this -> rename_this\n", shell_output("#{bin}/detox --dry-run rename\\ this") + end +end diff --git a/Formula/d/devcontainer.rb b/Formula/d/devcontainer.rb new file mode 100644 index 0000000000000..60701b3072911 --- /dev/null +++ b/Formula/d/devcontainer.rb @@ -0,0 +1,34 @@ +class Devcontainer < Formula + desc "Reference implementation for the Development Containers specification" + homepage "https://containers.dev" + url "https://registry.npmjs.org/@devcontainers/cli/-/cli-0.80.1.tgz" + sha256 "6a6b4d74ee7b474e23d7685d75ff3e7c5abc78930f96c19ac68e0a0f1bca56af" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "462fe7ad28ad568a9946d4a9de7d396656b8decebe08606bba18d8a82f13ca71" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/devcontainer --version") + + ENV["DOCKER_HOST"] = File::NULL + # Modified .devcontainer/devcontainer.json from CLI example: + # https://github.com/devcontainers/cli#try-out-the-cli + (testpath/".devcontainer.json").write <<~JSON + { + "name": "devcontainer-homebrew-test", + "image": "mcr.microsoft.com/devcontainers/rust:0-1-bullseye" + } + JSON + output = shell_output("#{bin}/devcontainer up --workspace-folder .", 1) + assert_match '{"outcome":"error","message":"', output + end +end diff --git a/Formula/d/devdash.rb b/Formula/d/devdash.rb new file mode 100644 index 0000000000000..09f93f84fecf3 --- /dev/null +++ b/Formula/d/devdash.rb @@ -0,0 +1,33 @@ +class Devdash < Formula + desc "Highly Configurable Terminal Dashboard for Developers" + homepage "https://thedevdash.com" + url "https://github.com/Phantas0s/devdash/archive/refs/tags/v0.5.0.tar.gz" + sha256 "633a0a599a230a93b7c4eeacdf79a91a2bb672058ef3d5aacce5121167df8d28" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d275e7fb55d70d47793d2e40e040eaef193055925a4174eed2606a45552b996a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fdd9cb3b397734f91eed17ff9a4e401c7ba15e559a5f74cccf294f08f0f9a92b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "521857b00245b916fc5e06de4232c73005a680e223d2474e75f3ce764ae39497" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f4e13f2e58d6e125a578aca41e192b4e655d8daf706e8c1fc154b77c4d884984" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "688199921a304a5ba1c0ac78096d29c86c63076eafd6288085664a32b7e70056" + sha256 cellar: :any_skip_relocation, sonoma: "668424ba3732b918bc28885c301279e25de6809fdb419b3abc2bc2dff904c5e0" + sha256 cellar: :any_skip_relocation, ventura: "7d3e2646c26975be3f9d006259000f8085cce1eb95ab1286083dbec7d0ab8b85" + sha256 cellar: :any_skip_relocation, monterey: "8049a6d438b7a088de9e71cc0356feb1f7576d678b6aa69932b97fdd84c00596" + sha256 cellar: :any_skip_relocation, big_sur: "e71157c4ff045c0e9330fc916b473b38983af56bef7aefd3cdbfd833d9467c18" + sha256 cellar: :any_skip_relocation, catalina: "5589478caf3652ea9a8ba5dd95ead4a927f5a2d4436abb394113e027b0fea805" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8fdb550ff66a46af75552afcc69dd71a93e08097a6e7f94b4e7bc382584c9b0" + end + + disable! date: "2025-01-20", because: :repo_archived + + depends_on "go@1.22" => :build + + def install + system "go", "build", *std_go_args + end + + test do + system bin/"devdash", "-h" + end +end diff --git a/Formula/d/device-mapper.rb b/Formula/d/device-mapper.rb new file mode 100644 index 0000000000000..c30db56ece88a --- /dev/null +++ b/Formula/d/device-mapper.rb @@ -0,0 +1,46 @@ +class DeviceMapper < Formula + desc "Userspace library and tools for logical volume management" + homepage "https://sourceware.org/dm" + url "https://sourceware.org/git/lvm2.git", + tag: "v2_03_36", + revision: "c8b7a765cbd731af32964adaf921f9e19d56a048" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/href=.*?;a=tag;.*?>Release (\d+(?:\.\d+)+)</i) + strategy :page_match + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "6187c3179c34e7c6f48fb25d0f6f8790a5d2e804e70ccdc5d86f5991b44f7d06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4341ac03f60eed61eaa6dd1e3274ac8a22e3e524aab2c4a225eedb68905d1cda" + end + + depends_on "pkgconf" => :build + depends_on "libaio" + depends_on :linux + + def install + # https://github.com/NixOS/nixpkgs/pull/52597 + ENV.deparallelize + system "./configure", "--disable-silent-rules", "--enable-pkgconfig", *std_configure_args + system "make", "device-mapper" + system "make", "install_device-mapper" + end + + test do + (testpath/"test.c").write <<~C + #include <libdevmapper.h> + + int main() { + if (DM_STATS_REGIONS_ALL != UINT64_MAX) + exit(1); + } + C + system ENV.cc, "-I#{include}", "-L#{lib}", "-ldevmapper", "test.c", "-o", "test" + system testpath/"test" + end +end diff --git a/Formula/d/devil.rb b/Formula/d/devil.rb new file mode 100644 index 0000000000000..dc29b9753c8d6 --- /dev/null +++ b/Formula/d/devil.rb @@ -0,0 +1,111 @@ +class Devil < Formula + desc "Cross-platform image library" + homepage "https://sourceforge.net/projects/openil/" + license "LGPL-2.1-only" + revision 6 + head "https://github.com/DentonW/DevIL.git", branch: "master" + + stable do + url "https://downloads.sourceforge.net/project/openil/DevIL/1.8.0/DevIL-1.8.0.tar.gz" + sha256 "0075973ee7dd89f0507873e2580ac78336452d29d34a07134b208f44e2feb709" + + # jpeg 9 compatibility + # Upstream commit from 3 Jan 2017 "Fixed int to boolean conversion error + # under Linux" + patch do + url "https://github.com/DentonW/DevIL/commit/41fcabbe.patch?full_index=1" + sha256 "324dc09896164bef75bb82b37981cc30dfecf4f1c2386c695bb7e92a2bb8154d" + end + + # jpeg 9 compatibility + # Upstream commit from 7 Jan 2017 "Fixing boolean compilation errors under + # Linux / MacOS, issue #48 at https://github.com/DentonW/DevIL/issues/48" + patch do + url "https://github.com/DentonW/DevIL/commit/4a2d7822.patch?full_index=1" + sha256 "7e74a4366ef485beea1c4285f2b371b6bfa0e2513b83d4d45e4e120690c93f1d" + end + + # allow compiling against jasper >= 2.0.17 + patch do + url "https://github.com/DentonW/DevIL/commit/42a62648.patch?full_index=1" + sha256 "b3a99c34cd7f9a5681f43dc0886fe360ba7d1df2dd1eddd7fcdcae7898f7a68e" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b38672c3417c92fde8b5cca2a59f14c31201f9a5f043a1bb5d7d04c4983d5398" + sha256 cellar: :any, arm64_sequoia: "06f0d3689766e92e01e492d9abbceeac345df99fa96a018cf74963ff4b6c9cca" + sha256 cellar: :any, arm64_sonoma: "80cb4184d2621711c7ebfce994578930a3f8dce0c1f9e0c1115b1de2ea1fa174" + sha256 cellar: :any, arm64_ventura: "83917219939802394eed0c286c61eb01f54621d97fe434838286a2ec5f92e939" + sha256 cellar: :any, arm64_monterey: "f653e1ed04c2c3e1c4d00e9c9f9e237e2cd062ba1a9bd12417f4081c572b4ab5" + sha256 cellar: :any, arm64_big_sur: "543768d33075adb7d3301fff8a8376a0ebf014401783f10ae68bf896e2996b36" + sha256 cellar: :any, sonoma: "98d8eaf39ca55e189b6add8d199d4527adbba229a7eaf170d5d21b7b41848dc2" + sha256 cellar: :any, ventura: "41c4a55d025dbe6bb13fe38575289bca95014da52ecebb5d06091521eba82598" + sha256 cellar: :any, monterey: "e981eb27631eb67d08126eee9daef0de6f30223bf69f4cc497e6d258d84d4714" + sha256 cellar: :any, big_sur: "1bf545866859e8ed264015e2e0c9f88e8379f7ec175ef40ade2e1039ce933262" + sha256 cellar: :any_skip_relocation, arm64_linux: "35dca23ab5cbd470f6dfe8744a7ed0f7a414366215d0350c89819ca0b03d083e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39cfc26d4075c7e2be8b1fcc8ae762bd8897dca6460c632e1b63f3df69888a56" + end + + depends_on "cmake" => :build + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "little-cms2" + + # allow compiling against jasper >= 3.0.0 + patch :DATA + + def install + system "cmake", "-S", "DevIL", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include <IL/il.h> + int main() { + ilInit(); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}", + "-L#{lib}", "-lIL", "-lILU" + system "./test" + end +end + +__END__ +diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp +index 89075a52..f46028a9 100644 +--- a/DevIL/src-IL/src/il_jp2.cpp ++++ b/DevIL/src-IL/src/il_jp2.cpp +@@ -323,7 +323,9 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image) + // + // see: https://github.com/OSGeo/gdal/commit/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 + // https://github.com/DentonW/DevIL/issues/90 +-#if defined(PRIjas_seqent) ++#if JAS_VERSION_MAJOR >= 3 ++static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt) ++#elif defined(PRIjas_seqent) + static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned cnt) + #else + static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) +@@ -333,7 +335,9 @@ static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) + return iread(buf, 1, cnt); + } + +-#if defined(JAS_INCLUDE_JP2_CODEC) ++#if JAS_VERSION_MAJOR >= 3 ++static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt) ++#elif defined(JAS_INCLUDE_JP2_CODEC) + static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned cnt) + #elif defined(PRIjas_seqent) + static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, unsigned cnt) diff --git a/Formula/d/devspace.rb b/Formula/d/devspace.rb new file mode 100644 index 0000000000000..bb8c82f4f813d --- /dev/null +++ b/Formula/d/devspace.rb @@ -0,0 +1,42 @@ +class Devspace < Formula + desc "CLI helps develop/deploy/debug apps with Docker and k8s" + homepage "https://devspace.sh/" + url "https://github.com/devspace-sh/devspace/archive/refs/tags/v6.3.18.tar.gz" + sha256 "9ddd097e97e46105f81f0ee56dd685d8ca6e7fc0076198e2bac2b79930fa4286" + license "Apache-2.0" + head "https://github.com/loft-sh/devspace.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c448a898f005577e7c34d2c2af8951637f322da7bf25072cf9fb936917cc6177" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "526bbf00709c2794072d7be4365894b6fdd01bc92551e71a36b0cd03a4c59956" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4535882332cb8697229b993e16c0c5465ece85303c653eaacc4a364a0b4d7b33" + sha256 cellar: :any_skip_relocation, sonoma: "7fc8aaf396cb98c6fe2c3d651db48d4d13aa8087435396a865b44a70baaee177" + sha256 cellar: :any_skip_relocation, arm64_linux: "45ec81da3106d073826a06bf6684018d8298334caf5dd96ed5148651de4694e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8bcb4a67fdff7a3b6c13bb300c5561684297264e8f0ca91e037a4cb83d22195" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" + + def install + ldflags = "-s -w -X main.commitHash=#{tap.user} -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"devspace", "completion") + end + + test do + help_output = "DevSpace accelerates developing, deploying and debugging applications with Docker and Kubernetes." + assert_match help_output, shell_output("#{bin}/devspace --help") + + init_help_output = "Initializes a new devspace project" + assert_match init_help_output, shell_output("#{bin}/devspace init --help") + + assert_match version.to_s, shell_output("#{bin}/devspace version") + end +end diff --git a/Formula/d/dex.rb b/Formula/d/dex.rb new file mode 100644 index 0000000000000..9cbf81a4902f1 --- /dev/null +++ b/Formula/d/dex.rb @@ -0,0 +1,45 @@ +class Dex < Formula + desc "Dextrous text editor" + homepage "https://github.com/tihirvon/dex" + url "https://github.com/tihirvon/dex/archive/refs/tags/v1.0.tar.gz" + sha256 "4468b53debe8da6391186dccb78288a8a77798cb4c0a00fab9a7cdc711cd2123" + license "GPL-2.0-only" + head "https://github.com/tihirvon/dex.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "99cd1ca32c018d46a6f468a3baab876a0dd11153a5d766b58c9a3c5ad438f13e" + sha256 arm64_sequoia: "961f06389b30d15e9464ece560955feff630b3b025d5e02fcc41e8778ced1597" + sha256 arm64_sonoma: "4ff6003727f7e76f429e07040495e6c27dcd6d0375771ec774b4eb35f89b5d90" + sha256 arm64_ventura: "54736c90fa2e3b234dfbbbecb1cc573bfe0a810933638297cb0efea717ca3c3d" + sha256 arm64_monterey: "b0862918ef89cb4018a08662ec18ca36fab573fdf1e44696fd32813b9f40957c" + sha256 arm64_big_sur: "f8ffe6f83659dbdf5f60ee7367291371a1b5cb502ce288ba76d7d392ad943c85" + sha256 sonoma: "ab3bae4071dfea549c9ef469f8ddf8d3ccfde4ed5f32022a799319ebaf3e42ba" + sha256 ventura: "c6b949a5254e17100be03b643f2c6a48322e52d841c17c3c8755d5c0895edf82" + sha256 monterey: "1161d38da36fd3affca64b1b45f68a98e2b935cf1a25418f079f30ed1538eaa3" + sha256 big_sur: "32ae7c5467361a979d7e96249ab4f95af72b202e260064a4c0ba58455ba44034" + sha256 catalina: "d59f96c9f1e021bc400a832d680039313256073d88527ef18b961e783c71879b" + sha256 arm64_linux: "d0e976083ba5b7bffc80bd67406135fc4dc08226ecfd3d2336f5e8bb39b634c9" + sha256 x86_64_linux: "53f45193c090faaeefd2c6ca8a492f51af29d6b72f7a13eacb9650b6fffd46c5" + end + + uses_from_macos "ncurses" + + conflicts_with "dexidp", because: "both install `dex` binaries" + + def install + args = ["prefix=#{prefix}", + "CC=#{ENV.cc}", + "HOST_CC=#{ENV.cc}"] + + args << "VERSION=#{version}" if build.head? + + system "make", "install", *args + end + + test do + system bin/"dex", "-V" + end +end diff --git a/Formula/d/dex2jar.rb b/Formula/d/dex2jar.rb new file mode 100644 index 0000000000000..b53318ee8e886 --- /dev/null +++ b/Formula/d/dex2jar.rb @@ -0,0 +1,36 @@ +class Dex2jar < Formula + desc "Tools to work with Android .dex and Java .class files" + homepage "https://github.com/pxb1988/dex2jar" + url "https://github.com/pxb1988/dex2jar/releases/download/v2.4/dex-tools-v2.4.zip" + sha256 "ee7c45eb3c1d2474a6145d8d447e651a736a22d9664b6d3d3be5a5a817dda23a" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ded18e9ed01974a255fca1641dfa790cf06c09ad819578f9e351d06f71a5ad83" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["*.bat"]) + + # Install files + chmod 0755, Dir["*"] + libexec.install Dir["*"] + + Dir.glob("#{libexec}/*.sh") do |script| + (bin/File.basename(script, ".sh")).write_env_script script, Language::Java.overridable_java_home_env + end + end + + test do + system bin/"d2j-dex2jar", "--help" + end +end diff --git a/Formula/d/dexidp.rb b/Formula/d/dexidp.rb new file mode 100644 index 0000000000000..903a063d1cdc8 --- /dev/null +++ b/Formula/d/dexidp.rb @@ -0,0 +1,50 @@ +class Dexidp < Formula + desc "OpenID Connect Identity and OAuth 2.0 Provider" + homepage "https://dexidp.io" + url "https://github.com/dexidp/dex/archive/refs/tags/v2.44.0.tar.gz" + sha256 "e0599817d14dd1a99f0c7b967b8801751f90b42ad56d8f1aaa4afa2565d76288" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bd3a79c12a65cf0c632bbb7610431b24be1627dc712465b5105d1f59c299f356" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df23a6fb031357ae2c3095c00e6713a98b74485859d3db36ad8340436309c77c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f610bf0613e8446cc7173fb3af3ed417d90c0b3b53743d4e4480ae2670798378" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9685e4b7b7b4eba901c45fd435fe84ce00cd579c17fc6661ddeadf6f4407ee2f" + sha256 cellar: :any_skip_relocation, sonoma: "65718792e94096b13180875a6ab75bacea96fc24ab490e91bfe86b4b48cc6669" + sha256 cellar: :any_skip_relocation, ventura: "a69bbc18f7b28a1a5f5bcf149ed40512ff7a9315212b2cf6c6655e93ef19c47d" + sha256 cellar: :any_skip_relocation, arm64_linux: "986f3525707d3f29dd1ef9e360d45224e9235d784391e48c0b278a635e58f409" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e523b97e9dd193df39c627600f460e33331dd0df30f49beb2e20548eaacf12bd" + end + + depends_on "go" => :build + + conflicts_with "dex", because: "both install `dex` binaries" + + def install + ldflags = "-w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"dex"), "./cmd/dex" + pkgetc.install "config.yaml.dist" => "config.yaml" + end + + service do + run [opt_bin/"dex", "serve", etc/"dexidp/config.yaml"] + keep_alive true + error_log_path var/"log/dex.log" + log_path var/"log/dex.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/dex version") + + port = free_port + cp pkgetc/"config.yaml", testpath + inreplace "config.yaml", "5556", port.to_s + + pid = spawn bin/"dex", "serve", "config.yaml" + sleep 3 + + assert_match "Dex", shell_output("curl -s localhost:#{port}/dex") + ensure + Process.kill "TERM", pid + end +end diff --git a/Formula/d/dexter.rb b/Formula/d/dexter.rb new file mode 100644 index 0000000000000..6814ff90a194b --- /dev/null +++ b/Formula/d/dexter.rb @@ -0,0 +1,78 @@ +class Dexter < Formula + desc "Automatic indexer for Postgres" + homepage "https://github.com/ankane/dexter" + url "https://github.com/ankane/dexter/archive/refs/tags/v0.6.3.tar.gz" + sha256 "5aca9fcb671170bda6ae8a9b6d563a4813237412a658f614bb48c8caf6067f78" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "002eaa9abec0185a976061ea1bcbc43ac93b005abe2f0afe95d68ff35ce16401" + sha256 cellar: :any, arm64_sequoia: "4232cde75daa84becfd6be67644d621301640236f75c110fba05dc7517d65dbf" + sha256 cellar: :any, arm64_sonoma: "6e143bf7c3c27e1588f54c19fa8d64c03985dfeede602504eb9dbd8dda226acf" + sha256 cellar: :any, sonoma: "1b262e7f9be04b0c9330131c4263d98471cde13716a926792b19d18a1c23e911" + sha256 cellar: :any_skip_relocation, arm64_linux: "26b4415aee5ac9ef0b7a2b307dce6527acf1de19e6d48bc077ecf68f6c73f119" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f0865d3289eaed64f068774d063bd8d084f08d6db09caac95539572e9ef3402" + end + + depends_on "postgresql@18" => :test + depends_on "libpq" + depends_on "ruby" + + resource "google-protobuf" do + url "https://rubygems.org/gems/google-protobuf-4.33.0.gem" + sha256 "a4918b45bea5889c38fb82da83a5175209600f9c17fb1698be30d635696b3526" + end + + resource "pg" do + url "https://rubygems.org/gems/pg-1.6.2.gem" + sha256 "58614afd405cc9c2c9e15bffe8432e0d6cfc58b722344ad4a47c73a85189c875" + end + + resource "pg_query" do + url "https://rubygems.org/gems/pg_query-6.1.0.gem" + sha256 "8b005229e209f12c5887c34c60d0eb2a241953b9475b53a9840d24578532481e" + end + + resource "slop" do + url "https://rubygems.org/gems/slop-4.10.1.gem" + sha256 "844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7" + end + + def install + ENV["GEM_HOME"] = libexec + ENV["PG_CONFIG"] = Formula["libpq"].opt_bin/"pg_config" + + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + + system "gem", "build", "pgdexter.gemspec" + system "gem", "install", "--ignore-dependencies", "pgdexter-#{version}.gem" + + bin.install libexec/"bin/dexter" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + ENV["LC_ALL"] = "C" + + postgresql = Formula["postgresql@18"] + pg_ctl = postgresql.opt_bin/"pg_ctl" + port = free_port + + system pg_ctl, "initdb", "-D", testpath/"test" + (testpath/"test/postgresql.conf").write <<~EOS, mode: "a+" + port = #{port} + EOS + system pg_ctl, "start", "-D", testpath/"test", "-l", testpath/"log" + + begin + output = shell_output("#{bin}/dexter -d postgres -p #{port} -s SELECT 1 2>&1", 1) + assert_match "Install HypoPG", output + ensure + system pg_ctl, "stop", "-D", testpath/"test" + end + end +end diff --git a/Formula/d/dezoomify-rs.rb b/Formula/d/dezoomify-rs.rb new file mode 100644 index 0000000000000..4aec50949cee5 --- /dev/null +++ b/Formula/d/dezoomify-rs.rb @@ -0,0 +1,59 @@ +class DezoomifyRs < Formula + desc "Tiled image downloader" + homepage "https://github.com/lovasoa/dezoomify-rs" + url "https://github.com/lovasoa/dezoomify-rs/archive/refs/tags/v2.15.0.tar.gz" + sha256 "539853288768258caac07a559bb7050000e7e0c6e9770227b390c875c26c8ce5" + license "GPL-3.0-only" + head "https://github.com/lovasoa/dezoomify-rs.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8be8dcfeec19cf3e8255dfb6b70608f591cfffbdee959919d3d99504558657c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "847cc613f3d55a6e7a4240166c77cb3f96361cdd1aae066d00e81810ea71182e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0404ff601c67f74757b3d827fa0eb15e9a2fbedd0916c827b918cc7b1a5164ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "347c1182e473e74646a95f9a9351149a33ddb84b3eb446da5602bc1091acb379" + sha256 cellar: :any_skip_relocation, sonoma: "62bdd4173ad1428c4a19515c4a8ae0728c919e2a7e641a08de9e1105ae72e155" + sha256 cellar: :any_skip_relocation, ventura: "0baa5cabf36380e51d8de49217a19b1dbcac4d8699fe15541c098b05d568baeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1533e3d5a7eeef4debd69d4a5b54dc8b38b7dbb03055c93b02699b4651a5c33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a04d863259959bfb3021ba1e553e612e320fb515022081770dad861427ef3907" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "imagemagick" => :test + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"tiles.yaml").write <<~YAML + url_template: "https://cdn.jsdelivr.net/gh/lovasoa/dezoomify-rs@v2.11.2/testdata/generic/map_{{x}}_{{y}}.jpg" + x_template: "x * tile_size" + y_template: "y * tile_size" + variables: + - { name: x, from: 0, to: 1 } # Image width, in tiles + - { name: y, from: 0, to: 1 } # Image height, in tiles + - { name: tile_size, value: 256 } + title: "testtile" + YAML + (testpath/"testtiles_shasum.txt").write <<~EOS + d0544af94eac6b418af6824554cb6bbbca8b3772261a1eb5fe9d1afb1eab458b testtile.png + EOS + dezoom_out = shell_output("#{bin}/dezoomify-rs tiles.yaml 2>&1") + assert_match "Image successfully saved", dezoom_out + image_dimensions = shell_output("identify -format \"%w×%h\\n\" testtile.png").strip + assert_equal "512×512", image_dimensions + end +end diff --git a/Formula/d/dfc.rb b/Formula/d/dfc.rb new file mode 100644 index 0000000000000..428e22101ee01 --- /dev/null +++ b/Formula/d/dfc.rb @@ -0,0 +1,48 @@ +class Dfc < Formula + desc "Display graphs and colors of file system space/usage" + homepage "https://github.com/Rolinh/dfc" + url "https://github.com/Rolinh/dfc/releases/download/v3.1.1/dfc-3.1.1.tar.gz" + sha256 "962466e77407dd5be715a41ffc50a54fce758a78831546f03a6bb282e8692e54" + license "BSD-3-Clause" + revision 1 + head "https://github.com/Rolinh/dfc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "7a89f0d391fc36d847a8385ade4caee48ac0ee3edac6fd460dfd05f89bd5996f" + sha256 arm64_sequoia: "2d84a8c3886281129fbe28c532fd87e12ab4b03d49d69490183122851b57cb2b" + sha256 arm64_sonoma: "7096f36097e668255f157e287ef43387c5ca35d2e80bb0677e0f63eb647c4f55" + sha256 arm64_ventura: "3a7c3a4bb6e644fb06bc3b28dcce2f2a61a2be235cb65e4a188bf55a63657c43" + sha256 arm64_monterey: "6aa0c0d2ad81bf179b61fced051ea22e5cb85376eafbb8e1d7376d8f3fc9cec7" + sha256 arm64_big_sur: "6f2d7350e0c7e1c905718b6dcf282367bc846bbd51538a9a525f681dda03be61" + sha256 sonoma: "0a60ac19f9bb91969d13895b18def28e2bfabdc8f20521428a4e62566175cbda" + sha256 ventura: "fefbde9ea38d983a69c406f0ed63ceecdea1460fa34d97ca64a158b86da1f2f2" + sha256 monterey: "127dd250819075427ca4a6f35f292d29c4af8b070c6ee368645817d54ac5a50b" + sha256 big_sur: "a89714cadb5ca91708c9f0c0f37266726517418e0ee592003c1cff38cc7599b1" + sha256 catalina: "cefa6f0f5e96a815ebbee4d4618dc927f88052f4137d52c31d21688fac211aa8" + sha256 arm64_linux: "210935ed2e087198b582b8c46b02bd88c0f95df0cc996b17310e38e56a711fcf" + sha256 x86_64_linux: "0d467920d7e3393975fc11b8fa07f84e177ddafdfa7139bc219183380f891d42" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + + on_macos do + depends_on "gettext" + end + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"dfc", "-T" + assert_match ",%USED,", shell_output("#{bin}/dfc -e csv") + end +end diff --git a/Formula/d/dfmt.rb b/Formula/d/dfmt.rb new file mode 100644 index 0000000000000..8ca7fedb1b8fa --- /dev/null +++ b/Formula/d/dfmt.rb @@ -0,0 +1,49 @@ +class Dfmt < Formula + desc "Formatter for D source code" + homepage "https://github.com/dlang-community/dfmt" + url "https://github.com/dlang-community/dfmt.git", + tag: "v0.15.2", + revision: "d8e43e23eca0aa32f064fe7efe8e74a9efa8018e" + license "BSL-1.0" + head "https://github.com/dlang-community/dfmt.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5708ab6278be915f769fec47dfedf6545e4ab571ff609c8edca2ddf9a78be996" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06ced6d9e20891ace270b9ae19b99e93ac117d5609ae2f8ec8f222561292ed58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2af58c128ce261ec39dac434a43d3f7247470d53da99f794d878943dec5fc285" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef439a3078bc2ee16955a840b26f9262b41d20909ba0e5ee607c3d07e2824c03" + sha256 cellar: :any_skip_relocation, arm64_monterey: "922bbe6012dbac27a2e65c4d8b1b8e3e7485299005e371035109baed9435fce2" + sha256 cellar: :any_skip_relocation, sonoma: "44171bb99b1902f7992a8a2f0bfd3a420f78c4d432cf63e022bdddd0c8f44909" + sha256 cellar: :any_skip_relocation, ventura: "a6395124d210dcf1ee14f282d0a1a9a94f46e620e4fbc8fc909197a2c8d49d90" + sha256 cellar: :any_skip_relocation, monterey: "67a53f11863df3acfad33a1aa83f7537222e24dfe4b3bd7b64734dffe66ad612" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac545940bdfc91af6fc839d51f00e8e27f874a712fc1a464c1e68866349eca70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c388fa11efd8c658e529ec9279a87930751226248893b198de70abd6fbcfdc07" + end + + depends_on "ldc" => :build + + def install + system "make", "ldc" + bin.install "bin/dfmt" + bash_completion.install "bash-completion/completions/dfmt" + end + + test do + (testpath/"test.d").write <<~D + import std.stdio; void main() { writeln("Hello, world without explicit compilations!"); } + D + + expected = <<~D + import std.stdio; + + void main() + { + writeln("Hello, world without explicit compilations!"); + } + D + + system bin/"dfmt", "-i", "test.d" + + assert_equal expected, (testpath/"test.d").read + end +end diff --git a/Formula/d/dfu-programmer.rb b/Formula/d/dfu-programmer.rb new file mode 100644 index 0000000000000..3d3cc9c0c7cca --- /dev/null +++ b/Formula/d/dfu-programmer.rb @@ -0,0 +1,39 @@ +class DfuProgrammer < Formula + desc "Device firmware update based USB programmer for Atmel chips" + homepage "https://github.com/dfu-programmer/dfu-programmer" + url "https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.1.0/dfu-programmer-1.1.0.tar.gz" + sha256 "844e469be559657bc52c9d9d03c30846acd11ffbb1ddd42438fa8af1d2b8587d" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "6e4e503268ee717e7eb68d2849204d017e4a1cab2094cf80363b92a73dce1adc" + sha256 cellar: :any, arm64_sequoia: "9d8e4b2ed240a48c18c466631c2157e6d7b3d640d205cdda06ddfe86a3751b7f" + sha256 cellar: :any, arm64_sonoma: "f506d34a6fae7808ea684cfa1a293eba7ec7b21e3527229cad5e2d89c289f65d" + sha256 cellar: :any, arm64_ventura: "6bff3958c7c8e1b569b374e9e1cdec4843c70f7e2f9042c05a9fae9f6832fe27" + sha256 cellar: :any, sonoma: "5b70cceeddad497b6a6f55d4ee1ee66caac51f8395f69f8389edee88427eab97" + sha256 cellar: :any, ventura: "7924fe1214155edd5e6467e29c31981efaebad2d0aa92f484e5021e2f7c4ea3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4441fc79f4dcedbd0fc31a378d696967323dfd5ba6ba5efe888ee6aa0d5e37e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "775806218241479471ea7a2b823545e81d898f867f4c887119641aabda2c926a" + end + + head do + url "https://github.com/dfu-programmer/dfu-programmer.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "libusb" + + def install + system "./bootstrap.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match "8051 based controllers", shell_output("#{bin}/dfu-programmer --targets") + assert_match version.to_s, shell_output("#{bin}/dfu-programmer --version 2>&1") + end +end diff --git a/Formula/d/dfu-util.rb b/Formula/d/dfu-util.rb new file mode 100644 index 0000000000000..c08c7cbef3902 --- /dev/null +++ b/Formula/d/dfu-util.rb @@ -0,0 +1,48 @@ +class DfuUtil < Formula + desc "USB programmer" + homepage "https://dfu-util.sourceforge.net/" + url "https://downloads.sourceforge.net/project/dfu-util/dfu-util-0.11.tar.gz" + sha256 "b4b53ba21a82ef7e3d4c47df2952adf5fa494f499b6b0b57c58c5d04ae8ff19e" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "53e343420fcab5133dd295cf75d8a74b5933fabfbb53c90c3ef798735b5f9445" + sha256 cellar: :any, arm64_sequoia: "5cfdae94eea7b66aae31b16dd689bd8078d7aa685786dcf45f9f9324db12727d" + sha256 cellar: :any, arm64_sonoma: "948497e1bb1a0f035517671d50e3d64c8843417210acb3cdc16232884399c783" + sha256 cellar: :any, arm64_ventura: "03e81fc129ada62759e3cd8d892131ca326851ab6631730e9d101405c0e2594d" + sha256 cellar: :any, arm64_monterey: "7d09c40c797df76fdea2862b205111fa9c14d44b09c27a0b00e083fcc827bee9" + sha256 cellar: :any, arm64_big_sur: "c7dd53f422003b99c57f565aad8371e8cef1aa3de825f36cd927cd61ed64249d" + sha256 cellar: :any, sonoma: "ec1b2eb46336cab4cac68f413d2e0dd9b1af2fd63182598ca40f4dd61595efb9" + sha256 cellar: :any, ventura: "84abd91cd4595f7d3445b7d3ba754528fdb671c7cfcdf82977b96e701c0cf60e" + sha256 cellar: :any, monterey: "5daf11ce553e067f293fc615889d22c74abb9ea9da21f57699c81d65ee9fa089" + sha256 cellar: :any, big_sur: "b970a649e90f3e080af2143e8479e0616959e35650defea16b96288c4af011dc" + sha256 cellar: :any, catalina: "5a5d86794a00b9559ffc819715c297da4f477296d20a92c804aefc426795d0b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "228012ba20956504016ab24f43cec35ce3a6ca2d5da694072ef1f64b33b8203f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13c26d1ebc67dd60446845d51e3ff92bcded0ae223852dc104e897c8c3423f71" + end + + head do + url "https://git.code.sf.net/p/dfu-util/dfu-util.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"dfu-util", "-V" + system bin/"dfu-prefix", "-V" + system bin/"dfu-suffix", "-V" + end +end diff --git a/Formula/d/dhall-bash.rb b/Formula/d/dhall-bash.rb new file mode 100644 index 0000000000000..2d6414a79810f --- /dev/null +++ b/Formula/d/dhall-bash.rb @@ -0,0 +1,57 @@ +class DhallBash < Formula + desc "Compile Dhall to Bash" + homepage "https://github.com/dhall-lang/dhall-haskell/tree/main/dhall-bash" + license "BSD-3-Clause" + head "https://github.com/dhall-lang/dhall-haskell.git", branch: "main" + + stable do + url "https://hackage.haskell.org/package/dhall-bash-1.0.41/dhall-bash-1.0.41.tar.gz" + sha256 "2aeb9316c22ddbc0c9c53ca0b347c49087351f326cba7a1cb95f4265691a5f26" + + # Use newer metadata revision to relax upper bounds on dependencies for GHC 9.10 + resource "2.cabal" do + url "https://hackage.haskell.org/package/dhall-bash-1.0.41/revision/2.cabal" + sha256 "7284bb69b7b551c0c63dc83d2d797f1ec1666c7b9bcd6382cedeaac19e0975d3" + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "16244660e90287842060815f5e5e0b3390e67a5dd18d0caa171edd9d61460666" + sha256 cellar: :any, arm64_sequoia: "61d284e40933fe164546711dc5595f5e87fb234839fb56af80bbeb360d91700d" + sha256 cellar: :any, arm64_sonoma: "6220e81ec5cd70de07c1c7e43bdb590a0aea042298700168e6fcf6b854ba9d8f" + sha256 cellar: :any, arm64_ventura: "9e5096f50c89403fabf0797203289e090af5173c8350cc265e5e59268cece9e8" + sha256 cellar: :any, sonoma: "0ab1b570e3c1d868934221ae92b23a84f314ee4d51c4ebd3272163488999673e" + sha256 cellar: :any, ventura: "77529ea2f79316fd15f32850c35aae0a810ed7e38ce5c17762c4d6316be06f09" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbf43c06b2e19ca68f0de41e156d16e9e05a98a036fc9b3236b2bcb7720b0405" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c7711cbba94bfdb4287d80b936ced23f59c77c33fd2225c86b4ecec931d1fd5" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + if build.stable? + # Backport support for GHC 9.10 + odie "Remove resource and workaround!" if version > "1.0.41" + resource("2.cabal").stage { buildpath.install "2.cabal" => "dhall-bash.cabal" } + # https://github.com/dhall-lang/dhall-haskell/commit/dfa82861ed13796f6d7b96b30139a6f11e057e7b + inreplace "#{name}.cabal", "text >= 0.2 && < 2.1", + "text >= 0.2 && < 2.2" + end + + cd "dhall-bash" if build.head? + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + assert_match "true", pipe_output("#{bin}/dhall-to-bash", "Natural/even 100", 0) + assert_match "unset FOO", pipe_output("#{bin}/dhall-to-bash --declare FOO", "None Natural", 0) + end +end diff --git a/Formula/d/dhall-json.rb b/Formula/d/dhall-json.rb new file mode 100644 index 0000000000000..18577ea3d40cb --- /dev/null +++ b/Formula/d/dhall-json.rb @@ -0,0 +1,50 @@ +class DhallJson < Formula + desc "Dhall to JSON compiler and a Dhall to YAML compiler" + homepage "https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-json" + url "https://hackage.haskell.org/package/dhall-json-1.7.12/dhall-json-1.7.12.tar.gz" + sha256 "ca48cd434380cbd979dbb12889f90da8fdc1ea90bc266cab14f061c60e19d5fa" + license "BSD-3-Clause" + head "https://github.com/dhall-lang/dhall-haskell.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "73baa2fd19be65be837a3c3309d7504e9d418eb7f0f339904eebb220966b603f" + sha256 cellar: :any, arm64_sequoia: "39ad85b98a17ab00830ff951a371b3307f8f233b45515b5a8a4b508c7e26bf14" + sha256 cellar: :any, arm64_sonoma: "cb38db666618de2732dc9c6cfdc60011110896a4ecaf74a13c0d6154fd1e8c01" + sha256 cellar: :any, arm64_ventura: "1f626e15918be89bc14f16ca825aed2b448b98b93170fc01ef1a3f53ae2cd7b6" + sha256 cellar: :any, sonoma: "f52f5df894456c02bf8b32e05a296fabe0526faaf79ecf024baf9507705b439e" + sha256 cellar: :any, ventura: "49846bb950d02b98c5640e93d527273a049d93445cfac3dfd01adf70a0036db8" + sha256 cellar: :any_skip_relocation, arm64_linux: "8df66ff7736b7d73de01bc9b317ccf7eae1527d28b8ea1a55b59630a4ee6aaed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8791ac3d987c13ac8c904f876b01cdcf089e9aecc1476b101367df6621bcfa3" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + if build.stable? + # Backport support for GHC 9.10 + inreplace "#{name}.cabal" do |s| + # https://github.com/dhall-lang/dhall-haskell/commit/28d346f00d12fa134b4c315974f76cc5557f1330 + s.gsub! "aeson >= 1.4.6.0 && < 2.2 ,", + "aeson >= 1.4.6.0 && < 2.3 ," + # https://github.com/dhall-lang/dhall-haskell/commit/277d8b1b3637ba2ce125783cc1936dc9591e67a7 + s.gsub! "text >= 0.11.1.0 && < 2.1 ,", + "text >= 0.11.1.0 && < 2.2 ," + end + end + + cd "dhall-json" if build.head? + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + assert_match "1", pipe_output("#{bin}/dhall-to-json", "1", 0) + end +end diff --git a/Formula/d/dhall-lsp-server.rb b/Formula/d/dhall-lsp-server.rb new file mode 100644 index 0000000000000..2cd3900a8a08c --- /dev/null +++ b/Formula/d/dhall-lsp-server.rb @@ -0,0 +1,81 @@ +class DhallLspServer < Formula + desc "Language Server Protocol (LSP) server for Dhall" + homepage "https://github.com/dhall-lang/dhall-haskell/tree/main/dhall-lsp-server" + license "BSD-3-Clause" + head "https://github.com/dhall-lang/dhall-haskell.git", branch: "main" + + stable do + url "https://hackage.haskell.org/package/dhall-lsp-server-1.1.4/dhall-lsp-server-1.1.4.tar.gz" + sha256 "4c7f056c8414f811edb14d26b0a7d3f3225762d0023965e474b5712ed18c9a6d" + + # Backport relaxed upper bounds for lsp dependencies + patch :p2 do + url "https://github.com/dhall-lang/dhall-haskell/commit/a621e1438df5865d966597e2e1b0bb37e8311447.patch?full_index=1" + sha256 "89b768b642c0a891e5d0a33ac43c84f07f509c538cf2a035fad967ce6af074ef" + end + + # Backport support for text 2.1.2 picked by GHC 9.10+ + patch :p2 do + url "https://github.com/dhall-lang/dhall-haskell/commit/9f2d4d44be643229784bfc502ab49184ec82bc05.patch?full_index=1" + sha256 "877ac62d2aa87d8aeb13e021b134298a299917f30b6a7a5962d5a06407c38067" + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "797c7aaf9dfa0b1f3ac0fa6f9e60f65104f6e00f32c6e2d8a6ff61bef59cbb26" + sha256 cellar: :any, arm64_sequoia: "c1360370c18b3dd49045a151702e1c47e682061b038da2b8c5c01a4f02061dfb" + sha256 cellar: :any, arm64_sonoma: "a80e624b671d0a14d92dbc998596e547c0923d35aaabc1f1a6987182c37396b2" + sha256 cellar: :any, arm64_ventura: "246f4f56e4f00e9f21099d476dbc39373678f839f0b0b15cf1ee78a46c42a3d8" + sha256 cellar: :any, sonoma: "80c56c36b6e2c24a5856531f008de9483a2c9f57ca97eb21fd0abaa8d03a8806" + sha256 cellar: :any, ventura: "3de7a46b8262e74062f3dd8899620eec6d289b6926b09b61842fbafbc0878acc" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b45dc4e064626430772b0e482bd439af404e018edf3f07b06fa85c4fc0efa04" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e7f98063d0d1fd03f9da8bf1b320f4263e756b0bd871f3fd45f85cd8d24c886" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + args = if build.head? + # Skip trying to resolve constraints for packages that are not compatible with GHC 9.10 + # Remove after https://github.com/dhall-lang/dhall-haskell/pull/2637 + inreplace "cabal.project", %r{^\s*\./dhall-nix.*\n}, "", audit_result: false + + ["./#{name}"] + else + # Workaround until dhall-json has a new package release or metadata revision + # https://github.com/dhall-lang/dhall-haskell/commit/28d346f00d12fa134b4c315974f76cc5557f1330 + # https://github.com/dhall-lang/dhall-haskell/commit/277d8b1b3637ba2ce125783cc1936dc9591e67a7 + ["--allow-newer=dhall-json:aeson,dhall-json:text", "--constraint=aeson<2.3"] + end + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *std_cabal_v2_args + end + + test do + input = + "Content-Length: 152\r\n" \ + "\r\n" \ + "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"" \ + "processId\":88075,\"rootUri\":null,\"capabilities\":{},\"trace\":\"ver" \ + "bose\",\"workspaceFolders\":null}}\r\n" \ + "Content-Length: 46\r\n" \ + "\r\n" \ + "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"shutdown\"}\r\n" \ + "Content-Length: 42\r\n" \ + "\r\n" \ + "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"exit\"}\r\n" + + output = pipe_output(bin/"dhall-lsp-server", input, 0) + + assert_match(/^Content-Length: \d+/i, output) + assert_match "dhall.server.lint", output + end +end diff --git a/Formula/d/dhall-toml.rb b/Formula/d/dhall-toml.rb new file mode 100644 index 0000000000000..ee55855eac5c9 --- /dev/null +++ b/Formula/d/dhall-toml.rb @@ -0,0 +1,38 @@ +class DhallToml < Formula + desc "Convert between Dhall and Toml" + homepage "https://github.com/dhall-lang/dhall-haskell/tree/main/dhall-toml" + url "https://hackage.haskell.org/package/dhall-toml-1.0.4/dhall-toml-1.0.4.tar.gz" + sha256 "e2a71fe3a9939728b4829f32146ca949b3c5b3f61e1245486a9fd43ba86f32dc" + license "BSD-3-Clause" + head "https://github.com/dhall-lang/dhall-haskell.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "d202ffbdfbf211631563eca1903d4d0a5042a1c121a0846159b5f181b9381e94" + sha256 cellar: :any, arm64_sequoia: "f60b0a53a5b7aea1eb8971c09d147d36b6eb6ac790a58e40feb7d1da7294f425" + sha256 cellar: :any, arm64_sonoma: "63f45b97bae8d4a1bf2a8c35d76ade363a6438c10f6dddbb7af07ced0e8b5607" + sha256 cellar: :any, arm64_ventura: "bfe459be3cde24c50eaa7cb0f40902c52ce55c96071c70b51353a33ef2a65e22" + sha256 cellar: :any, sonoma: "79f2377d29cbb9b166c4841933e87ac9d51ee7293be86ff64c7d1ef4dfa240f1" + sha256 cellar: :any, ventura: "d73c097010f35b7556b0111c4237cb2f646c3563932b5a188fae2e7de826f093" + sha256 cellar: :any_skip_relocation, arm64_linux: "c4c783644bfdf7d1510ed0f7599268228e9fa70b72dde0e1491d622234e3fb87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1954c0b395d67fea8d74fdec8b544aa385e708e6063b7616e156dabbaaed9ce" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + assert_match "value = 1\n\n", pipe_output("#{bin}/dhall-to-toml", "{ value = 1 }", 0) + assert_match "\n", pipe_output("#{bin}/dhall-to-toml", "{ value = None Natural }", 0) + end +end diff --git a/Formula/d/dhall-yaml.rb b/Formula/d/dhall-yaml.rb new file mode 100644 index 0000000000000..80c43aa81288c --- /dev/null +++ b/Formula/d/dhall-yaml.rb @@ -0,0 +1,53 @@ +class DhallYaml < Formula + desc "Convert between Dhall and YAML" + homepage "https://github.com/dhall-lang/dhall-haskell/tree/main/dhall-yaml" + url "https://hackage.haskell.org/package/dhall-yaml-1.2.12/dhall-yaml-1.2.12.tar.gz" + sha256 "e288091b568cfba756eb458716fb84745eb2599a848326b3eb3b45a5aa0008ea" + license "BSD-3-Clause" + head "https://github.com/dhall-lang/dhall-haskell.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "124fc655cb7e13b6f0d560f16a13ac2c2f6f865f43b941997154b461b12a6737" + sha256 cellar: :any, arm64_sequoia: "8bb4903a07a2b4f814993b70b5803d6d53226034c1e3cfaef567471af101de9f" + sha256 cellar: :any, arm64_sonoma: "d141b5f7a902b8f927e3ff1d5438cc6ec008b655613d6121b8f2980ef3373f0b" + sha256 cellar: :any, arm64_ventura: "f54bf780f880756c5618e9535a87d459dcfbcb29e2a8d4e842862066ad9e8b14" + sha256 cellar: :any, sonoma: "aed714fe931e30297fc3acfe0812006a086c96037a884afb076448f188f291b6" + sha256 cellar: :any, ventura: "997efa948533b4b5d6d612ae012f6652224174fe87faca11929f04a807b956dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "0de44c119a5270dfa0282a7eb968249846819df806eee9b77b515414fcd200fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c2733c1a7f981534bd06345135d759121a092faa84b36c64fff52c40800ca17" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + args = [] + if build.stable? + # Backport support for GHC 9.10 + args += ["--allow-newer=dhall-json:aeson", "--allow-newer=dhall-json:text"] + inreplace "#{name}.cabal" do |s| + # https://github.com/dhall-lang/dhall-haskell/commit/587c0875f9539a526037712870c45cc8fe853689 + s.gsub! "aeson >= 1.0.0.0 && < 2.2 ,", + "aeson >= 1.0.0.0 && < 2.3 ," + # https://github.com/dhall-lang/dhall-haskell/commit/277d8b1b3637ba2ce125783cc1936dc9591e67a7 + s.gsub! "text >= 0.11.1.0 && < 2.1 ,", + "text >= 0.11.1.0 && < 2.2 ," + end + end + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *std_cabal_v2_args + end + + test do + assert_match "1", pipe_output("#{bin}/dhall-to-yaml-ng", "1", 0) + assert_match "- 1\n- 2", pipe_output("#{bin}/dhall-to-yaml-ng", "[ 1, 2 ]", 0) + assert_match "null", pipe_output("#{bin}/dhall-to-yaml-ng", "None Natural", 0) + end +end diff --git a/Formula/d/dhall.rb b/Formula/d/dhall.rb new file mode 100644 index 0000000000000..7e672296ed228 --- /dev/null +++ b/Formula/d/dhall.rb @@ -0,0 +1,41 @@ +class Dhall < Formula + desc "Interpreter for the Dhall language" + homepage "https://dhall-lang.org/" + url "https://hackage.haskell.org/package/dhall-1.42.3/dhall-1.42.3.tar.gz" + sha256 "cbb5612d9c55b9b3fa07ab73b72e6445875a6f53283f29979f164a9b3b067a00" + license "BSD-3-Clause" + + livecheck do + url "https://hackage-content.haskell.org/package/dhall/docs/" + strategy :header_match + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a0c88f6d849e606972f088b676e385fb3b866aec93107728074e63579442ce15" + sha256 cellar: :any, arm64_sequoia: "5c4e5006b8fbe7f851df1f5715b6132e0bf0f2e9d175f8c6869a43cf82832f8b" + sha256 cellar: :any, arm64_sonoma: "0fe7073e00a30ea6e6344188bffaa2b361919ea319b6fb9fab59b21de4842afe" + sha256 cellar: :any, sonoma: "27ca6fd8b3d000043651b6e32fc038774afa3bd77be1ce99d410c9c641cc45d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "65ae741e47d6ecbfa5f775056e10a2247b79f0543bacf0d1621898e3a1dadd17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cf559101a33d814532fa5dce8daaabc235e1fcebf71bff4313a57d3f96cb0dc" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + man1.install "man/dhall.1" + end + + test do + assert_match "{=}", pipe_output("#{bin}/dhall format", "{ = }", 0) + assert_match "8", pipe_output("#{bin}/dhall normalize", "(\\(x : Natural) -> x + 3) 5", 0) + assert_match "(x : Natural) -> Natural", pipe_output("#{bin}/dhall type", "\\(x: Natural) -> x + 3", 0) + end +end diff --git a/Formula/d/dhcpdump.rb b/Formula/d/dhcpdump.rb new file mode 100644 index 0000000000000..fecf29ba7b85e --- /dev/null +++ b/Formula/d/dhcpdump.rb @@ -0,0 +1,40 @@ +class Dhcpdump < Formula + desc "Monitor DHCP traffic for debugging purposes" + homepage "https://github.com/bbonev/dhcpdump" + url "https://github.com/bbonev/dhcpdump/releases/download/v1.9/dhcpdump-1.9.tar.xz" + sha256 "3658ac21cc33e79e72bed070454e49c543017991cb6c37f4253c85e9176869d1" + license "BSD-2-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd3ff5ab36269152b952ca60340648484b5faa2c991ae488647f64321234d831" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "388478d6f5fa4261e7adb8c0ba1718d9a5bc50b25d50b7e30d7588bb290af79e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab4719be570abc658b8f8f46de37bad273e2b2389b0d1816bf38b7f1e28c0f47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6e61cb0d3acc83a1c2c2ffc1f754b8017c05be420a7844e19fb17a5326365d1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "41867afb73da85099eb1560fbea4872835ed2dc6117af80932cfb2e2a7460276" + sha256 cellar: :any_skip_relocation, sonoma: "b28f0b506d481178f9cd43f93b6ef13457b00d75a110424e1f1745c3de14c57d" + sha256 cellar: :any_skip_relocation, ventura: "72f552b14bfaec81d3210ae49740a90bac27dbb2fdc1e262113e5a39588bb475" + sha256 cellar: :any_skip_relocation, monterey: "e43375872f07ce0af9ac1eb2e8a32e2adc40167ca60a7f1f0ebcc627d6e06d1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e2135302ac321b225f8804429896d25dda7ed4458fec6c879aca9c1465dc877b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f3b1f52c2fff495c9471cd218859780da46406aaea23d148b34220d8833e5bd" + end + + uses_from_macos "libpcap" + + def install + inreplace "Makefile", "-Wl,-z,relro -Wl,-z,now", "" if OS.mac? + system "make", "CFLAGS=-DHAVE_STRSEP" + bin.install "dhcpdump" + man8.install "dhcpdump.8" + end + + test do + system bin/"dhcpdump", "-h" + end +end diff --git a/Formula/d/dhcping.rb b/Formula/d/dhcping.rb new file mode 100644 index 0000000000000..ce24896f15c19 --- /dev/null +++ b/Formula/d/dhcping.rb @@ -0,0 +1,45 @@ +class Dhcping < Formula + desc "Perform a dhcp-request to check whether a dhcp-server is running" + homepage "http://www.mavetju.org/unix/general.php" + url "http://www.mavetju.org/download/dhcping-1.2.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/d/dhcping/dhcping_1.2.orig.tar.gz" + sha256 "32ef86959b0bdce4b33d4b2b216eee7148f7de7037ced81b2116210bc7d3646a" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?dhcping[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "508383a636e12497a54b8c5ee9732aaa9e3128e988fead007b84a79e871ff040" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57a8c433ed1c7da1d25968b298425ee8c4eb654cc2c3db24ef634eb98fe2c2f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b2f1f36436e5638b5410267578913125a9244b2ab37573e77f53d1be3bb46bcb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf672145e91afa1ade387f8f7b25b78e4669c93c50ee4950d702bdb6c2eb2dea" + sha256 cellar: :any_skip_relocation, arm64_monterey: "acd8402fd7db5ab73b2dcff742d4da1cecf51e7b3c65d8da08944f45dad35b62" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8126f3068682d4e4629158c4bec5f71fe557671ee93521d4a46286fcc8a9e53a" + sha256 cellar: :any_skip_relocation, sonoma: "efb77a8575dd69e300baf5b8dc54943a856b987dd28ef6ff92d76d7c49cd772c" + sha256 cellar: :any_skip_relocation, ventura: "8136c24d5623a25b4077432b0965d5e842f4884b82b909f807e09648a866cb66" + sha256 cellar: :any_skip_relocation, monterey: "42ec8be658cdb780037d554c64b7a4dc764b852eb2a29799cc46daa8e08cc0c3" + sha256 cellar: :any_skip_relocation, big_sur: "cea21616fd5abd22da30648e6744ff16630f3ead891b8336ca668c3fa3f93a0a" + sha256 cellar: :any_skip_relocation, catalina: "6c8a4c00ebe101f4ad040238d79137025331d8af78327b77ef72d83da985402e" + sha256 cellar: :any_skip_relocation, arm64_linux: "32108c60d2bcb26968fa5a19800f076c6414e3e254857797cfd60563e75bf0b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dad6d3c832c13d4199c87f8afb9bd93641b7145990edd3d0747612d3546b70cc" + end + + def install + args = ["--mandir=#{man}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/dhcping -c 10.0.0.2 -s 10.0.0.1 -h 34:e6:d7:0f:a9:83", 1) + assert_match "This program should only be ran by root or be installed as setuid root.", output + end +end diff --git a/Formula/d/dhex.rb b/Formula/d/dhex.rb new file mode 100644 index 0000000000000..af493ffe9d5d5 --- /dev/null +++ b/Formula/d/dhex.rb @@ -0,0 +1,45 @@ +class Dhex < Formula + desc "Ncurses based advanced hex editor featuring diff mode and more" + homepage "https://www.dettus.net/dhex/" + url "https://www.dettus.net/dhex/dhex_0.69.tar.gz" + sha256 "52730bcd1cf16bd4dae0de42531be9a4057535ec61ca38c0804eb8246ea6c41b" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?dhex[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c43035367348acd1ea2109bfcae68108766e691eeaaf7b921f68e9306f7d9fec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6ce6ef0c4079748f07bbfb1f8f74f39caf377df59e244555fe508c63c63367a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68ccfb4eef2b7a798087917073187eb465e01ff7e1b3f2401c0633006a5f1fd2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f68e9a14828f6b1bcc452d2f688322b36385e432c7bdc68caa8cc8fa10eec311" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a7c9245918065f6ea1718b437f6d051a05eee5a907c718fdd91fa13221e96d0c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6b2818af033ee41f28f7718a9a310dc32b2b54272f7485934a643571e54b65b9" + sha256 cellar: :any_skip_relocation, sonoma: "d6e4078e248b7f71461f25a8fce9e45b69dfb122f768c2c81e467ed22b54aed9" + sha256 cellar: :any_skip_relocation, ventura: "7b69d79912f98bbfc1b01b2bace2f9c93f9aa33ec31054ffd8195df35c0b8529" + sha256 cellar: :any_skip_relocation, monterey: "da93104948edb1bfa1ceec708ab498d2b14bfee4a873ed9dff599a450698c50a" + sha256 cellar: :any_skip_relocation, big_sur: "f9737b2072e10b36cf34973fb1a18fbbdd570bbb4109656b89a51678220fd67e" + sha256 cellar: :any_skip_relocation, catalina: "d3f77d4f4b0f9899e74079753d754eb69296dfe5e44b6c2497c8680e0e941a23" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bd4943c431bc7677d86bbc452a5582fa5a9d96486e089811738d52445e5b572" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2080abdc26e68d518e2b989349107cbe479f9d10fe95f628851a0a638f43a5d4" + end + + uses_from_macos "ncurses" + + def install + inreplace "Makefile", "$(DESTDIR)/man", "$(DESTDIR)/share/man" + bin.mkpath + man1.mkpath + man5.mkpath + system "make", "install", "DESTDIR=#{prefix}" + end + + test do + assert_match("GNU GENERAL PUBLIC LICENSE", + pipe_output("#{bin}/dhex -g 2>&1", "", 0)) + end +end diff --git a/Formula/d/di.rb b/Formula/d/di.rb new file mode 100644 index 0000000000000..5a84578fb36fc --- /dev/null +++ b/Formula/d/di.rb @@ -0,0 +1,45 @@ +class Di < Formula + desc "Advanced df-like disk information utility" + homepage "https://diskinfo-di.sourceforge.io/" + url "https://downloads.sourceforge.net/project/diskinfo-di/di-6.1.0.tar.gz" + sha256 "4cdd0944db0a9566f55fab375de605778b91fc91daef8005cc0dbfaac61f6af0" + license "Zlib" + + # This only matches tarballs in the root directory, as a way of avoiding + # unstable versions in the `/beta` subdirectory. + livecheck do + url :stable + regex(%r{url=.*?/files/di[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "74973f3338535718524bb650f23595d7cc2f1b3261dd3d8b4ba090c9b2f112ed" + sha256 cellar: :any, arm64_sequoia: "1c5757cd0c978d2f2783f1b92d55dbf8a66ef64860ea592e17724aa767e9ae46" + sha256 cellar: :any, arm64_sonoma: "33ecedca25f701f96b99992b9abfce95ab8e4b90e3e59fd300b17fa39de021a1" + sha256 cellar: :any, sonoma: "522b31d94a39281176a5a44303b5750775b4ed799de941ea3ae79dc1e090c218" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ba23e3ba54df50f5bb15d17db495d6172471718ece4d995fa38bf3fd50abac3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95b733e984672a9867af49f4cdc4b1845221ffde9d06a86eb1a6b4db972fec8f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + def install + args = %W[ + -DDI_BUILD=Release + -DDI_VERSION=#{version} + -DDI_LIBVERSION=#{version} + -DDI_SOVERSION=#{version.major} + -DDI_RELEASE_STATUS=production + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/di --version") + system bin/"di" + end +end diff --git a/Formula/d/diagram.rb b/Formula/d/diagram.rb new file mode 100644 index 0000000000000..4166c3ebbdc5a --- /dev/null +++ b/Formula/d/diagram.rb @@ -0,0 +1,55 @@ +class Diagram < Formula + desc "CLI app to convert ASCII arts into hand drawn diagrams" + homepage "https://github.com/esimov/diagram" + url "https://github.com/esimov/diagram/archive/refs/tags/v1.1.0.tar.gz" + sha256 "f88bc99975ade753435ecf0e7a6470611f77563eb73b94d56fa6b6bafb4b8561" + license "MIT" + head "https://github.com/esimov/diagram.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "3a77e7b6637b987d6391891b8810a495e7043b8311b2308acba17be9fb1763e5" + sha256 arm64_sequoia: "7a4c9251da9103d6c7bf749ae76e30500e2298751c6743ff0ddb27fdb2203e08" + sha256 arm64_sonoma: "0d6928b6450255451e2120814add95222db5add55282cc2f9477766b6cd4607f" + sha256 arm64_ventura: "aea4fe2d174931f81ca241d51510b1d5dfbf4034e1cc77d9eb86646859450e05" + sha256 sonoma: "9fdea25d43a0954d98c691c9b34bde4a0ab10a18e5b5b6d5fdfc1d1286c29e8c" + sha256 ventura: "bfdfb5a4c9c981dceedc86608888e1e1a6100e0f98f2fe397d411485a3762ce4" + sha256 arm64_linux: "8d40ae4f041e7e48859c91c4875605960d20ffa8de18b35953e9a783031d524f" + sha256 x86_64_linux: "8ba93efdc8407ebd4f76c6f3a78aaf392e8a177035d48d740d4c9e3412bc8746" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "vulkan-headers" => :build + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxfixes" + depends_on "libxkbcommon" + depends_on "mesa" + depends_on "wayland" + end + + def install + # Workaround to avoid patchelf corruption when cgo is required (for gioui.org/internal/vk) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + system "go", "build", *std_go_args(ldflags: "-s -w -X main.defaultFontFile=#{pkgshare}/gloriahallelujah.ttf") + + pkgshare.install ["sample.txt", "font/gloriahallelujah.ttf"] + end + + test do + cp pkgshare/"sample.txt", testpath + pid = spawn bin/"diagram", "-in", "sample.txt", "-out", testpath/"output.png" + sleep 1 + assert_path_exists testpath/"output.png" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/d/dialog.rb b/Formula/d/dialog.rb new file mode 100644 index 0000000000000..55809f715e452 --- /dev/null +++ b/Formula/d/dialog.rb @@ -0,0 +1,32 @@ +class Dialog < Formula + desc "Display user-friendly message boxes from shell scripts" + homepage "https://invisible-island.net/dialog/" + url "https://invisible-mirror.net/archives/dialog/dialog-1.3-20251001.tgz" + sha256 "bee47347a983312facc4dbcccd7fcc86608d684e1f119d9049c4692213db96c3" + license "LGPL-2.1-or-later" + + livecheck do + url "https://invisible-mirror.net/archives/dialog/" + regex(/href=.*?dialog[._-]v?(\d+(?:\.\d+)+-\d{6,8})\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68ec9e42c550d5c62f088383223783b955e0615c925597eee3d1d98cd10d55da" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f92e624e85a906113a3f63a38286cbb8edce284492abf726418eb08e8910482f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4256eeb7e61680e194407cff81fd7843af39bdc82a960c37b4618c283b85b61a" + sha256 cellar: :any_skip_relocation, sonoma: "a1346d2edcd08fb7689862d490f6e028682d5ed264619078908785b3fad5be24" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e8eafbb73505ef005ed6119a1b71c2706f719aacc4d9219dd7ecd4a0e339b93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20a9e9d2798934313e6d47d685de2a3fb692a4dbfbe927005d3d6c3215fc292e" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", "--with-ncurses" + system "make", "install-full" + end + + test do + system bin/"dialog", "--version" + end +end diff --git a/Formula/d/diamond.rb b/Formula/d/diamond.rb new file mode 100644 index 0000000000000..785611ab41d98 --- /dev/null +++ b/Formula/d/diamond.rb @@ -0,0 +1,59 @@ +class Diamond < Formula + desc "Accelerated BLAST compatible local sequence aligner" + homepage "https://github.com/bbuchfink/diamond" + url "https://github.com/bbuchfink/diamond/archive/refs/tags/v2.1.15.tar.gz" + sha256 "8159e400bc2eea504199f0dae8ba82a6402546d4d2cd941012cdc13c7e651c66" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a734ea03e8d6e15b317eaf5d774d2dc48dc9a9cd580e951563adf4a675fe3326" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2df1953f7fd9e81230c9ccca9f3d7fb1d4b74a8355f3a06f2cd36545460ee88b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "720597c06dc2f3798eef34038af4a32363a3dcbf60613a7c83810a851648ff14" + sha256 cellar: :any_skip_relocation, sonoma: "2fa3e03d71a7a33d5369ae944c7aa5721b7c39c66fd82a5932a52220bddd3283" + sha256 cellar: :any_skip_relocation, arm64_linux: "79080d8742cabaa4cfe35eff49d5e4bcb359a5b03626054c01e340358fa53b75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b553289c45c8469a51b2f44635ea9dd6a50f3e16752ce1bf6117b150ee94bbab" + end + + depends_on "cmake" => :build + + uses_from_macos "zlib" + + def install + # Fix to error: no member named 'uncaught_exception' in namespace 'std'; did you mean 'uncaught_exceptions'? + if DevelopmentTools.clang_build_version >= 1700 + inreplace "src/util/log_stream.h", + "!std::uncaught_exception()", + "std::uncaught_exceptions() == 0" + end + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"nr.faa").write <<~EOS + >gnl|alu|HSU14568_Alu_Sb_consensus_rf1 + grarwltpvipalweaeaggsrgqeietilantvkprlyXkyknXpgvvagacspsysgg + XgrrmaXtreaelavsrdratalqpgrqsetpsqkk + >gnl|alu|HSU14568_Alu_Sb_consensus_rf2 + agrggsrlXsqhfgrprradhevrrsrpswltrXnpvstkntkisrawwrapvvpatrea + eagewrepgrrslqXaeiaplhsslgdrarlrlkk + >gnl|alu|HSU14568_Alu_Sb_consensus_rf3 + pgavahacnpstlggrggritrsgdrdhpgXhgetpsllkiqklagrgggrlXsqllgrl + rqengvnpgggacseprsrhctpawaterdsvskk + >gnl|alu|HSU14568_Alu_Sb_consensus_rf-1 + fflrrslalsprlecsgaisahcklrlpgsrhspasasrvagttgarhharlifvflvet + gfhrvsqdgldlltsXsarlglpkcwdyrrepprpa + >gnl|alu|HSU14568_Alu_Sb_consensus_rf-2 + ffXdgvslcrpgwsavarsrltassasrvhaillpqppeXlglqapattpgXflyfXXrr + gftvlarmvsisXprdppasasqsagitgvshrar + >gnl|alu|HSU14568_Alu_Sb_consensus_rf-3 + ffetesrsvaqagvqwrdlgslqapppgftpfsclslpsswdyrrppprpanfcifsrdg + vspcXpgwsrspdlvirpprppkvlglqaXatapg + EOS + + output = shell_output("#{bin}/diamond makedb --in nr.faa -d nr 2>&1") + assert_match "Database sequences 6\n Database letters 572", output + end +end diff --git a/Formula/d/diary.rb b/Formula/d/diary.rb new file mode 100644 index 0000000000000..24a831bb34719 --- /dev/null +++ b/Formula/d/diary.rb @@ -0,0 +1,53 @@ +class Diary < Formula + desc "Text-based journaling program" + homepage "https://diary.p0c.ch" + url "https://code.in0rdr.ch/diary/archive/diary-v0.16.tar.gz" + sha256 "9140762d44251ebce08d5ae45878a30fc9c35dcdd98fe64da618cdd2062552dc" + license "MIT" + + livecheck do + url "https://code.in0rdr.ch/diary/archive/" + regex(/href=.*?diary[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "62a3ad3b8361f86f8f699ffa0377b354163ee2441fc9594e31d229c0d6a507ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d646d24e89a8eb7dce47ec54e42214c09010d070e893c29e2a55427cfe7e846b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30581920926485a47ab45731defce3acf5dd1c2366e4551a9b25952d03c171ea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b4f3a31788c1181823adcb3236ac4353eb442e293f39e320d9af8706cc6a098" + sha256 cellar: :any_skip_relocation, sonoma: "48d82219a584be1acb7add11dce24b2258c38baf4b5e39f7b3afcbdb4a7c3976" + sha256 cellar: :any_skip_relocation, ventura: "609b1792141d8537dfef086956db2cd0c81815ef038aae86bbb31343c10bbfe6" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9b9443c49ef95c8a613df3d244a14db2285fce87537931f53c05d5c527c3159" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9916f762d45e4d351e2d678b938d05a5d4ce2ac7a366488706d2c3de3627a9ca" + end + + depends_on "pkgconf" => :build + + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + + def install + system "make" + system "make", "CC=#{ENV.cc}", "PREFIX=#{prefix}", "install" + end + + test do + # Test version output matches the packaged version + assert_match version.to_s, shell_output("#{bin}/diary -v") + + # There is only one configuration setting which is required to start the + # application, the diary directory. + # + # Test DIARY_DIR environment variable + assert_match "The directory 'na' does not exist", shell_output("DIARY_DIR=na #{bin}/diary 2>&1", 2) + # Test diary dir option + assert_match "The directory 'na' does not exist", shell_output("#{bin}/diary -d na 2>&1", 2) + # Test missing diary dir option + assert_match "The diary directory must be provided as (non-option) arg, " \ + "`--dir` arg,\nor in the DIARY_DIR environment variable, " \ + "see `diary --help` or DIARY(1)\n", shell_output("#{bin}/diary 2>&1", 1) + end +end diff --git a/Formula/d/dicebear.rb b/Formula/d/dicebear.rb new file mode 100644 index 0000000000000..3d2759782dfc8 --- /dev/null +++ b/Formula/d/dicebear.rb @@ -0,0 +1,45 @@ +class Dicebear < Formula + desc "CLI for DiceBear - An avatar library for designers and developers" + homepage "https://github.com/dicebear/dicebear" + url "https://registry.npmjs.org/dicebear/-/dicebear-9.2.4.tgz" + sha256 "ab8e430f1b4fb999372cf78b274e04ca999fff16891f19ece63f63ab7f7aa373" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "22e8bc01e12dddc25982aecfe7436c0c0ac53299191039060b2d1b2f440ac6a0" + sha256 cellar: :any, arm64_sequoia: "6cd2e65e517ada31b350201063bab3ec51163447732ba73541e68158d565b1ae" + sha256 cellar: :any, arm64_sonoma: "6cd2e65e517ada31b350201063bab3ec51163447732ba73541e68158d565b1ae" + sha256 cellar: :any, arm64_ventura: "6cd2e65e517ada31b350201063bab3ec51163447732ba73541e68158d565b1ae" + sha256 cellar: :any, sonoma: "bec6992b45e1ace0b2862d90c2764aaf21d270227e652d05620078e3ec8e4f9a" + sha256 cellar: :any, ventura: "bec6992b45e1ace0b2862d90c2764aaf21d270227e652d05620078e3ec8e4f9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7828cf098c33bd975cad5f657ec7cdf4faad2c78cacf65293f0713fc42e198ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45af81803b2bf97e8d4f50f64ba27a817f88b9b5cad916fa22bbf9232a78dc38" + end + + depends_on "node" + + on_linux do + depends_on "vips" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + node_modules = libexec/"lib/node_modules/dicebear/node_modules" + + # Remove incompatible pre-built `bare-fs`/`bare-os` binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules.glob("{bare-fs,bare-os}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + output = shell_output("#{bin}/dicebear avataaars") + assert_match "Avataaars by Pablo Stanley", output + assert_path_exists testpath/"avataaars-0.svg" + + assert_match version.to_s, shell_output("#{bin}/dicebear --version") + end +end diff --git a/Formula/d/diceware.rb b/Formula/d/diceware.rb new file mode 100644 index 0000000000000..b3c15bd996d53 --- /dev/null +++ b/Formula/d/diceware.rb @@ -0,0 +1,30 @@ +class Diceware < Formula + include Language::Python::Virtualenv + + desc "Passphrases to remember" + homepage "https://github.com/ulif/diceware" + url "https://files.pythonhosted.org/packages/8b/ba/db6c087f044f6a753a85c0d8b25848122018ced2130061298c0c08940a54/diceware-1.0.1.tar.gz" + sha256 "54b690809f0c56ab3085a18e15a0c3804d4a0d127f38aef0b5cf5f859d0f6639" + license "GPL-3.0-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "3fecb6390567f06e893d664105063c32aa80a8bb3b2f4cdc1944b8850b5c9749" + end + + depends_on "python@3.14" + + def install + venv = virtualenv_install_with_resources + man1.install "diceware.1" + + # Build an :all bottle + file = venv.site_packages.glob("diceware/wordlist.py") + inreplace file, "/usr/local/share/#{name}", HOMEBREW_PREFIX/"share/#{name}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/diceware --version") + assert_match(/(\w+)(-(\w+)){5}/, shell_output("#{bin}/diceware -d-")) + end +end diff --git a/Formula/d/dict.rb b/Formula/d/dict.rb new file mode 100644 index 0000000000000..4c3f21375c537 --- /dev/null +++ b/Formula/d/dict.rb @@ -0,0 +1,46 @@ +class Dict < Formula + desc "Dictionary Server Protocol (RFC2229) client" + homepage "https://dict.org/bin/Dict" + url "https://downloads.sourceforge.net/project/dict/dictd/dictd-1.13.3/dictd-1.13.3.tar.gz" + sha256 "192129dfb38fa723f48a9586c79c5198fc4904fec1757176917314dd073f1171" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "065e628c984ce455ed3ae85fa485098d829f343c5f1e68ab398fc4c77d57fe36" + sha256 arm64_sequoia: "8ae52e0cd8200e05e9aab9b15269c4617b648079a1ccaf54879acc759eb268a9" + sha256 arm64_sonoma: "81d599c0cb61e67ee19ecc54293cac944568884b61d470fd50b0b30a1b8dae33" + sha256 arm64_ventura: "5e07587d607e55a3ed72f4537dccb417b16e2cd463a6690f8ca8d508d520c919" + sha256 sonoma: "b6b358141e0bd18ba760ad85aee702004152e6d68d3cda9da560e519e4361c25" + sha256 ventura: "826e7bbdd50a8db3a8fd53b53b2183eb53f5cf107edb9adb3590ace085b16112" + sha256 arm64_linux: "a09aee6926baa5a91ec8f9e258d2d0b9fada22818a9be03e721df7dd853f1012" + sha256 x86_64_linux: "ae7ef43f713a5e828d33cfb43d4344ea6efb28809e95fdcdb47c06532fcb0705" + end + + depends_on "libtool" => :build + depends_on "libmaa" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "zlib" + + def install + # Workaround for Xcode 14.3 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV["ac_cv_search_yywrap"] = "yes" + ENV["LIBTOOL"] = "glibtool" + system "./configure", *std_configure_args, + "--sysconfdir=#{etc}", + "--mandir=#{man}" + system "make" + system "make", "install" + (prefix/"etc/dict.conf").write <<~EOS + server localhost + server dict.org + EOS + end + + test do + assert_match "brewing or making beer.", shell_output("#{bin}/dict brew") + end +end diff --git a/Formula/d/diction.rb b/Formula/d/diction.rb new file mode 100644 index 0000000000000..f38fe6ca2569a --- /dev/null +++ b/Formula/d/diction.rb @@ -0,0 +1,42 @@ +class Diction < Formula + desc "GNU diction and style" + homepage "https://www.gnu.org/software/diction/" + url "https://ftpmirror.gnu.org/gnu/diction/diction-1.11.tar.gz" + mirror "https://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz" + sha256 "35c2f1bf8ddf0d5fa9f737ffc8e55230736e5d850ff40b57fdf5ef1d7aa024f6" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "abe65914558d009a92abe38d0c86b41936e724e53ec3d3045ff5b2f37be7cf4c" + sha256 arm64_sequoia: "6516cc7161c82d0f8db43cc8feb42dfac2f946e632c76432cb7ed00fde3fe078" + sha256 arm64_sonoma: "4589af49e9b3cd23f77eae06ba86dadb9b364ca88e1714b3aa4b2f169df49321" + sha256 arm64_ventura: "9a0b3b7dd6f41245ff193e2bb23cb351d0378fe4aab1bf5bc2be56e123c39f14" + sha256 arm64_monterey: "183609551d3baeef5692cfffda8251eda4e2586d5ce26db40a1c0c1a9d6e8a14" + sha256 arm64_big_sur: "88a87488f8e893dc86f30e8736cf9cbdc2459976da13d899cb91daf8abdfe23e" + sha256 sonoma: "53e52bc08853b0e471fd5393c12937106de73760b40611cab468e2eae2fcf260" + sha256 ventura: "600f2890074435296fd68c07bb8cbcd69c3cee3f4bdf84fcfbd7c508e075da43" + sha256 monterey: "3ac10ac27b2fd8d0c961b256577a52eeb6bf5a8afce04afdc9c39d5a1403ae32" + sha256 big_sur: "cf3b827429c5513b3289ab9c0df46de743cf84c773102a2f01058c982721e4cc" + sha256 catalina: "ff26ae017482eaef3a07b4c6522e65a84b2ec03b6afaffa20e0138a244edd5e2" + sha256 arm64_linux: "e73e21df8df919d01becb9b68654ec8b483dbb31207e4685f0b126b8d56c30de" + sha256 x86_64_linux: "fa36156d5d431720a8bc0c8b05a1681e9231cfce822b2b012c602fa1a8e3e159" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + file = "test.txt" + (testpath/file).write "The quick brown fox jumps over the lazy dog." + assert_match(/^.*35 characters.*9 words.*$/m, shell_output("#{bin}/style #{file}")) + assert_match "No phrases in 1 sentence found.", shell_output("#{bin}/diction #{file}") + end +end diff --git a/Formula/d/diesel.rb b/Formula/d/diesel.rb new file mode 100644 index 0000000000000..1fece76dc2420 --- /dev/null +++ b/Formula/d/diesel.rb @@ -0,0 +1,35 @@ +class Diesel < Formula + desc "Command-line tool for Rust ORM Diesel" + homepage "https://diesel.rs" + url "https://github.com/diesel-rs/diesel/archive/refs/tags/v2.3.3.tar.gz" + sha256 "11941ce0131aede9cfc915eaa8696cab650d528634a9647fccc853d96889f2aa" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/diesel-rs/diesel.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "48a9ec6b615681d84872079aa67fdfcf033fc1de66d916240da76fc088f9351d" + sha256 cellar: :any, arm64_sequoia: "201df54d961b36e0dfce8301bd248c3affcdb36f7a3ec8c7e567c04a64eaf236" + sha256 cellar: :any, arm64_sonoma: "53cbb408e82e2c1ff179222710222aba3711bfcf728ba90bab584b71507e931a" + sha256 cellar: :any, sonoma: "6a1242ccc1d91fddb0ba1270cbb0b05b916e9c31ecfb8ea7a39bd2e1cde371fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "799c340f9c8ed9c1dcaf1843c8a001a0a3443ff0ce67ec70d396bafef97063ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c73eba3aaff0e3da78acd920be5dbeb16445d1001478d11313314b1f401c58a3" + end + + depends_on "rust" => [:build, :test] + depends_on "libpq" + depends_on "mariadb-connector-c" + + uses_from_macos "sqlite" + + def install + system "cargo", "install", *std_cargo_args(path: "diesel_cli") + generate_completions_from_executable(bin/"diesel", "completions") + end + + test do + ENV["DATABASE_URL"] = "db.sqlite" + system "cargo", "init" + system bin/"diesel", "setup" + assert_path_exists testpath/"db.sqlite", "SQLite database should be created" + end +end diff --git a/Formula/d/diff-pdf.rb b/Formula/d/diff-pdf.rb new file mode 100644 index 0000000000000..9e3944d3b1fe9 --- /dev/null +++ b/Formula/d/diff-pdf.rb @@ -0,0 +1,48 @@ +class DiffPdf < Formula + desc "Visually compare two PDF files" + homepage "https://vslavik.github.io/diff-pdf/" + url "https://github.com/vslavik/diff-pdf/releases/download/v0.5.2/diff-pdf-0.5.2.tar.gz" + sha256 "7d018f05e30050a2b49dee137f084584b43aec87c7f5ee9c3bbd14c333cbfd54" + license "GPL-2.0-only" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "39d3ffa2ca4a7c23b19d569d3ad80308cb2a427ee9386024770f27ee48bfe1ef" + sha256 cellar: :any, arm64_sequoia: "a6fdb5286aa134dcdc600dbabf9c84c5f8f9c1efc83ea73311bb7bb2a0840739" + sha256 cellar: :any, arm64_sonoma: "8170798a716f04ea3a50de00147750f2b04464ef614fb465a9cbcd337ebd60a1" + sha256 cellar: :any, arm64_ventura: "b5c66a318b2c7b71dcbe2366b8ebda2950d0652568af574d859c758f29e72ba1" + sha256 cellar: :any, sonoma: "5edf62102c1b6662823fc3a6c897b9c94c837251d3d969e69f573daf3129b864" + sha256 cellar: :any, ventura: "2eaf870131f8fabc96a894893d02f23302ee681dfa1f482ab30c0e129b181ffd" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ed5d51b2b1950bacc69831b82141f87a1d34ff9cf7344b1dba6c7f2f472de8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ce93415222a7df01057095309882ee6b32a02f5fc5d175bc8779567ebd76b7b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "glib" + depends_on "poppler" + depends_on "wxwidgets@3.2" + + on_macos do + depends_on "gettext" + end + + def install + wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)*)?$/) }.to_formula + wx_config = wxwidgets.opt_bin/"wx-config-#{wxwidgets.version.major_minor}" + system "./configure", "--disable-silent-rules", "--with-wx-config=#{wx_config}", *std_configure_args + system "make", "install" + end + + test do + testpdf = test_fixtures("test.pdf") + system bin/"diff-pdf", "--output-diff=no_diff.pdf", testpdf, testpdf + assert_path_exists testpath/"no_diff.pdf" + end +end diff --git a/Formula/d/diff-so-fancy.rb b/Formula/d/diff-so-fancy.rb new file mode 100644 index 0000000000000..a473b9ba4ef17 --- /dev/null +++ b/Formula/d/diff-so-fancy.rb @@ -0,0 +1,37 @@ +class DiffSoFancy < Formula + desc "Good-lookin' diffs with diff-highlight and more" + homepage "https://github.com/so-fancy/diff-so-fancy" + url "https://github.com/so-fancy/diff-so-fancy/archive/refs/tags/v1.4.4.tar.gz" + sha256 "3eac2cfb3b1de9d14b6a712941985d6b240b7f3726c94a5e337317c7161e869d" + license "MIT" + head "https://github.com/so-fancy/diff-so-fancy.git", branch: "next" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f88300e5b0347ad6b6ef31ecb78e593bda7a96552900b3e2ef1323f10d90bd8b" + end + + def install + libexec.install "diff-so-fancy", "lib" + bin.install_symlink libexec/"diff-so-fancy" + end + + test do + diff = <<~EOS + diff --git a/hello.c b/hello.c + index 8c15c31..0a9c78f 100644 + --- a/hello.c + +++ b/hello.c + @@ -1,5 +1,5 @@ + #include <stdio.h> + + int main(int argc, char **argv) { + - printf("Hello, world!\n"); + + printf("Hello, Homebrew!\n"); + } + EOS + assert_match "modified: hello.c", pipe_output(bin/"diff-so-fancy", diff, 0) + end +end diff --git a/Formula/d/diffoci.rb b/Formula/d/diffoci.rb new file mode 100644 index 0000000000000..91a1015f024e9 --- /dev/null +++ b/Formula/d/diffoci.rb @@ -0,0 +1,37 @@ +class Diffoci < Formula + desc "Diff for Docker and OCI container images" + homepage "https://github.com/reproducible-containers/diffoci" + url "https://github.com/reproducible-containers/diffoci/archive/refs/tags/v0.1.7.tar.gz" + sha256 "86ff1f7d0a91934790369184fa88b5402c5b7b0ec87358c915b2fb1e97bd5c0d" + license "Apache-2.0" + head "https://github.com/reproducible-containers/diffoci.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "312997c7bb2b42aa19919b4800ffd077558236548791b8f798135de2e7924112" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94baef5d5a95a35f21622becbf6e538c1690c2266477ed37e240e4b4200e9253" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "94baef5d5a95a35f21622becbf6e538c1690c2266477ed37e240e4b4200e9253" + sha256 cellar: :any_skip_relocation, arm64_ventura: "94baef5d5a95a35f21622becbf6e538c1690c2266477ed37e240e4b4200e9253" + sha256 cellar: :any_skip_relocation, sonoma: "ea0566a0a0f19b46e4cfd41f8ec6f86480c841e0295bc25ad90604c0846c352b" + sha256 cellar: :any_skip_relocation, ventura: "b9e81c35c29ae56494fdfab84567ab17b9e0fd993de2e9c4d91a77fd63e0d3fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "445039f35a22af5204e8576d3c59e102067a80b53e1fa4a6b86585fce4f847ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2aad3bcf108466ce3eee0b7b541c09d591ccde343be82dfeff606af7d62dd2b" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/reproducible-containers/diffoci/cmd/diffoci/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/diffoci" + + generate_completions_from_executable(bin/"diffoci", "completion") + end + + test do + assert_match "Backend: local", shell_output("#{bin}/diffoci info") + + assert_match version.to_s, shell_output("#{bin}/diffoci --version") + end +end diff --git a/Formula/d/diffoscope.rb b/Formula/d/diffoscope.rb new file mode 100644 index 0000000000000..382d03b4bcd2b --- /dev/null +++ b/Formula/d/diffoscope.rb @@ -0,0 +1,61 @@ +class Diffoscope < Formula + include Language::Python::Virtualenv + + desc "In-depth comparison of files, archives, and directories" + homepage "https://diffoscope.org" + url "https://files.pythonhosted.org/packages/01/50/2f7df57b08a3f6045e7a01aa5d6b00c8ccf4dc6603e2d2de02e1ec356c5a/diffoscope-306.tar.gz" + sha256 "2c489aba7334ab0d4a9946ac51fe1b17085621a5476b89950e9c4f1e612cbab3" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dc29c65694220079871aab80eb870a3faa3efeb21001c53ac37d95106bd237fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc29c65694220079871aab80eb870a3faa3efeb21001c53ac37d95106bd237fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc29c65694220079871aab80eb870a3faa3efeb21001c53ac37d95106bd237fc" + sha256 cellar: :any_skip_relocation, sonoma: "8353449291101c3da5279ac22bd1a796952ce482f3eaf178497f2b15475630dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "c04271983c94630c10141b3768c1ccd75b6e4b592d02e579e39adbcfb51a19ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c04271983c94630c10141b3768c1ccd75b6e4b592d02e579e39adbcfb51a19ed" + end + + depends_on "libarchive" + depends_on "libmagic" => :no_linkage + depends_on "python@3.14" + + pypi_packages package_name: "diffoscope[cmdline]" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "libarchive-c" do + url "https://files.pythonhosted.org/packages/26/23/e72434d5457c24113e0c22605cbf7dd806a2561294a335047f5aa8ddc1ca/libarchive_c-5.3.tar.gz" + sha256 "5ddb42f1a245c927e7686545da77159859d5d4c6d00163c59daff4df314dae82" + end + + resource "progressbar" do + url "https://files.pythonhosted.org/packages/a3/a6/b8e451f6cff1c99b4747a2f7235aa904d2d49e8e1464e0b798272aa84358/progressbar-2.5.tar.gz" + sha256 "5d81cb529da2e223b53962afd6c8ca0f05c6670e40309a7219eacc36af9b6c63" + end + + resource "python-magic" do + url "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz" + sha256 "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b" + end + + def install + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + venv.pip_install buildpath + + bin.install libexec/"bin/diffoscope" + libarchive = Formula["libarchive"].opt_lib/shared_library("libarchive") + bin.env_script_all_files(libexec/"bin", LIBARCHIVE: libarchive) + end + + test do + (testpath/"test1").write "test" + cp testpath/"test1", testpath/"test2" + system bin/"diffoscope", "--progress", "test1", "test2" + end +end diff --git a/Formula/d/diffr.rb b/Formula/d/diffr.rb new file mode 100644 index 0000000000000..e5ea4c23e6ed7 --- /dev/null +++ b/Formula/d/diffr.rb @@ -0,0 +1,39 @@ +class Diffr < Formula + desc "LCS based diff highlighting tool to ease code review from your terminal" + homepage "https://github.com/mookid/diffr" + url "https://github.com/mookid/diffr/archive/refs/tags/v0.1.5.tar.gz" + sha256 "6c5861e5b8f5d798e027fe69cc186452848dc4ae5641326b41b5c160d3e91654" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "071c7a6bb8aa37bd0282e02096635a6aff9afb1e263dff03ae426a2d45351511" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25cdb1a853eceeba0ce00dee4f2b5657abe9865ee7568a0cf18ee0b5fe95d3bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2bc9706cc3bf1e99eda0b2138a3dbea9b4da2c097f4e4c421aa6249269146678" + sha256 cellar: :any_skip_relocation, arm64_ventura: "234e4932d849bec1ee31bc0caa455070caf78aa3839836ee15cce08546c72995" + sha256 cellar: :any_skip_relocation, arm64_monterey: "661cd6dd97c93e60266a8cf7a99240595b25dbf911efb143c4c5a60eb2c7d483" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d29fa319b7d851b24c147046018da33c98363de7439cee89b5eae6bfd13982c1" + sha256 cellar: :any_skip_relocation, sonoma: "1b2001d7460d2d321838224631d7e1e06ca54e13e0276b69caeb39c4f5b6d76a" + sha256 cellar: :any_skip_relocation, ventura: "6d3a1af07c576b6db1522a77560bbe540a567a7339838dc5c660e7781a2302bb" + sha256 cellar: :any_skip_relocation, monterey: "d4d630b6e9973149bd9eb76134f9953ec0630274592ee4f5c1bce2d38de0b10e" + sha256 cellar: :any_skip_relocation, big_sur: "de79ded7a7f2b81026d2c8d5c9148ddc19815a953c10120b52874e52af9d25b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce5653f762bcb8260b50f894f1c0a3b52549fd8e36baaf95c320169585b58c90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6340e51e0dd0f436f0cf3450d125f3a16b652cadf4b7de0fe9127ea7d90007b1" + end + + depends_on "rust" => :build + depends_on "diffutils" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"a").write "foo" + (testpath/"b").write "foo" + _output, status = + Open3.capture2("#{Formula["diffutils"].bin}/diff -u a b | #{bin}/diffr") + status.exitstatus.zero? + end +end diff --git a/Formula/d/diffstat.rb b/Formula/d/diffstat.rb new file mode 100644 index 0000000000000..72558cfbeb651 --- /dev/null +++ b/Formula/d/diffstat.rb @@ -0,0 +1,47 @@ +class Diffstat < Formula + desc "Produce graph of changes introduced by a diff file" + homepage "https://invisible-island.net/diffstat/" + url "https://invisible-mirror.net/archives/diffstat/diffstat-1.68.tgz" + sha256 "89f9294a8ac74fcef6f1b9ac408f43ebedf8d208e3efe0b99b4acc16dc6582c7" + license "MIT-CMU" + + livecheck do + url "https://invisible-mirror.net/archives/diffstat/" + regex(/href=.*?diffstat[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aabff535f1643aa62da222acc50f888468d1447a681fd772248776edcdb86b89" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78c1cc462b3452c45dfc0a2ee6d512c399a11da0b6e303791ec0c565abf2eb45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8091ee39103e241afc375850844ef3d69dd366ff80b8e1b4946690f6b8be995" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff5cf1a420613275a0ddbbbeb9037a4a3751cc2374f72d8f77b769534a8aafd6" + sha256 cellar: :any_skip_relocation, sonoma: "7dd431cf2efacf1ec9b3f171413962f0cabe1cac57a5c0dc838740b19df9181f" + sha256 cellar: :any_skip_relocation, ventura: "c693917f62ffb2ab2dd3b8fbee4c59d8acf0e1851777d42462432e8086c75139" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d852a70b43e45bc2b4c7e6a175be6a363d34c13ae9bdb7d62f7bc7360cfcb24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbb2dfa4d3d9dfa85a897e3514edfd699c972200a758a998458569a7e369cac8" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"diff.diff").write <<~DIFF + diff --git a/diffstat.rb b/diffstat.rb + index 596be42..5ff14c7 100644 + --- a/diffstat.rb + +++ b/diffstat.rb + @@ -2,9 +2,8 @@ + - url 'https://deb.debian.org/debian/pool/main/d/diffstat/diffstat_1.58.orig.tar.gz' + - version '1.58' + - sha256 'fad5135199c3b9aea132c5d45874248f4ce0ff35f61abb8d03c3b90258713793' + + url 'https://deb.debian.org/debian/pool/main/d/diffstat/diffstat_1.61.orig.tar.gz' + + sha256 '89f9294a8ac74fcef6f1b9ac408f43ebedf8d208e3efe0b99b4acc16dc6582c7' + DIFF + output = shell_output("#{bin}/diffstat diff.diff") + assert_match "2 insertions(+), 3 deletions(-)", output + end +end diff --git a/Formula/d/difftastic.rb b/Formula/d/difftastic.rb new file mode 100644 index 0000000000000..40d3d313d51f2 --- /dev/null +++ b/Formula/d/difftastic.rb @@ -0,0 +1,33 @@ +class Difftastic < Formula + desc "Diff that understands syntax" + homepage "https://github.com/Wilfred/difftastic" + url "https://github.com/Wilfred/difftastic/archive/refs/tags/0.65.0.tar.gz" + sha256 "59462f69e2cedfdc1bee4fd0da48fe9a7ae635cdb6818c1a300b31c0b146d4b8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f53e8f71743e6c8d312daa0375f37552c31cd65f36070c910d96754bbd913d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e225ac22a393818486adc2c4e8b9d72dc9f5d328fbc756b355af9ebb5a36e2bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c84ded23370cf25a87f1a0f95b3cbddec3399a15acccbbd8fbd746e3e60e3ae0" + sha256 cellar: :any_skip_relocation, sonoma: "74adcd8017f76c8abfe4890c357ca6d72e86029b97eefbd534b993147ba48d33" + sha256 cellar: :any_skip_relocation, arm64_linux: "28ee881d685edcd4312f2bd845d51fa48459104b8ee120baff5741a460347ead" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84be8f22e67c13db6bc1e162af3899eaf897160280901d2f07b0dd0ccd504502" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + man1.install "difft.1" + end + + test do + (testpath/"a.py").write("print(42)\n") + (testpath/"b.py").write("print(43)\n") + expected = <<~EOS + b.py --- Python + 1 print(42) 1 print(43)\n + EOS + assert_equal expected, shell_output("#{bin}/difft --color never --width 80 a.py b.py") + end +end diff --git a/Formula/d/diffutils.rb b/Formula/d/diffutils.rb new file mode 100644 index 0000000000000..d82c2d52f4f30 --- /dev/null +++ b/Formula/d/diffutils.rb @@ -0,0 +1,30 @@ +class Diffutils < Formula + desc "File comparison utilities" + homepage "https://www.gnu.org/software/diffutils/" + url "https://ftpmirror.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz" + mirror "https://ftp.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz" + sha256 "7c8b7f9fc8609141fdea9cece85249d308624391ff61dedaf528fcb337727dfd" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "380bbf30a86eed3cc85348f32fc17062840a11a7b2e5568c3efeac866c191640" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f1439a94ab4fc8928a92a20d939e88ae0a77fb350a9d93e4d1101570a9590b4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b9673616bcea3eb994a9b3afcb243f1b204f182c9aef25e6abf0c19eb79e2e7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3bc99b9d6cdfe12150ec8b91e22e0a73dd415f9a3272752638415db6747d4097" + sha256 cellar: :any_skip_relocation, sonoma: "710e012f9f4c1f2f4cbd489741e98ac26d3e48133bb5c1c2cad3d6e08d64a5d8" + sha256 cellar: :any_skip_relocation, ventura: "21df5472d1dabef143c9db748602efaf9acb5348a9f63e0ac364bd6562a9acb6" + sha256 arm64_linux: "19f90006aba953a5396e794b938ae06a95f98ddcb56a505646ebe95ca0a56d07" + sha256 x86_64_linux: "0d9d0320b98b399c0f3f1f0ec76b83192bbf74b393105b198c2322285ed08f12" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"a").write "foo" + (testpath/"b").write "foo" + system bin/"diff", "a", "b" + end +end diff --git a/Formula/d/digdag.rb b/Formula/d/digdag.rb new file mode 100644 index 0000000000000..ab4119ac5e3f3 --- /dev/null +++ b/Formula/d/digdag.rb @@ -0,0 +1,31 @@ +class Digdag < Formula + desc "Workload Automation System" + homepage "https://www.digdag.io/" + url "https://github.com/treasure-data/digdag/releases/download/v0.10.5.1/digdag-0.10.5.1.jar" + sha256 "4d1337d777bd334c2348e07ebc1795283aa50a2fd3b7d720cba5ee33b5486aa8" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "3af153565676568e99be6edfa30c63e2729d7c3e0b1c89cad5fbb49550be4ac3" + end + + depends_on "openjdk@11" + + def install + libexec.install "digdag-#{version}.jar" + bin.write_jar_script libexec/"digdag-#{version}.jar", "digdag", java_version: "11" + end + + test do + assert_match version.to_s, shell_output("#{bin}/digdag --version") + system bin/"digdag", "init", "mydag" + cd "mydag" do + system bin/"digdag", "run", "mydag.dig" + end + end +end diff --git a/Formula/d/digitemp.rb b/Formula/d/digitemp.rb new file mode 100644 index 0000000000000..cc75b71495c51 --- /dev/null +++ b/Formula/d/digitemp.rb @@ -0,0 +1,53 @@ +class Digitemp < Formula + desc "Read temperature sensors in a 1-Wire net" + homepage "https://www.digitemp.com/" + url "https://github.com/bcl/digitemp/archive/refs/tags/v3.7.2.tar.gz" + sha256 "683df4ab5cc53a45fe4f860c698f148d34bcca91b3e0568a342f32d64d12ba24" + license "GPL-2.0-or-later" + head "https://github.com/bcl/digitemp.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4814840607f10a9305f0840e3d93bf5a5ef4c050c4f3d11dc624a9c66df7ac58" + sha256 cellar: :any, arm64_sequoia: "e807829f6b24e85e3cb39c442aff3b400d886b16b6a17b7122df5b3ec9a92bc1" + sha256 cellar: :any, arm64_sonoma: "745ab5f0bd70e480714242d647e99eb37b290c0e308f942aad4753dd4efa53ad" + sha256 cellar: :any, arm64_ventura: "90f8b147176e4c1383934ed0992b8647b6d31f80069c6bb0803928f653911f88" + sha256 cellar: :any, arm64_monterey: "8de47e480d9a46e00ca897acad3787f7c6897aefe28e63f3008aa7c736112e17" + sha256 cellar: :any, arm64_big_sur: "d63a759441dd683b447bc9db45786b1bce2f662d67a340d81048b8a25daa021f" + sha256 cellar: :any, sonoma: "dbae73b02c4201fecf961c3dcd1276d34e9f636a8c23815ebcd60775a2a9d103" + sha256 cellar: :any, ventura: "0c886d16a9413d8639d8c970ac6d875b1a63ae5585a44e67086262d2f310331a" + sha256 cellar: :any, monterey: "b184352eb21cbca65269b7b0ae3da2213791b53530f515c91a0edc44a37d0534" + sha256 cellar: :any, big_sur: "dfcce60792d55b3d715c7cadb3179193ce943edb291913423c34456b53a1ac37" + sha256 cellar: :any, catalina: "6d79bfded73a02e6c84d90c5437226567389212bf07d0b15b355465db645c6ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "0356ddcd980cc160525986977c05d35786c47e42bc2ed992e2cbf7432f3d1077" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f307cb2ce339c2b19089b46fc564e4492126b75abea1c79ca31fe6debfa5341" + end + + depends_on "libusb-compat" + + def install + mkdir_p "build-serial/src" + mkdir_p "build-serial/userial/ds9097" + mkdir_p "build-serial/userial/ds9097u" + mkdir_p "build-usb/src" + mkdir_p "build-usb/userial/ds2490" + system "make", "-C", "build-serial", "-f", "../Makefile", "SRCDIR=..", "ds9097", "ds9097u" + system "make", "-C", "build-usb", "-f", "../Makefile", "SRCDIR=..", "ds2490" + bin.install "build-serial/digitemp_DS9097" + bin.install "build-serial/digitemp_DS9097U" + bin.install "build-usb/digitemp_DS2490" + man1.install "digitemp.1" + man1.install_symlink "digitemp.1" => "digitemp_DS9097.1" + man1.install_symlink "digitemp.1" => "digitemp_DS9097U.1" + man1.install_symlink "digitemp.1" => "digitemp_DS2490.1" + end + + # digitemp has no self-tests and does nothing without a 1-wire device, + # so at least check the individual binaries compiled to what we expect. + test do + assert_match "Compiled for DS2490", shell_output("#{bin}/digitemp_DS2490 2>&1", 255) + assert_match "Compiled for DS9097", shell_output("#{bin}/digitemp_DS9097 2>&1", 255) + assert_match "Compiled for DS9097U", shell_output("#{bin}/digitemp_DS9097U 2>&1", 255) + end +end diff --git a/Formula/d/dillo.rb b/Formula/d/dillo.rb new file mode 100644 index 0000000000000..366f8f2307ead --- /dev/null +++ b/Formula/d/dillo.rb @@ -0,0 +1,83 @@ +class Dillo < Formula + desc "Fast and small graphical web browser" + homepage "https://dillo-browser.github.io/" + url "https://github.com/dillo-browser/dillo/releases/download/v3.2.0/dillo-3.2.0.tar.bz2" + sha256 "1066ed42ea7fe0ce19e79becd029c651c15689922de8408e13e70bb5701931bf" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "fd56c3ac780ea1c1d420546b8691773d85b8259308dafa3c3227921f423a29da" + sha256 arm64_sequoia: "0207d59785da8978150221c348a04269db1e6af49b16cea243aeaeb2d874592d" + sha256 arm64_sonoma: "28b93f6b93b643299e98f8f9b543b55784ce83e16e624d460453b2741b4faa61" + sha256 arm64_ventura: "91e47bdc6957706b451ad79446f0807b46f7ad3bd52ed9e4b3e7fbf7f68e7656" + sha256 sonoma: "eb64b7f51d5fd459bf3dc5ceffebc8f44a8cccf2e5288fd8bd2bc00e076c7d7a" + sha256 ventura: "d67a1834f6bdb695b18602e11411bf5e6e723df7a2fe4cb513c392da4ec52561" + sha256 arm64_linux: "c7726b387e90495e472ba084ea9c20fa14414b9f5a13f0ad2547d76dfdf94ef4" + sha256 x86_64_linux: "b38cf02dc15d8362d04a62438d62eb0f6b7be342d83fd349f414b0c24f5f4989" + end + + head do + url "https://github.com/dillo-browser/dillo.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + # TODO: Switch to unversioned `fltk` when possible. + # https://github.com/dillo-browser/dillo/issues/246 + depends_on "fltk@1.3" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + end + + def install + if build.head? + ENV["NOCONFIGURE"] = "1" + system "./autogen.sh" + end + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + test_file = testpath/"test.html" + (testpath/"test.html").write <<~HTML + <!DOCTYPE html> + <html> + <head> + <title>BrewTest + + +

test

+ + + HTML + + # create bunch of dillo resource files + (testpath/".dillo").mkpath + (testpath/".dillo/dillorc").write "" + (testpath/".dillo/keysrc").write "" + (testpath/".dillo/domainrc").write "" + (testpath/".dillo/hsts_preload").write "" + + begin + PTY.spawn(bin/"dillo", test_file) do |_r, _w, pid| + sleep 15 + Process.kill("TERM", pid) + end + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + + assert_match "DEFAULT DENY", (testpath/".dillo/cookiesrc").read + + assert_match version.to_s, shell_output("#{bin}/dillo --version") + end +end diff --git a/Formula/d/dipc.rb b/Formula/d/dipc.rb new file mode 100644 index 0000000000000..11d3d1ec42f0a --- /dev/null +++ b/Formula/d/dipc.rb @@ -0,0 +1,37 @@ +class Dipc < Formula + desc "Convert your favorite images/wallpapers with your favorite color palettes/themes" + homepage "https://github.com/doprz/dipc" + url "https://github.com/doprz/dipc/archive/refs/tags/v1.0.0.tar.gz" + sha256 "dd98bf2eea8e97dfaeb8d4e0a991a732e35bf71e1b9bdf0045fdad80e0c0d319" + license any_of: ["MIT", "Apache-2.0"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b6cfce35595b22d154392487111416ee930389f21d5b83875bbde40fd2ff927a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "182b6056ad68e867829727c6112022f45c207fe32312193a5ed3c7c69c4a1a6a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e38cd4ab7323ef745a39bb70fd7bb62ff158aaefa17ad9195ece908f6de633c4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "de128a4b41bfbed37c27968b07a8561d280a0f389d5a6a3326df09d7bb1e120c" + sha256 cellar: :any_skip_relocation, sonoma: "a9a718e1a4ba5745ad5c43d5122c0b73c11c34b02f395f7a0126cd5d591a260d" + sha256 cellar: :any_skip_relocation, ventura: "307edf5ce6bbe7000e6e17d26e771558b9a7b6d330f0111cd2ce9b1ea2d09f81" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9d4c00739e898767683f201b27d5b753bbb374daf96909b02dddf7027e5a0f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13a6a7cd17b79209983f4c8a09bfd44218117d35f86e159c5f847fefae4eb0be" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Test processing with a built-in theme (gruvbox) + output_path = testpath/"output.png" + system bin/"dipc", "gruvbox", "--styles", "Dark mode", "-o", output_path, test_fixtures("test.png") + + assert_path_exists output_path + assert_operator output_path.size, :>, 0 + + assert_match version.to_s, shell_output("#{bin}/dipc --version") + end +end diff --git a/Formula/d/dirac.rb b/Formula/d/dirac.rb new file mode 100644 index 0000000000000..d8ec090b6d2ae --- /dev/null +++ b/Formula/d/dirac.rb @@ -0,0 +1,62 @@ +class Dirac < Formula + desc "General-purpose video codec aimed at a range of resolutions" + homepage "https://sourceforge.net/projects/dirac/" + url "https://downloads.sourceforge.net/project/dirac/dirac-codec/Dirac-1.0.2/dirac-1.0.2.tar.gz" + mirror "https://launchpad.net/ubuntu/+archive/primary/+files/dirac_1.0.2.orig.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/d/dirac/dirac_1.0.2.orig.tar.gz" + sha256 "816b16f18d235ff8ccd40d95fc5b4fad61ae47583e86607932929d70bf1f00fd" + license any_of: ["MPL-1.1", "GPL-2.0-only", "LGPL-2.1-only"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "67319e9ad9710a1d9bb80f78716b453430f164ed95a0b45ad62bad1bccbd879b" + sha256 cellar: :any, arm64_sequoia: "53157665a3a8ba4676115ebedef7b7428ea51424674d1af294383cc94c9572ff" + sha256 cellar: :any, arm64_sonoma: "f2cb5520feb1c9b6ee2803f926c5e5499042ee0813d366a4dd67d425f30f365e" + sha256 cellar: :any, arm64_ventura: "7bc947bb9a57486227216595ad5e62ece0deba0a467b1e62e0f1e549f3dbea64" + sha256 cellar: :any, arm64_monterey: "694f2245011fc14041cbac4d527cd1ca5feca5220ae7aec7dd2f407d3a72bd83" + sha256 cellar: :any, arm64_big_sur: "fd13d2ad2ae2be488a3667d58a9ae207a12afe17826e6d8fdebf454bba4a543f" + sha256 cellar: :any, sonoma: "bf547d33dffd0442908ab57c0aa4bfcb59c5943112f260b31e6e0aa2fe6c0469" + sha256 cellar: :any, ventura: "da8aa90563093bde9f95ce1bed46e85150f9d57afdc35a2af8544ba5f9921cb6" + sha256 cellar: :any, monterey: "0b0310b8b2213e9d86cf414331130f4effd792609be95e1015932420328fbb91" + sha256 cellar: :any, big_sur: "2d6aa7e4d9c73e1a79b9b23b86ade670324755806276d6061ec1b3e9f444548a" + sha256 cellar: :any, catalina: "8c4a433f067fac458d219eaed956744d84cb9069334df82a3745e6f5f24aa686" + sha256 cellar: :any_skip_relocation, arm64_linux: "c02ecb26cb2992df035ad54868de88e9706b0abecf9f949413bc584b9eea8a4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96695c27a2cd1fbabc1281d052e798b4da85d75ba1a92c6b072808d0a59c62bb" + end + + # First two patches: the only two commits in the upstream repo not in 1.0.2 + + patch do + url "https://gist.githubusercontent.com/mistydemeo/da8a53abcf057c58b498/raw/bde69c5f07d871542dcb24792110e29e6418d2a3/unititialized-memory.patch" + sha256 "d5fcbb1b5c9f2f83935d71ebd312e98294121e579edbd7818e3865606da36e10" + end + + patch do + url "https://gist.githubusercontent.com/mistydemeo/e729c459525d0d6e9e2d/raw/d9ff69c944b8bde006eef27650c0af36f51479f5/dirac-gcc-fixes.patch" + sha256 "52c40f2c8aec9174eba2345e6ba9689ced1b8f865c7ced23e7f7ee5fdd6502c3" + end + + # HACK: the configure script, which assumes any compiler that + # starts with "cl" is a Microsoft compiler + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dirac/1.0.2.patch" + sha256 "8f77a8f088b7054855e18391a4baa5c085da0f418f203c3e47aad7b63d84794a" + end + + def install + # BSD cp doesn't have '-d' + inreplace "doc/Makefile.in", "cp -dR", "cp -R" + + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-c++11-narrowing" if DevelopmentTools.clang_build_version >= 1700 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/d/directx-headers.rb b/Formula/d/directx-headers.rb new file mode 100644 index 0000000000000..e7df91446d892 --- /dev/null +++ b/Formula/d/directx-headers.rb @@ -0,0 +1,39 @@ +class DirectxHeaders < Formula + desc "Official DirectX headers available under an open source license" + homepage "https://devblogs.microsoft.com/directx/" + url "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.618.2.tar.gz" + sha256 "62004f45e2ab00cbb5c7f03c47262632c22fbce0a237383fc458d9324c44cf36" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e3c57c3ddbad669a195eea6cad3f154be704a12b63273d389b21ccd687bf0936" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b9f8af56620ed8e01e583ff79d21fcffb85c8a0734e4b41bb1d1e3d377bacaf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b41f82cd50733cec1f3664747501b40d632ef657f62d849943e49699fbe264f5" + sha256 cellar: :any_skip_relocation, sonoma: "88f4a31d82896f56c9a2b16cded6bee0efb76cf66f2ab4ce5f1662bd0c652915" + sha256 cellar: :any_skip_relocation, arm64_linux: "c85e5b126134c36c124d6ca195ccf6cb846cf7c5d6faff623d6c6b903bda7393" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ec5332819c79bc05557054b05aefa21468731551a75588df9efa10cb2d2692a" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "mingw-w64" => :test + + def install + system "meson", "setup", "build", "-Dbuild-test=false", *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + resource "test.cpp" do + url "https://raw.githubusercontent.com/microsoft/DirectX-Headers/a7d19030b872967c4224607c454273a2e65a5ed4/test/test.cpp" + sha256 "6ff077a364a5f0f96b675d21aa8f053711fbef75bfdb193b44cc10b8475e2294" + end + + resource("test.cpp").stage(testpath) + + ENV.remove_macosxsdk if OS.mac? + + system Formula["mingw-w64"].bin/"x86_64-w64-mingw32-g++", "-I#{include}", "-c", "test.cpp" + end +end diff --git a/Formula/d/direnv.rb b/Formula/d/direnv.rb new file mode 100644 index 0000000000000..a690f06bddb21 --- /dev/null +++ b/Formula/d/direnv.rb @@ -0,0 +1,39 @@ +class Direnv < Formula + desc "Load/unload environment variables based on $PWD" + homepage "https://direnv.net/" + url "https://github.com/direnv/direnv/archive/refs/tags/v2.37.1.tar.gz" + sha256 "4142fbb661f3218913fac08d327c415e87b3e66bd0953185294ff8f3228ead24" + license "MIT" + head "https://github.com/direnv/direnv.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "5496ce0c1abb38345db8f58db469d2971d477ce4e077930ce52165b91d4a0a7a" + sha256 arm64_sequoia: "d9a33db5762df07167bb6a532c54b84a9f99fe5730b0aedc83b300534c7e8f3e" + sha256 arm64_sonoma: "494117574d9df4de6ffa3f123cfe0a1626e2d5ba0542a25e85dee6b0814417b8" + sha256 arm64_ventura: "968f2dd705d3a3223377b556f459c5c65db53a8fa6435a37ce84f27fbb5ed18c" + sha256 sonoma: "9b274c4ce7351773cd91a9418a2aeb16c72ed5685383a9ea97269c24b81c1c86" + sha256 ventura: "7754bbca76a16a6737177ea057d4db9c2ad1e55387b9f3ff5aafe05912807008" + sha256 arm64_linux: "56ea5661ae3fc5537e236f2cecde9117b7dc83e90cce9269c5edb0d2209caa89" + sha256 x86_64_linux: "5a3705773719544d8c366610498528d6607de6a2961b2ecb1cdedb5781b9d1c6" + end + + depends_on "go" => :build + depends_on "bash" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + system "make", "install", "PREFIX=#{prefix}", "BASH_PATH=#{Formula["bash"].opt_bin}/bash" + end + + test do + assert_match "No .envrc or .env found", shell_output("#{bin}/direnv status") + + ENV["TEST"] = "failed" + (testpath/".envrc").write "export TEST=passed" + + assert_match "No .envrc or .env loaded", shell_output("#{bin}/direnv status") + system bin/"direnv", "allow" + + assert_match "passed", shell_output("#{bin}/direnv exec . sh -c 'echo $TEST'") + end +end diff --git a/Formula/d/direvent.rb b/Formula/d/direvent.rb new file mode 100644 index 0000000000000..98d614ea34c00 --- /dev/null +++ b/Formula/d/direvent.rb @@ -0,0 +1,36 @@ +class Direvent < Formula + desc "Monitors events in the file system directories" + homepage "https://www.gnu.org.ua/software/direvent/direvent.html" + url "https://ftpmirror.gnu.org/gnu/direvent/direvent-5.4.tar.gz" + mirror "https://ftp.gnu.org/gnu/direvent/direvent-5.4.tar.gz" + sha256 "1dbbc6192aab67e345725148603d570c6a2828380c964215762af91524d795ba" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7b48ad09b22f7ce1fc4f6be31312cae2acb2fcb33a52b862e6c442e0bb874f89" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f63f471b456241dcf62d3e76ba38a6a32424220eee43665a17eed552ec817fb8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "afb68e0c1394f2dc09e35f47cae0d7c57b337b4d92766fe3edb018b956628bef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2ed0f6f45d7c79bab9b43a70c66a9f42c50c98914d387c7ab88bfb52e043af20" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9044f997c251b9d8d188f576b5fc71e8f3e1306f4b2bb86e131eec6d106877ea" + sha256 cellar: :any_skip_relocation, sonoma: "93e741a317f67a70c7ec7a51ee68b16b9af06e0038eea6477332543c657246cc" + sha256 cellar: :any_skip_relocation, ventura: "55d5411f9552456a39cb6bee0fd86cc40f88a19f6e3deb1fbc52dbe0a63fac5a" + sha256 cellar: :any_skip_relocation, monterey: "aa9149e69d6ed55b6a4de7cb345c9202dfb8136197ec40d99d3d9f4d805b3678" + sha256 arm64_linux: "1c64f0b91a2b262581b83717c051b3cc781ab418ed36315c1e81a27e9b06d630" + sha256 x86_64_linux: "c8fb131f7845cd016244b0f5285c3e2ca52efcb52b5c1d2c9a7ac301f5b7152e" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/direvent --version") + end +end diff --git a/Formula/d/direwolf.rb b/Formula/d/direwolf.rb new file mode 100644 index 0000000000000..9b6c178db6e84 --- /dev/null +++ b/Formula/d/direwolf.rb @@ -0,0 +1,52 @@ +class Direwolf < Formula + desc "Software \"soundcard\" AX.25 packet modem/TNC and APRS encoder/decoder" + homepage "https://github.com/wb2osz/direwolf" + url "https://github.com/wb2osz/direwolf/archive/refs/tags/1.8.tar.gz" + sha256 "20af50f397ce492a1e42889a1e2eba54581334c0754adae8e196433998a44e3a" + license all_of: [ + "GPL-2.0-or-later", + "ISC", # external/misc/{strlcpy.c,strlcat.c} (Linux) + :cannot_represent, # external/geotranz, see https://github.com/externpro/geotranz/blob/v2.4.2/readme.txt + ] + head "https://github.com/wb2osz/direwolf.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "a5a1f073383e637adb447825393d588a0c1c0562a20c1899783da6eec80c17b5" + sha256 arm64_sequoia: "d8eee1f375cf3bbcbab59ca4cfda791fb9bea83badbd2386133a062f17d13084" + sha256 arm64_sonoma: "2546b37fb83a5c0f35096547fc22bd4d5610700c0598a5c58297e162604be78f" + sha256 sonoma: "042e43a3932fecd186791932f50e26a77bc8aa77efb85c6e214e85f219b95084" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc6687ae305f7c46779b16b57aa3846697dfcbe4a12ba70eac4afabc84931297" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87cbcbcaa44059571a339bd152b9b3b011d9ad53c633e3ff5ace6cf5460cd9a2" + end + + depends_on "cmake" => :build + depends_on "gpsd" + depends_on "hamlib" + + on_macos do + depends_on "hidapi" + depends_on "portaudio" + end + + on_linux do + depends_on "alsa-lib" + depends_on "systemd" + end + + def install + inreplace "src/symbols.c", "/opt/local/share", share + inreplace "conf/CMakeLists.txt", " /usr/lib/udev/rules.d", " #{lib}/udev/rules.d" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "--build", "build", "--target", "install-conf" + end + + test do + assert_match version.to_s, shell_output("#{bin}/direwolf -u") + + touch testpath/"direwolf.conf" + assert_match "Pointless to continue without audio device.", shell_output("#{bin}/direwolf brew", 1) + end +end diff --git a/Formula/d/dirt.rb b/Formula/d/dirt.rb new file mode 100644 index 0000000000000..9c47614774389 --- /dev/null +++ b/Formula/d/dirt.rb @@ -0,0 +1,50 @@ +class Dirt < Formula + desc "Experimental sample playback" + homepage "https://github.com/tidalcycles/Dirt" + url "https://github.com/tidalcycles/Dirt/archive/refs/tags/1.1.tar.gz" + sha256 "bb1ae52311813d0ea3089bf3837592b885562518b4b44967ce88a24bc10802b6" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/tidalcycles/Dirt.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "298bd387a65d1a91e835350f47a97b76af44b9466b32b8c2c3a7b67e03736b8c" + sha256 cellar: :any, arm64_sequoia: "dc07b263a5ea080c3ae14aaaabe185d07c84189e6708cc2206ac74d62e67ec3f" + sha256 cellar: :any, arm64_sonoma: "dc0671b289e79190e0d962b995c11ba8d0f828fb9a9903c5981e8a7fddca28c0" + sha256 cellar: :any, arm64_ventura: "7b0e123381c73cf489c38368999dcf0886843f8223562f83db6b6a5fde4dcaf7" + sha256 cellar: :any, arm64_monterey: "6ac9e97def1a071fda1e4fc145450cdafed11444358537d2824cea8d77e73155" + sha256 cellar: :any, arm64_big_sur: "ed0c1c48b840abfd9336d6b292e1e08896bddc3663164815fd6fc489b0d3495e" + sha256 cellar: :any, sonoma: "938298f9f34341b030fec41d4b61002a75ef6a626b7b6a9479584581e52f569c" + sha256 cellar: :any, ventura: "5ff0f05492f68f79315dd99ce136a09cfb3455b030bf1a12d9164f4dee70b43c" + sha256 cellar: :any, monterey: "f4c8eaef7bd081e9c346af24400410671665836820077afdcc13e68c676903bd" + sha256 cellar: :any, big_sur: "bb32869ee985043d05056f89254e369dcc8be8cfaaedaa1427787fc5e04fa62c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ed29d734b4fb03efa5e07a439a7f12b61df0904f8cf4073354ecb2a879eec7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ea04b1e39b56f30179c50763b52314bb909285924d3229a68c35905e6b9b0f6" + end + + depends_on "jack" + depends_on "liblo" + depends_on "libsamplerate" + depends_on "libsndfile" + + def install + # Work-around for newer clang + # upstream bug report, https://github.com/tidalcycles/Dirt/issues/66 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `...'; ....o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + inreplace "Makefile", "gcc", ENV.cc + + system "make", "PREFIX=#{prefix}", "install" + end + + test do + assert_match "Usage", shell_output("#{bin}/dirt --help; :") + end +end diff --git a/Formula/d/discount.rb b/Formula/d/discount.rb new file mode 100644 index 0000000000000..8e1aea8b9a3a6 --- /dev/null +++ b/Formula/d/discount.rb @@ -0,0 +1,57 @@ +class Discount < Formula + desc "C implementation of Markdown" + homepage "https://www.pell.portland.or.us/~orc/Code/discount/" + url "https://www.pell.portland.or.us/~orc/Code/discount/discount-3.0.1.2.tar.bz2" + sha256 "ec670ca34fba6dd99cf30170b98f57fbd84ed51528cc3ae732b5ec298e738d9d" + license "BSD-3-Clause" + head "https://github.com/Orc/discount.git", branch: "main" + + livecheck do + url :homepage + regex(/href=.*?discount[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "53803cc185bc57647a2ec9cac0bf8ed0d12c925f64dea3eed62e9840c9db1bce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8f498e3b95800f7ee24c4319506d4ccd4fca6973405ae1681d6f64f6c262e0f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d8aea3828d1013f7e52ad43607e781f8d6afb5cfe40ab434f26bd49f9a0e545" + sha256 cellar: :any_skip_relocation, arm64_ventura: "565696d059a7e00a44a67c5e7fdadd7daa45f19e92edbc371d4ad66df2a94211" + sha256 cellar: :any_skip_relocation, sonoma: "f4c0c639fa731507a166bbe8e6697b0f22abca9ce446bd30f8eaeeb9406240a2" + sha256 cellar: :any_skip_relocation, ventura: "3677d12c169e557d8cf391698826fbc0ccaf4695a582f224c7cc4e7a4e20a496" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8bfa31fc02e76df99bd7b31fbc81805217396662a0894d2f7a7fe5e3f67c368" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f6c76ead3a6e1c9e20f28b7774494aef4d3f8b5d9ac1f4cbf389e72adac5023" + end + + conflicts_with "markdown", because: "both install `markdown` binaries" + conflicts_with "multimarkdown", because: "both install `markdown` binaries" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + # Shared libraries are currently not built because they require + # root access to build without patching. + # Issue reported upstream here: https://github.com/Orc/discount/issues/266. + # Add --shared to args when this is resolved. + args = %W[ + --prefix=#{prefix} + --mandir=#{man} + --with-dl=Both + --enable-dl-tag + --enable-pandoc-header + --enable-superscript + --pkg-config + ] + system "./configure.sh", *args + bin.mkpath + lib.mkpath + include.mkpath + system "make", "install.everything" + end + + test do + markdown = "[Homebrew](https://brew.sh/)" + html = "

Homebrew

" + assert_equal html, pipe_output(bin/"markdown", markdown, 0).chomp + end +end diff --git a/Formula/d/dish.rb b/Formula/d/dish.rb new file mode 100644 index 0000000000000..31a686990776f --- /dev/null +++ b/Formula/d/dish.rb @@ -0,0 +1,31 @@ +class Dish < Formula + desc "Lightweight monitoring service that efficiently checks socket connections" + homepage "https://github.com/thevxn/dish" + url "https://github.com/thevxn/dish/archive/refs/tags/v1.12.0.tar.gz" + sha256 "4d8d18b837f03f7c3e03b6da79ffba1865256f2938f3995adafad48cb19a6b6f" + license "MIT" + head "https://github.com/thevxn/dish.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "02c49400cdaa68fd9d904442a95e3e8cc14b12d1ff63c7e990be9d1b3f22a06a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19198cee1c3db608abf9fd1ac9481db5a4468f620a4cf7e74bb5034dafd90cca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19198cee1c3db608abf9fd1ac9481db5a4468f620a4cf7e74bb5034dafd90cca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19198cee1c3db608abf9fd1ac9481db5a4468f620a4cf7e74bb5034dafd90cca" + sha256 cellar: :any_skip_relocation, sonoma: "9bb4679a8537a8fe7f7c305273573950a648e2378ada306bdc9d5e0b86297948" + sha256 cellar: :any_skip_relocation, ventura: "9bb4679a8537a8fe7f7c305273573950a648e2378ada306bdc9d5e0b86297948" + sha256 cellar: :any_skip_relocation, arm64_linux: "5af1f11ccfbc8b4ec42a4537d8e40426b366bd04eaa40c470aaedd0910158466" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edbcb986db8daaacaad96da7f82e9bdfd1efac3a7d50a4df42fbeaa9cc385042" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/dish" + end + + test do + ouput = shell_output("#{bin}/dish https://example.com/:instance 2>&1", 3) + assert_match "error loading socket list: failed to fetch sockets from remote source", ouput + end +end diff --git a/Formula/d/diskonaut.rb b/Formula/d/diskonaut.rb new file mode 100644 index 0000000000000..533e85601115d --- /dev/null +++ b/Formula/d/diskonaut.rb @@ -0,0 +1,39 @@ +class Diskonaut < Formula + desc "Terminal visual disk space navigator" + homepage "https://github.com/imsnif/diskonaut" + url "https://github.com/imsnif/diskonaut/archive/refs/tags/0.11.0.tar.gz" + sha256 "355367dbc6119743d88bfffaa57ad4f308596165a57acc2694da1277c3025928" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "46ddaf75fd4b61414cb76fa4ac54aabb931aac13253e52e68888852468c14ede" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "519af087c51cd668213e975d31f7da4255f12c7be476a81ceb4bb448404c2286" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae7e9d12dc33dcb7424f760021b2e85168f349771f81e48fe8ef6dc747738d1c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c286351912c9d217e5c1d5cce7ee3222d3b55558f114cc59f50c98f56ff0d2b9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "607b84f58d50e14ca2bdac82a0d53f7e701a6673ee6d63d20b5a3c85e7232ee3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "27276ff079b4e62db5a6bd19b0e76d302c535ba6e367e760350a5168b15e35d2" + sha256 cellar: :any_skip_relocation, sonoma: "ad0bc71719adfce24bb4313c7f7e98dd8f1a13d51f99732ab9c8ec734d3d4c81" + sha256 cellar: :any_skip_relocation, ventura: "c92c31afbe56de87bc3be623a4df2f07c0da1f211b7aeaad205c1e251c36c94e" + sha256 cellar: :any_skip_relocation, monterey: "ca2ead79bbdce41e8b1a5b2ded6422c27a71e0c9ccc119d4b3eb6ca2697a5e8c" + sha256 cellar: :any_skip_relocation, big_sur: "4db6857d320a4d03ab6a2df8de8604d6918ffce4aa6b4f36951bddd94656aaa3" + sha256 cellar: :any_skip_relocation, catalina: "8e6ed47ccdb395b2f461a1e12376ee463bbdca05e572fe2aa33dba49df81f3fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "01640068ad07f5330d00b480b129e6c39558740133453c80002f9f0485654c88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af43639e44daac484d6b43f33400310a21abf9632c85c198d41aad2edd34a0bc" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = pipe_output(bin/"diskonaut", shell_output("ls"), 2) + assert_match "Error: IO-error occurred", output + + assert_match "diskonaut #{version}", shell_output("#{bin}/diskonaut --version") + end +end diff --git a/Formula/d/disktype.rb b/Formula/d/disktype.rb new file mode 100644 index 0000000000000..17b916ef1acea --- /dev/null +++ b/Formula/d/disktype.rb @@ -0,0 +1,45 @@ +class Disktype < Formula + desc "Detect content format of a disk or disk image" + homepage "https://disktype.sourceforge.net/" + url "https://downloads.sourceforge.net/project/disktype/disktype/9/disktype-9.tar.gz" + sha256 "b6701254d88412bc5d2db869037745f65f94b900b59184157d072f35832c1111" + license "MIT" + head "https://git.code.sf.net/p/disktype/disktype.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/disktype[._-]v?(\d+(?:\.\d+)*)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "42c78cc38ea028f25b5c2122e72e66d49803b717c8994a45db84fda5b192f492" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc0c898196ec806c92c56cda1d1edce496eb6dea79d614ab746021f2e315ec4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "867972214905edb51443e921e727b9916eb9ff528ee18aac77e205d43a80ed9e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6edc8c7808c4d5acbce3df4c4dd0ba4c9dff05831e18eccdeca105a5ebe1c40" + sha256 cellar: :any_skip_relocation, arm64_monterey: "154bd7b1f165caf396b4c1659fb1af90f8a64cfdcdf47a421d4d6ee2af32e555" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4587dd61a91f93d065f3f169b690f8f194d1177c5b3cb7a78c0edec9bc0a23a9" + sha256 cellar: :any_skip_relocation, sonoma: "f526684921eb7bab672a8df27f08c0431fbb203fa026e88c7a1970ad207aa594" + sha256 cellar: :any_skip_relocation, ventura: "12c3b63110fa663a8a7fe20080db82f2968fc0ed6888bb3a53c37a74297f57df" + sha256 cellar: :any_skip_relocation, monterey: "edc7efe783d43679fea498893be6c511023d8ccf7d823eaf05ca57cde41202e6" + sha256 cellar: :any_skip_relocation, big_sur: "06ea5af49f19f974e3d7f91f9a8e9e178f90b5e8390c59c324179773e17e21ac" + sha256 cellar: :any_skip_relocation, catalina: "6821d802c4418c949b8e3394893f03cf6152020881096b304ab0c87313fff2e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e5b37f738b0519b463163cdfcea5a7ee21c829e409f613be7f7cbc8f9120afa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b0dcc67cc8fee509011e50ff1299b4205b424f83ee9aedff5d97fb2e603b6bc" + end + + def install + system "make" + bin.install "disktype" + man1.install "disktype.1" + end + + test do + path = testpath/"foo" + path.write "1234" + + output = shell_output("#{bin}/disktype #{path}") + assert_match "Regular file, size 4 bytes", output + end +end diff --git a/Formula/d/diskus.rb b/Formula/d/diskus.rb new file mode 100644 index 0000000000000..885a59cde0584 --- /dev/null +++ b/Formula/d/diskus.rb @@ -0,0 +1,31 @@ +class Diskus < Formula + desc "Minimal, fast alternative to 'du -sh'" + homepage "https://github.com/sharkdp/diskus" + url "https://github.com/sharkdp/diskus/archive/refs/tags/v0.8.0.tar.gz" + sha256 "9733570d64a1eafcf96fe233fd978ec3855c77705005037ad253c49a188fdf51" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "426cee588a23b6700cd92acc6b6623b4c8c578d2f83513b934f8fb1ac2f22823" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed63f0adae5d3673f2c54da07bc9ae94395479b8700e4ec563a4a8c636ba910a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7aafd128970ea77dc23c09a7dfacad1834b01defd745369f7d11549d2ca0055" + sha256 cellar: :any_skip_relocation, arm64_ventura: "591fad4f9045788a5980abc136b8b04b689468789406e19c2339a1934526fc6b" + sha256 cellar: :any_skip_relocation, sonoma: "1f53f2f55b9c2afb08399342293ac242f89dcec9a7a3225bfb1d46a8e85eb799" + sha256 cellar: :any_skip_relocation, ventura: "f7635f25cb2e68fb7ffa652c3d4bd87343e9190ff0aba65ff92eee63fd427e09" + sha256 cellar: :any_skip_relocation, arm64_linux: "924d72a0c120a1eec0849fbfc5344ec71d0cbe6c167e0c5299269762e26f2df9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e19dac5a9475d48331eedf63009da2d88c04a66a1bfd6118f60eb1cb149fc97" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + man1.install "doc/diskus.1" + end + + test do + (testpath/"test.txt").write("Hello World") + output = shell_output("#{bin}/diskus #{testpath}/test.txt") + assert_match "4096", output + end +end diff --git a/Formula/d/dislocker.rb b/Formula/d/dislocker.rb new file mode 100644 index 0000000000000..cfdc68047ec80 --- /dev/null +++ b/Formula/d/dislocker.rb @@ -0,0 +1,34 @@ +class Dislocker < Formula + desc "FUSE driver to read/write Windows' BitLocker-ed volumes" + homepage "https://github.com/Aorimn/dislocker" + url "https://github.com/Aorimn/dislocker/archive/refs/tags/v0.7.3.tar.gz" + sha256 "8d5275577c44f2bd87f6e05dd61971a71c0e56a9cbedf000bd38deadd8b6c1e6" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "081caa8698ffdfe2c8f65d043786dc0abbee0afc72d0ebbb51c3a5abcb2da736" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34239da3f2f7776cb63825dbb9aef1f29fa0702926fb34f164ec60b79ba8e8ff" + end + + depends_on "cmake" => :build + depends_on "libfuse@2" # FUSE 3 PR: https://github.com/Aorimn/dislocker/pull/340 + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "mbedtls" + + # Backport support for mbedtls 3.x + patch do + url "https://github.com/Aorimn/dislocker/commit/2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch?full_index=1" + sha256 "07e0e3cac520a04a478f1f08d612340fc2743fd492b0835c7fb41cfdb5ef4244" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_DISABLE_FIND_PACKAGE_Ruby=TRUE", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"dislocker", "-h" + end +end diff --git a/Formula/d/displayplacer.rb b/Formula/d/displayplacer.rb new file mode 100644 index 0000000000000..bffb7264a5005 --- /dev/null +++ b/Formula/d/displayplacer.rb @@ -0,0 +1,31 @@ +class Displayplacer < Formula + desc "Utility to configure multi-display resolutions and arrangements" + homepage "https://github.com/jakehilborn/displayplacer" + url "https://github.com/jakehilborn/displayplacer/archive/refs/tags/v1.4.0.tar.gz" + sha256 "54b239359dbf9dc9b3a25e41a372eafb1de6c3131fe7fed37da53da77189b600" + license "MIT" + head "https://github.com/jakehilborn/displayplacer.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3130d189e26a7f30517372527c5b28c5c565ef87550944d865cf2bb4f6043cc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96332bcb8154d5fc6b7fa633fd81beefa075f13f54888285eadbedc7caf55cb6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ff4162b800acb041980b63958fa60f763164bcd01dff7adee938c27e5604434d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38e7728cd446418f5a52e472d7a6f5dde45c54a52f73de6dc817504f9dc3461b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4dbe6fc64a231b1a59367315c1d0e10c6ab46ffe7bdb4cd0bc4112489e627775" + sha256 cellar: :any_skip_relocation, sonoma: "ae106ea0057e4eb35944a9d9c0f9b29c4b693022b09a15a67a809aa36aca5c30" + sha256 cellar: :any_skip_relocation, ventura: "95bf79968d24216d2d00c935ed8931e4fa4cac2ae338fdf29f0d55428b577247" + sha256 cellar: :any_skip_relocation, monterey: "08e1a9094bb445d6e279cae726122a345af8687f1d83f431793f3317a86b9131" + end + + depends_on :macos + + def install + system "make", "-C", "src" + bin.install "src/displayplacer" + end + + test do + assert_match "Resolution:", shell_output("#{bin}/displayplacer list") + assert_match version.to_s, shell_output("#{bin}/displayplacer --version") + end +end diff --git a/Formula/d/dissent.rb b/Formula/d/dissent.rb new file mode 100644 index 0000000000000..4ece2d07649f5 --- /dev/null +++ b/Formula/d/dissent.rb @@ -0,0 +1,51 @@ +class Dissent < Formula + desc "GTK4 Discord client in Go" + homepage "https://github.com/diamondburned/dissent" + url "https://github.com/diamondburned/dissent/archive/refs/tags/v0.0.37.tar.gz" + sha256 "b08ae331e5c69759eb7b9511908007fc3e9c7a28208bfa66ffbd84b6f335364a" + license "GPL-3.0-or-later" + head "https://github.com/diamondburned/dissent.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "97643003bef7a54d768a1f7878b036270d6e1845a7089fd76d99141a9eea56a8" + sha256 cellar: :any, arm64_sequoia: "c910693be03f0bd067d9f4d007b836145221602c286039353719daaad66e58c2" + sha256 cellar: :any, arm64_sonoma: "2b481aebf10e511c8598309b4d2a0e8fbf6ec099af82d4c2102699976e50bd3d" + sha256 cellar: :any, arm64_ventura: "ed3a59ef647f6a22544b57a23ee1a248ba0b03f49ad55145b9acfa3af1488f3d" + sha256 cellar: :any, sonoma: "5232410d3f1ec1ea33b66ef3abf77f21eabd684cb95061adcf1e34162abcb54e" + sha256 cellar: :any, ventura: "5a84a47da950058aee7e17a25a13fc41c21de3105b3ed0a29189a1dbdc8fb22d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2f74a11d7d2d4953f4fdc35d06c4b39ad53ef3d316720f7b33d38273782b44b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "330a993d8dd432857f392c561754222f045c86c52d9d2ae6476fe55c0cb3e081" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gobject-introspection" + depends_on "graphene" + depends_on "gtk4" + depends_on "gtksourceview5" + depends_on "libadwaita" + depends_on "libcanberra" + depends_on "libspelling" + depends_on "pango" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # Fails in Linux CI with "Failed to open display" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # dissent is a GUI application + system bin/"dissent", "--help" + end +end diff --git a/Formula/d/distcc.rb b/Formula/d/distcc.rb new file mode 100644 index 0000000000000..2f617d81adb1f --- /dev/null +++ b/Formula/d/distcc.rb @@ -0,0 +1,93 @@ +class Distcc < Formula + include Language::Python::Virtualenv + + desc "Distributed compiler client and server" + homepage "https://github.com/distcc/distcc/" + url "https://github.com/distcc/distcc/releases/download/v3.4/distcc-3.4.tar.gz" + sha256 "2b99edda9dad9dbf283933a02eace6de7423fe5650daa4a728c950e5cd37bd7d" + license "GPL-2.0-or-later" + revision 3 + head "https://github.com/distcc/distcc.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "09fcd33f368d1daff6716752ee32cf50cbb62f7acb0200a0a07bd676d65cd3f2" + sha256 arm64_sequoia: "232f2d8db68393c3f700e16d29d914e19aa565f2e8a6d2e0e3846c8b317fd931" + sha256 arm64_sonoma: "a25d35cebbe97e9bb683c53994a2956e256d4f7dfb1bd024e1a412826ee7c1d1" + sha256 sonoma: "ab7cc55d6cfae2c77316093229ae3668f7e34d2d80713e4eec5f2c41f69983d2" + sha256 arm64_linux: "42071ee608cbbcfcc761fe4a9b18ed90499115dab3108c03ff72a27825a2beef" + sha256 x86_64_linux: "d04aa534933e21b7e469f009c76e5bde6e50ecadecbab3d6de4f134db8f7eef2" + end + + depends_on "python@3.14" + + resource "libiberty" do + url "https://ftp.debian.org/debian/pool/main/libi/libiberty/libiberty_20250315.orig.tar.xz" + sha256 "5b510b5e0918dcb00a748900103365a00411855f202089ff81dc5ef99d8beeaa" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + # Python 3.10+ compatibility + patch do + url "https://github.com/distcc/distcc/commit/83e030a852daf1d4d8c906e46f86375d421b781e.patch?full_index=1" + sha256 "d65097b7c13191e18699d3a9c7c9df5566bba100f8da84088aa4e49acf46b6a7" + end + + # Switch from distutils to setuptools + patch do + url "https://github.com/distcc/distcc/commit/76873f8858bf5f32bda170fcdc1dfebb69de0e4b.patch?full_index=1" + sha256 "611910551841854755b06d2cac1dc204f7aaf8c495a5efda83ae4a1ef477d588" + end + + def install + ENV["PYTHON"] = python3 = which("python3.14") + site_packages = prefix/Language::Python.site_packages(python3) + + build_venv = virtualenv_create(buildpath/"venv", python3) + build_venv.pip_install resource("setuptools") + ENV.prepend_create_path "PYTHONPATH", build_venv.site_packages + + # While libiberty recommends that packages vendor libiberty into their own source, + # distcc wants to have a package manager-installed version. + # Rather than make a package for a floating package like this, let's just + # make it a resource. + resource("libiberty").stage do + system "./libiberty/configure", "--prefix=#{buildpath}", "--enable-install-libiberty" + system "make", "install" + end + ENV.append "CPPFLAGS", "-I#{buildpath}/include" + ENV.append "LDFLAGS", "-L#{buildpath}/lib" + + # Work around Homebrew's "prefix scheme" patch which causes non-pip installs + # to incorrectly try to write into HOMEBREW_PREFIX/lib since Python 3.10. + inreplace "Makefile.in", '--root="$$DESTDIR"', "--install-lib='#{site_packages}'" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + service do + run [opt_bin/"distccd", "--allow=192.168.0.1/24"] + keep_alive true + working_dir opt_prefix + end + + test do + system bin/"distcc", "--version" + + (testpath/"Makefile").write <<~MAKE + default: + @echo Homebrew + MAKE + assert_match "distcc hosts list does not contain any hosts", shell_output("#{bin}/pump make 2>&1", 1) + + # `pump make` timeout on linux runner and is not reproducible, so only run this test for macOS runners + return unless OS.mac? + + ENV["DISTCC_POTENTIAL_HOSTS"] = "localhost" + assert_match "Homebrew\n", shell_output("#{bin}/pump make") + end +end diff --git a/Formula/d/distill-cli.rb b/Formula/d/distill-cli.rb new file mode 100644 index 0000000000000..08de6af681e8f --- /dev/null +++ b/Formula/d/distill-cli.rb @@ -0,0 +1,44 @@ +class DistillCli < Formula + desc "Use AWS Transcribe and Bedrock to create summaries of your audio recordings" + homepage "https://www.allthingsdistributed.com/2024/06/introducing-distill-cli.html" + url "https://github.com/awslabs/distill-cli/archive/refs/tags/v0.2.0.tar.gz" + sha256 "ca48908a0d4c9b2cdc72a74cc6ec983f3d9ea665ba10e7837b641dbaf88ddf65" + license "Apache-2.0" + head "https://github.com/awslabs/distill-cli.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "05931eb86c8a7c5af00e0119729144e1ec1b71ce608aadce8bda08b9c7d332da" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e0945169c404d9651481553a66e74eccc15dd9fc3fd5fd7090db762c64a679b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b696b679a1e1dc19ae9d5a6a5b88e70fc63f94ea91d8c5025cdf124530f4e027" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81fa507cd1d2a3a9d82f9ddb27ae523496744c8be016b6431867ea534e32a2da" + sha256 cellar: :any_skip_relocation, sonoma: "22935921422088574b9f67baa4ab10db9ad4f79ac8adbdd0604faaa2af0594e9" + sha256 cellar: :any_skip_relocation, ventura: "72272c4021c3c7fa364464828d0da1bd03c675525a8c649fa6333f45e26e5d1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "76f573c4b8a3ffe36a963ceeb1c977ed85c6131c05a87e00e9c2edbac956d768" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22ebb083671dbe450f27a1d29caa892eb1b12e1e54a11271677984e3622fecfc" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Most of the functionality is in the cloud, so + # our testing options are basically limited to + # ensuring the binary runs on the local system. + # + # Need to create a config file or cli will fail + (testpath/"config.toml").write "" + system bin/"distill-cli", "--help" + output = shell_output("#{bin}/distill-cli -i #{test_fixtures("test.m4a")} 2>&1", 1) + assert_match "Error getting bucket list: dispatch failure", output + end +end diff --git a/Formula/d/distribution.rb b/Formula/d/distribution.rb new file mode 100644 index 0000000000000..1c46ff4915d41 --- /dev/null +++ b/Formula/d/distribution.rb @@ -0,0 +1,25 @@ +class Distribution < Formula + desc "Create ASCII graphical histograms in the terminal" + homepage "https://github.com/time-less-ness/distribution" + url "https://github.com/time-less-ness/distribution/archive/refs/tags/1.3.tar.gz" + sha256 "d7f2c9beeee15986d24d8068eb132c0a63c0bd9ace932e724cb38c1e6e54f95d" + license "GPL-2.0-only" + head "https://github.com/time-less-ness/distribution.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fb43e41f635c1b01bc7f1d518d871c3f9462cbfebadbb526a484bac260da213a" + end + + def install + bin.install "distribution.py" => "distribution" + doc.install "distributionrc", "screenshot.png" + end + + test do + (testpath/"test").write "a\nb\na\n" + `#{bin}/distribution /dev/null`.include? "a|2" + end +end diff --git a/Formula/d/distrobox.rb b/Formula/d/distrobox.rb new file mode 100644 index 0000000000000..5f68275fc56f2 --- /dev/null +++ b/Formula/d/distrobox.rb @@ -0,0 +1,30 @@ +class Distrobox < Formula + desc "Use any Linux distribution inside your terminal" + homepage "https://distrobox.privatedns.org/" + url "https://github.com/89luca89/distrobox/archive/refs/tags/1.8.2.0.tar.gz" + sha256 "c0afc3bac212840ffe3bdb335d0659e0976b0b566a993755f6846e444b9fa40a" + license "GPL-3.0-only" + head "https://github.com/89luca89/distrobox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5b4c4a0890b72c05cf5b0565912664a38d8eb39cc2b1c2b94f21a2c7ec3e80e4" + end + + depends_on :linux + + def install + system "./install", "--prefix", prefix + end + + def caveats + <<~EOS + Distrobox requires one of podman or docker. Do + brew install podman + or consult the documentation for details. + EOS + end + + test do + system bin/"distrobox-create", "--dry-run" + end +end diff --git a/Formula/d/dita-ot.rb b/Formula/d/dita-ot.rb new file mode 100644 index 0000000000000..b03ddba809a67 --- /dev/null +++ b/Formula/d/dita-ot.rb @@ -0,0 +1,34 @@ +class DitaOt < Formula + desc "DITA Open Toolkit is an implementation of the OASIS DITA specification" + homepage "https://www.dita-ot.org/" + url "https://github.com/dita-ot/dita-ot/releases/download/4.3.5/dita-ot-4.3.5.zip" + sha256 "a2e5a6ce9841e35fffb6363a11c2e5dec23a2f64f3a397940221cbdfe159e21c" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "428c841f8b4044f0f1aad6c5301e7f1ff0c35990e65ee8f6d0d8ec2256226bbd" + end + + depends_on "openjdk" + + def install + rm(Dir["bin/*.bat", "config/env.bat", "startcmd.*"]) + libexec.install Dir["*"] + (bin/"dita").write_env_script libexec/"bin/dita", JAVA_HOME: Formula["openjdk"].opt_prefix + + # Build an `:all` bottle by removing doc file. + rm libexec/"docsrc/topics/installing-via-homebrew.dita" + end + + test do + system bin/"dita", "--input=#{libexec}/docsrc/site.ditamap", + "--format=html5", + "--output=#{testpath}/out" + assert_path_exists testpath/"out/index.html" + end +end diff --git a/Formula/d/ditaa.rb b/Formula/d/ditaa.rb new file mode 100644 index 0000000000000..33d5a0135fb24 --- /dev/null +++ b/Formula/d/ditaa.rb @@ -0,0 +1,26 @@ +class Ditaa < Formula + desc "Convert ASCII diagrams into proper bitmap graphics" + homepage "https://ditaa.sourceforge.net/" + url "https://github.com/stathissideris/ditaa/releases/download/v0.11.0/ditaa-0.11.0-standalone.jar" + sha256 "9418aa63ff6d89c5d2318396f59836e120e75bea7a5930c4d34aa10fe7a196a9" + license "LGPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4e03eed43d92f5622e98144174fcd5f40dfb2b0bbdcb819aa5b59ec61d5fb632" + end + + depends_on "openjdk" + + def install + libexec.install "ditaa-#{version}-standalone.jar" + bin.write_jar_script libexec/"ditaa-#{version}-standalone.jar", "ditaa" + end + + test do + system bin/"ditaa", "-help" + end +end diff --git a/Formula/d/dive.rb b/Formula/d/dive.rb new file mode 100644 index 0000000000000..afb4ec8a88d41 --- /dev/null +++ b/Formula/d/dive.rb @@ -0,0 +1,37 @@ +class Dive < Formula + desc "Tool for exploring each layer in a docker image" + homepage "https://github.com/wagoodman/dive" + url "https://github.com/wagoodman/dive/archive/refs/tags/v0.13.1.tar.gz" + sha256 "2a9666e9c3fddd5e2e5bad81dccda520b8102e7cea34e2888f264b4eb0506852" + license "MIT" + head "https://github.com/wagoodman/dive.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9885943d3b5cd54be344bf9b7518bd49c0eaf07c572cdbaafdcdb90e311d3592" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f09a27e21a4b76122d74e9a776219ab7377efaf30dff7d8d7e3016aac375d14a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f09a27e21a4b76122d74e9a776219ab7377efaf30dff7d8d7e3016aac375d14a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f09a27e21a4b76122d74e9a776219ab7377efaf30dff7d8d7e3016aac375d14a" + sha256 cellar: :any_skip_relocation, sonoma: "676549efe805835ddb82aed795bd168b5ea9bb07ffbdb6500965c59474e035ca" + sha256 cellar: :any_skip_relocation, ventura: "676549efe805835ddb82aed795bd168b5ea9bb07ffbdb6500965c59474e035ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b6280705de2eb1d70dca85d5d9a8db09f09e7abbff80525dce8c00b5a5a8959" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0eea0c4d2dc63bfa43c121fc136bd18ba3b1fed57f5e3aedae0ca2c57b35097" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + (testpath/"Dockerfile").write <<~DOCKERFILE + FROM alpine + ENV test=homebrew-core + RUN echo "hello" + DOCKERFILE + + assert_match "dive #{version}", shell_output("#{bin}/dive version") + assert_match "Building image", shell_output("CI=true #{bin}/dive build .", 1) + end +end diff --git a/Formula/d/django-completion.rb b/Formula/d/django-completion.rb new file mode 100644 index 0000000000000..db9d5a0215345 --- /dev/null +++ b/Formula/d/django-completion.rb @@ -0,0 +1,26 @@ +class DjangoCompletion < Formula + desc "Bash completion for Django" + homepage "https://www.djangoproject.com/" + url "https://github.com/django/django/archive/refs/tags/5.2.7.tar.gz" + sha256 "2b99994c8f9a31740cb9452aaf518f09ab9b446916bba80d1dcc31c1474b53fa" + license "BSD-3-Clause" + head "https://github.com/django/django.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "a8b61ee37be1b67dcf65bc2acc8f354f57814faaef42e0693a60889026efb23c" + end + + def install + bash_completion.install "extras/django_bash_completion" => "django" + end + + test do + assert_match "-F _django_completion", + shell_output("bash -c 'source #{bash_completion}/django && complete -p django-admin'") + end +end diff --git a/Formula/d/djbdns.rb b/Formula/d/djbdns.rb new file mode 100644 index 0000000000000..90b4453d7b7f6 --- /dev/null +++ b/Formula/d/djbdns.rb @@ -0,0 +1,72 @@ +class Djbdns < Formula + desc "D.J. Bernstein's DNS tools" + homepage "https://cr.yp.to/djbdns.html" + url "https://cr.yp.to/djbdns/djbdns-1.05.tar.gz" + sha256 "3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48" + license :public_domain + + livecheck do + url "https://cr.yp.to/djbdns/install.html" + regex(/href=.*?djbdns[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "0be5754ae44ee59873e53f476c3da544b31aabf8107d97817cebb77c75ae14e9" + sha256 arm64_sequoia: "1e36d75e37885c9b6e9ecfc4fcebd3768092dc1f512bf6a52014d5edb2b30e5f" + sha256 arm64_sonoma: "8a9f3afe0b64bc8e2b08a1bb14df5d5b642d1e61fb34f0fe88807ea496d599a9" + sha256 arm64_ventura: "c22d9f6511649edb5496741a4c3e378cb94fd73fd75321272ed1a9c15f9766f4" + sha256 arm64_monterey: "eb8f1b169c2ef3b24defe00ef952b8dab42b45d42517bce471aa6e9016c7b4b6" + sha256 arm64_big_sur: "62ab5e22e0c15787a98c84f23905dd569067cd4376dc8c472509ac5ee5d24955" + sha256 sonoma: "362cd5926caa703da34cf8221e86e1019fa197d1762a9531da088642001e806d" + sha256 ventura: "5acb70859d01c8bc6e7ca3aaecfee0ff9a2791bbd3bcebf7de1a4937c3e18878" + sha256 monterey: "e31e528e17b73be225ea467a43d2e1c997bfac8a9adb723d7e3c48595f13ca5c" + sha256 big_sur: "1231622a14007c9ec76ef137a5e1a42a30ce4192b0fbba0cf768f981090059ce" + sha256 catalina: "5b473b664d7370f2e838bd496555841e20a8ef13aaeee6b312fc6501911b7fe0" + sha256 arm64_linux: "064d2f4f4d5fb2c18488c5dc23d4803da0bba3ca4b4be16de6dc736c8e08bf1b" + sha256 x86_64_linux: "02f2234288612b979b6e5947072123ee049558864042839f5c929300d0fbb96f" + end + + depends_on "daemontools" + depends_on "ucspi-tcp" + + on_linux do + depends_on "fakeroot" => :build + end + + def install + inreplace "hier.c", 'c("/"', "c(auto_home" + inreplace "dnscache-conf.c", "/etc/dnsroots", "#{etc}/dnsroots" + + # Write these variables ourselves. + rm %w[conf-home conf-ld conf-cc] + (buildpath/"conf-home").write prefix + (buildpath/"conf-ld").write "gcc" + + usr = if OS.mac? && MacOS.sdk_path_if_needed + "#{MacOS.sdk_path}/usr" + else + "/usr" + end + # `-Wno-implicit-function-declaration` fixes compile with newer Clang + (buildpath/"conf-cc").write "gcc -O2 -include #{usr}/include/errno.h -Wno-implicit-function-declaration" + + bin.mkpath + (prefix/"etc").mkpath # Otherwise "file does not exist" + + # Use fakeroot on Linux because djbdns checks for setgroups permissions + # that are limited in CI. + if OS.mac? + system "make", "setup", "check" + else + system "fakeroot", "make", "setup", "check" + end + end + + test do + # Use example.com instead of localhost, because localhost does not resolve in all cases + assert_match(/\d+\.\d+\.\d+\.\d+/, shell_output("#{bin}/dnsip example.com").chomp) + end +end diff --git a/Formula/d/djhtml.rb b/Formula/d/djhtml.rb new file mode 100644 index 0000000000000..8924e1ac1f733 --- /dev/null +++ b/Formula/d/djhtml.rb @@ -0,0 +1,38 @@ +class Djhtml < Formula + include Language::Python::Virtualenv + + desc "Django/Jinja template indenter" + homepage "https://github.com/rtts/djhtml" + url "https://files.pythonhosted.org/packages/76/dc/7d2a8e1e2a5054a50c328e02b4704179b80a8fbf0535bde793d85840c669/djhtml-3.0.10.tar.gz" + sha256 "dd4ebf778d3b7da7a6e6970f7e66740f08ed7485485491b9a80527f526c838d9" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2b5b263bf539b7f64e2f460e18dabf549fe8cc70785333fefb6ecb66f7e472dc" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + test_file = testpath/"test.html" + test_file.write <<~HTML + +

Hello, World!

+ + HTML + + expected_output = <<~HTML + +

Hello, World!

+ + HTML + + system bin/"djhtml", "--tabwidth", "2", test_file + assert_equal expected_output, test_file.read + end +end diff --git a/Formula/d/djl-serving.rb b/Formula/d/djl-serving.rb new file mode 100644 index 0000000000000..6365ccabbb38a --- /dev/null +++ b/Formula/d/djl-serving.rb @@ -0,0 +1,52 @@ +class DjlServing < Formula + desc "This module contains an universal model serving implementation" + homepage "https://github.com/deepjavalibrary/djl-serving" + url "https://publish.djl.ai/djl-serving/serving-0.35.0.tar" + sha256 "cc7acc6ef07cd251147a4654e2deaecd1c5709e4fde350aefab98a38b33e28ab" + license "Apache-2.0" + + # `djl-serving` versions aren't considered released until a corresponding + # release is created in the main `deepjavalibrary/djl` repository. + livecheck do + url "https://github.com/deepjavalibrary/djl" + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "bf16a1f4374d2d10f8e36dea25d4f733f173c95364eaa4c0ba06980a9955c5af" + end + + depends_on "openjdk" + + def install + # Install files + rm_r(Dir["bin/*.bat"]) + mv "bin/serving", "bin/djl-serving" + libexec.install Dir["*"] + env = { MODEL_SERVER_HOME: "${MODEL_SERVER_HOME:-#{var}/djl-serving}" } + env.merge!(Language::Java.overridable_java_home_env) + (bin/"djl-serving").write_env_script "#{libexec}/bin/djl-serving", env + end + + service do + run [opt_bin/"djl-serving", "run"] + working_dir var/"djl-serving" + keep_alive true + end + + test do + port = free_port + (testpath/"config.properties").write <<~EOS + inference_address=http://127.0.0.1:#{port} + management_address=http://127.0.0.1:#{port} + EOS + ENV["MODEL_SERVER_HOME"] = testpath + cp_r Dir["#{libexec}/*"], testpath + fork do + exec bin/"djl-serving -f config.properties" + end + sleep 30 + cmd = "http://127.0.0.1:#{port}/ping" + assert_match "{}\n", shell_output("curl --fail #{cmd}") + end +end diff --git a/Formula/d/djlint.rb b/Formula/d/djlint.rb new file mode 100644 index 0000000000000..95f09587285ea --- /dev/null +++ b/Formula/d/djlint.rb @@ -0,0 +1,94 @@ +class Djlint < Formula + include Language::Python::Virtualenv + + desc "Lint & Format HTML Templates" + homepage "https://djlint.com" + url "https://files.pythonhosted.org/packages/74/89/ecf5be9f5c59a0c53bcaa29671742c5e269cc7d0e2622e3f65f41df251bf/djlint-1.36.4.tar.gz" + sha256 "17254f218b46fe5a714b224c85074c099bcb74e3b2e1f15c2ddc2cf415a408a1" + license "GPL-3.0-or-later" + head "https://github.com/djlint/djLint.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "e6fbe8ed33b18abe793b3823d3e3083f5dda9ae9f3a9810b56ea0cc7eb1a1f23" + sha256 cellar: :any, arm64_sequoia: "aebbbb58314eafe8c5562435a6c35486ee26d1b5dc322e63b9b9c890a9a5b923" + sha256 cellar: :any, arm64_sonoma: "15447c3b978c0469538bcbff9ec6773d1ba938bd97af4193ce20be14d1e534af" + sha256 cellar: :any, sonoma: "8170ce4af546527c8648c0bb50f2c97445ae013039291719983c6c1d2af76dd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "a09e6acccfa498e1cdd6fc1738930cccca64e73ab1f69e0e93d438f40ef872e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f98b311ebc255c06faadad504a390f7618a4b817305c7d1a8275281bfe84a833" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "cssbeautifier" do + url "https://files.pythonhosted.org/packages/f7/01/fdf41c1e5f93d359681976ba10410a04b299d248e28ecce1d4e88588dde4/cssbeautifier-1.15.4.tar.gz" + sha256 "9bb08dc3f64c101a01677f128acf01905914cf406baf87434dcde05b74c0acf5" + end + + resource "editorconfig" do + url "https://files.pythonhosted.org/packages/88/3a/a61d9a1f319a186b05d14df17daea42fcddea63c213bcd61a929fb3a6796/editorconfig-0.17.1.tar.gz" + sha256 "23c08b00e8e08cc3adcddb825251c497478df1dada6aefeb01e626ad37303745" + end + + resource "jsbeautifier" do + url "https://files.pythonhosted.org/packages/ea/98/d6cadf4d5a1c03b2136837a435682418c29fdeb66be137128544cecc5b7a/jsbeautifier-1.15.4.tar.gz" + sha256 "5bb18d9efb9331d825735fbc5360ee8f1aac5e52780042803943aa7f854f7592" + end + + resource "json5" do + url "https://files.pythonhosted.org/packages/12/ae/929aee9619e9eba9015207a9d2c1c54db18311da7eb4dcf6d41ad6f0eb67/json5-0.12.1.tar.gz" + sha256 "b2743e77b3242f8d03c143dd975a6ec7c52e2f2afe76ed934e53503dd4ad4990" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"djlint", shell_parameter_format: :click) + end + + test do + assert_includes shell_output("#{bin}/djlint --version"), version.to_s + + (testpath/"test.html").write <<~HTML + {% load static %} + HTML + + assert_includes shell_output("#{bin}/djlint --reformat #{testpath}/test.html", 1), "1 file was updated." + end +end diff --git a/Formula/d/djview4.rb b/Formula/d/djview4.rb new file mode 100644 index 0000000000000..21b51942e8a8d --- /dev/null +++ b/Formula/d/djview4.rb @@ -0,0 +1,67 @@ +class Djview4 < Formula + desc "Viewer for the DjVu image format" + homepage "https://djvu.sourceforge.net/djview4.html" + url "https://downloads.sourceforge.net/project/djvu/DjView/4.12/djview-4.12.3.tar.gz" + sha256 "17bfb9731ab8070e01235381f08e57b1231ffb5f49eb031873ebfa189cdaf47d" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/djview[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "97d3a20862eef89b5dff5f2792ee3f5b08adcbb5c4edfc50d350030a9c326c67" + sha256 cellar: :any, arm64_sequoia: "b4e2f07c9690a2303f9b85c67ab95d6f5c2d6daa2da3bb8f64d69d36d3f003e8" + sha256 cellar: :any, arm64_sonoma: "c4a5109035da18e8d56d78b553bc9d5bccd348e588d5eb887e026db3860911d3" + sha256 cellar: :any, sonoma: "08d73ed6f8eab15a7ca0be2af8c9c5dd5464daef04ee28edea7167c9a84ba86a" + sha256 cellar: :any_skip_relocation, arm64_linux: "734c12e6abeba64b1a42dd2b7933be542c0b76c02cb9cdbb4dcbf7734f8a34af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aeb2ec0e8ceecffd35a1dde7d7b4a48a64dd762bab3225c711b8bc8cc3de3376" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "librsvg" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "qttools" => :build + depends_on "djvulibre" + depends_on "libtiff" + depends_on "qt5compat" + depends_on "qtbase" + + def install + system "./autogen.sh", "--with-x=no", + "--disable-nsdejavu", + "--#{OS.mac? ? "disable" : "enable"}-desktopfiles", + "--#{OS.mac? ? "enable" : "disable"}-mac", + "--with-tiff=#{Formula["libtiff"].opt_prefix}", + *std_configure_args + system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" + + # From the djview4.8 README: + # NOTE: Do not use command "make install". + # Simply copy the application bundle where you want it. + if OS.mac? + # This script creates a more complete bundle, still relying on homebrew libs + cd("mac") { system "sh", "./make_djview_bundle_small.sh" } + prefix.install "mac/DjView.app" + bin.write_exec_script prefix/"DjView.app/Contents/MacOS/djview" + else + # Should we use make install DESTDIR= instead? + prefix.install "src/djview" + end + end + + test do + name = if OS.mac? + "DjView.app" + else + "djview" + end + assert_path_exists prefix/name + end +end diff --git a/Formula/d/djvu2pdf.rb b/Formula/d/djvu2pdf.rb new file mode 100644 index 0000000000000..950d51c7d7b06 --- /dev/null +++ b/Formula/d/djvu2pdf.rb @@ -0,0 +1,31 @@ +class Djvu2pdf < Formula + desc "Small tool to convert Djvu files to PDF files" + homepage "https://0x2a.at/site/projects/djvu2pdf/" + url "https://0x2a.at/site/projects/djvu2pdf/djvu2pdf-0.9.2.tar.gz" + sha256 "afe86237bf4412934d828dfb5d20fe9b584d584ef65b012a893ec853c1e84a6c" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?djvu2pdf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9fdbe69a5415de2630d2a2934f513f985db8d4917b5451ef0241fd125e1096fc" + end + + depends_on "djvulibre" + depends_on "ghostscript" + + def install + bin.install "djvu2pdf" + man1.install "djvu2pdf.1.gz" + end + + test do + system bin/"djvu2pdf", "-h" + end +end diff --git a/Formula/d/djvulibre.rb b/Formula/d/djvulibre.rb new file mode 100644 index 0000000000000..41d8850ee2408 --- /dev/null +++ b/Formula/d/djvulibre.rb @@ -0,0 +1,43 @@ +class Djvulibre < Formula + desc "DjVu viewer" + homepage "https://djvu.sourceforge.net/" + url "https://downloads.sourceforge.net/djvu/djvulibre-3.5.29.tar.gz" + sha256 "d3b4b03ae2bdca8516a36ef6eb27b777f0528c9eda26745d9962824a3fdfeccf" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/djvulibre[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "61ac827cdfc87e9056b7490d09970c49b652e26303ce0c71e68808ae11dfc49f" + sha256 arm64_sequoia: "b57955b6d0b24eff78e60121d490dbff24df02a829f323acde977b46b9b098c0" + sha256 arm64_sonoma: "8554c9e53aa97aa0aefaffdddc1d11ee2b2b9378a3cd2a424414a675b689556a" + sha256 arm64_ventura: "c5dc6a4c1dfbaff711076c51591e0f5e13afcb4377f45627163dc4bec1994a16" + sha256 sonoma: "6af726701b6112d300f266ed794040fe2fdfcf8ee489df594841443f0e603f95" + sha256 ventura: "e840b0290a5280b98c65201c445f9d079f8ceb506a389297f441354fcc574e21" + sha256 arm64_linux: "4be3c4c0603b32ce06a6cd8176e3f7a96e30c482147d900cd8294f80d03f9896" + sha256 x86_64_linux: "79310252531b97960283b93c1de09ee14c6c4fcb8e56ca893a5e48fc23a7d2fa" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "jpeg-turbo" + depends_on "libtiff" + + def install + system "./autogen.sh" + # Don't build X11 GUI apps, Spotlight Importer or Quick Look plugins + system "./configure", "--prefix=#{prefix}", "--disable-desktopfiles" + system "make" + system "make", "install" + (share/"doc/djvu").install Dir["doc/*"] + end + + test do + output = shell_output("#{bin}/djvused -e n #{share}/doc/djvu/lizard2002.djvu") + assert_equal "2", output.strip + end +end diff --git a/Formula/d/dlib.rb b/Formula/d/dlib.rb new file mode 100644 index 0000000000000..e6036ea403e18 --- /dev/null +++ b/Formula/d/dlib.rb @@ -0,0 +1,64 @@ +class Dlib < Formula + desc "C++ library for machine learning" + homepage "https://dlib.net/" + url "https://github.com/davisking/dlib/archive/refs/tags/v20.0.tar.gz" + sha256 "705749801c7896f5c19c253b6be639f4cef2c1831a9606955f01b600b3d86d80" + license "BSL-1.0" + head "https://github.com/davisking/dlib.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f0e98ca135cecee556c669e44f3b6b7a536a6a1c27cb2dc76396665bf4139233" + sha256 cellar: :any, arm64_sequoia: "7494ec3521c2c39b522ba30cab0a2e2d380c5222f31775f2bea98585ddea741f" + sha256 cellar: :any, arm64_sonoma: "b636c93546d2692d574ab5b3f7013f18ca3568cef1408938ccecd7306c49ef02" + sha256 cellar: :any, arm64_ventura: "d246a77b6d001806652429c4680f717836788055a82a015a75232402eb90730c" + sha256 cellar: :any, sonoma: "959777d3009abe7fefed086c20bfa72dc5badd28cef86e35cf7ac1c910b0f550" + sha256 cellar: :any, ventura: "33dab9fb08341c856080b0c834145b10fc66347b1c9b28ea3387948d9fa47765" + sha256 cellar: :any_skip_relocation, arm64_linux: "389aac4f5901a6c86112302d131c2df645bca1cb5001092bd946e8da2ac5d705" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82c6dfb7fc2ebfdcfd6c1bf6b83445e9729621962cefa5ba608b810b54f9e014" + end + + depends_on "cmake" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "openblas" + + def install + args = %W[ + -DDLIB_USE_BLAS=ON + -DDLIB_USE_LAPACK=ON + -Dcblas_lib=#{Formula["openblas"].opt_lib/shared_library("libopenblas")} + -Dlapack_lib=#{Formula["openblas"].opt_lib/shared_library("libopenblas")} + -DDLIB_NO_GUI_SUPPORT=ON + -DDLIB_LINK_WITH_SQLITE3=OFF + -DBUILD_SHARED_LIBS=ON + ] + + if Hardware::CPU.intel? + args << "-DUSE_SSE2_INSTRUCTIONS=ON" + args << "-DUSE_SSE4_INSTRUCTIONS=ON" if OS.mac? && MacOS.version.requires_sse4? + end + + system "cmake", "-S", "dlib", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + dlib::logger dlog("example"); + int main() { + dlog.set_level(dlib::LALL); + dlog << dlib::LINFO << "The answer is " << 42; + } + CPP + system ENV.cxx, "-pthread", "-std=c++14", "test.cpp", "-o", "test", "-I#{include}", + "-L#{lib}", "-ldlib" + assert_match(/INFO.*example: The answer is 42/, shell_output("./test")) + end +end diff --git a/Formula/d/dmagnetic.rb b/Formula/d/dmagnetic.rb new file mode 100644 index 0000000000000..383c94a9d2006 --- /dev/null +++ b/Formula/d/dmagnetic.rb @@ -0,0 +1,54 @@ +class Dmagnetic < Formula + desc "Magnetic Scrolls Interpreter" + homepage "https://www.dettus.net/dMagnetic/" + url "https://www.dettus.net/dMagnetic/dMagnetic_0.37.tar.bz2" + sha256 "ad812bb515bc972e23930d643d5abeaed971d550768b1b3f371bd0f72c3c2e89" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?dMagnetic[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "1d303cc3cb631d54618e5c0d4f0f84590d3396dd85ae4826f065f6a5ebd7a7e6" + sha256 arm64_sequoia: "9f840a9ccf56d119e074527daa5b430d0670bd1425a44efa2882459e279ba40c" + sha256 arm64_sonoma: "4a2cb2a7d9d5334b230ec1f3e475239b3b780aa686d3ccacc8a1d5a014332ca0" + sha256 arm64_ventura: "53df75a05a62e3cf42f523b646e8e98bc24f918c86461417f7c58460ad7bb5fe" + sha256 arm64_monterey: "46ece6d5aeee62439640ef8ac80332d959ccf26e4e152bb217b6e4ee4578a71a" + sha256 arm64_big_sur: "dddfa700cb7a131c7569b81a86883aaa829ef6786130f2253cdafe4b6ae0d14d" + sha256 sonoma: "8875753d82c275224ab8a96db378e71d23dc4d94f4cdd7b8938bd7e997585f95" + sha256 ventura: "53b7f3052773759db150a337a05f47d400a1815d4091a03fe4c356099fe9ed8b" + sha256 monterey: "3be7370bdd40ef1996d44c90ebea5e0a79e00f698a15567e138b52222a5d14d9" + sha256 big_sur: "03cf51b58df1758d4091ef85325843ccf4dd8ea122f5eae0f7dbbdda20652ca6" + sha256 arm64_linux: "d2f8462efd3fae04c958d7af9918a011f98343627968b1ffdc9ad24619a24c59" + sha256 x86_64_linux: "f2ccdaa11d29351b10335eb79f20f4ffeb23029d542a867fe0e6bc2274618a1b" + end + + def install + # Look for configuration and other data within the Homebrew prefix rather than the default paths + inreplace "Makefile", "DESTDIR?=/usr/local", "DESTDIR?=$(PREFIX)" + inreplace "src/frontends/default/pathnames.h" do |s| + s.gsub! "/etc/", "#{etc}/" + s.gsub! "/usr/local/", "#{HOMEBREW_PREFIX}/" + end + + system "make", "PREFIX=#{prefix}", "install" + (share/"games/dMagnetic").install "testcode/minitest.mag", "testcode/minitest.gfx" + end + + test do + args = %W[ + -vmode none + -vcols 300 + -vrows 300 + -vecho -sres 1024x768 + -mag #{share}/games/dMagnetic/minitest.mag + -gfx #{share}/games/dMagnetic/minitest.gfx + ] + command_output = pipe_output("#{bin}/dMagnetic #{args.join(" ")}", "Hello\n") + assert_match(/^Virtual machine is running\..*\n> HELLO$/, command_output) + end +end diff --git a/Formula/d/dmalloc.rb b/Formula/d/dmalloc.rb new file mode 100644 index 0000000000000..8e40b3ca43b25 --- /dev/null +++ b/Formula/d/dmalloc.rb @@ -0,0 +1,39 @@ +class Dmalloc < Formula + desc "Debug versions of system memory management routines" + homepage "https://dmalloc.com/" + url "https://dmalloc.com/releases/dmalloc-5.6.5.tgz" + sha256 "480e3414ab6cedca837721c756b7d64b01a84d2d0e837378d98444e2f63a7c01" + license "ISC" + + livecheck do + url "https://dmalloc.com/releases/" + regex(/href=.*?dmalloc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5739c56456cf07b59f8c884ca56e499aa3e618c2712500819c0457af57018b96" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2406c340e3935d9f228d695c270eb5fd74abef38bafa84f10bded7826c8e8c80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5326a45ed099179ae2f05299e3bf0e90b2f7b037594cf175da72830963687acf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc77030dce1a9f169758cd306be4a70d322479044dd598ce74e7733bbe0a7d71" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2f328197f63c96ff0ce40846bb242b3e1d04985567893adefd2d47f79f6f96d6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c8e1beff8a66f4a5d7a90fa8c5f9836ed79b9241ab642966d82550916a3af5c1" + sha256 cellar: :any_skip_relocation, sonoma: "7768789dadca658d2591b23ad1be950f3c0930dc5a81eff33d16cc2d31ab305b" + sha256 cellar: :any_skip_relocation, ventura: "01adf9d08a79145edccb9004602becb64b659062815b15ce5504a80937c80970" + sha256 cellar: :any_skip_relocation, monterey: "e81b6c8a327baa3612aed45f6dfc157885344bb64f925dcf1cb00d12acfb2f9d" + sha256 cellar: :any_skip_relocation, big_sur: "300f9e7b54c15071bc36fb861cc6b75ef671052c8be6096a99314b1ca0077565" + sha256 cellar: :any_skip_relocation, catalina: "770699ff908a65026ecdebbe57272a50e57f60341c2918302ee4b6729e866533" + sha256 cellar: :any_skip_relocation, arm64_linux: "37749e2907a9db34407034a0c00e0f72e96584049a9daea5de8239e654731501" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c170666de851ea2229c7c7e5dbd2d45960d8033bae31ceffd7eaf5289c1c7aba" + end + + def install + system "./configure", "--enable-threads", "--prefix=#{prefix}" + system "make", "install", "installth", "installcxx", "installthcxx" + end + + test do + system bin/"dmalloc", "-b", "runtime" + end +end diff --git a/Formula/d/dmd.rb b/Formula/d/dmd.rb new file mode 100644 index 0000000000000..6d862efb5856d --- /dev/null +++ b/Formula/d/dmd.rb @@ -0,0 +1,134 @@ +class Dmd < Formula + desc "Digital Mars D compiler" + homepage "https://dlang.org/" + license "BSL-1.0" + + stable do + url "https://github.com/dlang/dmd/archive/refs/tags/v2.111.0.tar.gz" + sha256 "40b64dd049642dcdaef60815451d5c718ef6c861b6a02a3da998a6a3377900c1" + + resource "phobos" do + url "https://github.com/dlang/phobos/archive/refs/tags/v2.111.0.tar.gz" + sha256 "b4a7beb5acac54457dc6dc2ab0899a713e446be10a9a584089238babf4e16d5a" + + livecheck do + formula :parent + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 sonoma: "58cc3b27e8e385cefb7105d6943a0ae6dec8718ca504901a165b6074bdf3d9d5" + sha256 ventura: "dca27059dbaa82f6785ccf0255a5409ba0975d4ef525cd11945d78e82f3c4328" + sha256 x86_64_linux: "bd161341d03c4569d99398c857c4dba58118497300223acfce69fd747da0bca9" + end + + head do + url "https://github.com/dlang/dmd.git", branch: "master" + + resource "phobos" do + url "https://github.com/dlang/phobos.git", branch: "master" + end + end + + depends_on "ldc" => :build + depends_on arch: :x86_64 + + on_macos do + # Can be undeprecated if upstream decides to support arm64 macOS + # TODO: Make linux-only when removing macOS support + deprecate! date: "2025-09-25", because: "is unsupported, https://docs.brew.sh/Support-Tiers#future-macos-support" + disable! date: "2026-09-25", because: "is unsupported, https://docs.brew.sh/Support-Tiers#future-macos-support" + end + + def install + odie "phobos resource needs to be updated" if build.stable? && version != resource("phobos").version + + dmd_make_args = %W[ + INSTALL_DIR=#{prefix} + SYSCONFDIR=#{etc} + HOST_DMD=#{Formula["ldc"].opt_bin}/ldmd2 + ENABLE_RELEASE=1 + VERBOSE=1 + ] + + system "ldc2", "compiler/src/build.d", "-of=compiler/src/build" + system "./compiler/src/build", *dmd_make_args + + make_args = %W[ + INSTALL_DIR=#{prefix} + MODEL=64 + BUILD=release + DMD_DIR=#{buildpath} + DRUNTIME_PATH=#{buildpath}/druntime + PHOBOS_PATH=#{buildpath}/phobos + -f posix.mak + ] + + (buildpath/"phobos").install resource("phobos") + system "make", "-C", "phobos", "VERSION=#{buildpath}/VERSION", *make_args + + kernel_name = OS.mac? ? "osx" : OS.kernel_name.downcase + bin.install "generated/#{kernel_name}/release/64/dmd" + man.install Dir["compiler/docs/man/*"] + + (include/"dlang/dmd").install Dir["druntime/import/*"] + cp_r ["phobos/std", "phobos/etc"], include/"dlang/dmd" + lib.install Dir["druntime/**/libdruntime.*", "phobos/**/libphobos2.*"] + + (buildpath/"dmd.conf").write <<~INI + [Environment] + DFLAGS=-I#{opt_include}/dlang/dmd -L-L#{opt_lib} + INI + etc.install "dmd.conf" + end + + # Previous versions of this formula may have left in place an incorrect + # dmd.conf. If it differs from the newly generated one, move it out of place + # and warn the user. + def install_new_dmd_conf + conf = etc/"dmd.conf" + + # If the new file differs from conf, etc.install drops it here: + new_conf = etc/"dmd.conf.default" + # Else, we're already using the latest version: + return unless new_conf.exist? + + backup = etc/"dmd.conf.old" + opoo "An old dmd.conf was found and will be moved to #{backup}." + mv conf, backup + mv new_conf, conf + end + + def post_install + install_new_dmd_conf + end + + def caveats + <<~EOS + Ancillary tools (e.g. ddemangle, dustmite, rdmd) are now in the `dtools` formula. + EOS + end + + test do + (testpath/"hello.d").write <<~EOS + import std.stdio; + + void main(string[] args) + { + writeln("hello world"); + writefln("args.length = %d", args.length); + + foreach (index, arg; args) + { + writefln("args[%d] = '%s'", index, arg); + } + } + EOS + + system bin/"dmd", "-fPIC", "hello.d" + system "./hello" + end +end diff --git a/Formula/d/dmenu.rb b/Formula/d/dmenu.rb new file mode 100644 index 0000000000000..1546aed4ce8b3 --- /dev/null +++ b/Formula/d/dmenu.rb @@ -0,0 +1,41 @@ +class Dmenu < Formula + desc "Dynamic menu for X11" + homepage "https://tools.suckless.org/dmenu/" + url "https://dl.suckless.org/tools/dmenu-5.4.tar.gz" + sha256 "8fbace2a0847aa80fe861066b118252dcc7b4ca0a0a8f3a93af02da8fb6cd453" + license "MIT" + head "https://git.suckless.org/dmenu/", using: :git, branch: "master" + + livecheck do + url "https://dl.suckless.org/tools/" + regex(/href=.*?dmenu[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "48572596abd24b3c86d85ca49f4ea5eccb8b531e2589df523adc5dee2f2b011d" + sha256 cellar: :any, arm64_sequoia: "0c348d9eed878159d80ecef04a223a46f9746d97718454df5dc4244e6c735b4a" + sha256 cellar: :any, arm64_sonoma: "1565ec173e8afb3953ac135a1a3944cb0847e0363ecc5e2fec4f2442c8e63bef" + sha256 cellar: :any, arm64_ventura: "e451aa665b8c54cb02549ff7d8505f6c67fd429d3df5e6fd3fcc84897ea87a54" + sha256 cellar: :any, sonoma: "164c867ca65c1a5b9cb815dbdb188d988a19e11b608a530835ddfb90ec935b3d" + sha256 cellar: :any, ventura: "359269551ea3e028114d423cc0104176d0d6537b6d7a989847dc63555a9fc1f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "775a0ea9139f8e05234fcf09917ae846b11d50caa08dcefdb22ac6c5836d8fee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90f70c92c682c828f0e538a032421fd468268959c45b4ba2dd36647a34e28d9d" + end + + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxft" + depends_on "libxinerama" + + def install + system "make", "FREETYPEINC=#{HOMEBREW_PREFIX}/include/freetype2", "PREFIX=#{prefix}", "install" + end + + test do + # Disable test on Linux because it fails with this error: + # cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "warning: no locale support", shell_output("#{bin}/dmenu 2>&1", 1) + end +end diff --git a/Formula/d/dmg2img.rb b/Formula/d/dmg2img.rb new file mode 100644 index 0000000000000..69d8d9056205a --- /dev/null +++ b/Formula/d/dmg2img.rb @@ -0,0 +1,55 @@ +class Dmg2img < Formula + desc "Utilities for converting macOS DMG images" + homepage "http://vu1tur.eu.org/tools/" + url "http://vu1tur.eu.org/tools/dmg2img-1.6.7.tar.gz" + sha256 "02aea6d05c5b810074913b954296ddffaa43497ed720ac0a671da4791ec4d018" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?dmg2img[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0cdc762d353e27c43eacd4221ac499f96a71ac67bd650ceac82d8e8a64f526c2" + sha256 cellar: :any, arm64_sequoia: "4c3872719a1261f5cd981d5320bba65289e6c2c9e06e73478f3e3bb8267b64ec" + sha256 cellar: :any, arm64_sonoma: "3abeed11bf75f80c25bfc4f8f3935f8160820623dfb84380ac5b8982ef0498f4" + sha256 cellar: :any, arm64_ventura: "af9009c8bc805eee1b8b88c88f4323e31f9990476cd61bab48edb90c84c89e4e" + sha256 cellar: :any, arm64_monterey: "03c18ebfadd3f15af4c5acfc3ddff35352b3ed74b734ad1a3f7fc3f991d641c7" + sha256 cellar: :any, arm64_big_sur: "30d93d8a25986e284ce16234d63262b9b09282194cac91c96e30ef2ac36915ed" + sha256 cellar: :any, sonoma: "fa89dd61ee460f99225bc6458e4057d94f6ecfbb5a6ca303480562d22e855375" + sha256 cellar: :any, ventura: "8cb155a0d62a038484e9bda45b83cede96e6410ef20580bf715723c0285ff9eb" + sha256 cellar: :any, monterey: "5f98d762bda9e92cf497e1bca2cfc1f738da6251c807802cdaf4128b9f6d0972" + sha256 cellar: :any, big_sur: "0fb916b99c3006b44195e38d0234cb38e1e1aef0c76f73688d75b25d704d689d" + sha256 cellar: :any, catalina: "f78214ca14fa444d792fd6c9eeec1068717cb64ee8ce635154ccc783bc37099e" + sha256 cellar: :any_skip_relocation, arm64_linux: "87d9a58139f343a3753c44a15ce9b451dedd5b8e7ef9672dd7b4a2b3f2eb8e86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6fe4e0cd5213bfcefed195911e5f7445c0d70016ce01e29ade4fb8dfd8cfa6b" + end + + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # Patch for OpenSSL 3 compatibility + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dmg2img/openssl-3.diff" + sha256 "bd57e74ecb562197abfeca8f17d0622125a911dd4580472ff53e0f0793f9da1c" + end + + def install + system "make" + bin.install "dmg2img" + bin.install "vfdecrypt" + end + + test do + assert_match version.to_s, shell_output(bin/"dmg2img") + output = shell_output("#{bin}/vfdecrypt 2>&1", 1) + assert_match "No Passphrase given.", output + end +end diff --git a/Formula/d/dmtx-utils.rb b/Formula/d/dmtx-utils.rb new file mode 100644 index 0000000000000..8041ec66674a6 --- /dev/null +++ b/Formula/d/dmtx-utils.rb @@ -0,0 +1,61 @@ +class DmtxUtils < Formula + desc "Read and write data matrix barcodes" + homepage "https://github.com/dmtx/dmtx-utils" + url "https://github.com/dmtx/dmtx-utils/archive/refs/tags/v0.7.6.tar.gz" + sha256 "0d396ec14f32a8cf9e08369a4122a16aa2e5fa1675e02218f16f1ab777ea2a28" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 8 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0d9a9f83919daef68ed7849bb0edeb5b0c99240b8854c4ea0b16aa95b061888a" + sha256 cellar: :any, arm64_sequoia: "266e690457d4ad1f3844c37e52e3228121803ab16f5df2a8441ac8f0380a2b12" + sha256 cellar: :any, arm64_sonoma: "1ed0bf91ff69184917d25840c46c8b1a390e116b468dba2bfebcfca4688326f4" + sha256 cellar: :any, arm64_ventura: "baccf696ad55b1eeda946e6e9e6f8085e6cee318bec01446bd260f774ec3ebd7" + sha256 cellar: :any, sonoma: "e4166dd09301ba1d1bf09ca625d395b145b5271b6e8c6938c6299b1b6773eac7" + sha256 cellar: :any, ventura: "57db09489948aa30d196602969ff17059e3668afd012b2bd21a56c1de4bf4e16" + sha256 cellar: :any_skip_relocation, arm64_linux: "003e60bbcf5bf79f791eb3e4e695d45648ae4cdf6d2b600972d900484bc5440c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86b15ef564fc867cfe335573ed209b3c96cb509859ac0507794433316d8246b4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + depends_on "imagemagick" + depends_on "libdmtx" + depends_on "libtool" + + on_macos do + depends_on "fontconfig" + depends_on "freetype" + depends_on "gettext" + depends_on "glib" + depends_on "liblqr" + depends_on "libomp" + depends_on "little-cms2" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + resource "homebrew-test_image12" do + url "https://raw.githubusercontent.com/dmtx/libdmtx/ca9313f/test/rotate_test/images/test_image12.png" + sha256 "683777f43ce2747c8a6c7a3d294f64bdbfee600d719aac60a18fcb36f7fc7242" + end + + testpath.install resource("homebrew-test_image12") + image = File.read("test_image12.png") + assert_equal "9411300724000003", pipe_output("#{bin}/dmtxread", image, 0) + system "/bin/dd", "if=/dev/random", "of=in.bin", "bs=512", "count=3" + dmtxwrite_output = pipe_output("#{bin}/dmtxwrite", File.read("in.bin"), 0) + dmtxread_output = pipe_output("#{bin}/dmtxread", dmtxwrite_output, 0) + (testpath/"out.bin").atomic_write dmtxread_output + assert_equal (testpath/"in.bin").sha256, (testpath/"out.bin").sha256 + end +end diff --git a/Formula/d/dnglab.rb b/Formula/d/dnglab.rb new file mode 100644 index 0000000000000..728ff9bff0a26 --- /dev/null +++ b/Formula/d/dnglab.rb @@ -0,0 +1,36 @@ +class Dnglab < Formula + desc "Camera RAW to DNG file format converter" + homepage "https://github.com/dnglab/dnglab" + url "https://github.com/dnglab/dnglab/archive/refs/tags/v0.7.1.tar.gz" + sha256 "9a62c63a0775c946ccc378dbbc0f9206f593659f2f998cfb66bf6a0f64487e2f" + license "LGPL-2.1-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6410ed4f43547dc92824e6b48d006bc00be417340eea0462c6465ec1b24dca74" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c61a28cf5d7d13f639076f3930ddc3997ed6b8830cc75bfed3888671c18332f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ee059bfa26e1ef45495929c1b55096111957dca084d06eb1a2df92c6f7eb043f" + sha256 cellar: :any_skip_relocation, sonoma: "4f904d3fcb256714d1c908dd984e7232b9735d0c6912539a72848fb29851f803" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e2d67f8e56a74ae98fae362571b0d3a86f0070d4dd1af94869df10391fd4ba4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e261fc76ad602c3aa4b609ce09728eb66b90fe01e473a3fa5db6cd4c89d17cd" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "bin/dnglab") + + bash_completion.install "bin/dnglab/completions/dnglab.bash" + fish_completion.install "bin/dnglab/completions/dnglab.fish" + zsh_completion.install "bin/dnglab/completions/_dnglab" + + man1.install Dir["bin/dnglab/manpages/*.1"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/dnglab --version") + + touch testpath/"not_a_dng.dng" + output = shell_output("#{bin}/dnglab analyze --raw-checksum not_a_dng.dng 2>&1", 3) + assert_match "Error: Error: No decoder found, model '', make: '', mode: ''", output + end +end diff --git a/Formula/d/dnote.rb b/Formula/d/dnote.rb new file mode 100644 index 0000000000000..d543e661661d4 --- /dev/null +++ b/Formula/d/dnote.rb @@ -0,0 +1,44 @@ +class Dnote < Formula + desc "Simple command-line notebook" + homepage "https://www.getdnote.com" + url "https://github.com/dnote/dnote/archive/refs/tags/cli-v0.15.5.tar.gz" + sha256 "923e959d32885f01e426e37e7240bf9a66addbdfd95620846fa535e4b7f7d2e4" + license "GPL-3.0-only" + head "https://github.com/dnote/dnote.git", branch: "master" + + livecheck do + url :stable + regex(/^cli[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d1f9861be49752fdd4cc12e1f224a293b7cfafadbcb68fc83d56e05d3c31d0b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "60fcee308d5b2b28360906f0fe521a9cfefc65ca1330e2609864196b7ebd2bcd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ce8f4168857e20b7d1420ce634f41c22a3c3920c2b79562a6292019e050ff6e" + sha256 cellar: :any_skip_relocation, sonoma: "35bcefd91e7cb410295ff6a2c7620e0e139dd6dc826d284e7bf7edeb36922890" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a8e4f4ff67602a4ff1af0178b99aef9bea54b38f6afbf89d10310ed4dfc3931" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a293df56230be458f2c7131841f37a352d0b234d62f4929f47a9085e76df8660" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + ldflags = "-s -w -X main.versionTag=#{version} -X main.apiEndpoint=http://localhost:3000/api" + system "go", "build", *std_go_args(ldflags:, tags: "fts5"), "./pkg/cli" + end + + test do + ENV["XDG_CONFIG_HOME"] = testpath + ENV["XDG_DATA_HOME"] = testpath + ENV["XDG_CACHE_HOME"] = testpath + + assert_match version.to_s, shell_output("#{bin}/dnote version") + + desc = "Check disk usage with df -h" + system bin/"dnote", "add", "linux", "-c", desc + assert_match desc, shell_output("#{bin}/dnote view linux") + assert_match desc, shell_output("#{bin}/dnote find 'disk usage'") + end +end diff --git a/Formula/d/dns2tcp.rb b/Formula/d/dns2tcp.rb new file mode 100644 index 0000000000000..9aa0bb6955a7b --- /dev/null +++ b/Formula/d/dns2tcp.rb @@ -0,0 +1,48 @@ +class Dns2tcp < Formula + desc "TCP over DNS tunnel" + homepage "https://packages.debian.org/sid/dns2tcp" + url "https://deb.debian.org/debian/pool/main/d/dns2tcp/dns2tcp_0.5.2.orig.tar.gz" + sha256 "ea9ef59002b86519a43fca320982ae971e2df54cdc54cdb35562c751704278d9" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/d/dns2tcp/" + regex(/href=.*?dns2tcp[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2cefc14058fc1f4bff6d872e8b5ad5e5504891f7992857a5fa8b7f469617c4d5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0eb7cacef30472d6ca9cd59507d8fe3f078ad731b1e779ff8147bb2730547adb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a0bd389f540e25443deede0d0d2e1a3a5f3247cff3b49cac4d00c386f67b6e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6476349ed65c44a7cbeddff8ce0322f80ed347b7382a5108dc4128be0871161" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6bcfed251acce767235024339591706ee761691a01b447acfb289f447a662cc8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7342bad79a49f0cd2049fe73e9545ae691d83087e285d97b926bd3e29b7f0643" + sha256 cellar: :any_skip_relocation, sonoma: "9dbcb52754890df8f97104ec51ede39386ab56db8c14790fdf91391aeba9ad6f" + sha256 cellar: :any_skip_relocation, ventura: "d922e172d654f0bf200d345d526ad150c57bf77376b8a022a76b98e594494100" + sha256 cellar: :any_skip_relocation, monterey: "02373e78d9c7f416d795a640058537f1edafb82a59b5406b019ed80b4b57c3f4" + sha256 cellar: :any_skip_relocation, big_sur: "09b03661d759932c928ae63c72af41a528f6378d6f23e67e0341592ecba34a47" + sha256 cellar: :any_skip_relocation, catalina: "f1517166d8e8e02dbefbb654214012a6bf089ab78a1a237c9ec7d86c356da97f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3439b7a053baae453e709bbab25fc3ed8f389037b73234d0cd886ae492f51c13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44282da4806ffc130f6a3326925e708d70379c9c44ec735b251010927d5b920e" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `debug'; rr.o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match(/^dns2tcp v#{version} /, + shell_output("#{bin}/dns2tcpc -help 2>&1", 255)) + end +end diff --git a/Formula/d/dnscontrol.rb b/Formula/d/dnscontrol.rb new file mode 100644 index 0000000000000..c4bc1a3c0e4f8 --- /dev/null +++ b/Formula/d/dnscontrol.rb @@ -0,0 +1,62 @@ +class Dnscontrol < Formula + desc "Synchronize your DNS to multiple providers from a simple DSL" + homepage "https://dnscontrol.org/" + url "https://github.com/StackExchange/dnscontrol/archive/refs/tags/v4.26.0.tar.gz" + sha256 "432237fae9991160311a3c20e0d6e6c6e1b8ac9bf5022c899a2e6a75037298b4" + license "MIT" + version_scheme 1 + head "https://github.com/StackExchange/dnscontrol.git", branch: "main" + + # Upstream appears to use GitHub releases to indicate that a version is + # released and they sometimes re-tag versions before that point, so it's + # necessary to check release versions instead of tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b706a5ecb6c698a3285751389286e6860644340e682c18a33038de32359be836" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b706a5ecb6c698a3285751389286e6860644340e682c18a33038de32359be836" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b706a5ecb6c698a3285751389286e6860644340e682c18a33038de32359be836" + sha256 cellar: :any_skip_relocation, sonoma: "7ad072db9af3f18dce27a8602a3c063b76d4f3afb956a7096f62fefff153decc" + sha256 cellar: :any_skip_relocation, arm64_linux: "44b092071f027d7da03724dc5c0de9fd6264b17571d9e2b5e923071d6e0f8ea1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbe4016f5b712ddd6c82f1ef525cd7bb4c285c6572881712234fd4a09c9b3583" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/StackExchange/dnscontrol/v4/pkg/version.version=#{version} + ] + system "go", "build", *std_go_args(ldflags: ldflags) + + generate_completions_from_executable(bin/"dnscontrol", "shell-completion", shells: [:bash, :zsh]) + end + + def caveats + "dnscontrol bash completion depends on the bash-completion package." + end + + test do + version_output = shell_output("#{bin}/dnscontrol version") + assert_match version.to_s, version_output + + (testpath/"dnsconfig.js").write <<~JS + var namecom = NewRegistrar("name.com", "NAMEDOTCOM"); + var r53 = NewDnsProvider("r53", "ROUTE53") + + D("example.com", namecom, DnsProvider(r53), + A("@", "1.2.3.4"), + CNAME("www","@"), + MX("@",5,"mail.myserver.com."), + A("test", "5.6.7.8") + ) + JS + + output = shell_output("#{bin}/dnscontrol check #{testpath}/dnsconfig.js 2>&1").strip + assert_equal "No errors.", output + end +end diff --git a/Formula/d/dnscrypt-proxy.rb b/Formula/d/dnscrypt-proxy.rb new file mode 100644 index 0000000000000..96ce354274af0 --- /dev/null +++ b/Formula/d/dnscrypt-proxy.rb @@ -0,0 +1,73 @@ +class DnscryptProxy < Formula + desc "Secure communications between a client and a DNS resolver" + homepage "https://dnscrypt.info" + url "https://github.com/DNSCrypt/dnscrypt-proxy/archive/refs/tags/2.1.14.tar.gz" + sha256 "495c4f494d40068e5e3ddcb8748d91b90e99f2516060e3b59520b9f3d6148a9e" + license "ISC" + head "https://github.com/DNSCrypt/dnscrypt-proxy.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f777ca5ee453c1a5f540bd82e96e44aee0ac723a6e0ba27d259bb36ad66e2e2b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e68f4297462c1d9d0c5a6078d876641084bd0961916d2276bda880d96d94e45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e68f4297462c1d9d0c5a6078d876641084bd0961916d2276bda880d96d94e45" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4e68f4297462c1d9d0c5a6078d876641084bd0961916d2276bda880d96d94e45" + sha256 cellar: :any_skip_relocation, sonoma: "061e8693a4aa2def40b855840df9fe0f57616e4a31f8cb7ca2e945154ef5033c" + sha256 cellar: :any_skip_relocation, ventura: "061e8693a4aa2def40b855840df9fe0f57616e4a31f8cb7ca2e945154ef5033c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab1f408921de8d4100a9fe9bc7cf38074c5e5c4b32d7599e6c4d03781918e15b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba761961d8e3f2905c54f0fd0ee8367ae19a77b09dd9701d787d58854972f0ee" + end + + depends_on "go" => :build + + def install + cd "dnscrypt-proxy" do + system "go", "build", *std_go_args(ldflags: "-X main.version=#{version}", output: sbin/"dnscrypt-proxy") + pkgshare.install Dir["example*"] + etc.install pkgshare/"example-dnscrypt-proxy.toml" => "dnscrypt-proxy.toml" + end + end + + def caveats + <<~EOS + After starting dnscrypt-proxy, you will need to point your + local DNS server to 127.0.0.1. You can do this by going to + System Preferences > "Network" and clicking the "Advanced..." + button for your interface. You will see a "DNS" tab where you + can click "+" and enter 127.0.0.1 in the "DNS Servers" section. + + By default, dnscrypt-proxy runs on localhost (127.0.0.1), port 53, + balancing traffic across a set of resolvers. If you would like to + change these settings, you will have to edit the configuration file: + #{etc}/dnscrypt-proxy.toml + + To check that dnscrypt-proxy is working correctly, open Terminal and enter the + following command. Replace en1 with whatever network interface you're using: + + sudo tcpdump -i en1 -vvv 'port 443' + + You should see a line in the result that looks like this: + + resolver.dnscrypt.info + EOS + end + + service do + run [opt_sbin/"dnscrypt-proxy", "-config", etc/"dnscrypt-proxy.toml"] + keep_alive true + require_root true + process_type :background + end + + test do + assert_match version.to_s, shell_output("#{sbin}/dnscrypt-proxy --version") + + config = "-config #{etc}/dnscrypt-proxy.toml" + output = shell_output("#{sbin}/dnscrypt-proxy #{config} -list 2>&1") + assert_match "Source [public-resolvers] loaded", output + end +end diff --git a/Formula/d/dnscrypt-wrapper.rb b/Formula/d/dnscrypt-wrapper.rb new file mode 100644 index 0000000000000..1a8a948bf3f2c --- /dev/null +++ b/Formula/d/dnscrypt-wrapper.rb @@ -0,0 +1,43 @@ +class DnscryptWrapper < Formula + desc "Server-side proxy that adds dnscrypt support to name resolvers" + homepage "https://cofyc.github.io/dnscrypt-wrapper/" + url "https://github.com/cofyc/dnscrypt-wrapper/archive/refs/tags/v0.4.2.tar.gz" + sha256 "911856dc4e211f906ca798fcf84f5b62be7fdbf73c53e5715ce18d553814ac86" + license "ISC" + revision 2 + head "https://github.com/Cofyc/dnscrypt-wrapper.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "155ae1204059e3966a89fc6a1da59af00637662f7cb96e2d7a37a7439676a659" + sha256 cellar: :any, arm64_sequoia: "c044e99092e598b8ae1ea0415864f0f8220949113fdc23e79ac9182ac9932ef9" + sha256 cellar: :any, arm64_sonoma: "a031227485010c215196c1cdd275763f4e99fb7a6cb4c312008e1700beb2c70e" + sha256 cellar: :any, sonoma: "bc437509b36ffd78cb7e5f560ae00ebcefe8c63790ce6cebe11e739d985a1729" + sha256 cellar: :any, ventura: "1aeb1619be4bfddebbe11aae4cd7763e045e76f7002426291c2b3d41b2d4db68" + sha256 cellar: :any, monterey: "5ef765f7940b89b56f2fe21d5d540c1dc35f4c710292bd046b172b405b2f0814" + sha256 cellar: :any_skip_relocation, arm64_linux: "6bab5cbaa538d70c74a6f741af979309edac5bcd368abb34e2d41cbe4280d14f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfaec9e6087a736aabf33b3a638e6133e7da8fc76700d2404bd29e5b33ec5380" + end + + depends_on "autoconf" => :build + depends_on "libevent" + depends_on "libsodium" + + def install + # Workaround for arm64 macOS, https://github.com/cofyc/dnscrypt-wrapper/issues/177 + inreplace "compat.h", "#define HAVE_BACKTRACE 1", "" if OS.mac? && Hardware::CPU.arm? + + system "make", "configure" + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system sbin/"dnscrypt-wrapper", "--gen-provider-keypair", + "--provider-name=2.dnscrypt-cert.example.com", + "--ext-address=192.168.1.1" + system sbin/"dnscrypt-wrapper", "--gen-crypt-keypair" + end +end diff --git a/Formula/d/dnsdist.rb b/Formula/d/dnsdist.rb new file mode 100644 index 0000000000000..72e5ce8eaaf13 --- /dev/null +++ b/Formula/d/dnsdist.rb @@ -0,0 +1,68 @@ +class Dnsdist < Formula + include Language::Python::Virtualenv + + desc "Highly DNS-, DoS- and abuse-aware loadbalancer" + homepage "https://www.dnsdist.org/" + url "https://downloads.powerdns.com/releases/dnsdist-2.0.1.tar.xz" + sha256 "144e2356d07d6577a570782a6f79f426125344221dbdc4ddaaa7f9d468d51900" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.powerdns.com/releases/" + regex(/href=.*?dnsdist[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "dfea90bdb98efc4b827ed4c32ea6efbb1417e57623120ea43ab97d4a3d1f22da" + sha256 arm64_sequoia: "fc32d06a35b1611c4bb3ed43712359fc095d0c68b7772b9e48355728ce6494da" + sha256 arm64_sonoma: "8ed1785bf9262c314b75defbcf3fac20972d70f430fbfa1cb5765e416cdedd08" + sha256 sonoma: "d593835bf6940fa880d91beb34e8aa02e0ce0986abd9bdec8f3149882a2cee6c" + sha256 arm64_linux: "6b0d88620b7c47cc49ffa88da13b9ccf1eb7ab03c2511ad80fd67bde8a06a07b" + sha256 x86_64_linux: "1d32e7c0ec893b6233949e76ca6b9af53eec64290f506d93dfd6ec4ad9a5e0c4" + end + + depends_on "boost" => :build + depends_on "libyaml" => :build # for PyYaml + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "fstrm" + depends_on "libnghttp2" + depends_on "libsodium" + depends_on "luajit" + depends_on "openssl@3" + depends_on "re2" + depends_on "tinycdb" + + uses_from_macos "libedit" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + venv = virtualenv_create(buildpath/"bootstrap", "python3") + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + + # Avoid over-linkage to `abseil`. + ENV.append "LDFLAGS", "-Wl,-dead_strip_dylibs" if OS.mac? + + system "./configure", "--disable-silent-rules", + "--without-net-snmp", + "--enable-dns-over-tls", + "--enable-dns-over-https", + "--enable-dnscrypt", + "--with-re2", + "--sysconfdir=#{etc}/dnsdist", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"dnsdist.conf").write "setLocal('127.0.0.1')" + output = shell_output("#{bin}/dnsdist -C dnsdist.conf --check-config 2>&1") + assert_equal "Configuration 'dnsdist.conf' OK!", output.chomp + end +end diff --git a/Formula/d/dnsgen.rb b/Formula/d/dnsgen.rb new file mode 100644 index 0000000000000..4f36cb0fc9c99 --- /dev/null +++ b/Formula/d/dnsgen.rb @@ -0,0 +1,77 @@ +class Dnsgen < Formula + include Language::Python::Virtualenv + + desc "Generates DNS names from existing domain names" + homepage "https://github.com/AlephNullSK/dnsgen" + url "https://files.pythonhosted.org/packages/5f/e1/1c7d86f51da5b93f3f99ac99e3ad051ed82234147ddd869f77a3959e6abc/dnsgen-1.0.4.tar.gz" + sha256 "1087e9e5c323918aa3511e592759716116a208012aee024ffdbeac5fce573a0c" + license "MIT" + revision 2 + head "https://github.com/AlephNullSK/dnsgen.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "15b50f2cc4aced4a85f39d295a40c8fc7ee42c9bf1259beabd582c625c73fbbd" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/72/97/bf44e6c6bd8ddbb99943baf7ba8b1a8485bcd2fe0e55e5708d7fee4ff1ae/requests_file-2.1.0.tar.gz" + sha256 "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"dnsgen", shell_parameter_format: :click) + end + + test do + (testpath/"domains.txt").write <<~EOS + example.com + example.net + EOS + + output = shell_output("#{bin}/dnsgen domains.txt") + assert_match "beta.example.com", output + end +end diff --git a/Formula/d/dnsmap.rb b/Formula/d/dnsmap.rb new file mode 100644 index 0000000000000..dfc6ac569b772 --- /dev/null +++ b/Formula/d/dnsmap.rb @@ -0,0 +1,41 @@ +class Dnsmap < Formula + desc "Passive DNS network mapper (a.k.a. subdomains bruteforcer)" + homepage "https://github.com/resurrecting-open-source-projects/dnsmap" + url "https://github.com/resurrecting-open-source-projects/dnsmap/archive/refs/tags/0.36.tar.gz" + sha256 "f52d6d49cbf9a60f601c919f99457f108d51ecd011c63e669d58f38d50ad853c" + # Code is all GPL-2.0-or-later but license file was changed to GPL-3.0 in following commit + # Ref: https://github.com/resurrecting-open-source-projects/dnsmap/commit/408ecfd62a0b2c089dda6f3be5d396ed2662797e + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later"] + head "https://github.com/resurrecting-open-source-projects/dnsmap.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4134bcbd1d8db51421b99a06ed1e19a6325672e0c70a67f7ab9754335e801558" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "61337c7ece0f713abedf4081d0519dc7979872a5f0142467a419d892332dcaff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f4f7d4275680826270912ddd68aa2c5e69e83a620004465a412815695388d47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62d1f525a5c4d2770b488d65670cde33d377a460987e5e0568eea506b592ebd0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8eb47816e6f0177b5e7a7358540055bf5d0346888bc921f6220ebd2e4a15cfda" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "af20d1658eb8b3f6191712debd39b3ab21afe033da12fb1e6a94b413f17b1d84" + sha256 cellar: :any_skip_relocation, sonoma: "b4aa02b4564189933d169045d37519cfa61dd374b593052819e189ab5ac8fa24" + sha256 cellar: :any_skip_relocation, ventura: "4c3b82bafb59e5ad12ecb2c8233f54bf9b218728e453aa9be75f42524f125cf3" + sha256 cellar: :any_skip_relocation, monterey: "48eeee1b5697a45f09c625d67cd2780964e4183c94d9d7a667d267c0b56f2359" + sha256 cellar: :any_skip_relocation, big_sur: "194967d9aa003034d0c6e8f917cc0adffd5dff7715e085f3c44521e44afa3fb4" + sha256 cellar: :any_skip_relocation, catalina: "de4e15536fa71c6bf75f0821909002652eaf6b7c8a7d25c9229a85edddada4cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "9751b94b353d2c3a0fc7270f4989d1d93f75709ebdc2c3377e8c8cedc5c5f880" + sha256 cellar: :any_skip_relocation, x86_64_linux: "165264ad85acecb8f79932782e3e0a1eba9110462ac627379ddc3d07ef4190b4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output(bin/"dnsmap", 1) + end +end diff --git a/Formula/d/dnsmasq.rb b/Formula/d/dnsmasq.rb new file mode 100644 index 0000000000000..4ff72c505a22b --- /dev/null +++ b/Formula/d/dnsmasq.rb @@ -0,0 +1,73 @@ +class Dnsmasq < Formula + desc "Lightweight DNS forwarder and DHCP server" + homepage "https://thekelleys.org.uk/dnsmasq/doc.html" + url "https://thekelleys.org.uk/dnsmasq/dnsmasq-2.91.tar.gz" + sha256 "2d26a048df452b3cfa7ba05efbbcdb19b12fe7a0388761eb5d00938624bd76c8" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + + livecheck do + url "https://thekelleys.org.uk/dnsmasq/" + regex(/href=.*?dnsmasq[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "718381498763305f247186fa9cb8129231288372456787f9191ef81201e98686" + sha256 arm64_sequoia: "482fb9095287d8a57943049c8eea8ea59f2c9f127b23e5c9820bcc79f514a0b9" + sha256 arm64_sonoma: "0a155cd6f1100c05013a1522ef2cd49170d38cc17bbc8e6efe094a15d02a2dd8" + sha256 arm64_ventura: "cdab8f9171fdfdb0d3992f985bfa47f1e37a21ea8852b858dc99d3530fcdd90f" + sha256 sonoma: "4aa45af1edb9037c600a7dfac19d606adf9ff99751868a21c69dfc3fbbd2aa3d" + sha256 ventura: "00b9f8f1fa62a1e802697213e4f4a8efde894984a686246eca65d94184e7bfe4" + sha256 arm64_linux: "d8dc8fbdd6b69cd8ecf6718792c5121065b4bf7cb06edc107a0de8683c92fc74" + sha256 x86_64_linux: "c7ccd503b66d1e2096490ff52a0fb277fbc91ff7aa57c313fb1b3fdf531560ee" + end + + depends_on "pkgconf" => :build + + def install + ENV.deparallelize + + # Fix etc location + inreplace %w[dnsmasq.conf.example src/config.h man/dnsmasq.8 + man/es/dnsmasq.8 man/fr/dnsmasq.8].each do |s| + s.gsub! "/var/lib/misc/dnsmasq.leases", + var/"lib/misc/dnsmasq/dnsmasq.leases", audit_result: false + s.gsub! "/etc/dnsmasq.conf", etc/"dnsmasq.conf", audit_result: false + s.gsub! "/var/run/dnsmasq.pid", var/"run/dnsmasq/dnsmasq.pid", audit_result: false + s.gsub! "/etc/dnsmasq.d", etc/"dnsmasq.d", audit_result: false + s.gsub! "/etc/ppp/resolv.conf", etc/"dnsmasq.d/ppp/resolv.conf", audit_result: false + s.gsub! "/etc/dhcpc/resolv.conf", etc/"dnsmasq.d/dhcpc/resolv.conf", audit_result: false + s.gsub! "/usr/sbin/dnsmasq", HOMEBREW_PREFIX/"sbin/dnsmasq", audit_result: false + end + + # Fix compilation on newer macOS versions. + ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" + + inreplace "Makefile" do |s| + s.change_make_var! "CFLAGS", ENV.cflags || "" + s.change_make_var! "LDFLAGS", ENV.ldflags || "" + end + + system "make", "install", "PREFIX=#{prefix}" + + etc.install "dnsmasq.conf.example" => "dnsmasq.conf" + end + + def post_install + (var/"lib/misc/dnsmasq").mkpath + (var/"run/dnsmasq").mkpath + (etc/"dnsmasq.d/ppp").mkpath + (etc/"dnsmasq.d/dhcpc").mkpath + touch etc/"dnsmasq.d/ppp/.keepme" + touch etc/"dnsmasq.d/dhcpc/.keepme" + end + + service do + run [opt_sbin/"dnsmasq", "--keep-in-foreground", "-C", etc/"dnsmasq.conf", "-7", etc/"dnsmasq.d,*.conf"] + keep_alive true + require_root true + end + + test do + system "#{sbin}/dnsmasq", "--test" + end +end diff --git a/Formula/d/dnsperf.rb b/Formula/d/dnsperf.rb new file mode 100644 index 0000000000000..c7f60d7bca6f9 --- /dev/null +++ b/Formula/d/dnsperf.rb @@ -0,0 +1,42 @@ +class Dnsperf < Formula + desc "Measure DNS performance by simulating network conditions" + homepage "https://www.dns-oarc.net/tools/dnsperf" + url "https://www.dns-oarc.net/files/dnsperf/dnsperf-2.14.0.tar.gz" + sha256 "134ba69744705bdb65ea57e25713300a6771f7cecbd5d6a74dd9472c18ac2696" + license "Apache-2.0" + + livecheck do + url :homepage + regex(/href=.*?dnsperf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c12ce321fce2e77c1a9081a50cf8887e47f4474e51d69475e7364b253caf4eb1" + sha256 cellar: :any, arm64_sequoia: "105e91000e93fa837ba43661cac925cbfab0bfdc679fa7e9920c590c0f0269f3" + sha256 cellar: :any, arm64_sonoma: "1f56f85a5973c690c2d511f197d2af107391cb2d73fc165a10b2bc604095b7b6" + sha256 cellar: :any, arm64_ventura: "0c6940568620597ca23ab89c37dbd3cafa038e4491020c020a491ef852b07bee" + sha256 cellar: :any, arm64_monterey: "7b523397aaeb7d710a9310cec381eadc01b32b0d19bf9f50bd9813d14c1f6bb8" + sha256 cellar: :any, sonoma: "4b575d306d9cb921ac4f1dd85fcb0d565e4544ea9a2e9215dac68725f6a0e630" + sha256 cellar: :any, ventura: "b9f8c954172caadcfe59c81730f835290a6a8327c5f4e4785c353f839cf5cef1" + sha256 cellar: :any, monterey: "fb4ebe4a3f3149b67cfd098d51b04db2fe8bd3bf88e827bb9c97d266ee150300" + sha256 cellar: :any_skip_relocation, arm64_linux: "d10da227a6151f14a8d411e714a5d3ff8fabc3ed720c067f6a569ae215e8a2d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20a13780c6a708fea6bc212705ba13d38756d63a487f908637bb159651f5c070" + end + + depends_on "pkgconf" => :build + depends_on "concurrencykit" + depends_on "ldns" + depends_on "libnghttp2" + depends_on "openssl@3" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"dnsperf", "-h" + system bin/"resperf", "-h" + end +end diff --git a/Formula/d/dnsrobocert.rb b/Formula/d/dnsrobocert.rb new file mode 100644 index 0000000000000..d8a19f78f2882 --- /dev/null +++ b/Formula/d/dnsrobocert.rb @@ -0,0 +1,326 @@ +class Dnsrobocert < Formula + include Language::Python::Virtualenv + + desc "Manage Let's Encrypt SSL certificates based on DNS challenges" + homepage "https://dnsrobocert.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/5f/19/e8d64f9edb462c060c3fc95cae1410d7263fe8d66f80ff4a0253d7201758/dnsrobocert-3.26.1.tar.gz" + sha256 "b4f49ce4ff6db7e845e46597e99d9d464d1ddb15bea3e9dee729643a0092a911" + license "MIT" + revision 2 + head "https://github.com/adferrand/dnsrobocert.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b27b5c88dbe8eb251b879a6d641d7130477bee8149ac85c8c0a6063684d22039" + sha256 cellar: :any, arm64_sequoia: "f3fca402ed2835486c1ad478b73b447a9fc80659182cabe40d4fc11108e0da6a" + sha256 cellar: :any, arm64_sonoma: "ffa1ba2c8f43cc7ed4cfc64a8403c81589da7bfc426ae3b88a6fb0b6e4637af0" + sha256 cellar: :any, sonoma: "5c8151035024c5c1d23a148f24fc3dee751df26f9d1cffefa043543460dd4cd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2caafe336ef5805dbc6eae9ad76ba9112957cca373409bbc0070e29c98ee9aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08bdad42249729b7419bf9e8e69edee2461c919a762aa2123feb18e4df6ca23f" + end + + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["certifi", "cryptography", "rpds-py"] + + resource "acme" do + url "https://files.pythonhosted.org/packages/07/f6/897be0abeb0e64f0e6136a8a6369a54d2a603a44cb7a411f6d77dbafb4ac/acme-5.1.0.tar.gz" + sha256 "7b97820857d9baffed98bca50ab82bb6a636e447865d7a013a7bdd7972f03cda" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/70/02/d3ee174681961dc2ebfe81f326e1b5e1ba338b7ff939e1e94eef76e7c65a/boto3-1.40.51.tar.gz" + sha256 "ed1b7750df07b2f2ece0141ff2ed0489db2ec2b5311a956d00a496b05fd4fadb" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ca/33/9e197d872adf1eadf8ecc259d0f451143326ff044d236b8971ff8bf980ee/botocore-1.40.51.tar.gz" + sha256 "a06de20408c3009e59e8f161a1146f1801d279d0923ab950349154900951bb20" + end + + resource "certbot" do + url "https://files.pythonhosted.org/packages/3d/d7/358779f99a2336010a27e12c9fc99b14602b9a5410f890390fa3be08e598/certbot-5.1.0.tar.gz" + sha256 "d652a598f67af78ecf122860e85cd2e9c19a2bbe79a71775eccf6e8d642a4fca" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "coloredlogs" do + url "https://files.pythonhosted.org/packages/cc/c7/eed8f27100517e8c0e6b923d5f0845d0cb99763da6fdee00478f91db7325/coloredlogs-15.0.1.tar.gz" + sha256 "7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "configparser" do + url "https://files.pythonhosted.org/packages/8b/ac/ea19242153b5e8be412a726a70e82c7b5c1537c83f61b20995b2eda3dcd7/configparser-7.2.0.tar.gz" + sha256 "b629cc8ae916e3afbd36d1b3d093f34193d851e11998920fdcfc4552218b7b70" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "dns-lexicon" do + url "https://files.pythonhosted.org/packages/60/58/055f9552cafeeac094a5e0334fe0eaf4cbf8e1485cc545a26c079ca632f1/dns_lexicon-3.21.1.tar.gz" + sha256 "7cd19f692b384fe5eaa47cce334d24c78ae2eba1d2fb24d2b8a05e04fe294497" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "humanfriendly" do + url "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz" + sha256 "6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "josepy" do + url "https://files.pythonhosted.org/packages/9d/19/4ebe24c42c341c5868dff072b78d503fc1b0725d88ea619d2db68f5624a9/josepy-2.1.0.tar.gz" + sha256 "9beafbaa107ec7128e6c21d86b2bc2aea2f590158e50aca972dca3753046091f" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "localzone" do + url "https://files.pythonhosted.org/packages/f9/1a/2406e73b9dedafc761526687a60a09aaa8b0b2f2268aa084c56cbed81959/localzone-0.9.8.tar.gz" + sha256 "23cb6b55a620868700b3f44e93d7402518e08eb7960935b3352ad3905c964597" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "oci" do + url "https://files.pythonhosted.org/packages/22/bd/59c6ca3a1789d377fdd7845e6ba0fb3de1618e0f900308285028d0b2a6ca/oci-2.9.0.tar.gz" + sha256 "82be4b64456de3b0f7f8051e52d48c0c8b6c499c9c22661b454df459ab7a5632" + end + + resource "parsedatetime" do + url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" + sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" + end + + resource "pem" do + url "https://files.pythonhosted.org/packages/05/86/16c0b6789816f8d53f2f208b5a090c9197da8a6dae4d490554bb1bedbb09/pem-23.1.0.tar.gz" + sha256 "06503ff2441a111f853ce4e8b9eb9d5fedb488ebdbf560115d3dd53a1b4afc73" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "pyotp" do + url "https://files.pythonhosted.org/packages/f3/b2/1d5994ba2acde054a443bd5e2d384175449c7d2b6d1a0614dbca3a63abfc/pyotp-2.9.0.tar.gz" + sha256 "346b6642e0dbdde3b4ff5a930b664ca82abfa116356ed48cc42c7d6590d36f63" + end + + resource "pyrfc3339" do + url "https://files.pythonhosted.org/packages/b4/7f/3c194647ecb80ada6937c38a162ab3edba85a8b6a58fa2919405f4de2509/pyrfc3339-2.1.0.tar.gz" + sha256 "c569a9714faf115cdb20b51e830e798c1f4de8dabb07f6ff25d221b5d09d8d7f" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/72/97/bf44e6c6bd8ddbb99943baf7ba8b1a8485bcd2fe0e55e5708d7fee4ff1ae/requests_file-2.1.0.tar.gz" + sha256 "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "schedule" do + url "https://files.pythonhosted.org/packages/0c/91/b525790063015759f34447d4cf9d2ccb52cdee0f1dd6ff8764e863bcb74c/schedule-1.2.2.tar.gz" + sha256 "15fe9c75fe5fd9b9627f3f19cc0ef1420508f9f9a46f45cd0769ef75ede5f0b7" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "softlayer" do + url "https://files.pythonhosted.org/packages/41/78/3380a217c73cd3e113e97ef7336b18f5f4987fca052e2eabc3f22367420e/softlayer-6.2.7.tar.gz" + sha256 "a0874fa49085d108957e88d1b2eee7832aeb8689dd658f66b01b6d40ef0c87fb" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "tencentcloud-sdk-python" do + url "https://files.pythonhosted.org/packages/96/12/f7bb3284a18567737640ea87b6394f4aed9318a6689a72756b419a6cbf39/tencentcloud-sdk-python-3.0.1475.tar.gz" + sha256 "0a06eebcd61b98e5f6764001c74df416304b47b168dec0b0990142092872dfdf" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "zeep" do + url "https://files.pythonhosted.org/packages/e8/06/4f1d3ff61e930163565fb73616c6251e412a4d2fc7ed18214e1c2107258d/zeep-4.3.2.tar.gz" + sha256 "1a23a667ce9d73a0dbfdf15745bfa2b7ab0b6402135c0cd5067574838398e0e6" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "dnsrobocert.yml does not exist", shell_output("#{bin}/dnsrobocert -o 2>&1") + end +end diff --git a/Formula/d/dnstop.rb b/Formula/d/dnstop.rb new file mode 100644 index 0000000000000..970e83fcde2ec --- /dev/null +++ b/Formula/d/dnstop.rb @@ -0,0 +1,45 @@ +class Dnstop < Formula + desc "Console tool to analyze DNS traffic" + homepage "http://dns.measurement-factory.com/tools/dnstop/index.html" + url "http://dns.measurement-factory.com/tools/dnstop/src/dnstop-20140915.tar.gz" + sha256 "b4b03d02005b16e98d923fa79957ea947e3aa6638bb267403102d12290d0c57a" + license "BSD-3-Clause" + + livecheck do + url "http://dns.measurement-factory.com/tools/dnstop/src/" + regex(/href=.*?dnstop[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "46e3c705bd4c7649ab67f2712d623825f0006cb764e844131a654fe057de19ec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "feab927b414e7fad8995bfb647c2b019bee68c8aa535b5b9cccdd12e048c81fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa31ea8e4f50e891664b89fa0928c25affda0aff9c1aca5d1333e12e052cb413" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a172c0678ce76e45a73491379633aeb893dad579cbbf89047bf2c1c972332327" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7e991cd5c68fcbefb7c45ac7b977b3f9e51a719cae0dbead9aa7172dbfebeb3f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9fba6f2f539b25ef2e918c9600a3027a72188984cad8748f2edd55c59712c414" + sha256 cellar: :any_skip_relocation, sonoma: "3476a73413a818b4fecca690a8e176974bc0cb09858d6e478f4dbd77f56f9f35" + sha256 cellar: :any_skip_relocation, ventura: "4411393ab2b699d8ecc96e791daf89c1fff67e7c10f2d48d19a8f7550da67ec7" + sha256 cellar: :any_skip_relocation, monterey: "717e890e2098e17066d717cdf2c38776838326b4d1f0dfeee6b4e55dbedd607f" + sha256 cellar: :any_skip_relocation, big_sur: "c07eca212e72ce354b9e29575efa61f607a9ba43dc07072247f925d331ce7763" + sha256 cellar: :any_skip_relocation, catalina: "61522feaa64c92d28044e88366555a6f816366671728d71e286960b83a176417" + sha256 cellar: :any_skip_relocation, arm64_linux: "67a05c4b6fd3fd1f3008513be83d42d8d1c93d8b9cea2e747a909a5a9d2bb938" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d8b4de6f9441442ff6c59476101ebf5fbcf6073882c971556fa566afda211bd" + end + + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + bin.install "dnstop" + man8.install "dnstop.8" + end + + test do + system bin/"dnstop", "-v" + end +end diff --git a/Formula/d/dnstracer.rb b/Formula/d/dnstracer.rb new file mode 100644 index 0000000000000..78281fc3fc5fd --- /dev/null +++ b/Formula/d/dnstracer.rb @@ -0,0 +1,73 @@ +class Dnstracer < Formula + desc "Trace a chain of DNS servers to the source" + homepage "http://www.mavetju.org/unix/dnstracer.php" + url "http://www.mavetju.org/download/dnstracer-1.9.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/d/dnstracer/dnstracer_1.9.orig.tar.gz" + sha256 "2ebc08af9693ba2d9fa0628416f2d8319ca1627e41d64553875d605b352afe9c" + license "BSD-2-Clause" + + # It's necessary to check the `/unix/general.php` page, instead of + # `/download/`, until a real 1.10 version exists. The file name for version + # 1.1 on the `/download/` page is given as 1.10 and this is erroneously + # treated as newer than 1.9. + livecheck do + url "http://www.mavetju.org/unix/general.php" + regex(/href=.*?dnstracer[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf4002b2b3c7b6e94bfbd23130cae602e9e7c7d9e3145b7210cbc4fc574b5004" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "154b03978527a24ea93fa486de2f90f51bba19a873cd8fc7760027b7cf9e965d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9f0cef649625b90f8b813401e0cee3b0d26abb2ad5eabdb8b80bea6d93106d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c90d0674735e546310ec3e6052242171258f29faf127138282ea4e396946d737" + sha256 cellar: :any_skip_relocation, arm64_monterey: "07ec9123818d074dcbd378fc46fcf0bf17557f1f4ceccb631aef4669af57373d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dc60fdb473c11615a27f62abb5aba5ae0a270c4b3d33001c07668266254c7486" + sha256 cellar: :any_skip_relocation, sonoma: "d0bda5093f4ee8d73bca5c7609769fb9b5a85509b8ffb3f981b5cadd299b838f" + sha256 cellar: :any_skip_relocation, ventura: "1e163d7856ec1f1d8a420f080ad6d1593c8c0977c1f3d1c22b9c19728abe4094" + sha256 cellar: :any_skip_relocation, monterey: "3d7210cdf69f4ebae90e2a1b65729dce288b4dab03a921d64d521ac9e137dfd1" + sha256 cellar: :any_skip_relocation, big_sur: "c6e0d89127fbc47d2b30cd7d2918279f858a79d87b2e32e63cccfcc4f92f3495" + sha256 cellar: :any_skip_relocation, catalina: "953752b2c3a012b0e92cd6fc78ef47d7b585e9a3034ef667a9ce3d353c4bb1db" + sha256 cellar: :any_skip_relocation, arm64_linux: "396697504e1ed5de305ae93a03540549bde4be87839036df19439584a39dcdfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5a8f70b7d7d09e10e995f908c4b581a9d3f2ea201719e768e7e65c022f8eb7d" + end + + # Fix to error: conflicting types for 'res_9_getlong', 'res_9_getshort' + patch :DATA if DevelopmentTools.clang_build_version >= 1700 + + def install + ENV.append "LDFLAGS", "-lresolv" + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"dnstracer", "-4", "brew.sh" + end +end + +__END__ +diff --git a/dnstracer.c b/dnstracer.c +index 167342a..2a30d53 100644 +--- a/dnstracer.c ++++ b/dnstracer.c +@@ -48,6 +48,13 @@ + #include + #include + #include ++ ++ #ifdef getlong ++ # undef getlong ++ #endif ++ #ifdef getshort ++ # undef getshort ++ #endif + #endif + + #include + diff --git a/Formula/d/dnstwist.rb b/Formula/d/dnstwist.rb new file mode 100644 index 0000000000000..e7131332dd617 --- /dev/null +++ b/Formula/d/dnstwist.rb @@ -0,0 +1,142 @@ +class Dnstwist < Formula + include Language::Python::Virtualenv + + desc "Test domains for typo squatting, phishing and corporate espionage" + homepage "https://github.com/elceef/dnstwist" + url "https://files.pythonhosted.org/packages/e7/0e/88b4c5c7f3077c0d2e8544a14e321fce80b3cf0148a46dec9724e27c61d3/dnstwist-20250130.tar.gz" + sha256 "8b6dd9c42a643a0e8b087903c0e6d75c0f6cebf94920ab0b7760ac2522c6bb42" + license "Apache-2.0" + revision 3 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b8e7358c9feb5a01746e06a1ce99ec68b728ff5880713fdaf4e459fb5b8d34ab" + sha256 cellar: :any, arm64_sequoia: "e434e4e020cbe9d213b3f1a1b890513fd1e18d31b4176698d6d8cc09b477210a" + sha256 cellar: :any, arm64_sonoma: "fe0a12ff6fd8742d9bd593475e21d4780a5f97d175e80f127d8565c45d8c602e" + sha256 cellar: :any, sonoma: "3d3e48c9b30ce39427f90fde8eca68e41c0f6172b49430632c37e49921132009" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bf36ee5516fd98f91b0d3013a5cb23d07a7a5ddf81e89d58ad1089e6ea65679" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91ff3e7b404827f44d95ea765a1a9995fcaaaf75ff147fd61066b964bf3f79e7" + end + + depends_on "certifi" => :no_linkage + depends_on "libmaxminddb" + depends_on "python@3.14" + depends_on "ssdeep" + + uses_from_macos "libffi" + + on_linux do + depends_on "whois" + end + + pypi_packages package_name: "dnstwist[full]", + exclude_packages: "certifi" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "geoip2" do + url "https://files.pythonhosted.org/packages/0f/5f/902835f485d1c423aca9097a0e91925d6a706049f64e678ec781b168734d/geoip2-5.1.0.tar.gz" + sha256 "ee3f87f0ce9325eb6484fe18cbd9771a03d0a2bad1dd156fa3584fafa562d39a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "maxminddb" do + url "https://files.pythonhosted.org/packages/94/9c/5af549744e7a1e986bddd119c0bbca7f7fa7fb72590b554cb860a0c3acb1/maxminddb-2.8.2.tar.gz" + sha256 "26a8e536228d8cc28c5b8f574a571a2704befce3b368ceca593a76d56b6590f9" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "ppdeep" do + url "https://files.pythonhosted.org/packages/f2/74/d328ee495bcf5f98ae2967fdce45e1ca4b73e8f253e24a61e50f7527d5d9/ppdeep-20250625.tar.gz" + sha256 "b7da50e54ed9bd79326382b6f2f51f371816f0495a5233dee23a9469f87a2a78" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "py-tlsh" do + url "https://files.pythonhosted.org/packages/ba/5b/4d860cffd3e6e7afb277e159d97e11583fc3b611d22355799364dff325f1/py-tlsh-4.7.2.tar.gz" + sha256 "5b6943cfd93a168671f33b84828dca34d252278bdedcacf25cbe711fda655e9f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "tld" do + url "https://files.pythonhosted.org/packages/df/a1/5723b07a70c1841a80afc9ac572fdf53488306848d844cd70519391b0d26/tld-0.13.1.tar.gz" + sha256 "75ec00936cbcf564f67361c41713363440b6c4ef0f0c1592b5b0fbe72c17a350" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + ENV["MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB"] = "1" + ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path_if_needed}/usr/include/ffi" if OS.mac? + + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + + (libexec/"bin").install "dnstwist.py" => "dnstwist" + (bin/"dnstwist").write_env_script libexec/"bin/dnstwist", PATH: "#{libexec}/bin:$PATH" + end + + test do + output = shell_output("#{bin}/dnstwist --registered --lsh ssdeep brew.sh 2>&1") + + assert_match "brew.sh", output + assert_match "NS:ns1.dnsimple.com", output + end +end diff --git a/Formula/d/dnsviz.rb b/Formula/d/dnsviz.rb new file mode 100644 index 0000000000000..226a661e33d6a --- /dev/null +++ b/Formula/d/dnsviz.rb @@ -0,0 +1,61 @@ +class Dnsviz < Formula + include Language::Python::Virtualenv + + desc "Tools for analyzing and visualizing DNS and DNSSEC behavior" + homepage "https://github.com/dnsviz/dnsviz/" + url "https://files.pythonhosted.org/packages/59/91/aa152739fea36d4456fbcc71a26333ffef587526d722c10c281ab12a6a35/dnsviz-0.11.1.tar.gz" + sha256 "203b1aa2e3aa09af415a96a0afc98eef4acf845ab8af57bf9f7569bd13161717" + license "GPL-2.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "58f6246102424efbe090d5d19a9ee66094d9b6794cc12d4c321e093171558cfc" + sha256 cellar: :any, arm64_sequoia: "4a27473e4697572460d0e073612a19627a6d5d8bb374989d9c894ff1ee144fe6" + sha256 cellar: :any, arm64_sonoma: "66c3394a50ef771c0b3a1ffbd559a89f98b9d8d10dee5d91a9e9e68c5a0c34e7" + sha256 cellar: :any, sonoma: "7fdd639b7c9e6c9357bac4dcc167fad445a2d57a594b0429e8937d28a97bad1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "4170e714f3e6b25e6e21016ab510bab81d34165aa4942c1db79f9e254bcd3fc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b30d7527b2c27dd84a700afffc2ea95bf978164453e96a48be58bd1d1e10fd9" + end + + depends_on "bind" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "swig" => :build + depends_on "json-c" => :test + depends_on "cryptography" => :no_linkage + depends_on "graphviz" + depends_on "openssl@3" + depends_on "python@3.14" + + pypi_packages extra_packages: ["dnspython", "pygraphviz"] + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "pygraphviz" do + url "https://files.pythonhosted.org/packages/66/ca/823d5c74a73d6b8b08e1f5aea12468ef334f0732c65cbb18df2a7f285c87/pygraphviz-1.14.tar.gz" + sha256 "c10df02377f4e39b00ae17c862f4ee7e5767317f1c6b2dfd04cea6acc7fc2bea" + end + + def install + virtualenv_install_with_resources + end + + test do + resource "example-com-probe-auth" do + url "https://raw.githubusercontent.com/dnsviz/dnsviz/refs/heads/master/tests/zones/unsigned/example.com-probe-auth.json" + sha256 "6d75bf4e6289db41f8da6263aed2e0e8c910b8f303e4f065ec7d359997248997" + end + + resource("example-com-probe-auth").stage do + system bin/"dnsviz", "probe", "-d", "0", + "-r", "example.com-probe-auth.json", + "-o", "example.com.json" + system bin/"dnsviz", "graph", "-r", "example.com.json", "-Thtml", "-o", File::NULL + system bin/"dnsviz", "grok", "-r", "example.com.json", "-o", File::NULL + system bin/"dnsviz", "print", "-r", "example.com.json", "-o", File::NULL + end + end +end diff --git a/Formula/d/dnsx.rb b/Formula/d/dnsx.rb new file mode 100644 index 0000000000000..248e990317e52 --- /dev/null +++ b/Formula/d/dnsx.rb @@ -0,0 +1,32 @@ +class Dnsx < Formula + desc "DNS query and resolution tool" + homepage "https://github.com/projectdiscovery/dnsx" + url "https://github.com/projectdiscovery/dnsx/archive/refs/tags/v1.2.2.tar.gz" + sha256 "fa9ee47996315b0d5b293fcf9263ac46ee69fc691ee024a400ebcd2e48f015e5" + license "MIT" + head "https://github.com/projectdiscovery/dnsx.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3d4a589a196ec79ac31875af9b77b6cbbef8823e58efe67e5ca373400696663" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d813ed83eff13bfb735313c3f83d9623c20725eb1595c07b0e2f1dbefc929f8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe3bf442070686cb1a099ce4cd5e5f96a6f4629aa067c6af56e0e3173b6facff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "417e501ba0b141aef16653a4ff5decdb000095528f6ece7992fc328c453e0a78" + sha256 cellar: :any_skip_relocation, sonoma: "e3ecccf054559abc48f1657926ab611a679487b8b61f9c9f07b89482ff43a560" + sha256 cellar: :any_skip_relocation, ventura: "7b7ac5247f6c526bffa28726658c3853e1fc17cc717e5d6785dd47f0ce3401ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "72e82600dba097d60f52a2c94cadb674adbf65fbdd07461cdcc5c2bbfc706ae4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80a9d8baefa0608d03aa71b6eb94ab58fa6c2261495fcea61b376459d272dbec" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/dnsx" + end + + test do + (testpath/"domains.txt").write "docs.brew.sh" + expected_output = "docs.brew.sh [CNAME] [homebrew.github.io]" + assert_equal expected_output, + shell_output("#{bin}/dnsx -no-color -silent -l #{testpath}/domains.txt -cname -resp").strip + end +end diff --git a/Formula/d/doc8.rb b/Formula/d/doc8.rb new file mode 100644 index 0000000000000..06fe34a83485e --- /dev/null +++ b/Formula/d/doc8.rb @@ -0,0 +1,50 @@ +class Doc8 < Formula + include Language::Python::Virtualenv + + desc "Style checker for Sphinx documentation" + homepage "https://github.com/PyCQA/doc8" + url "https://files.pythonhosted.org/packages/92/91/88bb55225046a2ee9c2243d47346c78d2ed861c769168f451568625ad670/doc8-2.0.0.tar.gz" + sha256 "1267ad32758971fbcf991442417a3935c7bc9e52550e73622e0e56ba55ea1d40" + license "Apache-2.0" + head "https://github.com/PyCQA/doc8.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "8361c80f63f68e55c7c662cb713d4048577b51870a9cbf951f4df1aeb94c5661" + end + + depends_on "python@3.14" + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "restructuredtext-lint" do + url "https://files.pythonhosted.org/packages/48/9c/6d8035cafa2d2d314f34e6cd9313a299de095b26e96f1c7312878f988eec/restructuredtext_lint-1.4.0.tar.gz" + sha256 "1b235c0c922341ab6c530390892eb9e92f90b9b75046063e047cacfb0f050c45" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"broken.rst").write <<~EOS + Heading + ------ + EOS + output = pipe_output("#{bin}/doc8 broken.rst 2>&1") + assert_match "D000 Title underline too short.", output + end +end diff --git a/Formula/d/docbook-xsl.rb b/Formula/d/docbook-xsl.rb new file mode 100644 index 0000000000000..8d7e618b53b65 --- /dev/null +++ b/Formula/d/docbook-xsl.rb @@ -0,0 +1,103 @@ +class DocbookXsl < Formula + desc "XML vocabulary to create presentation-neutral documents" + homepage "https://github.com/docbook/xslt10-stylesheets" + url "https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F1.79.2/docbook-xsl-nons-1.79.2.tar.bz2" + sha256 "ee8b9eca0b7a8f89075832a2da7534bce8c5478fc8fc2676f512d5d87d832102" + # Except as otherwise noted, for example, under some of the /contrib/ + # directories, the DocBook XSLT 1.0 Stylesheets use The MIT License. + license "MIT" + revision 1 + + livecheck do + url :homepage + regex(%r{^(?:release/)?(\d+(?:\.\d+)+)$}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "201ddedf7dcf5ac0d6eb0a2554ff329ee9856ce5f79d95db9c5d6db7703d9b84" + end + + depends_on "docbook" + + resource "ns" do + url "https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F1.79.2/docbook-xsl-1.79.2.tar.bz2" + sha256 "316524ea444e53208a2fb90eeb676af755da96e1417835ba5f5eb719c81fa371" + end + + resource "doc" do + url "https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F1.79.2/docbook-xsl-doc-1.79.2.tar.bz2" + sha256 "9bc38a3015717279a3a0620efb2d4bcace430077241ae2b0da609ba67d8340bc" + end + + # see https://www.linuxfromscratch.org/blfs/view/9.1/pst/docbook-xsl.html for this patch + patch do + url "https://www.linuxfromscratch.org/patches/blfs/9.1/docbook-xsl-nons-1.79.2-stack_fix-1.patch" + mirror "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/docbook-xsl/docbook-xsl-nons-1.79.2-stack_fix-1.patch" + sha256 "a92c39715c54949ba9369add1809527b8f155b7e2a2b2e30cb4b39ee715f2e30" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + doc_files = %w[AUTHORS BUGS COPYING NEWS README RELEASE-NOTES.txt TODO VERSION VERSION.xsl] + xsl_files = %w[assembly catalog.xml common docsrc eclipse epub epub3 extensions + fo highlighting html htmlhelp images javahelp lib log manpages + params profiling roundtrip slides template tests tools webhelp + website xhtml xhtml-1_1 xhtml5] + touch "log" + (prefix/"docbook-xsl").install xsl_files + doc_files + resource("ns").stage do + touch "log" + (prefix/"docbook-xsl-ns").install xsl_files + doc_files + end + resource("doc").stage do + doc.install "doc" => "reference" + end + + bin.write_exec_script "#{prefix}/docbook-xsl/epub/bin/dbtoepub" + end + + def post_install + etc_catalog = etc/"xml/catalog" + ENV["XML_CATALOG_FILES"] = etc_catalog + + { + "xsl" => "xsl-nons", + "xsl-ns" => "xsl", + }.each do |old_name, new_name| + loc = "file://#{opt_prefix}/docbook-#{old_name}" + + # add/replace catalog entries + cat_loc = "#{loc}/catalog.xml" + system "xmlcatalog", "--noout", "--del", cat_loc, etc_catalog + system "xmlcatalog", "--noout", "--add", "nextCatalog", "", cat_loc, etc_catalog + + # add rewrites for the new and old catalog URLs + rewrites = ["rewriteSystem", "rewriteURI"] + [ + "https://cdn.docbook.org/release/#{new_name}", + "http://docbook.sourceforge.net/release/#{old_name}", + ].each do |url_prefix| + [version.to_s, "current"].each do |ver| + system "xmlcatalog", "--noout", "--del", "#{url_prefix}/#{ver}", etc_catalog + rewrites.each do |rewrite| + system "xmlcatalog", "--noout", "--add", rewrite, "#{url_prefix}/#{ver}", loc, etc_catalog + end + end + end + end + end + + test do + system "xmlcatalog", "#{etc}/xml/catalog", "https://cdn.docbook.org/release/xsl-nons/current/" + system "xmlcatalog", "#{etc}/xml/catalog", "https://cdn.docbook.org/release/xsl-nons/#{version}/" + system "xmlcatalog", "#{etc}/xml/catalog", "https://cdn.docbook.org/release/xsl/current/" + system "xmlcatalog", "#{etc}/xml/catalog", "https://cdn.docbook.org/release/xsl/#{version}/" + system "xmlcatalog", "#{etc}/xml/catalog", "http://docbook.sourceforge.net/release/xsl/current/" + system "xmlcatalog", "#{etc}/xml/catalog", "http://docbook.sourceforge.net/release/xsl/#{version}/" + system "xmlcatalog", "#{etc}/xml/catalog", "http://docbook.sourceforge.net/release/xsl-ns/current/" + system "xmlcatalog", "#{etc}/xml/catalog", "http://docbook.sourceforge.net/release/xsl-ns/#{version}/" + end +end diff --git a/Formula/d/docbook.rb b/Formula/d/docbook.rb new file mode 100644 index 0000000000000..c53075360854f --- /dev/null +++ b/Formula/d/docbook.rb @@ -0,0 +1,111 @@ +class Docbook < Formula + desc "Standard XML representation system for technical documents" + homepage "https://docbook.org/" + url "https://docbook.org/xml/5.1/docbook-v5.1-os.zip" + sha256 "b3f3413654003c1e773360d7fc60ebb8abd0e8c9af8e7d6c4b55f124f34d1e7f" + license :cannot_represent + revision 1 + + livecheck do + url "https://docbook.org/xml/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ca237485ebe0b9ab1fc84d87b01b2f322fb285b085133ef727857818283d6d43" + end + + uses_from_macos "libxml2" + + resource "xml412" do + url "https://docbook.org/xml/4.1.2/docbkx412.zip" + version "4.1.2" + sha256 "30f0644064e0ea71751438251940b1431f46acada814a062870f486c772e7772" + end + + resource "xml42" do + url "https://docbook.org/xml/4.2/docbook-xml-4.2.zip" + sha256 "acc4601e4f97a196076b7e64b368d9248b07c7abf26b34a02cca40eeebe60fa2" + end + + resource "xml43" do + url "https://docbook.org/xml/4.3/docbook-xml-4.3.zip" + sha256 "23068a94ea6fd484b004c5a73ec36a66aa47ea8f0d6b62cc1695931f5c143464" + end + + resource "xml44" do + url "https://docbook.org/xml/4.4/docbook-xml-4.4.zip" + sha256 "02f159eb88c4254d95e831c51c144b1863b216d909b5ff45743a1ce6f5273090" + end + + resource "xml45" do + url "https://docbook.org/xml/4.5/docbook-xml-4.5.zip" + sha256 "4e4e037a2b83c98c6c94818390d4bdd3f6e10f6ec62dd79188594e26190dc7b4" + end + + resource "xml50" do + url "https://docbook.org/xml/5.0/docbook-5.0.zip" + sha256 "3dcd65e1f5d9c0c891b3be204fa2bb418ce485d32310e1ca052e81d36623208e" + end + + resource "xml51" do + url "https://docbook.org/xml/5.1/docbook-v5.1-os.zip" + sha256 "b3f3413654003c1e773360d7fc60ebb8abd0e8c9af8e7d6c4b55f124f34d1e7f" + end + + def install + (etc/"xml").mkpath + + %w[42 412 43 44 45 50 51].each do |version| + resource("xml#{version}").stage do |r| + if version == "412" + cp prefix/"docbook/xml/4.2/catalog.xml", "catalog.xml" + + inreplace "catalog.xml" do |s| + s.gsub! "V4.2 ..", "V4.1.2 " + s.gsub! "4.2", "4.1.2" + end + end + + (prefix/"docbook/xml"/r.version).install Dir["*"] + end + end + end + + def post_install + etc_catalog = etc/"xml/catalog" + ENV["XML_CATALOG_FILES"] = etc_catalog + + # We use `/usr/bin/xmlcatalog` on macOS, but libxml2's `xmlcatalog` on Linux. + xmlcatalog = DevelopmentTools.locate("xmlcatalog") + + # only create catalog file if it doesn't exist already to avoid content added + # by other formulae to be removed + system xmlcatalog, "--noout", "--create", etc_catalog unless etc_catalog.file? + + %w[4.2 4.1.2 4.3 4.4 4.5 5.0 5.1].each do |version| + catalog = opt_prefix/"docbook/xml/#{version}/catalog.xml" + + system xmlcatalog, "--noout", "--del", + "file://#{catalog}", etc_catalog + system xmlcatalog, "--noout", "--add", "nextCatalog", + "", "file://#{catalog}", etc_catalog + end + end + + def caveats + <<~EOS + To use the DocBook package in your XML toolchain, + you need to add the following to your ~/.bashrc: + + export XML_CATALOG_FILES="#{etc}/xml/catalog" + EOS + end + + test do + assert_path_exists etc/"xml/catalog" + end +end diff --git a/Formula/d/docbook2x.rb b/Formula/d/docbook2x.rb new file mode 100644 index 0000000000000..911e0c049f8ee --- /dev/null +++ b/Formula/d/docbook2x.rb @@ -0,0 +1,97 @@ +class Docbook2x < Formula + desc "Convert DocBook to UNIX manpages and GNU TeXinfo" + homepage "https://docbook2x.sourceforge.net/" + url "https://downloads.sourceforge.net/project/docbook2x/docbook2x/0.8.8/docbook2X-0.8.8.tar.gz" + sha256 "4077757d367a9d1b1427e8d5dfc3c49d993e90deabc6df23d05cfe9cd2fcdc45" + license all_of: ["MIT", "DocBook-XML"] + + livecheck do + url :stable + regex(%r{url=.*?/docbook2X[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "87b0d72f55d9ff922befd55d7e708a23804d99c0ae1fab7e57c7694a6f91e833" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6515ef361ee9ad2b83b539b46bb8869a09e98819fdb23277340e0557be168635" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4f01a96cb46dee789a5d363b8c5b169f25d1698b93b7c81d82cc99ce434fdf5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "986216ef87f311cd1a823db850f45fd8228be0f0f1db35cf875d2cf57d29cec4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c3012b908f1a415b3ff679474eb15f97842b96eb61a03ba8d4c68f83c0a9dfba" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "88732999a070c6a9f609c5740fcdf7ed6c014be05555a9aea867e1a69b71aeec" + sha256 cellar: :any_skip_relocation, sonoma: "2e3b1eef0115ce1a466629c07698dcc11bb3ba5521306ad8e8e166e7cc141473" + sha256 cellar: :any_skip_relocation, ventura: "3d7054d71c1423f9b206092c71fcf6c63dec19a55c4600cf6d941fcbba9d1e9a" + sha256 cellar: :any_skip_relocation, monterey: "3c4bec297dbc2c767f605b1f769bdc1f8b7401f38f267e90365f592902db5ebf" + sha256 cellar: :any_skip_relocation, big_sur: "9a9d1f18cb66569bdebd729119d64719a8e4990ceab99a10a395d61eea3217ae" + sha256 cellar: :any_skip_relocation, catalina: "a7562a999301c0879be6f39bd031bb886e68ca56c8aca08b1977eaf1e2927496" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e923a7ee931f5342768cc3c60503b9cf1e8c58bbc177225b0132f564deb175c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e054b07a0d7e8817a58b2c656e8f435289cd1d2110d7fae083e1bf79eece522" + end + + depends_on "docbook" + + uses_from_macos "expat" + uses_from_macos "libxslt" + uses_from_macos "perl" + + on_linux do + resource "XML::NamespaceSupport" do + url "https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.12.tar.gz" + sha256 "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef" + end + resource "XML::Parser" do + url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz" + sha256 "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216" + end + resource "XML::SAX::Exception" do + url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-Base-1.09.tar.gz" + sha256 "66cb355ba4ef47c10ca738bd35999723644386ac853abbeb5132841f5e8a2ad0" + end + resource "XML::SAX::ParserFactory" do + url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-1.02.tar.gz" + sha256 "4506c387043aa6a77b455f00f57409f3720aa7e553495ab2535263b4ed1ea12a" + end + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + resources.each do |res| + res.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}" + system "make", "install" + end + end + end + + inreplace "perl/db2x_xsltproc.pl", "http://docbook2x.sf.net/latest/xslt", "#{share}/docbook2X/xslt" + inreplace "configure", "${prefix}", prefix + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + + bin.env_script_all_files libexec/"bin", PERL5LIB: ENV["PERL5LIB"] if OS.linux? + end + + test do + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + (testpath/"brew.1.xml").write <<~XML + + + + + brew + 1 + + + brew + The missing package manager for macOS + + + XML + system bin/"docbook2man", testpath/"brew.1.xml" + assert_path_exists testpath/"brew.1", "Failed to create man page!" + end +end diff --git a/Formula/d/docfx.rb b/Formula/d/docfx.rb new file mode 100644 index 0000000000000..6d26982d87265 --- /dev/null +++ b/Formula/d/docfx.rb @@ -0,0 +1,58 @@ +class Docfx < Formula + desc "Tools for building and publishing API documentation for .NET projects" + homepage "https://dotnet.github.io/docfx/" + url "https://github.com/dotnet/docfx/archive/refs/tags/v2.78.4.tar.gz" + sha256 "255f71f4a6fc7b9ffd0c598d0eba11630dc01262f1fa45ec4f1794508f7033cf" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e2aa098788350e0ade470448132aaea0606cd12696fc3067c379f0d2a8c1ed8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c44b39e9d561d333cb41db6d268bba9d7f77ac6db339fce1c7af42c8412404d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "618cc85be0dae390ec7bb4b28c7e4aeb14037e35dd6cf5233de5ee70e01a750a" + sha256 cellar: :any_skip_relocation, arm64_linux: "03bd4f3996e6a3b9ba86d77ecc8edec829ff967c9c633b88e5ac82ee28e097c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c36e01983226081a6660535b0314e43930cb49af39a2280bed57b5a19fac3da1" + end + + depends_on "node" => :build + depends_on "dotnet" + + def install + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "1" + + dotnet = Formula["dotnet"] + + # specify the target framework to only target the currently used version of + # .NET, otherwise additional frameworks will be added due to this running + # inside of GitHub Actions, for details see: + # https://github.com/dotnet/docfx/blob/main/Directory.Build.props#L3-L5 + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --output #{libexec} + --no-self-contained + --use-current-runtime + -p:Version=#{version} + -p:TargetFrameworks=net#{dotnet.version.major_minor} + ] + + cd "templates" do + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "build" + end + system "dotnet", "publish", "src/docfx", *args + + (bin/"docfx").write_env_script libexec/"docfx", + DOTNET_ROOT: "${DOTNET_ROOT:-#{dotnet.opt_libexec}}" + end + + test do + system bin/"docfx", "init", "--yes", "--output", testpath/"docfx_project" + assert_path_exists testpath/"docfx_project/docfx.json", "Failed to generate project" + assert_match "modern", shell_output("#{bin}/docfx template list") + end +end diff --git a/Formula/d/dockcheck.rb b/Formula/d/dockcheck.rb new file mode 100644 index 0000000000000..c13dbccb51448 --- /dev/null +++ b/Formula/d/dockcheck.rb @@ -0,0 +1,26 @@ +class Dockcheck < Formula + desc "CLI tool to automate docker image updates" + homepage "https://github.com/mag37/dockcheck" + url "https://github.com/mag37/dockcheck/archive/refs/tags/v0.7.4.tar.gz" + sha256 "4955d2db666d2c85ac23e250a72bf1425a203bf7519a6f499924911c4ca60579" + license "GPL-3.0-only" + head "https://github.com/mag37/dockcheck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a8148932c3cea54efaaf09836bb67bc9689f03fa3b036fa5a7f0e9a9cda520c4" + end + + depends_on "jq" + depends_on "regclient" + + def install + bin.install "dockcheck.sh" => "dockcheck" + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockcheck -v") + + output = shell_output("#{bin}/dockcheck 2>&1", 1) + assert_match "user does not have permissions to the docker socket", output + end +end diff --git a/Formula/d/docker-buildx.rb b/Formula/d/docker-buildx.rb new file mode 100644 index 0000000000000..5a7704b1588c8 --- /dev/null +++ b/Formula/d/docker-buildx.rb @@ -0,0 +1,50 @@ +class DockerBuildx < Formula + desc "Docker CLI plugin for extended build capabilities with BuildKit" + homepage "https://docs.docker.com/buildx/working-with-buildx/" + url "https://github.com/docker/buildx/archive/refs/tags/v0.29.1.tar.gz" + sha256 "20f62461257d3f20ac98c6e6d3f22ca676710644d9e4688c2e4c082bfba9b619" + license "Apache-2.0" + head "https://github.com/docker/buildx.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "282781e5d5f4b8152ea8996ebabe22b750ff7eaa6ab1d8f2e7f849ecfe1a2f38" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "282781e5d5f4b8152ea8996ebabe22b750ff7eaa6ab1d8f2e7f849ecfe1a2f38" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "282781e5d5f4b8152ea8996ebabe22b750ff7eaa6ab1d8f2e7f849ecfe1a2f38" + sha256 cellar: :any_skip_relocation, sonoma: "549cd90392f7a784fc3f55e2df744cf03814d3f618e61f3d9fb03cc5f92e8fac" + sha256 cellar: :any_skip_relocation, arm64_linux: "649cfa5586cec3c2bba7d67e277f26e7747c9dcddb677eb80f2f40ec7c4f9a3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9142ccfa5d29b2641467b59c6a23db9afddfe6a530251dd5a508c9f65be681d7" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[ + -s -w + -X github.com/docker/buildx/version.Version=v#{version} + -X github.com/docker/buildx/version.Revision=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/buildx" + + (lib/"docker/cli-plugins").install_symlink bin/"docker-buildx" + doc.install buildpath.glob("docs/reference/*.md") + + generate_completions_from_executable(bin/"docker-buildx", "completion") + end + + def caveats + <<~EOS + docker-buildx is a Docker plugin. For Docker to find the plugin, add "cliPluginsExtraDirs" to ~/.docker/config.json: + "cliPluginsExtraDirs": [ + "#{HOMEBREW_PREFIX}/lib/docker/cli-plugins" + ] + EOS + end + + test do + assert_match "github.com/docker/buildx v#{version}", shell_output("#{bin}/docker-buildx version") + output = shell_output("#{bin}/docker-buildx build . 2>&1", 1) + assert_match(/(denied while trying to|Cannot) connect to the Docker daemon/, output) + end +end diff --git a/Formula/d/docker-clean.rb b/Formula/d/docker-clean.rb new file mode 100644 index 0000000000000..7f89415aed50a --- /dev/null +++ b/Formula/d/docker-clean.rb @@ -0,0 +1,22 @@ +class DockerClean < Formula + desc "Clean Docker containers, images, networks, and volumes" + homepage "https://github.com/ZZROTDesign/docker-clean" + url "https://github.com/ZZROTDesign/docker-clean/archive/refs/tags/v2.0.4.tar.gz" + sha256 "4b636fd7391358b60c05b65ba7e89d27eaf8dd56cc516f3c786b59cadac52740" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8534cd2757101cb7ea6fc68d2175147769009a5b6bbab15d87bd5b83f46a06d6" + end + + def install + bin.install "docker-clean" + end + + test do + system bin/"docker-clean", "--help" + end +end diff --git a/Formula/d/docker-completion.rb b/Formula/d/docker-completion.rb new file mode 100644 index 0000000000000..b1d2ab538c9cd --- /dev/null +++ b/Formula/d/docker-completion.rb @@ -0,0 +1,34 @@ +class DockerCompletion < Formula + desc "Bash, Zsh and Fish completion for Docker" + homepage "https://www.docker.com/" + url "https://github.com/docker/cli/archive/refs/tags/v28.5.1.tar.gz" + sha256 "3872f03dd3d1e2769ecad57c8744743e72ad619f72f1897f4886fd44746337cd" + license "Apache-2.0" + head "https://github.com/docker/cli.git", branch: "master" + + livecheck do + formula "docker" + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "603e2df56e15c43c7802a8b6873e69f2ac6e3ef74a6c1bcceff51708e95a547c" + end + + conflicts_with cask: "docker-desktop" + + # These used to also be provided by the `docker` formula. + link_overwrite "etc/bash_completion.d/docker" + link_overwrite "share/fish/vendor_completions.d/docker.fish" + link_overwrite "share/zsh/site-functions/_docker" + + def install + bash_completion.install "contrib/completion/bash/docker" + fish_completion.install "contrib/completion/fish/docker.fish" + zsh_completion.install "contrib/completion/zsh/_docker" + end + + test do + assert_match "-F _docker", + shell_output("bash -c 'source #{bash_completion}/docker && complete -p docker'") + end +end diff --git a/Formula/d/docker-compose-langserver.rb b/Formula/d/docker-compose-langserver.rb new file mode 100644 index 0000000000000..233c380fa0d09 --- /dev/null +++ b/Formula/d/docker-compose-langserver.rb @@ -0,0 +1,40 @@ +class DockerComposeLangserver < Formula + desc "Language service for Docker Compose documents" + homepage "https://github.com/microsoft/compose-language-service" + url "https://registry.npmjs.org/@microsoft/compose-language-service/-/compose-language-service-0.4.0.tgz" + sha256 "09164b4226078de49324440411d224a89748f1b894d0989c7c11d9bd45d53215" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "814fa058293c0082d48d3e5e2da3ef5f89a0bbe87cb1ada2833d132c3267b202" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"docker-compose-langserver", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 1 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/d/docker-compose.rb b/Formula/d/docker-compose.rb new file mode 100644 index 0000000000000..3cca28f2ef23e --- /dev/null +++ b/Formula/d/docker-compose.rb @@ -0,0 +1,54 @@ +class DockerCompose < Formula + desc "Isolated development environments using Docker" + homepage "https://docs.docker.com/compose/" + url "https://github.com/docker/compose/archive/refs/tags/v2.40.3.tar.gz" + sha256 "5ee988a7d9e00ffa2d166a50f4cda0e13622f2220f1ffa6aff353f33cf40e37e" + license "Apache-2.0" + head "https://github.com/docker/compose.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c9017800aea3aa49b70c81d2f08d07335230cb0b83063399729d5dc6ffff3f00" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3a36647584ffa366fe33f2324141bdbff61ae0e06f110f3a19d73eb58eb0038" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2dea1febb33e0321aefd77cf61330ebb5281347c644fa2a019d4c0ce2f2ae3f0" + sha256 cellar: :any_skip_relocation, sonoma: "37041bf182286e9a019f7bcab31108b2383d9e0f8e1b2bfe476d2e9d5e030917" + sha256 cellar: :any_skip_relocation, arm64_linux: "0910ffe609f50d5e6d391c9f780a1f70391c0a6099b4cdcc8e4bf5ce7dd6cc03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd2e5c1b224cb9696bfd1655bca04e15efda00369a5f6f40b15bb32e998abf18" + end + + depends_on "go" => :build + + conflicts_with cask: "docker-desktop" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[ + -s -w + -X github.com/docker/compose/v2/internal.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd" + + (lib/"docker/cli-plugins").install_symlink bin/"docker-compose" + end + + def caveats + <<~EOS + Compose is a Docker plugin. For Docker to find the plugin, add "cliPluginsExtraDirs" to ~/.docker/config.json: + "cliPluginsExtraDirs": [ + "#{HOMEBREW_PREFIX}/lib/docker/cli-plugins" + ] + EOS + end + + test do + output = shell_output("#{bin}/docker-compose up 2>&1", 1) + assert_match "no configuration file provided", output + end +end diff --git a/Formula/d/docker-credential-helper-ecr.rb b/Formula/d/docker-credential-helper-ecr.rb new file mode 100644 index 0000000000000..7a7a8191874c3 --- /dev/null +++ b/Formula/d/docker-credential-helper-ecr.rb @@ -0,0 +1,39 @@ +class DockerCredentialHelperEcr < Formula + desc "Docker Credential Helper for Amazon ECR" + homepage "https://github.com/awslabs/amazon-ecr-credential-helper" + url "https://github.com/awslabs/amazon-ecr-credential-helper/archive/refs/tags/v0.10.1.tar.gz" + sha256 "872f612d8ff2ec294024c58b5ca452bebcd9eeceb29e105e159e5579ec6056b2" + license "Apache-2.0" + head "https://github.com/awslabs/amazon-ecr-credential-helper.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "484acd0acaafa346f4a3f6f7b544e813f996a00a18b9b9226c68bba64062528d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "310ebe1f0703c4029bc2d6ba98e6d687097027a27fdecaad0d5b499a73a720ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "310ebe1f0703c4029bc2d6ba98e6d687097027a27fdecaad0d5b499a73a720ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "310ebe1f0703c4029bc2d6ba98e6d687097027a27fdecaad0d5b499a73a720ba" + sha256 cellar: :any_skip_relocation, sonoma: "e3779569bb4207c50dc2cdbdfa61636241e9bcf04186d99667b2301b6150f90c" + sha256 cellar: :any_skip_relocation, ventura: "e3779569bb4207c50dc2cdbdfa61636241e9bcf04186d99667b2301b6150f90c" + sha256 cellar: :any_skip_relocation, arm64_linux: "af285a04fc0326dae93ad0fa43640e914b3fb360d148d0f5def253d272815bcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76d8cac37394c8753de28ee0befb678fb8a3cd2e2cbbd4dfaac0d46b05b52e54" + end + + depends_on "go" => :build + + conflicts_with cask: "docker-desktop" + + def install + (buildpath/"GITCOMMIT_SHA").write tap.user + system "make", "build" + bin.install "bin/local/docker-credential-ecr-login" + end + + test do + output = shell_output("#{bin}/docker-credential-ecr-login", 1) + assert_match(/^Usage: .*docker-credential-ecr-login/, output) + end +end diff --git a/Formula/d/docker-credential-helper.rb b/Formula/d/docker-credential-helper.rb new file mode 100644 index 0000000000000..b05b70798af0a --- /dev/null +++ b/Formula/d/docker-credential-helper.rb @@ -0,0 +1,50 @@ +class DockerCredentialHelper < Formula + desc "Platform keystore credential helper for Docker" + homepage "https://github.com/docker/docker-credential-helpers" + url "https://github.com/docker/docker-credential-helpers/archive/refs/tags/v0.9.4.tar.gz" + sha256 "6cb45cdd1e7f964fb15bc260f55238d90eb365d1d3d4cb7f41418637a9316a6d" + license "MIT" + head "https://github.com/docker/docker-credential-helpers.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b95477e4ef5163a38e72ca7b622c5b3f5f2cb5eb38b7c99b8950f16e55e936e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ff0a53237392b5a24e0727d8c45a041210cc745b61e09a530ad637a4741ecc46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0c869867e03018a03b4a7dcd8a68a85ad24c05ee5cc739f8631534865393dbe" + sha256 cellar: :any_skip_relocation, sonoma: "da785d8c64ad263cccb3378927b3bf4f1e059f17e95407a0fc5eb31c77da3510" + sha256 cellar: :any_skip_relocation, arm64_linux: "b796438e486677e81ecc9cb60ad572ee4ba24c21bd0f9d81579b0d961345a3c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "009a3b5b8130a1e8de00518ccf96ba57b1445a710308dd41aeffd283e6d14308" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "glib" + depends_on "libsecret" + end + + def install + if OS.mac? + system "make", "osxkeychain" + bin.install "bin/build/docker-credential-osxkeychain" + else + system "make", "pass" + system "make", "secretservice" + bin.install "bin/build/docker-credential-pass" + bin.install "bin/build/docker-credential-secretservice" + end + end + + test do + if OS.mac? + run_output = shell_output("#{bin}/docker-credential-osxkeychain", 1) + assert_match "Usage: docker-credential-osxkeychain", run_output + else + run_output = shell_output("#{bin}/docker-credential-pass list") + assert_match "{}", run_output + + run_output = shell_output("#{bin}/docker-credential-secretservice list", 1) + assert_match "Cannot autolaunch D-Bus without X11", run_output + end + end +end diff --git a/Formula/d/docker-debug.rb b/Formula/d/docker-debug.rb new file mode 100644 index 0000000000000..e4752ae1c7ac0 --- /dev/null +++ b/Formula/d/docker-debug.rb @@ -0,0 +1,42 @@ +class DockerDebug < Formula + desc "Use new container attach on already container go on debug" + homepage "https://github.com/zeromake/docker-debug" + url "https://github.com/zeromake/docker-debug/archive/refs/tags/v0.7.11.tar.gz" + sha256 "f872f649db05f3670650dd7aa3507b0658eb29557d0d2685658ab581b2919101" + license "MIT" + head "https://github.com/zeromake/docker-debug.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "afbd63cd10a73b068298aacc91fdfb51e91dee353432f710abe981017804c1af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "afbd63cd10a73b068298aacc91fdfb51e91dee353432f710abe981017804c1af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "afbd63cd10a73b068298aacc91fdfb51e91dee353432f710abe981017804c1af" + sha256 cellar: :any_skip_relocation, sonoma: "5f06227dd443be8e30c2c64d16c91fd47ab053fbab87ad0c44eb9637fe84d1e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "4339ab5462b42fc79c1504e6e55b8773a40facbfb0619d4d88ef562f37dc4ba9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd5b63ab3c20097b3b4cffe0f6e9b5f163f13dad10da58c26b02516fcf68b46e" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[ + -s -w + -X github.com/zeromake/docker-debug/version.Version=#{version} + -X github.com/zeromake/docker-debug/version.GitCommit=#{tap.user} + -X github.com/zeromake/docker-debug/version.BuildTime=#{time.iso8601} + -X github.com/zeromake/docker-debug/version.PlatformName=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/docker-debug" + + generate_completions_from_executable(bin/"docker-debug", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/docker-debug info") + + system bin/"docker-debug", "init" + assert_match 'mount_dir = "/mnt/container"', (testpath/".docker-debug/config.toml").read + + assert_match '"TLS": false', shell_output("#{bin}/docker-debug config") + end +end diff --git a/Formula/d/docker-gen.rb b/Formula/d/docker-gen.rb new file mode 100644 index 0000000000000..b1ce6f7bfd99e --- /dev/null +++ b/Formula/d/docker-gen.rb @@ -0,0 +1,28 @@ +class DockerGen < Formula + desc "Generate files from docker container metadata" + homepage "https://github.com/nginx-proxy/docker-gen" + url "https://github.com/nginx-proxy/docker-gen/archive/refs/tags/0.16.0.tar.gz" + sha256 "37484452798c719696fd7af607d529479d07a049a678423fb15a8c45f30bf240" + license "MIT" + head "https://github.com/nginx-proxy/docker-gen.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d0db9ff20977cfe01cb66396602550bc37dc58ff5d41213fe0d9fd2860c326fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0db9ff20977cfe01cb66396602550bc37dc58ff5d41213fe0d9fd2860c326fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0db9ff20977cfe01cb66396602550bc37dc58ff5d41213fe0d9fd2860c326fa" + sha256 cellar: :any_skip_relocation, sonoma: "5924c95a9a2d02b0199cfd81ee8f2ba62596c3276a562ada1703ff639f2288c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "69a70f7ed42d3cb3333b8aa756d3797dfc5bb100353f0d0976dd646ae4daa2df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb51cb44310bf06a78c99a51ca2b35b8ef2a2dc3806908e86d1c74f648cdf6d9" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.buildVersion=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/docker-gen" + end + + test do + assert_match version.to_s, shell_output("#{bin}/docker-gen --version") + end +end diff --git a/Formula/d/docker-ls.rb b/Formula/d/docker-ls.rb new file mode 100644 index 0000000000000..cf43518aa9801 --- /dev/null +++ b/Formula/d/docker-ls.rb @@ -0,0 +1,48 @@ +class DockerLs < Formula + desc "Tools for browsing and manipulating docker registries" + homepage "https://github.com/mayflower/docker-ls" + url "https://github.com/mayflower/docker-ls.git", + tag: "v0.5.1", + revision: "ae0856513066feff2ee6269efa5d665145709d2e" + license "MIT" + head "https://github.com/mayflower/docker-ls.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9b2cf84ec38d48c0c0137b1a0f61231d5d91a2cddf0b355680ca6d186857333" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5a6ebec1d000be676a4cd9e57ee15c4fb7e42a70aa7e03e32d83cfea4afdf4f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06347d89230140c033d404a279c49dd2d344dec5acb83b918ea6179e1a03f0d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "061380ab4b800dd7c9963eff07bf88387b1e7816ebd40c41145fc5492ca89868" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e8c823d66ba70fe7788f5cf389c71537d3c64776194dfde5b23eec60903f8083" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "146371ff787d25857ec030cb07025e9e7e062b4fba43eb59136aad8ceca57790" + sha256 cellar: :any_skip_relocation, sonoma: "72ee993efbc61975cadb2bd63a6c32630312083c43cfc821ea3567535f271f52" + sha256 cellar: :any_skip_relocation, ventura: "6a504107a216b56ac9b5b9b3f435c791c4dbb56440ca9a39bcf94d285665c580" + sha256 cellar: :any_skip_relocation, monterey: "cbd941bf6005f92598ee1c00165c5eb7101fac547fe0c1d2b84a55a999d940a8" + sha256 cellar: :any_skip_relocation, big_sur: "69d17d15d79bfa1813ad39ae3a0250ddd919a36b4d3923412cfbc17be56316dc" + sha256 cellar: :any_skip_relocation, catalina: "47231e20bcc919d92de35c537c87c54f52bbcdaa85cf2bb9b27bc03a69f25587" + sha256 cellar: :any_skip_relocation, arm64_linux: "bec67bae5b9d59fc6386b0f7ef9e60cfa57cc06758befd8348b54fd2f83f7f64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0002977a8ff7a2a2607098a743ec898e1aec0efee43095c06b56b873fbfcda15" + end + + depends_on "go" => :build + + def install + system "go", "generate", "./lib" + + %w[docker-ls docker-rm].each do |name| + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/name), "./cli/#{name}" + end + end + + test do + assert_match(/\Wlatest\W/m, pipe_output("#{bin}/docker-ls tags \ + -r https://index.docker.io -u '' -p '' \ + --progress-indicator=false library/busybox + ")) + + assert_match "401", pipe_output("#{bin}/docker-rm \ + -r https://index.docker.io -u foo -p bar library/busybox:latest 2<&1 + ") + end +end diff --git a/Formula/d/docker-machine-driver-vmware.rb b/Formula/d/docker-machine-driver-vmware.rb new file mode 100644 index 0000000000000..0085162771585 --- /dev/null +++ b/Formula/d/docker-machine-driver-vmware.rb @@ -0,0 +1,41 @@ +class DockerMachineDriverVmware < Formula + desc "VMware Fusion & Workstation docker-machine driver" + homepage "https://www.vmware.com/products/personal-desktop-virtualization.html" + url "https://github.com/machine-drivers/docker-machine-driver-vmware.git", + tag: "v0.1.5", + revision: "faa4b93573820340d44333ffab35e2beee3f984a" + license "Apache-2.0" + head "https://github.com/machine-drivers/docker-machine-driver-vmware.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "01fa7c87d4ba3e58db8cbc31e7b7f89d0a46d500d3e8d88431cd90f31e501ee8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3010bd538c1539f9c59681820e3c316c709c25af6f27a1832afa982cfc026646" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81805da1dba151839c89b920d7c8690adfc56d57b37dd6c83a599b2d29d2d292" + sha256 cellar: :any_skip_relocation, arm64_ventura: "780fd9e178b5d74e3e0d8e9682460c01d22f53bf291bff09270ef600b758c4ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8435fdd294f5ada321d652dec3eba0a01811576074e9d169b96d4bedcb31c630" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "51441771e510e3263cfddbefe03c1306bd971624e35d5a44a3a8acb37be141c6" + sha256 cellar: :any_skip_relocation, sonoma: "3d14214a8054e0c62a52853e889663be19897ef55d7a3fb9f5e7203ec309f7ce" + sha256 cellar: :any_skip_relocation, ventura: "e88d45b53c2fa8ca55a55f4e5bf0f793da4e8cbc0be4cd3109cb232a858586a1" + sha256 cellar: :any_skip_relocation, monterey: "ffa978d59f3f647229527029ab3a3a88fdd3bed7d7000214969acf218fc1d084" + sha256 cellar: :any_skip_relocation, big_sur: "a4cc3a076070538c9bacec55e70ed2fd454f860c5c3c9a5f3f1986abb8c7be88" + sha256 cellar: :any_skip_relocation, catalina: "29427b8c6e0c23160406ffbd642c5838cf6e2d2e73de30c688630ae60f57f47d" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c76b201cac7373f70ffcd396af6f46fb90c49f5a103e9d6e44ddf50ada228e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2699119a539f3b9b7c86f900d5510d5b4cdb952ebdc60b7f5c12bf80f5d4932" + end + + depends_on "go" => :build + depends_on "docker-machine" + + def install + system "go", "build", *std_go_args(ldflags: "-X main.version=#{version}") + end + + test do + docker_machine = Formula["docker-machine"].opt_bin/"docker-machine" + output = shell_output("#{docker_machine} create --driver vmware -h") + assert_match "engine-env", output + end +end diff --git a/Formula/d/docker-machine-driver-vultr.rb b/Formula/d/docker-machine-driver-vultr.rb new file mode 100644 index 0000000000000..0bf191db474d9 --- /dev/null +++ b/Formula/d/docker-machine-driver-vultr.rb @@ -0,0 +1,29 @@ +class DockerMachineDriverVultr < Formula + desc "Docker Machine driver plugin for Vultr Cloud" + homepage "https://github.com/vultr/docker-machine-driver-vultr" + url "https://github.com/vultr/docker-machine-driver-vultr/archive/refs/tags/v2.3.0.tar.gz" + sha256 "451a6e31ab4e5fb9be2c2730b1b03f5039a8ac2b41f677824e1b8a15036ab815" + license "MIT" + head "https://github.com/vultr/docker-machine-driver-vultr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3dda2f729047493afd3de8c833bad9a0d2a92ac9cda6756c6518e30ee7f3b865" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3dda2f729047493afd3de8c833bad9a0d2a92ac9cda6756c6518e30ee7f3b865" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3dda2f729047493afd3de8c833bad9a0d2a92ac9cda6756c6518e30ee7f3b865" + sha256 cellar: :any_skip_relocation, sonoma: "606c6391582f3353b25bf1c2cb58e7c5a0388c9df9aee77445e1b6e5e959261a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcbda52b4860cc84ddfefa6b21e9b5a9284324cc5e2c9451bf7ca7eb9747fe1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc02dec3304a23cbda77067ae6a1bc315265468eb40cf015ee74e8c04954a03a" + end + + depends_on "go" => :build + depends_on "docker-machine" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./machine" + end + + test do + assert_match "--vultr-api-key", + shell_output("#{Formula["docker-machine"].bin}/docker-machine create --driver vultr -h") + end +end diff --git a/Formula/d/docker-machine-nfs.rb b/Formula/d/docker-machine-nfs.rb new file mode 100644 index 0000000000000..58dae9ccb1af8 --- /dev/null +++ b/Formula/d/docker-machine-nfs.rb @@ -0,0 +1,23 @@ +class DockerMachineNfs < Formula + desc "Activates NFS on docker-machine" + homepage "https://github.com/adlogix/docker-machine-nfs" + url "https://github.com/adlogix/docker-machine-nfs/archive/refs/tags/0.5.4.tar.gz" + sha256 "ecb8d637524eaeb1851a0e12da797d4ffdaec7007aa28a0692f551e9223a71b7" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "7adcced71d07397c241cf4999adf40d17b6f773aa28fc53625df5982484d4c6e" + end + + deprecate! date: "2025-04-27", because: :repo_archived + + def install + inreplace "docker-machine-nfs.sh", "/usr/local", HOMEBREW_PREFIX + bin.install "docker-machine-nfs.sh" => "docker-machine-nfs" + end + + test do + system bin/"docker-machine-nfs" + end +end diff --git a/Formula/d/docker-machine.rb b/Formula/d/docker-machine.rb new file mode 100644 index 0000000000000..ae2e44c8e2658 --- /dev/null +++ b/Formula/d/docker-machine.rb @@ -0,0 +1,39 @@ +class DockerMachine < Formula + desc "Create Docker hosts locally and on cloud providers" + homepage "https://docs.gitlab.com/runner/executors/docker_machine.html" + url "https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/archive/v0.16.2-gitlab.42/docker-machine-v0.16.2-gitlab.42.tar.bz2" + version "0.16.2-gitlab.42" + sha256 "d4589bad573dbfaefbc72965f3fbdef686dc5aa3df388800f0ef98f6c84fbc79" + license "Apache-2.0" + head "https://gitlab.com/gitlab-org/ci-cd/docker-machine.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6a21920e3f403d5d982fee93d4b5d4f9e5979b3640c5a1662f60baa55cc07d8b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a21920e3f403d5d982fee93d4b5d4f9e5979b3640c5a1662f60baa55cc07d8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a21920e3f403d5d982fee93d4b5d4f9e5979b3640c5a1662f60baa55cc07d8b" + sha256 cellar: :any_skip_relocation, sonoma: "0f1d5cf19ac0ce993fbe5a0a6ebc318956255d37ba286c994612873a686d2330" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0f81fb5ae7314f8fc762217a564c443011174ef6f3100dcc64c6349288cf9dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34a0b95a12e75b2a02a5ec0bdc995258874a015b3e8830cd8a36f9d7843ca483" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:), "./cmd/docker-machine" + + bash_completion.install Dir["contrib/completion/bash/*.bash"] + zsh_completion.install "contrib/completion/zsh/_docker-machine" + end + + service do + run [opt_bin/"docker-machine", "start", "default"] + environment_variables PATH: std_service_path_env + run_type :immediate + working_dir HOMEBREW_PREFIX + end + + test do + assert_match version.to_s, shell_output("#{bin}/docker-machine --version") + end +end diff --git a/Formula/d/docker-squash.rb b/Formula/d/docker-squash.rb new file mode 100644 index 0000000000000..573e0f4194fa7 --- /dev/null +++ b/Formula/d/docker-squash.rb @@ -0,0 +1,60 @@ +class DockerSquash < Formula + include Language::Python::Virtualenv + + desc "Docker image squashing tool" + homepage "https://github.com/goldmann/docker-squash" + url "https://files.pythonhosted.org/packages/77/ef/45dc63f3f0f3fba18306dac34d9be26f9dd0d1a0742a7f0ca39cf1a98b15/docker_squash-1.2.2.tar.gz" + sha256 "74dd70412ddcf570bcd322567929062342793d1ec70c63b5371cc9e2808ae2ef" + license "MIT" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "04cfa970310efc6a54eff8948ca123c68ac175b7b74bda29c49e50a595e720f0" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["DOCKER_HOST"] = "does-not-exist:1234" + output = shell_output("#{bin}/docker-squash not_an_image 2>&1", 1) + assert_match "Could not create Docker client", output + end +end diff --git a/Formula/d/docker.rb b/Formula/d/docker.rb new file mode 100644 index 0000000000000..fd85e686493c4 --- /dev/null +++ b/Formula/d/docker.rb @@ -0,0 +1,60 @@ +class Docker < Formula + desc "Pack, ship and run any application as a lightweight container" + homepage "https://www.docker.com/" + url "https://github.com/docker/cli.git", + tag: "v28.5.1", + revision: "e180ab8ab82d22b7895a3e6e110cf6dd5c45f1d7" + license "Apache-2.0" + head "https://github.com/docker/cli.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)(?:[._-]ce)?$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a032f9d8e396001b3ec86bc1d681c1105176f87e3bc5652dd3ad63308f0bca64" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "faf1932a2232acb121535de2c22658cf4f690b05f8ff313efc56fa81f6113888" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd8eea9cbcaaecec94ee1014c8c731a8af977c87d7d2f350939c5e26395c29f9" + sha256 cellar: :any_skip_relocation, sonoma: "28c18f8ced0163a1bf22f19165647c3523de58db930d073b93e3b5594a703bd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f102d102fa13cdcb66e89747435138dff7a280b4f067e69ea72c22e082b3d771" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2113d6f56025dfae0d93d2a79bf6d925174ea9d484183ca663a06c13b1dd74d9" + end + + depends_on "go" => :build + depends_on "go-md2man" => :build + depends_on "docker-completion" + + conflicts_with cask: "docker-desktop" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + # TODO: Drop GOPATH when merged/released: https://github.com/docker/cli/pull/4116 + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + (buildpath/"src/github.com/docker").install_symlink buildpath => "cli" + + ldflags = %W[ + -s -w + -X github.com/docker/cli/cli/version.BuildTime=#{time.iso8601} + -X github.com/docker/cli/cli/version.GitCommit=#{Utils.git_short_head} + -X github.com/docker/cli/cli/version.Version=#{version} + -X "github.com/docker/cli/cli/version.PlatformName=Docker Engine - Community" + ] + + system "go", "build", *std_go_args(ldflags:), "github.com/docker/cli/cmd/docker" + + Pathname.glob("man/*.[1-8].md") do |md| + section = md.to_s[/\.(\d+)\.md\Z/, 1] + (man/"man#{section}").mkpath + system "go-md2man", "-in=#{md}", "-out=#{man}/man#{section}/#{md.stem}" + end + end + + test do + assert_match "Docker version #{version}", shell_output("#{bin}/docker --version") + + expected = "Client: Docker Engine - Community\n Version: #{version}\n Context: default\n Debug Mode: false\n\nServer:" + assert_match expected, shell_output("#{bin}/docker info", 1) + end +end diff --git a/Formula/d/dockerfile-language-server.rb b/Formula/d/dockerfile-language-server.rb new file mode 100644 index 0000000000000..31fd35724fc97 --- /dev/null +++ b/Formula/d/dockerfile-language-server.rb @@ -0,0 +1,40 @@ +class DockerfileLanguageServer < Formula + desc "Language server for Dockerfiles powered by Node, TypeScript, and VSCode" + homepage "https://github.com/rcjsuen/dockerfile-language-server" + url "https://registry.npmjs.org/dockerfile-language-server-nodejs/-/dockerfile-language-server-nodejs-0.15.0.tgz" + sha256 "32ee93b98f43d8d60273019b7ed12a263593ba3a2308442ca7449d49676f480d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7e63595a7c55824a185f84aeef01ba0c0ad797c217fcbabd23a0990614ff7795" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3("#{bin}/docker-langserver", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/d/dockerfilegraph.rb b/Formula/d/dockerfilegraph.rb new file mode 100644 index 0000000000000..8c9072ff9ce55 --- /dev/null +++ b/Formula/d/dockerfilegraph.rb @@ -0,0 +1,46 @@ +class Dockerfilegraph < Formula + desc "Visualize your multi-stage Dockerfiles" + homepage "https://github.com/patrickhoefler/dockerfilegraph" + url "https://github.com/patrickhoefler/dockerfilegraph/archive/refs/tags/v0.19.1.tar.gz" + sha256 "6a8881599851c683401679ec597be7ee235dc3b21521d03d278980bc5811fca7" + license "MIT" + head "https://github.com/patrickhoefler/dockerfilegraph.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c2a4bdec5bf0a8ac4e0a78c7c1eb3f59f346ce1a6332b07e24d0f8fa9d00812c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2a4bdec5bf0a8ac4e0a78c7c1eb3f59f346ce1a6332b07e24d0f8fa9d00812c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c2a4bdec5bf0a8ac4e0a78c7c1eb3f59f346ce1a6332b07e24d0f8fa9d00812c" + sha256 cellar: :any_skip_relocation, sonoma: "e6a4f66f2c6b8d19626f993de642d7c7d0edd5b421c460dd8a9d5cc8979e0dfe" + sha256 cellar: :any_skip_relocation, arm64_linux: "34af91fcb654a496f3a6b1b4922f8f816353ef3ab4945306344edd8dc0bde255" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71254a91804c45cf519859dd644cd22e3da9d8eadf6b12e984ea916acc83349c" + end + + depends_on "go" => :build + depends_on "graphviz" + + def install + ldflags = %W[ + -s -w + -X github.com/patrickhoefler/dockerfilegraph/internal/cmd.gitVersion=#{version} + -X github.com/patrickhoefler/dockerfilegraph/internal/cmd.gitCommit=#{tap.user} + -X github.com/patrickhoefler/dockerfilegraph/internal/cmd.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockerfilegraph --version") + + (testpath/"Dockerfile").write <<~DOCKERFILE + FROM alpine AS base + RUN echo "Hello, World!" > /hello.txt + + FROM base AS final + COPY --from=base /hello.txt /hello.txt + DOCKERFILE + + output = shell_output("#{bin}/dockerfilegraph --filename Dockerfile") + assert_match "Successfully created Dockerfile.pdf", output + assert_path_exists testpath/"Dockerfile.pdf" + end +end diff --git a/Formula/d/dockerfmt.rb b/Formula/d/dockerfmt.rb new file mode 100644 index 0000000000000..349de87662e87 --- /dev/null +++ b/Formula/d/dockerfmt.rb @@ -0,0 +1,35 @@ +class Dockerfmt < Formula + desc "Dockerfile format and parser. a modern dockfmt" + homepage "https://github.com/reteps/dockerfmt" + url "https://github.com/reteps/dockerfmt/archive/refs/tags/v0.3.9.tar.gz" + sha256 "a156f43b62168531f999f4ee1fb39b6d0057e55e4f703c96181be32950b3c461" + license "MIT" + head "https://github.com/reteps/dockerfmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1b2c37874f97f7d25129b70ddb8c74d81bd838752bf52904f69acc25c11c480" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c1b2c37874f97f7d25129b70ddb8c74d81bd838752bf52904f69acc25c11c480" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1b2c37874f97f7d25129b70ddb8c74d81bd838752bf52904f69acc25c11c480" + sha256 cellar: :any_skip_relocation, sonoma: "553325e795e1f955251f53fcb2c91e4e24c64b12de9559039c018cf567e68f5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "af8eb457f9132d90da407300218c8b4c641d39db3d0d67d1aabcd117935e993a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e1680a1b9edf2bb8a7656961ac6cc13a5ee126fdae287b7ce0f5157c6ee6916" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"dockerfmt", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockerfmt version") + + (testpath/"Dockerfile").write <<~DOCKERFILE + FROM alpine:latest + DOCKERFILE + + output = shell_output("#{bin}/dockerfmt --check Dockerfile 2>&1", 1) + assert_match "Dockerfile is not formatted", output + end +end diff --git a/Formula/d/dockerize.rb b/Formula/d/dockerize.rb new file mode 100644 index 0000000000000..a822963d770fb --- /dev/null +++ b/Formula/d/dockerize.rb @@ -0,0 +1,31 @@ +class Dockerize < Formula + desc "Utility to simplify running applications in docker containers" + homepage "https://github.com/jwilder/dockerize" + url "https://github.com/jwilder/dockerize/archive/refs/tags/v0.9.6.tar.gz" + sha256 "34926f5c736544b0c754a1a6de05c2ac3338033f77e872a2a4bcef55667e7509" + license "MIT" + head "https://github.com/jwilder/dockerize.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "144fa8dbd95fa3b7679cff214defbc5ad5bd18e49a996250896698192d4f2dfd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bce2724a44498ef7a8f3af75fe83f9c9f0b655e808af100aeab35aba133d97dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bce2724a44498ef7a8f3af75fe83f9c9f0b655e808af100aeab35aba133d97dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bce2724a44498ef7a8f3af75fe83f9c9f0b655e808af100aeab35aba133d97dc" + sha256 cellar: :any_skip_relocation, sonoma: "f718902815c4f7fde3f6c6860c485dd62db8b8388cfa8898d52c2d9331293876" + sha256 cellar: :any_skip_relocation, ventura: "f718902815c4f7fde3f6c6860c485dd62db8b8388cfa8898d52c2d9331293876" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1876517dd21b7cf29f4dd54782894032e6343b5b0775285f08bc1e30cfe351f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "550dcae60f0801cc80da4f86ae9b741c95a6b655f09bd7b33bf2dcdaf2d4deff" + end + + depends_on "go" => :build + conflicts_with "powerman-dockerize", because: "powerman-dockerize and dockerize install conflicting executables" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.buildVersion=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockerize --version") + system bin/"dockerize", "-wait", "https://www.google.com/", "-wait-retry-interval=1s", "-timeout", "5s" + end +end diff --git a/Formula/d/dockly.rb b/Formula/d/dockly.rb new file mode 100644 index 0000000000000..81d9ef220e395 --- /dev/null +++ b/Formula/d/dockly.rb @@ -0,0 +1,48 @@ +class Dockly < Formula + desc "Immersive terminal interface for managing docker containers and services" + homepage "https://lirantal.github.io/dockly/" + url "https://registry.npmjs.org/dockly/-/dockly-3.24.5.tgz" + sha256 "278203ca5fe88f802f50a9fe58f37e95309ccb098b47a6f5f3558ccc9dc623b6" + license "MIT" + + bottle do + sha256 arm64_tahoe: "e276939bcb8b5909e0c6ab1d39a740b724de614668235b8c3606d57e67d41e64" + sha256 arm64_sequoia: "6765be9e2eb88427da832627e84bfc14e832546ec895c4f3a80e618521a29bbb" + sha256 arm64_sonoma: "21d9206c6dd01067b8ab10a86bbce37c1c1b33c1fa8f06aaed4ab4b3e2d11f79" + sha256 arm64_ventura: "edba097b50de91a673b9504054ec42ed435cbd6766985af57a90b4de005900c8" + sha256 sonoma: "b6075b00e725da80c041f56a98977e4c74059eaec6486d26d628e5288157301a" + sha256 ventura: "fa994bb066eb8c0190c2c7cfa674255fe9de6491a4a182d75697f2eed99dd435" + sha256 cellar: :any_skip_relocation, arm64_linux: "961cd52469f0445138bda46c29f8466f7d7f2e0587af77d2f0981a9d30e253a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f10763b5b89d92dd010032e24ac0e060df6bb12f44118dec3ee2e0c28938d55a" + end + + depends_on "node" + + on_linux do + depends_on "xsel" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + clipboardy_fallbacks_dir = libexec/"lib/node_modules/#{name}/node_modules/clipboardy/fallbacks" + rm_r(clipboardy_fallbacks_dir) # remove pre-built binaries + if OS.linux? + linux_dir = clipboardy_fallbacks_dir/"linux" + linux_dir.mkpath + # Replace the vendored pre-built xsel with one we build ourselves + ln_sf (Formula["xsel"].opt_bin/"xsel").relative_path_from(linux_dir), linux_dir + end + end + + test do + expected = if OS.mac? + "Error: connect ENOENT" + else + "Error: connect EACCES" + end + assert_match expected, shell_output("#{bin}/dockly 2>&1", 255) + assert_match version.to_s, shell_output("#{bin}/dockly --version") + end +end diff --git a/Formula/d/dockutil.rb b/Formula/d/dockutil.rb new file mode 100644 index 0000000000000..158815e017398 --- /dev/null +++ b/Formula/d/dockutil.rb @@ -0,0 +1,34 @@ +class Dockutil < Formula + desc "Tool for managing dock items" + homepage "https://github.com/kcrawford/dockutil" + url "https://github.com/kcrawford/dockutil/archive/refs/tags/3.1.3.tar.gz" + sha256 "622bbb5c97f09b3f46ebea9a612f7470dd7fb6a7daaed12b87dee5af7a0177f6" + license "Apache-2.0" + head "https://github.com/kcrawford/dockutil.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4f404c2ab7fcf02ede4213e5a5a81c92b27fd55c5e508bdb773a01e1bfe64c56" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "736b77305847eff297dface1a8e14f35e3c94fd8ce9a68efef0c6d4395abf1f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b89b582646602f45c60de6737a65dc2b21d75393b2543d87be4754b89998e294" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d315729e980a1909812bcbf93183b6e745f9cd6ec6c253ac182af052235218f" + sha256 cellar: :any_skip_relocation, sonoma: "23624766ad896d382bf343aeb1b1c46d26f117a8928ab06e3cd3ad29437afacf" + sha256 cellar: :any_skip_relocation, ventura: "4436030a66f240ccfea5317023281dc817ce4bdf0784d52f0c90b536321be629" + end + + depends_on xcode: ["13.0", :build] + depends_on :macos + uses_from_macos "swift" + + def install + system "swift", "build", "--disable-sandbox", "--configuration", "release" + bin.install ".build/release/dockutil" + generate_completions_from_executable(bin/"dockutil", "--generate-completion-script") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockutil --version") + end +end diff --git a/Formula/d/dockviz.rb b/Formula/d/dockviz.rb new file mode 100644 index 0000000000000..b24c211bb1bd0 --- /dev/null +++ b/Formula/d/dockviz.rb @@ -0,0 +1,34 @@ +class Dockviz < Formula + desc "Visualizing docker data" + homepage "https://github.com/justone/dockviz" + url "https://github.com/justone/dockviz/archive/refs/tags/v0.6.4.tar.gz" + sha256 "228e2c11fad1de38ec63e5d46e60bf9411625447c3c381dd0cd99aaa05d4e5db" + license "Apache-2.0" + head "https://github.com/justone/dockviz.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9c805f7312b7c483e83d459b1e6a724d3e2e4940c416444dfd8ee7a79a5ea049" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a1770a99278e7fa43efce29515eefb0ae70d895590503b3ba4e13fbfcc27a3e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1081dedcb9f5e575615a345d55b389cb61f1f5208745fa387d6cba861a06b525" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f0cbe120e8493fc17a646efd6bbeb83afa33a4139afe331dbbd2fdf8a4c78a4e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "156ba01d0f667ff0b607b53ca512ac44853d7ade5854f7101e9da9079eaf80ed" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "12168679a5a86a9c4603bea3e4943b92acecc3078dad07c0dc780d036691c8e6" + sha256 cellar: :any_skip_relocation, sonoma: "20d50dc20e32af765e4164d2038618ea107a83e92962339d4bc3febd703687d8" + sha256 cellar: :any_skip_relocation, ventura: "8df071372a3d9b63c113fe4834ae92107f24b19269901d04e6f717368c65380a" + sha256 cellar: :any_skip_relocation, monterey: "09de9aa1782b96c318d4e2965d565963880dce43fbc6dcca52a396c62f9a44d5" + sha256 cellar: :any_skip_relocation, big_sur: "55392d3b7f022460d56c241b9cc9a382b6b97273ccaf2d94549e6ffd0cbf9a2e" + sha256 cellar: :any_skip_relocation, catalina: "ed054cbc368e35e27139571d63d390f626ff081f7bcff4c4b9ec2a73c9d19814" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4ef5dc4b07e8a8cea9572fa24d13234d5fa45f1f07f72b8296fbf857d1544eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d00d55a57d1f8162f08e60ec07d7ac34e5ddc04e6865b09babf4072f4b52c513" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockviz --version") + end +end diff --git a/Formula/d/docmd.rb b/Formula/d/docmd.rb new file mode 100644 index 0000000000000..5cab6f9507ac6 --- /dev/null +++ b/Formula/d/docmd.rb @@ -0,0 +1,26 @@ +class Docmd < Formula + desc "Minimal Markdown documentation generator" + homepage "https://docmd.mgks.dev/" + url "https://registry.npmjs.org/@mgks/docmd/-/docmd-0.2.5.tgz" + sha256 "89b6b3b18a466b8851f61b1353f688df00ef793a5261fefaa0fb1d7b4c498935" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "24267b6f7303375c652bfa77b8a1267b21d4f137ed2accd0e7b559ea878eab14" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/docmd --version") + + system bin/"docmd", "init" + assert_path_exists testpath/"docmd.config.js" + assert_match "title: \"Welcome\"", (testpath/"docs/index.md").read + end +end diff --git a/Formula/d/doctest.rb b/Formula/d/doctest.rb new file mode 100644 index 0000000000000..99b1d3e844b55 --- /dev/null +++ b/Formula/d/doctest.rb @@ -0,0 +1,39 @@ +class Doctest < Formula + desc "Feature-rich C++11/14/17/20/23 single-header testing framework" + homepage "https://github.com/doctest/doctest" + url "https://github.com/doctest/doctest/archive/refs/tags/v2.4.12.tar.gz" + sha256 "73381c7aa4dee704bd935609668cf41880ea7f19fa0504a200e13b74999c2d70" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a680aeecce8a2548b38121d6282e90d856eb76d4d371518c4a3cd65845158fb7" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DDOCTEST_WITH_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN + #include + TEST_CASE("Basic") { + int x = 1; + SUBCASE("Test section 1") { + x = x + 1; + REQUIRE(x == 2); + } + SUBCASE("Test section 2") { + REQUIRE(x == 1); + } + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++11", "-o", "test" + system "./test" + end +end diff --git a/Formula/d/doctl.rb b/Formula/d/doctl.rb new file mode 100644 index 0000000000000..e1777a9e83f5c --- /dev/null +++ b/Formula/d/doctl.rb @@ -0,0 +1,37 @@ +class Doctl < Formula + desc "Command-line tool for DigitalOcean" + homepage "https://github.com/digitalocean/doctl" + url "https://github.com/digitalocean/doctl/archive/refs/tags/v1.146.0.tar.gz" + sha256 "37aa7baf777ac9ad5a8a5d1f82f120733be6ad270a5e2ed692c0853c2e48cfba" + license "Apache-2.0" + head "https://github.com/digitalocean/doctl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4374c3c9cb92d4606d964b3ba7c4d43d659389061e26d02ccd4d895c84314a86" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4374c3c9cb92d4606d964b3ba7c4d43d659389061e26d02ccd4d895c84314a86" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4374c3c9cb92d4606d964b3ba7c4d43d659389061e26d02ccd4d895c84314a86" + sha256 cellar: :any_skip_relocation, sonoma: "29a3d48b3b8c3d382afe321b2e3a0553f79425135f535c92310a5d5cac78c0e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "42eac77ed8a2d90afa8619c7edd99aef9c0a0dcbb0802ee9f26960fec48342eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65ff38c79c63171f4e7ba8e550d5dd2e1539899a8831838053aa82aee6f22e7b" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/digitalocean/doctl.Major=#{version.major} + -X github.com/digitalocean/doctl.Minor=#{version.minor} + -X github.com/digitalocean/doctl.Patch=#{version.patch} + -X github.com/digitalocean/doctl.Label=release + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/doctl" + + generate_completions_from_executable(bin/"doctl", "completion") + end + + test do + assert_match "doctl version #{version}-release", shell_output("#{bin}/doctl version") + end +end diff --git a/Formula/d/docutils.rb b/Formula/d/docutils.rb new file mode 100644 index 0000000000000..c6412589976fa --- /dev/null +++ b/Formula/d/docutils.rb @@ -0,0 +1,45 @@ +class Docutils < Formula + include Language::Python::Virtualenv + + desc "Text processing system for reStructuredText" + homepage "https://docutils.sourceforge.io" + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + license all_of: [:public_domain, "BSD-2-Clause", "GPL-3.0-or-later", "Python-2.0"] + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b2d908e4e43ec3f0f63dc6e9ff7572403cfbe27a3a068b356c71aae76b23c08c" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + bin.glob("*.py") do |f| + bin.install_symlink f => f.basename(".py") + end + end + + test do + (testpath/"README.txt").write <<~EOS + .. include:: docs/header0.txt + + ========================= + README: Docutils + ========================= + + :Author: David Goodger + :Contact: goodger@python.org + :Date: $Date: 2023-05-09 20:32:19 +0200 (Di, 09. Mai 2023) $ + :Web site: https://docutils.sourceforge.io/ + :Copyright: This document has been placed in the public domain. + + .. contents:: + EOS + + mkdir_p testpath/"docs" + touch testpath/"docs"/"header0.txt" + system bin/"rst2man", testpath/"README.txt" + end +end diff --git a/Formula/d/docuum.rb b/Formula/d/docuum.rb new file mode 100644 index 0000000000000..57b32a23c16af --- /dev/null +++ b/Formula/d/docuum.rb @@ -0,0 +1,46 @@ +class Docuum < Formula + desc "Perform least recently used (LRU) eviction of Docker images" + homepage "https://github.com/stepchowfun/docuum" + url "https://github.com/stepchowfun/docuum/archive/refs/tags/v0.25.1.tar.gz" + sha256 "3566064ff3bbb5f42a35fde10b7541def2a3cef4b12a7c6eecf2b84972c7459f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0305a71d7420d8ca112be910c40294febc7b70177cc48185519f0a09665df533" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82ce6edc531f9c8e706098c4a140fc46988ea0ed2be7e7e6a2ff3b3dc6f943d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89c40c16cdc37eedfe19a6ee535e2e3421ea2b9ec7f1da2c36d76da078f7e6a9" + sha256 cellar: :any_skip_relocation, sonoma: "d0cdd27109e1fb24ec21a43d574ca9edf0b03d9fbe49ef88fe8c6301a2fb442e" + sha256 cellar: :any_skip_relocation, arm64_linux: "4039f604d0693b9120873ca99445be60916d30ae37b81d29f84275d0ea019632" + sha256 cellar: :any_skip_relocation, x86_64_linux: "013ea6c9394f78b005b7773d5814902245c20aff030da5c9687a152a0fbd1f99" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + # https://github.com/stepchowfun/docuum#configuring-your-operating-system-to-run-the-binary-as-a-daemon + service do + run opt_bin/"docuum" + keep_alive true + log_path var/"log/docuum.log" + error_log_path var/"log/docuum.log" + environment_variables PATH: "#{std_service_path_env}:/usr/local/bin" + end + + test do + started_successfully = false + + Open3.popen3({ "NO_COLOR" => "true" }, bin/"docuum") do |_, _, stderr, wait_thread| + stderr.each_line do |line| + if line.include?("Performing an initial vacuum on startup…") + Process.kill("TERM", wait_thread.pid) + started_successfully = true + end + end + end + + assert(started_successfully, "Docuum did not start successfully.") + end +end diff --git a/Formula/d/docx2txt.rb b/Formula/d/docx2txt.rb new file mode 100644 index 0000000000000..809459620d057 --- /dev/null +++ b/Formula/d/docx2txt.rb @@ -0,0 +1,28 @@ +class Docx2txt < Formula + desc "Converts Microsoft Office docx documents to equivalent text documents" + homepage "https://docx2txt.sourceforge.net/" + url "https://downloads.sourceforge.net/project/docx2txt/docx2txt/v1.4/docx2txt-1.4.tgz" + sha256 "b297752910a404c1435e703d5aedb4571222bd759fa316c86ad8c8bbe58c6d1b" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "9c8866a49e04bb1b2a4797c4c911e5aee4df8c3a86701a6a792e55415ac10a7b" + end + + resource "sample_doc" do + url "https://calibre-ebook.com/downloads/demos/demo.docx" + sha256 "269329fc7ae54b3f289b3ac52efde387edc2e566ef9a48d637e841022c7e0eab" + end + + def install + system "make", "install", "CONFIGDIR=#{etc}", "BINDIR=#{bin}" + end + + test do + testpath.install resource("sample_doc") + system bin/"docx2txt.sh", "#{testpath}/demo.docx" + end +end diff --git a/Formula/d/doge.rb b/Formula/d/doge.rb new file mode 100644 index 0000000000000..45b1574a33d96 --- /dev/null +++ b/Formula/d/doge.rb @@ -0,0 +1,48 @@ +class Doge < Formula + desc "Command-line DNS client" + homepage "https://dog.ramfield.net/" + url "https://github.com/Dj-Codeman/dog_community/archive/refs/tags/v0.2.9.tar.gz" + sha256 "21d459f1f88d6a1e001a747b84782f180c01de8f3c39f3a1389c352b2f2edc88" + license "EUPL-1.2" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "71948198c956b00eb4a7876019460f9280593408830d4283419976b223699961" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c1d4cd89b97ec72efb1c213373314bcf50c2f550f616dedb72be413a6b591746" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "468d651e833eedaf42d4f9b707c9cd6a885f0a138cc22527d7fec660d344a18c" + sha256 cellar: :any_skip_relocation, sonoma: "efce39ee93945f293a68d081a90865e4702ad02979d6c71a6dfa4e5baf0cabb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "af6ca23e2bd46b2076cb90e8d5a36de27c701ced018d45ae062f6861d23a486f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e1a7aa1977d9189061c8d1b0a25f8117f3f1a5b4d920dd832fb49cc5461e62c" + end + + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/doge.bash" => "doge" + zsh_completion.install "completions/doge.zsh" => "_doge" + fish_completion.install "completions/doge.fish" + + args = %w[ + --standalone + --from=markdown + --to=man + ] + system "pandoc", *args, "man/doge.1.md", "-o", "doge.1" + man1.install "doge.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/doge --version") + + output = shell_output("#{bin}/doge dns.google A --seconds --color=never") + assert_match(/^A\s+dns\.google\.\s+\d+\s+8\.8\.4\.4/, output) + assert_match(/^A\s+dns\.google\.\s+\d+\s+8\.8\.8\.8/, output) + end +end diff --git a/Formula/d/doggo.rb b/Formula/d/doggo.rb new file mode 100644 index 0000000000000..a5e0280856c3f --- /dev/null +++ b/Formula/d/doggo.rb @@ -0,0 +1,33 @@ +class Doggo < Formula + desc "Command-line DNS Client for Humans" + homepage "https://doggo.mrkaran.dev/" + url "https://github.com/mr-karan/doggo/archive/refs/tags/v1.1.2.tar.gz" + sha256 "bb66deafb34547c4e2735908ba5c42c6a0c5f30fb2b62dc5f9ff7a11fbe15d3e" + license "GPL-3.0-or-later" + head "https://github.com/mr-karan/doggo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55cd5cb1fd855a26931c937a8c1e4ee14a8522f5ebf66bc01631baa57d03427e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "55cd5cb1fd855a26931c937a8c1e4ee14a8522f5ebf66bc01631baa57d03427e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55cd5cb1fd855a26931c937a8c1e4ee14a8522f5ebf66bc01631baa57d03427e" + sha256 cellar: :any_skip_relocation, sonoma: "72406c85b8aeaef6359ba85e4c991559c95864989db88a797b4301695ff1536f" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb95a59da2fcfe9d6806672b78f1c2fa4470453818a40fd65fc1958016537dd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "268a18dafb27a97dbbf9986ae512c496a2b63e3db3a93b766a9f8d2d56c89a13" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.buildVersion=#{version} -X main.buildDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/doggo" + + generate_completions_from_executable(bin/"doggo", "completions") + end + + test do + answer = shell_output("#{bin}/doggo --short example.com NS @1.1.1.1") + assert_equal "a.iana-servers.net.\nb.iana-servers.net.\n", answer + + assert_match version.to_s, shell_output("#{bin}/doggo --version") + end +end diff --git a/Formula/d/doitlive.rb b/Formula/d/doitlive.rb new file mode 100644 index 0000000000000..7929b11fb4cb4 --- /dev/null +++ b/Formula/d/doitlive.rb @@ -0,0 +1,66 @@ +class Doitlive < Formula + include Language::Python::Virtualenv + + desc "Replay stored shell commands for live presentations" + homepage "https://doitlive.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/c4/bb/96c5bb76723fcfd7031482817717e5b55441ae66b7fd7dedfa0e1c7bfaf1/doitlive-5.2.0.tar.gz" + sha256 "041bbdf197c36b2a497c4d0a69dac53a777a77564b57ac02d4777d6058d170fa" + license "MIT" + head "https://github.com/sloria/doitlive.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "617b5c471d1a6e15b4be87778b0bab4c7811fb176fbaa6c637429b9cbe2b5b16" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6ce4414162588b46a35d4e767960f2fc1fc110c3494192922c2b3ca37a9c531" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4d485ce8cade1b9593b9d146453feb92f1c6a234361ab0fb5f3398da0e58f39" + sha256 cellar: :any_skip_relocation, sonoma: "9a750f68ab7bf0565b741d2cddfa33f70251f3cc3c72aa2678db154c2fd1c53e" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c5a126d527f40d7c9ba71cb7d2c71efed0ab1b194ff178a2646251184c59c85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "356a45cdfbb119cbafff8827283722c93c341814ff458572cb564f8ddfe902c1" + end + + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-completion" do + url "https://files.pythonhosted.org/packages/93/18/74e2542defdda23b021b12b835b7abbd0fc55896aa8d77af280ad65aa406/click-completion-0.5.2.tar.gz" + sha256 "5bf816b81367e638a190b6e91b50779007d14301b3f9f3145d68e3cade7bce86" + end + + resource "click-didyoumean" do + url "https://files.pythonhosted.org/packages/30/ce/217289b77c590ea1e7c24242d9ddd6e249e52c795ff10fac2c50062c48cb/click_didyoumean-0.3.1.tar.gz" + sha256 "4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"doitlive", "completion", shell_parameter_format: :none) + end + + test do + system bin/"doitlive", "themes", "--preview" + end +end diff --git a/Formula/d/dolphie.rb b/Formula/d/dolphie.rb new file mode 100644 index 0000000000000..440264b412c3e --- /dev/null +++ b/Formula/d/dolphie.rb @@ -0,0 +1,159 @@ +class Dolphie < Formula + include Language::Python::Virtualenv + + desc "Feature-rich top tool for monitoring MySQL" + homepage "https://github.com/charles-001/dolphie" + url "https://files.pythonhosted.org/packages/7b/9f/a4f1388772174c3013c668ecfed626a4fbaddbae9546ff28258fc9506efe/dolphie-6.10.6.tar.gz" + sha256 "fbfd0a11bd7b570b653107d293999da38a6c69bb3b70199088c64978baa253f1" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "2c4778bf8aca04b266c5d54ac5e4ecdb361809d6a5432e0145f7bc8c5e9aee34" + sha256 cellar: :any, arm64_sequoia: "bbf4754cf8260af915522889609e0a81072a1fa63668c0eece6de3068df0ea5b" + sha256 cellar: :any, arm64_sonoma: "aa8487ba3a2b79216f7fbed7c6c98395b3f0bd7d681b0a2cc362a50e7a5ec302" + sha256 cellar: :any, sonoma: "c36e3e1c9d9fa230082851031116c45b203011be94bc5462d4ccc0af72363760" + sha256 cellar: :any_skip_relocation, arm64_linux: "78fc65452e8ae29eb39b7713a046e42d4d3014584a79d15534281191a62765a9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ebaabe08c8279bc7e575e1dc24bbb4e8afdde9c93b3e4000f06664d637c6e7f" + end + + depends_on "rust" => :build # for orjson + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "cryptography"] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "loguru" do + url "https://files.pythonhosted.org/packages/3a/05/a1dae3dffd1116099471c643b8924f5aa6524411dc6c63fdae648c4f1aca/loguru-0.7.3.tar.gz" + sha256 "19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "myloginpath" do + url "https://files.pythonhosted.org/packages/21/30/9acf030d204770c1134e130e8eb1293ce5ecd6a72046aaca68fbd76ead00/myloginpath-0.0.4.tar.gz" + sha256 "c44b8d11e8f35a02eeac4b88bf244203c09cc496bfa19ce99a79561c038f9d09" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/c6/fe/ed708782d6709cc60eb4c2d8a361a440661f74134675c72990f2c48c785f/orjson-3.11.4.tar.gz" + sha256 "39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "plotext" do + url "https://files.pythonhosted.org/packages/c9/d7/f75f397af966fe252d0d34ffd3cae765317fce2134f925f95e7d6725d1ce/plotext-5.3.2.tar.gz" + sha256 "52d1e932e67c177bf357a3f0fe6ce14d1a96f7f7d5679d7b455b929df517068e" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pymysql" do + url "https://files.pythonhosted.org/packages/f5/ae/1fe3fcd9f959efa0ebe200b8de88b5a5ce3e767e38c7ac32fb179f16a388/pymysql-1.1.2.tar.gz" + sha256 "4961d3e165614ae65014e361811a724e2044ad3ea3739de9903ae7c21f539f03" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "sqlparse" do + url "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz" + sha256 "09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/af/90/59757aa887ddcea61428820274f1a2d1f986feb7880374a5420ab5d37132/textual-6.5.0.tar.gz" + sha256 "e5f152cdd47db48a635d23b839721bae4d0e8b6d855e3fede7285218289294e3" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz" + sha256 "7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + # Fails in Linux CI with "ParseError: end of file reached" + # See https://github.com/Homebrew/homebrew-core/pull/152912#issuecomment-1787257320 + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + output = shell_output("#{bin}/dolphie mysql://user:password@host:port 2>&1") + assert_match "Invalid URI: Port could not be cast to integer value as 'port'", output + + assert_match version.to_s, shell_output("#{bin}/dolphie --version") + end +end diff --git a/Formula/d/dolt.rb b/Formula/d/dolt.rb new file mode 100644 index 0000000000000..4c9bc868ec4b3 --- /dev/null +++ b/Formula/d/dolt.rb @@ -0,0 +1,57 @@ +class Dolt < Formula + desc "Git for Data" + homepage "https://github.com/dolthub/dolt" + url "https://github.com/dolthub/dolt/archive/refs/tags/v1.76.4.tar.gz" + sha256 "23b7010a40f2d680c3ac337d5ff80c0c70dd23bd912eddda6e3135d7a93c816a" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/dolthub/dolt.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8a5e1780e0ffb49442798a88d4d8687e3751209ff649daede02acc6b00be8d97" + sha256 cellar: :any, arm64_sequoia: "de96e4398ab81554a45bf848b842d7024232e1da71c561666ecd447a3e310c01" + sha256 cellar: :any, arm64_sonoma: "678c1f13b42886786e1374c7ba0f31d4cc3d2cf83e183abe3191b8cd376c96d4" + sha256 cellar: :any, sonoma: "f1c31ec200f6c374837eaffec7354730f805155bb7e007c8e205dd786e2a545d" + sha256 cellar: :any_skip_relocation, arm64_linux: "14039828c8596add5c0cfa8882870ef6ef141b8ab79eb9dd8b5145f91639343f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a623922065daeb586cfe34366e3a08d239b5bad031a89ba95feef1ba65c04ccc" + end + + depends_on "go" => :build + depends_on "icu4c@77" + + def install + ENV["CGO_ENABLED"] = "1" + + chdir "go" do + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/dolt" + end + end + + def post_install + (var/"log").mkpath unless (var/"log").exist? + (var/"dolt").mkpath + end + + service do + run [opt_bin/"dolt", "sql-server"] + keep_alive true + log_path var/"log/dolt.log" + error_log_path var/"log/dolt.error.log" + working_dir var/"dolt" + end + + test do + ENV["DOLT_ROOT_PATH"] = testpath + + mkdir "state-populations" do + system bin/"dolt", "init", "--name", "test", "--email", "test" + system bin/"dolt", "sql", "-q", "create table state_populations ( state varchar(14), primary key (state) )" + assert_match "state_populations", shell_output("#{bin}/dolt sql -q 'show tables'") + end + end +end diff --git a/Formula/d/doltgres.rb b/Formula/d/doltgres.rb new file mode 100644 index 0000000000000..9ac68a13e7aed --- /dev/null +++ b/Formula/d/doltgres.rb @@ -0,0 +1,65 @@ +class Doltgres < Formula + desc "Dolt for Postgres" + homepage "https://github.com/dolthub/doltgresql" + url "https://github.com/dolthub/doltgresql/archive/refs/tags/v0.52.4.tar.gz" + sha256 "869c18fc65289318034fc3e282802fe5262306230560d7a192401570cfb10854" + license "Apache-2.0" + head "https://github.com/dolthub/doltgresql.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0942adebe5c1ba679c99136371cec3b3b1a7a48546ea857ba1e0fb9fcce900ed" + sha256 cellar: :any, arm64_sequoia: "68d9fae1a9dbffd4ec9a178040eeeffd08de5e0dfa48e71f9aad02ec11ad77bc" + sha256 cellar: :any, arm64_sonoma: "b04984641dd3def1a82ae49f66c330d4c9089c4f81dfaf2f70b48514efbc200c" + sha256 cellar: :any, sonoma: "3562c6dbc2b28f452a16d8ca97787b566f77d4b4edf286e49cc12eb33fe2937b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b1e04d6b897703b1827667307b30df1f4e13972baf05ab0abf93d04c00416b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "494fa5e5e7792d8468b86994426a791c4c77610b4f49ea4d1cf5e0a221f7f6f5" + end + + depends_on "go" => :build + depends_on "libpq" => :test + depends_on "icu4c@77" + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + system "./postgres/parser/build.sh" + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/doltgres" + end + + test do + port = free_port + + (testpath/"config.yaml").write <<~YAML + log_level: debug + + behavior: + read_only: false + disable_client_multi_statements: false + dolt_transaction_commit: false + + listener: + host: localhost + port: #{port} + read_timeout_millis: 28800000 + write_timeout_millis: 28800000 + YAML + + fork do + exec bin/"doltgres", "--config", testpath/"config.yaml" + end + sleep 5 + + psql = Formula["libpq"].opt_bin/"psql" + connection_string = "postgresql://postgres:password@localhost:#{port}" + output = shell_output("#{psql} #{connection_string} -c 'SELECT DATABASE()' 2>&1") + assert_match "database \n----------\n postgres\n(1 row)", output + end +end diff --git a/Formula/d/domain-check.rb b/Formula/d/domain-check.rb new file mode 100644 index 0000000000000..1918a0b919fce --- /dev/null +++ b/Formula/d/domain-check.rb @@ -0,0 +1,35 @@ +class DomainCheck < Formula + desc "CLI tool for checking domain availability using RDAP and WHOIS protocols" + homepage "https://github.com/saidutt46/domain-check" + url "https://github.com/saidutt46/domain-check/archive/refs/tags/v0.6.0.tar.gz" + sha256 "37d3c700d288d8beac3e6685d23a6034de5fb10538691dc53f6c679a26e76fb4" + license "Apache-2.0" + head "https://github.com/saidutt46/domain-check.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "829c048778054b22f4db890f78cbd3f75fde925f026e0b81b9200085e1f1aa5b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "635d21a45cf09356c46b9851b7de92b6fd423278a99e787287745df69a17587b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9924c37da9b37b9cde0f7216a50b9cfb605535c713e26796138e8deec5c7d316" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6800c2f7cc58f98ef6944b344949e758e60c10ddb5d21055c09e0939ec656a5" + sha256 cellar: :any_skip_relocation, sonoma: "5391a580a4d148ffc763b027fee2c3c4f2c5909a96dd6f487f0db3b3b14e2d58" + sha256 cellar: :any_skip_relocation, ventura: "24ce8d5ebf223fa8c46262f7cc22f059ae641b045bd523a302113d16c1a5f13e" + sha256 cellar: :any_skip_relocation, arm64_linux: "264985616da42cca2e4bf09669a82ab41739d1b6be1fd3dd187169930f287492" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73d90ab7d9d70bf77574b54a5ce39f874a17fbf3a0874dfc0b5010c8c493f85f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "domain-check") + end + + test do + assert_match version.to_s, shell_output("#{bin}/domain-check --version") + + output = shell_output("#{bin}/domain-check example.com") + assert_match "example.com TAKEN", output + + output = shell_output("#{bin}/domain-check invalid_domain 2>&1", 1) + assert_match "Error: No valid domains found to check", output + end +end diff --git a/Formula/d/dooit.rb b/Formula/d/dooit.rb new file mode 100644 index 0000000000000..7508dbeee5d72 --- /dev/null +++ b/Formula/d/dooit.rb @@ -0,0 +1,149 @@ +class Dooit < Formula + include Language::Python::Virtualenv + + desc "TUI todo manager" + homepage "https://github.com/dooit-org/dooit" + url "https://files.pythonhosted.org/packages/e6/05/13192bae53c2e574dbdbb4aac3d4c7c7e62744256f99a89987dcf6a3831c/dooit-3.3.3.tar.gz" + sha256 "611f078ab3069d6a222e5651e71b72c4578cbfa0db8dda265dd44b4683f84478" + license "MIT" + head "https://github.com/dooit-org/dooit.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "add56b163b357644012dbc01ba0fce04f2651f107b530337df4c9f75ea6e52fa" + sha256 cellar: :any, arm64_sequoia: "57575492929a2d8bc53697d7030b7c1fa952e237b041b6aefe7604b46809e188" + sha256 cellar: :any, arm64_sonoma: "830bbbd0340eca2fec4492071b40dd2e4f5d0dddb119e924f720fb595594bdf1" + sha256 cellar: :any, sonoma: "14be926450e912b12e65238d2f89c978a6239bf77a6c5f82817198e60f5b7ec5" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd31bddf6ed12019e979a942ff4abbad0ab59cda60c4244f69524a11fe8c4820" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70fcd4f2bf114687483ac3ff123f5a80257d87c3624bf3fcfd263ae8641622f0" + end + + depends_on "cmake" => :build + depends_on "libyaml" + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sqlalchemy" do + url "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz" + sha256 "0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/ba/ce/f0f938d33d9bebbf8629e0020be00c560ddfa90a23ebe727c2e5aa3f30cf/textual-5.3.0.tar.gz" + sha256 "1b6128b339adef2e298cc23ab4777180443240ece5c232f29b22960efd658d4d" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"dooit", shell_parameter_format: :click) + end + + test do + PTY.spawn(bin/"dooit") do |r, w, _pid| + r.winsize = [80, 43] + sleep 1 + # Create a topic + w.write "a" + sleep 1 + w.write "Test Topic" + sleep 1 + w.write "\e" + sleep 1 + # Create a todo in the topic + w.write "\n" + sleep 1 + w.write "a" + sleep 1 + w.write "Test Todo" + sleep 1 + w.write "\e" + sleep 1 + # Exit + w.write "\x03" + begin + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + end +end diff --git a/Formula/d/dopewars.rb b/Formula/d/dopewars.rb new file mode 100644 index 0000000000000..57348e0c968de --- /dev/null +++ b/Formula/d/dopewars.rb @@ -0,0 +1,54 @@ +class Dopewars < Formula + desc 'Free rewrite of a game originally based on "Drug Wars"' + homepage "https://dopewars.sourceforge.io" + url "https://downloads.sourceforge.net/project/dopewars/dopewars/1.6.2/dopewars-1.6.2.tar.gz" + sha256 "623b9d1d4d576f8b1155150975308861c4ec23a78f9cc2b24913b022764eaae1" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "e8059b057bea2eb7a0c33542aebc0be5dfb26ba9f681594af77f6584accd328f" + sha256 arm64_sequoia: "5e19478fc233eac61d8c45e6b671f1853c0b4f95777a4a2d99ad1ed6eac6d38a" + sha256 arm64_sonoma: "8cb9bfd69260ceae6ce8a5062fcba8ee7aa4edcb7191dc048c0d03ca13a783aa" + sha256 arm64_ventura: "f6c44772360736b7f1aabbee2da0371fcef2435309a4a632d870e53af1e0729b" + sha256 arm64_monterey: "076caa9d67e4e4f3fd0067ae16097631c0b0eaf6e243f9a78c48c70214b915f8" + sha256 arm64_big_sur: "2ebf3c275304427354f21de5426b2b9a1262ad60cb6e8d53b181114e2d56156a" + sha256 sonoma: "e6982cf7073199453e1aeca1fd7b0fa6ec852ad5162c45579baac9fec3d46a59" + sha256 ventura: "4f6d47cccb1c3ac186e1292963386355f28bd865f0d957275df20a9955266a8e" + sha256 monterey: "e321eb969358620d608a6021255cfc4f3a749779c2d307c09104d0f74e68613a" + sha256 big_sur: "32b55701ab1ec3a70bbd9b27b7fedca2e0cecf7e78877e39338c71b6eb810f3e" + sha256 arm64_linux: "bed017e7392dec34e43b0c79583de05fe42da19359046dbae1e5f8ea46144c38" + sha256 x86_64_linux: "7a543edc764a62a6b9c5e9884acb00b034e4631248f9c6b44e4c0cd8483f4e50" + end + + depends_on "pkgconf" => :build + + depends_on "glib" + + uses_from_macos "curl" + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + def install + inreplace "src/Makefile.in", "$(dopewars_DEPENDENCIES)", "" + inreplace "src/Makefile.in", "chmod", "true" + inreplace "auxbuild/ltmain.sh", "need_relink=yes", "need_relink=no" + inreplace "src/plugins/Makefile.in", "LIBADD =", "LIBADD = -module -avoid-version" + + system "./configure", "--disable-gui-client", + "--disable-gui-server", + "--enable-plugins", + "--enable-networking", + "--mandir=#{man}", + *std_configure_args + system "make", "install", "chgrp=true" + end + + test do + system bin/"dopewars", "-v" + end +end diff --git a/Formula/d/doppler.rb b/Formula/d/doppler.rb new file mode 100644 index 0000000000000..3789748e680a7 --- /dev/null +++ b/Formula/d/doppler.rb @@ -0,0 +1,38 @@ +class Doppler < Formula + desc "CLI for interacting with Doppler secrets and configuration" + homepage "https://docs.doppler.com/docs" + url "https://github.com/DopplerHQ/cli/archive/refs/tags/3.75.1.tar.gz" + sha256 "1487ff5cbc24a398f746a0fa07261abaaee89acffbf3861801f8c3cc58fde122" + license "Apache-2.0" + head "https://github.com/DopplerHQ/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b8ba3844a7e3281b2c003efb33aaecf3aa903fe193f5e091fb70b01899b68310" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c6c9327df7c0c4b1e8c497fdd3acc7d8fb13c34fa8d38d6733e1203428b31b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c6c9327df7c0c4b1e8c497fdd3acc7d8fb13c34fa8d38d6733e1203428b31b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c6c9327df7c0c4b1e8c497fdd3acc7d8fb13c34fa8d38d6733e1203428b31b4" + sha256 cellar: :any_skip_relocation, sonoma: "bff18de552956fa3893a9f8eb2da726de251d7c20429798224eb3cec82e8dfe3" + sha256 cellar: :any_skip_relocation, ventura: "bff18de552956fa3893a9f8eb2da726de251d7c20429798224eb3cec82e8dfe3" + sha256 cellar: :any_skip_relocation, arm64_linux: "321133b6771e1ac26d4324c8cb1dc579cba7d9dadda04dfcfb771aa8727a1e74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08ce028ea8d6d035e69508e1a66294e84cc2fc6a14f9e6f29ea1e4c836ebb6bc" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=dev-#{version} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"doppler", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/doppler --version") + + output = shell_output("#{bin}/doppler setup 2>&1", 1) + assert_match "Doppler Error: you must provide a token", output + end +end diff --git a/Formula/d/dory.rb b/Formula/d/dory.rb new file mode 100644 index 0000000000000..8c003a141e778 --- /dev/null +++ b/Formula/d/dory.rb @@ -0,0 +1,45 @@ +class Dory < Formula + desc "Development proxy for docker" + homepage "https://github.com/freedomben/dory" + url "https://github.com/FreedomBen/dory/archive/refs/tags/v1.2.0.tar.gz" + sha256 "8c385d898aed2de82f7d0ab5c776561ffe801dd4b222a07e25e5837953355b81" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9c554cd1ff4108aa4262eb12aa832ecd12632c0781352e211d67a3ba3c28b630" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e75ebd666b1c2b3d1ff21d0cdc9d8f820935e41e32c12533a544ccc4563f44db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "445dc72e8fd5886e5378277044e12edabcdd9136857bbc7b259ef76a5d4941cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "801315212e458f3a16eba1e62acbe37a7ddec7fe6542b1546a0b01e4d33d8f27" + sha256 cellar: :any_skip_relocation, arm64_monterey: "801315212e458f3a16eba1e62acbe37a7ddec7fe6542b1546a0b01e4d33d8f27" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "801315212e458f3a16eba1e62acbe37a7ddec7fe6542b1546a0b01e4d33d8f27" + sha256 cellar: :any_skip_relocation, sonoma: "2ab9300321c48cb22e9fb417d9f80b08def6219a4fc0fd1ea834e7ca43e50aee" + sha256 cellar: :any_skip_relocation, ventura: "dc275970eb94ef3bba02bd5bf12241e26e4a35f415fa9de16710d9fe80b978bc" + sha256 cellar: :any_skip_relocation, monterey: "dc275970eb94ef3bba02bd5bf12241e26e4a35f415fa9de16710d9fe80b978bc" + sha256 cellar: :any_skip_relocation, big_sur: "dc275970eb94ef3bba02bd5bf12241e26e4a35f415fa9de16710d9fe80b978bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "8238cb7a9ec990b6460404d79e97d9de59914803d0b9c6498f786194acf9eb17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af4be9da0d1d895883e8527052f05d6c6d2da3c4c24bf123c62bc8dc4a0973d4" + end + + depends_on "ruby" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + shell_output(bin/"dory") + + system bin/"dory", "config-file" + assert_path_exists testpath/".dory.yml", "Dory could not generate config file" + + version = shell_output("#{bin}/dory version") + assert_match version.to_s, version, "Unexpected output of version" + end +end diff --git a/Formula/d/dos2unix.rb b/Formula/d/dos2unix.rb new file mode 100644 index 0000000000000..442a90245df39 --- /dev/null +++ b/Formula/d/dos2unix.rb @@ -0,0 +1,59 @@ +class Dos2unix < Formula + desc "Convert text between DOS, UNIX, and Mac formats" + homepage "https://waterlan.home.xs4all.nl/dos2unix.html" + url "https://waterlan.home.xs4all.nl/dos2unix/dos2unix-7.5.3.tar.gz" + mirror "https://fossies.org/linux/misc/dos2unix-7.5.3.tar.gz" + sha256 "28a4b0d9f9179da4e44c567b9c01f818b070a20827115fffd96f760dcfa0f3b2" + license "BSD-2-Clause" + + livecheck do + url "https://waterlan.home.xs4all.nl/dos2unix/" + regex(/href=.*?dos2unix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4a4f1d549630f2b7d913b78f5928eb1a76af2534ac182e46636f1e5ee2d8b62c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "da0bed04130bc8e767908d32e744f8d5ce7a88941af553d8534dafbb6f502847" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "88d9e7167d007f9e25dfa962db52556e13f7dfcd58e2cddb2782f1181e69aa2f" + sha256 cellar: :any_skip_relocation, sonoma: "062aea79a6599994b28d5518231ae6a1f447a58795f73e029ee73d1ff1e237cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "9264c8e7094220261ad7a6c5a8f394e00685bca15abe249fffc7782750d47eb9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7802a620432af0710bef945aaa0d15190b66274f889bea9c31bf2862ad71b6e" + end + + def install + args = %W[ + prefix=#{prefix} + CC=#{ENV.cc} + CPP=#{ENV.cc} + CFLAGS=#{ENV.cflags} + ENABLE_NLS= + install + ] + + system "make", *args + end + + test do + # write a file with lf + test_file = testpath/"test.txt" + test_file.write "foo\nbar\n" + + # unix2mac: convert lf to cr + system bin/"unix2mac", test_file + assert_equal "foo\rbar\r", test_file.read + + # mac2unix: convert cr to lf + system bin/"mac2unix", test_file + assert_equal "foo\nbar\n", test_file.read + + # unix2dos: convert lf to cr+lf + system bin/"unix2dos", test_file + assert_equal "foo\r\nbar\r\n", test_file.read + + # dos2unix: convert cr+lf to lf + system bin/"dos2unix", test_file + assert_equal "foo\nbar\n", test_file.read + end +end diff --git a/Formula/d/dosbox-staging.rb b/Formula/d/dosbox-staging.rb new file mode 100644 index 0000000000000..b00706f764c7e --- /dev/null +++ b/Formula/d/dosbox-staging.rb @@ -0,0 +1,70 @@ +class DosboxStaging < Formula + desc "Modernized DOSBox soft-fork" + homepage "https://dosbox-staging.github.io/" + url "https://github.com/dosbox-staging/dosbox-staging/archive/refs/tags/v0.82.2.tar.gz" + sha256 "387c97b373c3164ab5abbbc2b210bf94b5567057abe44ee1e8b4d4e725bd422c" + license "GPL-2.0-or-later" + head "https://github.com/dosbox-staging/dosbox-staging.git", branch: "main" + + # New releases of dosbox-staging are indicated by a GitHub release (and + # an announcement on the homepage), not just a new version tag. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "08e2afb5389649c1da8e0242ed58cb937b6f95231383aa78aee2eddbb478b6d0" + sha256 arm64_sequoia: "67bbc49e8ce9292918ec0fe1bd6155ddda3260ef7f840be35a562f2d51fbfdb9" + sha256 arm64_sonoma: "7400c7d85ec825c4aa117fd41a3d0d91f630b4dd6f4eb66df9941a31796f9dd1" + sha256 arm64_ventura: "d0907c011b0cb842686fe223cddbb4267279c9b1a6e1d213f29c6ce353c045f4" + sha256 sonoma: "2ad78b97010edb15688741a486ab570cbc21479e745a189aba2647e6e6c25492" + sha256 ventura: "30d04f3c8adc6a210c39ff2d6ee4c6f70b8013f27415c12bac4e76acd0583d39" + sha256 arm64_linux: "f6ef8be8b1eb88195f99f7fc76c24b902f56ea449a6a3aa223675854dde18518" + sha256 x86_64_linux: "5886d49c71e462a00183ed14a7c8aa39b1381c2e199315de86ffae3d137db515" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "fluid-synth" + depends_on "glib" + depends_on "iir1" + depends_on "libpng" + depends_on "libslirp" + depends_on "mt32emu" + depends_on "opusfile" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_net" + depends_on "speexdsp" + + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + rm_r(buildpath/"subprojects") # Ensure we don't use vendored dependencies + args = %w[-Ddefault_library=shared -Db_lto=true -Dtracy=false] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + mv bin/"dosbox", bin/"dosbox-staging" + mv man1/"dosbox.1", man1/"dosbox-staging.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/dosbox-staging -version") + config_path = OS.mac? ? "Library/Preferences/DOSBox" : ".config/dosbox" + mkdir testpath/config_path + touch testpath/config_path/"dosbox-staging.conf" + output = shell_output("#{bin}/dosbox-staging -printconf") + assert_equal testpath/config_path/"dosbox-staging.conf", Pathname(output.chomp) + end +end diff --git a/Formula/d/dosbox-x.rb b/Formula/d/dosbox-x.rb new file mode 100644 index 0000000000000..bc2413c3ce3c6 --- /dev/null +++ b/Formula/d/dosbox-x.rb @@ -0,0 +1,75 @@ +class DosboxX < Formula + desc "DOSBox with accurate emulation and wide testing" + homepage "https://dosbox-x.com/" + url "https://github.com/joncampbell123/dosbox-x/archive/refs/tags/dosbox-x-v2025.10.07.tar.gz" + sha256 "fed630dba74f1ad1552bc5ec94cb68f70737e67a7ca1768f6071b255426ce117" + license "GPL-2.0-or-later" + version_scheme 1 + head "https://github.com/joncampbell123/dosbox-x.git", branch: "master" + + # We check multiple releases because upstream sometimes creates releases with + # a `dosbox-x-windows-` tag prefix and we've historically only used releases + # with the `dosbox-x-` tag prefix. If upstream stops creating `...windows-` + # releases in the future (or they are versions that are also appropriate for + # the formula), we can update this to us the `GithubLatest` strategy. + livecheck do + url :stable + regex(/^dosbox-x[._-]v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 arm64_tahoe: "10b4217eeddf7dfbdadfd38c81b940d733407c708f075de792ba7e532dcbde76" + sha256 arm64_sequoia: "6ded75e5aed788f6bc932e3e7998663215978f190bdeafd3bd7f86ad638258a9" + sha256 arm64_sonoma: "ec5107377e5e371ec30adeb6ee1e44f18a852b4e2ca4e36b4d2f0620c3d67cb8" + sha256 sonoma: "fec035c869127bb3f3cb3b666d1a1e30611b500a361213b832cc1d1b5295f192" + sha256 arm64_linux: "09b78fd526f6ddc14fde58ef82b96582bceddfc1d03a6cc12336592046ec7b7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a417ce0f945ac143020a27e6ac940f60f0f1c1c4d8fdeaa29f5d3eecdbbdd517" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + depends_on "fluid-synth" + depends_on "freetype" + depends_on "libpng" + depends_on "libslirp" + depends_on "sdl2" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "glib" + end + + on_linux do + depends_on "alsa-lib" + depends_on "libx11" + depends_on "libxrandr" + end + + def install + ENV.cxx11 + + # See flags in `build-macos-sdl2`. + args = %w[ + --enable-debug=heavy + --enable-sdl2 + --disable-sdl2test + --disable-sdl + --disable-sdltest + ] + + system "./autogen.sh" + system "./configure", *args, *std_configure_args.reject { |s| s["--disable-debug"] } + system "make" # Needs to be called separately from `make install`. + system "make", "install" + end + + test do + assert_match "DOSBox-X version #{version}", shell_output("#{bin}/dosbox-x -version 2>&1", 1) + end +end diff --git a/Formula/d/dosfstools.rb b/Formula/d/dosfstools.rb new file mode 100644 index 0000000000000..4bb1f68d92e23 --- /dev/null +++ b/Formula/d/dosfstools.rb @@ -0,0 +1,59 @@ +class Dosfstools < Formula + desc "Tools to create, check and label file systems of the FAT family" + homepage "https://github.com/dosfstools" + license "GPL-3.0-or-later" + head "https://github.com/dosfstools/dosfstools.git", branch: "master" + + stable do + url "https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz" + sha256 "64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527" + + # remove in next release + # https://github.com/dosfstools/dosfstools/pull/166 + patch do + url "https://github.com/dosfstools/dosfstools/commit/77ffb87e8272760b3bb2dec8f722103b0effb801.patch?full_index=1" + sha256 "ecbd911eae51ed382729cd1fb84d4841b3e1e842d08e45b05d61f41fbd0a88ff" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d54a1407f985fc34279f07ead09aa53ae0cbe1a24b8a7328d4cbcb8fb24d9c49" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a865f34d1361ac215e3ec359fd524e4ee92ea63cac75ccaac99298c871aa4b28" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "574e8d06c7e0cfd4c57b7d3187a7ba4b0d59a4162e6550e5f49afcfb9de8090d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "40a3ed816a04a4104a60aa95f8ae76bee9be12872e8147c0a41fa3f879f11ced" + sha256 cellar: :any_skip_relocation, arm64_monterey: "41e7da04f31a04e5ad7fc460b9c15b6526780fab0de0339fcdea540dfbaec964" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3d8437b8921385c7675d2502c0c7b746f060e6b1656923e061173d568927f34d" + sha256 cellar: :any_skip_relocation, sonoma: "4b06025314c13c2f4d2c1e8c2af272bfed50dcb51f2845ff12e19485851b78ba" + sha256 cellar: :any_skip_relocation, ventura: "134a64a971297ad37b2635532916116f6350c3771c03efa6ea3da259bb260ce1" + sha256 cellar: :any_skip_relocation, monterey: "e288a32bae22472eb31806afad3a025220d7284ddf6cdbf5b48a196ec5831139" + sha256 cellar: :any_skip_relocation, big_sur: "c4f450bef47449fa57d911e1c3610cd65bf8d7fd661e3efc8a0a44c7d45510f5" + sha256 cellar: :any_skip_relocation, catalina: "df9afee3d6ec3da028a6fdd487b98800099f8aa248261c35ed2821e984b91a70" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f175df17e208a3e33de63fa36168da5daff1fe7a5ae61be6e7e140838171b95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "584daa5a52ed21b3b23eba4323ebec3fa8421062c9cac5d833e60b91da0a7636" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + + def install + # Workaround for https://github.com/dosfstools/dosfstools/pull/218 + ENV.append_path "ACLOCAL_PATH", Formula["gettext"].pkgshare/"m4" + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--enable-compat-symlinks", + "--without-udev", + *std_configure_args + system "make", "install" + end + + test do + system "dd", "if=/dev/zero", "of=test.bin", "bs=512", "count=1024" + system sbin/"mkfs.fat", "test.bin", "-n", "HOMEBREW", "-v" + system sbin/"fatlabel", "test.bin" + system sbin/"fsck.fat", "-v", "test.bin" + end +end diff --git a/Formula/d/dotbot.rb b/Formula/d/dotbot.rb new file mode 100644 index 0000000000000..eb103124126cd --- /dev/null +++ b/Formula/d/dotbot.rb @@ -0,0 +1,44 @@ +class Dotbot < Formula + include Language::Python::Virtualenv + + desc "Tool that bootstraps your dotfiles" + homepage "https://github.com/anishathalye/dotbot" + url "https://files.pythonhosted.org/packages/05/4b/8308f726306d3d983323dd9bfa55e3610a07168f56ef612ecae05998ed55/dotbot-1.23.1.tar.gz" + sha256 "b6e419a898c03d2ecaaf802af9764041ac583fc59e367bdde509640c5d193f3b" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ee51eb3c9c781b874266489e72eaedde69b5835768927a0564caa07754c94b1b" + sha256 cellar: :any, arm64_sequoia: "a01aca0b02a12194ab780fc68f9782048a8e07d80bf85921a308a0f2e4a4c29a" + sha256 cellar: :any, arm64_sonoma: "ef8170a154784e43ed2aa42da39277048053e5a4df02dd34edb3b76979478abe" + sha256 cellar: :any, sonoma: "9130e0815cae534f4e554b39653145bd888f54bd70224522e54d6c0ca7d53be8" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f66f6e4ec5fdcdc198b6fb925ae52de5a90d44ed0da1320772f1ff6650f05c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98f397c00719cc2e5959d51c36ea47d2a0f7bc39601c9154506647b15759cbce" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"install.conf.yaml").write <<~YAML + - create: + - brew + - .brew/test + YAML + + output = shell_output("#{bin}/dotbot --verbose -c #{testpath}/install.conf.yaml") + assert_match "All tasks executed successfully", output + assert_path_exists testpath/"brew" + assert_path_exists testpath/".brew/test" + end +end diff --git a/Formula/d/dotdrop.rb b/Formula/d/dotdrop.rb new file mode 100644 index 0000000000000..dc127c51845d7 --- /dev/null +++ b/Formula/d/dotdrop.rb @@ -0,0 +1,108 @@ +class Dotdrop < Formula + include Language::Python::Virtualenv + + desc "Save your dotfiles once, deploy them everywhere" + homepage "https://github.com/deadc0de6/dotdrop" + url "https://files.pythonhosted.org/packages/66/a7/8c8f1d7268bcb0ae3f7e43d8b0da03ad0c1336baabbd4b9ce88a4b1d7b36/dotdrop-1.15.0.tar.gz" + sha256 "7e7b5558a66ac514c3861e0bb31262d5972bc15fc97c1402aef8cccffd0bde61" + license "GPL-3.0-or-later" + revision 4 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "451da4be80092f2fdb7d8f48ad757aa603537efe342cde0125a4c881a7ea5b37" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "078bef4e6b8fd9f6827547920dda3b2a1ae9ac9a007a4df215dc686c2c328b1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed816080324de42f025bb1a0be41d28e7a868cb2fc2d00eeb25b72116a7e2ab0" + sha256 cellar: :any_skip_relocation, sonoma: "8f5c5f1484f3e15f62a292cb544a2708680b45cb58c023f9a0eff56b22e5aa82" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8f4c86627b70e9ae999eee610929030746ce5e536834aa89492d81150b8dff6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ed6ad12c63bb115d142025043dbce43396beffab79f9d12a126f68ce8437481" + end + + depends_on "certifi" => :no_linkage + depends_on "libmagic" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "docopt-ng" do + url "https://files.pythonhosted.org/packages/e4/50/8d6806cf13138127692ae6ff79ddeb4e25eb3b0bcc3c1bd033e7e04531a9/docopt_ng-0.9.0.tar.gz" + sha256 "91c6da10b5bb6f2e9e25345829fb8278c78af019f6fc40887ad49b060483b1d7" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "python-magic" do + url "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz" + sha256 "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"xxx.conf").write("12345678") + (testpath/"config.yaml").write <<~YAML + config: + dotpath: . + dotfiles: + f_xxx: + dst: yyy.conf + src: xxx.conf + profiles: + home: + dotfiles: + - f_xxx + YAML + system bin/"dotdrop", "install", "--profile=home" + assert_match "12345678", File.read("yyy.conf") + end +end diff --git a/Formula/d/dotenv-linter.rb b/Formula/d/dotenv-linter.rb new file mode 100644 index 0000000000000..330ff16799b2a --- /dev/null +++ b/Formula/d/dotenv-linter.rb @@ -0,0 +1,43 @@ +class DotenvLinter < Formula + desc "Lightning-fast linter for .env files written in Rust" + homepage "https://dotenv-linter.github.io" + url "https://github.com/dotenv-linter/dotenv-linter/archive/refs/tags/v4.0.0.tar.gz" + sha256 "c10f63e84a877b630986a59680df20ee3f49ae3f89daa8d7e65f427d31b13a32" + license "MIT" + head "https://github.com/dotenv-linter/dotenv-linter.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "23826a36202a165deaa312c7b0029d0c02eef0d21b49c56d20f2deb23cf38de0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c18328c0319bad89891c989253a6ee818fe235f9d439bea847a52b936f50521a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9001d81807e8c5e9f7f0284a7ff516d3d72f6f182adf4a5c7a8b82e6f35d89f" + sha256 cellar: :any_skip_relocation, sonoma: "4f47ec451241a91ccdccb741cd61576f403962637841fcd8b49b8f292ce9e301" + sha256 cellar: :any_skip_relocation, arm64_linux: "a630789bddee63f8c975359e0b77394b6cca50e95abc9ccc3d4988984bdf9030" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd0da61986447dbdadec3a8634cf19d5eb12d1ce4bb1c61acf53f67c0187b126" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "dotenv-cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dotenv-linter --version") + + (testpath/".env").write <<~EOS + FOO=bar + FOO=bar + BAR=foo + EOS + + (testpath/".env.test").write <<~EOS + 1FOO=bar + _FOO=bar + EOS + + output = shell_output("#{bin}/dotenv-linter check .env .env.test", 1) + assert_match(/\.env:2\s+DuplicatedKey/, output) + assert_match(/\.env:3\s+UnorderedKey/, output) + assert_match(/\.env.test:1\s+LeadingCharacter/, output) + end +end diff --git a/Formula/d/dotnet.rb b/Formula/d/dotnet.rb new file mode 100644 index 0000000000000..af793f12c546f --- /dev/null +++ b/Formula/d/dotnet.rb @@ -0,0 +1,174 @@ +class Dotnet < Formula + desc ".NET Core" + homepage "https://dotnet.microsoft.com/" + license "MIT" + version_scheme 1 + head "https://github.com/dotnet/dotnet.git", branch: "main" + + stable do + # Source-build tag announced at https://github.com/dotnet/source-build/discussions + version "9.0.8" + url "https://github.com/dotnet/dotnet/archive/refs/tags/v9.0.109.tar.gz" + sha256 "42fdfe3733884a3f6ceb3b428ff346ccb92f95010c447e27f3b164f70145730c" + + resource "release.json" do + version "9.0.8" + url "https://github.com/dotnet/dotnet/releases/download/v9.0.109/release.json" + sha256 "328388103bf81072b638984d05b9dff5b6520a366d6448abbc7b985539deb8f4" + + livecheck do + formula :parent + end + end + end + + livecheck do + url :stable + regex(/^v?(\d+\.\d+\.\d{1,2})$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "343566caa1011741a13303014ceee74a91d807de9cd77f0438324939f9ff65bb" + sha256 cellar: :any, arm64_sequoia: "0f23879804542b8e66c8521b87af973069165fc9379749083a25537aae9f94b1" + sha256 cellar: :any, arm64_sonoma: "5fbde0a48d63af42c31612f0384e009d879ee9af741d22fc5422d5df4b41d6b5" + sha256 cellar: :any, arm64_ventura: "15e04bd0623d3981d7f19ccd7211e408113359382bd924ecf2df77c818d3c994" + sha256 cellar: :any, ventura: "cf89f9ff2627bbc1c5deb19df544de345e7b59f0b2f701dac30742795d0ddbe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1c0d7633d3c96929f02dc32132377889ee6585b9b9b6e115312434af40ca24f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22511e3d0ff36ec596f3cfdd8cfee282a67b4226f2916b94ebf162bc83c0f9c9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rapidjson" => :build + depends_on "brotli" + depends_on "icu4c@77" + depends_on "openssl@3" + + uses_from_macos "python" => :build + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "grep" => :build # grep: invalid option -- P + end + + on_linux do + depends_on "libunwind" + depends_on "lttng-ust" + end + + conflicts_with cask: "dotnet-runtime" + conflicts_with cask: "dotnet-runtime@preview" + conflicts_with cask: "dotnet-sdk" + conflicts_with cask: "dotnet-sdk@preview" + + def install + if OS.mac? + # Need GNU grep (Perl regexp support) to use release manifest rather than git repo + ENV.prepend_path "PATH", Formula["grep"].libexec/"gnubin" + + # Avoid mixing CLT and Xcode.app when building CoreCLR component which can + # cause undefined symbols, e.g. __swift_FORCE_LOAD_$_swift_Builtin_float + ENV["SDKROOT"] = MacOS.sdk_path + else + icu4c_dep = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + ENV.append_path "LD_LIBRARY_PATH", icu4c_dep.to_formula.opt_lib + + # Work around build script getting stuck when running shutdown command on Linux + # TODO: Try removing in the next release + # Ref: https://github.com/dotnet/source-build/discussions/3105#discussioncomment-4373142 + inreplace "build.sh", '"$CLI_ROOT/dotnet" build-server shutdown', "" + inreplace "repo-projects/Directory.Build.targets", + '"$(DotnetTool) build-server shutdown --vbcscompiler"', + '"true"' + end + + args = ["--clean-while-building", "--source-build", "--with-system-libs", "brotli+libunwind+rapidjson+zlib"] + if build.stable? + args += ["--release-manifest", "release.json"] + odie "Update release.json resource!" if resource("release.json").version != version + buildpath.install resource("release.json") + end + + system "./prep-source-build.sh" + # We unset "CI" environment variable to work around aspire build failure + # error MSB4057: The target "GitInfo" does not exist in the project. + # Ref: https://github.com/Homebrew/homebrew-core/pull/154584#issuecomment-1815575483 + with_env(CI: nil) do + system "./build.sh", *args + end + + libexec.mkpath + tarball = buildpath.glob("artifacts/*/Release/dotnet-sdk-*.tar.gz").first + system "tar", "--extract", "--file", tarball, "--directory", libexec + doc.install libexec.glob("*.txt") + (bin/"dotnet").write_env_script libexec/"dotnet", DOTNET_ROOT: libexec + + bash_completion.install "src/sdk/scripts/register-completions.bash" => "dotnet" + zsh_completion.install "src/sdk/scripts/register-completions.zsh" => "_dotnet" + man1.install Utils::Gzip.compress(*buildpath.glob("src/sdk/documentation/manpages/sdk/*.1")) + man7.install Utils::Gzip.compress(*buildpath.glob("src/sdk/documentation/manpages/sdk/*.7")) + end + + def caveats + <<~CAVEATS + For other software to find dotnet you may need to set: + export DOTNET_ROOT="#{opt_libexec}" + CAVEATS + end + + test do + target_framework = "net#{version.major_minor}" + + (testpath/"test.cs").write <<~CS + using System; + + namespace Homebrew + { + public class Dotnet + { + public static void Main(string[] args) + { + var joined = String.Join(",", args); + Console.WriteLine(joined); + } + } + } + CS + + (testpath/"test.csproj").write <<~XML + + + Exe + #{target_framework} + AnyCPU + Homebrew + Homebrew.Dotnet + Homebrew.Dotnet + $(AssemblyName) + false + + + + + + XML + + system bin/"dotnet", "build", "--framework", target_framework, "--output", testpath, testpath/"test.csproj" + output = shell_output("#{bin}/dotnet run --framework #{target_framework} #{testpath}/test.dll a b c") + # We switched to `assert_match` due to progress status ANSI codes in output. + # TODO: Switch back to `assert_equal` once fixed in release. + # Issue ref: https://github.com/dotnet/sdk/issues/44610 + assert_match "#{testpath}/test.dll,a,b,c\n", output + + # Test to avoid uploading broken Intel Sonoma bottle which has stack overflow on restore. + # See https://github.com/Homebrew/homebrew-core/issues/197546 + resource "docfx" do + url "https://github.com/dotnet/docfx/archive/refs/tags/v2.78.3.tar.gz" + sha256 "d97142ff71bd84e200e6d121f09f57d28379a0c9d12cb58f23badad22cc5c1b7" + end + resource("docfx").stage do + system bin/"dotnet", "restore", "src/docfx", "--disable-build-servers", "--no-cache" + end + end +end diff --git a/Formula/d/dotnet@6.rb b/Formula/d/dotnet@6.rb new file mode 100644 index 0000000000000..6e38def8e2e89 --- /dev/null +++ b/Formula/d/dotnet@6.rb @@ -0,0 +1,354 @@ +class DotnetAT6 < Formula + desc ".NET Core" + homepage "https://dotnet.microsoft.com/" + # Source-build tag announced at https://github.com/dotnet/source-build/discussions + url "https://github.com/dotnet/installer.git", + tag: "v6.0.136", + revision: "d638663530d923adbe0442604b7a6562127321e9" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "82ed4db4fccf6439ffd03275abba8ef8801185780eea042f7f2f445647b2058a" + sha256 cellar: :any, arm64_sequoia: "17a1b695a3859a75a1379c9ff5aa044a1e0d4517d27454ab699a88992ed4054c" + sha256 cellar: :any, arm64_sonoma: "3842fe4efbd79ee741fddf3e27f33e9d3a14533c4a7a8b27ebc9fa6423906cf7" + sha256 cellar: :any, sonoma: "10a9849193aa400d0542751ba82dfc7c03721f01c38a143fcf7f7bdd1e762349" + sha256 cellar: :any_skip_relocation, arm64_linux: "194441cf808cb24d14994881e2f30fd0bce8f28375430f4c8c75881cc801116f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a66fa701d2a875604a253d37f89772910bb6aae1ed402abe5c52444f62264ecf" + end + + keg_only :versioned_formula + + # https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#lifecycle + deprecate! date: "2024-11-12", because: :unsupported + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "icu4c@77" + depends_on "openssl@3" + + uses_from_macos "llvm" => :build + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_linux do + depends_on "libunwind" + depends_on "lttng-ust" + end + + # Upstream only directly supports and tests llvm/clang builds. + # GCC builds have limited support via community. + fails_with :gcc + + # Apple Silicon build fails due to latest dotnet-install.sh downloading x64 dotnet-runtime. + # We work around the issue by using an older working copy of dotnet-install.sh script. + # Bug introduced with https://github.com/dotnet/install-scripts/pull/314 + # Issue ref: https://github.com/dotnet/install-scripts/issues/318 + resource "dotnet-install.sh" do + url "https://raw.githubusercontent.com/dotnet/install-scripts/dac53157fcb7e02638507144bf5f8f019c1d23a8/src/dotnet-install.sh" + sha256 "e96eabccea61bbbef3402e23f1889d385a6ae7ad84fe1d8f53f2507519ad86f7" + end + + # Fixes race condition in MSBuild. + resource "homebrew-msbuild-patch" do + url "https://github.com/dotnet/msbuild/commit/64edb33a278d1334bd6efc35fecd23bd3af4ed48.patch?full_index=1" + sha256 "5870bcdd12164668472094a2f9f1b73a4124e72ac99bbbe43028370be3648ccd" + end + + # Fix build failure on macOS due to missing bootstrap packages + # Fix build failure on macOS ARM due to `osx-x64` override + # Issue ref: https://github.com/dotnet/source-build/issues/2795 + patch :DATA + + # Backport fix to build with Clang 19 + # Ref: https://github.com/dotnet/runtime/commit/043ae8c50dbe1c7377cf5ad436c5ac1c226aef79 + def clang19_patch + <<~PATCH + diff --git a/src/coreclr/vm/comreflectioncache.hpp b/src/coreclr/vm/comreflectioncache.hpp + index 08d173e61648c6ebb98a4d7323b30d40ec351d94..12db55251d80d24e3765a8fbe6e3b2d24a12f767 100644 + --- a/src/coreclr/vm/comreflectioncache.hpp + +++ b/src/coreclr/vm/comreflectioncache.hpp + @@ -26,6 +26,7 @@ template class ReflectionCache + + void Init(); + + +#ifndef DACCESS_COMPILE + BOOL GetFromCache(Element *pElement, CacheType& rv) + { + CONTRACTL + @@ -102,6 +103,7 @@ template class ReflectionCache + AdjustStamp(TRUE); + this->LeaveWrite(); + } + +#endif // !DACCESS_COMPILE + + private: + // Lock must have been taken before calling this. + @@ -141,6 +143,7 @@ template class ReflectionCache + return CacheSize; + } + + +#ifndef DACCESS_COMPILE + void AdjustStamp(BOOL hasWriterLock) + { + CONTRACTL + @@ -170,6 +173,7 @@ template class ReflectionCache + if (!hasWriterLock) + this->LeaveWrite(); + } + +#endif // !DACCESS_COMPILE + + void UpdateHashTable(SIZE_T hash, int slot) + { + PATCH + end + + # Backport fix to build with Xcode 16 (copying unixasmmacrosarm64.inc to unixasmmacrosamd64.inc for Intel macOS) + # Ref: https://github.com/dotnet/runtime/commit/562efd6824762dd0c1826cc99e006ad34a7e9e85 + def xcode16_patch + <<~'PATCH' + diff --git a/src/coreclr/pal/inc/unixasmmacrosamd64.inc b/src/coreclr/pal/inc/unixasmmacrosamd64.inc + index 976cc825f2eb4..4997e18b39858 100644 + --- a/src/coreclr/pal/inc/unixasmmacrosamd64.inc + +++ b/src/coreclr/pal/inc/unixasmmacrosamd64.inc + @@ -17,7 +17,12 @@ + .endm + + .macro PATCH_LABEL Name + +#if defined(__APPLE__) + + .alt_entry C_FUNC(\Name) + + .private_extern C_FUNC(\Name) + +#else + .global C_FUNC(\Name) + +#endif + C_FUNC(\Name): + .endm + + diff --git a/src/coreclr/pal/inc/unixasmmacrosarm64.inc b/src/coreclr/pal/inc/unixasmmacrosarm64.inc + index 976cc825f2eb4..4997e18b39858 100644 + --- a/src/coreclr/pal/inc/unixasmmacrosarm64.inc + +++ b/src/coreclr/pal/inc/unixasmmacrosarm64.inc + @@ -17,7 +17,12 @@ + .endm + + .macro PATCH_LABEL Name + +#if defined(__APPLE__) + + .alt_entry C_FUNC(\Name) + + .private_extern C_FUNC(\Name) + +#else + .global C_FUNC(\Name) + +#endif + C_FUNC(\Name): + .endm + + diff --git a/src/coreclr/vm/arm64/asmhelpers.S b/src/coreclr/vm/arm64/asmhelpers.S + index ebfefd693f074..48c91e65a098d 100644 + --- a/src/coreclr/vm/arm64/asmhelpers.S + +++ b/src/coreclr/vm/arm64/asmhelpers.S + @@ -176,8 +176,7 @@ NESTED_END ThePreStub, _TEXT + + LEAF_ENTRY ThePreStubPatch, _TEXT + nop + -.globl C_FUNC(ThePreStubPatchLabel) + -C_FUNC(ThePreStubPatchLabel): + +PATCH_LABEL ThePreStubPatchLabel + ret lr + LEAF_END ThePreStubPatch, _TEXT + + @@ -607,8 +606,12 @@ NESTED_END ResolveWorkerAsmStub, _TEXT + #ifdef FEATURE_READYTORUN + + NESTED_ENTRY DelayLoad_MethodCall_FakeProlog, _TEXT, NoHandler + -C_FUNC(DelayLoad_MethodCall): + +#if defined(__APPLE__) + + .alt_entry C_FUNC(DelayLoad_MethodCall) + +#endif + .global C_FUNC(DelayLoad_MethodCall) + +C_FUNC(DelayLoad_MethodCall): + + + PROLOG_WITH_TRANSITION_BLOCK + + add x0, sp, #__PWTB_TransitionBlock // pTransitionBlock + @@ -627,8 +630,11 @@ NESTED_END DelayLoad_MethodCall_FakeProlog, _TEXT + + .macro DynamicHelper frameFlags, suffix + NESTED_ENTRY DelayLoad_Helper\suffix\()_FakeProlog, _TEXT, NoHandler + -C_FUNC(DelayLoad_Helper\suffix): + +#if defined(__APPLE__) + + .alt_entry C_FUNC(DelayLoad_Helper\suffix) + +#endif + .global C_FUNC(DelayLoad_Helper\suffix) + +C_FUNC(DelayLoad_Helper\suffix): + + PROLOG_WITH_TRANSITION_BLOCK + + PATCH + end + + def install + if OS.linux? + icu4c = deps.map(&:to_formula).find { |f| f.name.match?(/^icu4c@\d+$/) } + ENV.append_path "LD_LIBRARY_PATH", icu4c.opt_lib if OS.linux? + ENV.append_to_cflags "-I#{Formula["krb5"].opt_include}" + ENV.append_to_cflags "-I#{Formula["zlib"].opt_include}" + end + + (buildpath/".dotnet").install resource("dotnet-install.sh") + (buildpath/"src/SourceBuild/tarball/patches/msbuild").install resource("homebrew-msbuild-patch") + (buildpath/"src/SourceBuild/tarball/patches/runtime/clang19.patch").write clang19_patch + (buildpath/"src/SourceBuild/tarball/patches/runtime/xcode16.patch").write xcode16_patch if OS.mac? + + # The source directory needs to be outside the installer directory + (buildpath/"installer").install buildpath.children + cd "installer" do + system "./build.sh", "/p:ArcadeBuildTarball=true", "/p:TarballDir=#{buildpath}/sources" + end + + cd "sources" do + # Use our libunwind rather than the bundled one. + inreplace "src/runtime/eng/SourceBuild.props", + "/p:BuildDebPackage=false", + "\\0 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=ON" + + # Fix Clang 15 error: definition of builtin function '__cpuid'. + # Ref: https://github.com/dotnet/runtime/commit/992cf8c97cc71d4ca9a0a11e6604a6716ed4cefc + inreplace "src/runtime/src/coreclr/vm/amd64/unixstubs.cpp", + /^ *void (__cpuid|__cpuidex)\([^}]*}$/, + "#if !__has_builtin(\\1)\n\\0\n#endif" + + # Fix missing macOS conditional for system unwind searching. + # Ref: https://github.com/dotnet/runtime/commit/97c9a11e3e6ca68adf0c60155fa82ab3aae953a5 + inreplace "src/runtime/src/native/corehost/apphost/static/CMakeLists.txt", + "if(CLR_CMAKE_USE_SYSTEM_LIBUNWIND)", + "if(CLR_CMAKE_USE_SYSTEM_LIBUNWIND AND NOT CLR_CMAKE_TARGET_OSX)" + + # Work around arcade build failure with BSD `sed` due to non-compatible `-i`. + # Ref: https://github.com/dotnet/arcade/commit/b8007eed82adabd50c604a9849277a6e7be5c971 + inreplace "src/arcade/eng/SourceBuild.props", "\"sed -i ", "\"sed -i.bak " if OS.mac? + + # Rename patch fails on case-insensitive systems like macOS + rename_patch = "0001-Rename-NuGet.Config-to-NuGet.config-to-account-for-a.patch" + (Pathname("src/nuget-client/eng/source-build-patches")/rename_patch).unlink if OS.mac? + + prep_args = (OS.linux? && Hardware::CPU.intel?) ? [] : ["--bootstrap"] + system "./prep.sh", *prep_args + system "./build.sh", "--clean-while-building" + + libexec.mkpath + tarball = Dir["artifacts/*/Release/dotnet-sdk-#{version}-*.tar.gz"].first + system "tar", "-xzf", tarball, "--directory", libexec + + bash_completion.install "src/sdk/scripts/register-completions.bash" => "dotnet" + zsh_completion.install "src/sdk/scripts/register-completions.zsh" => "_dotnet" + man1.install Dir["src/sdk/documentation/manpages/sdk/*.1"] + end + + doc.install Dir[libexec/"*.txt"] + (bin/"dotnet").write_env_script libexec/"dotnet", DOTNET_ROOT: libexec + end + + def caveats + <<~TEXT + For other software to find dotnet you may need to set: + export DOTNET_ROOT="#{opt_libexec}" + TEXT + end + + test do + target_framework = "net#{version.major_minor}" + (testpath/"test.cs").write <<~CSHARP + using System; + + namespace Homebrew + { + public class Dotnet + { + public static void Main(string[] args) + { + var joined = String.Join(",", args); + Console.WriteLine(joined); + } + } + } + CSHARP + + (testpath/"test.csproj").write <<~XML + + + Exe + #{target_framework} + AnyCPU + Homebrew + Homebrew.Dotnet + Homebrew.Dotnet + $(AssemblyName) + false + + + + + + XML + + system bin/"dotnet", "build", "--framework", target_framework, "--output", testpath, testpath/"test.csproj" + assert_equal "#{testpath}/test.dll,a,b,c\n", + shell_output("#{bin}/dotnet run --framework #{target_framework} #{testpath}/test.dll a b c") + end +end + +__END__ +diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/tarball/content/repos/installer.proj +index 712d7cd14..31d54866c 100644 +--- a/src/SourceBuild/tarball/content/repos/installer.proj ++++ b/src/SourceBuild/tarball/content/repos/installer.proj +@@ -7,7 +7,7 @@ + + + $(TargetRid) +- osx-x64 ++ osx-$(Platform) + $(OverrideTargetRid.Substring(0, $(OverrideTargetRid.IndexOf("-")))) + + --runtime-id $(OverrideTargetRid) +@@ -28,7 +28,7 @@ + $(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-$(Platform) + + $(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true +- $(BuildCommandArgs) /p:CoreSetupRid=osx-x64 ++ $(BuildCommandArgs) /p:CoreSetupRid=osx-$(Platform) + $(BuildCommandArgs) /p:CoreSetupRid=$(TargetRid) + + +diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/tarball/content/repos/runtime.proj +index f3ed143f8..2c62d6854 100644 +--- a/src/SourceBuild/tarball/content/repos/runtime.proj ++++ b/src/SourceBuild/tarball/content/repos/runtime.proj +@@ -3,7 +3,7 @@ + + + $(TargetRid) +- osx-x64 ++ osx-$(Platform) + freebsd-x64 + win-x64 + +diff --git a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj +index 14921a48f..3a34e8749 100644 +--- a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj ++++ b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj +@@ -33,6 +33,14 @@ + ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/Formula/d/dotnet@8.rb b/Formula/d/dotnet@8.rb new file mode 100644 index 0000000000000..6d9d3d662e9bf --- /dev/null +++ b/Formula/d/dotnet@8.rb @@ -0,0 +1,178 @@ +class DotnetAT8 < Formula + desc ".NET Core" + homepage "https://dotnet.microsoft.com/" + # Source-build tag announced at https://github.com/dotnet/source-build/discussions + url "https://github.com/dotnet/dotnet/archive/refs/tags/v8.0.121.tar.gz" + sha256 "a1f127c69ddd4b665bd300b0458e7359adf2d9f720e101de327e87e504a938ca" + license "MIT" + + livecheck do + url :stable + regex(/^v?(8(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5176a93cc507c4ca7ccfb55fd27560e8b45900b00d65d25b987ecdd8bfac62b" + sha256 cellar: :any, arm64_sequoia: "d75c9c232164c95880350ed98bb56b990848b82b51e8e81c3e03099d178a5ce0" + sha256 cellar: :any, arm64_sonoma: "f6bf0f3adc1125cd9fb8d7c844ab4a1bf40be0c3ab6020d806a4922a6db74132" + sha256 cellar: :any_skip_relocation, arm64_linux: "610bd3569b5dbb64b7c52ac3939bba6bdee50b9d236ab4a6b1e20e6b53308d5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "768fa912eb97d7ecd219b4d36872e631c3b134e0e0c79c2d7053e03f8c879c65" + end + + keg_only :versioned_formula + + # https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#lifecycle + deprecate! date: "2026-11-10", because: :unsupported + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "openssl@3" + + uses_from_macos "python" => :build + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "grep" => :build # grep: invalid option -- P + end + + on_linux do + depends_on "libunwind" + depends_on "lttng-ust" + end + + on_intel do + # Building on Intel Sonoma or later results in stack overflow on restore. + # See https://github.com/Homebrew/homebrew-core/issues/197546 + depends_on maximum_macos: [:ventura, :build] + end + + resource "release.json" do + url "https://github.com/dotnet/dotnet/releases/download/v8.0.121/release.json" + sha256 "ba61d54adf402098d6772763dbc021bf60a82c28abeebefba94c74b50e1dbbc4" + + livecheck do + formula :parent + end + end + + def install + odie "Update release.json resource!" if resource("release.json").version != version + buildpath.install resource("release.json") + + if OS.mac? + # Need GNU grep (Perl regexp support) to use release manifest rather than git repo + ENV.prepend_path "PATH", Formula["grep"].libexec/"gnubin" + + # Avoid mixing CLT and Xcode.app when building CoreCLR component which can + # cause undefined symbols, e.g. __swift_FORCE_LOAD_$_swift_Builtin_float + ENV["SDKROOT"] = MacOS.sdk_path + + # Deparallelize to reduce chances of missing PDBs + ENV.deparallelize + # Avoid failing on missing PDBs as unable to build bottle on all runners in current state + # Issue ref: https://github.com/dotnet/source-build/issues/4150 + inreplace "build.proj", /\bFailOnMissingPDBs="true"/, 'FailOnMissingPDBs="false"' + + # Disable crossgen2 optimization in ASP.NET Core to work around build failure trying to find tool. + # Microsoft.AspNetCore.App.Runtime.csproj(445,5): error : Could not find crossgen2 tools/crossgen2 + inreplace "src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj", + "', + "" + end + + system "./prep.sh" + # We unset "CI" environment variable to work around aspire build failure + # error MSB4057: The target "GitInfo" does not exist in the project. + # Ref: https://github.com/Homebrew/homebrew-core/pull/154584#issuecomment-1815575483 + with_env(CI: nil) do + system "./build.sh", "--clean-while-building", "--online", "--release-manifest", "release.json" + end + + libexec.mkpath + tarball = buildpath.glob("artifacts/*/Release/dotnet-sdk-*.tar.gz").first + system "tar", "--extract", "--file", tarball, "--directory", libexec + doc.install libexec.glob("*.txt") + (bin/"dotnet").write_env_script libexec/"dotnet", DOTNET_ROOT: libexec + + bash_completion.install "src/sdk/scripts/register-completions.bash" => "dotnet" + zsh_completion.install "src/sdk/scripts/register-completions.zsh" => "_dotnet" + man1.install Utils::Gzip.compress(*buildpath.glob("src/sdk/documentation/manpages/sdk/*.1")) + man7.install Utils::Gzip.compress(*buildpath.glob("src/sdk/documentation/manpages/sdk/*.7")) + end + + def caveats + <<~TEXT + For other software to find dotnet you may need to set: + export DOTNET_ROOT="#{opt_libexec}" + TEXT + end + + test do + target_framework = "net#{version.major_minor}" + + (testpath/"test.cs").write <<~CSHARP + using System; + + namespace Homebrew + { + public class Dotnet + { + public static void Main(string[] args) + { + var joined = String.Join(",", args); + Console.WriteLine(joined); + } + } + } + CSHARP + + (testpath/"test.csproj").write <<~XML + + + Exe + #{target_framework} + AnyCPU + Homebrew + Homebrew.Dotnet + Homebrew.Dotnet + $(AssemblyName) + false + + + + + + XML + + system bin/"dotnet", "build", "--framework", target_framework, "--output", testpath, testpath/"test.csproj" + output = shell_output("#{bin}/dotnet run --framework #{target_framework} #{testpath}/test.dll a b c") + assert_equal "#{testpath}/test.dll,a,b,c\n", output + + # Test to avoid uploading broken Intel Sonoma bottle which has stack overflow on restore. + # See https://github.com/Homebrew/homebrew-core/issues/197546 + resource "sbom-tool" do + url "https://github.com/microsoft/sbom-tool/archive/refs/tags/v3.0.1.tar.gz" + sha256 "90085ab1f134f83d43767e46d6952be42a62dbb0f5368e293437620a96458867" + end + resource("sbom-tool").stage do + system bin/"dotnet", "restore", "src/Microsoft.Sbom.Tool", "--disable-build-servers", "--no-cache" + end + end +end diff --git a/Formula/d/dotslash.rb b/Formula/d/dotslash.rb new file mode 100644 index 0000000000000..e0aee6ce954d9 --- /dev/null +++ b/Formula/d/dotslash.rb @@ -0,0 +1,94 @@ +class Dotslash < Formula + desc "Simplified executable deployment" + homepage "https://dotslash-cli.com" + url "https://github.com/facebook/dotslash/archive/refs/tags/v0.5.8.tar.gz" + sha256 "c80f7ce8b659c8f510659298ef5427bfaf7ee3258760bcffe2c45f7628de858e" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b64aa036b16b6fcf67b8e3001815f04a0d4ea4f8a061dc083f9f051200913a2e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6f823160a3eaa74d901dda3b8cd6693f11456508edddd3cdea5aa82e83d7bef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "56f10dc0dd94c6b37c2c4da24d486e55bfbaad5521f50485954f79db37cb1307" + sha256 cellar: :any_skip_relocation, arm64_ventura: "52fd4aea162ac3759d9d9b4dd79684827756e874d5518133cf685f196b09417b" + sha256 cellar: :any_skip_relocation, sonoma: "44d37cda829fb1bbb60aa260a9681b0f571246be95ca6836c7242f4920a492d6" + sha256 cellar: :any_skip_relocation, ventura: "4f4b140144b5d0dc4695d856c0f56086f04ff00052a63dd30bc6f08cc06efa04" + sha256 cellar: :any_skip_relocation, arm64_linux: "720fe95c2851a2bc7e3145e288dbe7d322a0a655beb9e1b102f7b94c0cfe10f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d09a00ba6f17535691be724216f47c4a2ffb7b012164a174690e01143590a119" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"node").write <<~EOS + #!/usr/bin/env dotslash + + // Example file from https://dotslash-cli.com/docs/. + // The URLs in this file were taken from https://nodejs.org/dist/v18.19.0/ + + { + "name": "node-v18.19.0", + "platforms": { + "macos-aarch64": { + "size": 40660307, + "hash": "blake3", + "digest": "6e2ca33951e586e7670016dd9e503d028454bf9249d5ff556347c3d98c347c34", + "format": "tar.gz", + "path": "node-v18.19.0-darwin-arm64/bin/node", + "providers": [ + { + "url": "https://nodejs.org/dist/v18.19.0/node-v18.19.0-darwin-arm64.tar.gz" + } + ] + }, + "macos-x86_64": { + "size": 42202872, + "hash": "blake3", + "digest": "37521058114e7f71e0de3fe8042c8fa7908305e9115488c6c29b514f9cd2a24c", + "format": "tar.gz", + "path": "node-v18.19.0-darwin-x64/bin/node", + "providers": [ + { + "url": "https://nodejs.org/dist/v18.19.0/node-v18.19.0-darwin-x64.tar.gz" + } + ] + }, + "linux-aarch64": { + "size": 44559104, + "hash": "blake3", + "digest": "bd605f5957f792def0885db18a9595202ba13f64d2e8d92514f95fb8c8ee5de5", + "format": "tar.gz", + "path": "node-v18.19.0-linux-arm64/bin/node", + "providers": [ + { + "url": "https://nodejs.org/dist/v18.19.0/node-v18.19.0-linux-arm64.tar.gz" + } + ] + }, + "linux-x86_64": { + "size": 44694523, + "hash": "blake3", + "digest": "72b81fc3a30b7bedc1a09a3fafc4478a1b02e5ebf0ad04ea15d23b3e9dc89212", + "format": "tar.gz", + "path": "node-v18.19.0-linux-x64/bin/node", + "providers": [ + { + "url": "https://nodejs.org/dist/v18.19.0/node-v18.19.0-linux-x64.tar.gz" + } + ] + } + } + } + EOS + chmod 0755, testpath/"node" + assert_match "v18.19.0", shell_output("#{testpath}/node -v") + end +end diff --git a/Formula/d/dotter.rb b/Formula/d/dotter.rb new file mode 100644 index 0000000000000..0691a077246e7 --- /dev/null +++ b/Formula/d/dotter.rb @@ -0,0 +1,39 @@ +class Dotter < Formula + desc "Dotfile manager and templater written in rust" + homepage "https://github.com/SuperCuber/dotter" + url "https://github.com/SuperCuber/dotter/archive/refs/tags/v0.13.4.tar.gz" + sha256 "46135bcae1940cb22284308bd2cf75d78bb06a748136d835f29db978521fd45a" + license "Unlicense" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "36a6ed7c7532d987ee58325e854956607c4fc604de98e430f1e69cea774a3c02" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "74c671258a4621c806cf9ae2acd68aed779fc3f2871f8af5b7a8d91c41476504" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17167d23e44c100fc9f47e5c6c00eb49ec6ab31ef03df5a618f224f9371b4756" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8cf2736586332347c9dd11acb187963352aa43b14daccbd1287d700546aa153b" + sha256 cellar: :any_skip_relocation, sonoma: "97555d05db08fefdf290b69152bf1c7ccd408e0a49a409709836067688a32a99" + sha256 cellar: :any_skip_relocation, ventura: "a627706f9e7d8aa47cf4b23b0415313636599b912c3df693d82d3fe8b58d9c79" + sha256 cellar: :any_skip_relocation, arm64_linux: "518f20fa7c86be27c630e4be9d018176c0af69c43a9e228761ffb8bce53a8a98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38f63b924590be43e9dc62a39de04c621247bc23820fba6de6e63c32caa3cd56" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"dotter", "gen-completions", "-s") + end + + test do + (testpath/"xxx.conf").write("12345678") + (testpath/".dotter/local.toml").write <<~TOML + packages = ["xxx"] + TOML + (testpath/".dotter/global.toml").write <<~TOML + [xxx.files] + "xxx.conf" = "yyy.conf" + TOML + + system bin/"dotter", "deploy" + assert_match "12345678", File.read("yyy.conf") + end +end diff --git a/Formula/d/double-conversion.rb b/Formula/d/double-conversion.rb new file mode 100644 index 0000000000000..8e5e94f0b6f1b --- /dev/null +++ b/Formula/d/double-conversion.rb @@ -0,0 +1,55 @@ +class DoubleConversion < Formula + desc "Binary-decimal and decimal-binary routines for IEEE doubles" + homepage "https://github.com/google/double-conversion" + url "https://github.com/google/double-conversion/archive/refs/tags/v3.3.1.tar.gz" + sha256 "fe54901055c71302dcdc5c3ccbe265a6c191978f3761ce1414d0895d6b0ea90e" + license "BSD-3-Clause" + head "https://github.com/google/double-conversion.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1d009a17e50b3df6561a750537ab03932b8739202333d616a8a591626175cabb" + sha256 cellar: :any, arm64_sequoia: "e45a082cb2703fa9054e6399e96aee5104cbeb25ce5e30799af503585e2015d4" + sha256 cellar: :any, arm64_sonoma: "39944e2a07013b8b8d9dfa6a03eac9123233acdaffd0f79cc3f347defa089c11" + sha256 cellar: :any, arm64_ventura: "5c8a894e848ad27eacaf72d7131731d268292619e8030e51acfcafb4392c3f40" + sha256 cellar: :any, sonoma: "a6b67d2639ee5159aed9ef0a45f5f2ad4962b4f05d69ef538be5b81fb59bf42b" + sha256 cellar: :any, ventura: "894479ef1f84789d21a4418decf91ad17e46bcf4622f4a6a7f42be82960f9e24" + sha256 cellar: :any_skip_relocation, arm64_linux: "95f103473424f26b95f2100e815664d5370eae8b19a9c1e09678d8bcfa89eb0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d4229ebfd66a40cef9b63c02533b75762b79d066ffb52da5aca069b4183b849" + end + + depends_on "cmake" => :build + + # Fix to cmake 4 compatibility + # PR ref: https://github.com/google/double-conversion/pull/240 + patch do + url "https://github.com/google/double-conversion/commit/69880f0e68d6ddcb760285709195d63c5fd193c4.patch?full_index=1" + sha256 "9895afd264e304368d78d83d4bedf85fbd282f79fe99f70cd7384cde2baab329" + end + + def install + system "cmake", "-S", ".", "-B", "shared", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "shared" + system "cmake", "--install", "shared" + + system "cmake", "-S", ".", "-B", "static", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args + system "cmake", "--build", "static" + lib.install "static/libdouble-conversion.a" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + int main() { + char buf[20] = {0}; + double_conversion::Bignum bn; + bn.AssignUInt64(0x1234567890abcdef); + bn.ToHexString(buf, sizeof buf); + printf("%s", buf); + return 0; + } + CPP + system ENV.cc, "test.cc", "-L#{lib}", "-ldouble-conversion", "-o", "test" + assert_equal "1234567890ABCDEF", `./test` + end +end diff --git a/Formula/d/doublecpp.rb b/Formula/d/doublecpp.rb new file mode 100644 index 0000000000000..ceac4533a721c --- /dev/null +++ b/Formula/d/doublecpp.rb @@ -0,0 +1,106 @@ +class Doublecpp < Formula + desc "Double dispatch in C++" + homepage "https://doublecpp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/doublecpp/doublecpp/0.6.3/doublecpp-0.6.3.tar.gz" + sha256 "232f8bf0d73795558f746c2e77f6d7cb54e1066cbc3ea7698c4fba80983423af" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d1c9462ef87c13b4a5c4affd18d0bc2ebf1f532bcde2a9eb44cf45ca2959f6ec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e15c4d309ffb4ce79625a484249eabbcee9f337a7e79c7c36a332cd0e25ca06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71fdee9f989fbd4a54e2432721dfea361956dd521c386b6f5c5c3cc635b9e9f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fea45f833654d2f799d9fc1cb535238749b42a818d9718a7d73ecc94cfed74cc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9f2d4540def16e3fe205cee4155fc21b5574879918ea7d9468ebf52f8245e39" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "26cdd6d6565fccc24bf7099bf4b2aa779c6e7dabe8908d408e929f4fbf861de7" + sha256 cellar: :any_skip_relocation, sonoma: "2c3b3d36cc40443820dc18160b8497ed83290a4f162265c148fd95185e83bc11" + sha256 cellar: :any_skip_relocation, ventura: "b734b575fec9d1c01c97e96c283caf593ba17a2650bf5071e4523f0851d04e04" + sha256 cellar: :any_skip_relocation, monterey: "3ec3e4517d9a99533a08932492764f0578122528585b5955ef5f6b092a8ba806" + sha256 cellar: :any_skip_relocation, big_sur: "3f4d63ed1afe1fa65825d925b8e90ff32e867de820c41159f52c4532a4df92b7" + sha256 cellar: :any_skip_relocation, catalina: "429cf6757b46b6f0289439d40db98e3a574a4bf0bde930f8b9ae25a55f4452cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "59e9b672d857ae8953d8555b9687be1508f38f1c9702eaa27a67caba2d60b08c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "989076ce2ebaba5ca834b159332a0e4b4bf15dd51d5dc2617594d367bffee9f2" + end + + # Fix build failure because of missing #include on Linux. + # Patch submitted to author by email. + patch :DATA + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"doublecpp", "--version" + end +end + +__END__ +diff --git a/src/branchanalyser.cpp b/src/branchanalyser.cpp +index e6da619..feca23a 100755 +--- a/src/branchanalyser.cpp ++++ b/src/branchanalyser.cpp +@@ -9,6 +9,7 @@ + ***************************************************************************/ + + #include ++#include + + #include "branchanalyser.h" + #include "multimethods.h" +diff --git a/src/parambinder.cpp b/src/parambinder.cpp +index b2c77b8..8402221 100755 +--- a/src/parambinder.cpp ++++ b/src/parambinder.cpp +@@ -10,6 +10,7 @@ + #include "parambinder.h" + + #include ++#include + + #include "classdecl.h" + #include "methparams.h" +diff --git a/src/programanalyser.cpp b/src/programanalyser.cpp +index 19e34ba..c69518a 100755 +--- a/src/programanalyser.cpp ++++ b/src/programanalyser.cpp +@@ -9,6 +9,8 @@ + ***************************************************************************/ + #include "programanalyser.h" + ++#include ++ + #include "multimethods.h" + #include "methods.h" + #include "multimethodtypes.h" +diff --git a/src/sourceanalyser.cpp b/src/sourceanalyser.cpp +index a87fde3..fb6ea5e 100755 +--- a/src/sourceanalyser.cpp ++++ b/src/sourceanalyser.cpp +@@ -8,6 +8,8 @@ + * (at your option) any later version. * + ***************************************************************************/ + ++#include ++ + #include "sourceanalyser.h" + #include "fileutil.h" + #include "progelems.hpp" +diff --git a/src/sourcemodifier.cpp b/src/sourcemodifier.cpp +index 5324f6f..84dc15c 100755 +--- a/src/sourcemodifier.cpp ++++ b/src/sourcemodifier.cpp +@@ -10,6 +10,7 @@ + + #include + #include // TODO: remove it when changed ProgElems cons ++#include + + #include "my_sstream.h" + diff --git a/Formula/d/doubledown.rb b/Formula/d/doubledown.rb new file mode 100644 index 0000000000000..e85e8616d8f90 --- /dev/null +++ b/Formula/d/doubledown.rb @@ -0,0 +1,24 @@ +class Doubledown < Formula + desc "Sync local changes to a remote directory" + homepage "https://github.com/devstructure/doubledown" + url "https://github.com/devstructure/doubledown/archive/refs/tags/v0.0.2.tar.gz" + sha256 "47ff56b6197c5302a29ae4a373663229d3b396fd54d132adbf9f499172caeb71" + license "BSD-2-Clause" + head "https://github.com/devstructure/doubledown.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7e93ea6b6323a89639c314a3f44364e2aa3ab4e5d7017d6b352c8761e5f13fa5" + end + + def install + bin.install Dir["bin/*"] + man1.install Dir["man/man1/*.1"] + end + + test do + system bin/"doubledown", "--help" + end +end diff --git a/Formula/d/dovecot.rb b/Formula/d/dovecot.rb new file mode 100644 index 0000000000000..14c9291403560 --- /dev/null +++ b/Formula/d/dovecot.rb @@ -0,0 +1,146 @@ +class Dovecot < Formula + desc "IMAP/POP3 server" + homepage "https://dovecot.org/" + url "https://dovecot.org/releases/2.4/dovecot-2.4.0.tar.gz" + sha256 "e90e49f8c31b09a508249a4fee8605faa65fe320819bfcadaf2524126253d5ae" + license all_of: ["BSD-3-Clause", "LGPL-2.1-or-later", "MIT", "Unicode-DFS-2016", :public_domain] + + livecheck do + url "https://www.dovecot.org/download/" + regex(/href=.*?dovecot[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "51fe5736c4fe74c858e7cc2901b62c18f471004a5bc28574104bd3cc62491df3" + sha256 arm64_sequoia: "09ffefff96a42aeb4368075229fcd8439842729c3275211dc45bfb810e0fd046" + sha256 arm64_sonoma: "fb47228aa002ca7a17b580475f202229ff05021438af7f0b8c28bf943a003ee1" + sha256 arm64_ventura: "7c02197a94945e427d5edfec3f1647a981a96d707cd2f59f122de8eb0e777476" + sha256 sonoma: "e007ae6fa96aec1e7b6f89b4c4ed1455dd3f0397b59b5aae6f7c3cbd2a4ff64f" + sha256 ventura: "d062efc159a5752d977a820107b8c4f11dc766489e06bff2860f91832f877a0b" + sha256 arm64_linux: "9cfb86bef709c2e6a6f1e4dac4feac680d902718e20f5ee8fff2f9b28aa838bd" + sha256 x86_64_linux: "d352c07b0869e303d279ef574e9b5d595f714b50cbb08d9f10eefe4dc3f07f37" + end + + depends_on "pkgconf" => :build + depends_on "openldap" + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "libxcrypt" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "libtirpc" + depends_on "linux-pam" + depends_on "lz4" + depends_on "xz" + depends_on "zstd" + end + + resource "pigeonhole" do + url "https://pigeonhole.dovecot.org/releases/2.4/dovecot-pigeonhole-2.4.0.tar.gz" + sha256 "0ed08ae163ac39a9447200fbb42d7b3b05d35e91d99818dd0f4afd7ad1dbc753" + end + + # `uoff_t` and `plugins/var-expand-crypt` patches, upstream pr ref, https://github.com/dovecot/core/pull/232 + patch do + url "https://github.com/dovecot/core/commit/bbfab4976afdf38a7fa966752de33481f9d2c2e5.patch?full_index=1" + sha256 "f5a77eeaf5978b75a6c7d1d9d4b7623679aec047c3dae63516105774ae6c04de" + end + patch :DATA + + def install + # Re-generate file as only Linux has inotify support for imap-hibernate + rm "src/config/all-settings.c" unless OS.linux? + + args = %W[ + --libexecdir=#{libexec} + --sysconfdir=#{etc} + --localstatedir=#{var} + --with-bzlib + --with-ldap + --with-pam + --with-sqlite + --without-icu + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + + resource("pigeonhole").stage do + args = %W[ + --with-dovecot=#{lib}/dovecot + --with-ldap + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + end + + def caveats + <<~EOS + For Dovecot to work, you may need to create a dovecot user + and group depending on your configuration file options. + EOS + end + + service do + run [opt_sbin/"dovecot", "-F"] + require_root true + environment_variables PATH: std_service_path_env + error_log_path var/"log/dovecot/dovecot.log" + log_path var/"log/dovecot/dovecot.log" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/dovecot --version") + + cp_r share/"doc/dovecot/example-config", testpath/"example" + (testpath/"example/dovecot.conf").write <<~EOS + # required in 2.4 + dovecot_config_version = 2.4.0 + dovecot_storage_version = 2.4.0 + + base_dir = #{testpath} + listen = * + ssl = no + + default_login_user = #{ENV["USER"]} + default_internal_user = #{ENV["USER"]} + + # reference other conf files + # !include conf.d/*.conf + + # same as 2.3 + log_path = syslog + auth_mechanisms = plain + EOS + + system bin/"doveconf", "-c", testpath/"example/dovecot.conf" + end +end + +__END__ +diff --git a/src/lib-var-expand-crypt/Makefile.in b/src/lib-var-expand-crypt/Makefile.in +index 6c8b1ad..b721ad5 100644 +--- a/src/lib-var-expand-crypt/Makefile.in ++++ b/src/lib-var-expand-crypt/Makefile.in +@@ -177,7 +177,11 @@ am__uninstall_files_from_dir = { \ + am__installdirs = "$(DESTDIR)$(moduledir)" \ + "$(DESTDIR)$(pkginc_libdir)" + LTLIBRARIES = $(module_LTLIBRARIES) +-var_expand_crypt_la_LIBADD = ++var_expand_crypt_la_LIBADD = \ ++ ../lib/liblib.la \ ++ ../lib-json/libjson.la \ ++ ../lib-dcrypt/libdcrypt.la \ ++ ../lib-var-expand/libvar_expand.la + am_var_expand_crypt_la_OBJECTS = var-expand-crypt.lo + var_expand_crypt_la_OBJECTS = $(am_var_expand_crypt_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) diff --git a/Formula/d/dovi_tool.rb b/Formula/d/dovi_tool.rb new file mode 100644 index 0000000000000..c8fc60bbbeb03 --- /dev/null +++ b/Formula/d/dovi_tool.rb @@ -0,0 +1,50 @@ +class DoviTool < Formula + desc "CLI tool for Dolby Vision metadata on video streams" + homepage "https://github.com/quietvoid/dovi_tool/" + url "https://github.com/quietvoid/dovi_tool/archive/refs/tags/2.3.1.tar.gz" + sha256 "090888c35da017e290614b70108653ea975034c23b48ddd459538a1a6e4cc05a" + license "MIT" + head "https://github.com/quietvoid/dovi_tool.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d501377cf2e0ad9c041a5d6f0aeee3ba51a9886c196483017e8e60f47c5703cc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0dd620b246ba3cc023aa718042299700f412bbd8449abdea27f7724a47760610" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ad94c3fa4979b73f7ac30b956f62591f86622841bec055a62b2f4e05ca207ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "498c071bd8902b3c5bb404c1d5115912b88423bd8a1751ebaab7ade3a46a395a" + sha256 cellar: :any_skip_relocation, sonoma: "0c051cf1e27759e3ee49b1dd0e50fa726953447c61c2060b60bfb93c88615cff" + sha256 cellar: :any_skip_relocation, ventura: "db1ff82fb34caea4be244020fc3edadca05396465957fd6905778fe86658e16f" + sha256 cellar: :any_skip_relocation, arm64_linux: "13b7825ac9b6d1058cb4b743d25a77473126ca1d907b1a473908c29ff25166ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "435abf7e0424828fe2aba09c1625ef91e92fd36b1104656233f4334507d4c408" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "fontconfig" + depends_on "freetype" + end + + def install + system "cargo", "install", *std_cargo_args + pkgshare.install "assets" + end + + test do + output = shell_output("#{bin}/dovi_tool info #{pkgshare}/assets/hevc_tests/regular_rpu.bin --frame 0") + assert_match <<~EOS, output + Parsing RPU file... + { + "dovi_profile": 8, + "header": { + "rpu_nal_prefix": 25, + EOS + + assert_match "dovi_tool #{version}", shell_output("#{bin}/dovi_tool --version") + end +end diff --git a/Formula/d/doxx.rb b/Formula/d/doxx.rb new file mode 100644 index 0000000000000..29b787dc0080b --- /dev/null +++ b/Formula/d/doxx.rb @@ -0,0 +1,35 @@ +class Doxx < Formula + desc "Terminal document viewer for .docx files" + homepage "https://github.com/bgreenwell/doxx" + url "https://github.com/bgreenwell/doxx/archive/refs/tags/v0.1.2.tar.gz" + sha256 "3627e65f39e437d954e1d4f02c30911fef1c5c99388bf6098564e1e89722e80d" + license "MIT" + head "https://github.com/bgreenwell/doxx.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "74d4459038beac34f058430c6989791384f2eaba6c256795bf4d9b29c491898f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bde2050546c17f2d57df8e6049d872e2550df1939b1248244a6ce5a927e254fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "441aefb5e628bac7267beebd1b46b33dd5aefb5e275857b25bbdeccc9f2abca0" + sha256 cellar: :any_skip_relocation, sonoma: "bf34c611bbcc29e096312963252fd2089794b69ed19a5f6b94fc78cc01526099" + sha256 cellar: :any_skip_relocation, arm64_linux: "2535f0667b90ab6e9000a1fdbab39c30c1d20caefca51f2dde257b1fabfed196" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3c9e40fbf75a99b5e5ce1f77714445f771553291f6d05c42f9d1d219a441afd" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"generate_test_docs" + assert_path_exists testpath/"tests/fixtures/minimal.docx" + + output = shell_output("#{bin}/doxx #{testpath}/tests/fixtures/minimal.docx") + assert_match <<~EOS, output + Document: minimal + Pages: 1 + Words: 26 + EOS + end +end diff --git a/Formula/d/doxygen.rb b/Formula/d/doxygen.rb new file mode 100644 index 0000000000000..ae169074d58f5 --- /dev/null +++ b/Formula/d/doxygen.rb @@ -0,0 +1,45 @@ +class Doxygen < Formula + desc "Generate documentation for several programming languages" + homepage "https://www.doxygen.nl/" + url "https://doxygen.nl/files/doxygen-1.15.0.src.tar.gz" + mirror "https://downloads.sourceforge.net/project/doxygen/rel-1.15.0/doxygen-1.15.0.src.tar.gz" + sha256 "a8cafe605867ad475aaf288a3852783076e1df83aabf16488bbfa958062e7440" + license "GPL-2.0-only" + head "https://github.com/doxygen/doxygen.git", branch: "master" + + livecheck do + url "https://www.doxygen.nl/download.html" + regex(/href=.*?doxygen[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "42405feb56da268767c920d2abf25ddfe0f24d3c4c0a4128f5403298f760ff7a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c0af6e75eb3574bb8a4b56cf44e43a44d92399188e611e86307edb7ac28fea8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ebdf6db27eca4f28351f3048bd22148fe161459af097d13e594672ae4d112add" + sha256 cellar: :any_skip_relocation, sonoma: "e90217d7fb072089ed49a420872b0845914df54d7f2d8227df56620b489d16cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2edc41f859b4fbc634e5e08cbaa00701adc3242c4e5516f8d50843c8078d35b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36442ab1eea967aa66a5b5db5b59cffb87c75eb5ec81e43c43fe3227e64cde8" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + + uses_from_macos "flex" => :build, since: :big_sur + uses_from_macos "python" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which("python3")}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system "cmake", "-S", ".", "-B", "build", "-Dbuild_doc=1", *std_cmake_args + man1.install buildpath.glob("build/man/*.1") + end + + test do + system bin/"doxygen", "-g" + system bin/"doxygen", "Doxyfile" + end +end diff --git a/Formula/d/doxymacs.rb b/Formula/d/doxymacs.rb new file mode 100644 index 0000000000000..ec411a6ed15f3 --- /dev/null +++ b/Formula/d/doxymacs.rb @@ -0,0 +1,62 @@ +class Doxymacs < Formula + desc "Elisp package for using doxygen under Emacs" + homepage "https://doxymacs.sourceforge.net/" + url "https://downloads.sourceforge.net/project/doxymacs/doxymacs/1.8.0/doxymacs-1.8.0.tar.gz" + sha256 "a23fd833bc3c21ee5387c62597610941e987f9d4372916f996bf6249cc495afa" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c8cd54abb531fe75440204a59834ef7807442cd7d8543f1335fb4c6428977421" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6f35d29f2d9bf0ab3a13916922b7fb4506e133d83fe26c10b00fe0c6c27be17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2aa03231378a72916d1f1bdb3c63d47751fd1891d9d92daa680b44cbf80e3ce2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "699c57cf8869c5eda84db1f8d58a160c6c821015c1c7bc4892d5ad2f1447c73e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "32c79209e9d8c2f8e47a4e6e28993954250060f74717a749e48ea04b381b63a8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ffe57742c559c3ef80b3bf338d2903c7fc0137d4d9cc96f2b23bea2e0cab832" + sha256 cellar: :any_skip_relocation, sonoma: "c8870836bd8052c49da1d950c863efc99d804be590ae85f2fd6c5176d65ec177" + sha256 cellar: :any_skip_relocation, ventura: "e2ff086ebd4cdeb4945b9a67de2c74a6d22f47e84db58b17597ea5d6ef6d0fe4" + sha256 cellar: :any_skip_relocation, monterey: "dba8d6a64b38ed2b2912d6ecc9fa0e895bfbeffb06255a183676f6be56c55c63" + sha256 cellar: :any_skip_relocation, big_sur: "761f34a12276f673ad5914b0b9caa8891eaab8fb213292a897e1000375a0370a" + sha256 cellar: :any_skip_relocation, catalina: "060a755f85149143e0aea876b488f98e685e320c7ced43d3ae87dfcbd4931f14" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe41948e3c5a21e01c2db606c4001bc17a9f3a5e610da7adefad289bc521420a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00c2ebbdf243dded3a23783b3a22ee3705a53dd0ba50c292dcb190bb5bcebc9a" + end + + head do + url "https://git.code.sf.net/p/doxymacs/code.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "doxygen" + depends_on "emacs" + + uses_from_macos "libxml2" + + def install + # https://sourceforge.net/p/doxymacs/support-requests/5/ + ENV.append "CFLAGS", "-std=gnu89" + + # Fix undefined symbol errors for _xmlCheckVersion, etc. + # This prevents a mismatch between /usr/bin/xml2-config and the SDK headers, + # which would cause the build system not to pass the LDFLAGS for libxml2. + ENV.prepend_path "PATH", "#{MacOS.sdk_path}/usr/bin" if OS.mac? + + system "./bootstrap" if build.head? + system "./configure", "--with-lispdir=#{elisp}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.el").write <<~LISP + (add-to-list 'load-path "#{elisp}") + (load "doxymacs") + (print doxymacs-version) + LISP + + output = shell_output("emacs -Q --batch -l #{testpath}/test.el").strip + assert_equal "\"#{version}\"", output + end +end diff --git a/Formula/d/dpcmd.rb b/Formula/d/dpcmd.rb new file mode 100644 index 0000000000000..ef7c7a73cdc58 --- /dev/null +++ b/Formula/d/dpcmd.rb @@ -0,0 +1,39 @@ +class Dpcmd < Formula + desc "Linux software for DediProg SF100/SF600" + homepage "https://github.com/DediProgSW/SF100Linux" + url "https://github.com/DediProgSW/SF100Linux/archive/refs/tags/V1.14.21,x.tar.gz" + sha256 "2bab3df0b971e66f574db33daa1687d1a064eed6b3e99d97c265bfce35470ddf" + license "GPL-2.0-only" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4f5102a2acb2ba277359e059eb1bfc1c18b9608625c56b67b8a37c3bcc0208d7" + sha256 cellar: :any, arm64_sequoia: "46dc23e75280d9ee1b6d06945dbbe02c5df6548a593a463dabf7c8f08a2cb805" + sha256 cellar: :any, arm64_sonoma: "6305d2c0681a4e0d1a1c759e4d9368a3e479d3cb47e4ad56c1510bde6eac526e" + sha256 cellar: :any, arm64_ventura: "1999933a7cfd48060c8add8b68b1381f4ef3eb81bc60effd9e5693aed2e9fe00" + sha256 cellar: :any, sonoma: "dc2fb2e33afad5b3aefec987d0f8e39de09fea5f8b2ea4face4e043c0f3e624d" + sha256 cellar: :any, ventura: "56e693f599c54b059039fd369cf77eee88fd39a9b2e9490e74021e5fdcd1081f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3808a79c440d4d319da04ad1623e85901363c5cfe7a07d5a48c245547e4aa2a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd4bb5c62758c86baf6c6a8211260e41c9311d3660d46d7f94f4b89bf2dd7b41" + end + + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "make" + bin.install "dpcmd" + (share/"DediProg").install "ChipInfoDb.dedicfg" + end + + test do + # Try and read from a device that isn't connected + assert_match version.to_s, shell_output("#{bin}/dpcmd -rSTDOUT -a0x100 -l0x23", 1) + end +end diff --git a/Formula/d/dpic.rb b/Formula/d/dpic.rb new file mode 100644 index 0000000000000..b1a81fa9e679a --- /dev/null +++ b/Formula/d/dpic.rb @@ -0,0 +1,40 @@ +class Dpic < Formula + desc "Implementation of the GNU pic \"little language\"" + homepage "https://ece.uwaterloo.ca/~aplevich/dpic/" + url "https://ece.uwaterloo.ca/~aplevich/dpic/dpic-2025.08.01.tar.gz" + sha256 "0f38f5c1e91518826cb2c6e95624b390d1808efadc0402f83911512f0ce726c3" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=["']?dpic[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "069e4b119b56fd45367c629fe3805950cc3b6cfeadee73e3cb7026dcb3de5406" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0bee67d515b1fc726a346a9fa48942b41c85c473ac759ca5d7aee0e850e889e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e51eb9b759ac15a295bdc87b54f3d8374b46b9d51145fbd35aef8ee189459fd4" + sha256 cellar: :any_skip_relocation, sonoma: "fd6b43df0b91288003dff57d40408349cef599d179f862bd8371b7f6412006e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9471b7decb3914a6418112410f2345fbf298dda741dd3d5a0c9254b8d9694909" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cee392ae39ad1e121ea9f5a96b5fabbb157db774051e2fdd6c99eb2a5a9a3416" + end + + def install + system "./configure", *std_configure_args + system "make" + bin.install "dpic" + end + + test do + (testpath/"test.pic").write <<~EOS + .PS + down; box; arrow; ellipse; arrow; circle + move down + left; box; arrow; ellipse; arrow; circle + [ right; box; arrow; circle; arrow down from last circle.s; ellipse ] \ + with .w at (last circle,1st ellipse) + .PE + EOS + system bin/"dpic", "-g", "test.pic" + end +end diff --git a/Formula/d/dpkg.rb b/Formula/d/dpkg.rb new file mode 100644 index 0000000000000..d6b609960cd52 --- /dev/null +++ b/Formula/d/dpkg.rb @@ -0,0 +1,139 @@ +class Dpkg < Formula + desc "Debian package management system" + homepage "https://wiki.debian.org/Teams/Dpkg" + # Please use a mirror as the primary URL as the + # dpkg site removes tarballs regularly which means we get issues + # unnecessarily and older versions of the formula are broken. + url "https://deb.debian.org/debian/pool/main/d/dpkg/dpkg_1.22.21.tar.xz" + sha256 "57e6cc8408d8ebe08ef22f72149c2bf6b0f2ad62eea13db88e0b23bfd73303db" + license "GPL-2.0-only" + + livecheck do + url "https://deb.debian.org/debian/pool/main/d/dpkg/" + regex(/href=.*?dpkg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "b362544ad40b720b13bf3714ea6a57363e86f912f8c319123deb8fb138bb0463" + sha256 arm64_sequoia: "c99935cb16e3f8d32773f3dad83466058e43754309b35497de0d9656dfec6422" + sha256 arm64_sonoma: "412ed4289f5dbf0c58ddacc4ef2eaa6bf21bb77fdc046e16700e8fa3b24a9f14" + sha256 arm64_ventura: "a95ed9e6898dfe3f16e530d453670c68a0baab6488c219ffd37447fe86132a1f" + sha256 sonoma: "600f2217dce1fd62e49b82b253d81f4c86f322e05e46aea862e9363194c801f5" + sha256 ventura: "5f1e6078677fbfe8a24a4a2c723d775942d2c712b1522113773600dc9f68c99b" + sha256 arm64_linux: "fd4c80158a7febd75d90029e8449678cf372268a2e3d99754a92e07726d8abc3" + sha256 x86_64_linux: "6bc26870ad3a2f16d478ad2f29d40fd55272a7f4c5e3b088778d1e5d553b34a2" + end + + depends_on "pkgconf" => :build + depends_on "po4a" => :build + depends_on "gettext" + depends_on "gnu-tar" + depends_on "gpatch" + depends_on "libmd" # for md5.h + depends_on "perl" + depends_on "xz" # For LZMA + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + keg_only "it conflicts with system dpkg" + end + + patch :DATA + + def install + # We need to specify a recent gnutar, otherwise various dpkg C programs will + # use the system "tar", which will fail because it lacks certain switches. + ENV["TAR"] = if OS.mac? + Formula["gnu-tar"].opt_bin/"gtar" + else + Formula["gnu-tar"].opt_bin/"tar" + end + + # Since 1.18.24 dpkg mandates the use of GNU patch to prevent occurrences + # of the CVE-2017-8283 vulnerability. + # https://www.openwall.com/lists/oss-security/2017/04/20/2 + ENV["PATCH"] = if OS.mac? + Formula["gpatch"].opt_bin/"gpatch" + else + Formula["gpatch"].opt_bin/"patch" + end + + # Theoretically, we could reinsert a patch here submitted upstream previously + # but the check for PERL_LIB remains in place and incompatible with Homebrew. + # Using an env and scripting is a solution less likely to break over time. + # Both variables need to be set. One is compile-time, the other run-time. + ENV["PERL_LIBDIR"] = libexec/"lib/perl5" + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{libexec}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "--disable-dselect", + "--disable-start-stop-daemon" + system "make" + system "make", "install" + + bin.install Dir[libexec/"bin/*"] + man.install Dir[libexec/"share/man/*"] + (lib/"pkgconfig").install_symlink Dir[libexec/"lib/pkgconfig/*.pc"] + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + + (buildpath/"dummy").write "Vendor: dummy\n" + (etc/"dpkg/origins").install "dummy" + (etc/"dpkg/origins").install_symlink "dummy" => "default" + end + + def post_install + (var/"lib/dpkg").mkpath + (var/"log").mkpath + end + + def caveats + <<~EOS + This installation of dpkg is not configured to install software, so + commands such as `dpkg -i`, `dpkg --configure` will fail. + EOS + end + + test do + # Do not remove the empty line from the end of the control file + # All deb control files MUST end with an empty line + (testpath/"test/data/homebrew.txt").write "brew" + (testpath/"test/DEBIAN/control").write <<~EOS + Package: test + Version: 1.40.99 + Architecture: amd64 + Description: I am a test + Maintainer: Dpkg Developers + + EOS + system bin/"dpkg", "-b", testpath/"test", "test.deb" + assert_path_exists testpath/"test.deb" + + rm_r("test") + system bin/"dpkg", "-x", "test.deb", testpath + assert_path_exists testpath/"data/homebrew.txt" + end +end + +__END__ +diff --git a/lib/dpkg/i18n.c b/lib/dpkg/i18n.c +index 4952700..81533ff 100644 +--- a/lib/dpkg/i18n.c ++++ b/lib/dpkg/i18n.c +@@ -23,6 +23,11 @@ + + #include + ++#ifdef __APPLE__ ++#include ++#include ++#endif ++ + #ifdef HAVE_USELOCALE + static locale_t dpkg_C_locale; + #endif diff --git a/Formula/d/dpp.rb b/Formula/d/dpp.rb new file mode 100644 index 0000000000000..c37e010bcf403 --- /dev/null +++ b/Formula/d/dpp.rb @@ -0,0 +1,92 @@ +class Dpp < Formula + desc "Directly include C headers in D source code" + homepage "https://github.com/atilaneves/dpp" + url "https://github.com/atilaneves/dpp.git", + tag: "v0.6.0", + revision: "9c2b175b32cc46581a94a7ee1c0026f0cda045fc" + license "BSL-1.0" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "86cb5490c0ddbbe4e7a242cafd4e776a243873dd649ec1e077b23e91e6cab1bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5f0fc9c62c460aba1532c7389e42c9bb85da0bcfa38607b76a361cb66c0d396" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49bf533852469130afaf24027a2d88f6825d35cd90515e041bdddccff3620640" + sha256 cellar: :any_skip_relocation, arm64_ventura: "443e5a65e5f70dc1c1af23f374c94cb1c6ff26836a4b23c9c6e4597502dbd060" + sha256 cellar: :any_skip_relocation, sonoma: "aebc8ca08df57de8624e9fb1a324872bb5883b207bb2a650a59125efc54e823b" + sha256 cellar: :any_skip_relocation, ventura: "8acb22136bec153dd078adc4ad53441ce33e65a1ad96c25161a13cc19ca9e1e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5115fc9b696c79b4acaa885bf0476915c91993d8a0ecfe393fd85cbd2b5af56d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2831967224ea98d7b494448db999203aead8f24183bb33319315f5af8d271185" + end + + depends_on "dtools" => :build + depends_on "dub" => :build + depends_on "ldc" => [:build, :test] + + uses_from_macos "llvm" # for libclang + + # Match versions from dub.selections.json + # VERSION=#{version} && curl https://raw.githubusercontent.com/atilaneves/dpp/v$VERSION/dub.selections.json + resource "libclang" do + url "https://code.dlang.org/packages/libclang/0.3.3.zip" + sha256 "281b1b02f96c06ef812c7069e6b7de951f10c9e1962fdcfead367f9244e77529" + end + + resource "sumtype" do + url "https://code.dlang.org/packages/sumtype/1.2.8.zip" + sha256 "fd273e5b4f97ef6b6f08f9873f7d1dd11da3b9f0596293ba901be7caac05747f" + end + + resource "unit-threaded" do + url "https://code.dlang.org/packages/unit-threaded/2.1.9.zip" + sha256 "1e06684e7f542e2c3d20f3b0f6179c16af2d80806a3a322d819aec62b6446d74" + end + + def install + resources.each do |r| + r.stage buildpath/"dub-packages"/r.name + system "dub", "add-local", buildpath/"dub-packages"/r.name, r.version.to_s + end + # Avoid linking brew LLVM on Intel macOS + inreplace "dub-packages/libclang/dub.sdl", %r{^lflags "-L/usr/local/opt/llvm/lib"}, "//\\0" + + if OS.mac? + toolchain_paths = [] + toolchain_paths << MacOS::CLT::PKG_PATH if MacOS::CLT.installed? + toolchain_paths << MacOS::Xcode.toolchain_path if MacOS::Xcode.installed? + dflags = toolchain_paths.flat_map do |path| + %W[ + -L-L#{path}/usr/lib + -L-rpath + -L#{path}/usr/lib + ] + end + ENV["DFLAGS"] = dflags.join(" ") + end + system "dub", "add-local", buildpath + system "dub", "build", "--skip-registry=all", "dpp" + bin.install "bin/d++" + end + + test do + (testpath/"c.h").write <<~C + #define FOO_ID(x) (x*3) + int twice(int i); + C + + (testpath/"c.c").write <<~C + int twice(int i) { return i * 2; } + C + + (testpath/"foo.dpp").write <<~EOS + #include "c.h" + void main() { + import std.stdio; + writeln(twice(FOO_ID(5))); + } + EOS + + system ENV.cc, "-c", "c.c" + system bin/"d++", "--compiler=ldc2", "foo.dpp", "c.o" + assert_match "30", shell_output("./foo") + end +end diff --git a/Formula/d/dprint.rb b/Formula/d/dprint.rb new file mode 100644 index 0000000000000..5b0cf535ee359 --- /dev/null +++ b/Formula/d/dprint.rb @@ -0,0 +1,64 @@ +class Dprint < Formula + desc "Pluggable and configurable code formatting platform written in Rust" + homepage "https://dprint.dev/" + url "https://github.com/dprint/dprint/archive/refs/tags/0.50.2.tar.gz" + sha256 "dfba0da97f394e4aa4f372e0013ffd1379215c7353cb56450bea0a2802150d54" + license "MIT" + head "https://github.com/dprint/dprint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b776542191504aadb80e01febd82744fdfd5de0b93cf74ba4ac738370653b7a9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3bba2a20c6b7165229852acd0fa1ca867563c273edb862f2f5f0596e6c80f1ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47710226f52c96c47759cf2f34b456113ef31a74b9af64e387bd986fdf476eeb" + sha256 cellar: :any_skip_relocation, sonoma: "b368266cef3eb8ffe2272a229c0f9b591db4a7adc92c9ebeee3bdc1cb168ce5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f0d07331cba2f93ef066d1a52ec001bde5a5047d19ea3332143a02e746f2139" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5352f01226142ab83aab37094a05c02af7a2c6283d971bba2ebb219e5d1b6e0" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "xz" # required for lzma support + + def install + ENV.append_to_rustflags "-C link-arg=-Wl,-undefined,dynamic_lookup" if OS.mac? + + system "cargo", "install", *std_cargo_args(path: "crates/dprint") + generate_completions_from_executable(bin/"dprint", "completions") + end + + test do + (testpath/"dprint.json").write <<~JSON + { + "$schema": "https://dprint.dev/schemas/v0.json", + "projectType": "openSource", + "incremental": true, + "typescript": { + }, + "json": { + }, + "markdown": { + }, + "rustfmt": { + }, + "includes": ["**/*.{ts,tsx,js,jsx,json,md,rs}"], + "excludes": [ + "**/node_modules", + "**/*-lock.json", + "**/target" + ], + "plugins": [ + "https://plugins.dprint.dev/typescript-0.44.1.wasm", + "https://plugins.dprint.dev/json-0.7.2.wasm", + "https://plugins.dprint.dev/markdown-0.4.3.wasm", + "https://plugins.dprint.dev/rustfmt-0.3.0.wasm" + ] + } + JSON + + (testpath/"test.js").write("const arr = [1,2];") + system bin/"dprint", "fmt", testpath/"test.js" + assert_match "const arr = [1, 2];", File.read(testpath/"test.js") + + assert_match "dprint #{version}", shell_output("#{bin}/dprint --version") + end +end diff --git a/Formula/d/dps8m.rb b/Formula/d/dps8m.rb new file mode 100644 index 0000000000000..1d2b3c18bcb2f --- /dev/null +++ b/Formula/d/dps8m.rb @@ -0,0 +1,65 @@ +class Dps8m < Formula + desc "Simulator of the 36-bit GE/Honeywell/Bull 600/6000-series mainframe computers" + homepage "https://dps8m.gitlab.io/" + url "https://dps8m.gitlab.io/dps8m-r3.1.0-archive/R3.1.0/dps8m-r3.1.0-src.tar.gz" + sha256 "4f09cb3e0106f39864617f17f3858e15cca1e9588fd50dde9bc736808f89e26b" + license "ICU" + head "https://gitlab.com/dps8m/dps8m.git", branch: "master" + + livecheck do + url "https://dps8m.gitlab.io/dps8m/Releases/" + regex(/href=.*?dps8m[._-]r?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5d60fd88809f95e134a996e6f9d03f9b8b5f4d82d2da4ea0ea6861e44883a5f4" + sha256 cellar: :any, arm64_sequoia: "2299a62a4694d96a06590dda48aec1b5bc7d4223a16027fc8d7e2815b89ef96b" + sha256 cellar: :any, arm64_sonoma: "0c1ab00fc50dc0faab0615c50f338d6f65539861eccc49efce8a2e672d91de13" + sha256 cellar: :any, arm64_ventura: "807a98a81f8d7abb726a736adbe55e65b4ca015b7019fc96f76032cd1c38431e" + sha256 cellar: :any, sonoma: "0690eb787b730de5eea8250c1e1b649f8662e531650be0fe7b37e83eb6e68c4c" + sha256 cellar: :any, ventura: "b2e4de813094ec39ec4cebeb41fba5e8a4cd7980a1827725103da70aa016dad0" + sha256 arm64_linux: "a36ea1366280f8b91a7d40a189eeda1dcfafcbf4911e36ed5e4157f35dbe5e08" + sha256 x86_64_linux: "dffb4ef88aa0f51558f805fc3ad1bb8cba22c48155a6d816fa194552df2cfd49" + end + + depends_on "lld" => :build + depends_on "llvm" => :build + depends_on "libuv" + + uses_from_macos "bash" + + def install + if OS.mac? && MacOS.version < :sonoma + system "make" + else + # Upstream issue: https://gitlab.com/dps8m/dps8m/-/issues/293 + inreplace "src/pgo/Build.PGO.Homebrew.Clang.sh", "exit 1", "" + inreplace "src/pgo/Build.PGO.Homebrew.Clang.sh", "$(brew --prefix llvm)", "$BREW_LLVM_PATH" + ENV["BREW_LLVM_PATH"] = Formula["llvm"].opt_prefix + ENV["NO_PGO_LIBUV"] = "1" + ENV.append "LDFLAGS", "-Wl,-rpath,\"#{Formula["libuv"].opt_lib}\" -L\"#{Formula["libuv"].opt_lib}\" -luv" + ENV.append "CFLAGS", "-I\"#{Formula["libuv"].opt_include}\"" + system "./src/pgo/Build.PGO.Homebrew.Clang.sh", "LIBUV=" + end + system "make", "install", "PREFIX=#{prefix}" + end + + test do + require "expect" + require "pty" + timeout = 10 + PTY.spawn(bin/"dps8", "-t") do |r, w, pid| + refute_nil r.expect("sim>", timeout), "Expected sim>" + w.write "SH VE\r" + refute_nil r.expect("Version:", timeout), "Expected Version:" + w.write "q\r" + refute_nil r.expect("Goodbye", timeout), "Expected Goodbye" + ensure + r.close + w.close + Process.wait(pid) + end + end +end diff --git a/Formula/d/dqlite.rb b/Formula/d/dqlite.rb new file mode 100644 index 0000000000000..1a05b88fbdcac --- /dev/null +++ b/Formula/d/dqlite.rb @@ -0,0 +1,61 @@ +class Dqlite < Formula + desc "Embeddable, replicated and fault-tolerant SQLite-powered engine" + homepage "https://dqlite.io" + url "https://github.com/canonical/dqlite/archive/refs/tags/v1.18.3-fixed.tar.gz" + version "1.18.3-fixed" + sha256 "ec10c975dffc189e02d514577bc3ee76ba9a55c7996f737f6d2510b81592ca25" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "cfefe0be8f27819372226623130a56b69b688cdb49793579722dfe2b934b56e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6a890bca0db46b71c8f56f7e2d9afc926a790e5e9f3332a6b4c08074840a1ca" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "go" => :test + depends_on "libuv" + depends_on :linux # requires Linux kernel AIO + depends_on "lz4" + depends_on "sqlite" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + resource "dqlite-demo" do + url "https://raw.githubusercontent.com/canonical/go-dqlite/2425f137a185a27e2b2fee7c2cb5f97d459e695d/cmd/dqlite-demo/dqlite-demo.go" + sha256 "302890eb50419e7fee4d8c5dc27a77353ed7e9d9047f65e872def971fd3ef178" + end + + (testpath/"testproject").mkpath + (testpath/"testproject").install resource("dqlite-demo") + cd "testproject" do + system "go", "mod", "init", "testproject" + system "go", "mod", "tidy" + system "go", "build", "-o", "test" + + lo = "127.0.0.1" + # cluster of 2 instances, 1 db and 1 API port each + api1 = free_port + db1 = free_port + api2 = free_port + db2 = free_port + out1 = IO.popen("./test --db #{lo}:#{db1} --api #{lo}:#{api1}") + sleep 3 + out2 = IO.popen("./test --db #{lo}:#{db2} --api #{lo}:#{api2} --join #{lo}:#{db1}") + sleep 3 + assert_match "done", shell_output("curl -X PUT -d my-value http://#{lo}:#{api1}/my-key") + sleep 1 + Process.kill("TERM", out1.pid) + sleep 1 + assert_match "my-value", shell_output("curl http://#{lo}:#{api2}/my-key") + Process.kill("TERM", out2.pid) + end + end +end diff --git a/Formula/d/dra.rb b/Formula/d/dra.rb new file mode 100644 index 0000000000000..67164ee97bb70 --- /dev/null +++ b/Formula/d/dra.rb @@ -0,0 +1,38 @@ +class Dra < Formula + desc "Command-line tool to download release assets from GitHub" + homepage "https://github.com/devmatteini/dra" + url "https://github.com/devmatteini/dra/archive/refs/tags/0.9.0.tar.gz" + sha256 "4fd9b49943ef916c88b6bcac5281060c99d73963c1e038eba4388064791eebc7" + license "MIT" + head "https://github.com/devmatteini/dra.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2f8dfa139234bb0126147e523b112384ac77cd12ec0cbe9cf5eb7e467e86c8d1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc940179266e2d5afb1a005ecd360268ef27d451f5cb39620e37ba3f23083aab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "31c17c40f98d9df20e7ff76006b997822ec9beb3c56788b43414a775b5f95842" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a2f93295eb73500bed65298d844ee5a7e2b6a39731df672ec00d3cd42cdb7af" + sha256 cellar: :any_skip_relocation, sonoma: "5eaec72c0d3f6138832c52884f6ff0d426c05734962eb18d3a193852831f669a" + sha256 cellar: :any_skip_relocation, ventura: "5c377bf68d5fe5dbff55e9992173b405bca9a9c4d3b420d4a8363d347003ad77" + sha256 cellar: :any_skip_relocation, arm64_linux: "d32510543cb1d0ac627e8bb48c75166ea341564ac2f344fe3bfe6351442e0137" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b875e887e2069cb92a2c2e0aa04ce4b07014e4b3ebf186c813a6f910a2cba7f" + end + + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"dra", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dra --version") + + system bin/"dra", "download", "--select", + "helloworld.tar.gz", "devmatteini/dra-tests" + + assert_path_exists testpath/"helloworld.tar.gz" + end +end diff --git a/Formula/d/draco.rb b/Formula/d/draco.rb new file mode 100644 index 0000000000000..15806519312b3 --- /dev/null +++ b/Formula/d/draco.rb @@ -0,0 +1,47 @@ +class Draco < Formula + desc "3D geometric mesh and point cloud compression library" + homepage "https://google.github.io/draco/" + url "https://github.com/google/draco/archive/refs/tags/1.5.7.tar.gz" + sha256 "bf6b105b79223eab2b86795363dfe5e5356050006a96521477973aba8f036fe1" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2af623d3d7f4f28c7b7c31aad72fbfad20d05cbaa503062854933036c7322ac0" + sha256 cellar: :any, arm64_sequoia: "444b7b20ea990dba3261cfd1fbbb76145321b9d473c90a2801190c4a85cef41c" + sha256 cellar: :any, arm64_sonoma: "0f361d8c3b0368784f533988d4a44519ef3e82a9ab3a69b2bd98f24282446b66" + sha256 cellar: :any, arm64_ventura: "89bca42ebd075b8d25de0e653a298257e29cd2436405dea7f9f4401bae8a7e95" + sha256 cellar: :any, sonoma: "7039e3c7e342942f71608d377ea316096701efba166a39c66ff601546bf32f2b" + sha256 cellar: :any, ventura: "aa05dd53ed7392292a81fc26c93ccc8b1aa99318ce673f817fe9c4204c0820c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5629a81008066774b44c411651acc7f1d1159709dc75c4b64fcf6724bb4c5b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08e5979a2f8db41ee122ecdddb83285038ca417aac3a9c5ef85e1d92656c8c45" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "testdata/cube_att.ply" + end + + test do + cp pkgshare/"cube_att.ply", testpath + + output = shell_output("#{bin}/draco_encoder -i cube_att.ply -o cube_att.drc") + assert_path_exists testpath/"cube_att.drc" + assert_match <<~EOS, output + Encoder options: + Compression level = 7 + Positions: Quantization = 11 bits + Normals: Quantization = 8 bits + EOS + end +end diff --git a/Formula/d/draft.rb b/Formula/d/draft.rb new file mode 100644 index 0000000000000..8eab8b0ef312f --- /dev/null +++ b/Formula/d/draft.rb @@ -0,0 +1,35 @@ +class Draft < Formula + desc "Day 0 tool for getting your app on Kubernetes fast" + homepage "https://github.com/Azure/draft" + url "https://github.com/Azure/draft/archive/refs/tags/v0.17.13.tar.gz" + sha256 "577470d72285647e7a85a3c4c18d3bfe787180b36dd79ac86f2dcc1aad348708" + license "MIT" + head "https://github.com/Azure/draft.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "27c17c73595cdc1c9ab58222bd7c5da79118315f7d3a81bd0ae969a774bbfd93" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acdfe376f2889fcf9c4a9b78da02486db3877b3895581c3b7511d7d8b3a38b84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "179c2a499691c7f98f5250215d1c781777635ac169e0968cbf414ae24d623c9e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef805b1bf2ee0af2f16208b39745ac91aea55f5c0b840a7aa1ccd68ea7f8f2d4" + sha256 cellar: :any_skip_relocation, sonoma: "e25ed38ffef63fcca1d743ac697ca576a361ba124795ac633518a033debc3978" + sha256 cellar: :any_skip_relocation, ventura: "e3273bd83c47d8159e8adc62f3cd4a195401e7bd31351a376cea8ef098351f54" + sha256 cellar: :any_skip_relocation, arm64_linux: "e263f231150b79d7ea82ee10347990ba170cc4624966a46ee6ee54480026eddf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69ca3bc8252d3a2479a8774dc3c09298e553d36b3ccec5fc4539f2e9a8e16b14" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/Azure/draft/cmd.VERSION=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"draft", "completion") + end + + test do + supported_deployment_types = JSON.parse(shell_output("#{bin}/draft info"))["supportedDeploymentTypes"] + assert_equal ["helm", "kustomize", "manifests"], supported_deployment_types + + assert_match version.to_s, shell_output("#{bin}/draft version") + end +end diff --git a/Formula/d/drafter.rb b/Formula/d/drafter.rb new file mode 100644 index 0000000000000..096be8208c746 --- /dev/null +++ b/Formula/d/drafter.rb @@ -0,0 +1,59 @@ +class Drafter < Formula + desc "Native C/C++ API Blueprint Parser" + homepage "https://apiblueprint.org/" + url "https://github.com/apiaryio/drafter/releases/download/v5.1.0/drafter-v5.1.0.tar.gz" + sha256 "b3f60d9e77ace0d40d32b892b99852d3ed92e2fd358abd7f43d813c8dc473913" + license "MIT" + head "https://github.com/apiaryio/drafter.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d3963fe9e44406c53f2e4f7537dc4eabe78787b558fb9082a93caeaabb69a2db" + sha256 cellar: :any, arm64_sequoia: "ee2d1f0c252123ab1df0568f94c453dba3bb13a461a48ace73c9a2da3231d22e" + sha256 cellar: :any, arm64_sonoma: "ae6e70fa4ef8bf01705bb0fa8ea0fda39063b718f9b8e6d2bd2ef7923fbe9ab8" + sha256 cellar: :any, arm64_ventura: "fdc175f7d034e4233ba5450fabc3f0191f1c29ee75a64eca60ff1023f14b5a41" + sha256 cellar: :any, arm64_monterey: "e8f55148101feadb827546a163df01bb99e4752debdf9954e0d5e343027fcd81" + sha256 cellar: :any, arm64_big_sur: "89c48cd01697b98c8a8ce91dcd1f2d04016adda52e69f6a4785c3353893b767e" + sha256 cellar: :any, sonoma: "587d9d52be90fd35b25f696553e6d36035253e0c8b17308a573042f5042da372" + sha256 cellar: :any, ventura: "b3b7bf960af127738f0e212336255a2b94321a90366d9e01447013e9537c9ae7" + sha256 cellar: :any, monterey: "4c920f38e6a755f97eb063becfa8da9c11e2dd30b2a99019929b2c896af72e5b" + sha256 cellar: :any, big_sur: "a9a9a413c78370fbc9d3a47e861e4f4166fab68caea29f2a1ae745a6c963162b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8c30af375bc0f9dd48dfb3ecd7029c1b136a158355a235379678363a766edc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00241d159577722e4fb7d98b661a2d81c91e6fa3beaca88d010b6eecea4377b0" + end + + deprecate! date: "2024-12-04", because: :repo_archived + + depends_on "cmake" => :build + + # patch release version + patch do + url "https://github.com/apiaryio/drafter/commit/481d0ba83370d2cd45aa1979308cac4c2dbd3ab3.patch?full_index=1" + sha256 "3c3579ab3c0ae71a4449f547b734023b40a872b82ea81a8ccc0961f1d47e9a25" + end + + def install + # Fix to error: no member named 'swap' in namespace 'std' + if OS.mac? && DevelopmentTools.clang_build_version >= 1700 + inreplace "packages/boost/boost/move/adl_move_swap.hpp", + "#define BOOST_MOVE_ADL_MOVE_SWAP_HPP", + "#define BOOST_MOVE_ADL_MOVE_SWAP_HPP\n#include " + end + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"api.apib").write <<~EOS + # Homebrew API [/brew] + + ## Retrieve All Formula [GET /Formula] + + Response 200 (application/json) + + Attributes (array) + EOS + assert_equal "OK.", shell_output("#{bin}/drafter -l api.apib 2>&1").strip + + assert_match version.to_s, shell_output("#{bin}/drafter --version") + end +end diff --git a/Formula/d/dragonbox.rb b/Formula/d/dragonbox.rb new file mode 100644 index 0000000000000..9eb25b28ac0a1 --- /dev/null +++ b/Formula/d/dragonbox.rb @@ -0,0 +1,60 @@ +class Dragonbox < Formula + desc "Reference implementation of Dragonbox in C++" + homepage "https://github.com/jk-jeon/dragonbox" + url "https://github.com/jk-jeon/dragonbox/archive/refs/tags/1.1.3.tar.gz" + sha256 "09d63b05e9c594ec423778ab59b7a5aa1d76fdd71d25c7048b0258c4ec9c3384" + license any_of: [ + "BSL-1.0", + "Apache-2.0" => { with: "LLVM-exception" }, + ] + head "https://github.com/jk-jeon/dragonbox.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e8d3d051a973de698e054f0cbd6635457ec76d3a290232b6637531587c06fc2f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88e4534f61830511e3688998ce11edb471262826c3d201f38bf6e11115c3c44f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "529598b9212cd7ccc573f58334df5ef26f7925f3cdc41e319b7e3d3d562d6132" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6d8da388b5e481bc6bb2cbb17686782e029d76ac71b3ac1d3ae9bab6f5669a4b" + sha256 cellar: :any_skip_relocation, sonoma: "ea4c36f3d7b48b0d949a443ac9527b638d12bc67e7f75e15eddfc267bc8fb3d8" + sha256 cellar: :any_skip_relocation, ventura: "129ef3cab84bf26377f8e8925123d655dd19f033f971ea2a8f01dc0d9ea06316" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab2a40a63f7e8ded666c88854f9f2ca6543db95ac304d965d5c4f87be3fa0d7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd3fe3c6c5efe142c195fc07706f632c654635a48b44d09dbda7a845db8add48" + end + + depends_on "cmake" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(TestDragonbox) + + find_package(dragonbox REQUIRED) + add_executable(test_dragonbox test.cpp) + + target_link_libraries(test_dragonbox PRIVATE dragonbox::dragonbox_to_chars) + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + double number = 123.456; + char buffer[25]; + jkj::dragonbox::to_chars(number, buffer); + std::cout << buffer << std::endl; + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + + assert_match "1.23456E2", shell_output("./build/test_dragonbox") + end +end diff --git a/Formula/d/driftctl.rb b/Formula/d/driftctl.rb new file mode 100644 index 0000000000000..e1aa482180313 --- /dev/null +++ b/Formula/d/driftctl.rb @@ -0,0 +1,51 @@ +class Driftctl < Formula + desc "Detect, track and alert on infrastructure drift" + # website bug report, https://github.com/snyk/driftctl/issues/1700 + homepage "https://github.com/snyk/driftctl" + url "https://github.com/snyk/driftctl/archive/refs/tags/v0.40.0.tar.gz" + sha256 "30781d35092dd1dd1b34f22e63e3130a062cf4a3f511f61be013a0ff2a0c7767" + license "Apache-2.0" + head "https://github.com/snyk/driftctl.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e4500350da7f07da19dcad11a5fbcd4459737a9bf2f3fcf7410ad8020a34c92e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d87de2f3a5e0374a88d7ea3cbdedd603f88a7567a230aa48812e9e0457555540" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3ea52c1d74b676c7a9ead834f1d2d21515330c78b3a603361099b68f26184ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "950108c93c9b3b586dd38225b9500c3567bb450c48c2167aa0f77065c69976ca" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6f77e681d25b272b43d33ceffc3e267b96bb19e24849680ff8dcb655b9ee1194" + sha256 cellar: :any_skip_relocation, sonoma: "714af9730f7afe6a70eaea540001371f4e4ab5ff7968cde2ef07da4c31813865" + sha256 cellar: :any_skip_relocation, ventura: "8b9dfc0d29cf894157daea9ac173949a11dc37457b6ff829470cb664908b73f9" + sha256 cellar: :any_skip_relocation, monterey: "6ad20c81d5755fd801e386ffd8a4c9298970af04ddc32e3b68562a5288fc2576" + sha256 cellar: :any_skip_relocation, arm64_linux: "7515ca6fc4706faee61357732c04e3a51afe6b18f88c80cd7b8509ad6cc08919" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d87fead37c01350837835281119173d3ddd3d392f117bb03310a7b88f9f9a14a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/snyk/driftctl/build.env=release + -X github.com/snyk/driftctl/pkg/version.version=v#{version} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"driftctl", "completion") + end + + test do + assert_match "Could not find a way to authenticate on AWS!", + shell_output("#{bin}/driftctl --no-version-check scan 2>&1", 2) + + assert_match version.to_s, shell_output("#{bin}/driftctl version") + end +end diff --git a/Formula/d/driftwood.rb b/Formula/d/driftwood.rb new file mode 100644 index 0000000000000..c58266cb9fa35 --- /dev/null +++ b/Formula/d/driftwood.rb @@ -0,0 +1,67 @@ +class Driftwood < Formula + desc "Private key usage verification" + homepage "https://trufflesecurity.com/" + url "https://github.com/trufflesecurity/driftwood/archive/refs/tags/v1.0.1.tar.gz" + sha256 "655e7f5841a97820adf11b608b41f88cc93953c8c5e1d497bdbd86e5662b2621" + license "Apache-2.0" + head "https://github.com/trufflesecurity/driftwood.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9a229b45fe454df15804d0191c819d3eeb090b0fdb8d9881a1a76b86e99e3980" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "248ffb3e4e1f77251d56f7a9c0a0ed6be2b90c4d31e151ad0ea96a1914f47403" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05adc63ca02329151e5f5b07639f7dec8de81608b3806ee9dbe3319798bfda5d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bedf93a308a393359152d89abfd3a7abe810ad639e70f76291997b846e85dd24" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bedf93a308a393359152d89abfd3a7abe810ad639e70f76291997b846e85dd24" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bedf93a308a393359152d89abfd3a7abe810ad639e70f76291997b846e85dd24" + sha256 cellar: :any_skip_relocation, sonoma: "fcec67bfc00bb285a5311fbd2e3cf079d98c6a5509ec5c5b847237652beac0ae" + sha256 cellar: :any_skip_relocation, ventura: "45bd8ae86b45b33f711d1408048742ba539a0e5246b1328b6bcc1797f81b2413" + sha256 cellar: :any_skip_relocation, monterey: "45bd8ae86b45b33f711d1408048742ba539a0e5246b1328b6bcc1797f81b2413" + sha256 cellar: :any_skip_relocation, big_sur: "45bd8ae86b45b33f711d1408048742ba539a0e5246b1328b6bcc1797f81b2413" + sha256 cellar: :any_skip_relocation, arm64_linux: "74b258c583bc6daa74d7dbb42977373dce798c77908df054f0cd7d35d7f67a0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f23e0f3345fb5ee170a3572e9c02243b531c471ff5691ca9e6121454f93594b2" + end + + deprecate! date: "2025-04-27", because: :repo_archived, replacement_formula: "trufflehog" + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + # fake self-signed cert + (testpath/"fake.pem").write <<~EOS + -----BEGIN CERTIFICATE----- + MIID8zCCAtugAwIBAgIUEA5o49g6pqyhfG0NwT8lggIJGt0wDQYJKoZIhvcNAQEL + BQAwgYgxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOWTERMA8GA1UEBwwITmV3IFlv + cmsxETAPBgNVBAoMCEhvbWVicmV3MRYwFAYDVQQLDA1ob21lYnJldy1jb3JlMREw + DwYDVQQDDAhicmV3dGVzdDEbMBkGCSqGSIb3DQEJARYMdGVzdEBicmV3LnNoMB4X + DTIzMDcwMzIyMTk1N1oXDTMzMDYzMDIyMTk1N1owgYgxCzAJBgNVBAYTAlVTMQsw + CQYDVQQIDAJOWTERMA8GA1UEBwwITmV3IFlvcmsxETAPBgNVBAoMCEhvbWVicmV3 + MRYwFAYDVQQLDA1ob21lYnJldy1jb3JlMREwDwYDVQQDDAhicmV3dGVzdDEbMBkG + CSqGSIb3DQEJARYMdGVzdEBicmV3LnNoMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A + MIIBCgKCAQEAtzNxXwjc+X3gmLqwR85M5m1JXYT4KNv8lSRM81Mp1T4xgLCXRAzH + edzmcUveau1//nPxQdvJpwz1XY9cnBze77xnew8kcfakKqrqPHFrn87NHm9kUIIc + OK7YRCCwrBCZh0DKqZ//8eCymWe85Ezl98AuhE+lKxjg+GdmAB6CMWNIm6+zW+ur + FEpmzcxPzX0mreeoXLbkg1Hvvw84GuuG2QEKXbUX5be+xMhpGm0NYINUBcjvUWa3 + 8+1pLJzx346MKQIIdQVdKkBU85kW2huNjrgT9RSpWoLsKBH8d0S5lInCdFcGpiOF + s3D2gAJdhh6pVq2F75KooTiW7A4sGDMGUwIDAQABo1MwUTAdBgNVHQ4EFgQUfVU0 + LlOMixqYSC+9jtrKcK/GuFQwHwYDVR0jBBgwFoAUfVU0LlOMixqYSC+9jtrKcK/G + uFQwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAEiDn0ikzXX26 + NT85Zxv4/7+tMaDtOcZl9VgtYUSHl8Aj6ihLZzJXZdHYZis/8Izmfmtv7qiQ+fBV + Y2RwRMP/ycm6jMdrfZey1cgRdRtp5yPtLdEndixbQ9uAAXRSCW4D628QpTKK8D0O + cw5BOZ2Vg5ckAjtsFxvzBr1wobOPXTa9FAKPUJaWiD3z4z4Jd2YdY6CGiPIQpaIF + VWqWT1a4Nq7cNabns/htjNwU09Fo1B6Mf12u5QjsWF3AdJlVF54DJEB4uNVWaQEW + qHrD+Any5JCDu1qnVepBEoH1EosIXWa6s1UHCB61i3lbZW54Xhj1KVfLsVg4wfmJ + 3zxOo0lNLQ== + -----END CERTIFICATE----- + EOS + + output = shell_output("#{bin}/driftwood #{testpath}/fake.pem 2>&1", 1) + assert_match "Error computing public key: unsupported key type \\\"CERTIFICATE\\\"", output + + assert_match version.to_s, shell_output("#{bin}/driftwood --version") + end +end diff --git a/Formula/d/drill.rb b/Formula/d/drill.rb new file mode 100644 index 0000000000000..612b36a0931ff --- /dev/null +++ b/Formula/d/drill.rb @@ -0,0 +1,58 @@ +class Drill < Formula + desc "HTTP load testing application written in Rust" + homepage "https://github.com/fcsonline/drill" + url "https://github.com/fcsonline/drill/archive/refs/tags/0.8.3.tar.gz" + sha256 "12096bfeb57fa567f9104615c872b5fec787bacf5b9efcc9f14d496c08efe30d" + license "GPL-3.0-or-later" + head "https://github.com/fcsonline/drill.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3d39673bb52832f8c4cf3e962faa018890e29b1be4ecbc17416ab3a6492efd0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78f816fcac6826ac580286234ae1ba73cd4beb0b2862a7a523fb36b56863414f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "339d49f914baa6c8493f438e6c68b87ea51bdbb3dceca074c9e6fafbb207b728" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a63152d9bd25cb84099584ce2668b02c714225c5cc2d5e6816198d857e02663" + sha256 cellar: :any_skip_relocation, arm64_monterey: "518b086f2c1ae00f3d677615e2455a45b36976920a949a329dd1ec6a80cbd35b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ea7da74e8e531c20cb687722ed6cf5b4ea21ebad2cae0b518e6512a2c78474b2" + sha256 cellar: :any_skip_relocation, sonoma: "b71f3a574580dd32d8c71952387cae4c892d57e85db59733c12e2529722ca034" + sha256 cellar: :any_skip_relocation, ventura: "1d9b9f7b85d1962bb691648e99a4096fecc8c10f59844bc73db1bd93a77f7c99" + sha256 cellar: :any_skip_relocation, monterey: "051d29acc8b70771b3f1510942cca546668921ddf12b66ed25ec7c95790bf5f1" + sha256 cellar: :any_skip_relocation, big_sur: "61eadba6d4008eeb229a2ef431a6977fbaa19cb489e54f55d125edfaab016fe5" + sha256 cellar: :any_skip_relocation, arm64_linux: "17b7a2370d35c2fcd3056cc02deb5f5016bfb5282ed9cc86c99e05343f548b5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "701f7a9ab685f50091ce4c85d09cffde2a6b46ecda5052cdce5a41b06dafffd6" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + conflicts_with "ldns", because: "both install a `drill` binary" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"benchmark.yml").write <<~YAML + --- + concurrency: 4 + base: 'https://dummyjson.com' + iterations: 5 + rampup: 2 + + plan: + - name: Http status + request: + url: /http/200 + + - name: Check products API + request: + url: /products/1 + YAML + + assert_match "Total requests 10", + shell_output("#{bin}/drill --benchmark #{testpath}/benchmark.yml --stats") + end +end diff --git a/Formula/d/drogon.rb b/Formula/d/drogon.rb new file mode 100644 index 0000000000000..a14688ea5ec48 --- /dev/null +++ b/Formula/d/drogon.rb @@ -0,0 +1,64 @@ +class Drogon < Formula + desc "Modern C++ web application framework" + homepage "https://drogon.org" + # pull from git tag to get submodules + url "https://github.com/drogonframework/drogon.git", + tag: "v1.9.11", + revision: "a22956b82b6b221ceeff83913c3014ce0d048555" + license "MIT" + head "https://github.com/drogonframework/drogon.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "92797d62be765b5222be947c118e84a3910a18fb6e3c73cf00df717dc8ebbd18" + sha256 arm64_sequoia: "59b637806180b7e5a9443091cbd70e98254b2372aa144ac1264c7e699a502919" + sha256 arm64_sonoma: "fe6f23a4a2c68e263204b89729118dc41799fb8aaed7dd75c6a53913b7eea207" + sha256 arm64_ventura: "3145d83dfb9f8d3be0a3d93bdcac5df5184c19eb448e5a26ab724d50cd24f9cf" + sha256 sonoma: "5fa607c6e5df73eb556b1e7598aa931039ce8eee4fd911cfc81a0d536798f9db" + sha256 ventura: "35da5590e6144993de4570c01c52caa88f3da941b82376582273fd23c706586b" + sha256 cellar: :any_skip_relocation, arm64_linux: "164824b7a40e178b8f1db45d9c0ab20b6d616fb3a0e412ad837a4175561368ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3cd681f4cdde59fce58c8a194c2a55ebac32205178673bc6d2ffe4ea3da3ccc" + end + + depends_on "cmake" => [:build, :test] + depends_on "brotli" + depends_on "c-ares" + depends_on "jsoncpp" + depends_on "openssl@3" + + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "util-linux" + end + + def install + args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"] + args << "-DUUID_DIR=#{Formula["util-linux"].opt_prefix}" if OS.linux? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"dg_ctl", "create", "project", "hello" + cd "hello" do + port = free_port + inreplace "main.cc", "5555", port.to_s + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + + begin + pid = spawn("build/hello") + sleep 1 + result = shell_output("curl -s 127.0.0.1:#{port}") + assert_match "
drogon", result + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end + end +end diff --git a/Formula/d/dromeaudio.rb b/Formula/d/dromeaudio.rb new file mode 100644 index 0000000000000..934b8aea890ed --- /dev/null +++ b/Formula/d/dromeaudio.rb @@ -0,0 +1,55 @@ +class Dromeaudio < Formula + desc "Small C++ audio manipulation and playback library" + homepage "https://github.com/joshb/dromeaudio/" + url "https://github.com/joshb/DromeAudio/archive/refs/tags/v0.3.0.tar.gz" + sha256 "d226fa3f16d8a41aeea2d0a32178ca15519aebfa109bc6eee36669fa7f7c6b83" + license "BSD-2-Clause" + head "https://github.com/joshb/dromeaudio.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "caa20933486c0d5609e92bbdfa895b2944702bbe8a98a47954c9c5d50a2ffb00" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "955eefdfe1d3fe73315f0f9c2eb9c90a08444658caf30b5c9235aa27337980bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6dfb5e4fee8100aaf2ba927c2eb06f0ab7ea5b988f4e40b226653b9547937668" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e8d488b354c6a990708784d7048679ff882b3edf5d21b12276d13e2e241ab3f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9848eaeb0b335219124e08ff894bedd136c1fa95bcf72a04b69a778305fef5b1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "56127ff9fdb552e5a521d52a9a848ddf1f4a79029740d65f053ba9cc8ab2c7f7" + sha256 cellar: :any_skip_relocation, sonoma: "55529f04d9f3be3a5092098cc3d22670448964bc6886d716b7e5240aa3faa9fd" + sha256 cellar: :any_skip_relocation, ventura: "46904c7b701735b3e0fe766e57b7629ce71647ead11195bb73776cd1df29a80d" + sha256 cellar: :any_skip_relocation, monterey: "2f3eb4f1d29eb1644181305eae8444526d38f6a557c4c236407dacf7d91a9fcd" + sha256 cellar: :any_skip_relocation, big_sur: "ef9ce724d04545c565e1e46f06560128f54c8fd164fdc3d3abca18a4d17ad9b6" + sha256 cellar: :any_skip_relocation, catalina: "5199ecfbb8454f1560685c537b1fbaf1b301b39ad8ea825a9f846cc9f3530f30" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5db31bd07590274f76bfd1b145f31f5578834a96d9c093448860b27ac2d0a24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f070aab40ff55d1bc82cae306c222e05770d9b5cd22fdace7fbb7d04ea7aa6f" + end + + deprecate! date: "2025-08-02", because: :unmaintained + + depends_on "cmake" => :build + + def install + # install FindDromeAudio.cmake under share/cmake/Modules/ + inreplace "share/CMakeLists.txt", "${CMAKE_ROOT}", "#{share}/cmake" + + # Workaround for CMake 4 compatibility + inreplace "CMakeLists.txt", "cmake_policy(SET CMP0005 OLD)", "" + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_path_exists include/"DromeAudio" + assert_path_exists lib/"libDromeAudio.a" + + # We don't test DromeAudioPlayer with an audio file because it only works + # with certain audio devices and will fail on CI with this error: + # DromeAudio Exception: AudioDriverOSX::AudioDriverOSX(): + # AudioUnitSetProperty (for StreamFormat) failed + # + # Related PR: https://github.com/Homebrew/homebrew-core/pull/55292 + assert_match(/Usage: .*?DromeAudioPlayer /i, + shell_output("#{bin}/DromeAudioPlayer 2>&1", 1)) + end +end diff --git a/Formula/d/drone-cli.rb b/Formula/d/drone-cli.rb new file mode 100644 index 0000000000000..21a2be3d14fea --- /dev/null +++ b/Formula/d/drone-cli.rb @@ -0,0 +1,33 @@ +class DroneCli < Formula + desc "Command-line client for the Drone continuous integration server" + homepage "https://drone.io" + url "https://github.com/harness/drone-cli/archive/refs/tags/v1.9.0.tar.gz" + sha256 "f19786bb5da9e506f6d175c0639bfd0a3f8acf8487ac575a54afba222e0b70d7" + license "Apache-2.0" + head "https://github.com/harness/drone-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "37626e0ade2e2b7c103e6340104645027985986195a56bc2152edee6e022702d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "23c5ccc940a32a1161cf3bd08ae94ac2975f900937befe9c8647d31cb3fcd0d8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23c5ccc940a32a1161cf3bd08ae94ac2975f900937befe9c8647d31cb3fcd0d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "23c5ccc940a32a1161cf3bd08ae94ac2975f900937befe9c8647d31cb3fcd0d8" + sha256 cellar: :any_skip_relocation, sonoma: "72b2623cbe6e8319cdf8a8b1044116a59215698b9004a34405f2e1f4c8a66216" + sha256 cellar: :any_skip_relocation, ventura: "72b2623cbe6e8319cdf8a8b1044116a59215698b9004a34405f2e1f4c8a66216" + sha256 cellar: :any_skip_relocation, arm64_linux: "843947dbc29fa19b8309c3bbd004b4237954eef1f696d8c5d51c50eb8af4412d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edbf3ac83206ebc7d2272c111ec6fc63cf24fd305d65149bd3e4e0aac8ec96db" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(output: bin/"drone", ldflags:), "drone/main.go" + end + + test do + assert_match version.to_s, shell_output("#{bin}/drone --version") + + assert_match "manage logs", shell_output("#{bin}/drone log 2>&1") + end +end diff --git a/Formula/d/dropbear.rb b/Formula/d/dropbear.rb new file mode 100644 index 0000000000000..4e1a3f11c98a1 --- /dev/null +++ b/Formula/d/dropbear.rb @@ -0,0 +1,60 @@ +class Dropbear < Formula + desc "Small SSH server/client for POSIX-based system" + homepage "https://matt.ucc.asn.au/dropbear/dropbear.html" + url "https://matt.ucc.asn.au/dropbear/releases/dropbear-2025.88.tar.bz2" + sha256 "783f50ea27b17c16da89578fafdb6decfa44bb8f6590e5698a4e4d3672dc53d4" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?dropbear[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6a616913e00306a4699d97791ccd998feec82bff32373786b7e85bcd26cf0d00" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9328cf8c07250bf2320af722633579e84db7c992f11d43ebc67aa85a3bbebad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fb134cc3f5603b552af4a3b83d58e6576aac58a4a589537f8a1d87d73b1cde15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a17000ca546c8c5cb69b916d660bab2c9ab3341161d33a6a73f5d40e0dad2300" + sha256 cellar: :any_skip_relocation, sonoma: "db12fa6ae371b408f2ec14107afa41ef7eea2dfeb12cd267b186188e10a19b1b" + sha256 cellar: :any_skip_relocation, ventura: "f5dae867598a50af551fcd22893d6980830310fd01bac1d89c037e428b127085" + sha256 cellar: :any_skip_relocation, arm64_linux: "5252254322544bf05aa9cd1c0d78770b7cee10f037bd0f93d336794a81c51383" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e275ebce599f0b89bdbdd74d0ac4083f61b4ea8b1d4b97b16ba80af6dd4a41af" + end + + head do + url "https://github.com/mkj/dropbear.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + end + + def install + ENV.deparallelize + + if build.head? + system "autoconf" + system "autoheader" + end + system "./configure", "--prefix=#{prefix}", + "--enable-pam", + "--enable-zlib", + "--enable-bundled-libtom", + "--sysconfdir=#{etc}/dropbear" + system "make" + system "make", "install" + end + + test do + testfile = testpath/"testec521" + system bin/"dbclient", "-h" + system bin/"dropbearkey", "-t", "ecdsa", "-f", testfile, "-s", "521" + assert_path_exists testfile + end +end diff --git a/Formula/d/dropbox-uploader.rb b/Formula/d/dropbox-uploader.rb new file mode 100644 index 0000000000000..fa22704caa2e1 --- /dev/null +++ b/Formula/d/dropbox-uploader.rb @@ -0,0 +1,29 @@ +class DropboxUploader < Formula + desc "Bash script for interacting with Dropbox" + homepage "https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/" + url "https://github.com/andreafabrizi/Dropbox-Uploader/archive/refs/tags/1.0.tar.gz" + sha256 "8c9be8bd38fb3b0f0b4d1a863132ad38c8299ac62ecfbd1e818addf32b48d84c" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7c75671b625c28098f9e47ca1290b976943c041666e1250798f2a0cc5d73135d" + end + + def install + bin.install "dropbox_uploader.sh", "dropShell.sh" + end + + test do + (testpath/".dropbox_uploader").write <<~EOS + APPKEY=a + APPSECRET=b + ACCESS_LEVEL=sandbox + OAUTH_ACCESS_TOKEN=c + OAUTH_ACCESS_TOKEN_SECRET=d + EOS + pipe_output("#{bin}/dropbox_uploader.sh unlink", "y\n") + end +end diff --git a/Formula/d/druid.rb b/Formula/d/druid.rb new file mode 100644 index 0000000000000..cfb9e2b7f0527 --- /dev/null +++ b/Formula/d/druid.rb @@ -0,0 +1,95 @@ +class Druid < Formula + desc "High-performance, column-oriented, distributed data store" + homepage "https://druid.apache.org/" + url "https://dlcdn.apache.org/druid/33.0.0/apache-druid-33.0.0-bin.tar.gz" + mirror "https://archive.apache.org/dist/druid/33.0.0/apache-druid-33.0.0-bin.tar.gz" + sha256 "5ee5ddbcc2273834af8a18dd173b2a04b9a911cb7ce516279db605788abd7d79" + license "Apache-2.0" + + livecheck do + url "https://druid.apache.org/downloads/" + regex(/href=.*?druid[._-]v?(\d+(?:\.\d+)+)-bin\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "6142abfc9a042da4990f758ac9e284b7f59ede3e94dc30e85a7fc357d06ba917" + end + + depends_on "zookeeper" => :test + depends_on "openjdk@17" # JDK 21 issue: https://github.com/apache/druid/issues/17429 + + # check https://github.com/apache/druid/blob/master/docs/development/extensions-core/mysql.md#install-mysql-connectorj + # for mysql-connector-java version compatibility + resource "mysql-connector-java" do + url "https://search.maven.org/remotecontent?filepath=com/mysql/mysql-connector-j/8.2.0/mysql-connector-j-8.2.0.jar" + sha256 "06f14fbd664d0e382347489e66495ca27ab7e6c2e1d9969a496931736197465f" + end + + def install + rm_r "quickstart/tutorial" + libexec.install Dir["*"] + + %w[ + broker.sh + coordinator.sh + historical.sh + middleManager.sh + overlord.sh + ].each do |sh| + inreplace libexec/"bin/#{sh}", "./bin/node.sh", libexec/"bin/node.sh" + end + + inreplace libexec/"bin/node.sh" do |s| + s.gsub! "nohup \"$BIN_DIR/run-java\"", + "nohup \"$BIN_DIR/run-java\" -Ddruid.extensions.directory=\"#{libexec}/extensions\"" + s.gsub! ":=lib", ":=#{libexec}/lib" + s.gsub! ":=conf/druid", ":=#{libexec}/conf/druid" + s.gsub! ":=${WHEREAMI}/log", ":=#{var}/druid/log" + s.gsub! ":=var/druid/pids", ":=#{var}/druid/pids" + end + + resource("mysql-connector-java").stage do + (libexec/"extensions/mysql-metadata-storage").install Dir["*"] + end + + bin.install Dir["#{libexec}/bin/*.sh"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env("17") + + Pathname.glob("#{bin}/*.sh") do |file| + mv file, bin/"druid-#{file.basename}" + end + end + + def post_install + %w[ + druid/hadoop-tmp + druid/indexing-logs + druid/log + druid/pids + druid/segments + druid/task + ].each do |dir| + (var/dir).mkpath + end + end + + test do + ENV["DRUID_CONF_DIR"] = libexec/"conf/druid/single-server/nano-quickstart" + ENV["DRUID_LOG_DIR"] = testpath + ENV["DRUID_PID_DIR"] = testpath + ENV["ZOO_LOG_DIR"] = testpath + + system Formula["zookeeper"].opt_bin/"zkServer", "start" + begin + pid = fork { exec bin/"druid-broker.sh", "start" } + sleep 40 + output = shell_output("curl -s http://localhost:8082/status") + assert_match "version", output + ensure + system bin/"druid-broker.sh", "stop" + # force zookeeper stop since it is sometimes still alive after druid-broker.sh finishes + system Formula["zookeeper"].opt_bin/"zkServer", "stop" + Process.wait pid + end + end +end diff --git a/Formula/d/dry.rb b/Formula/d/dry.rb new file mode 100644 index 0000000000000..713eb12e3fb8b --- /dev/null +++ b/Formula/d/dry.rb @@ -0,0 +1,36 @@ +class Dry < Formula + desc "Terminal application to manage Docker and Docker Swarm" + homepage "https://moncho.github.io/dry/" + url "https://github.com/moncho/dry/archive/refs/tags/v0.11.2.tar.gz" + sha256 "8fdb888f3f0c2298c531d5e23acfc0a55c7e4e881ad7365cc0dbecb8ec6c3b89" + license "MIT" + head "https://github.com/moncho/dry.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f1e6af1ea465a5651b74549561892f63d1116e4522354cb27572fe9e31f170c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41faddce9db56bb2fb2d505456024e950efd748a4573d725f4e27fee9c4d2163" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41faddce9db56bb2fb2d505456024e950efd748a4573d725f4e27fee9c4d2163" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41faddce9db56bb2fb2d505456024e950efd748a4573d725f4e27fee9c4d2163" + sha256 cellar: :any_skip_relocation, sonoma: "99c27ff03f7517fdc5cda2e0f4e73d5b3cbbdc211bfdab8ee83cd510bd7aff90" + sha256 cellar: :any_skip_relocation, ventura: "99c27ff03f7517fdc5cda2e0f4e73d5b3cbbdc211bfdab8ee83cd510bd7aff90" + sha256 cellar: :any_skip_relocation, arm64_linux: "90203ead2bd5e5a9211fcd1086b41fb6cfd48396f5016341578703fb1b2ca1e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3d2be362eac6193b8e570dfbabd9a826e92e3f1b58bc05687c46d3389cf81d0" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/moncho/dry/version.VERSION=#{version} + -X github.com/moncho/dry/version.GITCOMMIT=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/dry --version") + assert_match "A tool to interact with a Docker Daemon from the terminal", shell_output("#{bin}/dry --description") + assert_match "Dry could not start", shell_output("#{bin}/dry --profile 2>&1") + end +end diff --git a/Formula/d/dscanner.rb b/Formula/d/dscanner.rb new file mode 100644 index 0000000000000..3046f5a33177a --- /dev/null +++ b/Formula/d/dscanner.rb @@ -0,0 +1,43 @@ +class Dscanner < Formula + desc "Analyses e.g. the style and syntax of D code" + homepage "https://github.com/dlang-community/D-Scanner" + url "https://github.com/dlang-community/D-Scanner.git", + tag: "v0.15.2", + revision: "1201a68f662a300eacae4f908a87d4cd57f2032e" + license "BSL-1.0" + head "https://github.com/dlang-community/D-Scanner.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6d40386c0ff0fe33e4a8d3a5c5a1c19ee21718dd17327adc815d4d60b3e087b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f16a79d7fad72e96d08d3a0aaec16318064de06f115a875fe786f93c2ba872f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bbd1f17d0cb48e71509362ee0705181a2f1b4afff17a52ae4390f04af43c4419" + sha256 cellar: :any_skip_relocation, arm64_ventura: "135c33db9a535d0c6b1c4ad21899663d2cf20d15279421273d7ba81b548babcb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f7df8505b212231cd76276d1e11b9f9bd9794527cefb81ef077ac4d6e870b504" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "11e1b62ebf7c2955101c1d7d0aa933d594709eaada2dc9de080238f617a3cb73" + sha256 cellar: :any_skip_relocation, sonoma: "bada06186eb5dece5bd0e3f23a3b1d5746d0a179f66265d103ee61cee72179d9" + sha256 cellar: :any_skip_relocation, ventura: "5f9e5546dcccee737c540b09ddc4920c59a52f04f99a35d949ed1a42ec9475f0" + sha256 cellar: :any_skip_relocation, monterey: "64a56095f35e980d12527e2b42224755fc15f23f771995c5368db7b0012a694c" + sha256 cellar: :any_skip_relocation, big_sur: "ee3d570973017105d7f4803bd22677ed0b16f2e512545c13fec63c5f22581639" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ad79f5597ccd3323e4de2a6ecfa9bcdd8e6b6b05e48386154d167f6e37bb81f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1216ef19a42105de9617742024eca673eb221d711526bf6dd2204537a70afd34" + end + + depends_on "ldc" => :build + + def install + system "make", "all", "DC=ldc2" + bin.install "bin/dscanner" + end + + test do + (testpath/"test.d").write <<~D + import std.stdio; + void main(string[] args) + { + writeln("Hello World"); + } + D + + assert_match(/test.d:\t28\ntotal:\t28\n/, shell_output("#{bin}/dscanner --tokenCount test.d")) + end +end diff --git a/Formula/d/dsda-doom.rb b/Formula/d/dsda-doom.rb new file mode 100644 index 0000000000000..5f44b54c80778 --- /dev/null +++ b/Formula/d/dsda-doom.rb @@ -0,0 +1,84 @@ +class DsdaDoom < Formula + desc "Fork of prboom+ with a focus on speedrunning" + homepage "https://github.com/kraflab/dsda-doom" + url "https://github.com/kraflab/dsda-doom/archive/refs/tags/v0.29.4.tar.gz" + sha256 "f866db79381862080718668f582b0f358811a016db17680e507abb9250afbea5" + license "GPL-2.0-only" + revision 1 + head "https://github.com/kraflab/dsda-doom.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "5cc7555e4275b5668e1fce806478390614ee9b2807089df3e3b66481af31c9b0" + sha256 arm64_sequoia: "6f82f0faa9f35c0db0b6bcee40f4c9d4c179ec9b28f82fda45fe0a086e49db25" + sha256 arm64_sonoma: "171541adf4020cc98ef206dbaa7ff051e9015e46cdc3f8666281f5dd4424f487" + sha256 sonoma: "aec8309a2bfccdc7e16304978440401dae23a0e2f0f9776af27f7f3e9d3a2a50" + sha256 arm64_linux: "ba6d641574ae6e730884386e56ad258f1d708b43a2e5cf416feca7f1056aadbc" + sha256 x86_64_linux: "b359ea353f4a2585139d7528ba4b822267d68f1b26cbc4209278ab3579527f08" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "fluid-synth" + depends_on "libsndfile" + depends_on "libvorbis" + depends_on "libxmp" + depends_on "libzip" + depends_on "mad" + depends_on "portmidi" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_mixer" + + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + def doomwaddir(root) + root/"share/games/doom" + end + + def install + system "cmake", "-S", "prboom2", "-B", "build", + "-DDOOMWADDIR=#{doomwaddir(HOMEBREW_PREFIX)}", + "-DDSDAPWADDIR=#{libexec}", + "-DSTRICT_FIND=ON", + "-DWITH_FLUIDSYNTH=ON", + "-DWITH_IMAGE=ON", + "-DWITH_MAD=ON", + "-DWITH_PORTMIDI=ON", + "-DWITH_VORBISFILE=ON", + "-DWITH_XMP=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + doomwaddir(HOMEBREW_PREFIX).mkpath + end + + def caveats + <<~EOS + For DSDA-Doom to find your WAD files, place them in: + #{doomwaddir(HOMEBREW_PREFIX)} + EOS + end + + test do + ENV["HOME"] = testpath + ENV["XDG_DATA_HOME"] = testpath + mkdir testpath/"Library/Application Support" + + expected_output = "dsda-doom v#{version.major_minor_patch}" + assert_match expected_output, shell_output("#{bin}/dsda-doom -iwad invalid_wad 2>&1", 255) + end +end diff --git a/Formula/d/dsh.rb b/Formula/d/dsh.rb new file mode 100644 index 0000000000000..acf2d5e779cba --- /dev/null +++ b/Formula/d/dsh.rb @@ -0,0 +1,50 @@ +class Dsh < Formula + desc "Dancer's shell, or distributed shell" + homepage "https://www.netfort.gr.jp/~dancer/software/dsh.html.en" + url "https://www.netfort.gr.jp/~dancer/software/downloads/dsh-0.25.10.tar.gz" + sha256 "520031a5474c25c6b3f9a0840e06a4fea4750734043ab06342522f533fa5b4d0" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.netfort.gr.jp/~dancer/software/downloads/" + regex(/href=.*?dsh[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cbb546751736cb2f93c9f59a4851ad2157a1440e5f5e914c15f5efb8800f2196" + sha256 arm64_sequoia: "d73aea65a96f05c4040e1b38d8238dbaee979d65c886c388b3eb7d7f5b388295" + sha256 arm64_sonoma: "5ffc7bafd29a43adc43ae8eaa2d85d51c2231c62fce48da0103f310c9620387a" + sha256 arm64_ventura: "adc8a26e4eaaa0762e985cf8ad18e3249ae5854807672860f1250e181b88901a" + sha256 arm64_monterey: "a4100e069145478ff23600954f9e30f93ae3f8e2485cf254899a1ee281080b2a" + sha256 arm64_big_sur: "5e691ea82431b5921a5ce57f26e0219c0f5c38decd4249c3fb49beed4f284c4b" + sha256 sonoma: "a271df504a6cf92cb16de16b9200f42190c2aa0dddf70827c11ba0cb935519c4" + sha256 ventura: "54000d6f2a6da19c9a7acefd4b5d59b434deb9adf5ba957e98116032b11a06d8" + sha256 monterey: "2fba1c82686d6522582b09a4d7048c8685a56b10ef355c3a2895f3d7a4ba1fbf" + sha256 big_sur: "8179e3e553da0ac7b40a6b69c0cd47283ce7ab80f399e0f84b57210fa8b6784b" + sha256 catalina: "96b9dda875dac2f33db11bd912a9fd1babac7c2baa76fc0036386442dafaabd2" + sha256 arm64_linux: "07d63285b278ccbbedc618fc2722652b7bde0b671c25aa98cb1e1a34cbe3506e" + sha256 x86_64_linux: "b0489652a4291212811da8fdc746690777acbfaafd90f0dfd050fb4699e57734" + end + + depends_on "libdshconfig" + + on_macos do + depends_on "gnu-sed" => :build + end + + def install + # Use GNU sed on macOS to avoid this build failure: + # sed: RE error: illegal byte sequence + # Reported to the upstream developer by email as a bug tracker does not exist. + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/d/dsocks.rb b/Formula/d/dsocks.rb new file mode 100644 index 0000000000000..40aa49b0a2324 --- /dev/null +++ b/Formula/d/dsocks.rb @@ -0,0 +1,35 @@ +class Dsocks < Formula + desc "SOCKS client wrapper for *BSD/macOS" + homepage "https://monkey.org/~dugsong/dsocks/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/dsocks/dsocks-1.8.tar.gz" + sha256 "2b57fb487633f6d8b002f7fe1755480ae864c5e854e88b619329d9f51c980f1d" + license "BSD-2-Clause" + head "https://github.com/dugsong/dsocks.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "601324838005b2686e67ea99328ad71a5f59250b8c329bbc9a0861d1bbfe0dbe" + sha256 cellar: :any, arm64_sequoia: "9130e47d1bfae90594a9127a2aa63144b9101563558cf1fa704205c874bf23a5" + sha256 cellar: :any, arm64_sonoma: "07f6f3c0e0ca8250eccd463a6cc728bf5ba0400727232ccbfada5137087085b6" + sha256 cellar: :any, arm64_ventura: "5c950e6047a1c85b8107378594822cc7e563a87a7bce9547f3b21617362b8245" + sha256 cellar: :any, arm64_monterey: "932d52fc3ff219d56ce68f2214e06b045d5a38d8b8fe517269a7664d9757568a" + sha256 cellar: :any, arm64_big_sur: "3df61628945a370c1d969c68a53c42bfb095b506ee6a9eae81711ef20c215238" + sha256 cellar: :any, sonoma: "74cb6a7094f9ab35ddce847203400b4093dc7a0251ce2c0a519f106eaa1a500c" + sha256 cellar: :any, ventura: "a4d3e2c8193a67fbde79cdba6c28e0d3c603ea8d5a1f1e5a0705af588fa6f256" + sha256 cellar: :any, monterey: "bb719116a3f8703f022416836e22808dd5ed1b7974d5a36e853764324d663d0e" + sha256 cellar: :any, big_sur: "56c7d9bf70295a5c41fc439d16c9c905b4eb40dcc2d6a4d27513efd5cc48979a" + sha256 cellar: :any, catalina: "d675be1f5c6a31c1fbb20dd8c521a638edca6ecfe13a6bb1f8db84b35a01178d" + sha256 cellar: :any_skip_relocation, arm64_linux: "142addcc7f101ad923269f0b046f358c50e856423d0ba9adeab86f1f657af6e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2e5fda6bf8552306949f8571bd51a080870219a6f43f73464a1e92326e6e7ff" + end + + def install + system ENV.cc, "-fPIC", "-shared", "-o", shared_library("libdsocks"), "dsocks.c", + "atomicio.c", "-lresolv" + inreplace "dsocks.sh", "/usr/local", HOMEBREW_PREFIX + + lib.install shared_library("libdsocks") + bin.install "dsocks.sh" + end +end diff --git a/Formula/d/dspdfviewer.rb b/Formula/d/dspdfviewer.rb new file mode 100644 index 0000000000000..0435ef7f5071d --- /dev/null +++ b/Formula/d/dspdfviewer.rb @@ -0,0 +1,72 @@ +class Dspdfviewer < Formula + desc "Dual-Screen PDF Viewer for latex-beamer" + homepage "https://dspdfviewer.danny-edel.de/" + url "https://github.com/dannyedel/dspdfviewer/archive/refs/tags/v1.15.1.tar.gz" + sha256 "c5b6f8c93d732e65a27810286d49a4b1c6f777d725e26a207b14f6b792307b03" + license "GPL-2.0-or-later" + revision 25 + head "https://github.com/dannyedel/dspdfviewer.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b1abe6e8ef66106efcf70efa9fee70371adfad7a3d35ac39d2a0f86e34e827a2" + sha256 cellar: :any, arm64_sequoia: "e8b8666c1dd37cbedb7baef9520a0f780f4414948c77dfffc155e2a3d4f1d007" + sha256 cellar: :any, arm64_sonoma: "1368c4d2b3c8f30845218d18990407f50447c80ad4d5d12468914649056cdb37" + sha256 cellar: :any, arm64_ventura: "81fa4722ff6720d27cdf0e957db4ac26ace3098ecf9f930c9a62967e8b4cf8fc" + sha256 cellar: :any, sonoma: "45c98311e0f15c0e2a49aa93dd4d8d1099af2b003d973f9d7990e63fe8506f5e" + sha256 cellar: :any, ventura: "3ba36d9baaab63c71303b97c63aaf80de5a26771c1054d660d604f9ebdea7c4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f04a37539e5a626f8304d80a0ef7031b677f3bd779816152a5b9d15c1257053c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca5f6fc6b6b9ddbaa85c87107317aba3bf14fd5a9c0824460efeb612e34be2ae" + end + + # Last release on 2016-09-13, last commit on 2023-04-27. + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "cmake" => :build + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => :build + + depends_on "boost" + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "glib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openjpeg" + depends_on "poppler-qt5" + depends_on "qt@5" + + on_macos do + depends_on "gettext" + end + + def install + # Allow setting CMAKE_CXX_STANDARD in args + inreplace "cmake/compiler_clang.cmake", 'add_definitions("-std=c++11")', "" + inreplace "cmake/compiler_gnu_gcc.cmake", "add_definitions(-std=c++11)", "" + inreplace "cmake/compiler_unknown.cmake", "add_definitions(-std=c++11)", "" + + args = %w[ + -DRunDualScreenTests=OFF + -DUsePrerenderedPDF=ON + -DUseQtFive=ON + -DCMAKE_CXX_STANDARD=14 + -DCMAKE_CXX_FLAGS=-Wno-deprecated-declaration + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? + + system bin/"dspdfviewer", "--help" + end +end diff --git a/Formula/d/dsq.rb b/Formula/d/dsq.rb new file mode 100644 index 0000000000000..ad97aa4fe23f3 --- /dev/null +++ b/Formula/d/dsq.rb @@ -0,0 +1,38 @@ +class Dsq < Formula + desc "CLI tool for running SQL queries against JSON, CSV, Excel, Parquet, and more" + homepage "https://github.com/multiprocessio/dsq" + url "https://github.com/multiprocessio/dsq/archive/refs/tags/v0.23.0.tar.gz" + sha256 "02c923f9089399bf66809bedcb3fec27022f11829e0ed2ac9c7ff87f72e85d8d" + license "Apache-2.0" + head "https://github.com/multiprocessio/dsq.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fa7e3bd34ceaec3f64e14bebd8f9e69427d5641f06c0b68e2c6ee092e72658c1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0d6ada6a0a2844f2d0a007d2772b07f7409ca98db78299f4b27de2f6a19a44d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8352d31efe2ed49a6d2e0ddec2bad500e468deb5a9fc883d16d5103d2607569f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eaf172ab4d1aecede0ecfd67bc1faeeb7925d3e7494889ccb91f3b1aa0127cc3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "13453e55035ec7f611bf1497d34c7e0eefae9e74a85bc2cd97b88ac158e93ac3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "63fe0d51ed81cbfe1b078d92c30ab1c643107ab77239941b1fcda4fee473167e" + sha256 cellar: :any_skip_relocation, sonoma: "8b1b842984c0eab5b0fb999556be8789a058b0274a4033c988fe83b414e7b67a" + sha256 cellar: :any_skip_relocation, ventura: "cb66853afae665e55d8fe3fac0c9cfcfcf32136390928a62a1c6f4138b226145" + sha256 cellar: :any_skip_relocation, monterey: "1378c8a63d25c81803072c3ae5092e9abb3edd3ac5dd56f51409671f1ff3b8b9" + sha256 cellar: :any_skip_relocation, big_sur: "f18c7a77e60d4c6ffebab006f5eacb751c8a0ffa729f506b153e837c03f59934" + sha256 cellar: :any_skip_relocation, catalina: "4733972637d9dd70139520cf2dfd0b243fcd3a8bd62b455efc144dd8bcd1c895" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5627ad8b74b97db053faec48c4bfb41f483aad98a70265efcf0b3fcda3b4b5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "328ba290cbe117afa004b3ac9c9ea32fad38b062150ba47de467ba409ebd0069" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + + pkgshare.install "testdata/userdata.json" + end + + test do + query = "\"SELECT count(*) as c FROM {} WHERE State = 'Maryland'\"" + output = shell_output("#{bin}/dsq #{pkgshare}/userdata.json #{query}") + assert_match "[{\"c\":19}]", output + end +end diff --git a/Formula/d/dssim.rb b/Formula/d/dssim.rb new file mode 100644 index 0000000000000..b31ab49b61753 --- /dev/null +++ b/Formula/d/dssim.rb @@ -0,0 +1,29 @@ +class Dssim < Formula + desc "RGBA Structural Similarity Rust implementation" + homepage "https://github.com/kornelski/dssim" + url "https://github.com/kornelski/dssim/archive/refs/tags/3.4.0.tar.gz" + sha256 "5267e79f4604558d9f24ce02aa20597396a9b052d0ad1b2f8000d4d6bd162126" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9eba62a55c801ee782f082e8837e24d7cc7d5753adcb866a7c5bdafde8d96ae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0acb3332e2cc122f7716f390fdda5942ce072fc76825551d37eb62d401d47d5c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6927b9ceeeca235d2ca6c0901aa40f3557ec57b82cb15290e13f5b48860c532c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9efc6c88f8238f85dc0ffa726d7088eb5be0f4a7e0410aa3ba3c39a6d5258f60" + sha256 cellar: :any_skip_relocation, sonoma: "a3585108c4c20d7e0af5c07ebb6f3455e4ef29638077a712ddff4cf8f7017e39" + sha256 cellar: :any_skip_relocation, ventura: "c7a2d47f9818c50be6379f92773d0677bc4cec873be83b56060f04f159069e19" + sha256 cellar: :any_skip_relocation, arm64_linux: "a729aa84f38425e25c9e5640c1c18d2980f132d9a52becfede48f9c3003b2359" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cf26940ab54503cb8be6c091610aa90b2e12cd46b05c9a5b8a7a15298ecb190" + end + + depends_on "nasm" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"dssim", test_fixtures("test.png"), test_fixtures("test.png") + end +end diff --git a/Formula/d/dstack.rb b/Formula/d/dstack.rb new file mode 100644 index 0000000000000..e77871702c2ef --- /dev/null +++ b/Formula/d/dstack.rb @@ -0,0 +1,671 @@ +class Dstack < Formula + include Language::Python::Virtualenv + + desc "ML workflow orchestration system designed for reproducibility and collaboration" + homepage "https://dstack.ai/" + url "https://files.pythonhosted.org/packages/d9/7a/eb55f6a1110a8783fd28d7f20e7452593f14bcbdc1e5275e8e649d7cd4f9/dstack-0.19.35.tar.gz" + sha256 "c80a8ea5759f63eadcfea0c5697ab4179a18e107661b0c4b9264873c4fd28de1" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "9e2236912a641ae6c953e1dedf8a2b4a594a343e448356ca535f8d436f250cb3" + sha256 cellar: :any, arm64_sequoia: "be4bf52f88317ab81f97c4dde15dffa828e220f622f49f20c23a82f90154bfae" + sha256 cellar: :any, arm64_sonoma: "9ac7d7c59c323bbf73d19dc9eb6c781514f4a1f57551f4a6b89ab43b7bb7b4a3" + sha256 cellar: :any, sonoma: "5ffe4b5bafb137a54d6dfecd5007aa1d0c085f53621b5bd8ed9d14064c1d0c2e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5b2dee2c95223eb27c9aa058601a90dd4dbe329efb58592efcd660e36cae93c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7d3529d0d8162fb89241fa2db501306c1163dc5b9ffb2746353b47227b57498" + end + + # `pkgconf` and `rust` are for bcrypt. + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "python@3.13" # Pydantic v1 is incompatible with Python 3.14, upstream issue, https://github.com/dstackai/dstack/issues/1844 + depends_on "rpds-py" => :no_linkage + + pypi_packages package_name: "dstack[aws,azure,gcp,lambda]", + exclude_packages: ["certifi", "cryptography", "rpds-py"] + + resource "aiocache" do + url "https://files.pythonhosted.org/packages/7a/64/b945b8025a9d1e6e2138845f4022165d3b337f55f50984fbc6a4c0a1e355/aiocache-0.12.3.tar.gz" + sha256 "f528b27bf4d436b497a1d0d1a8f59a542c153ab1e37c3621713cb376d44c4713" + end + + resource "aiorwlock" do + url "https://files.pythonhosted.org/packages/c5/bf/d1ddcd676be027a963b3b01fdf9915daf4590b4dfd03bf1c8c2858aac7e3/aiorwlock-1.5.0.tar.gz" + sha256 "b529da24da659bdedcf68faf216595bde00db228c905197ac554773620e7fd2f" + end + + resource "aiosqlite" do + url "https://files.pythonhosted.org/packages/13/7d/8bca2bf9a247c2c5dfeec1d7a5f40db6518f88d314b8bca9da29670d2671/aiosqlite-0.21.0.tar.gz" + sha256 "131bb8056daa3bc875608c631c678cda73922a2d4ba8aec373b19f18c17e7aa3" + end + + resource "alembic" do + url "https://files.pythonhosted.org/packages/6e/b6/2a81d7724c0c124edc5ec7a167e85858b6fd31b9611c6fb8ecf617b7e2d3/alembic-1.17.1.tar.gz" + sha256 "8a289f6778262df31571d29cca4c7fbacd2f0f582ea0816f4c399b6da7528486" + end + + resource "alembic-postgresql-enum" do + url "https://files.pythonhosted.org/packages/58/04/e465cb5c051fb056b7fadda7667b3e1fb4d32d7f19533e3bbff071c73788/alembic_postgresql_enum-1.8.0.tar.gz" + sha256 "132cd5fdc4a2a0b6498f3d89ea1c7b2a5ddc3281ddd84edae7259ec4c0a215a0" + end + + resource "annotated-doc" do + url "https://files.pythonhosted.org/packages/d7/a6/dc46877b911e40c00d395771ea710d5e77b6de7bacd5fdcd78d70cc5a48f/annotated_doc-0.0.3.tar.gz" + sha256 "e18370014c70187422c33e945053ff4c286f453a984eba84d0dbfa0c935adeda" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "apscheduler" do + url "https://files.pythonhosted.org/packages/4e/00/6d6814ddc19be2df62c8c898c4df6b5b1914f3bd024b780028caa392d186/apscheduler-3.11.0.tar.gz" + sha256 "4c622d250b0955a65d5d0eb91c33e6d43fd879834bf541e0a18661ae60460133" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "asyncpg" do + url "https://files.pythonhosted.org/packages/2f/4c/7c991e080e106d854809030d8584e15b2e996e26f16aee6d757e387bc17d/asyncpg-0.30.0.tar.gz" + sha256 "c551e9928ab6707602f44811817f82ba3c446e018bfe1d3abecc8ba5f3eac851" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "azure-common" do + url "https://files.pythonhosted.org/packages/3e/71/f6f71a276e2e69264a97ad39ef850dca0a04fce67b12570730cb38d0ccac/azure-common-1.1.28.zip" + sha256 "4ac0cd3214e36b6a1b6a442686722a5d8cc449603aa833f3f0f40bda836704a3" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/0a/c4/d4ff3bc3ddf155156460bff340bbe9533f99fac54ddea165f35a8619f162/azure_core-1.36.0.tar.gz" + sha256 "22e5605e6d0bf1d229726af56d9e92bc37b6e726b141a18be0b4d424131741b7" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/06/8d/1a6c41c28a37eab26dc85ab6c86992c700cd3f4a597d9ed174b0e9c69489/azure_identity-1.25.1.tar.gz" + sha256 "87ca8328883de6036443e1c37b40e8dc8fb74898240f61071e09d2e369361456" + end + + resource "azure-mgmt-authorization" do + url "https://files.pythonhosted.org/packages/9e/ab/e79874f166eed24f4456ce4d532b29a926fb4c798c2c609eefd916a3f73d/azure-mgmt-authorization-4.0.0.zip" + sha256 "69b85abc09ae64fc72975bd43431170d8c7eb5d166754b98aac5f3845de57dc4" + end + + resource "azure-mgmt-compute" do + url "https://files.pythonhosted.org/packages/ef/a3/3272a251dfb50d0e7425e193545130eed252a9fa41d55ac4aaf8902006d8/azure_mgmt_compute-37.0.1.tar.gz" + sha256 "a99662ed3d7d704530edb2c5e98402c82782c9baa0c660b3db5c81a6b6a10e7f" + end + + resource "azure-mgmt-core" do + url "https://files.pythonhosted.org/packages/3e/99/fa9e7551313d8c7099c89ebf3b03cd31beb12e1b498d575aa19bb59a5d04/azure_mgmt_core-1.6.0.tar.gz" + sha256 "b26232af857b021e61d813d9f4ae530465255cb10b3dde945ad3743f7a58e79c" + end + + resource "azure-mgmt-msi" do + url "https://files.pythonhosted.org/packages/f8/83/f2e8eeca619905ffc48205664ad10e7cdfc168be522a06d04bea54e41556/azure_mgmt_msi-7.1.0.tar.gz" + sha256 "1a01a089f1f66cb0d4b2886603d5ba415f360eff0be6f685737ecdd59c78225b" + end + + resource "azure-mgmt-network" do + url "https://files.pythonhosted.org/packages/bf/aa/bf464fd70eefa8f13f5e5b45d021416d5c9c8d79eabb96f4a673fe91346d/azure_mgmt_network-27.0.0.tar.gz" + sha256 "5c1c61d8bb13ad40f788a26fd7569c1d9d60eb2e4cb19c2a1b5d9c02ae862316" + end + + resource "azure-mgmt-resource" do + url "https://files.pythonhosted.org/packages/50/4c/b27a3dfbedebbcc8e346a956a803528bd94a19fdf14b1de4bd781b03a6cc/azure_mgmt_resource-24.0.0.tar.gz" + sha256 "cf6b8995fcdd407ac9ff1dd474087129429a1d90dbb1ac77f97c19b96237b265" + end + + resource "azure-mgmt-subscription" do + url "https://files.pythonhosted.org/packages/84/67/14b19a006e13d86f05ee59faf78c39dc443d4fd6967344e9c94f688949c1/azure-mgmt-subscription-3.1.1.zip" + sha256 "4e255b4ce9b924357bb8c5009b3c88a2014d3203b2495e2256fa027bf84e800e" + end + + resource "backports-entry-points-selectable" do + url "https://files.pythonhosted.org/packages/fc/25/dae014b114397a6f60578d7358bf5fcb103f71556e5363a50d7b42e9bc51/backports.entry_points_selectable-1.3.0.tar.gz" + sha256 "17a8b44ae700fba548686dd274ddc91c060371565cd63806c20a1d33911746e6" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b4/69/2612a06d584786500ba7ea068927e95e24719da3b6734bd23c50788f5982/boto3-1.40.62.tar.gz" + sha256 "3dbe7e1e7dc9127a4b1f2020a14f38ffe64fad84df00623e8ab6a5d49a82ea28" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/50/d6/dc11fecf450c60175fd568791e2324e059e81bc4adac85d83f272ab293f5/botocore-1.40.62.tar.gz" + sha256 "1e8e57c131597dc234d67428bda1323e8f0a687ea13ea570253159ab9256fa28" + end + + resource "cached-classproperty" do + url "https://files.pythonhosted.org/packages/ea/63/fbc7b92eb9514c399d24f31b93d036fd5475961ca57d3945a03c25a77e4e/cached_classproperty-1.1.0.tar.gz" + sha256 "f012b314d6a797270ebab9df1b1869596d7bf12ec37d7e60d03976224bfbcefd" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "cursor" do + url "https://files.pythonhosted.org/packages/59/1b/ae231e1f9a8e1f970453f92fcb20a3fce87fa38753915477c26bc1655d86/cursor-1.3.5.tar.gz" + sha256 "6758cae6ac14765ec85d9ce3f14fcb98fff5045f06d8398f1e8da8ce3acd2f20" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "fastapi" do + url "https://files.pythonhosted.org/packages/a0/fb/79e556bc8f9d360e5cc2fa7364a7ad6bda6f1736938b43a2791fa8baee7b/fastapi-0.120.2.tar.gz" + sha256 "4c5ab43e2a90335bbd8326d1b659eac0f3dbcc015e2af573c4f5de406232c4ac" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/61/da/83d7043169ac2c8c7469f0e375610d78ae2160134bf1b80634c482fa079c/google_api_core-2.28.1.tar.gz" + sha256 "2b405df02d68e68ce0fbc138559e6036559e685159d148ae5861013dc201baf8" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/8e/5a/6f9b49d67ea91376305fdb8bbf2877c746d756e45fd8fb7d2e32d6dad19b/google_api_python_client-2.185.0.tar.gz" + sha256 "aa1b338e4bb0f141c2df26743f6b46b11f38705aacd775b61971cbc51da089c3" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/11/75/28881e9d7de9b3d61939bc9624bd8fa594eb787a00567aba87173c790f09/google_auth-2.42.0.tar.gz" + sha256 "9bbbeef3442586effb124d1ca032cfb8fb7acd8754ab79b55facd2b8f3ab2802" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "google-cloud-appengine-logging" do + url "https://files.pythonhosted.org/packages/9a/6e/260266e5fa7283b721bbef012f3223d514e2569446f56786fe0c80aa0fd4/google_cloud_appengine_logging-1.7.0.tar.gz" + sha256 "ea9ce73430cfc99f8957fd7df97733f9a759d4caab65e19d63a7474f012ffd94" + end + + resource "google-cloud-audit-log" do + url "https://files.pythonhosted.org/packages/c7/d2/ad96950410f8a05e921a6da2e1a6ba4aeca674bbb5dda8200c3c7296d7ad/google_cloud_audit_log-0.4.0.tar.gz" + sha256 "8467d4dcca9f3e6160520c24d71592e49e874838f174762272ec10e7950b6feb" + end + + resource "google-cloud-billing" do + url "https://files.pythonhosted.org/packages/9b/ad/a038d28ee925dc22aa20687c3050b962a431893fb50d74e3de8fd48ef4c1/google_cloud_billing-1.17.0.tar.gz" + sha256 "e68a08dcc0f3432eea7b3475c9e243555a628cd6c2423de25a7eb283e3a055d2" + end + + resource "google-cloud-compute" do + url "https://files.pythonhosted.org/packages/92/c0/21fe9a8cadc0f8455b98e8e5ca8a3866b5ad745960023705b4f23d7a2aad/google_cloud_compute-1.40.0.tar.gz" + sha256 "6a5ca519ac82caafc0a8600b1aa724d22fc00255501e1f99ff7a5907db73e011" + end + + resource "google-cloud-core" do + url "https://files.pythonhosted.org/packages/a6/03/ef0bc99d0e0faf4fdbe67ac445e18cdaa74824fd93cd069e7bb6548cb52d/google_cloud_core-2.5.0.tar.gz" + sha256 "7c1b7ef5c92311717bd05301aa1a91ffbc565673d3b0b4163a52d8413a186963" + end + + resource "google-cloud-logging" do + url "https://files.pythonhosted.org/packages/14/9c/d42ecc94f795a6545930e5f846a7ae59ff685ded8bc086648dd2bee31a1a/google_cloud_logging-3.12.1.tar.gz" + sha256 "36efc823985055b203904e83e1c8f9f999b3c64270bcda39d57386ca4effd678" + end + + resource "google-cloud-storage" do + url "https://files.pythonhosted.org/packages/bd/ef/7cefdca67a6c8b3af0ec38612f9e78e5a9f6179dd91352772ae1a9849246/google_cloud_storage-3.4.1.tar.gz" + sha256 "6f041a297e23a4b485fad8c305a7a6e6831855c208bcbe74d00332a909f82268" + end + + resource "google-cloud-tpu" do + url "https://files.pythonhosted.org/packages/c4/0d/680876438e762709edccbc248213c232ba8503c115558fdf967abdbcd5e3/google_cloud_tpu-1.24.0.tar.gz" + sha256 "6bcc6eda9fbf43796746d815b2d3a822f0510614dd75b2428eb93b5d280a5a8a" + end + + resource "google-crc32c" do + url "https://files.pythonhosted.org/packages/19/ae/87802e6d9f9d69adfaedfcfd599266bf386a54d0be058b532d04c794f76d/google_crc32c-1.7.1.tar.gz" + sha256 "2bff2305f98846f3e825dbeec9ee406f89da7962accdb29356e4eadc251bd472" + end + + resource "google-resumable-media" do + url "https://files.pythonhosted.org/packages/58/5a/0efdc02665dca14e0837b62c8a1a93132c264bd02054a15abb2218afe0ae/google_resumable_media-2.7.2.tar.gz" + sha256 "5280aed4629f2b60b847b0d42f9857fd4935c11af266744df33d8074cae92fe0" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "gpuhunt" do + url "https://files.pythonhosted.org/packages/71/66/03ff4a93fb404d3e9da0ba8edfb57b9913c4002b6cdf7bea3709969154c1/gpuhunt-0.1.11.tar.gz" + sha256 "34a5dfff419c669433b9fe1ead5421f279f9a09282f50f9d13342c640c963f41" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/03/b8/704d753a5a45507a7aab61f18db9509302ed3d0a27ac7e0359ec2905b1a6/greenlet-3.2.4.tar.gz" + sha256 "0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d" + end + + resource "grpc-google-iam-v1" do + url "https://files.pythonhosted.org/packages/76/1e/1011451679a983f2f5c6771a1682542ecb027776762ad031fd0d7129164b/grpc_google_iam_v1-0.14.3.tar.gz" + sha256 "879ac4ef33136c5491a6300e27575a9ec760f6cdf9a2518798c1b8977a5dc389" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz" + sha256 "7be78388d6da1a25c0d5ec506523db58b18be22d9c37d8d3a32c08be4987bd73" + end + + resource "grpcio-status" do + url "https://files.pythonhosted.org/packages/3f/46/e9f19d5be65e8423f886813a2a9d0056ba94757b0c5007aa59aed1a961fa/grpcio_status-1.76.0.tar.gz" + sha256 "25fcbfec74c15d1a1cb5da3fab8ee9672852dc16a5a9eeb5baf7d7a9952943cd" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httptools" do + url "https://files.pythonhosted.org/packages/b5/46/120a669232c7bdedb9d52d4aeae7e6c7dfe151e99dc70802e2fc7a5e1993/httptools-0.7.1.tar.gz" + sha256 "abd72556974f8e7c74a259655924a717a2365b236c882c3f6f8a45fe94703ac9" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "ignore-python" do + url "https://files.pythonhosted.org/packages/fb/d1/fd458543147240d9c154de5205b87911b37cefae5841d9034459acec7db5/ignore_python-0.3.0.tar.gz" + sha256 "7c3d255c51b36310daafc78b16a61b5e9fffbb5d1e3b5675b36ddc4ff8630797" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/cf/0e/c857c46d653e104019a84f22d4494f2119b4fe9f896c92b4b864b3b045cc/msal-1.34.0.tar.gz" + sha256 "76ba83b716ea5a6d75b0279c0ac353a0e05b820ca1f6682c0eb7f45190c43c2f" + end + + resource "msal-extensions" do + url "https://files.pythonhosted.org/packages/01/99/5d239b6156eddf761a636bded1118414d161bd6b7b37a9335549ed159396/msal_extensions-1.3.1.tar.gz" + sha256 "c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4" + end + + resource "msrest" do + url "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip" + sha256 "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/08/d8/0f354c375628e048bd0570645b310797299754730079853095bf000fba69/opentelemetry_api-1.38.0.tar.gz" + sha256 "f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/c6/fe/ed708782d6709cc60eb4c2d8a361a440661f74134675c72990f2c48c785f/orjson-3.11.4.tar.gz" + sha256 "39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "prometheus-client" do + url "https://files.pythonhosted.org/packages/23/53/3edb5d68ecf6b38fcbcc1ad28391117d2a322d9a1a3eff04bfdb184d8c3b/prometheus_client-0.23.1.tar.gz" + sha256 "6ae8f9081eaaaf153a2e959d2e6c4f4fb57b12ef76c8c7980202f1e57b48b2ce" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/ae/8d/7b346ed940c3e0f9eee7db9be37915a6dac0d9535d736e2ca47a81a066f3/pydantic-1.10.24.tar.gz" + sha256 "7e6d1af1bd3d2312079f28c9baf2aafb4a452a06b50717526e5ac562e37baa53" + end + + resource "pydantic-duality" do + url "https://files.pythonhosted.org/packages/9e/64/da9e9525f68803d75dca8b693097c666e53f2268cddaa51d6ec2335fe331/pydantic_duality-1.2.4.tar.gz" + sha256 "34bdbf102c004f009619c2b6682143fa6f14c04bf947f0ba72d75b04e84a65c7" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-dxf" do + url "https://files.pythonhosted.org/packages/cc/f6/aac11aa8d64d39706838d57ace0b5ba5c31af157019e96c1bf2a8930563d/python_dxf-12.1.0.tar.gz" + sha256 "59ff22c0ab92a29fb3085f65ea70c0e8c7ff9fdfd74db0109efd5dfdc404d96c" + end + + resource "python-json-logger" do + url "https://files.pythonhosted.org/packages/29/bf/eca6a3d43db1dae7070f70e160ab20b807627ba953663ba07928cdd3dc58/python_json_logger-4.0.0.tar.gz" + sha256 "f58e68eb46e1faed27e0f574a55a0455eecd7b8a5b88b85a784519ba3cff047f" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/71/a6/34460d81e5534f6d2fc8e8d91ff99a5835fdca53578eac89e4f37b3a7c6d/rich_argparse-1.7.1.tar.gz" + sha256 "d7a493cde94043e41ea68fb43a74405fa178de981bf7b800f7a3bd02ac5c27be" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/b3/18/09875b4323b03ca9025bae7e6539797b27e4fc032998a466b4b9c3d24653/sentry_sdk-2.43.0.tar.gz" + sha256 "52ed6e251c5d2c084224d73efee56b007ef5c2d408a4a071270e82131d336e20" + end + + resource "simple-term-menu" do + url "https://files.pythonhosted.org/packages/d8/80/f0f10b4045628645a841d3d98b584a8699005ee03a211fc7c45f6c6f0e99/simple_term_menu-1.6.6.tar.gz" + sha256 "9813d36f5749d62d200a5599b1ec88469c71378312adc084c00c00bfbb383893" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sqlalchemy" do + url "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz" + sha256 "0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22" + end + + resource "sqlalchemy-utils" do + url "https://files.pythonhosted.org/packages/63/80/4e15fdcfc25a2226122bf316f0ebac86d840ab3fb38b38ca4cabc395865e/sqlalchemy_utils-0.42.0.tar.gz" + sha256 "6d1ecd3eed8b941f0faf8a531f5d5cee7cffa2598fcf8163de8c31c7a417a5e0" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "uvloop" do + url "https://files.pythonhosted.org/packages/06/f0/18d39dbd1971d6d62c4629cc7fa67f74821b0dc1f5a77af43719de7936a7/uvloop-0.22.1.tar.gz" + sha256 "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz" + sha256 "a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "www-authenticate" do + url "https://files.pythonhosted.org/packages/a7/2d/5567291a8274ef5d9b6495a1ec341394ab68933e2396936755b157f87b43/www-authenticate-0.9.2.tar.gz" + sha256 "cf75fc2ea5effb0f9342d7de7619b736f2a7d4b223331a53e296863a286e9dcb" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/dstack --version") + expected = "Git repo not found:" + assert_match expected, shell_output("#{bin}/dstack init 2>&1", 1) + end +end diff --git a/Formula/d/dstask.rb b/Formula/d/dstask.rb new file mode 100644 index 0000000000000..218484045837a --- /dev/null +++ b/Formula/d/dstask.rb @@ -0,0 +1,42 @@ +class Dstask < Formula + desc "Git-powered personal task tracker" + homepage "https://github.com/naggie/dstask" + url "https://github.com/naggie/dstask/archive/refs/tags/1.0.tar.gz" + sha256 "faec7a671331435ddf5be644404a62eef3b6fc0f895811b1f7c6b840e0bec234" + license "MIT" + head "https://github.com/naggie/dstask.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d379782fdfe58917c3d3310212d98e545f755b8b683ba8e95b351bcabd8af2ae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d379782fdfe58917c3d3310212d98e545f755b8b683ba8e95b351bcabd8af2ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d379782fdfe58917c3d3310212d98e545f755b8b683ba8e95b351bcabd8af2ae" + sha256 cellar: :any_skip_relocation, sonoma: "94159ed9d40ad3a46383decca4b4c8bba53e403cb66b714a01e852e69d722ffe" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1b50f896d950aa96139cb7a0daf9bf8d84257fb49e40e457d5727910a7eefe3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e79b38c96912b93fb54858df0b845cd5c6fbbda269e7da398218492081eb1b6f" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:), "./cmd/dstask/main.go" + system "go", "build", *std_go_args(ldflags:, output: bin/"dstask-import"), "./cmd/dstask-import/main.go" + + bash_completion.install "completions/bash.sh" => "dstask" + fish_completion.install "completions/completions.fish" => "dstask.fish" + zsh_completion.install "completions/zsh.sh" => "_dstask" + end + + test do + mkdir ".dstask" do + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "BrewTestBot@test.com" + end + + system bin/"dstask", "add", "Brew the brew" + system bin/"dstask", "start", "1" + assert_match "Brew the brew", shell_output("#{bin}/dstask show-active") + system bin/"dstask", "done", "1" + end +end diff --git a/Formula/d/dstp.rb b/Formula/d/dstp.rb new file mode 100644 index 0000000000000..c1e0797d3f8d6 --- /dev/null +++ b/Formula/d/dstp.rb @@ -0,0 +1,29 @@ +class Dstp < Formula + desc "Run common networking tests against your site" + homepage "https://github.com/ycd/dstp" + url "https://github.com/ycd/dstp/archive/refs/tags/v0.4.23.tar.gz" + sha256 "1ab45012204cd68129fd05723dd768ea4a9ce08e2f6c2fa6468c2c88ab65c877" + license "MIT" + head "https://github.com/ycd/dstp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d846454cb98d9ca168c8a2975a2d551a00b444afa2a3a0599d4bc956e24c9b35" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d846454cb98d9ca168c8a2975a2d551a00b444afa2a3a0599d4bc956e24c9b35" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d846454cb98d9ca168c8a2975a2d551a00b444afa2a3a0599d4bc956e24c9b35" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d846454cb98d9ca168c8a2975a2d551a00b444afa2a3a0599d4bc956e24c9b35" + sha256 cellar: :any_skip_relocation, sonoma: "cb67648c382f56115631967b9d5c7fc76c9209299e524ea22f7d32c48e44f34c" + sha256 cellar: :any_skip_relocation, ventura: "cb67648c382f56115631967b9d5c7fc76c9209299e524ea22f7d32c48e44f34c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f66f81e0d40aacd8eee14bbc3d74ce73cbebe5da3f36958e5c2d1f90d1d23a97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7bbbb70466510b3a9d41a5a6479b9a667d7d55deaf87e739a0957201995ded19" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/dstp" + end + + test do + assert_match "HTTPS: got 200 OK", shell_output("#{bin}/dstp example.com --dns 1.1.1.1") + end +end diff --git a/Formula/d/dsvpn.rb b/Formula/d/dsvpn.rb new file mode 100644 index 0000000000000..814c3588bb070 --- /dev/null +++ b/Formula/d/dsvpn.rb @@ -0,0 +1,48 @@ +class Dsvpn < Formula + desc "Dead Simple VPN" + homepage "https://github.com/jedisct1/dsvpn" + url "https://github.com/jedisct1/dsvpn/archive/refs/tags/0.1.4.tar.gz" + sha256 "b98604e1ca2ffa7a909bf07ca7cf0597e3baa73c116fbd257f93a4249ac9c0c5" + license "MIT" + head "https://github.com/jedisct1/dsvpn.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "88af31d52cccd25f31de08063e945c74ff83ebdc13e9bfc5cdd1c25a760d83d2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2798e3025b267d17e1aabee53f9340abd9f38327278913165a305a4749d87dae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0c26df1e9f03e517ac0db4f266b348cdd95104a250c4da9f7acbb6c73341d3c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "889d8f51fbe721906b84001adfcced14178739901beead09b88977a8b194c97f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "533ca096976136d7eeb0923c0164a0b3e8305d344036c1ad095a586f8768f5a2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5f0269b49b371b7330a7397c73ca1a8791da2e1215242eacd3e612f6705dd9c4" + sha256 cellar: :any_skip_relocation, sonoma: "acee3cf137a18f22b9063c71426ee83f91482e37077a5c343ff465c142537619" + sha256 cellar: :any_skip_relocation, ventura: "bf4216d9f7d920dd9c3addf7c946ee730f74e2fdb361ea76e835855106a97ba1" + sha256 cellar: :any_skip_relocation, monterey: "aaedaf19c0e6217233075e082167848fb03b2b2e3d3f27e690ac8f82064647f2" + sha256 cellar: :any_skip_relocation, big_sur: "9113686d8da5885ab67bae686914b0d27cc5eb2588a49b83f7c3fe66c89c039b" + sha256 cellar: :any_skip_relocation, catalina: "a08464eca0167991c580594ecd9f1893a7be6d1cb522ceb385ff1883dca507c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "245403f9b3b33e4b63fc2281f1ffc16cedc3d48e825691369d755a22b61a24ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6cc8aa7ec1d462fb028d5858de3863d2d131175ddfa102cfd44c9c0614d003f" + end + + def install + sbin.mkpath + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + dsvpn requires root privileges so you will need to run `sudo #{HOMEBREW_PREFIX}/sbin/dsvpn`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + expected = if OS.mac? + "tun device creation: Operation not permitted" + else + "Unable to automatically determine the gateway IP" + end + assert_match expected, shell_output("#{sbin}/dsvpn client /dev/zero 127.0.0.1 0 2>&1", 1) + end +end diff --git a/Formula/d/dtach.rb b/Formula/d/dtach.rb new file mode 100644 index 0000000000000..38b11316741cf --- /dev/null +++ b/Formula/d/dtach.rb @@ -0,0 +1,41 @@ +class Dtach < Formula + desc "Emulates the detach feature of screen" + homepage "https://dtach.sourceforge.net/" + url "https://downloads.sourceforge.net/project/dtach/dtach/0.9/dtach-0.9.tar.gz" + sha256 "32e9fd6923c553c443fab4ec9c1f95d83fa47b771e6e1dafb018c567291492f3" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3296ea100c480737f279e984c3e0cf25d0d5844aac527c09cf9cc1ff3bb4ada" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df21c7a193afc665bc0d8e35b51990fa1c86a7d586acefc9248641e2fc93ac07" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "936dc52943de4d68d3acba73b5537df04e30ee6ed0e75148d7ed4270469c8675" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f1ef3983dedfabc3580bf8348e913f58a25f858f3a5937664dd70014f0fa1a0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e25159bbd5055fc22962d923496e78c3e49ff919243593e16960734002c38dcc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e90da47e413ace287b5144813af99ee9f2bb8cac8c435189557db29aa597c681" + sha256 cellar: :any_skip_relocation, sonoma: "c780cda9b47c04079b652c9de889c797125979197880a5551b5ac0127a165b16" + sha256 cellar: :any_skip_relocation, ventura: "8197e8606d40305873646270d38aae3973190340c46d0e47c66a38cc91bc1824" + sha256 cellar: :any_skip_relocation, monterey: "2a7c1c3b1d3ed2f0461ff94f0ec8574b4b2baf68e83048cf1f7b26c31ca76826" + sha256 cellar: :any_skip_relocation, big_sur: "2037a41545a48ffd293c55deb33a675a6d304df1f25c46e6f9b85969e0968d78" + sha256 cellar: :any_skip_relocation, catalina: "67d1aed450f459a8883148d7ce9bf89cd98025232ae6ec061381297e54276e8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "20f84e730ed5ca882c83d0fbc52a6a75d4c42a5b31c35505d17b58a8d8b2675c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7e64d6a2ccdcb1bf8c9de85f9542d228b2f12ca97807045c24d42d3fb2cf047" + end + + def install + # Includes instead of "config.h", so "." needs to be in the include path. + ENV.append "CFLAGS", "-I." + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + + system "make" + bin.install "dtach" + man1.install Utils::Gzip.compress("dtach.1") + end + + test do + system bin/"dtach", "--help" + end +end diff --git a/Formula/d/dtc.rb b/Formula/d/dtc.rb new file mode 100644 index 0000000000000..d6fb06a692366 --- /dev/null +++ b/Formula/d/dtc.rb @@ -0,0 +1,44 @@ +class Dtc < Formula + desc "Device tree compiler" + homepage "https://git.kernel.org/pub/scm/utils/dtc/dtc.git" + url "https://mirrors.edge.kernel.org/pub/software/utils/dtc/dtc-1.7.2.tar.xz" + sha256 "92d8ca769805ae1f176204230438fe52808f4e1c7944053c9eec0e649b237539" + license any_of: ["GPL-2.0-or-later", "BSD-2-Clause"] + head "https://git.kernel.org/pub/scm/utils/dtc/dtc.git", branch: "master" + + livecheck do + url "https://mirrors.edge.kernel.org/pub/software/utils/dtc/" + regex(/href=.*?dtc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e651c82ed69b6efd392728727fe0a9d4831cbcd1decca9b6a17bf307e44d81cb" + sha256 cellar: :any, arm64_sequoia: "4b99efbc9d6522d1237038a22fc3417fa282d979e94db58a783a4b0ef934a9bb" + sha256 cellar: :any, arm64_sonoma: "20ee0f26c62898f07838b78489cad21b358d329f1dd3fa57bd63916e479db084" + sha256 cellar: :any, arm64_ventura: "0bc0e5c7f5681e49a92833da2abecfbd10d11d7c938cab0c668df1aedec703da" + sha256 cellar: :any, sonoma: "e4eb4991109e9112f5edb62b92cec046239268ecedf2de275e21c9be7302016b" + sha256 cellar: :any, ventura: "e3702ff36779cb65af9bf30d5ae6be3bf2a03320567edbf0821251abc66c4113" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca5cc69857d826ebc8b792e60d7fbc695785443f5a03bff22cd6a80d96953e52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a73d1c865cba2244acd9bb059eae7fa4377506b64438ce12608f8f87d01e6640" + end + + depends_on "pkgconf" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + inreplace "libfdt/Makefile.libfdt", "libfdt.$(SHAREDLIB_EXT).1", "libfdt.1.$(SHAREDLIB_EXT)" if OS.mac? + system "make", "NO_PYTHON=1" + system "make", "NO_PYTHON=1", "DESTDIR=#{prefix}", "PREFIX=", "install" + end + + test do + (testpath/"test.dts").write <<~EOS + /dts-v1/; + / { + }; + EOS + system bin/"dtc", "test.dts" + end +end diff --git a/Formula/d/dtm.rb b/Formula/d/dtm.rb new file mode 100644 index 0000000000000..3409c7dbeea89 --- /dev/null +++ b/Formula/d/dtm.rb @@ -0,0 +1,52 @@ +class Dtm < Formula + desc "Cross-language distributed transaction manager" + homepage "https://en.dtm.pub/" + url "https://github.com/dtm-labs/dtm/archive/refs/tags/v1.19.0.tar.gz" + sha256 "11340c32e810dfd463953bca0a5f5a2c41a88c35782efc2ab70cfa78733fa823" + license "BSD-3-Clause" + head "https://github.com/dtm-labs/dtm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9156f67d4bcb54b15e9ee5b1046c4fd71fed0f1e2770c326f158a519384b7bf7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "818718052e97df9ffcfed8c29a8f7bbce0e5302c6639c208c3c080d188ce75c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "818718052e97df9ffcfed8c29a8f7bbce0e5302c6639c208c3c080d188ce75c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "818718052e97df9ffcfed8c29a8f7bbce0e5302c6639c208c3c080d188ce75c6" + sha256 cellar: :any_skip_relocation, sonoma: "cb8953792e5ca9d7edd4f56547f3f333ff6bb34de276f60781edd57acedc1288" + sha256 cellar: :any_skip_relocation, ventura: "cb8953792e5ca9d7edd4f56547f3f333ff6bb34de276f60781edd57acedc1288" + sha256 cellar: :any_skip_relocation, arm64_linux: "31c5da9b3ef4d90e2612b6b0141f4b105a4e641d595bde14df75647726498cd9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2def5327f55d8f789fa34bbe6ad73606bbe2807d42a59026f04130456fac0cb" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=v#{version}") + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"dtm-qs"), "qs/main.go" + end + + test do + assert_match "dtm version: v#{version}", shell_output("#{bin}/dtm -v") + + http_port = free_port + grpc_port = free_port + + dtm_pid = fork do + ENV["HTTP_PORT"] = http_port.to_s + ENV["GRPC_PORT"] = grpc_port.to_s + exec bin/"dtm" + end + # sleep to let dtm get its wits about it + sleep 5 + metrics_output = shell_output("curl -s localhost:#{http_port}/api/metrics") + assert_match "# HELP dtm_server_info The information of this dtm server.", metrics_output + + all_json = JSON.parse(shell_output("curl -s localhost:#{http_port}/api/dtmsvr/all")) + assert_equal 0, all_json["next_position"].length + assert all_json["next_position"].instance_of? String + assert_equal 0, all_json["transactions"].length + assert all_json["transactions"].instance_of? Array + ensure + # clean up the dtm process before we leave + Process.kill("HUP", dtm_pid) + end +end diff --git a/Formula/d/dtools.rb b/Formula/d/dtools.rb new file mode 100644 index 0000000000000..b8061e02739d8 --- /dev/null +++ b/Formula/d/dtools.rb @@ -0,0 +1,57 @@ +class Dtools < Formula + desc "D programming language tools" + homepage "https://dlang.org/" + url "https://github.com/dlang/tools/archive/refs/tags/v2.111.0.tar.gz" + sha256 "4c391349e929f73b7ffe97da7b98fbbdb04effda3e6389d9d46dc9d9938ece3b" + license "BSL-1.0" + revision 1 + head "https://github.com/dlang/tools.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "274178ae030c4b9871cbdd75b0a4325d8d7017a60d0fc443c1c94c8049eec142" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0f6645e51b5da22628b3b64b43acafc4ac335b98afbe8cbee3d10ef88fdaec9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e3f2aed17e75ef0632e0ec36b9dfb3db9566af400d3e2ec027aa89bf1699234" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ffb209a7cc7a4e05c90771030c6c91941be35dd9884fe58f9dd14ef82c5fce1" + sha256 cellar: :any_skip_relocation, sonoma: "6b01da4e8af6781c0a9333fc0e27fbcd2b758e0e9a99fc49a6a3123f0a1725d2" + sha256 cellar: :any_skip_relocation, ventura: "7fbe7a851ed67642ac50e8a196ac216278eb7528f4c150360c9d4a219be3d30f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d8fd7789bb36d3a8577f925224336d7bc6cd2b891b9065a81d91b6e97b7b73b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6eb2ded59c5d481a4ef6d450a65ac15bdf527b9d56ab89bc293fbd68f9c6a180" + end + + depends_on "dub" => :build + depends_on "ldc" => [:build, :test] + + link_overwrite "bin/ddemangle" + link_overwrite "bin/dustmite" + link_overwrite "bin/rdmd" + + def install + # We only need the "public" tools, as listed at + # https://github.com/dlang/tools/blob/master/README.md + # + # Skip building dman as it requires getting and building the DMD + # and dlang.org source trees. + tools = %w[ddemangle rdmd dustmite] + system "dub", "add-local", buildpath + + tools.each do |tool| + system "dub", "build", "--build=release", ":#{tool}" + bin.install "dtools_#{tool}" => tool + end + + man1.install "man/man1/rdmd.1" + end + + test do + (testpath/"hello.d").write <<~D + import std.stdio; + void main() + { + writeln("Hello world!"); + } + D + assert_equal "Hello world!", shell_output("#{bin}/rdmd #{testpath}/hello.d").chomp + end +end diff --git a/Formula/d/dtrx.rb b/Formula/d/dtrx.rb new file mode 100644 index 0000000000000..2eeb25f07a8fe --- /dev/null +++ b/Formula/d/dtrx.rb @@ -0,0 +1,49 @@ +class Dtrx < Formula + include Language::Python::Virtualenv + + desc "Intelligent archive extraction" + homepage "https://pypi.org/project/dtrx/" + url "https://files.pythonhosted.org/packages/0e/41/53459c8452da0f357d55943704ff960dab35c33a068b057a40512faa3e03/dtrx-8.7.0.tar.gz" + sha256 "d7c58048cd4a0e05337f0e0e01b05ad9ebc2b450a0f6706afc4b69abea81096f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5d20b9765b801e3900f290def6de47f5e32ac38bf43723848e4b03bc6b00a742" + end + + # Include a few common decompression handlers in addition to the python dep + depends_on "p7zip" + depends_on "python@3.14" + depends_on "xz" + + uses_from_macos "zip" => :test + uses_from_macos "bzip2" + uses_from_macos "unzip" + + def install + virtualenv_install_with_resources + end + + # Test a simple unzip. Sample taken from unzip formula + test do + (testpath/"test1").write "Hello!" + (testpath/"test2").write "Bonjour!" + (testpath/"test3").write "Hej!" + + system "zip", "test.zip", "test1", "test2", "test3" + %w[test1 test2 test3].each do |f| + rm f + refute_path_exists testpath/f, "Text files should have been removed!" + end + + system bin/"dtrx", "--flat", "test.zip" + + %w[test1 test2 test3].each do |f| + assert_path_exists testpath/f, "Failure unzipping test.zip!" + end + + assert_equal "Hello!", (testpath/"test1").read + assert_equal "Bonjour!", (testpath/"test2").read + assert_equal "Hej!", (testpath/"test3").read + end +end diff --git a/Formula/d/dtsroll.rb b/Formula/d/dtsroll.rb new file mode 100644 index 0000000000000..c805d61f87770 --- /dev/null +++ b/Formula/d/dtsroll.rb @@ -0,0 +1,33 @@ +class Dtsroll < Formula + desc "CLI tool for bundling TypeScript declaration files" + homepage "https://github.com/privatenumber/dtsroll" + url "https://registry.npmjs.org/dtsroll/-/dtsroll-1.4.1.tgz" + sha256 "26a3030a532a715ee29fcd8ec9b2cc20e92293d925d135c6c69ee114f39d71da" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6e77274c126ca0e35fa508288d65f17353c7190eb6d12218e9c9c89e7ce20197" + sha256 cellar: :any, arm64_sequoia: "f4e9c696c1eff169a56afc231df64ddb3afd1a94a93d06df600cbca2f243ac01" + sha256 cellar: :any, arm64_sonoma: "f4e9c696c1eff169a56afc231df64ddb3afd1a94a93d06df600cbca2f243ac01" + sha256 cellar: :any, arm64_ventura: "f4e9c696c1eff169a56afc231df64ddb3afd1a94a93d06df600cbca2f243ac01" + sha256 cellar: :any, sonoma: "16f1125c683e13616e62314f8e4bc91be5181ac227b3aeb99dcb1d4fc2035e62" + sha256 cellar: :any, ventura: "16f1125c683e13616e62314f8e4bc91be5181ac227b3aeb99dcb1d4fc2035e62" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d680c2184178dcc9f3288e732ee083f093a9dce24e8023b22c57038d67202af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64e17a278f414e6c1c8efbd55f535d0ef459bb7c657b3ae2b4196611c21530e6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/dtsroll --version") + + (testpath/"dts.d.ts").write "export type Foo = string;" + + assert_match "Entry points\n → dts.d.ts", shell_output("#{bin}/dtsroll dts.d.ts") + end +end diff --git a/Formula/d/dua-cli.rb b/Formula/d/dua-cli.rb new file mode 100644 index 0000000000000..5eecad4aba082 --- /dev/null +++ b/Formula/d/dua-cli.rb @@ -0,0 +1,35 @@ +class DuaCli < Formula + desc "View disk space usage and delete unwanted data, fast" + homepage "https://lib.rs/crates/dua-cli" + url "https://github.com/Byron/dua-cli/archive/refs/tags/v2.32.2.tar.gz" + sha256 "8a3495d2ec0c9bee961e512c79b11c9945797a3d4f979b4ec63fd50d73d80c94" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "45195139fbaf4b37893ac5cbddb41eadee7f9c21ca88c09b333fcc7d657cc550" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2736210432d3d48b661c3b76bd6a66f610c3c2039a4ffcb19afc2a6182c39038" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67cea135c33f807bce9a898ab78a4eba365687e8c86781af40831dc6d5db57d2" + sha256 cellar: :any_skip_relocation, sonoma: "1d536b71698faac029e94d5209d7d6d712ef9d82998ede0a6db07b5c1d4cecbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "113df40fadd63e850c57c9441bde91685fd2366728dc77d013d28ec25e59196a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc785849b7c2d16eba2dce9fd9f962ebb6cde23f50810f97b1b38919d49594e4" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Test that usage is correct for these 2 files. + (testpath/"empty.txt").write("") + (testpath/"file.txt").write("01") + + expected = %r{ + \e\[32m\s*0\s*B\e\[39m\ #{testpath}/empty.txt\n + \e\[32m\s*2\s*B\e\[39m\ #{testpath}/file.txt\n + \e\[32m\s*2\s*B\e\[39m\ total\n + }x + assert_match expected, shell_output("#{bin}/dua -A #{testpath}/*.txt") + end +end diff --git a/Formula/d/dub.rb b/Formula/d/dub.rb new file mode 100644 index 0000000000000..2919f4296e678 --- /dev/null +++ b/Formula/d/dub.rb @@ -0,0 +1,64 @@ +class Dub < Formula + desc "Build tool for D projects" + homepage "https://code.dlang.org/getting_started" + url "https://github.com/dlang/dub/archive/refs/tags/v1.40.0.tar.gz" + sha256 "52b963137e8a671e48ce3b64eb1e424f6a3c137b8001cf74fb98932def61c171" + license "MIT" + version_scheme 1 + head "https://github.com/dlang/dub.git", branch: "master" + + # Upstream may not create a GitHub release for tagged versions, so we check + # the dlang.org package as an indicator that a version is released. The API + # provides the latest version (https://code.dlang.org/api/packages/dub/latest) + # but this is sometimes an unstable version, so we identify the latest stable + # version from the package's version page. + livecheck do + url "https://code.dlang.org/packages/dub/versions" + regex(%r{href=.*/packages/dub/v?(\d+(?:\.\d+)+)["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bbe9d9b06caf6dd33e1da296d30d0683feadf19cc993813f39a8116924246aac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fdc35c943741ff4daa5204c4787fad70b3ed94dc31abab026c195df73fcf13ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bca28b6b780e086f88bad5ffb32abb71d8b9d8f256d17547cfd6aa4d4a5fc346" + sha256 cellar: :any_skip_relocation, arm64_ventura: "abf4f33add519521441ebc0af2ceb04cb2261496e3962dec491a0a0c16770f42" + sha256 cellar: :any_skip_relocation, sonoma: "2cdc341f90c51af8a19fc8ce5dbfdbfa7054ccde65363da365066609f4b8cd62" + sha256 cellar: :any_skip_relocation, ventura: "52f26e201118800cf552bf0a7f57df4afaf90300b132035fbd52325224d7b861" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a4f71c32ebc9395d31b401219449820ddcaad85415a1deff1ff770322faa1b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d68877d9ac67d2e682a19cdef3d6867f700b1aa52afa5125f8851de3cd01a695" + end + + depends_on "ldc" => [:build, :test] + depends_on "pkgconf" + + uses_from_macos "curl" + + def install + ENV["GITVER"] = version.to_s + system "ldc2", "-run", "./build.d" + system "bin/dub", "scripts/man/gen_man.d" + bin.install "bin/dub" + man1.install Dir["scripts/man/*.1"] + + bash_completion.install "scripts/bash-completion/dub.bash" => "dub" + zsh_completion.install "scripts/zsh-completion/_dub" + fish_completion.install "scripts/fish-completion/dub.fish" + end + + test do + assert_match "DUB version #{version}", shell_output("#{bin}/dub --version") + + (testpath/"dub.json").write <<~JSON + { + "name": "brewtest", + "description": "A simple D application" + } + JSON + (testpath/"source/app.d").write <<~D + import std.stdio; + void main() { writeln("Hello, world!"); } + D + system bin/"dub", "build", "--compiler=#{Formula["ldc"].opt_bin}/ldc2" + assert_equal "Hello, world!", shell_output("#{testpath}/brewtest").chomp + end +end diff --git a/Formula/d/duc.rb b/Formula/d/duc.rb new file mode 100644 index 0000000000000..9e030074f8395 --- /dev/null +++ b/Formula/d/duc.rb @@ -0,0 +1,58 @@ +class Duc < Formula + desc "Suite of tools for inspecting disk usage" + homepage "https://github.com/zevv/duc" + url "https://github.com/zevv/duc/releases/download/1.4.5/duc-1.4.5.tar.gz" + sha256 "c69512ca85b443e42ffbb4026eedd5492307af612047afb9c469df923b468bfd" + license "LGPL-3.0-only" + head "https://github.com/zevv/duc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "737e5d14b749b58fa2640bc9a7ee42a49f7a546ea7332c928a3a19d274b8f875" + sha256 cellar: :any, arm64_sequoia: "36a33e4afc9997df0f15d7c8a9090054d213c243abd19ec2bb25cc7ddc157615" + sha256 cellar: :any, arm64_sonoma: "df0c4ee04b4b588ebd6c627e769773354c8c990bd62dcb1d5a2cd4d7d8f7eaa8" + sha256 cellar: :any, arm64_ventura: "f84fa8689d44e453cc7795e284c4bb33b5406f57e7e3e49dea18eed1e9853269" + sha256 cellar: :any, arm64_monterey: "672f0a2f6ce1dd2ce3eac59e247af247c254ffac22b962f0931e3c637aede1e7" + sha256 cellar: :any, arm64_big_sur: "d70515b63c95de8ae52fb7e8ca11ef6fb6f98c1ab0661b4ce452fce2907cd35a" + sha256 cellar: :any, sonoma: "83abc6de8f808854af5de8900a9e8dec941c428d9599c51e24d6f29b9ac54809" + sha256 cellar: :any, ventura: "e6e560263c0fe5805daa0d4a7acde5480d3607807d63a1b626d17ad83b5ac0b7" + sha256 cellar: :any, monterey: "36c158318b3407f306c82914ba1d63d9492c39644ae0ef1ad627ea20ef38351b" + sha256 cellar: :any, big_sur: "4c95e3a0b2a6222344c157b9a12a26cb9ee78a447788f124a8eb8d9968368779" + sha256 cellar: :any, catalina: "cc7f8ef4f7d6b1f310786032f0fab27aab42e17d57ee9393098f09e8b019cf50" + sha256 cellar: :any_skip_relocation, arm64_linux: "a55a00e1179e4fb37bfff2495752b3c1e4aa13914ae932fd246f20bb1487270b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8068dbd6bfa637aa4718113cff03ce8f8b641e65a379f489827b8acd3411f0e8" + end + + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "glfw" + depends_on "glib" + depends_on "pango" + depends_on "tokyo-cabinet" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "./configure", "--disable-silent-rules", + "--disable-x11", + "--enable-opengl", + *std_configure_args + system "make", "install" + end + + test do + db_file = testpath/"duc.db" + touch db_file + system "dd", "if=/dev/zero", "of=test", "count=1" + system bin/"duc", "index", "-d", db_file, "." + system bin/"duc", "graph", "-d", db_file, "-o", "duc.png" + assert_path_exists testpath/"duc.png", "Failed to create duc.png!" + end +end diff --git a/Formula/d/duck.rb b/Formula/d/duck.rb new file mode 100644 index 0000000000000..6a380e51b0097 --- /dev/null +++ b/Formula/d/duck.rb @@ -0,0 +1,187 @@ +class Duck < Formula + desc "Command-line interface for Cyberduck (a multi-protocol file transfer tool)" + homepage "https://duck.sh/" + url "https://dist.duck.sh/duck-src-9.2.4.43667.tar.gz" + sha256 "690e6248638f9fea903345de96e3c6b63754ba8f510ba74397ecd487a6a84637" + license "GPL-3.0-only" + head "https://github.com/iterate-ch/cyberduck.git", branch: "master" + + livecheck do + url "https://dist.duck.sh/" + regex(/href=.*?duck(?:-src)?[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1812459174a458a88e6b19e74c98e470d11ca66a3e8fe51b9ef940f27144c18a" + sha256 cellar: :any, arm64_sequoia: "90fd52cfbb685bb5236647ba95172aa0f4ae71b179e49517852f1b197ecfd954" + sha256 cellar: :any, arm64_sonoma: "db28ad374157b347461e56beb371b6917644b636b0eb5bd043297349a35dd244" + sha256 cellar: :any, sonoma: "7990688542beca48a2069f8535a94baffb2fc00b67161d36672a9cd6a2b902a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "8344a1a60e28940500f00371debeea7dcb1400aa507dea307df788fea9af2eef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c68e9347fa707f0fb54c437e40094a12a3d794af865c90ec5f95f3a244dadbe4" + end + + depends_on "ant" => :build + depends_on "maven" => :build + depends_on "pkgconf" => :build + depends_on xcode: ["13.1", :build] + depends_on "openjdk" + + uses_from_macos "libffi", since: :monterey # Uses `FFI_BAD_ARGTYPE`. + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "freetype" + depends_on "giflib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxrender" + depends_on "libxtst" + depends_on "little-cms2" + end + + conflicts_with "duckscript", because: "both install `duck` binaries" + + resource "jna" do + url "https://github.com/java-native-access/jna/archive/refs/tags/5.17.0.tar.gz" + sha256 "fe35d85e63ea998ec08f1beaa0162b1e7f233e9e82b8f43ba500a0a824874158" + end + + resource "rococoa" do + url "https://github.com/iterate-ch/rococoa/archive/refs/tags/0.10.0.tar.gz" + sha256 "8ce789a7b27c37ed37dcb6517b76de8eee144bf7269c3c645d791f21c20a3046" + end + + resource "JavaNativeFoundation" do + url "https://github.com/apple/openjdk/archive/refs/tags/iTunesOpenJDK-1014.0.2.12.1.tar.gz" + sha256 "e8556a73ea36c75953078dfc1bafc9960e64593bc01e733bc772d2e6b519fd4a" + end + + def install + # Consider creating a formula for this if other formulae need the same library + resource("jna").stage do + os = if OS.mac? + inreplace "native/Makefile" do |s| + libffi_libdir = if MacOS.version >= :monterey + MacOS.sdk_path/"usr/lib" + else + Formula["libffi"].opt_lib + end + # Add linker flags for libffi because Makefile call to pkg-config doesn't seem to work properly. + s.change_make_var! "LIBS", "-L#{libffi_libdir} -lffi" + library_var = s.get_make_var("LIBRARY") + # Force shared library to have dylib extension on macOS instead of jnilib + s.change_make_var! "LIBRARY", library_var.sub("JNISFX", "LIBSFX") + end + + "mac" + else + OS.kernel_name + end + + # Don't include directory with JNA headers in zip archive. If we don't do this, they will be deleted + # and the zip archive has to be extracted to get them. TODO: ask upstream to provide an option to + # disable the zip file generation entirely. + inreplace "build.xml", + "", + "" + + system "ant", "-Dbuild.os.name=#{os}", + "-Dbuild.os.arch=#{Hardware::CPU.arch}", + "-Ddynlink.native=true", + "-DCC=#{ENV.cc}", + "native-build-package" + + cd "build" do + ENV.deparallelize + ENV["JAVA_HOME"] = Language::Java.java_home(Formula["openjdk"].version.major.to_s) + + inreplace "build.sh" do |s| + # Fix zip error on macOS because libjnidispatch.dylib is not in file list + s.gsub! "libjnidispatch.so", "libjnidispatch.so libjnidispatch.dylib" if OS.mac? + # Fix relative path in build script, which is designed to be run out extracted zip archive + s.gsub! "cd native", "cd ../native" + end + + system "sh", "build.sh" + buildpath.install shared_library("libjnidispatch") + end + end + + resource("JavaNativeFoundation").stage do + next unless OS.mac? + + cd "apple/JavaNativeFoundation" do + xcodebuild "VALID_ARCHS=#{Hardware::CPU.arch}", + "OTHER_CFLAGS=-Wno-strict-prototypes", # Workaround for Xcode 14.3 + "-project", "JavaNativeFoundation.xcodeproj" + buildpath.install "build/Release/JavaNativeFoundation.framework" + end + end + + resource("rococoa").stage do + next unless OS.mac? + + # Set MACOSX_DEPLOYMENT_TARGET to avoid linker errors when building rococoa. + xcconfig = buildpath/"Overrides.xcconfig" + xcconfig.write <<~EOS + OTHER_LDFLAGS = -headerpad_max_install_names + VALID_ARCHS=#{Hardware::CPU.arch} + MACOSX_DEPLOYMENT_TARGET=#{MacOS.version} + EOS + ENV["XCODE_XCCONFIG_FILE"] = xcconfig + + cd "rococoa/rococoa-core" do + xcodebuild "VALID_ARCHS=#{Hardware::CPU.arch}", "-project", "rococoa.xcodeproj" + buildpath.install shared_library("build/Release/librococoa") + end + end + + os = if OS.mac? + "osx" + else + OS.kernel_name.downcase + end + + revision = version.to_s.rpartition(".").last + system "mvn", "-DskipTests", "-Dconfiguration=default", "-Dgit.commitsCount=#{revision}", + "--projects", "cli/#{os}", "--also-make", "verify" + + libdir, bindir = if OS.mac? + %w[Contents/Frameworks Contents/MacOS] + else + %w[lib/app bin] + end.map { |dir| libexec/dir } + + if OS.mac? + libexec.install Dir["cli/osx/target/duck.bundle/*"] + + # Remove the `*.tbd` files. They're not needed, and they cause codesigning issues. + buildpath.glob("JavaNativeFoundation.framework/**/JavaNativeFoundation.tbd").map(&:unlink) + rm_r(libdir/"JavaNativeFoundation.framework") + libdir.install buildpath/"JavaNativeFoundation.framework" + + rm libdir/shared_library("librococoa") + libdir.install buildpath/shared_library("librococoa") + + # Replace runtime with already installed dependency + rm_r libexec/"Contents/PlugIns/Runtime.jre" + ln_s Formula["openjdk"].libexec/"openjdk.jdk", libexec/"Contents/PlugIns/Runtime.jre" + else + libexec.install Dir["cli/linux/target/default/duck/*"] + end + + rm libdir/shared_library("libjnidispatch") + libdir.install buildpath/shared_library("libjnidispatch") + bin.install_symlink "#{bindir}/duck" => "duck" + end + + test do + system bin/"duck", "--download", "https://ftpmirror.gnu.org/gnu/wget/wget-1.19.4.tar.gz", testpath/"test" + assert_equal (testpath/"test").sha256, "93fb96b0f48a20ff5be0d9d9d3c4a986b469cb853131f9d5fe4cc9cecbc8b5b5" + end +end diff --git a/Formula/d/duckdb.rb b/Formula/d/duckdb.rb new file mode 100644 index 0000000000000..11d0e06a713a4 --- /dev/null +++ b/Formula/d/duckdb.rb @@ -0,0 +1,82 @@ +class Duckdb < Formula + desc "Embeddable SQL OLAP Database Management System" + homepage "https://www.duckdb.org" + url "https://github.com/duckdb/duckdb.git", + tag: "v1.4.1", + revision: "b390a7c3760bd95926fe8aefde20d04b349b472e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0e434f12d6815f25d8bd757db6defa0f56fd52684ee482264d874b81ec18434a" + sha256 cellar: :any, arm64_sequoia: "aa95bf4f948e60735d5ddfd3fb8e45b00f57574570ece6d3b25e78ef5991c188" + sha256 cellar: :any, arm64_sonoma: "449fe9e785f42a481fbe8211881fe6fe86654eb71ca9f0d2939cb955e803cd04" + sha256 cellar: :any, sonoma: "547ba7d93f6fd4f1944d95e94d694ed80b60f01a84efad66c71cd2c260797b70" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fa9104dcb0b037c9b590bcb7b415182e81c39b597bc4c8f295fa95e3c01275e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f5b04911564eafbb24eaa02a52044c1119b81c70115f9999a3fd512a1734b3c" + end + + depends_on "cmake" => [:build, :test] + uses_from_macos "python" => :build + + def install + args = %w[ + -DBUILD_EXTENSIONS='autocomplete;icu;parquet;json' + -DENABLE_EXTENSION_AUTOLOADING=1 + -DENABLE_EXTENSION_AUTOINSTALL=1 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # The cli tool was renamed (0.1.8 -> 0.1.9) + # Create a symlink to not break compatibility + bin.install_symlink bin/"duckdb" => "duckdb_cli" + end + + test do + sql_commands = <<~SQL + CREATE TABLE weather (temp INTEGER); + INSERT INTO weather (temp) VALUES (40), (45), (50); + SELECT AVG(temp) FROM weather; + SQL + + expected_output = <<~EOS + ┌─────────────┐ + │ avg("temp") │ + │ double │ + ├─────────────┤ + │ 45.0 │ + └─────────────┘ + EOS + + assert_equal expected_output, pipe_output(bin/"duckdb_cli", sql_commands) + + (testpath/"test.cpp").write <<~CPP + #include "duckdb.hpp" + #include + using namespace duckdb; + int main() { + DuckDB db(nullptr); + Connection con(db); + con.Query("CREATE TABLE weather (temp INTEGER)"); + con.Query("INSERT INTO weather (temp) VALUES (40), (45), (50)"); + auto result = con.Query("SELECT AVG(temp) FROM weather"); + std::cout << result->Fetch()->GetValue(0, 0).ToString(); + } + CPP + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(test_duckdb) + set(CMAKE_CXX_STANDARD 11) + find_package(DuckDB REQUIRED) + add_executable(test test.cpp) + target_link_libraries(test duckdb) + CMAKE + + system "cmake", "-S", testpath, "-B", testpath/"build" + system "cmake", "--build", testpath/"build" + assert_equal "45.0", shell_output(testpath/"build"/"test") + end +end diff --git a/Formula/d/ducker.rb b/Formula/d/ducker.rb new file mode 100644 index 0000000000000..b7dd12ab6e3be --- /dev/null +++ b/Formula/d/ducker.rb @@ -0,0 +1,29 @@ +class Ducker < Formula + desc "Slightly quackers Docker TUI based on k9s" + homepage "https://github.com/robertpsoane/ducker" + url "https://github.com/robertpsoane/ducker/archive/refs/tags/v0.5.4.tar.gz" + sha256 "6b00e1779483bd2fe057c1842db5d446e44a1dda6c551f30e86eeee944b49a22" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb623bba60f88c43cd88507d3fb236005251c26f1f4538382b72c07522846fdf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "222254278f39b173121c961c3fc2fd210463287c1d0f1d5842c6b16cf38176f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "919dbc90abd66f08a06d50112a547eec157902f39ede120f6b130989166bf0d9" + sha256 cellar: :any_skip_relocation, sonoma: "eb67ba4031ad1736b8e701b77fd621f885b65effba1fb8a94e6dc2d007a409de" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c0c0bdc7a7b7de866ca3a0476127c69d1c2aaae977097bc0f1bd14d16ed8f6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19cc5444742e9e43854b51f0ff688f34699911c9a6bc14f56dc516e61e95d483" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"ducker", "--export-default-config" + assert_match "prompt", (testpath/".config/ducker/config.yaml").read + + assert_match "ducker #{version}", shell_output("#{bin}/ducker --version") + end +end diff --git a/Formula/d/duckscript.rb b/Formula/d/duckscript.rb new file mode 100644 index 0000000000000..494ec28d9bf84 --- /dev/null +++ b/Formula/d/duckscript.rb @@ -0,0 +1,43 @@ +class Duckscript < Formula + desc "Simple, extendable and embeddable scripting language" + homepage "https://sagiegurari.github.io/duckscript" + url "https://github.com/sagiegurari/duckscript/archive/refs/tags/0.11.1.tar.gz" + sha256 "2e23b16359fb9b2c521f0bd250f6eb754bcb8ef40a7f8bf8076f87387276032a" + license "Apache-2.0" + head "https://github.com/sagiegurari/duckscript.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "511837c8de4a2edc3cec770ac4a5d732767cf3074755cb58cb14b359be3647a2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5582ec1f3830f0ba37bd1562663c64df16dec7249edea7abf44b8d4a4283e912" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d23b3da8b2b44581e7f0dfe911f8e1edd43279a88aded7ea8d5e025d35972ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f462e56f82dcf7e2a30276ba5b9f43f310ee9de6c1143fc7da8d481cc195a436" + sha256 cellar: :any_skip_relocation, sonoma: "0821ca6f519677e8504aeb4307b2f9c2fbfa6a7423eff300e2a8da4e6aae966a" + sha256 cellar: :any_skip_relocation, ventura: "8dd3fca5e3317481cd6d2e8c0d4d83b66de311179eec5fd7fb04a43e14bd3ebc" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea5de2c68d6c5afabb1ebfd8b0551911c627bad105f050d87f489a295c04eb98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5235e7033e0a8ed818f198f52df387bd1d82422000c9a32297b7265df247ac36" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + conflicts_with "duck", because: "both install `duck` binaries" + + def install + system "cargo", "install", "--features", "tls-native", *std_cargo_args(path: "duckscript_cli") + end + + test do + (testpath/"hello.ds").write <<~EOS + out = set "Hello World" + echo The out variable holds the value: ${out} + EOS + output = shell_output("#{bin}/duck hello.ds") + assert_match "The out variable holds the value: Hello World", output + end +end diff --git a/Formula/d/dud.rb b/Formula/d/dud.rb new file mode 100644 index 0000000000000..9900baac1e8d4 --- /dev/null +++ b/Formula/d/dud.rb @@ -0,0 +1,34 @@ +class Dud < Formula + desc "CLI tool for versioning data" + homepage "https://kevin-hanselman.github.io/dud/" + url "https://github.com/kevin-hanselman/dud/archive/refs/tags/v0.4.5.tar.gz" + sha256 "57f63d260c8a0a0f925bb67e3634f1211c69b07a7405215b53c38d8563119425" + license "BSD-3-Clause" + head "https://github.com/kevin-hanselman/dud.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b03ec73614b941708e676a4c170549a563d888265df0a547155ccb997973552a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e40fc688de77f2aa11aaf87d123516aa14883010c37e6ba1bc8e035dc6ee1dfb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e40fc688de77f2aa11aaf87d123516aa14883010c37e6ba1bc8e035dc6ee1dfb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e40fc688de77f2aa11aaf87d123516aa14883010c37e6ba1bc8e035dc6ee1dfb" + sha256 cellar: :any_skip_relocation, sonoma: "9ba8951fd0efc9b6a64503491025a2f9b6a0a741e3fcd147dc5f0855a9333a51" + sha256 cellar: :any_skip_relocation, ventura: "9ba8951fd0efc9b6a64503491025a2f9b6a0a741e3fcd147dc5f0855a9333a51" + sha256 cellar: :any_skip_relocation, arm64_linux: "c04a5cb4ddcacc215aab792c1cec5570e020a9a70ede414e437dee8ef0437381" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6d2d41cbcbda86daf9354b22905a9bdc50b1b866e9727510929ce13a11eb837" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + generate_completions_from_executable(bin/"dud", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dud version") + system bin/"dud", "init" + assert_path_exists testpath/".dud/config.yaml" + end +end diff --git a/Formula/d/duf.rb b/Formula/d/duf.rb new file mode 100644 index 0000000000000..9dbde4e7cd124 --- /dev/null +++ b/Formula/d/duf.rb @@ -0,0 +1,33 @@ +class Duf < Formula + desc "Disk Usage/Free Utility - a better 'df' alternative" + homepage "https://github.com/muesli/duf" + url "https://github.com/muesli/duf/archive/refs/tags/v0.9.1.tar.gz" + sha256 "1334d8c1a7957d0aceebe651e3af9e1c1e0c6f298f1feb39643dd0bd8ad1e955" + license "MIT" + head "https://github.com/muesli/duf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d84f7a6e5b52412a9daa6ec83c42a63f648f688032bef46944006fb430459216" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d84f7a6e5b52412a9daa6ec83c42a63f648f688032bef46944006fb430459216" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d84f7a6e5b52412a9daa6ec83c42a63f648f688032bef46944006fb430459216" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d84f7a6e5b52412a9daa6ec83c42a63f648f688032bef46944006fb430459216" + sha256 cellar: :any_skip_relocation, sonoma: "92a705a34e2553e02be84c25e9bf3b3fb9ad78b18347e865ff42969e6df7ad58" + sha256 cellar: :any_skip_relocation, ventura: "92a705a34e2553e02be84c25e9bf3b3fb9ad78b18347e865ff42969e6df7ad58" + sha256 cellar: :any_skip_relocation, arm64_linux: "227b9aac9896faac935cdc96b7d7b92faf882b1ced3657f31d9fe2d32af10fb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "714eb9bcedcf3abb357b93cd8c85ad9d70adda67064254de44e40fdf12128ae2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + require "json" + + devices = JSON.parse shell_output("#{bin}/duf --json") + assert root = devices.find { |d| d["mount_point"] == "/" } + assert_equal "local", root["device_type"] + end +end diff --git a/Formula/d/duff.rb b/Formula/d/duff.rb new file mode 100644 index 0000000000000..fad6554f89c69 --- /dev/null +++ b/Formula/d/duff.rb @@ -0,0 +1,47 @@ +class Duff < Formula + desc "Quickly find duplicates in a set of files from the command-line" + homepage "https://github.com/elmindreda/duff" + url "https://downloads.sourceforge.net/project/duff/duff/0.5.2/duff-0.5.2.tar.gz" + sha256 "15b721f7e0ea43eba3fd6afb41dbd1be63c678952bf3d80350130a0e710c542e" + license "Zlib" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "643c694ade386db6a76b2da2cabedb1068774a1d4bb9f6ab48b86703e0a58935" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c424b8c034bc699eee2d55c766aad34f4f7ea1f46a5c6f0a6a221159917fd396" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd400550da914ee690f2ff0798da5a8438afcbc68dd337da29b85f694724bdb6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "176be0397d77a2aacf76fffda32a3d6e203eb7a803c626c52db2e563c2c49c3f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "668a1d24b8d48ec315a92dff088af45703c461c93fb8b865ff76eb7e932eab03" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a56fadd23b68f73dc6800cb2d13435b8bc8893b3b1cf3ce48660663840cab8a9" + sha256 cellar: :any_skip_relocation, sonoma: "225d98a5044185879742e8aadb0212524bb675a7eb01e7f40e27290d63873738" + sha256 cellar: :any_skip_relocation, ventura: "ae67b1af84e554db4575280152fe634369a8248c1ca9cc358d4247e553ee87da" + sha256 cellar: :any_skip_relocation, monterey: "486d0ff26e56d7a23692b429a3441d965f61bf8e48038f5d582c9a0da5c6379e" + sha256 cellar: :any_skip_relocation, big_sur: "37eec490b6068cb6cb98f430740042712203e2bd2db39bfe25eeb5143f444965" + sha256 cellar: :any_skip_relocation, catalina: "9c383331f4c0f5f8efb8364079dd76994d6e210e4bdd4d6f8e96c53d55ee88d0" + sha256 arm64_linux: "80433cfcf07a77634af2a91f787dfeff3d45744977bcd6dee1d90713e7de074f" + sha256 x86_64_linux: "d2e177f7c17a8dad92be2c7597844a572e4db8a8c4bba5db934843325c5edc90" + end + + def install + args = ["--mandir=#{man}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + expected = <<~EOS + 2 files in cluster 1 (6 bytes, digest 8843d7f92416211de9ebb963ff4ce28125932878) + cmp1 + cmp2 + EOS + + (testpath/"cmp1").write "foobar" + (testpath/"cmp2").write "foobar" + + assert_equal expected, shell_output("#{bin}/duff cmp1 cmp2") + end +end diff --git a/Formula/d/dufs.rb b/Formula/d/dufs.rb new file mode 100644 index 0000000000000..b2e131735aa55 --- /dev/null +++ b/Formula/d/dufs.rb @@ -0,0 +1,43 @@ +class Dufs < Formula + desc "Static file server" + homepage "https://github.com/sigoden/dufs" + url "https://github.com/sigoden/dufs/archive/refs/tags/v0.45.0.tar.gz" + sha256 "62aa2cadd77e1bd9d96c77cbd832a53ffc364301c549001bf8fd9d023cbd8ab1" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2623f7700a3913841f199db10539e61d1625feb3cdf7d2559b8492ec170e771" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4a8c894f245955cbe70f070d6d44491116b22597568ed2df8f657604dd0dad1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99b888d76b8b9333829318cb386a9f57dfd6a199cf5fd97ec6bc43eb820b2077" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d90c2920723a064c8d7eecbdabcb120239bfb3957a42582dd5a00e6c8f4498bf" + sha256 cellar: :any_skip_relocation, sonoma: "2fd86ac85b2f189bd2ca6272595cb058a96257593e99ad613efc00f82b38838c" + sha256 cellar: :any_skip_relocation, ventura: "8234b27ea41c52056cd4e7b7538f74bec5e9f8de89f85c3c41c9da6de82bf2c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cf91d3356b14a9bee84d2b99b779571bdd49a8f7203530dccc2ddaa656eece5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9555a2f90b0bda4e1c21cfe7a81001f9bc9d93fa1d45a3546faf893dffa1a0e0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"dufs", "--completions") + end + + test do + port = free_port + pid = fork do + exec bin/"dufs", bin.to_s, "-b", "127.0.0.1", "--port", port.to_s + end + + sleep 2 + + begin + read = (bin/"dufs").read + assert_equal read, shell_output("curl localhost:#{port}/dufs") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/d/dug.rb b/Formula/d/dug.rb new file mode 100644 index 0000000000000..a7136a7e5faa3 --- /dev/null +++ b/Formula/d/dug.rb @@ -0,0 +1,54 @@ +class Dug < Formula + desc "Global DNS propagation checker that gives pretty output" + homepage "https://dug.unfrl.com" + url "https://github.com/unfrl/dug/archive/refs/tags/0.0.94.tar.gz" + sha256 "f97952be49d93ed66f1cc7e40bf7004928e6573077839a18f5be371c80e2c16b" + license "MIT" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55979db9263fecfc0b8e2e5f3ec5a1c9f51e7e867ff0dbeae546e5503e82616d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2056f58b7a98102e267466ac4b78cb0c20f6d718edadec02e99711e73c63f1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a0694076a8ca9f24aa8105df5400385905f0346365c0d9ff663180126657aff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e7caf9fe29373fefb13ca554c3e58d0ac96cc4fb5f4a210d2ff28162a0a2d96d" + sha256 cellar: :any_skip_relocation, sonoma: "6fcc35f470be76307cf14e8ced656a65749c49f65e63df5e267494596199eeb4" + sha256 cellar: :any_skip_relocation, ventura: "4fd87cddb2e79d2fa8f92f0534b386767e8670c481091ada9574e5944813bfcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "8dcf74573e47126fe1226d4a2bcff3d5b2240f756cc7756ca064cb35268b6110" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ce1254977a436fccb15cd219228dbb012ec7722d91e883b4a47bbd277e19803" + end + + depends_on "dotnet" + uses_from_macos "zlib" + + def install + ENV["DOTNET_SYSTEM_GLOBALIZATION_INVARIANT"] = "1" + + dotnet = Formula["dotnet"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --no-self-contained + --output #{bin} + --use-current-runtime + -p:AppHostRelativeDotNet=#{dotnet.opt_libexec.relative_path_from(bin)} + -p:TargetFrameworks=net#{dotnet.version.major_minor} + -p:Version=#{version} + -p:PublishSingleFile=true + -p:IncludeNativeLibrariesForSelfExtract=true + -p:DebugType=None + ] + + system "dotnet", "publish", "cli/dug.csproj", *args + end + + test do + system bin/"dug", "google.com" + + assert_match version.to_s, shell_output("#{bin}/dug --version") + end +end diff --git a/Formula/d/duktape.rb b/Formula/d/duktape.rb new file mode 100644 index 0000000000000..45ca2b649476e --- /dev/null +++ b/Formula/d/duktape.rb @@ -0,0 +1,57 @@ +class Duktape < Formula + desc "Embeddable Javascript engine with compact footprint" + homepage "https://duktape.org" + url "https://github.com/svaarala/duktape/releases/download/v2.7.0/duktape-2.7.0.tar.xz" + sha256 "90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5fe1dd30da74b054c84215502091d01461ee22644b32f278cb883bf8e65d71f7" + sha256 cellar: :any, arm64_sequoia: "3d744482873a3e4aee3ba9a4471a7d75c1065519466e1730169b2d47a6ef8a18" + sha256 cellar: :any, arm64_sonoma: "8afe806970354b4fafeb1e390d3823964c2fe969d5ae9498612a1c0422cea24f" + sha256 cellar: :any, arm64_ventura: "cb5c28b480f4948b1c058146568829a0a31a082ee5646af9f1c9d163f8fea00a" + sha256 cellar: :any, arm64_monterey: "50433844eb30fed82c204f4ad5b0fe58f70f6ab3fdcaf88f58df1080cc65d3cd" + sha256 cellar: :any, arm64_big_sur: "37641156c20de01c3fe4a5f2df5a16cf2d5ff3f64376a63969643c463ed35e02" + sha256 cellar: :any, sonoma: "dbf3ef6af3565f4a08abdcc243ac18214ae37000b3cb3d4704b807b32cc8040d" + sha256 cellar: :any, ventura: "1c4196f4cfb1ba4319714b7d31249e89cce27ed41ff82bf10ae90e10be159b21" + sha256 cellar: :any, monterey: "1da51e2ceb61766abe0074b869c482feb2b61cffbd9419ceb70157191528f703" + sha256 cellar: :any, big_sur: "89c9cbfd84d99f2cc97f1cd8a4e57f18c3aa3803be295328a8b67239ae51ed27" + sha256 cellar: :any, catalina: "b4dbf4083450e750f2ddfa26d4f4bca18a342703ef950360528e4c390d171636" + sha256 cellar: :any_skip_relocation, arm64_linux: "6bf806c110978a59312df80334012c02e8a285b364effe90c1aea33370549d83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "158b015f9c3b091605deed158af5f37c816c48d00b1163402282459298fd921e" + end + + def install + ENV["INSTALL_PREFIX"] = prefix + system "make", "-f", "Makefile.sharedlibrary", "install" + system "make", "-f", "Makefile.cmdline" + bin.install "duk" + end + + test do + (testpath/"test.js").write "console.log('Hello Homebrew!');" + assert_equal "Hello Homebrew!", shell_output("#{bin}/duk test.js").strip + + (testpath/"test.cc").write <<~CPP + #include + #include "duktape.h" + + int main(int argc, char *argv[]) { + duk_context *ctx = duk_create_heap_default(); + duk_eval_string(ctx, "1 + 2"); + printf("1 + 2 = %d\\n", (int) duk_get_int(ctx, -1)); + duk_destroy_heap(ctx); + return 0; + } + CPP + system ENV.cc, "test.cc", "-o", "test", "-I#{include}", "-L#{lib}", "-lduktape", "-lm" + assert_equal "1 + 2 = 3", shell_output("./test").strip, "Duktape can add number" + end +end diff --git a/Formula/d/dum.rb b/Formula/d/dum.rb new file mode 100644 index 0000000000000..8654a2b64fb89 --- /dev/null +++ b/Formula/d/dum.rb @@ -0,0 +1,41 @@ +class Dum < Formula + desc "Npm scripts runner written in Rust" + homepage "https://github.com/egoist/dum" + url "https://github.com/egoist/dum/archive/refs/tags/v0.1.20.tar.gz" + sha256 "a1f4890f7edec4b5a376d3d6a30986b13ef8818593732f4a577a35c3c7145503" + license "MIT" + head "https://github.com/egoist/dum.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "975c574d188d562cd6a96ea7596200dc1af0863b800472f19ca4e790e3c8b3d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc1a2eb6d29975956f3f6d0197d900dffe8c053bd27454276d59a74d66303250" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b543985f14ec40fe02d399547c13d7c590248a1a04755b80992a63cc9e42a15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d893cad55e091b873833d75218ac6e5ff2ebdb0a65b6af0f819f784ea5e487da" + sha256 cellar: :any_skip_relocation, sonoma: "9a2a36f535842db5effd2ebe482db07b634c8f801d75fe91eea29f273aa624e1" + sha256 cellar: :any_skip_relocation, ventura: "04fa40d559dd0816671b58404c9e829f8ac6c94bb4f51a8403dfd80419815292" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b601f2b4fa4dd366ab91f84aefd8ce246987edc79721118b4b2fdd40d749708" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9db9dd61b5327e9bde5c5ebffd66076e3a72911012aecd8a8b3fda81057ea26" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"package.json").write <<~JSON + { + "scripts": { + "hello": "echo 'Hello, dum!'" + } + } + JSON + + output = shell_output("#{bin}/dum run hello") + assert_match "Hello, dum!", output + + assert_match version.to_s, shell_output("#{bin}/dum --version") + end +end diff --git a/Formula/d/dumb.rb b/Formula/d/dumb.rb new file mode 100644 index 0000000000000..7f6b9681f8b07 --- /dev/null +++ b/Formula/d/dumb.rb @@ -0,0 +1,53 @@ +class Dumb < Formula + desc "IT, XM, S3M and MOD player library" + homepage "https://dumb.sourceforge.net/" + url "https://github.com/kode54/dumb/archive/refs/tags/2.0.3.tar.gz" + sha256 "99bfac926aeb8d476562303312d9f47fd05b43803050cd889b44da34a9b2a4f9" + # Essentially Zlib but with modified and added clauses that aren't intended to restrict usage + # https://src.fedoraproject.org/rpms/dumb/blob/rawhide/f/license-clarification.eml + license :cannot_represent + + bottle do + sha256 cellar: :any, arm64_tahoe: "d04fae5e3adcd02d608e3f3b8238a5702b0e74ab1c295128f3e65af4f494e3f4" + sha256 cellar: :any, arm64_sequoia: "7158a40eed75a578dd615fdf83840be91a4fd565b0ce5170c4e91d494e0a0a16" + sha256 cellar: :any, arm64_sonoma: "f9510e55b969457e77567594f6963a7a6470f86dac7f252ed3c01757314c44dd" + sha256 cellar: :any, arm64_ventura: "6ec724316f7ab409767fdb3b240bf6bd00c0753a66ea048b1a1527c19b659a6f" + sha256 cellar: :any, arm64_monterey: "f046a0784378b98ac76156a7a5c306a8c4d931130309c64d6205b1bfd2d0dcfe" + sha256 cellar: :any, arm64_big_sur: "94dd00c18fd4f11400f30074357c4979fe727f49df6e45ad457e79a51d801f46" + sha256 cellar: :any, sonoma: "f7a07476417a15b6e5b5e67ba81dd7ea10d00c02a11d7d290fce803da9f399a1" + sha256 cellar: :any, ventura: "e2acfd0a2255bdb9c7256cd9cec4bf7a450e3db8853271a2ad0e13befc4bac4b" + sha256 cellar: :any, monterey: "a0933282bbe2feb52a06cac1a1a189b83af422e422036f78b0fcfa0e55f5726c" + sha256 cellar: :any, big_sur: "2dade8ff6646f71df07f3b2d586c9bb49ae24c3f0b5ddddea7a09a3762501f5c" + sha256 cellar: :any, catalina: "f9d0768b3b50614adfb2190899362e250f20a14be0fb0c2d21d37bee0afea672" + sha256 cellar: :any_skip_relocation, arm64_linux: "040bc8a1b4387d297c3c83f33fc68f79b885a4fe0530e9ce9c70257f38faadc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de4310947cbbc1807cf9c2bbdb9dcc42cc381de7153b3dc4f206718a1923fe40" + end + + deprecate! date: "2025-07-03", because: :repo_archived + + depends_on "cmake" => :build + depends_on "argtable" + depends_on "sdl2" + + def install + args = std_cmake_args + %w[ + -DBUILD_ALLEGRO4=OFF + -DBUILD_EXAMPLES=ON + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + # Build shared library + system "cmake", "-S", ".", "-B", "build", *args, "-DBUILD_SHARED_LIBS=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Build static library + system "cmake", "-S", ".", "-B", "build", *args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build" + lib.install "build/libdumb.a" + end + + test do + assert_match "missing option ", shell_output("#{bin}/dumbplay 2>&1", 1) + end +end diff --git a/Formula/d/dumbpipe.rb b/Formula/d/dumbpipe.rb new file mode 100644 index 0000000000000..d585ddb1c36ba --- /dev/null +++ b/Formula/d/dumbpipe.rb @@ -0,0 +1,54 @@ +class Dumbpipe < Formula + desc "Unix pipes between devices" + homepage "https://dumbpipe.dev" + url "https://github.com/n0-computer/dumbpipe/archive/refs/tags/v0.32.0.tar.gz" + sha256 "9ac9261fb618adc161a57b48a3fa42b73a856786604cb1778e11657d8125fbeb" + license any_of: ["MIT", "Apache-2.0"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2256150c1188bc8537df3b2669f8229bbc6149595cf2ceb396700d8a6d5ed007" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5f373aa015dc531d5c6d150deffba6e0ef96b66fc66adc54a5bbfc2510ebc30" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "467018d6d5458f55869f90c0291d12b1fe32c6811faf451f625b7f17089237f2" + sha256 cellar: :any_skip_relocation, sonoma: "cdf400591d3b0e86fe51dc26882c95761db7035e5b2cd1cae1939b05acd11d3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b4c6c3945a972467afdc89900a9902c9630ad265e6c27da22791e28d705516a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f617bb08e610f7fe1693ceb56edfb923eaa27ac3b31d025db6a7af04dda1ee61" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + read, write = IO.pipe + + # We need to capture both stdout and stderr from the listener process + # the node ID is output to stderror and the listener data is output to stdout. + listener_pid = spawn bin/"dumbpipe", "listen", err: write, out: write + + begin + sleep 10 + node_id = while read.wait_readable(1) + line = read.gets + break if line.nil? + + match = line.match(/dumbpipe connect (\w+)/) + next if match.blank? + + break match[1] + end.to_s + refute_empty node_id, "No node ID found in listener output" + + sender_read, sender_write = IO.pipe + sender_pid = spawn bin/"dumbpipe", "connect", node_id, in: sender_read + sender_write.puts "foobar" + assert_match "foobar", read.gets + ensure + Process.kill "TERM", sender_pid unless sender_pid.nil? + Process.kill "TERM", listener_pid unless listener_pid.nil? + Process.wait sender_pid unless sender_pid.nil? + Process.wait listener_pid unless listener_pid.nil? + end + end +end diff --git a/Formula/d/dump1090-mutability.rb b/Formula/d/dump1090-mutability.rb new file mode 100644 index 0000000000000..90681906525fe --- /dev/null +++ b/Formula/d/dump1090-mutability.rb @@ -0,0 +1,75 @@ +class Dump1090Mutability < Formula + desc "ADS-B Ground Station System for RTL-SDR" + homepage "https://packages.ubuntu.com/jammy/dump1090-mutability" + url "http://archive.ubuntu.com/ubuntu/pool/universe/d/dump1090-mutability/dump1090-mutability_1.15~20180310.4a16df3+dfsg.orig.tar.gz" + version "1.15_20180310-4a16df3-dfsg" + sha256 "778f389508eccbce6c90d7f56cd01568fad2aaa5618cb5e7c41640a2473905a6" + license "GPL-2.0-or-later" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "00215d003f5feb6d06804af98583d30188d88272597822635e40defb033f9655" + sha256 cellar: :any, arm64_sequoia: "efa32621a9a3d6334c711608e079d435f6af49eb4879442ab499cde1b6d3699d" + sha256 cellar: :any, arm64_sonoma: "e58f730410669a3d0cebde197feec0c661b6b868518f6bd503f8474fd507c180" + sha256 cellar: :any, arm64_ventura: "578b30fb22f49021afbf7828f9a470f2a51872afe33c20f66f4529c300420484" + sha256 cellar: :any, arm64_monterey: "d7dd9f68dbcc3c0f08e1cb87d09ea24a2f16172196c8d9f82bf57416319333b8" + sha256 cellar: :any, sonoma: "8d910c212fa188391204d5e4c7d5cb9c41fba1712164f13e05538636734c2676" + sha256 cellar: :any, ventura: "137e2d13e0e5aab68484b897699777c56be1c4c9f5093c057c7d0856ba70a342" + sha256 cellar: :any, monterey: "8a474349c0344e7eb93212ca5e0f4a60059d1e1ec9f782171213af120a3e7ee8" + sha256 cellar: :any_skip_relocation, arm64_linux: "98114d5ca14d3800d2ecd5809e4c49a61d2168a0a569402ea9cf2133b3653ba6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e554a1e935e5eb47e04660041e611ef0a947ab2c8241bc3a25346363ee06ce8" + end + + depends_on "pkgconf" => :build + depends_on "librtlsdr" + + on_macos do + depends_on "libusb" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `...'; ....o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "make" + bin.install "dump1090" + bin.install "view1090" + end + + test do + require "base64" + enc="goB/en99g4B9gH6Eg35/fICVhJl/gXx9f4F+f36Af4B/f3+AgH9+f39/gH+Af4CBf4F/f3 + 9/f3+AgIGAgH9/f4F/gX9/gH+Bf4B/f3+Af4F+f359gX5/f36BgYB9fIeGm46Ig3p+mIGYfX19f + oGFf4B/gIGAf3+AgoR8dHVle3iBhH98fn6AgIB+gIB/gIF/f4F+gYCAf3+AfoB/fX6CgICAen6K + i5WQhIF6foOBgYB9g454lW6CfH2Cg36AgYCBgX6Af4CAf4B/gICAf39/gICAf39/gICAf35/f4B + /f35+fn6Af4B/f4B/gIB+f35+gX+BfoF/f39/fYF/fIGDgYF/aHttfISAgIB9gYGBfn6AgIF8fn + 6DlIaXgYF+fn+Df3+AgH+Cf4CAgH+Af4CAf4B+f4CAgH9+f39/foGCgH9xbG1wf4KDgHl/hIGCf + mSIc4mYfJB9jHSUb4N+e36CgYCCfmp/a3p1cmh3dYGHf39+foCAfX9+gIF9cIddm2ybhIV/e3qZ + gqyBkYiJjZSHipOJlYp9fIN+pn+ncol3eoGJd5lgjVt+eoCEe2V3aHt5Z2RfY3R8bntjen6BgYB + hiFmZc46FeXuMd5x/iX+Siq2PmH17hoWUk42GkoGVgpF7k3yOd49wjnSGbIdrhHB8Z3xwfHBsWG + Vlf4N/gGR4bXlwg2eIdoJpkFyfd417jHWdg4h+eYSal6qNkIyFk42PhZaAkYOOeplyhnl3fpBvm + FeEYn6Ff3x4ZHlydnNjYmNwfIN/gGN9UYVli4CBfH1mk2OmeZmDfnuFhqaQpIaIjoyWkYF+f32d + h6t7knV7got4lGmEd4hsi1CAaXx5dGR4dYOGcXFncn2CgoF7gH+Cf4F+f4CAf4GAgYF/gH+AgIB + /f39/gIF+gH1/f3+Af4CAfoB+f39/gYB/fn5+gIB+fX5+gIJ+e4CCf4F+XYpcjnmGcJBxk4N9fI + R7qIiphox+fIWLm52kkoh/fIGXgJd7iH2dbKBkhXaHb4tkfn1+gX1fa1VzcoeFdnhlc3R8bXxQh + mOMg395hmySdo97knuTgI6CkYWTiZKKkJCKkYiPh5iBkn+Pfqhvn2t9gYB9jGaHcIBwfGZ/dHNp + ZFpzc3N5Y3N3gYOAY39TkGuSgoB8f22ecqp8joKOhp5+hYF8kJOPjZKAlIeQg5d5kX6PeKJnlmy + Bc4hshW18a4BrfXBwaXVzhIVxdVJvY311gGSGb4WFfHOMbZd7iXiYfa6Dk354hYqNloyKkIiRiJ + J/k4CRfpVyj3mNdplbj2aAd4Njgm19hnlwdWdxd21zbnRufWw=" + plain = Base64.decode64(enc) + (testpath/"input.bin").write plain + result = <<~EOS + *5d4d20237a55a6; + CRC: 000000\nRSSI: -14.3 dBFS + Score: 750\nTime: 206.33us + DF:11 AA:4D2023 IID:0 CA:5 + All Call Reply + ICAO Address: 4D2023 (Mode S / ADS-B) + Air/Ground: airborne + EOS + assert_equal result.strip, shell_output("#{bin}/dump1090 --ifile input.bin 2>/dev/null").strip + end +end diff --git a/Formula/d/dumpling.rb b/Formula/d/dumpling.rb new file mode 100644 index 0000000000000..ba23b9be4f41c --- /dev/null +++ b/Formula/d/dumpling.rb @@ -0,0 +1,47 @@ +class Dumpling < Formula + desc "Creating SQL dump from a MySQL-compatible database" + homepage "https://github.com/pingcap/tidb" + url "https://github.com/pingcap/tidb/archive/refs/tags/v8.5.3.tar.gz" + sha256 "432da5f829c36ae1500a9e5c704d20e456c76ea7fb9278e461b74af15e15af2f" + license "Apache-2.0" + head "https://github.com/pingcap/tidb.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2ea11dd867898817834b0068ad0d8fb1008dfb50920f5c3f145d0d649f66476" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36ffd9dd78ff7a73d98d7bd81fc4986219134cbff0650aa5738d17a24592c8f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "313f002fd020feb0719aefae618b611937057e24fd7f19c6db8639a183b1fd6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f8de2afed51ec376b1cb3ef1ffc78db2cf181a4ed35d954fe9a9a948e1ec85a4" + sha256 cellar: :any_skip_relocation, sonoma: "0f9eb8c810a245c45ee47206633b86bc25cf63df545bfa3814c1971638cfa7e1" + sha256 cellar: :any_skip_relocation, ventura: "7eafce1c31d976e377c95c39915394ed36be6dde597ab192063a678b2950ae45" + sha256 cellar: :any_skip_relocation, arm64_linux: "c152c978a041b14ee4cf46fc5d4fab3ed111faf10d79858d997c0666a93f1e56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "792eb379763c2c4fdffe2f7983a9ddf80921128fda04cb183daf2b9967c84ad1" + end + + depends_on "go" => :build + + def install + project = "github.com/pingcap/tidb/dumpling" + ldflags = %W[ + -s -w + -X #{project}/cli.ReleaseVersion=#{version} + -X #{project}/cli.BuildTimestamp=#{time.iso8601} + -X #{project}/cli.GitHash=brew + -X #{project}/cli.GitBranch=#{version} + -X #{project}/cli.GoVersion=go#{Formula["go"].version} + ] + + system "go", "build", *std_go_args(ldflags:), "./dumpling/cmd/dumpling" + end + + test do + output = shell_output("#{bin}/dumpling --database db 2>&1", 1) + assert_match "create dumper failed", output + + assert_match "Release version: #{version}", shell_output("#{bin}/dumpling --version 2>&1") + end +end diff --git a/Formula/d/dunamai.rb b/Formula/d/dunamai.rb new file mode 100644 index 0000000000000..95ab453f2624e --- /dev/null +++ b/Formula/d/dunamai.rb @@ -0,0 +1,36 @@ +class Dunamai < Formula + include Language::Python::Virtualenv + + desc "Dynamic version generation" + homepage "https://github.com/mtkennerly/dunamai" + url "https://files.pythonhosted.org/packages/f1/2f/194d9a34c4d831c6563d2d990720850f0baef9ab60cb4ad8ae0eff6acd34/dunamai-1.25.0.tar.gz" + sha256 "a7f8360ea286d3dbaf0b6a1473f9253280ac93d619836ad4514facb70c0719d1" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fbe8159504fc040f0fb9879a6b529856d6a07de750fffd051f024e32e8878bbc" + end + + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def install + virtualenv_install_with_resources + end + + test do + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "BrewTestBot@test.com" + touch "foo" + system "git", "add", "foo" + system "git", "commit", "-m", "bar" + system "git", "tag", "v0.1" + assert_equal "0.1", shell_output("#{bin}/dunamai from any").chomp + end +end diff --git a/Formula/d/dune.rb b/Formula/d/dune.rb new file mode 100644 index 0000000000000..1367e2f1d9f28 --- /dev/null +++ b/Formula/d/dune.rb @@ -0,0 +1,37 @@ +class Dune < Formula + desc "Composable build system for OCaml" + homepage "https://dune.build/" + url "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + sha256 "b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + license "MIT" + head "https://github.com/ocaml/dune.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d93a6f02c5716b96f58987cf3ace9b3ef8be6720a27c4f2aae1123052717bdce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "533d58afd2a4feafc0fb38140f6a8f51868483987e7ba3a892b85cfc804950ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc6a9aa1bb3058d438616dc8ab30c48e927254bb49b84cb6d18bae2dac0299f6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "097aac472568b94c4bfe357b32c239554fd66f0c813bdeadcdc37012542894c3" + sha256 cellar: :any_skip_relocation, sonoma: "abd95c80b48c98bb48163e8bb673e451fdd06e5b8c582934e09ab2e18a212b53" + sha256 cellar: :any_skip_relocation, ventura: "131149817be6d7bb09fc34c0482743636e25468e4f6b69dca1de224b7a13fb88" + sha256 cellar: :any_skip_relocation, arm64_linux: "402a4bfbb4af0f475fd209f8b214fb4883a982f8fd0f8cb4f5f818dff675842e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e91d5e72f427d773cb585694784269c6bd4354dd973b874f2dc57d058e16715" + end + + depends_on "ocaml" => [:build, :test] + + def install + system "make", "release" + system "make", "PREFIX=#{prefix}", "install" + share.install prefix/"man" + elisp.install Dir[share/"emacs/site-lisp/*"] + end + + test do + contents = "bar" + target_fname = "foo.txt" + (testpath/"dune").write("(rule (with-stdout-to #{target_fname} (echo #{contents})))") + system bin/"dune", "build", "foo.txt", "--root", "." + output = File.read(testpath/"_build/default/#{target_fname}") + assert_match contents, output + end +end diff --git a/Formula/d/dungeon.rb b/Formula/d/dungeon.rb new file mode 100644 index 0000000000000..d1c99a3247b6d --- /dev/null +++ b/Formula/d/dungeon.rb @@ -0,0 +1,58 @@ +class Dungeon < Formula + desc "Classic text adventure game" + homepage "https://github.com/GOFAI/dungeon" + url "https://github.com/GOFAI/dungeon/archive/refs/tags/4.1.tar.gz" + sha256 "b88c49ef60e908e8611257fbb5a6a41860e1058760df2dfcb7eb141eb34e198b" + license "HPND" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f2275404ff5d7dc7bb33a0b5f90d2828faad83a4172b4678521fa6b248a99cee" + sha256 arm64_sequoia: "d50cc1299d0c1d287a9528d49f0f93e2e208eb7cc6e766cab75a892063e2264f" + sha256 arm64_sonoma: "465920dcc443e450f3043dbe316c10c57cd640393b1640fb4756f4acee9e72f1" + sha256 arm64_ventura: "3c9c893622d3b9051d0c42929ecc64774e4bc9669a50cf2a088f32de229e05f2" + sha256 arm64_monterey: "7738a32ea7545be8c7bfa3e5c0deb5f675b34c89d72d352088cfe6e985673ea0" + sha256 arm64_big_sur: "5a1bb16510c15a842aa9979c4d4c8655642b62959e46a857fdf68322a0967879" + sha256 cellar: :any, sonoma: "18130669bbc21c7b6ee6a51d7e751771588c95c92ddbab5d68b62ffcbe148c9d" + sha256 cellar: :any, ventura: "f1197055b9b31daea8f6e6cb9c28488a91c01c6a145604a18f6c077ef5e7c17d" + sha256 cellar: :any, monterey: "299d381405bcf4fe73087e2737812d12ad97dbc996e2015d3f666c0296660b23" + sha256 cellar: :any, big_sur: "c81b8009fb2183b96f6f0c45c4906a0048b535fb2d6abe7a82628e3c164a7375" + sha256 cellar: :any, catalina: "ddbf1a9789d9f3bfe42c91044f0296f3e67b87c272a8d7e435b2405da72c4219" + sha256 arm64_linux: "641cccd8b42a81e9e30af8849bcde552d59b00c75fb45f88fb4842612be02b6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d67e7796b6a55b602bfd0112450b4fffee2c640599fc380dedbf4108d090877d" + end + + depends_on "gcc" # for gfortran + + def install + chdir "src" do + # look for game files where homebrew installed them, not pwd + inreplace "game.f" do |s| + s.gsub! "FILE='dindx',STATUS='OLD',", "FILE='#{opt_pkgshare}/dindx'," + s.gsub! "1\tFORM='FORMATTED',ACCESS='SEQUENTIAL',ERR=1900)", "1\tSTATUS='OLD',FORM='FORMATTED'," \ + "\n\t2\tACCESS='SEQUENTIAL',ERR=1900)" + s.gsub! "FILE='dtext',STATUS='OLD',", "FILE='#{opt_pkgshare}/dtext'," + s.gsub! "1\tFORM='UNFORMATTED',ACCESS='DIRECT',", "1\tSTATUS='OLD',FORM='UNFORMATTED',ACCESS='DIRECT'," + end + inreplace "Makefile" do |s| + s.gsub! "gfortran -g", "gfortran -ffixed-line-length-none -g" + end + system "make" + bin.install "dungeon" + end + pkgshare.install "dindx" + pkgshare.install "dtext" + man.install "dungeon.txt" + man.install "hints.txt" + end + + test do + require "open3" + Open3.popen3(bin/"dungeon") do |stdin, stdout, _| + stdin.close + assert_match " Welcome to Dungeon.\t\t\t", stdout.read + end + end +end diff --git a/Formula/d/duo_unix.rb b/Formula/d/duo_unix.rb new file mode 100644 index 0000000000000..a63ec10528882 --- /dev/null +++ b/Formula/d/duo_unix.rb @@ -0,0 +1,43 @@ +class DuoUnix < Formula + desc "Two-factor authentication for SSH" + homepage "https://www.duosecurity.com/docs/duounix" + url "https://github.com/duosecurity/duo_unix/archive/refs/tags/duo_unix-2.2.2.tar.gz" + sha256 "4ff899ecd363bc218d770ce81b4ca76b0eb4c479c07ccaadeaa86e638fa1ac34" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "91ce5f2f7a0d8ae8d71580f4c514d2f353648aa22ebb027d3bbb94f1dba6d8a9" + sha256 arm64_sequoia: "b3e93286a7ad7638b9adbc2fdf9c387a8cab50abcae6402e7a9c639cecc528a3" + sha256 arm64_sonoma: "8957b178e68f16a2028867b4ef79f0d1068379f3ba6c402bbce28f544ff5401f" + sha256 cellar: :any, sonoma: "de880cbb8dd47cf2a4c44edf4f135703e557abf12a1521a694b9480aaf6f7075" + sha256 arm64_linux: "334af1ff689e35833eb8186c46fa08e1afba45f92d8603c154f799e4a3962984" + sha256 x86_64_linux: "7eb7f1e336f4acf75dcf0f4dde25e0ecab02d8fc3a39660aaf0d899e947f260e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + on_linux do + depends_on "linux-pam" + end + + def install + File.write("build-date", time.to_i) + system "./bootstrap" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--includedir=#{include}/duo", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--with-pam=#{lib}/pam/" + system "make", "install" + end + + test do + system "#{sbin}/login_duo", "-d", "-c", "#{etc}/login_duo.conf", + "-f", "foobar", "echo", "SUCCESS" + end +end diff --git a/Formula/d/duplicity.rb b/Formula/d/duplicity.rb new file mode 100644 index 0000000000000..6c8c7e83926c5 --- /dev/null +++ b/Formula/d/duplicity.rb @@ -0,0 +1,586 @@ +class Duplicity < Formula + include Language::Python::Virtualenv + + desc "Bandwidth-efficient encrypted backup" + homepage "https://gitlab.com/duplicity/duplicity" + # TODO: Restore `depends_on "cryptography"` once pydrive2 replaces oauth2client + # Issue ref: https://github.com/iterative/PyDrive2/issues/361 + url "https://files.pythonhosted.org/packages/b4/f2/5d5a3ab5dc3fecc672c4b1d40bc06717f85a886e963bdba13f40c8601f7d/duplicity-3.0.6.tar.gz" + sha256 "c538fd9883173df1c5c7d8724433b116fe4929471d46b60809f5a4c33dffd370" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "93d9f22d8f2c1a87dd31eca6d75f9ab00a6b41a96e72dbc23253db5fe129edc7" + sha256 cellar: :any, arm64_sequoia: "be6a7adec0c562300f819a330c712d46a52a071b1529450c923cfebbcf268a15" + sha256 cellar: :any, arm64_sonoma: "f2e5cb4c94716ce318352bfb709e66190289b2fcf9dc5ae5904ed401c6d964f4" + sha256 cellar: :any, sonoma: "97d0e028e24abf210ee87bb23c79c5563e4ddee3c9702a55c89a70d85ac1ccb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6dbf1a5e1aa9f6aaa4317c57cfb8d0220f5288d69884fc9faf8f12decaf2c864" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc8ba6b30fea5cf2c0da111c2cea7b8c95acdbf9dbecfd9df133826e511f4b1c" + end + + depends_on "gettext" => :build # for msgfmt + depends_on "pkgconf" => :build # for cryptography + depends_on "rust" => :build # for bcrypt + depends_on "certifi" => :no_linkage + depends_on "gnupg" + depends_on "librsync" + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "openssl@3" # for cryptography + depends_on "python@3.14" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "certifi", + extra_packages: ["python-novaclient>18", "stone==3.2.1"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "args" do + url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz" + sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/0a/c4/d4ff3bc3ddf155156460bff340bbe9533f99fac54ddea165f35a8619f162/azure_core-1.36.0.tar.gz" + sha256 "22e5605e6d0bf1d229726af56d9e92bc37b6e726b141a18be0b4d424131741b7" + end + + resource "azure-storage-blob" do + url "https://files.pythonhosted.org/packages/36/7c/2fd872e11a88163f208b9c92de273bf64bb22d0eef9048cc6284d128a77a/azure_storage_blob-12.27.1.tar.gz" + sha256 "a1596cc4daf5dac9be115fcb5db67245eae894cf40e4248243754261f7b674a6" + end + + resource "b2sdk" do + url "https://files.pythonhosted.org/packages/f2/d2/3418125c13b35960d0fa00cdb58bfe03c4b88fb74519c5930a47802c1b63/b2sdk-2.10.1.tar.gz" + sha256 "92c860a4a2e64d4a30d255d5a8d6d9049ff6d2bc64ff5751c0e05b1a2921fd1f" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b1/04/619bf4f1191021aa54514a3da4fbe91f7a04bf827fad0c1d562f8b3db474/boto3-1.40.65.tar.gz" + sha256 "52e2715838d65e6b000e0077a942ce2d3e1a38f9764414ad01a602912eccf924" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/cf/a6/8e3209425650c96916b31324594db3ea9ec2eecc2b0acf6bbda0d2a6b1b2/botocore-1.40.65.tar.gz" + sha256 "cdbbf9d90a9e9c4a6000055013d98b92efc4ceb1bce0d9bcd70e14461dc22ab3" + end + + resource "boxsdk" do + url "https://files.pythonhosted.org/packages/5a/20/3a52bbe88345910ba8c484df079be40abbae5d517f3d0277efd926aaacb5/boxsdk-10.0.1.tar.gz" + sha256 "b4177714764a866e4666e674564bb54d8acdbd75f872b43c9760e1ac3f26afb4" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "clint" do + url "https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz" + sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa" + end + + resource "cryptography" do + url "https://files.pythonhosted.org/packages/0d/05/07b55d1fa21ac18c3a8c79f764e2514e6f6a9698f1be44994f5adf0d29db/cryptography-43.0.3.tar.gz" + sha256 "315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805" + end + + resource "debtcollector" do + url "https://files.pythonhosted.org/packages/31/e2/a45b5a620145937529c840df5e499c267997e85de40df27d54424a158d3c/debtcollector-3.0.0.tar.gz" + sha256 "2a8917d25b0e1f1d0d365d3c1c6ecfc7a522b1e9716e8a1a4a915126f7ccea6f" + end + + resource "dropbox" do + url "https://files.pythonhosted.org/packages/9e/56/ac085f58e8e0d0bcafdf98c2605e454ac946e3d0c72679669ae112dc30be/dropbox-12.0.2.tar.gz" + sha256 "50057fd5ad5fcf047f542dfc6747a896e7ef982f1b5f8500daf51f3abd609962" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/c0/1f/924e3caae75f471eae4b26bd13b698f6af2c44279f67af317439c2f4c46a/ecdsa-0.19.1.tar.gz" + sha256 "478cba7b62555866fcb3bb3fe985e06decbdb68ef55713c4e5ab98c57d508e61" + end + + resource "fasteners" do + url "https://files.pythonhosted.org/packages/2d/18/7881a99ba5244bfc82f06017316ffe93217dbbbcfa52b887caa1d4f2a6d3/fasteners-0.20.tar.gz" + sha256 "55dce8792a41b56f727ba6e123fcaee77fd87e638a6863cec00007bfea84c8d8" + end + + resource "gdata-python3" do + url "https://files.pythonhosted.org/packages/de/13/7c54a70f2d415750408b22f6a5ede98d33c0f1da9a40449926e8a2037723/gdata-python3-3.0.1.tar.gz" + sha256 "b77301becfb3bf42e9a459169e75e6ff4c20cc7b7e247d4d84988e8c8ac6d898" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/61/da/83d7043169ac2c8c7469f0e375610d78ae2160134bf1b80634c482fa079c/google_api_core-2.28.1.tar.gz" + sha256 "2b405df02d68e68ce0fbc138559e6036559e685159d148ae5861013dc201baf8" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/47/cf/d167fec8be9e65768133be83a8d182350195840e14d1c203565383834614/google_api_python_client-2.186.0.tar.gz" + sha256 "01b8ff446adbc10f495188400a9f7c3e88e5e75741663a25822f41e788475333" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/e0/83/7ef576d1c7ccea214e7b001e69c006bc75e058a3a1f2ab810167204b698b/google_auth_httplib2-0.2.1.tar.gz" + sha256 "5ef03be3927423c87fb69607b42df23a444e434ddb2555b73b3679793187b7de" + end + + resource "google-auth-oauthlib" do + url "https://files.pythonhosted.org/packages/86/a6/c6336a6ceb682709a4aa39e2e6b5754a458075ca92359512b6cbfcb25ae3/google_auth_oauthlib-1.2.3.tar.gz" + sha256 "eb09e450d3cc789ecbc2b3529cb94a713673fd5f7a22c718ad91cf75aedc2ea4" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "ip-associations-python-novaclient-ext" do + url "https://files.pythonhosted.org/packages/01/4e/230d9334ea61efb16dda8bef558fd11f8623f6f3ced8a0cf68559435b125/ip_associations_python_novaclient_ext-0.2.tar.gz" + sha256 "e4576c3ee149bcca7e034507ad9c698cb07dd9fa10f90056756aea0fa59bae37" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jottalib" do + url "https://files.pythonhosted.org/packages/aa/4b/7a5dea988a7a76842738fa23ff8e397109ccb0a85702d10153ce9e46c3ca/jottalib-0.5.1.tar.gz" + sha256 "015c9a1772f06a2ad496278aff4b20ad41acc660304fa8f8b854932c662bb0a5" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/e5/16/b96df223ca7ea4bfa78034b205e0eaf4875bfecb2f119f375fc5232d2061/keystoneauth1-5.12.0.tar.gz" + sha256 "dd113c2f3dcb418d9f761c73b8cd43a96ddfa8a612b51c576822381f39ca4ae8" + end + + resource "logfury" do + url "https://files.pythonhosted.org/packages/90/f2/24389d99f861dd65753fc5a56e2672339ec1b078da5e2f4b174d0767b132/logfury-1.0.1.tar.gz" + sha256 "130a5daceab9ad534924252ddf70482aa2c96662b3a3825a7d30981d03b76a26" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + end + + resource "mediafire" do + url "https://files.pythonhosted.org/packages/0c/fe/491d7b3200f3c3cf894e8c05415be4ee5537bf318d9c04ddd53846edf6b3/mediafire-0.6.1.tar.gz" + sha256 "a1adfeff43dfb611d560c920f6ec18a05b5197b2b15093b08591e45ce879353e" + end + + resource "megatools" do + url "https://files.pythonhosted.org/packages/69/0e/cc12d8dfa5cee8b11c72179de7b23b00d1c1555dfe8c25101d88ae86a7ec/megatools-0.0.4.tar.gz" + sha256 "4418b67fd6ec4b9417d32e2a153a1757d47bc2819b32c155d744640345630112" + end + + resource "mock" do + url "https://files.pythonhosted.org/packages/07/8c/14c2ae915e5f9dca5a22edd68b35be94400719ccfa068a03e0fb63d0f6f6/mock-5.2.0.tar.gz" + sha256 "4e460e818629b4b173f32d08bf30d3af8123afbb8e04bb5707a1fd4799e503f0" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "oauth2client" do + url "https://files.pythonhosted.org/packages/a6/7b/17244b1083e8e604bf154cf9b716aecd6388acd656dd01893d0d244c94d9/oauth2client-4.1.3.tar.gz" + sha256 "d486741e451287f69568a4d26d70d9acd73a2bbfa275746c535b4209891cccc6" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "os-diskconfig-python-novaclient-ext" do + url "https://files.pythonhosted.org/packages/a9/2c/306ef3376bee5fda62c1255da05db2efedc8276be5be98180dbd224d9949/os_diskconfig_python_novaclient_ext-0.1.3.tar.gz" + sha256 "e7d19233a7b73c70244d2527d162d8176555698e7c621b41f689be496df15e75" + end + + resource "os-networksv2-python-novaclient-ext" do + url "https://files.pythonhosted.org/packages/9e/86/6ec4aa97a5e426034f8cc5657186e18303ffb89f37e71375ee0b342b7b78/os_networksv2_python_novaclient_ext-0.26.tar.gz" + sha256 "613a75216d98d3ce6bb413f717323e622386c24fc9cc66148507539e7dc5bf19" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/e7/da/66eaa235e053eb2451464ec131487dec01b5259105688e9f6771d07d45fe/os_service_types-1.8.1.tar.gz" + sha256 "c3d60134ee509cf55452c73ff8bd41891bcb6cf42421a159c0138824e126402b" + end + + resource "os-virtual-interfacesv2-python-novaclient-ext" do + url "https://files.pythonhosted.org/packages/db/33/d5e87b099c9d394a966051cde526c9fcfdd46a51762a8054c98d3ae3b464/os_virtual_interfacesv2_python_novaclient_ext-0.20.tar.gz" + sha256 "6d39ff4174496a0f795d11f20240805a16bbf452091cf8eb9bd1d5ae2fca449d" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/c1/74/a2238cfdf6e97ee398b3fc5eda8b0e108be3913494dbef90961ebe38bf23/oslo_i18n-6.6.0.tar.gz" + sha256 "bb5e3becefa2e40488b259f9db12cc5ad894dd309b5b5aca56382ff190c18f5e" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/d4/ac/119c430df3a86dc6a664fa864f777b4fd5cc16c50caa1ba3dd3bf10f43ae/oslo_serialization-5.8.0.tar.gz" + sha256 "5871a62b23f98cacd5518482941ae6d2a983e2936ed52d543ad08685dc6d2343" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/d9/ec/9f12c8ded6eb7ba0774ea4a0e03bfe6cd35fea4cbc944a826c751bb49500/oslo_utils-9.1.0.tar.gz" + sha256 "01c3875e7cca005b59465c429f467113b5f4b04211cbd534c9ac2f152276d3b3" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/5e/ab/1de9a4f730edde1bdbbc2b8d19f8fa326f036b4f18b2f72cfbea7dc53c26/pbr-7.0.3.tar.gz" + sha256 "b46004ec30a5324672683ec848aed9e8fc500b0d261d40a3229c2d2bbfcedc29" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/e1/88/bdd0a41e5857d5d703287598cbf08dad90aed56774ea52ae071bae9071b6/psutil-7.1.3.tar.gz" + sha256 "6c86281738d77335af7aec228328e944b30930899ea760ecf33a4dba66be5e74" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pydrive2" do + url "https://files.pythonhosted.org/packages/3f/dc/92b0beba58f09441219bb6720bebdb895317632db4778cfe1d21532d27e5/pydrive2-1.21.3.tar.gz" + sha256 "649b84d60c637bc7146485039535aa8f1254ad156423739f07e5d32507447c13" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/5d/70/ff56a63248562e77c0c8ee4aefc3224258f1856977e0c1472672b62dadb8/pyopenssl-24.2.1.tar.gz" + sha256 "4247f0dbe3748d560dcbb2ff3ea01af0f9a1a001ef5f7c4c647956ed8cbf0e95" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyrax" do + url "https://files.pythonhosted.org/packages/96/70/3fd9925320ffd6cc23d1ea737f0a4db56a4862428ad412cbc2521b954787/pyrax-1.9.5.tar.gz" + sha256 "59ac98ae0549beb1eb36cc1f4985d565f126adbfa596d7fa5aaccde5ef194c0e" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-novaclient" do + url "https://files.pythonhosted.org/packages/5c/8a/ac14136fe0a549416b69e6111d6e45c7d821508037922baefa2d54b661f0/python_novaclient-18.11.0.tar.gz" + sha256 "0a31ae20779d4cd171bb29c1fe4e6b22b9c7d97c79670db5149bbdfac03f57dc" + end + + resource "python-swiftclient" do + url "https://files.pythonhosted.org/packages/57/a7/a30bf9fd517d7cc75fb111540c9962c166b9e9539d2ba2afab14a6aa1aa3/python_swiftclient-4.8.0.tar.gz" + sha256 "44162cab469368cafdc25e0c8c4e95a2b9db1a44456a48ce080fe2ca9a4b3863" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rackspace-auth-openstack" do + url "https://files.pythonhosted.org/packages/3c/14/8932bf613797715bf1fe42b00d413025aac9414cf35bacca091a9191155a/rackspace-auth-openstack-1.3.tar.gz" + sha256 "c4c069eeb1924ea492c50144d8a4f5f1eb0ece945e0c0d60157cabcadff651cd" + end + + resource "rackspace-novaclient" do + url "https://files.pythonhosted.org/packages/2a/fc/2c31fea5bc50cd5a849d9fa61343e95af8e2033b35f2650755dcc5365ff1/rackspace-novaclient-2.1.tar.gz" + sha256 "22fc44f623bae0feb32986ec4630abee904e4c96fba5849386a87e88c450eae7" + end + + resource "rax-default-network-flags-python-novaclient-ext" do + url "https://files.pythonhosted.org/packages/36/cf/80aeb67615503898b6b870f17ee42a4e87f1c861798c32665c25d9c0494d/rax_default_network_flags_python_novaclient_ext-0.4.0.tar.gz" + sha256 "852bf49d90e7a1bc16aa0b25b46a45ba5654069f7321a363c8d94c5496666001" + end + + resource "rax-scheduled-images-python-novaclient-ext" do + url "https://files.pythonhosted.org/packages/ef/3c/9cd2453e85979f15316953a37a93d5500d8f70046b501b13766c58cf1310/rax_scheduled_images_python_novaclient_ext-0.3.1.tar.gz" + sha256 "f170cf97b20bdc8a1784cc0b85b70df5eb9b88c3230dab8e68e1863bf3937cdb" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "stone" do + url "https://files.pythonhosted.org/packages/61/4f/b5a9138e86b13e00e2439c62fb4d045d595e0e260454977741f62448c624/stone-3.2.1.tar.gz" + sha256 "9bc78b40143b4ef33bf569e515408c2996ffebefbb1a897616ebe8aa6f2d7e75" + end + + resource "tlslite-ng" do + url "https://files.pythonhosted.org/packages/ff/d1/f6572100f6d6ddb31d7356d7c670599bf404b744ce9bb3c6728bde3665f3/tlslite_ng-0.8.2.tar.gz" + sha256 "9ac377526c60a7d6e7625bd49e7a5ae551b12b0465b07d691342c64a0b3e8440" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/49/19/5e5bcd855d808892fe02d49219f97a50f64cd6d8313d75df3494ee97b1a3/wrapt-2.0.0.tar.gz" + sha256 "35a542cc7a962331d0279735c30995b024e852cf40481e384fd63caaa391cbb9" + end + + resource "jeepney" do + on_linux do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + end + end + + resource "secretstorage" do + on_linux do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"batch.gpg").write <<~EOS + Key-Type: RSA + Key-Length: 2048 + Subkey-Type: RSA + Subkey-Length: 2048 + Name-Real: Testing + Name-Email: testing@foo.bar + Expire-Date: 1d + %no-protection + %commit + EOS + + system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" + begin + (testpath/"test/hello.txt").write "Hello!" + ENV["PASSPHRASE"] = "brew" + system bin/"duplicity", "--tempdir=#{testpath}", "full", "./test", "file://output" + assert_match "duplicity-full-signatures", Dir["output/*"].to_s + + # Ensure requests[security] is activated + script = "import requests as r; r.get('https://mozilla-modern.badssl.com')" + system libexec/"bin/python", "-c", script + ensure + system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" + system Formula["gnupg"].opt_bin/"gpgconf", "--homedir", "keyrings/live", + "--kill", "gpg-agent" + end + end +end diff --git a/Formula/d/duply.rb b/Formula/d/duply.rb new file mode 100644 index 0000000000000..6373c023446bd --- /dev/null +++ b/Formula/d/duply.rb @@ -0,0 +1,28 @@ +class Duply < Formula + desc "Frontend to the duplicity backup system" + # Canonical domain: duply.net + # Historical homepage: https://web.archive.org/web/20131126005707/ftplicity.sourceforge.net + homepage "https://sourceforge.net/projects/ftplicity/" + url "https://downloads.sourceforge.net/project/ftplicity/duply%20%28simple%20duplicity%29/2.5.x/duply_2.5.6.tgz" + sha256 "0d24a78df6dc81622e59a03ee21eddff41eaa43a17aa424ec866a9617e2bb4fd" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/duply[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b48da865cd1504a00ea027655cc144227ed1fe6b200855b959e9836d281e3a6a" + end + + depends_on "duplicity" + + def install + bin.install "duply" + end + + test do + system bin/"duply", "-v" + end +end diff --git a/Formula/d/dupseek.rb b/Formula/d/dupseek.rb new file mode 100644 index 0000000000000..2bce8d2f673ca --- /dev/null +++ b/Formula/d/dupseek.rb @@ -0,0 +1,33 @@ +class Dupseek < Formula + desc "Interactive program to find and remove duplicate files" + homepage "http://www.beautylabs.net/software/dupseek.html" + url "http://www.beautylabs.net/software/dupseek-1.3.tgz" + sha256 "c046118160e4757c2f8377af17df2202d6b9f2001416bfaeb9cd29a19f075d93" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?dupseek[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "af5b3ecacae9c0ace4403ba786d09138413571a9dc52d95ed59b289118683ff4" + end + + def install + bin.install "dupseek" + doc.install %w[changelog.txt doc.txt copyright credits.txt] + end + + test do + mkdir "folder" + touch "folder/file1" + assert_empty shell_output("#{bin}/dupseek -b report -f de folder").chomp + touch "folder/file2" + assert_match %r{^folder\\/file[12]$}, shell_output("#{bin}/dupseek -b report -f de folder").chomp + assert_equal "folder\\/file1\nfolder\\/file2", shell_output("#{bin}/dupseek -b report -f e folder | sort").chomp + end +end diff --git a/Formula/d/dura.rb b/Formula/d/dura.rb new file mode 100644 index 0000000000000..881217577bec8 --- /dev/null +++ b/Formula/d/dura.rb @@ -0,0 +1,54 @@ +class Dura < Formula + desc "Backs up your work automatically via Git commits" + homepage "https://github.com/tkellogg/dura" + url "https://github.com/tkellogg/dura/archive/refs/tags/v0.2.0.tar.gz" + sha256 "6486afa167cc2c9b6b6646b9a3cb36e76c1a55e986f280607c8933a045d58cca" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "fe17fde275bd89fd85338f04c378dc4e08dc566a8ebe965bb6f72b0f0bd6d4dc" + sha256 cellar: :any, arm64_sequoia: "0b2c2b2aa810e3f4a183d0ebed078c330c830d0512c5e4c38ea44fee654b1d15" + sha256 cellar: :any, arm64_sonoma: "0eec39a4d6a29b38fdd44900472c4932ffec202c85b3657399fe9f0c6a390ca3" + sha256 cellar: :any, arm64_ventura: "9afb3146b424af7ac38eb1054ba8ed6f6f918c4eeb3a1ebce44696b9c59af8c1" + sha256 cellar: :any, arm64_monterey: "fedf4c54dd1cc680b6dbdf2534b69d9b8e256e067636b0fcbb531ea0b5cb8476" + sha256 cellar: :any, arm64_big_sur: "6e9e81ec0f29a48921d55bb3168648fbef695dc3d1a242c6aa851bfdf3575dca" + sha256 cellar: :any, sonoma: "3affeb2e58b7d362dedc72f72d05423425f29227a64d7d7dde4c8a36a73274e9" + sha256 cellar: :any, ventura: "d4ef7d4344c67c86442066f7b09e11e5224b93c607dfbea0e91d08eea9f8d38b" + sha256 cellar: :any, monterey: "189cbc09ab1621aa501666194c27b9616a9b0674ace36ac981896a02816bbc25" + sha256 cellar: :any, big_sur: "c01130844f54014c8ad174037da08ac04ec826811c89e917c388662d61f92bd2" + sha256 cellar: :any, catalina: "b0279f3f31e75da9843e5a0ad3bbcae62a29277153c8e8992d4de490397aca70" + sha256 cellar: :any_skip_relocation, arm64_linux: "1863734bc30dd7f8ea317fe0b498279bc71a9b2e6d41b9931fb8f81a6b604e51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b01d4685f6aa2d5fe11722b7c7379695600d6827fa48bd72addebc9cfbd16968" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + end + + service do + run [opt_bin/"dura", "serve"] + keep_alive true + error_log_path var/"log/dura.stderr.log" + log_path var/"log/dura.log.json" + working_dir var + end + + test do + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "BrewTestBot@test.com" + touch "foo" + system "git", "add", "foo" + system "git", "commit", "-m", "bar" + assert_match(/commit_hash:\s+\h{40}/, shell_output("#{bin}/dura capture .")) + end +end diff --git a/Formula/d/dust.rb b/Formula/d/dust.rb new file mode 100644 index 0000000000000..ccad0a4da3f01 --- /dev/null +++ b/Formula/d/dust.rb @@ -0,0 +1,46 @@ +class Dust < Formula + desc "More intuitive version of du in rust" + homepage "https://github.com/bootandy/dust" + url "https://github.com/bootandy/dust/archive/refs/tags/v1.2.3.tar.gz" + sha256 "424b26adfbafeac31da269ecb3f189eca09803e60fad90b3ff692cf52e0aeeee" + license "Apache-2.0" + head "https://github.com/bootandy/dust.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6bb2ac3f18d5a554c04f322f02b01a1f34714c9b88af9bd9c87d0bd46fb318c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13d106cde2640253e23c18c035490d070f493ec1857e5d3accbe990f0884bcff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e60f1cdcd20231549cc68c1aef4a45cc952cef13f32fcd78799d6d9f9becbbf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58e0a6dc31b4535da9aa1f2051f71d6b60c28df37ef82385a95b7a72089fe60c" + sha256 cellar: :any_skip_relocation, sonoma: "aa1cd3f1e018cd69676f469d4a2bda21c63bbba4f9af975c07e6df2d85e28279" + sha256 cellar: :any_skip_relocation, ventura: "1c89bb6736dcbc915b7b9b03d4bf8e421b6e0d93c0e725b43876d321a0074ceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "95b52f20a5ebb1c86f159965b2df71fff01c376964f8d88e1e68cc99bcc1ef83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1929bf6d09aad67060840c5a1cd466ef5fddb0c9d4a0674d11b1cd516ff027b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/dust.bash" => "dust" + fish_completion.install "completions/dust.fish" + zsh_completion.install "completions/_dust" + + man1.install "man-page/dust.1" + end + + test do + # failed with Linux CI run, but works with local run + # https://github.com/Homebrew/homebrew-core/pull/121789#issuecomment-1407749790 + if OS.linux? + system bin/"dust", "-n", "1" + else + assert_match(/\d+.+?\./, shell_output("#{bin}/dust -n 1")) + end + end +end diff --git a/Formula/d/duti.rb b/Formula/d/duti.rb new file mode 100644 index 0000000000000..c784e2b3d18c7 --- /dev/null +++ b/Formula/d/duti.rb @@ -0,0 +1,75 @@ +class Duti < Formula + desc "Select default apps for documents and URL schemes on macOS" + homepage "https://github.com/moretension/duti/" + url "https://github.com/moretension/duti/archive/refs/tags/duti-1.5.4.tar.gz" + sha256 "3f8f599899a0c3b85549190417e4433502f97e332ce96cd8fa95c0a9adbe56de" + license :public_domain + revision 1 + head "https://github.com/moretension/duti.git", branch: "master" + + livecheck do + url :stable + regex(/^duti[._-]v?(\d+(?:[.-]\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0682c28b17ef7f44de34a1fd7a6d3eba5b40b8428f78c18462619386bd564cb2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "618006e5a13a64c6efbf793329f2b5a2778533103cc00d754deeea03c99cffe8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d14d8b6965955bf2ac40e3b894a11285c734875ab1fd672ff6ce8dfeda273a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1854cbacdb3b91f469bb877a3498a45a7dc5035520d0c62e1963929ddc4a3c86" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c753d2d0d444ec7ba4b2b1035863da1e77ae5fd5d82eb75fa7a1a41858366663" + sha256 cellar: :any_skip_relocation, sonoma: "53e88a9b0bb7c477056523e4c90920e0ba1bf5885a6e573722c0bd904586d23b" + sha256 cellar: :any_skip_relocation, ventura: "dce7338c9367ac1b0ea16b2776ab33794d9b262e1abaa6edb3d831aa0b77e93c" + sha256 cellar: :any_skip_relocation, monterey: "d1f488fdeb7eb2c5ca0dc3aaaf93bcb382004ff33b87439d0abf017dcb687cb7" + end + + depends_on "autoconf" => :build + depends_on :macos + + # Fix compilation on macOS 10.14 Mojave + patch do + url "https://github.com/moretension/duti/commit/825b5e6a92770611b000ebdd6e3d3ef8f47f1c47.patch?full_index=1" + sha256 "0f6013b156b79aa498881f951172bcd1ceac53807c061f95c5252a8d6df2a21a" + end + + # Fix compilation on macOS >= 10.15 + patch do + url "https://github.com/moretension/duti/commit/4a1f54faf29af4f125134aef3a47cfe05c7755ff.patch?full_index=1" + sha256 "7c90efd1606438f419ac2fa668c587f2a63ce20673c600ed0c45046fd8b14ea6" + end + + # Fix compilation on Monterey + patch do + url "https://github.com/moretension/duti/commit/ec195e261f8a48a1a18e262a2b1f0ef26a0bc1ee.patch?full_index=1" + sha256 "dec21aeea7f31c1a2122a01b44c13539af48840b181a80cecb4653591a9b0f9d" + end + + # Fix compilation on Ventura + patch do + url "https://github.com/moretension/duti/commit/54a1539b23ac764b32679bcada5659fbad483ecc.patch?full_index=1" + sha256 "055023ce50903ffe9378c68d630a105d317b7efe778c029e3fe23521be89176f" + end + patch do + url "https://github.com/moretension/duti/commit/8d31a2f75fefb61381dc7731cf7ecac9237ee64d.patch?full_index=1" + sha256 "5987230901e63e619bba85c026201dd00ca3f06016a87516e031eebb6cf0e582" + end + + def install + # Patch out the hard limit on macOS version. Don't set `-arch` which is dropped by superenv + inreplace "aclocal.m4", "AC_MSG_ERROR([${host_os} is not a supported system])", 'macosx_arches=""' + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--prefix=#{prefix}", + "--with-macosx-deployment-target=#{MacOS.version}", + "--with-macosx-sdk=#{MacOS.sdk_path}" + system "make", "install" + end + + test do + assert_match "com.apple.TextEdit", shell_output("#{bin}/duti -l public.text"), + "TextEdit not found among the handlers for public.text" + end +end diff --git a/Formula/d/dutree.rb b/Formula/d/dutree.rb new file mode 100644 index 0000000000000..5758b34bd8e27 --- /dev/null +++ b/Formula/d/dutree.rb @@ -0,0 +1,38 @@ +class Dutree < Formula + desc "Tool to analyze file system usage written in Rust" + homepage "https://github.com/nachoparker/dutree" + url "https://github.com/nachoparker/dutree/archive/refs/tags/v0.2.18.tar.gz" + sha256 "55c30e57cc339dd16141510af33245cc3b82f588f22419fc034f02b36ebecba0" + license "GPL-3.0-only" + head "https://github.com/nachoparker/dutree.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7142809bdc97574f3eb01d7b910a6cb7ac6d177da3781c91516961ced6ac46f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "793482f753b7365d719641115e8e55714a4fc272385b7e387c4e68c4791991a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "235807c35ae72d2b7c0ce81eba444d8fa0db6dcc657deb5de876b58037dde646" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9bbb961b815ddd2b4674a485740e9e5f19b7a135ad73e6631f0fcf4ddf78414a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eaf7782638a422504bf3b733217e94eb8fc63cb09123d6a05bf566da56568a7f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a2b038d11a79c57d6b6b3e650b3499315856ab30621b163366ac42bdc22044c4" + sha256 cellar: :any_skip_relocation, sonoma: "15d202fddeafd1e3fdbebfea5f690a3b8f045b54514e6652b9f11e988c412305" + sha256 cellar: :any_skip_relocation, ventura: "aaa311e0c04f6110ba51dd74d8f8315a7d720f1be65a77d7148a37d3248fdfa4" + sha256 cellar: :any_skip_relocation, monterey: "f36cc2121241cb577bbe53de7a0187e089ebc1e4c0bdce0cb0fbb2112f3e5eba" + sha256 cellar: :any_skip_relocation, big_sur: "4bdb0ab41ee8863edc1f6bd4830065369e1b228114b27cd1d8aef35c10d46718" + sha256 cellar: :any_skip_relocation, arm64_linux: "79d48c21002b537d1ab15cf2d22327221135301388802741e015ec14bb84a8c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ea01a9b842b4fe3709ad4a95e8e1ef9d8ac9118eab5bff07df7970f844c6417" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + touch testpath/"brewtest" + assert_match "brewtest", shell_output("#{bin}/dutree --usage #{testpath}") + + assert_match "dutree version #{version}", shell_output("#{bin}/dutree --version") + end +end diff --git a/Formula/d/dvanalyzer.rb b/Formula/d/dvanalyzer.rb new file mode 100644 index 0000000000000..1a3756c448439 --- /dev/null +++ b/Formula/d/dvanalyzer.rb @@ -0,0 +1,63 @@ +class Dvanalyzer < Formula + desc "Quality control tool for examining tape-to-file DV streams" + homepage "https://mediaarea.net/DVAnalyzer" + url "https://mediaarea.net/download/binary/dvanalyzer/1.4.2/DVAnalyzer_CLI_1.4.2_GNU_FromSource.tar.bz2" + sha256 "d2f3fdd98574f7db648708e1e46b0e2fa5f9e6e12ca14d2dfaa77c13c165914c" + license all_of: ["BSD-2-Clause", "GPL-3.0-or-later", "Zlib"] + + livecheck do + url "https://mediaarea.net/DVAnalyzer/Download/Source" + regex(/href=.*?dvanalyzer[._-]?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e1d43037409673d2095be07916360762989d3ce9607c56280f498e881d1af521" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3b6fd3f4af125d1e85f299d7c7c30475a429a7f5d627426e77f5eeddc3d27b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd458167da95107a9a0e3c31bf676a44d1fa64789f92d9ed2c7aeeea8cdef306" + sha256 cellar: :any_skip_relocation, arm64_ventura: "499a358163cb7361ca01a66f258e5544f7facf0d6394d3608fc06c2d42aedf71" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2a5505972404a52e27d0b958ca01f6d0b4776b9698e158edb3408a08f57b9627" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2c3394dede8aedd03611a44ab7f0e9c0cf65de9343eea185575234571da63b76" + sha256 cellar: :any_skip_relocation, sonoma: "fb85daa7321c24dd1467de0ba27fa74de80c65ba80495c277d2ee1a2d302061d" + sha256 cellar: :any_skip_relocation, ventura: "056655cdb3b17dd0ea0aceede196aa68533a91a361ea5db0e532f92715d1a767" + sha256 cellar: :any_skip_relocation, monterey: "3b6827ba646ecac89cfb7437785df9586bfe1df4a4129b418fb7fb58ba2d6078" + sha256 cellar: :any_skip_relocation, big_sur: "c82268f8073ce66058329a7f3e17a8dffba0d811f82c1eb33a6a45144693bf17" + sha256 cellar: :any_skip_relocation, catalina: "1e9397fde0dde748e89f06dabbcabce109fef89914a436b71b754bd32f179e8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5d73bfd1ef1e77613f71f59670c174b49b2032abbca48dfed5da2835f07b169" + sha256 cellar: :any_skip_relocation, x86_64_linux: "439d718775ff2f2f2ae7f076c4cf120298b116b6a6fb0afdc4236823387948f0" + end + + uses_from_macos "zlib" + + def install + cd "ZenLib/Project/GNU/Library" do + args = ["--disable-debug", + "--enable-static", + "--disable-shared"] + system "./configure", *args + system "make" + end + + cd "MediaInfoLib/Project/GNU/Library" do + args = ["--disable-debug", + "--enable-static", + "--disable-shared"] + system "./configure", *args + system "make" + end + + cd "AVPS_DV_Analyzer/Project/GNU/CLI" do + system "./configure", "--disable-debug", "--enable-staticlibs", "--prefix=#{prefix}" + system "make", "install" + end + end + + test do + test_mp3 = test_fixtures("test.mp3") + output = shell_output("#{bin}/dvanalyzer --Header #{test_mp3}") + assert_match test_mp3.to_s, output + + assert_match version.to_s, shell_output("#{bin}/dvanalyzer --Version") + end +end diff --git a/Formula/d/dvc.rb b/Formula/d/dvc.rb new file mode 100644 index 0000000000000..f4b989781c99c --- /dev/null +++ b/Formula/d/dvc.rb @@ -0,0 +1,868 @@ +class Dvc < Formula + include Language::Python::Virtualenv + + desc "Git for data science projects" + homepage "https://dvc.org" + url "https://files.pythonhosted.org/packages/53/d5/88ba8456536e9550ab44bdd3d430351626c20cb08a0593840e319933d773/dvc-3.63.0.tar.gz" + sha256 "b845cf8825e1b07d427e8d04754a0e01f141708bcbb1dae91e18db9e640ae68e" + license "Apache-2.0" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "81c09682a89948a87f0a229b9f6fcc65eeb2b979007136c9f65665f3ce2e721a" + sha256 cellar: :any, arm64_sequoia: "1a4b5e77bfcbe3f15ae2624654035a55798d94fc42fd80bf6806cdd6d471a24f" + sha256 cellar: :any, arm64_sonoma: "cb4983c56128f92d9ab2dd9d8aca0af8c4ad421b8ff620d3f57a2d1f866af0af" + sha256 cellar: :any, sonoma: "b337f0c1da99b42cfd33d553f2d2f2ce44382138d27b652c676e811ee967048c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f304ad1c1bec698e6326054b7486d4b514ca65a50110358ad122f6d12a0b0f7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ef9e68848de0c45044b807136e7a4123b9f2680080cb337520c1b0e58ba18b5" + end + + depends_on "cmake" => :build # for pyarrow + depends_on "ninja" => :build # for pyarrow + depends_on "openjdk" => :build # for hydra-core + depends_on "rust" => :build # for bcrypt + depends_on "apache-arrow" + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "numpy" + depends_on "pydantic-core" => :no_linkage + depends_on "pygit2" => :no_linkage + depends_on "python@3.14" + + on_linux do + depends_on "patchelf" => :build # for pyarrow + end + + pypi_packages package_name: "dvc[all]", + exclude_packages: %w[certifi cryptography numpy pydantic-core pygit2] + + resource "adlfs" do + url "https://files.pythonhosted.org/packages/6b/af/4d74c92254fdeabc19e54df4c9146855c2c1027bd4052477e3a27b05de54/adlfs-2025.8.0.tar.gz" + sha256 "6fe5857866c18990f632598273e6a8b15edc6baf8614272ede25624057b83e64" + end + + resource "aiobotocore" do + url "https://files.pythonhosted.org/packages/62/94/2e4ec48cf1abb89971cb2612d86f979a6240520f0a659b53a43116d344dc/aiobotocore-2.25.1.tar.gz" + sha256 "ea9be739bfd7ece8864f072ec99bb9ed5c7e78ebb2b0b15f29781fbe02daedbc" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiohttp-retry" do + url "https://files.pythonhosted.org/packages/9d/61/ebda4d8e3d8cfa1fd3db0fb428db2dd7461d5742cea35178277ad180b033/aiohttp_retry-2.9.1.tar.gz" + sha256 "8eb75e904ed4ee5c2ec242fefe85bf04240f685391c4879d8f541d6028ff01f1" + end + + resource "aioitertools" do + url "https://files.pythonhosted.org/packages/06/de/38491a84ab323b47c7f86e94d2830e748780525f7a10c8600b67ead7e9ea/aioitertools-0.12.0.tar.gz" + sha256 "c2a9055b4fbb7705f561b9d86053e8af5d10cc845d22c32008c43490b2d8dd6b" + end + + resource "aiooss2" do + url "https://files.pythonhosted.org/packages/74/c5/d704b3943f1cb5cbd8f0bffe597411312b15309917e891712d5bf62fb638/aiooss2-0.2.11.tar.gz" + sha256 "6409e0f7ab66bed364a1c9639b657437175534de160f330d0103a445a2e89a59" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "aliyun-python-sdk-core" do + url "https://files.pythonhosted.org/packages/3e/09/da9f58eb38b4fdb97ba6523274fbf445ef6a06be64b433693da8307b4bec/aliyun-python-sdk-core-2.16.0.tar.gz" + sha256 "651caad597eb39d4fad6cf85133dffe92837d53bdf62db9d8f37dab6508bb8f9" + end + + resource "aliyun-python-sdk-kms" do + url "https://files.pythonhosted.org/packages/a8/2c/9877d0e6b18ecf246df671ac65a5d1d9fecbf85bdcb5d43efbde0d4662eb/aliyun-python-sdk-kms-2.16.5.tar.gz" + sha256 "f328a8a19d83ecbb965ffce0ec1e9930755216d104638cd95ecd362753b813b3" + end + + resource "amqp" do + url "https://files.pythonhosted.org/packages/79/fc/ec94a357dfc6683d8c86f8b4cfa5416a4c36b28052ec8260c77aca96a443/amqp-5.3.1.tar.gz" + sha256 "cddc00c725449522023bad949f70fff7b48f0b1ade74d170a6f10ab044739432" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "antlr4-python3-runtime" do + url "https://files.pythonhosted.org/packages/3e/38/7859ff46355f76f8d19459005ca000b6e7012f2f1ca597746cbcd1fbfe5e/antlr4-python3-runtime-4.9.3.tar.gz" + sha256 "f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "asyncssh" do + url "https://files.pythonhosted.org/packages/6b/b8/065c20bb5c9b8991648c0f25b13e445b4f51556cc3fdd0ad13ce4787c156/asyncssh-2.21.1.tar.gz" + sha256 "9943802955e2131536c2b1e71aacc68f56973a399937ed0b725086d7461c990c" + end + + resource "atpublic" do + url "https://files.pythonhosted.org/packages/8c/78/a7c9b6d6581353204a7a099567783dd3352405b1662988892b9e67039c6c/atpublic-6.0.2.tar.gz" + sha256 "f90dcd17627ac21d5ce69e070d6ab89fb21736eb3277e8b693cc8484e1c7088c" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/0a/c4/d4ff3bc3ddf155156460bff340bbe9533f99fac54ddea165f35a8619f162/azure_core-1.36.0.tar.gz" + sha256 "22e5605e6d0bf1d229726af56d9e92bc37b6e726b141a18be0b4d424131741b7" + end + + resource "azure-datalake-store" do + url "https://files.pythonhosted.org/packages/22/ff/61369d06422b5ac48067215ff404841342651b14a89b46c8d8e1507c8f17/azure-datalake-store-0.0.53.tar.gz" + sha256 "05b6de62ee3f2a0a6e6941e6933b792b800c3e7f6ffce2fc324bc19875757393" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/06/8d/1a6c41c28a37eab26dc85ab6c86992c700cd3f4a597d9ed174b0e9c69489/azure_identity-1.25.1.tar.gz" + sha256 "87ca8328883de6036443e1c37b40e8dc8fb74898240f61071e09d2e369361456" + end + + resource "azure-storage-blob" do + url "https://files.pythonhosted.org/packages/36/7c/2fd872e11a88163f208b9c92de273bf64bb22d0eef9048cc6284d128a77a/azure_storage_blob-12.27.1.tar.gz" + sha256 "a1596cc4daf5dac9be115fcb5db67245eae894cf40e4248243754261f7b674a6" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "billiard" do + url "https://files.pythonhosted.org/packages/b9/6a/1405343016bce8354b29d90aad6b0bf6485b5e60404516e4b9a3a9646cf0/billiard-4.2.2.tar.gz" + sha256 "e815017a062b714958463e07ba15981d802dc53d41c5b69d28c5a7c238f8ecf3" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ed/f9/6ef8feb52c3cce5ec3967a535a6114b57ac7949fd166b0f3090c2b06e4e5/boto3-1.40.61.tar.gz" + sha256 "d6c56277251adf6c2bdd25249feae625abe4966831676689ff23b4694dea5b12" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/28/a3/81d3a47c2dbfd76f185d3b894f2ad01a75096c006a2dd91f237dca182188/botocore-1.40.61.tar.gz" + sha256 "a2487ad69b090f9cccd64cf07c7021cd80ee9c0655ad974f87045b02f3ef52cd" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "celery" do + url "https://files.pythonhosted.org/packages/bb/7d/6c289f407d219ba36d8b384b42489ebdd0c84ce9c413875a8aae0c85f35b/celery-5.5.3.tar.gz" + sha256 "6c972ae7968c2b5281227f01c3a3f984037d21c5129d07bf3550cc2afc6b10a5" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-didyoumean" do + url "https://files.pythonhosted.org/packages/30/ce/217289b77c590ea1e7c24242d9ddd6e249e52c795ff10fac2c50062c48cb/click_didyoumean-0.3.1.tar.gz" + sha256 "4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "click-repl" do + url "https://files.pythonhosted.org/packages/cb/a2/57f4ac79838cfae6912f997b4d1a64a858fb0c86d7fcaae6f7b58d267fca/click-repl-0.3.0.tar.gz" + sha256 "17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "crcmod" do + url "https://files.pythonhosted.org/packages/6b/b0/e595ce2a2527e169c3bcd6c33d2473c1918e0b7f6826a043ca1245dd4e5b/crcmod-1.7.tar.gz" + sha256 "dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "dictdiffer" do + url "https://files.pythonhosted.org/packages/61/7b/35cbccb7effc5d7e40f4c55e2b79399e1853041997fcda15c9ff160abba0/dictdiffer-0.9.0.tar.gz" + sha256 "17bacf5fbfe613ccf1b6d512bd766e6b21fb798822a133aa86098b8ac9997578" + end + + resource "diskcache" do + url "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz" + sha256 "2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "dpath" do + url "https://files.pythonhosted.org/packages/b5/ce/e1fd64d36e4a5717bd5e6b2ad188f5eaa2e902fde871ea73a79875793fc9/dpath-2.2.0.tar.gz" + sha256 "34f7e630dc55ea3f219e555726f5da4b4b25f2200319c8e6902c394258dd6a3e" + end + + resource "dulwich" do + url "https://files.pythonhosted.org/packages/58/98/b6b8bf80e61d1aacf59aad4e45e6a1e7c39751c7bcaeb1136821bae82cd8/dulwich-0.24.8.tar.gz" + sha256 "c9f4748bbcca56fb57458c71c0d30e2351ac15e0583d428c739c09228be68f05" + end + + resource "dvc-azure" do + url "https://files.pythonhosted.org/packages/b1/cd/5cf47247c82e7b8eba42890a23e6700f4baade329d24722140d290c32dc3/dvc-azure-3.1.0.tar.gz" + sha256 "52cbc70d5414b50219b3db0a16f68ad25daba76e3f220aebe4e49b3c6498ae20" + end + + resource "dvc-data" do + url "https://files.pythonhosted.org/packages/d6/49/9476147025cbabfa2695700dd0b4564bbeee085729bb2faa221605d85e3c/dvc_data-3.16.12.tar.gz" + sha256 "f92cc03ffdddb5bd3a7a7da78d595dec6915311256a4cfefe250967d6ce3d194" + end + + resource "dvc-gdrive" do + url "https://files.pythonhosted.org/packages/b5/ab/278694dd93e8657d590408e37e440ead5ca809af6c265ca248df10942270/dvc-gdrive-3.0.1.tar.gz" + sha256 "ad7c9cd044083745150a57649eb4ef9240348f054bed5a8f8aa5f1820c6384ec" + end + + resource "dvc-gs" do + url "https://files.pythonhosted.org/packages/99/4b/6303f29c76458a3c44da47b76cb5c230de545812fe3d58971b91ba8d02fa/dvc_gs-3.0.2.tar.gz" + sha256 "739693c0d8250a39074ba16c7dce752bb5a7ff934442d6081ffcfd7ed9313b9a" + end + + resource "dvc-hdfs" do + url "https://files.pythonhosted.org/packages/ea/b5/42a2a3b3897f6e7c0b77c1408ed27e472ffdf61c5a1fec91d396177da275/dvc-hdfs-3.0.0.tar.gz" + sha256 "286443cb2c107ad53e73d8d6c4af8524b6e3b6b88b1543c8bc0544738aeb9fee" + end + + resource "dvc-http" do + url "https://files.pythonhosted.org/packages/33/e6/4fb38ab911a9d90fbe2c7759c430814fe2253760304a9de0d3ebd6e27c20/dvc-http-2.32.0.tar.gz" + sha256 "f714f8435634aab943c625f659ddac1188c6ddaf3ff161b39715b83ff39637fc" + end + + resource "dvc-objects" do + url "https://files.pythonhosted.org/packages/23/d4/61678357b6ce0661249e6f09069859b5b1bcc4eeede6a869bab7cae2b546/dvc_objects-5.1.2.tar.gz" + sha256 "3d4ac3ece4addf280dd1e06bda58b3f7864eb877de42d1e1f94c501d89b31440" + end + + resource "dvc-oss" do + url "https://files.pythonhosted.org/packages/c2/32/08789c1aa80da525fd7bd0fbef4c11431aabf32cc9446e28a589daf9fa2e/dvc-oss-3.0.0.tar.gz" + sha256 "1047f734022fcd2b96d32b06bf6e0921cd0a65810f7fc1e9b0fac29a147b6a9a" + end + + resource "dvc-render" do + url "https://files.pythonhosted.org/packages/be/15/605312dbdc0931547987ee25a9a3f6fcabf48ca1436039abcd524156b8e2/dvc-render-1.0.2.tar.gz" + sha256 "40d1cd81760daf34b48fa8362b5002fcbe415e3cdbcf42369b6347d01497ffc0" + end + + resource "dvc-s3" do + url "https://files.pythonhosted.org/packages/24/72/44033cb2e85a7e68ac0bf8d96ece272f6818a28135678090fc8d03ef54b8/dvc_s3-3.2.2.tar.gz" + sha256 "0ea72c9b6b000dfea1a834d4106733b6cdc745d0a6ee1d5c0a5b8c8344671716" + end + + resource "dvc-ssh" do + url "https://files.pythonhosted.org/packages/17/a8/cbeb99c682425f2be8816825dc6159951b0bf2011b1f6aa46ac11d4b10f4/dvc_ssh-4.2.2.tar.gz" + sha256 "4fac932c5f22bd9444d87d4e7b3ffd6c09cc8e56d98eb3c6d4b44301d3535017" + end + + resource "dvc-studio-client" do + url "https://files.pythonhosted.org/packages/f4/52/f00bc978bfa313929221df1b6a1d82256b1c2727c55594dbbf9520f0adfd/dvc_studio_client-0.22.0.tar.gz" + sha256 "45d554a0386dd18bdfe17968e93f9b075563c888088b51bfa58713f64ed58ac8" + end + + resource "dvc-task" do + url "https://files.pythonhosted.org/packages/19/ef/da712c4d9c7d6cacac27d7b2779e6a97c3381ef2c963c33719d39113b6a3/dvc_task-0.40.2.tar.gz" + sha256 "909af541bf5fde83439da56c4c0ebac592af178a59b702708fadaacfd6e7b704" + end + + resource "dvc-webdav" do + url "https://files.pythonhosted.org/packages/56/20/7290e6bf073844970706db64109ab1fdad7038ff7a6df57dff3620170767/dvc-webdav-3.0.0.tar.gz" + sha256 "65e7eef2ebc83415a8ddbdcb579bf219a3797c67e7a62d4568c5c82de2b6a508" + end + + resource "dvc-webhdfs" do + url "https://files.pythonhosted.org/packages/36/f5/249f881b2e035d6c7362733986b5545fa8c88fed451972be5d0fedae5fab/dvc-webhdfs-3.1.0.tar.gz" + sha256 "6e894843d15ce766a05c616deda9d9bc361248e93bf9ea338b996e6e51ea0fea" + end + + resource "entrypoints" do + url "https://files.pythonhosted.org/packages/ea/8d/a7121ffe5f402dc015277d2d31eb82d2187334503a011c18f2e78ecbb9b2/entrypoints-0.4.tar.gz" + sha256 "b706eddaa9218a19ebcd67b56818f05bb27589b1ca9e8d797b74affad4ccacd4" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "flatten-dict" do + url "https://files.pythonhosted.org/packages/89/c6/5fe21639369f2ea609c964e20870b5c6c98a134ef12af848a7776ddbabe3/flatten-dict-0.4.2.tar.gz" + sha256 "506a96b6e6f805b81ae46a0f9f31290beb5fa79ded9d80dbe1b7fa236ab43076" + end + + resource "flufl-lock" do + url "https://files.pythonhosted.org/packages/90/78/80f98f67deb8ba9b67e00a91ceb1ded5a7b8eb2b7801b89625d3396fc9d4/flufl_lock-8.2.0.tar.gz" + sha256 "15b333c35fab1a36b223840057258aeb4cd79f0fbaf82c144f23cdf6cf14d5e3" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/24/7f/2747c0d332b9acfa75dc84447a066fdf812b5a6b8d30472b74d309bfe8cb/fsspec-2025.10.0.tar.gz" + sha256 "b6789427626f068f9a83ca4e8a3cc050850b6c0f71f99ddb4f542b8266a26a59" + end + + resource "funcy" do + url "https://files.pythonhosted.org/packages/70/b8/c6081521ff70afdff55cd9512b2220bbf4fa88804dae51d1b57b4b58ef32/funcy-2.0.tar.gz" + sha256 "3963315d59d41c6f30c04bc910e10ab50a3ac4a225868bfa96feed133df075cb" + end + + resource "gcsfs" do + url "https://files.pythonhosted.org/packages/27/62/e3131f4cb0e0a9b8d5a0586ba2cbef3a5ec05b5352d9bad50e1eb1417fed/gcsfs-2025.10.0.tar.gz" + sha256 "7ac9b16a145bcb1a69fa9cf770ccd3cee7b9a09236911dd586c1d9911b71583d" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/61/da/83d7043169ac2c8c7469f0e375610d78ae2160134bf1b80634c482fa079c/google_api_core-2.28.1.tar.gz" + sha256 "2b405df02d68e68ce0fbc138559e6036559e685159d148ae5861013dc201baf8" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/8e/5a/6f9b49d67ea91376305fdb8bbf2877c746d756e45fd8fb7d2e32d6dad19b/google_api_python_client-2.185.0.tar.gz" + sha256 "aa1b338e4bb0f141c2df26743f6b46b11f38705aacd775b61971cbc51da089c3" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/11/75/28881e9d7de9b3d61939bc9624bd8fa594eb787a00567aba87173c790f09/google_auth-2.42.0.tar.gz" + sha256 "9bbbeef3442586effb124d1ca032cfb8fb7acd8754ab79b55facd2b8f3ab2802" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "google-auth-oauthlib" do + url "https://files.pythonhosted.org/packages/fb/87/e10bf24f7bcffc1421b84d6f9c3377c30ec305d082cd737ddaa6d8f77f7c/google_auth_oauthlib-1.2.2.tar.gz" + sha256 "11046fb8d3348b296302dd939ace8af0a724042e8029c1b872d87fabc9f41684" + end + + resource "google-cloud-core" do + url "https://files.pythonhosted.org/packages/a6/03/ef0bc99d0e0faf4fdbe67ac445e18cdaa74824fd93cd069e7bb6548cb52d/google_cloud_core-2.5.0.tar.gz" + sha256 "7c1b7ef5c92311717bd05301aa1a91ffbc565673d3b0b4163a52d8413a186963" + end + + resource "google-cloud-storage" do + url "https://files.pythonhosted.org/packages/bd/ef/7cefdca67a6c8b3af0ec38612f9e78e5a9f6179dd91352772ae1a9849246/google_cloud_storage-3.4.1.tar.gz" + sha256 "6f041a297e23a4b485fad8c305a7a6e6831855c208bcbe74d00332a909f82268" + end + + resource "google-crc32c" do + url "https://files.pythonhosted.org/packages/19/ae/87802e6d9f9d69adfaedfcfd599266bf386a54d0be058b532d04c794f76d/google_crc32c-1.7.1.tar.gz" + sha256 "2bff2305f98846f3e825dbeec9ee406f89da7962accdb29356e4eadc251bd472" + end + + resource "google-resumable-media" do + url "https://files.pythonhosted.org/packages/58/5a/0efdc02665dca14e0837b62c8a1a93132c264bd02054a15abb2218afe0ae/google_resumable_media-2.7.2.tar.gz" + sha256 "5280aed4629f2b60b847b0d42f9857fd4935c11af266744df33d8074cae92fe0" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "grandalf" do + url "https://files.pythonhosted.org/packages/95/0e/4ac934b416857969f9135dec17ac80660634327e003a870835dd1f382659/grandalf-0.8.tar.gz" + sha256 "2813f7aab87f0d20f334a3162ccfbcbf085977134a17a5b516940a93a77ea974" + end + + resource "gto" do + url "https://files.pythonhosted.org/packages/8a/06/d2ec91a6c1e6b1a55c419e8599df7ac3430323a1bb1e5c01a1f83f8ecb64/gto-1.9.0.tar.gz" + sha256 "3beb5c652a98585ad083dbb6879a580ffe926271661d9b7a50e428cd591005ea" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "hydra-core" do + url "https://files.pythonhosted.org/packages/6d/8e/07e42bc434a847154083b315779b0a81d567154504624e181caf2c71cd98/hydra-core-1.3.2.tar.gz" + sha256 "8a878ed67216997c3e9d88a8e72e7b4767e81af37afb4ea3334b269a4390a824" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "iterative-telemetry" do + url "https://files.pythonhosted.org/packages/d2/b6/f17d6e80252b7be6ca4d9463db226ce7863d26287f16f1347e981cd2f3d8/iterative_telemetry-0.0.10.tar.gz" + sha256 "7fde6111de6fa4acf5a95a6190cc9cc5d17d835a815f0a18ece201f6031f4ed6" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" + sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" + end + + resource "knack" do + url "https://files.pythonhosted.org/packages/fd/e1/22a24a310799459b66a91709a95b4cb57da85326b73e04af97cdf3aae7a4/knack-0.13.0.tar.gz" + sha256 "dda35b4ff4c576b2501a18f0ec2f2fe0a3a5f9cce8265d4066d311e5ed4b5bc6" + end + + resource "kombu" do + url "https://files.pythonhosted.org/packages/0f/d3/5ff936d8319ac86b9c409f1501b07c426e6ad41966fedace9ef1b966e23f/kombu-5.5.4.tar.gz" + sha256 "886600168275ebeada93b888e831352fe578168342f0d1d5833d88ba0d847363" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/cf/0e/c857c46d653e104019a84f22d4494f2119b4fe9f896c92b4b864b3b045cc/msal-1.34.0.tar.gz" + sha256 "76ba83b716ea5a6d75b0279c0ac353a0e05b820ca1f6682c0eb7f45190c43c2f" + end + + resource "msal-extensions" do + url "https://files.pythonhosted.org/packages/01/99/5d239b6156eddf761a636bded1118414d161bd6b7b37a9335549ed159396/msal_extensions-1.3.1.tar.gz" + sha256 "c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "oauth2client" do + url "https://files.pythonhosted.org/packages/a6/7b/17244b1083e8e604bf154cf9b716aecd6388acd656dd01893d0d244c94d9/oauth2client-4.1.3.tar.gz" + sha256 "d486741e451287f69568a4d26d70d9acd73a2bbfa275746c535b4209891cccc6" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "omegaconf" do + url "https://files.pythonhosted.org/packages/09/48/6388f1bb9da707110532cb70ec4d2822858ddfb44f1cdf1233c20a80ea4b/omegaconf-2.3.0.tar.gz" + sha256 "d5d4b6d29955cc50ad50c46dc269bcd92c6e00f5f90d23ab5fee7bfca4ba4cc7" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/c6/fe/ed708782d6709cc60eb4c2d8a361a440661f74134675c72990f2c48c785f/orjson-3.11.4.tar.gz" + sha256 "39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d" + end + + resource "oss2" do + url "https://files.pythonhosted.org/packages/d5/63/b6c355af7f04a8a1d5759fa6fc47539e25ef8e6f2745372a242fdadcac65/oss2-2.18.4.tar.gz" + sha256 "be1e7a871a8cc267726367333017d78333ee8fae88c727ad61396f59c1c0e4d0" + end + + resource "ossfs" do + url "https://files.pythonhosted.org/packages/b1/8a/d0ca844e613d0b8d4b80f8098528a599f2fbf05c3853a75d27d3e645928e/ossfs-2025.5.0.tar.gz" + sha256 "722e7044fbcd84cc992e5cd6821d5f19bed334216c140d6e46ffb21979d49ce0" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pyarrow" do + url "https://files.pythonhosted.org/packages/ef/c2/ea068b8f00905c06329a3dfcd40d0fcc2b7d0f2e355bdb25b65e0a0e4cd4/pyarrow-21.0.0.tar.gz" + sha256 "5051f2dccf0e283ff56335760cbc8622cf52264d67e359d5569541ac11b6d5bc" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pydot" do + url "https://files.pythonhosted.org/packages/50/35/b17cb89ff865484c6a20ef46bf9d95a5f07328292578de0b295f4a6beec2/pydot-4.0.1.tar.gz" + sha256 "c2148f681c4a33e08bf0e26a9e5f8e4099a82e0e2a068098f32ce86577364ad5" + end + + resource "pydrive2" do + url "https://files.pythonhosted.org/packages/3f/dc/92b0beba58f09441219bb6720bebdb895317632db4778cfe1d21532d27e5/pydrive2-1.21.3.tar.gz" + sha256 "649b84d60c637bc7146485039535aa8f1254ad156423739f07e5d32507447c13" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pygtrie" do + url "https://files.pythonhosted.org/packages/b9/13/55deec25bf09383216fa7f1dfcdbfca40a04aa00b6d15a5cbf25af8fce5f/pygtrie-2.5.0.tar.gz" + sha256 "203514ad826eb403dab1d2e2ddd034e0d1534bbe4dbe0213bb0593f66beba4e2" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/5d/70/ff56a63248562e77c0c8ee4aefc3224258f1856977e0c1472672b62dadb8/pyopenssl-24.2.1.tar.gz" + sha256 "4247f0dbe3748d560dcbb2ff3ea01af0f9a1a001ef5f7c4c647956ed8cbf0e95" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "s3fs" do + url "https://files.pythonhosted.org/packages/bb/ee/7cf7de3b17ef6db10b027cc9f8a1108ceb6333e267943e666a35882b1474/s3fs-2025.10.0.tar.gz" + sha256 "e8be6cddc77aceea1681ece0f472c3a7f8ef71a0d2acddb1cc92bb6afa3e9e4f" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "scmrepo" do + url "https://files.pythonhosted.org/packages/bd/a7/d9e2dfad90dd9ce3429156a100684ef61e8444e98164726d52bd3ed77ce0/scmrepo-3.5.2.tar.gz" + sha256 "c951d98cd36aead02a69a75926455a163d435c6f996c76b92be5f0c717551f28" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "shortuuid" do + url "https://files.pythonhosted.org/packages/8c/e2/bcf761f3bff95856203f9559baf3741c416071dd200c0fc19fad7f078f86/shortuuid-1.0.13.tar.gz" + sha256 "3bb9cf07f606260584b1df46399c0b87dd84773e7b25912b7e391e30797c5e72" + end + + resource "shtab" do + url "https://files.pythonhosted.org/packages/5a/3e/837067b970c1d2ffa936c72f384a63fdec4e186b74da781e921354a94024/shtab-1.7.2.tar.gz" + sha256 "8c16673ade76a2d42417f03e57acf239bfb5968e842204c17990cae357d07d6f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sqltrie" do + url "https://files.pythonhosted.org/packages/8a/e6/f3832264bcd98b9e71c93c579ab6b39eb1db659cab305e59f8f7c1adc777/sqltrie-0.11.2.tar.gz" + sha256 "4df47089b3abfe347bcf81044e633b8c7737ebda4ce1fec8b636a85954ac36da" + end + + resource "sshfs" do + url "https://files.pythonhosted.org/packages/0b/69/779594b8efea639d798d4abac0fdfe0b604d3a3a7d789c9cbb6e24d15282/sshfs-2025.10.0.tar.gz" + sha256 "3884fb4370222fa868133b0c621fe7be226c9d8aaf801dec517674a8156c2af1" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "vine" do + url "https://files.pythonhosted.org/packages/bd/e4/d07b5f29d283596b9727dd5275ccbceb63c44a1a82aa9e4bfd20426762ac/vine-5.1.0.tar.gz" + sha256 "8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0" + end + + resource "voluptuous" do + url "https://files.pythonhosted.org/packages/91/af/a54ce0fb6f1d867e0b9f0efe5f082a691f51ccf705188fca67a3ecefd7f4/voluptuous-0.15.2.tar.gz" + sha256 "6ffcab32c4d3230b4d2af3a577c87e1908a714a11f6f95570456b1849b0279aa" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "webdav4" do + url "https://files.pythonhosted.org/packages/08/3d/d604f9d5195689e578f124f196a5d7e80f3106c8404f5c19b2181691de19/webdav4-0.10.0.tar.gz" + sha256 "387da6f0ee384e77149dddd9bcfd434afa155882f6c440a529a7cb458624407f" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "zc-lockfile" do + url "https://files.pythonhosted.org/packages/10/9a/2fef89272d98b799e4daa50201c5582ec76bdd4e92a1a7e3deb74c52b7fa/zc_lockfile-4.0.tar.gz" + sha256 "d3ab0f53974296a806db3219b9191ba0e6d5cbbd1daa2e0d17208cb9b29d2102" + end + + def install + # dvc-hdfs uses fsspec.implementations.arrow.HadoopFileSystem which is + # a wrapper on top of pyarrow.fs.HadoopFileSystem. + ENV["PYARROW_WITH_HDFS"] = "1" + + # NOTE: dvc uses this file [1] to know which package it was installed from, + # so that it is able to provide appropriate instructions for updates. + # [1] https://github.com/iterative/dvc/blob/3.0.0/scripts/build.py#L23 + File.write("dvc/_build.py", "PKG = \"brew\"") + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"dvc", "completion", "-s", shells: [:bash, :zsh]) + end + + test do + output = shell_output("#{bin}/dvc doctor 2>&1") + assert_match "gdrive", output + assert_match "gs", output + assert_match "http", output + assert_match "https", output + assert_match "oss", output + assert_match "s3", output + assert_match "ssh", output + assert_match "webdav", output + assert_match "webdavs", output + assert_match "webhdfs", output + end +end diff --git a/Formula/d/dvd+rw-tools.rb b/Formula/d/dvd+rw-tools.rb new file mode 100644 index 0000000000000..047a96b7dcde5 --- /dev/null +++ b/Formula/d/dvd+rw-tools.rb @@ -0,0 +1,83 @@ +class DvdxrwTools < Formula + desc "DVD+-RW/R tools" + # Original URL no longer accessible: https://fy.chalmers.se/~appro/linux/DVD+RW/ + homepage "https://en.wikipedia.org/wiki/Dvd+rw-tools" + url "https://deb.debian.org/debian/pool/main/d/dvd+rw-tools/dvd+rw-tools_7.1.orig.tar.gz" + mirror "https://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.1.tar.gz" + sha256 "f8d60f822e914128bcbc5f64fbe3ed131cbff9045dca7e12c5b77b26edde72ca" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8daeeb4d38982c4948e79c9ec20f0e600cbd0c6c55d56bb4f0b14c617e8600e8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef7c367570d1a514f8c5ee0c9a7b9e758dcd12a6ae8ece7fddc835f39ad9b319" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da895c2f501018863f2db497206573a37ef717337e9f5c2dba6a5863bc989d77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "031b8533eeb4ec71ab6f3e2b68826271b0c5ff3e97e0dddaebab9a721b43df53" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b2cbe68ebfc5a48e4936264261fc269c7c4edf4e0c213dc817d962dcf97a1d86" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "11ec6e949911cca76b2c3a940e362aff334523a7018dfd3bdcd232acb7b741d1" + sha256 cellar: :any_skip_relocation, sonoma: "ed0da0bd1a96d04a12f9c9f28cedfb9e10d1f1ed09e8e6dbad8d417dddef6e07" + sha256 cellar: :any_skip_relocation, ventura: "f87fed662aa38e3ae76443247e6f0db628a70c4dac97e1ef15e036728af4ffb2" + sha256 cellar: :any_skip_relocation, monterey: "666563b942edaf7487b15e886264df5dab1cf5a64638ff47dd5f69804a44368d" + sha256 cellar: :any_skip_relocation, big_sur: "c3d9ab88096123bd36acbad9f27cc21c07fd881f00ac45b49605f18de03262b1" + sha256 cellar: :any_skip_relocation, catalina: "18c7e40586199af43cad7bfc604c0e01c90e095a387b425a4e4b74a453423ffe" + sha256 cellar: :any_skip_relocation, arm64_linux: "7acc04dbb06fd517b729b4ae9b103c1be311d5065b4fac1b6e955704214dbcd0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d491eb26d5db91ea03ea2403ae8866675d268a4d9962a4dc9cb4bdb0aedecb47" + end + + uses_from_macos "m4" => :build + + # Apply Fedora patch for missing header on Linux + patch do + on_linux do + url "https://src.fedoraproject.org/rpms/dvd+rw-tools/raw/938529cda09efcc2f79478be1632648adc3537af/f/dvd+rw-tools-7.1-sysmacro-inc.patch" + sha256 "28a69bb73c5d819cb445add766e1d68134dc0ec26fe83cc87164ec4853c9541d" + end + end + + # Respect $prefix on macOS. + # Fix build failure because of missing #include on Linux. + # Patch submitted to author by email. + patch :DATA + + def install + ENV.append "CXXFLAGS", "-Wno-reserved-user-defined-literal" if DevelopmentTools.clang_build_version >= 1700 + bin.mkpath + man1.mkpath + system "make", "prefix=#{prefix}", "install" + end +end + +__END__ +diff --git a/Makefile.m4 b/Makefile.m4 +index a6a100b..03fc245 100644 +--- a/Makefile.m4 ++++ b/Makefile.m4 +@@ -27,11 +27,13 @@ CXXFLAGS+=$(WARN) -D__unix -O2 -fno-exceptions + LDLIBS =-framework CoreFoundation -framework IOKit + LINK.o =$(LINK.cc) + ++prefix?=/usr ++ + # to install set-root-uid, `make BIN_MODE=04755 install'... + BIN_MODE?=0755 + install: dvd+rw-tools +- install -o root -m $(BIN_MODE) $(CHAIN) /usr/bin +- install -o root -m 0644 growisofs.1 /usr/share/man/man1 ++ install -m $(BIN_MODE) $(CHAIN) $(prefix)/bin ++ install -m 0644 growisofs.1 $(prefix)/share/man/man1 + ]) + + ifelse(OS,MINGW32,[ +diff --git a/transport.hxx b/transport.hxx +index 35a57a7..467ce50 100644 +--- a/transport.hxx ++++ b/transport.hxx +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + inline long getmsecs() + { struct timeval tv; diff --git a/Formula/d/dvd-vr.rb b/Formula/d/dvd-vr.rb new file mode 100644 index 0000000000000..af2c9a609ecf1 --- /dev/null +++ b/Formula/d/dvd-vr.rb @@ -0,0 +1,38 @@ +class DvdVr < Formula + desc "Utility to identify and extract recordings from DVD-VR files" + homepage "https://www.pixelbeat.org/programs/dvd-vr/" + url "https://www.pixelbeat.org/programs/dvd-vr/dvd-vr-0.9.7.tar.gz" + sha256 "19d085669aa59409e8862571c29e5635b6b6d3badf8a05886a3e0336546c938f" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?dvd-vr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c866d88cd9c2d24675c6adb25ea1b78fc4139e15d46ce14e652e1302c99137f9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ec179b825a5afc971de1205ec65943227d9c09257a16558a068bc47c024887d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "553619321e617365b7e1a3f3dbb678840ac7824eb6424b5dc484ee75b8512639" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f134891dbbb4f74aa606a2f560ae6992764387c39e8d92977828d1983f04e575" + sha256 cellar: :any_skip_relocation, arm64_monterey: "09d9566df3e194af10ca708f99f20d0d7ca0f2d14dae84c797508c443cd5fb8e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "34cfb579dcddb0ded88010dea55a3b5bb4d78628ab6c0bc0e7f70d93882b2156" + sha256 cellar: :any_skip_relocation, sonoma: "3062abb991148622f0b45f7ee8e7aab766c9ad95c1c83420a201a72c335f7f59" + sha256 cellar: :any_skip_relocation, ventura: "fd4bf8df87ae39182a966d3f85daa450777ad8e1f2a247a64309a0045246a244" + sha256 cellar: :any_skip_relocation, monterey: "8374a6b1aee80538c9b31d48edb0065deb63fb3bfdcea4e62b206818cbb7f181" + sha256 cellar: :any_skip_relocation, big_sur: "4c1ab9eca5fcff27e5aa6185a9b908c1c4c0569ceede8ef574d8365da6f1d914" + sha256 cellar: :any_skip_relocation, catalina: "bd9d4471e3e4832bbfcc4ddf0fa34f32bfe0fc6efea5ec17414157cc060a141d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d552a1d306c8a6f7ba249914385d89c1294e0b54b2aa5aced30e72504396b03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64fbe6463814cb9fa4e34863bebe256e8973abeb1241f299173ae409c00da770" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"dvd-vr", "--version" + end +end diff --git a/Formula/d/dvdauthor.rb b/Formula/d/dvdauthor.rb new file mode 100644 index 0000000000000..e3869792202b8 --- /dev/null +++ b/Formula/d/dvdauthor.rb @@ -0,0 +1,53 @@ +class Dvdauthor < Formula + desc "DVD-authoring toolset" + homepage "https://dvdauthor.sourceforge.net/" + url "https://downloads.sourceforge.net/project/dvdauthor/dvdauthor-0.7.2.tar.gz" + sha256 "3020a92de9f78eb36f48b6f22d5a001c47107826634a785a62dfcd080f612eb7" + license "GPL-2.0-or-later" + revision 3 + + livecheck do + url :stable + regex(%r{url=.*?/dvdauthor[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "81066310aac866a1cb62efa9a7dca20d521319ba30657b7a60ec5ed1a45ee26c" + sha256 cellar: :any, arm64_sequoia: "527ecacf46ecfaa771b7d5cb556e7d0002e331a79edad4250743c096babdc2f6" + sha256 cellar: :any, arm64_sonoma: "a0b32d9b7bac066918dbbe7aa04bd718751317bc6284c3d7d87fcf77051deb46" + sha256 cellar: :any, arm64_ventura: "03d576e3150005a3c6524683afa2d234ac698fc9da7645645f43afb42ffac95a" + sha256 cellar: :any, arm64_monterey: "0db62ec5affa472a427aecab0add45800f986518df8aba5026e01aff8fbee17e" + sha256 cellar: :any, arm64_big_sur: "962690a3bb6779862c3a13bda8e005928743d76106dd5b39e35b22040697b5b3" + sha256 cellar: :any, sonoma: "65714959940c5a13478460f504f45762703fd2cc8db02168cd0b32a48218882b" + sha256 cellar: :any, ventura: "c911f60dfbc5f55a1492229d1d0ba2c5d93f10724a517dceb36e49397faa604d" + sha256 cellar: :any, monterey: "7b32bfedcf0a84223d860c886930d507a26006e6f79646fe0746ec681f4228fa" + sha256 cellar: :any, big_sur: "0522363b372b042bb8a672ee3d245b8f0551f8dec40bdf791b4c6eb787e810aa" + sha256 cellar: :any, catalina: "d79a1513ecb8ba4433fd4a368aaec314416c3ca8c4ab8fcabac6ed1f523e0b14" + sha256 cellar: :any_skip_relocation, arm64_linux: "be433be51e3fb32144acd38f8e6b623b41ae24f4fe2320eb29b8387fbb875213" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7837acd0fce47d23873d6b1f1df3ba1dd75985a60e0b5c33778435eeb3094c08" + end + + # Dvdauthor will optionally detect ImageMagick or GraphicsMagick, too. + # But we don't add either as deps because they are big. + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "libdvdread" + depends_on "libpng" + + uses_from_macos "libxml2" + + def install + system "./configure", "--mandir=#{man}", *std_configure_args + system "make" + ENV.deparallelize # Install isn't parallel-safe + system "make", "install" + end + + test do + assert_match "VOBFILE", shell_output("#{bin}/dvdauthor --help 2>&1", 1) + end +end diff --git a/Formula/d/dvdbackup.rb b/Formula/d/dvdbackup.rb new file mode 100644 index 0000000000000..e757bfc19739a --- /dev/null +++ b/Formula/d/dvdbackup.rb @@ -0,0 +1,45 @@ +class Dvdbackup < Formula + desc "Rip DVD's from the command-line" + homepage "https://dvdbackup.sourceforge.net/" + url "https://downloads.sourceforge.net/project/dvdbackup/dvdbackup/dvdbackup-0.4.2/dvdbackup-0.4.2.tar.gz" + sha256 "0a37c31cc6f2d3c146ec57064bda8a06cf5f2ec90455366cb250506bab964550" + license "GPL-3.0-or-later" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "208d77cbe6a64a85548098e3fddf37053ad567406e1745b238fa40ca3a33915f" + sha256 cellar: :any, arm64_sequoia: "5689e478b50f13da8f0b4c4176281df944c3c8a095344e7f3fd6b2073cb7f937" + sha256 cellar: :any, arm64_sonoma: "bbca14aeee4082533a71f5e48ed2bc6e56ea02420179dfb09e11242e92f2fbe2" + sha256 cellar: :any, arm64_ventura: "e009a34c9e7cc319095b3a001b99aa8da5fecb6662ff4fa64daa75b932dbe79b" + sha256 cellar: :any, arm64_monterey: "dd5094eec306b3cdc1e0592937f3a9c98872d703d53865575e30c4bbf7c25274" + sha256 cellar: :any, arm64_big_sur: "9915a81fafc6436fbc35d0cdde179fa65775b438f296e21397c3c416a900889b" + sha256 cellar: :any, sonoma: "57aff8713d26d9f9a88607b2e199e061cfb510cf9134293926321e36dbcd17d6" + sha256 cellar: :any, ventura: "31fe3266f27694ca57994af74493450a960ceda2be728926332264c83df27d06" + sha256 cellar: :any, monterey: "fc938674adb52e95181053700eda2db94b4cbd2ff070391201ce3cf5bbd61496" + sha256 cellar: :any, big_sur: "dc6778d0bf6be00d5b9abfe877b0893b37ac2a36ca3395155658572b8b050750" + sha256 cellar: :any, catalina: "f90daeedafee023dd908051af528be81f629f30026ec109f89e2bb187582d75b" + sha256 arm64_linux: "5af918de56b0b8c777cb521bb6b1a086fab9c7a84a75896d4e985933a92ed32d" + sha256 x86_64_linux: "c88b2286a17892633aef4e5fae8065e813ac1bf0bf14a63e0be2566bca388d4b" + end + + depends_on "libdvdread" + + # Fix compatibility with libdvdread 6.1.0. See: + # https://bugs.launchpad.net/dvdbackup/+bug/1869226 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dvdbackup/compat.patch" + sha256 "12d54bc08b0eb2acf6429c256373d1d98ba3f6f14821c2bebbbb571eb7b9d82b" + end + + def install + system "./configure", "--mandir=#{man}", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"dvdbackup", "--version" + end +end diff --git a/Formula/d/dvdrtools.rb b/Formula/d/dvdrtools.rb new file mode 100644 index 0000000000000..10175f0266f58 --- /dev/null +++ b/Formula/d/dvdrtools.rb @@ -0,0 +1,65 @@ +class Dvdrtools < Formula + desc "Fork of cdrtools DVD writer support" + homepage "https://savannah.nongnu.org/projects/dvdrtools/" + url "https://savannah.nongnu.org/download/dvdrtools/dvdrtools-0.2.1.tar.gz" + sha256 "053d0f277f69b183f9c8e8c8b09b94d5bb4a1de6d9b122c0e6c00cc6593dfb46" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/dvdrtools/" + regex(/href=.*?dvdrtools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9ce7dd044c0b813f15a0a53332e50bd2f4b85fca18f7bb9951796f061abdb24" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57b79ee1791a3cbd816e11cbb178cf961f4fc0b5b71324233ea6c68a6c420db1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b059fb5d92689dbdd1330d2a600a5255de0ce01f24e6e911e548a92494897ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d41b802f7e601c727aab83ab6fa63b70303c717fa4709059c4b653b599b5f248" + sha256 cellar: :any_skip_relocation, arm64_monterey: "587872ae7f087b62cf2b227faeb303bffdc9365794bf60daf8f071c2039869f1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7b93d029d54fa99b94010b18776bdf36c889e81e8f169f8745f319b7b7b6f9f0" + sha256 cellar: :any_skip_relocation, sonoma: "de8feee693d3923d18cc2e532afd15cb99b0886abfd790e948f67da4e88d612f" + sha256 cellar: :any_skip_relocation, ventura: "bcc5fd8f00fad05c8027a1f151a39da5cf3e3a57ed84c8753834202ffd903797" + sha256 cellar: :any_skip_relocation, monterey: "63a9ae5cc3cf6c54d7d7302dab688c4cd560ce69d30eceaf0de09d7f5da53d7b" + sha256 cellar: :any_skip_relocation, big_sur: "c969433ed859dab8f0551c6eab562a4cc272b063f333e0208081ea3b5940c76b" + sha256 cellar: :any_skip_relocation, catalina: "40f565db4f098c70bed700dc88edd45951e58a7f7c64583d52db81afcdbde704" + sha256 cellar: :any_skip_relocation, arm64_linux: "8049f79b1ed1c0d2a581343623b60d621797365f0fdfec5f5b5e12ba1ea37650" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0ded8f875ea08da1c4ac07675a925b475414f03e03071b6e4445ec690494d88" + end + + conflicts_with "cdrtools", + because: "both cdrtools and dvdrtools install binaries by the same name" + + # Below three patches via MacPorts. + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dvdrtools/patch-cdda2wav-cdda2wav.c" + sha256 "f792a26af38f63ee1220455da8dba2afc31296136a97c11476d8e3abe94a4a94" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dvdrtools/patch-cdrecord-cdrecord.c" + sha256 "c7f182ce154785e19235f30d22d3cf56e60f6c9c8cc953a9d16b58205e29a039" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/dvdrtools/patch-scsi-mac-iokit.c" + sha256 "f31253e021a70cc49e026eed81c5a49166a59cb8da1a7f0695fa2f26c7a3d98f" + end + + def install + # Fix compile with newer Clang + if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-implicit-function-declaration -Wno-int-conversion" + end + + ENV["LIBS"] = "-framework IOKit -framework CoreFoundation" if OS.mac? + + args = ["--mandir=#{man}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/d/dvisvgm.rb b/Formula/d/dvisvgm.rb new file mode 100644 index 0000000000000..7dc0b5dc2badd --- /dev/null +++ b/Formula/d/dvisvgm.rb @@ -0,0 +1,54 @@ +class Dvisvgm < Formula + desc "Fast DVI to SVG converter" + homepage "https://dvisvgm.de" + url "https://github.com/mgieseki/dvisvgm/releases/download/3.5/dvisvgm-3.5.tar.gz" + sha256 "41ea2e10fe6bdc4ce7672519cfc2998e5c30c8b29fbcd8901915c7dac7fa494c" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "844adad2e4ce15cc7cdc8053fc7641b39153817e48cb5fa54a86e1c4d846d8c9" + sha256 cellar: :any, arm64_sequoia: "49dfadfd667f69439a9c75f2baae68145c7c9b3a40d3c9b93e89bea725a45126" + sha256 cellar: :any, arm64_sonoma: "b7e44c20d83be91e3a1637c6f5ed71799974d4c8aa90d0aead5b26181b7cec47" + sha256 cellar: :any, arm64_ventura: "15665722543df62fb0e593000e78a16c63c2c26f0bc0256f7e31e2b29857e65c" + sha256 cellar: :any, sonoma: "f59943aa1aed3a13091ba46e2d6de274e591326c5f5e2f70e0dfef05a278de7f" + sha256 cellar: :any, ventura: "e0891fceaacc7fe276d342d700bab6286a1fe1e42298a81bb7c6598402317a3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b07268ed1e2105fce670746a418acb7604832f963b123acad04f7faae5ffc181" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc45ab10466cf813d4034db865df7d2dcdcb4ec079edcc5b19f21dd478390d69" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "brotli" + depends_on "freetype" + depends_on "ghostscript" + depends_on "potrace" + depends_on "texlive" + depends_on "woff2" + + uses_from_macos "zlib" + + def install + args = [ + "--disable-silent-rules", + "--with-texlive=#{Formula["texlive"].opt_prefix}", + ] + args << "--with-zlib=#{Formula["zlib"].opt_prefix}" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + pkgshare.install "tests/data/sample.dvi" + end + + test do + assert_match version.to_s, shell_output("#{bin}/dvisvgm --version") + + # Convert DVI to SVG + system bin/"dvisvgm", "--no-fonts", pkgshare/"sample.dvi" + assert_match "This file was generated by dvisvgm #{version}", (testpath/"sample.svg").read + end +end diff --git a/Formula/d/dvm.rb b/Formula/d/dvm.rb new file mode 100644 index 0000000000000..d6f09bb25ade3 --- /dev/null +++ b/Formula/d/dvm.rb @@ -0,0 +1,49 @@ +class Dvm < Formula + desc "Docker Version Manager" + homepage "https://github.com/howtowhale/dvm" + url "https://github.com/howtowhale/dvm/archive/refs/tags/1.0.3.tar.gz" + sha256 "148c2c48a17435ebcfff17476528522ec39c3f7a5be5866e723c245e0eb21098" + license "Apache-2.0" + head "https://github.com/howtowhale/dvm.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "56c21e2d208ab2c2c030678a272eca714942866e214155e012863c06f103f4bd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10b8afedcce7c95c0d246413aa284e6d7ace1171365c4ccb69998e7a42142d11" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06639c9a34e778933bae9918ec1eb9c3dfea72d1b5556e086b6ba5fa1b1938a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93c9c5d7862ccb6954d87aa1a467cfcde32355801dea1cb09a216488b7ba4e1a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2a5182fb125b4cb85e293513b2ffa19220070ddaf4a17a1369c709350b7b5332" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e0e87324c91248c78c8bdb3fdd8be65a852b12e3df6fc14be1fa972e0e2d24b4" + sha256 cellar: :any_skip_relocation, sonoma: "2b579fe462f7232f1e6dd1f44553941b670b6cd82c8a35e23d573df48d5e057c" + sha256 cellar: :any_skip_relocation, ventura: "6e8fc7a1bc70906f11ce1e4db939b9a5155c1ca4f285cc3a880426e448ada12b" + sha256 cellar: :any_skip_relocation, monterey: "784f7bf4ae96b861351f4bd3d51f70b81fe820d0924f1966fa1a73a1b2bbf755" + sha256 cellar: :any_skip_relocation, big_sur: "bbf9a8f217c5913219d2495990c893bfd0fd9e6b0e14664899d4f9f21deafafc" + sha256 cellar: :any_skip_relocation, catalina: "05b7b3c003c71860b6dfcf4189f1169ac6da67f464c7c7f25ae1230031701acb" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf480158f41f547119ac4e6ed7e1c4cc169d8604bbc0da1f80eacca874a08838" + sha256 cellar: :any_skip_relocation, x86_64_linux: "675af6c08670c77e16010b4b2a3de3828ffc22dcaa832c5db013b4209cd0617a" + end + + depends_on "go" => :build + + def install + system "make", "VERSION=#{version}", "UPGRADE_DISABLED=true" + prefix.install "dvm.sh" + bash_completion.install "bash_completion" => "dvm" + (prefix/"dvm-helper").install "dvm-helper/dvm-helper" + end + + def caveats + <<~EOS + dvm is a shell function, and must be sourced before it can be used. + Add the following command to your bash profile: + [ -f #{opt_prefix}/dvm.sh ] && . #{opt_prefix}/dvm.sh + EOS + end + + test do + output = shell_output("bash -c 'source #{prefix}/dvm.sh && dvm --version'") + assert_match "Docker Version Manager version #{version}", output + end +end diff --git a/Formula/d/dvorak7min.rb b/Formula/d/dvorak7min.rb new file mode 100644 index 0000000000000..ee57c4b95ce3f --- /dev/null +++ b/Formula/d/dvorak7min.rb @@ -0,0 +1,45 @@ +class Dvorak7min < Formula + desc "Dvorak (simplified keyboard layout) typing tutor" + homepage "https://web.archive.org/web/dvorak7min.sourcearchive.com/" + url "https://deb.debian.org/debian/pool/main/d/dvorak7min/dvorak7min_1.6.1+repack.orig.tar.gz" + version "1.6.1" + sha256 "4cdef8e4c8c74c28dacd185d1062bfa752a58447772627aded9ac0c87a3b8797" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3a4344484d832af72a35d2759a70018fce691d9269a6c4161a7da74bae7fea0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1bf4bd048107bae98d33859486f996dcf0a7cf7a9053414c243d060960c3938" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f581243f32da61dd063a2ef9c4e8c2297b4bd556f7905d4a520009a8bf865b73" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f38e077e0ee68158e8b287d8bf9b679378cfb03a496afd2049f9b36e840ba2c8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "eb028aa9707f685095023a20694b713e9adaa2f4ade7adc95b483f54d2775a6e" + sha256 cellar: :any_skip_relocation, sonoma: "3615a35945e18782b7bef5fd0a677ac3a667a216472dba858a3ee559db63fa3c" + sha256 cellar: :any_skip_relocation, ventura: "b4eeacfb1b35f5498fb7f77da6b513109a87a54d686a62a6c221a08aab9a8178" + sha256 cellar: :any_skip_relocation, monterey: "cbf598fe212330ed130813b5a7ac1be0f31ea98b7aa3e12559371bdc35217356" + sha256 cellar: :any_skip_relocation, big_sur: "1e42924b5dd8704ca4fa6d70b7c966c3956268ebf78ef5fc2022fdee3c1ed82b" + sha256 cellar: :any_skip_relocation, catalina: "b8f692d9254375715d1f85af32ce5b7487802597818f2bb969b3cac109d3012a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3db52bd009b55ad53eb6c23914b8b39d9bc098cc48cc6d175d57da6806db717" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88198e60fed089e8dcc4c8bb9fb955428cecd480578fd1a339e177b1c1e748df" + end + + # source is a copy from debian + deprecate! date: "2024-05-04", because: :repo_removed + disable! date: "2025-05-05", because: :repo_removed + + uses_from_macos "ncurses" + + # Apply Debian patch to fix build + patch do + on_linux do + url "https://salsa.debian.org/debian/dvorak7min/-/raw/56019daffd5c0628ef5b8ae200a69ba43263d7d6/debian/patches/debian-changes.patch" + sha256 "05303478d7006e376325db9d3ea00551acb0e6113e0d7e436f96df8d6f339e2e" + end + end + + def install + # Remove pre-built ELF binary first + system "make", "clean" + system "make" + system "make", "INSTALL=#{bin}", "install" + end +end diff --git a/Formula/d/dvr-scan.rb b/Formula/d/dvr-scan.rb new file mode 100644 index 0000000000000..d180277ac2a6b --- /dev/null +++ b/Formula/d/dvr-scan.rb @@ -0,0 +1,95 @@ +class DvrScan < Formula + include Language::Python::Virtualenv + + desc "Extract scenes with motion from videos" + homepage "https://www.dvr-scan.com/" + url "https://files.pythonhosted.org/packages/8c/9e/b4772f3c942a00a1ea7cce8055958e503292d314bff51feda1429a271f7a/dvr_scan-1.7.tar.gz" + version "1.7.0.1" + sha256 "f7036f8e679cd14bb61417266b1f8cff4f365a00227bff3d6ed75200f33e5c53" + license "BSD-2-Clause" + revision 3 + head "https://github.com/Breakthrough/DVR-Scan.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e210a397dde0c60afe0ee0704a1852cb54eaaec8f553976e02fa06b8819f554" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "04f98810241dd317c2cb88282a9365cb1154655b4f305ecffaffc28b3a77c59e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfc11e4b50e9e33fcd0a662600a5e5e7dc74b30299b0223dd8f3fc6c7c09c840" + sha256 cellar: :any_skip_relocation, sonoma: "c98c651cc27bec9c513815e64d3778a2a0f50e59bdfd73f70aa0628bde41a8b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ec6338f1139b8ccda025f75825630660324af33254d466dce066ce2465a321d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6ad7f441999cc36e830493ec9f8b41d1384275df7de6881f1a6f949d27e1363" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "numpy" + depends_on "opencv" + depends_on "python@3.14" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1699 + end + + pypi_packages exclude_packages: "numpy", + extra_packages: "pyobjc-framework-cocoa" + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/4d/ab/4e980fbfbc894f95854aabff68a029dd6044a9550c480a1049a65263c72b/cython-3.1.5.tar.gz" + sha256 "7e73c7e6da755a8dffb9e0e5c4398e364e37671778624188444f1ff0d9458112" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/ab/dc/6d63019133e39e2b299dfbab786e64997fff0f145c45a417e1dd51faaf3f/pyobjc_core-12.0.tar.gz" + sha256 "7e05c805a776149a937b61b892a0459895d32d9002bedc95ce2be31ef1e37a29" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/37/6f/89837da349fe7de6476c426f118096b147de923139556d98af1832c64b97/pyobjc_framework_cocoa-12.0.tar.gz" + sha256 "02d69305b698015a20fcc8e1296e1528e413d8cf9fdcd590478d359386d76e8a" + end + + resource "scenedetect" do + url "https://files.pythonhosted.org/packages/f0/b4/e77e1812ae89bc4864ff54efb6a8232eabebd471e372096cb711f03cca52/scenedetect-0.6.7.1.tar.gz" + sha256 "07833b0cb83a0106786a88136462580e9865e097f411f01501a688714c483a4e" + end + + resource "screeninfo" do + url "https://files.pythonhosted.org/packages/ec/bb/e69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27/screeninfo-0.8.1.tar.gz" + sha256 "9983076bcc7e34402a1a9e4d7dabf3729411fd2abb3f3b4be7eba73519cd2ed1" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + def install + # Help `pyobjc-framework-cocoa` pick correct SDK after removing -isysroot from Python formula + ENV.append_to_cflags "-isysroot #{MacOS.sdk_path}" if OS.mac? + # pyobjc-core uses "-fdisable-block-signature-string" introduced in clang 17 + ENV.llvm_clang if DevelopmentTools.clang_build_version <= 1699 + + without = %w[pyobjc-core pyobjc-framework-cocoa] unless OS.mac? + virtualenv_install_with_resources without: + end + + test do + resource "sample-vid" do + url "https://download.samplelib.com/mp4/sample-5s.mp4" + sha256 "05bd857af7f70bf51b6aac1144046973bf3325c9101a554bc27dc9607dbbd8f5" + end + resource("sample-vid").stage do + assert_match "Detected 1 motion event", shell_output("#{bin}/dvr-scan -i sample-5s.mp4 2>&1") + end + end +end diff --git a/Formula/d/dwarf.rb b/Formula/d/dwarf.rb new file mode 100644 index 0000000000000..21e41c0a8c0f5 --- /dev/null +++ b/Formula/d/dwarf.rb @@ -0,0 +1,68 @@ +class Dwarf < Formula + desc "Object file manipulation tool" + homepage "https://github.com/elboza/dwarf-ng/" + url "https://github.com/elboza/dwarf-ng/archive/refs/tags/dwarf-0.4.0.tar.gz" + sha256 "a64656f53ded5166041ae25cc4b1ad9ab5046a5c4d4c05b727447e73c0d83da0" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "54cf031b663cb175ebbdb2d6a9015afe24864ea2e46b531a67b6097e648ab636" + sha256 cellar: :any, arm64_sequoia: "18e5a2ac12431c5fd538a6c1101b53b8fb2c45652d0c6c9c84b30c36534293e9" + sha256 cellar: :any, arm64_sonoma: "2178e68ea91b6f9482ba9370ff84700d32689188cdcdf0de7eddacd650a42b66" + sha256 cellar: :any, arm64_ventura: "d0244af1e2cc656fa2c4d040caef6910ffdc6a8cff2480d315db3bc9fbe0a9e3" + sha256 cellar: :any, arm64_monterey: "0bd56303a2a78e899a035597b779d5a3701f911ebfdf586d4a41d660f13253fe" + sha256 cellar: :any, arm64_big_sur: "30b7f9852b68c70d6e8e07c0de3e9075a4e0edd0facc219970de6535e5931b4d" + sha256 cellar: :any, sonoma: "262e43f2bad21b879f0a778064aefc3c5aa5ba9a04d74169a8681399a0028a9d" + sha256 cellar: :any, ventura: "bce795ff823288cbfe918b0b3f8ed08f9cd7aab506e25fe104ff15d9174c2079" + sha256 cellar: :any, monterey: "cf1b9df9782554d32d6827b89b29195ed7f391a37cd0b9cbab9a63e0ceacec20" + sha256 cellar: :any, big_sur: "b0bec07c54898e3506e249b3c18fde361772367f1e2d8cc2ee6726a678aea7cd" + sha256 cellar: :any, catalina: "1d0e1d803ab771d58a56cd52939d01b7c9e1a8474cb80c21b2251320340e5dc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb1f87a3d1dc58e5d5d651e9645a08653db6835b0503ec8f780a0dbbd7a87443" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15de6388ac637850379a4b2cf37e2089b97b96cf0df0ed536f3c7b7b19a9c641" + end + + depends_on "flex" + depends_on "readline" + + uses_from_macos "bison" => :build + + def install + # Workaround for newer Clang + if DevelopmentTools.clang_build_version >= 1500 + inreplace "src/Makefile", "-Wall", "-Wall -Wno-incompatible-function-pointer-types" + end + + # Work around failure from GCC 10+ using default of `-fno-common` + # /usr/bin/ld: repl.o:(.bss+0x20): multiple definition of `fc_ptr' + args = ENV.compiler.to_s.start_with?("gcc") ? ["CC=#{ENV.cc} -fcommon"] : [] + + %w[src/libdwarf.c doc/dwarf.man doc/xdwarf.man.html].each do |f| + inreplace f, "/etc/dwarfrc", etc/"dwarfrc" + end + + system "make", *args + system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man1}" + end + + test do + if OS.mac? + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + printf("hello world\\n"); + } + C + system ENV.cc, "test.c", "-o", "test" + output = shell_output("#{bin}/dwarf -c 'pp $mac' test") + assert_equal "magic: 0xfeedfacf (-17958193)", output.lines[0].chomp + else + # Run test on x86-64 ELF as upstream never added EH_AARCH64 so part of + # output doesn't show correctly if test is run on aarch64 ELF. + assert_match "main header: elf", shell_output("#{bin}/dwarf -p #{test_fixtures("elf/hello")}") + end + end +end diff --git a/Formula/d/dwarfs.rb b/Formula/d/dwarfs.rb new file mode 100644 index 0000000000000..b01772012b46b --- /dev/null +++ b/Formula/d/dwarfs.rb @@ -0,0 +1,152 @@ +class Dwarfs < Formula + desc "Fast high compression read-only file system for Linux, Windows, and macOS" + homepage "https://github.com/mhx/dwarfs" + url "https://github.com/mhx/dwarfs/releases/download/v0.14.1/dwarfs-0.14.1.tar.xz" + sha256 "620cf27f2e142a5f8fc05552a70704c3bf4df23c3279c6026b3f37954d0529c5" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "edf056d5e0f1b342e59fb76086e9cb0ac3c5929b5f9d98a7104829e4ce1bb23e" + sha256 arm64_sequoia: "70847d5e83a568ab231c4a6d2d8a9feb9703aef6b7e382d382e9623ed17575a5" + sha256 arm64_sonoma: "c99223a99229c9c0c2709d48e3d6687e1b3701080128c8ed83eec1b6102e9fdf" + sha256 cellar: :any, sonoma: "16ceb2a90d931c859f9256aab980f178fde0c5502014d5a204314fca422137a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "17f57a43e6e6860579fc127841fbc53fef40373f0cf52fb822e31d4704b00fde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39fb7bbc0171ac2465516a8dd757aec0e85fa82746e1aafae44bf51e06aba82f" + end + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "brotli" + depends_on "double-conversion" + depends_on "flac" + depends_on "fmt" + depends_on "gflags" + depends_on "glog" + depends_on "howard-hinnant-date" + depends_on "libarchive" + depends_on "libevent" + depends_on "libsodium" + depends_on "lz4" + depends_on "nlohmann-json" + depends_on "openssl@3" + depends_on "parallel-hashmap" + depends_on "range-v3" + depends_on "utf8cpp" + depends_on "xxhash" + depends_on "xz" + depends_on "zstd" + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500 + end + + on_linux do + depends_on "jemalloc" + end + + fails_with :clang do + build 1500 + cause "Not all required C++20 features are supported" + end + + # Workaround for Boost 1.89.0 until upstream Folly fix. + # Issue ref: https://github.com/facebook/folly/issues/2489 + # Fix to Undefined symbols for architecture x86_64: "_XXH3_64bits" + patch :DATA + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DWITH_LIBDWARFS=ON + -DWITH_TOOLS=ON + -DWITH_FUSE_DRIVER=OFF + -DWITH_TESTS=ON + -DWITH_MAN_PAGES=ON + -DENABLE_PERFMON=ON + -DTRY_ENABLE_FLAC=ON + -DENABLE_RICEPP=ON + -DENABLE_STACKTRACE=OFF + -DDISABLE_CCACHE=ON + -DDISABLE_MOLD=ON + -DPREFER_SYSTEM_GTEST=ON + ] + + if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + # No ASAN for folly + ENV.append "CXXFLAGS", "-D_LIBCPP_HAS_NO_ASAN" + + ENV.llvm_clang + + # Needed in order to find the C++ standard library + # See: https://github.com/Homebrew/homebrew-core/issues/178435 + ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/unwind -lunwind" + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # produce a dwarfs image + system bin/"mkdwarfs", "-i", prefix, "-o", "test.dwarfs", "-l4" + + # check the image + system bin/"dwarfsck", "test.dwarfs" + + # get JSON info about the image + info = JSON.parse(shell_output("#{bin}/dwarfsck test.dwarfs -j")) + assert_equal info["created_by"], "libdwarfs v#{version}" + assert info["inode_count"] >= 10 + + # extract the image + system bin/"dwarfsextract", "-i", "test.dwarfs" + assert_path_exists "bin/mkdwarfs" + assert_path_exists "share/man/man1/mkdwarfs.1" + assert compare_file bin/"mkdwarfs", "bin/mkdwarfs" + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(int argc, char **argv) { + int v = dwarfs::get_dwarfs_library_version(); + int major = v / 10000; + int minor = (v % 10000) / 100; + int patch = v % 100; + std::cout << major << "." << minor << "." << patch << std::endl; + return 0; + } + CPP + + # ENV.llvm_clang doesn't work in the test block + ENV["CXX"] = Formula["llvm"].opt_bin/"clang++" if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + system ENV.cxx, "-std=c++20", "test.cpp", "-I#{include}", "-L#{lib}", "-o", "test", "-ldwarfs_common" + + assert_equal version.to_s, shell_output("./test").chomp + end +end + +__END__ +--- a/folly/CMake/folly-config.cmake.in ++++ b/folly/CMake/folly-config.cmake.in +@@ -38,7 +38,6 @@ find_dependency(Boost 1.51.0 MODULE + filesystem + program_options + regex +- system + thread + REQUIRED + ) diff --git a/Formula/d/dwarfutils.rb b/Formula/d/dwarfutils.rb new file mode 100644 index 0000000000000..3e86aab392356 --- /dev/null +++ b/Formula/d/dwarfutils.rb @@ -0,0 +1,70 @@ +class Dwarfutils < Formula + desc "Dump and produce DWARF debug information in ELF objects" + homepage "https://www.prevanders.net/dwarf.html" + url "https://www.prevanders.net/libdwarf-2.2.0.tar.xz" + sha256 "54c0abbbeb4190bd1babb5d28574d2b20c2309343ec764cc7ca611e527ee4a42" + license all_of: ["BSD-2-Clause", "LGPL-2.1-or-later", "GPL-2.0-or-later"] + version_scheme 1 + + livecheck do + url :homepage + regex(%r{href=(?:["']?|.*?/)libdwarf[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "9f5c9bf451c55f21dbe328a470f479c91ef0c192e1df94be596ddcf03fde44e7" + sha256 arm64_sequoia: "36b5f04f0a13b2a4acb4c81dca32d61e19463890fb724077dcde89d5f3b7c07e" + sha256 arm64_sonoma: "541f6c97138661d7a0d372b156be97395e9e3671e86917fb1632cee830259cc2" + sha256 sonoma: "2dd552d1906eeea1907b052b5d536c3017757dcd3e5ca24acb217101047f11fe" + sha256 arm64_linux: "b65972ad5560dfc19ed0e4666eae9fb942d4fc63df0744132e108da88173a29a" + sha256 x86_64_linux: "1d9676d26d59880c80fbe7d7c3983d40bc74a0a882205743942f46eba7a6eea3" + end + + head do + url "https://github.com/davea42/libdwarf-code.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + def install + system "sh", "autogen.sh" if build.head? + system "./configure", "--enable-shared", *std_configure_args + system "make", "install" + end + + test do + system bin/"dwarfdump", "-V" + + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main(void) { + const char *out = NULL; + int res = dwarf_get_children_name(0, &out); + + if (res != DW_DLV_OK) { + printf("Getting name failed\\n"); + return 1; + } + + if (strcmp(out, "DW_children_no") != 0) { + printf("Name did not match: %s\\n", out); + return 1; + } + + return 0; + } + C + system ENV.cc, "-I#{include}/libdwarf-#{version.major}", "test.c", "-L#{lib}", "-ldwarf", "-o", "test" + system "./test" + end +end diff --git a/Formula/d/dwatch.rb b/Formula/d/dwatch.rb new file mode 100644 index 0000000000000..d87a3dd0e78b1 --- /dev/null +++ b/Formula/d/dwatch.rb @@ -0,0 +1,50 @@ +class Dwatch < Formula + desc "Watch programs and perform actions based on a configuration file" + homepage "https://siag.nu/dwatch/" + url "https://siag.nu/pub/dwatch/dwatch-0.1.1.tar.gz" + sha256 "ba093d11414e629b4d4c18c84cc90e4eb079a3ba4cfba8afe5026b96bf25d007" + license "GPL-2.0-or-later" + + livecheck do + url "https://siag.nu/pub/dwatch/" + regex(/href=.*?dwatch[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "d8916e526f70eb17c0010715a61c5746c20214fe8210f544f50650358ab1bb0a" + sha256 arm64_sequoia: "5a80233a94231468b47d75de46c5687c8c274771ead2c2131634c7acc224390f" + sha256 arm64_sonoma: "615de415e77a4739ef13fa2b3de259c3974409c5b94436b852fcb3e563706e2f" + sha256 arm64_ventura: "77ffa4908916dc6f0777a4c04e56bfa3009b4bc9472881830c84c07f926fe3e6" + sha256 arm64_monterey: "496581eb99331049567945d3772d07f035a21f5275cf0408183dfb87375b6f6a" + sha256 arm64_big_sur: "d685c1a752eea0246f6d5f5cc26a6594f36f1950112a3ed65934a52eb37185e9" + sha256 sonoma: "3d02d6d8d63ddd202f183606952f6f4ac28c8860851477ab0b11618242c432a3" + sha256 ventura: "e4be73a2e05f83a381a97642543c740ce26669977c01d1bd4eb25ccfb50440ca" + sha256 monterey: "4d4101090f01137e1af3a2f8c377fd5763f7132f70f5959ccdc1ee96c5679144" + sha256 big_sur: "b7668fa89890e3a496c345d6c28e4c9fec9e9f36a0f6d8cd21c1b0bf4916d785" + sha256 catalina: "c79f51f4329569d682357a97014bd67a14ac1444e4fb983abd3a9e96339ba87a" + sha256 arm64_linux: "ad2ec3e48c3d41dca4e01b27147bb4dc1eefbdad07a102c3a3eebd6f34dab0ef" + sha256 x86_64_linux: "0b92db3bb67c09bf3305bf60f11c6042b91406d80eba7937962c26abd1cb62e8" + end + + def install + # Makefile uses cp, not install + bin.mkpath + man1.mkpath + + system "make", "install", + "CC=#{ENV.cc}", + "PREFIX=#{prefix}", + "MANDIR=#{man}", + "ETCDIR=#{etc}" + + etc.install "dwatch.conf" + end + + test do + # '-h' is not actually an option, but it exits 0 + system bin/"dwatch", "-h" + end +end diff --git a/Formula/d/dwdiff.rb b/Formula/d/dwdiff.rb new file mode 100644 index 0000000000000..2d28b518f7e9f --- /dev/null +++ b/Formula/d/dwdiff.rb @@ -0,0 +1,56 @@ +class Dwdiff < Formula + desc "Diff that operates at the word level" + homepage "https://os.ghalkes.nl/dwdiff.html" + url "https://os.ghalkes.nl/dist/dwdiff-2.1.4.tar.bz2" + sha256 "df16fec44dcb467d65a4246a43628f93741996c1773e930b90c6dde22dd58e0a" + license "GPL-3.0-only" + revision 10 + + livecheck do + url "https://os.ghalkes.nl/dist/" + regex(/href=.*?dwdiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "78af9d6a846b4fd980521de6b2ebd523bd74428a6aa04db02c0d1df6c606b32d" + sha256 arm64_sequoia: "2bda3e2dc11d88fe1187f0c479198d710779c408f9debd48eaa848916e64e593" + sha256 arm64_sonoma: "cf43f7fbb5c7c51a9e8405ac9ea2e9a980ba17359af8aa027863ee012a7442b0" + sha256 arm64_ventura: "511603ea7b355abb986d9b45e2912b59e719e2ec7f6c415eb0bb778e64258416" + sha256 sonoma: "7730f283a9efac877b8453ca6bc8e5e607070a7f8709c8f88954cec6f46e9f3a" + sha256 ventura: "ac4571535c285d3dcbd6adf7e79db5dc50995947ec677a003565f2a9df314fb2" + sha256 arm64_linux: "90ca067849e43e2acfa5c08132957517e9501a05c14bca444faa07e42ffef37d" + sha256 x86_64_linux: "99b048bb74cafa479edca91407c074c45b6047b08a4c2f75ab67ddc3094e6215" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + + on_macos do + depends_on "gettext" + end + + def install + if OS.mac? + ENV.append "LDFLAGS", "-L#{Formula["gettext"].opt_lib}" + ENV.append "LDLIBS", "-lintl" + end + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + + # Remove non-English man pages + rm_r(man/"nl") + rm_r(man/"nl.UTF-8") + rm_r(share/"locale/nl") + end + + test do + (testpath/"a").write "I like beers" + (testpath/"b").write "I like formulae" + diff = shell_output("#{bin}/dwdiff a b", 1) + assert_equal "I like [-beers-] {+formulae+}", diff + end +end diff --git a/Formula/d/dwm.rb b/Formula/d/dwm.rb new file mode 100644 index 0000000000000..7adc16759d009 --- /dev/null +++ b/Formula/d/dwm.rb @@ -0,0 +1,62 @@ +class Dwm < Formula + desc "Dynamic window manager" + homepage "https://dwm.suckless.org/" + url "https://dl.suckless.org/dwm/dwm-6.6.tar.gz" + sha256 "7cfc2c6d9386c07c49e2c906f209c18ba3364ce0b4872eae39f56efdb7fc00a3" + license "MIT" + head "https://git.suckless.org/dwm/", using: :git, branch: "master" + + livecheck do + url "https://dl.suckless.org/dwm/" + regex(/href=.*?dwm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f54870201f722572b9dd08b71200bc041635209fdec7ec1ed35bf75d71cffe02" + sha256 cellar: :any, arm64_sequoia: "6eeb362a8c4a091e32a4e9bbad14b3475f89360df494e35dfb028c0dcebe8624" + sha256 cellar: :any, arm64_sonoma: "94d791de879fd2634abb78108dc9cac02821a49eeb9051ac6650ecbf9e0d03e1" + sha256 cellar: :any, arm64_ventura: "106704c41bfc3aa0de266096aab0afafca663735607f60618d8469ad0be950e2" + sha256 cellar: :any, sonoma: "41e6a95715296f82e4c90aedc01e24edd56422016c19add4a2c2f089b5980ca0" + sha256 cellar: :any, ventura: "1a8627175db294d799fe38c162aff94588530842ead319c02bb33f20a25b5b7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c899def601035f7642aa2309b8b0206610d36875c18b52eb9db85ad27e0395c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5b93278a8d7083fe2d9bf319d6ecac058e36c7477483697454a348a485c70b2" + end + + depends_on "dmenu" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxft" + depends_on "libxinerama" + + def install + if OS.mac? + # The dwm default quit keybinding Mod1-Shift-q collides with + # the Mac OS X Log Out shortcut in the Apple menu. + inreplace "config.def.h", + "{ MODKEY|ShiftMask, XK_q, quit, {0} },", + "{ MODKEY|ControlMask, XK_q, quit, {0} }," + inreplace "dwm.1", '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q' + end + system "make", "FREETYPEINC=#{Formula["freetype2"].opt_include}/freetype2", "PREFIX=#{prefix}", "install" + end + + def caveats + on_macos do + <<~EOS + In order to use the Mac OS X command key for dwm commands, + change the X11 keyboard modifier map using xmodmap (1). + + e.g. by running the following command from $HOME/.xinitrc + xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'& + + See also https://gist.github.com/311377 for a handful of tips and tricks + for running dwm on Mac OS X. + EOS + end + end + + test do + assert_match "dwm: cannot open display", shell_output("DISPLAY= #{bin}/dwm 2>&1", 1) + assert_match "dwm-#{version}", shell_output("DISPLAY= #{bin}/dwm -v 2>&1", 1) + end +end diff --git a/Formula/d/dxflib.rb b/Formula/d/dxflib.rb new file mode 100644 index 0000000000000..43a6c90956b70 --- /dev/null +++ b/Formula/d/dxflib.rb @@ -0,0 +1,88 @@ +class Dxflib < Formula + desc "C++ library for parsing DXF files" + homepage "https://www.ribbonsoft.com/en/what-is-dxflib" + url "https://www.ribbonsoft.com/archives/dxflib/dxflib-3.26.4-src.tar.gz" + sha256 "507db4954b50ac521cbb2086553bf06138dc89f55196a8ba22771959c760915f" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.ribbonsoft.com/en/dxflib-downloads" + regex(/href=.*?dxflib[._-]v?(\d+(?:\.\d+)+)-src\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3bbe74f4cb179ff9cd5df3e09b664f29033deb63211128b73bab5cf18c6b71a1" + sha256 cellar: :any, arm64_sequoia: "a4ba8424bf3cd50726d26445fa590fb069d6dff461324400938a3be82e98ef0c" + sha256 cellar: :any, arm64_sonoma: "b82a6721fde448b539b34656cbde8cdd0699373ca2ce134f7d7424d8cdd29c66" + sha256 cellar: :any, arm64_ventura: "6807f88414e5cf6c874dd7eebd579298ecc0e99babb950a9a454cc9a55541071" + sha256 cellar: :any, arm64_monterey: "7394d8e91ad3daefb69baae95372e86243fa69252aaaff0671aae88c5385b8be" + sha256 cellar: :any, arm64_big_sur: "38f73afafa3258b4d298f173064099dac105ab5bc162eae367d76fe326f5fbb8" + sha256 cellar: :any, sonoma: "7428941eb92a81ca91bba17c724a82392ad210bd545eba3566d89be9dc028d59" + sha256 cellar: :any, ventura: "996710f91cf68315863c2d6b99666295ef2ef91de2c1cda1a2126154547ce89f" + sha256 cellar: :any, monterey: "47ebef21d6211ac7b080a8f1ed23dfb154febdf8dfd1a157b14e3c5dccea2812" + sha256 cellar: :any, big_sur: "86c60b0cc3b353b3652d6bb819c41fcec1cebc6c2f1f7ae435696bbae757a16f" + sha256 cellar: :any, catalina: "8bfd7c24979cf19191ff911bae9173666f84cf3b5995f3e16672041a9720220f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c3d6128db7bb1a09a4e280074706cece0535a47ec8db471d4e7ad941dc7e2f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e71a7e5920a5c7d7029edcf188bebf88aea640021d459ba1e2c0fa7266970c3a" + end + + depends_on "qtbase" => :build + + # Sample DXF file made available under GNU LGPL license. + # See https://people.math.sc.edu/Burkardt/data/dxf/dxf.html. + resource "testfile" do + url "https://people.math.sc.edu/Burkardt/data/dxf/cube.dxf" + sha256 "e5744edaa77d1612dec44d1a47adad4aad3d402dbf53ea2aff5a57c34ae9bafa" + end + + def install + # For libdxflib.a + system "qmake", "dxflib.pro" + system "make" + + # Build shared library + inreplace "dxflib.pro", "CONFIG += staticlib", "CONFIG += shared" + system "qmake", "dxflib.pro" + system "make" + + (include/"dxflib").install Dir["src/*"] + lib.install Dir["*.a", shared_library("*")] + end + + test do + resource("testfile").stage testpath + + (testpath/"test.cpp").write <<~CPP + #include + #include + + using namespace std; + + class MyDxfFilter : public DL_CreationAdapter { + virtual void addLine(const DL_LineData& d); + }; + + void MyDxfFilter::addLine(const DL_LineData& d) { + cout << d.x1 << "/" << d.y1 << " " + << d.x2 << "/" << d.y2 << endl; + } + + int main() { + MyDxfFilter f; + DL_Dxf* dxf = new DL_Dxf(); + dxf->test(); + if (!dxf->in("cube.dxf", &f)) return 1; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-o", "test", + "-I#{include}/dxflib", "-L#{lib}", "-ldxflib" + output = shell_output("./test") + assert_match "1 buf1: ' 10", output + assert_match "2 buf1: '10'", output + assert_match "-0.5/-0.5 0.5/-0.5", output.split("\n")[16] + end +end diff --git a/Formula/d/dxpy.rb b/Formula/d/dxpy.rb new file mode 100644 index 0000000000000..f00e514f5b2be --- /dev/null +++ b/Formula/d/dxpy.rb @@ -0,0 +1,81 @@ +class Dxpy < Formula + include Language::Python::Virtualenv + + desc "DNAnexus toolkit utilities and platform API bindings for Python" + homepage "https://github.com/dnanexus/dx-toolkit" + url "https://files.pythonhosted.org/packages/89/f8/5658fdfc25706423eef3f6e1fcf1604e4a187e4349ee063d5604ec9f9f5d/dxpy-0.400.1.tar.gz" + sha256 "c91666c960675426e63e1815d53009f14fcee9c2b661a529e9e40c3d068f44ca" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54b95396e27ea9233ac0e7d0e7f14455d98d49f6000de24f34647580fbee41d2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad418433a4bb59d969354de84090b5a5eab13b5133110d74f1376176a8fb0e5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8edb84b9598ab96111c70f4a29a1f7f177caff1a9405c54c224d679a5bca9ee1" + sha256 cellar: :any_skip_relocation, sonoma: "2655b0bf2b535025f4c197508f30ea5bb26c9296d5cc11df760b9e3c2f5a3b66" + sha256 cellar: :any_skip_relocation, arm64_linux: "9296e0209a0dfa78c335c1fd586ab71d6e872c37df744428078289b6752d4ee4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb73d410c0043281050b9703ded3a34f9e48a74d3c07f6c0c44ce3e88e14f88b" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.14" + + uses_from_macos "libffi" + + on_macos do + depends_on "readline" + end + + pypi_packages exclude_packages: ["cryptography", "certifi"] + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "crc32c" do + url "https://files.pythonhosted.org/packages/e3/66/7e97aa77af7cf6afbff26e3651b564fe41932599bc2d3dce0b2f73d4829a/crc32c-2.8.tar.gz" + sha256 "578728964e59c47c356aeeedee6220e021e124b9d3e8631d95d9a5e5f06e261c" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/e1/88/bdd0a41e5857d5d703287598cbf08dad90aed56774ea52ae071bae9071b6/psutil-7.1.3.tar.gz" + sha256 "6c86281738d77335af7aec228328e944b30930899ea760ecf33a4dba66be5e74" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/36/dd/a6b232f449e1bc71802a5b7950dc3675d32c6dbc2a1bd6d71f065551adb6/urllib3-2.1.0.tar.gz" + sha256 "df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/20/07/2a94288afc0f6c9434d6709c5320ee21eaedb2f463ede25ed9cf6feff330/websocket-client-1.7.0.tar.gz" + sha256 "10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6" + end + + def install + virtualenv_install_with_resources + end + + test do + dxenv = <<~EOS + API server protocol https + API server host api.dnanexus.com + API server port 443 + Current workspace None + Current folder None + Current user None + EOS + assert_match dxenv, shell_output("#{bin}/dx env") + end +end diff --git a/Formula/d/dyff.rb b/Formula/d/dyff.rb new file mode 100644 index 0000000000000..c9c0aba35e335 --- /dev/null +++ b/Formula/d/dyff.rb @@ -0,0 +1,50 @@ +class Dyff < Formula + desc "Diff tool for YAML files, and sometimes JSON" + homepage "https://github.com/homeport/dyff" + url "https://github.com/homeport/dyff/archive/refs/tags/v1.10.2.tar.gz" + sha256 "36e103c1424e79135bb4ed54d6b66e6c3f057ff422a5838d3a80ffd4d9a3ef27" + license "MIT" + head "https://github.com/homeport/dyff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "363504d9c330819c74082c62e65c5e381e208e70d4533d187d7fb61cfa4a7a99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18115a752f3777637541276711eebddf6ff22698170953f5adc27b8cd559d273" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18115a752f3777637541276711eebddf6ff22698170953f5adc27b8cd559d273" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18115a752f3777637541276711eebddf6ff22698170953f5adc27b8cd559d273" + sha256 cellar: :any_skip_relocation, sonoma: "fcf0f8f25381db4e7e58e35a904718c89dcdafd2791a3f814b6ac81f64a750de" + sha256 cellar: :any_skip_relocation, ventura: "fcf0f8f25381db4e7e58e35a904718c89dcdafd2791a3f814b6ac81f64a750de" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c0576d974f783ca0198f772a4ac9e91f9426f5f9cdcbaf13596778792db0b48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "434f08df2e259dd43d676ad47773285915481510d7dc9724598fe6716145c75a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/homeport/dyff/internal/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/dyff" + + generate_completions_from_executable(bin/"dyff", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dyff version") + + (testpath/"file1.yaml").write <<~YAML + name: Alice + age: 30 + YAML + + (testpath/"file2.yaml").write <<~YAML + name: Alice + age: 31 + YAML + + output = shell_output("#{bin}/dyff between file1.yaml file2.yaml") + assert_match <<~EOS, output + age + ± value change + - 30 + + 31 + EOS + end +end diff --git a/Formula/d/dyld-headers.rb b/Formula/d/dyld-headers.rb new file mode 100644 index 0000000000000..8497994ba5516 --- /dev/null +++ b/Formula/d/dyld-headers.rb @@ -0,0 +1,17 @@ +class DyldHeaders < Formula + desc "Header files for the dynamic linker" + homepage "https://opensource.apple.com/" + url "https://github.com/apple-oss-distributions/dyld/archive/refs/tags/dyld-1323.3.tar.gz" + sha256 "9696c72b4800da6941adc51f26cc40629ccb9f965e78c1324bebaf219c43be75" + license "APSL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "042663a1058cb1115b53fc0f3d5e2b5b2a79b49013c3a88707aac8987b88364d" + end + + keg_only :provided_by_macos + + def install + include.install Dir["include/*"] + end +end diff --git a/Formula/d/dylibbundler.rb b/Formula/d/dylibbundler.rb new file mode 100644 index 0000000000000..96a3f034a4584 --- /dev/null +++ b/Formula/d/dylibbundler.rb @@ -0,0 +1,34 @@ +class Dylibbundler < Formula + desc "Utility to bundle libraries into executables for macOS" + homepage "https://github.com/auriamg/macdylibbundler" + url "https://github.com/auriamg/macdylibbundler/archive/refs/tags/1.0.5.tar.gz" + sha256 "13384ebe7ca841ec392ac49dc5e50b1470190466623fa0e5cd30f1c634858530" + license "MIT" + head "https://github.com/auriamg/macdylibbundler.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00c51e669f0098b7a2a6271542b9b6be6909cb3634e2b458dfbc708357d6f9c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "26795436a10e6ed4ff9114682bf35cde4ce4dc3c69f93d8b6d41b34010f60d2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f06d382fc981ab6ed57d9fd0257cb18481cb524128d88d3bd864c0720e435c91" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8749638bc5670b6a9c6f6fba7f609b2d72352639cf14cf10b9bc59c3f9ca3972" + sha256 cellar: :any_skip_relocation, arm64_monterey: "daba4f32451618f8bde33249c02d2e07a2a33080d4ce4e3f6b1085109e996a1a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0f72a1ddbced1016b9804320c8affd47919efa48bc8c3ec9beb2975e66ebcc6f" + sha256 cellar: :any_skip_relocation, sonoma: "16c203c632e322567f8ce932652b5ff785302f4bb6623f01fc4e935ea0583d9d" + sha256 cellar: :any_skip_relocation, ventura: "c564cf5d48edcaab9c2940d0820bc420b5c99621d359a2b681c7b3e68e413843" + sha256 cellar: :any_skip_relocation, monterey: "fec981eff597fa04d969914104bc997bebe8858f2bfaf5ec532910295ca43167" + sha256 cellar: :any_skip_relocation, big_sur: "7562a49bdaa12d85af55aa8843379179dbfd78d9d8d44f14b481ca22760d4df6" + sha256 cellar: :any_skip_relocation, arm64_linux: "0aa6fe3ae7b295e016e05dd3ceefe4056166f9ce7b9f8633c14345106a135f84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8c2ea435fa7ee838cc3fa07684b4f1b68ac5f65a224c7b5860b5bf06d254f50" + end + + def install + system "make" + bin.install "dylibbundler" + end + + test do + system bin/"dylibbundler", "-h" + end +end diff --git a/Formula/d/dynaconf.rb b/Formula/d/dynaconf.rb new file mode 100644 index 0000000000000..148cb00330779 --- /dev/null +++ b/Formula/d/dynaconf.rb @@ -0,0 +1,25 @@ +class Dynaconf < Formula + include Language::Python::Virtualenv + + desc "Configuration Management for Python" + homepage "https://www.dynaconf.com/" + url "https://files.pythonhosted.org/packages/cd/bd/7a6f84b68268fe1d12e709faec7d293e0c37c9c03bacaf363de41e7e7568/dynaconf-3.2.12.tar.gz" + sha256 "29cea583b007d890e6031fa89c0ac489b631c73dbee83bcd5e6f97602c26354e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9680ab2704f9234471f5868430593e7883a33e1f218b8c1764339071938c6401" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + system bin/"dynaconf", "init" + assert_path_exists testpath/"settings.toml" + assert_match "from dynaconf import Dynaconf", (testpath/"config.py").read + end +end diff --git a/Formula/d/dynamips.rb b/Formula/d/dynamips.rb new file mode 100644 index 0000000000000..ec63f6a47353b --- /dev/null +++ b/Formula/d/dynamips.rb @@ -0,0 +1,63 @@ +class Dynamips < Formula + desc "Cisco 7200/3600/3725/3745/2600/1700 Router Emulator" + homepage "https://github.com/GNS3/dynamips" + url "https://github.com/GNS3/dynamips/archive/refs/tags/v0.2.23.tar.gz" + sha256 "503bbb52c03f91900ea8dbe8bd0b804b76e2e28d0b7242624e0d3c52dda441a1" + license "GPL-2.0-only" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aad0f86002ca962368935cb17bd171e427569af71ba29399d6b7f079b23a0be4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4bc0583f71947ce92c88e24ad659542886af0698ef9601e6432ddb3c925c208e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3db4b7a6d2140635eae5d91a96810fbbef58144dcad5f7ed77743f930df696d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "106e42f80c14fe08866951b8e1d5032f98fe3d8a57c497856d09aa0657a7120b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ea736c8b0b31f481066a64f07a154e5bd8b556be4cd259c1a0e0d8da509da3be" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e685176d9affeeacddcf08b39f639a998c0dde4027ad6131d43bf013b99cefc6" + sha256 cellar: :any_skip_relocation, sonoma: "6be2e4c5d8e2aa875a346df429bd6b513d5c0c8d49f84c4fe29615226fb75d71" + sha256 cellar: :any_skip_relocation, ventura: "df2f66c85bba8ebe55a40adca313d3007fd78a11e31101cbf56095c261ba419a" + sha256 cellar: :any_skip_relocation, monterey: "34cd5717a4449d9d69c7741ccf492a010c8b6fcaae137b3e84869ed0426b0be3" + sha256 cellar: :any_skip_relocation, big_sur: "537b49bfac716211677ac7da74d5c78d111da724c80b3811976f281eb57237f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a799bf4755db29172a339280a49b3e560c0762090c4b53e06b68fb24e169800" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43b17aecf4adaa4164f12a3ce012cb288a812d75e2f28cf55b48d87c8b000dc2" + end + + depends_on "cmake" => :build + + uses_from_macos "libpcap" + + on_macos do + # https://github.com/GNS3/dynamips/issues/142 + depends_on "libelf" => :build + end + + on_linux do + depends_on "elfutils" + end + + def install + cmake_args = ["-DANY_COMPILER=1"] + cmake_args << if OS.mac? + "-DLIBELF_INCLUDE_DIRS=#{Formula["libelf"].opt_include}/libelf" + else + "-DLIBELF_INCLUDE_DIRS=#{Formula["elfutils"].opt_include}" + end + + # Workaround to build with CMake 4 + cmake_args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + odie "Remove CMake workaround!" if version > "0.2.23" + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"dynamips", "-e" + end +end diff --git a/Formula/d/dynare.rb b/Formula/d/dynare.rb new file mode 100644 index 0000000000000..4c5a9b395a522 --- /dev/null +++ b/Formula/d/dynare.rb @@ -0,0 +1,113 @@ +class Dynare < Formula + desc "Platform for economic models, particularly DSGE and OLG models" + homepage "https://www.dynare.org/" + url "https://www.dynare.org/release/source/dynare-6.4.tar.xz" + sha256 "9865e2e7f6b3705155538d5fb1fb0b01bc9decf07250b3b054d3555d651c3843" + license "GPL-3.0-or-later" + revision 2 + head "https://git.dynare.org/Dynare/dynare.git", branch: "master" + + livecheck do + url "https://www.dynare.org/download/" + regex(/href=.*?dynare[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "391ee57f50c3168c22e98efee4f787c9eac5f1ce090f9a6e9950f1007bafa883" + sha256 cellar: :any, arm64_sequoia: "724868c72baac7dc6e8323e3b8eefe14b945ea8478fd2f864db5794cae71fd8c" + sha256 cellar: :any, arm64_sonoma: "11942eab211bcd3928ba365a9c25e45ef14821f115503ac8e99364d4a13f444e" + sha256 cellar: :any, sonoma: "ad2b0713e5e08c49b09cb8d09e249eef360e9c88c99e4392fcd1846697faf4c7" + sha256 arm64_linux: "d653b59d859f527baf0790c9d36f86fa63ad7e8eea74a5f632f7b62a22dbc855" + sha256 x86_64_linux: "4064e06f575bc0b6421e690a34be569884f27b9f10888b74842c8699eb5202f1" + end + + depends_on "bison" => :build + depends_on "boost" => :build + depends_on "cweb" => :build + depends_on "flex" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "fftw" + depends_on "gcc" # for gfortran + depends_on "gsl" + depends_on "hdf5" + depends_on "libmatio" + depends_on "metis" + depends_on "octave" + depends_on "openblas" + depends_on "suite-sparse" + + fails_with :clang do + cause <<~EOS + GCC is the only compiler supported by upstream + https://git.dynare.org/Dynare/dynare/-/blob/master/README.md#general-instructions + EOS + end + + resource "slicot" do + url "https://deb.debian.org/debian/pool/main/s/slicot/slicot_5.0+20101122.orig.tar.gz" + sha256 "fa80f7c75dab6bfaca93c3b374c774fd87876f34fba969af9133eeaea5f39a3d" + end + + def install + resource("slicot").stage do + system "make", "lib", "OPTS=-fPIC", "SLICOTLIB=../libslicot_pic.a", + "FORTRAN=gfortran", "LOADER=gfortran" + system "make", "clean" + system "make", "lib", "OPTS=-fPIC -fdefault-integer-8", + "FORTRAN=gfortran", "LOADER=gfortran", + "SLICOTLIB=../libslicot64_pic.a" + (buildpath/"slicot/lib").install "libslicot_pic.a", "libslicot64_pic.a" + end + + # This needs a bit of extra help in finding the Octave libraries on Linux. + octave = Formula["octave"] + ENV.append "LDFLAGS", "-Wl,-rpath,#{octave.opt_lib}/octave/#{octave.version.major_minor_patch}" if OS.linux? + + # Help meson find `boost`, `suite-sparse` and `slicot` + ENV["BOOST_ROOT"] = Formula["boost"].opt_prefix + ENV.append_path "LIBRARY_PATH", Formula["suite-sparse"].opt_lib + ENV.append_path "LIBRARY_PATH", buildpath/"slicot/lib" + + system "meson", "setup", "build", "-Dbuild_for=octave", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + (pkgshare/"examples").install "examples/bkk.mod" + end + + def caveats + <<~EOS + To get started with Dynare, open Octave and type + addpath #{opt_lib}/dynare/matlab + EOS + end + + test do + resource "statistics" do + url "https://github.com/gnu-octave/statistics/archive/refs/tags/release-1.7.3.tar.gz", using: :nounzip + sha256 "570d52af975ea9861a6fb024c23fc0f403199e4b56d7a883ee6ca17072e26990" + end + + ENV.cxx + ENV.append "CXXFLAGS", "-std=c++17" # octave >= 10 requires c++17 + ENV.delete "LDFLAGS" # avoid overriding Octave flags + + statistics = resource("statistics") + testpath.install statistics + + cp pkgshare/"examples/bkk.mod", testpath + + # Replace `makeinfo` with dummy command `true` to prevent generating docs + # that are not useful to the test. + (testpath/"dyn_test.m").write <<~MATLAB + makeinfo_program true + pkg prefix #{testpath}/octave + pkg install statistics-release-#{statistics.version}.tar.gz + dynare bkk.mod console + MATLAB + + system Formula["octave"].opt_bin/"octave", "--no-gui", + "--no-history", "--path", "#{lib}/dynare/matlab", "dyn_test.m" + end +end diff --git a/Formula/d/dynein.rb b/Formula/d/dynein.rb new file mode 100644 index 0000000000000..1eddd710ff783 --- /dev/null +++ b/Formula/d/dynein.rb @@ -0,0 +1,40 @@ +class Dynein < Formula + desc "DynamoDB CLI" + homepage "https://github.com/awslabs/dynein" + url "https://github.com/awslabs/dynein/archive/refs/tags/v0.3.0.tar.gz" + sha256 "40be5866288f565ac00494910d5dbb266ca0c34d56d50d839bc2c2aad34dc470" + license "Apache-2.0" + head "https://github.com/awslabs/dynein.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5ea2e5e239b05f06c0f84efe21f05f2d34a4ef382971d8c3246a2a612c186607" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16ce7bd61f4e442d0ff451b0c52373d29d41d813801dfff36f08e87cdb148e1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91b9e9c541f813bef303f2fdf8d07f58845f7bdae1bbd90203a489836aac2686" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b815a934b4e075d52617c31d4994bebf2bd41698f7ab155b12506bc1dbf326c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6ca0ab5f1dedb70ecc9654c05831c8cf1a549a1340d03417fc3591ff1fc7541c" + sha256 cellar: :any_skip_relocation, sonoma: "d1782320d190d2fb194376ef10d4a6e9a96cbabf9050deb4e6c106aff8abfde8" + sha256 cellar: :any_skip_relocation, ventura: "0ef1635233b03ee3787239236a24581bd084e6939c15989053abd01e58d45ef1" + sha256 cellar: :any_skip_relocation, monterey: "8624ef8a79a41026c00810bb8b36ed4bafb22217ab201a3239b41584f7846e13" + sha256 cellar: :any_skip_relocation, arm64_linux: "548a00844b2c9da5358bd2d719d58fd045d9cc0d3fbb3b2306185f8449e4cbb7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5842684aeeca93f1a9869327cb4f41a75c708ab354c47a2e124063cd8108ea8" + end + + depends_on "cmake" => :build # for libz-ng-sys crate + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" # need to build `openssl-sys` + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "To find all tables in all regions", shell_output("#{bin}/dy desc 2>&1", 1) + assert_match version.to_s, shell_output("#{bin}/dy --version") + end +end diff --git a/Formula/d/dynet.rb b/Formula/d/dynet.rb new file mode 100644 index 0000000000000..68dcc4665e917 --- /dev/null +++ b/Formula/d/dynet.rb @@ -0,0 +1,52 @@ +class Dynet < Formula + desc "Dynamic Neural Network Toolkit" + homepage "https://github.com/clab/dynet" + url "https://github.com/clab/dynet/archive/refs/tags/2.1.2.tar.gz" + sha256 "014505dc3da2001db54f4b8f3a7a6e7a1bb9f33a18b6081b2a4044e082dab9c8" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c9b3ca5eca8723487de3b6a864ade40fd1f9fb041a4c8cd45bd39356da50c576" + sha256 cellar: :any, arm64_sequoia: "5ee2e5895fb8f27869a3f6449e4ab88b63f4b8c9b716e4e4cf5aa3fec9a6e5c1" + sha256 cellar: :any, arm64_sonoma: "575b4161502613978a741cbb612833a9071f31a2a159095e74620686505ad72c" + sha256 cellar: :any, sonoma: "743082c372e91418ca92666f7e8185e041f76d014f32cdd97c4b2caf2882f08c" + sha256 cellar: :any_skip_relocation, arm64_linux: "34f4abdf14637d8a9fdc3b85c37061a38001bfff9ab87714b21cc1c5845dc4fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e49f33563dedf584dbf05c93b537775ddc36bdd62bb0d9d7c7325e4a2c73a4d6" + end + + depends_on "cmake" => :build + depends_on "eigen@3" # cannot use Eigen >= 5 due to EIGEN_EMPTY_STRUCT_CTOR removal + + on_linux do + on_arm do + depends_on "llvm" => :build + + fails_with :gcc do + cause "https://github.com/clab/dynet/issues/266" + end + end + end + + def install + args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DEIGEN3_INCLUDE_DIR=#{Formula["eigen@3"].opt_include}/eigen3 + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/xor/train_xor.cc", testpath + + system ENV.cxx, "-std=c++11", "train_xor.cc", "-I#{include}", + "-L#{lib}", "-ldynet", "-o", "train_xor" + assert_match "memory allocation done", shell_output("./train_xor 2>&1") + end +end diff --git a/Formula/d/dynomite.rb b/Formula/d/dynomite.rb new file mode 100644 index 0000000000000..fb13f676b6a0c --- /dev/null +++ b/Formula/d/dynomite.rb @@ -0,0 +1,78 @@ +class Dynomite < Formula + desc "Generic dynamo implementation for different k-v storage engines" + homepage "https://github.com/Netflix/dynomite" + url "https://github.com/Netflix/dynomite/archive/refs/tags/v0.6.22.tar.gz" + sha256 "9c3c60d95b39939f3ce596776febe8aa00ae8614ba85aa767e74d41e302e704a" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "ec342954369e6726e60c027f71e8e1fb3e6fcc8fba63255ba73149a02fa50043" + sha256 arm64_sequoia: "e1eb2ecffe6ef0e08d0cc80b5f5ca44a337e2c4d79dde61be3ad2002d2e31fd3" + sha256 arm64_sonoma: "1c273876dda80923311eed315f5c69de5e692fe4a666e7e937954895dd9f57c0" + sha256 cellar: :any, arm64_ventura: "757afdc3438ad136afef540fee6a07e42a51b3c1bbde3a25fb13bd19e5807d33" + sha256 cellar: :any, arm64_monterey: "682e0e5ec05ccfdd2fe8142083153dc6a0c14d3b1d7cc8c0dc1cd425aded9e41" + sha256 cellar: :any, arm64_big_sur: "edd9fad6b17b83dbf2d2699c3873463ea169a996fed83e861652bb5f92de4d7a" + sha256 sonoma: "1f189756392ee5476ffd10499b054c0d21a71b5addd75632cd84a37a3a4f25ce" + sha256 cellar: :any, ventura: "98d4209a06b832e81859388bd4da429cdbd87f9103d31656b2d094375221e1fa" + sha256 cellar: :any, monterey: "5679f89f06a1f5ac53e3c4d2481f35e944238be44579423aab64077e5033c637" + sha256 cellar: :any, big_sur: "8a79d6ed731e5a44a26b5691723edc02ca0ed66e4c54fa08bdc183082dd8531b" + sha256 cellar: :any, catalina: "879a8a2ca6905ca4cd0cf3cc7e6020415b54b12f3a90f51e52a289c1818da46a" + sha256 arm64_linux: "2839e6134a007f1e5471394362bef65e4083c1a17c98ec6fe51caac34e349b81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9251d7d3c85de18d648cee8fec1d415a634a820efe26559702a61b01f47c0e52" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + # Apply fix for -fno-common from gcc-10 branch + # Ref: https://github.com/Netflix/dynomite/issues/802 + patch do + on_linux do + url "https://github.com/dmolik/dynomite/commit/303d4ecae95aee9540c48ceac9e7c0f2137a4b52.patch?full_index=1" + sha256 "a195c75e49958b4ffcef7d84a5b01e48ce7b37936c900e466c1cd2d96b52ac37" + end + end + + def install + # Work around build failure on recent Clang + # Issue ref: https://github.com/Netflix/dynomite/issues/818 + if DevelopmentTools.clang_build_version >= 1500 + ENV.append_to_cflags "-Wno-implicit-function-declaration -Wno-int-conversion" + end + + args = ["--disable-silent-rules", "--sysconfdir=#{pkgetc}"] + # Help old config script for bundled libyaml identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + pkgetc.install Dir["conf/*"] + end + + test do + stats_port = free_port + + cp etc/"dynomite/redis_single.yml", testpath + inreplace "redis_single.yml" do |s| + s.gsub! ":8102", ":#{free_port}" + s.gsub! ":8101", ":#{free_port}" + s.gsub! ":22122", ":#{free_port}" + s.gsub! ":22222", ":#{stats_port}" + end + + fork { exec sbin/"dynomite", "-c", "redis_single.yml" } + sleep 5 + assert_match "OK", shell_output("curl -s 127.0.0.1:#{stats_port}") + end +end diff --git a/Formula/d/dysk.rb b/Formula/d/dysk.rb new file mode 100644 index 0000000000000..73049e6a050db --- /dev/null +++ b/Formula/d/dysk.rb @@ -0,0 +1,28 @@ +class Dysk < Formula + desc "Linux utility to get information on filesystems, like df but better" + homepage "https://dystroy.org/dysk/" + url "https://github.com/Canop/dysk/archive/refs/tags/v3.3.0.tar.gz" + sha256 "f40178720dcca0065542c7e07f08efee2c1a0a0abc4df24ca4bc681b89336f9b" + license "MIT" + head "https://github.com/Canop/dysk.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13ec3a3485980d9da65f932b238b95b93ddb3a1df511d3ab320196a3015d2d63" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6e489fc663e85d807177d721bce394ac59400d8d95def05633cb6ee2217dc74" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49ae9a3bd8896523b23c529f0bcb1ae626553c39bc1eba63e4af98ada1db9f97" + sha256 cellar: :any_skip_relocation, sonoma: "e28c635f3d759da6bc1b7b4c9c87610e226411a8682ff5dcb5b4a43aa57db048" + sha256 cellar: :any_skip_relocation, arm64_linux: "9376ad8b6749dc70d7f60ce1eb6b869ec5ac33c3e607b229ccad35c99ae6942a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa5588ed626cdac0ed261a1f735b03cd256890a0d4d6ed64f39438cd82749014" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "filesystem", shell_output("#{bin}/dysk -s free-d") + assert_match version.to_s, shell_output("#{bin}/dysk --version") + end +end diff --git a/Formula/d/dzr.rb b/Formula/d/dzr.rb new file mode 100644 index 0000000000000..d19a6f4d28997 --- /dev/null +++ b/Formula/d/dzr.rb @@ -0,0 +1,27 @@ +class Dzr < Formula + desc "Command-line Deezer.com player" + homepage "https://github.com/yne/dzr" + url "https://github.com/yne/dzr/archive/refs/tags/251019.tar.gz" + sha256 "c52b0210ba655ca16bf6efbd202830f96a0926bc1b9b91ae3127e46b3fb81fa3" + license "Unlicense" + head "https://github.com/yne/dzr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "34784d3678356ccb2af3c56b92b8e82ee2c9c54152051538f101dc87829b2933" + end + + depends_on "dialog" + depends_on "jq" + depends_on "mpv" + uses_from_macos "curl" + + def install + bin.install "dzr", "dzr-url", "dzr-dec", "dzr-srt", "dzr-id3" + end + + test do + ENV.delete "DZR_CBC" + assert_equal "3ad58d9232a3745ad9308b0669c83b6f7e8dba4d", + Digest::SHA1.hexdigest(shell_output("#{bin}/dzr !").chomp) + end +end diff --git a/Formula/daemon.rb b/Formula/daemon.rb deleted file mode 100644 index 8defb44e38bfd..0000000000000 --- a/Formula/daemon.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Daemon < Formula - desc "Turn other processes into daemons" - homepage "http://libslack.org/daemon/" - url "http://libslack.org/daemon/download/daemon-0.6.4.tar.gz" - sha256 "c4b9ea4aa74d55ea618c34f1e02c080ddf368549037cb239ee60c83191035ca1" - - bottle do - cellar :any_skip_relocation - sha256 "0fd225e226dd07c3f51836f47bf9829dd095a46a13a5b78c3a0e9df3c5820683" => :mojave - sha256 "ca2b1016c1bbe48002f70b7beb86063943dadabcb670db9f90f1c259cb34d623" => :high_sierra - sha256 "bfc116e8f0853cdf5b4abc38b1f000c90708823bf49c5237f8ec453400a5d606" => :sierra - sha256 "ad4f8ad9e7deeb0039c6c603b0108fb6733abe425c49fa6344f762e26b49cf2d" => :el_capitan - sha256 "f48000af3631f28d47d01d3d89a1f03e7c4f7eac4a81ab7db9c38a1ce9ff66cd" => :yosemite - sha256 "09a420b59d2e5cbaf3073b2daf81d57d01c733b79a928bb58da6418de7f5bd3a" => :mavericks - end - - # fixes for mavericks strlcpy/strlcat: https://trac.macports.org/ticket/42845 - if MacOS.version >= :mavericks - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3323958/daemon/daemon-0.6.4-ignore-strlcpy-strlcat.patch" - sha256 "a56e16b0801a13045d388ce7e755b2b4e40288c3731ce0f92ea879d0871782c0" - end - end - - def install - # Parallel build failure reported to raf@raf.org 27th Feb 2016 - ENV.deparallelize - - system "./config" - system "make" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "#{bin}/daemon", "--version" - end -end diff --git a/Formula/daemonize.rb b/Formula/daemonize.rb deleted file mode 100644 index 62602ab58f40a..0000000000000 --- a/Formula/daemonize.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Daemonize < Formula - desc "Run a command as a UNIX daemon" - homepage "https://software.clapper.org/daemonize/" - url "https://github.com/bmc/daemonize/archive/release-1.7.8.tar.gz" - sha256 "20c4fc9925371d1ddf1b57947f8fb93e2036eb9ccc3b43a1e3678ea8471c4c60" - - bottle do - cellar :any_skip_relocation - sha256 "45a895642c3be14e888b66607c2a4567408657111686437a431a730358b2feea" => :mojave - sha256 "bc501e9e4ba9fd11390fa9749a7b9a38a70353edaf75499bd969c45921d06bfe" => :high_sierra - sha256 "d4d5109292158ef32eb73a37b9b6a037dcae620e234be945410ea927322bb998" => :sierra - sha256 "5e05991cf0462e4fe32dd70354d2520a378831d2b1c0fc2cf0b4fbca8dc85489" => :el_capitan - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - dummy_script_file = testpath/"script.sh" - output_file = testpath/"outputfile.txt" - pid_file = testpath/"pidfile.txt" - dummy_script_file.write <<~EOS - #!/bin/sh - echo "#{version}" >> "#{output_file}" - EOS - chmod 0700, dummy_script_file - system "#{sbin}/daemonize", "-p", pid_file, dummy_script_file - assert_predicate pid_file, :exist?, "The file containing the PID of the child process was not created." - sleep(4) # sleep while waiting for the dummy script to finish - assert_predicate output_file, :exist?, "The file which should have been created by the child process doesn't exist." - assert_match version.to_s, output_file.read - end -end diff --git a/Formula/daemonlogger.rb b/Formula/daemonlogger.rb deleted file mode 100644 index da0cb6359a777..0000000000000 --- a/Formula/daemonlogger.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Daemonlogger < Formula - desc "Network packet logger and soft tap daemon" - homepage "https://sourceforge.net/projects/daemonlogger/" - url "https://downloads.sourceforge.net/project/daemonlogger/daemonlogger-1.2.1.tar.gz" - sha256 "79fcd34d815e9c671ffa1ea3c7d7d50f895bb7a79b4448c4fd1c37857cf44a0b" - - bottle do - cellar :any - rebuild 1 - sha256 "1cac9c8c17cd804206440d35ec88f49e8162ec102a4e561aa103f528b6d49382" => :mojave - sha256 "04242956845e71d839b050dd765829a217268486eb625a481a3fae85bd577f0d" => :high_sierra - sha256 "c3ac14ab04174e06129fc0a51d31ad992f3d11f362ecb1cf3803092b6c68b146" => :sierra - sha256 "582aa8e07f269bdfa00b1f66157c06339b62285d94f6b8ffa6a472eac063e5e5" => :el_capitan - sha256 "3497b590f03a70d322452abd71a1121d9a952d05a82af875c1dc11e5ae0324d6" => :yosemite - sha256 "c178b1f5f29b361308cc64944472604067282c56eeb29131674e89be30dacc78" => :mavericks - end - - depends_on "libdnet" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/daemonlogger", "-h" - end -end diff --git a/Formula/daemontools.rb b/Formula/daemontools.rb deleted file mode 100644 index c96b1b249d33b..0000000000000 --- a/Formula/daemontools.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Daemontools < Formula - desc "Collection of tools for managing UNIX services" - homepage "https://cr.yp.to/daemontools.html" - url "https://cr.yp.to/daemontools/daemontools-0.76.tar.gz" - sha256 "a55535012b2be7a52dcd9eccabb9a198b13be50d0384143bd3b32b8710df4c1f" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "172b9445882bb8597d6956c6f84905294b4bb67080d126d73d365c46bd6d5c88" => :mojave - sha256 "29250f6ce1afab2b4ded2fd87257af7cfe6b2f98ff86753d6040b8f76e5a0648" => :high_sierra - sha256 "6a01bbd2d5ff12ef6ee8b21577b32828646a3a65bcfb99a62580e2017ec30c54" => :sierra - end - - def install - cd "daemontools-#{version}" do - system "package/compile" - bin.install Dir["command/*"] - end - end - - def caveats; <<~EOS - You must create the /service directory before starting svscan: - sudo mkdir /service - sudo brew services start daemontools - EOS - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/svscanboot - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - assert_match /Homebrew/, shell_output("#{bin}/softlimit -t 1 echo 'Homebrew'") - end -end diff --git a/Formula/dante.rb b/Formula/dante.rb deleted file mode 100644 index 7fb17c7e47d7f..0000000000000 --- a/Formula/dante.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Dante < Formula - desc "SOCKS server and client, implementing RFC 1928 and related standards" - homepage "https://www.inet.no/dante/" - url "https://www.inet.no/dante/files/dante-1.4.2.tar.gz" - sha256 "4c97cff23e5c9b00ca1ec8a95ab22972813921d7fbf60fc453e3e06382fc38a7" - - bottle do - cellar :any - rebuild 2 - sha256 "26eb48c9eda005d8486f2dddee23420047a326f82638b71c5aa2f7d28f3ce402" => :mojave - sha256 "6a234a72eb6a8bc9439a9a45129ca2214151dee7b63c1ab76c7b5831bda8d1ea" => :high_sierra - sha256 "5d4fb552b729372afc0b5450af162d9b49984c64e28d7f1825fd879b4cf3bdf7" => :sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-silent-rules", - # Enabling dependency tracking disables universal - # build, avoiding a build error on Mojave - "--enable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}/dante" - system "make", "install" - end - - test do - system "#{sbin}/sockd", "-v" - end -end diff --git a/Formula/daq.rb b/Formula/daq.rb deleted file mode 100644 index 393164e151a71..0000000000000 --- a/Formula/daq.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Daq < Formula - desc "Network intrusion prevention and detection system" - homepage "https://www.snort.org/" - url "https://www.mirrorservice.org/sites/distfiles.macports.org/daq/daq-2.0.6.tar.gz" - mirror "https://fossies.org/linux/misc/daq-2.0.6.tar.gz" - sha256 "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb" - - bottle do - cellar :any - sha256 "0cc2e4509d68cc4c8b59e0e398003d7f57d50d8c85e4f4c66fc943b215da4075" => :mojave - sha256 "d01c68e8ece0df01a1132b9591dad43a84381e601848915972fdbe9497ecada2" => :high_sierra - sha256 "f0be58035bc6f4764567cf186673035818e6025d027695795f959fdfc88c7806" => :sierra - sha256 "9c2720bd46954e9f2631801d8f8283974436a82827f01c9e954e319f0b9f7e88" => :el_capitan - sha256 "02d198f42f56471feaf127824230d7ea752490b3c7f5a34f8b50ff0a85062f01" => :yosemite - sha256 "8ce4fbbbb9f6189f6ee51d3223a81ebc7ea76069353bd284822989d6ccc364a5" => :mavericks - sha256 "bced15005e13eaa11ec6d47afbb1137f61231a191fb05a295e2762cc6cc8ef29" => :mountain_lion - end - - # libpcap on >= 10.12 has pcap_lib_version() instead of pcap_version - # Reported 8 Oct 2017 to bugs AT snort DOT org - if MacOS.version >= :sierra - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b345dac/daq/patch-pcap-version.diff" - sha256 "20d2bf6aec29824e2b7550f32251251cdc9d7aac3a0861e81a68cd0d1e513bf3" - end - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - DAQ_Module_Info_t* list; - int size = daq_get_module_list(&list); - daq_free_module_list(list, size); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ldaq", "-o", "test" - system "./test" - end -end diff --git a/Formula/dar.rb b/Formula/dar.rb deleted file mode 100644 index 0c480a21d5eda..0000000000000 --- a/Formula/dar.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Dar < Formula - desc "Backup directory tree and files" - homepage "http://dar.linux.free.fr/doc/index.html" - url "https://downloads.sourceforge.net/project/dar/dar/2.5.16/dar-2.5.16.tar.gz" - sha256 "e957c97101a17dc91dca00078457f225d2fa375d0db0ead7a64035378d4fc33b" - - bottle do - cellar :any - rebuild 1 - sha256 "3009db4f526f3657c3008475df42b5e1759ad9964c513f541de3c3c05e971ffb" => :mojave - sha256 "b872b6741e38ea818e1836fd218733331219c15acfb84a638dc213eec8925f6e" => :high_sierra - sha256 "263659de5c6418cadae4d2bbe71c4b45c14d7d5e91ae1fa62a8e2c7e8b3a2fd5" => :sierra - end - - depends_on "upx" => :build - depends_on "libgcrypt" - depends_on "lzo" - depends_on :macos => :el_capitan # needs thread-local storage - - needs :cxx11 - - def install - ENV.cxx11 - - system "./configure", "--prefix=#{prefix}", - "--disable-build-html", - "--disable-dar-static", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-libxz-linking", - "--enable-mode=64" - system "make", "install" - end - - test do - system bin/"dar", "-c", "test", "-R", "./Library" - system bin/"dar", "-d", "test", "-R", "./Library" - end -end diff --git a/Formula/darcs.rb b/Formula/darcs.rb deleted file mode 100644 index 071d25afe1703..0000000000000 --- a/Formula/darcs.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "language/haskell" - -class Darcs < Formula - include Language::Haskell::Cabal - - desc "Distributed version control system that tracks changes, via Haskell" - homepage "http://darcs.net/" - url "https://hackage.haskell.org/package/darcs-2.14.1/darcs-2.14.1.tar.gz" - sha256 "61ddbc99acaf06df3a114437064e9241e0da467c23d1d3fb520a782eee32cd35" - - bottle do - cellar :any_skip_relocation - sha256 "9a709960a2e92c4a1bc77bd1d14e98694a26bce78028c5dcb3c1456b86f1b449" => :mojave - sha256 "6618314c01b2aeed0ad4d8f10f017f4ed24ebb4d8bb96d77b92a4be0f5a36dc6" => :high_sierra - sha256 "b0063bb736e782887caa458a63899d66f84ebfeb4e950ad41b4ba27128ccf4fb" => :sierra - sha256 "61148f3fb7580ada1e83a2f1219942237e7fec26c6161fecdd8aa533e8529f98" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "gmp" - - def install - install_cabal_package - end - - test do - mkdir "my_repo" do - system bin/"darcs", "init" - (Pathname.pwd/"foo").write "hello homebrew!" - system bin/"darcs", "add", "foo" - system bin/"darcs", "record", "-am", "add foo", "--author=homebrew" - end - system bin/"darcs", "get", "my_repo", "my_repo_clone" - cd "my_repo_clone" do - assert_match "hello homebrew!", (Pathname.pwd/"foo").read - end - end -end diff --git a/Formula/dark-mode.rb b/Formula/dark-mode.rb deleted file mode 100644 index 433db4de2dc08..0000000000000 --- a/Formula/dark-mode.rb +++ /dev/null @@ -1,27 +0,0 @@ -class DarkMode < Formula - desc "Control the macOS dark mode from the command-line" - homepage "https://github.com/sindresorhus/dark-mode" - url "https://github.com/sindresorhus/dark-mode/archive/2.0.1.tar.gz" - sha256 "edea2a21e550194204bc54fe7f68d32dcc517138ac3b12cb17855e61c3260c68" - head "https://github.com/sindresorhus/dark-mode.git" - - bottle do - cellar :any_skip_relocation - sha256 "ef437b437412883b2fb50e72e717b30a3866c5f830e0cd07470b1e791244da9c" => :mojave - sha256 "fed4e173519d0fdb46694322689ea170c8478b721c045a8f706876d8805aad41" => :high_sierra - sha256 "ffc564c30ebfa6b2f90600524beacaf3741147407a9c8167c0f5c7b324e05036" => :sierra - sha256 "7557075bff978e306c392f81e713d987147ef8433da753656c8569de17611879" => :el_capitan - end - - depends_on :xcode => :build - depends_on :macos => :el_capitan - - def install - system "./build" - bin.install "bin/dark-mode" - end - - test do - system "#{bin}/dark-mode", "--version" - end -end diff --git a/Formula/darkhttpd.rb b/Formula/darkhttpd.rb deleted file mode 100644 index 9a08e189ee846..0000000000000 --- a/Formula/darkhttpd.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Darkhttpd < Formula - desc "Small static webserver without CGI" - homepage "https://unix4lyfe.org/darkhttpd/" - url "https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2" - sha256 "a50417b622b32b5f421b3132cb94ebeff04f02c5fb87fba2e31147d23de50505" - - bottle do - cellar :any_skip_relocation - sha256 "5af24e2fb0bd38aec2b8b3c0bcf685b54297bde3e1311f2d38d48f0bf10912ab" => :mojave - sha256 "b0da49675fa62225da80fd711cc426d2b58116355ae8c89c80de080479b777a5" => :high_sierra - sha256 "1271ecbcd73b02bc8977235ea0bfcfdceb1819cb476213e74bd7d352df8a464f" => :sierra - sha256 "cf8e5885072baed885238dc1a6b23466f80d96a32eb48d5f61f3b9d519df88b5" => :el_capitan - sha256 "2fc16040a837b47ac947b8462f93530a387f9db0e0d6a594e4b7dba3437e6e11" => :yosemite - sha256 "0ac0b5be3f8e944981806ed255740a6feaee64cd14d78d817e8c5a75391d9837" => :mavericks - end - - def install - system "make" - bin.install "darkhttpd" - end - - test do - system "#{bin}/darkhttpd", "--help" - end -end diff --git a/Formula/darkice.rb b/Formula/darkice.rb deleted file mode 100644 index d222b0214e622..0000000000000 --- a/Formula/darkice.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Darkice < Formula - desc "Live audio streamer" - homepage "http://www.darkice.org/" - url "https://downloads.sourceforge.net/project/darkice/darkice/1.3/darkice-1.3.tar.gz" - sha256 "2c0d0faaa627c0273b2ce8b38775a73ef97e34ef866862a398f660ad8f6e9de6" - revision 1 - - bottle do - cellar :any - sha256 "a35885863f951a6660c82a09158195172df5e8e29b1c02005e8627275a38d080" => :mojave - sha256 "e07c9c9beafe2a9fae19ae6570181ef838da42755b9d9677535f8410768c1e7e" => :high_sierra - sha256 "f5acac754cda3888160930ff630d33d5a7f134e455b21ad21a40b41150e12f49" => :sierra - sha256 "a3a9604162e1dd71c1ec69cfec895e0a92329e57f478a01131a2a00a3c495544" => :el_capitan - sha256 "64c3ebd7486589b3e9a216a4be8158ad94b1ceafac15934f97b4b3f3d684ad05" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "faac" - depends_on "jack" - depends_on "lame" - depends_on "libsamplerate" - depends_on "libvorbis" - depends_on "two-lame" - - def install - # Fixes "invalid conversion from 'const float*' to 'float*' [-fpermissive]" - # Upstream issue Oct 25, 2016 https://github.com/rafael2k/darkice/issues/119 - # Suggested fix Oct 25, 2016 https://github.com/rafael2k/darkice/pull/120 - ["aacPlusEncoder.cpp", "FaacEncoder.cpp", "OpusLibEncoder.cpp", "VorbisLibEncoder.cpp"].each do |f| - inreplace "src/#{f}", ", converterData.data_in", ", const_cast( converterData.data_in )" - end - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--with-lame-prefix=#{Formula["lame"].opt_prefix}", - "--with-faac-prefix=#{Formula["faac"].opt_prefix}", - "--with-twolame", - "--with-jack", - "--with-vorbis", - "--with-samplerate" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/darkice -h", 1) - end -end diff --git a/Formula/darksky-weather.rb b/Formula/darksky-weather.rb deleted file mode 100644 index 43e599ed1b732..0000000000000 --- a/Formula/darksky-weather.rb +++ /dev/null @@ -1,33 +0,0 @@ -class DarkskyWeather < Formula - desc "Command-line weather from the darksky.net API" - homepage "https://github.com/genuinetools/weather" - url "https://github.com/genuinetools/weather/archive/v0.15.6.tar.gz" - sha256 "a10edddd0e1157dbb95b3c31170806d3789f00939e4192ad90bb23a87a70e48c" - - bottle do - cellar :any_skip_relocation - sha256 "65017d8799925fab8fe8533fb385fb56dc6a22114ec0092f624031c926e550e1" => :mojave - sha256 "2b385bbbc7310dc75466acc8bba635ffceb523788f66040933a201f476d0b9a0" => :high_sierra - sha256 "5ba56cd686eb287578ddfc1ae25d5896ffd699b902852b1d68a0caaac4148f6e" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/genuinetools/weather").install buildpath.children - - cd "src/github.com/genuinetools/weather" do - project = "github.com/genuinetools/weather" - ldflags = ["-X #{project}/version.GITCOMMIT=homebrew", - "-X #{project}/version.VERSION=v#{version}"] - system "go", "build", "-o", bin/"weather", "-ldflags", ldflags.join(" ") - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/weather -location london") - assert_match "London in England", output - end -end diff --git a/Formula/darkstat.rb b/Formula/darkstat.rb deleted file mode 100644 index 8902cda37795a..0000000000000 --- a/Formula/darkstat.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Darkstat < Formula - desc "Network traffic analyzer" - homepage "https://unix4lyfe.org/darkstat/" - url "https://unix4lyfe.org/darkstat/darkstat-3.0.719.tar.bz2" - sha256 "aeaf909585f7f43dc032a75328fdb62114e58405b06a92a13c0d3653236dedd7" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "edef4012fbd6b7626fbbf324ae92c34afcaba39f09a8ac7c7e80a3e25cef71c7" => :mojave - sha256 "70eae96655d9872851ea02e44709155a6a9df509210fd2b49b0b72de334248f3" => :high_sierra - sha256 "680c9a1143b9a95990d246d7ba8357baa0ec1142545252d89734d98b8046337a" => :sierra - sha256 "4e67244fc36d17dbdbe9ae33cc38bd79d2e016eeed0139c164d323e89b15c15e" => :el_capitan - end - - head do - url "https://www.unix4lyfe.org/git/darkstat", :using => :git - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - # Patch reported to upstream on 2017-10-08 - # Work around `redefinition of clockid_t` issue on 10.12 SDK or newer - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/442ce4a5/darkstat/clock_gettime.patch" - sha256 "001b81d417a802f16c5bc4577c3b840799511a79ceedec27fc7ff1273df1018b" - end - - def install - system "autoreconf", "-iv" if build.head? - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system sbin/"darkstat", "--verbose", "-r", test_fixtures("test.pcap") - end -end diff --git a/Formula/dartsim.rb b/Formula/dartsim.rb deleted file mode 100644 index 1b0f950636592..0000000000000 --- a/Formula/dartsim.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Dartsim < Formula - desc "Dynamic Animation and Robotics Toolkit" - homepage "https://dartsim.github.io/" - url "https://github.com/dartsim/dart/archive/v6.6.2.tar.gz" - sha256 "3ac648fdac0633a2ea4dac37f78e37e5ced6edc2d82c3e2e9b7d8b7793df0845" - revision 3 - - bottle do - sha256 "76e85e3cf561b0a00af06478a1089f6b87257ca3aeb0cf942c349997b7dfabf5" => :mojave - sha256 "45e0844026b669163df72541fb289853159fe0013819499fcaab27e367d2e5cb" => :high_sierra - sha256 "5ab2c876c2469b9071155e27f936a83b15d101df886e98f88a76479aef8a7a3b" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "assimp" - depends_on "boost" - depends_on "bullet" - depends_on "eigen" - depends_on "fcl" - depends_on "flann" - depends_on "libccd" - depends_on "nlopt" - depends_on "ode" - depends_on "open-scene-graph" - depends_on "tinyxml2" - depends_on "urdfdom" - - needs :cxx11 - - def install - ENV.cxx11 - - # Force to link to system GLUT (see: https://cmake.org/Bug/view.php?id=16045) - system "cmake", ".", "-DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework", - *std_cmake_args - system "make", "install" - - # Avoid revision bumps whenever fcl's or libccd's Cellar paths change - inreplace share/"dart/cmake/dart_dartTargets.cmake" do |s| - s.gsub! Formula["fcl"].prefix.realpath, Formula["fcl"].opt_prefix - s.gsub! Formula["libccd"].prefix.realpath, Formula["libccd"].opt_prefix - end - - # Avoid revision bumps whenever urdfdom's or urdfdom_headers's Cellar paths change - inreplace share/"dart/cmake/dart_utils-urdfTargets.cmake" do |s| - s.gsub! Formula["urdfdom"].prefix.realpath, Formula["urdfdom"].opt_prefix - s.gsub! Formula["urdfdom_headers"].prefix.realpath, Formula["urdfdom_headers"].opt_prefix - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - auto world = std::make_shared(); - assert(world != nullptr); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{Formula["eigen"].include}/eigen3", - "-I#{include}", "-L#{lib}", "-ldart", - "-L#{Formula["assimp"].opt_lib}", "-lassimp", - "-L#{Formula["boost"].opt_lib}", "-lboost_system", - "-std=c++11", "-o", "test" - system "./test" - end -end diff --git a/Formula/dash.rb b/Formula/dash.rb deleted file mode 100644 index f0af0277339b1..0000000000000 --- a/Formula/dash.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Dash < Formula - desc "POSIX-compliant descendant of NetBSD's ash (the Almquist SHell)" - homepage "http://gondor.apana.org.au/~herbert/dash/" - url "http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.10.2.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/dash-0.5.10.2.tar.gz" - sha256 "3c663919dc5c66ec991da14c7cf7e0be8ad00f3db73986a987c118862b5f6071" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "aa6941a564fca697da6eb30e3691a8fa354de093d05ee84bbbc50c8045a55f66" => :mojave - sha256 "49ebe51a7662187224ab620aa50b0473b11c1f88372f7c17da328559d895f5e0" => :high_sierra - sha256 "4c7ca79c9b006065cb9bba57190103c518791b5a7ea078bb1f960e6f6c9dd7e9" => :sierra - end - - head do - url "https://git.kernel.org/pub/scm/utils/dash/dash.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./autogen.sh" if build.head? - - system "./configure", "--prefix=#{prefix}", - "--with-libedit", - "--disable-dependency-tracking" - system "make" - system "make", "install" - end - - test do - system "#{bin}/dash", "-c", "echo Hello!" - end -end diff --git a/Formula/dashing.rb b/Formula/dashing.rb deleted file mode 100644 index 4236556f6f416..0000000000000 --- a/Formula/dashing.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Dashing < Formula - desc "Generate Dash documentation from HTML files" - homepage "https://github.com/technosophos/dashing" - url "https://github.com/technosophos/dashing/archive/0.3.0.tar.gz" - sha256 "f6569f3df80c964c0482e7adc1450ea44532d8da887091d099ce42a908fc8136" - - bottle do - cellar :any_skip_relocation - sha256 "bb2b2cd4af4b6ac109bd7d8df6fdac88e901357c9f7acca90bb44314155e3bf1" => :mojave - sha256 "8977385e74741b7e014e971a320f58c360eede59f68894f1539040b5af474a25" => :high_sierra - sha256 "09fb6574fe2cf30bb94197730b7e6d3117929607a571e42058a40a5e7b500e70" => :sierra - sha256 "b37d425623bdbb32fe99d58c6d15cbc0753706aad3758aaf95ed229316e2a185" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - # Use ruby docs just as dummy documentation to test with - resource "ruby_docs_tarball" do - url "https://ruby-doc.org/downloads/ruby_2_5_0_core_rdocs.tgz" - sha256 "219e171641e979a5c8dee1b63347a1a26b94ba648aec96f7e6ed915d12bcaa15" - end - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - - (buildpath/"src/github.com/technosophos/dashing").install buildpath.children - cd "src/github.com/technosophos/dashing" do - system "glide", "install" - system "go", "build", "-o", bin/"dashing", "-ldflags", - "-X main.version=#{version}" - prefix.install_metafiles - end - end - - test do - # Make sure that dashing creates its settings file and then builds an actual - # docset for Dash - testpath.install resource("ruby_docs_tarball") - system bin/"dashing", "create" - assert_predicate testpath/"dashing.json", :exist? - system bin/"dashing", "build", "." - file = testpath/"dashing.docset/Contents/Resources/Documents/goruby_c.html" - assert_predicate file, :exist? - end -end diff --git a/Formula/dasht.rb b/Formula/dasht.rb deleted file mode 100644 index 1ec971166bc76..0000000000000 --- a/Formula/dasht.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Dasht < Formula - desc "Search API docs offline, in your terminal or browser" - homepage "https://sunaku.github.io/dasht" - url "https://github.com/sunaku/dasht/archive/v2.3.0.tar.gz" - sha256 "44db949eb95653e59d88eafce2b2d1e4378db66776e0d39ee15453dabf010e09" - - bottle :unneeded - - depends_on "socat" - depends_on "sqlite" - depends_on "w3m" - depends_on "wget" - - def install - bin.install Dir["bin/*"] - man.install "man/man1" - end - - test do - system "#{bin}/dasht-docsets-install", "--force", "bash" - assert_equal "Bash\n", shell_output("#{bin}/dasht-docsets") - end -end diff --git a/Formula/dasm.rb b/Formula/dasm.rb deleted file mode 100644 index dc1f8bf30709c..0000000000000 --- a/Formula/dasm.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Dasm < Formula - desc "Macro assembler with support for several 8-bit microprocessors" - homepage "https://dasm-dillon.sourceforge.io/" - url "https://downloads.sourceforge.net/project/dasm-dillon/dasm-dillon/2.20.11/dasm-2.20.11-2014.03.04-source.tar.gz" - sha256 "a9330adae534aeffbfdb8b3ba838322b92e1e0bb24f24f05b0ffb0a656312f36" - head "http://svn.code.sf.net/p/dasm-dillon/code/trunk" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d68b6f9a2a30a76f13fa1c38bb1855174e1f9dd7c9feff0f7336edd8a599e6e0" => :mojave - sha256 "8df31a4bcc48b92ee2569994dda6a5bd55335a0e92e1e19903a2c98377b440d1" => :high_sierra - sha256 "7425679bdb695c12ca174ca4f17e187a9a9aa5a92e7fe72bf8a561dd83aff4a7" => :sierra - sha256 "854a19f232cffdeabb1cb2afef4a5713e55b545519beea8f666f2cc4882d42e6" => :el_capitan - sha256 "1897ee7e4d76eeb74bd6aa3c94d73f14f55c44054dd296bbd724addb3ca3b00a" => :yosemite - sha256 "3383c91ce64d715a05595e49d38d16ea134e139dc7b87541d8c81bf5a9aeaf15" => :mavericks - end - - def install - system "make" - prefix.install "bin", "doc" - end - - test do - path = testpath/"a.asm" - path.write <<~EOS - ; Instructions must be preceded by whitespace - processor 6502 - org $c000 - jmp $fce2 - EOS - - system bin/"dasm", path - code = (testpath/"a.out").binread.unpack("C*") - assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code - end -end diff --git a/Formula/datamash.rb b/Formula/datamash.rb deleted file mode 100644 index 7588e6d1d4feb..0000000000000 --- a/Formula/datamash.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Datamash < Formula - desc "Tool to perform numerical, textual & statistical operations" - homepage "https://www.gnu.org/software/datamash" - url "https://ftp.gnu.org/gnu/datamash/datamash-1.3.tar.gz" - mirror "https://ftpmirror.gnu.org/datamash/datamash-1.3.tar.gz" - sha256 "eebb52171a4353aaad01921384098cf54eb96ebfaf99660e017f6d9fc96657a6" - - bottle do - cellar :any_skip_relocation - sha256 "2f62847e83bb67f3637a924ed2f9bac2704c4b2694855a38ff5cc7bb8f9aaa7b" => :mojave - sha256 "46375109fe618b238ce55f363a4ff37e1f02519446272b1164feacf7bd5614a4" => :high_sierra - sha256 "9e2c6fb923dae81c0969ec63851c520c9b74fc9160a2b884a228e23afccee9c7" => :sierra - sha256 "e8cee270f739abd46bea4dde5ae139b858e49cabacd4265b4d39b41a4c03eb1a" => :el_capitan - end - - head do - url "https://git.savannah.gnu.org/git/datamash.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - end - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "55", shell_output("seq 10 | #{bin}/datamash sum 1").chomp - end -end diff --git a/Formula/datetime-fortran.rb b/Formula/datetime-fortran.rb deleted file mode 100644 index d0f3a6fab63d7..0000000000000 --- a/Formula/datetime-fortran.rb +++ /dev/null @@ -1,39 +0,0 @@ -class DatetimeFortran < Formula - desc "Fortran time and date manipulation library" - homepage "https://github.com/wavebitscientific/datetime-fortran" - url "https://github.com/wavebitscientific/datetime-fortran/releases/download/v1.6.0/datetime-fortran-1.6.0.tar.gz" - sha256 "e46c583bca42e520a05180984315495495da4949267fc155e359524c2bf31e9a" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "d75d7804b0d14697f1b15089bc787e54a0fb57c55670ed21ec99fc577a05de92" => :mojave - sha256 "ea8405814e9c3e72a192836107d6620a9e3c6996b8c3169675dbe7cb44b345b6" => :high_sierra - sha256 "4d5d027551164ce741f3dd3915cc4d5b57e246120cd92ac002616c50d05ebd55" => :sierra - sha256 "5c20d20514118ec61bd76de9dbabe7a84e10d9c7a13c74cc1f95272af60d999e" => :el_capitan - end - - head do - url "https://github.com/wavebitscientific/datetime-fortran.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - end - - depends_on "gcc" # for gfortran - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-silent-rules" - system "make", "install" - (pkgshare/"test").install "src/tests/datetime_tests.f90" - end - - test do - system "gfortran", "-o", "test", "-I#{include}", "-L#{lib}", "-ldatetime", - pkgshare/"test/datetime_tests.f90" - system "./test" - end -end diff --git a/Formula/dateutils.rb b/Formula/dateutils.rb deleted file mode 100644 index 9729ddd60098b..0000000000000 --- a/Formula/dateutils.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Dateutils < Formula - desc "Tools to manipulate dates with a focus on financial data" - homepage "https://www.fresse.org/dateutils/" - url "https://github.com/hroptatyr/dateutils/releases/download/v0.4.5/dateutils-0.4.5.tar.xz" - sha256 "16d6a0fe7b7d49ddbb303f33538dd7304a0d4af5a0369bcbf275db6a5060cbde" - - bottle do - sha256 "449a56bc74916687dc223db32a6c4c1b4a528b4ded8f25063f0d422f11e423ba" => :mojave - sha256 "0bb1b166315c071b17e89cb7852ba1f53a320159ece30496657bfae759ddfb7a" => :high_sierra - sha256 "53533c638c7dac539ca314e0e5a0b74f9aaa6129f152cc77a5fc722c128c0063" => :sierra - end - - head do - url "https://github.com/hroptatyr/dateutils.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-iv" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/dconv 2012-03-04 -f \"%Y-%m-%c-%w\"").strip - assert_equal "2012-03-01-00", output - end -end diff --git a/Formula/dav1d.rb b/Formula/dav1d.rb deleted file mode 100644 index 6f58e5c2092da..0000000000000 --- a/Formula/dav1d.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Dav1d < Formula - desc "AV1 decoder targeted to be small and fast" - homepage "https://code.videolan.org/videolan/dav1d" - url "https://code.videolan.org/videolan/dav1d/-/archive/0.1.0/dav1d-0.1.0.tar.bz2" - sha256 "923f78d17aed08252608790eaed06a3d530763168fd6a8fc74e3306d7e01e6a5" - - bottle do - cellar :any - sha256 "f1b2efe50ba43547c9a51e5b1190c4aad90684f83ad42275c68db7fbb82b2331" => :mojave - sha256 "6d2163128de08761e95cc5a08864375d065f55cdc3afeb94b4dd222c9a5940d0" => :high_sierra - sha256 "a95b01e359731fffbd55a81edaae6293d70c1111cc548dc88e6254d942eb0f31" => :sierra - end - - depends_on "meson" => :build - depends_on "nasm" => :build - depends_on "ninja" => :build - - resource "00000000.ivf" do - url "https://people.xiph.org/~tterribe/av1/samples-all/00000000.ivf" - sha256 "52b4351f9bc8a876c8f3c9afc403d9e90f319c1882bfe44667d41c8c6f5486f3" - end - - def install - system "meson", "--prefix=#{prefix}", "build", "--buildtype", "release" - system "ninja", "install", "-C", "build" - end - - test do - testpath.install resource("00000000.ivf") - system bin/"dav1d", "-i", testpath/"00000000.ivf", "-o", testpath/"00000000.md5" - - assert_predicate (testpath/"00000000.md5"), :exist? - assert_match "0b31f7ae90dfa22cefe0f2a1ad97c620", (testpath/"00000000.md5").read - end -end diff --git a/Formula/davix.rb b/Formula/davix.rb deleted file mode 100644 index ba304ce02bfe4..0000000000000 --- a/Formula/davix.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Davix < Formula - desc "Library and tools for advanced file I/O with HTTP-based protocols" - homepage "https://dmc.web.cern.ch/projects/davix/home" - url "https://github.com/cern-it-sdc-id/davix.git", - :tag => "R_0_7_1", - :revision => "414d90721a729c6d1bc6866feebddfc4e2fd4caa" - version "0.7.1" - head "https://github.com/cern-it-sdc-id/davix.git" - - bottle do - cellar :any - sha256 "86fff80d2ff8aae77220e2bc996151a34c0f4abd0f70abe330572564a71e0a39" => :mojave - sha256 "f8c3f240c37c06dd16ab41b9fd458a2884296981ce898c13a5911ab628f3a41c" => :high_sierra - sha256 "cf1a6eaba6c3208b20cc44174ddaa716f39cd9fe5394ade09681749c987c6198" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "python@2" => :build - depends_on "openssl" - depends_on "ossp-uuid" - - def install - ENV.libcxx - - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/davix-get", "https://www.google.com" - end -end diff --git a/Formula/davmail.rb b/Formula/davmail.rb deleted file mode 100644 index 8484be537060a..0000000000000 --- a/Formula/davmail.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Davmail < Formula - desc "POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway" - homepage "https://davmail.sourceforge.io/" - url "https://downloads.sourceforge.net/project/davmail/davmail/4.9.0/davmail-4.9.0-2652.zip" - version "4.9.0" - sha256 "5c9d17534a6f9b8f3714d49087f50db54d012a982ec5e543a90a9196285c6280" - - bottle :unneeded - - def install - libexec.install Dir["*"] - bin.write_jar_script libexec/"davmail.jar", "davmail", "-Djava.awt.headless=true" - end - - plist_options :manual => "davmail" - - def plist; <<~EOS - - - - - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/davmail - - StartInterval - 300 - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end -end diff --git a/Formula/dbacl.rb b/Formula/dbacl.rb deleted file mode 100644 index 4b1bdcd4a4eb4..0000000000000 --- a/Formula/dbacl.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Dbacl < Formula - desc "Digramic Bayesian classifier" - homepage "https://dbacl.sourceforge.io/" - url "https://downloads.sourceforge.net/project/dbacl/dbacl/1.14.1/dbacl-1.14.1.tar.gz" - sha256 "ff0dfb67682e863b1c3250acc441ce77c033b9b21d8e8793e55b622e42005abd" - - bottle do - cellar :any_skip_relocation - sha256 "8a64ac80e91d8d5b2366046096098b851d503c58af65ef0858834c5794d039a5" => :mojave - sha256 "42c1c03e8df0b4db91dc99ace3ec87f3901f1aa6975430d597240ab5f9182c1f" => :high_sierra - sha256 "c6e6d74e2f2a86325ee895f8ef6893d99e1463d0018ead0d0da46e0dfd95c272" => :sierra - sha256 "750c29761c5784ddbd0d46643f2d462d8b22c14822773e2366db01be17a3e310" => :el_capitan - sha256 "b3d759bba5d1e478bc3df9e829594f49fb37cdd96e589937ebf4a7da87416855" => :yosemite - sha256 "09d4e7e62bc73cf25f16d366c768519e10f3ce33894c4a7eaa327046cc05889a" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"mark-twain.txt").write <<~EOS - The report of my death was an exaggeration. - The secret of getting ahead is getting started. - Travel is fatal to prejudice, bigotry, and narrow-mindedness. - I have never let my schooling interfere with my education. - Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Kindness is the language which the deaf can hear and the blind can see. - The two most important days in your life are the day you are born and the day you find out why. - Truth is stranger than fiction, but it is because Fiction is obliged to stick to possibilities; Truth isn't. - If you tell the truth, you don't have to remember anything. - It's not the size of the dog in the fight, it's the size of the fight in the dog. - EOS - - (testpath/"william-shakespeare.txt").write <<~EOS - Hell is empty and all the devils are here. - All that glitters is not gold - To thine own self be true, and it must follow, as the night the day, thou canst not then be false to any man. - Love all, trust a few, do wrong to none. - To be, or not to be, that is the question - Be not afraid of greatness: some are born great, some achieve greatness, and some have greatness thrust upon them. - The lady doth protest too much, methinks. - So full of artless jealousy is guilt, It spills itself in fearing to be spilt. - If music be the food of love, play on. - There is nothing either good or bad, but thinking makes it so. - The course of true love never did run smooth. - EOS - - system "#{bin}/dbacl", "-l", "twain", "mark-twain.txt" - system "#{bin}/dbacl", "-l", "shake", "william-shakespeare.txt" - - output = pipe_output("#{bin}/dbacl -v -c twain -c shake", "to be or not to be") - assert_equal "shake", output.strip - end -end diff --git a/Formula/dbhash.rb b/Formula/dbhash.rb deleted file mode 100644 index 5c3a2fa692c83..0000000000000 --- a/Formula/dbhash.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Dbhash < Formula - desc "Computes the SHA1 hash of schema and content of a SQLite database" - homepage "https://www.sqlite.org/dbhash.html" - url "https://sqlite.org/2018/sqlite-src-3260000.zip" - version "3.26.0" - sha256 "e042825ba823d61db7edc45e52655c0434903a1b54bbe85a55880c9aa5884f7b" - - bottle do - cellar :any_skip_relocation - sha256 "b1c8c8483e02a795de5515c11b1ec21b15c30ca82c3ac9f87154322fa4237973" => :mojave - sha256 "2207c65b8956bccd27056dd65c905b73dc4e41eab4a86fb4dbeb04405d1eff82" => :high_sierra - sha256 "bcaf1062b066f14132261ef326ba56bd827f05c2abf4957a32b35cd12b582167" => :sierra - end - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "dbhash" - bin.install "dbhash" - end - - test do - dbpath = testpath/"test.sqlite" - sqlpath = testpath/"test.sql" - sqlpath.write "create table test (name text);" - system "/usr/bin/sqlite3 #{dbpath} < #{sqlpath}" - assert_equal "b6113e0ce62c5f5ca5c9f229393345ce812b7309", - shell_output("#{bin}/dbhash #{dbpath}").strip.split.first - end -end diff --git a/Formula/dbus-glib.rb b/Formula/dbus-glib.rb deleted file mode 100644 index 1b0a0ee4290f1..0000000000000 --- a/Formula/dbus-glib.rb +++ /dev/null @@ -1,29 +0,0 @@ -class DbusGlib < Formula - desc "GLib bindings for the D-Bus message bus system" - homepage "https://wiki.freedesktop.org/www/Software/DBusBindings/" - url "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.110.tar.gz" - sha256 "7ce4760cf66c69148f6bd6c92feaabb8812dee30846b24cd0f7395c436d7e825" - - bottle do - cellar :any - sha256 "ef484037321aebc8a9b334044df997131aac7c269f13eafd33ebe23db8a08c90" => :mojave - sha256 "4e7193ebfc16eeb9635ae90023890df2735bcf8b28851ed8d284969548a3d4bd" => :high_sierra - sha256 "9eae92ddc86a2b845e3de72e75c8cf5f965e170c921b30dc6540e4126ee89ed8" => :sierra - sha256 "122823a60de6d94f947fd7a0db6f28ceb7c751b55e72a48d14917d021ed033ae" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "dbus" - depends_on "gettext" - depends_on "glib" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"dbus-binding-tool", "--help" - end -end diff --git a/Formula/dbus.rb b/Formula/dbus.rb deleted file mode 100644 index 42a7a4a86ec24..0000000000000 --- a/Formula/dbus.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Dbus < Formula - # releases: even (1.10.x) = stable, odd (1.11.x) = development - desc "Message bus system, providing inter-application communication" - homepage "https://wiki.freedesktop.org/www/Software/dbus" - url "https://dbus.freedesktop.org/releases/dbus/dbus-1.12.12.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/d/dbus/dbus_1.12.12.orig.tar.gz" - sha256 "9546f226011a1e5d9d77245fe5549ef25af4694053189d624d0d6ac127ecf5f8" - - bottle do - sha256 "35bf723ad353d87124779bcc175aa59c236bb327519d7606c0919859cd906dde" => :mojave - sha256 "8044e64e37449d5f91c0410263ddda23a7ed74e216bf619b89bb534b319473cd" => :high_sierra - sha256 "1fe2295f71bc0a96a12600741f11c4973b50b2c0ec3342521f0cbcee4f2a6e8b" => :sierra - end - - head do - url "https://anongit.freedesktop.org/git/dbus/dbus.git" - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "xmlto" => :build - - # Patch applies the config templating fixed in https://bugs.freedesktop.org/show_bug.cgi?id=94494 - # Homebrew pr/issue: 50219 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0a8a55872e/d-bus/org.freedesktop.dbus-session.plist.osx.diff" - sha256 "a8aa6fe3f2d8f873ad3f683013491f5362d551bf5d4c3b469f1efbc5459a20dc" - end - - def install - # Fix the TMPDIR to one D-Bus doesn't reject due to odd symbols - ENV["TMPDIR"] = "/tmp" - - # macOS doesn't include a pkg-config file for expat - ENV["EXPAT_CFLAGS"] = "-I#{MacOS.sdk_path}/usr/include" - ENV["EXPAT_LIBS"] = "-lexpat" - - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "./autogen.sh", "--no-configure" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sysconfdir=#{etc}", - "--enable-xml-docs", - "--disable-doxygen-docs", - "--enable-launchd", - "--with-launchd-agent-dir=#{prefix}", - "--without-x", - "--disable-tests" - system "make", "install" - end - - def post_install - # Generate D-Bus's UUID for this machine - system "#{bin}/dbus-uuidgen", "--ensure=#{var}/lib/dbus/machine-id" - end - - test do - system "#{bin}/dbus-daemon", "--version" - end -end diff --git a/Formula/dbxml.rb b/Formula/dbxml.rb deleted file mode 100644 index 1b477de987541..0000000000000 --- a/Formula/dbxml.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Dbxml < Formula - desc "Embeddable XML database with XQuery support and other advanced features" - homepage "https://www.oracle.com/database/berkeley-db/xml.html" - url "https://download.oracle.com/berkeley-db/dbxml-6.1.4.tar.gz" - sha256 "a8fc8f5e0c3b6e42741fa4dfc3b878c982ff8f5e5f14843f6a7e20d22e64251a" - revision 3 - - bottle do - sha256 "b525b9d21d149d533aeb62a169becfe1e140f143d34291d0a8fddf2ada41a018" => :mojave - sha256 "1886b654f152fc03a6a6e781ca94e5ca3a08f7f190bc1168326bf46b337c02e9" => :high_sierra - sha256 "2a350300c31d639d46e9fafc16747d5cbe1897035acf1c365f795127535693b3" => :sierra - sha256 "e2c82383d79f243654a0bbebdfb141334bbf683c6925b5a8f3ce0d1568024fec" => :el_capitan - end - - depends_on "berkeley-db" - depends_on "xerces-c" - depends_on "xqilla" - - # No public bug tracker or mailing list to submit this to, unfortunately. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/master/dbxml/c%2B%2B11.patch" - sha256 "98d518934072d86c15780f10ceee493ca34bba5bc788fd9db1981a78234b0dc4" - end - - needs :cxx11 - - def install - ENV.cxx11 - - inreplace "dbxml/configure" do |s| - s.gsub! "lib/libdb-*.la | sed -e 's\/.*db-\\\(.*\\\).la", "lib/libdb-*.a | sed -e 's/.*db-\\(.*\\).a" - s.gsub! "lib/libdb-*.la", "lib/libdb-*.a" - s.gsub! "libz.a", "libz.dylib" - end - - cd "dbxml" do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-xqilla=#{Formula["xqilla"].opt_prefix}", - "--with-xerces=#{Formula["xerces-c"].opt_prefix}", - "--with-berkeleydb=#{Formula["berkeley-db"].opt_prefix}" - system "make", "install" - end - end - - test do - (testpath/"simple.xml").write <<~EOS - - - Belgian Waffles - 650 - - - Homestyle Breakfast - 950 - - - EOS - - (testpath/"dbxml.script").write <<~EOS - createContainer "" - putDocument simple "simple.xml" f - cquery 'sum(//food/calories)' - print - quit - EOS - assert_equal "1600", shell_output("#{bin}/dbxml -s #{testpath}/dbxml.script").chomp - end -end diff --git a/Formula/dc3dd.rb b/Formula/dc3dd.rb deleted file mode 100644 index 83a5ad391065e..0000000000000 --- a/Formula/dc3dd.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Dc3dd < Formula - desc "Patched GNU dd that is intended for forensic acquisition of data" - homepage "https://sourceforge.net/projects/dc3dd/" - url "https://downloads.sourceforge.net/project/dc3dd/dc3dd/7.2.646/dc3dd%207.2.646/dc3dd-7.2.646.zip", - :using => :nounzip - sha256 "c4e325e5cbdae49e3855b0849ea62fed17d553428724745cea53fe6d91fd2b7f" - revision 1 - - bottle do - rebuild 1 - sha256 "91be6d42e350b7af3ae449044fd7ab6d5a78253e8e217578b90065c99a5b15f4" => :mojave - sha256 "42eadd524bba6cd7f4d4898f209aafd3aca03522d2dad45af7ede5262dbbb009" => :high_sierra - sha256 "bf191ae1f00552deaf5c966367cfca182d98ab6e84e284d06be62da8f517f2eb" => :sierra - end - - depends_on "gettext" - - resource "gettext-pm" do - url "https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/gettext-1.07.tar.gz" - sha256 "909d47954697e7c04218f972915b787bd1244d75e3bd01620bc167d5bbc49c15" - end - - def install - # Regular zip files created by 7-zip can upset /usr/bin/unzip by reporting a - # non-zero size for dirs. Work around this. - # Reported 32 Oct 2016 https://sourceforge.net/p/dc3dd/bugs/14/ - system "unzip dc3dd-#{version}.zip ; true" - - cd "dc3dd-#{version}" do - ENV.prepend_create_path "PERL5LIB", buildpath/"gettext-pm/lib/perl5" - resource("gettext-pm").stage do - inreplace "Makefile.PL", "$libs = \"-lintl\"", - "$libs = \"-L/usr/local/opt/gettext/lib -lintl\"" - system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}/gettext-pm" - system "make" - system "make", "install" - end - - # Fixes error: 'Illegal instruction: 4'; '%n used in a non-immutable format string' on 10.13 - # Patch comes from gnulib upstream (see https://sourceforge.net/p/dc3dd/bugs/17/) - inreplace "lib/vasnprintf.c", - "# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))", - "# if !(defined __APPLE__ && defined __MACH__)" - - chmod 0555, ["build-aux/install-sh", "configure"] - - args = %W[--disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --infodir=#{info}] - - # Check for stpncpy is broken, and the replacement fails to compile - # on Lion and newer; see https://github.com/Homebrew/homebrew/issues/21510 - args << "gl_cv_func_stpncpy=yes" if MacOS.version >= :lion - system "./configure", *args - system "make" - system "make", "install" - prefix.install %w[Options_Reference.txt Sample_Commands.txt] - end - end - - test do - system bin/"dc3dd", "--help" - end -end diff --git a/Formula/dcadec.rb b/Formula/dcadec.rb deleted file mode 100644 index 6ef0508b3b7d0..0000000000000 --- a/Formula/dcadec.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Dcadec < Formula - desc "DTS Coherent Acoustics decoder with support for HD extensions" - homepage "https://github.com/foo86/dcadec" - url "https://github.com/foo86/dcadec.git", - :tag => "v0.2.0", - :revision => "0e074384c9569e921f8facfe3863912cdb400596" - head "https://github.com/foo86/dcadec.git" - - bottle do - cellar :any_skip_relocation - sha256 "68b350a3ec6a1ab7384eac3341a03762e8233dec742c35f8dc2afc213b3db567" => :mojave - sha256 "7f938bcd68b9078df3dc6e67d82e08beb55b10228a808d91543a6ed2d15a2002" => :high_sierra - sha256 "7a51fb1bfa07f08c45176df419087429e9ffce945cbcd28d71e403c456762c74" => :sierra - sha256 "89ddc5e9a5cfd72e604bdff54ee1f09f9ad4ec281fc79c93201971bbd380ccdd" => :el_capitan - sha256 "640914a5ce466bbb91b551bdb35a385e4a8b08c25f78509a16c016c654963805" => :yosemite - sha256 "6d373b4fe5dbb76648183d83cd3161970e8f3674ea29a3133fa4d3c0a9f82ca1" => :mavericks - end - - resource "sample" do - url "https://github.com/foo86/dcadec-samples/raw/fa7dcf8c98c6d/xll_71_24_96_768.dtshd" - sha256 "d2911b34183f7379359cf914ee93228796894e0b0f0055e6ee5baefa4fd6a923" - end - - def install - system "make", "all" - system "make", "check" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - resource("sample").stage do - system "#{bin}/dcadec", resource("sample").cached_download - end - end -end diff --git a/Formula/dcal.rb b/Formula/dcal.rb deleted file mode 100644 index b3077195b3f21..0000000000000 --- a/Formula/dcal.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Dcal < Formula - desc "dcal(1) is to cal(1) what ddate(1) is to date(1)" - homepage "https://alexeyt.freeshell.org/" - url "https://alexeyt.freeshell.org/code/dcal.c" - version "0.1.0" - sha256 "d637fd27fc8d2a3c567b215fc05ee0fd9d88ba9fc5ddd5f0b07af3b8889dcba7" - - bottle do - cellar :any_skip_relocation - sha256 "95160b46c7fe651d0a808cba358c75b0346145e0ac9240dc1c91cb634e6f74f8" => :mojave - sha256 "74f5e51d4dca180bf93dc6d6cd1a147245db0b03a49992b4e0850e0af991020e" => :high_sierra - sha256 "e36329914f9b602d565480fbe28e4da3e581fc2d0623465666cb430590cc2519" => :sierra - sha256 "4135558d3a30c78364170daf22dc36f3c22a14b2574754edc27d2483e711b948" => :el_capitan - sha256 "f91b680d549342c293d0decae1fcd17d872951cedc20c329dcdd13a7478ed5fa" => :yosemite - sha256 "b5a277ca3a307bb47b137a76e2c8ee0fc1420b09819f0055b1010ef4ce5bc7ba" => :mavericks - sha256 "7288e5eb42261ff5912b985eb63c438aa03d89a5f09eea676b3088bc92c1dd6c" => :mountain_lion - end - - def install - system ENV.cxx, "dcal.c", "-o", "dcal" - bin.install "dcal" - end - - test do - system "#{bin}/dcal", "-3" - end -end diff --git a/Formula/dcd.rb b/Formula/dcd.rb deleted file mode 100644 index 862d9f04a3061..0000000000000 --- a/Formula/dcd.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Dcd < Formula - desc "Auto-complete program for the D programming language" - homepage "https://github.com/dlang-community/DCD" - url "https://github.com/dlang-community/DCD.git", - :tag => "v0.10.2", - :revision => "a163e33beb69cc661d8f82b3d983b4f39955f312" - head "https://github.com/dlang-community/dcd.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "a49897b2a0121373d7ebc89c00c7baa51ecf1b1a830055449099675b89044067" => :mojave - sha256 "3317946c71ba93b79d6004a36cf4d1e29c6fefbc7bdbd53d32410c3f566528dc" => :high_sierra - sha256 "2ca8ab9e734c5a1cd5008cec33fdbb322ff33a512a1d4bc6658e3796519e4fc8" => :sierra - end - - depends_on "dmd" => :build - - def install - system "make" - bin.install "bin/dcd-client", "bin/dcd-server" - end - - test do - begin - # spawn a server, using a non-default port to avoid - # clashes with pre-existing dcd-server instances - server = fork do - exec "#{bin}/dcd-server", "-p9167" - end - # Give it generous time to load - sleep 0.5 - # query the server from a client - system "#{bin}/dcd-client", "-q", "-p9167" - ensure - Process.kill "TERM", server - Process.wait server - end - end -end diff --git a/Formula/dcfldd.rb b/Formula/dcfldd.rb deleted file mode 100644 index 4e3e00fcffe28..0000000000000 --- a/Formula/dcfldd.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Dcfldd < Formula - desc "Enhanced version of dd for forensics and security" - homepage "https://dcfldd.sourceforge.io/" - url "https://downloads.sourceforge.net/project/dcfldd/dcfldd/1.3.4-1/dcfldd-1.3.4-1.tar.gz" - sha256 "f5143a184da56fd5ac729d6d8cbcf9f5da8e1cf4604aa9fb97c59553b7e6d5f8" - - bottle do - cellar :any_skip_relocation - sha256 "63b3928acc96ad685b064fa3de4f44c4b96d1cbb610d4ea8b7c205a41385a4e7" => :mojave - sha256 "95b0c080c543745a3a81751cc175fb99a1b75a7e124518d8e5d3337b76a97e72" => :high_sierra - sha256 "0958d948042f047d4249a7400f8c4f7adfe41f11c20aa04a0dbaac09c718ea2a" => :sierra - sha256 "0d5ff357d74fa90a97d80e202ddb5b5554bfec35efa2c4cb6e0f7e6dc9cf8ece" => :el_capitan - sha256 "4731a1409199c0eb8d83f9f2f23106c1f71ccb1f8d8faf71a3fd691ba394791f" => :yosemite - sha256 "5aeedb1165a426057dce57cf8b9b5b33db33f502d8cf2611276f2526bde1dda4" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/dcfldd", "--version" - end -end diff --git a/Formula/dcled.rb b/Formula/dcled.rb deleted file mode 100644 index 5e01f058f788c..0000000000000 --- a/Formula/dcled.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Dcled < Formula - desc "Linux driver for dream cheeky USB message board" - homepage "https://www.jeffrika.com/~malakai/dcled/index.html" - url "https://www.jeffrika.com/~malakai/dcled/dcled-2.2.tgz" - sha256 "0da78c04e1aa42d16fa3df985cf54b0fbadf2d8ff338b9bf59bfe103c2a959c6" - - bottle do - cellar :any - sha256 "4b94dd5ba218e3bdb0a10767d0ae62205495130baa839db4be4ab29d6561e5e2" => :mojave - sha256 "91cf7fa30d905efaf7499f0667c65e25ddb69d82be3f52b93d1df6a400fd7141" => :high_sierra - sha256 "bfc1532d76b4d37c706d065bc98feb5a3aeff20751a713d7b7efb08c0976fe9e" => :sierra - sha256 "53d07c9548eaeba12645e944ce92c27a02667758176815220dc4ee2a8945c661" => :el_capitan - sha256 "2ead7c4eb3c170690890c294936a2d3fc39def2fc332ce4c1da6d17cc8f91b50" => :yosemite - sha256 "47a0b2e1eba58932936c25726d631d19f0f2a0a7b8872aff9e1d3a83b4e3cfc9" => :mavericks - end - - depends_on "libhid" - depends_on "libusb" - - def install - system "make", "CC=#{ENV.cc}", - "LIBUSB_CFLAGS=-I#{Formula["libusb"].opt_include}/libusb-1.0" - system "make", "install", - "FONTDIR=#{share}/#{name}", - "INSTALLDIR=#{bin}" - end - - test do - system "#{bin}/dcled", "--help" - end -end diff --git a/Formula/dcm2niix.rb b/Formula/dcm2niix.rb deleted file mode 100644 index 6c77b70a0f86a..0000000000000 --- a/Formula/dcm2niix.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Dcm2niix < Formula - desc "DICOM to NIfTI converter" - homepage "https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage" - url "https://github.com/rordenlab/dcm2niix/archive/v1.0.20181125.tar.gz" - sha256 "7b17a1333423b383deb2235685390fb0f30495262eb7d0aed293c32cf669936c" - head "https://github.com/rordenlab/dcm2niix.git" - - bottle do - cellar :any_skip_relocation - sha256 "88007ff3d589db9d0d1bf279fdd5b4615832fb4705658d64ec75ba8392253276" => :mojave - sha256 "abacf45887c15b756f296ae821978290ec707a76982a8ea3be0088e2147ea0a1" => :high_sierra - sha256 "5a3b32eeef358216b95b6606dbd270f6393f3762372f185d3d5a778ad3e9d98d" => :sierra - end - - depends_on "cmake" => :build - - resource "sample.dcm" do - url "https://raw.githubusercontent.com/dangom/sample-dicom/master/MR000000.dcm" - sha256 "4efd3edd2f5eeec2f655865c7aed9bc552308eb2bc681f5dd311b480f26f3567" - end - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - resource("sample.dcm").stage testpath - system "#{bin}/dcm2niix", "-f", "%d_%e", "-z", "n", "-b", "y", testpath - assert_predicate testpath/"localizer_1.nii", :exist? - assert_predicate testpath/"localizer_1.json", :exist? - end -end diff --git a/Formula/dcmtk.rb b/Formula/dcmtk.rb deleted file mode 100644 index 4a964eeedbc76..0000000000000 --- a/Formula/dcmtk.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Dcmtk < Formula - desc "OFFIS DICOM toolkit command-line utilities" - homepage "https://dicom.offis.de/dcmtk.php.en" - url "https://dicom.offis.de/download/dcmtk/dcmtk363/dcmtk-3.6.3.tar.gz" - sha256 "63c373929f610653f10cbb8218ec643804eec6f842d3889d2b46a227da1ed530" - head "https://git.dcmtk.org/dcmtk.git" - - bottle do - sha256 "cf1f1557cbb1842de688bc31128a98e059cddad80e9265d1244129f838ae60d8" => :mojave - sha256 "ebc1492ba0b008c2d84e84cce1be2da9eb9210ffa8809bcfc710a0bcf35d5575" => :high_sierra - sha256 "c7771b2deb50e919f2b332d532f7f81bd67331a2350aea85f7f61658a70b5b15" => :sierra - sha256 "586903834cdc7bbc4ffc7adb5478b63fb80df1f95b1a631a8b41d5b54bbc275f" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "libpng" - depends_on "libtiff" - depends_on "openssl" - - def install - mkdir "build" do - system "cmake", *std_cmake_args, ".." - system "make", "install" - end - end - - test do - system bin/"pdf2dcm", "--verbose", - test_fixtures("test.pdf"), testpath/"out.dcm" - system bin/"dcmftest", testpath/"out.dcm" - end -end diff --git a/Formula/dcos-cli.rb b/Formula/dcos-cli.rb deleted file mode 100644 index c80a529e3cdc7..0000000000000 --- a/Formula/dcos-cli.rb +++ /dev/null @@ -1,137 +0,0 @@ -class DcosCli < Formula - include Language::Python::Virtualenv - - desc "Cross-platform command-line utility to manage DC/OS clusters" - homepage "https://dcos.io/docs/latest/cli/" - url "https://github.com/dcos/dcos-cli/archive/0.6.3.tar.gz" - sha256 "4cb59674eb0191bb6471749a8352a1d7611173d6357f318fc69678416c040cfe" - head "https://github.com/dcos/dcos-cli.git" - - bottle do - cellar :any - sha256 "96c9722c152028ed02e76bd782c50722fb6469677e0f4d59e351f5da36802855" => :mojave - sha256 "290b09815b412354a29728fd37bb1217192bf6e91913dbc43dbc798f237a6e5a" => :high_sierra - sha256 "052ac256bd597fce2dd43ea317f493ec2f355407a525261bb3e6fc8561ce27d4" => :sierra - sha256 "f682f24ac66465cc1367e7fe30be40e430f420d8d65a0e7b4fcecc65ae6cad8f" => :el_capitan - end - - depends_on "openssl" - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d/certifi-2018.4.16.tar.gz" - sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/79/a2/61c8625f96c8582d3053f89368c483ba62e56233d055e58e372f94a393f0/cryptography-2.3.tar.gz" - sha256 "c132bab45d4bd0fff1d3fe294d92b0a6eb8404e93337b3127bdec9f21de117e6" - end - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz" - sha256 "6ff5f3180870836cae40f06fa10419f557208175f13ad7bc26caa77beb1f6e02" - end - - resource "pager" do - url "https://files.pythonhosted.org/packages/5f/a1/95f8605e50c0ccc85ae53f63f5c4cb83b72f71fbd049a0e8259913e2cc22/pager-3.3.tar.gz" - sha256 "18aa45ec877dca732e599531c7b3b0b22ed6a4445febdf1bdf7da2761cca340d" - end - - resource "pkginfo" do - url "https://files.pythonhosted.org/packages/a9/52/f6f41c68625a79bc037d8d75b5a5aa5f525ce2831152be81b5fdb5150175/pkginfo-1.2.1.tar.gz" - sha256 "ad3f6dfe8a831f96a7b56a588ca874137ca102cc6b79fc9b0a1c3b7ab7320f3c" - end - - resource "PrettyTable" do - url "https://files.pythonhosted.org/packages/ef/30/4b0746848746ed5941f052479e7c23d2b56d174b82f4fd34a25e389831f5/prettytable-0.7.2.tar.bz2" - sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - resource "PyJWT" do - url "https://files.pythonhosted.org/packages/c9/2a/ffd27735280696f6f244c8d1b4d2dd130511340475a29768ed317f9eaf0c/PyJWT-1.5.3.tar.gz" - sha256 "500be75b17a63f70072416843dc80c8821109030be824f4d14758f114978bae7" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "retrying" do - url "https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz" - sha256 "08c039560a6da2fe4f2c426d0766e284d3b736e355f8dd24b37367b0bb41973b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "sseclient" do - url "https://files.pythonhosted.org/packages/e3/fd/29f3bb9beaabf36fe61ff08463e9a2c49c54b9cfee20eceafd5c922e790a/sseclient-0.0.19.tar.gz" - sha256 "7a2ea3f4c8525ae9a677bc8193df5db88e23bcaafcc34938a1ee665975703a9f" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/f5/f9/044110c267e6408013b85166a7cfcd352cf85275aa8ce700aa5c0eb407ba/toml-0.9.4.tar.gz" - sha256 "8e86bd6ce8cc11b9620cb637466453d94f5d57ad86f17e98a98d1f73e3baab2d" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - def install - venv = virtualenv_create(libexec, "python3") - venv.pip_install resources - venv.pip_install [buildpath, buildpath/"cli"] - bin.install_symlink libexec/"bin/dcos" - end - - test do - assert_match "dcoscli.version=", shell_output("#{bin}/dcos --version") - assert_match "dcos \[options\] \[\\] \[\...\]", shell_output("#{bin}/dcos --help") - end -end diff --git a/Formula/dcraw.rb b/Formula/dcraw.rb deleted file mode 100644 index e5ec712ce7e7f..0000000000000 --- a/Formula/dcraw.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Dcraw < Formula - desc "Digital camera RAW photo decoding software" - homepage "https://www.cybercom.net/~dcoffin/dcraw/" - url "https://www.cybercom.net/~dcoffin/dcraw/archive/dcraw-9.28.0.tar.gz" - mirror "https://mirrorservice.org/sites/distfiles.macports.org/dcraw/dcraw-9.28.0.tar.gz" - sha256 "2890c3da2642cd44c5f3bfed2c9b2c1db83da5cec09cc17e0fa72e17541fb4b9" - - bottle do - cellar :any - sha256 "4673710b946c4fa3eb47d0b693b380e8abb636202ce86e0e13372a8539141bd8" => :mojave - sha256 "21f31347e500f314a1f2e6fe03f0d6009b25fa5bd9f1f339b0fe77fc38050e81" => :high_sierra - sha256 "dc99d6de1166a3f4fa66d23b798dad9a58e0fac24f72c02ab38ea32e74b30a9e" => :sierra - sha256 "022f85e8da7b4cd8c68d7251d39bf3084ec28a15cb859d9cfe49bd439e312466" => :el_capitan - end - - depends_on "jasper" - depends_on "jpeg" - depends_on "little-cms2" - - def install - ENV.append_to_cflags "-I#{HOMEBREW_PREFIX}/include -L#{HOMEBREW_PREFIX}/lib" - system ENV.cc, "-o", "dcraw", ENV.cflags, "dcraw.c", "-lm", "-ljpeg", "-llcms2", "-ljasper" - bin.install "dcraw" - man1.install "dcraw.1" - end - - test do - assert_match "\"dcraw\" v9", shell_output("#{bin}/dcraw", 1) - end -end diff --git a/Formula/ddar.rb b/Formula/ddar.rb deleted file mode 100644 index 730d1328fe1a6..0000000000000 --- a/Formula/ddar.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ddar < Formula - desc "De-duplicating archiver" - homepage "https://github.com/basak/ddar" - url "https://github.com/basak/ddar/archive/v1.0.tar.gz" - sha256 "b95a11f73aa872a75a6c2cb29d91b542233afa73a8eb00e8826633b8323c9b22" - revision 5 - head "https://github.com/basak/ddar.git" - - bottle do - cellar :any_skip_relocation - sha256 "fba182119e1413c6c6a38cd9d4571426685b39f290c3234d16f469f2ab455c78" => :mojave - sha256 "f8fe594bc5a8628495e057b25bcb644b5799ac05ce1b7c0d85fd01ed8d77dc8e" => :high_sierra - sha256 "3d9bd53fe084276e7e57ccbb4f4cadfef811182b487bc2e93dd4f373fd3784c5" => :sierra - sha256 "3925167c1884bc6dc522d603f216671a897e86faa6eee6c9e34a2bbeaa2d4450" => :el_capitan - sha256 "bb01afc3ebd42f46e00d00eddbcb8ae000ecbe50a19aa5512a84f7fab5faaf91" => :yosemite - end - - depends_on "xmltoman" => :build - depends_on "protobuf" - depends_on "python@2" # does not support Python 3 - - def install - system "make", "-f", "Makefile.prep", "pydist" - system "python", "setup.py", "install", - "--prefix=#{prefix}", - "--single-version-externally-managed", - "--record=installed.txt" - - bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - man1.install Dir["*.1"] - end -end diff --git a/Formula/ddate.rb b/Formula/ddate.rb deleted file mode 100644 index 20f67fdcd5ca6..0000000000000 --- a/Formula/ddate.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ddate < Formula - desc "Converts boring normal dates to fun Discordian Date" - homepage "https://github.com/bo0ts/ddate" - url "https://github.com/bo0ts/ddate/archive/v0.2.2.tar.gz" - sha256 "d53c3f0af845045f39d6d633d295fd4efbe2a792fd0d04d25d44725d11c678ad" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "bac9bcfe773de4c34915a353fe6f8808ac26f8253d0da9d43ab9787b4988ff44" => :mojave - sha256 "31a72f135768fdf09ddc40539e3860e3489cf478cca07f6af71d8d3428447a78" => :high_sierra - sha256 "61be1f5fc044574ede464807fba1e092bc165932a909a357f5cd71b0cbfd4726" => :sierra - sha256 "fe87fe60ad1e8cbff1ebbcefd8be0f6f8ec87013a91e6385adbde0aebd45edea" => :el_capitan - sha256 "ad575dd84b5d2ac8395c9cd11c4ef811f28f105eb81510369bb33078164ec2e9" => :yosemite - sha256 "6d1dd4a9a1cc787cbd79add910fd80181dc5efc24712b9e84a7c37ce8de46d12" => :mavericks - end - - def install - system ENV.cc, "ddate.c", "-o", "ddate" - bin.install "ddate" - man1.install "ddate.1" - end - - test do - output = shell_output("#{bin}/ddate 20 6 2014").strip - assert_equal "Sweetmorn, Confusion 25, 3180 YOLD", output - end -end diff --git a/Formula/ddclient.rb b/Formula/ddclient.rb deleted file mode 100644 index 5acc634d964bc..0000000000000 --- a/Formula/ddclient.rb +++ /dev/null @@ -1,121 +0,0 @@ -class Ddclient < Formula - desc "Update dynamic DNS entries" - homepage "https://sourceforge.net/p/ddclient/wiki/Home" - url "https://downloads.sourceforge.net/project/ddclient/ddclient/ddclient-3.9.0/ddclient-3.9.0.tar.gz" - sha256 "9c4ae902742e8a37790d3cc8fad4e5b0f38154c76bba3643f4423d8f96829e3b" - head "https://github.com/wimpunk/ddclient.git" - - bottle do - cellar :any_skip_relocation - sha256 "cb9631a6394ad174c9b28da23e66ddd2487aec8288874e0341b28bb5b2a42209" => :mojave - sha256 "f53e130d1b87b70e10fc6746ef5270d4e25031c8c6f4ba2e2ffcb3d3799e09ca" => :high_sierra - sha256 "3314806cf6fe3e64da60949fb77973ef4c38d56830050a404fcdabf5ba27c777" => :sierra - sha256 "d3ef79c5455f31ed75a662be41262c51838a6164fd68b08868ed90c2ee511efc" => :el_capitan - end - - resource "Data::Validate::IP" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Data-Validate-IP-0.27.tar.gz" - sha256 "e1aa92235dcb9c6fd9b6c8cda184d1af73537cc77f4f83a0f88207a8bfbfb7d6" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - end - - # Adjust default paths in script - inreplace "ddclient" do |s| - s.gsub! "/etc/ddclient", "#{etc}/ddclient" - s.gsub! "/var/cache/ddclient", "#{var}/run/ddclient" - end - - sbin.install "ddclient" - sbin.env_script_all_files(libexec/"sbin", :PERL5LIB => ENV["PERL5LIB"]) - - # Install sample files - inreplace "sample-ddclient-wrapper.sh", - "/etc/ddclient", "#{etc}/ddclient" - - inreplace "sample-etc_cron.d_ddclient", - "/usr/sbin/ddclient", "#{sbin}/ddclient" - - inreplace "sample-etc_ddclient.conf", - "/var/run/ddclient.pid", "#{var}/run/ddclient/pid" - - doc.install %w[ - sample-ddclient-wrapper.sh - sample-etc_cron.d_ddclient - sample-etc_ddclient.conf - ] - end - - def post_install - (etc/"ddclient").mkpath - (var/"run/ddclient").mkpath - end - - def caveats; <<~EOS - For ddclient to work, you will need to create a configuration file - in #{etc}/ddclient, a sample configuration can be found in - #{opt_share}/doc/ddclient. - - Note: don't enable daemon mode in the configuration file; see - additional information below. - - The next reboot of the system will automatically start ddclient. - - You can adjust the execution interval by changing the value of - StartInterval (in seconds) in /Library/LaunchDaemons/#{plist_path.basename}, - and then - EOS - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/ddclient - -file - #{etc}/ddclient/ddclient.conf - - RunAtLoad - - StartInterval - 300 - WatchPaths - - #{etc}/ddclient - - WorkingDirectory - #{etc}/ddclient - - - EOS - end - - test do - begin - pid = fork do - exec sbin/"ddclient", "-file", doc/"sample-etc_ddclient.conf", "-debug", "-verbose", "-noquiet" - end - sleep 1 - ensure - Process.kill "TERM", pid - Process.wait - end - $CHILD_STATUS.success? - end -end diff --git a/Formula/ddd.rb b/Formula/ddd.rb deleted file mode 100644 index ede4adbd4ab7d..0000000000000 --- a/Formula/ddd.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Ddd < Formula - desc "Graphical front-end for command-line debuggers" - homepage "https://www.gnu.org/s/ddd/" - url "https://ftp.gnu.org/gnu/ddd/ddd-3.3.12.tar.gz" - mirror "https://ftpmirror.gnu.org/ddd/ddd-3.3.12.tar.gz" - sha256 "3ad6cd67d7f4b1d6b2d38537261564a0d26aaed077bf25c51efc1474d0e8b65c" - revision 1 - - bottle do - rebuild 1 - sha256 "41917b105d1329eaa9421fe314e449fca4c9b9f27b5c4a2ad10d0dbb746a8cea" => :mojave - sha256 "381ae07c96a67534b05a03ca72741d99aa3437a01c0fef603336ea218c470df9" => :high_sierra - sha256 "af12e95b5b4326906236559a40f6715e896d164d5c18d9448384e0e22d089abf" => :sierra - sha256 "68864faf1967b400bc5df5809ab9ee03a0d632f3736071131dd5469be715c58f" => :el_capitan - end - - depends_on "openmotif" - depends_on :x11 - - # Needed for OSX 10.9 DP6 build failure: - # https://savannah.gnu.org/patch/?8178 - if MacOS.version >= :mavericks - patch :p0 do - url "https://savannah.gnu.org/patch/download.php?file_id=29114" - sha256 "aaacae79ce27446ead3483123abef0f8222ebc13fd61627bfadad96016248af6" - end - end - - # https://savannah.gnu.org/bugs/?41997 - patch do - url "https://savannah.gnu.org/patch/download.php?file_id=31132" - sha256 "f3683f23c4b4ff89ba701660031d4b5ef27594076f6ef68814903ff3141f6714" - end - - # Patch to fix compilation with Xcode 9 - # https://savannah.gnu.org/bugs/?52175 - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/a71fa9f4/devel/ddd/files/patch-unknown-type-name-a_class.diff" - sha256 "c187a024825144f186f0cf9cd175f3e972bb84590e62079793d0182cb15ca183" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--enable-builtin-app-defaults", - "--enable-builtin-manual", - "--prefix=#{prefix}" - - # From MacPorts: make will build the executable "ddd" and the X resource - # file "Ddd" in the same directory, as HFS+ is case-insensitive by default - # this will loosely FAIL - system "make", "EXEEXT=exe" - - ENV.deparallelize - system "make", "install", "EXEEXT=exe" - mv bin/"dddexe", bin/"ddd" - end - - test do - output = shell_output("#{bin}/ddd --version") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - end -end diff --git a/Formula/ddgr.rb b/Formula/ddgr.rb deleted file mode 100644 index 7a51598c8dc40..0000000000000 --- a/Formula/ddgr.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Ddgr < Formula - desc "DuckDuckGo from the terminal" - homepage "https://github.com/jarun/ddgr" - url "https://github.com/jarun/ddgr/archive/v1.6.tar.gz" - sha256 "eae7ff1ab44dfda168a8bbe46593e80ca4a26ab45a9efbab13e6f466349e0e5c" - - bottle do - cellar :any_skip_relocation - sha256 "0c307cf8cb01fee1ad0306e8463dfae4ece2d47974e3d44105326255b0b72a03" => :mojave - sha256 "598196edcbeb1d40d9288bad01775b2b56713758e24a51538a6487dc57bd8521" => :high_sierra - sha256 "598196edcbeb1d40d9288bad01775b2b56713758e24a51538a6487dc57bd8521" => :sierra - end - - depends_on "python" - - def install - system "make", "install", "PREFIX=#{prefix}" - bash_completion.install "auto-completion/bash/ddgr-completion.bash" - fish_completion.install "auto-completion/fish/ddgr.fish" - zsh_completion.install "auto-completion/zsh/_ddgr" - end - - test do - ENV["PYTHONIOENCODING"] = "utf-8" - assert_match "Homebrew", shell_output("#{bin}/ddgr --noprompt Homebrew") - end -end diff --git a/Formula/ddrescue.rb b/Formula/ddrescue.rb deleted file mode 100644 index 4cc5940edf441..0000000000000 --- a/Formula/ddrescue.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ddrescue < Formula - desc "GNU data recovery tool" - homepage "https://www.gnu.org/software/ddrescue/ddrescue.html" - url "https://ftp.gnu.org/gnu/ddrescue/ddrescue-1.23.tar.lz" - mirror "https://ftpmirror.gnu.org/ddrescue/ddrescue-1.23.tar.lz" - sha256 "a9ae2dd44592bf386c9c156a5dacaeeb901573c9867ada3608f887d401338d8d" - - bottle do - cellar :any_skip_relocation - sha256 "1c229db4c0e74144c629f0e95014216468d05eae87ded6d5d730745edd98c51b" => :mojave - sha256 "cea23ba7f2730135b634d896d835c9c55572900fbc8263993697e1273b67dfb0" => :high_sierra - sha256 "b0759371cbeedf705c56867910da5536f4aa8b6560d2ebdf8fd6c9f2ba71199e" => :sierra - sha256 "eab68f77a7570e59f007ea4b6fe47b9882c24ad2b626db375f9f42888476cf5c" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", - "CXX=#{ENV.cxx}" - system "make", "install" - end - - test do - system bin/"ddrescue", "--force", "--size=64Ki", "/dev/zero", "/dev/null" - end -end diff --git a/Formula/deark.rb b/Formula/deark.rb deleted file mode 100644 index 3e1cb398e233e..0000000000000 --- a/Formula/deark.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "base64" - -class Deark < Formula - desc "File conversion utility for older formats" - homepage "https://entropymine.com/deark/" - url "https://entropymine.com/deark/releases/deark-1.4.7.tar.gz" - sha256 "f26441f7f361e9f4bf584866d46995e35441ea88f269cb6c024881a5d17c11ff" - - bottle do - cellar :any_skip_relocation - sha256 "1c25be43a16ed39998d9990b5f971b0ea826c5656fcdfb2e787a6a63ee674d66" => :mojave - sha256 "08b71c8e1e78027c5a2803ce561460c61a7b85a0d9ee1b5853d388032b6c3549" => :high_sierra - sha256 "68c9616ad4a90b7b364e1918ac6938a8b2b8bc407a97fd72b437dac6aa0d6230" => :sierra - sha256 "0927ea0354c7f6da3d71dda9cb060a407d4325eba2e6c37da62118666936fcb6" => :el_capitan - end - - def install - system "make" - bin.install "deark" - end - - test do - (testpath/"test.gz").write ::Base64.decode64 <<~EOS - H4sICKU51VoAA3Rlc3QudHh0APNIzcnJ11HwyM9NTSpKLVfkAgBuKJNJEQAAAA== - EOS - system "#{bin}/deark", "test.gz" - file = (testpath/"output.000.test.txt").readlines.first - assert_match "Hello, Homebrew!", file - end -end diff --git a/Formula/debianutils.rb b/Formula/debianutils.rb deleted file mode 100644 index 818b635d470a1..0000000000000 --- a/Formula/debianutils.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Debianutils < Formula - desc "Miscellaneous utilities specific to Debian" - homepage "https://packages.debian.org/sid/debianutils" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/debianutils/debianutils_4.8.6.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/d/debianutils/debianutils_4.8.6.tar.xz" - sha256 "db09047144dadf6a35d0f28977fbef83b0dd60ca32e6c8512cce2444a6423f73" - - bottle do - cellar :any_skip_relocation - sha256 "ac15a7442e74e2efe7af79c8f64f07369356fefb3300503012323f08c5ca3507" => :mojave - sha256 "65d07fd030d0c4d6d72ce61090ab23cf4a8dfd77718a608a9ed53acfb87c59e7" => :high_sierra - sha256 "37e20aa552607720417a814fadafb1f0fda6c9fd3d94d5173986ee95540b59fe" => :sierra - sha256 "25b66356579ae53a7e8ef951170dd51fd8b7769ebcb58d3ca017cec17994520e" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - - # Some commands are Debian Linux specific and we don't want them, so install specific tools - bin.install "run-parts", "ischroot", "tempfile" - man1.install "ischroot.1", "tempfile.1" - man8.install "run-parts.8" - end - - test do - output = shell_output("#{bin}/tempfile -d #{Dir.pwd}").strip - assert_predicate Pathname.new(output), :exist? - end -end diff --git a/Formula/defaultbrowser.rb b/Formula/defaultbrowser.rb deleted file mode 100644 index f43a029d0c480..0000000000000 --- a/Formula/defaultbrowser.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Defaultbrowser < Formula - desc "Command-line tool for getting & setting the default browser" - homepage "https://github.com/kerma/defaultbrowser" - url "https://github.com/kerma/defaultbrowser/archive/1.1.tar.gz" - sha256 "56249f05da912bbe828153d775dc4f497f5a8b453210c2788d6a439418ac2ea3" - - bottle do - cellar :any_skip_relocation - sha256 "3a02a1fd0321f5070fa4ec9088a4a58a28ddb561bef5b94a0ccc31fdb896efa6" => :mojave - sha256 "d07cc35e06f440584d698cde7ae5f27b09acfeafacc1499d331aa8553e945961" => :high_sierra - sha256 "d0279f8c05c0c7828c534517897346fc231864ea8534f0ae04878ecfd51ca72d" => :sierra - sha256 "f0ccf84abbd31469f80c4d232292dd280a978d3f04a1a6db46079902d9821d1e" => :el_capitan - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # defaultbrowser outputs a list of browsers by default; - # safari is pretty much guaranteed to be in that list - assert_match "safari", shell_output("#{bin}/defaultbrowser") - end -end diff --git a/Formula/deheader.rb b/Formula/deheader.rb deleted file mode 100644 index 007976eb381a2..0000000000000 --- a/Formula/deheader.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Deheader < Formula - desc "Analyze C/C++ files for unnecessary headers" - homepage "http://www.catb.org/~esr/deheader" - url "http://www.catb.org/~esr/deheader/deheader-1.6.tar.gz", - :using => :nounzip - sha256 "3b99665c4f0dfda31d200bf2528540d6898cb846499ee91effa2e8f72aff3a60" - head "https://gitlab.com/esr/deheader.git" - - bottle do - cellar :any_skip_relocation - sha256 "cef55345cf5a32b30aa7d9a320b3143eb05b5f8329a8abbfad2a247622ab233f" => :mojave - sha256 "cf2689471e033bb6e55cd948679eef30c9abecb17f022fc6cb914fbe0ca85c6d" => :high_sierra - sha256 "2b70a9eb18042a3e93ab8fc1bf018c417d8b41f9b8efe6d818d45aed6922cf52" => :sierra - sha256 "2b70a9eb18042a3e93ab8fc1bf018c417d8b41f9b8efe6d818d45aed6922cf52" => :el_capitan - sha256 "2b70a9eb18042a3e93ab8fc1bf018c417d8b41f9b8efe6d818d45aed6922cf52" => :yosemite - end - - depends_on "xmlto" => :build - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - # Remove for > 1.6 - # Fix "deheader-1.6/deheader.1: Can't create 'deheader-1.6/deheader.1'" - # See https://gitlab.com/esr/deheader/commit/ea5d8d4 - system "/usr/bin/tar", "-xvqf", "deheader-1.6.tar.gz", - "deheader-1.6/deheader.1" - system "/usr/bin/tar", "-xvf", "deheader-1.6.tar.gz", "--exclude", - "deheader-1.6/deheader.1" - cd "deheader-1.6" do - system "make" - bin.install "deheader" - man1.install "deheader.1" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main(void) { - printf("%s", "foo"); - return 0; - } - EOS - assert_equal "121", shell_output("#{bin}/deheader test.c | tr -cd 0-9") - end -end diff --git a/Formula/dehydrated.rb b/Formula/dehydrated.rb deleted file mode 100644 index b1e9e3cee0553..0000000000000 --- a/Formula/dehydrated.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Dehydrated < Formula - desc "LetsEncrypt/acme client implemented as a shell-script" - homepage "https://dehydrated.de" - url "https://github.com/lukas2511/dehydrated/archive/v0.6.2.tar.gz" - sha256 "163384479199f06f59382ceb6291a299567a2f4f0b963b9b61f2db65a407e80e" - - bottle do - cellar :any_skip_relocation - sha256 "d21b6d1cd29019957b14e7dcfb73a95efd9dcff917cdf983227b4b1defcc3a80" => :mojave - sha256 "d15ef3ebfbc9bfc48c16192a885bf5580f0269f05a62e569b18e18049cbe917d" => :high_sierra - sha256 "d15ef3ebfbc9bfc48c16192a885bf5580f0269f05a62e569b18e18049cbe917d" => :sierra - sha256 "d15ef3ebfbc9bfc48c16192a885bf5580f0269f05a62e569b18e18049cbe917d" => :el_capitan - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/lukas2511/dehydrated").install buildpath.children - cd "src/github.com/lukas2511/dehydrated" do - bin.install "dehydrated" - prefix.install_metafiles - end - end - - test do - system bin/"dehydrated", "--help" - end -end diff --git a/Formula/deis.rb b/Formula/deis.rb deleted file mode 100644 index 28cc76e7aa74d..0000000000000 --- a/Formula/deis.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Deis < Formula - desc "The CLI for Deis Workflow" - homepage "https://deis.io/" - url "https://github.com/deis/workflow-cli/archive/v2.18.0.tar.gz" - sha256 "886e3cd9642380ea92d0f76bc1b1114d32a010d4d577212f9396e3069a6b11ee" - - bottle do - cellar :any_skip_relocation - sha256 "8bd80b147f2c84ab7ce4b29bcffe40ae7e279fd5e493958d8d909137fe0cfa70" => :mojave - sha256 "f1a9bbbfe65041792e01e4f45b2805aca7fb3d3725aae71336f27987f6661d80" => :high_sierra - sha256 "9a5e666e56d263cf75c838336534d1cbffd7eb51950aaad25630d0cb1f229f0b" => :sierra - sha256 "7e8b9a9545b65a3d9d50566c7a01236313492388ffe0db7df62eba628408d414" => :el_capitan - sha256 "1c6b8f51f68c214b508a16cddff08a8e36d78981aaae69638b862bb0315f76f2" => :yosemite - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - deispath = buildpath/"src/github.com/deis/workflow-cli" - deispath.install Dir["{*,.git}"] - - cd deispath do - system "glide", "install" - system "go", "build", "-o", "build/deis", - "-ldflags", - "'-X=github.com/deis/workflow-cli/version.Version=v#{version}'" - bin.install "build/deis" - end - end - - test do - system bin/"deis", "logout" - end -end diff --git a/Formula/deisctl.rb b/Formula/deisctl.rb deleted file mode 100644 index 0264dda4683b6..0000000000000 --- a/Formula/deisctl.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Deisctl < Formula - desc "Deis Control Utility" - homepage "https://deis.io/" - url "https://github.com/deis/deis/archive/v1.13.4.tar.gz" - sha256 "7f1b378d884d5b42d0b03df7c79aa31cc6081bcc4c23d880101e98fdfe7cb89a" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "16becd65687b6d388850461b7fa9d949cdbc6b6f30d5977f44be28f174c49dc4" => :mojave - sha256 "8a73a808a0b8f9d995cb4dd0e41c48b13749527c50055a187ed18244db851884" => :high_sierra - sha256 "8661535566fe1d2484f5a0a2a4e6450ee026fe5c56490b335db9a5b34beb6984" => :sierra - sha256 "2294410457372fb3f076532923179782e94bcf675e8b0ccf9c65d4a691c1d382" => :el_capitan - end - - depends_on "go" => :build - depends_on "godep" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/deis").mkpath - ln_s buildpath, "src/github.com/deis/deis" - system "godep", "restore" - system "go", "build", "-o", bin/"deisctl", "deisctl/deisctl.go" - end - - test do - system bin/"deisctl", "help" - end -end diff --git a/Formula/deja-gnu.rb b/Formula/deja-gnu.rb deleted file mode 100644 index 4ec045d6698ca..0000000000000 --- a/Formula/deja-gnu.rb +++ /dev/null @@ -1,37 +0,0 @@ -class DejaGnu < Formula - desc "Framework for testing other programs" - homepage "https://www.gnu.org/software/dejagnu/" - url "https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.1.tar.gz" - mirror "https://ftpmirror.gnu.org/dejagnu/dejagnu-1.6.1.tar.gz" - sha256 "bf5b28bb797e0ace4cfc0766a996339c795d8223bef54158be7887046bc01692" - - bottle do - cellar :any_skip_relocation - sha256 "4f7be90f499c1581d01ae0ae39af3b012df36e65b936147272e02c2121d80414" => :mojave - sha256 "1fdb95415e4fb21b2488b8453d2e107da45755e1182259a87fe3ebb87d290b9b" => :high_sierra - sha256 "1fdb95415e4fb21b2488b8453d2e107da45755e1182259a87fe3ebb87d290b9b" => :sierra - sha256 "1fdb95415e4fb21b2488b8453d2e107da45755e1182259a87fe3ebb87d290b9b" => :el_capitan - end - - head do - url "https://git.savannah.gnu.org/git/dejagnu.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - ENV.deparallelize # Or fails on Mac Pro - system "autoreconf", "-iv" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - # DejaGnu has no compiled code, so go directly to "make check" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/runtest" - end -end diff --git a/Formula/delta.rb b/Formula/delta.rb deleted file mode 100644 index 1a87674e9aff0..0000000000000 --- a/Formula/delta.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Delta < Formula - desc "Programatically minimize files to isolate features of interest" - homepage "http://delta.tigris.org/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/delta/delta_2006.08.03.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/d/delta/delta_2006.08.03.orig.tar.gz" - sha256 "38184847a92b01b099bf927dbe66ef88fcfbe7d346a7304eeaad0977cb809ca0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "a6116fb7212cb2271b5c73c1bb53f51aeb33bfcc734e77bd42396a968744a42c" => :mojave - sha256 "46734f3eb952455ecd9237ce455aebb3e66be791bbf190021d894dae39d55b66" => :high_sierra - sha256 "07e775a1054966ad2924512386643bc8cb4ef3ad7e12ce9a140015c82fba3072" => :sierra - sha256 "202409012500969cfd034c9d44c441a809445a3b367d514357346438aa850f14" => :el_capitan - sha256 "d3374cc3e84c93bb84615b1669503ea8b708ab65baf629ee0be9a728b12b10bc" => :yosemite - sha256 "04102ae55ffc2cc4351816b010544b854c21f1c5e2a462a6af0e57ec2f57b501" => :mavericks - end - - def install - system "make" - bin.install "delta", "multidelta", "topformflat" - end - - test do - (testpath/"test1.c").write <<~EOS - #include - - int main() { - int i = -1; - unsigned int j = i; - printf("%d\n", j); - } - - EOS - (testpath/"test1.sh").write <<~EOS - #!/usr/bin/env bash - - clang -Weverything "$(dirname "${BASH_SOURCE[0]}")"/test1.c 2>&1 | \ - grep 'implicit conversion changes signedness' - - EOS - - chmod 0755, testpath/"test1.sh" - system "#{bin}/delta", "-test=test1.sh", "test1.c" - end -end diff --git a/Formula/denominator.rb b/Formula/denominator.rb deleted file mode 100644 index a7da5c1ade185..0000000000000 --- a/Formula/denominator.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Denominator < Formula - desc "Portable Java library for manipulating DNS clouds" - homepage "https://github.com/Netflix/denominator/tree/v4.7.1/cli" - url "https://bintray.com/artifact/download/netflixoss/maven/com/netflix/denominator/denominator-cli/4.7.1/denominator-cli-4.7.1-fat.jar" - sha256 "f2d09aaebb63ccb348dcba3a5cc3e94a42b0eae49e90ac0ec2b0a14adfbe5254" - - bottle :unneeded - - def install - bin.install "denominator-cli-4.7.1-fat.jar" => "denominator" - end - - test do - system "#{bin}/denominator", "providers" - end -end diff --git a/Formula/density.rb b/Formula/density.rb deleted file mode 100644 index 1492050a65cf9..0000000000000 --- a/Formula/density.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Density < Formula - desc "Superfast compression library" - homepage "https://github.com/centaurean/density" - url "https://github.com/centaurean/density/archive/density-0.14.2.tar.gz" - sha256 "0b130ea9da3ddaad78810a621a758b47c4135d91d5b5fd22d60bbaf04bc147da" - - bottle do - cellar :any - sha256 "a123e229e87c6acb5e38292e35671f71e49d0cd0afbb1a315d941a49ab3ec8e4" => :mojave - sha256 "798b64ce99c516e735c76aea05944869124634488c82af5ba3f2930f60d83de3" => :high_sierra - sha256 "7740a6a2ba8aa701025c01553c57051e72b49e2f8f0774f064ca98832e1e58e9" => :sierra - sha256 "6853e909ed8057817becb03cbb5dbfdd3d4e2ea35348bf562e86dc51aed11a78" => :el_capitan - end - - resource "cputime" do - url "https://github.com/centaurean/cputime.git", - :revision => "d435d91b872a4824fb507a02d0d1814ed3e791b0" - end - - resource "spookyhash" do - url "https://github.com/centaurean/spookyhash/archive/spookyhash-1.0.6.tar.gz" - sha256 "11215a240af513e673e2d5527cd571df0b4f543f36cce50165a6da41695144c6" - end - - def install - (buildpath/"benchmark/libs/cputime").install resource("cputime") - (buildpath/"benchmark/libs/spookyhash").install resource("spookyhash") - system "make" - include.install "src/density_api.h" - pkgshare.install "build/benchmark" - lib.install "build/libdensity.a" - lib.install "build/libdensity.dylib" - end - - test do - system pkgshare/"benchmark", "-f" - end -end diff --git a/Formula/dep.rb b/Formula/dep.rb deleted file mode 100644 index 6b1db728f8032..0000000000000 --- a/Formula/dep.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Dep < Formula - desc "Go dependency management tool" - homepage "https://github.com/golang/dep" - url "https://github.com/golang/dep.git", - :tag => "v0.5.0", - :revision => "224a564abe296670b692fe08bb63a3e4c4ad7978" - head "https://github.com/golang/dep.git" - - bottle do - cellar :any_skip_relocation - sha256 "582943ea885a3e996b81052ce226d090b7563b5a14a342197d8361e80ca13772" => :mojave - sha256 "6c774e11ada19f1f1c71ba7b1d74d0f34290ab3657b316ee2b5f57a3aa633f0a" => :high_sierra - sha256 "9cb09a385da8bd6a23fd147a3c8eed29a223ecd8919b10127b259dfd6921a4a0" => :sierra - sha256 "7dc66f06e23b66f966540e80da1f16db9d9460edaf98338a66e4fdc935551160" => :el_capitan - end - - depends_on "go" - - conflicts_with "deployer", :because => "both install `dep` binaries" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/golang/dep").install buildpath.children - cd "src/github.com/golang/dep" do - ENV["DEP_BUILD_PLATFORMS"] = "darwin" - ENV["DEP_BUILD_ARCHS"] = "amd64" - system "hack/build-all.bash" - bin.install "release/dep-darwin-#{arch}" => "dep" - prefix.install_metafiles - end - end - - test do - # Default HOMEBREW_TEMP is /tmp, which is actually a symlink to /private/tmp. - # `dep` bails without `.realpath` as it expects $GOPATH to be a "real" path. - ENV["GOPATH"] = testpath.realpath - project = testpath/"src/github.com/project/testing" - (project/"hello.go").write <<~EOS - package main - - import "fmt" - import "github.com/Masterminds/vcs" - - func main() { - fmt.Println("Hello World") - } - EOS - cd project do - system bin/"dep", "init" - assert_predicate project/"vendor", :exist?, "Failed to init!" - inreplace "Gopkg.toml", /(version = ).*/, "\\1\"=1.11.0\"" - system bin/"dep", "ensure" - assert_match "795e20f90", (project/"Gopkg.lock").read - output = shell_output("#{bin}/dep status") - assert_match %r{github.com/Masterminds/vcs\s+1.11.0\s}, output - end - end -end diff --git a/Formula/dependency-check.rb b/Formula/dependency-check.rb deleted file mode 100644 index b24f3e9712d04..0000000000000 --- a/Formula/dependency-check.rb +++ /dev/null @@ -1,42 +0,0 @@ -class DependencyCheck < Formula - desc "OWASP dependency-check" - homepage "https://www.owasp.org/index.php/OWASP_Dependency_Check" - url "https://dl.bintray.com/jeremy-long/owasp/dependency-check-4.0.2-release.zip" - sha256 "25dd54515e2d8013474d22fdc11b9da11c970a07b34d5c89c1f7ae85d7e7f4b1" - - bottle :unneeded - - depends_on :java - - def install - rm_f Dir["bin/*.bat"] - - chmod 0755, "bin/dependency-check.sh" - libexec.install Dir["*"] - - mv libexec/"bin/dependency-check.sh", libexec/"bin/dependency-check" - bin.install_symlink libexec/"bin/dependency-check" - - (var/"dependencycheck").mkpath - libexec.install_symlink var/"dependencycheck" => "data" - - (etc/"dependencycheck").mkpath - jar = "dependency-check-core-#{version}.jar" - corejar = libexec/"repo/org/owasp/dependency-check-core/#{version}/#{jar}" - system "unzip", "-o", corejar, "dependencycheck.properties", "-d", libexec/"etc" - (etc/"dependencycheck").install_symlink libexec/"etc/dependencycheck.properties" - end - - test do - output = shell_output("#{libexec}/bin/dependency-check --version").strip - assert_match "Dependency-Check Core version #{version}", output - - (testpath/"temp-props.properties").write <<~EOS - cve.startyear=2017 - analyzer.assembly.enabled=false - EOS - system bin/"dependency-check", "-P", "temp-props.properties", "-f", "XML", - "--project", "dc", "-s", libexec, "-d", testpath, "-o", testpath - assert_predicate testpath/"dependency-check-report.xml", :exist? - end -end diff --git a/Formula/deployer.rb b/Formula/deployer.rb deleted file mode 100644 index 0683a8fee41bd..0000000000000 --- a/Formula/deployer.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Deployer < Formula - desc "Deployment tool written in PHP with support for popular frameworks" - homepage "https://deployer.org/" - url "https://deployer.org/releases/v6.3.0/deployer.phar" - sha256 "e2860178f5f8f2add74ace08ce4947709021c20e28d44f60105784bb9388ece5" - - bottle :unneeded - - depends_on "php" - - conflicts_with "dep", :because => "both install `dep` binaries" - - def install - bin.install "deployer.phar" => "dep" - end - - test do - system "#{bin}/dep", "init", "--template=Common" - assert_predicate testpath/"deploy.php", :exist? - end -end diff --git a/Formula/depqbf.rb b/Formula/depqbf.rb deleted file mode 100644 index 33d66b6f23aec..0000000000000 --- a/Formula/depqbf.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Depqbf < Formula - desc "Solver for quantified boolean formulae (QBF)" - homepage "https://lonsing.github.io/depqbf/" - url "https://github.com/lonsing/depqbf/archive/version-6.03.tar.gz" - sha256 "9684bb1562bfe14559007401f52975554373546d3290a19618ee71d709bce76e" - head "https://github.com/lonsing/depqbf.git" - - bottle do - cellar :any - sha256 "210b2363035bf7772b275036b26938a8a286da0ddbd93d29a72cbbcb16237c23" => :mojave - sha256 "7c956f3b4e86d6f60e90dde3e25f6b5ce75f2ba75e756c9e4dd6debe46d2ddea" => :high_sierra - sha256 "fea1eb8ca62fccc5ce43b0a645fb67feffbf97c5a343d0ea6c9a015c37e24ccc" => :sierra - sha256 "3229005d870984af6beee544d5178094fc859525bd96552ac42301860c175f5b" => :el_capitan - sha256 "2e56b8bac22dbf77677e825ee6242fea35545c2714859c4f22872c1c0fb056e3" => :yosemite - end - - resource "nenofex" do - url "https://github.com/lonsing/nenofex/archive/version-1.1.tar.gz" - sha256 "972755fd9833c9cd050bdbc5a9526e2b122a5550fda1fbb3ed3fc62912113f05" - end - - resource "picosat" do - url "http://fmv.jku.at/picosat/picosat-960.tar.gz" - sha256 "edb3184a04766933b092713d0ae5782e4a3da31498629f8bb2b31234a563e817" - end - - def install - (buildpath/"nenofex").install resource("nenofex") - (buildpath/"picosat-960").install resource("picosat") - system "./compile.sh" - bin.install "depqbf" - lib.install "libqdpll.a", "libqdpll.1.0.dylib" - end - - test do - system "#{bin}/depqbf", "-h" - end -end diff --git a/Formula/derby.rb b/Formula/derby.rb deleted file mode 100644 index eafade3d6d2a8..0000000000000 --- a/Formula/derby.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Derby < Formula - desc "Apache Derby is an embedded relational database running on JVM" - homepage "https://db.apache.org/derby/" - url "https://www.apache.org/dyn/closer.cgi?path=db/derby/db-derby-10.14.2.0/db-derby-10.14.2.0-bin.tar.gz" - sha256 "980fb0534c38edf4a529a13fb4a12b53d32054827b57b6c5f0307d10f17d25a8" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm_rf Dir["bin/*.bat"] - libexec.install %w[lib test index.html LICENSE NOTICE RELEASE-NOTES.html - KEYS docs javadoc demo] - bin.install Dir["bin/*"] - bin.env_script_all_files(libexec/"bin", - Language::Java.overridable_java_home_env.merge(:DERBY_INSTALL => libexec.to_s, - :DERBY_HOME => libexec.to_s)) - end - - def post_install - (var/"derby").mkpath - end - - plist_options :manual => "DERBY_OPTS=-Dsystem.derby.home=#{HOMEBREW_PREFIX}/var/derby #{HOMEBREW_PREFIX}/bin/startNetworkServer" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/NetworkServerControl - -h - 127.0.0.1 - start - - RunAtLoad - - WorkingDirectory - #{var}/derby - - - EOS - end - - test do - assert_match "libexec/lib/derby.jar] #{version}", - shell_output("#{bin}/sysinfo") - - pid = fork do - exec "#{bin}/startNetworkServer" - end - - begin - sleep 12 - exec "#{bin}/stopNetworkServer" - ensure - Process.wait(pid) - end - end -end diff --git a/Formula/desk.rb b/Formula/desk.rb deleted file mode 100644 index 15399e4e15424..0000000000000 --- a/Formula/desk.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Desk < Formula - desc "Lightweight workspace manager for the shell" - homepage "https://github.com/jamesob/desk" - url "https://github.com/jamesob/desk/archive/v0.6.0.tar.gz" - sha256 "620bfba5b285d4d445e3ff9e399864063d7b0e500ef9c70d887fb7b157576c45" - - bottle :unneeded - - def install - bin.install "desk" - bash_completion.install "shell_plugins/bash/desk" - zsh_completion.install "shell_plugins/zsh/_desk" - fish_completion.install "shell_plugins/fish/desk.fish" - end - - test do - (testpath/".desk/desks/test-desk.sh").write("#\n# Description: A test desk\n#") - list = pipe_output("#{bin}/desk list") - assert_match /test-desk/, list - assert_match /A test desk/, list - end -end diff --git a/Formula/desktop-file-utils.rb b/Formula/desktop-file-utils.rb deleted file mode 100644 index 19ba9475aa422..0000000000000 --- a/Formula/desktop-file-utils.rb +++ /dev/null @@ -1,51 +0,0 @@ -class DesktopFileUtils < Formula - desc "Command-line utilities for working with desktop entries" - homepage "https://wiki.freedesktop.org/www/Software/desktop-file-utils/" - url "https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.23.tar.xz" - sha256 "6c094031bdec46c9f621708f919084e1cb5294e2c5b1e4c883b3e70cb8903385" - - bottle do - sha256 "c0538ee53f8e6f466cd601436f2a62209e871e41cbd2e2ef16ed38b2746b76ae" => :mojave - sha256 "0a3b290ebd40ce3b911268125379b6a0cd839db7fdaf9d88751eb442e2b00e1f" => :high_sierra - sha256 "a30b539cc22f037ccacfd1ff1993fbc6292e0fa399f2d796195a0870832bb12b" => :sierra - sha256 "8c18c3fe21f8d2b1bdb4befdadd2b6dabbbe89dcb9ebb7fbaf4a8a3c7a2153a1" => :el_capitan - sha256 "a6a09a60579ac8875cb92fbcf6177a860da6954c0aa61f323c66441211af0d1b" => :yosemite - sha256 "ccca14604b32329e36acf15be710bdc1458410c4bd382b8708d4afba1b68177a" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-lispdir=#{elisp}" - system "make", "install" - end - - test do - (testpath/"test.desktop").write <<~EOS - [Desktop Entry] - Version=1.0 - Type=Application - Name=Foo Viewer - Comment=The best viewer for Foo objects available! - TryExec=fooview - Exec=fooview %F - Icon=fooview - MimeType=image/x-foo; - Actions=Gallery;Create; - - [Desktop Action Gallery] - Exec=fooview --gallery - Name=Browse Gallery - - [Desktop Action Create] - Exec=fooview --create-new - Name=Create a new Foo! - Icon=fooview-new - EOS - system "#{bin}/desktop-file-validate", "test.desktop" - end -end diff --git a/Formula/detox.rb b/Formula/detox.rb deleted file mode 100644 index dd9204faf0f3b..0000000000000 --- a/Formula/detox.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Detox < Formula - desc "Utility to replace problematic characters in filenames" - homepage "https://detox.sourceforge.io/" - url "https://downloads.sourceforge.net/project/detox/detox/1.2.0/detox-1.2.0.tar.bz2" - sha256 "abfad90ee7d3e0fc53ce3b9da3253f9a800cdd92e3f8cc12a19394a7b1dcdbf8" - - bottle do - sha256 "27f6c89ac907aa01aa0073b4244457a20441c0cb1871114763fdc0aba83fa096" => :mojave - sha256 "133b073b5e24308a29cbc63c3a8a2ee02a46c23b66d76b61057f330ea075e558" => :high_sierra - sha256 "0cc58044463abf09129c9d7a1c49df5ebb51f9d6e675233f8dce404aa6a6c69f" => :sierra - sha256 "886f37ab52a92b8cbc82bd6c0be49efbf56c9186903f9d3b3652b0ddb0555329" => :el_capitan - sha256 "0e1939ae85d72e1c941c1eb58bce8839b393c052221ef848373b518e3927cc59" => :yosemite - sha256 "a7bc2b7ecd5ae46a389973aab9f1506fa8ce67117bc4fbdead2b38d7eae732ce" => :mavericks - end - - def install - system "./configure", "--mandir=#{man}", "--prefix=#{prefix}" - system "make" - (prefix/"etc").mkpath - pkgshare.mkpath - system "make", "install" - end - - test do - (testpath/"rename this").write "foobar" - - assert_equal "rename this -> rename_this\n", shell_output("#{bin}/detox --dry-run rename\\ this") - end -end diff --git a/Formula/devd.rb b/Formula/devd.rb deleted file mode 100644 index bc8bdcdef7ff7..0000000000000 --- a/Formula/devd.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Devd < Formula - desc "Local webserver for developers" - homepage "https://github.com/cortesi/devd" - url "https://github.com/cortesi/devd/archive/v0.8.tar.gz" - sha256 "a73bd347f0d0f452be183e365492fb8bb86954b3cd837c9dfe256926bf7feb5b" - head "https://github.com/cortesi/devd.git" - - bottle do - cellar :any_skip_relocation - sha256 "ef6dc8dbc417a9fb4fb8f243914fa56e3e3fadd67cb87d0c2b33c5ba214d77ef" => :mojave - sha256 "9878d5e45b60321b29c33fd638465341ef05fcd4debec02c3fafe8c1d7d7c3f7" => :high_sierra - sha256 "d2f4d38612065cc367a539aa19d8630c5e4650631eed767740313819d0556dbc" => :sierra - sha256 "d6ff3c9d3cc56571cba4ba8a6131ce124877d73275f9e0f41514fec1bfa8bed0" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/cortesi/devd").install buildpath.children - cd "src/github.com/cortesi/devd" do - system "go", "build", "-o", bin/"devd", ".../cmd/devd" - prefix.install_metafiles - end - end - - test do - begin - io = IO.popen("#{bin}/devd -s #{testpath}") - sleep 2 - ensure - Process.kill("SIGINT", io.pid) - Process.wait(io.pid) - end - - assert_match "Listening on https://devd.io", io.read - end -end diff --git a/Formula/devil.rb b/Formula/devil.rb deleted file mode 100644 index 843fc020ed991..0000000000000 --- a/Formula/devil.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Devil < Formula - desc "Cross-platform image library" - homepage "https://sourceforge.net/projects/openil/" - revision 1 - head "https://github.com/DentonW/DevIL.git" - - stable do - url "https://downloads.sourceforge.net/project/openil/DevIL/1.8.0/DevIL-1.8.0.tar.gz" - sha256 "0075973ee7dd89f0507873e2580ac78336452d29d34a07134b208f44e2feb709" - - # jpeg 9 compatibility - # Upstream commit from 3 Jan 2017 "Fixed int to boolean conversion error - # under Linux" - patch do - url "https://github.com/DentonW/DevIL/commit/41fcabbe.patch?full_index=1" - sha256 "324dc09896164bef75bb82b37981cc30dfecf4f1c2386c695bb7e92a2bb8154d" - end - - # jpeg 9 compatibility - # Upstream commit from 7 Jan 2017 "Fixing boolean compilation errors under - # Linux / MacOS, issue #48 at https://github.com/DentonW/DevIL/issues/48" - patch do - url "https://github.com/DentonW/DevIL/commit/4a2d7822.patch?full_index=1" - sha256 "7e74a4366ef485beea1c4285f2b371b6bfa0e2513b83d4d45e4e120690c93f1d" - end - end - - bottle do - cellar :any - sha256 "222751818b34131dcc58e7832cd652e9684c2b957cd1430a87ce19d0dd33e449" => :mojave - sha256 "7cb8354e26e1d30503c5f232f70c45fad049be1b1a341fa5cc99cb57741c4e61" => :high_sierra - sha256 "25bd964db15fdfa4085b73bd1014044f36b877285db451089b4fa7928b02d555" => :sierra - sha256 "d3821710ef1409df56d15f6e277e3863abfbf568517f57a83eeafccd02afac2b" => :el_capitan - sha256 "5812c01a10936b7f7083d82f2a39d509fe630e41b78e2164f0482ab558026c69" => :yosemite - end - - depends_on "cmake" => :build - depends_on "jasper" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "little-cms2" - - def install - cd "DevIL" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - ilInit(); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}", - "-L#{lib}", "-lIL", "-lILU" - system "./test" - end -end diff --git a/Formula/devtodo.rb b/Formula/devtodo.rb deleted file mode 100644 index 0a61b884dbb9b..0000000000000 --- a/Formula/devtodo.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Devtodo < Formula - desc "Command-line task lists" - homepage "https://swapoff.org/devtodo.html" - url "https://swapoff.org/files/devtodo/devtodo-0.1.20.tar.gz" - sha256 "379c6ac4499fc97e9676075188f7217e324e7ece3fb6daeda7bf7969c7093e09" - revision 1 - - bottle do - sha256 "2cd6096b0434977f6006ca20bdc1e31df8774deb430303b66513eb38edc4365f" => :mojave - sha256 "43399f7f4820bd683334ecc5acbd0047b446663043bbee483bc3476819121be3" => :high_sierra - sha256 "0eba33a6154e4c1a77c7253c11b3d5f4366e692496e8ae32db986e24a0a5d5e4" => :sierra - sha256 "e11b6bf766ba86aa6eb92e2d1b018a0608766ba6b2c38db55b335664d415ad57" => :el_capitan - sha256 "f97442776b7d80a7ef7b8b750086e3e936c297e78cac75ccbae16d14506d7e05" => :yosemite - end - - depends_on "readline" - - conflicts_with "todoman", :because => "both install a `todo` binary" - - # Fix invalid regex. See https://web.archive.org/web/20090205000308/swapoff.org/ticket/54 - patch :DATA - - def install - # Rename Regex.h to Regex.hh to avoid case-sensitivity confusion with regex.h - mv "util/Regex.h", "util/Regex.hh" - inreplace ["util/Lexer.h", "util/Makefile.in", "util/Regex.cc"], - "Regex.h", "Regex.hh" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - doc.install "contrib" - end - - test do - (testpath/"test").write <<~EOS - spawn #{bin}/devtodo --add HomebrewWork - expect "priority*" - send -- "2\r" - expect eof - EOS - system "expect", "-f", "test" - assert_match "HomebrewWork", (testpath/".todo").read - end -end - -__END__ ---- a/util/XML.cc Mon Dec 10 22:26:55 2007 -+++ b/util/XML.cc Mon Dec 10 22:27:07 2007 -@@ -49,7 +49,7 @@ void XML::init() { - // Only initialise scanners once - if (!initialised) { - // -- xmlScan.addPattern(XmlDecl, "<\\?xml.*?>[[:space:]]*"); -+ xmlScan.addPattern(XmlDecl, "<\\?xml.*\\?>[[:space:]]*"); - xmlScan.addPattern(XmlCommentBegin, " + + # :+1: + MARKDOWN + + system bin/"marp", testpath/"deck.md", "-o", testpath/"deck.html" + assert_path_exists testpath/"deck.html" + content = (testpath/"deck.html").read + assert_match "theme:uncover", content + assert_match "

Hello, Homebrew!

", content + assert_match "background-color:blue", content + assert_match "👍", content + end +end diff --git a/Formula/m/martin.rb b/Formula/m/martin.rb new file mode 100644 index 0000000000000..8a8550ca8c904 --- /dev/null +++ b/Formula/m/martin.rb @@ -0,0 +1,48 @@ +class Martin < Formula + desc "Blazing fast tile server, tile generation, and mbtiles tooling" + homepage "https://martin.maplibre.org" + url "https://github.com/maplibre/martin/archive/refs/tags/martin-v0.20.0.tar.gz" + sha256 "1dca1c1df3fb4966deec7b2c64931c576b1dcda57ef86c8cba7082bac4d1122d" + license any_of: ["Apache-2.0", "MIT"] + + livecheck do + url :stable + regex(/^martin[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1098e34d82745d350e5581aec9094d062b96c1bec3b47fbc3e9a1d1cfd0be562" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "490658b219cfdcb120cf6938d805c5c8ef8c80edc8b631fd6d29fefd9cbc2eac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18ad0ce1f0917be5a39d4469ac32fc52401f50c91186befe051422b47b499ad8" + sha256 cellar: :any_skip_relocation, sonoma: "08e9c3c9df2a36933881431d6eecd83f83b77690654cdda083d8b0682a005400" + sha256 cellar: :any_skip_relocation, arm64_linux: "d730112bf69a5f75fc728d6a8aa2b099fb5f2885642da93e7ee9a295facb19b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c64f48e867c5f76c95a40aa3db5ae07da0addc9750938597afdff6182e74674" + end + + depends_on "node" => :build + depends_on "rust" => :build + + uses_from_macos "sqlite" => :test + + def install + system "cargo", "install", *std_cargo_args(path: "martin") + system "cargo", "install", *std_cargo_args(path: "mbtiles") + pkgshare.install "tests/fixtures/mbtiles" + end + + test do + sqlfile = pkgshare/"mbtiles/world_cities.sql" + system "sqlite3 world_cities.mbtiles < #{sqlfile}" + mbtiles = testpath/"world_cities.mbtiles" + + port = free_port + fork do + exec bin/"martin", mbtiles, "-l", "127.0.0.1:#{port}" + end + sleep 3 + output = shell_output("curl -s 127.0.0.1:#{port}") + assert_match "Martin server is running.", output + + system bin/"mbtiles", "summary", mbtiles + end +end diff --git a/Formula/m/mas.rb b/Formula/m/mas.rb new file mode 100644 index 0000000000000..ffc1822cdf7f6 --- /dev/null +++ b/Formula/m/mas.rb @@ -0,0 +1,42 @@ +class Mas < Formula + desc "Mac App Store command-line interface" + homepage "https://github.com/mas-cli/mas" + url "https://github.com/mas-cli/mas.git", + tag: "v2.3.0", + revision: "c93a4fca67cc56585bea1650ba268503ea1883a6" + license "MIT" + head "https://github.com/mas-cli/mas.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1f595639e93d5ad5c1cdadfb39a1ce190393a5fdbdcf34dbabdaf6dbe58ade6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1dbec5f7cc97c21b9c41aff384531d3bc065611d9e5f6377afbec4a59010ab5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf056bf44898315518be7c9de6c53de45b3f8bcd83e2aa62ee1ce501239217c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0777dcb10e7d45e2ce5299a58bcf41b99897eb18184f2af532911f2a5f0d0cc9" + sha256 cellar: :any_skip_relocation, sonoma: "f36d6c89870328a360b3ea74dc65e3a659eb8fe0d40bf4c722189487e17f04a0" + sha256 cellar: :any_skip_relocation, ventura: "ae1c6e102f61ef8704807180a323f50f7d1bf0f380ab36977e23d93394e39afb" + end + + depends_on xcode: ["15.0", :build] + depends_on :macos + + def install + ENV["MAS_DIRTY_INDICATOR"] = "" + system "Scripts/build", "homebrew/core/mas", "--disable-sandbox" + bin.install ".build/release/mas" + + bash_completion.install "contrib/completion/mas-completion.bash" => "mas" + fish_completion.install "contrib/completion/mas.fish" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/mas version").chomp + assert_includes shell_output("#{bin}/mas info 497799835"), "Xcode" + end +end diff --git a/Formula/m/mask.rb b/Formula/m/mask.rb new file mode 100644 index 0000000000000..555bf390dfdb9 --- /dev/null +++ b/Formula/m/mask.rb @@ -0,0 +1,41 @@ +class Mask < Formula + desc "CLI task runner defined by a simple markdown file" + homepage "https://github.com/jacobdeichert/mask/" + url "https://github.com/jacobdeichert/mask/archive/refs/tags/mask/0.11.6.tar.gz" + sha256 "e76ae20a120c3ab44f1b14e73ff3f1b39d900bc66f8d2dab7fed4706bacd92fd" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9fc675f86cf32075e473de596a5598310bf3e85142484b7fd66c09ef74f74182" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e768bea1c18237750a02152f2fa20f8bf243fde010b658312c760734d61d823" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b55cb4b9ba4a0cac458d0547cd61601bb75f64c11924bbe5c3ce922323a3f2f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a57f97c20bee8a3b8b2ad860777cc9aa320b44542bb902ece6f2ab1454ee53ff" + sha256 cellar: :any_skip_relocation, sonoma: "86c1ce171772495aea38cb4cf6d9f68e1bffd448a758bfe85cb3f923434a50ce" + sha256 cellar: :any_skip_relocation, ventura: "f277b06ae9eacae3d0ed37abeb2ba5d5772583abe67cadebc18bed0cedb93efc" + sha256 cellar: :any_skip_relocation, arm64_linux: "089ebe9bcd0d1d5b4a53673e4bafc38964e83bca4a9dd0f3192b9684b126f900" + sha256 cellar: :any_skip_relocation, x86_64_linux: "293cfb240fcd5da53a9f141ddd6dbdd1f4055c8941c47b60e1753cd418be776a" + end + + depends_on "rust" => :build + + def install + cd "mask" do + system "cargo", "install", *std_cargo_args + end + end + + test do + (testpath/"maskfile.md").write <<~MARKDOWN + # Example maskfile + + ## hello (name) + + ```sh + printf "Hello %s!" "$name" + ``` + MARKDOWN + assert_equal "Hello Homebrew!", shell_output("#{bin}/mask hello Homebrew") + end +end diff --git a/Formula/m/masscan.rb b/Formula/m/masscan.rb new file mode 100644 index 0000000000000..05c36afe6aedf --- /dev/null +++ b/Formula/m/masscan.rb @@ -0,0 +1,40 @@ +class Masscan < Formula + desc "TCP port scanner, scans entire Internet in under 5 minutes" + homepage "https://github.com/robertdavidgraham/masscan/" + url "https://github.com/robertdavidgraham/masscan/archive/refs/tags/1.3.2.tar.gz" + sha256 "0363e82c07e6ceee68a2da48acd0b2807391ead9a396cf9c70b53a2a901e3d5f" + license "AGPL-3.0-only" + head "https://github.com/robertdavidgraham/masscan.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9216a454fdb2cbfb9ac9b33ee69a1de877dab70ee3f6500bc32e2c5fde504c78" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba24e0d2c22cbe2291a6e872a1f5d79df7c69922b0cebdbe0864c1caaa664b72" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed9e05609c9f31867e5da2a9d10eebf62ca405613ff9a11ea82307871b8954f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d67db10c93bcd8154956c4165289fbc04edce1b1d63a65af983150d9fafbcf43" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ba6a70814b1e311a2b817fd79e7d9a70657ceb74be1691215802a4470ca3be87" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b99bf991011be4ee7d76fe43aa000159f0665b888a0cbc7c4d528d102a3daa67" + sha256 cellar: :any_skip_relocation, sonoma: "111509ba581461f2011aa8a65245b1deb60aeaad79ab4459f9c6978b4005604c" + sha256 cellar: :any_skip_relocation, ventura: "ff1b10ddec63626516bc7ae647b67524f975d77a52d1dbf93df9c32a09fe77c3" + sha256 cellar: :any_skip_relocation, monterey: "80601cda78b927edb63ae9e0a6b15bb9aa7d621b793d7a6cfa094a0465e66070" + sha256 cellar: :any_skip_relocation, big_sur: "8d21dd16d333a573d7146d13c31dea07df5c72fcfe137af338e6f7722b393dbe" + sha256 cellar: :any_skip_relocation, catalina: "a77ea3fd36501d9a0d0398e585f1d30fd64163ca378e6af9660601a10e1ddce3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4a80f8db6ca9a32ba4d160d4165b4ffd0dd8a86f3246724a2c4220288d35c64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9fe1b11c5d18f102a83a6497972a7e49298f856adc260f83ac7a3d406824887" + end + + def install + system "make" + bin.install "bin/masscan" + end + + test do + assert_match "ports =", shell_output("#{bin}/masscan --echo") + end +end diff --git a/Formula/m/massdns.rb b/Formula/m/massdns.rb new file mode 100644 index 0000000000000..546db039d795b --- /dev/null +++ b/Formula/m/massdns.rb @@ -0,0 +1,53 @@ +class Massdns < Formula + desc "High-performance DNS stub resolver" + homepage "https://github.com/blechschmidt/massdns" + url "https://github.com/blechschmidt/massdns/archive/refs/tags/v1.1.0.tar.gz" + sha256 "93b14431496b358ee9f3a5b71bd9618fe4ff1af8c420267392164f7b2d949559" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ccc67bf2a881c34a2cd1ab5fab97cb109e9cdf1ac60eb6861ae8cea2f02b31d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9a5d00f32970e270e6d1ab85b7ec437efdd1b74e1e4b40f6d938f74f74ee7f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7c9496b840fee8c62fdde8b1799a12e957ccf055a938d34c115c4a1791c9aac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e9ffbddb8c8d7f7d2d6ce7c65a144b01c038332feee271f1168b8d2885876db" + sha256 cellar: :any_skip_relocation, arm64_monterey: "74cbadfee753d69341fde43f09661512be522ccfaa8c146f1c1feb08ecb181ba" + sha256 cellar: :any_skip_relocation, sonoma: "0faf77da9ccb9971a4007ef15e811faaadb03cef023719efce6538a7a4a1e21d" + sha256 cellar: :any_skip_relocation, ventura: "d849531a2de18b6f920761dd14353f4bd843814e6dce35a02e526998ae26b17d" + sha256 cellar: :any_skip_relocation, monterey: "e91304ed064fb3001ab55bb5a61bc7830c29681583c00d001e943911e9789b75" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b8fc5d3cb53ae0d3f3b7e94757c3ec2cf458fec82695bda03aee3f7461f006c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "191060c2099a28427517a56d63ba4ca14c410870a44ec6a2621fbdb2394853f4" + end + + depends_on "cmake" => :build + + uses_from_macos "libpcap" + + # upstream patch PR, https://github.com/blechschmidt/massdns/pull/148 + patch do + url "https://github.com/blechschmidt/massdns/commit/a96b5d213a5643fbe3de1ba6e401e359673f0a21.patch?full_index=1" + sha256 "10a07d6f8241500cdc6320fe1dc5461b9573ce8d70fbf96b62855192a3829e1b" + end + patch do + url "https://github.com/blechschmidt/massdns/commit/66d30af33d36109d244a92a69691c5deba13fd28.patch?full_index=1" + sha256 "a3070e5522e612ea5f868e705e5667c38b8437969e2690f8545a247a7a2ee970" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + etc.install Dir["lists", "scripts"] + end + + test do + cp_r etc/"lists/resolvers.txt", testpath + (testpath/"domains.txt").write "docs.brew.sh" + system bin/"massdns", "-r", testpath/"resolvers.txt", "-t", "AAAA", "-w", "results.txt", testpath/"domains.txt" + + assert_match ";; ->>HEADER<<- opcode: QUERY, status: NOERROR, id:", File.read("results.txt") + assert_match "IN CNAME homebrew.github.io.", File.read("results.txt") + end +end diff --git a/Formula/m/massdriver.rb b/Formula/m/massdriver.rb new file mode 100644 index 0000000000000..0ddb1142e7e6e --- /dev/null +++ b/Formula/m/massdriver.rb @@ -0,0 +1,45 @@ +class Massdriver < Formula + desc "Manage applications and infrastructure on Massdriver Cloud" + homepage "https://www.massdriver.cloud/" + url "https://github.com/massdriver-cloud/mass/archive/refs/tags/1.12.5.tar.gz" + sha256 "e523a287ee603e82857cd76bf85ed8f01ba6264eef60987c0b7547575f2dba6f" + license "Apache-2.0" + head "https://github.com/massdriver-cloud/mass.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3616f8da386fa6bdbb117a1a0d69c0a82fb79d83615bfd23013a7c046c072181" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3616f8da386fa6bdbb117a1a0d69c0a82fb79d83615bfd23013a7c046c072181" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3616f8da386fa6bdbb117a1a0d69c0a82fb79d83615bfd23013a7c046c072181" + sha256 cellar: :any_skip_relocation, sonoma: "7c4932e1db982f7c387fd3b06e288f1545d164e9c7984e7dc8542979a5f481ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "92f0a6129d450f271734b3faaf2b72666c6a2da35f9e460219835112990fef2f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "485ad99909a37416889f6e26fa3084bc1833972d94e889ff78d42c1a33fa1b64" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/massdriver-cloud/mass/pkg/version.version=#{version} + -X github.com/massdriver-cloud/mass/pkg/version.gitSHA=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"mass") + + generate_completions_from_executable(bin/"mass", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/mass version") + + output = shell_output("#{bin}/mass bundle build 2>&1", 1) + assert_match "Error: open massdriver.yaml: no such file or directory", output + end +end diff --git a/Formula/m/massren.rb b/Formula/m/massren.rb new file mode 100644 index 0000000000000..8248d4d69d325 --- /dev/null +++ b/Formula/m/massren.rb @@ -0,0 +1,31 @@ +class Massren < Formula + desc "Easily rename multiple files using your text editor" + homepage "https://github.com/laurent22/massren" + url "https://github.com/laurent22/massren/archive/refs/tags/v1.5.7.tar.gz" + sha256 "7e7dd149bd3364235247268cc684b5a35badd9bee22f39960e075c792d037a8c" + license "MIT" + head "https://github.com/laurent22/massren.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cad349b22e28ef325892878894de36ea76f1c1235f0936ef7e3425c6dcf2933f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b0b1c22e38a150df0076e405e76712522e6b73db270226c910afb585fc4bed2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e1b8bb5c09c3cdc3b6cd6489c960c488394e359cabbd933207c641da0a969abf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a4d8c870ee69dc77582da2c058e5ab5630cfda919d5ed461fa4f1fe286d86a8" + sha256 cellar: :any_skip_relocation, sonoma: "a6a209d62fb3ae2ecef7d695c580dba2ab2de99b4052db0bd59ead450e35f0d6" + sha256 cellar: :any_skip_relocation, ventura: "2110bb0e290f470412225c98f0d6a5c6083c20371b4dc1e8b5f36c0a6779c084" + sha256 cellar: :any_skip_relocation, arm64_linux: "70619f09b98eaf12e8c356accbebe73802aa58cf440d70b5bd921fa867904b25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fb23682755ba48ba5f33e3ea6bacf7f24f2323531bb919ea7c037f0179a2977" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"massren", "--config", "editor", "nano" + assert_match 'editor = "nano"', shell_output("#{bin}/massren --config") + end +end diff --git a/Formula/m/mat2.rb b/Formula/m/mat2.rb new file mode 100644 index 0000000000000..9dc69e7a6fd19 --- /dev/null +++ b/Formula/m/mat2.rb @@ -0,0 +1,38 @@ +class Mat2 < Formula + include Language::Python::Virtualenv + + desc "Metadata anonymization toolkit" + homepage "https://0xacab.org/jvoisin/mat2" + url "https://files.pythonhosted.org/packages/ce/53/da9720bf3d8a3419e2d337ba0d12817c75578ada4ec1f161fc602dd2ed1d/mat2-0.13.5.tar.gz" + sha256 "d7e7c4f0f0cfcf8bd656f97919281d0c6207886d84bdfdbb192c152ebf91fe19" + license "LGPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7ada4d330d9f42d51d2b86378e08ad87ef31923a19737fd27ae7c215d133c06e" + end + + depends_on "exiftool" + depends_on "ffmpeg" + depends_on "gdk-pixbuf" + depends_on "librsvg" + depends_on "poppler" + depends_on "py3cairo" => :no_linkage + depends_on "pygobject3" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "pygobject" + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"mat2", "-l" + end +end diff --git a/Formula/m/math-comp.rb b/Formula/m/math-comp.rb new file mode 100644 index 0000000000000..6aa60f0b8aeeb --- /dev/null +++ b/Formula/m/math-comp.rb @@ -0,0 +1,46 @@ +class MathComp < Formula + desc "Mathematical Components for the Coq proof assistant" + homepage "https://math-comp.github.io/math-comp/" + url "https://github.com/math-comp/math-comp/archive/refs/tags/mathcomp-2.5.0.tar.gz" + sha256 "3db2f4b1b7f9f5a12d3d0c4ba4e325a26a77712074200319660c0e67e25679f1" + license "CECILL-B" + head "https://github.com/math-comp/math-comp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6ebdb3f0c5511e6e660fc529beafc659f4a178dfbe09daafa9a659ce9aaa2e9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f13c9a57821e1e7a78ff873c1591590bdc09e42f70507e54752c510c13896c2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7d28a5e6399ea7380f2ba29d4bd476c1d1883e3e8ee84c3d5e5e9b34a603df1" + sha256 cellar: :any_skip_relocation, sonoma: "8d41cc37c0ff9e7cc72c1dde6a453d0797fee10e14ad10a6e5efb40794c71b96" + sha256 cellar: :any_skip_relocation, arm64_linux: "222e8ece658e5273ced1047748b2c0c8942d45c70fdc40c1343fda9dc2728ea3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31ebbf2e8853abc7215f2535a0a7dff34246b2cb44d59488a47fdb07e02e9383" + end + + depends_on "ocaml" => :build + depends_on "ocaml-findlib" => :build + depends_on "hierarchy-builder" + depends_on "rocq" + depends_on "rocq-elpi" + + def install + ENV["OCAMLFIND_CONF"] = Formula["rocq-elpi"].libexec/"lib/findlib.conf" + (buildpath/"Makefile.coq.local").append_lines "COQLIB=#{lib}/ocaml/coq\n" + + system "make" + system "make", "install" + end + + test do + (testpath/"testing.v").write <<~ROCQ + From mathcomp Require Import ssreflect seq. + + Parameter T: Type. + Theorem test (s1 s2: seq T): size (s1 ++ s2) = size s1 + size s2. + Proof. by elim : s1 =>//= x s1 ->. Qed. + + Check test. + ROCQ + + ENV["OCAMLFIND_CONF"] = Formula["rocq-elpi"].libexec/"lib/findlib.conf" + assert_match(/\Atest\s+: forall/, shell_output("#{Formula["rocq"].bin}/rocq compile testing.v")) + end +end diff --git a/Formula/m/matlab2tikz.rb b/Formula/m/matlab2tikz.rb new file mode 100644 index 0000000000000..b174c1d7eea0d --- /dev/null +++ b/Formula/m/matlab2tikz.rb @@ -0,0 +1,19 @@ +class Matlab2tikz < Formula + desc "Convert MATLAB(R) figures into TikZ/Pgfplots figures" + homepage "https://github.com/matlab2tikz/matlab2tikz" + url "https://github.com/matlab2tikz/matlab2tikz/archive/refs/tags/v1.1.0.tar.gz" + sha256 "4e6fe80ebe4c8729650eb00679f97398c2696fd9399c17f9c5b60a1a6cf23a19" + license "BSD-2-Clause" + head "https://github.com/matlab2tikz/matlab2tikz.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f76f11ee806e2256f088b5dd34b534e94e8bfd48f495152bb623d7519dc2b893" + end + + def install + pkgshare.install Dir["src/*"] + end +end diff --git a/Formula/m/matplotplusplus.rb b/Formula/m/matplotplusplus.rb new file mode 100644 index 0000000000000..dda7fc9581010 --- /dev/null +++ b/Formula/m/matplotplusplus.rb @@ -0,0 +1,54 @@ +class Matplotplusplus < Formula + desc "C++ Graphics Library for Data Visualization" + homepage "https://github.com/alandefreitas/matplotplusplus" + url "https://github.com/alandefreitas/matplotplusplus/archive/refs/tags/v1.2.2.tar.gz" + sha256 "c7434b4fea0d0cc3508fd7104fafbb2fa7c824b1d2ccc51c52eaee26fc55a9a0" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "2b9397c694c7707a80feb995232954d614d4d8a8372b58d99ddb4d82dcca511e" + sha256 cellar: :any, arm64_sequoia: "e2ba675ac81348b5f335837aff0f31d76e9786cb863f1e7e78310dc866b0fd8a" + sha256 cellar: :any, arm64_sonoma: "19c28227de5d694cef734a453ae5a5fa9235100178c330a89e0bf69b1152c9c3" + sha256 cellar: :any, arm64_ventura: "a6ea197fbc598aea232a2a2ee3f34a49d901fe7bcb5ef1669fad420bc9761df9" + sha256 cellar: :any, sonoma: "fd6ad4314564c49faa1c3a579059e691bd42ad7bc806bfdd9b6da50de1493136" + sha256 cellar: :any, ventura: "1629d3f81ffeea448e2a23ce724c64108e4b98d28fff1c94c9caf42aad066fd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "16d52a3f9fe266742220680c9634012ae28f593c6c59379a707cce29fc90ea94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b326b9d0868c29fc1ca8749f38f40b7941baddf059b9342a15f64c8dab70ad1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "fftw" + depends_on "gnuplot" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openexr" + + uses_from_macos "zlib" + + fails_with :clang do + build 1100 + cause "cannot run simple program using std::filesystem" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DBUILD_EXAMPLES=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + # Set QT_QTP_PLATFORM to "minimal" on Linux so that it does not fail with this error: + # qt.qpa.xcb: could not connect to display + ENV["QT_QPA_PLATFORM"] = "minimal" unless OS.mac? + cp pkgshare/"examples/exporting/save/save_1.cpp", testpath/"test.cpp" + system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lmatplot", "-o", "test" + system "./test" + assert_path_exists testpath/"img/barchart.svg" + end +end diff --git a/Formula/m/matterbridge.rb b/Formula/m/matterbridge.rb new file mode 100644 index 0000000000000..cd64d87f56667 --- /dev/null +++ b/Formula/m/matterbridge.rb @@ -0,0 +1,34 @@ +class Matterbridge < Formula + desc "Protocol bridge for multiple chat platforms" + homepage "https://github.com/42wim/matterbridge" + url "https://github.com/42wim/matterbridge/archive/refs/tags/v1.26.0.tar.gz" + sha256 "00e1bbfe3b32f2feccf9a7f13a6f12b1ce28a5eb04cc7b922b344e3493497425" + license "Apache-2.0" + head "https://github.com/42wim/matterbridge.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5a41074e2c3eba976b8142b0f764732da7d5551396085b7b40ac5d62b5f1fd0d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6eec437022ff310f92909ef2f5e8b600f4e5cc2991fd7284fbed52d1d96a8ec0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5bb186836451a870eeec2e4954cce09eb426da52534f2e9d1acd105de1fa07ea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db4bd660db3e42897f23bffa81d3a241a2e41b56d035e649bf0ec6001dee5916" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a396b9c2aeb5a81600301142e52bca66298e8608e96f2355cec6dfcb07dbf31" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3622f41d47b3f71ff04a21b70d0df84e9fdf14f1e1fa65c85e91178be1d17a01" + sha256 cellar: :any_skip_relocation, sonoma: "0960b69b396c9439377a0f9e93bb0e69ff2af2be14deed3f50c38600e756f5d9" + sha256 cellar: :any_skip_relocation, ventura: "88c693006135c6475e9c3a0fea5aae515ffb0fc4f85bb1c77c256d997cba6f21" + sha256 cellar: :any_skip_relocation, monterey: "8ff7a6b8c44f153fca6cfc57e9219eebb211fb38df9ad764248fa0b4f12cf83b" + sha256 cellar: :any_skip_relocation, big_sur: "9c2550e9e8a6ff8c2b9611ccfb46fcbfa5da753f6b79349f002a8c8823d5f960" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4aee8a1f75042ffafe421f8a228217ecf68b54c01499ea75db77495316b81e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b90de5cbda5865e1150bdc823dd02bf4eaaa9358fc85de873e983b576ff5f34" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + touch testpath/"test.toml" + assert_match "no [[gateway]] configured", shell_output("#{bin}/matterbridge -conf test.toml 2>&1", 1) + end +end diff --git a/Formula/m/maturin.rb b/Formula/m/maturin.rb new file mode 100644 index 0000000000000..61158d0c3279f --- /dev/null +++ b/Formula/m/maturin.rb @@ -0,0 +1,58 @@ +class Maturin < Formula + desc "Build and publish Rust crates as Python packages" + homepage "https://github.com/PyO3/maturin" + url "https://github.com/PyO3/maturin/archive/refs/tags/v1.9.6.tar.gz" + sha256 "c8aef8af6cd3d5b3331191b21191ec92d7b4ee0633e0799351a01af1c5ea2a6c" + license any_of: ["Apache-2.0", "MIT"] + revision 1 + head "https://github.com/PyO3/maturin.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bfad0a52d95ceaa44e11a68c7d91419d99c2b3134ae625ef5203df1c88baaead" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "69292168f5341738f5053f7848dfd119bc1fd9584e59e5272a7f68610f7a7910" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d2e8ed88a6fd3d052c70d655196e92caf6152e0a505e6df57f3c8a0b8fbad9a2" + sha256 cellar: :any_skip_relocation, sonoma: "aa959075643bfe9543fc8b958df94ac91b10f45980e5d19e7b59bb9708df4b1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a806bfb45bdcfee73ce731737da4376aa46830fec143869c2b9275ad09a0ada" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7b59ae95664ffb80a761fd3f1c30235e71ab48890883b5cf13d4e9bc711dc42" + end + + depends_on "python@3.14" => :test + depends_on "rust" + + uses_from_macos "bzip2" + uses_from_macos "xz" + + def install + # Work around an Xcode 15 linker issue which causes linkage against LLVM's + # libunwind due to it being present in a library search path. + if DevelopmentTools.clang_build_version >= 1500 + ENV.remove "HOMEBREW_LIBRARY_PATHS", + recursive_dependencies.find { |d| d.name.match?(/^llvm(@\d+)?$/) } + .to_formula + .opt_lib + end + + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"maturin", "completions") + + python_versions = Formula.names.filter_map do |name| + Version.new(name.delete_prefix("python@")) if name.start_with?("python@") + end.sort + + newest_python = python_versions.pop + newest_python_site_packages = lib/"python#{newest_python}/site-packages" + newest_python_site_packages.install "maturin" + + python_versions.each do |pyver| + (lib/"python#{pyver}/site-packages/maturin").install_symlink (newest_python_site_packages/"maturin").children + end + end + + test do + python3 = "python3.14" + system "cargo", "init", "--name=brew", "--bin" + system bin/"maturin", "build", "-o", "dist", "--compatibility", "off" + system python3, "-m", "pip", "install", "brew", "--prefix=./dist", "--no-index", "--find-links=./dist" + system python3, "-c", "import maturin" + end +end diff --git a/Formula/m/maven-completion.rb b/Formula/m/maven-completion.rb new file mode 100644 index 0000000000000..f2d4afe2c49ee --- /dev/null +++ b/Formula/m/maven-completion.rb @@ -0,0 +1,24 @@ +class MavenCompletion < Formula + desc "Bash completion for Maven" + homepage "https://github.com/juven/maven-bash-completion" + url "https://github.com/juven/maven-bash-completion/archive/refs/tags/20200420.tar.gz" + sha256 "eb4ef412d140e19e7d3ce23adb7f8fcce566f44388cfdc8c1e766a3c4b183d3d" + license "Apache-2.0" + head "https://github.com/juven/maven-bash-completion.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ac7e72e1637a50e24735e49aafdcaab5e1a71ceeff85a1836489f6d12a2de263" + end + + def install + bash_completion.install "bash_completion.bash" => "maven" + end + + test do + assert_match "-F _mvn", + shell_output("bash -c 'source #{bash_completion}/maven && complete -p mvn'") + end +end diff --git a/Formula/m/maven-shell.rb b/Formula/m/maven-shell.rb new file mode 100644 index 0000000000000..8657737e3ecf2 --- /dev/null +++ b/Formula/m/maven-shell.rb @@ -0,0 +1,26 @@ +class MavenShell < Formula + desc "Shell for Maven" + homepage "https://github.com/jdillon/mvnsh" + url "https://search.maven.org/remotecontent?filepath=org/sonatype/maven/shell/dist/mvnsh-assembly/1.1.0/mvnsh-assembly-1.1.0-bin.tar.gz" + sha256 "584008d726bf6f90271f4ccd03b549773cbbe62ba7e92bf131e67df3ac5a41ac" + license "EPL-1.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/sonatype/maven/shell/dist/mvnsh-assembly/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8cf238b82fe150f113e5df470ec8f73d9d8cb58d940c716726a3442492a8fa16" + end + + def install + # Remove windows files. + rm(Dir["bin/*.bat"]) + libexec.install Dir["*"] + bin.install_symlink libexec/"bin/mvnsh" + end +end diff --git a/Formula/m/maven.rb b/Formula/m/maven.rb new file mode 100644 index 0000000000000..33fb165a1445d --- /dev/null +++ b/Formula/m/maven.rb @@ -0,0 +1,76 @@ +class Maven < Formula + desc "Java-based project management" + homepage "https://maven.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz" + mirror "https://archive.apache.org/dist/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz" + sha256 "4b7195b6a4f5c81af4c0212677a32ee8143643401bc6e1e8412e6b06ea82beac" + license "Apache-2.0" + + livecheck do + url "https://maven.apache.org/download.cgi" + regex(/href=.*?apache-maven[._-]v?(\d+(?:\.\d+)+)-bin\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "2f1d82c971cd4c85e9d2dac09ecab088398d2313144648110efad51a0eccb53b" + end + + depends_on "openjdk" + + conflicts_with "mvnvm", because: "both install `mvn` executables" + + def install + # Remove windows files + rm(Dir["bin/*.cmd"]) + + # Fix the permissions on the global settings file. + chmod 0644, "conf/settings.xml" + + libexec.install Dir["*"] + + # Build an `:all` bottle by changing the path for `mavenrc` + file = libexec/"bin/mvn" + inreplace file, "/usr/local/etc/mavenrc", "#{HOMEBREW_PREFIX}/etc/mavenrc" + + # Leave conf file in libexec. The mvn symlink will be resolved and the conf + # file will be found relative to it + Pathname.glob("#{libexec}/bin/*") do |file| + next if file.directory? + + basename = file.basename + next if basename.to_s == "m2.conf" + + (bin/basename).write_env_script file, Language::Java.overridable_java_home_env + end + end + + test do + (testpath/"pom.xml").write <<~XML + + + 4.0.0 + org.homebrew + maven-test + 1.0.0-SNAPSHOT + + 1.8 + 1.8 + UTF-8 + + + XML + + (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~JAVA + package org.homebrew; + public class MavenTest { + public static void main(String[] args) { + System.out.println("Testing Maven with Homebrew!"); + } + } + JAVA + + system bin/"mvn", "compile", "-Duser.home=#{testpath}" + end +end diff --git a/Formula/m/mavsdk.rb b/Formula/m/mavsdk.rb new file mode 100644 index 0000000000000..db5004d14a152 --- /dev/null +++ b/Formula/m/mavsdk.rb @@ -0,0 +1,106 @@ +class Mavsdk < Formula + desc "API and library for MAVLink compatible systems written in C++17" + homepage "https://mavsdk.mavlink.io" + url "https://github.com/mavlink/MAVSDK.git", + tag: "v3.10.2", + revision: "fb2b989b5b9849358bf9c2cb082f496d55edf173" + license "BSD-3-Clause" + revision 4 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "f2acc2bd6fe4e0e9c3c3ca3fdce91c78a624f2294a3056c10a9a49573ca5df34" + sha256 arm64_sequoia: "8e04f76baf4c44b8acf712e2a781a00c78d84071e70907005a392428d285b23f" + sha256 arm64_sonoma: "10e1e7e21746aae3e033d985cbd8852cb29ff3587cbc1916cb1a37ae3ae1dbb6" + sha256 cellar: :any, sonoma: "9fcc670f709c1af1ab80c25c641c40b9f26fee5f4f149afecfefd71ad4ff25f3" + sha256 arm64_linux: "2c7b3a2ba429dd5ec7127b3fd88203c68c997864a18e966ceed17c5eac0eb929" + sha256 x86_64_linux: "e64ad405f9c40d0edf17a5ada9d399290485d669a966482faf1da474c993214d" + end + + depends_on "cmake" => :build + depends_on "python@3.14" => :build + depends_on "rust" => :build + depends_on "abseil" + depends_on "c-ares" + depends_on "curl" + depends_on "grpc" + depends_on "jsoncpp" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "re2" + depends_on "tinyxml2" + depends_on "xz" + + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause <<~EOS + Undefined symbols for architecture x86_64: + "std::__1::__fs::filesystem::__status(std::__1::__fs::filesystem::path const&, std::__1::error_code*)" + EOS + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + # Fix version being reported as `v#{version}-dirty` + inreplace "CMakeLists.txt", "OUTPUT_VARIABLE VERSION_STR", "OUTPUT_VARIABLE VERSION_STR_IGNORED" + + # Regenerate files to support newer protobuf + system "tools/generate_from_protos.sh" + + %w[mavlink picosha2 libmavlike].each do |dep| + system "cmake", "-S", "third_party/#{dep}", "-B", "build_#{dep}", *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build_#{dep}" + system "cmake", "--install", "build_#{dep}" + end + + # Source build adapted from + # https://mavsdk.mavlink.io/main/en/cpp/guide/build.html + args = %W[ + -DSUPERBUILD=OFF + -DBUILD_SHARED_LIBS=ON + -DBUILD_MAVSDK_SERVER=ON + -DBUILD_TESTS=OFF + -DVERSION_STR=v#{version}-#{tap.user} + -DCMAKE_PREFIX_PATH=#{libexec} + -DCMAKE_INSTALL_RPATH=#{rpath} + -DDEPS_INSTALL_PATH=#{libexec} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Force use of Clang on Mojave + ENV.clang if OS.mac? + + (testpath/"test.cpp").write <<~CPP + #include + #include + using namespace mavsdk; + int main() { + Mavsdk mavsdk{Mavsdk::Configuration{ComponentType::GroundStation}}; + std::cout << mavsdk.version() << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++17", testpath/"test.cpp", "-o", "test", + "-I#{include}", "-L#{lib}", "-lmavsdk" + assert_match "v#{version}-#{tap.user}", shell_output("./test").chomp + + assert_equal "Usage: #{bin}/mavsdk_server [Options] [Connection URL]", + shell_output("#{bin}/mavsdk_server --help").split("\n").first + end +end diff --git a/Formula/m/mawk.rb b/Formula/m/mawk.rb new file mode 100644 index 0000000000000..ba4a740929daa --- /dev/null +++ b/Formula/m/mawk.rb @@ -0,0 +1,39 @@ +class Mawk < Formula + desc "Interpreter for the AWK Programming Language" + homepage "https://invisible-island.net/mawk/" + url "https://invisible-mirror.net/archives/mawk/mawk-1.3.4-20250131.tgz" + sha256 "51bcb82d577b141d896d9d9c3077d7aaa209490132e9f2b9573ba8511b3835be" + license "GPL-2.0-only" + + livecheck do + url "https://invisible-mirror.net/archives/mawk/?C=M&O=D" + regex(/href=.*?mawk[._-]v?(\d+(?:\.\d+)+(?:-\d+)?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "000c7e786c0898721626b361f24d36150d4bd78af31df136ab02c022385d7712" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae1fe393d35cda1a41cbe812a9a947e52d14a8c3c5280578ecd8a5693e50e6ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2816a9a45edde2402da6af6788012f22c4a11ce5a27975bd7a104b8e1e7b3df5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "87970558c84e6172003dfede622bf5fe3b78309f709a3c5a81dfcf2f8a44d24f" + sha256 cellar: :any_skip_relocation, sonoma: "056917eaa79d45b640add493c114d8e027cab6d5dbe954f1dd5cc5654b482f09" + sha256 cellar: :any_skip_relocation, ventura: "bec5bb0e31eb1bb02091352669b80053544c636cbfb591ba96ea57c5639abe8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e43b15161774ffd1beaa7373041268f90ec6f41ae1078ea01708d566e813bde8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a6fd86d47f102fd70685b287128bb0d7b71e1c1cb5814d4fdb31b674598b00a" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--disable-silent-rules", + "--with-readline=/usr/lib", + "--mandir=#{man}" + system "make", "install" + end + + test do + mawk_expr = '/^mawk / {printf("%s-%s", $2, $3)}' + ver_out = pipe_output("#{bin}/mawk '#{mawk_expr}'", shell_output("#{bin}/mawk -W version 2>&1")) + assert_equal version.to_s, ver_out + end +end diff --git a/Formula/m/maxima.rb b/Formula/m/maxima.rb new file mode 100644 index 0000000000000..689f7fd98f9fb --- /dev/null +++ b/Formula/m/maxima.rb @@ -0,0 +1,46 @@ +class Maxima < Formula + desc "Computer algebra system" + homepage "https://maxima.sourceforge.io/" + url "https://downloads.sourceforge.net/project/maxima/Maxima-source/5.48.1-source/maxima-5.48.1.tar.gz" + sha256 "b0916b5fb37b6eeaae400083175e68e28f80b9a1ab580c106a05448cf1c496b2" + license "GPL-2.0-only" + revision 3 + + livecheck do + url :stable + regex(%r{url=.*?/maxima[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7413a88afcfdc054c90ff3f9e1c33d07ce92e37a811b3da3beefaa956453b631" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "642afa2412d2595b4b8c5d9aaa4c2bccf17e6a2ce4152fabfb11314235fddca2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e91ef3daffd2556df2764c72fb6cc24a82cffacd492195aa82e327661579363c" + sha256 cellar: :any_skip_relocation, sonoma: "de6ecb86a38e9ffdfd717fd121ccc92557c2ca5cb7a5d368f5b0b44d482e8640" + sha256 cellar: :any_skip_relocation, arm64_linux: "9dff0ae9940639acebc6de0ca6ae46cc83b26e9e8e15753fb4b32d4aa52fcd9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e068db669604e391637b7d38fba699a927d62875e1dc79e34ee7f26f0fc4bc70" + end + + depends_on "gawk" => :build + depends_on "gnu-sed" => :build + depends_on "perl" => :build + depends_on "texinfo" => :build + depends_on "gettext" + depends_on "gnuplot" + depends_on "rlwrap" + depends_on "sbcl" + + def install + ENV["LANG"] = "C" # per build instructions + system "./configure", "--enable-gettext", + "--enable-sbcl", + "--with-emacs-prefix=#{elisp}", + "--with-sbcl=#{Formula["sbcl"].opt_bin}/sbcl", + *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"maxima", "--batch-string=run_testsuite(); quit();" + end +end diff --git a/Formula/m/maxwell.rb b/Formula/m/maxwell.rb new file mode 100644 index 0000000000000..ad5de2dd1ee9c --- /dev/null +++ b/Formula/m/maxwell.rb @@ -0,0 +1,44 @@ +class Maxwell < Formula + desc "Reads MySQL binlogs and writes row updates as JSON to Kafka" + homepage "https://maxwells-daemon.io/" + url "https://github.com/zendesk/maxwell/releases/download/v1.44.0/maxwell-1.44.0.tar.gz" + sha256 "fc0dcb98b701dc35b5190bd446d0eb9ec869e6c4d0b6945dbc3542e94e949a68" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7936717f581277493c6ad575ea46d192b8928105b5f03eb8c68ce1aa85de6441" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + + %w[maxwell maxwell-bootstrap].each do |f| + bin.install libexec/"bin/#{f}" + end + + bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env) + end + + test do + log = testpath/"maxwell.log" + + fork do + $stdout.reopen(log) + $stderr.reopen(log) + # Tell Maxwell to connect to a bogus host name so we don't actually connect to a local instance + # The '.invalid' TLD is reserved as never to be installed as a valid TLD. + exec "#{bin}/maxwell --host not.real.invalid" + end + sleep 15 + + # Validate that we actually got in to Maxwell far enough to attempt to connect. + assert_match "CommunicationsException: Communications link failure", log.read + end +end diff --git a/Formula/m/mbedtls.rb b/Formula/m/mbedtls.rb new file mode 100644 index 0000000000000..31e855de1a9ce --- /dev/null +++ b/Formula/m/mbedtls.rb @@ -0,0 +1,69 @@ +class Mbedtls < Formula + desc "Cryptographic & SSL/TLS library" + homepage "https://tls.mbed.org/" + url "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.4/mbedtls-3.6.4.tar.bz2" + sha256 "ec35b18a6c593cf98c3e30db8b98ff93e8940a8c4e690e66b41dfc011d678110" + license "Apache-2.0" + head "https://github.com/Mbed-TLS/mbedtls.git", branch: "development" + + livecheck do + url :stable + regex(/(?:mbedtls[._-])?v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "2004e7da883fb0e369e680797085545e0e357bdaaf80f4b51d926c96a325b97d" + sha256 cellar: :any, arm64_sequoia: "1d8f7928cbeb8380b3d39591956c884a2353f411f2537654db8e37c6d4cd771d" + sha256 cellar: :any, arm64_sonoma: "b52142a9212d2ba22c583d0d490f8f60c668265061aecec8083339cffcc605eb" + sha256 cellar: :any, arm64_ventura: "6e20b77f9c4d0db9e5b7c8bf8c0e5cc4ccb82e36686d879cf1f2731101adf17a" + sha256 cellar: :any, sonoma: "d6868d898949c78b4cbb9ea8c2bac0b858102344e84d516dd8759a0905019b02" + sha256 cellar: :any, ventura: "f0eb7a4df4d1a64e30d293544089706ca5ce4ff23acd32246fc101cf27e39b61" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfdcc6a8f16a79601d3aa0b24a8e3722144d92b938c3ebd637b77ab7c72f44e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf0c211ef718cfc840979ee95ddce71e548e86733017cdec1e0555aac2df6ad5" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + + def install + inreplace "include/mbedtls/mbedtls_config.h" do |s| + # enable pthread mutexes + s.gsub! "//#define MBEDTLS_THREADING_PTHREAD", "#define MBEDTLS_THREADING_PTHREAD" + # allow use of mutexes within mbed TLS + s.gsub! "//#define MBEDTLS_THREADING_C", "#define MBEDTLS_THREADING_C" + # enable DTLS-SRTP extension + s.gsub! "//#define MBEDTLS_SSL_DTLS_SRTP", "#define MBEDTLS_SSL_DTLS_SRTP" + end + + system "cmake", "-S", ".", "-B", "build", + "-DUSE_SHARED_MBEDTLS_LIBRARY=On", + "-DPython3_EXECUTABLE=#{which("python3")}", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DGEN_FILES=OFF", + *std_cmake_args + system "cmake", "--build", "build" + # We run CTest because this is a crypto library. Running tests in parallel causes failures. + # https://github.com/Mbed-TLS/mbedtls/issues/4980 + with_env(CC: DevelopmentTools.locate(DevelopmentTools.default_compiler)) do + system "ctest", "--parallel", "1", "--test-dir", "build", "--rerun-failed", "--output-on-failure" + end + system "cmake", "--install", "build" + + # Why does Mbedtls ship with a "Hello World" executable. Let's remove that. + rm(bin/"hello") + # Rename benchmark & selftest, which are awfully generic names. + mv bin/"benchmark", bin/"mbedtls-benchmark" + mv bin/"selftest", bin/"mbedtls-selftest" + # Demonstration files shouldn't be in the main bin + libexec.install bin/"mpi_demo" + end + + test do + (testpath/"testfile.txt").write("This is a test file") + # Don't remove the space between the checksum and filename. It will break. + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249 testfile.txt" + assert_equal expected_checksum, shell_output("#{bin}/generic_sum SHA256 testfile.txt").strip + end +end diff --git a/Formula/m/mbedtls@2.rb b/Formula/m/mbedtls@2.rb new file mode 100644 index 0000000000000..119434ad62739 --- /dev/null +++ b/Formula/m/mbedtls@2.rb @@ -0,0 +1,68 @@ +class MbedtlsAT2 < Formula + desc "Cryptographic & SSL/TLS library" + homepage "https://tls.mbed.org/" + url "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.28.10.tar.gz" + sha256 "c785ddf2ad66976ab429c36dffd4a021491e40f04fe493cfc39d6ed9153bc246" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5464397f0b136439069dd2c763b20192d423cd5c1c2f0771b031656a660e75a8" + sha256 cellar: :any, arm64_sequoia: "1ac6bd9c970e98200758af383b9e8295387bd7b4c247dcdcb16cb05521b39607" + sha256 cellar: :any, arm64_sonoma: "194e03a15d26c9c866962875b2d1e5ccedab9e10f7ad9d60e01a155c88fdc2b6" + sha256 cellar: :any, arm64_ventura: "353399bc51df1d729cdcf045ad7da4f268acbc4f562eb9ae9fb18e12658ee9a1" + sha256 cellar: :any, sonoma: "2269cb5ed16600a247a38499b79c7418c9af39087c0d0e0775b045e87cd11f7c" + sha256 cellar: :any, ventura: "b73d53ebca5b7ca6781171b446c2120d01ca0979c3d510f51026de739650a470" + sha256 cellar: :any_skip_relocation, arm64_linux: "839293c23e53ef5576077ab17ca04d66e5ea23dc70b6da9ce5f31672bc4d5b29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ae36df2af07705fc3817ecc1374a68eb2a21dac30b77e1e1b46970f4ab8e8a8" + end + + keg_only :versioned_formula + + # mbedtls-2.28 maintained until the end of 2024 + # Ref: https://github.com/Mbed-TLS/mbedtls/blob/development/BRANCHES.md#current-branches + deprecate! date: "2025-03-31", because: :unsupported + + depends_on "cmake" => :build + depends_on "python@3.12" => :build + + def install + inreplace "include/mbedtls/config.h" do |s| + # enable pthread mutexes + s.gsub! "//#define MBEDTLS_THREADING_PTHREAD", "#define MBEDTLS_THREADING_PTHREAD" + # allow use of mutexes within mbed TLS + s.gsub! "//#define MBEDTLS_THREADING_C", "#define MBEDTLS_THREADING_C" + end + + args = %W[ + -DUSE_SHARED_MBEDTLS_LIBRARY=On + -DPython3_EXECUTABLE=#{which("python3.12")} + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + # Workaround for CMake 4 compatibility + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + + # We run CTest because this is a crypto library. Running tests in parallel causes failures. + # https://github.com/Mbed-TLS/mbedtls/issues/4980 + with_env(CC: DevelopmentTools.locate(DevelopmentTools.default_compiler)) do + system "ctest", "--parallel", "1", "--test-dir", "build", "--rerun-failed", "--output-on-failure" + end + system "cmake", "--install", "build" + + # Why does Mbedtls ship with a "Hello World" executable. Let's remove that. + rm(bin/"hello") + # Rename benchmark & selftest, which are awfully generic names. + mv bin/"benchmark", bin/"mbedtls-benchmark" + mv bin/"selftest", bin/"mbedtls-selftest" + # Demonstration files shouldn't be in the main bin + libexec.install bin/"mpi_demo" + end + + test do + (testpath/"testfile.txt").write("This is a test file") + # Don't remove the space between the checksum and filename. It will break. + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249 testfile.txt" + assert_equal expected_checksum, shell_output("#{bin}/generic_sum SHA256 testfile.txt").strip + end +end diff --git a/Formula/m/mbelib.rb b/Formula/m/mbelib.rb new file mode 100644 index 0000000000000..79b56581cd1fd --- /dev/null +++ b/Formula/m/mbelib.rb @@ -0,0 +1,52 @@ +class Mbelib < Formula + desc "P25 Phase 1 and ProVoice vocoder" + homepage "https://github.com/szechyjs/mbelib" + url "https://github.com/szechyjs/mbelib/archive/refs/tags/v1.3.0.tar.gz" + sha256 "5a2d5ca37cef3b6deddd5ce8c73918f27936c50eb0e63b27e4b4fc493310518d" + license "ISC" + head "https://github.com/szechyjs/mbelib.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fb72e50f6461676e8b9f0bc61ac16133652bc92e84a139f8db55db0f39952291" + sha256 cellar: :any, arm64_sequoia: "4303b80f4b00f9a5ba52109c0995c196d0d54b19f9d105520379206eb50b373c" + sha256 cellar: :any, arm64_sonoma: "cd9b0cc3c21687f175d3f4aee0229bd9b7aafe34eba6360f26f0619296a0acfe" + sha256 cellar: :any, arm64_ventura: "5efa031e17f6e6fbfa06cb1bab625af8721ec46b287044fa5cbb0e0567417a80" + sha256 cellar: :any, arm64_monterey: "4a189fcd966e9a57fb11df30a7e136d98bd7b2e989d01af3731117475e2afc94" + sha256 cellar: :any, arm64_big_sur: "053dd044423318deba18dbccbbd1d85efec94b507dd5646beb7b6c3d32064010" + sha256 cellar: :any, sonoma: "2a453c236a4520b7dfc9e50e9fec24fdd2167c31b94b25ac1004b108c212ad14" + sha256 cellar: :any, ventura: "81eca52ffaa4828961e274c2c00ff39574ed1f9fddbc2d55fbea56068d2882e5" + sha256 cellar: :any, monterey: "925321b8a121e7cae27ec3736d1035d27d9945255ea9113f430c5dd15e7d4b7e" + sha256 cellar: :any, big_sur: "508ed0ed1f9603c7c3e50accea0e201d391f673b63a4acb71574827fddcbb1ef" + sha256 cellar: :any, catalina: "fb29c40fb9af7c0303d9f7929e61941e8c10c8aad57662f366a671d3a73be116" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd598eb6c1483c8d083384b4e8edce2a37fbdebaf0efcfd7585f26440ffd66f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2aa416bb9571e03c0bb7b877a44f08e874f069367367ca6c3bd6cefb87ecd70d" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "test" + system "cmake", "--install", "build" + end + + test do + (testpath/"mb.cpp").write <<~CPP + extern "C" { + #include "mbelib.h" + } + int main() { + float float_buf[160] = {1.23f, -1.12f, 4680.412f, 4800.12f, -4700.74f}; + mbe_synthesizeSilencef(float_buf); + return (float_buf[0] != 0); + } + CPP + system ENV.cxx, "mb.cpp", "-o", "test", "-L#{lib}", "-lmbe" + system "./test" + end +end diff --git a/Formula/m/mbpoll.rb b/Formula/m/mbpoll.rb new file mode 100644 index 0000000000000..f63830e4371cb --- /dev/null +++ b/Formula/m/mbpoll.rb @@ -0,0 +1,46 @@ +class Mbpoll < Formula + desc "Command-line utility to communicate with ModBus slave (RTU or TCP)" + homepage "https://epsilonrt.fr" + url "https://github.com/epsilonrt/mbpoll/archive/refs/tags/v1.5.2.tar.gz" + sha256 "7d960cd4459b5f7c2412abc51aba93a20b6114fd75d1de412b1e540cfb63bfec" + license "GPL-3.0-only" + head "https://github.com/epsilonrt/mbpoll.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e9a8e9a61b04c4c4b18a0af7c86006612b40949b381fba4cd0342cb0cf073245" + sha256 cellar: :any, arm64_sequoia: "f2e1b7cc1e13adec4be27c0786d6d58d8452981695981111b9fb5a27b4209672" + sha256 cellar: :any, arm64_sonoma: "38fed0cebc17a0f5b56f57c877ba9aedb7740f88ad49ec8b7ab20b75d46d451a" + sha256 cellar: :any, arm64_ventura: "11ad727f1304188c6973eeb682de71cf60275cda1cc2055564454dcfa03eb264" + sha256 cellar: :any, sonoma: "448753a6babe4e91ec293111c781deca8456740af65c153c09b3a7f334d7ef8f" + sha256 cellar: :any, ventura: "18d5251c8aa33916193ca6023807ba57a335f0abc5c2109fc7ff9921a3b69cd6" + sha256 cellar: :any_skip_relocation, arm64_linux: "13e6297dc717b70f1c464440d12ca264392b9b87bfee6a33e61f14d1579c80fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dffd6e9a6cbca3f5950ea1fd49d0db7ca5cf0d7a117faac986a1c2bbe43cff49" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libmodbus" + + # Workaround for CMake 4 compatibility + # PR ref: https://github.com/epsilonrt/mbpoll/pull/95 + patch do + url "https://github.com/epsilonrt/mbpoll/commit/baad0efca89f0d8fe370591283d87a6e8e7dee4c.patch?full_index=1" + sha256 "75cb9265a30218159d11e6dbda81aa17484d96721f71e22072639d490a7f95d2" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # NOTE: using "1.0-0" and not "1.5.2" + # upstream fix pr: https://github.com/epsilonrt/mbpoll/pull/58 + assert_match "1.0-0", shell_output("#{bin}/mbpoll -V") + + assert_match "Connection failed", shell_output("#{bin}/mbpoll -1 -o 0.01 -q -m tcp invalid.host 2>&1", 1) + end +end diff --git a/Formula/m/mbt.rb b/Formula/m/mbt.rb new file mode 100644 index 0000000000000..eda5948f6677d --- /dev/null +++ b/Formula/m/mbt.rb @@ -0,0 +1,31 @@ +class Mbt < Formula + desc "Multi-Target Application (MTA) build tool for Cloud Applications" + homepage "https://sap.github.io/cloud-mta-build-tool" + url "https://github.com/SAP/cloud-mta-build-tool/archive/refs/tags/v1.2.34.tar.gz" + sha256 "831450c20115a2446513629b71597ae1dd6d81d185cb65a3d49fba5d1c7c220d" + license "Apache-2.0" + head "https://github.com/SAP/cloud-mta-build-tool.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4db3e97e080a28ade4ba714052dcedf3a55453bafc41c2fb84508ca12c0a2018" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c402f06fa3ad380a2cf919861555eb18c0a1c649a9d772c84e96251ee8beba58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c402f06fa3ad380a2cf919861555eb18c0a1c649a9d772c84e96251ee8beba58" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c402f06fa3ad380a2cf919861555eb18c0a1c649a9d772c84e96251ee8beba58" + sha256 cellar: :any_skip_relocation, sonoma: "8d0083779e2224e44c5b2a942c1bd455ffa9cf02f74c5ec3599fa2b906b6e3c1" + sha256 cellar: :any_skip_relocation, ventura: "8d0083779e2224e44c5b2a942c1bd455ffa9cf02f74c5ec3599fa2b906b6e3c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad417cb29acd148b1379645aaa8bc7df579813f5e32fd44bf3f9a44ec2a42681" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3de1733d1f33b1497ad216370c7301b8414cbb544db4376581feddb0869db12b" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.BuildDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match(/generating the "Makefile_\d+.mta" file/, shell_output("#{bin}/mbt build", 1)) + assert_match("Cloud MTA Build Tool", shell_output("#{bin}/mbt --version")) + end +end diff --git a/Formula/m/mbw.rb b/Formula/m/mbw.rb new file mode 100644 index 0000000000000..b48655607e1f1 --- /dev/null +++ b/Formula/m/mbw.rb @@ -0,0 +1,36 @@ +class Mbw < Formula + desc "Memory Bandwidth Benchmark" + homepage "https://github.com/raas/mbw/" + url "https://github.com/raas/mbw/archive/refs/tags/v2.0.tar.gz" + sha256 "557f670e13ff663086fe239e4184d8ca6154b004bd5fde2b0a748e5aa543c87f" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1c8c88e772ba5c6cc57af7b79c0520750566523f94d643c00f5355333d176836" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d07a9cad29f80e14aa0abab7e8b5519729e401d876e84b59b400f5413a85a3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43bba75f10ec5e1d0dead83ec5b9549e9c5afaec052c3b5684fe8dbebd485819" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d8c490ebba8f65126392a3a5c15ecbd7531217b5f87a7e7f4c3de239d794c34" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c508f7394113b7bbfa8d128c8a67321a8539e212cca8384f63d16688a98c52dd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "15ee30ee71405b25533e14618bd3541da3f13e310754e39278cef4a1f06eb6d9" + sha256 cellar: :any_skip_relocation, sonoma: "e0d410a21a09a4a2da43b61128be02c0c4ff95381376036b7ae6ebb4f44e4cca" + sha256 cellar: :any_skip_relocation, ventura: "0e7ba7c958e2386d613322712c44a50c3f3aaf22ec663fb550c84b3d2537ce09" + sha256 cellar: :any_skip_relocation, monterey: "356d3527bf46cd56f25f2f8ed5e6150115fb3ec175100493c98ffbbafefa1344" + sha256 cellar: :any_skip_relocation, big_sur: "63a8ba9a5eb2ffaf44f1535b8c3bcac2bd3ebc912a6daceae2ee01df6c89b13b" + sha256 cellar: :any_skip_relocation, arm64_linux: "59fb54c3415e043a4eb29261d56613411126d676837894f159f6cb54d438ee0d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07ba5ff41d1031bc549c646c8d7bfc9082ce02b0572d437cb0c840855814ebf0" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "AVG\tMethod: MEMCPY\tElapsed", pipe_output("#{bin}/mbw 8", "0") + end +end diff --git a/Formula/m/mcabber.rb b/Formula/m/mcabber.rb new file mode 100644 index 0000000000000..e4f3bfe4516fa --- /dev/null +++ b/Formula/m/mcabber.rb @@ -0,0 +1,76 @@ +class Mcabber < Formula + desc "Console Jabber client" + homepage "https://mcabber.com/" + url "https://mcabber.com/files/mcabber-1.1.2.tar.bz2" + sha256 "c4a1413be37434b6ba7d577d94afb362ce89e2dc5c6384b4fa55c3e7992a3160" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?mcabber[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "5a3fd194c38f6e2cdde387ac0d822bb4d44735e3a5dee9e04bd847cff9febaf7" + sha256 arm64_sequoia: "ecad9a3ee398b3a8d3da0c3a6f70ce3bbd6d8b7f0e56982c534858deeb7f93f3" + sha256 arm64_sonoma: "df43d005dea2bc2e1ad875453efff00618a535da2dc69041f65bda297aaff7e1" + sha256 arm64_ventura: "53fa4715f224ba5b3c89b8e3f4894055a45a99897ddde8534f3344ac654341c8" + sha256 sonoma: "91739babcca8744a2b366cdfe13a3504bb55b38531301c5ed131a68aa761e7ae" + sha256 ventura: "82b5dd6349e6e36c3cd053aaf4cac15c2e421a5c599011bf6fc80006f4a412ee" + sha256 arm64_linux: "80babf982f8b324a1b5930c44faf244e4b342fb3e14fb0a4f8eed724b0578446" + sha256 x86_64_linux: "fb62852c31174e4df62f12848a3a3cb942a7c0d86dd77f3ca0643d75ba088d97" + end + + head do + url "https://mcabber.com/hg/", using: :hg + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "gpgme" + depends_on "libgcrypt" + depends_on "libidn" + depends_on "libotr" + depends_on "loudmouth" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + depends_on "libassuan" + depends_on "libgpg-error" + end + + def install + if build.head? + cd "mcabber" + inreplace "autogen.sh", "libtoolize", "glibtoolize" + system "./autogen.sh" + end + + system "./configure", "--enable-otr", *std_configure_args + system "make", "install" + + pkgshare.install %w[mcabberrc.example contrib] + end + + def caveats + <<~EOS + A configuration file is necessary to start mcabber. The template is here: + #{opt_pkgshare}/mcabberrc.example + And there is a Getting Started Guide you will need to setup Mcabber: + https://wiki.mcabber.com/#index2h1 + EOS + end + + test do + system bin/"mcabber", "-V" + end +end diff --git a/Formula/m/mcap.rb b/Formula/m/mcap.rb new file mode 100644 index 0000000000000..e7943a96b9c61 --- /dev/null +++ b/Formula/m/mcap.rb @@ -0,0 +1,64 @@ +class Mcap < Formula + desc "Serialization-agnostic container file format for pub/sub messages" + homepage "https://mcap.dev" + url "https://github.com/foxglove/mcap/archive/refs/tags/releases/mcap-cli/v0.0.57.tar.gz" + sha256 "00bfa671eeb44a3abdfb543cdb6faa7d13900fb8f174497c1f6bf3416e4023af" + license "MIT" + head "https://github.com/foxglove/mcap.git", branch: "main" + + livecheck do + url :stable + regex(%r{^releases/mcap-cli/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67995c19bf4c473bd47d80fd3ead323d7402aa19c8c93ff937a0fbd80afecc80" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb8e1e76a8c1a882211e44939afbe65dd0ac5f75e94ff3429f0a25e45fe34a58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49a35abe9446eee43836d8b356057fba0d149b3da2f5037cd5e288ac22d1efaf" + sha256 cellar: :any_skip_relocation, sonoma: "3de0ed279e744a584159814de426b8f996bb44703504dac87cbe24bd25fdcf32" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bfa8f864c8379536b69f96ce913670f209ee38f5697ae7c0dbc32a2cfe5f7a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f196c710b6f26efc0c0ee0cf5e4d6d7cc7a17dbccdba039352d33fe51b7b3f54" + end + + depends_on "go" => :build + + def install + cd "go/cli/mcap" do + system "make", "build", "VERSION=v#{version}" + bin.install "bin/mcap" + end + generate_completions_from_executable(bin/"mcap", "completion") + end + + test do + resource "homebrew-testdata-OneMessage" do + url "https://github.com/foxglove/mcap/raw/releases/mcap-cli/v0.0.20/tests/conformance/data/OneMessage/OneMessage-ch-chx-mx-pad-rch-rsh-st-sum.mcap" + sha256 "16e841dbae8aae5cc6824a63379c838dca2e81598ae08461bdcc4e7334e11da4" + end + + resource "homebrew-testdata-OneAttachment" do + url "https://github.com/foxglove/mcap/raw/releases/mcap-cli/v0.0.20/tests/conformance/data/OneAttachment/OneAttachment-ax-pad-st-sum.mcap" + sha256 "f9dde0a5c9f7847e145be73ea874f9cdf048119b4f716f5847513ee2f4d70643" + end + + resource "homebrew-testdata-OneMetadata" do + url "https://github.com/foxglove/mcap/raw/releases/mcap-cli/v0.0.20/tests/conformance/data/OneMetadata/OneMetadata-mdx-pad-st-sum.mcap" + sha256 "cb779e0296d288ad2290d3c1911a77266a87c0bdfee957049563169f15d6ba8e" + end + + assert_equal "v#{version}", shell_output("#{bin}/mcap version").strip + + resource("homebrew-testdata-OneMessage").stage do + assert_equal "2 example [Example] [1 2 3]", + shell_output("#{bin}/mcap cat OneMessage-ch-chx-mx-pad-rch-rsh-st-sum.mcap").strip + end + resource("homebrew-testdata-OneAttachment").stage do + assert_equal "\x01\x02\x03", + shell_output("#{bin}/mcap get attachment OneAttachment-ax-pad-st-sum.mcap --name myFile") + end + resource("homebrew-testdata-OneMetadata").stage do + assert_equal({ "foo" => "bar" }, + JSON.parse(shell_output("#{bin}/mcap get metadata OneMetadata-mdx-pad-st-sum.mcap --name myMetadata"))) + end + end +end diff --git a/Formula/m/mcfly.rb b/Formula/m/mcfly.rb new file mode 100644 index 0000000000000..44d56c7e96f87 --- /dev/null +++ b/Formula/m/mcfly.rb @@ -0,0 +1,30 @@ +class Mcfly < Formula + desc "Fly through your shell history" + homepage "https://github.com/cantino/mcfly" + url "https://github.com/cantino/mcfly/archive/refs/tags/v0.9.3.tar.gz" + sha256 "194383276095b71dd6d085fb959ba7981384cbe09776fd5f182e95bbed5a3a13" + license "MIT" + head "https://github.com/cantino/mcfly.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f920163beda17f623378f6bb5709fbed5d171457ca75f217a3a2d07df505d2e0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a329184731d417bc6016e81b3ce19d17effb7d42350eee294e1618406275033" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3ab9a0a347a17d8f178f6cee096e19721722a90852ca0b22713f3f7e0077bd4d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c2fef662ad29e3b0619aa16441a538d46f5afde1c283187db41fba709b7464b" + sha256 cellar: :any_skip_relocation, sonoma: "236969135ed756c5ce43446daaa45ef31b7d58eab04a95cce3c70c1edf1d7299" + sha256 cellar: :any_skip_relocation, ventura: "e7ac96528b54c530cfc17f8dce5849e0578292757c64f329e7bbe6c97f68b2f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a41cfad3299262d345f16557a6fffe6621429fb18f3ce7b3720fcf2036df1596" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cd74d143ac75a6dd064fad3f30bcecef451719fec529b40dc7ff33d2be336e0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "mcfly_prompt_command", shell_output("#{bin}/mcfly init bash") + assert_match version.to_s, shell_output("#{bin}/mcfly --version") + end +end diff --git a/Formula/m/mcp-atlassian.rb b/Formula/m/mcp-atlassian.rb new file mode 100644 index 0000000000000..b64d3a704aac6 --- /dev/null +++ b/Formula/m/mcp-atlassian.rb @@ -0,0 +1,434 @@ +class McpAtlassian < Formula + include Language::Python::Virtualenv + + desc "MCP server for Atlassian tools (Confluence, Jira)" + homepage "https://github.com/sooperset/mcp-atlassian" + url "https://files.pythonhosted.org/packages/36/89/d3a551c89e346ea2a81b53d5897192b703b0ff3951de3034158a6d822b06/mcp_atlassian-0.11.9.tar.gz" + sha256 "1ba6a171b5299e554d4e0eff98279e74cdc4eb1c12c8e62be924103d9cd38e5e" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "e37dde66a2ce3db67252bad2b906d11d6d0b43d9679323e061bed5996f3e3460" + sha256 cellar: :any, arm64_sequoia: "b0c1ba6ab0e91da65a2399ef7a279912e4829bee2cb7eee9a05b67b9653a7c26" + sha256 cellar: :any, arm64_sonoma: "cbadd1383c91bbe408e9bb4b275899bf3a7fdd8064fa8699cd47570c4f5c9f38" + sha256 cellar: :any, sonoma: "f68eed83804aa5e75c92c8305c9a8ba04318ce5e32fe898a2b07d71b0bb0b41f" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d576ded8f50ed3a361c1a18b346a291e2bc251015479e56df6482ea26f9fb06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06b92ea8479ca5f5bc0c8d9b2a8eb8514206eb4e4e842a2a8b54d4e47f4c52ec" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["certifi", "pydantic-core", "rpds-py"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "atlassian-python-api" do + url "https://files.pythonhosted.org/packages/40/e8/f23b7273e410c6fe9f98f9db25268c6736572f22a9566d1dc9ed3614bb68/atlassian_python_api-4.0.7.tar.gz" + sha256 "8d9cc6068b1d2a48eb434e22e57f6bbd918a47fac9e46b95b7a3cefb00fceacb" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/72/0a/c3ea9573b1dc2e151abfe88c7fe0c26d1892fe6ed02d0cdb30f0d57029d5/cssselect-1.3.0.tar.gz" + sha256 "57f8a99424cfab289a1b6a816a43075a4b00948c86b4dcf3ef4ee7e15f7ab0c7" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "exceptiongroup" do + url "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz" + sha256 "b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88" + end + + resource "fastmcp" do + url "https://files.pythonhosted.org/packages/61/30/1a70fce24dd0c9f7e7e2168adad1eb2c126e918128594a7bba06093b9263/fastmcp-2.3.5.tar.gz" + sha256 "09e11723c6588d8c13562d5eb04d42b13b91eb32f53cef77cc8c0ee121b2f907" + + # Fix incompatability with pydantic 2.12+: https://github.com/sooperset/mcp-atlassian/issues/721 + # Backport of https://github.com/jlowin/fastmcp/commit/1ade5ddb0525e2bfd9ff3423887a0a2b28772681 + patch :DATA + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markdown-to-confluence" do + url "https://files.pythonhosted.org/packages/ef/7d/ff8876b6c36172a02941b53a7456e5628597fc0cbfc100882da2a066ec7d/markdown_to_confluence-0.3.5.tar.gz" + sha256 "4309af625682f6d300e117992b87e6459a8ae6b653dee2f9126a678acf076f0b" + end + + resource "markdownify" do + url "https://files.pythonhosted.org/packages/83/1b/6f2697b51eaca81f08852fd2734745af15718fea10222a1d40f8a239c4ea/markdownify-1.2.0.tar.gz" + sha256 "f6c367c54eb24ee953921804dfe6d6575c5e5b42c643955e7242034435de634c" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/69/2b/916852a5668f45d8787378461eaa1244876d77575ffef024483c94c0649c/mcp-1.19.0.tar.gz" + sha256 "213de0d3cd63f71bc08ffe9cc8d4409cc87acffd383f6195d2ce0457c021b5c1" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "openapi-pydantic" do + url "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz" + sha256 "ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d" + end + + resource "outcome" do + url "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz" + sha256 "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pymdown-extensions" do + url "https://files.pythonhosted.org/packages/55/b3/6d2b3f149bc5413b0a29761c2c5832d8ce904a1d7f621e86616d96f505cc/pymdown_extensions-10.16.1.tar.gz" + sha256 "aace82bcccba3efc03e25d584e6a22d27a8e17caa3f4dd9f207e49b787aa9a91" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz" + sha256 "a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rapidfuzz" do + url "https://files.pythonhosted.org/packages/ed/fc/a98b616db9a42dcdda7c78c76bdfdf6fe290ac4c5ffbb186f73ec981ad5b/rapidfuzz-3.14.1.tar.gz" + sha256 "b02850e7f7152bd1edff27e9d584505b84968cacedee7a734ec4050c655a803c" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz" + sha256 "ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/a7/a5/d6f429d43394057b67a6b5bbe6eae2f77a6bf7459d961fdb224bf206eee6/starlette-0.48.0.tar.gz" + sha256 "7e8cee469a8ab2352911528110ce9088fdc6a37d9876926e73da7ce4aa4c7a46" + end + + resource "thefuzz" do + url "https://files.pythonhosted.org/packages/81/4b/d3eb25831590d6d7d38c2f2e3561d3ba41d490dc89cd91d9e65e7c812508/thefuzz-0.22.1.tar.gz" + sha256 "7138039a7ecf540da323792d8592ef9902b1d79eb78c147d4f20664de79f3680" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/76/8f/c6e36dd11201e2a565977d8b13f0b027ba4593c1a80bed5185489178e257/trio-0.31.0.tar.gz" + sha256 "f71d551ccaa79d0cb73017a33ef3264fde8335728eb4c6391451fe5d253a9d5b" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "types-cachetools" do + url "https://files.pythonhosted.org/packages/3b/a8/f9bcc7f1be63af43ef0170a773e2d88817bcc7c9d8769f2228c802826efe/types_cachetools-6.2.0.20251022.tar.gz" + sha256 "f1d3c736f0f741e89ec10f0e1b0138625023e21eb33603a930c149e0318c0cef" + end + + resource "types-html5lib" do + url "https://files.pythonhosted.org/packages/8a/b8/0ce98d9b20a4e8bdac4f4914054acadf5b3a36a7a832e11e0d1938e4c3ce/types_html5lib-1.1.11.20251014.tar.gz" + sha256 "cc628d626e0111a2426a64f5f061ecfd113958b69ff6b3dc0eaaed2347ba9455" + end + + resource "types-lxml" do + url "https://files.pythonhosted.org/packages/e0/3e/a545ece610c1bd9699addd887edfe9477a8f647c4336ba75cfb0561d197c/types_lxml-2025.8.25.tar.gz" + sha256 "79b9f5b1f236f937f14fe3add9dc687bd8d4111ca5df58eb9f1bde1a3b032fd5" + end + + resource "types-markdown" do + url "https://files.pythonhosted.org/packages/fb/dd/8a91a5f4dce705eff6862e01e8fd9984cdc55e6d6c3cfcadc68410c43abf/types_markdown-3.9.0.20250906.tar.gz" + sha256 "f02dc1a2d130b093de4910c64b2d0a811ae7020f03624df41c667818d2fee050" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/fc/83/24ed25dd0c6277a1a170c180ad9eef5879ecc9a4745b58d7905a4588c80d/types_python_dateutil-2.9.0.20251008.tar.gz" + sha256 "c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c" + end + + resource "types-pyyaml" do + url "https://files.pythonhosted.org/packages/7e/69/3c51b36d04da19b92f9e815be12753125bd8bc247ba0470a982e6979e71c/types_pyyaml-6.0.12.20250915.tar.gz" + sha256 "0f8b54a528c303f0e6f7165687dd33fafa81c807fcac23f632b63aa624ced1d3" + end + + resource "types-requests" do + url "https://files.pythonhosted.org/packages/36/27/489922f4505975b11de2b5ad07b4fe1dca0bca9be81a703f26c5f3acfce5/types_requests-2.32.4.20250913.tar.gz" + sha256 "abd6d4f9ce3a9383f269775a9835a4c24e5cd6b9f647d64f88aa4613c33def5d" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcp-atlassian --version") + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{}}} + {"jsonrpc":"2.0","method":"notifications/initialized","params":{}} + {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}} + JSON + + ENV["JIRA_URL"] = "https://example.atlassian.net" + ENV["JIRA_USERNAME"] = "user@example.com" + ENV["JIRA_API_TOKEN"] = "x" + + output = pipe_output("#{bin}/mcp-atlassian 2>&1", json, 0) + assert_match "Search Jira issues using JQL (Jira Query Language)", output + end +end + +__END__ +diff --git a/src/fastmcp/settings.py b/src/fastmcp/settings.py +index 34209f5..0944501 100644 +--- a/src/fastmcp/settings.py ++++ b/src/fastmcp/settings.py +@@ -108,13 +108,10 @@ class ServerSettings(BaseSettings): + # prompt settings + on_duplicate_prompts: DuplicateBehavior = "warn" + +- dependencies: Annotated[ +- list[str], +- Field( +- default_factory=list, +- description="List of dependencies to install in the server environment", +- ), +- ] = [] ++ dependencies: list[str] = Field( ++ default_factory=list, ++ description="List of dependencies to install in the server environment", ++ ) + + # cache settings (for checking mounted servers) + cache_expiration_seconds: float = 0 diff --git a/Formula/m/mcp-get.rb b/Formula/m/mcp-get.rb new file mode 100644 index 0000000000000..eb3964a4a4cef --- /dev/null +++ b/Formula/m/mcp-get.rb @@ -0,0 +1,22 @@ +class McpGet < Formula + desc "CLI for discovering, installing, and managing MCP servers" + homepage "https://github.com/michaellatman/mcp-get" + url "https://registry.npmjs.org/@michaellatman/mcp-get/-/mcp-get-1.0.115.tgz" + sha256 "15b58431832df7c8038faa22dd09110f0daa5da6be7b208afd1455eace428cf9" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "40ebc222469a196d53cfbed45e0a14156358e76ea72ac9bc43ba85e49a2bfc3e" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "No MCP servers are currently installed", shell_output("#{bin}/mcp-get installed") + end +end diff --git a/Formula/m/mcp-google-sheets.rb b/Formula/m/mcp-google-sheets.rb new file mode 100644 index 0000000000000..74f6da680cc86 --- /dev/null +++ b/Formula/m/mcp-google-sheets.rb @@ -0,0 +1,253 @@ +class McpGoogleSheets < Formula + include Language::Python::Virtualenv + + desc "MCP server integrates with your Google Drive and Google Sheets" + homepage "https://github.com/xing5/mcp-google-sheets" + url "https://files.pythonhosted.org/packages/b2/cb/ba262f74fc2665442837cb88a9a9662ff360d6d8614600e525225edbdb2f/mcp_google_sheets-0.5.1.tar.gz" + sha256 "9ba9d779baf47c383eec5246d52c19af580f236999a7e99f4a02e8545e31cff7" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8f50062e7bf26799dd2828a3fc35c78543c7c14801477eeda0cdef803858a6e7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "782553590cd44821298b97bfb649d32556eb55a4cd169648586b71b9e4ac6f84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "375112a2230752c290d00c51a4145b5c0a94f08f839540bb04a049286f5c25e6" + sha256 cellar: :any_skip_relocation, sonoma: "928116dd2b67d641700ec9a8983809b608712920fcf5e7c40c2d038b8c29bef1" + sha256 cellar: :any_skip_relocation, arm64_linux: "99e648b117eba1337c684ab300eb17b817bfdca78af13a0eaa349ec9b1ee0541" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b24d7ab4e4d15267db9f1e1ba79bcc760712552a58d6cdc6e12995f30439bb5c" + end + + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "pydantic-core", "rpds-py"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/61/da/83d7043169ac2c8c7469f0e375610d78ae2160134bf1b80634c482fa079c/google_api_core-2.28.1.tar.gz" + sha256 "2b405df02d68e68ce0fbc138559e6036559e685159d148ae5861013dc201baf8" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/8e/5a/6f9b49d67ea91376305fdb8bbf2877c746d756e45fd8fb7d2e32d6dad19b/google_api_python_client-2.185.0.tar.gz" + sha256 "aa1b338e4bb0f141c2df26743f6b46b11f38705aacd775b61971cbc51da089c3" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/11/75/28881e9d7de9b3d61939bc9624bd8fa594eb787a00567aba87173c790f09/google_auth-2.42.0.tar.gz" + sha256 "9bbbeef3442586effb124d1ca032cfb8fb7acd8754ab79b55facd2b8f3ab2802" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "google-auth-oauthlib" do + url "https://files.pythonhosted.org/packages/fb/87/e10bf24f7bcffc1421b84d6f9c3377c30ec305d082cd737ddaa6d8f77f7c/google_auth_oauthlib-1.2.2.tar.gz" + sha256 "11046fb8d3348b296302dd939ace8af0a724042e8029c1b872d87fabc9f41684" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/69/2b/916852a5668f45d8787378461eaa1244876d77575ffef024483c94c0649c/mcp-1.19.0.tar.gz" + sha256 "213de0d3cd63f71bc08ffe9cc8d4409cc87acffd383f6195d2ce0457c021b5c1" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz" + sha256 "ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["GOOGLE_APPLICATION_CREDENTIALS"] = testpath/"credentials.json" + (testpath/"credentials.json").write "" + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output("#{bin}/mcp-google-sheets 2>&1", json, 1) + assert_match "Error using Application Default Credentials", output + end +end diff --git a/Formula/m/mcp-grafana.rb b/Formula/m/mcp-grafana.rb new file mode 100644 index 0000000000000..b76c027e109cc --- /dev/null +++ b/Formula/m/mcp-grafana.rb @@ -0,0 +1,34 @@ +class McpGrafana < Formula + desc "MCP server for Grafana" + homepage "https://github.com/grafana/mcp-grafana" + url "https://github.com/grafana/mcp-grafana/archive/refs/tags/v0.7.8.tar.gz" + sha256 "b42ab6f91952301e2624a9d0e7ed7734b517d357050cd4d2d426665985acbe29" + license "Apache-2.0" + head "https://github.com/grafana/mcp-grafana.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fc825abf2625da93d7d8dcd8afb205ff410246d59a5d5b9d6f025358a8cd1a22" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "21a6bbbdb463d7901116bb357d353c0fbcb75887e4c814b473e6015850787b02" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99706ec1edbae7f4dbd5764d6eb5944a29ca00e56d166232b0713d5e6e8f144f" + sha256 cellar: :any_skip_relocation, sonoma: "b68bfd99aea064cf5484827ac1512a820007f966518c56dce7ad4b8714ad5a18" + sha256 cellar: :any_skip_relocation, arm64_linux: "000aee0e5f7621cdc7e6015fbfc4a8a59049dc81fcf8c8d02da01911f85cae94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ebc29eea07e57644ec739a0d27c6e34f8516d9bf5aed92f082420f276ff50ee" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/mcp-grafana" + end + + test do + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output(bin/"mcp-grafana", json, 0) + assert_match "This server provides access to your Grafana instance and the surrounding ecosystem", output + end +end diff --git a/Formula/m/mcp-inspector.rb b/Formula/m/mcp-inspector.rb new file mode 100644 index 0000000000000..0a05fd7879007 --- /dev/null +++ b/Formula/m/mcp-inspector.rb @@ -0,0 +1,31 @@ +class McpInspector < Formula + desc "Visual testing tool for MCP servers" + homepage "https://modelcontextprotocol.io/docs/tools/inspector" + url "https://registry.npmjs.org/@modelcontextprotocol/inspector/-/inspector-0.17.2.tgz" + sha256 "236e00c6edd60762f464755e663dad6b5547983cdfbe24576e8d58a015c5b93a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e250731fb8af0e642ccf809e0ce54c5821b02fd553630fb356f898a1fc0f8042" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + port = free_port + ENV["CLIENT_PORT"] = port.to_s + + read, write = IO.pipe + fork do + exec bin/"mcp-inspector", out: write + end + sleep 3 + + assert_match "Starting MCP inspector...", read.gets + end +end diff --git a/Formula/m/mcp-proxy.rb b/Formula/m/mcp-proxy.rb new file mode 100644 index 0000000000000..fbf75addab3de --- /dev/null +++ b/Formula/m/mcp-proxy.rb @@ -0,0 +1,149 @@ +class McpProxy < Formula + include Language::Python::Virtualenv + + desc "Bridge between Streamable HTTP and stdio MCP transports" + homepage "https://github.com/sparfenyuk/mcp-proxy" + url "https://files.pythonhosted.org/packages/fc/05/da3d5ccf2b5ff2a99f5295965d7f698604cc359fb4ecc2d23fc5d2111071/mcp_proxy-0.10.0.tar.gz" + sha256 "d354bd75d0c43e028fb4a0aea57608d53656db0cd7cf94f511a88761a36f8639" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3b0225508b0b2a6da1f445eabeb423d030124e701dbe8c82a4717de00f36c0cf" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core rpds-py] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/f8/22/fae38092e6c2995c03232635028510d77e7decff31b4ae79dfa0ba99c635/mcp-1.20.0.tar.gz" + sha256 "9ccc09eaadbfbcbbdab1c9723cfe2e0d1d9e324d7d3ce7e332ef90b09ed35177" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/db/3c/fa6517610dc641262b77cc7bf994ecd17465812c1b0585fe33e11be758ab/sse_starlette-3.0.3.tar.gz" + sha256 "88cfb08747e16200ea990c8ca876b03910a23b547ab3bd764c0d8eb81019b971" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcp-proxy --version") + + output = shell_output("#{bin}/mcp-proxy http://localhost:8080/sse 2>&1", 1) + assert_match "All connection attempts failed", output + end +end diff --git a/Formula/m/mcp-publisher.rb b/Formula/m/mcp-publisher.rb new file mode 100644 index 0000000000000..9ac754c374e95 --- /dev/null +++ b/Formula/m/mcp-publisher.rb @@ -0,0 +1,30 @@ +class McpPublisher < Formula + desc "Publisher CLI tool for the Official Model Context Protocol (MCP) Registry" + homepage "https://github.com/modelcontextprotocol/registry" + url "https://github.com/modelcontextprotocol/registry/archive/refs/tags/v1.3.8.tar.gz" + sha256 "2e0f45535691c19c2b79a78fe5edb044fdcb4d786f3eaf0434b102a6391ae02c" + license "MIT" + head "https://github.com/modelcontextprotocol/registry.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f1244e99b0d2917ae59165a8d5fa50c2991d2fe8cccbdf51cf65f8c7ea79c464" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f1244e99b0d2917ae59165a8d5fa50c2991d2fe8cccbdf51cf65f8c7ea79c464" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1244e99b0d2917ae59165a8d5fa50c2991d2fe8cccbdf51cf65f8c7ea79c464" + sha256 cellar: :any_skip_relocation, sonoma: "4f1446da8d424166ad4f3da396f51c63d8a87b8bce362d9ce303c12f06edab51" + sha256 cellar: :any_skip_relocation, arm64_linux: "010253be42c4437c1098c5e4c557300b51c4b8094e15a442e52081c74b59f8ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b3ab6fdeb16578e954071c6f0e63ccfd0526692e6eee235fc6b51263abec608" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.GitCommit=#{tap.user} -X main.BuildTime=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/publisher" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcp-publisher --version 2>&1") + assert_match "Created server.json", shell_output("#{bin}/mcp-publisher init") + assert_match "io.github.YOUR_USERNAME/YOUR_REPO", (testpath/"server.json").read + end +end diff --git a/Formula/m/mcp-server-chart.rb b/Formula/m/mcp-server-chart.rb new file mode 100644 index 0000000000000..2ba6a3776e62a --- /dev/null +++ b/Formula/m/mcp-server-chart.rb @@ -0,0 +1,28 @@ +class McpServerChart < Formula + desc "MCP with 25+ @antvis charts for visualization, generation, and analysis" + homepage "https://github.com/antvis/mcp-server-chart" + url "https://registry.npmjs.org/@antv/mcp-server-chart/-/mcp-server-chart-0.9.3.tgz" + sha256 "4175992432512ddf28a6e6f76cd9cbee05ee77b951ebbffc03d519c0da5b776d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0684300cb058daba0c43b432cdbde5e9316331fa3bde27197f5ad65faae8daa2" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output("#{bin}/mcp-server-chart 2>&1", json, 0) + assert_match "Background color of the chart, such as, '#fff'", output + end +end diff --git a/Formula/m/mcp-server-kubernetes.rb b/Formula/m/mcp-server-kubernetes.rb new file mode 100644 index 0000000000000..f7ffbd6b9a72f --- /dev/null +++ b/Formula/m/mcp-server-kubernetes.rb @@ -0,0 +1,41 @@ +class McpServerKubernetes < Formula + desc "MCP Server for kubernetes management commands" + homepage "https://github.com/Flux159/mcp-server-kubernetes" + url "https://registry.npmjs.org/mcp-server-kubernetes/-/mcp-server-kubernetes-2.9.7.tgz" + sha256 "7755b41cc279f9bab9cd2d581d0e48e9cdfb454c2a94396c968ba15adbe753c7" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bf4b9cf145e0643198d3f694c9b0fd7b2ba46b70edba9a358acb83f3b7358eef" + sha256 cellar: :any, arm64_sequoia: "7d67c7647ad7cb0b498e61f39cc43b6fe33988682673a9735e888607e48ac8fb" + sha256 cellar: :any, arm64_sonoma: "7d67c7647ad7cb0b498e61f39cc43b6fe33988682673a9735e888607e48ac8fb" + sha256 cellar: :any, sonoma: "289d52feecadfa9052a8fe0b1e6f31b9f63cdbdaa982fbf0fe671aa96f02265c" + sha256 cellar: :any_skip_relocation, arm64_linux: "580ddd18ae60fe788469123cf3edff4aa8ae183d0d8aca7ba6fc8672eb1cd961" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01dd81e6503e4cabf564f06364968b53fa51d503f0a585511f8cb8e6da86d572" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/mcp-server-kubernetes/node_modules" + node_modules.glob("{bare-fs,bare-os,bare-url}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + output = pipe_output(bin/"mcp-server-kubernetes", json, 0) + assert_match "kubectl_get", output + assert_match "kubectl_describe", output + assert_match "kubectl_logs", output + end +end diff --git a/Formula/m/mcp-toolbox.rb b/Formula/m/mcp-toolbox.rb new file mode 100644 index 0000000000000..1665d8cab0e59 --- /dev/null +++ b/Formula/m/mcp-toolbox.rb @@ -0,0 +1,52 @@ +class McpToolbox < Formula + desc "MCP server for databases" + homepage "https://github.com/googleapis/genai-toolbox" + url "https://github.com/googleapis/genai-toolbox/archive/refs/tags/v0.18.0.tar.gz" + sha256 "90fec5a10c797ce8a9ea04d453f6fdad0d64315ea55a34521a187d10cccdfa87" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bdf2295e1780c2fb52cf589e8c969513548c5098884f95d5636888e391e77bc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bdf2295e1780c2fb52cf589e8c969513548c5098884f95d5636888e391e77bc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bdf2295e1780c2fb52cf589e8c969513548c5098884f95d5636888e391e77bc2" + sha256 cellar: :any_skip_relocation, sonoma: "102d392d1c06e3e25a15a0480f14ea50452db218f473813ab5c4bd63595ac33f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1ec8cda606ae52304ac50e032c369c62ab777521e0e678ae88b0e375861f013" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9adb38654660fb76923462775e21f61c27df1c92698d81aa44dbbb3a209f389" + end + + depends_on "go" => :build + + conflicts_with "kahip", because: "both install `toolbox` binaries" + + def install + ldflags = %W[ + -s -w + -X github.com/googleapis/genai-toolbox/cmd.buildType=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"toolbox") + end + + test do + assert_match version.to_s, shell_output("#{bin}/toolbox --version") + + (testpath/"tools.yaml").write <<~EOS + sources: + my-sqlite-memory-db: + kind: "sqlite" + database: ":memory:" + EOS + + port = free_port + pid = fork { exec bin/"toolbox", "--tools-file", testpath/"tools.yaml", "--port", port.to_s } + + sleep 5 + + begin + output = shell_output("curl -s -i http://localhost:#{port} 2>&1") + assert_match "HTTP/1.1 200 OK", output, "Expected HTTP/1.1 200 OK response" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/m/mcphost.rb b/Formula/m/mcphost.rb new file mode 100644 index 0000000000000..73d95bc55c368 --- /dev/null +++ b/Formula/m/mcphost.rb @@ -0,0 +1,31 @@ +class Mcphost < Formula + desc "CLI host for LLMs to interact with tools via MCP" + homepage "https://github.com/mark3labs/mcphost" + url "https://github.com/mark3labs/mcphost/archive/refs/tags/v0.31.3.tar.gz" + sha256 "eb8c68f4cb63baf191b81bf252876f5b56692f9306729d71e0d95a6d82c683c4" + license "MIT" + head "https://github.com/mark3labs/mcphost.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b6e9b8c10de3651a364493398dbbccca7c835e5b42f482d20843e3f2d8fecbe1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6e9b8c10de3651a364493398dbbccca7c835e5b42f482d20843e3f2d8fecbe1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6e9b8c10de3651a364493398dbbccca7c835e5b42f482d20843e3f2d8fecbe1" + sha256 cellar: :any_skip_relocation, sonoma: "d21fe714a4bae90bf0ff2fdd9752aa91c8ef2f14975db36963680e7325271d9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2629fa866a59e1df977c1488dfe2ac0a6a9ca2c5cd955cd965a4a19aa73d124f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afa114e0884761b2cd1ee3b34ccdc1b41f7f612e3142d7d0a7df9be8e40f78f9" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + + generate_completions_from_executable(bin/"mcphost", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcphost --version") + assert_match "Authentication Status", shell_output("#{bin}/mcphost auth status") + assert_match "EVENT MATCHER COMMAND TIMEOUT", shell_output("#{bin}/mcphost hooks list") + end +end diff --git a/Formula/m/mcpm.rb b/Formula/m/mcpm.rb new file mode 100644 index 0000000000000..0b5dec98b6094 --- /dev/null +++ b/Formula/m/mcpm.rb @@ -0,0 +1,330 @@ +class Mcpm < Formula + include Language::Python::Virtualenv + + desc "Open source, community-driven MCP server and client manager" + homepage "https://mcpm.sh/" + url "https://files.pythonhosted.org/packages/00/8b/3a50e60c76b6d97417cf4e01e25701caa0cb71422af3134f9560fdf7eb89/mcpm-2.9.0.tar.gz" + sha256 "2a054d47e0540de708268d9d59947af855c62052b9d73d550225505779679916" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "decb9b477e5d5c8eba41e72d791067cd693b580a61cee23bfa9d3c54a0a26b79" + sha256 cellar: :any, arm64_sequoia: "8de2caaf04c7ad4fd2008030fd3cdd7e4f37d8c4c6e467891afc2fdebafca4e0" + sha256 cellar: :any, arm64_sonoma: "a1e0702793fc93cc06817fc8789608e519d2d2c171f9ba85da0b6f6834a3d319" + sha256 cellar: :any, sonoma: "6eedbad62f932823d7236501cedb29cd3e54581eb5076e4ce1987b1a92e45726" + sha256 cellar: :any_skip_relocation, arm64_linux: "67e16a08c72a39d12ee77d8349ca05d3d17ff50c8d306ace2a53d2f6faa17713" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0244ca312a499a4dad25b85217cc278055efa1f61edfc4ea49300126541e564e" + end + + depends_on "cmake" => :build # for duckdb + depends_on "rust" => :build # for watchfiles + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core rpds-py] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/cd/3f/1d3bbd0bf23bdd99276d4def22f29c27a914067b4cf66f753ff9b8bbd0f3/authlib-1.6.5.tar.gz" + sha256 "6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "duckdb" do + url "https://files.pythonhosted.org/packages/ea/e7/21cf50a3d52ffceee1f0bcc3997fa96a5062e6bab705baee4f6c4e33cce5/duckdb-1.4.1.tar.gz" + sha256 "f903882f045d057ebccad12ac69975952832edfe133697694854bb784b8d6c76" + end + + resource "email-validator" do + url "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz" + sha256 "9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426" + end + + resource "exceptiongroup" do + url "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz" + sha256 "b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88" + end + + resource "fastmcp" do + url "https://files.pythonhosted.org/packages/ad/ac/4906336669a643b634b7ecde539c79126dff9f47b1e9e4b312dd170c1715/fastmcp-2.10.2.tar.gz" + sha256 "1ad519fda8bfde1de7f54a7ed4be0b6353eb66230cc1e35eef29b47666a0027b" + + # Fix incompatibility with pydantic 2.12+: https://github.com/pathintegral-institute/mcpm.sh/issues/271 + patch do + url "https://github.com/jlowin/fastmcp/commit/1ade5ddb0525e2bfd9ff3423887a0a2b28772681.patch?full_index=1" + sha256 "095f0e47ee272effcc676b09b0d2dcadb801f49c5600b69204818af65b45d443" + end + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz" + sha256 "c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730" + end + + resource "inquirerpy" do + url "https://files.pythonhosted.org/packages/64/73/7570847b9da026e07053da3bbe2ac7ea6cde6bb2cbd3c7a5a950fa0ae40b/InquirerPy-0.3.4.tar.gz" + sha256 "89d2ada0111f337483cb41ae31073108b2ec1e618a49d7110b0d7ade89fc197e" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "loguru" do + url "https://files.pythonhosted.org/packages/3a/05/a1dae3dffd1116099471c643b8924f5aa6524411dc6c63fdae648c4f1aca/loguru-0.7.3.tar.gz" + sha256 "19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/69/2b/916852a5668f45d8787378461eaa1244876d77575ffef024483c94c0649c/mcp-1.19.0.tar.gz" + sha256 "213de0d3cd63f71bc08ffe9cc8d4409cc87acffd383f6195d2ce0457c021b5c1" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "openapi-pydantic" do + url "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz" + sha256 "ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pfzy" do + url "https://files.pythonhosted.org/packages/d9/5a/32b50c077c86bfccc7bed4881c5a2b823518f5450a30e639db5d3711952e/pfzy-0.3.4.tar.gz" + sha256 "717ea765dd10b63618e7298b2d98efd819e0b30cd5905c9707223dceeb94b3f1" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-click" do + url "https://files.pythonhosted.org/packages/bf/d8/f2c1b7e9a645ba40f756d7a5b195fc104729bc6b19061ba3ab385f342931/rich_click-1.9.4.tar.gz" + sha256 "af73dc68e85f3bebb80ce302a642b9fe3b65f3df0ceb42eb9a27c467c1b678c8" + end + + resource "rich-color-ext" do + url "https://files.pythonhosted.org/packages/30/54/74ef0e1f57b87b71a3c425dc3ba69c3a308279ffb4ed38bdeffc789f655d/rich_color_ext-0.1.3.tar.gz" + sha256 "501296cb66d75413f29a25cee1606a1fd38ead2d95c97428e5b226d679a6ea7d" + end + + resource "rich-gradient" do + url "https://files.pythonhosted.org/packages/d0/84/96d127cd95de0cdb9da475f1e305fbc834099a80fde6b45bc915b2a77548/rich_gradient-0.3.4.tar.gz" + sha256 "b84366496027dbee28712c7fa9bf10c632e47deb32ac868032afbc794e12b400" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz" + sha256 "ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz" + sha256 "64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz" + sha256 "a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcpm --version") + assert_match "Found 0 MCP client(s)", shell_output("#{bin}/mcpm client ls") + end +end diff --git a/Formula/m/mcpp.rb b/Formula/m/mcpp.rb new file mode 100644 index 0000000000000..b2d82faf450d5 --- /dev/null +++ b/Formula/m/mcpp.rb @@ -0,0 +1,69 @@ +class Mcpp < Formula + desc "Alternative C/C++ preprocessor" + homepage "https://mcpp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mcpp/mcpp/V.2.7.2/mcpp-2.7.2.tar.gz" + sha256 "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" + license "BSD-2-Clause" + + livecheck do + url :stable + regex(%r{url=.*?/mcpp[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f3678576a7e9a2007227897d1617aba79b3ace1340c0a5e77b1bcfff43da38c3" + sha256 cellar: :any, arm64_sequoia: "37f98fe44da635f01775091f8196d3eacb4b9dfcab22b5702488714ea4599cba" + sha256 cellar: :any, arm64_sonoma: "42c256dc7e6f9d09f12de8bf97cc1988d020931cc7471c8ae9402b35d57748f7" + sha256 cellar: :any, arm64_ventura: "1c08275021d44b1db481d2f802ce2b69da952ea4afe04e1a0ce9ae36243f08f1" + sha256 cellar: :any, arm64_monterey: "506e27459d6f4f9fc296bcf826d113aaa659fc814f11419fa484bf38ec94888d" + sha256 cellar: :any, arm64_big_sur: "b6b90e4e5f4b50a390a5cbd6d2c6664dd8d3212013e469c9d3c90d5bf67a774c" + sha256 cellar: :any, sonoma: "94b52de3f8d1a6023e83f10cb82fd00d8c3284a971b6f04ae48d8f0584180971" + sha256 cellar: :any, ventura: "69aad3cd745bb5fb369475a44ac532848d2cedee77a832552cff37f522b19469" + sha256 cellar: :any, monterey: "fb4dbfea519b3df6d1b10a769ac1f25f53fccda42d2112602a9dcd2eee7bd791" + sha256 cellar: :any, big_sur: "ba1468299782ecb1de53cff2390096e7300f5c8f021cef623544d969a37240df" + sha256 cellar: :any, catalina: "742a861cb7087caedaed90aa40c4780a1e6e4ad50be74ee64b251c6ae1ebe21c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3b5ff7ba12b3476bfdbc98e83a6aefb67ccee2a96201ac521baa85389585e73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7869ff9d2c9946dd38a7891ea70766983208df755ca0f206016211b3239701c8" + end + + # stpcpy is a macro on macOS; trying to define it as an extern is invalid. + # Patch from ZeroC fixing EOL comment parsing + # https://forums.zeroc.com/discussion/5445/mishap-in-slice-compilers + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mcpp/2.7.2.patch" + sha256 "4bc6a6bd70b67cb78fc48d878cd264b32d7bd0b1ad9705563320d81d5f1abb71" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # expand.c:713:21: error: assignment to 'char *' from + # incompatible pointer type 'LOCATION *' {aka 'struct location *'} + ENV.append_to_cflags "-Wno-error=incompatible-pointer-types" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--enable-mcpplib", *args, *std_configure_args + system "make", "install" + end + + test do + # fix `warning: Unknown encoding: C.utf8` + ENV["LC_ALL"] = "en_US.UTF-8" + + (testpath/"test.c.in").write <<~C + #define RET 5 + int main() { return RET; } + C + + (testpath/"test.c").write shell_output("#{bin}/mcpp test.c.in") + system ENV.cc, "test.c", "-o", "test" + assert_empty shell_output("./test", 5) + end +end diff --git a/Formula/m/mcptools.rb b/Formula/m/mcptools.rb new file mode 100644 index 0000000000000..af00c0682eb0f --- /dev/null +++ b/Formula/m/mcptools.rb @@ -0,0 +1,34 @@ +class Mcptools < Formula + desc "CLI for interacting with MCP servers using both stdio and HTTP transport" + homepage "https://github.com/f/mcptools" + url "https://github.com/f/mcptools/archive/refs/tags/v0.7.1.tar.gz" + sha256 "048250696cd5456f9617a70d92586690973434f0ad6c9aa4481ef914fb0ef8af" + license "MIT" + head "https://github.com/f/mcptools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9ed8a807126e862356c88f8d07ae06e2b363b7d2dde046c3a956e96844bdf62" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd293a1418a1f5bed9049cbe3a7adfcf0da1b90fa3ec205b1535ded3d134e9d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd293a1418a1f5bed9049cbe3a7adfcf0da1b90fa3ec205b1535ded3d134e9d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd293a1418a1f5bed9049cbe3a7adfcf0da1b90fa3ec205b1535ded3d134e9d9" + sha256 cellar: :any_skip_relocation, sonoma: "5ab73dfea053a7272cd6afabc3d36da454d85fd304c7fc340e143863b912d88e" + sha256 cellar: :any_skip_relocation, ventura: "5ab73dfea053a7272cd6afabc3d36da454d85fd304c7fc340e143863b912d88e" + sha256 cellar: :any_skip_relocation, arm64_linux: "634ea303a4300ab4a6eb836c866d646954d380e9238d18a484b63ad0719c3d2f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc017eb921064bcb0820f8f141510aded2edc131bac3e2901c36ea0a6b2b773f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/mcptools" + + generate_completions_from_executable(bin/"mcptools", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcptools version") + + output = shell_output("#{bin}/mcptools configs ls") + assert_match "No MCP servers found", output + end +end diff --git a/Formula/m/md2pdf.rb b/Formula/m/md2pdf.rb new file mode 100644 index 0000000000000..7ba8e79980460 --- /dev/null +++ b/Formula/m/md2pdf.rb @@ -0,0 +1,35 @@ +class Md2pdf < Formula + desc "CLI utility that generates PDF from Markdown" + homepage "https://github.com/solworktech/md2pdf" + url "https://github.com/solworktech/md2pdf/archive/refs/tags/v2.2.18.tar.gz" + sha256 "c231d18742d9b0618bd1feaf1f3ab8864173a838b1847d9dcba6018fe5888f10" + license "MIT" + head "https://github.com/solworktech/md2pdf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6ba1a4bd35ea147d4af6dfd4e77c9c432f89d323a869e69946e81b065980d260" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3f31a7fd7fc59f484e62023b815331c624d0caac12e8573e3dce5a72a53d9f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a3f31a7fd7fc59f484e62023b815331c624d0caac12e8573e3dce5a72a53d9f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a3f31a7fd7fc59f484e62023b815331c624d0caac12e8573e3dce5a72a53d9f7" + sha256 cellar: :any_skip_relocation, sonoma: "1067ffc7b46773d8b98334e7ce11bc5e654f06ec4d891e545856191d5d0ca597" + sha256 cellar: :any_skip_relocation, ventura: "1067ffc7b46773d8b98334e7ce11bc5e654f06ec4d891e545856191d5d0ca597" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cc40647488a0594fb91fb6f0db586a5134a8c42f178ce4e22b0829f0aa68dd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "210dde51799b9cd2fa6037e4f1be39042346be5ea96a1a4cceef8bfb8df00180" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/md2pdf" + end + + test do + (testpath/"test.md").write <<~MARKDOWN + # Hello World + This is a test markdown file. + MARKDOWN + + system bin/"md2pdf", "-i", "test.md", "-o", "test.pdf" + assert_path_exists testpath/"test.pdf" + end +end diff --git a/Formula/m/md4c.rb b/Formula/m/md4c.rb new file mode 100644 index 0000000000000..043fc3ca72d0e --- /dev/null +++ b/Formula/m/md4c.rb @@ -0,0 +1,62 @@ +class Md4c < Formula + desc "C Markdown parser. Fast. SAX-like interface" + homepage "https://github.com/mity/md4c" + url "https://github.com/mity/md4c/archive/refs/tags/release-0.5.2.tar.gz" + sha256 "55d0111d48fb11883aaee91465e642b8b640775a4d6993c2d0e7a8092758ef21" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d3c08c51d39761be30ec5c67c297d31af0a1f4d15d02d633a528253dc57c8ef5" + sha256 cellar: :any, arm64_sequoia: "528d191cb50a6f5901faf2bf989374657792410929d5ac78b1515f412e07ab58" + sha256 cellar: :any, arm64_sonoma: "5a535b9cec9b6155304abead938f5022fe7522b881dd6e12f6f45c9b4c0f0d3a" + sha256 cellar: :any, arm64_ventura: "be769f9eb2de4a0c2b3ba400e79b07dc9d6c5f6c0c9e9d032f24bc6c5ef1a916" + sha256 cellar: :any, arm64_monterey: "9fe6e97ee446af5c8999daeabbb4ef4e1e7f3a57d4c5ad60dabe125da501b5e7" + sha256 cellar: :any, sonoma: "1c0f5cba7d83945b1d458e5dfe5b0fbffd698f7f15a04c63b19f96ed8967a6dc" + sha256 cellar: :any, ventura: "74a1f6056f0ee6860fa3ea51e0018ccfeabfb6f9db19b3f2ac924c3792c8644a" + sha256 cellar: :any, monterey: "e1ac92816bcad76852239c7963853b648d99f39d46fee483027ccd3997e104ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "bddcdff231d805814edf2992309a92dee28f6db946465d74cae3bb4888509a97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70158ffa050cd2f2ca59f5341051208cc96ca416f026e09e8db469683eb93eac" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # test md2html + (testpath/"test_md.md").write <<~MARKDOWN + # Title + some text + MARKDOWN + system bin/"md2html", "./test_md.md" + + # test libmd4c + (testpath/"test_program.c").write <<~C + #include + #include + + MD_CHAR* text = "# Title\\nsome text"; + + int test_block(MD_BLOCKTYPE type, void* detail, void* data) { return 0; } + int test_span(MD_SPANTYPE type, void* detail, void* data) { return 0; } + int test_text(MD_TEXTTYPE type, const MD_CHAR* text, MD_SIZE size, void* userdata) { return 0; } + int main() { + MD_PARSER parser = { + .enter_block = test_block, + .leave_block = test_block, + .enter_span = test_span, + .leave_span = test_span, + .text = test_text + }; + int result = md_parse(text, sizeof(text), &parser, NULL); + return result; + } + C + system ENV.cc, "test_program.c", "-L#{lib}", "-lmd4c", "-o", "test_program" + system "./test_program" + end +end diff --git a/Formula/m/md5deep.rb b/Formula/m/md5deep.rb new file mode 100644 index 0000000000000..6f483d7c25d9f --- /dev/null +++ b/Formula/m/md5deep.rb @@ -0,0 +1,84 @@ +class Md5deep < Formula + desc "Recursively compute digests on files/directories" + homepage "https://github.com/jessek/hashdeep" + url "https://github.com/jessek/hashdeep/archive/refs/tags/release-4.4.tar.gz" + sha256 "dbda8ab42a9c788d4566adcae980d022d8c3d52ee732f1cbfa126c551c8fcc46" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/jessek/hashdeep.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c59d131c78aa6ee76fdfe35f4dd4488f5edfbdad5eb48eaa549396168adc31c5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d92356eb626035ee2f2e8b412b0a5ca36fa31a8d6d16fe583f9dfcd6ed57a19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e4229518a382d9eb9d0b5fe87118a0f4a532c33b535791db257432502ac9e31" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34dc60be87a6f4d9306468492222ea35455aa08359603f2e1bffa3ae221405de" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1b64f262b089ff96008078a6dc0f84cce93deec0740b3476279931d982bc9636" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5d910e7454fa350663a1955628c254b7acf813dd7b3aaec162a7be2c002197f0" + sha256 cellar: :any_skip_relocation, sonoma: "7741049d40f5fc9989fa69e8a55dd1c1f75c75155a89a0a0f90575afdcf9b2c3" + sha256 cellar: :any_skip_relocation, ventura: "46f9ea31605459d954b815bc85db4d2c5b5a7c96e81aaeac63ab0eaa2954faeb" + sha256 cellar: :any_skip_relocation, monterey: "58e0dfb42b8a8b0d89745dc0446ee660754f3350c776702384edceb1fe14b8b6" + sha256 cellar: :any_skip_relocation, big_sur: "d53f71333428c98de807b2ed6be18fcfd62d473d9994e19db7c7a8db390cac95" + sha256 cellar: :any_skip_relocation, catalina: "3156ba425284d497cdc5377c1d5d7659fe741811c5b1a390a2dd45f98bf0a19a" + sha256 cellar: :any_skip_relocation, arm64_linux: "786f0046cd92fd6e6689b0c6dd0cf202ad019a28d9ecfd3f29c356c78639bf91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a36e25199a0c133790f452fa716c07fc6bc724714f66c30be47f5989b703ed46" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + # Fix compilation error due to very old GNU config scripts in source repo + # reported upstream at https://github.com/jessek/hashdeep/issues/400 + patch :DATA + + # Fix compilation error due to pointer comparison + patch do + url "https://github.com/jessek/hashdeep/commit/8776134.patch?full_index=1" + sha256 "3d4e3114aee5505d1336158b76652587fd6f76e1d3af784912277a1f93518c64" + end + + # Fix literal and identifier spacing as dictated by C++11 + # upstream pr ref, https://github.com/jessek/hashdeep/pull/385 + patch do + url "https://github.com/jessek/hashdeep/commit/18a6b5d57f7a648d2b7dcc6e50ff00a1e4b05fcc.patch?full_index=1" + sha256 "a48a214b06372042e4e9fc06caae9d0e31da378892d28c4a30b4800cedf85e86" + end + + def install + system "sh", "bootstrap.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"testfile.txt").write("This is a test file") + # Do not reduce the spacing of the below text. + assert_equal "91b7b0b1e27bfbf7bc646946f35fa972c47c2d32 testfile.txt", + shell_output("#{bin}/sha1deep -b testfile.txt").strip + end +end + +__END__ +--- a/config.guess ++++ b/config.guess +@@ -797,6 +797,9 @@ + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; +@@ -1130,6 +1133,9 @@ + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; ++ arm64:Darwin:*:*) ++ echo arm-apple-darwin"$UNAME_RELEASE" ++ exit ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; diff --git a/Formula/m/md5sha1sum.rb b/Formula/m/md5sha1sum.rb new file mode 100644 index 0000000000000..a670fb2f7d521 --- /dev/null +++ b/Formula/m/md5sha1sum.rb @@ -0,0 +1,60 @@ +class Md5sha1sum < Formula + desc "Hash utilities" + homepage "http://microbrew.org/tools/md5sha1sum/" + url "http://microbrew.org/tools/md5sha1sum/md5sha1sum-0.9.5.tar.gz" + mirror "https://mirrorservice.org/sites/distfiles.macports.org/md5sha1sum/md5sha1sum-0.9.5.tar.gz" + sha256 "2fe6b4846cb3e343ed4e361d1fd98fdca6e6bf88e0bba5b767b0fdc5b299f37b" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?md5sha1sum[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5d30a62c330be15f2314718cebf8e2c4ff270ee97398e0e9c94c99ea32b3e146" + sha256 cellar: :any, arm64_sequoia: "18eabab184e2ab7e46b74aa8ff7dadd8b88239e604b64eaf64caed43846bea27" + sha256 cellar: :any, arm64_sonoma: "fdc098e39dd9d37a09189f285bcca2d3c2ebea1820dff398ac5bcb771f82a80a" + sha256 cellar: :any, arm64_ventura: "1055a4e7c14927621a28916d8847a9d07cd7c2fa3a0b7c5b9a087aa67350fbfb" + sha256 cellar: :any, arm64_monterey: "6c1df5b7a603f00daa2d138d4e71d2f4e61316fb3e5de9f1dd7181a5d197feab" + sha256 cellar: :any, arm64_big_sur: "8a6b0641375cbc512918fd3b0b79257f542668b5237e2a360a4abecde564bc95" + sha256 cellar: :any, sonoma: "5f3870382f7bfa8e95a952fb263d0225a6b0405264d1fbcdcdf3c693a9c787af" + sha256 cellar: :any, ventura: "68dfdf06eb4a9a543477a812deb0cc666688ee28a30e799233501f0855cd1944" + sha256 cellar: :any, monterey: "db59823c590542e30656a7cc7f2379826352efd07a75e3919f359d33ffed2dd8" + sha256 cellar: :any, big_sur: "924a214bdfed9ed8f7d9d581bb5717ec6cfe523e0a7f145b3e63075eba244bd6" + sha256 cellar: :any, catalina: "61cea3dd8aa7dc270e3f5265316dcc73ccafa4ab7caf59b48b8fa5e9208d0d9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "12341c831b007a3869b399f63e29861fcd1b6929ef852b16944b60614c90c601" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0055fc19d2c8072e2e576b7df8de777126f2b5ab2c1269ff224476f8aaf9d65b" + end + + depends_on "openssl@3" + + on_sonoma :or_older do + conflicts_with "coreutils", because: "both install `md5sum` and `sha1sum` binaries" + end + + def install + openssl = Formula["openssl@3"] + ENV["SSLINCPATH"] = openssl.opt_include + ENV["SSLLIBPATH"] = openssl.opt_lib + + system "./configure", "--prefix=#{prefix}" + system "make" + + bin.install "md5sum" + bin.install_symlink bin/"md5sum" => "sha1sum" + bin.install_symlink bin/"md5sum" => "ripemd160sum" + end + + test do + (testpath/"file.txt").write("This is a test file with a known checksum") + (testpath/"file.txt.sha1").write <<~EOS + 52623d47c33ad3fac30c4ca4775ca760b893b963 file.txt + EOS + system bin/"sha1sum", "--check", "file.txt.sha1" + end +end diff --git a/Formula/m/mda-lv2.rb b/Formula/m/mda-lv2.rb new file mode 100644 index 0000000000000..c3f0e240f00d3 --- /dev/null +++ b/Formula/m/mda-lv2.rb @@ -0,0 +1,49 @@ +class MdaLv2 < Formula + desc "LV2 port of the MDA plugins" + homepage "https://drobilla.net/software/mda-lv2.html" + url "https://download.drobilla.net/mda-lv2-1.2.10.tar.xz" + sha256 "aeea5986a596dd953e2997421a25e45923928c6286c4c8c36e5ef63ca1c2a75a" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.drobilla.net" + regex(/href=.*?mda-lv2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "87a2bd9d397365ef18ac869774f67b94835d998465e5b78d4b8ec69a47a1aaa9" + sha256 cellar: :any, arm64_sequoia: "03b6f32b385004d948a37114897d206e9a879834820b54316c755c637ebdabbf" + sha256 cellar: :any, arm64_sonoma: "c2da908303e1eae13da7cc9cb09cd25664d3fd4a35d49453aa8017337cd5fb3d" + sha256 cellar: :any, arm64_ventura: "f0e9e93e3e7d6a66b7a8a123e23e41a722443899a30351938dc98bdf5f37f4ec" + sha256 cellar: :any, arm64_monterey: "858cb75b9d207ea3a38a0f3752a1976bfd0c9f8bebb5f69581c9c5d0e1ea4252" + sha256 cellar: :any, sonoma: "c46a62ff1bb9377ab6a6f3f919472792e9a4b133502dcfe6f5212f7258b34ad4" + sha256 cellar: :any, ventura: "3e02aa678e179e136c89ff36a35e562d7034d5e2dbb6812f15ee024bf8deb73e" + sha256 cellar: :any, monterey: "070fccf201ecb813049b8e852808d7f05feb5f673f11ea16f6b885d10c36ef30" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc0748c3fc037fec4e7620fcc70b40b9eb1da6e4c93ffbf617fe71555bd4110e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "688227bd6b707a8fba9ae71751c92d1267b1a6c1a3298ffc4bf57d4d04fe596f" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "sord" => :test + depends_on "lv2" + + uses_from_macos "python" => :build + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + # Validate mda.lv2 plugin metadata (needs definitions included from lv2) + system Formula["sord"].opt_bin/"sord_validate", + *Dir[Formula["lv2"].opt_lib/"**/*.ttl"], + *Dir[lib/"lv2/mda.lv2/*.ttl"] + end +end diff --git a/Formula/m/mdbook.rb b/Formula/m/mdbook.rb new file mode 100644 index 0000000000000..bad7644eac8e1 --- /dev/null +++ b/Formula/m/mdbook.rb @@ -0,0 +1,33 @@ +class Mdbook < Formula + desc "Create modern online books from Markdown files" + homepage "https://rust-lang.github.io/mdBook/" + url "https://github.com/rust-lang/mdBook/archive/refs/tags/v0.4.52.tar.gz" + sha256 "d46f3b79e210eed383b6966847ea86ec441b6b505e9d9d868294bb9742130c9c" + license "MPL-2.0" + head "https://github.com/rust-lang/mdBook.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "765fa309bfd6d5cd4c392e44010330455099afa8c132ed687da1b1dd837300db" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d88256249fc2d71b5a7f3f12160392ac79ad8559dd8bc3358ff88be90fafc26f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c99b293bdc9d8b14b8fa694be451101f6d808a87bde842751e4bfaa38c45e0d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0a356382f6e21900c00511ad40d46222628d46eaea79a7ecb04016b35737d7a0" + sha256 cellar: :any_skip_relocation, sonoma: "72dd9db93dce467a951ae9c70c6eb2e53fb577cf16747a43582b6ff5c7f63d5f" + sha256 cellar: :any_skip_relocation, ventura: "5b0d7a6f36305edf312aa094d93dc1b565e8a9353cbf3fc60a4af8b09a93117a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4b7323a89d9cee8d61580af5e74b9e9f82235f8fca976ed2a3197e1031bfb77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e17414702ca55f0ac8ebd6decbae57d7460ead65b04abf1bab8b5aad5c667e4a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"mdbook", "completions") + end + + test do + # simulate user input to mdbook init + system "sh", "-c", "printf \\n\\n | #{bin}/mdbook init" + system bin/"mdbook", "build" + end +end diff --git a/Formula/m/mdbtools.rb b/Formula/m/mdbtools.rb new file mode 100644 index 0000000000000..c0ff3da1289e8 --- /dev/null +++ b/Formula/m/mdbtools.rb @@ -0,0 +1,44 @@ +class Mdbtools < Formula + desc "Tools to facilitate the use of Microsoft Access databases" + homepage "https://github.com/mdbtools/mdbtools/" + url "https://github.com/mdbtools/mdbtools/releases/download/v1.0.1/mdbtools-1.0.1.tar.gz" + sha256 "ff9c425a88bc20bf9318a332eec50b17e77896eef65a0e69415ccb4e396d1812" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5469dde016c654a16a39ccda261395dfc81bd033600fd826250a80f424d9fc8f" + sha256 cellar: :any, arm64_sequoia: "3aab4c13461e0571b3ef4aa822417e0408fd7caad03f0d7d63bda9e20d102f20" + sha256 cellar: :any, arm64_sonoma: "c247b94b87f1f09c26953f4b3f923f345ba18a8764d8f5ffc0ca8060e557a5fe" + sha256 cellar: :any, arm64_ventura: "ece916c2bc386781de20c67cc5e314430a369dc886d362f22039ea56d37771ee" + sha256 cellar: :any, sonoma: "49722390bf0230475a1261a0c10d90540b6ff056a07c54b74680eab7276c3a04" + sha256 cellar: :any, ventura: "2c2db546223c1b1ddfba20d70303761358fb5bba39362924976ff35d9710ae1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d367189a2aadd23bfe3dcc0aa062cb780d2ac8a6fa4d51a8b30b7f6d9486fa3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e2ca3b97c784e7ce3e9d42e0bf58e15816b94944f2686c41d6ec698fc50ca0f" + end + + depends_on "bison" => :build + depends_on "gawk" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "readline" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--enable-man", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/mdb-schema --drop-table test 2>&1", 1) + + expected_output = <<~EOS + File not found + Could not open file + EOS + assert_match expected_output, output + end +end diff --git a/Formula/m/mdcat.rb b/Formula/m/mdcat.rb new file mode 100644 index 0000000000000..97b95be79b81e --- /dev/null +++ b/Formula/m/mdcat.rb @@ -0,0 +1,48 @@ +class Mdcat < Formula + desc "Show markdown documents on text terminals" + homepage "https://github.com/swsnr/mdcat" + url "https://github.com/swsnr/mdcat/archive/refs/tags/mdcat-2.7.1.tar.gz" + sha256 "460024d9795eb578be09ec2284af243627721151aa001aae6ffb5589380b2ba1" + license "MPL-2.0" + head "https://github.com/swsnr/mdcat.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dda4028d4876c70766d9ae577c60741c5604de5673b8acae0e26dc4f5d8df08e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "803ea6ced03a51fc184834642a4abed39d82525146c410dd0c9471f4a132f4b6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "200c351ba8ad70ddd893f6735451af5ecef7cf7670504af15b471b625e26c705" + sha256 cellar: :any_skip_relocation, sonoma: "fe41c5dbc3b3ef5656a566a95df8227296c1b9c0bd17857892a641e3d54c73ec" + sha256 cellar: :any_skip_relocation, ventura: "aaf95c5c8d0b6d2acf5fb02ae129fb8d8db0b32eaabc878b6a9423a14cc5f0fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "85b2d4cdae8247b29aaf22ba0390f2febcf5a9ee2dd9abd60cf7ae5fb9a1c1dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87635e02c1cf4066926983af95ae4b67647749adaf2020687c3b258e3937fc9e" + end + + deprecate! date: "2025-01-10", because: :does_not_build # and :repo_archived + disable! date: "2026-01-10", because: :does_not_build + + depends_on "asciidoctor" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "curl" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + + # https://github.com/swsnr/mdcat?tab=readme-ov-file#packaging + generate_completions_from_executable(bin/"mdcat", "--completions") + system "asciidoctor", "-b", "manpage", "-a", "reproducible", "-o", "mdcat.1", "mdcat.1.adoc" + man1.install Utils::Gzip.compress("mdcat.1") + end + + test do + (testpath/"test.md").write <<~MARKDOWN + _lorem_ **ipsum** dolor **sit** _amet_ + MARKDOWN + output = shell_output("#{bin}/mdcat --no-colour test.md") + assert_match "lorem ipsum dolor sit amet", output + end +end diff --git a/Formula/m/mdds.rb b/Formula/m/mdds.rb new file mode 100644 index 0000000000000..edab19724cdf6 --- /dev/null +++ b/Formula/m/mdds.rb @@ -0,0 +1,53 @@ +class Mdds < Formula + desc "Multi-dimensional data structure and indexing algorithm" + homepage "https://gitlab.com/mdds/mdds" + url "https://gitlab.com/api/v4/projects/mdds%2Fmdds/packages/generic/source/3.1.0/mdds-3.1.0.tar.bz2" + sha256 "a50fbaf1ac6d135084ff4f4ee72e8a13e6ac6fc62db62bc8752b8d858076b5fc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2dc6019c4ac471ee94175fc7f100ace94f0e380a6d6efc48a04bafa98b8c844e" + end + + head do + url "https://gitlab.com/mdds/mdds.git", branch: "master" + + depends_on "automake" => :build + end + + depends_on "autoconf" => :build + depends_on "boost" + + def install + args = %W[ + --prefix=#{prefix} + --disable-openmp + ] + + # Gets it to work when the CLT is installed + inreplace "configure.ac", "$CPPFLAGS -I/usr/include -I/usr/local/include", + "$CPPFLAGS -I/usr/local/include" + + if build.head? + system "./autogen.sh", *args + else + system "autoconf" + system "./configure", *args + end + + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + mdds::flat_segment_tree fst(0, 4, 8); + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-std=c++17", + "-I#{include.children.first}" + system "./test" + end +end diff --git a/Formula/m/mdf2iso.rb b/Formula/m/mdf2iso.rb new file mode 100644 index 0000000000000..407d92ed7bdbd --- /dev/null +++ b/Formula/m/mdf2iso.rb @@ -0,0 +1,38 @@ +class Mdf2iso < Formula + desc "Tool to convert MDF (Alcohol 120% images) images to ISO images" + homepage "https://packages.debian.org/sid/mdf2iso" + url "https://deb.debian.org/debian/pool/main/m/mdf2iso/mdf2iso_0.3.1.orig.tar.gz" + sha256 "906f0583cb3d36c4d862da23837eebaaaa74033c6b0b6961f2475b946a71feb7" + license "GPL-2.0-or-later" + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0c648a8e13264b77de5d985cc394c4987d48b5acd55f32e8a3f1fc15a2585504" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb7698f54dab58995f190cb1fa0b27206fdcc26df54ed14340042bbdf5e9bc22" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6fe3b6e39dc1c0edc7258d2a36af055d21aba09074adb99f427a1c18f7e5fb1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7dad8470649a9874ce6321736a6a14d4a76cd2ea1ca5c379cadf10da1ab45c8b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7952ed81c8034b504bb0e55e147e2f601990494b35cfe1fea3ba3c2cd006bb0c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7f37a97303ac1ff9388377bc91cf1e7f278e94f1245d38f96dc19a3b81c81f76" + sha256 cellar: :any_skip_relocation, sonoma: "a3b321e6ef2421a75ea98cae15bf983886dc0024b6f12a0be3deca4beedf954f" + sha256 cellar: :any_skip_relocation, ventura: "143253bf20f183053fa47c7f6ea2a4fe0e93b218d86066f820f84004257502f8" + sha256 cellar: :any_skip_relocation, monterey: "60af1882c7912a64f4c1c79bf5fa6e59c0d1f01d8fc93e29cde28e3d564bf093" + sha256 cellar: :any_skip_relocation, big_sur: "204334f29ddd79b10b91e2d844e2d20507f315fb4d39109dcfbe7747b3fbf64d" + sha256 cellar: :any_skip_relocation, catalina: "ac57f5ffc3e1ac884d74b08dddce518e60f878e627cbfccc7dcb4642c5eb0653" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4e0fcb1b65f5e0680c63e7d4dd2c481315d5879876ba4a6cd0ea1ea5d8bea4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a24e6b2c8771e9f5119bc4baa9bb8da4570df954d44782ba43e6b5c6f7e6a3a" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mdf2iso --help") + end +end diff --git a/Formula/m/mdformat.rb b/Formula/m/mdformat.rb new file mode 100644 index 0000000000000..c1846f4d4759c --- /dev/null +++ b/Formula/m/mdformat.rb @@ -0,0 +1,34 @@ +class Mdformat < Formula + include Language::Python::Virtualenv + + desc "CommonMark compliant Markdown formatter" + homepage "https://mdformat.readthedocs.io/en/stable/" + url "https://files.pythonhosted.org/packages/3f/05/32b5e14b192b0a8a309f32232c580aefedd9d06017cb8fe8fce34bec654c/mdformat-1.0.0.tar.gz" + sha256 "4954045fcae797c29f86d4ad879e43bb151fa55dbaf74ac6eaeacf1d45bb3928" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "863671318644528a8d19c96fd1bad11e378951569eebf8db95004d872c108a30" + end + + depends_on "python@3.14" + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.md").write("# mdformat") + system bin/"mdformat", testpath + end +end diff --git a/Formula/m/mdk.rb b/Formula/m/mdk.rb new file mode 100644 index 0000000000000..fd7a354895fc8 --- /dev/null +++ b/Formula/m/mdk.rb @@ -0,0 +1,98 @@ +class Mdk < Formula + desc "GNU MIX development kit" + homepage "https://www.gnu.org/software/mdk/mdk.html" + url "https://ftpmirror.gnu.org/gnu/mdk/v1.3.1/mdk-1.3.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/mdk/v1.3.1/mdk-1.3.1.tar.gz" + sha256 "ebb963938c688c150ff6aaedc29f30d09020a1e31d55b30c2101f08773516d19" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "7826d050643554b4fd5b996d6d435b817f5afc3d377838c17603134ee397387f" + sha256 arm64_sequoia: "ad86e88bcdb7d4a02549a80945c2bf96d74c7d95ae55d3d25a654c8ce74d09bc" + sha256 arm64_sonoma: "00a6b39d4f40ce43f02096c41759d5fc9603f8410e310c4151ed4ac9eb27de28" + sha256 sonoma: "be057e6d7aa944047f2e2f1708dddd6bffba1fa6c937264c0a5065e11b1c1bf0" + sha256 arm64_linux: "e6ec02348519a896a3cd23987ec812358ede91138da903dcfd6cad75a2cdb1ce" + sha256 x86_64_linux: "11178d7f888d4b955959d12ede795d08d2af47aca254caaa3a9769b39056cdab" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "at-spi2-core" + depends_on "bdw-gc" + depends_on "cairo" + depends_on "flex" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "guile" + depends_on "harfbuzz" + depends_on "pango" + depends_on "readline" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1599 + + depends_on "gettext" + end + + on_linux do + depends_on "ncurses" + end + + fails_with :clang do + build 1599 + cause "Requires relaxed variadic args" + end + + fails_with :gcc do + version "11" + cause "Requires relaxed variadic args" + end + + def install + ENV.llvm_clang if DevelopmentTools.clang_build_version <= 1599 + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "CFLAGS=-std=gnu2x" + system "make", "install" + end + + test do + ENV["LANG"] = "en_US.UTF-8" + + (testpath/"hello.mixal").write <<~EOS + * (1) + * hello.mixal: say "hello world" in MIXAL (2) + * (3) + * label ins operand comment (4) + TERM EQU 19 the MIX console device number (5) + ORIG 1000 start address (6) + START OUT MSG(TERM) output data at address MSG (7) + HLT halt execution (8) + MSG ALF "MIXAL" (9) + ALF " HELL" (10) + ALF "O WOR" (11) + ALF "LD" (12) + END START end of the program (13) + EOS + system bin/"mixasm", "hello" + output = shell_output("#{bin}/mixvm -r hello") + + expected = <<~EOS + Program loaded. Start address: 1000 + Running ... + MIXAL HELLO WORLDXXX + ... done + EOS + expected = expected.gsub("XXX", " " *53) + + assert_equal expected, output + end +end diff --git a/Formula/m/mdless.rb b/Formula/m/mdless.rb new file mode 100644 index 0000000000000..815df85eb943c --- /dev/null +++ b/Formula/m/mdless.rb @@ -0,0 +1,40 @@ +class Mdless < Formula + desc "Provides a formatted and highlighted view of Markdown files in Terminal" + homepage "https://github.com/ttscoff/mdless" + url "https://github.com/ttscoff/mdless/archive/refs/tags/2.1.62.tar.gz" + sha256 "1819b0b082b6cea95be542e39828b3ced344334bcfe62a318df71386518d07a6" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b7fdbd007a51aceeccf6ec8d24e419d4fa6fa89f9884fe6aef6e7b2ad6f8ea17" + sha256 cellar: :any, arm64_sequoia: "2f685489abc329323095d92133a0dcd31441d10307f0474bbb4413b53d2274b7" + sha256 cellar: :any, arm64_sonoma: "0592587133ab75b44b46fbf957856c047ba3e1ee2109c1b26053c87d6f64ff29" + sha256 cellar: :any, arm64_ventura: "fa86f8095663d1c7d4a8f925133a5ef316fd37dc9137c7a1de6095fe9ebc0a1d" + sha256 cellar: :any, sonoma: "8f1f01fbd37167238a0ea1619d6adf3ba541a2284a9922939d74364bec043da0" + sha256 cellar: :any, ventura: "5664722266afd9637e16601f148ed0b02a4bb8340d5c6a70a1ca1e004b558d34" + sha256 cellar: :any_skip_relocation, arm64_linux: "6dd44adf15bc57b0f13d299b49282f0cf9aa3ca90c58e14db93598d3fb7243af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "851c4c16ebee885c363fd057e77d06e88dbea21ff49bf59a573d29b47ec1a0bf" + end + + # Requires Ruby >= 2.7 + depends_on "ruby" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + assert_match "mdless #{version}", shell_output("#{bin}/mdless --version") + (testpath/"test.md").write <<~MARKDOWN + # title first level + ## title second level + MARKDOWN + out = shell_output("#{bin}/mdless --no-color -P test.md") + assert_match(/^title first level =+$/, out) + assert_match(/^title second level -+$/, out) + end +end diff --git a/Formula/m/mdp.rb b/Formula/m/mdp.rb new file mode 100644 index 0000000000000..14687ecc4f381 --- /dev/null +++ b/Formula/m/mdp.rb @@ -0,0 +1,31 @@ +class Mdp < Formula + desc "Command-line based markdown presentation tool" + homepage "https://github.com/visit1985/mdp" + url "https://github.com/visit1985/mdp/archive/refs/tags/1.0.18.tar.gz" + sha256 "36861161513c508c0589014510cdafd940a6e661e517022a3bea48ecf8d5fac4" + license "GPL-3.0-or-later" + head "https://github.com/visit1985/mdp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1427d8626e29d6015170cc1f80d049e4c4f4b4ea04a92e510696b93c1f22a1e5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39469240d3ad1bb651898e75c310a229cd6492cc7e66ba7f24ece8d9aeda7f6a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "829d971b7d1942ec34ea4c7b948ccd0a988e6fb5618091919785e9e124c10bbe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b1be7a64cd13ff001ee2b58385424e3e35f7210eb0f9777d401dcba321d86f5" + sha256 cellar: :any_skip_relocation, sonoma: "fb2933d0f75d822eed5ff6f6dffeaaed000ea28737369f90cf234e8e7c296cec" + sha256 cellar: :any_skip_relocation, ventura: "d0b783018115ca2fd3f6dd40b909ecd603d2c22dffa0a1cd48d1a833a284e345" + sha256 cellar: :any_skip_relocation, arm64_linux: "92778dc9a394d2395627091c21f3f51cd1afa7431a2eb1e1d836b12e2f9e83e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8027ddc1b08d523ff38474c5f95ae518d39900afd5ca57a800c1f34c1d064ae" + end + + uses_from_macos "ncurses" + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install "sample.md" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mdp -v") + end +end diff --git a/Formula/m/mdq.rb b/Formula/m/mdq.rb new file mode 100644 index 0000000000000..febf7c16df7ed --- /dev/null +++ b/Formula/m/mdq.rb @@ -0,0 +1,49 @@ +class Mdq < Formula + desc "Like jq but for Markdown" + homepage "https://github.com/yshavit/mdq" + url "https://github.com/yshavit/mdq/archive/refs/tags/v0.9.0.tar.gz" + sha256 "25beee2251e1b48970540466bbbe1f15a1d2acf20133a2a13858734b0922877a" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/yshavit/mdq.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2cbe40254385b510ef1774c77dbf19bc02b31474ad65b67aa31d284d995a62e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a554032d298a0cd6665a7baeb9a9cdbd88a637903d0a7fcc6dec69a659a50d70" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cf5a1a792d25359bca50391fd3d07f2abd3aeb6c81a7d5995bf314f5f91bc69" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d576c93e97414e66201d4f49c833aaf6c46adfc1700a806a6a56e9d6b3005525" + sha256 cellar: :any_skip_relocation, sonoma: "5ab3ce177808cdaa6b6f4609b04df7b3c228f0abc616773e204b35eb381d2936" + sha256 cellar: :any_skip_relocation, ventura: "d06c403731a9665b8c05b7e212ed9c018dabd7fdb7a90629bab70d0cb15f305b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fde41d406551a3b5052f9aaf298c217069ef51e3d46d89a6f130b2e2c198052" + sha256 cellar: :any_skip_relocation, x86_64_linux: "604e57bf2afb7d1b7be2b83fc4bde9135116320bef7938d46e26aef21667f7f4" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/mdq --version") + + test_file = testpath/"test.md" + test_file.write <<~MARKDOWN + # Sample Markdown + + ## Section 1 + + - Item 1 + - Item 2 + + ## Section 2 + + - Item A + MARKDOWN + + assert_equal <<~MARKDOWN, pipe_output("#{bin}/mdq '# Section 2'", test_file.read) + ## Section 2 + + - Item A + MARKDOWN + end +end diff --git a/Formula/m/mdserve.rb b/Formula/m/mdserve.rb new file mode 100644 index 0000000000000..3e50c928dab7f --- /dev/null +++ b/Formula/m/mdserve.rb @@ -0,0 +1,42 @@ +class Mdserve < Formula + desc "Fast markdown preview server with live reload and theme support" + homepage "https://github.com/jfernandez/mdserve" + url "https://github.com/jfernandez/mdserve/archive/refs/tags/v0.5.1.tar.gz" + sha256 "2ed28cd3618179d500b20de83fef230562494995b63a6d36102a9a56f04dafd6" + license "MIT" + head "https://github.com/jfernandez/mdserve.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8a4a31050fbf8105505b95fda4e1abc572188a817362ffda788d1e95ddfa4ceb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2118b20f945546bd3640360116a974476d9e49eff2119d8f3b7aeb3f451328bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fbae1902dd9fa910320c11b6e2add1fd167e2e096a9e1581c4a5ce92c962a05" + sha256 cellar: :any_skip_relocation, sonoma: "db777786d3c41e43e13bd5e09e2e2ff45d60968ba93b50c39358498058fbc394" + sha256 cellar: :any_skip_relocation, arm64_linux: "98344963b674824941f58fb5aab7dd766eabf705c60a4cfffa62cf5206fa65b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43fb09aa8474058bc4960af12298c0ac7927056d58515b18724ef148e39273b8" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/mdserve --version") + + (testpath/"test.md").write("# Test\n\nThis is a test markdown file.") + + port = free_port + pid = spawn bin/"mdserve", "--port", port.to_s, "test.md" + + sleep 1 + + begin + output = shell_output("curl -s http://localhost:#{port}") + assert_match "This is a test markdown file", output + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/m/mdsh.rb b/Formula/m/mdsh.rb new file mode 100644 index 0000000000000..9b052910765db --- /dev/null +++ b/Formula/m/mdsh.rb @@ -0,0 +1,42 @@ +class Mdsh < Formula + desc "Markdown shell pre-processor" + homepage "https://zimbatm.github.io/mdsh/" + url "https://github.com/zimbatm/mdsh/archive/refs/tags/v0.9.2.tar.gz" + sha256 "4e6aea8fb398f52ec1c2a2bcd2d8238c885aa9bc4b3739a158e64dcc4826dad4" + license "MIT" + head "https://github.com/zimbatm/mdsh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd92fceb1ed34a98f9c22aefe9601b9088fa048884dd2a38f450b9f4a2352c85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "33ca4d9a2440a8488bd6babfdea6622acdfc6deab3e7c38b37622305adb55dea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "904547df4c2acf7eb1b971f0c924193c37393aadc6ebb1767aebccda3364f5ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81cab330375c40ecaf7abaff7ae15efbba85c6ae563e1dd2760ebfa466f6c9fa" + sha256 cellar: :any_skip_relocation, sonoma: "ec2f62aa6af34be5b9700133a68912ea47f2d27d206ee07a59ced37db8464f0b" + sha256 cellar: :any_skip_relocation, ventura: "03d9660c35d3b1e51ac8b58456dac4e894364ad07b20862a8d450faca3c3355a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f84ae39b6d5c82c57ca0cdc23caf9391f2d4fe538b8de38f02276c74bc8d88b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67786ce6761adc9f44d8ba3bd3af4a56e820ba527691f8855f859d7931f7f399" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"README.md").write "`$ seq 4 | sort -r`" + system bin/"mdsh" + assert_equal <<~MARKDOWN.strip, (testpath/"README.md").read + `$ seq 4 | sort -r` + + ``` + 4 + 3 + 2 + 1 + ``` + MARKDOWN + + assert_match version.to_s, shell_output("#{bin}/mdsh --version") + end +end diff --git a/Formula/m/mdt.rb b/Formula/m/mdt.rb new file mode 100644 index 0000000000000..4142c298691ab --- /dev/null +++ b/Formula/m/mdt.rb @@ -0,0 +1,25 @@ +class Mdt < Formula + desc "Command-line markdown todo list manager" + homepage "https://github.com/basilioss/mdt" + url "https://github.com/basilioss/mdt/archive/refs/tags/1.4.0.tar.gz" + sha256 "542998a034c93ca52e72708c1d3779e597f778faf2ee70d8cf11873185332d31" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8d78fb5808e2fcae85e5e07e39c1c3b9aabe54d2acf8888d98330f7b45eec989" + end + + depends_on "gum" + + def install + bin.install "mdt" + end + + test do + assert_equal "mdt #{version}", shell_output("#{bin}/mdt --version").chomp + assert_match "Error: Got an unexpected argument '--invalid'.", shell_output("#{bin}/mdt --invalid 2>&1", 1) + end +end diff --git a/Formula/m/mdv.rb b/Formula/m/mdv.rb new file mode 100644 index 0000000000000..f7eeadb836340 --- /dev/null +++ b/Formula/m/mdv.rb @@ -0,0 +1,52 @@ +class Mdv < Formula + include Language::Python::Virtualenv + + desc "Styled terminal markdown viewer" + homepage "https://github.com/axiros/terminal_markdown_viewer" + url "https://files.pythonhosted.org/packages/d0/32/f5e1b8c70dc40b02604fbd0be3ff0bd5e01ee99c9fddf8f423b10d07cd31/mdv-1.7.5.tar.gz" + sha256 "eb84ed52a2b68d2e083e007cb485d14fac1deb755fd8f35011eff8f2889df6e9" + license "BSD-3-Clause" + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_tahoe: "cb111a674b82866651a2cc13f11fac8fe37cc68e4559963f04c40ccb0cdcb06e" + sha256 cellar: :any, arm64_sequoia: "5efc023a46590290af7b23c53b9dc48e76888e52182ab4630b213a61e24e7060" + sha256 cellar: :any, arm64_sonoma: "f8e0835cdd4cee5c281008aaeecd1b1bc306106f3b76cd2b7f28e58f9bc2a4ef" + sha256 cellar: :any, sonoma: "aa784301843d3bdd4ae5badde5a1336575b337fea7dcd7efc181e299134f3397" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f8dd2691dfae52301c4ddf31f5e89a76b38b8cbb19025e89392a83830d62795" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c891c0e81a3f78060d0d7e4df72d477d0f3dd04017b425b6b7400a8aef24d8d3" + end + + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages package_name: "mdv[yaml]" + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.md").write <<~MARKDOWN + # Header 1 + ## Header 2 + ### Header 3 + MARKDOWN + system bin/"mdv", "#{testpath}/test.md" + end +end diff --git a/Formula/m/mdxmini.rb b/Formula/m/mdxmini.rb new file mode 100644 index 0000000000000..959da432ee3c5 --- /dev/null +++ b/Formula/m/mdxmini.rb @@ -0,0 +1,129 @@ +class Mdxmini < Formula + desc "Plays music in X68000 MDX chiptune format" + homepage "https://github.com/mistydemeo/mdxmini/" + url "https://github.com/mistydemeo/mdxmini/archive/refs/tags/v2.0.0.tar.gz" + sha256 "9b623b365e893a769084f7a2effedc9ece453c6e3861c571ba503f045471a0e0" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9c7d6bb3128d117bd4730a9c7b59f0412b2f2ddf5dd1e2b1fe928d0f767f9750" + sha256 cellar: :any, arm64_sequoia: "8bd1fe419459be3167ff34cc8b6e709a2628f8bb38ea47b629dacb96cdce8b24" + sha256 cellar: :any, arm64_sonoma: "90830127c424435586b2a2f30fbd59422993dcdc7b102f69f85f346d3f9d09cb" + sha256 cellar: :any, arm64_ventura: "01720e2bc4f1207ec29261562b312955d96ceda87dc354ac708b8ff4f1b95565" + sha256 cellar: :any, arm64_monterey: "703bdc526a902d8cb2190cbe385078bc5618952697ce3e6554a3473a9f1ec67c" + sha256 cellar: :any, arm64_big_sur: "0015ac050eb60388f47d9d8ad4dbc839be6c94c53896d472db1f902710d27504" + sha256 cellar: :any, sonoma: "3150134181a1ecf81ac05c0eba85eeae9f89819bdaf85b241c62b8450e6b0e2a" + sha256 cellar: :any, ventura: "bc43ab7d3a985f855e1e2b266956ba2d50d394c73d55f5265fb8e2511b25c83f" + sha256 cellar: :any, monterey: "5e384c41501dd14903efefe829b14beb5db30d76bea9f0265aa957ed602fd400" + sha256 cellar: :any, big_sur: "4516c7fdc7b008d5d1c1447c8dd18c3562edb70619d40c8798933022da471794" + sha256 cellar: :any, catalina: "b3c9c8caa3da6169fedd4893e27d4156b016715fcbf91c47209c34ec4b536a79" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3ff3214766af3bc7c54164bec8a57cde4788169be18c7174d44db61c908a4d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "152c18564d3252af6530331c08788108b99fbac328066ace0c58f94428fe7b4e" + end + + depends_on "sdl2" + + resource "test_song" do + url "https://ftp.modland.com/pub/modules/MDX/-%20unknown/Popful%20Mail/pop-00.mdx" + sha256 "86f21fbbaf93eb60e79fa07c759b906a782afe4e1db5c7e77a1640e6bf63fd14" + end + + # Fix build on Linux + patch :DATA + + def install + system "make", "CC=#{ENV.cc}", "LD=#{ENV.cc}" + + # Makefile doesn't build a dylib + libmdxmini = shared_library("libmdxmini") + + flags = if OS.mac? + %W[ + -dynamiclib + -install_name #{lib/libmdxmini} + -undefined dynamic_lookup + ] + else + ["-shared"] + end + + system ENV.cc, *flags, "-o", libmdxmini, *Dir["obj/*.o"] + + bin.install "mdxplay" + lib.install libmdxmini + (include/"libmdxmini").install Dir["src/*.h"] + end + + test do + resource("test_song").stage testpath + (testpath/"mdxtest.c").write <<~C + #include + #include "libmdxmini/mdxmini.h" + + int main(int argc, char** argv) + { + t_mdxmini mdx; + char title[100]; + mdx_open(&mdx, argv[1], argv[2]); + mdx_get_title(&mdx, title); + printf("%s\\n", title); + } + C + system ENV.cc, "mdxtest.c", "-L#{lib}", "-L#{Formula["sdl2"].opt_lib}", "-lmdxmini", "-lSDL2", "-o", "mdxtest" + + result = shell_output("#{testpath}/mdxtest #{testpath}/pop-00.mdx #{testpath}").chomp + result.force_encoding("ascii-8bit") if result.respond_to? :force_encoding + + # Song title is in Shift-JIS + # Trailing whitespace is intentional & shouldn't be removed. + l1 = "\x82\xDB\x82\xC1\x82\xD5\x82\xE9\x83\x81\x83C\x83\x8B " + l2 = "\x83o\x83b\x83N\x83A\x83b\x83v\x8D\xEC\x90\xAC " + expected = <<~EOS + #{l1} + #{l2} + (C)Falcom 1992 cv.\x82o\x82h. ass.\x82s\x82`\x82o\x81{ + EOS + expected.force_encoding("ascii-8bit") if result.respond_to? :force_encoding + assert_equal expected.delete!("\n"), result + end +end + +__END__ +diff --git a/Makefile b/Makefile +index 9b63041..ff725c3 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,6 +43,7 @@ FILES_ORG = COPYING AUTHORS + LIB = $(OBJDIR)/lib$(TITLE).a + + LIBS += $(LIB) ++LIBS += -lm + + ZIPSRC = $(TITLE)`date +"%y%m%d"`.zip + TOUCH = touch -t `date +"%m%d0000"` +diff --git a/mak/general.mak b/mak/general.mak +index 6f88e4c..c552eb3 100644 +--- a/mak/general.mak ++++ b/mak/general.mak +@@ -17,10 +17,16 @@ CFLAGS = -g -O3 + OBJDIR = obj + endif + +-# iconv ++# iconv and -fPIC flags + ifneq ($(OS),Windows_NT) +-CFLAGS += -DUSE_ICONV +-LIBS += -liconv ++ UNAME_S := $(shell uname -s) ++ ifeq ($(UNAME_S),Darwin) ++ CFLAGS += -DUSE_ICONV ++ LIBS += -liconv ++ endif ++ ifeq ($(UNAME_S),Linux) ++ CFLAGS += -fPIC ++ endif + endif + + # diff --git a/Formula/m/mdz.rb b/Formula/m/mdz.rb new file mode 100644 index 0000000000000..4b97a6640a192 --- /dev/null +++ b/Formula/m/mdz.rb @@ -0,0 +1,44 @@ +class Mdz < Formula + desc "CLI for the mdz ledger Open Source" + homepage "https://github.com/LerianStudio/midaz" + url "https://github.com/LerianStudio/midaz/archive/refs/tags/v3.3.6.tar.gz" + sha256 "3b649c6d45986dfd6d098f07281040a0efb479265e365263cec80725feda5cda" + license "Apache-2.0" + head "https://github.com/LerianStudio/midaz.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6b502ce6aa976fb5596e57b3b1fc378bc7e6fcf68112b4c2fcff0db7ce2e61d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa9a3cfa02a6c8075e43692af6fce96ab34ae3de61ebd9d9a49872efd711dfa6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6127718590325e3c0b4a35b3dac4a392d89929e51a0d2271430197de4d1d750" + sha256 cellar: :any_skip_relocation, sonoma: "dbce075c6c026b9e5a155b31c550c5a71ad691b0490768e0af6d01337cba7640" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac85ba558fbae2893afbf579a9a4827dd9f017e16876aadc9220d6ec71e8825d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dab7e3db07de88789c5511c5dd6c804f779b9667b6f47c3bc379bb7c185e68fb" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/LerianStudio/midaz/v3/components/mdz/pkg/environment.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./components/mdz" + + generate_completions_from_executable(bin/"mdz", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match "Mdz CLI #{version}", shell_output("#{bin}/mdz --version") + + client_id = "9670e0ca55a29a466d31" + client_secret = "dd03f916cacf4a98c6a413d9c38ba102dce436a9" + url_api_auth = "http://127.0.0.1:8080" + url_api_ledger = "http://127.0.0.1:3000" + + output = shell_output("#{bin}/mdz configure --client-id #{client_id} " \ + "--client-secret #{client_secret} --url-api-auth #{url_api_auth} " \ + "--url-api-ledger #{url_api_ledger}") + + assert_match "client-id: 9670e0ca55a29a466d31", output + assert_match "client-secret: dd03f916cacf4a98c6a413d9c38ba102dce436a9", output + assert_match "url-api-auth: http://127.0.0.1:8080", output + assert_match "url-api-ledger: http://127.0.0.1:3000", output + end +end diff --git a/Formula/m/mdzk.rb b/Formula/m/mdzk.rb new file mode 100644 index 0000000000000..eeaf51b0b0ed2 --- /dev/null +++ b/Formula/m/mdzk.rb @@ -0,0 +1,48 @@ +class Mdzk < Formula + desc "Plain text Zettelkasten based on mdBook" + homepage "https://mdzk.app/" + url "https://github.com/mdzk-rs/mdzk/archive/refs/tags/0.5.2.tar.gz" + sha256 "292a0ae7b91d535ffa1cfd3649d903b75a1bb1604abc7d98202f3e13e97de702" + license "MPL-2.0" + head "https://github.com/mdzk-rs/mdzk.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2924144bf68886f563698209699573519a5ede4d78f3c02cef63639883ff53c7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5333fe224b57ed96d1e4696037b014ae42dab995f3a07d76394969a6e7b8946" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c45aa016d02e2a7246ed02956b861e60cef5f67ede2b71526863b59fbf6f0b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e395b411c4fd8c752152796aa860f24a44ac7d4540ffc838c6808a443ea271ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d5b825c14aa162c7b6e107d17a4a94db341b1dbbb57697f1001bd66a2ab9b45c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "57d5583b4a4f354106060c3d15e245b223580a29bfc2e7228bd9a611a31506b0" + sha256 cellar: :any_skip_relocation, sonoma: "1930303360bdbce63f56aaedc0feab70b47d1eb3dbf5722e238e37710a79182c" + sha256 cellar: :any_skip_relocation, ventura: "ce6ab505ed1ff51c57a3740204330ef129212b2bef6e1a1b5a686ec12f038901" + sha256 cellar: :any_skip_relocation, monterey: "5a880de7f75b7b16d40b997e0a50aa4097d24598a46294ba097f5f7a8c3f9595" + sha256 cellar: :any_skip_relocation, big_sur: "b15fade4973c35b431443b0982396b4c1e03399f2c2b85413158a976fbc501a4" + sha256 cellar: :any_skip_relocation, catalina: "c168154d8cf9b1aafdf5f089922d8eb8e74655b97b389435534a9efbc668440d" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b4d38f1cf842f3887a3560a484fcfae60a36d9dc812b5feea88672ee5a4a0fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95bc548f5fb2c84e0e3b62e895e3c6812e8df51b74eaf6bad4167ab1861f66d5" + end + + depends_on "rust" => :build + + # Fix compile with newer Rust. + # Remove with the next release. + patch do + url "https://raw.githubusercontent.com/NixOS/nixpkgs/ea76cad34d64ce213de5992154031bf0c9b75ace/pkgs/applications/misc/mdzk/update-mdbook-for-rust-1.64.patch" + sha256 "953f1d75d586acba6786d9c578f5c07fc2a52fc5ef5c743576a613a7491fbb50" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"mdzk", "init", "test_mdzk" + assert_path_exists testpath/"test_mdzk" + end +end diff --git a/Formula/m/mecab-ipadic.rb b/Formula/m/mecab-ipadic.rb new file mode 100644 index 0000000000000..38629550f706d --- /dev/null +++ b/Formula/m/mecab-ipadic.rb @@ -0,0 +1,66 @@ +class MecabIpadic < Formula + desc "IPA dictionary compiled for MeCab" + homepage "https://taku910.github.io/mecab/" + # Canonical url is https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM + url "https://deb.debian.org/debian/pool/main/m/mecab-ipadic/mecab-ipadic_2.7.0-20070801+main.orig.tar.gz" + version "2.7.0-20070801" + sha256 "b62f527d881c504576baed9c6ef6561554658b175ce6ae0096a60307e49e3523" + license "NAIST-2003" + + # We check the Debian index page because the first-party website uses a Google + # Drive download URL and doesn't list the version in any other way, so we + # can't identify the newest version there. + livecheck do + url "https://deb.debian.org/debian/pool/main/m/mecab-ipadic/" + regex(/href=.*?mecab-ipadic[._-]v?(\d+(?:\.\d+)+(?:-\d+)?)(?:\+main)?\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3bdeed6d823a573bbac30e4994b79e26ae025379d2cb9b2193128b0cda7aca85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0b12716ef5436fca113fb97c824e532b50b86ef59cb5b035498d00f54579286" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ab9a752833b99a87201dc1217e3774ca21aac1a87971dac1196bed13d1b428a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "23c4ce0042e583b45fe99a339a10c481f80d5d2055ca896924e3e4c764460dc6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "68eec45d5e084ffeab687ccd95391dcbb1cfd80ddb73232253304a1ea1fb0be0" + sha256 cellar: :any_skip_relocation, sonoma: "12212f7bc769338a7747d2ac184bf669454486336ca32335f15f140d3a0121bf" + sha256 cellar: :any_skip_relocation, ventura: "d901a98d8d01869855c5e55a35f4c252749306ee5a5eb44030f8c811885b44ed" + sha256 cellar: :any_skip_relocation, monterey: "6285de6570c904239f3f07fe0b8bb5c707b23c0741e36170ebc28aaed3da0b6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c7669401d92374cb6f57a0f71be0b65bc73c0fabcd62e1d2fd0480cadf9d697" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23ec6f722695c38dc93487d1320dc7e34c79b359647d4c8edd2cef0a045ed851" + end + + depends_on "mecab" + + link_overwrite "lib/mecab/dic" + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --prefix=#{prefix} + --with-charset=utf8 + --with-dicdir=#{lib}/mecab/dic/ipadic + ] + + system "./configure", *args + system "make", "install" + end + + def caveats + <<~EOS + To enable mecab-ipadic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/ipadic + EOS + end + + test do + (testpath/"mecabrc").write <<~EOS + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/ipadic + EOS + + assert_match "名詞", pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) + assert_match "名詞,固有名詞,組織", pipe_output("mecab --rcfile=#{testpath}/mecabrc", "A\n") + end +end diff --git a/Formula/m/mecab-jumandic.rb b/Formula/m/mecab-jumandic.rb new file mode 100644 index 0000000000000..10a17500abb55 --- /dev/null +++ b/Formula/m/mecab-jumandic.rb @@ -0,0 +1,58 @@ +class MecabJumandic < Formula + desc "See mecab" + homepage "https://taku910.github.io/mecab/" + url "https://www.mirrorservice.org/sites/distfiles.macports.org/mecab/mecab-jumandic-7.0-20130310.tar.gz" + mirror "https://mirrors.ustc.edu.cn/macports/distfiles/mecab/mecab-jumandic-7.0-20130310.tar.gz" + sha256 "eaf216758edee9a159bc3d02507007318686b9537943268c4565cc1f9ef07f15" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1916fed29c7a65bba61d492798c38869d624ea1496b03e77f2aca5ffd3cbfe9a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "874bddec7db567b9cfc77eae8df900cf54264d6b047aa72ad5de27f10c257f0a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ebf13ddcc0af473110b91b1ef375fd0e002d1d5069f90010760ea0c9477cc80" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f033d5c87f53c348ad60a9de9e2f332248cc06d7c7bdfb32736ff86f2a9e080f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f033d5c87f53c348ad60a9de9e2f332248cc06d7c7bdfb32736ff86f2a9e080f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "467204e1c6b94ca425c3e18e5d1ac6d88965119dcea7403504790f592d762f1c" + sha256 cellar: :any_skip_relocation, sonoma: "6ebf13ddcc0af473110b91b1ef375fd0e002d1d5069f90010760ea0c9477cc80" + sha256 cellar: :any_skip_relocation, ventura: "f033d5c87f53c348ad60a9de9e2f332248cc06d7c7bdfb32736ff86f2a9e080f" + sha256 cellar: :any_skip_relocation, monterey: "f033d5c87f53c348ad60a9de9e2f332248cc06d7c7bdfb32736ff86f2a9e080f" + sha256 cellar: :any_skip_relocation, big_sur: "6da8172f0b7ac280bce9b4cbd35f1d7c0346c16e9470df605d6527a62fb30b7c" + sha256 cellar: :any_skip_relocation, catalina: "57d02ae309f76a73adeb47ddf1a02afaf21443c4516afadb0a4cb16b0b1a2a79" + sha256 cellar: :any_skip_relocation, arm64_linux: "346aefc668bb17d6acb5990cf621a5c968d100654f3fbf92cac602cf92230e37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c26464bbeb15378cbc88904a355bc5e3fca846cbd709a8d9d156c21822b2192" + end + + depends_on "mecab" + + link_overwrite "lib/mecab/dic" + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --prefix=#{prefix} + --with-charset=utf8 + --with-dicdir=#{lib}/mecab/dic/jumandic + ] + + system "./configure", *args + system "make", "install" + end + + def caveats + <<~EOS + To enable mecab-jumandic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/jumandic + EOS + end + + test do + (testpath/"mecabrc").write <<~EOS + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/jumandic + EOS + + pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) + end +end diff --git a/Formula/m/mecab-ko-dic.rb b/Formula/m/mecab-ko-dic.rb new file mode 100644 index 0000000000000..6cced4f8fbf89 --- /dev/null +++ b/Formula/m/mecab-ko-dic.rb @@ -0,0 +1,56 @@ +class MecabKoDic < Formula + desc "See mecab" + homepage "https://bitbucket.org/eunjeon/mecab-ko-dic" + url "https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.1.1-20180720.tar.gz" + sha256 "fd62d3d6d8fa85145528065fabad4d7cb20f6b2201e71be4081a4e9701a5b330" + license "Apache-2.0" + + livecheck do + url :stable + regex(/href=.*?mecab-ko-dic[._-]v?(\d+(?:\.\d+)+-\d+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "411a3b0709b2f5450a05106102c7f41f8a3004954d34b54279c7a9ab2bad91c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4493b0c9c904a1fc3a0e1a25e6f394f6bd499bee75efeb01379121fc7e08abaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9cd00df97f11f37a41f0c5eb56b98832126774d74a0cc98150dcb7a60d1ba78" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e9149e5ec1b85940657df3ed931d6ddbc83ea1a1e68767b9d27138c5d4ba451c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e9149e5ec1b85940657df3ed931d6ddbc83ea1a1e68767b9d27138c5d4ba451c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6e39a270ea5fbb5424d0ca358acafc2f08b9232d878eded2789f990f4065aba7" + sha256 cellar: :any_skip_relocation, sonoma: "f9cd00df97f11f37a41f0c5eb56b98832126774d74a0cc98150dcb7a60d1ba78" + sha256 cellar: :any_skip_relocation, ventura: "e9149e5ec1b85940657df3ed931d6ddbc83ea1a1e68767b9d27138c5d4ba451c" + sha256 cellar: :any_skip_relocation, monterey: "e9149e5ec1b85940657df3ed931d6ddbc83ea1a1e68767b9d27138c5d4ba451c" + sha256 cellar: :any_skip_relocation, big_sur: "ab72fcbb7b1e0bc1ec8667a2d183ad5beab66279d27486ef1ae241d4114fddd1" + sha256 cellar: :any_skip_relocation, catalina: "02f67f9bd82e7310074c4c47097bcb4244c79211af9736db8fa73861dbbb820d" + sha256 cellar: :any_skip_relocation, arm64_linux: "db85d7f7315243abae780af58802a0489fef9c429635eb2ded768465245f3824" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fda9a5da9f32090ef09eca7a8f5098b686079573483b4eb401b7e80db266552" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "mecab-ko" + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}", + "--with-dicdir=#{lib}/mecab/dic/mecab-ko-dic" + system "make", "install" + end + + def caveats + <<~EOS + To enable mecab-ko-dic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/mecab-ko-dic + EOS + end + + test do + (testpath/"mecabrc").write <<~EOS + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/mecab-ko-dic + EOS + + pipe_output("mecab --rcfile=#{testpath}/mecabrc", "화학 이외의 것\n", 0) + end +end diff --git a/Formula/m/mecab-ko.rb b/Formula/m/mecab-ko.rb new file mode 100644 index 0000000000000..4aeeacd8131fb --- /dev/null +++ b/Formula/m/mecab-ko.rb @@ -0,0 +1,54 @@ +class MecabKo < Formula + desc "See mecab" + homepage "https://bitbucket.org/eunjeon/mecab-ko" + url "https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz" + version "0.996-ko-0.9.2" + sha256 "d0e0f696fc33c2183307d4eb87ec3b17845f90b81bf843bd0981e574ee3c38cb" + license any_of: ["GPL-2.0-only", "LGPL-2.1-only", "BSD-3-Clause"] + + livecheck do + url :stable + regex(/href=.*?mecab[._-]v?(\d+(?:\.\d+)+-ko-\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "2b3b6779398b30383fba5b14388221f8291a5fe46401f1219b728934ba4d0a1c" + sha256 arm64_sequoia: "3c1c199bd50bf6df285b924549652b4cf357cad624603cd393b9d88b80353a80" + sha256 arm64_sonoma: "d1d8ceeb481323ec477598ad8c68fa706c75dd3292e09de28c1ba41fe4aeaa56" + sha256 arm64_ventura: "3b7edb46e117b0dd5df069ae3ce9be8d46df3a1905f2b5141550bf5f2be2124e" + sha256 arm64_monterey: "188bfe25ec8b456e29e7668a704da223ef5999b5e9f5ff0dafb0b344e7094734" + sha256 arm64_big_sur: "bed085afe970086d2415a7412c95b09ecd016d40c7a0b0b041edc70a6e53b069" + sha256 sonoma: "304fec23771bee3167fa29acb1d818808f37e0a00751e3f8686c58392f6e407b" + sha256 ventura: "bfa6ae7a3d0da90d1089d0a3b2dfd83f229ef482ab51302a1a28a2599c073f4f" + sha256 monterey: "78a7f912badfb92dd7b251ac0b62b958e9f6e4b09fe43b5fc6251beefb5454dc" + sha256 big_sur: "5a551a2a040daff922d7eebc686a56fa89ca310aab415e8f1ddd743983442926" + sha256 catalina: "d9655e7122ee6a56194faf5e44062c3bf3c2bf145ba6f8f7b3e6dd1154bf7516" + sha256 arm64_linux: "207ec6dd09f1e79dd4fc75135376ccfd0b998f0d9ccaf13d7832b2708b0c2a23" + sha256 x86_64_linux: "15f29ad6bf47615efaeab3db5f5108ee7232fc3c31cd905c7524b619d0bab818" + end + + conflicts_with "mecab", because: "both install mecab binaries" + + def install + args = ["--sysconfdir=#{etc}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + + # Put dic files in HOMEBREW_PREFIX/lib instead of lib + inreplace [bin/"mecab-config", etc/"mecabrc"], "#{lib}/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" + end + + def post_install + (HOMEBREW_PREFIX/"lib/mecab/dic").mkpath + end + + test do + assert_equal "#{HOMEBREW_PREFIX}/lib/mecab/dic", shell_output("#{bin}/mecab-config --dicdir").chomp + end +end diff --git a/Formula/m/mecab-unidic-extended.rb b/Formula/m/mecab-unidic-extended.rb new file mode 100644 index 0000000000000..a676454486e12 --- /dev/null +++ b/Formula/m/mecab-unidic-extended.rb @@ -0,0 +1,45 @@ +class MecabUnidicExtended < Formula + desc "Extended morphological analyzer for MeCab" + homepage "https://clrd.ninjal.ac.jp/unidic/en/back_number_en.html" + url "https://mirrors.dotsrc.org/osdn/unidic/58338/unidic-mecab_kana-accent-2.1.2_src.zip" + mirror "https://clrd.ninjal.ac.jp/unidic_archive/cwj/2.1.2/unidic-mecab_kana-accent-2.1.2_src.zip" + sha256 "6cce98269214ce7de6159f61a25ffc5b436375c098cc86d6aa98c0605cbf90d4" + license any_of: ["BSD-3-Clause", "GPL-2.0-only", "LGPL-2.1-only"] + + # The OSDN releases page asynchronously fetches separate HTML for each + # release, so we can't easily check the related archive file names. + # NOTE: If/when a new version appears, please manually check the releases + # page to confirm an appropriate archive is available for this formula. + livecheck do + formula "mecab-unidic" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "16217e32273610a5314c981b56a06476002a596ad3e17af6bd8ad48adf7f8f23" + end + + depends_on "mecab" + + link_overwrite "lib/mecab/dic" + + def install + system "./configure", "--with-dicdir=#{lib}/mecab/dic/unidic-extended", *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + To enable mecab-unidic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic-extended + EOS + end + + test do + (testpath/"mecabrc").write <<~EOS + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic-extended + EOS + + pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) + end +end diff --git a/Formula/m/mecab-unidic.rb b/Formula/m/mecab-unidic.rb new file mode 100644 index 0000000000000..b5a1ebd51ab95 --- /dev/null +++ b/Formula/m/mecab-unidic.rb @@ -0,0 +1,42 @@ +class MecabUnidic < Formula + desc "Morphological analyzer for MeCab" + homepage "https://clrd.ninjal.ac.jp/unidic/en/" + url "https://mirrors.dotsrc.org/osdn/unidic/58338/unidic-mecab-2.1.2_src.zip" + mirror "https://clrd.ninjal.ac.jp/unidic_archive/cwj/2.1.2/unidic-mecab-2.1.2_src.zip" + sha256 "6cce98269214ce7de6159f61a25ffc5b436375c098cc86d6aa98c0605cbf90d4" + license any_of: ["GPL-2.0-only", "LGPL-2.1-only", "BSD-3-Clause"] + + livecheck do + url "https://clrd.ninjal.ac.jp/unidic/en/back_number_en.html" + regex(/href=.*?unidic-mecab[._-]v?(\d+(?:\.\d+)+)[._-]src\.zip/i) + end + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "41360acf4a7845341e5aa6b3dbd168c083797ad7931f5eb3bd4b40730b02276b" + end + + depends_on "mecab" + + link_overwrite "lib/mecab/dic" + + def install + system "./configure", "--with-dicdir=#{lib}/mecab/dic/unidic", *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + To enable mecab-unidic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic + EOS + end + + test do + (testpath/"mecabrc").write <<~EOS + dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic + EOS + + pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) + end +end diff --git a/Formula/m/mecab.rb b/Formula/m/mecab.rb new file mode 100644 index 0000000000000..a064f84cbc685 --- /dev/null +++ b/Formula/m/mecab.rb @@ -0,0 +1,55 @@ +class Mecab < Formula + desc "Yet another part-of-speech and morphological analyzer" + homepage "https://taku910.github.io/mecab/" + # Canonical url is https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE + url "https://deb.debian.org/debian/pool/main/m/mecab/mecab_0.996.orig.tar.gz" + sha256 "e073325783135b72e666145c781bb48fada583d5224fb2490fb6c1403ba69c59" + license any_of: ["GPL-2.0-only", "LGPL-2.1-only", "BSD-3-Clause"] + + livecheck do + url :homepage + regex(/mecab[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 arm64_tahoe: "e0bafdf893f0650942b7482f0ae672094f530a37d18cc3047932b90a2a006a16" + sha256 arm64_sequoia: "9a6615d4ecdf87686bcc81e8851929a24661604782f48a0626a2e74762a20fa5" + sha256 arm64_sonoma: "b442dff5851dc2e529a82d84a59b135e6f79ba6af1f295589e776aa2439d71f6" + sha256 arm64_ventura: "b64f24600f7e8cad0dd98a985b72a446db41af35a192261ec489fc059e9a354f" + sha256 arm64_monterey: "99d7d453a35685f10cc15e0135d7ec612b9d695e58a2d36032daef5b6dac9a6f" + sha256 sonoma: "d91a5e1bd7fdea15cfc0469705b33a71b02ad5c2ec2a599ab49829d9a6baa916" + sha256 ventura: "361bce3217483e859b5c6d364da2ea098c63058411ed5324af8bf6c018046fef" + sha256 monterey: "754a860b791ac92d825d4ff6b6b1f63e7c31e8983e603e844d1e4675732f343f" + sha256 arm64_linux: "8181ec221a72b26be40c3de033dd8196d70c01d776b912f90ec5effd50731d6c" + sha256 x86_64_linux: "f730abd5e95a325a9e2e012ac01714e9a22e694d91e5bb026d501495d9899ff6" + end + + conflicts_with "mecab-ko", because: "both install mecab binaries" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--sysconfdir=#{etc}", *args, *std_configure_args + system "make", "install" + + # Put dic files in HOMEBREW_PREFIX/lib instead of lib + inreplace bin/"mecab-config", "#{lib}/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" + inreplace etc/"mecabrc", "#{lib}/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" + end + + def post_install + (HOMEBREW_PREFIX/"lib/mecab/dic").mkpath + end + + test do + assert_equal "#{HOMEBREW_PREFIX}/lib/mecab/dic", shell_output("#{bin}/mecab-config --dicdir").chomp + return if OS.linux? + + assert_includes (bin/"mecab").dynamically_linked_libraries, "/usr/lib/libiconv.2.dylib" + end +end diff --git a/Formula/m/media-control.rb b/Formula/m/media-control.rb new file mode 100644 index 0000000000000..135c3950598d1 --- /dev/null +++ b/Formula/m/media-control.rb @@ -0,0 +1,32 @@ +class MediaControl < Formula + desc "Control and observe media playback from the command-line" + homepage "https://github.com/ungive/media-control" + url "https://github.com/ungive/media-control.git", + tag: "v0.7.2", + revision: "7f2b6107eab208ac6f7dd206232c7a8eb5c34aca" + license "BSD-3-Clause" + head "https://github.com/ungive/media-control.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5d30162759b982c646ca3223f2edd5891e28dc73debfe336e0ae8307c81eec05" + sha256 cellar: :any, arm64_sequoia: "b19b1fb4cabe60ff109d6cda49c4e672cc4dd6cebdda68b058360ca613c22adf" + sha256 cellar: :any, arm64_sonoma: "74a0f658133dc87eb38de4622fd6492da586914aa4d7a91db9777b2826d23523" + sha256 cellar: :any, arm64_ventura: "c66d4d35ce48365ad154df1549ac24a5a51ad01e7410357dae2f4e4afea46c79" + sha256 cellar: :any, sonoma: "302a37ed8cd23fd9e78546f31247b25cf87460c49ce8e87d9966be4966e835c9" + sha256 cellar: :any, ventura: "0ad7f71a81a3fb6956bec6974aa83413982410b1e74400192499126a78801975" + end + + depends_on "cmake" => :build + depends_on :macos + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/media-control version") + system bin/"media-control", "test" + end +end diff --git a/Formula/m/media-info.rb b/Formula/m/media-info.rb new file mode 100644 index 0000000000000..8c47db761b06b --- /dev/null +++ b/Formula/m/media-info.rb @@ -0,0 +1,46 @@ +class MediaInfo < Formula + desc "Unified display of technical and tag data for audio/video" + homepage "https://mediaarea.net/" + url "https://mediaarea.net/download/binary/mediainfo/25.09/MediaInfo_CLI_25.09_GNU_FromSource.tar.xz" + sha256 "530412c6b500418afcb11bc43d25791c2a9f87078ec5e5094add33592ff96f44" + license "BSD-2-Clause" + head "https://github.com/MediaArea/MediaInfo.git", branch: "master" + + livecheck do + url "https://mediaarea.net/en/MediaInfo/Download/Source" + regex(/href=.*?mediainfo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1fde0e86c98978234f53ccdffd1c7e109ca13cdf1fc008611a2174c0ac402aa3" + sha256 cellar: :any, arm64_sequoia: "6426b44cb136492c6210c1ba4850fc7d28420523c7fd675630be4cdc05d5bd2b" + sha256 cellar: :any, arm64_sonoma: "debe5a84f99fa842471ad6204a9d1eeaa487466813ae9cbf7570738ecea3a983" + sha256 cellar: :any, sonoma: "f18dffad486184533005853c224b8036829fc4b35f51123bfc7a73491ee7cbbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "a44c0502f6679267fba9a0184f4ce76c9742877e2246e332e5a19775cf60c6d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1823091423c3f494676221bd37c6593c700ef339b144a18960795e5c1baa0282" + end + + depends_on "pkgconf" => :build + depends_on "libmediainfo" + depends_on "libzen" + + uses_from_macos "zlib" + + def install + cd "MediaInfo/Project/GNU/CLI" do + system "./configure", *std_configure_args + system "make", "install" + end + end + + test do + output = shell_output("#{bin}/mediainfo #{test_fixtures("test.mp3")}") + assert_match <<~EOS, output + General + Complete name : #{test_fixtures("test.mp3")} + Format : MPEG Audio + EOS + + assert_match version.to_s, shell_output("#{bin}/mediainfo --Version") + end +end diff --git a/Formula/m/mediaconch.rb b/Formula/m/mediaconch.rb new file mode 100644 index 0000000000000..429bac9e33ba5 --- /dev/null +++ b/Formula/m/mediaconch.rb @@ -0,0 +1,49 @@ +class Mediaconch < Formula + desc "Conformance checker and technical metadata reporter" + homepage "https://mediaarea.net/MediaConch" + url "https://mediaarea.net/download/binary/mediaconch/25.04/MediaConch_CLI_25.04_GNU_FromSource.tar.bz2" + sha256 "800d076ca374a0c954c928f471761fb000b36b7df9d8e1d1bb03b233edff8857" + license "BSD-2-Clause" + + livecheck do + url "https://mediaarea.net/MediaConch/Download/Source" + regex(/href=.*?mediaconch[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e2fed8cab5d4a3c8a16f5a5d407a2bcfd78195fb849313642b94084fa0902798" + sha256 cellar: :any, arm64_sequoia: "192df199a6d3d806ba48aee44ed9bbfa171777699d5bbe4e2c9368f7a0b5667d" + sha256 cellar: :any, arm64_sonoma: "677887e14ce2feab7e110e7e8ef7a07d507da8c055d57008b11263516e3e893a" + sha256 cellar: :any, arm64_ventura: "80a7eb928adcfd633886fde7f945322e7c34767d6cab943fe787331aff3fdf47" + sha256 cellar: :any, sonoma: "7f5dd6a3e6e60731a37164f8745b42002e4aaf710c797c5664d17454b9d30454" + sha256 cellar: :any, ventura: "54997bdec0585a932b7e2e7f8d7cb10e48ddde5ef5a385ed0a2f04f5ce33ac33" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b2a5bf4219731fbb34eaa994e53fa25874448ed49dee323c9cfbdbcf5321cc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c11e7b0b33b4072bdeb52e5c3acffbb2b86c677458ee23a5e981c0878f21fccc" + end + + depends_on "pkgconf" => :build + depends_on "jansson" + depends_on "libevent" + depends_on "libmediainfo" + depends_on "libzen" + depends_on "sqlite" + + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + def install + cd "MediaConch/Project/GNU/CLI" do + system "./configure", *std_configure_args + system "make", "install" + end + end + + test do + output = shell_output("#{bin}/mediaconch #{test_fixtures("test.mp3")}") + assert_match "N/A! #{test_fixtures("test.mp3")}", output + + assert_match version.to_s, shell_output("#{bin}/mediaconch --version") + end +end diff --git a/Formula/m/mediamtx.rb b/Formula/m/mediamtx.rb new file mode 100644 index 0000000000000..b799108f400a7 --- /dev/null +++ b/Formula/m/mediamtx.rb @@ -0,0 +1,61 @@ +class Mediamtx < Formula + desc "Zero-dependency real-time media server and media proxy" + homepage "https://github.com/bluenviron/mediamtx" + # need to use the tag to generate the version info + url "https://github.com/bluenviron/mediamtx.git", + tag: "v1.15.3", + revision: "4ff80d773b6727620f74582bf8deeeb0143df4d5" + license "MIT" + head "https://github.com/bluenviron/mediamtx.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f84a05196021770e4d1857b677bb44bffc5dc2fe81610bc4f08be32c3e9712cc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f84a05196021770e4d1857b677bb44bffc5dc2fe81610bc4f08be32c3e9712cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f84a05196021770e4d1857b677bb44bffc5dc2fe81610bc4f08be32c3e9712cc" + sha256 cellar: :any_skip_relocation, sonoma: "7a673def9257eb42d34b74e65fc805cf7482447cfdcf897c308adcd9f7d24319" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb43fa01b2e6aac8db05dd5c664f47ca92e38d51aa329c407c380305d5d6c354" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a169c956deca39b792f2b21a56ae072a0a8f90c1de74414bbfc36b77b477df60" + end + + depends_on "go" => :build + + def install + system "go", "generate", "./..." + system "go", "build", *std_go_args(ldflags: "-s -w") + + # Install default config + (etc/"mediamtx").install "mediamtx.yml" + end + + def post_install + (var/"log/mediamtx").mkpath + end + + service do + run [opt_bin/"mediamtx", etc/"mediamtx/mediamtx.yml"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/mediamtx/output.log" + error_log_path var/"log/mediamtx/error.log" + end + + test do + port = free_port + + # version report has some issue, https://github.com/bluenviron/mediamtx/issues/3846 + assert_match version.to_s, shell_output("#{bin}/mediamtx --help") + + mediamtx_api = "127.0.0.1:#{port}" + pid = fork do + exec({ "MTX_API" => "yes", "MTX_APIADDRESS" => mediamtx_api }, bin/"mediamtx", etc/"mediamtx/mediamtx.yml") + end + sleep 3 + + # Check API output matches configuration + curl_output = shell_output("curl --silent http://#{mediamtx_api}/v3/config/global/get") + assert_match "\"apiAddress\":\"#{mediamtx_api}\"", curl_output + ensure + Process.kill("TERM", pid) + Process.wait pid + end +end diff --git a/Formula/m/mednafen.rb b/Formula/m/mednafen.rb new file mode 100644 index 0000000000000..85674155e5866 --- /dev/null +++ b/Formula/m/mednafen.rb @@ -0,0 +1,65 @@ +class Mednafen < Formula + desc "Multi-system emulator" + homepage "https://mednafen.github.io/" + url "https://mednafen.github.io/releases/files/mednafen-1.32.1.tar.xz" + sha256 "de7eb94ab66212ae7758376524368a8ab208234b33796625ca630547dbc83832" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://mednafen.github.io/releases/" + regex(/href=.*?mednafen[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "2e8e7a500b841dcafc2bfcd58f95fbbf514ffcfb14646bf70d261934e1916c18" + sha256 arm64_sequoia: "3ebf9988b2e260b9a1f755f8fcbcc0c9fa3411aae100594a99c03cded175f65c" + sha256 arm64_sonoma: "e52bfc223726a04f7d2b656a57ea9f24b5922e281c7cc3eb63260897dc4e11a7" + sha256 arm64_ventura: "687f37db2e0fb19df00cca7bede658f0c368e5f603f09426bdac47a84e21868d" + sha256 sonoma: "a02749da55b8a46eda51ff89764d32975c0394ef28f9536958c33242f9b13e1d" + sha256 ventura: "6773d3660de92be32485d0330f751f38711356b0891bcdc1eaad88d1538e8a77" + sha256 arm64_linux: "35d7424987d439d2836e2d36c6c619285a9c97a854de09503502fa04d8294d4f" + sha256 x86_64_linux: "1c664519605f10515de616e8d8559b33c46764c1d259f66e21ef5c2fa3131d9a" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + + depends_on "flac" + depends_on "libsndfile" + depends_on "lzo" + depends_on "musepack" + depends_on "sdl2" + depends_on "zstd" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + end + + def install + args = %w[ + --with-external-lzo + --with-external-libzstd + --with-external-mpcdec + --enable-ss + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # Test fails on headless CI: Could not initialize SDL: No available video device + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match version.to_s, shell_output("#{bin}/mednafen", 255) + end +end diff --git a/Formula/m/medusa.rb b/Formula/m/medusa.rb new file mode 100644 index 0000000000000..d2d9a404346f9 --- /dev/null +++ b/Formula/m/medusa.rb @@ -0,0 +1,50 @@ +class Medusa < Formula + desc "Solidity smart contract fuzzer powered by go-ethereum" + homepage "https://github.com/crytic/medusa" + url "https://github.com/crytic/medusa/archive/refs/tags/v1.3.1.tar.gz" + sha256 "fb427e922eeedcdf171cb9181f7db6b5ab47b2fab3dcbad000cf833fa1592130" + license "AGPL-3.0-only" + head "https://github.com/crytic/medusa.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6f4f8ee6c825f3410765b1206c1ed2400adf6c5917f90b6a1b31098ed9aa9fa8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "55669251472eb968d7371ca43fd5d87c9f95ac572a7218b0b8242ba9bf8e80a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7e8120b2c49e2b9a0992ed30813fa43396772783b7007e713fcb6aa7a7688df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "725187f724421b05db7d16428c27852f5915c8c059de085ea17b71e8368ab589" + sha256 cellar: :any_skip_relocation, sonoma: "3f1be22b56c71b4679da39213728efceed14ee3f95314d24c8eb95b7e100334b" + sha256 cellar: :any_skip_relocation, ventura: "c509bc7db13c99b59d46998d6572860ae60e22638063dbf08184268f379b3da2" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe7199554c43253f8cbdd5ecb009cbb29b609f590a25ffc578c10c8856761b60" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ff5acd8ce3c46c5993d6d1aac9947624033bbc56ecbff589ea3ad96a3a03dbf" + end + + depends_on "go" => :build + depends_on "truffle" => :test + depends_on "crytic-compile" + + conflicts_with "bash-completion", because: "both install `medusa` bash completion" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"medusa", "completion", shells: [:bash, :zsh]) + end + + test do + system "truffle", "init" + + (testpath/"contracts/test.sol").write <<~SOLIDITY + pragma solidity ^0.8.0; + contract Test { + function assert_true() public { + assert(true); + } + function assert_false() public { + assert(false); + } + } + SOLIDITY + + fuzz_output = shell_output("#{bin}/medusa fuzz --compilation-target #{testpath} --test-limit 100", 7) + assert_match(/PASSED.*assert_true/, fuzz_output) + assert_match(/FAILED.*assert_false/, fuzz_output) + end +end diff --git a/Formula/m/meek.rb b/Formula/m/meek.rb new file mode 100644 index 0000000000000..9cf9e32e3cd9e --- /dev/null +++ b/Formula/m/meek.rb @@ -0,0 +1,40 @@ +class Meek < Formula + desc "Blocking-resistant pluggable transport for Tor" + homepage "https://www.torproject.org" + url "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek/-/archive/v0.38.0/meek-v0.38.0.tar.gz" + sha256 "63e8aef2828e7d0cc1dc5823fe82f9ae1e59cfc8c8dc118faab0a673c51ff257" + license "CC0-1.0" + head "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d41beffa2dbd3d1b66ba353e51e329fa491d6413dc526c0f9993d41f06adabb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c939314234b6926d31c68588a3b6c6f044daf7012ba72d567166402de563747e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b52834606bed45e6dbc45199d92ae73821cc1b85a1dac4ba03804eb950bdaac0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "adb45229efe44b56e9badf0b4955b76e735c46e2a814afe9601579acfa3f0c44" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e87890b269d99509242918f0b49d0e974ec5d714cab804791420e2ba3a889961" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6b1bc91a0c81ce93bb3d274a8e44b1e16dfc9aa4377cd17f53e17a61cbb614a4" + sha256 cellar: :any_skip_relocation, sonoma: "13b5aa862f9036861acddf2ffcc385d02924bcdb583522b57af834cd98a4af81" + sha256 cellar: :any_skip_relocation, ventura: "a04e4162bfabc0dca75f79e0b96485249060c7352618ec3e44d2af8219b33d8c" + sha256 cellar: :any_skip_relocation, monterey: "ea7c31b3bd02bab4d3951a0ea38a8e9a8c707c981a07929e3e540a05bcd97405" + sha256 cellar: :any_skip_relocation, big_sur: "cdeb7f4ecb736d27d60786ef384b12fdfb6c6ec3f91ffc6e94e72b892e93829a" + sha256 cellar: :any_skip_relocation, catalina: "e7b9e140649a3c62b86417a271ac39c5d080b0e065934ddc47b7c71eb158cb09" + sha256 cellar: :any_skip_relocation, arm64_linux: "99d61e15416a1a9784f37ef0fcf6d68895cbb6571f96998fe016d84b08bfe410" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5adc32589bfaf285e8cea09cd4730a21568aa2c76213cc7cbe15bbc96adf39e3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(output: bin/"meek-client"), "./meek-client" + system "go", "build", *std_go_args(output: bin/"meek-server"), "./meek-server" + man1.install "doc/meek-client.1" + man1.install "doc/meek-server.1" + end + + test do + assert_match "ENV-ERROR no TOR_PT_MANAGED_TRANSPORT_VER", shell_output("#{bin}/meek-client 2>/dev/null", 1) + assert_match "ENV-ERROR no TOR_PT_MANAGED_TRANSPORT_VER", shell_output("#{bin}/meek-server 2>/dev/null", 1) + end +end diff --git a/Formula/m/megacmd.rb b/Formula/m/megacmd.rb new file mode 100644 index 0000000000000..0c3137e05ce3c --- /dev/null +++ b/Formula/m/megacmd.rb @@ -0,0 +1,37 @@ +class Megacmd < Formula + desc "Command-line client for mega.co.nz storage service" + homepage "https://github.com/t3rm1n4l/megacmd" + url "https://github.com/t3rm1n4l/megacmd/archive/refs/tags/0.016.tar.gz" + sha256 "def4cda692860c85529c8de9b0bdb8624a30f57d265f7e70994fc212e5da7e40" + license "MIT" + head "https://github.com/t3rm1n4l/megacmd.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9a2e36bb3c2d380512873dbca8ecac3e42bea9d1007addbce0ca66c3d8114772" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1657b07c1cc68d549882d9d1527671cbf156d3e7f09c42ed3924c20b1c81398e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e45fd178949d3d077930eccf434abb82615d6d237e70262c7f111c92ced0e30" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d98cb6158cd237e86b81c5f975cd4d48bf51b67adc3d5b193ebe96b65717823" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f392f9d6d1ba3acece2b86882a1ae6f5f396e37b814460764655d89704e9d5b3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b0cc423d7d44f74416233d1890e003d8d1a92b32c4f281885e89dbda52031218" + sha256 cellar: :any_skip_relocation, sonoma: "b6e1979a101f7e8acb1ace5f72c154c891e0222c4fabbbbb3fdded786c382809" + sha256 cellar: :any_skip_relocation, ventura: "59c060122906abf916aeae6cf3732d5d90f316e6bd48af758d91d958f06a7fb2" + sha256 cellar: :any_skip_relocation, monterey: "82090686813f52e06f2a9f93c79ea0fc856963575da7d912513a1679ae0b425a" + sha256 cellar: :any_skip_relocation, big_sur: "005012522f9d83387047d28fc1f4870b27090496d333a5ace382fd3b2b380850" + sha256 cellar: :any_skip_relocation, catalina: "5e3e9a0dcacef7fcac245b621b8eee36cc9dc974b46ba1006769f1dbf781b01c" + sha256 cellar: :any_skip_relocation, arm64_linux: "c84183bc0acc08859d967262e425b7277773716ae9d4a72cec4a52cdda32c5df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9158470703a89b5a963775d8a0470dd3a9e934e8815c1ec171f9574d77fb3c32" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"megacmd", "--version" + end +end diff --git a/Formula/m/megatools.rb b/Formula/m/megatools.rb new file mode 100644 index 0000000000000..e652c3140d1d1 --- /dev/null +++ b/Formula/m/megatools.rb @@ -0,0 +1,50 @@ +class Megatools < Formula + desc "Command-line client for Mega.co.nz" + homepage "https://xff.cz/megatools/" + url "https://xff.cz/megatools/builds/megatools-1.11.5.20250706.tar.gz" + sha256 "51f78a03748a64b1066ce28a2ca75d98dbef5f00fe9789dc894827f9a913b362" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url "https://xff.cz/megatools/builds/" + regex(/href=.*?megatools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7217cae7f353389333d5f34a1dfbf0d5327372d0a869641a6f38a305a0e2fa42" + sha256 cellar: :any, arm64_sequoia: "cbdaf47635fdec1fc36736de8b84d3a96d9eb83da463f0db512d138464009e2f" + sha256 cellar: :any, arm64_sonoma: "b6f04ece0c4f9db9b77383d8bbf83497f83108f64c94db171a7841c7311c7cf0" + sha256 cellar: :any, arm64_ventura: "ece0dd5f77f6c087e65c8ea1a78a770a1d1fbeb4fda0f0271cc89b107fce63f7" + sha256 cellar: :any, sonoma: "c95b1c27bf14bccfb31ea2ea00540910a81b00861176b2facc32ae1d392628ca" + sha256 cellar: :any, ventura: "134758d6274b2aba59587c780f34b60b7ad7efa36e54c9ddb5a558f3e8ad43a7" + sha256 arm64_linux: "3cf9bf34c4d780c22dcd0aed0d34d5d9f3ee3f1df79fd96c2db62f07f2054147" + sha256 x86_64_linux: "bb702e9c4d883d99115f1003bac6dc09f0717ee64c9b52ca50b5e91a36d4cbe0" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "openssl@3" + + uses_from_macos "curl", since: :ventura # needs curl >= 7.85.0 + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # Downloads a publicly hosted file and verifies its contents. + system bin/"megadl", + "https://mega.co.nz/#!3Q5CnDCb!PivMgZPyf6aFnCxJhgFLX1h9uUTy9ehoGrEcAkGZSaI", + "--path", "testfile.txt" + assert_equal "Hello Homebrew!\n", (testpath/"testfile.txt").read + end +end diff --git a/Formula/m/meilisearch.rb b/Formula/m/meilisearch.rb new file mode 100644 index 0000000000000..e63e63c97d304 --- /dev/null +++ b/Formula/m/meilisearch.rb @@ -0,0 +1,49 @@ +class Meilisearch < Formula + desc "Ultra relevant, instant and typo-tolerant full-text search API" + homepage "https://docs.meilisearch.com/" + url "https://github.com/meilisearch/meilisearch/archive/refs/tags/v1.24.0.tar.gz" + sha256 "9428a053a67723b93cec0ddf5fe75b2a5354df3de987c5896b73a3d56b5fc1f7" + license "MIT" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e90d3bf306d470e3a5ee39b3d8fbb91eabd4b54b5c1954de8622f3252ca93555" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ff22e7ec52b094ac99b305693a97973c1d815582d976509fa8a59c06a7c0fb6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a77e27bfaf7f126489472407e0f3000dfcb841702c158d612d8d9a23770f5d12" + sha256 cellar: :any_skip_relocation, sonoma: "9310acf90fc656777f66c7c7e60cc6d0856a5d1d4f13567e8abbc290a91ec609" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2e8e9528965e2c8c33d58564ba9681a770f30b5661c9617257ca987aed684ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1967d35e920d882ec5c5eca2d86c9c69451bcbdccda2c1fbe2fe96c4d8f5f8d2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/meilisearch") + end + + service do + run [opt_bin/"meilisearch", "--db-path", "#{var}/meilisearch/data.ms"] + keep_alive false + working_dir var + log_path var/"log/meilisearch.log" + error_log_path var/"log/meilisearch.log" + end + + test do + port = free_port + fork { exec bin/"meilisearch", "--http-addr", "127.0.0.1:#{port}" } + sleep_count = Hardware::CPU.arm? ? 3 : 10 + sleep sleep_count + output = shell_output("curl -s 127.0.0.1:#{port}/version") + assert_match version.to_s, output + end +end diff --git a/Formula/m/melange.rb b/Formula/m/melange.rb new file mode 100644 index 0000000000000..c60633ae500e6 --- /dev/null +++ b/Formula/m/melange.rb @@ -0,0 +1,86 @@ +class Melange < Formula + desc "Build APKs from source code" + homepage "https://github.com/chainguard-dev/melange" + url "https://github.com/chainguard-dev/melange/archive/refs/tags/v0.32.0.tar.gz" + sha256 "c9a58491d22db18c0bbd893da2e2ef5f3b2d6bed3c13c15d89342e5632e2cc69" + license "Apache-2.0" + head "https://github.com/chainguard-dev/melange.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e9df3b3c21f557dbfa1e2f51af82abbbd6f6838eeb9aa0706e7796f070f0b89f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a6c82adf62a39ef47bcde2cc462e523f4b3b9c83d85102832b720b984a4d446" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f549ce93e08023fbbd7a83d373f0fbc0232d95bc1bde3d906c469f016e15ab95" + sha256 cellar: :any_skip_relocation, sonoma: "92aacb76eacc41a406e6e38cf813d23a7ceafde1792cf7d62715055562488b4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d255af5ed396c9e5b78e20bbc6225a44e2e44dd1f8c99283bc3c47927d7418eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a1f93502e2f8d1cc8ec0901caac908f582b6d08175743d663b0eb03a6e53e92" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/release-utils/version.gitVersion=#{version} + -X sigs.k8s.io/release-utils/version.gitCommit=brew + -X sigs.k8s.io/release-utils/version.gitTreeState=clean + -X sigs.k8s.io/release-utils/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"melange", "completion") + end + + test do + (testpath/"test.yml").write <<~YAML + package: + name: hello + version: 2.12 + epoch: 0 + description: "the GNU hello world program" + copyright: + - paths: + - "*" + attestation: | + Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005, + 2006, 2007, 2008, 2010, 2011, 2013, 2014, 2022 Free Software Foundation, + Inc. + license: GPL-3.0-or-later + dependencies: + runtime: + + environment: + contents: + repositories: + - https://dl-cdn.alpinelinux.org/alpine/edge/main + packages: + - alpine-baselayout-data + - busybox + - build-base + - scanelf + - ssl_client + - ca-certificates-bundle + + pipeline: + - uses: fetch + with: + uri: https://ftp.gnu.org/gnu/hello/hello-${{package.version}}.tar.gz + expected-sha256: cf04af86dc085268c5f4470fbae49b18afbc221b78096aab842d934a76bad0ab + - uses: autoconf/configure + - uses: autoconf/make + - uses: autoconf/make-install + - uses: strip + YAML + + assert_equal "hello-2.12-r0", shell_output("#{bin}/melange package-version #{testpath}/test.yml") + + system bin/"melange", "keygen" + assert_path_exists testpath/"melange.rsa" + + assert_match version.to_s, shell_output("#{bin}/melange version 2>&1") + end +end diff --git a/Formula/m/meli.rb b/Formula/m/meli.rb new file mode 100644 index 0000000000000..21a30d4f989ce --- /dev/null +++ b/Formula/m/meli.rb @@ -0,0 +1,45 @@ +class Meli < Formula + desc "Terminal e-mail client and e-mail client library" + homepage "https://meli-email.org/" + url "https://git.meli-email.org/meli/meli/archive/v0.8.12.tar.gz" + sha256 "6f03f50b7e3ee29d34716f31d77e75eca72ab651d67ea1de2dffc5813565180f" + license "GPL-3.0-or-later" + + livecheck do + url "https://git.meli-email.org/meli/meli.git" + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4df6b386819ad120f3a769b825ed9ce061ba27075a75b103039f3f7eede3bccb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ae5ed00801662f9da4b1a479344585e6d0480cee748dcacdb883b7ea2bb66e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dac2ad7eb3a1e48bda3441a6c9e0c2f63bf2c0d1ea126e88fb75de3d56d31eca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "393461b613aac77018e34a3fa8f61a5fabb3e8d8cc9d3c05e2ab8e6a5d98e8fc" + sha256 cellar: :any_skip_relocation, sonoma: "e12530beb8d7459163493fa1023db9e935166f2da8462c12d4045cd70634ccef" + sha256 cellar: :any_skip_relocation, ventura: "f9990332e7df125ca426b2365e96e29f58abf8ddef887e0ebf124e22b0683f18" + sha256 cellar: :any_skip_relocation, arm64_linux: "10c9adf5564a3dc95ce9739b6b39d6fbba9ea4f41f79378fa26446223505e0d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56eff4ef3a14f017e0754562442c901e980c8b7ab10d2be634148dfe36cc9ec6" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "meli") + + man1.install "meli/docs/meli.1" + man5.install Dir["meli/docs/*.5"] + man7.install "meli/docs/meli.7" + end + + test do + output = shell_output("#{bin}/meli print-config-path") + assert_match (testpath/".config/meli/config.toml").to_s, output + + assert_match version.to_s, shell_output("#{bin}/meli --version") + end +end diff --git a/Formula/m/melody.rb b/Formula/m/melody.rb new file mode 100644 index 0000000000000..ff8bf0a56a75c --- /dev/null +++ b/Formula/m/melody.rb @@ -0,0 +1,33 @@ +class Melody < Formula + desc "Language that compiles to regular expressions" + homepage "https://yoav-lavi.github.io/melody/book" + url "https://github.com/yoav-lavi/melody/archive/refs/tags/v0.20.0.tar.gz" + sha256 "b0dd1b0ecc1af97f09f98a9a741e0dddbf92380c9980140140ff1b4262b9a44a" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f63d6fddea834cd2fd42b11576a634d9b9b22b43029483b522bec09ee4d672c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "02ae5a9796e29ff3f0f88a96e957b5c2495a12f27d513eef8ffbf07f07cca8c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d329bc93d86774235dcd465aab7713a214809943998f6b13f4410a72ed44f427" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f6f38b37a164b96b64c1dfbf510ce9c3bfdf714aa78ed019f21ec1f1fae8e6a8" + sha256 cellar: :any_skip_relocation, sonoma: "4ff223f27cb843cbfb6742debd3f37a903ef15e837c58ba6983b7028b151cfb6" + sha256 cellar: :any_skip_relocation, ventura: "fc4c23ef29bb5907b1f9888ce9e5d676f30c95d2d5b85392c8ed65317d38a6d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "aee430215f65ed5d664571ecdbed0e733a1eabb9316d1d94b5c168333c008ffa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "486bf0de59a35bd2fcad51c0f00156f8eeeba5db3e27b246a5d79105f195a20f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/melody_cli") + + generate_completions_from_executable(bin/"melody", "--generate-completions") + end + + test do + mdy = "regex.mdy" + File.write mdy, '"#"; some of ;' + assert_match "#\\w+", shell_output("#{bin}/melody --no-color #{mdy}") + end +end diff --git a/Formula/m/melt.rb b/Formula/m/melt.rb new file mode 100644 index 0000000000000..28cb97dd865ed --- /dev/null +++ b/Formula/m/melt.rb @@ -0,0 +1,32 @@ +class Melt < Formula + desc "Backup and restore Ed25519 SSH keys with seed words" + homepage "https://github.com/charmbracelet/melt" + url "https://github.com/charmbracelet/melt/archive/refs/tags/v0.6.2.tar.gz" + sha256 "e6e7d1f3eba506ac7e310bbc497687e7e4e457fa685843dcf1ba00349614bfdc" + license "MIT" + head "https://github.com/charmbracelet/melt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9867029e68c10f409404183ef028dbf0b392117f38fa4dcc8dfe7cbf944a2c6b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "547013e6780070ab0e514c03cad053fcff034ed2bd938b43bb5ece9b71424274" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "547013e6780070ab0e514c03cad053fcff034ed2bd938b43bb5ece9b71424274" + sha256 cellar: :any_skip_relocation, arm64_ventura: "547013e6780070ab0e514c03cad053fcff034ed2bd938b43bb5ece9b71424274" + sha256 cellar: :any_skip_relocation, sonoma: "01a243d60bb828e77591ce38242f3e63097adff342a71b87eb8864a17234141b" + sha256 cellar: :any_skip_relocation, ventura: "01a243d60bb828e77591ce38242f3e63097adff342a71b87eb8864a17234141b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ffc976877557e3d59a0c68687554f754675e683848fec8bdbc7466a257327e9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ea2cb7ae00d2065de9d82efa15f5bbdba7f01a2424f83238a9635ecf4a4cc25" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/melt" + + generate_completions_from_executable(bin/"melt", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + output = shell_output("#{bin}/melt restore --seed \"seed\" ./restored_id25519 2>&1", 1) + assert_match "Error: failed to get seed from mnemonic: Invalid mnenomic", output + end +end diff --git a/Formula/m/memcache-top.rb b/Formula/m/memcache-top.rb new file mode 100644 index 0000000000000..a6ee38b8b5c46 --- /dev/null +++ b/Formula/m/memcache-top.rb @@ -0,0 +1,18 @@ +class MemcacheTop < Formula + desc "Grab real-time stats from memcache" + homepage "https://code.google.com/archive/p/memcache-top/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/memcache-top/memcache-top-v0.6" + sha256 "d5f896a9e46a92988b782e340416312cc480261ce8a5818db45ccd0da8a0f22a" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "087a748b42b751770abe12ce9529e0e55d96b9f69f28ee7b6951e099271b8f3e" + end + + def install + bin.install "memcache-top-v#{version}" => "memcache-top" + end +end diff --git a/Formula/m/memcached.rb b/Formula/m/memcached.rb new file mode 100644 index 0000000000000..8b437ce86d94d --- /dev/null +++ b/Formula/m/memcached.rb @@ -0,0 +1,56 @@ +class Memcached < Formula + desc "High performance, distributed memory object caching system" + homepage "https://memcached.org/" + url "https://www.memcached.org/files/memcached-1.6.39.tar.gz" + sha256 "23e5507e933b15463161d4c5d3921b0c5f340b542d6edd7f6c5e17c34f11a363" + license "BSD-3-Clause" + head "https://github.com/memcached/memcached.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?memcached[._-]v?(\d+(?:\.\d+){2,})\./i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6a850d1d9911bd38c3f04ddedcbcc0f8442dcf931c16bbbb11e9433992d1ce89" + sha256 cellar: :any, arm64_sequoia: "31337325dcc134bb77d83d33b7f6a3d99a0f9bade5ab749882034851f1761124" + sha256 cellar: :any, arm64_sonoma: "77963530e4940c64fb42637f6291f756af1ed9aa4700aac5186d624b3cb979ca" + sha256 cellar: :any, arm64_ventura: "552c05a69b61918075ba9db6d67fc3b5638d8c8eca1322f9905366d925f30853" + sha256 cellar: :any, sonoma: "8576506edee1fcefee427ebd62b1f439f4600d05ad1fe7a370760e47b5265c68" + sha256 cellar: :any, ventura: "9456e42982b53252e44ae3713f42d73d52d6c14065ec3d6dd4fec66fda5a22fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d2b8d7ca02e02bf98134d3b431381a1988d6f8c71aea024554d97ca87fd93a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce90e5a036314fde45812076c56c18d80805c08e3be5fd1162b56a499e87824f" + end + + depends_on "libevent" + depends_on "openssl@3" + + def install + system "./configure", "--prefix=#{prefix}", "--disable-coverage", "--enable-tls" + system "make", "install" + end + + service do + run [opt_bin/"memcached", "-l", "localhost"] + working_dir HOMEBREW_PREFIX + keep_alive true + run_type :immediate + end + + test do + pidfile = testpath/"memcached.pid" + port = free_port + args = %W[ + --listen=127.0.0.1 + --port=#{port} + --daemon + --pidfile=#{pidfile} + ] + args << "--user=#{ENV["USER"]}" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + system bin/"memcached", *args + sleep 1 + assert_path_exists pidfile, "Failed to start memcached daemon" + pid = (testpath/"memcached.pid").read.chomp.to_i + Process.kill "TERM", pid + end +end diff --git a/Formula/m/memcacheq.rb b/Formula/m/memcacheq.rb new file mode 100644 index 0000000000000..7812a22446422 --- /dev/null +++ b/Formula/m/memcacheq.rb @@ -0,0 +1,46 @@ +class Memcacheq < Formula + desc "Queue service for memcache" + homepage "https://github.com/stvchu/memcacheq" + url "https://github.com/stvchu/memcacheq/archive/refs/tags/v0.2.1.tar.gz" + sha256 "ace33313568959b5a301dda491f63af09793987b73fd15abd3fb613829eda07e" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "657efc2a568e13bb0f9d2197f5cb084e56c1c55aa99cc62d45e51d199ffb0a93" + sha256 cellar: :any, arm64_sequoia: "2fb49de889de4fa7c037d8b01d7c75a5bc1f8e2ba57658fa6a936d108f2155fb" + sha256 cellar: :any, arm64_sonoma: "38ef101728df7bd59257cce89d43a941e531271b1fbed3689fd5af69bb05ac97" + sha256 cellar: :any, arm64_ventura: "3248b999748438d68ac36a56bdb323f3189e4b5e08c56a5b43d47d705b9205aa" + sha256 cellar: :any, sonoma: "4a3c9a2360a592502413719b07c297802b3d2e7b210e4409c066fb03423d4eb0" + sha256 cellar: :any, ventura: "657bb3ec6a8a6af167b94e3d07ec5c4dd81ce3641475d7dcf853b3586f18c08a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8f80a059505a53588ed5a7abe98135a23cb30535b444bd4bf0b28e504ae6453" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57b2c80f352cc9e1d88b5f1e643e1c2e67436e1259a0353bac11ffca103e7af9" + end + + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL incompatibility + depends_on "libevent" + + def install + ENV.append "CFLAGS", "-std=gnu89" + system "./configure", "--enable-threads", *std_configure_args + system "make", "install" + end + + test do + port = free_port + pid = spawn(bin/"memcacheq", "-p", port.to_s, "-H", testpath) + sleep 5 + TCPSocket.open("localhost", port) do |sock| + sock.puts("set brew 2 0 3\r\n100\r\n") + assert_equal "STORED\r\n", sock.gets + sock.puts("stats queue\r\n") + assert_equal "STAT brew 1/0\r\n", sock.gets + ensure + sock.close + end + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/m/memray.rb b/Formula/m/memray.rb new file mode 100644 index 0000000000000..760f28a84856b --- /dev/null +++ b/Formula/m/memray.rb @@ -0,0 +1,122 @@ +class Memray < Formula + include Language::Python::Virtualenv + + desc "Memory profiler for Python applications" + homepage "https://bloomberg.github.io/memray/" + url "https://files.pythonhosted.org/packages/36/18/5df5995a7b142e12ab194f4b2fd1473efd51f4f622dfe47f3c013c3c11f7/memray-1.19.1.tar.gz" + sha256 "7fcf306eae2c00144920b01913f42fa7f235af7a80fa3226ab124672a5cb1d8f" + license "Apache-2.0" + + no_autobump! because: "`update-python-resources` cannot update resource blocks" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d2d072fad3df8ecf71559500dd07394143b8049f6f2ac0fa6e7a68c448409dd9" + sha256 cellar: :any, arm64_sequoia: "435b44b2071742f5b6dd01b1f3c11e5e1c1f3766e02dcc6df71b42ecab24d385" + sha256 cellar: :any, arm64_sonoma: "df666e1456e9cb1eb5dc2ade2e7b502291bd24d1821eae2d2126bdb010061e9f" + sha256 cellar: :any, sonoma: "39e3599c7842e1d7e4a317f4276cc2de6ad778208825a2ead26b3719a035ee3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4bac4073dc761cb244574af394a24ee6c7018cc0315ec223702808b4dfaf294a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d75359949ca5cb8466cd6bab8cbfc9af0236bea2bd2972c32ca8139892260729" + end + + depends_on "lz4" + depends_on "python@3.14" + + on_linux do + depends_on "pkgconf" => :build # for libdebuginfod + depends_on "curl" # for libdebuginfod + depends_on "elfutils" # for libdebuginfod + depends_on "json-c" # for libdebuginfod + depends_on "libunwind" + + # TODO: Consider creating a formula for (lib)debuginfod + resource "elfutils" do + url "https://sourceware.org/elfutils/ftp/0.193/elfutils-0.193.tar.bz2" + sha256 "7857f44b624f4d8d421df851aaae7b1402cfe6bcdd2d8049f15fc07d3dde7635" + end + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/ff/51/51a0863339c4c3fa204f43044e52dfd688a7ee2ba2c987e021acc9583a42/textual-6.3.0.tar.gz" + sha256 "a89c557fa740611551dcf4f93643f33853eca488183ef5882200dde8e94315e8" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + def install + if OS.linux? + without = "elfutils" + libelf = Formula["elfutils"].opt_lib/"libelf.so" + resource("elfutils").stage do + # https://github.com/bloomberg/memray/blob/main/pyproject.toml#L96-L104 + system "./configure", "--disable-debuginfod", + "--disable-nls", + "--disable-silent-rules", + "--enable-libdebuginfod", + *std_configure_args(prefix: libexec) + system "make", "-C", "debuginfod", "install", "bin_PROGRAMS=", "libelf=#{libelf}" + ENV.append "LDFLAGS", "-L#{libexec}/lib -Wl,-rpath,#{libexec}/lib" + end + end + virtualenv_install_with_resources(without:) + end + + test do + system bin/"memray", "run", "--output", "output.bin", "-c", "print()" + assert_path_exists testpath/"output.bin" + + assert_match version.to_s, shell_output("#{bin}/memray --version") + end +end diff --git a/Formula/m/memtester.rb b/Formula/m/memtester.rb new file mode 100644 index 0000000000000..4e30ded43154a --- /dev/null +++ b/Formula/m/memtester.rb @@ -0,0 +1,38 @@ +class Memtester < Formula + desc "Utility for testing the memory subsystem" + homepage "https://pyropus.ca/software/memtester/" + url "https://pyropus.ca/software/memtester/old-versions/memtester-4.7.1.tar.gz", using: :homebrew_curl + sha256 "e427de663f7bd22d1ebee8af12506a852c010bd4fcbca1e0e6b02972d298b5bb" + license "GPL-2.0-only" + + # Despite the name, all the versions are seemingly found on this page. If this + # doesn't end up being true over time, we can check the homepage instead. + livecheck do + url "https://pyropus.ca/software/memtester/old-versions/" + regex(/href=.*?memtester[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9c3829b3c8330abfec948e52e5bae58c7daf8e26bd45e4f62110b674115c419" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf486cb5e72380acf5f3b1396af8d854151452be5be0dc5103322dd27bbbec81" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0fb85d1c32821cb299a52a432788a47a12c9f10b683f7a1eef67c8d135eaeb31" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db421b0bd918efef4c65a5fda3c6f87e979d0a3d0af630c09ad1369f835e1729" + sha256 cellar: :any_skip_relocation, sonoma: "dafebaa8af7e2774e55142b2b6c8ea9e741c6c69c2c757f6deecdfc5574d0379" + sha256 cellar: :any_skip_relocation, ventura: "5429e15d860dc1dc4339ed93beb76756f4b123108c20334a1bc4820043c63d34" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8c1b9a3a3a300d787761fbb46a118efdf1d70a8d1ab686832207e76c5e2a2f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09e87a3a5d5b2b187c4e48b815f6e3bd5b70a2e1024add16f0c3ef12952c91e3" + end + + def install + inreplace "Makefile" do |s| + s.change_make_var! "INSTALLPATH", prefix + s.gsub! "man/man8", "share/man/man8" + end + inreplace "conf-ld", " -s", "" + system "make", "install" + end + + test do + system bin/"memtester", "1", "1" + end +end diff --git a/Formula/m/memtier_benchmark.rb b/Formula/m/memtier_benchmark.rb new file mode 100644 index 0000000000000..8dbe92cc9e280 --- /dev/null +++ b/Formula/m/memtier_benchmark.rb @@ -0,0 +1,47 @@ +class MemtierBenchmark < Formula + desc "Redis and Memcache traffic generation and benchmarking tool" + homepage "https://github.com/RedisLabs/memtier_benchmark" + url "https://github.com/RedisLabs/memtier_benchmark/archive/refs/tags/2.2.0.tar.gz" + sha256 "73bcdaca9a5e9c87c6f060637125885f8a01f178061fd67cd05f9da762d3490d" + license all_of: [ + "GPL-2.0-only", + any_of: ["CC0-1.0", "BSD-2-Clause"], # deps/hdr_histogram + ] + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "fe41e5410fbd6119297a0cd33096ab7e7b557f8fd00ef8c415f579659170abd9" + sha256 cellar: :any, arm64_sequoia: "2a7a858f3a3adef5a4b970642b090536e1debb3766cd254acd8b627e4d18747b" + sha256 cellar: :any, arm64_sonoma: "84eafcf539ad203a2eb7044bff2632301490e02951d8b019a41ae4186cacc0ef" + sha256 cellar: :any, sonoma: "6544f4bc25c790be6f0f93249580a05aca7d3f92d7f457a5430dfa127fa59b61" + sha256 cellar: :any_skip_relocation, arm64_linux: "291b2c1df8539b7e33f65c459a159113808c173bc767393531363d060a149821" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ff298123c9b8d1d0fd2620edb33f388262d0502e88c0565958f754af714336d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # Backport removal of pcre dependency + patch do + url "https://github.com/RedisLabs/memtier_benchmark/commit/f3545b0f59ae21ad8b702aec9d15aacbccdbc41b.patch?full_index=1" + sha256 "f78c13a299e7f4dbcd5926b0e111f06143e187d915d7811e4290f12125deab65" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/memtier_benchmark --version") + assert_match "ALL STATS", shell_output("#{bin}/memtier_benchmark -c 1 -t 1") + end +end diff --git a/Formula/m/mender-artifact.rb b/Formula/m/mender-artifact.rb new file mode 100644 index 0000000000000..433d3b92c43bb --- /dev/null +++ b/Formula/m/mender-artifact.rb @@ -0,0 +1,70 @@ +class MenderArtifact < Formula + desc "CLI tool for managing Mender artifact files" + homepage "https://mender.io" + url "https://github.com/mendersoftware/mender-artifact/archive/refs/tags/4.2.0.tar.gz" + sha256 "14ba008df9b24321de72821de394bc4326e4dd9e17ed7c111340689e90d8b596" + license "Apache-2.0" + + # exclude tags like `3.4.0b1` and `internal-v2020.02` + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9f1ed0f0e51051da55cb919c1a4125a767a97f326d9a0898d1c7ed0cbd9ec303" + sha256 cellar: :any, arm64_sequoia: "f1ff305b7019e60a2da814e997f604b9e8d2c852a324e486dfc370ca532e4f79" + sha256 cellar: :any, arm64_sonoma: "e2596b83eb8c1ff193d4df5e57ff1b3eeabba5a270885a8e2e5c86e2295966b7" + sha256 cellar: :any, sonoma: "90a3ba363fd15ef0a110c87f8434d017eb1c092774119570535ca02f119bedc3" + sha256 cellar: :any_skip_relocation, arm64_linux: "6883b8d3f4b8b6b571d5b8b1eb0df19594651b33af7777a2c63ad48521dd300d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bc04e3ccb4cd4838c1cbcf2f8e07906346c28fbb45d766f526ead3f66da51c0" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "dosfstools" # fsck.vfat for vfat file systems in artifacts + depends_on "e2fsprogs" # manipulation of ext4 file systems in artifacts + depends_on "mtools" # manipulation of vfat file systems in artifacts + depends_on "openssl@3" + + def install + # Workaround to avoid patchelf corruption when cgo is required (for github.com/mendersoftware/openssl) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + ldflags = "-s -w -X github.com/mendersoftware/mender-artifact/cli.Version=#{version}" + system "go", "build", *std_go_args(ldflags: ldflags) + + # mender-artifact doesn't support autocomplete generation so we have to + # install the individual files instead of using + # generate_completions_from_executable() + zsh_completion.install "autocomplete/zsh_autocomplete" => "_mender-artifact" + bash_completion.install "autocomplete/bash_autocomplete" => "mender-artifact" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mender-artifact --version") + + # Create a test artifact + (testpath/"rootfs.ext4").write("") + + output = shell_output("#{bin}/mender-artifact write rootfs-image " \ + "-t beaglebone -n release-1 -f rootfs.ext4 -o artifact.mender 2>&1") + assert_match "Writing Artifact...", output + assert_path_exists testpath/"artifact.mender" + + # Verify the artifact contents + output = shell_output("#{bin}/mender-artifact read artifact.mender") + assert_match <<~EOS, output + Mender Artifact: + Name: release-1 + Format: mender + Version: 3 + Signature: no signature + Compatible devices: [beaglebone] + EOS + end +end diff --git a/Formula/m/mender-cli.rb b/Formula/m/mender-cli.rb new file mode 100644 index 0000000000000..550f271f44e77 --- /dev/null +++ b/Formula/m/mender-cli.rb @@ -0,0 +1,56 @@ +class MenderCli < Formula + desc "General-purpose CLI tool for the Mender backend" + homepage "https://mender.io" + url "https://github.com/mendersoftware/mender-cli/archive/refs/tags/1.12.0.tar.gz" + sha256 "7b68fdeef96a99ee4560cb9dccd673658b27e2f3a9be2e3451d204c50395caa0" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ee2b581f8602959a93a3aa84c52c36d0ccf9ea1a2db7249d68e7131c5f6dba5e" + sha256 cellar: :any, arm64_sequoia: "0f6684645028a62edf8e62d7dfb7845b7aedc474830345cea55e635abf7efe75" + sha256 cellar: :any, arm64_sonoma: "fe129f50a5e78d44d178a5e802e853f5de0e164a0dd7cb8642cd1bc08423e0c9" + sha256 cellar: :any, arm64_ventura: "c76bb683aab7e297d331c780d81520a954fbcd3e331370290f0fd6ef8764738a" + sha256 cellar: :any, sonoma: "e804a707060777c0a9ebe51378368a7321097a3ca95171b5f0f06e16dfe33be8" + sha256 cellar: :any, ventura: "6c5da0527d144a99695189ff297fb626d8fe9c7115488dd68a0ccd65ead01fa9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea88f82aff0c7dbc2996841254048b10039a4cfd0122427b79d611013e038917" + sha256 cellar: :any_skip_relocation, x86_64_linux: "694e117ca7bade40819fb48b43080babbc1a439bcf111ae61310f710ee61fb5d" + end + + depends_on "go" => :build + depends_on "xz" + + def install + ldflags = "-s -w -X github.com/mendersoftware/mender-cli/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"mender-cli", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/mender-cli --version") + + # Try to log in with a fake config + (testpath/".mender-clirc").write <<~EOS + { + "server": "https://nosuch.example.com", + "username": "foo", + "password": "bar" + } + EOS + output = shell_output("#{bin}/mender-cli login 2>&1", 1) + assert_match "Using configuration file: " + (testpath/".mender-clirc"), output + assert_match "FAILURE: POST /auth/login request failed", output + + # Try to list devices not being logged in + output = shell_output("#{bin}/mender-cli devices list 2>&1", 1) + assert_match "Using configuration file: " + (testpath/".mender-clirc"), output + assert_match "FAILURE: Please Login first:", output + end +end diff --git a/Formula/m/menhir.rb b/Formula/m/menhir.rb new file mode 100644 index 0000000000000..628272aba55a1 --- /dev/null +++ b/Formula/m/menhir.rb @@ -0,0 +1,48 @@ +class Menhir < Formula + desc "LR(1) parser generator for the OCaml programming language" + homepage "http://cristal.inria.fr/~fpottier/menhir" + url "https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/menhir-20250912.tar.bz2" + sha256 "e69d5133d37579a481775e6e8bd0232f1ca92d582234d6f3760855b99dc8ffb5" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e529725dc34ba991c8b1305a39b76b7c38a21a8c872370289a0ed4f98b478a9" + sha256 cellar: :any, arm64_sequoia: "547e0d082c253278979a586c24cc647d2ccab641148077c6c25d073080b75b5c" + sha256 cellar: :any, arm64_sonoma: "bdfcf60b1735fd0bd6b73ebcf8ddb9d1fb4942dc4c3da793a01494f5e8cde807" + sha256 cellar: :any, sonoma: "05c5e81dfaa5fee6357ba4d996c18f050c6a33c1705855034efd582e6b8fa38c" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9fe973e5b0bdb53ecc837ea6aaeaefae1a79f72c9898c2e684ef1e02e169903" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f2dcb8edac670d5ab54df139e450bf73a2cfe0af79677c691472e2df88dfe04" + end + + depends_on "dune" => :build + depends_on "ocamlbuild" => :build + depends_on "ocaml" + + def install + system "dune", "build", "@install" + system "dune", "install", "--prefix=#{prefix}", "--mandir=#{man}" + end + + test do + (testpath/"test.mly").write <<~EOS + %token PLUS TIMES EOF + %left PLUS + %left TIMES + %token INT + %start prog + %% + + prog: x=exp EOF { x } + + exp: x = INT { x } + | lhs = exp; op = op; rhs = exp { op lhs rhs } + + %inline op: PLUS { fun x y -> x + y } + | TIMES { fun x y -> x * y } + EOS + + system bin/"menhir", "--dump", "--explain", "--infer", "test.mly" + assert_path_exists testpath/"test.ml" + assert_path_exists testpath/"test.mli" + end +end diff --git a/Formula/m/mentat.rb b/Formula/m/mentat.rb new file mode 100644 index 0000000000000..a9f117a642c36 --- /dev/null +++ b/Formula/m/mentat.rb @@ -0,0 +1,299 @@ +class Mentat < Formula + include Language::Python::Virtualenv + + desc "Coding assistant that leverages GPT-4 to write code" + homepage "https://www.mentat.ai" + url "https://files.pythonhosted.org/packages/e0/8b/a808d6663065e3b446d3be521d7836f774f3b39bdd30f786d093aca383b6/mentat-1.0.8.tar.gz" + sha256 "81679055448a495c3e7e55eeb8b59373dc0658cea6b2549d0ae48d26937494ba" + license "Apache-2.0" + revision 4 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "d38a4611394ab643c638bc0c116c22f152ced05c49751e30326950167063f5e5" + sha256 cellar: :any, arm64_sequoia: "a765e0fdac4d8b3595a24aaf770c00a8dd67f12a51c219455532b9dd789bf6ab" + sha256 cellar: :any, arm64_sonoma: "c2977668fae924ded06accde2ee9b35f05eab736258dd3ec9d689408f2097e43" + sha256 cellar: :any, sonoma: "f3e60fd8c8a59ae88716240c841496efaa087a7b430e45c626322b0b4e218ead" + sha256 cellar: :any_skip_relocation, arm64_linux: "16b2d3424df2c18d8363f6417f8a874a79ae81358fa9b31e3a83321bd69eacb9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0186ccf04b611ad608320b72993b27c50a2d05f4f7d4b21336c1a8fcd3f603b" + end + + # https://github.com/AbanteAI/archive-old-cli-mentat/commit/901f0726418e9e9a66bec78facecf3a45541002d + deprecate! date: "2025-01-10", because: :repo_archived + + depends_on "rust" => :build # for tiktoken + depends_on "certifi" => :no_linkage + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libffi" + + # formula not compatible with pydantic-core 2.41.4 + + pypi_packages exclude_packages: %w[certifi numpy pillow pytest pytest-asyncio pytest-mock + pytest-reportlog rpds-py] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/28/99/2dfd53fd55ce9838e6ff2d4dac20ce58263798bd1a0dbe18b3a9af3fcfce/anyio-3.7.1.tar.gz" + sha256 "44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/97/90/81f95d5f705be17872843536b1868f351805acf6971251ff07c1b8334dbb/attrs-23.1.0.tar.gz" + sha256 "6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015" + end + + resource "backoff" do + url "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz" + sha256 "03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "fire" do + url "https://files.pythonhosted.org/packages/94/ed/3b9a10605163f48517931083aee8364d4d6d3bb1aa9b75eb0a4a5e9fbfc1/fire-0.5.0.tar.gz" + sha256 "a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/c6/33/5e633d3a8b3dbec3696415960ed30f6718ed04ef423ce0fbc6512a92fa9a/GitPython-3.1.37.tar.gz" + sha256 "f9b9ddc0761c125d5780eab2d64be4873fc6817c2899cbcb34b02344bdc7bc54" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/7a/ff/75c28576a1d900e87eb6335b063fab47a8ef3c8b4d88524c4bf78f670cce/Jinja2-3.1.2.tar.gz" + sha256 "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/1c/3c/a92cf8844ec4bf3211a42926ed5cab72f18d32bb3a0155a759783b38d6b5/openai-1.3.0.tar.gz" + sha256 "51d9ccd0611fd8567ff595e8a58685c20a4710763d42f6bd968e1fb630993f25" + end + + resource "outcome" do + url "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz" + sha256 "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/9a/02/76cadde6135986dc1e82e2928f35ebeb5a1af805e2527fe466285593a2ba/prompt_toolkit-3.0.39.tar.gz" + sha256 "04505ade687dc26dc4284b1ad19a83be2f2afe83e7a828ace0c72f3a1df72aac" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/c3/da/b8a7ee04378a53f6fefefc0c5e05570a3ebfdfa0523a878bcd3b475683ee/pydantic-2.12.0.tar.gz" + sha256 "c1a077e6270dbfb37bfd8b498b3981e2bb18f68103720e51fa6c306a5a9af563" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/7d/14/12b4a0d2b0b10d8e1d9a24ad94e7bbb43335eaf29c0c4e57860e8a30734a/pydantic_core-2.41.1.tar.gz" + sha256 "1ad375859a6d8c356b7704ec0f547a58e82ee80bb41baa811ad710e124bc8f2f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/89/6b/2114e54b290824197006e41be3f9bbe1a26e9c39d1f5fa20a6d62945a0b3/Pygments-2.15.1.tar.gz" + sha256 "8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/31/06/1ef763af20d0572c032fa22882cfbfb005fba6e7300715a37840858c919e/python-dotenv-1.0.0.tar.gz" + sha256 "a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "selenium" do + url "https://files.pythonhosted.org/packages/04/44/e86a333a57dd81739126f78c73f2243af2bfb728787a7c66046eb923c02e/selenium-4.15.2.tar.gz" + sha256 "22eab5a1724c73d51b240a69ca702997b717eee4ba1f6065bf5d6b44dba01d48" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/00/e5/cf944fd98a68dcde5567949061322577200222d4a897a471e8eaafdbaed4/sentry-sdk-1.34.0.tar.gz" + sha256 "e5d0d2b25931d88fa10986da59d941ac6037f742ab6ff2fce4143a27981d60c3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "sounddevice" do + url "https://files.pythonhosted.org/packages/d8/3b/c989bde59a1eb333eb2a692f508a09408df562a3f99047a2d030e160cb11/sounddevice-0.4.6.tar.gz" + sha256 "3236b78f15f0415bdf006a620cef073d0c0522851d66f4a961ed6d8eb1482fe9" + end + + resource "soundfile" do + url "https://files.pythonhosted.org/packages/6f/96/5ff33900998bad58d5381fd1acfcdac11cbea4f08fc72ac1dc25ffb13f6a/soundfile-0.12.1.tar.gz" + sha256 "e8e1017b2cf1dda767aef19d2fd9ee5ebe07e050d430f77a0a7c66ba08b8cdae" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/b8/85/147a0529b4e80b6b9d021ca8db3a820fcac53ec7374b87073d004aaf444c/termcolor-2.3.0.tar.gz" + sha256 "b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a" + end + + resource "tiktoken" do + url "https://files.pythonhosted.org/packages/9f/88/77a86f915a81449156375b7538c94105a34bebf00838462c9d3fced490e9/tiktoken-0.4.0.tar.gz" + sha256 "59b20a819969735b48161ced9b92f05dc4519c17be4015cfb73b65270a243620" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/62/06/d5604a70d160f6a6ca5fd2ba25597c24abd5c5ca5f437263d177ac242308/tqdm-4.66.1.tar.gz" + sha256 "d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/8a/f3/07c152213222c615fe2391b8e1fea0f5af83599219050a549c20fcbd9ba2/trio-0.24.0.tar.gz" + sha256 "ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d" + end + + resource "trio-websocket" do + url "https://files.pythonhosted.org/packages/d1/3c/8b4358e81f2f2cfe71b66a267f023a91db20a817b9425dd964873796980a/trio_websocket-0.12.2.tar.gz" + sha256 "22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "webdriver-manager" do + url "https://files.pythonhosted.org/packages/e5/50/2958aa25647e86334b30b4f8c819cc4fd5f15d3d0115042a4c924ec6e94d/webdriver_manager-4.0.1.tar.gz" + sha256 "25ec177c6a2ce9c02fb8046f1b2732701a9418d6a977967bb065d840a3175d87" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + def install + # Fix removed importlib.abc classes + inreplace "mentat/utils.py", "from importlib.abc import Traversable", + "from importlib.resources.abc import Traversable" + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/mentat 2>&1") + assert_match "No OpenAI api key detected", output + end +end diff --git a/Formula/m/mercurial.rb b/Formula/m/mercurial.rb new file mode 100644 index 0000000000000..cf5af19b15bd8 --- /dev/null +++ b/Formula/m/mercurial.rb @@ -0,0 +1,78 @@ +# No head build supported; if you need head builds of Mercurial, do so outside +# of Homebrew. +class Mercurial < Formula + desc "Scalable distributed version control system" + homepage "https://mercurial-scm.org/" + url "https://www.mercurial-scm.org/release/mercurial-7.1.1.tar.gz" + sha256 "47cf66ba89c175536faf844c9b4cd962eb432afb516c073e51f436bf3f0bc148" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://www.mercurial-scm.org/release/" + regex(/href=.*?mercurial[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "2f7e2500d7d2f23c9db3b435a21efbbcad3bd0260be9c381bfb7c4c68076b353" + sha256 arm64_sequoia: "f2b94f57c6709e8422db56881725a16efd0ac3749ae3a0b8628307c0363b2a44" + sha256 arm64_sonoma: "2283ab948d4379a962d06b1619acc633bd6c197db43a26feeb27df6ad95723f2" + sha256 tahoe: "94a4f8314a9fc356f71e4fbde21d06a71b230e0789b767ca96423e8b0cb28a20" + sha256 sequoia: "fdc8f52368efbe545583bef6776e5a0cb258e8a0c24dab30ab1a61d19da2de0f" + sha256 sonoma: "b2260380a2ac9206c6492c4e5ee88ec545369fc73bca017758bc6621372edc99" + sha256 arm64_linux: "39924f36d773e519404c36192884abc7eed6a1272dc69b87e4aafc9274743f77" + sha256 x86_64_linux: "1357b805ee2f04221bb558a999ca0ae4645e7002aa6b4f8a460e4693c736ecb3" + end + + depends_on "python@3.14" + + def install + python3 = "python3.14" + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + + # Install chg (see https://www.mercurial-scm.org/wiki/CHg) + system "make", "-C", "contrib/chg", "install", "PREFIX=#{prefix}", "HGPATH=#{bin}/hg", "HG=#{bin}/hg" + + # Configure a nicer default pager + (buildpath/"hgrc").write <<~EOS + [pager] + pager = less -FRX + EOS + + (etc/"mercurial").install "hgrc" + + # Install man pages, which come pre-built in source releases + man1.install "doc/hg.1" + man5.install "doc/hgignore.5", "doc/hgrc.5" + + # Move the bash completion script + bash_completion.install share/"bash-completion/completions/hg" + end + + def post_install + return unless (opt_bin/"hg").exist? + return unless deps.all? { |d| d.build? || d.test? || d.to_formula.any_version_installed? } + + cacerts_configured = `#{opt_bin}/hg config web.cacerts`.strip + return if cacerts_configured.empty? + + opoo <<~EOS + Homebrew has detected that Mercurial is configured to use a certificate + bundle file as its trust store for TLS connections instead of using the + default OpenSSL store. If you have trouble connecting to remote + repositories, consider unsetting the `web.cacerts` property. You can + determine where the property is being set by running: + hg config --debug web.cacerts + EOS + end + + test do + touch "foobar" + system bin/"hg", "init" + system bin/"hg", "add", "foobar" + system bin/"hg", "--config", "ui.username=brew", "commit", "-m", "initial commit" + assert_equal "foobar\n", shell_output("#{bin}/hg locate") + # Check for chg + assert_match "initial commit", shell_output("#{bin}/chg log") + end +end diff --git a/Formula/m/mercury.rb b/Formula/m/mercury.rb new file mode 100644 index 0000000000000..a67109259ffd0 --- /dev/null +++ b/Formula/m/mercury.rb @@ -0,0 +1,73 @@ +class Mercury < Formula + desc "Logic/functional programming language" + homepage "https://mercurylang.org/" + url "https://dl.mercurylang.org/release/mercury-srcdist-22.01.8.tar.gz" + sha256 "a097e8cc8eca0152ed9527c1caf73e5c9c83f6ada1d313a25b80fe79072fbad8" + license all_of: ["GPL-2.0-only", "LGPL-2.0-only", "MIT"] + revision 1 + + livecheck do + url "https://dl.mercurylang.org/" + regex(/href=.*?mercury-srcdist[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fe009114d3e453c085f4956f00a894e7262ca8834eff20971202ffdac952e23f" + sha256 cellar: :any, arm64_sequoia: "5a8c953a905318645766c0457bbe546a8bc7b0d65b04d98c838ddf996f5d885a" + sha256 cellar: :any, arm64_sonoma: "8132aa81235d40e482e84630d4b6d8e037ec0176fbbf7dd0b7a2457ef781ea7a" + sha256 cellar: :any, arm64_ventura: "ff7e02ae589247c4a6c07d1f4c0a8277d000188d8c36920ca1769073b759d562" + sha256 cellar: :any, sonoma: "70c6cd977d7485a229575d4a1db077245a7a1984b467e92f5061ce363aa54922" + sha256 cellar: :any, ventura: "3a970961faf6783d4e1129368cda20f58ee36edab81a62c0eb23b99481b14d51" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b17d67e53415840a6362c3a43facb91ac8301fa31ea183fd365a170bc2d5fe3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89b71d74d5df6b4a4c1efb4c0a68045c4c397967d88fcd8fcf44125d60d8ffad" + end + + depends_on "openjdk" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_linux do + depends_on "readline" + end + + def install + # Make readline/libedit usage explicit rather than relying on automatic detection + args = if OS.mac? + %w[--without-readline --with-editline] + else + %w[--with-readline --without-editline] + end + system "./configure", *args, *std_configure_args + system "make", "install", "PARALLEL=-j" + + # Remove batch files for windows. + bin.glob("*.bat").map(&:unlink) + end + + test do + test_string = "Hello Homebrew\n" + path = testpath/"hello.m" + path.write <<~EOS + :- module hello. + :- interface. + :- import_module io. + :- pred main(io::di, io::uo) is det. + :- implementation. + main(IOState_in, IOState_out) :- + io.write_string("#{test_string}", IOState_in, IOState_out). + EOS + + system bin/"mmc", "-o", "hello_c", "hello" + assert_path_exists testpath/"hello_c" + + assert_equal test_string, shell_output("#{testpath}/hello_c") + + system bin/"mmc", "--grade", "java", "hello" + assert_path_exists testpath/"hello" + + assert_equal test_string, shell_output("#{testpath}/hello") + end +end diff --git a/Formula/m/mergelog.rb b/Formula/m/mergelog.rb new file mode 100644 index 0000000000000..8ccc43ea2ac33 --- /dev/null +++ b/Formula/m/mergelog.rb @@ -0,0 +1,42 @@ +class Mergelog < Formula + desc "Merges httpd logs from web servers behind round-robin DNS" + homepage "https://mergelog.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mergelog/mergelog/4.5/mergelog-4.5.tar.gz" + sha256 "fd97c5b9ae88fbbf57d3be8d81c479e0df081ed9c4a0ada48b1ab8248a82676d" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aa756f494d4032e8a7a2f5f824471c7bbf71c98370e3c374343dddeb80a5720c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b831541094e323e374a379048f0f9beb6fba7267c03b282e1974cc59900dfa75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4216fbee6feb598e05ec9c55932afb3c291e6764492a95ae0c7ae07cfa3296e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a536e75a6e41c182c1eb0e0328bc2ab2a6aef63e9617a7206048c5006527d0ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c1c9f43d4bc60ec22734380dff9843797661be4e0b1b0ab2d861d25a9886cfd7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6dac9051c91f80333b2640675187bdc2c93705183d3d119998e300e0137c0bff" + sha256 cellar: :any_skip_relocation, sonoma: "acdb09120c3187ec8233513479297bd0da71e3e1d2d3236f2be93e396f395c70" + sha256 cellar: :any_skip_relocation, ventura: "3c4dd9ac26e877acc2f2c86ced6cb68488aa234735027b0a978d247995bc270d" + sha256 cellar: :any_skip_relocation, monterey: "5814e07c1a51eaaa8793749baba836be66ae9fcfaeb2493cc86aaed15c9fb02c" + sha256 cellar: :any_skip_relocation, big_sur: "e778308b66cc9a27d21d41e17c97cf9f7aeef4e5da797eaadc5f2264c103b8c0" + sha256 cellar: :any_skip_relocation, catalina: "41acae4f1614c4ba0a3ea3e05bb88c150c930a07c50560df1d4bfc4a49c9bdf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "09cf79df48692a01b15e1a7a8aed68310cae89597000c500b05f164816e91655" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f3e79e1bdb70b4094c813fda9442f858828cbff21f19ba6a239628a0a53605f" + end + + uses_from_macos "zlib" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "src/Makefile.in", "mergelog.c -o", "mergelog.c $(LIBS) -o" unless OS.mac? + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"mergelog", File::NULL + end +end diff --git a/Formula/m/mergiraf.rb b/Formula/m/mergiraf.rb new file mode 100644 index 0000000000000..00ba53d0f8050 --- /dev/null +++ b/Formula/m/mergiraf.rb @@ -0,0 +1,29 @@ +class Mergiraf < Formula + desc "Syntax-aware git merge driver" + homepage "https://mergiraf.org" + url "https://codeberg.org/mergiraf/mergiraf/archive/v0.15.0.tar.gz" + sha256 "75f553935df38dd84679727fe3b3232d54ed4a9fe6ca214e3fd54ac714d0fae3" + license "GPL-3.0-only" + head "https://codeberg.org/mergiraf/mergiraf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e5c707523be55ef45945f624325043303cee8eb7450b7f3fd7284934c9d67423" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1db32935fdbc41b2c3b0cac96230588948f9931bf7fbce8e25d4a8a6131c9858" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0463ff64b10fbd79a9271a8dce8b75b126c33251151f87d964d8303566288b46" + sha256 cellar: :any_skip_relocation, sonoma: "82b85bb2476b9a117d493e78481f9ca1c6e9ed7eb0b1103175372bae490d6aaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "85c3214034957249a281375b050e42af0439d17701629804ada0642bc58e740d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b0b9ea5f2c8e6ad67b14807265a767e3f6478bea3454cf9111f5e51ac30fc35" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/mergiraf -V") + + assert_match "YAML (*.yml, *.yaml)", shell_output("#{bin}/mergiraf languages") + end +end diff --git a/Formula/m/mermaid-cli.rb b/Formula/m/mermaid-cli.rb new file mode 100644 index 0000000000000..f4e5407a7fc46 --- /dev/null +++ b/Formula/m/mermaid-cli.rb @@ -0,0 +1,46 @@ +class MermaidCli < Formula + desc "CLI for Mermaid library" + homepage "https://github.com/mermaid-js/mermaid-cli" + url "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-11.12.0.tgz" + sha256 "c59e2b7ec010d7a27a45b4addcde97978c644b1e996609e39714ea52d8926837" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7585648a49d157ad32707c73aa4dff41b4d06a38261d8df4909c5a09c282c581" + sha256 cellar: :any, arm64_sequoia: "c6fbf4fbb0ccd2a1e4d2c13a1ffadeb5e5a8f5c49a9665f1e5a9e8248082e309" + sha256 cellar: :any, arm64_sonoma: "c6fbf4fbb0ccd2a1e4d2c13a1ffadeb5e5a8f5c49a9665f1e5a9e8248082e309" + sha256 cellar: :any, sonoma: "b2fb3aa586d4644029bf858d189adf7ff879c8383b396a6ac2cc7fd8cb9ab9c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "f139c590db72914dd6bb29ccbc38caeba011433dbbd0048b91c601f1f449d7bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32ef5ace7620a06092136d9900497f2fe55a15693d28a3b50bb2ce62af7b68af" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + node_modules = libexec/"lib/node_modules/@mermaid-js/mermaid-cli/node_modules" + + # Remove incompatible pre-built `bare-fs`/`bare-os`/`bare-url` binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules.glob("{bare-fs,bare-os,bare-url}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + assert_match version.to_s, shell_output("#{bin}/mmdc --version") + + (testpath/"diagram.mmd").write <<~EOS + graph TD; + A-->B; + A-->C; + B-->D; + C-->D; + EOS + + output = shell_output("#{bin}/mmdc -i diagram.mmd -o diagram.svg 2>&1", 1) + assert_match "Could not find Chrome", output + end +end diff --git a/Formula/m/mesa-glu.rb b/Formula/m/mesa-glu.rb new file mode 100644 index 0000000000000..dfb805c687ad0 --- /dev/null +++ b/Formula/m/mesa-glu.rb @@ -0,0 +1,58 @@ +class MesaGlu < Formula + desc "Mesa OpenGL Utility library" + homepage "https://gitlab.freedesktop.org/mesa/glu" + url "https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz" + sha256 "bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f" + license any_of: ["GPL-3.0-or-later", "GPL-2.0-or-later", "MIT", "SGI-B-2.0"] + head "https://gitlab.freedesktop.org/mesa/glu.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "04be327648775a1c07ed70dd1fbe931983e013381f3459c10c12132fee8c7283" + sha256 cellar: :any, arm64_sequoia: "20ebc8dee6088f6f72e85c115535d7ae2d91af99b06dfa347bb9fb159d1e593c" + sha256 cellar: :any, arm64_sonoma: "a46115bd23886619f38846580237988bfa061f33c7c1e0ff29e9663a581a7c86" + sha256 cellar: :any, arm64_ventura: "1006d795c57a2c0dd47b6bd67bd77f28b4c72e8428574e7d97f886928eedd41c" + sha256 cellar: :any, arm64_monterey: "bba71b29396ad2355cfa1e4fa058f88971f590b32ab46d4b2aa79a4071766873" + sha256 cellar: :any, sonoma: "f358d5011c1944797eaa8a8c892c5437484d2a74a02389edcb3772cfaff7a565" + sha256 cellar: :any, ventura: "b4736c1784135e82aeb5295997651aeac7305709b345166ba3fd24a901339fcd" + sha256 cellar: :any, monterey: "807e0114c95152e4a4b4a4b72f0270415aa83eb0211a43488d88c65da65e85fe" + sha256 arm64_linux: "24b267be5f6ae9004eb11f15a427187078c08a201a777c5a72bb545966786566" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23e93794ed9518e89338dcfad821b7dbd184c3d46a843b52c05548ffe5bd5f00" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "mesa" + + def install + system "meson", "setup", "build", "-Dgl_provider=gl", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char* argv[]) { + static GLUtriangulatorObj *tobj; + GLdouble vertex[3], dx, dy, len; + int i = 0; + int count = 5; + tobj = gluNewTess(); + gluBeginPolygon(tobj); + for (i = 0; i < count; i++) { + vertex[0] = 1; + vertex[1] = 2; + vertex[2] = 0; + gluTessVertex(tobj, vertex, 0); + } + gluEndPolygon(tobj); + return 0; + } + CPP + system ENV.cxx, "-I#{include}", "test.cpp", "-L#{lib}", "-lGLU" + end +end diff --git a/Formula/m/mesa.rb b/Formula/m/mesa.rb new file mode 100644 index 0000000000000..6bef6137be4a6 --- /dev/null +++ b/Formula/m/mesa.rb @@ -0,0 +1,219 @@ +class Mesa < Formula + include Language::Python::Virtualenv + + desc "Graphics Library" + homepage "https://www.mesa3d.org/" + url "https://archive.mesa3d.org/mesa-25.2.6.tar.xz" + sha256 "361c97e8afa5fe20141c5362c5b489040751e12861c186a16c621a2fb182fc42" + license all_of: [ + "MIT", + "Apache-2.0", # include/{EGL,GLES*,vk_video,vulkan}, src/egl/generate/egl.xml, src/mapi/glapi/registry/gl.xml + "BSD-2-Clause", # src/asahi/lib/dyld_interpose.h, src/getopt/getopt*, src/util/xxhash.h + "BSD-3-Clause", # src/compiler/glsl/float64.glsl, src/util/softfloat.* + "BSL-1.0", # src/c11, src/gallium/auxiliary/gallivm/f.cpp + "HPND", # src/mesa/x86/assyntax.h + "HPND-sell-variant", # src/loader/loader_{dri,dri3,wayland}_helper.*, src/vulkan/wsi/wsi_common_display.* + "ICU", # src/glx/* + "MIT-Khronos-old", # src/compiler/spirv/{GLSL.*,OpenCL.std.h,spirv.core.grammar.json,spirv.h} + "SGI-B-2.0", # src/glx/* + :public_domain, # src/util/{dbghelp.h,u_atomic.h,sha1}, src/util/perf/gpuvis_trace_utils.h + { "GPL-1.0-or-later" => { with: "Linux-syscall-note" } }, # include/drm-uapi/sync_file.h + { "GPL-2.0-only" => { with: "Linux-syscall-note" } }, # include/drm-uapi/{d3dkmthk.h,dma-buf.h,etnaviv_drm.h} + ] + head "https://gitlab.freedesktop.org/mesa/mesa.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "e45c04b8fe585250c765991eb3b3542ec8dc39e0c2487f334209c9bd28e7a000" + sha256 arm64_sequoia: "532cb6191b48fbd5d0d67f77a36cfbfe061ca52b1f3605f3ac686964cba1a6cf" + sha256 arm64_sonoma: "2f57a97fc2e60438aef14bb161fb66dcb40384583e6a7aadf867dd84f34297e9" + sha256 sonoma: "b779439aedf9869d15ea53cd6c752c3d6ee96280b8c196d0c3a1811e1adbfd44" + sha256 arm64_linux: "25ff5f5460a4e033859d4ecdf8e0eb0120f51c25cdeb34b0a82e501d158e96df" + sha256 x86_64_linux: "755c7b9f283a10896777ec68137bceb211686ae939a5d3cca2f30d9c07eb9608" + end + + depends_on "bindgen" => :build + depends_on "bison" => :build # can't use from macOS, needs '> 2.3' + depends_on "glslang" => :build + depends_on "libxrandr" => :build + depends_on "libxrender" => :build + depends_on "libxshmfence" => :build + depends_on "libyaml" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => :build + depends_on "rust" => :build + depends_on "xorgproto" => :build + + depends_on "libclc" # OpenCL support needs share/clc/*.bc files at runtime + depends_on "libpng" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "libxfixes" + depends_on "llvm" + depends_on "spirv-llvm-translator" + depends_on "spirv-tools" + depends_on "zstd" + + uses_from_macos "flex" => :build + uses_from_macos "expat" + uses_from_macos "zlib" + + on_macos do + depends_on "molten-vk" + end + + on_linux do + depends_on "directx-headers" => :build + depends_on "gzip" => :build + depends_on "libva" => :build + depends_on "libvdpau" => :build + depends_on "pycparser" => :build + depends_on "valgrind" => :build + depends_on "wayland-protocols" => :build + + depends_on "elfutils" + depends_on "libdrm" + depends_on "libxml2" # not used on macOS + depends_on "libxshmfence" + depends_on "libxxf86vm" + depends_on "lm-sensors" + depends_on "wayland" + + on_intel do + depends_on "cbindgen" => :build + end + end + + pypi_packages package_name: "", + extra_packages: %w[mako packaging ply pyyaml] + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def python3 + "python3.14" + end + + def install + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + if OS.mac? && MacOS.version < :sequoia + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources.reject { |r| OS.mac? && r.name == "ply" } + ENV.prepend_path "PYTHONPATH", venv.site_packages + ENV.prepend_path "PATH", venv.root/"bin" + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath}" if OS.mac? + + args = %w[ + -Db_ndebug=true + -Dgallium-rusticl=true + -Dllvm=enabled + -Dopengl=true + -Dstrip=true + -Dvideo-codecs=all + ] + args += if OS.mac? + # Work around .../rusticl_system_bindings.h:1:10: fatal error: 'stdio.h' file not found + ENV["SDKROOT"] = MacOS.sdk_for_formula(self).path + + %W[ + -Dgallium-drivers=llvmpipe,zink + -Dmoltenvk-dir=#{Formula["molten-vk"].prefix} + -Dtools=etnaviv,glsl,nir,nouveau,imagination,dlclose-skip + -Dvulkan-drivers=swrast + -Dvulkan-layers=intel-nullhw,overlay,screenshot,vram-report-limit + ] + else + # Not all supported drivers are being auto-enabled on x86 Linux. + # TODO: Determine the explicit drivers list for ARM Linux. + drivers = Hardware::CPU.intel? ? "all" : "auto" + + %W[ + -Degl=enabled + -Dgallium-drivers=#{drivers} + -Dgallium-extra-hud=true + -Dgallium-va=enabled + -Dgallium-vdpau=enabled + -Dgbm=enabled + -Dgles1=enabled + -Dgles2=enabled + -Dglx=dri + -Dintel-rt=enabled + -Dlmsensors=enabled + -Dmicrosoft-clc=disabled + -Dplatforms=x11,wayland + -Dtools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,asahi,imagination,dlclose-skip + -Dvalgrind=enabled + -Dvulkan-drivers=#{drivers} + -Dvulkan-layers=device-select,intel-nullhw,overlay,screenshot,vram-report-limit + --force-fallback-for=indexmap,paste,pest_generator,roxmltree,rustc-hash,syn + ] + end + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + prefix.install "docs/license.rst" + inreplace lib/"pkgconfig/dri.pc" do |s| + s.change_make_var! "dridriverdir", HOMEBREW_PREFIX/"lib/dri" + end + + # https://gitlab.freedesktop.org/mesa/mesa/-/issues/13119 + if OS.mac? + inreplace %W[ + #{prefix}/etc/OpenCL/vendors/rusticl.icd + #{share}/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json + #{share}/vulkan/explicit_layer.d/VkLayer_MESA_screenshot.json + ] do |s| + s.gsub! ".so", ".dylib" + end + end + end + + test do + resource "glxgears.c" do + url "https://gitlab.freedesktop.org/mesa/demos/-/raw/a533acd00ed0b6d1beda7df0c68a59a873dba2b3/src/xdemos/glxgears.c" + sha256 "36376674e73fb0657fd56a3738c330b828da6731c934e2b29d75253dc02ad03b" + end + + resource "gl_wrap.h" do + url "https://gitlab.freedesktop.org/mesa/demos/-/raw/ddc35ca0ea2f18c5011c5573b4b624c128ca7616/src/util/gl_wrap.h" + sha256 "41f5a84f8f5abe8ea2a21caebf5ff31094a46953a83a738a19e21c010c433c88" + end + + %w[glxgears.c gl_wrap.h].each { |r| resource(r).stage(testpath) } + flags = shell_output("pkgconf --cflags --libs gl x11 xext").chomp.split + system ENV.cc, "glxgears.c", "-o", "gears", *flags, "-lm" + end +end diff --git a/Formula/m/mesalib-glw.rb b/Formula/m/mesalib-glw.rb new file mode 100644 index 0000000000000..5bba12e762a45 --- /dev/null +++ b/Formula/m/mesalib-glw.rb @@ -0,0 +1,44 @@ +class MesalibGlw < Formula + desc "Open-source implementation of the OpenGL specification" + homepage "https://www.mesa3d.org" + url "https://archive.mesa3d.org/glw/glw-8.0.0.tar.bz2" + sha256 "2da1d06e825f073dcbad264aec7b45c649100e5bcde688ac3035b34c8dbc8597" + license "SGI-OpenGL" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "d14b295f394354aa03fc3f890ae631455970b93cf1429c2478efc3a10b43c28b" + sha256 cellar: :any, arm64_sequoia: "b127d5bb8ec7caceb1de9e05a28bf845242e04886ad39357558704b9ffd51e9b" + sha256 cellar: :any, arm64_sonoma: "e36a490fd422b17fc371870a0da3c657520cc1e90bb01a865c1356a6bb466acd" + sha256 cellar: :any, arm64_ventura: "a9fdf656540dc268519f8e3fded305c1e86c4690cf7cfa5571e3edbee9e56cc5" + sha256 cellar: :any, arm64_monterey: "f19366ec40b0666882b3d10a0e6635ecc25e75446a85bb695f44ccaf35ca809a" + sha256 cellar: :any, arm64_big_sur: "fed357436c36aa832c46cad896d75a9b3f0015658732af9cad3a18b19769ea72" + sha256 cellar: :any, sonoma: "560adfd13999ca45b56b3de6c9f3b071639b09a3b386add75b64db6f0d7eea74" + sha256 cellar: :any, ventura: "04daf708d2f8327ba0ae42652d4b6d332fd560cdcf6c7ac9b09140bd0ced8a67" + sha256 cellar: :any, monterey: "a94da8b984b2f2f08057324d812b03bbd8108f541b409f481e4ea41d4323df30" + sha256 cellar: :any, big_sur: "9580a442aa0843b284317be696caa8742165a1574d20e8398c9fadbdfc426dc6" + sha256 cellar: :any, catalina: "1a1690918045f775ea6d71216a5b674b5762556aeaf0285e70533150aa7f14b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "804dfa5c3d312c8b55d18b3665b5608ac7cd86440423718bfea467f069141c1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7ca035e7cb0fb4bb11fc7978a33f619b1adfb06678260f70df6b79f6dfcd91a" + end + + # Official[^1] git repository has been archived[^2] + # + # [^1]: https://docs.mesa3d.org/faq.html?highlight=glw#where-is-the-glw-library + # [^2]: https://gitlab.freedesktop.org/mesa/glw + deprecate! date: "2024-10-09", because: :repo_archived + disable! date: "2025-10-09", because: :repo_archived + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxt" + depends_on "mesa" + + def install + args = [] + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/m/mesheryctl.rb b/Formula/m/mesheryctl.rb new file mode 100644 index 0000000000000..c12ff70a27f28 --- /dev/null +++ b/Formula/m/mesheryctl.rb @@ -0,0 +1,45 @@ +class Mesheryctl < Formula + desc "Command-line utility for Meshery, the cloud native management plane" + homepage "https://meshery.io" + url "https://github.com/meshery/meshery.git", + tag: "v0.8.149", + revision: "730d4179f086545dad8d1484d7480c5f60abd374" + license "Apache-2.0" + head "https://github.com/meshery/meshery.git", branch: "master" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67135a54803050671fae4f1fa821ffe48acc937ed8fba54a09f1bbd139c6a0be" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67135a54803050671fae4f1fa821ffe48acc937ed8fba54a09f1bbd139c6a0be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67135a54803050671fae4f1fa821ffe48acc937ed8fba54a09f1bbd139c6a0be" + sha256 cellar: :any_skip_relocation, sonoma: "f04947855ead42bc945a159517e1c3e0a4f87a292fcbe378df8c6546fb709d8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fcae3a854be6474a3c15d42f70838b64c6c735c868edc5739369b6d26bb0a25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ed62fc7b5ab0b37f5461477168f5134b3d42be761a96a66aaa7cbfaa091cfcc" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + + ldflags = %W[ + -s -w + -X github.com/meshery/meshery/mesheryctl/internal/cli/root/constants.version=v#{version} + -X github.com/meshery/meshery/mesheryctl/internal/cli/root/constants.commitsha=#{Utils.git_short_head} + -X github.com/meshery/meshery/mesheryctl/internal/cli/root/constants.releasechannel=stable + ] + + system "go", "build", *std_go_args(ldflags:), "./mesheryctl/cmd/mesheryctl" + + generate_completions_from_executable(bin/"mesheryctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/mesheryctl version 2>&1") + assert_match "Channel: stable", shell_output("#{bin}/mesheryctl system channel view 2>&1") + + # Test kubernetes error on trying to start meshery + assert_match "The Kubernetes cluster is not accessible.", shell_output("#{bin}/mesheryctl system start 2>&1", 1) + end +end diff --git a/Formula/m/meson.rb b/Formula/m/meson.rb new file mode 100644 index 0000000000000..4c5cc75587fe9 --- /dev/null +++ b/Formula/m/meson.rb @@ -0,0 +1,75 @@ +class Meson < Formula + desc "Fast and user friendly build system" + homepage "https://mesonbuild.com/" + url "https://github.com/mesonbuild/meson/releases/download/1.9.1/meson-1.9.1.tar.gz" + sha256 "4e076606f2afff7881d195574bddcd8d89286f35a17b4977a216f535dc0c74ac" + license "Apache-2.0" + revision 1 + head "https://github.com/mesonbuild/meson.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9a43ea2e4500ea0978506a8788ef6506b83c31e67b57719aef3e35cf5484e650" + end + + depends_on "ninja" + depends_on "python@3.14" + + def install + python3 = "python3.14" + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + + bash_completion.install "data/shell-completions/bash/meson" + zsh_completion.install "data/shell-completions/zsh/_meson" + vim_plugin_dir = buildpath/"data/syntax-highlighting/vim" + (share/"vim/vimfiles").install %w[ftdetect ftplugin indent syntax].map { |dir| vim_plugin_dir/dir } + + # Make the bottles uniform. This also ensures meson checks `HOMEBREW_PREFIX` + # for fulfilling dependencies rather than just `/usr/local`. + mesonbuild = prefix/Language::Python.site_packages(python3)/"mesonbuild" + usr_local_files = %w[ + compilers/mixins/apple.py + coredata.py + dependencies/boost.py + dependencies/cuda.py + dependencies/misc.py + dependencies/qt.py + options.py + scripts/python_info.py + utils/universal.py + ].map { |f| mesonbuild/f } + usr_local_files << (bash_completion/"meson") + + # Passing `build.stable?` ensures a failed `inreplace` won't fail HEAD installs. + inreplace usr_local_files, "/usr/local", HOMEBREW_PREFIX, audit_result: build.stable? + + opt_homebrew_files = %w[ + dependencies/boost.py + dependencies/misc.py + compilers/mixins/apple.py + ].map { |f| mesonbuild/f } + inreplace opt_homebrew_files, "/opt/homebrew", HOMEBREW_PREFIX, audit_result: build.stable? + + # Ensure meson uses our `var` directory. + inreplace mesonbuild/"options.py", "'/var/local", "'#{var}", audit_result: build.stable? + end + + test do + (testpath/"helloworld.c").write <<~C + #include + int main(void) { + puts("hi"); + return 0; + } + C + (testpath/"meson.build").write <<~MESON + project('hello', 'c') + executable('hello', 'helloworld.c') + MESON + + system bin/"meson", "setup", "build" + assert_path_exists testpath/"build/build.ninja" + + system bin/"meson", "compile", "-C", "build", "--verbose" + assert_equal "hi", shell_output("build/hello").chomp + end +end diff --git a/Formula/m/meta-package-manager.rb b/Formula/m/meta-package-manager.rb new file mode 100644 index 0000000000000..e34e3fb269d6c --- /dev/null +++ b/Formula/m/meta-package-manager.rb @@ -0,0 +1,321 @@ +class MetaPackageManager < Formula + include Language::Python::Virtualenv + include Language::Python::Shebang + + desc "Wrapper around all package managers with a unifying CLI" + homepage "https://kdeldycke.github.io/meta-package-manager/" + url "https://files.pythonhosted.org/packages/5b/49/d4e663f67c2376f4e26864fa10ec78a6047f765d580daa6a510766ef2d2b/meta_package_manager-5.21.0.tar.gz" + sha256 "9d438f4cf34b2bebbd46525759f6d5305d98e9ff02975be4e1b18befc4fffffa" + license "GPL-2.0-or-later" + revision 2 + head "https://github.com/kdeldycke/meta-package-manager.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "9ccf797feb1dd125ab60c98ca41e8632df5fd29209cb7c7a2443bc8e104c0881" + sha256 cellar: :any, arm64_sequoia: "f77ae134382c799cd80ab9198557d42624a1ddf387f4ee5d6f703ede1b5e02db" + sha256 cellar: :any, arm64_sonoma: "44d3af2cd5533967e36fe749952c1ad2f11f207c7d13a7be3e21237250984851" + sha256 cellar: :any, sonoma: "80f8c931a19b59089efb8f3384a33b15d0d782e429b1ec3c1e3625da4e48a3f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "bfde1905b75e11a8129d822caa268821ba875c60472b4aa4a8dae751c1144b6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1bc4fdb2e6a1d882d9288318697bbde7484c72be9787966c4f094e4e6d6416b" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["certifi", "rpds-py"] + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "beartype" do + url "https://files.pythonhosted.org/packages/04/96/43ed27f27127155f24f5cf85df0c27fd2ac2ab67d94cecc8f76933f91679/beartype-0.22.2.tar.gz" + sha256 "ff3a7df26af8d15fa87f97934f0f6d41bbdadca971c410819104998dd26013d2" + end + + resource "boltons" do + url "https://files.pythonhosted.org/packages/63/54/71a94d8e02da9a865587fb3fff100cb0fc7aa9f4d5ed9ed3a591216ddcc7/boltons-25.0.0.tar.gz" + sha256 "e110fbdc30b7b9868cb604e3f71d4722dd8f4dcb4a5ddd06028ba8f1ab0b5ace" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz" + sha256 "98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "click-extra" do + url "https://files.pythonhosted.org/packages/e3/33/32aea2ec2bbb3c3723a8a46a50e210637cd20686447a0977738fe3b51032/click_extra-5.0.2.tar.gz" + sha256 "53d7ce1a048c8777fa4efcc9c8d786d09a99484cf9cc6de91e258055af36265d" + end + + resource "cloup" do + url "https://files.pythonhosted.org/packages/46/cf/09a31f0f51b5c8ef2343baf37c35a5feb4f6dfdcbd0592a014baf837f2e4/cloup-3.0.8.tar.gz" + sha256 "f91c080a725196ddf74feabd6250266f466e97fc16dfe21a762cf6bc6beb3ecb" + end + + resource "cyclonedx-python-lib" do + url "https://files.pythonhosted.org/packages/a1/70/75c253be1ec80bd25d14ce900ff1d49d96e0ed21368fb7117868b55cc0a2/cyclonedx_python_lib-10.0.2.tar.gz" + sha256 "2722ec36d5acc8d41117946967864094571bdc847986e41cfd74415ec9d02fd4" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "extra-platforms" do + url "https://files.pythonhosted.org/packages/11/17/16388a2069a435c9b6a793b9fd4a3daea6b69d354ac023de6977a5313d9d/extra_platforms-3.2.3.tar.gz" + sha256 "c5e563eefc855593d9efe760e8509e2f3c213458744cb1dfc2917dd21b417694" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz" + sha256 "c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730" + end + + resource "isoduration" do + url "https://files.pythonhosted.org/packages/7c/1a/3c8edc664e06e6bd06cce40c6b22da5f1429aa4224d0c590f3be21c91ead/isoduration-20.11.0.tar.gz" + sha256 "ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + end + + resource "mergedeep" do + url "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz" + sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz" + sha256 "9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/68/7d/0bd319dc94c7956b4d864e87d3dc03739f125ce174671e3128edd566a63e/packageurl_python-0.16.0.tar.gz" + sha256 "69e3bf8a3932fe9c2400f56aaeb9f86911ecee2f9398dbe1b58ec34340be365d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "py-serializable" do + url "https://files.pythonhosted.org/packages/73/21/d250cfca8ff30c2e5a7447bc13861541126ce9bd4426cd5d0c9f08b5547d/py_serializable-2.1.0.tar.gz" + sha256 "9d5db56154a867a9b897c0163b33a793c804c80cee984116d02d49e4578fc103" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rdflib" do + url "https://files.pythonhosted.org/packages/8d/99/d2fec85e5f6bdfe4367dea143119cb4469bf48710487939df0abf7e22003/rdflib-7.2.1.tar.gz" + sha256 "cf9b7fa25234e8925da8b1fb09700f8349b5f0f100e785fb4260e737308292ac" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rfc3339-validator" do + url "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" + sha256 "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + end + + resource "rfc3987" do + url "https://files.pythonhosted.org/packages/14/bb/f1395c4b62f251a1cb503ff884500ebd248eed593f41b469f89caa3547bd/rfc3987-1.3.8.tar.gz" + sha256 "d3c4d257a560d544e9826b38bc81db676890c79ab9d7ac92b39c7a253d5ca733" + end + + resource "semantic-version" do + url "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz" + sha256 "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "spdx-tools" do + url "https://files.pythonhosted.org/packages/f1/99/3470b28dc4b64fd29db3b1dcf5e84c743ec88e25ea7b214794f5930f0319/spdx-tools-0.8.3.tar.gz" + sha256 "68b8f9ce2893b5216bd90b2e63f1c821c2884e4ebc4fd295ebbf1fa8b8a94b93" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "uri-template" do + url "https://files.pythonhosted.org/packages/31/c7/0336f2bd0bcbada6ccef7aaa25e443c118a704f828a0620c6fa0207c1b64/uri-template-1.3.0.tar.gz" + sha256 "0e00f8eb65e18c7de20d595a14336e9f337ead580c70934141624b6d1ffdacc7" + end + + resource "uritools" do + url "https://files.pythonhosted.org/packages/36/b1/e482d43db3209663b82a59e37cf31f641254180190667c6b0bf18a297de8/uritools-5.0.0.tar.gz" + sha256 "68180cad154062bd5b5d9ffcdd464f8de6934414b25462ae807b00b8df9345de" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/79/3e/c0bdc27cf06f4e47680bd5803a07cb3dfd17de84cde92dd217dcb9e05253/wcmatch-10.1.tar.gz" + sha256 "f11f94208c8c8484a16f4f48638a85d771d9513f4ab3f37595978801cb9465af" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "webcolors" do + url "https://files.pythonhosted.org/packages/7b/29/061ec845fb58521848f3739e466efd8250b4b7b98c1b6c5bf4d40b419b7e/webcolors-24.11.1.tar.gz" + sha256 "ecb3d768f32202af770477b8b65f318fa4f566c22948673a977b00d589dd80f6" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + def install + rewrite_shebang detected_python_shebang, "meta_package_manager/bar_plugin.py" + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"mpm", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/mpm --version") + + # Check mpm is detecting brew and report it as a manager in a table row. + assert_match( + /\e\[32mbrew\e\[0m,Homebrew Formulae,\e\[32m✓\e\[0m,\e\[32m✓\e\[0m \S+,\e\[32m✓\e\[0m,\e\[32m✓\e\[0m \S+/, + shell_output("#{bin}/mpm --output-format csv --all-managers managers"), + ) + # Check mpm is reporting itself as installed via brew in a table row. + assert_match "meta-package-manager,,brew,#{version}", shell_output("#{bin}/mpm --output-format csv installed") + end +end diff --git a/Formula/m/metabase.rb b/Formula/m/metabase.rb new file mode 100644 index 0000000000000..51bdffc1c1fe3 --- /dev/null +++ b/Formula/m/metabase.rb @@ -0,0 +1,53 @@ +class Metabase < Formula + desc "Business intelligence report server" + homepage "https://www.metabase.com/" + url "https://downloads.metabase.com/v0.56.12/metabase.jar" + sha256 "ca7f7b8a06883d29e6911fe5487300222838df7ea3c60ddcaf7f756ce4437f39" + license "AGPL-3.0-only" + + # The first-party download page only provides an unversioned link to the + # latest OSS jar file. We check the "latest" GitHub release, as the release + # body text contains a versioned link to the OSS jar file. + livecheck do + url :head + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "59cef09e11ffa83e6364395a978c25ed3e6ee955e754d48ab07497dd974138e4" + end + + head do + url "https://github.com/metabase/metabase.git", branch: "master" + + depends_on "leiningen" => :build + depends_on "node" => :build + depends_on "yarn" => :build + end + + depends_on "openjdk" + + def install + if build.head? + system "./bin/build" + libexec.install "target/uberjar/metabase.jar" + else + libexec.install "metabase.jar" + end + + bin.write_jar_script libexec/"metabase.jar", "metabase" + end + + service do + run opt_bin/"metabase" + keep_alive true + require_root true + working_dir var/"metabase" + log_path var/"metabase/server.log" + error_log_path File::NULL + end + + test do + system bin/"metabase", "migrate", "up" + end +end diff --git a/Formula/m/metalang99.rb b/Formula/m/metalang99.rb new file mode 100644 index 0000000000000..431404c2c2c28 --- /dev/null +++ b/Formula/m/metalang99.rb @@ -0,0 +1,37 @@ +class Metalang99 < Formula + desc "C99 preprocessor-based metaprogramming language" + homepage "https://github.com/Hirrolot/metalang99" + url "https://github.com/Hirrolot/metalang99/archive/refs/tags/v1.13.5.tar.gz" + sha256 "f3d1607d76b4b081d3295661c4c2b8d5fde4d5018b1aa409c84fb3a6660ffb90" + license "MIT" + head "https://github.com/Hirrolot/metalang99.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "72f34a9d242be857c7fbb45ddc50c1c6f0ca5a034d831ee1909d25f2037d600c" + end + + def install + prefix.install "include" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + #define factorial(n) ML99_natMatch(n, v(factorial_)) + #define factorial_Z_IMPL(...) v(1) + #define factorial_S_IMPL(n) ML99_mul(ML99_inc(v(n)), factorial(v(n))) + + int main() { + ML99_ASSERT_EQ(factorial(v(4)), v(24)); + printf("%d", ML99_EVAL(factorial(v(5)))); + } + C + + system ENV.cc, "test.c", "-I#{include}", "-o", "test" + assert_equal "120", shell_output("./test") + end +end diff --git a/Formula/m/metals.rb b/Formula/m/metals.rb new file mode 100644 index 0000000000000..90983783c7d9d --- /dev/null +++ b/Formula/m/metals.rb @@ -0,0 +1,72 @@ +class Metals < Formula + desc "Scala language server" + homepage "https://github.com/scalameta/metals" + url "https://github.com/scalameta/metals/archive/refs/tags/v1.6.3.tar.gz" + sha256 "5e6147091340ebfac1037a30af225d7684b1022e49f52a55268444b51fa12a4c" + license "Apache-2.0" + + # Some version tags don't become a release, so it's necessary to check the + # GitHub releases instead. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8629460eb8e87dac5e495b1b04f1bc11d080ace5b01de68da14ebac59b66f968" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b76dacfe107ba418b52414efe52a5d33519d675c26ae717ce771ab914908171e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4458fcba1a74cd770139e05b3fedc2816a36e749572e7911e0ba1025953e5f31" + sha256 cellar: :any_skip_relocation, sonoma: "ef3df00b0d625c6e1aeb3d6daa6bff9fdb35d353a7405e8a70ad2f1ebd40b6ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f8ff6636a39800500564f07cc16a68147b2a8505f2093f89c88346fdc8489ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "942eb69772978c373cf56ddf1d826729a51bb75a8318011ad7a054666e6ce557" + end + + depends_on "sbt" => :build + depends_on "openjdk" + + def install + ENV["CI"] = "TRUE" + inreplace "build.sbt", /version ~=.+?,/m, "version := \"#{version}\"," + + system "sbt", "package" + + # Following Arch AUR to get the dependencies. + dep_pattern = /^.+?Attributed\((.+?\.jar)\).*$/ + sbt_deps_output = Utils.safe_popen_read("sbt 'show metals/dependencyClasspath' 2>/dev/null") + deps_jars = sbt_deps_output.lines.grep(dep_pattern) { |line| line.strip.gsub(dep_pattern, '\1') } + deps_jars.each do |jar| + (libexec/"lib").install jar + end + + (libexec/"lib").install buildpath.glob("metals/target/scala-*/metals_*-#{version}.jar") + (libexec/"lib").install buildpath.glob("mtags/target/scala-*/mtags_*-#{version}.jar") + (libexec/"lib").install buildpath.glob("mtags-shared/target/scala-*/mtags-shared_*-#{version}.jar") + (libexec/"lib").install "mtags-interfaces/target/mtags-interfaces-#{version}.jar" + + args = %W[-cp "#{libexec/"lib"}/*" scala.meta.metals.Main] + env = Language::Java.overridable_java_home_env + env["PATH"] = "$JAVA_HOME/bin:$PATH" + (bin/"metals").write_env_script "java", args.join(" "), env + end + + test do + require "open3" + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + Open3.popen3(bin/"metals") do |stdin, stdout, _e, w| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + Process.kill("KILL", w.pid) + end + end +end diff --git a/Formula/m/metaproxy.rb b/Formula/m/metaproxy.rb new file mode 100644 index 0000000000000..a8e55415d2240 --- /dev/null +++ b/Formula/m/metaproxy.rb @@ -0,0 +1,71 @@ +class Metaproxy < Formula + desc "Z39.50 proxy and router utilizing Yaz toolkit" + homepage "https://www.indexdata.com/resources/software/metaproxy/" + url "https://ftp.indexdata.com/pub/metaproxy/metaproxy-1.22.1.tar.gz" + sha256 "d67a9f7fc9d36ccea8c4770c96c4ae2bc4250f484f941cbeec2a11695ec8d7b8" + license "GPL-2.0-or-later" + revision 1 + + # The homepage doesn't link to the latest source file, so we have to check + # the directory listing page directly. + livecheck do + url "https://ftp.indexdata.com/pub/metaproxy/" + regex(/href=.*?metaproxy[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0fde30e0981972930b36cec80c9199fecc4d587e5500d3e5db86b793feebc066" + sha256 cellar: :any, arm64_sequoia: "fac499e49d91fe8f9056887c49190c481701ab349351801c0cf214a278283f35" + sha256 cellar: :any, arm64_sonoma: "dc7dd1dab2e198f98ce502f952cc8ba62f76564400168210faa684caf34de6de" + sha256 cellar: :any, arm64_ventura: "8c4fc4ab5fd41b9f8a3255965c5ee70cda3e82503e697658725572f587c23b78" + sha256 cellar: :any, sonoma: "e3d0259354592605d7fbbe51be7ea0e8cf011a96b81890c1d55dfc80a806abbb" + sha256 cellar: :any, ventura: "13923079d23db8b49cc6d1999ff465f7cd1ed26dd6db36dd3dd2b3a8cf52eb46" + sha256 cellar: :any_skip_relocation, arm64_linux: "0007cf2d8f23ab1d9372bd3da36f46fbe2caf53fb333237e550ff46099dba18b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dc76a8d16502d41218106da2a8ef91facdfd393ef05bd69c9f15cc30399f6ec" + end + + depends_on "pkgconf" => :build + + depends_on "boost" + depends_on "yaz" + depends_on "yazpp" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + def install + # Match C++ standard in boost to avoid undefined symbols at runtime + # Ref: https://github.com/boostorg/regex/issues/150 + ENV.append "CXXFLAGS", "-std=c++14" + + system "./configure", *std_configure_args + system "make", "install" + end + + # Test by making metaproxy test a trivial configuration file (etc/config0.xml). + test do + (testpath/"test-config.xml").write <<~XML + + + + + + @:9070 + FN + /fn_stat + + + + + + + + + + + + XML + + system bin/"metaproxy", "-t", "--config", testpath/"test-config.xml" + end +end diff --git a/Formula/m/metashell.rb b/Formula/m/metashell.rb new file mode 100644 index 0000000000000..6ed61d99cbffe --- /dev/null +++ b/Formula/m/metashell.rb @@ -0,0 +1,73 @@ +class Metashell < Formula + desc "Metaprogramming shell for C++ templates" + homepage "http://metashell.org" + url "https://github.com/metashell/metashell/archive/refs/tags/v5.0.0.tar.gz" + sha256 "028e37be072ec4e85d18ead234a208d07225cf335c0bb1c98d4d4c3e30c71f0e" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8300899bfccc7d1e79cde7767e71465014c207c48a8adcc5e0823d81e7c61c99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9de8b8eddbb354a0ed45d39d24e06cee5f05b57a0810155817a7362f45df635a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "842e31ef53f8bd669b6e7344f028ab4de0255a77a593635b9720a451d2e2d47d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4533ad286ccc480236aebbfd1f16b0dd2db015b5c3ffd154c3747e2a25096bac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2958abbe2881a59769b0638d4418acd8d3d5ebd3ab909221f72df4c1354eaf57" + sha256 cellar: :any_skip_relocation, sonoma: "8fca9954509cf6db5673c609974da67a844b2bc0f8b51b4acbc39a99ecea42da" + sha256 cellar: :any_skip_relocation, ventura: "99787eaf229f32b79c509af891747afa30315dd4e8530a4d298f0bc438c051ce" + sha256 cellar: :any_skip_relocation, monterey: "3e8541db362af85b6564cf836accecb73ec8d529d586d52adbae3fe7e5cc88b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ca77aef4b0bde4d3cb95aea6d5f7d58d66f464b544ab4002e1c0cb6c27eb105" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd4c0e36370c2b809c525c309f22e0bc849bb0bc8cc92e5d1dfe34f29e9e9ddd" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + uses_from_macos "libedit" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_linux do + depends_on "readline" + end + + # include missing cstddef, upstream PR ref, https://github.com/metashell/metashell/pull/303 + patch do + url "https://github.com/metashell/metashell/commit/0d81415616d33e39ff6d1add91e71f9789ea8657.patch?full_index=1" + sha256 "31472db5ae8e67483319dcbe104d5c7a533031f9845af2ddf5147f3caabf3ac2" + end + + # fix build with cmake 4, upstream PR ref, https://github.com/metashell/metashell/pull/306 + patch do + url "https://github.com/metashell/metashell/commit/38b524ae291799a7ea9077745d3fc10ef2d40d54.patch?full_index=1" + sha256 "e97590ca1d2b5510dcfcca86aa608e828040bb91519f6b161f7b4311676f4fd4" + end + + def install + # remove -msse4.1 if unsupported, issue ref: https://github.com/metashell/metashell/issues/305 + inreplace "3rd/boost/atomic/CMakeLists.txt", /\btarget_compile_options.*-msse4/, "#\\0" if Hardware::CPU.arm? + + # Build internal Clang + system "cmake", "-S", "3rd/templight/llvm", + "-B", "build/templight", + "-DLIBCLANG_BUILD_STATIC=ON", + "-DLLVM_ENABLE_TERMINFO=OFF", + "-DLLVM_ENABLE_PROJECTS=clang", + *std_cmake_args + system "cmake", "--build", "build/templight", "--target", "templight" + + system "cmake", "-S", ".", "-B", "build/metashell", *std_cmake_args + system "cmake", "--build", "build/metashell" + system "cmake", "--install", "build/metashell" + end + + test do + (testpath/"test.hpp").write <<~CPP + template struct add_const { using type = const T; }; + add_const::type + CPP + output = pipe_output("#{bin}/metashell -H", (testpath/"test.hpp").read) + assert_match "const int", output + end +end diff --git a/Formula/m/metis.rb b/Formula/m/metis.rb new file mode 100644 index 0000000000000..b344423d32fef --- /dev/null +++ b/Formula/m/metis.rb @@ -0,0 +1,58 @@ +class Metis < Formula + desc "Programs that partition graphs and order matrices" + homepage "https://karypis.github.io/glaros/software/metis/overview.html" + url "https://karypis.github.io/glaros/files/sw/metis/metis-5.1.0.tar.gz" + mirror "https://ftp.mcs.anl.gov/pub/pdetools/spack-pkgs/metis-5.1.0.tar.gz" + sha256 "76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2" + license "Apache-2.0" + + livecheck do + url :homepage + regex(%r{href=.*?/metis[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "dbb37a32bc124a76fd9496b0e95f49b1bb48b1dfe72dc398991569156193d07e" + sha256 cellar: :any, arm64_sequoia: "60ef633238eb902353465719c36fb64c5a325f823a203c1079c3e0358f72fd79" + sha256 cellar: :any, arm64_sonoma: "d1b85dedb77b4a578a06ba705e759768f3ad832fb744669e06f97bd233bf82ff" + sha256 cellar: :any, arm64_ventura: "5bea2beeae9e3394cc675df14dc30e078b6ed575f0bad4c05717ee3f75ed4aee" + sha256 cellar: :any, arm64_monterey: "9924dff9c2995788c3e69a1affb9931035b66af7b2fef57fedbb0b2f14071d9f" + sha256 cellar: :any, arm64_big_sur: "ea93856908a2c1c60023dd2f849339d479b20ab4ae6d51623f9496f64993ca20" + sha256 cellar: :any, sonoma: "daaf2366f0870fd9cf13446d1dee1a8a9bfebb742748fee2911cfabe1e53407f" + sha256 cellar: :any, ventura: "19688362378a05d974db2c6552376ef5b952b5c2b5bc27dde34c23ab27f5736b" + sha256 cellar: :any, monterey: "53ceaf6862363106724577ff6568285ba22ff97ef8849eeb7ec0a8e589ef7ff2" + sha256 cellar: :any, big_sur: "bca0197271b673ba235c37334494b47250c9732e9a0164d8ee79948fc3cd4308" + sha256 cellar: :any, catalina: "b410b124973bf31beb58806d4050b8dda1fb3dca679fc3443514025200fd4a37" + sha256 cellar: :any_skip_relocation, arm64_linux: "8703574aca9ad47530cd56fdb31ec1e24b16643390a0cda290e19271a9a47690" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8daac6acbeaad9583ff26d72a8ad440ac41efb8656973213902bdfe66cd61e6" + end + + depends_on "cmake" => :build + + def install + # Fix build with CMake 4.0+. + inreplace "CMakeLists.txt", + "cmake_minimum_required(VERSION 2.8)", + "cmake_minimum_required(VERSION 3.10)" + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath}" + + system "make", "config", "prefix=#{prefix}", "shared=1" + system "make", "install" + + pkgshare.install "graphs" + end + + test do + ["4elt", "copter2", "mdual"].each do |g| + cp pkgshare/"graphs/#{g}.graph", testpath + system bin/"graphchk", "#{g}.graph" + system bin/"gpmetis", "#{g}.graph", "2" + system bin/"ndmetis", "#{g}.graph" + end + cp [pkgshare/"graphs/test.mgraph", pkgshare/"graphs/metis.mesh"], testpath + system bin/"gpmetis", "test.mgraph", "2" + system bin/"mpmetis", "metis.mesh", "2" + end +end diff --git a/Formula/m/metricbeat.rb b/Formula/m/metricbeat.rb new file mode 100644 index 0000000000000..855d600ce7d12 --- /dev/null +++ b/Formula/m/metricbeat.rb @@ -0,0 +1,89 @@ +class Metricbeat < Formula + desc "Collect metrics from your systems and services" + homepage "https://www.elastic.co/beats/metricbeat" + url "https://github.com/elastic/beats.git", + tag: "v9.2.0", + revision: "09b547febe1cc9102a5d3f80ac8fbf68a5fd84f5" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dbcbfec0b7ec2a5aec6dbb8a14f860bb1b2f468cd2b00c86c50588a895a6f3bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5934de52680cf95165a276d735392a8bdc94098502d695853ad2a373949576d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcaa192343fb966de6e502c67caa9553470964f85221a3790fbc87433445627d" + sha256 cellar: :any_skip_relocation, sonoma: "4e39964ddae3daf2260c1700e54088b8b9681ccce6d830380f844621cafdc33c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ec79746912dc1c7a1ddb50e09e494b3c405c7eeceb2f872e53189f31f93b671" + sha256 cellar: :any_skip_relocation, x86_64_linux: "069c4e7ccbf27eaefaca7d80a2a2f7bda78de753f475a1a10c27ce6599ad30e2" + end + + depends_on "go" => :build + depends_on "mage" => :build + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + # remove non open source files + rm_r("x-pack") + + cd "metricbeat" do + # don't build docs because it would fail creating the combined OSS/x-pack + # docs and we aren't installing them anyway + inreplace "magefile.go", "mg.Deps(CollectDocs, FieldsDocs)", "" + + system "mage", "-v", "build" + system "mage", "-v", "update" + + pkgetc.install Dir["metricbeat.*", "fields.yml", "modules.d"] + (libexec/"bin").install "metricbeat" + prefix.install "build/kibana" + end + + (bin/"metricbeat").write <<~SH + #!/bin/sh + exec #{libexec}/bin/metricbeat \ + --path.config #{etc}/metricbeat \ + --path.data #{var}/lib/metricbeat \ + --path.home #{prefix} \ + --path.logs #{var}/log/metricbeat \ + "$@" + SH + + chmod 0555, bin/"metricbeat" # generate_completions_from_executable fails otherwise + generate_completions_from_executable(bin/"metricbeat", "completion", shells: [:bash, :zsh]) + end + + service do + run opt_bin/"metricbeat" + end + + test do + (testpath/"config/metricbeat.yml").write <<~YAML + metricbeat.modules: + - module: system + metricsets: ["load"] + period: 1s + output.file: + enabled: true + path: #{testpath}/data + filename: metricbeat + YAML + + (testpath/"logs").mkpath + (testpath/"data").mkpath + + pid = spawn bin/"metricbeat", "--path.config", testpath/"config", "--path.data", testpath/"data" + + sleep 15 + + output = JSON.parse((testpath/"data/meta.json").read) + assert_includes output, "first_start" + + (testpath/"data").glob("metricbeat-*.ndjson") do |file| + s = JSON.parse(file.read.lines.first.chomp) + assert_match "metricbeat", s["@metadata"]["beat"] + end + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/m/metview.rb b/Formula/m/metview.rb new file mode 100644 index 0000000000000..fc117699c80a4 --- /dev/null +++ b/Formula/m/metview.rb @@ -0,0 +1,121 @@ +class Metview < Formula + desc "Meteorological workstation software" + homepage "https://metview.readthedocs.io/en/latest/" + url "https://confluence.ecmwf.int/download/attachments/51731119/MetviewBundle-2025.4.0-Source.tar.gz" + version "5.25.0" + sha256 "ebfa17e3db63c72a2caad5a13136d0e86f300cc8cdaa31c98ed4ff5034aebc09" + license "Apache-2.0" + + livecheck do + url "https://confluence.ecmwf.int/display/METV/The+Metview+Source+Bundle" + regex(%r{>\s*Metview\s*<.+?]*?>\s*v?(\d+(?:\.\d+)+)\s* :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "eccodes" + depends_on "eigen" + depends_on "fftw" + depends_on "gdbm" + depends_on "glib" + depends_on "libaec" + depends_on "libpng" + depends_on "lz4" + depends_on "netcdf" + depends_on "netcdf-cxx" + depends_on "openssl@3" + depends_on "pango" + depends_on "proj" + depends_on "qt5compat" + depends_on "qtbase" + depends_on "qtsvg" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "expat" + + on_macos do + depends_on "gcc" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "libtirpc" + depends_on "openblas" + depends_on "snappy" + end + + def install + # https://jira.ecmwf.int/plugins/servlet/desk/portal/4/SD-110363 + inreplace "metview/CMakeLists.txt", "cmake_policy(SET CMP0046 OLD)", "cmake_policy(SET CMP0046 NEW)" + args = %W[ + -DBUNDLE_SKIP_ECCODES=1 + -DENABLE_MIR_DOWNLOAD_MASKS=OFF + -DENABLE_BUILD_TOOLS=OFF + -DENABLE_ECKIT_CMD=OFF + -DFFTW_PATH=#{Formula["fftw"].opt_prefix} + ] + + if OS.linux? + args += [ + "-DRPC_PATH=#{Formula["libtirpc"].opt_prefix}", + "-DRPC_INCLUDE_DIR=#{Formula["libtirpc"].opt_include}/tirpc", + ] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Avoid references to Homebrew shims directory + # (ecbuild stores some references to the build directory - not used, so we can remove them) + rm lib/"metview-bundle/bin/metview_bin/compile" + rm_r lib/"metview-bundle/lib/pkgconfig" + rm_r lib/"metview-bundle/include" + end + + test do + # test that the built-in programming language can print a string + (testpath/"test_binary_run_hello.mv").write <<~EOS + print("Hello world") + EOS + binary_output = shell_output("#{bin}/metview -nocreatehome -b test_binary_run_hello.mv") + assert_match "Hello world", binary_output + + # test that the built-in programming language can compute a number + (testpath/"test_binary_run_maths.mv").write <<~EOS + print(6*7) + EOS + binary_output = shell_output("#{bin}/metview -nocreatehome -b test_binary_run_maths.mv") + assert_match "42", binary_output + + # test that Metview is linked properly with eccodes and magics and can produce a plot from GRIB data + (testpath/"test_binary_run_grib_plot.mv").write <<~EOS + gpt = create_geo(latitudes:|5, 10, 15|, longitudes:|30, 40, 35|, values: |5, 1, 3|) + grib = geo_to_grib(geopoints: gpt, grid: [5,5]) + grid_shading = mcont( + contour_shade : "on", + contour_shade_technique : "grid_shading") + setoutput(png_output(output_name:"test")) + plot(grib, grid_shading) + EOS + system bin/"metview", "-nocreatehome", "-b", "test_binary_run_grib_plot.mv" + assert_path_exists testpath/"test.1.png" + end +end diff --git a/Formula/m/mfcuk.rb b/Formula/m/mfcuk.rb new file mode 100644 index 0000000000000..791bbabb94f1b --- /dev/null +++ b/Formula/m/mfcuk.rb @@ -0,0 +1,40 @@ +class Mfcuk < Formula + desc "MiFare Classic Universal toolKit" + homepage "https://github.com/nfc-tools/mfcuk" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mfcuk/mfcuk-0.3.8.tar.gz" + sha256 "977595765b4b46e4f47817e9500703aaf5c1bcad39cb02661f862f9d83f13a55" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d64c65224a51793f1dd148741d3750dfed188a452c99793321837ee4e6ff98e0" + sha256 cellar: :any, arm64_sequoia: "102426161778216f2bf11462bbaa8bb369a883cc818b560491d85bc5307ef9d9" + sha256 cellar: :any, arm64_sonoma: "b607795d4f69c5e9a8b6cb6b6017411e8acff391b71ea51e86229352a9ea4a91" + sha256 cellar: :any, arm64_ventura: "c9ab885a21f8102b6a0f9256a565f35a2501a635880bc9e0f6aaf07c766fe97f" + sha256 cellar: :any, arm64_monterey: "7b5be1129fc0bd29968d0c863391b101892525aacb5146316095066a87c652aa" + sha256 cellar: :any, arm64_big_sur: "f37625d6d5f84b70a6e85359da444790d64a56f898c8051c41f314ad061cbc42" + sha256 cellar: :any, sonoma: "f9b5beef9f7da2eebc104e24cd3fa5021a0cd0b5a592931f7ca8e7e90ededffb" + sha256 cellar: :any, ventura: "c126f3f7da887cb15754a7e9ac59cd9f70bebb9bca2d4a931395a4bcdea9895e" + sha256 cellar: :any, monterey: "fb3c96007c69c0b301d8dbe1d4c05b21e5ecfe16927e18cdc8d8e3d1179f8ae6" + sha256 cellar: :any, big_sur: "0da7f4ed6a6b71a7960274fc7f020510d289269d6a3ed1e8f84f884a2619a684" + sha256 cellar: :any, catalina: "c9191edf0484422fa432827e017d05d4854cde1fd8194a3735eec0e060884652" + sha256 cellar: :any_skip_relocation, arm64_linux: "360682a51ff5e48899affc75b1fa66db90faf99ebdde7059cc0dce49f319bf03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce46cb3bb5f400139ff5e306dbdd76d4e1c0fe62acd3b9bc5711e3cc734ee835" + end + + depends_on "pkgconf" => :build + depends_on "libnfc" + depends_on "libusb" + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"mfcuk", "-h" + end +end diff --git a/Formula/m/mfem.rb b/Formula/m/mfem.rb new file mode 100644 index 0000000000000..362ffe22ab69c --- /dev/null +++ b/Formula/m/mfem.rb @@ -0,0 +1,65 @@ +class Mfem < Formula + desc "Free, lightweight, scalable C++ library for FEM" + homepage "https://mfem.org/" + url "https://github.com/mfem/mfem/archive/refs/tags/v4.8.tar.gz" + sha256 "65472f732d273832c64b2c39460649dd862df674222c71bfa82cf2da76705052" + license "BSD-3-Clause" + revision 2 + head "https://github.com/mfem/mfem.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "9f2c75c87ae6c6287e7b47206494d25129be0c29604dee11c6f31db8c7396461" + sha256 cellar: :any, arm64_sequoia: "206d35c1e7363b016d0db71587a929bf159935baebe38612873b4d77aaa0b21f" + sha256 cellar: :any, arm64_sonoma: "b9f0579107be2a9c6f3ba45e4c7c81ce842ad7c4caf1d24f9ab11938dfc4e4db" + sha256 cellar: :any, sonoma: "f8b98c0b761151593d3a2d87fbdfa41b2a25f850a5f79641612aaa9f51eac0cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "c03044cdec3a8cf55403e7c0ff67d0b6cb4e4f008ffa64d6b3a53382342c43b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45e7d9d5a3b6573e91b176cc3d8a10b746d5b62cd24a8a1a06cdea0afb87b532" + end + + depends_on "cmake" => :build + depends_on "hypre" # optional "mpi" + depends_on "metis" # optional "metis" + depends_on "open-mpi" + depends_on "openblas" + depends_on "suite-sparse" + + # build patch to support Hypre 3.0, bug report, https://github.com/mfem/mfem/issues/5042 + # upstream pr ref, https://github.com/mfem/mfem/pull/4975 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mfem/4.8-support-hypre-3.0.patch" + sha256 "e490973f6b74f71c54f6449a8832575eb96c1562468210c444847109470d114f" + end + + def install + # fix `lib/cmake/mfem/MFEMConfig.cmake` file audit failure + inreplace "config/cmake/MFEMConfig.cmake.in", "@CMAKE_CXX_COMPILER@", ENV.cxx + + # fix `share/mfem/config.mk` file audit failure + inreplace "config/config.mk.in", "@MFEM_CXX@", ENV.cxx + inreplace "config/config.mk.in", "@MFEM_HOST_CXX@", ENV.cxx + + args = [ + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DMFEM_USE_MPI=YES", + "-DMFEM_USE_METIS_5=YES", + "-DMFEM_USE_SUITESPARSE=YES", + "-DMFEM_USE_NETCDF=NO", + "-DMFEM_USE_SUPERLU=NO", + ] + args << "-DMFEM_USE_LAPACK=YES" if OS.linux? + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples", "data" + end + + test do + cp_r pkgshare/"examples", testpath + cp pkgshare/"data/star.mesh", testpath/"examples" + system "make", "-C", testpath/"examples", "all", "MFEM_INSTALL_DIR=#{prefix}", "CONFIG_MK=#{pkgshare}/config.mk" + args = ["-m", testpath/"examples/star.mesh", "--no-visualization"] + system testpath/"examples/ex1", *args + system "mpirun", "-np", "1", testpath/"examples/ex1p", *args + end +end diff --git a/Formula/m/mfoc.rb b/Formula/m/mfoc.rb new file mode 100644 index 0000000000000..7937aa7357a71 --- /dev/null +++ b/Formula/m/mfoc.rb @@ -0,0 +1,43 @@ +class Mfoc < Formula + desc "Implementation of 'offline nested' attack by Nethemba" + homepage "https://github.com/nfc-tools/mfoc" + url "https://github.com/nfc-tools/mfoc/archive/refs/tags/mfoc-0.10.7.tar.gz" + sha256 "2dfd8ffa4a8b357807680d190a91c8cf3db54b4211a781edc1108af401dbaad7" + license "GPL-2.0-only" + revision 2 + head "https://github.com/nfc-tools/mfoc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3bc4430e432a6be762cc41bde75929ad6fe8395ce5b851fee12e161c81c6bf21" + sha256 cellar: :any, arm64_sequoia: "3b89cfda6f79a47fad9df8891458eaf4923c2c6fdea0e17a75bd5f9c1fe7fdc3" + sha256 cellar: :any, arm64_sonoma: "1d07e71a99eb298fee125dca589933a08e3c4559932a30f4fa7cd162b4852ff9" + sha256 cellar: :any, arm64_ventura: "d49bb67cdb4749b3c1d5d8150ddfb77d1a48b4a5eafefb0a25f3c26ef1dbc9c2" + sha256 cellar: :any, arm64_monterey: "f11d48dde5f68cb4bfdb4e41dd3fff7e123fa10a9ca7efae8b63ab802a7a85e1" + sha256 cellar: :any, arm64_big_sur: "91a8acedb7304016340cda6367f447e0f64d2c1e0f36ce25b414fc13fd09c5b0" + sha256 cellar: :any, sonoma: "7eca0568d9e83844424b0d3fb5bbdeac88c09b69054ee245a014274be4d825ab" + sha256 cellar: :any, ventura: "fe4940b2a72f324ba2c68b9d9cd454b1aeedaae44634a24fbaf6b64fab2a737d" + sha256 cellar: :any, monterey: "105fa3c4775e833eeae572bf9390702e56111eace14cae4f9391fc9f91d6b263" + sha256 cellar: :any, big_sur: "8c753373dea6cbd38da65e10340974fbeb654d1ced7c68a75d4a414360b73a39" + sha256 cellar: :any_skip_relocation, arm64_linux: "b488915855d2b7999488a17cfa7c4a8025043b225d606baff0662e33a0b0124f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3582c2f917cc657ba2c249b26fb0b064f5f93dcbee7e5fd310dec652c123450" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libnfc" + depends_on "libusb" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "No NFC device found", shell_output("#{bin}/mfoc -O /dev/null", 1) + end +end diff --git a/Formula/m/mfterm.rb b/Formula/m/mfterm.rb new file mode 100644 index 0000000000000..23535b27a73c8 --- /dev/null +++ b/Formula/m/mfterm.rb @@ -0,0 +1,58 @@ +class Mfterm < Formula + desc "Terminal for working with Mifare Classic 1-4k Tags" + homepage "https://github.com/4ZM/mfterm" + url "https://github.com/4ZM/mfterm/releases/download/v1.0.7/mfterm-1.0.7.tar.gz" + sha256 "b6bb74a7ec1f12314dee42973eb5f458055b66b1b41316ae0c5380292b86b248" + license "GPL-3.0-or-later" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ac306ee70b005b1e01bda26e00b9905ae5d4c940cf59df3a103c02fb1b95e45b" + sha256 cellar: :any, arm64_sequoia: "c39d49d9fc6ecddfb36e2e6f92b5e0e130ab8f02a9e8865a33a5cf022479a528" + sha256 cellar: :any, arm64_sonoma: "f8fe27bad6cfa36a2883513d7d5656022c08cd96974fe350a5e77f51a668fca1" + sha256 cellar: :any, arm64_ventura: "d6700be1830322a6b2c164cecdfcdbeb2285c4ab2db1518a0782f820e842b63b" + sha256 cellar: :any, arm64_monterey: "a8910ab8b9320d26fb258e95f1d2d8a1d5d8dfcbed739464c916e6f0b6b8b896" + sha256 cellar: :any, arm64_big_sur: "d8ebffdc37a5ab667c1e7c969d66bf2407c820ade96701806fc149f8e95ffe78" + sha256 cellar: :any, sonoma: "12c14653abe38cfd1333ddd11f24fe60e54e9eb5a19e5d6422983fb843a2bc96" + sha256 cellar: :any, ventura: "bf979c85bd74aef426a7d1911fb54ec6e9d3e187c2fba1b692dc502020b832cc" + sha256 cellar: :any, monterey: "524e0778d1d15de19bbb7e5f052c338542f2fd4684f4f1cae018cf662bbb1f81" + sha256 cellar: :any, big_sur: "4f1976bef27bb44358dfb064726b666b3b7e08a7e2670d0964423fa78b8afa1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b288c27869934494b9292653aa589910b896d63537cdfcc4e6674455a443c0c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84f878e049935d495a6621ac26fb0757f6a936c4e85fa2f6ba1058feb4e7d844" + end + + head do + url "https://github.com/4ZM/mfterm.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "libnfc" + depends_on "openssl@3" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_linux do + depends_on "readline" + end + + def install + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include}" + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib}" + + if build.head? + chmod 0755, "./autogen.sh" + system "./autogen.sh" + end + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"mfterm", "--version" + end +end diff --git a/Formula/m/mftrace.rb b/Formula/m/mftrace.rb new file mode 100644 index 0000000000000..78869bde0f523 --- /dev/null +++ b/Formula/m/mftrace.rb @@ -0,0 +1,53 @@ +class Mftrace < Formula + desc "Trace TeX bitmap font to PFA, PFB, or TTF font" + homepage "https://lilypond.org/mftrace/" + url "https://lilypond.org/downloads/sources/mftrace/mftrace-1.2.20.tar.gz" + sha256 "626b7a9945a768c086195ba392632a68d6af5ea24ef525dcd0a4a8b199ea5f6f" + license "GPL-2.0-only" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?mftrace[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2d4dbf098949319339b846a75c34f03b67e6b9288be17881dc7a958e79d76000" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29733fe05cdd66d2cd8933ea426d6cfb64463151e1b3737e07308c77d8e3d05e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6ad6365585dc156c13d18d72590ba208b48291d43d023cd24d9dac509c4fb3b" + sha256 cellar: :any_skip_relocation, sonoma: "bd534c47c1a7b6c0d8ede69c36d0334ea7ce6acb61b9e120cde5ce2a1ecb21e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "99a63f01ac23f29dc26b14cd63a5f51bb0cdc489d3a902e3d376ae4c64662d87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2f5a4759a519ac0eb0ca66dca1ce9d57d096dcd55855b00c803fa02f9921358" + end + + head do + url "https://github.com/hanwen/mftrace.git", branch: "master" + depends_on "autoconf" => :build + end + + depends_on "fontforge" + depends_on "potrace" + depends_on "python@3.14" + depends_on "t1utils" + + # Fixed in https://github.com/hanwen/mftrace/pull/14 + resource "manpage" do + url "https://github.com/hanwen/mftrace/raw/release/1.2.20/gf2pbm.1" + sha256 "f2a7234cba5f59237e3cc1f67e395046b381a012456d4e6e9963673cf35d46fb" + end + + def install + ENV["PYTHON"] = which("python3.14") + buildpath.install resource("manpage") if build.stable? + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"mftrace", "--version" + end +end diff --git a/Formula/m/mg.rb b/Formula/m/mg.rb new file mode 100644 index 0000000000000..5ce11b1a9e3a0 --- /dev/null +++ b/Formula/m/mg.rb @@ -0,0 +1,50 @@ +class Mg < Formula + desc "Small Emacs-like editor" + homepage "https://github.com/ibara/mg" + url "https://github.com/ibara/mg/releases/download/mg-7.3/mg-7.3.tar.gz" + sha256 "1fd52feed9a96b93ef16c28ec4ff6cb25af85542ec949867bffaddee203d1e95" + license all_of: [:public_domain, "ISC", "BSD-2-Clause", "BSD-3-Clause", "BSD-4-Clause"] + version_scheme 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8be28a3fd77e3ae1a7a94dc2f2effed298f61b92528075c748535ff78a542eab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14c363b5eeea07b8f117cb74b9676ae6a92dc26a9f1f39d9d9169fda5577a242" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "31940ad999d42c596d86df83651fea272faf4da53ec9b69b71b05165ec01d5bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "22b26617c6ce69d7c1e5e69a0628aac1db8f60e164c788bb7784841fd02818a5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f367179c081b6bd5f234d68d8134466d1d7a7e457b3258053da668e454b087bb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a1ae7a5e2cc9fcca2bb497a9dc76bd7473b204a2f806edc1db524dd5aba9e5f2" + sha256 cellar: :any_skip_relocation, sonoma: "898a96da03a4a7adf3fd3ec361fc457153c43e9e803f9d00fcefed541591b6d3" + sha256 cellar: :any_skip_relocation, ventura: "908aaa04c673ffa9db16ac98987b01b6d822a1285f3ab62a0e4d4f0c2d38b919" + sha256 cellar: :any_skip_relocation, monterey: "e3190e17138e2c21d7429ff591be1c3d574a7e13a0e1a10457f2e479cc5bf9e7" + sha256 cellar: :any_skip_relocation, big_sur: "12e3599c5fe68404690bae22a653cc00915cdf797041be2d67845e4760d41df7" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cc7f3ad4ae912fabafe2f0aaf6cb1624a2d786769a7632ea956bd03c72b8c09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df7547e37e627c0504896e045d8c8df6adc3ea3dbdade674b1b964fcf333397f" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}" + system "make" + system "make", "install" + end + + test do + require "pty" + PTY.spawn({ "TERM" => "xterm" }, bin/"mg", "test") do |r, w, pid| + sleep 1 + w.write "brew\n\u0018\u0003y" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + ensure + r.close + w.close + Process.wait(pid) + end + assert_equal "brew\n", (testpath/"test").read + end +end diff --git a/Formula/m/mgba.rb b/Formula/m/mgba.rb new file mode 100644 index 0000000000000..db8e62b7a4b49 --- /dev/null +++ b/Formula/m/mgba.rb @@ -0,0 +1,110 @@ +class Mgba < Formula + desc "Game Boy Advance emulator" + homepage "https://mgba.io/" + license "MPL-2.0" + revision 1 + + stable do + url "https://github.com/mgba-emu/mgba/archive/refs/tags/0.10.5.tar.gz" + sha256 "91d6fbd32abcbdf030d58d3f562de25ebbc9d56040d513ff8e5c19bee9dacf14" + depends_on "qt@5" + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "06db0999e64a0a60335fcc7104da11ddbc37efc467f983794fcbe21a6f4a96e1" + sha256 arm64_sequoia: "0b47b22819b56f4f974b3bc13229329cbef0fc1df0474a2d2ffba3ced580b2e5" + sha256 arm64_sonoma: "038e56d90cd6ded9ac8150847bc86c43dc57c2441496916c2a0f3b232608927c" + sha256 arm64_ventura: "0e89003774f3a0164c890f1732242969cc013b269b037bd01d8b97a3ae4bf4a7" + sha256 sonoma: "d56566a7d206c7850126abbcb2c85ea659f995c30efce5886344e27aeca427e7" + sha256 ventura: "d90396f1c7b48efb28edfd391a82fc0a6bb83a9dd3046398f8b5a16b66a4eea3" + sha256 arm64_linux: "4010cdf78831d4f4c5a0be25eb02f7acfa31b6e5d7d74dde4bd00247e1d9cb5b" + sha256 x86_64_linux: "4ef9822d552b0d2ac6d038f63539af007285ed9132e0098594ebb49ef10278c1" + end + + head do + url "https://github.com/mgba-emu/mgba.git", branch: "master" + + depends_on "qttools" => :build + depends_on "freetype" + depends_on "qtbase" + depends_on "qtmultimedia" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "ffmpeg" + depends_on "libepoxy" + depends_on "libpng" + depends_on "libzip" + depends_on "lua" + depends_on "sdl2" + depends_on "sqlite" + + uses_from_macos "libedit" + uses_from_macos "zlib" + + on_macos do + # https://github.com/mgba-emu/mgba/issues/3129 + depends_on "libelf" => :build + end + + on_linux do + depends_on "elfutils" + depends_on "mesa" + end + + def install + args = [] + # TODO: Remove minimum policy in 0.11. Upstream commit doesn't cleanly apply + # https://github.com/mgba-emu/mgba/commit/e95b81f1f7b95161fbda81fa5e931e3bcb193ccf + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" if build.stable? + # https://github.com/mgba-emu/mgba/issues/3115 + args << "-DUSE_DISCORD_RPC=OFF" if OS.linux? + + inreplace "src/platform/qt/CMakeLists.txt" do |s| + # Disable CMake fixup_bundle to prevent copying dylibs into app bundle + s.gsub! "fixup_bundle(", "# \\0" + # Install .app bundle into prefix, not prefix/Applications + s.gsub! "Applications", "." + end + + # Fix OpenGL linking on macOS. + if OS.mac? + if build.stable? + inreplace "CMakeLists.txt", + "list(APPEND DEPENDENCY_LIB ${EPOXY_LIBRARIES})", + 'list(APPEND DEPENDENCY_LIB ${EPOXY_LIBRARIES} "-framework OpenGL")' + else + # Work around failure running `cmake -E tar` within brew's build environment. + # CMake Error: Unable to read from file 'fish.fs': Could not open extended attribute file + # FIXME: Build is fine outside brew's environment + args << "-DUSE_LIBZIP=OFF" + end + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Replace SDL frontend binary with a script for running Qt frontend + # -DBUILD_SDL=OFF would be easier, but disable joystick support in Qt frontend + rm bin/"mgba" + if OS.mac? + bin.write_exec_script "#{prefix}/mGBA.app/Contents/MacOS/mGBA" + else + mv bin/"mgba-qt", bin/"mGBA" + end + end + + test do + # mGBA opens a GUI with other commands, so we can only check the version + assert_match version.to_s, shell_output("#{bin}/mGBA --version") + end +end diff --git a/Formula/m/mgis.rb b/Formula/m/mgis.rb new file mode 100644 index 0000000000000..9b018670d3bf2 --- /dev/null +++ b/Formula/m/mgis.rb @@ -0,0 +1,66 @@ +class Mgis < Formula + desc "Provide tools to handle MFront generic interface behaviours" + homepage "https://thelfer.github.io/mgis/web/index.html" + url "https://github.com/thelfer/MFrontGenericInterfaceSupport/archive/refs/tags/MFrontGenericInterfaceSupport-3.0.tar.gz" + sha256 "dae915201fd20848b69745dabda1a334eb242d823af600825b8b010ddc597640" + license any_of: ["LGPL-3.0-only", "CECILL-1.0"] + revision 3 + head "https://github.com/thelfer/MFrontGenericInterfaceSupport.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b9de255b0e7dd13ccacf98b07e48ccc8c47f241eb8c52dc45a650e352b39d3b4" + sha256 cellar: :any, arm64_sequoia: "8777e0f76749fbaf403a6f58f347228504437d570a73b954ea88db500ecc72d1" + sha256 cellar: :any, arm64_sonoma: "01f29c48e1951f74a20584362183e48ea0a73717d20d73e63666a9166f852ea6" + sha256 cellar: :any, sonoma: "ca86411b44375bc98f40281b50eda51f914b61bbf137b0c31f0015c85da73e9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "78cc8af7564994ea4b4380dd99c6598505b6f22a528689bb36d63f126b71d069" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9f3936f304385534e0ab9d2a7dd5b98d10c7cd4e78c6fda2ad02d3a035b9c1b" + end + + depends_on "cmake" => :build + + depends_on "boost-python3" + depends_on "gcc" # for gfortran + depends_on "numpy" + depends_on "python@3.14" + + def python3 + which("python3.14") + end + + def install + args = [ + "-Denable-portable-build=ON", + "-Denable-website=OFF", + "-Denable-enable-doxygen-doc=OFF", + "-Denable-c-bindings=ON", + "-Denable-fortran-bindings=ON", + "-Denable-python-bindings=ON", # requires boost-python + "-Denable-fenics-bindings=OFF", # experimental and very limited + "-Denable-julia-bindings=OFF", # requires CxxWrap library + "-Denable-enable-static=OFF", + "-Ddisable_python_library_linking=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DPython_ADDITIONAL_VERSIONS=#{Language::Python.major_minor_version python3}", + ] + + if OS.mac? + # Use -dead_strip_dylibs to avoid linkage to boost container and graph modules + # Issue ref: https://github.com/boostorg/boost/issues/985 + linker_flags = %W[ + -Wl,-dead_strip_dylibs + -Wl,-rpath,#{rpath(source: prefix/Language::Python.site_packages(python3)/"mgis")} + ] + args << "-DCMAKE_MODULE_LINKER_FLAGS=#{linker_flags.join(" ")}" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system python3, "-c", "import mgis.behaviour" + system python3, "-c", "import mgis.model" + end +end diff --git a/Formula/m/mhash.rb b/Formula/m/mhash.rb new file mode 100644 index 0000000000000..8dceb1863f298 --- /dev/null +++ b/Formula/m/mhash.rb @@ -0,0 +1,54 @@ +class Mhash < Formula + desc "Uniform interface to a large number of hash algorithms" + homepage "https://mhash.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz" + sha256 "3dcad09a63b6f1f634e64168dd398e9feb9925560f9b671ce52283a79604d13e" + license all_of: ["LGPL-2.0-or-later", "LGPL-2.1-or-later", "GPL-2.0-or-later"] + + livecheck do + url :stable + regex(%r{url=.*?/mhash[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4c77322acecec89a57350e794b5712a3f2cf530d0550000918584f8071a9c563" + sha256 cellar: :any, arm64_sequoia: "f9b2ec3b67100dfe39ef4bb32671b26b5dbff6044b02ddae177b9bb1429ae036" + sha256 cellar: :any, arm64_sonoma: "d9cc9da019d2ce0fe3aab219247d9ebd9f2fb744af69871d13dc97925e0e7295" + sha256 cellar: :any, arm64_ventura: "63173c41e68e4510a36b6c3301d8f556a5c15010bff40258853f4ec735c74c68" + sha256 cellar: :any, arm64_monterey: "f4f6e0a5a12cde078c2397874e309565d84a5599cbad4d5772ee13131deba98e" + sha256 cellar: :any, arm64_big_sur: "4f7da0cd859fc828d90946d6c6b80d80a60a85ffe4f82f9dd299ff1b8ba1bb54" + sha256 cellar: :any, sonoma: "bf4915b6d6d2e38c61c22948831c93cdd30b4db8ce5d234066f0238a3fbc7805" + sha256 cellar: :any, ventura: "751e17fd25843aebabf5c229d75476f6e854041c4a233329a7147b02e7050d87" + sha256 cellar: :any, monterey: "a8dbb4a5d3b15a10104683fdea162c85714cc0f4ef6f313c06aab7ddd0d1d42a" + sha256 cellar: :any, big_sur: "4553e5e48c17e06ad3290dd6ceabb6c9fee21be5b70194c03dd03d7bda873209" + sha256 cellar: :any, catalina: "d7d0a96656fbae5b279223d120bfe456c775a0c751090049bcf3ffffb2231761" + sha256 cellar: :any_skip_relocation, arm64_linux: "55c3040b1081fba7cad5ff2ccd248b37b8face8513a609bdeff9a47c31241713" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32a5e81c29e8407754448e5aa7f1f8ea2328bc5ce266ab5f3b350e3174373900" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + # Regenerate the very old configure script that isn't suitable for modern macOS. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "mhash.h" + int main() { + MHASH td; + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lmhash", "-o", "test" + system "./test" + end +end diff --git a/Formula/m/mhonarc.rb b/Formula/m/mhonarc.rb new file mode 100644 index 0000000000000..7fa14f8a3d555 --- /dev/null +++ b/Formula/m/mhonarc.rb @@ -0,0 +1,33 @@ +class Mhonarc < Formula + desc "Mail-to-HTML converter" + homepage "https://www.mhonarc.org/" + url "https://cpan.metacpan.org/authors/id/L/LD/LDIDRY/MHonArc-2.6.24.tar.gz" + sha256 "457dc7374ee59cb75a0729e51cef2f2c52b48180f739d8fd956ea19882815f33" + license "GPL-2.0-or-later" + head "https://github.com/sympa-community/mhonarc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "c6d3c93cbdca1f8cfba7471ad031646541f79d166e2a560006c6f445d748fa33" + end + + depends_on "perl" + + def install + # Using Perl's `installprefix` rather than `prefix` allows install.me to use + # Homebrew Perl directory structure even if the prefixes are different paths. + inreplace "install.me", "$Config{'prefix'}", "$Config{'installprefix'}" + + system "perl", "install.me", + "-batch", + "-perl", Formula["perl"].opt_bin/"perl", + "-prefix", prefix + + bin.install "mhonarc" + end + + test do + system bin/"mhonarc", "-v" + end +end diff --git a/Formula/m/micro.rb b/Formula/m/micro.rb new file mode 100644 index 0000000000000..99ee09f1eab79 --- /dev/null +++ b/Formula/m/micro.rb @@ -0,0 +1,34 @@ +class Micro < Formula + desc "Modern and intuitive terminal-based text editor" + homepage "https://github.com/zyedidia/micro" + url "https://github.com/zyedidia/micro.git", + tag: "v2.0.14", + revision: "04c577049ca898f097cd6a2dae69af0b4d4493e1" + license "MIT" + head "https://github.com/zyedidia/micro.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e391c71bd5666b01c1362cf89d9067077c8958ef3bb3fa26ad71c416b739ce9a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "73b14a51ea6138cc9dd4892ac69c1f1621824315c7d2e40ee8867b39db8e1bcc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c51f1a11fe4f9fa233ce8459e4fc4b0105c9d24f3f0855e50979d35b2a3de0e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1875a20cb2321214d7cf88b3f98c045d6d1e303b7889544b04a0c7b234217e4d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cf26b77b02d965b093ca4dc67710792d8009ede8634a523dbadac3d340b19a6a" + sha256 cellar: :any_skip_relocation, sonoma: "f72a6f86533a0065f6e29964b5f6b88d20528b6cec86411a4cb22fe2aa5a2e89" + sha256 cellar: :any_skip_relocation, ventura: "bf44beaab0f1a685d5bca117b0aa86ce0bfe4edcbd44c12dbcb493fdb5b27c29" + sha256 cellar: :any_skip_relocation, monterey: "05906fffbde05ec39f1f1d2b05c2f73fa43c4f5c5b7bd233fea1a9292a8c9265" + sha256 cellar: :any_skip_relocation, arm64_linux: "70725916fc322eaca076503f83e6782ddaebf10794841b3220dcaabbc7f6bd4c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbb3b288471091c23205f85c2dd964c4c855fb60165f075f5eca4f23ec998a08" + end + + depends_on "go" => :build + + def install + system "make", "build-tags" + bin.install "micro" + man1.install "assets/packaging/micro.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/micro -version") + end +end diff --git a/Formula/m/micro_inetd.rb b/Formula/m/micro_inetd.rb new file mode 100644 index 0000000000000..18330f2f23f4e --- /dev/null +++ b/Formula/m/micro_inetd.rb @@ -0,0 +1,48 @@ +class MicroInetd < Formula + desc "Simple network service spawner" + homepage "https://web.archive.org/web/20241115023917/https://acme.com/software/micro_inetd/" + url "https://pkg.freebsd.org/ports-distfiles/micro_inetd_14Aug2014.tar.gz" + version "2014-08-14" + sha256 "15f5558753bb50ed18e4a1445b3e8a185f3b1840ec8e017a5e6fc7690616ec52" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "420a213af59e22190bbe8acb13f7165b444246ecb3e9e5f3778a93b0a8c039a3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9693aed7c6ab1caf581335fefd2eea3fcde0e3b62fbbe1378cd81bba864410a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "232b03dbe326168f085f817aa5f54dfbd1d1793e6eced2991fcf5c27c932f3c4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2571772cdf0c887a13fa608f34a9bd4e866634f72c7df20a04aa6426e8e0f634" + sha256 cellar: :any_skip_relocation, arm64_monterey: "523ce480e35f50c093ebe4b0ae2c60b6a21007f0543a697b173c562c10a2639f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8c92f09e894e133f5f3a51c1df7c0a9a540daa8c2b5e028dd37a10afbfebdf40" + sha256 cellar: :any_skip_relocation, sonoma: "a43b8b8fc6ff27a158b7e2bedc62ed709c17c937b76644adfcdc4130902c2669" + sha256 cellar: :any_skip_relocation, ventura: "bae8f59efd2b2847b2b11456aef8219b50a3c60c9217b49219a6370d1bb69030" + sha256 cellar: :any_skip_relocation, monterey: "54355e595c1f260dae362dcea2dad1bd9a382fa37d787ccb9af801d34564f3a2" + sha256 cellar: :any_skip_relocation, big_sur: "61bb8fda68189596e32e2aa86e986b32779d61337498ca2145421b7dce09e40d" + sha256 cellar: :any_skip_relocation, catalina: "04b4028a1fab40575b422ea45b44317dc69170f85bf4fa07b4eb7d2f8df165ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "db73408b4adcb3c29579c532ad06896c258f1dbbf13057279df8b2a11e78cc3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c12f725a115ea5becccc0b125b34d285af5b5fc2be361cec10ba745ba8b238c" + end + + # Original URLs are dead and last release from 2014-08-14 + deprecate! date: "2025-03-18", because: :unmaintained + + def install + bin.mkpath + man1.mkpath + system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man1}" + end + + test do + port = free_port + pid = spawn bin/"micro_inetd", port.to_s, "/bin/echo", "OK" + + # wait for server to be running + sleep 1 + + TCPSocket.open("localhost", port) do |sock| + assert_equal "OK", sock.gets.strip + end + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/m/micromamba.rb b/Formula/m/micromamba.rb new file mode 100644 index 0000000000000..dc9b425f52f55 --- /dev/null +++ b/Formula/m/micromamba.rb @@ -0,0 +1,97 @@ +class Micromamba < Formula + desc "Fast Cross-Platform Package Manager" + homepage "https://github.com/mamba-org/mamba" + url "https://github.com/mamba-org/mamba/archive/refs/tags/2.3.3.tar.gz" + sha256 "4f1aaf3aa5098037c3fc1571feaa2d8f256829baafd6d5b4556624791e5c0217" + license "BSD-3-Clause" + revision 3 + head "https://github.com/mamba-org/mamba.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest do |json, regex| + json["name"]&.scan(regex)&.map { |match| match[0] } + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1a394062b5187c7fd2e1f888df36b57fe77b6c4715e38d5b091a3c43dc26cdec" + sha256 cellar: :any, arm64_sequoia: "49e9e3d4f5cd4684e199946469954e2aa94abb8a7e58f912311c8a6b3e27a534" + sha256 cellar: :any, arm64_sonoma: "61976cfad1d74e89dfcda26e47e269b5ad8909e477765793f73a836f33edf169" + sha256 cellar: :any, sonoma: "bbbfc9843b431b862d4227265fc292f50d23a8ca4e275400e125b61b3c6bf819" + sha256 cellar: :any_skip_relocation, arm64_linux: "66370e659f889039a5b78c93dae4d4e5735792eb3cdf0554f02e369982b102ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b1b90f7e8082b837629e4d6adc58552bc6a30667545d3ffdd7d0d61cad7ad99" + end + + depends_on "cli11" => :build + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + depends_on "spdlog" => :build + depends_on "tl-expected" => :build + + depends_on "fmt" + depends_on "libarchive" + depends_on "libsolv" + depends_on "lz4" + depends_on "openssl@3" + depends_on "reproc" + depends_on "simdjson" + depends_on "xz" + depends_on "yaml-cpp" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "bzip2" + uses_from_macos "curl", since: :ventura # uses curl_url_strerror, available since curl 7.80.0 + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1600 + end + + fails_with :clang do + build 1600 + cause "Requires C++23 support for `std::ranges::views::join`" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1600 + + args = %W[ + -DBUILD_LIBMAMBA=ON + -DBUILD_SHARED=ON + -DBUILD_STATIC=OFF + -DBUILD_MAMBA=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + # Upstream chooses names based on static or dynamic linking, + # but as of 2.0 they provide identical interfaces. + bin.install_symlink "mamba" => "micromamba" + end + + def caveats + <<~EOS + Please run the following to setup your shell: + #{opt_bin}/mamba shell init --shell --root-prefix ~/mamba + and restart your terminal. + EOS + end + + test do + ENV["MAMBA_ROOT_PREFIX"] = testpath.to_s + + assert_match version.to_s, shell_output("#{bin}/mamba --version").strip + assert_match version.to_s, shell_output("#{bin}/micromamba --version").strip + + # Using 'xtensor' (header-only package) to avoid "broken pipe" codesigning issue + # encountered on macOS 13-arm and 14-arm during CI. + system bin/"mamba", "create", "-n", "test", "xtensor", "-y", "-c", "conda-forge" + assert_path_exists testpath/"envs/test/include/xtensor.hpp" + end +end diff --git a/Formula/m/micronaut.rb b/Formula/m/micronaut.rb new file mode 100644 index 0000000000000..a9619da7e6d03 --- /dev/null +++ b/Formula/m/micronaut.rb @@ -0,0 +1,41 @@ +class Micronaut < Formula + desc "Modern JVM-based framework for building modular microservices" + homepage "https://micronaut.io/" + url "https://github.com/micronaut-projects/micronaut-starter/archive/refs/tags/v4.10.1.tar.gz" + sha256 "bcb2aa6db3542b08d160cad046d40096e2ae2c0dbea846b8bff73513d03055d7" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "11414f265fe8f27a04e34d3ffff38076099ead6b8f82dbf37ef1ea2fb2a447af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d126a4932d8d74b55017e5454c734ed75e36ee5f6b5c02e1092c2658b910f3d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c7152eea7daf39cb1fe2a16f6b115faf5cbe2b4e6cb74f92d9baf647c367eeb" + sha256 cellar: :any_skip_relocation, sonoma: "033bcbd9c22d7cb9892626d59814f127151ac01393a857b951be29a19d481b25" + sha256 cellar: :any_skip_relocation, arm64_linux: "f592e18dc4513eedeed7bb15cdd03cc3ad156ccd733b484bca3038ce5b3cb2bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6a7b9346b55c315636dfb96a6a45f8b6dda85856cc11e0e6ca2d3c3fcead883" + end + + # Issue ref: https://github.com/micronaut-projects/micronaut-starter/issues/2848 + depends_on "gradle@8" => :build + depends_on "openjdk@21" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home("21") + system "gradle", "micronaut-cli:assemble", "--exclude-task", "test", "--no-daemon" + + libexec.install "starter-cli/build/exploded/lib" + (libexec/"bin").install "starter-cli/build/exploded/bin/mn" + + bash_completion.install "starter-cli/build/exploded/bin/mn_completion" => "mn" + (bin/"mn").write_env_script libexec/"bin/mn", Language::Java.overridable_java_home_env("21") + end + + test do + system bin/"mn", "create-app", "hello-world" + assert_predicate testpath/"hello-world", :directory? + end +end diff --git a/Formula/m/microplane.rb b/Formula/m/microplane.rb new file mode 100644 index 0000000000000..22ec48075517d --- /dev/null +++ b/Formula/m/microplane.rb @@ -0,0 +1,39 @@ +class Microplane < Formula + desc "CLI tool to make git changes across many repos" + homepage "https://github.com/Clever/microplane" + url "https://github.com/Clever/microplane/archive/refs/tags/v0.0.37.tar.gz" + sha256 "437f65748272de89b8a6990f0f9fca57addf6ff6f8e4de077869976d2ce36154" + license "Apache-2.0" + head "https://github.com/Clever/microplane.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "058584a18f49f4de2e888c746d0d8b1c1b37f426f5112f280b3e3d803f1aea1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "058584a18f49f4de2e888c746d0d8b1c1b37f426f5112f280b3e3d803f1aea1a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "058584a18f49f4de2e888c746d0d8b1c1b37f426f5112f280b3e3d803f1aea1a" + sha256 cellar: :any_skip_relocation, sonoma: "2ca2def0a17ca6c5e596c8472f627e8b9af429460dcea2be1ba1e9d2cbbba0d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "5435b91897be54e019388f2901e08bd4fe7a2b89106b0c0c8190c4e4d9fc13ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9be326eae77275410bf28f9c682a3b34df3143d8e26123749d204aea973f4da2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(output: bin/"mp", ldflags: "-s -w -X main.version=#{version}") + + generate_completions_from_executable(bin/"mp", "completion") + end + + test do + # mandatory env variable + ENV["GITHUB_API_TOKEN"] = "test" + # create repos.txt + (testpath/"repos.txt").write <<~EOF + hashicorp/terraform + EOF + # create mp/init.json + system bin/"mp", "init", "-f", testpath/"repos.txt" + # test command + output = shell_output("#{bin}/mp plan -b microplaning -m 'microplane fun' -r terraform -- sh echo 'hi' 2>&1") + assert_match "planning", output + end +end diff --git a/Formula/m/micropython.rb b/Formula/m/micropython.rb new file mode 100644 index 0000000000000..a9c3942139440 --- /dev/null +++ b/Formula/m/micropython.rb @@ -0,0 +1,45 @@ +class Micropython < Formula + desc "Python implementation for microcontrollers and constrained systems" + homepage "https://www.micropython.org/" + url "https://github.com/micropython/micropython/releases/download/v1.26.1/micropython-1.26.1.tar.xz" + sha256 "12be6514df6272c0fcb328122b534af6b12abdd52435c19f40ee1707cc43ac98" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34d4153eff140960050eb3b08c24cbfe138fbd55e85c8118a56d4d9e2012d555" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0ab765f5f1bc6fa2898c55f91bc30a0d0f1c8581296c0d0453e259be597bae1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2ecdd66d12c3eb0c78b8d1d85c09c50253f5b5cc5075caaf7ddaa852ab898b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "122acd6b2da763a9f73f0407c00cf83edba31a4bcf6def7a56836d6d8e57da0e" + sha256 cellar: :any_skip_relocation, tahoe: "92ac93ba0e90802dcd12bfd9f7584baabb2b8cf7ed8165615e4aacf488463693" + sha256 cellar: :any_skip_relocation, sequoia: "80401bccc9ea2bda8139bda5e3866ff866b1109e9bd33b7a6224140ee4f9d1a0" + sha256 cellar: :any_skip_relocation, sonoma: "6391ea2db27df106305c64d2d9f0ceef198532b5fd377bbe4f38635cd65b17ea" + sha256 cellar: :any_skip_relocation, ventura: "1eaf682cf59c352b82b4fa32a7f312c32a9e2bf60a696a435bb525eced8aedf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "9acbde114ad7800db94b5552fa90d6368047baaa50b64e42aaabdd5a8d19c073" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1acb20eb6021d0874771f73ea6e071e25c06983b56f2c2725ecedf15961c6b9c" + end + + depends_on "pkgconf" => :build + uses_from_macos "libffi" + uses_from_macos "python" # Requires libffi v3 closure API + + def install + system "make", "-C", "ports/unix", "install", "PREFIX=#{prefix}" + bin.install "mpy-cross/build/mpy-cross" + end + + test do + lib_version = "6" if OS.linux? + + # Test the FFI module + (testpath/"ffi-hello.py").write <<~PYTHON + import ffi + + libc = ffi.open("#{shared_library("libc", lib_version)}") + printf = libc.func("v", "printf", "s") + printf("Hello!\\n") + PYTHON + + system bin/"mpy-cross", "ffi-hello.py" + system bin/"micropython", "ffi-hello.py" + end +end diff --git a/Formula/m/microsocks.rb b/Formula/m/microsocks.rb new file mode 100644 index 0000000000000..422eb5bdb679b --- /dev/null +++ b/Formula/m/microsocks.rb @@ -0,0 +1,33 @@ +class Microsocks < Formula + desc "Tiny, portable SOCKS5 server with very moderate resource usage" + homepage "https://github.com/rofl0r/microsocks" + url "https://github.com/rofl0r/microsocks/archive/refs/tags/v1.0.5.tar.gz" + sha256 "939d1851a18a4c03f3cc5c92ff7a50eaf045da7814764b4cb9e26921db15abc8" + license "MIT" + head "https://github.com/rofl0r/microsocks.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1a897bf8b4ab23861c2fd23b129f7562da267b7cdf389e7626a42b786c3ab7c0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ca7d350608642d885c328e674d2e344f0d133845aae976f426fa4796db88fa9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28592464e90d74dc434146ad23e1a2d8ba86f12ed45e0ebdf65e31b1deda204a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9db6e466fd62a65dec737bb317de8a2651abff75e6e15c3df07eb3380df5e6c8" + sha256 cellar: :any_skip_relocation, sonoma: "fd1e474defa7ff10d8effbaae96178ab7698e53c8ab365895b46f19e9aa450d1" + sha256 cellar: :any_skip_relocation, ventura: "c2daa6286809fc95087de6650afd34d977c0f717fc5b2fca4abce58ecebf9e80" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9d5c4ce96b7e33f52a23d435741c367c056a83ceb84efa8d38059dd6a4e252a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da9b7567d172d896cbf1b8040de3801a26c25608259428a3d7b1a12b0bae6a4e" + end + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + port = free_port + fork do + exec bin/"microsocks", "-p", port.to_s + end + sleep 2 + assert_match "The Missing Package Manager for macOS (or Linux)", + shell_output("curl --socks5 0.0.0.0:#{port} https://brew.sh") + end +end diff --git a/Formula/m/midicsv.rb b/Formula/m/midicsv.rb new file mode 100644 index 0000000000000..c7db33600e9b3 --- /dev/null +++ b/Formula/m/midicsv.rb @@ -0,0 +1,41 @@ +class Midicsv < Formula + desc "Convert MIDI audio files to human-readable CSV format" + homepage "https://www.fourmilab.ch/webtools/midicsv/" + url "https://www.fourmilab.ch/webtools/midicsv/midicsv-1.1.tar.gz" + sha256 "7c5a749ab5c4ebac4bd7361df0af65892f380245be57c838e08ec6e4ac9870ef" + license :public_domain + + livecheck do + url :homepage + regex(/href=.*?midicsv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d6c6d8de364a07a54ad4edb30cbd5393cb887e3f4e2a9ea0c072f70646148ec" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9f2a974d6a9eb331de0e371bcf96589dd6fdfec7a2f862ec5f0a591d3721825" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4733fc9797f3a20fc40b127895631d0beca4f15e1dd289ff24e9010821b4731" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bfc81631f34a7b6c244c9c0381b46f24da59332e10770501232a2cdcc564601c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "92dfc5dc808b233c4fbcf4b69a4f74f24c5d69ec409e687d716ddb04eeb78a45" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b4786091a3131f6ffafe70a561bc2a0ffcbab3ed7c651393bb1908e1bd00bad7" + sha256 cellar: :any_skip_relocation, sonoma: "0c4868dd40cd68b5047cf9e9c925f50738350bce211788736faf717221a62f4c" + sha256 cellar: :any_skip_relocation, ventura: "e78e37dd91b60d40dc8aa27a2d897b625a1e4c866681f4a54aea088c401b1acc" + sha256 cellar: :any_skip_relocation, monterey: "5efa2f2fd0083a02275769715699af018f8949db77910ede750505da0600dad3" + sha256 cellar: :any_skip_relocation, big_sur: "e8d8481f70097bfa3d933af56c22f74891906cba93dc3952aad2a7f3f56b6feb" + sha256 cellar: :any_skip_relocation, catalina: "5d36fed687c5f4b23c0705ff261a798697bcda5d4fefa6d86d6a1449ad1efa50" + sha256 cellar: :any_skip_relocation, arm64_linux: "31000beeb43c4aed181a84d1ef69d516a7cc96515344b74a08c2989d2569fd36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "683cf72afc59037843aed1da2bf95b0ba3927d8521aabcbc96702329bebf4ee4" + end + + def install + system "make" + system "make", "check" + system "make", "install", "INSTALL_DEST=#{prefix}" + share.install prefix/"man" + end + + test do + system bin/"midicsv", "-u" + end +end diff --git a/Formula/m/midnight-commander.rb b/Formula/m/midnight-commander.rb new file mode 100644 index 0000000000000..3f45daf6dcca2 --- /dev/null +++ b/Formula/m/midnight-commander.rb @@ -0,0 +1,67 @@ +class MidnightCommander < Formula + desc "Terminal-based visual file manager" + homepage "https://www.midnight-commander.org/" + url "https://ftp.osuosl.org/pub/midnightcommander/mc-4.8.33.tar.xz" + sha256 "cae149d42f844e5185d8c81d7db3913a8fa214c65f852200a9d896b468af164c" + license "GPL-3.0-or-later" + + livecheck do + url "https://ftp.osuosl.org/pub/midnightcommander/" + regex(/href=.*?mc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "a19238337f7eef1da99d690ae9f440956117ec6daa1235e7e08a05f0e9827451" + sha256 arm64_sequoia: "c6914462166922365c2a56c49d4fc8bb3eb051d3022e67072e7fac0832e8121d" + sha256 arm64_sonoma: "5b4c29d7bff65c72443cc3ae9e004d0af04c38392819c432f1bded428324b549" + sha256 arm64_ventura: "471749bae6d5735af1b5a8922700e74ef4f4f256b2e8b60ce5786a7148f51a7d" + sha256 sonoma: "d6e4cf2c8b3f9f9bef3a7a0f3a066a378c1f4c1b4bd05c3b455f20b0bfc09792" + sha256 ventura: "bd3a2cca7f5e7a5a19ce29ef376fdb01a6802a76d07daae05bf9bf7527edf08a" + sha256 arm64_linux: "a5073a3422e3f6503eaaa200b14f719fe6ca10cf191f2c635d623ddca06cbd3f" + sha256 x86_64_linux: "512a595e57bbdea41c7b80ef305023874b21d7d77a8f63ce6218af3afa0863c4" + end + + head do + url "https://github.com/MidnightCommander/mc.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "libssh2" + depends_on "openssl@3" + depends_on "s-lang" + + on_macos do + depends_on "diffutils" + depends_on "gettext" + end + + conflicts_with "minio-mc", because: "both install an `mc` binary" + + def install + args = %w[ + --disable-silent-rules + --without-x + --with-screen=slang + --enable-vfs-sftp + ] + + system "./autogen.sh" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + + if OS.mac? + inreplace share/"mc/syntax/Syntax", Superenv.shims_path, "/usr/bin" + bin.env_script_all_files(libexec/"bin", PATH: "#{Formula["diffutils"].opt_bin}:$PATH") + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/mc --version") + end +end diff --git a/Formula/m/mighttpd2.rb b/Formula/m/mighttpd2.rb new file mode 100644 index 0000000000000..8f7e5dd33987b --- /dev/null +++ b/Formula/m/mighttpd2.rb @@ -0,0 +1,40 @@ +class Mighttpd2 < Formula + desc "HTTP server" + homepage "https://kazu-yamamoto.github.io/mighttpd2/" + # TODO: Check if `cborg` allow-newer workarounds can be removed + url "https://hackage.haskell.org/package/mighttpd2-4.0.9/mighttpd2-4.0.9.tar.gz" + sha256 "6f85f533a232a9ab25f6758886beedcb1a8d8bcc0012bf73a7dac2ed291ca4e1" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fb9506a6f447163871a2b4d66ff4d95ed4151818ba2125d17ee3194514bb92a7" + sha256 cellar: :any, arm64_sequoia: "25be6975363a119562cc5652ae9eebb7219552713f104774fb8fe514214add76" + sha256 cellar: :any, arm64_sonoma: "c50ef2cd7f27b3a323e7c76c0653938869db33f655c301ef1ec251da7ce51cad" + sha256 cellar: :any, arm64_ventura: "d407f151b2dbc11fbdfca89ca0eca2a8055b62e6f5986682e9457edb449aabae" + sha256 cellar: :any, sonoma: "b869e08498f909fe812222cb770e0eedae952c43d9fa81e73cca18f8993bf1ad" + sha256 cellar: :any, ventura: "8135c1643f100ca500668f35926b65673d6a7d38cb8c7a704b8db43088e183b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d5c8695c575fb1ab553398737a123cb27a5516b96ad019fe76a3cb08d79b8d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3743ce97574c778c753f505fdb3b4822d65562532462375105d12ad394f57e9" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + # Workaround to build with GHC 9.12, remove after https://github.com/well-typed/cborg/pull/339 + # is merged and available on Hackage or if `cborg` is willing to provide a metadata revision + args = ["--allow-newer=serialise:base,serialise:ghc-prim,cborg:base,cborg:ghc-prim"] + + system "cabal", "v2-update" + system "cabal", "v2-install", "--flags=tls", *args, *std_cabal_v2_args + end + + test do + system bin/"mighty-mkindex" + assert_predicate testpath/"index.html", :file? + end +end diff --git a/Formula/m/mihomo.rb b/Formula/m/mihomo.rb new file mode 100644 index 0000000000000..a3d18a8157058 --- /dev/null +++ b/Formula/m/mihomo.rb @@ -0,0 +1,57 @@ +class Mihomo < Formula + desc "Another rule-based tunnel in Go, formerly known as ClashMeta" + homepage "https://wiki.metacubex.one" + url "https://github.com/MetaCubeX/mihomo/archive/refs/tags/v1.19.15.tar.gz" + sha256 "ff04b362530ff975521341bb817023332963ee496c32dfe337b3846e8ab9a8ae" + license "GPL-3.0-or-later" + head "https://github.com/MetaCubeX/mihomo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5f7a763b9f6d321038fbcb017afa7b5944b82c58da7a55f378bdd6ee06943e28" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f350453abe800dad968c0e1583bc32836cbf0bc8b425d4827a9cd4f4c75914e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eab63ccf4f2fb87e283b0ada64cafca327ca297fb04d5c7671f484bb90509af7" + sha256 cellar: :any_skip_relocation, sonoma: "179033282ac6e4940b4693b4a30d43e8b20f93957acab3241b471a24ed7aa45a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a71a6188387ad414d910e8e9f7fd0cbc154275a9d8a34a4df3e49c54c02aa9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbb0c0dd855c5857394b23cc99a64ba8cde41a661986a9ea9bbd067cae1fd4aa" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w -buildid= + -X "github.com/metacubex/mihomo/constant.Version=#{version}" + -X "github.com/metacubex/mihomo/constant.BuildTime=#{time.iso8601}" + ] + system "go", "build", *std_go_args(ldflags:, tags: "with_gvisor") + + (buildpath/"config.yaml").write <<~YAML + # Document: https://wiki.metacubex.one/config/ + mixed-port: 7890 + YAML + pkgetc.install "config.yaml" + end + + def caveats + <<~EOS + You need to customize #{etc}/mihomo/config.yaml. + EOS + end + + service do + run [opt_bin/"mihomo", "-d", etc/"mihomo"] + keep_alive true + working_dir etc/"mihomo" + log_path var/"log/mihomo.log" + error_log_path var/"log/mihomo.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mihomo -v") + + (testpath/"mihomo/config.yaml").write <<~YAML + mixed-port: #{free_port} + YAML + system bin/"mihomo", "-t", "-d", testpath/"mihomo" + end +end diff --git a/Formula/m/mikmod.rb b/Formula/m/mikmod.rb new file mode 100644 index 0000000000000..00ef97afb798e --- /dev/null +++ b/Formula/m/mikmod.rb @@ -0,0 +1,38 @@ +class Mikmod < Formula + desc "Portable tracked music player" + homepage "https://mikmod.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mikmod/mikmod/3.2.9/mikmod-3.2.9.tar.gz" + sha256 "214c10aa3019807a1eb26b2c709592f63dbcc00b72985aa86a4fb7ac3cd8b901" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/mikmod[._-](\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "a5da0692a2e6e0197f5c349ee900ff9850fc7222e4b15e3d9a08f76d86682c06" + sha256 arm64_sequoia: "ebf971e2565954c0a4340c3b27d3f09a1087d276199e360f3506e113266eb398" + sha256 arm64_sonoma: "235c1f19c1752d44d0eb89e888894f9b4a72a75131c796d5281bf15fdd1df6b4" + sha256 arm64_ventura: "ef5825cf3c2f07a1b58c596d56e9f965f743788232720529e82acaf10838da28" + sha256 sonoma: "5f51f1fc55de88f9083ab08d701523d68ca1675c0c27f8fab6dd1012afc1551c" + sha256 ventura: "305dbbedcc5ff0bb6f3853f930375503aa9acf4234889de233070c2f566e3eae" + sha256 arm64_linux: "f3c8a4dc7f13aa55e8e613cb91f440ecf23316a250e4e6a1773a4c409fb1b00b" + sha256 x86_64_linux: "0ac9b85e2c8c107a3d9d59f8ba8a3e6b316de1b1b28b30f4f2883377d10917e4" + end + + depends_on "libmikmod" + + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mikmod -V") + end +end diff --git a/Formula/m/mikutter.rb b/Formula/m/mikutter.rb new file mode 100644 index 0000000000000..29ce10a98879b --- /dev/null +++ b/Formula/m/mikutter.rb @@ -0,0 +1,333 @@ +class Mikutter < Formula + desc "Extensible Twitter client" + homepage "https://mikutter.hachune.net/" + url "https://mikutter.hachune.net/bin/mikutter-5.1.1.tar.gz" + sha256 "ddff538aae249bd636604128bac1ccb526a4ed5c32f00b45d3c3c1dbcdb655de" + license "MIT" + head "git://mikutter.hachune.net/mikutter.git", branch: "master" + + livecheck do + url "https://mikutter.hachune.net/download" + regex(/href=.*?mikutter.?v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "04c04af48a9b14b6d319694424d251a9c78a74cd6d3800de1609e0a7c85b00fd" + sha256 cellar: :any, arm64_sequoia: "ee481445aa3a12c60060f4f31d43d8d0378c8189e55c81c7400090b668f48abb" + sha256 cellar: :any, arm64_sonoma: "b66c8480c121a81c26ec2b37e653fbb324c68c362c18e398ddc40129c3f9c9a4" + sha256 cellar: :any, arm64_ventura: "a4fc84de589aa90a7a78dc4c1d143bf4731f9ae7e251ac360bafffbdaa485db4" + sha256 cellar: :any, sonoma: "ab93541b1f60859a5d8e524db4e29d532aff212bd97b5e039884bafb3c174861" + sha256 cellar: :any, ventura: "b778e25fda7cb17ec806e6fb66166de3832d00af03f72f4b19bafb6319d246db" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef6f1ad4d02a73c31297fbf70f6c5a4c62f670f4ca3301ccbb1d3f14705d2deb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6009cbdabcfa5a3d06991b1b73bcf84412423289174569e276e3beddd419e3a" + end + + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gobject-introspection" + depends_on "gtk+3" + depends_on "harfbuzz" + depends_on "pango" + depends_on "ruby" + + uses_from_macos "libffi" + uses_from_macos "libxml2" # for nokogiri + uses_from_macos "libxslt" # for nokogiri + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "terminal-notifier" + end + + # check `plugin/gtk3/Gemfile` for `gtk3` gem version + + resource "addressable" do + url "https://rubygems.org/downloads/addressable-2.8.6.gem" + sha256 "798f6af3556641a7619bad1dce04cdb6eb44b0216a991b0396ea7339276f2b47" + end + + resource "atk" do + url "https://rubygems.org/downloads/atk-4.2.1.gem" + sha256 "b8040ed25cb206b2d54354ba8f95f365b6db16149b29fd1ab7ca8edcce8b8c86" + end + + resource "cairo" do + url "https://rubygems.org/downloads/cairo-1.17.13.gem" + sha256 "8ca44023747de6c290e71657c4b826f500dc2996ec78759719c28a25757c05a9" + end + + resource "cairo-gobject" do + url "https://rubygems.org/downloads/cairo-gobject-4.2.1.gem" + sha256 "fa1735e69c14714fa09e4f647ac56c486baf69d39663ac1789ef2a62d54fc91b" + end + + resource "delayer" do + url "https://rubygems.org/downloads/delayer-1.2.1.gem" + sha256 "393c5e2e199391640814ba57da84f6e849e3f9bb250e0ce571d1f16eacf1b591" + end + + resource "delayer-deferred" do + url "https://rubygems.org/downloads/delayer-deferred-2.2.0.gem" + sha256 "5b0b6df6cf646347105252fd189d3cb5e77d8e56c4a9d7f0654a6b6687564d44" + end + + resource "diva" do + url "https://rubygems.org/downloads/diva-2.0.1.gem" + sha256 "bf70f14e092ba9d05ef5a46c6b359b43310c0478cb371a68a3543ca7ae8953d8" + end + + resource "fiddle" do + url "https://rubygems.org/downloads/fiddle-1.1.6.gem" + sha256 "79e8d909e602d979434cf9fccfa6e729cb16432bb00e39c7596abe6bee1249ab" + end + + resource "forwardable" do + url "https://rubygems.org/downloads/forwardable-1.3.3.gem" + sha256 "f17df4bd6afa6f46a003217023fe5716ef88ce261f5c4cf0edbdeed6470cafac" + end + + resource "gdk3" do + url "https://rubygems.org/downloads/gdk3-4.2.1.gem" + sha256 "74e511471be1ddc70b63272ed37702dbb690bf1b3fded9544c1928355edd7f59" + end + + resource "gdk_pixbuf2" do + url "https://rubygems.org/downloads/gdk_pixbuf2-4.2.1.gem" + sha256 "caa2a3df21d50e6f0ee3ed718161eacc47f064645aba8a1a0505d0a2cd033ad3" + end + + resource "gettext" do + url "https://rubygems.org/downloads/gettext-3.4.1.gem" + sha256 "de618ae3dae3580092fbbe71d7b8b6aee4e417be9198ef1dce513dff4cc277a0" + end + + resource "gio2" do + url "https://rubygems.org/downloads/gio2-4.2.1.gem" + sha256 "bfede5ef3af50ddd9ac786a25065d342a8ef0e405d9eea533c33d3b87c38fffe" + end + + resource "glib2" do + url "https://rubygems.org/downloads/glib2-4.2.1.gem" + sha256 "63bb28d488d4cf6923080c5b37d15a24d043f1ee21100b43407c06f1e5987b51" + end + + resource "gobject-introspection" do + url "https://rubygems.org/downloads/gobject-introspection-4.2.1.gem" + sha256 "535bae9fa07a109e47f57e220e63517e61aed502a9d74a960eae498b1e5cda23" + end + + resource "gtk3" do + url "https://rubygems.org/downloads/gtk3-4.2.1.gem" + sha256 "8d07a7930585cafea15790f9acfc0d6ec5629c91ed9698bfdc2c7ee6ab5560c2" + end + + resource "httpclient" do + url "https://rubygems.org/downloads/httpclient-2.8.3.gem" + sha256 "2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6" + end + + resource "instance_storage" do + url "https://rubygems.org/downloads/instance_storage-1.0.0.gem" + sha256 "f41e64da2fe4f5f7d6c8cf9809ef898e660870f39d4e5569c293b584a12bce22" + end + + resource "json" do + url "https://rubygems.org/gems/json-2.9.1.gem" + sha256 "d2bdef4644052fad91c1785d48263756fe32fcac08b96a20bb15840e96550d11" + end + + resource "locale" do + url "https://rubygems.org/downloads/locale-2.1.4.gem" + sha256 "522f9973ef3eee64aac9bca06d21db2fba675fa3d2cf61d21f42d1ca18a9f780" + end + + resource "matrix" do + url "https://rubygems.org/downloads/matrix-0.4.2.gem" + sha256 "71083ccbd67a14a43bfa78d3e4dc0f4b503b9cc18e5b4b1d686dc0f9ef7c4cc0" + end + + resource "observer" do + url "https://rubygems.org/downloads/observer-0.1.2.gem" + sha256 "d8a3107131ba661138d748e7be3dbafc0d82e732fffba9fccb3d7829880950ac" + end + + resource "memoist" do + url "https://rubygems.org/downloads/memoist-0.16.2.gem" + sha256 "a52c53a3f25b5875151670b2f3fd44388633486dc0f09f9a7150ead1e3bf3c45" + end + + # needed by nokogiri + resource "mini_portile2" do + url "https://rubygems.org/downloads/mini_portile2-2.8.5.gem" + sha256 "7a37db8ae758086c3c3ac3a59c036704d331e965d5e106635e4a42d6e66089ce" + end + + resource "moneta" do + url "https://rubygems.org/downloads/moneta-1.6.0.gem" + sha256 "73f4dfc690399b3e5093d36f3a07c2b2dc174e414fa8e14bd90ab82b2d9644c0" + end + + resource "native-package-installer" do + url "https://rubygems.org/downloads/native-package-installer-1.1.9.gem" + sha256 "fbb41b6b22750791a4304f0a0aeea3dd837668892117f49c4caf2e8e0f4e792f" + end + + resource "nokogiri" do + url "https://rubygems.org/downloads/nokogiri-1.16.3.gem" + sha256 "498aa253ccd5b89a0fa5c4c82b346d22176fc865f4a12ef8da642064d1d3e248" + end + + resource "pango" do + url "https://rubygems.org/downloads/pango-4.2.1.gem" + sha256 "9e8431164dbce8a151f4994b8996809fb83b9b95753e7d33c23938f1e824f4d2" + end + + resource "pkg-config" do + url "https://rubygems.org/downloads/pkg-config-1.5.6.gem" + sha256 "ca2b5afd09e580112f759e29c88bc033c6f226efd53d54924e5b101e8a3d9113" + end + + resource "pluggaloid" do + url "https://rubygems.org/downloads/pluggaloid-1.7.0.gem" + sha256 "81ab86af2a09f5cfaa5a0c1e8ae8c77242726901a16dbfadb1d9509ad6787eeb" + end + + resource "prime" do + url "https://rubygems.org/downloads/prime-0.1.2.gem" + sha256 "d4e956cadfaf04de036dc7dc74f95bf6a285a62cc509b28b7a66b245d19fe3a4" + end + + resource "public_suffix" do + url "https://rubygems.org/downloads/public_suffix-5.0.4.gem" + sha256 "35cd648e0d21d06b8dce9331d19619538d1d898ba6d56a6f2258409d2526d1ae" + end + + resource "racc" do + url "https://rubygems.org/downloads/racc-1.7.3.gem" + sha256 "b785ab8a30ec43bce073c51dbbe791fd27000f68d1c996c95da98bf685316905" + end + + # needed by atk + resource "rake" do + url "https://rubygems.org/downloads/rake-13.1.0.gem" + sha256 "be6a3e1aa7f66e6c65fa57555234eb75ce4cf4ada077658449207205474199c6" + end + + resource "red-colors" do + url "https://rubygems.org/downloads/red-colors-0.4.0.gem" + sha256 "2356eba0782ca6c44caa47645fbf942a2b16d85905c35c6e3f80d5ff0c04929a" + end + + resource "singleton" do + url "https://rubygems.org/downloads/singleton-0.3.0.gem" + sha256 "83ea1bca5f4aa34d00305ab842a7862ea5a8a11c73d362cb52379d94e9615778" + end + + resource "text" do + url "https://rubygems.org/downloads/text-1.3.1.gem" + sha256 "2fbbbc82c1ce79c4195b13018a87cbb00d762bda39241bb3cdc32792759dd3f4" + end + + resource "typed-array" do + url "https://rubygems.org/downloads/typed-array-0.1.2.gem" + sha256 "891fa1de2cdccad5f9e03936569c3c15d413d8c6658e2edfe439d9386d169b62" + end + + # This is annoying - if the gemfile lists test group gems at all, + # even if we've explicitly requested to install without them, + # bundle install --cache will fail because it can't find those gems. + # Handle this by modifying the gemfile to remove these gems. + def gemfile_remove_test! + gemfile_lines = [] + test_group = false + File.read("Gemfile").each_line do |line| + line.chomp! + + # If this is the closing part of the test group, + # swallow this line and then allow writing the test of the file. + if test_group && line == "end" + test_group = false + next + # If we're still inside the test group, skip writing. + elsif test_group + next + end + + # If this is the start of the test group, skip writing it and mark + # this as part of the group. + if line.include?("group :test") + test_group = true + else + gemfile_lines << line + end + end + + File.open("Gemfile", "w") do |gemfile| + gemfile.puts gemfile_lines.join("\n") + # Unmarked dependency of atk + gemfile.puts "gem 'rake','>= 13.0.1'" + end + end + + def install + (lib/"mikutter/vendor").mkpath + (buildpath/"vendor/cache").mkpath + resources.each do |r| + r.unpack buildpath/"vendor/cache" + end + + gemfile_remove_test! + system "bundle", "config", "build.nokogiri", "--use-system-libraries" + system "bundle", "config", "set", "--local", "path", "#{lib}/mikutter/vendor" + system "bundle", "install" + + rm_r("vendor") + (lib/"mikutter").install "plugin" + libexec.install Dir["*"] + + ruby_series = Formula["ruby"].any_installed_version.major_minor.to_s + env = { + DISABLE_BUNDLER_SETUP: "1", + GEM_HOME: HOMEBREW_PREFIX/"lib/mikutter/vendor/ruby/#{ruby_series}.0", + GTK_PATH: HOMEBREW_PREFIX/"lib/gtk-2.0", + } + + (bin/"mikutter").write_env_script Formula["ruby"].opt_bin/"ruby", "#{libexec}/mikutter.rb", env + pkgshare.install_symlink libexec/"core/skin" + + # enable other formulae to install plugins + libexec.install_symlink HOMEBREW_PREFIX/"lib/mikutter/plugin" + end + + test do + (testpath/".mikutter/plugin/test_plugin/test_plugin.rb").write <<~RUBY + # -*- coding: utf-8 -*- + Plugin.create(:test_plugin) do + require 'logger' + + Delayer.new do + log = Logger.new(STDOUT) + log.info("loaded test_plugin") + exit + end + end + + # this is needed in order to boot mikutter >= 3.6.0 + class Post + def self.primary_service + nil + end + end + RUBY + system bin/"mikutter", "plugin_depends", + testpath/".mikutter/plugin/test_plugin/test_plugin.rb" + system bin/"mikutter", "--plugin=test_plugin", "--debug" + end +end diff --git a/Formula/m/mill.rb b/Formula/m/mill.rb new file mode 100644 index 0000000000000..2f808f5550143 --- /dev/null +++ b/Formula/m/mill.rb @@ -0,0 +1,36 @@ +class Mill < Formula + desc "Fast, scalable JVM build tool" + homepage "https://mill-build.org/" + url "https://search.maven.org/remotecontent?filepath=com/lihaoyi/mill-dist/1.0.6/mill-dist-1.0.6.exe" + sha256 "567a44bee9006ac943f8cbec18c38637c544144726cdc699aa4f3584ed52ae93" + license "MIT" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/lihaoyi/mill-dist/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "dae7e2a795434699b9f3a1f4349c83da49a34afbef678b79af64ca6e44d587e0" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"].shift => "mill" + chmod 0555, libexec/"mill" + (bin/"mill").write_env_script libexec/"mill", Language::Java.overridable_java_home_env + end + + test do + (testpath/"build.sc").write <<~SCALA + import mill._ + import mill.scalalib._ + object foo extends ScalaModule { + def scalaVersion = "2.13.11" + } + SCALA + output = shell_output("#{bin}/mill resolve __.compile") + assert_equal "foo.compile", output.lines.last.chomp + end +end diff --git a/Formula/m/miller.rb b/Formula/m/miller.rb new file mode 100644 index 0000000000000..67961aa9d7353 --- /dev/null +++ b/Formula/m/miller.rb @@ -0,0 +1,37 @@ +class Miller < Formula + desc "Like sed, awk, cut, join & sort for name-indexed data such as CSV" + homepage "https://github.com/johnkerl/miller" + url "https://github.com/johnkerl/miller/archive/refs/tags/v6.15.0.tar.gz" + sha256 "91f1cbb91db6b6f93f0b582b73fede6659e37a730d8f30f7bb5e0ce5c356f63d" + license "BSD-2-Clause" + head "https://github.com/johnkerl/miller.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de1a6bd44d64874cbc2a53befe4283cd173bf35012a084bdf217515ac6aa2415" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b008968b4fc8b89b7fabf6964c89c2775ecb646d022baa9d2614069fce6e2a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3eae445bf047028a0033819c3d0a588579b194cdf23e472b372010fcce77c82" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6504b651c26a492d62230e6c09532202e5c32df554cae00271b48eb3f52f7f7" + sha256 cellar: :any_skip_relocation, sonoma: "ee42004b75cd2da7573aad293dc14ae589600d069fc7e3838405f1623c5bc14d" + sha256 cellar: :any_skip_relocation, ventura: "2895f2675b024752364186edf3af51e5f99c89c0d6b239df445223773c8f89d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "26f0467141b454008af70b577e31e2b7a95a7f3a998c0a0d1d646655b6053057" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0aa560465b9b2d0795ce24407319672b73be87b51035f4857254cb4ccea72d8a" + end + + depends_on "go" => :build + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.csv").write <<~CSV + a,b,c + 1,2,3 + 4,5,6 + CSV + output = pipe_output("#{bin}/mlr --csvlite cut -f a test.csv") + assert_match "a\n1\n4\n", output + end +end diff --git a/Formula/m/millet.rb b/Formula/m/millet.rb new file mode 100644 index 0000000000000..7b24561f46ad8 --- /dev/null +++ b/Formula/m/millet.rb @@ -0,0 +1,100 @@ +class Millet < Formula + desc "Language server for Standard ML (SML)" + homepage "https://github.com/azdavis/millet" + url "https://github.com/azdavis/millet/archive/refs/tags/v0.14.9.tar.gz" + sha256 "5efff3cafade17b33a8b9b2748a8c064dbd51932934de01f8d2a14c88ac829c5" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/azdavis/millet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "90b980de74d6d62275bff7eafa02ac70355099668190ee3e108ed6d4332f6e71" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4461ab5dae2b2e3216a970e293c5b7287a685cd2227d3a9fe9484d3c4b5a334" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c90a66817e56189faf6b56cf3c5f257d7e281b5de0c4b1642a1e08fd10ec5121" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d6cc53a1c690a8aca2ec156245e57eab2ff0ac033c6f9902f3f0c19b568912c" + sha256 cellar: :any_skip_relocation, sonoma: "5c1473be0100ce02de27fb0ab410d04c7318053f969d215a2d5e8569925ce935" + sha256 cellar: :any_skip_relocation, ventura: "0cd78d743593adb18fd831df1d7dd3fb48bab36b9b37f97bee4ecc52996a1fb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "9026943a06ceae4faf4de5dd51d7817b8c32fe161920448b03fae147d27e9bc8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad26eaf3f79857774cf8b33f0d09ef507245473871b0df9c8c6fbed9521b1365" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/millet-ls") + end + + test do + initialize_request = { jsonrpc: "2.0", + id: 1, + method: "initialize", + params: { processId: nil, + rootUri: nil, + capabilities: {} } } + + initialized_notification = { jsonrpc: "2.0", + method: "initialized", + params: {} } + + shutdown_request = { jsonrpc: "2.0", + id: 2, + method: "shutdown", + params: {} } + + exit_notification = { jsonrpc: "2.0", + method: "exit", + params: {} } + + parse_content_length = lambda { |header_part| + content_length_header = header_part.split("\r\n")[0] + content_length = content_length_header.split(":")[1].to_i + content_length + } + + read_header_part = lambda { |pipe| + pipe.readline("\r\n\r\n") + } + + read_response = lambda { |pipe| + header_part = read_header_part.call(pipe) + content_length = parse_content_length.call(header_part) + JSON.parse(pipe.readpartial(content_length)) + } + + json_rpc_message = lambda { |msg| + msg_string = msg.to_json + "Content-Length: #{msg_string.length}\r\n\r\n" + msg_string + } + + send_message = lambda { |pipe, msg| + pipe.write(json_rpc_message.call(msg)) + } + + IO.popen(bin/"millet-ls", "r+") do |pipe| + pipe.sync = true + + # send initialization request + send_message.call(pipe, initialize_request) + + # read initialization response + response = read_response.call(pipe) + assert_equal 1, response["id"] + + # send initialized notification + send_message.call(pipe, initialized_notification) + + # send shutdown request + send_message.call(pipe, shutdown_request) + + # read shutdown response + response = read_response.call(pipe) + assert_equal 2, response["id"] + + # send exit notification, which kills the child process + send_message.call(pipe, exit_notification) + + pipe.close + end + + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/m/mimalloc.rb b/Formula/m/mimalloc.rb new file mode 100644 index 0000000000000..322bf64bc4e8f --- /dev/null +++ b/Formula/m/mimalloc.rb @@ -0,0 +1,38 @@ +class Mimalloc < Formula + desc "Compact general purpose allocator" + homepage "https://github.com/microsoft/mimalloc" + url "https://github.com/microsoft/mimalloc/archive/refs/tags/v3.1.5.tar.gz" + sha256 "1c6949032069d5ebea438ec5cedd602d06f40a92ddf0f0d9dcff0993e5f6635c" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c8c2f8ebafa0b1add9f1217251cf0822f7cd385471f24070cd6bc8ee8bf05702" + sha256 cellar: :any, arm64_sequoia: "a78d24b6319552c5fe4a5d35fcc220323bf3444a14442fba3e6daf3f3eb4229a" + sha256 cellar: :any, arm64_sonoma: "87831a2e64cf404071b0a1975a0ba104c2149fe7dd4c1c04b1a36781bab63e48" + sha256 cellar: :any, arm64_ventura: "13ff3e501f31a5eab5674930dea31ae4bebaed70ba17f7dc6a05442d15a5ce1e" + sha256 cellar: :any, sonoma: "e22c58771015099a1b1db1feaf3b243a181dc78de09c791a2a796fe77d7c99b3" + sha256 cellar: :any, ventura: "e5fa2eb61ae09ac8ef2effc66927e8546b9eb267469b3e530f8453e1690f7d9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4b913ad10a6af5beb4728c4b0b02aead0427122e917d49e9f7d504bee8ea032" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0c5c5e10bd186bc8fc0ac85f3b97d784ed3255bf683e786a8ae28fddeb394e7" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DMI_INSTALL_TOPLEVEL=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "test" + end + + test do + cp pkgshare/"test/main.c", testpath + system ENV.cc, "main.c", "-L#{lib}", "-lmimalloc", "-o", "test" + assert_match "heap stats", shell_output("./test 2>&1") + end +end diff --git a/Formula/m/mimic.rb b/Formula/m/mimic.rb new file mode 100644 index 0000000000000..a2392bf4c2790 --- /dev/null +++ b/Formula/m/mimic.rb @@ -0,0 +1,55 @@ +class Mimic < Formula + desc "Lightweight text-to-speech engine based on CMU Flite" + homepage "https://github.com/MycroftAI/mimic1" + url "https://github.com/MycroftAI/mimic1/archive/refs/tags/1.3.0.1.tar.gz" + sha256 "9041f5c7d3720899c90c890ada179c92c3b542b90bb655c247e4a4835df79249" + # The `:cannot_represent` is for: + # * Sun Microsystems, Inc. license (e.g. src/speech/g72x.c) + # * BSD license with 2 clauses but not matching BSD-2-Clause (e.g. src/speech/rateconv.c) + license all_of: ["MIT-Festival", "BSD-2-Clause", "BSD-3-Clause", "Spencer-86", "Apache-2.0", :cannot_represent] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "c5308faf93176da28184e555f4e6978817d59676b85b5382e6fd7fffb7611bad" + sha256 arm64_sequoia: "809c72a67bc515dc1ae83a7c03bf27c9a8bf9d38422aff57d65a58ae27a0bb1e" + sha256 arm64_sonoma: "27c12540e94a1f80ccfca3bd15f93a305f84e4c2233253df530dd3d7b1211140" + sha256 arm64_ventura: "05a0ae1e6862667edb0311db845d536bc98085e57793620e28f82a013bf58ff9" + sha256 arm64_monterey: "d5e9edd6ea60a7c799c8d88e35f981dce913d950874ce44fa9805bb7c91c5e32" + sha256 arm64_big_sur: "72107347e7fd6f6ca1af6808fe3ea5b428e3dee2f733743a0d44cd9b9e67d492" + sha256 sonoma: "1c990348da2905a15589f09b2bb76e4229604fa9c6c8585b2ef4906dbc5620ab" + sha256 ventura: "dee98adb3a5b5349d702a7ec8c781046d8ef54d143765d9c35b7e83055d3e9de" + sha256 monterey: "b5b3fbdb47926a507b67c517346e66e1b3deba2622f915eb66409c601fe2718b" + sha256 big_sur: "ef5067be11a74cc8cd63e266a775ece9ebcf59c9995b630f9717d7333dbdd924" + sha256 catalina: "72b346f8eefbbc70abc0a67bc72265b3bec7f99e53b18418ad6835df52518f1e" + sha256 arm64_linux: "26e6f55397cb24207058e26f48ce78d837269e3063f295987eb12bf7a778159d" + sha256 x86_64_linux: "027d95ecca63daf3f9c20419da6630b9a6a2d00e92dbdccbbc5d1747e0aca4d4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "pcre2" + + on_macos do + depends_on "portaudio" + end + + on_linux do + depends_on "alsa-lib" + end + + def install + system "./autogen.sh" + system "./configure", "--enable-shared", + "--enable-static", + *std_configure_args + system "make", "install" + end + + test do + system bin/"mimic", "-t", "Hello, Homebrew!", "test.wav" + assert_path_exists testpath/"test.wav" + end +end diff --git a/Formula/m/mimirtool.rb b/Formula/m/mimirtool.rb new file mode 100644 index 0000000000000..d4105ea4be906 --- /dev/null +++ b/Formula/m/mimirtool.rb @@ -0,0 +1,56 @@ +class Mimirtool < Formula + desc "CLI for interacting with Grafana Mimir" + homepage "https://grafana.com/docs/mimir/latest/operators-guide/tools/mimirtool/" + url "https://github.com/grafana/mimir.git", + tag: "mimir-2.17.2", + revision: "bce93699bd2d5b8fc530034073be7d2da4365751" + license "AGPL-3.0-only" + head "https://github.com/grafana/mimir.git", branch: "main" + + # Upstream appears to use GitHub releases to indicate that a version is + # released (and some tagged versions don't end up as a release), so it's + # necessary to check release versions instead of tags. + livecheck do + url :stable + regex(/^mimir[._-]v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "91d7aef7b8f7bdad68830cf9ab614e04724dd693455d6d95b3bfb2523a34901c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "22d1df6ab540e620d7cad335614db51374d2fb7da86f4feea6a80ef5e14ef367" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e083bd12e7ff18e382a92426ba43e54bfd45034cc1b659ed483db80fff411d62" + sha256 cellar: :any_skip_relocation, sonoma: "a46d2a9e55bb5414360d2a83c38649486973062149de9e44769cc96de8d86db2" + sha256 cellar: :any_skip_relocation, arm64_linux: "6457758e7972581895cc931437b98f576a7bb332a965e49319aca6b6540d5c94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f425060afd08e8eb9c738b4a671c0d4a3d325ac0cb640efc428451926dfd2be6" + end + + depends_on "go" => :build + + def install + system "make", "BUILD_IN_CONTAINER=false", "GENERATE_FILES=false", "cmd/mimirtool/mimirtool" + bin.install "cmd/mimirtool/mimirtool" + end + + test do + # Check that the version number was correctly embedded in the binary + assert_match version.to_s, shell_output("#{bin}/mimirtool version") + + # Check that the binary runs as expected by testing the 'rules check' command + test_rule = <<~YAML + namespace: my_namespace + groups: + - name: example + interval: 5m + rules: + - record: job_http_inprogress_requests_sum + expr: sum by (job) (http_inprogress_requests) + YAML + + (testpath/"rule.yaml").write(test_rule) + + output = shell_output("#{bin}/mimirtool rules check #{testpath / "rule.yaml"} 2>&1", 1) + expected = "recording rule name does not match level:metric:operation format, must contain at least one colon" + assert_match expected, output + end +end diff --git a/Formula/m/min-lang.rb b/Formula/m/min-lang.rb new file mode 100644 index 0000000000000..8490386401f25 --- /dev/null +++ b/Formula/m/min-lang.rb @@ -0,0 +1,36 @@ +class MinLang < Formula + desc "Small but practical concatenative programming language and shell" + homepage "https://min-lang.org" + url "https://github.com/h3rald/min/archive/refs/tags/v0.46.0.tar.gz" + sha256 "017178f88bd923862b64f316098772c1912f2eef9304c1164ba257829f1bbfc2" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "df3efb13f502be8765eb32f92c34e839774a9c528eee4cf28e95c745c70df742" + sha256 cellar: :any, arm64_sequoia: "55abfc756fcd03084ea6cecc4f55f694127244be085a40fb475c8ea313c1b1ff" + sha256 cellar: :any, arm64_sonoma: "dfce5c1fe83a37626f59fb7f55560d7e6127c29a110602a0c0e2e8ff2469720c" + sha256 cellar: :any, arm64_ventura: "55dd93aee4c6e5b332fb6ef5068f9076ee0188c682aac21f5e3cbc24ee8a263f" + sha256 cellar: :any_skip_relocation, sonoma: "c14a84fc2c375ab64eef59cea18373fb47a154d5946e24c1b32dff772470b99d" + sha256 cellar: :any_skip_relocation, ventura: "1d103d8fdb4f5d04ac85c30966ec14ce719822cc287aff6bda29d2e7944493c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fec39dc5874993f43231ceb8a90d0f774a7956906e4549335d21a4b43078d64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d41319d9cf4c586dae36e4eed94e93cfc70969a977c592f7d819d9d6d420a7d" + end + + depends_on "nim" + depends_on "openssl@3" + depends_on "pcre" + + def install + system "nimble", "build", '--passL:"-lpcre -lssl -lcrypto"' + bin.install "min" + end + + test do + testfile = testpath/"test.min" + testfile.write <<~EOS + sys.pwd sys.ls (fs.type "file" ==) filter '> sort + puts! + EOS + assert_match testfile.to_s, shell_output("#{bin}/min test.min") + end +end diff --git a/Formula/m/minder.rb b/Formula/m/minder.rb new file mode 100644 index 0000000000000..2fb3b827f71ff --- /dev/null +++ b/Formula/m/minder.rb @@ -0,0 +1,36 @@ +class Minder < Formula + desc "CLI for interacting with Stacklok's Minder platform" + homepage "https://mindersec.github.io/" + url "https://github.com/mindersec/minder/archive/refs/tags/v0.1.1.tar.gz" + sha256 "10119636e4ad41cbbe1b3627511a23d14834b68fdb503b23edb07b3a450fe5ed" + license "Apache-2.0" + head "https://github.com/mindersec/minder.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26ad770d98c57578261515f56773019ef947a0ac94e222c0555ec39814dc32eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "26ad770d98c57578261515f56773019ef947a0ac94e222c0555ec39814dc32eb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26ad770d98c57578261515f56773019ef947a0ac94e222c0555ec39814dc32eb" + sha256 cellar: :any_skip_relocation, sonoma: "082be64befad832e04a1ec3efe681b46a9bb606db1a3b1e5259ee5529d378dae" + sha256 cellar: :any_skip_relocation, arm64_linux: "32a6ef5b74ae68be6333452d401c53fdaa82e0c2cdf48b9e19a2ba740168bcc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d8373b18ca54c2948d48c49a1961af53320badf80778b891141b07b5f02cb1c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/mindersec/minder/internal/constants.CLIVersion=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/cli" + + generate_completions_from_executable(bin/"minder", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/minder version 2>&1") + + # All the cli action trigger to open github authorization page, + # so we cannot test them directly. + end +end diff --git a/Formula/m/mingw-w64.rb b/Formula/m/mingw-w64.rb new file mode 100644 index 0000000000000..08251bf0ad7ba --- /dev/null +++ b/Formula/m/mingw-w64.rb @@ -0,0 +1,238 @@ +class MingwW64 < Formula + desc "Minimalist GNU for Windows and GCC cross-compilers" + homepage "https://sourceforge.net/projects/mingw-w64/" + url "https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v13.0.0.tar.bz2" + sha256 "5afe822af5c4edbf67daaf45eec61d538f49eef6b19524de64897c6b95828caf" + license "ZPL-2.1" + revision 2 + + livecheck do + url :stable + regex(%r{url=.*?release/mingw-w64[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "281983722f43ce4615f5020e7a9cae212510c52592494b8313893a76b9a7c893" + sha256 arm64_sequoia: "e72b20b77ff753c2ad4cd9e4ad8758e6fd4f6700a7a4b910dec977ae425a4e61" + sha256 arm64_sonoma: "e91600d5cbf5bdb91c749795693dd8fd88047b5743ee6a775b72856c528bb28c" + sha256 arm64_ventura: "629eb2dc16cc8b3960731ef5c13d6c3cd67e144aa2a8a3435edc61b63c618352" + sha256 sonoma: "05dd9aa5f906ea5aaa774e26a068c2bbc484595bfe99d215a152961775671536" + sha256 ventura: "d57819a990871dffc12ccdb7dcce500e544e215f16a8140c7154f080a0014c6d" + sha256 arm64_linux: "1ee24ea707db8ef22332b133a71330d6d3ea8904affc70a6c84a1102c04d9153" + sha256 x86_64_linux: "b5bce46c1253b6315d08a0556e12a2213c1ef6b70ef9f9770f5010869105f0ad" + end + + # binutils searches for zstd using pkg-config + depends_on "pkgconf" => :build + # Apple's makeinfo is old and has bugs + depends_on "texinfo" => :build + + depends_on "gmp" + depends_on "isl" + depends_on "libmpc" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "zlib" + + resource "binutils" do + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + end + + resource "gcc" do + url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + mirror "https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e" + end + + def target_archs + ["i686", "x86_64"].freeze + end + + def install + target_archs.each do |arch| + arch_dir = "#{prefix}/toolchain-#{arch}" + target = "#{arch}-w64-mingw32" + + resource("binutils").stage do + args = %W[ + --target=#{target} + --with-sysroot=#{arch_dir} + --prefix=#{arch_dir} + --enable-targets=#{target} + --disable-multilib + --disable-nls + --with-system-zlib + --with-zstd + ] + mkdir "build-#{arch}" do + system "../configure", *args + system "make" + system "make", "install" + end + end + + # Put the newly built binutils into our PATH + ENV.prepend_path "PATH", "#{arch_dir}/bin" + + mkdir "mingw-w64-headers/build-#{arch}" do + system "../configure", "--host=#{target}", "--prefix=#{arch_dir}/#{target}" + system "make" + system "make", "install" + end + + # Create a mingw symlink, expected by GCC + ln_s "#{arch_dir}/#{target}", "#{arch_dir}/mingw" + + # Build the GCC compiler + resource("gcc").stage buildpath/"gcc" + args = %W[ + --target=#{target} + --with-sysroot=#{arch_dir} + --prefix=#{arch_dir} + --with-bugurl=#{tap.issues_url} + --enable-languages=c,c++,objc,obj-c++,fortran + --with-ld=#{arch_dir}/bin/#{target}-ld + --with-as=#{arch_dir}/bin/#{target}-as + --with-gmp=#{Formula["gmp"].opt_prefix} + --with-mpfr=#{Formula["mpfr"].opt_prefix} + --with-mpc=#{Formula["libmpc"].opt_prefix} + --with-isl=#{Formula["isl"].opt_prefix} + --with-system-zlib + --with-zstd + --disable-multilib + --disable-nls + --enable-threads=posix + ] + + mkdir "#{buildpath}/gcc/build-#{arch}" do + system "../configure", *args + system "make", "all-gcc" + system "make", "install-gcc" + end + + # Build the mingw-w64 runtime + args = %W[ + CC=#{target}-gcc + CXX=#{target}-g++ + CPP=#{target}-cpp + --host=#{target} + --with-sysroot=#{arch_dir}/#{target} + --prefix=#{arch_dir}/#{target} + ] + + case arch + when "i686" + args << "--enable-lib32" << "--disable-lib64" + when "x86_64" + args << "--disable-lib32" << "--enable-lib64" + end + + mkdir "mingw-w64-crt/build-#{arch}" do + system "../configure", *args + # Resolves "Too many open files in system" + # bfd_open failed open stub file dfxvs01181.o: Too many open files in system + # bfd_open failed open stub file: dvxvs00563.o: Too many open files in systembfd_open + # https://sourceware.org/bugzilla/show_bug.cgi?id=24723 + # https://sourceware.org/bugzilla/show_bug.cgi?id=23573#c18 + ENV.deparallelize do + system "make" + system "make", "install" + end + end + + # Build the winpthreads library + # we need to build this prior to the + # GCC runtime libraries, to have `-lpthread` + # available, for `--enable-threads=posix` + args = %W[ + CC=#{target}-gcc + CXX=#{target}-g++ + CPP=#{target}-cpp + --host=#{target} + --with-sysroot=#{arch_dir}/#{target} + --prefix=#{arch_dir}/#{target} + ] + mkdir "mingw-w64-libraries/winpthreads/build-#{arch}" do + system "../configure", *args + system "make" + system "make", "install" + end + + args = %W[ + --host=#{target} + --with-sysroot=#{arch_dir}/#{target} + --prefix=#{arch_dir} + --program-prefix=#{target}- + ] + mkdir "mingw-w64-tools/widl/build-#{arch}" do + system "../configure", *args + system "make" + system "make", "install" + end + + # Finish building GCC (runtime libraries) + chdir "#{buildpath}/gcc/build-#{arch}" do + system "make" + system "make", "install" + end + + # Symlinks all binaries into place + mkdir_p bin + Dir["#{arch_dir}/bin/*"].each { |f| ln_s f, bin } + end + end + + test do + (testpath/"hello.c").write <<~C + #include + #include + int main() { puts("Hello world!"); + MessageBox(NULL, TEXT("Hello GUI!"), TEXT("HelloMsg"), 0); return 0; } + C + (testpath/"hello.cc").write <<~CPP + #include + int main() { std::cout << "Hello, world!" << std::endl; return 0; } + CPP + (testpath/"hello.f90").write <<~FORTRAN + program hello ; print *, "Hello, world!" ; end program hello + FORTRAN + # https://docs.microsoft.com/en-us/windows/win32/rpc/using-midl + (testpath/"example.idl").write <<~MIDL + [ + uuid(ba209999-0c6c-11d2-97cf-00c04f8eea45), + version(1.0) + ] + interface MyInterface + { + const unsigned short INT_ARRAY_LEN = 100; + + void MyRemoteProc( + [in] int param1, + [out] int outArray[INT_ARRAY_LEN] + ); + } + MIDL + + ENV["LC_ALL"] = "C" + ENV.remove_macosxsdk if OS.mac? + target_archs.each do |arch| + target = "#{arch}-w64-mingw32" + outarch = (arch == "i686") ? "i386" : "x86-64" + + system bin/"#{target}-gcc", "-o", "test.exe", "hello.c" + assert_match "file format pei-#{outarch}", shell_output("#{bin}/#{target}-objdump -a test.exe") + + system bin/"#{target}-g++", "-o", "test.exe", "hello.cc" + assert_match "file format pei-#{outarch}", shell_output("#{bin}/#{target}-objdump -a test.exe") + + system bin/"#{target}-gfortran", "-o", "test.exe", "hello.f90" + assert_match "file format pei-#{outarch}", shell_output("#{bin}/#{target}-objdump -a test.exe") + + system bin/"#{target}-widl", "example.idl" + assert_path_exists testpath/"example_s.c", "example_s.c should have been created" + end + end +end diff --git a/Formula/m/minica.rb b/Formula/m/minica.rb new file mode 100644 index 0000000000000..bd25f55669e9b --- /dev/null +++ b/Formula/m/minica.rb @@ -0,0 +1,37 @@ +class Minica < Formula + desc "Small, simple certificate authority" + homepage "https://github.com/jsha/minica" + url "https://github.com/jsha/minica/archive/refs/tags/v1.1.0.tar.gz" + sha256 "4f56ea73d2a943656f8a5b533e554b435bc10f56c12d0b53836e84a96b513bf7" + license "MIT" + head "https://github.com/jsha/minica.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c9feab61490a6975219259e16f34d0d1f283775bf3554b77f56f3796958162a7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9faa299c46a22bc87e87ed7a480449aa5642a0e110f64cd6d28e12c305d9ecc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc8955ffd5c34b8eaedbc556e71188ec55c2a01e76c26f853aeb0038c7ac2426" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa6002d59696edcfa6929d19a51a99260f472d1c492295c6c38ee074c381d0aa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9317695171ce2314300613641c494762895bf1954560e53546c44e0d9557ea83" + sha256 cellar: :any_skip_relocation, sonoma: "e65d5ccc5f4703009f8b2d0a460dc883711c71a4814c06921c2ea98dfd797f8a" + sha256 cellar: :any_skip_relocation, ventura: "93d40ba3ada1bee8b74febdd40b3bf37a4bdd91a24d4a62f342314a9d85cb736" + sha256 cellar: :any_skip_relocation, monterey: "6769f28dbd2b0295f87d007007b9cb61d5715e93a9b13f4b25de9466083fdc23" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bb26e4da3fb0a4744f488416535864c2ef4b8ce4622f95cf591b76a18e2e03b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea318ca6a9231fd445ec38d2905f6b5de30ce697dcedeb9d8ae5127f9634500f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"minica", "--domains", "foo.com" + assert_path_exists testpath/"minica.pem" + end +end diff --git a/Formula/m/minicom.rb b/Formula/m/minicom.rb new file mode 100644 index 0000000000000..5eb25e21d7ca0 --- /dev/null +++ b/Formula/m/minicom.rb @@ -0,0 +1,66 @@ +class Minicom < Formula + desc "Menu-driven communications program" + homepage "https://packages.debian.org/sid/minicom" + url "https://deb.debian.org/debian/pool/main/m/minicom/minicom_2.10.orig.tar.bz2" + sha256 "90e7ce2856b3eaaa3f452354d17981c49d32c426a255b6f0d3063a227c101538" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/m/minicom/" + regex(/href=.*?minicom[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 arm64_tahoe: "33a6f5dbbe7ca27534ae675480528a30c197ceee9bfe12a6662b88d20b923c11" + sha256 arm64_sequoia: "80e14a35d53c8bee7865f9dca76d9b674b5790d18d3dd1b468847ed99970c96f" + sha256 arm64_sonoma: "00ee0220e0307094c74374572ffbca318368f33083b9881b22783d36d4a12ca6" + sha256 arm64_ventura: "f004fb2db42fbdd149fc40eae5bc653b15860f06506f2d91f3be7b7e3b62f4e1" + sha256 sonoma: "ae861c3e3530b8dd98ddd8256aa243a3205a6dac85e04f9351f5fc157d3948bf" + sha256 ventura: "7e524e53bc69ffd181757cff6564264674e1bc2c46255792c58b3265f9fe61dc" + sha256 arm64_linux: "4b8d28ea107b2c8577fa25a16f3607f4b85bcc230d67657b2c4e90db42466159" + sha256 x86_64_linux: "5de5bb5448b6444e3ddcdcbb615bd96fb138df6d216c565e661e101ebd507208" + end + + head do + url "https://salsa.debian.org/minicom-team/minicom.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "ncurses" + + def install + # There is a silly bug in the Makefile where it forgets to link to iconv. Workaround below. + ENV["LIBS"] = "-liconv" if OS.mac? + + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, "--mandir=#{man}" + system "make", "install" + + (prefix/"etc").mkdir + (prefix/"var").mkdir + (prefix/"etc/minirc.dfl").write "pu lock #{prefix}/var\npu escape-key Escape (Meta)\n" + end + + def caveats + <<~EOS + Terminal Compatibility + ====================== + If minicom doesn't see the LANG variable, it will try to fallback to + make the layout more compatible, but uglier. Certain unsupported + encodings will completely render the UI useless, so if the UI looks + strange, try setting the following environment variable: + + LANG="en_US.UTF-8" + + Text Input Not Working + ====================== + Most development boards require Serial port setup -> Hardware Flow + Control to be set to "No" to input text. + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/minicom -v") + end +end diff --git a/Formula/m/minidjvu.rb b/Formula/m/minidjvu.rb new file mode 100644 index 0000000000000..d50716d0f2fb2 --- /dev/null +++ b/Formula/m/minidjvu.rb @@ -0,0 +1,53 @@ +class Minidjvu < Formula + desc "DjVu multipage encoder, single page encoder/decoder" + homepage "https://minidjvu.sourceforge.net/" + url "https://downloads.sourceforge.net/project/minidjvu/minidjvu/0.8/minidjvu-0.8.tar.gz" + sha256 "e9c892e0272ee4e560eaa2dbd16b40719b9797a1fa2749efeb6622f388dfb74a" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/minidjvu[._-]v?((?!0\.33)\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4efc0167c66e2dcc3d940290a93f1c263d2b2f0f77aa2be56a46b698a72fc998" + sha256 cellar: :any, arm64_sequoia: "a7e2ca4daf17bffbee72e2513829e5835d4d271e9daa28c5c62e806ca05ca6d1" + sha256 cellar: :any, arm64_sonoma: "affa202294a94626e2135bc65c2e2aacc5e3e5bfba4dc37f9c968d21c917cf09" + sha256 cellar: :any, arm64_ventura: "2d49c0d30645a4fced0469d6a8e01e0e2e01a2df825a294f8c1f2f96c2e1a88c" + sha256 cellar: :any, arm64_monterey: "99e77ef6ad2913838bb979ef9e675e1f1ca194713cf7e8faf5f1b807e84b927c" + sha256 cellar: :any, arm64_big_sur: "8b120c1eda7fdb21104835b968eeebcd83f12d36d3bee874d6d42f10f4bbc5c1" + sha256 cellar: :any, sonoma: "44991a7f8c62e2020d8d37e9d3ee1e2f1637bdeda9e8f7a4c21762a52c4956bc" + sha256 cellar: :any, ventura: "4ebde838536ddeb8879a44fedea358296ede38ec2ca9d6d43ff10aeade2df579" + sha256 cellar: :any, monterey: "af61231d4d560cd5476697ea6ef186adaa388569d5cb73d9c03dcec659746c92" + sha256 cellar: :any, big_sur: "7cefcca081ea49ddddc9bd0731dc0eb2246921720cc7b9ed9a1d2e3e62086aa8" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5f55dab0d6f87ddc0433308b582a901da2ab14244213b7392afd081f4ffde5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ec855a0237182522d9598ea0afa9e42bb1b008c5a5233d79bb5630e2cf86802" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "djvulibre" + depends_on "libtiff" + + on_linux do + depends_on "gzip" + end + + def install + inreplace "Makefile.in", "/usr/bin/gzip", Formula["gzip"].opt_bin/"gzip" unless OS.mac? + + ENV.deparallelize + # force detection of BSD mkdir (macos) + # outdated configure scripts fail to detect the correct build type (linux arm) + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make" + system "make", "install" + lib.install Dir[prefix/shared_library("*")] + end +end diff --git a/Formula/m/minidlna.rb b/Formula/m/minidlna.rb new file mode 100644 index 0000000000000..15f7372c6835b --- /dev/null +++ b/Formula/m/minidlna.rb @@ -0,0 +1,128 @@ +class Minidlna < Formula + desc "Media server software, compliant with DLNA/UPnP-AV clients" + homepage "https://sourceforge.net/projects/minidlna/" + url "https://downloads.sourceforge.net/project/minidlna/minidlna/1.3.3/minidlna-1.3.3.tar.gz" + sha256 "39026c6d4a139b9180192d1c37225aa3376fdf4f1a74d7debbdbb693d996afa4" + license "GPL-2.0-only" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "9fc0ed3ac5675b3dbfe74a361c9b43f7d82a29a65a12abc56ac1b9efd30d1258" + sha256 cellar: :any, arm64_sequoia: "f7e718095ef9388cd38793641bcc399107f037cbf6bc744705ce58a5deb9c291" + sha256 cellar: :any, arm64_sonoma: "a848bf8fdcace687463088fbbbb1095d0259bd65de13e580f76c05673bf31cc3" + sha256 cellar: :any, arm64_ventura: "014e64f8d81857532e0a65c2aaf361d18090fe2ff791ef351ea02311ccd69410" + sha256 cellar: :any, sonoma: "ff6b2f6bd3fcad653e0db52c02c40db6edb23d7bfbeb9647ed13c97e7607a9d1" + sha256 cellar: :any, ventura: "a95db24b987a5f9139174ccffbb740b561dca9218a2f683b89aeff6ce5156985" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb6c7d8e54a0dda78af8f46d94643bcbd11914bf8e6b20b534d4470127e4d492" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12eec6b926c5633f8fd7565e772a4e334f2f61fa0ab9dfd3a2dfd654e594c997" + end + + head do + url "https://git.code.sf.net/p/minidlna/git.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + depends_on "ffmpeg" + depends_on "flac" + depends_on "gettext" + depends_on "jpeg-turbo" + depends_on "libexif" + depends_on "libid3tag" + depends_on "libogg" + depends_on "libvorbis" + depends_on "sqlite" + + # Apply Fedora's patch to support newer FFmpeg. This has an open merge request: + # https://sourceforge.net/p/minidlna/git/merge-requests/58/ + patch do + url "https://src.fedoraproject.org/rpms/minidlna/raw/5de0e84859aa974c489b999ba75c83b5697eecb9/f/0001-Add-compatibility-with-FFMPEG-7.0.patch" + sha256 "871833e6ae0dbf629b1ff3adc9a2e1c76f7e3ac9a07d0db29ad389847ce9fab4" + end + + # Add missing include: https://sourceforge.net/p/minidlna/bugs/351/ + patch :DATA + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + def post_install + conf = <<~EOS + friendly_name=Mac DLNA Server + media_dir=#{Dir.home}/.config/minidlna/media + db_dir=#{Dir.home}/.config/minidlna/cache + log_dir=#{Dir.home}/.config/minidlna + EOS + + (pkgshare/"minidlna.conf").write conf unless (pkgshare/"minidlna.conf").exist? + end + + def caveats + <<~EOS + Simple single-user configuration: + + mkdir -p ~/.config/minidlna + cp #{opt_pkgshare}/minidlna.conf ~/.config/minidlna/minidlna.conf + ln -s YOUR_MEDIA_DIR ~/.config/minidlna/media + minidlnad -f ~/.config/minidlna/minidlna.conf -P ~/.config/minidlna/minidlna.pid + EOS + end + + service do + run [opt_sbin/"minidlnad", "-d", "-f", "#{Dir.home}/.config/minidlna/minidlna.conf", + "-P", "#{Dir.home}/.config/minidlna/minidlna.pid"] + keep_alive true + log_path var/"log/minidlnad.log" + error_log_path var/"log/minidlnad.log" + end + + test do + require "expect" + + (testpath/".config/minidlna/media").mkpath + (testpath/".config/minidlna/cache").mkpath + (testpath/"minidlna.conf").write <<~EOS + friendly_name=Mac DLNA Server + media_dir=#{testpath}/.config/minidlna/media + db_dir=#{testpath}/.config/minidlna/cache + log_dir=#{testpath}/.config/minidlna + EOS + + port = free_port + + io = IO.popen("#{sbin}/minidlnad -d -f minidlna.conf -p #{port} -P #{testpath}/minidlna.pid", "r") + timeout = if Hardware::CPU.arm? + 30 + else + 50 + end + io.expect("debug: Initial file scan completed", timeout) + assert_path_exists testpath/"minidlna.pid" + + # change back to localhost once https://sourceforge.net/p/minidlna/bugs/346/ is addressed + assert_match "MiniDLNA #{version}", shell_output("curl 127.0.0.1:#{port}") + end +end + +__END__ +diff --git a/kqueue.c b/kqueue.c +index 35b3f2b..cf425cf 100644 +--- a/kqueue.c ++++ b/kqueue.c +@@ -28,6 +28,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/Formula/m/miniflux.rb b/Formula/m/miniflux.rb new file mode 100644 index 0000000000000..9c2a27e0c424f --- /dev/null +++ b/Formula/m/miniflux.rb @@ -0,0 +1,81 @@ +class Miniflux < Formula + desc "Minimalist and opinionated feed reader" + homepage "https://miniflux.app" + url "https://github.com/miniflux/v2/archive/refs/tags/2.2.14.tar.gz" + sha256 "8cc9beadb74ac592dbb2d325500429c4ec95b21857773c16f8685ef7b9b807c1" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7b82221cc40e1c68c94c4b6f265f8425fa7c69709f90f221766df19e1defcb1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7703987c502c0c8f022a708c4be247e24a710f8a6fa4daea3a915d189d3d46fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "90598590982077cfd2aa32f22eace850884b60cc409aa8e02801f6ce196cf35b" + sha256 cellar: :any_skip_relocation, sonoma: "ea27907aa4d23ddd0c648103a6512cc805833ead6033f63f2496e56a7be99725" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bde792defd1183f1593f7785e12008364190c6f2a4aa2a5c1afd48d5cf16edb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b89bd7d296056fc6796ef7863ed59f1a00d09b3792fa097c79827b89372f226f" + end + + depends_on "go" => :build + depends_on "postgresql@18" => :test + + def install + ldflags = %W[ + -s -w + -X miniflux.app/v2/internal/version.Version=#{version} + -X miniflux.app/v2/internal/version.Commit=#{tap.user} + -X miniflux.app/v2/internal/version.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + end + + service do + run [opt_bin/"miniflux", "-c", etc/"miniflux.conf"] + keep_alive true + error_log_path var/"log/miniflux.log" + log_path var/"log/miniflux.log" + working_dir var + end + + test do + ENV["LC_ALL"] = "C" + + pg_port = free_port + pg_bin = Formula["postgresql@18"].opt_bin + pg_ctl = pg_bin/"pg_ctl" + + datadir = testpath/"postgres" + system pg_ctl, "init", "-D", datadir + + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + port = #{pg_port} + unix_socket_directories = '#{datadir}' + EOS + + system pg_ctl, "start", "-D", datadir, "-l", testpath/"postgres.log" + begin + system pg_bin/"createdb", "-h", datadir, "-p", pg_port.to_s, "miniflux_test" + + # Run Miniflux + miniflux_port = free_port + (testpath/"miniflux.conf").write <<~CONF + DATABASE_URL=postgres://localhost:#{pg_port}/miniflux_test?sslmode=disable + ADMIN_USERNAME=admin + ADMIN_PASSWORD=test123 + CREATE_ADMIN=1 + RUN_MIGRATIONS=1 + LOG_LEVEL=debug + LISTEN_ADDR=127.0.0.1:#{miniflux_port} + CONF + + miniflux_pid = spawn(bin/"miniflux", "-c", testpath/"miniflux.conf") + begin + sleep 2 + assert_equal "OK", shell_output("curl -s http://127.0.0.1:#{miniflux_port}/healthcheck") + ensure + Process.kill "TERM", miniflux_pid + Process.wait miniflux_pid + end + ensure + system pg_ctl, "stop", "-D", datadir + end + end +end diff --git a/Formula/m/minify.rb b/Formula/m/minify.rb new file mode 100644 index 0000000000000..c4c8bac63dcc0 --- /dev/null +++ b/Formula/m/minify.rb @@ -0,0 +1,40 @@ +class Minify < Formula + desc "Minifier for HTML, CSS, JS, JSON, SVG, and XML" + homepage "https://go.tacodewolff.nl/minify" + url "https://github.com/tdewolff/minify/archive/refs/tags/v2.24.6.tar.gz" + sha256 "18ea9ff2d11789e69a7b9f835e75abe92d75142bfdf70e53bc3445e44ea06e94" + license "MIT" + head "https://github.com/tdewolff/minify.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "25f9cb306efb588b1225b7a8f0842719ac48d6c59b9489efb4add0710029ff68" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25f9cb306efb588b1225b7a8f0842719ac48d6c59b9489efb4add0710029ff68" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "25f9cb306efb588b1225b7a8f0842719ac48d6c59b9489efb4add0710029ff68" + sha256 cellar: :any_skip_relocation, sonoma: "a1ad5ef6643da1fbffe8232bae3f28900900af8ff8cb96b9a2f30977de9342bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "a094ccdf847ed64592235e322121c29e42ea799094b9133551c893f466ac50a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d194306fde994dc2b3ee9c761bf4717f69c827fc24a41bf2fd0b49339e25b66" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/minify" + bash_completion.install "cmd/minify/bash_completion" + end + + test do + assert_match version.to_s, shell_output("#{bin}/minify --version") + + (testpath/"test.html").write <<~HTML +
+
test1
+
test2
+
+ HTML + assert_equal "
test1
test2
", shell_output("#{bin}/minify test.html") + end +end diff --git a/Formula/m/minigraph.rb b/Formula/m/minigraph.rb new file mode 100644 index 0000000000000..be77ff798d30b --- /dev/null +++ b/Formula/m/minigraph.rb @@ -0,0 +1,49 @@ +class Minigraph < Formula + desc "Proof-of-concept seq-to-graph mapper and graph generator" + homepage "https://lh3.github.io/minigraph" + url "https://github.com/lh3/minigraph/archive/refs/tags/v0.21.tar.gz" + sha256 "4272447393f0ae1e656376abe144de96cbafc777414d4c496f735dd4a6d3c06a" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e1f725e6105e8492fb5d6fc2e7a1d34908dc1a48f649cfdaee1b35d33c1cde6f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "74910ce15f23503fe34b6b8a2fcd5e42fc77c5d9731af7901d4f37abb8b2291d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c97ede2ba9819f38713bba63399fa4386a5f9ad7b1d69da1ec59c93e041b676" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c732ab52d288ebc25d387a00ec4df300a29c3e0d47215a39e8f08a2aba06ff99" + sha256 cellar: :any_skip_relocation, arm64_monterey: "671d905a9d3bc672efedf7169d79a577c0df8bb0fc1fd8d6ff0f71b8014ba1de" + sha256 cellar: :any_skip_relocation, sonoma: "41b0c146e36c565da5aa7b60f21b4ddd2ff463b20ad1f14b155b3f6b66b980ff" + sha256 cellar: :any_skip_relocation, ventura: "5bb664d3a2608ad6213e5d60cec28a144f9ce230991ba8c4d9ccb50c57503d84" + sha256 cellar: :any_skip_relocation, monterey: "ec305e269ea8fc05307c59757a55b73f8afd8c4b91ff878b91015fe432863c96" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8bb2dee04f9410b06916cdcbd208e353e319fd5a928b067af88715d676cb046" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66fe3ea02850e9c7c043cf189d474d2e866b8c2f3540bf4338864c070a6be913" + end + + uses_from_macos "zlib" + + def install + sse4 = Hardware::CPU.intel? && ((OS.mac? && MacOS.version.requires_sse4?) || + (!build.bottle? && Hardware::CPU.sse4?)) + unless sse4 + inreplace "Makefile" do |s| + cflags = s.get_make_var("CFLAGS").split + cflags.delete("-msse4") { |flag| "Remove inreplace for #{flag}!" } + s.change_make_var! "CFLAGS", cflags.join(" ") + end + end + + system "make" + bin.install "minigraph" + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test/.", testpath + output = shell_output("#{bin}/minigraph MT-human.fa MT-orangA.fa 2>&1") + assert_match "mapped 1 sequences", output + end +end diff --git a/Formula/m/minijinja-cli.rb b/Formula/m/minijinja-cli.rb new file mode 100644 index 0000000000000..ebec6caf0405a --- /dev/null +++ b/Formula/m/minijinja-cli.rb @@ -0,0 +1,39 @@ +class MinijinjaCli < Formula + desc "Render Jinja2 templates directly from the command-line to stdout" + homepage "https://docs.rs/minijinja/latest/minijinja/" + url "https://github.com/mitsuhiko/minijinja/archive/refs/tags/2.12.0.tar.gz" + sha256 "b70d30f5165527d5b67712bf01226fb6add6b8ec38ada194c56f28889a4c6abe" + license "Apache-2.0" + head "https://github.com/mitsuhiko/minijinja.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1db406c1c6ba2bc13902d23ede762e36e580dcf0a8b603c6f142c28b53f2bc1b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "995b6b24688b70df80180cd10ead0011af56a88f7f17c0692a7e395a39bbff94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1857a1dfcdd55c93a7fc28b8ae821b5dd72db070e11bf84574258996ae2ab7d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "340b6e423c1dc27ffc8e2341ff5924bd7a187c497723c62b2af477f8b39876b3" + sha256 cellar: :any_skip_relocation, sonoma: "29482097f68789845f57748c22adee2b13f082dad19f1000da0af220a34cb1c8" + sha256 cellar: :any_skip_relocation, ventura: "70aafcf5d706b94e0c785c0a4a8eff06964f15404f203d697e77d2346717e8a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b6f4fae17c5aef051da449b9f13c873f1818802f0f0a88a750dfe6c28c38a1d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7db517fda45e83d72de6c37458860520651b67d12538613d8fe0d92f236f6889" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "minijinja-cli") + + generate_completions_from_executable(bin/"minijinja-cli", "--generate-completion") + end + + test do + (testpath/"test.jinja").write <<~EOS + Hello {{ name }} + EOS + + assert_equal "Hello Homebrew\n", shell_output("#{bin}/minijinja-cli test.jinja --define name=Homebrew") + end +end diff --git a/Formula/m/minikube.rb b/Formula/m/minikube.rb new file mode 100644 index 0000000000000..d0e91a3ad7a12 --- /dev/null +++ b/Formula/m/minikube.rb @@ -0,0 +1,45 @@ +class Minikube < Formula + desc "Run a Kubernetes cluster locally" + homepage "https://minikube.sigs.k8s.io/" + url "https://github.com/kubernetes/minikube.git", + tag: "v1.37.0", + revision: "65318f4cfff9c12cc87ec9eb8f4cdd57b25047f3" + license "Apache-2.0" + head "https://github.com/kubernetes/minikube.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1de992e28c904537e9bb7291e2c058e4b0f896a191bca819a4b56044247b640c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d3cd0c4554207047cdce1efddd7da706ad078646848a8198714afb6e375cfd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "08b30541e8aa4dece8d30a515a88162bfc4c7b5916e0f682be21303fcdd4ee8c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3da9522694365cf193988a29bedcd8d4fcd430c51f20d16bb3124d48acb73a87" + sha256 cellar: :any_skip_relocation, sonoma: "4f7c49135a7d22a2954a3335019f9edaa7efb7dc3ec36a39c8611d74cca0a328" + sha256 cellar: :any_skip_relocation, ventura: "4a99e8fdb976b8d77d0236724f4234d339e578d65f2cdcfdfe021777820b4e61" + sha256 cellar: :any_skip_relocation, arm64_linux: "be418b1b637fb4a224e784771903d8632fefdc524a88123700c83072cdb9cde5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f41f1fd1112d6d4badf73883e1d48f7d69fa6cc70af14fb1daa5994123a80e79" + end + + depends_on "go" => :build + depends_on "go-bindata" => :build + depends_on "kubernetes-cli" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + system "make" + bin.install "out/minikube" + + generate_completions_from_executable(bin/"minikube", "completion") + end + + test do + output = shell_output("#{bin}/minikube version") + assert_match "version: v#{version}", output + + (testpath/".minikube/config/config.json").write <<~JSON + { + "vm-driver": "virtualbox" + } + JSON + output = shell_output("#{bin}/minikube config view") + assert_match "vm-driver: virtualbox", output + end +end diff --git a/Formula/m/minimal-racket.rb b/Formula/m/minimal-racket.rb new file mode 100644 index 0000000000000..ee697fc17c601 --- /dev/null +++ b/Formula/m/minimal-racket.rb @@ -0,0 +1,122 @@ +class MinimalRacket < Formula + desc "Modern programming language in the Lisp/Scheme family" + homepage "https://racket-lang.org/" + url "https://mirror.racket-lang.org/installers/8.17/racket-minimal-8.17-src.tgz" + sha256 "4acb365869290881fa07c69588cfa8b2dc1000bdc69955d70964b0b1e76b71ba" + license any_of: ["MIT", "Apache-2.0"] + + # File links on the download page are created using JavaScript, so we parse + # the filename from a string in an object. We match the version from the + # "Unix Source + built packages" option, as the `racket-minimal` archive is + # only found on the release page for a given version (e.g., `/releases/8.0/`). + livecheck do + url "https://download.racket-lang.org/" + regex(/["'][^"']*?racket(?:-minimal)?[._-]v?(\d+(?:\.\d+)+)-src\.t/i) + end + + bottle do + sha256 arm64_tahoe: "f2a14fcc40b562cfd9317850e72661b188508e48b85589a34ffdc271e6d05241" + sha256 arm64_sequoia: "94233ccf4855529eb037fbb967af7f8c86744c5f29c28295608777e4638ac64f" + sha256 arm64_sonoma: "a3d27bb96382f5d0d8bec7d81f7b19748fa33c3619a33b73afe1090d88bc6cea" + sha256 arm64_ventura: "9cefe4eeec12b2336be7ac7da5e6f2c2c840e9a41678c32caf88e92db2d73089" + sha256 sonoma: "50070f5a19ea226744524551a8a2c0946d23e261ab06a968993f0e75c78d10cb" + sha256 ventura: "9b14e9c9c57cc4f73303ee360ef582689cf7139b447c87490c5521b82a42daec" + sha256 arm64_linux: "bbda2f3defd23d8983ef8be7634df86c4b2e25d8aeca609490927a91aa781d5c" + sha256 x86_64_linux: "3ede573d7078a9acbf249fa05fc5221fa667ea13a4334a1e13bed8705bb7cdd0" + end + + depends_on "openssl@3" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + # these two files are amended when (un)installing packages + skip_clean "lib/racket/launchers.rktd", "lib/racket/mans.rktd" + + def racket_config + etc/"racket/config.rktd" + end + + def install + # configure racket's package tool (raco) to do the Right Thing + # see: https://docs.racket-lang.org/raco/config-file.html + inreplace "etc/config.rktd", /\)\)\n$/, ") (default-scope . \"installation\"))\n" + + # Prioritise OpenSSL 3 over OpenSSL 1.1. + inreplace %w[libssl.rkt libcrypto.rkt].map { |file| buildpath/"collects/openssl"/file }, + '"1.1"', '"3"' + + cd "src" do + args = %W[ + --disable-debug + --disable-dependency-tracking + --enable-origtree=no + --enable-macprefix + --prefix=#{prefix} + --mandir=#{man} + --sysconfdir=#{etc} + --enable-useprefix + ] + + ENV["LDFLAGS"] = "-rpath #{Formula["openssl@3"].opt_lib}" + ENV["LDFLAGS"] = "-Wl,-rpath=#{Formula["openssl@3"].opt_lib}" if OS.linux? + + system "./configure", *args + system "make" + system "make", "install" + end + + inreplace racket_config, prefix, opt_prefix + end + + def post_install + # Run raco setup to make sure core libraries are properly compiled. + # Sometimes the mtimes of .rkt and .zo files are messed up after a fresh + # install, making Racket take 15s to start up because interpreting is slow. + system bin/"raco", "setup" + + return unless racket_config.read.include?(HOMEBREW_CELLAR) + + ohai "Fixing up Cellar references in #{racket_config}..." + inreplace racket_config, %r{#{Regexp.escape(HOMEBREW_CELLAR)}/minimal-racket/[^/]}o, opt_prefix + end + + def caveats + <<~EOS + This is a minimal Racket distribution. + If you want to build the DrRacket IDE, you may run: + raco pkg install --auto drracket + + The full Racket distribution is available as a cask: + brew install --cask racket + EOS + end + + test do + output = shell_output("#{bin}/racket -e '(displayln \"Hello Homebrew\")'") + assert_match "Hello Homebrew", output + + # show that the config file isn't malformed + output = shell_output("'#{bin}/raco' pkg config") + assert $CHILD_STATUS.success? + assert_match Regexp.new(<<~EOS), output + ^name: + #{version} + catalogs: + https://download.racket-lang.org/releases/#{version}/catalog/ + https://pkgs.racket-lang.org + https://planet-compats.racket-lang.org + default-scope: + installation + EOS + + # ensure Homebrew openssl is used + if OS.mac? + output = shell_output("DYLD_PRINT_LIBRARIES=1 #{bin}/racket -e '(require openssl)' 2>&1") + assert_match(%r{.*openssl@3/.*/libssl.*\.dylib}, output) + else + output = shell_output("LD_DEBUG=libs #{bin}/racket -e '(require openssl)' 2>&1") + assert_match "init: #{Formula["openssl@3"].opt_lib/shared_library("libssl")}", output + end + end +end diff --git a/Formula/m/minimap2.rb b/Formula/m/minimap2.rb new file mode 100644 index 0000000000000..c47aa14923f44 --- /dev/null +++ b/Formula/m/minimap2.rb @@ -0,0 +1,41 @@ +class Minimap2 < Formula + desc "Versatile pairwise aligner for genomic and spliced nucleotide sequences" + homepage "https://lh3.github.io/minimap2" + url "https://github.com/lh3/minimap2/archive/refs/tags/v2.30.tar.gz" + sha256 "4e5cd621be2b2685c5c88d9b9b169c7e036ab9fff2f3afe1a1d4091ae3176380" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "106a141d81ca4146eb67910656304caab34900a21bad667eda801f3181b397c3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "15a95a85343975c72953717d6aefcca9ee2e04f1f0a0b0403819d053c722368a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfb5b7c1bc6595db98264d150b10cb4b1f17efcedd60a087a8f3540861679fe0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e71e6111743b87d5005094bbaa9813116922d397b7dbce5f8a7e34bba6e78ef2" + sha256 cellar: :any_skip_relocation, sonoma: "f29c0dadd3b8a0ac0eabb51593e2c55f9bb57a65ebea6dc5822d141e9d4b94ce" + sha256 cellar: :any_skip_relocation, ventura: "16e71c8e195454cc5809b874ac3ff3cbaabe4ac8cf329c17fe5c9b5cc732af8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ab2307d37cca517d00b5c6b2622d332c90bae19e880f3d6749b5182401f5d35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f28f740a2280da6423e032afba5109e2253f57286f779add8f2c0c52f783fff8" + end + + uses_from_macos "zlib" + + def install + if Hardware::CPU.arm? + system "make", "arm_neon=1", "aarch64=1", "extra" + else + system "make", "extra" + end + bin.install "minimap2", "sdust" + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test/.", testpath + output = shell_output("#{bin}/minimap2 -a MT-human.fa MT-orang.fa 2>&1") + assert_match "mapped 1 sequences", output + end +end diff --git a/Formula/m/minimodem.rb b/Formula/m/minimodem.rb new file mode 100644 index 0000000000000..f78a0982eac6e --- /dev/null +++ b/Formula/m/minimodem.rb @@ -0,0 +1,45 @@ +class Minimodem < Formula + desc "General-purpose software audio FSK modem" + homepage "http://www.whence.com/minimodem/" + url "http://www.whence.com/minimodem/minimodem-0.24.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/m/minimodem/minimodem_0.24.orig.tar.gz" + sha256 "f8cca4db8e3f284d67f843054d6bb4d88a3db5e77b26192410e41e9a06f4378e" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?minimodem[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "733a179f707e522c3b44c603a5fddfc616d22a4c94dc0a721f76f000c3499a66" + sha256 cellar: :any, arm64_sequoia: "4bf7e151ffff1de41f8ce86bab303b7afb6e40b0f5417fdfada6a73fe633b6d6" + sha256 cellar: :any, arm64_sonoma: "8e4dc030caca81ca64460297f68f5f4d03d51a9836b4e9b7da4b30c63a9f3d89" + sha256 cellar: :any, arm64_ventura: "c3b2dedf19a1253a4e9b5eef4ae278875eda2759f82c8ec9d503ead44ce0fcd2" + sha256 cellar: :any, arm64_monterey: "d2eae4352ba72db26b2b38798cfb1c48f937df4e4cad3a5d50036abe2a2b8f52" + sha256 cellar: :any, arm64_big_sur: "659dd378a4d6fc0f96d3752b6fd8303f0f6c79beeb0424fa8456ec33d270fb02" + sha256 cellar: :any, sonoma: "ae1f9e5a3adda8bd22e705739a3dd2f76fc1eb2aeb7accf21e0fdfad5164a378" + sha256 cellar: :any, ventura: "f8cad830872535b888d97d61e4444b5dc16091afbf340f358a2c93e6d464ce86" + sha256 cellar: :any, monterey: "cc0e8ee52305c15554adcf6e50c52ea670ac814001092d82b45f7083e9399928" + sha256 cellar: :any, big_sur: "09ee4e144cb7484994278cf3698474f9d205fb38d926c1936046c422eb772a99" + sha256 cellar: :any, catalina: "5f9cd0c17ee17754bfe88c6e275111270e0a0d0cdebb663a0045d6ad49c8b9a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcc897c306d8db37b369010254a87762845eefd5aad185938639b0728250af53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e160d02015fdfd48ef348ef8f73bb6040e2a66ff9047cf1bc7f720ad94c173a7" + end + + depends_on "pkgconf" => :build + depends_on "fftw" + depends_on "libsndfile" + depends_on "pulseaudio" + + def install + system "./configure", "--without-alsa", *std_configure_args + system "make", "install" + end + + test do + system bin/"minimodem", "--benchmarks" + end +end diff --git a/Formula/m/minio-mc.rb b/Formula/m/minio-mc.rb new file mode 100644 index 0000000000000..89d307ab46f4b --- /dev/null +++ b/Formula/m/minio-mc.rb @@ -0,0 +1,59 @@ +class MinioMc < Formula + desc "Replacement for ls, cp and other commands for object storage" + homepage "https://github.com/minio/mc" + url "https://github.com/minio/mc.git", + tag: "RELEASE.2025-08-13T08-35-41Z", + revision: "7394ce0dd2a80935aded936b09fa12cbb3cb8096" + version "2025-08-13T08-35-41Z" + license "AGPL-3.0-or-later" + version_scheme 1 + head "https://github.com/minio/mc.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:RELEASE[._-]?)?([\dTZ-]+)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de6f7f9346bc488230a9ad97bf4e756b2705218246c89a88a75125d7827e6d66" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b4a41f0de492c2ac69846df380757be259e2d762219a1c5a80119ece845e487" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a2fe5e78c335c757898cb3574775c140c718bffe2ca4ba573df0a606944497c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ce210974c0bd2f273e67c10970ae25923326b31b1e7823aaeaae4aad73e8f5f" + sha256 cellar: :any_skip_relocation, sonoma: "06be6e6c3190957e688c8321892e4fe21118900564ad176ef24300bcb582853d" + sha256 cellar: :any_skip_relocation, ventura: "6e4576ab9c04b1d7f4a593b5329e126e09fd604c0c710be75a90edb6b21beb9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f02a6a7dbcdeed12b5ced2c2dc39d125181ab5cb75078ed9607d2378424b499b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f8ddb10d84cbd05663a495bb04c778a3d5e4915b2b1c506cc98a6a2a1750dbd" + end + + depends_on "go" => :build + + conflicts_with "midnight-commander", because: "both install an `mc` binary" + + def install + if build.head? + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"mc") + else + minio_release = stable.specs[:tag] + minio_version = version.to_s.gsub(/T(\d+)-(\d+)-(\d+)Z/, 'T\1:\2:\3Z') + proj = "github.com/minio/mc" + + ldflags = %W[ + -s -w + -X #{proj}/cmd.Version=#{minio_version} + -X #{proj}/cmd.ReleaseTag=#{minio_release} + -X #{proj}/cmd.CommitID=#{Utils.git_head} + -X #{proj}/cmd.CopyrightYear=#{version.major} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"mc") + end + end + + test do + output = shell_output("#{bin}/mc --version 2>&1") + assert_equal version.to_s, output[/(?:RELEASE[._-]?)?([\dTZ-]+)/, 1], "`version` is incorrect" + + system bin/"mc", "mb", testpath/"test" + assert_path_exists testpath/"test" + end +end diff --git a/Formula/m/minio-warp.rb b/Formula/m/minio-warp.rb new file mode 100644 index 0000000000000..6f1b9c4ca3fc3 --- /dev/null +++ b/Formula/m/minio-warp.rb @@ -0,0 +1,38 @@ +class MinioWarp < Formula + desc "S3 benchmarking tool" + homepage "https://github.com/minio/warp" + url "https://github.com/minio/warp/archive/refs/tags/v1.3.1.tar.gz" + sha256 "8e10189adf0d6984d638a9229ba1cb3aee26f76db02ff476e0ee60604c8159af" + license "AGPL-3.0-or-later" + head "https://github.com/minio/warp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cd2053fe0224ec3ba2544f631756abf3b51cc793dc35bc956c3cb5e2ca5f9860" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3c820dcc736b88ebd17347eb2393af80ff197f9fa403a4de297d25b60294753" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "356785da8dba392263a2a83bab320fd2a8e0d97d30ea60895adfdafb647e0994" + sha256 cellar: :any_skip_relocation, sonoma: "459c539513ea80d970b710ea13a9a9874fdde2b49748b453d48d2e979b21306a" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c6b83176740286daf8482caddce4475a505aab38b70e5aa7a0b4e27752b422f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "60bdd722bfd7f92382a9fb25e15e7cc3520cbdbacba38ba77c2a6b02be133d29" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/minio/warp/pkg.ReleaseTag=v#{version} + -X github.com/minio/warp/pkg.CommitID=#{tap.user} + -X github.com/minio/warp/pkg.Version=#{version} + -X github.com/minio/warp/pkg.ReleaseTime=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:, output: bin/"warp") + end + + test do + output = shell_output("#{bin}/warp list --no-color 2>&1", 1) + assert_match "warp: Error preparing server", output + + assert_match version.to_s, shell_output("#{bin}/warp --version") + end +end diff --git a/Formula/m/minio.rb b/Formula/m/minio.rb new file mode 100644 index 0000000000000..8bba52ced2209 --- /dev/null +++ b/Formula/m/minio.rb @@ -0,0 +1,68 @@ +class Minio < Formula + desc "High Performance, Kubernetes Native Object Storage" + homepage "https://min.io" + url "https://github.com/minio/minio.git", + tag: "RELEASE.2025-10-15T17-29-55Z", + revision: "9e49d5e7a648f00e26f2246f4dc28e6b07f8c84a" + version "2025-10-15T17-29-55Z" + license "AGPL-3.0-or-later" + version_scheme 1 + head "https://github.com/minio/minio.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:RELEASE[._-]?)?([\dTZ-]+)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3e2fa706f5b973ff2927c21538d1e0be160aced2d5f646742f40291a7529d484" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "80b0d45a0099d2077e7b1c6b219c74a243f5a50520aab2973f54a46843ce7f53" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac206377ae9be883cd86cab99f522898668608614837eee76cc9ac657d3e9233" + sha256 cellar: :any_skip_relocation, sonoma: "54154dcdba031f5a053608848ca767dd7549a1c1a2d7fb419c09d0e7f8c463c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9111c9baff73c9c8e552b1147114b606fddf35ffb0e4e164085ab5b715b277ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4eec0924999ec02512516b58be63a3c29dc75a2d9e46494d4f6197d457d7846a" + end + + depends_on "go" => :build + + def install + if build.head? + system "go", "build", *std_go_args + else + minio_release = stable.specs[:tag] + minio_version = version.to_s.gsub(/T(\d+)-(\d+)-(\d+)Z/, 'T\1:\2:\3Z') + + ldflags = %W[ + -s -w + -X github.com/minio/minio/cmd.Version=#{minio_version} + -X github.com/minio/minio/cmd.ReleaseTag=#{minio_release} + -X github.com/minio/minio/cmd.CommitID=#{Utils.git_head} + -X github.com/minio/minio/cmd.CopyrightYear=#{version.major} + ] + + system "go", "build", *std_go_args(ldflags:) + end + end + + def post_install + (var/"minio").mkpath + (etc/"minio").mkpath + end + + service do + run [opt_bin/"minio", "server", "--certs-dir=#{etc}/minio/certs", "--address=:9000", var/"minio"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/minio.log" + error_log_path var/"log/minio.log" + end + + test do + output = shell_output("#{bin}/minio --version 2>&1") + assert_equal version.to_s, output[/(?:RELEASE[._-]?)?([\dTZ-]+)/, 1], "`version` is incorrect" + + output = shell_output("#{bin}/minio server --help 2>&1") + assert_match "minio server - start object storage server", output + end +end diff --git a/Formula/m/minipro.rb b/Formula/m/minipro.rb new file mode 100644 index 0000000000000..0db854d50105e --- /dev/null +++ b/Formula/m/minipro.rb @@ -0,0 +1,43 @@ +class Minipro < Formula + desc "Open controller for the MiniPRO TL866xx series of chip programmers" + homepage "https://gitlab.com/DavidGriffith/minipro/" + # GitLab tarball is keep changing checksum, so we use git tag + url "https://gitlab.com/DavidGriffith/minipro.git", + tag: "0.7.4", + revision: "3808aecb6a1dac9906a9691b93820ee1bd2b7a18" + license "GPL-3.0-or-later" + head "https://gitlab.com/DavidGriffith/minipro.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "13bf4c41ff4d6891b353ade71ac5e25c879392ea605a29bc9354cff9acc28702" + sha256 arm64_sequoia: "4becb73379ef89e434edcf54f3e268649586ccbdee7dd9f85436eaa757aad47c" + sha256 arm64_sonoma: "06cc2da2326ef31264e060e8168e8b3920355a36cd53bb6769b234d1cb1110d7" + sha256 sonoma: "82ce14e63986e7851eafbfc4c24594275432b1546bee2ecc1f4b08a07d12b717" + sha256 arm64_linux: "9f93a79729a8b337f24fc62ea86bbfb0788f32efd553a69025da0598914a5654" + sha256 x86_64_linux: "46837cebd883c96a26d4d3b89aaa4790e737e3b75cd9c82d9bbdea0a11cb0259" + end + + depends_on "pkgconf" => :build + depends_on "libusb" + depends_on "srecord" + + uses_from_macos "zlib" + + def install + system "make", "CC=#{ENV.cc}", "PREFIX=#{prefix}" + system "make", "PREFIX=#{prefix}", "MANDIR=#{share}", "install" + end + + test do + output_minipro = shell_output("#{bin}/minipro 2>&1", 1) + assert_match "minipro version #{version}", output_minipro + + output_minipro_read_nonexistent = shell_output("#{bin}/minipro -p \"ST21C325@DIP7\" -b 2>&1", 1) + if output_minipro_read_nonexistent.exclude?("Device ST21C325@DIP7 not found!") && + output_minipro_read_nonexistent.exclude?("Error opening device") && + output_minipro_read_nonexistent.exclude?("No programmer found.") + raise "Error validating minipro device database." + end + end +end diff --git a/Formula/m/miniprot.rb b/Formula/m/miniprot.rb new file mode 100644 index 0000000000000..514eaefa2e65e --- /dev/null +++ b/Formula/m/miniprot.rb @@ -0,0 +1,32 @@ +class Miniprot < Formula + desc "Align proteins to genomes with splicing and frameshift" + homepage "https://lh3.github.io/miniprot/" + url "https://github.com/lh3/miniprot/archive/refs/tags/v0.18.tar.gz" + sha256 "e1b5c08571fa3a4aa225da8ec9c6e744cd116b4dc50d9e187114cffe336921ee" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fe77911afdb839f4f700c98bfda9570e0ff9002bb8e43700d9545f32e05f9d81" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "35ae697dab027ac299dc74dfc7ed0109df346cf602109c44b1f352a3aa893a8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d2f623ee332800fbfd668d5963794b04fc3928f52d06619010fa55bf3202dc4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5bd7639bb06c91ed42b6497544a1efadf1c1d8d16bbe3b07d818e35bed4d355e" + sha256 cellar: :any_skip_relocation, sonoma: "d7b50b18273f1f1e1325e84459f438088aebb0db0e8e97affd8058bfb7c515e9" + sha256 cellar: :any_skip_relocation, ventura: "e8b3a3abea6ef7abdb8597bdc54f916a8f4000b743ca34b46a68dcf4deb74355" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c95a98c7fda96b04f0a62b24b8c55b75742851044ef81d088d126f9cb36bcab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea05612a87b1d5a4dbd1763e2d2fb190e24cc9203d36449a292e4da1bd2d048e" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "miniprot" + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test/.", testpath + output = shell_output("#{bin}/miniprot DPP3-hs.gen.fa.gz DPP3-mm.pep.fa.gz 2>&1") + assert_match "mapped 1 sequences", output + end +end diff --git a/Formula/m/minisat.rb b/Formula/m/minisat.rb new file mode 100644 index 0000000000000..c5a4ca99bd410 --- /dev/null +++ b/Formula/m/minisat.rb @@ -0,0 +1,51 @@ +class Minisat < Formula + desc "Minimalistic and high-performance SAT solver" + homepage "https://github.com/stp/minisat" + url "https://github.com/stp/minisat/archive/refs/tags/releases/2.2.1.tar.gz" + sha256 "432985833596653fcd698ab439588471cc0f2437617d0df2bb191a0252ba423d" + license "MIT" + head "https://github.com/stp/minisat.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "be98d2db67c95a2f1621123cf0310ab38afecfb478407a0d43f0d90fff34ea25" + sha256 cellar: :any, arm64_sequoia: "67c3c4650f6e2e5c65d53d7d2681783cda655b3eb9915f79debdbaf77c8ddcf0" + sha256 cellar: :any, arm64_sonoma: "956661daa83980e03eecb0b94a3acba68ce6a8bf4a122b286c94c9aeed708db9" + sha256 cellar: :any, arm64_ventura: "518ea1441facc4926c3edddf1fd5e6bf4d2db6460f10d4c4d4ef6c9fd69dcd3d" + sha256 cellar: :any, arm64_monterey: "22895418f1f5e0d2a1efb9cc700f40bdb29e9809423f0c7949eeaacbbbf7b4f3" + sha256 cellar: :any, arm64_big_sur: "b802117d6cc0fa96bedac9eaa086908687ad87c7a368558e47c2417d3d2b7146" + sha256 cellar: :any, sonoma: "1f8b90a6d6db3e00b7d74587345abdeeb472a2b423f2a940ef1b487e86e410cf" + sha256 cellar: :any, ventura: "491bdcc2b593d154333f27413de300da1ef3112c12e950906d49bc50de9aada8" + sha256 cellar: :any, monterey: "5b028ad6aa66e082709083453b17d150eee4cb2a134b8cccd8c62567928b5859" + sha256 cellar: :any, big_sur: "ecc424ea3cde4f1a8d7056802d384ce1ab9823393301cac432dc26260685437a" + sha256 cellar: :any, catalina: "0940a0cb0c4c4d6130d1eb7aa698561d6b01904044ee57731ad2c12092e30e46" + sha256 cellar: :any_skip_relocation, arm64_linux: "63183ba50129d6699c3df8ede63fa932b1daa7c0765fcca11a8a6ba7e245a029" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1277996ab9a57f7c617501f9b386c2bb18ac90e00293738c12222dd89d90a979" + end + + depends_on "cmake" => :build + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DSTATIC_BINARIES=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cnf").write <<~EOS + p cnf 5 3 + 1 -5 4 0 + -1 5 3 4 0 + -3 -4 0 + EOS + + assert_match "SATISFIABLE", shell_output("#{bin}/minisat test.cnf 2>&1", 10) + end +end diff --git a/Formula/m/minised.rb b/Formula/m/minised.rb new file mode 100644 index 0000000000000..a8945ae534a02 --- /dev/null +++ b/Formula/m/minised.rb @@ -0,0 +1,40 @@ +class Minised < Formula + desc "Smaller, cheaper, faster SED implementation" + homepage "https://www.exactcode.com/opensource/minised/" + url "https://dl.exactcode.de/oss/minised/minised-1.16.tar.gz" + sha256 "46e072d5d45c9fd3d5b268523501bbea0ad016232b2d3f366a7aad0b1e7b3f71" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?minised[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5793a31a1201a62923112332d5197945ba6dc946d207b333f5f32ed0eeb2d045" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "97b244949148f54cfd90253c3d903a6b07efdc7b3cbf3da2606bfef854354977" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e30694f00f2837a20d9ea1763374d37480372134ad47743cf31eb4179a2bde8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81091d0acb8b307dfbf7e699f3a6bb3ed377b3300d931f79e39ef69b54db17e7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "794c547b94bc09df42a03d11daa4561439a2f7b3266e354c94b3972245d2192d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "83e070332d7ffada88d210ebb159b0d73a2020d3df02fdf72453c0bb3e78dd21" + sha256 cellar: :any_skip_relocation, sonoma: "8944c486d6e2de3aba6033f7e2748cb86c659f0209ebb5a2d80d846ecac48bcf" + sha256 cellar: :any_skip_relocation, ventura: "b9e479e8520bb78c3b47ef9e04d95e42e26e1ac7f79b2e2673ba56842b5fed9f" + sha256 cellar: :any_skip_relocation, monterey: "7e2091cafe98c90c2a10b7b009b8928845fff475f5fc085be54160b029fd3cb4" + sha256 cellar: :any_skip_relocation, big_sur: "c303cd44d317dbdb8e32fb3ace5200d60f707176fc11bf32b57015bd1ac99a57" + sha256 cellar: :any_skip_relocation, catalina: "0e5a711b146eceb3feea676e6816998eb82442f1632831bb95b97fa09566bf75" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab2195d826ed450db77cd8e44601dc47bbb4027d0e9777b7ab075b6b9d1513c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c46de1901db191b4cff269feb8d236fdc53ae72a83609699e4ed1a2afc6f789" + end + + def install + system "make" + system "make", "DESTDIR=#{prefix}", "PREFIX=", "install" + end + + test do + output = pipe_output("#{bin}/minised 's:o::'", "hello world", 0) + assert_equal "hell world", output.chomp + end +end diff --git a/Formula/m/miniserve.rb b/Formula/m/miniserve.rb new file mode 100644 index 0000000000000..08e4838b00fb7 --- /dev/null +++ b/Formula/m/miniserve.rb @@ -0,0 +1,42 @@ +class Miniserve < Formula + desc "High performance static file server" + homepage "https://github.com/svenstaro/miniserve" + url "https://github.com/svenstaro/miniserve/archive/refs/tags/v0.32.0.tar.gz" + sha256 "30cfabd398f0c17c2eff3fdab115b5681e21fb048f363955a064249d14cd5869" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "47389c1126d93797e519efeadf07ee02e99fec1f3e91fa630fc924b50f97838d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4957a759bdc9818ba2e7685a2a1dd20c1ec41a49b9a6ad774a042ac3af0b86fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d054d066b3e55f3f424b80e6db9ce046eabcbd2e098eb4994a5f61e0e5f1d50" + sha256 cellar: :any_skip_relocation, sonoma: "f812a2db501181c9221226c469e13702648bfc64953a43344f0a35fbefca48d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "833b51ec8582ca42e9094f07f1710a081576a7828f8f4b2f52b5acf5b55d6c95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4aabd6fa273c766767936ccfffb2d58a043905bea4950844184fb46eb350a8e3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"miniserve", "--print-completions") + (man1/"miniserve.1").write Utils.safe_popen_read(bin/"miniserve", "--print-manpage") + end + + test do + port = free_port + pid = fork do + exec bin/"miniserve", bin/"miniserve", "-i", "127.0.0.1", "--port", port.to_s + end + + sleep 2 + + begin + read = (bin/"miniserve").read + assert_equal read, shell_output("curl localhost:#{port}") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/m/minisign.rb b/Formula/m/minisign.rb new file mode 100644 index 0000000000000..31e64415e4606 --- /dev/null +++ b/Formula/m/minisign.rb @@ -0,0 +1,65 @@ +class Minisign < Formula + desc "Sign files & verify signatures. Works with signify in OpenBSD" + homepage "https://jedisct1.github.io/minisign/" + url "https://github.com/jedisct1/minisign/archive/refs/tags/0.12.tar.gz" + sha256 "796dce1376f9bcb1a19ece729c075c47054364355fe0c0c1ebe5104d508c7db0" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3978ab782bb253378c31e91a018a64f5ebffd3f7094f7a731e47b09ed1424123" + sha256 cellar: :any, arm64_sequoia: "3d5eac1ba12087334cafe44e836860f6ebe56bf82260e1347ac8c25dc9aa77ed" + sha256 cellar: :any, arm64_sonoma: "78ef36ee45540b936ac9fb73cf1098c915b60b5b55ee8fc9ef40d316ef47b5d7" + sha256 cellar: :any, arm64_ventura: "d22ac68c3ffa78e14b36cc734c948dbf380689481536069e08a6b2c8321a152d" + sha256 cellar: :any, sonoma: "db969ba861eb8b3f5ffae7e2b4109005bdd423a3c91451b4676963bde403be13" + sha256 cellar: :any, ventura: "67eded8a3ba22bd10f8a5daeb46efa9b6a25bee8de81d50e93b8d02f9f7011f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4d8961c5711101c3176712e1719b5ecb0df1c12533ab9afff6fe32d880ed390" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8855baa30f090e94dce8a04af5f1e8e507e64a545ceb244c178934718b78cd36" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libsodium" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + require "expect" + require "pty" + + (testpath/"homebrew.txt").write "Hello World!" + timeout = 5 + + PTY.spawn(bin/"minisign", "-G") do |r, w, pid| + refute_nil r.expect("Password: ", timeout), "Expected password input" + w.write "Homebrew\n" + refute_nil r.expect("Password (one more time): ", timeout), "Expected password confirmation input" + w.write "Homebrew\n" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + ensure + r.close + w.close + Process.wait(pid) + end + assert_path_exists testpath/"minisign.pub" + assert_path_exists testpath/".minisign/minisign.key" + + PTY.spawn(bin/"minisign", "-Sm", "homebrew.txt") do |r, w, pid| + refute_nil r.expect("Password: ", timeout), "Expected password input" + w.write "Homebrew\n" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + ensure + r.close + w.close + Process.wait(pid) + end + assert_path_exists testpath/"homebrew.txt.minisig" + end +end diff --git a/Formula/m/miniupnpc.rb b/Formula/m/miniupnpc.rb new file mode 100644 index 0000000000000..a061fb33aca97 --- /dev/null +++ b/Formula/m/miniupnpc.rb @@ -0,0 +1,45 @@ +class Miniupnpc < Formula + desc "UPnP IGD client library and daemon" + homepage "https://miniupnp.tuxfamily.org" + url "https://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-2.3.3.tar.gz" + mirror "http://miniupnp.free.fr/files/miniupnpc-2.3.3.tar.gz" + sha256 "d52a0afa614ad6c088cc9ddff1ae7d29c8c595ac5fdd321170a05f41e634bd1a" + license "BSD-3-Clause" + head "https://github.com/miniupnp/miniupnp.git", branch: "master" + + # We only match versions with only a major/minor since versions like 2.1 are + # stable and versions like 2.1.20191224 are unstable/development releases. + livecheck do + url "https://miniupnp.tuxfamily.org/files/" + regex(/href=.*?miniupnpc[._-]v?(\d+\.\d+(?>.\d{1,7})*)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b73df945175626c5dc6c3d05061ec1718f81ed5023c24cd59fd15c569eecf0f0" + sha256 cellar: :any, arm64_sequoia: "140a46fc7c4fc0b31604b74cbebbd48e741765fe51a8cce8e04ed692926dac97" + sha256 cellar: :any, arm64_sonoma: "943b48d7a7a85e18273bb25f34e177f9b75a032f3bc7f00891f6516aad64e2a1" + sha256 cellar: :any, arm64_ventura: "956adafa0de14369e2e0624272c1cd6f1e777e8a359b642601a6d3933bf4bc46" + sha256 cellar: :any, sonoma: "4b03e713001a5bde4ab0e36115d3bf20e81414099361a3ee7969e98c5f6dea35" + sha256 cellar: :any, ventura: "20cf52235e1f51654b66062be1869416102ccd327769892f310fbfc74035cc28" + sha256 cellar: :any_skip_relocation, arm64_linux: "8cd223f810f0720ac35009022063a6d3f03231f97a9a17b79f0f4f86e6095160" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21e083d283863e771c6927a44ad88f565f0c4af7b9448a96f99af0c773d66f8e" + end + + def install + # When building from head we have to cd into the miniupnpc directory + build_dir = build.head? ? "miniupnpc" : "." + + cd build_dir do + system "make", "INSTALLPREFIX=#{prefix}", "install" + end + end + + test do + # `No IGD UPnP Device` on CI + output = shell_output("#{bin}/upnpc -l 2>&1", 1) + assert_match "No IGD UPnP Device found on the network !", output + + output = shell_output("#{bin}/upnpc --help 2>&1") + assert_match version.to_s, output + end +end diff --git a/Formula/m/minizinc.rb b/Formula/m/minizinc.rb new file mode 100644 index 0000000000000..2aa6f0aaec109 --- /dev/null +++ b/Formula/m/minizinc.rb @@ -0,0 +1,50 @@ +class Minizinc < Formula + desc "Medium-level constraint modeling language" + homepage "https://www.minizinc.org/" + url "https://github.com/MiniZinc/libminizinc/archive/refs/tags/2.9.4.tar.gz" + sha256 "6927a58fb1768f2f5f393cc642654a14c0e2c215dd8d6c9f226577cacc057d92" + license "MPL-2.0" + head "https://github.com/MiniZinc/libminizinc.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "d2495a3d41a8c514209e6d64922091443075dbf228a20ea0ee4a4d0fc2faa62a" + sha256 arm64_sequoia: "8ef0ae597cdefb9565ef9bb4e0b52d9a238fccd09bb3652d0e35cb9bf56cd253" + sha256 arm64_sonoma: "8a9d3758932cf80762b85f562f8e433d171718102d0f55c5cb05821e21c89af1" + sha256 sonoma: "8d3cd83922ae6f7fe0e769f8e55f23ee0467b93c69da8ad14808381c4e0e7f51" + sha256 arm64_linux: "70d1ace81bf773bc8a470c5acfa5f70b23370201d47939e4ef813de42a051c51" + sha256 x86_64_linux: "a0a1f4098b52483439c4e3e3ca0cd5b10a548f2b373684f062f7bbf48548096f" + end + + depends_on "cmake" => :build + + depends_on "cbc" + depends_on "cgl" + depends_on "clp" + depends_on "coinutils" + depends_on "gecode" + depends_on "osi" + + conflicts_with cask: "minizincide", because: "both install `minizinc` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"satisfy.mzn").write <<~EOS + array[1..2] of var bool: x; + constraint x[1] xor x[2]; + solve satisfy; + EOS + assert_match "----------", shell_output("#{bin}/minizinc --solver gecode_presolver satisfy.mzn").strip + + (testpath/"optimise.mzn").write <<~EOS + array[1..2] of var 1..3: x; + constraint x[1] < x[2]; + solve maximize sum(x); + EOS + assert_match "==========", shell_output("#{bin}/minizinc --solver cbc optimise.mzn").strip + end +end diff --git a/Formula/m/minizip-ng.rb b/Formula/m/minizip-ng.rb new file mode 100644 index 0000000000000..6b4646c1399ec --- /dev/null +++ b/Formula/m/minizip-ng.rb @@ -0,0 +1,67 @@ +class MinizipNg < Formula + desc "Zip file manipulation library with minizip 1.x compatibility layer" + homepage "https://github.com/zlib-ng/minizip-ng" + url "https://github.com/zlib-ng/minizip-ng/archive/refs/tags/4.0.10.tar.gz" + sha256 "c362e35ee973fa7be58cc5e38a4a6c23cc8f7e652555daf4f115a9eb2d3a6be7" + license "Zlib" + head "https://github.com/zlib-ng/minizip-ng.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4da97ab1810ce6fa9251410d4bb9f9ff55c69c54335ae4c0e02a19d9cc5a3b68" + sha256 cellar: :any, arm64_sequoia: "f0172b547c9dfaf812dea4d560e8fb9aa879aed5ff8bf497c2a2625929853d06" + sha256 cellar: :any, arm64_sonoma: "e8a04d677e0ca6bfe1a8573d6f5fc3e50954fe2e45dea1c59e36ae518179ec05" + sha256 cellar: :any, arm64_ventura: "bbfe1f69b6da17bb8be57d1451864d68100c799923796d8777bab9fae75c2286" + sha256 cellar: :any, sonoma: "0c2b4b52eb15c5b33773d44473121c1bac2ca53297931932bfc744fd3ecf8b3c" + sha256 cellar: :any, ventura: "69fb82c03a680bdd98be7662b3c861474e468d8a3a0abfc3eaceefba7e4d8c1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "881da858fe2c257d124471bf7cc635755dbdf53da6a7b9e75f05dbe4d2858e2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb8e136ccc36ba064833246e031359432b097a6170a5d7b53cc249ae57a64a78" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + args = %w[ + -DMZ_FETCH_LIBS=OFF + -DMZ_LIB_SUFFIX=-ng + -DMZ_LIBCOMP=OFF + -DMZ_ZLIB=ON + ] + + system "cmake", "-S", ".", "-B", "build/shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", ".", "-B", "build/static", *args, *std_cmake_args + system "cmake", "--build", "build/static" + lib.install "build/static/libminizip-ng.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include "mz_zip.h" + #include "mz.h" + #include "zip.h" + int main(void) + { + zipFile hZip = zipOpen2_64("test.zip", APPEND_STATUS_CREATE, NULL, NULL); + return hZip != NULL && mz_zip_close(NULL) == MZ_PARAM_ERROR ? 0 : 1; + } + C + + system ENV.cc, "test.c", "-I#{include}/minizip-ng", "-L#{lib}", "-lminizip-ng", "-o", "test" + system "./test" + end +end diff --git a/Formula/m/minizip.rb b/Formula/m/minizip.rb new file mode 100644 index 0000000000000..ba6fe3c28ce64 --- /dev/null +++ b/Formula/m/minizip.rb @@ -0,0 +1,115 @@ +class Minizip < Formula + desc "C library for zip/unzip via zLib" + homepage "https://www.winimage.com/zLibDll/minizip.html" + url "https://zlib.net/zlib-1.3.1.tar.gz" + sha256 "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" + license "Zlib" + + livecheck do + formula "zlib" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "071d707964738d0320bbbab807f7e47a7fe3e2ef8e4f32ef71d969f98d5cda0b" + sha256 cellar: :any, arm64_sequoia: "3641776397e76574fcfe89466a78fd4dfedf9318a3c773fbfaffb0f0ec696547" + sha256 cellar: :any, arm64_sonoma: "3bc53490be71be5fcf8c018ba2db9b061dbedf50a12c6f6fabcc9f4df003cfc5" + sha256 cellar: :any, arm64_ventura: "d60c0678b1ac599448e1dd216aa3e44a9b9f11c00bfd7271eaa5c9e4296a3ad4" + sha256 cellar: :any, arm64_monterey: "437e23f93e1777d4b4f4d849bc6026361ba46591ba8081d8ab289a3d6dba45c3" + sha256 cellar: :any, sonoma: "927f46afb50e1cef0f6c7024cea807025835379984c786d8a17ceef071a2367f" + sha256 cellar: :any, ventura: "17ea4d0486f352f08d526f54149cc61351456325a2f49cd2a5e85f43a5c8180a" + sha256 cellar: :any, monterey: "fda3b687c8bf4b06f369ec2c43e2fba4fa08d0a8d80ca46b605cf79e18ea0c50" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c65b8c1da154f8f300b063166a03dbef658a3f118536476240447c28cc81e18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "031048178895f72541584dabaa7b5606b9fbbbdeaf4dfcc7aeccfe0a05fcf4ee" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "unzip" => :test + uses_from_macos "zip" => :test + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + + cd "contrib/minizip" do + if OS.mac? + # edits to statically link to libz.a + inreplace "Makefile.am" do |s| + s.sub! "-L$(zlib_top_builddir)", "$(zlib_top_builddir)/libz.a" + s.sub! "-version-info 1:0:0 -lz", "-version-info 1:0:0" + s.sub! "libminizip.la -lz", "libminizip.la" + end + end + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + end + + def caveats + <<~EOS + Minizip headers installed in 'minizip' subdirectory, since they conflict + with the venerable 'unzip' library. + EOS + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + static const char *zipname = "test.zip"; + + int main(int argc, char **argv) + { + unzFile uzfile = unzOpen64(zipname); + if (uzfile == NULL) { + printf("Could not open %s for unzipping\\n", zipname); + return 1; + } + + do { + unz_file_info64 finfo; + char zfilename[256]; + char *string_method; + int ret = unzGetCurrentFileInfo64(uzfile, &finfo, zfilename, sizeof(zfilename), NULL, 0, NULL, 0); + if (ret != UNZ_OK) return ret; + if (finfo.compression_method == 0) string_method = "Stored"; + else if (finfo.compression_method == Z_DEFLATED) { + uint16_t level = (uint16_t)((finfo.flag & 0x6) / 2); + if (level == 0) + string_method = "Defl:N"; + else if (level == 1) + string_method = "Defl:X"; + else if ((level == 2) || (level == 3)) + string_method = "Defl:F"; + else + string_method = "Unkn. "; + } else if (finfo.compression_method == Z_BZIP2ED) string_method = "BZip2 "; + else string_method = "Unkn. "; + printf("%llu %s %llu %8.8lx %s\\n", finfo.uncompressed_size, string_method, finfo.compressed_size, finfo.crc, zfilename); + } while (unzGoToNextFile(uzfile) != UNZ_END_OF_LIST_OF_FILE); + return 0; + } + C + + system "zip", "-r", testpath/"test.zip", prefix + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lminizip", "-o", "test" + + test_results = shell_output(testpath/"test").lines.map(&:split) + + unzip_listing = shell_output("unzip -lv #{testpath}/test.zip").lines + unzip_listing = unzip_listing.slice(3..(unzip_listing.length - 3)) + unzip_indices_to_keep = [0, 1, 2, 6, 7] + unzip_results = unzip_listing.map do |item| + item.split.select.with_index { |_, idx| unzip_indices_to_keep.include?(idx) } + end + + assert_equal unzip_results, test_results + end +end diff --git a/Formula/m/mint.rb b/Formula/m/mint.rb new file mode 100644 index 0000000000000..0b6db662b2351 --- /dev/null +++ b/Formula/m/mint.rb @@ -0,0 +1,41 @@ +class Mint < Formula + desc "Dependency manager that installs and runs Swift command-line tool packages" + homepage "https://github.com/yonaskolb/Mint" + url "https://github.com/yonaskolb/Mint/archive/refs/tags/0.18.0.tar.gz" + sha256 "e99c0a351cf7452451d72180c8ccd18e1da710dc55d036502809a0db52779a99" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b8ee3e9e0b9057b49327c202d96c8b713589098579e3c3f6fad275babe47808" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "03f825e0fd5918402a464d928e1e8ae91622c95cf62098858bd2b40424716e94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89bc9449b108a6cae523b0435820043a1834654662067582543304aab7f32290" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8176c18a31425df3d05f1584756d365f4e5179decbc7d9dd4666823a1462f06c" + sha256 cellar: :any_skip_relocation, sonoma: "c46cfdc50fbaf93e0881988ba995420b04bfca1fe3fe6f401e8acf7565ff1669" + sha256 cellar: :any_skip_relocation, ventura: "6be5974302eff0e0139abf6bb9daf011cf3c39577bf521031e858d6f80c4dc15" + sha256 cellar: :any_skip_relocation, arm64_linux: "4908cc3e06dccb23970b73cacd57d7984d813448d5322cad346a5960c2ab255a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8475fe55ddddff036a03d1cb6d255167b1c3418bcab0be6fe8e0b1801bcdc5e" + end + + depends_on xcode: ["12.0", :build] + + uses_from_macos "swift" => :build + + conflicts_with "mintoolkit", because: "both install `mint` binaries" + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release" + bin.install ".build/release/#{name}" + end + + test do + # Test by showing the help scree + system bin/"mint", "help" + # Test showing list of installed tools + system bin/"mint", "list" + end +end diff --git a/Formula/m/mintoolkit.rb b/Formula/m/mintoolkit.rb new file mode 100644 index 0000000000000..9531381d2704b --- /dev/null +++ b/Formula/m/mintoolkit.rb @@ -0,0 +1,76 @@ +class Mintoolkit < Formula + desc "Minify and secure Docker images" + homepage "https://slimtoolkit.org/" + url "https://github.com/mintoolkit/mint/archive/refs/tags/1.41.7.tar.gz" + sha256 "a5375339dda7752b8c7a1d29d25cc7e7e52c60b2badb6a3f6d816f7743fde91a" + license "Apache-2.0" + head "https://github.com/mintoolkit/mint.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2269c059b101b0cc18a0308f127d4fe78c5ad00b697f3142fd6844fe23d3ee85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3191425ab42a27ac181105eb522ba926cb52c2a6a7034b9cf697e34a41506627" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33e215a31ad61ca3f81951ca6863d406fd06a376ec10fd2e81f3ae058d6449e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "485651b0b4be33e48ef7907f6239b83585e3028902c266fbab797b4c39bdd46a" + sha256 cellar: :any_skip_relocation, sonoma: "c9c396b50f98b248eb69cafd4c800f6ad8ae8b25ed136fbcbeff4ec0ec9bc93c" + sha256 cellar: :any_skip_relocation, ventura: "fa2b6fcf6dc740377b6400639d8d1fb00af713fd86f1c7b4027bbe2285f9dcbc" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc6136219b75f2793bbeeafe5192fb43dda87b68eee59e87c448a7c30fce64ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc9d72e0904771231b5c75d6444d6cbdc8d7185abeaa1cafb18257a731e98f8d" + end + + depends_on "go" => :build + + on_linux do + depends_on "btrfs-progs" => :build + end + + conflicts_with "mint", because: "both install `mint` binaries" + + skip_clean "bin/mint-sensor" + + def install + system "go", "generate", "./pkg/appbom" + ldflags = "-s -w -X github.com/mintoolkit/mint/pkg/version.appVersionTag=#{version}" + tags = %w[ + remote + containers_image_openpgp + containers_image_docker_daemon_stub + containers_image_fulcio_stub + containers_image_rekor_stub + ] + system "go", "build", + *std_go_args(output: bin/"mint", ldflags:, tags:), + "./cmd/mint" + + # mint-sensor is a Linux binary that is used within Docker + # containers rather than directly on the macOS host. + ENV["GOOS"] = "linux" + system "go", "build", + *std_go_args(output: bin/"mint-sensor", ldflags:, tags:), + "./cmd/mint-sensor" + (bin/"mint-sensor").chmod 0555 + + # Create backwards compatible symlinks similar to build script + # https://github.com/mintoolkit/mint/blob/master/scripts/src.build.sh + bin.install_symlink "mint" => "docker-slim" + bin.install_symlink "mint" => "slim" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mint --version") + system "test", "-x", bin/"mint-sensor" + + (testpath/"Dockerfile").write <<~DOCKERFILE + FROM alpine + RUN apk add --no-cache curl + DOCKERFILE + + output = shell_output("#{bin}/mint lint #{testpath}/Dockerfile") + assert_match "Missing .dockerignore", output + assert_match "Stage from latest tag", output + end +end diff --git a/Formula/m/minuit2.rb b/Formula/m/minuit2.rb new file mode 100644 index 0000000000000..95f87fc09c979 --- /dev/null +++ b/Formula/m/minuit2.rb @@ -0,0 +1,46 @@ +class Minuit2 < Formula + desc "Physics analysis tool for function minimization" + homepage "https://root.cern.ch/doc/master/Minuit2Page.html" + url "https://root.cern.ch/download/root_v6.36.04.source.tar.gz" + sha256 "cc6367d8f563c6d49ca34c09d0b53cb0f41a528db6f86af111fd76744cda4596" + license "LGPL-2.1-or-later" + head "https://github.com/root-project/root.git", branch: "master" + + livecheck do + formula "root" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "421d499866034e6d09502311618690863a72e93071ef0c09437bfb233a466db2" + sha256 cellar: :any, arm64_sequoia: "d770c3092042f7fbae2c04bc79c1493e215dbacf2a63b2267d5a0f0595145d0b" + sha256 cellar: :any, arm64_sonoma: "e5019dcab6ee5e75b3197bb8d5f63e67fd034f1b332d0ebb79615322e1fe6eee" + sha256 cellar: :any, arm64_ventura: "f41e7693535109d3bdb53d19711370305cdaa5d8c7fff559eaa166f5f148be51" + sha256 cellar: :any, sonoma: "1548fb883f376c8e22df42d74ff7ff71c20aa8bfe75c9feffb7463b853d4f23d" + sha256 cellar: :any, ventura: "07d27a364e9ee8528a930d1cabf53de6cc0df6d20a8461d8cc6d8375f7e71b4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d408452a865e3107a3ec5c5b406aae72e3da576131092a29f651cbfd7257ba30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2e63f0ba845106ef51d9bc5144604a2a0b1f4fe6b342519f9028252051e42de" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", "math/minuit2", "-B", "build/shared", *std_cmake_args, + "-Dminuit2_standalone=ON", "-DCMAKE_CXX_FLAGS='-std=c++14'", "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", "math/minuit2", "-B", "build/static", *std_cmake_args, + "-Dminuit2_standalone=ON", "-DCMAKE_CXX_FLAGS='-std=c++14'", "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build/static" + lib.install Dir["build/static/lib/libMinuit2*.a"] + + pkgshare.install "math/minuit2/test/MnTutorial" + end + + test do + cp Dir[pkgshare/"MnTutorial/{Quad1FMain.cxx,Quad1F.h}"], testpath + system ENV.cxx, "-std=c++14", "Quad1FMain.cxx", "-o", "test", "-I#{include}/Minuit2", "-L#{lib}", "-lMinuit2" + assert_match "par0: -8.26907e-11 -1 1", shell_output("./test") + end +end diff --git a/Formula/m/miruo.rb b/Formula/m/miruo.rb new file mode 100644 index 0000000000000..ff5bfd3c555da --- /dev/null +++ b/Formula/m/miruo.rb @@ -0,0 +1,46 @@ +class Miruo < Formula + desc "Pretty-print TCP session monitor/analyzer" + homepage "https://github.com/KLab/miruo/" + url "https://github.com/KLab/miruo/archive/refs/tags/0.9.6b.tar.gz" + version "0.9.6b" + sha256 "0b31a5bde5b0e92a245611a8e671cec3d330686316691daeb1de76360d2fa5f1" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d2bbd65942dc88b12e85715f157eaf8f2f76976616a11d5177bb118a02515d5f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07c790261ecabfbdd53bd0bec573d4e93148f906229f8e3e2fba8a6da213794e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55dcd6ea73bec9f341df715534d5bd504d048a8bee3f8d5627302cb734840f0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9bb44cd7fe123593bf3e89da14aa5b2987bf1b616ae671bfa5d7e1d9adb992b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3a56112e32e6ba542f3679e87d247d10850c74ad6e9d7f82504a40caa0737de1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cd45391af46ccd1a166e139e2aa6020e0e75999a094e5e4a4eabb8ca5056fc97" + sha256 cellar: :any_skip_relocation, sonoma: "b8b65b937c59f9662343515dd8fb0450ba9e9828ef00cb4829b219c8bf379be9" + sha256 cellar: :any_skip_relocation, ventura: "de0e2a37948da0d8fa4a0b34e89ee1b5511fdc85d3ec7037b66f39aba60df795" + sha256 cellar: :any_skip_relocation, monterey: "cd83d74247835df4ef5036c68c8d93539ef3b2eac56ffc839334d1f95c557e61" + sha256 cellar: :any_skip_relocation, big_sur: "61fbf984ade171a70ae80af4695a78ed35331a143cdc12ddf4440fee74889807" + sha256 cellar: :any_skip_relocation, catalina: "044456429802d6f6d8ba2a8d00547e0e0695e99edd1cceb1af29e70eb004d13f" + sha256 cellar: :any_skip_relocation, arm64_linux: "981815843bbf557cc108baa34c2dc61b101df2fc14b23451c732102468527f81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f079697d80cff4b00726c8c149727a4a19c3db789e417692f470175ad9f24f25" + end + + uses_from_macos "libpcap" + + def install + # https://github.com/KLab/miruo/pull/19 + inreplace "miruo.h", "#include", "#include\n#include" + args = [ + "--prefix=#{prefix}", + "--disable-dependency-tracking", + ] + args << "--with-libpcap=#{MacOS.sdk_path}/usr" if OS.mac? + system "./configure", *args + system "make", "install" + end + + test do + (testpath/"dummy.pcap").write "\xd4\xc3\xb2\xa1\x02\x00\x04\x00\x00\x00\x00\x00" \ + "\x00\x00\x00\x00\xff\xff\x00\x00\x01\x00\x00\x00" + system "#{sbin}/miruo", "--file=dummy.pcap" + end +end diff --git a/Formula/m/mise.rb b/Formula/m/mise.rb new file mode 100644 index 0000000000000..1eff82b896ab7 --- /dev/null +++ b/Formula/m/mise.rb @@ -0,0 +1,68 @@ +class Mise < Formula + desc "Polyglot runtime manager (asdf rust clone)" + homepage "https://mise.jdx.dev/" + url "https://github.com/jdx/mise/archive/refs/tags/v2025.11.2.tar.gz" + sha256 "3a025e84b12b7b1aa8314b64ecd0f8dc0ff63d0c43eab4fc13ed2c89bf724ccf" + license "MIT" + head "https://github.com/jdx/mise.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bcecf257ccf99bddb813d68eeed336a6e7e4fcf14e021e222389e38aaabd11b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef47ba22858e230cca774cc2f08e8cde457f7cdef1335ac2309d689cda5bf00a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c1afc0ec8057a72082d16a0be0560512d6b2aff21353501032e0364104f1224" + sha256 cellar: :any_skip_relocation, sonoma: "70a5d843b90604d4991e49ffbfab5dd4842bcd403425e5047b6e993dfc7e7217" + sha256 cellar: :any_skip_relocation, arm64_linux: "a35c25575726f21a4d1c56b8a8fa3bdb5bd9cebdd18c721c83d6ac3d67abfc29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8b1fcf79d19ec58c49e0c589bfd3be99e582f4fe90a662d3f2c7a11b2998fef" + end + + depends_on "cmake" => :build + depends_on "llvm" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "usage" + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + man1.install "man/man1/mise.1" + lib.mkpath + touch lib/".disable-self-update" + (share/"fish"/"vendor_conf.d"/"mise-activate.fish").write <<~FISH + if [ "$MISE_FISH_AUTO_ACTIVATE" != "0" ] + #{opt_bin}/mise activate fish | source + end + FISH + + # Untrusted config path problem, `generate_completions_from_executable` is not usable + bash_completion.install "completions/mise.bash" => "mise" + fish_completion.install "completions/mise.fish" + zsh_completion.install "completions/_mise" + end + + def caveats + <<~EOS + If you are using fish shell, mise will be activated for you automatically. + EOS + end + + test do + system bin/"mise", "settings", "set", "experimental", "true" + system bin/"mise", "use", "go@1.23" + assert_match "1.23", shell_output("#{bin}/mise exec -- go version") + end +end diff --git a/Formula/m/mist-cli.rb b/Formula/m/mist-cli.rb new file mode 100644 index 0000000000000..9cbb4ede8e37b --- /dev/null +++ b/Formula/m/mist-cli.rb @@ -0,0 +1,39 @@ +class MistCli < Formula + desc "Mac command-line tool that automatically downloads macOS Firmwares / Installers" + homepage "https://github.com/ninxsoft/mist-cli" + url "https://github.com/ninxsoft/mist-cli/archive/refs/tags/v2.2.tar.gz" + sha256 "556b0680ea8aec5be5b111a0858c3434765efe6efe3526432ba13d33232d7706" + license "MIT" + head "https://github.com/ninxsoft/mist-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a8e66ca77d81b43934d93bb3e970ba85c0c7020536d19aca2048e57405262c1b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "428a8c9a5fd5cc5116421c0e425bd14288398ec2a72e64d7b1bd3a741b8777e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aad7964ffb7a48c142c64e56f134635aa96a2236e7016dbe2a84a09bea870b83" + sha256 cellar: :any_skip_relocation, sonoma: "c4657c924d66b94a23d3bb38fbe10e860ea40683dabfcbda2a98177a6f8ce7fc" + end + + depends_on :macos + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + + def install + system "swift", "build", "--disable-sandbox", "--configuration", "release" + bin.install ".build/release/mist" + generate_completions_from_executable(bin/"mist", "--generate-completion-script") + end + + test do + # basic usage output + assert_match "-h, --help", shell_output("#{bin}/mist").strip + + # check we can export the output list + out = testpath/"out.json" + system bin/"mist", "list", "firmware", "--quiet", "--export=#{out}", "--output-type=json" + assert_path_exists out + + # check that it's parseable JSON in the format we expect + parsed = JSON.parse(File.read(out)) + assert_kind_of Array, parsed + end +end diff --git a/Formula/m/mit-scheme.rb b/Formula/m/mit-scheme.rb new file mode 100644 index 0000000000000..3b5a1da7dbc7f --- /dev/null +++ b/Formula/m/mit-scheme.rb @@ -0,0 +1,113 @@ +class MitScheme < Formula + desc "MIT/GNU Scheme development tools and runtime library" + homepage "https://www.gnu.org/software/mit-scheme/" + url "https://ftpmirror.gnu.org/gnu/mit-scheme/stable.pkg/12.1/mit-scheme-12.1-svm1-64le.tar.gz" + mirror "https://ftp.gnu.org/gnu/mit-scheme/stable.pkg/12.1/mit-scheme-12.1-svm1-64le.tar.gz" + sha256 "2c5b5bf1f44c7c2458da79c0943e082ae37f1752c7d9d1ce0a61f7afcbf04304" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://ftpmirror.gnu.org/gnu/mit-scheme/stable.pkg/?C=M&O=D" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + strategy :page_match + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "6091fa88278d223d1f892c9f9383dbf81833e007c34f6eed625720d9e9c7457d" + sha256 arm64_sequoia: "5b2f5cddeb07d989aeb50ed587357c3da57bc2cfbe13dd5e3cc29b754ec6dfc9" + sha256 arm64_sonoma: "da2acf2666e321393c150917e783456c04942de61a2b4db2eebfaeaac094168b" + sha256 arm64_ventura: "23923b9cbbf60f33e46325ec788edaf149b1d43b62ddd69beff33528b14453c3" + sha256 arm64_monterey: "cfdb8ea9127c65a67e727fe75c293cde238172a18de91343540ff49c949f8449" + sha256 sonoma: "a8ebb5f3d8e66fd9a2924b02bdd0e920e5484890865ea107fdbba9a737dc703c" + sha256 ventura: "03ec5e2d199d6736dc7345d4ca3c083a78c53cb024b3874edb0e45aeb7123a2a" + sha256 monterey: "72fcee689c1ca44d5834d654490f8368f099e939f4065c4f9f06d24c0022bd19" + sha256 arm64_linux: "3c78aa4816f440ce61da51a88b8bd412e9b46758b5c069484d6d125fb10c8796" + sha256 x86_64_linux: "0e910ffb8aff109164099832f8d465f54e9e0c731a0580cb0c794970e3f6ce11" + end + + uses_from_macos "m4" => :build + uses_from_macos "ncurses" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + # Liarc builds must launch within the src dir, not using the top-level + # Makefile + cd "src" + + # Take care of some hard-coded paths + %w[ + 6001/edextra.scm + 6001/floppy.scm + compiler/etc/disload.scm + edwin/techinfo.scm + edwin/unix.scm + ].each do |f| + inreplace f, "/usr/local", prefix + end + + inreplace "microcode/configure" do |s| + s.gsub! "/usr/local", prefix + + # Fixes "configure: error: No MacOSX SDK for version: 10.10" + # Reported 23rd Apr 2016: https://savannah.gnu.org/bugs/index.php?47769 + s.gsub!(/SDK=MacOSX\$\{MACOS\}$/, "SDK=MacOSX#{MacOS.sdk.version}") if OS.mac? + end + + inreplace "edwin/compile.sh" do |s| + s.gsub! "mit-scheme", bin/"mit-scheme" + end + + ENV.prepend_path "PATH", buildpath/"staging/bin" + + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", "--without-x" + system "make" + system "make", "install" + end + + test do + # https://www.cs.indiana.edu/pub/scheme-repository/code/num/primes.scm + (testpath/"primes.scm").write <<~SCHEME + ; + ; primes + ; By Ozan Yigit + ; + (define (interval-list m n) + (if (> m n) + '() + (cons m (interval-list (+ 1 m) n)))) + + (define (sieve l) + (define (remove-multiples n l) + (if (null? l) + '() + (if (= (modulo (car l) n) 0) ; division test + (remove-multiples n (cdr l)) + (cons (car l) + (remove-multiples n (cdr l)))))) + + (if (null? l) + '() + (cons (car l) + (sieve (remove-multiples (car l) (cdr l)))))) + + (define (primes<= n) + (sieve (interval-list 2 n))) + + ; (primes<= 300) + SCHEME + + output = shell_output( + "#{bin}/mit-scheme --load primes.scm --eval '(primes<= 72)' < /dev/null", + ) + assert_match( + /;Value: \(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71\)/, + output, + ) + end +end diff --git a/Formula/m/mitie.rb b/Formula/m/mitie.rb new file mode 100644 index 0000000000000..29d933efc6166 --- /dev/null +++ b/Formula/m/mitie.rb @@ -0,0 +1,55 @@ +class Mitie < Formula + desc "Library and tools for information extraction" + homepage "https://github.com/mit-nlp/MITIE/" + url "https://github.com/mit-nlp/MITIE/archive/refs/tags/v0.7.tar.gz" + sha256 "0830955e64c2a4cceab803884355f090cf8e9086e68ac5df43058f05c34697e8" + license "BSL-1.0" + revision 3 + head "https://github.com/mit-nlp/MITIE.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "7eb66753872e8c7d0335a8d02907594a117d01db7d232c73d5ebd331f9c92df2" + sha256 cellar: :any, arm64_sequoia: "7b817e7140c3a2cc2b13d2a53b4d7a759396626fe2cb6394c8605fdcf3ab3b0c" + sha256 cellar: :any, arm64_sonoma: "1ea2d1a30cb6131307d2eaf4a7f7f42a5ceb0fccbac2dc957a94813e53de0ef8" + sha256 cellar: :any, arm64_ventura: "726cd7ce7124c79eef06e62131063703acfebc44a94a60ac4fca02964f2eebb2" + sha256 cellar: :any, sonoma: "db00e58505d015d5b25ca8e1e07988dffcf570e991ab857b420e733fb2aeac7e" + sha256 cellar: :any, ventura: "52e0e6cdce288f3608a9b96f76912fcb9c196c2120f2c81f4e7fe16ff1a8098d" + sha256 cellar: :any_skip_relocation, arm64_linux: "15d673bf303a022cb9ce16b0840104f5eb6f1c4e9afb594600de42d02f0772cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae4cfbe0ce3984b155dd82c76fb0434f23ede413e5adbd7927819c2c9f22717a" + end + + depends_on "python@3.13" + + resource "models-english" do + url "https://downloads.sourceforge.net/project/mitie/binaries/MITIE-models-v0.2.tar.bz2" + sha256 "dc073eaef980e65d68d18c7193d94b9b727beb254a0c2978f39918f158d91b31" + end + + def install + (share/"MITIE-models").install resource("models-english") + + inreplace "mitielib/makefile", "libmitie.so", "libmitie.dylib" if OS.mac? + system "make", "mitielib" + system "make" + + include.install Dir["mitielib/include/*"] + lib.install "mitielib/#{shared_library("libmitie")}", "mitielib/libmitie.a" + + (prefix/Language::Python.site_packages("python3.13")).install "mitielib/mitie.py" + pkgshare.install "examples", "sample_text.txt", + "sample_text.reference-output", + "sample_text.reference-output-relations" + bin.install "ner_example", "ner_stream", "relation_extraction_example" + end + + test do + system ENV.cc, pkgshare/"examples/C/ner/ner_example.c", + "-I#{include}", "-L#{lib}", "-lmitie", "-lpthread", + "-o", testpath/"ner_example" + system "./ner_example", share/"MITIE-models/english/ner_model.dat", + pkgshare/"sample_text.txt" + end +end diff --git a/Formula/m/mjml.rb b/Formula/m/mjml.rb new file mode 100644 index 0000000000000..804ebc02c2ead --- /dev/null +++ b/Formula/m/mjml.rb @@ -0,0 +1,41 @@ +class Mjml < Formula + desc "JavaScript framework that makes responsive-email easy" + homepage "https://mjml.io" + url "https://registry.npmjs.org/mjml/-/mjml-4.16.1.tgz" + sha256 "39f6b777b88240865abc4ccbbabaeffa85b10621c348fee78b355f4a85090acb" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "73a00c6e8553f611019f0cf134a90c4a6df0c0ef192a5af599ab57598f2d612a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"input.mjml").write <<~EOS + + + + + + Hello Homebrew! + + + + + + EOS + compiled_html = shell_output("#{bin}/mjml input.mjml") + assert_match "Hello Homebrew!", compiled_html + + assert_equal <<~EOS, shell_output("#{bin}/mjml --version") + mjml-core: #{version} + mjml-cli: #{version} + EOS + end +end diff --git a/Formula/m/mjpegtools.rb b/Formula/m/mjpegtools.rb new file mode 100644 index 0000000000000..b8af31044745d --- /dev/null +++ b/Formula/m/mjpegtools.rb @@ -0,0 +1,47 @@ +class Mjpegtools < Formula + desc "Record and playback videos and perform simple edits" + homepage "https://mjpeg.sourceforge.io/" + url "https://downloads.sourceforge.net/project/mjpeg/mjpegtools/2.2.1/mjpegtools-2.2.1.tar.gz" + sha256 "b180536d7d9960b05e0023a197b00dcb100929a49aab71d19d55f4a1b210f49a" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3b9ddb01e9c28192d76d02795aeec7c686663dca28d67b7997901c12ba0a3368" + sha256 cellar: :any, arm64_sequoia: "ceffd1cacfbd70df4bc8763a63379aef688299d0d454243034964ae4d990fc87" + sha256 cellar: :any, arm64_sonoma: "819ed433976e0822f4357ab0b24f2de38f32500e169add9671ebd0fda5d1a818" + sha256 cellar: :any, arm64_ventura: "6617edf8918a64e1850a6b94627617a460dc85234bf56c2c4f0af9bd77608d3f" + sha256 cellar: :any, arm64_monterey: "c7d05e5fc6d485aa298f4aa7ce6cdfb0c28f2a7792650bba2e3fda8adc030f85" + sha256 cellar: :any, arm64_big_sur: "35bd5112b5352ad73c9636e205134628682d93f2502d33951945f676464f1e72" + sha256 cellar: :any, sonoma: "1c8e6fee330874d11f0da2845385ce577e8d1727458960d7d43074e0dc12a66c" + sha256 cellar: :any, ventura: "1e9e03514b9817e89ed635a9657bb226a3582b52765511e8a8fd36f5a7208ced" + sha256 cellar: :any, monterey: "9afd34745954ea736c8e894c42b4552aa414df0d44942a09d7c47a6113c3ed2b" + sha256 cellar: :any, big_sur: "49857ba4da574bcbdf2795f9bed39ab9b9ca4c4b3d6ff39196b707f0981e8523" + sha256 cellar: :any, catalina: "c2beea84698794fc12896fa9e7b2c1655a3f4be189b90b6963799419ee3b34bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb5ddfcb456ade203f5d6a0d7bd721dab23b7a6ddb365125b358183323b75078" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7efdf0c986f0afd7094a355256ee6743f2ce7720d23f680005e53a8ae5213244" + end + + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # Fixes: error: 'class Region2D' has no member named 'DoesContainPoint' + # https://sourceforge.net/p/mjpeg/patches/63/ + patch do + url "https://sourceforge.net/p/mjpeg/patches/63/attachment/gcc-15.patch" + sha256 "0bdaf8f7e584183d770925563ce065c8773f1ea7f5327ed2d62be19c6187cd8c" + end + + def install + system "./configure", "--enable-simd-accel", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/m/mk-configure.rb b/Formula/m/mk-configure.rb new file mode 100644 index 0000000000000..d71d2a4d372d4 --- /dev/null +++ b/Formula/m/mk-configure.rb @@ -0,0 +1,39 @@ +class MkConfigure < Formula + desc "Lightweight replacement for GNU autotools" + homepage "https://github.com/cheusov/mk-configure" + url "https://downloads.sourceforge.net/project/mk-configure/mk-configure/mk-configure-0.40.0/mk-configure-0.40.0.tar.gz" + sha256 "2a422f78752d25f37800cdfe5e96f1d081066837feefb8c8109db4e1daf51d4d" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "MIT", "MIT-CMU"] + + livecheck do + url :stable + regex(%r{url=.*?/mk-configure[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0e4ed19f77dc079bbb5a81a8d7d68c938dae9b24249eee52100c4f0878fe551b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "991206600e83a6063a6518b312d991f8bf8390defd941c41af274354e5fe24f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a6000f58e84b8f47257cbaed106b59f9a908a5cc0897a88eeaf81e779b6e176" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e4df5fafb64a8b2b6c58d5f10f97316016731381ba859ec61fe79222e3404ac" + sha256 cellar: :any_skip_relocation, sonoma: "38eff0dd90436b640ff6ddc3cc0f2f208d5a1a5f0f609c873c8a093fe90cc2be" + sha256 cellar: :any_skip_relocation, ventura: "6981ba14741216c3651d168e0f29810904547ad38df976ca0cd6305c7f3a29a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a75eda4ef70758b92fedce279ab4c2dbb0c83a2b050c45a419e9e12e005102c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "434d05bf1acf22ab6f0f9f3fda53b07228fdadac453d2c6fbf7ba38e5a32d637" + end + + depends_on "bmake" + depends_on "makedepend" + + def install + ENV["PREFIX"] = prefix + ENV["MANDIR"] = man + + system "bmake", "all" + system "bmake", "install" + doc.install "presentation/presentation.pdf" + end + + test do + system bin/"mkcmake", "-V", "MAKE_VERSION", "-f", File::NULL + end +end diff --git a/Formula/m/mk.rb b/Formula/m/mk.rb new file mode 100644 index 0000000000000..b6ebc38b77979 --- /dev/null +++ b/Formula/m/mk.rb @@ -0,0 +1,225 @@ +class Mk < Formula + include Language::Python::Virtualenv + + desc "Wrapper for auto-detecting build and test commands in a repository" + homepage "https://mk.readthedocs.io" + url "https://files.pythonhosted.org/packages/75/9e/dcc7813d9f7133f8d384eca24a4d4bb0cb056abcc53f1f170b8353084feb/mk-3.0.0.tar.gz" + sha256 "0a041a3620057165f155b8372469d8ab55ae94dd91d6e27723ab9a7de1aa2086" + license "MIT" + head "https://github.com/pycontribs/mk.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "bdda23328de46f32ae5d18b56fd2ea9129f83e7eacdadb98ae76f537112214b2" + sha256 cellar: :any, arm64_sequoia: "391e5062ba0116dcf405430903cf2e31a509d439f5904ea7ad68d6ee9d1abd84" + sha256 cellar: :any, arm64_sonoma: "246360ddc742f1e13c4907b0da9884937b92f78490fd54dceb39e3e5c654bdd0" + sha256 cellar: :any, sonoma: "43adea6b94a6058c67161e41d9840ba5cd180a45fde9c2d4cd6bbae1c5098e87" + sha256 cellar: :any_skip_relocation, arm64_linux: "84578b7c56a6944eff5a20c2a4bf67298a51299850735a67f16fdc1dcabdd46b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "234204de2c7ed2516d7120e0753b2843fcdcf0516f79b4b1c97b2dc70662baa8" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "build" do + url "https://files.pythonhosted.org/packages/25/1c/23e33405a7c9eac261dff640926b8b5adaed6a6eb3e1767d441ed611d0c0/build-1.3.0.tar.gz" + sha256 "698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "diskcache" do + url "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz" + sha256 "2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "id" do + url "https://files.pythonhosted.org/packages/22/11/102da08f88412d875fa2f1a9a469ff7ad4c874b0ca6fed0048fe385bdb3d/id-1.5.0.tar.gz" + sha256 "292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "nh3" do + url "https://files.pythonhosted.org/packages/cf/a6/c6e942fc8dcadab08645f57a6d01d63e97114a30ded5f269dc58e05d4741/nh3-0.3.1.tar.gz" + sha256 "6a854480058683d60bdc7f0456105092dae17bef1f300642856d74bd4201da93" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyproject-hooks" do + url "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz" + sha256 "1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "readme-renderer" do + url "https://files.pythonhosted.org/packages/5a/a9/104ec9234c8448c4379768221ea6df01260cd6c2ce13182d4eac531c8342/readme_renderer-44.0.tar.gz" + sha256 "8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "subprocess-tee" do + url "https://files.pythonhosted.org/packages/d7/22/991efbf35bc811dfe7edcd749253f0931d2d4838cf55176132633e1c82a7/subprocess_tee-0.4.2.tar.gz" + sha256 "91b2b4da3aae9a7088d84acaf2ea0abee3f4fd9c0d2eae69a9b9122a71476590" + end + + resource "twine" do + url "https://files.pythonhosted.org/packages/e0/a8/949edebe3a82774c1ec34f637f5dd82d1cf22c25e963b7d63771083bbee5/twine-6.2.0.tar.gz" + sha256 "e5ed0d2fd70c9959770dce51c8f39c8945c574e18173a7b81802dab51b4b75cf" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/21/ca/950278884e2ca20547ff3eb109478c6baf6b8cf219318e6bc4f666fad8e8/typer-0.19.2.tar.gz" + sha256 "9ad824308ded0ad06cc716434705f691d4ee0bfd0fb081839d2e426860e7fdca" + end + + resource "typer-config" do + url "https://files.pythonhosted.org/packages/2e/af/78f802bc49eaa5855082cca10e9c9d7d03469c957c149aa159561dc3d744/typer_config-1.4.2.tar.gz" + sha256 "69dffc0e06095b57754bfe9fb3e4caf28ab9c2c430dade6433b0ca128510f600" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + ENV["_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION"] = "1" + generate_completions_from_executable(bin/"mk", "--show-completion") + end + + test do + (testpath/"Makefile").write <<~MAKE + all: ## description + @echo hello from mk + MAKE + + system "git", "init", "--initial-branch=main" + assert_match version.to_s, shell_output("#{bin}/mk --version") + assert_match "all", shell_output("#{bin}/mk commands 2>&1") + assert_match "hello from mk", shell_output("#{bin}/mk all 2>&1") + end +end diff --git a/Formula/m/mkcert.rb b/Formula/m/mkcert.rb new file mode 100644 index 0000000000000..36486918904bc --- /dev/null +++ b/Formula/m/mkcert.rb @@ -0,0 +1,43 @@ +class Mkcert < Formula + desc "Simple tool to make locally trusted development certificates" + homepage "https://github.com/FiloSottile/mkcert" + url "https://github.com/FiloSottile/mkcert/archive/refs/tags/v1.4.4.tar.gz" + sha256 "32bd5519581bf0b03f53e5b22721692b99f39ab5b161dc27532c51eafa512ca9" + license "BSD-3-Clause" + head "https://github.com/FiloSottile/mkcert.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9863f54426db9df99173be319b283ec3a08d5dbd320987259676d2ddbb05b9f0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8988b4b5f85474931db021d3b5968576f2be4b151c00d943441196f4186324f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1801aa7c1c50a3f7a11d44cdf9e37a57da7cb7471d0fb495b7df40843b47858e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af89337b73c8d4bb20c0cdfeeaccc17b620d8badf39edfb06a8fb191ec328c36" + sha256 cellar: :any_skip_relocation, arm64_monterey: "caadb67940cb551fc16122dc0486cac6a0dc948ccbdf90a5ee75219d4a437fa0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9529f010878e1b25e9e65ba68cb541e45878e09c65ad07c9e38090b8f9ed4383" + sha256 cellar: :any_skip_relocation, sonoma: "192c46a98732881bdd19acd6da8799ad9a931dbb9b895d22408a8eb8539f822e" + sha256 cellar: :any_skip_relocation, ventura: "3bf38fc51225b8042bb2b7274dbf3c1deef6fc0a3db2886c9ab4fe6a8105b851" + sha256 cellar: :any_skip_relocation, monterey: "dedd5384a47f6e10702990d15787658cb33ae5c8f45a96869adcc4e0c730b810" + sha256 cellar: :any_skip_relocation, big_sur: "26dd205eb0e33469922e8fd3b1828e91b2dfa920c7ffc2cc6f48494fd1c23d07" + sha256 cellar: :any_skip_relocation, catalina: "19ed89b5ee9243e2d6880462ac1b0fcec4db64d4b6f2cefe423b248050b6ae15" + sha256 cellar: :any_skip_relocation, arm64_linux: "231294ec75a53e64f54d300c71d8b28a4b7c89ba468d426dc751ef242e9876d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f674faa8be61e225ae604b2ffe215927f6ecbc992aac75e769185862820d2881" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=v#{version}") + end + + test do + ENV["CAROOT"] = testpath + system bin/"mkcert", "brew.test" + assert_path_exists testpath/"brew.test.pem" + assert_path_exists testpath/"brew.test-key.pem" + output = (testpath/"brew.test.pem").read + assert_match "-----BEGIN CERTIFICATE-----", output + output = (testpath/"brew.test-key.pem").read + assert_match "-----BEGIN PRIVATE KEY-----", output + end +end diff --git a/Formula/m/mkclean.rb b/Formula/m/mkclean.rb new file mode 100644 index 0000000000000..812910e56c427 --- /dev/null +++ b/Formula/m/mkclean.rb @@ -0,0 +1,43 @@ +class Mkclean < Formula + desc "Optimizes Matroska and WebM files" + homepage "https://www.matroska.org/downloads/mkclean.html" + url "https://downloads.sourceforge.net/project/matroska/mkclean/mkclean-0.9.0.tar.bz2" + sha256 "2f5cdcab0e09b65f9fef8949a55ef00ee3dd700e4b4050e245d442347d7cc3db" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bdff12bc960c01d63267c10c8b50d82711924792a21d0e92db9a96a951801c21" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4d263e75e4ccfdc7eeb90529899374a43f38bafda669dd33c906e533f1e7738" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d518850ce61f5e54380d36c14e6192ec43b52cc83fec9802a08e557d98a02b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "33ee8ae207d85761440d0bfb65995068d7de526dda7f41c7828f4853eb499bd4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6d88364bba58d17c5a2dcee261628dcaa7f488c65e59ba2d94470bdedf7a4315" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9cbb79d68f3b6f25830b76a374782b1cee440c6112280393a718f0950a561ecc" + sha256 cellar: :any_skip_relocation, sonoma: "3115df87b40715857fe4c36e533b64064b5c6be389da5781cb056aa85452ec3c" + sha256 cellar: :any_skip_relocation, ventura: "e0d048659cefd8fbf91df37f8afe2a5ddbfa1563eadf0669edc4b8e287853b6f" + sha256 cellar: :any_skip_relocation, monterey: "6406bf244beccc28185413a3409dbc788c494017f237231320bf42efa54ce4db" + sha256 cellar: :any_skip_relocation, big_sur: "c840bc41e467e5e5da4a58843280ea53238cbc0574a1954904423fccf6a23350" + sha256 cellar: :any_skip_relocation, catalina: "233250daa7e3c2b5dea11c5afd8fd2ac6985b054dac3e71ba62f6a7e02f302a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "76406007335cf3bd4fde0daa9516bc34a2ace73fcd132ebdabb43513496b9f35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "784dfd7ae978f145af4b1a57535c915014f82f60f9a1876fd9e5edc69a947066" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/mkclean/mkclean" + end + + test do + output = shell_output("#{bin}/mkclean --version 2>&1", 255) + assert_match version.to_s, output + + output = shell_output("#{bin}/mkclean --keep-cues brew 2>&1", 254) + assert_match "Could not open file \"brew\" for reading", output + end +end diff --git a/Formula/m/mkcue.rb b/Formula/m/mkcue.rb new file mode 100644 index 0000000000000..ee5be6bee66e6 --- /dev/null +++ b/Formula/m/mkcue.rb @@ -0,0 +1,50 @@ +class Mkcue < Formula + desc "Generate a CUE sheet from a CD" + homepage "https://packages.debian.org/sid/mkcue" + url "https://deb.debian.org/debian/pool/main/m/mkcue/mkcue_1.orig.tar.gz" + sha256 "2aaf57da4d0f2e24329d5e952e90ec182d4aa82e4b2e025283e42370f9494867" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d749706af2c32c59bc8bc5faa3c64d98ea35cf5e2f758d2080201b6feda10930" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86b0008a011b784913cbf754e986e22b8164c5d75cc872c599f668c7061f4f8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e8c2ecae6dc26d0931ffb4f1c520a6c2a98aeb135000c9e3edcf67b3f91b5f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d4e1acd72551015dad41df1ad038b7507f18b857a03e6653d4c9d1ecf3122125" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a13e835f8be46aa49ced89b84f232f40dc563b9a06481efe25e1d271ea56ab41" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5ec6570740f47d54de601598229cfa9a2c320dc745fbd72173b0a906b13a65aa" + sha256 cellar: :any_skip_relocation, sonoma: "191f4ce6ac2ee39b7c4a503f3583ee94d2352a47fe8700c54701a8295e05e4d9" + sha256 cellar: :any_skip_relocation, ventura: "9520bdcf630f2fa825fb050df73a645681d768e5a0975d743def37cab2a45f49" + sha256 cellar: :any_skip_relocation, monterey: "f2a6ae19648e6204511cc973856e605773903db8ad4c652166b614b3cee0c096" + sha256 cellar: :any_skip_relocation, big_sur: "daddca8c6a5648f6ac6b20228d3817515ea17396c4adfe53740b1ed8f79312b5" + sha256 cellar: :any_skip_relocation, catalina: "04a1028cdb9608369a30f1c7f54204963bfd9ccac697d098499846df035c2886" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0bcd3ad24b610cb79b5b41498a9ec6428a42e921edc2ba21406c0804c176ff4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ffe89a918fbd678d1dd78349a5cc46d6496f2150215f698560b9e4453f13143" + end + + def install + ENV.cxx11 + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + bin.mkpath + system "make", "install" + end + + test do + touch testpath/"test" + system bin/"mkcue", "test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + + if ENV["HOMEBREW_GITHUB_ACTIONS"] + if OS.mac? + system bin/"mkcue", "test" + elsif OS.linux? + assert_match "Cannot read table of contents", shell_output("#{bin}/mkcue test 2>&1", 2) + end + end + end +end diff --git a/Formula/m/mkdocs-material.rb b/Formula/m/mkdocs-material.rb new file mode 100644 index 0000000000000..2a795f768739a --- /dev/null +++ b/Formula/m/mkdocs-material.rb @@ -0,0 +1,185 @@ +class MkdocsMaterial < Formula + include Language::Python::Virtualenv + + desc "Material Design theme for MkDocs" + homepage "https://squidfunk.github.io/mkdocs-material/" + url "https://files.pythonhosted.org/packages/57/de/cc1d5139c2782b1a49e1ed1845b3298ed6076b9ba1c740ad7c952d8ffcf9/mkdocs_material-9.6.23.tar.gz" + sha256 "62ebc9cdbe90e1ae4f4e9b16a6aa5c69b93474c7b9e79ebc0b11b87f9f055e00" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4dcc9cfa4ba2fb35e08b9f757cf9434da3c41a76e46842f703e1ce2c576e8c0d" + sha256 cellar: :any, arm64_sequoia: "6ed8b8f948d5a403aa8dcdf223e5b5f34ef8e25ca6ad32114a70749cf044a895" + sha256 cellar: :any, arm64_sonoma: "22ef7163d85958e433bd779046d06cce4d1079c6f50be6bb5b4ef5184385375e" + sha256 cellar: :any, sonoma: "ca12cec3615e899317a5d7767bdb97e41ba3d228f8a4bf9df7a26328ff8b43c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "c3346402a22343a44c5ed9cc535f80c1c70ffd182b01d3502bba7b0843bb5e53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1c9f157a0d950b54172a8e6252305a8b13363cd0770f24ad829a45f7d8e6e33" + end + + depends_on "libyaml" + depends_on "python@3.14" + + conflicts_with "mkdocs", because: "both install `mkdocs` binaries" + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "backrefs" do + url "https://files.pythonhosted.org/packages/eb/a7/312f673df6a79003279e1f55619abbe7daebbb87c17c976ddc0345c04c7b/backrefs-5.9.tar.gz" + sha256 "808548cb708d66b82ee231f962cb36faaf4f2baab032f2fbb783e9c2fdddaa59" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz" + sha256 "47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "ghp-import" do + url "https://files.pythonhosted.org/packages/d9/29/d40217cbe2f6b1359e00c6c307bb3fc876ba74068cbab3dde77f03ca0dc4/ghp-import-2.1.0.tar.gz" + sha256 "9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mergedeep" do + url "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz" + sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8" + end + + resource "mkdocs" do + url "https://files.pythonhosted.org/packages/bc/c6/bbd4f061bd16b378247f12953ffcb04786a618ce5e904b8c5a01a0309061/mkdocs-1.6.1.tar.gz" + sha256 "7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2" + end + + resource "mkdocs-get-deps" do + url "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz" + sha256 "162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c" + end + + resource "mkdocs-material-extensions" do + url "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz" + sha256 "10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paginate" do + url "https://files.pythonhosted.org/packages/ec/46/68dde5b6bc00c1296ec6466ab27dddede6aec9af1b99090e1107091b3b84/paginate-0.5.7.tar.gz" + sha256 "22bd083ab41e1a8b4f3690544afb2c60c25e5c9a63a30fa2f483f6c60c8e5945" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pymdown-extensions" do + url "https://files.pythonhosted.org/packages/55/b3/6d2b3f149bc5413b0a29761c2c5832d8ce904a1d7f621e86616d96f505cc/pymdown_extensions-10.16.1.tar.gz" + sha256 "aace82bcccba3efc03e25d584e6a22d27a8e17caa3f4dd9f207e49b787aa9a91" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "pyyaml-env-tag" do + url "https://files.pythonhosted.org/packages/eb/2e/79c822141bfd05a853236b504869ebc6b70159afc570e1d5a20641782eaa/pyyaml_env_tag-1.1.tar.gz" + sha256 "2eb38b75a2d21ee0475d6d97ec19c63287a7e140231e4214969d0eac923cd7ff" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "watchdog" do + url "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz" + sha256 "9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282" + end + + def install + virtualenv_install_with_resources + bin.install_symlink libexec/"bin/mkdocs" + end + + test do + # build a very simple site that uses the "readthedocs" theme. + (testpath/"mkdocs.yml").write <<~YAML + site_name: MkLorum + nav: + - Home: index.md + theme: material + YAML + mkdir testpath/"docs" + (testpath/"docs/index.md").write <<~MARKDOWN + # A heading + + And some deeply meaningful prose. + MARKDOWN + system bin/"mkdocs", "build", "--clean" + end +end diff --git a/Formula/m/mkdocs.rb b/Formula/m/mkdocs.rb new file mode 100644 index 0000000000000..93ff8da023a8d --- /dev/null +++ b/Formula/m/mkdocs.rb @@ -0,0 +1,123 @@ +class Mkdocs < Formula + include Language::Python::Virtualenv + + desc "Project documentation with Markdown" + homepage "https://www.mkdocs.org/" + url "https://files.pythonhosted.org/packages/bc/c6/bbd4f061bd16b378247f12953ffcb04786a618ce5e904b8c5a01a0309061/mkdocs-1.6.1.tar.gz" + sha256 "7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2" + license "BSD-2-Clause" + revision 2 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "01be89d0831a80d0923aae6b61e491c35c157d58799fc1322f08cbd49eddf4b7" + sha256 cellar: :any, arm64_sequoia: "fbbd85bbe0bc9e00b24a110d7c63694f7345b5521b4ca3f6315a88d1301ffb81" + sha256 cellar: :any, arm64_sonoma: "6f3a4f3c5d027bdd1348f2223ef378d922749e6b013740f72be731e344618a95" + sha256 cellar: :any, sonoma: "73ad3704aa4cdf2ac6773e0ec17d31866eaac7d39734b2bf37f1d78f879c8bcf" + sha256 cellar: :any_skip_relocation, arm64_linux: "72100f5ccf0b634b67e10aa25f7bd35d1d51001b78c10ccb449aaadd642e6592" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2040d82febb29aed1488dc7dc1a8c5550287e8bb51f54546e26e322b46ea656e" + end + + depends_on "libyaml" + depends_on "python@3.14" + + conflicts_with "mkdocs-material", because: "both install `mkdocs` binaries" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "ghp-import" do + url "https://files.pythonhosted.org/packages/d9/29/d40217cbe2f6b1359e00c6c307bb3fc876ba74068cbab3dde77f03ca0dc4/ghp-import-2.1.0.tar.gz" + sha256 "9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mergedeep" do + url "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz" + sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8" + end + + resource "mkdocs-get-deps" do + url "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz" + sha256 "162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "pyyaml-env-tag" do + url "https://files.pythonhosted.org/packages/eb/2e/79c822141bfd05a853236b504869ebc6b70159afc570e1d5a20641782eaa/pyyaml_env_tag-1.1.tar.gz" + sha256 "2eb38b75a2d21ee0475d6d97ec19c63287a7e140231e4214969d0eac923cd7ff" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "watchdog" do + url "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz" + sha256 "9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"mkdocs", shell_parameter_format: :click) + end + + test do + # build a very simple site that uses the "readthedocs" theme. + (testpath/"mkdocs.yml").write <<~YAML + site_name: MkLorum + nav: + - Home: index.md + theme: readthedocs + YAML + mkdir testpath/"docs" + (testpath/"docs/index.md").write <<~MARKDOWN + # A heading + + And some deeply meaningful prose. + MARKDOWN + system bin/"mkdocs", "build", "--clean" + end +end diff --git a/Formula/m/mkfontscale.rb b/Formula/m/mkfontscale.rb new file mode 100644 index 0000000000000..487a8099092a3 --- /dev/null +++ b/Formula/m/mkfontscale.rb @@ -0,0 +1,44 @@ +class Mkfontscale < Formula + desc "Create an index of scalable font files for X" + homepage "https://www.x.org/" + url "https://www.x.org/releases/individual/app/mkfontscale-1.2.3.tar.xz" + sha256 "2921cdc344f1acee04bcd6ea1e29565c1308263006e134a9ee38cf9c9d6fe75e" + license "X11" + + bottle do + sha256 cellar: :any, arm64_tahoe: "86447a62f6dfa5be3641fcc3153d8b7aa09f9660d330a06f3454d347980b4055" + sha256 cellar: :any, arm64_sequoia: "cb7cfc5fe147173c5117c3269dda15cdcacf19be6a992b9a9339ca3a91fc7495" + sha256 cellar: :any, arm64_sonoma: "6795c9f6167e00f72f72aa22ebf557a440ba85e9c4242ffba2a774dad5c8b859" + sha256 cellar: :any, arm64_ventura: "c88d40044de4b6556a64c1d679cfa377d32f0af07c7d6b344b91046910db8371" + sha256 cellar: :any, arm64_monterey: "01eacad2f18ee8f35bc292d7c6dece30a4ad5a040fdbb12fd4541f843b8c438f" + sha256 cellar: :any, sonoma: "0fde03defbc5ab14a784923257a034eeb58d55e9ddd2094ce5157f84cb255b0a" + sha256 cellar: :any, ventura: "369bd2a993bc78b059ec76adc510eb212c9b3c7f0604a99d9374403d6b930202" + sha256 cellar: :any, monterey: "bf2d558740739a6f00635279dde933488d381bea05457e8fbfa92495c7820a15" + sha256 cellar: :any_skip_relocation, arm64_linux: "98654a0fdb0becc676a739a84e9416bb3119c6e12b8479c8c28ca15778bd8d4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ea938e8ad6c373bad7f07d10cce369fa35345c4ae07629d46e8173357404708" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + + depends_on "freetype" + depends_on "libfontenc" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + configure_args = %w[ + --with-bzip2 + ] + + system "./configure", *configure_args, *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"mkfontscale" + assert_path_exists testpath/"fonts.scale" + end +end diff --git a/Formula/m/mkhexgrid.rb b/Formula/m/mkhexgrid.rb new file mode 100644 index 0000000000000..fb0a3f7e10fe7 --- /dev/null +++ b/Formula/m/mkhexgrid.rb @@ -0,0 +1,67 @@ +class Mkhexgrid < Formula + desc "Fully-configurable hex grid generator" + homepage "https://www.nomic.net/~uckelman/mkhexgrid/" + url "https://www.nomic.net/~uckelman/mkhexgrid/releases/mkhexgrid-0.1.1.src.tar.bz2" + sha256 "122609261cc91c2063ab5315d4316a27c9a0ab164f663a6cb781dd87310be3dc" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?mkhexgrid[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7e545dda93b7418fc133c0c9f5d28a9a72fa1f390601b23cd1d69cb2d67dcee2" + sha256 cellar: :any, arm64_sequoia: "66907e9872e7fa397d62e89974e7ad0abfb9a2dc527f25d32606e0d6a73e93f5" + sha256 cellar: :any, arm64_sonoma: "2714d9b761672dd9ce249a18f1b24d7d0a954574383107b7b048924d11587fd4" + sha256 cellar: :any, arm64_ventura: "f506ce3ff66554b2586a73404a1af6d811024842b254218b67f7aa421f699d9b" + sha256 cellar: :any, arm64_monterey: "5b461772bb6b74ee5cc07db25a8baf6055941f93cba08946bb7174e024298e7d" + sha256 cellar: :any, arm64_big_sur: "488eb3b7fa3023c4326755bd7bd3546b926d3e03e353063d700c3f15c41e59f1" + sha256 cellar: :any, sonoma: "3f54c9d59ded252490c2a81aae8ddb0c90539b707dd0f81a27212bc49446fdb4" + sha256 cellar: :any, ventura: "213ee8b435eacf2f9bd1c50c8ba5a389ce3792c6a11626c0dbc3f8abca859469" + sha256 cellar: :any, monterey: "54d4b953eefd88048279f0742a636d343aa81cc1b077f4cffd40c57e1b49ceb9" + sha256 cellar: :any, big_sur: "ea516f25e28f2f0dae0223de16f1d27abd08f658ee85fb8caab7c41f02f3932b" + sha256 cellar: :any, catalina: "0e358685212d241af28055f0a47392bf077575469426e5bc4e38352847451325" + sha256 cellar: :any_skip_relocation, arm64_linux: "77c7cc16e457e6287b0103e3ed7d2468aa87c6c49886ecac6b00651fad089bcb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a52fcf963685daee9a1f8ab938b009639886dfb1f2a71cdf93969ff4a5d6bfc3" + end + + depends_on "boost" => :build + depends_on "gd" + + def install + ENV.cxx11 + + inreplace "Makefile" do |s| + s.change_make_var! "DESTDIR", prefix + s.change_make_var! "CC", ENV.cc + + # don't chown/chgrp the installed files + s.gsub! "-o 0 -g 0", "" + + # Use LDLIBS instead of LDFLAGS to ensure that library flags are specified in the correct order + s.gsub! "LDFLAGS=", "LDLIBS=" + end + + # Explicitly refer to std::exception (not boost::exception) + inreplace "mkhexgrid.cpp", "catch (exception &e)", "catch (std::exception &e)" + + # cstring header is needed for memset function + inreplace "png.cpp", "#include \n", + "#include \n#include \n" + + system "make" # needs to be separate + system "make", "install" + end + + test do + # test the example from the man page (but without inches) + system bin/"mkhexgrid", "--output=ps", "--image-width=2448", + "--image-height=1584", "--hex-side=36", "--coord-bearing=0", + "--coord-dist=22", "--coord-size=8", "--grid-thickness=1", + "--coord-font=Helvetica", "--grid-grain=h", "--grid-start=o", + "--coord-tilt=-90", "--centered", "-o", "test.ps" + end +end diff --git a/Formula/m/mklittlefs.rb b/Formula/m/mklittlefs.rb new file mode 100644 index 0000000000000..ca4aa0263ca02 --- /dev/null +++ b/Formula/m/mklittlefs.rb @@ -0,0 +1,32 @@ +class Mklittlefs < Formula + desc "Creates LittleFS images for ESP8266, ESP32, Pico RP2040, and RP2350" + homepage "https://github.com/earlephilhower/mklittlefs" + url "https://github.com/earlephilhower/mklittlefs/releases/download/4.1.0/mklittlefs-source.zip" + sha256 "4fa5565e2e9185898182557e25860f0fe5536f8133ef0247574105a75b5ae4d6" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ebd5f7c2ba836785f2a85f02288e6b3cefdcac40f2e0c4086a291ec1f9b06e67" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cbb829ab8e9c3c40a518155aabc2d05808689225bb7177e31ee3ad2b80a2bc7e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2afd18134810381f7cc7071cc2d57742e3f0903ac0043bfb1d87d54fdc673567" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48862fcd19df8ee2370233baa3ea48a92c27ad25dc5a3f8fc8c0aa404b4cf81d" + sha256 cellar: :any_skip_relocation, sonoma: "8c49d44f1d0ccd0ae7597dadf8a3c40e932cc5d775135d450fdb8df8a6d173c3" + sha256 cellar: :any_skip_relocation, ventura: "69a5cc92966e36ce10c658fc2b5e1e1d7f8e99a2cb727e5b2bc7eaa9f59ef710" + sha256 cellar: :any_skip_relocation, arm64_linux: "718c5352d9f335d60515c74268ebbc2cbbb879a82e4063893418fedbf9601a42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f08d3944b06a3190264af01ab13388745ebd1783419c4637cf248d1590f886a8" + end + + def install + system "make", "BUILD_CONFIG_NAME=-#{version}" + bin.install "mklittlefs" + end + + test do + mkdir (testpath/"data") + (testpath/"data/hello.txt").write("Hello, World!") + (testpath/"data/Poetry.txt").write("Had we but world enough, and time...") + system(bin/"mklittlefs", "-s", "1048576", "-c", testpath/"data", testpath/"out.img") + system(bin/"mklittlefs", "-u", testpath/"out", testpath/"out.img") + system("diff", "-r", testpath/"data", testpath/"out") + end +end diff --git a/Formula/m/mkp224o.rb b/Formula/m/mkp224o.rb new file mode 100644 index 0000000000000..ef06383ccf30d --- /dev/null +++ b/Formula/m/mkp224o.rb @@ -0,0 +1,35 @@ +class Mkp224o < Formula + desc "Vanity address generator for tor onion v3 (ed25519) hidden services" + homepage "https://github.com/cathugger/mkp224o" + url "https://github.com/cathugger/mkp224o/releases/download/v1.7.0/mkp224o-1.7.0-src.tar.gz" + sha256 "e38465ea893c6032ddfd7c133cbbf0de2eeaf1c428ca563fac5e85aeb609c929" + license "CC0-1.0" + head "https://github.com/cathugger/mkp224o.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4963af60f493125859687fd0ccdba625997d92d403d90849813a909bd3143a62" + sha256 cellar: :any, arm64_sequoia: "49b44c366d873465aa731abd4896cbd43d0b4697084cbc2c1b00e69a92ce1d79" + sha256 cellar: :any, arm64_sonoma: "76a0f038b57586fc90bdb0688520d308e207f11902a9479a81d8149049c9f418" + sha256 cellar: :any, arm64_ventura: "9251236b842079b87786a0ff3db1b19ff11dba9b78aecf07635842f2494e0ab4" + sha256 cellar: :any, arm64_monterey: "75bccb06af583ad85950b27658b5ffef1c99018b6cf48ec4e190df0c37be4ee7" + sha256 cellar: :any, sonoma: "fa5df29c3c00e7877e777d3cabb36cd66252c2c952673b542afa3d5102621436" + sha256 cellar: :any, ventura: "96cb00d8017bbd68a6cb63b75be9f61f009af25139b9be4331fd07a59ceb8936" + sha256 cellar: :any, monterey: "45a413e61913ebe5fb046527221ae35e7de44d8607e0b4c4c112c06e75dbfd90" + sha256 cellar: :any_skip_relocation, arm64_linux: "eedd254c44252b322d95df443fd20f4d7f48d827a0f6cc6f4f1af702e1cd4a3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7614290d244905ffde9a1c969687b56c400aa3d16a272a10ed511d2cd42737af" + end + + depends_on "libsodium" + + def install + system "./configure", *std_configure_args + system "make" + bin.install "mkp224o" + end + + test do + assert_match "waiting for threads to finish...", shell_output("#{bin}/mkp224o -n 3 home 2>&1") + end +end diff --git a/Formula/m/mksh.rb b/Formula/m/mksh.rb new file mode 100644 index 0000000000000..5eb92bdcc5608 --- /dev/null +++ b/Formula/m/mksh.rb @@ -0,0 +1,42 @@ +class Mksh < Formula + desc "MirBSD Korn Shell" + homepage "https://mbsd.evolvis.org/mksh.htm" + url "https://mbsd.evolvis.org/MirOS/dist/mir/mksh/mksh-R59c.tgz" + version "59c" + sha256 "77ae1665a337f1c48c61d6b961db3e52119b38e58884d1c89684af31f87bc506" + license "MirOS" + + livecheck do + url "https://mbsd.evolvis.org/MirOS/dist/mir/mksh/" + regex(/href=.*?mksh-R?(\d+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "99d5701b22abd93460ac4d8dff1779534e5a74ccb010f96091a70bc7499ec464" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4a7e852c89de699dd93d9e89d5c6928b416f3fc5c54211dc2cb00188d228b66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be279888c13fec0c586f14251a00d0413a0bc835dadc07ca0c2f648c5d0b13a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f8fa2427f871cd4e4e7143244f5862988cb72e0a264c0b947c4f2f72d3655d8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9467abce8ddfd5d5dbdfda62ab8b36d020c92ae4c06805ecafd9973e20f4307" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4e5b153d2643f455c5be25fa8f751eed863393b454abc3df8bb9b145799152e0" + sha256 cellar: :any_skip_relocation, sonoma: "b207ba72de0409491e51887f2660ffd299f773af5111326d367380ba5a508fb4" + sha256 cellar: :any_skip_relocation, ventura: "410441bef1f6b4cbe36c35ec7fad198fcdbeae06a37e65c4a95471dcaa52bf26" + sha256 cellar: :any_skip_relocation, monterey: "df3d31ae543c8f8008eba65b86ac9090f21ca2f365df41e0c9984f93f1372df0" + sha256 cellar: :any_skip_relocation, big_sur: "879b0a3185d7cb75235a3204cba1b66e7353b77458b63deef3c7635e75f52ba4" + sha256 cellar: :any_skip_relocation, catalina: "ab6ffddb634219464c5993a9109a051fa728f217b7c89daa95d5b85748127bf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "84fbeb841b6f1cdeb5b8e68daa1b4a4fd72fb689b9a6f597bf9e886e01d3d08f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c371844df8480e29acc7a3f4096944880b9652a4490d0036f6f845b4c6c3d8be" + end + + def install + system "sh", "./Build.sh", "-r" + bin.install "mksh" + man1.install "mksh.1" + end + + test do + assert_equal "honk", + shell_output("#{bin}/mksh -c 'echo honk'").chomp + end +end diff --git a/Formula/m/mktorrent.rb b/Formula/m/mktorrent.rb new file mode 100644 index 0000000000000..a0dbf8c2bf626 --- /dev/null +++ b/Formula/m/mktorrent.rb @@ -0,0 +1,45 @@ +class Mktorrent < Formula + desc "Create BitTorrent metainfo files" + homepage "https://github.com/pobrn/mktorrent/wiki" + url "https://github.com/pobrn/mktorrent/archive/refs/tags/v1.1.tar.gz" + sha256 "d0f47500192605d01b5a2569c605e51ed319f557d24cfcbcb23a26d51d6138c9" + license "GPL-2.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "933acd62ccfd2b56d26d97b232f9dd96fb291c1efb60dd00a7f4b0e5e30fee71" + sha256 cellar: :any, arm64_sequoia: "7710b5cf4314030f0c38e8ade9ef142c269decf770b77527ae931882dcc5b921" + sha256 cellar: :any, arm64_sonoma: "2a6c0b4358e1b70f05757b6e016d039c645cfbc6e92cece0b69b1fc12dc5e97b" + sha256 cellar: :any, arm64_ventura: "5ecd805a7cab873d9a32dbecca561cb49cdc1e200dc1eb5e009e0e02a7202b78" + sha256 cellar: :any, arm64_monterey: "bea6dc20b4e3276571b8dd0e42ab6d3bf6351d8746da085e65b4c3685f1d0fee" + sha256 cellar: :any, arm64_big_sur: "09d65c9299c56ddc90c69192019452719a7492f7b3ac9cd14af32554d8c2ba35" + sha256 cellar: :any, sonoma: "b964d918040da1a86e2fa3b4557dd14ecca65eac0845d289c2722464b2eb12a3" + sha256 cellar: :any, ventura: "4fd92b8b522faa30fc1433bb6dca8550e81c7936344c09cd490a714b11654cc7" + sha256 cellar: :any, monterey: "b582261a10aebf9b44820f6e30a38bf8941833a9ffc3eba2a5869853c5514ef8" + sha256 cellar: :any, big_sur: "64810768318138d7d88d4915a619644fec95fb789d028508bde97b82e0e31ad0" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e292323aabc0ae62a74a890caab3d43e94c26692f9a6fe171329a2add01a7a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d977a90d91e84d0064b6d2134a85454c500d2093afece3e1b1e6d393c091cac" + end + + depends_on "openssl@3" + + def install + system "make", "USE_PTHREADS=1", "USE_OPENSSL=1", "USE_LONG_OPTIONS=1" + bin.install "mktorrent" + end + + test do + (testpath/"test.txt").write <<~EOS + Injustice anywhere is a threat to justice everywhere. + EOS + + system bin/"mktorrent", "-d", "-c", "Martin Luther King Jr", "test.txt" + assert_path_exists testpath/"test.txt.torrent", "Torrent was not created" + + file = File.read(testpath/"test.txt.torrent") + output = file.force_encoding("ASCII-8BIT") if file.respond_to?(:force_encoding) + assert_match "Martin Luther King Jr", output + end +end diff --git a/Formula/m/mkvalidator.rb b/Formula/m/mkvalidator.rb new file mode 100644 index 0000000000000..06899afa98dea --- /dev/null +++ b/Formula/m/mkvalidator.rb @@ -0,0 +1,51 @@ +class Mkvalidator < Formula + desc "Tool to verify Matroska and WebM files for spec conformance" + homepage "https://www.matroska.org/downloads/mkvalidator.html" + url "https://downloads.sourceforge.net/project/matroska/mkvalidator/mkvalidator-0.6.0.tar.bz2" + sha256 "f9eaa2138fade7103e6df999425291d2947c5355294239874041471e3aa243f0" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(%r{url=.*?/mkvalidator[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "482c49cc210fac2c0a124061fa36c9b9dd5217338698c14ce6cb2eb52fdbaf5a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3295228dd92c0233d71546962d8ae9ab3ea7611324e810b0446f601f8d9e9e07" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b9b3070f946ba91f4789020f92b61a92c0a07956f63e9e4fb6b5b51858172f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b92708846e9acdc1e65588e3404f835f91ef55c272d2d28e37893b519a30c156" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2d72352ffb6de0c6ce0a925ca48e8e3276a99b4c15e503360a46dfc19f4b12dc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "132951513f0022d9a2f8e0b0f81a5d76668b292873df6d6c67b81c4cd304ac31" + sha256 cellar: :any_skip_relocation, sonoma: "9f1bc038c9c6fbeff3e20e668d00f9f7786ce288939c53992ac62596a13fc7ba" + sha256 cellar: :any_skip_relocation, ventura: "121279d1be5fc110bd686a6c1648ffc7325065140086e57473d96b2a09c5b456" + sha256 cellar: :any_skip_relocation, monterey: "3ecaed3130b7884171aac431fffd4b6be19ad322cc990a4659a26407ffb799fd" + sha256 cellar: :any_skip_relocation, big_sur: "cef2881fd23f1e0b7c465080379f8564b00da6db94cf28f5da272ec19f565014" + sha256 cellar: :any_skip_relocation, catalina: "98fa360ee6e7ebc233784d62c599bc07bd92131159bdbc64d233ad99f883a99e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7460fa4aa8b4de099df311c8058767d8c538e9950045134c3267f6fc47ec3790" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83b78fb761e9d2bccbc88b9893d6760f445eef59c2d122dace22541ef1e04791" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/mkvalidator/mkvalidator" + end + + test do + resource "tests" do + url "https://github.com/dunn/garbage/raw/c0e682836e5237eef42a000e7d00dcd4b6dcebdb/test.mka" + sha256 "6d7cc62177ec3f88c908614ad54b86dde469dbd2b348761f6512d6fc655ec90c" + end + + resource("tests").stage do + system bin/"mkvalidator", "test.mka" + end + end +end diff --git a/Formula/m/mkvdts2ac3.rb b/Formula/m/mkvdts2ac3.rb new file mode 100644 index 0000000000000..b8bdb47767095 --- /dev/null +++ b/Formula/m/mkvdts2ac3.rb @@ -0,0 +1,37 @@ +class Mkvdts2ac3 < Formula + desc "Convert DTS audio to AC3 within a matroska file" + homepage "https://github.com/JakeWharton/mkvdts2ac3" + license "Apache-2.0" + revision 3 + head "https://github.com/JakeWharton/mkvdts2ac3.git", branch: "master" + + stable do + url "https://github.com/JakeWharton/mkvdts2ac3/archive/refs/tags/1.6.0.tar.gz" + sha256 "f9f070c00648c1ea062ac772b160c61d1b222ad2b7d30574145bf230e9288982" + + # patch with upstream fix for newer mkvtoolnix compatibility + # https://github.com/JakeWharton/mkvdts2ac3/commit/f5008860e7ec2cbd950a0628c979f06387bf76d0 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mkvdts2ac3/1.6.0.patch" + sha256 "208393d170387092cb953b6cd32e8c0201ba73560e25ed4930e4e2af6f72e4d9" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a5a856ffc05eeb709725402da52d138058873ba0876d66b95106ac95e47489eb" + end + + depends_on "ffmpeg" + depends_on "mkvtoolnix" + + def install + bin.install "mkvdts2ac3.sh" => "mkvdts2ac3" + end + + test do + system bin/"mkvdts2ac3", "--version" + end +end diff --git a/Formula/m/mkvtomp4.rb b/Formula/m/mkvtomp4.rb new file mode 100644 index 0000000000000..345307ef29da7 --- /dev/null +++ b/Formula/m/mkvtomp4.rb @@ -0,0 +1,30 @@ +class Mkvtomp4 < Formula + include Language::Python::Virtualenv + + desc "Convert mkv files to mp4" + homepage "https://github.com/gavinbeatty/mkvtomp4/" + url "https://files.pythonhosted.org/packages/89/27/7367092f0d5530207e049afc76b167998dca2478a5c004018cf07e8a5653/mkvtomp4-2.0.tar.gz" + sha256 "8514aa744963ea682e6a5c4b3cfab14c03346bfc78194c3cdc8b3a6317902f12" + license "MIT" + revision 3 + head "https://github.com/gavinbeatty/mkvtomp4.git", branch: "main" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "98cced752f99a3ba028fbdf8d52ef1dc156b9f06d03b5b99f1db8ac601cb7657" + end + + depends_on "ffmpeg" + depends_on "gpac" + depends_on "mkvtoolnix" + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + bin.install_symlink "mkvtomp4.py" => "mkvtomp4" + end + + test do + system bin/"mkvtomp4", "--help" + end +end diff --git a/Formula/m/mkvtoolnix.rb b/Formula/m/mkvtoolnix.rb new file mode 100644 index 0000000000000..6ca8d11436932 --- /dev/null +++ b/Formula/m/mkvtoolnix.rb @@ -0,0 +1,108 @@ +class Mkvtoolnix < Formula + desc "Matroska media files manipulation tools" + homepage "https://mkvtoolnix.download/" + license "GPL-2.0-or-later" + revision 1 + + stable do + url "https://mkvtoolnix.download/sources/mkvtoolnix-95.0.tar.xz" + mirror "https://fossies.org/linux/misc/mkvtoolnix-95.0.tar.xz" + sha256 "4e5481dee444f9995c176a42b6da2d2da1ba701cabec754b29dc79ea483a194f" + + # Backport fix for older Xcode + patch do + url "https://codeberg.org/mbunkus/mkvtoolnix/commit/a821117045d0328b1448ca225d0d5b9507aa00af.diff" + sha256 "4d537e37b1351ff23590199685dfc61c99844421629a9c572bb895edced1ac67" + end + end + + livecheck do + url "https://mkvtoolnix.download/sources/" + regex(/href=.*?mkvtoolnix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4ffa8a4e2e76010558a9fabf1308ddcd348455b31e0a6b6f25a4daf9980a65df" + sha256 cellar: :any, arm64_sequoia: "975e2de61a2c278d5578718a0b96485763027820512d73b4350bece7cd774dfa" + sha256 cellar: :any, arm64_sonoma: "763aef0db9727ee7fa50ab72d058943ceef563c3a13ff12bf7545cf128dbb004" + sha256 cellar: :any, sonoma: "75493de98df5ff91b5fb346a619e9254663669d5aafa9c21969c8755fca2462c" + sha256 arm64_linux: "efc17195660483fe323cea2e59f5a6bc0532c6e14cbaedc6b8befc8c165bfe92" + sha256 x86_64_linux: "8b8ebbf089c8f2c6e5ba892dcffc189dc7d90cf994ed0e2395ad1acb79246912" + end + + head do + url "https://codeberg.org/mbunkus/mkvtoolnix.git", branch: "main" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "docbook-xsl" => :build + depends_on "gettext" => :build + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + depends_on "utf8cpp" => :build + depends_on "boost" + depends_on "flac" + depends_on "fmt" + depends_on "gmp" + depends_on "libebml" + depends_on "libmatroska" + depends_on "libogg" + depends_on "libvorbis" + depends_on "pugixml" + depends_on "qtbase" + + uses_from_macos "libxslt" => :build + uses_from_macos "ruby" => :build + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + conflicts_with cask: "mkvtoolnix-app" + + def install + # Remove bundled libraries + rm_r(buildpath.glob("lib/*") - buildpath.glob("lib/{avilib,librmff}*")) + + # Boost Math needs at least C++14, Qt needs at least C++17 + ENV.append "CXXFLAGS", "-std=c++17" + + features = %w[flac gmp libebml libmatroska libogg libvorbis] + extra_includes = "" + extra_libs = "" + features.each do |feature| + extra_includes << "#{Formula[feature].opt_include};" + extra_libs << "#{Formula[feature].opt_lib};" + end + extra_includes << "#{Formula["utf8cpp"].opt_include}/utf8cpp;" + extra_includes.chop! + extra_libs.chop! + + system "./autogen.sh" if build.head? + system "./configure", "--with-boost=#{Formula["boost"].opt_prefix}", + "--with-docbook-xsl-root=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl", + "--with-extra-includes=#{extra_includes}", + "--with-extra-libs=#{extra_libs}", + "--disable-gui", + *std_configure_args + system "rake", "-j#{ENV.make_jobs}" + system "rake", "install" + end + + test do + mkv_path = testpath/"Great.Movie.mkv" + sub_path = testpath/"subtitles.srt" + sub_path.write <<~EOS + 1 + 00:00:10,500 --> 00:00:13,000 + Homebrew + EOS + + system bin/"mkvmerge", "-o", mkv_path, sub_path + system bin/"mkvinfo", mkv_path + system bin/"mkvextract", "tracks", mkv_path, "0:#{sub_path}" + end +end diff --git a/Formula/m/mlc.rb b/Formula/m/mlc.rb new file mode 100644 index 0000000000000..100561fe619fe --- /dev/null +++ b/Formula/m/mlc.rb @@ -0,0 +1,53 @@ +class Mlc < Formula + desc "Check for broken links in markup files" + homepage "https://github.com/becheran/mlc" + url "https://github.com/becheran/mlc/archive/refs/tags/v1.0.0.tar.gz" + sha256 "1558d504da177e263d9fe61457745e1c0cacfbd58deaf862dad668be7b204300" + license "MIT" + head "https://github.com/becheran/mlc.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "641c31dccc26badf1955c0a7e57d5d0c84d79adcae555c117850331837f294df" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea81fd5f0ffa185c59a156541d0944a122cad6b41595d38132017e285536d4c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d64d29e139f6f4a6733d2f2d10b29ed50d0c1cd662ecc68b38a95bd7014e09c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "88c26288c044ab2288bbb15c7ff1a5be83708c711830eb796379cf128d052007" + sha256 cellar: :any_skip_relocation, sonoma: "9f5d049d72d92fd2dea0444951d1677fea8340db347a543a7678bad9252a6cfc" + sha256 cellar: :any_skip_relocation, ventura: "658c60504eee6d7976de2ce9acbcc4651cd2993a016ce2f1d1891897a14b5589" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a24f57f05ef9c5369f627d9c904238971567e6d909cfb70fae488382659903b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab3b528ac2aecd470572b9de2d7f2a3e8a8fc44d2463f98a4db637c81d2c9bbe" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + # Explicitly set linker to avoid Cargo defaulting to + # incorrect or outdated linker (e.g. x86_64-apple-darwin14-clang) + ENV.append_to_rustflags "-C linker=#{ENV.cc}" + + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/mlc --version") + + (testpath/"test.md").write <<~MARKDOWN + This link is valid: [test2](test2.md) + MARKDOWN + + (testpath/"test2.md").write <<~MARKDOWN + This link is not valid: [test3](test3.md) + MARKDOWN + + assert_match(/OK\s+1\nSkipped\s+0\nWarnings\s+0\nErrors\s+0/, shell_output("#{bin}/mlc #{testpath}/test.md")) + assert_match(/OK\s+1\nSkipped\s+0\nWarnings\s+0\nErrors\s+1/, shell_output("#{bin}/mlc .", 1)) + end +end diff --git a/Formula/m/mle.rb b/Formula/m/mle.rb new file mode 100644 index 0000000000000..9b699c67560fb --- /dev/null +++ b/Formula/m/mle.rb @@ -0,0 +1,37 @@ +class Mle < Formula + desc "Flexible terminal-based text editor" + homepage "https://github.com/adsr/mle" + url "https://github.com/adsr/mle/archive/refs/tags/v1.7.2.tar.gz" + sha256 "5275fcfc58d3d4890d074077d94497db488b2648287b3e48e67b00ea517b02ba" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f6b25000e7a6c630e4d82f5dbab514057fb7c07a419faea456ac3d732d304b29" + sha256 cellar: :any, arm64_sequoia: "800c452587c4c4ba8e4d97f36ce15a896b8be362999407378bc05a7f7089252a" + sha256 cellar: :any, arm64_sonoma: "c98cff80d60ca797855ae9258e40629692dc0faadfe49b7de393bfece8cc6d44" + sha256 cellar: :any, arm64_ventura: "ddeba783462112b24a7d5fbb7c29630207fdbb51a673ce8ec92faf612c4f077d" + sha256 cellar: :any, arm64_monterey: "056a20a65b133842b690b2fdc939fe6895701c465853fdfbcc48d0a17e6002f2" + sha256 cellar: :any, arm64_big_sur: "d40a5279f04a3104a425a739b3f734fcca7abd025f2510c078684cbc910f2f86" + sha256 cellar: :any, sonoma: "ca38a92ae7ab39d9ad4491a46dade0582561c5cb0744634fd07372a545842bc5" + sha256 cellar: :any, ventura: "50f5723f83057f3e3ff647cfa5a7de27757dc30bf7f95be6cfe8b4be663648a5" + sha256 cellar: :any, monterey: "e12c72f828b8b070527cafc5a54fdd1dfc4bd9b2200f235fba457785de2b62c3" + sha256 cellar: :any, big_sur: "493774af04dcfd335301a1845db88772a9b100fa8f4478f891ca5c9ad4e09c05" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7b03071021e45985a48a467283493de9d598dc94ec0b758db4bcc7bac413b5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b163c0cdfde98734db406062d8f829d2c64d178c31ef3b7dad8ca75619e58cc5" + end + + depends_on "uthash" => :build + depends_on "lua" + depends_on "pcre2" + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + output = pipe_output("#{bin}/mle -M 'test C-e space w o r l d enter' -p test", "hello") + assert_equal "hello world\n", output + end +end diff --git a/Formula/m/mlkit.rb b/Formula/m/mlkit.rb new file mode 100644 index 0000000000000..9dd9d5a43b769 --- /dev/null +++ b/Formula/m/mlkit.rb @@ -0,0 +1,62 @@ +class Mlkit < Formula + desc "Compiler for the Standard ML programming language" + homepage "https://melsman.github.io/mlkit" + url "https://github.com/melsman/mlkit/archive/refs/tags/v4.7.14.tar.gz" + sha256 "2fdffd543c9d8337e8a20d9270f5b1738873b78b631daa46735d5fd2a6b80ece" + license "GPL-2.0-or-later" + head "https://github.com/melsman/mlkit.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 sonoma: "d4811d05a7d8f1f90c4341f352abbbff6586f2887f4c646ea205487db66458ac" + sha256 ventura: "cf4286e1c5a3f318030c427fc17c4bebf559f39ea8a22ded62f6c85bfb0dd97e" + sha256 x86_64_linux: "f27db5bb19c7b0adca6b68b048acf397bd816fae125ffd3fe311bc210cb0e18d" + end + + depends_on "autoconf" => :build + depends_on "mlton" => :build + depends_on arch: :x86_64 # https://github.com/melsman/mlkit/issues/115 + depends_on "gmp" + + on_macos do + # Can be undeprecated if upstream decides to support arm64 macOS + deprecate! date: "2025-09-28", because: "is unsupported, https://docs.brew.sh/Support-Tiers#future-macos-support" + disable! date: "2026-09-28", because: "is unsupported, https://docs.brew.sh/Support-Tiers#future-macos-support" + end + + def install + system "sh", "./autobuild" + system "./configure", "--prefix=#{prefix}" + + # The ENV.permit_arch_flags specification is needed on 64-bit + # machines because the mlkit compiler generates 32-bit machine + # code whereas the mlton compiler generates 64-bit machine + # code. Because of this difference, the ENV.m64 and ENV.m32 flags + # are not sufficient for the formula as clang is used by both + # tools in a single makefile target. For the mlton-compilation of + # sml-code, no arch flags are used for the clang assembler + # invocation. Thus, on a 32-bit machine, both the mlton-compiled + # binary (the mlkit compiler) and the 32-bit native code generated + # by the mlkit compiler will be running 32-bit code. + ENV.permit_arch_flags + system "make", "mlkit" + system "make", "mlkit_libs" + system "make", "install" + end + + test do + (testpath/"test.sml").write <<~EOS + fun f(x) = x + 2 + val a = [1,2,3,10] + val b = List.foldl (op +) 0 (List.map f a) + val res = if b = 24 then "OK" else "ERR" + val () = print ("Result: " ^ res ^ "\\n") + EOS + system bin/"mlkit", "-o", "test", "test.sml" + assert_equal "Result: OK\n", shell_output("./test") + end +end diff --git a/Formula/m/mlogger.rb b/Formula/m/mlogger.rb new file mode 100644 index 0000000000000..5d6e5573562f1 --- /dev/null +++ b/Formula/m/mlogger.rb @@ -0,0 +1,34 @@ +class Mlogger < Formula + desc "Log to syslog from the command-line" + homepage "https://github.com/nbrownus/mlogger" + url "https://github.com/nbrownus/mlogger/archive/refs/tags/v1.2.0.tar.gz" + sha256 "141bb9af13a8f0e865c8509ac810c10be4e21f14db5256ef5c7a6731b490bf32" + license "BSD-4-Clause-UC" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cc6b446dfb01998bc78128701dfbe10445b0b9433c0f089ada2a04061567e45e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b373a36ead8caee769bdfd4632f783e948aa3f93605899ba5b08812250f9c69" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a33b7e72d83775458e4cdde286cde80c32e30d03d4580f12d74f07db43ded13c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3aa5e9292806dcc8150dafdd703720141806be0b610198826e8d226baad776d8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a2446f830d72176c5dda94e2023f588fea40cb7f0d1fbcce88e07f7ba56cb414" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ae9dd6052251a2283883741ec0c1643cf70e62c2acbda9bec06971375b98eced" + sha256 cellar: :any_skip_relocation, sonoma: "42d5f8ef829d658a56aefeeb745d09a0629a2dc65fef77782230cb769a76a25f" + sha256 cellar: :any_skip_relocation, ventura: "23fb2fbde1f3dcf119ad7d994555dd2920170009a3cf768af1e98b877521f981" + sha256 cellar: :any_skip_relocation, monterey: "234b0797fe08d79cd45ee6e2587fafe3322657b70b386e3327f4dc7a103edb3f" + sha256 cellar: :any_skip_relocation, big_sur: "251a03f6e4954f46183a2eaa1ead28e993974d1ab5e6b4b6ae85d1777b15a379" + sha256 cellar: :any_skip_relocation, catalina: "553fe787f0d6a1982544a74ec268d3db6bdf800d538238cd627ba39d8bb1cc37" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a8e20b3e717630d8811f612f1808671a08b0e231048d2c014e4b3bc1e4bd424" + sha256 cellar: :any_skip_relocation, x86_64_linux: "893dd3f909fe05978eef82de9222ba24cb05e208d73d63f5ef591098df8ceb56" + end + + def install + system "make" + bin.install "mlogger" + end + + test do + system bin/"mlogger", "-i", "-d", "test" + end +end diff --git a/Formula/m/mlpack.rb b/Formula/m/mlpack.rb new file mode 100644 index 0000000000000..344084bbd7398 --- /dev/null +++ b/Formula/m/mlpack.rb @@ -0,0 +1,89 @@ +class Mlpack < Formula + desc "Scalable C++ machine learning library" + homepage "https://www.mlpack.org" + url "https://mlpack.org/files/mlpack-4.6.2.tar.gz" + sha256 "2fe772da383a935645ced07a07b51942ca178d38129df3bf685890bc3c1752cf" + license all_of: ["BSD-3-Clause", "MPL-2.0", "BSL-1.0", "MIT"] + revision 1 + head "https://github.com/mlpack/mlpack.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fafb84f8935480c1acd9292b35c7f9182630c3470b57208affd1ce91183e5c66" + sha256 cellar: :any, arm64_sequoia: "0f231088b602989d6095850417438746516ef210652387a9f0f61c3e313dbcdb" + sha256 cellar: :any, arm64_sonoma: "6e454187ba47af0f60ee2b2078019609334a7150bf1e32cf275806578e0209aa" + sha256 cellar: :any, arm64_ventura: "fbea7810d131e9dbc46934e12b099668d489245ff4ff0e713ad389fc6e0c7446" + sha256 cellar: :any, sonoma: "eec48db4276a78796a6575217149699695f1293eb72a59b102392eeb758539f9" + sha256 cellar: :any, ventura: "fb3c6e65de5aa0185b6804b63a7c402c076d14fff7fd80aa4ab3f0dcb97c6861" + sha256 cellar: :any_skip_relocation, arm64_linux: "50f3a0812976d56eace19a2c43651aaf3e13c13e65d891ea136b4c2318954c56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbb65951d9d4b3daac979132bc1401290adf03b4c001d4bd5bf0700695db6cde" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "armadillo" + depends_on "cereal" + depends_on "ensmallen" + + resource "stb_image" do + url "https://raw.githubusercontent.com/nothings/stb/013ac3beddff3dbffafd5177e7972067cd2b5083/stb_image.h" + version "2.30" + sha256 "594c2fe35d49488b4382dbfaec8f98366defca819d916ac95becf3e75f4200b3" + end + + resource "stb_image_write" do + url "https://raw.githubusercontent.com/nothings/stb/1ee679ca2ef753a528db5ba6801e1067b40481b8/stb_image_write.h" + version "1.16" + sha256 "cbd5f0ad7a9cf4468affb36354a1d2338034f2c12473cf1a8e32053cb6914a05" + end + + def install + resources.each do |r| + r.stage do + (include/"stb").install "#{r.name}.h" + end + end + + args = %W[ + -DDEBUG=OFF + -DPROFILE=OFF + -DBUILD_TESTS=OFF + -DUSE_OPENMP=OFF + -DARMADILLO_INCLUDE_DIR=#{Formula["armadillo"].opt_include} + -DENSMALLEN_INCLUDE_DIR=#{Formula["ensmallen"].opt_include} + -DARMADILLO_LIBRARY=#{Formula["armadillo"].opt_lib/shared_library("libarmadillo")} + -DSTB_IMAGE_INCLUDE_DIR=#{include}/stb + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + doc.install Dir["doc/*"] + (pkgshare/"tests").install "src/mlpack/tests/data" # Includes test data. + end + + test do + system bin/"mlpack_knn", + "-r", "#{pkgshare}/tests/data/GroupLensSmall.csv", + "-n", "neighbors.csv", + "-d", "distances.csv", + "-k", "5", "-v" + + (testpath/"test.cpp").write <<~CPP + #include + + using namespace mlpack; + + int main(int argc, char** argv) { + Log::Debug << "Compiled with debugging symbols." << std::endl; + Log::Info << "Some test informational output." << std::endl; + Log::Warn << "A false alarm!" << std::endl; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-L#{Formula["armadillo"].opt_lib}", + "-larmadillo", "-L#{lib}", "-o", "test" + system "./test", "--verbose" + end +end diff --git a/Formula/m/mlt.rb b/Formula/m/mlt.rb new file mode 100644 index 0000000000000..a6606a2fd9062 --- /dev/null +++ b/Formula/m/mlt.rb @@ -0,0 +1,114 @@ +class Mlt < Formula + desc "Author, manage, and run multitrack audio/video compositions" + homepage "https://www.mltframework.org/" + license "LGPL-2.1-only" + revision 3 + head "https://github.com/mltframework/mlt.git", branch: "master" + + stable do + url "https://github.com/mltframework/mlt/releases/download/v7.32.0/mlt-7.32.0.tar.gz" + sha256 "1ca5aadfe27995c879b9253b3a48d1dcc3b1247ea0b5620b087d58f5521be028" + + # Backport support for FFmpeg 8.0 + patch :DATA # https://github.com/mltframework/mlt/commit/604972b255c53927082de3989237f857b7827b74 + patch do + url "https://github.com/mltframework/mlt/commit/ae83ceee72a0a39c063b02310f6ce928839712a2.patch?full_index=1" + sha256 "2a3fc8552f068766f1d829aa973e1f913040a83898476c0afd73119e500f2713" + end + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "f3a15d4cbab669ba7e63aadca1acd6a93ea43d92f7001bb61f70b6592b611867" + sha256 arm64_sequoia: "a6e2b4608def05c0b65c582c3c91424db5fbcdc66cdfc234f7851aed43e2cfa5" + sha256 arm64_sonoma: "b147a6c2b447e5f492378f852825fd3ccc6daba38ff9e4ce9d45e1c7b253b8af" + sha256 sonoma: "b3978daa88aac4c0af94d25ad45df803671668c911c773388be602090ee23304" + sha256 arm64_linux: "9263ef1a153c7fe204b435507624b5f862bc4a6b9d2cac10187089374be97d2e" + sha256 x86_64_linux: "06fad8eb1fdfc8ab37ad5624a3f19499a32beccae2f156e63c862b7c61b7cde4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "ffmpeg" + depends_on "fftw" + depends_on "fontconfig" + depends_on "frei0r" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "libdv" + depends_on "libexif" + depends_on "libsamplerate" + depends_on "libvidstab" + depends_on "libvorbis" + depends_on "opencv" + depends_on "pango" + depends_on "qt5compat" + depends_on "qtbase" + depends_on "qtsvg" + depends_on "rubberband" + depends_on "sdl2" + depends_on "sox" + + uses_from_macos "libxml2" + + on_macos do + depends_on "freetype" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "alsa-lib" + depends_on "pulseaudio" + end + + def install + rpaths = [rpath, rpath(source: lib/"mlt")] + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + "-DGPL=ON", + "-DGPL3=ON", + "-DMOD_JACKRACK=OFF", + "-DMOD_OPENCV=ON", + "-DMOD_QT5=OFF", + "-DMOD_QT6=ON", + "-DMOD_SDL1=OFF", + "-DRELOCATABLE=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Workaround as current `mlt` doesn't provide an unversioned mlt++.pc file. + # Remove if mlt readds or all dependents (e.g. `synfig`) support versioned .pc + (lib/"pkgconfig").install_symlink "mlt++-#{version.major}.pc" => "mlt++.pc" + end + + test do + assert_match "help", shell_output("#{bin}/melt -help") + end +end + +__END__ +diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c +index 25f81d60e4bc8188c4a537489721ad74aba97431..6984ba286c1141de9bbc21b33e44f5d0ef7fb7dd 100644 +--- a/src/modules/avformat/producer_avformat.c ++++ b/src/modules/avformat/producer_avformat.c +@@ -2598,7 +2575,6 @@ static int producer_get_image(mlt_frame frame, + || codec_params->field_order == AV_FIELD_TB; + } + self->video_frame->top_field_first = self->top_field_first; +-#ifdef AVFILTER + if ((self->autorotate || mlt_properties_get(properties, "filtergraph")) + && !setup_filters(self) && self->vfilter_graph) { + int ret = av_buffersrc_add_frame(self->vfilter_in, self->video_frame); +@@ -2614,7 +2590,7 @@ static int producer_get_image(mlt_frame frame, + } + } + } +-#endif ++ + set_image_size(self, width, height); + if ((image_size + = allocate_buffer(frame, codec_params, buffer, *format, *width, *height))) { diff --git a/Formula/m/mlton.rb b/Formula/m/mlton.rb new file mode 100644 index 0000000000000..92af13b8266ed --- /dev/null +++ b/Formula/m/mlton.rb @@ -0,0 +1,96 @@ +class Mlton < Formula + desc "Whole-program, optimizing compiler for Standard ML" + homepage "http://mlton.org" + url "https://downloads.sourceforge.net/project/mlton/mlton/20241230/mlton-20241230.src.tgz" + version "20241230" + sha256 "cd170218f67b76c3fcb4d487ba8841518babcebb41e4702074668e61156ca6f6" + license "HPND" + version_scheme 1 + head "https://github.com/MLton/mlton.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/mlton[._-]v?(\d+(?:\.\d+)*(?:-\d+)?)[._-]src\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6f47a554a7b7d3cdf4a05db0c0c0018ddde8a352d6701834cd009a9afa4ea2d8" + sha256 cellar: :any, arm64_sequoia: "e4ab226d1c19700cfb7336f58945cffa425aa1a8e1efdbc661a34434be2ef571" + sha256 cellar: :any, arm64_sonoma: "27c4f97455e26387cee36bdba2faa5df88b69a80b385a74735b1631c6b7f1592" + sha256 cellar: :any, arm64_ventura: "bed247cd0a0a8e1d219a0aa227bc0c1521546c982d6e39252471ca9788037702" + sha256 cellar: :any, sonoma: "6d43cf4850c6254329c6a4c1ee06f6e860bf133fca2772eac31c9d8f9e1645dd" + sha256 cellar: :any, ventura: "de3736436eba0b0a13c9f5c04dc472912366b1ab4aafce7c88d0b0b7687d1fbf" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d7c7205060e030f40a39f4eb83ca2a24a177bba7fddfa929222ec287251eddd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed7629b2e4edf19250fc7c6311fbf582b2f8b63658b3e8dd37083ceb98c8a801" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gmp" + + # The corresponding upstream binary release used to bootstrap. + resource "bootstrap" do + on_macos do + # See https://projects.laas.fr/tina/howto-arm64-darwin.html and + # https://projects.laas.fr/tina/software.php + # macos-15 is arm runner + on_arm do + url "https://github.com/MLton/mlton/releases/download/on-20241230-release/mlton-20241230-1.arm64-darwin.macos-15_gmp-static.tgz" + sha256 "c6114fda99458cffe66cbcf508db65673926d0ac7ab707c3fc39a7efd563f74f" + end + # https://github.com/Homebrew/homebrew-core/pull/58438#issuecomment-665375929 + # new `mlton-20241230-1.amd64-darwin.macos-13_gmp-static.tgz` artifact + # used here for bootstrapping all homebrew versions + # macos-13 is intel runner + on_intel do + url "https://github.com/MLton/mlton/releases/download/on-20241230-release/mlton-20241230-1.amd64-darwin.macos-13_gmp-static.tgz" + sha256 "7d6d21aa3ad651ccbe3c837c5876f5af811881fbb017d673deaedfd99b713a2d" + end + end + + on_linux do + on_arm do + url "https://github.com/MLton/mlton/releases/download/on-20241230-release/mlton-20241230-1.arm64-linux.ubuntu-24.04-arm_glibc2.39.tgz" + sha256 "ae7eb9b76e7749f51284033791788b4091d3ec94bb10eddf00f076dcb588c1f7" + end + on_intel do + url "https://github.com/MLton/mlton/releases/download/on-20241230-release/mlton-20241230-1.amd64-linux.ubuntu-24.04_glibc2.39.tgz" + sha256 "95d5e78c77161aeefb2cff562fabd30ba1678338713c50147e5000f9ba481593" + end + end + end + + def install + # Install the corresponding upstream binary release to 'bootstrap'. + bootstrap = buildpath/"bootstrap" + resource("bootstrap").stage do + args = %W[ + WITH_GMP_DIR=#{Formula["gmp"].opt_prefix} + PREFIX=#{bootstrap} + MAN_PREFIX_EXTRA=/share + ] + system "make", *(args + ["install"]) + end + ENV.prepend_path "PATH", bootstrap/"bin" + + # Support parallel builds (https://github.com/MLton/mlton/issues/132) + ENV.deparallelize + args = %W[ + WITH_GMP_DIR=#{Formula["gmp"].opt_prefix} + DESTDIR= + PREFIX=#{prefix} + MAN_PREFIX_EXTRA=/share + ] + args << "OLD_MLTON_COMPILE_ARGS=-link-opt '-no-pie'" if OS.linux? + system "make", *(args + ["all"]) + system "make", *(args + ["install"]) + end + + test do + (testpath/"hello.sml").write <<~'EOS' + val () = print "Hello, Homebrew!\n" + EOS + system bin/"mlton", "hello.sml" + assert_equal "Hello, Homebrew!\n", `./hello` + end +end diff --git a/Formula/m/mlx-lm.rb b/Formula/m/mlx-lm.rb new file mode 100644 index 0000000000000..f64815cc05adb --- /dev/null +++ b/Formula/m/mlx-lm.rb @@ -0,0 +1,147 @@ +class MlxLm < Formula + include Language::Python::Virtualenv + + desc "Run LLMs with MLX" + homepage "https://github.com/ml-explore/mlx-lm" + url "https://github.com/ml-explore/mlx-lm/archive/refs/tags/v0.28.3.tar.gz" + sha256 "0308bec3bf74ae015473809fe425ee09aa9bdd6a239c718d480a7df23d249f0d" + license "MIT" + head "https://github.com/ml-explore/mlx-lm.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bbda44fcf1cb39d23a284f2f1e54a0c896e6877d0b75fb9d05cdd1b02dac3871" + sha256 cellar: :any, arm64_sequoia: "8598022707f6c51dc045a3097356363ecc6838700c3b0e178f32dc4cf18574db" + sha256 cellar: :any, arm64_sonoma: "8bed0dcf8fad74fb19e9c6d6f8dece71d3faa5f7d7c7605afb0c7b4cc996fe6b" + sha256 cellar: :any, sonoma: "36b3098736954b3de66458f006c6be8d4ead8532444d791af7702496d8ebcbc2" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on :macos + depends_on macos: :ventura + depends_on "mlx" + depends_on "numpy" + depends_on "python@3.14" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/de/e0/bab50af11c2d75c9c4a2a26a5254573c0bd97cea152254401510950486fa/fsspec-2025.9.0.tar.gz" + sha256 "19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19" + end + + resource "hf-xet" do + url "https://files.pythonhosted.org/packages/74/31/feeddfce1748c4a233ec1aa5b7396161c07ae1aa9b7bdbc9a72c3c7dd768/hf_xet-1.1.10.tar.gz" + sha256 "408aef343800a2102374a883f283ff29068055c111f003ff840733d3b715bb97" + end + + resource "huggingface-hub" do + url "https://files.pythonhosted.org/packages/10/7e/a0a97de7c73671863ca6b3f61fa12518caf35db37825e43d63a70956738c/huggingface_hub-0.35.3.tar.gz" + sha256 "350932eaa5cc6a4747efae85126ee220e4ef1b54e29d31c3b45c5612ddf0b32a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "safetensors" do + url "https://files.pythonhosted.org/packages/ac/cc/738f3011628920e027a11754d9cae9abec1aed00f7ae860abbf843755233/safetensors-0.6.2.tar.gz" + sha256 "43ff2aa0e6fa2dc3ea5524ac7ad93a9839256b8703761e76e2d0b2a3fa4f15d9" + end + + resource "tokenizers" do + url "https://files.pythonhosted.org/packages/1c/46/fb6854cec3278fbfa4a75b50232c77622bc517ac886156e6afbfa4d8fc6e/tokenizers-0.22.1.tar.gz" + sha256 "61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "transformers" do + url "https://files.pythonhosted.org/packages/d6/68/a39307bcc4116a30b2106f2e689130a48de8bd8a1e635b5e1030e46fcd9e/transformers-4.57.1.tar.gz" + sha256 "f06c837959196c75039809636cd964b959f6604b75b8eeec6fdfc0440b89cc55" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + service do + run opt_bin/"mlx_lm.server" + keep_alive true + working_dir var + log_path var/"log/mlx-lm.log" + error_log_path var/"log/mlx-lm.log" + end + + test do + port = free_port + pid = fork { exec bin/"mlx_lm.server", "--port=#{port}" } + sleep 10 + sleep 10 if OS.mac? && Hardware::CPU.intel? + begin + output = JSON.parse shell_output("curl -s localhost:#{port}/health") + assert_equal "ok", output["status"] + ensure + Process.kill "SIGTERM", pid + end + end +end diff --git a/Formula/m/mlx.rb b/Formula/m/mlx.rb new file mode 100644 index 0000000000000..d2c1fbab61468 --- /dev/null +++ b/Formula/m/mlx.rb @@ -0,0 +1,120 @@ +class Mlx < Formula + include Language::Python::Virtualenv + + desc "Array framework for Apple silicon" + homepage "https://github.com/ml-explore/mlx" + url "https://github.com/ml-explore/mlx/archive/refs/tags/v0.29.3.tar.gz" + sha256 "54ede208b267ea8cda566a659b7095266da78ce4d6046cf17fbeb8c5fbc9b2ee" + license all_of: [ + "MIT", # main license + "Apache-2.0", # metal-cpp resource + ] + head "https://github.com/ml-explore/mlx.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "307b6050e32cd4a06e69a1c2fdc7002b45027de60fca2c2baadeb86f2319b230" + sha256 cellar: :any, arm64_sequoia: "6d3c496087147a9d5b584ee0b2d07fc8713c482a8daeef6a98b69d82ffaa1bea" + sha256 cellar: :any, arm64_sonoma: "f07446ac7dc92098fe2b9f577118bb44f653f893f2821e1ea92c5cfe2ffe8bee" + sha256 cellar: :any, sonoma: "b5ae824f6ee2d797f9c95778fd57c6e22295b3fa5c2421a2bb5f5c33c15785c5" + end + + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "nanobind" => :build + depends_on "nlohmann-json" => :build + depends_on "python-setuptools" => :build + depends_on "robin-map" => :build + depends_on :macos + depends_on macos: :ventura + depends_on "python@3.14" + + on_arm do + depends_on xcode: ["15.0", :build] # for metal + end + + on_intel do + depends_on "openblas" + end + + # https://github.com/ml-explore/mlx/blob/v#{version}/CMakeLists.txt + # Included in not_a_binary_url_prefix_allowlist.json + resource "metal-cpp" do + on_arm do + url "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS15_iOS18.zip" + sha256 "0433df1e0ab13c2b0becbd78665071e3fa28381e9714a3fce28a497892b8a184" + end + end + + # Update to GIT_TAG at https://github.com/ml-explore/mlx/blob/v#{version}/mlx/io/CMakeLists.txt + resource "gguflib" do + url "https://github.com/antirez/gguf-tools/archive/8fa6eb65236618e28fd7710a0fba565f7faa1848.tar.gz" + sha256 "9e30bc1eb82cc2231150d39ce37dcdd6f844d6994fba18da83fc537a487ba86f" + end + + def python3 + "python3.14" + end + + def install + ENV.append_to_cflags "-I#{Formula["nlohmann-json"].opt_include}/nlohmann" + (buildpath/"gguflib").install resource("gguflib") + + mlx_python_dir = prefix/Language::Python.site_packages(python3)/"mlx" + + # We bypass brew's dependency provider to set `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` + # which redirects FetchContent_Declare() to find_package() and helps find our `fmt`. + # To re-block fetches, we use the not-recommended `FETCHCONTENT_FULLY_DISCONNECTED`. + args = %W[ + -DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,#{rpath(source: mlx_python_dir)} + -DHOMEBREW_ALLOW_FETCHCONTENT=ON + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS + -DFETCHCONTENT_SOURCE_DIR_GGUFLIB=#{buildpath}/gguflib + ] + args << if Hardware::CPU.arm? + (buildpath/"metal_cpp").install resource("metal-cpp") + "-DFETCHCONTENT_SOURCE_DIR_METAL_CPP=#{buildpath}/metal_cpp" + else + "-DMLX_ENABLE_X64_MAC=ON" + end + + ENV["CMAKE_ARGS"] = (args + std_cmake_args).join(" ") + ENV[build.head? ? "DEV_RELEASE" : "PYPI_RELEASE"] = "1" + ENV["MACOSX_DEPLOYMENT_TARGET"] = "#{MacOS.version.major}.#{MacOS.version.minor.to_i}" + + system python3, "-m", "pip", "install", *std_pip_args, "." + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + #include + + int main() { + mlx::core::array x({1.0f, 2.0f, 3.0f, 4.0f}, {2, 2}); + mlx::core::array y = mlx::core::ones({2, 2}); + mlx::core::array z = mlx::core::add(x, y); + mlx::core::eval(z); + assert(z.dtype() == mlx::core::float32); + assert(z.shape(0) == 2); + assert(z.shape(1) == 2); + assert(z.data()[0] == 2.0f); + assert(z.data()[1] == 3.0f); + assert(z.data()[2] == 4.0f); + assert(z.data()[3] == 5.0f); + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", + "-I#{include}", "-L#{lib}", "-lmlx", + "-o", "test" + system "./test" + + (testpath/"test.py").write <<~PYTHON + import mlx.core as mx + x = mx.array(0.0) + assert mx.allclose(mx.cos(x), mx.array(1.0)) + PYTHON + system python3, "test.py" + end +end diff --git a/Formula/m/mm-common.rb b/Formula/m/mm-common.rb new file mode 100644 index 0000000000000..20830c498f1d9 --- /dev/null +++ b/Formula/m/mm-common.rb @@ -0,0 +1,35 @@ +class MmCommon < Formula + desc "Build utilities for C++ interfaces of GTK+ and GNOME packages" + homepage "https://www.gtkmm.org/" + url "https://download.gnome.org/sources/mm-common/1.0/mm-common-1.0.7.tar.xz" + sha256 "494abfce781418259b1e9d8888c73af4de4b6f3be36cc75d9baa8baa0f2a7a39" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "6555a3ef530a9a88869752d8ed91867b30242d26d66b397906e46cda0e1eb8ef" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.14" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + mkdir testpath/"test" + touch testpath/"test/a" + + system bin/"mm-common-prepare", "-c", testpath/"test/a" + assert_path_exists testpath/"test/compile-binding.am" + assert_path_exists testpath/"test/dist-changelog.am" + assert_path_exists testpath/"test/doc-reference.am" + assert_path_exists testpath/"test/generate-binding.am" + end +end diff --git a/Formula/m/mmark.rb b/Formula/m/mmark.rb new file mode 100644 index 0000000000000..8c418b79c92ff --- /dev/null +++ b/Formula/m/mmark.rb @@ -0,0 +1,37 @@ +class Mmark < Formula + desc "Powerful markdown processor in Go geared towards the IETF" + homepage "https://mmark.miek.nl/" + url "https://github.com/mmarkdown/mmark/archive/refs/tags/v2.2.47.tar.gz" + sha256 "131d618c98050fc2991147a0c4d653b33d88e26a0ef888701c1432fd3c7fd1b8" + license "BSD-2-Clause" + head "https://github.com/mmarkdown/mmark.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8ff8877d9dd40b4ed6501373636d635595b1f5007ad7070c8329b0b5eb064184" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c947b781f68435614d54d3d32ffeafb54652799a7dfe229aeceeac09a15c9de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c947b781f68435614d54d3d32ffeafb54652799a7dfe229aeceeac09a15c9de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c947b781f68435614d54d3d32ffeafb54652799a7dfe229aeceeac09a15c9de" + sha256 cellar: :any_skip_relocation, sonoma: "9b039d7b657a3e6bcb00d81465cdcbde5e7471ec7950456a36ae82165f04298a" + sha256 cellar: :any_skip_relocation, ventura: "9b039d7b657a3e6bcb00d81465cdcbde5e7471ec7950456a36ae82165f04298a" + sha256 cellar: :any_skip_relocation, arm64_linux: "0615d43d7a64562f8a668ba7c9c5b1299ab88876752a180a27be6626e7b22519" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06cd28834b3543f829eaa8952a1930debba626ee0664757a8ca2fd53d08975a3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + man1.install "mmark.1" + end + + test do + resource "homebrew-test" do + url "https://raw.githubusercontent.com/mmarkdown/mmark/v2.2.19/rfc/2100.md" + sha256 "0e12576b4506addc5aa9589b459bcc02ed92b936ff58f87129385d661b400c41" + end + + resource("homebrew-test").stage do + assert_match "The Naming of Hosts", shell_output("#{bin}/mmark -ast 2100.md") + end + end +end diff --git a/Formula/m/mmctl.rb b/Formula/m/mmctl.rb new file mode 100644 index 0000000000000..9a4a1274cd262 --- /dev/null +++ b/Formula/m/mmctl.rb @@ -0,0 +1,44 @@ +class Mmctl < Formula + desc "Remote CLI tool for Mattermost server" + homepage "https://github.com/mattermost/mattermost" + url "https://github.com/mattermost/mattermost/archive/refs/tags/v11.0.4.tar.gz" + sha256 "eb3b95fb02dbcf596fa90a4b045f10003b474d1446d8048b49ee1af61ae3c522" + license all_of: ["AGPL-3.0-only", "Apache-2.0"] + head "https://github.com/mattermost/mattermost.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "271dfda338071dd6a293f2f0007c99f7b4effd3e0b8560ffaf3411136aa66c73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "271dfda338071dd6a293f2f0007c99f7b4effd3e0b8560ffaf3411136aa66c73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "271dfda338071dd6a293f2f0007c99f7b4effd3e0b8560ffaf3411136aa66c73" + sha256 cellar: :any_skip_relocation, sonoma: "724870e7a94d4884ac843783f64a4fd6bb173ea6ecf70ae7eb7a1a6f6a77a57b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c2b281e91943dc185294bc2b4f86ac49e15646f3b215c51957846dd179dd70e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "829f2600949a037d986fb45926daa8e8e995395787081a45a9bb08658424151e" + end + + depends_on "go" => :build + + def install + # remove non open source files + rm_r("server/enterprise") + rm Dir["server/cmd/mmctl/commands/compliance_export*"] + + ldflags = "-s -w -X github.com/mattermost/mattermost/server/v8/cmd/mmctl/commands.buildDate=#{time.iso8601}" + system "make", "-C", "server", "setup-go-work" + system "go", "build", "-C", "server", *std_go_args(ldflags:), "./cmd/mmctl" + + # Install shell completions + generate_completions_from_executable(bin/"mmctl", "completion", shells: [:bash, :zsh]) + end + + test do + output = pipe_output("#{bin}/mmctl help 2>&1") + refute_match(/.*No such file or directory.*/, output) + refute_match(/.*command not found.*/, output) + assert_match(/.*mmctl \[command\].*/, output) + end +end diff --git a/Formula/m/mmdbctl.rb b/Formula/m/mmdbctl.rb new file mode 100644 index 0000000000000..5ff99c9fec2ef --- /dev/null +++ b/Formula/m/mmdbctl.rb @@ -0,0 +1,41 @@ +class Mmdbctl < Formula + desc "MMDB file management CLI supporting various operations on MMDB database files" + homepage "https://github.com/ipinfo/mmdbctl" + url "https://github.com/ipinfo/mmdbctl/archive/refs/tags/mmdbctl-1.4.8.tar.gz" + sha256 "373154b545a9f940738868f7e2259c89803dc966646e7b8c599d26b703424d80" + license "Apache-2.0" + head "https://github.com/ipinfo/mmdbctl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d83aff861970e82984f2a19c2fe0b969a786f5f2133148bfb51c3d88646426a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d83aff861970e82984f2a19c2fe0b969a786f5f2133148bfb51c3d88646426a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d83aff861970e82984f2a19c2fe0b969a786f5f2133148bfb51c3d88646426a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d83aff861970e82984f2a19c2fe0b969a786f5f2133148bfb51c3d88646426a" + sha256 cellar: :any_skip_relocation, sonoma: "bce3a893ebc1b01a1dbe6bcc7f972b634f4e463d7244373ff4dfb778a1639614" + sha256 cellar: :any_skip_relocation, ventura: "bce3a893ebc1b01a1dbe6bcc7f972b634f4e463d7244373ff4dfb778a1639614" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd2829f9d0625c9515220cefee9a09f1046b91e70b61434a0f8cd85d8df18fb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fec967e1d52cb9782b28147f9c503a135d4b2ed175895ea79c139bdb59583b41" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"mmdbctl", "completion") + end + + test do + resource "test.mmdb" do + url "https://raw.githubusercontent.com/maxmind/MaxMind-DB/02de12f89048db626d04f8865c6fc76eac9a7a6b/test-data/GeoIP2-City-Test.mmdb" + sha256 "df1eb8e048d3b2561f477cd27f7d642fc25a24767395071d782ae927036818a0" + end + + testpath.install resource("test.mmdb") + + system bin/"mmdbctl", "verify", testpath/"GeoIP2-City-Test.mmdb" + + output = shell_output("#{bin}/mmdbctl metadata #{testpath}/GeoIP2-City-Test.mmdb") + assert_match "GeoIP2 City Test Database (fake GeoIP2 data, for example purposes only)", output + end +end diff --git a/Formula/m/mmdbinspect.rb b/Formula/m/mmdbinspect.rb new file mode 100644 index 0000000000000..82f1c45a160f8 --- /dev/null +++ b/Formula/m/mmdbinspect.rb @@ -0,0 +1,41 @@ +class Mmdbinspect < Formula + desc "Look up records for one or more IPs/networks in one or more .mmdb databases" + homepage "https://github.com/maxmind/mmdbinspect" + url "https://github.com/maxmind/mmdbinspect/archive/refs/tags/v0.2.0.tar.gz" + sha256 "7031c9df103b78f6cc1e441dec7bff80743bae79935bf0694a8d9c1f2d0d6cab" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/maxmind/mmdbinspect.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3efc2fae82b1892d809f6c612f631639157c0d1d6f2bbfbece9a2dd8b5e22b45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2867196560667fcee30a9b9fb30f38651ffd7e7ac1ab6f352d32d3a9521997a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd2ecd32e2d64c6d4b35cfbdf57eeb8cf2c4f79385da300fa791b9e6cac0c449" + sha256 cellar: :any_skip_relocation, arm64_ventura: "258a073b818c60576f4042913ee4053c632deae2ca47435ed930ebd5057ba945" + sha256 cellar: :any_skip_relocation, arm64_monterey: "08aa384d6799f3e05954f79ed0f1c92a0bbb96f0fc731aff03978f8a5e687d61" + sha256 cellar: :any_skip_relocation, sonoma: "138f33a523623a3dafb7a96da79b98987f58abd46ac50bb8b87469bd9d81a289" + sha256 cellar: :any_skip_relocation, ventura: "5a8fd7d5ea482aee83bd485cd07782368efaa034643b8829e8a965906a6c233f" + sha256 cellar: :any_skip_relocation, monterey: "16793974693aa4a49b65689bd728af00fd109c1b6c6476c27c9ad7d4ce591eba" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce81e65aae5802033968369b4782dda971c200e6585defc30238b3b01f1c6a9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec2a1905e63afdb38e62d24f3f4841e81ddf75f09ec102becab9415b10a81a23" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/mmdbinspect" + end + + test do + resource "homebrew-test-data" do + url "https://raw.githubusercontent.com/maxmind/MaxMind-DB/507c17e7cf266bb47bca4922aa62071cb21f6d06/test-data/GeoIP2-City-Test.mmdb" + sha256 "7959cc4c67576efc612f1cfdea5f459358b0d69e4be19f344417e7ba4b5e8114" + end + + testpath.install resource("homebrew-test-data") + + output = shell_output("#{bin}/mmdbinspect -db GeoIP2-City-Test.mmdb 175.16.199.1") + assert_match "Changchun", output + end +end diff --git a/Formula/m/mmix.rb b/Formula/m/mmix.rb new file mode 100644 index 0000000000000..f791634750d41 --- /dev/null +++ b/Formula/m/mmix.rb @@ -0,0 +1,80 @@ +class Mmix < Formula + desc "64-bit RISC architecture designed by Donald Knuth" + homepage "https://mmix.cs.hm.edu/" + url "https://mmix.cs.hm.edu/src/mmix-20160804.tgz" + sha256 "fad8e64fddf2d75cbcd5080616b47e11a2d292a428cdb0c12e579be680ecdee9" + license "MMIXware" + + livecheck do + url "https://mmix.cs.hm.edu/src/" + regex(/href=.*?mmix[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7689d31c594d9eedf364554062db949537fddfca38576923554a2fbe0a9f9728" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1c3cedb93df0fcbe150243f8251870245301689823aa1f8275c897961e199a04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45fa11184bd917b9c6fed6910afb1f5b2cf9a92d1bec2a0d821e3b3c68ccb5e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf7b89901297da556ae769c209fae21d23057d4e0277197b3e317efbcef427a7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cb698eeaba81433e47c44d2eab8858b272c3c711d6b6a745e9a43d7d0c3908c7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "03a6468d729fc0ccddb6187c50b8f0318dedbe2bf613ef2e86e95aada83daeac" + sha256 cellar: :any_skip_relocation, sonoma: "8bc17d38356b5fa43bd4029db34b82fbe6cca469a3d09831a9747b4c945b17d5" + sha256 cellar: :any_skip_relocation, ventura: "f246f0fd905410b6c8df7802eaaa0af9bcb7cde18af61a623f4f0b7a18443b8e" + sha256 cellar: :any_skip_relocation, monterey: "69c25099d92634bba78ac9ad1565f5af979bd473b14414cf4dd35dc9349c4a76" + sha256 cellar: :any_skip_relocation, big_sur: "fa0a9dd7f5ea9520ffd9c4682df2d754462a7b7e6d7b30bc8ea84f39903fa29e" + sha256 cellar: :any_skip_relocation, catalina: "ca577c8e313e25ce4b0ccdf1067a9fa1765b23a3f63b26905ad3aea044507ece" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe0fb42d869faab340474f2d311f80ef4fd40754ecbf9218ff6e76d50d790e03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1095cb1a943d20e2613c77874a67e1f41bc17eeccc3b503cfb5ce3f6215fd01f" + end + + depends_on "cweb" => :build + + # fix implicit int build error + # upstream patch ref, https://gitlab.lrz.de/mmix/mmixware/-/commit/c02e7081d033895dfaeb8154ad9bd6f5893487ea + patch :DATA + + # fix duplicate declaration of buffer + patch do + url "https://gitlab.lrz.de/mmix/mmixware/-/commit/2eddd633bc98fd320e317bbcd6c98399250e68ec.diff" + sha256 "512fc7d27b974bf5a58781464d4dba1c2147142ba749a2eb17c1a7b358ef8db9" + end + + def install + ENV.deparallelize + system "make", "all" + bin.install "mmix", "mmixal", "mmmix", "mmotype" + end + + test do + (testpath/"hello.mms").write <<~EOS + LOC Data_Segment + GREG @ + txt BYTE "Hello world!",0 + + LOC #100 + + Main LDA $255,txt + TRAP 0,Fputs,StdOut + TRAP 0,Fputs,StdErr + TRAP 0,Halt,0 + EOS + system bin/"mmixal", "hello.mms" + assert_equal "Hello world!", shell_output("#{bin}/mmix hello.mmo") + end +end + +__END__ +diff --git a/abstime.w b/abstime.w +index 50d6aa9f7585afae69ff22ee9b58a919c2c1db97..6605ba1071995e70b3e435009b52f5f3c2f7ea72 100644 +--- a/abstime.w ++++ b/abstime.w +@@ -18,7 +18,7 @@ hold more than 32 bits. + #include + #include + @# +-main() ++int main() + { + printf("#define ABSTIME %ld\n",time(NULL)); + return 0; diff --git a/Formula/m/mmseqs2.rb b/Formula/m/mmseqs2.rb new file mode 100644 index 0000000000000..c901b79580674 --- /dev/null +++ b/Formula/m/mmseqs2.rb @@ -0,0 +1,74 @@ +class Mmseqs2 < Formula + desc "Software suite for very fast sequence search and clustering" + homepage "https://mmseqs.com/" + url "https://github.com/soedinglab/MMseqs2/archive/refs/tags/18-8cc5c.tar.gz" + version "18-8cc5c" + sha256 "3541b67322aee357fd9ca529750d36cb1426aa9bcd1efb2dc916e35219e1a41c" + license "MIT" + head "https://github.com/soedinglab/MMseqs2.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7b06159dad576a5e58ea3432b635167d4944540afe004fcb3f115b18a8850e30" + sha256 cellar: :any, arm64_sequoia: "2559af59e1218ea74307ceec6566773a99644344cf79f2694feb3087b47d7c52" + sha256 cellar: :any, arm64_sonoma: "51c387d84616d349170b24f6d19a8013da1a38b26ce1470e288858ddfaaffee9" + sha256 cellar: :any, arm64_ventura: "3588b255d84d1990d827384f1d1f0580e289a07df361f2ebb3cbfc8f11ee00ae" + sha256 cellar: :any, sonoma: "34bd808b80f87b6aefb521847f10507a27367686616a4de7f121249a9f087044" + sha256 cellar: :any, ventura: "e077f4ccbbfd477edd045872df1e891a1038f7f2e2a52d3c72c390367ae8208c" + sha256 cellar: :any_skip_relocation, arm64_linux: "3be48f38aa44ce99a5a96d6b67b6c54645c9e25a091aa32b8e289bc0037c3659" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd3f8a5bfe07ba3c31860971f628f04a5bec4c49606f732641b27aabccac3f4a" + end + + depends_on "cmake" => [:build, :test] + depends_on "wget" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + on_linux do + depends_on "gawk" + end + + # `git ls-remote https://github.com/soedinglab/MMseqs2.wiki.git HEAD` + resource "documentation" do + url "https://github.com/soedinglab/MMseqs2.wiki.git", + revision: "67ba9c6637b4b5121a73e5de034dd0c3414d2b81" + end + + def install + args = %W[ + -DHAVE_TESTS=0 + -DHAVE_MPI=0 + -DVERSION_OVERRIDE=#{version} + ] + + args << if Hardware::CPU.arm? + "-DHAVE_ARM8=1" + else + "-DHAVE_SSE4_1=1" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + resource("documentation").stage { doc.install Dir["*"] } + pkgshare.install "examples" + bash_completion.install "util/bash-completion.sh" => "mmseqs.sh" + end + + test do + resource "homebrew-testdata" do + url "https://github.com/soedinglab/MMseqs2/releases/download/12-113e3/MMseqs2-Regression-Minimal.zip" + sha256 "ab0c2953d1c27736c22a57a1ccbb976c1320435fad82b5c579dbd716b7bae4ce" + end + + resource("homebrew-testdata").stage do + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + system "./run_regression.sh", "#{bin}/mmseqs", "scratch" + end + end +end diff --git a/Formula/m/mmsrip.rb b/Formula/m/mmsrip.rb new file mode 100644 index 0000000000000..4bbb908e27946 --- /dev/null +++ b/Formula/m/mmsrip.rb @@ -0,0 +1,42 @@ +class Mmsrip < Formula + desc "Client for the MMS:// protocol" + homepage "https://web.archive.org/web/20241016171436/https://nbenoit.tuxfamily.org/index.php?page=MMSRIP" + url "https://web.archive.org/web/20161207201859/https://nbenoit.tuxfamily.org/projects/mmsrip/mmsrip-0.7.0.tar.gz" + sha256 "5aed3cf17bfe50e2628561b46e12aec3644cfbbb242d738078e8b8fce6c23ed6" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5216ece2171a711b50b797f04f7fea905f9e0cdd580d8c3d98df8619573060b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba19c7e871dd33876bdbd931af577e633a3c2eeb1f0fb25c9d3ade606a0b8c1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55daa14e690e02d12277a19443906bfbf3fa4bd20a4415a8cc362fa954eead44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bd7b148f1a0c9017f7a141493d40fd0c4e764fe34a458f151ccb5925bcbc2a13" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c834ca9c19e7b5bc37a0895b146f99d6075760948468a2c8b1bbd4cc67191c2e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e5d47cddeabd5f3cbd7b0c2c988d10dee8726dcf557f95eb3cada3a1cdc954a7" + sha256 cellar: :any_skip_relocation, sonoma: "4665219513e38fb8be8e5f53688720cc572721bbdefc2e6be1b03830ecd8bb1b" + sha256 cellar: :any_skip_relocation, ventura: "6b305d9a6f6fc639792dfc7cfa1253c060132ad799eadd64878e87a688029b7f" + sha256 cellar: :any_skip_relocation, monterey: "7c87f0f2f82134a872ac528a24c8c66231ee101d6611e85c4cf9dc346a34fcda" + sha256 cellar: :any_skip_relocation, big_sur: "74c94f8562cc8c71a8376fc3a294a05a78c2a520ee7cb38a4996577d8417a06f" + sha256 cellar: :any_skip_relocation, catalina: "084dec614496303468f92768c1f262f3a72abf9b839791e84711ed9288efb402" + sha256 cellar: :any_skip_relocation, arm64_linux: "49d856f20c968fe3c8b2272f07903d47aec7ecb6aa4723cb51dbbae79ea0fd35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e3d2396067956a932acbac5b815338b0e46e05ffa157dc20833725f01af8630" + end + + # Deprecation reasons: + # * TuxFamily URLs are no longer available (https://forum.tuxfamily.org/topic/775/is-tuxfamily-slowly-dying/) + # * Analytics on deprecation date were "0 (30 days), 0 (90 days), 5 (365 days)" + # * Last release in 2006 + # * The MMS protocol was deprecated in 2003 + deprecate! date: "2025-03-17", because: :unmaintained + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", "--mandir=#{man}" + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mmsrip --version 2>&1") + end +end diff --git a/Formula/m/mmtabbarview.rb b/Formula/m/mmtabbarview.rb new file mode 100644 index 0000000000000..44a1ac069a6de --- /dev/null +++ b/Formula/m/mmtabbarview.rb @@ -0,0 +1,56 @@ +class Mmtabbarview < Formula + desc "Modernized and view-based rewrite of PSMTabBarControl" + homepage "https://mimo42.github.io/MMTabBarView/" + url "https://github.com/MiMo42/MMTabBarView/archive/refs/tags/v1.4.2.tar.gz" + sha256 "a5b79f1b50f6cabe97558f4c24a6317c448c534f15655309b6b29a532590e976" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a502f7deb3e18188669316c46c503980256b4286d0c52d1e211a772d45919844" + sha256 cellar: :any, arm64_sequoia: "9ae9758b04f5cbc6068b0e41266db2fbad7065d90134060c27bc73d36d780c2d" + sha256 cellar: :any, arm64_sonoma: "4b4fbe5492b90614b36b8a99101acbd15b0b9ebc4b415683c273114e47d3e1cb" + sha256 cellar: :any, arm64_ventura: "ec634de2a8f60f6d6d09c88cc8ce9293fd94ee07ba2181a7b07a3ee2f29d99ac" + sha256 cellar: :any, arm64_monterey: "8d752b1a6566f010c2a3c42c7248e56e15ea8c55b80a7cd6b7fc571b67f81912" + sha256 cellar: :any, arm64_big_sur: "10a139efa381ffffb4b38609246914c123559b80ceaf16baa96135ae4687ba5b" + sha256 cellar: :any, sonoma: "f6fcf8f6b9069275523c824545c19a90f5dc31170531ea727181476f21d62fc2" + sha256 cellar: :any, ventura: "d7029d1e75a1a3e9fe45c92c67203ac9de958bc22b52193753db670484d31540" + sha256 cellar: :any, monterey: "83aa65e0eaa1ee040131cda4ec9f9c1447ebd06124b7680c754a6c6ed8786d01" + sha256 cellar: :any, big_sur: "a16676e466f896888d2e90cc703dd95919b242bcff90ae84d4c5be05eee3b881" + sha256 cellar: :any, catalina: "3ef5d2b3664b7ba3def8ba27c4b3c2e5d94af4f5da6aee0400fd148b091e955c" + end + + depends_on xcode: :build + depends_on :macos + + def install + # Apply workaround for Sequoia based on ViennaRSS fork's fix. + # This is done via inreplace as pathname has spaces. + # Ref: https://github.com/ViennaRSS/MMTabBarView/commit/149fd82953a8078c4d60ce3fa855a853619eb3f9 + if DevelopmentTools.clang_build_version >= 1600 + inreplace "MMTabBarView/MMTabBarView/Styles/Mojave Tab Style/MMMojaveTabStyle+Assets.m", + "@import Darwin.Availability;", "" + end + + xcodebuild "-workspace", "default.xcworkspace", + "-scheme", "MMTabBarView", + "-configuration", "Release", + "SYMROOT=build", "ONLY_ACTIVE_ARCH=YES", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + frameworks.install "MMTabBarView/build/Release/MMTabBarView.framework" + end + + test do + (testpath/"test.m").write <<~OBJC + #import + int main() { + MMTabBarView *view = [[MMTabBarView alloc] init]; + [view release]; + return 0; + } + OBJC + system ENV.cc, "test.m", "-F#{frameworks}", "-framework", "MMTabBarView", "-framework", "Foundation", "-o", "test" + system "./test" + end +end diff --git a/Formula/m/mmv.rb b/Formula/m/mmv.rb new file mode 100644 index 0000000000000..3a01cfbec7c7a --- /dev/null +++ b/Formula/m/mmv.rb @@ -0,0 +1,46 @@ +class Mmv < Formula + desc "Move, copy, append, and link multiple files" + homepage "https://github.com/rrthomas/mmv" + url "https://github.com/rrthomas/mmv/releases/download/v2.10/mmv-2.10.tar.gz" + sha256 "2bbba14c099b512b4a7e9effacec53caa06998069d108a5669ff424ffc879d03" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9393ab6a8fa37ce23cc3ad7b991a01d6d3a81bb84a3cf5f4ae6e8aee4d4ee67" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b250b77db698b27f905bb70f9a51d543eebcb46473ef3e45cf1633ac5a1e218" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6dffb0decf330e154afb5051a9120c158daa722d8526c1262b5983fd80378bda" + sha256 cellar: :any_skip_relocation, arm64_ventura: "223ee17e0352fb0555d0de4f10a3f41ccc32557ea1b4391f5179772adaf86fa9" + sha256 cellar: :any_skip_relocation, sonoma: "7124ecddb8f17257dd6014e7b24b450237f01626dda1cf5e7523e67004f61418" + sha256 cellar: :any_skip_relocation, ventura: "5db972a05a287b8d0f50be04ef2ebf6dcfef37e5553b56a4d29d4b84292e8197" + sha256 cellar: :any_skip_relocation, arm64_linux: "0dcde0c3b0f9468bb0768250c4ceb47a63bc8ff2b9ffefc27a01cf01a947bbb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb72ba0164ea3fb58177cc5a9ee2470c1614913a78e86ed91fa3026e36f861c3" + end + + depends_on "help2man" => :build # for patch + depends_on "pkgconf" => :build + depends_on "bdw-gc" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"a").write "1" + (testpath/"b").write "2" + + assert_match "a -> b : old b would have to be deleted", shell_output("#{bin}/mmv -p a b 2>&1", 1) + assert_path_exists testpath/"a" + assert_match "a -> b (*) : done", shell_output("#{bin}/mmv -d -v a b") + refute_path_exists testpath/"a" + assert_equal "1", (testpath/"b").read + + assert_match "b -> c : done", shell_output("#{bin}/mmv -s -v b c") + assert_path_exists testpath/"b" + assert_predicate testpath/"c", :symlink? + assert_equal "1", (testpath/"c").read + end +end diff --git a/Formula/m/moarvm.rb b/Formula/m/moarvm.rb new file mode 100644 index 0000000000000..7a5c8c3f76fcc --- /dev/null +++ b/Formula/m/moarvm.rb @@ -0,0 +1,79 @@ +class Moarvm < Formula + desc "VM with adaptive optimization and JIT compilation, built for Rakudo" + homepage "https://moarvm.org" + url "https://github.com/MoarVM/MoarVM/releases/download/2025.10/MoarVM-2025.10.tar.gz" + sha256 "156fedfc5026174f516a076136e6065e17d0bdcf82061207ff1ca102b2cffcf5" + license "Artistic-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "4a767368c57cd665dd4d63da099f166100bf9bb21b9dc194f4522240705d0889" + sha256 arm64_sequoia: "eb6dca811108776ea5fda297cecc07712c922e2794d124f25ef923f32ee3344b" + sha256 arm64_sonoma: "19c0b927674c1baec5f7b8e2f5be62727811e49bc1d65012ed367c82a9e1a77b" + sha256 sonoma: "f3a47db03f17c0e8d8918b3085bffc0360729a5c564b7abfd365be203ca92970" + sha256 arm64_linux: "3d0a046e656f62dba56cd99c3fc2bdd41110e4b0a980321f9330c4cd4a8817e4" + sha256 x86_64_linux: "8d276211b9c3b53eeda8de2461bcd3898d4df5d7986a41e0423559b3b4053695" + end + + depends_on "pkgconf" => :build + depends_on "libtommath" + depends_on "mimalloc" + depends_on "zstd" + + uses_from_macos "perl" => :build + uses_from_macos "libffi" + + on_macos do + depends_on "libuv" + end + + conflicts_with "moor", because: "both install `moar` binaries" + conflicts_with "rakudo-star", because: "rakudo-star currently ships with moarvm included" + + resource "nqp" do + url "https://github.com/Raku/nqp/releases/download/2025.10/nqp-2025.10.tar.gz" + sha256 "11a08aba5645b0b3a2f82d7f555632836ed1df2d710e92c938b55fbc96068a71" + + livecheck do + formula "nqp" + end + end + + def install + # Remove bundled libraries + %w[dyncall libatomicops libtommath mimalloc].each { |dir| rm_r("3rdparty/#{dir}") } + + configure_args = %W[ + --c11-atomics + --has-libffi + --has-libtommath + --has-mimalloc + --optimize + --pkgconfig=#{Formula["pkgconf"].opt_bin}/pkgconf + --prefix=#{prefix} + ] + # FIXME: brew `libuv` causes runtime failures on Linux, e.g. + # "Cannot find method 'made' on object of type NQPMu" + if OS.mac? + configure_args << "--has-libuv" + rm_r("3rdparty/libuv") + end + + system "perl", "Configure.pl", *configure_args + system "make", "realclean" + system "make" + system "make", "install" + end + + test do + testpath.install resource("nqp") + out = Dir.chdir("src/vm/moar/stage0") do + shell_output("#{bin}/moar nqp.moarvm -e 'for (0,1,2,3,4,5,6,7,8,9) { print($_) }'") + end + assert_equal "0123456789", out + end +end diff --git a/Formula/m/mob.rb b/Formula/m/mob.rb new file mode 100644 index 0000000000000..a6a07635cf066 --- /dev/null +++ b/Formula/m/mob.rb @@ -0,0 +1,32 @@ +class Mob < Formula + desc "Tool for smooth Git handover in mob programming sessions" + homepage "https://mob.sh" + url "https://github.com/remotemobprogramming/mob/archive/refs/tags/v5.4.0.tar.gz" + sha256 "9082fa79688a875a386f9266e4f09efaeff5d14ad1288a710f6fb730974f3040" + license "MIT" + head "https://github.com/remotemobprogramming/mob.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d0633c2be00a269ce2e1b19523593aa4b674e06910ebebb09faff8d91d68d078" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea259acacda5e76abcb29c2291753b5567acc90d86d7e698645b48cfe5eb4a21" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea259acacda5e76abcb29c2291753b5567acc90d86d7e698645b48cfe5eb4a21" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea259acacda5e76abcb29c2291753b5567acc90d86d7e698645b48cfe5eb4a21" + sha256 cellar: :any_skip_relocation, sonoma: "edd877ddebf533a27a61a45d4ffe44b909678a3fac5d80883e6cd73c33a45284" + sha256 cellar: :any_skip_relocation, ventura: "edd877ddebf533a27a61a45d4ffe44b909678a3fac5d80883e6cd73c33a45284" + sha256 cellar: :any_skip_relocation, arm64_linux: "21c94ec97b871a9b36f9fd42db04c5d0f858cded7e23a0caa85c91a2ba334474" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a41769e9089f0fb440df59c22add6b1578b1b445c7cdae53496126d7283caa74" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/mob version") + assert_match "MOB_CLI_NAME=\"mob\"", shell_output("#{bin}/mob config") + end +end diff --git a/Formula/m/mobiledevice.rb b/Formula/m/mobiledevice.rb new file mode 100644 index 0000000000000..dc86be04fe48c --- /dev/null +++ b/Formula/m/mobiledevice.rb @@ -0,0 +1,42 @@ +class Mobiledevice < Formula + desc "CLI for Apple's Private (Closed) Mobile Device Framework" + homepage "https://github.com/imkira/mobiledevice" + url "https://github.com/imkira/mobiledevice/archive/refs/tags/v2.0.0.tar.gz" + sha256 "07b167f6103175c5eba726fd590266bf6461b18244d34ef6d05a51fc4871e424" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "391242e35998f146f7b0051104f106b49f9ba4f2ec2817b2cb086fa23aa48831" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e9e7bded8a827c41f1fc47bcb6d25ab25dff835e0d7ec486c15ff1e49043de1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c41bbb7022712c16b68af49b5b3b170592870c0cf82a6ab3ad778c6731d3adb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9840294891d057da453f01b2f91601f9a167c3954e1953f0d48f6d096de0e692" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2adc416c3d767931c3220285e2d2592f4b9fe037c35aab51a0bb18b17905cd08" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f7de95125177db2598a17b99514154a5414d74781c642397eae752645cae9c64" + sha256 cellar: :any_skip_relocation, sonoma: "60f7ec7961466d17cee5a093926a00a906f99e944bb9f6dbd0daa0e54f9b5767" + sha256 cellar: :any_skip_relocation, ventura: "9289a82ea82bad8477cd20b62298ecbe738103a7c6ff1a5ecce316c3056ae85e" + sha256 cellar: :any_skip_relocation, monterey: "259bbbe1bdff8ebb05d6e9990a4450ba5cb3684e1903070483b22a7030546646" + sha256 cellar: :any_skip_relocation, big_sur: "a9b9e20ce5c2142da8ea4a1bbc34ff433da46a1e12a522942c3b7c572be9f683" + sha256 cellar: :any_skip_relocation, catalina: "6912247da18b0d7f033d37115939a67629b93d036458f1369944a58953c12f69" + end + + depends_on :macos + + # This is a simple change that permits building on newer versions of macOS. + # Should be included in the next stable release. + patch do + url "https://github.com/imkira/mobiledevice/commit/0472188d875382c5535916bf4469a2de7696fd39.patch?full_index=1" + sha256 "76094a3e39e287c88bb60c829d2e9ab8801f8638c116d95a16333198b236147b" + end + + def install + (buildpath/"symlink_framework.sh").chmod 0555 + system "make", "install", "CC=#{ENV.cc}", "PREFIX=#{prefix}" + end + + test do + system bin/"mobiledevice", "list_devices" + end +end diff --git a/Formula/m/moc.rb b/Formula/m/moc.rb new file mode 100644 index 0000000000000..1a5a8ee1c7901 --- /dev/null +++ b/Formula/m/moc.rb @@ -0,0 +1,107 @@ +class Moc < Formula + desc "Terminal-based music player" + homepage "https://moc.daper.net/" + license "GPL-2.0-or-later" + revision 10 + + stable do + url "https://ftp.daper.net/pub/soft/moc/stable/moc-2.5.2.tar.bz2" + sha256 "f3a68115602a4788b7cfa9bbe9397a9d5e24c68cb61a57695d1c2c3ecf49db08" + + # Remove for > 2.5.2; FFmpeg 4.0 compatibility + # 01 to 05 below are backported from patches provided 26 Apr 2018 by + # upstream's John Fitzgerald + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/moc/01-codec-2.5.2.patch" + sha256 "c6144dbbd85e3b775e3f03e83b0f90457450926583d4511fe32b7d655fdaf4eb" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/moc/02-codecpar-2.5.2.patch" + sha256 "5ee71f762500e68a6ccce84fb9b9a4876e89e7d234a851552290b42c4a35e930" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/moc/03-defines-2.5.2.patch" + sha256 "2ecfb9afbbfef9bd6f235bf1693d3e94943cf1402c4350f3681195e1fbb3d661" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/moc/04-lockmgr-2.5.2.patch" + sha256 "9ccfad2f98abb6f974fe6dc4c95d0dc9a754a490c3a87d3bd81082fc5e5f42dc" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/moc/05-audio4-2.5.2.patch" + sha256 "9a75ac8479ed895d07725ac9b7d86ceb6c8a1a15ee942c35eb5365f4c3cc7075" + end + end + + livecheck do + url "https://moc.daper.net/download" + regex(/href=.*?moc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "bac52905e18eff309f2c6ba4077a3008f1ca2f449055406f511767d881b3545a" + sha256 arm64_sequoia: "0c9fa6831440aa41b25064c9f2d93e9827f0d4f1ea0f2e1184def14041366d1b" + sha256 arm64_sonoma: "f9698a87a21e1695cfc81523056a86d2a08b3ecb013b978c46b0584a2cff566e" + sha256 arm64_ventura: "5494731a8b584382705cf06e159d10c42fd869150ab605cf4a096b2112e61d65" + sha256 sonoma: "4c15f75d82b37a05b79efddabd6e670076d94570d4e25a0e72a17cf72ed82d1c" + sha256 ventura: "f8def0f81c78bf06d1add5d086418a0522cd207cdb3ee177d5aad5b2f3ef0c26" + sha256 arm64_linux: "9a554bdfd055b86a978fff7d54467fcf43261c4e88c149a5f3e81bb736447074" + sha256 x86_64_linux: "a62b0dee94dd77f8368039d0e86b76282df94055c16cca501dcdd8ae719251f6" + end + + head do + url "svn://daper.net/moc/trunk" + + depends_on "popt" + end + + # Remove autoconf, automake and gettext for > 2.5.2 + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "berkeley-db@5" + depends_on "ffmpeg@4" # FFmpeg 5 issue: https://moc.daper.net/node/3644 + depends_on "flac" + depends_on "jack" + depends_on "libmodplug" + depends_on "libogg" + depends_on "libsamplerate" + depends_on "libsndfile" + depends_on "libtool" + depends_on "libvorbis" + depends_on "ncurses" + depends_on "speex" + + on_linux do + depends_on "alsa-lib" + end + + def install + # macOS iconv implementation is slightly broken since Sonoma. + # upstream bug report: https://savannah.gnu.org/bugs/index.php?66541 + ENV["am_cv_func_iconv_works"] = "yes" if OS.mac? && MacOS.version >= :sequoia + + ENV.append_path "ACLOCAL_PATH", Formula["gettext"].pkgshare/"m4" + + # Not needed for > 2.5.2 + odie "Remove `autoreconf` and dependencies!" if build.stable? && version > "2.5.2" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + def caveats + "You must start the jack daemon prior to running mocp." + end + + test do + assert_match version.to_s, shell_output("#{bin}/mocp --version") + end +end diff --git a/Formula/m/mockery.rb b/Formula/m/mockery.rb new file mode 100644 index 0000000000000..9c1bd2bf07cdb --- /dev/null +++ b/Formula/m/mockery.rb @@ -0,0 +1,46 @@ +class Mockery < Formula + desc "Mock code autogenerator for Golang" + homepage "https://github.com/vektra/mockery" + url "https://github.com/vektra/mockery/archive/refs/tags/v3.5.5.tar.gz" + sha256 "ece14262f8aa0a7075c9c03034002026d815beeb0b62235c5ae9375e3bb47e60" + license "BSD-3-Clause" + head "https://github.com/vektra/mockery.git", branch: "v3" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "57c54a0c6363e248ef3273ec97a299d5b27bdac86cdbf915ca68768278695792" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57c54a0c6363e248ef3273ec97a299d5b27bdac86cdbf915ca68768278695792" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "57c54a0c6363e248ef3273ec97a299d5b27bdac86cdbf915ca68768278695792" + sha256 cellar: :any_skip_relocation, sonoma: "477dcffccdcced8adb32e866c5f0362cfa668e72387d99356e837eb42b5b1bb4" + sha256 cellar: :any_skip_relocation, arm64_linux: "26079132d9231c5e85ed05da3b2b137b8617451f3a558b2f1e534cd09d1b7ac4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddd52e55c94618d2854a116437b8e348a44146d12155eb8f22e1887e725ee823" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/vektra/mockery/v#{version.major}/internal/logging.SemVer=v#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"mockery", "completion") + end + + test do + (testpath/".mockery.yaml").write <<~YAML + packages: + github.com/vektra/mockery/v2/pkg: + interfaces: + TypesPackage: + YAML + output = shell_output("#{bin}/mockery 2>&1", 1) + assert_match "Starting mockery", output + assert_match "version=v#{version}", output + end +end diff --git a/Formula/m/mockolo.rb b/Formula/m/mockolo.rb new file mode 100644 index 0000000000000..7629d1c5893c4 --- /dev/null +++ b/Formula/m/mockolo.rb @@ -0,0 +1,69 @@ +class Mockolo < Formula + desc "Efficient Mock Generator for Swift" + homepage "https://github.com/uber/mockolo" + url "https://github.com/uber/mockolo/archive/refs/tags/2.4.0.tar.gz" + sha256 "58174327732b53f9e6bb0c8c355270ae2df7be739f006680fd8eeb53599b6766" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a8d94078e230af979e5010d890ec7c1497f1c7caa5e7cb62e0dc4b00ee3e8d93" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18f1b69b192e7aaf2cb57a752c4c9a96c2ea7ab24ce52dce3b138dac2b190599" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9da1cd6bc134cfd133dc72c56a3120429b8db32a4efab512f113c76f642f58de" + sha256 cellar: :any_skip_relocation, sonoma: "293816ce556079215b9f76165f1d306b2ece74018b4616411cd6086ebc99e291" + sha256 cellar: :any_skip_relocation, arm64_linux: "70236713bc4f9f9ede9f42093757fdf3df9b1852e228af98aa614bd463930745" + sha256 cellar: :any_skip_relocation, x86_64_linux: "476cee56c533c781c86fc767215cfc7ec7515596ef89f6ae473c3aff2927f1cd" + end + + depends_on xcode: ["15.3", :build] + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "--product", "mockolo" + bin.install ".build/release/mockolo" + generate_completions_from_executable(bin/"mockolo", "--generate-completion-script") + end + + test do + (testpath/"testfile.swift").write <<~SWIFT + /// @mockable + public protocol Foo { + var num: Int { get set } + func bar(arg: Float) -> String + } + SWIFT + system bin/"mockolo", "-srcs", testpath/"testfile.swift", "-d", testpath/"GeneratedMocks.swift" + assert_path_exists testpath/"GeneratedMocks.swift" + output = <<~SWIFT.gsub(/\s+/, "").strip + /// + /// @Generated by Mockolo + /// + public class FooMock: Foo { + public init() { } + public init(num: Int = 0) { + self.num = num + } + + public private(set) var numSetCallCount = 0 + public var num: Int = 0 { didSet { numSetCallCount += 1 } } + + public private(set) var barCallCount = 0 + public var barHandler: ((Float) -> String)? + public func bar(arg: Float) -> String { + barCallCount += 1 + if let barHandler = barHandler { + return barHandler(arg) + } + return "" + } + } + SWIFT + assert_equal output, shell_output("cat #{testpath/"GeneratedMocks.swift"}").gsub(/\s+/, "").strip + end +end diff --git a/Formula/m/mockserver.rb b/Formula/m/mockserver.rb new file mode 100644 index 0000000000000..d0809ed513e33 --- /dev/null +++ b/Formula/m/mockserver.rb @@ -0,0 +1,49 @@ +class Mockserver < Formula + desc "Mock HTTP server and proxy" + homepage "https://www.mock-server.com/" + url "https://search.maven.org/remotecontent?filepath=org/mock-server/mockserver-netty/5.15.0/mockserver-netty-5.15.0-brew-tar.tar" + sha256 "5f679d84e4254f32f4b129cdeead98028d59f523419c2e61ac13f3dc3e7418df" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/mock-server/mockserver-netty/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "82cb11da022be37040192503a2276159e9282ae47a2c7c176cca6328e2bf65d3" + end + + depends_on "openjdk" + + def install + inreplace "bin/run_mockserver.sh", "/usr/local", HOMEBREW_PREFIX + libexec.install Dir["*"] + (bin/"mockserver").write_env_script libexec/"bin/run_mockserver.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + + lib.install_symlink "#{libexec}/lib" => "mockserver" + + mockserver_log = var/"log/mockserver" + mockserver_log.mkpath + + libexec.install_symlink mockserver_log => "log" + end + + test do + port = free_port + + mockserver = fork do + exec bin/"mockserver", "-serverPort", port.to_s + end + + loop do + Utils.popen_read("curl", "-s", "http://localhost:#{port}/status", "-X", "PUT") + break if $CHILD_STATUS.exitstatus.zero? + end + + system "curl", "-s", "http://localhost:#{port}/stop", "-X", "PUT" + + Process.wait(mockserver) + end +end diff --git a/Formula/m/moco.rb b/Formula/m/moco.rb new file mode 100644 index 0000000000000..c66c5eb4f2a6e --- /dev/null +++ b/Formula/m/moco.rb @@ -0,0 +1,50 @@ +class Moco < Formula + desc "Stub server with Maven, Gradle, Scala, and shell integration" + homepage "https://github.com/dreamhead/moco" + url "https://search.maven.org/remotecontent?filepath=com/github/dreamhead/moco-runner/1.5.0/moco-runner-1.5.0-standalone.jar" + sha256 "67fffbf936877012e7ecd754cb72c6e1908ca38cf1cc0140c79fd6ab81da2ef1" + license "MIT" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/github/dreamhead/moco-runner/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "521d8b998c0312dccbb48389843c42e5c3f3edb17618eaa8b017038d040a420c" + end + + depends_on "openjdk" + + def install + libexec.install "moco-runner-#{version}-standalone.jar" + bin.write_jar_script libexec/"moco-runner-#{version}-standalone.jar", "moco" + end + + test do + (testpath/"config.json").write <<~JSON + [ + { + "response" : + { + "text" : "Hello, Moco" + } + } + ] + JSON + + port = free_port + begin + pid = fork do + exec "#{bin}/moco http -p #{port} -c #{testpath}/config.json" + end + sleep 10 + + assert_match "Hello, Moco", shell_output("curl -s http://127.0.0.1:#{port}") + ensure + Process.kill "SIGTERM", pid + Process.wait pid + end + end +end diff --git a/Formula/m/modman.rb b/Formula/m/modman.rb new file mode 100644 index 0000000000000..c3f84ad6da3a8 --- /dev/null +++ b/Formula/m/modman.rb @@ -0,0 +1,23 @@ +class Modman < Formula + desc "Module deployment script geared towards Magento development" + homepage "https://github.com/colinmollenhour/modman" + url "https://github.com/colinmollenhour/modman/archive/refs/tags/1.14.tar.gz" + sha256 "58ac5b27b11def9ba162881c3687f2085c06a6ed4cfb496bafdc64ce1a2eaac6" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "f932bb64388501a75aff2a97fe0b75b6bbefa13d38f29d99cf49672015aba60d" + end + + def install + bin.install "modman" + bash_completion.install "bash_completion" => "modman" + end + + test do + system bin/"modman" + end +end diff --git a/Formula/m/mods.rb b/Formula/m/mods.rb new file mode 100644 index 0000000000000..8fabf6ef8f363 --- /dev/null +++ b/Formula/m/mods.rb @@ -0,0 +1,36 @@ +class Mods < Formula + desc "AI on the command-line" + homepage "https://github.com/charmbracelet/mods" + url "https://github.com/charmbracelet/mods/archive/refs/tags/v1.8.1.tar.gz" + sha256 "e16268ce55b9c90395116c2c8ce4d820d18d7f0b05430d64dc69686410776231" + license "MIT" + head "https://github.com/charmbracelet/mods.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c0ace82772dbc9bd679b85ea474a84ceee99e61dbedcf0cebbb400f0ab5fe3ba" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "679478d8a2130c41981b35df3755dc526696b284912031d86dc09f75db788fee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "679478d8a2130c41981b35df3755dc526696b284912031d86dc09f75db788fee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "679478d8a2130c41981b35df3755dc526696b284912031d86dc09f75db788fee" + sha256 cellar: :any_skip_relocation, sonoma: "75cacca99fb5c70b31d0b59fb23ba8572fa49d8f995cd3d666c3fdd37ae4d0fd" + sha256 cellar: :any_skip_relocation, ventura: "75cacca99fb5c70b31d0b59fb23ba8572fa49d8f995cd3d666c3fdd37ae4d0fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e5dba892702bd9cb1c41639be0e9e382c229604653aeb34d86bf6f81f7973d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e5dd968e08dfe368e4f6e098671a827afe2904be869cea0499d9ec25e562cde" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.CommitSHA=#{tap.user} -X main.CommitDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"mods", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + output = pipe_output("#{bin}/mods 2>&1", "Hello, Homebrew!", 1) + assert_match "ERROR OpenAI authentication failed", output + + assert_match version.to_s, shell_output("#{bin}/mods --version") + assert_match "GPT on the command line", shell_output("#{bin}/mods --help") + end +end diff --git a/Formula/m/modsecurity.rb b/Formula/m/modsecurity.rb new file mode 100644 index 0000000000000..3d80c36298c11 --- /dev/null +++ b/Formula/m/modsecurity.rb @@ -0,0 +1,64 @@ +class Modsecurity < Formula + desc "Libmodsecurity is one component of the ModSecurity v3 project" + homepage "https://github.com/owasp-modsecurity/ModSecurity" + url "https://github.com/owasp-modsecurity/ModSecurity/releases/download/v3.0.14/modsecurity-v3.0.14.tar.gz" + sha256 "f7599057b35e67ab61764265daddf9ab03c35cee1e55527547afb073ce8f04e8" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "2fc44acabce7d4c67b6173c40a2c130fb7f164ca74730922b5cbfc7f8a4194a3" + sha256 cellar: :any, arm64_sequoia: "ef880da82b470f1bc5b1cce0c581ebeb87738b43f47d99928e7f90705a723d2c" + sha256 cellar: :any, arm64_sonoma: "d35bb9b47ef663af1e0d66564f39a3f70e600a891ab82d30349208a2ce01e620" + sha256 cellar: :any, arm64_ventura: "fd6422cba66fea2a371e066e34a43ae75c2539ae7dc8d78c6e9198681a97e7cb" + sha256 cellar: :any, sonoma: "84fc44c8c036e373762e66acf75e21caf5e97cdfa24c4b03f50082694078414d" + sha256 cellar: :any, ventura: "f97fbde36e55908673885cae90d1bee0a5394f93fb97b10a8f3ad07acd061aee" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a5ceccfc1aba5a91872111ed16bb5dc8d562b248135dff55dda9447f417bfc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7c83f85fb33704ab113e7f38f1cbc94d8105ed4ca0e5228ef524c73b04fd3e8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libmaxminddb" + depends_on "lua" + depends_on "pcre2" + depends_on "yajl" + + uses_from_macos "curl", since: :monterey + uses_from_macos "libxml2" + + # Use ArchLinux patch to fix build with libxml2 2.12. + # TODO: Check if fixed in future libxml2 release. + # Issue ref: https://github.com/owasp-modsecurity/ModSecurity/issues/3023 + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/libmodsecurity/-/raw/5c78cfaaeb00c842731c52851341884c74bdc9b2/libxml-includes.patch" + sha256 "7ee0adbe5b164ca512c49e51e30ffd41e29244156a695e619dcf1d0387e69aef" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + + libxml2 = OS.mac? ? "#{MacOS.sdk_path_if_needed}/usr" : Formula["libxml2"].opt_prefix + + args = [ + "--disable-debug-logs", + "--disable-doxygen-html", + "--disable-examples", + "--disable-silent-rules", + "--with-libxml=#{libxml2}", + "--with-lua=#{Formula["lua"].opt_prefix}", + "--with-pcre2=#{Formula["pcre2"].opt_prefix}", + "--with-yajl=#{Formula["yajl"].opt_prefix}", + "--without-geoip", + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/modsec-rules-check \"SecAuditEngine RelevantOnly\"") + assert_match("Test ok", output) + end +end diff --git a/Formula/m/modsurfer.rb b/Formula/m/modsurfer.rb new file mode 100644 index 0000000000000..6bbd9efbf1e78 --- /dev/null +++ b/Formula/m/modsurfer.rb @@ -0,0 +1,44 @@ +class Modsurfer < Formula + desc "Validate, audit and investigate WebAssembly binaries" + homepage "https://dylibso.com/products/modsurfer/" + url "https://github.com/dylibso/modsurfer/archive/refs/tags/v0.0.10.tar.gz" + sha256 "2f5defcfe8668d7323a83dab0b323282e2855a4171c1d0d4eacf5963aa3729b1" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "771be4aaa710c9ab747d8c99f16be41f132e0f0662cc59c5e5ef1b4827fcbbe2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4de08833308339b9707922798aeede8757c81d4e025667d2290b183aa2c161e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42474789dbb88caadbcf8c0d113545c1bf40036b77cc89a88368e28413c97886" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7720cac93edc2ab0f29464ba3bc195cca1f5cc1e1d2ad6f9d98303b6b98f46ab" + sha256 cellar: :any_skip_relocation, arm64_monterey: "34b454f9d922b88adea055d86ea1ecbf08943162f0b69c73c03da9c664020bbd" + sha256 cellar: :any_skip_relocation, sonoma: "b917744c1619ac05cdf12c8236ed2d8f6e25078bd7369c701ff9a0a0ef041303" + sha256 cellar: :any_skip_relocation, ventura: "9f033931b5c7fbf412ec53091fb423d5c376f509abe0a472fc2a6e52c320968e" + sha256 cellar: :any_skip_relocation, monterey: "0e987ef1c06a80190898850d0aaa1e26d9c3515492f8ddbcef4a6c1a7af6dde2" + sha256 cellar: :any_skip_relocation, arm64_linux: "12a645180f3f4fa5735a85750d323b060dd085e408d0f0d5aee652ea07dcc845" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0ae0a282777800dcabb713ce0f994bf1cb0d4154edd5bcf2cdaec083d05b2dd" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/modsurfer -V") + + wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") + (testpath/"sum.wasm").write(wasm) + + system bin/"modsurfer", "generate", "-p", "sum.wasm", "-o", "mod.yaml" + assert_path_exists testpath/"mod.yaml" + system bin/"modsurfer", "validate", "-p", "sum.wasm", "-c", "mod.yaml" + end +end diff --git a/Formula/m/modules.rb b/Formula/m/modules.rb new file mode 100644 index 0000000000000..ed5393eb2c970 --- /dev/null +++ b/Formula/m/modules.rb @@ -0,0 +1,63 @@ +class Modules < Formula + desc "Dynamic modification of a user's environment via modulefiles" + homepage "https://modules.sourceforge.net/" + url "https://downloads.sourceforge.net/project/modules/Modules/modules-5.6.0/modules-5.6.0.tar.bz2" + sha256 "21c9041b7aac341c01b89e4fef0c5414e6928632ec839e86fc6dcb4c9503e6d4" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/modules[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "62ac4cbc56519b920329ce5fb23d78c833645931c5b9afb576796ca6bec79778" + sha256 cellar: :any, arm64_sequoia: "b96474bcebc53d36afddc6c40d58bf86d37df3c82ae5fc04c07654abc0d1466b" + sha256 cellar: :any, arm64_sonoma: "d0230d446fa7be1f6b5c78618182ffc5da2c0e3560421525fb97133f28f0b75b" + sha256 cellar: :any, arm64_ventura: "d9c87d45370d3f46537bb407c58bab470acec1634c1050de5fd3317645bb51ff" + sha256 cellar: :any, sonoma: "5855253b417699a3f4b3c58bb32cef094f5e3de694ddb34c02a54c3fd7aea587" + sha256 cellar: :any, ventura: "782be9a7bd7c67dc16bfca7653d32e90bfcbc8b87f03912e2a5421c747d8d9e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b9ae7b3d2fd96b3e08b8b597e801218f581c56a0c91f020cc07fe5696fbda76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa7ac949189ecb64f38abd9bae6049f03436c99db250f526fa86a7d382f99cbb" + end + + depends_on "tcl-tk" + + uses_from_macos "less" + + def install + tcltk = Formula["tcl-tk"] + args = %W[ + --prefix=#{prefix} + --datarootdir=#{share} + --with-tcl=#{tcltk.opt_lib} + --with-tclsh=#{tcltk.opt_bin}/tclsh + --without-x + ] + args << "--with-pager=#{Formula["less"].opt_bin}/less" if OS.linux? + + system "./configure", *args + system "make", "install" + end + + def caveats + <<~EOS + To activate modules, add the following at the end of your .zshrc: + + source #{opt_prefix}/init/zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + assert_match "restore", shell_output("#{bin}/envml --help") + shell, cmd = if OS.mac? + ["zsh", "source"] + else + ["sh", "."] + end + output = shell_output("#{shell} -c '#{cmd} #{prefix}/init/#{shell}; module' 2>&1") + assert_match version.to_s, output + end +end diff --git a/Formula/m/moe.rb b/Formula/m/moe.rb new file mode 100644 index 0000000000000..51807e7bf6eae --- /dev/null +++ b/Formula/m/moe.rb @@ -0,0 +1,30 @@ +class Moe < Formula + desc "Console text editor for ISO-8859 and ASCII" + homepage "https://www.gnu.org/software/moe/moe.html" + url "https://ftpmirror.gnu.org/gnu/moe/moe-1.15.tar.lz" + mirror "https://ftp.gnu.org/gnu/moe/moe-1.15.tar.lz" + sha256 "41f8c8b099ce3047945ca4e097a60d9243e9c73fbb268c194a12da8b0d9f0a66" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "5c20e2b669488844badcd5e9930273169528983a1d7f6c7814b6e1af438683d0" + sha256 arm64_sequoia: "0d2e867872c06762566dec24fc623e2fadb8fd67ad80d50340f44a5e6fd39ae9" + sha256 arm64_sonoma: "028de034fd8e2a0b5543c925900e16b806d7d01ab49b77e61342641ace78c50a" + sha256 arm64_ventura: "70dc3b3b0c9337c7efab45da9db577c7aa2554e0c50d2668d754cbd38f6b752d" + sha256 sonoma: "324720fab1db409bc494db46c0ccb9e2ed161c4168fc74197719ef0fba991094" + sha256 ventura: "dc04a4a8eb7b4c07651af6f21bf6aece52348a65c7255b7fd319ba7ebfe31949" + sha256 arm64_linux: "3ec690416ba55579babc7dd64f3a5ff9b2b1edaada6dbdcf0b8c6e6a7552a782" + sha256 x86_64_linux: "bf9f6ae698842d4b0b673c761e5bf77292a33bc2b88c19ecde04d923eadbff0c" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"moe", "--version" + end +end diff --git a/Formula/m/mogenerator.rb b/Formula/m/mogenerator.rb new file mode 100644 index 0000000000000..5858693c41977 --- /dev/null +++ b/Formula/m/mogenerator.rb @@ -0,0 +1,48 @@ +class Mogenerator < Formula + desc "Generate Objective-C & Swift classes from your Core Data model" + homepage "https://rentzsch.github.io/mogenerator/" + url "https://github.com/rentzsch/mogenerator/archive/refs/tags/1.32.tar.gz" + sha256 "4fa660a19934d94d7ef35626d68ada9912d925416395a6bf4497bd7df35d7a8b" + license "MIT" + head "https://github.com/rentzsch/mogenerator.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8efb94ec378cb588e5abe0cb6a1e586a9120fac207896a8b34e64c69992bc24e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3da7eab4006572e1dedbb58e22b0301a2ddfb272b42c1f2322f326680e577e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8087d13fc33fb3263269a5500831ee3338027c5877c51be48e181fcf472ff46" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e3905d64fb52d4543d39ab15d24d091829d22c885e5a423db3ab64d0e9b625d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "29159fa7d208a108c0a36a222f7a300151241810eccfef04059a86611dfe41d4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "51aec3a49207ae357af26a5407494bc88d98027ba06293736b2888ece7b1d71c" + sha256 cellar: :any_skip_relocation, sonoma: "6dd0fa180a940a69e93f8e6762c25b452b9f87a772c4f1a253da60ae95a2c51f" + sha256 cellar: :any_skip_relocation, ventura: "b270d1b6e1f7dd23d8606906587169bf49838f82ab27015b75299f56da9dcf71" + sha256 cellar: :any_skip_relocation, monterey: "a9907203474f336c731912e28fad5ec2e912a1e7378d5ba527a7bb3d3b160134" + sha256 cellar: :any_skip_relocation, big_sur: "415e0e160574b7b16dff3d0395a7e156894675191c911d09cddf59e1d916571b" + sha256 cellar: :any_skip_relocation, catalina: "d62cad0cc94a7b05286fb2a8a2f8e4a4cc3a9b46efa9a391aa9fcb00c381e85e" + end + + depends_on xcode: :build + depends_on :macos + + # https://github.com/rentzsch/mogenerator/pull/390 + patch do + url "https://github.com/rentzsch/mogenerator/commit/20d9cce6df8380160cac0ce07687688076fddf3d.patch?full_index=1" + sha256 "de700f06c32cc0d4fbcb1cdd91e9e97a55931bc047841985d5c0905e65b5e5b0" + end + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "-target", "mogenerator", + "-configuration", "Release", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", + "SYMROOT=symroot", + "OBJROOT=objroot" + bin.install "symroot/Release/mogenerator" + end + + test do + system bin/"mogenerator", "--version" + end +end diff --git a/Formula/m/mold.rb b/Formula/m/mold.rb new file mode 100644 index 0000000000000..42b753aa056ae --- /dev/null +++ b/Formula/m/mold.rb @@ -0,0 +1,129 @@ +class Mold < Formula + desc "Modern Linker" + homepage "https://github.com/rui314/mold" + url "https://github.com/rui314/mold/archive/refs/tags/v2.40.4.tar.gz" + sha256 "69414c702ec1084e1fa8ca16da24f167f549e5e11e9ecd5d70a8dcda6f08c249" + license "MIT" + head "https://github.com/rui314/mold.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8b40b6a652877ed7299df4e1c32b201a515a4764c96689a4609c895185d2d71e" + sha256 cellar: :any, arm64_sequoia: "1ed3cd743c1033ecb3b070817e4e5ca54815d8d3c1bad920f3224aafa5267a41" + sha256 cellar: :any, arm64_sonoma: "c0622583fa23153d640b8e720f5a4d14dd5e969be7d610626a0ad55460bfbdc7" + sha256 cellar: :any, arm64_ventura: "f4df41bb25c00b851e508249a377fdf394f441850c325fa67089b9e036af2b8f" + sha256 cellar: :any, sonoma: "2a0189bf5a1b37efd61a2a2233e99d2e216ec83dc616d7811bd35ce84a09a400" + sha256 cellar: :any, ventura: "96ad94c18f4f7eb591f9f560a40b8db685634b024190d255e5b91a41d61f7a4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "03951e11bace13df037bc73fed74c04773da11c2ca74d3f3285a250f749c5ce4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a456faee04d75649d33d7cea036b12bab85d35fa1fc079e687c895d1945966d2" + end + + depends_on "cmake" => :build + depends_on "blake3" + depends_on "tbb" + depends_on "zstd" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1500 + end + + on_linux do + depends_on "mimalloc" + end + + fails_with :clang do + build 1500 + cause "Requires C++20" + end + + fails_with :gcc do + version "7" + cause "Requires C++20" + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1500) + + # Avoid embedding libdir in the binary. + # This helps make the bottle relocatable. + inreplace "lib/config.h.in", "@CMAKE_INSTALL_FULL_LIBDIR@", "" + # Ensure we're using Homebrew-provided versions of these dependencies. + %w[blake3 mimalloc tbb zlib zstd].each { |dir| rm_r(buildpath/"third-party"/dir) } + args = %w[ + -DMOLD_LTO=ON + -DMOLD_USE_MIMALLOC=ON + -DMOLD_USE_SYSTEM_MIMALLOC=ON + -DMOLD_USE_SYSTEM_TBB=ON + -DCMAKE_SKIP_INSTALL_RULES=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "test" + end + + def caveats + <<~EOS + Support for Mach-O targets has been removed. + EOS + end + + test do + (testpath/"test.c").write <<~C + int main(void) { return 0; } + C + + linker_flag = case ENV.compiler + when /^gcc(-(\d|10|11))?$/ then "-B#{libexec}/mold" + when :clang, /^gcc-\d{2,}$/ then "-fuse-ld=mold" + else odie "unexpected compiler" + end + + extra_flags = %w[-fPIE -pie] + extra_flags += %w[--target=x86_64-unknown-linux-gnu -nostdlib] unless OS.linux? + + system ENV.cc, linker_flag, *extra_flags, "test.c" + if OS.linux? + system "./a.out" + else + assert_match "ELF 64-bit LSB pie executable, x86-64", shell_output("file a.out") + end + + return unless OS.linux? + + cp_r pkgshare/"test", testpath + + # Remove non-native tests. + arch = Hardware::CPU.arch.to_s + arch = "aarch64" if arch == "arm64" + testpath.glob("test/arch-*.sh") + .reject { |f| f.basename(".sh").to_s.match?(/^arch-#{arch}-/) } + .each(&:unlink) + + inreplace testpath.glob("test/*.sh") do |s| + s.gsub!(%r{(\./|`pwd`/)?mold-wrapper}, lib/"mold/mold-wrapper", audit_result: false) + s.gsub!(%r{(\.|`pwd`)/mold}, bin/"mold", audit_result: false) + s.gsub!(/-B(\.|`pwd`)/, "-B#{libexec}/mold", audit_result: false) + end + + # The `inreplace` rules above do not work well on this test. To avoid adding + # too much complexity to the regex rules, it is manually tested below + # instead. + (testpath/"test/mold-wrapper2.sh").unlink + assert_match "mold-wrapper.so", + shell_output("#{bin}/mold -run bash -c 'echo $LD_PRELOAD'") + + # Run the remaining tests. + testpath.glob("test/*.sh").each { |t| system "bash", t } + end +end diff --git a/Formula/m/molecule.rb b/Formula/m/molecule.rb new file mode 100644 index 0000000000000..c3d515d05e5dd --- /dev/null +++ b/Formula/m/molecule.rb @@ -0,0 +1,316 @@ +class Molecule < Formula + include Language::Python::Virtualenv + + desc "Automated testing for Ansible roles" + homepage "https://molecule.readthedocs.io" + url "https://files.pythonhosted.org/packages/93/dc/96458f3a5ed721364a76e773f60d04ca35e9d068c907a5723e65d0897d97/molecule-25.9.0.tar.gz" + sha256 "1a56d283b1fb5488439eac945971dbd66b772ed43b2c66a776922cb93d39fbfd" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c6ad9fe5f51f8b9874850320792ca07bec6b9a7f2a2265457d2bc0fa6e061ca5" + sha256 cellar: :any, arm64_sequoia: "2671ca49c338bb99b1f780d6577f4ba6ac39fefee15c8c1b167f18bd4f907830" + sha256 cellar: :any, arm64_sonoma: "a8ac56ad1d165b0dfe505990c5b1a446120c700b5ae2c0980852ad9c446218fd" + sha256 cellar: :any, sonoma: "a2e0e7939f07856d834d0ade3fc5a535c4b05466a17969fcfbc34947b03fe13f" + sha256 cellar: :any_skip_relocation, arm64_linux: "69ab7bcb71335c7e55df5bcb2058da456fcf0adada738c3be8c3113631c40b6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "949b42de5441a59f34f62527c5e95236d874b92d976bb0f71dedae64fe3d4387" + end + + depends_on "ansible" + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.13" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libffi" + + on_linux do + depends_on "gmp" + end + + pypi_packages exclude_packages: ["certifi", "cryptography", "rpds-py"], + extra_packages: "molecule-plugins[azure,docker,ec2,gce,podman,vagrant,openstack]" + + resource "ansible-compat" do + url "https://files.pythonhosted.org/packages/ea/96/d5bcbd652dbcbf8611b32457d67b10e41e5e596e34460c25511ccfa6fbf1/ansible_compat-25.8.1.tar.gz" + sha256 "f29ab81264b3f04fb94ac2d7f68fe73efc2eb3cbe4ecf00f9b4742e77c41756f" + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/16/f1/1c21d3bff03fe9a5b51515307db7a76ec8b8972c70d5702cc3027c988a99/ansible_core-2.19.2.tar.gz" + sha256 "87fcbbc492ed16eb6adb0379bae0adbf69f3ce88a8440e7e88e0dcefa9f8a54c" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz" + sha256 "98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/6c/81/3747dad6b14fa2cf53fcf10548cf5aea6913e96fab41a3c198676f8948a5/cachetools-5.5.2.tar.gz" + sha256 "1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "click-help-colors" do + url "https://files.pythonhosted.org/packages/6f/50/76f51d9c7fcd72a12da466801f7c1fa3884424c947787333c74327b4fcf3/click-help-colors-0.9.4.tar.gz" + sha256 "f4cabe52cf550299b8888f4f2ee4c5f359ac27e33bcfe4d61db47785a5cc936c" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/86/97/da72845c89c9aa70e3e74609b864eff5e5c2ec46366645e7bb61eaa29e9c/dogpile_cache-1.4.1.tar.gz" + sha256 "e25c60e677a5e28ff86124765fbf18c53257bcd7830749cd5ba350ace2a12989" + end + + resource "enrich" do + url "https://files.pythonhosted.org/packages/bb/77/cb9b3d6f2e2e5f8104e907ea4c4d575267238f52c51cf9f864b865a99710/enrich-1.2.7.tar.gz" + sha256 "0a2ab0d2931dff8947012602d1234d2a3ee002d9a355b5d70be6bf5466008893" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/9e/9b/e92ef23b84fa10a64ce4831390b7a4c2e53c0132568d99d4ae61d04c8855/google_auth-2.40.3.tar.gz" + sha256 "500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/e5/16/b96df223ca7ea4bfa78034b205e0eaf4875bfecb2f119f375fc5232d2061/keystoneauth1-5.12.0.tar.gz" + sha256 "dd113c2f3dcb418d9f761c73b8cd43a96ddfa8a612b51c576822381f39ca4ae8" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "molecule-plugins" do + url "https://files.pythonhosted.org/packages/65/11/b7316c96c9ecca901f3a7fd5927f3dd757e17e11a428fb83cc5349e9b063/molecule_plugins-25.8.12.tar.gz" + sha256 "75f32763e90275bfc24bcc0d27b9bb22ac973658bf902b2e3e8af8e2a1c32083" + end + + resource "openstacksdk" do + url "https://files.pythonhosted.org/packages/6c/e7/4921e513dc00e2b052b196e4a7055351b74192a680470ab287b2332b0c6a/openstacksdk-4.7.1.tar.gz" + sha256 "23348aa69c6cc6c1ed0e8f03fb42b156519ed8cfcd143e783ef5c1dd800ad9f1" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/9d/e9/1725288a94496d7780cd1624d16b86b7ed596960595d5742f051c4b90df5/os_service_types-1.8.0.tar.gz" + sha256 "890ce74f132ca334c2b23f0025112b47c6926da6d28c2f75bcfc0a83dea3603e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz" + sha256 "ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-vagrant" do + url "https://files.pythonhosted.org/packages/2b/3f/2e42a44c9705d72d9925fe8daf00f31bcf82e8b84ec5a752a8a1357c3ef8/python-vagrant-1.0.0.tar.gz" + sha256 "a8fe93ccf2ff37ecc95ec2f49ea74a91a6ce73a4db4a16a98dd26d397cfd09e5" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requestsexceptions" do + url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" + sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/05/57/c5c178e21968123cf2aa90501b5fc14a48e342612695863333f4b70510ad/resolvelib-1.2.0.tar.gz" + sha256 "c27fbb5098acd7dfc01fb2be3724bd0881168edc2bd3b4dc876ca3f46b8e4a3d" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fe/75/af448d8e52bf1d8fa6a9d089ca6c07ff4453d86c65c145d0a300bb073b9b/rich-14.1.0.tar.gz" + sha256 "e497a48b844b0320d45007cdebfeaeed8db2a4f4bcf49f15e455cfc4af11eaa8" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "selinux" do + url "https://files.pythonhosted.org/packages/25/07/51acd62e1e15e1172d46f7e32faf138725b147f8c08dbf2d512159d7a310/selinux-0.3.0.tar.gz" + sha256 "2a88b337ac46ad0f06f557b2806c3df62421972f766673dd8bf26732fb75a9ea" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "subprocess-tee" do + url "https://files.pythonhosted.org/packages/d7/22/991efbf35bc811dfe7edcd749253f0931d2d4838cf55176132633e1c82a7/subprocess_tee-0.4.2.tar.gz" + sha256 "91b2b4da3aae9a7088d84acaf2ea0abee3f4fd9c0d2eae69a9b9122a71476590" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/79/3e/c0bdc27cf06f4e47680bd5803a07cb3dfd17de84cde92dd217dcb9e05253/wcmatch-10.1.tar.gz" + sha256 "f11f94208c8c8484a16f4f48638a85d771d9513f4ab3f37595978801cb9465af" + end + + def python3 + "python3.13" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"molecule", shell_parameter_format: :click) + end + + test do + ENV["ANSIBLE_REMOTE_TMP"] = testpath/"tmp" + ENV["ANSIBLE_PYTHON_INTERPRETER"] = which(python3) + + system bin/"molecule", "init", "scenario", "acme.foo_vagrant" + assert_path_exists testpath/"molecule/acme.foo_vagrant/molecule.yml", + "Failed to create 'molecule/acme.foo_vagrant/molecule.yml' file!" + output = shell_output("#{bin}/molecule list --format yaml 2>&1") + assert_match "INFO [acme.foo_vagrant > list] Executed: Successful", output + end +end diff --git a/Formula/m/molten-vk.rb b/Formula/m/molten-vk.rb new file mode 100644 index 0000000000000..196f2be78b6c8 --- /dev/null +++ b/Formula/m/molten-vk.rb @@ -0,0 +1,183 @@ +class MoltenVk < Formula + desc "Implementation of the Vulkan graphics and compute API on top of Metal" + homepage "https://github.com/KhronosGroup/MoltenVK" + license "Apache-2.0" + + stable do + url "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.4.0.tar.gz" + sha256 "fc74aef926ee3cd473fe260a93819c09fdc939bff669271a587e9ebaa43d4306" + + # MoltenVK depends on very specific revisions of its dependencies. + # For each resource the path to the file describing the expected + # revision is listed. + resource "SPIRV-Cross" do + # ExternalRevisions/SPIRV-Cross_repo_revision + url "https://github.com/KhronosGroup/SPIRV-Cross.git", + revision: "0a88b2d5c08708d45692b7096a0a84e7bfae366c" + end + + resource "SPIRV-Headers" do + # ExternalRevisions/SPIRV-Headers_repo_revision + url "https://github.com/KhronosGroup/SPIRV-Headers.git", + revision: "bab63ff679c41eb75fc67dac76e1dc44426101e1" + end + + resource "SPIRV-Tools" do + # ExternalRevisions/SPIRV-Tools_repo_revision + url "https://github.com/KhronosGroup/SPIRV-Tools.git", + revision: "783d7033613cedaa7147d0700b517abc5c32312d" + end + + resource "Vulkan-Headers" do + # ExternalRevisions/Vulkan-Headers_repo_revision + url "https://github.com/KhronosGroup/Vulkan-Headers.git", + revision: "088a00d81d1fc30ff77aacf31485871aebec7cb2" + end + + resource "Vulkan-Tools" do + # ExternalRevisions/Vulkan-Tools_repo_revision + url "https://github.com/KhronosGroup/Vulkan-Tools.git", + revision: "682e42f7ae70a8fadf374199c02de737daa5c70d" + end + + resource "cereal" do + # ExternalRevisions/cereal_repo_revision + url "https://github.com/USCiLab/cereal.git", + revision: "51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c582142652134e00fcddb2b15491492020469d0efc497873b017c45b2ba21a3b" + sha256 cellar: :any, arm64_sequoia: "9b8177214626a66d3f3d437263fdb5b90617ebabc58a72748eda09024c139c38" + sha256 cellar: :any, arm64_sonoma: "fb9f58d36dc493741ba4c5dba69704d29f0dcba0732f2308402be1eabac4d706" + sha256 cellar: :any, arm64_ventura: "bad2cf52dea78a3561653620af14993927bb1b6873e308b5a9ff3fe8c1cd532b" + sha256 cellar: :any, sonoma: "9a16c4a69f8cbb94bea95004f0c686a645df1c3c35ec5fbee23ae0edb9298078" + sha256 cellar: :any, ventura: "998675bdd180f03a6acb2a8c908826452f912fde846c3442cf9b821ad004067a" + end + + head do + url "https://github.com/KhronosGroup/MoltenVK.git", branch: "main" + + resource "SPIRV-Cross" do + url "https://github.com/KhronosGroup/SPIRV-Cross.git", branch: "main" + end + + resource "SPIRV-Headers" do + url "https://github.com/KhronosGroup/SPIRV-Headers.git", branch: "main" + end + + resource "SPIRV-Tools" do + url "https://github.com/KhronosGroup/SPIRV-Tools.git", branch: "main" + end + + resource "Vulkan-Headers" do + url "https://github.com/KhronosGroup/Vulkan-Headers.git", branch: "main" + end + + resource "Vulkan-Tools" do + url "https://github.com/KhronosGroup/Vulkan-Tools.git", branch: "main" + end + + resource "cereal" do + url "https://github.com/USCiLab/cereal.git", branch: "master" + end + end + + depends_on "cmake" => :build + depends_on xcode: ["11.7", :build] + depends_on :macos # Linux does not have a Metal implementation. Not implied by the line above. + + uses_from_macos "python" => :build + + def install + resources.each do |res| + res.stage(buildpath/"External"/res.name) + end + + # Build spirv-tools + mv "External/SPIRV-Headers", "External/spirv-tools/external/spirv-headers" + + mkdir "External/spirv-tools" do + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + end + + # Build ExternalDependencies + xcodebuild "ARCHS=#{Hardware::CPU.arch}", "ONLY_ACTIVE_ARCH=YES", + "-project", "ExternalDependencies.xcodeproj", + "-scheme", "ExternalDependencies-macOS", + "-derivedDataPath", "External/build", + "SYMROOT=External/build", "OBJROOT=External/build", + "build" + + if DevelopmentTools.clang_build_version >= 1500 && MacOS.version < :sonoma + # Required to build xcframeworks with Xcode 15 + # https://github.com/KhronosGroup/MoltenVK/issues/2028 + xcodebuild "-create-xcframework", "-output", "./External/build/Release/SPIRVCross.xcframework", + "-library", "./External/build/Release/libSPIRVCross.a" + xcodebuild "-create-xcframework", "-output", "./External/build/Release/SPIRVTools.xcframework", + "-library", "./External/build/Release/libSPIRVTools.a" + end + + # Build MoltenVK Package + xcodebuild "ARCHS=#{Hardware::CPU.arch}", "ONLY_ACTIVE_ARCH=YES", + "-project", "MoltenVKPackaging.xcodeproj", + "-scheme", "MoltenVK Package (macOS only)", + "-derivedDataPath", "#{buildpath}/build", + "SYMROOT=#{buildpath}/build", "OBJROOT=build", + "GCC_PREPROCESSOR_DEFINITIONS=${inherited} MVK_CONFIG_LOG_LEVEL=MVK_CONFIG_LOG_LEVEL_NONE", + "build" + + (libexec/"lib").install Dir["External/build/Release/" \ + "lib{SPIRVCross,SPIRVTools}.a"] + + (libexec/"include").install "External/SPIRV-Cross/include/spirv_cross" + (libexec/"include").install "External/SPIRV-Tools/include/spirv-tools" + (libexec/"include").install "External/Vulkan-Headers/include/vulkan" => "vulkan" + (libexec/"include").install "External/Vulkan-Headers/include/vk_video" => "vk_video" + + frameworks.install "Package/Release/MoltenVK/static/MoltenVK.xcframework" + lib.install "Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib" + lib.install "build/Release/libMoltenVK.a" + include.install "MoltenVK/MoltenVK/API" => "MoltenVK" + + bin.install "Package/Release/MoltenVKShaderConverter/Tools/MoltenVKShaderConverter" + frameworks.install "Package/Release/MoltenVKShaderConverter/" \ + "MoltenVKShaderConverter.xcframework" + include.install Dir["Package/Release/MoltenVKShaderConverter/include/" \ + "MoltenVKShaderConverter"] + + inreplace "MoltenVK/icd/MoltenVK_icd.json", + "./libMoltenVK.dylib", + (lib/"libMoltenVK.dylib").relative_path_from(prefix/"etc/vulkan/icd.d") + (prefix/"etc/vulkan").install "MoltenVK/icd" => "icd.d" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main(void) { + const char *extensionNames[] = { "VK_KHR_surface" }; + VkInstanceCreateInfo instanceCreateInfo = { + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, NULL, + 0, NULL, + 0, NULL, + 1, extensionNames, + }; + VkInstance inst; + vkCreateInstance(&instanceCreateInfo, NULL, &inst); + return 0; + } + CPP + system ENV.cc, "-o", "test", "test.cpp", "-I#{include}", "-I#{libexec/"include"}", "-L#{lib}", "-lMoltenVK" + system "./test" + end +end diff --git a/Formula/m/mon.rb b/Formula/m/mon.rb new file mode 100644 index 0000000000000..b6bdf7ebffb6a --- /dev/null +++ b/Formula/m/mon.rb @@ -0,0 +1,35 @@ +class Mon < Formula + desc "Monitor hosts/services/whatever and alert about problems" + homepage "https://github.com/tj/mon" + url "https://github.com/tj/mon/archive/refs/tags/1.2.3.tar.gz" + sha256 "978711a1d37ede3fc5a05c778a2365ee234b196a44b6c0c69078a6c459e686ac" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1113e36de927c4dfbb16bcb801d77fd6a1508104c9de9a5f885c768514fb1d3e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8be88943149d839ef8ffc37b1b81150f8c0325fc40a1878bd864df744fa96d67" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6e93600a34a633e6d90e5096c5e13e6df1080197f84ffcb1ad4fab2cafa9a04" + sha256 cellar: :any_skip_relocation, arm64_ventura: "51930349a969998d73df25075032c233871f445a9e7419f90419103c223110f5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3f814c697e985f27214f721e5205baa19e3673f94b905975f2cf65bf8e47bd07" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "65f144b16a687002f9d30ac665886aa8b06bb914e4ff0fe04e692a6a153eb76b" + sha256 cellar: :any_skip_relocation, sonoma: "72f500fe72c9afecadef4ea76245d879a72250264d2c4dc75a0a6e0923391615" + sha256 cellar: :any_skip_relocation, ventura: "44084ac7f259335761c5569cb0f59d00df44c39b5fea84d763140c364b3b9459" + sha256 cellar: :any_skip_relocation, monterey: "33b0a9658fe9c49984aeb76681165f01f586f25489b389db158bcbaac2a6ae2f" + sha256 cellar: :any_skip_relocation, big_sur: "6530e73e7a94297f2646a079361df7076cbc6a881b5baf227a703f1edd92cecc" + sha256 cellar: :any_skip_relocation, catalina: "becdcce9ec6a3ec5156cf27db02c50c26e99a9db9626c864abf9eb2f178ea57e" + sha256 cellar: :any_skip_relocation, arm64_linux: "00ecf73b33edac694c7a24207ead5f8604a20b0a97e681685d997d81080f19c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98cf650f601c5c437802ac8a979d24bdd8fe39cef4a3937f440109c91cadd69a" + end + + def install + bin.mkpath + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"mon", "-V" + end +end diff --git a/Formula/m/monero.rb b/Formula/m/monero.rb new file mode 100644 index 0000000000000..c94b0abf5c4ae --- /dev/null +++ b/Formula/m/monero.rb @@ -0,0 +1,59 @@ +class Monero < Formula + desc "Official Monero wallet and CPU miner" + homepage "https://www.getmonero.org/downloads/#cli" + url "https://downloads.getmonero.org/cli/monero-source-v0.18.4.3.tar.bz2" + sha256 "6ba5e082c8fa25216aba7aea8198f3e23d4b138df15c512457081e1eb3d03ff6" + license "BSD-3-Clause" + + livecheck do + url "https://downloads.getmonero.org/cli/source" + strategy :header_match + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a503ca2da58ac2cc9e8ee8b5094405c13cf66bffe19b01c708f24cbb9e517cd" + sha256 cellar: :any, arm64_sequoia: "c030d0c005c518e099c7550701b76b6ebdd32e91713f5ea11b9dfa8cdbe1dc97" + sha256 cellar: :any, arm64_sonoma: "0e34e02aefe0c4f89e7a130ffac64ef212eb99786825b97d47bf587488451659" + sha256 cellar: :any, sonoma: "404f91b2d016fe784c7c5ed76d4aef06e0bdc69bb2d799d2190a0337d25ca75c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3f4578ebc42cea23753fcee740b47600f36919e5307928929801c254910a84c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba360aba976bc4ea77bd9e9f849e9f79e3a8ddc6a9fb855b6405da4071df1087" + end + + head do + url "https://github.com/monero-project/monero.git", branch: "master" + + depends_on "libusb" # TODO: use on stable in 0.19 (?) + depends_on "protobuf" # TODO: use on stable in 0.19 (?) + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "hidapi" + depends_on "libsodium" + depends_on "openssl@3" + depends_on "readline" + depends_on "unbound" + depends_on "zeromq" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + service do + run [opt_bin/"monerod", "--non-interactive"] + end + + test do + cmd = "yes '' | #{bin}/monero-wallet-cli --restore-deterministic-wallet " \ + "--password brew-test --restore-height 1 --generate-new-wallet wallet " \ + "--electrum-seed 'baptism cousin whole exquisite bobsled fuselage left " \ + "scoop emerge puzzled diet reinvest basin feast nautical upon mullet " \ + "ponies sixteen refer enhanced maul aztec bemused basin'" \ + "--command address" + address = "4BDtRc8Ym9wGzx8vpkQQvpejxBNVpjEmVBebBPCT4XqvMxW3YaCALFraiQibejyMAxUXB5zqn4pVgHVm3JzhP2WzVAJDpHf" + assert_equal address, shell_output(cmd).lines.last.split[1] + end +end diff --git a/Formula/m/monetdb.rb b/Formula/m/monetdb.rb new file mode 100644 index 0000000000000..a7eb3caf54ae4 --- /dev/null +++ b/Formula/m/monetdb.rb @@ -0,0 +1,78 @@ +class Monetdb < Formula + desc "Column-store database" + homepage "https://www.monetdb.org/" + url "https://www.monetdb.org/downloads/sources/Mar2025-SP2/MonetDB-11.53.13.tar.xz" + sha256 "ed5093234689d7f0ed5a439bc904388f5b2bd12ad08308cedcbd5faca95e0325" + license "MPL-2.0" + head "https://www.monetdb.org/hg/MonetDB", using: :hg + + livecheck do + url "https://www.monetdb.org/downloads/sources/archive/" + regex(/href=.*?MonetDB[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4449d87247772a1fd6c2081a9a3b865ca0d8c085ca0af48d4faa21b73bc4f125" + sha256 arm64_sequoia: "7af914168935ca8b325c33eb58212594170a69761e5282be1fc7b5a700227830" + sha256 arm64_sonoma: "a2d8e290f5382a6d1f77b21e2311b1d0f25977dc2ae5780cc90deac84a35afd4" + sha256 arm64_ventura: "d2f0274260282b8604a2d776ba6922a53b203c3648a0a20106b9b140f8f0b4b7" + sha256 sonoma: "543284f5886cb213fa2b545d646f2128e728c43f662556ac29e0ccfbd4cb1f0f" + sha256 ventura: "2161d807f5dab1529fa17e7e5fdbf45a2498226f1f6905a8124c3f0ac317ab4b" + sha256 arm64_linux: "a82e58f44d85248b85139139daf636c16033665633987d30890088d4882e3828" + sha256 x86_64_linux: "c76634658aea72d40f17b6f08273bb2429d1db65c6dc3293926486230dbfb7bb" + end + + depends_on "bison" => :build # macOS bison is too old + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "lz4" + depends_on "openssl@3" + depends_on "pcre" + depends_on "readline" # Compilation fails with libedit + depends_on "xz" + + uses_from_macos "python" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DRELEASE_VERSION=ON", + "-DASSERT=OFF", + "-DSTRICT=OFF", + "-DTESTING=OFF", + "-DFITS=OFF", + "-DGEOM=OFF", + "-DNETCDF=OFF", + "-DODBC=OFF", + "-DPY3INTEGRATION=OFF", + "-DRINTEGRATION=OFF", + "-DSHP=OFF", + "-DWITH_BZ2=ON", + "-DWITH_CMOCKA=OFF", + "-DWITH_CURL=ON", + "-DWITH_LZ4=ON", + "-DWITH_LZMA=ON", + "-DWITH_OPENSSL=ON", + "-DWITH_PCRE=ON", + "-DWITH_PROJ=OFF", + "-DWITH_RTREE=OFF", + "-DWITH_SQLPARSE=OFF", + "-DWITH_VALGRIND=OFF", + "-DWITH_XML2=ON", + "-DWITH_ZLIB=ON", + *std_cmake_args + # remove reference to shims directory from compilation/linking info + inreplace "build/tools/mserver/monet_version.c", %r{"/[^ ]*/}, "\"" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # assert_match "Usage", shell_output("#{bin}/mclient --help 2>&1") + system bin/"monetdbd", "create", testpath/"dbfarm" + assert_path_exists testpath/"dbfarm" + end +end diff --git a/Formula/m/mongo-c-driver.rb b/Formula/m/mongo-c-driver.rb new file mode 100644 index 0000000000000..f6bf7b8a8a5be --- /dev/null +++ b/Formula/m/mongo-c-driver.rb @@ -0,0 +1,53 @@ +class MongoCDriver < Formula + desc "C driver for MongoDB" + homepage "https://github.com/mongodb/mongo-c-driver" + url "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/2.1.2.tar.gz" + sha256 "df1280403326611dd3d8277a93be2301fae481c68cc749bb746d7bea81417ee9" + license "Apache-2.0" + head "https://github.com/mongodb/mongo-c-driver.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3540bc4ef97a6e41214eaaea4b7365605b5107c387466bd566d5cd0caedfdfbb" + sha256 cellar: :any, arm64_sequoia: "88148e3d21d7c5f52e3542d40d68cee3d7fced83798219cc58db1c57acf15802" + sha256 cellar: :any, arm64_sonoma: "d3a96d3c935806374bdfa503e3ad76e6a522f7bb217eee94735ef08f215d3658" + sha256 cellar: :any, sonoma: "cde45f9942f638ee4dd5776dc9e170bf947d5b4f225aa9b725254112b9919880" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a72eeaca5e4664d62682f745056be87783b02e2f39f8aeca9d8f44f8079b67f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8ee224052b1dbb7ab98167d37bcc2cda3440e0db96e7f345eb9a4bfc7fd6b03" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + File.write "VERSION_CURRENT", version.to_s if build.stable? + inreplace "src/libmongoc/src/mongoc/mongoc-config.h.in", "@MONGOC_CC@", ENV.cc + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"libbson").install "src/libbson/examples" + (pkgshare/"libmongoc").install "src/libmongoc/examples" + end + + test do + system ENV.cc, "-o", "test", pkgshare/"libbson/examples/json-to-bson.c", + "-I#{include}/bson-#{version.major_minor_patch}", "-L#{lib}", "-lbson2" + (testpath/"test.json").write('{"name": "test"}') + assert_match "\u0000test\u0000", shell_output("./test test.json") + + system ENV.cc, "-o", "test", pkgshare/"libmongoc/examples/mongoc-ping.c", + "-I#{include}/mongoc-#{version.major_minor_patch}", "-I#{include}/bson-#{version.major_minor_patch}", + "-L#{lib}", "-lmongoc2", "-lbson2" + assert_match "No suitable servers", shell_output("./test mongodb://0.0.0.0 2>&1", 3) + end +end diff --git a/Formula/m/mongo-c-driver@1.rb b/Formula/m/mongo-c-driver@1.rb new file mode 100644 index 0000000000000..5ec9d2483484d --- /dev/null +++ b/Formula/m/mongo-c-driver@1.rb @@ -0,0 +1,56 @@ +class MongoCDriverAT1 < Formula + desc "C driver for MongoDB" + homepage "https://github.com/mongodb/mongo-c-driver" + url "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.30.6.tar.gz" + sha256 "49904f5757fc6fd3671e554b93602907505a34c80365f4dceda3b5da481f0770" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(1(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f8d80b35837d53c74e36c55ceabef1d2181aa578e84f9d09cc06af4fecf75f9a" + sha256 cellar: :any, arm64_sequoia: "ec209b833df2081a7b827b57439b553f48eec456ce5caddd3044af98a09052ec" + sha256 cellar: :any, arm64_sonoma: "976ae65d3b2ef97381678f5435e34327ce646ae5ba99cbb9791d0198b6e79cb6" + sha256 cellar: :any, sonoma: "2ae6577ddcf763700531ccc717c14178b11d2ff0131a5d62a144cd0cc5defbe6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c4ca65a252f47d29c0f18e8d0f9047c33d44e1e7d18594039700b2c8af841686" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc2847d983bf25ed028d429787b778216f3dd64da70b4e0d3e748797c9c44282" + end + + keg_only :versioned_formula + + deprecate! date: "2026-04-01", because: :unmaintained + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + File.write "VERSION_CURRENT", version.to_s + inreplace "src/libmongoc/src/mongoc/mongoc-config.h.in", "@MONGOC_CC@", ENV.cc + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"libbson").install "src/libbson/examples" + (pkgshare/"libmongoc").install "src/libmongoc/examples" + end + + test do + system ENV.cc, "-o", "test", pkgshare/"libbson/examples/json-to-bson.c", + "-I#{include}/libbson-1.0", "-L#{lib}", "-lbson-1.0" + (testpath/"test.json").write('{"name": "test"}') + assert_match "\u0000test\u0000", shell_output("./test test.json") + + system ENV.cc, "-o", "test", pkgshare/"libmongoc/examples/mongoc-ping.c", + "-I#{include}/libmongoc-1.0", "-I#{include}/libbson-1.0", + "-L#{lib}", "-lmongoc-1.0", "-lbson-1.0" + assert_match "No suitable servers", shell_output("./test mongodb://0.0.0.0 2>&1", 3) + end +end diff --git a/Formula/m/mongo-cxx-driver.rb b/Formula/m/mongo-cxx-driver.rb new file mode 100644 index 0000000000000..db6a6ec7342f2 --- /dev/null +++ b/Formula/m/mongo-cxx-driver.rb @@ -0,0 +1,57 @@ +class MongoCxxDriver < Formula + desc "C++ driver for MongoDB" + homepage "https://github.com/mongodb/mongo-cxx-driver" + url "https://github.com/mongodb/mongo-cxx-driver/releases/download/r4.1.4/mongo-cxx-driver-r4.1.4.tar.gz" + sha256 "c6edd29b7518cc123ae11a926c07f3c968a683190a2fcf5c7082f7dd7c908077" + license "Apache-2.0" + head "https://github.com/mongodb/mongo-cxx-driver.git", branch: "master" + + livecheck do + url :stable + regex(/^[rv]?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f889faef629d572c7aaa3681d63e64c99069b1cbbaf48c931c4ae4723c4e621b" + sha256 cellar: :any, arm64_sequoia: "482dea590c6f2f3bcb8d3221738cd80898102a7f395de64eeac53fc7ccf4e6d5" + sha256 cellar: :any, arm64_sonoma: "14326266c4231c1b740cb51a6d04fa59693560d6cd0ca62df9902b162170b0a4" + sha256 cellar: :any, sonoma: "255735fbec7bfb69f57596333bbee4563b04551034ed3357d57021cc5fefb368" + sha256 cellar: :any_skip_relocation, arm64_linux: "27362daa574fb6b2eceee044dc8854aca5881ed74503ed25ed9239b93056c02b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c09e9f0f6f29162b617c36265e8ba95f970d997a0f9510e8e914d77652cfa9b0" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "mongo-c-driver" + + def install + # We want to avoid shims referencing in examples, + # but we need to have examples/CMakeLists.txt file to make cmake happy + pkgshare.install "examples" + (buildpath / "examples/CMakeLists.txt").write "" + + mongo_c_prefix = Formula["mongo-c-driver"].opt_prefix + args = %W[ + -DBUILD_VERSION=#{version} + -DLIBBSON_DIR=#{mongo_c_prefix} + -DLIBMONGOC_DIR=#{mongo_c_prefix} + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + pkgconf_flags = shell_output("pkgconf --cflags --libs libbsoncxx").chomp.split + system ENV.cc, "-std=c++11", pkgshare/"examples/bsoncxx/builder_basic.cpp", + "-I#{pkgshare}", *pkgconf_flags, "-lstdc++", "-o", "test" + system "./test" + + pkgconf_flags = shell_output("pkgconf --cflags --libs libbsoncxx libmongocxx").chomp.split + system ENV.cc, "-std=c++11", pkgshare/"examples/mongocxx/connect.cpp", + "-I#{pkgshare}", *pkgconf_flags, "-lstdc++", "-o", "test" + assert_match "No suitable servers", shell_output("./test mongodb://0.0.0.0 2>&1", 1) + end +end diff --git a/Formula/m/mongo-orchestration.rb b/Formula/m/mongo-orchestration.rb new file mode 100644 index 0000000000000..ba739c57bf58b --- /dev/null +++ b/Formula/m/mongo-orchestration.rb @@ -0,0 +1,88 @@ +class MongoOrchestration < Formula + include Language::Python::Virtualenv + + desc "REST API to manage MongoDB configurations on a single host" + homepage "https://github.com/mongodb-labs/mongo-orchestration" + url "https://files.pythonhosted.org/packages/70/ff/16fc299ee7ee4a2f48fc9a6eefde91ab0817073437da39b9c1cda3e4045e/mongo_orchestration-0.11.1.tar.gz" + sha256 "53e70343ab6d3e2085a45f8c16d60244308d9e8964bd92ef38a21928cef68a52" + license "Apache-2.0" + head "https://github.com/mongodb-labs/mongo-orchestration.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c1d7954111921cd1c3d5732c609a2ab70eac6e367076168e6d06d3e0101f3e9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c93813a8acd72462b3dcf2ea08a979c8fefe07c02ed1b01d2e1c98535a5a7f49" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad88e0ec99ae46684172548f54c6f46a919988834290b0067471dcf867e3b934" + sha256 cellar: :any_skip_relocation, sonoma: "d4da7a11412b82a5464981c572faef97c0205b72731665522c419ed6f807031b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8e3203aeef12c19cb16206b7bf860617e0c8e0723bc37278e9964ee65da0a35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bcd6c74dd468e3764d2850e3d73a23ee343ef14cbc74260c6b7792a830576c0" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "bottle" do + url "https://files.pythonhosted.org/packages/7a/71/cca6167c06d00c81375fd668719df245864076d284f7cb46a694cbeb5454/bottle-0.13.4.tar.gz" + sha256 "787e78327e12b227938de02248333d788cfe45987edca735f8f88e03472c3f47" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cheroot" do + url "https://files.pythonhosted.org/packages/f4/01/5ef06df932a974d016ab9d7f93e78740b572c4020016794fd4799cdc09c6/cheroot-11.0.0.tar.gz" + sha256 "dd414eda6bdb15140e864bc1d1c9625030375d14cbe0b290092867368924a52f" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "pymongo" do + url "https://files.pythonhosted.org/packages/9d/7b/a709c85dc716eb85b69f71a4bb375cf1e72758a7e872103f27551243319c/pymongo-4.15.3.tar.gz" + sha256 "7a981271347623b5319932796690c2d301668ac3a1965974ac9f5c3b8a22cea5" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + service do + run [opt_bin/"mongo-orchestration", "-b", "127.0.0.1", "-p", "8889", "--no-fork", "start"] + require_root true + end + + test do + system bin/"mongo-orchestration", "-h" + end +end diff --git a/Formula/m/mongocli.rb b/Formula/m/mongocli.rb new file mode 100644 index 0000000000000..a84e7ef16f2f0 --- /dev/null +++ b/Formula/m/mongocli.rb @@ -0,0 +1,42 @@ +class Mongocli < Formula + desc "MongoDB CLI enables you to manage your MongoDB in the Cloud" + homepage "https://www.mongodb.com/docs/mongocli/current/" + url "https://github.com/mongodb/mongodb-cli/archive/refs/tags/mongocli/v2.0.6.tar.gz" + sha256 "f345dfa561e71eea9759ddf29ad5961c57d63f4b43c7535ba8a99ee48b849338" + license "Apache-2.0" + head "https://github.com/mongodb/mongodb-cli.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "df2157f55b136a6c6f150329be822cd6d0f560ca5a2ee52caea1d64417459658" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e445bc0a3fd26236eabc4b87c2dfdd255ec980f764ae5e7c131be20f46cba721" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "213f5d5a81d213da3f42c1831fad858f96f627fc47324a1ca8842335ab46f7f9" + sha256 cellar: :any_skip_relocation, sonoma: "a92abee340abedfb2c1ccd602141fe26db2c9d34afbbbcbd3b8b4c39519ed73f" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7f11b48587f16bf224539129ad8f4e403c577c23f3f0dff7f5a30d80b0e8348" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1fa1629c5015df5038e68c3f0a61f04648f29f5bc48b9e5804f8d7997161dc6" + end + + depends_on "go" => :build + + def install + with_env( + MCLI_VERSION: version.to_s, + MCLI_GIT_SHA: "homebrew-release", + ) do + system "make", "build" + end + bin.install "bin/mongocli" + + generate_completions_from_executable(bin/"mongocli", "completion") + end + + test do + assert_match "mongocli version: #{version}", shell_output("#{bin}/mongocli --version") + assert_match "Error: this action requires authentication", shell_output("#{bin}/mongocli iam projects ls 2>&1", 1) + assert_match "PROFILE NAME", shell_output("#{bin}/mongocli config ls") + end +end diff --git a/Formula/m/mongodb-atlas-cli.rb b/Formula/m/mongodb-atlas-cli.rb new file mode 100644 index 0000000000000..42eb3c90ed109 --- /dev/null +++ b/Formula/m/mongodb-atlas-cli.rb @@ -0,0 +1,43 @@ +class MongodbAtlasCli < Formula + desc "Atlas CLI enables you to manage your MongoDB Atlas" + homepage "https://www.mongodb.com/docs/atlas/cli/stable/" + url "https://github.com/mongodb/mongodb-atlas-cli/archive/refs/tags/atlascli/v1.50.0.tar.gz" + sha256 "1680d74e7123ac407d2fd2d7beef606943daba60dc9d63a45cbead704e9d40dd" + license "Apache-2.0" + head "https://github.com/mongodb/mongodb-atlas-cli.git", branch: "master" + + livecheck do + url :stable + regex(%r{^atlascli/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7e1100dcccaa84ed1a6b7fafd8b3b92b8ef774b47adfa12fe47939cd2a77dc88" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d8eb6175cc0d9634820456d07bafafdfd70fffe0bc5de5867e790db621c4300" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8bcd074e86741d66a0e9c26bff81f939a06fb1dab5d9019b89c94fb6ecc901c2" + sha256 cellar: :any_skip_relocation, sonoma: "b6a0fc2331ce08d155d51c1e8526c27fc5890e6d3c2cae4044ed808ac8de5641" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bc5b0f423f22526afc3a84e928b8d054ed83c63cb67f4bb4533d30af1f165b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af00d7cea46a6f4b13509e6ced1e689633696feea921510b256796771388f0e2" + end + + depends_on "go" => :build + depends_on "mongosh" + + conflicts_with "atlas", "nim", because: "both install `atlas` executable" + + def install + ENV["ATLAS_VERSION"] = version.to_s + ENV["MCLI_GIT_SHA"] = "homebrew-release" + + system "make", "build" + bin.install "bin/atlas" + + generate_completions_from_executable(bin/"atlas", "completion") + end + + test do + assert_match "atlascli version: #{version}", shell_output("#{bin}/atlas --version") + assert_match "Error: unauthorized", shell_output("#{bin}/atlas projects ls 2>&1", 1) + assert_match "PROFILE NAME", shell_output("#{bin}/atlas config ls") + end +end diff --git a/Formula/m/mongoose.rb b/Formula/m/mongoose.rb new file mode 100644 index 0000000000000..4092b21d424ba --- /dev/null +++ b/Formula/m/mongoose.rb @@ -0,0 +1,62 @@ +class Mongoose < Formula + desc "Web server build on top of Libmongoose embedded library" + homepage "https://mongoose.ws/" + url "https://github.com/cesanta/mongoose/archive/refs/tags/7.19.tar.gz" + sha256 "7ae38c9d673559d1d9c1bd72c0bdd4a98a2cae995e87cae98b4604d5951762b8" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "346018555ea9ef1ecc95dacc5dec337dbb4c0cad3502c275f8f3036fec3116c1" + sha256 cellar: :any, arm64_sequoia: "b6560ca28dce7662d81ff3996887775310a25a43f855d437e2ff2aac8127e7bf" + sha256 cellar: :any, arm64_sonoma: "04c4fa0e7342e96d3b75224f9f74b7571387c0cd6c4865e310611182317828d0" + sha256 cellar: :any, arm64_ventura: "695f0f8fc7e7700b8021340fbe7c49ade0c2178be7907a23477d7d13ccf58a1d" + sha256 cellar: :any, sonoma: "4a6c2ac51634fb5cbe5586af62bee3ca83ff836f61fd6f27cfc1bd54220c4cd7" + sha256 cellar: :any, ventura: "7840143349acd60f2a53cbdf6f9afff05aab257e87a97b2df16ae30970af900c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b08a81ef1304d6036bd901592ec69c61b21bd6edbf66a270843de71763c3cfd2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5db2b5b0eb82a5bc9735b19f56042b32e6754142a46718d96e920a9bdf93116" + end + + depends_on "openssl@3" + + def install + # No Makefile but is an expectation upstream of binary creation + # https://github.com/cesanta/mongoose/issues/326 + cd "tutorials/http/http-server" do + system "make", "mongoose_mac", "PROG=mongoose_mac" + bin.install "mongoose_mac" => "mongoose" + end + + system ENV.cc, "-dynamiclib", "mongoose.c", "-o", "libmongoose.dylib" if OS.mac? + if OS.linux? + system ENV.cc, "-fPIC", "-c", "mongoose.c" + system ENV.cc, "-shared", "-Wl,-soname,libmongoose.so", "-o", "libmongoose.so", "mongoose.o", "-lc", "-lpthread" + end + lib.install shared_library("libmongoose") + include.install "mongoose.h" + pkgshare.install "tutorials" + doc.install Dir["docs/*"] + end + + test do + (testpath/"hello.html").write <<~HTML + + + + Homebrew + + +

Hi!

+ + + HTML + + begin + pid = fork { exec bin/"mongoose" } + sleep 2 + assert_match "Hi!", shell_output("curl http://localhost:8000/hello.html") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/m/mongosh.rb b/Formula/m/mongosh.rb new file mode 100644 index 0000000000000..b2de04ac76305 --- /dev/null +++ b/Formula/m/mongosh.rb @@ -0,0 +1,31 @@ +class Mongosh < Formula + desc "MongoDB Shell to connect, configure, query, and work with your MongoDB database" + homepage "https://github.com/mongodb-js/mongosh" + url "https://registry.npmjs.org/@mongosh/cli-repl/-/cli-repl-2.5.9.tgz" + sha256 "b38f7e317d6d5dab782bd3b161b85d7474bb5540781615818f6f8f1b8c60a848" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "65137675136270a148046a30df8f6653c0fa1673d297125015fe046764119c20" + sha256 arm64_sequoia: "e4b3df3018e25b2df4fff13617c490d425f921235406941058a22d9d9bb20e58" + sha256 arm64_sonoma: "5b851ba4417c3836e903dd93d044e6e10e3514fda11018d1b4eed6e03d656bcc" + sha256 sonoma: "376e097936e91b2f66415291025f595420a05595166e2217cda6c0b63585db4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f219496da33bf5c25772cdd22359f6cf2c0fd8675714ab1bce2236b85f30f3a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcd1abda54c4bb7272da9330fbf1b8d5cb85b0a2aff6858406458a2c98898da9" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "ECONNREFUSED 0.0.0.0:1", shell_output("#{bin}/mongosh \"mongodb://0.0.0.0:1\" 2>&1", 1) + assert_match "#ok#", shell_output("#{bin}/mongosh --nodb --eval \"print('#ok#')\"") + assert_match "all tests passed", shell_output("#{bin}/mongosh --smokeTests 2>&1") + end +end diff --git a/Formula/m/mongrel2.rb b/Formula/m/mongrel2.rb new file mode 100644 index 0000000000000..d33d64f529398 --- /dev/null +++ b/Formula/m/mongrel2.rb @@ -0,0 +1,61 @@ +class Mongrel2 < Formula + desc "Application, language, and network architecture agnostic web server" + homepage "https://mongrel2.org/" + url "https://github.com/mongrel2/mongrel2/releases/download/v1.13.0/mongrel2-v1.13.0.tar.bz2" + sha256 "b6f1f50c9f65b605342d8792b1cc8a1c151105339030313b9825b6a68d400c10" + license "BSD-3-Clause" + head "https://github.com/mongrel2/mongrel2.git", branch: "master" + + bottle do + sha256 cellar: :any, sonoma: "d36d8722ad689bc1c66e6a4f8844b2eb99b8b079f6cae331d2db9faa091f87c0" + sha256 cellar: :any, ventura: "a5a0d1aa9eee2249e6c1757434fab0e13da8d64d8c698ac9c7807fc390a10e25" + sha256 cellar: :any, monterey: "5bbd0bb3f0ff9147810b45a7a9c55e1c1b7cab73e3f5ba7f03a77b9c385bc4bd" + sha256 cellar: :any, big_sur: "560c6b6dc8cd05ee5feefe62e3f87c740be212a8a7e4ddda290549448650f395" + sha256 cellar: :any, catalina: "b7e0d3b8495e1eccf5acfe73981aa84fe0245b1c7d9f7a2db6cee6b64dcd4b76" + sha256 cellar: :any_skip_relocation, arm64_linux: "607b1753fe345dac5076c15097358c082795cf06df6294e49b72591169c07f28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d117a88b346fc34a3a279f08abd2707876d73aa6cd2e6a46eb085c67f440ea32" + end + + # https://github.com/mongrel2/mongrel2/issues/345 + deprecate! date: "2024-09-29", because: :unmaintained + disable! date: "2025-09-29", because: :unmaintained + + depends_on "zeromq" + + uses_from_macos "sqlite" + + on_macos do + # https://github.com/mongrel2/mongrel2/issues/345#issuecomment-998972199 + depends_on arch: :x86_64 + end + + # Fix src/server.c:185:23: error: #elif with no expression + # PR ref: https://github.com/mongrel2/mongrel2/pull/358 + patch do + url "https://github.com/mongrel2/mongrel2/commit/d6c38361cb31a3de8ddfc3e8a3971330a40eb241.patch?full_index=1" + sha256 "52afa21830d5e3992136c113c5a54ad55cccc07f763ab7532f7ba122140b3e6b" + end + + def install + # Build in serial. See: + # https://github.com/Homebrew/homebrew/issues/8719 + ENV.deparallelize + + # Mongrel2 pulls from these ENV vars instead + ENV["OPTFLAGS"] = "#{ENV.cflags} #{ENV.cppflags}" + ENV["OPTLIBS"] = ENV.ldflags + if OS.mac? + ENV.append "OPTFLAGS", "-DHAS_ARC4RANDOM" + ENV.append "OPTLIBS", "-undefined dynamic_lookup" + end + + # The Makefile now uses system mbedtls, but `make` fails during filter_tests. + # As workaround, use previous localmbedtls.mak that builds with bundled mbedtls. + # Issue ref: https://github.com/mongrel2/mongrel2/issues/342 + system "make", "-f", "localmbedtls.mak", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"m2sh", "help" + end +end diff --git a/Formula/m/monika.rb b/Formula/m/monika.rb new file mode 100644 index 0000000000000..54b7d3ff52491 --- /dev/null +++ b/Formula/m/monika.rb @@ -0,0 +1,67 @@ +class Monika < Formula + desc "Synthetic monitoring made easy" + homepage "https://monika.hyperjump.tech" + url "https://registry.npmjs.org/@hyperjumptech/monika/-/monika-1.22.0.tgz" + sha256 "2b2ed6ac3186d72a9f060efb62d183c4b156494b2c37de9808c108f54655b84c" + license "MIT" + revision 2 + + bottle do + sha256 arm64_tahoe: "7666c9d8ccb5caf33268ea57d5bc2bdfbf2ba02d535efcf8ea12cfcdf5f9c96d" + sha256 arm64_sequoia: "2accf99bc8d99d1d99fd923906461946b1840fbdeecf7263c1155e41ecd4fc87" + sha256 arm64_sonoma: "23df655b1021663e0bc6184514c6f509ec1a492b5d8766f9d9b09b09375c9d35" + sha256 sonoma: "fd2f4b9bf912a309be3a54757296966146450636de52de8426f4ca376dbd9a2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "26485a9c9e463158a569f093f03eec4a3a2c614044ca23f736928f167e4184df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98229abf3b9246bf3478688d12018043004695ce89588260ddea3346b4f207fd" + end + + depends_on "node@24" + + on_linux do + # Workaround for old `node-gyp` that needs distutils. + # TODO: Remove when `node-gyp` is v10+ + depends_on "python-setuptools" => :build + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/@hyperjumptech/monika/node_modules" + node_modules.glob("nice-napi/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + + cpu_profiler = "@sentry/profiling-node/lib/sentry_cpu_profiler" + node_modules.glob("#{cpu_profiler}-*") + .each { |file| rm(file) unless file.basename.to_s.start_with?("sentry_cpu_profiler-#{os}-#{arch}") } + node_modules.glob("#{cpu_profiler}-*-musl-*").map(&:unlink) if OS.linux? + end + + test do + (testpath/"config.yml").write <<~YAML + notifications: + - id: 5b3052ed-4d92-4f5d-a949-072b3ebb2497 + type: desktop + probes: + - id: 696a3f57-a674-44b5-8125-a62bd2709ac5 + name: 'test brew.sh' + requests: + - url: https://brew.sh + body: {} + timeout: 10000 + YAML + + monika_stdout = (testpath/"monika.log") + fork do + $stdout.reopen(monika_stdout) + exec bin/"monika", "-r", "1", "-c", testpath/"config.yml" + end + sleep 15 + sleep 15 if OS.mac? && Hardware::CPU.intel? + + assert_match "Starting Monika. Probes: 1. Notifications: 1", monika_stdout.read + end +end diff --git a/Formula/m/monit.rb b/Formula/m/monit.rb new file mode 100644 index 0000000000000..11a3b94280a51 --- /dev/null +++ b/Formula/m/monit.rb @@ -0,0 +1,50 @@ +class Monit < Formula + desc "Manage and monitor processes, files, directories, and devices" + homepage "https://mmonit.com/monit/" + url "https://mmonit.com/monit/dist/monit-5.35.2.tar.gz" + sha256 "4dfef54329e63d9772a9e1c36ac99bc41173b79963dc0d8235f2c32f4b9e078f" + license "AGPL-3.0-or-later" + + livecheck do + url "https://mmonit.com/monit/dist/" + regex(/href=.*?monit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "23d94b8e82a4021c0cb4a192ddc4b47f7a1dd8c96551334086ec69d90b56a1f0" + sha256 cellar: :any, arm64_sequoia: "5f8ae5d9b7905575c6a521cd10ec05c2b8c44c83ca7525a045404196a1b6d0b6" + sha256 cellar: :any, arm64_sonoma: "fc482b423f6a54a5fd3d654ec2047d6f57390fc54778317021ab1ec319a72f5c" + sha256 cellar: :any, arm64_ventura: "725215581b9ee73ed26819ae29282310bbc1d737285325c54af1bd3523af6837" + sha256 cellar: :any, sonoma: "0330014e721c9cbff3b5f610bf9b328fe23c5788ccab3a728d89ac9dad79eb52" + sha256 cellar: :any, ventura: "c18bf4f5bf096b868c6b5016c50e065870305a9477bab6bd3c7635790de7c61a" + sha256 cellar: :any_skip_relocation, arm64_linux: "785a1c67205c69e345698ba258e55247e3b5c147a0910d02ab27fe3638c00630" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24a6151e67eca2312abdba53b643dd791ef72ad31e9c376190e96aef37f1e8c6" + end + + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + end + + def install + system "./configure", "--prefix=#{prefix}", + "--localstatedir=#{var}/monit", + "--sysconfdir=#{etc}/monit", + "--with-ssl-dir=#{Formula["openssl@3"].opt_prefix}" + system "make" + system "make", "install" + etc.install "monitrc" + end + + service do + run [opt_bin/"monit", "-I", "-c", etc/"monitrc"] + end + + test do + system bin/"monit", "-c", "#{etc}/monitrc", "-t" + end +end diff --git a/Formula/m/monitoring-plugins.rb b/Formula/m/monitoring-plugins.rb new file mode 100644 index 0000000000000..0e0439956a493 --- /dev/null +++ b/Formula/m/monitoring-plugins.rb @@ -0,0 +1,63 @@ +class MonitoringPlugins < Formula + desc "Plugins for nagios compatible monitoring systems" + homepage "https://www.monitoring-plugins.org" + url "https://www.monitoring-plugins.org/download/monitoring-plugins-2.4.0.tar.gz" + sha256 "e5dfd4ad8fde0a40da50aab3aff6d9a27020b8f283e332bc4da6ef9914f4028c" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.monitoring-plugins.org/download.html" + regex(/href=.*?monitoring-plugins[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e611a641792258e275bfcf3d98669753a3740e5815ccfb6c7e0ef1cc104a13f4" + sha256 cellar: :any, arm64_sequoia: "3e652bea8db767df61aa87f55194af9a9a181272681ddf7300ee4a8d5dde3468" + sha256 cellar: :any, arm64_sonoma: "f8eee9b8e4b8300633bd73e365aa6e2daffcca7a58962ef7f20064b1bb378e12" + sha256 cellar: :any, arm64_ventura: "0a6a841f7d31c47c25418a08bcbe3622e95ec5a9cdc31aef8f95c7630c64f3fd" + sha256 cellar: :any, arm64_monterey: "a5d15e7a30db8d11d30973cd12985e6fb62f95fa74c73696d960912f52492e40" + sha256 cellar: :any, sonoma: "8e139e077e10f664e33c4dafa4bc404d6bf47bcf1e82bfa5c1a8daa481a85af3" + sha256 cellar: :any, ventura: "3407ba5eda8acc2806ab7eec27af3f339852b857cf935954fca1c7ab38c75bf0" + sha256 cellar: :any, monterey: "6879fa228c284f01e3688078e66b7a0374012e37147183cfa08c5d9ff1b0e47e" + sha256 arm64_linux: "2caa7d52925b286737f83a15a800de15edbbc4d280756b9ab268cd4e810b42ba" + sha256 x86_64_linux: "27b58371aa6e210a9510c9fd0b64ed2f0923425b336eeda2b5c9eb0fd08509ac" + end + + depends_on "openssl@3" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "bind" + end + + conflicts_with "nagios-plugins", because: "both install their plugins to the same folder" + + def install + # workaround for Xcode 14.3 + ENV.append "CFLAGS", "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + args = %W[ + --libexecdir=#{libexec}/sbin + --with-openssl=#{Formula["openssl@3"].opt_prefix} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + sbin.write_exec_script Dir["#{libexec}/sbin/*"] + end + + def caveats + <<~EOS + All plugins have been installed in: + #{HOMEBREW_PREFIX}/sbin + EOS + end + + test do + output = shell_output("#{sbin}/check_dns -H brew.sh -s 8.8.8.8 -t 3") + assert_match "DNS OK", output + end +end diff --git a/Formula/m/monkeysphere.rb b/Formula/m/monkeysphere.rb new file mode 100644 index 0000000000000..a3f8e30bb7b54 --- /dev/null +++ b/Formula/m/monkeysphere.rb @@ -0,0 +1,86 @@ +class Monkeysphere < Formula + desc "Use the OpenPGP web of trust to verify ssh connections" + homepage "https://tracker.debian.org/pkg/monkeysphere" + url "https://deb.debian.org/debian/pool/main/m/monkeysphere/monkeysphere_0.44.orig.tar.gz" + sha256 "6ac6979fa1a4a0332cbea39e408b9f981452d092ff2b14ed3549be94918707aa" + license "GPL-3.0-or-later" + revision 9 + + livecheck do + url "https://deb.debian.org/debian/pool/main/m/monkeysphere/" + regex(/href=.*?monkeysphere.?v?(\d+(?:\.\d+)+)(?:\.orig)?\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c9e8dcdb90ed4f9787eeac0331f5fa3e46bed605cff5b34530d24653c7e17420" + sha256 cellar: :any, arm64_sequoia: "40d8c3289f12c710d030f446886eb4e45c396e4b1517dbc722a6e639cd113193" + sha256 cellar: :any, arm64_sonoma: "898254e686c3406c0af79584f182a97fd0796a66f755055c3c59745850ee6bde" + sha256 cellar: :any, arm64_ventura: "e04ebbbfc60f349cebc2a8574367934080b0c52c61e6ed1d988b5965b4a2650e" + sha256 cellar: :any, sonoma: "855d71f1d6e31d991fa30df070c136fcaa99457573f16ac6e05defae3e3ac7d3" + sha256 cellar: :any, ventura: "ac5c54b17c62e126b1f10c18918fd2a66e8bff38a0a51379e7ddac0890fa9997" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e7683b31a0dafac66f8ccb8947c440af2225b6340a9934b0fb7e1d897001ea9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21398c0664f91eddb4e26a9b1f00cdc17e3462647651c04ada0eaa76a93d0b19" + end + + depends_on "gnu-sed" => :build + depends_on "pkgconf" => :build + depends_on "gnupg" + depends_on "libassuan" + depends_on "libgcrypt" + depends_on "libgpg-error" + depends_on "openssl@3" + + uses_from_macos "perl" + + resource "Crypt::OpenSSL::Guess" do + on_linux do + url "https://cpan.metacpan.org/authors/id/A/AK/AKIYM/Crypt-OpenSSL-Guess-0.15.tar.gz" + sha256 "1c5033381819fdb4c9087dd291b90ec70e7810d31d57eade9b388eccfd70386d" + end + end + + resource "Crypt::OpenSSL::Bignum" do + url "https://cpan.metacpan.org/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-0.09.tar.gz" + sha256 "234e72fb8396d45527e6fd45e43759c5c3f3a208cf8f29e6a22161a996fd42dc" + end + + resource "Crypt::OpenSSL::RSA" do + url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/Crypt-OpenSSL-RSA-0.33.tar.gz" + sha256 "bdbe630f6d6f540325746ad99977272ac8664ff81bd19f0adaba6d6f45efd864" + end + + def install + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + res = if OS.mac? && MacOS.version <= :catalina + [resource("Crypt::OpenSSL::Bignum")] + else + resources + end + + res.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + ENV["PREFIX"] = prefix + ENV["ETCPREFIX"] = prefix + system "make", "install" + + # This software expects to be installed in a very specific, unusual way. + # Consequently, this is a bit of a naughty hack but the least worst option. + inreplace pkgshare/"keytrans", "#!/usr/bin/perl -T", + "#!/usr/bin/perl -T -I#{libexec}/lib/perl5" + end + + test do + assert_match version.to_s, shell_output("#{bin}/monkeysphere v") + # This just checks it finds the vendored Perl resource. + assert_match "We need at least", pipe_output("#{bin}/openpgp2pem --help 2>&1") + end +end diff --git a/Formula/m/mono-libgdiplus.rb b/Formula/m/mono-libgdiplus.rb new file mode 100644 index 0000000000000..0595a7e255e02 --- /dev/null +++ b/Formula/m/mono-libgdiplus.rb @@ -0,0 +1,66 @@ +class MonoLibgdiplus < Formula + desc "GDI+-compatible API on non-Windows operating systems" + homepage "https://www.mono-project.com/docs/gui/libgdiplus/" + url "https://dl.winehq.org/mono/sources/libgdiplus/libgdiplus-6.2.tar.gz" + sha256 "683adb7d99d03f6ee7985173a206a2243f76632682334ced4cae2fcd20c83bc9" + license "MIT" + + livecheck do + url "https://gitlab.winehq.org/api/v4/projects/1906/releases" + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :json do |json, regex| + json.map { |item| item["tag_name"]&.[](regex, 1) } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d6660ea5c589c9a33ad3ac95463935c5374e524e7bb8b924a4ea5e5c257085f4" + sha256 cellar: :any, arm64_sequoia: "98055b3665fb3bb6d5af85a6e7e16f1a5be9f2fe201b6d1ef72a5bfa49e5d07c" + sha256 cellar: :any, arm64_sonoma: "9332827231368d618a2147d91cc8996215200bb70dcb58129fdac2544e7e8351" + sha256 cellar: :any, arm64_ventura: "fb92a8c1f346c8e8838bfad994b109e0a9c76ae1f96793f9f463847065d32575" + sha256 cellar: :any, sonoma: "c0e21d48bd5a014b7e9517fc1773bde665297d0a8e114672b0e9556dd0427df2" + sha256 cellar: :any, ventura: "cac30e4240d9663ff31ed55835d30408ce2d19cb6606f3c285e2e943d578a777" + sha256 cellar: :any_skip_relocation, arm64_linux: "70171e88a695d0f1e427c54027595d2bbfd0d188b5b33f9b490bd968fbdc93ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1e81d0121eb441eedf7ba8369a49c26970bb16f461f97d54753c68a08edc54e" + end + + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "fontconfig" + depends_on "giflib" + depends_on "glib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libexif" + depends_on "libpng" + depends_on "libtiff" + depends_on "pango" + + on_macos do + depends_on "freetype" + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", + "--without-x11", + *std_configure_args + system "make" + system "./tests/testbits" + system "make", "install" + end + + test do + # Since no headers are installed, we just test that we can link with + # libgdiplus + (testpath/"test.c").write <<~C + int main() { + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lgdiplus", "-o", "test" + end +end diff --git a/Formula/m/mono.rb b/Formula/m/mono.rb new file mode 100644 index 0000000000000..4eac2244343f7 --- /dev/null +++ b/Formula/m/mono.rb @@ -0,0 +1,119 @@ +class Mono < Formula + desc "Cross platform, open source .NET development framework" + homepage "https://www.mono-project.com/" + url "https://dl.winehq.org/mono/sources/mono/mono-6.14.1.tar.xz" + sha256 "3024c97c0bc8cbcd611c401d5f994528704108ceb31f31b28dea4783004d0820" + license "Apache-2.0" + head "https://gitlab.winehq.org/mono/mono.git", branch: "main" + + livecheck do + url :head + regex(/^mono[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "20022e3bf3f9e4b1bcad7a4f4903565049164a9c2691e6b2585af777c50ea7d6" + sha256 arm64_sequoia: "409206a1822a5d6cf3646c8f0f5b8fe94c7f41558d80383da49eb3346d2f6472" + sha256 arm64_sonoma: "6ef5f47269cf14ad82b94fb8cef2a679ff2bb990a8f74b42e407b5af8beec387" + sha256 sonoma: "d48e2373e32762b53a03da1ce174f40de2a88e0e0027e85484bd7123c2558e2d" + sha256 arm64_linux: "44fbfa33608470d00c50a4e1a7b27dd4d4c38a030fb3b2a6b9a7c117cdd259e7" + sha256 x86_64_linux: "f261ecc67558b51d217ca044e51699a739780bfeab4563502f34bbbf7be7fa62" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "python@3.14" + + uses_from_macos "unzip" => :build + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + if DevelopmentTools.clang_build_version >= 1600 + depends_on "llvm" => :build + + fails_with :clang do + cause <<~EOS + Got a segv while executing native code. This usually indicates + a fatal error in the mono runtime or one of the native libraries + used by your application. + EOS + end + end + end + + on_linux do + depends_on "ca-certificates" + end + + conflicts_with "xsd", because: "both install `xsd` binaries" + conflicts_with cask: "mono-mdk" + conflicts_with cask: "mono-mdk-for-visual-studio" + conflicts_with "chicken", because: "both install `csc`, `csi` binaries" + conflicts_with "pedump", because: "both install `pedump` binaries" + + # xbuild requires the .exe files inside the runtime directories to + # be executable + skip_clean "lib/mono" + + link_overwrite "lib/mono" + link_overwrite "lib/cli" + + def install + ENV.llvm_clang if DevelopmentTools.clang_build_version >= 1600 + + # Replace hardcoded /usr/share directory. Paths like /usr/share/.mono, + # /usr/share/.isolatedstorage, and /usr/share/template are referenced in code. + inreplace_files = %w[ + external/corefx/src/System.Runtime.Extensions/src/System/Environment.Unix.cs + mcs/class/corlib/System/Environment.cs + mcs/class/corlib/System/Environment.iOS.cs + man/mono-configuration-crypto.1 + man/mono.1 + man/mozroots.1 + ] + inreplace inreplace_files, %r{/usr/share(?=[/"])}, pkgshare + + system "./autogen.sh", "--disable-nls", + "--disable-silent-rules", + *std_configure_args + system "make" + system "make", "install" + # mono-gdb.py and mono-sgen-gdb.py are meant to be loaded by gdb, not to be + # run directly, so we move them out of bin + libexec.install bin/"mono-gdb.py", bin/"mono-sgen-gdb.py" + end + + def post_install + system bin/"cert-sync", Formula["ca-certificates"].pkgetc/"cert.pem" if OS.linux? + end + + def caveats + <<~EOS + To use the assemblies from other formulae you need to set: + export MONO_GAC_PREFIX="#{HOMEBREW_PREFIX}" + EOS + end + + test do + test_str = "Hello Homebrew" + test_name = "hello.cs" + (testpath/test_name).write <<~CSHARP + public class Hello1 + { + public static void Main() + { + System.Console.WriteLine("#{test_str}"); + } + } + CSHARP + shell_output("#{bin}/mcs #{test_name}") + output = shell_output("#{bin}/mono hello.exe") + assert_match test_str, output.strip + end +end diff --git a/Formula/m/monocle.rb b/Formula/m/monocle.rb new file mode 100644 index 0000000000000..73ccae0ac1d78 --- /dev/null +++ b/Formula/m/monocle.rb @@ -0,0 +1,31 @@ +class Monocle < Formula + desc "See through all BGP data with a monocle" + homepage "https://github.com/bgpkit/monocle" + url "https://github.com/bgpkit/monocle/archive/refs/tags/v0.9.0.tar.gz" + sha256 "38c5f3a61efa6e3e6f2556ea6220c171ffabd691852258cb3efd02337d7e5a84" + license "MIT" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "835cb825d68e5cf4522eb49b0090263320ecb7fef08214f480496738cc93fe19" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6a3b61de6173f309492d7e8c1432ac141421052b93b130eeed59345f5b6798d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3bbbbde644fc571b0c5adfe3c02641941630e45d21d9e1d69089e5fc61ac07bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "26db3de8347b2926ce0e21c3537d9f40504fd81af19328579fc8dd38ec92b981" + sha256 cellar: :any_skip_relocation, sonoma: "f0a0b1432131aacff619c19775e8c87539e214d4ec4dceb412660dbee70067f9" + sha256 cellar: :any_skip_relocation, ventura: "1e7506b879634bbb0dfd59aca7911de9313d5298b753e0846a3b4df897fc5de4" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fbf69ca104b15e2ed37db430e6901439c20240bf9cc6d2cf327642d7d139373" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74f5717f9aa07b1153c884d5caf5c36f04ee09baea2ed60313c6a6b96421f210" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/monocle time 1735322400 --simple") + assert_match "2024-12-27T18:00:00+00:00", output + end +end diff --git a/Formula/m/monolith.rb b/Formula/m/monolith.rb new file mode 100644 index 0000000000000..7536c7d7de488 --- /dev/null +++ b/Formula/m/monolith.rb @@ -0,0 +1,33 @@ +class Monolith < Formula + desc "CLI tool for saving complete web pages as a single HTML file" + homepage "https://github.com/Y2Z/monolith" + url "https://github.com/Y2Z/monolith/archive/refs/tags/v2.10.1.tar.gz" + sha256 "1afafc94ba693597f591206938e998fcf2c78fd6695e7dfd8c19e91061f7b44a" + license "CC0-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d1266667cffd60fc5ce4ba4e8c08ae6b776f4bd58be50b920c51f658dd4c42a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92826aa3a7f4ca6eac24d7c1b1aee3fd75b3502338cf8c284c99613364d373e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44f84b6ccacd950b953340af3a7b46d743626fb44eac00ea27eee1fc1a87afa6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "628d8282e77e55dddf76981418a0f92d6aa96cd01ee7adf0b2874eb8288d7f8f" + sha256 cellar: :any_skip_relocation, sonoma: "81364ea28028bc6a147edbd0c0613db6baef11078f14555330e438a0e2159e5d" + sha256 cellar: :any_skip_relocation, ventura: "e2168d625c8330f2462e1f8c6da8c97db0aa2e42443c6045b194fdd9b885722e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e2915bebfb7b5a0a116d1922987969e9be94236917e54c7389a5ee964a20198f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66d1a5ae8947717fad4f322fa95c6fe603ea543a07a8188eaab279cf0ea01a56" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"monolith", "https://lyrics.github.io/db/P/Portishead/Dummy/Roads/" + end +end diff --git a/Formula/m/montage.rb b/Formula/m/montage.rb new file mode 100644 index 0000000000000..bd557d39a5c81 --- /dev/null +++ b/Formula/m/montage.rb @@ -0,0 +1,72 @@ +class Montage < Formula + desc "Toolkit for assembling FITS images into custom mosaics" + homepage "http://montage.ipac.caltech.edu" + url "http://montage.ipac.caltech.edu/download/Montage_v6.0.tar.gz" + sha256 "1f540a7389d30fcf9f8cd9897617cc68b19350fbcde97c4d1cdc5634de1992c6" + license "BSD-3-Clause" + revision 1 + head "https://github.com/Caltech-IPAC/Montage.git", branch: "main" + + livecheck do + url "http://montage.ipac.caltech.edu/docs/download2.html" + regex(/href=.*?Montage[._-]v?(\d+(?:\.\d+)+)\.t.*?/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "58eb821dc6f0b9c1a85b8e5664f11465d87e00d719943644bdf303d25c7de909" + sha256 cellar: :any, arm64_sequoia: "b1d5f7c20f35e617f62197124a7c5c7e43bd4fc6272cf642346f6311d1da41b3" + sha256 cellar: :any, arm64_sonoma: "322fc326957e3d7173087350a50a5e5c034223fe631e5e2d45556a4e3eb2a85b" + sha256 cellar: :any, arm64_ventura: "64bead5a3b77bd80dd4cdb5980ac40b4f140246a8dd77ffc91cc476e1d5201e0" + sha256 cellar: :any, arm64_monterey: "979157185163a1e4af7de11b882687e34e86b5e8a185c046c8e468da8a7765f6" + sha256 cellar: :any, arm64_big_sur: "f9fb8238d49754d19175b69133cab7ac5d4a28d76cf0823894956eb9dcddc738" + sha256 cellar: :any, sonoma: "566ab3bb6bd1d8ff09fe02089a9e78540900e70a8780b777ffc60f3bbcb9db5f" + sha256 cellar: :any, ventura: "f6bc30d29752622bd772486c04d6feedf51a28bcf599571cf4b9336a21249900" + sha256 cellar: :any, monterey: "98c1ea6725fe61b926cb5ae148b6fec4dac9c3f2a05d2573395bfbe1ca3f3ef6" + sha256 cellar: :any, big_sur: "c0dae6deab1f09e34a1ba4dcebf923f697662a0b4a0f12b778cbc4eda7191d00" + sha256 cellar: :any_skip_relocation, arm64_linux: "f658ee7ea45df4f4fa1e9732f2bec751263cdee25cca0da5414a35faef16f543" + sha256 cellar: :any_skip_relocation, x86_64_linux: "896bd4dc1695ea76be99acadcf5216ceafbbc70636738bdf349e8b14b6aea7d0" + end + + depends_on "cfitsio" + depends_on "freetype" + depends_on "jpeg-turbo" + + uses_from_macos "bzip2" + + conflicts_with "wdiff", because: "both install an `mdiff` executable" + + def install + # Work around multiple definition of `fstatus'. Remove in the next release. + # Ref: https://github.com/Caltech-IPAC/Montage/commit/f5358e2152f301ecc44dd2d7fb33ee5daecc39f5 + makefiles = %w[lib/src/coord/Makefile Montage/Makefile.LINUX] + inreplace makefiles, /^CC\s*=.*$/, "\\0 -fcommon" if OS.linux? && build.stable? + + # Avoid building bundled libraries + libs = %w[bzip2 cfitsio freetype jpeg] + rm_r buildpath.glob("lib/src/{#{libs.join(",")}}*") + inreplace "lib/src/Makefile", /^[ \t]*\(cd (?:#{libs.join("|")}).*\)$/, "" + inreplace "MontageLib/Makefile", %r{^.*/lib/src/(?:#{libs.join("|")}).*$\n}, "" + inreplace "MontageLib/Viewer/Makefile.#{OS.kernel_name.upcase}", + "-I../../lib/freetype/include/freetype2", + "-I#{Formula["freetype"].opt_include}/freetype2" + + ENV.deparallelize # Build requires targets to be built in specific order + system "make" + bin.install Dir["bin/m*"] + end + + def caveats + <<~EOS + Montage is under the Caltech/JPL non-exclusive, non-commercial software + licence agreement available at: + http://montage.ipac.caltech.edu/docs/download.html + EOS + end + + test do + system bin/"mHdr", "m31", "1", "template.hdr" + end +end diff --git a/Formula/m/moodle-dl.rb b/Formula/m/moodle-dl.rb new file mode 100644 index 0000000000000..15ed0822d59b6 --- /dev/null +++ b/Formula/m/moodle-dl.rb @@ -0,0 +1,173 @@ +class MoodleDl < Formula + include Language::Python::Virtualenv + + desc "Downloads course content fast from Moodle (e.g., lecture PDFs)" + homepage "https://github.com/C0D3D3V/Moodle-DL" + url "https://files.pythonhosted.org/packages/0b/44/9c283a04b0ede0bcaa2f3595b523cb115c662fe349f215631484035126d1/moodle_dl-2.3.13.tar.gz" + sha256 "7a6d813b3241497fb79a34a428aa266b2d2d3c175e05d46752e0a8040adaddce" + license "GPL-3.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7c1eb9f9e8d542fdd898f72aaf90e4800ba01b5ff21da9323328e3fbcbbd910" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "594c23a3d9fa7f2038febc21c1ccba64767f42287a7815b79e6a0f5353d29ca8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "975decc7a4caffe571c4e0dc9cf0b61b560bf8bb9333ae933a31b2eef6c37773" + sha256 cellar: :any_skip_relocation, sonoma: "814b04138cba8bfe714e8bb5ad5134437888ef9818e1a28e5972a299cbb7dbaf" + sha256 cellar: :any_skip_relocation, arm64_linux: "3648132d82cb041b6f521fc4f5d172d1841f4381ba0689a2eebdd60b564a0977" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68f27391724bf25debf4368a8fbdab085e0bfd24b11be28099b68d3348986330" + end + + depends_on "certifi" => :no_linkage + depends_on "ffmpeg" + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: "certifi" + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/17/0a/163e5260cecc12de6abc259d158d9da3b8ec062ab863107dcdb1166cdcef/aiodns-3.5.0.tar.gz" + sha256 "11264edbab51896ecf546c18eb0dd56dff0428c6aa6d2cd87e643e07300eb310" + end + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz" + sha256 "a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/ba/fa/3ae643cd525cf6844d3dc810481e5748107368eb49563c15a5fb9f680750/aiohttp-3.13.1.tar.gz" + sha256 "4b7ee9c355015813a6aa085170b96ec22315dabc3d866fd77d147927000e9464" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/a2/61/f083b5ac52e505dfc1c624eafbf8c7589a0d7f32daa398d2e7590efa5fda/colorlog-6.10.1.tar.gz" + sha256 "eb4ae5cb65fe7fec7773c2306061a8e63e02efc2c72eba9d27b0fa23c94f1321" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "html2text" do + url "https://files.pythonhosted.org/packages/f8/27/e158d86ba1e82967cc2f790b0cb02030d4a8bef58e0c79a8590e9678107f/html2text-2025.4.15.tar.gz" + sha256 "948a645f8f0bc3abe7fd587019a2197a12436cd73d0d4908af95bfc8da337588" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pycares" do + url "https://files.pythonhosted.org/packages/8d/ad/9d1e96486d2eb5a2672c4d9a2dd372d015b8d7a332c6ac2722c4c8e6bbbf/pycares-4.11.0.tar.gz" + sha256 "c863d9003ca0ce7df26429007859afd2a621d3276ed9fef154a9123db9252557" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "readchar" do + url "https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz" + sha256 "91ce3faf07688de14d800592951e5575e9c7a3213738ed01d394dcc949b79adb" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/c9/b2/7481156cf42b7f66cffb371e504b7ace12b4f016b8872ffcf0873ae9534b/sentry_sdk-2.42.0.tar.gz" + sha256 "91c69c9372fb5fb4df0ac39456ccf7286f0428b3ee1cdd389f9dd36c04e0f5c9" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "xmpppy" do + url "https://files.pythonhosted.org/packages/22/bc/393e277f6d24675a741f795747fcb74f240ffa01c81e02b2e2678c415d16/xmpppy-0.7.2.tar.gz" + sha256 "449bb158f99fd6cdd1e33dd52bc5a09aa79b7e4cc39fcd14f501ca3ecdec0f4e" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "yt-dlp" do + url "https://files.pythonhosted.org/packages/03/b7/dab729345e22891e79294273bc59c5213a1ec87331f49cb82ccea2b1bc9f/yt_dlp-2025.10.14.tar.gz" + sha256 "b18436aa9bb6f04354fd78d31ad9eeaae8c81b6a859f07072b25c18cd6c25844" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/moodle-dl --version") + + (testpath/"config.json").write <<~JSON + { + "token": "invalidtoken", + "privatetoken": "invalidprivatetoken", + "moodle_domain": "localhost", + "moodle_path": "/moodle/" + } + JSON + + assert_match "Connection error", shell_output("#{bin}/moodle-dl 2>&1", 1) + assert_path_exists testpath/"moodle_state.db" + end +end diff --git a/Formula/m/moon-buggy.rb b/Formula/m/moon-buggy.rb new file mode 100644 index 0000000000000..6414f6aebf9cc --- /dev/null +++ b/Formula/m/moon-buggy.rb @@ -0,0 +1,56 @@ +class MoonBuggy < Formula + desc "Drive some car across the moon" + homepage "https://www.seehuhn.de/pages/moon-buggy.html" + url "https://m.seehuhn.de/programs/moon-buggy-1.0.tar.gz" + sha256 "f8296f3fabd93aa0f83c247fbad7759effc49eba6ab5fdd7992f603d2d78e51a" + license any_of: ["GPL-2.0-or-later", "GPL-3.0-or-later"] + + # Upstream uses a similar version format for stable and unstable versions + # (e.g. 1.0 is stable but 1.0.51 is experimental), so this identifies stable + # versions by looking for the trailing `(stable version)` annotation. + livecheck do + url :homepage + regex(/moon-buggy\s+(?:version\s+|v)?(\d+(?:\.\d+)+)[^<]+?\(stable\s+version\)/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "992d1d21838d81ddfe48f7140aff6c7050892d7250adca9f87ae1d3a39a360c7" + sha256 arm64_sequoia: "381b64031018e20366728e5b6cb559bb042e076f238a41aa0fd32a25d6094121" + sha256 arm64_sonoma: "5e84d8a0372bf17fda7d55ea77d6d3cc0bf4ab2a00f938657eb30fe3b7c119bf" + sha256 arm64_ventura: "b7dd2c4414457a17a2f548554fb1f2c97d2eab161732ec769b893c7c5f6183d5" + sha256 arm64_monterey: "29c7f480f819b4c35a40537fa67645616ba35ba06405c9a433d516ae7684f3a4" + sha256 arm64_big_sur: "c7c5841b86bbd9271fb84c33e12babaf31e670dad45b2f65618e052dfbfae7ae" + sha256 sonoma: "e2cd8167429796321c2d3d421d4fa6845b09db0e2a35e7b69c7cd317f71ea41e" + sha256 ventura: "2a24441f98b7a24bec8165fd7c48a0543f11d1099439ae85de74884db0720247" + sha256 monterey: "991ffbd762b5a572066a44ce110b400e52892cf487e70e4fab64730c4f7f4fe7" + sha256 big_sur: "f4b3e7e9c36f357c628328b247bbe187467f16dde745acfd7ff2f668c22c379e" + sha256 catalina: "65bae44959589316ec4762947051a3f737ea8545d0b93e696d0c251ef38285dc" + sha256 arm64_linux: "4b9e2098eb4035d86768d9850ecc00f5e92e89406a3780c6efc598030af95a5a" + sha256 x86_64_linux: "72e827a7015b8a6d3fa38358221125375c8c4d2ae96b6c47a391714706dcfdbf" + end + + head do + url "https://github.com/seehuhn/moon-buggy.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "ncurses" + + def install + args = ["--mandir=#{man}", "--infodir=#{info}"] + if build.head? + system "./autogen.sh" + elsif OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + args << "--build=aarch64-unknown-linux-gnu" + end + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match(/Moon-Buggy #{version}$/, shell_output("#{bin}/moon-buggy -V")) + end +end diff --git a/Formula/m/moon.rb b/Formula/m/moon.rb new file mode 100644 index 0000000000000..abda90c19d143 --- /dev/null +++ b/Formula/m/moon.rb @@ -0,0 +1,52 @@ +class Moon < Formula + desc "Task runner and repo management tool for the web ecosystem, written in Rust" + homepage "https://moonrepo.dev/moon" + url "https://github.com/moonrepo/moon/archive/refs/tags/v1.41.6.tar.gz" + sha256 "fd54c49c6e032f9f4099af37b25ab76b0def62b94b326a477a57adf1c9154aec" + license "MIT" + head "https://github.com/moonrepo/moon.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be12aaa443428b10b9194dd27fc71c8b1be680a916bcafed0dc3e3f8e309f3c3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4c4e6d89b04359477fc5f95df2ae2243101ced6ff45e5a801b67bfab6262c55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53a27cc6442667541b0f19a8da2c61f92dfff5353ae8a927d41a704f19334e5c" + sha256 cellar: :any_skip_relocation, sonoma: "d2b2ff8ed2c04fac7031cd9574995bbf16d5de1a2ac7ccd414a2e6695db5257e" + sha256 cellar: :any_skip_relocation, arm64_linux: "79b686738fb1239125d22bdd26250010191b343ba2769204aa784adfaffa4648" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b27124793f0e3973258c41877ba3ba1511ccfcaf2bb293718ddb326d44a2f7f4" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" + depends_on "xz" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/cli") + generate_completions_from_executable(bin/"moon", "completions", "--shell") + + bin.each_child do |f| + basename = f.basename + + (libexec/"bin").install f + (bin/basename).write_env_script libexec/"bin"/basename, MOON_INSTALL_DIR: opt_prefix/"bin" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/moon --version") + + system bin/"moon", "init", "--minimal", "--yes", "--force" + assert_path_exists testpath/".moon/id" + assert_path_exists testpath/".moon/workspace.yml" + end +end diff --git a/Formula/m/moor.rb b/Formula/m/moor.rb new file mode 100644 index 0000000000000..3e59ec674910a --- /dev/null +++ b/Formula/m/moor.rb @@ -0,0 +1,41 @@ +class Moor < Formula + desc "Nice to use pager for humans" + homepage "https://github.com/walles/moor" + url "https://github.com/walles/moor/archive/refs/tags/v2.8.1.tar.gz" + sha256 "343fe0a86f085bc9e381ab2107902d98e97a158188ce0f2151d4bd0601d5ddc6" + license "BSD-2-Clause" + head "https://github.com/walles/moor.git", branch: "master" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a2a3428f0e525fbb6ed1407a1d6a2957b3033c1ee3bf2626ed181153b008391" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a2a3428f0e525fbb6ed1407a1d6a2957b3033c1ee3bf2626ed181153b008391" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a2a3428f0e525fbb6ed1407a1d6a2957b3033c1ee3bf2626ed181153b008391" + sha256 cellar: :any_skip_relocation, sonoma: "cb70828fcfc1b828b9bccdea53d32f76aff21550adc41a5d9cb0c86a52871ec9" + sha256 cellar: :any_skip_relocation, arm64_linux: "be1fd1b56a359ea26b49cb75f9b119c9abdde4b001b149e0e60bd6fd1e808a56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1645570086cf51fa7d7610bc91694b8d050c900625e828e39b02c7d72282d8d7" + end + + depends_on "go" => :build + + conflicts_with "moarvm", "rakudo-star", because: "both install `moar` binaries" + + def install + ldflags = "-s -w -X main.versionString=v#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/moor" + + # Hint for moar users to start typing "moor" instead + bin.install "scripts/moar" + + man1.install "moor.1" + end + + test do + # Test piping text through moor + (testpath/"test.txt").write <<~EOS + tyre kicking + EOS + assert_equal "tyre kicking", shell_output("#{bin}/moor test.txt").strip + end +end diff --git a/Formula/m/moreutils.rb b/Formula/m/moreutils.rb new file mode 100644 index 0000000000000..598299f9553bd --- /dev/null +++ b/Formula/m/moreutils.rb @@ -0,0 +1,81 @@ +class Moreutils < Formula + desc "Collection of tools that nobody wrote when UNIX was young" + homepage "https://joeyh.name/code/moreutils/" + url "https://git.joeyh.name/index.cgi/moreutils.git/snapshot/moreutils-0.70.tar.gz" + sha256 "f2bf46d410ba567cc8d01507e94916994e48742722e690dc498fab59f5250132" + license all_of: [ + "GPL-2.0-or-later", + { any_of: ["GPL-2.0-only", "Artistic-2.0"] }, + ] + head "https://git.joeyh.name/git/moreutils.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bb9c8584114eafbe7eab4f89b0502d72688b7ea7d1dea6fd485a1bd5e5541149" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d054e5d66851413c272c39e156a48467f39959e89c84f91c1de41cd690c6b78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe0990b48df79c064ba76b72360019bea03328e6fcbd99a866ab9d6a1a37e95f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "52bc03dcf5828555287e4f2ddd22da821a332a07f73118449dfd7fb9b86bf2dc" + sha256 cellar: :any_skip_relocation, sonoma: "e26e5d2933b3012c95929c26c6d7298a1820370f9b15e2c05fa10ca4e8b020f5" + sha256 cellar: :any_skip_relocation, ventura: "42dc76da4d89f2bea57718ad8ccba438651099ee27881b5a8e34c9052777947f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f3ea30db435d1e85633c12f11dc1d4545530c21f0415999b651be6b7d02306f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06d1c740d7401fec23a230bcd5f113e8d10c00c0d80f8b12861acc5d64b79b3a" + end + + depends_on "docbook-xsl" => :build + + uses_from_macos "libxml2" => :build + uses_from_macos "libxslt" => :build + + uses_from_macos "perl" + + conflicts_with "parallel", because: "both install a `parallel` executable" + conflicts_with "pwntools", because: "both install an `errno` executable" + conflicts_with "sponge", because: "both install a `sponge` executable" + conflicts_with "task-spooler", because: "both install a `ts` executable" + + resource "Time::Duration" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Time-Duration-1.21.tar.gz" + sha256 "fe340eba8765f9263694674e5dff14833443e19865e5ff427bbd79b7b5f8a9b8" + end + + resource "IPC::Run" do + url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/IPC-Run-20231003.0.tar.gz" + sha256 "eb25bbdf5913d291797ef1bfe998f15130b455d3ed02aacde6856f0b25e4fe57" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resource("Time::Duration").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "--skipdeps" + system "make", "install" + end + + resource("IPC::Run").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + + inreplace "Makefile" do |s| + s.gsub! "/usr/share/xml/docbook/stylesheet/docbook-xsl", + "#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl" + end + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "make", "all" + system "make", "install", "PREFIX=#{prefix}" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + pipe_output("#{bin}/isutf8", "hello", 0) + pipe_output("#{bin}/isutf8", "\xca\xc0\xbd\xe7", 1) + end +end diff --git a/Formula/m/moribito.rb b/Formula/m/moribito.rb new file mode 100644 index 0000000000000..dd9b0182d7caa --- /dev/null +++ b/Formula/m/moribito.rb @@ -0,0 +1,37 @@ +class Moribito < Formula + desc "TUI for LDAP Viewing/Queries" + homepage "https://ericschmar.github.io/moribito/" + url "https://github.com/ericschmar/moribito/archive/refs/tags/v0.2.6.tar.gz" + sha256 "7b07448c6f8f16121232c73f45d8c8c7b59e066f20a00850dde093e724cd98db" + license "MIT" + head "https://github.com/ericschmar/moribito.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "37034fa0d7d8f39b905f495d15d385ebad49b085045dc6ea469d29af44e2194b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37034fa0d7d8f39b905f495d15d385ebad49b085045dc6ea469d29af44e2194b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37034fa0d7d8f39b905f495d15d385ebad49b085045dc6ea469d29af44e2194b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37034fa0d7d8f39b905f495d15d385ebad49b085045dc6ea469d29af44e2194b" + sha256 cellar: :any_skip_relocation, sonoma: "b60752bdc952a103dc312c9ea4f404f1e0b260e5914fde7d810f91a996f31db2" + sha256 cellar: :any_skip_relocation, ventura: "b60752bdc952a103dc312c9ea4f404f1e0b260e5914fde7d810f91a996f31db2" + sha256 cellar: :any_skip_relocation, arm64_linux: "60ff659612cd002a25d1b9f2210e354d5608a6a8be6b39a1ee8eedaff24e037a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c70137bf656cf11da599cd653e60ad2976f1a5b00ee756ce9f6ec93766a3b27" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/ericschmar/moribito/internal/version.Version=#{version} + -X github.com/ericschmar/moribito/internal/version.Commit=#{tap.user} + -X github.com/ericschmar/moribito/internal/version.Date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/moribito" + end + + test do + assert_match version.to_s, shell_output("#{bin}/moribito --version") + + assert_match "Configuration file created", shell_output("#{bin}/moribito --create-config") + end +end diff --git a/Formula/m/morpheus.rb b/Formula/m/morpheus.rb new file mode 100644 index 0000000000000..5d664d9257f8b --- /dev/null +++ b/Formula/m/morpheus.rb @@ -0,0 +1,126 @@ +class Morpheus < Formula + desc "Modeling environment for multi-cellular systems biology" + homepage "https://morpheus.gitlab.io/" + url "https://gitlab.com/morpheus.lab/morpheus/-/archive/v2.3.9/morpheus-v2.3.9.tar.gz" + sha256 "d27b7c2b5ecf503fd11777b3a75d4658a6926bfd9ae78ef97abf5e9540a6fb29" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(?:_?\d+)?)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "7e26be19e1ae33a04c2183277b10136d26261ea2bcf2af177d13fd32ec8bd0ea" + sha256 arm64_sequoia: "4020aba25f72c7c1994268abd7a51d625b3c4d03bba900d58bad3fb7c41f18ff" + sha256 arm64_sonoma: "6d7ecede2635239fcc44cc2e6db21d8d819f1b4855898115548916fdbefc6010" + sha256 arm64_ventura: "e30b659545e485356790d7938d5a4af5570584315b9272ca03b7aee3b4219160" + sha256 cellar: :any, sonoma: "256731739687f46cf2509eb9a3e5f0c7139dea775ce5f8e450b855ef910ac703" + sha256 cellar: :any, ventura: "00fdbd8f0594d9daca951726618c1275396758a60aac129dc85451af78a7657e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebe312239729e7e3b45e975d1fa6e6c9c69d2107e8e15104c2f735c90af1480f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d216e4cd5fcec17db0a326688795f2ee4e3517379b79b3f94ef0f53a0f56ee3" + end + + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "ninja" => :build + depends_on "boost" + depends_on "ffmpeg" + depends_on "graphviz" + depends_on "libtiff" + depends_on "qt@5" + + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + # Backport support for CMake 4 + patch do + url "https://gitlab.com/morpheus.lab/morpheus/-/commit/74aa906b9c2bd9144776118e61ffef3220a70878.diff" + sha256 "7d186bcd41b640e770f592053f25a4216c57ae56e5ecee68f271e8d00fbfa4a1" + end + patch do + url "https://gitlab.com/morpheus.lab/morpheus/-/commit/aac15ea4e196083a00c0634d1aaa6d49875721c7.diff" + sha256 "2e6f40b7acf4b81643b5af411f1e6bb8d7bc01282a638488c8be41fbdbb68675" + end + patch do + url "https://gitlab.com/morpheus.lab/morpheus/-/commit/8c5035ef693068a1ddcfdc710f45bd4f4663ee8b.diff" + sha256 "e0916157e4c32c7370f3b0a140b43c4a30c2173c9a65e73c2dd6a817011920ed" + end + + def install + # Avoid statically linking to Boost libraries when `-DBUILD_TESTING=OFF` + cmakelists = ["CMakeLists.txt", "morpheus/CMakeLists.txt"] + inreplace cmakelists, "set(Boost_USE_STATIC_LIBS ON)", "set(Boost_USE_STATIC_LIBS OFF)" + + # Workaround for newer Clang + # error: a template argument list is expected after a name prefixed by the template keyword + ENV.append_to_cflags "-Wno-missing-template-arg-list-after-template-kw" if OS.mac? + + # has to build with Ninja until: https://gitlab.kitware.com/cmake/cmake/-/issues/25142 + args = ["-G", "Ninja"] + + if OS.mac? + args << "-DMORPHEUS_RELEASE_BUNDLE=ON" + args << "-DBREW_FORMULA_DEPLOYMENT=ON" + args << "-DMORPHEUS_SBML=OFF" # SBML import currently disabled due to libSBML build errors with some macOS SDKs + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + return unless OS.mac? + + bin.write_exec_script "#{prefix}/Morpheus.app/Contents/MacOS/morpheus" + bin.write_exec_script "#{prefix}/Morpheus.app/Contents/MacOS/morpheus-gui" + + # Set PATH environment variable including Homebrew prefix in macOS app bundle + inreplace "#{prefix}/Morpheus.app/Contents/Info.plist", "HOMEBREW_BIN_PATH", "#{HOMEBREW_PREFIX}/bin" + end + + def post_install + # Sign to ensure proper execution of the app bundle + system "/usr/bin/codesign", "-f", "-s", "-", "#{prefix}/Morpheus.app" if OS.mac? && Hardware::CPU.arm? + end + + test do + (testpath/"test.xml").write <<~XML + + + +
+ +
+ + + + optimal + + + + + + + + + +
+ XML + + assert_match "Simulation finished", shell_output("#{bin}/morpheus --file test.xml") + end +end diff --git a/Formula/m/morse.rb b/Formula/m/morse.rb new file mode 100644 index 0000000000000..86bc2f6fe1726 --- /dev/null +++ b/Formula/m/morse.rb @@ -0,0 +1,68 @@ +class Morse < Formula + desc "QSO generator and morse code trainer" + homepage "http://www.catb.org/~esr/morse/" + # reported the artifact issue on the project page, https://gitlab.com/esr/morse-classic/-/issues/1 + url "https://gitlab.com/esr/morse-classic/-/archive/2.6/morse-classic-2.6.tar.bz2" + sha256 "ec44144d52a1eef36fbe0ca400c54556a7ba8f8c3de38d80512d19703b89f615" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?morse[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1dceecbf27b161c7e25af6c3aa46a4be23084c129677c5da4a45b284df152a09" + sha256 cellar: :any, arm64_sequoia: "d2d07a8df0960df4b556fc6dca7f17bdc71f430cdc0dccf22911b444ecc2a5bd" + sha256 cellar: :any, arm64_sonoma: "0286b2ad85c1add1655abfb88976233c98db5050e38d9d3995c1adb9c9a10a1e" + sha256 cellar: :any, arm64_ventura: "2474d8763e32b94635781a29c7ead023710fb0186a9d21fb22cfcd7a8d22e4eb" + sha256 cellar: :any, arm64_monterey: "b11f64cb45004eba37bf06e0d367e71b6f088fe7d05e80019125c325a48fcd9d" + sha256 cellar: :any, sonoma: "6892afd65e72497a1fc11d849031e2ea034ffbd41f644a018ec14d0a1a110bfe" + sha256 cellar: :any, ventura: "6b25ce35c70900babe4699533e2161b58b7b73cb9349821e9043b5aa01f95e71" + sha256 cellar: :any, monterey: "56d73fcfdfaa67270047046e7785881149585063ea71f9d5da7e32b42f3fcd61" + sha256 cellar: :any_skip_relocation, arm64_linux: "179f572cabeb59bddaa4fe3b5b8dad88130be7f98f768804dff18dc65a96671a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f8504ea84011770dbba7831cfb9a35742be9efc2d849657385fb7a68e7ade6f" + end + + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + depends_on "pulseaudio" + + patch :DATA + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + ENV["CC"] = "#{ENV.cc} -Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Build can fail if morse.1 and QSO.1 run simultaneously + ENV.deparallelize + + system "make", "all" + bin.install %w[morse QSO] + man1.install %w[morse.1 QSO.1] + end + + test do + # Fails in Linux CI with "pa_simple_Write failed" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "Could not initialize audio", shell_output("#{bin}/morse -- 2>&1", 1) + end +end + +__END__ +diff --git a/Makefile b/Makefile +index 8bdf1f6..df39baa 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,8 +28,8 @@ + #DEVICE = X11 + #DEVICE = Linux + #DEVICE = OSS +-DEVICE = ALSA +-#DEVICE = PA ++#DEVICE = ALSA ++DEVICE = PA + + VERSION=$(shell sed -n :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "protobuf" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "tmux" => :build # for `make check` + end + + on_linux do + depends_on "openssl@3" # Uses CommonCrypto on macOS + end + + def install + # https://github.com/protocolbuffers/protobuf/issues/9947 + ENV.append_to_cflags "-DNDEBUG" + # Avoid over-linkage to `abseil`. + ENV.append "LDFLAGS", "-Wl,-dead_strip_dylibs" if OS.mac? + + # teach mosh to locate mosh-client without referring + # PATH to support launching outside shell e.g. via launcher + inreplace "scripts/mosh.pl", "'mosh-client", "'#{bin}/mosh-client" + + if build.head? + # Prevent mosh from reporting `-dirty` in the version string. + inreplace "Makefile.am", "--dirty", "--dirty=-Homebrew" + system "./autogen.sh" + elsif version <= "1.4.0" # remove `elsif` block and `else` at version bump. + # Keep C++ standard in sync with abseil.rb. + # Use `gnu++17` since Mosh allows use of GNU extensions (-std=gnu++11). + ENV.append "CXXFLAGS", "-std=gnu++17" + else # Remove `else` block at version bump. + odie "Install method needs updating!" + end + + # `configure` does not recognise `--disable-debug` in `std_configure_args`. + system "./configure", "--prefix=#{prefix}", "--enable-completion", "--disable-silent-rules" + system "make", "install" + end + + test do + system bin/"mosh-client", "-c" + end +end diff --git a/Formula/m/mosml.rb b/Formula/m/mosml.rb new file mode 100644 index 0000000000000..2f0da2a80d338 --- /dev/null +++ b/Formula/m/mosml.rb @@ -0,0 +1,50 @@ +class Mosml < Formula + desc "Moscow ML" + homepage "https://mosml.org/" + url "https://github.com/kfl/mosml/archive/refs/tags/ver-2.10.1.tar.gz" + sha256 "fed5393668b88d69475b070999b1fd34e902591345de7f09b236824b92e4a78f" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "23b30d52a14bb794091e01411eb3ee9e69ad9fadfccb587f2a83cd0578536abb" + sha256 cellar: :any, arm64_sequoia: "4c5e5c68a5bafb747f9bf0ebf55e7e67f6ff97ad8107a788579db55b27a5a1c9" + sha256 cellar: :any, arm64_sonoma: "baf1606f54aca14fe0f9a0e734cea0518dc817fd42fb0b755364da0fa3362e9e" + sha256 cellar: :any, arm64_ventura: "697eb51321f126674f814f5cca5c08956104eb3d4181c04aa055afbf779f068e" + sha256 cellar: :any, arm64_monterey: "0bcc8223cece7f0320b69b009eda89cda3cec9fc8e10877fbd985eea878cb345" + sha256 arm64_big_sur: "0163ff06ef4997b1ab8eb1e55463475fc78f89ad4dd795d7ff4caeaca932a901" + sha256 cellar: :any, sonoma: "4a3c5631a1b2156bfc5b890dfcbcca3c131f0f823834b9d6e50b8ce83d3d0e2b" + sha256 cellar: :any, ventura: "d416c4d3d7861b6b964aefd53dbb97a2778f111245dabb69b8c3e9bf2933c612" + sha256 cellar: :any, monterey: "c0cf01f015c8ea1da6bca0a1a64567fc3535f746bb2a3f07002f3a56f1371234" + sha256 big_sur: "96fae7154e49e57180eee17d8d90580a0e2d024f2f0b7510cfcc83d59f0449be" + sha256 catalina: "d39293549810bf64ade65bcbcb969abf1c76d0812c2d9e8c2ffd8329d2d2a34b" + sha256 cellar: :any_skip_relocation, arm64_linux: "77e5df31a7aee4060619180f6d795ff2f1e1ce1e11983e5e22a5322a41362034" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42bf79793655431b313d4c547e7c9b6867b2f1695035005a15b8da6c0b25c416" + end + + depends_on "gmp" + + # Backport missing headers to fix build + patch do + url "https://github.com/kfl/mosml/commit/52b00ca99dcd77d64dac5a7600fe64a76ed1ac3a.patch?full_index=1" + sha256 "e0db36e944b5d60e0e98afd3f3e9463d193ae89b7aa66d2cc7c452c6c6ed8632" + end + + def install + # Work around for newer Clang + ENV.append "CC", "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "-C", "src", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "world" + system "make", "-C", "src", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "install" + end + + test do + require "pty" + + _, w, = PTY.spawn bin/"mosml" + w.write "quit();\n" + + assert_equal "I don't know what to do with file \"foo\", ignored", shell_output("#{bin}/mosmlc foo 2>&1").strip + end +end diff --git a/Formula/m/mosquitto.rb b/Formula/m/mosquitto.rb new file mode 100644 index 0000000000000..48c3572d3369e --- /dev/null +++ b/Formula/m/mosquitto.rb @@ -0,0 +1,76 @@ +class Mosquitto < Formula + desc "Message broker implementing the MQTT protocol" + homepage "https://mosquitto.org/" + url "https://mosquitto.org/files/source/mosquitto-2.0.22.tar.gz" + sha256 "2f752589ef7db40260b633fbdb536e9a04b446a315138d64a7ff3c14e2de6b68" + # # dual-licensed under EPL-1.0 and EDL-1.0 (Eclipse Distribution License v1.0), + # EDL-1.0 is pretty the same as BSD-3-Clause, + # see discussions in https://github.com/spdx/license-list-XML/issues/1149 + license any_of: ["EPL-1.0", "BSD-3-Clause"] + revision 1 + + livecheck do + url "https://mosquitto.org/download/" + regex(/href=.*?mosquitto[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "abff8ebca977a7a2112d3b3da4591a51278f6d9d87a4357166b3795a2bbf6c72" + sha256 cellar: :any, arm64_sequoia: "b104d46d1e87f19a87dde8f703a88f96cfd8a7b14f5c890cc80f1d4e87d00d5e" + sha256 cellar: :any, arm64_sonoma: "a698100e3f6c3ad8c4d12be8d53172fa945cdf90e07e98a8f17e3312c18a8a60" + sha256 cellar: :any, arm64_ventura: "713166fcd44dc4ab41c7ee26c7568657d1ed85f70a561bcb29db93a21c5aaa2d" + sha256 cellar: :any, sonoma: "d1d3912c6cce5c515067a154b4b624215b596657ae004d774035fe589915b775" + sha256 cellar: :any, ventura: "773f0dbebde7df42a048ce1a5d14dec13773f633bbd660b89d66e78325501ca7" + sha256 cellar: :any_skip_relocation, arm64_linux: "c3cf5fd9fdbcd233b9cf42df8604833d65d84b6173e27a997abdf64fe9ca883d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51e2773ad764574334ea17d44e074dcb4106d9549d6efe7eca8ea600fdefab4e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "cjson" + depends_on "libwebsockets" + depends_on "openssl@3" + + uses_from_macos "libxslt" => :build + + on_linux do + depends_on "util-linux" + end + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DWITH_PLUGINS=OFF + -DWITH_WEBSOCKETS=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"mosquitto").mkpath + end + + def caveats + <<~EOS + mosquitto has been installed with a default configuration file. + You can make changes to the configuration by editing: + #{etc}/mosquitto/mosquitto.conf + EOS + end + + service do + run [opt_sbin/"mosquitto", "-c", etc/"mosquitto/mosquitto.conf"] + keep_alive false + working_dir var/"mosquitto" + end + + test do + assert_match "Usage: mosquitto ", shell_output("#{sbin}/mosquitto -h") + assert_match "Dynamic Security module", shell_output("#{bin}/mosquitto_ctrl dynsec help") + system bin/"mosquitto_passwd", "-c", "-b", testpath/"mosquitto.pass", "foo", "bar" + assert_match(/^foo:/, (testpath/"mosquitto.pass").read) + end +end diff --git a/Formula/m/most.rb b/Formula/m/most.rb new file mode 100644 index 0000000000000..6dc701352b4f9 --- /dev/null +++ b/Formula/m/most.rb @@ -0,0 +1,46 @@ +class Most < Formula + desc "Powerful paging program" + homepage "https://www.jedsoft.org/most/" + url "https://www.jedsoft.org/releases/most/most-5.2.0.tar.gz" + sha256 "9455aeb8f826fa8385c850dc22bf0f22cf9069b3c3423fba4bf2c6f6226d9903" + license "GPL-2.0-or-later" + head "git://git.jedsoft.org/git/most.git", branch: "master" + + livecheck do + url "https://www.jedsoft.org/releases/most/" + regex(/href=.*?most[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "31f896dfc693f1cd1014b870faad91a036405d61a943941ea61f5010fc2c9525" + sha256 cellar: :any, arm64_sequoia: "2d8b015bce1f30f98a2a60a907ac22a7a38d01d4aa86bd8332c243870a0b184a" + sha256 cellar: :any, arm64_sonoma: "0b738de8c83a8f67ef1c79d9443d20a50928ece07c4c847fb8315ded7f7601c2" + sha256 cellar: :any, arm64_ventura: "f77965c676d147011c6456b7da9f7097d02e5de8fb81a0282b9cb6a5caedc527" + sha256 cellar: :any, arm64_monterey: "a59940ffff8a004be1e310759e22c16d3c69521e9c8bf7c7a75dd8c919cc8d4b" + sha256 cellar: :any, arm64_big_sur: "f45ef961fdb9f6cc835bef242de3f22abce43b27c8e9fead3351c84da8523a2f" + sha256 cellar: :any, sonoma: "6b03d99e48b297f7fd03d59629cfdd68e9dee753441b5385f572bba30931e44f" + sha256 cellar: :any, ventura: "464f7b8e15dd5c9dbe5f4ca3d39eeb7d7788ea61dbf336180f1d9a864085dc0d" + sha256 cellar: :any, monterey: "e5661527b7f93c4f8277d58508004f5c6ddd642b1b72ace3364df24593c2bfac" + sha256 cellar: :any, big_sur: "a2839cdbb2da468947d084bb3f78f9c4b575d8d090f59ae0c24a09bf86c8d67c" + sha256 cellar: :any, catalina: "9a61d3f7087d729dbb2d9aa01d32d6ab59330ef64711ce080e6702a8fbae3bb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "7dc9281437347488ca3a9722495f5a35797aecd8b900accb507d0a5328ef6e99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "701edb9b61b659c7b3531b3527ede68e563a19b8ef989efc537e2400b4259233" + end + + depends_on "s-lang" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-slang=#{HOMEBREW_PREFIX}" + system "make", "install" + end + + test do + text = "This is Homebrew" + assert_equal text, pipe_output("#{bin}/most -C", text) + end +end diff --git a/Formula/m/moto.rb b/Formula/m/moto.rb new file mode 100644 index 0000000000000..d0b83923f2b1b --- /dev/null +++ b/Formula/m/moto.rb @@ -0,0 +1,327 @@ +class Moto < Formula + include Language::Python::Virtualenv + + desc "Mock AWS services" + homepage "http://getmoto.org/" + url "https://files.pythonhosted.org/packages/33/0e/346bdadba09fd86854fa3363892ca12f4232652c9d210b93c673c48807ea/moto-5.1.16.tar.gz" + sha256 "792045b345d16a8aa09068ad4a7656894e707c796f0799b438fffb738e8fae7c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b39f1001d86e97933ee834206972a9ec31927fdeceed5e951dcd3fef90d172e7" + sha256 cellar: :any, arm64_sequoia: "1d29bc99051cf46eae81528bb7a0ca93cb79d2c50059745cf4564eec80669297" + sha256 cellar: :any, arm64_sonoma: "2100350f0bf88cd9bfde0ba840b8b1f2c2c605fc8388fa395b7809393414860a" + sha256 cellar: :any, sonoma: "3f988ad245d67befbbf055cacf58ad5546130148435f8331fdc93385f6030b2a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d544863597b02a7e5be237706b02c3e19e2094efa054beaf33ac7e3fe8c955e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7927a29150d496e1787e1ad1bb268be2ec0064d363d13f72d0e5e0b6c62cb8ae" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages package_name: "moto[all,server]", + exclude_packages: %w[certifi cryptography pydantic-core rpds-py] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "antlr4-python3-runtime" do + url "https://files.pythonhosted.org/packages/33/5f/2cdf6f7aca3b20d3f316e9f505292e1f256a32089bd702034c29ebde6242/antlr4_python3_runtime-4.13.2.tar.gz" + sha256 "909b647e1d2fc2b70180ac586df3933e38919c85f98ccc656a96cd3f25ef3916" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/e8/7f/db344c656949fa286ff8a14ff2c64355b6ca0cb6ebaf260678041acb8d9c/aws_sam_translator-1.101.0.tar.gz" + sha256 "234c1ca29d47f2cd276858371d4a646bc5cdb0de1e07724721d9358d6de005aa" + end + + resource "aws-xray-sdk" do + url "https://files.pythonhosted.org/packages/14/25/0cbd7a440080def5e6f063720c3b190a25f8aa2938c1e34415dc18241596/aws_xray_sdk-2.15.0.tar.gz" + sha256 "794381b96e835314345068ae1dd3b9120bd8b4e21295066c37e8814dbb341365" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/08/d2/e508e5f42dc1c8a7412f5170751e626a18ed32c6e95c5df30bde6c5addf1/boto3-1.40.64.tar.gz" + sha256 "b92d6961c352f2bb8710c9892557d4b0e11258b70967d4e740e1c97375bcd779" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/c1/15/109cb31c156a64bfaf4c809d2638fd95d8ba39b6deb7f1d0526c05257fd7/botocore-1.40.64.tar.gz" + sha256 "a13af4009f6912eafe32108f6fa584fb26e24375149836c2bcaaaaec9a7a9e58" + end + + resource "cfn-lint" do + url "https://files.pythonhosted.org/packages/68/d3/daf6b773ac204ac34e3a06b16dc6667ba4d1cd6cbd046b90ad28cc635936/cfn_lint-1.40.3.tar.gz" + sha256 "3f51f7fc66be9a31762d17f821839b32071a891e2d71ed6ab33dbc71a4dec938" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz" + sha256 "bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87" + end + + resource "flask-cors" do + url "https://files.pythonhosted.org/packages/76/37/bcfa6c7d5eec777c4c7cf45ce6b27631cebe5230caf88d85eadd63edd37a/flask_cors-6.0.1.tar.gz" + sha256 "d81bcb31f07b0985be7f48406247e9243aced229b7747219160a0559edd678db" + end + + resource "graphql-core" do + url "https://files.pythonhosted.org/packages/ac/9b/037a640a2983b09aed4a823f9cf1729e6d780b0671f854efa4727a7affbe/graphql_core-3.2.7.tar.gz" + sha256 "27b6904bdd3b43f2a0556dad5d579bdfdeab1f38e8e8788e555bdcb586a6f62c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "joserfc" do + url "https://files.pythonhosted.org/packages/26/a0/4b8dfecc8ec3c15aa1f2ff7d5b947344378b5b595ce37c8a8fe6e25c1400/joserfc-1.4.0.tar.gz" + sha256 "e8c2f327bf10a937d284d57e9f8aec385381e5e5850469b50a7dade1aba59759" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpath-ng" do + url "https://files.pythonhosted.org/packages/6d/86/08646239a313f895186ff0a4573452038eed8c86f54380b3ebac34d32fb2/jsonpath-ng-1.7.0.tar.gz" + sha256 "f6f5f7fd4e5ff79c785f1573b394043b39849fb2bb47bcead935d12b00beab3c" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-path" do + url "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz" + sha256 "8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "lazy-object-proxy" do + url "https://files.pythonhosted.org/packages/08/a2/69df9c6ba6d316cfd81fe2381e464db3e6de5db45f8c43c6a23504abf8cb/lazy_object_proxy-1.12.0.tar.gz" + sha256 "1f5a462d92fd0cfb82f1fab28b51bfb209fabbe6aabf7f0d51472c0c124c0c61" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mpmath" do + url "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz" + sha256 "7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f" + end + + resource "multipart" do + url "https://files.pythonhosted.org/packages/6d/c9/c6f5ab81bae667d4fe42a58df29f4c2db6ad8377cfd0e9baa729e4fa3ebb/multipart-1.3.0.tar.gz" + sha256 "a46bd6b0eb4c1ba865beb88ddd886012a3da709b6e7b86084fc37e99087e5cf1" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "openapi-schema-validator" do + url "https://files.pythonhosted.org/packages/8b/f3/5507ad3325169347cd8ced61c232ff3df70e2b250c49f0fe140edb4973c6/openapi_schema_validator-0.6.3.tar.gz" + sha256 "f37bace4fc2a5d96692f4f8b31dc0f8d7400fd04f3a937798eaf880d425de6ee" + end + + resource "openapi-spec-validator" do + url "https://files.pythonhosted.org/packages/82/af/fe2d7618d6eae6fb3a82766a44ed87cd8d6d82b4564ed1c7cfb0f6378e91/openapi_spec_validator-0.7.2.tar.gz" + sha256 "cc029309b5c5dbc7859df0372d55e9d1ff43e96d678b9ba087f7c56fc586f734" + end + + resource "pathable" do + url "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz" + sha256 "6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "py-partiql-parser" do + url "https://files.pythonhosted.org/packages/56/7a/a0f6bda783eb4df8e3dfd55973a1ac6d368a89178c300e1b5b91cd181e5e/py_partiql_parser-0.6.3.tar.gz" + sha256 "09cecf916ce6e3da2c050f0cb6106166de42c33d34a078ec2eb19377ea70389a" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "responses" do + url "https://files.pythonhosted.org/packages/0e/95/89c054ad70bfef6da605338b009b2e283485835351a9935c7bfbfaca7ffc/responses-0.25.8.tar.gz" + sha256 "9374d047a575c8f781b94454db5cab590b6029505f488d12899ddb10a4af1cf4" + end + + resource "rfc3339-validator" do + url "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" + sha256 "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sympy" do + url "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz" + sha256 "d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/49/19/5e5bcd855d808892fe02d49219f97a50f64cd6d8313d75df3494ee97b1a3/wrapt-2.0.0.tar.gz" + sha256 "35a542cc7a962331d0279735c30995b024e852cf40481e384fd63caaa391cbb9" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + def python3 + which("python3.14") + end + + def install + virtualenv_install_with_resources + end + + service do + run [opt_bin/"moto_server"] + keep_alive true + working_dir var + log_path var/"log/moto.log" + error_log_path var/"log/moto.log" + end + + test do + port = free_port + pid = spawn bin/"moto_server", "--port=#{port}" + + expected_output = <<~XML + bcaf1ffd86f41161ca5fb16fd081034fwebfile + XML + assert_equal expected_output.strip, shell_output("curl --silent --retry 5 --retry-connrefused 127.0.0.1:#{port}/") + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/m/movgrab.rb b/Formula/m/movgrab.rb new file mode 100644 index 0000000000000..dff11ed122d97 --- /dev/null +++ b/Formula/m/movgrab.rb @@ -0,0 +1,75 @@ +class Movgrab < Formula + desc "Downloader for youtube, dailymotion, and other video websites" + homepage "https://github.com/ColumPaget/Movgrab" + url "https://github.com/ColumPaget/Movgrab/archive/refs/tags/3.1.2.tar.gz" + sha256 "30be6057ddbd9ac32f6e3d5456145b09526cc6bd5e3f3fb3999cc05283457529" + license "GPL-3.0-or-later" + revision 10 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "25557d01e1b440c88a1c606ec1bf4d309fb96f26b6552763c4f2133bf051bf18" + sha256 cellar: :any, arm64_sequoia: "2b1dae1c56de07dab28dd97d6169709b4711e34001161d8a8daf2b7b20303e0f" + sha256 cellar: :any, arm64_sonoma: "a6616ac97c469fe1248b5bbfc4b453bad26b5d62380756c518a791026d4d454c" + sha256 cellar: :any, sonoma: "1424eb3926a2a14e9d29afbd3bbc89ee69ada326d4c9a2834c9a15e7e0bcd080" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdab47fe3bf34b8dad1b015721cf655f190aa0dfb67ad93eeda49c0c3c0c1acb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbcec355453382e09592b4d92ab23020bf52e6ea2a7d8c9cee74a523e50cf7d4" + end + + depends_on "libressl" + + uses_from_macos "zlib" + + # Fixes an incompatibility between Linux's getxattr and macOS's. + # Reported upstream; half of this is already committed, and there's + # a PR for the other half. + # https://github.com/ColumPaget/libUseful/issues/1 + # https://github.com/ColumPaget/libUseful/pull/2 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/movgrab/libUseful_xattr_backport.diff" + sha256 "d77c6661386f1a6d361c32f375b05bfdb4ac42804076922a4c0748da891367c2" + end + + # Backport fix for GCC linker library search order + # Upstream ref: https://github.com/ColumPaget/Movgrab/commit/fab3c87bc44d6ce47f91ded430c3512ebcf7501b + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/movgrab/linker.patch" + sha256 "e23330f110cb8ea2ed29ebc99180250fa5498d53706303b4d1878dc44aa483d3" + end + + # build patch to fix pointer conversion issues + # upstream bug report, https://github.com/ColumPaget/Movgrab/issues/6 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/movgrab/pointer-conv.patch" + sha256 "9b5c0bb666d92c87966e610e3c2db9736371507b646359b5421f2a4fa7d68222" + end + + def install + # workaround for Xcode 14.3 + ENV.append "CFLAGS", "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Can you believe this? A forgotten semicolon! Probably got missed because it's + # behind a conditional #ifdef. + # Fixed upstream: https://github.com/ColumPaget/libUseful/commit/6c71f8b123fd45caf747828a9685929ab63794d7 + inreplace "libUseful-2.8/FileSystem.c", "result=-1", "result=-1;" + + # Later versions of libUseful handle the fact that setresuid is Linux-only, but + # this one does not. https://github.com/ColumPaget/Movgrab/blob/HEAD/libUseful/Process.c#L95-L99 + inreplace "libUseful-2.8/Process.c", "setresuid(uid,uid,uid)", "setreuid(uid,uid)" + + system "./configure", "--enable-ssl", *std_configure_args + system "make" + + # because case-insensitivity is sadly a thing and while the movgrab + # Makefile itself doesn't declare INSTALL as a phony target, we + # just remove the INSTALL instructions file so we can actually + # just make install + rm "INSTALL" + system "make", "install" + end + + test do + system bin/"movgrab", "--version" + end +end diff --git a/Formula/m/mox.rb b/Formula/m/mox.rb new file mode 100644 index 0000000000000..824eba782f016 --- /dev/null +++ b/Formula/m/mox.rb @@ -0,0 +1,48 @@ +class Mox < Formula + desc "Modern full-featured open source secure mail server" + homepage "https://www.xmox.nl" + url "https://github.com/mjl-/mox/archive/refs/tags/v0.0.15.tar.gz" + sha256 "21d56acb240458af5dfe31f91010f0e1bf5988d55d9c15d8c078440d7ce4b66a" + license "MIT" + head "https://github.com/mjl-/mox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e53a87c58244b39fc69bf6574ddb1970275338efdb332812236a056272cabf99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "065e4ac1d5ae489416cec6eb4a6663092901dcf41c1844a568538b42ef57d674" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "065e4ac1d5ae489416cec6eb4a6663092901dcf41c1844a568538b42ef57d674" + sha256 cellar: :any_skip_relocation, arm64_ventura: "065e4ac1d5ae489416cec6eb4a6663092901dcf41c1844a568538b42ef57d674" + sha256 cellar: :any_skip_relocation, sonoma: "287c8a9a4efd5c1f2bf3c284d21c951364a6610e05c3eda981528a4c91431e2e" + sha256 cellar: :any_skip_relocation, ventura: "287c8a9a4efd5c1f2bf3c284d21c951364a6610e05c3eda981528a4c91431e2e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8a1420818c826ba0f204499be6384edcd76ccdcf6925dc30c515f6c2180235c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b18b6fd28c67104f382de54350ed48397b79a1ec24aa3c079bb616f3ca0437e2" + end + + depends_on "go" => :build + + # Allow setting the version during buildtime + patch do + url "https://raw.githubusercontent.com/NixOS/nixpkgs/1ac75001649e3822e9caffaad85d7f1db76e9482/pkgs/by-name/mo/mox/version.patch" + sha256 "5c35e348e27a235fad80f6a8f68c89fb37d95c9152360619795f2fdd5dc7403f" + end + + def install + ldflags = %W[ + -s -w + -X github.com/mjl-/mox/moxvar.Version=#{version} + -X github.com/mjl-/mox/moxvar.VersionBare=#{version} + -X main.changelogURL=none + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + user = ENV["USER"] + system bin/"mox", "quickstart", "-skipdial", "email@example.com", user + assert_path_exists testpath/"config" + assert_path_exists testpath/"config/mox.conf" + + assert_match "config OK", shell_output("#{bin}/mox config test") + + assert_match version.to_s, shell_output("#{bin}/mox version") + end +end diff --git a/Formula/m/moz-git-tools.rb b/Formula/m/moz-git-tools.rb new file mode 100644 index 0000000000000..01557d3cd0a9b --- /dev/null +++ b/Formula/m/moz-git-tools.rb @@ -0,0 +1,45 @@ +class MozGitTools < Formula + desc "Tools for working with Git at Mozilla" + homepage "https://github.com/mozilla/moz-git-tools" + url "https://github.com/mozilla/moz-git-tools/archive/refs/tags/v0.1.tar.gz" + sha256 "defb5c369ff94f72d272692282404044fa21aa616487bcb4d26e51635c3bc188" + license all_of: ["GPL-2.0-only", "CC0-1.0"] + head "https://github.com/mozilla/moz-git-tools.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "fe6165fdfda101ce38db57eb7352acf2fd00e96edef8eceef8fe30565cc07da1" + end + + deprecate! date: "2024-08-01", because: :repo_archived + disable! date: "2025-08-03", because: :repo_archived + + def install + # Install all the executables, except git-root since that conflicts with git-extras + bin_array = Dir.glob("git*").push("hg-patch-to-git-patch") + bin_array.delete("git-root") + bin_array.delete("git-bz-moz") # a directory, not an executable + bin_array.each { |e| bin.install e } + end + + def caveats + <<~EOS + git-root was not installed because it conflicts with the version provided by git-extras. + EOS + end + + test do + # create a Git repo and check its branchname + (testpath/".gitconfig").write <<~EOS + [user] + name = Real Person + email = notacat@hotmail.cat + EOS + + system "git", "init", "--initial-branch=main" + (testpath/"myfile").write("# BrewTest") + system "git", "add", "myfile" + system "git", "commit", "-m", "test" + assert_match "main", shell_output("#{bin}/git-branchname") + end +end diff --git a/Formula/m/mozjpeg.rb b/Formula/m/mozjpeg.rb new file mode 100644 index 0000000000000..4b4d0b897482c --- /dev/null +++ b/Formula/m/mozjpeg.rb @@ -0,0 +1,49 @@ +class Mozjpeg < Formula + desc "Improved JPEG encoder" + homepage "https://github.com/mozilla/mozjpeg" + url "https://github.com/mozilla/mozjpeg/archive/refs/tags/v4.1.5.tar.gz" + sha256 "9fcbb7171f6ac383f5b391175d6fb3acde5e64c4c4727274eade84ed0998fcc1" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ae8b8e5b56ea7d13b5f68225ade34c5e8818d169d8df8a1aa8f12b445dfbe6ff" + sha256 cellar: :any, arm64_sequoia: "93eea531e7d81f0aade7c403f3e0c65d545d9eade6e0e50bd43bf01cee48f110" + sha256 cellar: :any, arm64_sonoma: "5254d35ee2814e82b176fa779fc87a69468969dc28f750aaa602d17fd15d1646" + sha256 cellar: :any, arm64_ventura: "7b364b6311f2a0bcc20c22f66c38eee66427da82fd22293815456ff0f74027da" + sha256 cellar: :any, arm64_monterey: "3b30413d731bd4ad5175dad5e460f6606757ccd4f7d595dd722ce265c839d10d" + sha256 cellar: :any, sonoma: "fcb0583588eeba6f707aea5899ad93dd5eb49d2982019a4836d817ae0dfbb8bf" + sha256 cellar: :any, ventura: "db38b13c7efa289ddc6248e3068d3eade4c2314f795650d70bebd6c38d4cca3e" + sha256 cellar: :any, monterey: "6fddd7081db83c75d0098e0e681c4553b1e6d53fbb88cc744a766552f1f796ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2ecf43cea49223d6fd0bd8e781ed50e2104eb3fe7e5b4a6ec9ca30cbd87ca94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e69f9e76bf590d31a85839acdc52bbee9b1c4ccef0370f82f5a80e9d21c69298" + end + + keg_only "it conflicts with the standard libjpeg" + + depends_on "cmake" => :build + depends_on "nasm" => :build + depends_on "libpng" + + def install + args = std_cmake_args - %w[-DCMAKE_INSTALL_LIBDIR=lib] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_LIBDIR=#{lib}", *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"jpegtran", "-crop", "1x1", + "-transpose", "-optimize", + "-outfile", "out.jpg", + test_fixtures("test.jpg") + end +end diff --git a/Formula/m/mp3blaster.rb b/Formula/m/mp3blaster.rb new file mode 100644 index 0000000000000..c7b32b519d3b8 --- /dev/null +++ b/Formula/m/mp3blaster.rb @@ -0,0 +1,53 @@ +class Mp3blaster < Formula + desc "Text-based mp3 player" + homepage "https://mp3blaster.sourceforge.io" + url "https://downloads.sourceforge.net/project/mp3blaster/mp3blaster/mp3blaster-3.2.6/mp3blaster-3.2.6.tar.gz" + sha256 "43d9f656367d16aaac163f93dc323e9843c3dd565401567edef3e1e72b9e1ee0" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "2cbfef0efe3e24570f47c861959ab0cd66697709e878f9fc29525b8b25ce703e" + sha256 arm64_sequoia: "63db46a60c041370f9850800c5db80e4aae38d3bf3f2320cbbfcc03e5bffa2d5" + sha256 arm64_sonoma: "8ead649ae9cf1daec1f1c2d15c527c9beb9b51039668fed085857a33e83f7cae" + sha256 arm64_ventura: "301c45f8598765fdfacdbd773046f77406714c334946c6778cf7334b18004dbb" + sha256 arm64_monterey: "7ec5e7135245bad785d3267ee2dcca69442a9bf6e8e2922ef8cfd2d4632cdb4a" + sha256 arm64_big_sur: "accc717158abb4d7493f4ff6bdd6c3dcf192ba06208efb08f93bb8c0f461d2d4" + sha256 sonoma: "cde9f28105e542dec0abd01ed0e2dd7bb92396af46769f305e2379cad95b98ce" + sha256 ventura: "891ee24c9ab3afd96503c7a0baaf2e20bd3f2fe84f3727eeaf93b62d3de2b39d" + sha256 monterey: "0d343b563ad1378a233e2bb1d13207635b92aac493f8e39d9dc0800920d7699a" + sha256 big_sur: "6c1f0d720d7451421e8b86dd8f2d910613f7201da6ba56ea1b449b2d2e94aa90" + sha256 catalina: "8e52da9fa1ad2780c9fd408222a25eec77a7745a77faee1530edd959173392ad" + sha256 arm64_linux: "d360c18d25fd220b0bb7f887ef96014bee0a8766d95076e2e107e0f9a7a97efc" + sha256 x86_64_linux: "2ecc188df98ee829da61e43203f0f1d9601eb7a362b4821638ab08bba6f8c2b5" + end + + depends_on "sdl12-compat" + + uses_from_macos "ncurses" + + on_linux do + depends_on "libvorbis" + end + + def install + if DevelopmentTools.clang_build_version >= 1700 + # Fix to error: constant expression evaluates to -1 which cannot be narrowed to type 'unsigned int' + ENV.append_to_cflags "-Wno-c++11-narrowing" + # Fix to error: :invalid suffix on literal; C++11 requires a space between literal and identifier + ENV.append_to_cflags "-Wno-reserved-user-defined-literal" + end + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"mp3blaster", "--version" + end +end diff --git a/Formula/m/mp3cat.rb b/Formula/m/mp3cat.rb new file mode 100644 index 0000000000000..b716aedfb7d78 --- /dev/null +++ b/Formula/m/mp3cat.rb @@ -0,0 +1,34 @@ +class Mp3cat < Formula + desc "Reads and writes mp3 files" + homepage "https://tomclegg.ca/mp3cat" + url "https://github.com/tomclegg/mp3cat/archive/refs/tags/0.5.tar.gz" + sha256 "b1ec915c09c7e1c0ff48f54844db273505bc0157163bed7b2940792dca8ff951" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a2e0124370647ca7c0f28de6ca280a78d6fd3fd93005a8dc60f9dffdea1fa665" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5320e93de9cf583fc6b074a45c450c4ebb0fc6b86dbf887c9d77196a34655271" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5c88c18fd159e395849b60bea5da8355546c7e3de34a521c5d5e9eb5f6ddd83" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48fda37f67df97cd462cbcda6e81dddb94bb1aea9615b899225ca8ca0f4a6d49" + sha256 cellar: :any_skip_relocation, arm64_monterey: "11c1d1c6470951c00be5c9bc094686503ef53fb1a8ac7231c2de57232f2177f1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d5b602f2c0aafa37b863446069097523612ae44f2a14c4e49f179445a4b0edd5" + sha256 cellar: :any_skip_relocation, sonoma: "3624f0834cc2e7d9e613cc16c4102d49c9f64466ea1113a429a9e9849a850cc2" + sha256 cellar: :any_skip_relocation, ventura: "d7de68fc20fca732b5cc6f5d7a62f961e88d97e59f938a6f0aff4a96ad6125da" + sha256 cellar: :any_skip_relocation, monterey: "1e593ffe33a8086bf084b92d472420a2a462a34b7332fba0b29a71d3acda1a67" + sha256 cellar: :any_skip_relocation, big_sur: "2cb3c8420e4858acf5edd529ce7d68c79d03f3d463c45460d9209308daa292db" + sha256 cellar: :any_skip_relocation, catalina: "07766f0495aa6c8566d8594a64f5004d1ad56f7e522f90cc1dcaf58001e7d2ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f43d17baaae1fdf3ad7d231ad245e93212ff4fca7af462567fcc6c5980735fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1644ebe7bba692667cae251c36c2d7c7d2d5aa49e53291a247831bf866ed2ba4" + end + + def install + system "make" + bin.install %w[mp3cat mp3log mp3log-conf mp3dirclean mp3http mp3stream-conf] + end + + test do + pipe_output("#{bin}/mp3cat -v --noclean - -", test_fixtures("test.mp3").to_s) + end +end diff --git a/Formula/m/mp3check.rb b/Formula/m/mp3check.rb new file mode 100644 index 0000000000000..9a6456269a9bc --- /dev/null +++ b/Formula/m/mp3check.rb @@ -0,0 +1,43 @@ +class Mp3check < Formula + desc "Tool to check mp3 files for consistency" + homepage "https://code.google.com/archive/p/mp3check/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp3check/mp3check-0.8.7.tgz" + sha256 "27d976ad8495671e9b9ce3c02e70cb834d962b6fdf1a7d437bb0e85454acdd0e" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7b728bb5db4fb551bba2fe2ca58a59ae28df476caa8457d4b9ee5d04811d77ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cd5050fc0ece72900fdee9f06144599fd519f2f62fa3ec3f8ed0af1e4805301" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42c1f2ae16cad1568599d24fbf5ad30f8fab865e9c00dab2fc73eb32eba401d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "17d0d21d24eae65edccb72577dbc578d89d1660a7c95eda9c521c2ac27636f6a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ae74bb7b036881a560bb8de9ab44ef31cbdfc1d9c710fed0183de39c2fc5272f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c0c683cf446e72e17104142e290f2bf3fea6fd01fcf1534ba1c61c7d5a85bb05" + sha256 cellar: :any_skip_relocation, sonoma: "5054f3206f9d33b896b7a7f17afd87494d8e8dfaf0e970a2cb53972dd2f2c31e" + sha256 cellar: :any_skip_relocation, ventura: "8223c78bae026c58b1e0407a174a3614201b7bb909fcb8ad699973c61ba3406e" + sha256 cellar: :any_skip_relocation, monterey: "f798432e9eae61bdf47178e912582b02d9482640375174d26714a59185e626db" + sha256 cellar: :any_skip_relocation, big_sur: "943c98e4c93c300a781541927303207319ba030227a0e1dd123fd83abb782ad0" + sha256 cellar: :any_skip_relocation, catalina: "a98298c030d1ee1a28e2227ed41970fcad21d2af6486c471d045b07010ac232b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8625b856fd021c64af2aac4b515ae9a8be25c0949231f6b7b24ba16b8df75b52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72769405fb206a5851bac35ea59bc0d4b7663c57a62cdc8bfa172fa21379130e" + end + + # Apply Debian patch to fix build with newer C++ standards + patch do + url "https://salsa.debian.org/reichel/mp3check/-/raw/2154e6fcb25189ab45c3ae6f787adc8526ad1377/debian/patches/fix_ftbfs_with_gcc_9" + sha256 "00c90ab89e181cbbfe8ac54280acd17cfe6a1d3f4844685aca0426b9291f932f" + end + + def install + ENV.deparallelize + # The makefile's install target is kinda iffy, but there's + # only one file to install so it's easier to do it ourselves + system "make" + bin.install "mp3check" + end + + test do + assert version.to_s, shell_output("#{bin}/mp3check --version") + end +end diff --git a/Formula/m/mp3fs.rb b/Formula/m/mp3fs.rb new file mode 100644 index 0000000000000..7308fd0b9284f --- /dev/null +++ b/Formula/m/mp3fs.rb @@ -0,0 +1,32 @@ +class Mp3fs < Formula + desc "Read-only FUSE file system: transcodes audio formats to MP3" + homepage "https://khenriks.github.io/mp3fs/" + url "https://github.com/khenriks/mp3fs/releases/download/v1.1.1/mp3fs-1.1.1.tar.gz" + sha256 "942b588fb623ea58ce8cac8844e6ff2829ad4bc9b4c163bba58e3fa9ebc15608" + license "GPL-3.0-or-later" + revision 5 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "bf3512ee2e43d7727ef0bc31739bb4b8d4f1a124041aca64b6eac50a922dbeb2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db1aaedbc1b394893b7b3344b0861aeb573f22009c72559c3e2e7cf8037cc986" + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "lame" + depends_on "libfuse@2" + depends_on "libid3tag" + depends_on "libvorbis" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match "mp3fs version: #{version}", shell_output("#{bin}/mp3fs -V") + end +end diff --git a/Formula/m/mp3gain.rb b/Formula/m/mp3gain.rb new file mode 100644 index 0000000000000..68f383270c14d --- /dev/null +++ b/Formula/m/mp3gain.rb @@ -0,0 +1,37 @@ +class Mp3gain < Formula + desc "Lossless mp3 normalizer with statistical analysis" + homepage "https://mp3gain.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mp3gain/mp3gain/1.6.2/mp3gain-1_6_2-src.zip" + version "1.6.2" + sha256 "5cc04732ef32850d5878b28fbd8b85798d979a025990654aceeaa379bcc9596d" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "29068cf92340a0434d5cb8bb98479ab79de6831d80f21916dbfc806ffabd71e2" + sha256 cellar: :any, arm64_sequoia: "2a9cae1ecdebe6daa0509f9841ecddb0c6a820919224caa5a1fcc2c62ec0d258" + sha256 cellar: :any, arm64_sonoma: "14fd6ea3919a61ab26359d1013eb3bedbe65cbe66d05efa179ba70be16fb1ba8" + sha256 cellar: :any, arm64_ventura: "d0b9afb6732e4f32ba35895a1616512871c41680e677880db81be8035514651e" + sha256 cellar: :any, arm64_monterey: "30ce022d5614764c00f9013d2b718e11672680e2dde038604d133a4ad8bc4b02" + sha256 cellar: :any, arm64_big_sur: "d4e92ab9bfc8143f4442f6d7c3f78a3ef92677d44198402ef5d05a604481b414" + sha256 cellar: :any, sonoma: "b2705beaa54c1f2acdc994664e190a83de082b3b453418c9410a9272cda66729" + sha256 cellar: :any, ventura: "55b9710be466fa70dba864853f6c4b1bb251b5bb8ea1f6a83e7ecc9fba3ec0f5" + sha256 cellar: :any, monterey: "2d18dd77dc786372e6cb010f3abc4f893492faece974b1cd46a40f9e53b6bc1a" + sha256 cellar: :any, big_sur: "d31ec490fe52fd92457325ec9d1161104283d1c16cee1c73c2d083a847d187e1" + sha256 cellar: :any, catalina: "27dbf67d73a4f63cd06cc568b8a40d09e3fec5e858c447da1750b2093046d795" + sha256 cellar: :any_skip_relocation, arm64_linux: "98696b13ab4fde544d5baa9d81c1ce457f52520c9927f77dc89e72eb31e2a6ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a38486ace3008b4e9c5de0fa3d94c66c66108b5340e887ec0f322a3f9525d536" + end + + depends_on "mpg123" + + def install + system "make" + bin.install "mp3gain" + end + + test do + system bin/"mp3gain", "-v" + end +end diff --git a/Formula/m/mp3info.rb b/Formula/m/mp3info.rb new file mode 100644 index 0000000000000..7c5bca2f11245 --- /dev/null +++ b/Formula/m/mp3info.rb @@ -0,0 +1,48 @@ +class Mp3info < Formula + desc "MP3 technical info viewer and ID3 1.x tag editor" + homepage "https://www.ibiblio.org/mp3info/" + url "https://www.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-0.8.5a.tgz" + sha256 "0438ac68e9f04947fb14ca5573d27c62454cb9db3a93b7f1d2c226cd3e0b4e10" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/" + regex(/href=.*?mp3info[._-]v?(\d+(?:\.\d+)+(?:[._-]?[a-z]\d*)?)\.(t|zip)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d0639d384ade218845be170da852cfc449bd37d136857ed765e42af992ca260" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e37b7f219ffcd93287b959d108fd79cf870a3e980f989962a8e7edd8b3d90106" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f7b1c26df867fb0e9031c525710cdc3e3cab06f1885f8da99ed41753eee0735" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81ac6e08be5d5bcdeb1fe53b6ae9967662fc31fcb18cd9de9a8758ced4a1d3a7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4d14f5dd7a1e4f7e441e94d5c43f7786169190125da84e1b425005c79164e55d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ebb88262f3ba1eb8196c8821769298b4aa29bb4c5d0733fc8dcd47092cfafdd5" + sha256 cellar: :any_skip_relocation, sonoma: "098e6dc6a470fdc2fdcb12612036c40e9ad5775cf301986220911865cc102638" + sha256 cellar: :any_skip_relocation, ventura: "0f0471f80fe9004fd5c0028ffc6ab8b5b5240474a5b04533b5d53104e732d7a8" + sha256 cellar: :any_skip_relocation, monterey: "a6c032a31a38ab8d086b20944fd5b4e3bf074ecaca2f7d593897fd5deb19e250" + sha256 cellar: :any_skip_relocation, big_sur: "f5e52d02125f49b9c5afc960a565f7f5a774ced3f88fabd07d2723e741369d82" + sha256 cellar: :any_skip_relocation, catalina: "4f70eb02805d1fe2a93dc169b9baf2a3d1c685ded71094241189c93599ba6662" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d8c26e4f4fec89140d5ec6261d115ce6d7ab076c7ce1f42fc16c6cb60f645fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cfece9c5d6614f0c1139161f6ca6ced317514cc45a7b13d06ecf0316b53656f" + end + + uses_from_macos "ncurses" + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mp3info/patch-mp3tech.c.diff" + sha256 "846d6f85a3fa22908c6104436e774fc109547f7c6e9788c15dd9e602228b7892" + end + + def install + system "make", "mp3info", "doc" + bin.install "mp3info" + man1.install "mp3info.1" + end + + test do + system bin/"mp3info", "-x", test_fixtures("test.mp3") + end +end diff --git a/Formula/m/mp3splt.rb b/Formula/m/mp3splt.rb new file mode 100644 index 0000000000000..ba25ddf99a60e --- /dev/null +++ b/Formula/m/mp3splt.rb @@ -0,0 +1,42 @@ +class Mp3splt < Formula + desc "Command-line interface to split MP3 and Ogg Vorbis files" + homepage "https://mp3splt.sourceforge.net/mp3splt_page/home.php" + url "https://downloads.sourceforge.net/project/mp3splt/mp3splt/2.6.2/mp3splt-2.6.2.tar.gz" + sha256 "3ec32b10ddd8bb11af987b8cd1c76382c48d265d0ffda53041d9aceb1f103baa" + license "GPL-2.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "867a665c9465e82d864910185387d4df79bced27f9121ccff36bd2f32524820e" + sha256 arm64_sequoia: "2d21b2a3b74e156a07882dfc20c2707bf836f011b914c88f6245a06230eacfdf" + sha256 arm64_sonoma: "173c1125749f0ecc643c6b98b9b0d38f60c0e7521a6cc0cdcfef9a076e03953d" + sha256 arm64_ventura: "4e6894c387e086d64cb6ca49c9b980db9bd005244f6cde36408d362a4aee80d7" + sha256 arm64_monterey: "49093f6c535038ac74f901f3ec328da4611621c554c9fd016170e7609b2bacac" + sha256 arm64_big_sur: "991b32e34ed74df29e4fc4a5507079aade0cb8edd0dd32569ece51bda3a56be1" + sha256 sonoma: "ff82187f8d9e0609554d79b6a342ce374b9ea60e2e9d9c092571910cb9435ff6" + sha256 ventura: "94f427450b774e0ad378acee6265be5ea628cd7ff38274bd3f1aa3516b414138" + sha256 monterey: "6095cb447c23f8b7c736f858e3420c50b2b21134afea5c319873738c895debc6" + sha256 big_sur: "2bf269ede24f7a0b067a510f355d503a1424b1fa5599a019093cc75efb10c7da" + sha256 catalina: "8d020baec2beb1f7f24223ade4f40b758b2dee3329c71aa69929b7dde620bfac" + sha256 arm64_linux: "7c54aa0ebc5caa53ab0f8a09d55c9e9f7ff7226a688a31fb74aa38f4fe8c0e25" + sha256 x86_64_linux: "5827fe65a9230261acc5309197b66205d2c72492d58ac2ed2b6a4d38632fea66" + end + + depends_on "pkgconf" => :build + depends_on "libmp3splt" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"mp3splt", "-t", "0.1", test_fixtures("test.mp3") + end +end diff --git a/Formula/m/mp3unicode.rb b/Formula/m/mp3unicode.rb new file mode 100644 index 0000000000000..73ba1b0827c6a --- /dev/null +++ b/Formula/m/mp3unicode.rb @@ -0,0 +1,58 @@ +class Mp3unicode < Formula + desc "Command-line utility to convert mp3 tags between different encodings" + homepage "https://mp3unicode.sourceforge.net/" + license "GPL-2.0-only" + + stable do + url "https://github.com/alonbl/mp3unicode/releases/download/mp3unicode-1.2.1/mp3unicode-1.2.1.tar.bz2" + sha256 "375b432ce784407e74fceb055d115bf83b1bd04a83b95256171e1a36e00cfe07" + + # Backport support for taglib 2 + patch do + url "https://github.com/alonbl/mp3unicode/commit/a4958c3b5cbfd7464a2d05f5212c0eb21ddf7210.patch?full_index=1" + sha256 "7cdaf35bb09b5d4ee9c3ef4703bed415ed9df8be5e64f06dc7b4654739e58ab4" + end + end + + livecheck do + url :stable + regex(/^mp3unicode-v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "75d5fc48faf45713ba932224204b1a5334a4f0aff1955c22913fa40238d457cd" + sha256 cellar: :any, arm64_sequoia: "b0f39474b3f41688794f00e4815e40a6aa792614610870d4ec1377d5a67ed5c7" + sha256 cellar: :any, arm64_sonoma: "54f458d22e3d58242645a99c9c3a3b90c013fb815ddca51775469bb4c04fe2d8" + sha256 cellar: :any, arm64_ventura: "7b7678aef37dc84509ae7918c2ab3288bb8daff100402b3d820802dc778fccb0" + sha256 cellar: :any, sonoma: "81dcda2481711046268ce10a1980298d3ea38e3c3c94bba92bf510d2e4fc62e0" + sha256 cellar: :any, ventura: "cf53f60a18ca4821fd4c242efce17a6424aa44a4e413de27e60463d6846540b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "54bfbaee2ebfdcef4e35e69cf8b9224e477b357d449e2badd94580014e0682e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4360c1dd812097207ccf5ba329d8cf1082e152a78fba69a8f1273c29ac0bb89f" + end + + head do + url "https://github.com/alonbl/mp3unicode.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "taglib" + + def install + ENV.append "ICONV_LIBS", "-liconv" if OS.mac? + ENV.append "CXXFLAGS", "-std=c++17" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"mp3unicode", "-s", "ASCII", "-w", test_fixtures("test.mp3") + end +end diff --git a/Formula/m/mp3val.rb b/Formula/m/mp3val.rb new file mode 100644 index 0000000000000..30889053dc6a6 --- /dev/null +++ b/Formula/m/mp3val.rb @@ -0,0 +1,41 @@ +class Mp3val < Formula + desc "Program for MPEG audio stream validation" + homepage "https://mp3val.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mp3val/mp3val/mp3val%200.1.8/mp3val-0.1.8-src.tar.gz" + sha256 "95a16efe3c352bb31d23d68ee5cb8bb8ebd9868d3dcf0d84c96864f80c31c39f" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7165855c5d406a93a818986f684dcecde388a8e65cf0b5922e9f0b4a1fafccc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5c10f2c40b3db42ee31ebdff666e1f56da1b200829945556f269cc1be920c64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef2fd722be9a2d08c7d180ed19f6be46bc2944392f996b607ecacdd10ef1b0b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e063b1b72dc1265814eeac66793a4778a389aa0d0b5eaf1fe459e934195f8c6e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "75d055d4fb5b3abc7ded7ad8e99011fc2e84cf0d8c24c01f1512941b17d3f02d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8d5718fcb9967416eb3e3cf3e9a186e98bade6be099c57583b0d9dcc0fa43103" + sha256 cellar: :any_skip_relocation, sonoma: "15fc504bc8eac0681a75c0dee18eb114313d8393b11bc3ab412d68240fa51cc1" + sha256 cellar: :any_skip_relocation, ventura: "2e853ffc3b232162f4efc76f4b166684f7433dbb0548ed424154527ae81b4289" + sha256 cellar: :any_skip_relocation, monterey: "981e3b3fbb87bd417e50d947bb994049508ce850ffd432c9d3ae0306cf3e6182" + sha256 cellar: :any_skip_relocation, big_sur: "671ef59185d212e89c19dda72da09ef7a37e3055f4d42d188079f29122c641dc" + sha256 cellar: :any_skip_relocation, catalina: "c08b493f2f59730486c427b795112ea1c730fb9bb7dcbc0bc9158c2c28a30c51" + sha256 cellar: :any_skip_relocation, arm64_linux: "83bae7eb1335d4f48f940a32c11d5e4e62fe48a4485a2d727456c6def98af8cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b36cb11d26af2abdb0e0d811bb91f24d9b7e78bfdd8cd65f0aa2283c08725feb" + end + + def install + # Apply this upstream commit to fix build on Linux: + # https://sourceforge.net/p/mp3val/subversion/95/ + # Remove with next release. + inreplace "crossapi.cpp", + "od=open(szNewName,O_WRONLY|O_CREAT|O_TRUNC);", + "od=open(szNewName,O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR);" + system "make", "-f", "Makefile.gcc" + bin.install "mp3val.exe" => "mp3val" + end + + test do + mp3 = test_fixtures("test.mp3") + assert_match(/Done!$/, shell_output("#{bin}/mp3val -f #{mp3}")) + end +end diff --git a/Formula/m/mp3wrap.rb b/Formula/m/mp3wrap.rb new file mode 100644 index 0000000000000..f4d08e45a756b --- /dev/null +++ b/Formula/m/mp3wrap.rb @@ -0,0 +1,45 @@ +class Mp3wrap < Formula + desc "Wrap two or more mp3 files in a single large file" + homepage "https://mp3wrap.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mp3wrap/mp3wrap/mp3wrap%200.5/mp3wrap-0.5-src.tar.gz" + sha256 "1b4644f6b7099dcab88b08521d59d6f730fa211b5faf1f88bd03bf61fedc04e7" + license "LGPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/mp3wrap[._-]v?(\d+(?:\.\d+)+)(?:-src)?\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "28af69383fd4f657495f0aedda9e53ac66cccce24bda0a280ebf5a79939cce6e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "881da7c1c1c1d3b667f6524d66c01de8d73e8a113b84763ea0d57395518c3523" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5c9848d068d5f4f3758dc2629daea1ac755ce288b9663b302b13045bc9a1e0e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e2bf343f21cede8d098ddb1c389818e91d8aaa8363601b1c3f56d02b2152285f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5a84d1acbd3aaa6432bf22d6052c1d8afa5b54145e1ecec0a16c6da05cf2df95" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9ee84cc1015ba99900a71896d7055b3fcf305828dc6a8430da552b0fee18a01b" + sha256 cellar: :any_skip_relocation, sonoma: "73592a53432ef216313142884f12af2b40c2a62b86d4ed1539b3824d7c66f675" + sha256 cellar: :any_skip_relocation, ventura: "6f72f17884f6f657f8c8db28383b880d6fb4448181689997c9834d860d28b7bf" + sha256 cellar: :any_skip_relocation, monterey: "e07fa1bc62342d8166accae07efd264b0449ee57ed27224f05897444bbec43fc" + sha256 cellar: :any_skip_relocation, big_sur: "fb2198208b5da896231a815235652c3342ed305a858950c9fb10bc7e296d1e34" + sha256 cellar: :any_skip_relocation, catalina: "fa93ce86b2a055521e166325b4219773f04c6886075bd77932dcb6dff436ddce" + sha256 cellar: :any_skip_relocation, arm64_linux: "962b508b014f584bcb0ea88a84e150e6c0ebdb80573252a7ffca2c6bc25bb567" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e666ba56f6a93702e3a37b4dd6f8d908b6a16246ba9ad5467518c970f4ac30ab" + end + + def install + # Workaround for arm64 linux. Upstream isn't actively maintained + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + source = test_fixtures("test.mp3") + system bin/"mp3wrap", "#{testpath}/t.mp3", source, source + assert_path_exists testpath/"t_MP3WRAP.mp3" + end +end diff --git a/Formula/m/mp4v2.rb b/Formula/m/mp4v2.rb new file mode 100644 index 0000000000000..84f9359ae0922 --- /dev/null +++ b/Formula/m/mp4v2.rb @@ -0,0 +1,44 @@ +class Mp4v2 < Formula + desc "Read, create, and modify MP4 files" + homepage "https://mp4v2.org" + url "https://github.com/enzo1982/mp4v2/releases/download/v2.1.3/mp4v2-2.1.3.tar.bz2" + sha256 "033185c17bf3c5fdd94020c95f8325be2e5356558e3913c3d6547a85dd61f7f1" + license "MPL-1.1" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bf656d8a485b0663a730368ad755d921f3456ceeca347501c8cbcc401c63bbc6" + sha256 cellar: :any, arm64_sequoia: "1a2c9a7beb75abcc15327b7b7437a831ae61855cc781e1200d11a4c1cf34a299" + sha256 cellar: :any, arm64_sonoma: "e9bc1800a60417f19d19347569285480d631355b615ad520d2b5c4f28b219d28" + sha256 cellar: :any, arm64_ventura: "1eeebb5c4beeda316aec2ab260c37b2eb7375330af16ff7f80a5e63f61ca7042" + sha256 cellar: :any, arm64_monterey: "ab285946431ba3b30e0541a5391ff4ae0af7fa6ec6d84bd3213ac34400bf4682" + sha256 cellar: :any, arm64_big_sur: "48b40608f388870c825a0655c317293927d37899fc412c73c998cb3db60b1670" + sha256 cellar: :any, sonoma: "59d2e7c940d983d7f291230b93df803ab99ae9834a40adec08d77be60e05f858" + sha256 cellar: :any, ventura: "5f584150ea02e3b5d3049a117b60dbe88d412c380442fef8246267bf6f66ed36" + sha256 cellar: :any, monterey: "62619da0d20b36b5854c08f531687dfe55d9fbd87dabaaf985ced7fe1b24b3aa" + sha256 cellar: :any, big_sur: "c7c93618a03cfb59e95a6d39e9e6e9d1f355b72ea199b9c6e3d881f606323c88" + sha256 cellar: :any_skip_relocation, arm64_linux: "01e24f92ce3d4edfeb7bd53fcb063d6bae8152ccc74f50a8be0ea98f8bb2bee9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "529cebb9ec595d2834e29ff7be7a29150453be53b55a1269284992cd8c35de06" + end + + conflicts_with "bento4", + because: "both install `mp4extract` and `mp4info` binaries" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + system "make", "install-man" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mp4art --version") + end +end diff --git a/Formula/m/mpack.rb b/Formula/m/mpack.rb new file mode 100644 index 0000000000000..a5d39aefea98d --- /dev/null +++ b/Formula/m/mpack.rb @@ -0,0 +1,47 @@ +class Mpack < Formula + desc "MIME mail packing and unpacking" + homepage "https://web.archive.org/web/20190220145801/ftp.andrew.cmu.edu/pub/mpack/" + url "https://ftp.gwdg.de/pub/misc/mpack/mpack-1.6.tar.gz" + mirror "https://fossies.org/linux/misc/old/mpack-1.6.tar.gz" + sha256 "274108bb3a39982a4efc14fb3a65298e66c8e71367c3dabf49338162d207a94c" + license "BSD-3-Clause" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39ef950b3be79638f72addb1f2bd87c4c67f9bddeb55f62910175ab6c90b6dc8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93385223f8645ef28a3a518b5eb932d7b17a55bc113fd22522190c5504670b1b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6aab109b96f77c14fb2f445ef2e1da17f9bb28169c9aef6e7806f32df5b6143d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0ddea83dccaf311d5310e4147a3ba9a80523326bce98af5200e2e7bec7cc0782" + sha256 cellar: :any_skip_relocation, sonoma: "a7a9affafe46b5198dc95c2b0cfb4bf9514f6a58d43fae6524b735a6a9cf76a1" + sha256 cellar: :any_skip_relocation, ventura: "1cd7be9284fb871ac17b2cd0be687719104fa5a792c608f22f875c21c3fed004" + sha256 cellar: :any_skip_relocation, monterey: "1622ba058cfb546fae179857ce3a9878d770ae2a16c801b3ef019c39a7a40a66" + sha256 cellar: :any_skip_relocation, arm64_linux: "078f23d93e4a983bd4ac5fe1be780f900e3ddbb1258e9544388afa43534974eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f75abfc3198ea5dfd73192c148cf90a0a01e80143acde96fc9f18ff63e3e9514" + end + + deprecate! date: "2024-07-21", because: :repo_removed + disable! date: "2025-07-26", because: :repo_removed + + # Fix missing return value; clang refuses to compile otherwise + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mpack/uudecode.c.patch" + sha256 "52ad1592ee4b137cde6ddb3c26e3541fa0dcea55c53ae8b37546cd566c897a43" + end + + # Fix build failure because of missing include statements on Linux. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mpack/linux.patch" + sha256 "3123446e13b34a083cab8408e16fce0a4dba78c170887722f4cd4306798c54d0" + end + + def install + # Workaround for newer Clang + if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-implicit-int -Wno-implicit-function-declaration" + end + + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end +end diff --git a/Formula/m/mpage.rb b/Formula/m/mpage.rb new file mode 100644 index 0000000000000..90acfc2a2ae43 --- /dev/null +++ b/Formula/m/mpage.rb @@ -0,0 +1,43 @@ +class Mpage < Formula + desc "Many to one page printing utility" + homepage "https://mesa.nl/pub/mpage/README" + url "https://mesa.nl/pub/mpage/mpage-2.5.8.tgz" + sha256 "2351e91d25794b358df6618f17a7013a28d350ec20408fe06f8123dc4673fe93" + license "GPL-2.0-or-later" + + livecheck do + url "https://mesa.nl/pub/mpage/" + regex(/href=.*?mpage[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "860aacd1390ce895e9dd5099c4811c708d2b3990e0fe41928cf56d5ac7af89c8" + sha256 arm64_sequoia: "a596325fba30e7574a19d7fcf3b338f02fa91e9074a13609c7d356b9bba67b29" + sha256 arm64_sonoma: "c94c08b44f7dc6719d73f7eb8e103622190b9f189f3352dc8d4360c882280c24" + sha256 arm64_ventura: "73e7baeaab7049ad6283a84d4ded710eee5597bf08afaf91fe9d3e63fa254b28" + sha256 arm64_monterey: "0a67c5c240e36df17b8133621bc3a620a8bbd211a44f3971edff3d81a363d652" + sha256 arm64_big_sur: "ab9465239a6f52df582be02ff654c4d5f64cf84b0674bb8326e104119dbc185a" + sha256 sonoma: "6ac0089f8a3aeb93e7670556f6a9191272c5c715cc53c3dedde1559a1f7533d8" + sha256 ventura: "fe00986658cf5c208b1335724d6856090f9b957c1bc937c016270cbc132d506a" + sha256 monterey: "a030ebbb33d31ab4620835a6d6fbdd335f5d9570198ed652c8cab55831a5b29b" + sha256 big_sur: "77f4a54443d7d8f6ee681d061c1e30aabc9021ceb6a5ff6a26bc85d992824f11" + sha256 arm64_linux: "066fff24a4048340ee0cc2028a3bfb93432af6fd546aecf61106c7f33a70032e" + sha256 x86_64_linux: "6a4e4a8c70d9b83690c2e0c3bd94574f8e3e6a0cadcf12cc80ba197d79186c56" + end + + def install + args = %W[ + MANDIR=#{man1} + PREFIX=#{prefix} + ] + system "make", *args + system "make", "install", *args + end + + test do + (testpath/"input.txt").write("Input text") + system bin/"mpage", "input.txt" + end +end diff --git a/Formula/m/mpc.rb b/Formula/m/mpc.rb new file mode 100644 index 0000000000000..263c617e2af97 --- /dev/null +++ b/Formula/m/mpc.rb @@ -0,0 +1,44 @@ +class Mpc < Formula + desc "Command-line music player client for mpd" + homepage "https://www.musicpd.org/clients/mpc/" + url "https://www.musicpd.org/download/mpc/0/mpc-0.35.tar.xz" + sha256 "382959c3bfa2765b5346232438650491b822a16607ff5699178aa1386e3878d4" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.musicpd.org/download/mpc/0/" + regex(/href=.*?mpc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a325c2d6c27f05beb9fda4c43029512fe2c8542793a3773cf27ac4684f794904" + sha256 cellar: :any, arm64_sequoia: "db50052b3d26b915d7dc62a48b0a321a8c7508e1432db97da28d784011b267bd" + sha256 cellar: :any, arm64_sonoma: "f1e59f68f047fc8dd086e5e794345af28749a3d2b83e5d922c1245a6f32a1c36" + sha256 cellar: :any, arm64_ventura: "331071de8326f5a6fa77df9ccd4c0631935df430e87842561f2879c7c313c06d" + sha256 cellar: :any, arm64_monterey: "cf09306f0bc1483fc89e9eaadf2804a451c679d1d2c5df6c22093de692edf3db" + sha256 cellar: :any, sonoma: "1dd3c6edc2ac8b09944f66a93a0cd3bad09afda8c0ae03cd6880a4aa62996789" + sha256 cellar: :any, ventura: "ff84bbc1db8188aa75c9af29d4c0fb3c46f501c806db958493d84bcf2ee6a9d3" + sha256 cellar: :any, monterey: "d3ca1dc058c82ba52016809f097666105535f5346a91b0c3b1092300e6831214" + sha256 arm64_linux: "0acf954601f5908c4fb4f2488b46f84abbed2759b8189eb237823a80c79adcea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9195f0deda2f2ec4a6a9863275299136388eccfab23b6d46d682eca7e773591" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libmpdclient" + + def install + system "meson", "setup", "_build", *std_meson_args + system "meson", "compile", "-C", "_build", "--verbose" + system "meson", "install", "-C", "_build" + + bash_completion.install "contrib/mpc-completion.bash" => "mpc" + rm share/"doc/mpc/contrib/mpc-completion.bash" + end + + test do + assert_match "query", shell_output("#{bin}/mpc list 2>&1", 1) + assert_match "-F _mpc", shell_output("bash -c 'source #{bash_completion}/mpc && complete -p mpc'") + end +end diff --git a/Formula/m/mpck.rb b/Formula/m/mpck.rb new file mode 100644 index 0000000000000..5da9f512d0b52 --- /dev/null +++ b/Formula/m/mpck.rb @@ -0,0 +1,40 @@ +class Mpck < Formula + desc "Check MP3 files for errors" + homepage "https://checkmate.gissen.nl/" + url "https://checkmate.gissen.nl/checkmate-0.21.tar.gz" + sha256 "a27b4843ec06b069a46363836efda3e56e1daaf193a73a4da875e77f0945dd7a" + license "GPL-2.0-or-later" + + livecheck do + url "https://checkmate.gissen.nl/download.php" + regex(/href=.*?checkmate[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d2724946fd57b26d6af09556f4542e2eb04721e2f3043a0e8a38eed5144e0550" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "81d2d6e7ea068e0cc9f43913ca1e946efe3cadd19a6e89ee88a7b734dc800cee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9eeb22c03ef069272b7a17479aa9c88b3778fd6ffbd4b9196da8b1b68bcee68a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "319209a5338628eebd83135c485ae2767ee55361437e420c8f3940d90de7ec6b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bad165fd261de0bdfe9c3a5cb0d91204cfc42bfccc9562de1086f16f0bfd3b2a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f963c58102f58169a5ea1d6264f3ea1093a62fd6461332d5e70d0e1ad9aa5d79" + sha256 cellar: :any_skip_relocation, sonoma: "d1f6418aa6a0cbd47ef102d7c099fb9eebecafd8e5609594162d79a25efe9d5e" + sha256 cellar: :any_skip_relocation, ventura: "531607b5301ef2e894c27cfd04f13eb435ad6eebb26213de07671809b20ddba3" + sha256 cellar: :any_skip_relocation, monterey: "5eb5da1b3e78b8aba77f69dc5df1c596238a401da8b3bbd2c34f971d9b0d2874" + sha256 cellar: :any_skip_relocation, big_sur: "215f2f66b6567409359c6a0f784702df9fcc2e0c86edcab52fc40f91b6911bb9" + sha256 cellar: :any_skip_relocation, catalina: "45f8695f2758dd07237c333e8a17aa38f8d0aed4e87e8b5dc7fea7bf4537b0e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "22ac6376ab61a0f98ba1cec33f9fbe3af88ada272ebdcf90bc1ff2c345174496" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fcc623716e6209ba20e0e6211f90f96e2052b180282694d608677df4bdc72ed" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"mpck", test_fixtures("test.mp3") + end +end diff --git a/Formula/m/mpd.rb b/Formula/m/mpd.rb new file mode 100644 index 0000000000000..e822b00431ab3 --- /dev/null +++ b/Formula/m/mpd.rb @@ -0,0 +1,167 @@ +class Mpd < Formula + desc "Music Player Daemon" + homepage "https://www.musicpd.org/" + url "https://github.com/MusicPlayerDaemon/MPD/archive/refs/tags/v0.24.6.tar.gz" + sha256 "2cb85b48303f1b6325dc37ee9aeb65ae5353820b4761d4ca53f61c680716ae90" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/MusicPlayerDaemon/MPD.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d7f80f096fa90fe8c6eb1a7e4d804a4a8403e2ebf9329575f40d6569633f471a" + sha256 cellar: :any, arm64_sequoia: "009a63846ecddd6e290e6df05524f8340ccfe0613fd26ef6dd8bdebd1c44985f" + sha256 cellar: :any, arm64_sonoma: "2a46e31a40b4bae24a412a919b329e781a94a6722f4a56cb0d8653685f33e3b8" + sha256 cellar: :any, sonoma: "8a42f8237b18d5f23231b91bc601d2fd1173d23666ebd221a00f185d466ca39b" + sha256 arm64_linux: "115c4fdbe75ec9a47364d968803098708ee0b8fbf37a03fdcf9d101faa855060" + sha256 x86_64_linux: "3b5bdbaeed6b16a335f66af526d789dc41e0c44a86beb6d1e8d30de7679afd40" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + + depends_on "chromaprint" + depends_on "faad2" + depends_on "ffmpeg" + depends_on "flac" + depends_on "fluid-synth" + depends_on "fmt" + depends_on "game-music-emu" + depends_on "icu4c@77" + depends_on "lame" + depends_on "libao" + depends_on "libid3tag" + depends_on "libmikmod" + depends_on "libmpdclient" + depends_on "libnfs" + depends_on "libogg" + depends_on "libsamplerate" + depends_on "libshout" + depends_on "libsndfile" + depends_on "libsoxr" + depends_on "libupnp" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "opus" + depends_on "pcre2" + depends_on "sqlite" + depends_on "wavpack" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "zlib" + + on_ventura :or_older do + depends_on "llvm" + + fails_with :clang do + cause "Needs C++20 std::make_unique_for_overwrite" + end + end + + on_linux do + depends_on "systemd" => :build + depends_on "alsa-lib" + depends_on "dbus" + depends_on "jack" + depends_on "pulseaudio" + depends_on "systemd" + end + + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + def remove_brew_expat + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + + def install + if OS.mac? && MacOS.version <= :ventura + remove_brew_expat + ENV.llvm_clang + ENV.append "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/unwind -lunwind" + # When using Homebrew's superenv shims, we need to use HOMEBREW_LIBRARY_PATHS + # rather than LDFLAGS for libc++ in order to correctly link to LLVM's libc++. + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + args = %W[ + --sysconfdir=#{etc} + -Dmad=disabled + -Dmpcdec=disabled + -Dao=enabled + -Dbzip2=enabled + -Dchromaprint=enabled + -Dexpat=enabled + -Dffmpeg=enabled + -Dfluidsynth=enabled + -Dnfs=enabled + -Dshout=enabled + -Dupnp=pupnp + -Dvorbisenc=enabled + -Dwavpack=enabled + -Dgme=enabled + -Dmikmod=enabled + -Dnlohmann_json=enabled + -Dsystemd_system_unit_dir=#{lib}/systemd/system + -Dsystemd_user_unit_dir=#{lib}/systemd/user + ] + + system "meson", "setup", "output/release", *args, *std_meson_args + system "meson", "compile", "-C", "output/release", "--verbose" + ENV.deparallelize # Directories are created in parallel, so let's not do that + system "meson", "install", "-C", "output/release" + + pkgetc.install "doc/mpdconf.example" => "mpd.conf" + end + + def caveats + <<~EOS + MPD requires a config file to start. + Please copy it from #{etc}/mpd/mpd.conf into one of these paths: + - ~/.mpd/mpd.conf + - ~/.mpdconf + and tailor it to your needs. + EOS + end + + service do + run [opt_bin/"mpd", "--no-daemon"] + keep_alive true + process_type :interactive + working_dir HOMEBREW_PREFIX + end + + test do + # oss_output: Error opening OSS device "/dev/dsp": No such file or directory + # oss_output: Error opening OSS device "/dev/sound/dsp": No such file or directory + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "[wavpack] wv", shell_output("#{bin}/mpd --version") + + require "expect" + + port = free_port + + (testpath/"mpd.conf").write <<~EOS + bind_to_address "127.0.0.1" + port "#{port}" + EOS + + io = IO.popen("#{bin}/mpd --stdout --no-daemon #{testpath}/mpd.conf 2>&1", "r") + io.expect("output: Successfully detected a osx audio device", 30) + + ohai "Connect to MPD command (localhost:#{port})" + TCPSocket.open("localhost", port) do |sock| + assert_match "OK MPD", sock.gets + ohai "Ping server" + sock.puts("ping") + assert_match "OK", sock.gets + sock.close + end + end +end diff --git a/Formula/m/mpdas.rb b/Formula/m/mpdas.rb new file mode 100644 index 0000000000000..eecdbb708e3b4 --- /dev/null +++ b/Formula/m/mpdas.rb @@ -0,0 +1,52 @@ +class Mpdas < Formula + desc "C++ client to submit tracks to audioscrobbler" + homepage "https://www.50hz.ws/mpdas/" + url "https://www.50hz.ws/mpdas/mpdas-0.4.5.tar.gz" + sha256 "c9103d7b897e76cd11a669e1c062d74cb73574efc7ba87de3b04304464e8a9ca" + license "BSD-3-Clause" + head "https://github.com/hrkfdn/mpdas.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?mpdas[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "42aa6fe164c3cd7c89bff4e7cbbe3b6488a6588067997a33b05b8e8b2f3673dc" + sha256 arm64_sequoia: "df5684e5298c02319fea93f70ecad6210c12b66bd1ca2686ec9758dcbeeba20d" + sha256 arm64_sonoma: "432d575a1263ee85112c5c4c9d20781507ee5c95245d3978f686ca272df74adc" + sha256 arm64_ventura: "a33d1f587e538bbc81db4d3bf60dc7c37c82ee462400c6051785e4338f1c46e1" + sha256 arm64_monterey: "89b5e45abcb88c8df236dea703162ed9d7f372c0872c3af23630c56e18e31c8e" + sha256 arm64_big_sur: "a7fd32d05844b78fb8eede1ff4a1285e531250919e296166f0eb74d6a9f0cd39" + sha256 sonoma: "3c7355b55c373345b08f0fae9382e5800903a8380dc9f2b0a59b98af3013a311" + sha256 ventura: "559fcd0228ecbdcca8fd8147e611c05d6e71e071823090e669da2985140bbf5b" + sha256 monterey: "25dd98ffb770fa018112f3014ae2574ab346b2d54d542b4feab516f264f30ced" + sha256 big_sur: "1f41b8a297270de980e814104f1a74d9437777caa9443686fb251cac6625494b" + sha256 catalina: "ae3eaddea864370fbcb2ad3f815165ba4f79f57470cbf0b3d81c781f0aaccc37" + sha256 arm64_linux: "c0b4ba425325dd627b3b62d9c90d7d10a6b5edf54414b4a56bcd1fe5b752d215" + sha256 x86_64_linux: "863be659b7b2e9ee5e61c73d284d0a753430f438fbf1225efcee4120850883d2" + end + + depends_on "pkgconf" => :build + depends_on "libmpdclient" + + uses_from_macos "curl" + + def install + system "make", "PREFIX=#{prefix}", "MANPREFIX=#{man1}", "CONFIG=#{etc}", "install" + etc.install "mpdasrc.example" + end + + service do + run opt_bin/"mpdas" + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"mpdas", "-v" + end +end diff --git a/Formula/m/mpdecimal.rb b/Formula/m/mpdecimal.rb new file mode 100644 index 0000000000000..e7d028f5cd443 --- /dev/null +++ b/Formula/m/mpdecimal.rb @@ -0,0 +1,69 @@ +class Mpdecimal < Formula + desc "Library for decimal floating point arithmetic" + homepage "https://www.bytereef.org/mpdecimal/" + url "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-4.0.1.tar.gz" + sha256 "96d33abb4bb0070c7be0fed4246cd38416188325f820468214471938545b1ac8" + license "BSD-2-Clause" + + livecheck do + url "https://www.bytereef.org/mpdecimal/download.html" + regex(/href=.*?mpdecimal[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "518dd69097ceef4b2f5b51603d930d7f5a334237c52b83f8d9822e58c83de172" + sha256 cellar: :any, arm64_sequoia: "e21da583e42e86d5a2f0aedfaf7820e51b8af3065da599cff179d1a39903f3ab" + sha256 cellar: :any, arm64_sonoma: "51a9fd907163c4f99be93607db99668cbb3e115ff577f9413e5dd6e5d4070e2c" + sha256 cellar: :any, arm64_ventura: "e764118699fff81e4861a081d5e50546be2631a2fa2f58f4681dee6727648a87" + sha256 cellar: :any, tahoe: "1f2c31483c9abd01e1ec3af7be8ca14f02a0cdc920313a8b3ab7d3b0b20a6386" + sha256 cellar: :any, sequoia: "2d5d6956ca6cafdcd541611c99eed16c0f7a3c7c217efb0141ecfed265716564" + sha256 cellar: :any, sonoma: "bc8fdd21107bda1c93c82f90f4adad05b85d6b7d175df10d0d566a23a7fd5ab5" + sha256 cellar: :any, ventura: "40b0bb7a71de19ec68449a7f4f6c3816b625a6499e5119f476b3cec3df2d21ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5f5f08846de66026cc3d4029e3202498ffb3996d4eca62623da85ade7b6f106" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f540928b0baae439b6b7bbbb54aa0b0d8fda3631a2fb46c1d1ccd6bf9c2b5389" + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath}" + ENV.append "LDXXFLAGS", "-Wl,-rpath,#{rpath}" + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + mpd_context_t ctx; + mpd_t *a, *b, *result; + char *rstring; + + mpd_defaultcontext(&ctx); + + a = mpd_new(&ctx); + b = mpd_new(&ctx); + result = mpd_new(&ctx); + + mpd_set_string(a, "0.1", &ctx); + mpd_set_string(b, "0.2", &ctx); + mpd_add(result, a, b, &ctx); + rstring = mpd_to_sci(result, 1); + + assert(strcmp(rstring, "0.3") == 0); + + mpd_del(a); + mpd_del(b); + mpd_del(result); + mpd_free(rstring); + + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lmpdec" + system "./test" + end +end diff --git a/Formula/m/mpdscribble.rb b/Formula/m/mpdscribble.rb new file mode 100644 index 0000000000000..d1ceaaea006a3 --- /dev/null +++ b/Formula/m/mpdscribble.rb @@ -0,0 +1,59 @@ +class Mpdscribble < Formula + desc "Last.fm reporting client for mpd" + homepage "https://www.musicpd.org/clients/mpdscribble/" + url "https://www.musicpd.org/download/mpdscribble/0.25/mpdscribble-0.25.tar.xz" + sha256 "20f89d945bf517c4d68bf77a77a359fdb13842ab1295e8d21eda79be2b5b35ce" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?mpdscribble[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "2812de40e805a9ea32ff8e5108217294c2b71bd5fe8cea5de4dc0192817d8aaf" + sha256 arm64_sequoia: "b3c8401d8bd06997be951e75b158905c4fa35cdeceffee5e6b242ec1843b0074" + sha256 arm64_sonoma: "bb677d73c33aa3c1a22f8c85b5c0e829ba230ce3faf3ea433c6662ee33496c0e" + sha256 arm64_ventura: "44fe41a3ba49b3b70de39f3b36067ce5011a2d12f92b27848234db79bc561242" + sha256 arm64_monterey: "cd70d1bf103b1abddfb3396a77f5a8ff373b42103f1d56b679c560e63d577e69" + sha256 sonoma: "a56d2f601abc41777b2fead2ac177532a4520fc923d876c1505b29cee1c24e9d" + sha256 ventura: "e87c590b8e83b9f6085531deb948b7bca8a55de844f6fa3608036aa82050b2a6" + sha256 monterey: "6737329de585fa6af1a59f076f418b4f552944be5eff1126c462e1cecbd35a96" + sha256 arm64_linux: "5bf3500d5c908338c5389f4a212a7c85609b953943e8683fc4d8011ed266f51e" + sha256 x86_64_linux: "4e5852c3dcb301ca9378826b19a679be1b0592d1b99dc64bed775ef092f4eecc" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libgcrypt" + depends_on "libmpdclient" + + uses_from_macos "curl" + + def install + system "meson", "setup", "build", "--sysconfdir=#{etc}", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def caveats + <<~EOS + The configuration file has been placed in #{etc}/mpdscribble.conf. + EOS + end + + service do + run [opt_bin/"mpdscribble", "--no-daemon"] + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + assert_match "No 'username'", shell_output("#{bin}/mpdscribble --no-daemon 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/mpdscribble --version") + end +end diff --git a/Formula/m/mpegdemux.rb b/Formula/m/mpegdemux.rb new file mode 100644 index 0000000000000..9b1ad6cef2284 --- /dev/null +++ b/Formula/m/mpegdemux.rb @@ -0,0 +1,39 @@ +class Mpegdemux < Formula + desc "MPEG1/2 system stream demultiplexer" + homepage "http://www.hampa.ch/mpegdemux/" + url "http://www.hampa.ch/mpegdemux/mpegdemux-0.1.5.tar.gz" + sha256 "05015755d45e50cbd3018baeaa8abcedc003b1162fa28237a72ab25c1bc00023" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?mpegdemux[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c8009d2002ba680af6e0ef4d3addb176638b15450967b07caa5817f95606e80b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "596de6513b152e156fcffbfb37e42b097606fc3efed168190998049ddef8b9ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a5ac9ee81a39717100b75106922b741f5adf919ff9351dd72abdd659f0575a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b4354702d4ee60e1833b2f000b5af4cc5c84a27af849019ea75098d99db68b3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e64ed694831f706e6cfd725a80b26d30c2bb1cdef38f38d21be95a2e99a59163" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "93ff20adcb624347b095c7a23077f3f81f22a0be2711f115c7fa603dd3b88201" + sha256 cellar: :any_skip_relocation, sonoma: "f803850378b1602a599253c2d247c7473f8db4f5db4acc0bdd230e08f091622d" + sha256 cellar: :any_skip_relocation, ventura: "c8863fbff37e02aa161d6ac35e1e8552a0767ae61029c5104f369e6cce1cf1be" + sha256 cellar: :any_skip_relocation, monterey: "6d51b1329330fcd787cb942b0a76eda4f137494f4b32848692e63ce5b8e1c180" + sha256 cellar: :any_skip_relocation, big_sur: "eae7b45d33e2f663769c14d3957b39905060a37db101d5d42366f4ba6dc76934" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea5d1210f203661390c44054f5b5cdddac0989530e733cf077d52bb325f3c93b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd54e487becb88cdbd5e2acad97281980762b9de0c49f44df81d43d1273afcc1" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"mpegdemux", "--help" + end +end diff --git a/Formula/m/mpfi.rb b/Formula/m/mpfi.rb new file mode 100644 index 0000000000000..c3097b2252828 --- /dev/null +++ b/Formula/m/mpfi.rb @@ -0,0 +1,59 @@ +class Mpfi < Formula + desc "Multiple precision interval arithmetic library" + homepage "https://perso.ens-lyon.fr/nathalie.revol/software.html" + url "https://perso.ens-lyon.fr/nathalie.revol/softwares/mpfi-1.5.4.tar.bz2" + sha256 "d20ba56a8d57d0816f028be8b18a4aa909a068efcb9a260e69577939e4199752" + license all_of: ["GPL-3.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url :homepage + regex(/href=.*?mpfi[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d14d9dd673a7e6bdcb8b910766ad693f6f3be81aea82d329a4ceed79e90aea4e" + sha256 cellar: :any, arm64_sequoia: "826e309c5518bcf7aa755eefe369c2b91704820d2bf0730c0341b16e7a877033" + sha256 cellar: :any, arm64_sonoma: "2a77c1ce37a69afb7a40355c560e72294c3445b7f97f93f235756ce56e0747c0" + sha256 cellar: :any, arm64_ventura: "7401897771e7e1714d9bdf79ca0a384af06d756b2ce331a727c4253b93cae7fc" + sha256 cellar: :any, arm64_monterey: "da4f0c1a2da5779a03ca4dd3c813bd6134c23687418ff5cf1f98687f0561ccb8" + sha256 cellar: :any, arm64_big_sur: "46e169bc50fe8357a928fd829d26b7879ce942d60cab5d809df75e847d5ed0e4" + sha256 cellar: :any, sonoma: "305c236ee8065a63a1f65a16375f7ac06863b0e0266fc9793b91c28f5147ad61" + sha256 cellar: :any, ventura: "f938d6da70993c3fc9ad71483ee1daf875122e87a07dcf8322f125af6ee51f9b" + sha256 cellar: :any, monterey: "a46d41cbd8e5eb649b6f33ec56eeafe79a75ec89ba7652c426e661340249a128" + sha256 cellar: :any, big_sur: "4c9a07e8889087a34c932c567b4e5f256d7d146f76206d3d62b5e2aa128f8689" + sha256 cellar: :any, catalina: "4cfd2197c9eed1b74d9518b0054d69556942e5ed7b0d3b8a6d93fffc50e95726" + sha256 cellar: :any_skip_relocation, arm64_linux: "9207b79383b311f8d1c89240bc6274793c3fdba17706b08bb018e5c4162138c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43395ab987d381a3f22eb91b2ce74c8a7d39623e0eac8a78f95d2e50b644b1cd" + end + + depends_on "gmp" + depends_on "mpfr" + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + mpfi_t x; + mpfi_init(x); + mpfi_clear(x); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", + "-L#{lib}", "-lmpfi", + "-L#{Formula["mpfr"].lib}", "-lmpfr", + "-L#{Formula["gmp"].lib}", "-lgmp" + system "./test" + end +end diff --git a/Formula/m/mpfr.rb b/Formula/m/mpfr.rb new file mode 100644 index 0000000000000..75b954408c901 --- /dev/null +++ b/Formula/m/mpfr.rb @@ -0,0 +1,84 @@ +class Mpfr < Formula + desc "C library for multiple-precision floating-point computations" + homepage "https://www.mpfr.org/" + url "https://ftpmirror.gnu.org/gnu/mpfr/mpfr-4.2.2.tar.xz" + mirror "https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.2.tar.xz" + sha256 "b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01" + license "LGPL-3.0-or-later" + head "https://gitlab.inria.fr/mpfr/mpfr.git", branch: "master" + + livecheck do + url "https://www.mpfr.org/mpfr-current/" + regex(/href=.*?mpfr[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :page_match do |page, regex| + version = page.scan(regex).map { |match| Version.new(match[0]) }.max&.to_s + next if version.blank? + + patch = page.scan(%r{href=["']?/?patch(\d+)["' >]}i) + .map { |match| Version.new(match[0]) } + .max + &.to_s + next version if patch.blank? + + "#{version}-p#{patch.to_i}" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "495b04c82ef8638368a5cc62141e7ac195377d292503f5b30e5915b1ff478dda" + sha256 cellar: :any, arm64_sequoia: "ed822b7e77645d7c17abb3ee9cc2b2a82a4d0f003acc7615b5df6226031479b2" + sha256 cellar: :any, arm64_sonoma: "15168719e4dbbc4f497e6f7ec91dfec55659113020e2af705a704af566dbe888" + sha256 cellar: :any, arm64_ventura: "12528a52c96fb1318bf07778ee236d69f4f1c67e616f0c97375431056c27e34e" + sha256 cellar: :any, tahoe: "0d1e2577e9911e6c8ece360c9a18292c373f23131fb72e6b73987b5216ca4e4b" + sha256 cellar: :any, sequoia: "ba4a1b8388386e6618de7c7e27199ae8de473373330f5773e2095567a71d76fd" + sha256 cellar: :any, sonoma: "d0d63cabde366839e9140f92451c7e53f7a89d1986d1903bc9851f6122916213" + sha256 cellar: :any, ventura: "69c8ea465b74361779391dd02f3fcb474f72d4f76d43dc0c2597fd4c1358936e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc5527d722406e18631498339752226ebebecc915bf5da08bfa48cffebeb1ba1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91dfeb407daeeabb3c3caceb89af41dc02b1aa473b88e76c7533efbc2ad6066d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "gmp" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./autogen.sh" if build.head? + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main() { + mpfr_t x, y; + mpfr_inits2 (256, x, y, NULL); + mpfr_set_ui (x, 2, MPFR_RNDN); + mpfr_rootn_ui (y, x, 2, MPFR_RNDN); + mpfr_pow_si (x, y, 4, MPFR_RNDN); + mpfr_add_si (y, x, -4, MPFR_RNDN); + mpfr_abs (y, y, MPFR_RNDN); + if (fabs(mpfr_get_d (y, MPFR_RNDN)) > 1.e-30) abort(); + if (strcmp("#{version}", mpfr_get_version())) abort(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-L#{Formula["gmp"].opt_lib}", + "-lgmp", "-lmpfr", "-o", "test" + system "./test" + end +end diff --git a/Formula/m/mpfrcx.rb b/Formula/m/mpfrcx.rb new file mode 100644 index 0000000000000..813b49962837c --- /dev/null +++ b/Formula/m/mpfrcx.rb @@ -0,0 +1,53 @@ +class Mpfrcx < Formula + desc "Arbitrary precision library for arithmetic of univariate polynomials" + homepage "https://www.multiprecision.org/mpfrcx/" + url "https://www.multiprecision.org/downloads/mpfrcx-0.6.3.tar.gz" + sha256 "9da9b3614c0a3e00e6ed2b82fc935d1c838d97074dc59cb388f8fafbe3db8594" + license "GPL-3.0-or-later" + head "https://gitlab.inria.fr/enge/mpfrcx.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0040f42d09efca8b3d759eb4b6f52158d89edbd1019d4919152d56666eb9de81" + sha256 cellar: :any, arm64_sequoia: "e9d9fcb8796dc03e08d4f3b1d1e6e1cd054befac43f75f20f6592891e01c366f" + sha256 cellar: :any, arm64_sonoma: "3943e6b49295761e2d5ca64145d1f0ca80255d0d6c608c1dc2df5c8d964a9c55" + sha256 cellar: :any, arm64_ventura: "0525d37742602a124d2bc1631cf9d201d0e2d88002b57257ddb444d8407b5ac8" + sha256 cellar: :any, arm64_monterey: "c10ab1b46750109d8d957074a1d876176b9e05c246c76302a4c88bf35a6ddc52" + sha256 cellar: :any, arm64_big_sur: "a46ef1e2ec99e097e239ba509d765b00dcd6af1176abeba16e24c415bef80897" + sha256 cellar: :any, sonoma: "66c8164a31ba3594d87f7cb29062b9562413cc71adc90ba96178cb630f4b332a" + sha256 cellar: :any, ventura: "d9f53f55c7a8931e03c5a8adbd8f4d15396b3ac4b90fef67df9646fb127fb86a" + sha256 cellar: :any, monterey: "2a8d8afb5038289d4bb3b6641dd4362369d09c3c370c2a682aa09d726854d8f9" + sha256 cellar: :any, big_sur: "6cbcd65b4fe55b4be169457f4a915bd60a52a4ded61af56b0d0e67bcf8863685" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e9fb25f1f4406a9aa90110ef908ccfb58c4fa3c08bfc37bbdc8aeb59994c7ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf4bc73f687ec7bb72c060eb35acc89a2eefd1aa46d706a177a13bee6245cde0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "gmp" + depends_on "libmpc" + depends_on "mpfr" + + def install + # Regenerate configure to avoid building libraries with flat namespaces + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + + (pkgshare/"tests").install Dir["tests/tc_*.c"] + end + + test do + Dir[pkgshare/"tests/*"].each do |src| + testname = File.basename(src, ".c") + system ENV.cc, src, "-I#{include}", "-L#{lib}", + "-L#{Formula["gmp"].opt_lib}", "-L#{Formula["libmpc"].opt_lib}", "-L#{Formula["mpfr"].opt_lib}", + "-lmpfrcx", "-lgmp", "-lmpc", "-lmpfr", + "-o", testname + system testpath/testname + end + end +end diff --git a/Formula/m/mpg123.rb b/Formula/m/mpg123.rb new file mode 100644 index 0000000000000..b8a1d7c81bf2c --- /dev/null +++ b/Formula/m/mpg123.rb @@ -0,0 +1,44 @@ +class Mpg123 < Formula + desc "MP3 player for Linux and UNIX" + homepage "https://www.mpg123.de/" + url "https://www.mpg123.de/download/mpg123-1.33.3.tar.bz2" + mirror "https://downloads.sourceforge.net/project/mpg123/mpg123/1.33.3/mpg123-1.33.3.tar.bz2" + sha256 "6a0c6472dd156e213c2068f40115ebbb73978c2d873e66bae2a250e2d2198d26" + license "LGPL-2.1-only" + + livecheck do + url "https://www.mpg123.de/download/" + regex(/href=.*?mpg123[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "35363664ca62143633c27207668be413ed6fe45140ee7440b0b9e2110dd700e3" + sha256 arm64_sequoia: "5c0f3a5461e813ea34f0be6623d950687292b734a0aec33e46e54678eb17bf13" + sha256 arm64_sonoma: "df1512052024858ea9773d91b8b420dc3e712163e009b56096ed9e7a771555ac" + sha256 sonoma: "46d9a3116cf7de6bca9e935fa84486ebec292d532cb202455a217b61809344bf" + sha256 arm64_linux: "9a47e6b3e9eb9f77337d1b08cd014ea34c422ead3abb3d14ac6562d78d240073" + sha256 x86_64_linux: "80a291a14ebc74921bb418a75a658ca9dbddc52175d11f7cc5b0ced19b5092ec" + end + + def install + args = %w[ + --with-module-suffix=.so + --enable-static + ] + + args << "--with-default-audio=coreaudio" if OS.mac? + + args << if Hardware::CPU.arm? + "--with-cpu=aarch64" + else + "--with-cpu=x86-64" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"mpg123", "--test", test_fixtures("test.mp3") + end +end diff --git a/Formula/m/mpg321.rb b/Formula/m/mpg321.rb new file mode 100644 index 0000000000000..b443b05a5eaed --- /dev/null +++ b/Formula/m/mpg321.rb @@ -0,0 +1,63 @@ +class Mpg321 < Formula + desc "Command-line MP3 player" + homepage "https://mpg321.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mpg321/mpg321/0.3.2/mpg321_0.3.2.orig.tar.gz" + sha256 "056fcc03e3f5c5021ec74bb5053d32c4a3b89b4086478dcf81adae650eac284e" + license "GPL-2.0-or-later" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4582777d133873930312cc1c4314d0997e3219f582b07c771a4f413b5cb0cfc5" + sha256 arm64_sequoia: "ed6f4de0b208b65bdc562fefd7f6cd8dbad5b6489b52bc24b4bf9109de4b6f35" + sha256 arm64_sonoma: "00b92592cadd767c25fe24941095b6f6f088cf319b25ab78a83d0a75797e7a43" + sha256 arm64_ventura: "963826c2df80f72ba7e5ca28ca63c29484ce57dee4056ab4e54677e166a2f4a2" + sha256 arm64_monterey: "7060caabffb689d03eae5d98b62caa894655c7e29201c432afe5ec1ae5864301" + sha256 sonoma: "1a50f4f46de3340e25159744cfe7b8fb1c365f3aded9339ec723516e8bf91925" + sha256 ventura: "c9ab1dd71ff6f687fa35938d31af37377e340c910492d5a46e907cf8a498b379" + sha256 monterey: "670138c44421b7111c2f3904ef193183f0e9f4e9a97b62d0a2a2f9f2b32db4f4" + sha256 arm64_linux: "f3f1ba40fb7ed60d1a13f4b9942c93c319d2f09e95720fd03e34175288679458" + sha256 x86_64_linux: "3b1e0d4c1d736021d7d4ffb1354df112cef5815b4bf5c79669639cd80a9eb401" + end + + depends_on "libao" + depends_on "libid3tag" + depends_on "mad" + + # 1. Apple defines semun already. Skip redefining it to fix build errors. + # This is a homemade patch fashioned using deduction. + # 2. Also a couple of IPV6 values are not defined on OSX that are needed. + # This patch was seen in the wild for an app called lscube: + # lscube.org/pipermail/lscube-commits/2009-March/000500.html [LOST LINK] + # Both patches have been reported upstream here: + # https://sourceforge.net/p/mpg321/patches/20/ + # Remove these at: Unknown. These have not been merged as of 0.3.2. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mpg321/0.3.2.patch" + sha256 "a856292a913d3d94b3389ae7b1020d662e85bd4557d1a9d1c8ebe517978e62a1" + end + + # Apply Gentoo patch for Clang 16 + patch do + url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/mpg321/files/mpg321-0.3.2-clang16.patch?id=ba6b4630d2b4cc294a3057b1f4770650bcb12c87" + sha256 "bafc5868a8293fe465449ab27bececc6039001b1519af872ecf4178afabc1a5c" + end + + def install + # Fix compilation with GCC 11 + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--disable-dependency-tracking", + "--disable-debug", + "--prefix=#{prefix}", + "--disable-mpg123-symlink", + "--enable-ipv6", + "--disable-alsa" + system "make", "install" + end + + test do + system bin/"mpg321", "--version" + end +end diff --git a/Formula/m/mpgtx.rb b/Formula/m/mpgtx.rb new file mode 100644 index 0000000000000..28dedbfedf446 --- /dev/null +++ b/Formula/m/mpgtx.rb @@ -0,0 +1,44 @@ +class Mpgtx < Formula + desc "Toolbox to manipulate MPEG files" + homepage "https://mpgtx.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mpgtx/mpgtx/1.3.1/mpgtx-1.3.1.tar.gz" + sha256 "8815e73e98b862f12ba1ef5eaaf49407cf211c1f668c5ee325bf04af27f8e377" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/mpgtx[._-]v?(\d+(?:\.\d+)+(?:-\d+)?)(?:-src)?\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6a9e46221da11c97decd1340aa411ca181d6c0eb331470e61e5c08b96cf6823" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ad9aa8dd08b96ea82867c569333e92438e2e7131c287a1f4a2f9ab8be6a3755" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "82dd83969a60031ab766c86fa4859dad5fe9469f457f93ca034418daf00b8ff8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9086ca4f3b6b2448255352f89972039b6695fead5f4a3f7c310b0c27fb6ad9e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "09eb55b5471006050d5a0d02a756c8474d2500ce289ebe8dfbe22a95cfbebc14" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ffab63d205a5b151099b5034943d1b34ef5802a4068c832c3da376f67b540745" + sha256 cellar: :any_skip_relocation, sonoma: "d72e98f7a717a312e7c328db019c13431cb5800f24e7ab36911a5a8e7f342b2b" + sha256 cellar: :any_skip_relocation, ventura: "50b17722b66bcdb43ba33472f34955e71625817238660626be12a2407ba0c9ae" + sha256 cellar: :any_skip_relocation, monterey: "d74d7e1c7a278e72e9b98afed71f019b51000784bd385450f88a4d879d1fff7d" + sha256 cellar: :any_skip_relocation, big_sur: "ee222d4e5a24b91c13ae86e2e66291adc636d859f4b4c9cd7ba0944ffb629278" + sha256 cellar: :any_skip_relocation, catalina: "116812d4c0401a6ceeae3bd8bd0bc3f4870c0cac7f9ec166ceb97f5279c10d32" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9c4e3ed17bf4c1669dfd9d61a3064ebe5e956325678c9820a7b840f6a093473" + sha256 cellar: :any_skip_relocation, x86_64_linux: "133e123b7b8f9956959847378b68fc0c68f1e591209bb060ab7c7d024426f343" + end + + def install + system "./configure", "--parachute", + "--prefix=#{prefix}", + "--manprefix=#{man}" + # Unset LFLAGS, "-s" causes the linker to crash + system "make", "LFLAGS=" + # Override BSD incompatible cp flags set in makefile + system "make", "install", "cpflags=RP" + end + + test do + system bin/"mpgtx", "--version" + end +end diff --git a/Formula/m/mpi4py.rb b/Formula/m/mpi4py.rb new file mode 100644 index 0000000000000..eacb7fc244cef --- /dev/null +++ b/Formula/m/mpi4py.rb @@ -0,0 +1,38 @@ +class Mpi4py < Formula + desc "Python bindings for MPI" + homepage "https://mpi4py.github.io/" + url "https://github.com/mpi4py/mpi4py/releases/download/4.1.1/mpi4py-4.1.1.tar.gz" + sha256 "eb2c8489bdbc47fdc6b26ca7576e927a11b070b6de196a443132766b3d0a2a22" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b9eeb8c24989480fd139243a3bcb36b97bd4b60f214606ed2df83fad31980418" + sha256 cellar: :any, arm64_sequoia: "500955463e604c6d475fa55579140e1b8ac12a4cc620abe41b701df31f90bcc9" + sha256 cellar: :any, arm64_sonoma: "652968b66f7a1c24729682d6c2a7e5108a2180a58609644daba4bcd347075512" + sha256 cellar: :any, sonoma: "7ec983abf82540632443040173ec98709464999b9d183057705b85eb8727fe99" + sha256 arm64_linux: "c9ee1abec879cf6b68b6d8265e8f1ab1b0bf41991b8e1cf4488950a0fc777a05" + sha256 x86_64_linux: "4e6462f70e3a29ce0d389ce921962f50543506f771bf17db8e3dc77010c5d83d" + end + + depends_on "open-mpi" + depends_on "python@3.13" + + def python3 + "python3.13" + end + + def install + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + + test do + system python3, "-c", "import mpi4py" + system python3, "-c", "import mpi4py.MPI" + system python3, "-c", "import mpi4py.futures" + + system "mpiexec", "-n", ENV.make_jobs, "--use-hwthread-cpus", + python3, "-m", "mpi4py.run", "-m", "mpi4py.bench", "helloworld" + system "mpiexec", "-n", ENV.make_jobs, "--use-hwthread-cpus", + python3, "-m", "mpi4py.run", "-m", "mpi4py.bench", "ringtest", "-l", "10", "-n", "1024" + end +end diff --git a/Formula/m/mpich.rb b/Formula/m/mpich.rb new file mode 100644 index 0000000000000..82b867e86446c --- /dev/null +++ b/Formula/m/mpich.rb @@ -0,0 +1,119 @@ +class Mpich < Formula + desc "Implementation of the MPI Message Passing Interface standard" + homepage "https://www.mpich.org/" + url "https://www.mpich.org/static/downloads/4.3.2/mpich-4.3.2.tar.gz" + mirror "https://fossies.org/linux/misc/mpich-4.3.2.tar.gz" + sha256 "47d774587a7156a53752218c811c852e70ac44db9c502dc3f399b4cb817e3818" + license "mpich2" + + livecheck do + url "https://www.mpich.org/static/downloads/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c665e1ef736243c7f4f5152dc89fa04c915ef6991e1376c67235eb4bd4a26406" + sha256 cellar: :any, arm64_sequoia: "e342829b8c641ff4e2808becd4b03fe80486011e37d190d88fe30457bcaee26e" + sha256 cellar: :any, arm64_sonoma: "27e759f69a61fb56bb5d3cc2c4bd9e37f2b5e1e4ecf16c38c9809f75ef2912b6" + sha256 cellar: :any, sonoma: "1c9137668c3581442add7eb2a555f3687db8168819d0e0a9ad8c004c21d9e290" + sha256 cellar: :any_skip_relocation, arm64_linux: "61127138fe162b6a4bb7c9b280cbda43ba04692655126dc7fdbb768032c65e25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe8e8737dbbc297ee498df30ad75443c03b44a9ecd29eab77253dc9da1b6091d" + end + + head do + url "https://github.com/pmodels/mpich.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gcc" # for gfortran + depends_on "hwloc" + uses_from_macos "python" => :build + + on_macos do + conflicts_with "libfabric", because: "both install `fabric.h`" + end + + on_linux do + # Can't be enabled on mac: + # https://lists.mpich.org/pipermail/discuss/2021-May/006192.html + depends_on "libfabric" + end + + conflicts_with "open-mpi", because: "both install MPI compiler wrappers" + + def install + if build.head? + # ensure that the consistent set of autotools built by homebrew is used to + # build MPICH, otherwise very bizarre build errors can occur + ENV["MPICH_AUTOTOOLS_DIR"] = HOMEBREW_PREFIX + "bin" + system "./autogen.sh" + end + + args = %W[ + --disable-dependency-tracking + --disable-silent-rules + --enable-fast=all,O3 + --enable-g=dbg + --enable-romio + --enable-shared + --with-hwloc=#{Formula["hwloc"].opt_prefix} + --with-pm=hydra + --prefix=#{prefix} + --mandir=#{man} + F77=gfortran + FC=gfortran + ] + + if OS.linux? + # Use libfabric https://lists.mpich.org/pipermail/discuss/2021-January/006092.html + args << "--with-device=ch4:ofi" + args << "--with-libfabric=#{Formula["libfabric"].opt_prefix}" + end + + system "./configure", *args + + system "make" + system "make", "install" + end + + test do + (testpath/"hello.c").write <<~C + #include + #include + + int main() + { + int size, rank, nameLen; + char name[MPI_MAX_PROCESSOR_NAME]; + MPI_Init(NULL, NULL); + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Get_processor_name(name, &nameLen); + printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name); + MPI_Finalize(); + return 0; + } + C + system bin/"mpicc", "hello.c", "-o", "hello" + system "./hello" + system bin/"mpirun", "-np", "4", "./hello" + + (testpath/"hellof.f90").write <<~FORTRAN + program hello + include 'mpif.h' + integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) + call MPI_INIT(ierror) + call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) + call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) + print*, 'node', rank, ': Hello Fortran world' + call MPI_FINALIZE(ierror) + end + FORTRAN + system bin/"mpif90", "hellof.f90", "-o", "hellof" + system "./hellof" + system bin/"mpirun", "-np", "4", "./hellof" + end +end diff --git a/Formula/m/mplayer.rb b/Formula/m/mplayer.rb new file mode 100644 index 0000000000000..0b643259b1188 --- /dev/null +++ b/Formula/m/mplayer.rb @@ -0,0 +1,99 @@ +class Mplayer < Formula + desc "UNIX movie player" + homepage "https://mplayerhq.hu/" + url "https://mplayerhq.hu/MPlayer/releases/MPlayer-1.5.tar.xz" + sha256 "650cd55bb3cb44c9b39ce36dac488428559799c5f18d16d98edb2b7256cbbf85" + license all_of: ["GPL-2.0-only", "GPL-2.0-or-later"] + revision 1 + + livecheck do + url "https://mplayerhq.hu/MPlayer/releases/" + regex(/href=.*?MPlayer[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "0150e25218e25764d83aae76520b136b852ce6665dad81c6efb3294b5f0237c7" + sha256 cellar: :any, arm64_sequoia: "4d99950e65cb0275765a4b1c8b0ebfc33723d09d20b009a01751f991af55148e" + sha256 cellar: :any, arm64_sonoma: "203e6bd9b216cf53d6042de09ed3c4dc1070cd56034279b7eebf3f8f18379b10" + sha256 cellar: :any, arm64_ventura: "1b17dde1bb0e77e6b994464b92081b3be76df73ab89634c978711c5bb8f4e593" + sha256 cellar: :any, arm64_monterey: "c5516ace4b68e19b4ebcce79ca80ae09bdd7a950054963241333eec4275a80b0" + sha256 cellar: :any, sonoma: "25f304026cc023e94a49693c47193d3068199cf978d270889fb514f4427495bf" + sha256 cellar: :any, ventura: "6e159e7274b6c6a461eaf17a9121c97e840a1eeaf93228ee1508d57eed6ad230" + sha256 cellar: :any, monterey: "ee6ac92f78cb0f428c78f4184ac2e5fb391f6a7cc6083541f3df483bf9a2239e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6ab378507dcc179f3c80bfa9b84a8127c50223ae74746bb58b9c733fa4736da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "364ce29a5a68f3ebbcf8dec1f198cfb84e7efb4de60064a06af90babc8ece54d" + end + + head do + url "svn://svn.mplayerhq.hu/mplayer/trunk" + + # When building SVN, configure prompts the user to pull FFmpeg from git. + # Don't do that. + patch :DATA + end + + depends_on "pkgconf" => :build + depends_on "yasm" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libcaca" + depends_on "libpng" + + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + # Work around build failure with newer Clang + if DevelopmentTools.clang_build_version >= 1500 + ENV.append_to_cflags "-Wno-int-conversion -Wno-incompatible-function-pointer-types" + end + + # Fix x86_64 detection used to apply a workaround. + # TODO: Remove on the next release as code was removed. + # Issue ref: https://trac.mplayerhq.hu/ticket/2383 + inreplace "libvo/osx_objc_common.m", " defined(x86_64)", " defined(__x86_64__)" if build.stable? + + # we disable cdparanoia because homebrew's version is hacked to work on macOS + # and mplayer doesn't expect the hacks we apply. So it chokes. Only relevant + # if you have cdparanoia installed. + # Specify our compiler to stop ffmpeg from defaulting to gcc. + args = %W[ + --cc=#{ENV.cc} + --host-cc=#{ENV.cc} + --disable-cdparanoia + --prefix=#{prefix} + --disable-x11 + --enable-caca + --enable-freetype + --disable-libbs2b + ] + system "./configure", *args + system "make" + system "make", "install" + end + + test do + system bin/"mplayer", "-ao", "null", "/System/Library/Sounds/Glass.aiff" + end +end + +__END__ +diff --git a/configure b/configure +index addc461..3b871aa 100755 +--- a/configure ++++ b/configure +@@ -1517,8 +1517,6 @@ if test -e ffmpeg/mp_auto_pull ; then + fi + + if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then +- echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort" +- read tmp + if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then + rm -rf ffmpeg + echo "Failed to get a FFmpeg checkout" diff --git a/Formula/m/mplayershell.rb b/Formula/m/mplayershell.rb new file mode 100644 index 0000000000000..698c4e1546f05 --- /dev/null +++ b/Formula/m/mplayershell.rb @@ -0,0 +1,45 @@ +class Mplayershell < Formula + desc "Improved visual experience for MPlayer on macOS" + homepage "https://github.com/lisamelton/MPlayerShell" + url "https://github.com/lisamelton/MPlayerShell/archive/refs/tags/0.9.3.tar.gz" + sha256 "a1751207de9d79d7f6caa563a3ccbf9ea9b3c15a42478ff24f5d1e9ff7d7226a" + license "MIT" + head "https://github.com/lisamelton/MPlayerShell.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "60d548374e75eccb8dfb8ebb31df066dbb482f8bbd0ec5bf273c62392d323de6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b95550c4987ef7c396da3dccfdd64e309be1d1945fec7f520215c674615174c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e13d71055ed301f6cb2ce85ad882a79d6d9bb89768a65d343924683fec3eedc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bead3e2b5b52cc95ff824b0ff5fce66e0abade2cb0b6dc423ff95234e0f3d607" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3003edef26c3863115869954941cff51ef7976b31ddef7130ea8931073011fbb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ab5dcc40124f4b2e1e3971050548e96bf3e652fbd4c682a701c0d3549ced4c21" + sha256 cellar: :any_skip_relocation, sonoma: "d658c84ae0c3d0138efff810c4734ac93be2050d16c77a92ef0951acdc01db48" + sha256 cellar: :any_skip_relocation, ventura: "1b398dced75a1b8abc9297730a1e0aacd0bce8bc31b80317222489c78270d99e" + sha256 cellar: :any_skip_relocation, monterey: "394a7fd5b3beef51cc57058e2210cccfd9fda7ae045fba2551c1e62149bae6df" + sha256 cellar: :any_skip_relocation, big_sur: "4d08f027c84780edc46b13b1e45a8255de0ec6a35798a1ea5230ef8cb4396e13" + sha256 cellar: :any_skip_relocation, catalina: "09cfdf5d08af35a3be96623c6535fece3acfbc60cf81247b118778cb2b68acc3" + end + + depends_on xcode: :build + depends_on :macos + depends_on "mplayer" + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "MPlayerShell.xcodeproj", + "-target", "mps", + "-configuration", "Release", + "clean", "build", + "SYMROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", + "DSTROOT=build" + bin.install "build/Release/mps" + man1.install "Source/mps.1" + end + + test do + system bin/"mps" + end +end diff --git a/Formula/m/mpop.rb b/Formula/m/mpop.rb new file mode 100644 index 0000000000000..e34574f59e220 --- /dev/null +++ b/Formula/m/mpop.rb @@ -0,0 +1,37 @@ +class Mpop < Formula + desc "POP3 client" + homepage "https://marlam.de/mpop/" + url "https://marlam.de/mpop/releases/mpop-1.4.21.tar.xz" + sha256 "4ca0d1e0d01366fe3e0cf490d88d154df511278fb595638713be3ca675665855" + license "GPL-3.0-or-later" + + livecheck do + url "https://marlam.de/mpop/download/" + regex(/href=.*?mpop[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "2439a807bef10bd2cffcbb38c61134bb112a8800e7814b6da5e517772bd9b187" + sha256 arm64_sequoia: "150ff82a6b04b43d23e1bd2dd829aada62ce3ea5d9b3fed02b39576f4f63e54a" + sha256 arm64_sonoma: "1153dc80d795fce29566e64d3ef7f2af6f87576253da13a43328713ba7251a06" + sha256 arm64_ventura: "2d583441a27b2a280df6638d0f84f3b13a36c3636a8dd688ec85ba452fccb0f4" + sha256 sonoma: "1f53b046ff585b6881305ed39356cf3f17183634e0c36d2efe9368e4cf00c9a2" + sha256 ventura: "1d439effaaa6da0bbc6ec4a4ecc99bda8ee74e7424f368f06de36a16a597da5f" + sha256 arm64_linux: "b74c1df7321d6efde1abe975639b29caaf4bcb45e9e6b5198c407f689636792b" + sha256 x86_64_linux: "2e1ee9de528062ddb2bbe3e5338e6b8856bfa295c5afd755d77574e3adc3e69d" + end + + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "gnutls" + depends_on "libidn2" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mpop --version") + end +end diff --git a/Formula/m/mpremote.rb b/Formula/m/mpremote.rb new file mode 100644 index 0000000000000..30f887d421e6d --- /dev/null +++ b/Formula/m/mpremote.rb @@ -0,0 +1,35 @@ +class Mpremote < Formula + include Language::Python::Virtualenv + + desc "Tool for interacting remotely with MicroPython devices" + homepage "https://docs.micropython.org/en/latest/reference/mpremote.html" + url "https://files.pythonhosted.org/packages/9c/ff/e54b17cb43b1b81a4267de73079b964f4bccf7762039e7c3fb12db21294a/mpremote-1.26.1.tar.gz" + sha256 "61a39bf5af502e1ec56d1b28bf067766c3a0daea9d7487934cb472e378a12fe1" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a6a6ab50ab0bdcaa6d06c55017b1ff413a6b073d50b125c0c3c0fca607991638" + end + + depends_on "python@3.14" + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/mpremote --version") + assert_match "no device found", shell_output("#{bin}/mpremote soft-reset 2>&1", 1) + end +end diff --git a/Formula/m/mprocs.rb b/Formula/m/mprocs.rb new file mode 100644 index 0000000000000..5434652daffe8 --- /dev/null +++ b/Formula/m/mprocs.rb @@ -0,0 +1,47 @@ +class Mprocs < Formula + desc "Run multiple commands in parallel" + homepage "https://github.com/pvolok/mprocs" + url "https://github.com/pvolok/mprocs/archive/refs/tags/v0.7.3.tar.gz" + sha256 "a058a2806319a0a1ab644158b741e9a54be28540c88d15d213b820b3f97a65da" + license "MIT" + head "https://github.com/pvolok/mprocs.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2ba91419cf68700c856abb7d5806cce26aaae728048374f853b810e4c5381b0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16b81feda28c9ef5d6d17f3af89d567621202003b1058539f2acf42f8122f209" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "57b9fbf1a21a53138d17727e206e82e870bb3ac1266d06a1133a995b635613c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62f383588660e5fe18d590a55819e2a7e8a3bf037f43acc492edc86f382e80fb" + sha256 cellar: :any_skip_relocation, sonoma: "c1f2e9b460b58a527c5bb7044bf0cf9ea98250b7f10961181217d33c214d9687" + sha256 cellar: :any_skip_relocation, ventura: "da98d732c46c8c012a97c5299308284d478b356caa78b43491e3d18813a0df18" + sha256 cellar: :any_skip_relocation, arm64_linux: "276df3845dfce0965cc2a950022460fc9708b52a59697170aa24a206578a112d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86eb399ea7db2da667f42c18cc79c6b612465e04443ddb91430ef0c5d6180a36" + end + + depends_on "rust" => :build + + uses_from_macos "python" => :build # required by the xcb crate + + on_linux do + depends_on "libxcb" + end + + def install + system "cargo", "install", *std_cargo_args(path: "src") + end + + test do + require "pty" + + begin + r, w, pid = PTY.spawn("#{bin}/mprocs 'echo hello mprocs'") + r.winsize = [80, 30] + sleep 1 + w.write "q" + assert_match "hello mprocs", r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/m/mpssh.rb b/Formula/m/mpssh.rb new file mode 100644 index 0000000000000..4fda8e8835ddc --- /dev/null +++ b/Formula/m/mpssh.rb @@ -0,0 +1,43 @@ +class Mpssh < Formula + desc "Mass parallel ssh" + homepage "https://github.com/ndenev/mpssh" + license "BSD-3-Clause" + head "https://github.com/ndenev/mpssh.git", branch: "master" + + stable do + url "https://github.com/ndenev/mpssh/archive/refs/tags/1.3.3.tar.gz" + sha256 "510e11c3e177a31c1052c8b4ec06357c147648c86411ac3ed4ac814d0d927f2f" + patch do + # don't install binaries as root (upstream commit) + url "https://github.com/ndenev/mpssh/commit/3cbb868b6fdf8dff9ab86868510c0455ad1ec1b3.patch?full_index=1" + sha256 "a6c596c87a4945e6a77b779fcc42867033dbfd95e27ede492e8b841738a67316" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5dfa9aa8dc66a51ca4c7639f036b59c2b587cfc907d47b400fb03e7df982a64e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b6d83538348cb97b5847fcbff26efc651cf313bc6ce8c4c572d08cf3b43deca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f4e641ecad2e8254a0833ffa46e5168ad2985d0e7ff50fa1b193cd4eec90877" + sha256 cellar: :any_skip_relocation, arm64_ventura: "124dbceb59eb36d94e15247ed771965c724b84bce47090523e74021ac4336a8a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bcef6cadd8e60b9856c5cc99d1047deaee4a18a852127c0e4f22fb59f9751371" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f9d5c61b0953345267eda6e05e0c712823ecf4d037e2960ebcd4d836c045ef4d" + sha256 cellar: :any_skip_relocation, sonoma: "d9be22691fa0cd36dcc70ebf92e7d8ed2fecbe493f6cdfd676284390b85f4b9f" + sha256 cellar: :any_skip_relocation, ventura: "3a90eeb34d282fa97d59a7084972b98bac3c94333b81e264110e9fcd6e894476" + sha256 cellar: :any_skip_relocation, monterey: "94d6b1821f850cb852373d0e46b9da787b799d726f4917ece31a0e0dc149b25a" + sha256 cellar: :any_skip_relocation, big_sur: "d6e032b03f612d0be60c38b1af6688f8786e9c097d52c2e8bd3cd507290e4482" + sha256 cellar: :any_skip_relocation, catalina: "714e7b0e97a942f68885baefa599d97e143631154480d0246d04e21a49910acf" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8e905d29e7029da56deb5d87820165715519f27deb1675446434a51b049a70d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5eabc527317cd3a5091e6efabe168b926693d6eb64644fec082a251a99725669" + end + + def install + system "make", "install", "CC=#{ENV.cc}", "BIN=#{bin}" + man1.install "mpssh.1" + end + + test do + system bin/"mpssh" + end +end diff --git a/Formula/m/mpv.rb b/Formula/m/mpv.rb new file mode 100644 index 0000000000000..a21b9b727f92b --- /dev/null +++ b/Formula/m/mpv.rb @@ -0,0 +1,143 @@ +class Mpv < Formula + desc "Media player based on MPlayer and mplayer2" + homepage "https://mpv.io" + license :cannot_represent + revision 4 + head "https://github.com/mpv-player/mpv.git", branch: "master" + + stable do + url "https://github.com/mpv-player/mpv/archive/refs/tags/v0.40.0.tar.gz" + sha256 "10a0f4654f62140a6dd4d380dcf0bbdbdcf6e697556863dc499c296182f081a3" + + # Backport support for FFmpeg 8 + patch do + url "https://github.com/mpv-player/mpv/commit/26b29fba02a2782f68e2906f837d21201fc6f1b9.patch?full_index=1" + sha256 "ac7e5d8e765186af2da3bef215ec364bd387d43846ee776bd05f01f9b9e679b2" + end + + # Backport fix for old macOS + patch do + url "https://github.com/mpv-player/mpv/commit/00415f1457a8a2b6c2443b0d585926483feb58b7.patch?full_index=1" + sha256 "4d54edac689d0b5d2e3adf0a52498f307fa96e6bae14f026b62322cd9d6a9ba6" + end + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "106cc0184a6703e9c3e9a4b3662b3a65da4e64c8a2e43218d1fc19493cdecdb8" + sha256 arm64_sequoia: "2a72093cc0689a0c6341b7abc942ba0ec802490c807ff764ac20edb6f0ead270" + sha256 arm64_sonoma: "8247120427ca93debacb0b079ba30dd9d233e8f8f0705e9a82899a4fee833157" + sha256 arm64_ventura: "20afc0a4fe70131481e5a8fcd91a803806965bb76e106a326eae6ee5864bce2f" + sha256 sonoma: "eb40fe0c534999a9771f3666824c0d70488afd06f96c37a1d26821f5537e5fb9" + sha256 ventura: "af91158356583eb46de5fb7dbc999eeee2d2606336fb4276eb5713daf9efa580" + sha256 arm64_linux: "16e483fc11b83570cd434a3f9b44b69afccf90f5091adca702a6200b269a80fb" + sha256 x86_64_linux: "ae8b059abf68381c7f62d9190dca745f36971ad1b0a1080c6d69a05bd3ac5b42" + end + + depends_on "docutils" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on xcode: :build + depends_on "ffmpeg" + depends_on "jpeg-turbo" + depends_on "libarchive" + depends_on "libass" + depends_on "libbluray" + depends_on "libplacebo" + depends_on "little-cms2" + depends_on "luajit" + depends_on "mujs" + depends_on "rubberband" + depends_on "uchardet" + depends_on "vapoursynth" + depends_on "vulkan-loader" + depends_on "yt-dlp" + depends_on "zimg" + + uses_from_macos "zlib" + + on_macos do + depends_on "molten-vk" + end + + on_linux do + depends_on "alsa-lib" + depends_on "libdrm" + depends_on "libva" + depends_on "libvdpau" + depends_on "libx11" + depends_on "libxext" + depends_on "libxkbcommon" + depends_on "libxpresent" + depends_on "libxrandr" + depends_on "libxscrnsaver" + depends_on "libxv" + depends_on "mesa" + depends_on "pulseaudio" + depends_on "wayland" + depends_on "wayland-protocols" # needed by mpv.pc + end + + conflicts_with cask: "stolendata-mpv", because: "both install `mpv` binaries" + + def install + # LANG is unset by default on macOS and causes issues when calling getlocale + # or getdefaultlocale in docutils. Force the default c/posix locale since + # that's good enough for building the manpage. + ENV["LC_ALL"] = "C" + + # force meson find ninja from homebrew + ENV["NINJA"] = which("ninja") + + # libarchive is keg-only + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libarchive"].opt_lib/"pkgconfig" if OS.mac? + + args = %W[ + -Dbuild-date=false + -Dhtml-build=enabled + -Djavascript=enabled + -Dlibmpv=true + -Dlua=luajit + -Dlibarchive=enabled + -Duchardet=enabled + -Dvulkan=enabled + --sysconfdir=#{pkgetc} + --datadir=#{pkgshare} + --mandir=#{man} + ] + if OS.linux? + args += %w[ + -Degl=enabled + -Dwayland=enabled + -Dx11=enabled + ] + end + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + if OS.mac? + # `pkg-config --libs mpv` includes libarchive, but that package is + # keg-only so it needs to look for the pkgconfig file in libarchive's opt + # path. + libarchive = Formula["libarchive"].opt_prefix + inreplace lib/"pkgconfig/mpv.pc" do |s| + s.gsub!(/^Requires\.private:(.*)\blibarchive\b(.*?)(,.*)?$/, + "Requires.private:\\1#{libarchive}/lib/pkgconfig/libarchive.pc\\3") + end + end + + bash_completion.install "etc/mpv.bash-completion" => "mpv" + zsh_completion.install "etc/_mpv.zsh" => "_mpv" + end + + test do + system bin/"mpv", "--ao=null", "--vo=null", test_fixtures("test.wav") + assert_match "vapoursynth", shell_output("#{bin}/mpv --vf=help") + + # Make sure `pkgconf` can parse `mpv.pc` after the `inreplace`. + system "pkgconf", "--print-errors", "mpv" + end +end diff --git a/Formula/m/mqttui.rb b/Formula/m/mqttui.rb new file mode 100644 index 0000000000000..79236572e3838 --- /dev/null +++ b/Formula/m/mqttui.rb @@ -0,0 +1,35 @@ +class Mqttui < Formula + desc "Subscribe to a MQTT Topic or publish something quickly from the terminal" + homepage "https://github.com/EdJoPaTo/mqttui" + url "https://github.com/EdJoPaTo/mqttui/archive/refs/tags/v0.22.1.tar.gz" + sha256 "c8a65a1aef2e96484e09972de50fb6150a868cd30ce16d26df1466fdac1a6c75" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8e82a2a2f7af29bb80c0d033ec6d8594bd00e043fef29ce4dc3a7178d32f64fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65186b346d1af06bc34f626f5f5bed22ca0b2eaf458bc1850afb3c07aa3b66cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17e16b8a943e3b1190d5295eedf18ee730dad9a0090e3f5b88af24372410b3f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "74704675148861672b2356a54a27113270df8066815ecf4307afd13558f764fa" + sha256 cellar: :any_skip_relocation, sonoma: "77140e798abd551e3da4a845473aa93e5737dcb2900a2605d2810e93c051b5ec" + sha256 cellar: :any_skip_relocation, ventura: "e5827a0c24cf1a4989e249ef9425440dfc2254045945abcfd1481c60393ba195" + sha256 cellar: :any_skip_relocation, arm64_linux: "09274a577c3e10a6cb0092a7bb38fccf5d1c1c1fdbf7d5d79783e94b52d1f99b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cb9b3f506f2cff73d1a6ef21969575a3e24646be804577b179e5735666dbe53" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "target/completions/mqttui.bash" => "mqttui" + fish_completion.install "target/completions/mqttui.fish" + zsh_completion.install "target/completions/_mqttui" + + man1.install "target/manpages/mqttui.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mqttui --version") + assert_match "Connection refused", shell_output("#{bin}/mqttui --broker mqtt://127.0.0.1 2>&1", 1) + end +end diff --git a/Formula/m/mr.rb b/Formula/m/mr.rb new file mode 100644 index 0000000000000..098ff58dc2ab2 --- /dev/null +++ b/Formula/m/mr.rb @@ -0,0 +1,46 @@ +class Mr < Formula + desc "Multiple Repository management tool" + homepage "https://myrepos.branchable.com/" + url "git://myrepos.branchable.com/", + tag: "1.20180726", + revision: "0ad7a17bb455de1fec3b2375c7aac72ab2a22ac4" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4013ab94225c8eafc1aa48b1b9b18220a7051eb8da0b98798b8dc99fd0266730" + end + + # Use brewed pod2man to ensure consistent output between platforms + depends_on "pod2man" => :build + + uses_from_macos "perl" + + resource("test-repo") do + url "https://github.com/Homebrew/homebrew-command-not-found.git" + end + + def install + # Don't include the perl version in the manpage since it may differ over time + inreplace "Makefile", "pod2man", "pod2man -r \"\"" + + system "make" + bin.install "mr", "webcheckout" + + # Don't include the pod2man version in the manpage since it may differ over time + inreplace %w[mr.1 webcheckout.1], /^\.\\" Automatically generated by.*$/, "" + + man1.install Utils::Gzip.compress("mr.1", "webcheckout.1") + pkgshare.install Dir["lib/*"] + end + + test do + resource("test-repo").stage do + system bin/"mr", "register" + assert_match(/^mr status: #{Dir.pwd}$/, shell_output("#{bin}/mr status")) + end + end +end diff --git a/Formula/m/mrbayes.rb b/Formula/m/mrbayes.rb new file mode 100644 index 0000000000000..65aacb11fde60 --- /dev/null +++ b/Formula/m/mrbayes.rb @@ -0,0 +1,69 @@ +class Mrbayes < Formula + desc "Bayesian inference of phylogenies and evolutionary models" + homepage "https://nbisweden.github.io/MrBayes/" + url "https://github.com/NBISweden/MrBayes/archive/refs/tags/v3.2.7a.tar.gz" + sha256 "3eed2e3b1d9e46f265b6067a502a89732b6f430585d258b886e008e846ecc5c6" + license "GPL-3.0-or-later" + revision 3 + head "https://github.com/NBISweden/MrBayes.git", branch: "develop" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "68e1a37bb0f6aef713da87dc8345bda73b464a7d255e5fe3a8d3ca21d0827dc8" + sha256 cellar: :any, arm64_sequoia: "bc112b0be314f46b96f507ec3741b7f915b7b384e162ff88d98076a0370a728f" + sha256 cellar: :any, arm64_sonoma: "e671f59ccb6371a26c1ff58c6bbb800a2bf7472f625ac83d756eeb8b281fd6a9" + sha256 cellar: :any, arm64_ventura: "67537897e78b18147e0a793ee201b270940fad606d3143ced31782e3fee12ef4" + sha256 cellar: :any, arm64_monterey: "56f6d18191f9e66a4cd485f3b1831b8037fccae239ccf6dab3289cf2bf4f22e6" + sha256 cellar: :any, arm64_big_sur: "c79fa2b377c5f8757040bb3ec2e55b88ba0d01f3085784c0d8c03dbb745b98fc" + sha256 cellar: :any, sonoma: "fb4866da8b44dcca56aa7b59d92d299d70882321919f46fa013a7b68889ea60f" + sha256 cellar: :any, ventura: "0f00c4d31388e52785795c9cffee3124d8662d1b25648a2cef38e80ff1d46609" + sha256 cellar: :any, monterey: "868362e98f0a1ebe8bf2a71f45fa96d6fd4d474e581f52e88e27192cc0086815" + sha256 cellar: :any, big_sur: "f00054f1f4fd5c3c7835ece867a6ce6d1a5156517a0a08233fe4548717b6a41e" + sha256 cellar: :any, catalina: "4239d03c3d4cf4e2b82b7b91dec3486836695da2770397238b7c8c4182930d20" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a4ec915301ae658e00a5fc302f84124e69ae54af8c0bfbc6167701fbe60d69f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "102eb61f76273eb1345ca920c8e0e4dc4cec0ccba93c56a9a2634376b727e3e6" + end + + depends_on "pkgconf" => :build + depends_on "beagle" + depends_on "open-mpi" + + def install + args = ["--with-mpi=yes"] + if Hardware::CPU.intel? + args << "--disable-avx" + # There is no argument to override AX_EXT SIMD auto-detection, which is done in + # configure and adds -m to build flags and also defines HAVE_ macros + if OS.mac? + args << "ax_cv_have_sse41_cpu_ext=no" unless MacOS.version.requires_sse41? + args << "ax_cv_have_sse42_cpu_ext=no" unless MacOS.version.requires_sse42? + else + args << "ax_cv_have_sse41_cpu_ext=no" + args << "ax_cv_have_sse42_cpu_ext=no" + end + args << "ax_cv_have_sse4a_cpu_ext=no" + args << "ax_cv_have_sha_cpu_ext=no" + args << "ax_cv_have_aes_cpu_ext=no" + args << "ax_cv_have_avx_os_support_ext=no" + args << "ax_cv_have_avx512_os_support_ext=no" + end + system "./configure", *args, *std_configure_args + system "make", "install" + + doc.install share/"examples/mrbayes" => "examples" + end + + test do + cp doc/"examples/primates.nex", testpath + cmd = "mcmc ngen = 5000; sump; sumt;" + cmd = "set usebeagle=yes beagledevice=cpu;" + cmd + inreplace "primates.nex", "end;", cmd + "\n\nend;" + system bin/"mb", "primates.nex" + end +end diff --git a/Formula/m/mrboom.rb b/Formula/m/mrboom.rb new file mode 100644 index 0000000000000..5fa95da9f077d --- /dev/null +++ b/Formula/m/mrboom.rb @@ -0,0 +1,36 @@ +class Mrboom < Formula + desc "Eight player Bomberman clone" + homepage "http://mrboom.mumblecore.org/" + url "https://github.com/Javanaise/mrboom-libretro/releases/download/5.5/MrBoom-src-5.5.tar.gz" + sha256 "c37c09c30662b17f1c7da337da1475f534674686ce78c7e15b603eeadc4498f0" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f75bf0a9e0a7ab7d6a6cdf4b4cc8cbcb4e1a10999900f82819dae07e211cd40" + sha256 cellar: :any, arm64_sequoia: "de4b659b5cc4e5c3bf4b4aaae71ef0dd18f2796c749d05e46bf888b20a678a54" + sha256 cellar: :any, arm64_sonoma: "0accb2a0bc974051659e56bcd38d59fbd97d5deee7187341ccfe4c7d97e4a93b" + sha256 cellar: :any, arm64_ventura: "ee172fbf933602cd8e7000325bdd568c788e6f5a9025dbebe78a44877c5599c4" + sha256 cellar: :any, arm64_monterey: "4ee5323d9f8a79f6657a66d115bee75002a21394dcc24b060e40edbd084be884" + sha256 cellar: :any, sonoma: "0e9ade944b362e11025baa34ca19d545f8ba6f92668044288fc9b67d6ba0c35b" + sha256 cellar: :any, ventura: "2eae2f3ed78912724d5518e2e68f4cf96b30461b69c770b413f85564266a5231" + sha256 cellar: :any, monterey: "928df5b59e0ca8fd75ba6d73643c40a8f1de19be35c251a288dc0e991e2c57df" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e01474f0bc6aae305f5ca6bc0f0ed6de99fd70112540185d9d7baec1de89916" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5d458cb0a2f0ed01cca78bf15db00aa8e4f5750538456bd2024e640da79dc4e" + end + + depends_on "cmake" => :build + depends_on "libmodplug" + depends_on "minizip" + depends_on "sdl2" + depends_on "sdl2_mixer" + + def install + system "make", "mrboom", "LIBSDL2=1" + system "make", "install", "PREFIX=#{prefix}", "MANDIR=share/man/man6" + end + + test do + # mrboom is a GUI application + assert_match version.to_s, shell_output("#{bin}/mrboom --version") + end +end diff --git a/Formula/m/mrtg.rb b/Formula/m/mrtg.rb new file mode 100644 index 0000000000000..46570659b1129 --- /dev/null +++ b/Formula/m/mrtg.rb @@ -0,0 +1,45 @@ +class Mrtg < Formula + desc "Multi router traffic grapher" + homepage "https://oss.oetiker.ch/mrtg/" + url "https://oss.oetiker.ch/mrtg/pub/mrtg-2.17.10.tar.gz" + sha256 "c7f11cb5e217a500d87ee3b5d26c58a8652edbc0d3291688bb792b010fae43ac" + license "GPL-2.0-or-later" + + livecheck do + url "https://oss.oetiker.ch/mrtg/pub/" + regex(/href=.*?mrtg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "16df1972b9200a5138dbedde9f1dcf140b35c32adc3116c72b51d95f4f8e02d5" + sha256 cellar: :any, arm64_sequoia: "6f57406896304b19653d1d9ad0f1d803709fe72cde0b1cc7acb141a126617dbd" + sha256 cellar: :any, arm64_sonoma: "8324ea6acce9878f8599a18ccd373c4b1852f3e51752d5b8309d5581005321eb" + sha256 cellar: :any, arm64_ventura: "3dc3ce6e2425a2c461ce3beef08a2f16a7141a3b427c5ecc334da566619c2065" + sha256 cellar: :any, arm64_monterey: "df8611100c34ebb4c553b81493006f954fca61669b4a6331914529bce73a6348" + sha256 cellar: :any, arm64_big_sur: "fedc3e50c0a75c2ae6e719a1ef5502ce38efdba9e51d0f9201d2ad02d5c0a1db" + sha256 cellar: :any, sonoma: "39958b96f98a88625a4031bdbec297b63246f5c926d9c780e67495dd762dafcc" + sha256 cellar: :any, ventura: "e7a1b7cf6468e3ff41eb63860fd61887658eea6fac2fec29c30f97ed8491f893" + sha256 cellar: :any, monterey: "47c8ae5d5466514d50393ec5f48219313a2a9b7b1544b08dd923bf1e5642762e" + sha256 cellar: :any, big_sur: "28151b3e97ec16b70623caab573a79eddbb2e86ab8c25812e3339ac9612c38f5" + sha256 cellar: :any, catalina: "a9cf00745f42b6db7026d3954948319f2528526099a6aa7386c63224952f1732" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b695928011e9618ef06a39999a9e9a856840101e56019cfc53b1c78a99ba39e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25d13a8441a4958962e6812e1811c529021505443bf4fb5cde24214f8cc1332a" + end + + depends_on "gd" + depends_on "libpng" + + def install + # Exclude unrecognized options + args = std_configure_args.reject { |s| s["--disable-debug"] || s["--disable-dependency-tracking"] } + + system "./configure", *args + system "make", "install" + end + + test do + system bin/"cfgmaker", "--nointerfaces", "localhost" + end +end diff --git a/Formula/m/mruby.rb b/Formula/m/mruby.rb new file mode 100644 index 0000000000000..b545a8cc1caa6 --- /dev/null +++ b/Formula/m/mruby.rb @@ -0,0 +1,47 @@ +class Mruby < Formula + desc "Lightweight implementation of the Ruby language" + homepage "https://mruby.org/" + url "https://github.com/mruby/mruby/archive/refs/tags/3.4.0.tar.gz" + sha256 "183711c7a26d932b5342e64860d16953f1cc6518d07b2c30a02937fb362563f8" + license "MIT" + head "https://github.com/mruby/mruby.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b02685c5cee6b7c01b11864e751fcfdc66112bdecd861e978b3aefc0e888270f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e76e20320c6a2d04d0af8785e59a94aa7e7d992a5db9a50ffbb34cb068a9b44" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d711085007c9d6fbc59688e73419eab05b717ebf53fdc1a42f870453d2e4b3d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf53080c3b6edbf118092341d45846ae988fddcc6fc2cd7f24e779791e4fac2a" + sha256 cellar: :any_skip_relocation, sonoma: "0e7d861057336fa23be40003127441e00bfb534586bc8e7baca92366d92746a2" + sha256 cellar: :any_skip_relocation, ventura: "9077c5d17dc2af732e8ef342a2ec492a16ed52277d7e17c2c9dfbf05d3da20c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf4078077027b1b33897a8305b00e1f2e766b005d856054b0a92b5842677f75b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87a0bfa8d4eeb79c615799174ba0be1e3fcd87deabc6d92267d1e708b951759a" + end + + depends_on "bison" => :build + uses_from_macos "ruby" => :build + + on_linux do + depends_on "readline" + end + + def install + cp "build_config/default.rb", buildpath/"homebrew.rb" + inreplace buildpath/"homebrew.rb", + "conf.gembox 'default'", + "conf.gembox 'full-core'" + ENV["MRUBY_CONFIG"] = buildpath/"homebrew.rb" + + system "make" + + cd "build/host/" do + lib.install Dir["lib/*.a"] + prefix.install %w[bin mrbgems mrblib] + end + + prefix.install "include" + end + + test do + system bin/"mruby", "-e", "true" + end +end diff --git a/Formula/m/msc-generator.rb b/Formula/m/msc-generator.rb new file mode 100644 index 0000000000000..31bd9c8b4523d --- /dev/null +++ b/Formula/m/msc-generator.rb @@ -0,0 +1,95 @@ +class MscGenerator < Formula + desc "Draws signalling charts from textual description" + homepage "https://gitlab.com/msc-generator/msc-generator" + url "https://gitlab.com/api/v4/projects/31167732/packages/generic/msc-generator/8.6.3/msc-generator-8.6.3.tar.gz" + sha256 "476115a4f4dc3f71fae43071c388db6323bf2298f9d3b6f5214557a570ceacf2" + license "AGPL-3.0-or-later" + revision 1 + + livecheck do + url "https://gitlab.com/api/v4/projects/31167732/packages" + strategy :json do |json| + json.map do |item| + next unless item["name"]&.downcase&.include?("msc-generator") + + item["version"] + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f59601f0cbde128e5bf006d6e209896fece79956672e1b68530d7fd32a9fa7fd" + sha256 arm64_sequoia: "85bcc5cfd7b8b439e17e4d1b438f99dd79efabef69a5d7c919bd4d5bc3892636" + sha256 arm64_sonoma: "1cdf8e111c43a0104afa5ef43307adad58eb9f67eab664e751b316d789115617" + sha256 sonoma: "72a0c8f7c7f666b4ba4bb963be292959be2a8d7c77d58aee15d58c4d6a51c932" + sha256 arm64_linux: "02f3c6b42be051258a634306df0100e10dabcfc8dd4113978f4629488d1b4340" + sha256 x86_64_linux: "dbb32f6692261fcf51d8a8b07e4c45d93189ad0565251ae4f3783a9ae3d5aaaa" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "fontconfig" + depends_on "gcc" + depends_on "glpk" + depends_on "graphviz" + depends_on "libpng" + depends_on "sdl2" + depends_on "tinyxml2" + + on_macos do + # Some upstream sed discussions in https://gitlab.com/msc-generator/msc-generator/-/issues/92 + depends_on "gnu-sed" => :build + depends_on "make" => :build # needs make 4.3+ + end + + on_linux do + depends_on "mesa" + end + + fails_with :clang # needs std::range + + fails_with :gcc do + version "12" + cause "needs std::range::contains" + end + + def install + args = %w[--disable-font-checks --disable-silent-rules] + make = "make" + + # Brew uses shims to ensure that the project is built with a single compiler. + # However, gcc cannot compile our Objective-C++ sources (clipboard.mm), while + # clang++ cannot compile the rest of the project. As a workaround, we set gcc + # as the main compiler, and bypass brew's compiler shim to force using clang++ + # for Objective-C++ sources. This workaround should be removed once brew supports + # setting separate compilers for C/C++ and Objective-C/C++. + if OS.mac? + args << "OBJCXX=/usr/bin/clang++" + ENV.append_to_cflags "-DNDEBUG" + ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" + ENV["MAKE"] = make = "gmake" + end + + system "./configure", *args, *std_configure_args + system make, "-C", "src", "install" + system make, "-C", "doc", "msc-gen.1" + man1.install "doc/msc-gen.1" + end + + test do + # Try running the program + system bin/"msc-gen", "--version" + # Construct a simple chart and check if PNG is generated (the default output format) + (testpath/"simple.signalling").write("a->b;") + system bin/"msc-gen", "simple.signalling" + assert_path_exists testpath/"simple.png" + bytes = File.binread(testpath/"simple.png") + assert_equal bytes[0..7], "\x89PNG\r\n\x1a\n".force_encoding("ASCII-8BIT") + end +end diff --git a/Formula/m/mscgen.rb b/Formula/m/mscgen.rb new file mode 100644 index 0000000000000..fbfebeb658591 --- /dev/null +++ b/Formula/m/mscgen.rb @@ -0,0 +1,97 @@ +class Mscgen < Formula + desc "Parses Message Sequence Chart descriptions and produces images" + homepage "https://www.mcternan.me.uk/mscgen/" + url "https://www.mcternan.me.uk/mscgen/software/mscgen-src-0.20.tar.gz" + sha256 "3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23" + license "GPL-2.0-or-later" + revision 4 + + livecheck do + url :homepage + regex(/href=.*?mscgen-src[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d9abf0e71de052136e3396ebb6bdfed805d918edb13f252eb052ab35e1704b89" + sha256 cellar: :any, arm64_sequoia: "ba7b5077209a47d9ab11f8d19d7d47ee0162f1fa30c20fd1e464c699e64eb9bd" + sha256 cellar: :any, arm64_sonoma: "685f813d386e9429db8d73bbdf201176f7842ccbe533d18d33b0d248b8484d7b" + sha256 cellar: :any, arm64_ventura: "73676ae3da025d8b7aaabc9809c3f65c3b6ae85a8d69850d7bd30bd5af0007ce" + sha256 cellar: :any, arm64_monterey: "3cd61f8ca37330ef4a7ba26132a5d3bdb3eea68f4f41307064dadc3dc5649fa5" + sha256 cellar: :any, arm64_big_sur: "cede56d6cd047fde4bb154591914ee1123d118080114fb82a5b156b895f8fad4" + sha256 cellar: :any, sonoma: "f7d48ef03be95a70f00a7c5432e2a232b0b0236e00db68b9b9727bddfbd153f4" + sha256 cellar: :any, ventura: "b500d3fa67b119c59ff1a781dfe0909b12d0e3c9581ec1cf9cfcf39940a4c4f9" + sha256 cellar: :any, monterey: "d031bdc4d5456838a3b0c8d60108309e3b2878067fda80b747cd2c6de90cccb1" + sha256 cellar: :any, big_sur: "a62050a8f5e00af5a06fde06f2d87acc030dba511a1b6b97f49ea148423c6776" + sha256 cellar: :any, catalina: "aaa059273a50cf91bca121c093ce2adfd8bee71d854c6212df2d63b4bf7811e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "b39667ceae160bffbf727a7ffcb6624325234c9ed3b3691e324c99f29f6e9f0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5957b2f4840517592807494271eb28d63b5c245ac014d34be596fb0355129031" + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "gd" + + def install + system "./configure", "--with-freetype", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.msc").write <<~EOS + msc { + width = "800"; + a, b, "c"; + a->b; + a<-c [label="return"]; + } + EOS + + expected_svg = <<~EOS + + + + + + a + + + + + b + + + + + c + + + + + + + + + + + + + + return + + + + + + EOS + + system bin/"mscgen", "-Tsvg", "-o", testpath/"test.svg", testpath/"test.msc" + assert_equal expected_svg, (testpath/"test.svg").read + end +end diff --git a/Formula/m/msdl.rb b/Formula/m/msdl.rb new file mode 100644 index 0000000000000..e924e668f59ee --- /dev/null +++ b/Formula/m/msdl.rb @@ -0,0 +1,66 @@ +class Msdl < Formula + desc "Downloader for various streaming protocols" + homepage "https://msdl.sourceforge.net/" + url "https://downloads.sourceforge.net/project/msdl/msdl/msdl-1.2.7-r2/msdl-1.2.7-r2.tar.gz" + version "1.2.7-r2" + sha256 "0297e87bafcab885491b44f71476f5d5bfc648557e7d4ef36961d44dd430a3a1" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/msdl[._-]v?(\d+(?:\.\d+)+(?:-r\d+)?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1624aa62efe3286085580bfc9482ff6e163e9dc3be33a0b485ebca7a0a91dd3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ab0083cb6623f31de8bd191354b00f627c0b7826646eae177337a2adc823dae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "081c8df653ff58f6f08ae5758481e4fa94f4786f2465def703e93009f6ae91bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a22fd7fd9ae5684a10a7646d42a1397b700a31db017be4a40e95ad37ce2d02b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2bbb7be167030b97337113482fe1007cf0f48a9fbc343f590b19c9964827e71e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5afd80d5dc62ee3c7a65fe5214d2fe51d89f8eda7ae9bb358bab102f5dd65e6a" + sha256 cellar: :any_skip_relocation, sonoma: "d1e540f838d6ed599d61c07efebd39d83021dfc9cc1eff67bc401a0fc924204b" + sha256 cellar: :any_skip_relocation, ventura: "f2dceb8e2a874043888797e3ad8693aa41babf5c080afe531169ee2fff4e180a" + sha256 cellar: :any_skip_relocation, monterey: "f41e17e53c1b292088d9f3160bbba5241b5e467e372c4ae860277038a4daf3e6" + sha256 cellar: :any_skip_relocation, big_sur: "a8703e042137fa27ddbda861bc9e04cea40edb5d3d3c6b4a90f5e850ee01326a" + sha256 cellar: :any_skip_relocation, catalina: "71fb71cf2c24085221ee1d24c57fbe07f1b6cc437d84385d22231a4723771207" + sha256 cellar: :any_skip_relocation, arm64_linux: "e60c658707ae055375b4402d09b83e121bd25f28ed5167cdd810d50ef02342c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5664cc49f99975d426fab1e8518356d8842512ab773aa4c2a3abe0fb957d1881" + end + + # Fixes linker error under clang; apparently reported upstream: + # https://github.com/Homebrew/homebrew/pull/13907 + patch :DATA + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `display_flags'; asf.o:(.bss+0x0): first defined here + # multiple definition of `colors_available'; asf.o:(.bss+0x4): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"msdl", "http://example.org/index.html" + assert_path_exists "index.html" + end +end + +__END__ +diff --git a/src/url.c b/src/url.c +index 81783c7..356883a 100644 +--- a/src/url.c ++++ b/src/url.c +@@ -266,7 +266,7 @@ void url_unescape_string(char *dst,char *src) + /* + * return true if 'c' is valid url character + */ +-inline int is_url_valid_char(int c) ++int is_url_valid_char(int c) + { + return (isalpha(c) || + isdigit(c) || diff --git a/Formula/m/msedit.rb b/Formula/m/msedit.rb new file mode 100644 index 0000000000000..e3c804af204e2 --- /dev/null +++ b/Formula/m/msedit.rb @@ -0,0 +1,27 @@ +class Msedit < Formula + desc "Simple text editor with clickable interface" + homepage "https://github.com/microsoft/edit" + url "https://github.com/microsoft/edit/archive/refs/tags/v1.2.1.tar.gz" + sha256 "41c719b08212fa4ab6e434a53242b2718ba313e8d24d090f244bb857d6a9d0fd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "300de72b71a69bf416777351c3f771cd8f965581ca38933dab0b5f137c99115b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a609fc4363c7917cc775e1d343ca2e9f010dca3fd61d721b15ef26cb5533901e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a33cf49751e560b1dfbcc926e3b5ff70c01891acbd11cb582dc7f3ce1cb03473" + sha256 cellar: :any_skip_relocation, sonoma: "776afb0bf80f2fbf1629d631cd8eb637c0996e5ca96f5d5e738c9d4f016fa148" + end + + depends_on "rust" => :build + depends_on :macos # due to test failure on linux + + def install + ENV["RUSTC_BOOTSTRAP"] = "1" + system "cargo", "install", *std_cargo_args + end + + test do + # msedit is a TUI application + assert_match version.to_s, shell_output("#{bin}/edit --version") + end +end diff --git a/Formula/m/msgpack-cxx.rb b/Formula/m/msgpack-cxx.rb new file mode 100644 index 0000000000000..2a420c69dee1d --- /dev/null +++ b/Formula/m/msgpack-cxx.rb @@ -0,0 +1,62 @@ +class MsgpackCxx < Formula + desc "MessagePack implementation for C++ / msgpack.org[C++]" + homepage "https://msgpack.org/" + url "https://github.com/msgpack/msgpack-c/releases/download/cpp-7.0.0/msgpack-cxx-7.0.0.tar.gz" + sha256 "7504b7af7e7b9002ce529d4f941e1b7fb1fb435768780ce7da4abaac79bb156f" + license "BSL-1.0" + head "https://github.com/msgpack/msgpack-c.git", branch: "cpp_master" + + livecheck do + url :stable + regex(/^cpp[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "a5f83dd35fe0b8f343a0db873809f53cc000bcd33f2d87dd56785d2619b39716" + end + + depends_on "cmake" => :build + depends_on "boost" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Reference: https://github.com/msgpack/msgpack-c/blob/cpp_master/QUICKSTART-CPP.md + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main(void) { + // serializes this object. + std::vector vec; + vec.push_back("Hello"); + vec.push_back("MessagePack"); + + // serialize it into simple buffer. + msgpack::sbuffer sbuf; + msgpack::pack(sbuf, vec); + + // deserialize it. + msgpack::object_handle oh = + msgpack::unpack(sbuf.data(), sbuf.size()); + + // print the deserialized object. + msgpack::object obj = oh.get(); + std::cout << obj << std::endl; //=> ["Hello", "MessagePack"] + + // convert it into statically typed object. + std::vector rvec; + obj.convert(rvec); + } + CPP + + system ENV.cxx, "-std=c++14", "-o", "test", "test.cpp", "-I#{include}" + assert_equal "[\"Hello\",\"MessagePack\"]\n", `./test` + end +end diff --git a/Formula/m/msgpack-tools.rb b/Formula/m/msgpack-tools.rb new file mode 100644 index 0000000000000..11a5a104e0cdb --- /dev/null +++ b/Formula/m/msgpack-tools.rb @@ -0,0 +1,47 @@ +class MsgpackTools < Formula + desc "Command-line tools for converting between MessagePack and JSON" + homepage "https://github.com/ludocode/msgpack-tools" + url "https://github.com/ludocode/msgpack-tools/releases/download/v0.6/msgpack-tools-0.6.tar.gz" + sha256 "98c8b789dced626b5b48261b047e2124d256e5b5d4fbbabdafe533c0bd712834" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d93b03564547f8828bbf33256496b8d132d362bb57a19dc31eaf90bb91f257a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "89db8ac554a849076b6b033ccd4d01758772b92c528107049b1ad0df61e3adcf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89cbb09892efa84ffed3f4b4184d91a42526e0884034d00edfcff5ef914acf27" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0efee2e7c968df487992d42aa94cc349e9d64762331226b637efe8853ba15d8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f4bf0c32cce899c521d54e6f26f7bd60c10ad64d4054df064ee42b4437ad9178" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "775db49a7259ddf909dd2a05a529e7e308cc2ac376ad116c1668bb659bd34a1c" + sha256 cellar: :any_skip_relocation, sonoma: "a4999dde3a882d85ed7afada6d7366d13bfabc1d37614f06a2510cf97baf1f65" + sha256 cellar: :any_skip_relocation, ventura: "6606dc9490eafb04a6078c34847f311aeb4460d28cf2fc90bb0fa3622904a502" + sha256 cellar: :any_skip_relocation, monterey: "8d663e0e00679aba8e9bba953aeb99ca657cfd8206769447e6459c33433f6d05" + sha256 cellar: :any_skip_relocation, big_sur: "570a72e93de0677f94a586cb49e04ac1fe68655e451860d45a250702fc6e0383" + sha256 cellar: :any_skip_relocation, catalina: "901f0f7dadb40b70b20de05a699e5cd9ca37095f3ce9bb277aff3e4421219290" + sha256 cellar: :any_skip_relocation, arm64_linux: "d52fc61e8c6c211c80b07bd7b49e8c459edc6b7ecb4ce9b711f3fcbd9548988c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62b6b16502ad2f612e795d483643499defe5839db98bfb92668d89cae76355b8" + end + + depends_on "cmake" => :build + + conflicts_with "remarshal", because: "both install 'json2msgpack' binary" + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + json_data = <<~JSON + {"hello":"world"} + JSON + + msgpack_data = pipe_output("#{bin}/json2msgpack", json_data) + output = pipe_output("#{bin}/msgpack2json", msgpack_data) + assert_equal json_data.strip, output.strip + end +end diff --git a/Formula/m/msgpack.rb b/Formula/m/msgpack.rb new file mode 100644 index 0000000000000..e986386f3301c --- /dev/null +++ b/Formula/m/msgpack.rb @@ -0,0 +1,84 @@ +class Msgpack < Formula + desc "Library for a binary-based efficient data interchange format" + homepage "https://msgpack.org/" + url "https://github.com/msgpack/msgpack-c/releases/download/c-6.1.0/msgpack-c-6.1.0.tar.gz" + sha256 "674119f1a85b5f2ecc4c7d5c2859edf50c0b05e0c10aa0df85eefa2c8c14b796" + license "BSL-1.0" + head "https://github.com/msgpack/msgpack-c.git", branch: "c_master" + + livecheck do + url :stable + regex(/^c[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5a412a93e8367e656022e5c0810632cba0d5c924e1cdf5f5bc64f1a0501a6aa9" + sha256 cellar: :any, arm64_sequoia: "fef7b080476f8c2ea5d3478775fb8ba7861cb2c5b25a5c06a575eabf303d6085" + sha256 cellar: :any, arm64_sonoma: "7a4291f35809d557ff65bdec687fc12468b557d8c27499fad634b84fc27c6a65" + sha256 cellar: :any, arm64_ventura: "9798f9eb15c335c663271387feedb42a24953c8a869d657e1b3d58868fb97177" + sha256 cellar: :any, arm64_monterey: "eb59d97db589ebe5afa0c0ae7f8ac4f07ae39433c323e6d90532301ff19a6c69" + sha256 cellar: :any, sonoma: "f8a10c653f0e071f725866c790eebef4161f4c172315388aefdada07682c46bd" + sha256 cellar: :any, ventura: "c7e8c2eddc2b55a71e6e6a6a3f63c90cb66369727b990cc553470b7b91ceb599" + sha256 cellar: :any, monterey: "0c0c337dad512678ec60426c448aded9965daef3b4ee89eec9f98faad1789012" + sha256 cellar: :any_skip_relocation, arm64_linux: "07097acd7e8f4e885cf3917b684a45721344db7aa38edea9ad01c8c6acdbe141" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95d7d9a41f1c13c5ce0e1a2ec77f119a3b55e2ad88f0f98d3e5a04d323896171" + end + + depends_on "cmake" => :build + + def install + # C++ Headers are now in msgpack-cxx + system "cmake", "-S", ".", "-B", "build", "-DMSGPACK_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # `libmsgpackc` was renamed to `libmsgpack-c`, but this needlessly breaks dependents. + # TODO: Remove this when upstream bumps the `SOVERSION`, since this will require dependent rebuilds. + lib.glob(shared_library("libmsgpack-c", "*")).each do |dylib| + dylib = dylib.basename + old_name = dylib.to_s.sub("msgpack-c", "msgpackc") + lib.install_symlink dylib => old_name + end + end + + test do + refute_empty lib.glob(shared_library("libmsgpackc", "2")), + "Upstream has bumped `SOVERSION`! The workaround in the `install` method can be removed" + + # Reference: https://github.com/msgpack/msgpack-c/blob/c_master/QUICKSTART-C.md + (testpath/"test.c").write <<~C + #include + #include + + int main(void) + { + msgpack_sbuffer* buffer = msgpack_sbuffer_new(); + msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write); + msgpack_pack_int(pk, 1); + msgpack_pack_int(pk, 2); + msgpack_pack_int(pk, 3); + + /* deserializes these objects using msgpack_unpacker. */ + msgpack_unpacker pac; + msgpack_unpacker_init(&pac, MSGPACK_UNPACKER_INIT_BUFFER_SIZE); + + /* feeds the buffer. */ + msgpack_unpacker_reserve_buffer(&pac, buffer->size); + memcpy(msgpack_unpacker_buffer(&pac), buffer->data, buffer->size); + msgpack_unpacker_buffer_consumed(&pac, buffer->size); + + /* now starts streaming deserialization. */ + msgpack_unpacked result; + msgpack_unpacked_init(&result); + + while(msgpack_unpacker_next(&pac, &result)) { + msgpack_object_print(stdout, result.data); + puts(""); + } + } + C + + system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lmsgpack-c" + assert_equal "1\n2\n3\n", `./test` + end +end diff --git a/Formula/m/msgpuck.rb b/Formula/m/msgpuck.rb new file mode 100644 index 0000000000000..6c142dc5512b8 --- /dev/null +++ b/Formula/m/msgpuck.rb @@ -0,0 +1,71 @@ +class Msgpuck < Formula + desc "Simple and efficient MsgPack binary serialization library" + homepage "https://rtsisyk.github.io/msgpuck/" + url "https://github.com/rtsisyk/msgpuck/archive/refs/tags/2.0.tar.gz" + sha256 "01e6aa55d4d52a5b19f7ce9a9845506d9ab3f5abcf844a75e880b8378150a63d" + license "BSD-2-Clause" + head "https://github.com/rtsisyk/msgpuck.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f84409ca74ea32a8c71174901ecdbe9abbf3d459df7fc5d1eac35f59ad7fc267" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d53fd2848632fe20526ee4808f269706c4788b7e3f8d41f329fbb9c2437b77b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "26e05760c2486aec44bc8d1f4fb968bcb9fecb980c693a8134e034d6d7885877" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4ca7fca2ee5beb10e49b21dd3f810450442147158a291e023acc8e7982630c7f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d52c18b8fef8cbd5b59f41e014a2c85610787084714a4086c26152cd6cc59a6b" + sha256 cellar: :any_skip_relocation, sonoma: "d3542b4f95f7a9ada9a0a0509207ecfaebe77cdfe77db9e63a1624a378a4ef00" + sha256 cellar: :any_skip_relocation, ventura: "7ab7c36f070e933b3ced38035beb6b9ea68981d62e1278ad622632cb259a7721" + sha256 cellar: :any_skip_relocation, monterey: "350569d8ace92f17a35a90345712219f94596e8857ed222e1ca86ab086fa06ed" + sha256 cellar: :any_skip_relocation, big_sur: "c0137f8e139ada6b1c98315f7e9982a44131b133a48aa7959d64015880d7f430" + sha256 cellar: :any_skip_relocation, catalina: "01dbdca0333694d379bd7b209d52d8dd8e48f5416d9df441d43cdb29c2751738" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24b63f0499e6e5bc5b138228966945ff497936a4679da98a44aa18cfeec538a1" + end + + deprecate! date: "2024-03-08", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + /* Encode and decode an array */ + #include + #include + + int main() { + const char *str = "hello world"; + + char buf[1024]; + char *w = buf; + const char *pos = buf; + + w = mp_encode_array(w, 4); + w = mp_encode_uint(w, 10); + w = mp_encode_str(w, str, strlen(str)); + w = mp_encode_bool(w, true); + w = mp_encode_double(w, 3.1415); + + assert(mp_typeof(*pos) == MP_ARRAY ); + mp_decode_array(&pos); + assert(mp_typeof(*pos) == MP_UINT ); + mp_next(&pos); + assert(mp_typeof(*pos) == MP_STR ); + mp_next(&pos); + assert(mp_typeof(*pos) == MP_BOOL ); + mp_next(&pos); + assert(mp_typeof(*pos) == MP_DOUBLE); + mp_next(&pos); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmsgpuck", "-o", "test" + system "#{testpath}/test" + end +end diff --git a/Formula/m/msieve.rb b/Formula/m/msieve.rb new file mode 100644 index 0000000000000..27dd28e07e718 --- /dev/null +++ b/Formula/m/msieve.rb @@ -0,0 +1,41 @@ +class Msieve < Formula + desc "C library for factoring large integers" + homepage "https://sourceforge.net/projects/msieve/" + url "https://downloads.sourceforge.net/project/msieve/msieve/Msieve%20v1.53/msieve153_src.tar.gz" + sha256 "c5fcbaaff266a43aa8bca55239d5b087d3e3f138d1a95d75b776c04ce4d93bb4" + license :public_domain + + livecheck do + url :stable + regex(%r{url=.*?/Msieve%20v?(\d+(?:\.\d+)+)/}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2b65b15dd3dc23b5ce6b836922bb640e0d8025a718660ba6dc8cc2f7f32e3d53" + sha256 cellar: :any, arm64_sequoia: "2260d591d00ad9854b38b43ccacae829d03ca030b0f5e50ec5989d7ce2b3e616" + sha256 cellar: :any, arm64_sonoma: "e2048a031203ed1bb7bb3ee4becb928faa9f6d40b96ce62d3718873dd25bc83e" + sha256 cellar: :any, arm64_ventura: "b5fd08185a6cccac73b0cbdbc912880cababcee826bf5dbd3a07a6b6a590b53d" + sha256 cellar: :any, arm64_monterey: "58f7c8472236d7c6213d11a6160e9b58a07de88dd07f0cb2c6281d3d800ce942" + sha256 cellar: :any, sonoma: "0be196c24813acf765158fe9fc3c525daf39627c52b762e6dcb54e99dad4fd6f" + sha256 cellar: :any, ventura: "712fbadc3fd1dca26ddb4c0d578c9d067e3c246c8fb56ef27eaa611ca5a60cea" + sha256 cellar: :any, monterey: "5d992af057d4b06b7f0898fbdd560410efeca4d336a4e562a916af392fe21019" + sha256 cellar: :any_skip_relocation, arm64_linux: "d16fedefd47cb5e83d6e171e47d9d347494a65d957e900a103c73d7d93f1e2fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8580e27cfae573df3fd975a42ceea4967f1397e566523189f385ce7a128148e" + end + + depends_on "gmp" + + uses_from_macos "zlib" + + def install + ENV.append "MACHINE_FLAGS", "-include sys/time.h" + system "make", "all" + bin.install "msieve" + end + + test do + assert_match "20\np1: 2\np1: 2\np1: 5", shell_output("#{bin}/msieve -q 20") + end +end diff --git a/Formula/m/msitools.rb b/Formula/m/msitools.rb new file mode 100644 index 0000000000000..f9def823f235b --- /dev/null +++ b/Formula/m/msitools.rb @@ -0,0 +1,107 @@ +class Msitools < Formula + desc "Windows installer (.MSI) tool" + homepage "https://wiki.gnome.org/msitools" + url "https://download.gnome.org/sources/msitools/0.106/msitools-0.106.tar.xz" + sha256 "1ed34279cf8080f14f1b8f10e649474125492a089912e7ca70e59dfa2e5a659b" + license "LGPL-2.1-or-later" + + # msitools doesn't seem to use the GNOME version scheme, so we have to + # loosen the default `Gnome` strategy regex to match the latest version. + livecheck do + url :stable + regex(/msitools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "ea1afd46d27a15b86175c1e085f383237cf7dde567e54fc07bfed1b896649e6e" + sha256 arm64_sequoia: "12fe70c934de768f9374ebeedaf658c477dbdb3ab0f0a96dd3baf66101c0083d" + sha256 arm64_sonoma: "efa74fbc638ff57c0af2e6036eedbde4c5ba367b25099bcfb7983abe29891d0a" + sha256 arm64_ventura: "b44ed9f4798de3add43ba4b2d4eab8d19de501e6550f33bb14a70cd929ae4e7b" + sha256 sonoma: "828f74c79ab546bff9163b165e186f9a071593ac7ef94b8980ae1295a64ec2eb" + sha256 ventura: "9643bfd74e73e44cb051d236b2ad71ec2ffe7f45a7466ecb44758b6909c91cbd" + sha256 arm64_linux: "dbe166925d6bcfe474984d3514b2145e151ea0e3953beb76410f76a052f29d62" + sha256 x86_64_linux: "6361381386fa074d2bed5ced54c6ffac0902bd01add061c47b7a35b603c0757d" + end + + depends_on "bison" => :build + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build + depends_on "gcab" + depends_on "glib" + depends_on "libgsf" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dintrospection=true", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # wixl-heat: make an xml fragment + assert_match "", pipe_output("#{bin}/wixl-heat --prefix test", nil, 0) + + # wixl: build two installers + 1.upto(2) do |i| + (testpath/"test#{i}.txt").write "abc" + (testpath/"installer#{i}.wxs").write <<~XML + + + + + + + + + + + + + + + + + + + + + + XML + system bin/"wixl", "-o", "installer#{i}.msi", "installer#{i}.wxs" + assert_path_exists testpath/"installer#{i}.msi" + end + + # msidiff: diff two installers + lines = shell_output("#{bin}/msidiff --list installer1.msi installer2.msi 2>/dev/null").split("\n") + assert_equal "-Program Files/test/test1.txt", lines[-2] + assert_equal "+Program Files/test/test2.txt", lines[-1] + + # msiinfo: show info for an installer + out = shell_output("#{bin}/msiinfo suminfo installer1.msi") + assert_match(/Author: BigCo/, out) + + # msiextract: extract files from an installer + mkdir "files" + system bin/"msiextract", "--directory", "files", "installer1.msi" + assert_equal (testpath/"test1.txt").read, + (testpath/"files/Program Files/test/test1.txt").read + + # msidump: dump tables from an installer + mkdir "idt" + system bin/"msidump", "--directory", "idt", "installer1.msi" + assert_path_exists testpath/"idt/File.idt" + + # msibuild: replace a table in an installer + system bin/"msibuild", "installer1.msi", "-i", "idt/File.idt" + end +end diff --git a/Formula/m/msktutil.rb b/Formula/m/msktutil.rb new file mode 100644 index 0000000000000..81b1e67dac181 --- /dev/null +++ b/Formula/m/msktutil.rb @@ -0,0 +1,35 @@ +class Msktutil < Formula + desc "Active Directory keytab management" + homepage "https://github.com/msktutil/msktutil" + url "https://github.com/msktutil/msktutil/releases/download/1.2.2/msktutil-1.2.2.tar.bz2" + sha256 "51314bb222c20e963da61724c752e418261a7bfc2408e7b7d619e82a425f6541" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "637b97314f04b43d95e6fea26acf3f8f531270aa5d1ce61e6b1622d9f54e6b22" + sha256 cellar: :any, arm64_sequoia: "1d4a594ffcf5627ca1fb5781078661711c3a1c63b5b8542a140c0a0f44bbc4e3" + sha256 cellar: :any, arm64_sonoma: "a9c6eb346f0a7bbc6f71fd72742fc908ded087b432c75ffaeab22b9308492af2" + sha256 cellar: :any, arm64_ventura: "dafafc71f2995c54f1b3ec393dda0fd0b68961d7bfd943ef795a26a8a5e18172" + sha256 cellar: :any, sonoma: "3fcc25c8edbcb71d193079ba3108263410cc9b9057b51f9d995ba499982795cc" + sha256 cellar: :any, ventura: "02776a3d462787e70fc5fc13dcda29929faa694c073db369119d6c34e16f7e40" + sha256 cellar: :any_skip_relocation, arm64_linux: "69a7a6390216722bbba0e2b1c6b3dcf7aef66cfd3625c2ff4a93c9647d14f157" + sha256 cellar: :any_skip_relocation, x86_64_linux: "667123d6e8cd021378d8fd1bc556d0756dd9e694972b29c0fbc282716c8626a7" + end + + # macos builtin krb5 has `krb5-config reports unknown vendor Apple MITKerberosShim` error + depends_on "krb5" + + uses_from_macos "cyrus-sasl" + uses_from_macos "openldap" + + def install + system "./configure", "--disable-silent-rules", + "--mandir=#{man}", + *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/msktutil --version") + end +end diff --git a/Formula/m/msmtp.rb b/Formula/m/msmtp.rb new file mode 100644 index 0000000000000..d8344d7de4986 --- /dev/null +++ b/Formula/m/msmtp.rb @@ -0,0 +1,36 @@ +class Msmtp < Formula + desc "SMTP client that can be used as an SMTP plugin for Mutt" + homepage "https://marlam.de/msmtp/" + url "https://marlam.de/msmtp/releases/msmtp-1.8.32.tar.xz" + sha256 "20cd58b58dd007acf7b937fa1a1e21f3afb3e9ef5bbcfb8b4f5650deadc64db4" + license "GPL-3.0-or-later" + + livecheck do + url "https://marlam.de/msmtp/download/" + regex(/href=.*?msmtp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fb73c1d4d6cf6a3eaa9d58dd28e92a3236b7391fae2d952b5905e4b2aaa69f2d" + sha256 cellar: :any, arm64_sequoia: "c4bb0636780fd6fc1b2fc13590d52b7b9b3332278494b15a6004a9b6dbf3afbb" + sha256 cellar: :any, arm64_sonoma: "f7ad2eb8f4e8af3da9ac87aec6cab70ffa98851883b9fd91d10fa3fc8bee6c89" + sha256 cellar: :any, sonoma: "48fd217589c9426abb52e7ab4f39f5cb1187cf0deb5771100d8e867d58339f40" + sha256 arm64_linux: "f9d5377da5a884596453a9415f0bd97023e0e658c63b99cae4e1055d48576d4e" + sha256 x86_64_linux: "d59eb5c9d9210d35fa752ba933abdc5f85f58df3106482273b8f73dec56b5bb4" + end + + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "gnutls" + depends_on "libidn2" + + def install + system "./configure", "--disable-silent-rules", "--with-macosx-keyring", *std_configure_args + system "make", "install" + (pkgshare/"scripts").install "scripts/msmtpq" + end + + test do + system bin/"msmtp", "--help" + end +end diff --git a/Formula/m/msolve.rb b/Formula/m/msolve.rb new file mode 100644 index 0000000000000..6cc566db1f7c4 --- /dev/null +++ b/Formula/m/msolve.rb @@ -0,0 +1,63 @@ +class Msolve < Formula + desc "Library for Polynomial System Solving through Algebraic Methods" + homepage "https://msolve.lip6.fr" + url "https://github.com/algebraic-solving/msolve/archive/refs/tags/v0.9.2.tar.gz" + sha256 "9ba8b290fee048e49615015c43a7a1f2c05ac7e7fb277a964105d51c082f7d9f" + license "GPL-2.0-or-later" + head "https://github.com/algebraic-solving/msolve.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "dfc008bf6e1d4717b1208afe5d649cdab7a64f74ef9681f5091a14a5c49e91bd" + sha256 cellar: :any, arm64_sequoia: "fe96c5b37b5a2e7ddd0256d4502de40884df42563bb360828c37b65d445280b6" + sha256 cellar: :any, arm64_sonoma: "b7bb06196b7d6be9a83ab9afe7744c4a6a74be850f045862f4161645ec2b0897" + sha256 cellar: :any, sonoma: "c6073089ceff7a118ae0fb64f812e8b6bc7b06a03c27491d539b03988af4a05b" + sha256 cellar: :any_skip_relocation, arm64_linux: "63ea7bca4d298cfa2cb5cc6af8df6a5da618b001527907be2ccd06074ea5359e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33dabeec5eb4a37e30a98d3afafc973e2875c9f27e50b85e59a88b6f40d3f02b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + depends_on "flint" + depends_on "gmp" + depends_on "mpfr" + + on_macos do + depends_on "libomp" + end + + def install + # avoid unsupported openmp + if OS.mac? + libomp = Formula["libomp"] + ENV.append "CPPFLAGS", "-I#{libomp.opt_include}" + ENV.append_to_cflags "-Xpreprocessor -fopenmp" + ENV.append "LDFLAGS", "-L#{libomp.opt_lib} -lomp" + end + + # only compile with cpu baseline features for the pre-built binaries + inreplace "configure.ac", /AX_EXT/, " " if build.bottle? + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", "--enable-openmp=yes", *std_configure_args + system "make", "install" + end + + test do + (testpath/"eco10-31.ms").write <<-EOS + x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 + 1073741827 + x0*x1*x9+x1*x2*x9+x2*x3*x9+x3*x4*x9+x4*x5*x9+x5*x6*x9+x6*x7*x9+x7*x8*x9+x0*x9-1, + x0*x2*x9+x1*x3*x9+x2*x4*x9+x3*x5*x9+x4*x6*x9+x5*x7*x9+x6*x8*x9+x1*x9-2, + x0*x3*x9+x1*x4*x9+x2*x5*x9+x3*x6*x9+x4*x7*x9+x5*x8*x9+x2*x9-3, + x0*x4*x9+x1*x5*x9+x2*x6*x9+x3*x7*x9+x4*x8*x9+x3*x9-4, + x0*x5*x9+x1*x6*x9+x2*x7*x9+x3*x8*x9+x4*x9-5, + x0*x6*x9+x1*x7*x9+x2*x8*x9+x5*x9-6, + x0*x7*x9+x1*x8*x9+x6*x9-7, + x0*x8*x9+x7*x9-8, + x8*x9-9, + x0+x1+x2+x3+x4+x5+x6+x7+x8+1 + EOS + system bin/"msolve", "-f", "eco10-31.ms" + end +end diff --git a/Formula/m/mspdebug.rb b/Formula/m/mspdebug.rb new file mode 100644 index 0000000000000..e3ace10001304 --- /dev/null +++ b/Formula/m/mspdebug.rb @@ -0,0 +1,50 @@ +class Mspdebug < Formula + desc "Debugger for use with MSP430 MCUs" + homepage "https://dlbeer.co.nz/mspdebug/" + url "https://github.com/dlbeer/mspdebug/archive/refs/tags/v0.25.tar.gz" + sha256 "347b5ae5d0ab0cddb54363b72abe482f9f5d6aedb8f230048de0ded28b7d1503" + license "GPL-2.0-or-later" + head "https://github.com/dlbeer/mspdebug.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a08a0168403ae075c0a9911267a269580acdc696a6614d337c9ebc2d8d3c5152" + sha256 arm64_sequoia: "fffb3b1ca1b99e0186d8a36fa847918c4e533a935df4520a690ec285cdc16df3" + sha256 arm64_sonoma: "b2afc19ddfc781ba82c0a1ec660cd0484285f4341bef4123f56c19b8e99c66c7" + sha256 arm64_ventura: "56080d64e000643c6725ed8051485e0b85e8e5e386f7a57398a3ec06d59a699a" + sha256 arm64_monterey: "42af25df066a3e948b0644670299949b54582bdede0ab53e41dcb346c0c2c92e" + sha256 arm64_big_sur: "2c4c83e755286f97432ced3adb0e81a15e2241715e82135a6cc758999d621cfd" + sha256 sonoma: "3ca296dd7aca7d6a828126dc830dfe8fa917c38a2a953a09a662d155ba741527" + sha256 ventura: "bdff1006fe15553254c8cdafce3c56689d2d59f7d6943b8cdac964e1b5d0f0b8" + sha256 monterey: "161469d0a1065aa833dede6bb5b10f2caebecb397ea5af306ee64b4d8c71f937" + sha256 big_sur: "bd15ded651cbe43d819ae5f6a52d90cfafd51306d42a2f2b6c98d1b70ed4873f" + sha256 catalina: "4e512b296b8a655fbe8632afca020866f6499c461fb715aef5c4eb6bdda88034" + sha256 arm64_linux: "c1b911028aeb60adacec4ed8f289bc22d8a5108c4d59a8ea6c99bd2aab79c13d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "591e9d4d6bf5cedceda3db088a416b6c597acdcd65d40856c8f5fd69c49b8c7c" + end + + depends_on "hidapi" + depends_on "libusb-compat" + + on_linux do + depends_on "readline" + end + + def install + ENV.append_to_cflags "-I#{Formula["hidapi"].opt_include}/hidapi" + system "make", "PREFIX=#{prefix}", "install" + end + + def caveats + <<~EOS + You may need to install a kernel extension if you're having trouble with + RF2500-like devices such as the TI Launchpad: + https://dlbeer.co.nz/mspdebug/faq.html#rf2500_osx + EOS + end + + test do + system bin/"mspdebug", "--help" + end +end diff --git a/Formula/m/mstch.rb b/Formula/m/mstch.rb new file mode 100644 index 0000000000000..66f5502a52416 --- /dev/null +++ b/Formula/m/mstch.rb @@ -0,0 +1,69 @@ +class Mstch < Formula + desc "Complete implementation of {{mustache}} templates using modern C++" + homepage "https://github.com/no1msd/mstch" + url "https://github.com/no1msd/mstch/archive/refs/tags/1.0.2.tar.gz" + sha256 "811ed61400d4e9d4f9ae0f7679a2ffd590f0b3c06b16f2798e1f89ab917cba6c" + license "MIT" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de05bbbd99f8eb688ae2cd08287796eddbd6774bed8f27945cc818e8a1aee27a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "437c22d289926bc83d04a407aacb2673331d7bb27165a6c17af2994febc67c02" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f20877158629504b39573ded1a2dd06de78cd1de916eb10fdfadaddee5dca44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "de4dc750e2737a8745de171858fc53741ee2625540f3ed64516f5afd9a8abc6f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "16e5ebc65aa83659f1ae24aedc277490f3423336de6081092a16c54d541d535d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "091a9f16feb7f238f196e7e184fd67d175d06d5f40b6237ae5fe89e9cfb25f40" + sha256 cellar: :any_skip_relocation, sonoma: "10610321f7b5fa161cf8f8f7eb9e85cd1844c4a7b5ec282d25f9d42e8d973ded" + sha256 cellar: :any_skip_relocation, ventura: "c7077d9fab11fe2dd54f86d558faafdeea1d053bf93a52cff6702a0e07e2a407" + sha256 cellar: :any_skip_relocation, monterey: "54d4bc0f632f178d01ade96cd1baad2e928ef3fe47cf016b4a9bceb2696d3dbe" + sha256 cellar: :any_skip_relocation, big_sur: "94803b150e7503fdb744b8eb8ab27b9e22b0a3e1720f63233268044fe25514ee" + sha256 cellar: :any_skip_relocation, catalina: "8e7784c0a95b0fb2a5ada7d237102a9bd038ca1fbdab1c62bed686640cad5ede" + sha256 cellar: :any_skip_relocation, arm64_linux: "66db171aa49e6b433591665ec4a04fd996c56e94f3329e550af33f6e7d700a4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc3206f041325c9dc4217c73cad3064ecbd58e679f7cde926fbed9d244102686" + end + + depends_on "cmake" => :build + depends_on "boost" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (lib/"pkgconfig/mstch.pc").write pc_file + end + + def pc_file + <<~EOS + prefix=#{HOMEBREW_PREFIX} + exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${exec_prefix}/include + + Name: mstch + Description: Complete implementation of {{mustache}} templates using modern C++ + Version: 1.0.1 + Libs: -L${libdir} -lmstch + Cflags: -I${includedir} + EOS + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() { + std::string view("Hello, world"); + mstch::map context; + + assert(mstch::render(view, context) == "Hello, world"); + } + CPP + + system ENV.cxx, "test.cpp", "-L#{lib}", "-lmstch", "-std=c++11", "-o", "test" + system "./test" + end +end diff --git a/Formula/m/mt32emu.rb b/Formula/m/mt32emu.rb new file mode 100644 index 0000000000000..a31ccac9b558b --- /dev/null +++ b/Formula/m/mt32emu.rb @@ -0,0 +1,49 @@ +class Mt32emu < Formula + desc "Multi-platform software synthesiser" + homepage "https://github.com/munt/munt" + url "https://github.com/munt/munt/archive/refs/tags/libmt32emu_2_7_2.tar.gz" + sha256 "3b0beff64e83d2b4879baba2326eed1300edc9663b3dc52621fc74d196ca9a80" + license "LGPL-2.1-or-later" + head "https://github.com/munt/munt.git", branch: "master" + + livecheck do + url :stable + regex(/^libmt32emu[._-]v?(\d+(?:[._-]\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6471e62d5707fb60db08ef8ec9cd104ebf428331f8209f1e3c03634cebefb0c5" + sha256 cellar: :any, arm64_sequoia: "7dedf906d2b598cf6a058f35544c300d6ceb3a12af1388d1b599c0054592ad02" + sha256 cellar: :any, arm64_sonoma: "a0c2c0dc6418dadcbff63677f77ab64e6ccdf244c9671edecf9642f288c72c64" + sha256 cellar: :any, arm64_ventura: "b5370efcc40c5a7d40370fb26831fa33d1614df0236b9e2a11e5e72b2a1c3008" + sha256 cellar: :any, sonoma: "6d39796b131f4a1fd585274e136c5124905bb3184021754900eacb31c01712cc" + sha256 cellar: :any, ventura: "86efe1414cb2caaf791ecf4f1889595f202e3d337718ef172a1d76736bdf3dfd" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c82f0846ac879c75313e981f1824955027fad8a4c5a7a4dfbabd73097b7bbdb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a0f9273063bb82683ba95993f2ece66a662d410028c564196d54e9900fc4897" + end + + depends_on "cmake" => :build + depends_on "libsamplerate" + depends_on "libsoxr" + + def install + system "cmake", "-S", "mt32emu", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"mt32emu-test.c").write <<~C + #include "mt32emu.h" + #include + int main() { + printf("%s", mt32emu_get_library_version_string()); + } + C + + system ENV.cc, "mt32emu-test.c", "-I#{include}", "-L#{lib}", "-lmt32emu", "-o", "mt32emu-test" + assert_match version.to_s, shell_output("./mt32emu-test") + end +end diff --git a/Formula/m/mtbl.rb b/Formula/m/mtbl.rb new file mode 100644 index 0000000000000..7958e33d868df --- /dev/null +++ b/Formula/m/mtbl.rb @@ -0,0 +1,46 @@ +class Mtbl < Formula + desc "Immutable sorted string table library" + homepage "https://github.com/farsightsec/mtbl" + url "https://dl.farsightsecurity.com/dist/mtbl/mtbl-1.7.1.tar.gz" + sha256 "da2693ea8f9d915a09cdb55815ebd92e84211443b0d5525789d92d57a5381d7b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d99aa92632fd6ead895d811adaae316e95c7db7c3fc9125dc39010f4193435c2" + sha256 cellar: :any, arm64_sequoia: "2b6fa4c8ee0748b475c8de603bc8ad4445e0a611f559efcabb8f32d01570cd95" + sha256 cellar: :any, arm64_sonoma: "2ac95c6c0d71f51e76820c71fe4a154a8a817cbe7481724845385334a29d0488" + sha256 cellar: :any, arm64_ventura: "4e8b43423cd8c82ef0f2d586b53c9e4ee38e9977e4a4b0b0bbbb5efc869b4119" + sha256 cellar: :any, sonoma: "32ecbed59f4c384f6b83fa4747e57676915aef4046dca8e71e3ed8ea45acfb20" + sha256 cellar: :any, ventura: "751ce48fd18ed2f366e62f792819fd4807f90582ba99f4f844585c1d30782710" + sha256 cellar: :any_skip_relocation, arm64_linux: "964ac6e3d6a03c6a037a797a66fabea64638a2c073c412c75cf5cb2afe189cf7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e22aa2d09aa22c71d7646d7d15fd1e8bba3344967f0ebb0c53bbc8dd05c503ea" + end + + head do + url "https://github.com/farsightsec/mtbl.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "lz4" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + + pkgshare.install "t/fileset-filter-data/animals-1.mtbl" + end + + test do + output = shell_output("#{bin}/mtbl_verify #{pkgshare}/animals-1.mtbl") + assert_equal "#{pkgshare}/animals-1.mtbl: OK", output.chomp + end +end diff --git a/Formula/m/mtm.rb b/Formula/m/mtm.rb new file mode 100644 index 0000000000000..3f51b8ed12c05 --- /dev/null +++ b/Formula/m/mtm.rb @@ -0,0 +1,54 @@ +class Mtm < Formula + desc "Micro terminal multiplexer" + homepage "https://github.com/deadpixi/mtm" + url "https://github.com/deadpixi/mtm/archive/refs/tags/1.2.1/1.2.1.tar.gz" + sha256 "2ae05466ef44efa7ddb4bce58efc425617583d9196b72e80ec1090bd77df598c" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fc17d2a6d42dc599cc4a707a445b1bf0201039191f86829c9ed6ef4c9ae7d9ea" + sha256 cellar: :any, arm64_sequoia: "7568a6130dc642b184063d2b470d2855e0cbc040e80c0f9409aeee9361c80b1b" + sha256 cellar: :any, arm64_sonoma: "5f63cd8a1cfeab4ed5e0b5b88f63482f88508ea4ee6d3c2c9c16b6fc1cbd8fab" + sha256 cellar: :any, arm64_ventura: "5e316854c5b156cbc12a6e70b274763c03f7a666ee8288d32bcf6f1d11fff3fb" + sha256 cellar: :any, arm64_monterey: "8043a9272554d530d9c50c84818606c53b75b9178ae7e559be7fc2d87ac75da7" + sha256 cellar: :any, sonoma: "00e0549fd3b8636a05a906e52e2595d48812790841149e285786242aa9d43a4e" + sha256 cellar: :any, ventura: "68947fd5c5d573b896c3887edb92f007cd480a5f469a97400712f8b01796b336" + sha256 cellar: :any, monterey: "0fc17abd9d9e35b278aa4a17cdb8e711c281bf124e46ba47ce88405b0c00533c" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e6863413f8614f33cdc88ecb9d61ede577b74c671096e152a17763b9ba80d38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed3e74e7ae581d38be226b8ce71d50168246e349c3b4bd862c79e952560e7eab" + end + + head do + url "https://github.com/deadpixi/mtm.git", branch: "master" + + uses_from_macos "ncurses" # 1.2.2+ can use macOS' ncurses 5.7 + end + + depends_on "ncurses" # 1.2.1 requires newer than ncurses 6.1 + + def install + bin.mkpath + man1.mkpath + + makefile = build.head? ? "Makefile.darwin" : "Makefile" + + system "make", "-f", makefile, "install", "DESTDIR=#{prefix}", "MANDIR=#{man1}" + system "make", "-f", makefile, "install-terminfo" + end + + test do + require "open3" + + env = { "SHELL" => "/bin/sh", "TERM" => "xterm" } + Open3.popen2(env, bin/"mtm") do |input, output, wait_thr| + input.puts "printf 'TERM=%s PID=%s\n' $TERM $MTM" + input.putc "\cG" + sleep 1 + input.putc "w" + + assert_match "TERM=screen-bce PID=#{wait_thr.pid}", output.read + end + end +end diff --git a/Formula/m/mtoc.rb b/Formula/m/mtoc.rb new file mode 100644 index 0000000000000..8e3ce1e289cc4 --- /dev/null +++ b/Formula/m/mtoc.rb @@ -0,0 +1,88 @@ +class Mtoc < Formula + desc "Mach-O to PE/COFF binary converter" + homepage "https://opensource.apple.com/" + url "https://github.com/apple-oss-distributions/cctools/archive/refs/tags/cctools-1030.6.3.tar.gz" + sha256 "a43b0f7d5d7d2fb828f96318efb7b335dfbbdd5ee3b96716add1f509755f120a" + license "APSL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "45bb1943f18afdc68144a47a8b41eb49b6c33ee7e1c2abf849c7cf4430956401" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca67d4a6ce13ea0c4d29cb2f40d225390c1c66c23099cd328a45ff3d1008564f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "652f840b6cacf62d3c242baab4ffa8098657937d0d1aa6a6e53acfb461e3a3ae" + sha256 cellar: :any_skip_relocation, sonoma: "cd38d1b84694e03fe9c4abf20746fb42bcd7a38023a681c3e6a1e98a23c10d44" + end + + depends_on "llvm" => :build + depends_on xcode: :build + depends_on :macos + + conflicts_with "ocmtoc", because: "both install `mtoc` binaries" + + patch do + url "https://raw.githubusercontent.com/acidanthera/ocbuild/d3e57820ce85bc2ed4ce20cc25819e763c17c114/patches/mtoc-permissions.patch" + sha256 "0d20ee119368e30913936dfee51055a1055b96dde835f277099cb7bcd4a34daf" + end + + # Rearrange #include's to avoid macros defining function argument names in + # LLVM's headers. + patch :DATA + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "cctools.xcodeproj", + "-scheme", "mtoc", + "-configuration", "Release", + "-IDEBuildLocationStyle=Custom", + "-IDECustomDerivedDataLocation=#{buildpath}", + "CONFIGURATION_BUILD_DIR=build/Release", + "HEADER_SEARCH_PATHS=#{Formula["llvm"].opt_include} $(HEADER_SEARCH_PATHS)" + bin.install "build/Release/mtoc" + man1.install "man/mtoc.1" + end + + test do + (testpath/"test.c").write <<~C + __attribute__((naked)) int start() {} + C + + args = %W[ + -nostdlib + -Wl,-preload + -Wl,-e,_start + -seg1addr 0x1000 + -o #{testpath}/test + #{testpath}/test.c + ] + system ENV.cc, *args + system bin/"mtoc", "#{testpath}/test", "#{testpath}/test.pe" + end +end + +__END__ +diff --git a/libstuff/lto.c b/libstuff/lto.c +index ee9fc32..29b986c 100644 +--- a/libstuff/lto.c ++++ b/libstuff/lto.c +@@ -6,8 +6,8 @@ + #include + #include + #include +-#include "stuff/ofile.h" + #include "stuff/llvm.h" ++#include "stuff/ofile.h" + #include "stuff/lto.h" + #include "stuff/allocate.h" + #include "stuff/errors.h" +diff --git a/libstuff/reloc.c b/libstuff/reloc.c +index 296ffa2..33ad2b3 100644 +--- a/libstuff/reloc.c ++++ b/libstuff/reloc.c +@@ -163,8 +163,6 @@ uint32_t r_type) + case CPU_TYPE_ARM64: + case CPU_TYPE_ARM64_32: + return(FALSE); +- case CPU_TYPE_RISCV32: +- return(FALSE); + default: + fatal("internal error: reloc_has_pair() called with unknown " + "cputype (%u)", cputype); diff --git a/Formula/m/mtools.rb b/Formula/m/mtools.rb new file mode 100644 index 0000000000000..1dcf1a1f5a43a --- /dev/null +++ b/Formula/m/mtools.rb @@ -0,0 +1,44 @@ +class Mtools < Formula + desc "Tools for manipulating MSDOS files" + homepage "https://www.gnu.org/software/mtools/" + url "https://ftpmirror.gnu.org/gnu/mtools/mtools-4.0.49.tar.gz" + mirror "https://ftp.gnu.org/gnu/mtools/mtools-4.0.49.tar.gz" + sha256 "10cd1111da87bf2400a380c1639a6cba8bfb937a24f9c51f5f88d393ae5f6f76" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4d7abe94bc09a3ff5ecb64d9a6c0dc37799b5ddd51c993d2480b2cee0567bef8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0f6aad93ce1be47de8f0d965033933a895f026caa8efc14e61431e6e5025d5f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d09e38ca2a390336c1ae74821b15f84c08cbe89da16864c1d722b723d6b981d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea3820f4a0897055a525bb47089538e13021a432bd7d7b65ab730dcc3da91fca" + sha256 cellar: :any_skip_relocation, sonoma: "befcc246e976f5f2669e27e33ef9a5b9a01745d5cf0dae4ed94e7f85d09c420d" + sha256 cellar: :any_skip_relocation, ventura: "373f8d9fe58ac60117d60dc996720e2335db25cd2113f9239e6ce694a411ba83" + sha256 cellar: :any_skip_relocation, arm64_linux: "86d4b01db4192dc7cff8f6b1f8ac4ce36bed68ed1cab50de953c56e5f6e1085b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b35d3dda7886392a91cbfb237a7ab3c2f710ff6dc6875acedbbdec863d67c2b" + end + + conflicts_with "multimarkdown", because: "both install `mmd` binaries" + + def install + args = %W[ + --disable-debug + --prefix=#{prefix} + --sysconfdir=#{etc} + --without-x + ] + args << "LIBS=-liconv" if OS.mac? + + # The mtools configure script incorrectly detects stat64. This forces it off + # to fix build errors on Apple Silicon. See stat(6) and pv.rb. + ENV["ac_cv_func_stat64"] = "no" if Hardware::CPU.arm? + + system "./configure", *args + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mtools --version") + end +end diff --git a/Formula/m/mtr.rb b/Formula/m/mtr.rb new file mode 100644 index 0000000000000..2da09e6e5f0ea --- /dev/null +++ b/Formula/m/mtr.rb @@ -0,0 +1,68 @@ +class Mtr < Formula + desc "'traceroute' and 'ping' in a single tool" + homepage "https://www.bitwizard.nl/mtr/" + url "https://github.com/traviscross/mtr/archive/refs/tags/v0.96.tar.gz" + sha256 "73e6aef3fb6c8b482acb5b5e2b8fa7794045c4f2420276f035ce76c5beae632d" + # Main license is GPL-2.0-only but some compatibility code is under other licenses: + # 1. portability/queue.h is BSD-3-Clause + # 2. portability/error.* is LGPL-2.0-only (only used on macOS) + # 3. portability/getopt.* is omitted as unused + license all_of: ["GPL-2.0-only", "BSD-3-Clause", "LGPL-2.0-only"] + head "https://github.com/traviscross/mtr.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e895fc7ed39c99111d74a2ca15aeaee2ff99c4106af7517f60a6accc71560eec" + sha256 cellar: :any, arm64_sequoia: "a7bacefb19840814841941c74a3ac93d8e0e5355b09c471e3b76dec702315fc3" + sha256 cellar: :any, arm64_sonoma: "ab39214cf72c697c0e436035efbf4e1b8b846ebec5f390e1ab39949740adb210" + sha256 cellar: :any, arm64_ventura: "160496478cf39459cfdb9a39b32408cddb62797a7f5c7b511b21d0f243daf2e6" + sha256 cellar: :any, sonoma: "f89057c3a1fe1c6ed781ff12794f8313e1aa8b40c6fb8c921d30f4b16b4ec1fe" + sha256 cellar: :any, ventura: "4dac9630dd7d0fd91fdf2ab472c515235f25969d6de0d6f0773bdd56989c2312" + sha256 cellar: :any_skip_relocation, arm64_linux: "55386202173e44242ea3fc0cab0f6d3e0a82e958661470c6a554580631a25cc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e5bc25c0c9a1c56b8d0f5b4f1276f629a283e50f0fd901ecfe8eb7e2c76f43f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "jansson" + + def install + # Fix UNKNOWN version reported by `mtr --version`. + inreplace "configure.ac", + "m4_esyscmd([build-aux/git-version-gen .tarball-version])", + version.to_s + + args = %W[ + --disable-silent-rules + --without-glib + --without-gtk + --with-bashcompletiondir=#{bash_completion} + ] + system "./bootstrap.sh" + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + mtr requires root privileges so you will need to run `sudo mtr`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + # We patch generation of the version, so let's check that we did that properly. + assert_match "mtr #{version}", shell_output("#{sbin}/mtr --version") + if OS.mac? + # mtr will not run without root privileges + assert_match "Failure to open", shell_output("#{sbin}/mtr google.com 2>&1", 1) + assert_match "Failure to open", shell_output("#{sbin}/mtr --json google.com 2>&1", 1) + else + # mtr runs but won't produce useful output without extra privileges + assert_match "2.|-- ???", shell_output("#{sbin}/mtr google.com 2>&1") + assert_match '"dst": "google.com"', shell_output("#{sbin}/mtr --json google.com 2>&1") + end + end +end diff --git a/Formula/m/mu-repo.rb b/Formula/m/mu-repo.rb new file mode 100644 index 0000000000000..bf831b7dedc0f --- /dev/null +++ b/Formula/m/mu-repo.rb @@ -0,0 +1,27 @@ +class MuRepo < Formula + include Language::Python::Virtualenv + + desc "Tool to work with multiple git repositories" + homepage "https://github.com/fabioz/mu-repo" + url "https://files.pythonhosted.org/packages/0d/3d/ddf28cf3beafadb5b3ea45ab882530c1d993b4fc10c0c61d82c8da624f3d/mu_repo-1.9.0.tar.gz" + sha256 "f557e46e35a6dd8e1a8735c2a74ea1e60e9280040abc22a472e88eff0d23c5ca" + license "GPL-3.0-only" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "99a341e92b7abdf36d1088357f8d8abc070151734e2c3b45dec1327c1bf81afe" + end + + depends_on "python@3.14" + + conflicts_with "mu", because: "both install `mu` binaries" + + def install + virtualenv_install_with_resources + end + + test do + assert_empty shell_output("#{bin}/mu group add test --empty") + assert_match "* test", shell_output("#{bin}/mu group") + end +end diff --git a/Formula/m/mu.rb b/Formula/m/mu.rb new file mode 100644 index 0000000000000..5f90c46c5367d --- /dev/null +++ b/Formula/m/mu.rb @@ -0,0 +1,88 @@ +# NOTE: Odd release numbers indicate unstable releases. +# Please only submit PRs for [x.even.x] version numbers: +# https://github.com/djcb/mu/commit/23f4a64bdcdee3f9956a39b9a5a4fd0c5c2370ba +class Mu < Formula + desc "Tool for searching e-mail messages stored in the maildir-format" + homepage "https://www.djcbsoftware.nl/code/mu/" + url "https://github.com/djcb/mu/releases/download/v1.12.13/mu-1.12.13.tar.xz" + sha256 "7908078c5cc90afc7c038d4372b33b404f7fddfe466a27994413dc06f993a445" + license "GPL-3.0-or-later" + head "https://github.com/djcb/mu.git", branch: "master" + + # We restrict matching to versions with an even-numbered minor version number, + # as an odd-numbered minor version number indicates a development version: + # https://github.com/djcb/mu/commit/23f4a64bdcdee3f9956a39b9a5a4fd0c5c2370ba + livecheck do + url :stable + regex(/^v?(\d+\.\d*[02468](?:\.\d+)*)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5e5fc9e812deba243fa8520b2c2aada171f75946572eb2a33727adcb466e34ac" + sha256 cellar: :any, arm64_sequoia: "e51488141f1a30e5d65ee50c1f2e0da96347c8bda2c27dd1381220b2a2621d4b" + sha256 cellar: :any, arm64_sonoma: "4738b8f33307f661104c73da9f6217ffea9438e5264818a5f8e685713434dfe3" + sha256 cellar: :any, sonoma: "3cb039b58cbff76802cbc70bf9498044660f4f7f8d09a3875aa20d022dae7c30" + sha256 arm64_linux: "9460d52fbb48cbe2d9e51246f21eb5d94b5895fffc927ebd0f4f563bd48268ab" + sha256 x86_64_linux: "62238aafc481ed106dfff4a08ee12e94f9e67f9ddd09e717dec7ce619489e242" + end + + depends_on "emacs" => :build + depends_on "libgpg-error" => :build + depends_on "libtool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "texinfo" => :build + depends_on "gettext" + depends_on "glib" + depends_on "gmime" + depends_on "xapian" + + conflicts_with "mu-repo", because: "both install `mu` binaries" + + def install + system "meson", "setup", "build", "-Dlispdir=#{elisp}", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + # Regression test for: + # https://github.com/djcb/mu/issues/397 + # https://github.com/djcb/mu/issues/380 + # https://github.com/djcb/mu/issues/332 + test do + mkdir (testpath/"cur") + + (testpath/"cur/1234567890.11111_1.host1!2,S").write <<~EOS + From: "Road Runner" + To: "Wile E. Coyote" + Date: Mon, 4 Aug 2008 11:40:49 +0200 + Message-id: <1111111111@example.com> + + Beep beep! + EOS + + (testpath/"cur/0987654321.22222_2.host2!2,S").write <<~EOS + From: "Wile E. Coyote" + To: "Road Runner" + Date: Mon, 4 Aug 2008 12:40:49 +0200 + Message-id: <2222222222@example.com> + References: <1111111111@example.com> + + This used to happen outdoors. It was more fun then. + EOS + + system bin/"mu", "init", "--muhome=#{testpath}", "--maildir=#{testpath}" + system bin/"mu", "index", "--muhome=#{testpath}" + + mu_find = "#{bin}/mu find --muhome=#{testpath} " + find_message = "#{mu_find} msgid:2222222222@example.com" + find_message_and_related = "#{mu_find} --include-related msgid:2222222222@example.com" + + assert_equal 1, shell_output(find_message).lines.count + assert_equal 2, shell_output(find_message_and_related).lines.count, <<~EOS + You tripped over https://github.com/djcb/mu/issues/380 + --related doesn't work. Everything else should + EOS + end +end diff --git a/Formula/m/mubeng.rb b/Formula/m/mubeng.rb new file mode 100644 index 0000000000000..1542af49e07fd --- /dev/null +++ b/Formula/m/mubeng.rb @@ -0,0 +1,33 @@ +class Mubeng < Formula + desc "Incredibly fast proxy checker & IP rotator with ease" + homepage "https://github.com/mubeng/mubeng" + url "https://github.com/mubeng/mubeng/archive/refs/tags/v0.23.0.tar.gz" + sha256 "57a4e10f25ec5e70fafc97cb21a13ffffdc63d3b8004055318ea0ecd1ab63507" + license "Apache-2.0" + head "https://github.com/mubeng/mubeng.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "180f314d468ebc17cecabecfc0986cead05b47c09c614d1211781fd55dbff0ad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d861eb83c6ac431a6dd5f3b4ac21886702859ecc595c273c0fcf3648fd6c9601" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d861eb83c6ac431a6dd5f3b4ac21886702859ecc595c273c0fcf3648fd6c9601" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d861eb83c6ac431a6dd5f3b4ac21886702859ecc595c273c0fcf3648fd6c9601" + sha256 cellar: :any_skip_relocation, sonoma: "f4c4a171a1183c4a5f2786dfd43c60e1f7d1974b1ac8c4ec7e49b71cf99da9c4" + sha256 cellar: :any_skip_relocation, ventura: "f4c4a171a1183c4a5f2786dfd43c60e1f7d1974b1ac8c4ec7e49b71cf99da9c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce56204c6fe76e17b551d782c71ba39ca92cdc003f841fbcf2d84c8298cf45fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a67076731b843403953aa84c40487ff346fe6699833f46dfa07f6f95a6e515d" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/mubeng/mubeng/common.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + expected = OS.mac? ? "no proxy file provided" : "has no valid proxy URLs" + assert_match expected, shell_output("#{bin}/mubeng 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/mubeng --version", 1) + end +end diff --git a/Formula/m/muffet.rb b/Formula/m/muffet.rb new file mode 100644 index 0000000000000..abfe10a7846ec --- /dev/null +++ b/Formula/m/muffet.rb @@ -0,0 +1,33 @@ +class Muffet < Formula + desc "Fast website link checker in Go" + homepage "https://github.com/raviqqe/muffet" + url "https://github.com/raviqqe/muffet/archive/refs/tags/v2.11.0.tar.gz" + sha256 "c54af3f50150d7a58d83d1d33b98a489f6bc0d0290887b3ae18e6677e08e1737" + license "MIT" + head "https://github.com/raviqqe/muffet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "221d1b0a3b2e23b334f201249f6baa37e217c4186ae35ccd5b59f6fb9a6501f9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f58e2b267538228d28ea3069c1c5b432fdd2e9c475c65ba9183a3adc083e7b3b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f58e2b267538228d28ea3069c1c5b432fdd2e9c475c65ba9183a3adc083e7b3b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f58e2b267538228d28ea3069c1c5b432fdd2e9c475c65ba9183a3adc083e7b3b" + sha256 cellar: :any_skip_relocation, sonoma: "149591faaca9fa1d39b175089c689fab3406dd32d85b5fe87e10eb358717bcdd" + sha256 cellar: :any_skip_relocation, ventura: "149591faaca9fa1d39b175089c689fab3406dd32d85b5fe87e10eb358717bcdd" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c7dfd29dee7d064184089d5d72e3b00057543371833967c22004deebbbc3fbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a641c254962700602d855f28fd858d73eb692c5047326baaf81c4b625f903fed" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match(/failed to fetch root page: lookup does\.not\.exist.*: no such host/, + shell_output("#{bin}/muffet https://does.not.exist 2>&1", 1)) + + assert_match "https://example.com/", + shell_output("#{bin}/muffet https://example.com 2>&1", 1) + end +end diff --git a/Formula/m/mujs.rb b/Formula/m/mujs.rb new file mode 100644 index 0000000000000..0b3978691dbcf --- /dev/null +++ b/Formula/m/mujs.rb @@ -0,0 +1,55 @@ +class Mujs < Formula + desc "Embeddable Javascript interpreter" + homepage "https://www.mujs.com/" + url "https://mujs.com/downloads/mujs-1.3.7.tar.gz" + sha256 "fa15735edc4b3d27675d954b5703e36a158f19cfa4f265aa5388cd33aede1c70" + license "ISC" + head "https://github.com/ccxvii/mujs.git", branch: "master" + + livecheck do + url "https://mujs.com/downloads/" + regex(/href=.*?mujs[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9df17f8fbcbe6f4d79b26d0ede40ca0e819692e39aa1bdea02b8da9f9d7cee25" + sha256 cellar: :any, arm64_sequoia: "52b7e1468b1d7b7a493f953fe52be4e91c8fc00223b97b9512b9aa8d787514cd" + sha256 cellar: :any, arm64_sonoma: "daf4da3709624eed9c6b5de2d6eaf53c0b3638fdb1be06f8bface0332bca81b9" + sha256 cellar: :any, arm64_ventura: "e5d5e280103b96ae1c4424b778d6bc04b5fd5930ea7e779ca728b0c0913c9953" + sha256 cellar: :any, sonoma: "650c453369a790c299d2a18d48e26180c500fc45dff44c096542e3cdd54c735d" + sha256 cellar: :any, ventura: "96dc1e1d6885f3668149484766172f053ae14ceff5edcf3ec25dc7c78b33b207" + sha256 cellar: :any_skip_relocation, arm64_linux: "10dcbc661f36958c88762bfaaa5ccbc3597d4a26a251a966129a7ed6a781dc4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08acc6ab105fbb7517a610c2abdaf8439bda9059fb98673f1a825b67c8385092" + end + + depends_on "pkgconf" => :test + + on_linux do + depends_on "readline" + end + + # update build for `utfdata.h`, upstream pr ref, https://github.com/ccxvii/mujs/pull/203 + patch do + url "https://github.com/ccxvii/mujs/commit/e21c6bfdce374e19800f2455f45828a90fce39da.patch?full_index=1" + sha256 "e10de8b9c3a62ffe121b61fe60b67ba8faa68eaace9a3b17a13f46a2cc795a11" + end + + def install + system "make", "prefix=#{prefix}", "release" + system "make", "prefix=#{prefix}", "install" + system "make", "prefix=#{prefix}", "install-shared" if build.stable? + end + + test do + (testpath/"test.js").write <<~JAVASCRIPT + print('hello, world'.split().reduce(function (sum, char) { + return sum + char.charCodeAt(0); + }, 0)); + JAVASCRIPT + assert_equal "104", shell_output("#{bin}/mujs test.js").chomp + # test pkg-config setup correctly + assert_match "-I#{include}", shell_output("pkgconf --cflags mujs") + assert_match "-L#{lib}", shell_output("pkgconf --libs mujs") + system "pkgconf", "--atleast-version=#{version}", "mujs" + end +end diff --git a/Formula/m/multi-git-status.rb b/Formula/m/multi-git-status.rb new file mode 100644 index 0000000000000..ada5cebe0fc57 --- /dev/null +++ b/Formula/m/multi-git-status.rb @@ -0,0 +1,25 @@ +class MultiGitStatus < Formula + desc "Show uncommitted, untracked and unpushed changes for multiple Git repos" + homepage "https://github.com/fboender/multi-git-status" + url "https://github.com/fboender/multi-git-status/archive/refs/tags/2.3.tar.gz" + sha256 "2634b4b8b3d69a397f5462ec1d72a77d5b395f363ed8e1aabfbf7e5e4172f93f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "011ea78413856d20a26c71c4cdcc1b7909ce6ab7075544c716359079eb4f3b06" + end + + def install + # This is what the included 'install.sh' script does, except that + # we use Homebrew's preferred location for 'man1'. + bin.install "mgitstatus" + man1.install "mgitstatus.1" + end + + test do + mkdir "test-repo" do + system "git", "init" + end + assert_match "./test-repo: Uncommitted changes", shell_output("#{bin}/mgitstatus 2>&1") + end +end diff --git a/Formula/m/multi-gitter.rb b/Formula/m/multi-gitter.rb new file mode 100644 index 0000000000000..940f885f22787 --- /dev/null +++ b/Formula/m/multi-gitter.rb @@ -0,0 +1,33 @@ +class MultiGitter < Formula + desc "Update multiple repositories in with one command" + homepage "https://github.com/lindell/multi-gitter" + url "https://github.com/lindell/multi-gitter/archive/refs/tags/v0.59.0.tar.gz" + sha256 "826735bfa6229b209274932dbbd2bd9b58cdfbe8dc431c339777d16b2c87d05f" + license "Apache-2.0" + head "https://github.com/lindell/multi-gitter.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40bc83b5d09aecafa6ab181a4ae62f42487c31bc493bac0aa2c8925679b73463" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "40bc83b5d09aecafa6ab181a4ae62f42487c31bc493bac0aa2c8925679b73463" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40bc83b5d09aecafa6ab181a4ae62f42487c31bc493bac0aa2c8925679b73463" + sha256 cellar: :any_skip_relocation, sonoma: "734bd09f1e9fdef40bf0c92d92438c9e5c9ca5bab90d26b76b224af8cce139ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "f46af15442afe65936da059718b4f6e4550a370df6b0ad719ebd75f6e2d4c7a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bcf222359051b5c76ddd254e7548ce2ab0db897582dff10c0a236920c1b34502" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"multi-gitter", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/multi-gitter version") + + output = shell_output("#{bin}/multi-gitter status 2>&1", 1) + assert_match "Error: no organization, user, repo, repo-search or code-search set", output + end +end diff --git a/Formula/m/multimarkdown.rb b/Formula/m/multimarkdown.rb new file mode 100644 index 0000000000000..32323c4e1193e --- /dev/null +++ b/Formula/m/multimarkdown.rb @@ -0,0 +1,50 @@ +class Multimarkdown < Formula + desc "Turn marked-up plain text into well-formatted documents" + homepage "https://fletcher.github.io/MultiMarkdown-6/" + url "https://github.com/fletcher/MultiMarkdown-6/archive/refs/tags/6.7.0.tar.gz" + sha256 "aa386f54631dbc4e0beeb6b9cf9eb769db95a3f505a69b663140a80008cf0595" + license "MIT" + head "https://github.com/fletcher/MultiMarkdown-6.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bb4f39ee0e9e4ab40f4ce5c8e5aa5d57ef8739035769400d0c5b8ea17d0f0661" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eea3968401cd2eca776486368efbf1572da6dee6bb9cf5c5396448f0da811578" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f04dd2552dc7725620fc3e64e6b803652c0510e20e33242f4bd00bbde327ea74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d889681d3fd0ed644c4a80e951aed473b5ad9d26256e7e8f2f1922d0f2673b15" + sha256 cellar: :any_skip_relocation, arm64_monterey: "10659d4c872d03814f36e999ec7db8a2340272bbab6ecf190726a727be05caf4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cbb095b60ddeae5e2062aad184841505442c118b47f4ac374f9862e9a944e13d" + sha256 cellar: :any_skip_relocation, sonoma: "c448456b2f4f00e34499e81f3843235e55f0e5d793fd92b0ee831f98ba20c089" + sha256 cellar: :any_skip_relocation, ventura: "ff9c00f98d2eac80faa49cef2f404b05edf2ac7ba43c1b8dc4c411c61ce4cd8b" + sha256 cellar: :any_skip_relocation, monterey: "67847004a22109bbc67413b0d1f407414338fe0b353ab8ac8e85726928eecb08" + sha256 cellar: :any_skip_relocation, big_sur: "c457aa21210a34ebbb29cc09df87a3bb56dbf80e7dca3f5ecd744f97668af195" + sha256 cellar: :any_skip_relocation, arm64_linux: "e89c26994747dd3843c5104bb0b8ae4f65cb0611459c8b21c443873e1432d85e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b80ef1a499056e60b9a189b3afbbd7beefc2091578dc8699ad87d6d405ea2e5" + end + + depends_on "cmake" => :build + + conflicts_with "mtools", because: "both install `mmd` binaries" + conflicts_with "markdown", because: "both install `markdown` binaries" + conflicts_with "discount", because: "both install `markdown` binaries" + + # Workaround for CMake 4 compatibility + patch do + url "https://github.com/fletcher/MultiMarkdown-6/commit/655c0908155758e7c94858af2fb99dc992709075.patch?full_index=1" + sha256 "1ca4b7ea07c19981685786f8f469aad9c9d0d6af8394bc9d3b92608de929495c" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/multimarkdown" + + bin.install Dir["scripts/*"].reject { |f| f.end_with?(".bat") } + end + + test do + assert_equal "

foo bar

\n", pipe_output(bin/"multimarkdown", "foo *bar*\n") + assert_equal "

foo bar

\n", pipe_output(bin/"mmd", "foo *bar*\n") + end +end diff --git a/Formula/m/multitail.rb b/Formula/m/multitail.rb new file mode 100644 index 0000000000000..42cfafcac0d73 --- /dev/null +++ b/Formula/m/multitail.rb @@ -0,0 +1,41 @@ +class Multitail < Formula + desc "Tail multiple files in one terminal simultaneously" + homepage "https://vanheusden.com/multitail/" + url "https://github.com/folkertvanheusden/multitail/archive/refs/tags/7.1.5.tar.gz" + sha256 "b0c92bf5f504b39591bf3e2e30a1902925c11556e14b89a07cfa7533f9bd171b" + license "MIT" + head "https://github.com/folkertvanheusden/multitail.git", head: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "cef92b70338d321e70d11dd71dd6103e53abd26f6eb585a199ac0d2a43e02857" + sha256 cellar: :any, arm64_sequoia: "a4fcadf206a7ac84b0d56153bd1d0a9f24c01f39d466dc16edc2ef51a69e0d11" + sha256 cellar: :any, arm64_sonoma: "be06268413fcf23e7b7c95362f24d8e0b0bf01b4b956068172e48ba622caac1f" + sha256 cellar: :any, arm64_ventura: "d764f52508358c4d881e6aa8e0a374c96c9cbd27d292f20cce17e7ac55f5b846" + sha256 cellar: :any, arm64_monterey: "480845b936a309ef633dadd0b1a1eadf90d5704be8799bfb9d05d57aa2fd5d75" + sha256 cellar: :any, sonoma: "ca9fb55f8bf98257308ea67179d882788d74bb7c1e3cbb1b584eb679f81ee44d" + sha256 cellar: :any, ventura: "88b234118c438295f556f25b1c651714a7e0fd597f9f124c7025d4066a43c5b4" + sha256 cellar: :any, monterey: "9c26932eba926fbeda0f8cf27e11b47fcc09a992f31aa581560dd00ca47d6c30" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff18f53cd0985d90857495d4444ef2e6490f08e73cefd4c5aaaeb95800cc7a31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e5209ad76b3f876606ca6a7a7fa6720ec2f976affd51aaab992c0dde63540b4" + end + + depends_on "pkgconf" => :build + depends_on "ncurses" + + def install + system "make", "-f", "makefile.macosx", "multitail", "DESTDIR=#{HOMEBREW_PREFIX}" + + bin.install "multitail" + man1.install Utils::Gzip.compress("multitail.1") + etc.install "multitail.conf" + end + + test do + assert_match version.to_s, shell_output("#{bin}/multitail -h 2>&1", 1) + end +end diff --git a/Formula/m/multitime.rb b/Formula/m/multitime.rb new file mode 100644 index 0000000000000..3062006ce09f4 --- /dev/null +++ b/Formula/m/multitime.rb @@ -0,0 +1,43 @@ +class Multitime < Formula + desc "Time command execution over multiple executions" + homepage "https://tratt.net/laurie/src/multitime/" + url "https://github.com/ltratt/multitime/archive/refs/tags/multitime-1.4.tar.gz" + sha256 "31597066239896ee74a3aaaea3b22931a50a1ec1470090c5457ef35500c44249" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "44ade5e6e48db9bd18070d63223cc2f93bf359e9ff41d0007e2c528f045d672f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f8212bee01aa77f3422303f6ff1d0e59bb2937be070934a857448e808adaa61" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0439477342bced6548a46765025a9d860d571060b9319dfe480f977b8420e0c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "013f3d84765b886e4a877466669328c4ba0f8214ad2b9c97285fee79cfecaad4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5c38266c2518cac8687617b0d4b96171b56a179b8472ff4bd3145b2d6ddc9d0d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "52335b15831a687d6b1bf9ef67de299b3295143181ea0d9511b437a69362b385" + sha256 cellar: :any_skip_relocation, sonoma: "5aefa64c4517d2b0e29cf18db79425dbca79d44bcb0f4a42482e5a63edfbd057" + sha256 cellar: :any_skip_relocation, ventura: "6feb3f1f7d7bba11c73aa2abcb2abfe882541da4a2dcf6800ea75c836ab41483" + sha256 cellar: :any_skip_relocation, monterey: "c5a9f7932ea6baa734272e31bca733b4f481b1c401959e51432195ef1abf3c80" + sha256 cellar: :any_skip_relocation, big_sur: "c744099831fd19d36e44e055b880803715fe570b7fd8b7879054ed83706b2625" + sha256 cellar: :any_skip_relocation, catalina: "ae01126fe74b8bb90f45b901a5e92665e6b392a5dad3af356313dae5835f70da" + sha256 cellar: :any_skip_relocation, arm64_linux: "043f63a6abf6942c5c312f0d2eb1fed48931f54ba6fc2695f9e6c81c8dfe27f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7da1f67a4f35c418aaf3d63eb3afdeaea4ffbbba2465e68628d80b6e37464f26" + end + + depends_on "autoconf" => :build + + def install + system "autoconf" + system "autoheader" + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + + system "make", "install" + end + + test do + output = shell_output("#{bin}/multitime -n 2 sleep 1 2>&1") + assert_match(/((real|user|sys)\s+([01].\d{3}\s*){5}){3}/m, output) + end +end diff --git a/Formula/m/mummer.rb b/Formula/m/mummer.rb new file mode 100644 index 0000000000000..c6d334c8bacd9 --- /dev/null +++ b/Formula/m/mummer.rb @@ -0,0 +1,63 @@ +class Mummer < Formula + desc "Genome alignment tool" + homepage "https://github.com/mummer4/mummer" + url "https://github.com/mummer4/mummer/releases/download/v4.0.1/mummer-4.0.1.tar.gz" + sha256 "bc20ae2701a0b2e323e4e515b7cfa18a0f0cb34a4ff5844b289b2de0154e3d3e" + license "Artistic-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ea0c12fffc202ecffba587be17af6930099814e91deed4a211e8a61b0bba6813" + sha256 cellar: :any, arm64_sequoia: "4ef96b830de6516a971c825d97a1de9b020f6fd2e6fd8a61fc3ed3529ac03ea9" + sha256 cellar: :any, arm64_sonoma: "0850acd96974b0be3972f4869f021f275bb13c745febb4c3dca281b4aaf34042" + sha256 cellar: :any, arm64_ventura: "34d55037263abf3c69c4c78620f5e8a43edae45192938be22744bc5b81326b60" + sha256 cellar: :any, sonoma: "b3d22a6054a15ec85880b9f3880f1404d6d49a945d6a98fd62ba2e47dd33d2ab" + sha256 cellar: :any, ventura: "717f648282b990e25757252a3acc3be4ba1dcaf1f8600913f6fcae8ed92af3b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a813872082d1721022174b82f6d53e954779f204cb15a706dc9698b1b8b41324" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d131ccce92a6642ca9ede2ddf4097dd88a48b96748a9a64724fdc9e509b049bc" + end + + on_macos do + depends_on "gcc" + end + + conflicts_with "gd", because: "both install `annotate` binaries" + + fails_with :clang do + cause <<~CAUSE + Clang+libstdc++ seem to have issues: + * the unittest for multi-threaded output fails + * tools using multi-threaded output have incomplete and inconsistent output + CAUSE + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + # Align two small sequences with nucmer + (testpath/"seq1.fa").write <<~SEQ1 + >101 + ggtttatgcgctgttatgtctatggacaaaaaggctacgagaaactgtagccccgttcgctcggacccgcgtcattcgtcggcccagctctacccg + SEQ1 + (testpath/"seq2.fa").write <<~SEQ2 + >21 + ggtttatgcgctgttttgtctatggaaaaaaggctacgagaaactgtagccccgttcgctcggtacccgcgtcattcgtcggcccatctctacccg + SEQ2 + cmdline = [bin/"nucmer", "--sam-long", testpath/"output.sam", "-l", "10", "seq1.fa", "seq2.fa"] + result = <<~RESULT + @HD\tVN:1.4\tSO:unsorted + @SQ\tSN:101\tLN:96 + @PG\tID:nucmer\tPN:nucmer\tVN:#{version}\tCL:"#{cmdline.join(" ")}" + 21\t0\t101\t1\t30\t26M1D37M1I32M\t*\t0\t0\tggtttatgcgctgttttgtctatggaaaaaaggctacgagaaactgtagccccgttcgctcggtacccgcgtcattcgtcggcccatctctacccg\t*\tNM:i:4\tMD:Z:15a10^c59g9 + RESULT + + system(*cmdline) + assert_equal result, (testpath/"output.sam").read + end +end diff --git a/Formula/m/muon.rb b/Formula/m/muon.rb new file mode 100644 index 0000000000000..5486ce5f02e7d --- /dev/null +++ b/Formula/m/muon.rb @@ -0,0 +1,65 @@ +class Muon < Formula + desc "Meson-compatible build system" + homepage "https://muon.build" + url "https://git.sr.ht/~lattis/muon/archive/0.5.0.tar.gz" + sha256 "565c1b6e1e58f7e90d8813fda0e2102df69fb493ddab4cf6a84ce3647466bee5" + license "GPL-3.0-only" + head "https://git.sr.ht/~lattis/muon", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ee83480a39f996d669a98cec8b764ae5411b5ffb22ba81c2576a529a90d45f82" + sha256 cellar: :any, arm64_sequoia: "830db56ee195c9fc5541176c4ff9abaf02e255440879c089f66e91582c720915" + sha256 cellar: :any, arm64_sonoma: "34a03c29eafa2fed72cd8f065b6339b562019e3a84a7d1455be2b4748c6cb57d" + sha256 cellar: :any, arm64_ventura: "fc1623b314de7b4d3e138d0bed0fe271ae2da205eb032bc5da2462bd6927d318" + sha256 cellar: :any, sonoma: "7b84b3449e6fab539f2a740c055419775388cf9155711adf63c88f3fe140d0ad" + sha256 cellar: :any, ventura: "525804c85af78bda0109ba747ec613d6089312f9bc4d157d2fd1b0dde86c9d71" + sha256 arm64_linux: "23221d5b0b3fe07ec7510852ed6cd065326204d26b95bd2ac254d07507cdd07b" + sha256 x86_64_linux: "333c9fadf69b0e182ccca75f781c8017e5a5dbc2f0bde8924f6e59b0b1a47ac5" + end + + depends_on "meson" => :build + depends_on "scdoc" => :build + depends_on "libarchive" + depends_on "ninja" + depends_on "pkgconf" + + uses_from_macos "curl" + + def install + args = %w[ + -Dman-pages=enabled + -Dmeson-docs=disabled + -Dmeson-tests=disabled + -Dlibarchive=enabled + -Dlibcurl=enabled + -Dlibpkgconf=enabled + -Dsamurai=disabled + -Dtracy=disabled + --force-fallback-for=tinyjson + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"helloworld.c").write <<~C + #include + int main() { + puts("hi"); + return 0; + } + C + (testpath/"meson.build").write <<~MESON + project('hello', 'c') + executable('hello', 'helloworld.c') + MESON + + system bin/"muon", "setup", "build" + assert_path_exists testpath/"build/build.ninja" + + system "ninja", "-C", "build", "--verbose" + assert_equal "hi", shell_output("build/hello").chomp + end +end diff --git a/Formula/m/muparser.rb b/Formula/m/muparser.rb new file mode 100644 index 0000000000000..2cb7ab6022401 --- /dev/null +++ b/Formula/m/muparser.rb @@ -0,0 +1,71 @@ +class Muparser < Formula + desc "C++ math expression parser library" + homepage "https://github.com/beltoforion/muparser" + url "https://github.com/beltoforion/muparser/archive/refs/tags/v2.3.5.tar.gz" + sha256 "20b43cc68c655665db83711906f01b20c51909368973116dfc8d7b3c4ddb5dd4" + license "BSD-2-Clause" + revision 2 + head "https://github.com/beltoforion/muparser.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cc39c1ae9eafc52f447f685e3441fb31f980efd0fb0345c969871c9cc8d807f2" + sha256 cellar: :any, arm64_sequoia: "11733a36d494bbd6ff343b30f8e0ed776660c41e5e1ea88ffedc9eedadca2ce7" + sha256 cellar: :any, arm64_sonoma: "b1b39c12aa16a0a6fd45b232594448b7c180a16f182246d9cf7e884a019be577" + sha256 cellar: :any, arm64_ventura: "c8f1479dae9c99b52c1e0efa102eeb876c5e721741fd805963e4f1694eba772c" + sha256 cellar: :any, sonoma: "316542316198bbd354327695a2b3a1e8094e0f05b8f314c0cb3470e8d45c527e" + sha256 cellar: :any, ventura: "d6854bf7ee7a512856309611cbbe6ae0aa5da588c6a886c70499779f34397dc0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba22f437decb80c8ed700338c1213c2a19e4e260122acfe1732f1ca54f836ec4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aff0ff2ecd2d9717123b66a7d8cb5ac087519a198085e14c22ce5ed682c2fe19" + end + + depends_on "cmake" => :build + + on_macos do + depends_on "libomp" + conflicts_with "gromacs", because: "gromacs ships its own copy of muparser" + end + + def install + ENV.cxx11 if OS.linux? + + system "cmake", "-S", ".", "-B", "build", "-DENABLE_OPENMP=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + double MySqr(double a_fVal) { + return a_fVal*a_fVal; + } + + int main() { + using namespace mu; + + try { + double fVal = 1; + Parser p; + p.DefineVar("a", &fVal); + p.DefineFun("MySqr", MySqr); + p.SetExpr("MySqr(a)*_pi+min(10,a)"); + + for (std::size_t a=0; a<100; ++a) + { + fVal = a; // Change value of variable a + std::cout << p.Eval() << std::endl; + } + } catch (Parser::exception_type &e) { + std::cout << e.GetMsg() << std::endl; + } + + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lmuparser" + system "./test" + end +end diff --git a/Formula/m/mupdf-tools.rb b/Formula/m/mupdf-tools.rb new file mode 100644 index 0000000000000..89877966124a9 --- /dev/null +++ b/Formula/m/mupdf-tools.rb @@ -0,0 +1,41 @@ +class MupdfTools < Formula + desc "Lightweight PDF and XPS viewer" + homepage "https://mupdf.com/" + url "https://mupdf.com/downloads/archive/mupdf-1.26.11-source.tar.gz" + sha256 "eee47fdb64de309124df21081d4a4da4ad0e917824ab2ed68fc8008f6b523979" + license "AGPL-3.0-or-later" + head "git://git.ghostscript.com/mupdf.git", branch: "master" + + livecheck do + formula "mupdf" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7fcbcd905d6075c5ad85407c6c8da20a34999e80b9a6df14f4e39fa849f929b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d72533077c686972421cec9ed9409bdb48b595db7ad51cd0004f488a7c1a7b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dfc312516e53e7af123a7880849d47cdf37f83c90c804d9a161db94f56f0a6d9" + sha256 cellar: :any_skip_relocation, sonoma: "1961051d083a8f9554c79dc621a6ad869b2691dd10b1436ae3cd666602431090" + sha256 cellar: :any_skip_relocation, arm64_linux: "4bde813d0240ea7bfd50845be335d340085e462e5994da0f0bdc4c84941d298e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "109dcb4a25f4321e8a025420fecf6d5754ed65a08510352747b2e043cd4541fa" + end + + conflicts_with "mupdf", because: "mupdf and mupdf-tools install the same binaries" + + def install + system "make", "install", + "build=release", + "verbose=yes", + "HAVE_X11=no", + "HAVE_GLUT=no", + "CC=#{ENV.cc}", + "prefix=#{prefix}" + + # Symlink `mutool` as `mudraw` (a popular shortcut for `mutool draw`). + bin.install_symlink bin/"mutool" => "mudraw" + man1.install_symlink man1/"mutool.1" => "mudraw.1" + end + + test do + assert_match "Homebrew test", shell_output("#{bin}/mudraw -F txt #{test_fixtures("test.pdf")}") + end +end diff --git a/Formula/m/mupdf.rb b/Formula/m/mupdf.rb new file mode 100644 index 0000000000000..e952821a3ea28 --- /dev/null +++ b/Formula/m/mupdf.rb @@ -0,0 +1,140 @@ +class Mupdf < Formula + desc "Lightweight PDF and XPS viewer" + homepage "https://mupdf.com/" + license "AGPL-3.0-or-later" + head "git://git.ghostscript.com/mupdf.git", branch: "master" + + stable do + url "https://mupdf.com/downloads/archive/mupdf-1.26.11-source.tar.gz" + sha256 "eee47fdb64de309124df21081d4a4da4ad0e917824ab2ed68fc8008f6b523979" + + # libclang-20 patches + patch do + url "https://github.com/ArtifexSoftware/mupdf/commit/df0b5ee3bb9b12d8c57df55d7b41faf1b874a14d.patch?full_index=1" + sha256 "6968a8b80221b01cc30d46bf832ecbcba99d75de238c41315be318f2b02ac892" + end + patch do + url "https://github.com/ArtifexSoftware/mupdf/commit/559e45ac8c134712cd8eaee01536ea3841e3a449.patch?full_index=1" + sha256 "868c2955cbebcb99b5336c005cbe4a5867f8654cb9b008bd24ae67df84438968" + end + patch do + url "https://github.com/ArtifexSoftware/mupdf/commit/4bbf411898341d3ba30f521a6c137a788793cd45.patch?full_index=1" + sha256 "ac2b1c1b6c21626aaf009928262f7c31e407a886b192d276674ddb94672b1d38" + end + end + + livecheck do + url "https://mupdf.com/releases" + regex(/href=.*?mupdf[._-]v?(\d+(?:\.\d+)+)-source\.(?:t|zip)/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "cd5818bd421ebfd86bfa111d5178293da1928c36308acef9531936b66252d1f6" + sha256 cellar: :any, arm64_sequoia: "c7fd273f963ddab4ee314a2e5b2b817ebccab485afdfef919820d5a1a2a12e38" + sha256 cellar: :any, arm64_sonoma: "ccc19870d0ab3108f2c856e4829c015fceb36d10509dbcf0f701a6a685409577" + sha256 cellar: :any, sonoma: "644b8b7ef7246d445aab052059958058c7dfe6793538f5701f4b5ae6dd99cce4" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f63c7626e9ab1b4511dc297e3ea0649f33ed5c2c0a23f28a35a5510b004ec55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08d5b6fcef7471800eeb4820cd5c66ad5506446f0b0fe7acf57f6b97c659c51c" + end + + depends_on "llvm" => :build + depends_on "pkgconf" => :build + depends_on "swig" => :build + depends_on "brotli" + depends_on "freetype" + depends_on "gumbo-parser" + depends_on "harfbuzz" + depends_on "jbig2dec" + depends_on "jpeg-turbo" + depends_on "leptonica" + depends_on "mujs" + depends_on "openjpeg" + depends_on "openssl@3" + depends_on "python@3.14" + depends_on "tesseract" + + uses_from_macos "zlib" + + on_macos do + depends_on "libarchive" + end + + on_linux do + depends_on "freeglut" + depends_on "libx11" + depends_on "libxext" + depends_on "mesa" + end + + conflicts_with "mupdf-tools", because: "both install the same binaries" + + def install + # Remove bundled libraries excluding `extract` and "strongly preferred" `lcms2mt` (lcms2 fork) + keep = %w[extract lcms2] + (buildpath/"thirdparty").each_child { |path| rm_r(path) if keep.exclude? path.basename.to_s } + + # For python bindings needed by `pymupdf`: https://pymupdf.readthedocs.io/en/latest/packaging.html + site_packages = Language::Python.site_packages("python3.14") + ENV.prepend_path "PYTHONPATH", Formula["llvm"].opt_prefix/site_packages + + args = %W[ + build=release + shared=yes + tesseract=yes + verbose=yes + prefix=#{prefix} + pydir=#{prefix/site_packages} + CC=#{ENV.cc} + USE_SYSTEM_LIBS=yes + USE_SYSTEM_MUJS=yes + VENV_FLAG= + ] + + # Build only runs pkg-config for libcrypto on macOS, so help find other libs + if OS.mac? + [ + ["FREETYPE", "freetype2"], + ["GUMBO", "gumbo"], + ["HARFBUZZ", "harfbuzz"], + ["LEPTONICA", "lept"], + ["LIBJPEG", "libjpeg"], + ["OPENJPEG", "libopenjp2"], + ["TESSERACT", "tesseract"], + ].each do |argname, libname| + args << "SYS_#{argname}_CFLAGS=#{Utils.safe_popen_read("pkgconf", "--cflags", libname).strip}" + args << "SYS_#{argname}_LIBS=#{Utils.safe_popen_read("pkgconf", "--libs", libname).strip}" + args << "HAVE_SYS_#{argname}=yes" + end + + # Workarounds since build scripts for Python bindings don't support macOS + # Issue ref: https://bugs.ghostscript.com/show_bug.cgi?id=705376 + inreplace "Makefile" do |s| + # Avoid creating a symlink that overwrites installed file + s.gsub!(/^\s*ln -sf libmupdf/, "#\\0") + + # FIXME: libmupdfcpp should be a shared lib (.dylib) while _mupdf should be a bundle + # (.so) as the former is a C++ library installed into `lib` while latter is loaded by + # Python bindings. However, the python build scripts hardcode `.so` and uses `-shared` + # which result in neither being correct. Also, the Makefile installs with $(SO) which + # fails to find `.so`. For now we do the easier workaround of installing as `.so`. + s.gsub! "libmupdfcpp.$(SO)", "libmupdfcpp.so" + s.gsub! "_mupdf.$(SO)", "_mupdf.so" + end + + ENV.cxx11 + end + + system "make", "install", *args + system "make", "install-shared-python", *args + + # Symlink `mutool` as `mudraw` (a popular shortcut for `mutool draw`). + bin.install_symlink bin/"mutool" => "mudraw" + man1.install_symlink man1/"mutool.1" => "mudraw.1" + + lib.install_symlink lib/shared_library("libmupdf") => shared_library("libmupdf-third") + end + + test do + assert_match "Homebrew test", shell_output("#{bin}/mudraw -F txt #{test_fixtures("test.pdf")}") + end +end diff --git a/Formula/m/mupen64plus.rb b/Formula/m/mupen64plus.rb new file mode 100644 index 0000000000000..358dd60313461 --- /dev/null +++ b/Formula/m/mupen64plus.rb @@ -0,0 +1,78 @@ +class Mupen64plus < Formula + desc "Cross-platform plugin-based N64 emulator" + homepage "https://www.mupen64plus.org/" + url "https://github.com/mupen64plus/mupen64plus-core/releases/download/2.6.0/mupen64plus-bundle-src-2.6.0.tar.gz" + sha256 "297e17180cd76a7b8ea809d1a1be2c98ed5c7352dc716965a80deb598b21e131" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "bcdd3173e040bf26c85fb1ede2377ebffaa0ce143720c5f2d200159cb52d3708" + sha256 arm64_sequoia: "fa76319a48aa3bc5d5997f8c5108156a8501c110bc7e02a3a69d86065cd28264" + sha256 arm64_sonoma: "5005db0835711d42c5d6c457795e4b6374e974568f380fb381d440266dbdd5b1" + sha256 arm64_ventura: "5a9308e8d1a6356bbef3f5f6009fb06c1d190d59fd3e85565c4f9e1123cf3ff1" + sha256 sonoma: "26e73f4712a1bf42221a86efe322010a2f9b521f58c9b24611881522967b790f" + sha256 ventura: "788e3150ef2a190f730edd401a47c46b548f978994fdcd5497f2ed7ec1db433c" + sha256 arm64_linux: "c97d64ce1bfe545d8d9e25100ab24dd6a75c660683473db88417db2015ccecda" + sha256 x86_64_linux: "6b1e569e22ff2c8f5ef5b343f93a684b6a866e12df7b5e1dd615b79c4e361b75" + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "libpng" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + depends_on "vulkan-loader" + end + + on_intel do + depends_on "nasm" => :build + end + + # Backport fix to avoid macOS app bundle path + patch do + url "https://github.com/mupen64plus/mupen64plus-ui-console/commit/1cab2e6dfe46d5fbc4c23e1e7fbb4502a4e57981.patch?full_index=1" + sha256 "a6e80f36b65406d31f3611f88e695e5c079db52b6f68daa8eb01307f5447194c" + directory "source/mupen64plus-ui-console" + end + + def install + # Prevent different C++ standard library warning + if OS.mac? + inreplace Dir["source/mupen64plus-*/projects/unix/Makefile"], + /(-mmacosx-version-min)=\d+\.\d+/, + "\\1=#{MacOS.version}" + end + + args = ["PREFIX=#{prefix}", "SHAREDIR=#{pkgshare}", "NO_SRC=1", "NO_SPEEX=1", "V=1"] + args << "USE_GLES=1" if OS.linux? + + system "./m64p_build.sh", *args + system "./m64p_install.sh", *args + end + + test do + # Disable test in Linux and Tahoe CI because it hangs because a display is not available. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + return if OS.mac? && MacOS.version == :tahoe && ENV["HOMEBREW_GITHUB_ACTIONS"] + + resource "rom" do + url "https://github.com/mupen64plus/mupen64plus-rom/raw/76ef14c876ed036284154444c7bdc29d19381acc/m64p_test_rom.v64" + sha256 "b5fe9d650a67091c97838386f5102ad94c79232240f9c5bcc72334097d76224c" + end + + resource("rom").stage do + system bin/"mupen64plus", "--testshots", "1", "m64p_test_rom.v64" + end + end +end diff --git a/Formula/m/murex.rb b/Formula/m/murex.rb new file mode 100644 index 0000000000000..f18b2e995b9f2 --- /dev/null +++ b/Formula/m/murex.rb @@ -0,0 +1,33 @@ +class Murex < Formula + desc "Bash-like shell designed for greater command-line productivity and safer scripts" + homepage "https://murex.rocks" + url "https://github.com/lmorg/murex/archive/refs/tags/v7.1.4143.tar.gz" + sha256 "f3620e00dc431ce202216c935d8e509cf0fdf0dd1e363eee9ec6cb64b0b182f4" + license "GPL-2.0-only" + head "https://github.com/lmorg/murex.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d68368627c5e8024bd3d195ecd1ea5a3f97bf4935757689f77e30a0d9e6b00b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d68368627c5e8024bd3d195ecd1ea5a3f97bf4935757689f77e30a0d9e6b00b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d68368627c5e8024bd3d195ecd1ea5a3f97bf4935757689f77e30a0d9e6b00b" + sha256 cellar: :any_skip_relocation, sonoma: "e724db9d29de42a8de6885b3f49e793d503a9c7b84d4db10d91350cc506e2a33" + sha256 cellar: :any_skip_relocation, arm64_linux: "74a572973f6dc72ae7f4fbdf884bdbabe0b60f5c7f7cc6253868f204ab7f91b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8890203346db7bdf131d65f07a178a3c6996f9b33c67dcf7d36eee47119a598" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_equal "homebrew", shell_output("#{bin}/murex -c 'echo homebrew'").chomp + assert_match version.to_s, shell_output("#{bin}/murex -version") + end +end diff --git a/Formula/m/musepack.rb b/Formula/m/musepack.rb new file mode 100644 index 0000000000000..46172f45e2fbc --- /dev/null +++ b/Formula/m/musepack.rb @@ -0,0 +1,86 @@ +class Musepack < Formula + desc "Audio compression format and tools" + homepage "https://www.musepack.net/" + url "https://files.musepack.net/source/musepack_src_r475.tar.gz" + version "r475" + sha256 "a4b1742f997f83e1056142d556a8c20845ba764b70365ff9ccf2e3f81c427b2b" + license all_of: [ + "BSD-3-Clause", # mpc2sv8, mpccut, mpcdec, mpcgain, wavcmp + "LGPL-2.1-or-later", # mpcenc + "GPL-2.0-or-later", # mpcchap + "Zlib", # common/huffman-bcl.c + ] + + livecheck do + url "https://www.musepack.net/index.php?pg=src" + regex(/href=.*?musepack(?:[._-]src)?[._-](r\d+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "545fb3f5f74e2fc5acbbbfbad61b0dfb6c261cd7dbd26f998c1931c939086bd0" + sha256 cellar: :any, arm64_sequoia: "d84a9ad759b25d445781d6e1e5af5247431427e00e90bfb0b1014d9c2e6e4bab" + sha256 cellar: :any, arm64_sonoma: "6b1cd3fb3a8b8beb5603ce39e237cd7fb04e71e8e46ac9d63b0904067e57e676" + sha256 cellar: :any, arm64_ventura: "72634f1bab6447c671827b1586e2161487273e4737b0cc7e47100a8d1f33cc4e" + sha256 cellar: :any, arm64_monterey: "76db5599c7e47ab4317292c040ef16095f658ee3b524d89c0296a574380a4570" + sha256 cellar: :any, arm64_big_sur: "ce4329e0fc5d5d1a1e518e7c1f471ef300ff96ddaea0219e70e4408924f75ff6" + sha256 cellar: :any, sonoma: "6a7652681b271cbcffdd9ac69f7394ee9c51460bc2efaca5ed684913b1b22199" + sha256 cellar: :any, ventura: "772444ef289c9324ef9063d4ca8bc4626080f053589bd93b994e410183c9ff2e" + sha256 cellar: :any, monterey: "9f74dcc9567656a42082125ce4d758c3318a452dbd940b6db39b72c4981768da" + sha256 cellar: :any, big_sur: "e9221e9612e1c0134554fbf380639cd995a5970ad34702bea371633f121ffb3e" + sha256 cellar: :any, catalina: "847cacb946b6289a5fbfbfe4e1a38f1ec5b7f1e32d6c12145aaf1044317e4ce0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e70b9117f455bbd6f17bd6d2467c18f55067b51933a71b15b07b713c30687ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0d6143e42529aa943d6bd1ecebf0e1d0c85576eaab847692c9588a37a0ce1f7" + end + + depends_on "cmake" => :build + depends_on "libcuefile" + depends_on "libreplaygain" + + # Backport upstream fixes from SVN for `-fno-common` and installing shared library + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/musepack/r479.patch" + sha256 "efef0421e3bb25c065c5e77d6c2e4bcdcc89fbcb03c7a7cfd7565ee5478fc8ba" + end + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/musepack/r482.patch" + sha256 "b147cc7effe9230401a0a865fdea1805be8eb26a24059bb36e39da1012e8da4b" + end + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/musepack/r491.patch" + sha256 "9003ff9c3e939dc880cc1ab1a46626eb9cf67a27b2610e7bac0945256bbb5cab" + end + + # Apply Gentoo patches for fixing parallel build and another `-fno-common` issue + patch do + url "https://raw.githubusercontent.com/gentoo/gentoo/f5d4d4995d45baf77c176224b62e424dca037aef/media-sound/musepack-tools/files/musepack-tools-495-fixup-link-depends.patch" + sha256 "6dbada5a1e90c8fd1fe60084c04e2193cd027c6959ecaf6a37151a674ddb6a77" + end + patch do + url "https://raw.githubusercontent.com/gentoo/gentoo/f5d4d4995d45baf77c176224b62e424dca037aef/media-sound/musepack-tools/files/musepack-tools-495-incompatible-pointers.patch" + sha256 "25b43fa3ad4ae6eef1e483e3b675b521049901809a024e22aa0aee2237501654" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "test-mpc" do + url "https://trac.ffmpeg.org/raw-attachment/ticket/1160/decodererror.mpc" + sha256 "b16d876b58810cdb7fc06e5f2f8839775efeffb9b753948a5a0f12691436a15c" + end + + resource("test-mpc").stage do + assert_match(/441001 samples decoded in/, + shell_output("#{bin}/mpcdec decodererror.mpc 2>&1")) + end + end +end diff --git a/Formula/m/musikcube.rb b/Formula/m/musikcube.rb new file mode 100644 index 0000000000000..4604145035dfe --- /dev/null +++ b/Formula/m/musikcube.rb @@ -0,0 +1,84 @@ +class Musikcube < Formula + desc "Terminal-based audio engine, library, player and server" + homepage "https://musikcube.com" + url "https://github.com/clangen/musikcube/archive/refs/tags/3.0.5.tar.gz" + sha256 "708292a583bb5072a8dbb14e408c2a1f61de9b8c9786d4e53b3e69bef5dad8c5" + license all_of: [ + "BSD-3-Clause", + "GPL-2.0-or-later", # src/plugins/supereqdsp/supereq/ + "LGPL-2.1-or-later", # src/plugins/pulseout/pulse_blocking_stream.c (Linux) + "BSL-1.0", # src/3rdparty/include/utf8/ + "MIT", # src/3rdparty/include/{nlohmann,sqlean}/, src/3rdparty/include/websocketpp/utf8_validator.hpp + "Zlib", # src/3rdparty/include/websocketpp/base64/base64.hpp + "bcrypt-Solar-Designer", # src/3rdparty/{include,src}/md5.* + "blessing", # src/3rdparty/{include,src}/sqlite/sqlite3* + ] + head "https://github.com/clangen/musikcube.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e6fd6937db9dc61aebd99b2c780cfc3ff3695bf84fd18238e9c7ecc5a25ba593" + sha256 cellar: :any, arm64_sequoia: "41dfc5305a87586f4f2d136f677bc198c79db7d30df81809d58d7b1fcb7eb38d" + sha256 cellar: :any, arm64_sonoma: "bacb6f49ec2828235426ded597644a0bcca26ee5d15b16f310edf263611de1ca" + sha256 cellar: :any, sonoma: "b939da5923b96d4255861e2dc0f4e94782c611f2c1b980f484ea38e6ae4edf73" + sha256 cellar: :any_skip_relocation, arm64_linux: "42589a10177bdc704cababe52c87c3f2ef8aa2bd16ea06fb494c7316be1f7458" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bf96f0464fe141e3dcb43ef964142ecdec61b3b8906b7f3e0962c8020f27306" + end + + depends_on "asio" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "ffmpeg" + depends_on "game-music-emu" + depends_on "lame" + depends_on "libev" + depends_on "libmicrohttpd" + depends_on "libopenmpt" + depends_on "ncurses" + depends_on "openssl@3" + depends_on "portaudio" + depends_on "taglib" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "gnutls" + depends_on "mpg123" + end + + on_linux do + depends_on "alsa-lib" + depends_on "pulseaudio" + depends_on "systemd" + end + + def install + # Pretend to be Nix to dynamically link ncurses on macOS. + ENV["NIX_CC"] = ENV.cc + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["MUSIKCUBED_LOCKFILE_OVERRIDE"] = lockfile = testpath/"musikcubed.lock" + system bin/"musikcubed", "--start" + sleep 10 + assert_path_exists lockfile + tries = 0 + begin + system bin/"musikcubed", "--stop" + rescue BuildError + # Linux CI seems to take some more time to stop + retry if OS.linux? && (tries += 1) < 3 + raise + end + end +end diff --git a/Formula/m/mussh.rb b/Formula/m/mussh.rb new file mode 100644 index 0000000000000..bce8d84e0fde9 --- /dev/null +++ b/Formula/m/mussh.rb @@ -0,0 +1,23 @@ +class Mussh < Formula + desc "Multi-host SSH wrapper" + homepage "https://mussh.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mussh/mussh/1.0/mussh-1.0.tgz" + sha256 "6ba883cfaacc3f54c2643e8790556ff7b17da73c9e0d4e18346a51791fedd267" + license "GPL-1.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2aef0306d0c39460009d42553effebd0aca77dd7c76489323e13f95ecd76b17e" + end + + def install + bin.install "mussh" + man1.install "mussh.1" + end + + test do + system bin/"mussh", "--help" + end +end diff --git a/Formula/m/mutt.rb b/Formula/m/mutt.rb new file mode 100644 index 0000000000000..9ca2a19cee5e4 --- /dev/null +++ b/Formula/m/mutt.rb @@ -0,0 +1,114 @@ +# NOTE: Mutt has a large number of non-upstream patches available for +# it, some of which conflict with each other. These patches are also +# not kept up-to-date when new versions of mutt (occasionally) come +# out. +# +# To reduce Homebrew's maintenance burden, patches are not accepted +# for this formula. The NeoMutt project has a Homebrew tap for their +# patched version of Mutt: https://github.com/neomutt/homebrew-neomutt + +class Mutt < Formula + desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)" + homepage "http://www.mutt.org/" + url "https://gitlab.com/muttmua/mutt/-/archive/mutt-2-2-15-rel/mutt-mutt-2-2-15-rel.tar.gz" + version "2.2.15" + sha256 "3c931dd65993d2e63a3dcd6bbf1fd88c033ae0f6e377c5d4f88b14fe9170817d" + license "GPL-2.0-or-later" + + # Livecheck uses GitLab tags to determine current version. + # They all have `-rel` suffix which needs to be omitted. + livecheck do + url "https://gitlab.com/muttmua/mutt.git" + regex(/^mutt[._-]v?(\d+(?:-\d+)+)-rel$/i) + end + + bottle do + sha256 arm64_tahoe: "75669d6239c44d5f13c52565e1c4b19f36b2e552f3b853c9ac98813437a8e181" + sha256 arm64_sequoia: "4e9df72dad1e0e9629c46428b23aead3bed33732340a94df9b80d503035089b8" + sha256 arm64_sonoma: "c760d241f11a8ecda970ac6710eae57fd21e0ee6fbf7d2403bb383a2507d30b4" + sha256 sonoma: "d4252e6a4f29d2ed772b2e6cb35443050233172162a184d1b020ccbee53dfed3" + sha256 arm64_linux: "256483eb0551b850f40b2c42f9c7e36846e521492b88ae15243a6b51cd9cb9a9" + sha256 x86_64_linux: "250d93e09deab42ad9b07ab66db482f8f482b6f22e46518382e101148a6e706f" + end + + head do + url "https://gitlab.com/muttmua/mutt.git", branch: "master" + + resource "html" do + url "https://muttmua.gitlab.io/mutt/manual-dev.html" + end + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + depends_on "gpgme" + depends_on "libgpg-error" + depends_on "libidn2" + depends_on "ncurses" + depends_on "openssl@3" + depends_on "tokyo-cabinet" + + uses_from_macos "bzip2" + uses_from_macos "cyrus-sasl" + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "libunistring" + end + + conflicts_with "tin", because: "both install mmdf.5 and mbox.5 man pages" + + def install + user_in_mail_group = Etc.getgrnam("mail").mem.include?(ENV["USER"]) + effective_group = Etc.getgrgid(Process.egid).name + + args = %W[ + --disable-warnings + --enable-gpgme + --enable-hcache + --enable-imap + --enable-pop + --enable-sidebar + --enable-smtp + --with-gss + --with-idn2 + --with-sasl + --with-ssl=#{Formula["openssl@3"].opt_prefix} + --with-tokyocabinet + ] + + system "./prepare", *args, *std_configure_args + system "make" + + # This permits the `mutt_dotlock` file to be installed under a group + # that isn't `mail`. + # https://github.com/Homebrew/homebrew/issues/45400 + inreplace "Makefile", /^DOTLOCK_GROUP =.*$/, "DOTLOCK_GROUP = #{effective_group}" unless user_in_mail_group + + system "make", "install" + doc.install resource("html") if build.head? + end + + def caveats + <<~EOS + mutt_dotlock(1) has been installed, but does not have the permissions to lock + spool files in /var/mail. To grant the necessary permissions, run + + sudo chgrp mail #{bin}/mutt_dotlock + sudo chmod g+s #{bin}/mutt_dotlock + + Alternatively, you may configure `spoolfile` in your .muttrc to a file inside + your home directory. + EOS + end + + test do + system bin/"mutt", "-D" + touch "foo" + system bin/"mutt_dotlock", "foo" + system bin/"mutt_dotlock", "-u", "foo" + end +end diff --git a/Formula/m/mvfst.rb b/Formula/m/mvfst.rb new file mode 100644 index 0000000000000..e981a76f9b926 --- /dev/null +++ b/Formula/m/mvfst.rb @@ -0,0 +1,90 @@ +class Mvfst < Formula + desc "QUIC transport protocol implementation" + homepage "https://github.com/facebook/mvfst" + url "https://github.com/facebook/mvfst/archive/refs/tags/v2025.11.03.00.tar.gz" + sha256 "ff83cb4aa0cf06395470e83b954acd9a92be9aed1908072a95b105a5ae88fe74" + license "MIT" + head "https://github.com/facebook/mvfst.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "875ac583bdd5b4e9088eac7602ac76bb07c60e564f4cc28d362d9385fc0f8a5e" + sha256 arm64_sequoia: "3165b0b4cf80ffe866cf4634555f7c760b8a0bb33f5546791f68bcc16a7461df" + sha256 arm64_sonoma: "cd29806fcc11aa99c62546b079f4e0f38dfd0e54aabc8c029157533d1de862db" + sha256 cellar: :any, sonoma: "3173766034f0d1ba3a336bfb0b74249313860ea1b6e7b209095077c40bbaf6bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "75c2414f1c54dfd25725ee4b7dadf03d77ca35ba49c814cbfca4bb23ef4db4a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a595fcec88946e5a7ff932eb6aa19d82e03591a4e6973e9f66287eed562e2b90" + end + + depends_on "cmake" => [:build, :test] + depends_on "googletest" => :test + depends_on "double-conversion" + depends_on "fizz" + depends_on "fmt" + depends_on "folly" + depends_on "gflags" + depends_on "glog" + depends_on "libsodium" + depends_on "openssl@3" + + def install + shared_args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"] + linker_flags = %w[-undefined dynamic_lookup -dead_strip_dylibs] + linker_flags << "-ld_classic" if OS.mac? && MacOS.version == :ventura + shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")}" if OS.mac? + + system "cmake", "-S", ".", "-B", "_build", "-DBUILD_TESTS=OFF", *shared_args, *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + test do + ENV.delete "CPATH" + stable.stage testpath + + (testpath/"CMakeLists.txt").atomic_write <<~CMAKE + cmake_minimum_required(VERSION 3.20) + project(echo CXX) + set(CMAKE_CXX_STANDARD 17) + + list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + find_package(fizz REQUIRED) + find_package(gflags REQUIRED) + find_package(GTest REQUIRED) + find_package(mvfst REQUIRED) + + add_executable(echo + quic/samples/echo/main.cpp + quic/common/test/TestUtils.cpp + quic/common/test/TestPacketBuilders.cpp + ) + target_link_libraries(echo ${mvfst_LIBRARIES} fizz::fizz_test_support GTest::gmock) + target_include_directories(echo PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(echo PROPERTIES BUILD_RPATH "#{lib};#{HOMEBREW_PREFIX}/lib") + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + + server_port = free_port + server_pid = spawn "./build/echo", "--mode", "server", + "--host", "127.0.0.1", "--port", server_port.to_s + sleep 5 + + Open3.popen3( + "./build/echo", "--mode", "client", + "--host", "127.0.0.1", "--port", server_port.to_s + ) do |stdin, _, stderr, w| + stdin.write "Hello world!\n" + Timeout.timeout(60) do + stderr.each do |line| + break if line.include? "Client received data=echo Hello world!" + end + end + stdin.close + ensure + Process.kill "TERM", w.pid + end + ensure + Process.kill "TERM", server_pid + end +end diff --git a/Formula/m/mvnvm.rb b/Formula/m/mvnvm.rb new file mode 100644 index 0000000000000..c8d8ab7af9b75 --- /dev/null +++ b/Formula/m/mvnvm.rb @@ -0,0 +1,55 @@ +class Mvnvm < Formula + desc "Maven version manager" + # upstream homepage bug report, https://bitbucket.org/mjensen/mvnvm/issues/41/https-mvnvmorg-is-not-reachable + homepage "https://bitbucket.org/mjensen/mvnvm/" + url "https://bitbucket.org/mjensen/mvnvm/get/mvnvm-1.0.29.tar.gz" + sha256 "f3004baa68051fe64b2ab212fea57cb05dcc598e334f2529b9ca936a3b275b0e" + license "Apache-2.0" + head "https://bitbucket.org/mjensen/mvnvm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "03af6e6b002c6e176d523f5d182400b70066fa9f2350155a2cd51abd249b122a" + end + + depends_on "openjdk" + + conflicts_with "maven", because: "both install `mvn` executables" + + def install + bin.install "mvn" + bin.install "mvnDebug" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + (testpath/"settings.xml").write <<~XML + #{testpath}/repository + XML + (testpath/"mvnvm.properties").write <<~EOS + mvn_version=3.5.2 + EOS + (testpath/"pom.xml").write <<~XML + + + 4.0.0 + org.homebrew + maven-test + 1.0.0-SNAPSHOT + + 1.8 + 1.8 + + + XML + (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~JAVA + package org.homebrew; + public class MavenTest { + public static void main(String[] args) { + System.out.println("Testing Maven with Homebrew!"); + } + } + JAVA + system bin/"mvn", "-gs", testpath/"settings.xml", "compile" + end +end diff --git a/Formula/m/mvt.rb b/Formula/m/mvt.rb new file mode 100644 index 0000000000000..4bfb40f5bb341 --- /dev/null +++ b/Formula/m/mvt.rb @@ -0,0 +1,228 @@ +class Mvt < Formula + include Language::Python::Virtualenv + + desc "Mobile device forensic toolkit" + homepage "https://docs.mvt.re/en/latest/" + url "https://files.pythonhosted.org/packages/de/22/32aad49d0f07702a0cef255304a21f54d9958cb1628f192cf7332e3e4af1/mvt-2.6.1.tar.gz" + sha256 "dc13033369048752f4a9d06d579c9748237871d51e91a0d1dc76abb0e47f0a92" + # Adaptation of MPL-2.0 + license :cannot_represent + revision 1 + head "https://github.com/mvt-project/mvt.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "ed3dc82c043fe5a91744297eca0d896695aeb9c9bc353585617714311c762634" + sha256 cellar: :any, arm64_sequoia: "f9aa9b298066344bf3f8f34e16a01504147989c758a72071ebcb472bfe8eb47b" + sha256 cellar: :any, arm64_sonoma: "56e479fe4fb38f8555cfc82613e5e06bcc5a7358b12e95b1b4e319767821e663" + sha256 cellar: :any, sonoma: "c65d49d4379ca95c02412435d3fd96ee5628532c3dcfe24397dafca12a24bb11" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb4abf7f8098f04da313b81eddc907fe356f1875d0f107b62410cd18dfa4c923" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b6982459dab04cc62d8aed0a85ef7a8548624fe7dd2fdce7ec8845f2d92ae27" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + # `pydantic` is manually updated to support Python 3.14 + # PR ref: https://github.com/mvt-project/mvt/pull/706 + + pypi_packages exclude_packages: ["certifi", "cryptography", "pydantic-core"] + + resource "adb-shell" do + url "https://files.pythonhosted.org/packages/8f/73/d246034db6f3e374dad9a35ee3f61345a6b239d4febd2a41ab69df9936fe/adb_shell-0.4.4.tar.gz" + sha256 "04c305f30a2ca25d5c54b3cd6ce9bb64c36e5f07967b23b3fb6aaecc851b90b6" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "betterproto" do + url "https://files.pythonhosted.org/packages/ff/2e/abfed7a721928e14aeb900182ff695be474c4ee5f07ef0874cc5ecd5b0b1/betterproto-1.2.5.tar.gz" + sha256 "74a3ab34646054f674d236d1229ba8182dc2eae86feb249b8590ef496ce9803d" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "grpclib" do + url "https://files.pythonhosted.org/packages/19/75/0f0d3524b38b35e5cd07334b754aa9bd0570140ad982131b04ebfa3b0374/grpclib-0.4.8.tar.gz" + sha256 "d8823763780ef94fed8b2c562f7485cf0bbee15fc7d065a640673667f7719c9a" + end + + resource "h2" do + url "https://files.pythonhosted.org/packages/1d/17/afa56379f94ad0fe8defd37d6eb3f89a25404ffc71d4d848893d270325fc/h2-4.3.0.tar.gz" + sha256 "6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1" + end + + resource "hpack" do + url "https://files.pythonhosted.org/packages/2c/48/71de9ed269fdae9c8057e5a4c0aa7402e8bb16f2c6e90b3aa53327b113f8/hpack-4.1.0.tar.gz" + sha256 "ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca" + end + + resource "hyperframe" do + url "https://files.pythonhosted.org/packages/02/e7/94f8232d4a74cc99514c13a9f995811485a6903d48e5d952771ef6322e30/hyperframe-6.1.0.tar.gz" + sha256 "f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iosbackup" do + url "https://files.pythonhosted.org/packages/db/b8/4cd52322deceb942b9e18b127d45d112c2f7a3ec7821ab528659d4f04275/iOSbackup-0.9.925.tar.gz" + sha256 "33545a9249e5b3faaadf1ee782fe6bdfcdb70fae0defba1acee336a65f93d1ca" + end + + resource "libusb1" do + url "https://files.pythonhosted.org/packages/a2/7f/c59ad56d1bca8fa4321d1bb77ba4687775751a4deceec14943a44da18ca0/libusb1-3.3.1.tar.gz" + sha256 "3951d360f2daf0e0eacf839e15d2d1d2f4f5e7830231eb3188eeffef2dd17bad" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "nskeyedunarchiver" do + url "https://files.pythonhosted.org/packages/e8/d9/227a00737de97609b0b2d161905f03bb8e246df0498ec5735b83166eef8f/NSKeyedUnArchiver-1.5.tar.gz" + sha256 "eeda0480021817336e0ffeaca80377c1a8f08ecc5fc06be483b48c44bad414f4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyahocorasick" do + url "https://files.pythonhosted.org/packages/06/2e/075c667c27ecf2c3ed6bf3c62649625cf1e7de7fd349f63b49b794460b71/pyahocorasick-2.1.0.tar.gz" + sha256 "4df4845c1149e9fa4aa33f0f0aa35f5a42957a43a3d6e447c9b44e679e2672ea" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/8d/35/d319ed522433215526689bad428a94058b6dd12190ce7ddd78618ac14b28/pydantic-2.12.2.tar.gz" + sha256 "7b8fa15b831a4bbde9d5b84028641ac3080a4ca2cbd4a621a661687e741624fd" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/67/1d/42628a2c33e93f8e9acbde0d5d735fa0850f3e6a2f8cb1eb6c40b9a732ac/pydantic_settings-2.9.1.tar.gz" + sha256 "c509bf79d27563add44e8446233359004ed85066cd096d8b510f715e6ef5d268" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/86/ec/535bf6f9bd280de6a4637526602a146a68fde757100ecf8c9333173392db/requests-2.32.2.tar.gz" + sha256 "dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "simplejson" do + url "https://files.pythonhosted.org/packages/af/92/51b417685abd96b31308b61b9acce7ec50d8e1de8fbc39a7fd4962c60689/simplejson-3.20.1.tar.gz" + sha256 "e64139b4ec4f1f24c142ff7dcafe55a22b811a74d86d66560c8815687143037d" + end + + resource "stringcase" do + url "https://files.pythonhosted.org/packages/f3/1f/1241aa3d66e8dc1612427b17885f5fcd9c9ee3079fc0d28e9a3aeeb36fa3/stringcase-1.2.0.tar.gz" + sha256 "48a06980661908efe8d9d34eab2b6c13aefa2163b3ced26972902e3bdfd87008" + end + + resource "tld" do + url "https://files.pythonhosted.org/packages/df/a1/5723b07a70c1841a80afc9ac572fdf53488306848d844cd70519391b0d26/tld-0.13.1.tar.gz" + sha256 "75ec00936cbcf564f67361c41713363440b6c4ef0f0c1592b5b0fbe72c17a350" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + venv = virtualenv_install_with_resources without: "iosbackup" + + # iosbackup is incompatible with build isolation: https://github.com/avibrazil/iOSbackup/pull/32 + resource("iosbackup").stage do + inreplace "setup.py", "from iOSbackup import __version__", "__version__ = '#{resource("iosbackup").version}'" + venv.pip_install Pathname.pwd + end + + %w[mvt-android mvt-ios].each do |script| + generate_completions_from_executable(bin/script, shell_parameter_format: :click) + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/mvt-android version") + assert_match version.to_s, shell_output("#{bin}/mvt-ios version") + + outputandroid = shell_output("#{bin}/mvt-android download-iocs") + outputios = shell_output("#{bin}/mvt-ios download-iocs") + + assert_match "[mvt.common.updates] Downloaded indicators", outputandroid + assert_match "[mvt.common.updates] Downloaded indicators", outputios + end +end diff --git a/Formula/m/mvtools.rb b/Formula/m/mvtools.rb new file mode 100644 index 0000000000000..f0b658fa53f03 --- /dev/null +++ b/Formula/m/mvtools.rb @@ -0,0 +1,57 @@ +class Mvtools < Formula + desc "Filters for motion estimation and compensation" + homepage "https://github.com/dubhater/vapoursynth-mvtools" + url "https://github.com/dubhater/vapoursynth-mvtools/archive/refs/tags/v24.tar.gz" + sha256 "ccff47f4ea25aa13b13fabd5cf38dd0be1ceda10d9ad6b52bd42ecf9d6eb24ad" + license "GPL-2.0-or-later" + head "https://github.com/dubhater/vapoursynth-mvtools.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3c0e17fdf774da0b5e0d8ae822a9401523ded7288cd98bcab79c5bb074867d95" + sha256 cellar: :any, arm64_sequoia: "f3e493940d6f162c23cb1ffbd90f6592c4d8fb163810ea717a7b57d9a4152bfa" + sha256 cellar: :any, arm64_sonoma: "92edb441ffb705b90a8fe0fd12fa1fb27896b5edfb2df3427ebdcd7b496f182c" + sha256 cellar: :any, arm64_ventura: "0b437191d2e0b8880f53e2f7650028085c5bc48e0c73eb9cd9c7bd1eddd92e19" + sha256 cellar: :any, arm64_monterey: "8381da2f99f7ebc1cf687c3eb690375da292e3cece482bf063017b669d920c8c" + sha256 cellar: :any, sonoma: "a6e2de4fb621cceec1a74362de32d27f2353ef18152d6401c170cf7f718470a0" + sha256 cellar: :any, ventura: "bcd432707884f5ceea9ff50e5280da4c9c6c4dfc1c3c6981ad70d921427dc2dd" + sha256 cellar: :any, monterey: "d38fc8a9a06f508949d8643396024d630aac374d8ed3e792a23cdea10bb21c48" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae5a71a3625699b8ea9751865c61a537dba02dd5cd729bbac006761054112746" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1e2a5e84ec6842466bca0a44a572a45c491e7fd3c30ea5e4125f02d664f04fa" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "nasm" => :build + depends_on "pkgconf" => :build + + depends_on "fftw" + depends_on "vapoursynth" + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + MVTools will not be autoloaded in your VapourSynth scripts. To use it + use the following code in your scripts: + + vs.core.std.LoadPlugin(path="#{HOMEBREW_PREFIX}/lib/#{shared_library("libmvtools")}") + EOS + end + + test do + script = <<~PYTHON.split("\n").join(";") + import vapoursynth as vs + vs.core.std.LoadPlugin(path="#{lib/shared_library("libmvtools")}") + PYTHON + python = Formula["vapoursynth"].deps + .find { |d| d.name.match?(/^python@\d\.\d+$/) } + .to_formula + .opt_libexec/"bin/python" + system python, "-c", script + end +end diff --git a/Formula/m/mx.rb b/Formula/m/mx.rb new file mode 100644 index 0000000000000..2762e3bfc0567 --- /dev/null +++ b/Formula/m/mx.rb @@ -0,0 +1,50 @@ +class Mx < Formula + desc "Command-line tool used for the development of Graal projects" + homepage "https://github.com/graalvm/mx" + url "https://github.com/graalvm/mx/archive/refs/tags/7.65.3.tar.gz" + sha256 "d6885c05514803a9684d32ad3706357745618d819837a7ce27c890c66d94eb45" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c8e6845d4b71b8371ea6a36112a203ed981dcbf37535c5a28538aa9363be193c" + end + + depends_on "openjdk" => :test + depends_on "python@3.14" + + def install + libexec.install Dir["*"] + (bin/"mx").write_env_script libexec/"mx", MX_PYTHON: "#{Formula["python@3.14"].opt_libexec}/bin/python" + bash_completion.install libexec/"bash_completion/mx" => "mx" + end + + def post_install + # Run a simple `mx` command to create required empty directories inside libexec + Dir.mktmpdir do |tmpdir| + with_env(HOME: tmpdir) do + system bin/"mx", "--user-home", tmpdir, "version" + end + end + end + + test do + resource "homebrew-testdata" do + url "https://github.com/oracle/graal/archive/refs/tags/vm-22.3.2.tar.gz" + sha256 "77c7801038f0568b3c2ef65924546ae849bd3bf2175e2d248c35ba27fd9d4967" + end + + ENV["JAVA_HOME"] = Language::Java.java_home + ENV["MX_ALT_OUTPUT_ROOT"] = testpath + + testpath.install resource("homebrew-testdata") + cd "vm" do + output = shell_output("#{bin}/mx suites") + assert_match "distributions:", output + end + end +end diff --git a/Formula/m/mxnet.rb b/Formula/m/mxnet.rb new file mode 100644 index 0000000000000..9d0e0cccddb46 --- /dev/null +++ b/Formula/m/mxnet.rb @@ -0,0 +1,53 @@ +class Mxnet < Formula + desc "Flexible and efficient library for deep learning" + homepage "https://mxnet.apache.org" + url "https://www.apache.org/dyn/closer.lua?path=mxnet/1.9.1/apache-mxnet-src-1.9.1-incubating.tar.gz" + mirror "https://archive.apache.org/dist/incubator/mxnet/1.9.1/apache-mxnet-src-1.9.1-incubating.tar.gz" + sha256 "11ea61328174d8c29b96f341977e03deb0bf4b0c37ace658f93e38d9eb8c9322" + license "Apache-2.0" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sonoma: "1e1e944d4b346f4dd124237e0310c8aded1710c1e49e56b50d43a8e35c503271" + sha256 cellar: :any, arm64_ventura: "2020a5335652d0b125527493362fcdfc82401f4138cc5f858839bf8fa3c89d8d" + sha256 cellar: :any, arm64_monterey: "8c36d0a7729bd0dd148c0d5aa2be116a47bbbf348d5bfcde162ce218cf44cf62" + sha256 cellar: :any, arm64_big_sur: "49a4ca9dc8f9286aeb6c8607645f41b2196d529c6cd1ddba0dd3d1219b3466e2" + sha256 cellar: :any, sonoma: "0b9891959f9298eeecdbac5438471f6b7e4a28b0531a611244644c2528f9a4c0" + sha256 cellar: :any, ventura: "1ca1366b1c0906568e79e7a0fc07ed6a162e88773dc96296ee61f20689f4cf42" + sha256 cellar: :any, monterey: "3e253dbc7e037089f0d3fe8151e7eea4f49754dbc068bdfe8ec67416f57fafec" + sha256 cellar: :any, big_sur: "54b4463862a820006c4127226fc4f9284856fe4c4754fbc8ab2bc2ec3edf277b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cbcaa399628827097bd18a797cd6dd7f10df7950eac62564143edc818967156" + end + + # Moved into the Attic in 2023-09: https://attic.apache.org/projects/mxnet.html + disable! date: "2025-01-05", because: :deprecated_upstream + + depends_on "cmake" => :build + depends_on "openblas" + depends_on "opencv" + + uses_from_macos "python" => :build + + def install + args = [ + "-DBUILD_CPP_EXAMPLES=OFF", + "-DUSE_CCACHE=OFF", + "-DUSE_CPP_PACKAGE=ON", + "-DUSE_CUDA=OFF", + "-DUSE_MKLDNN=OFF", + "-DUSE_OPENMP=OFF", + ] + args << "-DUSE_SSE=OFF" if Hardware::CPU.arm? + system "cmake", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "cpp-package/example" + end + + test do + cp pkgshare/"example/test_kvstore.cpp", testpath + system ENV.cxx, "-std=c++11", "-o", "test", "test_kvstore.cpp", + "-I#{include}", "-L#{lib}", "-lmxnet" + system "./test" + end +end diff --git a/Formula/m/mycli.rb b/Formula/m/mycli.rb new file mode 100644 index 0000000000000..bca31835e59ad --- /dev/null +++ b/Formula/m/mycli.rb @@ -0,0 +1,240 @@ +class Mycli < Formula + include Language::Python::Virtualenv + + desc "CLI for MySQL with auto-completion and syntax highlighting" + homepage "https://www.mycli.net/" + url "https://files.pythonhosted.org/packages/62/63/0686c6336f9797da19d2a3d58befeec4fb62991f9b8a8cfdd2ab646e0e36/mycli-1.41.0.tar.gz" + sha256 "d919d7c3a53257cb8db67d50d7ce51e97c36201c923e923d82f55f32d4bf1d5a" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bcf38978846d7e70bd3d00228d8a4aaa157e4867aafb2824b690c07aac704840" + sha256 cellar: :any, arm64_sequoia: "ede3e5fcf51b875fc7cdc7ade22e374a1fecca944d9bd76099aceb74d16391db" + sha256 cellar: :any, arm64_sonoma: "ecf1c3aa181abc74f41709f58491f86adb1b4edd2dc09841cf8e9265de2ca44d" + sha256 cellar: :any, sonoma: "2810cc48ea4c7b63cbea2d6c0ef919e5197e45d760ab1b0b1194c06383efb84e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d439d6d2fd0092035281507934deff130b40b72f954fe99929093611255cfb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64a24a288b15ceb9136a92563f0cd8a10e23090aa250799d63b5067e1eb62880" + end + + depends_on "rust" => :build # for jiter, sqlglotrs + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages package_name: "mycli[llm]", + exclude_packages: %w[certifi cryptography pydantic-core] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/5a/e6/51b043e8c4ae390af61af35f73a9c2a69a26ea9cf4d061ab45c59f8e20f4/cli_helpers-2.7.0.tar.gz" + sha256 "62d11710dbebc2fc460003de1215688325d8636859056d688b38419bd4048bc0" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "condense-json" do + url "https://files.pythonhosted.org/packages/94/b3/d784cbc05556192ea1e798cae96363835d649fe7420ff030190789645be1/condense_json-0.1.3.tar.gz" + sha256 "25fe8d434fdafd849e8d98f21a3e18f96ae2d6dbc2c17565f29e4843d039d2bc" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/a3/68/0357982493a7b20925aece061f7fb7a2678e3b232f8d73a6edb7e5304443/jiter-0.11.1.tar.gz" + sha256 "849dcfc76481c0ea0099391235b7ca97d7279e0fa4c86005457ac7c88e8b76dc" + end + + resource "llm" do + url "https://files.pythonhosted.org/packages/05/7f/f2fe103b8fa6c5a96ba117fef46af15c766d4c28640893c2c7feb79c0df3/llm-0.27.1.tar.gz" + sha256 "02b0b393e31cf0e0ee1f2a6006c451c74ec18c7ec3973218de56e76fd72baa80" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/c4/44/303deb97be7c1c9b53118b52825cbd1557aeeff510f3a52566b1fa66f6a2/openai-2.6.1.tar.gz" + sha256 "27ae704d190615fca0c0fc2b796a38f8b5879645a3a52c9c453b23f97141bb49" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "puremagic" do + url "https://files.pythonhosted.org/packages/dd/7f/9998706bc516bdd664ccf929a1da6c6e5ee06e48f723ce45aae7cf3ff36e/puremagic-1.30.tar.gz" + sha256 "f9ff7ac157d54e9cf3bff1addfd97233548e75e685282d84ae11e7ffee1614c9" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyfzf" do + url "https://files.pythonhosted.org/packages/d4/4c/c0c658a1e1e9f0e01932990d7947579515fe048d0a515f07458ecd992b8f/pyfzf-0.3.1.tar.gz" + sha256 "dd902e34cffeca9c3082f96131593dd20b4b3a9bba5b9dde1b0688e424b46bd2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pymysql" do + url "https://files.pythonhosted.org/packages/f5/ae/1fe3fcd9f959efa0ebe200b8de88b5a5ce3e767e38c7ac32fb179f16a388/pymysql-1.1.2.tar.gz" + sha256 "4961d3e165614ae65014e361811a724e2044ad3ea3739de9903ae7c21f539f03" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-ulid" do + url "https://files.pythonhosted.org/packages/40/7e/0d6c82b5ccc71e7c833aed43d9e8468e1f2ff0be1b3f657a6fcafbb8433d/python_ulid-3.1.0.tar.gz" + sha256 "ff0410a598bc5f6b01b602851a3296ede6f91389f913a5d5f8c496003836f636" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sqlglot" do + url "https://files.pythonhosted.org/packages/d1/50/766692a83468adb1bde9e09ea524a01719912f6bc4fdb47ec18368320f6e/sqlglot-27.29.0.tar.gz" + sha256 "2270899694663acef94fa93497971837e6fadd712f4a98b32aee1e980bc82722" + end + + resource "sqlglotrs" do + url "https://files.pythonhosted.org/packages/87/5a/46d8efeda45be6ce1c630229455f000cafedea6129b47e6cfab39ff462f5/sqlglotrs-0.7.3.tar.gz" + sha256 "caadc572c8a194f99d6ba44d02f9ada0110e3d47cca3330c81f4aa608f1143eb" + end + + resource "sqlite-fts4" do + url "https://files.pythonhosted.org/packages/c2/6d/9dad6c3b433ab8912ace969c66abd595f8e0a2ccccdb73602b1291dbda29/sqlite-fts4-1.0.3.tar.gz" + sha256 "78b05eeaf6680e9dbed8986bde011e9c086a06cb0c931b3cf7da94c214e8930c" + end + + resource "sqlite-migrate" do + url "https://files.pythonhosted.org/packages/13/86/1463a00d3c4bdb707c0ed4077d17687465a0aa9444593f66f6c4b49e39b5/sqlite-migrate-0.1b0.tar.gz" + sha256 "8d502b3ca4b9c45e56012bd35c03d23235f0823c976d4ce940cbb40e33087ded" + end + + resource "sqlite-utils" do + url "https://files.pythonhosted.org/packages/51/43/ce9183a21911e0b73248c8fb83f8b8038515cb80053912c2a009e9765564/sqlite_utils-3.38.tar.gz" + sha256 "1ae77b931384052205a15478d429464f6c67a3ac3b4eafd3c674ac900f623aab" + end + + resource "sqlparse" do + url "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz" + sha256 "09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"mycli", shell_parameter_format: :click) + end + + test do + system bin/"mycli", "--help" + end +end diff --git a/Formula/m/mycorrhiza.rb b/Formula/m/mycorrhiza.rb new file mode 100644 index 0000000000000..8a380ea096fe4 --- /dev/null +++ b/Formula/m/mycorrhiza.rb @@ -0,0 +1,56 @@ +class Mycorrhiza < Formula + desc "Lightweight wiki engine with hierarchy support" + homepage "https://mycorrhiza.wiki" + url "https://github.com/bouncepaw/mycorrhiza/archive/refs/tags/v1.15.1.tar.gz" + sha256 "92b56606cb2e8b1afe086b86e68355a7aa6202bf77514ca6f07b32f7f143f4c4" + license "AGPL-3.0-only" + head "https://github.com/bouncepaw/mycorrhiza.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "81f838895cc43b1735f72f67623c6ed551d6f522213b45ae2cb7da7031bd2bbf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "239a63df7669042934cce4e4a36dac583b4f08ba351a7a2cc5a77d61ff2c71f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3c5d525c9adde1458160625aead01aaf7970eaa664a7fcd0eda201782f98f30" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a6a3e9bf597543fd047bcbd528fb294968626a43913e2b5ecb832e0a65c4f03f" + sha256 cellar: :any_skip_relocation, sonoma: "50902c67ef7688b2af218cb42a5e219d8b6ad1dbe73adb8eb5d4f9d7ce7ca1f2" + sha256 cellar: :any_skip_relocation, ventura: "babe0cd8e1a5328ee92a0ab611b8b1824e967857ac752295a6cd7ee658bb1ab6" + sha256 cellar: :any_skip_relocation, arm64_linux: "195738a48e2c1462af8eb894c93c2691e7f4a186b86f0c1e6aaeb5da110a1782" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7ac1d896d58f658da09c6590400fe8fe65a4ee61083bbe724a9a4705d0a6745" + end + + depends_on "go" => :build + + def install + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + service do + run [opt_bin/"mycorrhiza", var/"lib/mycorrhiza"] + keep_alive true + log_path var/"log/mycorrhiza.log" + error_log_path var/"log/mycorrhiza.log" + end + + test do + # Find an available port + port = free_port + + pid = fork do + exec bin/"mycorrhiza", "-listen-addr", "127.0.0.1:#{port}", "." + end + + # Wait for Mycorrhiza to start up + sleep 5 + + # Create a hypha + cmd = "curl -siF'text=This is a test hypha.' 127.0.0.1:#{port}/upload-text/test_hypha" + assert_match(/303 See Other/, shell_output(cmd)) + + # Verify that it got created + cmd = "curl -s 127.0.0.1:#{port}/hypha/test_hypha" + assert_match(/This is a test hypha\./, shell_output(cmd)) + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/m/mydumper.rb b/Formula/m/mydumper.rb new file mode 100644 index 0000000000000..17885e0cfe578 --- /dev/null +++ b/Formula/m/mydumper.rb @@ -0,0 +1,53 @@ +class Mydumper < Formula + desc "MySQL logical backup tool" + homepage "https://github.com/mydumper/mydumper" + url "https://github.com/mydumper/mydumper/archive/refs/tags/v0.20.1-2.tar.gz" + sha256 "b9b703262376ce51706e896537c476c194921aca639f9cafce007992ff9bf7ad" + license "GPL-3.0-or-later" + head "https://github.com/mydumper/mydumper.git", branch: "master" + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+(-\d+)?)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a25b2c81c7e912f0cbcfcbd01d25299f8bf6ab82a9efcbd5f9513d5bf280b6bb" + sha256 cellar: :any, arm64_sequoia: "20ced13d9cd1ca47333b142ae9c093e729c0377b4c71790f476e884c05a8b0d5" + sha256 cellar: :any, arm64_sonoma: "5575c4dad2fff846b588723749aa5d7265978270c64407c0597f41110379b3cb" + sha256 cellar: :any, sonoma: "a97a69f3c6b8ba20b23ea5d96559f5b0c90637be246cb8f05f7924d2738399a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3a7c19b59dcce09b9d76f4191fb30b2483a305f9810813c141a2c598dce362b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "867c6de5c9e068e8f068e1a408960cac6f51cc4961db7c2f4833352c4098a13f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "glib" + depends_on "mariadb-connector-c" + depends_on "pcre2" + + on_macos do + depends_on "openssl@3" + end + + def install + # Avoid installing config into /etc + inreplace "CMakeLists.txt", "/etc", etc + + # Override location of mysql-client + args = %W[ + -DMYSQL_CONFIG_PREFER_PATH=#{Formula["mariadb-connector-c"].opt_bin} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"mydumper", "--help" + end +end diff --git a/Formula/m/myman.rb b/Formula/m/myman.rb new file mode 100644 index 0000000000000..64ff948f7eadf --- /dev/null +++ b/Formula/m/myman.rb @@ -0,0 +1,56 @@ +class Myman < Formula + desc "Text-mode videogame inspired by Namco's Pac-Man" + homepage "https://myman.sourceforge.io/" + url "https://downloads.sourceforge.net/project/myman/myman-cvs/myman-cvs-2009-10-30/myman-wip-2009-10-30.tar.gz" + sha256 "bf69607eabe4c373862c81bf56756f2a96eecb8eaa8c911bb2abda78b40c6d73" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "ad0b203a8eb32295e620487891e41c177d0b4fb923060421f7b12dfab97b5c03" + sha256 arm64_sequoia: "0dc21521eed45cafe254d4827b33de42b08fd4be2eeae5dc0bfe88f6fe6dbf6f" + sha256 arm64_sonoma: "501fa86739940d84b19c81b0f93a3ddd81031f052760c8409bdfa3f61a86a406" + sha256 arm64_ventura: "4a37b7df0fde91a64eeec5ae4032d2c460b6524310c51819624c16c8904e7020" + sha256 arm64_monterey: "7572bde41926ba4a33b300b0e43b890648fb8d19e47e4a50b43608e99c9b8e9a" + sha256 arm64_big_sur: "a38be300e040956aa8f9d997a715c91152868d5aeaadc6406330729523036828" + sha256 sonoma: "90c2e1f670e45f8df399395348af8d3c4112ce2bf4e556ef7442f685d27b5890" + sha256 ventura: "ddbf3e40844f79bb2c6401a01db921f954980a7784f23838d3876447eb66c0ff" + sha256 monterey: "0b4412e46e30f8970f331f4948e3210b956abceceebbb0b480ace2af2fa3973a" + sha256 big_sur: "651100d0ad19af5ef07a55c1bd0d728211d8810e9da024d9344f3ed5c024e46b" + sha256 catalina: "90c5dee20ff2517495521e588b09678789462a8a63dc6a600da13a76cb5e86b0" + sha256 arm64_linux: "f33b146715c2765ab0994572a9692ee5cd84cf216926262810483f688ff8ce81" + sha256 x86_64_linux: "28f96eb2fba35b8c50f166eecd9b48dc8336229e97425f290209d15e9526eeeb" + end + + depends_on "groff" => :build + + uses_from_macos "ncurses" + + on_macos do + depends_on "coreutils" => :build + depends_on "gnu-sed" => :build + end + + on_linux do + depends_on "util-linux" => :build # for `col` + end + + def install + if OS.mac? + ENV["RMDIR"] = "grmdir" + ENV["SED"] = "gsed" + ENV["INSTALL"] = "ginstall" + end + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"myman", "-k" + end +end diff --git a/Formula/m/mypaint-brushes.rb b/Formula/m/mypaint-brushes.rb new file mode 100644 index 0000000000000..ae2aef5747349 --- /dev/null +++ b/Formula/m/mypaint-brushes.rb @@ -0,0 +1,33 @@ +class MypaintBrushes < Formula + desc "Brushes used by MyPaint and other software using libmypaint" + homepage "https://github.com/mypaint/mypaint-brushes" + url "https://github.com/mypaint/mypaint-brushes/archive/refs/tags/v2.0.2.tar.gz" + sha256 "01032550dd817bb0f8e85d83a632ed2e50bc16e0735630839e6c508f02f800ac" + license "CC0-1.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c919364f08de423bd1b2e8c674b76e277adebee4157b49c75dfdf38d84777878" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + depends_on "libmypaint" + + def install + ENV["ACLOCAL"] = "aclocal" + ENV["AUTOMAKE"] = "automake" + + system "./autogen.sh" + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + assert_path_exists share.glob("mypaint-data/*/brushes/classic/marker_small_prev.png").first + end +end diff --git a/Formula/m/mypy.rb b/Formula/m/mypy.rb new file mode 100644 index 0000000000000..cdd792fa76d14 --- /dev/null +++ b/Formula/m/mypy.rb @@ -0,0 +1,56 @@ +class Mypy < Formula + include Language::Python::Virtualenv + + desc "Experimental optional static type checker for Python" + homepage "https://www.mypy-lang.org/" + url "https://files.pythonhosted.org/packages/c0/77/8f0d0001ffad290cef2f7f216f96c814866248a0b92a722365ed54648e7e/mypy-1.18.2.tar.gz" + sha256 "06a398102a5f203d7477b2923dda3634c36727fa5c237d8f859ef90c42a9924b" + license "MIT" + head "https://github.com/python/mypy.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fd851df81e5ac386cdadb268cbef9d9e320943f28b555ef59510def41235b083" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3a4029c8a6b2f1020250f24366dec74c24c650c979bdc2878cd1cf3df28f582" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21b458b580c086529c7903c2af36fb80a4761db4853757728f9873791f4709fa" + sha256 cellar: :any_skip_relocation, sonoma: "87122cfe8a26ae4dbcb604170b8a7a4c1a1d7ca7e1aa002d43cf32526c810514" + sha256 cellar: :any_skip_relocation, arm64_linux: "26fb86bc75abcb56ec8ba8d5e6a2837c32983ec75dae11122c2ec9d17bc90a7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89b7b0371b5487d0c7fed284a1dcfd5852c9cf33638c60146d97dea5a0ef8de8" + end + + depends_on "python@3.14" + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + ENV["MYPY_USE_MYPYC"] = "1" + ENV["MYPYC_OPT_LEVEL"] = "3" + virtualenv_install_with_resources + end + + test do + (testpath/"broken.py").write <<~PYTHON + def p() -> None: + print('hello') + a = p() + PYTHON + output = pipe_output("#{bin}/mypy broken.py 2>&1") + assert_match '"p" does not return a value', output + + output = pipe_output("#{bin}/mypy --version 2>&1") + assert_match "(compiled: yes)", output + end +end diff --git a/Formula/m/mysql++.rb b/Formula/m/mysql++.rb new file mode 100644 index 0000000000000..aa992efb84497 --- /dev/null +++ b/Formula/m/mysql++.rb @@ -0,0 +1,58 @@ +class Mysqlxx < Formula + desc "C++ wrapper for MySQL's C API" + homepage "https://tangentsoft.com/mysqlpp/home" + url "https://tangentsoft.com/mysqlpp/releases/mysql++-3.3.0.tar.gz" + sha256 "449cbc46556cc2cc9f9d6736904169a8df6415f6960528ee658998f96ca0e7cf" + license "LGPL-2.1-or-later" + revision 4 + + livecheck do + url "https://tangentsoft.com/mysqlpp/releases/" + regex(/>mysql\+\+[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bb03e282116800237c75a9374bb020f8cd9f6cd84b01a56549da52d595ff79e8" + sha256 cellar: :any, arm64_sequoia: "5c39095c830382c0de716906058fdfc99dc8ba77c57b2682ffab177767790c21" + sha256 cellar: :any, arm64_sonoma: "20c4acc648555402a0e94e9d4f771ae4952e1a207ff86af5b088694b5bc0195d" + sha256 cellar: :any, arm64_ventura: "40a3f055ec5b42ab64ed3996133d2250b4d01e35aadf3d4c156ed5c011708aaa" + sha256 cellar: :any, sonoma: "57348bc88e3ed7dfccd4c0b51a7c5416473a0e81d23eb6f9c863d21da02fa236" + sha256 cellar: :any, ventura: "5c9da073209c874fa0fd85f0d98783444e1af93e527871d7dc47366f22f9ab28" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fe9c4d8235e6b18d24d4c957347282d9c8a6476de38ac598568866d1b568fa9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05a8a2b24a6e5b63f6ed9b997686059ea081726bce22555a0665c4b19826effa" + end + + depends_on "mariadb-connector-c" + + def install + mariadb = Formula["mariadb-connector-c"] + system "./configure", "--with-field-limit=40", + "--with-mysql=#{mariadb.opt_prefix}", + *std_configure_args + + # Delete "version" file incorrectly included as C++20 header + # Issue ref: https://tangentsoft.com/mysqlpp/tktview/4ea874fe67e39eb13ed4b41df0c591d26ef0a26c + # Remove when fixed upstream + rm "version" + + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main(int argc, char *argv[]) { + mysqlpp::examples::CommandLine cmdline(argc, argv); + if (!cmdline) { + return 1; + } + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{Formula["mariadb-connector-c"].opt_include}/mariadb", + "-L#{lib}", "-lmysqlpp", "-o", "test" + system "./test", "-u", "foo", "-p", "bar" + end +end diff --git a/Formula/m/mysql-client.rb b/Formula/m/mysql-client.rb new file mode 100644 index 0000000000000..12f50190b9858 --- /dev/null +++ b/Formula/m/mysql-client.rb @@ -0,0 +1,92 @@ +class MysqlClient < Formula + desc "Open source relational database management system" + # FIXME: Actual homepage fails audit due to Homebrew's user-agent + # homepage "https://dev.mysql.com/doc/refman/9.3/en/" + homepage "https://github.com/mysql/mysql-server" + url "https://cdn.mysql.com/Downloads/MySQL-9.5/mysql-9.5.0.tar.gz" + mirror "https://repo.mysql.com/apt/ubuntu/pool/mysql-innovation/m/mysql-community/mysql-community_9.5.0.orig.tar.gz" + sha256 "ef3343981375865a2519f72b600e55f9c646e60e204a2964d3b7e8e748a110a5" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + formula "mysql" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "7e7f49974ddd1ffa219c434bd1ea40f1eb3363b81820f57217f3a8581b57d79c" + sha256 arm64_sequoia: "10be20065f9c0e3564061363f4484587a11f8e9cd82f218635327ee0a91c4abd" + sha256 arm64_sonoma: "c1875651500d46033ad8e047d58baa95b65f54afc8e4db3b9a103aae82456cda" + sha256 sonoma: "72fb863389cc891461b891e92013ab4e1d855168c58c7909d84e74201e06b45f" + sha256 arm64_linux: "6a4deb358547538a5256d2795cac778264cb06919e0b9d6d52175d2251e4bb08" + sha256 x86_64_linux: "49a34adedb283f40e336e722b52d9dc72328ce81159cc3fb03a0dd70666f0d74" + end + + keg_only "it conflicts with mysql (which contains client libraries)" + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libfido2" + depends_on "openssl@3" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "libedit" + + on_ventura :or_older do + depends_on "llvm" => :build + fails_with :clang do + cause <<~EOS + std::string_view is not fully compatible with the libc++ shipped + with ventura, so we need to use the LLVM libc++ instead. + EOS + end + end + + on_linux do + depends_on "libtirpc" => :build + depends_on "krb5" + end + + fails_with :gcc do + version "9" + cause "Requires C++20" + end + + def install + if OS.linux? + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" + elsif MacOS.version <= :ventura + ENV.llvm_clang + end + + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + args = %W[ + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=yes + -DWITH_EDITLINE=system + -DWITH_FIDO=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_SSL=yes + -DWITH_UNIT_TESTS=OFF + -DWITHOUT_SERVER=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mysql --version") + end +end diff --git a/Formula/m/mysql-client@8.0.rb b/Formula/m/mysql-client@8.0.rb new file mode 100644 index 0000000000000..96f3d61f0b46a --- /dev/null +++ b/Formula/m/mysql-client@8.0.rb @@ -0,0 +1,71 @@ +class MysqlClientAT80 < Formula + desc "Open source relational database management system" + # FIXME: Actual homepage fails audit due to Homebrew's user-agent + # homepage "https://dev.mysql.com/doc/refman/8.0/en/" + homepage "https://github.com/mysql/mysql-server" + url "https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.44.tar.gz" + sha256 "a8cc09a35af63668c5235cf282aef789428c6f30c1d9a581b337c816ce8ce8bb" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + formula "mysql@8.0" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "1065b0a682a05461705bb1fd5d58fdf09d73d7c31f4c8aec2c6b5a45eb2bd4f0" + sha256 arm64_sequoia: "5320a6b0c5c6439ca6318e554d021b24922f0e544fb2b53d2a86095bf11ed741" + sha256 arm64_sonoma: "5fce645ea15e4a39c028889fc83e8b57228273b9a209872d6f5dd10836d93896" + sha256 sonoma: "92587c24f9e4e9c30ec415110409e2ae3941e969d4c29022aa9b2663ba4a8157" + sha256 arm64_linux: "ebeb66a4fe8c60078b9765c4e052cd98c3b5054f3ef498f27328b7b092a50b1e" + sha256 x86_64_linux: "47982089ccbe5051199874e4c3fb760ef3cce1dae7e852585bc1211c9bff4a8b" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libfido2" + depends_on "openssl@3" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "libedit" + + on_linux do + depends_on "libtirpc" => :build + end + + def install + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + args = %W[ + -DFORCE_INSOURCE_BUILD=1 + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DWITH_BOOST=boost + -DWITH_EDITLINE=system + -DWITH_FIDO=system + -DWITH_LIBEVENT=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_SSL=yes + -DWITH_UNIT_TESTS=OFF + -DWITHOUT_SERVER=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mysql --version") + end +end diff --git a/Formula/m/mysql-client@8.4.rb b/Formula/m/mysql-client@8.4.rb new file mode 100644 index 0000000000000..cc882b8137214 --- /dev/null +++ b/Formula/m/mysql-client@8.4.rb @@ -0,0 +1,71 @@ +class MysqlClientAT84 < Formula + desc "Open source relational database management system" + # FIXME: Actual homepage fails audit due to Homebrew's user-agent + # homepage "https://dev.mysql.com/doc/refman/8.4/en/" + homepage "https://github.com/mysql/mysql-server" + url "https://cdn.mysql.com/Downloads/MySQL-8.4/mysql-8.4.7.tar.gz" + sha256 "c0bf33a94cdb908f149aea0797affb1b139262ccf0e0b9787a17246207542e69" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + formula "mysql@8.4" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "f1fce38da138e20340738cae889eedede5d13567b83fa2f33dc71244d976501a" + sha256 arm64_sequoia: "7bb69a79ff46691d2af3ac50b6facbe815b280fb55376fb5467d2dc261e7f5fb" + sha256 arm64_sonoma: "2fe0ede4c906e97fa87fc931bb5a8c153664764d538848a8d49f98fb8ef77c9a" + sha256 sonoma: "f0bc9e781b5befdcff2a0cc2ee205871c191718e466d4a7175dc2a58ab6ce019" + sha256 arm64_linux: "9e95149876220da1200d660f02de6d4433ba3167e053ca6caef4f55abcaab299" + sha256 x86_64_linux: "2310a36ed49b6a3bc9a52a3d6ee5eb0ad37f39db597c9551446d7a3fa9a9d9ea" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libfido2" + depends_on "openssl@3" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "libedit" + + on_linux do + depends_on "libtirpc" => :build + end + + def install + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + args = %W[ + -DFORCE_INSOURCE_BUILD=1 + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DWITH_BOOST=boost + -DWITH_EDITLINE=system + -DWITH_FIDO=system + -DWITH_LIBEVENT=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_SSL=yes + -DWITH_UNIT_TESTS=OFF + -DWITHOUT_SERVER=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mysql --version") + end +end diff --git a/Formula/m/mysql-connector-c++.rb b/Formula/m/mysql-connector-c++.rb new file mode 100644 index 0000000000000..20951b6fb6c17 --- /dev/null +++ b/Formula/m/mysql-connector-c++.rb @@ -0,0 +1,62 @@ +class MysqlConnectorCxx < Formula + desc "MySQL database connector for C++ applications" + homepage "https://github.com/mysql/mysql-connector-cpp" + url "https://cdn.mysql.com/Downloads/Connector-C++/mysql-connector-c++-9.5.0-src.tar.gz" + sha256 "386006a7c2deeecfd4d198315a474a1981784f8310b40d5b442ed8dbf0412a11" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + url "https://dev.mysql.com/downloads/connector/cpp/?tpl=files&os=src" + regex(/href=.*?mysql-connector-c%2B%2B[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3a78bf07f08472b0892d3b03114998331eb07e392068a6ac9da322e85bb2e40d" + sha256 cellar: :any, arm64_sequoia: "4e341ecfaaf3c2961a109671e9c722ff04d71a5378190ec56e9592cbd75dfbe6" + sha256 cellar: :any, arm64_sonoma: "a892e2a9077670e75699f36d6b3e9733139addadd58576eb215865b4eed0fb4e" + sha256 cellar: :any, sonoma: "2cfc7fc6f303d0a3a7faf6f1dcb940f2f29493735d8ad6097ba23e60d8a94a53" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1192115c0ce239f289f0bbe1949fc6c8154537840afecf37292ea74534a5dde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f14ca0f1b8de286e833098df920db40f47a5fb9cda0c6e866d9f8500b38fc02b" + end + + depends_on "cmake" => :build + depends_on "rapidjson" => :build + depends_on "lz4" + depends_on "openssl@3" + depends_on "zlib" + depends_on "zstd" + + def install + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + args = %w[lz4 rapidjson zlib zstd].map do |libname| + rm_r(buildpath/"cdk/extra"/libname) + "-DWITH_#{libname.upcase}=system" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main(void) + try { + ::mysqlx::Session sess("mysqlx://root@127.0.0.1"); + return 1; + } + catch (const mysqlx::Error &err) + { + ::std::cout <<"ERROR: " << err << ::std::endl; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", + "-L#{lib}", "-lmysqlcppconnx", "-o", "test" + output = shell_output("./test") + assert_match "Connection refused", output + end +end diff --git a/Formula/m/mysql-search-replace.rb b/Formula/m/mysql-search-replace.rb new file mode 100644 index 0000000000000..556baeafe519a --- /dev/null +++ b/Formula/m/mysql-search-replace.rb @@ -0,0 +1,27 @@ +class MysqlSearchReplace < Formula + include Language::PHP::Shebang + + desc "Database search and replace script in PHP" + homepage "https://interconnectit.com/products/search-and-replace-for-wordpress-databases/" + url "https://github.com/interconnectit/Search-Replace-DB/archive/refs/tags/4.1.4.tar.gz" + sha256 "f753d8d70994abce3b5d72b5eac590cb2116b8b44d4fe01d4c3b41d57dd6c13d" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "83006f9192e3961c1251b9c11f255afe703ae3076598b2b148e211c18b6dba41" + end + + depends_on "php" + + def install + libexec.install "srdb.class.php" + libexec.install "srdb.cli.php" => "srdb" + rewrite_shebang detected_php_shebang, libexec/"srdb" if OS.linux? + bin.write_exec_script libexec/"srdb" + end + + test do + system bin/"srdb", "--help" + end +end diff --git a/Formula/m/mysql.rb b/Formula/m/mysql.rb new file mode 100644 index 0000000000000..73e8707a093d0 --- /dev/null +++ b/Formula/m/mysql.rb @@ -0,0 +1,269 @@ +class Mysql < Formula + desc "Open source relational database management system" + # FIXME: Actual homepage fails audit due to Homebrew's user-agent + # homepage "https://dev.mysql.com/doc/refman/9.3/en/" + homepage "https://github.com/mysql/mysql-server" + url "https://cdn.mysql.com/Downloads/MySQL-9.5/mysql-9.5.0.tar.gz" + mirror "https://repo.mysql.com/apt/ubuntu/pool/mysql-innovation/m/mysql-community/mysql-community_9.5.0.orig.tar.gz" + sha256 "ef3343981375865a2519f72b600e55f9c646e60e204a2964d3b7e8e748a110a5" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + url "https://dev.mysql.com/downloads/mysql/?tpl=files&os=src" + regex(/href=.*?mysql[._-](?:boost[._-])?v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 arm64_tahoe: "28633e1af0a49cf00fb433a5a7be122e8081c8fe6aed91ca72aaf8b8e53a7090" + sha256 arm64_sequoia: "052a327d5e59bf501c27e51206e1fca2e4f63761f210ddcba65487b6d02f3493" + sha256 arm64_sonoma: "7b6e7e7a5e9d7151db56d39e2e44d04afe5749a89716c6a5d058060e01af650e" + sha256 sonoma: "1cae485243f2f08593a0106b6d90eccfcf420c412d3ba35d9c6d4a9f48a3d04e" + sha256 arm64_linux: "6972ff8c3f98d1f54a08f848a3cd8327c406e5fa5292e86557778e7c15b18d05" + sha256 x86_64_linux: "fcbc4997ea72bbd0cc4ffbe604b91241191a9b11008174bae7200c07b9497cf9" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "icu4c@77" + depends_on "lz4" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "libedit" + + on_ventura :or_older do + depends_on "llvm" + fails_with :clang do + cause <<~EOS + std::string_view is not fully compatible with the libc++ shipped + with ventura, so we need to use the LLVM libc++ instead. + EOS + end + end + + on_linux do + depends_on "patchelf" => :build + depends_on "libtirpc" + end + + conflicts_with "mariadb", "percona-server", because: "both install the same binaries" + + fails_with :gcc do + version "9" + cause "Requires C++20" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + patch :DATA + + def datadir + var/"mysql" + end + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + keep = %w[boost duktape libbacktrace libcno lz4 rapidjson unordered_dense xxhash] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + + if OS.linux? + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" + elsif MacOS.version <= :ventura + ENV.llvm_clang + ENV.append "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/unwind -lunwind" + # When using Homebrew's superenv shims, we need to use HOMEBREW_LIBRARY_PATHS + # rather than LDFLAGS for libc++ in order to correctly link to LLVM's libc++. + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + # -DWITH_FIDO=system isn't set as feature isn't enabled and bundled copy was removed. + # Formula paths are set to avoid HOMEBREW_HOME logic in CMake scripts + args = %W[ + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=lib/plugin + -DMYSQL_DATADIR=#{datadir} + -DSYSCONFDIR=#{etc} + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_EDITLINE=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_UNIT_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd prefix/"mysql-test" do + system "./mysql-test-run.pl", "check", "--vardir=#{buildpath}/mysql-test-vardir" + ensure + status_log_file = buildpath/"mysql-test-vardir/log/main.status/status.log" + logs.install status_log_file if status_log_file.exist? + end + + # Remove the tests directory + rm_r(prefix/"mysql-test") + + # Fix up the control script and link into bin. + inreplace prefix/"support-files/mysql.server", + /^(PATH=".*)(")/, + "\\1:#{HOMEBREW_PREFIX}/bin\\2" + bin.install_symlink prefix/"support-files/mysql.server" + + # Install my.cnf that binds to 127.0.0.1 by default + (buildpath/"my.cnf").write <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + bind-address = 127.0.0.1 + mysqlx-bind-address = 127.0.0.1 + INI + etc.install "my.cnf" + end + + def post_install + # Make sure the var/mysql directory exists + (var/"mysql").mkpath + + if (my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x }) + opoo <<~EOS + A "#{my_cnf}" from another install may interfere with a Homebrew-built + server starting up correctly. + EOS + end + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + unless (datadir/"mysql/general_log.CSM").exist? + ENV["TMPDIR"] = nil + system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" + end + end + + def caveats + <<~EOS + Upgrading from MySQL <8.4 to MySQL >9.0 requires running MySQL 8.4 first: + - brew services stop mysql + - brew install mysql@8.4 + - brew services start mysql@8.4 + - brew services stop mysql@8.4 + - brew services start mysql + + We've installed your MySQL database without a root password. To secure it run: + mysql_secure_installation + + MySQL is configured to only allow connections from localhost by default + + To connect run: + mysql -u root + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var/"mysql" + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + port = free_port + socket = testpath/"mysql.sock" + mysqld_args = %W[ + --no-defaults + --mysqlx=OFF + --user=#{ENV["USER"]} + --port=#{port} + --socket=#{socket} + --basedir=#{prefix} + --datadir=#{testpath}/mysql + --tmpdir=#{testpath}/tmp + ] + client_args = %W[ + --port=#{port} + --socket=#{socket} + --user=root + --password= + ] + + system bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/mysql #{client_args.join(" ")} --execute='show databases;'") + assert_match "information_schema", output + ensure + system bin/"mysqladmin", *client_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 438dff720c5..47863c17e23 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1948,31 +1948,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_WEBAUTHN OR + WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND diff --git a/Formula/m/mysql@8.0.rb b/Formula/m/mysql@8.0.rb new file mode 100644 index 0000000000000..ed66a93266015 --- /dev/null +++ b/Formula/m/mysql@8.0.rb @@ -0,0 +1,242 @@ +class MysqlAT80 < Formula + desc "Open source relational database management system" + # FIXME: Actual homepage fails audit due to Homebrew's user-agent + # homepage "https://dev.mysql.com/doc/refman/8.0/en/" + homepage "https://github.com/mysql/mysql-server" + url "https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.44.tar.gz" + sha256 "a8cc09a35af63668c5235cf282aef789428c6f30c1d9a581b337c816ce8ce8bb" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + url "https://dev.mysql.com/downloads/mysql/8.0.html?tpl=files&os=src&version=8.0" + regex(/href=.*?mysql[._-](?:boost[._-])?v?(8\.0(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 arm64_tahoe: "ad0f9cd6e08b0a3aa0b065bcb884c79bf719dac2af630e481ce857a319353cb8" + sha256 arm64_sequoia: "95a5854e9adf6eabd2beadf0190a3ae5277400efb58899bb2a6f619267c06adb" + sha256 arm64_sonoma: "0e840edfb0ec6b9bde50d1d1c966cfd67b67125dbc38c5788ddfc557bebd88de" + sha256 sonoma: "e661c81f83cdc9d754e4d1f523c3241391e5d975ec9127fb3f9f79d8a140898a" + sha256 arm64_linux: "b45f6b5933a04ac467888f67e8749e65fe3c71d6a295db5b1be40979a6f97c90" + sha256 x86_64_linux: "d430f04bbf8cfb06480b27aa085342398554906f5412328de2af5e38c1dabb09" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "icu4c@77" + depends_on "libevent" + depends_on "libfido2" + depends_on "lz4" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "libedit" + + on_linux do + depends_on "patchelf" => :build + depends_on "libtirpc" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + patch :DATA + + def datadir + var/"mysql" + end + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + keep = %w[libbacktrace lz4 rapidjson unordered_dense xxhash] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" if OS.linux? + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + args = %W[ + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=lib/plugin + -DMYSQL_DATADIR=#{datadir} + -DSYSCONFDIR=#{etc} + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_BOOST=boost + -DWITH_EDITLINE=system + -DWITH_FIDO=system + -DWITH_LIBEVENT=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_UNIT_TESTS=OFF + -DWITH_INNODB_MEMCACHED=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd prefix/"mysql-test" do + system "./mysql-test-run.pl", "check", "--vardir=#{buildpath}/mysql-test-vardir" + ensure + status_log_file = buildpath/"mysql-test-vardir/log/main.status/status.log" + logs.install status_log_file if status_log_file.exist? + end + + # Remove the tests directory + rm_r(prefix/"mysql-test") + + # Fix up the control script and link into bin. + inreplace prefix/"support-files/mysql.server", + /^(PATH=".*)(")/, + "\\1:#{HOMEBREW_PREFIX}/bin\\2" + bin.install_symlink prefix/"support-files/mysql.server" + + # Install my.cnf that binds to 127.0.0.1 by default + (buildpath/"my.cnf").write <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + bind-address = 127.0.0.1 + mysqlx-bind-address = 127.0.0.1 + INI + etc.install "my.cnf" + end + + def post_install + # Make sure the var/mysql directory exists + (var/"mysql").mkpath + + if (my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x }) + opoo <<~EOS + A "#{my_cnf}" from another install may interfere with a Homebrew-built + server starting up correctly. + EOS + end + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + unless (datadir/"mysql/general_log.CSM").exist? + ENV["TMPDIR"] = nil + system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" + end + end + + def caveats + <<~EOS + We've installed your MySQL database without a root password. To secure it run: + mysql_secure_installation + + MySQL is configured to only allow connections from localhost by default + + To connect run: + mysql -u root + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var/"mysql" + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + port = free_port + socket = testpath/"mysql.sock" + mysqld_args = %W[ + --no-defaults + --mysqlx=OFF + --user=#{ENV["USER"]} + --port=#{port} + --socket=#{socket} + --basedir=#{prefix} + --datadir=#{testpath}/mysql + --tmpdir=#{testpath}/tmp + ] + client_args = %W[ + --port=#{port} + --socket=#{socket} + --user=root + --password= + ] + + system bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/mysql #{client_args.join(" ")} --execute='show databases;'") + assert_match "information_schema", output + ensure + system bin/"mysqladmin", *client_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42e63d0..5d21cc3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1942,31 +1942,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND + NOT WITH_SSL STREQUAL "system") diff --git a/Formula/m/mysql@8.4.rb b/Formula/m/mysql@8.4.rb new file mode 100644 index 0000000000000..2e150d842e15f --- /dev/null +++ b/Formula/m/mysql@8.4.rb @@ -0,0 +1,261 @@ +class MysqlAT84 < Formula + desc "Open source relational database management system" + # FIXME: Actual homepage fails audit due to Homebrew's user-agent + # homepage "https://dev.mysql.com/doc/refman/8.4/en/" + homepage "https://github.com/mysql/mysql-server" + url "https://cdn.mysql.com/Downloads/MySQL-8.4/mysql-8.4.7.tar.gz" + sha256 "c0bf33a94cdb908f149aea0797affb1b139262ccf0e0b9787a17246207542e69" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + url "https://dev.mysql.com/downloads/mysql/8.4.html?tpl=files&os=src&version=8.4" + regex(/href=.*?mysql[._-](?:boost[._-])?v?(8\.4(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 arm64_tahoe: "68abd852fe50b556560eac004099296b33d425f7228fa4c3b62f994faf81be0a" + sha256 arm64_sequoia: "2a4e70151556bf785715e2f6299fea87a817c8b2aa4154393ce2784b7b617c3d" + sha256 arm64_sonoma: "dc42caf5272ee770c8c86e92e2fedda502a1d92c252fce414000c13abc945d4e" + sha256 sonoma: "fe99161d7c0ee4476210e032eceb2d7f9dfa6caf4b61d515a28e63b5fa98e34a" + sha256 arm64_linux: "f7938f838edc06150908f921a09a7e2e64e49353fffae47895674aa8c1a98a5c" + sha256 x86_64_linux: "51d4c85f0a258184a964943d8ba552e64d8522dca6aa407bc07b8311f2d76286" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "icu4c@77" + depends_on "lz4" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "libedit" + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1400 + end + + on_linux do + depends_on "patchelf" => :build + depends_on "libtirpc" + end + + fails_with :clang do + build 1400 + cause "Requires C++20" + end + + fails_with :gcc do + version "9" + cause "Requires C++20" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + patch :DATA + + def datadir + var/"mysql" + end + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + keep = %w[boost libbacktrace libcno lz4 rapidjson unordered_dense xxhash] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + + if OS.linux? + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" + elsif DevelopmentTools.clang_build_version <= 1400 + ENV.llvm_clang + # Work around failure mixing newer `llvm` headers with older Xcode's libc++: + # Undefined symbols for architecture arm64: + # "std::exception_ptr::__from_native_exception_pointer(void*)", referenced from: + # std::exception_ptr std::make_exception_ptr[abi:ne180100](std::runtime_error) ... + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + # -DWITH_FIDO=system isn't set as feature isn't enabled and bundled copy was removed. + # Formula paths are set to avoid HOMEBREW_HOME logic in CMake scripts + args = %W[ + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=lib/plugin + -DMYSQL_DATADIR=#{datadir} + -DSYSCONFDIR=#{etc} + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_EDITLINE=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_UNIT_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd prefix/"mysql-test" do + system "./mysql-test-run.pl", "check", "--vardir=#{buildpath}/mysql-test-vardir" + ensure + status_log_file = buildpath/"mysql-test-vardir/log/main.status/status.log" + logs.install status_log_file if status_log_file.exist? + end + + # Remove the tests directory + rm_r(prefix/"mysql-test") + + # Fix up the control script and link into bin. + inreplace prefix/"support-files/mysql.server", + /^(PATH=".*)(")/, + "\\1:#{HOMEBREW_PREFIX}/bin\\2" + bin.install_symlink prefix/"support-files/mysql.server" + + # Install my.cnf that binds to 127.0.0.1 by default + (buildpath/"my.cnf").write <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + bind-address = 127.0.0.1 + mysqlx-bind-address = 127.0.0.1 + INI + etc.install "my.cnf" + end + + def post_install + # Make sure the var/mysql directory exists + (var/"mysql").mkpath + + if (my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x }) + opoo <<~EOS + A "#{my_cnf}" from another install may interfere with a Homebrew-built + server starting up correctly. + EOS + end + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + unless (datadir/"mysql/general_log.CSM").exist? + ENV["TMPDIR"] = nil + system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" + end + end + + def caveats + <<~EOS + We've installed your MySQL database without a root password. To secure it run: + mysql_secure_installation + + MySQL is configured to only allow connections from localhost by default + + To connect run: + mysql -u root + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var/"mysql" + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + port = free_port + socket = testpath/"mysql.sock" + mysqld_args = %W[ + --no-defaults + --mysqlx=OFF + --user=#{ENV["USER"]} + --port=#{port} + --socket=#{socket} + --basedir=#{prefix} + --datadir=#{testpath}/mysql + --tmpdir=#{testpath}/tmp + ] + client_args = %W[ + --port=#{port} + --socket=#{socket} + --user=root + --password= + ] + + system bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/mysql #{client_args.join(" ")} --execute='show databases;'") + assert_match "information_schema", output + ensure + system bin/"mysqladmin", *client_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 438dff720c5..47863c17e23 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1948,31 +1948,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_WEBAUTHN OR + WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND diff --git a/Formula/m/mysqltuner.rb b/Formula/m/mysqltuner.rb new file mode 100644 index 0000000000000..34609b74bda9c --- /dev/null +++ b/Formula/m/mysqltuner.rb @@ -0,0 +1,23 @@ +class Mysqltuner < Formula + desc "Increase performance and stability of a MySQL installation" + homepage "https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl" + url "https://github.com/major/MySQLTuner-perl/archive/refs/tags/v2.7.0.tar.gz" + sha256 "dcd789c25f450ab128c050525705396f183a57b117eabdba470653f2ab9dd53e" + license "GPL-3.0-or-later" + head "https://github.com/major/MySQLTuner-perl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4ea0ce49f647faa0f8f21867bc67604c4e3e38b3eb2a332c1958695de925d330" + end + + def install + bin.install "mysqltuner.pl" => "mysqltuner" + end + + # mysqltuner analyzes your database configuration by connecting to a + # mysql server. It is not really feasible to spawn a mysql server + # just for a test case so we'll stick with a rudimentary test. + test do + system bin/"mysqltuner", "--help" + end +end diff --git a/Formula/m2c.rb b/Formula/m2c.rb deleted file mode 100644 index 13c292b84f09c..0000000000000 --- a/Formula/m2c.rb +++ /dev/null @@ -1,53 +0,0 @@ -class M2c < Formula - desc "Modula-2 to C compiler" - homepage "https://savannah.nongnu.org/projects/m2c/" - url "https://download.savannah.gnu.org/releases/m2c/0.7/m2c-0.7.tar.gz" - sha256 "b725ed617f376e1a321e059bf1985098e950965d5edab161c6b24526f10a59bc" - head "https://git.savannah.nongnu.org/git/m2c.git" - - bottle do - sha256 "aa393a46d4182ad747153a3f7dbd4f8188b35f9677e0fce322ac6d0c5c86fa21" => :mojave - sha256 "86e4297b644fed6095a29cd67885e8c72d3abfcc259e3d19f2692e01b39f44a0" => :high_sierra - sha256 "e98a99fb06c6b72bd0cf11d8369df21e1e9e57253e0a9d63ae8641444079df93" => :sierra - sha256 "4aa6ac4f5fd855f4f84d5577ff6f79495fda9edc2ce5335c64bd96a881975eb0" => :el_capitan - sha256 "67659bd6a5fe922c1b34d5068a5cecbfee1f804e5ff432e32c8682a04029ccac" => :yosemite - sha256 "7bf62153eeb0976851785db04e1319f745709294aa9d0bc99e47ffee3eba1315" => :mavericks - sha256 "6db02ad1e1a355edfd1770d29952812baac666d6d2a7d3a599357f796eb7d891" => :mountain_lion - end - - # Hacks purely for this 0.7 release. Git head already fixes installation glitches. - # Will remove hacks on release of next version. - def install - # The config for "gcc" works for clang also. - cp "config/generic-gcc.h", "config/generic-clang.h" - system "./configure", "+cc=#{ENV.cc}" - - # Makefile is buggy! - inreplace "Makefile", "install: all uninstall", "install: all" - inreplace "Makefile", "mkdir", "mkdir -p" - include.mkpath - - system "make", "install", "prefix=#{prefix}", "man1dir=#{man1}" - end - - test do - hello_mod = "Hello.mod" - hello_exe = testpath/"Hello" - - (testpath/hello_mod).write <<~EOS - MODULE Hello; - - FROM InOut IMPORT - WriteLn, WriteString; - - BEGIN - WriteString ("Hello world!"); - WriteLn; - END Hello. - EOS - - system "#{bin}/m2c", "-make", hello_mod, "-o", hello_exe - - assert_equal "Hello world!\n", shell_output(hello_exe) - end -end diff --git a/Formula/m4.rb b/Formula/m4.rb deleted file mode 100644 index 33a0c2360dbf5..0000000000000 --- a/Formula/m4.rb +++ /dev/null @@ -1,38 +0,0 @@ -class M4 < Formula - desc "Macro processing language" - homepage "https://www.gnu.org/software/m4" - url "https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz" - mirror "https://ftpmirror.gnu.org/m4/m4-1.4.18.tar.xz" - sha256 "f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07" - - bottle do - cellar :any_skip_relocation - sha256 "a131363a4ea9a121e2e836ceabb216ba400632ae93b15ee09bd2d033de1dc5c9" => :mojave - sha256 "066b43f14d9422bee66df1a6f62778e805a0308a36243d99e2d584e08a579dd8" => :high_sierra - sha256 "b0fe54c5705842618e6446c4c804330df89a78ed09bd5b013b2c5fabf34b218f" => :sierra - sha256 "7daa296cf49de573214b4f2c72e3b621bbbc1ef5bfebfbe00fb18a70ba8e3152" => :el_capitan - sha256 "00d9327f2e8a59996228569bf4faff1c6550653eb3e20353e77f73a34063f3eb" => :yosemite - end - - keg_only :provided_by_macos - - # Fix crash from usage of %n in dynamic format strings on High Sierra - # Patch credit to Jeremy Huddleston Sequoia - if MacOS.version >= :high_sierra - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/edf0ee1e2cf/devel/m4/files/secure_snprintf.patch" - sha256 "57f972940a10d448efbd3d5ba46e65979ae4eea93681a85e1d998060b356e0d2" - end - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match "Homebrew", - pipe_output("#{bin}/m4", "define(TEST, Homebrew)\nTEST\n") - end -end diff --git a/Formula/mac-robber.rb b/Formula/mac-robber.rb deleted file mode 100644 index 3dafd93a30121..0000000000000 --- a/Formula/mac-robber.rb +++ /dev/null @@ -1,21 +0,0 @@ -class MacRobber < Formula - desc "Digital investigation tool" - homepage "https://www.sleuthkit.org/mac-robber/" - url "https://downloads.sourceforge.net/project/mac-robber/mac-robber/1.02/mac-robber-1.02.tar.gz" - sha256 "5895d332ec8d87e15f21441c61545b7f68830a2ee2c967d381773bd08504806d" - - bottle do - cellar :any_skip_relocation - sha256 "e1fc7f112efeac70ca2583db78ad6436d5f6615a9959889f3e4c695aa72a27e8" => :mojave - sha256 "20c99447899b82d2da937aa81a0b3afd2c865f67a97d2ca1183e01151fef9de0" => :high_sierra - sha256 "160983c4988cb22bd68a0beeb48de91a8af3461722a42e65e523c4a6af08f444" => :sierra - sha256 "0647670a38eb3ae5d8085ad1126f8d70b6e9ac99b086c0ec2f3301ac51ecdb3f" => :el_capitan - sha256 "5e8b7656cafbab151ed82702cbd7e712ee30af62b6a6c031f9f440e95c174ed0" => :yosemite - sha256 "87b8de3e43626713461398aac48d12a4b494c36b8da6cd4e6587d352fcb251fe" => :mavericks - end - - def install - system "make", "CC=#{ENV.cc}", "GCC_OPT=#{ENV.cflags}" - bin.install "mac-robber" - end -end diff --git a/Formula/mackup.rb b/Formula/mackup.rb deleted file mode 100644 index 55cc7d47bb4fb..0000000000000 --- a/Formula/mackup.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Mackup < Formula - include Language::Python::Virtualenv - - desc "Keep your Mac's application settings in sync" - homepage "https://github.com/lra/mackup" - url "https://github.com/lra/mackup/archive/0.8.21.tar.gz" - sha256 "adc68e53513c50888580b82f435761db93af901e7022c650d4467c2438e67db1" - head "https://github.com/lra/mackup.git" - - bottle do - cellar :any_skip_relocation - sha256 "2050deb73ca666b5edcd7f4da3f3937cdfa88a74418ee03cdaf901b52b0e4e9e" => :mojave - sha256 "384abe552cbc46a1728f7c6ae5e5c6a0d7cf65ece4b38d3f8f2dc43cbd5d6df9" => :high_sierra - sha256 "8c97af873565669874cdfc9ad461af8d5d54679e09390b2bb9b323d5998098a4" => :sierra - end - - depends_on "python" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/mackup", "--help" - end -end diff --git a/Formula/macosvpn.rb b/Formula/macosvpn.rb deleted file mode 100644 index 45521c3e4c2b1..0000000000000 --- a/Formula/macosvpn.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Macosvpn < Formula - desc "Create Mac OS VPNs programmatically" - homepage "https://github.com/halo/macosvpn" - url "https://github.com/halo/macosvpn/archive/0.3.5.tar.gz" - sha256 "a1ab4276d22d42430ae8696420a9e0641609bad442036e4e2403d722a1d919a4" - - bottle do - cellar :any_skip_relocation - sha256 "f3265e0c3da8a09a691f6cff3b8408184c7423ed49d90a7b2b2290b3b3674d99" => :mojave - sha256 "478bec17d2000763fde198848b85478aa8ece4414499a1cfc2dd8925071f15e9" => :high_sierra - sha256 "fd31b7b30a4867a7693a35ce96a6d74034e160f8b7cae1bc37e8ca5083552a04" => :sierra - sha256 "4cf716851d7a1fda3ed5387504d01d8832b53f54fd7b683267af29fc5d18f7a1" => :el_capitan - end - - depends_on :xcode => ["7.3", :build] - - def install - xcodebuild "SYMROOT=build" - bin.install "build/Release/macosvpn" - end - - test do - assert_match version.to_s, shell_output("#{bin}/macosvpn version", 10) - end -end diff --git a/Formula/macvim.rb b/Formula/macvim.rb deleted file mode 100644 index e478cfa05a180..0000000000000 --- a/Formula/macvim.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Reference: https://github.com/macvim-dev/macvim/wiki/building -class Macvim < Formula - desc "GUI for vim, made for macOS" - homepage "https://github.com/macvim-dev/macvim" - url "https://github.com/macvim-dev/macvim/archive/snapshot-153.tar.gz" - version "8.1-153" - sha256 "c8c18209d5dbfeaeeb69bd15723840a54507ba181a5fb790093fdfaed04846eb" - head "https://github.com/macvim-dev/macvim.git" - - bottle do - cellar :any - sha256 "c2872f6c8bdbdf22c2ba0bf1258b6afa2193ba91db2b0f4fa4f9bae003e0c5a3" => :mojave - sha256 "6f02b5bba24fc00329511b6865e0e869c4dd02091d1531475f12ed08858dd093" => :high_sierra - sha256 "a5b06c8ae8b671aaf476be78f30053c998794b437979cea5e0a6af0816834434" => :sierra - end - - depends_on :xcode => :build - depends_on "cscope" - depends_on "lua" - depends_on "python" - - conflicts_with "vim", - :because => "vim and macvim both install vi* binaries" - - def install - # Avoid issues finding Ruby headers - if MacOS.version == :sierra || MacOS.version == :yosemite - ENV.delete("SDKROOT") - end - - # MacVim doesn't have or require any Python package, so unset PYTHONPATH - ENV.delete("PYTHONPATH") - - # If building for OS X 10.7 or up, make sure that CC is set to "clang" - ENV.clang if MacOS.version >= :lion - - system "./configure", "--with-features=huge", - "--enable-multibyte", - "--with-macarchs=#{MacOS.preferred_arch}", - "--enable-perlinterp", - "--enable-rubyinterp", - "--enable-tclinterp", - "--enable-terminal", - "--with-tlib=ncurses", - "--with-compiledby=Homebrew", - "--with-local-dir=#{HOMEBREW_PREFIX}", - "--enable-cscope", - "--enable-luainterp", - "--with-lua-prefix=#{Formula["lua"].opt_prefix}", - "--enable-luainterp", - "--enable-python3interp" - system "make" - - prefix.install "src/MacVim/build/Release/MacVim.app" - bin.install_symlink prefix/"MacVim.app/Contents/bin/mvim" - - # Create MacVim vimdiff, view, ex equivalents - executables = %w[mvimdiff mview mvimex gvim gvimdiff gview gvimex] - executables += %w[vi vim vimdiff view vimex] - executables.each { |e| bin.install_symlink "mvim" => e } - end - - test do - output = shell_output("#{bin}/mvim --version") - assert_match "+ruby", output - - # Simple test to check if MacVim was linked to Homebrew's Python 3 - py3_exec_prefix = Utils.popen_read("python3-config", "--exec-prefix") - assert_match py3_exec_prefix.chomp, output - (testpath/"commands.vim").write <<~EOS - :python3 import vim; vim.current.buffer[0] = 'hello python3' - :wq - EOS - system bin/"mvim", "-v", "-T", "dumb", "-s", "commands.vim", "test.txt" - assert_equal "hello python3", (testpath/"test.txt").read.chomp - end -end diff --git a/Formula/mad.rb b/Formula/mad.rb deleted file mode 100644 index 21eb163a767c9..0000000000000 --- a/Formula/mad.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Mad < Formula - desc "MPEG audio decoder" - homepage "https://www.underbit.com/products/mad/" - url "https://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz" - sha256 "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690" - - bottle do - cellar :any - rebuild 1 - sha256 "8e94986575bc44817f6db6f5c9c777c457c3cadc3124ba57481a0fe9f2da490c" => :mojave - sha256 "a053f1e30d1d04f8c1f472d9b0b243d9572c3e7ff2c3e46a665564021bf37432" => :high_sierra - sha256 "1b48168bf5df9fc66703afc68ad3574b9ceb723fbcbf0f1e84c3c1c18fe6ff92" => :sierra - sha256 "a8a162813aad00169410a8f14a39927028969c914929fafb0685f0eb80075546" => :el_capitan - sha256 "863c71f31ecda8f97effc4dd148564e03219f8ddd162c89e054a7e57623c18c6" => :yosemite - sha256 "7bd46d4da0f695b3a5bcc899b7139f14d11741f2e47d34f21a984f9bab953c81" => :mavericks - sha256 "11391349b4ee378f31ae681ff5c96f7c8d1b5f2a6ad5ba6b28d12bc102cc9d6b" => :mountain_lion - end - - def install - system "./configure", "--disable-debugging", "--enable-fpm=64bit", "--prefix=#{prefix}" - system "make", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}", "install" - (lib+"pkgconfig/mad.pc").write pc_file - end - - def pc_file; <<~EOS - prefix=#{opt_prefix} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include - - Name: mad - Description: MPEG Audio Decoder - Version: #{version} - Requires: - Conflicts: - Libs: -L${libdir} -lmad -lm - Cflags: -I${includedir} - EOS - end -end diff --git a/Formula/madplay.rb b/Formula/madplay.rb deleted file mode 100644 index ced6477504203..0000000000000 --- a/Formula/madplay.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Madplay < Formula - desc "MPEG Audio Decoder" - homepage "https://www.underbit.com/products/mad/" - url "https://downloads.sourceforge.net/project/mad/madplay/0.15.2b/madplay-0.15.2b.tar.gz" - sha256 "5a79c7516ff7560dffc6a14399a389432bc619c905b13d3b73da22fa65acede0" - - bottle do - sha256 "04339d670f10b87819965e4bae0e5700840e97e1052313cc62dd5ae6d7e194ce" => :mojave - sha256 "7ff11d9521cb9507f669753e8c862efa44f5673cc009578202c1ec7dcba379d1" => :high_sierra - sha256 "a4a1b057547c65f8d793e874632e98ee10bfdae234ff011d16d99593c3fa7853" => :sierra - sha256 "81dbc8781c5da50f7188a4031ed5d500b07c51a7589da6799c6bf3477bb90bf6" => :el_capitan - sha256 "4ab0b6303cafe408494e85c38b80a3c44964953995c024d2b65a019bc5608c05" => :yosemite - sha256 "2b1967955d83ca172724b119e837457aec0eeaa7ded354c810f3635dafbec057" => :mavericks - end - - depends_on "libid3tag" - depends_on "mad" - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/f6c5992c/madplay/patch-audio_carbon.c" - sha256 "380e1a5ee3357fef46baa9ba442705433e044ae9e37eece52c5146f56da75647" - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --build=#{Hardware::CPU.arch_64_bit} - ] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/madplay", "--version" - end -end diff --git a/Formula/mafft.rb b/Formula/mafft.rb deleted file mode 100644 index dfc13c5046070..0000000000000 --- a/Formula/mafft.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mafft < Formula - desc "Multiple alignments with fast Fourier transforms" - homepage "https://mafft.cbrc.jp/alignment/software/" - url "https://mafft.cbrc.jp/alignment/software/mafft-7.407-with-extensions-src.tgz" - sha256 "1840b51a0b93f40b4d6076af996ee46396428d8dbaf7ba1d847abff9cb1463e5" - - bottle do - cellar :any_skip_relocation - sha256 "60555a1114a810872d411452cc09a5614b9a59a228781a9b502f18b56d0047de" => :mojave - sha256 "b9d448733821c30381607630d773547758b378697760b448cd177d3d19e7e9e2" => :high_sierra - sha256 "29fcbb6f12a136d0638c00726813706491f6822f6f6bf1f73bd178198cbd7558" => :sierra - sha256 "8a3bcbc305bf8d1c5aebe9e98e972c1050cbf10cc39669e0b33098045eab3557" => :el_capitan - end - - depends_on :macos => :lion - - def install - make_args = %W[CC=#{ENV.cc} CXX=#{ENV.cxx} PREFIX=#{prefix} install] - system "make", "-C", "core", *make_args - system "make", "-C", "extensions", *make_args - end - - test do - (testpath/"test.fa").write ">1\nA\n>2\nA" - output = shell_output("#{bin}/mafft test.fa") - assert_match ">1\na\n>2\na", output - end -end diff --git a/Formula/magic-wormhole.rb b/Formula/magic-wormhole.rb deleted file mode 100644 index 2c42e3c89642e..0000000000000 --- a/Formula/magic-wormhole.rb +++ /dev/null @@ -1,176 +0,0 @@ -class MagicWormhole < Formula - include Language::Python::Virtualenv - - desc "Securely transfers data between computers" - homepage "https://github.com/warner/magic-wormhole" - url "https://files.pythonhosted.org/packages/a2/1e/1566408c0cae5c565297f7d087404d7fc18d950f1fc12f34862c47d60698/magic-wormhole-0.11.0.tar.gz" - sha256 "6fe82f2616b7fe021c969ff6d2c4b0e7fba776ffeb0ae4749b721d66412a331f" - - bottle do - cellar :any - sha256 "439d217c00553c9825971f0c8fd8267945fc07c64aa1321e269fa5a8e5567746" => :mojave - sha256 "aeb3994f2ccc5bda0224eb675189299c6cec52627621e0f9ebf8cdfdfe85235a" => :high_sierra - sha256 "4e935a5e295f44b73a5fd9ef261923a4643642760bfa6d0b83c7dca84a07aef7" => :sierra - end - - depends_on "libsodium" - depends_on "openssl" - depends_on "python" - - resource "Automat" do - url "https://files.pythonhosted.org/packages/4a/4f/64db3ffda8828cb0541fe949354615f39d02f596b4c33fb74863756fc565/Automat-0.7.0.tar.gz" - sha256 "cbd78b83fa2d81fe2a4d23d258e1661dd7493c9a50ee2f1a5b2cac61c1793b0e" - end - - resource "PyHamcrest" do - url "https://files.pythonhosted.org/packages/a4/89/a469aad9256aedfbb47a29ec2b2eeb855d9f24a7a4c2ff28bd8d1042ef02/PyHamcrest-1.9.0.tar.gz" - sha256 "8ffaa0a53da57e89de14ced7185ac746227a8894dbd5a3c718bf05ddbd1d56cd" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - end - - resource "Twisted" do - url "https://files.pythonhosted.org/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2" - sha256 "294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/0f/9e/26b1d194aab960063b266170e53c39f73ea0d0d3f5ce23313e0ec8ee9bdf/attrs-18.2.0.tar.gz" - sha256 "10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69" - end - - resource "autobahn" do - url "https://files.pythonhosted.org/packages/68/f8/43ef6e614f27a97a88a6e91768d3917adff630936ec71665fcc3bec48e53/autobahn-18.9.2.tar.gz" - sha256 "d98b924f06865700116ee616027e4a6d678004a7b44e0d01cb262eab333112d6" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - end - - resource "constantly" do - url "https://files.pythonhosted.org/packages/95/f1/207a0a478c4bb34b1b49d5915e2db574cadc415c9ac3a7ef17e29b2e8951/constantly-15.1.0.tar.gz" - sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "hkdf" do - url "https://files.pythonhosted.org/packages/c3/be/327e072850db181ce56afd51e26ec7aa5659b18466c709fa5ea2548c935f/hkdf-0.0.3.tar.gz" - sha256 "622a31c634bc185581530a4b44ffb731ed208acf4614f9c795bdd70e77991dca" - end - - resource "humanize" do - url "https://files.pythonhosted.org/packages/8c/e0/e512e4ac6d091fc990bbe13f9e0378f34cf6eecd1c6c268c9e598dcf5bb9/humanize-0.5.1.tar.gz" - sha256 "a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19" - end - - resource "hyperlink" do - url "https://files.pythonhosted.org/packages/41/e1/0abd4b480ec04892b1db714560f8c855d43df81895c98506442babf3652f/hyperlink-18.0.0.tar.gz" - sha256 "f01b4ff744f14bc5d0a22a6b9f1525ab7d6312cb0ff967f59414bbac52f0a306" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "incremental" do - url "https://files.pythonhosted.org/packages/8f/26/02c4016aa95f45479eea37c90c34f8fab6775732ae62587a874b619ca097/incremental-17.5.0.tar.gz" - sha256 "7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/10/46/059775dc8e50f722d205452bced4b3cc965d27e8c3389156acd3b1123ae3/pyasn1-0.4.4.tar.gz" - sha256 "f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137" - end - - resource "pyasn1-modules" do - url "https://files.pythonhosted.org/packages/37/33/74ebdc52be534e683dc91faf263931bc00ae05c6073909fde53999088541/pyasn1-modules-0.2.2.tar.gz" - sha256 "a0cf3e1842e7c60fde97cb22d275eb6f9524f5c5250489e292529de841417547" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "service_identity" do - url "https://files.pythonhosted.org/packages/de/2a/cab6e30be82c8fcd2339ef618036720eda954cf05daef514e386661c9221/service_identity-17.0.0.tar.gz" - sha256 "4001fbb3da19e0df22c47a06d29681a398473af4aa9d745eca525b3b2c2302ab" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "spake2" do - url "https://files.pythonhosted.org/packages/60/0b/bb5eca8e18c38a10b1c207bbe6103df091e5cf7b3e5fdc0efbcad7b85b60/spake2-0.8.tar.gz" - sha256 "c17a614b29ee4126206e22181f70a406c618d3c6c62ca6d6779bce95e9c926f4" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/11/2e/f1ce746f1e8eddee065b0ab55bb57f00c493c9d626b6d0396e0093db9a2e/tqdm-4.27.0.tar.gz" - sha256 "a0be569511161220ff709a5b60d0890d47921f746f1c737a11d965e1b29e7b2e" - end - - resource "txaio" do - url "https://files.pythonhosted.org/packages/c1/99/81de004578e9afe017bb1d4c8968088a33621c05449fe330bdd7016d5377/txaio-18.8.1.tar.gz" - sha256 "67e360ac73b12c52058219bb5f8b3ed4105d2636707a36a7cdafb56fe06db7fe" - end - - resource "txtorcon" do - url "https://files.pythonhosted.org/packages/a2/71/2fe0c7d9350ff95cd22128f375dbf2b49438ca1a5d8ca0795311a964586b/txtorcon-18.3.0.tar.gz" - sha256 "5601956b3a2452526cd1ea31662696a51ddbf8ed6452633ee464fc1ff275f8b0" - end - - resource "zope.interface" do - url "https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz" - sha256 "57c38470d9f57e37afb460c399eb254e7193ac7fb8042bd09bdc001981a9c74c" - end - - def install - ENV["SODIUM_INSTALL"] = "system" - venv = virtualenv_create(libexec, "python3") - venv.pip_install resource("cffi") - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - n = rand(1e6) - pid = fork do - exec bin/"wormhole", "send", "--code=#{n}-homebrew-test", "--text=foo" - end - sleep 1 - begin - received = shell_output("#{bin}/wormhole receive #{n}-homebrew-test") - assert_match received, "foo\n" - ensure - Process.wait(pid) - end - end -end diff --git a/Formula/magnetix.rb b/Formula/magnetix.rb deleted file mode 100644 index 73281cbf8d3a4..0000000000000 --- a/Formula/magnetix.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Magnetix < Formula - desc "Interpreter for Magnetic Scrolls adventures" - homepage "http://www.maczentrisch.de/magnetiX/" - url "http://www.maczentrisch.de/magnetiX/downloads/magnetiX_src.zip" - version "3.1" - sha256 "9862c95659c4db0c5cbe604163aefb503e48462c5769692010d8851d7b31c2fb" - - bottle do - cellar :any_skip_relocation - sha256 "358e8ee8c5ea8ab2268220dd1b9f529f2f6f5a5f47af3f992df2874a61fa1399" => :mojave - sha256 "7ecfb0a04399be3be1e38f8f623337051c8c03766d3b3a94772cca8e51284463" => :high_sierra - sha256 "92a54f8752b83ef2e179acc52aac4b79855fcf5e365586cc1cdd5e6e95ce6ac9" => :sierra - sha256 "b3a243cbb1f7c97d92ea1cb82db31f5c2cdc9c2d43e0221e55f1ef6819d1af33" => :el_capitan - sha256 "ed629c950ac52c6efee73a2e77e7004e0e33a85fe920d793a2e8621a484d7cdc" => :yosemite - end - - depends_on :xcode => :build - depends_on :macos => :lion - - # Port audio code from QTKit to AVFoundation - # Required since 10.12 SDK no longer includes QTKit. - # Submitted by email to the developer. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/4fe0b7b6c43f75738782e047606c07446db07c4f/magnetix/avfoundation.patch" - sha256 "16caedaebcc05f03893bf0564b9c3212d1c919aebfdf1ee21126a39f8db5f441" - end - - def install - cd "magnetiX_src" do - xcodebuild "SYMROOT=build" - prefix.install "build/Default/magnetiX.app" - bin.write_exec_script "#{prefix}/magnetiX.app/Contents/MacOS/magnetiX" - end - end - - def caveats; <<~EOS - Install games in the following directory: - ~/Library/Application Support/magnetiX/ - EOS - end - - test do - assert_predicate prefix/"magnetiX.app/Contents/MacOS/magnetiX", :executable? - end -end diff --git a/Formula/mahout.rb b/Formula/mahout.rb deleted file mode 100644 index df26c26eadfdb..0000000000000 --- a/Formula/mahout.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Mahout < Formula - desc "Library to help build scalable machine learning libraries" - homepage "https://mahout.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=mahout/0.13.0/apache-mahout-distribution-0.13.0.tar.gz" - sha256 "87bdc86e16b5817d6b5a810b94d7389604887f7de9c680f34faaf0cbb8dabf6f" - - head do - url "https://github.com/apache/mahout.git" - depends_on "maven" => :build - end - - bottle :unneeded - - depends_on "hadoop" - depends_on :java - - def install - if build.head? - chmod 755, "./bin" - system "mvn", "-DskipTests", "clean", "install" - end - - libexec.install "bin" - - if build.head? - libexec.install Dir["buildtools/target/*.jar"] - libexec.install Dir["core/target/*.jar"] - libexec.install Dir["examples/target/*.jar"] - libexec.install Dir["math/target/*.jar"] - else - libexec.install Dir["*.jar"] - end - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env) - end - - test do - (testpath/"test.csv").write <<~EOS - "x","y" - 0.1234567,0.101201201 - EOS - - assert_match "0.101201201", pipe_output("#{bin}/mahout cat #{testpath}/test.csv") - end -end diff --git a/Formula/mailcheck.rb b/Formula/mailcheck.rb deleted file mode 100644 index 2753b1dd8e0ea..0000000000000 --- a/Formula/mailcheck.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Mailcheck < Formula - desc "Check multiple mailboxes/maildirs for mail" - homepage "https://mailcheck.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mailcheck/mailcheck/1.91.2/mailcheck_1.91.2.tar.gz" - sha256 "6ca6da5c9f8cc2361d4b64226c7d9486ff0962602c321fc85b724babbbfa0a5c" - - bottle do - cellar :any_skip_relocation - sha256 "7ea23945f9750c34d71ff05c5f41c0f5352e3eecaf1c7cf485d4f51096b9dd4e" => :mojave - sha256 "c630704fee3dea86402e7486295a13601077bd991e45f23d3ac841c95a9c4474" => :high_sierra - sha256 "8d33e3b08eef4dfaa7fa3d2c4e5f4a697cd2e5eb950c963f1f0845c0651da5ea" => :sierra - sha256 "b7c134dc23431dfaa3f402b859b7154cab5e176711363bd884dc82ce896d7c7a" => :el_capitan - sha256 "242b05a6e9b8ccc1ac70e22cbf89bc33a885e726d32509fad6b34a3bee123945" => :yosemite - sha256 "32b40cf41ec15bcd0efbfb90858534e4b84056915ceacd6914d71d8acdffeb6f" => :mavericks - end - - def install - system "make", "mailcheck" - bin.install "mailcheck" - man1.install "mailcheck.1" - etc.install "mailcheckrc" - end -end diff --git a/Formula/mailhog.rb b/Formula/mailhog.rb deleted file mode 100644 index 5cad65f02ee12..0000000000000 --- a/Formula/mailhog.rb +++ /dev/null @@ -1,180 +0,0 @@ -require "language/go" - -class Mailhog < Formula - desc "Web and API based SMTP testing tool" - homepage "https://github.com/mailhog/MailHog" - head "https://github.com/mailhog/MailHog.git" - - stable do - url "https://github.com/mailhog/MailHog/archive/v1.0.0.tar.gz" - sha256 "472bf0895f33d49ec8f9bf665fdbda317e57855e846e38e6a6b8dcecdacd7bc5" - - go_resource "github.com/gorilla/context" do - url "https://github.com/gorilla/context.git", - :revision => "08b5f424b9271eedf6f9f0ce86cb9396ed337a42" - end - - go_resource "github.com/gorilla/mux" do - url "https://github.com/gorilla/mux.git", - :revision => "599cba5e7b6137d46ddf58fb1765f5d928e69604" - end - - go_resource "github.com/gorilla/pat" do - url "https://github.com/gorilla/pat.git", - :revision => "cf955c3d1f2c27ee96f93e9738085c762ff5f49d" - end - - go_resource "github.com/gorilla/websocket" do - url "https://github.com/gorilla/websocket.git", - :revision => "a91eba7f97777409bc2c443f5534d41dd20c5720" - end - - go_resource "github.com/ian-kent/envconf" do - url "https://github.com/ian-kent/envconf.git", - :revision => "c19809918c02ab33dc8635d68c77649313185275" - end - - go_resource "github.com/ian-kent/go-log" do - url "https://github.com/ian-kent/go-log.git", - :revision => "5731446c36ab9f716106ce0731f484c50fdf1ad1" - end - - go_resource "github.com/ian-kent/goose" do - url "https://github.com/ian-kent/goose.git", - :revision => "c3541ea826ad9e0f8a4a8c15ca831e8b0adde58c" - end - - go_resource "github.com/ian-kent/linkio" do - url "https://github.com/ian-kent/linkio.git", - :revision => "77fb4b01842cb4b019137c0227df9a8f9779d0bd" - end - - go_resource "github.com/mailhog/MailHog-Server" do - url "https://github.com/mailhog/MailHog-Server.git", - :revision => "50f74a1aa2991b96313144d1ac718ce4d6739dfd" - end - - go_resource "github.com/mailhog/MailHog-UI" do - url "https://github.com/mailhog/MailHog-UI.git", - :revision => "24b31a47cc5b65d23576bb9884c941d2b88381f7" - end - - go_resource "github.com/mailhog/data" do - url "https://github.com/mailhog/data.git", - :revision => "024d554958b5bea5db220bfd84922a584d878ded" - end - - go_resource "github.com/mailhog/http" do - url "https://github.com/mailhog/http.git", - :revision => "2e653938bf190d0e2fbe4825ce74e5bc149a62f2" - end - - go_resource "github.com/mailhog/mhsendmail" do - url "https://github.com/mailhog/mhsendmail.git", - :revision => "9e70164f299c9e06af61402e636f5bbdf03e7dbb" - end - - go_resource "github.com/mailhog/smtp" do - url "https://github.com/mailhog/smtp.git", - :revision => "0c4e9b7e0625fec61d0c30d7b2f6c62852be6c54" - end - - go_resource "github.com/mailhog/storage" do - url "https://github.com/mailhog/storage.git", - :revision => "6d871fb23ecd873cb10cdfc3a8dec5f50d2af8fa" - end - - go_resource "github.com/philhofer/fwd" do - url "https://github.com/philhofer/fwd.git", - :revision => "98c11a7a6ec829d672b03833c3d69a7fae1ca972" - end - - go_resource "github.com/t-k/fluent-logger-golang" do - url "https://github.com/t-k/fluent-logger-golang.git", - :revision => "0f8ec08f2057a61574b6943e75045fffbeae894e" - end - - go_resource "github.com/tinylib/msgp" do - url "https://github.com/tinylib/msgp.git", - :revision => "362bfb3384d53ae4d5dd745983a4d70b6d23628c" - end - - go_resource "golang.org/x/crypto" do - url "https://go.googlesource.com/crypto.git", - :revision => "cbc3d0884eac986df6e78a039b8792e869bff863" - end - - go_resource "gopkg.in/mgo.v2" do - url "https://gopkg.in/mgo.v2.git", - :revision => "3f83fa5005286a7fe593b055f0d7771a7dce4655" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "f74c763c363961bf74dbd9aec7ee4d4a1faa010184c765889f23b7018dc58e39" => :mojave - sha256 "be78e98dffa8a35f0aa435fdc4f56b40614b6dad6759ab23d7c55ea88f999644" => :high_sierra - sha256 "fa2fad0872e20bc0d8e302306e38c0a66fa7c92f3f0c61ff6952e3ec2de089dc" => :sierra - sha256 "ee9851eae56a0b8f2e52274ee358323dc4887a1e7c40ee8f1e7a9b0ae0bc07dd" => :el_capitan - sha256 "6832c9139e927cfd708604db23e95c3d3cee79f64d5cb2902137dca85007ed53" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - - path = buildpath/"src/github.com/mailhog/MailHog" - path.install buildpath.children - - # restore use of vendor directory for > 1.0.0 - Language::Go.stage_deps resources, buildpath/"src" if build.stable? - - cd path do - system "go", "install", "-v", ".../MailHog" - prefix.install_metafiles - end - end - - plist_options :manual => "MailHog" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/MailHog - - RunAtLoad - - StandardErrorPath - #{var}/log/mailhog.log - StandardOutPath - #{var}/log/mailhog.log - - - EOS - end - - test do - pid = fork do - exec "#{bin}/MailHog" - end - sleep 2 - - begin - output = shell_output("curl -s http://localhost:8025") - assert_match "MailHog", output - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mailutils.rb b/Formula/mailutils.rb deleted file mode 100644 index c374798397579..0000000000000 --- a/Formula/mailutils.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mailutils < Formula - desc "Swiss Army knife of email handling" - homepage "https://mailutils.org/" - url "https://ftp.gnu.org/gnu/mailutils/mailutils-3.4.tar.gz" - mirror "https://ftpmirror.gnu.org/mailutils/mailutils-3.4.tar.gz" - sha256 "a3e83b1450222ffdbc7fa42e7171d530fcd568b6871158a489d86840ae130df7" - - bottle do - sha256 "e83aeb8ac4b27c735b135684a50f39e675752968369bca3754c7fcca1c55e848" => :mojave - sha256 "bbd0305336adc02ee5da9d5cd84d267212fad59e6aa67e7d8564531eeaaabad7" => :high_sierra - sha256 "241d546b7d97fc8cc8150b61d3a7c1770868f235ffe76634a08e98ae9b6daefc" => :sierra - sha256 "752f777cafe9eb7434c900882bdb7eda9cf100d5f3a177a05ae4e164aa98c2a4" => :el_capitan - end - - depends_on "gnutls" - depends_on "gsasl" - depends_on "libtool" - depends_on "readline" - - def install - system "./configure", "--disable-mh", - "--prefix=#{prefix}", - "--without-guile", - "--without-tokyocabinet" - system "make", "PYTHON_LIBS=-undefined dynamic_lookup", "install" - end - - test do - system "#{bin}/movemail", "--version" - end -end diff --git a/Formula/mairix.rb b/Formula/mairix.rb deleted file mode 100644 index 5565ada5f0f88..0000000000000 --- a/Formula/mairix.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mairix < Formula - desc "Email index and search tool" - homepage "http://www.rpcurnow.force9.co.uk/mairix/" - url "https://downloads.sourceforge.net/project/mairix/mairix/0.24/mairix-0.24.tar.gz" - sha256 "a0702e079c768b6fbe25687ebcbabe7965eb493d269a105998c7c1c2caef4a57" - head "https://github.com/rc0/mairix.git" - - bottle do - cellar :any_skip_relocation - sha256 "483128f4a24cbf40c26ceef2a9951c44992c57f114327671883b8ab7b9da8569" => :mojave - sha256 "5975d9e5b741611279f008a50febebfa9d91c4e3e8448c4d8eda80cbd5c371af" => :high_sierra - sha256 "9cfafed3ea8980b65d1fa5910db71468b3dfd5b81b598d20ff1bf317c55edbca" => :sierra - sha256 "207bd087f9675c188a430ead82700870c9d3088597a788c334d020d92148caa8" => :el_capitan - end - - def install - ENV.deparallelize - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/mairix", "--version" - end -end diff --git a/Formula/make.rb b/Formula/make.rb deleted file mode 100644 index 2b163e4d26ffe..0000000000000 --- a/Formula/make.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Make < Formula - desc "Utility for directing compilation" - homepage "https://www.gnu.org/software/make/" - url "https://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2" - mirror "https://ftpmirror.gnu.org/make/make-4.2.1.tar.bz2" - sha256 "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589" - revision 1 - - bottle do - rebuild 2 - sha256 "77c4ba8e8b6d7ff0b8ea9b4cac2026882888196c2f39cdbdd004b92757a07ccf" => :mojave - sha256 "9486542a6ad3207c3f7e00c80f99a562014d6fc8aa833036c3927d11a6cee0ee" => :high_sierra - sha256 "8641015924620134cfa26c18eb665503950291d1110d72f876354242136cfa77" => :sierra - end - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --program-prefix=g - ] - - system "./configure", *args - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gmake" =>"make" - (libexec/"gnuman/man1").install_symlink man1/"gmake.1" => "make.1" - end - - def caveats; <<~EOS - GNU "make" has been installed as "gmake". - If you need to use it as "make", you can add a "gnubin" directory - to your PATH from your bashrc like: - - PATH="#{opt_libexec}/gnubin:$PATH" - - Additionally, you can access its man page with normal name if you add - the "gnuman" directory to your MANPATH from your bashrc as well: - - MANPATH="#{opt_libexec}/gnuman:$MANPATH" - EOS - end - - test do - (testpath/"Makefile").write <<~EOS - default: - \t@echo Homebrew - EOS - - assert_equal "Homebrew\n", shell_output("#{bin}/gmake") - assert_equal "Homebrew\n", shell_output("#{opt_libexec}/gnubin/make") - end -end diff --git a/Formula/makedepend.rb b/Formula/makedepend.rb deleted file mode 100644 index cd99cf195e3d9..0000000000000 --- a/Formula/makedepend.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Makedepend < Formula - desc "Creates dependencies in makefiles" - homepage "https://x.org/" - url "https://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.5.tar.bz2" - mirror "http://xorg.mirrors.pair.com/individual/util/makedepend-1.0.5.tar.bz2" - sha256 "f7a80575f3724ac3d9b19eaeab802892ece7e4b0061dd6425b4b789353e25425" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f8fe4a9c0346e86c2a8b675a1818f21024a28c8bd228c2eb2b47c90179705531" => :mojave - sha256 "648d18f27ef8ea0067a1d315ac9ffedece1734d950fa1228175ddd6f04c02ecf" => :high_sierra - sha256 "9e56751537ccf63d38f7d44c34cdcc565895a774d6f81d844c4900e008399712" => :sierra - sha256 "0f13329fdaa980ab3e4440f352a70e99aa3afdcfba0ad9bc60e9bc2e828f1b3b" => :el_capitan - sha256 "18186e2c1dbd9ea5b8107f4987318e9a75c87d2195e98238e216d8554c410138" => :yosemite - sha256 "afe9b0203383cd9a180c4f247fbf26c2a4bc75a7324963c95f6e9ebc39f1d806" => :mavericks - end - - depends_on "pkg-config" => :build - - resource "xproto" do - url "https://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.28.tar.gz" - mirror "http://xorg.mirrors.pair.com/individual/proto/xproto-7.0.28.tar.gz" - sha256 "6cabc8ce3fa2b1a2427871167b62c24d5b08a58bd3e81ed7aaf08f2bf6dbcfed" - end - - resource "xorg-macros" do - url "https://xorg.freedesktop.org/releases/individual/util/util-macros-1.19.0.tar.bz2" - mirror "http://xorg.mirrors.pair.com/individual/util/util-macros-1.19.0.tar.bz2" - sha256 "2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba" - end - - def install - resource("xproto").stage do - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{buildpath}/xproto" - system "make", "install" - end - - resource("xorg-macros").stage do - system "./configure", "--prefix=#{buildpath}/xorg-macros" - system "make", "install" - end - - ENV.append_path "PKG_CONFIG_PATH", "#{buildpath}/xproto/lib/pkgconfig" - ENV.append_path "PKG_CONFIG_PATH", "#{buildpath}/xorg-macros/share/pkgconfig" - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - touch "Makefile" - system "#{bin}/makedepend" - end -end diff --git a/Formula/makefile2graph.rb b/Formula/makefile2graph.rb deleted file mode 100644 index 883af264944d3..0000000000000 --- a/Formula/makefile2graph.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Makefile2graph < Formula - desc "Create a graph of dependencies from GNU-Make" - homepage "https://github.com/lindenb/makefile2graph" - url "https://github.com/lindenb/makefile2graph/archive/v1.5.0.tar.gz" - sha256 "9464c6c1291609c211284a9889faedbab22ef504ce967b903630d57a27643b40" - head "https://github.com/lindenb/makefile2graph.git" - - bottle do - cellar :any_skip_relocation - sha256 "5b5cb69a698628af41b3de70146580bbcb2e88a8b6d87d7fe9b4f58a2f2fdfb2" => :mojave - sha256 "51231ed0ef44fd31a10f4ea0a7500570181332786ddd5a8a9a886958ad1b1408" => :high_sierra - sha256 "274ee025c45df9757d608249d64105b9314c8e59fc52a81ad6906f807498b67c" => :sierra - sha256 "ed1939b1b0fd106f3e328e310a887cf454b81481f78fdf57ce75c0480a922d7d" => :el_capitan - sha256 "37aebae489e0f341f80417ec711e5c2817f5b8097c3493dcc11bc754bdd1b1cf" => :yosemite - sha256 "0de3d4a2492797c3259798493e287ac2403f02254c6cfcf74948a16bcc4bcd0d" => :mavericks - sha256 "52dea69b4d18c1c6fa451ab834a43e1ca57ba64d9efb4c63972126a387682040" => :mountain_lion - end - - depends_on "graphviz" - - def install - system "make" - system "make", "test" - bin.install "make2graph", "makefile2graph" - man1.install "make2graph.1", "makefile2graph.1" - doc.install "LICENSE", "README.md", "screenshot.png" - end - - test do - (testpath/"Makefile").write <<~EOS - all: foo - all: bar - foo: ook - bar: ook - ook: - EOS - system "make -Bnd >make-Bnd" - system "#{bin}/make2graph :hg - - bottle do - cellar :any_skip_relocation - sha256 "16d2135a49e22ffe920567c7ac382d5f706ef7ce5de377750553a0e59414819a" => :mojave - sha256 "c40907f2d30603bdfe8402e90cbb35209b46cee1e7967d0ab06c21d5d7935eb8" => :high_sierra - sha256 "3a673790c42724f75b905713e269f8bfa3e54bb64fde48130164c68b5656c871" => :sierra - sha256 "96f91bccf728f040931c2816156a7c5de739ae91e63191795cd108d0a46370ac" => :el_capitan - sha256 "40c3d4befe2d4625d7013ea40f307b4f5b26e122a6dad51706a25bb22734f075" => :yosemite - sha256 "8c54ce9e5f819dda4eb274f8bf8a22d49e1d0086e33300f236840acf1a46837f" => :mavericks - sha256 "dfffe46a25b846de31dc220c279a628b719a3b353aa220ed31189bc8ce5da4b2" => :mountain_lion - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e59da9d/makeicns/patch-IconFamily.m.diff" - sha256 "f5ddbf6a688d6f153cf6fc2e15e75309adaf61677ab423cb67351e4fbb26066e" - end - - def install - system "make" - bin.install "makeicns" - end - - test do - system bin/"makeicns", "-in", test_fixtures("test.png"), - "-out", testpath/"test.icns" - assert_predicate testpath/"test.icns", :exist? - end -end diff --git a/Formula/makensis.rb b/Formula/makensis.rb deleted file mode 100644 index 9e1435ddb29dc..0000000000000 --- a/Formula/makensis.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Makensis < Formula - desc "System to create Windows installers" - homepage "https://nsis.sourceforge.io/" - url "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.04/nsis-3.04-src.tar.bz2" - sha256 "609536046c50f35cfd909dd7df2ab38f2e835d0da3c1048aa0d48c59c5a4f4f5" - - bottle do - cellar :any_skip_relocation - sha256 "cdfcc5744bbb90c33f679f119ecd2d5addd507e52c785d3be61d9bf60d6f6f4c" => :mojave - sha256 "e05324ab124f4bc0b64167b4e4f8f0fe83345a4f2eba5d473b4174fafaa3c987" => :high_sierra - sha256 "3e87e127f96c88d107943966681d71230232ba522d4d64d7398850383a0ab61f" => :sierra - end - - depends_on "mingw-w64" => :build - depends_on "scons" => :build - - resource "nsis" do - url "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.04/nsis-3.04.zip" - sha256 "22f3349fea453a45551745635c13e5efb7849ecbdce709daa2b2fa8e2ac55fc4" - end - - def install - args = [ - "CC=#{ENV.cc}", - "CXX=#{ENV.cxx}", - "PREFIX_DOC=#{share}/nsis/Docs", - "SKIPUTILS=Makensisw,NSIS Menu,zip2exe", - # Don't strip, see https://github.com/Homebrew/homebrew/issues/28718 - "STRIP=0", - "VERSION=#{version}", - ] - system "scons", "makensis", *args - bin.install "build/urelease/makensis/makensis" - (share/"nsis").install resource("nsis") - end - - test do - system "#{bin}/makensis", "-VERSION" - system "#{bin}/makensis", "#{share}/nsis/Examples/bigtest.nsi", "-XOutfile /dev/null" - end -end diff --git a/Formula/makepkg.rb b/Formula/makepkg.rb deleted file mode 100644 index 1b560128901fe..0000000000000 --- a/Formula/makepkg.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Makepkg < Formula - desc "Compile and build packages suitable for installation with pacman" - homepage "https://wiki.archlinux.org/index.php/makepkg" - url "https://projects.archlinux.org/git/pacman.git", - :tag => "v5.0.2", - :revision => "0c633c27eaeab2a9d30efb01199579896ccf63c9" - head "https://projects.archlinux.org/git/pacman.git" - - bottle do - rebuild 1 - sha256 "1398f956766797a114160ee7cbdacab54caac3f0a64871a8bc47385b067682e7" => :mojave - sha256 "de52e9169d747dadc908bccae5484a9c08ec0565ec712c0a5546581faa3683be" => :high_sierra - sha256 "ed7bc7d8bb37a50a44f0de2f9567c27b2aa246edd1d73d843399509a4046665a" => :sierra - sha256 "dc351b9774df4854446ad8cabc1222871d3074b2240a2cbef5e96acfd5bd67ed" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "docbook-xsl" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "bash" - depends_on "fakeroot" - depends_on "gettext" - depends_on "libarchive" - # libalpm now calls fstatat, which is only available for >= 10.10 - # Regression due to https://git.archlinux.org/pacman.git/commit/?id=16718a21 - # Reported 19 Jun 2016: https://bugs.archlinux.org/task/49771 - depends_on :macos => :yosemite - depends_on "openssl" - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - system "make", "install" - end - - test do - (testpath/"PKGBUILD").write <<~EOS - source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/androidnetworktester/10kb.txt) - pkgrel=0 - pkgver=0 - EOS - assert_match "md5sums=('e232a2683c0", pipe_output("#{bin}/makepkg -dg 2>&1") - end -end diff --git a/Formula/makepp.rb b/Formula/makepp.rb deleted file mode 100644 index b00251e1b0128..0000000000000 --- a/Formula/makepp.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Makepp < Formula - desc "Drop-in replacement for GNU make" - homepage "https://makepp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/makepp/2.0/makepp-2.0.tgz" - sha256 "d1b64c6f259ed50dfe0c66abedeb059e5043fc02ca500b2702863d96cdc15a19" - - bottle do - cellar :any_skip_relocation - sha256 "4420c1b9b7c5e42663c239b7e2c753c1669a1746bd21579c09e82224f5ea9620" => :mojave - sha256 "8a8cfb0d135e47e4a37bff17d662234a9c1ebb17d82b12013b3a24d0f8f15032" => :high_sierra - sha256 "d9244cdf9ca16edf5972aa60783ecfd675c581ba3a9b53339593f1fdc355a0ab" => :sierra - sha256 "e2d2e0cbb4999b69e9b1de09a75621ad6119f2978b0a86aefd0e63b2ee908203" => :el_capitan - sha256 "9ccedb5776a953719caa8cb8154a8dea1e633fca632eee9ff3ef286e4539f0e8" => :yosemite - sha256 "d54e884aac7589f363d2c67920c87861878777a59771cd2457ed86053cf6e6b8" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/makepp", "--version" - end -end diff --git a/Formula/makeself.rb b/Formula/makeself.rb deleted file mode 100644 index 4352942c2041a..0000000000000 --- a/Formula/makeself.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Makeself < Formula - desc "Make self-extractable archives on UNIX" - homepage "http://www.megastep.org/makeself/" - url "https://github.com/megastep/makeself/archive/release-2.4.0.tar.gz" - sha256 "76a8c3f3fad1b55c39ba2904a19e74962151f9481df03091d4e54938bdd13f50" - head "https://github.com/megastep/makeself.git" - - bottle :unneeded - - def install - libexec.install "makeself-header.sh" - # install makeself-header.sh to libexec so change its location in makeself.sh - inreplace "makeself.sh", '`dirname "$0"`', libexec - bin.install "makeself.sh" => "makeself" - man1.install "makeself.1" - end - - test do - touch "testfile" - system "tar", "cvzf", "testfile.tar.gz", "testfile" - system "#{bin}/makeself", ".", "testfile.run", '"A test file"', "echo" - end -end diff --git a/Formula/malbolge.rb b/Formula/malbolge.rb deleted file mode 100644 index d6f691b253be9..0000000000000 --- a/Formula/malbolge.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Malbolge < Formula - desc "Deliberately difficult to program esoteric programming language" - homepage "https://esoteric.sange.fi/orphaned/malbolge/README.txt" - url "https://esoteric.sange.fi/orphaned/malbolge/malbolge.c" - version "0.1.0" - sha256 "ca3b4f321bc3273195eb29eee7ee2002031b057c2bf0c8d7a4f7b6e5b3f648c0" - - bottle do - cellar :any_skip_relocation - sha256 "40942ff18c1bc85e171257e95516c3b2f20066971c81c6c773d5884285590216" => :mojave - sha256 "5499e81bdb3bb7c6d93f7087c1d79a632e1dc5909e279bb1d37eb93906ca8c20" => :high_sierra - sha256 "4e4b604d3ce7e8ccc5933dd949b55e77bdd59d21f084b4183b950e9dd552f368" => :sierra - sha256 "20f743a8bcb4085f5958e65a54bc20399de6894155ecd64dfc056431d93ec477" => :el_capitan - sha256 "e5f617b7bbfee4386442aa739ce8df21b4c54584f2a4ea9f52eec877002ecdf7" => :yosemite - sha256 "3681aa628f0cbc4d9f2bd65d647402d05dc850041119e24515223527df261125" => :mavericks - end - - patch :DATA - - def install - system ENV.cxx, "malbolge.c", "-o", "malbolge" - bin.install "malbolge" - end -end - -__END__ ---- /malbolge.c -+++ /malbolge.c -25d24 -< #include diff --git a/Formula/mallet.rb b/Formula/mallet.rb deleted file mode 100644 index 8d82986b79652..0000000000000 --- a/Formula/mallet.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mallet < Formula - desc "MAchine Learning for LanguagE Toolkit" - homepage "http://mallet.cs.umass.edu/" - url "http://mallet.cs.umass.edu/dist/mallet-2.0.8.tar.gz" - sha256 "5b2d6fb9bcf600b1836b09881821a6781dd45a7d3032e61d7500d027a5b34faf" - - bottle :unneeded - - depends_on :java - - resource "testdata" do - url "https://raw.githubusercontent.com/mimno/Mallet/master/sample-data/stackexchange/tsv/testing.tsv" - sha256 "06b4a0b3f27afa532ded841e8304449764a604fb202ba60eb762eaa79e9e02f3" - end - - def install - rm Dir["bin/*.{bat,dll,exe}"] # Remove all windows files - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env) - end - - test do - resource("testdata").stage do - system "#{bin}/mallet", "import-file", "--input", "testing.tsv", "--keep-sequence" - out = shell_output("#{bin}/mallet train-topics --input text.vectors --show-topics-interval 0 --num-iterations 100 2>&1") - assert_equal "seconds", out.split.last - end - end -end diff --git a/Formula/mame.rb b/Formula/mame.rb deleted file mode 100644 index 9f02543cb30f2..0000000000000 --- a/Formula/mame.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Mame < Formula - desc "Multiple Arcade Machine Emulator" - homepage "https://mamedev.org/" - url "https://github.com/mamedev/mame/archive/mame0205.tar.gz" - version "0.205" - sha256 "80b7f9feb3a4da34c5c452de13d4f7db12381b8a17a90f41884ea2ca797d92ff" - head "https://github.com/mamedev/mame.git" - - bottle do - cellar :any - sha256 "e4d4679ec61ef5e1accb9bc81658f3d5d0b0059b52da592a7ad20a51a39c1c16" => :mojave - sha256 "dbe1926067c42c933452ec6bd5bd47c81a510eb65ca340379364029c11fb78d3" => :high_sierra - sha256 "7c7c759a4be74b6dc3f6ab28cee7c242e497244d7161b026f7b659a7caf1fac0" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "flac" - depends_on "jpeg" - depends_on "lua" - depends_on :macos => :yosemite - depends_on "portaudio" - depends_on "portmidi" - depends_on "sdl2" - depends_on "sqlite" - depends_on "utf8proc" - - # Need C++ compiler and standard library support C++14. - needs :cxx14 - - def install - inreplace "scripts/src/osd/sdl.lua", "--static", "" - - # 3rdparty/sol2/sol/compatibility/version.hpp:30:10 - # fatal error: 'lua.hpp' file not found - ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua" - - system "make", "USE_LIBSDL=1", - "USE_SYSTEM_LIB_EXPAT=1", - "USE_SYSTEM_LIB_ZLIB=1", - "USE_SYSTEM_LIB_JPEG=1", - "USE_SYSTEM_LIB_FLAC=1", - "USE_SYSTEM_LIB_LUA=1", - "USE_SYSTEM_LIB_SQLITE3=1", - "USE_SYSTEM_LIB_PORTMIDI=1", - "USE_SYSTEM_LIB_PORTAUDIO=1", - "USE_SYSTEM_LIB_UTF8PROC=1" - bin.install "mame64" => "mame" - cd "docs" do - system "make", "text" - doc.install Dir["build/text/*"] - system "make", "man" - man1.install "build/man/MAME.1" => "mame.1" - end - pkgshare.install %w[artwork bgfx hash ini keymaps plugins samples uismall.bdf] - end - - test do - assert shell_output("#{bin}/mame -help").start_with? "MAME v#{version}" - system "#{bin}/mame", "-validate" - end -end diff --git a/Formula/man2html.rb b/Formula/man2html.rb deleted file mode 100644 index a8bf7e9133788..0000000000000 --- a/Formula/man2html.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Man2html < Formula - desc "Convert nroff man pages to HTML" - homepage "https://savannah.nongnu.org/projects/man2html/" - url "https://www.mhonarc.org/release/misc/man2html3.0.1.tar.gz" - mirror "https://distfiles.macports.org/man2html/man2html3.0.1.tar.gz" - sha256 "a3dd7fdd80785c14c2f5fa54a59bf93ca5f86f026612f68770a0507a3d4e5a29" - - bottle do - cellar :any_skip_relocation - sha256 "5096761bebb1f08c8eb8bac3e99b35884116086b7e39bf3d3daad3340645ff75" => :mojave - sha256 "9fe2dcdd8c5f344106dfe57db3e70bec51f78594fb2c968f5561506d1bd7dbbe" => :high_sierra - sha256 "ced5194219735226831e611db4247de1affdec0c2e53e813d5c1a7c5d3bce928" => :sierra - sha256 "37bfcf3cab42938fff23a66429872e935b59cf769caf238928bd4acc6544d8d4" => :el_capitan - sha256 "2e3cc12c0e7bc0ae5b194f397874015df1fe6b8a8ab52c6972e17ad992732463" => :yosemite - sha256 "7ebaf5a969df65809220222b69414a51ed06b90601a28fc2ad140955e17febe0" => :mavericks - sha256 "82efff57b082ea9f817287e96d185bf15f351cfb0d4a7c3837f89bb5e14ce30c" => :mountain_lion - end - - def install - bin.mkpath - man1.mkpath - system "/usr/bin/perl", "install.me", "-batch", - "-binpath", bin, - "-manpath", man - end - - test do - pipe_output("#{bin}/man2html", (man1/"man2html.1").read, 0) - end -end diff --git a/Formula/mandoc.rb b/Formula/mandoc.rb deleted file mode 100644 index 084a2a354acf5..0000000000000 --- a/Formula/mandoc.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Mandoc < Formula - desc "The mandoc UNIX manpage compiler toolset" - homepage "https://mandoc.bsd.lv/" - url "https://mandoc.bsd.lv/snapshots/mandoc-1.14.4.tar.gz" - sha256 "24eb72103768987dcc63b53d27fdc085796330782f44b3b40c4660b1e1ee9b9c" - head "anoncvs@mandoc.bsd.lv:/cvs", :using => :cvs - - bottle do - sha256 "07c72a5db5a90a5938cc9b414c029039ff4c324fcf92ba0810c6620dc4ff74e1" => :mojave - sha256 "70cd5bfb631edc249861ee1fcda31e8a33735cb78ce7e715d5ec9a855d421ac3" => :high_sierra - sha256 "3542d7c75f848bc0f8eadbdf35290a72a9b1d44d53fe9abaeafdb11575ad7b15" => :sierra - end - - def install - localconfig = [ - - # Sane prefixes. - "PREFIX=#{prefix}", - "INCLUDEDIR=#{include}", - "LIBDIR=#{lib}", - "MANDIR=#{man}", - "WWWPREFIX=#{prefix}/var/www", - "EXAMPLEDIR=#{share}/examples", - - # Executable names, where utilities would be replaced/duplicated. - # The mandoc versions of the utilities are definitely *not* ready - # for prime-time on Darwin, though some changes in HEAD are promising. - # The "bsd" prefix (like bsdtar, bsdmake) is more informative than "m". - "BINM_MAN=bsdman", - "BINM_APROPOS=bsdapropos", - "BINM_WHATIS=bsdwhatis", - "BINM_MAKEWHATIS=bsdmakewhatis", # default is "makewhatis". - - # These are names for *section 7* pages only. Several other pages are - # prefixed "mandoc_", similar to the "groff_" pages. - "MANM_MAN=man", - "MANM_MDOC=mdoc", - "MANM_ROFF=mandoc_roff", # This is the only one that conflicts (groff). - "MANM_EQN=eqn", - "MANM_TBL=tbl", - - "OSNAME='Mac OS X #{MacOS.version}'", # Bottom corner signature line. - - # Not quite sure what to do here. The default ("/usr/share", etc.) needs - # sudoer privileges, or will error. So just brew's manpages for now? - "MANPATH_DEFAULT=#{HOMEBREW_PREFIX}/share/man", - - "HAVE_MANPATH=0", # Our `manpath` is a symlink to system `man`. - "STATIC=", # No static linking on Darwin. - - "HOMEBREWDIR=#{HOMEBREW_CELLAR}", # ? See configure.local.example, NEWS. - "BUILD_CGI=1", - ] - - File.rename("cgi.h.example", "cgi.h") # For man.cgi - - (buildpath/"configure.local").write localconfig.join("\n") - system "./configure" - - # I've tried twice to send a bug report on this to tech@mdocml.bsd.lv. - # In theory, it should show up with: - # search.gmane.org/?query=jobserver&group=gmane.comp.tools.mdocml.devel - ENV.deparallelize do - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/mandoc", "-Thtml", - "-Ostyle=#{share}/examples/example.style.css", "#{man1}/mandoc.1" - end -end diff --git a/Formula/mapcrafter.rb b/Formula/mapcrafter.rb deleted file mode 100644 index 7b1d9c060c79b..0000000000000 --- a/Formula/mapcrafter.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Mapcrafter < Formula - desc "Minecraft map renderer" - homepage "https://mapcrafter.org" - url "https://github.com/mapcrafter/mapcrafter/archive/v.2.4.tar.gz" - sha256 "f3b698d34c02c2da0c4d2b7f4e251bcba058d0d1e4479c0418eeba264d1c8dae" - revision 3 - - bottle do - cellar :any - sha256 "ef50257242f50111c034ddc97be5d592b8a91d255053a2bb50b6cb9ea791e930" => :mojave - sha256 "f3ce96014ce5e35f2a40034bd0498a583d4c92fe27ecc5ed3039733c1b049757" => :high_sierra - sha256 "f0e35d940f533e1a4a8a3575afafe567523c89c72e81dc7276679c39b173800b" => :sierra - sha256 "5b10b03e8125110487845f76b36dd5fea958e0d98b8f7ef14e72956f1c98b6f2" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "jpeg-turbo" - depends_on "libpng" - - needs :cxx11 - - def install - ENV.cxx11 - - args = std_cmake_args - args << "-DJPEG_INCLUDE_DIR=#{Formula["jpeg-turbo"].opt_include}" - args << "-DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib}/libjpeg.dylib" - - system "cmake", ".", *args - system "make", "install" - end - - test do - assert_match(/Mapcrafter/, - shell_output("#{bin}/mapcrafter --version")) - end -end diff --git a/Formula/mapnik.rb b/Formula/mapnik.rb deleted file mode 100644 index cab7a4026efa1..0000000000000 --- a/Formula/mapnik.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Mapnik < Formula - desc "Toolkit for developing mapping applications" - homepage "https://mapnik.org/" - url "https://github.com/mapnik/mapnik/releases/download/v3.0.21/mapnik-v3.0.21.tar.bz2" - sha256 "6db7918e8fd24346dfc81745e455c383a718335ffa64015cf625fed5ed92b524" - head "https://github.com/mapnik/mapnik.git" - - bottle do - sha256 "dad661596f6ccbc19dc3ba0943b37547faf3b874c2f27951683b1fde2aa9c5f5" => :mojave - sha256 "aafd2fcd785323de7be9e5460826a63852efe57b314e329b916a559fd73d0579" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "cairo" - depends_on "freetype" - depends_on "gdal" - depends_on "harfbuzz" - depends_on "icu4c" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "postgresql" - depends_on "proj" - depends_on "webp" - - # Upstream commit to fix build with boost >= 1.68 - patch do - url "https://github.com/mapnik/mapnik/commit/c067eb7eec32fdd6d1c3d0e90b13a889459f2756.diff?full_index=1" - sha256 "e00e8475f04e9010dbb1724e5ae10403d2e7f1da8a83e67dfb54a7a969d81669" - end - - needs :cxx11 - - def install - ENV.cxx11 - - # Work around "error: no member named 'signbit' in the global namespace" - # encountered when trying to detect boost regex in configure - ENV.delete("SDKROOT") if DevelopmentTools.clang_build_version >= 900 - - boost = Formula["boost"].opt_prefix - freetype = Formula["freetype"].opt_prefix - harfbuzz = Formula["harfbuzz"].opt_prefix - icu = Formula["icu4c"].opt_prefix - jpeg = Formula["jpeg"].opt_prefix - libpng = Formula["libpng"].opt_prefix - libtiff = Formula["libtiff"].opt_prefix - proj = Formula["proj"].opt_prefix - webp = Formula["webp"].opt_prefix - - args = %W[ - CC=#{ENV.cc} - CXX=#{ENV.cxx} - PREFIX=#{prefix} - BOOST_INCLUDES=#{boost}/include - BOOST_LIBS=#{boost}/lib - CAIRO=True - CPP_TESTS=False - FREETYPE_CONFIG=#{freetype}/bin/freetype-config - GDAL_CONFIG=#{Formula["gdal"].opt_bin}/gdal-config - HB_INCLUDES=#{harfbuzz}/include - HB_LIBS=#{harfbuzz}/lib - ICU_INCLUDES=#{icu}/include - ICU_LIBS=#{icu}/lib - INPUT_PLUGINS=all - JPEG_INCLUDES=#{jpeg}/include - JPEG_LIBS=#{jpeg}/lib - NIK2IMG=False - PG_CONFIG=#{Formula["postgresql"].opt_bin}/pg_config - PNG_INCLUDES=#{libpng}/include - PNG_LIBS=#{libpng}/lib - PROJ_INCLUDES=#{proj}/include - PROJ_LIBS=#{proj}/lib - TIFF_INCLUDES=#{libtiff}/include - TIFF_LIBS=#{libtiff}/lib - WEBP_INCLUDES=#{webp}/include - WEBP_LIBS=#{webp}/lib - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - output = shell_output("#{bin}/mapnik-config --prefix").chomp - assert_equal prefix.to_s, output - end -end diff --git a/Formula/mapserver.rb b/Formula/mapserver.rb deleted file mode 100644 index acc1b63dcd415..0000000000000 --- a/Formula/mapserver.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Mapserver < Formula - desc "Publish spatial data and interactive mapping apps to the web" - homepage "https://mapserver.org/" - url "https://download.osgeo.org/mapserver/mapserver-7.2.1.tar.gz" - sha256 "9459a7057d5a85be66a41096a5d804f74665381186c37077c94b56e784db6102" - revision 1 - - bottle do - cellar :any - sha256 "3dfb756ff659789cf4253595aa22d2ab0b2b4b6b7bf6cbf4cba6853237b626dc" => :mojave - sha256 "ce339daff8744842eb6c82bcb034fce73ec2f53dfa4c522a02ac01382766affb" => :high_sierra - sha256 "792a125e13694bdcba3023bf0a068d345050cbf479cb445dd01b96a9772caaf8" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "cairo" - depends_on "fcgi" - depends_on "freetype" - depends_on "gd" - depends_on "gdal" - depends_on "geos" - depends_on "giflib" - depends_on "libpng" - depends_on "postgresql" - depends_on "proj" - depends_on "protobuf-c" - - def install - # Harfbuzz support requires fribidi and fribidi support requires - # harfbuzz but fribidi currently fails to build with: - # fribidi-common.h:61:12: fatal error: 'glib.h' file not found - args = std_cmake_args + %w[ - -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python - -DWITH_CLIENT_WFS=ON - -DWITH_CLIENT_WMS=ON - -DWITH_CURL=ON - -DWITH_FCGI=ON - -DWITH_FRIBIDI=OFF - -DWITH_GDAL=ON - -DWITH_GEOS=ON - -DWITH_HARFBUZZ=OFF - -DWITH_KML=ON - -DWITH_OGR=ON - -DWITH_POSTGIS=ON - -DWITH_PROJ=ON - -DWITH_PYTHON=ON - -DWITH_SOS=ON - -DWITH_WFS=ON - -WITH_CAIRO=ON - ] - - # Install within our sandbox - inreplace "mapscript/python/CMakeLists.txt" do |s| - s.gsub! "${PYTHON_SITE_PACKAGES}", lib/"python2.7/site-packages" - s.gsub! "${PYTHON_LIBRARIES}", "-Wl,-undefined,dynamic_lookup" - end - inreplace "mapscript/php/CMakeLists.txt", "${PHP5_EXTENSION_DIR}", lib/"php/extensions" - - # Using rpath on python module seems to cause problems if you attempt to - # import it with an interpreter it wasn't built against. - # 2): Library not loaded: @rpath/libmapserver.1.dylib - args << "-DCMAKE_SKIP_RPATH=ON" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/mapserv -v") - system "python2.7", "-c", "import mapscript" - end -end diff --git a/Formula/marathon-swift.rb b/Formula/marathon-swift.rb deleted file mode 100644 index 55329a72d0acc..0000000000000 --- a/Formula/marathon-swift.rb +++ /dev/null @@ -1,36 +0,0 @@ -class MarathonSwift < Formula - desc "Makes it easy to write, run and manage your Swift scripts" - homepage "https://github.com/JohnSundell/Marathon" - url "https://github.com/JohnSundell/Marathon/archive/1.0.1.tar.gz" - sha256 "ebf455159497ae7747784dd9a95b9678dab27db49e8e10c7c6fc2878edcdbce9" - - bottle do - cellar :any_skip_relocation - sha256 "d17beec1d5a1723abfad9656c8ead0f727ea4af509dea5c57bba53719f9a4892" => :mojave - sha256 "14541e2edb49c0eb2118b61ff0245e0654dc49d4b48e461df6cb1d8c6698112e" => :high_sierra - sha256 "80fc6f4b1ff33081f4b27091ea42901c3921e00f6ffc3a2017662e6905e562df" => :sierra - end - - depends_on :xcode => ["8.3", :build] - - def install - if MacOS::Xcode.version >= "9.0" - system "swift", "package", "--disable-sandbox", "update" - system "swift", "build", "-c", "release", "-Xswiftc", "-static-stdlib", - "--disable-sandbox" - else - ENV.delete("CC") # https://bugs.swift.org/browse/SR-3151 - system "swift", "package", "update" - system "swift", "build", "-c", "release", "-Xswiftc", "-static-stdlib" - end - - system "make", "install_bin", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/marathon", "create", "helloWorld", - "import Foundation; print(\"Hello World\")", "--no-xcode", - "--no-open" - system "#{bin}/marathon", "run", "helloWorld" - end -end diff --git a/Formula/mariadb-connector-c.rb b/Formula/mariadb-connector-c.rb deleted file mode 100644 index d38e9a36fe6bc..0000000000000 --- a/Formula/mariadb-connector-c.rb +++ /dev/null @@ -1,32 +0,0 @@ -class MariadbConnectorC < Formula - desc "MariaDB database connector for C applications" - homepage "https://downloads.mariadb.org/connector-c/" - url "https://downloads.mariadb.org/f/connector-c-3.0.8/mariadb-connector-c-3.0.8-src.tar.gz" - sha256 "2ca368fd79e87e80497a5c9fd18922d8316af8584d87cecb35bd5897cb1efd05" - - bottle do - sha256 "6484a2490a2b50896c990cea94d3f1d50cce7c55005efda99e27e1121dffdeca" => :mojave - sha256 "8dd3b15d9add1a76e5d61280477a6838c5c4d56742bb6468bb71d240a7fabafd" => :high_sierra - sha256 "bbf35b53bd41b21c3b66554474a7a518be3aaf37693df95499f6db92a01a1d52" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl" - - conflicts_with "mysql", "mariadb", "percona-server", - :because => "both install plugins" - - def install - args = std_cmake_args - args << "-DWITH_OPENSSL=On" - args << "-DOPENSSL_INCLUDE_DIR=#{Formula["openssl"].opt_include}" - args << "-DCOMPILATION_COMMENT=Homebrew" - - system "cmake", ".", *args - system "make", "install" - end - - test do - system "#{bin}/mariadb_config", "--cflags" - end -end diff --git a/Formula/mariadb-connector-odbc.rb b/Formula/mariadb-connector-odbc.rb deleted file mode 100644 index e5f7748e1c9d3..0000000000000 --- a/Formula/mariadb-connector-odbc.rb +++ /dev/null @@ -1,32 +0,0 @@ -class MariadbConnectorOdbc < Formula - desc "Database driver using the industry standard ODBC API" - homepage "https://downloads.mariadb.org/connector-odbc/" - url "https://downloads.mariadb.org/f/connector-odbc-3.0.2/mariadb-connector-odbc-3.0.2-ga-src.tar.gz" - sha256 "eba4fbda21ae9d50c94d2cd152f0ec14dde3989522f41ef7d22aa0948882ff93" - - bottle do - cellar :any - sha256 "f5717e6cf61988ee81b6c148c455bbb9b772c5bbcac72955a9fe694f87f60a50" => :mojave - sha256 "c7ab8dfb656eb5918ea5b5844ff27a04e6ed62cb336ea193311e89830791f4b2" => :high_sierra - sha256 "00f033011f0d2c7d2921178d2e111709e6031d80cf8010710a1db2a054d076bf" => :sierra - sha256 "c9ad0e034c618baa79b40287a109cf6a9ac060106b1f64d1618f270ce2492134" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "mariadb-connector-c" - depends_on "openssl" - depends_on "unixodbc" - - def install - system "cmake", ".", "-DMARIADB_FOUND=1", - "-DWITH_OPENSSL=1", - "-DOPENSSL_INCLUDE_DIR=#{Formula["openssl"].opt_include}", - *std_cmake_args - system "make", "install" - end - - test do - output = shell_output("#{Formula["unixodbc"].opt_bin}/dltest #{lib}/libmaodbc.dylib") - assert_equal "SUCCESS: Loaded #{lib}/libmaodbc.dylib", output.chomp - end -end diff --git a/Formula/mariadb.rb b/Formula/mariadb.rb deleted file mode 100644 index ef6ec35666005..0000000000000 --- a/Formula/mariadb.rb +++ /dev/null @@ -1,152 +0,0 @@ -class Mariadb < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.3.11/source/mariadb-10.3.11.tar.gz" - sha256 "211655b794c9d5397ba3be6c90737eac02e882f296268299239db47ba328f1b2" - - bottle do - sha256 "9ab440bc27d3e85e0bf2d86685ccb3dccc827956a3e3daecc7c721c70c3ea0d2" => :mojave - sha256 "7d30a6689bc684ff649e7ff7c6a0f87b2a9177c59561ab2a548f61353fb23a49" => :high_sierra - sha256 "f8f9659bf90a4d91c3d81ab96d32426705ebcdcb75dfde28442fc6e715b7b0cc" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl" - - conflicts_with "mysql", "mysql-cluster", "percona-server", - :because => "mariadb, mysql, and percona install the same binaries." - conflicts_with "mysql-connector-c", - :because => "both install MySQL client libraries" - conflicts_with "mytop", :because => "both install `mytop` binaries" - conflicts_with "mariadb-connector-c", - :because => "both install plugins" - - def install - # Set basedir and ldata so that mysql_install_db can find the server - # without needing an explicit path to be set. This can still - # be overridden by calling --basedir= when calling. - inreplace "scripts/mysql_install_db.sh" do |s| - s.change_make_var! "basedir", "\"#{prefix}\"" - s.change_make_var! "ldata", "\"#{var}/mysql\"" - end - - # -DINSTALL_* are relative to prefix - args = %W[ - -DMYSQL_DATADIR=#{var}/mysql - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_PCRE=bundled - -DWITH_READLINE=yes - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DDEFAULT_CHARSET=utf8mb4 - -DDEFAULT_COLLATION=utf8mb4_general_ci - -DINSTALL_SYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - ] - - # disable TokuDB, which is currently not supported on macOS - args << "-DPLUGIN_TOKUDB=NO" - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # Fix my.cnf to point to #{etc} instead of /etc - (etc/"my.cnf.d").mkpath - inreplace "#{etc}/my.cnf", "!includedir /etc/my.cnf.d", - "!includedir #{etc}/my.cnf.d" - touch etc/"my.cnf.d/.homebrew_dont_prune_me" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Save space - (prefix/"mysql-test").rmtree - (prefix/"sql-bench").rmtree - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - # Move sourced non-executable out of bin into libexec - libexec.install "#{bin}/wsrep_sst_common" - # Fix up references to wsrep_sst_common - %w[ - wsrep_sst_mysqldump - wsrep_sst_rsync - wsrep_sst_xtrabackup - wsrep_sst_xtrabackup-v2 - ].each do |f| - inreplace "#{bin}/#{f}", "$(dirname $0)/wsrep_sst_common", - "#{libexec}/wsrep_sst_common" - end - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the var/mysql directory exists - (var/"mysql").mkpath - unless File.exist? "#{var}/mysql/mysql/user.frm" - ENV["TMPDIR"] = nil - system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{var}/mysql", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{var}/mysql - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system bin/"mysqld", "--version" - end -end diff --git a/Formula/mariadb@10.0.rb b/Formula/mariadb@10.0.rb deleted file mode 100644 index 51539177cfebd..0000000000000 --- a/Formula/mariadb@10.0.rb +++ /dev/null @@ -1,134 +0,0 @@ -class MariadbAT100 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.0.37/source/mariadb-10.0.37.tar.gz" - sha256 "b49021989bb850163c5a47a4a9496001661b64d7f879b1237a37b07d4090a413" - - bottle do - sha256 "412caad4e7b5302276a507d5aea843e689bdcd43789e949cead3b1f2edace402" => :mojave - sha256 "9026c2de04fdd99c881c3375bedef30dda69791ffd656ce4e708172dfee1b552" => :high_sierra - sha256 "cfcebdecfec12141989784345997d4be3c4f181697948a0688c4370c039a17fa" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pidof" unless MacOS.version >= :mountain_lion - depends_on "openssl" - - def install - # Set basedir and ldata so that mysql_install_db can find the server - # without needing an explicit path to be set. This can still - # be overridden by calling --basedir= when calling. - inreplace "scripts/mysql_install_db.sh" do |s| - s.change_make_var! "basedir", "\"#{prefix}\"" - s.change_make_var! "ldata", "\"#{var}/mysql\"" - end - - # -DINSTALL_* are relative to prefix - args = %W[ - -DMYSQL_DATADIR=#{var}/mysql - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_PCRE=bundled - -DWITH_READLINE=yes - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DDEFAULT_CHARSET=utf8mb4 - -DDEFAULT_COLLATION=utf8mb4_general_ci - -DINSTALL_SYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - ] - - # disable TokuDB, which is currently not supported on Mac OS X - args << "-DWITHOUT_TOKUDB=1" - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # Fix my.cnf to point to #{etc} instead of /etc - (etc+"my.cnf.d").mkpath - inreplace "#{etc}/my.cnf", "!includedir /etc/my.cnf.d", - "!includedir #{etc}/my.cnf.d" - touch etc/"my.cnf.d/.homebrew_dont_prune_me" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix+"data" - - # Save space - (prefix+"mysql-test").rmtree - (prefix+"sql-bench").rmtree - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the var/mysql directory exists - (var+"mysql").mkpath - unless File.exist? "#{var}/mysql/mysql/user.frm" - ENV["TMPDIR"] = nil - system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{var}/mysql", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mariadb@10.0/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{var}/mysql - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system "#{bin}/mysqld", "--version" - end -end diff --git a/Formula/mariadb@10.1.rb b/Formula/mariadb@10.1.rb deleted file mode 100644 index dc9500517eb89..0000000000000 --- a/Formula/mariadb@10.1.rb +++ /dev/null @@ -1,146 +0,0 @@ -class MariadbAT101 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.1.37/source/mariadb-10.1.37.tar.gz" - sha256 "8cd516b0a7f7aa36a7c1d6e687dbbad8c0b08c92d5fd60c6e691b19a6cab4d46" - - bottle do - sha256 "3193eb2dcde51ce90e7c1cdeaac162c15065ea572c5a862c40af3197a1df3e09" => :mojave - sha256 "1a20fa76e3e8a26bb357fc5f224e2328036966eeb83319aff10b8c3bbee772ac" => :high_sierra - sha256 "2636c01dd44a76fc4e575a3c9ffbafc46b0eb21affed3f570cf3b6503affda61" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "openssl" - - def install - # Set basedir and ldata so that mysql_install_db can find the server - # without needing an explicit path to be set. This can still - # be overridden by calling --basedir= when calling. - inreplace "scripts/mysql_install_db.sh" do |s| - s.change_make_var! "basedir", "\"#{prefix}\"" - s.change_make_var! "ldata", "\"#{var}/mysql\"" - end - - # -DINSTALL_* are relative to prefix - args = %W[ - -DMYSQL_DATADIR=#{var}/mysql - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_PCRE=bundled - -DWITH_READLINE=yes - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DDEFAULT_CHARSET=utf8mb4 - -DDEFAULT_COLLATION=utf8mb4_general_ci - -DINSTALL_SYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - ] - - # disable TokuDB, which is currently not supported on macOS - args << "-DPLUGIN_TOKUDB=NO" - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # Fix my.cnf to point to #{etc} instead of /etc - (etc/"my.cnf.d").mkpath - inreplace "#{etc}/my.cnf", "!includedir /etc/my.cnf.d", - "!includedir #{etc}/my.cnf.d" - touch etc/"my.cnf.d/.homebrew_dont_prune_me" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Save space - (prefix/"mysql-test").rmtree - (prefix/"sql-bench").rmtree - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - # Move sourced non-executable out of bin into libexec - libexec.install "#{bin}/wsrep_sst_common" - # Fix up references to wsrep_sst_common - %w[ - wsrep_sst_mysqldump - wsrep_sst_rsync - wsrep_sst_xtrabackup - wsrep_sst_xtrabackup-v2 - ].each do |f| - inreplace "#{bin}/#{f}", "$(dirname $0)/wsrep_sst_common", - "#{libexec}/wsrep_sst_common" - end - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the var/mysql directory exists - (var/"mysql").mkpath - unless File.exist? "#{var}/mysql/mysql/user.frm" - ENV["TMPDIR"] = nil - system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{var}/mysql", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mariadb@10.1/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{var}/mysql - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system bin/"mysqld", "--version" - end -end diff --git a/Formula/mariadb@10.2.rb b/Formula/mariadb@10.2.rb deleted file mode 100644 index 06cb6a87b95d5..0000000000000 --- a/Formula/mariadb@10.2.rb +++ /dev/null @@ -1,146 +0,0 @@ -class MariadbAT102 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.2.21/source/mariadb-10.2.21.tar.gz" - sha256 "637f0808b65ec06902897a2f885a60377828d019d35802402dca541f8113536c" - - bottle do - sha256 "c5f78f7413f09e0191c371b2a79742c3d97f9326719cd74942332ebad3b33d18" => :mojave - sha256 "dc43e32f5058535910eb2038e1a9f3dbcc1e657c0e60243e7e742d256c381d98" => :high_sierra - sha256 "13356bd53dac1966875f6ef2723b56444ea48c31cbcf7e08c36d9ee4a88073b3" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "openssl" - - def install - # Set basedir and ldata so that mysql_install_db can find the server - # without needing an explicit path to be set. This can still - # be overridden by calling --basedir= when calling. - inreplace "scripts/mysql_install_db.sh" do |s| - s.change_make_var! "basedir", "\"#{prefix}\"" - s.change_make_var! "ldata", "\"#{var}/mysql\"" - end - - # -DINSTALL_* are relative to prefix - args = %W[ - -DMYSQL_DATADIR=#{var}/mysql - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_PCRE=bundled - -DWITH_READLINE=yes - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DDEFAULT_CHARSET=utf8mb4 - -DDEFAULT_COLLATION=utf8mb4_general_ci - -DINSTALL_SYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - ] - - # disable TokuDB, which is currently not supported on macOS - args << "-DPLUGIN_TOKUDB=NO" - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # Fix my.cnf to point to #{etc} instead of /etc - (etc/"my.cnf.d").mkpath - inreplace "#{etc}/my.cnf", "!includedir /etc/my.cnf.d", - "!includedir #{etc}/my.cnf.d" - touch etc/"my.cnf.d/.homebrew_dont_prune_me" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Save space - (prefix/"mysql-test").rmtree - (prefix/"sql-bench").rmtree - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - # Move sourced non-executable out of bin into libexec - libexec.install "#{bin}/wsrep_sst_common" - # Fix up references to wsrep_sst_common - %w[ - wsrep_sst_mysqldump - wsrep_sst_rsync - wsrep_sst_xtrabackup - wsrep_sst_xtrabackup-v2 - ].each do |f| - inreplace "#{bin}/#{f}", "$(dirname $0)/wsrep_sst_common", - "#{libexec}/wsrep_sst_common" - end - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the var/mysql directory exists - (var/"mysql").mkpath - unless File.exist? "#{var}/mysql/mysql/user.frm" - ENV["TMPDIR"] = nil - system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{var}/mysql", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mariadb@10.2/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{var}/mysql - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system bin/"mysqld", "--version" - end -end diff --git a/Formula/markdown.rb b/Formula/markdown.rb deleted file mode 100644 index 577cc6955c083..0000000000000 --- a/Formula/markdown.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Markdown < Formula - desc "Text-to-HTML conversion tool" - homepage "https://daringfireball.net/projects/markdown/" - url "https://daringfireball.net/projects/downloads/Markdown_1.0.1.zip" - sha256 "6520e9b6a58c5555e381b6223d66feddee67f675ed312ec19e9cee1b92bc0137" - - bottle do - cellar :any_skip_relocation - sha256 "343d406a2a4838499afa96395733e0d61f91c725a4693e6c5b3c49293e5297e8" => :mojave - sha256 "c7b43e96e9967731f9f9395152dca0d1535eb270a953aeccfe24dc99d3941f97" => :high_sierra - sha256 "47715f7beb1f434a5d52e6977c7f6ad584be7b0d970dacb00ef5965bd162858d" => :sierra - sha256 "a5b025bc09c8b274507cfc5c86da6350560477f24ce109dd5a79f2dafa97d805" => :el_capitan - sha256 "5e1b8b5388f1b4ceefe3fae528ae83e2fa3f9ed9f27668e8faded36b9ec3274e" => :yosemite - sha256 "66fffda1a29fd9e2dcddcb52fb9606f21d897bf4680583626b612a95d27b1e04" => :mavericks - end - - conflicts_with "discount", :because => "both install `markdown` binaries" - conflicts_with "multimarkdown", :because => "both install `markdown` binaries" - - def install - bin.install "Markdown.pl" => "markdown" - end - - test do - assert_equal "

foo bar

\n", pipe_output("#{bin}/markdown", "foo *bar*\n") - end -end diff --git a/Formula/marst.rb b/Formula/marst.rb deleted file mode 100644 index dda3c970e8022..0000000000000 --- a/Formula/marst.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Marst < Formula - desc "Algol-to-C translator" - homepage "https://www.gnu.org/software/marst" - url "https://ftp.gnu.org/gnu/marst/marst-2.7.tar.gz" - sha256 "3ee7b9d1cbe3cd9fb5f622717da7bb5506f1a6da3b30f812e2384b87bce4da50" - - bottle do - cellar :any - rebuild 1 - sha256 "0e07b482a8c8ebf7cb4b874a9c81e4c69776adf87443ede2253a8871a0db73d7" => :mojave - sha256 "69eceb01e8925d4b0eecbf40fd9b24504864c7f84f1a40b596f28f8903b0e6ca" => :high_sierra - sha256 "23fecf40d2b6ac2c986d61789bcb9dcf9b0e4926521294ea23dc7703f042bcb2" => :sierra - sha256 "c1a70d467ff3117c2a31bd52a659fbff2293f6f17b11cd4b370e9e8220a483c8" => :el_capitan - sha256 "6d8834fc64e1da37fce2ed9cae3c9f0e0dbfcb41f213c55c8413c2a522ed8811" => :yosemite - sha256 "7fddf8023d17c4bfcb6fc4141c6202b3e856ee2ecd684236daef058592b79335" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"hello.alg").write('begin outstring(1, "Hello, world!\n") end') - system "#{bin}/marst", "-o", "hello.c", "hello.alg" - system ENV.cc, "hello.c", "-lalgol", "-lm", "-o", "hello" - system "./hello" - end -end diff --git a/Formula/mas.rb b/Formula/mas.rb deleted file mode 100644 index 1a4032473e61e..0000000000000 --- a/Formula/mas.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Mas < Formula - desc "Mac App Store command-line interface" - homepage "https://github.com/mas-cli/mas" - url "https://github.com/mas-cli/mas.git", - :tag => "v1.5.0", - :revision => "ccaaa74c9593d04dc41fcff40af196fdad49f517" - head "https://github.com/mas-cli/mas.git" - - bottle do - cellar :any - sha256 "64ecec172ad61356756cd5e57a0b762d209475b5c2ac0b98ee878213e0944e41" => :mojave - sha256 "6308bcd96847857d1a491dab79a22dcc964d0442fbe36bdd22d64ceb7813e664" => :high_sierra - end - - depends_on "carthage" => :build - depends_on :xcode => ["10.1", :build] - depends_on "trash" - - def install - # Working around build issues in dependencies - # - Prevent warnings from causing build failures - # - Prevent linker errors by telling all lib builds to use max size install names - xcconfig = buildpath/"Overrides.xcconfig" - xcconfig.write <<~EOS - GCC_TREAT_WARNINGS_AS_ERRORS = NO - OTHER_LDFLAGS = -headerpad_max_install_names - EOS - ENV["XCODE_XCCONFIG_FILE"] = xcconfig - - system "carthage", "bootstrap", "--platform", "macOS" - system "script/install", prefix - - bash_completion.install "contrib/completion/mas-completion.bash" => "mas" - end - - test do - assert_include shell_output("#{bin}/mas info 497799835"), "By: Apple Inc." - end -end diff --git a/Formula/masscan.rb b/Formula/masscan.rb deleted file mode 100644 index 0dfcf942e04f9..0000000000000 --- a/Formula/masscan.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Masscan < Formula - desc "TCP port scanner, scans entire Internet in under 5 minutes" - homepage "https://github.com/robertdavidgraham/masscan/" - url "https://github.com/robertdavidgraham/masscan/archive/1.0.5.tar.gz" - sha256 "a0686929888674892f464014806444d26ded56838d45035221ff88ee9f6ead73" - head "https://github.com/robertdavidgraham/masscan.git" - - bottle do - cellar :any_skip_relocation - sha256 "6de3b12cbe718062781ee5bddad15a3f4835dafe77210f3ecba59d4e11e733e3" => :mojave - sha256 "20a6281fb4adb9aec9fd7bddf8da30bc2ae8f5bec6daa5b468444916859017fd" => :high_sierra - sha256 "729b4ce06557da726edbf7e6e570ed1ff96ca3e0bc42d9399f9ed96aa48ef2a2" => :sierra - sha256 "9aa4359e82e1b467f24d7e813ee8919dbc5cf32a182fd6eafcadc015bcd97955" => :el_capitan - end - - def install - # Fix `dyld: lazy symbol binding failed: Symbol not found: _clock_gettime` - # Reported 8 July 2017: https://github.com/robertdavidgraham/masscan/issues/284 - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "src/pixie-timer.c", "#elif defined(CLOCK_MONOTONIC)", "#elif defined(NOT_A_MACRO)" - end - - system "make" - bin.install "bin/masscan" - end - - test do - assert_match(/adapter =/, `#{bin}/masscan --echo | head -n 6 | tail -n 1`) - end -end diff --git a/Formula/massren.rb b/Formula/massren.rb deleted file mode 100644 index 5c1b76b86595f..0000000000000 --- a/Formula/massren.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Massren < Formula - desc "Easily rename multiple files using your text editor" - homepage "https://github.com/laurent22/massren" - url "https://github.com/laurent22/massren/archive/v1.5.4.tar.gz" - sha256 "7a728d96a9e627c3609d147db64bba60ced33c407c75e9512147a5c83ba94f56" - - bottle do - cellar :any_skip_relocation - sha256 "b342e2efbfe3400787138da378787ec54e9c3bfc1930dfae203f4baa378e4535" => :mojave - sha256 "99afbeedc3d8ab1e3cf8ca525ac22f1b02efefbfd75b145b342f773cea639be6" => :high_sierra - sha256 "14874a768ef7f34aa638cdbd62aa32d2b07fc5c0e6668c86f6f080f172f0fe45" => :sierra - sha256 "ea67caccb6dacdbed8979f3dc243e224ff1900928dedf1ea8800f5256f3456b2" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/laurent22/massren").install buildpath.children - cd "src/github.com/laurent22/massren" do - system "go", "build", "-o", bin/"massren" - prefix.install_metafiles - end - end - - test do - system bin/"massren", "--config", "editor", "nano" - assert_match 'editor = "nano"', shell_output("#{bin}/massren --config") - end -end diff --git a/Formula/mat2.rb b/Formula/mat2.rb deleted file mode 100644 index be710ed1908c5..0000000000000 --- a/Formula/mat2.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Mat2 < Formula - desc "Metadata anonymization toolkit" - homepage "https://0xacab.org/jvoisin/mat2" - url "https://0xacab.org/jvoisin/mat2/uploads/e958dde527c7255e94ae2b347086ba9f/mat-0.6.0.tar.xz" - sha256 "96c55c455a5d556bed41487476ae98866ebe8e7ef01a75325c9e274c7e1ce842" - - bottle do - cellar :any_skip_relocation - sha256 "f107565490f9660d6e3f1e53a041e0137408d836dfd168aa99787470848d009b" => :mojave - sha256 "71dd41639831930449ea90b29655e9388014af0f50a216bd9efcbc1f5c88d8c9" => :high_sierra - sha256 "71dd41639831930449ea90b29655e9388014af0f50a216bd9efcbc1f5c88d8c9" => :sierra - end - - depends_on "exiftool" - depends_on "ffmpeg" - depends_on "poppler" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python" - - resource "mutagen" do - url "https://files.pythonhosted.org/packages/source/m/mutagen/mutagen-1.41.1.tar.gz" - sha256 "2ea9c900a05fa7f5f4c5bd9fc1475d7d576532e13b2f79b694452b997ff67200" - end - - # fix list option return value - patch :DATA - - def install - inreplace "libmat2/exiftool.py", "/usr/bin/exiftool", "#{HOMEBREW_PREFIX}/bin/exiftool" - inreplace "libmat2/video.py", "/usr/bin/ffmpeg", "#{HOMEBREW_PREFIX}/bin/ffmpeg" - - version = Language::Python.major_minor_version("python3") - pygobject3 = Formula["pygobject3"] - ENV["PYTHONPATH"] = lib/"python#{version}/site-packages" - ENV.append_path "PYTHONPATH", pygobject3.opt_lib+"python#{version}/site-packages" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{version}/site-packages" - - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - system "python3", *Language::Python.setup_install_args(prefix) - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/mat2", "-l" - end -end - -__END__ -diff --git a/mat2 b/mat2 -index ff8a253..151cbf6 100755 ---- a/mat2 -+++ b/mat2 -@@ -133,7 +133,7 @@ def show_parsers() -> bool: - continue - formats.add(' - %s (%s)' % (mtype, ', '.join(extensions))) - print('\n'.join(sorted(formats))) -- return True -+ return 0 - - - def __get_files_recursively(files: List[str]) -> Generator[str, None, None]: diff --git a/Formula/math-comp.rb b/Formula/math-comp.rb deleted file mode 100644 index 31aea7dbe381d..0000000000000 --- a/Formula/math-comp.rb +++ /dev/null @@ -1,52 +0,0 @@ -class MathComp < Formula - desc "Mathematical Components for the Coq proof assistant" - homepage "https://math-comp.github.io/math-comp/" - url "https://github.com/math-comp/math-comp/archive/mathcomp-1.7.0.tar.gz" - sha256 "69c01e99aad618fa9a0bb4a19af00827c505b8205816eb590e51abca49f4ef17" - revision 3 - head "https://github.com/math-comp/math-comp.git" - - bottle do - cellar :any_skip_relocation - sha256 "4b767eb03faffb0318d2757b1cb5ecd74ce630081dfd3fadf546c9378b5c8736" => :mojave - sha256 "b59397f2aa9112bcebac0fa50c0a5e78c7f80a21b99875065e09aa0c3879db50" => :high_sierra - sha256 "6870a4cbcf0d55293b9bf8f8c00376204184ffaa15d1c920b06eafc450686ec7" => :sierra - end - - depends_on "ocaml" => :build - depends_on "coq" - - def install - coqlib = "#{lib}/coq/" - - (buildpath/"mathcomp/Makefile.coq.local").write <<~EOS - COQLIB=#{coqlib} - EOS - - cd "mathcomp" do - system "make", "Makefile.coq" - system "make", "-f", "Makefile.coq", "MAKEFLAGS=#{ENV["MAKEFLAGS"]}" - system "make", "install", "MAKEFLAGS=#{ENV["MAKEFLAGS"]}" - - elisp.install "ssreflect/pg-ssr.el" - end - - doc.install Dir["docs/*"] - end - - test do - (testpath/"testing.v").write <<~EOS - From mathcomp Require Import ssreflect seq. - - Parameter T: Type. - Theorem test (s1 s2: seq T): size (s1 ++ s2) = size s1 + size s2. - Proof. by elim : s1 =>//= x s1 ->. Qed. - - Check test. - EOS - - coqc = Formula["coq"].opt_bin/"coqc" - cmd = "#{coqc} -R #{lib}/coq/user-contrib/mathcomp mathcomp testing.v" - assert_match /\Atest\s+: forall/, shell_output(cmd) - end -end diff --git a/Formula/matlab2tikz.rb b/Formula/matlab2tikz.rb deleted file mode 100644 index 759bfce2d34ef..0000000000000 --- a/Formula/matlab2tikz.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Matlab2tikz < Formula - desc "Convert MATLAB(R) figures into TikZ/Pgfplots figures" - homepage "https://github.com/matlab2tikz/matlab2tikz" - url "https://github.com/matlab2tikz/matlab2tikz/archive/v1.1.0.tar.gz" - sha256 "4e6fe80ebe4c8729650eb00679f97398c2696fd9399c17f9c5b60a1a6cf23a19" - head "https://github.com/matlab2tikz/matlab2tikz.git" - - bottle :unneeded - - def install - pkgshare.install Dir["src/*"] - end -end diff --git a/Formula/maven-completion.rb b/Formula/maven-completion.rb deleted file mode 100644 index 75abeda871453..0000000000000 --- a/Formula/maven-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class MavenCompletion < Formula - desc "Bash completion for Maven" - homepage "https://github.com/juven/maven-bash-completion" - url "https://github.com/juven/maven-bash-completion.git", - :revision => "106b6ca03badc9474cf7b6b1b7039ad950a17f89" - version "20160501" - head "https://github.com/juven/maven-bash-completion.git" - - bottle :unneeded - - def install - bash_completion.install "bash_completion.bash" => "maven" - end - - test do - assert_match "-F _mvn", - shell_output("source #{bash_completion}/maven && complete -p mvn") - end -end diff --git a/Formula/maven-shell.rb b/Formula/maven-shell.rb deleted file mode 100644 index edd94cfbd4db1..0000000000000 --- a/Formula/maven-shell.rb +++ /dev/null @@ -1,15 +0,0 @@ -class MavenShell < Formula - desc "Shell for Maven" - homepage "https://github.com/jdillon/mvnsh" - url "https://search.maven.org/remotecontent?filepath=org/sonatype/maven/shell/dist/mvnsh-assembly/1.1.0/mvnsh-assembly-1.1.0-bin.tar.gz" - sha256 "584008d726bf6f90271f4ccd03b549773cbbe62ba7e92bf131e67df3ac5a41ac" - - bottle :unneeded - - def install - # Remove windows files. - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - bin.install_symlink libexec/"bin/mvnsh" - end -end diff --git a/Formula/maven.rb b/Formula/maven.rb deleted file mode 100644 index 1010925615af5..0000000000000 --- a/Formula/maven.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Maven < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz" - sha256 "6a1b346af36a1f1a491c1c1a141667c5de69b42e6611d3687df26868bc0f4637" - - bottle :unneeded - - depends_on :java => "1.7+" - - conflicts_with "mvnvm", :because => "also installs a 'mvn' executable" - - def install - # Remove windows files - rm_f Dir["bin/*.cmd"] - - # Fix the permissions on the global settings file. - chmod 0644, "conf/settings.xml" - - libexec.install Dir["*"] - - # Leave conf file in libexec. The mvn symlink will be resolved and the conf - # file will be found relative to it - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "m2.conf" - (bin/basename).write_env_script file, Language::Java.overridable_java_home_env - end - end - - test do - (testpath/"pom.xml").write <<~EOS - - - 4.0.0 - org.homebrew - maven-test - 1.0.0-SNAPSHOT - - 1.8 - 1.8 - UTF-8 - - - EOS - (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~EOS - package org.homebrew; - public class MavenTest { - public static void main(String[] args) { - System.out.println("Testing Maven with Homebrew!"); - } - } - EOS - system "#{bin}/mvn", "compile", "-Duser.home=#{testpath}" - end -end diff --git a/Formula/maven@3.2.rb b/Formula/maven@3.2.rb deleted file mode 100644 index 163cff89a7dc6..0000000000000 --- a/Formula/maven@3.2.rb +++ /dev/null @@ -1,60 +0,0 @@ -class MavenAT32 < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz" - mirror "https://archive.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz" - sha256 "8c190264bdf591ff9f1268dc0ad940a2726f9e958e367716a09b8aaa7e74a755" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.7+" - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - - # Fix the permissions on the global settings file. - chmod 0644, "conf/settings.xml" - - prefix.install_metafiles - libexec.install Dir["*"] - - # Leave conf file in libexec. The mvn symlink will be resolved and the conf - # file will be found relative to it - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "m2.conf" - (bin/basename).write_env_script file, Language::Java.overridable_java_home_env - end - end - - test do - (testpath/"pom.xml").write <<~EOS - - - 4.0.0 - org.homebrew - maven-test - 1.0.0-SNAPSHOT - - 1.8 - 1.8 - UTF-8 - - - EOS - (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~EOS - package org.homebrew; - public class MavenTest { - public static void main(String[] args) { - System.out.println("Testing Maven with Homebrew!"); - } - } - EOS - system "#{bin}/mvn", "compile", "-Duser.home=#{testpath}" - end -end diff --git a/Formula/maven@3.3.rb b/Formula/maven@3.3.rb deleted file mode 100644 index ef476e1219607..0000000000000 --- a/Formula/maven@3.3.rb +++ /dev/null @@ -1,59 +0,0 @@ -class MavenAT33 < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" - mirror "https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" - sha256 "6e3e9c949ab4695a204f74038717aa7b2689b1be94875899ac1b3fe42800ff82" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.7+" - - def install - # Remove windows files - rm_f Dir["bin/*.cmd"] - - # Fix the permissions on the global settings file. - chmod 0644, "conf/settings.xml" - - libexec.install Dir["*"] - - # Leave conf file in libexec. The mvn symlink will be resolved and the conf - # file will be found relative to it - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "m2.conf" - (bin/basename).write_env_script file, Language::Java.overridable_java_home_env - end - end - - test do - (testpath/"pom.xml").write <<~EOS - - - 4.0.0 - org.homebrew - maven-test - 1.0.0-SNAPSHOT - - 1.8 - 1.8 - UTF-8 - - - EOS - (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~EOS - package org.homebrew; - public class MavenTest { - public static void main(String[] args) { - System.out.println("Testing Maven with Homebrew!"); - } - } - EOS - system "#{bin}/mvn", "compile", "-Duser.home=#{testpath}" - end -end diff --git a/Formula/maven@3.5.rb b/Formula/maven@3.5.rb deleted file mode 100644 index 666d784fa00c7..0000000000000 --- a/Formula/maven@3.5.rb +++ /dev/null @@ -1,59 +0,0 @@ -class MavenAT35 < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz" - mirror "https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz" - sha256 "ce50b1c91364cb77efe3776f756a6d92b76d9038b0a0782f7d53acf1e997a14d" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.7+" - - def install - # Remove windows files - rm_f Dir["bin/*.cmd"] - - # Fix the permissions on the global settings file. - chmod 0644, "conf/settings.xml" - - libexec.install Dir["*"] - - # Leave conf file in libexec. The mvn symlink will be resolved and the conf - # file will be found relative to it - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "m2.conf" - (bin/basename).write_env_script file, Language::Java.overridable_java_home_env - end - end - - test do - (testpath/"pom.xml").write <<~EOS - - - 4.0.0 - org.homebrew - maven-test - 1.0.0-SNAPSHOT - - 1.8 - 1.8 - UTF-8 - - - EOS - (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~EOS - package org.homebrew; - public class MavenTest { - public static void main(String[] args) { - System.out.println("Testing Maven with Homebrew!"); - } - } - EOS - system "#{bin}/mvn", "compile", "-Duser.home=#{testpath}" - end -end diff --git a/Formula/mawk.rb b/Formula/mawk.rb deleted file mode 100644 index d6eacfb71a1fa..0000000000000 --- a/Formula/mawk.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mawk < Formula - desc "Interpreter for the AWK Programming Language" - homepage "https://invisible-island.net/mawk/" - url "https://invisible-mirror.net/archives/mawk/mawk-1.3.4-20171017.tgz" - sha256 "db17115d1ed18ed1607c8b93291db9ccd4fe5e0f30d2928c3c5d127b23ec9e5b" - - bottle do - cellar :any_skip_relocation - sha256 "87b33818e9d764d65aa7690eef44dbd2596e02826cf78123ccd12591ee9498af" => :mojave - sha256 "c5cf51c1eba34b38ca2e9d3409842a0cf4af5e00f1436bf84b164d2a4385f572" => :high_sierra - sha256 "f5ff9c8eba46e085ad689358a2d969d8949dee1c850c2125f388776f54e61700" => :sierra - sha256 "4ef13dbc1202c66b982a91a103ed3d3204b036c0ab63b2f30938662c14436f68" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-silent-rules", - "--with-readline=/usr/lib", - "--mandir=#{man}" - system "make", "install" - end - - test do - mawk_expr = '/^mawk / {printf("%s-%s", $2, $3)}' - ver_out = shell_output("#{bin}/mawk -W version 2>&1 | #{bin}/mawk '#{mawk_expr}'") - assert_equal version.to_s, ver_out - end -end diff --git a/Formula/maxima.rb b/Formula/maxima.rb deleted file mode 100644 index 7a538aa8c6916..0000000000000 --- a/Formula/maxima.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Maxima < Formula - desc "Computer algebra system" - homepage "https://maxima.sourceforge.io/" - url "https://downloads.sourceforge.net/project/maxima/Maxima-source/5.41.0-source/maxima-5.41.0.tar.gz" - sha256 "daf8254600f4c7d9f079a0084178aaf036bd97a63b1e77b945f4120d7e401674" - - bottle do - sha256 "252b0b5b0d355c288f85bfa403212431a7a0c7455f4f616cda5960657a676f74" => :mojave - sha256 "557d50c32c4af36b4e0328678e57eccb5c90a4f926d47df1e9943821c933e90a" => :high_sierra - sha256 "5ae7804b062b9bdaf3d8983e90f6370509558158ed5a7b5fec9e7ea9516be3bd" => :sierra - sha256 "3a5894e1ff75af2e3bc1a6fdbb277bc17fa90d05f23d782f4c5b879dc6c9f48c" => :el_capitan - end - - depends_on "sbcl" => :build - depends_on "gettext" - depends_on "gnuplot" - depends_on "rlwrap" - - def install - ENV["LANG"] = "C" # per build instructions - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-gettext", - "--enable-sbcl", - "--enable-sbcl-exec", - "--with-sbcl=#{Formula["sbcl"].opt_bin}/sbcl" - system "make" - system "make", "install" - end - - test do - system "#{bin}/maxima", "--batch-string=run_testsuite(); quit();" - end -end diff --git a/Formula/maxwell.rb b/Formula/maxwell.rb deleted file mode 100644 index 1b21885e2fd16..0000000000000 --- a/Formula/maxwell.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Maxwell < Formula - desc "Maxwell's daemon, a mysql-to-json kafka producer" - homepage "http://maxwells-daemon.io/" - url "https://github.com/zendesk/maxwell/releases/download/v1.19.3/maxwell-1.19.3.tar.gz" - sha256 "f5a790b346041dfa5e9966eb83a6d3139e4538d6ceb8f5ceedad387653598f5e" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install Dir["*"] - - %w[maxwell maxwell-bootstrap].each do |f| - bin.install libexec/"bin/#{f}" - end - - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - fork do - exec "#{bin}/maxwell --log_level=OFF > #{testpath}/maxwell.log 2>/dev/null" - end - sleep 15 - assert_match "Using kafka version", IO.read("#{testpath}/maxwell.log") - end -end diff --git a/Formula/mbedtls.rb b/Formula/mbedtls.rb deleted file mode 100644 index ca2373421b59c..0000000000000 --- a/Formula/mbedtls.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Mbedtls < Formula - desc "Cryptographic & SSL/TLS library" - homepage "https://tls.mbed.org/" - url "https://tls.mbed.org/download/mbedtls-2.13.0-apache.tgz" - sha256 "593b4e4d2e1629fc407ab4750d69fa309a0ddb66565dc3deb5b60eddbdeb06da" - head "https://github.com/ARMmbed/mbedtls.git", :branch => "development" - - bottle do - cellar :any - sha256 "feccdb1c6eddee9925758aee4a1ffbab89d4ac43cd4c290feab8cec3f3f88197" => :mojave - sha256 "3f923b072ceb1f9a08321a333336bcfb45a5cac718f79a5533f8580735063838" => :high_sierra - sha256 "1ed5d87a59cff97897698d96e4bc99e59128d67b837aedff69c0dee1034e224a" => :sierra - sha256 "178b322e81d96190b004a71984be2ecd9af4daa1e35b7c4e2a8f9c0137374dc3" => :el_capitan - end - - depends_on "cmake" => :build - - def install - inreplace "include/mbedtls/config.h" do |s| - # enable pthread mutexes - s.gsub! "//#define MBEDTLS_THREADING_PTHREAD", "#define MBEDTLS_THREADING_PTHREAD" - # allow use of mutexes within mbed TLS - s.gsub! "//#define MBEDTLS_THREADING_C", "#define MBEDTLS_THREADING_C" - end - - system "cmake", "-DUSE_SHARED_MBEDTLS_LIBRARY=On", *std_cmake_args - system "make" - system "make", "install" - - # Why does Mbedtls ship with a "Hello World" executable. Let's remove that. - rm_f bin/"hello" - # Rename benchmark & selftest, which are awfully generic names. - mv bin/"benchmark", bin/"mbedtls-benchmark" - mv bin/"selftest", bin/"mbedtls-selftest" - # Demonstration files shouldn't be in the main bin - libexec.install bin/"mpi_demo" - end - - test do - (testpath/"testfile.txt").write("This is a test file") - # Don't remove the space between the checksum and filename. It will break. - expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249 testfile.txt" - assert_equal expected_checksum, shell_output("#{bin}/generic_sum SHA256 testfile.txt").strip - end -end diff --git a/Formula/mbelib.rb b/Formula/mbelib.rb deleted file mode 100644 index 9e66c45ceb460..0000000000000 --- a/Formula/mbelib.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Mbelib < Formula - desc "P25 Phase 1 and ProVoice vocoder" - homepage "https://github.com/szechyjs/mbelib" - url "https://github.com/szechyjs/mbelib/archive/v1.3.0.tar.gz" - sha256 "5a2d5ca37cef3b6deddd5ce8c73918f27936c50eb0e63b27e4b4fc493310518d" - head "https://github.com/szechyjs/mbelib.git" - - bottle do - cellar :any - sha256 "85f9f705e2e25ea205b637ad34bdc1e3d24734e646e6e6e53d39ab085a691303" => :mojave - sha256 "710bc1a0458b96c12c0a3b675a3410b1d86257ceb36370fd94952891e1a9b744" => :high_sierra - sha256 "45f0f9fafbe773fab43f621c62ce0c117c1d9a01fe32528b8b18fa6e94671a22" => :sierra - sha256 "8cd7158aaccceca6fe78a8031f1d58189b269b0dee86a10c349d3d514c4e33e2" => :el_capitan - sha256 "30b0fc540b32e244a1cf26719d97a4c57432dbd1537b22a3651fa3d43e1d285b" => :yosemite - sha256 "3a691e1170cb46a2bc2c8ca3dd456736d5233e9957ec30b9b0bee39b997254d1" => :mavericks - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "test" - system "make", "install" - end - end - - test do - (testpath/"mb.cpp").write <<~EOS - extern "C" { - #include "mbelib.h" - } - int main() { - float float_buf[160] = {1.23f, -1.12f, 4680.412f, 4800.12f, -4700.74f}; - mbe_synthesizeSilencef(float_buf); - return (float_buf[0] != 0); - } - EOS - system ENV.cxx, "mb.cpp", "-o", "test", "-L#{lib}", "-lmbe" - system "./test" - end -end diff --git a/Formula/mboxgrep.rb b/Formula/mboxgrep.rb deleted file mode 100644 index 6d2f1927fecf0..0000000000000 --- a/Formula/mboxgrep.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mboxgrep < Formula - desc "Scan a mailbox for messages matching a regular expression" - homepage "http://www.mboxgrep.org" - url "https://downloads.sourceforge.net/project/mboxgrep/mboxgrep/0.7.9/mboxgrep-0.7.9.tar.gz" - sha256 "78d375a05c3520fad4bca88509d4da0dbe9fba31f36790bd20880e212acd99d7" - - bottle do - cellar :any - sha256 "93f800f8bae502815c85bac9dd2d7ec85599caa1ee08b6a4860ca8db11ab7276" => :mojave - sha256 "431d64ae6c1387c69b052942ee6b268ac9afbcd5bfff9d02bc21aeeaaa9807dd" => :high_sierra - sha256 "44a294d075cb08e577c4d1c1e45c222bea93f3c8488f9bed54ded5b36797f536" => :sierra - sha256 "ecc1d1a83a7ffbc3414feb24c970b89509737f7d1de5c0d8dbd71ba55e008220" => :el_capitan - sha256 "08cbb574005db6e34cc191ae4f46670ca35af252e4e6bbc2041a92e32397bc49" => :yosemite - sha256 "bb5cefa83e2fb8b37dac858f3119aedb338b29e0eb2715cbff08b4644689ad86" => :mavericks - end - - depends_on "pcre" - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/mboxgrep", "--version" - end -end diff --git a/Formula/mcabber.rb b/Formula/mcabber.rb deleted file mode 100644 index 5ed7b762ccc6e..0000000000000 --- a/Formula/mcabber.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Mcabber < Formula - desc "Console Jabber client" - homepage "https://mcabber.com/" - url "https://mcabber.com/files/mcabber-1.1.0.tar.bz2" - sha256 "04fc2c22c36da75cf4b761b5deccd074a19836368f38ab9d03c1e5708b41f0bd" - revision 1 - - bottle do - sha256 "9d764d5cf8465b0fe0f005324e93984e2d5be8be6abea22bbf9729b9bdc7550d" => :mojave - sha256 "2823cae4b0424e6ee1e3beb912275889e4d25c11f90ce2395b77dc60dcda0b39" => :high_sierra - sha256 "eec539d040769c20a0515909bf79f65265c22b868c7fffa72a014e54b68a5ccb" => :sierra - sha256 "349752c0dfc6164a84e41548079657878fd5bd3226ec16df17470ac91f64fb16" => :el_capitan - end - - head do - url "https://mcabber.com/hg/", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gpgme" - depends_on "libgcrypt" - depends_on "libidn" - depends_on "libotr" - depends_on "loudmouth" - - def install - if build.head? - cd "mcabber" - inreplace "autogen.sh", "libtoolize", "glibtoolize" - system "./autogen.sh" - end - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-otr" - system "make", "install" - - pkgshare.install %w[mcabberrc.example contrib] - end - - def caveats; <<~EOS - A configuration file is necessary to start mcabber. The template is here: - #{opt_pkgshare}/mcabberrc.example - And there is a Getting Started Guide you will need to setup Mcabber: - https://wiki.mcabber.com/#index2h1 - EOS - end - - test do - system "#{bin}/mcabber", "-V" - end -end diff --git a/Formula/mcpp.rb b/Formula/mcpp.rb deleted file mode 100644 index 21e2e5fdbc368..0000000000000 --- a/Formula/mcpp.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mcpp < Formula - desc "Alternative C/C++ preprocessor" - homepage "https://mcpp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mcpp/mcpp/V.2.7.2/mcpp-2.7.2.tar.gz" - sha256 "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" - - bottle do - cellar :any - rebuild 1 - sha256 "40a63165c2df3feab3ed58c09a3f4b60daef5e112ec2f101f056aee56ca9819f" => :mojave - sha256 "fe1489ca47b0d9e551b4aa1b6cb2a4135848be79e3982856442080f75fcb45d7" => :high_sierra - sha256 "cdd368c63dc6403832c938967f8f099ec3d02acfcc5c75ab0426ad1cd213b045" => :sierra - sha256 "0be73930b3dbc8bc247c9a26acbc6115d3f5f665daaabc9ab64606ac6793ace9" => :el_capitan - sha256 "612e3efb23a8165af204338a20bbc27ae8fa2ad345964c24d2d7a206dee0317a" => :yosemite - end - - # stpcpy is a macro on macOS; trying to define it as an extern is invalid. - # Patch from ZeroC fixing EOL comment parsing - # https://forums.zeroc.com/forum/bug-reports/5445-mishap-in-slice-compilers?t=5309 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3fd7fba/mcpp/2.7.2.patch" - sha256 "4bc6a6bd70b67cb78fc48d878cd264b32d7bd0b1ad9705563320d81d5f1abb71" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-mcpplib" - system "make", "install" - end -end diff --git a/Formula/mcrypt.rb b/Formula/mcrypt.rb deleted file mode 100644 index 5d7d30a1e191f..0000000000000 --- a/Formula/mcrypt.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Mcrypt < Formula - desc "Replacement for the old crypt package and crypt(1) command" - homepage "https://mcrypt.sourceforge.io" - url "https://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz" - sha256 "5145aa844e54cca89ddab6fb7dd9e5952811d8d787c4f4bf27eb261e6c182098" - - bottle do - rebuild 1 - sha256 "de99a56fa872e7e30958cb6268af59c03e788791445a8efd71c87ac9efb2da02" => :mojave - sha256 "892bc8fe3e910389a4499a3466e240740d9eba2eae92974cb0d8c7ba0182d635" => :high_sierra - sha256 "c2d358a3e8b7c547c2b136bcd8c7e53c095ca9902ccc81c7af56cc007bfd1202" => :sierra - sha256 "3cac7c430b1673877ba52bada82c3f710024dbd9f8dd0ff230c17c4623987beb" => :el_capitan - sha256 "d7b36cbc7affc0e1851861381e92677abce2b011f184ab39234ff6cfbf021413" => :yosemite - sha256 "6c060224061c43733929524f3e45010192d5fc4ece1972fbce7259f96f514fa2" => :mavericks - sha256 "b6dd5f1210d4b0fffa7b14e4fce445c11d6245840fd38f08255149b6e27832c2" => :mountain_lion - end - - depends_on "mhash" - - resource "libmcrypt" do - url "https://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz" - sha256 "e4eb6c074bbab168ac47b947c195ff8cef9d51a211cdd18ca9c9ef34d27a373e" - end - - # Patch to correct inclusion of malloc function on OSX. - # Upstream: https://sourceforge.net/p/mcrypt/patches/14/ - patch :DATA - - def install - resource("libmcrypt").stage do - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - system "./configure", "--prefix=#{prefix}", - "--with-libmcrypt-prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.txt").write <<~EOS - Hello, world! - EOS - system bin/"mcrypt", "--key", "TestPassword", "--force", "test.txt" - rm "test.txt" - system bin/"mcrypt", "--key", "TestPassword", "--decrypt", "test.txt.nc" - end -end - -__END__ -diff --git a/src/rfc2440.c b/src/rfc2440.c -index 5a1f296..aeb501c 100644 ---- a/src/rfc2440.c -+++ b/src/rfc2440.c -@@ -23,7 +23,12 @@ - #include - #endif - #include -+ -+#ifdef __APPLE__ -+#include -+#else - #include -+#endif - - #include "xmalloc.h" - #include "keys.h" diff --git a/Formula/md.rb b/Formula/md.rb deleted file mode 100644 index 8bb6f40a5733f..0000000000000 --- a/Formula/md.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Md < Formula - desc "Process raw dependency files produced by cpp" - homepage "https://opensource.apple.com/source/adv_cmds/adv_cmds-147/md/" - url "https://opensource.apple.com/tarballs/adv_cmds/adv_cmds-147.tar.gz" - sha256 "e74d93496dd031ffea1ad8995686c1e9369a92de70c4c95a7f6e3d6ce2e7e434" - - bottle do - cellar :any_skip_relocation - sha256 "a4d92767a1393d4eb0bf029d449e81b7c56ddacec1a7de5235ac5435a9b880e9" => :mojave - sha256 "9ce0b54023eabc2b3aa46ee73ef3a36f1b0e5019b1d99cf822ae89c6840198a0" => :high_sierra - sha256 "b4187ef160dfbdefabaa05abb5bc044560ccf27410dc92be160760ec1142279d" => :sierra - sha256 "6d758b2227eec1332e56fac01eba034ace9df33c424cf8b96523d115342691ac" => :el_capitan - sha256 "979e6070affecebf0bcddb24075a3e059c5e4880da1666bb3dc96608f5d7148a" => :yosemite - sha256 "5faf5907b69c2a53c9bbbcfcb908d24c222181490b69116e09102212382be5ea" => :mavericks - end - - def install - cd "md" do - system ENV.cc, ENV.cflags, "-o", "md", "md.c" - bin.install "md" - man1.install "md.1" - end - end - - test do - (testpath/"foo.d").write "foo: foo.cpp\n" - - system "#{bin}/md", "-d", "-u", "Makefile", "foo.d" - - refute_predicate testpath/"foo.d", :exist? - assert_predicate testpath/"Makefile", :exist? - assert_equal "# Dependencies for File: foo:\nfoo: foo.cpp\n", - File.read("Makefile") - end -end diff --git a/Formula/md5deep.rb b/Formula/md5deep.rb deleted file mode 100644 index 5944d201e1123..0000000000000 --- a/Formula/md5deep.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Md5deep < Formula - desc "Recursively compute digests on files/directories" - homepage "https://github.com/jessek/hashdeep" - url "https://github.com/jessek/hashdeep/archive/release-4.4.tar.gz" - sha256 "dbda8ab42a9c788d4566adcae980d022d8c3d52ee732f1cbfa126c551c8fcc46" - head "https://github.com/jessek/hashdeep.git" - - bottle do - cellar :any_skip_relocation - sha256 "48fe3167c6211f51af6d8c1e39062438a7385e1b136078fbc0215170842ecbbe" => :mojave - sha256 "5f5636f7731398f775d757cb4ae913762f725d4d7bd3060a2640c155207d7a2a" => :high_sierra - sha256 "4ee90230c25f9872541d3f895fbe010765dd2e5449e56a0987e3652f89014916" => :sierra - sha256 "986dad46d2945aac775eb625e41b0236f2413b3924244d5e9aba445994c38687" => :el_capitan - sha256 "227b8b8e4f4dd71972cd02062faefef90515b44ef5c3ce55f5c665cf679a26d1" => :yosemite - sha256 "1bacd45d420975ff8b90d633e361b54c7f6a14776a41f175313360d31fb03ba4" => :mavericks - sha256 "5d68af238b95cffd8959418d804212c50a69cbae90c203d4abb56ceafea93399" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - # Fix compilation error due to pointer comparison - if MacOS.version >= :sierra - patch do - url "https://github.com/jessek/hashdeep/commit/8776134.patch?full_index=1" - sha256 "3d4e3114aee5505d1336158b76652587fd6f76e1d3af784912277a1f93518c64" - end - end - - def install - system "sh", "bootstrap.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"testfile.txt").write("This is a test file") - # Do not reduce the spacing of the below text. - assert_equal "91b7b0b1e27bfbf7bc646946f35fa972c47c2d32 testfile.txt", - shell_output("#{bin}/sha1deep -b testfile.txt").strip - end -end diff --git a/Formula/md5sha1sum.rb b/Formula/md5sha1sum.rb deleted file mode 100644 index 04c44537fdf77..0000000000000 --- a/Formula/md5sha1sum.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Md5sha1sum < Formula - desc "Hash utilities" - homepage "http://microbrew.org/tools/md5sha1sum/" - url "http://microbrew.org/tools/md5sha1sum/md5sha1sum-0.9.5.tar.gz" - mirror "https://mirrorservice.org/sites/distfiles.macports.org/md5sha1sum/md5sha1sum-0.9.5.tar.gz" - sha256 "2fe6b4846cb3e343ed4e361d1fd98fdca6e6bf88e0bba5b767b0fdc5b299f37b" - - bottle do - cellar :any - rebuild 2 - sha256 "69a347afe6f31c0c77b7c24cea80057e238d7af759ec2154d4a231c5a5dafe5b" => :mojave - sha256 "7bf0df78b9d06ef9cee025b92432217eee87eb337e51c1315862922438e65246" => :high_sierra - sha256 "6407844631c35a9dd03f7de29b811710af572cb0cd61afe6a184ec37ce7b8289" => :sierra - sha256 "f2f58d429e422e58a4bc58ab872de048bd873c1cdee017ebc0e133440a223745" => :el_capitan - sha256 "5ff64041e3ce1028522dabfa6e6260d1502033e207434e9d41598259f426af56" => :yosemite - sha256 "ea565d1739e48e43d36d46a86772e6159fef7c98260aa5d82404f3d2ffea81ef" => :mavericks - sha256 "f3925bbf60e1b8eaf47fe26cf19d49e61dd9623f891ec62a5500b07dbc186410" => :mountain_lion - end - - depends_on "openssl" - - def install - openssl = Formula["openssl"] - ENV["SSLINCPATH"] = openssl.opt_include - ENV["SSLLIBPATH"] = openssl.opt_lib - - system "./configure", "--prefix=#{prefix}" - system "make" - - bin.install "md5sum" - bin.install_symlink bin/"md5sum" => "sha1sum" - bin.install_symlink bin/"md5sum" => "ripemd160sum" - end - - test do - (testpath/"file.txt").write("This is a test file with a known checksum") - (testpath/"file.txt.sha1").write <<~EOS - 52623d47c33ad3fac30c4ca4775ca760b893b963 file.txt - EOS - system "#{bin}/sha1sum", "--check", "file.txt.sha1" - end -end diff --git a/Formula/mda-lv2.rb b/Formula/mda-lv2.rb deleted file mode 100644 index e671439b1fee4..0000000000000 --- a/Formula/mda-lv2.rb +++ /dev/null @@ -1,26 +0,0 @@ -class MdaLv2 < Formula - desc "LV2 port of the MDA plugins" - homepage "https://drobilla.net/software/mda-lv2/" - url "https://download.drobilla.net/mda-lv2-1.2.2.tar.bz2" - sha256 "a476c31ed9f8b009ebacc32a02d06ba9584c0d0d03f03dd62b1354d10a030442" - - bottle do - cellar :any - rebuild 1 - sha256 "a35e5b6845887a54ed2ff0ca4a23e32f4a5796e4f7275769b9f9264d3d99ebcc" => :mojave - sha256 "29fa1a1ff269eeb5dfe5c485be44146f144e35f39468872f95d76423c7b838c0" => :high_sierra - sha256 "9c26710de958efc12a5a9d6589ebb9202028c910ca9c203ec0cc07fbd28dcd65" => :sierra - sha256 "8177c7c9d23fc7daf59c764a36d336f2d7dd3d7617752c33f132ed34a08f37f0" => :el_capitan - sha256 "670da0efa727514c30897830e6dc38eef62b29e7f7c540f37821bc3997ecf64d" => :yosemite - sha256 "20fafd017914d54441227646c528b951c16adfe5b9ed4522b8d8cf074cc25acd" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "lv2" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end -end diff --git a/Formula/mdbtools.rb b/Formula/mdbtools.rb deleted file mode 100644 index abb87480222b5..0000000000000 --- a/Formula/mdbtools.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mdbtools < Formula - desc "Tools to facilitate the use of Microsoft Access databases" - homepage "https://github.com/brianb/mdbtools/" - url "https://github.com/brianb/mdbtools/archive/0.7.1.tar.gz" - sha256 "dcf310dc7b07e7ad2f9f6be16047dc81312cfe1ab1bd94d0fa739c8059af0b16" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "5d20b6ca1f505f4b7e245c29a602af6982f51873d04b7de3cd20908e23c3c081" => :mojave - sha256 "6be90f11c93d934c0703285ba77b8f590a1728e85c71c83942b9609e54abc015" => :high_sierra - sha256 "dffaa22015a33d1b146703dfc97460163b4534572ad0f906bbee66adfc5b3193" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "readline" - - def install - ENV.deparallelize - - if MacOS.version == :snow_leopard - mkdir "build-aux" - touch "build-aux/config.rpath" - end - - system "autoreconf", "-i", "-f" - system "./configure", "--prefix=#{prefix}", "--disable-man" - system "make", "install" - end -end diff --git a/Formula/mdcat.rb b/Formula/mdcat.rb deleted file mode 100644 index 9febf7e416b1e..0000000000000 --- a/Formula/mdcat.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mdcat < Formula - desc "Show markdown documents on text terminals" - homepage "https://github.com/lunaryorn/mdcat" - url "https://github.com/lunaryorn/mdcat/archive/mdcat-0.12.1.tar.gz" - sha256 "7722ac648e2e0ac99084b636b63c5e15ab9ed6666d1ab543117f8b93b715596e" - - bottle do - cellar :any_skip_relocation - sha256 "470f4170caf5590f33422645208b90331cc3470003e01cb60fdeb5f6f08160f5" => :mojave - sha256 "d17910e867451523507d48a6e34bf06c54149ea4bf0589ddbe336c497df50215" => :high_sierra - sha256 "1437cae51de6917f1490267462ee6a6c58c0a0a2a93f7911f0ee86cdb443c24d" => :sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - (testpath/"test.md").write <<~EOS - _lorem_ **ipsum** dolor **sit** _amet_ - EOS - output = shell_output("#{bin}/mdcat --no-colour test.md") - assert_match "lorem ipsum dolor sit amet", output - end -end diff --git a/Formula/mdds.rb b/Formula/mdds.rb deleted file mode 100644 index d5d0494adf0af..0000000000000 --- a/Formula/mdds.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Mdds < Formula - desc "Multi-dimensional data structure and indexing algorithm" - homepage "https://gitlab.com/mdds/mdds" - url "https://kohei.us/files/mdds/src/mdds-1.4.2.tar.bz2" - sha256 "82f38750248c007956c38ffefcc549932c8b257b76c72fb79a06eabc50107369" - - bottle do - cellar :any_skip_relocation - sha256 "a04c09f5f16e79b77edcf6385658ee28ae8d4187abe10d937acc2e31de33d83f" => :mojave - sha256 "f6f6896bcffcedd91647cf06bd924b1a08be6e6654f7a0cba7d1f471744f217c" => :high_sierra - sha256 "f6f6896bcffcedd91647cf06bd924b1a08be6e6654f7a0cba7d1f471744f217c" => :sierra - sha256 "f6f6896bcffcedd91647cf06bd924b1a08be6e6654f7a0cba7d1f471744f217c" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "boost" - needs :cxx11 - - def install - # Gets it to work when the CLT is installed - inreplace "configure.ac", "$CPPFLAGS -I/usr/include -I/usr/local/include", - "$CPPFLAGS -I/usr/local/include" - system "autoconf" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - mdds::flat_segment_tree fst(0, 4, 8); - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", - "-std=c++11", - "-I#{include.children.first}" - system "./test" - end -end diff --git a/Formula/mdf2iso.rb b/Formula/mdf2iso.rb deleted file mode 100644 index 571b30a265173..0000000000000 --- a/Formula/mdf2iso.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mdf2iso < Formula - desc "Tool to convert MDF (Alcohol 120% images) images to ISO images" - homepage "https://packages.debian.org/sid/mdf2iso" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mdf2iso/mdf2iso_0.3.1.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mdf2iso/mdf2iso_0.3.1.orig.tar.gz" - sha256 "906f0583cb3d36c4d862da23837eebaaaa74033c6b0b6961f2475b946a71feb7" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "444df3ab6a8ee34700f26459e93488d7ac3d3974ea29baa5d83f59d0014f6232" => :mojave - sha256 "b41429cb8a4191a705b656b627a375cc32aaf8992cb241e30fe6c66c4ab56c9c" => :high_sierra - sha256 "bc1358412281b1e486d9d1b6d25ae5665b02ac14f93f03603a966bd44ffda1d7" => :sierra - sha256 "fbe092bfc501d4abf8b0df052e26307219ea4bb9fb4eddb20df8b7734ff7fdf5" => :el_capitan - sha256 "aab6c1b85c8f863016f7db7ca6b35c56cc7442a6bdf6876f7b9b8ba24b58e5a6" => :yosemite - sha256 "8a755700501039ec87145fa6acd0d37e9ecaacd538481bf556e7ed69330bd085" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mdf2iso --help") - end -end diff --git a/Formula/mdk.rb b/Formula/mdk.rb deleted file mode 100644 index 0af9a25171f32..0000000000000 --- a/Formula/mdk.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Mdk < Formula - desc "GNU MIX development kit" - homepage "https://www.gnu.org/software/mdk/mdk.html" - url "https://ftp.gnu.org/gnu/mdk/v1.2.9/mdk-1.2.9.tar.gz" - mirror "https://ftpmirror.gnu.org/mdk/v1.2.9/mdk-1.2.9.tar.gz" - sha256 "6c265ddd7436925208513b155e7955e5a88c158cddda72c32714ccf5f3e74430" - revision 3 - - bottle do - sha256 "92c84c52d81c15c8df91fc27eee924bbf92bcf3a72f6c602843a9109cd76ab6e" => :mojave - sha256 "2182d170320ab65c99e6ae1cadb466226102aa0efa061688f3ea91cac4a60765" => :high_sierra - sha256 "a3be192cba5f0eee43813911d6204235358a478c64a4f3c4bdd8f083a2abba82" => :sierra - sha256 "89057b07b4bd94ba0b18d0f3c8e22c4b27bf1ba70ab1d7c2f34c0bbb656ecb9d" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "flex" - depends_on "glib" - depends_on "gtk+" - depends_on "guile" - depends_on "libglade" - depends_on "readline" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV["LANG"] = "en_US.UTF-8" - - (testpath/"hello.mixal").write <<~EOS - * (1) - * hello.mixal: say "hello world" in MIXAL (2) - * (3) - * label ins operand comment (4) - TERM EQU 19 the MIX console device number (5) - ORIG 1000 start address (6) - START OUT MSG(TERM) output data at address MSG (7) - HLT halt execution (8) - MSG ALF "MIXAL" (9) - ALF " HELL" (10) - ALF "O WOR" (11) - ALF "LD" (12) - END START end of the program (13) - EOS - system "#{bin}/mixasm", "hello" - output = `#{bin}/mixvm -r hello` - - expected = <<~EOS - Program loaded. Start address: 1000 - Running ... - MIXAL HELLO WORLDXXX - ... done - EOS - expected = expected.gsub("XXX", " " *53) - - assert_equal expected, output - end -end diff --git a/Formula/mdp.rb b/Formula/mdp.rb deleted file mode 100644 index 68b8d97d79e37..0000000000000 --- a/Formula/mdp.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Mdp < Formula - desc "Command-line based markdown presentation tool" - homepage "https://github.com/visit1985/mdp" - url "https://github.com/visit1985/mdp/archive/1.0.15.tar.gz" - sha256 "3edc8ea1551fdf290d6bba721105e2e2c23964070ac18c13b4b8d959cdf6116f" - head "https://github.com/visit1985/mdp.git" - - bottle do - cellar :any_skip_relocation - sha256 "606ffc22ff72a524f46ae683466098409e2db33cb5de58dad6ea179a9390cdbc" => :mojave - sha256 "0bfa062ad64e8da4fa6d1df9be7e8a52da7799f87fc012b80847ac58adf81830" => :high_sierra - sha256 "b38a74964fd0ac22fcbb50eb569b165128799f77a32d582f102278252b6bd291" => :sierra - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install "sample.md" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mdp -v") - end -end diff --git a/Formula/mdr.rb b/Formula/mdr.rb deleted file mode 100644 index a4636548601e9..0000000000000 --- a/Formula/mdr.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mdr < Formula - desc "Make diffs readable" - homepage "https://github.com/halffullheart/mdr" - url "https://github.com/halffullheart/mdr/archive/v1.0.1.tar.gz" - sha256 "103d52c47133a43cc7a6cb8a21bfabe2d6e35e222d5b675bc0c868699a127c67" - - bottle do - cellar :any_skip_relocation - sha256 "6dec04545f16f59af2b9b2397d4ebf65c204c827fef52cb20ef81c12d2273cda" => :mojave - sha256 "58d0fa82a0e6291d934bbc3f12f586fbb35282f9d15db017126e042f209dd664" => :high_sierra - sha256 "ef68c4389ee92beeb6c04e1859f398d108ffcce03fe692dd5776f7e12d776672" => :sierra - sha256 "0b522120151f1116ae7e681ff2fb129ecd26486202ca753d6b1de902f6f29334" => :el_capitan - sha256 "7048e71ef8f9a1d5c1712dce6cb33df08029038d771789021a1b8bc1e5f4ad10" => :yosemite - sha256 "b80b64d56e7e77e9b53dd8c308dd50450552b782a72204cb710adf2de28c4f9e" => :mavericks - sha256 "6280aee9902aabfcfdf6fb6ae094badc94ee1ad83d6caac4ca9b23f94803ec49" => :mountain_lion - end - - def install - system "rake" - libexec.install Dir["*"] - bin.install_symlink libexec/"build/dev/mdr" - end - - test do - system "#{bin}/mdr", "-h" - end -end diff --git a/Formula/mdv.rb b/Formula/mdv.rb deleted file mode 100644 index d6111d0bb0f13..0000000000000 --- a/Formula/mdv.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Mdv < Formula - include Language::Python::Virtualenv - - desc "Styled terminal markdown viewer" - homepage "https://github.com/axiros/terminal_markdown_viewer" - url "https://github.com/axiros/terminal_markdown_viewer/archive/1.6.3.tar.gz" - sha256 "58dbdf8c051a2d7f8c00e4dc13c655c335cbc2bc96851dd0388d73a21c4507b6" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "ef2eb47ab28960cd133635203010471e6d7fa60314de900c6d4e6fd6f1fee2a5" => :mojave - sha256 "c93b5842e994a1127706c1856a73ec8062f78f62fd5f3cbe5bf7d670962f6234" => :high_sierra - sha256 "d4a980db5be1cb783cb85c4f769b8e47f3ed09be8539ca7b02c8ea4c80e8e43d" => :sierra - end - - depends_on "python" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/d4/32/642bd580c577af37b00a1eb59b0eaa996f2d11dfe394f3dd0c7a8a2de81a/Markdown-2.6.7.tar.gz" - sha256 "daebf24846efa7ff269cfde8c41a48bb2303920c7b2c7c5e04fa82e6282d05c0" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz" - sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"test.md").write <<~EOS - # Header 1 - ## Header 2 - ### Header 3 - EOS - system "#{bin}/mdv", "#{testpath}/test.md" - end -end diff --git a/Formula/mdxmini.rb b/Formula/mdxmini.rb deleted file mode 100644 index e0f699f3e2418..0000000000000 --- a/Formula/mdxmini.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Mdxmini < Formula - desc "Plays music in X68000 MDX chiptune format" - homepage "https://clogging.web.fc2.com/psp/" - url "https://github.com/mistydemeo/mdxmini/archive/v1.0.0.tar.gz" - sha256 "5a407203f35d873c3cd5977213b0c33a1ce283d6b14483e9d434de79b05ca4e2" - - bottle do - cellar :any - rebuild 1 - sha256 "e93281dc0c64642e33763f0dc2a4cfa0a6da0dd4739222b0411e54913435ee27" => :mojave - sha256 "5bf36e82084146ab4604b4746bcf6634cfe4268f2044712e4d13519b21ab5165" => :high_sierra - sha256 "8e0daf3d508dad59074c567b8c8e60bd88c8026b7dfe1305e4e9c50ec5d8fbbd" => :sierra - sha256 "d20b94107c25833096401be6336544f283e6956758d4238e207e6a4e34fa5fdf" => :el_capitan - sha256 "55cf6b84d9a0e649e25db7626db954a47bf1061afd20a959972470b6e5cc9fa2" => :yosemite - sha256 "d08a617e3a8791b9e5dc93426f3d471408550a4a0bab85e33a726ccdcdcb683c" => :mavericks - end - - depends_on "sdl" - - resource "test_song" do - url "https://ftp.modland.com/pub/modules/MDX/-%20unknown/Popful%20Mail/pop-00.mdx" - sha256 "86f21fbbaf93eb60e79fa07c759b906a782afe4e1db5c7e77a1640e6bf63fd14" - end - - def install - # Specify Homebrew's cc - inreplace "mak/general.mak", "gcc", ENV.cc - system "make" - - # Makefile doesn't build a dylib - system ENV.cc, "-dynamiclib", "-install_name", "#{lib}/libmdxmini.dylib", - "-o", "libmdxmini.dylib", "-undefined", "dynamic_lookup", - *Dir["obj/*"] - - bin.install "mdxplay" - lib.install "libmdxmini.dylib" - (include/"libmdxmini").install Dir["src/*.h"] - end - - test do - resource("test_song").stage testpath - (testpath/"mdxtest.c").write <<~EOS - #include - #include "libmdxmini/mdxmini.h" - - int main(int argc, char** argv) - { - t_mdxmini mdx; - char title[100]; - mdx_open(&mdx, argv[1], argv[2]); - mdx_get_title(&mdx, title); - printf("%s\\n", title); - } - EOS - system ENV.cc, "mdxtest.c", "-L#{lib}", "-lmdxmini", "-o", "mdxtest" - - result = shell_output("#{testpath}/mdxtest #{testpath}/pop-00.mdx #{testpath}").chomp - result.force_encoding("ascii-8bit") if result.respond_to? :force_encoding - - # Song title is in Shift-JIS - # Trailing whitespace is intentional & shouldn't be removed. - l1 = "\x82\xDB\x82\xC1\x82\xD5\x82\xE9\x83\x81\x83C\x83\x8B " - l2 = "\x83o\x83b\x83N\x83A\x83b\x83v\x8D\xEC\x90\xAC " - expected = <<~EOS - #{l1} - #{l2} - (C)Falcom 1992 cv.\x82o\x82h. ass.\x82s\x82`\x82o\x81{ - EOS - expected.force_encoding("ascii-8bit") if result.respond_to? :force_encoding - assert_equal expected.delete!("\n"), result - end -end diff --git a/Formula/mecab-ipadic.rb b/Formula/mecab-ipadic.rb deleted file mode 100644 index 62af206345e1d..0000000000000 --- a/Formula/mecab-ipadic.rb +++ /dev/null @@ -1,52 +0,0 @@ -class MecabIpadic < Formula - desc "IPA dictionary compiled for MeCab" - homepage "https://taku910.github.io/mecab/" - # Canonical url is https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mecab-ipadic/mecab-ipadic_2.7.0-20070801+main.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mecab-ipadic/mecab-ipadic_2.7.0-20070801+main.orig.tar.gz" - version "2.7.0-20070801" - sha256 "b62f527d881c504576baed9c6ef6561554658b175ce6ae0096a60307e49e3523" - - bottle do - cellar :any_skip_relocation - sha256 "30967b4167d34f05c79f185d71a40198fff4067d0cce82aed59383548c898681" => :mojave - sha256 "ef5cf167b05fd74457d5c31a46750450e8f80720ebc705766ee10df6ed41a861" => :high_sierra - sha256 "33f42c18d7347708a56d8846c0bde5c8291b7685ce06b342e96442bca35f6663" => :sierra - sha256 "9f0ae0a62141e3b28807349cb7a9560e36770acb869f4a4e7a54ea1a28ef8ba5" => :el_capitan - sha256 "55703c812de3e7cff503b9cd1eafa0656b3f17c4885165ce4d8e4d2b2356050e" => :yosemite - sha256 "0a9ea36b7cc03f73ae34f72e078b7e84ebe814cf8e1cfbea2d5f876c1893b1c5" => :mavericks - sha256 "c70d627c447086a66b6eaca37cd98e1da099f65bfb6b87f2c47d1901d5e4a090" => :mountain_lion - end - - depends_on "mecab" - - link_overwrite "lib/mecab/dic" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --with-charset=utf8 - --with-dicdir=#{lib}/mecab/dic/ipadic - ] - - system "./configure", *args - system "make", "install" - end - - def caveats - <<~EOS - To enable mecab-ipadic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/ipadic - EOS - end - - test do - (testpath/"mecabrc").write <<~EOS - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/ipadic - EOS - - pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) - end -end diff --git a/Formula/mecab-jumandic.rb b/Formula/mecab-jumandic.rb deleted file mode 100644 index fd2f904db5601..0000000000000 --- a/Formula/mecab-jumandic.rb +++ /dev/null @@ -1,48 +0,0 @@ -class MecabJumandic < Formula - desc "See mecab" - homepage "https://taku910.github.io/mecab/" - url "https://www.mirrorservice.org/sites/distfiles.macports.org/mecab/mecab-jumandic-7.0-20130310.tar.gz" - mirror "https://mirrors.ustc.edu.cn/macports/distfiles/mecab/mecab-jumandic-7.0-20130310.tar.gz" - sha256 "eaf216758edee9a159bc3d02507007318686b9537943268c4565cc1f9ef07f15" - - bottle do - cellar :any_skip_relocation - sha256 "c9e83fb2bd4fd8aaa18b9475b512c7fb1e39a5903aca41ce23f9cccfdbdd0f09" => :mojave - sha256 "eefafd1bf8ea2aa43a50542328ee97492beab4730e52c4ec8ce6ed06844e8382" => :high_sierra - sha256 "4b821839b99982c506a1e262c9fa8b650620bc546a8725a5eaa1dc54b45e4822" => :sierra - sha256 "4b821839b99982c506a1e262c9fa8b650620bc546a8725a5eaa1dc54b45e4822" => :el_capitan - sha256 "4b821839b99982c506a1e262c9fa8b650620bc546a8725a5eaa1dc54b45e4822" => :yosemite - end - - depends_on "mecab" - - link_overwrite "lib/mecab/dic" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --with-charset=utf8 - --with-dicdir=#{lib}/mecab/dic/jumandic - ] - - system "./configure", *args - system "make", "install" - end - - def caveats - <<~EOS - To enable mecab-jumandic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/jumandic - EOS - end - - test do - (testpath/"mecabrc").write <<~EOS - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/jumandic - EOS - - pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) - end -end diff --git a/Formula/mecab-ko-dic.rb b/Formula/mecab-ko-dic.rb deleted file mode 100644 index e589cd6d0c0de..0000000000000 --- a/Formula/mecab-ko-dic.rb +++ /dev/null @@ -1,43 +0,0 @@ -class MecabKoDic < Formula - desc "See mecab" - homepage "https://bitbucket.org/eunjeon/mecab-ko-dic" - url "https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-1.6.1-20140814.tar.gz" - sha256 "251fb141f2e96d34ea62f557c146ab0615dea67502cce8811d408309f182cfb7" - - bottle do - cellar :any_skip_relocation - sha256 "ce481dc10cc5b42ba1aeb863e3fdec5edd69dbf80eb3636a30adbf088c4d0508" => :mojave - sha256 "6e7d71dc788c552a2d2e345ff67aad4a6f5c9078eb776056ccf96dd599c63f52" => :high_sierra - sha256 "68715d65e93b56fa18f70579b515b4e69128777e89c069da9af9ab6dd689bc9e" => :sierra - sha256 "51c5a40a0aad7906cbd83265fbecbc4de3a4f116abceebf9fdb02d17c75f5f69" => :el_capitan - sha256 "92be006bcc8552fdaddf82d21b9f8f528af010128febc721a5a5ba262eca99ce" => :yosemite - sha256 "0c958bf826cd358431f144dfb3d2d3da08c67cda59efe1d2998b54a401678515" => :mavericks - sha256 "b932747391e494b10a0fd8cd6002eb857f7a4ccb8e0ea2ea2a3a7b675bf6c237" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "mecab-ko" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--with-dicdir=#{lib}/mecab/dic/mecab-ko-dic" - system "make", "install" - end - - def caveats - <<~EOS - To enable mecab-ko-dic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/mecab-ko-dic - EOS - end - - test do - (testpath/"mecabrc").write <<~EOS - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/mecab-ko-dic - EOS - - pipe_output("mecab --rcfile=#{testpath}/mecabrc", "화학 이외의 것\n", 0) - end -end diff --git a/Formula/mecab-ko.rb b/Formula/mecab-ko.rb deleted file mode 100644 index 341f6e0af42d4..0000000000000 --- a/Formula/mecab-ko.rb +++ /dev/null @@ -1,36 +0,0 @@ -class MecabKo < Formula - desc "See mecab" - homepage "https://bitbucket.org/eunjeon/mecab-ko" - url "https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz" - version "0.996-ko-0.9.2" - sha256 "d0e0f696fc33c2183307d4eb87ec3b17845f90b81bf843bd0981e574ee3c38cb" - - bottle do - rebuild 1 - sha256 "a1a0b40d2cb5a689ae24a439af990c7a85f8136bfa2bc5c3fd0708300b2fd111" => :mojave - sha256 "d254239a9fec5e99de9590feb8d7c82f87e31324908003b059aea9a5d6092f2a" => :high_sierra - sha256 "86b35c767cb97ab0b5e895475c3254589b101bdc3c8666abc694ea9a480421ec" => :sierra - sha256 "c348042904040c28772c3f8f299debe574c6ebaaed7e41b23cac4980aeb8aa97" => :el_capitan - end - - conflicts_with "mecab", :becasue => "both install mecab binaries" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - - # Put dic files in HOMEBREW_PREFIX/lib instead of lib - inreplace "#{bin}/mecab-config", "${exec_prefix}/lib/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" - inreplace "#{etc}/mecabrc", "#{lib}/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" - end - - def post_install - (HOMEBREW_PREFIX/"lib/mecab/dic").mkpath - end - - test do - assert_equal "#{HOMEBREW_PREFIX}/lib/mecab/dic", shell_output("#{bin}/mecab-config --dicdir").chomp - end -end diff --git a/Formula/mecab-unidic-extended.rb b/Formula/mecab-unidic-extended.rb deleted file mode 100644 index d3102296c3e8a..0000000000000 --- a/Formula/mecab-unidic-extended.rb +++ /dev/null @@ -1,42 +0,0 @@ -class MecabUnidicExtended < Formula - desc "Extended morphological analyzer for MeCab" - homepage "https://osdn.net/projects/unidic/" - # Canonical: https://osdn.net/dl/unidic/unidic-mecab_kana-accent-2.1.2_src.zip - url "https://dotsrc.dl.osdn.net/osdn/unidic/58338/unidic-mecab_kana-accent-2.1.2_src.zip" - sha256 "70793cacda81b403eda71736cc180f3144303623755a612b13e1dffeb6554591" - - bottle do - cellar :any_skip_relocation - sha256 "7b297ee9b0d51169a5d5f7dd7047c1aaf18ade6bcaeccf2b570263aa6ab694b2" => :mojave - sha256 "8890b4d95d0c3ee114ec48ea95d66c1d8b8a273949a912140fa477ad9265be0b" => :high_sierra - sha256 "8890b4d95d0c3ee114ec48ea95d66c1d8b8a273949a912140fa477ad9265be0b" => :sierra - sha256 "8890b4d95d0c3ee114ec48ea95d66c1d8b8a273949a912140fa477ad9265be0b" => :el_capitan - end - - depends_on "mecab" - - link_overwrite "lib/mecab/dic" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-dicdir=#{lib}/mecab/dic/unidic-extended" - system "make", "install" - end - - def caveats - <<~EOS - To enable mecab-unidic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic-extended - EOS - end - - test do - (testpath/"mecabrc").write <<~EOS - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic-extended - EOS - - pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) - end -end diff --git a/Formula/mecab-unidic.rb b/Formula/mecab-unidic.rb deleted file mode 100644 index 88dcdc88a601d..0000000000000 --- a/Formula/mecab-unidic.rb +++ /dev/null @@ -1,45 +0,0 @@ -class MecabUnidic < Formula - desc "Morphological analyzer for MeCab" - homepage "https://osdn.net/projects/unidic/" - # Canonical: https://osdn.net/dl/unidic/unidic-mecab-2.1.2_src.zip - url "https://dotsrc.dl.osdn.net/osdn/unidic/58338/unidic-mecab-2.1.2_src.zip" - sha256 "6cce98269214ce7de6159f61a25ffc5b436375c098cc86d6aa98c0605cbf90d4" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "15b1cd2eb3cc04747ee04b71aaaf7b99323e58d5ebdb4e79b4c9c3d36e656f1d" => :mojave - sha256 "9062af2305cf97efe00b42bda1b89253b487cea1ef3675e6f4c187dea1e37033" => :high_sierra - sha256 "083c740c7c309410266eb793755477b6d37da6f6c85dddbb62e31b27dcbae135" => :sierra - sha256 "9ece990d89f8949c82003296bd256ebafddaf5d9caf03a63ea692f2009d52783" => :el_capitan - sha256 "f81fd4ff64eb6b7731fd4b818b17398b1eaea3d12d533a7340b9b12aa2331c0d" => :yosemite - sha256 "0f5b5d2d705004d502da930f1b8671a5ac34ad8d35ba7547846fa16577b43c87" => :mavericks - end - - depends_on "mecab" - - link_overwrite "lib/mecab/dic" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-dicdir=#{lib}/mecab/dic/unidic" - system "make", "install" - end - - def caveats - <<~EOS - To enable mecab-unidic dictionary, add to #{HOMEBREW_PREFIX}/etc/mecabrc: - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic - EOS - end - - test do - (testpath/"mecabrc").write <<~EOS - dicdir = #{HOMEBREW_PREFIX}/lib/mecab/dic/unidic - EOS - - pipe_output("mecab --rcfile=#{testpath}/mecabrc", "すもももももももものうち\n", 0) - end -end diff --git a/Formula/mecab.rb b/Formula/mecab.rb deleted file mode 100644 index 3816c2b8c31fa..0000000000000 --- a/Formula/mecab.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Mecab < Formula - desc "Yet another part-of-speech and morphological analyzer" - homepage "https://taku910.github.io/mecab/" - # Canonical url is https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mecab/mecab_0.996.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mecab/mecab_0.996.orig.tar.gz" - sha256 "e073325783135b72e666145c781bb48fada583d5224fb2490fb6c1403ba69c59" - - bottle do - rebuild 3 - sha256 "ef261d203140305ca8c9e4b7311c61176a17325df9454610d3eb33a312c4d3c5" => :mojave - sha256 "d48340df17075e4a6237ffb87306a42566f8eabb736c546d790586266758f387" => :high_sierra - sha256 "d98686ec62189de50f6ed5b7e682d59b90239c8dfd08cf32fd23543466586232" => :sierra - sha256 "03df92bdd092065a7cbca5953a0e352c16cadfff5c9f186bbe1ee882258e56d3" => :el_capitan - end - - conflicts_with "mecab-ko", :because => "both install mecab binaries" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - - # Put dic files in HOMEBREW_PREFIX/lib instead of lib - inreplace "#{bin}/mecab-config", "${exec_prefix}/lib/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" - inreplace "#{etc}/mecabrc", "#{lib}/mecab/dic", "#{HOMEBREW_PREFIX}/lib/mecab/dic" - end - - def post_install - (HOMEBREW_PREFIX/"lib/mecab/dic").mkpath - end - - test do - assert_equal "#{HOMEBREW_PREFIX}/lib/mecab/dic", shell_output("#{bin}/mecab-config --dicdir").chomp - end -end diff --git a/Formula/media-info.rb b/Formula/media-info.rb deleted file mode 100644 index 941f131294f73..0000000000000 --- a/Formula/media-info.rb +++ /dev/null @@ -1,49 +0,0 @@ -class MediaInfo < Formula - desc "Unified display of technical and tag data for audio/video" - homepage "https://mediaarea.net/" - url "https://mediaarea.net/download/binary/mediainfo/18.12/MediaInfo_CLI_18.12_GNU_FromSource.tar.bz2" - version "18.12" - sha256 "7cd7341a3d0a7e50671ffc3637b6e5af07acadb4becd34d0f5b8dc927def0df9" - - bottle do - cellar :any - sha256 "df5324630ddc624855232a41320894c29aafcac60254b68c85a70ed40544fba0" => :mojave - sha256 "7dd026a2e9c60ff8eff7f688dc776e00f7d7cbc70f92699151da3d771e1bb4c9" => :high_sierra - sha256 "84970690098c48fd0d165c987190aedd4bd69a6d60c86ae1153772371e11c62f" => :sierra - end - - depends_on "pkg-config" => :build - - def install - cd "ZenLib/Project/GNU/Library" do - args = ["--disable-debug", - "--disable-dependency-tracking", - "--enable-static", - "--enable-shared", - "--prefix=#{prefix}"] - system "./configure", *args - system "make", "install" - end - - cd "MediaInfoLib/Project/GNU/Library" do - args = ["--disable-debug", - "--disable-dependency-tracking", - "--with-libcurl", - "--enable-static", - "--enable-shared", - "--prefix=#{prefix}"] - system "./configure", *args - system "make", "install" - end - - cd "MediaInfo/Project/GNU/CLI" do - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - pipe_output("#{bin}/mediainfo", test_fixtures("test.mp3")) - end -end diff --git a/Formula/mediaconch.rb b/Formula/mediaconch.rb deleted file mode 100644 index 633a2f6fd09da..0000000000000 --- a/Formula/mediaconch.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Mediaconch < Formula - desc "Conformance checker and technical metadata reporter" - homepage "https://mediaarea.net/MediaConch" - url "https://mediaarea.net/download/binary/mediaconch/18.03.2/MediaConch_CLI_18.03.2_GNU_FromSource.tar.bz2" - version "18.03.2" - sha256 "8f8f31f1c3eb55449799ebb2031ef373934a0a9826ce6c2b2bdd32dacbf5ec4c" - - bottle do - cellar :any - sha256 "8828246691975f172635147cf5f89ce679397112288276d3fcde40252edc637f" => :mojave - sha256 "d888f17d7347095c3516e1a51238fe01636578c1a2cf1d3e0162bd05e027ed5e" => :high_sierra - sha256 "07b38dfc6333a72b2333562fc017ccb175a91de98d21c4046c445b62e7dbeb6a" => :sierra - sha256 "b110435077f1d4164238760baa2bfaaa5e63b3a49a9600a86d710cfefc594e89" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "libevent" - depends_on "sqlite" - - def install - cd "ZenLib/Project/GNU/Library" do - args = ["--disable-debug", - "--disable-dependency-tracking", - "--enable-shared", - "--enable-static", - "--prefix=#{prefix}", - # mediaconch installs libs/headers at the same paths as mediainfo - "--libdir=#{lib}/mediaconch", - "--includedir=#{include}/mediaconch"] - system "./configure", *args - system "make", "install" - end - - cd "MediaInfoLib/Project/GNU/Library" do - args = ["--disable-debug", - "--disable-dependency-tracking", - "--enable-static", - "--enable-shared", - "--with-libcurl", - "--prefix=#{prefix}", - "--libdir=#{lib}/mediaconch", - "--includedir=#{include}/mediaconch"] - system "./configure", *args - system "make", "install" - end - - cd "MediaConch/Project/GNU/CLI" do - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - pipe_output("#{bin}/mediaconch", test_fixtures("test.mp3")) - end -end diff --git a/Formula/mednafen.rb b/Formula/mednafen.rb deleted file mode 100644 index 80650cf6f0fe1..0000000000000 --- a/Formula/mednafen.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mednafen < Formula - desc "Multi-system emulator" - homepage "https://mednafen.github.io/" - url "https://mednafen.github.io/releases/files/mednafen-1.21.3.tar.xz" - sha256 "2e761e8834b098b7f1ab35dccaa6d2be715ee9106cf40af4919f6ca4b99ee3c6" - - bottle do - sha256 "1817b1b46cc5e573d9719d5619e9e78b8ea4e9bfbe7d911b808ddcefbd5a701f" => :mojave - sha256 "d4e4e7db27ba03192573ffd25cc1001aa6fee082c125f0aed68aebf6c84068f3" => :high_sierra - sha256 "ff2cdee178008a503e56b4ea5d607d4bee39360232c220eeda0f4fb572dbad92" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "libsndfile" - depends_on :macos => :sierra # needs clock_gettime - depends_on "sdl2" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - cmd = "#{bin}/mednafen | head -n1 | grep -o '[0-9].*'" - assert_equal version.to_s, shell_output(cmd).chomp - end -end diff --git a/Formula/megacmd.rb b/Formula/megacmd.rb deleted file mode 100644 index 98f2c795596c6..0000000000000 --- a/Formula/megacmd.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Megacmd < Formula - desc "Command-line client for mega.co.nz storage service" - homepage "https://github.com/t3rm1n4l/megacmd" - url "https://github.com/t3rm1n4l/megacmd/archive/0.015.tar.gz" - sha256 "7c8e7ea1732351a044f4c6568629f3bb91ca40cd4937736dc53b074495b1a7f5" - head "https://github.com/t3rm1n4l/megacmd.git" - - bottle do - cellar :any_skip_relocation - sha256 "a0e79f8dac4fdd9501fe421db7062fa0079a97cd2772a55a64ac5539b1b64d17" => :mojave - sha256 "ced96a75c37a3f1676ddff1ed47b66c4d76e9200c656e18585ab83d0b3c9ef57" => :high_sierra - sha256 "88cc0a307b4e6dc9ead44158859c647d3459f39cf841571f88c251a77ec57d10" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/t3rm1n4l/megacmd").install buildpath.children - cd "src/github.com/t3rm1n4l/megacmd" do - system "go", "build", "-o", bin/"megacmd" - prefix.install_metafiles - end - end - - test do - system bin/"megacmd", "--version" - end -end diff --git a/Formula/megatools.rb b/Formula/megatools.rb deleted file mode 100644 index f52a8e2cc593c..0000000000000 --- a/Formula/megatools.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Megatools < Formula - desc "Command-line client for Mega.co.nz" - homepage "https://megatools.megous.com/" - url "https://megatools.megous.com/builds/megatools-1.10.2.tar.gz" - sha256 "179e84c68e24696c171238a72bcfe5e28198e4c4e9f9043704f36e5c0b17c38a" - - bottle do - cellar :any - sha256 "68c1b72427e231c8bb1d05c79e78b0159eef3a9efec2ab6e11428813ecd39206" => :mojave - sha256 "f18ae236c38b575b3524c3dd1762b6291257231fdbadd09c8c84ef166cc3c34c" => :high_sierra - sha256 "096b9459462956a3257a8869154f9ce3003decaf3ed4f20ef65ba4d6094abc11" => :sierra - sha256 "956a0731c11c8ae3f999386cc95d57a787a19ad7ead8007b09efc7a96412c034" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "glib-networking" - depends_on "openssl" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Downloads a publicly hosted file and verifies its contents. - system "#{bin}/megadl", - "https://mega.co.nz/#!3Q5CnDCb!PivMgZPyf6aFnCxJhgFLX1h9uUTy9ehoGrEcAkGZSaI", - "--path", "testfile.txt" - assert_equal File.read("testfile.txt"), "Hello Homebrew!\n" - end -end diff --git a/Formula/memcache-top.rb b/Formula/memcache-top.rb deleted file mode 100644 index 06d7b4c7480fa..0000000000000 --- a/Formula/memcache-top.rb +++ /dev/null @@ -1,12 +0,0 @@ -class MemcacheTop < Formula - desc "Grab real-time stats from memcache" - homepage "https://code.google.com/archive/p/memcache-top/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/memcache-top/memcache-top-v0.6" - sha256 "d5f896a9e46a92988b782e340416312cc480261ce8a5818db45ccd0da8a0f22a" - - bottle :unneeded - - def install - bin.install "memcache-top-v#{version}" => "memcache-top" - end -end diff --git a/Formula/memcached.rb b/Formula/memcached.rb deleted file mode 100644 index 98f4dcc25235f..0000000000000 --- a/Formula/memcached.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Memcached < Formula - desc "High performance, distributed memory object caching system" - homepage "https://memcached.org/" - url "https://www.memcached.org/files/memcached-1.5.12.tar.gz" - sha256 "c02f97d5685617b209fbe25f3464317b234d765b427d254c2413410a5c095b29" - - bottle do - cellar :any - sha256 "50b40699e0f7f2fc8e2879f02fc331a6b43b75ab8a07412c80ab5c80e9a96b63" => :mojave - sha256 "7a901c44052f9e688dd39268bb023e16319a77526d6fd12de0b3d607c90f396f" => :high_sierra - sha256 "40335eedfc0f7ec9468d208818effa410ebdf589f0a30fe3f672d3ded1f81476" => :sierra - end - - depends_on "libevent" - - conflicts_with "mysql-cluster", :because => "both install `bin/memcached`" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-coverage" - system "make", "install" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/memcached/bin/memcached" - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - ProgramArguments - - #{opt_bin}/memcached - -l - localhost - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - pidfile = testpath/"memcached.pid" - # Assumes port 11211 is not already taken - system bin/"memcached", "--listen=localhost:11211", "--daemon", "--pidfile=#{pidfile}" - sleep 1 - assert_predicate pidfile, :exist?, "Failed to start memcached daemon" - pid = (testpath/"memcached.pid").read.chomp.to_i - Process.kill "TERM", pid - end -end diff --git a/Formula/memcacheq.rb b/Formula/memcacheq.rb deleted file mode 100644 index 95d5ec8bee3c4..0000000000000 --- a/Formula/memcacheq.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Memcacheq < Formula - desc "Queue service for memcache" - homepage "https://memcachedb.org/memcacheq/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/memcacheq/memcacheq-0.2.0.tar.gz" - sha256 "b314c46e1fb80d33d185742afe3b9a4fadee5575155cb1a63292ac2f28393046" - revision 3 - - bottle do - cellar :any - sha256 "5b7bfd2266c6573684654167ae9d62d4e0c7132e3ee718e65203dde90a40f67d" => :mojave - sha256 "cd1b3c570a517706bd3f96db3299dadfb5451d82130a9e781f522aafc0b4e924" => :high_sierra - sha256 "f8799f00891f07bac41323e83d6c78cadc49c4a00946edfacece742f0730f7d6" => :sierra - sha256 "babecb3a320c440e7aed14d3878cc9b65fd954263dc0707dbbeff7fa2aab7abe" => :el_capitan - end - - depends_on "berkeley-db" - depends_on "libevent" - - def install - ENV.append "CFLAGS", "-std=gnu89" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-threads" - system "make", "install" - end -end diff --git a/Formula/memtester.rb b/Formula/memtester.rb deleted file mode 100644 index d53416c7730c9..0000000000000 --- a/Formula/memtester.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Memtester < Formula - desc "Utility for testing the memory subsystem" - homepage "http://pyropus.ca/software/memtester/" - url "http://pyropus.ca/software/memtester/old-versions/memtester-4.3.0.tar.gz" - sha256 "f9dfe2fd737c38fad6535bbab327da9a21f7ce4ea6f18c7b3339adef6bf5fd88" - - bottle do - cellar :any_skip_relocation - sha256 "03b5970aafd201b0959c2ea339a1aa0cc97895e63707f3a441a5c9e3af8e9ace" => :mojave - sha256 "4c4e1dc949d00a6cd7728c5cc8502c81e2f7fb4bb6859bc3f87f6835928cbc70" => :high_sierra - sha256 "46f00de9e84e9c3b57533c7b16ef6410add54f13bc9af39a39dcce37d4b78751" => :sierra - sha256 "e9acbfc46d698da87473227fe344e9999642212289f8365dd4485bc52ce55238" => :el_capitan - sha256 "fc38d748b19b83c69547ab95bae6adce7009d14b6b21668e20417e7596691c6e" => :yosemite - sha256 "e2690d42f2744e37e9f0e119736653a92d0d1be2d10aed7ebc7364dad0eeb640" => :mavericks - sha256 "41a55e47f94006bd7b8a1876b3788811b98d383738dd7153f9c1f1e527322cec" => :mountain_lion - end - - def install - inreplace "Makefile" do |s| - s.change_make_var! "INSTALLPATH", prefix - s.gsub! "man/man8", "share/man/man8" - end - inreplace "conf-ld", " -s", "" - system "make", "install" - end - - test do - system bin/"memtester", "1", "1" - end -end diff --git a/Formula/menhir.rb b/Formula/menhir.rb deleted file mode 100644 index d847269e05829..0000000000000 --- a/Formula/menhir.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Menhir < Formula - desc "LR(1) parser generator for the OCaml programming language" - homepage "http://cristal.inria.fr/~fpottier/menhir" - url "http://cristal.inria.fr/~fpottier/menhir/menhir-20180905.tar.gz" - sha256 "82f3767290e39bf1ce3e260cd3cf486295891d57351cdccaedc6919000746750" - - bottle do - sha256 "5ce9eda23c034dc818034a29784cb110b013bf7d34fcb03646c2fbc2a4e2fdc0" => :mojave - sha256 "8465bd1f845ed9e5cd17d493409bb5f231274acf07f3e2dacd949f5b9ef4e14c" => :high_sierra - sha256 "b334910852aff3c273f57cfc9361e99595bd6ff3ce38a2bc61b8675ec4e9395b" => :sierra - sha256 "0c261facd1c50797c1b2ae1cd0db1fb921a7de568c84db9d60ea4b7aa5229dd4" => :el_capitan - end - - depends_on "ocamlbuild" => :build - depends_on "ocaml" - - def install - system "make", "PREFIX=#{prefix}", "all" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - (testpath/"test.mly").write <<~EOS - %token PLUS TIMES EOF - %left PLUS - %left TIMES - %token INT - %start prog - %% - - prog: x=exp EOF { x } - - exp: x = INT { x } - | lhs = exp; op = op; rhs = exp { op lhs rhs } - - %inline op: PLUS { fun x y -> x + y } - | TIMES { fun x y -> x * y } - EOS - - system "#{bin}/menhir", "--dump", "--explain", "--infer", "test.mly" - assert_predicate testpath/"test.ml", :exist? - assert_predicate testpath/"test.mli", :exist? - end -end diff --git a/Formula/mercurial.rb b/Formula/mercurial.rb deleted file mode 100644 index ffc8d35bc522a..0000000000000 --- a/Formula/mercurial.rb +++ /dev/null @@ -1,63 +0,0 @@ -# No head build supported; if you need head builds of Mercurial, do so outside -# of Homebrew. -class Mercurial < Formula - desc "Scalable distributed version control system" - homepage "https://mercurial-scm.org/" - url "https://www.mercurial-scm.org/release/mercurial-4.8.2.tar.gz" - sha256 "6c202cb9cf05e63b86477ebf84d6475eb10b4022ac2cd3a7481fb36d9c45fdb2" - - bottle do - sha256 "abb5c2dab3ed20595a5c328355710a75b37722c704b93b43bced699e71d53f65" => :mojave - sha256 "b5e7372a2c774e526c5a8916813cf91f7df7d51abf6f50a3c31ce73cb665f51f" => :high_sierra - sha256 "a79f963a93b9b5a9cbcdad7a9ccb3f792360e06d68fcac65eb04ff43ec599230" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - def install - ENV.prepend_path "PATH", Formula["python@2"].opt_libexec/"bin" - - system "make", "PREFIX=#{prefix}", "install-bin" - - # Install chg (see https://www.mercurial-scm.org/wiki/CHg) - cd "contrib/chg" do - system "make", "PREFIX=#{prefix}", "HGPATH=#{bin}/hg", \ - "HG=#{bin}/hg" - bin.install "chg" - end - - # Configure a nicer default pager - (buildpath/"hgrc").write <<~EOS - [pager] - pager = less -FRX - EOS - - (etc/"mercurial").install "hgrc" - - # Install man pages, which come pre-built in source releases - man1.install "doc/hg.1" - man5.install "doc/hgignore.5", "doc/hgrc.5" - - # install the completion scripts - bash_completion.install "contrib/bash_completion" => "hg-completion.bash" - zsh_completion.install "contrib/zsh_completion" => "_hg" - end - - def caveats - return unless (opt_bin/"hg").exist? - cacerts_configured = `#{opt_bin}/hg config web.cacerts`.strip - return if cacerts_configured.empty? - <<~EOS - Homebrew has detected that Mercurial is configured to use a certificate - bundle file as its trust store for TLS connections instead of using the - default OpenSSL store. If you have trouble connecting to remote - repositories, consider unsetting the `web.cacerts` property. You can - determine where the property is being set by running: - hg config --debug web.cacerts - EOS - end - - test do - system "#{bin}/hg", "init" - end -end diff --git a/Formula/mercury.rb b/Formula/mercury.rb deleted file mode 100644 index b77f3701dd1c8..0000000000000 --- a/Formula/mercury.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Mercury < Formula - desc "Logic/functional programming language" - homepage "https://mercurylang.org/" - url "https://dl.mercurylang.org/release/mercury-srcdist-14.01.1.tar.gz" - sha256 "98f7cbde7a7425365400feef3e69f1d6a848b25dc56ba959050523d546c4e88b" - revision 1 - - bottle do - cellar :any - sha256 "73f7a5af0479bdabb0bf50366ef2b638a69b42d17ac2de0b597e43f90c28377d" => :mojave - sha256 "2b68773f1e4dd35bb70ed17a94f82ef7bb4e11f5169869d8904d7f6ce667003a" => :high_sierra - sha256 "200fbd8b1e59fa3b4b7ef80d09955c697a31e83f15eb4c661bef1dc2458236d0" => :sierra - sha256 "daf916b14c3358f4d7ed6cdba153f96d6f4acec2d29b9fb43b027a6610bd783d" => :el_capitan - sha256 "afcff5ed87fdd477ce8037cca2f3fcab828b71cf78e1fbde951c4e17ae3e0b17" => :yosemite - sha256 "0e736ef6f5cc48bc9d6f7d50cb9df6fb52dba2b0b3bf2d83b378f83fcff4ecb9" => :mavericks - end - - def install - args = ["--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}", - "--disable-dependency-tracking", - "--enable-java-grade"] - - system "./configure", *args - - # The build system doesn't quite honour the mandir/infodir autoconf - # parameters. - system "make", "install", "PARALLEL=-j", - "INSTALL_MAN_DIR=#{man}", - "INSTALL_INFO_DIR=#{info}" - - # Remove batch files for windows. - rm Dir.glob("#{bin}/*.bat") - end - - test do - test_string = "Hello Homebrew\n" - path = testpath/"hello.m" - path.write <<~EOS - :- module hello. - :- interface. - :- import_module io. - :- pred main(io::di, io::uo) is det. - :- implementation. - main(IOState_in, IOState_out) :- - io.write_string("#{test_string}", IOState_in, IOState_out). - EOS - system "#{bin}/mmc", "--make", "hello" - assert_predicate testpath/"hello", :exist? - - assert_equal test_string, shell_output("#{testpath}/hello") - end -end diff --git a/Formula/mergelog.rb b/Formula/mergelog.rb deleted file mode 100644 index d974700d51412..0000000000000 --- a/Formula/mergelog.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mergelog < Formula - desc "Merges httpd logs from web servers behind round-robin DNS" - homepage "https://mergelog.sourceforge.io/" - url "https://downloads.sourceforge.net/mergelog/mergelog-4.5.tar.gz" - sha256 "fd97c5b9ae88fbbf57d3be8d81c479e0df081ed9c4a0ada48b1ab8248a82676d" - - bottle do - cellar :any_skip_relocation - sha256 "31d639e39928eee4373d5b18b619d168e02da3021e02d4d01e07209244d7712a" => :mojave - sha256 "87f4253bd8e0d556dadfabcb376d4f138d6d07a5884c331074692b21cff16397" => :high_sierra - sha256 "8f74bd002165acfb3009054be72f89794c11427194bb4bda229ea1c55fe0f4fb" => :sierra - sha256 "70f188fb9d576b86d968a82bc5b19daabeb17660a2fa155b31b1006d27767deb" => :el_capitan - sha256 "0c8abf1099d637be9dc4398c6fdde6cfa8a09c71fdb89546b546913a1a9d3868" => :yosemite - sha256 "e0eeb25b7eeb7fa532e2c950efed15aa6d9d9880530888cf1796a02fd5839eff" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/mergelog", "/dev/null" - end -end diff --git a/Formula/mergepbx.rb b/Formula/mergepbx.rb deleted file mode 100644 index 5d68addf300b0..0000000000000 --- a/Formula/mergepbx.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Mergepbx < Formula - desc "Merge XCode project files in git" - homepage "https://github.com/simonwagner/mergepbx" - url "https://github.com/simonwagner/mergepbx/archive/v0.10.tar.gz" - sha256 "1727ea75ffbd95426fe5d1d825bfcfb82dbea3dbc03e96f6d7d7ab2699c67572" - - bottle do - cellar :any_skip_relocation - sha256 "8188a967c09aadd08807dc11cb6695ebc6def26026532d426fd3bf1880fdc591" => :mojave - sha256 "2e295ff99574735aa7d1bb5244f1207a1f6f2054c4ec9da322e9d0981bdd5dd3" => :high_sierra - sha256 "35a545aa5eb9b4d761134818b792f50e007d7bb6235fbbf54e7733a8e35d742e" => :sierra - sha256 "9330e987d0c93a73b9edfbc77f265fa225b058d36b9210c797fe02494d1a656f" => :el_capitan - sha256 "77c1ec431ae1a7cd6fb4b04376e14e8aa1f7399cf840e006caf69c0f88839a7e" => :yosemite - sha256 "690559c9a95577702180b53493822f2c6887d2896f27c26cdfe9f2cad506809e" => :mavericks - end - - resource "dummy_base" do - url "https://raw.githubusercontent.com/simonwagner/mergepbx/a9bd9d8f4a732eff989ea03fbc0d78f6f6fb594f/test/fixtures/merge/dummy/dummy1/project.pbxproj.base" - sha256 "d2cf3fdec1b37489e9bc219c82a7ee945c3dfc4672c8b4e89bc08ae0087d6477" - end - - resource "dummy_mine" do - url "https://raw.githubusercontent.com/simonwagner/mergepbx/a9bd9d8f4a732eff989ea03fbc0d78f6f6fb594f/test/fixtures/merge/dummy/dummy1/project.pbxproj.mine" - sha256 "4c7147fbe518da6fa580879ff15a937be17ce1c0bc8edaaa15e1ef99a7b84282" - end - - resource "dummy_theirs" do - url "https://raw.githubusercontent.com/simonwagner/mergepbx/a9bd9d8f4a732eff989ea03fbc0d78f6f6fb594f/test/fixtures/merge/dummy/dummy1/project.pbxproj.theirs" - sha256 "22bc5df1c602261e71f156768a851d3de9fa2561588822a17b4d3c9ee7b77901" - end - - def install - system "./build.py" - bin.install "mergepbx" - end - - test do - system bin/"mergepbx", "-h" - resources.each { |r| r.stage testpath } - system bin/"mergepbx", *Dir["project.pbxproj.{base,mine,theirs}"] - end -end diff --git a/Formula/mesa.rb b/Formula/mesa.rb deleted file mode 100644 index caaf77edc8456..0000000000000 --- a/Formula/mesa.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Mesa < Formula - include Language::Python::Virtualenv - desc "Graphics Library" - homepage "https://www.mesa3d.org/" - url "https://mesa.freedesktop.org/archive/mesa-18.3.1.tar.xz" - sha256 "5b1f827d28684a25f6657289f8b7d47ac56395988c7ac23e0ec9a62b644bdc63" - head "https://gitlab.freedesktop.org/mesa/mesa.git" - - bottle do - sha256 "edaee6c52457309649bb1560e6700010e0ea556b750da7b8a6a3317e4277f96e" => :mojave - sha256 "759eaa314e96ade18846160484941ed7e3d8430800bc259dcdf9746007ac0b2e" => :high_sierra - sha256 "76dd8169dfc5bcbd8746eb8edc35bb1024da3971617f7589355751e355c3689c" => :sierra - end - - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python@2" => :build - depends_on "freeglut" => :test - depends_on "expat" - depends_on "gettext" - depends_on :x11 - - resource "Mako" do - url "https://files.pythonhosted.org/packages/eb/f3/67579bb486517c0d49547f9697e36582cd19dafb5df9e687ed8e22de57fa/Mako-1.0.7.tar.gz" - sha256 "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae" - end - - resource "gears.c" do - url "https://www.opengl.org/archives/resources/code/samples/glut_examples/mesademos/gears.c" - sha256 "7df9d8cda1af9d0a1f64cc028df7556705d98471fdf3d0830282d4dcfb7a78cc" - end - - def install - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages" - - resource("Mako").stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - - resource("gears.c").stage(pkgshare.to_s) - - mkdir "build" do - system "meson", "--prefix=#{prefix}", "-D buildtype=plain", "-D b_ndebug=true", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - system ENV.cc, "#{pkgshare}/gears.c", "-o", "gears", "-L#{lib}", "-I#{Formula["freeglut"].opt_include}", "-L#{Formula["freeglut"].opt_lib}", "-lgl", "-lglut" - end -end diff --git a/Formula/mesalib-glw.rb b/Formula/mesalib-glw.rb deleted file mode 100644 index e2190703f5ec4..0000000000000 --- a/Formula/mesalib-glw.rb +++ /dev/null @@ -1,25 +0,0 @@ -class MesalibGlw < Formula - desc "Open-source implementation of the OpenGL specification" - homepage "https://www.mesa3d.org" - url "https://mesa.freedesktop.org/archive/glw/glw-8.0.0.tar.bz2" - sha256 "2da1d06e825f073dcbad264aec7b45c649100e5bcde688ac3035b34c8dbc8597" - - bottle do - cellar :any - sha256 "2792091234f355f3649eb59dafbcff48abda8cc68ffd78e87ca69621b3d6bf61" => :mojave - sha256 "56a6531c8cc2bdb9dced7a17c0875b13cc774f591d5b4ea64e16fa17b09d8d72" => :high_sierra - sha256 "c0f19ff9584a9450f0f06bfc6013e1ff7e8cefd520c9d4f0fba1cf3c1b5ce7fc" => :sierra - sha256 "340b10f7e65eea02edd9853ff14e5458107c1fb3af99f9bf84b8913e3d96918e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on :x11 - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "install" - end -end diff --git a/Formula/meson-internal.rb b/Formula/meson-internal.rb deleted file mode 100644 index 1e6e0e0d4de51..0000000000000 --- a/Formula/meson-internal.rb +++ /dev/null @@ -1,54 +0,0 @@ -class MesonInternal < Formula - include Language::Python::Virtualenv - - desc "Fast and user friendly build system" - homepage "https://mesonbuild.com/" - url "https://github.com/mesonbuild/meson/releases/download/0.46.1/meson-0.46.1.tar.gz" - sha256 "19497a03e7e5b303d8d11f98789a79aba59b5ad4a81bd00f4d099be0212cee78" - - bottle do - cellar :any_skip_relocation - sha256 "4f65a25c147b6e21ce47cfd2d2f744ee3c0a55e9e1b07c9119dfeb52b13946fe" => :mojave - sha256 "cadf29ef1454acee4573d184a01e86e9c05d636b445c21255314dcca80cd9585" => :high_sierra - sha256 "ac82416f8f8f99bfd0c19ba2196028d541b945f6bf401a018f59a0d81775988a" => :sierra - sha256 "a2434e205cbab983230a6019fa9520adb2a5c2c31eb8d430ac80b74ddec790b6" => :el_capitan - end - - keg_only <<~EOS - this formula contains a heavily patched version of the meson build system and - is exclusively used internally by other formulae. - Users are advised to run `brew install meson` to install - the official meson build - EOS - - depends_on "ninja" - depends_on "python" - - # see https://github.com/mesonbuild/meson/pull/2577 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/a20d7df94112f93ea81f72ff3eacaa2d7e681053/meson-internal/meson-osx.patch?full_index=1" - sha256 "d8545f5ffbb4dcc58131f35a9a97188ecb522c6951574c616d0ad07495d68895" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"helloworld.c").write <<~EOS - main() { - puts("hi"); - return 0; - } - EOS - (testpath/"meson.build").write <<~EOS - project('hello', 'c') - executable('hello', 'helloworld.c') - EOS - - mkdir testpath/"build" do - system "#{bin}/meson", ".." - assert_predicate testpath/"build/build.ninja", :exist? - end - end -end diff --git a/Formula/meson.rb b/Formula/meson.rb deleted file mode 100644 index 3cddbade2c5be..0000000000000 --- a/Formula/meson.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Meson < Formula - desc "Fast and user friendly build system" - homepage "https://mesonbuild.com/" - revision 1 - head "https://github.com/mesonbuild/meson.git" - - stable do - url "https://github.com/mesonbuild/meson/releases/download/0.49.0/meson-0.49.0.tar.gz" - sha256 "fb0395c4ac208eab381cd1a20571584bdbba176eb562a7efa9cb17cace0e1551" - - # Fix issues with Qt, remove in 0.49.1 - # https://github.com/mesonbuild/meson/pull/4652 - patch do - url "https://github.com/mesonbuild/meson/commit/c1e416ff.patch?full_index=1" - sha256 "3be708cc65d2b6e54d01e64031c83b06abad2eca1c658b97b2230d1aa7d1062b" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "c8015e3f47873ed46e930e3819a059b7b1624951bae2fcc0ba58de05d25966fe" => :mojave - sha256 "602c437f746f1eab0705836647d2cb6d09d004743945b92db69f87a52c50caac" => :high_sierra - sha256 "602c437f746f1eab0705836647d2cb6d09d004743945b92db69f87a52c50caac" => :sierra - end - - depends_on "ninja" - depends_on "python" - - def install - version = Language::Python.major_minor_version("python3") - ENV["PYTHONPATH"] = lib/"python#{version}/site-packages" - - system "python3", *Language::Python.setup_install_args(prefix) - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - (testpath/"helloworld.c").write <<~EOS - main() { - puts("hi"); - return 0; - } - EOS - (testpath/"meson.build").write <<~EOS - project('hello', 'c') - executable('hello', 'helloworld.c') - EOS - - mkdir testpath/"build" do - system "#{bin}/meson", ".." - assert_predicate testpath/"build/build.ninja", :exist? - end - end -end diff --git a/Formula/mesos.rb b/Formula/mesos.rb deleted file mode 100644 index 10cede0da28fe..0000000000000 --- a/Formula/mesos.rb +++ /dev/null @@ -1,178 +0,0 @@ -class Mesos < Formula - desc "Apache cluster manager" - homepage "https://mesos.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=mesos/1.6.1/mesos-1.6.1.tar.gz" - mirror "https://archive.apache.org/dist/mesos/1.6.1/mesos-1.6.1.tar.gz" - sha256 "96147dd665379c561ffa652f04bcefa033a7566d6ad7474ab2eb7b6c708ef48a" - - bottle do - sha256 "3c423a61acbfa408ee0b52e73ab1a58761370808f56d7b22e5368f4f2c1d62dc" => :mojave - sha256 "bdb59fa6c7fc3c57bf664dd0f7419fc7a6e7c43de04257f725356286ff6fb3e3" => :high_sierra - sha256 "bc28b5f459fa64f6b557546a7816915d0e9d7ee17b92bbaa0070cd6ab929dd12" => :sierra - sha256 "92af4a0cb4c54669854d2dbbbd07509005318bbae72fff6674f2c47c9ebb596a" => :el_capitan - end - - depends_on "maven" => :build - depends_on "apr-util" - depends_on :java => "1.8" - depends_on :macos => :mountain_lion - depends_on "python@2" - depends_on "subversion" - - conflicts_with "nanopb-generator", - :because => "they depend on an incompatible version of protobuf" - - if DevelopmentTools.clang_build_version >= 802 # does not affect < Xcode 8.3 - # _scheduler.so segfault when Mesos is built with Xcode 8.3.2 - # Reported 29 May 2017 https://issues.apache.org/jira/browse/MESOS-7583 - # The issue does not occur with Xcode 9 beta 3. - fails_with :clang do - build 802 - cause "Segmentation fault in _scheduler.so" - end - end - - # error: 'Megabytes(32).Megabytes::' is not a constant expression - # because it refers to an incompletely initialized variable - fails_with :gcc => "7" - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/1b/90/f531329e628ff34aee79b0b9523196eb7b5b6b398f112bb0c03b24ab1973/protobuf-3.6.1.tar.gz" - sha256 "1489b376b0f364bcc6f89519718c057eb191d7ad6f1b395ffd93d1aa45587811" - end - - # build dependencies for protobuf - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/ca/a9/62f96decb1e309d6300ebe7eee9acfd7bccaeedd693794437005b9067b44/pytz-2018.5.tar.gz" - sha256 "ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277" - end - - resource "python-gflags" do - url "https://files.pythonhosted.org/packages/df/ec/e31302d355bcb9d207d9b858adc1ecc4a6d8c855730c8ba4ddbdd3f8eb8d/python-gflags-3.1.2.tar.gz" - sha256 "40ae131e899ef68e9e14aa53ca063839c34f6a168afe622217b5b875492a1ee2" - end - - resource "google-apputils" do - url "https://files.pythonhosted.org/packages/69/66/a511c428fef8591c5adfa432a257a333e0d14184b6c5d03f1450827f7fe7/google-apputils-0.4.2.tar.gz" - sha256 "47959d0651c32102c10ad919b8a0ffe0ae85f44b8457ddcf2bdc0358fb03dc29" - end - - needs :cxx11 - - def install - # Disable optimizing as libc++ does not play well with optimized clang - # builds (see https://llvm.org/bugs/show_bug.cgi?id=28469 and - # https://issues.apache.org/jira/browse/MESOS-5745). - # - # NOTE: We cannot use `--disable-optimize` since we also pass e.g., - # CXXFLAGS via environment variables. Since compiler flags are passed via - # environment variables the Mesos build will silently ignore flags like - # `--[disable|enable]-optimize`. - ENV.O0 unless DevelopmentTools.clang_build_version >= 900 - - # work around to avoid `_clock_gettime` symbol not found error. - if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - ENV["ac_have_clock_syscall"] = "no" - end - - # work around distutils abusing CC instead of using CXX - # https://issues.apache.org/jira/browse/MESOS-799 - # https://github.com/Homebrew/legacy-homebrew/pull/37087 - native_patch = <<~EOS - import os - os.environ["CC"] = os.environ["CXX"] - os.environ["LDFLAGS"] = "@LIBS@" - \\0 - EOS - inreplace "src/python/executor/setup.py.in", - "import ext_modules", - native_patch - - inreplace "src/python/scheduler/setup.py.in", - "import ext_modules", - native_patch - - # skip build javadoc because Homebrew's setting user.home in _JAVA_OPTIONS - # would trigger maven-javadoc-plugin bug. - # https://issues.apache.org/jira/browse/MESOS-3482 - maven_javadoc_patch = <<~EOS - - true - - \\0 - EOS - inreplace "src/java/mesos.pom.in", - "http://mesos.apache.org", - maven_javadoc_patch - - ENV.cxx11 - - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-svn=#{Formula["subversion"].opt_prefix}", - "--with-apr=#{Formula["apr"].opt_libexec}", - "--disable-python" - system "make" - system "make", "install" - - # The native Python modules `executor` and `scheduler` (see below) fail to - # link to Subversion libraries if Homebrew isn't installed in `/usr/local`. - ENV.append_to_cflags "-L#{Formula["subversion"].opt_lib}" - - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-svn=#{Formula["subversion"].opt_prefix}", - "--with-apr=#{Formula["apr"].opt_libexec}", - "--enable-python" - ["native", "interface", "executor", "scheduler", "cli", ""].each do |p| - cd "src/python/#{p}" do - system "python", *Language::Python.setup_install_args(prefix) - end - end - - # stage protobuf build dependencies - ENV.prepend_create_path "PYTHONPATH", buildpath/"protobuf/lib/python2.7/site-packages" - %w[python-dateutil pytz python-gflags google-apputils].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(buildpath/"protobuf") - end - end - - protobuf_path = libexec/"protobuf/lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", protobuf_path - %w[six protobuf].each do |r| - resource(r).stage do - if r == "protobuf" - ln_s buildpath/"protobuf/lib/python2.7/site-packages/google/apputils", "google/apputils" - end - system "python", *Language::Python.setup_install_args(libexec/"protobuf") - end - end - pth_contents = "import site; site.addsitedir('#{protobuf_path}')\n" - (lib/"python2.7/site-packages/homebrew-mesos-protobuf.pth").write pth_contents - - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - sbin.env_script_all_files(libexec/"sbin", Language::Java.java_home_env("1.8")) - end - - test do - assert_match version.to_s, shell_output("#{sbin}/mesos-agent --version") - assert_match version.to_s, shell_output("#{sbin}/mesos-master --version") - assert_match "Usage: mesos", shell_output("#{bin}/mesos 2>&1", 1) - system "python", "-c", "import mesos.native" - end -end diff --git a/Formula/metabase.rb b/Formula/metabase.rb deleted file mode 100644 index 339cc79e652d1..0000000000000 --- a/Formula/metabase.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Metabase < Formula - desc "Business intelligence report server" - homepage "https://www.metabase.com/" - url "http://downloads.metabase.com/v0.30.4/metabase.jar" - sha256 "9a79d17d93753296c7933ddf47f0142672072349584a8d9b6f1ca37476a17e57" - - head do - url "https://github.com/metabase/metabase.git" - - depends_on "leiningen" => :build - depends_on "node" => :build - depends_on "yarn" => :build - end - - bottle :unneeded - - depends_on :java => "1.8" - - def install - if build.head? - system "./bin/build" - libexec.install "target/uberjar/metabase.jar" - else - libexec.install "metabase.jar" - end - - (bin/"metabase").write <<~EOS - #!/bin/bash - export JAVA_HOME="$(#{Language::Java.java_home_cmd("1.8")})" - exec java -jar "#{libexec}/metabase.jar" "$@" - EOS - end - - plist_options :startup => true, :manual => "metabase" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/metabase - - RunAtLoad - - WorkingDirectory - #{var}/metabase - StandardOutPath - #{var}/metabase/server.log - StandardErrorPath - /dev/null - - - EOS - end - - test do - system bin/"metabase", "migrate", "up" - end -end diff --git a/Formula/metaproxy.rb b/Formula/metaproxy.rb deleted file mode 100644 index f5dc3f15e8ea5..0000000000000 --- a/Formula/metaproxy.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Metaproxy < Formula - desc "Z39.50 proxy and router utilizing Yaz toolkit" - homepage "https://www.indexdata.com/metaproxy" - url "http://ftp.indexdata.dk/pub/metaproxy/metaproxy-1.15.0.tar.gz" - sha256 "b43a9e4dd2c231442ea07af7a05e929cd6cae2921826f66d201397b838aa8aac" - revision 1 - - bottle do - cellar :any - sha256 "381c1a291c26cb0c6f762a406073fd8cf928546b807a1b07008eff445596213c" => :mojave - sha256 "9d8bde99c0381cb3a72e26dd41a5d6595be4a951fe72719a88a2444839a2880e" => :high_sierra - sha256 "f3ae9ef9ab5c6d055638f1b92b93d05b732dac62f1ecd249296644895a469314" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "yazpp" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - # Test by making metaproxy test a trivial configuration file (etc/config0.xml). - test do - (testpath/"test-config.xml").write <<~EOS - - - - - - @:9070 - FN - /fn_stat - - - - - - - - - - - - EOS - - system "#{bin}/metaproxy", "-t", "--config", "#{testpath}/test-config.xml" - end -end diff --git a/Formula/metashell.rb b/Formula/metashell.rb deleted file mode 100644 index b1a96fb7f0143..0000000000000 --- a/Formula/metashell.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Metashell < Formula - desc "Metaprogramming shell for C++ templates" - homepage "http://metashell.org" - url "https://github.com/metashell/metashell/archive/v4.0.0.tar.gz" - sha256 "02a88204fe36428cc6c74453059e8c399759d4306e8156d0920aefa4c07efc64" - - bottle do - cellar :any_skip_relocation - sha256 "4629398ca4b1bf5cf7779b8d5c9e6f066ea5e96f66063c265f0b13e106a0cba0" => :mojave - sha256 "05387acf4adf651aaa011d02f5a08ddf49725a550440cc7eb496c1112166852b" => :high_sierra - sha256 "14fc35b7b932170333d8260b8bda881844ffc68870aeb1a120ebd74072ef900c" => :sierra - sha256 "209c4c475fa58cb42a2e98bd34c11a983463465ce4ee5470474177d6740fb2e5" => :el_capitan - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - - # Build internal Clang - mkdir "3rd/templight/build" do - system "cmake", "../llvm", "-DLLVM_ENABLE_TERMINFO=OFF", *std_cmake_args - system "make", "templight" - end - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.hpp").write <<~EOS - template struct add_const { using type = const T; }; - add_const::type - EOS - output = shell_output("cat #{testpath}/test.hpp | #{bin}/metashell -H") - assert_match "const int", output - end -end diff --git a/Formula/metis.rb b/Formula/metis.rb deleted file mode 100644 index c2586e49b338c..0000000000000 --- a/Formula/metis.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Metis < Formula - desc "Programs that partition graphs and order matrices" - homepage "http://glaros.dtc.umn.edu/gkhome/views/metis" - url "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" - sha256 "76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2" - - bottle do - cellar :any - sha256 "f3cdcf0cc5af4ddd27a4550d4a73cffcb34058fe34604b09d453610460d24465" => :mojave - sha256 "88b6965d941a87044150238387971c4bb94ed2ffca327affccaf311d666a2b4b" => :high_sierra - sha256 "9c8deed80ece8c24e7ebccbce8410557b27afe711d3f59fccb7d781254d0cc34" => :sierra - sha256 "54f75262475744bc6ad3ba66ac801e03c18bbac00a9bcf0ca9d05853f2022498" => :el_capitan - sha256 "b33c2fc2c8a1cdb9f48faf41201bdc6384090b8dbd6ed3eecd05264eb6431c0b" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "make", "config", "prefix=#{prefix}", "shared=1" - system "make", "install" - - pkgshare.install "graphs" - end - - test do - ["4elt", "copter2", "mdual"].each do |g| - cp pkgshare/"graphs/#{g}.graph", testpath - system "#{bin}/graphchk", "#{g}.graph" - system "#{bin}/gpmetis", "#{g}.graph", "2" - system "#{bin}/ndmetis", "#{g}.graph" - end - cp [pkgshare/"graphs/test.mgraph", pkgshare/"graphs/metis.mesh"], testpath - system "#{bin}/gpmetis", "test.mgraph", "2" - system "#{bin}/mpmetis", "metis.mesh", "2" - end -end diff --git a/Formula/metricbeat.rb b/Formula/metricbeat.rb deleted file mode 100644 index 24cb47b90a144..0000000000000 --- a/Formula/metricbeat.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Metricbeat < Formula - desc "Collect metrics from your systems and services" - homepage "https://www.elastic.co/products/beats/metricbeat" - # Pinned at 6.2.x because of a licencing issue - # See: https://github.com/Homebrew/homebrew-core/pull/28995 - url "https://github.com/elastic/beats/archive/v6.2.4.tar.gz" - sha256 "87d863cf55863329ca80e76c3d813af2960492f4834d4fea919f1d4b49aaf699" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "61b1556e02c1e15dcf152b52ad3f0016314e6c631aa4a0597ce3907e0bd75f9f" => :mojave - sha256 "5b8962f3d4f0a6844d029063b8df98e61a29b7ae5b0e41692222c3bdaa2b8aa9" => :high_sierra - sha256 "8d569b6b800ea8681496651812b2431dd478a28028e2059a5ed8b3a1833ac8aa" => :sierra - sha256 "f8c5c12f3fdf6dff8abaf1cb7077f8c71a26e8bafc9561f5a08f3d2e6fbbbe2d" => :el_capitan - end - - depends_on "go" => :build - depends_on "python@2" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages" - - resource("virtualenv").stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" - - cd "src/github.com/elastic/beats/metricbeat" do - system "make" - # prevent downloading binary wheels during python setup - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "make", "DEV_OS=darwin", "update" - - (etc/"metricbeat").install Dir["metricbeat.*", "fields.yml", "modules.d"] - (libexec/"bin").install "metricbeat" - prefix.install "_meta/kibana" - end - - prefix.install_metafiles buildpath/"src/github.com/elastic/beats" - - (bin/"metricbeat").write <<~EOS - #!/bin/sh - exec #{libexec}/bin/metricbeat \ - --path.config #{etc}/metricbeat \ - --path.data #{var}/lib/metricbeat \ - --path.home #{prefix} \ - --path.logs #{var}/log/metricbeat \ - "$@" - EOS - end - - plist_options :manual => "metricbeat" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/metricbeat - RunAtLoad - - - - EOS - end - - test do - (testpath/"config/metricbeat.yml").write <<~EOS - metricbeat.modules: - - module: system - metricsets: ["load"] - period: 1s - output.file: - enabled: true - path: #{testpath}/data - filename: metricbeat - EOS - - (testpath/"logs").mkpath - (testpath/"data").mkpath - - pid = fork do - exec bin/"metricbeat", "-path.config", testpath/"config", "-path.data", - testpath/"data" - end - - begin - sleep 30 - assert_predicate testpath/"data/metricbeat", :exist? - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/mfcuk.rb b/Formula/mfcuk.rb deleted file mode 100644 index 2bb1dd732d693..0000000000000 --- a/Formula/mfcuk.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mfcuk < Formula - desc "MiFare Classic Universal toolKit" - homepage "https://github.com/nfc-tools/mfcuk" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mfcuk/mfcuk-0.3.8.tar.gz" - sha256 "977595765b4b46e4f47817e9500703aaf5c1bcad39cb02661f862f9d83f13a55" - - bottle do - cellar :any - sha256 "715ca194ceaf40ef63f83f801479a2844663c564705282272805938b5747af6d" => :mojave - sha256 "1dddb64e65b9fb1e387f2bd18ed2ae0f600aa868fa92a0141f66fb835a1e8dac" => :high_sierra - sha256 "a4ae4d6f6cdec9dd28c52ff04da99b9de86c79a19c6e182ef3a557f48dde0741" => :sierra - sha256 "8b329dbd3feb25bc4f04f40451cf25e832395721a5184eb4ee287366aaa06334" => :el_capitan - sha256 "bdf696192e1a660b2fa1ad58498bdce941b1d45c4b51847b95427f41debd4c2d" => :yosemite - sha256 "1394e4115a4e65abacc23e81659fd77475d6039ac39979cea7fd335ee5cf09e6" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libnfc" - depends_on "libusb" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system bin/"mfcuk", "-h" - end -end diff --git a/Formula/mfoc.rb b/Formula/mfoc.rb deleted file mode 100644 index d9e52846ac97e..0000000000000 --- a/Formula/mfoc.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mfoc < Formula - desc "Implementation of 'offline nested' attack by Nethemba" - homepage "https://github.com/nfc-tools/mfoc" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mfoc/mfoc-0.10.7.tar.bz2" - sha256 "93d8ac4cb0aa6ed94855ca9732a2ffd898a9095c087f12f9402205443c2eb98c" - - bottle do - cellar :any - sha256 "5a4fe631caec6c2070b408158048c9d5976da9aa0fc8f1e60bd43dc64616db39" => :mojave - sha256 "854390fb4717577ae0cfa33cffc50c0d5d568f23b28401aee6c81661b12dede4" => :high_sierra - sha256 "be07709faf874fb9b9457950201a71b5f683f7971f2a3a7d61de630f78a2e69c" => :sierra - sha256 "d895fdd47221e48e45f6858a1dc1c39c79ae743419b93ec4dfce84baa80af0a9" => :el_capitan - sha256 "931fb4f22e9b02e40b4f1f28210df4a994a12efbd746bd7644d99a02837dbfda" => :yosemite - sha256 "ecbf3f20c620ad022ab253ed68bc0005ee05c1fcc9eb178d6cc33bdf34f4515a" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libnfc" - depends_on "libusb" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system bin/"mfoc", "-h" - end -end diff --git a/Formula/mfterm.rb b/Formula/mfterm.rb deleted file mode 100644 index 694ca57a757ad..0000000000000 --- a/Formula/mfterm.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Mfterm < Formula - desc "Terminal for working with Mifare Classic 1-4k Tags" - homepage "https://github.com/4ZM/mfterm" - url "https://github.com/4ZM/mfterm/releases/download/v1.0.7/mfterm-1.0.7.tar.gz" - sha256 "b6bb74a7ec1f12314dee42973eb5f458055b66b1b41316ae0c5380292b86b248" - - bottle do - cellar :any - sha256 "c9d9a6731bfde45dc690e9e2c3169ca93a110b2ca23a07f51c08d8f8194bfda9" => :mojave - sha256 "009cdef40e9c20337824dae0e0dba9391fe003d47ad29e249959f5ef00294888" => :high_sierra - sha256 "be663a931f9c81a3671c5dcb492b81a9d2f2bde40ef37bc1034f2ab6c0683cce" => :sierra - sha256 "8d6a975a204105fea549d800093ee986c3f585d275ad75720746482e61d80053" => :el_capitan - sha256 "da282f04765376dd1151dd4ae19394fe7504f5143bb5241cd538205c57d2ab3e" => :yosemite - end - - head do - url "https://github.com/4ZM/mfterm.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "libnfc" - depends_on "libusb" - depends_on "openssl" - - def install - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include}" - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib}" - - if build.head? - chmod 0755, "./autogen.sh" - system "./autogen.sh" - end - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - system "#{bin}/mfterm", "--version" - end -end diff --git a/Formula/mftrace.rb b/Formula/mftrace.rb deleted file mode 100644 index ee76156ab6108..0000000000000 --- a/Formula/mftrace.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mftrace < Formula - desc "Trace TeX bitmap font to PFA, PFB, or TTF font" - homepage "http://lilypond.org/mftrace/" - url "http://lilypond.org/downloads/sources/mftrace/mftrace-1.2.19.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/mftrace-1.2.19.tar.gz" - sha256 "778126f4220aa31fc91fa8baafd26aaf8be9c5e8fed5c0e92a61de04d32bbdb5" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "80eaec2570ed7efc70d82e7a2b8ca9413d6a6b0ab8157c8364c9ae0cfb2a163a" => :mojave - sha256 "f81be9cddecffd87a3066f23f90cb1be41ad2d43709a44e59c2d8f645ec4136c" => :high_sierra - sha256 "60d36f222820ef0ffa00c3c67f8fc7d9063472062c8771b99bf783781e9c5613" => :sierra - sha256 "ca26dc49c3a032568dea9c0a5a7639bd8a117f8f8e052a411679b78d01811e1f" => :el_capitan - end - - head do - url "https://github.com/hanwen/mftrace.git" - depends_on "autoconf" => :build - end - - depends_on "fontforge" - depends_on "potrace" - depends_on "t1utils" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/mftrace", "--version" - end -end diff --git a/Formula/mg.rb b/Formula/mg.rb deleted file mode 100644 index b126337121ecb..0000000000000 --- a/Formula/mg.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Mg < Formula - desc "Small Emacs-like editor" - # https://devio.us/~bcallah/mg/ is temporarily offline - homepage "https://github.com/ibara/mg" - # https://devio.us/~bcallah/mg/mg-20180421.tar.gz is temporarily offline - url "https://dl.bintray.com/homebrew/mirror/mg-20180421.tar.gz" - sha256 "11215613a360cf72ff16c2b241ea4e71b4b80b2be32c62a770c1969599e663b2" - - bottle do - cellar :any_skip_relocation - sha256 "2815679e76a4eb25d454d8f8399f61fd38def65f6bcd4ac5a6b699e4c8f2344a" => :mojave - sha256 "6ddda40fecee0d8866684f50b248bf87172df8ccbe108306226ffc3cc2d8d74b" => :high_sierra - sha256 "e8df146cd84a6d153066c1c5398fb0846dace0529d090dbb063624f46556fb00" => :sierra - sha256 "f0ea843971bc8cdabbfdfbc663b7ef0d89c8b1d37b5eb303bfcebf83ff6d97a7" => :el_capitan - end - - depends_on :macos => :yosemite # older versions don't support fstatat(2) - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - (testpath/"command.sh").write <<~EOS - #!/usr/bin/expect -f - set timeout -1 - spawn #{bin}/mg - match_max 100000 - send -- "\u0018\u0003" - expect eof - EOS - chmod 0755, testpath/"command.sh" - - system testpath/"command.sh" - end -end diff --git a/Formula/mgba.rb b/Formula/mgba.rb deleted file mode 100644 index 7d4d8627df087..0000000000000 --- a/Formula/mgba.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Mgba < Formula - desc "Game Boy Advance emulator" - homepage "https://mgba.io/" - revision 2 - head "https://github.com/mgba-emu/mgba.git" - - stable do - url "https://github.com/mgba-emu/mgba/archive/0.6.3.tar.gz" - sha256 "35c8906c01206adae714fee9c2bc39698c514a4adb32c9c4a5a3fa58b2d10f9a" - - # Fix build with Qt 5.11.0 - # https://github.com/Homebrew/homebrew-core/issues/28455 - patch do - url "https://github.com/mgba-emu/mgba/commit/7f41dd35417.patch?full_index=1" - sha256 "14a3c1100830d13f0e6e1656b502c34cfc527b6e4db0d47a07e613caa622d47d" - end - end - - bottle do - cellar :any - sha256 "05f047199b814a992bd330dae526874a425f52d0e0ef674b4040950d0053b4ec" => :mojave - sha256 "b35eb17585007f58d73104a6cee5c9fd4ade4073f714f8cd4d595eeb9b1e9073" => :high_sierra - sha256 "c4a7b9598e074a904a466d4f7f540a67c511131f780a6898b1b8def3e33058ba" => :sierra - sha256 "fafaa47a86e92ad1877814abcf7a6d7159188e02ba2e63ad8f171116d49f5546" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "imagemagick" - depends_on "libepoxy" - depends_on "libpng" - depends_on "libzip" - depends_on "qt" - depends_on "sdl2" - - def install - # Fix "error: 'future' is unavailable: introduced in macOS 10.8" - # Reported 11 Dec 2017 https://github.com/mgba-emu/mgba/issues/944 - if MacOS.version <= :el_capitan - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - end - - # Install .app bundle into prefix, not prefix/Applications - inreplace "src/platform/qt/CMakeLists.txt", "Applications", "." - - system "cmake", ".", *std_cmake_args - system "make", "install" - - # Replace SDL frontend binary with a script for running Qt frontend - # -DBUILD_SDL=OFF would be easier, but disable joystick support in Qt frontend - rm bin/"mgba" - bin.write_exec_script "#{prefix}/mGBA.app/Contents/MacOS/mGBA" - end - - test do - system "#{bin}/mGBA", "-h" - end -end diff --git a/Formula/mhash.rb b/Formula/mhash.rb deleted file mode 100644 index 5ca1bf6b8cab9..0000000000000 --- a/Formula/mhash.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mhash < Formula - desc "Uniform interface to a large number of hash algorithms" - homepage "https://mhash.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz" - sha256 "3dcad09a63b6f1f634e64168dd398e9feb9925560f9b671ce52283a79604d13e" - - bottle do - cellar :any - sha256 "b4ee65a9ee33f5e19e085c477ec1634e2aa1626331eb2465484713759b264163" => :mojave - sha256 "82f39af8037f070fafcad0280b151dc58e1b5b8c3ea1fb75f4ee372256d3ad2b" => :high_sierra - sha256 "f630165dd7f7a0f8e5b710e0e0af5ebca6ca0edc98cd46a01b617a3e16bff7ea" => :sierra - sha256 "8817cea2b724d7ea00fd1efb348aa8bdb5d93ca155cb9ccf8eb316f76b42941b" => :el_capitan - sha256 "fb03873f042a16fd2db5ae2a7eb62e970927b75a9dff92decbb3fd035a2bd41f" => :yosemite - sha256 "eb2799dca9f7c9d020e76034361c5859a4dc7e8aecaf4f1e989901b12ef4420c" => :mavericks - sha256 "611123db41bf9d43b1937fe15451da7a0f4d2049660a98a4237618345b8d4a50" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "mhash.h" - int main() { - MHASH td; - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lmhash", "-o", "test" - system "./test" - end -end diff --git a/Formula/micro.rb b/Formula/micro.rb deleted file mode 100644 index eb13f73474c6d..0000000000000 --- a/Formula/micro.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Micro < Formula - desc "Modern and intuitive terminal-based text editor" - homepage "https://github.com/zyedidia/micro" - url "https://github.com/zyedidia/micro/releases/download/v1.4.1/micro-1.4.1-src.tar.gz" - sha256 "0b516826226cf1ddf2fbb274f049cab456a5c162efe3d648f0871564fadcf812" - head "https://github.com/zyedidia/micro.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "f5176ac6e12e25b7b8c88965cc8d92fe0892f6eaec60c28359c3be3e2f460df0" => :mojave - sha256 "863a1f4f3cb0f48efe6ca22a0df05cf2c9adcaf63857aea622f2e26e21836dc5" => :high_sierra - sha256 "8426c70077cf223e6fb677de514ede5546c3635b9760da0c1980577c7b2dd016" => :sierra - sha256 "73755f137c49c168bf9ccc817df71b067959609fa2dc3eabda8002fb8f253e67" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - (buildpath/"src/github.com/zyedidia/micro").install buildpath.children - - cd "src/github.com/zyedidia/micro" do - system "make", "build-quick" - bin.install "micro" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/micro -version") - end -end diff --git a/Formula/micronaut.rb b/Formula/micronaut.rb deleted file mode 100644 index 244342409c758..0000000000000 --- a/Formula/micronaut.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Micronaut < Formula - desc "Modern JVM-based framework for building modular microservices" - homepage "http://micronaut.io" - url "https://github.com/micronaut-projects/micronaut-core/releases/download/v1.0.2/micronaut-1.0.2.zip" - sha256 "164eca3ffde6d4e3019dee28528e916a0ca13ffb3d49e00dbdefe003a10c78db" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm_f Dir["bin/*.bat"] - libexec.install %W[bin media cli-#{version}.jar] - bin.install_symlink libexec/"bin/mn" - end - - test do - system "#{bin}/mn", "create-app", "hello-world" - assert_predicate testpath/"hello-world", :directory? - end -end diff --git a/Formula/micropython.rb b/Formula/micropython.rb deleted file mode 100644 index 9dc337c2e5066..0000000000000 --- a/Formula/micropython.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Micropython < Formula - desc "Python implementation for microcontrollers and constrained systems" - homepage "https://www.micropython.org/" - url "https://github.com/micropython/micropython.git", - :tag => "v1.9.4", - :revision => "421b84af9968e582f324899934f52b3df60381ee" - - bottle do - cellar :any - sha256 "be2d76d5b19e0c2cb18734141fe1b09fbb79f1a60989789cefd76aabc6963c3e" => :mojave - sha256 "4c4b34c14c357ac012cc5a140fb4d0e1cee912852911a8796b3815cc099e98b2" => :high_sierra - sha256 "e864ea4c00070477b60ed09d0406d6609e1b79fe440c8cdf84b35a0c78e82bce" => :sierra - sha256 "e7e84a7479414bf94fc8bd739bd97bf4c9996a757571e648b7d2ef04e70ccb04" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libffi" # Requires libffi v3 closure API; macOS version is too old - - def install - cd "ports/unix" do - system "make", "axtls" - system "make", "install", "PREFIX=#{prefix}" - end - - cd "mpy-cross" do - system "make" - bin.install "mpy-cross" - end - end - - test do - # Test the FFI module - (testpath/"ffi-hello.py").write <<~EOS - import ffi - - libc = ffi.open("libc.dylib") - printf = libc.func("v", "printf", "s") - printf("Hello!\\n") - EOS - - system bin/"mpy-cross", "ffi-hello.py" - system bin/"micropython", "ffi-hello.py" - end -end diff --git a/Formula/midgard2.rb b/Formula/midgard2.rb deleted file mode 100644 index fa7d5c0c3dac3..0000000000000 --- a/Formula/midgard2.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Midgard2 < Formula - desc "Generic content repository for web and desktop applications" - homepage "http://www.midgard-project.org/" - url "https://github.com/downloads/midgardproject/midgard-core/midgard2-core-12.09.tar.gz" - sha256 "7c1d17e061df8f3b39fd8944ab97ab7220219b470f7874e74471702d2caca2cb" - revision 1 - - bottle do - sha256 "2172742db4d9b9a311cce2d5d96a31ddaa3b924361b5e524ab1c841cf0a3f8fa" => :mojave - sha256 "c441435a2ea2a9c9ec76b066e9d03ff2bf49d3bd6484f1a61308a77ef4f536bb" => :high_sierra - sha256 "5c522e6151422dcc32f28f276f8315b66aab03c8147ea85f8f4b5f1700a664d2" => :sierra - sha256 "e9c17c300e476ee15ca5d3ccc34c70715da56a8e7be41a7e0638d3dfbbf49113" => :el_capitan - sha256 "b1d949df0056f3855adfdd4542825fbffa13043e4666516662b3e69f81c24e2b" => :yosemite - sha256 "8cb700e06f34ca0a08745d42f53dc2b451eb7a739105dda3aade4db2b03a9a3f" => :mavericks - end - - head do - url "https://github.com/midgardproject/midgard-core.git", :branch => "ratatoskr" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "dbus-glib" - depends_on "glib" - depends_on "libgda" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-libgda5 - --with-dbus-support - --enable-introspection=no - ] - - if build.head? - inreplace "autogen.sh", "libtoolize", "glibtoolize" - system "./autogen.sh", *args - else - system "./configure", *args - end - - system "make", "install" - end -end diff --git a/Formula/midicsv.rb b/Formula/midicsv.rb deleted file mode 100644 index 8c62ac99d8f44..0000000000000 --- a/Formula/midicsv.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Midicsv < Formula - desc "Convert MIDI audio files to human-readable CSV format" - homepage "https://www.fourmilab.ch/webtools/midicsv" - url "https://www.fourmilab.ch/webtools/midicsv/midicsv-1.1.tar.gz" - sha256 "7c5a749ab5c4ebac4bd7361df0af65892f380245be57c838e08ec6e4ac9870ef" - - bottle do - cellar :any_skip_relocation - sha256 "3fcfcbe9f5b248c681f57eccd4c17c2f93d1a977c3a19949cbeee6dd77038787" => :mojave - sha256 "737ea2eda70a778d076568af902f16d609aaae4baeb7ada7795c32d4de886f81" => :high_sierra - sha256 "314a21ac6aaad39594a54bae4bf3ecc64e3ef0cd655e7c18c6ff05ebd72c9b86" => :sierra - sha256 "230ba9ec9cbb40c2c128c1a063152fd07888210f59bf37f1f68bcd2f33d4d863" => :el_capitan - sha256 "f649e02908dee31c35e9b73954b8faad2da70e1c7e621fddb64f18dbad897036" => :yosemite - sha256 "289d13313a2f5d7dbc8ebf61450ba336bdba9849be352dc5b705c0d2c4b13d3e" => :mavericks - end - - def install - system "make" - system "make", "check" - system "make", "install", "INSTALL_DEST=#{prefix}" - share.install prefix/"man" - end - - test do - system "#{bin}/midicsv", "-u" - end -end diff --git a/Formula/midnight-commander.rb b/Formula/midnight-commander.rb deleted file mode 100644 index 00ef670744729..0000000000000 --- a/Formula/midnight-commander.rb +++ /dev/null @@ -1,44 +0,0 @@ -class MidnightCommander < Formula - desc "Terminal-based visual file manager" - homepage "https://www.midnight-commander.org/" - url "https://www.midnight-commander.org/downloads/mc-4.8.22.tar.xz" - sha256 "ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318" - head "https://github.com/MidnightCommander/mc.git" - - bottle do - sha256 "752b14547cba6c6165e15e1e39cbc1d643482ba84640948be02d1e7f7a7388e2" => :mojave - sha256 "7c715413595dee9cb2338a492f2ab467bdcba48d240c8b4773d7c967508d0e4a" => :high_sierra - sha256 "d6ffb05221808b6d37b59793cb4829755faeaca0697f335bf4699423760842b6" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libssh2" - depends_on "openssl" - depends_on "s-lang" - - conflicts_with "minio-mc", :because => "Both install a `mc` binary" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --without-x - --with-screen=slang - --enable-vfs-sftp - ] - - # Fix compilation bug on macOS 10.13 by pretending we don't have utimensat() - # https://github.com/MidnightCommander/mc/pull/130 - ENV["ac_cv_func_utimensat"] = "no" if MacOS.version >= :high_sierra - - system "./configure", *args - system "make", "install" - end - - test do - assert_match "GNU Midnight Commander", shell_output("#{bin}/mc --version") - end -end diff --git a/Formula/mighttpd2.rb b/Formula/mighttpd2.rb deleted file mode 100644 index 5f2dbfed13aba..0000000000000 --- a/Formula/mighttpd2.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/haskell" - -class Mighttpd2 < Formula - include Language::Haskell::Cabal - - desc "HTTP server" - homepage "https://www.mew.org/~kazu/proj/mighttpd/en/" - url "https://hackage.haskell.org/package/mighttpd2-3.4.3/mighttpd2-3.4.3.tar.gz" - sha256 "70dd2845c89917509674a903cdf3b9e54c47eb82a5ae199eb3bf3da56611ca29" - - bottle do - cellar :any_skip_relocation - sha256 "f6a29c3f904aee4500991a66dae9b106d946fcc0ac98c3a40d9c3fe9e966bcaa" => :mojave - sha256 "20b0a49d9442615903fb9532cd2ba070d5936b2cea69b9e5db2ca7be1052c47f" => :high_sierra - sha256 "5d21c1640f273f3a57c9509c52750da51830fa21c79e6a69015001ed8f6f1f98" => :sierra - sha256 "53b61f1044d2ef60b1dde3ebe5b5adcce01838c6c962fac14e9ba1e92b123d31" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - install_cabal_package - end - - test do - system "#{bin}/mighty-mkindex" - assert (testpath/"index.html").file? - end -end diff --git a/Formula/mikmod.rb b/Formula/mikmod.rb deleted file mode 100644 index 6320c114e4746..0000000000000 --- a/Formula/mikmod.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mikmod < Formula - desc "Portable tracked music player" - homepage "https://mikmod.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mikmod/mikmod/3.2.8/mikmod-3.2.8.tar.gz" - sha256 "dbb01bc36797ce25ffcab2b3bf625537b85b42534344e1808236ca612fbaa4cc" - - bottle do - sha256 "6812f223d67d763208eaf21ab6e1ebfaf50e349852cb6820010010ed0524b2f2" => :mojave - sha256 "5907f92b40ddc0ba15cddd60269a9f9a8e9fcf6295a099df4145818536431427" => :high_sierra - sha256 "a9586a9306006e8fd451aecb6c3259fc57cb0bb328a2b0ce8c064e5518f943bc" => :sierra - sha256 "ae0b4480b6b34327b9c99601d7e2cbc9648ece54344bd4bda3582ef048e1f1de" => :el_capitan - sha256 "7d52131b792e01d3037dac4be52811744dfad23c2a11f4ee3d1985a8fb8f0331" => :yosemite - end - - depends_on "libmikmod" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mikmod -V") - end -end diff --git a/Formula/mikutter.rb b/Formula/mikutter.rb deleted file mode 100644 index 5808810b2e69e..0000000000000 --- a/Formula/mikutter.rb +++ /dev/null @@ -1,254 +0,0 @@ -class Mikutter < Formula - desc "Extensible Twitter client" - homepage "https://mikutter.hachune.net/" - url "https://mikutter.hachune.net/bin/mikutter.3.7.4.tar.gz" - sha256 "7695a76a809555b2688b56f5335834fd876f82ce1b645815ec2020aedbdff55c" - revision 2 - head "git://toshia.dip.jp/mikutter.git", :branch => "develop" - - bottle do - cellar :any - sha256 "14f2a2d9288a3bbc453864f707266373f546d27fecb4e95678f089c0d5a8f699" => :mojave - sha256 "8f5f8620e2dd2fbc12b15e886d0034640fcc82ac36b2a46f1761378ff4b12655" => :high_sierra - sha256 "6594762c87b71a9f8f7589cb390f2791b18200ea1a7f364de8040a4c9ed7406e" => :sierra - end - - depends_on "gobject-introspection" - depends_on "gtk+" - depends_on "libidn" - depends_on "ruby" if MacOS.version <= :high_sierra - depends_on "terminal-notifier" - - resource "addressable" do - url "https://rubygems.org/gems/addressable-2.5.2.gem" - sha256 "73771ea960b3900d96e6b3729bd203e66f387d0717df83304411bf37efd7386e" - end - - resource "atk" do - url "https://rubygems.org/gems/atk-3.2.1.gem" - sha256 "cc460c76a8729b49852dfec01e285ba16a52f13e1325f3a4a04f5c8e4beaf2ba" - end - - resource "cairo" do - url "https://rubygems.org/gems/cairo-1.15.13.gem" - sha256 "27863a94dd5646afd0a4ce309386e15eebdec6415c58b33017a24f42896b1d26" - end - - resource "cairo-gobject" do - url "https://rubygems.org/gems/cairo-gobject-3.2.1.gem" - sha256 "36c8e4d9983f7e2544d20152747e8508b2ef5e3789320596c737c5a4a9894776" - end - - resource "delayer" do - url "https://rubygems.org/gems/delayer-0.0.2.gem" - sha256 "39ece17be3e4528d562a88aef7cb25143ef4ce77df2925a7534f8a163af1db94" - end - - resource "delayer-deferred" do - url "https://rubygems.org/gems/delayer-deferred-2.0.0.gem" - sha256 "bf135b0a76eb30223e447da7afe915726321716856acf5e0e3453efb3dbc787f" - end - - resource "diva" do - url "https://rubygems.org/gems/diva-0.3.2.gem" - sha256 "8d202ef311a94af28d7b2c3b63322f1dd678db154551d40fc6f260da5e11e166" - end - - resource "gdk_pixbuf2" do - url "https://rubygems.org/gems/gdk_pixbuf2-3.2.1.gem" - sha256 "5d380d609e3d05d698317331eaa5456a412f73edcbb659d303edec5653cb4ad0" - end - - resource "gettext" do - url "https://rubygems.org/gems/gettext-3.0.9.gem" - sha256 "390ee547437d62d00b859383d1af816cf06f0adee9ced1949f821b720d187c93" - end - - resource "gio2" do - url "https://rubygems.org/gems/gio2-3.2.1.gem" - sha256 "464df44ac122f9188221acd4d445e6c844de9aa35b72411caf1b857ec0878b14" - end - - resource "glib2" do - url "https://rubygems.org/gems/glib2-3.2.1.gem" - sha256 "7a320d73a9ea15e9af9d018f1da5ffdfc5243e9945a2a18752a5a66d7a95efae" - end - - resource "gobject-introspection" do - url "https://rubygems.org/gems/gobject-introspection-3.2.1.gem" - sha256 "11b860f32aa4e001c71476bfced2dddb3a9e7930c1c1b5b20d784aa63b669070" - end - - resource "gtk2" do - url "https://rubygems.org/gems/gtk2-3.2.1.gem" - sha256 "66d3cf80aacb89b6f17da8ef879c46c76e9cffa99e4dcbee2e70f4ade6e2d482" - end - - resource "httpclient" do - url "https://rubygems.org/gems/httpclient-2.8.3.gem" - sha256 "2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6" - end - - resource "idn-ruby" do - url "https://rubygems.org/gems/idn-ruby-0.1.0.gem" - sha256 "99abba21c66e61fa16f2ddb2a507b4fd5a8d84ece77711f0d2e2bc313da36b1f" - end - - resource "instance_storage" do - url "https://rubygems.org/gems/instance_storage-1.0.0.gem" - sha256 "f41e64da2fe4f5f7d6c8cf9809ef898e660870f39d4e5569c293b584a12bce22" - end - - resource "json_pure" do - url "https://rubygems.org/gems/json_pure-1.8.6.gem" - sha256 "55d575c4aec98249473811a256b3f3a7c12a94ad008093032f5e5f28eacd94ee" - end - - resource "locale" do - url "https://rubygems.org/gems/locale-2.1.2.gem" - sha256 "1db4a6b5f21fcd64f397d61bf2af69840dc11b3176d1fa6d75a0e749f04a9aea" - end - - resource "memoist" do - url "https://rubygems.org/gems/memoist-0.16.0.gem" - sha256 "70bd755b48477c9ef9601daa44d298e04a13c1727f8f9d38c34570043174085f" - end - - resource "mini_portile2" do - url "https://rubygems.org/gems/mini_portile2-2.3.0.gem" - sha256 "216417b241ff4e7b1c726f257241eaf223e3abbe6ec2c6453352dea6a414a38d" - end - - resource "moneta" do - url "https://rubygems.org/gems/moneta-1.0.0.gem" - sha256 "2224e5a68156e8eceb525fb0582c8c4e0f29f67cae86507cdcfb406abbb1fc5d" - end - - resource "native-package-installer" do - url "https://rubygems.org/gems/native-package-installer-1.0.6.gem" - sha256 "7cff2ddbedc529e5f98422288e198428fcf420d78ffabfd4c88536870dda0c3f" - end - - resource "nokogiri" do - url "https://rubygems.org/gems/nokogiri-1.8.4.gem" - sha256 "ecad8473fbaebaadd060eec15a872fb67c4bd7c6d64904ebbe15d40113ad36c1" - end - - resource "oauth" do - url "https://rubygems.org/gems/oauth-0.5.4.gem" - sha256 "3e017ed1c107eb6fe42c977b78c8a8409249869032b343cf2f23ac80d16b5fff" - end - - resource "pango" do - url "https://rubygems.org/gems/pango-3.2.1.gem" - sha256 "45f13b5ac6435b65af930b6e4964faedc1211ae687ced5fe770ebb8cab860d42" - end - - resource "pkg-config" do - url "https://rubygems.org/gems/pkg-config-1.3.1.gem" - sha256 "953afe038297f8f34b4a519a27cf7a3c71a03c541366695dd0da7f3be2e43d7b" - end - - resource "pluggaloid" do - url "https://rubygems.org/gems/pluggaloid-1.1.1.gem" - sha256 "f9279fad38d0bf4e20ee70e30882c6cb7916bc764bf72b2f955f0ac0ff0a3a5d" - end - - resource "public_suffix" do - url "https://rubygems.org/gems/public_suffix-3.0.2.gem" - sha256 "3a0168c33fa0b00886423a2ceb21c74199273ccd01bc250360fc8d18600bb0f4" - end - - resource "ruby-hmac" do - url "https://rubygems.org/gems/ruby-hmac-0.4.0.gem" - sha256 "a4245ecf2cfb2036975b63dc37d41426727d8449617ff45daf0b3be402a9fe07" - end - - resource "text" do - url "https://rubygems.org/gems/text-1.3.1.gem" - sha256 "2fbbbc82c1ce79c4195b13018a87cbb00d762bda39241bb3cdc32792759dd3f4" - end - - resource "totoridipjp" do - url "https://rubygems.org/gems/totoridipjp-0.1.0.gem" - sha256 "93d1245c5273971c855b506a7a913d23d6f524e9d7d4494127ae1bc6174c910d" - end - - resource "twitter-text" do - url "https://rubygems.org/gems/twitter-text-2.1.0.gem" - sha256 "ca4ce1c4bc91c412d5b85c12e12d96aff2b347ca01656a0986981bcb4738fbc5" - end - - resource "typed-array" do - url "https://rubygems.org/gems/typed-array-0.1.2.gem" - sha256 "891fa1de2cdccad5f9e03936569c3c15d413d8c6658e2edfe439d9386d169b62" - end - - resource "unf" do - url "https://rubygems.org/gems/unf-0.1.4.gem" - sha256 "4999517a531f2a955750f8831941891f6158498ec9b6cb1c81ce89388e63022e" - end - - resource "unf_ext" do - url "https://rubygems.org/gems/unf_ext-0.0.7.5.gem" - sha256 "4126717c9ad85bc0d8f62881cabf32e84fe18c47485784d1ba8b0c0fb189e11a" - end - - def install - (lib/"mikutter/vendor").mkpath - resources.each do |r| - r.verify_download_integrity(r.fetch) - system("gem", "install", r.cached_download, "--no-document", - "--install-dir", "#{lib}/mikutter/vendor") - end - - rm_rf "vendor" - (lib/"mikutter").install "plugin" - libexec.install Dir["*"] - - (bin/"mikutter").write(exec_script) - pkgshare.install_symlink libexec/"core/skin" - - # enable other formulae to install plugins - libexec.install_symlink HOMEBREW_PREFIX/"lib/mikutter/plugin" - end - - def exec_script - <<~EOS - #!/bin/bash - - export DISABLE_BUNDLER_SETUP=1 - - # also include gems/gtk modules from other formulae - export GEM_HOME="#{HOMEBREW_PREFIX}/lib/mikutter/vendor" - export GTK_PATH="#{HOMEBREW_PREFIX}/lib/gtk-2.0" - - exec #{which("ruby")} "#{libexec}/mikutter.rb" "$@" - EOS - end - - test do - (testpath/".mikutter/plugin/test_plugin/test_plugin.rb").write <<~EOS - # -*- coding: utf-8 -*- - Plugin.create(:test_plugin) do - require 'logger' - - Delayer.new do - log = Logger.new(STDOUT) - log.info("loaded test_plugin") - exit - end - end - - # this is needed in order to boot mikutter >= 3.6.0 - class Post - def self.primary_service - nil - end - end - EOS - system bin/"mikutter", "plugin_depends", - testpath/".mikutter/plugin/test_plugin/test_plugin.rb" - system bin/"mikutter", "--plugin=test_plugin", "--debug" - end -end diff --git a/Formula/mill.rb b/Formula/mill.rb deleted file mode 100644 index cf244cf327ce1..0000000000000 --- a/Formula/mill.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mill < Formula - desc "Scala build tool" - homepage "https://www.lihaoyi.com/mill/" - url "https://github.com/lihaoyi/mill/releases/download/0.3.5/0.3.5" - sha256 "c869f584eeadd3a9a7a37a6ad1af6e0c8308b603b62986da2b28cb6d5c406aa6" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install Dir["*"].shift => "mill" - chmod 0555, libexec/"mill" - (bin/"mill").write_env_script libexec/"mill", Language::Java.java_home_env("1.8") - end - - test do - (testpath/"build.sc").write <<~EOS - import mill._ - import mill.scalalib._ - object foo extends ScalaModule { - def scalaVersion = "2.12.4" - } - EOS - output = shell_output("#{bin}/mill resolve __.compile") - assert_equal "foo.compile", output.lines.last.chomp - end -end diff --git a/Formula/miller.rb b/Formula/miller.rb deleted file mode 100644 index 0eddd2b7589fd..0000000000000 --- a/Formula/miller.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Miller < Formula - desc "Like sed, awk, cut, join & sort for name-indexed data such as CSV" - homepage "https://github.com/johnkerl/miller" - url "https://github.com/johnkerl/miller/releases/download/5.4.0/mlr-5.4.0.tar.gz" - sha256 "d9a7ed10a1a5e71082c33d489f77ab9caba6e6c4f9bf0f6c3958201b64974f7e" - - bottle do - cellar :any_skip_relocation - sha256 "a2a049c66f1a1f3d8bb14a316afa5624c290ddca8a5723417fe7bfb0b682d62e" => :mojave - sha256 "dfe0d02b8fe42510d2637a6016ac7527b7e7fef981b6677f9171236780ffd05b" => :high_sierra - sha256 "2d28eda0033407a1ca4b191d67b9e742d16d0b7af106525062ab5bc4151eb6a8" => :sierra - end - - head do - url "https://github.com/johnkerl/miller.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}", "--disable-silent-rules", - "--disable-dependency-tracking" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.csv").write <<~EOS - a,b,c - 1,2,3 - 4,5,6 - EOS - output = pipe_output("#{bin}/mlr --csvlite cut -f a test.csv") - assert_match /a\n1\n4\n/, output - end -end diff --git a/Formula/mimic.rb b/Formula/mimic.rb deleted file mode 100644 index 745083765a852..0000000000000 --- a/Formula/mimic.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Mimic < Formula - desc "Lightweight text-to-speech engine based on CMU Flite" - homepage "https://mimic.mycroft.ai" - url "https://github.com/MycroftAI/mimic/archive/1.2.0.2.tar.gz" - sha256 "6adcc9911b09d6e9513add41ad9dfc0893ece277f556419869520a0f0708c102" - revision 5 - - bottle do - cellar :any - sha256 "a4cef5d7b056865ff6d0b8c5a009a8d2e1037fd456819544081f9cd79ba8a8a3" => :mojave - sha256 "8405d021a89307dceade05dbae580dfbc0a8ba804259e6d9a3aa02ca27e9962e" => :high_sierra - sha256 "09ed32fa5a02c7f3bd7137041712660b3cad1cf7bb9552eb83a02164953f8bac" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "icu4c" - depends_on "portaudio" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-shared", - "--enable-static", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"mimic", "-t", "Hello, Homebrew!", "test.wav" - assert_predicate testpath/"test.wav", :exist? - end -end diff --git a/Formula/minbif.rb b/Formula/minbif.rb deleted file mode 100644 index e2e2eddeba975..0000000000000 --- a/Formula/minbif.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Minbif < Formula - desc "IRC-to-other-IM-networks gateway using Pidgin library" - homepage "https://symlink.me/projects/minbif/wiki/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/minbif/minbif_1.0.5+git20150505.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/minbif/minbif_1.0.5+git20150505.orig.tar.gz" - version "1.0.5-20150505" - sha256 "4e264fce518a0281de9fc3d44450677c5fa91097a0597ef7a0d2a688ee66d40b" - revision 2 - - bottle do - cellar :any - sha256 "290a382d5cecfc665e446924cce87b091e0167754ace9f220ebf077f5bab42b4" => :mojave - sha256 "350bac71d2c91bb9026924d8e2ce09a34e364961045560ede2c59c059b999d9b" => :high_sierra - sha256 "110ae4736afaadcacb084d5aaad29f340297758c58958b57cc54fca700cf9c9b" => :sierra - sha256 "b88890787abd2c0f692a7c371e363ac2c0bed49f361b597ce1557f102ec94b67" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gnutls" - depends_on "pidgin" - - def install - inreplace "minbif.conf" do |s| - s.gsub! "users = /var", "users = #{var}" - s.gsub! "motd = /etc", "motd = #{etc}" - end - - system "make", "PREFIX=#{prefix}", - "ENABLE_CACA=OFF", - "ENABLE_IMLIB=OFF", - "ENABLE_MINBIF=ON", - "ENABLE_PAM=OFF", - "ENABLE_PLUGIN=ON", - "ENABLE_TLS=ON", - "ENABLE_VIDEO=OFF" - system "make", "install" - - (var/"lib/minbif/users").mkpath - end - - def caveats; <<~EOS - Minbif must be passed its config as first argument: - minbif #{etc}/minbif/minbif.conf - - Learn more about minbif: https://symlink.me/projects/minbif/wiki/Quick_start - EOS - end - - test do - system "#{bin}/minbif", "--version" - end -end diff --git a/Formula/minetest.rb b/Formula/minetest.rb deleted file mode 100644 index 90811b091052c..0000000000000 --- a/Formula/minetest.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Minetest < Formula - desc "Free, open source voxel game engine and game" - homepage "https://www.minetest.net/" - - stable do - url "https://github.com/minetest/minetest/archive/0.4.17.1.tar.gz" - sha256 "cd25d40c53f492325edabd2f6397250f40a61cb9fe4a1d4dd6eb030e0d1ceb59" - - resource "minetest_game" do - url "https://github.com/minetest/minetest_game/archive/0.4.17.tar.gz" - sha256 "f0ab07cb47c1540b2016bf76a36e2eec28b0ea7827bf66fc5447e0c5e5d4495d" - end - end - - bottle do - sha256 "4da5f8bebc6588cdf99b23cd2646e91425e15e2c625b8516728bd6970ed2e25b" => :mojave - sha256 "7aa7a7e5a509efeb89b1ab0a897c250950ba117cc658c70c0892a3a4d4b882d5" => :high_sierra - sha256 "7c76e9b683a0205f116403f6571c7e7c7cbd40f7bc16951ef0c350512cfc017e" => :sierra - sha256 "ed87de74a782d339eee51f30e2d183eefd25a37e595df5f42157883afbeec133" => :el_capitan - end - - head do - url "https://github.com/minetest/minetest.git" - - resource "minetest_game" do - url "https://github.com/minetest/minetest_game.git", :branch => "master" - end - end - - depends_on "cmake" => :build - depends_on "freetype" - depends_on "gettext" - depends_on "irrlicht" - depends_on "jpeg" - depends_on "libogg" - depends_on "libvorbis" - depends_on "luajit" - depends_on :x11 - - def install - (buildpath/"games/minetest_game").install resource("minetest_game") - - args = std_cmake_args - %w[-DCMAKE_BUILD_TYPE=None] - args << "-DCMAKE_BUILD_TYPE=Release" << "-DBUILD_CLIENT=1" << "-DBUILD_SERVER=0" - args << "-DENABLE_FREETYPE=1" << "-DCMAKE_EXE_LINKER_FLAGS='-L#{Formula["freetype"].opt_lib}'" - args << "-DENABLE_GETTEXT=1" << "-DCUSTOM_GETTEXT_PATH=#{Formula["gettext"].opt_prefix}" - - # -ffast-math compiler flag is an issue on Mac - # https://github.com/minetest/minetest/issues/4274 - inreplace "src/CMakeLists.txt", "-ffast-math", "" - - system "cmake", ".", *args - system "make", "package" - system "unzip", "minetest-*-osx.zip" - prefix.install "minetest.app" - end - - def caveats - <<~EOS - Put additional subgames and mods into "games" and "mods" folders under - "~/Library/Application Support/minetest/", respectively (you may have - to create those folders first). - - If you would like to start the Minetest server from a terminal, run - "/Applications/minetest.app/Contents/MacOS/minetest --server". - EOS - end -end diff --git a/Formula/mingw-w64.rb b/Formula/mingw-w64.rb deleted file mode 100644 index 966f405f46958..0000000000000 --- a/Formula/mingw-w64.rb +++ /dev/null @@ -1,197 +0,0 @@ -class MingwW64 < Formula - desc "Minimalist GNU for Windows and GCC cross-compilers" - homepage "https://mingw-w64.org/" - url "https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v5.0.4.tar.bz2" - sha256 "5527e1f6496841e2bb72f97a184fc79affdcd37972eaa9ebf7a5fd05c31ff803" - revision 1 - - bottle do - sha256 "99643788f39f714277782d585854b426be3a05b3ca4ea6ad976bddf04fad10e2" => :mojave - sha256 "d8ee55c3d49dab59470fcd0c2d748faca388d65ac6a339b32f55c61bbcaa7563" => :high_sierra - sha256 "123187cb05418b0dea7fc52ed884d0c29af3794a4729befeed645384816c9d8d" => :sierra - sha256 "3d17f00fef77e7ca948989413a97955c6628d0dde124ef461d21f6b8528e592c" => :el_capitan - end - - option "without-posix", "Compile without posix thread model support" - - # Apple's makeinfo is old and has bugs - depends_on "texinfo" => :build - - depends_on "gmp" - depends_on "isl" - depends_on "libmpc" - depends_on "mpfr" - - resource "binutils" do - url "https://ftp.gnu.org/gnu/binutils/binutils-2.31.1.tar.gz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.31.1.tar.gz" - sha256 "e88f8d36bd0a75d3765a4ad088d819e35f8d7ac6288049780e2fefcad18dde88" - end - - resource "gcc" do - url "https://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz" - sha256 "196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080" - - # isl 0.20 compatibility, remove in next GCC version - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 - patch :DATA - end - - def target_archs - ["i686", "x86_64"].freeze - end - - def install - target_archs.each do |arch| - arch_dir = "#{prefix}/toolchain-#{arch}" - target = "#{arch}-w64-mingw32" - - resource("binutils").stage do - args = %W[ - --target=#{target} - --prefix=#{arch_dir} - --enable-targets=#{target} - --disable-multilib - ] - mkdir "build-#{arch}" do - system "../configure", *args - system "make" - system "make", "install" - end - end - - # Put the newly built binutils into our PATH - ENV.prepend_path "PATH", "#{arch_dir}/bin" - - mkdir "mingw-w64-headers/build-#{arch}" do - system "../configure", "--host=#{target}", "--prefix=#{arch_dir}/#{target}" - system "make" - system "make", "install" - end - - # Create a mingw symlink, expected by GCC - ln_s "#{arch_dir}/#{target}", "#{arch_dir}/mingw" - - # Build the GCC compiler - resource("gcc").stage buildpath/"gcc" - args = %W[ - --target=#{target} - --prefix=#{arch_dir} - --with-bugurl=https://github.com/Homebrew/homebrew-core/issues - --enable-languages=c,c++,fortran - --with-ld=#{arch_dir}/bin/#{target}-ld - --with-as=#{arch_dir}/bin/#{target}-as - --with-gmp=#{Formula["gmp"].opt_prefix} - --with-mpfr=#{Formula["mpfr"].opt_prefix} - --with-mpc=#{Formula["libmpc"].opt_prefix} - --with-isl=#{Formula["isl"].opt_prefix} - --disable-multilib - ] - if build.with? "posix" - args << "--enable-threads=posix" - else - args << "--enable-threads=win32" - end - - mkdir "#{buildpath}/gcc/build-#{arch}" do - system "../configure", *args - system "make", "all-gcc" - system "make", "install-gcc" - end - - # Build the mingw-w64 runtime - args = %W[ - CC=#{target}-gcc - CXX=#{target}-g++ - CPP=#{target}-cpp - --host=#{target} - --prefix=#{arch_dir}/#{target} - ] - - if arch == "i686" - args << "--enable-lib32" << "--disable-lib64" - elsif arch == "x86_64" - args << "--disable-lib32" << "--enable-lib64" - end - - mkdir "mingw-w64-crt/build-#{arch}" do - system "../configure", *args - system "make" - system "make", "install" - end - - # Build the winpthreads library - # we need to build this prior to the - # GCC runtime libraries, to have `-lpthread` - # available, for `--enable-threads=posix` - args = %W[ - CC=#{target}-gcc - CXX=#{target}-g++ - CPP=#{target}-cpp - --host=#{target} - --prefix=#{arch_dir}/#{target} - ] - mkdir "mingw-w64-libraries/winpthreads/build-#{arch}" do - system "../configure", *args - system "make" - system "make", "install" - end - - # Finish building GCC (runtime libraries) - chdir "#{buildpath}/gcc/build-#{arch}" do - system "make" - system "make", "install" - end - - # Symlinks all binaries into place - mkdir_p bin - Dir["#{arch_dir}/bin/*"].each { |f| ln_s f, bin } - end - end - - test do - (testpath/"hello.c").write <<~EOS - #include - #include - int main() { puts("Hello world!"); - MessageBox(NULL, TEXT("Hello GUI!"), TEXT("HelloMsg"), 0); return 0; } - EOS - (testpath/"hello.cc").write <<~EOS - #include - int main() { std::cout << "Hello, world!" << std::endl; return 0; } - EOS - (testpath/"hello.f90").write <<~EOS - program hello ; print *, "Hello, world!" ; end program hello - EOS - - ENV["LC_ALL"] = "C" - target_archs.each do |arch| - target = "#{arch}-w64-mingw32" - outarch = (arch == "i686") ? "i386" : "x86-64" - - system "#{bin}/#{target}-gcc", "-o", "test.exe", "hello.c" - assert_match "file format pei-#{outarch}", shell_output("#{bin}/#{target}-objdump -a test.exe") - - system "#{bin}/#{target}-g++", "-o", "test.exe", "hello.cc" - assert_match "file format pei-#{outarch}", shell_output("#{bin}/#{target}-objdump -a test.exe") - - system "#{bin}/#{target}-gfortran", "-o", "test.exe", "hello.f90" - assert_match "file format pei-#{outarch}", shell_output("#{bin}/#{target}-objdump -a test.exe") - end - end -end - -__END__ -diff --git a/gcc/graphite.h b/gcc/graphite.h -index 4e0e58c..be0a22b 100644 ---- a/gcc/graphite.h -+++ b/gcc/graphite.h -@@ -37,6 +37,8 @@ along with GCC; see the file COPYING3. If not see - #include - #include - #include -+#include -+#include - - typedef struct poly_dr *poly_dr_p; diff --git a/Formula/minica.rb b/Formula/minica.rb deleted file mode 100644 index ce9ac6311f4b2..0000000000000 --- a/Formula/minica.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Minica < Formula - desc "Small, simple certificate authority" - homepage "https://github.com/jsha/minica" - url "https://github.com/jsha/minica/archive/v1.0.1.tar.gz" - sha256 "d5fd5259642dcd8ff98cb81deb4c66424a97c7bee2670622a6a057a6de5cfd03" - - bottle do - cellar :any_skip_relocation - sha256 "b9e770340412c61c71cee5c4428fb43bc3204615c826f3a2daabca42869cea66" => :mojave - sha256 "52bcdc795e10b9fffd91984fc50a17c68c658f409ff545c6d94e147f2adce66a" => :high_sierra - sha256 "de8de2c3f4a630f159186701abd9badd6d8f086fabc47984af857d809c28e822" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/jsha").mkpath - ln_s buildpath, buildpath/"src/github.com/jsha/minica" - system "go", "build", "-o", bin/"minica", "github.com/jsha/minica" - end - - test do - system "#{bin}/minica", "--domains", "foo.com" - assert_predicate testpath/"minica.pem", :exist? - end -end diff --git a/Formula/minicom.rb b/Formula/minicom.rb deleted file mode 100644 index 855785fc56bfe..0000000000000 --- a/Formula/minicom.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Minicom < Formula - desc "Menu-driven communications program" - homepage "https://packages.debian.org/sid/minicom" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/minicom/minicom_2.7.1.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/minicom/minicom_2.7.1.orig.tar.gz" - sha256 "532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1" - - bottle do - sha256 "77cc043be40a99634caa99d5f309741d85309fed07c1c21f313c6d99c4732966" => :mojave - sha256 "ec4beca9c9816db86a3bb7a11d7507fe0740feb62461341232a425a5156cd4a1" => :high_sierra - sha256 "63584b5ee8463dfb6cef69ad32308c51a4e83778dd44b80fc4c1e7c40cb48b2e" => :sierra - sha256 "820aae10f1c298350f51f7571d4d6becb4b0cfc876fb77126ea1e43bec8466e4" => :el_capitan - sha256 "5f17b6f15c2417acbda3a91b64f7df166b29fd2389adc52f011e2541f1fdbcb9" => :yosemite - end - - def install - # There is a silly bug in the Makefile where it forgets to link to iconv. Workaround below. - ENV["LIBS"] = "-liconv" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - - (prefix/"etc").mkdir - (prefix/"var").mkdir - (prefix/"etc/minirc.dfl").write "pu lock #{prefix}/var\npu escape-key Escape (Meta)\n" - end - - def caveats; <<~EOS - Terminal Compatibility - ====================== - If minicom doesn't see the LANG variable, it will try to fallback to - make the layout more compatible, but uglier. Certain unsupported - encodings will completely render the UI useless, so if the UI looks - strange, try setting the following environment variable: - - LANG="en_US.UTF-8" - - Text Input Not Working - ====================== - Most development boards require Serial port setup -> Hardware Flow - Control to be set to "No" to input text. - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/minicom -v", 1) - end -end diff --git a/Formula/minidjvu.rb b/Formula/minidjvu.rb deleted file mode 100644 index 73f0ee5645d1f..0000000000000 --- a/Formula/minidjvu.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Minidjvu < Formula - desc "DjVu multipage encoder, single page encoder/decoder" - homepage "https://minidjvu.sourceforge.io/" - url "https://downloads.sourceforge.net/project/minidjvu/minidjvu/0.8/minidjvu-0.8.tar.gz" - sha256 "e9c892e0272ee4e560eaa2dbd16b40719b9797a1fa2749efeb6622f388dfb74a" - - bottle do - cellar :any - rebuild 1 - sha256 "6bb235aea08165b0a9d359f3813fa3e1760ff283697734761d9663fe1488a0fb" => :mojave - sha256 "e86d9876389882d5cc6db29798566bc845584280a4fb4f5baf6226313a74dd6d" => :high_sierra - sha256 "29966954c6c7ff78b48f41a31574369ed58fd9b52cea613891726e8cc444bffe" => :sierra - sha256 "fd6b121a06139dc071c2f7fdcf4731d5becc93350ed92f760c0b11631a985d16" => :el_capitan - sha256 "c008144fc38184c5a438ed120b5cd1a009d07b4a8cf759bfa58955b4b34f6e85" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "djvulibre" - depends_on "libtiff" - - def install - ENV.deparallelize - # force detection of BSD mkdir - system "autoreconf", "-vfi" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - lib.install Dir["#{prefix}/*.dylib"] - end -end diff --git a/Formula/minidlna.rb b/Formula/minidlna.rb deleted file mode 100644 index 350f5deae9b91..0000000000000 --- a/Formula/minidlna.rb +++ /dev/null @@ -1,115 +0,0 @@ -class Minidlna < Formula - desc "Media server software, compliant with DLNA/UPnP-AV clients" - homepage "https://sourceforge.net/projects/minidlna/" - url "https://downloads.sourceforge.net/project/minidlna/minidlna/1.2.1/minidlna-1.2.1.tar.gz" - sha256 "67388ba23ab0c7033557a32084804f796aa2a796db7bb2b770fb76ac2a742eec" - revision 1 - - bottle do - cellar :any - sha256 "e47addf7d21436e3b534b14024271d1d3355818f2e11a04da53a924f2acfe8e3" => :mojave - sha256 "ed1b022aaea8beed91a26b9907c8253da9c5c441fa52482ae0255571cd1744ad" => :high_sierra - sha256 "5145b3bae1ebb4add544bc8877668a5cea2e80a380a5a0beaba94a6e88cbf33c" => :sierra - sha256 "16fb753050582f030bcc16de31ccac3faa74f5ada3d1bed4d17895dd8628f772" => :el_capitan - end - - head do - url "https://git.code.sf.net/p/minidlna/git.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - end - - depends_on "ffmpeg" - depends_on "flac" - depends_on "jpeg" - depends_on "libexif" - depends_on "libid3tag" - depends_on "libogg" - depends_on "libvorbis" - depends_on "sqlite" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def post_install - (pkgshare/"minidlna.conf").write <<~EOS - friendly_name=Mac DLNA Server - media_dir=#{ENV["HOME"]}/.config/minidlna/media - db_dir=#{ENV["HOME"]}/.config/minidlna/cache - log_dir=#{ENV["HOME"]}/.config/minidlna - EOS - end - - def caveats - <<~EOS - Simple single-user configuration: - - mkdir -p ~/.config/minidlna - cp #{opt_pkgshare}/minidlna.conf ~/.config/minidlna/minidlna.conf - ln -s YOUR_MEDIA_DIR ~/.config/minidlna/media - minidlnad -f ~/.config/minidlna/minidlna.conf -P ~/.config/minidlna/minidlna.pid - EOS - end - - plist_options :manual => "minidlna" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/minidlnad - -d - -f - #{ENV["HOME"]}/.config/minidlna/minidlna.conf - -P - #{ENV["HOME"]}/.config/minidlna/minidlna.pid - - KeepAlive - - Crashed - - SuccessfulExit - - - ProcessType - Background - StandardErrorPath - #{var}/log/minidlnad.log - StandardOutPath - #{var}/log/minidlnad.log - - - EOS - end - - test do - (testpath/".config/minidlna/media").mkpath - (testpath/".config/minidlna/cache").mkpath - (testpath/"minidlna.conf").write <<~EOS - friendly_name=Mac DLNA Server - media_dir=#{testpath}/.config/minidlna/media - db_dir=#{testpath}/.config/minidlna/cache - log_dir=#{testpath}/.config/minidlna - EOS - - system sbin/"minidlnad", "-f", "minidlna.conf", "-p", "8081", "-P", - testpath/"minidlna.pid" - sleep 2 - - begin - assert_match /MiniDLNA #{version}/, shell_output("curl localhost:8081") - ensure - Process.kill("SIGINT", File.read("minidlna.pid").to_i) - end - end -end diff --git a/Formula/minimal-racket.rb b/Formula/minimal-racket.rb deleted file mode 100644 index 2c8adbbf76078..0000000000000 --- a/Formula/minimal-racket.rb +++ /dev/null @@ -1,75 +0,0 @@ -class MinimalRacket < Formula - desc "Modern programming language in the Lisp/Scheme family" - homepage "https://racket-lang.org/" - url "https://mirror.racket-lang.org/installers/7.0/racket-minimal-7.0-src-builtpkgs.tgz" - sha256 "dab411d76ed5b1accbba9c7e934737e0a984099542c6df57cf55e9c96247d0fe" - - bottle do - sha256 "578ffb5e2f423a044f8f7f1917bdf23436f2731df83b11f34081e60fb1ff9f0c" => :mojave - sha256 "03db9d43fa5d5cdb784007de7495531379973cff9a6d9dbae14af8667a67b30c" => :high_sierra - sha256 "56eb6622bcc55384d4dd50e560b00acd4a5c479968e644795fd8fb85fa8c8d01" => :sierra - sha256 "5bce9d80b25c2cf1d709ea564fc94f289845a2dc0e6a3905612d6f272f2a165f" => :el_capitan - end - - # these two files are amended when (un)installing packages - skip_clean "lib/racket/launchers.rktd", "lib/racket/mans.rktd" - - def install - cd "src" do - args = %W[ - --disable-debug - --disable-dependency-tracking - --enable-macprefix - --prefix=#{prefix} - --man=#{man} - --sysconfdir=#{etc} - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - # configure racket's package tool (raco) to do the Right Thing - # see: https://docs.racket-lang.org/raco/config-file.html - inreplace etc/"racket/config.rktd" do |s| - s.gsub!( - /\(bin-dir\s+\.\s+"#{Regexp.quote(bin)}"\)/, - "(bin-dir . \"#{HOMEBREW_PREFIX}/bin\")", - ) - s.gsub!( - /\n\)$/, - "\n (default-scope . \"installation\")\n)", - ) - end - end - - def caveats; <<~EOS - This is a minimal Racket distribution. - If you want to build the DrRacket IDE, you may run - raco pkg install --auto drracket - - The full Racket distribution is available as a cask: - brew cask install racket - EOS - end - - test do - output = shell_output("#{bin}/racket -e '(displayln \"Hello Homebrew\")'") - assert_match /Hello Homebrew/, output - - # show that the config file isn't malformed - output = shell_output("'#{bin}/raco' pkg config") - assert $CHILD_STATUS.success? - assert_match Regexp.new(<<~EOS), output - ^name: - #{version} - catalogs: - https://download.racket-lang.org/releases/#{version}/catalog/ - https://pkgs.racket-lang.org - https://planet-compats.racket-lang.org - default-scope: - installation - EOS - end -end diff --git a/Formula/minimesos.rb b/Formula/minimesos.rb deleted file mode 100644 index 6820597665800..0000000000000 --- a/Formula/minimesos.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Minimesos < Formula - desc "Testing infrastructure for Mesos frameworks" - homepage "https://minimesos.org/" - url "https://github.com/ContainerSolutions/minimesos/archive/0.13.0.tar.gz" - sha256 "806a2e7084d66431a706e365814fca8603ba64780ac6efc90e52cbf7ef592250" - revision 1 - - bottle :unneeded - - def install - bin.install "bin/minimesos" - end - - test do - output = shell_output("#{bin}/minimesos --help 2>&1", 127) - assert_match "docker: command not found", output - end -end diff --git a/Formula/minimodem.rb b/Formula/minimodem.rb deleted file mode 100644 index ed0cef5042e67..0000000000000 --- a/Formula/minimodem.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Minimodem < Formula - desc "General-purpose software audio FSK modem" - homepage "http://www.whence.com/minimodem/" - url "http://www.whence.com/minimodem/minimodem-0.24.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/minimodem/minimodem_0.24.orig.tar.gz" - sha256 "f8cca4db8e3f284d67f843054d6bb4d88a3db5e77b26192410e41e9a06f4378e" - - bottle do - cellar :any - sha256 "4c89fe35fbc5478c20d1db50f023c7c89467b7fbd17bd77810a6e8ff63e4b945" => :mojave - sha256 "091170cbfa058de152f2f1af5f2436963297c01e323e80fdfcd5bcf6d8c9cabd" => :high_sierra - sha256 "224fc001ea92a1df8133680c6eb9b6d659912d5e8ce84e8c12509a671538d8ae" => :sierra - sha256 "1539133df2fe9f85e8dcdf56e2a62d5ae116861e6dbc3b02e45680fbf8a467a9" => :el_capitan - sha256 "ac39bf2ca304ce0f513a037193aca0850cf3cafddf17cd40a2ac047e5f051db7" => :yosemite - sha256 "bbd84e83ce1e3a2f7f257d5c8b5fafd998187aeeb78b5d98eeb4ca97fc90d00e" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "libsndfile" - depends_on "pulseaudio" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-alsa" - system "make", "install" - end - - test do - system "#{bin}/minimodem", "--benchmarks" - end -end diff --git a/Formula/minio-mc.rb b/Formula/minio-mc.rb deleted file mode 100644 index e99595c050e62..0000000000000 --- a/Formula/minio-mc.rb +++ /dev/null @@ -1,51 +0,0 @@ -class MinioMc < Formula - desc "Replacement for ls, cp and other commands for object storage" - homepage "https://github.com/minio/mc" - url "https://github.com/minio/mc.git", - :tag => "RELEASE.2018-12-27T00-37-49Z", - :revision => "4e7eeb0725abcd36b54a37636ff89f29c3238fd8" - version "20181227003749" - - bottle do - cellar :any_skip_relocation - sha256 "673760cf56b6a32bb5c5bd7968de6a1042488a159f6e8fd71ee6cf34b18d03ee" => :mojave - sha256 "15b001b666af143b9dc4dbb3b868ad8df5d035f167d138040a4e2d79475b6e4c" => :high_sierra - sha256 "339fc99df5171042fa5fb9e88ca1305b1df903e491b560dab7c8ea76cd40bfcb" => :sierra - end - - depends_on "go" => :build - - conflicts_with "midnight-commander", :because => "Both install a `mc` binary" - - def install - ENV["GOPATH"] = buildpath - - clipath = buildpath/"src/github.com/minio/mc" - clipath.install Dir["*"] - - cd clipath do - if build.head? - system "go", "build", "-o", buildpath/"mc" - else - minio_release = `git tag --points-at HEAD`.chomp - minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)\-(\d+)\-(\d+)Z/, 'T\1:\2:\3Z') - minio_commit = `git rev-parse HEAD`.chomp - proj = "github.com/minio/mc" - - system "go", "build", "-o", buildpath/"mc", "-ldflags", <<~EOS - -X #{proj}/cmd.Version=#{minio_version} - -X #{proj}/cmd.ReleaseTag=#{minio_release} - -X #{proj}/cmd.CommitID=#{minio_commit} - EOS - end - end - - bin.install buildpath/"mc" - prefix.install_metafiles - end - - test do - system bin/"mc", "mb", testpath/"test" - assert_predicate testpath/"test", :exist? - end -end diff --git a/Formula/minio.rb b/Formula/minio.rb deleted file mode 100644 index 56d6603844e02..0000000000000 --- a/Formula/minio.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Minio < Formula - desc "Amazon S3 compatible object storage server" - homepage "https://github.com/minio/minio" - url "https://github.com/minio/minio.git", - :tag => "RELEASE.2018-12-27T18-33-08Z", - :revision => "236796ebd695705910b0c485c889c1c626c97370" - version "20181227183308" - - bottle do - cellar :any_skip_relocation - sha256 "d6344978e967894cdfac8d8c8b595034a6b6cb4e0db653f457aadd337849aec9" => :mojave - sha256 "cc62d6f16ba95649918ebd558771853344cc06bb40e424f0adf9ee8b5208d762" => :high_sierra - sha256 "01a71e810fd5ea108ff050058f2a3ca96bb1ff4c8454866fb53535e29798773e" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - clipath = buildpath/"src/github.com/minio/minio" - clipath.install Dir["*"] - - cd clipath do - if build.head? - system "go", "build", "-o", buildpath/"minio" - else - release = `git tag --points-at HEAD`.chomp - version = release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)\-(\d+)\-(\d+)Z/, 'T\1:\2:\3Z') - commit = `git rev-parse HEAD`.chomp - proj = "github.com/minio/minio" - - system "go", "build", "-o", buildpath/"minio", "-ldflags", <<~EOS - -X #{proj}/cmd.Version=#{version} - -X #{proj}/cmd.ReleaseTag=#{release} - -X #{proj}/cmd.CommitID=#{commit} - EOS - end - end - - bin.install buildpath/"minio" - prefix.install_metafiles - end - - def post_install - (var/"minio").mkpath - (etc/"minio").mkpath - end - - plist_options :manual => "minio server" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/minio - server - --config-dir=#{etc}/minio - --address :9000 - #{var}/minio - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/minio/output.log - StandardOutPath - #{var}/log/minio/output.log - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/minio", "version" - end -end diff --git a/Formula/minisat.rb b/Formula/minisat.rb deleted file mode 100644 index 4000ffe1ba72f..0000000000000 --- a/Formula/minisat.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Minisat < Formula - desc "Boolean satisfiability (SAT) problem solver" - homepage "http://minisat.se" - url "https://github.com/niklasso/minisat/archive/releases/2.2.0.tar.gz" - sha256 "3ed44da999744c0a1be269df23c3ed8731cdb83c44a4f3aa29b3d6859bb2a4da" - revision 2 - - bottle do - sha256 "391a3fa8d268b34fe03a50a2cce15794dac827cd23f1ac86a8a45c88c87fb570" => :mojave - sha256 "20256b35c118c4b338cd8eb74fc81838dc3da50c2f3464238ad1c9b042574b03" => :high_sierra - sha256 "902e87ede339024a790a70fdfad1d4c6d0a7c18f10b0392cc0b4b32bceedca7f" => :sierra - sha256 "8fd1e0f6dfaae107599581e674f1ed229436187d3a85a9290e5ff1c16cc21047" => :el_capitan - end - - depends_on "gcc" - - fails_with :clang do - cause "error: friend declaration specifying a default argument must be a definition" - end - - # Upstream commits to fix some declaration errors - patch do - url "https://github.com/niklasso/minisat/commit/9bd874980a7e5d65cecaba4edeb7127a41050ed1.patch?full_index=1" - sha256 "80be41fb79648ce41f9822115a8af1f0d356304c44d810e1fb5ed18b39bd1cfb" - end - - patch do - url "https://github.com/niklasso/minisat/commit/cfae87323839064832c8b3608bf595548dd1a1f3.patch?full_index=1" - sha256 "72c4d0f2ba7ae3561eac04418d1757fc5bf185c5b29dcaa775b8e9efab3796bc" - end - - def install - ENV["MROOT"] = buildpath - system "make", "-C", "simp", "r" - bin.install "simp/minisat_release" => "minisat" - end - - test do - dimacs = <<~EOS - p cnf 3 2 - 1 -3 0 - 2 3 -1 0 - EOS - - assert_match(/^SATISFIABLE$/, pipe_output("#{bin}/minisat", dimacs, 10)) - end -end diff --git a/Formula/minised.rb b/Formula/minised.rb deleted file mode 100644 index ad99b83376e8b..0000000000000 --- a/Formula/minised.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Minised < Formula - desc "Smaller, cheaper, faster SED implementation" - homepage "https://www.exactcode.com/opensource/minised/" - url "https://dl.exactcode.de/oss/minised/minised-1.15.tar.gz" - sha256 "ada36a55b71d1f2eb61f2f3b95f112708ce51e69f601bf5ea5d7acb7c21b3481" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b43b719ac05f5c54e05d06941d1c2f69b960babef1772591e4fb16b3cf84a36c" => :mojave - sha256 "e750f1dfe8ebc2f45837da1e20d1db531f896c5ce391250af45674c91b63f499" => :high_sierra - sha256 "c0a44653ebb7cf8f795fbb96d126abf1f80d5b2bb38a2d8d998dee1b7997e019" => :sierra - sha256 "4f33f6d39c9190899cf04857f70481ffd57996daf5001cad661ae0ea7f002a88" => :el_capitan - sha256 "d169d87a77fe06c1190065e502e84fc3f3b3714cdc98a1235c78033a41e6a292" => :yosemite - sha256 "505d4a7dcb7deeef34344f72b7c7801f90e2c38393add6e2bc41a6434c3fd899" => :mavericks - end - - def install - system "make" - system "make", "DESTDIR=#{prefix}", "PREFIX=", "install" - end - - test do - output = pipe_output("#{bin}/minised 's:o::'", "hello world", 0) - assert_equal "hell world", output.chomp - end -end diff --git a/Formula/miniserve.rb b/Formula/miniserve.rb deleted file mode 100644 index b2b2d25827593..0000000000000 --- a/Formula/miniserve.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Miniserve < Formula - desc "High performance static file server" - homepage "https://github.com/svenstaro/miniserve" - url "https://github.com/svenstaro/miniserve/archive/v0.2.1.tar.gz" - sha256 "9d58319ae1dcf460f85114e49939ffeae8b6161de7e9dfaf6a7a985d52e998d4" - - bottle do - sha256 "a3af5e213d0af2c5e899215f638b2b9f47ce71d5d04b15bc36160d1ac1385627" => :mojave - sha256 "e04be638d9a20ed8481b28a39d12c9232354931313820a612a02b72a28c61cc5" => :high_sierra - sha256 "a4d01bb0280ea8850b8f01e809d0e659bb971435ca5809b2b21fa26add4a23b5" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - pid = fork do - exec "#{bin}/miniserve", "#{bin}/miniserve", "--if", "127.0.0.1", "--port", port.to_s - end - - sleep 2 - - begin - read = (bin/"miniserve").read - assert_equal read, shell_output("curl localhost:#{port}") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/minisign.rb b/Formula/minisign.rb deleted file mode 100644 index 312e60a43c73e..0000000000000 --- a/Formula/minisign.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Minisign < Formula - desc "Sign files & verify signatures. Works with signify in OpenBSD" - homepage "https://jedisct1.github.io/minisign/" - url "https://github.com/jedisct1/minisign/archive/0.8.tar.gz" - sha256 "130eb5246076bc7ec42f13495a601382e566bb6733430d40a68de5e43a7f1082" - - bottle do - cellar :any - sha256 "b2862f35643f396fafff03c76697b2d25b8907bd14b4dc4c31c913b60ab88c82" => :mojave - sha256 "6826fa79c308cc321871704d79baab4deb71e916c00656c0b6cc656042889103" => :high_sierra - sha256 "bb3f8c4d58e195960606e1f155775da72ba7c019d9dd72b818ed7d232bf4e22c" => :sierra - sha256 "2884120953aeac755a39365d5905ece08b90b1bfd9568677cd1ed45046fe8491" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "libsodium" - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end - - test do - (testpath/"homebrew.txt").write "Hello World!" - (testpath/"keygen.sh").write <<~EOS - #!/usr/bin/expect -f - set timeout -1 - spawn #{bin}/minisign -G - expect -exact "Please enter a password to protect the secret key." - expect -exact "\n" - expect -exact "Password: " - send -- "Homebrew\n" - expect -exact "\r - Password (one more time): " - send -- "Homebrew\n" - expect eof - EOS - chmod 0755, testpath/"keygen.sh" - - system "./keygen.sh" - assert_predicate testpath/"minisign.pub", :exist? - assert_predicate testpath/".minisign/minisign.key", :exist? - - (testpath/"signing.sh").write <<~EOS - #!/usr/bin/expect -f - set timeout -1 - spawn #{bin}/minisign -Sm homebrew.txt - expect -exact "Password: " - send -- "Homebrew\n" - expect eof - EOS - chmod 0755, testpath/"signing.sh" - - system "./signing.sh" - assert_predicate testpath/"homebrew.txt.minisig", :exist? - end -end diff --git a/Formula/miniupnpc.rb b/Formula/miniupnpc.rb deleted file mode 100644 index b2967b4ca4f11..0000000000000 --- a/Formula/miniupnpc.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Miniupnpc < Formula - desc "UPnP IGD client library and daemon" - homepage "https://miniupnp.tuxfamily.org" - url "https://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-2.1.tar.gz" - sha256 "e19fb5e01ea5a707e2a8cb96f537fbd9f3a913d53d804a3265e3aeab3d2064c6" - - bottle do - cellar :any - sha256 "7207c8a442fc73842141aba18994652a9dcea64813b0e5ad86901a8e9ae026f2" => :mojave - sha256 "266556f31f0430f41a1d64b3fb96daea2a4804b1a85c4486c5e39de0f2808d35" => :high_sierra - sha256 "ed39714d275ffb083e29c72b3a5d9142c0a4081fb8c8479950f71bbddbe5d196" => :sierra - sha256 "b65b947374b703c4473c6f4daa74090181c7372e4b2d663a05890f988605eab9" => :el_capitan - end - - def install - system "make", "INSTALLPREFIX=#{prefix}", "install" - end - - test do - output = shell_output("#{bin}/upnpc --help 2>&1", 1) - assert_match version.to_s, output - end -end diff --git a/Formula/minizinc.rb b/Formula/minizinc.rb deleted file mode 100644 index 13c23160331e4..0000000000000 --- a/Formula/minizinc.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Minizinc < Formula - desc "Medium-level constraint modeling language" - homepage "https://www.minizinc.org/" - url "https://github.com/MiniZinc/libminizinc/archive/2.2.3.tar.gz" - sha256 "1af08932adb9c965677b7f0a2aa8cff474b1e251f6295ff13c1444fd7a34b2df" - head "https://github.com/MiniZinc/libminizinc.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "86d09e68602fcbd073c625408afbbfd8daffb25a7f255c5578eec35cf2dfa86a" => :mojave - sha256 "18b611e96ce5dbb0258d5a5f94aa2d82c5765a4cf0ade419c7c56c1f1a8d39fa" => :high_sierra - sha256 "088a5168693645eb6e72c5f7644af28d58c00386cfe2d0aed8c675924d14fcfb" => :sierra - end - - depends_on "cmake" => :build - depends_on :arch => :x86_64 - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "cmake", "--build", ".", "--target", "install" - end - end - - test do - system bin/"mzn2doc", share/"examples/functions/warehouses.mzn" - end -end diff --git a/Formula/minizip.rb b/Formula/minizip.rb deleted file mode 100644 index 52cf73949ea0a..0000000000000 --- a/Formula/minizip.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Minizip < Formula - desc "C library for zip/unzip via zLib" - homepage "https://www.winimage.com/zLibDll/minizip.html" - url "https://zlib.net/zlib-1.2.11.tar.gz" - sha256 "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" - - bottle do - cellar :any - rebuild 1 - sha256 "417e871bd5e889bfe4aa27cc52f0bb41fec157be960dbe78f10f7f08d42b705d" => :mojave - sha256 "ff6620fe908518ead6b18a24ed8e4942b6e2bc8f3f6d5b71f864e07e49c586fc" => :high_sierra - sha256 "8d4d3d12774a660c68be156caf804a9982d5d79204c66b0c3e56f3e92d0fe09b" => :sierra - sha256 "a0f89a172ba19d62c331c083c94e91f575a66bb56438c1a9eb55b59fbc570598" => :el_capitan - sha256 "c506cadbf592627a4a6c45de9d5a96fc5da8fe6115ea9a93ca95ec7d96bc115d" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - - cd "contrib/minizip" do - # edits to statically link to libz.a - inreplace "Makefile.am" do |s| - s.sub! "-L$(zlib_top_builddir)", "$(zlib_top_builddir)/libz.a" - s.sub! "-version-info 1:0:0 -lz", "-version-info 1:0:0" - s.sub! "libminizip.la -lz", "libminizip.la" - end - system "autoreconf", "-fi" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - end - - def caveats - <<~EOS - Minizip headers installed in 'minizip' subdirectory, since they conflict - with the venerable 'unzip' library. - EOS - end -end diff --git a/Formula/mint.rb b/Formula/mint.rb deleted file mode 100644 index 60ae192f4c7c2..0000000000000 --- a/Formula/mint.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mint < Formula - desc "Dependency manager that installs and runs Swift command-line tool packages" - homepage "https://github.com/yonaskolb/Mint" - url "https://github.com/yonaskolb/Mint/archive/0.11.3.tar.gz" - sha256 "e1e41455df18c99b17c4f7ac5f1ab5e0c11a186573eeb49cbff0c2584f514aca" - - bottle do - cellar :any_skip_relocation - sha256 "c935b2d5135c8402b4ca3683bfa80a95a9025cc8ab13be9aeceb0c0dd8958eba" => :mojave - sha256 "076d4da11065a2ba39e5542e7109d1d84cbba03ff5f3bc964ead150a17afc0a3" => :high_sierra - sha256 "3309359ee8f8b00c8c57b3361a840fc5a2917d9d212dc7bdf3f34c7327decd82" => :sierra - end - - depends_on :xcode => ["9.2", :build] - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Test by showing the help scree - system "#{bin}/mint", "--help" - # Test showing list of installed tools - system "#{bin}/mint", "list" - end -end diff --git a/Formula/minuit2.rb b/Formula/minuit2.rb deleted file mode 100644 index 69af0f09155ea..0000000000000 --- a/Formula/minuit2.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Minuit2 < Formula - desc "Physics analysis tool for function minimization" - homepage "https://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/" - url "https://www.cern.ch/mathlibs/sw/5_34_14/Minuit2/Minuit2-5.34.14.tar.gz" - sha256 "2ca9a283bbc315064c0a322bc4cb74c7e8fd51f9494f7856e5159d0a0aa8c356" - - bottle do - cellar :any - rebuild 1 - sha256 "19ea9f2a3b94afe2902e02a71281d85268c5e63c46c9df822d9ac138211f6cc5" => :mojave - sha256 "61b38bc01bf0744908bfda8e610ca39f7f07b4e2d6ecd1239cb0de82521ae375" => :high_sierra - sha256 "00867c4037d0110f2adf23a623aa918a95c9345be197ecdc0a9aa0d9da9f04e0" => :sierra - sha256 "7457852262758583daca3f23ac3e6fa312fe0a3fd84f0b20da2081967124a0fc" => :el_capitan - sha256 "32ff2d05e0a85b28513789e1f625e654f2141b80202f506ad0f7721caab95ddd" => :yosemite - sha256 "e2b2aba706d32238723ee7aaba7e4c536d68a6979b01c67e944bb34039653f40" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--with-pic", - "--disable-openmp", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/miruo.rb b/Formula/miruo.rb deleted file mode 100644 index 5063629ea75b5..0000000000000 --- a/Formula/miruo.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Miruo < Formula - desc "Pretty-print TCP session monitor/analyzer" - homepage "https://github.com/KLab/miruo/" - url "https://github.com/KLab/miruo/archive/0.9.6b.tar.gz" - version "0.9.6b" - sha256 "0b31a5bde5b0e92a245611a8e671cec3d330686316691daeb1de76360d2fa5f1" - - bottle do - cellar :any_skip_relocation - sha256 "a71716a29094f72b62cc6a84284abb509916907c5559b25a2b85196148b86c84" => :mojave - sha256 "36df62e0454d4b7e5743a002a2ff3293e087a9fb607c369f3d23732d87330e4e" => :high_sierra - sha256 "dbe92dd3ab515528597eb76aa986f4e9d8dd512504d76ca60b86b5dc5dc70449" => :sierra - sha256 "8a5402f68bcb73e22f13fb0b049caea5d186520e81bf77889c91a558d9988c59" => :el_capitan - sha256 "f39aa9336ac2ec07ec0bd25bc7f7d3ae1b7a76c8af8c4d5e1f7e0ffdcfcbc9fe" => :yosemite - sha256 "3b5a390dae561d3ac554cbd6f16c1af6019677c3846985b116ce8fd1de649bd1" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", "--with-libpcap=#{MacOS.sdk_path}/usr" - system "make", "install" - end - - test do - (testpath/"dummy.pcap").write("\xd4\xc3\xb2\xa1\x02\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x01\x00\x00\x00") - system "#{sbin}/miruo", "--file=dummy.pcap" - end -end diff --git a/Formula/mit-scheme.rb b/Formula/mit-scheme.rb deleted file mode 100644 index ea70aa2361df4..0000000000000 --- a/Formula/mit-scheme.rb +++ /dev/null @@ -1,116 +0,0 @@ -class MitScheme < Formula - desc "MIT/GNU Scheme development tools and runtime library" - homepage "https://www.gnu.org/software/mit-scheme/" - url "https://ftp.gnu.org/gnu/mit-scheme/stable.pkg/9.2/mit-scheme-c-9.2.tar.gz" - mirror "https://ftpmirror.gnu.org/mit-scheme/stable.pkg/9.2/mit-scheme-c-9.2.tar.gz" - sha256 "4f6a16f9c7d4b4b7bb3aa53ef523cad39b54ae1eaa3ab3205930b6a87759b170" - revision 1 - - bottle do - rebuild 2 - sha256 "482da1493fa7dc5d4e1b5aebf3a53ea95cdd080066aa8a4fcab2051d5ab50d86" => :mojave - sha256 "715a8d56b6b6b0debe6aac7e968c369555b210863da6f7514999307c9df348a8" => :high_sierra - sha256 "6b7a6ecec12a5a856b795ce634c0ceb8e87714f9cdd272a912e312c3bc5cb9d4" => :sierra - sha256 "23df7103a75311ba33fed035413892b73f1e724e1df5b63bd677709d29bfdb92" => :el_capitan - sha256 "be2b340bb25c87141bae94010e4f6ec0234ac3c237e66ffbdb5ae98e2cb7462f" => :yosemite - end - - # Has a hardcoded compile check for /Applications/Xcode.app - # Dies on "configure: error: SIZEOF_CHAR is not 1" without Xcode. - # https://github.com/Homebrew/homebrew-x11/issues/103#issuecomment-125014423 - depends_on :xcode => :build - depends_on "openssl" - depends_on :x11 => :optional - - def install - # Setting -march=native, which is what --build-from-source does, can fail - # with the error "the object ..., passed as the second argument to apply, is - # not the correct type." Only Haswell and above appear to be impacted. - # Reported 23rd Apr 2016: https://savannah.gnu.org/bugs/index.php?47767 - # Note that `unless build.bottle?` avoids overriding --bottle-arch=[...]. - ENV["HOMEBREW_OPTFLAGS"] = "-march=#{Hardware.oldest_cpu}" unless build.bottle? - - # The build breaks __HORRIBLY__ with parallel make -- one target will - # erase something before another target gets it, so it's easier to change - # the environment than to change_make_var, because there are Makefiles - # littered everywhere - ENV.deparallelize - - # Liarc builds must launch within the src dir, not using the top-level - # Makefile - cd "src" - - # Take care of some hard-coded paths - %w[ - 6001/edextra.scm - 6001/floppy.scm - compiler/etc/disload.scm - edwin/techinfo.scm - edwin/unix.scm - swat/c/tk3.2-custom/Makefile - swat/c/tk3.2-custom/tcl/Makefile - swat/scheme/other/btest.scm - ].each do |f| - inreplace f, "/usr/local", prefix - end - - inreplace "microcode/configure" do |s| - s.gsub! "/usr/local", prefix - # Fixes "configure: error: No MacOSX SDK for version: 10.10" - # Reported 23rd Apr 2016: https://savannah.gnu.org/bugs/index.php?47769 - s.gsub! /SDK=MacOSX\${MACOSX}$/, "SDK=MacOSX#{MacOS.sdk.version}" - end - - if build.without? "x11" - inreplace "etc/make-liarc.sh" do |s| - # Allows us to build without X11 - # https://savannah.gnu.org/bugs/?47887 - s.gsub! "run_configure", "run_configure --without-x" - end - end - - system "etc/make-liarc.sh", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - # https://www.cs.indiana.edu/pub/scheme-repository/code/num/primes.scm - (testpath/"primes.scm").write <<~EOS - ; - ; primes - ; By Ozan Yigit - ; - (define (interval-list m n) - (if (> m n) - '() - (cons m (interval-list (+ 1 m) n)))) - - (define (sieve l) - (define (remove-multiples n l) - (if (null? l) - '() - (if (= (modulo (car l) n) 0) ; division test - (remove-multiples n (cdr l)) - (cons (car l) - (remove-multiples n (cdr l)))))) - - (if (null? l) - '() - (cons (car l) - (sieve (remove-multiples (car l) (cdr l)))))) - - (define (primes<= n) - (sieve (interval-list 2 n))) - - ; (primes<= 300) - EOS - - output = shell_output( - "#{bin}/mit-scheme --load primes.scm --eval '(primes<= 72)' < /dev/null", - ) - assert_match( - /;Value 2: \(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71\)/, - output, - ) - end -end diff --git a/Formula/mitie.rb b/Formula/mitie.rb deleted file mode 100644 index 1026f3e565097..0000000000000 --- a/Formula/mitie.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Mitie < Formula - desc "Library and tools for information extraction" - homepage "https://github.com/mit-nlp/MITIE/" - url "https://github.com/mit-nlp/MITIE/archive/v0.6.tar.gz" - sha256 "bcfa6aab057206a2f5eeacbefa27a3205fe3bd906a54e0e790df3448b1c73243" - head "https://github.com/mit-nlp/MITIE.git" - - bottle do - cellar :any - sha256 "ef09cd417f33606fdcdfa69621707e072a4e2909c46d44781b4c3eabafb63085" => :mojave - sha256 "b491ebce36c1b523895db335a31ed4fd1b1e203a267037c9837da12d030ce0fd" => :high_sierra - sha256 "b2813c1046c67800ff73f187d22c1d7d63aa9d6c8736606e69f2be5d3102ccee" => :sierra - end - - depends_on "python@2" - - resource "models-english" do - url "https://downloads.sourceforge.net/project/mitie/binaries/MITIE-models-v0.2.tar.bz2" - sha256 "dc073eaef980e65d68d18c7193d94b9b727beb254a0c2978f39918f158d91b31" - end - - def install - (share/"MITIE-models").install resource("models-english") - - inreplace "mitielib/makefile", "libmitie.so", "libmitie.dylib" - system "make", "mitielib" - system "make" - - include.install Dir["mitielib/include/*"] - lib.install "mitielib/libmitie.dylib", "mitielib/libmitie.a" - (lib/"python2.7/site-packages").install "mitielib/mitie.py" - pkgshare.install "examples", "sample_text.txt", - "sample_text.reference-output", "sample_text.reference-output-relations" - bin.install "ner_example", "ner_stream", "relation_extraction_example" - end - - test do - system ENV.cc, "-I#{include}", "-L#{lib}", "-lmitie", - pkgshare/"examples/C/ner/ner_example.c", - "-o", testpath/"ner_example" - system "./ner_example", share/"MITIE-models/english/ner_model.dat", - pkgshare/"sample_text.txt" - end -end diff --git a/Formula/mitmproxy.rb b/Formula/mitmproxy.rb deleted file mode 100644 index 1551bd2436412..0000000000000 --- a/Formula/mitmproxy.rb +++ /dev/null @@ -1,163 +0,0 @@ -class Mitmproxy < Formula - include Language::Python::Virtualenv - - desc "Intercept, modify, replay, save HTTP/S traffic" - homepage "https://mitmproxy.org" - url "https://github.com/mitmproxy/mitmproxy/archive/v4.0.4.tar.gz" - sha256 "d91eaaad06a5e124a76388999b22a4c590ea26149a30aaff73658cd98d0651d5" - head "https://github.com/mitmproxy/mitmproxy.git" - - bottle do - cellar :any - sha256 "3e1277a4acd877102431ea1ccfc9e6dde9f31e5f143c5dc235dc7db38e8b57d7" => :mojave - sha256 "4b67c15ba802ed833e66f0cb958f0839265891feb7220a4d0d2ffb323274dfdf" => :high_sierra - sha256 "515144fbe7cf65730be7819f1d2e1bbffc9237727833d8357ea267fceaee5b59" => :sierra - sha256 "4f970bf7dfb95e5322a15423c1e8f706ab2a4f1e1f0f3966b1a8d5b204df8b3a" => :el_capitan - end - - depends_on "openssl" - depends_on "protobuf" - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "blinker" do - url "https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz" - sha256 "471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6" - end - - resource "brotlipy" do - url "https://files.pythonhosted.org/packages/d9/91/bc79b88590e4f662bd40a55a2b6beb0f15da4726732efec5aa5a3763d856/brotlipy-0.7.0.tar.gz" - sha256 "36def0b859beaf21910157b4c33eb3b06d8ce459c942102f16988cca6ea164df" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d/certifi-2018.4.16.tar.gz" - sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/79/a2/61c8625f96c8582d3053f89368c483ba62e56233d055e58e372f94a393f0/cryptography-2.3.tar.gz" - sha256 "c132bab45d4bd0fff1d3fe294d92b0a6eb8404e93337b3127bdec9f21de117e6" - end - - resource "h11" do - url "https://files.pythonhosted.org/packages/50/13/954a4bd263857262a0b07155b47f5494a02b97984a5bcc6263bf89f12586/h11-0.7.0.zip" - sha256 "1c0fbb1cba6f809fe3e6b27f8f6d517ca171f848922708871403636143d530d9" - end - - resource "h2" do - url "https://files.pythonhosted.org/packages/3c/86/aebb88df3c87255cfd0ffd338608fbfb34d1c850750a486e7f05b013e5a3/h2-3.0.1.tar.gz" - sha256 "b2962f883fa392a23cbfcc4ad03c335bcc661be0cf9627657b589f0df2206e64" - end - - resource "hpack" do - url "https://files.pythonhosted.org/packages/44/f1/b4440e46e265a29c0cb7b09b6daec6edf93c79eae713cfed93fbbf8716c5/hpack-3.0.0.tar.gz" - sha256 "8eec9c1f4bfae3408a3f30500261f7e6a65912dc138526ea054f9ad98892e9d2" - end - - resource "hyperframe" do - url "https://files.pythonhosted.org/packages/a4/59/dddaddc73b4d53e9649850998e23b6daca80817c5442465a12423235d20b/hyperframe-5.1.0.tar.gz" - sha256 "a25944539db36d6a2e47689e7915dcee562b3f8d10c6cdfa0d53c91ed692fb04" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "kaitaistruct" do - url "https://files.pythonhosted.org/packages/23/71/8577ca06e81c1dc0ba03a39ae32e315175ba2d9df51befa3a45f47950056/kaitaistruct-0.8.tar.gz" - sha256 "d1d17c7f6839b3d28fc22b21295f787974786c2201e8788975e72e2a1d109ff5" - end - - resource "ldap3" do - url "https://files.pythonhosted.org/packages/bf/5b/4848db7aa210a27793d7fc218c7deb588a5f2b23f5359a0537285ee1ee60/ldap3-2.5.tar.gz" - sha256 "55078bbc981f715a8867b4c040402627fdfccf5664e0277a621416559748e384" - end - - resource "passlib" do - url "https://files.pythonhosted.org/packages/25/4b/6fbfc66aabb3017cd8c3bd97b37f769d7503ead2899bf76e570eb91270de/passlib-1.7.1.tar.gz" - sha256 "3d948f64138c25633613f303bcc471126eae67c04d5e3f6b7b8ce6242f8653e0" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/10/46/059775dc8e50f722d205452bced4b3cc965d27e8c3389156acd3b1123ae3/pyasn1-0.4.4.tar.gz" - sha256 "f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz" - sha256 "0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/2d/9a/23059a00dfd52eb700bd03c4ee3a6954cae60827539c3488026c8742a555/pyperclip-1.6.4.tar.gz" - sha256 "f70e83d27c445795b6bf98c2bc826bbf2d0d63d4c7f83091c8064439042ba0dc" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/3d/46/a08f44a2a919e32689dca849ebfcb4f71f5e91e18f840bd49a88dc157a14/ruamel.yaml-0.15.46.tar.gz" - sha256 "8f048085a58ca59353c2c283e5f14af387ab6a1a7ae5d6ec26056bc2e7a396f0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "sortedcontainers" do - url "https://files.pythonhosted.org/packages/94/17/39a70184c2dbdb844db6c58c51cb3c9bc572cc08642646e77f0f1bda143c/sortedcontainers-2.0.4.tar.gz" - sha256 "607294c6e291a270948420f7ffa1fb3ed47384a4c08db6d1e9c92d08a6981982" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/45/ec/f2a03a0509bcfca336bef23a3dab0d07504893af34fd13064059ba4a0503/tornado-5.1.tar.gz" - sha256 "4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - resource "wsproto" do - url "https://files.pythonhosted.org/packages/8a/8e/65017baa6a398f93866c68054ce797aef1a8b10793c94d8653f70e8ad613/wsproto-0.11.0.tar.gz" - sha256 "02f214f6bb43cda62a511e2e8f1d5fa4703ed83d376d18d042bd2bbf2e995824" - end - - def install - venv = virtualenv_create(libexec, "python3") - venv.pip_install resource("cffi") - venv.pip_install resources - venv.pip_install_and_link buildpath - end - - test do - ENV["LANG"] = "en_US.UTF-8" - assert_match version.to_s, shell_output("#{bin}/mitmproxy --version 2>&1") - end -end diff --git a/Formula/mix-completion.rb b/Formula/mix-completion.rb deleted file mode 100644 index 6d2b55d2bbd76..0000000000000 --- a/Formula/mix-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class MixCompletion < Formula - desc "Elixir Mix completion plus shortcuts/colors" - homepage "https://github.com/davidhq/mix-power-completion" - url "https://github.com/davidhq/mix-power-completion/archive/0.8.2.tar.gz" - sha256 "0e3e94b199f847926f3668b4cebf1b132e63a44d438425dd5c45ac4a299f28f3" - head "https://github.com/davidhq/mix-power-completion.git" - - bottle :unneeded - - def install - bash_completion.install "mix" - end - - test do - assert_match "-F _mix", - shell_output("source #{bash_completion}/mix && complete -p mix") - end -end diff --git a/Formula/mjpegtools.rb b/Formula/mjpegtools.rb deleted file mode 100644 index 407de5c070c92..0000000000000 --- a/Formula/mjpegtools.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mjpegtools < Formula - desc "Record and playback videos and perform simple edits" - homepage "https://mjpeg.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mjpeg/mjpegtools/2.1.0/mjpegtools-2.1.0.tar.gz" - sha256 "864f143d7686377f8ab94d91283c696ebd906bf256b2eacc7e9fb4dddcedc407" - revision 2 - - bottle do - cellar :any - sha256 "c8a22d895e9835274994bdf72b0ca6f3c0df523e5dc8e281ed7d1fd7ae3b41eb" => :mojave - sha256 "7f47c9df784de38ee02726c1381b42a5924754c7702003ee8fafbae296302638" => :high_sierra - sha256 "9f5c0eb81540bf70ff8b2352a8ea21117a75c6dbdac58ea8d04d0da47a639cb9" => :sierra - sha256 "2793d05c642305daeb9cceb10f08484ce57d5210a3918121ab04be1f89224142" => :el_capitan - sha256 "ba1ec63066197a9bb7fc53f075b17d66f739936b151e90e39a741b33f19eaa9f" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - - def install - system "./configure", "--disable-dependency-tracking", - "--enable-simd-accel", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/mk-configure.rb b/Formula/mk-configure.rb deleted file mode 100644 index 5692ae2a32229..0000000000000 --- a/Formula/mk-configure.rb +++ /dev/null @@ -1,30 +0,0 @@ -class MkConfigure < Formula - desc "Lightweight replacement for GNU autotools" - homepage "https://github.com/cheusov/mk-configure" - url "https://downloads.sourceforge.net/project/mk-configure/mk-configure/mk-configure-0.30.0/mk-configure-0.30.0.tar.gz" - sha256 "5c8f953d82a2d36f9492cafcad61d34e81b892d1d91b401af406b086046ef227" - - bottle do - cellar :any_skip_relocation - sha256 "5da2a7b494096eedfe770fede39f69845f32890d419a89944ae8ed9352bd8551" => :mojave - sha256 "1fbce32c61d2840795d80acbb69dba077a17190307e001e7297f34ba279bf2b4" => :high_sierra - sha256 "1fbce32c61d2840795d80acbb69dba077a17190307e001e7297f34ba279bf2b4" => :sierra - sha256 "1fbce32c61d2840795d80acbb69dba077a17190307e001e7297f34ba279bf2b4" => :el_capitan - end - - depends_on "bmake" - depends_on "makedepend" - - def install - ENV["PREFIX"] = prefix - ENV["MANDIR"] = man - - system "bmake", "all" - system "bmake", "install" - doc.install "presentation/presentation.pdf" - end - - test do - system "#{bin}/mkcmake", "-V", "MAKE_VERSION", "-f", "/dev/null" - end -end diff --git a/Formula/mkcert.rb b/Formula/mkcert.rb deleted file mode 100644 index b1535eb24cd6d..0000000000000 --- a/Formula/mkcert.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Mkcert < Formula - desc "Simple tool to make locally trusted development certificates" - homepage "https://github.com/FiloSottile/mkcert" - url "https://github.com/FiloSottile/mkcert/archive/v1.2.0.tar.gz" - sha256 "5889775924122e196235ced42434c8c58d101188b725154a3424d1c8a4d10d14" - - bottle do - cellar :any_skip_relocation - sha256 "2e14996949666a8c815fc940fdb95541fa84550679703441354f4a9571171ab6" => :mojave - sha256 "0ce37a72789919e61bf9ab86a39008a9e4bf44e06e57ec53068276e61689f19b" => :high_sierra - sha256 "08d3fd46f1fd1610c41be55a7d9582e6d58e9e99e3fff257854072cb97022c1f" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/FiloSottile/mkcert").install buildpath.children - - cd "src/github.com/FiloSottile/mkcert" do - system "go", "build", "-o", bin/"mkcert" - prefix.install_metafiles - end - end - - test do - ENV["CAROOT"] = testpath - system bin/"mkcert", "brew.test" - assert_predicate testpath/"brew.test.pem", :exist? - assert_predicate testpath/"brew.test-key.pem", :exist? - output = (testpath/"brew.test.pem").read - assert_match "-----BEGIN CERTIFICATE-----", output - output = (testpath/"brew.test-key.pem").read - assert_match "-----BEGIN PRIVATE KEY-----", output - end -end diff --git a/Formula/mkclean.rb b/Formula/mkclean.rb deleted file mode 100644 index 64d70fef0729a..0000000000000 --- a/Formula/mkclean.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Mkclean < Formula - desc "Optimizes Matroska and WebM files" - homepage "https://www.matroska.org/downloads/mkclean.html" - url "https://downloads.sourceforge.net/project/matroska/mkclean/mkclean-0.8.10.tar.bz2" - sha256 "96773e72903b00d73e68ba9d5f19744a91ed46d27acd511a10eb23533589777d" - - bottle do - cellar :any_skip_relocation - sha256 "645c0b42475bb4d09c2c27219e80ffc3fed4c34b72c5f6bb0e8534cba1101ea2" => :mojave - sha256 "eb519c8f3fb9b2773529d5e7a9751cec7e2a7a67a76af92cab0e6b48449dc6de" => :high_sierra - sha256 "73e502b5331d28da40fc3b94763f6ea30a141e48329bede7eddf3e396991671b" => :sierra - sha256 "a5db5b2309de19ea395efaafcf828c253e38133464faca623545a221f2b0ba52" => :el_capitan - end - - # Fixes compile error with Xcode-4.3+, a hardcoded /Developer. Reported as: - # https://sourceforge.net/p/matroska/bugs/9/ - patch :DATA - - def install - system "./mkclean/configure" - system "make", "mkclean" - bindir = `corec/tools/coremake/system_output.sh`.chomp - bin.install Dir["release/#{bindir}/mk*"] - end - - test do - output = shell_output("#{bin}/mkclean --version 2>&1", 255) - assert_match version.to_s, output - end -end - -__END__ ---- a/corec/tools/coremake/gcc_osx_x64.build 2017-08-22 06:38:25.000000000 -0700 -+++ b/corec/tools/coremake/gcc_osx_x64.build 2017-11-18 22:53:56.000000000 -0800 -@@ -4,11 +4,10 @@ - - PLATFORMLIB = osx_x86 - SVNDIR = osx_x86 --SDK = /Developer/SDKs/MacOSX10.5.sdk - - //CC = xcrun --sdk macosx clang - --CCFLAGS=%(CCFLAGS) -arch x86_64 -mdynamic-no-pic -mmacosx-version-min=10.5 -+CCFLAGS=%(CCFLAGS) -arch x86_64 -mdynamic-no-pic - ASMFLAGS = -f macho64 -D_MACHO -D_HIDDEN - - #include "gcc_osx.inc" diff --git a/Formula/mkcue.rb b/Formula/mkcue.rb deleted file mode 100644 index 5118d944d0840..0000000000000 --- a/Formula/mkcue.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Mkcue < Formula - desc "Generate a CUE sheet from a CD" - homepage "https://packages.debian.org/sid/mkcue" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mkcue/mkcue_1.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mkcue/mkcue_1.orig.tar.gz" - version "1" - sha256 "2aaf57da4d0f2e24329d5e952e90ec182d4aa82e4b2e025283e42370f9494867" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "8efe5acfdcd27c465e5b570d4d0a602370912fa83dd6edbe73b26144e420429c" => :mojave - sha256 "284cfe9fe5a81a75f59610d93710627167dbc48c1d72b89311562c87cea8f8ff" => :high_sierra - sha256 "b1bec8cabaddb6a78a3c2e0a13f73eb426922b64e6d9ef3c0103e92e203f6af4" => :sierra - sha256 "7677f358f99d733a6f43d02cbf5365f3c59b4f93c6a59ee05bd48045a12cbb52" => :el_capitan - sha256 "ddd5ad0b0a05a4fe74e0bfa18390370f547e3d21c00fa2499e50021ea3482ee4" => :yosemite - sha256 "e8b51b15862be5637828a522e1026409c6eef947836cf787787769d7c5b8b5de" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - bin.mkpath - system "make", "install" - end - - test do - touch testpath/"test" - system "#{bin}/mkcue", "test" - end -end diff --git a/Formula/mkdocs.rb b/Formula/mkdocs.rb deleted file mode 100644 index 78668511f1565..0000000000000 --- a/Formula/mkdocs.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Mkdocs < Formula - include Language::Python::Virtualenv - - desc "Project documentation with Markdown" - homepage "https://www.mkdocs.org/" - url "https://github.com/mkdocs/mkdocs/archive/1.0.4.tar.gz" - sha256 "c9a0e1637c1e92b663d290a74ed1370ee7d50c6af165f49215df3a0c10b5bafa" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "fa6aae95e082beaaab49e39298be6612e0d9f0d9bee2f6d328f0aebdaac90868" => :mojave - sha256 "f74b98c684abbede806343fc573b80bf3bd7ed31b20a6df0ee97a48c89259fc9" => :high_sierra - sha256 "ec14bfa77ebb331e8d24e345825f3eff934709ed46f2a3f30f990dfd63654969" => :sierra - end - - depends_on "python" - - resource "click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "livereload" do - url "https://files.pythonhosted.org/packages/f7/1b/aa5fb8c59fc683bbabdfdcfd4455673d07ac05f391d6b1244ad204b33ebc/livereload-2.5.2.tar.gz" - sha256 "dd4469a8f5a6833576e9f5433f1439c306de15dbbfeceabd32479b1123380fa5" - end - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/3c/52/7bae9e99a7a4be6af4a713fe9b692777e6468d28991c54c273dfb6ec9fb2/Markdown-3.0.1.tar.gz" - sha256 "d02e0f9b04c500cde6637c11ad7c72671f359b87b9fe924b2383649d8841db7c" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "singledispatch" do - url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz" - sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/e6/78/6e7b5af12c12bdf38ca9bfe863fcaf53dc10430a312d0324e76c1e5ca426/tornado-5.1.1.tar.gz" - sha256 "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409" - end - - def install - virtualenv_install_with_resources - end - - test do - # build a very simple site that uses the "readthedocs" theme. - (testpath/"mkdocs.yml").write <<~EOS - site_name: MkLorum - nav: - - Home: index.md - theme: readthedocs - EOS - mkdir testpath/"docs" - (testpath/"docs/index.md").write <<~EOS - # A heading - - And some deeply meaningful prose. - EOS - system "#{bin}/mkdocs", "build", "--clean" - end -end diff --git a/Formula/mkhexgrid.rb b/Formula/mkhexgrid.rb deleted file mode 100644 index 1e4dcca03d9b9..0000000000000 --- a/Formula/mkhexgrid.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Mkhexgrid < Formula - desc "Fully-configurable hex grid generator" - homepage "http://www.nomic.net/~uckelman/mkhexgrid/" - url "http://www.nomic.net/~uckelman/mkhexgrid/releases/mkhexgrid-0.1.1.src.tar.bz2" - sha256 "122609261cc91c2063ab5315d4316a27c9a0ab164f663a6cb781dd87310be3dc" - - bottle do - cellar :any - sha256 "dc24513041f3dc8ae8cd27abb07aeb028074a636b3a139dfa6e862eee73237f5" => :mojave - sha256 "66011c65d0a32036f58b67ae41ca6a61eb307bc92d958dec026f88e180cab972" => :high_sierra - sha256 "d2be4b1376fbeb90429433d0cae9b95b8b927701038156a7cb3d73a49620548f" => :sierra - sha256 "a87808f88a90308adfb14cf89b3bd89251580301f40ba18d08816de2df0be632" => :el_capitan - sha256 "ec463b01aecec2cc76cd6f91761867fa0efbdeddf60f09bc134f45822006889b" => :yosemite - end - - depends_on "boost" - depends_on "gd" - - def install - inreplace "Makefile" do |s| - s.change_make_var! "DESTDIR", prefix - s.change_make_var! "CC", ENV.cc - # don't chown/chgrp the installed files - s.gsub! "-o 0 -g 0", "" - end - inreplace "mkhexgrid.cpp" do |s| - s.sub! "catch (exception &e)", "catch (std::exception &e)" - end - system "make" # needs to be separate - system "make", "install" - end - - test do - # test the example from the man page (but without inches) - system "#{bin}/mkhexgrid", "--output=ps", "--image-width=2448", - "--image-height=1584", "--hex-side=36", "--coord-bearing=0", - "--coord-dist=22", "--coord-size=8", "--grid-thickness=1", - "--coord-font=Helvetica", "--grid-grain=h", "--grid-start=o", - "--coord-tilt=-90", "--centered", "-o", "test.ps" - end -end diff --git a/Formula/mkl-dnn.rb b/Formula/mkl-dnn.rb deleted file mode 100644 index 9b0e1d511bd98..0000000000000 --- a/Formula/mkl-dnn.rb +++ /dev/null @@ -1,36 +0,0 @@ -class MklDnn < Formula - desc "Intel Math Kernel Library for Deep Neural Networks" - homepage "https://01.org/mkl-dnn" - url "https://github.com/intel/mkl-dnn/archive/v0.17.2.tar.gz" - sha256 "56c3e22d4fad816059cc58fd8e78ab3bacbec76a6bbded7eaead66220d8e5134" - - bottle do - cellar :any - sha256 "d4c34463550ffd98a595f4b360e8e3e66af4163d2ada2acf3540f3ed23db7031" => :mojave - sha256 "9bc0ff4d8458a9b657a4197cd29bac7d58e52fa2957f9dd117c63a4ef0bb64c5" => :high_sierra - sha256 "a494d9b6626d515a42d27be546fd9eab6c704fb041b9e8ace4fbdd437a81c3f6" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "doc" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - mkldnn_engine_t engine; - mkldnn_status_t status = mkldnn_engine_create(&engine, mkldnn_cpu, 0); - return !(status == mkldnn_success); - } - EOS - system ENV.cc, "-L#{lib}", "-lmkldnn", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/mksh.rb b/Formula/mksh.rb deleted file mode 100644 index 7d3d7fe6d8dca..0000000000000 --- a/Formula/mksh.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Mksh < Formula - desc "MirBSD Korn Shell" - homepage "https://www.mirbsd.org/mksh.htm" - url "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R56c.tgz" - mirror "https://dl.bintray.com/homebrew/mirror/mksh-56c.tgz" - version "56c" - sha256 "dd86ebc421215a7b44095dc13b056921ba81e61b9f6f4cdab08ca135d02afb77" - - bottle do - cellar :any_skip_relocation - sha256 "af3e53f3876dad1d565c1d8dc88cbd84901ea0bf50599dc66369ee5d6f853a60" => :mojave - sha256 "4ec398134339f30d26fe53dc2b8d8cf415b196c7cb84327c43cdf506a77376df" => :high_sierra - sha256 "79d49b6a5b52e1656443ef32c3a55566cc2ff7c1668e80f85011e9bee92d8567" => :sierra - sha256 "7343ace15a9f87d07cf35a4074c093104c68666c8443d9bb120e58dd660ccf70" => :el_capitan - end - - def install - system "sh", "./Build.sh", "-r", "-c", (ENV.compiler == :clang) ? "lto" : "combine" - bin.install "mksh" - man1.install "mksh.1" - end - - def caveats; <<~EOS - To allow using mksh as a login shell, run this as root: - echo #{HOMEBREW_PREFIX}/bin/mksh >> /etc/shells - Then, any user may run `chsh` to change their shell. - EOS - end - - test do - assert_equal "honk", - shell_output("#{bin}/mksh -c 'echo honk'").chomp - end -end diff --git a/Formula/mktorrent.rb b/Formula/mktorrent.rb deleted file mode 100644 index 1e8882bef9c0f..0000000000000 --- a/Formula/mktorrent.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mktorrent < Formula - desc "Create BitTorrent metainfo files" - homepage "https://mktorrent.sourceforge.io/" - url "https://github.com/Rudde/mktorrent/archive/v1.1.tar.gz" - sha256 "d0f47500192605d01b5a2569c605e51ed319f557d24cfcbcb23a26d51d6138c9" - - bottle do - cellar :any - sha256 "4be468e8fd3154e5f4205d951f6ec6aa29fe814a43814ccc5ed5fbe52f2fdecd" => :mojave - sha256 "a07987becfcb09c9246a441f5324449b7500c17a6e456a114c0583d43ad1bba1" => :high_sierra - sha256 "9edd5b41e870ca716bad213d2ecf095e1d33b124ff150952fafc8a0d4dfd4560" => :sierra - sha256 "6b11723fa40237afee4a17781b51c0cf6be510c3df02bca72cd5f6a299e22f24" => :el_capitan - sha256 "d0f3f1d677e34044abcd712163c01008b56391d665daad15911acd446255c88a" => :yosemite - end - - depends_on "openssl" - - def install - system "make", "USE_PTHREADS=1", "USE_OPENSSL=1", "USE_LONG_OPTIONS=1" - bin.install "mktorrent" - end - - test do - (testpath/"test.txt").write <<~EOS - Injustice anywhere is a threat to justice everywhere. - EOS - - system bin/"mktorrent", "-d", "-c", "Martin Luther King Jr", "test.txt" - assert_predicate testpath/"test.txt.torrent", :exist?, "Torrent was not created" - - file = File.read(testpath/"test.txt.torrent") - output = file.force_encoding("ASCII-8BIT") if file.respond_to?(:force_encoding) - assert_match "Martin Luther King Jr", output - end -end diff --git a/Formula/mkvalidator.rb b/Formula/mkvalidator.rb deleted file mode 100644 index 87064553815c8..0000000000000 --- a/Formula/mkvalidator.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Mkvalidator < Formula - desc "Tool to verify Matroska and WebM files for spec conformance" - homepage "https://www.matroska.org/downloads/mkvalidator.html" - url "https://downloads.sourceforge.net/project/matroska/mkvalidator/mkvalidator-0.5.2.tar.bz2" - sha256 "2e2a91062f6bf6034e8049646897095b5fc7a1639787d5fe0fcef1f1215d873b" - - bottle do - cellar :any_skip_relocation - sha256 "d8ed0ae48b3922549518802148f3687a9bcab9f072624d619e077368a874e71b" => :mojave - sha256 "5f0c85894cd7d4a7c5cdce1e26c5cc7c15ac7baa6c32a63e3474632f7727d8af" => :high_sierra - sha256 "5f0c85894cd7d4a7c5cdce1e26c5cc7c15ac7baa6c32a63e3474632f7727d8af" => :sierra - sha256 "6c253cdf3c824b6e37af7cca51bf05a930785286bc83ec367e10500d9645519c" => :el_capitan - end - - resource "tests" do - url "https://github.com/dunn/garbage/raw/c0e682836e5237eef42a000e7d00dcd4b6dcebdb/test.mka" - sha256 "6d7cc62177ec3f88c908614ad54b86dde469dbd2b348761f6512d6fc655ec90c" - end - - def install - ENV.deparallelize # Otherwise there are races - - # Reported 2 Nov 2017 https://github.com/Matroska-Org/foundation-source/issues/31 - inreplace "configure", "\r", "\n" - - system "./configure" - system "make", "-C", "mkvalidator" - bindir = `corec/tools/coremake/system_output.sh`.chomp - bin.install "release/#{bindir}/mkvalidator" - end - - test do - resource("tests").stage do - system bin/"mkvalidator", "test.mka" - end - end -end diff --git a/Formula/mkvdts2ac3.rb b/Formula/mkvdts2ac3.rb deleted file mode 100644 index aec2954b3030a..0000000000000 --- a/Formula/mkvdts2ac3.rb +++ /dev/null @@ -1,115 +0,0 @@ -class Mkvdts2ac3 < Formula - desc "Convert DTS audio to AC3 within a matroska file" - homepage "https://github.com/JakeWharton/mkvdts2ac3" - revision 3 - head "https://github.com/JakeWharton/mkvdts2ac3.git" - - stable do - url "https://github.com/JakeWharton/mkvdts2ac3/archive/1.6.0.tar.gz" - sha256 "f9f070c00648c1ea062ac772b160c61d1b222ad2b7d30574145bf230e9288982" - - # patch with upstream fix for newer mkvtoolnix compatibility - # https://github.com/JakeWharton/mkvdts2ac3/commit/f5008860e7ec2cbd950a0628c979f06387bf76d0 - patch :DATA - end - - bottle do - cellar :any_skip_relocation - sha256 "932762d9435e3ddd0fff7a1ead1e0c906bc505517545f0c10f877cd61dd77365" => :mojave - sha256 "54e70bb92dfdfe615346d6ba815648b1714da8b08a2f361fa95d104f14cee367" => :high_sierra - sha256 "9a501348303556d867917f03c9c456216d1de39a19e5978472e2ef57f7d6731f" => :sierra - sha256 "d3eaf28d8c9718a73c2309eb8d9fc7c0a8db2ea6517324a80092ca02ac7842d4" => :el_capitan - sha256 "4b4c9bf979e7ecd9efa254a9e5fdfe13a5549a209958f86e1233b8cc87a38e4b" => :yosemite - sha256 "336cc7357b741d3e045a2c9a32f19f8daba41cfd3d00d2d3422d7b31c91ad538" => :mavericks - end - - depends_on "ffmpeg" - depends_on "mkvtoolnix" - - def install - bin.install "mkvdts2ac3.sh" => "mkvdts2ac3" - end - - test do - system "#{bin}/mkvdts2ac3", "--version" - end -end - -__END__ -diff --git a/mkvdts2ac3.sh b/mkvdts2ac3.sh -index 270f768..156d60d 100755 ---- a/mkvdts2ac3.sh -+++ b/mkvdts2ac3.sh -@@ -355,8 +355,18 @@ if [ $EXECUTE = 1 ]; then - checkdep perl - fi - -+# Make some adjustments based on the version of mkvtoolnix -+MKVTOOLNIXVERSION=$(mkvmerge -V | cut -d " " -f 2 | sed s/\[\^0-9\]//g) -+if [ ${MKVTOOLNIXVERSION} -lt 670 ]; then -+ AUDIOTRACKPREFIX="audio (A_" -+ VIDEOTRACKPREFIX="video (V_" -+else -+ AUDIOTRACKPREFIX="audio (" -+ VIDEOTRACKPREFIX="video (" -+fi -+ - # Added check to see if AC3 track exists. If so, no need to continue --if [ "$(mkvmerge -i "$MKVFILE" | grep -i "A_AC3")" ]; then -+if [ "$(mkvmerge -i "$MKVFILE" | grep -i "${AUDIOTRACKPREFIX}AC3")" ]; then - echo $"AC3 track already exists in '$MKVFILE'." - if [ $FORCE = 0 ]; then - echo $"Use -f or --force argument to bypass this check." -@@ -389,11 +399,11 @@ doprint $"WORKING DIRECTORY: $WD" - if [ -z $DTSTRACK ]; then - doprint "" - doprint $"Find first DTS track in MKV file." -- doprint "> mkvmerge -i \"$MKVFILE\" | grep -m 1 \"audio (A_DTS)\" | cut -d ":" -f 1 | cut -d \" \" -f 3" -+ doprint "> mkvmerge -i \"$MKVFILE\" | grep -m 1 \"${AUDIOTRACKPREFIX}DTS)\" | cut -d ":" -f 1 | cut -d \" \" -f 3" - DTSTRACK="DTSTRACK" #Value for debugging - dopause - if [ $EXECUTE = 1 ]; then -- DTSTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "audio (A_DTS)" | cut -d ":" -f 1 | cut -d " " -f 3) -+ DTSTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "${AUDIOTRACKPREFIX}DTS)" | cut -d ":" -f 1 | cut -d " " -f 3) - - # Check to make sure there is a DTS track in the MVK - if [ -z $DTSTRACK ]; then -@@ -405,10 +415,10 @@ if [ -z $DTSTRACK ]; then - else - # Checks to make sure the command line argument track id is valid - doprint $"Checking to see if DTS track specified via arguments is valid." -- doprint "> mkvmerge -i \"$MKVFILE\" | grep \"Track ID $DTSTRACK: audio (A_DTS)\"" -+ doprint "> mkvmerge -i \"$MKVFILE\" | grep \"Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS)\"" - dopause - if [ $EXECUTE = 1 ]; then -- VALID=$(mkvmerge -i "$MKVFILE" | grep "Track ID $DTSTRACK: audio (A_DTS)") -+ VALID=$(mkvmerge -i "$MKVFILE" | grep "Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS)") - - if [ -z "$VALID" ]; then - error $"Track ID '$DTSTRACK' is not a DTS track and/or does not exist." -@@ -555,14 +565,14 @@ else - # If user doesn't want the original DTS track drop it - if [ $NODTS ]; then - # Count the number of audio tracks in the file -- AUDIOTRACKS=$(mkvmerge -i "$MKVFILE" | grep "audio (A_" | wc -l) -+ AUDIOTRACKS=$(mkvmerge -i "$MKVFILE" | grep "$AUDIOTRACKPREFIX" | wc -l) - - if [ $AUDIOTRACKS -eq 1 ]; then - # If there is only the DTS audio track then drop all audio tracks - CMD="$CMD -A" - else - # Get a list of all the other audio tracks -- SAVETRACKS=$(mkvmerge -i "$MKVFILE" | grep "audio (A_" | cut -d ":" -f 1 | grep -vx "Track ID $DTSTRACK" | cut -d " " -f 3 | awk '{ if (T == "") T=$1; else T=T","$1 } END { print T }') -+ SAVETRACKS=$(mkvmerge -i "$MKVFILE" | grep "$AUDIOTRACKPREFIX" | cut -d ":" -f 1 | grep -vx "Track ID $DTSTRACK" | cut -d " " -f 3 | awk '{ if (T == "") T=$1; else T=T","$1 } END { print T }') - # And copy only those - CMD="$CMD -a \"$SAVETRACKS\"" - -@@ -576,7 +586,7 @@ else - fi - - # Get track ID of video track -- VIDEOTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "video (V_" | cut -d ":" -f 1 | cut -d " " -f 3) -+ VIDEOTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "$VIDEOTRACKPREFIX" | cut -d ":" -f 1 | cut -d " " -f 3) - # Add original MKV file, set header compression scheme - CMD="$CMD --compression $VIDEOTRACK:$COMP \"$MKVFILE\"" - diff --git a/Formula/mkvtomp4.rb b/Formula/mkvtomp4.rb deleted file mode 100644 index 0a68812c419a9..0000000000000 --- a/Formula/mkvtomp4.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Mkvtomp4 < Formula - desc "Convert mkv files to mp4" - homepage "https://github.com/gavinbeatty/mkvtomp4/" - url "https://github.com/gavinbeatty/mkvtomp4/archive/mkvtomp4-v1.3.tar.gz" - sha256 "cc644b9c0947cf948c1b0f7bbf132514c6f809074ceed9edf6277a8a1b81c87a" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "06b96194e09c4e952de56492047f83a6af1a173aba059ba9edd3ac2664e2cbf4" => :mojave - sha256 "2efab72b382b03ac47c70b1878587afafdd8de2b7361d96f98e837692d5b4ca4" => :high_sierra - sha256 "4c085a7e2cbfada2a722dc1d676fab80dacc1f490c14d2a2aff10a4fa60f5225" => :sierra - sha256 "f7610334538d3e3df8cfeab0a5cd7d9a44acfb141212b4852e340064657e50a8" => :el_capitan - sha256 "7ae6b5351e551f6f04811cc5b963fd67adc18132f9b4dc91fc07886f05b0d10f" => :yosemite - sha256 "3346ab8be87d01200616db3887ed05d0d6693d2003ca4c3d5530c439ef732544" => :mavericks - end - - depends_on "ffmpeg" - depends_on "gpac" - depends_on "mkvtoolnix" - depends_on "python@2" # does not support Python 3 - - def install - ENV["PYTHONPATH"] = lib+"python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", lib+"python2.7/site-packages" - - system "make" - system "python", "setup.py", "install", "--prefix=#{prefix}" - - bin.install "mkvtomp4.py" => "mkvtomp4" - bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/mkvtomp4", "--help" - end -end diff --git a/Formula/mkvtoolnix.rb b/Formula/mkvtoolnix.rb deleted file mode 100644 index 240994f7a579d..0000000000000 --- a/Formula/mkvtoolnix.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Mkvtoolnix < Formula - desc "Matroska media files manipulation tools" - homepage "https://mkvtoolnix.download/" - url "https://mkvtoolnix.download/sources/mkvtoolnix-30.1.0.tar.xz" - sha256 "4628f40d62d359edb1441c52381b1f3a61aa227279133d7e01257f91e0d92591" - - bottle do - cellar :any - sha256 "0709bb1a2c0fe4f897a6dfdc20a14e3b98dbe324d83d04b0aaf7a41f0e995dff" => :mojave - sha256 "4a3e05604e716d16a638ad9afd0733c35b29dcd4fc6f3aa13f60877e55a6dc36" => :high_sierra - sha256 "d9df1172b5b51eaf1dffcc82eae86245777acb3fd195cb5fea943c12640ad56b" => :sierra - end - - head do - url "https://gitlab.com/mbunkus/mkvtoolnix.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "docbook-xsl" => :build - depends_on "fmt" => :build - depends_on "pkg-config" => :build - depends_on "pugixml" => :build - depends_on "ruby" => :build if MacOS.version <= :mountain_lion - depends_on "boost" - depends_on "flac" - depends_on "gettext" - depends_on "libebml" - depends_on "libmagic" - depends_on "libmatroska" - depends_on "libogg" - depends_on "libvorbis" - - needs :cxx11 - - def install - ENV.cxx11 - - features = %w[flac libebml libmagic libmatroska libogg libvorbis] - extra_includes = "" - extra_libs = "" - features.each do |feature| - extra_includes << "#{Formula[feature].opt_include};" - extra_libs << "#{Formula[feature].opt_lib};" - end - extra_includes.chop! - extra_libs.chop! - - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--with-boost=#{Formula["boost"].opt_prefix}", - "--with-docbook-xsl-root=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl", - "--with-extra-includes=#{extra_includes}", - "--with-extra-libs=#{extra_libs}", - "--disable-qt" - system "rake", "-j#{ENV.make_jobs}" - system "rake", "install" - end - - test do - mkv_path = testpath/"Great.Movie.mkv" - sub_path = testpath/"subtitles.srt" - sub_path.write <<~EOS - 1 - 00:00:10,500 --> 00:00:13,000 - Homebrew - EOS - - system "#{bin}/mkvmerge", "-o", mkv_path, sub_path - system "#{bin}/mkvinfo", mkv_path - system "#{bin}/mkvextract", "tracks", mkv_path, "0:#{sub_path}" - end -end diff --git a/Formula/mldonkey.rb b/Formula/mldonkey.rb deleted file mode 100644 index 999bb2b780fdd..0000000000000 --- a/Formula/mldonkey.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Mldonkey < Formula - desc "OCaml/GTK client for the eDonkey P2P network" - homepage "https://mldonkey.sourceforge.io" - url "https://github.com/ygrek/mldonkey/releases/download/release-3-1-6/mldonkey-3.1.6.tar.bz2" - sha256 "1b36b57c05a83c2e363c085bf8e80630884c6c92ecdeffc1ad5e1c39a98e043d" - revision 2 - head "https://github.com/ygrek/mldonkey.git", :branch => "next" - - bottle do - rebuild 1 - sha256 "7caaa8d709b545de83224c755961b7830a9068240b99ff0dad8992e4761af7ef" => :mojave - sha256 "56f05e054be09a999aa33fda58ec072a2eace34976239b1dca387e079a5eff6d" => :high_sierra - sha256 "4b69f4572789c1e8ea5ddb273b0dc816224b192ca6e486353224ce7878c10c1c" => :sierra - sha256 "caead710b3c7d058f09ca482d296d50b58b3e1419e5a7330f9227970ae34b58b" => :el_capitan - sha256 "174930623fa07bdfa5ac8e1281d48f01e90e8bdc2acb54e1fd768d7356aaec9e" => :yosemite - end - - depends_on "camlp4" => :build - depends_on "ocaml" => :build - depends_on "ocaml-num" => :build - depends_on "pkg-config" => :build - depends_on "gd" - depends_on "libpng" - - def install - ENV["OCAMLPARAM"] = "safe-string=0,_" # OCaml 4.06.0 compat - - ENV.deparallelize - - # Fix compiler selection - ENV["OCAMLC"] = "#{HOMEBREW_PREFIX}/bin/ocamlc.opt -cc #{ENV.cc}" - - system "./configure", "--prefix=#{prefix}", "--disable-magic" - system "make", "install" - end - - test do - system bin/"mlbt", "--help" - end -end diff --git a/Formula/mlkit.rb b/Formula/mlkit.rb deleted file mode 100644 index 5cd0f267f81de..0000000000000 --- a/Formula/mlkit.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Mlkit < Formula - desc "Compiler for the Standard ML programming language" - homepage "https://melsman.github.io/mlkit" - url "https://github.com/melsman/mlkit/archive/mlkit-4.3.15.tar.gz" - sha256 "d047c7569318aef5160833aef434aee72c1aa5a7721e0db819fbeb9ad82bacb6" - head "https://github.com/melsman/mlkit.git" - - bottle do - sha256 "62c07bb142e52797537d38097653b3593954f5a2e3ea60c91eb0f377918962a9" => :high_sierra - sha256 "3ef50b1e44b2c41bc888a830b69488ac927303cd45c79bf7c902cf3d4e9a0f87" => :sierra - sha256 "6f88fc12dfebf563bd7ea7a96bf5a377c3e0fc0cfaed3c8205f9a75bcdec817e" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "mlton" => :build - depends_on "gmp" - - def install - system "sh", "./autobuild" - system "./configure", "--prefix=#{prefix}" - - # The ENV.permit_arch_flags specification is needed on 64-bit - # machines because the mlkit compiler generates 32-bit machine - # code whereas the mlton compiler generates 64-bit machine - # code. Because of this difference, the ENV.m64 and ENV.m32 flags - # are not sufficient for the formula as clang is used by both - # tools in a single makefile target. For the mlton-compilation of - # sml-code, no arch flags are used for the clang assembler - # invocation. Thus, on a 32-bit machine, both the mlton-compiled - # binary (the mlkit compiler) and the 32-bit native code generated - # by the mlkit compiler will be running 32-bit code. - ENV.permit_arch_flags - system "make", "mlkit" - system "make", "mlkit_libs" - system "make", "install" - end - - test do - (testpath/"test.sml").write <<~EOS - fun f(x) = x + 2 - val a = [1,2,3,10] - val b = List.foldl (op +) 0 (List.map f a) - val res = if b = 24 then "OK" else "ERR" - val () = print ("Result: " ^ res ^ "\\n") - EOS - system "#{bin}/mlkit", "-o", "test", "test.sml" - assert_equal "Result: OK\n", shell_output("./test") - end -end diff --git a/Formula/mlogger.rb b/Formula/mlogger.rb deleted file mode 100644 index 11dbfdab80b79..0000000000000 --- a/Formula/mlogger.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Mlogger < Formula - desc "Log to syslog from the command-line" - homepage "https://github.com/nbrownus/mlogger" - url "https://github.com/nbrownus/mlogger/archive/v1.2.0.tar.gz" - sha256 "141bb9af13a8f0e865c8509ac810c10be4e21f14db5256ef5c7a6731b490bf32" - - bottle do - cellar :any_skip_relocation - sha256 "003cc065352384eeb31109f19c9be3223b5e94cbe859dc3c55c9b1f4e3bd0cb3" => :mojave - sha256 "9eec751c684f9043f667bf5e9d793379ca3a9824a05b359ed91af2d7e41d52b7" => :high_sierra - sha256 "1f7392a3d16a2bf595487a4b35bf5c866fa00c0967629eef46f07cbf6e696ff4" => :sierra - sha256 "e1f78a9ef569085efcac8c41bd2a70feda85e7fcba5eb7b46a9ee5341cf8cb2d" => :el_capitan - sha256 "f64331a815b26047bc982340650aae806a568a10060adfc819e25d077059af2e" => :yosemite - end - - def install - system "make" - bin.install "mlogger" - end - - test do - system "#{bin}/mlogger", "-i", "-d", "test" - end -end diff --git a/Formula/mlt.rb b/Formula/mlt.rb deleted file mode 100644 index ea36604320fdd..0000000000000 --- a/Formula/mlt.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mlt < Formula - desc "Author, manage, and run multitrack audio/video compositions" - homepage "https://www.mltframework.org/" - url "https://github.com/mltframework/mlt/archive/v6.12.0.tar.gz" - sha256 "a4af6245f0d78f9b5d4bfdfd632d7f6a8a81e47c6eb7184fb1c040db747607ac" - - bottle do - sha256 "e24add977a2c3467ff78da442f08f92f98dfc086d874cc15480d48bd942fb403" => :mojave - sha256 "64d3551e8e755c64639bc61b96a621381b215bfbe0903ed87a87898cbc8996f2" => :high_sierra - sha256 "5dd285f824a761371eee58c03f285e7625d8ed7ec23f942934b30b574531188c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "frei0r" - depends_on "libdv" - depends_on "libsamplerate" - depends_on "libvorbis" - depends_on "sdl" - depends_on "sox" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-jackrack", - "--disable-swfdec", - "--disable-gtk", - "--enable-gpl" - system "make" - system "make", "install" - end - - test do - system "#{bin}/melt", "-version" - end -end diff --git a/Formula/mlton.rb b/Formula/mlton.rb deleted file mode 100644 index 7e0b105ba5fa4..0000000000000 --- a/Formula/mlton.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Mlton < Formula - desc "Whole-program, optimizing compiler for Standard ML" - homepage "http://mlton.org" - url "https://downloads.sourceforge.net/project/mlton/mlton/20180207/mlton-20180207.src.tgz" - version "20180207" - sha256 "872cd98da3db720cbe05f673eaa1776d020d828713753f18fa5dd6a268195fef" - head "https://github.com/MLton/mlton.git" - - bottle do - cellar :any - sha256 "9697202bdf505babc899053dfe2cf2377c9062ce97c3f38dc99754ac48fb4c0e" => :mojave - sha256 "c3712458c252eba59c3b370f99662cc02e06f6aad3b5e0bb5abe6980541bac9c" => :high_sierra - sha256 "7605c1540d4449fdcda1802ee31dd891dc3d197081747744b575300bebe9000c" => :sierra - sha256 "7182b0b044b789e03f99577dc993e0cb9737b9c175dd17815018fa777d0f4214" => :el_capitan - end - - depends_on "gmp" - - # The corresponding upstream binary release used to bootstrap. - resource "bootstrap" do - url "https://downloads.sourceforge.net/project/mlton/mlton/20180207/mlton-20180207-1.amd64-darwin.gmp-static.tgz" - sha256 "bb2d982ef97d6ef4efe078d23a09baf3e52f6fd6c8f1a60016e1624438f487b3" - end - - def install - # Install the corresponding upstream binary release to 'bootstrap'. - bootstrap = buildpath/"bootstrap" - resource("bootstrap").stage do - args = %W[ - WITH_GMP=#{Formula["gmp"].opt_prefix} - PREFIX=#{bootstrap} - MAN_PREFIX_EXTRA=/share - ] - system "make", *(args + ["install"]) - end - ENV.prepend_path "PATH", bootstrap/"bin" - - # Support parallel builds (https://github.com/MLton/mlton/issues/132) - ENV.deparallelize - args = %W[ - WITH_GMP=#{Formula["gmp"].opt_prefix} - DESTDIR= - PREFIX=#{prefix} - MAN_PREFIX_EXTRA=/share - ] - system "make", *(args + ["all"]) - system "make", *(args + ["install"]) - end - - test do - (testpath/"hello.sml").write <<~'EOS' - val () = print "Hello, Homebrew!\n" - EOS - system "#{bin}/mlton", "hello.sml" - assert_equal "Hello, Homebrew!\n", `./hello` - end -end diff --git a/Formula/mm-common.rb b/Formula/mm-common.rb deleted file mode 100644 index 42120285f8009..0000000000000 --- a/Formula/mm-common.rb +++ /dev/null @@ -1,19 +0,0 @@ -class MmCommon < Formula - desc "Build utilities for C++ interfaces of GTK+ and GNOME packages" - homepage "https://www.gtkmm.org/" - url "https://download.gnome.org/sources/mm-common/0.9/mm-common-0.9.12.tar.xz" - sha256 "ceffdcce1e5b52742884c233ec604bf6fded12eea9da077ce7a62c02c87e7c0b" - - bottle do - cellar :any_skip_relocation - sha256 "cffdd1590271cec32a56b7b0a54f92e1b657e5b26ec7c62c8c18b8b49364f72d" => :mojave - sha256 "42c9654bebbc472d90bc31d14e0832d55367d8d86d6750ab546a129a48de342b" => :high_sierra - sha256 "42c9654bebbc472d90bc31d14e0832d55367d8d86d6750ab546a129a48de342b" => :sierra - sha256 "42c9654bebbc472d90bc31d14e0832d55367d8d86d6750ab546a129a48de342b" => :el_capitan - end - - def install - system "./configure", "--disable-silent-rules", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/mmark.rb b/Formula/mmark.rb deleted file mode 100644 index 6a6bc4e746c9a..0000000000000 --- a/Formula/mmark.rb +++ /dev/null @@ -1,55 +0,0 @@ -require "language/go" - -class Mmark < Formula - desc "Powerful markdown processor in Go geared towards the IETF" - homepage "https://mmark.nl/" - url "https://github.com/mmarkdown/mmark/archive/v2.0.7.tar.gz" - sha256 "8ab83495b21d0b05fd763f3a79aeaf983c6905eccfbcca48f63c169ef3705639" - - bottle do - cellar :any_skip_relocation - sha256 "4f44a848ea631eb30d12a0268056f6a43aa4b19c12a03498dc3819e8abd6e4cd" => :mojave - sha256 "6f8482d9d2c05aab64664281af2dd617637eadf61762b40e6b8bd284495b193d" => :high_sierra - sha256 "195b590522d39c6ca3e298615e5b21112c0cbe7b33db367565d67268ae3a4fe4" => :sierra - sha256 "062eca50beb44f55e4940edb11ae3c1e9a0c4360b5d770f4c7ee0f37631543b9" => :el_capitan - end - - depends_on "go" => :build - - go_resource "github.com/BurntSushi/toml" do - url "https://github.com/BurntSushi/toml.git", - :revision => "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005" - end - - go_resource "github.com/gomarkdown/markdown" do - url "https://github.com/gomarkdown/markdown.git", - :revision => "6fda95a9e93f739db582f4a3514309830fd47354" - end - - go_resource "github.com/mmarkdown/markdown" do - url "https://github.com/mmarkdown/markdown.git", - :revision => "6fda95a9e93f739db582f4a3514309830fd47354" - end - - resource "test" do - url "https://raw.githubusercontent.com/mmarkdown/mmark/v2.0.7/rfc/2100.md" - sha256 "2d220e566f8b6d18cf584290296c45892fe1a010c38d96fb52a342e3d0deda30" - end - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/mmarkdown/" - ln_sf buildpath, buildpath/"src/github.com/mmarkdown/mmark" - Language::Go.stage_deps resources, buildpath/"src" - - system "go", "build", "-o", bin/"mmark" - man1.install "mmark.1" - doc.install "Syntax.md" - end - - test do - resource("test").stage do - system "#{bin}/mmark", "-2", "-ast", "2100.md" - end - end -end diff --git a/Formula/mmix.rb b/Formula/mmix.rb deleted file mode 100644 index a717335805716..0000000000000 --- a/Formula/mmix.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Mmix < Formula - desc "64-bit RISC architecture designed by Donald Knuth" - homepage "http://mmix.cs.hm.edu/" - url "http://mmix.cs.hm.edu/src/mmix-20160804.tgz" - sha256 "fad8e64fddf2d75cbcd5080616b47e11a2d292a428cdb0c12e579be680ecdee9" - - bottle do - cellar :any_skip_relocation - sha256 "8b1cc6672a548ea1c3320ac4889e6b081792c3181fd4ecfc126ebe9c2fb18365" => :mojave - sha256 "7bc054e2d244fe693b4ed5ef47c56e23ac4952b15ddc5de55d19150d4dc2bf30" => :high_sierra - sha256 "b694920e61edf2dec094618910be78fcd4fbbcad22d4d37363555aad38ee0af0" => :sierra - sha256 "c1e8e0d2d627b3ab2c2c68a8b358981dab07466c3c70f3a2e4df8557006deb92" => :el_capitan - sha256 "7675c2bc1253e4da2a126d52942449f71cabdd83c39874403d449b5a05ceb145" => :yosemite - end - - depends_on "cweb" => :build - - def install - ENV.deparallelize - system "make", "all" - bin.install "mmix", "mmixal", "mmmix", "mmotype" - end - - test do - (testpath/"hello.mms").write <<~EOS - LOC Data_Segment - GREG @ - txt BYTE "Hello world!",0 - - LOC #100 - - Main LDA $255,txt - TRAP 0,Fputs,StdOut - TRAP 0,Fputs,StdErr - TRAP 0,Halt,0 - EOS - system bin/"mmixal", "hello.mms" - assert_equal "Hello world!", shell_output("#{bin}/mmix hello.mmo") - end -end diff --git a/Formula/mmseqs2.rb b/Formula/mmseqs2.rb deleted file mode 100644 index f2657fc6dffbc..0000000000000 --- a/Formula/mmseqs2.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Mmseqs2 < Formula - desc "Software suite for very fast protein sequence search and clustering" - homepage "https://mmseqs.org/" - url "https://github.com/soedinglab/MMseqs2/archive/7-4e23d.tar.gz" - version "7-4e23d" - sha256 "39b04ea60741ca209c37be129b852b5024fed1691817e6eb1e80e382f7261724" - - bottle do - cellar :any - sha256 "e90c697974e8bfac9ab2cba1c25521de6d8967f42c4191f5f53fb97809fce4e3" => :mojave - sha256 "3d65ac201907466812a84eba4e5cbd65e9921844b20d611b89ee4dadcd748529" => :high_sierra - sha256 "e27970a0d1e68e4385dd0aa29a0d91a62d297b4879a12ea5a512ac2356b333a7" => :sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - - cxxstdlib_check :skip - - fails_with :clang # needs OpenMP support - - resource "documentation" do - url "https://github.com/soedinglab/MMseqs2.wiki.git", - :revision => "d3607c7913e67c7bb553a8dff0cc66eeb3387506" - end - - def install - args = *std_cmake_args << "-DHAVE_TESTS=0" << "-DHAVE_MPI=0" - args << "-DVERSION_OVERRIDE=#{version}" - - args << "-DHAVE_SSE4_1=1" if build.bottle? - - system "cmake", ".", *args - system "make", "install" - - resource("documentation").stage { doc.install Dir["*"] } - pkgshare.install "examples" - bash_completion.install "util/bash-completion.sh" => "mmseqs.sh" - end - - def caveats - unless Hardware::CPU.sse4? - "MMseqs2 requires at least SSE4.1 CPU instruction support. The binary will not work correctly." - end - end - - test do - system "#{bin}/mmseqs", "createdb", "#{pkgshare}/examples/QUERY.fasta", "q" - system "#{bin}/mmseqs", "cluster", "q", "res", "tmp", "-s", "1" - assert_predicate testpath/"res", :exist? - assert_predicate (testpath/"res").size, :positive? - assert_predicate testpath/"res.index", :exist? - assert_predicate (testpath/"res.index").size, :positive? - end -end diff --git a/Formula/mmsrip.rb b/Formula/mmsrip.rb deleted file mode 100644 index df74a5f2f5249..0000000000000 --- a/Formula/mmsrip.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mmsrip < Formula - desc "Client for the MMS:// protocol" - homepage "https://nbenoit.tuxfamily.org/index.php?page=MMSRIP" - url "https://nbenoit.tuxfamily.org/projects/mmsrip/mmsrip-0.7.0.tar.gz" - sha256 "5aed3cf17bfe50e2628561b46e12aec3644cfbbb242d738078e8b8fce6c23ed6" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1cff3346265ccfa27553e90225de862c7a1ac61ff54c8fdb8fabfc4204d1bad3" => :mojave - sha256 "e7c12a6c8e6ef612d1c789fad3e06c0b21acfe6e4dbac1643ae7797faeafcb35" => :high_sierra - sha256 "b4578327661828737b3aa71615806ba6e2781d7c0815a12815023242ac80e598" => :sierra - sha256 "cf0bc6b407f4861b174eddf55ae5da45330d37abc428013ca19f173d36a96d2a" => :el_capitan - sha256 "07f4c9d5a84bb52e3c799ebe7c395a4939c0c7ac5dff0fb46e2ce84abd9b5417" => :yosemite - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mmsrip --version 2>&1") - end -end diff --git a/Formula/mmv.rb b/Formula/mmv.rb deleted file mode 100644 index 6ffa8bebc17f7..0000000000000 --- a/Formula/mmv.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Mmv < Formula - desc "Move, copy, append, and link multiple files" - homepage "https://packages.debian.org/unstable/utils/mmv" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz" - sha256 "0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d754f546b6e586df4ec307e930c6b2e60dd51b0a0929a0240f3b896177909118" => :mojave - sha256 "b9076fa267efcabf04184a8ed20d072c1fd33b753ac2f6883495f2f6b4f8a108" => :high_sierra - sha256 "cce62f0616d060bf803a5bc83d15907a02b90f5ec3faea62422d8fa179982ab2" => :sierra - sha256 "e22f894e1224e3c0f85257c5b4db11ed1095b5a2117f48f38653b22a3d395fe4" => :el_capitan - sha256 "4e921612e3edb452f6a67f41248247d1c5b60aa22ad17d632cd43e62f5d77084" => :yosemite - sha256 "ad6205419a88e181be9bc8c107b5cd366bb0a60bf4b4b2ec5b3457c64f8060c0" => :mavericks - end - - patch do - url "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mmv/mmv_1.01b-15.diff.gz" - sha256 "9ad3e3d47510f816b4a18bae04ea75913588eec92248182f85dd09bc5ad2df13" - end - - def install - system "make", "CC=#{ENV.cc}", "LDFLAGS=" - - bin.install "mmv" - man1.install "mmv.1" - - %w[mcp mad mln].each do |mxx| - bin.install_symlink "mmv" => mxx - man1.install_symlink "mmv.1" => "#{mxx}.1" - end - end - - test do - touch testpath/"a" - touch testpath/"b" - pipe_output(bin/"mmv", "a b\nb c\n") - refute_predicate testpath/"a", :exist? - assert_predicate testpath/"c", :exist? - end -end diff --git a/Formula/moarvm.rb b/Formula/moarvm.rb deleted file mode 100644 index efaecb325e695..0000000000000 --- a/Formula/moarvm.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Moarvm < Formula - desc "Virtual machine for NQP and Rakudo Perl 6" - homepage "https://moarvm.org" - url "https://moarvm.org/releases/MoarVM-2018.12.tar.gz" - sha256 "e433a2a56953fca16ed8eaf9a597f25a7e1556436888609429f38529c241693b" - - bottle do - sha256 "f4a1e65148f4f0f32713a3090b9c12db01133844bac50dd42641183561242cb9" => :mojave - sha256 "fe1d3d362c2b503601b6ef697c869fe2e19846ae454948ca05ea69155c866c27" => :high_sierra - sha256 "ed173e56ec8c4fd58708a0618ef9efcf074e467ca2934185cf16b03065ee068e" => :sierra - end - - depends_on "libatomic_ops" - depends_on "libffi" - depends_on "libtommath" - depends_on "libuv" - - resource("nqp-2018.12") do - url "https://rakudo.perl6.org/downloads/nqp/nqp-2018.12.tar.gz" - sha256 "219db519ad5c1848e4528a56a506dd74b0839ca1d910788411f3bfedf5045d36" - end - - def install - libffi = Formula["libffi"] - ENV.prepend "CPPFLAGS", "-I#{libffi.opt_lib}/libffi-#{libffi.version}/include" - configure_args = %W[ - --has-libatomic_ops - --has-libffi - --has-libtommath - --has-libuv - --optimize - --prefix=#{prefix} - ] - system "perl", "Configure.pl", *configure_args - system "make", "realclean" - system "make" - system "make", "install" - end - - test do - testpath.install resource("nqp-2018.12") - out = Dir.chdir("src/vm/moar/stage0") do - shell_output("#{bin}/moar nqp.moarvm -e 'for (0,1,2,3,4,5,6,7,8,9) { print($_) }'") - end - assert_equal "0123456789", out - end -end diff --git a/Formula/mobiledevice.rb b/Formula/mobiledevice.rb deleted file mode 100644 index e1d75addab7bf..0000000000000 --- a/Formula/mobiledevice.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mobiledevice < Formula - desc "CLI for Apple's Private (Closed) Mobile Device Framework" - homepage "https://github.com/imkira/mobiledevice" - url "https://github.com/imkira/mobiledevice/archive/v2.0.0.tar.gz" - sha256 "07b167f6103175c5eba726fd590266bf6461b18244d34ef6d05a51fc4871e424" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "e7cace974bdc389f01ff6ec4fb0719cc73bd56ff485045b209150bae2bdc1462" => :mojave - sha256 "b848e30f816b76adea5e301e00123ac80a624db9461ef3a8b1324d84ad5d7c44" => :high_sierra - sha256 "0ff270eba2d01738d98d3a3a1570c46f2d0cdee93317b5b448e44d85ef4163c3" => :sierra - sha256 "6e7b8b74e3fe54132245a6f6720a77385c1a0185d6b2fdfbdb7391229e9e8b7a" => :el_capitan - end - - # Upstream is pretty dead but this is a simple change - # that permits building on newer versions of macOS. - patch do - url "https://github.com/imkira/mobiledevice/pull/20.patch?full_index=1" - sha256 "adb46783a6cce1e988e2efd3440e2991ac5c5ce55f59b9049c9ccc2936ae8a02" - end - - def install - (buildpath/"symlink_framework.sh").chmod 0555 - system "make", "install", "CC=#{ENV.cc}", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/mobiledevice", "list_devices" - end -end diff --git a/Formula/moc.rb b/Formula/moc.rb deleted file mode 100644 index f80aebaa5ea5e..0000000000000 --- a/Formula/moc.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Moc < Formula - desc "Terminal-based music player" - homepage "https://moc.daper.net/" - revision 5 - - stable do - url "http://ftp.daper.net/pub/soft/moc/stable/moc-2.5.2.tar.bz2" - sha256 "f3a68115602a4788b7cfa9bbe9397a9d5e24c68cb61a57695d1c2c3ecf49db08" - - # Remove for > 2.5.2; FFmpeg 4.0 compatibility - # 01 to 05 below are backported from patches provided 26 Apr 2018 by - # upstream's John Fitzgerald - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/514941c/moc/01-codec-2.5.2.patch" - sha256 "c6144dbbd85e3b775e3f03e83b0f90457450926583d4511fe32b7d655fdaf4eb" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/514941c/moc/02-codecpar-2.5.2.patch" - sha256 "5ee71f762500e68a6ccce84fb9b9a4876e89e7d234a851552290b42c4a35e930" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/514941c/moc/03-defines-2.5.2.patch" - sha256 "2ecfb9afbbfef9bd6f235bf1693d3e94943cf1402c4350f3681195e1fbb3d661" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/514941c/moc/04-lockmgr-2.5.2.patch" - sha256 "9ccfad2f98abb6f974fe6dc4c95d0dc9a754a490c3a87d3bd81082fc5e5f42dc" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/514941c/moc/05-audio4-2.5.2.patch" - sha256 "9a75ac8479ed895d07725ac9b7d86ceb6c8a1a15ee942c35eb5365f4c3cc7075" - end - end - - bottle do - sha256 "b15db412cd58492ce684fd50a6bec93e18cc42f5543bfd7f45fd6e5636c56291" => :mojave - sha256 "8a570805d563e3ee3d4c374eb5a8e5d649b7364286e738f9d8bef864663073e1" => :high_sierra - sha256 "fe941dffd41e1485f85b3d9bb28a1a30cccfe27d3cac438cc5b71fb347122003" => :sierra - sha256 "9e39666cb49b6fd60c16b1b4535d0b39363fcc655e6495cc17d74923df13ff27" => :el_capitan - end - - head do - url "svn://daper.net/moc/trunk" - - depends_on "popt" - end - - # Remove autoconf, automake and gettext for > 2.5.2 - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "pkg-config" => :build - depends_on "berkeley-db" - depends_on "ffmpeg" - depends_on "jack" - depends_on "libtool" - depends_on "ncurses" - - def install - # Not needed for > 2.5.2 - system "autoreconf", "-fvi" - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats - <<~EOS - You must start the jack daemon prior to running mocp. - If you need wide-character support in the player, for example - with Chinese characters, you can install using - --with-ncurses - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/mocp --version") - end -end diff --git a/Formula/mockserver.rb b/Formula/mockserver.rb deleted file mode 100644 index 31387f2369e91..0000000000000 --- a/Formula/mockserver.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Mockserver < Formula - desc "Mock HTTP server and proxy" - homepage "https://www.mock-server.com/" - url "https://oss.sonatype.org/content/repositories/releases/org/mock-server/mockserver-netty/5.5.1/mockserver-netty-5.5.1-brew-tar.tar" - sha256 "3cf88ac84cd4b47d329613742db1979ade2652d34943d9f5d5fe2aa62b2fba92" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/run_mockserver.sh" => "mockserver" - - lib.install_symlink "#{libexec}/lib" => "mockserver" - - mockserver_log = var/"log/mockserver" - mockserver_log.mkpath - - libexec.install_symlink mockserver_log => "log" - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - mockserver = fork do - exec "#{bin}/mockserver", "-serverPort", port.to_s - end - - loop do - Utils.popen_read("curl", "-s", "http://localhost:#{port}/status", "-X", "PUT") - break if $CHILD_STATUS.exitstatus.zero? - end - - system "curl", "-s", "http://localhost:#{port}/stop", "-X", "PUT" - - Process.wait(mockserver) - end -end diff --git a/Formula/moco.rb b/Formula/moco.rb deleted file mode 100644 index c051dd656ad04..0000000000000 --- a/Formula/moco.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Moco < Formula - desc "Stub server with Maven, Gradle, Scala, and shell integration" - homepage "https://github.com/dreamhead/moco" - url "https://search.maven.org/remotecontent?filepath=com/github/dreamhead/moco-runner/0.12.0/moco-runner-0.12.0-standalone.jar" - sha256 "436ccc154d0386bbb8924383cae2cf541b3eebdf23ad1709eae887632f39b8f5" - - bottle :unneeded - - def install - libexec.install "moco-runner-#{version}-standalone.jar" - bin.write_jar_script libexec/"moco-runner-#{version}-standalone.jar", "moco" - end - - test do - require "net/http" - - (testpath/"config.json").write <<~EOS - [ - { - "response" : - { - "text" : "Hello, Moco" - } - } - ] - EOS - - port = 12306 - thread = Thread.new do - system bin/"moco", "http", "-p", port, "-c", testpath/"config.json" - end - - # Wait for Moco to start. - sleep 5 - - response = Net::HTTP.get URI "http://localhost:#{port}" - assert_equal "Hello, Moco", response - thread.exit - end -end diff --git a/Formula/modd.rb b/Formula/modd.rb deleted file mode 100644 index e3e4c8636b859..0000000000000 --- a/Formula/modd.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Modd < Formula - desc "Flexible tool for responding to filesystem changes" - homepage "https://github.com/cortesi/modd" - url "https://github.com/cortesi/modd/archive/v0.7.tar.gz" - sha256 "3619c9b8dd4f8ef5bf03f50b5841de114383dde9bc0bef866d0a8dc977bf3005" - head "https://github.com/cortesi/modd.git" - - bottle do - cellar :any_skip_relocation - sha256 "33b9f69c73faa25b4bfec3ae6103cca7cd41862a693292fbe934c244b89e3aac" => :mojave - sha256 "52d2eb11b69f8c6a3eec06e2d60864fd6bb32263f4f47f78d8ccd94f2f595759" => :high_sierra - sha256 "68214544aa3797bdc878ba397bbb1ca5e100a5159c3b90640f27f5d7ea7215b3" => :sierra - sha256 "300e0802cff775ae987e3036691b0474aececfb7f83819fdccd7fd1cce88df0e" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = MacOS.prefer_64_bit? ? "amd64" : "386" - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - (buildpath/"src/github.com/cortesi/modd").install buildpath.children - cd "src/github.com/cortesi/modd" do - system "go", "install", ".../cmd/modd" - prefix.install_metafiles - end - end - - test do - begin - io = IO.popen("#{bin}/modd") - sleep 2 - ensure - Process.kill("SIGINT", io.pid) - Process.wait(io.pid) - end - - assert_match "Error reading config file ./modd.conf", io.read - end -end diff --git a/Formula/modgit.rb b/Formula/modgit.rb deleted file mode 100644 index 11aaeefe29bc7..0000000000000 --- a/Formula/modgit.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Modgit < Formula - desc "Tool for git repo deploy with filters. Used for magento development" - homepage "https://github.com/jreinke/modgit" - url "https://github.com/jreinke/modgit/archive/v1.0.1.tar.gz" - sha256 "3df1ccddaacf386a32be0fe5b6333438f17876bc6a4851d9bc22a68a73ae314d" - - bottle :unneeded - - def install - bin.install "modgit" - end - - test do - system "#{bin}/modgit" - end -end diff --git a/Formula/modman.rb b/Formula/modman.rb deleted file mode 100644 index 79f5e94e42271..0000000000000 --- a/Formula/modman.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Modman < Formula - desc "Module deployment script geared towards Magento development" - homepage "https://github.com/colinmollenhour/modman" - url "https://github.com/colinmollenhour/modman/archive/1.12.tar.gz" - sha256 "437547bb54f62101215038a678506e87b1e9d5a8f04eed68e0c823198dd0b6ec" - - bottle :unneeded - - def install - bin.install "modman" - bash_completion.install "bash_completion" => "modman.bash" - end - - test do - system "#{bin}/modman" - end -end diff --git a/Formula/modules.rb b/Formula/modules.rb deleted file mode 100644 index e6c4f2ea75c67..0000000000000 --- a/Formula/modules.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Modules < Formula - desc "Dynamic modification of a user's environment via modulefiles" - homepage "https://modules.sourceforge.io/" - url "https://downloads.sourceforge.net/project/modules/Modules/modules-4.1.4/modules-4.1.4.tar.bz2" - sha256 "7eaf26b66cbf3ba101ec5a693b7bfb3a47f3c86cad09e47c4126f3d785864c55" - - bottle do - sha256 "1bfdf504b019fa4c8ffe7db7d9cef79a1a2c23e381b04d7eed98f041b3507987" => :mojave - sha256 "29eacb986d942b621d5aa161952c962250cc6d96acb9929425d8a5284f7a6ca2" => :high_sierra - sha256 "4e45ab192bad2a47c3b63e7de10d61c701a1f8a70a011956b21203074dee8418" => :sierra - sha256 "b3a8d7c48c0b6c56a706357da2a0b6087c593f2254acd7b84956e6870053b8e1" => :el_capitan - end - - depends_on "grep" => :build # configure checks for ggrep - depends_on :x11 => :optional - - def install - ENV.prepend_path "PATH", Formula["coreutils"].opt_libexec/"gnubin" - - # -DUSE_INTERP_ERRORLINE fixes - # error: no member named 'errorLine' in 'struct Tcl_Interp' - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-tcl=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework - --datarootdir=#{share} - --disable-versioning - CPPFLAGS=-DUSE_INTERP_ERRORLINE - ] - args << "--without-x" if build.without? "x11" - system "./configure", *args - system "make", "install" - end - - def caveats; <<~EOS - To activate modules, add the following at the end of your .zshrc: - source #{opt_prefix}/init/zsh - You will also need to reload your .zshrc: - source ~/.zshrc - EOS - end - - test do - assert_match "restore", shell_output("#{bin}/envml --help") - output = shell_output("zsh -c 'source #{prefix}/init/zsh; module' 2>&1") - assert_match version.to_s, output - end -end diff --git a/Formula/moe.rb b/Formula/moe.rb deleted file mode 100644 index 33adcf18d9ad2..0000000000000 --- a/Formula/moe.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Moe < Formula - desc "Console text editor for ISO-8859 and ASCII" - homepage "https://www.gnu.org/software/moe/moe.html" - url "https://ftp.gnu.org/gnu/moe/moe-1.9.tar.lz" - mirror "https://ftpmirror.gnu.org/moe/moe-1.9.tar.lz" - sha256 "18919e9ffae08f34d8beb3a26fc5a595614e0aff34866e79420ca81881ff4ef3" - - bottle do - rebuild 1 - sha256 "b1b91b2a30d506381f31c96f63e75bc78e32bec6051dd2e62d78fa19775975b8" => :mojave - sha256 "8795bf38abe1ee929d3573e25bd54bb73220d4d2b30d0f2af4b6242ae5f862f7" => :high_sierra - sha256 "c5015c950c74f73093aacac9e9f3b42f741b5bc57e864006c2a62f3c6739c538" => :sierra - sha256 "4b7e08c089bcf431efba6be217df5a30e7ade7fa2813ae53152e5671958abb69" => :el_capitan - end - - def install - # Fix compilation bug with Xcode 9 - # https://lists.gnu.org/archive/html/bug-moe/2017-10/msg00000.html - inreplace "window_vector.cc", "{ year_string.insert( 0U, 1,", - "{ year_string.insert( 0U, 1U," - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/moe", "--version" - end -end diff --git a/Formula/mogenerator.rb b/Formula/mogenerator.rb deleted file mode 100644 index 129c78f1fa08a..0000000000000 --- a/Formula/mogenerator.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mogenerator < Formula - desc "Generate Objective-C code for Core Data custom classes" - homepage "https://rentzsch.github.io/mogenerator/" - url "https://github.com/rentzsch/mogenerator/archive/1.31.tar.gz" - sha256 "aab49260799a1bb58d1c3240f227db0a5ce18fb54bda72f45d07c8c8b375061f" - head "https://github.com/rentzsch/mogenerator.git" - - bottle do - cellar :any_skip_relocation - sha256 "c9beea63b98941e36f8beae4afb36fda4ca8efe3e4d74d0142efbeaab4273b86" => :mojave - sha256 "b5313f7dd8eeb5b379f6c64615104c23250b97c7c05de779427a29c573464f32" => :high_sierra - sha256 "19c0ec0b7f39deec9c99f4ede5ae1538acad0b3768db7b0557e15660efb41789" => :sierra - sha256 "eb94c192bb659183c72f970f1230948ce875ed49b53f0e7bb540660e7dae2353" => :el_capitan - sha256 "ceedcaabd71b51758c0b03e4b14be0f228e030af83651ad6f774c08d5910123b" => :yosemite - end - - depends_on :xcode => :build - depends_on :macos => :yosemite - - def install - xcodebuild "-target", "mogenerator", "-configuration", "Release", "SYMROOT=symroot", "OBJROOT=objroot" - bin.install "symroot/Release/mogenerator" - end - - test do - system "#{bin}/mogenerator", "--version" - end -end diff --git a/Formula/molecule.rb b/Formula/molecule.rb deleted file mode 100644 index b0e413fc107ff..0000000000000 --- a/Formula/molecule.rb +++ /dev/null @@ -1,280 +0,0 @@ -class Molecule < Formula - include Language::Python::Virtualenv - - desc "Automated testing for Ansible roles" - homepage "https://molecule.readthedocs.io" - url "https://files.pythonhosted.org/packages/aa/0f/dc6393eed9588e477a23488fbd23efd40246fcc64815179db6c8c892f554/molecule-1.25.1.tar.gz" - sha256 "aeafd3a6c5a0de707308006dcf727883c9daf4446d18d9e68eb97659c51ebbb0" - revision 3 - - bottle do - cellar :any - sha256 "611a1f11773ca1d3fd9885229d70b134acf0108261b2ef8e740b29e6915c6957" => :mojave - sha256 "0f1161a2923864cbf310eb621d2c45a58881816efdeb0fcc8d0b61382d2027cc" => :high_sierra - sha256 "62d26f320c2305f7f3cd968dc88a457ee1e1ad1105cbad56142b775d37a25970" => :sierra - sha256 "162908de7b790f51095e8399129ad985a9ecfbe99b25a4c8ed633bf104d4fbd5" => :el_capitan - end - - depends_on "openssl" - depends_on "python@2" - - # Collect requirements from: - # molecule - # docker-py - # python-vagrant - - resource "ansible" do - url "https://files.pythonhosted.org/packages/1e/7c/385ccbeb0fbefc13eaef53df76e42ef778170bdfe5fd425879735b43106e/ansible-2.4.0.0.tar.gz" - sha256 "1a276fee7f72d4e6601a7994879e8467edb763dacc3e215258cfe71350b77c76" - end - - resource "ansible-lint" do - url "https://files.pythonhosted.org/packages/40/73/0492595cb7669c49168fe51850c0931792b4763fda292c528a55402fea62/ansible-lint-3.4.15.tar.gz" - sha256 "6f196ac183c29f247aa76f54fad59034edb69ed65106de36c588b84a627e8d37" - end - - resource "anyconfig" do - url "https://files.pythonhosted.org/packages/1a/c4/4aeb05181b0c9ab9f3bb0846dec5cccfa392dc3c593593bc2642749c1897/anyconfig-0.7.0.tar.gz" - sha256 "b972257f81770c0f535917cd8a61a74542180d3a86290b30155e0912cc7a3558" - end - - resource "arrow" do - url "https://files.pythonhosted.org/packages/54/db/76459c4dd3561bbe682619a5c576ff30c42e37c2e01900ed30a501957150/arrow-0.10.0.tar.gz" - sha256 "805906f09445afc1f0fc80187db8fe07670e3b25cdafa09b8d8ac264a8c0c722" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/31/53/8bca924b30cb79d6d70dbab6a99e8731d1e4dd3b090b7f3d8412a8d8ffbc/asn1crypto-0.23.0.tar.gz" - sha256 "0874981329cfebb366d6584c3d16e913f2a0eb026c9463efcc4aaf42a9d94d70" - end - - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/76/21/2dc61178a2038a5cb35d14b61467c6ac632791ed05131dda72c20e7b9e23/backports.ssl_match_hostname-3.5.0.1.tar.gz" - sha256 "502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2" - end - - resource "binaryornot" do - url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" - sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/20/d0/3f7a84b0c5b89e94abbd073a5f00c7176089f526edb056686751d5064cbd/certifi-2017.7.27.1.tar.gz" - sha256 "40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz" - sha256 "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/f0/d0/21c6449df0ca9da74859edc40208b3a57df9aca7323118c913e58d442030/colorama-0.3.7.tar.gz" - sha256 "e043c8d32527607223652021ff648fbb394d5e19cba9f1a698670b338c9d782b" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz" - sha256 "5308b47021bc2340965c371f0f058cc6971a04502638d4244225c49d80db273a" - end - - resource "cookiecutter" do - url "https://files.pythonhosted.org/packages/97/ed/8f0b6f36c119e5083fb789ffa7c1169d98b15d5b3123b105207e46fb9026/cookiecutter-1.5.1.tar.gz" - sha256 "3fcb10dbfe4da02bf779a88f96109c1a28ff68f42d87587788f841735820249c" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/bf/da/6a9f49cc7a970380c8235b3adab0c08c7c3d4814876f7383b33e3882a577/cryptography-2.1.1.tar.gz" - sha256 "2699ed21e1f73dd1bdb7b0b22a517295de07809d535b23e200dd22166037fe6f" - end - - resource "docker-py" do - url "https://files.pythonhosted.org/packages/fa/2d/906afc44a833901fc6fed1a89c228e5c88fbfc6bd2f3d2f0497fdfb9c525/docker-py-1.10.6.tar.gz" - sha256 "4c2a75875764d38d67f87bc7d03f7443a3895704efc57962bdf6500b8d4bc415" - end - - resource "docker-pycreds" do - url "https://files.pythonhosted.org/packages/95/2e/3c99b8707a397153bc78870eb140c580628d7897276960da25d8a83c4719/docker-pycreds-0.2.1.tar.gz" - sha256 "93833a2cf280b7d8abbe1b8121530413250c6cd4ffed2c1cf085f335262f7348" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "flake8" do - url "https://files.pythonhosted.org/packages/47/64/382631de5fd8dab367bedeff6b5b55fd9a7c883daa44f4032636e2d203ca/flake8-3.3.0.tar.gz" - sha256 "b907a26dcf5580753d8f80f1be0ec1d5c45b719f7bac441120793d1a70b03f12" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/4e/13/774faf38b445d0b3a844b65747175b2e0500164b7c28d78e34987a5bfe06/ipaddress-1.0.18.tar.gz" - sha256 "5d8534c8e185f2d8a1fda1ef73f2c8f4b23264e8e30063feeb9511d492a413e1" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/Jinja2-2.9.6.tar.gz" - sha256 "ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff" - end - - resource "jinja2-time" do - url "https://files.pythonhosted.org/packages/de/7c/ee2f2014a2a0616ad3328e58e7dac879251babdb4cb796d770b5d32c469f/jinja2-time-0.2.0.tar.gz" - sha256 "d14eaa4d315e7688daa4969f616f226614350c48730bfa1692d2caebd8c90d40" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "mccabe" do - url "https://files.pythonhosted.org/packages/06/18/fa675aa501e11d6d6ca0ae73a101b2f3571a565e0f7d38e062eec18a91ee/mccabe-0.6.1.tar.gz" - sha256 "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/64/79/5e8baeedb6baf1d5879efa8cd012f801efc232e56a068550ba00d7e82625/paramiko-2.1.2.tar.gz" - sha256 "5fae49bed35e2e3d45c4f7b0db2d38b9ca626312d91119b3991d0ecf8125e310" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/9b/cf/6c6f843ffc13aee42c5412c49e7aff7e860d006261dcafb5a5512fa27cd6/pbr-2.1.0.tar.gz" - sha256 "f71359a7e2de2f5ea1eceea7c1e3222f2560ee48e21eef6f96957bb5c2ebb94a" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz" - sha256 "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92" - end - - resource "poyo" do - url "https://files.pythonhosted.org/packages/9f/7a/d92b5cc1d2f6bf0f1c1cd427e1665a3b3889563ba25fbb66f50356954c45/poyo-0.4.1.tar.gz" - sha256 "103b4ee3e1c7765098fe1cabe43f828db2e2a6079646561a2117e1a809f352d6" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/51/83/5d07dc35534640b06f9d9f1a1d2bc2513fb9cc7595a1b0e28ae5477056ce/ptyprocess-0.5.2.tar.gz" - sha256 "e64193f0047ad603b71f202332ab5527c5e52aa7c8b609704fc28c0dc20c4365" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/68/35/58572278f1c097b403879c1e9369069633d1cbad5239b9057944bb764782/py-1.4.34.tar.gz" - sha256 "0f2d585d22050e90c7d293b6451c83db097df77871974d90efd5a30dc12fcde3" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/3c/a6/4d6c88aa1694a06f6671362cb3d0350f0d856edea4685c300785200d1cd9/pyasn1-0.3.7.tar.gz" - sha256 "187f2a66d617683f8e82d5c00033b7c8a0287e1da88a9d577aebec321cad4965" - end - - resource "pycodestyle" do - url "https://files.pythonhosted.org/packages/e1/88/0e2cbf412bd849ea6f1af1f97882add46a374f4ba1d2aea39353609150ad/pycodestyle-2.3.1.tar.gz" - sha256 "682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pyflakes" do - url "https://files.pythonhosted.org/packages/5b/b7/dcd6ebc826065ca4ccd2406aac4378e1df6eb91124625d45d520219932a1/pyflakes-1.5.0.tar.gz" - sha256 "aa0d4dff45c0cc2214ba158d29280f8fa1129f3e87858ef825930845146337f4" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/53/d0/208853c09be8377e6d4de7c0df875ef7ef37189373d76a74b65b44e50528/pytest-3.2.3.tar.gz" - sha256 "27fa6617efc2869d3e969a3e75ec060375bfb28831ade8b5cdd68da3a741dc3c" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-2.6.1.tar.gz" - sha256 "891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca" - end - - resource "python-vagrant" do - url "https://files.pythonhosted.org/packages/bb/c6/0a6d22ae1782f261fc4274ea9385b85bf792129d7126575ec2a71d8aea18/python-vagrant-0.5.15.tar.gz" - sha256 "af9a8a9802d382d45dbea96aa3cfbe77c6e6ad65b3fe7b7c799d41ab988179c6" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz" - sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "sh" do - url "https://files.pythonhosted.org/packages/d8/97/39aa189a8392522cc24f14f392955cbeac48e2818d776241c37eb6d0eb3c/sh-1.12.13.tar.gz" - sha256 "979928ca113cade663bb1a0ff710e3eb9147596cf28a7ee4c04f9d85804f7b9f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/1c/a1/3367581782ce79b727954f7aa5d29e6a439dc2490a9ac0e7ea0a7115435d/tabulate-0.7.7.tar.gz" - sha256 "83a0b8e17c09f012090a50e1e97ae897300a72b35e0c86c0b53d3bd2ae86d8c6" - end - - resource "testinfra" do - url "https://files.pythonhosted.org/packages/3b/04/d7a9a2d9fc8708f7fe09ff9c2317f4e1f8b771491f147c53abfd3a43c5fd/testinfra-1.6.3.tar.gz" - sha256 "a68a0ce06e2d480da8d6aa3d85325e9eee1419a401053166a036d1f331f944af" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/06/19/f00725a8aee30163a7f257092e356388443034877c101757c1466e591bf8/websocket_client-0.44.0.tar.gz" - sha256 "15f585566e2ea7459136a632b9785aa081093064391878a448c382415e948d72" - end - - resource "whichcraft" do - url "https://files.pythonhosted.org/packages/e5/cd/7fb54d4b3d43ed59ecb704fb96876831e0b493c4e24eecddd4ecb2442f5e/whichcraft-0.4.1.tar.gz" - sha256 "9e0d51c9387cb7e9f28b7edb549e6a03da758f7784f991eb4397d7f7808c57fd" - end - - def install - ENV.prepend_path "PATH", Formula["python@2"].opt_libexec/"bin" - virtualenv_install_with_resources - end - - test do - # Test the Vagrant driver - system bin/"molecule", "init", "--role", "foo-vagrant", "--driver", "vagrant", "--verifier", "testinfra" - assert_predicate testpath/"foo-vagrant/molecule.yml", :exist?, "Failed to create 'foo-vagrant/molecule.yml' file!" - assert_predicate testpath/"foo-vagrant/tests/test_default.py", :exist?, "Failed to create 'foo-vagrant/tests/test_default.py' file!" - cd "foo-vagrant" do - system bin/"molecule", "list" - end - end -end diff --git a/Formula/mon.rb b/Formula/mon.rb deleted file mode 100644 index c142eb6a58369..0000000000000 --- a/Formula/mon.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Mon < Formula - desc "Monitor hosts/services/whatever and alert about problems" - homepage "https://github.com/visionmedia/mon" - url "https://github.com/visionmedia/mon/archive/1.2.3.tar.gz" - sha256 "978711a1d37ede3fc5a05c778a2365ee234b196a44b6c0c69078a6c459e686ac" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "ac4640eab6cb255b7cc14f7009b5e8c5a18f9b623559950a1e6d55eb134d483e" => :mojave - sha256 "66fe59cb8307fd1371885fe1739a824d01becb1644a8480f8e27584726494f09" => :high_sierra - sha256 "0d22815460538deda7a6a979d0b7dcdf38124ed9473764f6a90d8252cb9bf1aa" => :sierra - sha256 "4f2d05a85fac75167df3a445a0803f7d5eddb2bacf967b10738db5066955024a" => :el_capitan - sha256 "b446ffbcff634978ff036de6b5585d29e11a6b38604fa78268c7717819250a0f" => :mavericks - end - - def install - bin.mkpath - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"mon", "-V" - end -end diff --git a/Formula/monax.rb b/Formula/monax.rb deleted file mode 100644 index eacf941a592d6..0000000000000 --- a/Formula/monax.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Monax < Formula - desc "Blockchain application platform CLI" - homepage "https://github.com/monax/monax" - url "https://github.com/monax/monax/archive/v0.18.0.tar.gz" - sha256 "8ad3166e3ca76738c6542bd8b85dcef1643b68a3755abe3e0a7f3c9cdd027afb" - revision 1 - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "e0a723c4524d466b0918ac9978d339cc5129259efa7670e833673e85412a8aef" => :mojave - sha256 "3c20e0042a3559ff46d08dc01cba818d643b0f21001e7a9cbba7a4d0c10aca29" => :high_sierra - sha256 "d9db4da71b98d06156aabf6ce2033aa694a367a3e153a75ae9b7d677b4e85271" => :sierra - sha256 "3b90f4e7d08b91f47da2c80b4e801fc15d153d7ff27c492240559f9d62a6a597" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - (buildpath/"src/github.com/monax").mkpath - ln_sf buildpath, buildpath/"src/github.com/monax/monax" - system "go", "install", "github.com/monax/monax/cmd/monax" - end - - test do - system "#{bin}/monax", "version" - end -end diff --git a/Formula/monero.rb b/Formula/monero.rb deleted file mode 100644 index ad0105ed91478..0000000000000 --- a/Formula/monero.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Monero < Formula - desc "Official monero wallet and cpu miner" - homepage "https://getmonero.org/" - url "https://github.com/monero-project/monero.git", - :tag => "v0.13.0.4", - :revision => "29073f65e8816d4c32b6ffef514943a5650b8d3b" - - bottle do - cellar :any - sha256 "45928480da2c4a496220a52ec7f1234b7339754d8b2246d09d0d484995004c1d" => :mojave - sha256 "c3f4f86ff92ffd2b26d850841093d96cdf70d648dcaaf4104bfbbb43800ce681" => :high_sierra - sha256 "1a67d7a752fb671b4cbeb26efc0b4964d4e709852c4f65b07088ad8ee962bbf5" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "libsodium" - depends_on "openssl" - depends_on "readline" - depends_on "unbound" - depends_on "zeromq" - - resource "cppzmq" do - url "https://github.com/zeromq/cppzmq/archive/v4.3.0.tar.gz" - sha256 "27d1f56406ba94ee779e639203218820975cf68174f92fbeae0f645df0fcada4" - end - - def install - (buildpath/"cppzmq").install resource("cppzmq") - system "cmake", ".", "-DZMQ_INCLUDE_PATH=#{buildpath}/cppzmq", - "-DReadline_ROOT_DIR=#{Formula["readline"].opt_prefix}", - *std_cmake_args - system "make", "install" - - # Avoid conflicting with miniupnpc - # Reported upstream 25 May 2018 https://github.com/monero-project/monero/issues/3862 - rm lib/"libminiupnpc.a" - rm_rf include/"miniupnpc" - end - - test do - cmd = "yes '' | #{bin}/monero-wallet-cli --restore-deterministic-wallet " \ - "--password brew-test --restore-height 1 --generate-new-wallet wallet " \ - "--electrum-seed 'baptism cousin whole exquisite bobsled fuselage left " \ - "scoop emerge puzzled diet reinvest basin feast nautical upon mullet " \ - "ponies sixteen refer enhanced maul aztec bemused basin'" \ - "--command address" - address = "4BDtRc8Ym9wGzx8vpkQQvpejxBNVpjEmVBebBPCT4XqvMxW3YaCALFraiQibejyMAxUXB5zqn4pVgHVm3JzhP2WzVAJDpHf" - assert_equal address, shell_output(cmd).lines.last.split[1] - end -end diff --git a/Formula/monetdb.rb b/Formula/monetdb.rb deleted file mode 100644 index e929367928165..0000000000000 --- a/Formula/monetdb.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Monetdb < Formula - desc "Column-store database" - homepage "https://www.monetdb.org/" - url "https://www.monetdb.org/downloads/sources/Aug2018-SP1/MonetDB-11.31.11.tar.xz" - sha256 "169f78f6509241e63028adec3f5082fdcf9f8a1ae9d87a59dddf423f8e9f81d5" - - bottle do - sha256 "df8bdde8ed02b9bd3e7e0aff359824ce363092332ae99c0991eb4a66e942fb22" => :mojave - sha256 "81fe91062a42037bb497c033e59c1256bffb68e4f3be4c081a9b026b6c3f7162" => :high_sierra - sha256 "35983a31e38ab40e3bbf9b2f0c557a1b9902842a373ca224e33c805402209b95" => :sierra - end - - head do - url "https://dev.monetdb.org/hg/MonetDB", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - end - - depends_on "libatomic_ops" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "pcre" - depends_on "readline" # Compilation fails with libedit - - def install - ENV["M4DIRS"] = "#{Formula["gettext"].opt_share}/aclocal" if build.head? - system "./bootstrap" if build.head? - - system "./configure", "--prefix=#{prefix}", - "--enable-assert=no", - "--enable-debug=no", - "--enable-optimize=yes", - "--enable-testing=no", - "--with-readline=#{Formula["readline"].opt_prefix}", - "--disable-rintegration" - system "make", "install" - end -end diff --git a/Formula/mongo-c-driver.rb b/Formula/mongo-c-driver.rb deleted file mode 100644 index deec33af6ec46..0000000000000 --- a/Formula/mongo-c-driver.rb +++ /dev/null @@ -1,37 +0,0 @@ -class MongoCDriver < Formula - desc "C driver for MongoDB" - homepage "https://github.com/mongodb/mongo-c-driver" - url "https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz" - sha256 "25164e03b08baf9f2dd88317f1a36ba36b09f563291a7cf241f0af8676155b8d" - head "https://github.com/mongodb/mongo-c-driver.git" - - bottle do - cellar :any - sha256 "6cfbe9b713a6d4ea03f10ebc370229ffe318f6445d6a18315e9844299bfcc633" => :mojave - sha256 "d93d3021fd33985914a781407ca747e7151faa2ca24b706a62fe1414cc5450fe" => :high_sierra - sha256 "e9a91f813111094853791a28a9964338363a120b5a41e24f31ea971664d159df" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - (pkgshare/"libbson").install "src/libbson/examples" - (pkgshare/"libmongoc").install "src/libmongoc/examples" - end - - test do - system ENV.cc, "-o", "test", pkgshare/"libbson/examples/json-to-bson.c", - "-I#{include}/libbson-1.0", "-L#{lib}", "-lbson-1.0" - (testpath/"test.json").write('{"name": "test"}') - assert_match "\u0000test\u0000", shell_output("./test test.json") - - system ENV.cc, "-o", "test", pkgshare/"libmongoc/examples/mongoc-ping.c", - "-I#{include}/libmongoc-1.0", "-I#{include}/libbson-1.0", - "-L#{lib}", "-lmongoc-1.0", "-lbson-1.0" - assert_match "No suitable servers", shell_output("./test mongodb://0.0.0.0 2>&1", 3) - end -end diff --git a/Formula/mongo-cxx-driver.rb b/Formula/mongo-cxx-driver.rb deleted file mode 100644 index cef5e138e35d1..0000000000000 --- a/Formula/mongo-cxx-driver.rb +++ /dev/null @@ -1,47 +0,0 @@ -class MongoCxxDriver < Formula - desc "C++ driver for MongoDB" - homepage "https://github.com/mongodb/mongo-cxx-driver" - url "https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz" - sha256 "e9772ac5cf1c996c2f77fd78e25aaf74a2abf5f3864cb31b18d64955fd41c14d" - head "https://github.com/mongodb/mongo-cxx-driver.git" - - bottle do - cellar :any - sha256 "da2aacd94c60bbdd1c4f7b4c0103ac90857d41733f0d95666370a878539a9084" => :mojave - sha256 "f08a8bc08e9320b81a2142b100a43cc40aa010040c01815f345f9556d45e7a41" => :high_sierra - sha256 "98fec6ef3256c3955dd29fcfe825faf575f9d71f0f3061b65be62f2b558148ed" => :sierra - end - - depends_on "cmake" => :build - depends_on "mongo-c-driver" - - needs :cxx11 - - def install - mongo_c_prefix = Formula["mongo-c-driver"].opt_prefix - system "cmake", ".", *std_cmake_args, - "-DLIBBSON_DIR=#{mongo_c_prefix}", "-DLIBMONGOC_DIR=#{mongo_c_prefix}" - system "make" - system "make", "install" - pkgshare.install "examples" - end - - test do - mongo_c_include = Formula["mongo-c-driver"] - - system ENV.cc, "-o", "test", pkgshare/"examples/bsoncxx/builder_basic.cpp", - "-I#{include}/bsoncxx/v_noabi", - "-I#{mongo_c_include}/libbson-1.0", - "-L#{lib}", "-lbsoncxx", "-std=c++11", "-lstdc++" - system "./test" - - system ENV.cc, "-o", "test", pkgshare/"examples/mongocxx/connect.cpp", - "-I#{include}/mongocxx/v_noabi", - "-I#{include}/bsoncxx/v_noabi", - "-I#{mongo_c_include}/libmongoc-1.0", - "-I#{mongo_c_include}/libbson-1.0", - "-L#{lib}", "-lmongocxx", "-lbsoncxx", "-std=c++11", "-lstdc++" - assert_match "No suitable servers", - shell_output("./test mongodb://0.0.0.0 2>&1", 1) - end -end diff --git a/Formula/mongo-orchestration.rb b/Formula/mongo-orchestration.rb deleted file mode 100644 index 25ddd8c7e2665..0000000000000 --- a/Formula/mongo-orchestration.rb +++ /dev/null @@ -1,73 +0,0 @@ -class MongoOrchestration < Formula - include Language::Python::Virtualenv - - desc "REST API to manage MongoDB configurations on a single host" - homepage "https://github.com/10gen/mongo-orchestration" - url "https://files.pythonhosted.org/packages/6d/b5/624a02d5f6cbfa8eb3c6554f5387c4739ad283bac7efb27ee99434a4d314/mongo-orchestration-0.6.11.tar.gz" - sha256 "7a09706d36e94ae767e90646fed98a52b426a4d14b0f4f724b185e292ac8f425" - revision 1 - head "https://github.com/10gen/mongo-orchestration.git" - - bottle do - cellar :any_skip_relocation - sha256 "62a628de657e8aa22e0cb020d77cdd67c9d790e96774b5f656890373ce931c1b" => :mojave - sha256 "a4b022019d2017e3294cac234a396b7f6ff358eae48745191b43c4fcc115991b" => :high_sierra - sha256 "8a463e718a50549325ae910fa944f4fa1761cbc4050d271c16d285b22402685e" => :sierra - end - - depends_on "python" - - resource "bottle" do - url "https://files.pythonhosted.org/packages/bd/99/04dc59ced52a8261ee0f965a8968717a255ea84a36013e527944dbf3468c/bottle-0.12.13.tar.gz" - sha256 "39b751aee0b167be8dffb63ca81b735bbf1dd0905b3bc42761efedee8f123355" - end - - resource "CherryPy" do - url "https://files.pythonhosted.org/packages/50/c6/6c3d7a3221b0f098f8684037736e5604ea1586a3ba450c4a52b48f5fc2b4/CherryPy-7.0.0.tar.gz" - sha256 "faead7c5c7ca2526aff8f179a24d699127ed307c3393eeef9610a33b93650bef" - end - - resource "pymongo" do - url "https://files.pythonhosted.org/packages/a8/f6/f324f5c669478644ac64594b9d746a34e185d9c34d3f05a4a6a6dab5467b/pymongo-3.5.1.tar.gz" - sha256 "e820d93414f3bec1fa456c84afbd4af1b43ff41366321619db74e6bc065d6924" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - plist_options :startup => true, :manual => "#{HOMEBREW_PREFIX}/opt/mongo-orchestration/bin/mongo-orchestration -b 127.0.0.1 -p 8889 --no-fork start" - - def plist; <<~EOS - - - - - Label - mongo-orchestration - ProgramArguments - - #{opt_bin}/mongo-orchestration - -b - 127.0.0.1 - -p - 8889 - --no-fork - start - - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/mongo-orchestration", "-h" - end -end diff --git a/Formula/mongodb.rb b/Formula/mongodb.rb deleted file mode 100644 index e6a8ad9726878..0000000000000 --- a/Formula/mongodb.rb +++ /dev/null @@ -1,150 +0,0 @@ -class Mongodb < Formula - desc "High-performance, schema-free, document-oriented database" - homepage "https://www.mongodb.com/" - url "https://fastdl.mongodb.org/src/mongodb-src-r4.0.4.tar.gz" - sha256 "02baada1c5665c77c58e068ac6e9d0b11371bcd89e1467896765a5e452e6cce3" - revision 1 - - bottle do - sha256 "22fcbb5b68564be444fa816f540e481628d9eb883d15a1188b0cb308e6e84bff" => :mojave - sha256 "6a51bebf11f6e299c4f3353ccd8aa67b1d6dca120439fd110eb9fdf77528ff27" => :high_sierra - sha256 "5ae653a0cac4197fd8e9f92259f0375ab5b6d8a4470bd7857f2f8c853fc3a375" => :sierra - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on :xcode => ["8.3.2", :build] - depends_on :macos => :mountain_lion - depends_on "openssl" - depends_on "python@2" - - resource "Cheetah" do - url "https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz" - sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/bf/9b/2bf84e841575b633d8d91ad923e198a415e3901f228715524689495b4317/typing-3.6.6.tar.gz" - sha256 "4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d" - end - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - ENV.libcxx - - ["Cheetah", "PyYAML", "typing"].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - end - (buildpath/".brew_home/Library/Python/2.7/lib/python/site-packages/vendor.pth").write <<~EOS - import site; site.addsitedir("#{buildpath}/vendor/lib/python2.7/site-packages") - EOS - - # New Go tools have their own build script but the server scons "install" target is still - # responsible for installing them. - - cd "src/mongo/gotools" do - inreplace "build.sh" do |s| - s.gsub! "$(git describe)", version.to_s - s.gsub! "$(git rev-parse HEAD)", "homebrew" - end - - ENV["CPATH"] = Formula["openssl"].opt_include - ENV["LIBRARY_PATH"] = Formula["openssl"].opt_lib - system "./build.sh", "ssl" - end - - (buildpath/"src/mongo-tools").install Dir["src/mongo/gotools/bin/*"] - - args = %W[ - --prefix=#{prefix} - -j#{ENV.make_jobs} - CC=#{ENV.cc} - CXX=#{ENV.cxx} - CCFLAGS=-mmacosx-version-min=#{MacOS.version} - LINKFLAGS=-mmacosx-version-min=#{MacOS.version} - --build-mongoreplay=true - --disable-warnings-as-errors - --use-new-tools - --ssl - CCFLAGS=-I#{Formula["openssl"].opt_include} - LINKFLAGS=-L#{Formula["openssl"].opt_lib} - ] - - system "scons", "install", *args - - (buildpath/"mongod.conf").write mongodb_conf - etc.install "mongod.conf" - end - - def post_install - (var/"mongodb").mkpath - (var/"log/mongodb").mkpath - end - - def mongodb_conf; <<~EOS - systemLog: - destination: file - path: #{var}/log/mongodb/mongo.log - logAppend: true - storage: - dbPath: #{var}/mongodb - net: - bindIp: 127.0.0.1 - EOS - end - - plist_options :manual => "mongod --config #{HOMEBREW_PREFIX}/etc/mongod.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mongod - --config - #{etc}/mongod.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/mongodb/output.log - StandardOutPath - #{var}/log/mongodb/output.log - HardResourceLimits - - NumberOfFiles - 4096 - - SoftResourceLimits - - NumberOfFiles - 4096 - - - - EOS - end - - test do - system "#{bin}/mongod", "--sysinfo" - end -end diff --git a/Formula/mongodb@3.0.rb b/Formula/mongodb@3.0.rb deleted file mode 100644 index 705933508a06f..0000000000000 --- a/Formula/mongodb@3.0.rb +++ /dev/null @@ -1,120 +0,0 @@ -require "language/go" - -class MongodbAT30 < Formula - desc "High-performance document-oriented database" - homepage "https://www.mongodb.org/" - url "https://fastdl.mongodb.org/src/mongodb-src-r3.0.15.tar.gz" - sha256 "09ad76e06df007085520025c94a5e5840d65f37660c2b359f4962e135e4ae259" - - bottle do - cellar :any_skip_relocation - sha256 "053e7f96eac6cbc5201683fdc0e06f2fa6c8fdd903ed73ec63aadbcb52198b8f" => :mojave - sha256 "a3c4c9fcf5c44c34f96395923937c65e7cf6cb52bd937ef2878afe91633672fe" => :high_sierra - sha256 "51f78308884b822d7406e12c897b613445cd0cb41add89b4835a203190c658d5" => :sierra - sha256 "3a8d91eba9e8342e325e6fe1643b63687429ce2866c61a27bef836928b264c6b" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "go" => :build - depends_on "scons" => :build - depends_on :macos => :mountain_lion - - go_resource "github.com/mongodb/mongo-tools" do - url "https://github.com/mongodb/mongo-tools.git", - :tag => "r3.0.15", - :revision => "86d15daf966ce58f5ce01985db07a7a5a3641ecb" - end - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - # New Go tools have their own build script but the server scons "install" - # target is still responsible for installing them. - Language::Go.stage_deps resources, buildpath/"src" - - cd "src/github.com/mongodb/mongo-tools" do - system "./build.sh" - end - - mkdir "src/mongo-tools" - cp Dir["src/github.com/mongodb/mongo-tools/bin/*"], "src/mongo-tools/" - - args = %W[ - -j#{ENV.make_jobs} - --cc=#{ENV.cc} - --cxx=#{ENV.cxx} - --osx-version-min=#{MacOS.version} - --prefix=#{prefix} - --use-new-tools - ] - - args << "--disable-warnings-as-errors" if MacOS.version >= :yosemite - - system "scons", "install", *args - - (buildpath/"mongod.conf").write mongodb_conf - etc.install "mongod.conf" - - (var/"mongodb").mkpath - (var/"log/mongodb").mkpath - end - - def mongodb_conf; <<~EOS - systemLog: - destination: file - path: #{var}/log/mongodb/mongo.log - logAppend: true - storage: - dbPath: #{var}/mongodb - net: - bindIp: 127.0.0.1 - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mongodb@3.0/bin/mongod --config #{HOMEBREW_PREFIX}/etc/mongod.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mongod - --config - #{etc}/mongod.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/mongodb/output.log - StandardOutPath - #{var}/log/mongodb/output.log - HardResourceLimits - - NumberOfFiles - 4096 - - SoftResourceLimits - - NumberOfFiles - 4096 - - - - EOS - end - - test do - system "#{bin}/mongod", "--sysinfo" - end -end diff --git a/Formula/mongodb@3.2.rb b/Formula/mongodb@3.2.rb deleted file mode 100644 index b371f6c3174af..0000000000000 --- a/Formula/mongodb@3.2.rb +++ /dev/null @@ -1,127 +0,0 @@ -require "language/go" - -class MongodbAT32 < Formula - desc "High-performance, schema-free, document-oriented database" - homepage "https://www.mongodb.org/" - url "https://fastdl.mongodb.org/src/mongodb-src-r3.2.21.tar.gz" - sha256 "8263befc10319809ea14e5cbf230c55113de7b38510b42a6ad27125dfa674371" - - bottle do - sha256 "6068932526af487dd50264aa1ead11dc199ed2bab849fd0adc04b67f90a89113" => :mojave - sha256 "3cc0ca816b495f169afc2d5f4b92463808424f5993ee9d3ec3f8b70354a89fcd" => :high_sierra - sha256 "d36d4031c58cee0a35b3f0445f995efad701eb519da8e3b66cf8eeb558092e6e" => :sierra - sha256 "8fc6948abb95eca2ecdfdf4411e9ff958616dc5a917376786546e981222852c8" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "go" => :build - depends_on "scons" => :build - depends_on :macos => :mountain_lion - depends_on "openssl" - - go_resource "github.com/mongodb/mongo-tools" do - url "https://github.com/mongodb/mongo-tools.git", - :tag => "r3.2.21", - :revision => "f207093c46939fd42f12980a058370c013c26338", - :shallow => false - end - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - # New Go tools have their own build script but the server scons "install" - # target is still responsible for installing them. - Language::Go.stage_deps resources, buildpath/"src" - - cd "src/github.com/mongodb/mongo-tools" do - ENV["LIBRARY_PATH"] = Formula["openssl"].opt_lib - ENV["CPATH"] = Formula["openssl"].opt_include - - system "./build.sh", "ssl" - end - - mkdir "src/mongo-tools" - cp Dir["src/github.com/mongodb/mongo-tools/bin/*"], "src/mongo-tools/" - - args = %W[ - -j#{ENV.make_jobs} - --osx-version-min=#{MacOS.version} - --prefix=#{prefix} - --ssl - --use-new-tools - CC=#{ENV.cc} - CXX=#{ENV.cxx} - CCFLAGS=-I#{Formula["openssl"].opt_include} - LINKFLAGS=-L#{Formula["openssl"].opt_lib} - ] - - args << "--disable-warnings-as-errors" if MacOS.version >= :yosemite - - system "scons", "install", *args - - (buildpath/"mongod.conf").write mongodb_conf - etc.install "mongod.conf" - - (var/"mongodb").mkpath - (var/"log/mongodb").mkpath - end - - def mongodb_conf; <<~EOS - systemLog: - destination: file - path: #{var}/log/mongodb/mongo.log - logAppend: true - storage: - dbPath: #{var}/mongodb - net: - bindIp: 127.0.0.1 - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mongodb@3.2/bin/mongod --config #{HOMEBREW_PREFIX}/etc/mongod.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mongod - --config - #{etc}/mongod.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/mongodb/output.log - StandardOutPath - #{var}/log/mongodb/output.log - HardResourceLimits - - NumberOfFiles - 4096 - - SoftResourceLimits - - NumberOfFiles - 4096 - - - - EOS - end - - test do - system "#{bin}/mongod", "--sysinfo" - end -end diff --git a/Formula/mongodb@3.4.rb b/Formula/mongodb@3.4.rb deleted file mode 100644 index 0e76fa0352ff2..0000000000000 --- a/Formula/mongodb@3.4.rb +++ /dev/null @@ -1,128 +0,0 @@ -class MongodbAT34 < Formula - desc "High-performance, schema-free, document-oriented database" - homepage "https://www.mongodb.org/" - url "https://fastdl.mongodb.org/src/mongodb-src-r3.4.18.tar.gz" - sha256 "a1c17e9977307752ddac4b06bcb65be177035057c21955df5a65e2db74a20856" - - bottle do - sha256 "9718fd2195c3dccbb9657811860193f9208df13f102cf09fee7aee5b48e85054" => :mojave - sha256 "e083476b4a2a1c030e41b4a35521d8fcb5c5b433293f612a1096fbf3b5e3db01" => :high_sierra - sha256 "a9109b38e59d4afdd41d19f84739fc899ed32790227ad097dbfe467f001d3ec9" => :sierra - end - - keg_only :versioned_formula - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on :macos => :mountain_lion - depends_on "openssl" - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - (buildpath/".brew_home/Library/Python/2.7/lib/python/site-packages/vendor.pth").write <<~EOS - import site; site.addsitedir("#{buildpath}/vendor/lib/python2.7/site-packages") - EOS - - # New Go tools have their own build script but the server scons "install" - # target is still responsible for installing them. - - cd "src/mongo/gotools" do - inreplace "build.sh" do |s| - s.gsub! "$(git describe)", version.to_s - s.gsub! "$(git rev-parse HEAD)", "homebrew" - end - - ENV["LIBRARY_PATH"] = Formula["openssl"].opt_lib - ENV["CPATH"] = Formula["openssl"].opt_include - - system "./build.sh", "ssl" - end - - (buildpath/"src/mongo-tools").install Dir["src/mongo/gotools/bin/*"] - - args = %W[ - -j#{ENV.make_jobs} - --build-mongoreplay=true - --osx-version-min=#{MacOS.version} - --prefix=#{prefix} - --ssl - --use-new-tools - CC=#{ENV.cc} - CXX=#{ENV.cxx} - CCFLAGS=-I#{Formula["openssl"].opt_include} - LINKFLAGS=-L#{Formula["openssl"].opt_lib} - ] - - args << "--disable-warnings-as-errors" if MacOS.version >= :yosemite - - system "scons", "install", *args - - (buildpath/"mongod.conf").write mongodb_conf - etc.install "mongod.conf" - end - - def post_install - (var/"mongodb").mkpath - (var/"log/mongodb").mkpath - end - - def mongodb_conf; <<~EOS - systemLog: - destination: file - path: #{var}/log/mongodb/mongo.log - logAppend: true - storage: - dbPath: #{var}/mongodb - net: - bindIp: 127.0.0.1 - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mongodb@3.4/bin/mongod --config #{HOMEBREW_PREFIX}/etc/mongod.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mongod - --config - #{etc}/mongod.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/mongodb/output.log - StandardOutPath - #{var}/log/mongodb/output.log - HardResourceLimits - - NumberOfFiles - 4096 - - SoftResourceLimits - - NumberOfFiles - 4096 - - - - EOS - end - - test do - system "#{bin}/mongod", "--sysinfo" - end -end diff --git a/Formula/mongodb@3.6.rb b/Formula/mongodb@3.6.rb deleted file mode 100644 index 00e47f827cd82..0000000000000 --- a/Formula/mongodb@3.6.rb +++ /dev/null @@ -1,153 +0,0 @@ -class MongodbAT36 < Formula - desc "High-performance, schema-free, document-oriented database" - homepage "https://www.mongodb.org/" - url "https://fastdl.mongodb.org/src/mongodb-src-r3.6.9.tar.gz" - sha256 "b5da7cf4323bd0958a38957e74107a149936d576db2a51fdabf2ea10a8f1eae4" - - bottle do - sha256 "0b494089cd797aabe923075ba00d32a0edf5d9d2e7b5473d49bd27336cefc993" => :mojave - sha256 "494292de2eff348bfa0f29d13d694d7a86719df58c147231a1f749a24e0f9382" => :high_sierra - sha256 "67da2bba59034da2e27b7379774bfe2908c855b72a3e06fe21f679a5aafcc269" => :sierra - end - - keg_only :versioned_formula - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on :xcode => ["8.3.2", :build] - depends_on :macos => :mountain_lion - depends_on "openssl" - depends_on "python@2" - - resource "Cheetah" do - url "https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz" - sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/bf/9b/2bf84e841575b633d8d91ad923e198a415e3901f228715524689495b4317/typing-3.6.6.tar.gz" - sha256 "4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d" - end - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - ENV.libcxx - - ["Cheetah", "PyYAML", "typing"].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - end - (buildpath/".brew_home/Library/Python/2.7/lib/python/site-packages/vendor.pth").write <<~EOS - import site; site.addsitedir("#{buildpath}/vendor/lib/python2.7/site-packages") - EOS - - # New Go tools have their own build script but the server scons "install" - # target is still responsible for installing them. - - cd "src/mongo/gotools" do - inreplace "build.sh" do |s| - s.gsub! "$(git describe)", version.to_s - s.gsub! "$(git rev-parse HEAD)", "homebrew" - end - - ENV["LIBRARY_PATH"] = Formula["openssl"].opt_lib - ENV["CPATH"] = Formula["openssl"].opt_include - - system "./build.sh", "ssl" - end - - (buildpath/"src/mongo-tools").install Dir["src/mongo/gotools/bin/*"] - - args = %W[ - -j#{ENV.make_jobs} - --build-mongoreplay=true - --prefix=#{prefix} - --ssl - --use-new-tools - CC=#{ENV.cc} - CXX=#{ENV.cxx} - CCFLAGS=-mmacosx-version-min=#{MacOS.version} - LINKFLAGS=-mmacosx-version-min=#{MacOS.version} - CCFLAGS=-I#{Formula["openssl"].opt_include} - LINKFLAGS=-L#{Formula["openssl"].opt_lib} - ] - - args << "--disable-warnings-as-errors" if MacOS.version >= :yosemite - - system "scons", "install", *args - - (buildpath/"mongod.conf").write mongodb_conf - etc.install "mongod.conf" - end - - def post_install - (var/"mongodb").mkpath - (var/"log/mongodb").mkpath - end - - def mongodb_conf; <<~EOS - systemLog: - destination: file - path: #{var}/log/mongodb/mongo.log - logAppend: true - storage: - dbPath: #{var}/mongodb - net: - bindIp: 127.0.0.1 - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mongodb@3.6/bin/mongod --config #{HOMEBREW_PREFIX}/etc/mongod.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mongod - --config - #{etc}/mongod.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/mongodb/output.log - StandardOutPath - #{var}/log/mongodb/output.log - HardResourceLimits - - NumberOfFiles - 4096 - - SoftResourceLimits - - NumberOfFiles - 4096 - - - - EOS - end - - test do - system "#{bin}/mongod", "--sysinfo" - end -end diff --git a/Formula/mongoose.rb b/Formula/mongoose.rb deleted file mode 100644 index 22505ad924cfc..0000000000000 --- a/Formula/mongoose.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Mongoose < Formula - desc "Web server build on top of Libmongoose embedded library" - homepage "https://github.com/cesanta/mongoose" - url "https://github.com/cesanta/mongoose/archive/6.13.tar.gz" - sha256 "ec7956b8f2845f6c22e19ab38a0c32c9b379087f0038c7db661b34812f225911" - - bottle do - cellar :any - sha256 "00e7662046f84e6e48ddecf56f471bd7c2a5acdbcc919ead7c5457a1126617dd" => :mojave - sha256 "a98aaf1726ab5402dc2ccd1418f71b32f0c4034f4be4dc8f3a93257b7d9113fb" => :high_sierra - sha256 "4960b6b0cb836bca2c4d5ff925dfbd6d09d8952c239cbc912200d5c509c5cec5" => :sierra - end - - depends_on "openssl" - - conflicts_with "suite-sparse", :because => "suite-sparse vendors libmongoose.dylib" - - def install - # No Makefile but is an expectation upstream of binary creation - # https://github.com/cesanta/mongoose/issues/326 - cd "examples/simplest_web_server" do - system "make" - bin.install "simplest_web_server" => "mongoose" - end - - system ENV.cc, "-dynamiclib", "mongoose.c", "-o", "libmongoose.dylib" - include.install "mongoose.h" - lib.install "libmongoose.dylib" - pkgshare.install "examples", "jni" - doc.install Dir["docs/*"] - end - - test do - (testpath/"hello.html").write <<~EOS - - - - Homebrew - - -

Hi!

- - - EOS - - begin - pid = fork { exec "#{bin}/mongoose" } - sleep 2 - assert_match "Hi!", shell_output("curl http://localhost:8000/hello.html") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mongrel2.rb b/Formula/mongrel2.rb deleted file mode 100644 index 2239755c50dc1..0000000000000 --- a/Formula/mongrel2.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Mongrel2 < Formula - desc "Application, language, and network architecture agnostic web server" - homepage "https://mongrel2.org/" - head "https://github.com/mongrel2/mongrel2.git", :branch => "develop" - - stable do - url "https://github.com/mongrel2/mongrel2/releases/download/v1.11.0/mongrel2-v1.11.0.tar.bz2" - sha256 "917f2ce07c0908cae63ac03f3039815839355d46568581902377ba7e41257bed" - - # ensure unit tests work on 1.11.0. remove after next release - patch do - url "https://github.com/mongrel2/mongrel2/commit/7cb8532e2ecc341d77885764b372a363fbc72eff.patch?full_index=1" - sha256 "fa7be14bf1df8ec3ab8ae164bde8eb703e9e2665645aa627baae2f08c072db9a" - end - end - - bottle do - cellar :any - sha256 "cfda97fdc8cf6fa5ee0b4f1b48b07840b1560bd73ced286bb574f838148e6f25" => :mojave - sha256 "67696f654ab1d878ac7c2a3fa254b0ee86c1d444578045997a971ca44189b2fe" => :high_sierra - sha256 "293b0edc8bcc0b7e3a97748a6accbc5000916ed145fd467aeb809303438a207a" => :sierra - sha256 "7a6880cbc814b084a3ac91e379b7a720438951e31a18119c232f976fded229c3" => :el_capitan - sha256 "0b2926fe3d79ab934e95f0e5c067e8bb23b6900b99255482defee9388a0dee07" => :yosemite - sha256 "dd07092a2384c243fcd8c54ed67f2a728f3da698276540fc1c9b201eb3c5cbbb" => :mavericks - end - - depends_on "zeromq" - - def install - # Build in serial. See: - # https://github.com/Homebrew/homebrew/issues/8719 - ENV.deparallelize - - # Mongrel2 pulls from these ENV vars instead - ENV["OPTFLAGS"] = "#{ENV.cflags} #{ENV.cppflags}" - ENV["OPTLIBS"] = "#{ENV.ldflags} -undefined dynamic_lookup" - - system "make", "all" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"m2sh", "help" - end -end diff --git a/Formula/mongroup.rb b/Formula/mongroup.rb deleted file mode 100644 index 5b4a44e93c6c7..0000000000000 --- a/Formula/mongroup.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mongroup < Formula - desc "Monitor a group of processes with mon" - homepage "https://github.com/jgallen23/mongroup" - url "https://github.com/jgallen23/mongroup/archive/0.4.1.tar.gz" - sha256 "50c6fb0eb6880fa837238a2036f9bc77d2f6db8c66b8c9a041479e2771a925ae" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4c11751013bae001ff2dcf55c3566613e83fe0d9257e0691c9da7b2aec298918" => :mojave - sha256 "230996b629ff1a72b405ba6c7fbb8cdd0fd06292b16bacf124bc2e30c5f9917e" => :high_sierra - sha256 "d3065cb969df510f29b742e1d6606151328af2afe3542bb3ff3462e7551ade9b" => :sierra - sha256 "8e801dac08ad7a776d698dc8bfc170f1df2fcb621561b86c789cc0e8098b1b38" => :el_capitan - sha256 "f7db89622f5575404e2ccbb1d0aca159f06b82766f27ac28bd41492d498128a7" => :mavericks - end - - depends_on "mon" - - def install - bin.mkpath - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/mongroup", "-V" - end -end diff --git a/Formula/monit.rb b/Formula/monit.rb deleted file mode 100644 index cf700f7bd649d..0000000000000 --- a/Formula/monit.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Monit < Formula - desc "Manage and monitor processes, files, directories, and devices" - homepage "https://mmonit.com/monit/" - url "https://mmonit.com/monit/dist/monit-5.25.2.tar.gz" - sha256 "aa0ce6361d1155e43e30a86dcff00b2003d434f221c360981ced830275abc64a" - - bottle do - sha256 "296fd100f547f2df58a8f20586482ba999175c6cf6e1ce105887e083da3e5a12" => :mojave - sha256 "7e7a2b1afea349b49e0cc7c9cfae1ccf8b636ec8e69295484670203571c41a26" => :high_sierra - sha256 "63cefa0ddab53d22e2fce73ac0d2bf23a9c9a2747384182e1004563e2e28d95e" => :sierra - sha256 "87d743b3df524371a597fae5f255779e1928ed0b90eb2e755d493f8a54e33abf" => :el_capitan - end - - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", - "--localstatedir=#{var}/monit", - "--sysconfdir=#{etc}/monit", - "--with-ssl-dir=#{Formula["openssl"].opt_prefix}" - system "make", "install" - pkgshare.install "monitrc" - end - - test do - system bin/"monit", "-c", pkgshare/"monitrc", "-t" - end -end diff --git a/Formula/monitoring-plugins.rb b/Formula/monitoring-plugins.rb deleted file mode 100644 index 6f06558bcdf3c..0000000000000 --- a/Formula/monitoring-plugins.rb +++ /dev/null @@ -1,43 +0,0 @@ -class MonitoringPlugins < Formula - desc "Plugins for nagios compatible monitoring systems" - homepage "https://www.monitoring-plugins.org" - url "https://www.monitoring-plugins.org/download/monitoring-plugins-2.2.tar.gz" - sha256 "296a538f00a9cbef7f528ff2d43af357a44b384dc98a32389a675b62a6dd3665" - - bottle do - sha256 "ad0ac72a226d385a990b6fba5836431136945aff4cc4b1a1d57c17457843f104" => :mojave - sha256 "39310e6fcfee83275afc1ceab922e4f2a8c72306bf54af49aed986c658175a82" => :high_sierra - sha256 "426c87771bcb45bbc92755ea4b05ee213863423554c8bb21b9e2fdfd5e32e959" => :sierra - sha256 "d531079a00f1dae22309918b9fbbd3250873b5869001f14af1d221d5bb7b021b" => :el_capitan - sha256 "b3d0549fc51c3948743b16eb5bc52a0a7f8af6cf6ad6c05b3056fa947661a6da" => :yosemite - end - - depends_on "openssl" - - conflicts_with "nagios-plugins", :because => "nagios-plugins ships their plugins to the same folder." - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{libexec} - --libexecdir=#{libexec}/sbin - --with-openssl=#{Formula["openssl"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - sbin.write_exec_script Dir["#{libexec}/sbin/*"] - end - - def caveats - <<~EOS - All plugins have been installed in: - #{HOMEBREW_PREFIX}/sbin - EOS - end - - test do - output = shell_output("#{sbin}/check_dns -H 8.8.8.8 -t 3") - assert_match "google-public-dns", output - end -end diff --git a/Formula/monkeysphere.rb b/Formula/monkeysphere.rb deleted file mode 100644 index 713b332e6f7d9..0000000000000 --- a/Formula/monkeysphere.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Monkeysphere < Formula - desc "Use the OpenPGP web of trust to verify ssh connections" - homepage "https://web.monkeysphere.info/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/monkeysphere/monkeysphere_0.41.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/monkeysphere/monkeysphere_0.41.orig.tar.gz" - sha256 "911a2f1622ddb81151b0f41cf569ccf2154d10a09b2f446dbe98fac7279fe74b" - head "git://git.monkeysphere.info/monkeysphere" - - bottle do - cellar :any - sha256 "9cfe15130a5950d276146c72a4945d09b29c4ebc9ef15b6d92f0d8527e0afbf9" => :mojave - sha256 "4854342d29ac57b1e9c0d040ae7a601065b29332c3e35fde847cee7783e3e37e" => :high_sierra - sha256 "d0532dad405696179a0e94359cf5908613c1def95e82b8c9cfe88eba7e1843cf" => :sierra - sha256 "6feb6d2bbd4a0d49dde32d9d26e17bbef7e48ccadb9ffcb82f1b7899386d1b38" => :el_capitan - sha256 "7d32f5718f0302eb6b009b030dfb0279ebd471e808cafa3ca264a8fd4817b5ca" => :yosemite - end - - depends_on "gnu-sed" => :build - depends_on "libassuan" - depends_on "libgcrypt" - depends_on "libgpg-error" - depends_on "openssl" - - resource "Crypt::OpenSSL::Bignum" do - url "https://cpan.metacpan.org/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-0.06.tar.gz" - sha256 "c7ccafa9108524b9a6f63bf4ac3377f9d7e978fee7b83c430af7e74c5fcbdf17" - end - - def install - ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resource("Crypt::OpenSSL::Bignum").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - - ENV["PREFIX"] = prefix - ENV["ETCPREFIX"] = prefix - system "make", "install" - - # This software expects to be installed in a very specific, unusual way. - # Consequently, this is a bit of a naughty hack but the least worst option. - inreplace pkgshare/"keytrans", "#!/usr/bin/perl -T", - "#!/usr/bin/perl -T -I#{libexec}/lib/perl5" - end - - test do - assert_match version.to_s, shell_output("#{bin}/monkeysphere v") - # This just checks it finds the vendored Perl resource. - assert_match "We need at least", pipe_output("#{bin}/openpgp2pem --help 2>&1") - end -end diff --git a/Formula/mono-libgdiplus.rb b/Formula/mono-libgdiplus.rb deleted file mode 100644 index 3687cc95cbfd3..0000000000000 --- a/Formula/mono-libgdiplus.rb +++ /dev/null @@ -1,57 +0,0 @@ -class MonoLibgdiplus < Formula - desc "GDI+-compatible API on non-Windows operating systems" - homepage "https://www.mono-project.com/docs/gui/libgdiplus/" - url "https://github.com/mono/libgdiplus/archive/5.6.tar.gz" - sha256 "6a75e4a476695cd6a1475fd6b989423ecf73978fd757673669771d8a6e13f756" - - bottle do - cellar :any - sha256 "fab990ccafb532c88fe818f093df8ab9b9f9735bd91e87e0de1dbbaad7a90f7e" => :mojave - sha256 "e025958c8b7c9e7ec1f699a9a32149f31e5ba66279d733948036f26e2f19699b" => :high_sierra - sha256 "8cd50ca8eac2fae538ba0ecf66809838f4929c25e49b65c31c2c7e409cb560de" => :sierra - sha256 "d099b8722d00774e64d1685cdb8506f03e3f026e05984cf4f0148359b5036693" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "fontconfig" - depends_on "freetype" - depends_on "gettext" - depends_on "giflib" - depends_on "glib" - depends_on "jpeg" - depends_on "libexif" - depends_on "libpng" - depends_on "libtiff" - depends_on "pixman" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--without-x11", - "--disable-tests", - "--prefix=#{prefix}" - system "make" - cd "tests" do - system "make", "testbits" - system "./testbits" - end - system "make", "install" - end - - test do - # Since no headers are installed, we just test that we can link with - # libgdiplus - (testpath/"test.c").write <<~EOS - int main() { - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lgdiplus", "-o", "test" - end -end diff --git a/Formula/mono.rb b/Formula/mono.rb deleted file mode 100644 index d6e2125263b8d..0000000000000 --- a/Formula/mono.rb +++ /dev/null @@ -1,160 +0,0 @@ -class Mono < Formula - desc "Cross platform, open source .NET development framework" - homepage "https://www.mono-project.com/" - url "https://download.mono-project.com/sources/mono/mono-5.18.0.225.tar.bz2" - sha256 "91aa3e8a12aaf94760a092866abc5c5f1f437ecd0a97bedfff857c439aa7a87f" - - bottle do - sha256 "103ef04b636d095f21f4447d7e835dcfc17279c7eb4bc19cdea1535099b830b2" => :mojave - sha256 "44434e90915ed9849886e568a2434f484e3dda5adfd5f5a07c3f77eb421b1fde" => :high_sierra - sha256 "9b5c5dfae0a67c324ff9cfaf9723f52d913006116f26dc1b88459d8da82f82f0" => :sierra - end - - option "without-fsharp", "Build without support for the F# language." - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - conflicts_with "xsd", :because => "both install `xsd` binaries" - - # xbuild requires the .exe files inside the runtime directories to - # be executable - skip_clean "lib/mono" - - link_overwrite "bin/fsharpi" - link_overwrite "bin/fsharpiAnyCpu" - link_overwrite "bin/fsharpc" - link_overwrite "bin/fssrgen" - link_overwrite "lib/mono" - link_overwrite "lib/cli" - - resource "fsharp" do - url "https://github.com/fsharp/fsharp.git", - :tag => "10.2.1", - :revision => "3de387432de8d11a89f99d1af87aa9ce194fe21b" - end - - # When upgrading Mono, make sure to use the revision from - # https://github.com/mono/mono/blob/mono-#{version}/packaging/MacSDK/msbuild.py - resource "msbuild" do - url "https://github.com/mono/msbuild.git", - :revision => "e6c3a1f9e4d3ee4b88ef7bd98b7a48a998c199e6" - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-silent-rules - --enable-nls=no - ] - - args << "--build=" + (MacOS.prefer_64_bit? ? "x86_64": "i686") + "-apple-darwin" - - system "./configure", *args - system "make" - system "make", "install" - # mono-gdb.py and mono-sgen-gdb.py are meant to be loaded by gdb, not to be - # run directly, so we move them out of bin - libexec.install bin/"mono-gdb.py", bin/"mono-sgen-gdb.py" - - # We'll need mono for msbuild, and then later msbuild for fsharp - ENV.prepend_path "PATH", bin - - # Next build msbuild - resource("msbuild").stage do - system "./build.sh", "-hostType", "mono", "-configuration", "Release", "-skipTests" - system "./artifacts/mono-msbuild/msbuild", "mono/build/install.proj", - "/p:MonoInstallPrefix=#{prefix}", "/p:Configuration=Release-MONO", - "/p:IgnoreDiffFailure=true" - end - - # Finally build and install fsharp as well - if build.with? "fsharp" - resource("fsharp").stage do - ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" - system "make" - system "make", "install" - end - end - end - - def caveats; <<~EOS - To use the assemblies from other formulae you need to set: - export MONO_GAC_PREFIX="#{HOMEBREW_PREFIX}" - Note that the 'mono' formula now includes F#. If you have - the 'fsharp' formula installed, remove it with 'brew uninstall fsharp'. - EOS - end - - test do - test_str = "Hello Homebrew" - test_name = "hello.cs" - (testpath/test_name).write <<~EOS - public class Hello1 - { - public static void Main() - { - System.Console.WriteLine("#{test_str}"); - } - } - EOS - shell_output("#{bin}/mcs #{test_name}") - output = shell_output("#{bin}/mono hello.exe") - assert_match test_str, output.strip - - # Tests that xbuild is able to execute lib/mono/*/mcs.exe - (testpath/"test.csproj").write <<~EOS - - - - HomebrewMonoTest - v4.5 - - - - - - - EOS - system bin/"xbuild", "test.csproj" - - if build.with? "fsharp" - # Test that fsharpi is working - ENV.prepend_path "PATH", bin - (testpath/"test.fsx").write <<~EOS - printfn "#{test_str}"; 0 - EOS - output = pipe_output("#{bin}/fsharpi test.fsx") - assert_match test_str, output - - # Tests that xbuild is able to execute fsc.exe - (testpath/"test.fsproj").write <<~EOS - - - - 8.0.30703 - 2.0 - {B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E} - Exe - $(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\FSharp\\Microsoft.FSharp.Targets - - - - - - - - - - - - EOS - (testpath/"Main.fs").write <<~EOS - [] - let main _ = printfn "#{test_str}"; 0 - EOS - system bin/"xbuild", "test.fsproj" - end - end -end diff --git a/Formula/montage.rb b/Formula/montage.rb deleted file mode 100644 index 95dee84c2c8cd..0000000000000 --- a/Formula/montage.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Montage < Formula - desc "Toolkit for assembling FITS images into custom mosaics" - homepage "http://montage.ipac.caltech.edu" - url "http://montage.ipac.caltech.edu/download/Montage_v4.0.tar.gz" - sha256 "de143e4d4b65086f04bb75cf482dfa824965a5a402f3431f9bceb395033df5fe" - - bottle do - cellar :any_skip_relocation - sha256 "ee1b94e776a2ad68ea41b1edb6a3fb549c43bb373f3f7b9fb3709e4e4fbbb4e8" => :mojave - sha256 "3a8fab4097bd0dd0524a5a482065284d35ea0fdd946fb1f5d5ea1e103f5d4443" => :high_sierra - sha256 "70b1769202095b84da05fe00a1934d8e8da3fd08b7ddb7135937f4cdc0107f07" => :sierra - sha256 "503c3e946aa0d8f277b5e4a5aab75086d5c895551fa679a3129183b95f89b236" => :el_capitan - sha256 "7f9bb66eff925f20099f11ee247e4ba4c8b4821b74c7f2a3efd93d474e9a1b3f" => :yosemite - sha256 "30e68dcecc111af10a65b1edd33a0142457b2f2064e1bce45e33a6d3d11539d4" => :mavericks - end - - conflicts_with "wdiff", :because => "Both install an mdiff executable" - - def install - system "make" - bin.install Dir["bin/m*"] - end - - def caveats; <<~EOS - Montage is under the Caltech/JPL non-exclusive, non-commercial software - licence agreement available at: - http://montage.ipac.caltech.edu/docs/download.html - EOS - end - - test do - system bin/"mHdr", "m31", "1", "template.hdr" - end -end diff --git a/Formula/moon-buggy.rb b/Formula/moon-buggy.rb deleted file mode 100644 index ae479db8e37e9..0000000000000 --- a/Formula/moon-buggy.rb +++ /dev/null @@ -1,33 +0,0 @@ -class MoonBuggy < Formula - desc "Drive some car across the moon" - homepage "https://www.seehuhn.de/pages/moon-buggy.html" - url "https://m.seehuhn.de/programs/moon-buggy-1.0.tar.gz" - sha256 "f8296f3fabd93aa0f83c247fbad7759effc49eba6ab5fdd7992f603d2d78e51a" - - bottle do - sha256 "d7baa37058fd1e08a0a9028a912288bde8c0699b50f7632ce792d19d52c9fa73" => :mojave - sha256 "54948d0646240382661b765ab2253258946fb10b2974587d719b24a771172d91" => :high_sierra - sha256 "fb2abda84d3e2b20f286caa036fadb9bfd6c4df151352a171385a54ca43acda9" => :sierra - sha256 "b71bfe4abfb1d2c3d35db544850cb56f1b2ba50df18d27d3fef3ed5845b30e76" => :el_capitan - sha256 "08b485a97197d8a0a2733e74622a232a8a1407ebd2564caccdffb9438176c1ee" => :yosemite - end - - head do - url "https://github.com/seehuhn/moon-buggy.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}" - system "make", "install" - end - - test do - assert_match /Moon-Buggy #{version}$/, shell_output("#{bin}/moon-buggy -V") - end -end diff --git a/Formula/moreutils.rb b/Formula/moreutils.rb deleted file mode 100644 index 76b109461b4e8..0000000000000 --- a/Formula/moreutils.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Moreutils < Formula - desc "Collection of tools that nobody wrote when UNIX was young" - homepage "https://joeyh.name/code/moreutils/" - url "https://git.joeyh.name/git/moreutils.git", - :tag => "0.62", - :revision => "06b5970631ffbf151893bd3e1e7f03fb76aad4c0" - head "https://git.joeyh.name/git/moreutils.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "060544e89b1434167caed439b54c0851ed72358bcdeb71ab69202ada4ddc9240" => :mojave - sha256 "9ddae132c36dec3a9d9e30181dfe7e63ca860d80d9136f99927fdae05f1af5c7" => :high_sierra - sha256 "3efc2f2f6e9783e48a0da1aad20b47943f25e5447ec1b16b3f135a1c0b74cea6" => :sierra - end - - depends_on "docbook-xsl" => :build - - conflicts_with "parallel", :because => "Both install a `parallel` executable." - conflicts_with "pwntools", :because => "Both install an `errno` executable." - conflicts_with "task-spooler", :because => "Both install a `ts` executable." - - resource "Time::Duration" do - url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz" - sha256 "458205b528818e741757b2854afac5f9af257f983000aae0c0b1d04b5a9cbbb8" - end - - resource "IPC::Run" do - url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/IPC-Run-0.94.tar.gz" - sha256 "2eb336c91a2b7ea61f98e5b2282d91020d39a484f16041e2365ffd30f8a5605b" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resource("Time::Duration").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "--skipdeps" - system "make", "install" - end - - resource("IPC::Run").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - - inreplace "Makefile" do |s| - s.gsub! "/usr/share/xml/docbook/stylesheet/docbook-xsl", - "#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl" - end - system "make", "all" - system "make", "check" - system "make", "install", "PREFIX=#{prefix}" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - pipe_output("#{bin}/isutf8", "hello", 0) - pipe_output("#{bin}/isutf8", "\xca\xc0\xbd\xe7", 1) - end -end diff --git a/Formula/morse.rb b/Formula/morse.rb deleted file mode 100644 index 2ea976fe828d8..0000000000000 --- a/Formula/morse.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Morse < Formula - desc "Morse-code training program and QSO generator" - homepage "http://www.catb.org/~esr/morse/" - url "http://www.catb.org/~esr/morse/morse-2.5.tar.gz" - sha256 "476d1e8e95bb173b1aadc755db18f7e7a73eda35426944e1abd57c20307d4987" - - bottle do - cellar :any_skip_relocation - sha256 "5fe911c0c4d71783759f9d8c4e6269c873a830d0511e0813edf7ec86f3c7f62f" => :mojave - sha256 "fb58a8af73002f98fe7ff1274c1712eb4bf0cab8b08640d2836fc6951c5cb2e9" => :high_sierra - sha256 "d779902b961e9ebbfa41b0906d8d41357232fd4da83a393e112cde87f5bcdcaa" => :sierra - sha256 "491a1ea5455d058af9adb607e0e49d95b94e52f0068cd5fb197c1ea71666b524" => :el_capitan - sha256 "c89c45cdc2ff59d6ac327188c484659c769fe94a07e5e1f38f4d568f0b1a943d" => :yosemite - end - - depends_on :x11 - - def install - system "make", "all", "DEVICE=X11" - bin.install "morse" - man1.install "morse.1" - end -end diff --git a/Formula/mosh.rb b/Formula/mosh.rb deleted file mode 100644 index 777296385eeb4..0000000000000 --- a/Formula/mosh.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Mosh < Formula - desc "Remote terminal application" - homepage "https://mosh.org" - url "https://mosh.org/mosh-1.3.2.tar.gz" - sha256 "da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216" - revision 4 - - bottle do - sha256 "5e05a95d972b509c0469ca933de7a522b74b049cc0dccfe5cb1aa6db34b54fc4" => :mojave - sha256 "6cff59a934d2d8fda8f40f59c8ec5d0d2b550617478afa6ad56db20b3bb4e4a8" => :high_sierra - sha256 "c62e3806458d92a044bd00f5ddf08d6a1d01ee5870f77b67c5527a4a81f44251" => :sierra - sha256 "f990bb41dcdcc581c531138e235d58c6d83dfc53afe5203f44a0db7e92de4ead" => :el_capitan - end - - head do - url "https://github.com/mobile-shell/mosh.git", :shallow => false - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "tmux" => :build if build.bottle? - depends_on "protobuf" - - needs :cxx11 - - def install - ENV.cxx11 - - # teach mosh to locate mosh-client without referring - # PATH to support launching outside shell e.g. via launcher - inreplace "scripts/mosh.pl", "'mosh-client", "\'#{bin}/mosh-client" - - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", "--enable-completion" - system "make", "check" if build.bottle? - system "make", "install" - end - - test do - system bin/"mosh-client", "-c" - end -end diff --git a/Formula/mosml.rb b/Formula/mosml.rb deleted file mode 100644 index c2abfcf3d28f4..0000000000000 --- a/Formula/mosml.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mosml < Formula - desc "Moscow ML" - homepage "http://mosml.org" - url "https://github.com/kfl/mosml/archive/ver-2.10.1.tar.gz" - sha256 "fed5393668b88d69475b070999b1fd34e902591345de7f09b236824b92e4a78f" - - bottle do - sha256 "7a888abd233069f837cf9aba4021baa71387a4b720bc53323d40a963433b566a" => :high_sierra - sha256 "297c05c55f2784f3b934a2fdb3ec2f91d8b11a06453c8649c1f6562cefdc089e" => :sierra - sha256 "5dae62ca2034ba70844d684111cec58561895eac39db3177d439747512206002" => :el_capitan - sha256 "3a0289ba1b1a56cf3c2a598ccbee9b1739c7c35628a173dd00bd2f20fead6703" => :yosemite - sha256 "97ba76cf36e165dc798bdae33fc06c7c5954b1293686f43d2781b3130e75a119" => :mavericks - sha256 "846e6c0980ebd5fd968425b51bfa25718feb66c5ff88aaeec7928d7186fb85cf" => :mountain_lion - end - - depends_on "gmp" - - def install - cd "src" do - system "make", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "world" - system "make", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "install" - end - end - - test do - system "#{bin}/mosml", "-P full" - end -end diff --git a/Formula/mosquitto.rb b/Formula/mosquitto.rb deleted file mode 100644 index e371216225d06..0000000000000 --- a/Formula/mosquitto.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Mosquitto < Formula - desc "Message broker implementing the MQTT protocol" - homepage "https://mosquitto.org/" - url "https://mosquitto.org/files/source/mosquitto-1.5.5.tar.gz" - sha256 "fcdb47e340864c545146681af7253399cc292e41775afd76400fda5b0d23d668" - - bottle do - sha256 "d2331f08eb21f953a44a84574f9d849a1eeb583e95740a7a10780c4074a1d767" => :mojave - sha256 "edb1c861b690b730a45871bf7b631cc7ddf63857d34cd62e76c8e851b8459d5a" => :high_sierra - sha256 "42448af7684434a1cda382fd36d6c39af8cf043b5a67676daf4f4ab02d177b8b" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libwebsockets" - depends_on "openssl" - - def install - system "cmake", ".", *std_cmake_args, "-DWITH_WEBSOCKETS=ON" - system "make", "install" - end - - def post_install - (var/"mosquitto").mkpath - end - - def caveats; <<~EOS - mosquitto has been installed with a default configuration file. - You can make changes to the configuration by editing: - #{etc}/mosquitto/mosquitto.conf - EOS - end - - plist_options :manual => "mosquitto -c #{HOMEBREW_PREFIX}/etc/mosquitto/mosquitto.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/mosquitto - -c - #{etc}/mosquitto/mosquitto.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{var}/mosquitto - - - EOS - end - - test do - quiet_system "#{sbin}/mosquitto", "-h" - assert_equal 3, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/most.rb b/Formula/most.rb deleted file mode 100644 index 1d4acc04b18ac..0000000000000 --- a/Formula/most.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Most < Formula - desc "Powerful paging program" - homepage "https://www.jedsoft.org/most/" - url "https://www.jedsoft.org/releases/most/most-5.0.0a.tar.bz2" - sha256 "94cb5a2e71b6b9063116f4398a002a757e59cd1499f1019dde8874f408485aa9" - head "git://git.jedsoft.org/git/most.git" - - bottle do - sha256 "af9a922f4a08dbd0afd272fbe8eef56bd2437691721cdff0571531255a61b0ca" => :mojave - sha256 "90678b6798fb5eaadf38359fc8f1652fb8dbe3c96c58113742a0727a3d3fb51c" => :high_sierra - sha256 "33ff883a9327d71e8d8eaffeb7e12e224ac1e04f06bd3d940317e7d9c431145b" => :sierra - sha256 "9e645b60950d18dea0b58c95b0525992cb55bbddc5cdc664dce11e94b552e568" => :el_capitan - sha256 "7b2828c656ba7ef31fc03d5570f8d6701f365fd4a96252bcdfae66b266713bc3" => :yosemite - sha256 "f7d99563678653a673eddee924ca90f76819eed8a25a47780762571f35187241" => :mavericks - sha256 "a5e6342f6f4046aa9f47b588734a4f0ad614aa3c461a83fe61a4d4f2666e792b" => :mountain_lion - end - - depends_on "s-lang" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-slang=#{HOMEBREW_PREFIX}" - system "make", "install" - end - - test do - text = "This is Homebrew" - assert_equal text, pipe_output("#{bin}/most -C", text) - end -end diff --git a/Formula/movgrab.rb b/Formula/movgrab.rb deleted file mode 100644 index da8f22e8c35a7..0000000000000 --- a/Formula/movgrab.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Movgrab < Formula - desc "Downloader for youtube, dailymotion, and other video websites" - homepage "https://sites.google.com/site/columscode/home/movgrab" - url "https://sites.google.com/site/columscode/files/movgrab-1.2.1.tar.gz" - sha256 "1e9a57b1c934d8584f9133d918c1ceecfe102bbaf9fb4c8ab174a642917ae4a8" - - bottle do - cellar :any_skip_relocation - sha256 "cde671dc6401286e39179deff8598a78e7df1184b420178a178900f505ac4221" => :mojave - sha256 "32d047668237fab4e3dea9987bce5d568a86b7846d671dffabcecd5aaf42ddfe" => :high_sierra - sha256 "aa40b9cb2e4c947ced14535bcb0e4bf189cf90ca786a7386b372abc6e92ed90a" => :sierra - sha256 "82cb6ea3423aabf6ae277fcdb2d6ae497021ba5ea7b9c58d6f3553ecebe1bb17" => :el_capitan - sha256 "aac759c0e0b95b7ccf0e9a446d78e360be70aacf43f341eb1f785e8c7396b8cc" => :yosemite - sha256 "f36f583c82bf0b4fda8b918fde44d0631950544c48f313ac3ed52b9dee6af7de" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make" - - # because case-insensitivity is sadly a thing and while the movgrab - # Makefile itself doesn't declare INSTALL as a phony target, we - # just remove the INSTALL instructions file so we can actually - # just make install - rm "INSTALL" - system "make", "install" - end - - test do - system "#{bin}/movgrab", "--version" - end -end diff --git a/Formula/moz-git-tools.rb b/Formula/moz-git-tools.rb deleted file mode 100644 index 82d313ec1d996..0000000000000 --- a/Formula/moz-git-tools.rb +++ /dev/null @@ -1,46 +0,0 @@ -class MozGitTools < Formula - desc "Tools for working with Git at Mozilla" - homepage "https://github.com/mozilla/moz-git-tools" - url "https://github.com/mozilla/moz-git-tools.git", - :tag => "v0.1", - :revision => "cfe890e6f81745c8b093b20a3dc22d28f9fc0032" - head "https://github.com/mozilla/moz-git-tools.git" - - bottle do - cellar :any_skip_relocation - sha256 "101a581f5a39b97b8e6742bfe6d3eff742c590427ca07c768751376530bcb54f" => :mojave - sha256 "0901261be02f9a82cd6ab1b287160e047c4160d81a443f4edc0a7326fdf08a6d" => :high_sierra - sha256 "7a771b0e71a44dafd3fc4eb2210f909d412f9ea541a7ff50a96ce272204cc501" => :sierra - sha256 "c5ddb2e842a6fb26ba5feacdee6bac287d94732abd888bd11bc5c80be4f100a4" => :el_capitan - sha256 "91f89ec1014d6c7b395571210c0f21b1e701f4bfb90540a94fa3daafd4472d3b" => :yosemite - sha256 "8df4c14355c7b6291964609122f8643f61d77e05c2b6b68517710e5653a1423e" => :mavericks - end - - def install - # Install all the executables, except git-root since that conflicts with git-extras - bin_array = Dir.glob("git*").push("hg-patch-to-git-patch") - bin_array.delete("git-root") - bin_array.delete("git-bz-moz") # a directory, not an executable - bin_array.each { |e| bin.install e } - end - - def caveats - <<~EOS - git-root was not installed because it conflicts with the version provided by git-extras. - EOS - end - - test do - # create a Git repo and check its branchname - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - (testpath/"myfile").write("my file") - system "git", "add", "myfile" - system "git", "commit", "-m", "test" - assert_match /master/, shell_output("#{bin}/git-branchname") - end -end diff --git a/Formula/mozilla-addon-sdk.rb b/Formula/mozilla-addon-sdk.rb deleted file mode 100644 index ca40fecec6562..0000000000000 --- a/Formula/mozilla-addon-sdk.rb +++ /dev/null @@ -1,13 +0,0 @@ -class MozillaAddonSdk < Formula - desc "Create Firefox add-ons using JS, HTML, and CSS" - homepage "https://developer.mozilla.org/en-US/Add-ons/SDK" - url "https://archive.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.17.zip" - sha256 "16e29d92214a556c8422db156b541fb8c47addfcb3cd879e0a4ca879d6a31f65" - - bottle :unneeded - - def install - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/cfx" - end -end diff --git a/Formula/mozjpeg.rb b/Formula/mozjpeg.rb deleted file mode 100644 index 0ff34b997716f..0000000000000 --- a/Formula/mozjpeg.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Mozjpeg < Formula - desc "Improved JPEG encoder" - homepage "https://github.com/mozilla/mozjpeg" - url "https://github.com/mozilla/mozjpeg/archive/v3.3.1.tar.gz" - sha256 "aebbea60ea038a84a2d1ed3de38fdbca34027e2e54ee2b7d08a97578be72599d" - revision 1 - - bottle do - cellar :any - sha256 "8f84ae70b36cba861c17bc0b7f3befa2e3d30fc807cadd70ed7af0521de325cb" => :mojave - sha256 "36faaf1c7c6baaeaed402dc9239b594222e8bce4c8b7b8468d13e7d084c06582" => :high_sierra - sha256 "1108870dce024757e600488eb3122994675ca81b4ed20fefd32a622d3ff6a2e8" => :sierra - end - - keg_only "mozjpeg is not linked to prevent conflicts with the standard libjpeg" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "nasm" => :build - depends_on "pkg-config" => :build - depends_on "libpng" - - def install - system "autoreconf", "-fvi" - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--with-jpeg8" - system "make", "install" - end - - test do - system bin/"jpegtran", "-crop", "1x1", - "-transpose", "-optimize", - "-outfile", "out.jpg", - test_fixtures("test.jpg") - end -end diff --git a/Formula/mp3blaster.rb b/Formula/mp3blaster.rb deleted file mode 100644 index 8d4632dd54016..0000000000000 --- a/Formula/mp3blaster.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mp3blaster < Formula - desc "Text-based mp3 player" - homepage "https://mp3blaster.sourceforge.io" - url "https://downloads.sourceforge.net/project/mp3blaster/mp3blaster/mp3blaster-3.2.6/mp3blaster-3.2.6.tar.gz" - sha256 "43d9f656367d16aaac163f93dc323e9843c3dd565401567edef3e1e72b9e1ee0" - - bottle do - sha256 "8d7c349befa2a093cee2b1fea30ece26393069c19508defb4582a5f7e8200dda" => :mojave - sha256 "da013614ce379f9037f2e6fc684adfe51918e40659577650a229dbd1c6f53847" => :high_sierra - sha256 "6dd3817fae76ae7d928688836c580a46e0a6c2f3111507ea6c7a5ae17a1728a7" => :sierra - sha256 "a9e7e56d97d45cd2e06819f15dedc2db738b70836a5897fb23a682202e2fb5b5" => :el_capitan - sha256 "87ba8218ac7bceab2d0f388aae88e6c6a0f6dba2aad11b434d2370ab8ce8251a" => :yosemite - end - - depends_on "sdl" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/mp3blaster", "--version" - end -end diff --git a/Formula/mp3cat.rb b/Formula/mp3cat.rb deleted file mode 100644 index 52ac8e8bdce65..0000000000000 --- a/Formula/mp3cat.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mp3cat < Formula - desc "Reads and writes mp3 files" - homepage "https://web.archive.org/web/20150904105157/tomclegg.net/mp3cat" - url "https://web.archive.org/web/20150904105157/tomclegg.net/software/mp3cat-0.4.tar.gz" - sha256 "fd2b0d58018f5117bd1e22298c899bef5e6af61a0c540186d16d2bf516d6849a" - - bottle do - cellar :any_skip_relocation - sha256 "0539db62bf14db5f54b37385bdd621192bcb699fb69a0ef1d2fc3f1135714f48" => :mojave - sha256 "f958c3e6b1dccfad12daec5c0692af405cd97342871ac76615a542ba17ee2de3" => :high_sierra - sha256 "4ae83c8ee5219135c9ca52b16b8e103b8c9f67c12cdf60e6584353f39276ed7c" => :sierra - sha256 "c582f29c5c3c05697e4805b75209dbab5797d6a3c62de5b4d21972250bc8d2e9" => :el_capitan - sha256 "a70d1a1a379c4813f57c32284f13348e36302a61d0c933c2a4fb19342c43be1f" => :yosemite - sha256 "43053bea923c17bd7a31532cdcaedfcb3681a04aa1b0b66e33defc41c7e00629" => :mavericks - sha256 "bffd0a1ea0cb5ce1eb39c4147686702f060dd25e949385009946835be9826b8d" => :mountain_lion - end - - def install - system "make" - bin.install %w[mp3cat mp3log mp3log-conf mp3dirclean mp3http mp3stream-conf] - end - - test do - pipe_output("#{bin}/mp3cat -v --noclean - -", test_fixtures("test.mp3")) - end -end diff --git a/Formula/mp3check.rb b/Formula/mp3check.rb deleted file mode 100644 index 0cd528b59f959..0000000000000 --- a/Formula/mp3check.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mp3check < Formula - desc "Tool to check mp3 files for consistency" - homepage "https://code.google.com/archive/p/mp3check/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp3check/mp3check-0.8.7.tgz" - sha256 "27d976ad8495671e9b9ce3c02e70cb834d962b6fdf1a7d437bb0e85454acdd0e" - - bottle do - cellar :any_skip_relocation - sha256 "e19a17b2360f7a7974fe798cc68a12735155b14c68bb8c0d7a13439dd3fa5a29" => :mojave - sha256 "99c5e5b8458a0cda5f50d92d858ccbd968f059a3b639130a3378c499331e427e" => :high_sierra - sha256 "2846b7bd6201b58c40ce9b6193a929c5404fcbe77e97854876e53bba5c9d0d82" => :sierra - sha256 "d63ba27cfd87cf1f8b1871fe8b0531882c037f116933cbc59caf429dfeaab735" => :el_capitan - sha256 "5fd629e626c6227789c894f1fcf32e076118fd4fe9136e974610ef42135a4ddf" => :yosemite - sha256 "ef678ca85ee3272b05e442ae13f319a1ab2868bc6ff9aa3cc84ae3bca0f98ad5" => :mavericks - end - - def install - ENV.deparallelize - # The makefile's install target is kinda iffy, but there's - # only one file to install so it's easier to do it ourselves - system "make" - bin.install "mp3check" - end - - test do - assert version.to_s, shell_output("#{bin}/mp3check --version") - end -end diff --git a/Formula/mp3fs.rb b/Formula/mp3fs.rb deleted file mode 100644 index 6456a7613a4d7..0000000000000 --- a/Formula/mp3fs.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mp3fs < Formula - desc "Read-only FUSE file system: transcodes audio formats to MP3" - homepage "https://khenriks.github.io/mp3fs/" - url "https://github.com/khenriks/mp3fs/releases/download/v0.91/mp3fs-0.91.tar.gz" - sha256 "a47b5e351b7660e6f535a3c5b489c5a8191209957f8c0b8d066a5c221e8ecf92" - - bottle do - cellar :any - sha256 "60af0fb41555221a11fcb9cce24afccd6f42e1427f51d9d6d832e713624cc09f" => :mojave - sha256 "7eec592abb48a4e5acb0b77ba4138b0e2ce8c01817dadf9ace35cdbbcfdd5ea5" => :high_sierra - sha256 "e711d5da3c4c5f838911938bf5a5e8b754ffacae41c8824caa1ea0576d194718" => :sierra - sha256 "ac57948842d987524def18895ffe171aaf036e4503315c64eb5152003f67027b" => :el_capitan - sha256 "a1f89f74c8de87c9559fe1dc2f26ec0af5ee5d9d60d1f8962f6eaa1af243f25b" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "lame" - depends_on "libid3tag" - depends_on :osxfuse - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /mp3fs version: #{Regexp.escape(version)}/, - shell_output("#{bin}/mp3fs -V") - end -end diff --git a/Formula/mp3gain.rb b/Formula/mp3gain.rb deleted file mode 100644 index d93ce807a30e9..0000000000000 --- a/Formula/mp3gain.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mp3gain < Formula - desc "Lossless mp3 normalizer with statistical analysis" - homepage "https://mp3gain.sourceforge.io" - url "https://downloads.sourceforge.net/project/mp3gain/mp3gain/1.6.2/mp3gain-1_6_2-src.zip" - version "1.6.2" - sha256 "5cc04732ef32850d5878b28fbd8b85798d979a025990654aceeaa379bcc9596d" - - bottle do - cellar :any - sha256 "6db408b86b074e8713476fa60ea252ad3f4213dbf63cdca3342ffe989bd372d5" => :mojave - sha256 "5aa37ac4ab2013f5365da14969494111500337cae3c6d7614b72dfb9e94352f2" => :high_sierra - sha256 "66684a469ee1de432a00f1264c89b3921d3558854fa736b24a3942e351617c47" => :sierra - sha256 "4c97894216600ba8ac03094a45fe68a7d107f69adbcd638d40c967ad10e95480" => :el_capitan - end - - depends_on "mpg123" - - def install - system "make" - bin.install "mp3gain" - end - - test do - system "#{bin}/mp3gain", "-v" - end -end diff --git a/Formula/mp3info.rb b/Formula/mp3info.rb deleted file mode 100644 index a7bef67a37466..0000000000000 --- a/Formula/mp3info.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mp3info < Formula - desc "MP3 technical info viewer and ID3 1.x tag editor" - homepage "https://www.ibiblio.org/mp3info/" - url "https://www.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-0.8.5a.tgz" - sha256 "0438ac68e9f04947fb14ca5573d27c62454cb9db3a93b7f1d2c226cd3e0b4e10" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "74e04cc5b66e44632a9f3187f2360eba1f1f13ea153f7c6e4e0b4e466f58f084" => :mojave - sha256 "9b966553a2ed76afb888577cad6ae8f359cde30e445bb0742a87ff2c5d5dfa85" => :high_sierra - sha256 "dd9e2ab142307a9587ca28f8ca574cf3115f380f2692f1eb1e38e24d4e5a1008" => :sierra - sha256 "30c85d8b2afd6e6ad03e473de3bd83ef9c6c607b979570798cfc778ad887b902" => :el_capitan - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/bedf6f8/mp3info/patch-mp3tech.c.diff" - sha256 "846d6f85a3fa22908c6104436e774fc109547f7c6e9788c15dd9e602228b7892" - end - - def install - system "make", "mp3info", "doc" - bin.install "mp3info" - man1.install "mp3info.1" - end - - test do - system bin/"mp3info", "-x", test_fixtures("test.mp3") - end -end diff --git a/Formula/mp3splt.rb b/Formula/mp3splt.rb deleted file mode 100644 index 3f947a21ecfe9..0000000000000 --- a/Formula/mp3splt.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Mp3splt < Formula - desc "Command-line interface to split MP3 and Ogg Vorbis files" - homepage "https://mp3splt.sourceforge.io" - url "https://downloads.sourceforge.net/project/mp3splt/mp3splt/2.6.2/mp3splt-2.6.2.tar.gz" - sha256 "3ec32b10ddd8bb11af987b8cd1c76382c48d265d0ffda53041d9aceb1f103baa" - - bottle do - sha256 "9ab7a7f86c461a9e62582a1cee6a598f99ebea011183a1aa765df5453042aabd" => :mojave - sha256 "a5092d6dcce0af01d4a8194b29180b952350b4ddc3eaf15bfa87441280024c2b" => :high_sierra - sha256 "0a7e1ba09731532a013aa745232b345844876c3b707f91a359a0a4d5b2fe8773" => :sierra - sha256 "224f3690f93662a948b257c0129244fcb5f5127647efa31b63cc6d84b2c4bda9" => :el_capitan - sha256 "d30a89754b5e57a5fd0fff9f794e14ddd920d8f1169158d166e8cd427f85dcd1" => :yosemite - sha256 "d928c6cc582737877a1e6a1e074f1d9577595eac6ac4a0b52f533141f0e2c4af" => :mavericks - sha256 "acc0022ebbe437c18d4f3dfca1805a459081288f437101e1cd329a31ca81e522" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "libmp3splt" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/mp3splt", "-t", "0.1", test_fixtures("test.mp3") - end -end diff --git a/Formula/mp3unicode.rb b/Formula/mp3unicode.rb deleted file mode 100644 index 5aeb71704bf31..0000000000000 --- a/Formula/mp3unicode.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Mp3unicode < Formula - desc "Command-line utility to convert mp3 tags between different encodings" - homepage "https://mp3unicode.sourceforge.io/" - url "https://github.com/downloads/alonbl/mp3unicode/mp3unicode-1.2.1.tar.bz2" - sha256 "375b432ce784407e74fceb055d115bf83b1bd04a83b95256171e1a36e00cfe07" - - bottle do - cellar :any - sha256 "b0b4f5e1d3bcee44c469cd1948f173175b0826569503bad26d027f10a1ebb92e" => :mojave - sha256 "5d288104d6bf3c0bdce26b509f29b49adba281ebcf1eb713a578298cec4b1305" => :high_sierra - sha256 "4d8a82928bc851fc314a6c8f57a3897d6f75df65aad84e79b451783d217ebd1d" => :sierra - sha256 "e9db3c9529d5358f83bb67d5966c6b508851f27a3bc61d5212b674d620a03a7e" => :el_capitan - sha256 "56c77d872d7adda53f68661145a5b372ecf64ef0284181a7ecd9b56997f14c74" => :yosemite - sha256 "10d647d04714f9e95d9bf3ab8dfd023fea3f22876dfe055c01211e527a2facd3" => :mavericks - end - - head do - url "https://github.com/alonbl/mp3unicode.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "taglib" - - def install - ENV.append "ICONV_LIBS", "-liconv" - - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/mp3unicode", "-s", "ASCII", "-w", test_fixtures("test.mp3") - end -end diff --git a/Formula/mp3val.rb b/Formula/mp3val.rb deleted file mode 100644 index 4bdbfc7387bac..0000000000000 --- a/Formula/mp3val.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mp3val < Formula - desc "Program for MPEG audio stream validation" - homepage "https://mp3val.sourceforge.io/" - url "https://downloads.sourceforge.net/mp3val/mp3val-0.1.8-src.tar.gz" - sha256 "95a16efe3c352bb31d23d68ee5cb8bb8ebd9868d3dcf0d84c96864f80c31c39f" - - bottle do - cellar :any_skip_relocation - sha256 "4ca5fe184a5427aea0df6910d654955c162268f803c1c372d11dd2305ad67513" => :mojave - sha256 "f17a5c03d59e7665d2b85db559561a3375ff03a6e02911514a0adde35e188a06" => :high_sierra - sha256 "649cf78ba7bc387f346a6685b8c83bec495a5e75ea0fa6d93135cc36ec898f5f" => :sierra - sha256 "d13a9b31c885d1704a0cc5e1ff6b995acd616248abcf5276fc068b78f7be785f" => :el_capitan - sha256 "298b6b2835de5f1aa3cef2f9435da3935ffbcfa49468511676661e8eaff8ca70" => :yosemite - sha256 "0828eb9f4e02af5014e1b8d82be9ad54797b0de6a299b05a1ef0daa86bc5dbe2" => :mavericks - sha256 "d90878cb83b0154dabc0cc03e61c3c972dec3ca66b63272716299f3b6dd791f7" => :mountain_lion - end - - def install - system "gnumake", "-f", "Makefile.gcc" - bin.install "mp3val.exe" => "mp3val" - end - - test do - mp3 = test_fixtures("test.mp3") - assert_match(/Done!$/, shell_output("#{bin}/mp3val -f #{mp3}")) - end -end diff --git a/Formula/mp3wrap.rb b/Formula/mp3wrap.rb deleted file mode 100644 index d405276a05f55..0000000000000 --- a/Formula/mp3wrap.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mp3wrap < Formula - desc "Wrap two or more mp3 files in a single large file" - homepage "https://mp3wrap.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mp3wrap/mp3wrap/mp3wrap%200.5/mp3wrap-0.5-src.tar.gz" - sha256 "1b4644f6b7099dcab88b08521d59d6f730fa211b5faf1f88bd03bf61fedc04e7" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "ef3c37644b60e3644b2763a999ab189ceffe59d0506617db2d23cb3f3b430056" => :mojave - sha256 "3c85e837e2dbcfcbbccb0b074ebfa9283c13d2453b206c246bc4d77600328dfb" => :high_sierra - sha256 "0471701ab4f6b59423503b7c250376ba597a9f28d9962f6f9b35a107d58411ab" => :sierra - sha256 "c65886799c1397eec33f48ef73774ad6a509fec44a18dec4a50c8755736f040a" => :el_capitan - sha256 "50e1b97fa8423acc0c3980c7171544cf248b049d31cb1c6d3ba1214c293bc2eb" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - source = test_fixtures("test.mp3") - system "#{bin}/mp3wrap", "#{testpath}/t.mp3", source, source - assert_predicate testpath/"t_MP3WRAP.mp3", :exist? - end -end diff --git a/Formula/mp4v2.rb b/Formula/mp4v2.rb deleted file mode 100644 index f3b12fcd839dc..0000000000000 --- a/Formula/mp4v2.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Mp4v2 < Formula - desc "Read, create, and modify MP4 files" - homepage "https://code.google.com/archive/p/mp4v2/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp4v2/mp4v2-2.0.0.tar.bz2" - sha256 "0319b9a60b667cf10ee0ec7505eb7bdc0a2e21ca7a93db96ec5bd758e3428338" - - bottle do - cellar :any - rebuild 1 - sha256 "bd4c8e435216cbfc4ed60030e1cd4135156643f8befa1477061c1e59292394bb" => :mojave - sha256 "359eecfb160a0d31975961933b50c7ba512891aedd053e3e9153edba1da364c3" => :high_sierra - sha256 "6cab2b32c845f6d54cdb8d64c558126cec39c27fb77a92f204bb8abda1c0ccfa" => :sierra - sha256 "52d299e61126db288d73a3e6e8b40c3eff25af1c7498c4a74787dce2dda02e9a" => :el_capitan - sha256 "14ca4b71690959d461d41b4338be70005de4553566996677f973094c1a56c3fb" => :yosemite - sha256 "bb51275338ca5b157b303fb9d024922c9b73ddcac69973ba2fe9d880ad6dc914" => :mavericks - sha256 "ec42cf726369e5f6c3a4956cffbf44ab8d4b74f5bec35892a0c041641c2f4d4c" => :mountain_lion - end - - conflicts_with "bento4", - :because => "both install `mp4extract` and `mp4info` binaries" - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make" - system "make", "install" - system "make", "install-man" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mp4art --version") - end -end diff --git a/Formula/mpack.rb b/Formula/mpack.rb deleted file mode 100644 index a9fb284cddc3e..0000000000000 --- a/Formula/mpack.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Mpack < Formula - desc "MIME mail packing and unpacking" - homepage "http://ftp.andrew.cmu.edu/pub/mpack/" - url "http://ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz" - sha256 "274108bb3a39982a4efc14fb3a65298e66c8e71367c3dabf49338162d207a94c" - - bottle do - cellar :any_skip_relocation - sha256 "edbef02feb0f06f807c864f872cf7f5ac42bbf65a40249e92a3e990f5c1bfa4e" => :mojave - sha256 "3010b6b97b6388a250e18278f1ec45b27244898876856d53e776b75ecd0c6bf3" => :high_sierra - sha256 "4dac8e937f170ddcae76e90143e7b1a6b0bd66e730d683ab83693d55dd670f2b" => :sierra - sha256 "f0f9bd526ff3c7e8a1abea377e3716fee96916c0c54234d96b46a475b50b8c1e" => :el_capitan - sha256 "f5455f95c52ffc59181037ea3fd8151006178dfd6abb9674be65b2996f876766" => :yosemite - sha256 "9090f5b1263e27adfdd359ee1a052a71edb681d4305cfd921488b1533f8bfcf8" => :mavericks - end - - # Fix missing return value; clang refuses to compile otherwise - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/1ad38a9c/mpack/uudecode.c.patch" - sha256 "52ad1592ee4b137cde6ddb3c26e3541fa0dcea55c53ae8b37546cd566c897a43" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/mpage.rb b/Formula/mpage.rb deleted file mode 100644 index f32113ae93707..0000000000000 --- a/Formula/mpage.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mpage < Formula - desc "Many to one page printing utility" - homepage "https://mesa.nl/pub/mpage/README" - url "https://mesa.nl/pub/mpage/mpage-2.5.7.tgz" - sha256 "51ab9c4e5fdd37e03c90df6756f30c0b61a34f066cb625f8924feedc4b3ec3fe" - - bottle do - sha256 "aba18c308b7607332d0e3d9ab0f02fd44b1bdf1f9a4dbd4baee828261172fc2e" => :mojave - sha256 "fb22af4c695ec3b6e27980a8b180bf4a7904b81ce5ff51f46f0d5ccdc5da8d07" => :high_sierra - sha256 "2d020c69ee688a3a2d82f5f2c531a9f7abaf3923f0024e3b5eb2f1466992d7c1" => :sierra - sha256 "4b899cd8a7280c7317513a51f6b3227f88c6324c39712530341b9d108d829ee5" => :el_capitan - end - - def install - args = %W[ - MANDIR=#{man1} - PREFIX=#{prefix} - ] - system "make", *args - system "make", "install", *args - end - - test do - (testpath/"input.txt").write("Input text") - system bin/"mpage", "input.txt" - end -end diff --git a/Formula/mpc.rb b/Formula/mpc.rb deleted file mode 100644 index bb5293d122059..0000000000000 --- a/Formula/mpc.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mpc < Formula - desc "Command-line music player client for mpd" - homepage "https://www.musicpd.org/clients/mpc/" - url "https://www.musicpd.org/download/mpc/0/mpc-0.31.tar.xz" - sha256 "62373e83a8a165b2ed43967975efecd3feee530f4557d6b861dd08aa89d52b2d" - - bottle do - sha256 "a0978aee21d1d4326cac85904ad4dc381ffd0fae96c66b98912ecd5260b548a4" => :mojave - sha256 "70bf0925e52814689cc58579288dafbefcd512caf3e4bcaa48f78d6c84fd7f36" => :high_sierra - sha256 "34dc577f9ac9551204d7c36448468da5a69c152b2de21622fc5e649c051a98de" => :sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "libmpdclient" - - def install - system "meson", "--prefix=#{prefix}", ".", "output" - system "ninja", "-C", "output" - system "ninja", "-C", "output", "install" - - bash_completion.install "contrib/mpc-completion.bash" => "mpc" - rm share/"doc/mpc/contrib/mpc-completion.bash" - end - - test do - assert_match "query", shell_output("#{bin}/mpc list 2>&1", 1) - assert_match "-F _mpc", shell_output("source #{bash_completion}/mpc && complete -p mpc") - end -end diff --git a/Formula/mpck.rb b/Formula/mpck.rb deleted file mode 100644 index 34a6b0dde63e2..0000000000000 --- a/Formula/mpck.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mpck < Formula - desc "Check MP3 files for errors" - homepage "http://checkmate.gissen.nl/" - url "http://checkmate.gissen.nl/checkmate-0.19.tar.gz" - sha256 "940f95d445bab629051930ef61c5614bdfbe9df6f450f1ffab86eaf885e79195" - - bottle do - cellar :any_skip_relocation - sha256 "967795ec22c59a0154c76daaad88a601d425d4304fba6aca0336bb4c5d796b53" => :mojave - sha256 "10a102462923d52990581c999b2645727071500968a02af4c79427a20d1e0ad7" => :high_sierra - sha256 "fbdc8fda90c022cff2e3289b13926c503f83198b3c04abacc8ee5c310bbe7dda" => :sierra - sha256 "06b69481ecd910bf2c1daff65dd7d952a8759dd90e3d76f646f82ac79812d216" => :el_capitan - sha256 "e158ae142375591d361c6204ccc08072a29b52cee927726f9c30b063b51a0664" => :yosemite - sha256 "fcbf3745544824e2569004626c6a307800ef55aa2fcd667d278eaa5c34340452" => :mavericks - sha256 "09d7c03fdd0149b7efc7ecd36dab1e38de7af870484ad676d11e0ca78c7543ea" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/mpck", test_fixtures("test.mp3") - end -end diff --git a/Formula/mpd.rb b/Formula/mpd.rb deleted file mode 100644 index 46023626caf79..0000000000000 --- a/Formula/mpd.rb +++ /dev/null @@ -1,124 +0,0 @@ -class Mpd < Formula - desc "Music Player Daemon" - homepage "https://www.musicpd.org/" - url "https://www.musicpd.org/download/mpd/0.21/mpd-0.21.3.tar.xz" - sha256 "6cf60e644870c6063a008d833a6c876272b7679a400b83012ed209c15ce06e2a" - revision 1 - head "https://github.com/MusicPlayerDaemon/MPD.git" - - bottle do - sha256 "0e8b637524e77052e1b8b35ded89033cfa5ea351509474804296506c32d2cbd3" => :mojave - sha256 "ec55a408fc1f1c8a90df41488c782eb77e53db92b4766632e008905f12e3decc" => :high_sierra - sha256 "9fe5ee4e9126630e02600df8e1a4eb6cebef72bda40ba5cacf0cb452b19bc434" => :sierra - end - - depends_on "boost" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "expat" - depends_on "faad2" - depends_on "ffmpeg" - depends_on "flac" - depends_on "fluid-synth" - depends_on "glib" - depends_on "icu4c" - depends_on "lame" - depends_on "libao" - depends_on "libid3tag" - depends_on "libmpdclient" - depends_on "libsamplerate" - depends_on "libupnp" - depends_on "libvorbis" - depends_on "opus" - depends_on "sqlite" - - needs :cxx11 - - def install - # mpd specifies -std=gnu++0x, but clang appears to try to build - # that against libstdc++ anyway, which won't work. - # The build is fine with G++. - ENV.libcxx - - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc} - -Dlibwrap=disabled - -Dmad=disabled - -Dmpcdec=disabled - -Dsoundcloud=disabled - -Dao=enabled - -Dbzip2=enabled - -Dexpat=enabled - -Dffmpeg=enabled - -Dfluidsynth=enabled - -Dupnp=enabled - -Dvorbisenc=enabled - ] - - system "meson", *args, "output/release", "." - system "ninja", "-C", "output/release" - ENV.deparallelize # Directories are created in parallel, so let's not do that - system "ninja", "-C", "output/release", "install" - - (etc/"mpd").install "doc/mpdconf.example" => "mpd.conf" - end - - def caveats; <<~EOS - MPD requires a config file to start. - Please copy it from #{etc}/mpd/mpd.conf into one of these paths: - - ~/.mpd/mpd.conf - - ~/.mpdconf - and tailor it to your needs. - EOS - end - - plist_options :manual => "mpd" - - def plist; <<~EOS - - - - - Label - #{plist_name} - WorkingDirectory - #{HOMEBREW_PREFIX} - ProgramArguments - - #{opt_bin}/mpd - --no-daemon - - RunAtLoad - - KeepAlive - - ProcessType - Interactive - - - EOS - end - - test do - pid = fork do - exec "#{bin}/mpd --stdout --no-daemon --no-config" - end - sleep 2 - - begin - ohai "Connect to MPD command (localhost:6600)" - TCPSocket.open("localhost", 6600) do |sock| - assert_match "OK MPD", sock.gets - ohai "Ping server" - sock.puts("ping") - assert_match "OK", sock.gets - sock.close - end - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/mpdas.rb b/Formula/mpdas.rb deleted file mode 100644 index 9165d2650317e..0000000000000 --- a/Formula/mpdas.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mpdas < Formula - desc "C++ client to submit tracks to audioscrobbler" - homepage "https://www.50hz.ws/mpdas/" - url "https://www.50hz.ws/mpdas/mpdas-0.4.5.tar.gz" - sha256 "c9103d7b897e76cd11a669e1c062d74cb73574efc7ba87de3b04304464e8a9ca" - head "https://github.com/hrkfdn/mpdas.git" - - bottle do - sha256 "448514d6ac177e771f61bcd178550e317560cf3d5d73bfd240c3278d8d3f5193" => :mojave - sha256 "ae319b22981a8cc5ed9a0e0212f2ecdbd7660bcd32182334865a01ac69c2832f" => :high_sierra - sha256 "06fe51aaa95bfd3000f1f9e562709d266ecbf1880d2b96779ff0c9b9d82dea20" => :sierra - sha256 "c9261f50d1d71969474203f6431d7902198c3524d828ed6f690733094444a914" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libmpdclient" - - def install - system "make", "PREFIX=#{prefix}", "MANPREFIX=#{man1}", "CONFIG=#{etc}", "install" - etc.install "mpdasrc.example" - end - - test do - system bin/"mpdas", "-v" - end -end diff --git a/Formula/mpdscribble.rb b/Formula/mpdscribble.rb deleted file mode 100644 index b45359b9e1ef0..0000000000000 --- a/Formula/mpdscribble.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Mpdscribble < Formula - desc "Last.fm reporting client for mpd" - homepage "https://mpd.wikia.com/wiki/Client:Mpdscribble" - url "https://www.musicpd.org/download/mpdscribble/0.22/mpdscribble-0.22.tar.gz" - sha256 "ff882d02bd830bdcbccfe3c3c9b0d32f4f98d9becdb68dc3135f7480465f1e38" - revision 1 - - bottle do - sha256 "306e807a9e6169f58968af9f7d6067a03ec632ffe5267150f940fa628e28dfba" => :mojave - sha256 "0bb89c4d9cac0bd82f40cc7c7907fa150efb1de05ab7da21e7c7d70a6ebb8602" => :high_sierra - sha256 "0e487444754917082060745ab958e70b1718ea7d1bdd24bc52dbd9823060c114" => :sierra - sha256 "3dee2dae7ae29bb1a92db5af951740801be7d7204ac6addad6016e8ec07e9fda" => :el_capitan - sha256 "93d9066107f752b0c18910c5aac8f6f86beaa03cba627fffd6337dda44cf16f9" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libmpdclient" - - def install - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" - system "make", "install" - end - - def caveats; <<~EOS - The configuration file was placed in #{etc}/mpdscribble.conf - EOS - end - - plist_options :manual => "mpdscribble" - - def plist; <<~EOS - - - - - Label - #{plist_name} - WorkingDirectory - #{HOMEBREW_PREFIX} - ProgramArguments - - #{opt_bin}/mpdscribble - --no-daemon - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - system "#{bin}/mpdscribble", "--version" - end -end diff --git a/Formula/mpdviz.rb b/Formula/mpdviz.rb deleted file mode 100644 index 70f7194ed770a..0000000000000 --- a/Formula/mpdviz.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "language/go" - -class Mpdviz < Formula - desc "Standalone console MPD visualizer" - homepage "https://github.com/lucy/mpdviz" - url "https://github.com/lucy/mpdviz/archive/0.4.6.tar.gz" - sha256 "c34243ec3f3d91adbc36d608d5ba7082ff78870f2fd76a6650d5fb3218cc2ba3" - - bottle do - sha256 "7bec2924c89ed7553aff5a5c8c0d1fe611024f8533fbb0f257ce244a262aec24" => :mojave - sha256 "f05e8482d844ded6507acbc60440add0e9cffb93060e4c57d0735e20493fc8a1" => :high_sierra - sha256 "f76523028928595c731469cfaecbf2ab9201a90290d7c21e176b2cfc4560956d" => :sierra - sha256 "9ba7f88de1dec1c4c6d4bdbb2f45541d43ae56c5039b2193c92186202a74322c" => :el_capitan - sha256 "a3ccae36bb636ebe51ef1c3f70bf582d1ca55053639c58aaefb7e48672191dcf" => :yosemite - sha256 "063b1d5a369b91869c21ae8aa5dbfa96cd1e9b3c4d5091fc573c965e1b253493" => :mavericks - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "fftw" - - go_resource "github.com/lucy/go-fftw" do - url "https://github.com/lucy/go-fftw.git", - :revision => "37bfa0d3053b133f7067e9524611a7a963294124" - end - - go_resource "github.com/lucy/pflag" do - url "https://github.com/lucy/pflag.git", - :revision => "20db95b725d76759ba16e25ae6ae2ec67bf45216" - end - - go_resource "github.com/lucy/termbox-go" do - url "https://github.com/lucy/termbox-go.git", - :revision => "a09edf97f26bd0a461d4660b5322236ecf9d4397" - end - - go_resource "github.com/mattn/go-runewidth" do - url "https://github.com/mattn/go-runewidth.git", - :revision => "36f63b8223e701c16f36010094fb6e84ffbaf8e0" - end - - def install - ENV["GOPATH"] = buildpath - Language::Go.stage_deps resources, buildpath/"src" - - system "go", "build", "-o", "mpdviz" - bin.install "mpdviz" - end -end diff --git a/Formula/mpegdemux.rb b/Formula/mpegdemux.rb deleted file mode 100644 index d1f6f032867fb..0000000000000 --- a/Formula/mpegdemux.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mpegdemux < Formula - desc "MPEG1/2 system stream demultiplexer" - homepage "http://www.hampa.ch/mpegdemux/" - url "http://www.hampa.ch/mpegdemux/mpegdemux-0.1.4.tar.gz" - sha256 "0067c31398ed08d3a4f62713bbcc6e4a83591290a599c66cdd8f5a3e4c410419" - - bottle do - cellar :any_skip_relocation - sha256 "daa143e087fe5d35e5deda8dd37637b54ba908ba34d050beb0b42b3697b1f67c" => :mojave - sha256 "af6cd127b024079f9584533b143094cbcdb97693007eaffcb6f967942d471712" => :high_sierra - sha256 "2a1bae657b91607e47b201f2d97749def3c771911208db70c278bf4a47f4fd7e" => :sierra - sha256 "4f00eabfededc549d4f419b6e6bf7896dbff0c95e83fda5f47067bf73294289b" => :el_capitan - sha256 "322f5cf622b25ea9e907e1eb8d1f0ce172672ed91a0592d2621019f3b4159947" => :yosemite - sha256 "baa0e3b7dffa4d3017c5639a0e07702b10e8913b87987e3c7235bbfae757fa0e" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/mpegdemux", "--help" - end -end diff --git a/Formula/mpfi.rb b/Formula/mpfi.rb deleted file mode 100644 index f95e3d89f4a8d..0000000000000 --- a/Formula/mpfi.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Mpfi < Formula - desc "Multiple precision interval arithmetic library" - homepage "https://perso.ens-lyon.fr/nathalie.revol/software.html" - url "https://gforge.inria.fr/frs/download.php/file/37331/mpfi-1.5.3.tar.bz2" - sha256 "2383d457b208c6cd3cf2e66b69c4ce47477b2a0db31fbec0cd4b1ebaa247192f" - - bottle do - cellar :any - sha256 "4909b40d8a9d03a12550ce84ddf60a031898505f43446ba16316b352df8a1faf" => :mojave - sha256 "cf0a5912aafe1a39c596d9303f12361e403f96bd52c25db6aaee1dd9a6139360" => :high_sierra - sha256 "81e48e4445dbe6e7fa4ede18ba9c5a7a75c8816d3b0268333d4535afa4b5e7cd" => :sierra - sha256 "9345063d6fdde9da2d16c233251300aa563668ab17675dd2dc11e4c75de88fb4" => :el_capitan - end - - depends_on "gmp" - depends_on "mpfr" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - mpfi_t x; - mpfi_init(x); - mpfi_clear(x); - return 0; - } - EOS - system ENV.cc, "test.c", "-lgmp", "-lmpfr", "-L#{lib}", "-lmpfi", - "-o", "test" - system "./test" - end -end diff --git a/Formula/mpfr.rb b/Formula/mpfr.rb deleted file mode 100644 index 350491634a77d..0000000000000 --- a/Formula/mpfr.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Mpfr < Formula - desc "C library for multiple-precision floating-point computations" - homepage "https://www.mpfr.org/" - url "https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.1.tar.xz" - mirror "https://ftpmirror.gnu.org/mpfr/mpfr-4.0.1.tar.xz" - sha256 "67874a60826303ee2fb6affc6dc0ddd3e749e9bfcb4c8655e3953d0458a6e16e" - - bottle do - cellar :any - sha256 "a51f47143ac39b4e9073946b08e846adf2509a4447555aa4c9dceea363d8e429" => :mojave - sha256 "223ac973eb796b275cf751111c458dc1466f82f302e96ca764ea091309d1a963" => :high_sierra - sha256 "a29b4585cb97715cdab177ea586b3fbee2c578248b115e3b86505724f2b0fc76" => :sierra - sha256 "33b9a9b53120eae11bf2d241d0285f1bb0410ff133d2ecc1d4df07846da93018" => :el_capitan - end - - depends_on "gmp" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", - "--disable-silent-rules" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main() { - mpfr_t x, y; - mpfr_inits2 (256, x, y, NULL); - mpfr_set_ui (x, 2, MPFR_RNDN); - mpfr_root (y, x, 2, MPFR_RNDN); - mpfr_pow_si (x, y, 4, MPFR_RNDN); - mpfr_add_si (y, x, -4, MPFR_RNDN); - mpfr_abs (y, y, MPFR_RNDN); - if (fabs(mpfr_get_d (y, MPFR_RNDN)) > 1.e-30) abort(); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-L#{Formula["gmp"].opt_lib}", - "-lgmp", "-lmpfr", "-o", "test" - system "./test" - end -end diff --git a/Formula/mpg123.rb b/Formula/mpg123.rb deleted file mode 100644 index 0e2d367af3847..0000000000000 --- a/Formula/mpg123.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mpg123 < Formula - desc "MP3 player for Linux and UNIX" - homepage "https://www.mpg123.de/" - url "https://downloads.sourceforge.net/project/mpg123/mpg123/1.25.10/mpg123-1.25.10.tar.bz2" - sha256 "6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023" - - bottle do - sha256 "293d4702bee5702d5b75983d2537ea55fcc751f95b19883f69ad1aa105062fe4" => :mojave - sha256 "ddcbdf62b3ddf3ad7d1b73f76aca1c51c4ba7bc85484b0d04050dfe7bb3f8a68" => :high_sierra - sha256 "86afb9e31472b3b4b432bbad04b8e88d7f60b7a35c14208a4c0313ef4beb7b97" => :sierra - sha256 "079e45cffa682e9cbdc42a51a4d7362e28246311e9f6268e246d255b3dfc0cc9" => :el_capitan - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --with-default-audio=coreaudio - --with-module-suffix=.so - --with-cpu=x86-64 - ] - system "./configure", *args - system "make", "install" - end - - test do - system bin/"mpg123", "--test", test_fixtures("test.mp3") - end -end diff --git a/Formula/mpg321.rb b/Formula/mpg321.rb deleted file mode 100644 index 2caf82d8c5b88..0000000000000 --- a/Formula/mpg321.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Mpg321 < Formula - desc "Command-line MP3 player" - homepage "https://mpg321.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mpg321/mpg321/0.3.2/mpg321_0.3.2.orig.tar.gz" - sha256 "056fcc03e3f5c5021ec74bb5053d32c4a3b89b4086478dcf81adae650eac284e" - - bottle do - sha256 "d587b58200397ad4e8f7fa8c861e01c2c5e344d89a235e78d22fb7bd5ddf04f2" => :mojave - sha256 "6a8f8f58c8bf02f99e8206a231fce4e9f2bd7333b888581dd1838246983d139f" => :high_sierra - sha256 "a69f242f57e4211f96fa56f10573777204d5ed7d61cd7b35a04e0bbd33b9064e" => :sierra - sha256 "6c8921b0703d2952b6038ce7097957c3c2bfe9b59c2d41b5caddc268e96b245d" => :el_capitan - sha256 "48b9ac480d966fc344c4867f3dcef7cd59be1440b11fe7d8280d51134a881f78" => :yosemite - sha256 "bf86f590672fdb27f6fc92c706db1bfcb2ca0a1e35129c5435821640a11a422f" => :mavericks - end - - depends_on "libao" - depends_on "libid3tag" - depends_on "mad" - - # 1. Apple defines semun already. Skip redefining it to fix build errors. - # This is a homemade patch fashioned using deduction. - # 2. Also a couple of IPV6 values are not defined on OSX that are needed. - # This patch was seen in the wild for an app called lscube: - # http://lscube.org/pipermail/lscube-commits/2009-March/000500.html - # Both patches have been reported upstream here: - # https://sourceforge.net/p/mpg321/patches/20/ - # Remove these at: Unknown. These have not been merged as of 0.3.2. - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--prefix=#{prefix}", - "--disable-mpg123-symlink", - "--enable-ipv6", - "--disable-alsa" - system "make", "install" - end - - test do - system "#{bin}/mpg321", "--version" - end -end - -__END__ ---- a/mpg321.h 2012-03-25 05:27:49.000000000 -0700 -+++ b/mpg321.h 2012-11-15 20:54:28.000000000 -0800 -@@ -290,7 +290,7 @@ - /* Shared total decoded frames */ - decoded_frames *Decoded_Frames; - --#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) -+#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) || defined(__APPLE__) - /* */ - #else - union semun { ---- a/network.c 2012-03-25 05:27:49.000000000 -0700 -+++ b/network.c 2012-11-15 20:58:02.000000000 -0800 -@@ -50,6 +50,13 @@ - - #define IFVERB if(options.opt & MPG321_VERBOSE_PLAY) - -+/* The following defines are needed to emulate the Linux interface on -+ * BSD-based systems like FreeBSD and OS X */ -+#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP) -+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -+#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP -+#endif -+ - int proxy_enable = 0; - char *proxy_server; - int auth_enable = 0; diff --git a/Formula/mpgtx.rb b/Formula/mpgtx.rb deleted file mode 100644 index 734c33432a42b..0000000000000 --- a/Formula/mpgtx.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mpgtx < Formula - desc "Toolbox to manipulate MPEG files" - homepage "https://mpgtx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mpgtx/mpgtx/1.3.1/mpgtx-1.3.1.tar.gz" - sha256 "8815e73e98b862f12ba1ef5eaaf49407cf211c1f668c5ee325bf04af27f8e377" - - bottle do - cellar :any_skip_relocation - sha256 "40240b442f8d3c41f89a38da8055cbf30fc10a4ea8b4dd469903d19c424851ce" => :mojave - sha256 "6a003e12c03f1cc24bd520e1cf153da02729b4d30e7bdffcba5cecf832c19238" => :high_sierra - sha256 "70e1dfed0338fb8b8cda36ca05e05b8cd3fd456782db58408b18bbf2361f09aa" => :sierra - sha256 "566ce06d938b4e3b7886a729d456bd3034325985acbdb5e21355b076d7acccf5" => :el_capitan - sha256 "dbe21236b1f2ae76dca4be4fa259c9dd902d2b109a6f0f0549cc7f6463945d06" => :yosemite - sha256 "a9b32ab7e68133b508d9f919a740ed279567e1b68d3d9a72e0a50013a1029b11" => :mavericks - end - - def install - system "./configure", "--parachute", - "--prefix=#{prefix}", - "--manprefix=#{man}" - # Unset LFLAGS, "-s" causes the linker to crash - system "make", "LFLAGS=" - # Overide BSD incompatible cp flags set in makefile - system "make", "install", "cpflags=RP" - end - - test do - system "#{bin}/mpgtx", "--version" - end -end diff --git a/Formula/mpich.rb b/Formula/mpich.rb deleted file mode 100644 index 0de239c0eba1c..0000000000000 --- a/Formula/mpich.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Mpich < Formula - desc "Implementation of the MPI Message Passing Interface standard" - homepage "https://www.mpich.org/" - url "https://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz" - mirror "https://fossies.org/linux/misc/mpich-3.3.tar.gz" - sha256 "329ee02fe6c3d101b6b30a7b6fb97ddf6e82b28844306771fa9dd8845108fa0b" - - bottle do - sha256 "a777d07fde23048c616a51b84be3052b0b52968d17aa738335f7a22ae7453118" => :mojave - sha256 "b1779ac44ede50991bb32672fd5718e11773143c07da40b3e42e16ee53bd8958" => :high_sierra - sha256 "8da3ec3f75cce8eaec957de09a8b3d3d864937b61a45334a0fe1e1190f38dbcf" => :sierra - end - - head do - url "http://git.mpich.org/mpich.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gcc" # for gfortran - - conflicts_with "open-mpi", :because => "both install MPI compiler wrappers" - - def install - if build.head? - # ensure that the consistent set of autotools built by homebrew is used to - # build MPICH, otherwise very bizarre build errors can occur - ENV["MPICH_AUTOTOOLS_DIR"] = HOMEBREW_PREFIX + "bin" - system "./autogen.sh" - end - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}" - - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"hello.c").write <<~EOS - #include - #include - - int main() - { - int size, rank, nameLen; - char name[MPI_MAX_PROCESSOR_NAME]; - MPI_Init(NULL, NULL); - MPI_Comm_size(MPI_COMM_WORLD, &size); - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Get_processor_name(name, &nameLen); - printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name); - MPI_Finalize(); - return 0; - } - EOS - system "#{bin}/mpicc", "hello.c", "-o", "hello" - system "./hello" - system "#{bin}/mpirun", "-np", "4", "./hello" - - (testpath/"hellof.f90").write <<~EOS - program hello - include 'mpif.h' - integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) - call MPI_INIT(ierror) - call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) - call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) - print*, 'node', rank, ': Hello Fortran world' - call MPI_FINALIZE(ierror) - end - EOS - system "#{bin}/mpif90", "hellof.f90", "-o", "hellof" - system "./hellof" - system "#{bin}/mpirun", "-np", "4", "./hellof" - end -end diff --git a/Formula/mpir.rb b/Formula/mpir.rb deleted file mode 100644 index 1923a237c301b..0000000000000 --- a/Formula/mpir.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Mpir < Formula - desc "Multiple Precision Integers and Rationals (fork of GMP)" - homepage "http://mpir.org/" - url "http://mpir.org/mpir-3.0.0.tar.bz2" - sha256 "52f63459cf3f9478859de29e00357f004050ead70b45913f2c2269d9708675bb" - - bottle do - cellar :any - sha256 "27d15169e20fb4530a6875f7658ab713bbefd5044728edccc20187cf2e36342b" => :mojave - sha256 "5b283d794cac85bbc6524dd2ee29b9e1a82a895b535c4e4231726058e195b7af" => :high_sierra - sha256 "643176aa1607f254fcae6227ebebf3a73e2edbbece37f3c749b240dfd33274f7" => :sierra - sha256 "4a30f968fa364983e3b9cad81e52bd8f6976ed5f479a23efc02ead1a4b1638c1" => :el_capitan - end - - depends_on "yasm" => :build - - def install - args = %W[--disable-silent-rules --prefix=#{prefix} --enable-cxx] - - # Prevent bottles from being optimized for specific CPU model - args << "--build=core2-apple-darwin#{`uname -r`.to_i}" if build.bottle? - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() { - mpz_t i, j, k; - mpz_init_set_str (i, "1a", 16); - mpz_init (j); - mpz_init (k); - mpz_sqrtrem (j, k, i); - if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort(); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmpir", "-o", "test" - system "./test" - end -end diff --git a/Formula/mplayer.rb b/Formula/mplayer.rb deleted file mode 100644 index ca1f424a01cb1..0000000000000 --- a/Formula/mplayer.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Mplayer < Formula - desc "UNIX movie player" - homepage "https://mplayerhq.hu/" - url "https://mplayerhq.hu/MPlayer/releases/MPlayer-1.3.0.tar.xz" - sha256 "3ad0846c92d89ab2e4e6fb83bf991ea677e7aa2ea775845814cbceb608b09843" - - bottle do - sha256 "a58510833836fc243210b2c3be7ea688697fff59e7ae0c57074c8dcb11544981" => :mojave - sha256 "26285311d46556224a46a14367dac8c813c3959712c267d591950ae9fb703f38" => :high_sierra - sha256 "52b4e6e55808d69ff34210337e86359e766c6065da3e43117357d378970cffcf" => :sierra - sha256 "6cee95b050e52a0f09e2807d6feda1f798d3f43166fbad1e3fb2ec5fe2c11f99" => :el_capitan - sha256 "8bb05f0875afca69802634411d8e67af5f42e4461b66c640de3c152e049c7843" => :yosemite - sha256 "d3833fa49709d2857337eebcbd956002f20309cbd676b27070940f84888ebb65" => :mavericks - end - - head do - url "svn://svn.mplayerhq.hu/mplayer/trunk" - - # When building SVN, configure prompts the user to pull FFmpeg from git. - # Don't do that. - patch :DATA - end - - depends_on "yasm" => :build - depends_on "libcaca" => :optional - depends_on "libdvdnav" => :optional - depends_on "pkg-config" => :build if build.with? "libdvdnav" - depends_on "libdvdread" => :optional - - def install - # we disable cdparanoia because homebrew's version is hacked to work on macOS - # and mplayer doesn't expect the hacks we apply. So it chokes. Only relevant - # if you have cdparanoia installed. - # Specify our compiler to stop ffmpeg from defaulting to gcc. - args = %W[ - --cc=#{ENV.cc} - --host-cc=#{ENV.cc} - --disable-cdparanoia - --prefix=#{prefix} - --disable-x11 - ] - - args << "--enable-caca" if build.with? "libcaca" - args << "--enable-dvdnav" if build.with? "libdvdnav" - - if build.with? "libdvdread" - ENV["LDFLAGS"] = "-L#{Formula["libdvdread"].opt_lib} -ldvdread" - args << "--enable-dvdread" - end - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - system "#{bin}/mplayer", "-ao", "null", "/System/Library/Sounds/Glass.aiff" - end -end - -__END__ -diff --git a/configure b/configure -index addc461..3b871aa 100755 ---- a/configure -+++ b/configure -@@ -1517,8 +1517,6 @@ if test -e ffmpeg/mp_auto_pull ; then - fi - - if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then -- echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort" -- read tmp - if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then - rm -rf ffmpeg - echo "Failed to get a FFmpeg checkout" diff --git a/Formula/mplayershell.rb b/Formula/mplayershell.rb deleted file mode 100644 index f8d2cf1b06943..0000000000000 --- a/Formula/mplayershell.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Mplayershell < Formula - desc "Improved visual experience for MPlayer on macOS" - homepage "https://github.com/donmelton/MPlayerShell" - url "https://github.com/donmelton/MPlayerShell/archive/0.9.3.tar.gz" - sha256 "a1751207de9d79d7f6caa563a3ccbf9ea9b3c15a42478ff24f5d1e9ff7d7226a" - head "https://github.com/donmelton/MPlayerShell.git" - - bottle do - cellar :any_skip_relocation - sha256 "1be2bb2a8eccce7fa190b85af6e67fb7fe36393c32a8295852af0e6e390b6ee9" => :mojave - sha256 "c0b558e0508d80fe05a1d9617b7aa1986066c54bc0a3da585631eb406da5eb93" => :high_sierra - sha256 "e9377eaebb65903037105bf3ed6ee301a182452791e9daeaadd08ccb732d9d1b" => :sierra - sha256 "ae4c1c9d069053afa7e71867256b577e23bd0dec87a90ccab2ebeab089a3634b" => :el_capitan - sha256 "1637360e180d7b48367cb7c4f01d03856b9d13247000e4cc33f0af5f6ed92101" => :yosemite - sha256 "a95437813704c56c3e52bd1b17974bec24c209e26df8e9dfe07af45d51ecaf49" => :mavericks - sha256 "0553f3ff5cae0a8938c3dc09e6448621029b52bbbc6c17d53225c1f3e7881ae4" => :mountain_lion - end - - depends_on :xcode => :build - depends_on :macos => :lion - depends_on "mplayer" - - def install - xcodebuild "-project", - "MPlayerShell.xcodeproj", - "-target", "mps", - "-configuration", "Release", - "clean", "build", - "SYMROOT=build", - "DSTROOT=build" - bin.install "build/Release/mps" - man1.install "Source/mps.1" - end - - test do - system "#{bin}/mps" - end -end diff --git a/Formula/mpop.rb b/Formula/mpop.rb deleted file mode 100644 index 07e47a4a6cd42..0000000000000 --- a/Formula/mpop.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mpop < Formula - desc "POP3 client" - homepage "https://marlam.de/mpop/" - url "https://marlam.de/mpop/releases/mpop-1.2.8.tar.xz" - sha256 "16c3794507673bb1e6e8a9231787594155f32e5c68a901368045cf458f6a79ea" - - bottle do - cellar :any - sha256 "b2594cbd367ac7c922b279764df9f51ce8684218cd800509dc1a0c13c35a7b25" => :mojave - sha256 "648cdecc606fd477c7949a81b0c4dd4d83ea4e37fb44fa046562563b29653bcd" => :high_sierra - sha256 "4f059bd22ca42847af9e0a109d1753d50a9dc08dc2241e6efb009d5589919bff" => :sierra - sha256 "4a11baf2addbf2be8122ea578cea50ebacaabb0f5ba60565b5d42c58c9e889b5" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mpop --version") - end -end diff --git a/Formula/mps-youtube.rb b/Formula/mps-youtube.rb deleted file mode 100644 index 3408e1cb45a5a..0000000000000 --- a/Formula/mps-youtube.rb +++ /dev/null @@ -1,45 +0,0 @@ -class MpsYoutube < Formula - include Language::Python::Virtualenv - - desc "Terminal based YouTube player and downloader" - homepage "https://github.com/mps-youtube/mps-youtube" - url "https://github.com/mps-youtube/mps-youtube/archive/v0.2.8.tar.gz" - sha256 "d5f2c4bc1f57f0566242c4a0a721a5ceaa6d6d407f9d6dd29009a714a0abec74" - revision 5 - - bottle do - cellar :any_skip_relocation - sha256 "a6d866b3548a5ae2967dc37d00cae1f00a4cb1336e6848ffa32608886cc745f1" => :mojave - sha256 "1795b8e875beb9bd304c9d442e6f74b7fb3d56ec452d119bfe26ad94604f6947" => :high_sierra - sha256 "710dd03598462b6806d16a848c5bfa2235866df5453b31245d30d68ec0b07255" => :sierra - end - - depends_on "mpv" - depends_on "python" - - resource "pafy" do - url "https://files.pythonhosted.org/packages/41/cb/ec840c79942fb0788982963b61a361ecd10e4e58ad3dcaef4f0e809ce2fe/pafy-0.5.4.tar.gz" - sha256 "e842dc589a339a870b5869cc3802f2e95824edf347f65128223cd5ebdff21024" - end - - resource "youtube_dl" do - url "https://files.pythonhosted.org/packages/6a/e0/68e3701ca58ea54aab4abb018ab9fe76807598d45d46a787a3d3c986ec1c/youtube_dl-2018.11.7.tar.gz" - sha256 "f9b4a65e544b4a2b958ef693cd4b71ab5a5709ab1c7a9fc47c1a967dcca46f4a" - end - - def install - venv = virtualenv_create(libexec, "python3") - - ["youtube_dl", "pafy"].each do |r| - venv.pip_install resource(r) - end - - venv.pip_install_and_link buildpath - end - - test do - Open3.popen3("#{bin}/mpsyt", "/Drop4Drop x Ed Sheeran,", "da 1,", "q") do |_, _, stderr| - assert_empty stderr.read, "Some warnings were raised" - end - end -end diff --git a/Formula/mpssh.rb b/Formula/mpssh.rb deleted file mode 100644 index e9e10e15d3565..0000000000000 --- a/Formula/mpssh.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mpssh < Formula - desc "Mass parallel ssh" - homepage "https://github.com/ndenev/mpssh" - head "https://github.com/ndenev/mpssh.git" - - stable do - url "https://github.com/ndenev/mpssh/archive/1.3.3.tar.gz" - sha256 "510e11c3e177a31c1052c8b4ec06357c147648c86411ac3ed4ac814d0d927f2f" - patch do - # don't install binaries as root (upstream commit) - url "https://github.com/ndenev/mpssh/commit/3cbb868b6fdf8dff9ab86868510c0455ad1ec1b3.diff?full_index=1" - sha256 "c91c3478f05de4b3c200a384ca28449d0c43ad569e8035b3b5247c787f0a984b" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "e37b5e479ba7f9ad86373e646c63485b55dd1381c2cbc130150e108886675b72" => :mojave - sha256 "1057c47b866d50031a23a0bd244d3bc056b9f12a4d9bf0aeebc0ea292c484638" => :high_sierra - sha256 "90d758a0f7accf0b63755c3de8100a880b500e732fc8924123ab2a1c7ce688f8" => :sierra - sha256 "e5ac485861dfca0be2bb1ca2eb5826b5ca5977c0d2abb12dc58de011c18046f1" => :el_capitan - sha256 "2b91c9a9dbae19e99b8b8735bb3292cc056dcf8e06472c0b2d354f64896a4186" => :yosemite - sha256 "60d489a872cb7ed8855c0f95913af4fffe3082b6bee8669b0080c3d30d73249d" => :mavericks - sha256 "a528ce8c03771e3366f5380b18e2a43aba6283e09bb8945234c42dc25116cf41" => :mountain_lion - end - - def install - system "make", "install", "CC=#{ENV.cc}", "BIN=#{bin}" - man1.install "mpssh.1" - end - - test do - system "#{bin}/mpssh" - end -end diff --git a/Formula/mpv.rb b/Formula/mpv.rb deleted file mode 100644 index 06da13b62bedf..0000000000000 --- a/Formula/mpv.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Mpv < Formula - desc "Media player based on MPlayer and mplayer2" - homepage "https://mpv.io" - url "https://github.com/mpv-player/mpv/archive/v0.29.1.tar.gz" - sha256 "f9f9d461d1990f9728660b4ccb0e8cb5dce29ccaa6af567bec481b79291ca623" - revision 1 - head "https://github.com/mpv-player/mpv.git" - - bottle do - sha256 "37957b0d09f6d214501afedf86e4819cc4ef6ae2e14eeca4cc72590c8838cf77" => :mojave - sha256 "581bfc39b0c3d8e91f2f5d2529d4b27d6db854ded5daf3b7fa3f71260034ba1d" => :high_sierra - sha256 "01dd3eb9eef24754c2279b16607bfed281a481c6a0e6af357b63b78a8bf50053" => :sierra - end - - option "with-bundle", "Enable compilation of the .app bundle." - option "with-lgpl", "Build with LGPLv2.1 or later license" - - depends_on "pkg-config" => :build - depends_on "python" => :build - - depends_on "ffmpeg" - depends_on "jpeg" - depends_on "libass" - depends_on "little-cms2" - depends_on "lua@5.1" - depends_on :macos => :mountain_lion - depends_on "mujs" - depends_on "youtube-dl" - - depends_on "jack" => :optional - depends_on "libaacs" => :optional - depends_on "libarchive" => :optional - depends_on "libbluray" => :optional - depends_on "libcaca" => :optional - depends_on "libdvdnav" => :optional - depends_on "libdvdread" => :optional - depends_on "pulseaudio" => :optional - depends_on "rubberband" => :optional - depends_on "uchardet" => :optional - depends_on "vapoursynth" => :optional - depends_on :x11 => :optional - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - def install - # LANG is unset by default on macOS and causes issues when calling getlocale - # or getdefaultlocale in docutils. Force the default c/posix locale since - # that's good enough for building the manpage. - ENV["LC_ALL"] = "C" - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages" - resource("docutils").stage do - system "python3", *Language::Python.setup_install_args(buildpath/"vendor") - end - ENV.prepend_path "PATH", buildpath/"vendor/bin" - - args = %W[ - --prefix=#{prefix} - --enable-html-build - --enable-javascript - --enable-libmpv-shared - --enable-lua - --confdir=#{etc}/mpv - --datadir=#{pkgshare} - --mandir=#{man} - --docdir=#{doc} - ] - args << "--enable-libarchive" if build.with? "libarchive" - args << "--enable-libbluray" if build.with? "libbluray" - args << "--enable-dvdnav" if build.with? "libdvdnav" - args << "--enable-dvdread" if build.with? "libdvdread" - args << "--enable-pulse" if build.with? "pulseaudio" - - if build.with? "lgpl" - args << "--enable-lgpl" - else - args << "--enable-zsh-comp" - args << "--zshdir=#{zsh_completion}" - end - - system "./bootstrap.py" - system "python3", "waf", "configure", *args - system "python3", "waf", "install" - - if build.with? "bundle" - system "python3", "TOOLS/osxbundle.py", "build/mpv" - prefix.install "build/mpv.app" - end - end - - test do - system bin/"mpv", "--ao=null", test_fixtures("test.wav") - end -end diff --git a/Formula/mpw.rb b/Formula/mpw.rb deleted file mode 100644 index 0d8bd690bae90..0000000000000 --- a/Formula/mpw.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Mpw < Formula - desc "Stateless/deterministic password and identity manager" - homepage "https://masterpasswordapp.com/" - url "https://masterpasswordapp.com/mpw-2.6-cli-5-0-g344771db.tar.gz" - version "2.6-cli-5" - sha256 "954c07b1713ecc2b30a07bead9c11e6204dd774ca67b5bdf7d2d6ad1c4eec170" - revision 1 - head "https://github.com/Lyndir/MasterPassword.git" - - bottle do - cellar :any - sha256 "8c63ff8456087dc2476df24055a58dfc6f8eb79f84c611f963ef1964fa13819b" => :mojave - sha256 "46677cf8649983d5b77103d2ca56d9ad3697808ecc406f626a3462a089f932da" => :high_sierra - sha256 "19bf22915b3c534ad3ee6f1dfc20f142d53ae6c0c88757ae2632b7b1daa6667f" => :sierra - sha256 "7090c3d31289d2ac5529bd0a6bae2632a36ba7fcd4bb7974248bb36a15f67c7e" => :el_capitan - end - - depends_on "json-c" - depends_on "libsodium" - depends_on "ncurses" - - def install - cd "platform-independent/cli-c" if build.head? - - ENV["targets"] = "mpw" - ENV["mpw_json"] = "1" - ENV["mpw_color"] = "1" - - system "./build" - system "./mpw-cli-tests" - bin.install "mpw" - end - - test do - assert_equal "Jejr5[RepuSosp", - shell_output("#{bin}/mpw -q -Fnone -u 'Robert Lee Mitchell' -M 'banana colored duckling' -tlong -c1 -a3 'masterpasswordapp.com'").strip - end -end diff --git a/Formula/mr.rb b/Formula/mr.rb deleted file mode 100644 index 55d5cf7e272be..0000000000000 --- a/Formula/mr.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Mr < Formula - desc "Multiple Repository management tool" - homepage "https://myrepos.branchable.com/" - url "git://myrepos.branchable.com/", - :tag => "1.20180726", - :revision => "0ad7a17bb455de1fec3b2375c7aac72ab2a22ac4" - - bottle do - cellar :any_skip_relocation - sha256 "73c8b9b421ea776366f9ded68d90c6c3b75b50401172b5c5248556f6f7f47d6e" => :mojave - sha256 "a41bcee5b050ec9f98cf5960a457421528b05773867d8c8dbb8eb32716e09fd5" => :high_sierra - sha256 "bcac4176692f69d47a83cd961cee92e096f6b35f19cb7206973f77b15a1ba71c" => :sierra - sha256 "75fd9c6fbf6dcf833243e4dc9baf0afe81c422e55d3e251f5cfe040b8bc6a254" => :el_capitan - end - - resource("test-repo") do - url "https://github.com/Homebrew/homebrew-command-not-found.git" - end - - def install - system "make" - bin.install "mr", "webcheckout" - man1.install gzip("mr.1", "webcheckout.1") - pkgshare.install Dir["lib/*"] - end - - test do - resource("test-repo").stage do - system bin/"mr", "register" - assert_match(/^mr status: #{Dir.pwd}$/, shell_output("#{bin}/mr status")) - end - end -end diff --git a/Formula/mrboom.rb b/Formula/mrboom.rb deleted file mode 100644 index 399e2d9bcf266..0000000000000 --- a/Formula/mrboom.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Mrboom < Formula - desc "Eight player Bomberman clone" - homepage "http://mrboom.mumblecore.org/" - url "https://github.com/Javanaise/mrboom-libretro/archive/4.5.tar.gz" - sha256 "3f1c94a9e25b0f7cc3be021513b15ab73580965317671ac413ef9442442ce84e" - - bottle do - cellar :any - sha256 "fc10a261927a560776acad38740577b232f87470dc2a225cd973e9c85ee91a17" => :mojave - sha256 "6b6fc5f88179c60f448e240744d5759410ad986c1bbae54fa180b187d88086ac" => :high_sierra - sha256 "1e0f68ba7b12bc2bb879f99d90ec990c6d493c623a7fc787671e80dd8bac6884" => :sierra - sha256 "d8169f04a040dee4151b850c0bf087146f3401110ac10e7651f2b0986ea6a504" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "libmodplug" - depends_on "minizip" - depends_on "sdl2" - depends_on "sdl2_mixer" - - def install - system "make", "mrboom", "LIBSDL2=1" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - require "pty" - PTY.spawn(bin/"mrboom", "-m") do |r, _w, pid| - begin - sleep 1 - Process.kill "SIGINT", pid - assert_match "monster", r.read - ensure - Process.wait pid - end - end - end -end diff --git a/Formula/mrtg.rb b/Formula/mrtg.rb deleted file mode 100644 index 5f14476be5795..0000000000000 --- a/Formula/mrtg.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Mrtg < Formula - desc "Multi router traffic grapher" - homepage "https://oss.oetiker.ch/mrtg/" - url "https://oss.oetiker.ch/mrtg/pub/mrtg-2.17.7.tar.gz" - sha256 "9b94cb268fb15b0304ad3bb3ec92b9a8a16dacfcee72baac19298224a2c332c3" - - bottle do - cellar :any - sha256 "cca3b58b58a453636d67bd041f56df487ce86eb7f592178bd9f8745e35e0f5f0" => :mojave - sha256 "8a76630f04f1c8b6883d7621cf9c72456e22fa5206a8b2b3eb6527547d048fbb" => :high_sierra - sha256 "71561d0dbd12007514597dc85bf8ecb5e76e32f0feb35eb126b0998a30db49c8" => :sierra - sha256 "0d434588f3d22e55db11fe23baa82a5e1a4a8ccbcab84dfd74ddc1a0dafc085c" => :el_capitan - end - - depends_on "gd" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/cfgmaker", "--nointerfaces", "localhost" - end -end diff --git a/Formula/mruby-cli.rb b/Formula/mruby-cli.rb deleted file mode 100644 index 66a5e198cc265..0000000000000 --- a/Formula/mruby-cli.rb +++ /dev/null @@ -1,39 +0,0 @@ -class MrubyCli < Formula - desc "Build native command-line applications for Linux, MacOS, and Windows" - homepage "https://github.com/hone/mruby-cli" - url "https://github.com/hone/mruby-cli/archive/v0.0.4.tar.gz" - sha256 "97d889b5980193c562e82b42089b937e675b73950fa0d0c4e46fbe71d16d719f" - head "https://github.com/hone/mruby-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "232802e1ee21a4c1d3790272414914f9d5b7ab073a2fd819c9ef5fc6872a165f" => :mojave - sha256 "267baff54cace7684edd4184625afd6fb788cdb072035e88b9c10e4d274454fe" => :high_sierra - sha256 "d436b8d717f89db9807338345f4b0f385abcfc45f56e9b0b7decc333d4d05ad6" => :sierra - sha256 "2f56375783e9365bafc0868d505b54eea315f6dad9a0095decbbd61abeb345ac" => :el_capitan - sha256 "a06806ca6a22d3b015e073a984e832013f2efe729870e2aa6d0b17e91a4b9855" => :yosemite - end - - def install - ENV["MRUBY_CLI_LOCAL"] = "true" - - # Edit config to skip building Linux and Windows binaries - rm buildpath/"build_config.rb" - - (buildpath/"build_config.rb").write <<~EOS - MRuby::Build.new do |conf| - toolchain :clang - conf.gem File.expand_path(File.dirname(__FILE__)) - end - EOS - - system "rake", "compile" - bin.install "mruby/build/host/bin/mruby-cli" - end - - test do - system "#{bin}/mruby-cli", "--setup=brew" - assert File.file? "brew/mrblib/brew.rb" - assert File.file? "brew/tools/brew/brew.c" - end -end diff --git a/Formula/mruby.rb b/Formula/mruby.rb deleted file mode 100644 index eba83c5654e5d..0000000000000 --- a/Formula/mruby.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mruby < Formula - desc "Lightweight implementation of the Ruby language" - homepage "https://mruby.org/" - url "https://github.com/mruby/mruby/archive/2.0.0.tar.gz" - sha256 "fa495898d51130c69480a13e90df5dc18cb1a9d9a31836268a895989d902048f" - head "https://github.com/mruby/mruby.git" - - bottle do - cellar :any_skip_relocation - sha256 "3a1dcc1710f107e993a38b3262c7235f71cf12a80ca7a5dd0cd3c579430b7a20" => :mojave - sha256 "235c0c374c2dce600e00ac2b95fa7575a541a725f0c55e06bd3f7577b5309ed8" => :high_sierra - sha256 "5d41f43e7524997f9bcba2ca181dc838e47543941fc44ec686460ef7c675754c" => :sierra - end - - depends_on "bison" => :build - - def install - system "make" - - cd "build/host/" do - lib.install Dir["lib/*.a"] - prefix.install %w[bin mrbgems mrblib] - end - - prefix.install "include" - end - - test do - system "#{bin}/mruby", "-e", "true" - end -end diff --git a/Formula/mscgen.rb b/Formula/mscgen.rb deleted file mode 100644 index 5ab0876b0f587..0000000000000 --- a/Formula/mscgen.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Mscgen < Formula - desc "Parses Message Sequence Chart descriptions and produces images" - homepage "http://www.mcternan.me.uk/mscgen/" - url "http://www.mcternan.me.uk/mscgen/software/mscgen-src-0.20.tar.gz" - sha256 "3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23" - revision 3 - - bottle do - cellar :any - rebuild 1 - sha256 "1f194eb67147772b362ae5446b2e369b35ee9ffa935c8e22d37cdb4c1364349b" => :mojave - sha256 "0f125ab1fbaf04c670f252f05358771f1663b3fc59857bcfd855bbb52e01f88b" => :high_sierra - sha256 "08345683137541d79b6422afd2e269b1ab8c195722e5e71cffa6298a3986d563" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "gd" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-freetype", - "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/msdl.rb b/Formula/msdl.rb deleted file mode 100644 index 08012f0d4b6a9..0000000000000 --- a/Formula/msdl.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Msdl < Formula - desc "Downloader for various streaming protocols" - homepage "https://msdl.sourceforge.io" - url "https://downloads.sourceforge.net/msdl/msdl-1.2.7-r2.tar.gz" - version "1.2.7-r2" - sha256 "0297e87bafcab885491b44f71476f5d5bfc648557e7d4ef36961d44dd430a3a1" - - bottle do - cellar :any_skip_relocation - sha256 "30deed1f7ba83c707aa002a217438e341aae978e27cfc6d39239a063f2b14cde" => :mojave - sha256 "5f2922fa4f3b69f3f00cb7e29854c5a43c163e209c87d961253da9c4a7c3ec73" => :high_sierra - sha256 "69b04b6f10ea552b6c862110434cc63dfa6bfccdc8034edd70fed5db0f79e68b" => :sierra - sha256 "34ba320e82d1ce97fb0a106abd2c5ec848ba16857730ba51cadd0a030bee62ab" => :el_capitan - sha256 "5b8ac26e3adbb19386398a5500a8d5631d426b2e0e951433134b5383b80bb568" => :yosemite - sha256 "a28059bba6256df7233eacbfdadd9eeec2c3c6ec22038cb06ca49745b347a828" => :mavericks - end - - # Fixes linker error under clang; apparently reported upstream: - # https://github.com/Homebrew/homebrew/pull/13907 - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -diff --git a/src/url.c b/src/url.c -index 81783c7..356883a 100644 ---- a/src/url.c -+++ b/src/url.c -@@ -266,7 +266,7 @@ void url_unescape_string(char *dst,char *src) - /* - * return true if 'c' is valid url character - */ --inline int is_url_valid_char(int c) -+int is_url_valid_char(int c) - { - return (isalpha(c) || - isdigit(c) || diff --git a/Formula/msgpack.rb b/Formula/msgpack.rb deleted file mode 100644 index bd07a57d84a1f..0000000000000 --- a/Formula/msgpack.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Msgpack < Formula - desc "Library for a binary-based efficient data interchange format" - homepage "https://msgpack.org/" - url "https://github.com/msgpack/msgpack-c/releases/download/cpp-3.1.1/msgpack-3.1.1.tar.gz" - sha256 "8592d12e19ac3796889b8358bc8f78df9272e6aa7a9ea1834bafd68e4073549a" - head "https://github.com/msgpack/msgpack-c.git" - - bottle do - sha256 "b708aac89fc31da2a6bed1c6341554215159ff36d0e08ce0f8e1eaf73aefeeb4" => :mojave - sha256 "a0cfd5ae310c3e1abe7415d388faa423b503b3536bc57784de1777260de6c596" => :high_sierra - sha256 "3f55efbc271b3945eec23cd7bcb00c8810f33b37c20052e58175d5702bcddaf0" => :sierra - sha256 "12741b879defd02e2c4a0955ebe559addff483d30189504d4bdeb4572e99226a" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - # Reference: https://github.com/msgpack/msgpack-c/blob/master/QUICKSTART-C.md - (testpath/"test.c").write <<~EOS - #include - #include - - int main(void) - { - msgpack_sbuffer* buffer = msgpack_sbuffer_new(); - msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write); - msgpack_pack_int(pk, 1); - msgpack_pack_int(pk, 2); - msgpack_pack_int(pk, 3); - - /* deserializes these objects using msgpack_unpacker. */ - msgpack_unpacker pac; - msgpack_unpacker_init(&pac, MSGPACK_UNPACKER_INIT_BUFFER_SIZE); - - /* feeds the buffer. */ - msgpack_unpacker_reserve_buffer(&pac, buffer->size); - memcpy(msgpack_unpacker_buffer(&pac), buffer->data, buffer->size); - msgpack_unpacker_buffer_consumed(&pac, buffer->size); - - /* now starts streaming deserialization. */ - msgpack_unpacked result; - msgpack_unpacked_init(&result); - - while(msgpack_unpacker_next(&pac, &result)) { - msgpack_object_print(stdout, result.data); - puts(""); - } - } - EOS - - system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lmsgpackc" - assert_equal "1\n2\n3\n", `./test` - end -end diff --git a/Formula/msgpuck.rb b/Formula/msgpuck.rb deleted file mode 100644 index 4e982cc7fa8d8..0000000000000 --- a/Formula/msgpuck.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Msgpuck < Formula - desc "A simple and efficient MsgPack binary serialization library" - homepage "https://rtsisyk.github.io/msgpuck/" - url "https://github.com/rtsisyk/msgpuck/archive/2.0.tar.gz" - sha256 "01e6aa55d4d52a5b19f7ce9a9845506d9ab3f5abcf844a75e880b8378150a63d" - head "https://github.com/rtsisyk/msgpuck.git" - - bottle do - cellar :any_skip_relocation - sha256 "0fedf815d4ba46d10e5fe7910cbcc06f1ea2906e40a4ef994ffd3aa04289c423" => :mojave - sha256 "50197e08a5b55fbe804109ad01dfa815a6dde2b11b688d89a58154fed2d8d54f" => :high_sierra - sha256 "6f4011d177bf2e42f94f853bc93283ada6c48df8fdb7269135def453e65e598d" => :sierra - sha256 "b0accfedd2582109acec3297878bb943360282520a31b0d1c16c4ec1aa70a362" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~'EOS' - /* Encode and decode an array */ - #include - #include - - int main() { - const char *str = "hello world"; - - char buf[1024]; - char *w = buf; - const char *pos = buf; - - w = mp_encode_array(w, 4); - w = mp_encode_uint(w, 10); - w = mp_encode_str(w, str, strlen(str)); - w = mp_encode_bool(w, true); - w = mp_encode_double(w, 3.1415); - - assert(mp_typeof(*pos) == MP_ARRAY ); - mp_decode_array(&pos); - assert(mp_typeof(*pos) == MP_UINT ); - mp_next(&pos); - assert(mp_typeof(*pos) == MP_STR ); - mp_next(&pos); - assert(mp_typeof(*pos) == MP_BOOL ); - mp_next(&pos); - assert(mp_typeof(*pos) == MP_DOUBLE); - mp_next(&pos); - - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lmsgpuck", "-o", "test", "test.c" - system "#{testpath}/test" - end -end diff --git a/Formula/msitools.rb b/Formula/msitools.rb deleted file mode 100644 index c1e303fd32a25..0000000000000 --- a/Formula/msitools.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Msitools < Formula - desc "Windows installer (.MSI) tool" - homepage "https://wiki.gnome.org/msitools" - url "https://download.gnome.org/sources/msitools/0.98/msitools-0.98.tar.xz" - sha256 "4c7198c82a6b2116515fb6f7b6e4c3cae9aeec0f6e6090e532ec4e6e871d8ba7" - - bottle do - sha256 "b1293edb72f4c591714c1c453ae29bf904d2d8c1c2a3a3a028eb1a39dddbda22" => :mojave - sha256 "cacd5d3ed4c21c5d16219b5489e3f8553f47d1d1804fce6b747082fbe4a43f9d" => :high_sierra - sha256 "009a224ee31e3dceb59d83a5d9b852a0de8a90333158ba770f5e8685712f916f" => :sierra - sha256 "ccef04ecad926e360df41a418fc4bf654cebb36d251b43e49ced954acac5b9cb" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "e2fsprogs" - depends_on "gcab" - depends_on "gettext" - depends_on "glib" - depends_on "libgsf" - depends_on "vala" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # wixl-heat: make an xml fragment - assert_match //, pipe_output("#{bin}/wixl-heat --prefix test") - - # wixl: build two installers - 1.upto(2) do |i| - (testpath/"test#{i}.txt").write "abc" - (testpath/"installer#{i}.wxs").write <<~EOS - - - - - - - - - - - - - - - - - - - - - - EOS - system "#{bin}/wixl", "-o", "installer#{i}.msi", "installer#{i}.wxs" - assert_predicate testpath/"installer#{i}.msi", :exist? - end - - # msidiff: diff two installers - lines = `#{bin}/msidiff --list installer1.msi installer2.msi 2>/dev/null`.split("\n") - assert_equal 0, $CHILD_STATUS.exitstatus - assert_equal "-Program Files/test/test1.txt", lines[-2] - assert_equal "+Program Files/test/test2.txt", lines[-1] - - # msiinfo: show info for an installer - out = `#{bin}/msiinfo suminfo installer1.msi` - assert_equal 0, $CHILD_STATUS.exitstatus - assert_match /Author: BigCo/, out - - # msiextract: extract files from an installer - mkdir "files" - system "#{bin}/msiextract", "--directory", "files", "installer1.msi" - assert_equal (testpath/"test1.txt").read, - (testpath/"files/Program Files/test/test1.txt").read - - # msidump: dump tables from an installer - mkdir "idt" - system "#{bin}/msidump", "--directory", "idt", "installer1.msi" - assert_predicate testpath/"idt/File.idt", :exist? - - # msibuild: replace a table in an installer - system "#{bin}/msibuild", "installer1.msi", "-i", "idt/File.idt" - end -end diff --git a/Formula/msktutil.rb b/Formula/msktutil.rb deleted file mode 100644 index a9270743d2365..0000000000000 --- a/Formula/msktutil.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Msktutil < Formula - desc "Active Directory keytab management" - homepage "https://sourceforge.net/projects/msktutil/" - url "https://downloads.sourceforge.net/project/msktutil/msktutil-1.0.tar.bz2" - sha256 "6e59d4bf41b8c75d573037c19ed29567a55f67ae5fe8c81e037b4f8c7327b642" - - bottle do - cellar :any_skip_relocation - sha256 "9f77290c5288ec446836d564636482abccb88b110a98cdd6499e97733d4fc39b" => :mojave - sha256 "cba1afff1683efb3d6f6d500047c10691b0f46c904f404d8fbfdbed08200cc54" => :high_sierra - sha256 "3bf390f92696706f4f6241230024c9bdb13c78c05c9f81faffc356cbcb4ed443" => :sierra - sha256 "190a11fe9d63b99fe2982a79d83bd7ba59f4c7ef104ce860eb9ae48acb56335b" => :el_capitan - sha256 "c88bffcb5bacc334333d1bf614005ce65acb4d40e8c73f249313762e017ee8bb" => :yosemite - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{sbin}/msktutil --version") - end -end diff --git a/Formula/msmtp.rb b/Formula/msmtp.rb deleted file mode 100644 index ab7442515b08d..0000000000000 --- a/Formula/msmtp.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Msmtp < Formula - desc "SMTP client that can be used as an SMTP plugin for Mutt" - homepage "https://marlam.de/msmtp/" - url "https://marlam.de/msmtp/releases/msmtp-1.6.6.tar.xz" - sha256 "da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e" - - bottle do - sha256 "a2747598c1f5d9d8223a01b8454d15e60d013e303f94e8651fbaab1d14492c90" => :mojave - sha256 "e9161f534cfa50edb5beae511d7689fe02a53b68f90623ebc751a41ba34b4037" => :high_sierra - sha256 "d0b8a2a76d7ee8ed6beda0c383acd28d7a85d9d677c8d89a8a2e6b717055fe70" => :sierra - sha256 "115ce90fcc11a1fbda6bf4496200b50e89d4cccdb32f999cf6b3b749635f8e3e" => :el_capitan - sha256 "6f5227576bf8ac42fed7190c22f2e62b0fb2a3af59fa085e783426661c606758" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - args = %W[ - --disable-dependency-tracking - --with-macosx-keyring - --prefix=#{prefix} - --with-tls=openssl - ] - - system "./configure", *args - system "make", "install" - (pkgshare/"scripts").install "scripts/msmtpq" - end - - test do - system bin/"msmtp", "--help" - end -end diff --git a/Formula/mspdebug.rb b/Formula/mspdebug.rb deleted file mode 100644 index 2918860799e99..0000000000000 --- a/Formula/mspdebug.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Mspdebug < Formula - desc "Debugger for use with MSP430 MCUs" - homepage "https://dlbeer.co.nz/mspdebug/" - url "https://github.com/dlbeer/mspdebug/archive/v0.25.tar.gz" - sha256 "347b5ae5d0ab0cddb54363b72abe482f9f5d6aedb8f230048de0ded28b7d1503" - head "https://github.com/dlbeer/mspdebug.git" - - bottle do - sha256 "4d5d8c35966a0000b010bbaea7c2c403ff4921d1306d34d752ccceb3f3d3b155" => :mojave - sha256 "4124d4fbd9e191d941153962bb74aed50cc200c473b5ad5850610a1bc85f87b4" => :high_sierra - sha256 "e16447e04c99d74b8cdc49a063c230c64d09e34402d0221542594f3aacac5940" => :sierra - sha256 "22fc92bc5a594451eb0d0b943bce812619302c795fdad0ca4305c059ccf10a88" => :el_capitan - sha256 "8b23c23287fc9ab143921257a1859f8ac0dbb9e093261dfe931ec7d6a3548d97" => :yosemite - end - - depends_on "hidapi" - depends_on "libusb-compat" - - def install - ENV.append_to_cflags "-I#{Formula["hidapi"].opt_include}/hidapi" - system "make", "PREFIX=#{prefix}", "install" - end - - def caveats; <<~EOS - You may need to install a kernel extension if you're having trouble with - RF2500-like devices such as the TI Launchpad: - https://dlbeer.co.nz/mspdebug/faq.html#rf2500_osx - EOS - end - - test do - system bin/"mspdebug", "--help" - end -end diff --git a/Formula/mstch.rb b/Formula/mstch.rb deleted file mode 100644 index 1dd80d2e77da3..0000000000000 --- a/Formula/mstch.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Mstch < Formula - desc "Complete implementation of {{mustache}} templates using modern C++" - homepage "https://github.com/no1msd/mstch" - url "https://github.com/no1msd/mstch/archive/1.0.2.tar.gz" - sha256 "811ed61400d4e9d4f9ae0f7679a2ffd590f0b3c06b16f2798e1f89ab917cba6c" - - bottle do - cellar :any_skip_relocation - sha256 "c01c3c4afec3f7c29c4f26f93cce9516c4de3d9e070fd2b11c7419a04352d532" => :mojave - sha256 "c7ff132ee06fc7abf10d5cc4d9acc5b48eee1f6c7ce1136d31998b12ee3e5631" => :high_sierra - sha256 "95a01f3a3a5dc6619d44a7e3df98b1f886ddac249d2a84f17a49d7edcebca2be" => :sierra - sha256 "0869a4b14d4b9130852d5556d27e945c20239385d3bd30497c32833352fea1e3" => :el_capitan - sha256 "1f727fc24497894247b60ee22a3a6d7139156c0efd69f30d7144fd0d4fbb4a75" => :yosemite - sha256 "8cf2369310ef49911455a4071066464f261e78060732539ea7deeb4c4858ce29" => :mavericks - end - - depends_on "cmake" => :build - depends_on "boost" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - - (lib/"pkgconfig/mstch.pc").write pc_file - end - - def pc_file; <<~EOS - prefix=#{HOMEBREW_PREFIX} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${exec_prefix}/include - - Name: mstch - Description: Complete implementation of {{mustache}} templates using modern C++ - Version: 1.0.1 - Libs: -L${libdir} -lmstch - Cflags: -I${includedir} - EOS - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main() { - std::string view("Hello, world"); - mstch::map context; - - assert(mstch::render(view, context) == "Hello, world"); - } - EOS - - system ENV.cxx, "test.cpp", "-L#{lib}", "-lmstch", "-std=c++11", "-o", "test" - system "./test" - end -end diff --git a/Formula/mtools.rb b/Formula/mtools.rb deleted file mode 100644 index 6b5e608160ce5..0000000000000 --- a/Formula/mtools.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Mtools < Formula - desc "Tools for manipulating MSDOS files" - homepage "https://www.gnu.org/software/mtools/" - url "https://ftp.gnu.org/gnu/mtools/mtools-4.0.18.tar.gz" - mirror "https://ftpmirror.gnu.org/mtools/mtools-4.0.18.tar.gz" - sha256 "30d408d039b4cedcd04fbf824c89b0ff85dcbb6f71f13d2d8d65abb3f58cacc3" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "082a30c7f075085d136c7d2c001fc02e5b1ff47404ebc67ea53819031a878835" => :mojave - sha256 "f630af7b561b34f06e1f233211d66115c7b65365b3676058e6d91454f0e9941c" => :high_sierra - sha256 "cd5cbd343ef7f50ddb53be99ea5f5a7bd1ccddea252924bfd57fef84a69095a9" => :sierra - end - - conflicts_with "multimarkdown", :because => "both install `mmd` binaries" - - def install - # Prevents errors such as "mainloop.c:89:15: error: expected ')'" - # Upstream issue https://lists.gnu.org/archive/html/info-mtools/2014-02/msg00000.html - if ENV.cc == "clang" - inreplace "sysincludes.h", - "# define UNUSED(x) x __attribute__ ((unused));x", - "# define UNUSED(x) x" - end - - args = %W[ - LIBS=-liconv - --disable-debug - --prefix=#{prefix} - --sysconfdir=#{etc} - --without-x - ] - - system "./configure", *args - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - assert_match /#{version}/, shell_output("#{bin}/mtools --version") - end -end diff --git a/Formula/mtr.rb b/Formula/mtr.rb deleted file mode 100644 index cf00b3fe75e15..0000000000000 --- a/Formula/mtr.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Mtr < Formula - desc "'traceroute' and 'ping' in a single tool" - homepage "https://www.bitwizard.nl/mtr/" - url "https://github.com/traviscross/mtr/archive/v0.92.tar.gz" - sha256 "568a52911a8933496e60c88ac6fea12379469d7943feb9223f4337903e4bc164" - head "https://github.com/traviscross/mtr.git" - - bottle do - cellar :any_skip_relocation - sha256 "0ec13c29bb5e49ffbe0a9c83da77313c28b6bed60da1eb923945130f74158212" => :mojave - sha256 "3e426bdf04070ab31f2e70fae91a5b576ced3072733d5e9a0b617c75e97202bf" => :high_sierra - sha256 "0558426657c36a32f26d65c96b6111753f7189b5b198715df33b9a4f64e25732" => :sierra - sha256 "1700c0b67f337a9089de95ded89391be790ad440336b252be1d109b9b8352cc7" => :el_capitan - sha256 "90aa1e5d224e98d572525b09715390f0fbf2b72954cd3c0b87b9cd6af6ff8ac2" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - - def install - # We need to add this because nameserver8_compat.h has been removed in Snow Leopard - ENV["LIBS"] = "-lresolv" - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --without-glib - --without-gtk - ] - system "./bootstrap.sh" - system "./configure", *args - system "make", "install" - end - - def caveats; <<~EOS - mtr requires root privileges so you will need to run `sudo mtr`. - You should be certain that you trust any software you grant root privileges. - EOS - end - - test do - system sbin/"mtr", "--help" - end -end diff --git a/Formula/mu.rb b/Formula/mu.rb deleted file mode 100644 index 11db71935836e..0000000000000 --- a/Formula/mu.rb +++ /dev/null @@ -1,104 +0,0 @@ -# Note that odd release numbers indicate unstable releases. -# Please only submit PRs for [x.x.even] version numbers: -# https://github.com/djcb/mu/commit/23f4a64bdcdee3f9956a39b9a5a4fd0c5c2370ba -class Mu < Formula - desc "Tool for searching e-mail messages stored in the maildir-format" - homepage "https://www.djcbsoftware.nl/code/mu/" - url "https://github.com/djcb/mu/releases/download/v1.0/mu-1.0.tar.xz" - sha256 "966adc4db108f8ddf162891f9c3c24ba27f78c31f86575a0e05fbf14e857a513" - - bottle do - sha256 "c17d20c6deebf4f75da2f7fa028114f48176714c46d1f204d469880121e9b6d0" => :mojave - sha256 "d6d58dc0b9fc5d5454c0bf68230f6f8fb8cb973821de3e41ec267ce2614d8ec3" => :high_sierra - sha256 "0a818cbcfa365710bd48a97092218042dc8d00afd73b3f781c0982f8668a8410" => :sierra - sha256 "588ebfb6e7d577e8efd4a38ca1ae598998c8e015dd1101db8785641bdea17f6a" => :el_capitan - end - - head do - url "https://github.com/djcb/mu.git" - - depends_on "autoconf-archive" => :build - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libgpg-error" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "xapian" - depends_on "emacs" => :optional - - # Currently requires gmime 2.6.x - resource "gmime" do - url "https://download.gnome.org/sources/gmime/2.6/gmime-2.6.23.tar.xz" - sha256 "7149686a71ca42a1390869b6074815106b061aaeaaa8f2ef8c12c191d9a79f6a" - end - - def install - resource("gmime").stage do - system "./configure", "--prefix=#{prefix}/gmime", "--disable-introspection" - system "make", "install" - ENV.append_path "PKG_CONFIG_PATH", "#{prefix}/gmime/lib/pkgconfig" - end - - # Explicitly tell the build not to include emacs support as the version - # shipped by default with macOS is too old. - ENV["EMACS"] = "no" if build.without? "emacs" - - system "autoreconf", "-ivf" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-lispdir=#{elisp}" - system "make" - system "make", "install" - end - - def caveats; <<~EOS - Existing mu users are recommended to run the following after upgrading: - - mu index --rebuild - EOS - end - - # Regression test for: - # https://github.com/djcb/mu/issues/397 - # https://github.com/djcb/mu/issues/380 - # https://github.com/djcb/mu/issues/332 - test do - mkdir (testpath/"cur") - - (testpath/"cur/1234567890.11111_1.host1!2,S").write <<~EOS - From: "Road Runner" - To: "Wile E. Coyote" - Date: Mon, 4 Aug 2008 11:40:49 +0200 - Message-id: <1111111111@example.com> - - Beep beep! - EOS - - (testpath/"cur/0987654321.22222_2.host2!2,S").write <<~EOS - From: "Wile E. Coyote" - To: "Road Runner" - Date: Mon, 4 Aug 2008 12:40:49 +0200 - Message-id: <2222222222@example.com> - References: <1111111111@example.com> - - This used to happen outdoors. It was more fun then. - EOS - - system "#{bin}/mu", "index", - "--muhome", - testpath, - "--maildir=#{testpath}" - - mu_find = "#{bin}/mu find --muhome #{testpath} " - find_message = "#{mu_find} msgid:2222222222@example.com" - find_message_and_related = "#{mu_find} --include-related msgid:2222222222@example.com" - - assert_equal 1, shell_output(find_message).lines.count - assert_equal 2, shell_output(find_message_and_related).lines.count, - "You tripped over https://github.com/djcb/mu/issues/380\n\t--related doesn't work. Everything else should" - end -end diff --git a/Formula/mujs.rb b/Formula/mujs.rb deleted file mode 100644 index 199153bb56e13..0000000000000 --- a/Formula/mujs.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mujs < Formula - desc "Embeddable Javascript interpreter" - homepage "https://www.mujs.com/" - # use tag not tarball so the version in the pkg-config file isn't blank - url "https://github.com/ccxvii/mujs.git", - :tag => "1.0.5", - :revision => "7448a82448aa4eff952a4fdb836f197b844e3d1d" - head "https://github.com/ccxvii/mujs.git" - - bottle do - cellar :any_skip_relocation - sha256 "d38cb53752b8e8340c8174222a8846f6bcd26b6a2bafd8e765033d514ffeec50" => :mojave - sha256 "7cf5ff307f83717e15e58e3e8a523291c9b98246410f92aa2cd538665030bd06" => :high_sierra - sha256 "debcd9dfd3b231be5315035d851bbfa9ca4e7912cbc020a2a972ee30037f3582" => :sierra - end - - def install - system "make", "release" - system "make", "prefix=#{prefix}", "install" - end - - test do - (testpath/"test.js").write <<~EOS - print('hello, world'.split().reduce(function (sum, char) { - return sum + char.charCodeAt(0); - }, 0)); - EOS - assert_equal "104", shell_output("#{bin}/mujs test.js").chomp - end -end diff --git a/Formula/multimarkdown.rb b/Formula/multimarkdown.rb deleted file mode 100644 index 4915a5e82a619..0000000000000 --- a/Formula/multimarkdown.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Multimarkdown < Formula - desc "Turn marked-up plain text into well-formatted documents" - homepage "https://fletcher.github.io/MultiMarkdown-6/" - url "https://github.com/fletcher/MultiMarkdown-6/archive/6.4.0.tar.gz" - sha256 "fa9daa089bc0f8bc1f69fd7365778d59210b446ce7008d03b87fb572df8ff5d3" - head "https://github.com/fletcher/MultiMarkdown-6.git" - - bottle do - cellar :any_skip_relocation - sha256 "67b5b3efbd5508240db39a8e07de73d3afb54b6d7026cfc91bd52c8bab84e4e8" => :mojave - sha256 "4b0c84924e451362afe93a6046bfa31bb9ea567930f7d21ad2436241fc44d3d7" => :high_sierra - sha256 "3a314a87893e7eea9fc3542d5574d5fdadf96a77763ddef403335a34ee21d35c" => :sierra - sha256 "580595562320f4d5b78d0abb2e41f0773c91ef0c0bda6f7560486e3d05c52e13" => :el_capitan - end - - depends_on "cmake" => :build - - conflicts_with "mtools", :because => "both install `mmd` binaries" - conflicts_with "markdown", :because => "both install `markdown` binaries" - conflicts_with "discount", :because => "both install `markdown` binaries" - - def install - # Reported upstream 2 Sep 2018 https://github.com/fletcher/MultiMarkdown-6/issues/142 - inreplace "CMakeLists.txt", - "SET(CMAKE_OSX_DEPLOYMENT_TARGET \"10.4\"", - "SET(CMAKE_OSX_DEPLOYMENT_TARGET \"#{MacOS.version}\"" - - system "make", "release" - - cd "build" do - system "make" - bin.install "multimarkdown" - end - - bin.install Dir["scripts/*"].reject { |f| f =~ /\.bat$/ } - end - - test do - assert_equal "

foo bar

\n", pipe_output(bin/"multimarkdown", "foo *bar*\n") - assert_equal "

foo bar

\n", pipe_output(bin/"mmd", "foo *bar*\n") - end -end diff --git a/Formula/multitail.rb b/Formula/multitail.rb deleted file mode 100644 index eb0027ddbac38..0000000000000 --- a/Formula/multitail.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Multitail < Formula - desc "Tail multiple files in one terminal simultaneously" - homepage "https://vanheusden.com/multitail/" - url "https://vanheusden.com/multitail/multitail-6.4.2.tgz" - sha256 "af1d5458a78ad3b747c5eeb135b19bdca281ce414cefdc6ea0cff6d913caa1fd" - head "https://github.com/flok99/multitail.git" - - bottle do - rebuild 1 - sha256 "9d561e3132f6749aec218961f65d84516cc6a99a2247ee6ef4abf6ed1accc942" => :mojave - sha256 "b8d2ab93cd8bf7954ffc49ed929aa0cf2c60a2ebeb872e9d3686d314af043be2" => :high_sierra - sha256 "ec1007a1ab7ffc9394f25d1a838d54051c04c14667721e8db9f49803084f6dcc" => :sierra - sha256 "b9c5e200dab1bf30ef4bd9bb257d5728c6779552aab97a1ddc65d02ad697cd8f" => :el_capitan - end - - def install - system "make", "-f", "makefile.macosx", "multitail", "DESTDIR=#{HOMEBREW_PREFIX}" - - bin.install "multitail" - man1.install gzip("multitail.1") - etc.install "multitail.conf" - end - - test do - if build.head? - assert_match "multitail", shell_output("#{bin}/multitail -h 2>&1", 1) - else - assert_match version.to_s, shell_output("#{bin}/multitail -h 2>&1", 1) - end - end -end diff --git a/Formula/muparser.rb b/Formula/muparser.rb deleted file mode 100644 index 915e4d1c3fc50..0000000000000 --- a/Formula/muparser.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Muparser < Formula - desc "C++ math expression parser library" - homepage "http://beltoforion.de/article.php?a=muparser" - url "https://github.com/beltoforion/muparser/archive/v2.2.6.1.tar.gz" - sha256 "d2562853d972b6ddb07af47ce8a1cdeeb8bb3fa9e8da308746de391db67897b3" - head "https://github.com/beltoforion/muparser.git" - - bottle do - cellar :any - sha256 "c0feb51e0b10602b323d46f49d898ebb4cb36e00dcee42963d61b6c7ca27c23a" => :mojave - sha256 "611da2016012d77dbe1e5a9c85872cc8f8de23967b019ec039177b49fad2a0d1" => :high_sierra - sha256 "d5d3fd87e54d300578836ed61e066ef08b665050d7986e46ed6995eeee819088" => :sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include "muParser.h" - - double MySqr(double a_fVal) - { - return a_fVal*a_fVal; - } - - int main(int argc, char* argv[]) - { - using namespace mu; - try - { - double fVal = 1; - Parser p; - p.DefineVar("a", &fVal); - p.DefineFun("MySqr", MySqr); - p.SetExpr("MySqr(a)*_pi+min(10,a)"); - - for (std::size_t a=0; a<100; ++a) - { - fVal = a; // Change value of variable a - std::cout << p.Eval() << std::endl; - } - } - catch (Parser::exception_type &e) - { - std::cout << e.GetMsg() << std::endl; - } - return 0; - } - EOS - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lmuparser", - testpath/"test.cpp", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/mupdf-tools.rb b/Formula/mupdf-tools.rb deleted file mode 100644 index a88d39dccf17c..0000000000000 --- a/Formula/mupdf-tools.rb +++ /dev/null @@ -1,33 +0,0 @@ -class MupdfTools < Formula - desc "Lightweight PDF and XPS viewer" - homepage "https://mupdf.com/" - url "https://mupdf.com/downloads/archive/mupdf-1.14.0-source.tar.gz" - sha256 "c443483a678c3fc258fa4adc124146225d0bb443c522619faadebf6b363d7724" - revision 1 - head "https://git.ghostscript.com/mupdf.git" - - bottle do - cellar :any_skip_relocation - sha256 "cdef022dd6020e97503ede16d8d0f78c33bcd0290420379c848792ca92eabbcc" => :mojave - sha256 "8178f8da3a5d8f45678c5563cc005ea70a93439c2d68dc8daa7716ec6bb58715" => :high_sierra - sha256 "9327d7061bffc2f1319e124a5fb5d09921d1855249c8aca18568f5830f0db485" => :sierra - end - - def install - system "make", "install", - "build=release", - "verbose=yes", - "HAVE_X11=no", - "HAVE_GLUT=no", - "CC=#{ENV.cc}", - "prefix=#{prefix}" - - # Symlink `mutool` as `mudraw` (a popular shortcut for `mutool draw`). - bin.install_symlink bin/"mutool" => "mudraw" - man1.install_symlink man1/"mutool.1" => "mudraw.1" - end - - test do - assert_match "Homebrew test", shell_output("#{bin}/mutool draw -F txt #{test_fixtures("test.pdf")}") - end -end diff --git a/Formula/mupdf.rb b/Formula/mupdf.rb deleted file mode 100644 index 0216e6982aff2..0000000000000 --- a/Formula/mupdf.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Mupdf < Formula - desc "Lightweight PDF and XPS viewer" - homepage "https://mupdf.com/" - url "https://mupdf.com/downloads/archive/mupdf-1.14.0-source.tar.gz" - sha256 "c443483a678c3fc258fa4adc124146225d0bb443c522619faadebf6b363d7724" - head "https://git.ghostscript.com/mupdf.git" - - bottle do - cellar :any_skip_relocation - sha256 "ff48af84431d902475fd863213c719a493e234cea7780715cc33e259658b23f4" => :mojave - sha256 "3fc3d421c951188f9aa9900d68d0c02475bcebb404a8cc79d962f73ebc29be2f" => :high_sierra - sha256 "5bbec2ae4979636e506a413759d5f81928fb299b9bf9fbecf902cc150d3d2142" => :sierra - end - - depends_on "openssl" - depends_on :x11 - - conflicts_with "mupdf-tools", - :because => "mupdf and mupdf-tools install the same binaries." - - def install - system "make", "install", - "build=release", - "verbose=yes", - "CC=#{ENV.cc}", - "prefix=#{prefix}" - - # Symlink `mutool` as `mudraw` (a popular shortcut for `mutool draw`). - bin.install_symlink bin/"mutool" => "mudraw" - man1.install_symlink man1/"mutool.1" => "mudraw.1" - end - - test do - assert_match "Homebrew test", shell_output("#{bin}/mudraw -F txt #{test_fixtures("test.pdf")}") - end -end diff --git a/Formula/mupen64plus.rb b/Formula/mupen64plus.rb deleted file mode 100644 index c68d2add72409..0000000000000 --- a/Formula/mupen64plus.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Mupen64plus < Formula - desc "Cross-platform plugin-based N64 emulator" - homepage "https://www.mupen64plus.org/" - url "https://github.com/mupen64plus/mupen64plus-core/releases/download/2.5/mupen64plus-bundle-src-2.5.tar.gz" - sha256 "9c75b9d826f2d24666175f723a97369b3a6ee159b307f7cc876bbb4facdbba66" - - bottle do - cellar :any - rebuild 1 - sha256 "c88a4d9a47cdcc6b995615d5fd4b061a7046ec72fac75560d79998b7abf60b78" => :mojave - sha256 "4dc531259b558fe987eecd74d87afb70284d36ec4e0c3008de751b820f83e64b" => :high_sierra - sha256 "28006559bb0cc624432b1a8b0a7dfd08e9a5a3d59d7dbaf5cde64ac29dc747d1" => :sierra - sha256 "6d9d9900813b21abc89149ded185d4b74147a85c1a350d54511ee535acde171c" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "freetype" - depends_on "libpng" - depends_on "sdl" - - resource "rom" do - url "https://github.com/mupen64plus/mupen64plus-rom/raw/76ef14c876ed036284154444c7bdc29d19381acc/m64p_test_rom.v64" - sha256 "b5fe9d650a67091c97838386f5102ad94c79232240f9c5bcc72334097d76224c" - end - - def install - # Prevent different C++ standard library warning - inreplace Dir["source/mupen64plus-**/projects/unix/Makefile"], /(-mmacosx-version-min)=\d+\.\d+/, "\\1=#{MacOS.version}" - - # Fix build with Xcode 9 using upstream commit: - # https://github.com/mupen64plus/mupen64plus-video-glide64mk2/commit/5ac11270 - # Remove in next version - inreplace "source/mupen64plus-video-glide64mk2/src/Glide64/3dmath.cpp", - "__builtin_ia32_storeups", "_mm_storeu_ps" - - args = ["install", "PREFIX=#{prefix}", "INSTALL_STRIP_FLAG=-S"] - - cd "source/mupen64plus-core/projects/unix" do - system "make", *args - end - - cd "source/mupen64plus-audio-sdl/projects/unix" do - system "make", *args, "NO_SRC=1", "NO_SPEEX=1" - end - - cd "source/mupen64plus-input-sdl/projects/unix" do - system "make", *args - end - - cd "source/mupen64plus-rsp-hle/projects/unix" do - system "make", *args - end - - cd "source/mupen64plus-video-glide64mk2/projects/unix" do - system "make", *args - end - - cd "source/mupen64plus-video-rice/projects/unix" do - system "make", *args - end - - cd "source/mupen64plus-ui-console/projects/unix" do - system "make", *args - end - end - - test do - resource("rom").stage do - system bin/"mupen64plus", "--testshots", "1", - "m64p_test_rom.v64" - end - end -end diff --git a/Formula/musepack.rb b/Formula/musepack.rb deleted file mode 100644 index 413da616ac70b..0000000000000 --- a/Formula/musepack.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Musepack < Formula - desc "Audio compression format and tools" - homepage "https://www.musepack.net/" - url "https://files.musepack.net/source/musepack_src_r475.tar.gz" - version "r475" - sha256 "a4b1742f997f83e1056142d556a8c20845ba764b70365ff9ccf2e3f81c427b2b" - - bottle do - cellar :any - sha256 "ec10306392c8b871cb2d9fa2fe4920c6de43e8bdebb8f35095bf853031c098e9" => :mojave - sha256 "717935f1cb28a6f4b19fb8c9e8e606aa3156479539a809ce6e69ebf3016c2166" => :high_sierra - sha256 "26b774c3ca9b6c43cfdc868d71e635d292bcf218d0577fbc271be5138e8ef3c0" => :sierra - sha256 "33e4734a8714484a2c506241d91ab45145c19228abe51d355e0cbd60020ee11a" => :el_capitan - sha256 "2e6bad894063f1178ff43b5cd10a899b82baa757228c3a51488793a4a22acdf2" => :yosemite - sha256 "4ff9d23d8631300ff2619d9f1a7d99e07f8636c6e8d8db8dbf1335a21c1f7e27" => :mavericks - sha256 "ac50f1100cdb2c91846a5d5a8d364cdb31abaeb7823ccbfc6614829f96540c6d" => :mountain_lion - end - - depends_on "cmake" => :build - depends_on "libcuefile" - depends_on "libreplaygain" - - resource "test-mpc" do - url "https://trac.ffmpeg.org/raw-attachment/ticket/1160/decodererror.mpc" - sha256 "b16d876b58810cdb7fc06e5f2f8839775efeffb9b753948a5a0f12691436a15c" - end - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - lib.install "libmpcdec/libmpcdec.dylib" - end - - test do - resource("test-mpc").stage do - assert_match(/441001 samples decoded in/, - shell_output("#{bin}/mpcdec decodererror.mpc 2>&1")) - end - end -end diff --git a/Formula/mussh.rb b/Formula/mussh.rb deleted file mode 100644 index 4107569300331..0000000000000 --- a/Formula/mussh.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Mussh < Formula - desc "Multi-host SSH wrapper" - homepage "https://mussh.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mussh/mussh/1.0/mussh-1.0.tgz" - sha256 "6ba883cfaacc3f54c2643e8790556ff7b17da73c9e0d4e18346a51791fedd267" - - bottle :unneeded - - def install - bin.install "mussh" - man1.install "mussh.1" - end - - test do - system "#{bin}/mussh", "--help" - end -end diff --git a/Formula/mutt.rb b/Formula/mutt.rb deleted file mode 100644 index 5f128ab319696..0000000000000 --- a/Formula/mutt.rb +++ /dev/null @@ -1,93 +0,0 @@ -# Note: Mutt has a large number of non-upstream patches available for -# it, some of which conflict with each other. These patches are also -# not kept up-to-date when new versions of mutt (occasionally) come -# out. -# -# To reduce Homebrew's maintenance burden, patches are not accepted -# for this formula. The NeoMutt project has a Homebrew tap for their -# patched version of Mutt: https://github.com/neomutt/homebrew-neomutt - -class Mutt < Formula - desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)" - homepage "http://www.mutt.org/" - url "https://bitbucket.org/mutt/mutt/downloads/mutt-1.11.2.tar.gz" - sha256 "da5cd4c39f228914d3933d8cf3a017c8271fdd9b9d81c6e4fc42ad22e1a28723" - - bottle do - sha256 "705b2fe166b1e76823531ba4c65af1284610d62b9e6c22eec6703044fcc9e13e" => :mojave - sha256 "a1439cdf8cd81744792d80e4747b9103f67fa0ec7565be9b74425ff3ddd213f1" => :high_sierra - sha256 "c49aeb0838993a63be25ae6031ab2a34176c64dde6d37a6dc484e5d34b861457" => :sierra - end - - head do - url "https://gitlab.com/muttmua/mutt.git" - - resource "html" do - url "https://muttmua.gitlab.io/mutt/manual-dev.html" - end - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "openssl" - depends_on "tokyo-cabinet" - depends_on "gpgme" => :optional - - conflicts_with "tin", - :because => "both install mmdf.5 and mbox.5 man pages" - - def install - user_in_mail_group = Etc.getgrnam("mail").mem.include?(ENV["USER"]) - effective_group = Etc.getgrgid(Process.egid).name - - args = %W[ - --disable-dependency-tracking - --disable-warnings - --prefix=#{prefix} - --enable-debug - --enable-hcache - --enable-imap - --enable-pop - --enable-sidebar - --enable-smtp - --with-gss - --with-sasl - --with-ssl=#{Formula["openssl"].opt_prefix} - --with-tokyocabinet - ] - - args << "--enable-gpgme" if build.with? "gpgme" - - system "./prepare", *args - system "make" - - # This permits the `mutt_dotlock` file to be installed under a group - # that isn't `mail`. - # https://github.com/Homebrew/homebrew/issues/45400 - unless user_in_mail_group - inreplace "Makefile", /^DOTLOCK_GROUP =.*$/, "DOTLOCK_GROUP = #{effective_group}" - end - - system "make", "install" - doc.install resource("html") if build.head? - end - - def caveats; <<~EOS - mutt_dotlock(1) has been installed, but does not have the permissions lock - spool files in /var/mail. To grant the necessary permissions, run - - sudo chgrp mail #{bin}/mutt_dotlock - sudo chmod g+s #{bin}/mutt_dotlock - - Alternatively, you may configure `spoolfile` in your .muttrc to a file inside - your home directory. - EOS - end - - test do - system bin/"mutt", "-D" - touch "foo" - system bin/"mutt_dotlock", "foo" - system bin/"mutt_dotlock", "-u", "foo" - end -end diff --git a/Formula/muttils.rb b/Formula/muttils.rb deleted file mode 100644 index c41207c61bfff..0000000000000 --- a/Formula/muttils.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Muttils < Formula - desc "Provides utilities for use with console mail clients, eg. Mutt" - homepage "https://bitbucket.org/blacktrash/muttils/" - url "https://bitbucket.org/blacktrash/muttils/get/1.3.tar.gz" - sha256 "c8b456b660461441de8927ccff7e9f444894d6550d0777ed7bd160b8f9caddbf" - head "https://bitbucket.org/blacktrash/muttils", :using => :hg - - bottle do - cellar :any_skip_relocation - sha256 "44469a59b620c95a16ce8df8f83865d52bacf1fc67ce2e662e70f7a220aed363" => :mojave - sha256 "cc13c555f3f6fe0527b1b2ef61f50d3e01fe99663d9ba76d8ea912c7114bb9f0" => :high_sierra - sha256 "5c8920713f0a4abc1e6834dda10b40295010dfb96589196ffb319476801f3178" => :sierra - sha256 "6843b7372098864c53199d84759724bcbf2c1ab36fc74c15e56405351e43fbc9" => :el_capitan - sha256 "d976f7445a3142ff1c311cf19302b5fcc2976b0a26c0bb48e57e157bd4c7002f" => :yosemite - sha256 "01f0c26274540336fa829a8718bb0c3a2a5b5aa3c96c1f4ec7cf79e6263b837b" => :mavericks - sha256 "63e819c0bb96a56ed0f159ab816aeac84805a52333bd23298a17cd2abddcb17b" => :mountain_lion - end - - depends_on "python@2" # does not support Python 3 - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - assert_match /^foo\nbar\n$/, pipe_output("#{bin}/wrap -w 2", "foo bar") - end -end diff --git a/Formula/mvnvm.rb b/Formula/mvnvm.rb deleted file mode 100644 index a56ec6f3a0a6d..0000000000000 --- a/Formula/mvnvm.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Mvnvm < Formula - desc "Maven version manager" - homepage "http://mvnvm.org" - url "https://bitbucket.org/mjensen/mvnvm/get/mvnvm-1.0.10.tar.gz" - sha256 "355747ed47b5941e071893f89fa2c0e3eb63dd301e095166983ca4503f4967c9" - head "https://bitbucket.org/mjensen/mvnvm.git" - - bottle :unneeded - - depends_on :java => "1.7+" - - conflicts_with "maven", :because => "also installs a 'mvn' executable" - - def install - bin.install "mvn" - bin.install "mvnDebug" - bin.env_script_all_files(libexec/"bin", Language::Java.overridable_java_home_env("1.7+")) - end - - test do - (testpath/"settings.xml").write <<~EOS - #{testpath}/repository - EOS - (testpath/"mvnvm.properties").write <<~EOS - mvn_version=3.5.2 - EOS - (testpath/"pom.xml").write <<~EOS - - - 4.0.0 - org.homebrew - maven-test - 1.0.0-SNAPSHOT - - 1.7 - 1.7 - - - EOS - (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~EOS - package org.homebrew; - public class MavenTest { - public static void main(String[] args) { - System.out.println("Testing Maven with Homebrew!"); - } - } - EOS - system "#{bin}/mvn", "-gs", "#{testpath}/settings.xml", "compile" - end -end diff --git a/Formula/mvtools.rb b/Formula/mvtools.rb deleted file mode 100644 index 9257888c1fda5..0000000000000 --- a/Formula/mvtools.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Mvtools < Formula - desc "Filters for motion estimation and compensation" - homepage "https://github.com/dubhater/vapoursynth-mvtools" - url "https://github.com/dubhater/vapoursynth-mvtools/archive/v20.tar.gz" - sha256 "9a1bc87b9bad6642dd7d69b1b6e200c1d962ef55fc2787581e5d2cb437aa0b23" - head "https://github.com/dubhater/vapoursynth-mvtools.git" - - bottle do - cellar :any - sha256 "9ed185ad8294c1a18115e38d99dfbe0752849038c333b684d1e6642cc3377bc0" => :mojave - sha256 "6a78a79719c00934f397bf61a6fff3415fa3ca155bb22cf67b3ae899f718174b" => :high_sierra - sha256 "bd36ea3bb4a0e0ee16892683dbd3d5e04bd7b11174f99d5a698b6c495158f81e" => :sierra - sha256 "043f36d3ed835c973bbacb64aa07cb2f435fb10539f2b7cb0feecdf75a459f72" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "nasm" => :build - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on :macos => :el_capitan # due to zimg - depends_on "vapoursynth" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats - <<~EOS - MVTools will not be autoloaded in your VapourSynth scripts. To use it - use the following code in your scripts: - - core.std.LoadPlugin(path="#{HOMEBREW_PREFIX}/lib/libmvtools.dylib") - EOS - end - - test do - script = <<~EOS.split("\n").join(";") - import vapoursynth as vs - core = vs.get_core() - core.std.LoadPlugin(path="#{lib}/libmvtools.dylib") - EOS - - system "python3", "-c", script - end -end diff --git a/Formula/mycli.rb b/Formula/mycli.rb deleted file mode 100644 index d280d6823aef1..0000000000000 --- a/Formula/mycli.rb +++ /dev/null @@ -1,106 +0,0 @@ -class Mycli < Formula - include Language::Python::Virtualenv - - desc "CLI for MySQL with auto-completion and syntax highlighting" - homepage "https://mycli.net/" - url "https://files.pythonhosted.org/packages/f3/2b/4ffda993845718276c5c61350204fa55c7d9832d2b92551a48cbf6a20a56/mycli-1.19.0.tar.gz" - sha256 "354119ab5b0462bb6a0e9f572515b573e2fc6155934beb06f038c7bd09fdbb74" - - bottle do - cellar :any - sha256 "46f77fd591f22e9ce0c099a7afe0dc9cfcff0f3ce9181bb8bff545d8be04b361" => :mojave - sha256 "92002bf90ce1031186bc1cd60ef8c2278a6a8dc56efdd3fc24388b35cd81d4a4" => :high_sierra - sha256 "fd8e661d206956f4f68b082fdd26718d07ebbc4d94749391f5c4c766b1c79906" => :sierra - end - - depends_on "openssl" - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cli-helpers" do - url "https://files.pythonhosted.org/packages/b1/18/7997f55d8128df26a3d12bfa1ebb2ed0d9834d9b073126f03f26695d7224/cli_helpers-1.1.0.tar.gz" - sha256 "7c2038bba0c41f41acae0f6e660ff3b00d69f55d9d968f024952cace78111e12" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/d9/a5/4b2dd1a05403e34c3ba0d9c00f237c01967c0a4f59a427c9b241129cdfe4/prompt_toolkit-2.0.7.tar.gz" - sha256 "fd17048d8335c1e6d5ee403c3569953ba3eb8555d710bfc548faf0712666ea39" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - resource "PyMySQL" do - url "https://files.pythonhosted.org/packages/d9/ab/bc9be64876fc9b1590d8ae62b471981b4489c23d6c3f0319af570748d408/PyMySQL-0.9.2.tar.gz" - sha256 "9ec760cbb251c158c19d6c88c17ca00a8632bac713890e465b2be01fdc30713f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "sqlparse" do - url "https://files.pythonhosted.org/packages/79/3c/2ad76ba49f9e3d88d2b58e135b7821d93741856d1fe49970171f73529303/sqlparse-0.2.4.tar.gz" - sha256 "ce028444cfab83be538752a2ffdb56bc417b7784ff35bb9a3062413717807dec" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz" - sha256 "e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2" - end - - resource "terminaltables" do - url "https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/terminaltables-3.1.0.tar.gz" - sha256 "f3eb0eb92e3833972ac36796293ca0906e998dc3be91fbe1f8615b331b853b81" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"mycli", "--help" - end -end diff --git a/Formula/mydumper.rb b/Formula/mydumper.rb deleted file mode 100644 index 12a5cbaf68a5d..0000000000000 --- a/Formula/mydumper.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Mydumper < Formula - desc "How MySQL DBA & support engineer would imagine 'mysqldump' ;-)" - homepage "https://launchpad.net/mydumper" - url "https://launchpad.net/mydumper/0.9/0.9.1/+download/mydumper-0.9.1.tar.gz" - sha256 "aefab5dc4192acb043d685b6bb952c87557fbea5e083b8547c68ccfec878171f" - revision 1 - - bottle do - cellar :any - sha256 "08798a5d4fa3af367907a32963a55c166b5aaa654cd5708edb61ba907ee883e2" => :mojave - sha256 "1b05e59ddf8d604e827cb19132162d4d8ebf98459f58ca57af9c5b9a089694f0" => :high_sierra - sha256 "a4ed9559c67a607cef27874d667d6d4c5ee80d9663a45d6cc623cf457ea2284e" => :sierra - sha256 "f470b334ba765d77a9df8193f2333f43fa617d0a1a95b38d1325ddb4b5c5f47c" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "glib" - depends_on "mysql-client" - depends_on "openssl" - depends_on "pcre" - - # This patch allows cmake to find .dylib shared libs in macOS. A bug report has - # been filed upstream here: https://bugs.launchpad.net/mydumper/+bug/1517966 - # It also ignores .a libs because of an issue with glib's static libraries now - # being included by default in homebrew. - patch :p0, :DATA - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"mydumper", "--help" - end -end - -__END__ ---- cmake/modules/FindMySQL.cmake 2015-09-16 16:11:34.000000000 -0400 -+++ cmake/modules/FindMySQL.cmake 2015-09-16 16:10:56.000000000 -0400 -@@ -84,7 +84,7 @@ - ) - - set(TMP_MYSQL_LIBRARIES "") --set(CMAKE_FIND_LIBRARY_SUFFIXES .so .a .lib) -+set(CMAKE_FIND_LIBRARY_SUFFIXES .so .lib .dylib) - foreach(MY_LIB ${MYSQL_ADD_LIBRARIES}) - find_library("MYSQL_LIBRARIES_${MY_LIB}" NAMES ${MY_LIB} - HINTS diff --git a/Formula/myman.rb b/Formula/myman.rb deleted file mode 100644 index 9374fd07b6a61..0000000000000 --- a/Formula/myman.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Myman < Formula - desc "Text-mode videogame inspired by Namco's Pac-Man" - homepage "https://myman.sourceforge.io/" - url "https://downloads.sourceforge.net/project/myman/myman-cvs/myman-cvs-2009-10-30/myman-wip-2009-10-30.tar.gz" - sha256 "bf69607eabe4c373862c81bf56756f2a96eecb8eaa8c911bb2abda78b40c6d73" - head ":pserver:anonymous:@myman.cvs.sourceforge.net:/cvsroot/myman", :using => :cvs - - bottle do - rebuild 2 - sha256 "1ff1470d676dabb177f06c2683b67da5e70e39bbab28f7457762d4adda5cffb0" => :mojave - sha256 "b5f0af51ce1098ea35e48bc50f4097cbb9e647989decd6d7791476b062ef7582" => :high_sierra - sha256 "376c71ad2f5abcc0233b3873d70cc963e54ac0ca00a552eceb025ac09b931ff6" => :sierra - sha256 "d3b66de7eae03edecb2573524d94239bd013ffd57eeb1980411da12f6d2b2b98" => :el_capitan - sha256 "b318e0b227a3ad281afe95edc5a0cc7ab0b1d5e46b1699e6221eb201de869b48" => :yosemite - end - - depends_on "coreutils" => :build - depends_on "gnu-sed" => :build - depends_on "groff" => :build - - def install - ENV["RMDIR"] = "grmdir" - ENV["SED"] = "gsed" - ENV["INSTALL"] = "ginstall" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/myman", "-k" - end -end diff --git a/Formula/mypy.rb b/Formula/mypy.rb deleted file mode 100644 index 688ae7a766188..0000000000000 --- a/Formula/mypy.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Mypy < Formula - desc "Experimental optional static type checker for Python" - homepage "http://www.mypy-lang.org/" - url "https://github.com/python/mypy.git", - :tag => "v0.620", - :revision => "67b260f0fec0b0d97c92529359796e9ad5c1a30d" - head "https://github.com/python/mypy.git" - - bottle do - cellar :any_skip_relocation - sha256 "c40a1bf7fc53206051227482c8452d7c19aedb8a32d2831806db075861175a14" => :mojave - sha256 "2a13c36dbca981b4b7e658ccbce713273b5820fe44f13bc870198be92b1d892b" => :high_sierra - sha256 "719f628bd75e16058f494c4494235513c9c347958f0fe4234b952e4047367fd9" => :sierra - sha256 "95a7fda13b3fbace3617e4145719e839002b4523fbf5b35a3457e49ede590edb" => :el_capitan - end - - depends_on "sphinx-doc" => :build - depends_on "python" - - resource "psutil" do - url "https://files.pythonhosted.org/packages/51/9e/0f8f5423ce28c9109807024f7bdde776ed0b1161de20b408875de7e030c3/psutil-5.4.6.tar.gz" - sha256 "686e5a35fe4c0acc25f3466c32e716f2d498aaae7b7edc03e2305b682226bcf6" - end - - resource "sphinx_rtd_theme" do - url "https://files.pythonhosted.org/packages/1c/f2/a1361e5f399e0b4182d031065eececa63ddb8c19a0616b03f119c4d5b6b4/sphinx_rtd_theme-0.4.0.tar.gz" - sha256 "de88d637a60371d4f923e06b79c4ba260490c57d2ab5a8316942ab5d9a6ce1bf" - end - - resource "typed-ast" do - url "https://files.pythonhosted.org/packages/52/cf/2ebc7d282f026e21eed4987e42e10964a077c13cfc168b42f3573a7f178c/typed-ast-1.1.0.tar.gz" - sha256 "57fe287f0cdd9ceaf69e7b71a2e94a24b5d268b35df251a88fef5cc241bf73aa" - end - - def install - xy = Language::Python.major_minor_version "python3" - - # https://github.com/python/mypy/issues/2593 - version_static = buildpath/"mypy/version_static.py" - version_static.write "__version__ = '#{version}'\n" - inreplace "docs/source/conf.py", "mypy.version", "mypy.version_static" - - (buildpath/"docs/sphinx_rtd_theme").install resource("sphinx_rtd_theme") - # Inject sphinx_rtd_theme's path into sys.path - inreplace "docs/source/conf.py", - "sys.path.insert(0, os.path.abspath('../..'))", - "sys.path[:0] = [os.path.abspath('../..'), os.path.abspath('../sphinx_rtd_theme')]" - system "make", "-C", "docs", "html" - doc.install Dir["docs/build/html/*"] - - rm version_static - - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - (testpath/"broken.py").write <<~EOS - def p() -> None: - print('hello') - a = p() - EOS - output = pipe_output("#{bin}/mypy broken.py 2>&1") - assert_match '"p" does not return a value', output - end -end diff --git a/Formula/mysql++.rb b/Formula/mysql++.rb deleted file mode 100644 index 8d5248355126f..0000000000000 --- a/Formula/mysql++.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Mysqlxx < Formula - desc "C++ wrapper for MySQL's C API" - homepage "https://tangentsoft.com/mysqlpp/home" - url "https://tangentsoft.com/mysqlpp/releases/mysql++-3.2.3.tar.gz" - sha256 "c804c38fe229caab62a48a6d0a5cb279460da319562f41a16ad2f0a0f55b6941" - revision 2 - - bottle do - cellar :any - sha256 "952e55ad3380258c28787916ff48c6be7d368fe84ef4d5ac2a897be0c9691bab" => :mojave - sha256 "3190a4350b89e6bcea9b80809409ae668b00aebbb6dda08cf260621a65324c42" => :high_sierra - sha256 "a2333339d10b355368bf28a5d19c3b9a131f0ca62c0e874d718d998c6b474c34" => :sierra - sha256 "a4bfd205239996eda7467fbb714834f529ced547babeaf467c678adb1cc73025" => :el_capitan - end - - depends_on "mysql-client" - - def install - mysql = Formula["mysql-client"] - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-field-limit=40", - "--with-mysql-lib=#{mysql.opt_lib}", - "--with-mysql-include=#{mysql.opt_include}/mysql" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(int argc, char *argv[]) { - mysqlpp::examples::CommandLine cmdline(argc, argv); - if (!cmdline) { - return 1; - } - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{Formula["mysql-client"].opt_include}/mysql", - "-L#{lib}", "-lmysqlpp", "-o", "test" - system "./test", "-u", "foo", "-p", "bar" - end -end diff --git a/Formula/mysql-client.rb b/Formula/mysql-client.rb deleted file mode 100644 index 35643307751e9..0000000000000 --- a/Formula/mysql-client.rb +++ /dev/null @@ -1,54 +0,0 @@ -class MysqlClient < Formula - desc "Open source relational database management system" - homepage "https://dev.mysql.com/doc/refman/5.7/en/" - # Pinned at `5.7.*` - url "https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.23.tar.gz" - sha256 "d05700ec5c1c6dae9311059dc1713206c29597f09dbd237bf0679b3c6438e87a" - - bottle do - sha256 "39470cf4e34f770eebda0c89249f90c18a84e6ef03d33ee464db90c0049d74aa" => :mojave - sha256 "8b73614068a82ed9f82f19e52fdd621adcd4d017fc3767703f216cbf7b00e60e" => :high_sierra - sha256 "8e3637ada6ee42d7e224809eab698e814befde0f164e276f7f91f1664f7460b2" => :sierra - sha256 "84a90d2d3f24f9270bf4d41eef99741a1ba16c65148672411e9ee9a676551c21" => :el_capitan - end - - keg_only "conflicts with mysql" - - depends_on "cmake" => :build - # https://github.com/Homebrew/homebrew-core/issues/1475 - # Needs at least Clang 3.3, which shipped alongside Lion. - # Note: MySQL themselves don't support anything below El Capitan. - depends_on :macos => :lion - depends_on "openssl" - - def install - # https://bugs.mysql.com/bug.php?id=87348 - # Fixes: "ADD_SUBDIRECTORY given source - # 'storage/ndb' which is not an existing" - inreplace "CMakeLists.txt", "ADD_SUBDIRECTORY(storage/ndb)", "" - - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DCOMPILATION_COMMENT=Homebrew - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_BOOST=boost - -DWITH_EDITLINE=system - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DWITHOUT_SERVER=ON - ] - - system "cmake", ".", *std_cmake_args, *args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mysql --version") - end -end diff --git a/Formula/mysql-cluster.rb b/Formula/mysql-cluster.rb deleted file mode 100644 index bfb25dbd8e4ff..0000000000000 --- a/Formula/mysql-cluster.rb +++ /dev/null @@ -1,288 +0,0 @@ -class MysqlCluster < Formula - desc "Shared-nothing clustering and auto-sharding for MySQL" - homepage "https://www.mysql.com/products/cluster/" - url "https://dev.mysql.com/get/Downloads/MySQL-Cluster-7.5/mysql-cluster-gpl-7.5.7.tar.gz" - sha256 "c40551603a9aacc4db96416be7f15700af6039a2247b83c2dce637c793cb10d8" - - bottle do - sha256 "2cebf38ab91fdd6caf24a7f30effea193d4d5a0596adf78172f5971dce8f3cec" => :mojave - sha256 "a45135631bc0a4af03386ff3d812b1375dcd6f1cfc609b19bbdcf67dd676396a" => :high_sierra - sha256 "91bf3e3613e86df1f8fec9785d236a9ecffe72bc0e8fbe81e1c5961f77052f48" => :sierra - sha256 "84a754a7f71e34ee076774027930bbd7667961e2ecf82724a56d3b73b5eeac76" => :el_capitan - sha256 "29692861b897e6b013d01396bd0cea9541b109a7d691007ddb67a64de91d0a44" => :yosemite - end - - depends_on "cmake" => :build - depends_on :java => "1.8" - depends_on "pidof" unless MacOS.version >= :mountain_lion - depends_on "openssl" - - conflicts_with "memcached", :because => "both install `bin/memcached`" - conflicts_with "mysql", "mariadb", "percona-server", - :because => "mysql, mariadb, and percona install the same binaries." - conflicts_with "mysql-connector-c", - :because => "both install `bin/my_print_defaults`" - - fails_with :clang do - build 500 - cause "https://article.gmane.org/gmane.comp.db.mysql.cluster/2085" - end - - resource "boost" do - url "https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2" - sha256 "727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca" - end - - def install - # Make sure the var/mysql-cluster directory exists - (var/"mysql-cluster").mkpath - - # dyld: lazy symbol binding failed: Symbol not found: _clock_gettime - if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "configure.cmake", "(clock_gettime", "(everything_is_terrible" - end - - args = [".", - "-DCMAKE_INSTALL_PREFIX=#{prefix}", - "-DMYSQL_DATADIR=#{var}/mysql-cluster", - "-DINSTALL_MANDIR=#{man}", - "-DINSTALL_DOCDIR=#{doc}", - "-DINSTALL_INFODIR=#{info}", - # CMake prepends prefix, so use share.basename - "-DINSTALL_MYSQLSHAREDIR=#{share.basename}/mysql", - "-DWITH_SSL=yes", - "-DDEFAULT_CHARSET=utf8", - "-DDEFAULT_COLLATION=utf8_general_ci", - "-DSYSCONFDIR=#{etc}", - "-DWITH_UNIT_TESTS=OFF", - "-DWITH_READLINE=yes"] - - # mysql-cluster >5.7.x mandates Boost as a requirement to build & has a - # strict version check in place to ensure it only builds against expected - # release. - (buildpath/"boost_1_59_0").install resource("boost") - args << "-DWITH_BOOST=#{buildpath}/boost_1_59_0" - - system "cmake", *args - system "make" - system "make", "install" - - # We don't want to keep a 240MB+ folder around most users won't need. - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}" - end - rm_rf prefix/"mysql-test" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, - "\\1:#{HOMEBREW_PREFIX}/bin\\2" - bin.install_symlink prefix/"support-files/mysql.server" - - libexec.install bin/"mcc_config.py" - - plist_path("ndb_mgmd").write ndb_mgmd_startup_plist("ndb_mgmd") - plist_path("ndb_mgmd").chmod 0644 - plist_path("ndbd").write ndbd_startup_plist("ndbd") - plist_path("ndbd").chmod 0644 - plist_path("mysqld").write mysqld_startup_plist("mysqld") - plist_path("mysqld").chmod 0644 - end - - def post_install - (var/"mysql-cluster/ndb_data").mkpath - (var/"mysql-cluster/mysqld_data").mkpath - (var/"mysql-cluster/conf").mkpath - (var/"mysql-cluster/conf/my.cnf").write my_cnf unless File.exist? var/"mysql-cluster/conf/my.cnf" - (var/"mysql-cluster/conf/config.ini").write config_ini unless File.exist? var/"mysql-cluster/conf/config.ini" - end - - def caveats; <<~EOS - To get started with MySQL Cluster, read MySQL Cluster Quick Start at - https://dev.mysql.com/downloads/cluster/ - - Default configuration files have been created inside: - #{var}/mysql-cluster - Note that in a production system there are other parameters - that you would set to tune the configuration. - MySQL is configured to only allow connections from localhost by default - - Set up databases to run AS YOUR USER ACCOUNT with: - unset TMPDIR - mysql_install_db --verbose --user=`whoami` --basedir="#{opt_prefix}" --datadir=#{var}/mysql-cluster/mysqld_data --tmpdir=/tmp - - For a first cluster, you may start with a single MySQL Server (mysqld), - a pair of Data Nodes (ndbd) and a single management node (ndb_mgmd): - - ndb_mgmd -f #{var}/mysql-cluster/conf/config.ini --initial --configdir=#{var}/mysql-cluster/conf/ - ndbd -c localhost:1186 - ndbd -c localhost:1186 - mysqld --defaults-file=#{var}/mysql-cluster/conf/my.cnf & - mysql -h 127.0.0.1 -P 5000 -u root -p - (Leave the password empty and press Enter) - create database clusterdb; - use clusterdb; - create table simples (id int not null primary key) engine=ndb; - insert into simples values (1),(2),(3),(4); - select * from simples; - - To shutdown everything: - - mysqladmin -u root -p shutdown - ndb_mgm -e shutdown - EOS - end - - def my_cnf; <<~EOS - [mysqld] - ndbcluster - datadir=#{var}/mysql-cluster/mysqld_data - basedir=#{opt_prefix} - port=5000 - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - end - - def config_ini; <<~EOS - [ndb_mgmd] - hostname=localhost - datadir=#{var}/mysql-cluster/ndb_data - NodeId=1 - - [ndbd default] - noofreplicas=2 - datadir=#{var}/mysql-cluster/ndb_data - - [ndbd] - hostname=localhost - NodeId=3 - - [ndbd] - hostname=localhost - NodeId=4 - - [mysqld] - NodeId=50 - EOS - end - - # Override Formula#plist_name - def plist_name(extra = nil) - extra ? super()+"-"+extra : super()+"-ndb_mgmd" - end - - # Override Formula#plist_path - def plist_path(extra = nil) - extra ? super().dirname+(plist_name(extra)+".plist") : super() - end - - plist_options :manual => "mysql.server start" - - def mysqld_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/mysqld - --defaults-file=#{var}/mysql-cluster/conf/my.cnf - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - def ndb_mgmd_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/ndb_mgmd - --nodaemon - -f - #{var}/mysql-cluster/conf/config.ini - --initial - --configdir=#{var}/mysql-cluster/conf/ - - RunAtLoad - - WorkingDirectory - #{var} - StandardOutPath - #{var}/mysql-cluster/#{name}.log - - - EOS - end - - def ndbd_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/ndbd - --nodaemon - -c - localhost:1186 - - RunAtLoad - - WorkingDirectory - #{var} - StandardOutPath - #{var}/mysql-cluster/#{name}.log - - - EOS - end - - test do - begin - # Expects datadir to be a completely clean dir, which testpath isn't. - dir = Dir.mktmpdir - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{dir}", "--tmpdir=#{dir}" - - pid = fork do - exec bin/"mysqld", "--datadir=#{dir}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:3306") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mysql-connector-c++.rb b/Formula/mysql-connector-c++.rb deleted file mode 100644 index 4ae0b33c6d11f..0000000000000 --- a/Formula/mysql-connector-c++.rb +++ /dev/null @@ -1,42 +0,0 @@ -class MysqlConnectorCxx < Formula - desc "MySQL database connector for C++ applications" - homepage "https://dev.mysql.com/downloads/connector/cpp/" - url "https://cdn.mysql.com/Downloads/Connector-C++/mysql-connector-c++-1.1.9.tar.gz" - sha256 "3e31847a69a4e5c113b7c483731317ec4533858e3195d3a85026a0e2f509d2e4" - revision 2 - - bottle do - cellar :any - sha256 "4fb493a07a4f86fa178bb4b879048395774d9b8787575dfd0b582420a3c44960" => :mojave - sha256 "03e1e94df2c84a0540e306e6b9f1a121957eb18d7571be8b503c792f32def44f" => :high_sierra - sha256 "251a3651e8d6d0d38488e5b18c25ff29b41b3caf0103ae578e1cc31625b9b947" => :sierra - sha256 "bc45340a1bc8e4484cf8e06c25bc475cb455ed12d79c6265d47ecb724ee97c3d" => :el_capitan - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "mysql-client" - depends_on "openssl" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(void) { - try { - sql::Driver *driver = get_driver_instance(); - } catch (sql::SQLException &e) { - return 1; - } - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{Formula["mysql-client"].opt_include}", - "-L#{lib}", "-lmysqlcppconn", "-o", "test" - system "./test" - end -end diff --git a/Formula/mysql-connector-c.rb b/Formula/mysql-connector-c.rb deleted file mode 100644 index 5747d06ae0783..0000000000000 --- a/Formula/mysql-connector-c.rb +++ /dev/null @@ -1,31 +0,0 @@ -class MysqlConnectorC < Formula - desc "MySQL database connector for C applications" - homepage "https://dev.mysql.com/downloads/connector/c/" - url "https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.11-src.tar.gz" - sha256 "c8664851487200162b38b6f3c8db69850bd4f0e4c5ff5a6d161dbfb5cb76b6c4" - - bottle do - sha256 "e659605251a2ac9a57da2c781e89dc33a8836aa656c804c1e617fa7ed3d59919" => :mojave - sha256 "3b84a7deb748b5e7c7674f449e7a2ae451bb1b8838d8841ddf7001ef32673364" => :high_sierra - sha256 "bb5c0c5854d6af0299c18d14a48dcb6dc5fdca98b2bde9b4c654c5584c3670b1" => :sierra - sha256 "e2035138e14b87fb0ff971ab9bc34631140ac0478e250866d9ce236de952c66e" => :el_capitan - sha256 "d6aaf4eca97640dc5f5785a2bf8cc45cf7d829d50798ee0f6551b473c621b792" => :yosemite - end - - depends_on "cmake" => :build - depends_on "openssl" - - conflicts_with "mysql", "mariadb", "percona-server", - :because => "both install MySQL client libraries" - conflicts_with "mysql-cluster", - :because => "both install `bin/my_print_defaults`" - - def install - system "cmake", ".", "-DWITH_SSL=system", *std_cmake_args - system "make", "install" - end - - test do - assert_match include.to_s, shell_output("#{bin}/mysql_config --cflags") - end -end diff --git a/Formula/mysql-sandbox.rb b/Formula/mysql-sandbox.rb deleted file mode 100644 index 06fd6d02929ba..0000000000000 --- a/Formula/mysql-sandbox.rb +++ /dev/null @@ -1,30 +0,0 @@ -class MysqlSandbox < Formula - desc "Install one or more MySQL servers" - homepage "https://mysqlsandbox.net" - url "https://github.com/datacharmer/mysql-sandbox/archive/3.2.17.tar.gz" - sha256 "3af4af111536e4e690042bc80834392f46a7e55c7143332d229ff2eb32321e89" - head "https://github.com/datacharmer/mysql-sandbox.git" - - bottle do - cellar :any_skip_relocation - sha256 "88eefc687a4a8344dfac002ea5a3183302de67d1a699324357115325f2e337cb" => :mojave - sha256 "da11d806c9d472f19514da7520ec448210e410983225a3b41c0459634a823ab7" => :high_sierra - sha256 "1829b23da5960830f426300cac7b4820f21a4f801a1260357394b205bb9340a4" => :sierra - sha256 "77ab4eb3bbd5d374020081b3505cd7f18de1500019af148f00ebef13a34e4222" => :el_capitan - end - - def install - ENV["PERL_LIBDIR"] = libexec/"lib/perl5" - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5/site_perl" - - system "perl", "Makefile.PL", "PREFIX=#{libexec}" - system "make", "test", "install" - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - assert_match version.to_s, shell_output("#{bin}/msandbox", 1) - end -end diff --git a/Formula/mysql-search-replace.rb b/Formula/mysql-search-replace.rb deleted file mode 100644 index fa770d10f45c0..0000000000000 --- a/Formula/mysql-search-replace.rb +++ /dev/null @@ -1,19 +0,0 @@ -class MysqlSearchReplace < Formula - desc "Database search and replace script in PHP" - homepage "https://interconnectit.com/products/search-and-replace-for-wordpress-databases/" - url "https://github.com/interconnectit/Search-Replace-DB/archive/3.1.tar.gz" - sha256 "837389799a2884e3f77a3ab84c1a4161b6e2220041f91c9f149529111babe676" - - bottle :unneeded - - def install - libexec.install "srdb.class.php" - libexec.install "srdb.cli.php" => "srdb" - chmod 0755, libexec/"srdb" - bin.install_symlink libexec/"srdb" - end - - test do - system bin/"srdb", "--help" - end -end diff --git a/Formula/mysql-utilities.rb b/Formula/mysql-utilities.rb deleted file mode 100644 index 7c9321b9cd81c..0000000000000 --- a/Formula/mysql-utilities.rb +++ /dev/null @@ -1,38 +0,0 @@ -class MysqlUtilities < Formula - desc "Tools for maintaining and administering MySQL servers" - homepage "https://dev.mysql.com/downloads/utilities/" - url "https://github.com/mysql/mysql-utilities/archive/release-1.6.5.tar.gz" - sha256 "40b6987064f204fed2286c682c9a6ded8ba4670f7543edd310aab91fee8fbc3b" - - bottle do - cellar :any_skip_relocation - sha256 "793415e1d7e6deffe3f3dde70ff6262d41ad3661664df7906b8996cfaaa292a1" => :mojave - sha256 "952e22b82a12919d9fb06d5aba5eb7e214b70c3b5d27e3ab1d219e19e2e01ec9" => :high_sierra - sha256 "7166858aeafbd28075334ede9d60569a282ccd0a87dcf353cb6b56a40ae987c0" => :sierra - sha256 "7166858aeafbd28075334ede9d60569a282ccd0a87dcf353cb6b56a40ae987c0" => :el_capitan - sha256 "7166858aeafbd28075334ede9d60569a282ccd0a87dcf353cb6b56a40ae987c0" => :yosemite - end - - depends_on "python@2" # does not support Python 3 - - resource "mysql-connector-python" do - url "https://github.com/mysql/mysql-connector-python/archive/2.2.2.tar.gz" - sha256 "fe46832fa4007c81c5aff6574f2852f301f105bf1e351d5cc69e012309116fa1" - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - resource("mysql-connector-python").stage do - system "python", "setup.py", "install", "--prefix=" + libexec - end - - system "python", "setup.py", "install", "--prefix=" + libexec - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/mysqldiff", "--help" - end -end diff --git a/Formula/mysql.rb b/Formula/mysql.rb deleted file mode 100644 index 2db4613bffda2..0000000000000 --- a/Formula/mysql.rb +++ /dev/null @@ -1,172 +0,0 @@ -class Mysql < Formula - desc "Open source relational database management system" - homepage "https://dev.mysql.com/doc/refman/8.0/en/" - url "https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.13.tar.gz" - sha256 "61f97906050c2a0cc008be347f70c2c6612425c85342466f549088c570b35ff4" - - bottle do - sha256 "aaf5322a68c54d31ef2322023238da09529c11eaad75b69cdaa99aeb0fab44bf" => :mojave - sha256 "ae08167bb19f4c5bd3ec23866d58051188bdb3d995df6b83851743450ca8d0ff" => :high_sierra - sha256 "d52428740c64660b100efa772acc135e3bb567efb342750add3a9dbb3e4932b8" => :sierra - end - - depends_on "cmake" => :build - - # GCC is not supported either, so exclude for El Capitan. - depends_on :macos => :sierra if DevelopmentTools.clang_build_version == 800 - - # https://github.com/Homebrew/homebrew-core/issues/1475 - # Needs at least Clang 3.6, which shipped alongside Yosemite. - # Note: MySQL themselves don't support anything below Sierra. - depends_on :macos => :yosemite - - depends_on "openssl" - - conflicts_with "mysql-cluster", "mariadb", "percona-server", - :because => "mysql, mariadb, and percona install the same binaries." - conflicts_with "mysql-connector-c", - :because => "both install MySQL client libraries" - conflicts_with "mariadb-connector-c", - :because => "both install plugins" - - # https://bugs.mysql.com/bug.php?id=86711 - # https://github.com/Homebrew/homebrew-core/pull/20538 - fails_with :clang do - build 800 - cause "Wrong inlining with Clang 8.0, see MySQL Bug #86711" - end - - def datadir - var/"mysql" - end - - def install - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DCOMPILATION_COMMENT=Homebrew - -DDEFAULT_CHARSET=utf8mb4 - -DDEFAULT_COLLATION=utf8mb4_general_ci - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_PLUGINDIR=lib/plugin - -DMYSQL_DATADIR=#{datadir} - -DSYSCONFDIR=#{etc} - -DWITH_BOOST=boost - -DWITH_EDITLINE=system - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DWITH_EMBEDDED_SERVER=ON - -DENABLED_LOCAL_INFILE=1 - -DWITH_INNODB_MEMCACHED=ON - ] - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}" - end - - # Remove the tests directory - rm_rf prefix/"mysql-test" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Fix up the control script and link into bin. - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, - "\\1:#{HOMEBREW_PREFIX}/bin\\2" - bin.install_symlink prefix/"support-files/mysql.server" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the datadir exists - datadir.mkpath - unless (datadir/"mysql/general_log.CSM").exist? - ENV["TMPDIR"] = nil - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" - end - end - - def caveats - s = <<~EOS - We've installed your MySQL database without a root password. To secure it run: - mysql_secure_installation - - MySQL is configured to only allow connections from localhost by default - - To connect run: - mysql -uroot - EOS - if my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x } - s += <<~EOS - - A "#{my_cnf}" from another install may interfere with a Homebrew-built - server starting up correctly. - EOS - end - s - end - - plist_options :manual => "mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{datadir} - - RunAtLoad - - WorkingDirectory - #{datadir} - - - EOS - end - - test do - begin - # Expects datadir to be a completely clean dir, which testpath isn't. - dir = Dir.mktmpdir - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{dir}", "--tmpdir=#{dir}" - - pid = fork do - exec bin/"mysqld", "--bind-address=127.0.0.1", "--datadir=#{dir}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:3306") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mysql@5.5.rb b/Formula/mysql@5.5.rb deleted file mode 100644 index dc7aa07017f6a..0000000000000 --- a/Formula/mysql@5.5.rb +++ /dev/null @@ -1,155 +0,0 @@ -class MysqlAT55 < Formula - desc "Open source relational database management system" - homepage "https://dev.mysql.com/doc/refman/5.5/en/" - url "https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.62.tar.gz" - sha256 "b1e7853bc1f04aabf6771e0ad947f35ac8d237f4b35d0706d1095c9526ff99d7" - - bottle do - rebuild 1 - sha256 "690a31fbf4e2ee98172b9f861ca2c9dc336556267a7d64174058a9212774508f" => :mojave - sha256 "ae5e9df30314f452c118a81f39d536cb7c1f5cc624ea9109ddafd1c61c5d7d43" => :high_sierra - sha256 "be73396f962a509dfadb1903f3b9cfa32cce44df616f3996975f2469b92f9cf4" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pidof" unless MacOS.version >= :mountain_lion - depends_on "openssl" - - def datadir - var/"mysql" - end - - def install - # Don't hard-code the libtool path. See: - # https://github.com/Homebrew/legacy-homebrew/issues/20185 - inreplace "cmake/libutils.cmake", - "COMMAND /usr/bin/libtool -static -o ${TARGET_LOCATION}", - "COMMAND libtool -static -o ${TARGET_LOCATION}" - - # -DINSTALL_* are relative to prefix - args = %W[ - -DMYSQL_DATADIR=#{datadir} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_SSL=system - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - -DSYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - -DWITH_EDITLINE=system - -DWITH_UNIT_TESTS=OFF - -DWITH_EMBEDDED_SERVER=ON - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DENABLED_LOCAL_INFILE=1 - -DWITH_INNODB_MEMCACHED=1 - ] - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # We don't want to keep a 240MB+ folder around most users won't need. - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}" - end - rm_rf prefix/"mysql-test" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, - "\\1:#{HOMEBREW_PREFIX}/bin\\2" - bin.install_symlink prefix/"support-files/mysql.server" - - libexec.install bin/"mysqlaccess" - libexec.install bin/"mysqlaccess.conf" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the datadir exists - datadir.mkpath - unless (datadir/"mysql/general_log.CSM").exist? - ENV["TMPDIR"] = nil - system bin/"mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - #{opt_bin}/mysql -uroot - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mysql@5.5/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{datadir} - - RunAtLoad - - WorkingDirectory - #{datadir} - - - EOS - end - - test do - begin - # Expects datadir to be a completely clean dir, which testpath isn't. - dir = Dir.mktmpdir - system bin/"mysql_install_db", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{dir}", "--tmpdir=#{dir}" - - pid = fork do - exec bin/"mysqld", "--datadir=#{dir}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:3306") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mysql@5.6.rb b/Formula/mysql@5.6.rb deleted file mode 100644 index 73686448d4e01..0000000000000 --- a/Formula/mysql@5.6.rb +++ /dev/null @@ -1,155 +0,0 @@ -class MysqlAT56 < Formula - desc "Open source relational database management system" - homepage "https://dev.mysql.com/doc/refman/5.6/en/" - url "https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.42.tar.gz" - sha256 "fc6d4aa9c2ed1a751163d0ec3d35bf800fc6b7c9bd2f890e376b6810c9393dba" - - bottle do - rebuild 1 - sha256 "f07e796a684ce05411e405b13a93800abe7a84c19e0dd37ca1f2dde84d814edd" => :mojave - sha256 "d968c270171c8196fe84449d7af015b191aa9355b9b6d9e3124d43d255345607" => :high_sierra - sha256 "8f58ff0f9dc5e2478d4463aeb202eccd7f88d0f16804dd2fe8ee8b04a05dfc34" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pidof" unless MacOS.version >= :mountain_lion - depends_on "openssl" - - def datadir - var/"mysql" - end - - def install - # Don't hard-code the libtool path. See: - # https://github.com/Homebrew/homebrew/issues/20185 - inreplace "cmake/libutils.cmake", - "COMMAND /usr/bin/libtool -static -o ${TARGET_LOCATION}", - "COMMAND libtool -static -o ${TARGET_LOCATION}" - - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DMYSQL_DATADIR=#{datadir} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_SSL=system - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - -DSYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - -DWITH_EDITLINE=system - -DWITH_UNIT_TESTS=OFF - -DWITH_EMBEDDED_SERVER=ON - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DENABLED_LOCAL_INFILE=1 - -DWITH_INNODB_MEMCACHED=1 - ] - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # We don't want to keep a 240MB+ folder around most users won't need. - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}" - end - rm_rf prefix/"mysql-test" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - libexec.install bin/"mysqlaccess" - libexec.install bin/"mysqlaccess.conf" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the datadir exists - datadir.mkpath - unless (datadir/"mysql/general_log.CSM").exist? - ENV["TMPDIR"] = nil - system bin/"mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mysql@5.6/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{datadir} - - RunAtLoad - - WorkingDirectory - #{datadir} - - - EOS - end - - test do - begin - # Expects datadir to be a completely clean dir, which testpath isn't. - dir = Dir.mktmpdir - system bin/"mysql_install_db", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{dir}", "--tmpdir=#{dir}" - - pid = fork do - exec bin/"mysqld", "--datadir=#{dir}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:3306") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mysql@5.7.rb b/Formula/mysql@5.7.rb deleted file mode 100644 index 6ad4dda337374..0000000000000 --- a/Formula/mysql@5.7.rb +++ /dev/null @@ -1,156 +0,0 @@ -class MysqlAT57 < Formula - desc "Open source relational database management system" - homepage "https://dev.mysql.com/doc/refman/5.7/en/" - url "https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.24.tar.gz" - sha256 "b980dced9c9eb3385cca44870facc220504ca011196c5a19c2bfe43d3f5d6212" - - bottle do - rebuild 1 - sha256 "729dd1d4a74b33c896db22208cd2a32056f669229fe2af755f250267c3a2365a" => :mojave - sha256 "667541324e582ceb8c1adb66333e41c5fdb7b054fb25d8203dcfe5dd3f3f0f8b" => :high_sierra - sha256 "889653b5b94e283f3adecb4bb4aab88e65608274fe6da4ee35da0acb30608301" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - # https://github.com/Homebrew/homebrew-core/issues/1475 - # Needs at least Clang 3.3, which shipped alongside Lion. - # Note: MySQL themselves don't support anything below El Capitan. - depends_on :macos => :lion - depends_on "openssl" - - def datadir - var/"mysql" - end - - def install - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DCOMPILATION_COMMENT=Homebrew - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_PLUGINDIR=lib/plugin - -DMYSQL_DATADIR=#{datadir} - -DSYSCONFDIR=#{etc} - -DWITH_BOOST=boost - -DWITH_EDITLINE=system - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DWITH_EMBEDDED_SERVER=ON - -DENABLED_LOCAL_INFILE=1 - -DWITH_INNODB_MEMCACHED=ON - ] - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}" - end - - # Remove the tests directory - rm_rf prefix/"mysql-test" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Fix up the control script and link into bin. - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, - "\\1:#{HOMEBREW_PREFIX}/bin\\2" - bin.install_symlink prefix/"support-files/mysql.server" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the datadir exists - datadir.mkpath - unless (datadir/"mysql/general_log.CSM").exist? - ENV["TMPDIR"] = nil - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" - end - end - - def caveats - s = <<~EOS - We've installed your MySQL database without a root password. To secure it run: - mysql_secure_installation - - MySQL is configured to only allow connections from localhost by default - - To connect run: - mysql -uroot - EOS - if my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x } - s += <<~EOS - - A "#{my_cnf}" from another install may interfere with a Homebrew-built - server starting up correctly. - EOS - end - s - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mysql@5.7/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{datadir} - - RunAtLoad - - WorkingDirectory - #{datadir} - - - EOS - end - - test do - begin - # Expects datadir to be a completely clean dir, which testpath isn't. - dir = Dir.mktmpdir - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{dir}", "--tmpdir=#{dir}" - - pid = fork do - exec bin/"mysqld", "--bind-address=127.0.0.1", "--datadir=#{dir}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:3306") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/mysqltuner.rb b/Formula/mysqltuner.rb deleted file mode 100644 index 7ea779e46444e..0000000000000 --- a/Formula/mysqltuner.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Mysqltuner < Formula - desc "Increase performance and stability of a MySQL installation" - homepage "https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl" - url "https://github.com/major/MySQLTuner-perl/archive/1.7.13.tar.gz" - sha256 "93b34c979a81ab13bd5a3c2f6cc6f3dcd432a344add2885b8ebe1d761905cd15" - head "https://github.com/major/MySQLTuner-perl.git" - - bottle :unneeded - - def install - bin.install "mysqltuner.pl" => "mysqltuner" - end - - # mysqltuner analyzes your database configuration by connecting to a - # mysql server. It is not really feasible to spawn a mysql server - # just for a test case so we'll stick with a rudimentary test. - test do - system "#{bin}/mysqltuner", "--help" - end -end diff --git a/Formula/mytop.rb b/Formula/mytop.rb deleted file mode 100644 index 64d2b99c344b4..0000000000000 --- a/Formula/mytop.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Mytop < Formula - desc "Top-like query monitor for MySQL" - homepage "http://www.mysqlfanboy.com/mytop-3/" - url "http://www.mysqlfanboy.com/mytop-3/mytop-1.9.1.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mytop/mytop_1.9.1.orig.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mytop/mytop_1.9.1.orig.tar.gz" - sha256 "179d79459d0013ab9cea2040a41c49a79822162d6e64a7a85f84cdc44828145e" - revision 6 - - bottle do - cellar :any - rebuild 1 - sha256 "873b88c76650758b49e1749e35c765b5179ffd371ab489f146b35da1e3620029" => :mojave - sha256 "8d64c44dcfccde35179d48a1698f0108df3c621e68ee7f8716a6d6db35cc1448" => :high_sierra - sha256 "26a4812e17d0285a28176d8bd735e06a1196a794c7cefb4837f7ab9a9ed4272d" => :sierra - end - - depends_on "mysql-client" - depends_on "openssl" - - conflicts_with "mariadb", :because => "both install `mytop` binaries" - - resource "List::Util" do - url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.46.tar.gz" - sha256 "30662b1261364adb317e9a5bd686273d3dd731e3fda1b8e894802aa52e0052e7" - end - - resource "Config::IniFiles" do - url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Config-IniFiles-2.94.tar.gz" - sha256 "d6d38a416da79de874c5f1825221f22e972ad500b6527d190cc6e9ebc45194b4" - end - - # In Mojave, this is not part of the system Perl anymore - if MacOS.version >= :mojave - resource "DBI" do - url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.641.tar.gz" - sha256 "5509e532cdd0e3d91eda550578deaac29e2f008a12b64576e8c261bb92e8c2c1" - end - end - - resource "DBD::mysql" do - url "https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.046.tar.gz" - sha256 "6165652ec959d05b97f5413fa3dff014b78a44cf6de21ae87283b28378daf1f7" - end - - # Pick up some patches from Debian to improve functionality & fix - # some syntax warnings when using recent versions of Perl. - patch do - url "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/m/mytop/mytop_1.9.1-2.debian.tar.xz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/m/mytop/mytop_1.9.1-2.debian.tar.xz" - sha256 "9c97b7d2a2d4d169c5f263ce0adb6340b71e3a0afd4cdde94edcead02421489a" - apply "patches/01_fix_pod.patch", - "patches/02_remove_db_test.patch", - "patches/03_fix_newlines.patch", - "patches/04_fix_unitialized.patch", - "patches/05_prevent_ctrl_char_printing.patch", - "patches/06_fix_screenwidth.patch", - "patches/07_add_doc_on_missing_cli_options.patch", - "patches/08_add_mycnf.patch", - "patches/09_q_is_quit.patch", - "patches/10_fix_perl_warnings.patch", - "patches/13_fix_scope_for_show_slave_status_data.patch" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}" - system "make", "test", "install" - share.install prefix/"man" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - assert_match "username you specified", pipe_output("#{bin}/mytop 2>&1") - end -end diff --git a/Formula/n.rb b/Formula/n.rb deleted file mode 100644 index 393d159affd4b..0000000000000 --- a/Formula/n.rb +++ /dev/null @@ -1,23 +0,0 @@ -class N < Formula - desc "Node version management" - homepage "https://github.com/tj/n" - url "https://github.com/tj/n/archive/v2.1.12.tar.gz" - sha256 "fdcd2f19cee7fdbe1e5584e06bd12106fbc283bbb41b2188acbddf3280068ea1" - head "https://github.com/tj/n.git" - - bottle do - cellar :any_skip_relocation - sha256 "3d2d6d14656cc7cd2bed8ecb257c250fc5792a8173f3461175329ae0f94da8a5" => :mojave - sha256 "cfa1403ccb97b99957c561703936de5cd14dda63493ecff2608c67c455e6551f" => :high_sierra - sha256 "cfa1403ccb97b99957c561703936de5cd14dda63493ecff2608c67c455e6551f" => :sierra - end - - def install - bin.mkdir - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system bin/"n", "ls" - end -end diff --git a/Formula/n/n.rb b/Formula/n/n.rb new file mode 100644 index 0000000000000..d82e95fffcc4f --- /dev/null +++ b/Formula/n/n.rb @@ -0,0 +1,22 @@ +class N < Formula + desc "Node version management" + homepage "https://github.com/tj/n" + url "https://github.com/tj/n/archive/refs/tags/v10.2.0.tar.gz" + sha256 "5914f0d5e89aadaaaeb803baa89a7582747b0c57ad30201b3522cd76f504c7d9" + license "MIT" + head "https://github.com/tj/n.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3c9c7f8da6a1a735450f6e1b7a49483aa878ef6dc4657e68f4d3bb238cade1c2" + end + + def install + bin.mkdir + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"n", "ls" + end +end diff --git a/Formula/n/n8n-mcp.rb b/Formula/n/n8n-mcp.rb new file mode 100644 index 0000000000000..dc0b59c1b136c --- /dev/null +++ b/Formula/n/n8n-mcp.rb @@ -0,0 +1,37 @@ +class N8nMcp < Formula + desc "MCP for Claude Desktop, Claude Code, Windsurf, Cursor to build n8n workflows" + homepage "https://www.n8n-mcp.com/" + url "https://registry.npmjs.org/n8n-mcp/-/n8n-mcp-2.22.9.tgz" + sha256 "522eb0efd0babc6aa9503d43d2b748436a90c144368e9d5edc31fae366196b12" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5f399d083d5d7b5b8763c6cd7244836aaa6ee81d2727f6efaa0d6f942468b0ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed05c4aefbcea2296b130e676928a5779dc4cf3bc78d86d9db889731c019d130" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05877dfe6c526c260b9ed026118fb4a28710b47b17d2f996db68bb231f0a9747" + sha256 cellar: :any_skip_relocation, sonoma: "ad7928ba9c219bd916e9e27e8fd48991a6ecfe1e5395eae36404c90143e644e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f51133fa880c2c6f7fa4db2f852e08311adf53f27aa342f2842247ba22bab87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb6578804fe42c2e6468c99cf7b8f4a1dba86f42c653579e1aef5b84e3074a01" + end + + depends_on "node@22" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + ENV["N8N_API_URL"] = "https://your-n8n-instance.com" + ENV["N8N_API_KEY"] = "your-api-key" + + output_log = testpath/"output.log" + pid = spawn bin/"n8n-mcp", testpath, [:out, :err] => output_log.to_s + sleep 10 + sleep 5 if OS.mac? && Hardware::CPU.intel? + assert_match "n8n Documentation MCP Server running on stdio transport", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/n/naabu.rb b/Formula/n/naabu.rb new file mode 100644 index 0000000000000..b71dbf9cd4772 --- /dev/null +++ b/Formula/n/naabu.rb @@ -0,0 +1,33 @@ +class Naabu < Formula + desc "Fast port scanner" + homepage "https://docs.projectdiscovery.io/tools/naabu/overview" + url "https://github.com/projectdiscovery/naabu/archive/refs/tags/v2.3.5.tar.gz" + sha256 "6b754a7cb49e8cbc68b64ca7ed0130c2f6fe6436b4cf3d1acb8b62a5e83a56a3" + license "MIT" + head "https://github.com/projectdiscovery/naabu.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3b63cf7dfcfc82b4e7af46c87d02b4a5ff0fd1e6aaefdd9488c20be0bc65964" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8555f19b0ece4d28bede4c65bc0dacf9d45c10506ecafaa58ee2ab8945665e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3843a160c6ed12a2e39664619aa947ed98a6de5b9630f0a3ce032423af9a806d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ce5bca033caa3bc9a1a6302927f394f278065c0602d291fddf1c69828a329896" + sha256 cellar: :any_skip_relocation, sonoma: "669da278198ac01b56f2d21aec752e16ed89e0aff21ceb9ba8f0cf48eca3981e" + sha256 cellar: :any_skip_relocation, ventura: "775a53f96a8c848c2740de35f262c6da866329fe61dc074757280f75a80f68cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c112b3262e6423754bf1f68990aabc2f7ea07edcbb0cf01abe2e0262be4c3b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91d01ff344133fe4d95196c6133f1d7416a5325f1c7db27b3e621b8262b6afcd" + end + + depends_on "go" => :build + + uses_from_macos "libpcap" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/naabu" + end + + test do + assert_match "brew.sh:443", shell_output("#{bin}/naabu -host brew.sh -p 443") + + assert_match version.to_s, shell_output("#{bin}/naabu --version 2>&1") + end +end diff --git a/Formula/n/nacl.rb b/Formula/n/nacl.rb new file mode 100644 index 0000000000000..0e6fe111f005e --- /dev/null +++ b/Formula/n/nacl.rb @@ -0,0 +1,61 @@ +class Nacl < Formula + desc "Network communication, encryption, decryption, signatures library" + homepage "https://nacl.cr.yp.to/" + url "https://hyperelliptic.org/nacl/nacl-20110221.tar.bz2" + mirror "https://deb.debian.org/debian/pool/main/n/nacl/nacl_20110221.orig.tar.bz2" + sha256 "4f277f89735c8b0b8a6bbd043b3efb3fa1cc68a9a5da6a076507d067fc3b3bf8" + license :public_domain + + # On an HTML page, we typically match versions from file URLs in `href` + # attributes. This "Installation" page only provides the archive URL in text, + # so this regex is a bit different. + livecheck do + url "https://nacl.cr.yp.to/install.html" + regex(%r{https?://[^\n]+?/nacl[._-]v?(\d+{6,8})\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, sonoma: "2bc9b50523f178e04e9241b85554bf361f1c1e4fb70105be8b8897db0d8622ca" + sha256 cellar: :any_skip_relocation, ventura: "e79dfbf0f21c155f30ffd7f61b012ca4ff2092fbad508e59a44de5ff2894c307" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01602518b18033cb7a49ca9716072b02a9115f469b15b85661459f948707fb5a" + end + + depends_on arch: :x86_64 + + def install + # Print the build to stdout rather than the default logfile. + # Logfile makes it hard to debug and spot hangs. Applied by Debian: + # https://sources.debian.net/src/nacl/20110221-4.1/debian/patches/output-while-building/ + # Also, like Debian, inreplace the hostname because it isn't used outside + # build process and adds an unpredictable factor. + inreplace "do" do |s| + s.gsub! 'exec >"$top/log"', 'exec | tee "$top/log"' + s.gsub!(/^shorthostname=`.*$/, "shorthostname=brew") + end + + system "./do" # This takes a while since it builds *everything* + + # NaCL has an odd compilation model and installs the resulting + # binaries in a directory like: + # /build//lib//libnacl.a + # /build//include//crypto_box.h + # + # It also builds both x86 and x86_64 copies if your compiler can + # handle it, but we install only one. + archstr = "amd64" + + # Don't include cpucycles.h + include.install Dir["build/brew/include/#{archstr}/crypto_*.h"] + include.install "build/brew/include/#{archstr}/randombytes.h" + + # Add randombytes.o to the libnacl.a archive - I have no idea why it's separated, + # but plenty of the key generation routines depend on it. Users shouldn't have to + # know this. + nacl_libdir = "build/brew/lib/#{archstr}" + system "ar", "-r", "#{nacl_libdir}/libnacl.a", "#{nacl_libdir}/randombytes.o" + lib.install "#{nacl_libdir}/libnacl.a" + end +end diff --git a/Formula/n/naga-cli.rb b/Formula/n/naga-cli.rb new file mode 100644 index 0000000000000..b41e7261cf384 --- /dev/null +++ b/Formula/n/naga-cli.rb @@ -0,0 +1,151 @@ +class NagaCli < Formula + desc "Shader translation command-line tool" + homepage "https://wgpu.rs/" + url "https://static.crates.io/crates/naga-cli/naga-cli-27.0.0.crate" + sha256 "8748068e95ce3aa171573194b8b35a378e28768df86c15982a8369e8384f216d" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/gfx-rs/wgpu.git", branch: "trunk" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1dd9804b6401623b8ff702fff266aa45d8838fbbd380e7b80b0394a49b6a704b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c7c363a8a546ce9b02a94d786bd9a1f3bac73c55b8c98aa8ae294670611a7a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abfd0f32fb60ba28b9787987f1ea175e48a89368385003fd981837f737620000" + sha256 cellar: :any_skip_relocation, sonoma: "1418f7a0ac5309e7ba1e0fe33a4e2c19a5a6269831c438f899c83cf5d1a190be" + sha256 cellar: :any_skip_relocation, arm64_linux: "957cb3b3a1c9558dc252b372fdc097bd05f19dffd3315b45dd9db07b74c186c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "561a995d340b6b5b39a2d122ca2d46931b1c45279747cdec6dd91371d0b62ff8" + end + + depends_on "rust" => :build + + conflicts_with "naga", because: "both install `naga` binary" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # sample taken from the Naga test suite + test_wgsl = testpath/"test.wgsl" + test_wgsl.write <<~WGSL + @fragment + fn derivatives(@builtin(position) foo: vec4) -> @location(0) vec4 { + let x = dpdx(foo); + let y = dpdy(foo); + let z = fwidth(foo); + return (x + y) * z; + } + WGSL + assert_equal "Validation successful", shell_output("#{bin}/naga #{test_wgsl}").strip + test_out_wgsl = testpath/"test_out.wgsl" + test_out_frag = testpath/"test_out.frag" + test_out_metal = testpath/"test_out.metal" + test_out_hlsl = testpath/"test_out.hlsl" + test_out_dot = testpath/"test_out.dot" + system bin/"naga", test_wgsl, test_out_wgsl, test_out_frag, test_out_metal, test_out_hlsl, test_out_dot, + "--profile", "es310", "--entry-point", "derivatives" + assert_equal <<~WGSL, test_out_wgsl.read + @fragment#{" "} + fn derivatives(@builtin(position) foo: vec4) -> @location(0) vec4 { + let x = dpdx(foo); + let y = dpdy(foo); + let z = fwidth(foo); + return ((x + y) * z); + } + WGSL + assert_equal <<~GLSL, test_out_frag.read + #version 310 es + + precision highp float; + precision highp int; + + layout(location = 0) out vec4 _fs2p_location0; + + void main() { + vec4 foo = gl_FragCoord; + vec4 x = dFdx(foo); + vec4 y = dFdy(foo); + vec4 z = fwidth(foo); + _fs2p_location0 = ((x + y) * z); + return; + } + + GLSL + assert_equal <<~CPP, test_out_metal.read + // language: metal1.0 + #include + #include + + using metal::uint; + + + struct derivativesInput { + }; + struct derivativesOutput { + metal::float4 member [[color(0)]]; + }; + fragment derivativesOutput derivatives( + metal::float4 foo [[position]] + ) { + metal::float4 x = metal::dfdx(foo); + metal::float4 y = metal::dfdy(foo); + metal::float4 z = metal::fwidth(foo); + return derivativesOutput { (x + y) * z }; + } + CPP + assert_equal <<~HLSL, test_out_hlsl.read + struct FragmentInput_derivatives { + float4 foo_1 : SV_Position; + }; + + float4 derivatives(FragmentInput_derivatives fragmentinput_derivatives) : SV_Target0 + { + float4 foo = fragmentinput_derivatives.foo_1; + float4 x = ddx(foo); + float4 y = ddy(foo); + float4 z = fwidth(foo); + return ((x + y) * z); + } + HLSL + assert_equal <<~DOT, test_out_dot.read + digraph Module { + subgraph cluster_globals { + label="Globals" + } + subgraph cluster_ep0 { + label="Fragment/'derivatives'" + node [ style=filled ] + ep0_e0 [ color="#8dd3c7" label="[0] Argument[0]" ] + ep0_e1 [ color="#fccde5" label="[1] dXNone" ] + ep0_e0 -> ep0_e1 [ label="" ] + ep0_e2 [ color="#fccde5" label="[2] dYNone" ] + ep0_e0 -> ep0_e2 [ label="" ] + ep0_e3 [ color="#fccde5" label="[3] dWidthNone" ] + ep0_e0 -> ep0_e3 [ label="" ] + ep0_e4 [ color="#fdb462" label="[4] Add" ] + ep0_e2 -> ep0_e4 [ label="right" ] + ep0_e1 -> ep0_e4 [ label="left" ] + ep0_e5 [ color="#fdb462" label="[5] Multiply" ] + ep0_e3 -> ep0_e5 [ label="right" ] + ep0_e4 -> ep0_e5 [ label="left" ] + ep0_s0 [ shape=square label="Root" ] + ep0_s1 [ shape=square label="Emit" ] + ep0_s2 [ shape=square label="Emit" ] + ep0_s3 [ shape=square label="Emit" ] + ep0_s4 [ shape=square label="Emit" ] + ep0_s5 [ shape=square label="Return" ] + ep0_s0 -> ep0_s1 [ arrowhead=tee label="" ] + ep0_s1 -> ep0_s2 [ arrowhead=tee label="" ] + ep0_s2 -> ep0_s3 [ arrowhead=tee label="" ] + ep0_s3 -> ep0_s4 [ arrowhead=tee label="" ] + ep0_s4 -> ep0_s5 [ arrowhead=tee label="" ] + ep0_e5 -> ep0_s5 [ label="value" ] + ep0_s1 -> ep0_e1 [ style=dotted ] + ep0_s2 -> ep0_e2 [ style=dotted ] + ep0_s3 -> ep0_e3 [ style=dotted ] + ep0_s4 -> ep0_e4 [ style=dotted ] + ep0_s4 -> ep0_e5 [ style=dotted ] + } + } + DOT + end +end diff --git a/Formula/n/naga.rb b/Formula/n/naga.rb new file mode 100644 index 0000000000000..1436e5d54e648 --- /dev/null +++ b/Formula/n/naga.rb @@ -0,0 +1,38 @@ +class Naga < Formula + desc "Terminal implementation of the Snake game" + homepage "https://github.com/anayjoshi/naga/" + url "https://github.com/anayjoshi/naga/archive/refs/tags/naga-v1.0.tar.gz" + sha256 "7f56b03b34e2756b9688e120831ef4f5932cd89b477ad8b70b5bcc7c32f2f3b3" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2e548adf90a520aa549773229c0dfe0efd998f3c002d42f8816001ccc6d2cd8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ff5ae52821845aa9ac4bc84d74ec1554a08984c37767fc5facba882ff322f98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c49ba4967205f60079ad869d397bc75e1dd4130b86595dfd06a45836febccdb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d32ce728cc5082fb81b509ee4d2aacdf3f3b3e5c99653493412afca4f4558559" + sha256 cellar: :any_skip_relocation, arm64_monterey: "060c060175d76dd77c768ec1fd07fe74fc01e404e4f4a6b8be3a75cead596abb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5598664fc7fd64d0f76d0291bbe79c209a65fd8142d6cbf7f7164531d538b9c5" + sha256 cellar: :any_skip_relocation, sonoma: "61f379c8bd1babc088d64e3c1f64b6f480aff5f911e0b7619495614143a32f69" + sha256 cellar: :any_skip_relocation, ventura: "b1a38c76c5088aab68b817aea8d249a40f2aec9101606494d42182826528561b" + sha256 cellar: :any_skip_relocation, monterey: "6b013d2185f67b684ab4f49db162fdb32bba2dc6914d9855c6f7fbb4bd5603f9" + sha256 cellar: :any_skip_relocation, big_sur: "58d4a48fe33e676993449a2cdf332f74b6858681bc5519374d6e7a8842df9434" + sha256 cellar: :any_skip_relocation, catalina: "4a397ca0cf60725415818826e47fbf20c4b9cad2bc754128ece0d50279b715fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff3c81dd29c36428f64d815f798bdb6c9a57aa7f73961c4eff5d5b08bd70cf07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8ea8f618dc69a283560a3a51335c476824cee8bf5da7233620021e3c95f6fa7" + end + + uses_from_macos "ncurses" + + conflicts_with "naga-cli", because: "both install `naga` binary" + + def install + bin.mkpath + system "make", "install", "INSTALL_PATH=#{bin}/naga" + end + + test do + assert_path_exists bin/"naga" + end +end diff --git a/Formula/n/nagios-plugins.rb b/Formula/n/nagios-plugins.rb new file mode 100644 index 0000000000000..02e75a409de79 --- /dev/null +++ b/Formula/n/nagios-plugins.rb @@ -0,0 +1,54 @@ +class NagiosPlugins < Formula + desc "Plugins for the nagios network monitoring system" + homepage "https://www.nagios-plugins.org/" + url "https://github.com/nagios-plugins/nagios-plugins/releases/download/release-2.4.12/nagios-plugins-2.4.12.tar.gz" + sha256 "9a246245d8270f15759763160c48df5dcdc2af9632733a5238930fde6778b578" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "6e751f176edcabbb88a2606c98ec0f3062e717b4b0ab5ffaa0e8d16b9406dc06" + sha256 arm64_sequoia: "10c5062b3d3edead969f7e18215628e643a7e71f8fdf5b25806305e767c1b999" + sha256 arm64_sonoma: "1617bf68a8d2468f70a4e0e9d46cffee9883578dfa0eddcc1af71463bf55ef12" + sha256 arm64_ventura: "2c4c5f8a661d01b36f7fc1a5fc5f4c24971516fc47f907da6818842e26fd51e0" + sha256 arm64_monterey: "4592b8a1585568faa9129f9b5ca5ff9f2eee674dac8763b684ba721bdacb2635" + sha256 sonoma: "3a9c7c79fe4c09d02b7287c16b62d2f3d0870752f538b5e4a57857ba0e745803" + sha256 ventura: "2fe347734de901c7483944d7c1538bffb740202f88920a626eccd6ec41c9c35e" + sha256 monterey: "735a78ed14375db0a52fc95f6b93f9410f47717250e134d8c19c4c70e6bce23f" + sha256 arm64_linux: "355d267b73906c7fd019558f9f85019a9cc0547215e0bcbe3614724572d18149" + sha256 x86_64_linux: "dd70e314dbf872a7f0e54bc7364a3c86ed14b8ebe621825512a6421df14f15eb" + end + + depends_on "gettext" + depends_on "openssl@3" + + on_linux do + depends_on "bind" + end + + conflicts_with "monitoring-plugins", because: "both install their plugins to the same folder" + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{libexec} + --libexecdir=#{libexec}/sbin + --with-openssl=#{Formula["openssl@3"].opt_prefix} + ] + + system "./configure", *args + system "make", "install" + sbin.write_exec_script Dir["#{libexec}/sbin/*"] + end + + def caveats + <<~EOS + All plugins have been installed in: + #{HOMEBREW_PREFIX}/sbin + EOS + end + + test do + output = shell_output("#{sbin}/check_dns -H brew.sh -s 8.8.8.8 -t 3") + assert_match "DNS OK", output + end +end diff --git a/Formula/n/nagios.rb b/Formula/n/nagios.rb new file mode 100644 index 0000000000000..b107c3549f666 --- /dev/null +++ b/Formula/n/nagios.rb @@ -0,0 +1,106 @@ +class Nagios < Formula + desc "Network monitoring and management system" + homepage "https://www.nagios.org/" + url "https://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.5.9/nagios-4.5.9.tar.gz" + sha256 "b0add4cb7637b46bca8d5b1645ffa2537747649bdc881f228f916539677951ec" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/nagios[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "85acb132e68bd3e6ce2ee9b136dc771c6f5e22799d6b0122c3456671e7a64c33" + sha256 arm64_sequoia: "9646c0ff39a620deeddb386028b140930d4204e62dd67e68d158774c4825c542" + sha256 arm64_sonoma: "c9d84510322c0b776b886faf0fe4fb2b1d238a8203751aeb47d18f4875370473" + sha256 arm64_ventura: "a2fbf4c911c2de1b1d135ef9a29882e21a1f6d7e5ccad4f5dde1d5138a72926b" + sha256 sonoma: "d96bd15c74973f9f45dc4b29f0eab5c22ff9dae05206786be854ab9db228759a" + sha256 ventura: "2be2887f399a467087b82119aadbb0e392b58736def5696daf328c9284a5ed9d" + sha256 arm64_linux: "e4eb8032f20aae59ce984934d3e4d97dace685cbc8b92f30fa7a9dc97fc56839" + sha256 x86_64_linux: "17ea83b36c6ff5f2cc372297b7398649f4032afdb56bf5c86ae59d4dd20ba100" + end + + depends_on "gd" + depends_on "libpng" + depends_on "openssl@3" + + uses_from_macos "unzip" + + on_macos do + depends_on "jpeg-turbo" + end + + def nagios_sbin + prefix/"cgi-bin" + end + + def nagios_etc + etc/"nagios" + end + + def nagios_var + var/"lib/nagios" + end + + def htdocs + pkgshare/"htdocs" + end + + def user + Utils.safe_popen_read("id", "-un").chomp + end + + def group + Utils.safe_popen_read("id", "-gn").chomp + end + + def install + args = [ + "--sbindir=#{nagios_sbin}", + "--sysconfdir=#{nagios_etc}", + "--localstatedir=#{nagios_var}", + "--datadir=#{htdocs}", + "--libexecdir=#{HOMEBREW_PREFIX}/sbin", # Plugin dir + "--with-cgiurl=/nagios/cgi-bin", + "--with-htmurl=/nagios", + "--with-nagios-user=#{user}", + "--with-nagios-group='#{group}'", + "--with-command-user=#{user}", + "--with-httpd-conf=#{share}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + "--disable-libtool", + ] + args << "--with-command-group=_www" if OS.mac? + + system "./configure", *std_configure_args, *args + system "make", "all" + system "make", "install" + + # Install config + system "make", "install-config" + system "make", "install-webconf" + end + + def post_install + (var/"lib/nagios/rw").mkpath + + config = etc/"nagios/nagios.cfg" + return unless config.exist? + return if config.read.include?("nagios_user=#{ENV["USER"]}") + + inreplace config, /^nagios_user=.*/, "nagios_user=#{ENV["USER"]}" + end + + service do + run [opt_bin/"nagios", etc/"nagios/nagios.cfg"] + keep_alive true + require_root true + log_path File::NULL + error_log_path File::NULL + end + + test do + assert_match version.to_s, shell_output("#{bin}/nagios --version") + end +end diff --git a/Formula/n/nak.rb b/Formula/n/nak.rb new file mode 100644 index 0000000000000..2dff851859ada --- /dev/null +++ b/Formula/n/nak.rb @@ -0,0 +1,31 @@ +class Nak < Formula + desc "CLI for doing all things nostr" + homepage "https://github.com/fiatjaf/nak" + url "https://github.com/fiatjaf/nak/archive/refs/tags/v0.16.2.tar.gz" + sha256 "fac913a29e8a12408819a5e036d264d2e31a9bd3baee48ad02dbdd8e04e2f91f" + license "Unlicense" + head "https://github.com/fiatjaf/nak.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be454c25e7c873cb227a947a19bc40129e6608483114d6e4fa0205ad0c5d2fd7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be454c25e7c873cb227a947a19bc40129e6608483114d6e4fa0205ad0c5d2fd7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be454c25e7c873cb227a947a19bc40129e6608483114d6e4fa0205ad0c5d2fd7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "be454c25e7c873cb227a947a19bc40129e6608483114d6e4fa0205ad0c5d2fd7" + sha256 cellar: :any_skip_relocation, sonoma: "04bc2d81fd2004bfc8c9a2187d795807de89d347ca7338bc1d3307732256d62e" + sha256 cellar: :any_skip_relocation, ventura: "04bc2d81fd2004bfc8c9a2187d795807de89d347ca7338bc1d3307732256d62e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9674237330fa2e02dc819fa92e8c9d2a5001affff399657ed5cf3c0c3fc50bca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58f5e7a2435a994fd1a08f94edf7abc8d7e68add6c2a2cd3dff8ef330c92359e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nak --version") + assert_match "hello from the nostr army knife", shell_output("#{bin}/nak event") + assert_match "failed to fetch 'listblockedips'", shell_output("#{bin}/nak relay listblockedips 2>&1") + end +end diff --git a/Formula/n/nali.rb b/Formula/n/nali.rb new file mode 100644 index 0000000000000..bdb1916dfd4e5 --- /dev/null +++ b/Formula/n/nali.rb @@ -0,0 +1,38 @@ +class Nali < Formula + desc "Tool for querying IP geographic information and CDN provider" + homepage "https://github.com/zu1k/nali" + url "https://github.com/zu1k/nali/archive/refs/tags/v0.8.1.tar.gz" + sha256 "8918e4c1c720dad1590a42fa04c5fea1ec862148127206e716daa16c1ce3561c" + license "MIT" + head "https://github.com/zu1k/nali.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6f8043064c089c1aecc60e6c8f0c1cf921884e71525135ce10d4ce82f8cf52fb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49c0a2adfd6547b5f9106bb4cae051405966c565f5c947223071b0b176d67f73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76f8757159e2e3c2bfb3109af9f600c1e7f677350f60921bec3473fbf4bc3aa5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89356d49ebdb86e18fca7e8926abfaa960cbd1a46f1b48338ebbc74ced01118b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fb89af61ac162342c4ca2653bff21a9f8a75d63abc1dd86692bc041d24f23d8b" + sha256 cellar: :any_skip_relocation, sonoma: "e7d393c430c3ca19676c066a8b3cb56326294b548d86640b5e2eb72a460760d8" + sha256 cellar: :any_skip_relocation, ventura: "3ef92c525d545264883712778c49e3c7484a4fb82b778fe1b4dbf05f32c8f710" + sha256 cellar: :any_skip_relocation, monterey: "35b1f99514e2f869460effc62db4c8d9bf2449a21eb30e4abfa26dd6a36e761a" + sha256 cellar: :any_skip_relocation, arm64_linux: "da3fb0a82003774a8bb47edb40c1b8d474f673d1bc30445b5d8518323329533b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71a140b6b0fc32fa502fdc1edf5bac51e5c4d1cc3e8f6abe99abc55e80c69a1f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"nali", "completion") + end + + test do + ip = "1.1.1.1" + # Default database used by program is in Chinese, while downloading an English one + # requires an third-party account. + # This example reads "Australia APNIC/CloudFlare Public DNS Server". + assert_match "#{ip} [澳大利亚 APNIC/CloudFlare公共DNS服务器]", shell_output("#{bin}/nali #{ip}") + end +end diff --git a/Formula/n/name-that-hash.rb b/Formula/n/name-that-hash.rb new file mode 100644 index 0000000000000..bea7340b627ef --- /dev/null +++ b/Formula/n/name-that-hash.rb @@ -0,0 +1,58 @@ +class NameThatHash < Formula + include Language::Python::Virtualenv + + desc "Modern hash identification system" + homepage "https://nth.skerritt.blog/" + url "https://files.pythonhosted.org/packages/7a/d6/5bea2b09a8b4dbfd92610432dbbcdda9f983be3de770a296df957fed5d06/name_that_hash-1.11.0.tar.gz" + sha256 "6978a2659ce6d38c330ab8057b78bccac00bc3e87138f2774bec3af2276b0303" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/HashPals/Name-That-Hash.git", branch: "main" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "6cd397ec67920e83a4e742ada35c486fee1d62345bbd4cce01f7811cae71de8f" + end + + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + def install + virtualenv_install_with_resources + + %w[name-that-hash nth].each do |cmd| + generate_completions_from_executable(bin/cmd, shell_parameter_format: :click) + end + end + + test do + hash = "5f4dcc3b5aa765d61d8327deb882cf99" + output = shell_output("#{bin}/nth --text #{hash}") + assert_match "#{hash}\n", output + assert_match "MD5, HC: 0 JtR: raw-md5 Summary: Used for Linux Shadow files.\n", output + end +end diff --git a/Formula/n/naml.rb b/Formula/n/naml.rb new file mode 100644 index 0000000000000..e62e21cf15c82 --- /dev/null +++ b/Formula/n/naml.rb @@ -0,0 +1,51 @@ +class Naml < Formula + desc "Convert Kubernetes YAML to Golang" + homepage "https://github.com/krisnova/naml" + url "https://github.com/krisnova/naml/archive/refs/tags/v1.0.3.tar.gz" + sha256 "0842633268b06be82db4dd10c3c938f756f613c44c15c2d935b933409da8c4bd" + license "Apache-2.0" + head "https://github.com/krisnova/naml.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e0956fd9b0b5be64918c42a43f7d4a46271122c8141d3b9d0a399fd8e324772a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9419a7e317f004467aa1ce33906f4fcb74d33d5ea29e4b5959173f69a1e95117" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d2757a3ba04823d969e9298bebf32444870a24d94e47e9db8ce8ab80cec512c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c77699304de1696f3c92d571ff1665310464ffd6b737bcaef0c90c68c624408f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8620c41653aff4870bcc091d644b0f6845a38cb344c18ba61673fe4ef6bd04a0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "731c3edcac16fcce065e0bf79674ca20273a2874cb0a28e0dd3aa4b354a46a9d" + sha256 cellar: :any_skip_relocation, sonoma: "a1ebf7874087424b1a8e9ef16fee7767c715d7c569f63cd12c4dc5b1d64f6ce6" + sha256 cellar: :any_skip_relocation, ventura: "26cea66677bb7672bfb8fd52ddffb96478442c48b72c2d08eec9cf45557a8c6d" + sha256 cellar: :any_skip_relocation, monterey: "2171e40ba252fb5716f30dc8cf05d2a83ea88616c92ed5c2b9e45d48f6521061" + sha256 cellar: :any_skip_relocation, big_sur: "7e4965a3e7d56956ba85367b8bb70bf78e096dd3cf2f07648c2e0efcfff503aa" + sha256 cellar: :any_skip_relocation, catalina: "badeb70412ea16c9b1e98efb7889cb6145d0f44a090c0d688b5e331c913c2cf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "e89f839a62cd34498050873134d6459be85c2e0dea8bfff8362914dba5f89d91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfb2de73a6ca925bdb4599464e3e7759bcb823900ee2fe5ba0d0c3e4bb27d0c3" + end + + depends_on "go" + + def install + ldflags = %W[ + -s -w + -X github.com/kris-nova/naml.Version=#{version} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd" + end + + test do + assert_match "Not Another Markup Language", shell_output("#{bin}/naml list") + + (testpath/"service.yaml").write <<~YAML + apiVersion: v1 + kind: Namespace + metadata: + name: brewtest + YAML + + assert_match "Application autogenerated from NAML v#{version}", + pipe_output("#{bin}/naml codify", (testpath/"service.yaml").read) + end +end diff --git a/Formula/n/nano.rb b/Formula/n/nano.rb new file mode 100644 index 0000000000000..4f785eec02597 --- /dev/null +++ b/Formula/n/nano.rb @@ -0,0 +1,65 @@ +class Nano < Formula + desc "Free (GNU) replacement for the Pico text editor" + homepage "https://www.nano-editor.org/" + url "https://www.nano-editor.org/dist/v8/nano-8.6.tar.xz" + sha256 "f7abfbf0eed5f573ab51bd77a458f32d82f9859c55e9689f819d96fe1437a619" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.nano-editor.org/download.php" + regex(/href=.*?nano[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "2264d7db63d98eaec400967d883896b658b08c57e2705670a8a44ea82f725745" + sha256 arm64_sequoia: "0265660b145d8913478ae20cad410afbb1b53f02824e9b816a540a32a9275ba5" + sha256 arm64_sonoma: "690585c06379c43c6879f619986c2ac966b3bb7eed6294d164fc6bd9ea6e46fc" + sha256 arm64_ventura: "055b8c6908ce48cd986fea03e9d3c19de6b5f07f0aab6065ff1fbe8a45f93f75" + sha256 sonoma: "e375595d032a3c2c8ce7b83494e0ec5db6f4e825cf71b96d5e88f664c3e708d0" + sha256 ventura: "492a5a63d21a3f3a37fee73cd7e43d6a29816522602a49644d2c8ee56acdb8c6" + sha256 arm64_linux: "bc3334da17c9fcad12362040488ff76bec0e081b36e19f2feee1451a91f24510" + sha256 x86_64_linux: "28111d0754b7a278085b0c6b12867c46933c8ef3d9961f4dc3332eb89edd2821" + end + + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "ncurses" + + on_linux do + depends_on "libmagic" + end + + def install + system "./configure", "--enable-color", + "--enable-extra", + "--enable-multibuffer", + "--enable-nanorc", + "--enable-utf8", + "--sysconfdir=#{etc}", + *std_configure_args + system "make", "install" + doc.install "doc/sample.nanorc" + end + + test do + system bin/"nano", "--version" + + # Skip test on Intel macOS due to CI failures + return if OS.mac? && Hardware::CPU.intel? + + PTY.spawn(bin/"nano", "test.txt") do |r, w, _pid| + sleep 1 + w.write "test data" + sleep 1 + w.write "\u0018" # Ctrl+X + sleep 1 + w.write "y" # Confirm save + sleep 1 + w.write "\r" # Enter to confirm filename + sleep 1 + OS.mac? && r.read + end + + assert_match "test data", (testpath/"test.txt").read + end +end diff --git a/Formula/n/nanoarrow.rb b/Formula/n/nanoarrow.rb new file mode 100644 index 0000000000000..d0ce73d28acb7 --- /dev/null +++ b/Formula/n/nanoarrow.rb @@ -0,0 +1,39 @@ +class Nanoarrow < Formula + desc "Helpers for Arrow C Data & Arrow C Stream interfaces" + homepage "https://arrow.apache.org/nanoarrow" + url "https://github.com/apache/arrow-nanoarrow/archive/refs/tags/apache-arrow-nanoarrow-0.7.0.tar.gz" + sha256 "bb422ce7ed486abd95eb027a1ac092bbc1b5ed44955e89c098f0a1cb75109d5c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "80ebd3cac2eac2d67f2563d335cb9145d94f38a2403ee1470bb3099732f75a0a" + sha256 cellar: :any, arm64_sequoia: "bf71bbbdde9c971b89659c9ae196fc56ce3e7b180caacc3640a62cf20b7c62f1" + sha256 cellar: :any, arm64_sonoma: "672338d155c58aa60c7fe8107909b6c12c7b39d97581741b6073d6941867bafd" + sha256 cellar: :any, arm64_ventura: "997e95fcd0948c90c9680f98fe02c74b91dcced1937cc2dc74940711753e8ed4" + sha256 cellar: :any, sonoma: "5f4126977b7e17a6701822ec3529b8f550cd39d48c2de275e35d0a5dc0588609" + sha256 cellar: :any, ventura: "2c50ca39d9ad131e3bc0ef1583f301a79e41cb8831603b472e7c4bdc8f6a47a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fc86678c0558fba9a493d4dec9e68b8c0fd070c4765df27c1bdb3c083ab4ec5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8c7cb7755e696b37ea6bc6a64cc1602f03eddab8e89e285ef17b138e98658d1" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + ArrowBufferAllocatorDefault(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lnanoarrow_shared", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/nanobind.rb b/Formula/n/nanobind.rb new file mode 100644 index 0000000000000..8a8f978e76edb --- /dev/null +++ b/Formula/n/nanobind.rb @@ -0,0 +1,97 @@ +class Nanobind < Formula + desc "Tiny and efficient C++/Python bindings" + homepage "https://github.com/wjakob/nanobind" + url "https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.2.tar.gz" + sha256 "8ce3667dce3e64fc06bfb9b778b6f48731482362fb89a43da156632266cd5a90" + license "BSD-3-Clause" + head "https://github.com/wjakob/nanobind.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "aea1ec0524fce6cb6899de31e2af7e52c62dee38f24a1e36c053a1f83181f474" + end + + depends_on "cmake" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "robin-map" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", + "-DNB_USE_SUBMODULE_DEPS=OFF", + "-DNB_CREATE_INSTALL_RULES=ON", + "-DNB_INSTALL_DATADIR=#{pkgshare}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| Version.new(py.delete_prefix("python@")) } + python_versions.each do |pyver| + site_packages = lib/"python#{pyver}/site-packages" + site_packages.install_symlink pkgshare + end + end + + test do + python = "python3.14" + + (testpath/"my_ext.cpp").write <<~CPP + #include + + int add(int a, int b) { return a + b; } + + NB_MODULE(my_ext, m) { + m.def("add", &add); + } + CPP + + python_version = Language::Python.major_minor_version(python) + + cmakelists = testpath/"CMakeLists.txt" + cmakelists.write <<~CMAKE + cmake_minimum_required(VERSION 3.27) + project(test_nanobind) + + find_package(Python #{python_version} EXACT COMPONENTS Interpreter Development.Module REQUIRED) + + if(FIND_NANOBIND_USING_PYTHON) + execute_process( + COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir + OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT COMMAND_ERROR_IS_FATAL ANY) + endif() + find_package(nanobind CONFIG REQUIRED) + nanobind_add_module(my_ext my_ext.cpp) + CMAKE + + system "cmake", "-S", ".", "-B", "build", "-DFIND_NANOBIND_USING_PYTHON=OFF", *std_cmake_args + system "cmake", "--build", "build" + + cd "build" do + assert_equal "3", shell_output("#{python} -c 'import my_ext; print(my_ext.add(1, 2))'").chomp + end + + ENV.delete("CMAKE_PREFIX_PATH") + prefix_path_dirs = deps.filter_map { |dep| dep.to_formula.opt_prefix if !dep.build? || dep.test? } + cmake_find_args = %W[ + -DCMAKE_MAKE_PROGRAM=make + -DCMAKE_C_COMPILER=#{ENV.cc} + -DCMAKE_CXX_COMPILER=#{ENV.cxx} + -DCMAKE_PREFIX_PATH='#{prefix_path_dirs.join(";")}' + -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=OFF + -DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=OFF + ] + # Ensure that nanobind can by found only using `python3 -m nanobind`. + cmake_failure = "cmake -S . -B build-failure #{cmake_find_args.join(" ")} 2>&1" + assert_match 'Could not find a package configuration file provided by "nanobind"', shell_output(cmake_failure, 1) + + system "cmake", "-S", ".", "-B", "build-python", + "-DFIND_NANOBIND_USING_PYTHON=ON", + *cmake_find_args, *std_cmake_args + system "cmake", "--build", "build-python" + + cd "build-python" do + assert_equal "3", shell_output("#{python} -c 'import my_ext; print(my_ext.add(1, 2))'").chomp + end + end +end diff --git a/Formula/n/nanobot.rb b/Formula/n/nanobot.rb new file mode 100644 index 0000000000000..1a989b097ac7f --- /dev/null +++ b/Formula/n/nanobot.rb @@ -0,0 +1,39 @@ +class Nanobot < Formula + desc "Build MCP Agents" + homepage "https://www.nanobot.ai/" + url "https://github.com/nanobot-ai/nanobot/archive/refs/tags/v0.0.32.tar.gz" + sha256 "ecb2380cfdb3e6bdd38c576855baa906763ab2554c6bb3c11933fd6e1472b19a" + license "Apache-2.0" + head "https://github.com/nanobot-ai/nanobot.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a8f7b60365c463fa1261295482855c3016bfc39310ca1f09f4a4738935049bfc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "772667f4f1dccdbe00d8a5eef3d7ee7a0a2b0c684aa43bb12e72b77a0483392d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93a58feac13a2f017cfb8527d848d2c621ed2abbb4ca11768929af53958dd83e" + sha256 cellar: :any_skip_relocation, sonoma: "eb818ead181ffbc3e5f6714f52fd7bba5f3e70e8c06ffe5367f0240ccc35ce3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab382a5acba9b9a12d0f7ad1ea396efe0928ff6240c73f06c4f884e0fd162a1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8eebd5c4d69a9415f8e39350f991cca02e024f9af8a58f12a1b02555877a38b" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/nanobot-ai/nanobot/pkg/version.Tag=v#{version} + -X github.com/nanobot-ai/nanobot/pkg/version.BaseImage=ghcr.io/nanobot-ai/nanobot:v#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/nanobot --version") + + pid = spawn bin/"nanobot", "run" + sleep 1 + assert_path_exists testpath/"nanobot.db" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/n/nanoflann.rb b/Formula/n/nanoflann.rb new file mode 100644 index 0000000000000..2f3c7e2fbd782 --- /dev/null +++ b/Formula/n/nanoflann.rb @@ -0,0 +1,46 @@ +class Nanoflann < Formula + desc "Header-only library for Nearest Neighbor search with KD-trees" + homepage "https://github.com/jlblancoc/nanoflann" + url "https://github.com/jlblancoc/nanoflann/archive/refs/tags/v1.7.1.tar.gz" + sha256 "887e4e57e9c5fbf1c2937f9f5a9bc461c4786d54729b57a9c19547bdedb46986" + license "BSD-3-Clause" + head "https://github.com/jlblancoc/nanoflann.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "2b8a65bce4034e3469bb21a3071f8e7f1f06338b777332c1edea6b66d3c68ddc" + end + + depends_on "cmake" => :build + + on_macos do + depends_on "gcc" => [:build, :test] if DevelopmentTools.clang_build_version <= 1200 + end + + fails_with :clang do + build 1200 + cause "https://bugs.llvm.org/show_bug.cgi?id=23029" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DNANOFLANN_BUILD_EXAMPLES=OFF" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + nanoflann::KNNResultSet resultSet(1); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11" + system "./test" + end +end diff --git a/Formula/n/nanomsg.rb b/Formula/n/nanomsg.rb new file mode 100644 index 0000000000000..e61232d70b4d8 --- /dev/null +++ b/Formula/n/nanomsg.rb @@ -0,0 +1,42 @@ +class Nanomsg < Formula + desc "Socket library in C" + homepage "https://nanomsg.org/" + url "https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.2.tar.gz" + sha256 "3ffeafa9335245a23a99827e8d389bfce5100610f44ebbe4bfaf47e8192d5939" + license "MIT" + head "https://github.com/nanomsg/nanomsg.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "236e9d3c6a8a96e0cab956bd5dfd22e598a0cde9648d9ca850e385aef13c876f" + sha256 cellar: :any, arm64_sequoia: "2d674ed0ff11c730865b07f3110d650d88e097d27ea0ce62f39d96d2a59a6367" + sha256 cellar: :any, arm64_sonoma: "e9feaeab9e2f2b38117f1b62f682b6abeb86d41925bc329562c110e578c59f73" + sha256 cellar: :any, sonoma: "e3ee4bae6bf7df70c071c32fd0d12470406e146af552ee4de7f7701016a6609a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b03db650de3044ee4d0ed1bce200947e1018f34f76d4d06b9362ccae87134fee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13450a2b72db7c3d7f91b65d2f8153d73caedecb378921d6cf9e386afea4d322" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + bind = "tcp://127.0.0.1:#{free_port}" + + fork do + exec "#{bin}/nanocat --rep --bind #{bind} --format ascii --data home" + end + sleep 2 + + output = shell_output("#{bin}/nanocat --req --connect #{bind} --format ascii --data brew") + assert_match "home", output + end +end diff --git a/Formula/n/nanomsgxx.rb b/Formula/n/nanomsgxx.rb new file mode 100644 index 0000000000000..ad267249140e2 --- /dev/null +++ b/Formula/n/nanomsgxx.rb @@ -0,0 +1,96 @@ +class Nanomsgxx < Formula + desc "Nanomsg binding for C++11" + homepage "https://achille-roussel.github.io/nanomsgxx/doc/nanomsgxx.7.html" + url "https://github.com/achille-roussel/nanomsgxx/archive/refs/tags/0.2.tar.gz" + sha256 "116ad531b512d60ea75ef21f55fd9d31c00b172775548958e5e7d4edaeeedbaa" + license "MIT" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e859aa7a86e2a0703c6c26f69a6c841a2a92bb00c0f5617f472cac0bfed51457" + sha256 cellar: :any, arm64_sequoia: "e00674de838fa31a3eb50d9ce61925893777887d27fd28772cfc5baa2582069b" + sha256 cellar: :any, arm64_sonoma: "d792d22d76f9b3a2ca31eaaafa8853cd5d04a29bd0b635ecf6a2d1789e02bc7d" + sha256 cellar: :any, arm64_ventura: "edb680fdffb9c416a4d16175673b8a94f1ad2c84a668ff3814f749a811f98889" + sha256 cellar: :any, arm64_monterey: "8436ab0a7b9ed4472dfa37e576b2003510ca115e1ae686b2352d3bb00c351d92" + sha256 cellar: :any, arm64_big_sur: "722cb87d23c8dc14f3be995f3a83d3c8da43a2b76ebf621d57c27d63ce7c2598" + sha256 cellar: :any, sonoma: "2e682a0178342df86acb5df585a0df7a2af0455a86b151d7c45648e74c6ee8ad" + sha256 cellar: :any, ventura: "b3f6da0864f1363f4841affd17e32669c718e39865e5678af6fc968799e0fb96" + sha256 cellar: :any, monterey: "2cfef95f0fc27d9d297a50191ae3d8e1d69b9a8f80ff3f34bc6bb90a9626a41f" + sha256 cellar: :any, big_sur: "6509c8160cbe5dba38a77d3adc1f1d5d515feff427bad6441992dc40cb5b4d1a" + sha256 cellar: :any, catalina: "0c377d26b223a21b48d90920818baf7b241ebadfac8c60a3420e0c3054df7401" + sha256 cellar: :any_skip_relocation, arm64_linux: "5477033f88e080325eb53fbe0226f7e19c34fcbe0a0b5650c079d2029f319936" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed20e2617835e53e1ee41927a5066275c7b7a6058de093932be16bb89bf23cd4" + end + + depends_on "pkgconf" => :build + depends_on "nanomsg" + + uses_from_macos "python" => :build + + # Add python3 support + # + # This patch mimics changes from https://github.com/achille-roussel/nanomsgxx/pull/26 + # but can't be applied as a formula patch since it contains GIT binary patch + # + # Remove this in next release + resource "waf" do + url "https://raw.githubusercontent.com/achille-roussel/nanomsgxx/4426567809a79352f65bbd2d69488df237442d33/waf" + sha256 "0a09ad26a2cfc69fa26ab871cb558165b60374b5a653ff556a0c6aca63a00df1" + end + + patch do + url "https://github.com/achille-roussel/nanomsgxx/commit/f5733e2e9347bae0d4d9e657ca0cf8010a9dd6d7.patch?full_index=1" + sha256 "e6e05e5dd85b8131c936750b554a0a874206fed11b96413b05ee3f33a8a2d90f" + end + + # Add support for newer version of waf + patch do + url "https://github.com/achille-roussel/nanomsgxx/commit/08c6d8882e40d0279e58325d641a7abead51ca07.patch?full_index=1" + sha256 "fa27cad45e6216dfcf8a26125c0ff9db65e315653c16366a82e5b39d6e4de415" + end + + def install + resource("waf").stage buildpath + chmod 0755, "waf" + + args = %W[ + --static + --shared + --prefix=#{prefix} + ] + + system "python3", "./waf", "configure", *args + system "python3", "./waf", "build" + system "python3", "./waf", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() { + nnxx::socket s1 { nnxx::SP, nnxx::PAIR }; + nnxx::socket s2 { nnxx::SP, nnxx::PAIR }; + const char *addr = "inproc://example"; + + s1.bind(addr); + s2.connect(addr); + + s1.send("Hello Nanomsgxx!"); + + nnxx::message msg = s2.recv(); + std::cout << msg << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lnnxx" + + assert_equal "Hello Nanomsgxx!\n", shell_output("#{testpath}/a.out") + end +end diff --git a/Formula/n/nanopb.rb b/Formula/n/nanopb.rb new file mode 100644 index 0000000000000..edb416c53b388 --- /dev/null +++ b/Formula/n/nanopb.rb @@ -0,0 +1,74 @@ +class Nanopb < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "C library for encoding and decoding Protocol Buffer messages" + homepage "https://jpa.kapsi.fi/nanopb/docs/index.html" + url "https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.9.1.tar.gz" + sha256 "882cd8473ad932b24787e676a808e4fb29c12e086d20bcbfbacc66c183094b5c" + license "Zlib" + revision 3 + + livecheck do + url "https://jpa.kapsi.fi/nanopb/download/" + regex(/href=.*?nanopb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "9e0cb50940e2d1d1212a062b35b802435230fef6e1129b871433d1a28a3d0241" + sha256 cellar: :any, arm64_sequoia: "8e5fc9b388c93d9b3a7e1bd78fbda89bbc5599160f000068707635f6bf2c214f" + sha256 cellar: :any, arm64_sonoma: "ab9ee42905d4326caf3e9d9c077e097f5f411d9ef9757026475f8053a3ee2eaa" + sha256 cellar: :any, sonoma: "c534620822741f208cbb0bbe2ef3e6451e9411bb9972e66083f684f6dc0ab6fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1423f4ce72738f08682ae0e3e89ab6725dda1a2ff08353520152d7c4535a5b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba95c5b31f0fc537bb430bd5a62d0421a77dcd84e04c12a438b4ef25cb641b56" + end + + depends_on "cmake" => :build + depends_on "protobuf" + depends_on "python@3.14" + + pypi_packages package_name: "nanopb", + extra_packages: "setuptools" + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/fa/a4/cc17347aa2897568beece2e674674359f911d6fe21b0b8d6268cd42727ac/protobuf-6.32.1.tar.gz" + sha256 "ee2469e4a021474ab9baafea6cd070e5bf27c7d29433504ddea1a4ee5850f68d" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def install + ENV.append_to_cflags "-DPB_ENABLE_MALLOC=1" + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-Dnanopb_PYTHON_INSTDIR_OVERRIDE=#{venv.site_packages}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children + end + + test do + (testpath/"test.proto").write <<~PROTO + syntax = "proto2"; + + message Test { + required string test_field = 1; + } + PROTO + + system Formula["protobuf"].bin/"protoc", "--proto_path=#{testpath}", + "--plugin=#{bin}/protoc-gen-nanopb", + "--nanopb_out=#{testpath}", + testpath/"test.proto" + assert_match "Test", (testpath/"test.pb.c").read + assert_match "Test", (testpath/"test.pb.h").read + end +end diff --git a/Formula/n/nanorc.rb b/Formula/n/nanorc.rb new file mode 100644 index 0000000000000..b83aeb54db652 --- /dev/null +++ b/Formula/n/nanorc.rb @@ -0,0 +1,27 @@ +class Nanorc < Formula + desc "Improved Nano Syntax Highlighting Files" + homepage "https://github.com/scopatz/nanorc" + url "https://github.com/scopatz/nanorc/releases/download/2020.10.10/nanorc-2020.10.10.tar.gz" + sha256 "cd674e9eb230e4ba306b418c22d1891d93a3d2ffdf22234748d3398da50dfe64" + license "GPL-3.0-or-later" + head "https://github.com/scopatz/nanorc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "bf71c9da19d2ac1b05163bd9f92ea86adc475ca15d3e95101c91d788ff781625" + end + + def install + pkgshare.install Dir["*.nanorc"] + doc.install %w[readme.md license] + end + + test do + require "pty" + PTY.spawn("nano", "--rcfile=#{pkgshare}/c.nanorc") do |_stdout, _stdin, pid| + sleep 3 + Process.kill "TERM", pid + end + end +end diff --git a/Formula/n/nap.rb b/Formula/n/nap.rb new file mode 100644 index 0000000000000..8380f86debdee --- /dev/null +++ b/Formula/n/nap.rb @@ -0,0 +1,36 @@ +class Nap < Formula + desc "Code snippets in your terminal" + homepage "https://github.com/maaslalani/nap" + url "https://github.com/maaslalani/nap/archive/refs/tags/v0.1.1.tar.gz" + sha256 "2954577d2bd99c1114989d31e994d7bef0f1c934795fc559b7c90f6370d9f98b" + license "MIT" + head "https://github.com/maaslalani/nap.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13961de8d0dcd0c3ced9aa8ebd2ef3f9df61c4fa1bb67a7c1b1b368947f2277a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f0de3f0692843a24c7130ca77e99d116432ae35d6c9282fe8fe578558c1fdc5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "840fb8373a2c069dc80e54d6bf831597eb781c595bcdc6ad0c564ff9d4bb9a44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e5ac9b5da7d19b91650509c620c45620a57230df2d487f6c43cdc2e6dcabe9d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5e5ac9b5da7d19b91650509c620c45620a57230df2d487f6c43cdc2e6dcabe9d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f0ed819808bb795ecfce79d5415ea928d48b3f4cd9d716ef26e0e48a4f88067b" + sha256 cellar: :any_skip_relocation, sonoma: "82eedff6a8561d4ffb1cc02b96c26ad249a3941ba49cd65963839b8fc87ad487" + sha256 cellar: :any_skip_relocation, ventura: "13824542ffb0caad2b26b347bb375fde1beedd26c8b3af84145917cb92dabe22" + sha256 cellar: :any_skip_relocation, monterey: "13824542ffb0caad2b26b347bb375fde1beedd26c8b3af84145917cb92dabe22" + sha256 cellar: :any_skip_relocation, big_sur: "13824542ffb0caad2b26b347bb375fde1beedd26c8b3af84145917cb92dabe22" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdf8ed4b88c3ce3467132f96b2db5315853e4a01207c9edf25ca25f58c1286ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9a201267139b6f4d72d65a5651b981efba2fd74d0583221b87071ec34ad1051" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + assert_match "misc/Untitled Snippet.go", shell_output("#{bin}/nap list") + end +end diff --git a/Formula/n/nasm.rb b/Formula/n/nasm.rb new file mode 100644 index 0000000000000..145b1b05a815e --- /dev/null +++ b/Formula/n/nasm.rb @@ -0,0 +1,50 @@ +class Nasm < Formula + desc "Netwide Assembler (NASM) is an 80x86 assembler" + homepage "https://www.nasm.us/" + url "https://www.nasm.us/pub/nasm/releasebuilds/3.01/nasm-3.01.tar.xz" + sha256 "b7324cbe86e767b65f26f467ed8b12ad80e124e3ccb89076855c98e43a9eddd4" + license "BSD-2-Clause" + + livecheck do + url "https://www.nasm.us/pub/nasm/releasebuilds/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5074568719d225be8b29c51a67afb5a4feec97f58736cd18cd1534eefa11df5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88f144c41ed757649726c4ed2247cdbc75621bdf57c2b27f17fc784c6e28d3f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eca617b897d2e594511ca59690799341e9600e2e511ee95e057a36b28dde0edd" + sha256 cellar: :any_skip_relocation, sonoma: "56b4849156efbe9ef0a4d615a36a4e58f5d9cc098a4c56e161489490189e6f56" + sha256 cellar: :any_skip_relocation, arm64_linux: "2653ec1582df302177334313b005f06c6ae4df44194f72742406eaa47e5b6065" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2bb9cd0b3ae85202e0584e4a088c9bcec70cccbb4f619465fae0210f95151dc" + end + + head do + url "https://github.com/netwide-assembler/nasm.git", branch: "master" + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "xmlto" => :build + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--prefix=#{prefix}" + system "make", "manpages" if build.head? + system "make", "install" + end + + test do + (testpath/"foo.s").write <<~ASM + mov eax, 0 + mov ebx, 0 + int 0x80 + ASM + + system bin/"nasm", "foo.s" + code = File.open("foo", "rb") { |f| f.read.unpack("C*") } + expected = [0x66, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x66, 0xbb, + 0x00, 0x00, 0x00, 0x00, 0xcd, 0x80] + assert_equal expected, code + end +end diff --git a/Formula/n/nativefier.rb b/Formula/n/nativefier.rb new file mode 100644 index 0000000000000..ab6e1759c8c9f --- /dev/null +++ b/Formula/n/nativefier.rb @@ -0,0 +1,32 @@ +class Nativefier < Formula + desc "Wrap web apps natively" + homepage "https://github.com/nativefier/nativefier" + url "https://registry.npmjs.org/nativefier/-/nativefier-52.0.0.tgz" + sha256 "483c4fc8e941d5f870c610150f61835ff92ee313688bd3262cf3dca6fb910876" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8217c3f9582943a6a195dff3efcd428a54028e108693ecb6e361e38f8cda83ad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8b34ad78186093473325fd42ce2ba129f7a112a7b1d1b978bcc016a643ae1d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8b34ad78186093473325fd42ce2ba129f7a112a7b1d1b978bcc016a643ae1d1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c8b34ad78186093473325fd42ce2ba129f7a112a7b1d1b978bcc016a643ae1d1" + sha256 cellar: :any_skip_relocation, sonoma: "4148739ce73c42af24207638a6ebf6a7d1821421b8566218e865509f1891b09e" + sha256 cellar: :any_skip_relocation, ventura: "4148739ce73c42af24207638a6ebf6a7d1821421b8566218e865509f1891b09e" + sha256 cellar: :any_skip_relocation, monterey: "4148739ce73c42af24207638a6ebf6a7d1821421b8566218e865509f1891b09e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f12e3086887b5424fc4a6b718a323f2bc207069ebb4a9419f35680e8ef82fdd" + end + + disable! date: "2025-01-06", because: :repo_archived + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/nativefier --version") + end +end diff --git a/Formula/n/nats-server.rb b/Formula/n/nats-server.rb new file mode 100644 index 0000000000000..4733c3101ef9d --- /dev/null +++ b/Formula/n/nats-server.rb @@ -0,0 +1,48 @@ +class NatsServer < Formula + desc "Lightweight cloud messaging system" + homepage "https://nats.io" + url "https://github.com/nats-io/nats-server/archive/refs/tags/v2.12.1.tar.gz" + sha256 "4d06c190294638aed37728f663f59de30b1b7492bb0af1891bccc3647025fc0f" + license "Apache-2.0" + head "https://github.com/nats-io/nats-server.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c4b89de8ba160e7ddf4debbf093723ed1ef1c3489d95434f61f02a2c285b93c1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4b89de8ba160e7ddf4debbf093723ed1ef1c3489d95434f61f02a2c285b93c1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4b89de8ba160e7ddf4debbf093723ed1ef1c3489d95434f61f02a2c285b93c1" + sha256 cellar: :any_skip_relocation, sonoma: "e1f385dac90b5ca5d69700713d64449f7eb53eaec3337d1083e80317f37b1f6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc606fd3ebf534d6a7ce45e572f25842f8722d53b7691772f2d613892513aebe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5dbb541f3c803fab115b768791f3dd32763f517da456e5eddeb4c8f129e4026" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + service do + run opt_bin/"nats-server" + end + + test do + port = free_port + http_port = free_port + fork do + exec bin/"nats-server", + "--port=#{port}", + "--http_port=#{http_port}", + "--pid=#{testpath}/pid", + "--log=#{testpath}/log" + end + sleep 3 + + assert_match version.to_s, shell_output("curl localhost:#{http_port}/varz") + assert_path_exists testpath/"log" + end +end diff --git a/Formula/n/nats-streaming-server.rb b/Formula/n/nats-streaming-server.rb new file mode 100644 index 0000000000000..8a43fbb6748ea --- /dev/null +++ b/Formula/n/nats-streaming-server.rb @@ -0,0 +1,53 @@ +class NatsStreamingServer < Formula + desc "Lightweight cloud messaging system" + homepage "https://nats.io" + url "https://github.com/nats-io/nats-streaming-server/archive/refs/tags/v0.25.6.tar.gz" + sha256 "6f53792784e909870c04441127ca855b6d4cf007ccb93d8884d3278fd23b74cf" + license "Apache-2.0" + head "https://github.com/nats-io/nats-streaming-server.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "920621249fde8b8bd8a8e5119dafc8b0b7c5f705c8d64c6c1ecbafea3cf1b793" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a7642a9e36f5b99989264273fae72a760bf12a8c97e1dd8d76d9a4fa76de246" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "206984a6cf01469dc3b1bb02c92bfea8d2b742be41d9b0f67f520efaeb743a18" + sha256 cellar: :any_skip_relocation, arm64_ventura: "faca0aecf3e91bc9647dcd85f617d6c8531641d79856895948601cb7151c5f7b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1f1a114a043e845b36088cbe115f186966b3797b7a1298afa05c084ec81375e5" + sha256 cellar: :any_skip_relocation, sonoma: "c2c2b7b5ab4b94551dde455c6ec5ac52dca72a5870245024a0b6c797f51a3e1d" + sha256 cellar: :any_skip_relocation, ventura: "d8e27e58088ba913c7847b85e0c518a4398010e73815e2eb07478160f1b88fa1" + sha256 cellar: :any_skip_relocation, monterey: "44ad763490fb8fb3d6676c0956ada1d4a8716b149a9fcfbc625b53b15226d26a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f4f5d83e54e0f6928b4ede08b8f184109ddb60c7fd1e2e61d4dc97f2b1feb50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f24c7b57b3e4e5dfe672f92a7fe4386ec74a1c807666643bf895b47d57e450c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + service do + run opt_bin/"nats-streaming-server" + end + + test do + port = free_port + http_port = free_port + pid = fork do + exec bin/"nats-streaming-server", + "--port=#{port}", + "--http_port=#{http_port}", + "--pid=#{testpath}/pid", + "--log=#{testpath}/log" + end + sleep 3 + + begin + assert_match "uptime", shell_output("curl localhost:#{http_port}/varz") + assert_path_exists testpath/"log" + assert_match version.to_s, File.read(testpath/"log") + ensure + Process.kill "SIGINT", pid + Process.wait pid + end + end +end diff --git a/Formula/n/naturaldocs.rb b/Formula/n/naturaldocs.rb new file mode 100644 index 0000000000000..22ea7aea79ded --- /dev/null +++ b/Formula/n/naturaldocs.rb @@ -0,0 +1,44 @@ +class Naturaldocs < Formula + desc "Extensible, multi-language documentation generator" + homepage "https://www.naturaldocs.org/" + url "https://downloads.sourceforge.net/project/naturaldocs/Stable%20Releases/2.3.1/Natural_Docs_2.3.1.zip" + mirror "https://naturaldocs.org/download/natural_docs/2.3.1/Natural_Docs_2.3.1.zip" + sha256 "92144e2deb1ff2606d29343cfea203ea890549ad2f77c03df1cea2d8014972cb" + license "AGPL-3.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/Natural.?Docs[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a439b159358c64b91076716aa62efc0f80cd08938a4a35daa35dd397817a474a" + end + + depends_on "mono" + + def install + os = OS.mac? ? "Mac" : "Linux" + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + + libexec.install Dir["*"] + (bin/"naturaldocs").write <<~BASH + #!/bin/bash + mono #{libexec}/NaturalDocs.exe "$@" + BASH + + libexec.install_symlink etc/"naturaldocs" => "Config" + + libexec.glob("libSQLite.*").each do |f| + rm f if f.basename.to_s != "libSQLite.#{os}.#{arch}" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/naturaldocs -v") + + output = shell_output("#{bin}/naturaldocs --list-encodings") + assert_match "Unicode (UTF-8)", output + end +end diff --git a/Formula/n/nauty.rb b/Formula/n/nauty.rb new file mode 100644 index 0000000000000..78ec4d6433490 --- /dev/null +++ b/Formula/n/nauty.rb @@ -0,0 +1,66 @@ +class Nauty < Formula + desc "Automorphism groups of graphs and digraphs" + homepage "https://pallini.di.uniroma1.it/" + url "https://pallini.di.uniroma1.it/nauty2_9_1.tar.gz" + mirror "https://users.cecs.anu.edu.au/~bdm/nauty/nauty2_9_1.tar.gz" + sha256 "488fa906d10a372c72d2364c5dee48e0f7307004fbe52c2bce50c52de8cd873e" + license "Apache-2.0" + version_scheme 1 + + livecheck do + url :homepage + regex(/Current\s+?version:\s*?v?(\d+(?:[._]\d+)+(?:r\d+)?)/i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match.first.tr("_R", ".r") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "0229f84c659eb7766771f7848408a8d0ec6ab1ec57ef20a5089c5bdd4cb6fcf4" + sha256 cellar: :any, arm64_sequoia: "4ce3eabaf82030308d21ac50a163c29183d455aba6b7da228d9335c7c43b5bfb" + sha256 cellar: :any, arm64_sonoma: "0c75c4d2cfdde9301aa3ff80a5dadcb6a8d139d4f0662a0346f4deaeccec0080" + sha256 cellar: :any, arm64_ventura: "d125557329adf1c240490964ac68dee20db2eefbdff051a0c9acb43d79e126ff" + sha256 cellar: :any, sonoma: "db38df2f9e482d063d76c4a3241519091053719de472b6ab79da5365765d234b" + sha256 cellar: :any, ventura: "514f26ddadf0b537f4533bedbd38e9b84b5b94d9910222a9fbe9128ea90525a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7ff699de0106eabc7a16274fd8bc303f96225599449801e40508395f35d22e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adcd153e3ad93026d397ea05b648b51dcc56cb950e443055cbbf9b1ac5f5805a" + end + + def install + system "./configure", "--enable-tls", "--includedir=#{include}/nauty", *std_configure_args + system "make", "all", "TLSlibs" + system "make", "install", "TLSinstall" + + doc.install "nug#{version.major_minor.to_s.tr(".", "")}.pdf", "README", Dir["*.txt"] + + # Ancillary source files listed in README + pkgshare.install %w[sumlines.c sorttemplates.c bliss2dre.c poptest.c] + end + + test do + # from ./runalltests + out1 = shell_output("#{bin}/geng -ud1D7t 11 2>&1") + out2 = pipe_output("#{bin}/countg --nedDr -q", shell_output("#{bin}/genrang -r3 114 100")) + + assert_match "92779 graphs generated", out1 + assert_match "100 graphs : n=114; e=171; mindeg=3; maxdeg=3; regular", out2 + + # test that the library is installed and linkable-against + (testpath/"test.c").write <<~C + #define MAXN 1000 + #include + + int main() + { + int n = 12345; + int m = SETWORDSNEEDED(n); + nauty_check(WORDSIZE, m, n, NAUTYVERSIONID); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}/nauty", "-L#{lib}", "-lnauty", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/nave.rb b/Formula/n/nave.rb new file mode 100644 index 0000000000000..ddb9dd6f669db --- /dev/null +++ b/Formula/n/nave.rb @@ -0,0 +1,21 @@ +class Nave < Formula + desc "Virtual environments for Node.js" + homepage "https://github.com/isaacs/nave" + url "https://github.com/isaacs/nave/archive/refs/tags/v3.5.5.tar.gz" + sha256 "102b1fced7aad7746cbe9c1871984cea2560747f0369fb777857c1992dc09a7a" + license "ISC" + head "https://github.com/isaacs/nave.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cf0777ec6f533a7c1d68910219d1d5d87d5e75c01411e39113781bfea4ba31ee" + end + + def install + bin.install "nave.sh" => "nave" + end + + test do + assert_match "0.10.30", shell_output("#{bin}/nave ls-remote") + end +end diff --git a/Formula/n/navi.rb b/Formula/n/navi.rb new file mode 100644 index 0000000000000..8b1661fcfd7d1 --- /dev/null +++ b/Formula/n/navi.rb @@ -0,0 +1,34 @@ +class Navi < Formula + desc "Interactive cheatsheet tool for the command-line" + homepage "https://github.com/denisidoro/navi" + url "https://github.com/denisidoro/navi/archive/refs/tags/v2.24.0.tar.gz" + sha256 "4c10f47c306826255b07483b7e94eed8ffc1401555c52434a56246295d3f2728" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "164b6bc6da84bf4ba668b338c22242716f844ebb4ed90dbac98b73d7b5433926" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a732472b8c33807c91a31262c5846ab54573065e4dd5607ebfa091e38e373a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcd14604b76454e6c530c032b0af690d969d956086a2c47fac647fce1f328937" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e3ed6e03a9e3872469df60473a0ffd9fe8948a291c8dc8257d1cb67ee442dad4" + sha256 cellar: :any_skip_relocation, sonoma: "3a23f84baf95a5a955901f125840d05c11ecba50e7453ac0e18015471da15a2f" + sha256 cellar: :any_skip_relocation, ventura: "34775384b07e23691e7e8159dd684a39b627bd2ebb77433757e6df6ac6deec99" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa4b10ede4b81b48185af35208e2dd75a196c04cac9fab7dd4eb398b5d3581c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58d36e08b9840f8a3080c62f126bb0da33f62972441ca609af73d1ae25d4bacf" + end + + depends_on "rust" => :build + depends_on "fzf" + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "navi " + version, shell_output("#{bin}/navi --version") + (testpath/"cheats/test.cheat").write "% test\n\n# foo\necho bar\n\n# lorem\necho ipsum\n" + assert_match "bar", + shell_output("export RUST_BACKTRACE=1; #{bin}/navi --path #{testpath}/cheats --query foo --best-match") + end +end diff --git a/Formula/n/navidrome.rb b/Formula/n/navidrome.rb new file mode 100644 index 0000000000000..30eb68605aca5 --- /dev/null +++ b/Formula/n/navidrome.rb @@ -0,0 +1,56 @@ +class Navidrome < Formula + desc "Modern Music Server and Streamer compatible with Subsonic/Airsonic" + homepage "https://www.navidrome.org" + url "https://github.com/navidrome/navidrome/archive/refs/tags/v0.58.0.tar.gz" + sha256 "54346203de134b084e0e15d100751ebe82a7c1aa97758191d70de8836b38f0fa" + license "GPL-3.0-only" + head "https://github.com/navidrome/navidrome.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d005bdc43eead1e5446e04a01795d22633b81bf462d84476a570a17f3a4f293d" + sha256 cellar: :any, arm64_sequoia: "834a8da0be11db9f180a6c37088fe129410c17dc941d45fc4ed805772b73160a" + sha256 cellar: :any, arm64_sonoma: "9e4047467521b55041fe7d0ec973022b9f1b6f99b0b9ef0f81ab657babdc2c9d" + sha256 cellar: :any, arm64_ventura: "76fc726bd5b11b48b6243718d6a4792b5eaa074474e7d84c80319f0e14c654f3" + sha256 cellar: :any, sonoma: "28cd1daaeae6c760aa0275451a92921074b4127f7ccb53f48302f5389ba9d864" + sha256 cellar: :any, ventura: "d2c328e9b93ea8eceed27952c71436485a7e0c79c20b75f7730b0c0b4844a2bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "882c457fa3692a24c961fbb54a48c6c6f0eb07596d62dbef354be7a63bd16e4a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c2d5ce1fa76d2e9f5354f4e64dd8785e92a2c722c9a0f019a2bf75e01ca4599" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "taglib" + + def install + # Workaround to avoid patchelf corruption when cgo is required + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + ldflags = %W[ + -s -w + -X github.com/navidrome/navidrome/consts.gitTag=v#{version} + -X github.com/navidrome/navidrome/consts.gitSha=source_archive + ] + + system "make", "setup" + system "make", "buildjs" + system "go", "build", *std_go_args(ldflags:, tags: "netgo"), "-buildvcs=false" + end + + test do + assert_equal "#{version} (source_archive)", shell_output("#{bin}/navidrome --version").chomp + port = free_port + pid = spawn bin/"navidrome", "--port", port.to_s + sleep 20 + sleep 100 if OS.mac? && Hardware::CPU.intel? + assert_equal ".", shell_output("curl http://localhost:#{port}/ping") + ensure + Process.kill "KILL", pid + Process.wait pid + end +end diff --git a/Formula/n/nb.rb b/Formula/n/nb.rb new file mode 100644 index 0000000000000..d19d3f755d4bc --- /dev/null +++ b/Formula/n/nb.rb @@ -0,0 +1,44 @@ +class Nb < Formula + desc "Command-line and local web note-taking, bookmarking, and archiving" + homepage "https://xwmx.github.io/nb" + url "https://github.com/xwmx/nb/archive/refs/tags/7.23.1.tar.gz" + sha256 "16ac3654e5a1b469a1125a9a6f26b351631813b7a003efda39d3fe286b045302" + license "AGPL-3.0-or-later" + head "https://github.com/xwmx/nb.git", branch: "master" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, all: "77862bff16ddd3a3384adb8a19db910eaa4eb4f3ecc10a43b89fd86bdefd0255" + end + + depends_on "bat" + depends_on "nmap" + depends_on "pandoc" + depends_on "ripgrep" + depends_on "tig" + depends_on "w3m" + + uses_from_macos "bash" + + def install + bin.install "nb", "bin/bookmark" + + bash_completion.install "etc/nb-completion.bash" => "nb" + zsh_completion.install "etc/nb-completion.zsh" => "_nb" + fish_completion.install "etc/nb-completion.fish" => "nb.fish" + end + + test do + # EDITOR must be set to a non-empty value for ubuntu-latest to pass tests! + ENV["EDITOR"] = "placeholder" + + assert_match version.to_s, shell_output("#{bin}/nb version") + + system "yes | #{bin}/nb notebooks init" + system bin/"nb", "add", "test", "note" + assert_match "test note", shell_output("#{bin}/nb ls") + assert_match "test note", shell_output("#{bin}/nb show 1") + assert_match "1", shell_output("#{bin}/nb search test") + end +end diff --git a/Formula/n/nbdime.rb b/Formula/n/nbdime.rb new file mode 100644 index 0000000000000..6958ebdc78611 --- /dev/null +++ b/Formula/n/nbdime.rb @@ -0,0 +1,162 @@ +class Nbdime < Formula + include Language::Python::Virtualenv + + desc "Jupyter Notebook Diff and Merge tools" + homepage "https://nbdime.readthedocs.io" + url "https://files.pythonhosted.org/packages/a6/f1/4be57ecea4d55d322f05a0f89e0b73d7a8d90a16dbf01168eab3e7bf5939/nbdime-4.0.2.tar.gz" + sha256 "d8279f8f4b236c0b253b20d60c4831bb67843ed8dbd6e09f234eb011d36f1bf2" + license "BSD-3-Clause" + revision 4 + + bottle do + sha256 cellar: :any_skip_relocation, all: "04b63568a71f20523f000f14f9c2aa4fe4cf45d87aeb2c486d3797849454b5c4" + end + + depends_on "certifi" + depends_on "jupyterlab" # only to provide jupyter-server and nbconvert + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi jupyter-server nbconvert] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "jupyter-server-mathjax" do + url "https://files.pythonhosted.org/packages/9c/40/9a1b8c2a2e44e8e2392174cd8e52e0c976335f004301f61b66addea3243e/jupyter_server_mathjax-0.2.6.tar.gz" + sha256 "bb1e6b6dc0686c1fe386a22b5886163db548893a99c2810c36399e9c4ca23943" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # We already have jupyterlab, but don't use --no-build-isolation since + # hatchling adds additional build deps + inreplace "pyproject.toml", 'requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5"]', + 'requires = ["hatchling>=1.5.0"]' + + venv = virtualenv_install_with_resources + + # Provide an exception to avoid dealing with `jupyterlab` dependency tree + site_packages = Language::Python.site_packages(venv.root/"bin/python3") + pth_contents = "import site; site.addsitedir('#{Formula["jupyterlab"].opt_libexec/site_packages}')\n" + (venv.site_packages/"homebrew-jupyterlab.pth").write pth_contents + end + + test do + (testpath/"old.ipynb").write <<~JSON + { + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\\"Hello World!\\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.10" + } + }, + "nbformat": 4, + "nbformat_minor": 1 + } + JSON + (testpath/"new.ipynb").write <<~JSON + { + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hello World!\\n" + ] + } + ], + "source": [ + "print(\\"Hello World!\\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.10" + } + }, + "nbformat": 4, + "nbformat_minor": 1 + } + JSON + # sadly no special exit code if files are the same + diff_output = shell_output("#{bin}/nbdiff --no-color old.ipynb new.ipynb") + assert_match "nbdiff old.ipynb new.ipynb", diff_output + assert_match(/--- old.ipynb \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}/, diff_output) + assert_match(/\+\+\+ new.ipynb \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}/, diff_output) + end +end diff --git a/Formula/n/nbimg.rb b/Formula/n/nbimg.rb new file mode 100644 index 0000000000000..32790b9a1816c --- /dev/null +++ b/Formula/n/nbimg.rb @@ -0,0 +1,45 @@ +class Nbimg < Formula + desc "Smartphone boot splash screen converter for Android and winCE" + homepage "https://github.com/poliva/nbimg" + url "https://github.com/poliva/nbimg/archive/refs/tags/v1.2.1.tar.gz" + sha256 "f72846656bb8371564c245ab34550063bd5ca357fe8a22a34b82b93b7e277680" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd7fbd304d9f838074d2fac94129b5fb2e88622619c76011e57f12c50c560923" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcfafb2e1abf197f98f3452c53375aa0f72b9ebef04cb0b7f37d131181551330" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "246aad3351ee67b9e20c9c78a8ecc60e8bcfc7f0fb5ef544b07322af8206e4bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5062c7ecff47f50b55169fb91b19b100237535ce3fff3796f273617b59df58aa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "542f99d9f78e4a9820b6ea2fa1e265d5e261d0d6fdfe98e08af41327d16bdb5e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0d03cde2be335d6c4b096090f9c61b9f2af639fe7e10b9d25ca876bcb2613aed" + sha256 cellar: :any_skip_relocation, sonoma: "c58a9a03c8ae224ccac719f8f3e3345eea9848592fcb802751e6eae2176e0e12" + sha256 cellar: :any_skip_relocation, ventura: "e57f45a96041ad2e60e4f3203fab14346a85c67d05f87885bbac162a9f805b3c" + sha256 cellar: :any_skip_relocation, monterey: "906607cb9db983c3fc6db43774e66a1e33d19ceaacc5814dad554a9cf38364a5" + sha256 cellar: :any_skip_relocation, big_sur: "59cb045e4e21e2e205b0b51bbbaa189838c212741fdbbed061596e924286ec97" + sha256 cellar: :any_skip_relocation, catalina: "50cafca29cd1fb950794b9f240da2813dbd7dc682dfdb8c75c091cdc9666737e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c337e9b4f70cc61fda6ad272b9760f456e3a32c36d7d9842e2c3bc44b06134eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4c91a552e56c4f2e78422c8a4721d7ffbb54bb0bdb326e983f9989c5c9500ce" + end + + def install + inreplace "Makefile", "all: nbimg win32", "all: nbimg" + system "make", "prefix=#{prefix}", + "bindir=#{bin}", + "docdir=#{doc}", + "mandir=#{man}", + "install" + end + + test do + resource "homebrew-test-bmp" do + url "https://gist.githubusercontent.com/staticfloat/8253400/raw/41aa4aca5f1aa0a82c85c126967677f830fe98ee/tiny.bmp" + sha256 "08556be354e0766eb4a1fd216c26989ad652902040676379e1d0f0b14c12f2e2" + end + + resource("homebrew-test-bmp").stage testpath + system bin/"nbimg", "-Ftiny.bmp" + assert_path_exists testpath/"tiny.bmp.nb" + end +end diff --git a/Formula/n/nbsdgames.rb b/Formula/n/nbsdgames.rb new file mode 100644 index 0000000000000..151d0578bd4a3 --- /dev/null +++ b/Formula/n/nbsdgames.rb @@ -0,0 +1,42 @@ +class Nbsdgames < Formula + desc "Text-based modern games" + homepage "https://github.com/abakh/nbsdgames" + url "https://github.com/abakh/nbsdgames/archive/refs/tags/v5.tar.gz" + sha256 "ca81d8b854a7bf9685bbc58aabc1a24cd617cadb7e9ddac64a513d2c8ddb2e6c" + license :public_domain + head "https://github.com/abakh/nbsdgames.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7e6bf700f1b8b33e34ae73df1f19cc45b7be8451723adbaddea87ff03607a1d5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94204000ca22ca12b9419ab644c95487348c2b8f6ab7ba6b75a35f262a45f853" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "354dccba0566a0c557da42b0bbcb70c83c6cc27414ee50d208fa51e99a62718a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2fea6eb184a26268e400bccb2f730badd3562d92444e639a1c4cda2d49dd222" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9916d331aa232bf41939171c3591f22dd296ee973d90c703506eaca528409db1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c391d3da850a18fa442189d014181b3c0a28e3aa5286b5259ad9ca16aa6a5563" + sha256 cellar: :any_skip_relocation, sonoma: "499fd563e5c7029ce2f4888343c592013b0a0d0f7756ae27220e75b41bb9aa31" + sha256 cellar: :any_skip_relocation, ventura: "ce71ed79e381d78d6868ae0e5089030abadecc94757157a17b2de424fb1fa21e" + sha256 cellar: :any_skip_relocation, monterey: "31c7b5a1fa5cb7650d7de984547049f8429476ba23b1965db44497ac2eb7ac72" + sha256 cellar: :any_skip_relocation, big_sur: "040fd2883d5c1ddd45b3bd27ed4ec12de532a1330bcc3e2cfeffdbb705d990da" + sha256 cellar: :any_skip_relocation, catalina: "0c0672afd7f3de647311b6ae155c73aca2e1803f8cb22c4e6240aa77b116d4f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "973ede434c4c08704345cc53e1a09e1bf9b6d98958e89caf9d56f613445e1520" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b311d8c8354dc0688b51024c40b2d632ff7d22587c89deeed8d559af092cce4a" + end + + uses_from_macos "ncurses" + + def install + mkdir bin + system "make", "install", + "GAMES_DIR=#{bin}", + "SCORES_DIR=#{var}/games" + + mkdir man6 + system "make", "manpages", "MAN_DIR=#{man6}" + end + + test do + assert_equal "2 <= size <= 7", shell_output("#{bin}/sudoku -s 1", 1).chomp + end +end diff --git a/Formula/n/ncc.rb b/Formula/n/ncc.rb new file mode 100644 index 0000000000000..557066c775bd2 --- /dev/null +++ b/Formula/n/ncc.rb @@ -0,0 +1,33 @@ +class Ncc < Formula + desc "Compile a Node.js project into a single file" + homepage "https://github.com/vercel/ncc" + url "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz" + sha256 "288fd3538e04a96df50fea256e849ada51c9dfcf4541a6f637c4b6eb5facb845" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c583916845363d4ffe428dbb455130e8bd1466af00a1ae834a9119425822f8d5" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"input.js").write <<~JS + function component() { + const element = document.createElement('div'); + element.innerHTML = 'Hello' + ' ' + 'webpack'; + return element; + } + + document.body.appendChild(component()); + JS + + system bin/"ncc", "build", "input.js", "-o", "dist" + assert_match "document.createElement", File.read("dist/index.js") + end +end diff --git a/Formula/n/ncdc.rb b/Formula/n/ncdc.rb new file mode 100644 index 0000000000000..d56b735fe3ecd --- /dev/null +++ b/Formula/n/ncdc.rb @@ -0,0 +1,53 @@ +class Ncdc < Formula + desc "NCurses direct connect" + homepage "https://dev.yorhel.nl/ncdc" + url "https://dev.yorhel.nl/download/ncdc-1.25.tar.gz" + sha256 "b9be58e7dbe677f2ac1c472f6e76fad618a65e2f8bf1c7b9d3d97bc169feb740" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?ncdc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5743781d81d4fadfdcd4d5d760dd9b4a91af6f802503e2c5743bfd596b916281" + sha256 cellar: :any, arm64_sequoia: "4d18bc67d0060378c9e8aa8160c9cec8ab87ac473ab219052aff65e0cc8399ef" + sha256 cellar: :any, arm64_sonoma: "8311ceb65f6aabdb8b81404455abcc1a54e4e08eefd01956dc3f76f13c1189a0" + sha256 cellar: :any, arm64_ventura: "94810e9e763b6f15b2cabd1579ab2995582493f9f9ebac57e56f40e8f8d59cae" + sha256 cellar: :any, sonoma: "cf910ac39cc769044fdc4302f266f68f11b9eb03f73d4cd013c3c396753ba1f3" + sha256 cellar: :any, ventura: "a468507ac3e9724260be8ba7b32dfbf96d0a4daba19b21aef44040bbd1a3970f" + sha256 cellar: :any_skip_relocation, arm64_linux: "055e73d95ac9e947e3b9937a2d209b669bc014d06810243b5a74b5d7bcc11ee8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5dadf6576e959b0891b26599f60d6d3de70b5a05d1298ca534688e16cd4427e" + end + + head do + url "https://g.blicky.net/ncdc.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "gnutls" + depends_on "ncurses" + depends_on "sqlite" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"ncdc", "-v" + end +end diff --git a/Formula/n/ncdu.rb b/Formula/n/ncdu.rb new file mode 100644 index 0000000000000..36d7c2f495929 --- /dev/null +++ b/Formula/n/ncdu.rb @@ -0,0 +1,64 @@ +class Ncdu < Formula + desc "NCurses Disk Usage" + homepage "https://dev.yorhel.nl/ncdu" + url "https://dev.yorhel.nl/download/ncdu-2.9.2.tar.gz" + sha256 "e91135281cb66569f2ca4c0bac277246991e7e52524c0ca8cba3de5c8e81cec9" + license "MIT" + head "https://g.blicky.net/ncdu.git", branch: "zig" + + livecheck do + url :homepage + regex(/href=.*?ncdu[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9a08dd709b18d87d90b016b8685d56f2de8d537e437ab44cf4ed92203df7a245" + sha256 cellar: :any, arm64_sequoia: "d56b0ffa80c15fa5758a8b7b59525687a1a04ce043d540936b6db917c7c14c30" + sha256 cellar: :any, arm64_sonoma: "b86c878b672bb5a7d8644e9908c4ed1ca3fd942095becec43ceff480340d2a2b" + sha256 cellar: :any, sonoma: "768ace20bc54c22b86ddce63d51bd8488cb04816e28e330286a2685047d5484e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a2d143126f866ae7a7f0aeecc2d12282bde98542e1ece1203d821a8d499343b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "762c13f508d0699c363f0a3a0741a19cbd14d1ef8a86fdd1d70aeaaf2f7bd851" + end + + depends_on "pkgconf" => :build + depends_on "zig" => :build + # Without this, `ncdu` is unusable when `TERM=tmux-256color`. + depends_on "ncurses" + depends_on "zstd" + + def install + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case ENV.effective_arch + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else ENV.effective_arch + end + + args = [] + args << "-Dpie=true" if OS.mac? + args << "-Dcpu=#{cpu}" if build.bottle? + + # Workaround for https://github.com/Homebrew/homebrew-core/pull/141453#discussion_r1320821081 + # Remove this workaround when the same is removed in `zig.rb`. + if OS.linux? + ENV["NIX_LDFLAGS"] = ENV["HOMEBREW_RPATH_PATHS"].split(":") + .map { |p| "-rpath #{p}" } + .join(" ") + end + + # Avoid the Makefile for now so that we can pass `-Dcpu` to `zig build`. + # https://code.blicky.net/yorhel/ncdu/issues/185 + system "zig", "build", *args, *std_zig_args + man1.install "ncdu.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ncdu -v") + system bin/"ncdu", "-o", "test" + output = JSON.parse((testpath/"test").read) + assert_equal "ncdu", output[2]["progname"] + assert_equal version.to_s, output[2]["progver"] + assert_equal Pathname.pwd.size, output[3][0]["asize"] + end +end diff --git a/Formula/n/ncftp.rb b/Formula/n/ncftp.rb new file mode 100644 index 0000000000000..43595598e92f3 --- /dev/null +++ b/Formula/n/ncftp.rb @@ -0,0 +1,43 @@ +class Ncftp < Formula + desc "FTP client with an advanced user interface" + homepage "https://www.ncftp.com/" + url "https://www.ncftp.com/public_ftp/ncftp/ncftp-3.3.0-src.tar.gz" + mirror "https://fossies.org/linux/misc/ncftp-3.3.0-src.tar.gz" + sha256 "7920f884c2adafc82c8e41c46d6f3d22698785c7b3f56f5677a8d5c866396386" + license "ClArtistic" + + livecheck do + url "https://www.ncftp.com/download/" + regex(/href=.*?ncftp[._-]v?(\d+(?:\.\d+)+)(?:-src)?\.t/i) + end + + bottle do + sha256 arm64_tahoe: "d034873e2efd9f27eaf30e71a66222e1c36de002f2e2097916558bb0ddc7409c" + sha256 arm64_sequoia: "7be8e9dfbc09cdbfef04c5568b799d84a9155032e365bfc00e6b92ca9ad05c9d" + sha256 arm64_sonoma: "676773ed103a6eb600332b73cc4686a7c7ef01cec09dc4fc49df6c868489d02e" + sha256 arm64_ventura: "826e54b963b9f4552b09149a5ec0f9a78005185d8ca76da200b18c69fe69dd73" + sha256 sonoma: "0ee04c4edb6b7b3947ffb8733cb4d574594332bbcd6ea70440457374b05b0186" + sha256 ventura: "e99af095f88ba709589a6c45681ac5edac1930a1fb907cdec847d17e9b5972a4" + sha256 arm64_linux: "b3171b27e7ed8520f11f75cf478561730cfffe5fb3bdbf7f29d46882bce1f7e9" + sha256 x86_64_linux: "8936a27e03427f0ceae15bddc40bc744c4451bcc3a8ca564f498c50776d7c406" + end + + uses_from_macos "ncurses" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + system "./configure", "--disable-universal", + "--disable-precomp", + "--with-ncurses", + "--mandir=#{man}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"ncftp", "-F" + end +end diff --git a/Formula/n/ncmdump.rb b/Formula/n/ncmdump.rb new file mode 100644 index 0000000000000..5ca670a49c09b --- /dev/null +++ b/Formula/n/ncmdump.rb @@ -0,0 +1,37 @@ +class Ncmdump < Formula + desc "Convert Netease Cloud Music ncm files to mp3/flac files" + homepage "https://github.com/taurusxin/ncmdump" + url "https://github.com/taurusxin/ncmdump/archive/refs/tags/1.5.1.tar.gz" + sha256 "35062836d5210718b12fd311535f4673f5db4de18bd8e987890d89fc0e0a7e6c" + license "MIT" + head "https://github.com/taurusxin/ncmdump.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "99795c0e507a0a64b449c2688217ce0de2831260055765dbe37f56669c1ff9c7" + sha256 cellar: :any, arm64_sequoia: "e29cbd06aef33319b016e7b1013c6e1d72432cd1de0382994bb486be26c0268a" + sha256 cellar: :any, arm64_sonoma: "9a6f52ab49f6d4ff627357f662192b2fca298ce66a9e51381ef87af6412fcc16" + sha256 cellar: :any, sonoma: "ea72a6147d57e098312ea81119a4dd08b12464241db780a2ebaa0e7876c20189" + sha256 cellar: :any_skip_relocation, arm64_linux: "f95e343c040760559382f6cb2b8f7bf9199cb14be12b0e72fda4538dd605c2dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c4e754f69b305837012bc328cef7db9834483cf849a2a12c3d6a8f1e122636b" + end + + depends_on "cmake" => :build + depends_on "taglib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test" do + url "https://raw.githubusercontent.com/taurusxin/ncmdump/516b31ab68f806ef388084add11d9e4b2253f1c7/test/test.ncm" + sha256 "a1586bbbbad95019eee566411de58a57c3a3bd7c86d97f2c3c82427efce8964b" + end + + resource("homebrew-test").stage(testpath) + system bin/"ncmdump", "#{testpath}/test.ncm" + assert_path_exists testpath/"test.flac" + end +end diff --git a/Formula/n/ncmpc.rb b/Formula/n/ncmpc.rb new file mode 100644 index 0000000000000..ace10724d7a85 --- /dev/null +++ b/Formula/n/ncmpc.rb @@ -0,0 +1,75 @@ +class Ncmpc < Formula + desc "Curses Music Player Daemon (MPD) client" + homepage "https://www.musicpd.org/clients/ncmpc/" + url "https://www.musicpd.org/download/ncmpc/0/ncmpc-0.52.tar.xz" + sha256 "3af225496fe363a8534a9780fb46ae1bd17baefd80cf4ba7430a19cddd73eb1a" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://www.musicpd.org/download/ncmpc/0/" + regex(/href=.*?ncmpc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "79925b06f7a4619e7e1e062db3ce4cac42646b6e3152de52554cad995969cbe1" + sha256 arm64_sequoia: "0f280c690e83b4c4d4cb20aca9084c5bbcafb8046ac0c90b524f001ca4a45fcf" + sha256 arm64_sonoma: "4047ec4992db95e0b22057f9164dfcbbf69104d765674f62d5acb502e56c61e2" + sha256 sonoma: "57f3acdb57163d256a7470b702b6630cf79585c84822cfc6b1d10784c18a8fcc" + sha256 arm64_linux: "40bc8c01c1dfcd01f160e9ee0286225a681ebcf2962a47d820137d54a5bc50c8" + sha256 x86_64_linux: "8244e48ef47afc6f03c012409429e6fd1c2c8631a53a197d31b0df9ac88a7628" + end + + depends_on "boost" => :build + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "fmt" + depends_on "libmpdclient" + depends_on "pcre2" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500 + + # Fixes: error: use of undeclared identifier 'strcoll_l' + patch do + url "https://github.com/MusicPlayerDaemon/ncmpc/commit/af478b5ba2447592c640c5b7f86c47d9a412c639.patch?full_index=1" + sha256 "193f6c3192ba39974a2f1ef4935c623d58e0614f9978b2e6545c6231fd5ffdb5" + end + end + + fails_with :clang do + build 1500 + cause "Requires C++20" + end + + fails_with :gcc do + version "9" + cause "Requires C++20" + end + + def install + if OS.mac? && (DevelopmentTools.clang_build_version <= 1500) + ENV.llvm_clang + # Work around failure mixing newer `llvm` headers with older Xcode's libc++: + # Undefined symbols for architecture arm64: + # "std::exception_ptr::__from_native_exception_pointer(void*)", referenced from: + # std::exception_ptr std::make_exception_ptr[abi:ne180100](std::runtime_error) ... + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + system "meson", "setup", "build", "-Dcolors=false", "-Dnls=enabled", "-Dregex=enabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_match "Key configuration screen", shell_output("#{bin}/ncmpc --dump-keys") + assert_match version.to_s, shell_output("#{bin}/ncmpc --version") + end +end diff --git a/Formula/n/ncmpcpp.rb b/Formula/n/ncmpcpp.rb new file mode 100644 index 0000000000000..4c654166df3b0 --- /dev/null +++ b/Formula/n/ncmpcpp.rb @@ -0,0 +1,67 @@ +class Ncmpcpp < Formula + desc "Ncurses-based client for the Music Player Daemon" + homepage "https://rybczak.net/ncmpcpp/" + # note, homepage did not get updated to the latest release tag in github + url "https://github.com/ncmpcpp/ncmpcpp/archive/refs/tags/0.10.1.tar.gz" + sha256 "ddc89da86595d272282ae8726cc7913867b9517eec6e765e66e6da860b58e2f9" + license "GPL-2.0-or-later" + revision 5 + head "https://github.com/ncmpcpp/ncmpcpp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f3b64ad56ef955187393786a72253bada2104c2ab0bfe8a1d87e83152168ab89" + sha256 cellar: :any, arm64_sequoia: "ab2cdb4e9ebbc534f357141478d9ee1ce90008b9b454b764f23aa65dd75e8306" + sha256 cellar: :any, arm64_sonoma: "db5747c184ff0bd08ccae2625abbbb979fd6ca805a75a6f1334ca7cf17518f02" + sha256 cellar: :any, arm64_ventura: "c7abc5c178c61a8d14d44a4359b46920e22cd3754f00c43f61a219269bde2c7e" + sha256 cellar: :any, sonoma: "bb881fd10d04a5246dc04bd049d3176e3d8358a5b9eb20d69ce9785a6be7506c" + sha256 cellar: :any, ventura: "2713786388b5263f07891669f0e50d9e5b06fc07e68a8da0c6c61c9c09e3e5eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "50fb6bd68f50f189b94e50116d6eaa9abfb8519037e3635b7a7acb0e9d764e89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e3c0e5ede7bab231b8063f79d3326578b51ece94ab0c5c028694eba5e3bf05b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "fftw" + depends_on "icu4c@77" + depends_on "libmpdclient" + depends_on "ncurses" + depends_on "readline" + depends_on "taglib" + + uses_from_macos "curl" + + # Apply open PR to fix build with Boost 1.89.0. + # PR ref: https://github.com/ncmpcpp/ncmpcpp/pull/636 + # Issue ref: https://github.com/ncmpcpp/ncmpcpp/issues/633 + patch do + url "https://github.com/ncmpcpp/ncmpcpp/commit/f67d350aa9beb2abdd12c429e97ae919e5b3102c.patch?full_index=1" + sha256 "7fa67adf722fec69793f9aa53398195294402bb09519e7bd99b388b7f99a5e59" + end + + def install + ENV.append "LDFLAGS", "-liconv" if OS.mac? + ENV.prepend "LDFLAGS", "-L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["readline"].opt_include}" + ENV.append "CXXFLAGS", "-D_XOPEN_SOURCE_EXTENDED" + + args = %w[ + --disable-silent-rules + --enable-clock + --enable-outputs + --enable-visualizer + --with-taglib + ] + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + ENV.delete("LC_CTYPE") + assert_match version.to_s, shell_output("#{bin}/ncmpcpp --version") + end +end diff --git a/Formula/n/ncnn.rb b/Formula/n/ncnn.rb new file mode 100644 index 0000000000000..f4aea6206689e --- /dev/null +++ b/Formula/n/ncnn.rb @@ -0,0 +1,101 @@ +class Ncnn < Formula + desc "High-performance neural network inference framework" + homepage "https://github.com/Tencent/ncnn" + url "https://github.com/Tencent/ncnn/archive/refs/tags/20250916.tar.gz" + sha256 "7d463f1e5061facd02b8af5e792e059088695cdcfcc152c8f4892f6ffe5eab1a" + license "BSD-3-Clause" + revision 2 + head "https://github.com/Tencent/ncnn.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "9575e2e2deeb3785a991251efe534511113a9cb372053585101a6f84977510cc" + sha256 cellar: :any, arm64_sequoia: "e9eb6dd921a6fe37e559d98b95448a11fa93b637440d8ee6a17b793beb935e90" + sha256 cellar: :any, arm64_sonoma: "64828fbeba8322b2d4a2b9477eecdeb8167bbde96e2aa8526f57c794f2b5678f" + sha256 cellar: :any, sonoma: "b8d3624d50331b1138f3c6c9dac4f9b735d22f71c32b8c2eb4b19538aa74d13f" + sha256 arm64_linux: "af2b2661461b344d3d65c38f1eae611b3bd2f97f37c36ce3d141fca43d573333" + sha256 x86_64_linux: "416ca733aad1d13372e08fe2e397cee8f09a1a1b2fb12139377a48e125aee857" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "glslang" + depends_on "protobuf" + + on_macos do + depends_on "libomp" + depends_on "molten-vk" + depends_on "spirv-tools" + end + + on_linux do + depends_on "vulkan-tools" => :test + end + + def install + # fix `libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line` error + # https://stackoverflow.com/a/55086637 + ENV.append "LDFLAGS", "-Wl,--copy-dt-needed-entries" if OS.linux? + + args = %W[ + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_CXX_STANDARD_REQUIRED=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DNCNN_SHARED_LIB=ON + -DNCNN_BUILD_BENCHMARK=OFF + -DNCNN_BUILD_EXAMPLES=OFF + -DNCNN_SYSTEM_GLSLANG=ON + -DGLSLANG_TARGET_DIR=#{Formula["glslang"].opt_lib}/cmake + -DNCNN_VULKAN=ON + ] + + if OS.mac? + args += %W[ + -DVulkan_INCLUDE_DIR=#{Formula["molten-vk"].opt_include} + -DVulkan_LIBRARY=#{Formula["molten-vk"].opt_lib/shared_library("libMoltenVK")} + ] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + vulkan = 1 + if OS.linux? + # Use a fake Vulkan ICD on Linux as it is lighter-weight than testing + # with `vulkan-loader` and `mesa` (CPU/LLVMpipe) dependencies. + ENV["VK_ICD_FILENAMES"] = Formula["vulkan-tools"].lib/"mock_icd/VkICD_mock_icd.json" + elsif ENV["HOMEBREW_GITHUB_ACTIONS"] && Hardware::CPU.intel? + # Don't test Vulkan on GitHub Intel macOS runners as they fail with: "vkCreateInstance failed -9" + vulkan = 0 + end + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(void) { + ncnn::Mat myMat = ncnn::Mat(500, 500); + myMat.fill(1); + ncnn::Mat myMatClone = myMat.clone(); + myMat.release(); + myMatClone.release(); + + #if #{vulkan} + ncnn::create_gpu_instance(); + assert(ncnn::get_gpu_count() > 0); + ncnn::destroy_gpu_instance(); + #endif + + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++11", + "-I#{include}", "-L#{lib}", "-lncnn", + "-o", "test" + system "./test" + end +end diff --git a/Formula/n/nco.rb b/Formula/n/nco.rb new file mode 100644 index 0000000000000..860cef97952b3 --- /dev/null +++ b/Formula/n/nco.rb @@ -0,0 +1,78 @@ +class Nco < Formula + desc "Command-line operators for netCDF and HDF files" + homepage "https://nco.sourceforge.net/" + url "https://github.com/nco/nco/archive/refs/tags/5.3.6.tar.gz" + sha256 "70d64f461a0d5262274495ee1a9d85735aa3115281fdf01df4f946a919f9f6ae" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d15e2ce209eb6281782c41ac706b63aafc4a3cc29cdbf22516b59799967a277b" + sha256 cellar: :any, arm64_sequoia: "352b8fd32b785da50571c2a9af7b338c2d8d6691957281cb5909d15ba04653e8" + sha256 cellar: :any, arm64_sonoma: "88de1d76a3a9060b161d24c80bc0f561a0697414fe8bb1d075364cc7de2fd6b0" + sha256 cellar: :any, sonoma: "2930c77c0a5e129368d949d13a9796f3a29e4136aa1c159ba3a2703b5b4a8cef" + sha256 cellar: :any_skip_relocation, arm64_linux: "7275ad31456ed3930361f0340f7e06e5962e22ff405ce6393864662bd0194431" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f12cd6d5663148d7083697471a466796329af3a63ed32d678d712aa27bcfe33" + end + + head do + url "https://github.com/nco/nco.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "openjdk" => :build # needed for antlr2 + depends_on "gettext" + depends_on "gsl" + depends_on "netcdf" + depends_on "texinfo" + depends_on "udunits" + + uses_from_macos "flex" => :build + + resource "antlr2" do + url "https://github.com/nco/antlr2/archive/refs/tags/antlr2-2.7.7-1.tar.gz" + sha256 "d06e0ae7a0380c806321045d045ccacac92071f0f843aeef7bdf5841d330a989" + end + + def install + resource("antlr2").stage do + args = ["--disable-csharp"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args(prefix: buildpath) + system "make" + + (buildpath/"libexec").install "antlr.jar" + (buildpath/"include").install "lib/cpp/antlr" + (buildpath/"lib").install "lib/cpp/src/libantlr.a" + + (buildpath/"bin/antlr").write <<~SH + #!/bin/sh + exec "#{Formula["openjdk"].opt_bin}/java" -classpath "#{buildpath}/libexec/antlr.jar" antlr.Tool "$@" + SH + + chmod 0755, buildpath/"bin/antlr" + end + + ENV.append "CPPFLAGS", "-I#{buildpath}/include" + ENV.append "LDFLAGS", "-L#{buildpath}/lib" + ENV.prepend_path "PATH", buildpath/"bin" + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-netcdf4" + system "make", "install" + end + + test do + resource "homebrew-example_nc" do + url "https://archive.unidata.ucar.edu/software/netcdf/examples/WMI_Lear.nc" + sha256 "e37527146376716ef335d01d68efc8d0142bdebf8d9d7f4e8cbe6f880807bdef" + end + + testpath.install resource("homebrew-example_nc") + output = shell_output("#{bin}/ncks --json -M WMI_Lear.nc") + assert_match "\"time\": 180", output + end +end diff --git a/Formula/n/ncompress.rb b/Formula/n/ncompress.rb new file mode 100644 index 0000000000000..d10daa97d29a2 --- /dev/null +++ b/Formula/n/ncompress.rb @@ -0,0 +1,47 @@ +class Ncompress < Formula + desc "Fast, simple LZW file compressor" + homepage "https://vapier.github.io/ncompress/" + url "https://github.com/vapier/ncompress/archive/refs/tags/v5.0.tar.gz" + sha256 "96ec931d06ab827fccad377839bfb91955274568392ddecf809e443443aead46" + license "Unlicense" + head "https://github.com/vapier/ncompress.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fb300d3e1ef4dc25fab6344cc7e6010bd55f0fa66403c3371f8d6b3f449d7645" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7e39b3e6471d9335023fcc1434352de41fe4521adff432f237c4167c7de71fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f28dac0e82ae6c3642abb0648dbc64959c1822ca44f2b73a1afce7fb1335328a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f5a549a65439192ba3656d246d95c57979228f95d5c9ccfe26be0fd9744dae1d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9dbd83bf79e6dc3934b84e104305dc7772100aafe85a724275a821d3a4c68762" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1ed0a835e287915e90e45a75971aefd707578cf96ddcbe631fd8bab34000af98" + sha256 cellar: :any_skip_relocation, sonoma: "26e5b5ed48c9974e7d4616fc1dd8f7a8bb089cbf13e9a71e5978a278334a248f" + sha256 cellar: :any_skip_relocation, ventura: "c7bf47ebe6376a3b3a84b4441e8dff37c639cad3c00906a3aec98d6f2fdbe879" + sha256 cellar: :any_skip_relocation, monterey: "d209c387414dfd51d7f7bf079edce89699d6a60eb248bf48d90d1977dd3dbc4d" + sha256 cellar: :any_skip_relocation, big_sur: "b78cd2bde25384f42fd1f5d29ec6b1a909449e6f20c20c44c232885d0d99acbe" + sha256 cellar: :any_skip_relocation, catalina: "55220d13762facae37b84f1b6fcc6ec696daee5cc8b8478b868f5f7e34123af2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b6c5d2b1203d6a07b51cfdf083c0dda44dd1133cabc7823da6093477f33ef4c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cc0946635cd04b532b9c458ec215f1631d08dea366741346308d0030edfa05b" + end + + keg_only :provided_by_macos + + def install + # Remove archaic leading colon before shebang, so that brew install + # cleanup code correctly preserves executable bit + inreplace %w[zcmp zdiff zmore], /^:\s*\n#!/, "#!" + + system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man1}" + end + + test do + (testpath/"hello").write "Hello, world!" + system bin/"compress", "-f", "hello" + assert_match "Hello, world!", shell_output("#{bin}/compress -cd hello.Z") + end +end diff --git a/Formula/n/ncrack.rb b/Formula/n/ncrack.rb new file mode 100644 index 0000000000000..b3873ec3525eb --- /dev/null +++ b/Formula/n/ncrack.rb @@ -0,0 +1,59 @@ +class Ncrack < Formula + desc "Network authentication cracking tool" + homepage "https://nmap.org/ncrack/" + # License is GPL-2.0-only with non-representable exceptions and an OpenSSL exception. + # See the installed COPYING file for full details of license terms. + license :cannot_represent + revision 1 + head "https://github.com/nmap/ncrack.git", branch: "master" + + stable do + url "https://github.com/nmap/ncrack/archive/refs/tags/0.7.tar.gz" + sha256 "f3f971cd677c4a0c0668cb369002c581d305050b3b0411e18dd3cb9cc270d14a" + + # Fix build with GCC 10+. Remove in the next release. + patch do + url "https://github.com/nmap/ncrack/commit/af4a9f15a26fea76e4b461953aa34ec0865d078a.patch?full_index=1" + sha256 "273df2e3bc0733b97a258a9bea2145c4ea36e10b5beaeb687b341e8c8a82eb42" + end + + # Apply Fedora C99 patch + # Unmerged PR: https://github.com/nmap/ncrack/pull/127 + patch do + url "https://src.fedoraproject.org/rpms/ncrack/raw/425a54633e220b6bafca37554e5585e2c6b48082/f/ncrack-0.7-fedora-c99.patch" + sha256 "7bb5625c29c9c218e79d0957ea3e8d84eb4c0bf4ef2acc81b908fed2cbf0e753" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "75a55a9850c62e608742a25832c9890770b10d51c73e797f3f8d46346b775580" + sha256 arm64_sequoia: "b060799701296da75f956960bbfe2f67b9a529a041bf66c9edfc76450b6bdbbd" + sha256 arm64_sonoma: "3ca676300ebb378ef2dc4b7442b15f47df9664e62176b49a1bd7c1d1d0093f42" + sha256 arm64_ventura: "79e9c8100ebba864abd6c8534c1d57d1b9d722461b5e3fca035040b3a274b600" + sha256 arm64_monterey: "4dd658f60d6e9a13f3027bf46c2046b5844114337d348f96e32b542f381bceb3" + sha256 arm64_big_sur: "6984005a54a045373105d59303984cab69ebad3b23da23f2608de8c63f1e9850" + sha256 sonoma: "ff2c043f63fd07c107395df2c44bd494610d53cc6bdb82c7d603188f3e765a60" + sha256 ventura: "c0dfb39809e6c1015c1c41e1b0289326c3000ce7e4e25231b8efc3a555ecc2ea" + sha256 monterey: "b85c147ff11ee53640428f7b56114b63344b48867740739e116884c52dcb8798" + sha256 big_sur: "1ae6d72f2d5ef01ea183185d6a2ddf7b838649927496eee3481ad8688dba0c1c" + sha256 catalina: "ab9acac2396d540a15d92485f59a0bef60434e111fb7045cb8beabfc3facb7e6" + sha256 arm64_linux: "1e8fad1cf83a7e0a208d6b078bcb1cc7b3f40101b6aebae28c43a740dc992cb1" + sha256 x86_64_linux: "8c7b7248266f093ccb7798273d6b789b4632b7703567e6c534a4322339c0eef5" + end + + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "./configure", "--with-openssl=#{Formula["openssl@3"].opt_prefix}", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match version.to_f.to_s, shell_output("#{bin}/ncrack --version") + end +end diff --git a/Formula/n/ncspot.rb b/Formula/n/ncspot.rb new file mode 100644 index 0000000000000..932031dce441b --- /dev/null +++ b/Formula/n/ncspot.rb @@ -0,0 +1,55 @@ +class Ncspot < Formula + desc "Cross-platform ncurses Spotify client written in Rust" + homepage "https://github.com/hrkfdn/ncspot" + url "https://github.com/hrkfdn/ncspot/archive/refs/tags/v1.3.1.tar.gz" + sha256 "d767fbe4c742b18a3ef7203162cc55a0976e07e478295445a5de1660666e2f15" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cb345cc7b697d592d7dd4ad42a3bdca869d49e0293f59deb7c51058517088cfa" + sha256 cellar: :any, arm64_sequoia: "9bf2c2f4ac84e00df974d4478941442f78e91c14d34bfcc10c1706f19d60f093" + sha256 cellar: :any, arm64_sonoma: "11100b8b9d9ff8a214d127197a1ed3670d445440ff2a80cedd663ad490cbcf22" + sha256 cellar: :any, arm64_ventura: "da02d72a547b95fe98bcfa287fbcd55835b0b6b6802afa0da2a896cb47fd0080" + sha256 cellar: :any, sonoma: "13cab273ef6716f5905cc04198297e3c21aef481b16db50456b16f93c7d2d01b" + sha256 cellar: :any, ventura: "4b10b26ac782aad4d90d852c38b4edc794115ab68ecc629da9840b9f312f6e4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "d174716921203688315c6f8c450796a9ee2694755ba9a440e578458bb475ec1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ae43cf3031bbafca5a82cad5a96b1fc52a0ae04765ea6e11fb5199a7a57bd7f" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "portaudio" + + uses_from_macos "python" => :build + uses_from_macos "ncurses" + + on_linux do + depends_on "alsa-lib" + depends_on "dbus" + depends_on "libxcb" + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + def install + ENV["COREAUDIO_SDK_PATH"] = MacOS.sdk_path_if_needed if OS.mac? + system "cargo", "install", "--no-default-features", + "--features", "portaudio_backend,cursive/pancurses-backend,share_clipboard", + *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/ncspot --version") + assert_match "portaudio", shell_output("#{bin}/ncspot --help") + + # Linux CI has an issue running `script`-based testcases + if OS.mac? + stdin, stdout, wait_thr = Open3.popen2 "script -q /dev/null" + stdin.puts "stty rows 80 cols 130" + stdin.puts "env LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 TERM=xterm #{bin}/ncspot -b ." + sleep 1 + Process.kill("INT", wait_thr.pid) + + assert_match "To login you need to perform OAuth2 authorization", stdout.read + end + end +end diff --git a/Formula/n/ncurses.rb b/Formula/n/ncurses.rb new file mode 100644 index 0000000000000..f1cdcba4a5759 --- /dev/null +++ b/Formula/n/ncurses.rb @@ -0,0 +1,104 @@ +class Ncurses < Formula + desc "Text-based UI library" + homepage "https://invisible-island.net/ncurses/announce.html" + url "https://ftpmirror.gnu.org/gnu/ncurses/ncurses-6.5.tar.gz" + mirror "https://invisible-mirror.net/archives/ncurses/ncurses-6.5.tar.gz" + mirror "ftp://ftp.invisible-island.net/ncurses/ncurses-6.5.tar.gz" + mirror "https://ftp.gnu.org/gnu/ncurses/ncurses-6.5.tar.gz" + sha256 "136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cdf1f60b77e8f2f431f010c987a57452b95c1c6426e4ddf829f701f6e7ce5058" + sha256 arm64_sequoia: "4a529cb864994c26766c55ae8e506297523b36319e0f5f5af0faf8250a451f77" + sha256 arm64_sonoma: "ee5253473badfa0701deac8e9973a7358c761dd287f0d748f753130a7a6d2705" + sha256 arm64_ventura: "b79562983390463a00077616c6b3e460aa170bdca43f32839af802aac594aae0" + sha256 arm64_monterey: "75db7bcba54b3acdb36b0dd08f0ce0a0631f7bfda83da3877aab35242ff7276a" + sha256 sonoma: "eb22b3753261f99aa36f5d9e1511a0bca5ea70cd645f7068af2ac5514aafd6a7" + sha256 ventura: "d6316fb9989753d52db231cc4dfe20746c5e2b6dced2ba6136ad1f11e99814aa" + sha256 monterey: "9c262007804eca602c67d686878778051d2ff813237d6805665831a1ea705477" + sha256 arm64_linux: "a41105c555fcaf7cc16cf53be73187724576129a8c39902378d742a8dc396850" + sha256 x86_64_linux: "7c49662d0f319baec24475d38210b2f9c754b2ec1d21a4a3ff39ce81d8605f03" + end + + keg_only :provided_by_macos + + def install + ENV.delete("TERMINFO") + + args = [ + "--prefix=#{prefix}", + "--enable-pc-files", + "--with-pkg-config-libdir=#{lib}/pkgconfig", + "--enable-sigwinch", + "--enable-symlinks", + "--enable-widec", + "--with-shared", + "--with-cxx-shared", + "--with-gpm=no", + "--without-ada", + ] + args << "--with-terminfo-dirs=#{share}/terminfo:/etc/terminfo:/lib/terminfo:/usr/share/terminfo" if OS.linux? + + odie "`-std=gnu17` workaround should be removed!" if build.stable? && version > "6.5" + ENV.append_to_cflags "-std=gnu17" if OS.linux? && DevelopmentTools.gcc_version("gcc") >= 15 + + system "./configure", *args + system "make", "install" + make_libncurses_symlinks + + # Avoid hardcoding Cellar paths in client software. + inreplace bin/"ncursesw6-config", prefix, opt_prefix + pkgshare.install "test" + (pkgshare/"test").install "install-sh", "config.sub", "config.guess" + end + + def make_libncurses_symlinks + major = version.major.to_s + + %w[form menu ncurses panel ncurses++].each do |name| + lib.install_symlink shared_library("lib#{name}w", major) => shared_library("lib#{name}") + lib.install_symlink shared_library("lib#{name}w", major) => shared_library("lib#{name}", major) + lib.install_symlink "lib#{name}w.a" => "lib#{name}.a" + lib.install_symlink "lib#{name}w_g.a" => "lib#{name}_g.a" + end + + lib.install_symlink "libncurses.a" => "libcurses.a" + lib.install_symlink shared_library("libncurses") => shared_library("libcurses") + on_linux do + # libtermcap and libtinfo are provided by ncurses and have the + # same api. Help some older packages to find these dependencies. + # https://bugs.centos.org/view.php?id=11423 + # https://bugs.launchpad.net/ubuntu/+source/ncurses/+bug/259139 + lib.install_symlink "libncurses.so" => "libtermcap.so" + lib.install_symlink "libncurses.so" => "libtinfo.so" + end + + (lib/"pkgconfig").install_symlink "ncursesw.pc" => "ncurses.pc" + (lib/"pkgconfig").install_symlink "formw.pc" => "form.pc" + (lib/"pkgconfig").install_symlink "menuw.pc" => "menu.pc" + (lib/"pkgconfig").install_symlink "panelw.pc" => "panel.pc" + + bin.install_symlink "ncursesw#{major}-config" => "ncurses#{major}-config" + + include.install_symlink "ncursesw" => "ncurses" + include.install_symlink [ + "ncursesw/curses.h", "ncursesw/form.h", "ncursesw/ncurses.h", + "ncursesw/panel.h", "ncursesw/term.h", "ncursesw/termcap.h" + ] + end + + test do + refute_match prefix.to_s, shell_output("#{bin}/ncursesw6-config --prefix") + refute_match share.to_s, shell_output("#{bin}/ncursesw6-config --terminfo-dirs") + + ENV["TERM"] = "xterm" + + system pkgshare/"test/configure", "--prefix=#{testpath}", + "--with-curses-dir=#{prefix}" + system "make", "install" + system testpath/"bin/ncurses-examples" + end +end diff --git a/Formula/n/ncview.rb b/Formula/n/ncview.rb new file mode 100644 index 0000000000000..0bfa07deb3cc6 --- /dev/null +++ b/Formula/n/ncview.rb @@ -0,0 +1,55 @@ +class Ncview < Formula + desc "Visual browser for netCDF format files" + homepage "https://cirrus.ucsd.edu/ncview/" + url "https://cirrus.ucsd.edu/~pierce/ncview/ncview-2.1.11.tar.gz" + sha256 "597cfddf9c2d7993e9b0b86bca1b73839567ee9116ee33f6d750a449b5033d91" + license "GPL-3.0-only" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?ncview[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e3346928e2612dabba4b6798e8f9cb497ff302f1972344cd5271dbb2034ad2ae" + sha256 cellar: :any, arm64_sequoia: "2834b30675b2ef5ac05d70cf900f8dee5543198f5bdd95e67af41a732222f9c4" + sha256 cellar: :any, arm64_sonoma: "65dcdc11101cafd4f43490814d21345cc5f4ffb9c57a8f64fb396b2731fda2ed" + sha256 cellar: :any, arm64_ventura: "2bc952df1f41c6f9050a745254138365ae9496d82b1be390712d69820dca9409" + sha256 cellar: :any, sonoma: "2936bd01d289bc341a2a52e604692c7baa1611f8a2f7aa33d2a2c8e0fef22081" + sha256 cellar: :any, ventura: "51021664ece85a65f8941d091657cd9c10f7a6d5875cd2306cf8cd3d50437ef9" + sha256 cellar: :any_skip_relocation, arm64_linux: "29d0391497116f259d6adbe90d555e92bc49a78fc040e0ba3636354f0cf8284d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed6715afe50ab90f472bcdd31e4b51f047b0705796cc1e103162f74d113a4f44" + end + + depends_on "libice" + depends_on "libpng" + depends_on "libsm" + depends_on "libx11" + depends_on "libxaw" + depends_on "libxt" + depends_on "netcdf" + depends_on "udunits" + + on_linux do + depends_on "libxext" + end + + def install + # Bypass compiler check (which fails due to netcdf's nc-config being + # confused by our clang shim) + inreplace "configure", + "if test x$CC_TEST_SAME != x$NETCDF_CC_TEST_SAME; then", + "if false; then" + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + man1.install "data/ncview.1" + end + + test do + assert_match "Ncview #{version}", + shell_output("DISPLAY= #{bin}/ncview -c 2>&1", 1) + end +end diff --git a/Formula/n/ndenv.rb b/Formula/n/ndenv.rb new file mode 100644 index 0000000000000..9cf154ff719d9 --- /dev/null +++ b/Formula/n/ndenv.rb @@ -0,0 +1,49 @@ +class Ndenv < Formula + desc "Node version manager" + homepage "https://github.com/riywo/ndenv" + url "https://github.com/riywo/ndenv/archive/refs/tags/v0.4.0.tar.gz" + sha256 "1a85e4c0c0eee24d709cbc7b5c9d50709bf51cf7fe996a1548797a4079e0b6e4" + license "MIT" + head "https://github.com/riywo/ndenv.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3aff8712af287caad53964e17c254d5470652fa61c22562579f82b726fc0e977" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8650428e672ef45ea98634ed9e024064c9c23e4604fb7f423fe5d7e12cd13f96" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "64537c94265589e52b05cd90de6998880d58960ee25ea3c2d207e92107b6b10d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e3e31b092194e5f29f15cd18ce26de6fa69dc372b05850f86effa058de0c681" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3e3e31b092194e5f29f15cd18ce26de6fa69dc372b05850f86effa058de0c681" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6d36486433ad28c722a9d0e3b6e780e369beea2855a126c91abae2c1e83384c0" + sha256 cellar: :any_skip_relocation, sonoma: "41545d5c9c5db7c5569d5fe4b0925b99716f104714013efc11c5be65dfa908ef" + sha256 cellar: :any_skip_relocation, ventura: "0185213be14f5f212bbacc1fe2e6f28c0b2a50ed3adbba1da1b189f4168621ec" + sha256 cellar: :any_skip_relocation, monterey: "0185213be14f5f212bbacc1fe2e6f28c0b2a50ed3adbba1da1b189f4168621ec" + sha256 cellar: :any_skip_relocation, big_sur: "11134806587add67781fb03d7be2fd2322029e77e4b744d927fba9afbe6e1b82" + sha256 cellar: :any_skip_relocation, catalina: "11134806587add67781fb03d7be2fd2322029e77e4b744d927fba9afbe6e1b82" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5c259e192f7344bd7e565e602495bbdbba873162f5cd149109148730f189e85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50382fe45272fa7f72497bb0f40a02fd4bf9e293eca303777b9e154021f7c501" + end + + deprecate! date: "2025-08-24", because: :deprecated_upstream, replacement_formula: "nodenv" + + depends_on "node-build" + + def install + inreplace "libexec/ndenv" do |s| + if HOMEBREW_PREFIX.to_s != "/usr/local" + s.gsub! ":/usr/local/etc/ndenv.d", + ":#{HOMEBREW_PREFIX}/etc/ndenv.d\\0" + end + end + + if build.head? + inreplace "libexec/rbenv---version", /^(version=)"([^"]+)"/, + %Q(\\1"\\2-g#{Utils.git_short_head}") + end + + prefix.install "bin", "completions", "libexec" + system bin/"ndenv", "rehash" + end + + test do + shell_output "eval \"$(#{bin}/ndenv init -)\" && ndenv versions" + end +end diff --git a/Formula/n/ndiff.rb b/Formula/n/ndiff.rb new file mode 100644 index 0000000000000..4ad79b71ba6a2 --- /dev/null +++ b/Formula/n/ndiff.rb @@ -0,0 +1,50 @@ +class Ndiff < Formula + desc "Virtual package provided by nmap" + homepage "https://www.math.utah.edu/~beebe/software/ndiff/" + url "https://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz" + sha256 "f2bbd9a2c8ada7f4161b5e76ac5ebf9a2862cab099933167fe604b88f000ec2c" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?ndiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cdab0b2f97b5b9256157324af89023d7e61e7a3789a30d0ffd39064fc71fe219" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a23ac16ac1bda1aa63ff7e64c8a101bc5a1bb1dfda6ee25ad6e6aac1eae3e2b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b4c46a18f21ebab95fba30b75734e9cc3e9e392909961e8901e43624faf2f74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "731436f80a687a2e5d2a2d2a53bd338164bbcf828cd01297e14683caf4c93e22" + sha256 cellar: :any_skip_relocation, arm64_monterey: "731436f80a687a2e5d2a2d2a53bd338164bbcf828cd01297e14683caf4c93e22" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c7c14877b300c9a36d4047b883e773397f819f60718b9e13d17ca4359b317541" + sha256 cellar: :any_skip_relocation, sonoma: "4b4c46a18f21ebab95fba30b75734e9cc3e9e392909961e8901e43624faf2f74" + sha256 cellar: :any_skip_relocation, ventura: "731436f80a687a2e5d2a2d2a53bd338164bbcf828cd01297e14683caf4c93e22" + sha256 cellar: :any_skip_relocation, monterey: "731436f80a687a2e5d2a2d2a53bd338164bbcf828cd01297e14683caf4c93e22" + sha256 cellar: :any_skip_relocation, big_sur: "409ac74964648efd98d55c7b07ffcb90066e23b08a50b495b4e43183fd3a9aef" + sha256 cellar: :any_skip_relocation, catalina: "0998b523aa16873d2ed4d776d29df511154e941ffba972d7560176c82add4515" + sha256 cellar: :any_skip_relocation, arm64_linux: "c030a5b399fa30e0f1ce974e9900718dead459f3fffd5d856ada54ebc277c204" + sha256 cellar: :any_skip_relocation, x86_64_linux: "417d767a85801798bdd56f860a6554abbac5cf980080106ab5767be4c53121ca" + end + + conflicts_with "cern-ndiff", "nmap", because: "both install `ndiff` binaries" + + def install + # workaround for newer clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + ENV.deparallelize + # Install manually as the `install` make target is crufty + system "./configure", "--prefix=.", "--mandir=." + mkpath "bin" + mkpath "man/man1" + system "make", "install" + bin.install "bin/ndiff" + man1.install "man/man1/ndiff.1" + end + + test do + system bin/"ndiff", "--help" + end +end diff --git a/Formula/n/ndpi.rb b/Formula/n/ndpi.rb new file mode 100644 index 0000000000000..f3c8cc25be496 --- /dev/null +++ b/Formula/n/ndpi.rb @@ -0,0 +1,40 @@ +class Ndpi < Formula + desc "Deep Packet Inspection (DPI) library" + homepage "https://www.ntop.org/products/deep-packet-inspection/ndpi/" + url "https://github.com/ntop/nDPI/archive/refs/tags/4.14.tar.gz" + sha256 "954135ee14ad6bd74a78a10db560b534b8f2083ad0615f5c1a2c376fff0301e0" + license "LGPL-3.0-or-later" + head "https://github.com/ntop/nDPI.git", branch: "dev" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "523cb102bf56d6162fb8e23ab771fde9acc61be5e7683ebba536993a948f9440" + sha256 cellar: :any, arm64_sequoia: "9a9e45fe338e7be68ec51aae2ad6d52cf95cdb90fe6f9e6815345aaaa63048ab" + sha256 cellar: :any, arm64_sonoma: "3be0627b16ed3db0bf4ed8f225d8bde0813771501c26025c6f0990b19b125d6f" + sha256 cellar: :any, arm64_ventura: "8c2583825dabae16fca840859c371de0a3f074f3301b8bce85eee801087604b2" + sha256 cellar: :any, sonoma: "8a190f221789ad1f3322ea0a9838591d6f87c3c22060e8a89511699055e5759d" + sha256 cellar: :any, ventura: "2cade3979a0b532070ed4b17df9a4f69eed173b743385aa4a5232ee6d4c359e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9428a7434774926bfae4b2784133615c7b0c8fce94ce6519d9a4fdc2facaf076" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bb8b4eee649008534dbada6d4ad79a7b996223d26944d4d49724e12e866c35e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "json-c" + + uses_from_macos "libpcap" + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"ndpiReader", "-i", test_fixtures("test.pcap") + end +end diff --git a/Formula/n/ne.rb b/Formula/n/ne.rb new file mode 100644 index 0000000000000..ab397fcd4243a --- /dev/null +++ b/Formula/n/ne.rb @@ -0,0 +1,67 @@ +class Ne < Formula + desc "Text editor based on the POSIX standard" + homepage "https://ne.di.unimi.it/" + url "https://github.com/vigna/ne/archive/refs/tags/3.3.4.tar.gz" + sha256 "6958b5cd051d85dcdebbf45aeed2af077346a58d1d18ad14e1db477ce5519d29" + license "GPL-3.0-only" + head "https://github.com/vigna/ne.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "8d3fb098e03124349321ca8162f9b615f1d6ae439be8f5687a6cf791a3960dd6" + sha256 arm64_sequoia: "0c706c6b164b969590e18e216749428499344301311d38019f7e6e68165d3467" + sha256 arm64_sonoma: "507d64103eaa17b9b593406d7727a8f94919e7b14a06ed35d9f6c85a8138b47e" + sha256 arm64_ventura: "c59bbbd54eab62c73c3f51c15022fbd5c68b35bb8f917030ed8006cb990486d3" + sha256 sonoma: "3045ec9a5ff38c4cabefdac8aa0696b311765d09649d47fae57951c8915b9afe" + sha256 ventura: "989c1e6af26b0106dce329c440299b58676f7bccd200ed218be8aa65256281f9" + sha256 arm64_linux: "6646ae30987cb42c9131634e987a6a4221825df92ae474009cb0dc9c6ddca8e5" + sha256 x86_64_linux: "17fc5f7fc5234146da65cbb6a18ba1643bdd009ed76822c7cb2efb3837a05631" + end + + depends_on "texinfo" => :build + + uses_from_macos "ncurses" + + on_linux do + # The version of `env` in CI is too old, so we need to use brewed coreutils. + depends_on "coreutils" => :build + end + + def install + # Use newer env on Linux that supports -S option. + unless OS.mac? + inreplace "version.pl", + "/usr/bin/env", + Formula["coreutils"].libexec/"gnubin/env" + end + ENV.deparallelize + cd "src" do + system "make" + end + system "make", "build", "PREFIX=#{prefix}", "install" + end + + test do + require "pty" + + ENV["TERM"] = "xterm" + document = testpath/"test.txt" + macros = testpath/"macros" + document.write <<~EOS + This is a test document. + EOS + macros.write <<~EOS + GotoLine 2 + InsertString line 2 + InsertLine + Exit + EOS + PTY.spawn(bin/"ne", "--macro", macros, document) do |_r, _w, pid| + sleep 1 + Process.kill "KILL", pid + end + assert_equal <<~EOS, document.read + This is a test document. + line 2 + EOS + end +end diff --git a/Formula/n/neatvi.rb b/Formula/n/neatvi.rb new file mode 100644 index 0000000000000..95ae0cfdfaba8 --- /dev/null +++ b/Formula/n/neatvi.rb @@ -0,0 +1,29 @@ +class Neatvi < Formula + desc "Clone of ex/vi for editing bidirectional utf-8 text" + homepage "https://repo.or.cz/neatvi.git" + url "https://repo.or.cz/neatvi.git", + tag: "17", + revision: "5f4a7d2f619ac808c1fa8a5d40c907032596ff55" + license "ISC" + head "https://repo.or.cz/neatvi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d296ef99c8028f6e38f230b23b312dbe61e45b8f7f738da754798b5ac4b8070" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd7812e6c561174f1ed361c9c802764dcb49bf49abe937070b33303d793862de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c766536e80809b824b77c2fe995e8535b59bd84222e679307dc6f67dc305b97f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da23ab8e6eccd2ba386f3cc1858f712b95cb2585202e4c6f3b9aa4edca7aef8e" + sha256 cellar: :any_skip_relocation, sonoma: "9a264f8ba5cf2579fa3482cf661bb8e3d0551e696eeb7d1409407087e5631851" + sha256 cellar: :any_skip_relocation, ventura: "711cd475456f0e24dff4e631a33f3feb838faea167ab1ebd33e9268eeb64536d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a43082e969207d67c8abcd837ac737568a0e8fb4f71abe4cc4a774bdf3ae00c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fd7720d3326d387c7a19fbcfc371c43ee80086da27327337942aebb19c6ac5e" + end + + def install + system "make" + bin.install "vi" => "neatvi" + end + + test do + pipe_output(bin/"neatvi", ":q\n") + end +end diff --git a/Formula/n/nebula.rb b/Formula/n/nebula.rb new file mode 100644 index 0000000000000..9dd2104fb5d8b --- /dev/null +++ b/Formula/n/nebula.rb @@ -0,0 +1,46 @@ +class Nebula < Formula + desc "Scalable overlay networking tool for connecting computers anywhere" + homepage "https://github.com/slackhq/nebula" + url "https://github.com/slackhq/nebula/archive/refs/tags/v1.9.7.tar.gz" + sha256 "b8ca239c6c728deadbb28927c5332e4abf0466121d76616827adbaabbba32d05" + license "MIT" + head "https://github.com/slackhq/nebula.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b7c619883ab42fcf031ec5f6bf1a7c96e52d2ac8aec1eadfc749862e41b895d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1b7c619883ab42fcf031ec5f6bf1a7c96e52d2ac8aec1eadfc749862e41b895d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b7c619883ab42fcf031ec5f6bf1a7c96e52d2ac8aec1eadfc749862e41b895d" + sha256 cellar: :any_skip_relocation, sonoma: "456c49fd3087c203a54e024aa8d10169e5cee7d864b78f81df1a27802dd4600e" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf15589487ab2990409221da4d1f511595659250521cbc3ea03cab26b94a61fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bee5ec6a0f9b66bc7da679659352076dc5681ab1f1503e5bc0754d7aea4b9c43" + end + + depends_on "go" => :build + + def install + ENV["BUILD_NUMBER"] = version + system "make", "service" + bin.install "./nebula" + bin.install "./nebula-cert" + end + + service do + run [opt_bin/"nebula", "-config", etc/"nebula/"] + keep_alive true + require_root true + log_path var/"log/nebula.log" + error_log_path var/"log/nebula.log" + end + + test do + system bin/"nebula-cert", "ca", "-name", "testorg" + system bin/"nebula-cert", "sign", "-name", "host", "-ip", "192.168.100.1/24" + (testpath/"config.yml").write <<~YAML + pki: + ca: #{testpath}/ca.crt + cert: #{testpath}/host.crt + key: #{testpath}/host.key + YAML + system bin/"nebula", "-test", "-config", "config.yml" + end +end diff --git a/Formula/n/nedit.rb b/Formula/n/nedit.rb new file mode 100644 index 0000000000000..e3674a2eed15d --- /dev/null +++ b/Formula/n/nedit.rb @@ -0,0 +1,56 @@ +class Nedit < Formula + desc "Fast, compact Motif/X11 plain text editor" + homepage "https://sourceforge.net/projects/nedit/" + url "https://downloads.sourceforge.net/project/nedit/nedit-source/nedit-5.7-src.tar.gz" + sha256 "add9ac79ff973528ad36c86858238bac4f59896c27dbf285cbe6a4d425fca17a" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "63e38eb761dcd2a048f2cb5dcb614fcfb7c5e89b66883316628c95eeec52e35d" + sha256 cellar: :any, arm64_sequoia: "a4e7775080f68b28a71f10c696a4a57c347d4f6620dde7e033bb3c5083db4250" + sha256 cellar: :any, arm64_sonoma: "8f6e94981bc35788dba9284a2313b48003f8a6bb10b26f15ee4dc2f20c4ecba5" + sha256 cellar: :any, arm64_ventura: "2ce67e319d75468e209d20d306cb6c3dcacea83feafd8114902273b1cb4b3344" + sha256 cellar: :any, arm64_monterey: "9ee06ab3c8df64e26b87d80ac63acfff12ce97286ce115f2fc8882b3e4c88605" + sha256 cellar: :any, arm64_big_sur: "e81454f55e5a3b396abe741f65a4a2600d18e93301385edd3481d8d55cee20c0" + sha256 cellar: :any, sonoma: "8422e83c7f1428b1188a85db7c86ede8660169ebe97c14728a45a7428908d7a7" + sha256 cellar: :any, ventura: "4a0ede3b87a97df3bb77ef2ffaac6632cb6f3834c1208cf9c076c0b3eda751c4" + sha256 cellar: :any, monterey: "97501b6d060c2da91ce81ff637fc9898e5f3696c0ca6005ea862d5cf3b9b59f6" + sha256 cellar: :any, big_sur: "d39ce752a03c79732c908a3cbe93df61f413a12126f764e7e1c3d71f4106f701" + sha256 cellar: :any, catalina: "c726811764a5d12465d4c11b273229482af935921df472f6d083a27e34b39b3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "55378caed6582cb7f9dc529539d45ec7195c4ef042eca0d152d76663c60af47a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd75a55df6025af2525c13fb2657d74632fac30c2d813eda1d07ae1eea146ffa" + end + + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + depends_on "libxext" + depends_on "libxp" + depends_on "libxpm" + depends_on "libxt" + depends_on "openmotif" + + uses_from_macos "bison" => :build + + def install + os = OS.mac? ? "macosx" : OS.kernel_name.downcase + system "make", os, "MOTIFLINK='-lXm'" + system "make", "-C", "doc", "man", "doc" + + bin.install "source/nedit" + bin.install "source/nc" => "ncl" + + man1.install "doc/nedit.man" => "nedit.1x" + man1.install "doc/nc.man" => "ncl.1x" + (etc/"X11/app-defaults").install "doc/NEdit.ad" => "NEdit" + doc.install Dir["doc/*"] + end + + test do + assert_match "Can't open display", shell_output("DISPLAY= #{bin}/nedit 2>&1", 1) + assert_match "Can't open display", shell_output("DISPLAY= #{bin}/ncl 2>&1", 1) + end +end diff --git a/Formula/n/needle.rb b/Formula/n/needle.rb new file mode 100644 index 0000000000000..2d4768af64007 --- /dev/null +++ b/Formula/n/needle.rb @@ -0,0 +1,58 @@ +class Needle < Formula + desc "Compile-time safe Swift dependency injection framework with real code" + homepage "https://github.com/uber/needle" + url "https://github.com/uber/needle/archive/refs/tags/v0.25.1.tar.gz" + sha256 "b9cf878b0ce9589e862ec5aa8ba3222e181ecbe038369989d2ee9d9c80157fbb" + license "Apache-2.0" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2cef1302f96a215e8126af9e3ed2c714f7763bbe73b64eb47c68954869cdf350" + sha256 cellar: :any, arm64_sequoia: "cbcf9f7c69f032ab6ff3a83bad525a86ab607985680870ea905f9fd8d413734b" + sha256 cellar: :any, arm64_sonoma: "11b37daadfe93a3be6fe5605b760afbe130d6944100e62f0ceb2b75fce67110d" + sha256 cellar: :any, arm64_ventura: "dba912fe6c6eb664a0b43092a27e8bb9b9ffab66cea81e559f01bec356eb8265" + sha256 cellar: :any, sonoma: "2297f9b535ac16dc443f30f5894772c85c70ec3bb4502b4520d3d93c4ad3ed09" + sha256 cellar: :any, ventura: "9a4f63352a659ff766fdd61e5f8dbe71940c024a25f879ff07f75089fe3a19be" + end + + depends_on :macos + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + + def install + # Avoid building a universal binary. + swift_build_flags = (buildpath/"Makefile").read[/^SWIFT_BUILD_FLAGS=(.*)$/, 1].split + %w[--arch arm64 x86_64].each do |flag| + swift_build_flags.delete(flag) + end + + system "make", "install", "BINARY_FOLDER_PREFIX=#{prefix}", "SWIFT_BUILD_FLAGS=#{swift_build_flags.join(" ")}" + bin.install "./Generator/bin/needle" + libexec.install "./Generator/bin/lib_InternalSwiftSyntaxParser.dylib" + + # lib_InternalSwiftSyntaxParser is taken from Xcode, so it's a universal binary. + deuniversalize_machos(libexec/"lib_InternalSwiftSyntaxParser.dylib") + end + + test do + (testpath/"Test.swift").write <<~SWIFT + import Foundation + + protocol ChildDependency: Dependency {} + class Child: Component {} + + let child = Child(parent: self) + SWIFT + + assert_match "Root\n", shell_output("#{bin}/needle print-dependency-tree #{testpath}/Test.swift") + assert_match version.to_s, shell_output("#{bin}/needle version") + end +end diff --git a/Formula/n/nef.rb b/Formula/n/nef.rb new file mode 100644 index 0000000000000..4f2dc16f8c566 --- /dev/null +++ b/Formula/n/nef.rb @@ -0,0 +1,36 @@ +class Nef < Formula + desc "Steroids for Xcode Playgrounds" + homepage "https://nef.bow-swift.io" + url "https://github.com/bow-swift/nef/archive/refs/tags/0.7.1.tar.gz" + sha256 "147b8723d65ababedd04abf2ea4445c2b16dd7c18814a92182ae61978eb1152e" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5be34019bcdbf094f59babc2e715f8fb410fbd8547dfd42a926478e125f249b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13b82b8e2f7ba23ae87d20f575790635cd3d8ffb92bd2b89cc5fc970b39f2aee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "62d050e082d72b3f41568569a48da9c75847f834339dd3973ebd9e552defc8be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6cd8f9c972f707a1c3a05f95c68387f56d9a730bb4a3d42a06fde72ecb481984" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8918c48c922141c187e2271884864118e01b8cc821d53d3bf82f25ed61cf6075" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b8453d3a8cb3b1cdcc4c042f63efd772a70b2e28f822faca6adf710688f7cf9b" + sha256 cellar: :any_skip_relocation, sonoma: "2b261d31f2eb2c26978e7bced45707202d1bf571ab3f679958c135578a5633a0" + sha256 cellar: :any_skip_relocation, ventura: "92e95815627f276ef3800d4795ab8f724d3f3e9eea8a3fe38761d7117d11dd86" + sha256 cellar: :any_skip_relocation, monterey: "8841fde2a11375a65c32ac4e8c88dfc44f64935921a71fa546026fb40e8acef1" + sha256 cellar: :any_skip_relocation, big_sur: "4a80e27e8474a6100f79b2845121660f3fec14e1f9f90a09b12f5b9fc804b5ef" + end + + depends_on :macos + depends_on xcode: "13.1" + + def install + system "make", "install", "prefix=#{prefix}", "version=#{version}" + end + + test do + system bin/"nef", "markdown", + "--project", "#{share}/tests/Documentation.app", + "--output", "#{testpath}/nef" + assert_path_exists "#{testpath}/nef/library/apis.md" + end +end diff --git a/Formula/n/negfix8.rb b/Formula/n/negfix8.rb new file mode 100644 index 0000000000000..4b3b36ee6470e --- /dev/null +++ b/Formula/n/negfix8.rb @@ -0,0 +1,29 @@ +class Negfix8 < Formula + desc "Turn scanned negative images into positives" + homepage "https://web.archive.org/web/20220926032510/https://sites.google.com/site/negfix/" + url "https://web.archive.org/web/20201022025021/https://sites.google.com/site/negfix/downloads/negfix8.3.tgz" + sha256 "2f360b0dd16ca986fbaebf5873ee55044cae591546b573bb17797cbf569515bd" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8cfaf079531e850a4938db52d6a99d4626142eba30165284a39d9349d805a18b" + end + + # https://github.com/chrishunt/negfix8/pull/2#issuecomment-1956815369 + deprecate! date: "2024-06-10", because: :unmaintained + disable! date: "2025-06-21", because: :unmaintained + + depends_on "imagemagick" + + def install + bin.install "negfix8" + end + + test do + (testpath/".negfix8/frameprofile").write "1 1 1 1 1 1 1" + system bin/"negfix8", "-u", "frameprofile", test_fixtures("test.tiff"), + "#{testpath}/output.tiff" + assert_path_exists testpath/"output.tiff" + end +end diff --git a/Formula/n/neko.rb b/Formula/n/neko.rb new file mode 100644 index 0000000000000..d43c5ec06e028 --- /dev/null +++ b/Formula/n/neko.rb @@ -0,0 +1,72 @@ +class Neko < Formula + desc "High-level, dynamically typed programming language" + homepage "https://nekovm.org/" + url "https://github.com/HaxeFoundation/neko/archive/refs/tags/v2-4-1.tar.gz" + version "2.4.1" + sha256 "702282028190dffa2078b00cca515b8e2ba889186a221df2226d2b6deb3ffaca" + license "MIT" + head "https://github.com/HaxeFoundation/neko.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "1a44e81e1776c7f06a63ee3cac0697c93ad4b1f5f1dfbe58789013c702d14f8a" + sha256 arm64_sequoia: "6089dd1e4fe69503a105375a9533dbe582794eee99d6cae8ac2743b849439d57" + sha256 arm64_sonoma: "dd942c346ec9687a7e998c82280ea88c01c56ec7aa9629f3fefedd7e927bd40a" + sha256 arm64_ventura: "073b6bcbcaf97dec3f1ebdd4c628ce6afc2f222ae2813387f8148e4aa1400451" + sha256 sonoma: "5e961a790c898530c2218cada8c03741028d46b617b7c1b895d2256389cb85da" + sha256 ventura: "6b860ebf76d071afb52369220c3021c935a54e9bcfedf877ebdc01395af3bbc0" + sha256 arm64_linux: "bd2ecd42df25c5a31a83069b25acf108c005c8c861771c4c33390633829e0d06" + sha256 x86_64_linux: "6aab8930e6a10748212eec532bf2ce096d036934908fa2f66be055165c1802fe" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "mariadb-connector-c" + depends_on "mbedtls" + depends_on "pcre2" + + uses_from_macos "apr" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "apr-util" + depends_on "gtk+3" # On mac, neko uses carbon. On Linux it uses gtk3 + depends_on "httpd" + end + + def install + args = %W[ + -DMARIADB_CONNECTOR_LIBRARIES=#{Formula["mariadb-connector-c"].opt_lib/"mariadb"/shared_library("libmariadb")} + -DRELOCATABLE=OFF + -DRUN_LDCONFIG=OFF + ] + if OS.linux? + args << "-DAPR_LIBRARY=#{Formula["apr"].opt_lib}" + args << "-DAPR_INCLUDE_DIR=#{Formula["apr"].opt_include}/apr-1" + args << "-DAPRUTIL_LIBRARY=#{Formula["apr-util"].opt_lib}" + args << "-DAPRUTIL_INCLUDE_DIR=#{Formula["apr-util"].opt_include}/apr-1" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + ENV.deparallelize { system "cmake", "--build", "build" } + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + You must add the following line to your .bashrc or equivalent: + export NEKOPATH="#{HOMEBREW_PREFIX}/lib/neko" + EOS + end + + test do + ENV["NEKOPATH"] = "#{HOMEBREW_PREFIX}/lib/neko" + system bin/"neko", "-version" + (testpath/"hello.neko").write '$print("Hello world!\n");' + system bin/"nekoc", "hello.neko" + assert_equal "Hello world!\n", shell_output("#{bin}/neko hello") + end +end diff --git a/Formula/n/nelm.rb b/Formula/n/nelm.rb new file mode 100644 index 0000000000000..f8c9863b4f6c1 --- /dev/null +++ b/Formula/n/nelm.rb @@ -0,0 +1,51 @@ +class Nelm < Formula + desc "Kubernetes deployment tool that manages and deploys Helm Charts" + homepage "https://github.com/werf/nelm" + url "https://github.com/werf/nelm/archive/refs/tags/v1.15.1.tar.gz" + sha256 "fd7a8fb774370070469a6faf1c3fc5ffe2ccf1d8ba3952f2306bc8cdc779bc98" + license "Apache-2.0" + head "https://github.com/werf/nelm.git", branch: "main" + + # Not all releases are marked as "latest" but there is also "pre-release" + # on GitHub, so it's necessary to check releases. + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "53499c1b6533a981e853ef961ea73c991a1f5ebfc2f67dad711d388313699b7b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9302b2a6540d053f99ba7485ff8029041d2c1930b70f71735c7650f71658d83" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "174c48299d404686eadce7b56753bfd865b28d3901feae7fd13d9edc1b883dd1" + sha256 cellar: :any_skip_relocation, sonoma: "44ca5b87141ba8a92e4c8d99b0c4c419367b6882810ebe518a015e142cc97aba" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d151fd36c408690ed85e675769dd814f03be3aafd51cfd72d8e9cc1f8427644" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75b88ed6e38c9255953da7a041ba207ab08a130e95cf8283a42936f0af6c7d42" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/werf/nelm/pkg/common.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/nelm" + + generate_completions_from_executable(bin/"nelm", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nelm version") + + (testpath/"Chart.yaml").write <<~YAML + apiVersion: v2 + name: mychart + version: 1.0.0 + dependencies: + - name: cert-manager + version: 1.13.3 + repository: https://127.0.0.1 + YAML + assert_match "Error: no cached repository", shell_output("#{bin}/nelm chart dependency download 2>&1", 1) + end +end diff --git a/Formula/n/nemu.rb b/Formula/n/nemu.rb new file mode 100644 index 0000000000000..bfe05b50563b7 --- /dev/null +++ b/Formula/n/nemu.rb @@ -0,0 +1,42 @@ +class Nemu < Formula + desc "Ncurses UI for QEMU" + homepage "https://github.com/nemuTUI/nemu" + url "https://github.com/nemuTUI/nemu/archive/refs/tags/v3.4.0.tar.gz" + sha256 "e272b3e80623f8aef66c3ecb5e2d8846ac89b2514a4bbb5026e74f51c1a5ef42" + license "BSD-2-Clause" + + bottle do + sha256 arm64_tahoe: "a85570304ed9582ca07aab731b00e4cd2e4f88b4dfddaeacf119d5362f1dc670" + sha256 arm64_sequoia: "f8e00617670f088a45154eed42c7a37257d23692128cb325e880df8fd340c834" + sha256 arm64_sonoma: "85ed732c4c8c5a1289c3d78d425798876f32d6a3095c04a744d4ef1f32339c4d" + sha256 sonoma: "988e07f3dc2a6a26b82a63b6583775f48b7d8eeed7ca2a648d5ada870d9d97de" + sha256 arm64_linux: "8587fe0509237203b730dd4736cec438559fb2e52c2fe2c219d0764e69851be4" + sha256 x86_64_linux: "a3b5579daa967e5637df12043eaef848eacc00d9dbc44a4180cfec9d3730a467" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "json-c" + depends_on "libarchive" + depends_on "ncurses" + depends_on "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "sqlite" + + on_linux do + depends_on "libusb" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + expected = /^Config file .* is not found.*$/ + assert_match expected, pipe_output("XDG_CONFIG_HOME=#{Dir.home} #{bin}/nemu --list", "n") + end +end diff --git a/Formula/n/neo4j.rb b/Formula/n/neo4j.rb new file mode 100644 index 0000000000000..17797f7d808cc --- /dev/null +++ b/Formula/n/neo4j.rb @@ -0,0 +1,68 @@ +class Neo4j < Formula + desc "Robust (fully ACID) transactional property graph database" + homepage "https://neo4j.com/" + url "https://neo4j.com/artifact.php?name=neo4j-community-2025.10.1-unix.tar.gz" + sha256 "69ade165e3347a132dea6664fce7fda86f391a7aefb1ab00f21ce940ea692f09" + license "GPL-3.0-or-later" + + livecheck do + url "https://neo4j.com/deployment-center/" + regex(/href=.*?edition=community[^"' >]+release=v?(\d+(?:\.\d+)+)[&"' >] + |href=.*?release=v?(\d+(?:\.\d+)+)[^"' >]+edition=community/ix) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "a11c9d414840b8cd9799addad0c6b79861a6667781fbddb7f5271b8f3ff994fe" + end + + depends_on "cypher-shell" + depends_on "openjdk@21" + + def install + env = { + JAVA_HOME: Formula["openjdk@21"].opt_prefix, + NEO4J_HOME: libexec, + } + # Remove windows files + rm(Dir["bin/*.bat"]) + + # Install jars in libexec to avoid conflicts + libexec.install Dir["*"] + + bash_completion.install (libexec/"bin/completion").children + rm_r libexec/"bin/completion" + + # Symlink binaries + bin.install libexec.glob("bin/neo4j*") + bin.env_script_all_files(libexec/"bin", env) + + # Adjust UDC props + # Suppress the empty, focus-stealing java gui. + (libexec/"conf/neo4j.conf").append_lines <<~EOS + server.jvm.additional=-Djava.awt.headless=true-Dunsupported.dbms.udc.source=homebrew + server.directories.data=#{var}/neo4j/data + server.directories.logs=#{var}/log/neo4j + EOS + end + + def post_install + (var/"log/neo4j").mkpath + (var/"neo4j").mkpath + end + + service do + run [opt_bin/"neo4j", "console"] + keep_alive false + working_dir var/"neo4j" + log_path var/"log/neo4j.log" + error_log_path var/"log/neo4j.log" + end + + test do + ENV["NEO4J_HOME"] = libexec + ENV["NEO4J_LOG"] = testpath/"libexec/data/log/neo4j.log" + ENV["NEO4J_PIDFILE"] = testpath/"libexec/data/neo4j-service.pid" + mkpath testpath/"libexec/data/log" + assert_match(/Neo4j .*is not running/i, shell_output("#{bin}/neo4j status 2>&1", 3)) + end +end diff --git a/Formula/n/neocmakelsp.rb b/Formula/n/neocmakelsp.rb new file mode 100644 index 0000000000000..d4901a52ad346 --- /dev/null +++ b/Formula/n/neocmakelsp.rb @@ -0,0 +1,36 @@ +class Neocmakelsp < Formula + desc "Another cmake lsp" + homepage "https://neocmakelsp.github.io/" + url "https://github.com/neocmakelsp/neocmakelsp/archive/refs/tags/v0.8.26.tar.gz" + sha256 "a400e86420cc7d67008a2139c3d7d9853b2775ffb5b6c53964775ffb505e5a36" + license "MIT" + head "https://github.com/neocmakelsp/neocmakelsp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "11c0b94120507fc287040e1e18f59eb253cb39a0af0c94a15fc70790aeb471f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d07e3ec172dfc1fca59ab2735859408cb2fb410906a89e886936def39b8af8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a2fc387dffea4717157f8b9400d20197b3d8dc7bca7d76781b3a3c4bb0f2d5d5" + sha256 cellar: :any_skip_relocation, sonoma: "01ff660c12bc18ed4efe31521cac0a2d9133809112d00559513574023d82d8cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f49e44a25b7760d34e884e394e5fdfc68567f196f6ce6513eb6fd3d91a2659e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0846f311d460e825908bad1ed146201f22c23fea5f87b3c2daf925985e2d0754" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.cmake").write <<~CMAKE + cmake_minimum_required(VERSION 3.15) + project(TestProject) + CMAKE + + system bin/"neocmakelsp", "format", testpath/"test.cmake" + system bin/"neocmakelsp", "tree", testpath/"test.cmake" + + version_output = shell_output("#{bin}/neocmakelsp --version") + assert_match version.major_minor_patch.to_s, version_output + end +end diff --git a/Formula/n/neofetch.rb b/Formula/n/neofetch.rb new file mode 100644 index 0000000000000..b68d991365a83 --- /dev/null +++ b/Formula/n/neofetch.rb @@ -0,0 +1,30 @@ +class Neofetch < Formula + desc "Fast, highly customisable system info script" + homepage "https://github.com/dylanaraps/neofetch" + url "https://github.com/dylanaraps/neofetch/archive/refs/tags/7.1.0.tar.gz" + sha256 "58a95e6b714e41efc804eca389a223309169b2def35e57fa934482a6b47c27e7" + license "MIT" + head "https://github.com/dylanaraps/neofetch.git", branch: "master" + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "1382d315f586920f24251b6cd7a79b1c940634d073b42c72007ed87a796d1efc" + end + + deprecate! date: "2024-05-04", because: :repo_archived + disable! date: "2025-05-05", because: :repo_archived + + on_macos do + depends_on "screenresolution" + end + + def install + inreplace "neofetch", "/usr/local", HOMEBREW_PREFIX + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"neofetch", "--config", "none", "--color_blocks", "off", + "--disable", "wm", "de", "term", "gpu" + end +end diff --git a/Formula/n/neomutt.rb b/Formula/n/neomutt.rb new file mode 100644 index 0000000000000..795be17f38c6b --- /dev/null +++ b/Formula/n/neomutt.rb @@ -0,0 +1,81 @@ +class Neomutt < Formula + desc "E-mail reader with support for Notmuch, NNTP and much more" + homepage "https://neomutt.org/" + url "https://github.com/neomutt/neomutt/archive/refs/tags/20250905.tar.gz" + sha256 "f409fa3803bfc540869b78719400bceda216842e4da024f83ca3060241d9c516" + license "GPL-2.0-or-later" + head "https://github.com/neomutt/neomutt.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "21836c6bfd09c433990d9b12bb501aa7ac8feebd14ea029641aed21cf554f983" + sha256 arm64_sequoia: "84f62246d0ccb4bff497544881fed2a06a9e81187c3bde6f7f738ee2fa0b0785" + sha256 arm64_sonoma: "162fcedc8e2c921387cca0575cd8d2bb6c4e63100d66c32de4a0847aa6a1ac60" + sha256 arm64_ventura: "50231a2c92e93c455f44c1f819ab7d5cf65f6c758276c2342a268fad5be978e0" + sha256 sonoma: "811727648432674b186b76a30c6472b140c2d232e6432f7ada288df305f9739d" + sha256 ventura: "b54a11db96f0f03e92a308f74985cd36b6d4d99fc2534007944afca740ca19df" + sha256 arm64_linux: "e1463cece45b7b43920c75e12f69167ec02502559a71e0f994e83aacf8a6760d" + sha256 x86_64_linux: "6423610986b83a52a0864ee3ea0123ee822d30f5eff3d69c9be8d945860c63f2" + end + + depends_on "docbook-xsl" => :build + depends_on "pkgconf" => :build + # The build breaks when it tries to use system `tclsh`. + depends_on "tcl-tk" => :build + depends_on "gettext" + depends_on "gpgme" + depends_on "libidn2" + depends_on "lmdb" + depends_on "lua" + depends_on "ncurses" + depends_on "notmuch" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + depends_on "tokyo-cabinet" + + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "cyrus-sasl" + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "libgpg-error" + # Build again libiconv for now on, + # but reconsider when macOS 14.2 is released + depends_on "libiconv" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + args = %W[ + --sysconfdir=#{etc} + --autocrypt + --gss + --disable-idn + --idn2 + --lmdb + --nls + --notmuch + --pcre2 + --sasl + --sqlite + --tokyocabinet + --zlib + --with-idn2=#{Formula["libidn2"].opt_prefix} + --with-lua=#{Formula["lua"].opt_prefix} + --with-ncurses=#{Formula["ncurses"].opt_prefix} + --with-ssl=#{Formula["openssl@3"].opt_prefix} + --with-sqlite=#{Formula["sqlite"].opt_prefix} + ] + + args << "--with-iconv=#{Formula["libiconv"].opt_prefix}" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match "set debug_level = 0", shell_output("#{bin}/neomutt -F /dev/null -Q debug_level") + end +end diff --git a/Formula/n/neon.rb b/Formula/n/neon.rb new file mode 100644 index 0000000000000..68da8f8a03d81 --- /dev/null +++ b/Formula/n/neon.rb @@ -0,0 +1,89 @@ +class Neon < Formula + desc "HTTP and WebDAV client library with a C interface" + homepage "https://notroj.github.io/neon/" + url "https://notroj.github.io/neon/neon-0.35.0.tar.gz" + mirror "https://fossies.org/linux/www/neon-0.35.0.tar.gz" + sha256 "1467afb73f35e3f5d0e9fd70628c14cba266a65e2a1fb6e3f945ee3385c8595b" + license "LGPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?neon[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9209ee7b15a76a8a5d4a86450d865b1806ba45102ceb58318a55cd7499fee5e0" + sha256 cellar: :any, arm64_sequoia: "d2678bf553b660959a46fa76015d02248a4bad6170c9f1f6fc431df55c385acf" + sha256 cellar: :any, arm64_sonoma: "fadf31281622306d3cb61696ecdfd8377ff16020ae06ad15ebbb2bd45a62e386" + sha256 cellar: :any, arm64_ventura: "d8d09b9f936ba9af41aa655d4d518e13f4c19ec377f11810839995b27c10c10e" + sha256 cellar: :any, sonoma: "8be89f6c7690b43cad0f9fe25bb23a1be0e931e4012360ad5b035ebf5666d290" + sha256 cellar: :any, ventura: "27223b58b2ef27a340c90478e3d0c090a825775c2d7ee1cfbdd6005d0f3f9cd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "1452d52bbae2d279acaa6c18ff7c989a67c356c6f5b2eeebdd91df31d172eee1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8ae683a2e4863090997632a45ca8aca8d65c32624e18ce06ce08509ab9214b3" + end + + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + depends_on "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + system "./configure", "--enable-shared", + "--disable-static", + "--disable-nls", + "--with-ssl=openssl", + "--with-libs=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + port = free_port + + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main(int argc, char **argv) + { + char data[] = "Example data.\\n"; + ne_session *sess; + int ec = EXIT_SUCCESS; + ne_sock_init(); + sess = ne_session_create("http", "localhost", #{port}); + if (ne_get(sess, "/foo/bar/baz", STDOUT_FILENO)) { + fprintf(stderr, "nget: Request failed: %s\\n", ne_get_error(sess)); + ec = EXIT_FAILURE; + } + ne_session_destroy(sess); + return ec; + } + C + system ENV.cc, "test.c", "-I#{include}/neon", "-L#{lib}", "-lneon", "-o", "test" + + fork do + server = TCPServer.new port + session = server.accept + msg = session.gets + response_body = "Hello world! Message: #{msg.strip}" + content_length = response_body.bytesize + + session.puts "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nContent-Length: #{content_length}\r\n\r\n" + session.puts response_body + session.close + server.close + end + + sleep 1 + assert_match "Hello world! Message: GET /foo/bar/baz HTTP/1.1", shell_output("./test") + end +end diff --git a/Formula/n/neonctl.rb b/Formula/n/neonctl.rb new file mode 100644 index 0000000000000..c3c8cfadc3d71 --- /dev/null +++ b/Formula/n/neonctl.rb @@ -0,0 +1,39 @@ +class Neonctl < Formula + desc "Neon CLI tool" + homepage "https://neon.tech/docs/reference/neon-cli" + url "https://registry.npmjs.org/neonctl/-/neonctl-2.17.1.tgz" + sha256 "991845e248e7b113e3b6209391f89ac21a6c2cc7f0f6c28707a93f6d5b4efcc7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3c3d410752a8acf77b6f2e7fb5f5c6d7d28e7fcaf8f177f92bd29efc5a52474f" + sha256 cellar: :any, arm64_sequoia: "5bfe34f28d7f4e6a4d31c8637de41d8a5fd68b739c887672ea4157c0121a387b" + sha256 cellar: :any, arm64_sonoma: "5bfe34f28d7f4e6a4d31c8637de41d8a5fd68b739c887672ea4157c0121a387b" + sha256 cellar: :any, sonoma: "5a21913a4e8a7ae86e4c3c56fc5b4efa3a8eb73f11b71f493e955344327d12bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "8823b176f5e059cf590a66b2e8e1bacbb2826f45e663c2eb5665b5de54375073" + sha256 cellar: :any_skip_relocation, x86_64_linux: "382422384222066387edfde37a8a967dfda734b34acbff265394dd88732eca15" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + %w[neonctl neon].each do |cmd| + generate_completions_from_executable(bin/cmd, "completion", shells: [:bash, :zsh]) + end + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/neonctl/node_modules" + node_modules.glob("{bare-fs,bare-os,bare-url}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + output = shell_output("#{bin}/neonctl --api-key DOES-NOT-EXIST projects create 2>&1", 1) + assert_match("Authentication failed", output) + end +end diff --git a/Formula/n/neosync.rb b/Formula/n/neosync.rb new file mode 100644 index 0000000000000..10fdea71d8661 --- /dev/null +++ b/Formula/n/neosync.rb @@ -0,0 +1,42 @@ +class Neosync < Formula + desc "CLI for interfacing with Neosync" + homepage "https://www.neosync.dev/" + url "https://github.com/nucleuscloud/neosync/archive/refs/tags/v0.5.41.tar.gz" + sha256 "f11966321826d40d28b087b1daa81519e600759b9813b0e686ec49397a466a21" + license "MIT" + head "https://github.com/nucleuscloud/neosync.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7dff0d67b524213408aba298d75f80fea1eafaf7756313dba20b8079d41b0f2b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d955843c57eaa847b43b5aefcce7d239677049fcd650059f7b056df93b4ee67" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d955843c57eaa847b43b5aefcce7d239677049fcd650059f7b056df93b4ee67" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d955843c57eaa847b43b5aefcce7d239677049fcd650059f7b056df93b4ee67" + sha256 cellar: :any_skip_relocation, sonoma: "14bcd6d91cb2fd66bc410cc059692c1a25db636a2e778fbdff31ef10f7b5b018" + sha256 cellar: :any_skip_relocation, ventura: "14bcd6d91cb2fd66bc410cc059692c1a25db636a2e778fbdff31ef10f7b5b018" + sha256 cellar: :any_skip_relocation, arm64_linux: "66642ba75fc6ba5df446549755498c22a0bdbb17ae84a7579cb580858b39d35a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9fe641cfecd902842f7dc37e292bc6eef5d6d545dc60bf266a59fc970de2976" + end + + deprecate! date: "2025-10-02", because: :repo_archived + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/nucleuscloud/neosync/cli/internal/version.gitVersion=#{version} + -X github.com/nucleuscloud/neosync/cli/internal/version.gitCommit=#{tap.user} + -X github.com/nucleuscloud/neosync/cli/internal/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cli/cmd/neosync" + + generate_completions_from_executable(bin/"neosync", "completion") + end + + test do + output = shell_output("#{bin}/neosync connections list 2>&1", 1) + assert_match "connection refused", output + + assert_match version.to_s, shell_output("#{bin}/neosync --version") + end +end diff --git a/Formula/n/neovide.rb b/Formula/n/neovide.rb new file mode 100644 index 0000000000000..ac9ab85227b3e --- /dev/null +++ b/Formula/n/neovide.rb @@ -0,0 +1,100 @@ +class Neovide < Formula + desc "No Nonsense Neovim Client in Rust" + homepage "https://neovide.dev/" + url "https://github.com/neovide/neovide/archive/refs/tags/0.15.2.tar.gz" + sha256 "a8179c461d41277b41692edcae64af6d1c80454aafff608af0268c5abca95b5c" + license "MIT" + head "https://github.com/neovide/neovide.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d2016431a76759e0b0ba9cb8f5e91a4451cb4f4a9c92dd16cfee7ef86b444892" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6694ac674ede4461e8cd8f4e585e0899352fb3285132cd9cd23f93f89229c338" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9fcf5b98310365061ef4af169630dc40a3bbdde3ce22f053a3ca57643b436461" + sha256 cellar: :any_skip_relocation, sonoma: "46842ec618082169fbd210f861d75624343f91ec7082ab63e2e9b2b852569605" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5a85281c8403af2e6bddfe9f5b8eefc174cd455e87b8ca403f6f27d44bcc847" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0dfc1de21238aae3f54afdda3f9518050bcdcabf2bd1bcf8b84314b43d056498" + end + + depends_on "ninja" => :build + depends_on "rust" => :build + depends_on "neovim" + + uses_from_macos "llvm" => :build + uses_from_macos "python" => :build + + on_macos do + depends_on "cargo-bundle" => :build + end + + on_linux do + depends_on "expat" + depends_on "fontconfig" + depends_on "freetype" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "libpng" + # `libxcursor` is loaded when using X11 (DISPLAY) instead of Wayland (WAYLAND_DISPLAY). + # Once https://github.com/rust-windowing/winit/commit/aee95114db9c90eef6f4d895790552791cf41ab9 + # is in a `winit` release, check `lsof -p ` to see if dependency can be removed + depends_on "libxcursor" + depends_on "libxkbcommon" # dynamically loaded by xkbcommon-dl + depends_on "mesa" # dynamically loaded by glutin + depends_on "zlib" + end + + fails_with :gcc do + cause "Skia build uses clang target option" + end + + def install + ENV["FORCE_SKIA_BUILD"] = "1" # avoid pre-built `skia` + + # FIXME: On macOS, `skia-bindings` crate only allows building `skia` with bundled libraries + if OS.linux? + ENV["SKIA_USE_SYSTEM_LIBRARIES"] = "1" + ENV["CLANG_PATH"] = which(ENV.cc) # force bindgen to use superenv clang to find brew libraries + + # GN doesn't use CFLAGS so pass extra paths using superenv + ENV.append_path "HOMEBREW_INCLUDE_PATHS", Formula["freetype"].opt_include/"freetype2" + ENV.append_path "HOMEBREW_INCLUDE_PATHS", Formula["harfbuzz"].opt_include/"harfbuzz" + end + + system "cargo", "install", *std_cargo_args + + return unless OS.mac? + + # https://github.com/burtonageo/cargo-bundle/issues/118 + with_env(TERM: "xterm") { system "cargo", "bundle", "--release" } + prefix.install "target/release/bundle/osx/Neovide.app" + rm bin/"neovide" # Remove the original binary first + bin.write_exec_script prefix/"Neovide.app/Contents/MacOS/neovide" + end + + def nvim_connected_clients_count(socket) + Utils.safe_popen_read( + "nvim", "--headless", + "--server", socket, + "--remote-expr", 'luaeval("vim.tbl_count(vim.api.nvim_list_chans()) - 1")' + ).chomp.to_i + end + + test do + socket = testpath/"nvim.sock" + nvim_cmd = ["nvim", "--headless", "-i", "NONE", "-u", "NONE", "--listen", socket] + ohai nvim_cmd.join(" ") + nvim_pid = spawn(*nvim_cmd) + + sleep 1 until socket.exist? && socket.socket? + + neovide_cmd = [bin/"neovide", "--no-fork", "--server=#{socket}"] + ohai neovide_cmd.join(" ") + neovide_pid = spawn(*neovide_cmd) + + sleep 1 until nvim_connected_clients_count(socket).positive? + system "nvim", "--server", socket, "--remote-send", ":q" + + Process.wait nvim_pid + Process.wait neovide_pid + end +end diff --git a/Formula/n/neovim-qt.rb b/Formula/n/neovim-qt.rb new file mode 100644 index 0000000000000..71a7b49ba9e9f --- /dev/null +++ b/Formula/n/neovim-qt.rb @@ -0,0 +1,67 @@ +class NeovimQt < Formula + desc "Neovim GUI, in Qt" + homepage "https://github.com/equalsraf/neovim-qt" + url "https://github.com/equalsraf/neovim-qt/archive/refs/tags/v0.2.19.tar.gz" + sha256 "2c5a5de6813566aeec9449be61e1a8cd8ef85979a9e234d420f2882efcfde382" + license "ISC" + head "https://github.com/equalsraf/neovim-qt.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a4ebd18a46757494d4d8914121aea77a08843626580df268d728840f28083fa2" + sha256 cellar: :any, arm64_sequoia: "9203f57a83ccf4453f2c721f78102afbbbc4a21bf54d127cb6c90ce562389728" + sha256 cellar: :any, arm64_sonoma: "b74cbaf47c8f1fb3d5f0f5560b14d9974915246b2723516c8eabd0d94ccb3a16" + sha256 cellar: :any, sonoma: "ce37d682b255a3c6fbee35f0146eaf6a5022b44ba5e318b460e361fc260ebfe4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c47a0daa850d84c38744b4cad5018643b473bb94258802672ba8abdcdffa9443" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0622186421cd33e3edb8e64d74c630a4632b31c613eb2e88949f440415be0f45" + end + + depends_on "cmake" => :build + depends_on "msgpack" + depends_on "neovim" + depends_on "qtbase" + depends_on "qtsvg" + + def install + system "cmake", "-S", ".", "-B", "build", "-DUSE_SYSTEM_MSGPACK=ON", "-DWITH_QT=Qt6", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + if OS.mac? + prefix.install bin/"nvim-qt.app" + bin.install_symlink prefix/"nvim-qt.app/Contents/MacOS/nvim-qt" + end + end + + test do + # Disable tests in CI environment: + # qt.qpa.xcb: could not connect to display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + # Same test as Formula/neovim.rb + + testfile = testpath/"test.txt" + testserver = testpath/"nvim.sock" + + testcommand = ":s/Vim/Neovim/g" + testinput = "Hello World from Vim!!" + testexpected = "Hello World from Neovim!!" + testfile.write(testinput) + + nvim_opts = ["--server", testserver] + + ohai "#{bin}/nvim-qt --nofork -- --listen #{testserver}" + ENV["NVIM_LISTEN_ADDRESS"] = testserver + nvimqt_pid = spawn bin/"nvim-qt", "--nofork", "--" + + sleep 10 + sleep 5 if OS.mac? && Hardware::CPU.intel? + + system "nvim", *nvim_opts, "--remote", testfile + system "nvim", *nvim_opts, "--remote-send", testcommand + system "nvim", *nvim_opts, "--remote-send", ":w" + system "nvim", "--server", testserver, "--remote-send", ":q" + assert_equal testexpected, testfile.read.chomp + Process.wait nvimqt_pid + end +end diff --git a/Formula/n/neovim-remote.rb b/Formula/n/neovim-remote.rb new file mode 100644 index 0000000000000..6f4a818f4dca6 --- /dev/null +++ b/Formula/n/neovim-remote.rb @@ -0,0 +1,75 @@ +class NeovimRemote < Formula + include Language::Python::Virtualenv + + desc "Control nvim processes using `nvr` command-line tool" + homepage "https://github.com/mhinz/neovim-remote" + url "https://files.pythonhosted.org/packages/69/50/4fe9ef6fd794929ceae73e476ac8a4ddbf3b0913fa248d834c9bb72978b7/neovim-remote-2.5.1.tar.gz" + sha256 "4b3cc35463544c5747c895c52a0343cfdbba15d307647d7f57f1cce0c6a27d02" + license "MIT" + revision 3 + head "https://github.com/mhinz/neovim-remote.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "39fb97daec07a2e2afaa777ab9e7decb4de2f2c6aba92368eb34f5559f01ca61" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c016ce47264192f694be56ef9a9da7b4507447a4ec2fea4ffa3c68778975f911" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a7f0c2abb2a19edc3f2c809974abdf609035da5473593f8f34e6b6a1a12befc" + sha256 cellar: :any_skip_relocation, sonoma: "bdadf165dd2f228dc45df5cd7708ff0b76659762d1f6bc429de1c621298e27c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2ae1769694653c05cde760892623a734d5793d8c86facd3e1cd45b50e64cb2f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07600909a154a7328424524eb6656bac2933a8fb4a588aef301c6ee24a04c1f7" + end + + depends_on "neovim" + depends_on "python@3.14" + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/03/b8/704d753a5a45507a7aab61f18db9509302ed3d0a27ac7e0359ec2905b1a6/greenlet-3.2.4.tar.gz" + sha256 "0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "pynvim" do + url "https://files.pythonhosted.org/packages/04/d7/c4412e6219661fd8689cdd9553988f8ea38c151067d70c49436977688aa9/pynvim-0.6.0.tar.gz" + sha256 "0ffcb879322d08f9e9061e1123dd58ba3a5ccfbd4999bb1157bac525822aa590" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def install + virtualenv_install_with_resources + end + + test do + socket = testpath/"nvimsocket" + file = testpath/"test.txt" + + nvim = spawn( + Formula["neovim"].opt_bin/"nvim", "--headless", "-i", "NONE", "-u", "NONE", "--listen", socket, file, + [:out, :err] => "/dev/null" + ) + sleep 1 until socket.exist? && socket.socket? + + str = "Hello from neovim-remote!" + system bin/"nvr", "--servername", socket, "--remote-send", "i#{str}:write" + assert_equal str, file.read.chomp + assert_equal Process.kill(0, nvim), 1 + + system bin/"nvr", "--servername", socket, "--remote-send", ":quit" + + # Test will be terminated by the timeout + # if `:quit` was not sent correctly + Process.wait nvim + end +end diff --git a/Formula/n/neovim.rb b/Formula/n/neovim.rb new file mode 100644 index 0000000000000..6ca84d2cb89d1 --- /dev/null +++ b/Formula/n/neovim.rb @@ -0,0 +1,139 @@ +class Neovim < Formula + desc "Ambitious Vim-fork focused on extensibility and agility" + homepage "https://neovim.io/" + license "Apache-2.0" + + head "https://github.com/neovim/neovim.git", branch: "master" + + stable do + url "https://github.com/neovim/neovim/archive/refs/tags/v0.11.5.tar.gz" + sha256 "c63450dfb42bb0115cd5e959f81c77989e1c8fd020d5e3f1e6d897154ce8b771" + + # Keep resources updated according to: + # https://github.com/neovim/neovim/blob/v#{version}/cmake.deps/deps.txt + + # TODO: Consider shipping these as separate formulae instead. See discussion at + # https://github.com/orgs/Homebrew/discussions/3611 + # NOTE: The `install` method assumes that the parser name follows the final `-`. + # Please name the resources accordingly. + resource "tree-sitter-c" do + url "https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.24.1.tar.gz" + sha256 "25dd4bb3dec770769a407e0fc803f424ce02c494a56ce95fedc525316dcf9b48" + end + + resource "tree-sitter-lua" do + url "https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/refs/tags/v0.4.0.tar.gz" + sha256 "b0977aced4a63bb75f26725787e047b8f5f4a092712c840ea7070765d4049559" + end + + resource "tree-sitter-vim" do + url "https://github.com/tree-sitter-grammars/tree-sitter-vim/archive/refs/tags/v0.7.0.tar.gz" + sha256 "44eabc31127c4feacda19f2a05a5788272128ff561ce01093a8b7a53aadcc7b2" + end + + resource "tree-sitter-vimdoc" do + url "https://github.com/neovim/tree-sitter-vimdoc/archive/refs/tags/v4.0.0.tar.gz" + sha256 "8096794c0f090b2d74b7bff94548ac1be3285b929ec74f839bd9b3ff4f4c6a0b" + end + + resource "tree-sitter-query" do + url "https://github.com/tree-sitter-grammars/tree-sitter-query/archive/refs/tags/v0.6.2.tar.gz" + sha256 "90682e128d048fbf2a2a17edca947db71e326fa0b3dba4136e041e096538b4eb" + end + + resource "tree-sitter-markdown" do + url "https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v0.5.0.tar.gz" + sha256 "14c2c948ccf0e9b606eec39b09286c59dddf28307849f71b7ce2b1d1ef06937e" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "41f09e8ed67664dab655bb181990c7f7fc9aca5a559390469138eb1956af00e9" + sha256 arm64_sequoia: "8cceee45e745aa161781b544977a8576d868e77ef506778c588d67cd47da2608" + sha256 arm64_sonoma: "f0014976d5aa5cadd26434d5a4339a637f8b4fa37a1e6d1a736662528180a0e9" + sha256 sonoma: "805931882993d986ebff0098f9c7a13088cbbeee6221a4498f45385951efad48" + sha256 arm64_linux: "6d4a7736d5e033075b29f8b1e28432a04a2ee0e2437de98a15a32ed5f05f1ecd" + sha256 x86_64_linux: "3b77d0557a0470516fa2fe1645e2671ac1d49472dbd4fa042b2c307b32cddc43" + end + + depends_on "cmake" => :build + depends_on "gettext" + depends_on "libuv" + depends_on "lpeg" + depends_on "luajit" + depends_on "luv" + depends_on "tree-sitter" + depends_on "unibilium" + depends_on "utf8proc" + + def install + if build.head? + cmake_deps = (buildpath/"cmake.deps/deps.txt").read.lines + cmake_deps.each do |line| + next unless line.match?(/TREESITTER_[^_]+_URL/) + + parser, parser_url = line.split + parser_name = parser.delete_suffix("_URL") + parser_sha256 = cmake_deps.find { |l| l.include?("#{parser_name}_SHA256") }.split.last + parser_name = parser_name.downcase.tr("_", "-") + + resource parser_name do + url parser_url + sha256 parser_sha256 + end + end + end + + resources.each do |r| + source_directory = buildpath/"deps-build/build/src"/r.name + build_directory = buildpath/"deps-build/build"/r.name + + parser_name = r.name.split("-").last + cmakelists = case parser_name + when "markdown" then "MarkdownParserCMakeLists.txt" + else "TreesitterParserCMakeLists.txt" + end + + r.stage(source_directory) + cp buildpath/"cmake.deps/cmake"/cmakelists, source_directory/"CMakeLists.txt" + + system "cmake", "-S", source_directory, "-B", build_directory, "-DPARSERLANG=#{parser_name}", *std_cmake_args + system "cmake", "--build", build_directory + system "cmake", "--install", build_directory + end + + # Point system locations inside `HOMEBREW_PREFIX`. + inreplace "src/nvim/os/stdpaths.c" do |s| + s.gsub! "/etc/xdg/", "#{etc}/xdg/:\\0" + + if HOMEBREW_PREFIX.to_s != HOMEBREW_DEFAULT_PREFIX + s.gsub! "/usr/local/share/:/usr/share/", "#{HOMEBREW_PREFIX}/share/:\\0" + end + end + + # Replace `-dirty` suffix in `--version` output with `-Homebrew`. + inreplace "cmake/GenerateVersion.cmake", "--dirty", "--dirty=-Homebrew" + + args = [ + "-DLUV_LIBRARY=#{Formula["luv"].opt_lib/shared_library("libluv")}", + "-DLIBUV_LIBRARY=#{Formula["libuv"].opt_lib/shared_library("libuv")}", + "-DLPEG_LIBRARY=#{Formula["lpeg"].opt_lib/shared_library("liblpeg")}", + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + refute_match "dirty", shell_output("#{bin}/nvim --version") + (testpath/"test.txt").write("Hello World from Vim!!") + system bin/"nvim", "--headless", "-i", "NONE", "-u", "NONE", + "+s/Vim/Neovim/g", "+wq", "test.txt" + assert_equal "Hello World from Neovim!!", (testpath/"test.txt").read.chomp + end +end diff --git a/Formula/n/nerdctl.rb b/Formula/n/nerdctl.rb new file mode 100644 index 0000000000000..c919e3129676e --- /dev/null +++ b/Formula/n/nerdctl.rb @@ -0,0 +1,30 @@ +class Nerdctl < Formula + desc "ContaiNERD CTL - Docker-compatible CLI for containerd" + homepage "https://github.com/containerd/nerdctl" + url "https://github.com/containerd/nerdctl/archive/refs/tags/v2.1.6.tar.gz" + sha256 "b89f7c0f0329f410bbe9f22234e716c5cb08b6866886e33688b86267a2ff524f" + license "Apache-2.0" + head "https://github.com/containerd/nerdctl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "f728341179ff7ab882b167ae294f5ba7cea2e687317b7d846634b394d220e634" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8a9353e388714dcff7d35698815998b222dc06c526733d72e87cc88c81eb674" + end + + depends_on "go" => :build + depends_on :linux + + def install + ldflags = "-s -w -X github.com/containerd/nerdctl/v2/pkg/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/nerdctl" + + generate_completions_from_executable(bin/"nerdctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nerdctl --version") + output = shell_output("XDG_RUNTIME_DIR=/dev/null #{bin}/nerdctl images 2>&1", 1).strip + cleaned = output.gsub(/\e\[([;\d]+)?m/, "") # Remove colors from output + assert_match(/^time=.* level=fatal msg="rootless containerd not running.*/m, cleaned) + end +end diff --git a/Formula/n/nerdfetch.rb b/Formula/n/nerdfetch.rb new file mode 100644 index 0000000000000..faf910dca31f6 --- /dev/null +++ b/Formula/n/nerdfetch.rb @@ -0,0 +1,21 @@ +class Nerdfetch < Formula + desc "POSIX *nix fetch script using Nerdfonts" + homepage "https://github.com/ThatOneCalculator/NerdFetch" + url "https://github.com/ThatOneCalculator/NerdFetch/archive/refs/tags/v8.4.2.tar.gz" + sha256 "cad765074e4b3f442bf78813f690343d58d3dfd42c90ab83bf93d101f890b27e" + license "MIT" + head "https://github.com/ThatOneCalculator/NerdFetch.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e441ddc3a3129b74f1b924c3740411667addf14ee01339d2d38f63fb1e4b25a0" + end + + def install + bin.install "nerdfetch" + end + + test do + user = ENV["USER"] + assert_match user.to_s, shell_output(bin/"nerdfetch") + end +end diff --git a/Formula/n/nerdfix.rb b/Formula/n/nerdfix.rb new file mode 100644 index 0000000000000..a91933347ad53 --- /dev/null +++ b/Formula/n/nerdfix.rb @@ -0,0 +1,34 @@ +class Nerdfix < Formula + desc "Find/fix obsolete Nerd Font icons" + homepage "https://github.com/loichyan/nerdfix" + url "https://github.com/loichyan/nerdfix/archive/refs/tags/v0.4.2.tar.gz" + sha256 "e56f648db6bfa9a08d4b2adbf3862362ff66010f32c80dc076c0c674b36efd3c" + license any_of: ["MIT", "Apache-2.0"] + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8154d59076667de95521fe0ed9ba39441627730a591c718aa0be6ed4a3d70627" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5acc95bc0c1314b40e2fb0555b97724538609e457d5574e1a5dcf61ac97942de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "248d5d912540c309ba86f239eca1016f5cac27823a9e258f07be6aef79a39ce5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "746859b3faa37328b50b548711830edec81ecf0d1a874a7902cc2161bc961438" + sha256 cellar: :any_skip_relocation, sonoma: "0e2875debaaa6b165db6d0a3fbb92a9593ac4eca542dea253da61f99c1581051" + sha256 cellar: :any_skip_relocation, ventura: "cc197b42aa7b59787c5a1cda9471bcc7ed1ec01557bc36500acb46ee3170fca8" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbd2787883392023478e8725c0fc6a0181e359c390698090eafcd2a038a3358d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c92886e7e4886f45c9d8f21a31389aff08e62bdf5b5bfda780b4e174c64f3656" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"nerdfix", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nerdfix --version") + + touch "test.txt" + system bin/"nerdfix", "check", "test.txt" + end +end diff --git a/Formula/n/nerdlog.rb b/Formula/n/nerdlog.rb new file mode 100644 index 0000000000000..429de87afe0c5 --- /dev/null +++ b/Formula/n/nerdlog.rb @@ -0,0 +1,54 @@ +class Nerdlog < Formula + desc "TUI log viewer with timeline histogram and no central server" + homepage "https://dmitryfrank.com/projects/nerdlog/article" + url "https://github.com/dimonomid/nerdlog/archive/refs/tags/v1.10.0.tar.gz" + sha256 "95fb629044c5a74c2c541d4c39a9622674f15e59b98e6d1b025a47c218f69189" + license "BSD-2-Clause" + head "https://github.com/dimonomid/nerdlog.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1c5c89f5703c5254d79bf17a35b93a5fee15af1df0b0ca8983c30e5994fce9f7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6fb84d243d9107eb44579b8efb03c69d1378ce7d51000e1485f7204d115db7e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9336a81b6b484ea7d3381cb51c854a2ab11f23e2d5a06ad1b7639e0d956ec503" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9ce359089fa9e49ad6b31ce3e6b85e7c39f4ecdc0a71acc8f9070246566bfa24" + sha256 cellar: :any_skip_relocation, sonoma: "942073a7a936ef2b14570bb472c2e044a21ccd43d9cc8076bb4524e2f026dd60" + sha256 cellar: :any_skip_relocation, ventura: "fe0e4d94a6541428b5932e6dd1fd26165f4ea70dfc4767d3051bb2191c302a02" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e9c31155687ffe5ca26602124ab8326b6241afe7c78ec2d7595ade960d85dbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9007cfebff78d395297b19ebf89943c4ca617db012ba47246a8f9389030e5faf" + end + + depends_on "go" => :build + + on_linux do + depends_on "libx11" + end + + def install + ldflags = %W[ + -s -w + -X github.com/dimonomid/nerdlog/version.version=#{version} + -X github.com/dimonomid/nerdlog/version.commit=Homebrew + -X github.com/dimonomid/nerdlog/version.date=#{time.iso8601} + -X github.com/dimonomid/nerdlog/version.builtBy=Homebrew + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/nerdlog" + end + + test do + require "pty" + ENV["TERM"] = "xterm" + + PTY.spawn(bin/"nerdlog") do |r, _w, pid| + sleep 2 + Process.kill("TERM", pid) + begin + output = r.read + assert_match "Edit query params", output + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + assert_match version.to_s, shell_output("#{bin}/nerdlog --version") + end +end diff --git a/Formula/n/nesc.rb b/Formula/n/nesc.rb new file mode 100644 index 0000000000000..3fbff6cb86080 --- /dev/null +++ b/Formula/n/nesc.rb @@ -0,0 +1,51 @@ +class Nesc < Formula + desc "Programming language for deeply networked systems" + homepage "https://github.com/tinyos/nesc" + url "https://github.com/tinyos/nesc/archive/refs/tags/v1.4.0.tar.gz" + sha256 "ea9a505d55e122bf413dff404bebfa869a8f0dd76a01a8efc7b4919c375ca000" + license "GPL-2.0-only" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8ef4438f308a2fd9e143b70da8b9b53a0ca033c4d5a57182af79a2ad81e4fee3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec7337c2f3b0ce8274e7ccc367aa35ba8930972f946e3e6d30fbd2dcfb728a09" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "586795d905da2511be52a64d753b1085c73149ee3b5f720aa19416f148b8cd8e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a5476ebb9ff86e8aa35abe101f26893f3be3dc6cd709fd30d0012c778699a20" + sha256 cellar: :any_skip_relocation, arm64_monterey: "77716c3fa900dafb63734a8b40178b0fd8d263f1aa047869d6bf31d3941d03f8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b4d4450e60720f1c811afbf0a423de2809587d0a61bfdf73b2bd9b78054070cc" + sha256 cellar: :any_skip_relocation, sonoma: "1d0fdeb5a037662cb3ecafb289e2960ae2497930050654c71e64a3434250d970" + sha256 cellar: :any_skip_relocation, ventura: "4608c4e67325022c55a0f991afcad53aa00355a559b33dcfe6bdf61d0a883aed" + sha256 cellar: :any_skip_relocation, monterey: "77f2ceb7722575686a928f300064a5df68d46d89f97648662a90321e2aec179a" + sha256 cellar: :any_skip_relocation, big_sur: "9f1a0aa5ac89e1c7b0f278aaab584ce98dd4ae31a94fd9bb111287e8fcba8131" + sha256 cellar: :any_skip_relocation, catalina: "b2ce356c9fb1177a17e2e2b82cc7e91f9126ecc68435ba0cea0ea94f65def27c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1bfde913670c487ed3a9f22f68189d9255b8ba6557f9100243ccdcb5182f83b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09def7e758ed0e91c1557f6ee6994815db45bb14c9f3f3bcba5848f6e1fa2bf3" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "openjdk" => :build + depends_on "emacs" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "gperf" => :build + uses_from_macos "m4" => :build + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + # nesc is unable to build in parallel because multiple emacs instances + # lead to locking on the same file + ENV.deparallelize + + system "./Bootstrap" + system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make" + system "make", "install" + end +end diff --git a/Formula/n/nessie.rb b/Formula/n/nessie.rb new file mode 100644 index 0000000000000..6624698ca2da4 --- /dev/null +++ b/Formula/n/nessie.rb @@ -0,0 +1,45 @@ +class Nessie < Formula + desc "Transactional Catalog for Data Lakes with Git-like semantics" + homepage "https://projectnessie.org" + url "https://github.com/projectnessie/nessie/archive/refs/tags/nessie-0.105.6.tar.gz" + sha256 "ea0d050f4b219bbf496c87650eb37e55d42b0ed7d8d5e9fb99eb3d391fd7a883" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0d7701affa7494a738824a4d8da8a91dbfb5412c6ffb996c2903ea8f086a5014" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abcca7862f7039c2a0ca57db9b376c47c0078e05398d28da62fdc0916a492d15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18af26997d3ea69d8f070adfb40c0cc4d601f778f3b199ce8896e4ca620dc1b9" + sha256 cellar: :any_skip_relocation, sonoma: "ecf83ce990fd948ecec155e8d517e99b7ad4ed280057e29104b7bc6f1aa5027c" + sha256 cellar: :any_skip_relocation, arm64_linux: "873aa053c4eae7a9eeb999df7ba7f9e16d9fc61ed3b720d0711a132d0a03e8e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11854dd6a99945025316ed4ec275c2aac9b59274a65a495d96f1195519a0a535" + end + + depends_on "gradle@8" => :build + # The build fails with more recent JDKs + # See: https://github.com/projectnessie/nessie/issues/11145 + depends_on "openjdk@21" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home("21") + system "gradle", ":nessie-quarkus:assemble" + libexec.install Dir["servers/quarkus-server/build/quarkus-app/*"] + bin.write_jar_script libexec/"quarkus-run.jar", "nessie" + end + + service do + run [opt_bin/"nessie"] + keep_alive true + error_log_path var/"log/nessie.log" + log_path var/"log/nessie.log" + end + + test do + port = free_port + ENV["QUARKUS_HTTP_PORT"] = free_port.to_s + ENV["QUARKUS_MANAGEMENT_PORT"] = port.to_s + spawn bin/"nessie" + + output = shell_output("curl -s --retry 5 --retry-connrefused localhost:#{port}/q/health") + assert_match "UP", output + end +end diff --git a/Formula/n/nest.rb b/Formula/n/nest.rb new file mode 100644 index 0000000000000..042f8b1dfd541 --- /dev/null +++ b/Formula/n/nest.rb @@ -0,0 +1,72 @@ +class Nest < Formula + desc "Neural Simulation Tool (NEST) with Python3 bindings (PyNEST)" + homepage "https://www.nest-simulator.org/" + url "https://github.com/nest/nest-simulator/archive/refs/tags/v3.9.tar.gz" + sha256 "8e67b9dcb72b029f24f3d70ff6d3dd64776dc21bf3e458c822c862677d67d076" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "e7fcbd42855eb593039616db156047167d3fccc6f61b24f4d32cd622cf8c5547" + sha256 arm64_sequoia: "cb223513c56485f000e017ee6c8bb6bf08acd9d11355d50ce8ccbceb91a628cf" + sha256 arm64_sonoma: "c8179fed8ebced6ec9352eeca00d832b1e6aa9f3545eb41cec5199c53e1fb392" + sha256 sonoma: "2edddd7433fab4f1088d86fef0fc91eec7b2e4b301af08c9f4b345eeb81ad6cb" + sha256 arm64_linux: "17fcfc3ec66d959a29c1ab12cd8f18021b06e1dd9afb2363183a101cb105d9b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87ae024785fb40c22e03f3bfea67fc1eb3ed3c924b582cc8b782c0f76f9fc680" + end + + depends_on "cmake" => :build + depends_on "cython" => :build + depends_on "gsl" + depends_on "libtool" + depends_on "numpy" + depends_on "python@3.14" + depends_on "readline" + + uses_from_macos "ncurses" + + on_macos do + depends_on "libomp" + end + + def install + # Help FindReadline find macOS system ncurses library + args = if OS.mac? && (sdk = MacOS.sdk_path_if_needed) + ["-DNCURSES_LIBRARY=#{sdk}/usr/lib/libncurses.tbd"] + else + [] + end + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Replace internally accessible gcc with externally accessible version + # in nest-config if required + inreplace bin/"nest-config", Superenv.shims_path/ENV.cxx, ENV.cxx + end + + def caveats + <<~EOS + The PyNEST bindings and its dependencies are installed with the python@3.14 formula. + If you want to use PyNEST, use the Python interpreter from this path: + + #{Formula["python@3.14"].bin} + + You may want to add this to your PATH. + EOS + end + + test do + # check whether NEST was compiled & linked + system bin/"nest", "--version" + + # check whether NEST is importable form python + system Formula["python@3.14"].bin/"python3.14", "-c", "'import nest'" + end +end diff --git a/Formula/n/nestopia-ue.rb b/Formula/n/nestopia-ue.rb new file mode 100644 index 0000000000000..dab11f7a12dfa --- /dev/null +++ b/Formula/n/nestopia-ue.rb @@ -0,0 +1,48 @@ +class NestopiaUe < Formula + desc "NES emulator" + homepage "http://0ldsk00l.ca/nestopia/" + url "https://github.com/0ldsk00l/nestopia/archive/refs/tags/1.53.2.tar.gz" + sha256 "7783d2673ad496109e7dd3d75756cfef30c5b400409131b83b45c2fa3ddd735b" + license "GPL-2.0-or-later" + head "https://github.com/0ldsk00l/nestopia.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "3006e7d0399aed4f1240cd2b3f982b528f8ebf5d4a225ced121503f0211bc8ec" + sha256 arm64_sequoia: "3eb9a030dd95e791e62ba88821665bf6f9f4a5a566baf954bfca299202dc26e3" + sha256 arm64_sonoma: "6c424cd6960a94b300fc867ea6490fd56bca30274a0a614f6f3ecef874cd55f3" + sha256 arm64_ventura: "293e857687f8539c030b4cc0a9360eba6fc4e030d4d9bb0c50d80e6b1123ef61" + sha256 sonoma: "c9cb711c694e7c6d998662d6cd88cc2dcc50e892a73d21af312c6e3661ffd88b" + sha256 ventura: "fcf1edcf0d0471f721f03c5754ba29be767dea197a22460569b4e74f976bca9f" + sha256 arm64_linux: "d1fd2f20bb4390ad1ebd77c62f194e83d3f7920e2905e087addb2220a39c8fa1" + sha256 x86_64_linux: "b1a010553c6587a8c76f35a5b155fb08a7d710b4534ebe72e333fdd6acef388c" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + depends_on "fltk" + depends_on "libarchive" + depends_on "libepoxy" + depends_on "libsamplerate" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + "--datarootdir=#{pkgshare}", + *std_configure_args + system "make", "install" + end + + test do + assert_match "Nestopia UE #{version}", shell_output("#{bin}/nestopia --version") + end +end diff --git a/Formula/n/net-snmp.rb b/Formula/n/net-snmp.rb new file mode 100644 index 0000000000000..ce86a1e164386 --- /dev/null +++ b/Formula/n/net-snmp.rb @@ -0,0 +1,79 @@ +class NetSnmp < Formula + desc "Implements SNMP v1, v2c, and v3, using IPv4 and IPv6" + homepage "http://www.net-snmp.org/" + url "https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.9.4/net-snmp-5.9.4.tar.gz" + sha256 "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544" + license all_of: ["MIT-CMU", "MIT", "BSD-3-Clause"] + head "https://github.com/net-snmp/net-snmp.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/net-snmp[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "34b4f0cbacf3987de86686ef84d7de0ad8fe4934c2d7f9d352df3ac1933d2a33" + sha256 arm64_sequoia: "fdeaf56a79dfe93f7ed48765a26f6b34f030f1a0d96950410c7c4a3100eb0e7f" + sha256 arm64_sonoma: "9d0ea2f793065eab2cb7c858d5926bb9ec40dfd0460a31c4d9f09932ae1c2455" + sha256 arm64_ventura: "8d1f5f1b9c27087c08b7fb17c97445d925c7c0afa77e4939979778ca9fc39fa4" + sha256 arm64_monterey: "0ee61805fb803dc4126a163c1f41438fbae869158cab3c5f9fb4db626ace6059" + sha256 arm64_big_sur: "08d71e1fd013508a956360a8c1ee0806974b21334e06daa519c91fc58e5b1cf4" + sha256 sonoma: "520f34569542954e98b71e04ec30a470994550f983969d476ba7a3e229e9795e" + sha256 ventura: "72c6a3af4f5dc6649fdf8ace41e27c917d88bfb4f25b6a468cc072944ae42cc1" + sha256 monterey: "25f84e57f018ce8d5c4f60ecdb28bf93a53f53fb7c3fe2d2ade1053013ba8993" + sha256 big_sur: "6eb8407f90572a45ff98d040761b9857998638d9a739bd21c06e1420412009ee" + sha256 arm64_linux: "acf8bb48c7f532c9b87aacd38766c0bf73686619aff0369a2755eb3ff814a9e9" + sha256 x86_64_linux: "909269505e442c956639f60e3b0cd1dbdc1e7723eb96b291e9fdba7781d533f4" + end + + keg_only :provided_by_macos + + depends_on "openssl@3" + + on_arm do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # Fix -flat_namespace being used on x86_64 Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + args = [ + "--disable-debugging", + "--prefix=#{prefix}", + "--enable-ipv6", + "--with-defaults", + "--with-persistent-directory=#{var}/db/net-snmp", + "--with-logfile=#{var}/log/snmpd.log", + "--with-mib-modules=host ucd-snmp/diskio", + "--without-rpm", + "--without-kmem-usage", + "--disable-embedded-perl", + "--without-perl-modules", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + ] + + system "autoreconf", "-fvi" if Hardware::CPU.arm? + system "./configure", *args + system "make" + # Work around snmptrapd.c:(.text+0x1e0): undefined reference to `dropauth' + ENV.deparallelize if OS.linux? + system "make", "install" + end + + def post_install + (var/"db/net-snmp").mkpath + (var/"log").mkpath + end + + test do + assert_match version.to_s, shell_output("#{bin}/snmpwalk -V 2>&1") + end +end diff --git a/Formula/n/net-tools.rb b/Formula/n/net-tools.rb new file mode 100644 index 0000000000000..bc36117837d5b --- /dev/null +++ b/Formula/n/net-tools.rb @@ -0,0 +1,31 @@ +class NetTools < Formula + desc "Linux networking base tools" + homepage "https://sourceforge.net/projects/net-tools/" + url "https://downloads.sourceforge.net/project/net-tools/net-tools-2.10.tar.xz" + sha256 "b262435a5241e89bfa51c3cabd5133753952f7a7b7b93f32e08cb9d96f580d69" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_linux: "a7d523b6843e87fd1b0791952b634c66f5918b78b97e4b851d9d2b3a413e9886" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eecef80de080f3957e605ff06292e6bffc51f34385307f70896b64d1dd2c823b" + end + + depends_on "libdnet" + depends_on :linux + + def install + # Support non-interactive configuration + inreplace "configure.sh", "IFS='@' read ans || exit 1", "" + + system "make", "config" + system "make" + system "make", "DESTDIR=#{prefix}", "install" + end + + test do + assert_match "Kernel Interface table", shell_output("#{bin}/netstat -i") + end +end diff --git a/Formula/n/netaddr.rb b/Formula/n/netaddr.rb new file mode 100644 index 0000000000000..809e6af8fb154 --- /dev/null +++ b/Formula/n/netaddr.rb @@ -0,0 +1,26 @@ +class Netaddr < Formula + include Language::Python::Virtualenv + + desc "Network address manipulation library" + homepage "https://netaddr.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + license "BSD-3-Clause" + head "https://github.com/netaddr/netaddr.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "cdcc4a712683eb68803860ecb8047079ebe5d8151c3bfa345fa4aab7d3a34177" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/netaddr info 10.0.0.0/16") + assert_match "Usable addresses 65534", output + end +end diff --git a/Formula/n/netatalk.rb b/Formula/n/netatalk.rb new file mode 100644 index 0000000000000..94d2974387079 --- /dev/null +++ b/Formula/n/netatalk.rb @@ -0,0 +1,132 @@ +class Netatalk < Formula + desc "File server for Macs, compliant with Apple Filing Protocol (AFP)" + homepage "https://netatalk.io" + url "https://github.com/Netatalk/netatalk/releases/download/netatalk-4-3-2/netatalk-4.3.2.tar.xz" + sha256 "2977b4fd113182f0cc183337ba23d5701fb2be4e0dfcec7ee575b4d73a738d3a" + license all_of: [ + "GPL-2.0-only", + "GPL-2.0-or-later", + "LGPL-2.0-only", + "LGPL-2.1-or-later", + "BSD-2-Clause", + "BSD-3-Clause", + "MIT", + ] + head "https://github.com/Netatalk/netatalk.git", branch: "main" + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "a996c4867d72289a1d1b6de73069dab3ff7e975f2a9e41af1572548e617e9663" + sha256 arm64_sequoia: "33055225df69045cbc4e9b44e4830ba1dd979f83dbb15726258fb09908047819" + sha256 arm64_sonoma: "2ebdbc3faeb4a7ef33d4c863e7336685510e2c58ad28df1d136b0de83bc9cbbc" + sha256 arm64_ventura: "dbac843786ce3ce67d91c56d6052f2fb5d90897abe1c0596cd22f13f687f32ba" + sha256 sonoma: "adb8b67efc6450b746c0fd67dacf69845207db2b32904eea20fcfc931cb5dc67" + sha256 ventura: "2b1cb2ab91c8e9c685dddd614dd89f2391b8de3207e21c5098bb1eb5c0a6e62e" + sha256 arm64_linux: "f6bb7dc5baca9769b091710448d9f6542b996778e34b86689f5f4a24e629a8d9" + sha256 x86_64_linux: "d55c30bfa29981cb9c05c3eb2a9e5b1ee99d35ae295e0bfbeac2e6c51ee1d093" + end + + depends_on "cmark-gfm" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "berkeley-db@5" # macOS bdb library lacks DBC type etc. + depends_on "bstring" + depends_on "cracklib" + depends_on "iniparser" + depends_on "libevent" + depends_on "libgcrypt" + depends_on "mariadb-connector-c" + depends_on "openldap" # macOS LDAP.Framework is not fork safe + + uses_from_macos "krb5" + uses_from_macos "libxcrypt" + uses_from_macos "perl" + uses_from_macos "sqlite" + + on_linux do + depends_on "avahi" # on macOS we use native mDNS instead + depends_on "cups" # used by the AppleTalk print server + depends_on "libtirpc" # on macOS we use native RPC instead + depends_on "linux-pam" + end + + conflicts_with "ad", because: "both install `ad` binaries" + + def install + inreplace "distrib/initscripts/macos.netatalk.in", "@sbindir@", opt_sbin + inreplace "distrib/initscripts/macos.netatalk.plist.in", "@bindir@", opt_bin + inreplace "distrib/initscripts/macos.netatalk.plist.in", "@sbindir@", opt_sbin + inreplace "distrib/initscripts/systemd.netatalk.service.in", "@sbindir@", opt_sbin + bdb5_rpath = rpath(target: Formula["berkeley-db@5"].opt_lib) + ENV.append "LDFLAGS", "-Wl,-rpath,#{bdb5_rpath}" if OS.linux? + args = [ + "-Dwith-afpstats=false", + "-Dwith-appletalk=#{OS.linux?}", # macOS doesn't have an AppleTalk stack + "-Dwith-bdb-path=#{Formula["berkeley-db@5"].opt_prefix}", + "-Dwith-cups-libdir-path=#{libexec}", + "-Dwith-cups-pap-backend=#{OS.linux?}", + "-Dwith-docs=man,readmes,html_manual", + "-Dwith-homebrew=true", + "-Dwith-init-dir=#{prefix}", + "-Dwith-init-hooks=false", + "-Dwith-install-hooks=false", + "-Dwith-lockfile-path=#{var}/run", + "-Dwith-pam-config-path=#{etc}/pam.d", + "-Dwith-pkgconfdir-path=#{pkgetc}", + "-Dwith-spotlight=false", + "-Dwith-statedir-path=#{var}", + "-Dwith-testsuite=true", + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + service do + name macos: "io.netatalk.daemon", linux: "netatalk" + require_root true + end + + def caveats + on_macos do + on_arm do + <<~EOS + Authenticating as a system user requires manually installing the + PAM configuration file to a predetermined location by running: + + sudo install -d -o $USER -g admin /usr/local/etc + mkdir -p /usr/local/etc/pam.d + cp $(brew --prefix)/etc/pam.d/netatalk /usr/local/etc/pam.d + + See `man pam.conf` for more information. + EOS + end + end + end + + test do + pidfile = var/"run/netatalk#{".pid" if OS.mac?}" + port = free_port + (testpath/"afp.conf").write <<~EOS + [Global] + afp port = #{port} + log file = #{testpath}/afpd.log + log level = default:info + signature = 1234567890ABCDEF + EOS + fork do + system sbin/"netatalk", "-d", "-F", "#{testpath}/afp.conf" + end + system sbin/"afpd", "-V" + system sbin/"netatalk", "-V" + sleep 5 + assert_match "AFP reply", shell_output("#{bin}/asip-status localhost #{port}") + pid = pidfile.read.chomp.to_i + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/n/netcat.rb b/Formula/n/netcat.rb new file mode 100644 index 0000000000000..a9c47b7cfc5e5 --- /dev/null +++ b/Formula/n/netcat.rb @@ -0,0 +1,52 @@ +class Netcat < Formula + desc "Utility for managing network connections" + homepage "https://netcat.sourceforge.net/" + url "https://downloads.sourceforge.net/project/netcat/netcat/0.7.1/netcat-0.7.1.tar.bz2" + sha256 "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c63948ab48476670f1d13d254c3d9ee3ce57fa9d06a5dbe47454ae9ec36f5977" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9da6c99582155faec7fab7c54a568ea80695bb01fd04adc1ed646da91dd93367" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23d0bb45f7366fba2dc26498bfcc5e9711158738bb1c3592e8233dd70cdd8812" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b8d6a5ba62a3ea60b855cf4cff46ab35aeee9bb49966c3a769522a0df186a31" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1b67683e14760ec8ceda14c44b85d16411f5f3331e6385269fc6c1a4ee063273" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "70fa1400d39bcb39a3452bca1c921d1cc76783d8fa2ad41b1742a0c317c1aceb" + sha256 cellar: :any_skip_relocation, sonoma: "1a180dd7c55283e66ee1baf8dbbfd1f9d45d77b4cf6c39e102ed210e03a88b63" + sha256 cellar: :any_skip_relocation, ventura: "de0cce7840c9836ae8003805ca0817d03e8c54e62ff4044fee1085a97883d033" + sha256 cellar: :any_skip_relocation, monterey: "7c33ed98a6c81011f5923240e11b87f07add5cea280f5e2754b2f3d7fc3d9eee" + sha256 cellar: :any_skip_relocation, big_sur: "ec93ed2ce809a78373e1b747f20075fabe5e9d612e2f84f85f125e4ce81eadb3" + sha256 cellar: :any_skip_relocation, catalina: "13bd349dfb08b3a5a474498eec4e20ffff722f82446b255d9c6e0540b02b362b" + sha256 arm64_linux: "eb080e6267d9f70f673e5069f58180210cabe7241fd1d3789415d72be31d9ada" + sha256 x86_64_linux: "713b509412561ffe59ef45f828278384180ffc219547d9495409908ba421e259" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + # Fix running on Linux ARM64, using patch from Arch Linux ARM. + # https://sourceforge.net/p/netcat/bugs/51/ + patch do + on_arm do + url "https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/05ebc1439262e7622ba4ab0c15c2a3bad1ac64c4/extra/gnu-netcat/gnu-netcat-flagcount.patch" + sha256 "63ffd690c586b164ec2f80723f5bcc46d009ffd5e0dd78bbe56fd1b770fd0788" + end + end + + def install + # Regenerate configure script for arm64/Apple Silicon support. + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", "--mandir=#{man}", "--infodir=#{info}", *std_configure_args + system "make", "install" + man1.install_symlink "netcat.1" => "nc.1" + end + + test do + output = pipe_output("#{bin}/nc google.com 80", "GET / HTTP/1.0\r\n\r\n") + assert_equal "HTTP/1.0 200 OK", output.lines.first.chomp + end +end diff --git a/Formula/n/netcdf-cxx.rb b/Formula/n/netcdf-cxx.rb new file mode 100644 index 0000000000000..a2380147317a8 --- /dev/null +++ b/Formula/n/netcdf-cxx.rb @@ -0,0 +1,84 @@ +class NetcdfCxx < Formula + desc "C++ libraries and utilities for NetCDF" + homepage "https://www.unidata.ucar.edu/software/netcdf/" + url "https://github.com/Unidata/netcdf-cxx4/archive/refs/tags/v4.3.1.tar.gz" + sha256 "e3fe3d2ec06c1c2772555bf1208d220aab5fee186d04bd265219b0bc7a978edc" + license "NetCDF" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a193f027eaaa1c1586f10397427d5729fe0d653d569226ea02c85990d00bb449" + sha256 cellar: :any, arm64_sequoia: "50dfd3ba9dea12a4a355e8643a74ca53b6c184c96e3bcdf0e24e3052491be0c8" + sha256 cellar: :any, arm64_sonoma: "e80f685cdd7fd31e72e0fdeb96a8770a243f4729d0a2f0417808782dfd2d5bc9" + sha256 cellar: :any, arm64_ventura: "f6c50e7a23adf951aae09e8a600f560a4679fb9ce19eabfd692f92442a5a5314" + sha256 cellar: :any, sonoma: "34da3acc3752fc50b9315b33f90624e2e51eb450af0974d88a3f3895da320d92" + sha256 cellar: :any, ventura: "7c452e7a0b055cd09f127c86be95fdc41b5f2fdf75f0c00b480a19f79f362ef8" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa7a0a059a0a2951e4d07f41a085babd677b0295dd49a02b693e5015ce2a4a29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ab172c8268b7d323e568565c3eddaba2596c6990f9465bdeed7823cbfc81354" + end + + depends_on "cmake" => :build + depends_on "hdf5" + depends_on "netcdf" + + on_macos do + depends_on "zstd" + end + + def install + args = std_cmake_args + %w[ + -DNCXX_ENABLE_TESTS=OFF + -DENABLE_TESTS=OFF + -DENABLE_NETCDF_4=ON + -DENABLE_DOXYGEN=OFF + ] + + # https://github.com/Unidata/netcdf-cxx4/issues/151#issuecomment-2041111870 + args << "-DHDF5_C_LIBRARY_hdf5=#{Formula["hdf5"].opt_lib}" + + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + + system "cmake", "-S", ".", "-B", "build_shared", *args, "-DBUILD_SHARED_LIBS=ON" + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", *args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build_static" + lib.install "build_static/cxx4/libnetcdf-cxx4.a" + + # Remove shim paths + inreplace [bin/"ncxx4-config", lib/"libnetcdf-cxx.settings"] do |s| + s.gsub!(Superenv.shims_path/ENV.cc, ENV.cc, audit_result: false) + s.gsub!(Superenv.shims_path/ENV.cxx, ENV.cxx, audit_result: false) + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + constexpr int nx = 6; + constexpr int ny = 12; + + int main() { + int dataOut[nx][ny]; + for (int i = 0; i < nx; i++) { + for (int j = 0; j < ny; j++) { + dataOut[i][j] = i * ny + j; + } + } + netCDF::NcFile dataFile("simple_xy.nc", netCDF::NcFile::replace); + auto xDim = dataFile.addDim("x", nx); + auto yDim = dataFile.addDim("y", ny); + auto data = dataFile.addVar("data", netCDF::ncInt, {xDim, yDim}); + data.putVar(dataOut); + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-I#{include}", "-lnetcdf-cxx4", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/netcdf-fortran.rb b/Formula/n/netcdf-fortran.rb new file mode 100644 index 0000000000000..460044bbb5900 --- /dev/null +++ b/Formula/n/netcdf-fortran.rb @@ -0,0 +1,68 @@ +class NetcdfFortran < Formula + desc "Fortran libraries and utilities for NetCDF" + homepage "https://www.unidata.ucar.edu/software/netcdf/" + url "https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.2.tar.gz" + sha256 "44cc7b5626b0b054a8503b8fe7c1b0ac4e0a79a69dad792c212454906a9224ca" + license "NetCDF" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7201bd78c6bdf89900c295717ec925c1a29e98d86c568efe09fab3cab906ad96" + sha256 cellar: :any, arm64_sequoia: "d91c6c35e16156f4542f17de1103e15b8471aa0fca99e94bb3762e9644e383e6" + sha256 cellar: :any, arm64_sonoma: "5473275962edf3112c6075204d6cdf55dbd90e5677fb96d23a191683620fbf77" + sha256 cellar: :any, arm64_ventura: "46de0b263944a9043587d3786893444f54dbb156f7ee8d9e8db7bce515c6079b" + sha256 cellar: :any, sonoma: "e6fd6c9ef98bd9a1598007909f3ce4b2d0d7fc0c36157146924197ab722d7426" + sha256 cellar: :any, ventura: "9e56a4edce4c857dbe748e52bbef8252c7bf7fab0521159aef743a8591eb96f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e64fc9a9d7cdeecd02e16f6d5ecf60e6244f99ce9cdda0e49f17e4028c9f8cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c43bc1f9b6084692f9dec942860261facb88aa2fff0d5c9989843d8297e6dbdd" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "hdf5" + depends_on "netcdf" + + def install + args = std_cmake_args + %w[-DENABLE_TESTS=OFF -DENABLE_DOXYGEN=OFF] + + # Help netcdf-fortran find netcf + # https://github.com/Unidata/netcdf-fortran/issues/301#issuecomment-1183204019 + args << "-DnetCDF_LIBRARIES=#{Formula["netcdf"].opt_lib}/#{shared_library("libnetcdf")}" + args << "-DnetCDF_INCLUDE_DIR=#{Formula["netcdf"].opt_include}" + + system "cmake", "-S", ".", "-B", "build_shared", *args, "-DBUILD_SHARED_LIBS=ON" + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", *args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build_static" + lib.install "build_static/fortran/libnetcdff.a" + + # Remove shim paths + inreplace [bin/"nf-config", lib/"pkgconfig/netcdf-fortran.pc"], Superenv.shims_path/ENV.cc, ENV.cc + end + + test do + (testpath/"test.f90").write <<~FORTRAN + program test + use netcdf + integer :: ncid, varid, dimids(2) + integer :: dat(2,2) = reshape([1, 2, 3, 4], [2, 2]) + call check( nf90_create("test.nc", NF90_CLOBBER, ncid) ) + call check( nf90_def_dim(ncid, "x", 2, dimids(2)) ) + call check( nf90_def_dim(ncid, "y", 2, dimids(1)) ) + call check( nf90_def_var(ncid, "data", NF90_INT, dimids, varid) ) + call check( nf90_enddef(ncid) ) + call check( nf90_put_var(ncid, varid, dat) ) + call check( nf90_close(ncid) ) + contains + subroutine check(status) + integer, intent(in) :: status + if (status /= nf90_noerr) call abort + end subroutine check + end program test + FORTRAN + system "gfortran", "test.f90", "-L#{lib}", "-I#{include}", "-lnetcdff", + "-o", "testf" + system "./testf" + end +end diff --git a/Formula/n/netcdf.rb b/Formula/n/netcdf.rb new file mode 100644 index 0000000000000..08b23233a3a02 --- /dev/null +++ b/Formula/n/netcdf.rb @@ -0,0 +1,69 @@ +class Netcdf < Formula + desc "Libraries and data formats for array-oriented scientific data" + homepage "https://www.unidata.ucar.edu/software/netcdf/" + url "https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.3.tar.gz" + sha256 "990f46d49525d6ab5dc4249f8684c6deeaf54de6fec63a187e9fb382cc0ffdff" + license "BSD-3-Clause" + head "https://github.com/Unidata/netcdf-c.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:netcdf[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "36b365bd963887d2dcfa6fb5f1d9715d25182371e222b846d920bfcdafa0cd08" + sha256 cellar: :any, arm64_sequoia: "b6556411dffb6a79cade21f4c5935a7732f32b0566fbd95adc9c803578dd7f4c" + sha256 cellar: :any, arm64_sonoma: "8e5f6edbc1bdc0514eabbb6ba699bfd3a1dac8056d0a18e76eacb4dfdbc747f5" + sha256 cellar: :any, arm64_ventura: "db5219d0b13f8c474852b9786e1c604ec6776a488cfa78446b6cbff87a917827" + sha256 cellar: :any, sonoma: "8dc2871bf05e90c183d942121bdbeb217b52e84d3c2d76945a747b47664b5206" + sha256 cellar: :any, ventura: "1521a5bcfc4a455a2b7848c85c4351c7809e31a11d11df4d7739236fe8d80588" + sha256 cellar: :any_skip_relocation, arm64_linux: "5eca5939b9a6a5b5bd36f1c661e5e7bd950d88fcd5b9b1854d972d4eed1d4983" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c90a09f5e615e4c0bd1140e7e33341eb0dc0bc61934bea412cbb2d54066a191" + end + + depends_on "cmake" => :build + depends_on "hdf5" + + uses_from_macos "m4" => :build + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "libaec" + depends_on "zstd" + end + + def install + args = %w[-DNETCDF_ENABLE_TESTS=OFF -DNETCDF_ENABLE_NETCDF_4=ON -DNETCDF_ENABLE_DOXYGEN=OFF] + # Fixes "relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used" on Linux + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" if OS.linux? + + system "cmake", "-S", ".", "-B", "build_shared", *args, "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + system "cmake", "-S", ".", "-B", "build_static", *args, "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args + system "cmake", "--build", "build_static" + lib.install "build_static/libnetcdf.a" + + # Remove shim paths + inreplace [bin/"nc-config", lib/"pkgconfig/netcdf.pc", lib/"cmake/netCDF/netCDFConfig.cmake", + lib/"libnetcdf.settings"], Superenv.shims_path/ENV.cc, ENV.cc + end + + test do + (testpath/"test.c").write <<~C + #include + #include "netcdf_meta.h" + int main() + { + printf(NC_VERSION); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lnetcdf", + "-o", "test" + assert_equal version.to_s, `./test` + end +end diff --git a/Formula/n/netdata.rb b/Formula/n/netdata.rb new file mode 100644 index 0000000000000..5f8beca466368 --- /dev/null +++ b/Formula/n/netdata.rb @@ -0,0 +1,121 @@ +class Netdata < Formula + desc "Diagnose infrastructure problems with metrics, visualizations & alarms" + homepage "https://www.netdata.cloud/" + url "https://github.com/netdata/netdata/releases/download/v2.7.3/netdata-v2.7.3.tar.gz" + sha256 "f940fb0978c09f2353343cc4480dd3abfdba025f6690c90747fbc9a143e6bb9b" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "956093a0bf106a5453931cd7cd668b6cb50932fa062692e8f29a85a2a4df96d7" + sha256 arm64_sequoia: "ba3a3cba67772ef203bd1434bf8c309f3fd11fd2e37c5261087aa11d0cb800d2" + sha256 arm64_sonoma: "f4d6d293f19d2aa8a80227780ac4f9a7448962b3b229398bd994c5857f1dd750" + sha256 sonoma: "4e15e82971a44731a3bde9b42543b1f5017f72378070b5519316bd7f7f14b539" + sha256 arm64_linux: "9e36528c61d33c7733374336d940c7c0d93aafa1d97df03fbeb6b8fa7278a896" + sha256 x86_64_linux: "8381c6b8bec45e18c7f7833bfc226dcfda50207fefaeec3a71db28d103a40f45" + end + + depends_on "cmake" => :build + depends_on "corrosion" => :build + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "abseil" + depends_on "dlib" + depends_on "json-c" + depends_on "libuv" + depends_on "libyaml" + depends_on "lz4" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "protobuf" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "bison" => :build + depends_on "flex" => :build + depends_on "brotli" + depends_on "elfutils" + depends_on "freeipmi" + depends_on "libcap" + depends_on "libmnl" + depends_on "systemd" + depends_on "util-linux" + depends_on "zstd" + end + + # Backport fix for arm64 linux + patch do + url "https://github.com/netdata/netdata/commit/e8d12d47bf6b9c3105363ccafaa53cdc80b2237b.patch?full_index=1" + sha256 "b4a541f1528083665e29a5aa4d89786008114ea400aec8ae94d43e34ea7e3944" + end + + def install + # Fix to error: no member named 'tcps_sc_zonefail' in 'struct tcpstat' + # Issue ref: https://github.com/netdata/netdata/issues/20985 + if OS.mac? && MacOS.version >= :tahoe + inreplace "src/collectors/macos.plugin/macos_sysctl.c", + 'rrddim_set(st, "SyncookiesFailed", tcpstat.tcps_sc_zonefail);', + "" + end + + # Install files using Homebrew's directory layout rather than relative to root. + inreplace "packaging/cmake/Modules/NetdataEBPFLegacy.cmake", "DESTINATION usr/", "DESTINATION " + inreplace "CMakeLists.txt" do |s| + s.gsub! %r{(\s"?(?:\$\{NETDATA_RUNTIME_PREFIX\}/)?)usr/}, "\\1" + s.gsub! %r{(\s"?)(?:\$\{NETDATA_RUNTIME_PREFIX\}/)?etc/}, "\\1#{etc}/" + s.gsub! %r{(\s"?)(?:\$\{NETDATA_RUNTIME_PREFIX\}/)?var/}, "\\1#{var}/" + # Fix not to use `fetchContent` for `dlib` library + # Issue ref: https://github.com/netdata/netdata/issues/20147 + s.gsub! "netdata_bundle_dlib()", "find_package(dlib REQUIRED)" + s.gsub! "netdata_add_dlib_to_target(netdata)", "" + end + + args = %w[ + -DBUILD_FOR_PACKAGING=ON + -DENABLE_PLUGIN_NFACCT=OFF + -DENABLE_PLUGIN_XENSTAT=OFF + ] + # Avoid to use FetchContent for `corrosion` + args += %w[ + -DHOMEBREW_ALLOW_FETCHCONTENT=ON + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"cache/netdata/unittest-dbengine/dbengine").mkpath + (var/"lib/netdata/registry").mkpath + (var/"lib/netdata/lock").mkpath + (var/"log/netdata").mkpath + (var/"netdata").mkpath + end + + service do + run [opt_sbin/"netdata", "-D"] + working_dir var + end + + test do + directories = prefix.children(false).map(&:to_s) + %w[usr var etc].each { |dir| refute_includes directories, dir } + + system sbin/"netdata", "-W", "set", "registry", "netdata unique id file", + "#{testpath}/netdata.unittest.unique.id", + "-W", "set", "registry", "netdata management api key file", + "#{testpath}/netdata.api.key" + end +end diff --git a/Formula/n/netfetch.rb b/Formula/n/netfetch.rb new file mode 100644 index 0000000000000..5a233a228d491 --- /dev/null +++ b/Formula/n/netfetch.rb @@ -0,0 +1,39 @@ +class Netfetch < Formula + desc "K8s tool to scan clusters for network policies and unprotected workloads" + homepage "https://github.com/deggja/netfetch" + url "https://github.com/deggja/netfetch/archive/refs/tags/v0.5.4.tar.gz" + sha256 "6029d93da6633a626d6920944825c76b5552e4ad5175101f661281e30b36b1cf" + license "MIT" + head "https://github.com/deggja/netfetch.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(0(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "70e7ad4240c2e63c68c9d8090976aaf7be5268ef5c8eaba0ac9b78838e0c447d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f5ca9443c70310c77897987bdc5c8d285c8a86b718c4ef31fbbb7ad0f614f8f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f5ca9443c70310c77897987bdc5c8d285c8a86b718c4ef31fbbb7ad0f614f8f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f5ca9443c70310c77897987bdc5c8d285c8a86b718c4ef31fbbb7ad0f614f8f" + sha256 cellar: :any_skip_relocation, sonoma: "66c0c77c648e2c97d1a785c7153dd7a3833cc225b42f6071934a2e3749f37b40" + sha256 cellar: :any_skip_relocation, ventura: "66c0c77c648e2c97d1a785c7153dd7a3833cc225b42f6071934a2e3749f37b40" + sha256 cellar: :any_skip_relocation, arm64_linux: "a173e3dfac9e058b76f212cf75c19b9f2bf6c6ec0826f25c06a45f622afd1d73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5901ca1bca581682e2c206cfc1eef3fca07861f82fe05b2a6fb614fcebefd33d" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/deggja/netfetch/backend/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./backend" + + generate_completions_from_executable(bin/"netfetch", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/netfetch version") + + assert_match ".kube/config: no such file or directory", shell_output("#{bin}/netfetch scan") + end +end diff --git a/Formula/n/nethack.rb b/Formula/n/nethack.rb new file mode 100644 index 0000000000000..68ee86396a8db --- /dev/null +++ b/Formula/n/nethack.rb @@ -0,0 +1,108 @@ +# Nethack the way God intended it to be played: from a terminal. + +class Nethack < Formula + desc "Single-player roguelike video game" + homepage "https://www.nethack.org/" + license "NGPL" + head "https://github.com/NetHack/NetHack.git", branch: "NetHack-3.7" + + stable do + url "https://www.nethack.org/download/3.6.7/nethack-367-src.tgz" + version "3.6.7" + sha256 "98cf67df6debf9668a61745aa84c09bcab362e5d33f5b944ec5155d44d2aacb2" + + # add macos patch, upstream PR ref, https://github.com/NetHack/NetHack/pull/988 + patch do + url "https://github.com/NetHack/NetHack/commit/79cf1e902483c070b209b55059159da5f2120b97.patch?full_index=1" + sha256 "5daf984512d9c512818e0376cf2b57a5cd9eefaa626ea286bfd70d899995b5de" + end + end + + # The /download/ page loads the following page in an iframe and this contains + # links to version directories which contain the archive files. + livecheck do + url "https://www.nethack.org/common/dnldindex.html" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "9266431ce0bd0980d82d8a6a0a899d1e31ad90236598706d79600b6acf76cdef" + sha256 arm64_sequoia: "4bd7bdd2aa9ce9dae7f450ffaeda07c1279f597ef35ee3bd7ee52086b54160e1" + sha256 arm64_sonoma: "ce30c296e474a239cb110c54a7b16950de538e9782414718290606a8cc9424d1" + sha256 arm64_ventura: "e51292f937dbfdb68feb969552da8ab484a8728d5fb85fc6e389cdfd0ed57922" + sha256 arm64_monterey: "f546283d68a22ff79a4a382a05fb9f7c1949b8057e52f478c8cead4300d424b4" + sha256 arm64_big_sur: "078ee2989d66bf8a98a577509c86dc4e7bddc009fe475dcfe172c075bd0cdb39" + sha256 sonoma: "496413acccb6c48f8ae064d8beed827062858948e4f28dd7e792ef256d6236ad" + sha256 ventura: "a2ca955b4f528e11d3d5baceeb8bb9783914f595a1a010e12ce23cc5206e85ef" + sha256 monterey: "0fad9d74cfab3770167a0de3de5228f2ec5c079e94d6956c140f820b3b8e2097" + sha256 big_sur: "9478349296901830cee4abfeecbca729453a87732753603216e6a7ca8b31695a" + sha256 arm64_linux: "d4278220da343d3dcd08254e40c10167c03e6fc83af8634433f241ab9c3e9b0c" + sha256 x86_64_linux: "e8904c482b7915880b90dd409d7a66d74b46524d07071f3eb720aa870cf78a83" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + def install + # Build everything in-order; no multi builds. + ENV.deparallelize + # Fixes https://github.com/NetHack/NetHack/issues/274 + # see https://github.com/Homebrew/brew/issues/14763. + ENV.O0 + + cd "sys/unix" do + hintfile = if OS.mac? + build.head? ? "macOS.370" : "macosx10.14" + else + build.head? ? "macosx.sh" : "macosx10.10" + end + + # Enable wizard mode for all users + inreplace "sysconf", /^WIZARDS=.*/, "WIZARDS=*" + + # Enable curses interface + # Setting VAR_PLAYGROUND preserves saves across upgrades + inreplace "hints/#{hintfile}" do |s| + s.change_make_var! "HACKDIR", libexec + s.change_make_var! "CHOWN", "true" + s.change_make_var! "CHGRP", "true" + if build.stable? + s.gsub! "#WANT_WIN_CURSES=1", + "WANT_WIN_CURSES=1\nCFLAGS+=-DVAR_PLAYGROUND='\"#{HOMEBREW_PREFIX}/share/nethack\"'" + end + end + + system "sh", "setup.sh", "hints/#{hintfile}" + end + + system "make", "fetch-lua" if build.head? + system "make", "install" + bin.install_symlink libexec/"nethack" + man6.install "doc/nethack.6" + end + + def post_install + # These need to exist (even if empty) otherwise nethack won't start + savedir = HOMEBREW_PREFIX/"share/nethack" + mkdir_p savedir + cd savedir do + %w[xlogfile logfile perm record].each do |f| + touch f + end + mkdir_p "save" + touch "save/.keepme" # preserve on `brew cleanup` + end + # Set group-writeable for multiuser installs + chmod "g+w", savedir + chmod "g+w", savedir/"save" + end + + test do + system bin/"nethack", "-s" + assert_match (HOMEBREW_PREFIX/"share/nethack").to_s, + shell_output("#{bin}/nethack --showpaths") + end +end diff --git a/Formula/n/nethogs.rb b/Formula/n/nethogs.rb new file mode 100644 index 0000000000000..1f113efc5d96e --- /dev/null +++ b/Formula/n/nethogs.rb @@ -0,0 +1,31 @@ +class Nethogs < Formula + desc "Net top tool grouping bandwidth per process" + homepage "https://raboof.github.io/nethogs/" + url "https://github.com/raboof/nethogs/archive/refs/tags/v0.8.8.tar.gz" + sha256 "111ade20cc545e8dfd7ce4e293bd6b31cd1678a989b6a730bd2fa2acc6254818" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "02b72507de60a98acc43d6f939146777d65ed8ab2316bc66fec08f07cf2fbc24" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b63822d0cd7c0e15f8a7dc5df156f7802b23d2481007cb9fc683a14c8f9f78ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06a30ab6ab73071fd13b8655199f2bc0bc650c90240af29200f0a5dc681ced17" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ea77a752e043dcf59afb915ae001663d57b3f9bdf829efe1202b90802e90b29" + sha256 cellar: :any_skip_relocation, sonoma: "94cf8d3019a7b344781b52bfc4d0dec42580382e143a8a308faac8cfe13780d8" + sha256 cellar: :any_skip_relocation, ventura: "86e443cfcfb7f0956dfca5cc19282c525aff27f1c13be145360971e3161b251c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2646e3701644f65e25a1e8066ed374ac36fde0a8d86410e50da58cd7bcd3e46d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11e366aab4953f52e2978a45b72cf4467d87218a71370e5ea83efe72e096f265" + end + + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + def install + ENV.append "CXXFLAGS", "-std=c++14" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # Using -V because other nethogs commands need to be run as root + system sbin/"nethogs", "-V" + end +end diff --git a/Formula/n/netlify-cli.rb b/Formula/n/netlify-cli.rb new file mode 100644 index 0000000000000..aa9aade817630 --- /dev/null +++ b/Formula/n/netlify-cli.rb @@ -0,0 +1,63 @@ +class NetlifyCli < Formula + desc "Netlify command-line tool" + homepage "https://www.netlify.com/docs/cli" + url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-23.9.5.tgz" + sha256 "6d80f31b33c1d2b5c78f72e496f0b63b481e18a1d2e55064a0480ce9757c8b64" + license "MIT" + + bottle do + sha256 arm64_tahoe: "fdb48ee892072aced7c8f8b644011f25a4cd7863c477e597d9c42d0930d7cce8" + sha256 arm64_sequoia: "10faca41878fd588188a360671b450c639bad577be4b20d19e09cfd2f5460854" + sha256 arm64_sonoma: "70b68b1fc5998f358fcf047546e27d4c6de024971d3c37011d97e132b82581d5" + sha256 sonoma: "2d341ba1cdf9ca74feee40c78d56432683941efdf0ef2ab40ff895ab84b3a933" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d81a987e6a1f6a30abc58ff5d98bd086d4daab0af9947f042e7503378a6ee52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cd60c27d5dc39a0f934c443097e887ac00dc32d6fbc97cb716568ed0d305c9a" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "node" + depends_on "vips" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "gmp" + depends_on "vips" + depends_on "xsel" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Remove incompatible pre-built binaries + node_modules = libexec/"lib/node_modules/netlify-cli/node_modules" + + if OS.linux? + (node_modules/"@lmdb/lmdb-linux-x64").glob("*.musl.node").map(&:unlink) + (node_modules/"@msgpackr-extract/msgpackr-extract-linux-x64").glob("*.musl.node").map(&:unlink) + end + + clipboardy_fallbacks_dir = node_modules/"clipboardy/fallbacks" + rm_r(clipboardy_fallbacks_dir) # remove pre-built binaries + if OS.linux? + linux_dir = clipboardy_fallbacks_dir/"linux" + linux_dir.mkpath + # Replace the vendored pre-built xsel with one we build ourselves + ln_sf (Formula["xsel"].opt_bin/"xsel").relative_path_from(linux_dir), linux_dir + end + + # Remove incompatible pre-built `bare-fs`/`bare-os` binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules.glob("{bare-fs,bare-os}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + assert_match "Not logged in. Please log in to see project status.", shell_output("#{bin}/netlify status") + end +end diff --git a/Formula/n/netlistsvg.rb b/Formula/n/netlistsvg.rb new file mode 100644 index 0000000000000..eeea30676efce --- /dev/null +++ b/Formula/n/netlistsvg.rb @@ -0,0 +1,38 @@ +class Netlistsvg < Formula + desc "Draws an SVG schematic from a yosys JSON netlist" + homepage "https://github.com/nturley/netlistsvg" + url "https://github.com/nturley/netlistsvg/archive/refs/tags/v1.0.2.tar.gz" + sha256 "b7f218f9d8f2b826d28bff6ebe1f5b1a4fb5b7c9465a034ae0a8fcd2b9d53a67" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "13485ed6f7d18a5733d709b8806159803cbfcfa7bf1afaa6b0e3acd9a12fc200" + end + + depends_on "yosys" => :test + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"dff.v").write <<~VERILOG + module DFF (output reg Q, input C, D, R); + always @(posedge C) + if (~R) begin + Q <= 1'b0; + end else begin + Q <= D; + end + endmodule + VERILOG + system "yosys -q -p \"prep -top DFF; write_json dff.json\" dff.v" + system bin/"netlistsvg", "dff.json", "-o", "dff.svg" + assert_path_exists testpath/"dff.svg" + end +end diff --git a/Formula/n/netmask.rb b/Formula/n/netmask.rb new file mode 100644 index 0000000000000..50c34a57d477d --- /dev/null +++ b/Formula/n/netmask.rb @@ -0,0 +1,40 @@ +class Netmask < Formula + desc "IP address netmask generation utility" + homepage "https://github.com/tlby/netmask/blob/master/README" + url "https://github.com/tlby/netmask/archive/refs/tags/v2.5.0.tar.gz" + sha256 "f352d8117a4f9377a15919d9ad4989cfba8816958718a914abf1414242a9f636" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "526dfd6c8b4bf73f066e2f8d7e2d6dd377daf7709dfc11ba4697ed81d75ac619" + sha256 cellar: :any, arm64_sequoia: "a13e322af5637a9f17320f03d2f527dff2342edae14f39c88b4b32b2962b878f" + sha256 cellar: :any, arm64_sonoma: "9b5e73835736dde2f98f6c5df24ad88a570d4a204f0b352ab35e77e36f5b7bcb" + sha256 cellar: :any, arm64_ventura: "91de5bd0fb52ad88bbf873d5ee5fa3e65ef1dcf466d95aca7bad145b104bf47f" + sha256 cellar: :any, sonoma: "0fc1d11045fe492269b03b694edd9e1fe214a2208f700f5ea98d69b132914668" + sha256 cellar: :any, ventura: "37f666ef3af69e17afdabf451eb71196065e3d9e91b091f582b29be4b5c18853" + sha256 cellar: :any_skip_relocation, arm64_linux: "3eef7efdc4db887245360eabc57b202607d2c6cddc461ad1368898582a8eaa99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "412db2c646b5c4e9038908022c40c809e1c2430fc163dbdc27b3590db01803be" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + depends_on "check" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./bootstrap" + system "./configure" + system "make" + bin.install "netmask" + end + + test do + assert_equal "100.64.0.0/10", shell_output("#{bin}/netmask -c 100.64.0.0:100.127.255.255").strip + end +end diff --git a/Formula/n/netpbm.rb b/Formula/n/netpbm.rb new file mode 100644 index 0000000000000..24db7b5b6510b --- /dev/null +++ b/Formula/n/netpbm.rb @@ -0,0 +1,149 @@ +class Netpbm < Formula + desc "Image manipulation" + homepage "https://netpbm.sourceforge.net/" + # Maintainers: Look at https://sourceforge.net/p/netpbm/code/HEAD/tree/ + # for stable versions and matching revisions. + url "https://svn.code.sf.net/p/netpbm/code/stable", revision: "5109" + version "11.02.19" + license "GPL-3.0-or-later" + version_scheme 1 + head "https://svn.code.sf.net/p/netpbm/code/trunk" + + livecheck do + url "https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/stable" + regex(/Release\s+v?(\d+(?:\.\d+)+)/i) + strategy :page_match + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "b06ec2957a4c33c6cdea509e31c693c4b764b07b0289d5ae8e66618fec6661e2" + sha256 arm64_sequoia: "9fcb3967730836d638c0f1fe36ac3acafa87e9621e538dea0938961a59464e22" + sha256 arm64_sonoma: "7ba0e674a3b087b108dd5cf13a630979de8ed19207de6a1dbfc3e5f24ba10964" + sha256 sonoma: "f91914baa422ddca9ee6b8920f7e3a7f45016de5f73f4785d2eccbe5fb3bbda7" + sha256 arm64_linux: "0373720d2395affd44f5ffe5b37c1deb1840465bfdbe6ecccfa2e37045ded1b3" + sha256 x86_64_linux: "96594d162e14e5ae4acd57eaac72d197187335c6083cb6123425b1ed44c19fce" + end + + depends_on "pkgconf" => :build + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + + uses_from_macos "flex" => :build + uses_from_macos "python" => :build + uses_from_macos "libxml2" + uses_from_macos "zlib" + + conflicts_with "jbigkit", because: "both install `pbm.5` and `pgm.5` files" + + resource "html" do + # Rolling release, latest revision also documents previous software versions + # NOTE: Keep "revision" and "version" in sync + url "https://svn.code.sf.net/p/netpbm/code/userguide", revision: "5103" + version "5103" + + livecheck do + url "https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/userguide" + regex(/\[r?(\d+)\]/i) + strategy :page_match + end + end + + def install + cp "config.mk.in", "config.mk" + + inreplace "config.mk" do |s| + s.remove_make_var! "CC" + s.change_make_var! "TIFFLIB", "-ltiff" + s.change_make_var! "JPEGLIB", "-ljpeg" + s.change_make_var! "PNGLIB", "-lpng" + s.change_make_var! "ZLIB", "-lz" + s.change_make_var! "JASPERLIB", "-ljasper" + s.change_make_var! "JASPERHDR_DIR", Formula["jasper"].opt_include/"jasper" + s.gsub! "/usr/local/netpbm/rgb.txt", prefix/"misc/rgb.txt" + + if OS.mac? + s.change_make_var! "CFLAGS_SHLIB", "-fno-common" + s.change_make_var! "NETPBMLIBTYPE", "dylib" + s.change_make_var! "NETPBMLIBSUFFIX", "dylib" + s.change_make_var! "LDSHLIB", "--shared -o $(SONAME)" + else + s.change_make_var! "CFLAGS_SHLIB", "-fPIC" + end + end + inreplace "buildtools/manpage.mk", "python", "python3" + + ENV.deparallelize + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make" + system "make", "package", "pkgdir=#{buildpath}/stage" + + cd "stage" do + inreplace "pkgconfig_template" do |s| + s.gsub! "@VERSION@", File.read("VERSION").sub("Netpbm ", "").chomp + s.gsub! "@LINKDIR@", lib + s.gsub! "@INCLUDEDIR@", include + end + + prefix.install %w[bin include lib misc] + lib.install buildpath.glob("staticlink/*.a"), buildpath.glob("sharedlink/#{shared_library("*")}") + (lib/"pkgconfig").install "pkgconfig_template" => "netpbm.pc" + end + + # Generate unversioned library symlink (upstream does not do this) + libnetpbm = lib.glob(shared_library("libnetpbm", "*")).reject(&:symlink?).first.basename + lib.install_symlink libnetpbm => shared_library("libnetpbm") + + resource("html").stage buildpath/"userguide" + make_args = %W[ + USERGUIDE=#{buildpath}/userguide + -f + #{buildpath}/buildtools/manpage.mk + ] + mkdir buildpath/"netpbmdoc" do + system "make", *make_args, "manpages" + [man1, man3, man5].map(&:mkpath) + system "make", "MANDIR=#{man}", *make_args, "installman" + end + end + + test do + fwrite = shell_output("#{bin}/pngtopam #{test_fixtures("test.png")} -alphapam") + (testpath/"test.pam").write fwrite + system bin/"pamdice", "test.pam", "-outstem", testpath/"testing" + assert_path_exists testpath/"testing_0_0.pam" + (testpath/"test.xpm").write <<~EOS + /* XPM */ + static char * favicon_xpm[] = { + "16 16 4 1", + " c white", + ". c blue", + "X c black", + "o c red", + " ", + " ", + " ", + " ", + " .... .... ", + " . . . . ", + ". .. .. .. .", + " . . .. . . ", + " . XXXXXX . ", + " . XXXXXX . ", + "oooooooooooooooo", + "oooooooooooooooo", + "oooooooooooooooo", + "oooooooooooooooo", + "XXXXXXXXXXXXXXXX", + "XXXXXXXXXXXXXXXX"}; + EOS + ppmout = shell_output("#{bin}/xpmtoppm test.xpm") + refute_predicate ppmout, :empty? + end +end diff --git a/Formula/n/netris.rb b/Formula/n/netris.rb new file mode 100644 index 0000000000000..2ff249f066053 --- /dev/null +++ b/Formula/n/netris.rb @@ -0,0 +1,99 @@ +class Netris < Formula + desc "Networked variant of tetris" + homepage "https://packages.debian.org/sid/netris" + url "https://deb.debian.org/debian/pool/main/n/netris/netris_0.52.orig.tar.gz" + sha256 "8bc770ebb2c3ead1611ca7a1a2f3d833e169536c78d53b3fcf49381164ee9706" + license "GPL-2.0-or-later" + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9a995775e35da0c6d44ebab95bc19340273c50fa742670b5f1178b848fda29b8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45fd383811db400a50896723b5c7f9e05015d19208c678d14e52e68031dd6887" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "311ecb7d3b6ba50544169823f78960a2da39290fed321d2f0328fd0b4da72359" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d1b2e0308a1ac7d02f0d76d91c805c32241191fc396d2a95e22b9456370e8af" + sha256 cellar: :any_skip_relocation, arm64_monterey: "325a86274ce6276ebecbf44fd386861b02ca96a8aa982da845c21ba0932aca00" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a7b88fa79c440ed0dc4c971eb32197e9f88b34afbf50cd6d9e8929f2e03d7866" + sha256 cellar: :any_skip_relocation, sonoma: "6b25332165118d1aa8dac47a118bffd50346bbae5fced003ac1e9c150edeefc4" + sha256 cellar: :any_skip_relocation, ventura: "73bf7b8515f9b4c10fd3f8dc686b6d29e614319a28fad0048b1ea3e99ea0d7c9" + sha256 cellar: :any_skip_relocation, monterey: "1cd2c848c2e5da61c99c8c2930c77f21e58aeb91fdf97c678392bdb34ca252ba" + sha256 cellar: :any_skip_relocation, big_sur: "9f7c51618024abd332dafe7c9075896fdfefbd80819a4b0c42bf493637947bd2" + sha256 cellar: :any_skip_relocation, catalina: "41fc6feceffbce79c1bdac8c198d318b8a91c2e8ae099f068a8a21bf9344e038" + sha256 cellar: :any_skip_relocation, arm64_linux: "10152777ead84d310f8d140c904b68a69f94c1504b03e4dc0be441dc4b3f9e84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7209cea9b9b79f4bc89a1aafdf2ac00af1b76aefcc9fb3f0e90f5d2dc3873232" + end + + uses_from_macos "ncurses" + + # Debian has been applying fixes and security patches, so let's re-use their work. + # Also fixes case of "TERM=xterm-color256" which otherwise segfaults. + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/01_multi-games-with-scoring" + sha256 "5d5182afc06fbb6d011edfaa0c12e88425884019372f95faee563b760d03e556" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/02_line-count-patch" + sha256 "c31de57729cfde1ec72e49fd0ee1984cfffc179eb3d16b1268853e14e827b71f" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/03_staircase-effect-fix" + sha256 "df17bd23186c3d0379d298ac2e526ff40c7cdcebbe174c2bf2f08aa067abb4c7" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/04_robot-close-fixup" + sha256 "8c79a8925357b57b07d4afa8a2ef048528f4ca19e25851637fd6f20f93ea7ae4" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/05_init-static-vars" + sha256 "5b057390f6736c0d5c1d2b149c6550fb322358544641dc89d358c4c275a17724" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/06_curses.c-include-term.h" + sha256 "9f0b631dcfcf2114ea1c70a599df401aafa21fb73423fa98783d01ac9a0845dc" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/07_curses.c-include-time.h" + sha256 "b53bd8af4f09661ed9030baf52456595f3b4149966c2e3111c91305957a94a52" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/08_various-fixes" + sha256 "8c9f709c115d8acf4af04e6dd60d75f2c7ecda2f9708aca2a2848966ec6999db" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/09_ipv6" + sha256 "cf6c216cd4381a82945b441e2ad659120643126f52a89f745a9692fc708e8261" + end + + patch do + url "https://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/10_fix-memory-leak" + sha256 "380566f670b90585943a2f3c69fdb83bae04d0e62cc457bb8d7558f393f6b874" + end + + def install + configure_args = [] + # Workaround for newer Clang + if DevelopmentTools.clang_build_version >= 1403 + configure_args = [ + "--cextra", + "-Wno-implicit-function-declaration -Wno-implicit-int", + ] + end + system "sh", "Configure", *configure_args + system "make" + bin.install "netris" + end + + test do + assert_match "Netris version #{version}", shell_output("#{bin}/netris -H 2>&1") + end +end diff --git a/Formula/n/netscanner.rb b/Formula/n/netscanner.rb new file mode 100644 index 0000000000000..92cfb5515c49f --- /dev/null +++ b/Formula/n/netscanner.rb @@ -0,0 +1,35 @@ +class Netscanner < Formula + desc "Network scanner with features like WiFi scanning, packetdump and more" + homepage "https://github.com/Chleba/netscanner" + url "https://github.com/Chleba/netscanner/archive/refs/tags/v0.6.3.tar.gz" + sha256 "ad2df332bb347eac96c0a5d22e9477f9a7fe4b05d565b90009cc1c3fb598b29f" + license "MIT" + head "https://github.com/Chleba/netscanner.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0b3f94976bd5b784cb146d927fe0a5f5666c6423d575a3992462d91d8ffcd228" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9b676da6d93f469d0818d8a36401f9ea5acaab79871be20503935313ff303aa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e065a383960691a87a2e0cab684c9b96334ed59f9e6e2ee3c34bb8305fbf8c18" + sha256 cellar: :any_skip_relocation, arm64_ventura: "457b9ebece7265aef139b9f72f3cc9304cb9da345a0d8a7598732d31c8b24900" + sha256 cellar: :any_skip_relocation, sonoma: "0d8b5c71568111b671f317a4c8e1f676c2d6bce3736fe620e7e0f35b5c39ca19" + sha256 cellar: :any_skip_relocation, ventura: "d75f758710f6a73e9ec214a11e20c1bd3aa091c1042dd82ba16a098c57c9dc9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9b62e202cf8b8f8c5fd3c700aece19d41fe4cbfe4a63a3ca499c49d98196be0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b9e389005e065ed119a75aeefc77f513408bcd380ba199a8b55e6e7d80a6eca" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/netscanner --version") + + # Fails in Linux CI with `No such device or address (os error 6)` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # Requires elevated privileges for network access + assert_match "Unable to create datalink channel", shell_output("#{bin}/netscanner 2>&1") + end +end diff --git a/Formula/n/netsurf-buildsystem.rb b/Formula/n/netsurf-buildsystem.rb new file mode 100644 index 0000000000000..55aa9e3c4b9ca --- /dev/null +++ b/Formula/n/netsurf-buildsystem.rb @@ -0,0 +1,59 @@ +class NetsurfBuildsystem < Formula + desc "Makefiles shared by NetSurf projects" + homepage "https://www.netsurf-browser.org/" + url "https://download.netsurf-browser.org/libs/releases/buildsystem-1.10.tar.gz" + sha256 "3d3e39d569e44677c4b179129bde614c65798e2b3e6253160239d1fd6eae4d79" + license "MIT" + head "git://git.netsurf-browser.org/buildsystem.git", branch: "master" + + livecheck do + url "https://download.netsurf-browser.org/libs/releases/" + regex(/href=.*?buildsystem[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7698443194711b12a21395fe67c378a2d9cb323ace8f590cfeb79ff730c2ed98" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + + # Consistently replace /usr/local with HOMEBREW_PREFIX for reproducible bottles + inreplace pkgshare/"makefiles/Makefile.tools", "/usr/local", HOMEBREW_PREFIX + end + + test do + (testpath/"src").mkpath + + (testpath/"Makefile").write <<~MAKE + COMPONENT := hello + COMPONENT_VERSION := 0.1.0 + COMPONENT_TYPE ?= binary + include $(NSSHARED)/makefiles/Makefile.tools + include $(NSBUILD)/Makefile.top + INSTALL_ITEMS := $(INSTALL_ITEMS) /bin:$(BUILDDIR)/$(COMPONENT) + MAKE + + (testpath/"src/Makefile").write <<~MAKE + DIR_SOURCES := main.c + include $(NSBUILD)/Makefile.subdir + MAKE + + (testpath/"src/main.c").write <<~C + #include + int main() { + printf("Hello, world!"); + return 0; + } + C + + args = %W[ + NSSHARED=#{pkgshare} + PREFIX=#{testpath} + ] + + system "make", "install", *args + assert_equal "Hello, world!", shell_output(testpath/"bin/hello") + end +end diff --git a/Formula/n/nettle.rb b/Formula/n/nettle.rb new file mode 100644 index 0000000000000..5ef3ed82c8d4a --- /dev/null +++ b/Formula/n/nettle.rb @@ -0,0 +1,58 @@ +class Nettle < Formula + desc "Low-level cryptographic library" + homepage "https://www.lysator.liu.se/~nisse/nettle/" + url "https://ftpmirror.gnu.org/gnu/nettle/nettle-3.10.2.tar.gz" + mirror "https://ftp.gnu.org/gnu/nettle/nettle-3.10.2.tar.gz" + sha256 "fe9ff51cb1f2abb5e65a6b8c10a92da0ab5ab6eaf26e7fc2b675c45f1fb519b5" + license any_of: ["GPL-2.0-or-later", "LGPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "f433c0830169086cae47237fc4fe4b8c71021ec9683006db96e066ff0b883030" + sha256 cellar: :any, arm64_sequoia: "12c88e8d20a6b5161aa759820710b0d793212f46be7d48933e4519198480bd85" + sha256 cellar: :any, arm64_sonoma: "57596e345b70dbb3debba5d8ba9b90147963f62e25022c2661a3672f25304753" + sha256 cellar: :any, arm64_ventura: "a5f3b6f969357a94626cc52f6e5869a77a0c6fe8bc5ab4fc491ea83ae6986e65" + sha256 cellar: :any, sonoma: "46f05ed1c965061f176755083b8a14e6f8cfc3543201d95691bc2a4090309152" + sha256 cellar: :any, ventura: "d82f1ec725dc230650b93facd5d8b5d7f0c2bd6f76b0aa7c6a9d6c3a154e4e91" + sha256 cellar: :any_skip_relocation, arm64_linux: "411e940ef2c87423f8c0ed34427aa5235e0bc702b40943e3564878a62c76d420" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff4a7452b4dcf2f1ad266f19f5eb5a29e02b5d1215d4bc46f3d4c4ca4b8e6282" + end + + depends_on "gmp" + + uses_from_macos "m4" => :build + + def install + system "./configure", *std_configure_args, "--enable-shared" + system "make" + system "make", "install" + system "make", "check" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + struct sha1_ctx ctx; + uint8_t digest[SHA1_DIGEST_SIZE]; + unsigned i; + + sha1_init(&ctx); + sha1_update(&ctx, 4, "test"); + sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest); + + printf("SHA1(test)="); + + for (i = 0; i :build + depends_on "cython" => :build + depends_on "ninja" => :build + depends_on "python-setuptools" => :build + depends_on "tlx" => :build + + depends_on "libnetworkit" + depends_on "numpy" + depends_on "python@3.14" + depends_on "scipy" + + on_macos do + depends_on "libomp" + end + + def python3 + which("python3.14") + end + + def install + # Fix to networkit/graphtools.pyx:408:17: Can only parameterize template functions. + # Issue ref: https://github.com/networkit/networkit/issues/1350 + inreplace "networkit/graphtools.pyx", "return volume[vector[node].iterator]", "return volume" + + site_packages = Language::Python.site_packages(python3) + + ENV.prepend_create_path "PYTHONPATH", prefix/site_packages + ENV.append_path "PYTHONPATH", Formula["cython"].opt_libexec/site_packages + + networkit_site_packages = prefix/site_packages/"networkit" + extra_rpath = rpath(source: networkit_site_packages, target: Formula["libnetworkit"].opt_lib) + system python3, "setup.py", "build_ext", "--networkit-external-core", + "--external-tlx=#{Formula["tlx"].opt_prefix}", + "--rpath=#{loader_path};#{extra_rpath}" + + system python3, "-m", "pip", "install", *std_pip_args, "." + end + + test do + system python3, "-c", <<~PYTHON + import networkit as nk + G = nk.graph.Graph(3) + G.addEdge(0,1) + G.addEdge(1,2) + G.addEdge(2,0) + assert G.degree(0) == 2 + assert G.degree(1) == 2 + assert G.degree(2) == 2 + PYTHON + end +end diff --git a/Formula/n/never.rb b/Formula/n/never.rb new file mode 100644 index 0000000000000..6c9cc5771a114 --- /dev/null +++ b/Formula/n/never.rb @@ -0,0 +1,75 @@ +class Never < Formula + desc "Statically typed, embedded functional programming language" + homepage "https://never-lang.readthedocs.io/en/latest/" + url "https://github.com/never-lang/never/archive/refs/tags/v2.3.9.tar.gz" + sha256 "9ca3ea42738570f128708404e2f7aad35ef2b8b4b178d64508430c675713e41f" + license "MIT" + head "https://github.com/never-lang/never.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "56ada0c97c552e92c8b84dadd236772dcf5b2c6315390f32a4fe99baf0481fff" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ec72ae68f2d53ebd8a8e21e712726b4b0ed35f083e95a7752db9ef4df9d2814" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "de0e6c32586534fa999011920ccdcbeb91429e16a1f032e9702be8c87556fed3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4c74cff8a5b42c144b8936658171abc0ef544be17dd62a6552552de7f7ba781" + sha256 cellar: :any_skip_relocation, arm64_monterey: "94c676366e00825d3eab442451d7a9235af9df474e3431f775920607dddee761" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fe69dd034727e31b1d680ec12ab8fe6e6d6faff7c47a66f43b6ffd3d5e6e458c" + sha256 cellar: :any_skip_relocation, sonoma: "abbbe090dd2542052901dd60991fe207952aa1916e0fb936a4ac099140f5a565" + sha256 cellar: :any_skip_relocation, ventura: "9fbcc22654686fcfebff4d485b2e763bf2555672854796a9338b821bf2a998fc" + sha256 cellar: :any_skip_relocation, monterey: "704cf0ced4f7c9526b337dc2dfdcab520956603fbc5edb3859f042d93460b2dc" + sha256 cellar: :any_skip_relocation, big_sur: "df908438891a84cc6833cf1f7d4a5e8515a9c24a787cf15a39175202c01b86f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "06ace732c395dcd140b9098c6842004a527d62dde2e6ea49974827f803847a30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3732a0e925be723674dea91079efea95b0df1863dade024d110b32214707d651" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + + uses_from_macos "flex" => :build + uses_from_macos "libffi" + + def install + ENV.append_to_cflags "-I#{MacOS.sdk_path_if_needed}/usr/include/ffi" if OS.mac? + + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/never" + lib.install "build/libnev.a" + prefix.install "include" + end + + test do + (testpath/"hello.nev").write <<~EOS + func main() -> int + { + prints("Hello World!\\n"); + 0 + } + EOS + assert_match "Hello World!", shell_output("#{bin}/never -f hello.nev") + + (testpath/"test.c").write <<~C + #include "object.h" + void test_one() + { + object * obj1 = object_new_float(100.0); + object_delete(obj1); + } + int main(int argc, char * argv[]) + { + test_one(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnev", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/neverest.rb b/Formula/n/neverest.rb new file mode 100644 index 0000000000000..c8b734acf5a65 --- /dev/null +++ b/Formula/n/neverest.rb @@ -0,0 +1,36 @@ +class Neverest < Formula + desc "Synchronize, backup, and restore emails" + homepage "https://pimalaya.org" + url "https://github.com/pimalaya/neverest/archive/refs/tags/v0.1.0.tar.gz" + sha256 "7fc3cdfb797026c68a4e1aebd65ad69b604900e9c51970403633d82f54e6a4ce" + license "MIT" + head "https://github.com/pimalaya/neverest.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8724834d76f0b3ae85de2cd78efd915e013ea6e73e6fcc4aace2fe2bca4ee2ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ea446d70657b4a63b0cea2a1f008409435072a5e99610924f6b5b1dc0efff1d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c4727f47e9b3c380fb966ac11ef3196bd253849273c5a129e1cfe2daec11d81" + sha256 cellar: :any_skip_relocation, sonoma: "e0bfb4590e4ed67783d07008166e55a110f77f466ca4bc213e46d6da64d7f84b" + sha256 cellar: :any_skip_relocation, ventura: "3b7f30508d20583c20c986afaece33d669f9380e79cdde2793c41a9b3fde0e9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "475ccca123e3cd0593237f8e7ad0bff2b6b0e1cfb29b3d40950ff279790280cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42967910c00046d764d281458105af646720163beb854aa14aa8740fbd54ee8f" + end + + deprecate! date: "2025-09-20", because: :does_not_build + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"neverest", "completion") + system bin/"neverest", "manual", man1 + end + + test do + assert_match "neverest", shell_output("#{bin}/neverest --help") + + output = shell_output("#{bin}/neverest check 2>&1", 1) + assert_match "Cannot find existing configuration", output + end +end diff --git a/Formula/n/newlisp.rb b/Formula/n/newlisp.rb new file mode 100644 index 0000000000000..87e0f90933c27 --- /dev/null +++ b/Formula/n/newlisp.rb @@ -0,0 +1,59 @@ +class Newlisp < Formula + desc "Lisp-like, general-purpose scripting language" + homepage "http://www.newlisp.org/" + url "http://www.newlisp.org/downloads/newlisp-10.7.5.tgz" + sha256 "dc2d0ff651c2b275bc4af3af8ba59851a6fb6e1eaddc20ae75fb60b1e90126ec" + license "GPL-3.0-or-later" + + livecheck do + url "http://www.newlisp.org/index.cgi?Downloads" + regex(/href=.*?newlisp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cd0b1afe583ffbacd299097ba50acf21f8343d26301612afad78ce5ce18f56a6" + sha256 arm64_sequoia: "c650062494ac00fe19dc828930d6748e11cb89b40b8f9bb248425b7a8dec8cc7" + sha256 arm64_sonoma: "0e8d339d431c08f09ddf67a8dd660d483fd3938c0a59f8d7d829e1ead255014d" + sha256 arm64_ventura: "d09695295bc9ea5c143ab9dfb53757b6e932e71139247b3083df2fb47361d76f" + sha256 arm64_monterey: "1fb90e4713da55257988e767547c82613586e3a441e007a629e878644955cc89" + sha256 arm64_big_sur: "24b3c02002fa7c832d9a817c552b19bd520ae06f82ab526b8e993ae0a3d77d99" + sha256 sonoma: "c93f69c7ac6f198414614637a6096a33fe9141eff9c163f5fb3db50f297fd441" + sha256 ventura: "bd14b986d863616e21e87c3be80588f2e085c7e0ba6dde2021a86b3d362df0e0" + sha256 monterey: "e7e6ab4d066923848b35a24c5a85cb357be0ab15d76fc9dbe5c87e2625c18b1a" + sha256 big_sur: "509f6892a0eabf53cebe424f2f2163ded090b7942e8fe8e43047f43781b0535e" + sha256 catalina: "62fd116459d24ab0db976221fb16fd83a7a7db5447298bcc7f8b0dbf9a55f91f" + sha256 arm64_linux: "edfae18568fbac79130190be9410e674c4955be13f666e19b5dd5a1782633ea8" + sha256 x86_64_linux: "27f5be3e4e9319afe264a0394127ddbfdaf6d4f8da25b790af9b25d559c23c13" + end + + depends_on "readline" + + def install + # Required to use our configuration + ENV.append_to_cflags "-DNEWCONFIG -c" + + system "./configure-alt", "--prefix=#{prefix}", "--mandir=#{man}" + system "make" + system "make", "check" + system "make", "install" + end + + def caveats + <<~EOS + If you have brew in a custom prefix, the included examples + will need to be be pointed to your newlisp executable. + EOS + end + + test do + path = testpath/"test.lsp" + path.write <<~EOS + (println "hello") + (exit 0) + EOS + + assert_equal "hello\n", shell_output("#{bin}/newlisp #{path}") + end +end diff --git a/Formula/n/newman.rb b/Formula/n/newman.rb new file mode 100644 index 0000000000000..a2493862d43ed --- /dev/null +++ b/Formula/n/newman.rb @@ -0,0 +1,61 @@ +class Newman < Formula + desc "Command-line collection runner for Postman" + homepage "https://www.getpostman.com" + url "https://registry.npmjs.org/newman/-/newman-6.2.1.tgz" + sha256 "38e457fafaadb7b4ff79f5669306bb8504223c4041cf5e5b6fc592f355af7a0e" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "293d0a0e52c8d5c1e3ddebee286788baa6329839f4e664ee12240f7c80b28831" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + path = testpath/"test-collection.json" + path.write <<~JSON + { + "info": { + "_postman_id": "db95eac2-6e1c-48c0-8c3a-f83c5341d4dd", + "name": "Homebrew", + "description": "Homebrew formula test", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "httpbin-get", + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "https://httpbin.org/get", + "protocol": "https", + "host": [ + "httpbin", + "org" + ], + "path": [ + "get" + ] + } + }, + "response": [] + } + ] + } + JSON + + assert_match "newman", shell_output("#{bin}/newman run #{path}") + assert_equal version.to_s, shell_output("#{bin}/newman --version").strip + end +end diff --git a/Formula/n/newrelic-cli.rb b/Formula/n/newrelic-cli.rb new file mode 100644 index 0000000000000..aba3a72e3c338 --- /dev/null +++ b/Formula/n/newrelic-cli.rb @@ -0,0 +1,40 @@ +class NewrelicCli < Formula + desc "Command-line interface for New Relic" + homepage "https://github.com/newrelic/newrelic-cli" + url "https://github.com/newrelic/newrelic-cli/archive/refs/tags/v0.106.2.tar.gz" + sha256 "7880d18c6a022314a031219d48b22abe017097bfd1cc2c35c7bdab5dfc26b7d5" + license "Apache-2.0" + head "https://github.com/newrelic/newrelic-cli.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d7764b48c323970e65917e47b4790bd6d56be2f6cb84d0f311dea6a57c574a34" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6f7e2949fe41cec7817d004228858f20351896116a644a2265ba27414a595aad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d41460ecb9a085fd726711298ef9d0bb37db222c80daaa5544e7c25ca6f1aed" + sha256 cellar: :any_skip_relocation, sonoma: "4e421495aab6d1ba6ee6bf5c93c0c97e9cc0441ea80f09ebc04ddec57623bafa" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e7db8130b7f67e165532a372878c822b7187c451dcd70a75060aa7f4aa4acf5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5101c76e219c281edde76156276646435bb0db58f278c0c2ee8f1afd4ce17f9" + end + + depends_on "go" => :build + + def install + ENV["PROJECT_VER"] = version + system "make", "compile-only" + bin.install "bin/#{OS.kernel_name.downcase}/newrelic" + + generate_completions_from_executable(bin/"newrelic", "completion", "--shell") + end + + test do + output = shell_output("#{bin}/newrelic config list") + + assert_match "loglevel", output + assert_match "plugindir", output + assert_match version.to_s, shell_output("#{bin}/newrelic version 2>&1") + end +end diff --git a/Formula/n/newrelic-infra-agent.rb b/Formula/n/newrelic-infra-agent.rb new file mode 100644 index 0000000000000..8cf607bbca658 --- /dev/null +++ b/Formula/n/newrelic-infra-agent.rb @@ -0,0 +1,58 @@ +class NewrelicInfraAgent < Formula + desc "New Relic infrastructure agent" + homepage "https://github.com/newrelic/infrastructure-agent" + url "https://github.com/newrelic/infrastructure-agent.git", + tag: "1.71.0", + revision: "a2ce32e5cf2869d3d1abff9e8e29640813e3c034" + license "Apache-2.0" + head "https://github.com/newrelic/infrastructure-agent.git", branch: "master" + + # Upstream sometimes creates a tag with a stable version format but marks it + # as pre-release on GitHub. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6f2c691c1123522b5429247e76cfd237ad409ccec144dd22bc1c300015693fb0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3625b9720d55ac174f12dd134f63b332e8362bd66e0858990dcc38d5cfac41c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "630a48630f94a25082acdd913f677ce028c3f83eabc6873b82319a0b00446771" + sha256 cellar: :any_skip_relocation, sonoma: "892dcab0aee9de692e16244a0aa4913665ba4bdf3eb27102d8211d77be118766" + sha256 cellar: :any_skip_relocation, arm64_linux: "0836884a48643ac420a9c48beb45624767517719ec2be1d043fc74974eda3d07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "308a05a8a12d27c2de2b3c6586ecbc63350cb5aa6fd13d24d609bf93c58492a8" + end + + depends_on "go" => :build + + def install + goarch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + os = OS.kernel_name.downcase + ENV["VERSION"] = version.to_s + ENV["GOOS"] = os + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ENV["GOARCH"] = goarch + + system "make", "dist-for-os" + bin.install "dist/#{os}-newrelic-infra_#{os}_#{goarch}/newrelic-infra" + bin.install "dist/#{os}-newrelic-infra-ctl_#{os}_#{goarch}/newrelic-infra-ctl" + bin.install "dist/#{os}-newrelic-infra-service_#{os}_#{goarch}/newrelic-infra-service" + (var/"db/newrelic-infra").install "assets/licence/LICENSE.macos.txt" if OS.mac? + end + + def post_install + (etc/"newrelic-infra").mkpath + (var/"log/newrelic-infra").mkpath + end + + service do + run [opt_bin/"newrelic-infra-service", "-config", etc/"newrelic-infra/newrelic-infra.yml"] + log_path var/"log/newrelic-infra/newrelic-infra.log" + error_log_path var/"log/newrelic-infra/newrelic-infra.stderr.log" + end + + test do + output = shell_output("#{bin}/newrelic-infra -validate") + assert_match "config validation", output + end +end diff --git a/Formula/n/newsboat.rb b/Formula/n/newsboat.rb new file mode 100644 index 0000000000000..ff0ad03057404 --- /dev/null +++ b/Formula/n/newsboat.rb @@ -0,0 +1,127 @@ +class Newsboat < Formula + desc "RSS/Atom feed reader for text terminals" + homepage "https://newsboat.org/" + license "MIT" + head "https://github.com/newsboat/newsboat.git", branch: "master" + + stable do + url "https://newsboat.org/releases/2.40/newsboat-2.40.tar.xz" + sha256 "1e656636009ffad3aeb87f8d0e4c36d2e913eac155b5f3ec85d00e8287b477c2" + + # Backport fix for Rust 1.89 + patch do + url "https://github.com/newsboat/newsboat/commit/3a018bbf88fef74d1af24c79f5d640c6d753ab16.patch?full_index=1" + sha256 "af1f0969b14ae80439e4e14c5126425221eabae285ba15eeb1c63980cd905612" + end + end + + bottle do + sha256 arm64_tahoe: "08e61ae78bb180d94bacfd18718e0ff22ec506c1fe3ddc66140ddf43342434fe" + sha256 arm64_sequoia: "62beb795654ad0e034cae9415b3d9762037dd5b7a6b084195338d66dfe12e5d4" + sha256 arm64_sonoma: "eaab1099251d9341a040788309e8de0cd3a2210eb45b8feaa15dd96303c3ad94" + sha256 arm64_ventura: "00456fdf96b6cf458a1ef3e68343ded5c41f4c41dea5af060c477c782b74e535" + sha256 sonoma: "a1f9d6d589a29fcead823ff5598eac302898403c3faa4936eb946224fa05a16a" + sha256 ventura: "c0f4e28fdd96b4e278f37f97ba42376a3fd896e938904e28e971d232c0663b5a" + sha256 arm64_linux: "a00dbb6fe0ed510fd078d1690c6a64881f674ac2af943e944ca1895d3282246a" + sha256 x86_64_linux: "c9ec61ffc627d29d3a32c984db34f6ae4cc641804b37aeb2b0b5918fb59aceec" + end + + depends_on "asciidoctor" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "xz" => :build + depends_on "gettext" + depends_on "json-c" + + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "ncurses" + uses_from_macos "sqlite" + + on_macos do + depends_on "make" => :build + end + + on_tahoe do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version == 1700 + + fails_with :clang do + build 1700 + cause "https://github.com/llvm/llvm-project/issues/142118" + end + end + + # Newsboat have their own libstfl fork. Upstream libsftl is gone: + # https://github.com/Homebrew/homebrew-core/pull/89981 + # They do not want to be the new upstream, but use that fork as a temporary + # workaround until they migrate to some rust crate + # https://github.com/newsboat/newsboat/issues/232 + resource("libstfl") do + url "https://github.com/newsboat/stfl.git", + revision: "bbb2404580e845df2556560112c8aefa27494d66" + end + + def install + resource("libstfl").stage do + if OS.mac? + ENV.append "LDLIBS", "-liconv" + ENV.append "LIBS", "-lncurses -lruby -liconv" + + inreplace "stfl_internals.h", "ncursesw/ncurses.h", "ncurses.h" + inreplace %w[stfl.pc.in ruby/Makefile.snippet], "ncursesw", "ncurses" + + inreplace "Makefile" do |s| + s.gsub! "ncursesw", "ncurses" + s.gsub! "-Wl,-soname,$(SONAME)", "-Wl" + s.gsub! "libstfl.so.$(VERSION)", "libstfl.$(VERSION).dylib" + s.gsub! "libstfl.so", "libstfl.dylib" + end + + # Fix ncurses linkage for Perl bundle + inreplace "perl5/Makefile.PL", "-lncursesw", "-L#{MacOS.sdk_path}/usr/lib -lncurses" + else + ENV.append "LIBS", "-lncursesw -lruby" + inreplace "Makefile", "$(LDLIBS) $^", "$^ $(LDLIBS)" + end + + # Fix "call to undeclared function 'wget_wch'". + ENV.append_to_cflags "-D_XOPEN_SOURCE_EXTENDED=1" + + # Fails race condition of test: + # ImportError: dynamic module does not define init function (init_stfl) + # make: *** [python/_stfl.so] Error 1 + ENV.deparallelize do + system "make" + system "make", "install", "prefix=#{libexec}" + end + + cp (libexec/"lib/libstfl.so"), (libexec/"lib/libstfl.so.0") if OS.linux? + end + + gettext = Formula["gettext"] + + ENV["GETTEXT_BIN_DIR"] = gettext.opt_bin.to_s + ENV["GETTEXT_LIB_DIR"] = gettext.lib.to_s + ENV["GETTEXT_INCLUDE_DIR"] = gettext.include.to_s + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + # Remove once libsftl is not used anymore + ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" + ENV.append "LDFLAGS", "-Wl,-rpath,#{libexec}/lib" + + # Work around Apple's ncurses5.4-config outputting -lncursesw + if OS.mac? && MacOS.version >= :sonoma + system "gmake", "config", "prefix=#{prefix}" + inreplace "config.mk", "-lncursesw", "-lncurses" + end + + # Call `make` as `gmake` to use Homebrew `make`. + system "gmake", "install", "prefix=#{prefix}" + end + + test do + (testpath/"urls.txt").write "https://github.blog/subscribe/" + assert_match "Newsboat - Exported Feeds", shell_output("LC_ALL=C #{bin}/newsboat -e -u urls.txt") + end +end diff --git a/Formula/n/newsraft.rb b/Formula/n/newsraft.rb new file mode 100644 index 0000000000000..ca5dd72b87744 --- /dev/null +++ b/Formula/n/newsraft.rb @@ -0,0 +1,39 @@ +class Newsraft < Formula + desc "Terminal feed reader" + homepage "https://codeberg.org/newsraft/newsraft" + url "https://codeberg.org/newsraft/newsraft/archive/newsraft-0.34.tar.gz" + sha256 "8d55441ddfc2e7d49ad3ff36c384ad4c1533de97d92a9fcaf3f6753b49b37c7c" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0503f56ec8df91c2409370bbd1e4bb6a4fe1bb7b548f7c6a5027131c4e1fd069" + sha256 cellar: :any, arm64_sequoia: "9c5b76e287744cb22b88c329d7d4efd68c003318e15ccaa4769d46b249c7f89d" + sha256 cellar: :any, arm64_sonoma: "e64d69519df37f57f796f6ae387ee3b5e8a0d79bc87d48bb42a3ff3e6a0965c3" + sha256 cellar: :any, sonoma: "fc236bce58fb28f56e1f764323bdbdde38da104f9c4aee981ce5733b785b5eee" + sha256 cellar: :any_skip_relocation, arm64_linux: "b43f6a0257ee551eee06a888208a2294e5febc7ccd4b80110f91f9b8c2788b2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34f94f14616c1fe0f6d7ae4c5ba9dda5f13af30acd2e550646c82ade823731f1" + end + + depends_on "scdoc" => :build + depends_on "gumbo-parser" + + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "sqlite" + + def install + # On macOS `_XOPEN_SOURCE` masks cfmakeraw() / SIGWINCH; override FEATURECFLAGS. + featureflags = "-D_DEFAULT_SOURCE -D_BSD_SOURCE" + featureflags << " -D_DARWIN_C_SOURCE" if OS.mac? + + system "make", "FEATURECFLAGS=#{featureflags}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/newsraft -v 2>&1") + + system "#{bin}/newsraft -l test 2>&1 || :" + assert_match "[INFO] Okay... Here we go", File.read("test") + end +end diff --git a/Formula/n/newt.rb b/Formula/n/newt.rb new file mode 100644 index 0000000000000..fad363ebad741 --- /dev/null +++ b/Formula/n/newt.rb @@ -0,0 +1,72 @@ +class Newt < Formula + desc "Library for color text mode, widget based user interfaces" + homepage "https://pagure.io/newt" + url "https://releases.pagure.org/newt/newt-0.52.25.tar.gz" + sha256 "ef0ca9ee27850d1a5c863bb7ff9aa08096c9ed312ece9087b30f3a426828de82" + license "LGPL-2.0-or-later" + revision 1 + + livecheck do + url "https://releases.pagure.org/newt/" + regex(/href=.*?newt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "aa18d4ccbf4acef83986a3b12ba9a530ba02cf6b6c84d88865e2e838ce4288a8" + sha256 cellar: :any, arm64_sequoia: "0fa5a58b27113fbc099d7fde9a289fb4951ceeec4a05ea231d9cdaf3be1d0718" + sha256 cellar: :any, arm64_sonoma: "ea2c081bd723fcca5ce9c754a795c59a8f9077e299b54eb310a955b6c261c33f" + sha256 cellar: :any, sonoma: "2c60203dd3204211de30dc48baaf246fc11aaa7e653805b31bc381bdd650cc04" + sha256 cellar: :any_skip_relocation, arm64_linux: "364d416e80eb3bd0c3b0985abcb98191445397cffa5cd3c5161626d3ee632990" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b360a1c7abe35cfa3382b5ac27ec36d2a28264fd2c62285ecfbac2bd0fe12de" + end + + depends_on "popt" + depends_on "python@3.14" + depends_on "s-lang" + + on_macos do + depends_on "gettext" + end + + def python3 + "python3.14" + end + + def install + inreplace "Makefile.in" do |s| + if OS.mac? + # name libraries correctly + # https://bugzilla.redhat.com/show_bug.cgi?id=1192285 + s.gsub! "libnewt.$(SOEXT).$(SONAME)", "libnewt.$(SONAME).dylib" + s.gsub! "libnewt.$(SOEXT).$(VERSION)", "libnewt.$(VERSION).dylib" + + # don't link to libpython.dylib + # causes https://github.com/Homebrew/homebrew/issues/30252 + # https://bugzilla.redhat.com/show_bug.cgi?id=1192286 + s.gsub! "`$$pyconfig --ldflags --embed || $$pyconfig --ldflags`", '"-undefined dynamic_lookup"' + end + + # install python modules in Cellar rather than global site-packages + s.gsub! "`$$ver -c \"import sysconfig; print(sysconfig.get_path('platlib'))\"`", + "#{lib}/#{python3}/site-packages" + end + + system "./configure", "--prefix=#{prefix}", "--without-tcl", "--with-python=#{python3}" + system "make", "install" + end + + test do + ENV["TERM"] = "xterm" + system python3, "-c", "import snack" + + (testpath/"test.c").write <<~C + #import + int main() { + newtInit(); + newtFinished(); + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lnewt" + system "./test" + end +end diff --git a/Formula/n/nextdns.rb b/Formula/n/nextdns.rb new file mode 100644 index 0000000000000..623182e1e4d6c --- /dev/null +++ b/Formula/n/nextdns.rb @@ -0,0 +1,41 @@ +class Nextdns < Formula + desc "CLI for NextDNS's DNS-over-HTTPS (DoH)" + homepage "https://nextdns.io" + url "https://github.com/nextdns/nextdns/archive/refs/tags/v1.46.0.tar.gz" + sha256 "4260824fc20d9d15956c681e6c2025a097f3d350c6dd03dca662f5bbc12bcacc" + license "MIT" + head "https://github.com/nextdns/nextdns.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d31d85ac7c1b07cd591db0e152b19bb24f0ca19c0c4caee04446a8836bb9115d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f672ae407065c3ef101887a756ddd985f30cb626266204a4790224bd63aec4e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "141b5b861acf7888d241c18f83d2636596f7f6f0c68f90ad081c8a9f58e7b18e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf3fbb66344f1ed946878fed8e595a9e8c3f208c25ced6b89c2e3dc510c10d9d" + sha256 cellar: :any_skip_relocation, sonoma: "19a58a90339973be0450f4c7edfbf8667f04f19d2212bc999b2f4fe1035d98b7" + sha256 cellar: :any_skip_relocation, ventura: "6c73488ba8fdb273712fb7cf9c14d0743228845ac67459fe3a4163083c33e9e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dfc718c32615c7d565d27ab62ba9d5472f8304ad7128714e1bd5a5529320193" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9fc4d299d13dec764c87e745d9eb3a597d5fa47734727fe05bfb9b0ea1e5e62" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/nextdns version") + + # Requires root to start + output = if OS.mac? + "Error: permission denied" + else + "Error: service nextdns start: exit status 1: nextdns: unrecognized service" + end + assert_match output, shell_output("#{bin}/nextdns start 2>&1", 1) + end +end diff --git a/Formula/n/nextflow.rb b/Formula/n/nextflow.rb new file mode 100644 index 0000000000000..24d3b5a969c5b --- /dev/null +++ b/Formula/n/nextflow.rb @@ -0,0 +1,57 @@ +class Nextflow < Formula + desc "Reproducible scientific workflows" + homepage "https://nextflow.io" + url "https://github.com/nextflow-io/nextflow/archive/refs/tags/v25.10.0.tar.gz" + sha256 "124bb52f281159d2b60983a58d505bb8a85c2e1726f85338ea197e08268c7f5f" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "87eeaa6fb715b56bb62d7e930d2096d260780c1d7148b15368f44177cbea359a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1fc4f3d1978f211b9a6e28f689b75a98fa97ff975a9569837b19a06d8e921b25" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7ab5a73bfd8359baa33bb3153a1bc2ad270b5b14d84ea8c24f1d3057cdc90f5" + sha256 cellar: :any_skip_relocation, sonoma: "72d88010882e4eec672c3c7ee4bd0c476a8e09b41535d7a948c853f6f01bc991" + sha256 cellar: :any_skip_relocation, arm64_linux: "76422087bc55bcf7fd6ce5275e0ff455b5ba42b1a67fd3a140029f680d4aafc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c42f136e27541fcda577c76e56f521ccf708a601b4768664af40ae93bb079988" + end + + depends_on "gradle" => :build + depends_on "openjdk" + + def install + ENV["BUILD_PACK"] = "1" + + system "gradle", "pack", "--no-daemon", "-x", "test" + libexec.install "build/releases/nextflow-#{version}-dist" => "nextflow" + + (bin/"nextflow").write_env_script libexec/"nextflow", Language::Java.overridable_java_home_env + end + + test do + (testpath/"hello.nf").write <<~EOS + process hello { + publishDir "results", mode: "copy" + + output: + path "hello.txt" + + script: + """ + echo 'Hello!' > hello.txt + """ + } + workflow { + hello() + } + EOS + + system bin/"nextflow", "run", "hello.nf" + + assert_path_exists testpath/"results/hello.txt" + assert_match "Hello!", (testpath/"results/hello.txt").read + end +end diff --git a/Formula/n/nexttrace.rb b/Formula/n/nexttrace.rb new file mode 100644 index 0000000000000..ccc5d167eb40c --- /dev/null +++ b/Formula/n/nexttrace.rb @@ -0,0 +1,55 @@ +class Nexttrace < Formula + desc "Open source visual route tracking CLI tool" + homepage "https://www.nxtrace.org/" + url "https://github.com/nxtrace/NTrace-core/archive/refs/tags/v1.4.2.tar.gz" + sha256 "ab9f91320f16673dbf450ed3c1790eb4e4786934a1f5a0817eb82a582f09d1eb" + license "GPL-3.0-only" + head "https://github.com/nxtrace/NTrace-core.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "955b248f7fcd1ffa54b0a6e42afd32a50f2887221fea8bcb59c77c289e623315" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2c39329e18e617f4648808d9902bc5031ba3dd5f47381ccd9f0adb47a29285e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2c39329e18e617f4648808d9902bc5031ba3dd5f47381ccd9f0adb47a29285e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2c39329e18e617f4648808d9902bc5031ba3dd5f47381ccd9f0adb47a29285e" + sha256 cellar: :any_skip_relocation, sonoma: "4318b378fe0ac302f48bbe6d238cce3ae2883eea0e6e3bda5c8142dab338c466" + sha256 cellar: :any_skip_relocation, ventura: "4318b378fe0ac302f48bbe6d238cce3ae2883eea0e6e3bda5c8142dab338c466" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b1fcfaa4e2235048fc9312281689b017ed5ff8ad95ee7009f4833b80b29a459" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2052e55da0989f32bd688d2fc5ca9975ec5e6ccc8ef9d7cc0e6da236d687d79b" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/nxtrace/NTrace-core/config.Version=#{version} + -X github.com/nxtrace/NTrace-core/config.CommitID=brew + -X github.com/nxtrace/NTrace-core/config.BuildDate=#{time.iso8601} + -checklinkname=0 + ] + # checklinkname=0 is a workaround for Go >= 1.23, see https://github.com/nxtrace/NTrace-core/issues/247 + system "go", "build", *std_go_args(ldflags:) + end + + def caveats + <<~EOS + nexttrace requires root privileges so you will need to run `sudo nexttrace `. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + # requires `sudo` for linux + return_status = OS.mac? ? 0 : 1 + output = shell_output("#{bin}/nexttrace --language en 1.1.1.1 2>&1", return_status) + assert_match "[NextTrace API]", output + assert_match version.to_s, shell_output("#{bin}/nexttrace --version") + end +end diff --git a/Formula/n/nexus.rb b/Formula/n/nexus.rb new file mode 100644 index 0000000000000..724407c3e766a --- /dev/null +++ b/Formula/n/nexus.rb @@ -0,0 +1,142 @@ +class Nexus < Formula + desc "Repository manager for binary software components" + homepage "https://www.sonatype.com/" + url "https://github.com/sonatype/nexus-public.git", + tag: "release-3.80.0-06", + revision: "74aa87dcd43439ef2b69d0a5e49d5522b7944261" + license "EPL-1.0" + + # As of writing, upstream is publishing both v2 and v3 releases. The "latest" + # release on GitHub isn't reliable, as it can point to a release from either + # one of these major versions depending on which was published most recently. + livecheck do + url :stable + regex(/^(?:release[._-])?v?(\d+(?:[.-]\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "07773732d1f3f0bad1b9fc87001426ab1ada985415b4696df44b938dc93d764f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8a3fd80c8008fd25205fb318ee06ae801a7d74d969b1d6f06bf5e7c2fb62b4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41d2feb6e85f4df82192cf62afdb21e93bf5ea79b8fc163f9d297d4a440f8c39" + sha256 cellar: :any_skip_relocation, arm64_ventura: "939834966728216f77cd05f37e7be1d40e803615792cbc94510880e22be58514" + sha256 cellar: :any_skip_relocation, sonoma: "b368f0bd961164f00b33c38de70810cf24091f457dcfaf96bcbf41ac10102df9" + sha256 cellar: :any_skip_relocation, ventura: "1317def65ab1ab74b617e15c16918e3d1eed2bd974007049d942d96ced029a7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bd720dbef91a776d339d8a3dfd14a4f960a01a40f9388a5503c1c285da8f8be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5dae4e536f76bf9badb1b6989d8d2a671009767a8324f16b81748471d6fdf2a" + end + + depends_on "maven" => :build + depends_on "node" => :build + depends_on "yarn" => :build + depends_on "openjdk@17" + + uses_from_macos "unzip" => :build + + # Avoid downloading copies of node and yarn + patch :DATA + + def install + # Workaround build error: Couldn't find package "@sonatype/nexus-ui-plugin@workspace:*" + # Ref: https://github.com/sonatype/nexus-public/issues/417 + # Ref: https://github.com/sonatype/nexus-public/issues/432#issuecomment-2663250153 + inreplace ["components/nexus-rapture/package.json", "plugins/nexus-coreui-plugin/package.json"], + '"@sonatype/nexus-ui-plugin": "workspace:*"', + '"@sonatype/nexus-ui-plugin": "*"' + + java_version = "17" + ENV["JAVA_HOME"] = Language::Java.java_home(java_version) + java_env = Language::Java.overridable_java_home_env(java_version) + java_env.merge!(KARAF_DATA: "${NEXUS_KARAF_DATA:-#{var}/nexus}", + KARAF_LOG: var/"log/nexus", + KARAF_ETC: pkgetc) + + with_env(SKIP_YARN_COREPACK_CHECK: "1") do + system "yarn", "install", "--immutable" + system "yarn", "workspaces", "run", "build-all" + end + + system "mvn", "install", "-DskipTests", "-Dpublic" + + assembly = "assemblies/nexus-repository-core/target/assembly" + rm(Dir["#{assembly}/bin/*.bat"]) + libexec.install Dir["#{assembly}/*"] + chmod "+x", Dir["#{libexec}/bin/*"] + (bin/"nexus").write_env_script libexec/"bin/nexus", java_env + end + + def post_install + (var/"log/nexus").mkpath unless (var/"log/nexus").exist? + (var/"nexus").mkpath unless (var/"nexus").exist? + pkgetc.mkpath unless pkgetc.exist? + end + + service do + run [opt_bin/"nexus", "start"] + end + + test do + port = free_port + (testpath/"data/etc/nexus.properties").write "application-port=#{port}" + pid = spawn({ "NEXUS_KARAF_DATA" => testpath/"data" }, bin/"nexus", "server") + sleep 50 + sleep 50 if OS.mac? && Hardware::CPU.intel? + assert_match "Sonatype Nexus Repository", shell_output("curl --silent --fail http://localhost:#{port}") + ensure + Process.kill "TERM", pid + Process.wait pid + end +end + +__END__ +diff --git a/plugins/nexus-coreui-plugin/pom.xml b/plugins/nexus-coreui-plugin/pom.xml +index 9b8325fd98..2a58a07afe 100644 +--- a/plugins/nexus-coreui-plugin/pom.xml ++++ b/plugins/nexus-coreui-plugin/pom.xml +@@ -172,7 +172,7 @@ + karaf-maven-plugin + + +- ++ + + + +diff --git a/pom.xml b/pom.xml +index 6647497628..d99148b421 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -877,7 +877,7 @@ + + + +- ++ + + + com.mycila diff --git a/Formula/n/nfcutils.rb b/Formula/n/nfcutils.rb new file mode 100644 index 0000000000000..7005c49950dba --- /dev/null +++ b/Formula/n/nfcutils.rb @@ -0,0 +1,36 @@ +class Nfcutils < Formula + desc "Near Field Communication (NFC) tools under POSIX systems" + homepage "https://github.com/nfc-tools/nfcutils" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/nfc-tools/nfcutils-0.3.2.tar.gz" + sha256 "dea258774bd08c8b7ff65e9bed2a449b24ed8736326b1bb83610248e697c7f1b" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cd0945f758948d322f434b25388ca838233019379db9edad5ef599278141c020" + sha256 cellar: :any, arm64_sequoia: "588fdde98a8a04e2641697c4b881cc1ec3ef7ad1cc2f57d83f93769d9e9331a0" + sha256 cellar: :any, arm64_sonoma: "abdbfc77ca2f19a173b44455a7b82cae8849449fc2eda51f9248e140d5954bb8" + sha256 cellar: :any, arm64_ventura: "5f52daea8355a598eb9226fb170019d92e831ad54dbc11eea3473a42ad34262c" + sha256 cellar: :any, arm64_monterey: "d502000cd5655c0ec554e4789b846582cc8421bf69a79d1df7ffaeb0f497af9c" + sha256 cellar: :any, arm64_big_sur: "257b8265cf3e136dd2a11c3b26b37f31cc3de371d97401a5fadaf1681330fbd8" + sha256 cellar: :any, sonoma: "1e0bcfcb6a8ad40fafb7be38c45c7905609524b257a5ceed3cb1f67f0968d53d" + sha256 cellar: :any, ventura: "a2675c309347279b2a0373bea9335e99bdb45973c53c95420f120a8e168114b8" + sha256 cellar: :any, monterey: "835a1d70f054d1eb3a05947f085331948024d3b2daa75dd7fd8e46e2ec84f9e0" + sha256 cellar: :any, big_sur: "ae40ef6e8f1d98d6fc6114893715c713c28e0747a5c5a84779c89726970f8a95" + sha256 cellar: :any, catalina: "963e5bf77bc285e81b9f7480f8b0362c73e5138bced77608043742df6e0992cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb215212d949d51cb4ce91f1640ae5ad575ffa0167db19726eddf9c0a7fe4d67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f32645957380142c3180b1c67f9afb4170caa582aae8e0500731700d170dbc6" + end + + depends_on "pkgconf" => :build + depends_on "libnfc" + depends_on "libusb" + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end +end diff --git a/Formula/n/nfdump.rb b/Formula/n/nfdump.rb new file mode 100644 index 0000000000000..40dfa9ace18f1 --- /dev/null +++ b/Formula/n/nfdump.rb @@ -0,0 +1,39 @@ +class Nfdump < Formula + desc "Tools to collect and process netflow data on the command-line" + homepage "https://github.com/phaag/nfdump" + url "https://github.com/phaag/nfdump/archive/refs/tags/v1.7.6.tar.gz" + sha256 "2d25220d7a48f57ba65f228fb5d2eb4d2a0ab2b352a037ed6249b39cf68c1b9a" + license "BSD-3-Clause" + head "https://github.com/phaag/nfdump.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1c8196b99f94ef7e3b9c2817d183b1073812259cacf274474c079c7a0d9626a4" + sha256 cellar: :any, arm64_sequoia: "70ed181f2802d7cef5d7f2b1bd84f77230d583e2c9e3e10d3258ee467f38000d" + sha256 cellar: :any, arm64_sonoma: "7f23722b7a4f8181d40180fb42841a1ebd86230b9322cd050acbaea2ff90db2d" + sha256 cellar: :any, arm64_ventura: "424411e0768b194b1a4f3bc6d8e82b672cb3b4a6157e8f7aeeeaf200c4fcad46" + sha256 cellar: :any, sonoma: "7b3e11f6b9a6d47040b63dbb735a7a507159e9c2aa285c54eed261850222657c" + sha256 cellar: :any, ventura: "2f1facb7bf72b6f485cbf93893eef1900d53390e818dbd9058939d44c897d88c" + sha256 cellar: :any_skip_relocation, arm64_linux: "076f868834aad8744276bf4188882d734cd95a4a385bd508fef97ee28b427727" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb8802b9818c72c36612ab68ee6058611588998eb2e2eb570608acfa1a05086d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "bzip2" + uses_from_macos "libpcap" + + def install + system "./autogen.sh" + system "./configure", "--enable-readpcap", "LEXLIB=", *std_configure_args + system "make", "install" + end + + test do + system bin/"nfdump", "-Z", "host 8.8.8.8" + end +end diff --git a/Formula/n/nfpm.rb b/Formula/n/nfpm.rb new file mode 100644 index 0000000000000..3577651a516c2 --- /dev/null +++ b/Formula/n/nfpm.rb @@ -0,0 +1,47 @@ +class Nfpm < Formula + desc "Simple deb and rpm packager" + homepage "https://nfpm.goreleaser.com/" + url "https://github.com/goreleaser/nfpm/archive/refs/tags/v2.43.4.tar.gz" + sha256 "7df017567b12364cfadefa78d59909ae0a3672f760c4c0a8ab5b15df40dfbd27" + license "MIT" + head "https://github.com/goreleaser/nfpm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9b367b659ea41f27e5fcc41878fad3cfe7e73a6a4043569e8bb53fa7450a560" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9b367b659ea41f27e5fcc41878fad3cfe7e73a6a4043569e8bb53fa7450a560" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9b367b659ea41f27e5fcc41878fad3cfe7e73a6a4043569e8bb53fa7450a560" + sha256 cellar: :any_skip_relocation, sonoma: "e7141c98a56a8ce6bf246b57336229e8931bdcd3a27a1940f6b98e5659a0f9f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "1526ec819aaf209da00da1d0099410308f3b786dfc10309898eed249e1838e56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a67d52167dd13f4a151ef400dc47198c11cede36d49680bae1757695baad600" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=v#{version}"), "./cmd/nfpm" + + generate_completions_from_executable(bin/"nfpm", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nfpm --version 2>&1") + + system bin/"nfpm", "init" + assert_match "This is an example nfpm configuration file", File.read(testpath/"nfpm.yaml") + + # remove the generated default one + # and use stubbed one for another test + File.delete(testpath/"nfpm.yaml") + (testpath/"nfpm.yaml").write <<~YAML + name: "foo" + arch: "amd64" + platform: "linux" + version: "v1.0.0" + section: "default" + priority: "extra" + YAML + + system bin/"nfpm", "pkg", "--packager", "deb", "--target", "." + assert_path_exists testpath/"foo_1.0.0_amd64.deb" + end +end diff --git a/Formula/n/nftables.rb b/Formula/n/nftables.rb new file mode 100644 index 0000000000000..4f4c18718e283 --- /dev/null +++ b/Formula/n/nftables.rb @@ -0,0 +1,43 @@ +class Nftables < Formula + include Language::Python::Virtualenv + + desc "Netfilter tables userspace tools" + homepage "https://netfilter.org/projects/nftables/" + url "https://www.netfilter.org/pub/nftables/nftables-1.1.5.tar.xz" + sha256 "1daf10f322e14fd90a017538aaf2c034d7cc1eb1cc418ded47445d714ea168d4" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.netfilter.org/projects/nftables/downloads.html" + regex(/href=.*?nftables[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_linux: "5e00516cc3b2c2913b7951be59528c172b0f08b1d647c1aed03077dac8c6f59a" + sha256 x86_64_linux: "f57bf4df87b43a03ec87de442f592413521a03b39a5553bc1e493afa90778ffd" + end + + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "gmp" + depends_on "jansson" + depends_on "libedit" + depends_on "libmnl" + depends_on "libnftnl" + depends_on :linux + depends_on "ncurses" + depends_on "readline" + + def install + venv = virtualenv_create(libexec, "python3.14") + system "./configure", "--disable-silent-rules", + "--with-python-bin=#{venv.root}/bin/python3", + *std_configure_args + system "make", "install" + end + + test do + assert_match "Operation not permitted (you must be root)", shell_output("#{sbin}/nft list tables 2>&1", 1) + end +end diff --git a/Formula/n/nghttp2.rb b/Formula/n/nghttp2.rb new file mode 100644 index 0000000000000..feb5682a9410b --- /dev/null +++ b/Formula/n/nghttp2.rb @@ -0,0 +1,83 @@ +class Nghttp2 < Formula + desc "HTTP/2 C Library" + homepage "https://nghttp2.org/" + url "https://github.com/nghttp2/nghttp2/releases/download/v1.68.0/nghttp2-1.68.0.tar.gz" + mirror "http://fresh-center.net/linux/www/nghttp2-1.68.0.tar.gz" + sha256 "2c16ffc588ad3f9e2613c3fad72db48ecb5ce15bc362fcc85b342e48daf51013" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b7be3d515c9362428c703d65e45e0cc12394b2a2eca61f5feb398421ce1f2b72" + sha256 cellar: :any, arm64_sequoia: "c2c240b8ff5ed52921555bad20cfc5649332b254bfe98d62369f81bf7c6b64fe" + sha256 cellar: :any, arm64_sonoma: "96d45f2d2de69efd37ccd92f4195f8dd1e5812704f47f27775b6d6e659528c8a" + sha256 cellar: :any, sonoma: "a2127d1b956e99f06e395c1c11344a3d59e3bbfd31a3633d12d982b1a98c2a07" + sha256 cellar: :any_skip_relocation, arm64_linux: "a21f417bcbeb033c594478b3de4c559997420a378b334a3278766897a3da7983" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2fc15f87a76fe5088393c12dbfc1323696bbb5e43c5a86e2c66492777adc00fd" + end + + head do + url "https://github.com/nghttp2/nghttp2.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "c-ares" + depends_on "jemalloc" + depends_on "libev" + depends_on "libnghttp2" + depends_on macos: :sonoma # Needs C++20 features not available on Ventura + depends_on "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1500 + end + + fails_with :clang do + build 1500 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "11" + cause "Requires C++20 support" + end + + def install + # fix for clang not following C++14 behaviour + # https://github.com/macports/macports-ports/commit/54d83cca9fc0f2ed6d3f873282b6dd3198635891 + inreplace "src/shrpx_client_handler.cc", "return dconn;", "return std::move(dconn);" + + # Don't build nghttp2 library - use the previously built one. + inreplace "Makefile.in", /(SUBDIRS =) lib/, "\\1" + inreplace Dir["**/Makefile.in"] do |s| + # These don't exist in all files, hence audit_result being false. + s.gsub!(%r{^(LDADD = )\$[({]top_builddir[)}]/lib/libnghttp2\.la}, "\\1-lnghttp2", audit_result: false) + s.gsub!(%r{\$[({]top_builddir[)}]/lib/libnghttp2\.la}, "", audit_result: false) + end + + args = %w[ + --disable-silent-rules + --enable-app + --disable-examples + --disable-hpack-tools + --disable-python-bindings + --without-systemd + ] + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"nghttp", "-nv", "https://nghttp2.org" + refute_path_exists lib + end +end diff --git a/Formula/n/nginx.rb b/Formula/n/nginx.rb new file mode 100644 index 0000000000000..5f4f11a1f171e --- /dev/null +++ b/Formula/n/nginx.rb @@ -0,0 +1,181 @@ +class Nginx < Formula + desc "HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server" + homepage "https://nginx.org/" + # Use "mainline" releases only (odd minor version number), not "stable" + # See https://www.nginx.com/blog/nginx-1-12-1-13-released/ for why + url "https://nginx.org/download/nginx-1.29.3.tar.gz" + sha256 "9befcced12ee09c2f4e1385d7e8e21c91f1a5a63b196f78f897c2d044b8c9312" + license "BSD-2-Clause" + head "https://github.com/nginx/nginx.git", branch: "master" + + livecheck do + url :homepage + regex(%r{nginx[._-]v?(\d+(?:\.\d+)+)\nmainline version}i) + end + + bottle do + sha256 arm64_tahoe: "ef56c558d6340900aaba7718cb38d92cece20cf0511058d919be8e22fc0acbee" + sha256 arm64_sequoia: "38823ecb9be5056fa553894fe246995a59a397e162aeb586997f12f14b5380cc" + sha256 arm64_sonoma: "fa0fa6f743ddd68a0cec1b4e23c418aeb965fb2354f4ef36dbad0beeda92d42a" + sha256 sonoma: "f8e6d8b700d7052c9f55acf7b9a12d47b7ad89efce5f4c4c9a78b343907bcae4" + sha256 arm64_linux: "7b92a00937f993b32f3fa5df90fe0746880436e4a6e2716752c96ec290033115" + sha256 x86_64_linux: "b641b830f4b83f2ed1cff0bf2d36f8617980f9058a706759dcbb40196bb0cf81" + end + + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "xz" => :build + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def install + # keep clean copy of source for compiling dynamic modules e.g. passenger + (pkgshare/"src").mkpath + system "tar", "-cJf", (pkgshare/"src/src.tar.xz"), "." + + # Changes default port to 8080 + inreplace "conf/nginx.conf" do |s| + s.gsub! "listen 80;", "listen 8080;" + s.gsub! " #}\n\n}", " #}\n include servers/*;\n}" + end + + openssl = Formula["openssl@3"] + pcre = Formula["pcre2"] + + cc_opt = "-I#{pcre.opt_include} -I#{openssl.opt_include}" + ld_opt = "-L#{pcre.opt_lib} -L#{openssl.opt_lib}" + + args = %W[ + --prefix=#{prefix} + --sbin-path=#{bin}/nginx + --with-cc-opt=#{cc_opt} + --with-ld-opt=#{ld_opt} + --conf-path=#{etc}/nginx/nginx.conf + --pid-path=#{var}/run/nginx.pid + --lock-path=#{var}/run/nginx.lock + --http-client-body-temp-path=#{var}/run/nginx/client_body_temp + --http-proxy-temp-path=#{var}/run/nginx/proxy_temp + --http-fastcgi-temp-path=#{var}/run/nginx/fastcgi_temp + --http-uwsgi-temp-path=#{var}/run/nginx/uwsgi_temp + --http-scgi-temp-path=#{var}/run/nginx/scgi_temp + --http-log-path=#{var}/log/nginx/access.log + --error-log-path=#{var}/log/nginx/error.log + --with-compat + --with-debug + --with-http_addition_module + --with-http_auth_request_module + --with-http_dav_module + --with-http_degradation_module + --with-http_flv_module + --with-http_gunzip_module + --with-http_gzip_static_module + --with-http_mp4_module + --with-http_random_index_module + --with-http_realip_module + --with-http_secure_link_module + --with-http_slice_module + --with-http_ssl_module + --with-http_stub_status_module + --with-http_sub_module + --with-http_v2_module + --with-http_v3_module + --with-ipv6 + --with-mail + --with-mail_ssl_module + --with-pcre + --with-pcre-jit + --with-stream + --with-stream_realip_module + --with-stream_ssl_module + --with-stream_ssl_preread_module + ] + + (pkgshare/"src/configure_args.txt").write args.join("\n") + + if build.head? + system "./auto/configure", *args + else + system "./configure", *args + end + + system "make", "install" + if build.head? + man8.install "docs/man/nginx.8" + else + man8.install "man/nginx.8" + end + end + + def post_install + (etc/"nginx/servers").mkpath + (var/"run/nginx").mkpath + + # nginx's docroot is #{prefix}/html, this isn't useful, so we symlink it + # to #{HOMEBREW_PREFIX}/var/www. The reason we symlink instead of patching + # is so the user can redirect it easily to something else if they choose. + html = prefix/"html" + dst = var/"www" + + if dst.exist? + rm_r(html) + dst.mkpath + else + dst.dirname.mkpath + html.rename(dst) + end + + prefix.install_symlink dst => "html" + + # for most of this formula's life the binary has been placed in sbin + # and Homebrew used to suggest the user copy the plist for nginx to their + # ~/Library/LaunchAgents directory. So we need to have a symlink there + # for such cases + sbin.install_symlink bin/"nginx" if rack.subdirs.any? { |d| d.join("sbin").directory? } + end + + def caveats + <<~EOS + Docroot is: #{var}/www + + The default port has been set in #{etc}/nginx/nginx.conf to 8080 so that + nginx can run without sudo. + + nginx will load all files in #{etc}/nginx/servers/. + EOS + end + + service do + run [opt_bin/"nginx", "-g", "daemon off;"] + keep_alive false + working_dir HOMEBREW_PREFIX + end + + test do + (testpath/"nginx.conf").write <<~NGINX + worker_processes 4; + error_log #{testpath}/error.log; + pid #{testpath}/nginx.pid; + + events { + worker_connections 1024; + } + + http { + client_body_temp_path #{testpath}/client_body_temp; + fastcgi_temp_path #{testpath}/fastcgi_temp; + proxy_temp_path #{testpath}/proxy_temp; + scgi_temp_path #{testpath}/scgi_temp; + uwsgi_temp_path #{testpath}/uwsgi_temp; + + server { + listen 8080; + root #{testpath}; + access_log #{testpath}/access.log; + error_log #{testpath}/error.log; + } + } + NGINX + system bin/"nginx", "-t", "-c", testpath/"nginx.conf" + end +end diff --git a/Formula/n/ngircd.rb b/Formula/n/ngircd.rb new file mode 100644 index 0000000000000..fff0cc010f3c7 --- /dev/null +++ b/Formula/n/ngircd.rb @@ -0,0 +1,58 @@ +class Ngircd < Formula + desc "Lightweight Internet Relay Chat server" + homepage "https://ngircd.barton.de/" + url "https://ngircd.barton.de/pub/ngircd/ngircd-27.tar.xz" + mirror "https://ngircd.sourceforge.io/pub/ngircd/ngircd-27.tar.xz" + sha256 "6897880319dd5e2e73c1c9019613509f88eb5b8daa5821a36fbca3d785c247b8" + license "GPL-2.0-or-later" + + livecheck do + url "https://ngircd.barton.de/download.php" + regex(/href=.*?ngircd[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "1573a4080383c514d2f99460f1b06abc21d858e22cdd7965d12196746b0cdc07" + sha256 arm64_sequoia: "a5f1ec87f22aab290866fe3c59d3a3750354af29dd410c458b7dae0f3188b058" + sha256 arm64_sonoma: "b3230f61b1aece2cffd949a060abd8a8ff1d61a47f63b728839cda70a38cc685" + sha256 arm64_ventura: "2b428f0da716c05f7eaf374b55fb3afa078d216f2c115e995d6bfc8dc4806025" + sha256 arm64_monterey: "a47033e2a117055247c69736d670faadbcd3db4c6531cf33ba72c769515874f2" + sha256 sonoma: "343f25208cdce2cfc06e9be0d7dacc6eefddaa0327cbcb99916ee78005f23c32" + sha256 ventura: "404aec8f8636c91f81fc63bcad319ae781948ef7d01b0b92747fc4d844d47dd4" + sha256 monterey: "8ef6f2e67ad12fe5bc9ce16c04ea822680f4480c357f612440d5307d94c7d3cd" + sha256 arm64_linux: "dc1aa95593ad0256ced4ac280d8076f9d5cf5522a6306e282032eb93aa31ef57" + sha256 x86_64_linux: "a060e572d41cbb75911a78eafb384d30aea9813c5ce1229b74f4941401c53e43" + end + + depends_on "libident" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--sysconfdir=#{etc}", + "--enable-ipv6", + "--with-ident", + "--with-openssl" + system "make", "install" + + if OS.mac? + prefix.install "contrib/de.barton.ngircd.plist" + (prefix/"de.barton.ngircd.plist").chmod 0644 + + inreplace prefix/"de.barton.ngircd.plist" do |s| + s.gsub! "/opt/ngircd/sbin", sbin + s.gsub! "/Library/Logs/ngIRCd.log", var/"Logs/ngIRCd.log" + end + end + end + + test do + # Exits non-zero, so test version and match Author's name supplied. + assert_match "Alexander", pipe_output("#{sbin}/ngircd -V 2>&1") + end +end diff --git a/Formula/n/ngrep.rb b/Formula/n/ngrep.rb new file mode 100644 index 0000000000000..8cbb4bb55b419 --- /dev/null +++ b/Formula/n/ngrep.rb @@ -0,0 +1,38 @@ +class Ngrep < Formula + desc "Network grep" + homepage "https://github.com/jpr5/ngrep" + url "https://github.com/jpr5/ngrep/archive/refs/tags/v1.48.1.tar.gz" + sha256 "ac06d783d76f274abd8ed039fab643731b752d0f8cf0c6488d00cf72d1087ddd" + license :cannot_represent # Described as 'BSD with advertising' here: https://src.fedoraproject.org/rpms/ngrep/blob/rawhide/f/ngrep.spec#_8 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1e81a2588d449893347f0e960d8b708b327ac39af76bd095be8130c7b8c31d9e" + sha256 cellar: :any, arm64_sequoia: "6cfcc81f373821110c17d05284816c91a7e734cc805872b3b25d28f38ed722e5" + sha256 cellar: :any, arm64_sonoma: "5d107060ebfcbead5b51101b608c4e0b33e0c363a75551318fee665cfa6dde44" + sha256 cellar: :any, sonoma: "87a73b0a34c3739ebc113f7bf6407f66a8f5c9b88445db64b48236b8d28f02d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e1b5500a4d7c40ffb21e5af7e613b2a72df6ac74dbe0c62c321c6a201293942" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97082961593596b60dd944968bee7a23c53bd2a67e0b6994dc2ca6fd744fe936" + end + + depends_on "libpcap" + depends_on "pcre2" + + def install + args = [ + "--enable-ipv6", + "--enable-pcre2", + "--prefix=#{prefix}", + ] + + args << "--with-pcap-includes=#{Formula["libpcap"].opt_include}" + + system "./configure", *args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ngrep -V") + end +end diff --git a/Formula/n/ngs.rb b/Formula/n/ngs.rb new file mode 100644 index 0000000000000..72f91d3d8096d --- /dev/null +++ b/Formula/n/ngs.rb @@ -0,0 +1,40 @@ +class Ngs < Formula + desc "Powerful programming language and shell designed specifically for Ops" + homepage "https://ngs-lang.org/" + url "https://github.com/ngs-lang/ngs/archive/refs/tags/v0.2.17.tar.gz" + sha256 "029c5d1167e884fee54fc99881e3d8c30478314f6e5fc2a7b832c909ed35d5b0" + license "GPL-3.0-only" + head "https://github.com/ngs-lang/ngs.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "feba0ec17eac5b598935a376ed97b160837728ea1dce7368ab984e48134ac80b" + sha256 arm64_sequoia: "e7f8a694f90c7451ed9abda3ca69e35d1dbab001ede6afcc97b37f8042524c69" + sha256 arm64_sonoma: "d173769e2e4ee2b4882e64afd3ba3496ab82a17fd8d127b4ebbcf86b54e8d535" + sha256 arm64_ventura: "871cc1ebb9efa92af51e3287dd5ba4bc421f27992cc10c5a948462d272996857" + sha256 sonoma: "2b504cc81e146e8e75402fe12649f6da73a28e80333610172f3d2c0ecca3ea50" + sha256 ventura: "8254410f35da04c44f861955b609e0e41c4d5d54590d40a71c19f4922cc93811" + sha256 arm64_linux: "a8dd83896bb983f2a5885e3fe873bbf65a5bfc4d18c6ecf0ba07e5ae736c06b5" + sha256 x86_64_linux: "9c4e5283fc854c1e1489d98ef5d234163222567da81348d751084d2ba138ac11" + end + + depends_on "cmake" => :build + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "gnu-sed" + depends_on "json-c" + depends_on "pcre" + depends_on "peg" + + uses_from_macos "libffi" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "Hello World!", shell_output("#{bin}/ngs -e 'echo(\"Hello World!\")'") + end +end diff --git a/Formula/n/ngspice.rb b/Formula/n/ngspice.rb new file mode 100644 index 0000000000000..a2bda8d84a4c9 --- /dev/null +++ b/Formula/n/ngspice.rb @@ -0,0 +1,95 @@ +class Ngspice < Formula + desc "Spice circuit simulator" + homepage "https://ngspice.sourceforge.io/" + url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/45.2/ngspice-45.2.tar.gz" + sha256 "ba8345f4c3774714c10f33d7da850d361cec7d14b3a295d0dc9fd96f7423812d" + license :cannot_represent + head "https://git.code.sf.net/p/ngspice/ngspice.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/ngspice[._-]v?(\d+(?:\.\d+)*)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "fdf2c82d303c3b5944bdbd049ef15a40c388450879d085479965fd481148ed48" + sha256 arm64_sequoia: "4f819c80ddd4483301f7e01871aeb3049f9e219e22d315052423bde23ccb242d" + sha256 arm64_sonoma: "4226d7fb2762659a85353d5d6bebba7f9c3808a5ade8a0ea4fabe2dff6e8e6b3" + sha256 arm64_ventura: "bb9832d330e7aa8d6e7642f2b7502af8aa6112b68ea4a2dd6fb0c97154c4492e" + sha256 sonoma: "e589ca50ee6186e1ebe7d078df4cab987786504dce9f8e49f21686ffe775fe69" + sha256 ventura: "525615c53f2f18720430f273b141d5f0da96a1180232f1838cd2e4418c51d1d0" + sha256 arm64_linux: "943fc32abf2e74b11faa47f458a0c39c7789ca041bef2fe1ea5358b95afa67a6" + sha256 x86_64_linux: "4825e30255d2c0fdb9d41e374ddf3984eb38f5eaae5e9e1a0439abd425c35eb7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "fftw" + depends_on "freetype" + depends_on "libngspice" + depends_on "libx11" + depends_on "libxaw" + depends_on "libxt" + depends_on "readline" + + uses_from_macos "bison" => :build + uses_from_macos "ncurses" + + on_macos do + depends_on "libice" + depends_on "libsm" + depends_on "libxext" + depends_on "libxmu" + end + + def install + odie "check if autoreconf line can be removed" if version > "45.2" + # regenerate since the files were generated using automake 1.16 + system "autoreconf", "--install", "--force", "--verbose" + + # Xft #includes , not , hence freetype2 + # must be put into the search path. + ENV.append "CFLAGS", "-I#{Formula["freetype"].opt_include}/freetype2" + + args = %w[ + --enable-cider + --enable-xspice + --disable-openmp + --enable-pss + --with-readline=yes + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + + # fix references to libs + inreplace pkgshare/"scripts/spinit", lib/"ngspice/", Formula["libngspice"].opt_lib/"ngspice/" + + # remove conflict lib files with libngspice + rm_r(Dir[lib/"ngspice"]) + end + + def caveats + <<~EOS + If you need the graphical plotting functions you need to install X11 with: + brew install --cask xquartz + EOS + end + + test do + (testpath/"test.cir").write <<~EOS + RC test circuit + v1 1 0 1 + r1 1 2 1 + c1 2 0 1 ic=0 + .tran 100u 100m uic + .control + run + quit + .endc + .end + EOS + system bin/"ngspice", "test.cir" + end +end diff --git a/Formula/n/ngt.rb b/Formula/n/ngt.rb new file mode 100644 index 0000000000000..e644ca790f8f4 --- /dev/null +++ b/Formula/n/ngt.rb @@ -0,0 +1,48 @@ +class Ngt < Formula + desc "Neighborhood graph and tree for indexing high-dimensional data" + homepage "https://github.com/yahoojapan/NGT" + url "https://github.com/yahoojapan/NGT/archive/refs/tags/v2.5.0.tar.gz" + sha256 "4568624a4035b3317333c6fb78c35000f5cb9b3c66d0eb19bf52a6c49089190b" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "19aec684cb184820acafcc8452bf27f5cadcf3f071f294e5244ff68d1f149f8c" + sha256 cellar: :any, arm64_sequoia: "3e62869315a462fa0b78f1c2a90f1c5694bdf64a7523d3cf32dc2650e3cb924b" + sha256 cellar: :any, arm64_sonoma: "68d4e6f0a550c893b66ea7c1d144ed3832b50bbc7a1dd8a8759907ee2bbd0ff6" + sha256 cellar: :any, sonoma: "a6204a962ea74fd350766d563f2294e097781cc7d384ad397f26e4dee43a109e" + sha256 cellar: :any_skip_relocation, arm64_linux: "bed923a50ada5d3f1dc0ea35ccf41b9399d72d9ae69ac7a41043fe376b1b2a51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "033fc5b1e6d4e571e95c21159f27f73c9d2f5457c5ec14d2670298dc9c92a698" + end + + depends_on "cmake" => :build + + on_macos do + depends_on "libomp" + end + + on_linux do + depends_on "openblas" + end + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DNGT_BFLOAT_DISABLED=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "data" + end + + test do + cp_r (pkgshare/"data"), testpath + system bin/"ngt", "-d", "128", "-o", "c", "create", "index", "data/sift-dataset-5k.tsv" + end +end diff --git a/Formula/n/ni.rb b/Formula/n/ni.rb new file mode 100644 index 0000000000000..52f8a34757845 --- /dev/null +++ b/Formula/n/ni.rb @@ -0,0 +1,43 @@ +class Ni < Formula + desc "Selects the right Node package manager based on lockfiles" + homepage "https://github.com/antfu-collective/ni" + url "https://registry.npmjs.org/@antfu/ni/-/ni-27.0.1.tgz" + sha256 "58d9a674cbd9e0d507fa638f597b2f1edd54c035063d03f5b0c81442b521da51" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2a7d20600c9fec8d728cfbd95c32fc46b6290a6c0d5d57e62ac412b5240eddb6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/ni --version") + + (testpath/"package.json").write <<~JSON + { + "name": "fake-package", + "version": "1.0.0", + "description": "Fake package for testing", + "license": "MIT" + } + JSON + + (testpath/"package-lock.json").write <<~JSON + { + "name": "fake-package", + "version": "1.0.0", + "lockfileVersion": 3, + "packages": {}, + "dependencies": {} + } + JSON + + assert_match "up to date, audited 1 package", shell_output(bin/"ni") + end +end diff --git a/Formula/n/nickel.rb b/Formula/n/nickel.rb new file mode 100644 index 0000000000000..2acb0bd1adedb --- /dev/null +++ b/Formula/n/nickel.rb @@ -0,0 +1,43 @@ +class Nickel < Formula + desc "Better configuration for less" + homepage "https://nickel-lang.org/" + url "https://github.com/tweag/nickel/archive/refs/tags/1.14.0.tar.gz" + sha256 "7bd9d368f780d506dc63895b7b033ec8b5a98507c7738c2cc263ee5be87cdf67" + license "MIT" + head "https://github.com/tweag/nickel.git", branch: "master" + + livecheck do + url :stable + regex(/^v?((?!9\.9\.9)\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8cf9dc6aa23a254300d9b423158663da67240789a3467fb662ac010ef43494ea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0bea2d5279da70984dbc48b60a3b26cd84c9559bfd27d596b6c55c8f928ce44a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9ba3e71dbf452522f100acd5dd5368d50721d5058616786c073710b2df20c84" + sha256 cellar: :any_skip_relocation, sonoma: "549dd6b6e631555da370868e6b4a4ca73437863e5e6621f751a7649dd70c7844" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d064ef1ce5c1a499585bf655bd42ba7103f4562ad1af1db527c1d37e0ba729a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be6c85b53534fa307fd1d2840316063c0a1e250d8be14308c20f07f7746a31db" + end + + depends_on "rust" => :build + + def install + ENV["NICKEL_NIX_BUILD_REV"] = tap.user.to_s + + system "cargo", "install", *std_cargo_args(path: "cli") + + generate_completions_from_executable(bin/"nickel", "gen-completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nickel --version") + + (testpath/"program.ncl").write <<~NICKEL + let s = "world" in "Hello, " ++ s + NICKEL + + output = shell_output("#{bin}/nickel eval program.ncl") + assert_match "Hello, world", output + end +end diff --git a/Formula/n/nickle.rb b/Formula/n/nickle.rb new file mode 100644 index 0000000000000..8e8d818489fd3 --- /dev/null +++ b/Formula/n/nickle.rb @@ -0,0 +1,44 @@ +class Nickle < Formula + desc "Desk calculator language" + homepage "https://www.nickle.org/" + url "https://nickle.org/release/nickle-2.107.tar.xz" + sha256 "4062a51a8d9b36252f0e42e3e81717f00e9a51671731e643f18d8aedca4591f2" + license "MIT" + + livecheck do + url "https://nickle.org/release/" + regex(/href=.*?nickle[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "838ad1f26d463ffec7096dcbb01df1235ae8152f0e98977a63f532f41c5965dd" + sha256 arm64_sequoia: "9431c844eb3efde5fba6d9f57c3d4243a034f32c8867553178a909c0c78497e5" + sha256 arm64_sonoma: "3b1d007963a108d223890ecd6b040a07c26aa02b99be7c10678b56dcb24a6e1f" + sha256 sonoma: "6ca1ebe14f6ec2cd2bd74db0210e1cce6ef963098494dc75cc0bfbcafa0de61b" + sha256 arm64_linux: "ccdaaaaca05199b4a5753293990df5fda320c2a0f19dbb1b0c98730f2aef6882" + sha256 x86_64_linux: "17b67e1ea8bdc71774da5e09a60b23ce3198a09559b77676b62a7e1b170dbc40" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + + uses_from_macos "bc" => :build + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libedit" + + def install + # Fix to ERROR: None of values ['gnu23'] are supported by the C compiler + inreplace "meson.build", "c_std=gnu23", "c_std=gnu2x" + + system "meson", "setup", "build", "-Dlibedit=true", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_equal "4", shell_output("#{bin}/nickle -e '2+2'").chomp + end +end diff --git a/Formula/n/nicotine-plus.rb b/Formula/n/nicotine-plus.rb new file mode 100644 index 0000000000000..301836f2346bf --- /dev/null +++ b/Formula/n/nicotine-plus.rb @@ -0,0 +1,41 @@ +class NicotinePlus < Formula + include Language::Python::Virtualenv + + desc "Graphical client for the Soulseek peer-to-peer network" + homepage "https://nicotine-plus.org" + url "https://files.pythonhosted.org/packages/bb/91/b7d2f353828d1bc57bb43cfe9006b0fde4d6ffe1458d5045c58f567ed33a/nicotine_plus-3.3.10.tar.gz" + sha256 "a4f4cbfade9cf48af10ecb7bde1eac8b5c1b0194f9cd01c814349ddba453dd12" + license "GPL-3.0-or-later" + head "https://github.com/nicotine-plus/nicotine-plus.git", branch: "master" + + no_autobump! because: "`update-python-resources` cannot determine dependencies" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "80edf82b7afa3a964e69c28edab21a4a588144096efaa10f555b567b1c0bfa3e" + end + + depends_on "adwaita-icon-theme" + depends_on "gtk4" + depends_on "libadwaita" + depends_on "py3cairo" => :no_linkage + depends_on "pygobject3" => :no_linkage + depends_on "python@3.14" + + on_linux do + depends_on "gettext" => :build # for `msgfmt` + end + + conflicts_with "httm", because: "both install `nicotine` binaries" + + pypi_packages exclude_packages: %w[pycairo pygobject] + + def install + virtualenv_install_with_resources + end + + test do + # nicotine is a GUI app + assert_match version.to_s, shell_output("#{bin}/nicotine --version") + end +end diff --git a/Formula/n/nicovideo-dl.rb b/Formula/n/nicovideo-dl.rb new file mode 100644 index 0000000000000..5990e36562ccb --- /dev/null +++ b/Formula/n/nicovideo-dl.rb @@ -0,0 +1,34 @@ +class NicovideoDl < Formula + include Language::Python::Shebang + + desc "Command-line program to download videos from www.nicovideo.jp" + homepage "https://osdn.net/projects/nicovideo-dl/" + # Canonical: https://osdn.net/dl/nicovideo-dl/nicovideo-dl-0.0.20190126.tar.gz + url "https://dotsrc.dl.osdn.net/osdn/nicovideo-dl/70568/nicovideo-dl-0.0.20190126.tar.gz" + sha256 "886980d154953bc5ff5d44758f352ce34d814566a83ceb0b412b8d2d51f52197" + license "MIT" + revision 3 + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "3ed938a610ab72d8bd9d90764672eb2ed5d9930e0803929c05b3e34d4c1a815d" + end + + deprecate! date: "2025-10-23", because: :repo_removed + disable! date: "2026-10-23", because: :repo_removed + + uses_from_macos "python" + + def install + # Replace `cgi` usage removed in python 3.13 + inreplace "nicovideo-dl", "import cgi", "" + inreplace "nicovideo-dl", "cgi.parse_qs(", "urllib.parse.parse_qs(" + + rewrite_shebang detected_python_shebang(use_python_from_path: true), "nicovideo-dl" + bin.install "nicovideo-dl" + end + + test do + system bin/"nicovideo-dl", "-v" + end +end diff --git a/Formula/n/nifi-registry.rb b/Formula/n/nifi-registry.rb new file mode 100644 index 0000000000000..3c1deb7bd036f --- /dev/null +++ b/Formula/n/nifi-registry.rb @@ -0,0 +1,28 @@ +class NifiRegistry < Formula + desc "Centralized storage & management of NiFi/MiNiFi shared resources" + homepage "https://nifi.apache.org/projects/registry" + url "https://www.apache.org/dyn/closer.lua?path=/nifi/2.6.0/nifi-registry-2.6.0-bin.zip" + mirror "https://archive.apache.org/dist/nifi/2.6.0/nifi-registry-2.6.0-bin.zip" + sha256 "08f0cbd8a03c8429938d9a419f4603bcd377c89e901e1c72fb817d265e3fa4de" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "139df7413fd3d51ed9e762e9e4a97cc05ebdeb38ed448cede9e5913f77932525" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + rm Dir[libexec/"bin/*.bat"] + + bin.install libexec/"bin/nifi-registry.sh" => "nifi-registry" + bin.env_script_all_files libexec/"bin/", + Language::Java.overridable_java_home_env.merge(NIFI_REGISTRY_HOME: libexec) + end + + test do + output = shell_output("#{bin}/nifi-registry status") + assert_match "Apache NiFi Registry is not running", output + end +end diff --git a/Formula/n/nifi-toolkit.rb b/Formula/n/nifi-toolkit.rb new file mode 100644 index 0000000000000..c144b7c11ca42 --- /dev/null +++ b/Formula/n/nifi-toolkit.rb @@ -0,0 +1,30 @@ +class NifiToolkit < Formula + desc "Command-line utilities to setup and support NiFi" + homepage "https://nifi.apache.org" + url "https://dlcdn.apache.org/nifi/2.6.0/nifi-toolkit-2.6.0-bin.zip" + sha256 "903498a399d68a5bc6ac0d42419b66453b1e54b5e7e0f0aaaab8c00332093e2a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d366d52c1f4fa39289f0bf56e2dc8f46d33aa1a4cb0e29b11a9f1c61eed377bf" + end + + depends_on "openjdk@21" + + def install + libexec.install Dir["*"] + + (bin/"nifi-cli").write_env_script( + libexec/"bin/cli.sh", + Language::Java.overridable_java_home_env("21").merge(NIFI_TOOLKIT_HOME: libexec), + ) + end + + test do + assert_match "commands:", shell_output("#{bin}/nifi-cli help") + assert_match "Missing required option 'baseUrl'", shell_output("#{bin}/nifi-cli nifi get-node 2>&1", 255) + session_keys = shell_output("#{bin}/nifi-cli session keys") + assert_match "nifi.props", session_keys + assert_match "nifi.reg.props", session_keys + end +end diff --git a/Formula/n/nifi.rb b/Formula/n/nifi.rb new file mode 100644 index 0000000000000..82151490ff3b5 --- /dev/null +++ b/Formula/n/nifi.rb @@ -0,0 +1,25 @@ +class Nifi < Formula + desc "Easy to use, powerful, and reliable system to process and distribute data" + homepage "https://nifi.apache.org" + url "https://www.apache.org/dyn/closer.lua?path=/nifi/2.6.0/nifi-2.6.0-bin.zip" + mirror "https://archive.apache.org/dist/nifi/2.6.0/nifi-2.6.0-bin.zip" + sha256 "dd6c32d92c82d47770954c46de8a834236b80f624ad8a0429c943a961f75951a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ac825f02b66cae8742b1d350a98d2e85acbf13fb4978e682c921504605f3143d" + end + + depends_on "openjdk@21" + + def install + libexec.install Dir["*"] + + (bin/"nifi").write_env_script libexec/"bin/nifi.sh", + Language::Java.overridable_java_home_env("21").merge(NIFI_HOME: libexec) + end + + test do + system bin/"nifi", "status" + end +end diff --git a/Formula/n/nift.rb b/Formula/n/nift.rb new file mode 100644 index 0000000000000..aafa541d013e9 --- /dev/null +++ b/Formula/n/nift.rb @@ -0,0 +1,52 @@ +class Nift < Formula + desc "Cross-platform open source framework for managing and generating websites" + homepage "https://nift.dev/" + url "https://github.com/nifty-site-manager/nsm/archive/refs/tags/v3.0.3.tar.gz" + sha256 "4900247b92e0ae0d124391ec710a38b322ae83170e2c39191f8ad497090ffd24" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cffde6265d86b958248a1f0acbb45874f3319a9fed29b5bac84afc5bd1f9799e" + sha256 cellar: :any, arm64_sequoia: "ec431ecc4b58ffa4a1a11fee47560dacd95b7868b4a49510d760e63c5d509d69" + sha256 cellar: :any, arm64_sonoma: "d956ac86be1b6ba12faa5fd44203b5528e7449118bf10529ccc92b9e99870cdd" + sha256 cellar: :any, arm64_ventura: "a7b8a8bb2bae90045ea083bb172b1209c3a9afb6cd7c23dcb9daaacb33a8a5e3" + sha256 cellar: :any, arm64_monterey: "318f8e6c52625ac950dd133d0842f679b8fdfcfcf81291e7c62681dd9841833d" + sha256 cellar: :any, sonoma: "be9f28e1d59a40c8f7eb2ef64706389a7e3983ecc884072c925fd4ea5f058d4a" + sha256 cellar: :any, ventura: "c2261dd8442c08a37c268f6b5192abfed469b4edbde6bf640873a8db0f1c78f4" + sha256 cellar: :any, monterey: "a72728301c2f93e669868c547353a2bc1cb09d68a8bd0a14ebeab4556877e2fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fe98d910ca3b4ddaf7ba53a135e62cc0fb506aeae507482b0fc85af9f78eaf4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4ceda3cb7527a85aac01357fa0e8fe3a1adb2d8dc4be618b7e93cacd97e6754" + end + + depends_on "luajit" + + # Fix build on Apple Silicon by removing -pagezero_size/-image_base flags. + # TODO: Remove if upstream PR is merged and included in release. + # PR ref: https://github.com/nifty-site-manager/nsm/pull/33 + patch do + url "https://github.com/nifty-site-manager/nsm/commit/00b3ef1ea5ffe2dedc501f0603d16a9a4d57d395.patch?full_index=1" + sha256 "c05f0381feef577c493d3b160fc964cee6aeb3a444bc6bde70fda4abc96be8bf" + end + + # Fix to error: a template argument list is expected after a name prefixed by the template keyword + # PR ref: https://github.com/nifty-site-manager/nsm/pull/38 + patch do + url "https://github.com/nifty-site-manager/nsm/commit/d8a54c08a218d6f6823a4e76472708bdc94d1128.patch?full_index=1" + sha256 "534871043624b409c60d17e08a5e9917ad55ef245df6286d6ea00cc706b3e09f" + end + + def install + inreplace "Lua.h", "/usr/local/include", Formula["luajit"].opt_include + system "make", "BUNDLED=0", "LUAJIT_VERSION=2.1" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + mkdir "empty" do + system bin/"nsm", "init", ".html" + assert_path_exists testpath/"empty/output/index.html" + end + end +end diff --git a/Formula/n/nikto.rb b/Formula/n/nikto.rb new file mode 100644 index 0000000000000..68aaff03ae71f --- /dev/null +++ b/Formula/n/nikto.rb @@ -0,0 +1,45 @@ +class Nikto < Formula + desc "Web server scanner" + homepage "https://cirt.net/nikto2" + url "https://github.com/sullo/nikto/archive/refs/tags/2.5.0.tar.gz" + sha256 "fb0dc4b2bc92cb31f8069f64ea4d47295bcd11067a7184da955743de7d97709d" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ab8f5f0295ab3a4599a11e2cb63486c8da93c91c0088bc6f29307db3aec3df58" + end + + def install + cd "program" do + inreplace "nikto.pl", "/etc/nikto.conf", "#{etc}/nikto.conf" + + inreplace "nikto.conf.default" do |s| + s.gsub! "# EXECDIR=/opt/nikto", "EXECDIR=#{prefix}" + s.gsub! "# PLUGINDIR=/opt/nikto/plugins", + "PLUGINDIR=#{pkgshare}/plugins" + s.gsub! "# DBDIR=/opt/nikto/databases", + "DBDIR=#{var}/nikto/databases" + s.gsub! "# TEMPLATEDIR=/opt/nikto/templates", + "TEMPLATEDIR=#{pkgshare}/templates" + s.gsub! "# DOCDIR=/opt/nikto/docs", "DOCDIR=#{pkgshare}/docs" + end + + bin.install "nikto.pl" => "nikto" + bin.install "replay.pl" + etc.install "nikto.conf.default" => "nikto.conf" + man1.install "docs/nikto.1" + pkgshare.install "docs", "plugins", "templates" + end + + doc.install Dir["documentation/*"] + (var/"nikto/databases").mkpath + cp_r Dir["program/databases/*"], var/"nikto/databases" + end + + test do + system bin/"nikto", "-H" + end +end diff --git a/Formula/n/nim.rb b/Formula/n/nim.rb new file mode 100644 index 0000000000000..a3403e2242850 --- /dev/null +++ b/Formula/n/nim.rb @@ -0,0 +1,82 @@ +class Nim < Formula + desc "Statically typed compiled systems programming language" + homepage "https://nim-lang.org/" + url "https://nim-lang.org/download/nim-2.2.6.tar.xz" + sha256 "657b0e3d5def788148d2a87fa6123fa755b2d92cad31ef60fd261e451785528b" + license "MIT" + head "https://github.com/nim-lang/Nim.git", branch: "devel" + + livecheck do + url "https://nim-lang.org/install.html" + regex(/href=.*?nim[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c0688a91212a72fc992d8f31de012836cd9208ef8bde75d12e0bbcae16c09d99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2089e5cf9fff042e85ccab2d0947331d498fe8f49340e39a15a8b5be997f9f22" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0dd2909403de9a9ded249f6b53c49bffda04a8a0cc2461a7b1277d6ea2a4ccd4" + sha256 cellar: :any_skip_relocation, sonoma: "2d365ff3b3902000c40f57d79c789c97fccb49ef301d6e4c4ae1f750385e759f" + sha256 cellar: :any_skip_relocation, arm64_linux: "578bea2b65484e81ced453b0b1ad2d8cab385a3264c56cdcf062dc12e8cab2b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b58fc4d51978785b666cf205bbc877fc88bea7965c2dbc1dd98184507a78a61e" + end + + depends_on "help2man" => :build + + on_linux do + depends_on "openssl@3" + end + + conflicts_with "atlas", "mongodb-atlas-cli", because: "both install `atlas` executable" + + def install + if build.head? + # this will clone https://github.com/nim-lang/csources_v1 + # at some hardcoded revision + system "/bin/sh", "build_all.sh" + # Build a new version of the compiler with readline bindings + system "./koch", "boot", "-d:release", "-d:useLinenoise" + else + system "/bin/sh", "build.sh" + system "bin/nim", "c", "-d:release", "koch" + system "./koch", "boot", "-d:release", "-d:useLinenoise" + system "./koch", "tools" + end + + system "./koch", "geninstall" + system "/bin/sh", "install.sh", prefix + + system "help2man", "bin/nim", "-o", "nim.1", "-N" + man1.install "nim.1" + + target = prefix/"nim/bin" + bin.install_symlink target/"nim" + tools = %w[nimble nimgrep nimpretty nimsuggest atlas testament] + tools.each do |t| + if t == "testament" + system "help2man", buildpath/"bin"/t, "-o", "#{t}.1", "-N", "--no-discard-stderr" + else + system "help2man", buildpath/"bin"/t, "-o", "#{t}.1", "-N" + end + + man1.install "#{t}.1" + target.install buildpath/"bin"/t + bin.install_symlink target/t + end + end + + test do + (testpath/"hello.nim").write <<~EOS + echo("hello") + EOS + assert_equal "hello", shell_output("#{bin}/nim compile --verbosity:0 --run #{testpath}/hello.nim").chomp + + (testpath/"hello.nimble").write <<~EOS + version = "0.1.0" + author = "Author Name" + description = "A test nimble package" + license = "MIT" + requires "nim >= 0.15.0" + EOS + assert_equal "name: \"hello\"\n", shell_output("#{bin}/nimble dump").lines.first + end +end diff --git a/Formula/n/ninja.rb b/Formula/n/ninja.rb new file mode 100644 index 0000000000000..cedc883c03714 --- /dev/null +++ b/Formula/n/ninja.rb @@ -0,0 +1,55 @@ +class Ninja < Formula + desc "Small build system for use with gyp or CMake" + homepage "https://ninja-build.org/" + url "https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.1.tar.gz" + sha256 "f0055ad0369bf2e372955ba55128d000cfcc21777057806015b45e4accbebf23" + license "Apache-2.0" + head "https://github.com/ninja-build/ninja.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e9552fbeedb8ebb75ae07bb4ebd822eb8ce6c189a2903cd2b8309b3b857d2f8d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "873e06703ff0d22140b1683b6272b65a57a3e87b506b7904ad82b6018df6db06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8958969cfa17f656280e7bb08bdcc71d657b3208a786c012041f53bb455d96ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8001e8a0a4ff7ca04fe84d366a02f981a4916f794f43ce5594dedbb4f5fc297f" + sha256 cellar: :any_skip_relocation, tahoe: "5e931101e625be42f7805fec78adae7cf845e13a1b0c557ad75ec2af65c61ac5" + sha256 cellar: :any_skip_relocation, sonoma: "ca928abda16bab3735437ec593eebf85947f3b8aba1b90ee024cce0d9ee9428d" + sha256 cellar: :any_skip_relocation, ventura: "3f7c0ce43b98aa2f1c6a30cf14043abb4a739c5675a46a662d158fe65b7a8ade" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9861ae88dd629add0d88046028c24240d48d57f5ee31c1b0922996221176250" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13cca961d30a825d800c714dfc04932d916b08127ac866c37fc99a7072e22003" + end + + uses_from_macos "python" => [:build, :test] + + def install + system "python3", "configure.py", "--bootstrap", "--verbose", "--with-python=python3" + + bin.install "ninja" + bash_completion.install "misc/bash-completion" => "ninja" + zsh_completion.install "misc/zsh-completion" => "_ninja" + doc.install "doc/manual.asciidoc" + (share/"vim/vimfiles/syntax").install "misc/ninja.vim" + end + + test do + (testpath/"build.ninja").write <<~NINJA + cflags = -Wall + + rule cc + command = gcc $cflags -c $in -o $out + + build foo.o: cc foo.c + NINJA + system bin/"ninja", "-t", "targets" + port = free_port + fork do + exec bin/"ninja", "-t", "browse", "--port=#{port}", "--hostname=127.0.0.1", "--no-browser", "foo.o" + end + sleep 15 + assert_match "foo.c", shell_output("curl -s http://127.0.0.1:#{port}?foo.o") + end +end diff --git a/Formula/n/ninvaders.rb b/Formula/n/ninvaders.rb new file mode 100644 index 0000000000000..8414b30283279 --- /dev/null +++ b/Formula/n/ninvaders.rb @@ -0,0 +1,47 @@ +class Ninvaders < Formula + desc "Space Invaders in the terminal" + homepage "https://ninvaders.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ninvaders/ninvaders/0.1.1/ninvaders-0.1.1.tar.gz" + sha256 "bfbc5c378704d9cf5e7fed288dac88859149bee5ed0850175759d310b61fd30b" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67f7a9ab2212b5b2ddd49e6bf8cbe915606186a4b1d0ff2523d23bd87ad59372" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "89cd69d1df23bd848757897116b0dbbb8a0535d65264cf8956e5323bae0fac4e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "61f4aa067bfda98318e230bca8a456f18b6d05ad875dba74b05a93b4d63e0d96" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b5086f1e6f104b199763ec9feedd2a3ee64340abf584d3dc2ea2fc50201ecb3e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "79c809a98982d7c68e1f31b53ff2644a750589f26e7a4fbba771b556d4929e46" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "641248bbd6c7f8895dd3c6f42ce68f047db05864354ef772b7c2490c9ddced5d" + sha256 cellar: :any_skip_relocation, sonoma: "5540ceb68d1a45aaabde16ec87c665c6ea5759a5d1d5fdd8bd804dc3a4b9829a" + sha256 cellar: :any_skip_relocation, ventura: "722274c2a69c82b9498dcaaf29da198deae44e81e51a320872d4c6003340dfd7" + sha256 cellar: :any_skip_relocation, monterey: "7f4fce96d25e44373e785000fb3c2605b90bb8f33e8635f9031a4fd1e547a419" + sha256 cellar: :any_skip_relocation, big_sur: "f4b326a63fb608eee71916a19751837d8cc98167b32ffd11b4f0328fcce82a5c" + sha256 cellar: :any_skip_relocation, catalina: "fc5a1eb5df34f13a6d63777b20ec5fea7a8a0351e8f9b8561e6ec95c42ced2c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d829100cdd7f35e3d8276de284bdd884145728a975ed2ddb6f3985bf6a8d966f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4d884e93ed10e3c362cd6a7b948aba5099efe9921dfa45a5163f0e0a2136da2" + end + + uses_from_macos "ncurses" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `skill_level'; aliens.o:(.bss+0x67c): first defined here + inreplace "Makefile", "-Wall", "-Wall -fcommon" if OS.linux? + + ENV.deparallelize # this formula's build system can't parallelize + inreplace "Makefile" do |s| + s.change_make_var! "CC", ENV.cc + # gcc-4.2 doesn't like the lack of space here + s.gsub! "-o$@", "-o $@" + end + system "make" # build the binary + bin.install "nInvaders" + end + + test do + assert_match "nInvaders #{version}", + shell_output("#{bin}/nInvaders -h 2>&1", 1) + end +end diff --git a/Formula/n/nip4.rb b/Formula/n/nip4.rb new file mode 100644 index 0000000000000..eccd8f1b31352 --- /dev/null +++ b/Formula/n/nip4.rb @@ -0,0 +1,61 @@ +class Nip4 < Formula + desc "Image processing spreadsheet" + homepage "https://github.com/jcupitt/nip4" + url "https://github.com/jcupitt/nip4/releases/download/v9.0.14/nip4-9.0.14.tar.xz" + sha256 "a5bb0eabdbf5d6d6e1522e1a26ac158ed6a2b289cf47610b8d276fb876aa7b95" + license "GPL-2.0-or-later" + head "https://github.com/jcupitt/nip4.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4ce931ce676fbd6c75f9d335cb18217460f422014217c246da368614134444df" + sha256 cellar: :any, arm64_sequoia: "86e95ad4a634deec24f69306a212aaab2bf7de0864aeac67ccf92feb1d0f6c1d" + sha256 cellar: :any, arm64_sonoma: "b7c02517497fddd282b49cd6289fdde48139b8ec0ee7a7468d28dd46b2119bc2" + sha256 cellar: :any, sonoma: "b09530c9df764464bd0fcbeb5cd387e80a7f06a8ac7e8cc1239b4aa988ce9427" + sha256 arm64_linux: "f92cb7ba6ffc7597c1a698b48e6248a554cebbe935ecff41723630e12b685b11" + sha256 x86_64_linux: "58f553d06f4e3706a4b9d77a1cfc25119129c8955a55ac45067380ec4a90a289" + end + + depends_on "bison" => :build + depends_on "flex" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "glib" + depends_on "graphene" + depends_on "gsl" + depends_on "gtk4" + depends_on "hicolor-icon-theme" + depends_on "libxml2" + depends_on "pango" + depends_on "vips" + + def install + # Avoid running `meson` post-install script + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + system "#{Formula["gtk4"].opt_bin}/gtk4-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + + test do + assert_match version.major_minor_patch.to_s, shell_output("#{bin}/nip4 --version") + + # nip4 is a GUI application + spawn bin/"nip4" do |_r, _w, pid| + sleep 5 + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/n/nixfmt.rb b/Formula/n/nixfmt.rb new file mode 100644 index 0000000000000..94277157b9f2a --- /dev/null +++ b/Formula/n/nixfmt.rb @@ -0,0 +1,41 @@ +class Nixfmt < Formula + desc "Command-line tool to format Nix language code" + homepage "https://github.com/NixOS/nixfmt" + url "https://github.com/NixOS/nixfmt/archive/refs/tags/v1.1.0.tar.gz" + sha256 "7feef8f70f2f565c5fae54fa5ca99ca9dcc80603d593386885117b78ee6e04a3" + license "MPL-2.0" + head "https://github.com/NixOS/nixfmt.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d373613d9e5347e722ee05880bcb062bfdaae1bc6ec8c7801ece89bd192764ee" + sha256 cellar: :any, arm64_sequoia: "77aacbc49e2be610768d8dfdba87e3eb0e2b72ce0ad9e1bed50b401e1ef66632" + sha256 cellar: :any, arm64_sonoma: "f9022748f44c472d48cf51e18e9c5c9d1dad9a0d74fdbe1b4bfb06b96abe3fbf" + sha256 cellar: :any, sonoma: "4a0bfdf2df6b2bdbe2c8219bd96a7ece1f797ebe18f405b8b377adbc711eeb2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3882c4283b966bc4bf7ce4c2a2513ebc602d800fcf04cd7b5ef9370d0f58aa7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b57857acee4f03b8ee5be8499bd2c465b0eac166ddb08029628aa2e9ab070b32" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", "--allow-newer=base", *std_cabal_v2_args + end + + test do + assert_equal "nixfmt #{version}", shell_output("#{bin}/nixfmt --version").chomp + + ENV["LC_ALL"] = "en_US.UTF-8" + input_nix = "{description=\"Demo\";outputs={self}:{};}" + output_nix = "{\n description = \"Demo\";\n outputs = { self }: { };\n}" + + (testpath/"nixfmt_test.nix").write input_nix + system bin/"nixfmt", "nixfmt_test.nix" + assert_equal output_nix, (testpath/"nixfmt_test.nix").read.strip + end +end diff --git a/Formula/n/nixpacks.rb b/Formula/n/nixpacks.rb new file mode 100644 index 0000000000000..01f961aa49721 --- /dev/null +++ b/Formula/n/nixpacks.rb @@ -0,0 +1,30 @@ +class Nixpacks < Formula + desc "App source + Nix packages + Docker = Image" + homepage "https://nixpacks.com/docs/getting-started" + url "https://github.com/railwayapp/nixpacks/archive/refs/tags/v1.41.0.tar.gz" + sha256 "38b1c8a739a7585eb4aff071bd0e8f067ef35eca6af32acc3a2dec0799a78a83" + license "MIT" + head "https://github.com/railwayapp/nixpacks.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54ac1ff6d83c0d456e3f7b977af8d1ede2dee7a3509e807765826d978a7987df" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86ed38db72b925e71d8997cab2eba20f53bc98bc7d0d0d63ef754e86df73b72f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "88b6aa306ce48e851ebaf6de64d037eb9fb30aa0d327470755d931f577725fc0" + sha256 cellar: :any_skip_relocation, sonoma: "b2f3c717c5e5ef2dc52ce3ceff5d2abae82af15b698e4019b44ecd2df2bf30f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6af3e3a9ce1fe96a070d37ff99500f447691da7a72e1dc4ad2b3a04b8b0d4dae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d188beda0f3fa721362700532a835e20d4a6add171d0f13cd7504f4ae15e169" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/nixpacks build #{testpath} --name test", 1) + assert_match "Nixpacks was unable to generate a build plan for this app", output + + assert_equal "nixpacks #{version}", shell_output("#{bin}/nixpacks -V").chomp + end +end diff --git a/Formula/n/nkf.rb b/Formula/n/nkf.rb new file mode 100644 index 0000000000000..3fe991de02741 --- /dev/null +++ b/Formula/n/nkf.rb @@ -0,0 +1,36 @@ +class Nkf < Formula + desc "Network Kanji code conversion Filter (NKF)" + homepage "https://github.com/nurse/nkf" + url "https://deb.debian.org/debian/pool/main/n/nkf/nkf_2.1.5.orig.tar.gz" + sha256 "d1a7df435847a79f2f33a92388bca1d90d1b837b1b56523dcafc4695165bad44" + license "Zlib" + + livecheck do + url "https://deb.debian.org/debian/pool/main/n/nkf/" + regex(/href=.*?nkf[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "157d2e7be20ab0ff292a84336421a6c0afdb541abcc04d7b05fe4aff25d3bbe1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f233b8fbb5fe59f101fff8e47bf2e4c4dfcd6baa59011fa831f0f34871dcb998" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9508578eda712a4a0e89b216afa1a4adc5368f62d52a3ddcf5351e6eb0774e47" + sha256 cellar: :any_skip_relocation, sonoma: "7c5f70e92b04d9c3a5e1abe9d2fa887aa8883d032cbbac71365f1205628f83a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d61677ea7823ccdf8df32e1d7d780a9bcab90870c0de9a1354daada079ea626" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5283ee3b17553f3145b602bcdbda3e23d843934a7a0d4543217c1b4355737d80" + end + + def install + inreplace "Makefile", "$(prefix)/man", "$(prefix)/share/man" + system "make", "CC=#{ENV.cc}" + # Have to specify mkdir -p here since the intermediate directories + # don't exist in an empty prefix + system "make", "install", "prefix=#{prefix}", "MKDIR=mkdir -p" + end + + test do + system bin/"nkf", "--version" + end +end diff --git a/Formula/n/nload.rb b/Formula/n/nload.rb new file mode 100644 index 0000000000000..11945dede713b --- /dev/null +++ b/Formula/n/nload.rb @@ -0,0 +1,76 @@ +class Nload < Formula + desc "Realtime console network usage monitor" + homepage "https://www.roland-riegel.de/nload/" + url "https://www.roland-riegel.de/nload/nload-0.7.4.tar.gz" + sha256 "c1c051e7155e26243d569be5d99c744d8620e65fa8a7e05efcf84d01d9d469e5" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?nload[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "990a89bc4a31bb98e18e9db1d84839d01db9d6cd9de1e4b951ca8b20886c7a98" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a45171a86a39f2386824b9b9acafcdb1d054b43839513022859eac52693de221" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06f18bf46c748111bb588cf2f2fbc63c38d255cfae76e33cc3a61fc642228e98" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9744511493995a64c3af0ec5523840e73d204fb3a5c5ab69678a18f5e4a30ae7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a179869cf1ff0fc1d62619d85a23004ca8f5ac9d17a2157fe86fdc717c2fc796" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2c5db3ac98383bf71154283dbca344ef7e4ac355338bdff337936cb4836b8ace" + sha256 cellar: :any_skip_relocation, sonoma: "c3914fbe454faf676b8af160dd9eb7f81935db7b89ec6e8a15d3b9e9bb482899" + sha256 cellar: :any_skip_relocation, ventura: "0924f27e44c24642832a73d9f2f1f1d2f4880f38b23fe2e46ecbe3422125af7f" + sha256 cellar: :any_skip_relocation, monterey: "fa676ad48d38191b0cfc2a7a5277ec26cbae48ba7a40c06b10bc1760692fdbf1" + sha256 cellar: :any_skip_relocation, big_sur: "497154bd3de08b44994d05c69467266bb5ea54e6ddb7c9353bbf63bc77463447" + sha256 cellar: :any_skip_relocation, catalina: "2e566035d80abd97c43955ac5fa05ba347b67dbbd10d0543faef3cf5cc7b0bfb" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2366f0c72199e2ae1729e247e5c6fc0bfdb5c02cae34cc4f6859832fd0649ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b1d3e77437ea1f37ab063237a2b71318370b23248b8be6d6d10d07f786bed89" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "ncurses" + + # crash on F2 and garbage in adapter name, see https://sourceforge.net/p/nload/bugs/8/ reported on 2014-04-03 + patch :p0 do + url "https://sourceforge.net/p/nload/bugs/_discuss/thread/c9b68d8e/4a65/attachment/devreader-bsd.cpp.patch" + sha256 "19055158b72722f7dabff9890931094cac591bcc6de3e90a7f4744d28746ebc7" + end + + # Patching configure.in file to make configure compile on Mac OS. + # Patch taken from MacPorts. + patch :DATA + + def install + system "./run_autotools" + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + # Unset LDFLAGS, "-s" causes the linker to crash + system "make", "install", "LDFLAGS=" + end + + test do + system bin/"nload", "--help" + end +end + + +__END__ +diff --git a/configure.in b/configure.in +index 87ecc88..4df8dc3 100644 +--- a/configure.in ++++ b/configure.in +@@ -38,7 +38,7 @@ case $host_os in + + AC_CHECK_FUNCS([memset]) + ;; +- *bsd*) ++ *darwin*) + AC_DEFINE(HAVE_BSD, 1, [Define to 1 if your build target is BSD.]) + AM_CONDITIONAL(HAVE_BSD, true) diff --git a/Formula/n/nlohmann-json.rb b/Formula/n/nlohmann-json.rb new file mode 100644 index 0000000000000..7edb1482509fa --- /dev/null +++ b/Formula/n/nlohmann-json.rb @@ -0,0 +1,59 @@ +class NlohmannJson < Formula + desc "JSON for modern C++" + homepage "https://json.nlohmann.me/" + url "https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz" + sha256 "4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187" + license "MIT" + head "https://github.com/nlohmann/json.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "df65065eb8504f15f8802b7c681df015a592a68336db7fe290eeeda59fa1e440" + end + + depends_on "cmake" => :build + + # Fix to error: unknown type name 'char8_t' for clang, remove in next release + # PR ref: https://github.com/nlohmann/json/pull/4736 + patch do + url "https://github.com/nlohmann/json/commit/34868f90149de02432ea758a29227a6ad74f098c.patch?full_index=1" + sha256 "fb4db3640ce333b145b53acc64c78eb3011f57012dc4b9c6689d5d485d2434cd" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DJSON_BuildTests=OFF", "-DJSON_MultipleHeaders=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + + using nlohmann::json; + + int main() { + json j = { + {"pi", 3.141}, + {"name", "Niels"}, + {"list", {1, 0, 2}}, + {"object", { + {"happy", true}, + {"nothing", nullptr} + }} + }; + std::cout << j << std::endl; + } + CPP + + system ENV.cxx, "test.cc", "-I#{include}", "-std=c++11", "-o", "test" + std_output = <<~JSON + {"list":[1,0,2],"name":"Niels","object":{"happy":true,"nothing":null},"pi":3.141} + JSON + assert_match std_output, shell_output("./test") + end +end diff --git a/Formula/n/nlopt.rb b/Formula/n/nlopt.rb new file mode 100644 index 0000000000000..29fc1826890cc --- /dev/null +++ b/Formula/n/nlopt.rb @@ -0,0 +1,56 @@ +class Nlopt < Formula + desc "Free/open-source library for nonlinear optimization" + homepage "https://nlopt.readthedocs.io/" + url "https://github.com/stevengj/nlopt/archive/refs/tags/v2.10.0.tar.gz" + sha256 "506f83a9e778ad4f204446e99509cb2bdf5539de8beccc260a014bd560237be1" + license "MIT" + head "https://github.com/stevengj/nlopt.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a6812d6b611b71abaae05550adb9ee32a76a5d9589a130262ec005d2e8c15a55" + sha256 cellar: :any, arm64_sequoia: "4b5cfef104d5816a719d35624642efd027d4d4dedfd21e67ae26eed7ceb1d9d6" + sha256 cellar: :any, arm64_sonoma: "a09deedc38d8d4d44c105c4c1c603fdf0652d9e5506885c04586ec2d25df650b" + sha256 cellar: :any, arm64_ventura: "e401c6382cc8b7d25ea8095554443a881fa0cb02e935b7dfd5eece47d7429df8" + sha256 cellar: :any, sonoma: "53909c4a84848ff62246d64f07df563bf63afc5076b05a6fde82e3e9095f85cc" + sha256 cellar: :any, ventura: "3d1d6b2321c6999b121cc84e40f066f8a909a652dadbc7e0ae3e438155d977fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "633654bcc4170038a67d07575d365a02e470ced5d15d97c098460c522adf09c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b98fc2b074ae63ce6fbbedce14c22165c7cd91c661895c9f36aa9aeccf3fe790" + end + + depends_on "cmake" => [:build, :test] + + def install + args = %w[ + -DNLOPT_GUILE=OFF + -DNLOPT_MATLAB=OFF + -DNLOPT_OCTAVE=OFF + -DNLOPT_PYTHON=OFF + -DNLOPT_SWIG=OFF + -DNLOPT_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "test/box.c" + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace lib/"pkgconfig/nlopt.pc", prefix, opt_prefix + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(box C) + find_package(NLopt REQUIRED) + add_executable(box "#{pkgshare}/box.c") + target_link_libraries(box NLopt::nlopt) + CMAKE + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + assert_match "found", shell_output("./build/box") + end +end diff --git a/Formula/n/nmail.rb b/Formula/n/nmail.rb new file mode 100644 index 0000000000000..f870d4d5e08d4 --- /dev/null +++ b/Formula/n/nmail.rb @@ -0,0 +1,51 @@ +class Nmail < Formula + desc "Terminal-based email client for Linux and macOS" + homepage "https://github.com/d99kris/nmail" + url "https://github.com/d99kris/nmail/archive/refs/tags/v5.7.3.tar.gz" + sha256 "d2d1beae33e9f1cbbdc45a1e9fa97bdb414c66a3e6227adf440604e2a040a39c" + license "MIT" + head "https://github.com/d99kris/nmail.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c3d71a6b47462cb5aa2674d9e295a8c3e8a9d63be213584ea8e04fed170b425a" + sha256 cellar: :any, arm64_sequoia: "c44566445971cca9cfa6b0b9da48003b4f0b16853643d04ecac31b0f2e565d77" + sha256 cellar: :any, arm64_sonoma: "9a6b8ead0d9602ac0814d89b0b887c7a0deb4ff88c3cda4dcc453c0f8a1cd93d" + sha256 cellar: :any, sonoma: "bfb7d39aaf383bba2be25173a7200e3ed8d080cb845924a3fe148986af58b751" + sha256 cellar: :any_skip_relocation, arm64_linux: "28b04fe86aac501e36b2a28ac0dda83bee5d2059497e3175f3feb2b96d15ce3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d72151dc0952046508c533f82040698c416cda5fb48d2e09f13cb2be48ba0054" + end + + depends_on "cmake" => :build + depends_on "libmagic" + depends_on "ncurses" + depends_on "openssl@3" + depends_on "xapian" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "expat" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "util-linux" # for libuuid + end + + def install + args = [] + # Workaround to use uuid from Xcode CLT + args << "-DLIBUUID_LIBRARIES=System" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/".nmail/main.conf").write "user = test" + output = shell_output("#{bin}/nmail --confdir #{testpath}/.nmail 2>&1", 1) + assert_match "error: imaphost not specified in config file", output + + assert_match version.to_s, shell_output("#{bin}/nmail --version") + end +end diff --git a/Formula/n/nmap.rb b/Formula/n/nmap.rb new file mode 100644 index 0000000000000..63daff7cd273b --- /dev/null +++ b/Formula/n/nmap.rb @@ -0,0 +1,80 @@ +class Nmap < Formula + desc "Port scanning utility for large networks" + homepage "https://nmap.org/" + url "https://nmap.org/dist/nmap-7.98.tar.bz2" + sha256 "ce847313eaae9e5c9f21708e42d2ab7b56c7e0eb8803729a3092f58886d897e6" + license :cannot_represent + head "https://svn.nmap.org/nmap/" + + livecheck do + url "https://nmap.org/download" + regex(/href=.*?nmap[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 arm64_tahoe: "8b0c683be0468cbabf353946294009fab7e90f0cc2926eb660d85911037078a4" + sha256 arm64_sequoia: "c3acbe15e9c4599441d2c765fcf1791b7c5d51183a6bfe56662f861d1547b11a" + sha256 arm64_sonoma: "d81b6a59b8fe79a572e8b5c26a4cea2e946a42ddac395e78bac36bd422241d7a" + sha256 sonoma: "b3d02143aa6f854448be7dd1b9a240a79fbb293358378269f788b275d9bd968e" + sha256 arm64_linux: "b3e6690a7aec429fa84f4f6281c6c288f84be08bfc4439875008a60359c0c9c6" + sha256 x86_64_linux: "9700259f97a5d42d0c1e9e2c6c2ed03059dd2bc362d2eb45c106219b1fe0ac29" + end + + depends_on "python-setuptools" => :build + depends_on "liblinear" + depends_on "libssh2" + # Check supported Lua version at https://github.com/nmap/nmap/tree/master/liblua. + depends_on "lua" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "python@3.14" # for ndiff + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libpcap" + uses_from_macos "zlib" + + conflicts_with "cern-ndiff", "ndiff", because: "both install `ndiff` binaries" + conflicts_with "nping", because: "both install `nping` binaries" + conflicts_with cask: "zenmap", because: "both install `nmap` binaries" + + def install + # Fix to missing VERSION file + # https://github.com/nmap/nmap/pull/3111 + mv "libpcap/VERSION.txt", "libpcap/VERSION" + + ENV.deparallelize + + libpcap_path = if OS.mac? + MacOS.sdk_path/"usr/" + else + Formula["libpcap"].opt_prefix + end + + args = %W[ + --with-liblua=#{Formula["lua"].opt_prefix} + --with-libpcre=#{Formula["pcre2"].opt_prefix} + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --with-libpcap=#{libpcap_path} + --without-nmap-update + --disable-universal + --without-zenmap + --without-ndiff + ] + + system "./configure", *args, *std_configure_args + system "make" # separate steps required otherwise the build fails + system "make", "install" + + # Install `ndiff` separately so that we can use `pip` and `setuptools`. + system "python3", "-m", "pip", "install", *std_pip_args, "./ndiff" + bin.glob("uninstall_*").map(&:unlink) # Users should use brew uninstall. + end + + test do + system bin/"nmap", "-p80,443", "-oX", "scan1.xml", "google.com" + cp "scan1.xml", "scan2.xml" + system bin/"ndiff", "scan1.xml", "scan2.xml" + end +end diff --git a/Formula/n/nmh.rb b/Formula/n/nmh.rb new file mode 100644 index 0000000000000..4208e078d8d9f --- /dev/null +++ b/Formula/n/nmh.rb @@ -0,0 +1,81 @@ +class Nmh < Formula + desc "New version of the MH mail handler" + homepage "https://www.nongnu.org/nmh/" + url "https://download.savannah.gnu.org/releases/nmh/nmh-1.8.tar.gz" + mirror "https://download-mirror.savannah.gnu.org/releases/nmh/nmh-1.8.tar.gz" + sha256 "366ce0ce3f9447302f5567009269c8bb3882d808f33eefac85ba367e875c8615" + license "BSD-3-Clause" + revision 1 + + livecheck do + url "https://download.savannah.gnu.org/releases/nmh/" + regex(/href=.*?nmh[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a5e47512714ba643f7419b066b01383a222d550272e0cd7e01274302f1b1f492" + sha256 arm64_sequoia: "60f74fdf361c84ce1aad906bb3e44be7d08c7553c8862646e2790eff719df9c3" + sha256 arm64_sonoma: "4b087eeaa03d67b95eab1e96ec6f87f683012adbbbc2d8693d1a99c2003d12a8" + sha256 arm64_ventura: "ca1326e5695a86d075a90e0b1e86916a748df6a376bd851f0d6d8432853660d5" + sha256 arm64_monterey: "89888db63666acb8fc7e909a9e681194506cd51806d1b33c70ccb07802c93dcc" + sha256 arm64_big_sur: "61a5e6e21ff29746bef4ae4d89e86d7bf8f1d625a311c6d0203b8d4aa9eb12c1" + sha256 sonoma: "8c65bdbcf7a531a8a5e10793fe5ce6ae73941f2e589ce6bcda2a093835b8c3ed" + sha256 ventura: "3d599eb842fd242bc921500512f6dd79273dac4de44fd1e9b5b3e2178c974f99" + sha256 monterey: "1baa3243548fd2b34f59d1d5352602ee0a197ef0d91000de5d0aca382eb1cea8" + sha256 big_sur: "f2203024b91015dcc3c00fc690fbf253361ea12f443c97f7290985ea4e0f62c5" + sha256 arm64_linux: "4a390dfd9f429b5730138804bd89c2823531ae7f6aebb654637789f7917512d7" + sha256 x86_64_linux: "b53a0fb7791c968e762ac99a4ed0bc708ba6f0e3c39a7963cb3b29edb3b77845" + end + + head do + url "https://git.savannah.nongnu.org/git/nmh.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "openssl@3" + depends_on "w3m" + + uses_from_macos "cyrus-sasl" + + on_linux do + depends_on "gdbm" + depends_on "readline" + end + + conflicts_with "ali", because: "both install `ali` binaries" + conflicts_with "cargo-dist", because: "both install `dist` binaries" + conflicts_with "pick", because: "both install `pick` binaries" + conflicts_with "repl", because: "both install `repl` binaries" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", "--libdir=#{libexec}", + "--with-cyrus-sasl", + "--with-tls" + system "make", "install" + + # Remove shim references + inreplace prefix/"etc/nmh/mhn.defaults", Superenv.shims_path/"curl", "curl" + end + + test do + (testpath/".mh_profile").write "Path: Mail" + (testpath/"Mail/inbox/1").write <<~EOS + From: Mister Test + To: Mister Nobody + Date: Tue, 5 May 2015 12:00:00 -0000 + Subject: Hello! + + How are you? + EOS + ENV["TZ"] = "GMT" + output = shell_output("#{bin}/scan -width 80") + assert_equal(" 1 05/05 Mister Test Hello!<>\n", output) + end +end diff --git a/Formula/n/nmrpflash.rb b/Formula/n/nmrpflash.rb new file mode 100644 index 0000000000000..45e44a242b095 --- /dev/null +++ b/Formula/n/nmrpflash.rb @@ -0,0 +1,31 @@ +class Nmrpflash < Formula + desc "Netgear Unbrick Utility" + homepage "https://github.com/jclehner/nmrpflash" + url "https://github.com/jclehner/nmrpflash/archive/refs/tags/v0.9.26.tar.gz" + sha256 "51cc37b85b04ff59dda1a5b83ba443d7f577677305aab653855d7c1f78c6d704" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "969c0f20ce2ee2fa3db03f62bc840c992311213e4c90993bf4e5e37c6e57fb59" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "607aebe8626467ea165ccbf446d2d85f478bd2ae69b42c48ae761f55cd80d7a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81d2e99b2b0658aff0212a075bda180876e0d989e652c80b37a40ef24756186b" + sha256 cellar: :any_skip_relocation, sonoma: "34d3bc774d1dff1c65c8ba34a6805e3b0e162f47218fa360b9e8924016772eeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "0cf58744d597c556785ba1d57339c9512e0d8fb350f8daaf3bd97cdbbd9bbeda" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10a48b3841decf47dc994609dff710a5cedbc8d1a54b924935f674344e74265b" + end + + depends_on "pkgconf" => :build + uses_from_macos "libpcap" + + on_linux do + depends_on "libnl" + end + + def install + system "make", "install", "PREFIX=#{prefix}", "VERSION=#{version}" + end + + test do + system bin/"nmrpflash", "-L" + end +end diff --git a/Formula/n/nmstatectl.rb b/Formula/n/nmstatectl.rb new file mode 100644 index 0000000000000..6e5463b23a470 --- /dev/null +++ b/Formula/n/nmstatectl.rb @@ -0,0 +1,36 @@ +class Nmstatectl < Formula + desc "Command-line tool that manages host networking settings in a declarative manner" + homepage "https://nmstate.io/" + url "https://github.com/nmstate/nmstate/releases/download/v2.2.54/nmstate-2.2.54.tar.gz" + sha256 "562517d29e9d6051282e74eb77ca224843268e94b6070dab4d50a957159050c9" + license "Apache-2.0" + head "https://github.com/nmstate/nmstate.git", branch: "base" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3bd77f2897108a26582b434deb8e12baa3acae9383d4786413c11699c5924944" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf50c518ea0663015ec5f2f1b2ffe6b0e84f0e816ad4f9b37ddb3c7be62ac1cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5e6632399240139ee4b77aa37e0bc8a75048f2232aabdc549d5c7cd435352fd" + sha256 cellar: :any_skip_relocation, sonoma: "dfcf4589a0cc908d60f9976fb3a884d586d256014a36f91d6c3277d1207c1da1" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccf4931eebe7a2db12177de68b91792a9fc1a19637656bd944bc50be32f0d208" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8637d5b378382f64e9d4dc6b2358409779b403c3a9418913b293a5617c13e8f" + end + + depends_on "rust" => :build + + def install + cd "rust" do + args = if OS.mac? + ["--no-default-features", "--features", "gen_conf"] + else + [] + end + system "cargo", "install", *args, *std_cargo_args(path: "src/cli") + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/nmstatectl --version") + + assert_match "interfaces: []", pipe_output("#{bin}/nmstatectl format", "{}", 0) + end +end diff --git a/Formula/n/nng.rb b/Formula/n/nng.rb new file mode 100644 index 0000000000000..6ca6718f44963 --- /dev/null +++ b/Formula/n/nng.rb @@ -0,0 +1,48 @@ +class Nng < Formula + desc "Nanomsg-next-generation -- light-weight brokerless messaging" + homepage "https://nng.nanomsg.org/" + url "https://github.com/nanomsg/nng/archive/refs/tags/v1.11.tar.gz" + sha256 "12aaff6f8f183ba0fec378af8620c47cf4be6da975d016ec6cdec2fbac0d3534" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d1c5d69e4cd6874e9fc3a6c7d95e8444c730d7b9d4bddcb74092bf5c53a7b0c4" + sha256 cellar: :any, arm64_sequoia: "c8b949fcace671131602004d36dd682e84a8f11c294121883780bed5c37207e3" + sha256 cellar: :any, arm64_sonoma: "787e01ff6e0b46d61794bb151e18ff2af1dfcb590f2721eb35187c1de60ea3d9" + sha256 cellar: :any, arm64_ventura: "33847914c92079fae13338b6099d547957a33b9142c50196919080a23196a74d" + sha256 cellar: :any, sonoma: "f21583c80dc1ccd84cde614cb8ea7a8b7e7586ecd39aae010583a038e562580d" + sha256 cellar: :any, ventura: "5a4c09d6a83310a8117cbeb2df1f292581a7a32eff9f0c0db6a3d9172b47a6d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "7df32fb58d3135bbeb0b9046534a0fb901dacfddc215546855146b3102c52eeb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25761374c9d2ca6fedff91630fb23e7fe10ae9f68369f7eaaddc1fa5ffc35e6b" + end + + depends_on "asciidoctor" => :build + depends_on "cmake" => :build + depends_on "ninja" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + "-DNNG_ENABLE_DOC=ON", + "-DBUILD_SHARED_LIBS=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + bind = "tcp://127.0.0.1:#{free_port}" + + fork do + exec "#{bin}/nngcat --rep --bind #{bind} --format ascii --data home" + end + sleep 2 + + output = shell_output("#{bin}/nngcat --req --connect #{bind} --format ascii --data brew") + assert_match(/home/, output) + end +end diff --git a/Formula/n/nnn.rb b/Formula/n/nnn.rb new file mode 100644 index 0000000000000..2a65b2b9beb2a --- /dev/null +++ b/Formula/n/nnn.rb @@ -0,0 +1,48 @@ +class Nnn < Formula + desc "Tiny, lightning fast, feature-packed file manager" + homepage "https://github.com/jarun/nnn" + url "https://github.com/jarun/nnn/archive/refs/tags/v5.1.tar.gz" + sha256 "9faaff1e3f5a2fd3ed570a83f6fb3baf0bfc6ebd6a9abac16203d057ac3fffe3" + license "BSD-2-Clause" + head "https://github.com/jarun/nnn.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "653b91dd649f3369be9478ea686a274930f0cf5e17f7c4f67dc6d36ecc2cb06c" + sha256 cellar: :any, arm64_sequoia: "b510e2a0689e2c484874e97b1cf4d3b60cd8a340c40a73b5af35f55a6423c236" + sha256 cellar: :any, arm64_sonoma: "2a771fbab048f10ec2a1a37d44ff0bf130bd3841a1980b6d2e7d4a5e169f95b2" + sha256 cellar: :any, arm64_ventura: "bb1e86d9a75d29a942d51f17b8022e6441758e8e13da0db2e39bb39a1fd8e18d" + sha256 cellar: :any, sonoma: "3e411821ea831bb1ba3b184f70a5944505f2d39f0ee888032f8de1ea5c7ba609" + sha256 cellar: :any, ventura: "56036339638bfde09cdb34ee43fd6d61bcb6142de19e1ce87be7a45144f35a6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cb0f12eb1a3d90865bb9b279feb8788bf7f07c53d992fed8c366ed7972f332f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b947a0ee29bb60bd197e0c8ffd0b8ce7d7c9e6528bfa20e0de08aa2477c03014" + end + + depends_on "gnu-sed" + depends_on "ncurses" + depends_on "readline" + + def install + system "make", "install", "PREFIX=#{prefix}" + + bash_completion.install "misc/auto-completion/bash/nnn-completion.bash" => "nnn" + zsh_completion.install "misc/auto-completion/zsh/_nnn" + fish_completion.install "misc/auto-completion/fish/nnn.fish" + + pkgshare.install "misc/quitcd" + end + + test do + # Test fails on CI: Input/output error @ io_fread - /dev/pts/0 + # Fixing it involves pty/ruby voodoo, which is not worth spending time on + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # Testing this curses app requires a pty + require "pty" + + (testpath/"testdir").mkdir + PTY.spawn(bin/"nnn", testpath/"testdir") do |r, w, _pid| + w.write "q" + assert_match "~/testdir", r.read + end + end +end diff --git a/Formula/n/no-more-secrets.rb b/Formula/n/no-more-secrets.rb new file mode 100644 index 0000000000000..4de9e10a3207b --- /dev/null +++ b/Formula/n/no-more-secrets.rb @@ -0,0 +1,34 @@ +class NoMoreSecrets < Formula + desc "Recreates the SETEC ASTRONOMY effect from 'Sneakers'" + homepage "https://github.com/bartobri/no-more-secrets" + url "https://github.com/bartobri/no-more-secrets/archive/refs/tags/v1.0.1.tar.gz" + sha256 "4422e59bb3cf62bca3c73d1fdae771b83aab686cd044f73fe14b1b9c2af1cb1b" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "78c23f5552c5d2437a61d3fbb592912b97668316aea647d3191542b37e93178d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49db28f730a1161803aea7fc495500e939e07c5b424491c8e55263a3d099a505" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e5b8371902771d0fc72ecc7d5e85ebdbcc4cd84269b5397c6c7e87ad6e13e0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3bdce162d45e3059543b396e4eda6481e47ec9dc3b44e9a8d439262bdcd8fb20" + sha256 cellar: :any_skip_relocation, arm64_monterey: "66520c02cdeb6c76be9f7e64353b63950e3c017ebfeb475a18c87c3b51a380d7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "64fc527581550370d00962142f47e30d3e529e3462d72ababff155b5a13cd73d" + sha256 cellar: :any_skip_relocation, sonoma: "f30996dfb9d1f99eee7b0a2c9097535862ae6fecc76bfc298bbb58d3d8b06de0" + sha256 cellar: :any_skip_relocation, ventura: "a57a747b6547cf76a13b052417fdc76dd0f7ee5dcba5bfdf80720ba04d3adf5d" + sha256 cellar: :any_skip_relocation, monterey: "c8816e4e12990323c34330634bed74f02ebd03c05c666bfd175b50b037b1fda2" + sha256 cellar: :any_skip_relocation, big_sur: "40bfaa531207bce7140398180d44632f1f8574f720295061fb97bfdd14533a3a" + sha256 cellar: :any_skip_relocation, catalina: "badc69153ed6a345eff5282d2ce746395d0d04003ba29c096204c39633c7da06" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f0b0fb1c8cfaf9e204626853b77254ccb9b7fc46182c971e59daf9a2ca41b74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6957194726eb655233552a996c4bb2dc8bae487ee8d4921de039def07118a94a" + end + + def install + system "make", "all" + system "make", "prefix=#{prefix}", "install" + end + + test do + assert_equal "nms version #{version}", shell_output("#{bin}/nms -v").chomp + end +end diff --git a/Formula/n/node-build.rb b/Formula/n/node-build.rb new file mode 100644 index 0000000000000..c9ac5d0f1811c --- /dev/null +++ b/Formula/n/node-build.rb @@ -0,0 +1,30 @@ +class NodeBuild < Formula + desc "Install NodeJS versions" + homepage "https://github.com/nodenv/node-build" + url "https://github.com/nodenv/node-build/archive/refs/tags/v5.4.18.tar.gz" + sha256 "45cc69f4773c2412529e699342422d4ee92dd8bfc12243b8c94b4f5cace1b948" + license "MIT" + head "https://github.com/nodenv/node-build.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7efa2dd4930ca88d577bbbf3194d05d6ca597e18b7892ebaefa55101be969606" + end + + depends_on "autoconf" + depends_on "openssl@3" + depends_on "pkgconf" + + def install + ENV["PREFIX"] = prefix + system "./install.sh" + end + + test do + system bin/"node-build", "--definitions" + end +end diff --git a/Formula/n/node-red.rb b/Formula/n/node-red.rb new file mode 100644 index 0000000000000..d3ce7a1bb685c --- /dev/null +++ b/Formula/n/node-red.rb @@ -0,0 +1,48 @@ +class NodeRed < Formula + desc "Low-code programming for event-driven applications" + homepage "https://nodered.org/" + url "https://registry.npmjs.org/node-red/-/node-red-4.1.1.tgz" + sha256 "bf4e7a0ae54720f6c58580a0743dc6d456fcf7366c18e99feae397f566964381" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5c53555e76240d5f6ed2f4a019f8eb2623b031ba2a5c581abf7adcf61fbe1b6a" + sha256 cellar: :any, arm64_sequoia: "4992118961e560fff7e22f1691b8be464c9b925bef0bd5e3157dd87105d66754" + sha256 cellar: :any, arm64_sonoma: "4992118961e560fff7e22f1691b8be464c9b925bef0bd5e3157dd87105d66754" + sha256 cellar: :any, sonoma: "02b19976489609ae42fc79c44983dc9fa790254ca862f535179e0d2e638bffff" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ead68952ae0654956dd6d4868aa6ed5d8eacc4160b25292646fd8fcf3fa4372" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5df24655ae5a9cb4a02cd9659060dab5f7a668fb9e382161fc9a2a7ac715855f" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + service do + run [opt_bin/"node-red", "--userDir", var/"node-red"] + keep_alive true + require_root true + working_dir var/"node-red" + end + + test do + assert_match version.to_s, shell_output("#{bin}/node-red --version") + + port = free_port + pid = fork do + system bin/"node-red", "--userDir", testpath, "--port", port + end + + begin + sleep 5 + output = shell_output("curl -s http://localhost:#{port}").strip + assert_match "Node-RED", output + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/n/node-sass.rb b/Formula/n/node-sass.rb new file mode 100644 index 0000000000000..5866a8b1fcf57 --- /dev/null +++ b/Formula/n/node-sass.rb @@ -0,0 +1,36 @@ +class NodeSass < Formula + desc "JavaScript implementation of a Sass compiler" + homepage "https://github.com/sass/dart-sass" + url "https://registry.npmjs.org/sass/-/sass-1.93.3.tgz" + sha256 "a6b29b6184c82f3a546b38b54aed0bac5e4f2c8597bfc780a3e2d6a7bc603b1a" + license "MIT" + + bottle do + sha256 arm64_tahoe: "a9ce7d832ec585d2d83453e090ba6f6267d898a467a8e25aab9586acc8f09a67" + sha256 arm64_sequoia: "ce84a55167655ef91c7f8af484c9830311d945664257ee276653b42367e5d0e2" + sha256 arm64_sonoma: "432b932a2d3c40936c644994ec564ab7d4f1dc631df4d477ab539f954a3b2aac" + sha256 sonoma: "fee63a89095e62ecd849722784784cb80c3ef031f0dfb1c39c938037e55cfadd" + sha256 cellar: :any_skip_relocation, arm64_linux: "3dd06c922a30026b5275f8bd56db7e3d24de0b3c990ba87eef58f7ebd8c77cf7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cdfb391d136ac0bc153c01a22f05ac47c05898c552a26b7fc3231d014cf6e93" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.scss").write <<~EOS + div { + img { + border: 0px; + } + } + EOS + + assert_equal "div img{border:0px}", + shell_output("#{bin}/sass --style=compressed test.scss").strip + end +end diff --git a/Formula/n/node.rb b/Formula/n/node.rb new file mode 100644 index 0000000000000..2e25bddb8a59c --- /dev/null +++ b/Formula/n/node.rb @@ -0,0 +1,299 @@ +class Node < Formula + desc "Open-source, cross-platform JavaScript runtime environment" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v25.1.0/node-v25.1.0.tar.xz" + sha256 "ee7741190e47402dfc621547ac23d3f58e6463a86878dc1879fb9e8de1ce3226" + license "MIT" + revision 1 + head "https://github.com/nodejs/node.git", branch: "main" + + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "fadaf30b9c5e512105a08b3542e213086aa8d25c2621b68207f0861e97100310" + sha256 arm64_sequoia: "1340fe4760ee3a744ff90f13f0f22ae6ddb5e3c90070c894198ac95719af6e10" + sha256 arm64_sonoma: "1a330640f0b1dbeb5e60e9809acaa9a4a088fe040aef7682cea5c457099f35db" + sha256 sonoma: "bc3d4077b6fa78885348c9f195cde4e539d423923582b820a9b36661e4e1fbdc" + sha256 arm64_linux: "344672ae7d311362cb68d94e8d19f798fbcbf3c8585481caf2cf68a9ff2c720b" + sha256 x86_64_linux: "7e5bdba8daa6c3ff70bdbbd03dd9f2cd3c8593b010216b80183a9403ee2eadaa" + end + + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "brotli" + depends_on "c-ares" + depends_on "icu4c@77" + depends_on "libnghttp2" + depends_on "libnghttp3" + depends_on "libngtcp2" + depends_on "libuv" + depends_on "openssl@3" + depends_on "simdjson" + depends_on "sqlite" # Fails with macOS sqlite. + depends_on "uvwasi" + depends_on "zstd" + + uses_from_macos "python" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1699 + end + + link_overwrite "bin/npm", "bin/npx" + + # https://github.com/swiftlang/llvm-project/commit/078651b6de4b767b91e3e6a51e5df11a06d7bc4f + fails_with :clang do + build 1699 + cause "needs SFINAE-friendly std::pointer_traits" + end + + # https://github.com/nodejs/node/blob/main/BUILDING.md#supported-toolchains + # https://github.com/ada-url/ada?tab=readme-ov-file#requirements + fails_with :gcc do + version "11" + cause "needs GCC 12 or newer" + end + + # We track major/minor from upstream Node releases. + # We will accept *important* npm patch releases when necessary. + resource "npm" do + url "https://registry.npmjs.org/npm/-/npm-11.6.2.tgz" + sha256 "585f95094ee5cb2788ee11d90f2a518a7c9ef6e083fa141d0b63ca3383675a20" + end + + def install + # make sure subprocesses spawned by make are using our Python 3 + ENV["PYTHON"] = which("python3.14") + + # Ensure Homebrew deps are used + %w[brotli icu-small nghttp2 ngtcp2 npm simdjson sqlite uvwasi zstd].each do |dep| + rm_r buildpath/"deps"/dep + end + + # Never install the bundled "npm", always prefer our + # installation from tarball for better packaging control. + args = %W[ + --prefix=#{prefix} + --without-npm + --with-intl=system-icu + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-nghttp3 + --shared-ngtcp2 + --shared-openssl + --shared-simdjson + --shared-sqlite + --shared-uvwasi + --shared-zlib + --shared-zstd + --shared-brotli-includes=#{Formula["brotli"].include} + --shared-brotli-libpath=#{Formula["brotli"].lib} + --shared-cares-includes=#{Formula["c-ares"].include} + --shared-cares-libpath=#{Formula["c-ares"].lib} + --shared-libuv-includes=#{Formula["libuv"].include} + --shared-libuv-libpath=#{Formula["libuv"].lib} + --shared-nghttp2-includes=#{Formula["libnghttp2"].include} + --shared-nghttp2-libpath=#{Formula["libnghttp2"].lib} + --shared-nghttp3-includes=#{Formula["libnghttp3"].include} + --shared-nghttp3-libpath=#{Formula["libnghttp3"].lib} + --shared-ngtcp2-includes=#{Formula["libngtcp2"].include} + --shared-ngtcp2-libpath=#{Formula["libngtcp2"].lib} + --shared-openssl-includes=#{Formula["openssl@3"].include} + --shared-openssl-libpath=#{Formula["openssl@3"].lib} + --shared-simdjson-includes=#{Formula["simdjson"].include} + --shared-simdjson-libpath=#{Formula["simdjson"].lib} + --shared-sqlite-includes=#{Formula["sqlite"].include} + --shared-sqlite-libpath=#{Formula["sqlite"].lib} + --shared-uvwasi-includes=#{Formula["uvwasi"].include}/uvwasi + --shared-uvwasi-libpath=#{Formula["uvwasi"].lib} + --shared-zstd-includes=#{Formula["zstd"].include} + --shared-zstd-libpath=#{Formula["zstd"].lib} + --openssl-use-def-ca-store + ] + args << "--tag=head" if build.head? + + # TODO: Try to devendor these libraries. + # - `--shared-ada` needs the `ada-url` formula, but requires C++20 + # - `--shared-simdutf` seems to result in build failures. + # - `--shared-http-parser` and `--shared-uvwasi` are not available as dependencies in Homebrew. + ignored_shared_flags = %w[ + ada + http-parser + simdutf + ].map { |library| "--shared-#{library}" } + + configure_help = Utils.safe_popen_read("./configure", "--help") + shared_flag_regex = /\[(--shared-[^ \]]+)\]/ + configure_help.scan(shared_flag_regex) do |matches| + matches.each do |flag| + next if args.include?(flag) || ignored_shared_flags.include?(flag) + + message = "Unused `--shared-*` flag: #{flag}" + if build.head? + opoo message + else + odie message + end + end + end + + # Enabling LTO errors on Linux with: + # terminate called after throwing an instance of 'std::out_of_range' + # macOS also can't build with LTO when using LLVM Clang + # LTO is unpleasant if you have to build from source. + # FIXME: re-enable me, currently crashes sequoia runner after 6 hours + # args << "--enable-lto" if OS.mac? && DevelopmentTools.clang_build_version > 1699 && build.bottle? + + system "./configure", *args + system "make", "install" + + # Allow npm to find Node before installation has completed. + ENV.prepend_path "PATH", bin + + bootstrap = buildpath/"npm_bootstrap" + bootstrap.install resource("npm") + # These dirs must exists before npm install. + mkdir_p libexec/"lib" + system "node", bootstrap/"bin/npm-cli.js", "install", "-ddd", "--global", + "--prefix=#{libexec}", resource("npm").cached_download + + # The `package.json` stores integrity information about the above passed + # in `cached_download` npm resource, which breaks `npm -g outdated npm`. + # This copies back over the vanilla `package.json` to fix this issue. + cp bootstrap/"package.json", libexec/"lib/node_modules/npm" + + # These symlinks are never used & they've caused issues in the past. + rm_r libexec/"share" if (libexec/"share").exist? + + # Create temporary npm and npx symlinks until post_install is done. + ln_s libexec/"lib/node_modules/npm/bin/npm-cli.js", bin/"npm" + ln_s libexec/"lib/node_modules/npm/bin/npx-cli.js", bin/"npx" + + generate_completions_from_executable(bin/"npm", "completion", + shells: [:bash, :zsh], + shell_parameter_format: :none) + end + + def post_install + node_modules = HOMEBREW_PREFIX/"lib/node_modules" + node_modules.mkpath + # Remove npm but preserve all other modules across node updates/upgrades. + rm_r node_modules/"npm" if (node_modules/"npm").exist? + + cp_r libexec/"lib/node_modules/npm", node_modules + # This symlink doesn't hop into homebrew_prefix/bin automatically so + # we make our own. This is a small consequence of our + # bottle-npm-and-retain-a-private-copy-in-libexec setup + # All other installs **do** symlink to homebrew_prefix/bin correctly. + # We ln rather than cp this because doing so mimics npm's normal install. + ln_sf node_modules/"npm/bin/npm-cli.js", bin/"npm" + ln_sf node_modules/"npm/bin/npx-cli.js", bin/"npx" + ln_sf bin/"npm", HOMEBREW_PREFIX/"bin/npm" + ln_sf bin/"npx", HOMEBREW_PREFIX/"bin/npx" + + # Create manpage symlinks (or overwrite the old ones) + %w[man1 man5 man7].each do |man| + # Dirs must exist first: https://github.com/Homebrew/legacy-homebrew/issues/35969 + mkdir_p HOMEBREW_PREFIX/"share/man/#{man}" + # still needed to migrate from copied file manpages to symlink manpages + rm(Dir[HOMEBREW_PREFIX/"share/man/#{man}/{npm.,npm-,npmrc.,package.json.,npx.}*"]) + ln_sf Dir[node_modules/"npm/man/#{man}/{npm,package-,shrinkwrap-,npx}*"], HOMEBREW_PREFIX/"share/man/#{man}" + end + + (node_modules/"npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") + end + + test do + path = testpath/"test.js" + path.write "console.log('hello');" + + output = shell_output("#{bin}/node #{path}").strip + assert_equal "hello", output + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip + assert_equal "1,234.56", output + + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip + assert_equal "1.234,56", output + + # make sure npm can find node + ENV.prepend_path "PATH", opt_bin + ENV.delete "NVM_NODEJS_ORG_MIRROR" + assert_equal which("node"), opt_bin/"node" + assert_path_exists HOMEBREW_PREFIX/"bin/npm", "npm must exist" + assert_predicate HOMEBREW_PREFIX/"bin/npm", :executable?, "npm must be executable" + npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] + system HOMEBREW_PREFIX/"bin/npm", *npm_args, "install", "npm@latest" + system HOMEBREW_PREFIX/"bin/npm", *npm_args, "install", "nan" + assert_path_exists HOMEBREW_PREFIX/"bin/npx", "npx must exist" + assert_predicate HOMEBREW_PREFIX/"bin/npx", :executable?, "npx must be executable" + assert_match "< hello >", shell_output("#{HOMEBREW_PREFIX}/bin/npx --yes cowsay hello") + + # Test `uvwasi` is linked correctly + (testpath/"wasi-smoke-test.mjs").write <<~JAVASCRIPT + import { WASI } from 'node:wasi'; + + // Minimal WASM that: + // - imports wasi proc_exit(i32)->() + // - exports memory (required by Node's WASI binding) + // - exports _start which calls proc_exit(42) + const wasmBytes = new Uint8Array([ + // \0asm + version + 0x00,0x61,0x73,0x6d, 0x01,0x00,0x00,0x00, + + // Type section: 2 types: (i32)->() and ()->() + 0x01,0x08, 0x02, + 0x60,0x01,0x7f,0x00, + 0x60,0x00,0x00, + + // Import section: wasi_snapshot_preview1.proc_exit : func(type 0) + 0x02,0x24, 0x01, + 0x16, // module name len = 22 + 0x77,0x61,0x73,0x69,0x5f,0x73,0x6e,0x61,0x70,0x73,0x68,0x6f,0x74,0x5f,0x70,0x72,0x65,0x76,0x69,0x65,0x77,0x31, + 0x09, // name len = 9 + 0x70,0x72,0x6f,0x63,0x5f,0x65,0x78,0x69,0x74, + 0x00, // import kind = func + 0x00, // type index 0 + + // Function section: 1 function (type index 1 = ()->()) + 0x03,0x02, 0x01, 0x01, + + // Memory section: one memory with min=1 page; export later + 0x05,0x03, 0x01, 0x00, 0x01, + + // Export section: export "_start" (func 1) and "memory" (mem 0) + 0x07,0x13, 0x02, + 0x06, 0x5f,0x73,0x74,0x61,0x72,0x74, 0x00, 0x01, + 0x06, 0x6d,0x65,0x6d,0x6f,0x72,0x79, 0x02, 0x00, + + // Code section: body for func 1: i32.const 42; call 0; end + 0x0a,0x08, 0x01, + 0x06, 0x00, 0x41,0x2a, 0x10,0x00, 0x0b + ]); + + const wasi = new WASI({ + version: 'preview1', + returnOnExit: true + }); + + const { instance } = await WebAssembly.instantiate(wasmBytes, wasi.getImportObject()); + + // This should return 42 if uvwasi is correctly linked & wired. + const rc = wasi.start(instance); + if (rc === 42) { + console.log('PASS: uvwasi proc_exit(42) worked (exitCode=42)'); + process.exit(0); + } else { + console.error('FAIL: unexpected return', rc); + process.exit(2); + } + JAVASCRIPT + + system bin/"node", "wasi-smoke-test.mjs" + end +end diff --git a/Formula/n/node@18.rb b/Formula/n/node@18.rb new file mode 100644 index 0000000000000..09307a89cefc1 --- /dev/null +++ b/Formula/n/node@18.rb @@ -0,0 +1,127 @@ +class NodeAT18 < Formula + desc "Open-source, cross-platform JavaScript runtime environment" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v18.20.8/node-v18.20.8.tar.xz" + sha256 "36a7bf1a76d62ce4badd881ee5974a323c70e1d8d19165732684e145632460d9" + license "MIT" + + bottle do + sha256 arm64_tahoe: "99e7e2eb7d40cae9e51afac2f7c67921c7a4a72100ffd3c2a45d90db142d5020" + sha256 arm64_sequoia: "85339a0121bfd4eade3f70a49197c59fd1d0dee18511edf924d4acf4d81cc012" + sha256 arm64_sonoma: "cce72f3a40cb31861f419e0ea364cf0581e6f59b28f3e5c00196ccdea6a9f295" + sha256 arm64_ventura: "abf275d5c731c19cc83cac346960ee3d53e845c35e1cb04278d31e26a9aad9ec" + sha256 sonoma: "5d6cc20ba0c4f0e75534b961530c236222d2f11b8fb5dd890f0f2f7d71d778cb" + sha256 ventura: "979121dc9e057de08c03b75690f3111b7d3bfb03974299bc340166441f0a3ce8" + sha256 arm64_linux: "006629948d696eaebdc65531418f095b71e4f3fd66e966f594f61021137c771c" + sha256 x86_64_linux: "47a91f8bf2f6c0915eebc7793c97ea3d980d292c0242e1cc376e621fbb9d18d5" + end + + keg_only :versioned_formula + + # https://github.com/nodejs/release#release-schedule + deprecate! date: "2024-10-29", because: :unsupported + disable! date: "2025-10-29", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.13" => :build + depends_on "brotli" + depends_on "c-ares" + depends_on "icu4c@77" + depends_on "libnghttp2" + depends_on "libuv" + depends_on "openssl@3" + + uses_from_macos "python" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause <<~EOS + error: calling a private constructor of class 'v8::internal::(anonymous namespace)::RegExpParserImpl' + EOS + end + + # Backport support for ICU 76+ + patch do + url "https://github.com/nodejs/node/commit/81517faceac86497b3c8717837f491aa29a5e0f9.patch?full_index=1" + sha256 "79a5489617665c5c88651a7dc364b8967bebdea5bdf361b85572d041a4768662" + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + # Fix to avoid fdopen() redefinition for vendored `zlib` + # Too many commits to backport, so apply a workaround + if OS.mac? && DevelopmentTools.clang_build_version >= 1700 + inreplace "deps/v8/third_party/zlib/zutil.h", + "# define fdopen(fd,mode) NULL /* No fdopen() */", + "" + end + + # make sure subprocesses spawned by make are using our Python 3 + ENV["PYTHON"] = which("python3.13") + + args = %W[ + --prefix=#{prefix} + --with-intl=system-icu + --shared-libuv + --shared-nghttp2 + --shared-openssl + --shared-zlib + --shared-brotli + --shared-cares + --shared-libuv-includes=#{Formula["libuv"].include} + --shared-libuv-libpath=#{Formula["libuv"].lib} + --shared-nghttp2-includes=#{Formula["libnghttp2"].include} + --shared-nghttp2-libpath=#{Formula["libnghttp2"].lib} + --shared-openssl-includes=#{Formula["openssl@3"].include} + --shared-openssl-libpath=#{Formula["openssl@3"].lib} + --shared-brotli-includes=#{Formula["brotli"].include} + --shared-brotli-libpath=#{Formula["brotli"].lib} + --shared-cares-includes=#{Formula["c-ares"].include} + --shared-cares-libpath=#{Formula["c-ares"].lib} + --openssl-use-def-ca-store + ] + + system "./configure", *args + system "make", "install" + end + + def post_install + (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") + end + + test do + # Make sure Mojave does not have `CC=llvm_clang`. + ENV.clang if OS.mac? + + path = testpath/"test.js" + path.write "console.log('hello');" + + output = shell_output("#{bin}/node #{path}").strip + assert_equal "hello", output + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip + assert_equal "1,234.56", output + + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip + assert_equal "1.234,56", output + + # make sure npm can find node + ENV.prepend_path "PATH", opt_bin + ENV.delete "NVM_NODEJS_ORG_MIRROR" + assert_equal which("node"), opt_bin/"node" + assert_path_exists bin/"npm", "npm must exist" + assert_predicate bin/"npm", :executable?, "npm must be executable" + npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] + system bin/"npm", *npm_args, "install", "npm@latest" + system bin/"npm", *npm_args, "install", "ref-napi" + assert_path_exists bin/"npx", "npx must exist" + assert_predicate bin/"npx", :executable?, "npx must be executable" + assert_match "< hello >", shell_output("#{bin}/npx --yes cowsay hello") + end +end diff --git a/Formula/n/node@20.rb b/Formula/n/node@20.rb new file mode 100644 index 0000000000000..e40999aa08e6c --- /dev/null +++ b/Formula/n/node@20.rb @@ -0,0 +1,125 @@ +class NodeAT20 < Formula + desc "Open-source, cross-platform JavaScript runtime environment" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v20.19.5/node-v20.19.5.tar.xz" + sha256 "230c899f4e2489c4b8d2232edd6cc02f384fb2397c2a246a22e415837ee5da51" + license "MIT" + + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(20(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "8d0dbbb89c386dba33d36aa7f2a73ff8e0c0d4ec86b5050e368b9715ea679f2e" + sha256 arm64_sequoia: "60022a7ebf3aabb93a056c4787f398ed4f4b8ebd064fa5a55a4ea882594bb3be" + sha256 arm64_sonoma: "6d90b4f115316dbf59eaf860168191927b540d74ca1e600a78c97e2df5e976ca" + sha256 arm64_ventura: "857c08c4a6adf986603529735a28d6ee32783f3c45a24d7fdf7fed3edf32671e" + sha256 sonoma: "6e35d56a97fee410d1157542ae1f892458fea90ea50612a923c5a34857c43c58" + sha256 ventura: "d0254c738b1f4bab3969e9c83caab8d6643737d40d1db5c41d00cc7091e1e5cb" + sha256 arm64_linux: "f9156ec5197ebc708346e6308c4b06303340320750588470892551951adeefa6" + sha256 x86_64_linux: "d0a7e156cb5aaca2678478360c593410e6fbb115d42d40045ce3d6e4187c265e" + end + + keg_only :versioned_formula + + # https://github.com/nodejs/release#release-schedule + # disable! date: "2026-04-30", because: :unsupported + deprecate! date: "2025-10-28", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "brotli" + depends_on "c-ares" + depends_on "icu4c@77" + depends_on "libnghttp2" + depends_on "libuv" + depends_on "openssl@3" + + uses_from_macos "python" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => [:build, :test] if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause <<~EOS + error: calling a private constructor of class 'v8::internal::(anonymous namespace)::RegExpParserImpl' + EOS + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + # The new linker crashed during LTO due to high memory usage. + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + # make sure subprocesses spawned by make are using our Python 3 + ENV["PYTHON"] = which("python3.13") + + args = %W[ + --prefix=#{prefix} + --with-intl=system-icu + --shared-libuv + --shared-nghttp2 + --shared-openssl + --shared-zlib + --shared-brotli + --shared-cares + --shared-libuv-includes=#{Formula["libuv"].include} + --shared-libuv-libpath=#{Formula["libuv"].lib} + --shared-nghttp2-includes=#{Formula["libnghttp2"].include} + --shared-nghttp2-libpath=#{Formula["libnghttp2"].lib} + --shared-openssl-includes=#{Formula["openssl@3"].include} + --shared-openssl-libpath=#{Formula["openssl@3"].lib} + --shared-brotli-includes=#{Formula["brotli"].include} + --shared-brotli-libpath=#{Formula["brotli"].lib} + --shared-cares-includes=#{Formula["c-ares"].include} + --shared-cares-libpath=#{Formula["c-ares"].lib} + --openssl-use-def-ca-store + ] + + # Enabling LTO errors on Linux with: + # terminate called after throwing an instance of 'std::out_of_range' + # LTO is unpleasant if you have to build from source. + args << "--enable-lto" if OS.mac? && build.bottle? + + system "./configure", *args + system "make", "install" + end + + def post_install + (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") + end + + test do + # Make sure Mojave does not have `CC=llvm_clang`. + ENV.clang if OS.mac? + + path = testpath/"test.js" + path.write "console.log('hello');" + + output = shell_output("#{bin}/node #{path}").strip + assert_equal "hello", output + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip + assert_equal "1,234.56", output + + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip + assert_equal "1.234,56", output + + # make sure npm can find node + ENV.prepend_path "PATH", opt_bin + ENV.delete "NVM_NODEJS_ORG_MIRROR" + assert_equal which("node"), opt_bin/"node" + assert_path_exists bin/"npm", "npm must exist" + assert_predicate bin/"npm", :executable?, "npm must be executable" + npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] + system bin/"npm", *npm_args, "install", "npm@latest" + system bin/"npm", *npm_args, "install", "ref-napi" + assert_path_exists bin/"npx", "npx must exist" + assert_predicate bin/"npx", :executable?, "npx must be executable" + assert_match "< hello >", shell_output("#{bin}/npx --yes cowsay hello") + end +end diff --git a/Formula/n/node@22.rb b/Formula/n/node@22.rb new file mode 100644 index 0000000000000..de5871fccd933 --- /dev/null +++ b/Formula/n/node@22.rb @@ -0,0 +1,167 @@ +class NodeAT22 < Formula + desc "Open-source, cross-platform JavaScript runtime environment" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v22.21.1/node-v22.21.1.tar.xz" + sha256 "487d73fd4db00dc2420d659a8221b181a7937fbc5bc73f31c30b1680ad6ded6a" + license "MIT" + revision 1 + + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(22(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "8aee852e2f2891885119db8e04bdf71c9781f4061d0d8a6b403d54050eec6ac3" + sha256 arm64_sequoia: "113d3e335483c6b98d895243f93c365fe9b7f278bf28ee76cc30b0e296d0c015" + sha256 arm64_sonoma: "fb34128bfc83ed31d90da10ffb913634fe743e0db3358fb8e8058f92a17b2983" + sha256 sonoma: "f687500ccaae0e3b22bb0dc3ca5e674c06dc68e9925692a0a4fdb85b4ee8a9db" + sha256 arm64_linux: "6cdce98be0e62ff548b3f5af6cda56e8603d7a855c706fb31e8390168b69cd7f" + sha256 x86_64_linux: "0b5404ca2c4eac3c862d340ee8b0a951970cb159a3884eed34bad930588c57c2" + end + + keg_only :versioned_formula + + # https://github.com/nodejs/release#release-schedule + # disable! date: "2027-04-30", because: :unsupported + deprecate! date: "2026-10-28", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "brotli" + depends_on "c-ares" + depends_on "icu4c@77" + depends_on "libnghttp2" + depends_on "libnghttp3" + depends_on "libngtcp2" + depends_on "libuv" + depends_on "openssl@3" + depends_on "simdjson" + depends_on "simdutf" + depends_on "sqlite" + depends_on "uvwasi" + depends_on "zstd" + + uses_from_macos "python" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause <<~EOS + error: calling a private constructor of class 'v8::internal::(anonymous namespace)::RegExpParserImpl' + EOS + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + # make sure subprocesses spawned by make are using our Python 3 + ENV["PYTHON"] = which("python3.13") + + args = %W[ + --prefix=#{prefix} + --with-intl=system-icu + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-nghttp3 + --shared-ngtcp2 + --shared-openssl + --shared-simdjson + --shared-simdutf + --shared-sqlite + --shared-uvwasi + --shared-zlib + --shared-zstd + --shared-brotli-includes=#{Formula["brotli"].include} + --shared-brotli-libpath=#{Formula["brotli"].lib} + --shared-cares-includes=#{Formula["c-ares"].include} + --shared-cares-libpath=#{Formula["c-ares"].lib} + --shared-libuv-includes=#{Formula["libuv"].include} + --shared-libuv-libpath=#{Formula["libuv"].lib} + --shared-nghttp2-includes=#{Formula["libnghttp2"].include} + --shared-nghttp2-libpath=#{Formula["libnghttp2"].lib} + --shared-nghttp3-includes=#{Formula["libnghttp3"].include} + --shared-nghttp3-libpath=#{Formula["libnghttp3"].lib} + --shared-ngtcp2-includes=#{Formula["libngtcp2"].include} + --shared-ngtcp2-libpath=#{Formula["libngtcp2"].lib} + --shared-openssl-includes=#{Formula["openssl@3"].include} + --shared-openssl-libpath=#{Formula["openssl@3"].lib} + --shared-simdjson-includes=#{Formula["simdjson"].include} + --shared-simdjson-libpath=#{Formula["simdjson"].lib} + --shared-simdutf-includes=#{Formula["simdutf"].include} + --shared-simdutf-libpath=#{Formula["simdutf"].lib} + --shared-sqlite-includes=#{Formula["sqlite"].include} + --shared-sqlite-libpath=#{Formula["sqlite"].lib} + --shared-uvwasi-includes=#{Formula["uvwasi"].include}/uvwasi + --shared-uvwasi-libpath=#{Formula["uvwasi"].lib} + --shared-zstd-includes=#{Formula["zstd"].include} + --shared-zstd-libpath=#{Formula["zstd"].lib} + --openssl-use-def-ca-store + ] + + # Enabling LTO errors on Linux with: + # terminate called after throwing an instance of 'std::out_of_range' + # LTO is unpleasant if you have to build from source. + args << "--enable-lto" if OS.mac? && build.bottle? + + # TODO: Try to devendor these libraries. + # - `--shared-ada` needs the `ada-url` formula, but requires C++20 + # - `--shared-http-parser` and `--shared-uvwasi` are not available as dependencies in Homebrew. + ignored_shared_flags = %w[ + ada + http-parser + ].map { |library| "--shared-#{library}" } + + configure_help = Utils.safe_popen_read("./configure", "--help") + shared_flag_regex = /\[(--shared-[^ \]]+)\]/ + configure_help.scan(shared_flag_regex) do |matches| + matches.each do |flag| + next if args.include?(flag) || ignored_shared_flags.include?(flag) + + odie "Unused `--shared-*` flag: #{flag}" + end + end + + system "./configure", *args + system "make", "install" + end + + def post_install + (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") + end + + test do + # Make sure Mojave does not have `CC=llvm_clang`. + ENV.clang if OS.mac? + + path = testpath/"test.js" + path.write "console.log('hello');" + + output = shell_output("#{bin}/node #{path}").strip + assert_equal "hello", output + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip + assert_equal "1,234.56", output + + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip + assert_equal "1.234,56", output + + # make sure npm can find node + ENV.prepend_path "PATH", opt_bin + ENV.delete "NVM_NODEJS_ORG_MIRROR" + assert_equal which("node"), opt_bin/"node" + assert_path_exists bin/"npm", "npm must exist" + assert_predicate bin/"npm", :executable?, "npm must be executable" + npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] + system bin/"npm", *npm_args, "install", "npm@latest" + system bin/"npm", *npm_args, "install", "nan" + assert_path_exists bin/"npx", "npx must exist" + assert_predicate bin/"npx", :executable?, "npx must be executable" + assert_match "< hello >", shell_output("#{bin}/npx --yes cowsay hello") + end +end diff --git a/Formula/n/node@24.rb b/Formula/n/node@24.rb new file mode 100644 index 0000000000000..8ade8dda1b47a --- /dev/null +++ b/Formula/n/node@24.rb @@ -0,0 +1,235 @@ +class NodeAT24 < Formula + desc "Open-source, cross-platform JavaScript runtime environment" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v24.11.0/node-v24.11.0.tar.xz" + sha256 "cf9c906d46446471f955b1f2c6ace8a461501d82d27e1ae8595dcb3b0e2c312a" + license "MIT" + revision 1 + + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(24(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "041314daeef221105568200e5cb7f42b8b6a2f735eaae150f660127342ae5941" + sha256 arm64_sequoia: "d184edef1decd6d4856d48917f796acd19588efb919af702b443ab8134e06002" + sha256 arm64_sonoma: "7167c67030a93f9c922ea238e3ec57c639093efb09279a0d6f7a302f419eddc7" + sha256 sonoma: "8fd5a97245edf0dab889de9c3a34174da9a6c3ae195128428457c71071d27f31" + sha256 arm64_linux: "2dd9fc94c4483315f5bc95cd72b2832a108bc45e84f086a49dae5bb9bb423054" + sha256 x86_64_linux: "f578381665339bbc7c9ea6a2488430ad77b4c7daed7bcaca5b91c6b2337540a6" + end + + keg_only :versioned_formula + + # https://github.com/nodejs/release#release-schedule + # disable! date: "2028-04-30", because: :unsupported + deprecate! date: "2027-04-30", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "brotli" + depends_on "c-ares" + depends_on "icu4c@77" + depends_on "libnghttp2" + depends_on "libnghttp3" + depends_on "libngtcp2" + depends_on "libuv" + depends_on "openssl@3" + depends_on "simdjson" + depends_on "sqlite" # Fails with macOS sqlite. + depends_on "uvwasi" + depends_on "zstd" + + uses_from_macos "python" + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1699 + end + + # https://github.com/swiftlang/llvm-project/commit/078651b6de4b767b91e3e6a51e5df11a06d7bc4f + fails_with :clang do + build 1699 + cause "needs SFINAE-friendly std::pointer_traits" + end + + # https://github.com/nodejs/node/blob/main/BUILDING.md#supported-toolchains + # https://github.com/ada-url/ada?tab=readme-ov-file#requirements + fails_with :gcc do + version "11" + cause "needs GCC 12 or newer" + end + + def install + # make sure subprocesses spawned by make are using our Python 3 + ENV["PYTHON"] = which("python3.13") + + # Ensure Homebrew deps are used + %w[brotli icu-small nghttp2 ngtcp2 simdjson sqlite uvwasi zstd].each do |dep| + rm_r buildpath/"deps"/dep + end + + args = %W[ + --prefix=#{prefix} + --with-intl=system-icu + --shared-brotli + --shared-cares + --shared-libuv + --shared-nghttp2 + --shared-nghttp3 + --shared-ngtcp2 + --shared-openssl + --shared-simdjson + --shared-sqlite + --shared-uvwasi + --shared-zlib + --shared-zstd + --shared-brotli-includes=#{Formula["brotli"].include} + --shared-brotli-libpath=#{Formula["brotli"].lib} + --shared-cares-includes=#{Formula["c-ares"].include} + --shared-cares-libpath=#{Formula["c-ares"].lib} + --shared-libuv-includes=#{Formula["libuv"].include} + --shared-libuv-libpath=#{Formula["libuv"].lib} + --shared-nghttp2-includes=#{Formula["libnghttp2"].include} + --shared-nghttp2-libpath=#{Formula["libnghttp2"].lib} + --shared-nghttp3-includes=#{Formula["libnghttp3"].include} + --shared-nghttp3-libpath=#{Formula["libnghttp3"].lib} + --shared-ngtcp2-includes=#{Formula["libngtcp2"].include} + --shared-ngtcp2-libpath=#{Formula["libngtcp2"].lib} + --shared-openssl-includes=#{Formula["openssl@3"].include} + --shared-openssl-libpath=#{Formula["openssl@3"].lib} + --shared-simdjson-includes=#{Formula["simdjson"].include} + --shared-simdjson-libpath=#{Formula["simdjson"].lib} + --shared-sqlite-includes=#{Formula["sqlite"].include} + --shared-sqlite-libpath=#{Formula["sqlite"].lib} + --shared-uvwasi-includes=#{Formula["uvwasi"].include}/uvwasi + --shared-uvwasi-libpath=#{Formula["uvwasi"].lib} + --shared-zstd-includes=#{Formula["zstd"].include} + --shared-zstd-libpath=#{Formula["zstd"].lib} + --openssl-use-def-ca-store + ] + + # Enabling LTO errors on Linux with: + # terminate called after throwing an instance of 'std::out_of_range' + # macOS also can't build with LTO when using LLVM Clang + # LTO is unpleasant if you have to build from source. + # FIXME: re-enable me, currently crashes sequoia runner after 6 hours + # args << "--enable-lto" if OS.mac? && DevelopmentTools.clang_build_version > 1699 && build.bottle? + + # TODO: Try to devendor these libraries. + # - `--shared-ada` needs the `ada-url` formula, but requires C++20 + # - `--shared-simdutf` seems to result in build failures. + # - `--shared-http-parser` and `--shared-uvwasi` are not available as dependencies in Homebrew. + ignored_shared_flags = %w[ + ada + http-parser + simdutf + ].map { |library| "--shared-#{library}" } + + configure_help = Utils.safe_popen_read("./configure", "--help") + shared_flag_regex = /\[(--shared-[^ \]]+)\]/ + configure_help.scan(shared_flag_regex) do |matches| + matches.each do |flag| + next if args.include?(flag) || ignored_shared_flags.include?(flag) + + odie "Unused `--shared-*` flag: #{flag}" + end + end + + system "./configure", *args + system "make", "install" + end + + def post_install + (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") + end + + test do + path = testpath/"test.js" + path.write "console.log('hello');" + + output = shell_output("#{bin}/node #{path}").strip + assert_equal "hello", output + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip + assert_equal "1,234.56", output + + output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip + assert_equal "1.234,56", output + + # make sure npm can find node + ENV.prepend_path "PATH", opt_bin + ENV.delete "NVM_NODEJS_ORG_MIRROR" + assert_equal which("node"), opt_bin/"node" + assert_path_exists bin/"npm", "npm must exist" + assert_predicate bin/"npm", :executable?, "npm must be executable" + npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] + system bin/"npm", *npm_args, "install", "npm@latest" + system bin/"npm", *npm_args, "install", "nan" + assert_path_exists bin/"npx", "npx must exist" + assert_predicate bin/"npx", :executable?, "npx must be executable" + assert_match "< hello >", shell_output("#{bin}/npx --yes cowsay hello") + + # Test `uvwasi` is linked correctly + (testpath/"wasi-smoke-test.mjs").write <<~JAVASCRIPT + import { WASI } from 'node:wasi'; + + // Minimal WASM that: + // - imports wasi proc_exit(i32)->() + // - exports memory (required by Node's WASI binding) + // - exports _start which calls proc_exit(42) + const wasmBytes = new Uint8Array([ + // \0asm + version + 0x00,0x61,0x73,0x6d, 0x01,0x00,0x00,0x00, + + // Type section: 2 types: (i32)->() and ()->() + 0x01,0x08, 0x02, + 0x60,0x01,0x7f,0x00, + 0x60,0x00,0x00, + + // Import section: wasi_snapshot_preview1.proc_exit : func(type 0) + 0x02,0x24, 0x01, + 0x16, // module name len = 22 + 0x77,0x61,0x73,0x69,0x5f,0x73,0x6e,0x61,0x70,0x73,0x68,0x6f,0x74,0x5f,0x70,0x72,0x65,0x76,0x69,0x65,0x77,0x31, + 0x09, // name len = 9 + 0x70,0x72,0x6f,0x63,0x5f,0x65,0x78,0x69,0x74, + 0x00, // import kind = func + 0x00, // type index 0 + + // Function section: 1 function (type index 1 = ()->()) + 0x03,0x02, 0x01, 0x01, + + // Memory section: one memory with min=1 page; export later + 0x05,0x03, 0x01, 0x00, 0x01, + + // Export section: export "_start" (func 1) and "memory" (mem 0) + 0x07,0x13, 0x02, + 0x06, 0x5f,0x73,0x74,0x61,0x72,0x74, 0x00, 0x01, + 0x06, 0x6d,0x65,0x6d,0x6f,0x72,0x79, 0x02, 0x00, + + // Code section: body for func 1: i32.const 42; call 0; end + 0x0a,0x08, 0x01, + 0x06, 0x00, 0x41,0x2a, 0x10,0x00, 0x0b + ]); + + const wasi = new WASI({ + version: 'preview1', + returnOnExit: true + }); + + const { instance } = await WebAssembly.instantiate(wasmBytes, wasi.getImportObject()); + + // This should return 42 if uvwasi is correctly linked & wired. + const rc = wasi.start(instance); + if (rc === 42) { + console.log('PASS: uvwasi proc_exit(42) worked (exitCode=42)'); + process.exit(0); + } else { + console.error('FAIL: unexpected return', rc); + process.exit(2); + } + JAVASCRIPT + + system bin/"node", "wasi-smoke-test.mjs" + end +end diff --git a/Formula/n/node_exporter.rb b/Formula/n/node_exporter.rb new file mode 100644 index 0000000000000..fa38374831ec1 --- /dev/null +++ b/Formula/n/node_exporter.rb @@ -0,0 +1,63 @@ +class NodeExporter < Formula + desc "Prometheus exporter for machine metrics" + homepage "https://prometheus.io/" + url "https://github.com/prometheus/node_exporter/archive/refs/tags/v1.10.2.tar.gz" + sha256 "aeb88ad980fd87ee08b1b3e5c70977c32065115cc8152e3fc846e2d60b2a662f" + license "Apache-2.0" + head "https://github.com/prometheus/node_exporter.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f221086f0c4d0faf31f467605f6ac41e9111836a1e2c0411c7452c30f45b378" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e314e1b9ea5776a9a985db9dcab4bdf28e184b57f14c8e40d7b71062bfce3e44" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37234e077521900645ffcec0585ad20637d8849fa7b2fc49c32fba8782f4c87a" + sha256 cellar: :any_skip_relocation, sonoma: "db269f3eb33791698f3cc0ec9be4caa50e13de7586b863ad7b192c3bed04dc60" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbf70540445b072f8d6ac83d0720e656dea7b8ccd97eb5c0ef5e4f109e97345e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba514952afa5b376f711f35be1ee2ba1b6532824771e762c0c59d5d83a6033ba" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/prometheus/common/version.Version=#{version} + -X github.com/prometheus/common/version.BuildUser=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + touch etc/"node_exporter.args" + + (bin/"node_exporter_brew_services").write <<~BASH + #!/bin/bash + exec #{bin}/node_exporter $(<#{etc}/node_exporter.args) + BASH + end + + def caveats + <<~EOS + When run from `brew services`, `node_exporter` is run from + `node_exporter_brew_services` and uses the flags in: + #{etc}/node_exporter.args + EOS + end + + service do + run [opt_bin/"node_exporter_brew_services"] + keep_alive false + log_path var/"log/node_exporter.log" + error_log_path var/"log/node_exporter.err.log" + end + + test do + assert_match "node_exporter", shell_output("#{bin}/node_exporter --version 2>&1") + + fork { exec bin/"node_exporter" } + sleep 2 + assert_match "# HELP", shell_output("curl -s localhost:9100/metrics") + end +end diff --git a/Formula/n/nodebrew.rb b/Formula/n/nodebrew.rb new file mode 100644 index 0000000000000..31bf8609ca60d --- /dev/null +++ b/Formula/n/nodebrew.rb @@ -0,0 +1,38 @@ +class Nodebrew < Formula + desc "Node.js version manager" + homepage "https://github.com/hokaccha/nodebrew" + url "https://github.com/hokaccha/nodebrew/archive/refs/tags/v1.2.0.tar.gz" + sha256 "6d72e39c8acc5b22f4fc7a1734cd3bb8d00b61119ab7fea6cde376810ff2005e" + license "MIT" + head "https://github.com/hokaccha/nodebrew.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "bd835b02ed3b28570708b7c98d0ea7a761c53f561544496d07728c9adf3502e2" + end + + def install + bin.install "nodebrew" + bash_completion.install "completions/bash/nodebrew-completion" => "nodebrew" + zsh_completion.install "completions/zsh/_nodebrew" + end + + def caveats + <<~EOS + You need to manually run setup_dirs to create directories required by nodebrew: + #{opt_bin}/nodebrew setup_dirs + + Add path: + export PATH=$HOME/.nodebrew/current/bin:$PATH + + To use Homebrew's directories rather than ~/.nodebrew add to your profile: + export NODEBREW_ROOT=#{var}/nodebrew + EOS + end + + test do + assert_match "v0.10.0", shell_output("#{bin}/nodebrew ls-remote") + end +end diff --git a/Formula/n/nodeenv.rb b/Formula/n/nodeenv.rb new file mode 100644 index 0000000000000..fc760f3583da5 --- /dev/null +++ b/Formula/n/nodeenv.rb @@ -0,0 +1,32 @@ +class Nodeenv < Formula + include Language::Python::Shebang + + desc "Node.js virtual environment builder" + homepage "https://ekalinin.github.io/nodeenv/" + url "https://github.com/ekalinin/nodeenv/archive/refs/tags/1.9.1.tar.gz" + sha256 "0d8ba86a1e4ab68bb16e8f1a1ac4f6261288012c72d4fa4a697949535c2c8d04" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d1109702686c7f630b61ee8fc84746139594fdd512b04c1019e30adcaec2a7ac" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "nodeenv.py" + bin.install "nodeenv.py" => "nodeenv" + end + + test do + system bin/"nodeenv", "--node=16.0.0", "--prebuilt", "env-16.0.0-prebuilt" + # Dropping into the virtualenv itself requires sourcing activate which + # isn't easy to deal with. This ensures current Node installed & functional. + ENV.prepend_path "PATH", testpath/"env-16.0.0-prebuilt/bin" + + (testpath/"test.js").write "console.log('hello');" + assert_match "hello", shell_output("node test.js") + assert_match "v16.0.0", shell_output("node -v") + end +end diff --git a/Formula/n/nodenv.rb b/Formula/n/nodenv.rb new file mode 100644 index 0000000000000..90fa97ae5d35b --- /dev/null +++ b/Formula/n/nodenv.rb @@ -0,0 +1,55 @@ +class Nodenv < Formula + desc "Node.js version manager" + homepage "https://github.com/nodenv/nodenv" + url "https://github.com/nodenv/nodenv/archive/refs/tags/v1.6.2.tar.gz" + sha256 "4351a5fc642461d3bc92cf5228a558bf421e05c722b8827961d7f3a0e1cb5b50" + license "MIT" + head "https://github.com/nodenv/nodenv.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "a01dda203871fb80f56351ebb37f528f1f65de52f681a57e98d38d5fa6911792" + end + + depends_on "node" => :test + + depends_on "node-build" + + def install + # Build an `:all` bottle. + inreplace "libexec/nodenv", "/usr/local", HOMEBREW_PREFIX + + if build.head? + # Record exact git revision for `nodenv --version` output + inreplace "libexec/nodenv---version", /^(version=.+)/, + "\\1--g#{Utils.git_short_head}" + end + + # fish and bash completions handled by nodenv-init + zsh_completion.install "completions/_nodenv" + prefix.install ["bin", "completions", "libexec", "nodenv.d"] + man1.install "share/man/man1/nodenv.1" + end + + test do + # Create a fake node version and executable. + nodenv_root = Pathname(shell_output("#{bin}/nodenv root").strip) + node_bin = nodenv_root/"versions/1.2.3/bin" + foo_script = node_bin/"foo" + foo_script.write "echo hello" + chmod "+x", foo_script + + # Test versions. The second `nodenv` call is a shell function; do not add a `bin` prefix. + versions = shell_output("eval \"$(#{bin}/nodenv init -)\" && nodenv versions").split("\n") + assert_equal 2, versions.length + assert_match(/\* system/, versions[0]) + assert_equal(" 1.2.3", versions[1]) + + # Test rehash. + system bin/"nodenv", "rehash" + refute_match "Cellar", (nodenv_root/"shims/foo").read + # The second `nodenv` call is a shell function; do not add a `bin` prefix. + assert_equal "hello", shell_output("eval \"$(#{bin}/nodenv init -)\" && nodenv shell 1.2.3 && foo").chomp + end +end diff --git a/Formula/n/noir.rb b/Formula/n/noir.rb new file mode 100644 index 0000000000000..8b5daedbe403f --- /dev/null +++ b/Formula/n/noir.rb @@ -0,0 +1,54 @@ +class Noir < Formula + desc "Attack surface detector that identifies endpoints by static analysis" + homepage "https://owasp.org/www-project-noir/" + url "https://github.com/owasp-noir/noir/archive/refs/tags/v0.24.0.tar.gz" + sha256 "4eb42ea48dd3efdfa393db9a99ef4f72463719fc1d29ac54a396cb4780617f64" + license "MIT" + head "https://github.com/owasp-noir/noir.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any, arm64_tahoe: "a349604723f7671f3b5a111a647d8cb6d1a54c3368be6afe9e1863c94e16dc33" + sha256 cellar: :any, arm64_sequoia: "51240442cb1e8c9b8964d81024ead88668d4e47effb0cecd4cd408aeeaaae112" + sha256 cellar: :any, arm64_sonoma: "5643da797c82e5554b0d2a265fde9172ae1b890692b6e614069facd0f9e48e38" + sha256 cellar: :any, sonoma: "fbff8a8641c4e08ec0b0235218c738785994dee3034a60587a610a67bd3fab11" + sha256 cellar: :any_skip_relocation, arm64_linux: "685bde07b2af85134053cc916f7f4cad2f3bde934bdd82a5a4c3a34c618fca7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0f321be39d87bc9e35f797e14949209a6113db00945454b0a86430afab90a34" + end + + depends_on "crystal" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "libevent" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "zlib" + + def install + system "shards", "build", "--production", "--release", "--no-debug" + bin.install "bin/noir" + + generate_completions_from_executable(bin/"noir", "--generate-completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/noir --version") + + (testpath/"api.py").write <<~PYTHON + from fastapi import FastAPI + + app = FastAPI() + + @app.get("/hello") + def hello(): + return {"Hello": "World"} + PYTHON + + output = shell_output("#{bin}/noir --no-color --base-path . 2>&1") + assert_match "Generating Report.", output + assert_match "GET /hello", output + end +end diff --git a/Formula/n/nom.rb b/Formula/n/nom.rb new file mode 100644 index 0000000000000..dcdef553f25dd --- /dev/null +++ b/Formula/n/nom.rb @@ -0,0 +1,31 @@ +class Nom < Formula + desc "RSS reader for the terminal" + homepage "https://github.com/guyfedwards/nom" + url "https://github.com/guyfedwards/nom/archive/refs/tags/v2.20.0.tar.gz" + sha256 "cba8e70ed7e5b9da97dfbcf5929f8ee134a10115a64bb5d9167acfa0a62650d9" + license "GPL-3.0-only" + head "https://github.com/guyfedwards/nom.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c855dc8ab3dca34abeade8354513f4994a9f6fb07946d759d6808a81ce6619d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c98cd0520f9dccac6bff3164493e50f8c54dafb1356c9b62f307306b6a13dd94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b735656501888e695b7a45e7c587e6ca796b932c3a6abac8864437915794201" + sha256 cellar: :any_skip_relocation, sonoma: "991f8c2522c30502b71370d2a9d0a74cf7c891cea24c3053940c6f814d606e92" + sha256 cellar: :any_skip_relocation, arm64_linux: "375ad82138e22252bd01254223591fd35184878c7132a4f516b02127836b4103" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f85317e7f5fe08c0618f719c12957d62bb0077ae31282e36fb6bd51ca2645b23" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" # Required by `go-sqlite3` + + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/nom" + end + + test do + assert_match version.to_s, shell_output("#{bin}/nom version") + + assert_match "configpath", shell_output("#{bin}/nom config") + end +end diff --git a/Formula/n/nomino.rb b/Formula/n/nomino.rb new file mode 100644 index 0000000000000..e89897c7ea6d8 --- /dev/null +++ b/Formula/n/nomino.rb @@ -0,0 +1,38 @@ +class Nomino < Formula + desc "Batch rename utility" + homepage "https://github.com/yaa110/nomino" + url "https://github.com/yaa110/nomino/archive/refs/tags/1.6.4.tar.gz" + sha256 "e83d9a62163f9faaff4c6650284de3dbe92e546ac09e3717c0bb9cde8352d005" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/yaa110/nomino.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f5f816f0bc309590106511a3913e3864719fecabb585ce02fa7628d32de348c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91c62681b3095ba073e2347bb73a7ae656becbfcebe653d17a0272adf6c137f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "844fd63f5668aa2fadd5d5eb1d60e927bdc4b2a6147844116a2c58db614ff0fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2e3938593b0e08bdef22fb21806acde14e003a385a2bcbee17f9eda7a99c727e" + sha256 cellar: :any_skip_relocation, sonoma: "dc995512aaa7e49fa27d1d758e423aa8f89172382291ffd73fd1a0e4def4c04b" + sha256 cellar: :any_skip_relocation, ventura: "159c8a020cbf814028a0ccb704dde386b9ca9894ee174fbe87882d57e5198a80" + sha256 cellar: :any_skip_relocation, arm64_linux: "31653756284a49363a9d7ea3d169f8e7cba14ba660e06b8b86647f792905f189" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f688e778ba20b4394687dd2cc845df0aacdce99a06ea2fb200bf0c0b8aac44c6" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (1..9).each do |n| + (testpath/"Homebrew-#{n}.txt").write n.to_s + end + + system bin/"nomino", ".*-(\\d+).*", "{}" + + (1..9).each do |n| + assert_equal n.to_s, (testpath/"#{n}.txt").read + refute_path_exists testpath/"Homebrew-#{n}.txt" + end + end +end diff --git a/Formula/n/nopoll.rb b/Formula/n/nopoll.rb new file mode 100644 index 0000000000000..af45ab5a37d3f --- /dev/null +++ b/Formula/n/nopoll.rb @@ -0,0 +1,45 @@ +class Nopoll < Formula + desc "Open-source C WebSocket toolkit" + homepage "https://www.aspl.es/nopoll/" + url "https://www.aspl.es/nopoll/downloads/nopoll-0.4.9.b462.tar.gz" + version "0.4.9.b462" + sha256 "80bfa3e0228e88e290dd23eb94d9bb1f4d726fb117c11cfb048cbdd1d71d379a" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.aspl.es/nopoll/downloads/" + regex(/href=.*?nopoll[._-]v?(\d+(?:\.\d+)+(?:\.b\d+)?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c1be50a5fd9560140bf58dbe71539acf5a300b2623d150302fbf64b5eb811701" + sha256 cellar: :any, arm64_sequoia: "c3e56788b97b459d0c22ab331bc493bcdd0351d50e52b8691bd83ea77f7e59e4" + sha256 cellar: :any, arm64_sonoma: "4a269b4003f8ea4330e1deaf825e7eb3f09bce0fde98d0877ad07f4fad0cd20e" + sha256 cellar: :any, arm64_ventura: "3e06f4dfc41ee91d605dbf475fc05e21949926bee077814db7a112675064bc90" + sha256 cellar: :any, sonoma: "e975ca89eb4c551a44f51e0a18a32f284f37378a0c4b12241aa0453b2379d712" + sha256 cellar: :any, ventura: "6bb22066512d52292136ca4639e83d7b8598d0b076fb8b722ee80c3b0e7ce3a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5d3b4783e75e686b85236223815cfce6d9afce02319002ecd56fae81c4146b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "233ad48b7c725a46695aa3b60261610281ffd81cb010f58fd089b2bd0c4fbbd1" + end + + depends_on "openssl@3" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + noPollCtx *ctx = nopoll_ctx_new(); + nopoll_ctx_unref(ctx); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}/nopoll", "-L#{lib}", "-lnopoll", + "-o", "test" + system "./test" + end +end diff --git a/Formula/n/norm.rb b/Formula/n/norm.rb new file mode 100644 index 0000000000000..2f1fcfa7156c5 --- /dev/null +++ b/Formula/n/norm.rb @@ -0,0 +1,62 @@ +class Norm < Formula + desc "NACK-Oriented Reliable Multicast" + homepage "https://www.nrl.navy.mil/itd/ncs/products/norm" + url "https://github.com/USNavalResearchLaboratory/norm/releases/download/v1.5.9/src-norm-1.5.9.tgz" + sha256 "ef6d7bbb7b278584e057acefe3bc764d30122e83fa41d41d8211e39f25b6e3fa" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a8b6f0061522bcf29d931c09c1b59ccaa2d80ae14567f7c5dd26daab0c4931bf" + sha256 cellar: :any, arm64_sequoia: "42f6765ea93269821c415353a75e0439c050430e10d633d259667834b9d00da2" + sha256 cellar: :any, arm64_sonoma: "f249073b0e73e8f75fb755ea727165947c1c6ebc36f306ea93651a0d16abc066" + sha256 cellar: :any, arm64_ventura: "429a634be03412ac1b594de81d880673e719228b75ceddb6040d530b641ea4c1" + sha256 cellar: :any, arm64_monterey: "3576daa38873bc40a81217a11164103c894f8266703024105fa1d4855f4d77f2" + sha256 cellar: :any, arm64_big_sur: "4cee74c6a548d3ccc9905f2e48e66502f423a8e6d98501d31d1c5f0d621b2eb7" + sha256 cellar: :any, sonoma: "380a1a18e78e03b446d64a1dcf2d22c86bdf53fa0709a70fec0bd63c30d5f4a2" + sha256 cellar: :any, ventura: "58c3cff32396773d100d991713d86c88567d112bad44bf65cf2f499abbf7dace" + sha256 cellar: :any, monterey: "4461cfa3ac911780e417455ccd5ea1d040dfee539529a54b1d3a3e1a001fc73e" + sha256 cellar: :any, big_sur: "a4fe786c06af5a57a962e1e12aea4ed1c5b747d1f98b060c11df8377c2cdb63b" + sha256 cellar: :any, catalina: "d70d20d746ace62b26cb70f7d940a2cfb6705af64501e1b7f948c4ca3a8b5afb" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc5db1902343405319417d14dd804b7c2662dbe6c6d488f643dd8ae45561a418" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0749ed0f0382f434ebec2f77953464af8d80db63e8a36760013a32dffea3c501" + end + + uses_from_macos "python" => :build + + # Fix warning: 'visibility' attribute ignored [-Wignored-attributes] + # Remove in the next release + # + # Ref https://github.com/USNavalResearchLaboratory/norm/pull/27 + patch do + url "https://github.com/USNavalResearchLaboratory/norm/commit/476b8bb7eba5a9ad02e094de4dce05a06584f5a0.patch?full_index=1" + sha256 "08f7cc7002dc1afe6834ec60d4fea5c591f88902d1e76c8c32854a732072ea56" + end + + def install + system "python3", "./waf", "configure", "--prefix=#{prefix}" + system "python3", "./waf", "install" + + include.install "include/normApi.h" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + NormInstanceHandle i; + i = NormCreateInstance(false); + assert(i != NORM_INSTANCE_INVALID); + NormDestroyInstance(i); + return 0; + } + C + system ENV.cxx, "test.c", "-L#{lib}", "-lnorm", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/normalize.rb b/Formula/n/normalize.rb new file mode 100644 index 0000000000000..9a374e5567e56 --- /dev/null +++ b/Formula/n/normalize.rb @@ -0,0 +1,49 @@ +class Normalize < Formula + desc "Adjust volume of audio files to a standard level" + homepage "https://www.nongnu.org/normalize/" + url "https://savannah.nongnu.org/download/normalize/normalize-0.7.7.tar.gz" + sha256 "6055a2abccc64296e1c38f9652f2056d3a3c096538e164b8b9526e10b486b3d8" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/normalize/" + regex(/href=.*?normalize[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f0163055e113a859911c0c03c9fda88323d0895ba8b37c6347456dd174f5ce7b" + sha256 cellar: :any, arm64_sequoia: "53b16243f5e01a1b903a687774320986f9a27f92efd6af821aef4e3d7f354467" + sha256 cellar: :any, arm64_sonoma: "d85f441176672bd7b8a65f4b7e3469e742a32e044e38a8cfde3d4277579c6878" + sha256 cellar: :any, arm64_ventura: "f579a1e316959c958663d8cff690f2ad7d06da059e0234478ef19d4f67561b14" + sha256 cellar: :any, arm64_monterey: "bd34a009747e235d7049f560d836ca8be0a722807b8f2b936e24c6d4618890af" + sha256 cellar: :any, arm64_big_sur: "31e0c2d4f6dd0aaae6830e87242bfc8c71077b04c94a41b4079d36e45eedc4ab" + sha256 cellar: :any, sonoma: "8c89f97455db64e450b7360d56b0c634f91d10b01a0234ba6e008eebd47baa4d" + sha256 cellar: :any, ventura: "cade314811b32193662502121c6004253e965fade1dce8d30c488c86872e1a9a" + sha256 cellar: :any, monterey: "4b27d07f9a6b9455c555682b9c43443bee7f70fb40d44a2f50dba54100164e18" + sha256 cellar: :any, big_sur: "a35a01c8d74067d94fda21d31a0ab65128842e6dc1ed0629ed6cadf99f13a9b5" + sha256 cellar: :any, catalina: "363ac4a56ccb75ff32f3af3ef42a6cf5d74f24b977939bb08c14fddc30ff2ef5" + sha256 arm64_linux: "a035755b426126bd056c7287f416cc068b3d399a100e56f8192178a6530048dc" + sha256 x86_64_linux: "ac6f58e169897ddfc61943009dd38044958a8fc56a025e91632d2302de3063df" + end + + depends_on "mad" + + conflicts_with "num-utils", because: "both install `normalize` binaries" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", *args, *std_configure_args + system "make", "install" + end + + test do + cp test_fixtures("test.mp3"), testpath + system bin/"normalize", "test.mp3" + end +end diff --git a/Formula/n/noseyparker.rb b/Formula/n/noseyparker.rb new file mode 100644 index 0000000000000..9af0f752ba9fd --- /dev/null +++ b/Formula/n/noseyparker.rb @@ -0,0 +1,45 @@ +class Noseyparker < Formula + desc "Finds secrets and sensitive information in textual data and Git history" + homepage "https://github.com/praetorian-inc/noseyparker" + url "https://github.com/praetorian-inc/noseyparker/archive/refs/tags/v0.24.0.tar.gz" + sha256 "df31128ec64c0bdb7e8c6917ad68a0c69fe4fe1bd4355332b94938ed08edc2ce" + license "Apache-2.0" + head "https://github.com/praetorian-inc/noseyparker.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bbce92800f87da1efec15e48fadc645677ac1c690ee9d7d460d824bc088b5a18" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3d50cf968e60eff8c5e51bf937bfd8528a7d7cb89d5df6ad8467b50b6cc7893" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17369ef3f870c5a18489e7baed30d33fb571fadcade62ec1091f6d54f00abe86" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ab5f7973f25bc569e1a79c7d978739a9428ce3954b4775efa76e20718e8e0d4" + sha256 cellar: :any_skip_relocation, sonoma: "2aa6a8b34c8484d0fc36febad3e465ac48f53b71ff4f596490dfee97688ee008" + sha256 cellar: :any_skip_relocation, ventura: "7be747e4d857c18ec1b1f4345d5f4745c65c54c782b2efc50bda45f1aa268d6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d86b9a2d4377d12ec9783e9855bc8bbd8ba06270860ff85521c0adf507fd0448" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99c219b6991576f9ee16f57cb2f08f5d2081dacb1f5ce8c61136ae8c7ffbf470" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + ENV["VERGEN_GIT_BRANCH"] = "main" + ENV["VERGEN_GIT_COMMIT_TIMESTAMP"] = time.iso8601 + ENV["VERGEN_GIT_SHA"] = tap.user + system "cargo", "install", "--features", "release", *std_cargo_args(path: "crates/noseyparker-cli") + mv bin/"noseyparker-cli", bin/"noseyparker" + + generate_completions_from_executable(bin/"noseyparker", "generate", "shell-completions", "--shell") + end + + test do + assert_match version.to_s, shell_output("#{bin}/noseyparker -V") + + output = shell_output("#{bin}/noseyparker scan --git-url https://github.com/homebrew/.github") + assert_match "0/0 new matches", output + end +end diff --git a/Formula/n/notation.rb b/Formula/n/notation.rb new file mode 100644 index 0000000000000..cf0559224713c --- /dev/null +++ b/Formula/n/notation.rb @@ -0,0 +1,41 @@ +class Notation < Formula + desc "CLI tool to sign and verify OCI artifacts and container images" + homepage "https://notaryproject.dev/" + url "https://github.com/notaryproject/notation/archive/refs/tags/v1.3.2.tar.gz" + sha256 "f7239ca8155329b57f80e5fb01bf189441b3ade572ad9d6fc4582c1475b8e840" + license "Apache-2.0" + head "https://github.com/notaryproject/notation.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f725b7dedf7c9605ed2a6733b0a8dcce2738d3dd6b3422fcb8a1c349ca2fd495" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4bdb5bb2c42513ae6b08e6fc8da7b11a7e7caf9693d24375f296a9b5fa28386" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4bdb5bb2c42513ae6b08e6fc8da7b11a7e7caf9693d24375f296a9b5fa28386" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4bdb5bb2c42513ae6b08e6fc8da7b11a7e7caf9693d24375f296a9b5fa28386" + sha256 cellar: :any_skip_relocation, sonoma: "da080867497c76b99f1499f3394e0dff732029f3c946e46a3a24e670b7ca3e35" + sha256 cellar: :any_skip_relocation, ventura: "da080867497c76b99f1499f3394e0dff732029f3c946e46a3a24e670b7ca3e35" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4e4276032d96d841d5c4906a097480d2aa27188d9b68be6d327a6aceddc14f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31bd008ba39c788f55adee11eed08cc7da11ef52f052818d000d6b22f3bc1c9a" + end + + depends_on "go" => :build + + def install + project = "github.com/notaryproject/notation" + ldflags = %W[ + -s -w + -X #{project}/internal/version.Version=v#{version} + -X #{project}/internal/version.GitCommit= + -X #{project}/internal/version.BuildMetadata=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/notation" + + generate_completions_from_executable(bin/"notation", "completion") + end + + test do + assert_match "v#{version}+Homebrew", shell_output("#{bin}/notation version") + + assert_match "Successfully added #{tap.user}.crt to named store #{tap.user} of type ca", + shell_output("#{bin}/notation cert generate-test --default '#{tap.user}'").strip + end +end diff --git a/Formula/n/notcurses.rb b/Formula/n/notcurses.rb new file mode 100644 index 0000000000000..33cb0796bd81c --- /dev/null +++ b/Formula/n/notcurses.rb @@ -0,0 +1,38 @@ +class Notcurses < Formula + desc "Blingful character graphics/TUI library" + homepage "https://nick-black.com/dankwiki/index.php/Notcurses" + url "https://github.com/dankamongmen/notcurses/archive/refs/tags/v3.0.17.tar.gz" + sha256 "b0fbe824984fe25b5a16770dbd00b85d44db5d09cc35bd881b95335d0db53128" + license "Apache-2.0" + + bottle do + sha256 arm64_tahoe: "b0b8b649a5a676859495f2061505cde8e7795e6d0be2a43133afd97f7843081d" + sha256 arm64_sequoia: "50bdced07494b0596889464b5e3fb272f585e54423b3759118de702684780afe" + sha256 arm64_sonoma: "bbdca156fea3181ae9cab1de61a22e92ccdd91b9b7996fd05e1dcc61917726a8" + sha256 sonoma: "140d9bfa2fd4c8654c96be30d3c4c513a7f24d2681d40868ce306ea13b689be2" + sha256 arm64_linux: "fde4c010fb9bfa94f995ccb10f672d621cc0a704dd740bd7d643db6c0a86b82a" + sha256 x86_64_linux: "57dea2e9fe2812b6028b6de3e2c7a4368248c3d3737538041c5047e30ace23ad" + end + + depends_on "cmake" => :build + depends_on "doctest" => :build + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "libdeflate" + depends_on "libunistring" + depends_on "ncurses" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # current homebrew CI runs with TERM=dumb. given that Notcurses explicitly + # does not support dumb terminals (i.e. those lacking the "cup" terminfo + # capability), we expect a failure here. all output will go to stderr. + assert_empty shell_output(bin/"notcurses-info", 1) + end +end diff --git a/Formula/n/noti.rb b/Formula/n/noti.rb new file mode 100644 index 0000000000000..24b32a59b48c5 --- /dev/null +++ b/Formula/n/noti.rb @@ -0,0 +1,36 @@ +class Noti < Formula + desc "Trigger notifications when a process completes" + homepage "https://github.com/variadico/noti" + url "https://github.com/variadico/noti/archive/refs/tags/3.8.0.tar.gz" + sha256 "b637b4b4e5eb10b3ea2c5b2cf0fbd1904ab8fd26eaec4b911f4ce2db3ab881a2" + license "MIT" + head "https://github.com/variadico/noti.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d90a1e8a186687fe12f458a6f7070f4c40dc7850a5f06ad1f513858dabd7558c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7373f99acea5809bcc89237de6cfe9b869fb194603f9ffa69d90c6a01ae60cf1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a6990ad34fe5bc000e70e99dba5d95ce91d21de18bc4aef2138af3140981da26" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9879896973d077b35c59c8485a875f45be367a68879879ba58c5ce643fa1576f" + sha256 cellar: :any_skip_relocation, sonoma: "994c5a03f74ad08b6dedf050d601701b2a72e58b9dbc078e0cf185da984a75ab" + sha256 cellar: :any_skip_relocation, ventura: "ab62225e51f6f38ce4ffae1addbd91e5536dfc47ee86e9325c867030709b758f" + sha256 cellar: :any_skip_relocation, arm64_linux: "03b6c1144b9b6ed221ccdd41eb60e046cb4aaaa2fa3cb5b80eccf1d8a238bd63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "823432578796ba95f2e4b9dab197cb978935159e7282e83738778a3f492259da" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/variadico/noti/internal/command.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "cmd/noti/main.go" + man1.install "docs/man/dist/noti.1" + man5.install "docs/man/dist/noti.yaml.5" + end + + test do + assert_match "noti version #{version}", shell_output("#{bin}/noti --version").chomp + system bin/"noti", "-t", "Noti", "-m", "'Noti recipe installation test has finished.'" + end +end diff --git a/Formula/n/notifiers.rb b/Formula/n/notifiers.rb new file mode 100644 index 0000000000000..9daeb93cdae3c --- /dev/null +++ b/Formula/n/notifiers.rb @@ -0,0 +1,86 @@ +class Notifiers < Formula + include Language::Python::Virtualenv + + desc "Easy way to send notifications" + homepage "https://pypi.org/project/notifiers/" + url "https://files.pythonhosted.org/packages/f2/da/a8c87ce1f82ed0a3940ff80cf74c2e565ffdf1e35aa1e981856f8dd8dc4a/notifiers-1.3.6.tar.gz" + sha256 "070d69dc34892b0675bdbca8529fb13d542f0c84052c6fef48fe2ab1d98d661f" + license "MIT" + revision 2 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "541994eadb8a17ee11b2f9fa68059a4f6e73d23f10d8ac7780ffeab606c8251c" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi rpds-py] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"notifiers", shell_parameter_format: :click) + end + + test do + assert_match "notifiers", shell_output("#{bin}/notifiers --help") + end +end diff --git a/Formula/n/notify.rb b/Formula/n/notify.rb new file mode 100644 index 0000000000000..ce764f0194e9d --- /dev/null +++ b/Formula/n/notify.rb @@ -0,0 +1,31 @@ +class Notify < Formula + desc "Stream the output of any CLI and publish it to a variety of supported platforms" + homepage "https://docs.projectdiscovery.io/tools/notify/overview" + url "https://github.com/projectdiscovery/notify/archive/refs/tags/v1.0.7.tar.gz" + sha256 "ec9f1e6c48f975b58d30162071d954db0cd771ea3f5dc7168f5ecdc73658c0ad" + license "MIT" + head "https://github.com/projectdiscovery/notify.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "22e0f75572048c8a133022ffcebec399529075ad0c8e7d0d1bd62b93802014b0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7be1bc9e0154bb8c4f496425c468dec71e6a373461aa7883445e57d2d7e2a738" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af1cb932e57d925915878389b7a207098b8a3324e0800f1ea5db8b12a42d3bc0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2aeec01296186f92a51779563e40390db5b65585f2f0f9fc5a4339c23af9199c" + sha256 cellar: :any_skip_relocation, sonoma: "1da6aac2df79d0f709092d1b2a9449ad3dfee1fe6fb4b2073635b321540b7895" + sha256 cellar: :any_skip_relocation, ventura: "b91f8d7fd9626a85fa58b680effdd66c1bc3aa8b8871c699eeeaa7019ff27b44" + sha256 cellar: :any_skip_relocation, arm64_linux: "eabe485332921912a90cb52151029c5ca2cba52494fdb289d9bcd689870fa94d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b193c3bb416604ece04efc3382efb032885718e2740d26e98d6a6094d6e1eb2b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/notify" + end + + test do + assert_match "Current Version: #{version}", shell_output("#{bin}/notify -disable-update-check -version 2>&1") + output = shell_output("#{bin}/notify -disable-update-check -config \"#{testpath}/non_existent\" 2>&1", 1) + assert_match "Could not read config", output + end +end diff --git a/Formula/n/notion-mcp-server.rb b/Formula/n/notion-mcp-server.rb new file mode 100644 index 0000000000000..22ca5f716554b --- /dev/null +++ b/Formula/n/notion-mcp-server.rb @@ -0,0 +1,27 @@ +class NotionMcpServer < Formula + desc "MCP Server for Notion" + homepage "https://github.com/makenotion/notion-mcp-server" + url "https://registry.npmjs.org/@notionhq/notion-mcp-server/-/notion-mcp-server-1.9.0.tgz" + sha256 "a047243d0f6d68556feaa54cb709e65211a230bdbfcfeeab88be572e53833822" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ea0e3e1c6ad1fc260d8508f4f2fa72a6a1e1b6b0d8c784d0ed45c4660a7960c6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + assert_match "Identifier for a Notion database", pipe_output(bin/"notion-mcp-server", json, 0) + end +end diff --git a/Formula/n/notmuch-mutt.rb b/Formula/n/notmuch-mutt.rb new file mode 100644 index 0000000000000..ce6c4284158fa --- /dev/null +++ b/Formula/n/notmuch-mutt.rb @@ -0,0 +1,122 @@ +class NotmuchMutt < Formula + desc "Notmuch integration for Mutt" + homepage "https://notmuchmail.org/" + url "https://notmuchmail.org/releases/notmuch-0.39.tar.xz" + sha256 "b88bb02a76c46bad8d313fd2bb4f8e39298b51f66fcbeb304d9f80c3eef704e3" + license "GPL-3.0-or-later" + head "https://git.notmuchmail.org/git/notmuch", using: :git, branch: "master" + + livecheck do + formula "notmuch" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8b0184fde96b4d04f190604ec6140f6d72eed4457e6a26c1a1e6308521674295" + sha256 cellar: :any, arm64_sequoia: "7172f1fdbe9794f01c80d042b9052d45fd7d7892cd1f9f4982b6a02b5bfa3680" + sha256 cellar: :any, arm64_sonoma: "5ee7a940df309ec27388421162a63c718cfff6f3b16354cf19c61cae3ba61a54" + sha256 cellar: :any, arm64_ventura: "e45332fb4bdd1c4fd017c43fe8ec0781cbfd0f941a3ceda8c68e6ec5b7d1324d" + sha256 cellar: :any, sonoma: "04c812d8705d2fa575c954ca2a5bd01d85183414633f3d69631441e191b16929" + sha256 cellar: :any, ventura: "e445cab33c47569706ec82e94db95982c96f5685da6b099ce963ea77f5ad963a" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f60737a15a2f386ba14e641f8c7a1820863d2eaf369c1c11228057a44e766b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dafb17ac7a19666854de6837b3810f8bb5d4804395c07bf7e7af94c60b91eaf" + end + + depends_on "notmuch" + depends_on "perl" + depends_on "readline" + + uses_from_macos "ncurses" + + resource "Date::Parse" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz" + sha256 "c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2" + end + + resource "IO::Lines" do + url "https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/IO-Stringy-2.113.tar.gz" + sha256 "51220fcaf9f66a639b69d251d7b0757bf4202f4f9debd45bdd341a6aca62fe4e" + end + + resource "Devel::GlobalDestruction" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Devel-GlobalDestruction-0.14.tar.gz" + sha256 "34b8a5f29991311468fe6913cadaba75fd5d2b0b3ee3bb41fe5b53efab9154ab" + end + + resource "Sub::Exporter::Progressive" do + url "https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz" + sha256 "d535b7954d64da1ac1305b1fadf98202769e3599376854b2ced90c382beac056" + end + + resource "File::Remove" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/File-Remove-1.61.tar.gz" + sha256 "fd857f585908fc503461b9e48b3c8594e6535766bc14beb17c90ba58d5dc4975" + end + + resource "Term::ReadLine::Gnu" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.46.tar.gz" + sha256 "b13832132e50366c34feac12ce82837c0a9db34ca530ae5d27db97cf9c964c7b" + end + + resource "String::ShellQuote" do + url "https://cpan.metacpan.org/authors/id/R/RO/ROSCH/String-ShellQuote-1.04.tar.gz" + sha256 "e606365038ce20d646d255c805effdd32f86475f18d43ca75455b00e4d86dd35" + end + + resource "Mail::Box::Maildir" do + url "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/Mail-Box-3.010.tar.gz" + sha256 "ae194fa250c545c9b9153e3fb5103cab29f79cf2acd4e9fd75cec532201a9564" + end + + resource "Mail::Header" do + url "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MailTools-2.21.tar.gz" + sha256 "4ad9bd6826b6f03a2727332466b1b7d29890c8d99a32b4b3b0a8d926ee1a44cb" + end + + resource "Mail::Reporter" do + url "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/Mail-Message-3.015.tar.gz" + sha256 "b2858d7f877d3ed489f83404a40aaa95dd96ef61e00f141aef149a332399b25a" + end + + resource "MIME::Types" do + url "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MIME-Types-2.26.tar.gz" + sha256 "bc738483cb4cdb47d61e85fe9304fa929aa9ab927e3171ec2ba2ab1cd7cefdff" + end + + resource "Object::Realize::Later" do + url "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/Object-Realize-Later-0.21.tar.gz" + sha256 "8f7b9640cc8e34ea92bcf6c01049a03c145e0eb46e562275e28dddd3a8d6d8d9" + end + + def install + system "make", "V=1", "prefix=#{prefix}", "-C", "contrib/notmuch-mutt", "install" + + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + next if r.name.eql? "Term::ReadLine::Gnu" + + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + resource("Term::ReadLine::Gnu").stage do + # Prevent the Makefile to try and build universal binaries + ENV.refurbish_args + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", + "--includedir=#{Formula["readline"].opt_include}", + "--libdir=#{Formula["readline"].opt_lib}" + system "make", "install" + end + + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + system bin/"notmuch-mutt", "search", "Homebrew" + end +end diff --git a/Formula/n/notmuch.rb b/Formula/n/notmuch.rb new file mode 100644 index 0000000000000..83df705efc9f0 --- /dev/null +++ b/Formula/n/notmuch.rb @@ -0,0 +1,95 @@ +class Notmuch < Formula + include Language::Python::Shebang + + desc "Thread-based email index, search, and tagging" + homepage "https://notmuchmail.org/" + url "https://notmuchmail.org/releases/notmuch-0.39.tar.xz" + sha256 "b88bb02a76c46bad8d313fd2bb4f8e39298b51f66fcbeb304d9f80c3eef704e3" + license "GPL-3.0-or-later" + revision 2 + head "https://git.notmuchmail.org/git/notmuch", using: :git, branch: "master" + + livecheck do + url "https://notmuchmail.org/releases/" + regex(/href=.*?notmuch[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7ce6d2376e4f4c259353d1e171048c85bf531f17ed15cca6548b98bc00d6c7be" + sha256 cellar: :any, arm64_sequoia: "fd95898d652007c95dbf52a842ce3c5d085abd1dbe871e1bd760bb955a669c5c" + sha256 cellar: :any, arm64_sonoma: "37224d35b365b81c30a7eea3d35285feb7544a15b388aeb8c724f493713b3abd" + sha256 cellar: :any, sonoma: "7140d21693d5e91d6115cdd29a103e1c607b2346394b0a65a60755244bddb900" + sha256 cellar: :any_skip_relocation, arm64_linux: "22b62f435648548fdd06dfc317f0c0df25490373b7aafb1a98daba2b4f7149c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6911d5d204d2568fc22d8b8e7535fee3479a1dbada68a1f4b5fd92eddc442b3" + end + + depends_on "doxygen" => :build + depends_on "emacs" => :build + depends_on "libgpg-error" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + + depends_on "cffi" + depends_on "glib" + depends_on "gmime" + depends_on "python@3.14" + depends_on "sfsexp" + depends_on "talloc" + depends_on "xapian" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def python3 + "python3.14" + end + + def install + ENV.cxx11 if OS.linux? + site_packages = Language::Python.site_packages(python3) + with_env(PYTHONPATH: Formula["sphinx-doc"].opt_libexec/site_packages) do + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--emacslispdir=#{elisp}", + "--emacsetcdir=#{elisp}", + "--bashcompletiondir=#{bash_completion}", + "--zshcompletiondir=#{zsh_completion}", + "--without-ruby" + system "make", "V=1", "install" + end + bin.install "notmuch-git" + rewrite_shebang detected_python_shebang, bin/"notmuch-git" + + elisp.install Pathname.glob("emacs/*.el") + bash_completion.install "completion/notmuch-completion.bash" => "notmuch" + + (prefix/"vim/plugin").install "vim/notmuch.vim" + (prefix/"vim/doc").install "vim/notmuch.txt" + (prefix/"vim").install "vim/syntax" + + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./bindings/python-cffi" + end + + test do + (testpath/".notmuch-config").write <<~INI + [database] + path=#{testpath}/Mail + INI + (testpath/"Mail").mkpath + assert_match "0 total", shell_output("#{bin}/notmuch new") + + system python3, "-c", <<~PYTHON + import notmuch2 + db = notmuch2.Database(mode=notmuch2.Database.MODE.READ_ONLY) + assert str(db.path) == '#{testpath}/Mail', 'Wrong db.path!' + db.close() + PYTHON + system bin/"notmuch-git", "-C", "#{testpath}/git", "init" + assert_path_exists testpath/"git" + end +end diff --git a/Formula/n/nova-fairwinds.rb b/Formula/n/nova-fairwinds.rb new file mode 100644 index 0000000000000..c4263cf0ee50b --- /dev/null +++ b/Formula/n/nova-fairwinds.rb @@ -0,0 +1,38 @@ +class NovaFairwinds < Formula + desc "Find outdated or deprecated Helm charts running in your cluster" + homepage "https://github.com/FairwindsOps/nova" + url "https://github.com/FairwindsOps/nova/archive/refs/tags/v3.11.9.tar.gz" + sha256 "37610ae7bfa86e14a95e94de55f9833a3a269ac1d4f7a94bfc1fdbafa5277c29" + license "Apache-2.0" + head "https://github.com/FairwindsOps/nova.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a50f817b266b08f8ef0a0fe6664efa6f1ec1b1a460f4034650322ab9902519ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a50f817b266b08f8ef0a0fe6664efa6f1ec1b1a460f4034650322ab9902519ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a50f817b266b08f8ef0a0fe6664efa6f1ec1b1a460f4034650322ab9902519ca" + sha256 cellar: :any_skip_relocation, sonoma: "0b5bbe3cc2dd24ef49426adcbb5345d4b40a88e5e2174f54fffca6260757648a" + sha256 cellar: :any_skip_relocation, arm64_linux: "323cf8bf20c935d0effe3f5c23d090ce42ceffa132cea563984a08f4b5352e8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "315e2a607efe32f6ad5bbc9ab227a84f8e1d4fa5dc6f3fea24e6adf7194b2dfd" + end + + depends_on "go" => :build + + conflicts_with "open-simh", because: "both install `nova` binaries" + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(output: bin/"nova", ldflags:) + + generate_completions_from_executable(bin/"nova", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/nova version") + + system bin/"nova", "generate-config", "--config=nova.yaml" + assert_match "chart-ignore-list: []", (testpath/"nova.yaml").read + + output = shell_output("#{bin}/nova find --helm 2>&1", 255) + assert_match "try setting KUBERNETES_MASTER environment variable", output + end +end diff --git a/Formula/n/noweb.rb b/Formula/n/noweb.rb new file mode 100644 index 0000000000000..3971959f617b5 --- /dev/null +++ b/Formula/n/noweb.rb @@ -0,0 +1,138 @@ +class Noweb < Formula + desc "WEB-like literate-programming tool" + homepage "https://www.cs.tufts.edu/~nr/noweb/" + url "https://github.com/nrnrnr/noweb/archive/refs/tags/v2_13.tar.gz" + sha256 "7b32657128c8e2cb1114cca55023c58fa46789dcffcbe3dabde2c8a82fe57802" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5b0ebc62d33b6e1452815e9257c313a3b886caa203124fdbc785001aa8f5e0d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f18c4be4fa20125e8adc57369970446c02ceed59304f52ef1e595967db4842dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4a47b231de7c9f6e04f77ecf8ea59edb7658da0fae7b10d9d3d6d7b80577aeb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a2984bbf74de88caf1026e1d940c45bd2288361b1f48458e04758b585e1d07a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "be96a5565ef49b6639fefad120cc677a9235fe665196f6b9d1ac353627a6abfe" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ef7e6d0cd7c63e47d4c82b1417e26cf8fb0be1fec0c27fd99e67af7d5dcd4813" + sha256 cellar: :any_skip_relocation, sonoma: "3f44a86284253361d5994fb42060b4f051569a98e4e6e0593dc9ed02fee1af63" + sha256 cellar: :any_skip_relocation, ventura: "ad26424a2647f8feb82d8735c6792b755bd56d7c720ffa64101fbd3061d4d94c" + sha256 cellar: :any_skip_relocation, monterey: "ab0cabc785cdc9c5d34cb9e41e518eac9411dc3c6fe249ba4ac82dcd830ba851" + sha256 cellar: :any_skip_relocation, big_sur: "1c9575804e168b4ec6c8f28f6fd1748d509726a35704ee1ca7469257380617c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2fb0ea050c3968ff76ff68f19043aeab5898c7c47d2310b779044ce2f6c709d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b0483e38e12bf0bcc968685af551d17a421ff7d27cf0433082fc08bd5135a0d" + end + + depends_on "gnu-sed" => :build + depends_on "icon" + + # remove pdcached ops, see discussions in https://github.com/nrnrnr/noweb/issues/31 + patch :DATA + + def texpath + prefix/"tex/generic/noweb" + end + + def install + # use gnu-sed on macOS for fixing `illegal byte sequence` error + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + cd "src" do + system "bash", "awkname", "awk" + system "make", "LIBSRC=icon", "ICONC=icont", "CFLAGS=-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=1" + + bin.mkpath + lib.mkpath + man.mkpath + texpath.mkpath + + system "make", "install", "BIN=#{bin}", + "LIB=#{lib}", + "MAN=#{man}", + "TEXINPUTS=#{texpath}" + cd "icon" do + system "make", "install", "BIN=#{bin}", + "LIB=#{lib}", + "MAN=#{man}", + "TEXINPUTS=#{texpath}" + end + end + end + + def caveats + <<~EOS + TeX support files are installed in the directory: + + #{texpath} + + You may need to add the directory to TEXINPUTS to run noweb properly. + EOS + end + + test do + (testpath/"test.nw").write <<~EOS + \section{Hello world} + + Today I awoke and decided to write + some code, so I started to write Hello World in \textsf C. + + <>= + /* + <> + */ + #include + + int main(int argc, char *argv[]) { + printf("Hello World!\n"); + return 0; + } + @ + \noindent \ldots then I did the same in PHP. + + <>= + > + */ + echo "Hello world!\n"; + ?> + @ + \section{License} + Later the same day some lawyer reminded me about licenses. + So, here it is: + + <>= + This work is placed in the public domain. + EOS + assert_match "this file was generated automatically by noweave", + pipe_output("#{bin}/htmltoc", shell_output("#{bin}/noweave -filter l2h -index -html test.nw")) + end +end + +__END__ +diff --git a/src/icon/Makefile b/src/icon/Makefile +index b8f39ee..db51615 100644 +--- a/src/icon/Makefile ++++ b/src/icon/Makefile +@@ -10,11 +10,11 @@ LIBEXECS=totex disambiguate noidx tohtml elide l2h docs2comments \ + autodefs.promela autodefs.lrtl autodefs.asdl autodefs.mmix xchunks pipedocs + LIBSPECIAL=autodefs.cee + BINEXECS=noindex sl2h htmltoc +-EXECS=$(LIBEXECS) $(BINEXECS) $(LIBSPECIAL) pdcached ++EXECS=$(LIBEXECS) $(BINEXECS) $(LIBSPECIAL) + SRCS=totex.icn disambiguate.icn noidx.icn texdefs.icn icondefs.icn \ + yaccdefs.icn noindex.icn smldefs.icn tohtml.icn cdefs.icn elide.icn \ + l2h.icn sl2h.icn pascaldefs.icn promeladefs.icn lrtldefs.icn asdldefs.icn \ +- mmixdefs.icn htmltoc.icn xchunks.icn docs2comments.icn pipedocs.icn pdcached.icn ++ mmixdefs.icn htmltoc.icn xchunks.icn docs2comments.icn pipedocs.icn + + .SUFFIXES: .nw .icn .html .tex .dvi + .nw.icn: +@@ -141,9 +141,6 @@ elide: elide.icn + pipedocs: pipedocs.icn + $(ICONT) pipedocs.icn + +-pdcached: pdcached.icn +- $(ICONT) pdcached.icn +- + disambiguate: disambiguate.icn + $(ICONT) disambiguate.icn diff --git a/Formula/n/nowplaying-cli.rb b/Formula/n/nowplaying-cli.rb new file mode 100644 index 0000000000000..44dc38f827f4c --- /dev/null +++ b/Formula/n/nowplaying-cli.rb @@ -0,0 +1,32 @@ +class NowplayingCli < Formula + desc "Retrieves currently playing media, and simulates media actions" + homepage "https://github.com/kirtan-shah/nowplaying-cli" + url "https://github.com/kirtan-shah/nowplaying-cli/archive/refs/tags/v1.2.1.tar.gz" + sha256 "bb49123c66282b6495c245589313afc94875a7b0e82c9ae9f79d6f25e7503db4" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "652c94eaf2850ecceee1e133439af0c303aff3b4f8ac7a56c6b18f9d09049acf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a4b77d57e7d151e6fc408096e76e2f6273a0187e974778bec58ff4417dac115" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "028c91c0152017e30caa8f006961034ad91faedb2f92fb76d9d3a724775bf2a0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d98330f2152a1dd02ecc8a515f5ff56d2e780196e705a8367275d8ce043552c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5fbe78e350e35164e78a14b0cb853143c00824c612813d4cdd78afaa1675709e" + sha256 cellar: :any_skip_relocation, sonoma: "9bdf6c603add430676f621c00b5d6c944819fb0851cb419dacda90eae42bcb43" + sha256 cellar: :any_skip_relocation, ventura: "0d06f10462257cfd5c96e7e029db043499d9fffae9cb6f843714e7e115dc4288" + sha256 cellar: :any_skip_relocation, monterey: "4a6d9fdc2681a4912562186b4ee2c0965e56c0ec2c9189314afb505424745bb3" + end + + # see upstream discussion, https://github.com/kirtan-shah/nowplaying-cli/issues/28 + deprecate! date: "2026-04-17", because: :unmaintained + + depends_on :macos + + def install + system "make" + bin.install "nowplaying-cli" + end + + test do + assert_equal "(null)", shell_output("#{bin}/nowplaying-cli get-raw").strip + end +end diff --git a/Formula/n/nox.rb b/Formula/n/nox.rb new file mode 100644 index 0000000000000..dae0dfbe9b218 --- /dev/null +++ b/Formula/n/nox.rb @@ -0,0 +1,98 @@ +class Nox < Formula + include Language::Python::Virtualenv + + desc "Flexible test automation for Python" + homepage "https://nox.thea.codes/" + url "https://files.pythonhosted.org/packages/3d/3e/16440c5a2c1e867a862479cf7d11d05d0e0f2bb133de3921cb3ed6e37e57/nox-2025.10.16.tar.gz" + sha256 "fca1e7504384dbc91dddef3fec45d04572f23c882a87241e2c793b77fe1c9259" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b385a5d4518ff3e65d4846842f535c411ebba0bba8dd32d64138a23c48f7145f" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/a2/61/f083b5ac52e505dfc1c624eafbf8c7589a0d7f32daa398d2e7590efa5fda/colorlog-6.10.1.tar.gz" + sha256 "eb4ae5cb65fe7fec7773c2306061a8e63e02efc2c72eba9d27b0fa23c94f1321" + end + + resource "dependency-groups" do + url "https://files.pythonhosted.org/packages/62/55/f054de99871e7beb81935dea8a10b90cd5ce42122b1c3081d5282fdb3621/dependency_groups-1.3.1.tar.gz" + sha256 "78078301090517fd938c19f64a53ce98c32834dfe0dee6b88004a569a6adfefd" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + def install + venv = virtualenv_install_with_resources + (bin/"tox-to-nox").unlink + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "nox", + shell_parameter_format: :arg) + + # Build an `:all` bottle by replacing comments + file = venv.site_packages.glob("argcomplete-*.dist-info/METADATA") + inreplace file, "/opt/homebrew/bin/bash", "$HOMEBREW_PREFIX/bin/bash" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + (testpath/"noxfile.py").write <<~PYTHON + import nox + + @nox.session + def tests(session): + session.install("pytest") + session.run("pytest") + PYTHON + (testpath/"test_trivial.py").write <<~PYTHON + def test_trivial(): + assert True + PYTHON + assert_match "usage", shell_output("#{bin}/nox --help") + assert_match "Sessions defined in #{testpath}/noxfile.py", shell_output("#{bin}/nox --list-sessions") + end +end diff --git a/Formula/n/nping.rb b/Formula/n/nping.rb new file mode 100644 index 0000000000000..f6d6750cf5917 --- /dev/null +++ b/Formula/n/nping.rb @@ -0,0 +1,35 @@ +class Nping < Formula + desc "Ping Tool in Rust with Real-Time Data and Visualizations" + homepage "https://github.com/hanshuaikang/Nping" + url "https://github.com/hanshuaikang/Nping/archive/refs/tags/v0.5.0.tar.gz" + sha256 "0ba70f55fc126445b8c57be234c2eb355939336c731c8209b320bd89b85cac50" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "154efe4e2a7876ef5f07f75bee5a1d9430902095cab62374556b049be064f0d2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "20862eab2cbcfc10caf8e4727406345b8c0963da8d9b11cf77e1e8b481bfdbf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8c8a3c70304a5d2f9ef2d989964bed57ebc73eb522cc47d8f339d1674f03e4e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "976671ce122a9ce7f2b835acd39c58299ddf25e5fa6ec331160c68ff37b27a1f" + sha256 cellar: :any_skip_relocation, sonoma: "15dbbd76c07db6df865281ae35576d399a582036d66398d07d421723a782bde1" + sha256 cellar: :any_skip_relocation, ventura: "7c5caf7fd5802813ed2ddf22dd8aaf9cf7fe52d5eb4190c36e150653326deb02" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa83bd35615c2d4dc74e7715bf0344fd514cc0f4c7dabbb554b27ad9b4de44d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f43a159b169eb801516e3b670ebb243636e3962437de4daa39d2a1cbb2da67c" + end + + depends_on "rust" => :build + + conflicts_with "nmap", because: "both install `nping` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "nping v#{version}", shell_output("#{bin}/nping --version") + + # Fails in Linux CI with "No such device or address (os error 2)" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"nping", "--count", "2", "brew.sh" + end +end diff --git a/Formula/n/npm-check-updates.rb b/Formula/n/npm-check-updates.rb new file mode 100644 index 0000000000000..b5bd3d518212e --- /dev/null +++ b/Formula/n/npm-check-updates.rb @@ -0,0 +1,43 @@ +class NpmCheckUpdates < Formula + desc "Find newer versions of dependencies than what your package.json allows" + homepage "https://github.com/raineorshine/npm-check-updates" + url "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-19.1.2.tgz" + sha256 "04d7b0c1032856433004af0e299348c97f3e5f596039f305a1c6886bfdf13161" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f0f1133b046c876ec609018ae12bdd80b085c0574b38bcb419deebc4c0abdd72" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + test_package_json = testpath/"package.json" + test_package_json.write <<~JSON + { + "dependencies": { + "express": "1.8.7", + "lodash": "3.6.1" + } + } + JSON + + system bin/"ncu", "-u" + + # Read the updated package.json to get the new dependency versions + updated_package_json = JSON.parse(test_package_json.read) + updated_express_version = updated_package_json["dependencies"]["express"] + updated_lodash_version = updated_package_json["dependencies"]["lodash"] + + # Assert that both dependencies have been updated to higher versions + assert Gem::Version.new(updated_express_version) > Gem::Version.new("1.8.7"), + "Express version not updated as expected" + assert Gem::Version.new(updated_lodash_version) > Gem::Version.new("3.6.1"), + "Lodash version not updated as expected" + end +end diff --git a/Formula/n/npq.rb b/Formula/n/npq.rb new file mode 100644 index 0000000000000..171835b8c0b6f --- /dev/null +++ b/Formula/n/npq.rb @@ -0,0 +1,25 @@ +class Npq < Formula + desc "Audit npm packages before you install them" + homepage "https://github.com/lirantal/npq" + url "https://registry.npmjs.org/npq/-/npq-3.14.0.tgz" + sha256 "5db73e515b9987b4bce6cd461cce3494e086d1dfa8d9ade9222bf4e64129006d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9f9b7a3f021dbb34be70405c2392e2b1f0486aeb762d238fa6f3bd6426a23485" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/npq --version") + + output = shell_output("#{bin}/npq install npq --dry-run") + assert_match "Packages with issues found", output + end +end diff --git a/Formula/n/npth.rb b/Formula/n/npth.rb new file mode 100644 index 0000000000000..799b9671e4b22 --- /dev/null +++ b/Formula/n/npth.rb @@ -0,0 +1,59 @@ +class Npth < Formula + desc "New GNU portable threads library" + homepage "https://gnupg.org/" + url "https://gnupg.org/ftp/gcrypt/npth/npth-1.8.tar.bz2" + mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/npth/npth-1.8.tar.bz2" + sha256 "8bd24b4f23a3065d6e5b26e98aba9ce783ea4fd781069c1b35d149694e90ca3e" + license "LGPL-2.1-or-later" + + livecheck do + url "https://gnupg.org/ftp/gcrypt/npth/" + regex(/href=.*?npth[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7dc8a83801469950381677b61404e103e5fd8fb22bc6b4e0f68db292d5801e3a" + sha256 cellar: :any, arm64_sequoia: "7836af0109be87ab2b8155b533cd33508eb3b738190031c8ca2e2b94df6f5c2b" + sha256 cellar: :any, arm64_sonoma: "fe1fe3f063148f11e6ef6182846b1a23177faca872902248665bd23b1c6d6a11" + sha256 cellar: :any, arm64_ventura: "7178f348dbdf184206e70c7aa62711c53c900f888bdffd1391ad709497ec456d" + sha256 cellar: :any, sonoma: "6532f31787befd9082aa4902e75bf6a0ba26b4423029b7b9c1f1117ff0d0df7d" + sha256 cellar: :any, ventura: "669a65d8a32cfd4d30a79d606702c982b474586ad23283d7ad3e1f6e40712076" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae6de43d79405ea955e4f8ea018bd0660da87bb0a40c39a1f9b7759915316006" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfe2b3f4f5fb1b8e05b3ddbc5dddbf44d3b03b95ca9712ff4fc33cbd045368b4" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + void* thread_function(void *arg) { + printf("Hello from nPth thread!\\n"); + return NULL; + } + + int main() { + npth_t thread_id; + int status; + + status = npth_init(); + if (status != 0) { + fprintf(stderr, "Failed to initialize nPth.\\n"); + return 1; + } + + status = npth_create(&thread_id, NULL, thread_function, NULL); + npth_join(thread_id, NULL); + return 0; + } + + C + system ENV.cc, "test.c", "-L#{lib}", "-lnpth", "-o", "test" + assert_match "Hello from nPth thread!", shell_output("./test") + end +end diff --git a/Formula/n/npush.rb b/Formula/n/npush.rb new file mode 100644 index 0000000000000..689611ada3a1b --- /dev/null +++ b/Formula/n/npush.rb @@ -0,0 +1,40 @@ +class Npush < Formula + desc "Logic game similar to Sokoban and Boulder Dash" + homepage "https://npush.sourceforge.net/" + url "https://downloads.sourceforge.net/project/npush/npush/0.7/npush-0.7.tgz" + sha256 "f216d2b3279e8737784f77d4843c9e6f223fa131ce1ebddaf00ad802aba2bcd9" + license "GPL-2.0-or-later" + head "https://svn.code.sf.net/p/npush/code/" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "43a5b01bbdaac0c5112a4a7b61e737534968dada416f3ab6fe47b4ad907a1eff" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52bb1bf2c16219188637e18260db7c52d8eead9d02dd9f65bb9d7cfb7adf6520" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "58edd27febec742ef46cf8e1b6fca1bf8053a99c953fbd53743a6b12387d924c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ee910410e365aa4d509068cb68d14bf871b9a679cfff678db620bbb6603838fc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ae543262c4b86f3d0babffd21d015739bf5db0838fc7ee604df46cf8e26e3178" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b0be6b0d7949e3e6b3322089f84c10c60c15ea41a0a7ebdaa7ff04862c1be103" + sha256 cellar: :any_skip_relocation, sonoma: "351248c804fc342573641fe453f90b6e768d8bda8376eaeee18b3a7e169b6bcf" + sha256 cellar: :any_skip_relocation, ventura: "019a35f0de52024835407a2fb6d643b9cbf8d9ccc52889f9b40de056a3f73467" + sha256 cellar: :any_skip_relocation, monterey: "7f24fc8d2212c912748809e540f129ff5a873d00639c1f2d262d869714746a67" + sha256 cellar: :any_skip_relocation, big_sur: "d3b1eb1513919a4120a9c2b6541872b39ef78d9eb618df96e62a1cc6f28d53ff" + sha256 cellar: :any_skip_relocation, catalina: "fdb6d7cd95fa85086a4dc01edfb5859fcf65d2932c56d931d716814157f5449e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2c260b48759fbd27ca1ea3c6bbfe102de40fb4755cd3fc88f03e6a27e2aa236" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0f8e3339f262c42ed5d697817a274e292bdd647d5a6410f71d9a9752f044047" + end + + uses_from_macos "ncurses" + + def install + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "Makefile", "$(PROGRAM) $(OBJECTS)", "$(PROGRAM) $(OBJECTS) -lncurses" unless OS.mac? + system "make" + pkgshare.install ["npush", "levels"] + (bin/"npush").write <<~SH + #!/bin/sh + cd "#{pkgshare}" && exec ./npush $@ + SH + end +end diff --git a/Formula/n/nq.rb b/Formula/n/nq.rb new file mode 100644 index 0000000000000..da8de8063d4b1 --- /dev/null +++ b/Formula/n/nq.rb @@ -0,0 +1,32 @@ +class Nq < Formula + desc "Unix command-line queue utility" + homepage "https://github.com/leahneukirchen/nq" + url "https://github.com/leahneukirchen/nq/archive/refs/tags/v1.0.tar.gz" + sha256 "d5b79a488a88f4e4d04184efa0bc116929baf9b34617af70d8debfb37f7431f4" + license "CC0-1.0" + head "https://github.com/leahneukirchen/nq.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c175806ee39e0ed6fd4efe5a59ae650c99226d48e099762c81ef36f61f369af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0d6031b33354064a349d6788cf3eb9ae0be6850f77db092b70a9b42a522ca15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae28c7a5e20440483a4e5b28b0d1ee042484fdc9f350945eb529880bd3ff491e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e707baa4138b15e50ebce902f36c011180a3294c5391448954c81dd94378de1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "532896b3958f00fc540461bfffa1864dcae2d51165c100a8eb42de5ce734f021" + sha256 cellar: :any_skip_relocation, sonoma: "a2cc1df79c5e57c03e1356d2c574477d43c0a2b4e3b43931d11137716e14065b" + sha256 cellar: :any_skip_relocation, ventura: "1ec6ec8c64eb5462a319fc640f4c8be7fbf7df78fef3633d28244a1030f80adb" + sha256 cellar: :any_skip_relocation, monterey: "f4b2a60136050855c0446ce1e7d9baa890541f11e9bd7991b54f8fe8dce36054" + sha256 cellar: :any_skip_relocation, arm64_linux: "39d11e9a09a0007d3a1b94485f6cb005b6ee3f08201a43187d8b85b0a1b2df74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1af85098406f38474034563e06b631e0fb9671331bbb057a9c3f0311f086f51f" + end + + def install + system "make", "all", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"nq", "touch", "TEST" + assert_match "exited with status 0", shell_output("#{bin}/nqtail -a 2>&1") + assert_path_exists testpath/"TEST" + end +end diff --git a/Formula/n/nqp.rb b/Formula/n/nqp.rb new file mode 100644 index 0000000000000..5fcffe0922e47 --- /dev/null +++ b/Formula/n/nqp.rb @@ -0,0 +1,46 @@ +class Nqp < Formula + desc "Lightweight Raku-like environment for virtual machines" + homepage "https://github.com/Raku/nqp" + url "https://github.com/Raku/nqp/releases/download/2025.10/nqp-2025.10.tar.gz" + sha256 "11a08aba5645b0b3a2f82d7f555632836ed1df2d710e92c938b55fbc96068a71" + license "Artistic-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "92440fa773b1718bff64711bd20e83c80227fab069e2be44e6111797d8a6b1a2" + sha256 arm64_sequoia: "8e231fc6894a806374b4313f62bbd002a50a05b43243eabc976c296566c184b2" + sha256 arm64_sonoma: "237c1c1ba229b3dbd2399b83e1fb4be1a70279fd1f9bb31274455be23006c0fc" + sha256 sonoma: "e5872e40626a75e65266aed7c42fbd2bc0c87c79e585cb746395212826d1fa70" + sha256 arm64_linux: "686016b7828008d2b7ab114367b301b42f76b432079173a5fde255aa3fef7e9c" + sha256 x86_64_linux: "3a2f2d8e98d655a79900b45c2b7d370a8af8cf8e284d28d148971e2698074812" + end + + depends_on "moarvm" + + uses_from_macos "perl" => :build + + conflicts_with "rakudo-star", because: "rakudo-star currently ships with nqp included" + + def install + ENV.deparallelize + + # Work around Homebrew's directory structure and help find moarvm libraries + inreplace "tools/build/gen-version.pl", "$libdir, 'MAST'", "'#{Formula["moarvm"].opt_share}/nqp/lib/MAST'" + + system "perl", "Configure.pl", + "--backends=moar", + "--prefix=#{prefix}", + "--with-moar=#{Formula["moarvm"].bin}/moar" + system "make" + system "make", "install" + end + + test do + out = shell_output("#{bin}/nqp -e 'for (0,1,2,3,4,5,6,7,8,9) { print($_) }'") + assert_equal "0123456789", out + end +end diff --git a/Formula/n/nrg2iso.rb b/Formula/n/nrg2iso.rb new file mode 100644 index 0000000000000..0c933f310939c --- /dev/null +++ b/Formula/n/nrg2iso.rb @@ -0,0 +1,46 @@ +class Nrg2iso < Formula + desc "Extract ISO9660 data from Nero nrg files" + homepage "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso.en.html" + url "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso-0.4.1.tar.gz" + sha256 "3be36a416758fc1910473b49a8dadf2a2aa3d51f1976197336bc174bc1e306e5" + license "GPL-3.0-or-later" + + # The latest version reported on the English page (nrg2iso.en.html) and the + # main French page (nrg2iso.html) can differ, so we may want to keep an eye + # on this to make sure we don't miss any versions. + livecheck do + url :homepage + regex(/href=.*?nrg2iso[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e3e40609655a903bf15b7b74cca8dd7e74be5e79b1d363cc838672d60d6b4b4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f1d58f67f14d00b757723122fa33b637eee7d39ee468f900d49776d423f49c2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c09a924e840e8dc516e7164e678386d07de4f6b28d73aff61cc8242cdb0f99ef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "99f68337a5c1aef14aff2ae516a4a87c1e51c886c1485c6a8b5e5abf5a0253f4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2f66686ff7f33af0e071175ff79b600cd843a1e8daeb94af0785844a56528a9f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ca8279b0cbdf542068fad1c72abbd63dab1c756a315e676a0e704d19196feeb9" + sha256 cellar: :any_skip_relocation, sonoma: "d9a8a236b5cec92e5fe801e39c8a8d35e1578887690d21fb81947a731c403b88" + sha256 cellar: :any_skip_relocation, ventura: "b58424cd717ffc269c6a5208922f5a91375040c4e2d2a53e280645d0547a3e71" + sha256 cellar: :any_skip_relocation, monterey: "1de954133ee56482c496ff5fa1d688048a3487a08aee8c4c9a47b733631a135a" + sha256 cellar: :any_skip_relocation, big_sur: "fad5cff7cbfe394a08dbe9f52f0f0d7872be02fde704cd610bb2cafba844fae6" + sha256 cellar: :any_skip_relocation, catalina: "4928245286399a545930ec079d6299a844e334e5cbe90eab8d8e55f0fc690f66" + sha256 cellar: :any_skip_relocation, arm64_linux: "516d3243088cdfed8f020ec6aa7a5684b18006c9bbf34d70bc52ac2a8fbbb025" + sha256 cellar: :any_skip_relocation, x86_64_linux: "740b102a8a4df8a8523a8b7812e3eed07f9ce6e0e1c8557867360fe4c1a18136" + end + + def install + # fix version output issue + inreplace "nrg2iso.c", "VERSION \"0.4\"", "VERSION \"#{version}\"" + + system "make" + bin.install "nrg2iso" + end + + test do + assert_equal "nrg2iso v#{version}", + shell_output("#{bin}/nrg2iso --version").chomp + end +end diff --git a/Formula/n/nrm.rb b/Formula/n/nrm.rb new file mode 100644 index 0000000000000..0f5ff7cbb2c1d --- /dev/null +++ b/Formula/n/nrm.rb @@ -0,0 +1,25 @@ +class Nrm < Formula + desc "NPM registry manager, fast switch between different registries" + homepage "https://github.com/Pana/nrm" + url "https://registry.npmjs.org/nrm/-/nrm-2.1.0.tgz" + sha256 "cdad289ac8e72878ab72575ee61551b5d1cb6334097d6904f5ce30603ae5c74f" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fe1e778553efe4a3562c5a800617a7c112c075961c42f1d7b0cd84f7884c5aa7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "SUCCESS", shell_output("#{bin}/nrm add test http://localhost") + assert_match "test --------- http://localhost/", shell_output("#{bin}/nrm ls") + assert_match "SUCCESS", shell_output("#{bin}/nrm del test") + end +end diff --git a/Formula/n/nrpe.rb b/Formula/n/nrpe.rb new file mode 100644 index 0000000000000..42c12aef20fc5 --- /dev/null +++ b/Formula/n/nrpe.rb @@ -0,0 +1,89 @@ +class Nrpe < Formula + desc "Nagios remote plugin executor" + homepage "https://www.nagios.org/" + url "https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-4.1.3/nrpe-4.1.3.tar.gz" + sha256 "5a86dfde6b9732681abcd6ea618984f69781c294b8862a45dfc18afaca99a27a" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "feeb66458c03b58979ff1a72f247e3d5ea334330c2afc4ca5e375e530e7ed8d3" + sha256 cellar: :any, arm64_sequoia: "4849e7eb841d00b2f10f7dd81c088226e6aebb683f5c29e64d72dc6bfb327f84" + sha256 cellar: :any, arm64_sonoma: "bc97d9570dfb3d1204feda1817e62fcebbf43898c3cbd00ee1592b1296654d8c" + sha256 cellar: :any, arm64_ventura: "6c5566eca3996b993eb04867452d5a10b2ecb3a12e325916ff70256a7af8178e" + sha256 cellar: :any, sonoma: "e429d8acb7ba6187fc9118a86d36e891e79169353e3b736dd514604c8d2f5ff9" + sha256 cellar: :any, ventura: "05cd704766c25bd45a0b73ad8869dc747ba70565445a10ff1af9538d0b4cdf10" + sha256 cellar: :any_skip_relocation, arm64_linux: "961b74c9e9c9b6784f3ef4dba4e691390bc2d16d4cbe5f2d9f257caf20734209" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22362e8eb73fba3a3346049a7ac718c06068c2048b9e79e371b5309197d80e8f" + end + + depends_on "nagios-plugins" + depends_on "openssl@3" + + def install + user = `id -un`.chomp + group = `id -gn`.chomp + + if OS.linux? + ENV["tmpfilesd"] = etc/"tmpfiles.d" + (etc/"tmpfiles.d").mkpath + end + + system "./configure", "--prefix=#{prefix}", + "--libexecdir=#{HOMEBREW_PREFIX}/sbin", + "--with-piddir=#{var}/run", + "--sysconfdir=#{etc}", + "--with-nrpe-user=#{user}", + "--with-nrpe-group=#{group}", + "--with-nagios-user=#{user}", + "--with-nagios-group=#{group}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + # Set both or it still looks for /usr/lib + "--with-ssl-lib=#{Formula["openssl@3"].opt_lib}", + "--enable-ssl", + "--enable-command-args" + + inreplace "src/Makefile" do |s| + s.gsub! "$(LIBEXECDIR)", "$(SBINDIR)" + s.gsub! "$(DESTDIR)#{HOMEBREW_PREFIX}/sbin", "$(SBINDIR)" + end + + system "make", "all" + system "make", "install", "install-config" + end + + def post_install + (var/"run").mkpath + end + + service do + run [opt_bin/"nrpe", "-c", etc/"nrpe.cfg", "-d"] + end + + def port_open?(ip_address, port, seconds = 1) + Timeout.timeout(seconds) do + TCPSocket.new(ip_address, port).close + end + true + rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Timeout::Error + false + end + + test do + port = free_port + cp etc/"nrpe.cfg", testpath + inreplace "nrpe.cfg", /^server_port=5666$/, "server_port=#{port}" + + pid = spawn bin/"nrpe", "-n", "-c", "#{testpath}/nrpe.cfg", "-d" + sleep 2 + sleep 10 if Hardware::CPU.intel? + + begin + assert port_open?("localhost", port), "nrpe did not start" + pid_nrpe = shell_output("pgrep nrpe").to_i + ensure + Process.kill("SIGINT", pid_nrpe) if pid_nrpe + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/n/ns-3.rb b/Formula/n/ns-3.rb new file mode 100644 index 0000000000000..488029e2afc7d --- /dev/null +++ b/Formula/n/ns-3.rb @@ -0,0 +1,55 @@ +class Ns3 < Formula + include Language::Python::Virtualenv + + desc "Discrete-event network simulator" + homepage "https://www.nsnam.org/" + url "https://gitlab.com/nsnam/ns-3-dev/-/archive/ns-3.46.1/ns-3-dev-ns-3.46.1.tar.gz" + sha256 "3cb25d4ce1fb5c8597c91ab3d14c52a9f37eff92c36c2961772966c440850171" + license "GPL-2.0-only" + + bottle do + sha256 arm64_tahoe: "056ad158ebdcf047c7326fdf17a978fcc6d4163d76ab8d6ce8e9f307f9ebeeb0" + sha256 arm64_sequoia: "d22d30dcce8d6c063c9ed33b784fc5a83615e1ee9a4870e6cd8f8e6a104cf75e" + sha256 arm64_sonoma: "77bda72c0389cbc365aae61b2184047cc3f6eed1a6c1bc8fc056f96884d626ad" + sha256 sonoma: "1bfca6a9c11da394758d98720f00ac08737f100600e6512975f889f8088fcf56" + sha256 cellar: :any_skip_relocation, arm64_linux: "f210ed90adcdfc7243fd9a6058ca6723f6ce7c5f1c28adacd99fe3ac2a4bd871" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d809b943bc13cb7e20247616806148a3fcbe5ef7d99adcf5e7f3e5ecdfd52f09" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "gsl" + depends_on "open-mpi" + + uses_from_macos "python" => :build + uses_from_macos "libxml2" + uses_from_macos "sqlite" + + def install + # Fix to error: no matching function for call to ‘find...’ + # Issue ref: https://gitlab.com/nsnam/ns-3-dev/-/issues/1264 + inreplace "src/core/model/test.cc", "#include ", "#include \n#include " + + # Fix binding's rpath + linker_flags = ["-Wl,-rpath,#{loader_path}"] + + args = %W[ + -DNS3_GTK3=OFF + -DNS3_PYTHON_BINDINGS=OFF + -DNS3_MPI=ON + -DCMAKE_SHARED_LINKER_FLAGS=#{linker_flags.join(" ")} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples/tutorial/first.cc" + end + + test do + system ENV.cxx, "-std=c++20", "-o", "test", pkgshare/"first.cc", "-I#{include}", "-L#{lib}", + "-lns#{version}-core", "-lns#{version}-network", "-lns#{version}-internet", + "-lns#{version}-point-to-point", "-lns#{version}-applications" + system "./test" + end +end diff --git a/Formula/n/nsd.rb b/Formula/n/nsd.rb new file mode 100644 index 0000000000000..b6971be92416c --- /dev/null +++ b/Formula/n/nsd.rb @@ -0,0 +1,49 @@ +class Nsd < Formula + desc "Name server daemon" + homepage "https://www.nlnetlabs.nl/projects/nsd/" + url "https://www.nlnetlabs.nl/downloads/nsd/nsd-4.13.0.tar.gz" + sha256 "83181b9cfee9495076f124926b28259e7f3911c4da80e17883c211c7e17cd04e" + license "BSD-3-Clause" + + # We check the GitHub repo tags instead of + # https://www.nlnetlabs.nl/downloads/nsd/ since the first-party site has a + # tendency to lead to an `execution expired` error. + livecheck do + url "https://github.com/NLnetLabs/nsd.git" + regex(/^NSD[._-]v?(\d+(?:[._]\d+)+)[._-]REL$/i) + + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "0fee163d31c782df891c1437048a19763a3824a9f1617a2df0cad734a46c8291" + sha256 arm64_sequoia: "2d074f30dd1cc0bf6c9d23040c937636d687ae902e05623a7b0f94ee356696e7" + sha256 arm64_sonoma: "15ee17b7f63e3018c47360ad079f9b0da806e8eb1411315947ed2c572e78ae9d" + sha256 sonoma: "dcc2cc4d9aaf6192b4f895db997156c97c2e2d3754173d10bbdfbbde1ad1732f" + sha256 arm64_linux: "5451d9855a5b62d075e8362e3228529da88c728518417678a98e738e885358de" + sha256 x86_64_linux: "6d12bcd4ef889302b2845723df72e6a7aea04a6691ecceba358763a43c4fe818" + end + + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "openssl@3" + + def install + ENV.runtime_cpu_detection if Hardware::CPU.intel? + + system "./configure", "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "--disable-dnstap", + "--with-libevent=#{Formula["libevent"].opt_prefix}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + system sbin/"nsd", "-v" + end +end diff --git a/Formula/n/nsh.rb b/Formula/n/nsh.rb new file mode 100644 index 0000000000000..b60603f6dde72 --- /dev/null +++ b/Formula/n/nsh.rb @@ -0,0 +1,37 @@ +class Nsh < Formula + desc "Fish-like, POSIX-compatible shell" + homepage "https://github.com/nuta/nsh" + url "https://github.com/nuta/nsh/archive/refs/tags/v0.4.2.tar.gz" + sha256 "b0c656e194e2d3fe31dc1c6ee15fd5808db3b2428d79adf786c6900ebbba0849" + license any_of: ["CC0-1.0", "MIT"] + head "https://github.com/nuta/nsh.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8de98d7c1f703f719f7cab7cd55a8f633543319cb60c8fd05bd6bdc95bf83ac7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ef8db75b69ddc2fa1c2a917190320078a4d050906e8695cd6ce86ba7a311790" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c014a7d6e2c282fd56a1c4059f3cfb03edfc6dcb508e1976c46da859d7b386aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed0302eb6517ce8ab878bf1dce1954a16242a2dbc211d266f9773590aa1822e1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7cef76f0a812b0fe8ec3c23e9ceaaa5c2c671f418bd0aa5103972439c9544144" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "afed7ecb9b4cd75cf529db0b5c035bee623b2d59e713d2f543cd61e4ab28e1a1" + sha256 cellar: :any_skip_relocation, sonoma: "0f44f5e6d9c363a174593bd3a871eed2572d4afe45a37715f73c8739d5b328a2" + sha256 cellar: :any_skip_relocation, ventura: "3c342fc7f7b6f3ef1fe471cfc73d457e4c53acbbbb6db12e7c89a3881e221a39" + sha256 cellar: :any_skip_relocation, monterey: "714f185da8a9912b95aacec6c43943eaf178afc960442ab6d131bbb58abdb79e" + sha256 cellar: :any_skip_relocation, big_sur: "5ca1f1cd16b32c731c9702b80c3524071431823ee7df7f833b30e89725019783" + sha256 cellar: :any_skip_relocation, catalina: "befe47c8ab9779445203caa06d3dd002f69967742a1483cc6f6f4ca54da65f9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "64bf0caef687e903d920f5fc3d8e4bc8535fcbc3f2463d744ef5f37ca7128bc8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2459f1a58f38485536f990ac8e8817721e7fec5e313934af0ae00cc3d897f7b1" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal "hello", shell_output("#{bin}/nsh -c \"echo -n hello\"") + end +end diff --git a/Formula/n/nsnake.rb b/Formula/n/nsnake.rb new file mode 100644 index 0000000000000..ea4de50213c77 --- /dev/null +++ b/Formula/n/nsnake.rb @@ -0,0 +1,42 @@ +class Nsnake < Formula + desc "Classic snake game with textual interface" + homepage "https://github.com/alexdantas/nSnake" + url "https://downloads.sourceforge.net/project/nsnake/GNU-Linux/nsnake-3.0.1.tar.gz" + sha256 "e0a39e0e188a6a8502cb9fc05de3fa83dd4d61072c5b93a182136d1bccd39bb9" + license "GPL-3.0-or-later" + head "https://github.com/alexdantas/nSnake.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1ede653161111adadc9dc28604dc24adf4ffba2657224e300c613c230d46bfc6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d833e90080112061fbc54747bda14a5d5c1ac48bab003c62cbb9a2f1a71f1578" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48a4e540caaa0e3c67718d4ee02c14473b0b498f2418e4f680b6c41e6b65e749" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08df400ffea570d1d05454d588e8e59717666bf169497c5fb2697d0ed0f240ed" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c212b9faab55968fd2a60490a7bf6df2ccb59aa78d677afb5296cec00a58d0c8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bb559f3a29d374cbaa1a96ca05671056e7a18f194e12e58fec21021d946ca74e" + sha256 cellar: :any_skip_relocation, sonoma: "1bce487c2e3125c1bbbb1dc95e6fd9b8ba3a2277eab080652a3ecffd3acab265" + sha256 cellar: :any_skip_relocation, ventura: "1fee1158f44144f5f1ffbdf356f28e945b35046caee5eae61b2f03603fa29dda" + sha256 cellar: :any_skip_relocation, monterey: "86696340da0ac35fc29e3295d9b5ce2f198c381a41adc796d45084e488207279" + sha256 cellar: :any_skip_relocation, big_sur: "22062984c8682ed418515bc558c03f8a2c477b4152c3abb1d486c404fdf8cadc" + sha256 cellar: :any_skip_relocation, catalina: "6ff26e57639f58e6bc2bbd36c511d3c21cf0b5e818b270efb6ae14e542c780c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1660368200433643c2a044d0640a7ba9b485a6b8fd35093119b66b4c4a941f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bac278d384ea2b61e61c9baaf5b6bbbc388a520f5c39ca4978f8d2c60cdbede" + end + + uses_from_macos "ncurses" + + def install + system "make", "install", "PREFIX=#{prefix}" + + # No need for Linux desktop + rm_r(share/"applications") + rm_r(share/"icons") + rm_r(share/"pixmaps") + end + + test do + assert_match "nsnake v#{version} ", shell_output("#{bin}/nsnake -v") + end +end diff --git a/Formula/n/nspr.rb b/Formula/n/nspr.rb new file mode 100644 index 0000000000000..144b44a004806 --- /dev/null +++ b/Formula/n/nspr.rb @@ -0,0 +1,54 @@ +class Nspr < Formula + desc "Platform-neutral API for system-level and libc-like functions" + homepage "https://hg.mozilla.org/projects/nspr" + url "https://archive.mozilla.org/pub/nspr/releases/v4.37/src/nspr-4.37.tar.gz" + sha256 "5f9344ed0e31855bd38f88b33c9d9ab94f70ce547ef3213e488d1520f61840fa" + license "MPL-2.0" + + livecheck do + url "https://ftp.mozilla.org/pub/nspr/releases/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "eff1c0e6bc94e71a9c36e987c1f0156dafa9df059a2e76b421b84a8469783b0d" + sha256 cellar: :any, arm64_sequoia: "016dca2d6e11881cd46b45e5630cd92d2b05f17f575c74fcf2b145813db46972" + sha256 cellar: :any, arm64_sonoma: "64ab3b08f2abdaec46516d5791ab5716545dc536ea2f8da8d62f41c81c176768" + sha256 cellar: :any, arm64_ventura: "a4433f5307ebf0b42746acaae5897d6b833952b210d9d7009bd7a366e9dbc6c9" + sha256 cellar: :any, sonoma: "926173cc071ce815b2ce530b4a853d7461517531e174c4e2802387085d49c428" + sha256 cellar: :any, ventura: "91f46b8dc274b729853e605b016214c9a130706f759b33221a6d712b5a6f773c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d9f4dad664f6e761ec0b2a468b9c90a38062b5dd6c3939739ae96c173ece0c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2acd5fb0ba04b32d4e12168a048eb72800a91c1e89a247076680360f3f2a8e8a" + end + + def install + ENV.deparallelize + cd "nspr" do + args = %W[ + --disable-debug + --prefix=#{prefix} + --enable-strip + --with-pthreads + --enable-ipv6 + --enable-64bit + ] + args << "--enable-macos-target=#{MacOS.version}" if OS.mac? + system "./configure", *args + + if OS.mac? + # Remove the broken (for anyone but Firefox) install_name + inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", "-install_name #{lib}/$@ " + end + + system "make" + system "make", "install" + + (bin/"compile-et.pl").unlink + (bin/"prerr.properties").unlink + end + end + + test do + system bin/"nspr-config", "--version" + end +end diff --git a/Formula/n/nsq.rb b/Formula/n/nsq.rb new file mode 100644 index 0000000000000..2d33e8e5a340b --- /dev/null +++ b/Formula/n/nsq.rb @@ -0,0 +1,75 @@ +class Nsq < Formula + desc "Realtime distributed messaging platform" + homepage "https://nsq.io/" + url "https://github.com/nsqio/nsq/archive/refs/tags/v1.3.0.tar.gz" + sha256 "c6289e295aaa40c8d9651de76e66bc9f23e7f5c40b1cc051ea5901965093e1f0" + license "MIT" + head "https://github.com/nsqio/nsq.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d50a1c5f27cc5ea79197980f99ac801a1d01cf55d19d493620584b43629cdcae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b7075d5ab5ff5090f350c30db2215f62ae04e8ae77754178546817297f58c91e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "996305c886d786e601f5252e6a0d95845bb2160bf9f2a5c5fb27bf801f302d01" + sha256 cellar: :any_skip_relocation, arm64_ventura: "708b357c95856ee8d0598beb7db172ebdef492f6754cb7cbdd09db30772d6d46" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b7c87bebb10695f7411a2662c959cac3a4da39febcc2fd6b10b7600ca2325520" + sha256 cellar: :any_skip_relocation, sonoma: "0ec31e900f313d0c2b7a7a71a12e6264f43346cb53ce66bea885386dc3d301b9" + sha256 cellar: :any_skip_relocation, ventura: "1c7e5d999245a576a73ff684c2540c8c2dd0f4dd7e6f0e1d045f97b9099dde0b" + sha256 cellar: :any_skip_relocation, monterey: "1d2ae14197604c4964dd5341720da2ec45cf31437eb7d3db811b6ca84e578174" + sha256 cellar: :any_skip_relocation, arm64_linux: "8afc82c4ac396662ef4530ace7005950a1c2b27b4b1f7747bb9db4c24744a074" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5635d83fc8df021e37cbe8058e509361bc5323ef663f713fdc82d84f1844e597" + end + + depends_on "go" => :build + + def install + system "make", "DESTDIR=#{prefix}", "PREFIX=", "install" + end + + def post_install + (var/"log").mkpath + (var/"nsq").mkpath + end + + service do + run [opt_bin/"nsqd", "-data-path=#{var}/nsq"] + keep_alive true + working_dir var/"nsq" + log_path var/"log/nsqd.log" + error_log_path var/"log/nsqd.error.log" + end + + test do + lookupd = fork do + exec bin/"nsqlookupd" + end + sleep 2 + d = fork do + exec bin/"nsqd", "--lookupd-tcp-address=127.0.0.1:4160" + end + sleep 2 + admin = fork do + exec bin/"nsqadmin", "--lookupd-http-address=127.0.0.1:4161" + end + sleep 2 + to_file = fork do + exec bin/"nsq_to_file", "--lookupd-http-address=127.0.0.1:4161", + "--output-dir=#{testpath}", + "--topic=test" + end + sleep 2 + system "curl", "-d", "hello", "http://127.0.0.1:4151/pub?topic=test" + sleep 2 + dat = File.read(Dir["*.dat"].first) + assert_match "test", dat + assert_match version.to_s, dat + ensure + Process.kill(15, lookupd) + Process.kill(15, d) + Process.kill(15, admin) + Process.kill(15, to_file) + Process.wait lookupd + Process.wait d + Process.wait admin + Process.wait to_file + end +end diff --git a/Formula/n/nss.rb b/Formula/n/nss.rb new file mode 100644 index 0000000000000..b35bf9742d617 --- /dev/null +++ b/Formula/n/nss.rb @@ -0,0 +1,125 @@ +class Nss < Formula + desc "Libraries for security-enabled client and server applications" + homepage "https://firefox-source-docs.mozilla.org/security/nss/index.html" + url "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_117_RTM/src/nss-3.117.tar.gz" + sha256 "5786b523a2f2e9295ed10d711960d2e33cd620bb80d6288443eda43553a51996" + license "MPL-2.0" + + livecheck do + url "https://ftp.mozilla.org/pub/security/nss/releases/" + regex(%r{href=.*?NSS[._-]v?(\d+(?:[._]\d+)+)[._-]RTM/?["' >]}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match.first.tr("_", ".") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "da471f4fa38130feac6a7cdf7a0ff056092ed69bbd8e84cbe18a2705e3c8de79" + sha256 cellar: :any, arm64_sequoia: "a25f5133711c39f2a14e448eccfd2655ffc73a56393490aa2f89dd372f2558dd" + sha256 cellar: :any, arm64_sonoma: "c4cbfe7d6c4ed5895c7c47fcc24fdba4244ab0509c2cd54a36249ffaf614ba6a" + sha256 cellar: :any, sonoma: "c36257f27e1e5678df930ab786025d022d06ba6098ddd09b8e64e5b642270854" + sha256 cellar: :any_skip_relocation, arm64_linux: "8104ac0392f74303541b0ab76341c7fdb0bbec28ca4ad43a97d35e3104ec60e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "004110b79b8a5c2a6f2219b72fbb1e80426c2427a7c46e53cf96d1c49b29b699" + end + + depends_on "nspr" + + uses_from_macos "sqlite" + uses_from_macos "zlib" + + conflicts_with "arabica", because: "both install `mangle` binaries" + conflicts_with "resty", because: "both install `pp` binaries" + + def install + # Fails on arm64 macOS for some reason with: + # aes-armv8.c:14:2: error: "Compiler option is invalid" + ENV.runtime_cpu_detection if OS.linux? || Hardware::CPU.intel? + ENV.deparallelize + cd "nss" + + args = %W[ + BUILD_OPT=1 + NSS_ALLOW_SSLKEYLOGFILE=1 + NSS_DISABLE_GTESTS=1 + NSS_USE_SYSTEM_SQLITE=1 + NSPR_INCLUDE_DIR=#{Formula["nspr"].opt_include}/nspr + NSPR_LIB_DIR=#{Formula["nspr"].opt_lib} + USE_64=1 + ] + + # Remove the broken (for anyone but Firefox) install_name + inreplace "coreconf/Darwin.mk", "-install_name @executable_path", "-install_name #{lib}" + inreplace "lib/freebl/config.mk", "@executable_path", lib + + system "make", "all", *args + + # We need to use cp here because all files get cross-linked into the dist + # hierarchy, and Homebrew's Pathname.install moves the symlink into the keg + # rather than copying the referenced file. + cd "../dist" + bin.mkpath + os = OS.kernel_name + Dir.glob("#{os}*/bin/*") do |file| + cp file, bin unless file.include? ".dylib" + end + + include_target = include/"nss" + include_target.mkpath + Dir.glob("public/{dbm,nss}/*") { |file| cp file, include_target } + + lib.mkpath + libexec.mkpath + Dir.glob("#{os}*/lib/*") do |file| + if file.include? ".chk" + cp file, libexec + else + cp file, lib + end + end + # resolves conflict with openssl, see legacy-homebrew#28258 + rm lib/"libssl.a" + + (bin/"nss-config").write config_file + (lib/"pkgconfig/nss.pc").write pc_file + end + + test do + # See: https://developer.mozilla.org/docs/Mozilla/Projects/NSS/tools/NSS_Tools_certutil + (testpath/"passwd").write("It's a secret to everyone.") + system bin/"certutil", "-N", "-d", pwd, "-f", "passwd" + system bin/"certutil", "-L", "-d", pwd + end + + # A very minimal nss-config for configuring firefox etc. with this nss, + # see https://bugzil.la/530672 for the progress of upstream inclusion. + def config_file + <<~EOS + #!/bin/sh + for opt; do :; done + case "$opt" in + --version) opt="--modversion";; + --cflags|--libs) ;; + *) exit 1;; + esac + pkg-config "$opt" nss + EOS + end + + def pc_file + <<~EOS + prefix=#{prefix} + exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${prefix}/include/nss + + Name: NSS + Description: Mozilla Network Security Services + Version: #{version} + Requires: nspr >= 4.12 + Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 + Cflags: -I${includedir} + EOS + end +end diff --git a/Formula/n/nsuds.rb b/Formula/n/nsuds.rb new file mode 100644 index 0000000000000..b0bb8a412f63e --- /dev/null +++ b/Formula/n/nsuds.rb @@ -0,0 +1,58 @@ +class Nsuds < Formula + desc "Ncurses Sudoku system" + homepage "https://nsuds.sourceforge.net/" + url "https://downloads.sourceforge.net/project/nsuds/nsuds/nsuds-0.7B/nsuds-0.7B.tar.gz" + sha256 "6d9b3e53f3cf45e9aa29f742f6a3f7bc83a1290099a62d9b8ba421879076926e" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/nsuds[._-]v?(\d+(?:\.\d+)+[A-Z]?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "6a85cd2409e3f89ef8578b377b849b1c04ebe32fded4bee64e5ce1961ad1440c" + sha256 arm64_sequoia: "bd292cf994f5641b70cfd91b592bc8e82b9a9895d1c95c718ff0530a9b98668d" + sha256 arm64_sonoma: "2a478277a19b9cfaf40f2b675cef9113b6db1d662468fdaf2e34c7d9200b5cb9" + sha256 arm64_ventura: "3971aacb07fdd707ad1365f0a7b8b27ab1e694cec0aadac8b117d16639baf75d" + sha256 arm64_monterey: "711432e1f5a30ba46ddd772ed79b173a0091abbeb96792d10f25180ab2a763d2" + sha256 arm64_big_sur: "983aff6a207bb1a4224ca713567000ccb578b108d6c358982654e2fcd59313d9" + sha256 sonoma: "919378da9a48cb758e0e3e4fcd6abe39e81e04c369a77c868b33fbd78387408a" + sha256 ventura: "f83642d920b2f5b8c053bf29acbcc582215568a0a646e5797f7026daa099342d" + sha256 monterey: "2a9d8df67a2c0b7689a48960487bc7f240db19f321f492448c30608de7f59c2d" + sha256 big_sur: "17ff896355ee4f8905783422f8e1dbb68b88d45ba1ca6cc46116c93ec35bc2ef" + sha256 catalina: "dcccae0ffd504a9a09ed57bfe0ac26127723c92513177eb862fa132e21c6968a" + sha256 arm64_linux: "e38b08c1f769caeeca6deaca0f3a1c0d22364ad89f38973edd6dd3edc6bfc5b0" + sha256 x86_64_linux: "bebff61d5efe0ebc66d905824e0316e2c2f46b0c48128855478271de5abb9bb0" + end + + head do + url "https://git.code.sf.net/p/nsuds/code.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "ncurses" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `showmarks'; nsuds-grid.o:(.bss+0x60): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + ENV["LDADD"] = "-lncurses -lm" unless OS.mac? + system "autoreconf", "-i" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + inreplace "src/Makefile", /chgrp .*/, "" + system "make", "install" + end + + test do + assert_match(/nsuds version #{version}$/, shell_output("#{bin}/nsuds -v")) + end +end diff --git a/Formula/n/nsync.rb b/Formula/n/nsync.rb new file mode 100644 index 0000000000000..4e06a90c84a31 --- /dev/null +++ b/Formula/n/nsync.rb @@ -0,0 +1,46 @@ +class Nsync < Formula + desc "C library that exports various synchronization primitives" + homepage "https://github.com/google/nsync" + url "https://github.com/google/nsync/archive/refs/tags/1.30.0.tar.gz" + sha256 "883a0b3f8ffc1950670425df3453c127c1a3f6ed997719ca1bbe7f474235b6cc" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "34b5f37ee36a14b1e76e5052c2f593544e39d45acd8d7d7e0d90600226072802" + sha256 cellar: :any, arm64_sequoia: "33fec4c6c42fbb8b09c8d3d0243f3730add7887e902d5bdb1608ed733843a75e" + sha256 cellar: :any, arm64_sonoma: "b347b136ba54882d203e7d0989e94347b9fb738feaa6c0059fa9bec7070fde0c" + sha256 cellar: :any, sonoma: "78b2f4271d03da7e849c0446837d338aceb66903a53bd9e89d8aeb559dda6f0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f3bd67fa9e140561b815dcf454a09ee5950ca419fb5b5a49752558dc904be8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70bf2bc57ecea6d5c4acc02275f360a67fc86ea714c2a76ebbbff1509453ef6f" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DNSYNC_ENABLE_TESTS=OFF + ] + system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + nsync_mu mu; + nsync_mu_init(&mu); + nsync_mu_lock(&mu); + nsync_mu_unlock(&mu); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lnsync", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/ntbtls.rb b/Formula/n/ntbtls.rb new file mode 100644 index 0000000000000..a721bd5ca0877 --- /dev/null +++ b/Formula/n/ntbtls.rb @@ -0,0 +1,61 @@ +class Ntbtls < Formula + desc "Not Too Bad TLS Library" + homepage "https://gnupg.org/" + url "https://gnupg.org/ftp/gcrypt/ntbtls/ntbtls-0.3.2.tar.bz2" + sha256 "bdfcb99024acec9c6c4b998ad63bb3921df4cfee4a772ad6c0ca324dbbf2b07c" + license "GPL-3.0-or-later" + + livecheck do + url "https://gnupg.org/download/" + regex(/href=.*?ntbtls[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3b087b31c57533e6cb4ab903dd86588239435abd414625856b9cffe2b4d77648" + sha256 cellar: :any, arm64_sequoia: "0b1672e39923c23daf86bb20ba920ba31144e4a2ab95218cab6c8b45d979a534" + sha256 cellar: :any, arm64_sonoma: "ab4d5a53bb700d479e6be04b5d749b8c65947be1bf2800120ccb706b2608af1d" + sha256 cellar: :any, arm64_ventura: "acec598404ed6699950460cb1df48690c6439eb2c79310c29c81a020fee5cbe7" + sha256 cellar: :any, arm64_monterey: "d5406167e6466323874ab9402e80e9ee0bde98c6b623f89a819f710483f3b62a" + sha256 cellar: :any, sonoma: "2e18052aa9a13285b91aee389a8dd972709598a1b493bc16611a9a8c2e4e82ed" + sha256 cellar: :any, ventura: "0aa20fe8898d11f765b3b06d5ceef09fb95aa25680177d31742c7780fcb3f56e" + sha256 cellar: :any, monterey: "325ae328b6d7b3979026fab41d9b6e1bf2b1977635a444d5aa46feb4203f3941" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2c56e174f8142aed89b36666fe8fb3e325b3c3a881c2765b014493eec9ef471" + sha256 cellar: :any_skip_relocation, x86_64_linux: "535750dc2867eebec1d2e416ae1f586284316f18ae56ca35dcb0edbc5b7e110c" + end + + depends_on "libgcrypt" + depends_on "libgpg-error" + depends_on "libksba" + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--with-libgpg-error-prefix=#{Formula["libgpg-error"].opt_prefix}", + "--with-libgcrypt-prefix=#{Formula["libgcrypt"].opt_prefix}", + "--with-libksba-prefix=#{Formula["libksba"].opt_prefix}" + system "make", "check" # This is a TLS library, so let's run `make check`. + system "make", "install" + inreplace bin/"ntbtls-config", prefix, opt_prefix + end + + test do + (testpath/"ntbtls_test.c").write <<~C + #include "ntbtls.h" + #include + int main() { + printf("%s", ntbtls_check_version(NULL)); + return 0; + } + C + + ENV.append_to_cflags shell_output("#{bin}/ntbtls-config --cflags").strip + ENV.append "LDLIBS", shell_output("#{bin}/ntbtls-config --libs").strip + + system "make", "ntbtls_test" + assert_equal version.to_s, shell_output("./ntbtls_test") + end +end diff --git a/Formula/n/ntfs-3g.rb b/Formula/n/ntfs-3g.rb new file mode 100644 index 0000000000000..14e0f2d3ef7ab --- /dev/null +++ b/Formula/n/ntfs-3g.rb @@ -0,0 +1,99 @@ +class Ntfs3g < Formula + desc "Read-write NTFS driver for FUSE" + homepage "https://www.tuxera.com/community/open-source-ntfs-3g/" + url "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2022.10.3.tgz" + sha256 "f20e36ee68074b845e3629e6bced4706ad053804cbaf062fbae60738f854170c" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] + + # GitHub release descriptions contain a link to the `stable` tarball. + livecheck do + url :head + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "13c0f887f2cef53978d28dfcb8c1a3f69f8c70407bf2267ad6033eef0b5cfc2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3fe3041e69391706e917d335a8d6bebd1dd502126e5d19e4b0fabded9a3e40f7" + end + + head do + url "https://github.com/tuxera/ntfs-3g.git", branch: "edge" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libgcrypt" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "coreutils" => :test + depends_on "gettext" + depends_on "libfuse@2" # FUSE 3 issue: https://github.com/tuxera/ntfs-3g/issues/54 + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + args = std_configure_args + %W[ + --exec-prefix=#{prefix} + --mandir=#{man} + --with-fuse=external + --enable-extras + --disable-ldconfig + ] + + system "./autogen.sh" if build.head? + # Workaround for hardcoded /sbin + inreplace Dir["{ntfsprogs,src}/Makefile.in"], "$(DESTDIR)/sbin/", "$(DESTDIR)#{sbin}/" + system "./configure", *args + system "make" + system "make", "install" + + # Install a script that can be used to enable automount + File.open("#{sbin}/mount_ntfs", File::CREAT|File::TRUNC|File::RDWR, 0755) do |f| + f.puts <<~EOS + #!/bin/bash + + VOLUME_NAME="${@:$#}" + VOLUME_NAME=${VOLUME_NAME#/Volumes/} + USER_ID=#{Process.uid} + GROUP_ID=#{Process.gid} + + if [ "$(/usr/bin/stat -f %u /dev/console)" -ne 0 ]; then + USER_ID=$(/usr/bin/stat -f %u /dev/console) + GROUP_ID=$(/usr/bin/stat -f %g /dev/console) + fi + + #{opt_bin}/ntfs-3g \\ + -o volname="${VOLUME_NAME}" \\ + -o local \\ + -o negative_vncache \\ + -o auto_xattr \\ + -o auto_cache \\ + -o noatime \\ + -o windows_names \\ + -o streams_interface=openxattr \\ + -o inherit \\ + -o uid="$USER_ID" \\ + -o gid="$GROUP_ID" \\ + -o allow_other \\ + -o big_writes \\ + "$@" >> /var/log/mount-ntfs-3g.log 2>&1 + + exit $?; + EOS + end + end + + test do + # create a small raw image, format and check it + ntfs_raw = testpath/"ntfs.raw" + system Formula["coreutils"].libexec/"gnubin/truncate", "--size=10M", ntfs_raw + ntfs_label_input = "Homebrew" + system sbin/"mkntfs", "--force", "--fast", "--label", ntfs_label_input, ntfs_raw + system bin/"ntfsfix", "--no-action", ntfs_raw + ntfs_label_output = shell_output("#{sbin}/ntfslabel #{ntfs_raw}") + assert_match ntfs_label_input, ntfs_label_output + end +end diff --git a/Formula/n/ntfy.rb b/Formula/n/ntfy.rb new file mode 100644 index 0000000000000..62098cfa57fee --- /dev/null +++ b/Formula/n/ntfy.rb @@ -0,0 +1,39 @@ +class Ntfy < Formula + desc "Send push notifications to your phone or desktop via PUT/POST" + homepage "https://ntfy.sh/" + url "https://github.com/binwiederhier/ntfy/archive/refs/tags/v2.14.0.tar.gz" + sha256 "5549b4c4654c021d3c956655f30f91bc1481ec3b2d8f502582e3f06fa100aa18" + license any_of: ["Apache-2.0", "GPL-2.0-only"] + head "https://github.com/binwiederhier/ntfy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bbd508965b636d79b8b11cfbe6d18ba9031ba615fa01d1748b32faaf4982bd9b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a0e6ef987e43fa3fa4427c556b13e0a045b1b3c7541836b5296e873ab3722cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a0e6ef987e43fa3fa4427c556b13e0a045b1b3c7541836b5296e873ab3722cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a0e6ef987e43fa3fa4427c556b13e0a045b1b3c7541836b5296e873ab3722cb" + sha256 cellar: :any_skip_relocation, sonoma: "b15d82f2bb2142a9e729d1b27f45ae0ae9cdde2065ccd30ea3deb8ab95eaa6f3" + sha256 cellar: :any_skip_relocation, ventura: "b15d82f2bb2142a9e729d1b27f45ae0ae9cdde2065ccd30ea3deb8ab95eaa6f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "960187f75fb377b17ed5bcaa2b4a323fe23559b8c887f23e82216b6778c6bc7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "189313f23ad7768e11084f3ec5f72becc3ca599790b256e8f74818dad63ee7fe" + end + + depends_on "go" => :build + + def install + system "make", "cli-deps-static-sites" + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:, tags: "noserver") + end + + test do + require "securerandom" + random_topic = SecureRandom.hex(6) + + ntfy_in = shell_output("#{bin}/ntfy publish #{random_topic} 'Test message from HomeBrew during build'") + ohai ntfy_in + sleep 5 + ntfy_out = shell_output("#{bin}/ntfy subscribe --poll #{random_topic}") + ohai ntfy_out + assert_match ntfy_in, ntfy_out + end +end diff --git a/Formula/n/ntl.rb b/Formula/n/ntl.rb new file mode 100644 index 0000000000000..9a34d6c5564de --- /dev/null +++ b/Formula/n/ntl.rb @@ -0,0 +1,76 @@ +class Ntl < Formula + desc "C++ number theory library" + homepage "https://libntl.org" + url "https://libntl.org/ntl-11.5.1.tar.gz" + sha256 "210d06c31306cbc6eaf6814453c56c776d9d8e8df36d74eb306f6a523d1c6a8a" + license "LGPL-2.1-or-later" + + livecheck do + url "https://libntl.org/download.html" + regex(/href=.*?ntl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a403f10e051b7654eb42b3e0d5f1ec028e96eb44ce25673962aeb1cfa0adaf65" + sha256 cellar: :any, arm64_sequoia: "5b5d6f2e3c4aa10a77d9b526811afda574c87f29a2e56776866755be59996efa" + sha256 cellar: :any, arm64_sonoma: "ef6c7df391853c86ee1859fd85b677fa6e233d7f60f70921b97a5c0fb61ac330" + sha256 cellar: :any, arm64_ventura: "8495ee2f2c83602778defb01dab2fe3f61c9c3bab35598cc5eb642ba02ef8afb" + sha256 cellar: :any, arm64_monterey: "2bd16013e5715eefa223b3a72a08e725e2414a2d0b849199a253aef506ee9ba2" + sha256 cellar: :any, arm64_big_sur: "972f6f6fdf45e71f8d852a5ab162189f14bb1f800692af4466b5672e75ff62cd" + sha256 cellar: :any, sonoma: "83f23838c8d74f136eef54295632baf31eab7bf906ff0fb002f6312be454fd6a" + sha256 cellar: :any, ventura: "987890c24404d66b16f9c6ebd5ef2baa9dd2f8ce35c3965e8e457c932e63acab" + sha256 cellar: :any, monterey: "d882847db4da92801d989382e682e6ba372263942ef42eafdd16e2672cdeb107" + sha256 cellar: :any, big_sur: "e108c06f39537cdc58cd6e7f681395ae069c381af5e0c95abca97d1ccc90ec9e" + sha256 cellar: :any, catalina: "b97739b3b8de3daabe0d76cec3e29ef47f4bc85e6197054aec6d10f6b8f1a4ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "640bacf81998649350ec51bd93978b6f723e2631bea4e136321413ee33b90dc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0612d19a82889b93ddae2920ccd148644bee62f74c0c39662c20bb8447fe6c2" + end + + depends_on "gmp" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + directory "src/libtool-origin" + end + + def install + args = ["PREFIX=#{prefix}", "SHARED=on"] + + cd "src" do + system "./configure", *args + system "make" + system "make", "install" + end + end + + test do + (testpath/"square.cc").write <<~CPP + #include + #include + + int main() + { + NTL::ZZ a; + std::cin >> a; + std::cout << NTL::power(a, 2); + return 0; + } + CPP + gmp = Formula["gmp"] + flags = %W[ + -std=c++11 + -I#{include} + -L#{gmp.opt_lib} + -L#{lib} + -lntl + -lgmp + -lpthread + ] + system ENV.cxx, "square.cc", "-o", "square", *flags + assert_equal "4611686018427387904", pipe_output("./square", "2147483648") + end +end diff --git a/Formula/n/ntopng.rb b/Formula/n/ntopng.rb new file mode 100644 index 0000000000000..7e2c54ac8c5a3 --- /dev/null +++ b/Formula/n/ntopng.rb @@ -0,0 +1,92 @@ +class Ntopng < Formula + desc "Next generation version of the original ntop" + homepage "https://www.ntop.org/products/traffic-analysis/ntop/" + url "https://github.com/ntop/ntopng/archive/refs/tags/6.4.tar.gz" + sha256 "3eaff9f13566e349cada66d41191824a80288ea19ff4427a49a682386348931d" + license "GPL-3.0-only" + head "https://github.com/ntop/ntopng.git", branch: "dev" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "923d0cf57bfd6c48d12465ce81b821249850791702162a9d10a6f6ea73ed79f6" + sha256 arm64_sequoia: "1b62120513879ce4cb6ba349d4ac92223089a6c77e6d6719df29250f61954a7b" + sha256 arm64_sonoma: "40dffa8af2e27119e1ee18f2808f3578f71a437968fb8178e78c80bdb2dac34c" + sha256 arm64_ventura: "0fb6b854e3a12b0023d73b05c5f8241bd345d0811fa67e62606e5306ee2646be" + sha256 sonoma: "0f136bffdd96b2f2265f6215872b75b532ed4119035f54e6929fc61ede54983d" + sha256 ventura: "eebfd0cc2d9bf8fcd50ad648370c995967c73a820eb7077c4b335d6567bbc20f" + sha256 arm64_linux: "8c3a45211d5d3e9fca45b73ae7d94d5c4929b1a11825d26fcae495dbb5d97bbd" + sha256 x86_64_linux: "4b68256ead71268544621f9d21828f0fade161f54f6ba3dc3803d28f20bda3fc" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "valkey" => :test + + depends_on "hiredis" + depends_on "json-c" + depends_on "libmaxminddb" + depends_on "libsodium" + depends_on "mariadb-connector-c" + depends_on "ndpi" + depends_on "openssl@3" + depends_on "rrdtool" + depends_on "sqlite" + depends_on "zeromq" + + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "libpcap" + uses_from_macos "zlib" + + on_macos do + depends_on "zstd" + end + + on_linux do + depends_on "libcap" + end + + # Add `--with-dynamic-ndpi` configure flag + # Remove in the next release + patch do + url "https://github.com/ntop/ntopng/commit/a195be91f7685fcc627e9ec88031bcfa00993750.patch?full_index=1" + sha256 "208b9332eed6f6edb5b756e794de3ee7161601e8208b813d2555a006cf6bef40" + end + + # Fix compilation error when using `--with-synamic-ndpi` flag + # https://github.com/ntop/ntopng/pull/9252 + patch do + url "https://github.com/ntop/ntopng/commit/0fc226046696bb6cc2d95319e97fad6cb3ab49e1.patch?full_index=1" + sha256 "807d9c58ee375cb3ecf6cdad96a00408262e2af10a6d9e7545936fd3cc528509" + end + + def install + # Remove bundled libraries + rm_r Dir["third-party/{json-c,rrdtool}*"] + + args = %W[ + --with-dynamic-ndpi + --with-ndpi-includes=#{Formula["ndpi"].opt_include}/ndpi + ] + + system "./autogen.sh" + system "./configure", *args, *std_configure_args + system "make", "install", "MAN_DIR=#{man}" + end + + test do + valkey_port = free_port + valkey_bin = Formula["valkey"].bin + spawn valkey_bin/"valkey-server", "--port", valkey_port.to_s + sleep 10 + + mkdir testpath/"ntopng" + spawn bin/"ntopng", "-i", test_fixtures("test.pcap"), "-d", testpath/"ntopng", "-r", "localhost:#{valkey_port}" + sleep 30 + + assert_match "list", shell_output("#{valkey_bin}/valkey-cli -p #{valkey_port} TYPE ntopng.trace") + end +end diff --git a/Formula/n/ntp.rb b/Formula/n/ntp.rb new file mode 100644 index 0000000000000..f72899d9ac5a4 --- /dev/null +++ b/Formula/n/ntp.rb @@ -0,0 +1,53 @@ +class Ntp < Formula + desc "Network Time Protocol (NTP) Distribution" + homepage "https://www.ntp.org" + url "https://downloads.nwtime.org/ntp/4.2.8/ntp-4.2.8p18.tar.gz" + version "4.2.8p18" + sha256 "cf84c5f3fb1a295284942624d823fffa634144e096cfc4f9969ac98ef5f468e5" + license all_of: ["BSD-2-Clause", "NTP"] + + livecheck do + url "https://downloads.nwtime.org/ntp/" + regex(/href=.*?ntp[._-]v?(\d+(?:\.\d+)+(?:p\d+)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "67f312e7b755756bb74869269cb8b4fd9e582e6f265be0730c39d541422b54cd" + sha256 cellar: :any, arm64_sequoia: "991683b9f1c1596bd5b8c518bc94efc07539371b2ef0c3ee49144e2db44d4e8e" + sha256 cellar: :any, arm64_sonoma: "41bfb9eea202e95df1a7aaaee2884019f7df5f3c0b8be100b4fc09f7ac26cdd1" + sha256 cellar: :any, arm64_ventura: "7ba3ffa6ba07c07ed7fbe369c179179771936d3c98393f5aec6cbedf7098eafe" + sha256 cellar: :any, arm64_monterey: "e8a0cff26dafc8c15090033a5425ef996c16ff35e7517de4a6dda107a8e0535e" + sha256 cellar: :any, sonoma: "9128d709ea91a5cea9a64a6c804d2d2c96a5231166ae6479e43343cb6bd781ac" + sha256 cellar: :any, ventura: "92ddc0b1b103b862bf61a27841c4d1ff4ffcdc415f0f64f8425dd829bc62ee6b" + sha256 cellar: :any, monterey: "6f8e1ae4e1b385d6be6a447b34cca98566cc24d7ba5bdf9960de5abc2b66b13f" + sha256 cellar: :any_skip_relocation, arm64_linux: "40bf8bb2e6bd82b46d60e28e3f2c0d65e5a68778560d89a17b6296410358dc40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7e45f68bdcd6758f869f30271115cbe845d5b9e0d1b72b9429e63624109bc09" + end + + depends_on "openssl@3" + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + --with-openssl-libdir=#{Formula["openssl@3"].lib} + --with-openssl-incdir=#{Formula["openssl@3"].include} + --with-net-snmp-config=no + ] + + system "./configure", *args + ldflags = "-lresolv" + ldflags = "#{ldflags} -undefined dynamic_lookup" if OS.mac? + system "make", "install", "LDADD_LIBNTP=#{ldflags}" + end + + test do + # On Linux all binaries are installed in bin, while on macOS they are split between bin and sbin. + ntpdate_bin = OS.mac? ? sbin/"ntpdate" : bin/"ntpdate" + assert_match "step time server ", shell_output("#{ntpdate_bin} -bq pool.ntp.org") + end +end diff --git a/Formula/n/nu.rb b/Formula/n/nu.rb new file mode 100644 index 0000000000000..92d076d9fc00d --- /dev/null +++ b/Formula/n/nu.rb @@ -0,0 +1,135 @@ +class Nu < Formula + desc "Object-oriented, Lisp-like programming language" + homepage "https://programming.nu/" + url "https://github.com/programming-nu/nu/archive/refs/tags/v2.3.0.tar.gz" + sha256 "1a6839c1f45aff10797dd4ce5498edaf2f04c415b3c28cd06a7e0697d6133342" + license "Apache-2.0" + revision 4 + head "https://github.com/programming-nu/nu.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b58a4f88db0117eae2d986cfb083129c6247b160f4a79f45d8af94b32a557ec1" + sha256 cellar: :any, arm64_sequoia: "d3bb01d2370d369f17fc335866e16b316332705eb82ac79c9ec5572abefc3dba" + sha256 cellar: :any, arm64_sonoma: "69497e945208739a28df606a1378a92c58df44126be188d8326e4d9a2dd19d58" + sha256 cellar: :any, arm64_ventura: "f1ba59236538e76c7c7dcd66e99e644c959ba55ecaae3f04bb3c38d0f6d1727f" + sha256 cellar: :any, sonoma: "b2c929078f30bbd7c3dd6fe407323a86df1b525d87980ce87828dfb8f2dd9ad0" + sha256 cellar: :any, ventura: "f193d95cab2271ca80753f5ec2915e54b70eeb60200f56f82bea6a0dbd59098c" + sha256 x86_64_linux: "e574e9a1043c30df8da1995fb0d344271e4d2f3cd92815a57a3ddbf420a8f794" + end + + # Last release on 2019-07-29. Needs multiple workarounds/hacks and uses EOL `pcre` + deprecate! date: "2025-10-29", because: :unmaintained + disable! date: "2026-10-29", because: :unmaintained + + depends_on "pcre" + + uses_from_macos "llvm" => :build + uses_from_macos "swift" => :build # For libdispatch on Linux. + uses_from_macos "libffi" + + on_linux do + depends_on "gnustep-make" => :build + depends_on arch: :x86_64 # fails to build on arm64 linux + depends_on "gnustep-base" + depends_on "libobjc2" + depends_on "readline" + end + + on_arm do + # objc/NuBridge.m:1242:6: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 + # Since libffi.tbd only exports '_ffi_prep_closure' on x86_64, we need to use formula until fixed. + # Issue ref: https://github.com/programming-nu/nu/issues/97 + depends_on "libffi" + end + + # Clang must be used on Linux because GCC Objective-C support is insufficient. + fails_with :gcc + + # Fix Snow Leopard or Lion check to avoid `-arch x86_64` being added to ARM build + # PR ref: https://github.com/programming-nu/nu/pull/101 + # TODO: Remove if upstream PR is merged and in a release. + patch do + url "https://github.com/programming-nu/nu/commit/0a837a407f9e9b8f7861b0dd2736f54c04729642.patch?full_index=1" + sha256 "6c8567f0c2681f652dc087f6ef4b713bcc598e99729099a910984f9134f6a72c" + end + + # Fix missing include in objc/NuParser.m + # Build failure details: https://github.com/Homebrew/homebrew-core/pull/126905#issuecomment-1487877021 + # PR ref: https://github.com/programming-nu/nu/pull/103 + # TODO: Remove if upstream PR is merged and in a release. + patch do + url "https://github.com/programming-nu/nu/commit/fdd7cfb3eaf4c456a2d8c1406526f02861c3f877.patch?full_index=1" + sha256 "d00afd41b68b9f67fd698f0651f38dd9da56517724753f8b4dc6c85d048ff88b" + end + + def install + ENV["PREFIX"] = prefix + # Don't hard code path to clang. + inreplace "tools/nuke", "/usr/bin/clang", ENV.cc + # Work around ARM build error where directives removed necessary code and broke mininush. + # Nu uncaught exception: NuIvarAddedTooLate: explicit instance variables ... + # Issue ref: https://github.com/programming-nu/nu/issues/102 + inreplace "objc/NuOperators.m", "#if defined(__x86_64__) || TARGET_OS_IPHONE", + "#if defined(__x86_64__) || defined(__arm64__)" + + unless OS.mac? + ENV.append_path "PATH", Formula["gnustep-make"].libexec + + # Help linker find libdispatch from swift on Linux. + # This is only used for the mininush temporary compiler and is not needed for nush. + ldflags = %W[ + "-L#{Formula["swift"].libexec}/lib/swift/linux" + "-Wl,-rpath,#{Formula["swift"].libexec}/lib/swift/linux" + ] + ENV["LIBDIRS"] = ldflags.join(" ") + + # Remove CFLAGS that force using GNU runtime on Linux. + # Remove this workaround when upstream drops these flags or provides a way to disable them. + # Reported upstream here: https://github.com/programming-nu/nu/issues/99. + inreplace "Nukefile", "-DGNU_RUNTIME=1", "" + inreplace "Nukefile", "-fgnu-runtime", "" + end + + inreplace "Nukefile" do |s| + s.gsub!('(SH "sudo ', '(SH "') # don't use sudo to install + s.gsub!("\#{@destdir}/Library/Frameworks", "\#{@prefix}/Frameworks") + s.sub!(/^;; source files$/, <<~EOS) + ;; source files + (set @framework_install_path "#{frameworks}") + EOS + end + + # Remove bundled libffi + rm_r(buildpath/"libffi") + + # Remove unused prefix from ffi.h to match directory structure of libffi formula + include_path = (OS.mac? && Hardware::CPU.arm?) ? "ffi" : "x86_64-linux-gnu" + inreplace ["objc/NuBridge.h", "objc/NuBridge.m", "objc/Nu.m"], "<#{include_path}/", "<" + + system "make", "CC=#{ENV.cc}" + system "./mininush", "tools/nuke" + bin.mkdir + lib.mkdir + include.mkdir + system "./mininush", "tools/nuke", "install" + end + + def caveats + on_macos do + <<~EOS + Nu.framework was installed to: + #{frameworks}/Nu.framework + + You may want to symlink this Framework to a standard macOS location, + such as: + ln -s "#{frameworks}/Nu.framework" /Library/Frameworks + EOS + end + end + + test do + system bin/"nush", "-e", '(puts "Everything old is Nu again.")' + end +end diff --git a/Formula/n/nuclei.rb b/Formula/n/nuclei.rb new file mode 100644 index 0000000000000..9cb20395485ad --- /dev/null +++ b/Formula/n/nuclei.rb @@ -0,0 +1,32 @@ +class Nuclei < Formula + desc "HTTP/DNS scanner configurable via YAML templates" + homepage "https://docs.projectdiscovery.io/tools/nuclei/overview" + url "https://github.com/projectdiscovery/nuclei/archive/refs/tags/v3.4.10.tar.gz" + sha256 "d5604ef47d31abba42814876b637105f0b1e9b9167b79206aeeeb2935f102102" + license "MIT" + head "https://github.com/projectdiscovery/nuclei.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "908c5f8ee50915b6704721d74117c29487173fa669b3bb145ec015757d57795a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8e02ca6ccfea6c329fdc8aea963cc41a9ee738b6c0bf7a964b1c5e58ae991c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f7dc7d7be800b66ec11b4260f73239e3621a2b0f3d4ab23aeae5fe878da822d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f927eee3609a32163c271a9b8b52fe92cce86a0368019810b25842c528e5eff" + sha256 cellar: :any_skip_relocation, sonoma: "3391af85ec776a401da818f6ad2ad92d9523c3dde7ee4294b73ff2600c1e5189" + sha256 cellar: :any_skip_relocation, ventura: "b7f51d9761e65e6e9b7d88ea6c10d3bd7945a67b75c708927f0d5ea4a01c1410" + sha256 cellar: :any_skip_relocation, arm64_linux: "7313ba7bf016bbd0f5d7cf7de38fe070336486ad1f26602f21555c1ba48bb15b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afa2936249c4e000ba9e0620382b1b6c9015523720abf641be6be0d409f234f6" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/nuclei" + end + + test do + output = shell_output("#{bin}/nuclei -scan-all-ips -disable-update-check example.com 2>&1", 1) + assert_match "No results found", output + + assert_match version.to_s, shell_output("#{bin}/nuclei -version 2>&1") + end +end diff --git a/Formula/n/nudoku.rb b/Formula/n/nudoku.rb new file mode 100644 index 0000000000000..618c9911e8191 --- /dev/null +++ b/Formula/n/nudoku.rb @@ -0,0 +1,39 @@ +class Nudoku < Formula + desc "Ncurses based sudoku game" + homepage "https://jubalh.github.io/nudoku/" + url "https://github.com/jubalh/nudoku/archive/refs/tags/6.0.0.tar.gz" + sha256 "98a80a58a15ea664dfa62e1e5ae51c737f9555ef114e483f3b3c2674d9c51495" + license "GPL-3.0-or-later" + head "https://github.com/jubalh/nudoku.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "9a56fa1b63e34c07c2ed2ce2dc5f95a875028e2b9edfc5f35df2367d9ecf9ac9" + sha256 cellar: :any, arm64_sequoia: "ac02804b3879c3f1b602bd2c15f6f9a218b320f8fa3740cf2e355117022f4e54" + sha256 cellar: :any, arm64_sonoma: "6d2d2160e49788d703b0317dcddf47c81ce73e1c115f45c7a687d1cb8ec1526f" + sha256 cellar: :any, arm64_ventura: "e000973d34179d396b9d66fe6892166d42994d912cff28749ffc3ae742282f82" + sha256 cellar: :any, sonoma: "70ae4545d5cd3f7fb9e72f2f65e48c1635588bccb16c377823797dffb2a51e4c" + sha256 cellar: :any, ventura: "bc735246db023afd1b83131222be7be992b484651937c15bf2857bc79acdb27d" + sha256 arm64_linux: "13766407355b1cd53c1c9926ee724d2a9c1b8307fcd68694e440640e8c962ac9" + sha256 x86_64_linux: "12f9fe670b01d9ad113eef3b94e0ac990f2210100b47bdf0f62b476bb43fd818" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "gettext" + + uses_from_macos "ncurses" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + "--enable-cairo", + *std_configure_args + system "make", "install" + end + + test do + assert_match "nudoku version #{version}", shell_output("#{bin}/nudoku -v") + end +end diff --git a/Formula/n/nuget.rb b/Formula/n/nuget.rb new file mode 100644 index 0000000000000..4d26be70b9c3e --- /dev/null +++ b/Formula/n/nuget.rb @@ -0,0 +1,36 @@ +class Nuget < Formula + desc "Package manager for Microsoft development platform including .NET" + homepage "https://www.nuget.org/" + url "https://dist.nuget.org/win-x86-commandline/v6.14.0/nuget.exe" + sha256 "92dbed160ddee0f64b901e907439e021211b428e57c089ecc12fc38dcc4bd9a5" + license "MIT" + + livecheck do + url "https://dist.nuget.org/tools.json" + strategy :json do |json| + json["nuget.exe"]&.map do |item| + next if item["stage"] != "ReleasedAndBlessed" + + item["version"] + end + end + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e7a94ca9119b9bb55b584ca97d66e390a0a5271ea53689820f954c7b17fc548b" + end + + depends_on "mono" + + def install + libexec.install "nuget.exe" => "nuget.exe" + (bin/"nuget").write <<~BASH + #!/bin/bash + mono #{libexec}/nuget.exe "$@" + BASH + end + + test do + assert_match "NuGet.Protocol.Core.v3", shell_output("#{bin}/nuget list packageid:NuGet.Protocol.Core.v3") + end +end diff --git a/Formula/n/nuitka.rb b/Formula/n/nuitka.rb new file mode 100644 index 0000000000000..aa53e9f7053e7 --- /dev/null +++ b/Formula/n/nuitka.rb @@ -0,0 +1,56 @@ +class Nuitka < Formula + include Language::Python::Virtualenv + + desc "Python compiler written in Python" + homepage "https://nuitka.net" + url "https://files.pythonhosted.org/packages/6f/87/f20ffda1b6dc04361fa95390f4d47d974ee194e6e1e7688f13d324f3d89b/Nuitka-2.8.4.tar.gz" + sha256 "06b020ef33be97194f888dcfcd4c69c8452ceb61b31c7622e610d5156eb7923d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "faba78fa9c6e612878cd65bc7f29a1e5dee7d764c81282f4b9e8120258b7bdf1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6f752c1c671e08ab79fcf75144316bc7038dc9983ad4aed5d5640439de809f4f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5c4671ffcbbe3edde17926099be676ecd85f433dcf91f28d0a93f115fce1cca" + sha256 cellar: :any_skip_relocation, sonoma: "6e61f90bd45d55c3b070bebb762754c8aa06edd791c0dd4d25c1974e9a155438" + sha256 cellar: :any_skip_relocation, arm64_linux: "9385614d88d4efc9364e9a05fdfa446e14b2f58ef47b9454c40bef6cbfe23bf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa8ffd7296a8f5ff44f89e4ad915f36312ef4c693e6705c89e49a2e39ab75d17" + end + + depends_on "ccache" + depends_on "python@3.13" + + on_linux do + depends_on "patchelf" + end + + resource "ordered-set" do + url "https://files.pythonhosted.org/packages/4c/ca/bfac8bc689799bcca4157e0e0ced07e70ce125193fc2e166d2e685b7e2fe/ordered-set-4.1.0.tar.gz" + sha256 "694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz" + sha256 "7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b" + end + + def install + virtualenv_install_with_resources + man1.install Dir["doc/*.1"] + end + + test do + (testpath/"test.py").write <<~EOS + def talk(message): + return "Talk " + message + + def main(): + print(talk("Hello World")) + + if __name__ == "__main__": + main() + EOS + assert_match "Talk Hello World", shell_output("#{libexec}/bin/python test.py") + system bin/"nuitka", "--onefile", "-o", "test", "test.py" + assert_match "Talk Hello World", shell_output("./test") + end +end diff --git a/Formula/n/num-utils.rb b/Formula/n/num-utils.rb new file mode 100644 index 0000000000000..3752a1e1e6bd7 --- /dev/null +++ b/Formula/n/num-utils.rb @@ -0,0 +1,39 @@ +class NumUtils < Formula + desc "Programs for dealing with numbers from the command-line" + homepage "https://suso.suso.org/xulu/Num-utils" + url "https://suso.suso.org/programs/num-utils/downloads/num-utils-0.5.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/n/num-utils/num-utils_0.5.orig.tar.gz" + sha256 "03592760fc7844492163b14ddc9bb4e4d6526e17b468b5317b4a702ea7f6c64e" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?num-utils[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "9d5185fbab175569c61a97393d00d32ed091c41c2ea6fc16b2d80e1d77b81106" + end + + depends_on "pod2man" => :build + + uses_from_macos "perl" + + conflicts_with "normalize", because: "both install `normalize` binaries" + conflicts_with "argyll-cms", because: "both install `average` binaries" + + def install + %w[average bound interval normalize numgrep numprocess numsum random range round].each do |p| + system "#{Formula["pod2man"].opt_bin}/pod2man", p, "#{p}.1" + bin.install p + man1.install "#{p}.1" + end + end + + test do + assert_equal "2", pipe_output("#{bin}/average", "1\n2\n3\n").strip + end +end diff --git a/Formula/n/numactl.rb b/Formula/n/numactl.rb new file mode 100644 index 0000000000000..3d8dd453ce5e4 --- /dev/null +++ b/Formula/n/numactl.rb @@ -0,0 +1,34 @@ +class Numactl < Formula + desc "NUMA support for Linux" + homepage "https://github.com/numactl/numactl" + url "https://github.com/numactl/numactl/releases/download/v2.0.19/numactl-2.0.19.tar.gz" + sha256 "f2672a0381cb59196e9c246bf8bcc43d5568bc457700a697f1a1df762b9af884" + license all_of: ["GPL-2.0-only", "LGPL-2.1-only", :public_domain, :cannot_represent] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "cbabb9e7d3bccc03ad04aa04e52a009f37fc8d2f725d37fa369f9149de61fefa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43bce9542369d74930001dfdc0e77f532ec0dd93f41f1ade35f0205c800270cc" + end + + depends_on :linux + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + if (numa_available() >= 0) { + struct bitmask *mask = numa_allocate_nodemask(); + numa_free_nodemask(mask); + } + return 0; + } + C + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lnuma", "-o", "test" + system "./test" + end +end diff --git a/Formula/n/numbat.rb b/Formula/n/numbat.rb new file mode 100644 index 0000000000000..abd614962a3a3 --- /dev/null +++ b/Formula/n/numbat.rb @@ -0,0 +1,38 @@ +class Numbat < Formula + desc "Statically typed programming language for scientific computations" + homepage "https://numbat.dev/" + url "https://github.com/sharkdp/numbat/archive/refs/tags/v1.16.0.tar.gz" + sha256 "33f3744a31f62f7ebd985c6b3ec3c6a6d6f897527e8db5bc2de48dd299a63cdd" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/numbat.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d92b9b3aa2eaafc95ace71da1e41d34e1f6edb5f7f7490d1b6f7506446e1406" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "487fd2bfbd8ac5b590386c8686b32335c475a4aa49fe7e5a58e5a4e6e3dd44dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d23f0227df669a913c50a2a48b6be6ee98ca4375bf554cd443547e8ffa76b237" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0415e2b39effbd9843b5454705d157f76a842fa8c6c4399a78af8edf45e56bbb" + sha256 cellar: :any_skip_relocation, sonoma: "f45d7ee45e0db01d8ff53ff4d6eb96157d4d5a1cc707d5f7b56de73659fe2cb6" + sha256 cellar: :any_skip_relocation, ventura: "ac553d4a9495b73b7a6bb60d24e997c77efc41c61d25f338cff93b4ab5f747f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "510a56a4eac2d79df0ff557d3c38695f9a8434a88ee2f4ebb587647a1e686cf5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45335ba3caf2597ba12c9ee5f1a942f488c015bcd6b4b204ba0151ec056e5d07" + end + + depends_on "rust" => :build + + def install + ENV["NUMBAT_SYSTEM_MODULE_PATH"] = "#{pkgshare}/modules" + system "cargo", "install", *std_cargo_args(path: "numbat-cli") + + pkgshare.install "numbat/modules" + end + + test do + (testpath/"test.nbt").write <<~EOS + print("pi = {pi}") + EOS + + output = shell_output("#{bin}/numbat test.nbt") + + assert_equal "pi = 3.14159", output.chomp + end +end diff --git a/Formula/n/numcpp.rb b/Formula/n/numcpp.rb new file mode 100644 index 0000000000000..244f9f7a9997d --- /dev/null +++ b/Formula/n/numcpp.rb @@ -0,0 +1,38 @@ +class Numcpp < Formula + desc "C++ implementation of the Python Numpy library" + homepage "https://dpilger26.github.io/NumCpp" + url "https://github.com/dpilger26/NumCpp/archive/refs/tags/Version_2.14.2.tar.gz" + sha256 "9333115f7f8ec9394a1bc49fb6e07a9175e0efbad29c6eba1aff0dab22ba36de" + license "MIT" + head "https://github.com/dpilger26/NumCpp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a21b467f1f67ba7bdef8f0363c7812c550d1d0b93bcd15dd40da4a590f90fa83" + end + + depends_on "cmake" => :build + depends_on "boost" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + nc::NdArray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; + a = nc::diagonal(a); + for (int i = 0; i < nc::shape(a).cols; ++i) + std::cout << a[i] << std::endl; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-I#{include}" + assert_equal "1\n5\n9\n", shell_output("./test") + end +end diff --git a/Formula/n/numdiff.rb b/Formula/n/numdiff.rb new file mode 100644 index 0000000000000..b0df6f6d10955 --- /dev/null +++ b/Formula/n/numdiff.rb @@ -0,0 +1,57 @@ +class Numdiff < Formula + desc "Putative files comparison tool" + homepage "https://www.nongnu.org/numdiff" + url "https://download.savannah.gnu.org/releases/numdiff/numdiff-5.9.0.tar.gz" + mirror "https://download-mirror.savannah.gnu.org/releases/numdiff/numdiff-5.9.0.tar.gz" + sha256 "87284a117944723eebbf077f857a0a114d818f8b5b54d289d59e73581194f5ef" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/numdiff/" + regex(/href=.*?numdiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "54f00b428c20f3de9065177cbc84a59cffb9865351b4062ea429b337197c2c8b" + sha256 cellar: :any, arm64_sequoia: "5cb5945e56139a742bd1887a3b8a97affe5cb10bac1cafbb5cb40a5b1a70e28d" + sha256 cellar: :any, arm64_sonoma: "49e592dbd55f5df5add8f7a7814d349cbb150546f672ddca22d12e489ff65fde" + sha256 cellar: :any, arm64_ventura: "109d8e428ace4ef6d70dc8ded51bec5d0510906e07c9ee4b3e32143f5054c82c" + sha256 cellar: :any, arm64_monterey: "bdd0116d55164e3704b948d8ff69aa57e3553d7c635897d26e9d381ef67b6dea" + sha256 cellar: :any, arm64_big_sur: "ee93b5fbe264b96623ef6523a1dec871a5839d56823512da6a7811c06c367d5d" + sha256 cellar: :any, sonoma: "670605c39b10b5f5eb8fc0227b92d01219f0e08d54ebe26e1e051580e0f838e0" + sha256 cellar: :any, ventura: "5d48008fe3126fac107bc91308d83fffd39ef5c5e99a4150d52a95febfe573a7" + sha256 cellar: :any, monterey: "58e6c6f067c9a0ff39143bea741d68c5b50f06ddf7d66f5fbc35f4d691fcfd33" + sha256 cellar: :any, big_sur: "5acb0364a5f94b40b9f4d79c998910426855da30ea7f7b00241c135ffabdcb8e" + sha256 cellar: :any, catalina: "bb6458bc44ff4086cf74590c540dfce76014aaafdffd140b0a032b4ddbf17df6" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebf440325cddaad6e20bce018736dc65e4ea1895de1ce590f21c267b3ab304ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9334ab2846721f6a4b643e061dc1ef76f693a8a07f99f05dda3dfdc190165a9" + end + + depends_on "gmp" + + def install + system "./configure", "--disable-debug", "--disable-nls", "--enable-gmp", + "--prefix=#{prefix}", "--libdir=#{lib}" + system "make", "install" + end + + test do + (testpath/"a").write "1 2\n" + (testpath/"b").write "1.1 2.5\n" + + expected = <<~EOS + ---------------- + ##1 #:1 <== 1 + ##1 #:1 ==> 1.1 + @ Absolute error = 1.0000000000e-1, Relative error = 1.0000000000e-1 + ##1 #:2 <== 2 + ##1 #:2 ==> 2.5 + @ Absolute error = 5.0000000000e-1, Relative error = 2.5000000000e-1 + + +++ File "a" differs from file "b" + EOS + assert_equal expected, shell_output("#{bin}/numdiff a b", 1) + end +end diff --git a/Formula/n/numpy.rb b/Formula/n/numpy.rb new file mode 100644 index 0000000000000..4b94ddfeda67f --- /dev/null +++ b/Formula/n/numpy.rb @@ -0,0 +1,61 @@ +class Numpy < Formula + desc "Package for scientific computing with Python" + homepage "https://www.numpy.org/" + url "https://files.pythonhosted.org/packages/b5/f4/098d2270d52b41f1bd7db9fc288aaa0400cb48c2a3e2af6fa365d9720947/numpy-2.3.4.tar.gz" + sha256 "a7d018bfedb375a8d979ac758b120ba846a7fe764911a64465fd87b8729f4a6a" + license "BSD-3-Clause" + head "https://github.com/numpy/numpy.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a4311ccc98dd6cc756ebaab843fec9cee968f1250bcd44b9bc0921ac3434b6a0" + sha256 cellar: :any, arm64_sequoia: "4dd9587ee4bc586cadd0b78c2b818e4f82fcf82c1a9e9773a6a04b1a599b327e" + sha256 cellar: :any, arm64_sonoma: "eeab3247ddca70c32cbea630b0424c25bad966d1da180262fb0ed5582a671b4d" + sha256 cellar: :any, sonoma: "977e824561622f73f8c1a096c71641103606112dd963d4adf4d1f852fb7300eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bbe15a5a4b1d7a47ba361637f13d4d42d9dda3d247c0f0d39964eee5624f12a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29dda4d45665c3c480c967ebfedcae6a9df5fe37158bb46d133c200eedad89d7" + end + + depends_on "gcc" => :build # for gfortran + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "openblas" + + on_linux do + depends_on "patchelf" => :build + end + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .sort_by(&:version) # so scripts like `bin/f2py` use newest python + end + + def install + pythons.each do |python| + python3 = python.opt_libexec/"bin/python" + system python3, "-m", "pip", "install", "-Csetup-args=-Dblas=openblas", + "-Csetup-args=-Dlapack=openblas", + *std_pip_args(build_isolation: true), "." + end + end + + def caveats + <<~EOS + To run `f2py`, you may need to `brew install #{pythons.last}` + EOS + end + + test do + pythons.each do |python| + python3 = python.opt_libexec/"bin/python" + system python3, "-c", <<~PYTHON + import numpy as np + t = np.ones((3,3), int) + assert t.sum() == 9 + assert np.dot(t, t).sum() == 27 + PYTHON + end + end +end diff --git a/Formula/n/nuraft.rb b/Formula/n/nuraft.rb new file mode 100644 index 0000000000000..22667d1063169 --- /dev/null +++ b/Formula/n/nuraft.rb @@ -0,0 +1,44 @@ +class Nuraft < Formula + desc "C++ implementation of Raft core logic as a replication library" + homepage "https://github.com/eBay/NuRaft" + url "https://github.com/eBay/NuRaft/archive/refs/tags/v3.0.0.tar.gz" + sha256 "073c3b321efec9ce6b2bc487c283e493a1b2dd41082c5e9ac0b8f00f9b73832d" + license "Apache-2.0" + + bottle do + sha256 arm64_tahoe: "57d924190590cdb01bcd5f62264e6c3af26192ba7e0025f31ec48f562caeb5db" + sha256 arm64_sequoia: "9f0444da2009a60f4b82f977cfb9bc52d968b0e5137e8b71e5fbf916af77475e" + sha256 arm64_sonoma: "ef01fe0ef80d4cb4b0d71f75852eb31bf371a6467145826a0c22cc6b725e4454" + sha256 arm64_ventura: "a0a521444542143814cbfea45bbbe56fa663df2bf4ec6e38f9b90b109176f813" + sha256 sonoma: "a4e7e1636198eb052538eadd905e38f7ad41698b8e161204d515e8580159651d" + sha256 ventura: "9a0710600badd9d65b2b3848fb8d3817acd5f1f491202c19a27f3d8b367d2e63" + sha256 arm64_linux: "3de18ac7749440d6cc2207d0930aae4bc8ccbb7654cf871181136398caa669f2" + sha256 x86_64_linux: "5b8e3ed8205c1c74edb71ad5a819fe84c27c03c51538c5bc6eb4174ebe87398b" + end + + depends_on "cmake" => :build + + depends_on "asio" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # We override OPENSSL_LIBRARY_PATH to avoid statically linking to OpenSSL + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DOPENSSL_LIBRARY_PATH=" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + cp_r pkgshare/"examples/.", testpath + system ENV.cxx, "-std=c++11", "-o", "test", + "quick_start.cxx", "logger.cc", "in_memory_log_store.cxx", + "-I#{include}/libnuraft", "-I#{testpath}/echo", + "-I#{Formula["openssl@3"].opt_include}", + "-L#{lib}", "-lnuraft", + "-L#{Formula["openssl@3"].opt_lib}", "-lcrypto", "-lssl" + assert_match "hello world", shell_output("./test") + end +end diff --git a/Formula/n/nushell.rb b/Formula/n/nushell.rb new file mode 100644 index 0000000000000..4ce79e49d6dec --- /dev/null +++ b/Formula/n/nushell.rb @@ -0,0 +1,51 @@ +class Nushell < Formula + desc "Modern shell for the GitHub era" + homepage "https://www.nushell.sh" + url "https://github.com/nushell/nushell/archive/refs/tags/0.108.0.tar.gz" + sha256 "5995c211411ad1d5dd7da904b9db238a543958675b9e45f5e84fbdf217499eee" + license "MIT" + head "https://github.com/nushell/nushell.git", branch: "main" + + livecheck do + url :stable + regex(/v?(\d+(?:[._]\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "26e0259f39ccfeadca54bc3ed50b108f610f47fe273f0729d2c3b45b21343041" + sha256 cellar: :any, arm64_sequoia: "7e5b1363bb204f855f295ea9ba8c93d3137cc4e61f61487385a7f8f359543fdf" + sha256 cellar: :any, arm64_sonoma: "a8d58b9529805d0cb4f887656becc640c2ceb4110e73db269dfba67cc2ccbbe0" + sha256 cellar: :any, sonoma: "42c98bc06e8ec7ceff9c7238e2b2deceaf194c87dabc7f1ac17a727a8742042b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b38759d54fea36a6ea03b9bd435f70a3804fdbdcba79bbc9d5cbefc7faeea118" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20a9886d3cfc00e5c7547a13bb342def2701fcf9c3e1949f2ebafed1491a55fb" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "libgit2" # for `nu_plugin_gstat` + depends_on "libx11" + depends_on "libxcb" + end + + def install + system "cargo", "install", *std_cargo_args + + buildpath.glob("crates/nu_plugin_*").each do |plugindir| + next unless (plugindir/"Cargo.toml").exist? + + system "cargo", "install", *std_cargo_args(path: plugindir) + end + end + + test do + assert_match "homebrew_test", + pipe_output("#{bin}/nu -c '{ foo: 1, bar: homebrew_test} | get bar'", nil) + end +end diff --git a/Formula/n/nuspell.rb b/Formula/n/nuspell.rb new file mode 100644 index 0000000000000..0f3062d256313 --- /dev/null +++ b/Formula/n/nuspell.rb @@ -0,0 +1,97 @@ +class Nuspell < Formula + desc "Fast and safe spellchecking C++ library" + homepage "https://nuspell.github.io/" + url "https://github.com/nuspell/nuspell/archive/refs/tags/v5.1.6.tar.gz" + sha256 "5d4baa1daf833a18dc06ae0af0571d9574cc849d47daff6b9ce11dac0a5ded6a" + license "LGPL-3.0-or-later" + revision 3 + + bottle do + sha256 cellar: :any, arm64_tahoe: "4397678cc274e63c36b96748a8cf5f616734cf53addf6249a39c24b2d35e8e52" + sha256 cellar: :any, arm64_sequoia: "14ba0bb0f17a8fc5967e48e18fde6cab3bb3b8b001bc9bc35faef3aa59c5ced8" + sha256 cellar: :any, arm64_sonoma: "f4bd583376d69180bec744cdcd0c8d2ab7a9bb0b4677460d6ffc7e824c59ff3f" + sha256 cellar: :any, arm64_ventura: "02756d92662cd21767555be0978764212c94bf7be5a9194fa6635e49239f1de5" + sha256 cellar: :any, sonoma: "23775d359fef306735dc2afd3042a386f22ec7de882bea316685d1822942e3a5" + sha256 cellar: :any, ventura: "90574b2385853fd7d0894a9c06e10385f371a63e56c5299eacf0f96783547ed0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff039a8596d1432cda8a748094dfa39d7952e31164a4ad62b3f0b442daff43eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "108063c1f0d81a9da12e8f82a98b942a80245bba5458415d76e6cd2f760ac678" + end + + depends_on "cmake" => :build + depends_on "pandoc" => :build + depends_on "pkgconf" => :test + depends_on "icu4c@77" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["LANG"] = "en_US.UTF-8" + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["LC_CTYPE"] = "en_US.UTF-8" + + (testpath/"test.txt").write("helloo\nworlld") + assert_match <<~EOS, shell_output("#{bin}/nuspell test.txt 2>&1", 1) + INFO: Locale LC_CTYPE=en_US.UTF-8, Input encoding=UTF-8, Output encoding=UTF-8 + ERROR: Dictionary en_US not found + EOS + + test_dict = testpath/"en_US.aff" + test_dict.write <<~EOS + SET UTF-8 + + SFX A Y 1 + SFX A 0 s . + + PFX B Y 1 + PFX B 0 un . + + FLAG long + + TRY abcdefghijklmnopqrstuvwxyz + EOS + + test_dic = testpath/"en_US.dic" + test_dic.write <<~EOS + 1 + hello + EOS + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() { + auto aff_path = std::string("#{testpath}/en_US.aff"); + auto dic_path = std::string("#{testpath}/en_US.dic"); + auto dict = nuspell::Dictionary(); + + std::ifstream aff_file(aff_path); + std::ifstream dic_file(dic_path); + + try { + dict.load_aff_dic(aff_file, dic_file); + std::cout << "Nuspell library loaded dictionary successfully." << std::endl; + } catch (const std::exception &e) { + std::cerr << "Failed to load dictionary: " << e.what() << std::endl; + return 1; + } + + return 0; + } + CPP + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + ENV.prepend_path "PKG_CONFIG_PATH", icu4c.opt_lib/"pkgconfig" + flags = shell_output("pkg-config --cflags --libs nuspell").chomp.split + flags << "-Wl,-rpath,#{lib},-rpath,#{icu4c.opt_lib}" if OS.linux? + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + assert_match "Nuspell library loaded dictionary successfully.", shell_output("./test") + end +end diff --git a/Formula/n/nut.rb b/Formula/n/nut.rb new file mode 100644 index 0000000000000..ca1b2f3005c9a --- /dev/null +++ b/Formula/n/nut.rb @@ -0,0 +1,95 @@ +class Nut < Formula + desc "Network UPS Tools: Support for various power devices" + homepage "https://networkupstools.org/" + url "https://github.com/networkupstools/nut/releases/download/v2.8.4/nut-2.8.4.tar.gz" + sha256 "0130ba82ea79f04ba4f34c5249a85943977efd984ed7df6aec1a518d5a3594f8" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "5f1c6d0f04e58c0bbc75e52ec57a65f214140863afacd465f16d98e18bbde5fc" + sha256 arm64_sequoia: "c6fcd38ac13bedb5bd201fa7967f5988b7d0319e22b1c666769f02bebb13e0d7" + sha256 arm64_sonoma: "1642b5fca3794df03bf4ccffae50c8db6c2b58bfb0e226142e888501921e7829" + sha256 arm64_ventura: "6157ac5ed158623264729d8c8dcbed1e8e01b6c3b98116e4a5f030ad077f47e9" + sha256 sonoma: "3f9a548610bd191ea3b910d64621f80b9ef467dfb0c00e3fd5133d3c53c6d7c8" + sha256 ventura: "3f056e5ad5607bf0fda058af7753df1780d3044bd2348eb967de9927abc9245c" + sha256 arm64_linux: "a494737e49d1ba83ad68616290582803f92d7ea44af2fb6106a69ca72a9174ba" + sha256 x86_64_linux: "a4b8b536a16c3c00940dec9e28f7181af84ec01332cb98b7934e925227321fa9" + end + + head do + url "https://github.com/networkupstools/nut.git", branch: "master" + depends_on "asciidoc" => :build + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + depends_on "openssl@3" + + on_linux do + depends_on "systemd" + end + + conflicts_with "rhino", because: "both install `rhino` binaries" + + def install + if build.head? + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "./autogen.sh" + end + + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{etc}/nut + --with-statepath=#{var}/state/ups + --with-pidpath=#{var}/run + --with-systemdtmpfilesdir=#{pkgshare} + --with-openssl + --with-serial + --with-usb + --without-avahi + --without-cgi + --without-dev + --without-doc + --without-ipmi + --without-libltdl + --without-neon + --without-nss + --without-nut_monitor + --without-powerman + --without-pynut + --without-snmp + --without-wrap + ] + args << if OS.mac? + "--with-macosx_ups" + else + "--with-udev-dir=#{lib}/udev" + end + + system "./configure", *args + system "make", "install" + end + + def post_install + (var/"state/ups").mkpath + (var/"run").mkpath + end + + service do + run [opt_sbin/"upsmon", "-D"] + end + + test do + system bin/"dummy-ups", "-L" + end +end diff --git a/Formula/n/nutcracker.rb b/Formula/n/nutcracker.rb new file mode 100644 index 0000000000000..c50ec35060609 --- /dev/null +++ b/Formula/n/nutcracker.rb @@ -0,0 +1,51 @@ +class Nutcracker < Formula + desc "Proxy for memcached and redis" + homepage "https://github.com/twitter/twemproxy" + url "https://github.com/twitter/twemproxy/archive/refs/tags/0.5.0.tar.gz" + sha256 "73f305d8525abbaaa6a5f203c1fba438f99319711bfcb2bb8b2f06f0d63d1633" + license "Apache-2.0" + revision 1 + head "https://github.com/twitter/twemproxy.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "abf045b842b325b9beae4b4081057f70d458359c2fae9b4792a4130d74120943" + sha256 cellar: :any, arm64_sequoia: "9858288de204b1ebddc2500149b07ad6cc6c08f92f37936d0055b5f4820bbb03" + sha256 cellar: :any, arm64_sonoma: "878651e4b64cf8af3146bee562a15dcd18bb880a65ede75b61c7232c982db60e" + sha256 cellar: :any, arm64_ventura: "72e440a578846be30b99237a05ac9251ad0859aa19fb4603e73671c61add0e66" + sha256 cellar: :any, arm64_monterey: "c8c9e289383ed4b606246b5300a2b768642ed231a0526e6e9dab6e2f37e762bc" + sha256 cellar: :any, arm64_big_sur: "5063c8fb5c2f1327bb0979be76cf05be72b879113b69667d9d6548d1db6da44b" + sha256 cellar: :any, sonoma: "bc0b16855feadbbf05d9eeb0373c73ed1ec2ad6ee2f98686e328f71f65510c60" + sha256 cellar: :any, ventura: "0fa603b54d16e0a34fc38095337cb3809ec3180249a18b114708aec49c344871" + sha256 cellar: :any, monterey: "0682fca355c4930be73a43fca315d8eb36a709413f60ebae19f58289eafe1916" + sha256 cellar: :any, big_sur: "a8a718227faa82141b08684c12654a04dee9ffc91df8157100fb5b51eb6fe8ba" + sha256 cellar: :any, catalina: "95055ec8487419f854e34be6212369081eaa574ebaa36dabb01b2047f2e31240" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ac5ec0b8889f2bb83510eaacb9eb54b0247b236690469fb4511670d1aa73cd9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d6d4dcbb634abf13629537e4eaa0ee3a9fe87693492c3668c4effe4550a2cd8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libyaml" + + # Use Homebrew libyaml instead of the vendored one. + # Adapted from Debian's equivalent patch. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/nutcracker/use-system-libyaml.patch" + sha256 "9105f2bd784f291da5c3f3fb4f6876e62ab7a6f78256f81f5574d593924e424c" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + + pkgshare.install "conf", "notes", "scripts" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/nutcracker -V 2>&1") + end +end diff --git a/Formula/n/nuttcp.rb b/Formula/n/nuttcp.rb new file mode 100644 index 0000000000000..e78942718f4a3 --- /dev/null +++ b/Formula/n/nuttcp.rb @@ -0,0 +1,41 @@ +class Nuttcp < Formula + desc "Network performance measurement tool" + homepage "https://www.nuttcp.net/nuttcp/" + url "https://www.nuttcp.net/nuttcp/nuttcp-8.2.2.tar.bz2" + sha256 "7ead7a89e7aaa059d20e34042c58a198c2981cad729550d1388ddfc9036d3983" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?nuttcp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d600108d6b3d7e8b8b91dfa5a7a9b842e7c6b36553c6e6eea10b4c0172e1dc00" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa943ef3dca4e0414ccb634ed8246fa800eeb01f563c7578217bd4c9e156649d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3307110d7f6cb527152b3f3e70bdec5f80a89b5be55c27bada5b35d549d51714" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ac8108263034cac96c76efb07222a474c603fee130f0751dd9957bd52111280" + sha256 cellar: :any_skip_relocation, arm64_monterey: "354b4a9b24a8af78f93bc7214b10137897a2bb04d49e42273a7b203265309fce" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c284b20a30f158f7321ca918bc27ffac8f5e644e85acba6231477aa9c4a9f06e" + sha256 cellar: :any_skip_relocation, sonoma: "5cfa8c2cc2f19adca00c59e5f2a2ff0aadf5f5a3b35626c928437b83acdcc22a" + sha256 cellar: :any_skip_relocation, ventura: "3f32f4184daaad9ca38c76c61eef16551706949199fc6ca890357547e249509c" + sha256 cellar: :any_skip_relocation, monterey: "23f6274a513fc5e03b2eba2ea26496beb8e1b7e21ac0824fb7abea9e3487b296" + sha256 cellar: :any_skip_relocation, big_sur: "9001ef97c90c4097f1ebabed20e63305f82a5f04d7ffc0f0d788c249c49d236d" + sha256 cellar: :any_skip_relocation, catalina: "0f5e7a2b61f91360023ef643c0a77fa711855b34006ff07867f1283051aded5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "dcfba3237982e60f9c4605ff141b05308e4bad588891b72cf48df390df84fba2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a45bf649ab4f28ef78699c00d3b71afa3655f26cafaeb01fb7f99fc9f133471" + end + + def install + system "make", "APP=nuttcp", + "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" + bin.install "nuttcp" + man8.install "nuttcp.cat" => "nuttcp.8" + end + + test do + assert_match version.to_s, shell_output("#{bin}/nuttcp -V") + end +end diff --git a/Formula/n/nuvie.rb b/Formula/n/nuvie.rb new file mode 100644 index 0000000000000..6fdd12886d738 --- /dev/null +++ b/Formula/n/nuvie.rb @@ -0,0 +1,94 @@ +class Nuvie < Formula + desc "Ultima 6 engine" + homepage "https://nuvie.sourceforge.net/" + url "https://downloads.sourceforge.net/project/nuvie/Nuvie/0.5/nuvie-0.5.tgz" + sha256 "ff026f6d569d006d9fe954f44fdf0c2276dbf129b0fc5c0d4ef8dce01f0fc257" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6c30661325add7687133e29bcc6737e776aba83671d7ac74fd8bb6763f3c9fc3" + sha256 cellar: :any, arm64_sequoia: "902a34d91fc246cecdc69226062a69cba191bcf6992503f15c4f88ddad3026d6" + sha256 cellar: :any, arm64_sonoma: "5411b122bd14475a5b65b01528146f985b3af26d4e6b82c6d34c49197e1dfc0e" + sha256 cellar: :any, arm64_ventura: "93db83cb47b7c6f93b2d6adeb1d6fcf12f72920dd32185983a6d24fe0f63002e" + sha256 cellar: :any, arm64_monterey: "987e483a02d53595c23a2174ba7603e2cbd03f0351ef8d1ba2cf210c73aa5540" + sha256 cellar: :any, arm64_big_sur: "ae3f93506890f1ab1f1ddcb1395eeb42988ec5afb7896bc08a6b9786f48f6b6f" + sha256 cellar: :any, sonoma: "5fea8b534413a8533130b7a01dc182a6e92bcb7012e37aef645b5625aa4c4740" + sha256 cellar: :any, ventura: "12738cb1cb602f6fe23b4180e137e25f55fc2db9b950e7c666d4d057fb08b6c6" + sha256 cellar: :any, monterey: "d88f929686eb725ccb1702103cf814e40047ce6bfaa0cee764a601c2d84724ad" + sha256 cellar: :any, big_sur: "8c0568e88b4192a2d6ff1511d560214efb1e1c914116c78ce1350fa9b872c09d" + sha256 cellar: :any, catalina: "252ecb752212720f38209762e1ae067cc25e77e9c5c4939ce01040c4e86fae5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "091eec095a34ae54b3fdff107228ee6f2a13d1f2ba64a0844ffc498bab1e01b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f177e380622df80bbc34340afde5d533df0d29f6a9a671fe416f57d1222643a" + end + + head do + url "https://github.com/nuvie/nuvie.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "sdl12-compat" + + def install + # Work around GCC 11 / Clang 17 failure due to higher default C++ standard. + # We use C++03 standard as C++11 standard needs upstream fix. + # We append to CXX because CXXFLAGS is also used for C code somehow. + # Ref: https://github.com/nuvie/nuvie/commit/69fb52d35d5eaffcf3bca56929ab58a99defec3d + ENV.append "CXX", "-std=c++03" if OS.linux? || DevelopmentTools.clang_build_version >= 1700 + + inreplace "./nuvie.cpp" do |s| + s.gsub! 'datadir", "./data"', + "datadir\", \"#{lib}/data\"" + s.gsub! 'home + "/Library', + '"/Library' + s.gsub! 'config_path.append("/Library/Preferences/Nuvie Preferences");', + "config_path = \"#{var}/nuvie/nuvie.cfg\";" + s.gsub! "/Library/Application Support/Nuvie Support/", + "#{var}/nuvie/game/" + s.gsub! "/Library/Application Support/Nuvie/", + "#{var}/nuvie/" + end + + system "./autogen.sh" if build.head? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--disable-sdltest", *args, *std_configure_args + system "make" + bin.install "nuvie" + pkgshare.install "data" + end + + def post_install + (var/"nuvie/game").mkpath + end + + def caveats + <<~EOS + Copy your Ultima 6 game files into the following directory: + #{var}/nuvie/game/ultima6/ + Save games will be stored in the following directory: + #{var}/nuvie/savegames/ + Config file will be located at: + #{var}/nuvie/nuvie.cfg + EOS + end + + test do + pid = fork do + exec bin/"nuvie" + end + sleep 3 + + assert_path_exists bin/"nuvie" + assert_predicate bin/"nuvie", :executable? + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/n/nuxeo.rb b/Formula/n/nuxeo.rb new file mode 100644 index 0000000000000..37785e44f7d34 --- /dev/null +++ b/Formula/n/nuxeo.rb @@ -0,0 +1,83 @@ +class Nuxeo < Formula + desc "Enterprise Content Management" + homepage "https://nuxeo.github.io/" + url "https://packages.nuxeo.com/repository/maven-public/org/nuxeo/ecm/distribution/nuxeo-server-tomcat/11.4.42/nuxeo-server-tomcat-11.4.42.zip" + sha256 "38b6e7495223ff9e54857bd78fab832f1462201c713fba70a2a87d6a5d8cdd24" + license "Apache-2.0" + + livecheck do + url "https://doc.nuxeo.com/nxdoc/master/installing-the-nuxeo-platform-on-mac-os/" + regex(%r{href=.*?/nuxeo-server-tomcat[._-]v?(\d+(?:\.\d+)+)\.zip}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "93f5adedf349c5ef098d6dde573b8bd1c45c0f31fac0a58d4b231496199a496b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bfb386e5a43d6172b64ad766dac4c3e0abd1974f773137636df9a27e4d9e0d40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bfb386e5a43d6172b64ad766dac4c3e0abd1974f773137636df9a27e4d9e0d40" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bfb386e5a43d6172b64ad766dac4c3e0abd1974f773137636df9a27e4d9e0d40" + sha256 cellar: :any_skip_relocation, sonoma: "d2b82e5f576dbc1052cb08fa1c28da569dbabf3bed0c6b8988141e0f40b021ab" + sha256 cellar: :any_skip_relocation, ventura: "d2b82e5f576dbc1052cb08fa1c28da569dbabf3bed0c6b8988141e0f40b021ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "bfb386e5a43d6172b64ad766dac4c3e0abd1974f773137636df9a27e4d9e0d40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bfb386e5a43d6172b64ad766dac4c3e0abd1974f773137636df9a27e4d9e0d40" + end + + depends_on "exiftool" + depends_on "ghostscript" + depends_on "imagemagick" + depends_on "libwpd" + depends_on "openjdk" + depends_on "poppler" + + def install + libexec.install Dir["#{buildpath}/*"] + + env = Language::Java.overridable_java_home_env + env["NUXEO_HOME"] = libexec.to_s + env["NUXEO_CONF"] = "#{etc}/nuxeo.conf" + + chmod 0755, libexec/"bin/nuxeoctl" + (bin/"nuxeoctl").write_env_script libexec/"bin/nuxeoctl", env + + inreplace "#{libexec}/bin/nuxeo.conf" do |s| + s.gsub!(/#nuxeo\.log\.dir.*/, "nuxeo.log.dir=#{var}/log/nuxeo") + s.gsub!(/#nuxeo\.data\.dir.*/, "nuxeo.data.dir=#{var}/lib/nuxeo/data") + s.gsub!(/#nuxeo\.pid\.dir.*/, "nuxeo.pid.dir=#{var}/run/nuxeo") + end + etc.install "#{libexec}/bin/nuxeo.conf" + end + + def post_install + (var/"log/nuxeo").mkpath + (var/"lib/nuxeo/data").mkpath + (var/"run/nuxeo").mkpath + (var/"cache/nuxeo/packages").mkpath + + libexec.install_symlink var/"cache/nuxeo/packages" + end + + def caveats + <<~EOS + You need to edit #{etc}/nuxeo.conf file to configure manually the server. + Also, in case of upgrade, run 'nuxeoctl mp-upgrade' to ensure all + downloaded addons are up to date. + EOS + end + + test do + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + + # Copy configuration file to test path, due to some automatic writes on it. + cp "#{etc}/nuxeo.conf", "#{testpath}/nuxeo.conf" + inreplace "#{testpath}/nuxeo.conf" do |s| + s.gsub! var.to_s, testpath + s.gsub!(/#nuxeo\.tmp\.dir.*/, "nuxeo.tmp.dir=#{testpath}/tmp") + end + + ENV["NUXEO_CONF"] = "#{testpath}/nuxeo.conf" + + assert_match %r{#{testpath}/nuxeo\.conf}, shell_output("#{libexec}/bin/nuxeoctl config --get nuxeo.conf") + assert_match libexec.to_s, shell_output("#{libexec}/bin/nuxeoctl config --get nuxeo.home") + end +end diff --git a/Formula/n/nuxi.rb b/Formula/n/nuxi.rb new file mode 100644 index 0000000000000..69951d470ea8d --- /dev/null +++ b/Formula/n/nuxi.rb @@ -0,0 +1,36 @@ +class Nuxi < Formula + desc "Nuxt CLI (nuxi) for creating and managing Nuxt projects" + homepage "https://github.com/nuxt/cli" + url "https://registry.npmjs.org/nuxi/-/nuxi-3.30.0.tgz" + sha256 "210145c695b60cfa6698aeafc9c98161b4c7c45222be62bccc13afec6a410a94" + license "MIT" + head "https://github.com/nuxt/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c80ea8b75bb5e1eaea79cbd67e256d59453a9e655d9b8c2ed83ed342ae8d544f" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + # Both aliases should be present and report the same version + assert_match version.to_s, shell_output("#{bin}/nuxi --version") + assert_match version.to_s, shell_output("#{bin}/nuxt --version") + + # Perform a minimal project initialization in the temporary testpath + ENV["CI"] = "1" + target = testpath/"nuxi-tmp" + output = shell_output( + "#{bin}/nuxt init . --cwd #{target} -f --no-install --packageManager npm --gitInit -M --preferOffline", + ) + assert_predicate target, :directory? + assert_predicate target/".git", :directory? + assert_path_exists target/"package.json" + assert_match "npm run dev", output + end +end diff --git a/Formula/n/nvc.rb b/Formula/n/nvc.rb new file mode 100644 index 0000000000000..6a2f441d80cc5 --- /dev/null +++ b/Formula/n/nvc.rb @@ -0,0 +1,66 @@ +class Nvc < Formula + desc "VHDL compiler and simulator" + homepage "https://www.nickg.me.uk/nvc/" + url "https://github.com/nickg/nvc/releases/download/r1.18.1/nvc-1.18.1.tar.gz" + sha256 "dcb2cb651ee13df384a47c55a596842106f6cca9492f192729e566648817e321" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "5a76af42dfd72e770cdabd3fcea2a34185fd839390b891b2c89630c31133da8c" + sha256 arm64_sequoia: "baac04d9624026f837fcd34f71b193093525618198613e77f68bc65edad9f37f" + sha256 arm64_sonoma: "975bc525c5f6226030c869f0f6d660669f973620ec2b74851053f48b4ab6dfa3" + sha256 sonoma: "0b4f10ab066ea71440b666a85c9339683835c0ed98f19d4eac069e53b7b1b4de" + sha256 arm64_linux: "5126c4662056c853a2f0aa45df22fa2f3fa576fef5fec45d4d634077e9a6ab05" + sha256 x86_64_linux: "16dbf925e2217e98bb7b2320cbab4daeeb3c45553009052862170dd7eead1270" + end + + head do + url "https://github.com/nickg/nvc.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "check" => :build + depends_on "pkgconf" => :build + depends_on "llvm" + depends_on "zstd" + + uses_from_macos "flex" => :build + uses_from_macos "libffi" + uses_from_macos "zlib" + + on_linux do + depends_on "elfutils" + end + + def install + system "./autogen.sh" if build.head? + + # Avoid hardcoding path to the `ld` shim. + ENV["ac_cv_path_linker_path"] = "ld" if OS.linux? + + # In-tree builds are not supported. + mkdir "build" do + system "../configure", "--with-llvm=#{Formula["llvm"].opt_bin}/llvm-config", + "--prefix=#{prefix}", + "--with-system-cc=#{ENV.cc}", + "--disable-silent-rules" + system "make", "V=1" + system "make", "V=1", "install" + end + + (pkgshare/"examples").install "test/regress/wait1.vhd" + end + + test do + resource "homebrew-test" do + url "https://raw.githubusercontent.com/suoto/vim-hdl-examples/fcb93c287c8e4af7cc30dc3e5758b12ee4f7ed9b/basic_library/very_common_pkg.vhd" + sha256 "42560455663d9c42aaa077ca635e2fdc83fda33b7d1ff813da6faa790a7af41a" + end + + testpath.install resource("homebrew-test") + system bin/"nvc", "-a", testpath/"very_common_pkg.vhd" + system bin/"nvc", "-a", pkgshare/"examples/wait1.vhd", "-e", "wait1", "-r" + end +end diff --git a/Formula/n/nvchecker.rb b/Formula/n/nvchecker.rb new file mode 100644 index 0000000000000..94db4815a668b --- /dev/null +++ b/Formula/n/nvchecker.rb @@ -0,0 +1,66 @@ +class Nvchecker < Formula + include Language::Python::Virtualenv + + desc "New version checker for software releases" + homepage "https://github.com/lilydjwg/nvchecker" + url "https://files.pythonhosted.org/packages/e1/74/b8a08017ba9dcf55487a60fc645b7e57c347281da11cd75b5d7584c03faa/nvchecker-2.19.tar.gz" + sha256 "247c7aca76ce55fb44f1a7718566f8312f473796ae7f4107cd193e1d6dba2883" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a8618b16390f9b5ec17e807a0919cd56640108fbbe761a1b3ae466112de3f66c" + sha256 cellar: :any, arm64_sequoia: "25d88546c21293037867d79d0c5dc2454be8e2e5e4b3e216f06eb84944347e4a" + sha256 cellar: :any, arm64_sonoma: "e75f82e2d200d9cdd27a7e0b12f54cee48208d22ad563477915088b25643cfbb" + sha256 cellar: :any, sonoma: "a28b5f6a568a2b676e083bc03da732a6d163c5f087a6d61dc0622843cf7c8c41" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e3a126a9e804fcec5dbbaa41b8d800a23a48a24f128eab56ebe78d1e2e9342e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51b1838ef2e3709866d15ba400318e89f92c88018c22d4643f74d0eee8bed68e" + end + + depends_on "curl" + depends_on "openssl@3" + depends_on "python@3.14" + + pypi_packages package_name: "nvchecker[pypi]" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pycurl" do + url "https://files.pythonhosted.org/packages/e3/3d/01255f1cde24401f54bb3727d0e5d3396b67fc04964f287d5d473155f176/pycurl-7.45.7.tar.gz" + sha256 "9d43013002eab2fd6d0dcc671cd1e9149e2fc1c56d5e796fad94d076d6cb69ef" + end + + resource "structlog" do + url "https://files.pythonhosted.org/packages/79/b9/6e672db4fec07349e7a8a8172c1a6ae235c58679ca29c3f86a61b5e59ff3/structlog-25.4.0.tar.gz" + sha256 "186cd1b0a8ae762e29417095664adf1d6a31702160a46dacb7796ea82f7409e4" + end + + resource "tornado" do + url "https://files.pythonhosted.org/packages/09/ce/1eb500eae19f4648281bb2186927bb062d2438c2e5093d1360391afd2f90/tornado-6.5.2.tar.gz" + sha256 "ab53c8f9a0fa351e2c0741284e06c7a45da86afb544133201c5cc8578eb076a0" + end + + def install + virtualenv_install_with_resources + end + + test do + file = testpath/"example.toml" + file.write <<~TOML + [nvchecker] + source = "pypi" + pypi = "nvchecker" + TOML + + output = JSON.parse(shell_output("#{bin}/nvchecker -c #{file} --logger=json")) + assert_equal version.to_s, output["version"] + end +end diff --git a/Formula/n/nvi.rb b/Formula/n/nvi.rb new file mode 100644 index 0000000000000..9b51f246ec17b --- /dev/null +++ b/Formula/n/nvi.rb @@ -0,0 +1,102 @@ +class Nvi < Formula + desc "44BSD re-implementation of vi" + homepage "https://repo.or.cz/nvi.git" + url "https://deb.debian.org/debian/pool/main/n/nvi/nvi_1.81.6.orig.tar.gz" + sha256 "8bc348889159a34cf268f80720b26f459dbd723b5616107d36739d007e4c978d" + license "BSD-3-Clause" + revision 6 + + livecheck do + url "https://deb.debian.org/debian/pool/main/n/nvi/" + regex(/href=.*?nvi[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "aa9ca9f2bf556b19378cc59734101a3fd3ae96a4221589f4c39f0a2690c25e3e" + sha256 cellar: :any, arm64_sequoia: "4dadb4e9103dae1a849b5bd29bb0a4fb66a66ae99302541fca056fe4cd305770" + sha256 cellar: :any, arm64_sonoma: "c78ea8a45f937c0918dbbceeb33112139f86dd8c2d6c2aa12517289c3f88a7d9" + sha256 arm64_ventura: "aa6ba856388d331dce1cec171db093a6846d349d3b0013bd08c3331d9d6f09f1" + sha256 arm64_monterey: "4172bb7673685b0e0f569ad84edbe4d568c152b419678e6146f539accd243c80" + sha256 arm64_big_sur: "0c504c79f2fd0be54ce31ee4236a1d9fb4d9e5d8f33fab07305e1acd9c4740de" + sha256 cellar: :any, sonoma: "b471e00997873dd4a5b2841487af7ba9a403e1eb803aeab7d2326c27f1bc9b73" + sha256 cellar: :any, ventura: "c7836fbb451c44095dec64bb0cac55e1b95829cca063201988a45eee538fcd09" + sha256 cellar: :any, monterey: "4bbbf70becf3cfa52340027bb81f0b39b8071638dcb9f042cf314bee7a8feeac" + sha256 cellar: :any, big_sur: "692b129c29e7018565decb9c3ece80c020028549eb571d638851bb0e8647b0d8" + sha256 cellar: :any, catalina: "9443eb6edf1377a25a506245df2a20c0d2a7365d71eee720bb7152052b96d3e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "77dc49d28cfd69d761ae59838253f8ee295a2f966eacd89ca3e3d4b2499e890a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8eb6c0c8a8eef36a09bf55e35ced6d2e2afb4d75a70d93d96e88d9cbd5c4b56" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "xz" => :build # Homebrew bug. Shouldn't need declaring explicitly. + depends_on "berkeley-db@5" + + uses_from_macos "ncurses" + + # Patches per MacPorts + # The first corrects usage of BDB flags. + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/nvi/patch-common__db.h" + sha256 "d6c67a129cec0108a0c90fd649d79de65099dc627b10967a1fad51656f519800" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/nvi/patch-dist__port.h.in" + sha256 "674adb27810da8f6342ffc912a54375af0ed7769bfa524dce01600165f78a63b" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/nvi/patch-ex_script.c.diff" + sha256 "742c4578319ddc07b0b86482b4f2b86125026f200749e07c6d2ac67976204728" + end + + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/a0cae35e9fce0f3d591af204ff72aa0a98606d05/editors/nvi/files/patch-common_key.h.diff" + sha256 "3f923f33b98c90a5f96b7e8853d753871abcf93acd75052964ade2d9574502c5" + end + + # Upstream have been pretty inactive for a while, so we may want to kill this + # formula at some point unless that changes. We're leaning hard on Debian now. + patch do + url "https://deb.debian.org/debian/pool/main/n/nvi/nvi_1.81.6-17.debian.tar.xz" + sha256 "4f81fa274e71093d212ca981dc510e9bf2f1d4716f3c447ec2402607aa394bca" + apply "patches/03db4.patch", + "patches/19include_term_h.patch", + "patches/20glibc_has_grantpt.patch", + "patches/24fallback_to_dumb_term.patch", + "patches/26trailing_tab_segv.patch", + "patches/27support_C_locale.patch", + "patches/31regex_heap_overflow.patch" + end + + def install + cd "dist" do + # Run autoreconf on macOS to rebuild configure script so that it doesn't try + # to build with a flat namespace. + + # These files must be present for autoreconf to work. + %w[AUTHORS ChangeLog NEWS README].each { |f| touch f } + system "autoreconf", "--force", "--install", "--verbose" + + # Xcode 12 needs the "-Wno-implicit-function-declaration" to compile successfully + # The usual trick of setting $CFLAGS in the environment doesn't work for this + # configure file though, but specifying an explicit CC setting does + system "./configure", "--program-prefix=n", + "CC=" + ENV.cc + " -Wno-implicit-function-declaration -Wno-incompatible-pointer-types", + *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + end + end + + test do + (testpath/"test").write("This is toto!\n") + pipe_output("#{bin}/nvi -e test", "%s/toto/tutu/g\nwq\n") + assert_equal "This is tutu!\n", File.read("test") + end +end diff --git a/Formula/n/nvimpager.rb b/Formula/n/nvimpager.rb new file mode 100644 index 0000000000000..4c78bb897db6c --- /dev/null +++ b/Formula/n/nvimpager.rb @@ -0,0 +1,45 @@ +class Nvimpager < Formula + desc "Use NeoVim as a pager to view manpages, diffs, etc." + homepage "https://github.com/lucc/nvimpager" + url "https://github.com/lucc/nvimpager/archive/refs/tags/v0.13.0.tar.gz" + sha256 "8255c39697b213cb34dfd573d90c27db7f61180d4a12f640ef6e7f313e525241" + license "BSD-2-Clause" + head "https://github.com/lucc/nvimpager.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4814f2fa4abc9b5b3388de2a29d97ef491f487573c45295500fece9831fc12d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9e64c6a58d03492445e9ea60bcd47d617310e062ed4a2039824a25050dcda0c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d2255736ecfd77f610057c33437ac6422f8029e51ab588da789901047d950c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "247acb9bf098f61319d45b3c3ecd0ade4338506bf189f57e4a0e171b0d3ebdf0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "73a19ab94071d95e746c648c8d5797dcccbdaf46cb0773026b72e0d13a3f660f" + sha256 cellar: :any_skip_relocation, sonoma: "1e5fabfc49fc98011785dfcc6f26a87eaac964f2b4817efc8f1075ca2d8f9e26" + sha256 cellar: :any_skip_relocation, ventura: "a1e02ea48f0923ae29d88f732759b2d9b8d848db0edbbb3db779ea630aae6688" + sha256 cellar: :any_skip_relocation, monterey: "bdd6f62a23532d21a0350765d7074a9fadf91c94f91941fb4a953bd11165041d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4814f2fa4abc9b5b3388de2a29d97ef491f487573c45295500fece9831fc12d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e843773be2cca6cb16f7bcd029b6f83a8fcfb0b9578ca6f8bf009b43255c9f74" + end + + depends_on "scdoc" => :build + depends_on "neovim" + + uses_from_macos "bash" + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + def caveats + <<~EOS + To use nvimpager as your default pager, add `export PAGER=nvimpager` + to your shell configuration. + EOS + end + + test do + (testpath/"test.txt").write <<~EOS + This is test + EOS + + assert_match(/This is test/, shell_output("#{bin}/nvimpager test.txt")) + end +end diff --git a/Formula/n/nvm.rb b/Formula/n/nvm.rb new file mode 100644 index 0000000000000..8cb1f65f0f23f --- /dev/null +++ b/Formula/n/nvm.rb @@ -0,0 +1,56 @@ +class Nvm < Formula + desc "Manage multiple Node.js versions" + homepage "https://github.com/nvm-sh/nvm" + url "https://github.com/nvm-sh/nvm/archive/refs/tags/v0.40.3.tar.gz" + sha256 "5f4d6aaa04a177dc93c985e31dbc411ab6b8c6e1e21d8015dbc1372625fcd1d0" + license "MIT" + head "https://github.com/nvm-sh/nvm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f7833c9ed1c611029a5e21cbb22c85b63663da67751faa2a0bb22fc985d832f8" + end + + def install + (prefix/"nvm.sh").write <<~SH + # $NVM_DIR should be "$HOME/.nvm" by default to avoid user-installed nodes destroyed every update + [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm" + \\. #{libexec}/nvm.sh + # "nvm exec" and certain 3rd party scripts expect "nvm.sh" and "nvm-exec" to exist under $NVM_DIR + [ -e "$NVM_DIR" ] || mkdir -p "$NVM_DIR" + [ -e "$NVM_DIR/nvm.sh" ] || ln -s #{opt_libexec}/nvm.sh "$NVM_DIR/nvm.sh" + [ -e "$NVM_DIR/nvm-exec" ] || ln -s #{opt_libexec}/nvm-exec "$NVM_DIR/nvm-exec" + SH + libexec.install "nvm.sh", "nvm-exec" + prefix.install_symlink libexec/"nvm-exec" + bash_completion.install "bash_completion" => "nvm" + end + + def caveats + <<~EOS + Please note that upstream has asked us to make explicit managing + nvm via Homebrew is unsupported by them and you should check any + problems against the standard nvm install method prior to reporting. + + You should create NVM's working directory if it doesn't exist: + mkdir ~/.nvm + + Add the following to your shell profile e.g. ~/.profile or ~/.zshrc: + export NVM_DIR="$HOME/.nvm" + [ -s "#{opt_prefix}/nvm.sh" ] && \\. "#{opt_prefix}/nvm.sh" # This loads nvm + [ -s "#{opt_prefix}/etc/bash_completion.d/nvm" ] && \\. "#{opt_prefix}/etc/bash_completion.d/nvm" # This loads nvm bash_completion + + You can set $NVM_DIR to any location, but leaving it unchanged from + #{prefix} will destroy any nvm-installed Node installations + upon upgrade/reinstall. + + Type `nvm help` for further information. + EOS + end + + test do + output = pipe_output("NODE_VERSION=homebrewtest #{prefix}/nvm-exec 2>&1") + refute_match(/No such file or directory/, output) + refute_match(/nvm: command not found/, output) + assert_match "N/A: version \"homebrewtest\" is not yet installed", output + end +end diff --git a/Formula/n/nvtop.rb b/Formula/n/nvtop.rb new file mode 100644 index 0000000000000..36a880b9067bb --- /dev/null +++ b/Formula/n/nvtop.rb @@ -0,0 +1,37 @@ +class Nvtop < Formula + desc "Interactive GPU process monitor" + homepage "https://github.com/Syllo/nvtop" + url "https://github.com/Syllo/nvtop/archive/refs/tags/3.2.0.tar.gz" + sha256 "d26df685455023cedc4dda033862dcddb67402fbdb685da70da78492f73c41d0" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3a65819fce8a84ff3a8a60fe8e46deb4a62e20617560307b23b24998730ce415" + sha256 cellar: :any, arm64_sequoia: "d327c8084394f866b030d090a70cf2873d3fc5be34a49ee17e8f0d5261704289" + sha256 cellar: :any, arm64_sonoma: "7166164de3da0785848dbd34ceb6168bdcb0b8bf1ec2c7bbcf164884b96a3fbe" + sha256 cellar: :any, arm64_ventura: "77a4d9add58013fbecaae97c280f72e254a02b470f8181d405a80adb4764b435" + sha256 cellar: :any, sonoma: "29ea0fd9d87ee2f1e9e7cc6b9c6569f19d675346e842df3224a5761b1926c784" + sha256 cellar: :any, ventura: "e4b5532744457331e345ba2236c284655499881e91d4627b9e3cf480b1af4f49" + sha256 cellar: :any_skip_relocation, arm64_linux: "067c3bc059ebd070d62abcc594a0e390587b6e37ca122ef384129347f95da546" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f75c62d6bc039a39e81eb04dbb4b0ba8f95ec6d4f2ba3c6dd1fc3a105cca847" + end + + depends_on "cmake" => :build + uses_from_macos "ncurses" + + on_linux do + depends_on "libdrm" + depends_on "systemd" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # nvtop is a TUI application + assert_match version.to_s, shell_output("#{bin}/nvtop --version") + end +end diff --git a/Formula/n/nwchem.rb b/Formula/n/nwchem.rb new file mode 100644 index 0000000000000..d6d7d909adea9 --- /dev/null +++ b/Formula/n/nwchem.rb @@ -0,0 +1,90 @@ +class Nwchem < Formula + desc "High-performance computational chemistry tools" + homepage "https://nwchemgit.github.io" + url "https://github.com/nwchemgit/nwchem/releases/download/v7.3.0-release/nwchem-7.3.0-release.revision-e60d3d90-src.2025-10-24.tar.xz" + version "7.3.0" + sha256 "12f6d110c7549b246cc1261f73bc8aa63f2304407d13d44a8fb11960936ceedc" + license "ECL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)-release$/i) + strategy :github_latest + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "4ed6bd4d09fcc140d8c37d6746911c0bbbdde7b6701daf6c162c8966604604e4" + sha256 arm64_sequoia: "fbc7ab523a9d7bd91417af21e526723d9c69286c216aad69923beafb9348369b" + sha256 arm64_sonoma: "229bba2c53122f3890939ca77dcd2293a26372cc4a1368288f5e6227fdeedf4f" + sha256 cellar: :any, sonoma: "6716a589699d8bc3d363b5c35c26f608da1c071f5ca23e68cb9bbc58b0270e7e" + sha256 arm64_linux: "7532621093cf89cf04cf1f257e312a9b65d458270b7949c00e693b5eb7da9517" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbc41324443a9a912494f65460663f41f353863d0081fb927ee3425b68c5b599" + end + + depends_on "gcc" # for gfortran + depends_on "hwloc" + depends_on "libxc" + depends_on "open-mpi" + depends_on "openblas" + depends_on "pkgconf" + depends_on "python@3.14" + depends_on "scalapack" + + uses_from_macos "libxcrypt" + + def install + pkgshare.install "QA" + + cd "src" do + (prefix/"etc").mkdir + (prefix/"etc/nwchemrc").write <<~EOS + nwchem_basis_library #{pkgshare}/libraries/ + nwchem_nwpw_library #{pkgshare}/libraryps/ + ffield amber + amber_1 #{pkgshare}/amber_s/ + amber_2 #{pkgshare}/amber_q/ + amber_3 #{pkgshare}/amber_x/ + amber_4 #{pkgshare}/amber_u/ + spce #{pkgshare}/solvents/spce.rst + charmm_s #{pkgshare}/charmm_s/ + charmm_x #{pkgshare}/charmm_x/ + EOS + + inreplace "util/util_nwchemrc.F", "/etc/nwchemrc", etc/"nwchemrc" + + # needed to use python 3.X to skip using default python2 + ENV["PYTHONVERSION"] = Language::Python.major_minor_version "python3.14" + ENV["BLASOPT"] = "-L#{Formula["openblas"].opt_lib} -lopenblas" + ENV["LAPACK_LIB"] = "-L#{Formula["openblas"].opt_lib} -lopenblas" + ENV["BLAS_SIZE"] = "4" + ENV["SCALAPACK"] = "-L#{Formula["scalapack"].opt_prefix}/lib -lscalapack" + ENV["SCALAPACK_SIZE"] = "4" + ENV["USE_64TO32"] = "y" + ENV["USE_HWOPT"] = "n" + ENV["OPENBLAS_USES_OPENMP"] = "y" + ENV["LIBXC_LIB"] = Formula["libxc"].opt_lib.to_s + ENV["LIBXC_INCLUDE"] = Formula["libxc"].opt_include.to_s + os = OS.mac? ? "MACX64" : "LINUX64" + system "make", "nwchem_config", "NWCHEM_MODULES=all python gwmol", "USE_MPI=Y" + system "make", "NWCHEM_TARGET=#{os}", "USE_MPI=Y" + bin.install "../bin/#{os}/nwchem" + pkgshare.install "basis/libraries" + pkgshare.install "basis/libraries.bse" + pkgshare.install "nwpw/libraryps" + pkgshare.install Dir["data/*"] + end + end + + test do + cp_r pkgshare/"QA", testpath + cd "QA" do + ENV["OMP_NUM_THREADS"] = "1" + ENV["NWCHEM_TOP"] = testpath + ENV["NWCHEM_TARGET"] = OS.mac? ? "MACX64" : "LINUX64" + ENV["NWCHEM_EXECUTABLE"] = bin/"nwchem" + system "./runtests.mpi.unix", "procs", "0", "dft_he2+", "pyqa3", "prop_mep_gcube", "pspw", "tddft_h2o", "tce_n2" + end + end +end diff --git a/Formula/n/nx.rb b/Formula/n/nx.rb new file mode 100644 index 0000000000000..1482c88c7009c --- /dev/null +++ b/Formula/n/nx.rb @@ -0,0 +1,42 @@ +class Nx < Formula + desc "Smart, Fast and Extensible Build System" + homepage "https://nx.dev" + url "https://registry.npmjs.org/nx/-/nx-22.0.2.tgz" + sha256 "d0d04ed31578db04329eb50f9fd8b263594d4697a9d653e5bb29570142a58b18" + license "MIT" + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "c27b45525049dce8070d8bed34a25871bf28ff214e66ed3a7e7277f89664daad" + sha256 cellar: :any, arm64_sequoia: "2f8d92498d14af7b87db4e4eba4548b80703387953f83b04759c5f6c35f64524" + sha256 cellar: :any, arm64_sonoma: "2f8d92498d14af7b87db4e4eba4548b80703387953f83b04759c5f6c35f64524" + sha256 cellar: :any, sonoma: "d0fdb24502c23192f46322635bb841a2e39f1d59df912a7f941ec54644007c56" + sha256 cellar: :any_skip_relocation, arm64_linux: "b6e3782fbb302ae4e6bdcb692be76e7113522d9c001103e5c856a04b28381514" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b924a01bcaee7279c27c4e1b1016e0935b9105508ae9075ffac47d74f09d45c" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"package.json").write <<~JSON + { + "name": "@acme/repo", + "version": "0.0.1", + "scripts": { + "test": "echo 'Tests passed'" + } + } + JSON + + system bin/"nx", "init", "--no-interactive" + assert_path_exists testpath/"nx.json" + + output = shell_output("#{bin}/nx 'test'") + assert_match "Successfully ran target test", output + end +end diff --git a/Formula/n/nyan.rb b/Formula/n/nyan.rb new file mode 100644 index 0000000000000..15561a1fc6b66 --- /dev/null +++ b/Formula/n/nyan.rb @@ -0,0 +1,30 @@ +class Nyan < Formula + desc "Colorizing `cat` command with syntax highlighting" + homepage "https://github.com/toshimaru/nyan" + url "https://github.com/toshimaru/nyan/archive/refs/tags/v1.2.4.tar.gz" + sha256 "308d95dc3ed978b52e4a6a058c32dd5cdcc24e1129329aa59a8261b7a23ed9c0" + license "MIT" + head "https://github.com/toshimaru/nyan.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69ff68b4570d00000bd8b16ed1feac97ea1792a6d13795af476c8f0a2c5968e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "69ff68b4570d00000bd8b16ed1feac97ea1792a6d13795af476c8f0a2c5968e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69ff68b4570d00000bd8b16ed1feac97ea1792a6d13795af476c8f0a2c5968e2" + sha256 cellar: :any_skip_relocation, sonoma: "76a297e850df8a21a325896005e285a059070629716761378dc16fd2c7cad9db" + sha256 cellar: :any_skip_relocation, arm64_linux: "4010d30c53c88986f6f0d99a6d877b14c99a800166e47fdaefbca4aef4c095f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47573a59cc0680f1d2d5bac4dcac7fc5bc2a459698e6f693d2468eb734e5bc24" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/toshimaru/nyan/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/nyan --version") + (testpath/"test.txt").write "nyan is a colourful cat." + assert_match "nyan is a colourful cat.", shell_output("#{bin}/nyan test.txt") + end +end diff --git a/Formula/n/nyancat.rb b/Formula/n/nyancat.rb new file mode 100644 index 0000000000000..7bd0da5fe3ae8 --- /dev/null +++ b/Formula/n/nyancat.rb @@ -0,0 +1,41 @@ +class Nyancat < Formula + desc "Renders an animated, color, ANSI-text loop of the Poptart Cat" + homepage "https://nyancat.dakko.us/" + url "https://github.com/klange/nyancat/archive/refs/tags/1.5.2.tar.gz" + sha256 "88cdcaa9c7134503dd0364a97fa860da3381a09cb555c3aae9918360827c2032" + license "NCSA" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4063d47ab6f498ff5b7dc2baef313c16f68e20bf302f219c43ef7f6ef24c611d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bc5741eb96d5bd24301b288f9d2500c635c2b9c0ffc1654ed4ee1b1bfd02c303" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63f328a8b248972e6d29b28116cd2e6b7396a7a09e2d8a02e85e037ced6d4016" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7975892c912c11d73fae58e5cf972b6dc3beb8e9d10f03883002ad53f843f8f0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0c2fef45873d4944b918cdaad1f458b5ae1e863fbde1c91130ac0a73bc571e5f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e15caf1bc3a60334cb7e38466e50005cfbb15dd5e143abc876983fcb3d3a41d7" + sha256 cellar: :any_skip_relocation, sonoma: "c667cbec3790985e18b2d88173f7d3bb1d277661e074a161d8972502fedfd757" + sha256 cellar: :any_skip_relocation, ventura: "6ef00c54df968d02e4fe641bcda68baf7f77cd54df43e1c657c74ae0572e2573" + sha256 cellar: :any_skip_relocation, monterey: "777e0a4b2074525b1b9db1d5dc6e7756d3f8c3d1c03667cc28d80781b0cf7dd7" + sha256 cellar: :any_skip_relocation, big_sur: "9eef2795f2dc32491b4b948d39a8f68f6274964174ff735d3f42ee70c7035148" + sha256 cellar: :any_skip_relocation, catalina: "997fc4e89ef493a356e781543d69343e96a08547aba3bec53bd1db64b48f3436" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8ec43d463c0a65e4c50c3e3d2675fb3f89fba1503fc036b1b717eecda6a1511" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69b8c44133a399fddd0b6b6db41d2dcd9ba2420a5c5b53e62409d14cfacadc85" + end + + # Makefile: Add install directory option + # See https://github.com/klange/nyancat/pull/34 + patch do + url "https://github.com/klange/nyancat/commit/e11af77f2938ea851f712df62f08de4d369598d4.patch?full_index=1" + sha256 "24a0772d2725e151b57727ce887f4b3911d19e875785eb7e13a68f4b987831e8" + end + + def install + system "make" + system "make", "install", "instdir=#{prefix}" + end + + test do + system bin/"nyancat", "--frames", "1", "--width", "40", "--height", "20", "--no-clear" + end +end diff --git a/Formula/n/nylon.rb b/Formula/n/nylon.rb new file mode 100644 index 0000000000000..5cc34598baa8f --- /dev/null +++ b/Formula/n/nylon.rb @@ -0,0 +1,44 @@ +class Nylon < Formula + desc "Proxy server" + homepage "https://github.com/smeinecke/nylon" + url "https://monkey.org/~marius/nylon/nylon-1.21.tar.gz" + sha256 "34c132b005c025c1a5079aae9210855c80f50dc51dde719298e1113ad73408a4" + license "BSD-3-Clause" + revision 2 + + livecheck do + skip "No version information available to check" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fc061e1bd83501bfd964f4d38d83a650157e2c4933843c8b0423fa70c6f97732" + sha256 cellar: :any, arm64_sequoia: "9d68b83a58d01d235ccc302690fddd22413603e42beae2b8b909eaca8caab83b" + sha256 cellar: :any, arm64_sonoma: "ab39d342239cf90b5fd6395e5deec9e5664312a8b76d481973f61d7604c1d39b" + sha256 cellar: :any, arm64_ventura: "be2cc327743e9011455a4f318ea045968c6eb10632ebe6452194342e3a9fbb39" + sha256 cellar: :any, arm64_monterey: "9d9db2d218e2627790aabf8e7cfd28f6722e039bbffb6f55505870098188e1d9" + sha256 cellar: :any, arm64_big_sur: "26d58c80e5db471ca253930300316cfc77dd1b53fae4ebd38502a48e69d4af8a" + sha256 cellar: :any, sonoma: "0ac4d83ebb4e63c5419e36794e292b7175553465919023ddc7225a04c8fbcc0e" + sha256 cellar: :any, ventura: "3e0363e363d1a596f674ed6c2f576f5f375c2ca61d43b17e336b67c4a3182597" + sha256 cellar: :any, monterey: "11ae6faf8f16faf3bc2be2f03981b4d1303897cfe86fb2108c05c4449cbafea6" + sha256 cellar: :any, big_sur: "dffadaeddcde173302400dfc71686048edf9944a3543ac578ce634d9f283870d" + sha256 cellar: :any, catalina: "6138b062f2a435928485795e2b3bdef81983a87137d4bf73029838f19c1210f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "230eb92e635d14a73da14fb444d5ebf116484e95ec8c0b8d3d80e893afa0b56d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20d711c147849e3de3f352052357765c5d55f82c005bde767c2ff3b95774c0d0" + end + + depends_on "libevent" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", "--with-libevent=#{HOMEBREW_PREFIX}", *args, *std_configure_args + system "make", "install" + end + + test do + assert_equal "nylon: nylon version #{version}", + shell_output("#{bin}/nylon -V 2>&1").chomp + end +end diff --git a/Formula/n/nyx.rb b/Formula/n/nyx.rb new file mode 100644 index 0000000000000..001cdd12ffc14 --- /dev/null +++ b/Formula/n/nyx.rb @@ -0,0 +1,83 @@ +class Nyx < Formula + include Language::Python::Virtualenv + + desc "Command-line monitor for Tor" + homepage "https://nyx.torproject.org/" + url "https://files.pythonhosted.org/packages/f4/da/68419425cb0f64f996e2150045c7043c2bb61f77b5928c2156c26a21db88/nyx-2.1.0.tar.gz" + sha256 "88521488d1c9052e457b9e66498a4acfaaa3adf3adc5a199892632f129a5390b" + license "GPL-3.0-only" + revision 3 + + no_autobump! because: "`update-python-resources` cannot update resource blocks" + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, all: "900a2690900306640aeaaa863c7caddc2e217f690356e3ccada2ff531d7a78fa" + end + + depends_on "python@3.14" + + resource "stem" do + url "https://files.pythonhosted.org/packages/b2/66/c5515de764bffae1347e671819711268da5c02bfab8406223526822fe5f6/stem-1.8.1.tar.gz" + sha256 "81d43a7c668ba9d7bc1103b2e7a911e9d148294b373d27a59ae8da79ef7a3e2f" + + # Support python 3.11 + # Fixed upstream in https://github.com/torproject/stem/commit/b8063b3b23af95e02b27848f6ab5c82edd644609 + patch :DATA + end + + # Support python 3.11 + patch do + url "https://github.com/torproject/nyx/commit/dcaddf2ab7f9d2ef8649f98bb6870995ebe0b893.patch?full_index=1" + sha256 "132cf1c3d4ce6e706cc3ad9dd5cd905d3321c7e62386e18219b4eb08816d6849" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Connection refused", shell_output("#{bin}/nyx -i 127.0.0.1:#{free_port}", 1) + end +end + +__END__ +diff --git a/stem/control.py b/stem/control.py +index e192e29..e6fab6c 100644 +--- a/stem/control.py ++++ b/stem/control.py +@@ -474,7 +474,7 @@ def with_default(yields = False): + + def decorator(func): + def get_default(func, args, kwargs): +- arg_names = inspect.getargspec(func).args[1:] # drop 'self' ++ arg_names = inspect.getfullargspec(func).args[1:] # drop 'self' + default_position = arg_names.index('default') if 'default' in arg_names else None + + if default_position is not None and default_position < len(args): +diff --git a/stem/prereq.py b/stem/prereq.py +index 4af6c09..4009c31 100644 +--- a/stem/prereq.py ++++ b/stem/prereq.py +@@ -241,7 +241,7 @@ def is_mock_available(): + + # check for mock's new_callable argument for patch() which was introduced in version 0.8.0 + +- if 'new_callable' not in inspect.getargspec(mock.patch).args: ++ if 'new_callable' not in inspect.getfullargspec(mock.patch).args: + raise ImportError() + + return True +diff --git a/stem/util/conf.py b/stem/util/conf.py +index 8039981..15c4db8 100644 +--- a/stem/util/conf.py ++++ b/stem/util/conf.py +@@ -285,7 +285,7 @@ def uses_settings(handle, path, lazy_load = True): + config.load(path) + config._settings_loaded = True + +- if 'config' in inspect.getargspec(func).args: ++ if 'config' in inspect.getfullargspec(func).args: + return func(*args, config = config, **kwargs) + else: + return func(*args, **kwargs) diff --git a/Formula/n/nzbget.rb b/Formula/n/nzbget.rb new file mode 100644 index 0000000000000..87dda8ebbaac9 --- /dev/null +++ b/Formula/n/nzbget.rb @@ -0,0 +1,64 @@ +class Nzbget < Formula + desc "Binary newsgrabber for nzb files" + homepage "https://nzbget.com" + url "https://github.com/nzbgetcom/nzbget/archive/refs/tags/v25.4.tar.gz" + sha256 "2603116ffaef4992621cf7a82ce300f41a676a312de784f2bac5058abc1a2385" + license "GPL-2.0-or-later" + head "https://github.com/nzbgetcom/nzbget.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e0944049a0fd6986fee0d4ff59a1f43eb7eb512d878c962021bf8396b62f17b2" + sha256 cellar: :any, arm64_sequoia: "6fc575c3c1c5ad4fc169754e791e1f6d175039ef3ac74892cb1d82fd0db6c6d3" + sha256 cellar: :any, arm64_sonoma: "8f797037cc0fa4329116f53979e2d285122dd20c2b06951613fcf929c3c19b6d" + sha256 sonoma: "2dbae06c6fa37c6a8a0915878abc24257903b4975714f816b3c5cde9fa81fba9" + sha256 cellar: :any_skip_relocation, arm64_linux: "56477e369681e9d60a655ee8b80ecaab81203151e28bacee842478d56addf9c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f48ea7ad186fa87a9a81d79fe460c90f879cd96c1cc83e6b6069e6811c36f257" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "openssl@3" + depends_on "sevenzip" + + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + inreplace "nzbget.conf" do |s| + if OS.mac? + # Set upstream's recommended values for file systems without + # sparse-file support (e.g., HFS+); see Homebrew/homebrew-core#972 + s.gsub! "DirectWrite=yes", "DirectWrite=no" + s.gsub! "ArticleCache=0", "ArticleCache=700" + end + + # Update 7z cmd to match homebrew binary + s.gsub! "SevenZipCmd=7z", "SevenZipCmd=7zz" + end + + etc.install "nzbget.conf" + end + + service do + run [opt_bin/"nzbget", "-c", HOMEBREW_PREFIX/"etc/nzbget.conf", "-s", "-o", "OutputMode=Log", + "-o", "ConfigTemplate=#{HOMEBREW_PREFIX}/share/nzbget/nzbget.conf", + "-o", "WebDir=#{HOMEBREW_PREFIX}/share/nzbget/webui"] + keep_alive true + environment_variables PATH: "#{HOMEBREW_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin" + end + + test do + (testpath/"downloads/dst").mkpath + # Start nzbget as a server in daemon-mode + system bin/"nzbget", "-D", "-c", etc/"nzbget.conf" + # Query server for version information + system bin/"nzbget", "-V", "-c", etc/"nzbget.conf" + # Shutdown server daemon + system bin/"nzbget", "-Q", "-c", etc/"nzbget.conf" + end +end diff --git a/Formula/nacl.rb b/Formula/nacl.rb deleted file mode 100644 index 88fe6e85f14c7..0000000000000 --- a/Formula/nacl.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Nacl < Formula - desc "Network communication, encryption, decryption, signatures library" - homepage "https://nacl.cr.yp.to/" - url "https://hyperelliptic.org/nacl/nacl-20110221.tar.bz2" - mirror "https://mirrors.kernel.org/debian/pool/main/n/nacl/nacl_20110221.orig.tar.bz2" - sha256 "4f277f89735c8b0b8a6bbd043b3efb3fa1cc68a9a5da6a076507d067fc3b3bf8" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "bb0b22e1aa3a87657b064def3d19bcad419a4339889046f931a5eac7e5bc8bc1" => :mojave - sha256 "43fffe959f6a95aacff4d5d4b7bfbb34f835a2487e8bff0645473d8ec1de83b6" => :high_sierra - sha256 "86e5ef1c0a14b029d1ed3f63df48fde9c302adbbc3e1dcacd1bb7617bf547615" => :sierra - sha256 "e08c93b814989405fa3b7db9e3a9c4f149e36aaab32aba44e9a2f1659d2d3efd" => :el_capitan - sha256 "1a1a7fffc6d41f2f7bcc393375f2907f63b5a13f9414fe0827daef96246301e7" => :yosemite - sha256 "44bbb2d7cb0daa6eb06c79e5881ae827786a04dece9b4a34cb0a6ea06cddb1e1" => :mavericks - end - - def install - # Print the build to stdout rather than the default logfile. - # Logfile makes it hard to debug and spot hangs. Applied by Debian: - # https://sources.debian.net/src/nacl/20110221-4.1/debian/patches/output-while-building/ - # Also, like Debian, inreplace the hostname because it isn't used outside - # build process and adds an unpredictable factor. - inreplace "do" do |s| - s.gsub! 'exec >"$top/log"', 'exec | tee "$top/log"' - s.gsub! /^shorthostname=`.*$/, "shorthostname=brew" - end - - system "./do" # This takes a while since it builds *everything* - - # NaCL has an odd compilation model and installs the resulting - # binaries in a directory like: - # /build//lib//libnacl.a - # /build//include//crypto_box.h - # - # It also builds both x86 and x86_64 copies if your compiler can - # handle it, but we install only one. - archstr = Hardware::CPU.is_64_bit? ? "amd64" : "x86" - - # Don't include cpucycles.h - include.install Dir["build/brew/include/#{archstr}/crypto_*.h"] - include.install "build/brew/include/#{archstr}/randombytes.h" - - # Add randombytes.o to the libnacl.a archive - I have no idea why it's separated, - # but plenty of the key generation routines depend on it. Users shouldn't have to - # know this. - nacl_libdir = "build/brew/lib/#{archstr}" - system "ar", "-r", "#{nacl_libdir}/libnacl.a", "#{nacl_libdir}/randombytes.o" - lib.install "#{nacl_libdir}/libnacl.a" - end -end diff --git a/Formula/naga.rb b/Formula/naga.rb deleted file mode 100644 index e81b3ff0cd9e3..0000000000000 --- a/Formula/naga.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Naga < Formula - desc "Terminal implementation of the Snake game" - homepage "https://github.com/anayjoshi/naga/" - url "https://github.com/anayjoshi/naga/archive/naga-v1.0.tar.gz" - sha256 "7f56b03b34e2756b9688e120831ef4f5932cd89b477ad8b70b5bcc7c32f2f3b3" - - bottle do - cellar :any_skip_relocation - sha256 "0deef9e2936b7e5256c4f3e6f22c85389e3b8e53a586018854cbad3b983adc53" => :mojave - sha256 "324d31a0ae721075843ff5e326f35efcd1a03d784e92ef8419b954b40a55fae3" => :high_sierra - sha256 "8baa28b92a0d6970a857c859b11e4a1df878db5270f259bd3ccfe3b5f57f3303" => :sierra - sha256 "6ff3dd51d1cdeed9364c36c25d1c2794f973e2927077eaeb251fa0dbfc48a531" => :el_capitan - sha256 "fe303605603697993def097e9557a0dcec83d323a0b43d51fb1811108937da6c" => :yosemite - end - - def install - bin.mkpath - system "make", "install", "INSTALL_PATH=#{bin}/naga" - end - - test do - assert_predicate bin/"naga", :exist? - end -end diff --git a/Formula/nagios-plugins.rb b/Formula/nagios-plugins.rb deleted file mode 100644 index f6a5abbb8af6e..0000000000000 --- a/Formula/nagios-plugins.rb +++ /dev/null @@ -1,43 +0,0 @@ -class NagiosPlugins < Formula - desc "Plugins for the nagios network monitoring system" - homepage "https://www.nagios-plugins.org/" - url "https://www.nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz" - sha256 "647c0ba4583d891c965fc29b77c4ccfeccc21f409fdf259cb8af52cb39c21e18" - - bottle do - sha256 "27cfda8fe9e205ff63eda487821e13d93b19900838b4ad0ebd73a86fc8c7224b" => :mojave - sha256 "d8f55e381e65df1be3113923dc351fac227ae17b6334a9d2c939cf346434eca9" => :high_sierra - sha256 "f88a0ce6fd30f875cc9654f3989b0728d2bd230e09bec994cdb8c2461a7f2166" => :sierra - sha256 "d9920741a2e4322d7c9fd55a87f3d7bf56f4abfa3a49f0fc9adcf408f891775a" => :el_capitan - sha256 "1fcf4d4934fe7f7793fb78d13f17f948d46a19600e02881b22695f736f327e65" => :yosemite - end - - depends_on "openssl" - - conflicts_with "monitoring-plugins", :because => "monitoring-plugins ships their plugins to the same folder." - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{libexec} - --libexecdir=#{libexec}/sbin - --with-openssl=#{Formula["openssl"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - sbin.write_exec_script Dir["#{libexec}/sbin/*"] - end - - def caveats - <<~EOS - All plugins have been installed in: - #{HOMEBREW_PREFIX}/sbin - EOS - end - - test do - output = shell_output("#{sbin}/check_dns -H 8.8.8.8 -t 3") - assert_match "google-public-dns", output - end -end diff --git a/Formula/nagios.rb b/Formula/nagios.rb deleted file mode 100644 index c4134ecdeb9fa..0000000000000 --- a/Formula/nagios.rb +++ /dev/null @@ -1,138 +0,0 @@ -class Nagios < Formula - desc "Network monitoring and management system" - homepage "https://www.nagios.org/" - url "https://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.4.2/nagios-4.4.2.tar.gz" - sha256 "3418923f326aa86dc8c84cfd0df788fa495a90d772f8071acf40fdbef0736853" - - bottle do - sha256 "9d36b9cbf38eb6eba90297622401db6a0e9d7d1f1ad183b4bb2f2cdf91702a13" => :mojave - sha256 "0abc72531983bb73c1bf18ff524c3eda9dd011ef3010a4cecf9350169b8a4208" => :high_sierra - sha256 "289f19421ed2ca7f36b159fcaffb9167400da75f427d34f682419c8cede08726" => :sierra - sha256 "584570d4e0cd38b238fcd53b84fe70035dd664ba56e349d598f5a6bc3e6b63e2" => :el_capitan - end - - depends_on "gd" - depends_on "libpng" - depends_on "nagios-plugins" - - def nagios_sbin - prefix/"cgi-bin" - end - - def nagios_etc - etc/"nagios" - end - - def nagios_var - var/"lib/nagios" - end - - def htdocs - pkgshare/"htdocs" - end - - def user - Utils.popen_read("id -un").chomp - end - - def group - Utils.popen_read("id -gn").chomp - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sbindir=#{nagios_sbin}", - "--sysconfdir=#{nagios_etc}", - "--localstatedir=#{nagios_var}", - "--datadir=#{htdocs}", - "--libexecdir=#{HOMEBREW_PREFIX}/sbin", # Plugin dir - "--with-cgiurl=/nagios/cgi-bin", - "--with-htmurl=/nagios", - "--with-nagios-user=#{user}", - "--with-nagios-group='#{group}'", - "--with-command-user=#{user}", - "--with-command-group=_www", - "--with-httpd-conf=#{share}", - "--disable-libtool" - system "make", "all" - system "make", "install" - - # Install config - system "make", "install-config" - system "make", "install-webconf" - end - - def post_install - (var/"lib/nagios/rw").mkpath - - config = etc/"nagios/nagios.cfg" - return unless File.exist?(config) - return if File.read(config).include?(ENV["USER"]) - inreplace config, "brew", ENV["USER"] - end - - def caveats; <<~EOS - First we need to create a command dir using superhuman powers: - - mkdir -p #{nagios_var}/rw - sudo chgrp _www #{nagios_var}/rw - sudo chmod 2775 #{nagios_var}/rw - - Then install the Nagios web frontend into Apple's build-in Apache: - - 1) Turn on Personal Web Sharing. - - 2) Load the cgi and php modules by patching /etc/apache2/httpd.conf: - - -#LoadModule php5_module libexec/apache2/libphp5.so - +LoadModule php5_module libexec/apache2/libphp5.so - - -#LoadModule cgi_module libexec/apache2/mod_cgi.so - +LoadModule cgi_module libexec/apache2/mod_cgi.so - - 3) Symlink the sample config and create your web account: - - sudo ln -sf #{share}/nagios.conf /etc/apache2/other/ - htpasswd -cs #{nagios_etc}/htpasswd.users nagiosadmin - sudo apachectl restart - - Log in with your web account (and don't forget to RTFM :-) - - open http://localhost/nagios - - EOS - end - - plist_options :startup => true, :manual => "nagios #{HOMEBREW_PREFIX}/etc/nagios/nagios.cfg" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/nagios - #{nagios_etc}/nagios.cfg - - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/nagios --version") - end -end diff --git a/Formula/nailgun.rb b/Formula/nailgun.rb deleted file mode 100644 index adb27a1d0df59..0000000000000 --- a/Formula/nailgun.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Nailgun < Formula - desc "Command-line client, protocol and server for Java programs" - homepage "http://www.martiansoftware.com/nailgun/" - url "https://github.com/facebook/nailgun/archive/nailgun-all-v1.0.0.tar.gz" - sha256 "a982c7399cde2b0a795f4ef36ca607fc5d8150395a9680b5c0a49ff9ca81a8c6" - - bottle do - cellar :any_skip_relocation - sha256 "2e76286672ac4dfa511e5b86c60d6dbd7a16aad954f47eea49d41d371e15a0f9" => :mojave - sha256 "f72b282a08c6ceb67af42f4f759eb875d283985a614f528a4d7b11a9de722d18" => :high_sierra - sha256 "b5a6c2a6c5ae333033b822f89a3b2d242d79179a415452f8561317677205fd1e" => :sierra - end - - head do - url "https://github.com/martylamb/nailgun.git" - - # The -Xdoclint used in pom.xml causes a build error on Java 7 - patch do - url "https://github.com/martylamb/nailgun/pull/70.diff?full_index=1" - sha256 "802fcb83cd93227dcfa8f988ec5665d980d04087813b776bf25aed15495bdc4f" - end - end - - depends_on "maven" => :build - - def install - system "make", "install", "CC=#{ENV.cc}", "PREFIX=#{prefix}", "CFLAGS=#{ENV.cflags}" - require "rexml/document" - pom_xml = REXML::Document.new(File.new("pom.xml")) - jar_version = REXML::XPath.first(pom_xml, "string(/pom:project/pom:version)", "pom" => "http://maven.apache.org/POM/4.0.0") - system "mvn", "clean", "install" - libexec.install Dir["nailgun-server/target/*.jar"] - bin.write_jar_script libexec/"nailgun-server-#{jar_version}.jar", "ng-server", "-server" - end - - test do - fork { exec "#{bin}/ng-server", "8765" } - sleep 1 # the server does not begin listening as fast as we can start a background process - system "#{bin}/ng", "--nailgun-port", "8765", "ng-version" - Kernel.system "#{bin}/ng", "--nailgun-port", "8765", "ng-stop" - # ng-stop always returns a non-zero exit code even on successful exit - true - end -end diff --git a/Formula/namazu.rb b/Formula/namazu.rb deleted file mode 100644 index 9bc21bca135d1..0000000000000 --- a/Formula/namazu.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Namazu < Formula - desc "Full-text search engine" - homepage "http://www.namazu.org/" - url "http://www.namazu.org/stable/namazu-2.0.21.tar.gz" - sha256 "5c18afb679db07084a05aca8dffcfb5329173d99db8d07ff6d90b57c333c71f7" - - bottle do - rebuild 1 - sha256 "f6140424ff2a5a5bee20b4430036ce76bd66bf82705cd0a1fa52790caf617fea" => :mojave - sha256 "15f536a0c9e3212af68689dc2202ae0d9a7634d161aa0ac3aa6d55977506f8da" => :high_sierra - sha256 "2514d7e9209225e9f388feda1116c193ec98034952dd9c6b89bcaccafabedb1f" => :sierra - sha256 "39cad2ecd3948e2afd69fc58b6390e1fd7fa7e82cee8176fec7f71880c6e52c2" => :el_capitan - sha256 "01a0bf11f2ad2095306055016b430c19900ea6203af5fcf4bb5c92c085d44a67" => :yosemite - sha256 "ca6e854a626eaafd4ac26661b9a3db86dc9bc140f4aa98effd5843882aba7ecb" => :mavericks - end - - def install - cd "File-MMagic" do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - - args = ["--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-pmdir=#{libexec}/lib/perl5"] - system "./configure", *args - system "make", "install" - end - - test do - data_file = testpath/"data.txt" - data_file.write "This is a Namazu test case for Homebrew." - mkpath "idx" - - system bin/"mknmz", "-O", "idx", data_file - search_result = shell_output("#{bin}/namazu -a Homebrew idx") - assert_match /#{data_file}/, search_result - end -end diff --git a/Formula/namebench.rb b/Formula/namebench.rb deleted file mode 100644 index 808e9aeeebb64..0000000000000 --- a/Formula/namebench.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Namebench < Formula - desc "DNS benchmark utility" - homepage "https://code.google.com/archive/p/namebench/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/namebench/namebench-1.3.1-source.tgz" - sha256 "30ccf9e870c1174c6bf02fca488f62bba280203a0b1e8e4d26f3756e1a5b9425" - - bottle do - cellar :any_skip_relocation - sha256 "35225323dc77dc1954cd19b1aa0476e4ebab47e91dbabbfc7e169b5b500b0eba" => :mojave - sha256 "4c2312daef0aae052b7e65bdb4b20cdcf1bfa601e5f8a484a7f846be1096bcb1" => :high_sierra - sha256 "ae766151284842185ceecf1622a82cf55c949994729536015a42eea38f62309c" => :sierra - sha256 "3333ef2615f6fbf294cede389d8545487474779a52c18108feb83a4697530cdc" => :el_capitan - sha256 "8d400aed171038f248e9d91718fb42625fc1f278df538b34259f26918b245f66" => :yosemite - sha256 "ac3d993b71305c18b47fa671ecb4c5875b80fd7ea87a6fff0f123c3c2cfdcb43" => :mavericks - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - - system "python", "setup.py", "install", "--prefix=#{libexec}", - "--install-data=#{libexec}/lib/python2.7/site-packages" - - bin.install "namebench.py" => "namebench" - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system bin/"namebench", "--query_count", "1", "--only", "8.8.8.8" - end -end diff --git a/Formula/nano.rb b/Formula/nano.rb deleted file mode 100644 index b0f59c17265ba..0000000000000 --- a/Formula/nano.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Nano < Formula - desc "Free (GNU) replacement for the Pico text editor" - homepage "https://www.nano-editor.org/" - url "https://nano-editor.org/dist/v3/nano-3.2.tar.gz" - sha256 "ca694554628d6d5e695af70d3a78673a76b474c38732ab5bcca47d22845086bf" - - bottle do - sha256 "7628abb16bd170c195f76e49f799041c4f0f89023f6b3099f9620359032ce492" => :mojave - sha256 "2f5813de778b93cf4b5fe064ef4f4e5c93db76f3c1a6fd9c330341ba0519666d" => :high_sierra - sha256 "9f89370b4a54053aed833cf3ab695a02f04d02198913aebe74d6a527eab0c61d" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "ncurses" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--enable-color", - "--enable-extra", - "--enable-multibuffer", - "--enable-nanorc", - "--enable-utf8" - system "make", "install" - doc.install "doc/sample.nanorc" - end - - test do - system "#{bin}/nano", "--version" - end -end diff --git a/Formula/nanomsg.rb b/Formula/nanomsg.rb deleted file mode 100644 index bd6399ef0f6aa..0000000000000 --- a/Formula/nanomsg.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Nanomsg < Formula - desc "Socket library in C" - homepage "https://nanomsg.org/" - url "https://github.com/nanomsg/nanomsg/archive/1.1.5.tar.gz" - sha256 "218b31ae1534ab897cb5c419973603de9ca1a5f54df2e724ab4a188eb416df5a" - head "https://github.com/nanomsg/nanomsg.git" - - bottle do - sha256 "95609047c54b0207587db3a5b3cc8985b35fc922fe8785c63d4d2a44a78ff57f" => :mojave - sha256 "11390e904a94e60865186a846af14565b379ec84942a9bc512ba4e5e3ea7ec85" => :high_sierra - sha256 "95192ebc59926ff064d7f4cff5ebf9037c7549af61d2f1c23375827c91b88282" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", *std_cmake_args - system "make" - system "make", "install" - end - - test do - bind = "tcp://127.0.0.1:8000" - - pid = fork do - exec "#{bin}/nanocat --rep --bind #{bind} --format ascii --data home" - end - sleep 2 - - begin - output = shell_output("#{bin}/nanocat --req --connect #{bind} --format ascii --data brew") - assert_match /home/, output - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/nanomsgxx.rb b/Formula/nanomsgxx.rb deleted file mode 100644 index e8afc395db683..0000000000000 --- a/Formula/nanomsgxx.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Nanomsgxx < Formula - desc "Nanomsg binding for C++11" - homepage "https://achille-roussel.github.io/nanomsgxx/doc/nanomsgxx.7.html" - url "https://github.com/achille-roussel/nanomsgxx/archive/0.2.tar.gz" - sha256 "116ad531b512d60ea75ef21f55fd9d31c00b172775548958e5e7d4edaeeedbaa" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "ece20152a6ddcd9bd5a931b8c190de6c998da9ad3bacb195ae69fc3671767d50" => :mojave - sha256 "dd6e547bd44055f348857c15843c16965b4dd03ea82713069cbb5df9836f1009" => :high_sierra - sha256 "25067fb5373110f213ef8fb8e662e274db47c84e6058777e646489e1257d457d" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "nanomsg" - - def install - args = %W[ - --static - --shared - --prefix=#{prefix} - ] - - system "python", "./waf", "configure", *args - system "python", "./waf", "build" - system "python", "./waf", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(int argc, char **argv) { - std::cout << "Hello Nanomsgxx!" << std::endl; - } - EOS - - system ENV.cxx, "-std=c++11", "-L#{lib}", "-lnnxx", "test.cpp" - - assert_equal "Hello Nanomsgxx!\n", shell_output("#{testpath}/a.out") - end -end diff --git a/Formula/nanopb-generator.rb b/Formula/nanopb-generator.rb deleted file mode 100644 index 48a965f3a73a6..0000000000000 --- a/Formula/nanopb-generator.rb +++ /dev/null @@ -1,45 +0,0 @@ -class NanopbGenerator < Formula - desc "C library for encoding and decoding Protocol Buffer messages" - homepage "https://jpa.kapsi.fi/nanopb/docs/index.html" - url "https://jpa.kapsi.fi/nanopb/download/nanopb-0.3.9.1.tar.gz" - sha256 "e677290fdb419a3d437b824ef9eac02b8d1672fb30d60dd1f3113eae405b1f5b" - - bottle do - cellar :any_skip_relocation - sha256 "bf5f183ac157af998283c8e2ea3e5548bb57a4d28e8b3cfd75572df4f6b17365" => :mojave - sha256 "298fbe96efa71f53a4bfb7ae92d0e1cf31b8d9749611300ecc02dcefe20be9d8" => :high_sierra - sha256 "298fbe96efa71f53a4bfb7ae92d0e1cf31b8d9749611300ecc02dcefe20be9d8" => :sierra - sha256 "298fbe96efa71f53a4bfb7ae92d0e1cf31b8d9749611300ecc02dcefe20be9d8" => :el_capitan - end - - depends_on "protobuf" - depends_on "python@2" - - conflicts_with "mesos", - :because => "they depend on an incompatible version of protobuf" - - def install - cd "generator" do - system "make", "-C", "proto" - inreplace "nanopb_generator.py", %r{^#!/usr/bin/env python$}, - "#!/usr/bin/python" - libexec.install "nanopb_generator.py", "protoc-gen-nanopb", "proto" - bin.install_symlink libexec/"protoc-gen-nanopb", libexec/"nanopb_generator.py" - end - end - - test do - (testpath/"test.proto").write <<~EOS - syntax = "proto2"; - - message Test { - required string test_field = 1; - } - EOS - system Formula["protobuf"].bin/"protoc", - "--proto_path=#{testpath}", "--plugin=#{bin}/protoc-gen-nanopb", - "--nanopb_out=#{testpath}", testpath/"test.proto" - system "grep", "test_field", testpath/"test.pb.c" - system "grep", "test_field", testpath/"test.pb.h" - end -end diff --git a/Formula/narwhal.rb b/Formula/narwhal.rb deleted file mode 100644 index 468b3ad181e30..0000000000000 --- a/Formula/narwhal.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Narwhal < Formula - desc "General purpose JavaScript platform for building applications" - homepage "https://github.com/280north/narwhal" - url "https://github.com/280north/narwhal/archive/v0.3.2.tar.gz" - sha256 "a26ac20097839a5c7b5de665678fb76699371eea433d6e3b820d4d8de2ad4937" - head "https://github.com/280north/narwhal.git" - - bottle :unneeded - - conflicts_with "spidermonkey", :because => "both install a js binary" - conflicts_with "elixir-build", :because => "both install `json` binaries" - - def install - rm Dir["bin/*.cmd"] - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - end -end diff --git a/Formula/nasm.rb b/Formula/nasm.rb deleted file mode 100644 index 20abf8f503079..0000000000000 --- a/Formula/nasm.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Nasm < Formula - desc "Netwide Assembler (NASM) is an 80x86 assembler" - homepage "https://www.nasm.us/" - url "https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz" - sha256 "e24ade3e928f7253aa8c14aa44726d1edf3f98643f87c9d72ec1df44b26be8f5" - - bottle do - cellar :any_skip_relocation - sha256 "77a183895137e0f95d897d33399235a58f1f23c99bac7f041d58baeb6f32e3b9" => :mojave - sha256 "b8d720e9008f58bbeddee14a8fa4841a8913c3d61d46872b37f7736d03a06218" => :high_sierra - sha256 "1d5283c366d958a1b7efdc22983fe313e0bd2a26268e585ced9f284f50ed270b" => :sierra - end - - head do - url "https://repo.or.cz/nasm.git" - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "xmlto" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "manpages" if build.head? - system "make", "rdf" - system "make", "install", "install_rdf" - end - - test do - (testpath/"foo.s").write <<~EOS - mov eax, 0 - mov ebx, 0 - int 0x80 - EOS - - system "#{bin}/nasm", "foo.s" - code = File.open("foo", "rb") { |f| f.read.unpack("C*") } - expected = [0x66, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x66, 0xbb, - 0x00, 0x00, 0x00, 0x00, 0xcd, 0x80] - assert_equal expected, code - end -end diff --git a/Formula/natalie.rb b/Formula/natalie.rb deleted file mode 100644 index cdd29d04fbc1f..0000000000000 --- a/Formula/natalie.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Natalie < Formula - desc "Storyboard Code Generator (for Swift)" - homepage "https://github.com/krzyzanowskim/Natalie" - url "https://github.com/krzyzanowskim/Natalie/archive/0.7.0.tar.gz" - sha256 "f7959915595495ce922b2b6987368118fa28ba7d13ac3961fd513ec8dfdb21c8" - head "https://github.com/krzyzanowskim/Natalie.git" - - bottle do - cellar :any_skip_relocation - sha256 "5010d3c20e1ff431b881e997ede4673564f79016e7271888b462f8a39d40900f" => :mojave - sha256 "5b574a8d5a8c2e386b1eedeee8b20e77db84138898be95dcc4b0ab2fcb81fc88" => :high_sierra - end - - depends_on :xcode => ["9.4", :build] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", - "-static-stdlib" - bin.install ".build/release/natalie" - share.install "NatalieExample" - end - - test do - generated_code = Utils.popen_read("#{bin}/natalie #{share}/NatalieExample") - assert generated_code.lines.count > 1, "Natalie failed to generate code!" - end -end diff --git a/Formula/nativefier.rb b/Formula/nativefier.rb deleted file mode 100644 index 9b9ce1e9c27f8..0000000000000 --- a/Formula/nativefier.rb +++ /dev/null @@ -1,26 +0,0 @@ -require "language/node" - -class Nativefier < Formula - desc "Wrap web apps natively" - homepage "https://github.com/jiahaog/nativefier" - url "https://registry.npmjs.org/nativefier/-/nativefier-7.6.10.tgz" - sha256 "7e97d25c612f8e1732e8390d0bd1cc03a0f77305213c131242c2fce321409b78" - - bottle do - cellar :any_skip_relocation - sha256 "0db7ce915cfdc681971365af6562b89512203a0d6b307a56324cacb669e80687" => :mojave - sha256 "ca88f69ce01606b89fb5f5aa3b9e21e6ad02e9219512d27a4a40699805f0841c" => :high_sierra - sha256 "1e48c9ffe77b80476e8bbc89021e96a4532677cb3cf641ab10f4d559fdba55e8" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - system bin/"nativefier", "--version" - end -end diff --git a/Formula/nats-streaming-server.rb b/Formula/nats-streaming-server.rb deleted file mode 100644 index bce823a7b3de0..0000000000000 --- a/Formula/nats-streaming-server.rb +++ /dev/null @@ -1,60 +0,0 @@ -class NatsStreamingServer < Formula - desc "Lightweight cloud messaging system" - homepage "https://nats.io" - url "https://github.com/nats-io/nats-streaming-server/archive/v0.11.2.tar.gz" - sha256 "9c7947d54e20cb2126a662fa9b327d0c025f93b21621c0c2b2b273ca4181f8d3" - head "https://github.com/nats-io/nats-streaming-server.git" - - bottle do - cellar :any_skip_relocation - sha256 "fe15fbc630b123d12123e3c47e3e93d70e1ca2d9dbb3f5f22bad5d49caea33e4" => :mojave - sha256 "0daf2879e2e5007ebc536b742a33346bfee8876f4f89f357978c41ac73315601" => :high_sierra - sha256 "7321cd647e8deb4fb57b3cfe2bcfb2183c65d3d911e0df41956b1ba2c1417879" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - mkdir_p "src/github.com/nats-io" - ln_s buildpath, "src/github.com/nats-io/nats-streaming-server" - buildfile = buildpath/"src/github.com/nats-io/nats-streaming-server/nats-streaming-server.go" - system "go", "build", "-v", "-o", bin/"nats-streaming-server", buildfile - end - - plist_options :manual => "nats-streaming-server" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/nats-streaming-server - - RunAtLoad - - - - EOS - end - - test do - pid = fork do - exec "#{bin}/nats-streaming-server --port=8085 --pid=#{testpath}/pid --log=#{testpath}/log" - end - sleep 3 - - begin - assert_match "INFO", shell_output("curl localhost:8085") - assert_predicate testpath/"log", :exist? - assert_match version.to_s, File.read(testpath/"log") - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/naturaldocs.rb b/Formula/naturaldocs.rb deleted file mode 100644 index 260b85531e910..0000000000000 --- a/Formula/naturaldocs.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Naturaldocs < Formula - desc "Extensible, multi-language documentation generator" - homepage "https://www.naturaldocs.org/" - url "https://downloads.sourceforge.net/project/naturaldocs/Stable%20Releases/2.0.2/Natural_Docs_2.0.2.zip" - sha256 "4a8be89d1c749fa40611193404556d408f414e03df8c397b970e045b57a54d4d" - - bottle :unneeded - - depends_on "mono" - - def install - libexec.install Dir["*"] - (bin/"naturaldocs").write <<~EOS - #!/bin/bash - mono #{libexec}/NaturalDocs.exe "$@" - EOS - - libexec.install_symlink etc/"naturaldocs" => "config" - end - - test do - system "#{bin}/naturaldocs", "-h" - end -end diff --git a/Formula/nave.rb b/Formula/nave.rb deleted file mode 100644 index 5a682d4f142d4..0000000000000 --- a/Formula/nave.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Nave < Formula - desc "Virtual environments for Node.js" - homepage "https://github.com/isaacs/nave" - url "https://github.com/isaacs/nave/archive/v2.2.3.tar.gz" - sha256 "32aaca55ef182483c4f0b9830d38724bc12ef9d334d1a6dabd9facc66420eea9" - head "https://github.com/isaacs/nave.git" - - bottle :unneeded - - def install - bin.install "nave.sh" => "nave" - end - - test do - assert_match "0.10.30", shell_output("#{bin}/nave ls-remote") - end -end diff --git a/Formula/nbimg.rb b/Formula/nbimg.rb deleted file mode 100644 index f4456c11f3742..0000000000000 --- a/Formula/nbimg.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Nbimg < Formula - desc "Smartphone boot splash screen converter for Android and winCE" - homepage "https://github.com/poliva/nbimg" - url "https://github.com/poliva/nbimg/archive/v1.2.1.tar.gz" - sha256 "f72846656bb8371564c245ab34550063bd5ca357fe8a22a34b82b93b7e277680" - - bottle do - cellar :any_skip_relocation - sha256 "f78297721594cdf2c825c589c193fc29f01bfd2e3bfe6f63c3c788ed2699fcc5" => :mojave - sha256 "20d4ae1588773f9ccd4ff2181def08297ea1119ca70f39392ef11648cb72270f" => :high_sierra - sha256 "75fd1505a68d1c499ddcf73e912947910659d9bd127c208cafeb3e8899664fbd" => :sierra - sha256 "402904e3588fe5a8ae00d7131fe29821880f31a8ec19fb89e70a79f76e067452" => :el_capitan - sha256 "7e5f47c47238a5e6b0abca121880c72e78e29d0638924afa75ed999286dc934b" => :yosemite - sha256 "5389c76ef785f2d7d7ce695dc5b9a1bbecf3dd8eb3fcc8646a28a8b52dfa6a96" => :mavericks - end - - def install - inreplace "Makefile", "all: nbimg win32", "all: nbimg" - system "make", "prefix=#{prefix}", - "bindir=#{bin}", - "docdir=#{doc}", - "mandir=#{man}", - "install" - end - - test do - curl "https://gist.githubusercontent.com/staticfloat/8253400/raw/41aa4aca5f1aa0a82c85c126967677f830fe98ee/tiny.bmp", "-O" - system "#{bin}/nbimg", "-Ftiny.bmp" - end -end diff --git a/Formula/ncdc.rb b/Formula/ncdc.rb deleted file mode 100644 index 4ef13ac4e17ab..0000000000000 --- a/Formula/ncdc.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Ncdc < Formula - desc "NCurses direct connect" - homepage "https://dev.yorhel.nl/ncdc" - url "https://dev.yorhel.nl/download/ncdc-1.20.tar.gz" - sha256 "8a998857df6289b6bd44287fc06f705b662098189f2a8fe95b1a5fbc703b9631" - - bottle do - cellar :any - sha256 "08a9bceea86394663db9b7abc8b5d8033afd1dbbcdfde15cac5b4b1c43e9b0d4" => :mojave - sha256 "8c9d1049ef2493d21aba8eb961e98de27b187de8b7cbd18181a26e7889a2e030" => :high_sierra - sha256 "1e882285c9367191a63d62cea2f539b22f9d209593649d6f3fb6c7a472cc2eaa" => :sierra - sha256 "05b153207799eae9250516bfd51b41e0069f94155d727ec69a016db96bdfa349" => :el_capitan - sha256 "8655d4cda874055cadc3c02f1a1929385f1d8e08e7f5b7fa0a6a8971321aeee8" => :yosemite - end - - head do - url "https://g.blicky.net/ncdc.git", :shallow => false - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "sqlite" - - def install - system "autoreconf", "-ivf" if build.head? - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/ncdc", "-v" - end -end diff --git a/Formula/ncdu.rb b/Formula/ncdu.rb deleted file mode 100644 index 9383f0e65e058..0000000000000 --- a/Formula/ncdu.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ncdu < Formula - desc "NCurses Disk Usage" - homepage "https://dev.yorhel.nl/ncdu" - url "https://dev.yorhel.nl/download/ncdu-1.13.tar.gz" - sha256 "f4d9285c38292c2de05e444d0ba271cbfe1a705eee37c2b23ea7c448ab37255a" - - bottle do - cellar :any_skip_relocation - sha256 "623b7f91e30f6c673893ff06c66a430736e918eb370b7c303a099cc6d87fb8df" => :mojave - sha256 "5db180d05ce0d3e8571340f69916c5b867a9ad8f600873887881e692d6f7d333" => :high_sierra - sha256 "17c8904b40c21d0fa8e1f9f5b7d40817911b34c1fc3f92360b98f6d43470a736" => :sierra - sha256 "8a7eb78e5d778b71d688f1f935b775a7f55fd9319d1cec2988b809c359223a65" => :el_capitan - end - - head do - url "https://g.blicky.net/ncdu.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "autoreconf", "-i" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ncdu -v") - end -end diff --git a/Formula/ncftp.rb b/Formula/ncftp.rb deleted file mode 100644 index c72ac4f3eaff1..0000000000000 --- a/Formula/ncftp.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ncftp < Formula - desc "FTP client with an advanced user interface" - homepage "https://www.ncftp.com/" - url "ftp://ftp.ncftp.com/ncftp/ncftp-3.2.6-src.tar.gz" - mirror "https://fossies.org/linux/misc/ncftp-3.2.6-src.tar.gz" - sha256 "129e5954850290da98af012559e6743de193de0012e972ff939df9b604f81c23" - - bottle do - sha256 "3f7f108352b84b36c6d2174e4cc71c9b5b3632ac79b2aa8293205ea322541ba0" => :mojave - sha256 "bd53fba3c13ba333f8e22ce0adc67a9ee3fa0d95e571f9833f4928d0adb0ee30" => :high_sierra - sha256 "25caf7d9c7ac3c1642d3d205fcedfbea05878798033c0ff82cc3b5fbab4674d5" => :sierra - sha256 "821f66bcd8991168314bb77f1404b3af6f93fda5c4fdcb3c651d3b7fbdd7f4fe" => :el_capitan - sha256 "ac12f87bb648eb4dde883ad5ccca0c8cf80c60e1437ce03e5fc8d768fcec1bde" => :yosemite - end - - def install - system "./configure", "--disable-universal", - "--disable-precomp", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/ncftp", "-F" - end -end diff --git a/Formula/ncmpc.rb b/Formula/ncmpc.rb deleted file mode 100644 index 3c67f1513d29c..0000000000000 --- a/Formula/ncmpc.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Ncmpc < Formula - desc "Curses Music Player Daemon (MPD) client" - homepage "https://www.musicpd.org/clients/ncmpc/" - url "https://www.musicpd.org/download/ncmpc/0/ncmpc-0.30.tar.xz" - sha256 "e3fe0cb58b8a77f63fb1645c2f974b334f1614efdc834ec698ee7d861f1b12a3" - revision 1 - - bottle do - rebuild 1 - sha256 "91d0a96cb5759db8de8d2fccce6be795cc671937adea732424376c76ff9ddd3b" => :mojave - sha256 "74568bc0dcd4f4ad0408328ae49fb85ae3e93efcbefb649d43736e72f8c27a5e" => :high_sierra - sha256 "0f155e4eaba3842210c76adeda3250c61f6819bfe108bfee429819c5c579b661" => :sierra - sha256 "45b4d4d41251246e32f9ceea92faf205f8059fac4c37fd69f7da2b72fd8e8bcc" => :el_capitan - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gcc" if DevelopmentTools.clang_build_version <= 800 - depends_on "gettext" - depends_on "glib" - depends_on "libmpdclient" - - fails_with :clang do - build 800 - cause "error: no matching constructor for initialization of 'value_type'" - end - - def install - sdk = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - - # Fix undefined symbols _COLORS, _COLS, etc. - # Reported 21 Sep 2017 https://github.com/MusicPlayerDaemon/ncmpc/issues/6 - (buildpath/"ncurses.pc").write <<~EOS - Name: ncurses - Description: ncurses - Version: 5.4 - Libs: -L/usr/lib -lncurses - Cflags: -I#{sdk}/usr/include - EOS - ENV.prepend_path "PKG_CONFIG_PATH", buildpath - - mkdir "build" do - system "meson", "--prefix=#{prefix}", ".." - system "ninja", "install" - end - end - - test do - system bin/"ncmpc", "--help" - end -end diff --git a/Formula/ncmpcpp.rb b/Formula/ncmpcpp.rb deleted file mode 100644 index 4df3423de7510..0000000000000 --- a/Formula/ncmpcpp.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Ncmpcpp < Formula - desc "Ncurses-based client for the Music Player Daemon" - homepage "https://rybczak.net/ncmpcpp/" - url "https://rybczak.net/ncmpcpp/stable/ncmpcpp-0.8.2.tar.bz2" - sha256 "650ba3e8089624b7ad9e4cc19bc1ac6028edb7523cc111fa1686ea44c0921554" - revision 2 - - bottle do - cellar :any - sha256 "e4d08914a6a702889887350dc4a69bedb21dc3b5791a052bb9fd45264c4642b9" => :mojave - sha256 "9295452e597f8596e06cb4a82b070c060efa018a144dd1c9dd2687adb01889d7" => :high_sierra - sha256 "b5c1a6f409183d5345c2946977de4a6927894ef4e86fa4a05fee5d978c8a0699" => :sierra - end - - head do - url "https://github.com/arybczak/ncmpcpp.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "fftw" - depends_on "libmpdclient" - depends_on "ncurses" - depends_on "readline" - depends_on "taglib" - - needs :cxx11 - - def install - ENV.cxx11 - ENV.append "LDFLAGS", "-liconv" - ENV.append "BOOST_LIB_SUFFIX", "-mt" - ENV.append "CXXFLAGS", "-D_XOPEN_SOURCE_EXTENDED" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-clock - --enable-outputs - --enable-unicode - --enable-visualizer - --with-curl - --with-taglib - ] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - system "make", "install" - end - - test do - ENV.delete("LC_CTYPE") - assert_match version.to_s, shell_output("#{bin}/ncmpcpp --version") - end -end diff --git a/Formula/nco.rb b/Formula/nco.rb deleted file mode 100644 index 62fef1dd7aa3a..0000000000000 --- a/Formula/nco.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Nco < Formula - desc "Command-line operators for netCDF and HDF files" - homepage "https://nco.sourceforge.io/" - url "https://downloads.sourceforge.net/project/nco/nco-4.7.6.tar.gz" - sha256 "c7926163b204573b7bf7b6e3c9bcfa15b2cc04c0f494dbc0c6829ee8c2f015b3" - revision 3 - - bottle do - cellar :any - sha256 "32ed25d57c795ffb7a56eac923c4b2e908e80cc72cab884524ba242474443be8" => :mojave - sha256 "dbc34488e46c857ff3ee4e8a805a085b82fb331aa6f502d1c69303a07525307c" => :high_sierra - sha256 "7e6e460c005e785a0673fe910d455518010d0ae72ead58ff1bf6d972d2887b65" => :sierra - end - - head do - url "https://github.com/nco/nco.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "antlr@2" # requires C++ interface in Antlr2 - depends_on "gsl" - depends_on "netcdf" - depends_on "texinfo" - depends_on "udunits" - - resource "example_nc" do - url "https://www.unidata.ucar.edu/software/netcdf/examples/WMI_Lear.nc" - sha256 "e37527146376716ef335d01d68efc8d0142bdebf8d9d7f4e8cbe6f880807bdef" - end - - def install - system "./autogen.sh" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-netcdf4" - system "make", "install" - end - - test do - testpath.install resource("example_nc") - output = shell_output("#{bin}/ncks --json -M WMI_Lear.nc") - assert_match "\"time\": 180", output - end -end diff --git a/Formula/ncompress.rb b/Formula/ncompress.rb deleted file mode 100644 index e68ea08c2414f..0000000000000 --- a/Formula/ncompress.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ncompress < Formula - desc "Fast, simple LZW file compressor" - homepage "https://github.com/vapier/ncompress" - url "https://github.com/vapier/ncompress/archive/v4.2.4.4.tar.gz" - sha256 "2670439935e7639c3a767087da99810e45bc3997d0638b3094396043571e5aec" - head "https://github.com/vapier/ncompress.git" - - bottle do - cellar :any_skip_relocation - sha256 "f60b16ed71a1687c1f257f692a3424de2d50085c0e6dda863260a95b073e9f6c" => :mojave - sha256 "a690145266b23c89bc3d9762cc5f632bb15f685171f939108c1eebdda06a57f5" => :high_sierra - sha256 "631c12b675f730ea3a7a170b214f63b1749fabb2d632ce76d76de4c8706cdf79" => :sierra - sha256 "a046e625feb4e7dbf26136b6ba949f9883de14674571f2291794daf98106558f" => :el_capitan - sha256 "613392aa88dbf86d8de3d6355dfeb72753a4040fd8c805907f434a7d1e5e78c4" => :yosemite - end - - keg_only :provided_by_macos - - def install - system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man1}" - end - - test do - Pathname.new("hello").write "Hello, world!" - system "#{bin}/compress", "-f", "hello" - assert_match "Hello, world!", shell_output("#{bin}/compress -cd hello.Z") - end -end diff --git a/Formula/ncp.rb b/Formula/ncp.rb deleted file mode 100644 index 7092fc1b16a7e..0000000000000 --- a/Formula/ncp.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Ncp < Formula - desc "File copy tool for LANs" - homepage "https://www.fefe.de/ncp/" - url "https://dl.fefe.de/ncp-1.2.4.tar.bz2" - sha256 "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88" - head ":pserver:cvs:@cvs.fefe.de:/cvs", :using => :cvs - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "345fcd7aaa3fbe0352a0109c986389db0cec91b4603829b4f36998ad866e5aca" => :mojave - sha256 "2c56e482f1608eeb3925f4db0b1ef782fb1644d2a7318e522a4a3c7ba7efcdd4" => :high_sierra - sha256 "d261de84549f890b4a3ca4c9f9d72ec25dd5a66c77fbccf6c29577c49a3c0866" => :sierra - sha256 "08f17ef57ee62eb3ca90c7c033fba68edc2822d93689ddabdcaa49913c98f369" => :el_capitan - end - - depends_on "libowfat" - - # fixes man and libowfat paths and "strip" command in Makefile - patch do - url "https://gist.githubusercontent.com/plumbojumbo/9331146/raw/560e46a688ac9493ffbc1464e59cc062c0940532/GNUmakefile.diff" - sha256 "b269c3a024583918d2279324660f467060f0c2adb57db31c19c05f7bbd958b19" - end - - def install - system "make", "CC=#{ENV.cc}", - "LIBOWFAT_PREFIX=#{Formula["libowfat"].opt_prefix}" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - ping = "Hello, brew!\n" - pong = "" - IO.popen("#{bin}/npush -b 2>/dev/null", "r+") do |push| - push.puts ping - push.close_write - IO.popen("#{bin}/npoll 127.0.0.1 2>/dev/null", "r") do |poll| - pong = poll.gets - end - end - assert_equal ping, pong - end -end diff --git a/Formula/ncrack.rb b/Formula/ncrack.rb deleted file mode 100644 index 3274131b63304..0000000000000 --- a/Formula/ncrack.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ncrack < Formula - desc "Network authentication cracking tool" - homepage "https://nmap.org/ncrack/" - url "https://github.com/nmap/ncrack/archive/v0.6.0.tar.gz" - sha256 "676a323b1e9066193461f25e31445262bae495fde7dfcaf56555c3056dae24cc" - head "https://github.com/nmap/ncrack.git" - - bottle do - sha256 "899782e40fc6cce6aaa19f37719a914d5a255e50bce22f1d834f383e2b5288fc" => :mojave - sha256 "710a7c1bbc131cce0e0b5ceac7bee02c829362489a56a881b2011df7bcab7dfb" => :high_sierra - sha256 "887e071b2c1468c82c1d4ab390f0bbb6c03a482f0c39e89a573105d2ce5cb38c" => :sierra - sha256 "1ca0625ada66ae28f5bc488ecc7ca246d68711ab6b314c4f6998ab47ccba1ec0" => :el_capitan - end - - depends_on "openssl" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match version.to_f.to_s, shell_output(bin/"ncrack --version") - end -end diff --git a/Formula/ncurses.rb b/Formula/ncurses.rb deleted file mode 100644 index 991af6c69a7d9..0000000000000 --- a/Formula/ncurses.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Ncurses < Formula - desc "Text-based UI library" - homepage "https://www.gnu.org/software/ncurses/" - url "https://ftp.gnu.org/gnu/ncurses/ncurses-6.1.tar.gz" - mirror "https://ftpmirror.gnu.org/ncurses/ncurses-6.1.tar.gz" - sha256 "aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17" - - bottle do - sha256 "01e031f6bb1513edcb26d78a15dc5e85969c42e9dc40ae3cbc3535982658abc0" => :mojave - sha256 "bc5a61af5553ac748657e276ffcd604fca3d74db0b10855b9e4163ae45f7cb72" => :high_sierra - sha256 "8c1b3ae226520b5c14f61c52935eceb04717d8174382d137a169718f50f67910" => :sierra - sha256 "5e3d98b211de89b9c750d627bdd66e42bf1fa77ad1528e4db8a4de33ed419c28" => :el_capitan - end - - keg_only :provided_by_macos - - depends_on "pkg-config" => :build - - def install - system "./configure", "--prefix=#{prefix}", - "--enable-pc-files", - "--with-pkg-config-libdir=#{lib}/pkgconfig", - "--enable-sigwinch", - "--enable-symlinks", - "--enable-widec", - "--with-shared", - "--with-gpm=no" - system "make", "install" - make_libncurses_symlinks - - prefix.install "test" - (prefix/"test").install "install-sh", "config.sub", "config.guess" - end - - def make_libncurses_symlinks - major = version.to_s.split(".")[0] - - %w[form menu ncurses panel].each do |name| - lib.install_symlink "lib#{name}w.#{major}.dylib" => "lib#{name}.dylib" - lib.install_symlink "lib#{name}w.#{major}.dylib" => "lib#{name}.#{major}.dylib" - lib.install_symlink "lib#{name}w.a" => "lib#{name}.a" - lib.install_symlink "lib#{name}w_g.a" => "lib#{name}_g.a" - end - - lib.install_symlink "libncurses++w.a" => "libncurses++.a" - lib.install_symlink "libncurses.a" => "libcurses.a" - lib.install_symlink "libncurses.dylib" => "libcurses.dylib" - - (lib/"pkgconfig").install_symlink "ncursesw.pc" => "ncurses.pc" - - bin.install_symlink "ncursesw#{major}-config" => "ncurses#{major}-config" - - include.install_symlink [ - "ncursesw/curses.h", "ncursesw/form.h", "ncursesw/ncurses.h", - "ncursesw/panel.h", "ncursesw/term.h", "ncursesw/termcap.h" - ] - end - - test do - ENV["TERM"] = "xterm" - - system prefix/"test/configure", "--prefix=#{testpath}/test", - "--with-curses-dir=#{prefix}" - system "make", "install" - - system testpath/"test/bin/keynames" - system testpath/"test/bin/test_arrays" - system testpath/"test/bin/test_vidputs" - end -end diff --git a/Formula/ncview.rb b/Formula/ncview.rb deleted file mode 100644 index a743d96e250c6..0000000000000 --- a/Formula/ncview.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ncview < Formula - desc "Visual browser for netCDF format files" - homepage "http://meteora.ucsd.edu/~pierce/ncview_home_page.html" - url "ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/ncview--2.1.7.tar.gz" - sha256 "a14c2dddac0fc78dad9e4e7e35e2119562589738f4ded55ff6e0eca04d682c82" - revision 8 - - bottle do - sha256 "bee5774fef793dec088f6ad641aa04ee535ccc74a6ed329bb696ce0df575e1a1" => :mojave - sha256 "e1547c62f4f463f23cc2f0625e49c8d81ae99f453c67ee014fb67b9879d96719" => :high_sierra - sha256 "4b8210f42b906b910226bdfe6b6eaa2be73a8c81b8b01443599d89efdb5628de" => :sierra - end - - depends_on "netcdf" - depends_on "udunits" - depends_on :x11 - - def install - # Bypass compiler check (which fails due to netcdf's nc-config being - # confused by our clang shim) - inreplace "configure", - "if test x$CC_TEST_SAME != x$NETCDF_CC_TEST_SAME; then", - "if false; then" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - man1.install "data/ncview.1" - end - - test do - assert_match "Ncview #{version}", - shell_output("#{bin}/ncview -c 2>&1", 1) - end -end diff --git a/Formula/ndenv.rb b/Formula/ndenv.rb deleted file mode 100644 index a6d45316ad2bc..0000000000000 --- a/Formula/ndenv.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ndenv < Formula - desc "Node version manager" - homepage "https://github.com/riywo/ndenv" - url "https://github.com/riywo/ndenv/archive/v0.4.0.tar.gz" - sha256 "1a85e4c0c0eee24d709cbc7b5c9d50709bf51cf7fe996a1548797a4079e0b6e4" - head "https://github.com/riywo/ndenv.git" - - bottle :unneeded - - depends_on "node-build" - - def install - inreplace "libexec/ndenv" do |s| - if HOMEBREW_PREFIX.to_s != "/usr/local" - s.gsub! ":/usr/local/etc/ndenv.d", \ - ":#{HOMEBREW_PREFIX}/etc/ndenv.d\\0" - end - end - - if build.head? - git_revision = `git rev-parse --short HEAD`.chomp - inreplace "libexec/rbenv---version", /^(version=)"([^"]+)"/, \ - %Q(\\1"\\2-g#{git_revision}") - end - - prefix.install "bin", "completions", "libexec" - system "#{bin}/ndenv", "rehash" - end - - test do - shell_output "eval \"$(#{bin}/ndenv init -)\" && ndenv versions" - end -end diff --git a/Formula/ndiff.rb b/Formula/ndiff.rb deleted file mode 100644 index 015df7fa409b3..0000000000000 --- a/Formula/ndiff.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ndiff < Formula - desc "Virtual package provided by nmap" - homepage "https://www.math.utah.edu/~beebe/software/ndiff/" - url "http://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz" - sha256 "f2bbd9a2c8ada7f4161b5e76ac5ebf9a2862cab099933167fe604b88f000ec2c" - - bottle do - cellar :any_skip_relocation - sha256 "1849064e29be787191a0e1dba0322ca1f06361cff18127a26a926e5e7c12c79c" => :mojave - sha256 "e07f1749ab348c33f3918e0278ac4dacbb6aee0553dbb62434a8b59174d20746" => :high_sierra - sha256 "ed6f753f9fe240486de3b6589350fcc0e7afbe345ae2e01bf6b47e132de9be4e" => :sierra - sha256 "6faf20ce4c88110019c76cc4253cd65e5743fab7cff109fc8a7d41c8f411012e" => :el_capitan - sha256 "80adff8ec563059b7f49005c7e567b950ca58b392a4a5db18ae4957fe18b296d" => :yosemite - sha256 "7451587f9747af6e7ffd0e5dbacd337a72cd9b7f3c45a1240c2033e0731d5d46" => :mavericks - end - - conflicts_with "nmap", :because => "both install `ndiff` binaries" - - def install - ENV.deparallelize - # Install manually as the `install` make target is crufty - system "./configure", "--prefix=.", "--mandir=." - mkpath "bin" - mkpath "man/man1" - system "make", "install" - bin.install "bin/ndiff" - man1.install "man/man1/ndiff.1" - end - - test do - system "#{bin}/ndiff", "--help" - end -end diff --git a/Formula/ndpi.rb b/Formula/ndpi.rb deleted file mode 100644 index 588e9eb9adf9d..0000000000000 --- a/Formula/ndpi.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ndpi < Formula - desc "Deep Packet Inspection (DPI) library" - homepage "https://www.ntop.org/products/deep-packet-inspection/ndpi/" - url "https://github.com/ntop/nDPI/archive/2.2.tar.gz" - sha256 "25607db12f466ba88a1454ef8b378e0e9eb59adffad6baa4b5610859a102a5dd" - revision 1 - head "https://github.com/ntop/nDPI.git", :branch => "dev" - - bottle do - cellar :any - sha256 "ec776ec7d02f4c5fd2466ddfe9ba18b0418869ae26998f775f3b2424d2b13857" => :mojave - sha256 "5d746b20ffc8833427d8ebd6baa6778aaa33eadec316e759492d81a3e08a9511" => :high_sierra - sha256 "f93f3b4ee594ca14433be337b9afdcc830cdfcceb944a77973da81904c2e0d4e" => :sierra - sha256 "95310ac78ec0568667d533dfdea8f6338a44bc04d1de8d0e9bbefd5620a8cdb2" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "json-c" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system bin/"ndpiReader", "-i", test_fixtures("test.pcap") - end -end diff --git a/Formula/ne.rb b/Formula/ne.rb deleted file mode 100644 index 5ad6db194db27..0000000000000 --- a/Formula/ne.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Ne < Formula - desc "The nice editor" - homepage "http://ne.di.unimi.it/" - url "https://github.com/vigna/ne/archive/3.1.2.tar.gz" - sha256 "bdf09a377660527857bd25217fc91505ae2b19c41590f8a25efc91aef785a3e2" - head "https://github.com/vigna/ne.git" - - bottle do - sha256 "cb22f87c5d36b2071dbf02a62ef29e43776ecd3717ab1583e0f4543d8eaa6a69" => :mojave - sha256 "a1037e0ec9e8bcfdc3182dcbf328472f73b341c52d4a67d287ae544b254b3b72" => :high_sierra - sha256 "0b7140758a418d16e65e16f580a531adc72749932975953c081405a0187c8713" => :sierra - end - - depends_on "texinfo" => :build - - def install - ENV.deparallelize - cd "src" do - system "make" - end - system "make", "build", "PREFIX=#{prefix}", "install" - end - - test do - ENV["TERM"] = "xterm" - document = testpath/"test.txt" - macros = testpath/"macros" - document.write <<~EOS - This is a test document. - EOS - macros.write <<~EOS - GotoLine 2 - InsertString line 2 - InsertLine - Exit - EOS - system "script", "-q", "/dev/null", bin/"ne", "--macro", macros, document - assert_equal <<~EOS, document.read - This is a test document. - line 2 - EOS - end -end diff --git a/Formula/neal.rb b/Formula/neal.rb deleted file mode 100644 index d7986efb99a41..0000000000000 --- a/Formula/neal.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Neal < Formula - desc "Analyzes source code based on user-specified rules written in a custom DSL" - homepage "https://uber.github.io/NEAL/" - url "https://github.com/uber/NEAL/archive/v0.2.4.tar.gz" - sha256 "2dc1f2fd2c1cbdbe4914737fcccb6d13d0eabbc67f764d88a3f8c4a1a2bc6416" - head "https://github.com/uber/NEAL.git" - - bottle do - sha256 "872dc7f4b7465044534f440bfb8d839f842a3d1698f1b3ef9961a9b420863923" => :high_sierra - sha256 "6c301172a401cf3394c8fa36e3211c641e42c81137012a92f1929da1a66b679b" => :sierra - sha256 "c86131f9b343ef599c20dcc39ecc145768a169b2f1d4b8c29725dd3c2466e590" => :el_capitan - end - - depends_on "camlp4" => :build - depends_on "ocaml" => :build - depends_on "ocaml-num" => :build - depends_on "ocamlbuild" => :build - depends_on "opam" => :build - - def install - opamroot = buildpath/"opamroot" - opamroot.mkpath - ENV["OPAMROOT"] = opamroot - - ENV["OPAMYES"] = "1" - ENV["NATIVE"] = "1" - ENV["LIB_PATH"] = lib - ENV["BIN_PATH"] = bin - - system "opam", "init", "--no-setup" - system "opam", "install", "ocamlfind" - system "opam", "install", "--fake", "num" - system "opam", "config", "exec", "--", "make", "brew" - end - - test do - (testpath/"FailingTest.swift").write <<~EOS - (nil as Int?)! - EOS - - (testpath/"PassingTest.swift").write <<~EOS - (nil as Int?) - EOS - - (testpath/"Swift.rules").write <<~EOS - rule NoForcedValues { - Swift::ForcedValueExpression { - fail("No forced unwrapping allowed") - } - } - EOS - - cmd = "#{bin}/neal --reporter arc -r Swift.rules FailingTest.swift" - assert_match "No forced unwrapping allowed", shell_output(cmd, 1) - cmd = "#{bin}/neal --reporter arc -r Swift.rules PassingTest.swift" - assert_equal "", shell_output(cmd) - end -end diff --git a/Formula/neatvi.rb b/Formula/neatvi.rb deleted file mode 100644 index b8c7b12c6a41a..0000000000000 --- a/Formula/neatvi.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Neatvi < Formula - desc "ex/vi clone for editing bidirectional utf-8 text" - homepage "https://repo.or.cz/neatvi.git" - url "https://repo.or.cz/neatvi.git", - :tag => "06", - :revision => "5ed4bbc7f12686bb480ab8b2b05c94e12b1c71d8" - head "https://repo.or.cz/neatvi.git" - - bottle do - cellar :any_skip_relocation - sha256 "c9dfd1c69ab95ee511c1b27768166e5cba516b6c283e5b168db2451d3865fc44" => :mojave - sha256 "2e34d03e212479064e86e8d1024447badeb61a54205f1fda24f9b6633e22afe7" => :high_sierra - sha256 "339a7880dea5f7ff0e290bc890f95719da7e5ba4b64a7205760c8f6cf64e10a2" => :sierra - sha256 "c773025ad559bb25cc095a7e1efc8950424a4cd86ff81ee4b0093a0e2e3c3c84" => :el_capitan - end - - def install - system "make" - bin.install "vi" => "neatvi" - end - - test do - pipe_output("#{bin}/neatvi", ":q\n") - end -end diff --git a/Formula/nedit.rb b/Formula/nedit.rb deleted file mode 100644 index e0b5327e0736c..0000000000000 --- a/Formula/nedit.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Nedit < Formula - desc "Fast, compact Motif/X11 plain text editor" - homepage "https://sourceforge.net/projects/nedit/" - url "https://downloads.sourceforge.net/project/nedit/nedit-source/nedit-5.7-src.tar.gz" - sha256 "add9ac79ff973528ad36c86858238bac4f59896c27dbf285cbe6a4d425fca17a" - - bottle do - sha256 "5502d540128448aabe9f8f10af15bf7b0dc949821bab827fc9127ec8acdfbd26" => :mojave - sha256 "e0b25b1e4de1406581d398d1159f19b806328f1dc82b90874eab044dd8369162" => :high_sierra - sha256 "0150b964f9436f9e97e8a969379240ba50612354e36883bb851cc66f4fea6f74" => :sierra - sha256 "eecf056af8aa2b0062a5c6568a30c6f8e0120fbe5bdef718d5b30f76894e3f36" => :el_capitan - end - - depends_on "openmotif" - depends_on :x11 - - def install - system "make", "macosx", "MOTIFLINK='-lXm'" - system "make", "-C", "doc", "man", "doc" - - bin.install "source/nedit" - bin.install "source/nc" => "ncl" - - man1.install "doc/nedit.man" => "nedit.1x" - man1.install "doc/nc.man" => "ncl.1x" - (etc/"X11/app-defaults").install "doc/NEdit.ad" => "NEdit" - doc.install Dir["doc/*"] - end - - test do - system bin/"nedit", "-version" - system bin/"ncl", "-version" - end -end diff --git a/Formula/negfix8.rb b/Formula/negfix8.rb deleted file mode 100644 index 337b9bf82310b..0000000000000 --- a/Formula/negfix8.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Negfix8 < Formula - desc "Turn scanned negative images into positives" - homepage "https://sites.google.com/site/negfix" - url "https://sites.google.com/site/negfix/downloads/negfix8.3.tgz" - sha256 "2f360b0dd16ca986fbaebf5873ee55044cae591546b573bb17797cbf569515bd" - - bottle :unneeded - - depends_on "imagemagick" - - def install - bin.install "negfix8" - end - - test do - (testpath/".negfix8/frameprofile").write "1 1 1 1 1 1 1" - system "#{bin}/negfix8", "-u", "frameprofile", test_fixtures("test.tiff"), - "#{testpath}/output.tiff" - assert_predicate testpath/"output.tiff", :exist? - end -end diff --git a/Formula/neko.rb b/Formula/neko.rb deleted file mode 100644 index 9d041d022306c..0000000000000 --- a/Formula/neko.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Neko < Formula - desc "High-level, dynamically typed programming language" - homepage "https://nekovm.org/" - url "https://github.com/HaxeFoundation/neko/archive/v2-2-0/neko-2.2.0.tar.gz" - sha256 "cf101ca05db6cb673504efe217d8ed7ab5638f30e12c5e3095f06fa0d43f64e3" - revision 6 - head "https://github.com/HaxeFoundation/neko.git" - - bottle do - sha256 "e4d68665d504273468b38a5891c938d59080147677abfc718967e11eeb70ce5d" => :mojave - sha256 "396aea7bce27dcba88338f6698036c097864a172732742e04bfac4815fc7c7e7" => :high_sierra - sha256 "12be1d612bea5f7efbca986107ea498edec85d610e7df6abde68c95a07e5746c" => :sierra - sha256 "0054a53a378dc7ab95c74fff99f80a3bd15b927fe87204635b728a9bbdc2b866" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "bdw-gc" - depends_on "mbedtls" - depends_on "openssl" - depends_on "pcre" - - def install - # Let cmake download its own copy of MariaDBConnector during build and statically link it. - # It is because there is no easy way to define we just need any one of mariadb, mariadb-connector-c, - # mysql, and mysql-connector-c. - system "cmake", ".", "-G", "Ninja", "-DSTATIC_DEPS=MariaDBConnector", - "-DRELOCATABLE=OFF", "-DRUN_LDCONFIG=OFF", *std_cmake_args - system "ninja", "install" - end - - def caveats - s = "" - if HOMEBREW_PREFIX.to_s != "/usr/local" - s << <<~EOS - You must add the following line to your .bashrc or equivalent: - export NEKOPATH="#{HOMEBREW_PREFIX}/lib/neko" - EOS - end - s - end - - test do - ENV["NEKOPATH"] = "#{HOMEBREW_PREFIX}/lib/neko" - system "#{bin}/neko", "-version" - end -end diff --git a/Formula/neo4j.rb b/Formula/neo4j.rb deleted file mode 100644 index d7b8a6fd35615..0000000000000 --- a/Formula/neo4j.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Neo4j < Formula - desc "Robust (fully ACID) transactional property graph database" - homepage "https://neo4j.com/" - url "https://neo4j.com/artifact.php\?name\=neo4j-community-3.5.0-unix.tar.gz" - sha256 "a33df85dbdd22297d5bc9962bd42f7e70c3703ba3067b1adeaf5c18240944f37" - - bottle :unneeded - - # Upstream does not intend to provide Java 8+ support until 4.0 - # and there are various issues with running against newer Javas. - # https://github.com/neo4j/neo4j/issues/11728#issuecomment-387038804 - # https://github.com/neo4j/neo4j-browser/issues/671#issuecomment-346224754 - # https://github.com/Homebrew/homebrew-core/issues/31090 - depends_on :java => "1.8" - - def install - ENV["NEO4J_HOME"] = libexec - # Remove windows files - rm_f Dir["bin/*.bat"] - - # Install jars in libexec to avoid conflicts - libexec.install Dir["*"] - - # Symlink binaries - bin.install Dir["#{libexec}/bin/neo4j{,-shell,-import,-shared.sh,-admin}", "#{libexec}/bin/cypher-shell"] - bin.env_script_all_files(libexec/"bin", :NEO4J_HOME => ENV["NEO4J_HOME"]) - - # Adjust UDC props - # Suppress the empty, focus-stealing java gui. - (libexec/"conf/neo4j.conf").append_lines <<~EOS - wrapper.java.additional=-Djava.awt.headless=true - wrapper.java.additional.4=-Dneo4j.ext.udc.source=homebrew - EOS - end - - def post_install - (var/"log").mkpath - end - - plist_options :manual => "neo4j start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/neo4j - console - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/neo4j.log - StandardOutPath - #{var}/log/neo4j.log - - - EOS - end - - test do - ENV["NEO4J_HOME"] = libexec - ENV["NEO4J_LOG"] = testpath/"libexec/data/log/neo4j.log" - ENV["NEO4J_PIDFILE"] = testpath/"libexec/data/neo4j-service.pid" - mkpath testpath/"libexec/data/log" - assert_match /Neo4j .*is not running/i, shell_output("#{bin}/neo4j status", 3) - end -end diff --git a/Formula/neofetch.rb b/Formula/neofetch.rb deleted file mode 100644 index 25862d89a88cf..0000000000000 --- a/Formula/neofetch.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Neofetch < Formula - desc "Fast, highly customisable system info script" - homepage "https://github.com/dylanaraps/neofetch" - url "https://github.com/dylanaraps/neofetch/archive/5.0.0.tar.gz" - sha256 "2a4f4853bf83b88a037994dbc53a90c8bd5708f5eeb3392f56d4e49c49d995b3" - head "https://github.com/dylanaraps/neofetch.git" - - bottle do - cellar :any_skip_relocation - sha256 "c119a528c4d573c284c42512d3e6ef6bf781c05b730c608150998dc92b9eb099" => :mojave - sha256 "f87e12ccbe4ef1de1757f4f0d2f03c4aebee3db21d0f27cb2e54451f572f3836" => :high_sierra - sha256 "f87e12ccbe4ef1de1757f4f0d2f03c4aebee3db21d0f27cb2e54451f572f3836" => :sierra - sha256 "f87e12ccbe4ef1de1757f4f0d2f03c4aebee3db21d0f27cb2e54451f572f3836" => :el_capitan - end - - depends_on "imagemagick" - depends_on "screenresolution" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/neofetch", "--config", "none", "--color_blocks", "off", - "--disable", "wm", "de", "term", "gpu" - end -end diff --git a/Formula/neomutt.rb b/Formula/neomutt.rb deleted file mode 100644 index c230fa6d2d1c4..0000000000000 --- a/Formula/neomutt.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Neomutt < Formula - desc "E-mail reader with support for Notmuch, NNTP and much more" - homepage "https://neomutt.org/" - url "https://github.com/neomutt/neomutt/archive/neomutt-20180716.tar.gz" - sha256 "bd89826980b493ba312228c9c14ffe2403e268571aea6008c6dc7ed3848de200" - head "https://github.com/neomutt/neomutt.git" - - bottle do - sha256 "a6b1860ba4b48441468139da5d1dd3b17beef51797281eac8f7060317b114c43" => :mojave - sha256 "c7ae26b5c57241beb1cd32b878840935441f2655d4eb774d7ea381c4846f771c" => :high_sierra - sha256 "2bf5f6453b264880744c695a544e6f0c81dcea750dd1695039032557373cf2e1" => :sierra - sha256 "b72ed1a178545bed52a3436c86c9339a0727f7653519ed91da95be43b2a402a7" => :el_capitan - end - - depends_on "docbook-xsl" => :build - depends_on "gettext" - depends_on "gpgme" - depends_on "libidn" - depends_on "lmdb" - depends_on "notmuch" - depends_on "openssl" - depends_on "tokyo-cabinet" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "./configure", "--prefix=#{prefix}", - "--enable-gpgme", - "--gss", - "--lmdb", - "--notmuch", - "--sasl", - "--tokyocabinet", - "--with-ssl=#{Formula["openssl"].opt_prefix}", - "--with-ui=ncurses" - system "make", "install" - end - - test do - output = shell_output("#{bin}/neomutt -F /dev/null -Q debug_level") - assert_equal "debug_level=0", output.chomp - end -end diff --git a/Formula/neon.rb b/Formula/neon.rb deleted file mode 100644 index e912e983df001..0000000000000 --- a/Formula/neon.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Neon < Formula - desc "HTTP and WebDAV client library with a C interface" - homepage "https://web.archive.org/web/webdav.org/neon/" - url "https://mirrorservice.org/sites/distfiles.macports.org/neon/neon-0.30.2.tar.gz" - mirror "https://fossies.org/linux/www/neon-0.30.2.tar.gz" - sha256 "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca" - - bottle do - cellar :any - sha256 "804369c05d5d506da25ffeed64b7c7bbc136e9d9d685a788233937df898f5f10" => :mojave - sha256 "6866235177ca4c311257547ca644e50a5011d5bb60ef3631cfb42a01a0fb7df9" => :high_sierra - sha256 "6f44e5c1db3418612bf871f9551acef119162eac40585f045f02d2612ade356e" => :sierra - sha256 "2aafd9bf8e7fb42d8cce9b6a7467e8beccc11931b824766e341a8d72331e0c48" => :el_capitan - sha256 "7348fcda6d13a8cba37a98b7ac6c9876a2ffa037714954872832d390c5a475d7" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - # Configure switch unconditionally adds the -no-cpp-precomp switch - # to CPPFLAGS, which is an obsolete Apple-only switch that breaks - # builds under non-Apple compilers and which may or may not do anything - # anymore. - patch :DATA - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--enable-shared", - "--disable-static", - "--disable-nls", - "--with-ssl=openssl", - "--with-libs=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end -end - -__END__ -diff --git a/configure b/configure -index d7702d2..5c3b5a3 100755 ---- a/configure -+++ b/configure -@@ -4224,7 +4224,6 @@ fi - $as_echo "$ne_cv_os_uname" >&6; } - - if test "$ne_cv_os_uname" = "Darwin"; then -- CPPFLAGS="$CPPFLAGS -no-cpp-precomp" - LDFLAGS="$LDFLAGS -flat_namespace" - # poll has various issues in various Darwin releases - if test x${ac_cv_func_poll+set} != xset; then diff --git a/Formula/neopop-sdl.rb b/Formula/neopop-sdl.rb deleted file mode 100644 index 13c51307a1494..0000000000000 --- a/Formula/neopop-sdl.rb +++ /dev/null @@ -1,40 +0,0 @@ -class NeopopSdl < Formula - desc "NeoGeo Pocket emulator" - homepage "https://nih.at/NeoPop-SDL/" - url "https://nih.at/NeoPop-SDL/NeoPop-SDL-0.2.tar.bz2" - sha256 "2df1b717faab9e7cb597fab834dc80910280d8abf913aa8b0dcfae90f472352e" - - bottle do - cellar :any - sha256 "d84d1d9e2304a21ce915b8a65001a310da3c797e1f89e4d8a86a102e53f92f10" => :mojave - sha256 "9bdf06235151ae52d85e630021ce810d49ce12ba74e18b27f7584d9584377eb4" => :high_sierra - sha256 "3510d31984f2f46a59390617e2af3941638a4eb20a42131fc804e5d307cb5059" => :sierra - sha256 "e115fe849a0b8e1921a6c36c3d34fcc00b911f0504a0e32543656e76513384ad" => :el_capitan - sha256 "a8de30162f9e5146ee7c39480e83588f8036c0b965215e7ce1894c79855c8687" => :yosemite - end - - head do - url "https://hg.nih.at/NeoPop-SDL/", :using => :hg - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "ffmpeg" - end - - depends_on "libpng" - depends_on "sdl" - depends_on "sdl_net" - - def install - system "autoreconf", "-i" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - assert_equal "NeoPop (SDL) v0.71 (SDL-Version #{version})", shell_output("#{bin}/NeoPop-SDL -V").chomp - end -end diff --git a/Formula/neovim.rb b/Formula/neovim.rb deleted file mode 100644 index e50c6f4b2c315..0000000000000 --- a/Formula/neovim.rb +++ /dev/null @@ -1,200 +0,0 @@ -class Neovim < Formula - desc "Ambitious Vim-fork focused on extensibility and agility" - homepage "https://neovim.io/" - url "https://github.com/neovim/neovim/archive/v0.3.3.tar.gz" - sha256 "9280f68c02dfe632815ce8063a621c6d73a40da91d0a18e1cb3104c32d0e724b" - head "https://github.com/neovim/neovim.git" - - bottle do - sha256 "7013b33ab98e5f3f9e17ba5f7f6c3dec84b58323caa149b07c24d0c5678f90bb" => :mojave - sha256 "297d01669b0195a822476e14c2cc853de6bd97e57097464b5ade2aa0c8d5f6e0" => :high_sierra - sha256 "885aa132273e2f65ec748c1cf6d95e0c60724284fc381725bde9728ca99465d6" => :sierra - end - - depends_on "cmake" => :build - depends_on "lua@5.1" => :build - depends_on "luarocks" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "jemalloc" - depends_on "libtermkey" - depends_on "libuv" - depends_on "libvterm" - depends_on "luajit" - depends_on "msgpack" - depends_on "unibilium" - - resource "lpeg" do - url "https://luarocks.org/manifests/gvvaughan/lpeg-1.0.1-1.src.rock" - sha256 "149be31e0155c4694f77ea7264d9b398dd134eca0d00ff03358d91a6cfb2ea9d" - end - - resource "mpack" do - url "https://github.com/libmpack/libmpack-lua/releases/download/1.0.7/libmpack-lua-1.0.7.tar.gz" - sha256 "68565484a3441d316bd51bed1cacd542b7f84b1ecfd37a8bd18dd0f1a20887e8" - end - - resource "inspect" do - url "https://luarocks.org/manifests/kikito/inspect-3.1.1-0.src.rock" - sha256 "ea1f347663cebb523e88622b1d6fe38126c79436da4dbf442674208aa14a8f4c" - end - - resource "luabitop-rockspec" do - url "https://luarocks.org/manifests/luarocks/luabitop-1.0.2-3.rockspec" - sha256 "8cc12ebd2919b08765fef9f8738d2277204e8c6a7578e8e7f1abf6054380c21f" - end - - resource "luabitop" do - url "https://github.com/LuaDist/luabitop/archive/1.0.2.tar.gz" - sha256 "d5f2ada780397e9bf8f885b811abdb4f86b7e7e7ee827e744efcf672882f4398" - end - - resource "luafilesystem" do - url "https://luarocks.org/luafilesystem-1.7.0-2.src.rock" - sha256 "65e6d437e577a1d6cd509b6cd224d2cb9501d58d32a72cafbd4fd3f911681576" - end - - resource "penlight" do - url "https://stevedonovan.github.io/files/penlight-1.5.4.zip" - sha256 "1855dca3c05b348034df6a8c8784c35a0209e12d21fc4b5c9db84d7383480e8d" - end - - resource "lua_cliargs" do - url "https://luarocks.org/lua_cliargs-3.0-1.src.rock" - sha256 "d165b627b11dc83a11270d7d51760e5b714e3fd2388733c32af53e9b63bf27d4" - end - - resource "lua-term" do - url "https://github.com/hoelzro/lua-term/archive/0.07.tar.gz" - sha256 "c1a1d0c57107147ea02878a50b768d1c3c13aca2769b026c5bb7a84119607f30" - end - - resource "luasystem" do - url "https://luarocks.org/luasystem-0.2.1-0.src.rock" - sha256 "d1c706d48efc7279d33f5ea123acb4d27e2ee93e364bedbe07f2c9c8d0ad3d24" - end - - resource "dkjson" do - url "https://luarocks.org/dkjson-2.5-2.src.rock" - sha256 "0391ebe73cfcee7d6b3d5dd5098e185c2103118e644688484beea665f15fc9e3" - end - - resource "say" do - url "https://github.com/Olivine-Labs/say/archive/v1.3-1.tar.gz" - version "1.3-1" - sha256 "23e8cd378bb4ab1693279100a785acb2246418e3570b7de7d995b5847b3507ca" - end - - resource "luassert" do - url "https://github.com/Olivine-Labs/luassert/archive/v1.7.10.tar.gz" - sha256 "f9f8347727c2a4aa8af30d88a0de0314f04cd681b60430e24f6ec0ed393e12e1" - end - - resource "mediator_lua" do - url "https://github.com/Olivine-Labs/mediator_lua/archive/v1.1.2-0.tar.gz" - version "1.1.2-0" - sha256 "faf5859fd2081be4e9e4fb8873a2dc65f7eff3fd93d6dd14da65f8e123fcff9b" - end - - resource "busted" do - url "https://github.com/Olivine-Labs/busted/archive/v2.0.rc12-1.tar.gz" - version "2.0.rc12-1" - sha256 "c44286468babcc38e90f036d25471ab92f19a8a0a68482e0c45a9cfaeb1c0e35" - end - - resource "luacheck" do - url "https://luarocks.org/manifests/mpeterv/luacheck-0.21.2-1.src.rock" - version "0.21.2-1" - sha256 "c9e9b3bf1610e382043c6348417864541327108da92290a3be454c40be439953" - end - - resource "luv" do - url "https://luarocks.org/luv-1.9.1-1.src.rock" - sha256 "d72db8321d8b3be925e1c14e6c13081466d1c31420f600154ab5c77fe6974fac" - end - - resource "coxpcall" do - url "https://luarocks.org/coxpcall-1.17.0-1.src.rock" - version "1.17.0-1" - sha256 "11feb07f08927c39b0b93e8c0bbaf15433f86155cba4820a31a09f4754ab3258" - end - - resource "nvim-client" do - url "https://github.com/neovim/lua-client/archive/0.1.0-1.tar.gz" - version "0.1.0-1" - sha256 "d2254c70eab7e7b6d7dc07caffe06f1015897fc09fdfa4b33f0b3745e6b0d03c" - end - - def install - resources.each do |r| - r.stage(buildpath/"deps-build/build/src/#{r.name}") - end - - ENV.prepend_path "LUA_PATH", "#{buildpath}/deps-build/share/lua/5.1/?.lua" - ENV.prepend_path "LUA_CPATH", "#{buildpath}/deps-build/lib/lua/5.1/?.so" - lua_path = "--lua-dir=#{Formula["lua@5.1"].opt_prefix}" - - cd "deps-build" do - # penlight depends on luafilesystem - cd "build/src/luafilesystem" do - output = Utils.popen_read("luarocks", "unpack", lua_path, "luafilesystem-1.7.0-2.src.rock", "--tree=#{buildpath}/deps-build") - unpack_dir = output.split("\n")[-2] - cd unpack_dir do - system "luarocks", "make", lua_path, "--tree=#{buildpath}/deps-build" - end - end - - # busted depends on penlight - cd "build/src/penlight" do - system "luarocks", "make", lua_path, "--tree=#{buildpath}/deps-build" - end - - cp "build/src/luabitop-rockspec/luabitop-1.0.2-3.rockspec", "build/src/luabitop/" - cd "build/src/luabitop/" do - system "luarocks", "make", lua_path, "--tree=#{buildpath}/deps-build" - end - - %w[ - lpeg/lpeg-1.0.1-1.src.rock - mpack/mpack-1.0.7-0.rockspec - inspect/inspect-3.1.1-0.src.rock - lua_cliargs/lua_cliargs-3.0-1.src.rock - lua-term/lua-term-0.7-1.rockspec - luasystem/luasystem-0.2.1-0.src.rock - dkjson/dkjson-2.5-2.src.rock - say/say-1.3-1.rockspec - luassert/luassert-1.7.10-0.rockspec - mediator_lua/mediator_lua-1.1.2-0.rockspec - busted/busted-2.0.rc12-1.rockspec - luacheck/luacheck-0.21.2-1.src.rock - luv/luv-1.9.1-1.src.rock - coxpcall/coxpcall-1.17.0-1.src.rock - nvim-client/nvim-client-0.1.0-1.rockspec - ].each do |rock| - dir, rock = rock.split("/") - cd "build/src/#{dir}" do - output = Utils.popen_read("luarocks", "unpack", lua_path, rock, "--tree=#{buildpath}/deps-build") - unpack_dir = output.split("\n")[-2] - cd unpack_dir do - system "luarocks", "make", lua_path, "--tree=#{buildpath}/deps-build" - end - end - end - - system "cmake", "../third-party", "-DUSE_BUNDLED=OFF", *std_cmake_args - system "make" - end - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.txt").write("Hello World from Vim!!") - system bin/"nvim", "--headless", "-i", "NONE", "-u", "NONE", - "+s/Vim/Neovim/g", "+wq", "test.txt" - assert_equal "Hello World from Neovim!!", (testpath/"test.txt").read.chomp - end -end diff --git a/Formula/nesc.rb b/Formula/nesc.rb deleted file mode 100644 index da91428c4a33a..0000000000000 --- a/Formula/nesc.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Nesc < Formula - desc "Programming language for deeply networked systems" - homepage "https://github.com/tinyos/nesc" - url "https://github.com/tinyos/nesc/archive/v1.4.0.tar.gz" - sha256 "ea9a505d55e122bf413dff404bebfa869a8f0dd76a01a8efc7b4919c375ca000" - - bottle do - cellar :any_skip_relocation - sha256 "4343650dbcaf2e7d0cf5e886054a5d61cb9660b72f8e79f24a04b15b53a75c4a" => :mojave - sha256 "9dd650a7f3697a4e59216e992b4d9cac4d2bb3254d8d6f547774fcf895f7e3ee" => :high_sierra - sha256 "18e2b390839870bda5cae2840be9228e4792ba7f4784a9bb7d7d2573dd228f2c" => :sierra - sha256 "9bb55ca81ee1ecbed59220ced5045e25b2641dbf24c330f85bfa4c21dbe483fa" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on :java => :build - - def install - # nesc is unable to build in parallel because multiple emacs instances - # lead to locking on the same file - ENV.deparallelize - - system "./Bootstrap" - system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/nestopia-ue.rb b/Formula/nestopia-ue.rb deleted file mode 100644 index e8cbccc3ebecc..0000000000000 --- a/Formula/nestopia-ue.rb +++ /dev/null @@ -1,37 +0,0 @@ -class NestopiaUe < Formula - desc "Nestopia UE (Undead Edition): NES emulator" - homepage "http://0ldsk00l.ca/nestopia/" - url "https://downloads.sourceforge.net/project/nestopiaue/1.49/nestopia-1.49.tgz" - sha256 "653e6a39376b883196a32926691aef0071cc881d3256d2f0394c248a010560ba" - head "https://github.com/rdanbrook/nestopia.git" - - bottle do - sha256 "8c13d064015561a0707b4f47989d193527773af0021cbae1120b53d6a688ad20" => :mojave - sha256 "2be015b071a5d17bd3a28aa2348949eeb91659c94efa12226adff66e8934356d" => :high_sierra - sha256 "148a7754f387640b112f447327d23322e9d43b938d7aba9a584c311850fc284c" => :sierra - sha256 "43b5dd65950c2bf19aebbb77f307e96933557597379b83023fd3914a26d4666c" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libao" - depends_on "libarchive" - depends_on "libepoxy" - depends_on "sdl2" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--datarootdir=#{pkgshare}" - system "make", "install" - end - - test do - assert_match /Nestopia UE #{version}$/, shell_output("#{bin}/nestopia --version") - end -end diff --git a/Formula/net-snmp.rb b/Formula/net-snmp.rb deleted file mode 100644 index d97742e4de6d0..0000000000000 --- a/Formula/net-snmp.rb +++ /dev/null @@ -1,54 +0,0 @@ -class NetSnmp < Formula - desc "Implements SNMP v1, v2c, and v3, using IPv4 and IPv6" - homepage "http://www.net-snmp.org/" - url "https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.8/net-snmp-5.8.tar.gz" - sha256 "b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf" - - bottle do - sha256 "09d497fa5910198db3a3834d097df9f1069b8f211cb38b57b9ac78738fad9272" => :mojave - sha256 "05d9e1c66150e58af4a5c4167193551684b8bd06bfbbe0320a2ac4bf33099544" => :high_sierra - sha256 "366c28c25db9b040e115850a606c1859e7c61b3efd9ad4580fe57d7464065ee1" => :sierra - sha256 "00d85edcab504df6828344a70d1b4d8eddfce656ef379144e49bf52d55572863" => :el_capitan - end - - keg_only :provided_by_macos - - depends_on "openssl" - - def install - # https://sourceforge.net/p/net-snmp/bugs/2504/ - # I suspect upstream will fix this in the first post-Mojave release but - # if it's not fixed in that release this should be reported upstream. - (buildpath/"include/net-snmp/system/darwin18.h").write <<~EOS - #include - EOS - - args = %W[ - --disable-debugging - --prefix=#{prefix} - --enable-ipv6 - --with-defaults - --with-persistent-directory=#{var}/db/net-snmp - --with-logfile=#{var}/log/snmpd.log - --with-mib-modules=host\ ucd-snmp/diskio - --without-rpm - --without-kmem-usage - --disable-embedded-perl - --without-perl-modules - --with-openssl=#{Formula["openssl"].opt_prefix} - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - def post_install - (var/"db/net-snmp").mkpath - (var/"log").mkpath - end - - test do - assert_match version.to_s, shell_output("#{bin}/snmpwalk -V 2>&1") - end -end diff --git a/Formula/netcat.rb b/Formula/netcat.rb deleted file mode 100644 index 7c1facc15fcb1..0000000000000 --- a/Formula/netcat.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Netcat < Formula - desc "Utility for managing network connections" - homepage "https://netcat.sourceforge.io/" - url "https://downloads.sourceforge.net/project/netcat/netcat/0.7.1/netcat-0.7.1.tar.bz2" - sha256 "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "3ac133de6b67a147954d78b9bd0c4c4cf4e0f43bdbbb98f51d8d962bb752d973" => :mojave - sha256 "879d9c32f09e9ef31cb672983707f9d95341f6639bb8a4db54d7a6ea0878b946" => :high_sierra - sha256 "9027fd429d5407fba0b3206bd0cd198c669f4744155efcf8e0dbdd6ba69b6d34" => :sierra - sha256 "1f346605e0236ea7880258da2abf0bde1d7d8d8735a07d6d32feaf12425ff6da" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}" - system "make", "install" - man1.install_symlink "netcat.1" => "nc.1" - end - - test do - output = pipe_output("#{bin}/nc google.com 80", "GET / HTTP/1.0\r\n\r\n") - assert_equal "HTTP/1.0 200 OK", output.lines.first.chomp - end -end diff --git a/Formula/netcat6.rb b/Formula/netcat6.rb deleted file mode 100644 index f7926d76605d1..0000000000000 --- a/Formula/netcat6.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Netcat6 < Formula - desc "Rewrite of netcat that supports IPv6, plus other improvements" - homepage "https://www.deepspace6.net/projects/netcat6.html" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/n/nc6/nc6_1.0.orig.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/n/nc6/nc6_1.0.orig.tar.gz" - sha256 "db7462839dd135ff1215911157b666df8512df6f7343a075b2f9a2ef46fe5412" - - bottle do - rebuild 1 - sha256 "aba098730e397f84b6ed7534b41bd7f65f5f6182189d890ac93216faff2fe9b7" => :mojave - sha256 "b3fe44c42b33bc668cdaa0f05eb10a5f9b67891b1947b98abe9cad6464182835" => :high_sierra - sha256 "bdb853a9a63a03555682eae734d9d9a7725591dfd16128cf59f208968ef16ef2" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - out = pipe_output("#{bin}/nc6 www.google.com 80", "GET / HTTP/1.0\r\n\r\n") - assert_equal "HTTP/1.0 200 OK", out.lines.first.chomp - end -end diff --git a/Formula/netcdf.rb b/Formula/netcdf.rb deleted file mode 100644 index 0c3ff0de54733..0000000000000 --- a/Formula/netcdf.rb +++ /dev/null @@ -1,141 +0,0 @@ -class Netcdf < Formula - desc "Libraries and data formats for array-oriented scientific data" - homepage "https://www.unidata.ucar.edu/software/netcdf" - url "https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.6.2.tar.gz" - sha256 "c37525981167b3cd82d32e1afa3022afb94e59287db5f116c57f5ed4d9c6a638" - - bottle do - sha256 "2b607ef71b2f630e73441ed17dc9c40bc7dd9cc726c60563c61445d384ec0c2f" => :mojave - sha256 "01ff7533d32cba92da675b1307c97338bee30adc093c8fa222353df896aa645c" => :high_sierra - sha256 "bf00eb6cbc31d9e58c63c06724f92b5cd6110c9590659e0aa809e4b999f9abbd" => :sierra - end - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - depends_on "hdf5" - - resource "cxx" do - url "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.0.tar.gz" - sha256 "25da1c97d7a01bc4cee34121c32909872edd38404589c0427fefa1301743f18f" - end - - resource "cxx-compat" do - url "https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" - mirror "https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-cxx-4.2.tar.gz" - sha256 "95ed6ab49a0ee001255eac4e44aacb5ca4ea96ba850c08337a3e4c9a0872ccd1" - end - - resource "fortran" do - url "https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.4.4.tar.gz" - mirror "https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-fortran-4.4.4.tar.gz" - sha256 "b2d395175f8d283e68c8be516e231a96b191ade67ad0caafaf7fa01b1e6b5d75" - end - - def install - ENV.deparallelize - - common_args = std_cmake_args << "-DBUILD_TESTING=OFF" - - mkdir "build" do - args = common_args.dup - args << "-DENABLE_TESTS=OFF" - args << "-DNC_EXTRA_DEPS=-lmpi" if Tab.for_name("hdf5").with? "mpi" - args << "-DENABLE_DAP_AUTH_TESTS=OFF" << "-DENABLE_NETCDF_4=ON" << "-DENABLE_DOXYGEN=OFF" - - system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *args - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *args - system "make" - lib.install "liblib/libnetcdf.a" - end - - # Add newly created installation to paths so that binding libraries can - # find the core libs. - args = common_args.dup << "-DNETCDF_C_LIBRARY=#{lib}" - - cxx_args = args.dup - cxx_args << "-DNCXX_ENABLE_TESTS=OFF" - resource("cxx").stage do - mkdir "build-cxx" do - system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *cxx_args - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *cxx_args - system "make" - lib.install "cxx4/libnetcdf-cxx4.a" - end - end - - fortran_args = args.dup - fortran_args << "-DENABLE_TESTS=OFF" - resource("fortran").stage do - mkdir "build-fortran" do - system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *fortran_args - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *fortran_args - system "make" - lib.install "fortran/libnetcdff.a" - end - end - - ENV.prepend "CPPFLAGS", "-I#{include}" - ENV.prepend "LDFLAGS", "-L#{lib}" - resource("cxx-compat").stage do - system "./configure", "--disable-dependency-tracking", - "--enable-shared", - "--enable-static", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - # SIP causes system Python not to play nicely with @rpath - libnetcdf = (lib/"libnetcdf.dylib").readlink - %w[libnetcdf-cxx4.dylib libnetcdf_c++.dylib].each do |f| - macho = MachO.open("#{lib}/#{f}") - macho.change_dylib("@rpath/#{libnetcdf}", - "#{lib}/#{libnetcdf}") - macho.write! - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "netcdf_meta.h" - int main() - { - printf(NC_VERSION); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lnetcdf", - "-o", "test" - assert_equal `./test`, version.to_s - - (testpath/"test.f90").write <<~EOS - program test - use netcdf - integer :: ncid, varid, dimids(2) - integer :: dat(2,2) = reshape([1, 2, 3, 4], [2, 2]) - call check( nf90_create("test.nc", NF90_CLOBBER, ncid) ) - call check( nf90_def_dim(ncid, "x", 2, dimids(2)) ) - call check( nf90_def_dim(ncid, "y", 2, dimids(1)) ) - call check( nf90_def_var(ncid, "data", NF90_INT, dimids, varid) ) - call check( nf90_enddef(ncid) ) - call check( nf90_put_var(ncid, varid, dat) ) - call check( nf90_close(ncid) ) - contains - subroutine check(status) - integer, intent(in) :: status - if (status /= nf90_noerr) call abort - end subroutine check - end program test - EOS - system "gfortran", "test.f90", "-L#{lib}", "-I#{include}", "-lnetcdff", - "-o", "testf" - system "./testf" - end -end diff --git a/Formula/netdata.rb b/Formula/netdata.rb deleted file mode 100644 index c47678d360ba4..0000000000000 --- a/Formula/netdata.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Netdata < Formula - desc "Distributed real-time performance and health monitoring" - homepage "https://my-netdata.io/" - url "https://github.com/netdata/netdata/releases/download/v1.11.1/netdata-v1.11.1.tar.gz" - sha256 "0150b2a060da0e5cc844bd9540d6704cd352c434ea1bb9d5268131830a815736" - - bottle do - sha256 "5c7c86d146d3d73fa791f30014242ed796a38809a3301a88f62555b8b20eb8bf" => :mojave - sha256 "c577f25eaf5ae01cabcb62c428a2b1806be2f55f919d2fb5fe8c26e1b4957b4a" => :high_sierra - sha256 "2523906ac43fe8bb4407efeee529744b5842c01113aa9f551d5f065e1376eeb7" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "ossp-uuid" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - system "make", "install" - - (etc/"netdata").install "system/netdata.conf" - end - - def post_install - config = etc/"netdata/netdata.conf" - inreplace config do |s| - s.gsub!(/web files owner = .*/, "web files owner = #{ENV["USER"]}") - s.gsub!(/web files group = .*/, "web files group = #{Etc.getgrgid(prefix.stat.gid).name}") - end - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/sbin/netdata -D" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - ProgramArguments - - #{opt_sbin}/netdata - -D - - WorkingDirectory - #{var} - - - EOS - end - - test do - system "#{sbin}/netdata", "-W", "set", "registry", "netdata unique id file", - "#{testpath}/netdata.unittest.unique.id", - "-W", "unittest" - end -end diff --git a/Formula/nethack.rb b/Formula/nethack.rb deleted file mode 100644 index 2783be4955f2c..0000000000000 --- a/Formula/nethack.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Nethack the way God intended it to be played: from a terminal. - -class Nethack < Formula - desc "Single-player roguelike video game" - homepage "https://www.nethack.org/" - url "https://www.nethack.org/download/3.6.1/nethack-361-src.tgz" - version "3.6.1" - sha256 "4b8cbf1cc3ad9f6b9bae892d44a9c63106d44782a210906162a7c3be65040ab6" - head "https://git.code.sf.net/p/nethack/NetHack.git", :branch => "NetHack-3.6.1" - - bottle do - sha256 "a6edc4d29cc966b69a6ebc87048d4a27475465a9c1a251908edf45718da02ef5" => :mojave - sha256 "a57fbc5bdea2350dc989315ca1366da7778496421fd1962ceca266897754b2cf" => :high_sierra - sha256 "57db6043731411211c6de280e66c98394f0b13db000f26749afb243bf0211289" => :sierra - sha256 "fe8264cd2c58b19c58b4192f1eb74fe8e44f503885a300ef1cba71c402abe4d3" => :el_capitan - end - - # Don't remove save folder - skip_clean "libexec/save" - - def install - # Build everything in-order - ENV.deparallelize - - # Generate makefiles for OS X - cd "sys/unix" do - if MacOS.version >= :yosemite - hintfile = "macosx10.10" - elsif MacOS.version >= :lion - hintfile = "macosx10.7" - else - hintfile = "macosx10.5" - end - - inreplace "hints/#{hintfile}", - /^HACKDIR=.*/, - "HACKDIR=#{libexec}" - - system "sh", "setup.sh", "hints/#{hintfile}" - end - - # Enable wizard mode for all users - inreplace "sys/unix/sysconf", - /^WIZARDS=.*/, - "WIZARDS=*" - - # Make the game - system "make", "install" - bin.install "src/nethack" - (libexec+"save").mkpath - - # Enable `man nethack` - man6.install "doc/nethack.6" - - # These need to be group-writable in multi-user situations - chmod "g+w", libexec - chmod "g+w", libexec+"save" - end -end diff --git a/Formula/nethacked.rb b/Formula/nethacked.rb deleted file mode 100644 index a95ac9c856355..0000000000000 --- a/Formula/nethacked.rb +++ /dev/null @@ -1,91 +0,0 @@ -require "etc" - -# Bugfixed and interface-patched Nethack. -# -# This formula is based on the Nethack formula, and includes the -# patches from same. The original notes from the Nethack formula -# follow: -# - @jterk -# -# Nethack the way God intended it to be played: from a terminal. -# This build script was created referencing: -# * https://nethackwiki.com/wiki/Compiling#On_Mac_OS_X -# * https://nethackwiki.com/wiki/Pkgsrc#patch-ac_.28system.h.29 -# and copious hacking until things compiled. -# -# The patch applied incorporates the patch-ac above, the OS X -# instructions from the Wiki, and whatever else needed to be -# done. -# - @adamv - -class Nethacked < Formula - desc "Bugfixed and interface-patched Nethack" - homepage "https://nethacked.github.io/" - url "https://github.com/nethacked/nethacked/archive/1.0.tar.gz" - sha256 "4e3065a7b652d5fc21577e0b7ac3a60513cd30f4ee81c7f11431a71185b609aa" - - bottle do - sha256 "77cec385d3ab1ba8c9d4ef1234d25a42a7aff77c9db2158fad7820f677a67cc0" => :mojave - sha256 "4fe2af842c20dc95f4ae5bebcffed0b85da6a94a548b0d5f8115d1829c80e3cc" => :high_sierra - sha256 "d2c880eb02b32bc6a976b16502f400a94b395375b5cd59e731fb209580e3ceee" => :sierra - sha256 "dcbe9a404fb0215e35dc9d08e73595ba8dadad55e6ca898078a66ce04c9dc11b" => :el_capitan - sha256 "08b24568c94b14271e5d1b2880a0a78e6eea5cbbabfb9519347b5be1d2cc0893" => :yosemite - end - - # Don't remove save folder - skip_clean "libexec/save" - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b40e459/nethacked/1.0.patch" - sha256 "d32bed5e7b4500515135270d72077bab49534abbdc60d8d040473fbee630f90f" - end - - def install - # Build everything in-order; no multi builds. - ENV.deparallelize - - # Symlink makefiles - system "sh", "sys/unix/setup.sh" - - inreplace "include/config.h", - /^#\s*define HACKDIR.*$/, - "#define HACKDIR \"#{libexec}\"" - - # Enable wizard mode for the current user - wizard = Etc.getpwuid.name - - inreplace "include/config.h", - /^#\s*define\s+WIZARD\s+"wizard"/, - "#define WIZARD \"#{wizard}\"" - - inreplace "include/config.h", - /^#\s*define\s+WIZARD_NAME\s+"wizard"/, - "#define WIZARD_NAME \"#{wizard}\"" - - cd "dat" do - # Make the data first, before we munge the CFLAGS - system "make" - %w[perm logfile].each do |f| - touch f - libexec.install f - end - - # Stage the data - libexec.install %w[help hh cmdhelp history opthelp wizhelp dungeon license data oracles options rumors quest.dat] - libexec.install Dir["*.lev"] - end - - # Make the game - ENV.append_to_cflags "-I../include" - cd "src" do - system "make" - end - - bin.install "src/nethacked" - (libexec+"save").mkpath - - # These need to be group-writable in multi-user situations - chmod "g+w", libexec - chmod "g+w", libexec+"save" - end -end diff --git a/Formula/nethogs.rb b/Formula/nethogs.rb deleted file mode 100644 index df21dd794d447..0000000000000 --- a/Formula/nethogs.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Nethogs < Formula - desc "Net top tool grouping bandwidth per process" - homepage "https://raboof.github.io/nethogs/" - url "https://github.com/raboof/nethogs/archive/v0.8.5.tar.gz" - sha256 "6a9392726feca43228b3f0265379154946ef0544c2ca2cac59ec35a24f469dcc" - - bottle do - cellar :any_skip_relocation - sha256 "a43516ede7e2046c39f1984e4afaee53a3705a81d78491827e33a6a3f631bed8" => :mojave - sha256 "b70632b33aeb7f23c93cbd27cdb36d49382f3619684c32b60c76129a5d64195e" => :high_sierra - sha256 "25731b08cad9b8f5a420172bab21d6986d49ee7044cbdd3a7717c6b10ee8da8d" => :sierra - sha256 "f133cdfd28bd88778241a607fda39d17419d8aaf24fd6de49d8a086e112fc7bf" => :el_capitan - sha256 "aa00775f5f8add09c031b13d3ec2575b082da47aa573e869288b28cad879f431" => :yosemite - sha256 "3652cadd0558c01c522e586a483b03b95badf98028ab3b7f9a227f8bae275def" => :mavericks - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Using -V because other nethogs commands need to be run as root - system sbin/"nethogs", "-V" - end -end diff --git a/Formula/netpbm.rb b/Formula/netpbm.rb deleted file mode 100644 index 9bb8ce31d656f..0000000000000 --- a/Formula/netpbm.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Netpbm < Formula - desc "Image manipulation" - homepage "https://netpbm.sourceforge.io/" - # Maintainers: Look at https://sourceforge.net/p/netpbm/code/HEAD/tree/ - # for stable versions and matching revisions. - url "http://svn.code.sf.net/p/netpbm/code/stable", :revision => 3459 - version "10.73.24" - version_scheme 1 - head "http://svn.code.sf.net/p/netpbm/code/trunk" - - bottle do - cellar :any - sha256 "6759f09dd406949059bab04a38b4e697cdfd1184aed2f26b11a306e3283b098e" => :mojave - sha256 "6ab5e513e4bf75ae40907a042d119d5816f40c97ac3c34cfe5981208f1d55dde" => :high_sierra - sha256 "339679dc504fe630c341c12d96386bc8a0456dc89cf3459166b31ebb8c039e0a" => :sierra - end - - depends_on "jasper" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - conflicts_with "jbigkit", :because => "both install `pbm.5` and `pgm.5` files" - - def install - # Fix file not found errors for /usr/lib/system/libsystem_symptoms.dylib and - # /usr/lib/system/libsystem_darwin.dylib on 10.11 and 10.12, respectively - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - cp "config.mk.in", "config.mk" - - inreplace "config.mk" do |s| - s.remove_make_var! "CC" - s.change_make_var! "CFLAGS_SHLIB", "-fno-common" - s.change_make_var! "NETPBMLIBTYPE", "dylib" - s.change_make_var! "NETPBMLIBSUFFIX", "dylib" - s.change_make_var! "LDSHLIB", "--shared -o $(SONAME)" - s.change_make_var! "TIFFLIB", "-ltiff" - s.change_make_var! "JPEGLIB", "-ljpeg" - s.change_make_var! "PNGLIB", "-lpng" - s.change_make_var! "ZLIB", "-lz" - s.change_make_var! "JASPERLIB", "-ljasper" - s.change_make_var! "JASPERHDR_DIR", "#{Formula["jasper"].opt_include}/jasper" - end - - ENV.deparallelize - system "make" - system "make", "package", "pkgdir=#{buildpath}/stage" - - cd "stage" do - inreplace "pkgconfig_template" do |s| - s.gsub! "@VERSION@", File.read("VERSION").sub("Netpbm ", "").chomp - s.gsub! "@LINKDIR@", lib - s.gsub! "@INCLUDEDIR@", include - end - - prefix.install %w[bin include lib misc] - # do man pages explicitly; otherwise a junk file is installed in man/web - man1.install Dir["man/man1/*.1"] - man5.install Dir["man/man5/*.5"] - lib.install Dir["link/*.a"], Dir["link/*.dylib"] - (lib/"pkgconfig").install "pkgconfig_template" => "netpbm.pc" - end - - (bin/"doc.url").unlink - end - - test do - fwrite = Utils.popen_read("#{bin}/pngtopam #{test_fixtures("test.png")} -alphapam") - (testpath/"test.pam").write fwrite - system "#{bin}/pamdice", "test.pam", "-outstem", testpath/"testing" - assert_predicate testpath/"testing_0_0.", :exist? - end -end diff --git a/Formula/netperf.rb b/Formula/netperf.rb deleted file mode 100644 index d4d0c525c0616..0000000000000 --- a/Formula/netperf.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Netperf < Formula - desc "Benchmarks performance of many different types of networking" - homepage "https://hewlettpackard.github.io/netperf/" - url "https://github.com/HewlettPackard/netperf/archive/netperf-2.7.0.tar.gz" - sha256 "4569bafa4cca3d548eb96a486755af40bd9ceb6ab7c6abd81cc6aa4875007c4e" - head "https://github.com/HewlettPackard/netperf.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cdd840b5e300383245d703973fcd238d58b4bd89d2ae3ba6769db297b2ddb1f9" => :mojave - sha256 "cf086e0d276a572aba8318f7080cedc94b36a7b612cdbb4bcc3ceefef0080c53" => :high_sierra - sha256 "4d3f648081c84ad697d608b56bcfce3237de7c34c4e4a53d9851628f9d50cd5d" => :sierra - sha256 "c6e96625b1f83a7f83d3c9b53b8584ab65d73cfd59bc38672588ba82d37ecc1d" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/netperf -h | cat" - end -end diff --git a/Formula/netris.rb b/Formula/netris.rb deleted file mode 100644 index c0965734cad8f..0000000000000 --- a/Formula/netris.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Netris < Formula - desc "Networked variant of tetris" - homepage "https://web.archive.org/web/20071223041235/www.netris.be/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/n/netris/netris_0.52.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/n/netris/netris_0.52.orig.tar.gz" - sha256 "8bc770ebb2c3ead1611ca7a1a2f3d833e169536c78d53b3fcf49381164ee9706" - - bottle do - cellar :any_skip_relocation - sha256 "25697a4b18177f5e976dd5510b68cac949a589a7c9abe2e2d148b930db0d1f89" => :mojave - sha256 "2ba4eea757cc21504d1da74796a29fcd23264b5d735c0c6debe1083614c2d57a" => :high_sierra - sha256 "4ac49c49b3d000fcb5c9161f4b217231e9bee9faf29d5e4e7fc9f5d8e10772ec" => :sierra - sha256 "0e793cab922cded47c3eccbf4e9ba8840a71f24830d7e01da8e2262d08d61c56" => :el_capitan - sha256 "1a1e54ff92dd1e8ecd745e149874071cb6e67662296c96d84538cf71b65b9bfe" => :yosemite - end - - # Debian has been applying fixes and security patches, so let's re-use their work. - # Also fixes case of "TERM=xterm-color256" which otherwise segfaults. - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/01_multi-games-with-scoring" - sha256 "5d5182afc06fbb6d011edfaa0c12e88425884019372f95faee563b760d03e556" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/02_line-count-patch" - sha256 "c31de57729cfde1ec72e49fd0ee1984cfffc179eb3d16b1268853e14e827b71f" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/03_staircase-effect-fix" - sha256 "df17bd23186c3d0379d298ac2e526ff40c7cdcebbe174c2bf2f08aa067abb4c7" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/04_robot-close-fixup" - sha256 "8c79a8925357b57b07d4afa8a2ef048528f4ca19e25851637fd6f20f93ea7ae4" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/05_init-static-vars" - sha256 "5b057390f6736c0d5c1d2b149c6550fb322358544641dc89d358c4c275a17724" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/06_curses.c-include-term.h" - sha256 "9f0b631dcfcf2114ea1c70a599df401aafa21fb73423fa98783d01ac9a0845dc" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/07_curses.c-include-time.h" - sha256 "b53bd8af4f09661ed9030baf52456595f3b4149966c2e3111c91305957a94a52" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/08_various-fixes" - sha256 "8c9f709c115d8acf4af04e6dd60d75f2c7ecda2f9708aca2a2848966ec6999db" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/09_ipv6" - sha256 "cf6c216cd4381a82945b441e2ad659120643126f52a89f745a9692fc708e8261" - end - - patch do - url "http://git.deb.at/w/pkg/netris.git/blob_plain/90991bd0137a2510f93ec126a8642f48eb3738be:/debian/patches/10_fix-memory-leak" - sha256 "380566f670b90585943a2f3c69fdb83bae04d0e62cc457bb8d7558f393f6b874" - end - - def install - system "sh", "Configure" - system "make" - bin.install "netris" - end - - test do - assert_match "Netris version #{version}", shell_output("#{bin}/netris -H 2>&1") - end -end diff --git a/Formula/nettle.rb b/Formula/nettle.rb deleted file mode 100644 index 38dc72671ede0..0000000000000 --- a/Formula/nettle.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Nettle < Formula - desc "Low-level cryptographic library" - homepage "https://www.lysator.liu.se/~nisse/nettle/" - url "https://ftp.gnu.org/gnu/nettle/nettle-3.4.1.tar.gz" - mirror "https://ftpmirror.gnu.org/nettle/nettle-3.4.1.tar.gz" - sha256 "f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad" - - bottle do - cellar :any - sha256 "9e7f78a4cc96ca57f75ca1d37cc12c11655b7e0aa7109da4becd0408a1e2ed6b" => :mojave - sha256 "4327e8e4c4760653113f0bc4a7b0bada37b2d820f6c3ba759832e59ed553cb9a" => :high_sierra - sha256 "4624e3b0964d695408cf45330bab8cda2536002834f96202f7a37007407123fd" => :sierra - end - - depends_on "gmp" - - def install - # macOS doesn't use .so libs. Emailed upstream 04/02/2016. - inreplace "testsuite/dlopen-test.c", "libnettle.so", "libnettle.dylib" - - # The LLVM shipped with Xcode/CLT 10+ compiles binaries/libraries with - # ___chkstk_darwin, which upsets nettle's expected symbol check. - # https://github.com/Homebrew/homebrew-core/issues/28817#issuecomment-396762855 - # https://lists.lysator.liu.se/pipermail/nettle-bugs/2018/007300.html - if DevelopmentTools.clang_build_version >= 1000 - inreplace "testsuite/symbols-test", "get_pc_thunk", - "get_pc_thunk|(_*chkstk_darwin)" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-shared" - system "make" - system "make", "install" - system "make", "check" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - struct sha1_ctx ctx; - uint8_t digest[SHA1_DIGEST_SIZE]; - unsigned i; - - sha1_init(&ctx); - sha1_update(&ctx, 4, "test"); - sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest); - - printf("SHA1(test)="); - - for (i = 0; i :mojave - sha256 "0349c1335e428d5f0b620043259908b5af60feed84d9dea911033e0d65704488" => :high_sierra - sha256 "49ad705043bdd9f1ab860d877d3ffba584bef5ddbd4c03f6fe43adc49b9c1e5d" => :sierra - sha256 "c8208683e4730233147e6c7153a469cdc1f477aacde0559937f0da93c8ad0345" => :el_capitan - sha256 "78038d253cd382f5f3a6b3b12c7776828c44c1572f0569bec862763aa5141c2a" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /netToe #{version} /, shell_output("#{bin}/nettoe -v") - end -end diff --git a/Formula/newlisp.rb b/Formula/newlisp.rb deleted file mode 100644 index c049aa7a46484..0000000000000 --- a/Formula/newlisp.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Newlisp < Formula - desc "Lisp-like, general-purpose scripting language" - homepage "http://www.newlisp.org/" - url "http://www.newlisp.org/downloads/newlisp-10.7.1.tgz" - sha256 "2e300c8bed365a564d284bf3ad6c49e036256e7fc3f469ebda0b45e6e196a7cc" - - bottle do - sha256 "2b05f3886282f344830370be7e8e127850c058779e17c3cf932df9f31437c716" => :mojave - sha256 "c8b7b1204c175e91cf29f9783fab02e70692de90007cc5a393cfe0345b9d669f" => :high_sierra - sha256 "d3d16b3e31f7c47b467a94dc502385b38d4f137afce726a996576c685c557231" => :sierra - sha256 "8ec256c413e06d36004f36658abb28e9c71528b46496e46cfc65aab247df58ed" => :el_capitan - sha256 "4993d9b9cb6b081d9b0790fbd9095af3f68f82afbaccc09d187399585bebd1b5" => :yosemite - end - - depends_on "readline" - - def install - # Required to use our configuration - ENV.append_to_cflags "-DNEWCONFIG -c" - - # fix the prefix in a source file - inreplace "guiserver/newlisp-edit.lsp" do |s| - s.gsub! "#!/usr/local/bin/newlisp", "#!/usr/bin/env newlisp" - s.gsub! "/usr/local/bin/newlisp", "#{opt_bin}/newlisp" - end - - system "./configure-alt", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "check" - system "make", "install" - end - - def caveats; <<~EOS - If you have brew in a custom prefix, the included examples - will need to be be pointed to your newlisp executable. - EOS - end - - test do - path = testpath/"test.lsp" - path.write <<~EOS - (println "hello") - (exit 0) - EOS - - assert_equal "hello\n", shell_output("#{bin}/newlisp #{path}") - end -end diff --git a/Formula/newsboat.rb b/Formula/newsboat.rb deleted file mode 100644 index 7e2edd9c1e9f3..0000000000000 --- a/Formula/newsboat.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Newsboat < Formula - desc "RSS/Atom feed reader for text terminals" - homepage "https://newsboat.org/" - url "https://github.com/newsboat/newsboat/archive/r2.14.tar.gz" - sha256 "57176071b0c777ddba237f95f684e36bf2ddf271e84ac5c9e3eec8f1afc0b133" - head "https://github.com/newsboat/newsboat.git" - - bottle do - sha256 "a9ea0ec030fa5247224ad2aaf39d355d1b89251e1786d9bd457e1773aabd9478" => :mojave - sha256 "3b626ed21880078c5de05fd69e7228d45b30427e88b05ca797f5f48c1319a33a" => :high_sierra - sha256 "c150c11f1f1d6b500e863403ab3d6fda66af62fc6507edeca8fbfbc1f1577107" => :sierra - end - - depends_on "asciidoc" => :build - depends_on "docbook-xsl" => :build - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "gettext" - depends_on "json-c" - depends_on "libstfl" - - needs :cxx11 - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - system "make", "install", "prefix=#{prefix}" - end - - test do - (testpath/"urls.txt").write "https://github.com/blog/subscribe" - assert_match /newsboat - Exported Feeds/m, shell_output("LC_ALL=C #{bin}/newsboat -e -u urls.txt") - end -end diff --git a/Formula/newt.rb b/Formula/newt.rb deleted file mode 100644 index 85c02197576a3..0000000000000 --- a/Formula/newt.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Newt < Formula - desc "Library for color text mode, widget based user interfaces" - homepage "https://pagure.io/newt" - url "https://pagure.io/releases/newt/newt-0.52.20.tar.gz" - sha256 "8d66ba6beffc3f786d4ccfee9d2b43d93484680ef8db9397a4fb70b5adbb6dbc" - - bottle do - cellar :any - sha256 "b6fcbf4441d9ed5957b34f773606eeba1dcef1beed75fafe4ebac83f72fbc305" => :mojave - sha256 "092e8f0a4603c337cd7e51d26d3721bd450a3a9ebf6eb0f55bf703f1a3c34cfa" => :high_sierra - sha256 "eb0b10566d3852909e6f11ad02dd09382cb494d05f1ea4a2371c15abda8cda1c" => :sierra - sha256 "1a3b16bafddded8ae06bcb5b261c50142b7b7752d4e4cf08d65709a2506edf82" => :el_capitan - sha256 "78f895d8ee19c343c5846a29699fd8be1f552f8d5c335081df353f8069cd9fa0" => :yosemite - end - - depends_on "gettext" - depends_on "popt" - depends_on "s-lang" - - def install - args = ["--prefix=#{prefix}", "--without-tcl"] - - inreplace "Makefile.in" do |s| - # name libraries correctly - # https://bugzilla.redhat.com/show_bug.cgi?id=1192285 - s.gsub! "libnewt.$(SOEXT).$(SONAME)", "libnewt.$(SONAME).dylib" - s.gsub! "libnewt.$(SOEXT).$(VERSION)", "libnewt.$(VERSION).dylib" - - # don't link to libpython.dylib - # causes https://github.com/Homebrew/homebrew/issues/30252 - # https://bugzilla.redhat.com/show_bug.cgi?id=1192286 - s.gsub! "`$$pyconfig --ldflags`", '"-undefined dynamic_lookup"' - s.gsub! "`$$pyconfig --libs`", '""' - end - - system "./configure", *args - system "make", "install" - end - - test do - ENV["TERM"] = "xterm" - system "python2.7", "-c", "import snack" - - (testpath/"test.c").write <<~EOS - #import - int main() { - newtInit(); - newtFinished(); - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lnewt" - system "./test" - end -end diff --git a/Formula/nexus.rb b/Formula/nexus.rb deleted file mode 100644 index 22e48ca59c64a..0000000000000 --- a/Formula/nexus.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Nexus < Formula - desc "Repository manager for binary software components" - homepage "https://www.sonatype.org/" - url "https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/oss/nexus-2.14.10-01-bundle.tar.gz" - version "2.14.10-01" - sha256 "d91fcc927ac90248d81ec741527668524388052abd7415548804dcb13a41e208" - - bottle :unneeded - - def install - rm_f Dir["bin/*.bat"] - # Put the sonatype-work directory in the var directory, to persist across version updates - inreplace "nexus-#{version}/conf/nexus.properties", - "nexus-work=${bundleBasedir}/../sonatype-work/nexus", - "nexus-work=#{var}/nexus" - libexec.install Dir["nexus-#{version}/*"] - bin.install_symlink libexec/"bin/nexus" - end - - plist_options :manual => "nexus start" - - def plist; <<~EOS - - - - - Label - com.sonatype.nexus - ProgramArguments - - #{opt_bin}/nexus - start - - RunAtLoad - - - - EOS - end - - test do - output = `#{bin}/nexus status` - assert_match "Nexus OSS is", output - end -end diff --git a/Formula/nfcutils.rb b/Formula/nfcutils.rb deleted file mode 100644 index 8a3be78eb088d..0000000000000 --- a/Formula/nfcutils.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Nfcutils < Formula - desc "Near Field Communication (NFC) tools under POSIX systems" - homepage "https://github.com/nfc-tools/nfcutils" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/nfc-tools/nfcutils-0.3.2.tar.gz" - sha256 "dea258774bd08c8b7ff65e9bed2a449b24ed8736326b1bb83610248e697c7f1b" - - bottle do - cellar :any - sha256 "5eaf6ffe3b96a94d1b6fbc150473aa6684dd98bca031b0a69883ca919467feb4" => :mojave - sha256 "bb263a7a1a406e79c94e97cd3ea7dd1ab4894f7d91ed8246c22b30957b83f897" => :high_sierra - sha256 "3f0145b6a563c0f401f567fb314a1485b3a5bc9b3a843f53d8d1fda72492b8fa" => :sierra - sha256 "ae0ac5663ac10557da9d42a12986268f5ab6149661c8e394df5a314b405d3b30" => :el_capitan - sha256 "24217bb0697bfde3272b966d664ed7e1d40c0c986207ea7f7edef84862302a9d" => :yosemite - sha256 "9c116d6d84f06a70e271b87268be451dc082a4e191e5cbeeb1a0cb6384f21e1d" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libnfc" - depends_on "libusb" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/nfdump.rb b/Formula/nfdump.rb deleted file mode 100644 index 8f464ca5dc5e5..0000000000000 --- a/Formula/nfdump.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Nfdump < Formula - desc "Tools to collect and process netflow data on the command-line" - homepage "https://nfdump.sourceforge.io" - url "https://github.com/phaag/nfdump/archive/v1.6.17.tar.gz" - sha256 "f71c2c57bdcd0731b2cfecf6d45f9bf57fc7c946858644caf829f738c67c393d" - - bottle do - cellar :any - sha256 "dddf3a460d59b020d24243fa355a751625c1a79b45e69f90b68c6ca1a476ffa6" => :mojave - sha256 "4011e1aa739d163bf04d5df0bff1bb779e89c5a0253332325da99ccf65ea6965" => :high_sierra - sha256 "7f810fe9a5e90455e8e3e2bf80fc474dd56a752a1f87310a80399d819e8e4d4b" => :sierra - sha256 "9312372f4ecd45cb576cbe261b6caca79f6baf314421f4c3165e99e1368aa934" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", "--enable-readpcap" - system "make", "install" - end - - test do - system bin/"nfdump", "-Z 'host 8.8.8.8'" - end -end diff --git a/Formula/nghttp2.rb b/Formula/nghttp2.rb deleted file mode 100644 index be56f7fec3370..0000000000000 --- a/Formula/nghttp2.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Nghttp2 < Formula - desc "HTTP/2 C Library" - homepage "https://nghttp2.org/" - url "https://github.com/nghttp2/nghttp2/releases/download/v1.35.1/nghttp2-1.35.1.tar.xz" - sha256 "9b7f5b09c3ca40a46118240bf476a5babf4bd93a1e4fde2337c308c4c5c3263a" - - bottle do - sha256 "3df6011e98f13af091fcc9e4c759d9e9662ee4d9a863d88284e17b461c94be92" => :mojave - sha256 "9c21365ecf3717afe8fda8307c8b80902d7b1f24275e45b8c8458ecc5e42560c" => :high_sierra - sha256 "cb7ca00e18e43bab469ae685713bf43bd56067cd8395ad0c5921a4c9343726b9" => :sierra - end - - head do - url "https://github.com/nghttp2/nghttp2.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - option "with-python", "Build python3 bindings" - - deprecated_option "with-python3" => "with-python" - - depends_on "cunit" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "c-ares" - depends_on "jansson" - depends_on "jemalloc" - depends_on "libev" - depends_on "libevent" - depends_on "libxml2" if MacOS.version <= :lion - depends_on "openssl" - depends_on "python" => :optional - - resource "Cython" do - url "https://files.pythonhosted.org/packages/f0/f8/7f406aac4c6919d5a4ce16509bbe059cd256e9ad94bae5ccac14094b7c51/Cython-0.29.1.tar.gz" - sha256 "18ab7646985a97e02cee72e1ddba2e732d4931d4e1732494ff30c5aa084bfb97" - end - - # https://github.com/tatsuhiro-t/nghttp2/issues/125 - # Upstream requested the issue closed and for users to use gcc instead. - # Given this will actually build with Clang with cxx11, just use that. - needs :cxx11 - - def install - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --disable-silent-rules - --enable-app - --disable-python-bindings - ] - - # requires thread-local storage features only available in 10.11+ - args << "--disable-threads" if MacOS.version < :el_capitan - args << "--with-xml-prefix=/usr" if MacOS.version > :lion - - system "autoreconf", "-ivf" if build.head? - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - - if build.with? "python" - pyver = Language::Python.major_minor_version "python3" - ENV["PYTHONPATH"] = cythonpath = buildpath/"cython/lib/python#{pyver}/site-packages" - cythonpath.mkpath - ENV.prepend_create_path "PYTHONPATH", lib/"python#{pyver}/site-packages" - - resource("Cython").stage do - system "python3", *Language::Python.setup_install_args(buildpath/"cython") - end - - cd "python" do - system buildpath/"cython/bin/cython", "nghttp2.pyx" - system "python3", *Language::Python.setup_install_args(prefix) - end - end - end - - test do - system bin/"nghttp", "-nv", "https://nghttp2.org" - end -end diff --git a/Formula/nginx.rb b/Formula/nginx.rb deleted file mode 100644 index 1122f07429dda..0000000000000 --- a/Formula/nginx.rb +++ /dev/null @@ -1,199 +0,0 @@ -class Nginx < Formula - desc "HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server" - homepage "https://nginx.org/" - # Use "mainline" releases only (odd minor version number), not "stable" - # See https://www.nginx.com/blog/nginx-1-12-1-13-released/ for why - url "https://nginx.org/download/nginx-1.15.8.tar.gz" - sha256 "a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787" - head "https://hg.nginx.org/nginx/", :using => :hg - - bottle do - sha256 "f279b6653396ab2a186ea374a672ddba343b6ae76286b7a11bf3a54ec72193f2" => :mojave - sha256 "b1a1956d46ba244f5a37ef6c870e32035d072415dd1cd8afc1434a866c7869c0" => :high_sierra - sha256 "9917a1d8b968e966a0bbdbec3a792c902c5cd7731013b36a1c1e524e03f738fa" => :sierra - end - - option "with-passenger", "Compile with support for Phusion Passenger module" - - depends_on "openssl" # don't switch to 1.1 until passenger is switched, too - depends_on "pcre" - depends_on "passenger" => :optional - - def install - # Changes default port to 8080 - inreplace "conf/nginx.conf" do |s| - s.gsub! "listen 80;", "listen 8080;" - s.gsub! " #}\n\n}", " #}\n include servers/*;\n}" - end - - openssl = Formula["openssl"] - pcre = Formula["pcre"] - - cc_opt = "-I#{pcre.opt_include} -I#{openssl.opt_include}" - ld_opt = "-L#{pcre.opt_lib} -L#{openssl.opt_lib}" - - args = %W[ - --prefix=#{prefix} - --sbin-path=#{bin}/nginx - --with-cc-opt=#{cc_opt} - --with-ld-opt=#{ld_opt} - --conf-path=#{etc}/nginx/nginx.conf - --pid-path=#{var}/run/nginx.pid - --lock-path=#{var}/run/nginx.lock - --http-client-body-temp-path=#{var}/run/nginx/client_body_temp - --http-proxy-temp-path=#{var}/run/nginx/proxy_temp - --http-fastcgi-temp-path=#{var}/run/nginx/fastcgi_temp - --http-uwsgi-temp-path=#{var}/run/nginx/uwsgi_temp - --http-scgi-temp-path=#{var}/run/nginx/scgi_temp - --http-log-path=#{var}/log/nginx/access.log - --error-log-path=#{var}/log/nginx/error.log - --with-debug - --with-http_addition_module - --with-http_auth_request_module - --with-http_dav_module - --with-http_degradation_module - --with-http_flv_module - --with-http_gunzip_module - --with-http_gzip_static_module - --with-http_mp4_module - --with-http_random_index_module - --with-http_realip_module - --with-http_secure_link_module - --with-http_slice_module - --with-http_ssl_module - --with-http_stub_status_module - --with-http_sub_module - --with-http_v2_module - --with-ipv6 - --with-mail - --with-mail_ssl_module - --with-pcre - --with-pcre-jit - --with-stream - --with-stream_realip_module - --with-stream_ssl_module - --with-stream_ssl_preread_module - ] - - if build.with? "passenger" - nginx_ext = `#{Formula["passenger"].opt_bin}/passenger-config --nginx-addon-dir`.chomp - args << "--add-module=#{nginx_ext}" - end - - if build.head? - system "./auto/configure", *args - else - system "./configure", *args - end - - system "make", "install" - if build.head? - man8.install "docs/man/nginx.8" - else - man8.install "man/nginx.8" - end - end - - def post_install - (etc/"nginx/servers").mkpath - (var/"run/nginx").mkpath - - # nginx's docroot is #{prefix}/html, this isn't useful, so we symlink it - # to #{HOMEBREW_PREFIX}/var/www. The reason we symlink instead of patching - # is so the user can redirect it easily to something else if they choose. - html = prefix/"html" - dst = var/"www" - - if dst.exist? - html.rmtree - dst.mkpath - else - dst.dirname.mkpath - html.rename(dst) - end - - prefix.install_symlink dst => "html" - - # for most of this formula's life the binary has been placed in sbin - # and Homebrew used to suggest the user copy the plist for nginx to their - # ~/Library/LaunchAgents directory. So we need to have a symlink there - # for such cases - if rack.subdirs.any? { |d| d.join("sbin").directory? } - sbin.install_symlink bin/"nginx" - end - end - - def passenger_caveats; <<~EOS - To activate Phusion Passenger, add this to #{etc}/nginx/nginx.conf, inside the 'http' context: - passenger_root #{Formula["passenger"].opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini; - passenger_ruby /usr/bin/ruby; - EOS - end - - def caveats - s = <<~EOS - Docroot is: #{var}/www - - The default port has been set in #{etc}/nginx/nginx.conf to 8080 so that - nginx can run without sudo. - - nginx will load all files in #{etc}/nginx/servers/. - EOS - s << "\n" << passenger_caveats if build.with? "passenger" - s - end - - plist_options :manual => "nginx" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/nginx - -g - daemon off; - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - (testpath/"nginx.conf").write <<~EOS - worker_processes 4; - error_log #{testpath}/error.log; - pid #{testpath}/nginx.pid; - - events { - worker_connections 1024; - } - - http { - client_body_temp_path #{testpath}/client_body_temp; - fastcgi_temp_path #{testpath}/fastcgi_temp; - proxy_temp_path #{testpath}/proxy_temp; - scgi_temp_path #{testpath}/scgi_temp; - uwsgi_temp_path #{testpath}/uwsgi_temp; - - server { - listen 8080; - root #{testpath}; - access_log #{testpath}/access.log; - error_log #{testpath}/error.log; - } - } - EOS - system bin/"nginx", "-t", "-c", testpath/"nginx.conf" - end -end diff --git a/Formula/ngircd.rb b/Formula/ngircd.rb deleted file mode 100644 index c4f9ed73258c4..0000000000000 --- a/Formula/ngircd.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Ngircd < Formula - desc "Next generation IRC daemon" - homepage "https://ngircd.barton.de/" - url "https://ngircd.barton.de/pub/ngircd/ngircd-24.tar.gz" - mirror "https://ngircd.mirror.3rz.org/pub/ngircd/ngircd-24.tar.gz" - sha256 "3e00a7da52c81fc1e02bb996a27bf43da905ba7037bf8c6bb3bd13321e0c85ab" - - bottle do - sha256 "f7bd9059bc934e317cda8491cc6ed08c1a86da0da8e52a1424842892ce03a45b" => :mojave - sha256 "6832dfa5480e2f089c32468c14eaa0a4d2ef3a1945eb53b1544068c2957fecd2" => :high_sierra - sha256 "a5303a11814a311d639f585645808f9378b660982c5e40f4c8d025353d35001b" => :sierra - sha256 "761f7fdf0da86e1926cfe17ed298610cd1eb20607232ea1b75cc4f14c1966ae0" => :el_capitan - sha256 "678de9420c8bd5661ec0a6c9418539684a874298c1b35a99684368aac365d2e2" => :yosemite - end - - depends_on "libident" - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{HOMEBREW_PREFIX}/etc", - "--enable-ipv6", - "--with-ident", - "--with-openssl" - system "make", "install" - - prefix.install "contrib/MacOSX/de.barton.ngircd.plist.tmpl" => "de.barton.ngircd.plist" - (prefix+"de.barton.ngircd.plist").chmod 0644 - - inreplace prefix+"de.barton.ngircd.plist" do |s| - s.gsub! ":SBINDIR:", sbin - s.gsub! "/Library/Logs/ngIRCd.log", var/"Logs/ngIRCd.log" - end - end - - test do - # Exits non-zero, so test version and match Author's name supplied. - assert_match /Alexander/, pipe_output("#{sbin}/ngircd -V 2>&1") - end -end diff --git a/Formula/ngrep.rb b/Formula/ngrep.rb deleted file mode 100644 index 19b49927796f0..0000000000000 --- a/Formula/ngrep.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ngrep < Formula - desc "Network grep" - homepage "https://github.com/jpr5/ngrep" - url "https://github.com/jpr5/ngrep/archive/V1_47.tar.gz" - sha256 "dc4dbe20991cc36bac5e97e99475e2a1522fd88c59ee2e08f813432c04c5fff3" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0d1948b2fbf7c60fb6e46f15d32a51a3f7754e7372924e4e984cce98282ca281" => :mojave - sha256 "390424274552105e21b3f3e926b933322a09333cee02274d2f84a5e23f4ea74d" => :high_sierra - sha256 "0e915d1e3b7e7da8e58a48457de4e40359cb0f870eb45a77302d36c1b767d044" => :sierra - sha256 "d057c167d3b695ff915c13fd39e3cd7b3e6e2a5b3f82bce6bb8ea4c030e8f6e7" => :el_capitan - end - - def install - sdk = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - system "./configure", "--enable-ipv6", - "--prefix=#{prefix}", - # this line required to make configure succeed - "--with-pcap-includes=#{sdk}/usr/include/pcap", - # this line required to avoid segfaults - # see https://github.com/jpr5/ngrep/commit/e29fc29 - # https://github.com/Homebrew/homebrew/issues/27171 - "--disable-pcap-restart" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ngrep -V") - end -end diff --git a/Formula/ngspice.rb b/Formula/ngspice.rb deleted file mode 100644 index 4442a2d9895ae..0000000000000 --- a/Formula/ngspice.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Ngspice < Formula - desc "Spice circuit simulator" - homepage "https://ngspice.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/28/ngspice-28.tar.gz" - sha256 "94804fa78c8db2f90f088902e8c27f7b732a66767a58c70f37612bff5a16df66" - revision 1 - - bottle do - sha256 "42896bc07cf06a7aba74d22340e68453d9dc09adae82a2d56ba95d80276d0a97" => :mojave - sha256 "a5a641e0cc5305b7741dbdfbb18230e71d8ae3add7ed314c85ac801a48424cb2" => :high_sierra - sha256 "e2276123df61e171bda40781e5db332befba04f0c75dfdb97b4b57ffeb8fa7b9" => :sierra - end - - head do - url "https://git.code.sf.net/p/ngspice/ngspice.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "libtool" => :build - end - - deprecated_option "with-x" => "with-x11" - - depends_on "readline" - depends_on :x11 => :optional - - def install - system "./autogen.sh" if build.head? - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-readline=yes - --enable-xspice - ] - if build.with? "x11" - args << "--with-x" - else - args << "--without-x" - end - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cir").write <<~EOS - RC test circuit - v1 1 0 1 - r1 1 2 1 - c1 2 0 1 ic=0 - .tran 100u 100m uic - .control - run - quit - .endc - .end - EOS - system "#{bin}/ngspice", "test.cir" - end -end diff --git a/Formula/nickle.rb b/Formula/nickle.rb deleted file mode 100644 index 70fb853919a64..0000000000000 --- a/Formula/nickle.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Nickle < Formula - desc "Desk calculator language" - homepage "https://www.nickle.org/" - url "https://www.nickle.org/release/nickle-2.81.tar.gz" - sha256 "99a9331489e290fb768bf8d88e8b03e76f25485d7636c30d9eee616ca9d358b5" - - bottle do - sha256 "7a0f233310b62c7b203a7e0d6e68d234412665a5a399249e15a55d4d94df59b1" => :mojave - sha256 "34c498d8b9924529193669f9cec5e1a7d648dfd48430496c0d01bf3b38da4ca2" => :high_sierra - sha256 "54d986151e2e52e2212ce1e00b887ec1cfbebba67f621f62742a2890b16302c1" => :sierra - sha256 "c1bfe5ca6ecb8327970fdc34a6e5caa85e521ceb317981913a72068049514674" => :el_capitan - end - - depends_on "readline" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "4", shell_output("#{bin}/nickle -e '2+2'").chomp - end -end diff --git a/Formula/nicotine-plus.rb b/Formula/nicotine-plus.rb deleted file mode 100644 index 1242709621d97..0000000000000 --- a/Formula/nicotine-plus.rb +++ /dev/null @@ -1,52 +0,0 @@ -class NicotinePlus < Formula - include Language::Python::Virtualenv - - desc "Graphical client for the SoulSeek peer-to-peer system" - homepage "https://www.nicotine-plus.org/" - url "https://github.com/Nicotine-Plus/nicotine-plus/archive/1.4.1.tar.gz" - sha256 "1b38ef196d981e4eb96fa990cc463143289784f988f559c4400b1d461497b7d6" - revision 2 - head "https://github.com/Nicotine-Plus/nicotine-plus.git" - - bottle do - cellar :any_skip_relocation - sha256 "4a771717f5d69be309916cb9016edbdbd5ff55a66d0fe6db89e78bf3aae78a1d" => :mojave - sha256 "35e7bf104f3d38a0d04611bf55190e47cc0b37628c820b6a94a4793c1a3bf451" => :high_sierra - sha256 "7fc8c5bfd9f131df9cc30887240a064129d65794a1a2cde8205f4eda88548cce" => :sierra - sha256 "c8243dedb84548dee2f8c663bd3cd4211885b2a1a928bc733a2ee663a9f63fe0" => :el_capitan - end - - depends_on "geoip" - depends_on "gtk+" - depends_on "miniupnpc" - depends_on "pygtk" - depends_on "python@2" # does not support Python 3 - - resource "mutagen" do - url "https://files.pythonhosted.org/packages/14/d5/51f49f345d4490a9a6a04677ab136f78e4e0c64ed142e48b4ed818c13c96/mutagen-1.37.tar.gz" - sha256 "539553d3f1ffd890c74f64b819750aef0316933d162c09798c9e7eaf334ae760" - end - - resource "python-geoip" do - url "https://files.pythonhosted.org/packages/7c/65/cb04188154f7626e897d55f04c2542ba4205352f158cd925d314ad1998ef/python-geoip-1.2.tar.gz" - sha256 "b7b11dab42bffba56943b3199e3441f41cea145244d215844ecb6de3d5fb2df5" - end - - resource "miniupnpc" do - url "https://files.pythonhosted.org/packages/55/90/e987e28ed29b571f315afea7d317b6bf4a551e37386b344190cffec60e72/miniupnpc-1.9.tar.gz" - sha256 "498b35c5443e8de566f3a4de4bceae28fbf6e08ed59afb5ffd516d0bb718bca6" - end - - def install - venv = virtualenv_create(libexec) - venv.pip_install "mutagen" - venv.pip_install "miniupnpc" - venv.pip_install "python-geoip" - venv.pip_install_and_link buildpath - end - - test do - system "#{bin}/nicotine", "--version" - system "#{bin}/nicotine", "--help" - end -end diff --git a/Formula/nicovideo-dl.rb b/Formula/nicovideo-dl.rb deleted file mode 100644 index 89cb794ea0bd2..0000000000000 --- a/Formula/nicovideo-dl.rb +++ /dev/null @@ -1,17 +0,0 @@ -class NicovideoDl < Formula - desc "Command-line program to download videos from www.nicovideo.jp" - homepage "https://osdn.net/projects/nicovideo-dl/" - # Canonical: https://osdn.net/dl/nicovideo-dl/nicovideo-dl-0.0.20120212.tar.gz - url "https://dotsrc.dl.osdn.net/osdn/nicovideo-dl/56304/nicovideo-dl-0.0.20120212.tar.gz" - sha256 "a50e9d5c9c291e1e10e5fc3ad27d528b49c9671bdd63e36fb2f49d70b54b89d8" - - bottle :unneeded - - def install - bin.install "nicovideo-dl" - end - - test do - system "#{bin}/nicovideo-dl", "-v" - end -end diff --git a/Formula/nifi-registry.rb b/Formula/nifi-registry.rb deleted file mode 100644 index f5df542312823..0000000000000 --- a/Formula/nifi-registry.rb +++ /dev/null @@ -1,21 +0,0 @@ -class NifiRegistry < Formula - desc "Centralized storage & management of NiFi/MiNiFi shared resources" - homepage "https://nifi.apache.org/registry" - url "https://www.apache.org/dyn/closer.lua?path=/nifi/nifi-registry/nifi-registry-0.3.0/nifi-registry-0.3.0-bin.tar.gz" - sha256 "4e432b6436881d641c45595cb98f7f6f3c396ca28dd85ce51c7b66c9b2bf8710" - - bottle :unneeded - - def install - libexec.install Dir["*"] - rm Dir[libexec/"bin/*.bat"] - - bin.install libexec/"bin/nifi-registry.sh" => "nifi-registry" - bin.env_script_all_files libexec/"bin/", :NIFI_REGISTRY_HOME => libexec - end - - test do - output = shell_output("#{bin}/nifi-registry status") - assert_match "Apache NiFi Registry is not running", output - end -end diff --git a/Formula/nifi.rb b/Formula/nifi.rb deleted file mode 100644 index f8984d7534f92..0000000000000 --- a/Formula/nifi.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Nifi < Formula - desc "Easy to use, powerful, and reliable system to process and distribute data" - homepage "https://nifi.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=/nifi/1.8.0/nifi-1.8.0-bin.tar.gz" - sha256 "11561e8d505e76af5060a8b039d7ba1ecfe966722e5b824b4d4eed60ea796071" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - - ENV["NIFI_HOME"] = libexec - - bin.install libexec/"bin/nifi.sh" => "nifi" - bin.env_script_all_files libexec/"bin/", :NIFI_HOME => libexec - end - - test do - system bin/"nifi", "status" - end -end diff --git a/Formula/nikto.rb b/Formula/nikto.rb deleted file mode 100644 index bf6da8fdeddb8..0000000000000 --- a/Formula/nikto.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Nikto < Formula - desc "Web server scanner" - homepage "https://cirt.net/nikto2" - url "https://github.com/sullo/nikto/archive/2.1.6.tar.gz" - sha256 "c1731ae4133d3879718bb7605a8d395b2036668505effbcbbcaa4dae4e9f27f2" - - bottle :unneeded - - def install - cd "program" do - inreplace "nikto.pl", "/etc/nikto.conf", "#{etc}/nikto.conf" - - inreplace "nikto.conf" do |s| - s.gsub! "# EXECDIR=/opt/nikto", "EXECDIR=#{prefix}" - s.gsub! "# PLUGINDIR=/opt/nikto/plugins", - "PLUGINDIR=#{pkgshare}/plugins" - s.gsub! "# DBDIR=/opt/nikto/databases", - "DBDIR=#{var}/lib/nikto/databases" - s.gsub! "# TEMPLATEDIR=/opt/nikto/templates", - "TEMPLATEDIR=#{pkgshare}/templates" - s.gsub! "# DOCDIR=/opt/nikto/docs", "DOCDIR=#{pkgshare}/docs" - end - - bin.install "nikto.pl" => "nikto" - bin.install "replay.pl" - etc.install "nikto.conf" - man1.install "docs/nikto.1" - pkgshare.install "docs", "plugins", "templates" - end - - doc.install Dir["documentation/*"] - (var/"lib/nikto/databases").mkpath - cp_r Dir["program/databases/*"], var/"lib/nikto/databases" - end - - test do - system bin/"nikto", "-H" - end -end diff --git a/Formula/nim.rb b/Formula/nim.rb deleted file mode 100644 index 6ce5507562ac4..0000000000000 --- a/Formula/nim.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Nim < Formula - desc "Statically typed, imperative programming language" - homepage "https://nim-lang.org/" - url "https://nim-lang.org/download/nim-0.19.0.tar.xz" - sha256 "a1996347253c590de42f6e36e33bd1d5ec7479c0aa013769b92deef802df3c2e" - - bottle do - cellar :any_skip_relocation - sha256 "e0249494fe15fab3893b1e3f704c656762cbda2b88142bfcf50fd36cc12b03c1" => :mojave - sha256 "bb4e62ae8310bcc375d6c5b3e3b97a75ba80bb4d87093f8295464d91edc6f72d" => :high_sierra - sha256 "74de34f703c0a26c658d3b3d78ae13c6ea710471d33ff7df300717acc86b771c" => :sierra - end - - head do - url "https://github.com/nim-lang/Nim.git", :branch => "devel" - resource "csources" do - url "https://github.com/nim-lang/csources.git" - end - end - - def install - if build.head? - resource("csources").stage do - system "/bin/sh", "build.sh" - build_bin = buildpath/"bin" - build_bin.install "bin/nim" - end - else - system "/bin/sh", "build.sh" - end - # Compile the koch management tool - system "bin/nim", "c", "-d:release", "koch" - # Build a new version of the compiler with readline bindings - system "./koch", "boot", "-d:release", "-d:useLinenoise" - # Build nimsuggest/nimble/nimgrep - system "./koch", "tools" - system "./koch", "geninstall" - system "/bin/sh", "install.sh", prefix - bin.install_symlink prefix/"nim/bin/nim" - bin.install_symlink prefix/"nim/bin/nim" => "nimrod" - - target = prefix/"nim/bin" - target.install "bin/nimsuggest" - target.install "bin/nimble" - target.install "bin/nimgrep" - bin.install_symlink prefix/"nim/bin/nimsuggest" - bin.install_symlink target/"nimble" - bin.install_symlink target/"nimgrep" - end - - test do - (testpath/"hello.nim").write <<~EOS - echo("hello") - EOS - assert_equal "hello", shell_output("#{bin}/nim compile --verbosity:0 --run #{testpath}/hello.nim").chomp - - (testpath/"hello.nimble").write <<~EOS - version = "0.1.0" - author = "Author Name" - description = "A test nimble package" - license = "MIT" - requires "nim >= 0.15.0" - EOS - assert_equal "name: \"hello\"\n", shell_output("#{bin}/nimble dump").lines.first - end -end diff --git a/Formula/ninja.rb b/Formula/ninja.rb deleted file mode 100644 index dc783901ac22f..0000000000000 --- a/Formula/ninja.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ninja < Formula - desc "Small build system for use with gyp or CMake" - homepage "https://ninja-build.org/" - url "https://github.com/ninja-build/ninja/archive/v1.8.2.tar.gz" - sha256 "86b8700c3d0880c2b44c2ff67ce42774aaf8c28cbf57725cb881569288c1c6f4" - head "https://github.com/ninja-build/ninja.git" - - bottle do - cellar :any_skip_relocation - sha256 "b40a7da5db26b6bb32537185bd79861cce13f723cc02ad503e8501b6fca2d6f4" => :mojave - sha256 "eeba4fff08b3ed4b308250fb650f7d06630acd18465900ba0e27cecfe925a6cc" => :high_sierra - sha256 "90ecf90948f0fa65c82011d79338d7c5ca2a4d0cb7cb8dc3892243f749fbe2eb" => :sierra - sha256 "675165ce642fa811e1a0a363be0ba66a7b907d46056f89fd20938aa33e7d59f7" => :el_capitan - end - - def install - system "python", "configure.py", "--bootstrap" - - # Quickly test the build - system "./configure.py" - system "./ninja", "ninja_test" - system "./ninja_test", "--gtest_filter=-SubprocessTest.SetWithLots" - - bin.install "ninja" - bash_completion.install "misc/bash-completion" => "ninja-completion.sh" - zsh_completion.install "misc/zsh-completion" => "_ninja" - end - - test do - (testpath/"build.ninja").write <<~EOS - cflags = -Wall - - rule cc - command = gcc $cflags -c $in -o $out - - build foo.o: cc foo.c - EOS - system bin/"ninja", "-t", "targets" - end -end diff --git a/Formula/ninvaders.rb b/Formula/ninvaders.rb deleted file mode 100644 index 07f5d50757aae..0000000000000 --- a/Formula/ninvaders.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Ninvaders < Formula - desc "Space Invaders in the terminal" - homepage "https://ninvaders.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ninvaders/ninvaders/0.1.1/ninvaders-0.1.1.tar.gz" - sha256 "bfbc5c378704d9cf5e7fed288dac88859149bee5ed0850175759d310b61fd30b" - - bottle do - cellar :any_skip_relocation - sha256 "4cb75493161c6153611c727bef8837c6c41fbd5db8872239d682cabadc7d2311" => :mojave - sha256 "75247d901255b6fba826ca60d909b5bb1c349c969b98f65275c898ca45b32b7c" => :high_sierra - sha256 "3de94522f9f6f5560e1e6f354470aef0c46de68792fd93bd2b044d45db8328c6" => :sierra - sha256 "b2d4f23349e2214d5a0c8b51218974b0f8b2704d333f1bca19ca4b4539e2b9f1" => :el_capitan - sha256 "fc7369a82b14fa5879d2e072ac7ceaa1b6b7bd6cabd163e6bea8adb3a5670b80" => :yosemite - end - - def install - ENV.deparallelize # this formula's build system can't parallelize - inreplace "Makefile" do |s| - s.change_make_var! "CC", ENV.cc - # gcc-4.2 doesn't like the lack of space here - s.gsub! "-o$@", "-o $@" - end - system "make" # build the binary - bin.install "nInvaders" - end - - test do - assert_match "nInvaders #{version}", - shell_output("#{bin}/nInvaders -h 2>&1", 1) - end -end diff --git a/Formula/nkf.rb b/Formula/nkf.rb deleted file mode 100644 index 987ce932b0f0a..0000000000000 --- a/Formula/nkf.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Nkf < Formula - desc "Network Kanji code conversion Filter (NKF)" - homepage "https://osdn.net/projects/nkf/" - # Canonical: https://osdn.net/dl/nkf/nkf-2.1.4.tar.gz - url "https://dotsrc.dl.osdn.net/osdn/nkf/64158/nkf-2.1.4.tar.gz" - sha256 "b4175070825deb3e98577186502a8408c05921b0c8ff52e772219f9d2ece89cb" - - bottle do - cellar :any_skip_relocation - sha256 "4d3956870eb3cc800ffa0fbe527ce6012a14b81f98d4af9485fab8e99316560c" => :mojave - sha256 "1078899ada2ce3d45e4025e0c41f46f5e97856acfabb1c1d07f78fa1bb6f7048" => :high_sierra - sha256 "f0f532f5f6bba92842ed4da8d9cddbbb949c95933bc6251e6c58575aa5e27949" => :sierra - sha256 "71a4b7a8a2eef8ae33e8c6f81ebfd8afbcae8237c03720783d2157dcd307b600" => :el_capitan - sha256 "de741a793e59bc390e3b919f3d3bab245694e7c92c1a821ff60480078f1ae67d" => :yosemite - sha256 "8b34cb6acebf1a6a446572924c3a585e48ad0007dc394670ee94b9c1fe5d61c2" => :mavericks - end - - def install - inreplace "Makefile", "$(prefix)/man", "$(prefix)/share/man" - system "make", "CC=#{ENV.cc}" - # Have to specify mkdir -p here since the intermediate directories - # don't exist in an empty prefix - system "make", "install", "prefix=#{prefix}", "MKDIR=mkdir -p" - end - - test do - system "#{bin}/nkf", "--version" - end -end diff --git a/Formula/nload.rb b/Formula/nload.rb deleted file mode 100644 index 04d6d90aa43a2..0000000000000 --- a/Formula/nload.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Nload < Formula - desc "Realtime console network usage monitor" - homepage "http://www.roland-riegel.de/nload/" - url "http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz" - sha256 "c1c051e7155e26243d569be5d99c744d8620e65fa8a7e05efcf84d01d9d469e5" - - bottle do - sha256 "860516b22b47a979243b87da6fca2b3e60688f127b9f97bafdb90cd157e57812" => :mojave - sha256 "220cc0307d6b1548af61b2cd70236da4c5f403a96a12e941278689ec802d9431" => :high_sierra - sha256 "086ab214598a7a3b6db19eb1f2ddd6a646f292866d42661bc6c29c283c1b7495" => :sierra - sha256 "dd23e0631ece0bc06328be086993d030c8bf4e99d29898e59eb0e6f546c44990" => :el_capitan - sha256 "465b4d813588821d240dce65ffc46bc67d55f64044a26a33b5a49b810deea7f8" => :yosemite - sha256 "344b909ee8033a4ab27c1db04e9505b0bbf6d0141f391c470cc36b33e6dd7723" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - # crash on F2 and garbage in adapter name, see https://sourceforge.net/p/nload/bugs/8/ reported on 2014-04-03 - patch :p0 do - url "https://sourceforge.net/p/nload/bugs/_discuss/thread/c9b68d8e/4a65/attachment/devreader-bsd.cpp.patch" - sha256 "19055158b72722f7dabff9890931094cac591bcc6de3e90a7f4744d28746ebc7" - end - - # Patching configure.in file to make configure compile on Mac OS. - # Patch taken from MacPorts. - patch :DATA - - def install - system "./run_autotools" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - # Unset LDFLAGS, "-s" causes the linker to crash - system "make", "install", "LDFLAGS=" - end - - test do - system "#{bin}/nload", "--help" - end -end - - -__END__ -diff --git a/configure.in b/configure.in -index 87ecc88..4df8dc3 100644 ---- a/configure.in -+++ b/configure.in -@@ -38,7 +38,7 @@ case $host_os in - - AC_CHECK_FUNCS([memset]) - ;; -- *bsd*) -+ *darwin*) - AC_DEFINE(HAVE_BSD, 1, [Define to 1 if your build target is BSD.]) - AM_CONDITIONAL(HAVE_BSD, true) diff --git a/Formula/nlopt.rb b/Formula/nlopt.rb deleted file mode 100644 index 66fa159abf4ac..0000000000000 --- a/Formula/nlopt.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Nlopt < Formula - desc "Free/open-source library for nonlinear optimization" - homepage "https://nlopt.readthedocs.io/" - url "https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz" - sha256 "8099633de9d71cbc06cd435da993eb424bbcdbded8f803cdaa9fb8c6e09c8e89" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "6b0c91aa1a690600875d5e00aafa407f2a1394f803b31fde0867d5162a587c15" => :mojave - sha256 "6865527f6074f1ea737a80bd2b4fd5e6e39df01e744fd111e593fd1dd1c4e0de" => :high_sierra - sha256 "e3ea4064beff9f39ab2fed6a9e5f643a18fd7abb2b2302713ce7f58f970ceb09" => :sierra - end - - head do - url "https://github.com/stevengj/nlopt.git" - depends_on "cmake" => :build - depends_on "swig" => :build - end - - depends_on "numpy" - - def install - ENV.deparallelize - - if build.head? - system "cmake", ".", *std_cmake_args, - "-DBUILD_MATLAB=OFF", - "-DBUILD_OCTAVE=OFF", - "-DWITH_CXX=ON" - else - system "./configure", "--prefix=#{prefix}", - "--enable-shared", - "--with-cxx", - "--without-octave" - system "make" - end - system "make", "install" - - # Create library links for C programs - %w[0.dylib dylib a].each do |suffix| - lib.install_symlink "#{lib}/libnlopt_cxx.#{suffix}" => "#{lib}/libnlopt.#{suffix}" - end - end - - test do - # Based on https://nlopt.readthedocs.io/en/latest/NLopt_Tutorial/#Example_in_C.2FC.2B.2B - (testpath/"test.c").write <<~EOS - #include - #include - #include - double myfunc(unsigned n, const double *x, double *grad, void *my_func_data) { - if (grad) { - grad[0] = 0.0; - grad[1] = 0.5 / sqrt(x[1]); - } - return sqrt(x[1]); - } - typedef struct { double a, b; } my_constraint_data; - double myconstraint(unsigned n, const double *x, double *grad, void *data) { - my_constraint_data *d = (my_constraint_data *) data; - double a = d->a, b = d->b; - if (grad) { - grad[0] = 3 * a * (a*x[0] + b) * (a*x[0] + b); - grad[1] = -1.0; - } - return ((a*x[0] + b) * (a*x[0] + b) * (a*x[0] + b) - x[1]); - } - int main() { - double lb[2] = { -HUGE_VAL, 0 }; /* lower bounds */ - nlopt_opt opt; - opt = nlopt_create(NLOPT_LD_MMA, 2); /* algorithm and dimensionality */ - nlopt_set_lower_bounds(opt, lb); - nlopt_set_min_objective(opt, myfunc, NULL); - my_constraint_data data[2] = { {2,0}, {-1,1} }; - nlopt_add_inequality_constraint(opt, myconstraint, &data[0], 1e-8); - nlopt_add_inequality_constraint(opt, myconstraint, &data[1], 1e-8); - nlopt_set_xtol_rel(opt, 1e-4); - double x[2] = { 1.234, 5.678 }; /* some initial guess */ - double minf; /* the minimum objective value, upon return */ - - if (nlopt_optimize(opt, x, &minf) < 0) - return 1; - else - printf("found minimum at f(%g,%g) = %0.10g", x[0], x[1], minf); - nlopt_destroy(opt); - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{opt_lib}", "-lnlopt", "-lm" - assert_match "found minimum", shell_output("./test") - end -end diff --git a/Formula/nmap.rb b/Formula/nmap.rb deleted file mode 100644 index d71fa3ce5238c..0000000000000 --- a/Formula/nmap.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Nmap < Formula - desc "Port scanning utility for large networks" - homepage "https://nmap.org/" - url "https://nmap.org/dist/nmap-7.70.tar.bz2" - sha256 "847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18" - head "https://svn.nmap.org/nmap/" - - bottle do - sha256 "9a9bfb7842cb631f4d48384e7f0624540c109c1fbf16dc1df3a2bab521392f61" => :mojave - sha256 "ef7ef98c6b83c013727eea37c37dcfa04eb6a572dc03699920cd7fc76a7f358a" => :high_sierra - sha256 "a39669b4c391823e7f42407654475539d7b4b58bc343817c6bfb96bc4063e848" => :sierra - sha256 "a597fa10396be4a782a198f4af51565c15dc8ae59cbe8c367bb78fd3babd972e" => :el_capitan - end - - option "with-pygtk", "Build Zenmap GUI" - - depends_on "openssl" - depends_on "pygtk" => :optional - - conflicts_with "ndiff", :because => "both install `ndiff` binaries" - - def install - ENV.deparallelize - - args = %W[ - --prefix=#{prefix} - --with-libpcre=included - --with-liblua=included - --with-openssl=#{Formula["openssl"].opt_prefix} - --without-nmap-update - --disable-universal - ] - - args << "--without-zenmap" if build.without? "pygtk" - - system "./configure", *args - system "make" # separate steps required otherwise the build fails - system "make", "install" - - rm_f Dir[bin/"uninstall_*"] # Users should use brew uninstall. - end - - test do - system "#{bin}/nmap", "-p80,443", "google.com" - end -end diff --git a/Formula/nmh.rb b/Formula/nmh.rb deleted file mode 100644 index ad8f3dd3ef433..0000000000000 --- a/Formula/nmh.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Nmh < Formula - desc "The new version of the MH mail handler" - homepage "https://www.nongnu.org/nmh/" - url "https://download.savannah.gnu.org/releases/nmh/nmh-1.7.1.tar.gz" - sha256 "f1fb94bbf7d95fcd43277c7cfda55633a047187f57afc6c1bb9321852bd07c11" - - bottle do - sha256 "b0d273ecd1a67ddf6504e5aac8771bbc1b60bdea653c0635067e059eb4881507" => :mojave - sha256 "4d2e05b5a522f7c394b0bcb064f48ce28b55b0a73ffe1c2ff33cc3f568167e25" => :high_sierra - sha256 "de7b1a7e8ab420a918dfce7dd64eeb23fd3a1fcc158bf7525ebc1bee97fad759" => :sierra - end - - head do - url "https://git.savannah.nongnu.org/git/nmh.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "openssl" - depends_on "w3m" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", "--libdir=#{libexec}", - "--with-cyrus-sasl", - "--with-tls" - system "make", "install" - end - - test do - (testpath/".mh_profile").write "Path: Mail" - (testpath/"Mail/inbox/1").write <<~EOS - From: Mister Test - To: Mister Nobody - Date: Tue, 5 May 2015 12:00:00 -0000 - Subject: Hello! - - How are you? - EOS - ENV["TZ"] = "GMT" - output = shell_output("#{bin}/scan -width 80") - assert_equal(" 1 05/05 Mister Test Hello!<>\n", output) - end -end diff --git a/Formula/nng.rb b/Formula/nng.rb deleted file mode 100644 index 0e0882d371968..0000000000000 --- a/Formula/nng.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Nng < Formula - desc "Nanomsg-next-generation -- light-weight brokerless messaging" - homepage "https://nanomsg.github.io/nng/" - url "https://github.com/nanomsg/nng/archive/v1.1.1.tar.gz" - sha256 "cec54ed40c8feb5c0c66f81cfd200e9b243639a75d1b6093c95ee55885273205" - - bottle do - sha256 "95806f0fd6dda2f2d07657186fe0fd5b67d0df560797806165c2a133f4e31e72" => :mojave - sha256 "7afc683e8993ddc89b5e0bbede86b8967453bb90253b5970e086feef4b08019d" => :high_sierra - sha256 "6b5464df0896b155b61b0f0428956142d0deabebd75e71f7116b5558a5138556" => :sierra - end - - depends_on "asciidoctor" => :build - depends_on "cmake" => :build - depends_on "ninja" => :build - - def install - mkdir "build" do - system "cmake", "..", "-GNinja", "-DNNG_ENABLE_DOC=ON", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "ninja" - system "ninja", "install" - end - end - - test do - bind = "tcp://127.0.0.1:8000" - - pid = fork do - exec "#{bin}/nngcat --rep --bind #{bind} --format ascii --data home" - end - sleep 2 - - begin - output = shell_output("#{bin}/nngcat --req --connect #{bind} --format ascii --data brew") - assert_match(/home/, output) - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/nnn.rb b/Formula/nnn.rb deleted file mode 100644 index 7da66a14aa8ee..0000000000000 --- a/Formula/nnn.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Nnn < Formula - desc "Free, fast, friendly file browser" - homepage "https://github.com/jarun/nnn" - url "https://github.com/jarun/nnn/archive/v2.2.tar.gz" - sha256 "88dd08d624ae7a61ef749b1e258e4b29ed61ba9fcc5a18813f291ce80efc5e74" - head "https://github.com/jarun/nnn.git" - - bottle do - cellar :any_skip_relocation - sha256 "f678ffcf42043c17dd4aaf4857d5d6cb738ae50e35485b81eca6382b2c1562a0" => :mojave - sha256 "4337e0b9968a516f0518eb722f0757d34330d5967fec6a69840ce91b0592d6ac" => :high_sierra - sha256 "f4d378f77db6f6b0cfaf65b530e6e0ed6cf39b58ce1924981ae60fc7f2d5f548" => :sierra - end - - depends_on "readline" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Testing this curses app requires a pty - require "pty" - - PTY.spawn(bin/"nnn") do |r, w, _pid| - w.write "q" - assert_match testpath.realpath.to_s, r.read - end - end -end diff --git a/Formula/no-more-secrets.rb b/Formula/no-more-secrets.rb deleted file mode 100644 index b85eac619e60a..0000000000000 --- a/Formula/no-more-secrets.rb +++ /dev/null @@ -1,23 +0,0 @@ -class NoMoreSecrets < Formula - desc "Recreates the SETEC ASTRONOMY effect from 'Sneakers'" - homepage "https://github.com/bartobri/no-more-secrets" - url "https://github.com/bartobri/no-more-secrets/archive/v0.3.3.tar.gz" - sha256 "cfcf408768c6b335780e46a84fbc121a649c4b87e0564fc972270e96630efdce" - - bottle do - cellar :any_skip_relocation - sha256 "bf89c9bc341d6dc82bfbb242b6414a2f778b0bc1c26e5f4ced239c649902aad6" => :mojave - sha256 "ad2927337af4e85d6bff3fbdcfeb2e435c85de8d527d23a3644c7add3c7acab0" => :high_sierra - sha256 "97ff320dd7639a7a71fbfa4f7e72fb7c66e4b60ea0f6a6adc4583c63cbda05ac" => :sierra - sha256 "78c52bd9f179967cb240c8f49763e03e512092ee476b73e38166bfa79757664f" => :el_capitan - end - - def install - system "make", "all" - system "make", "prefix=#{prefix}", "install" - end - - test do - assert_equal "nms version #{version}", shell_output("#{bin}/nms -v").chomp - end -end diff --git a/Formula/node-build.rb b/Formula/node-build.rb deleted file mode 100644 index 104b1109ab985..0000000000000 --- a/Formula/node-build.rb +++ /dev/null @@ -1,22 +0,0 @@ -class NodeBuild < Formula - desc "Install NodeJS versions" - homepage "https://github.com/nodenv/node-build" - url "https://github.com/nodenv/node-build/archive/v4.3.0.tar.gz" - sha256 "57c2034baf9b198115e8ce5c56bad6402607b58a8bdd7f9b3d1a8b5003c24f79" - head "https://github.com/nodenv/node-build.git" - - bottle :unneeded - - depends_on "autoconf" - depends_on "openssl" - depends_on "pkg-config" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - test do - system "#{bin}/node-build", "--definitions" - end -end diff --git a/Formula/node.rb b/Formula/node.rb deleted file mode 100644 index c9aaaf49baaea..0000000000000 --- a/Formula/node.rb +++ /dev/null @@ -1,112 +0,0 @@ -class Node < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v11.6.0/node-v11.6.0.tar.gz" - sha256 "39ef4f1866f75786baff5959439483fafdc99d3ee3a0568a13cc635d64cf5e0b" - head "https://github.com/nodejs/node.git" - - bottle do - cellar :any - sha256 "e4302452358ad88871d177536574bca83a34de7d9a0f196728c80806162c6a8d" => :mojave - sha256 "e2a5dbf2df03c7f3a531cfa7bb148139013f181fdc58e9be556d83d0388faa42" => :high_sierra - sha256 "caa33fc0489f8702cd681abfc87dc4790f7bb3e1cd065b3e351246715383a7ae" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "python@2" => :build - depends_on "icu4c" - - # Per upstream - "Need g++ 4.8 or clang++ 3.4". - fails_with :clang if MacOS.version <= :snow_leopard - fails_with :gcc_4_2 - ("4.3".."4.7").each do |n| - fails_with :gcc => n - end - - # We track major/minor from upstream Node releases. - # We will accept *important* npm patch releases when necessary. - resource "npm" do - url "https://registry.npmjs.org/npm/-/npm-6.5.0.tgz" - sha256 "b0c25f9610085da20921e7eec6ddcecef7fc5ffa6c1b2ddd4007edd5e8414eb2" - end - - def install - # Never install the bundled "npm", always prefer our - # installation from tarball for better packaging control. - args = %W[--prefix=#{prefix} --without-npm --with-intl=system-icu] - args << "--tag=head" if build.head? - - system "./configure", *args - system "make", "install" - - # Allow npm to find Node before installation has completed. - ENV.prepend_path "PATH", bin - - bootstrap = buildpath/"npm_bootstrap" - bootstrap.install resource("npm") - system "node", bootstrap/"bin/npm-cli.js", "install", "-ddd", "--global", - "--prefix=#{libexec}", resource("npm").cached_download - - # The `package.json` stores integrity information about the above passed - # in `cached_download` npm resource, which breaks `npm -g outdated npm`. - # This copies back over the vanilla `package.json` to fix this issue. - cp bootstrap/"package.json", libexec/"lib/node_modules/npm" - # These symlinks are never used & they've caused issues in the past. - rm_rf libexec/"share" - - bash_completion.install bootstrap/"lib/utils/completion.sh" => "npm" - end - - def post_install - node_modules = HOMEBREW_PREFIX/"lib/node_modules" - node_modules.mkpath - # Kill npm but preserve all other modules across node updates/upgrades. - rm_rf node_modules/"npm" - - cp_r libexec/"lib/node_modules/npm", node_modules - # This symlink doesn't hop into homebrew_prefix/bin automatically so - # we make our own. This is a small consequence of our - # bottle-npm-and-retain-a-private-copy-in-libexec setup - # All other installs **do** symlink to homebrew_prefix/bin correctly. - # We ln rather than cp this because doing so mimics npm's normal install. - ln_sf node_modules/"npm/bin/npm-cli.js", HOMEBREW_PREFIX/"bin/npm" - ln_sf node_modules/"npm/bin/npx-cli.js", HOMEBREW_PREFIX/"bin/npx" - - # Let's do the manpage dance. It's just a jump to the left. - # And then a step to the right, with your hand on rm_f. - %w[man1 man5 man7].each do |man| - # Dirs must exist first: https://github.com/Homebrew/legacy-homebrew/issues/35969 - mkdir_p HOMEBREW_PREFIX/"share/man/#{man}" - rm_f Dir[HOMEBREW_PREFIX/"share/man/#{man}/{npm.,npm-,npmrc.,package.json.,npx.}*"] - cp Dir[libexec/"lib/node_modules/npm/man/#{man}/{npm,package.json,npx}*"], HOMEBREW_PREFIX/"share/man/#{man}" - end - - (node_modules/"npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") - end - - test do - path = testpath/"test.js" - path.write "console.log('hello');" - - output = shell_output("#{bin}/node #{path}").strip - assert_equal "hello", output - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip - assert_equal "1,234.56", output - - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip - assert_equal "1.234,56", output - - # make sure npm can find node - ENV.prepend_path "PATH", opt_bin - ENV.delete "NVM_NODEJS_ORG_MIRROR" - assert_equal which("node"), opt_bin/"node" - assert_predicate HOMEBREW_PREFIX/"bin/npm", :exist?, "npm must exist" - assert_predicate HOMEBREW_PREFIX/"bin/npm", :executable?, "npm must be executable" - npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] - system "#{HOMEBREW_PREFIX}/bin/npm", *npm_args, "install", "npm@latest" - system "#{HOMEBREW_PREFIX}/bin/npm", *npm_args, "install", "bufferutil" unless head? - assert_predicate HOMEBREW_PREFIX/"bin/npx", :exist?, "npx must exist" - assert_predicate HOMEBREW_PREFIX/"bin/npx", :executable?, "npx must be executable" - assert_match "< hello >", shell_output("#{HOMEBREW_PREFIX}/bin/npx cowsay hello") - end -end diff --git a/Formula/node@10.rb b/Formula/node@10.rb deleted file mode 100644 index e87ef3d89dabc..0000000000000 --- a/Formula/node@10.rb +++ /dev/null @@ -1,61 +0,0 @@ -class NodeAT10 < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v10.15.0/node-v10.15.0.tar.gz" - sha256 "dbe467e3dabb6854fcb0cd96e04082268cb1e313ce97a4b7100b2ed152b0a0ab" - - bottle do - cellar :any - sha256 "5a411a2295f6040438ad96a572bcaeb587b168bd5b5414b298965293ec73be34" => :mojave - sha256 "b80b682c346c4bb9b398ed4a085d6d8ec5eac0755ba2a6714b6df448e46a0277" => :high_sierra - sha256 "555b29c365df7c2903e5f98d1802826194bfa48b0607299a3d70cb657578cb50" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "python@2" => :build - depends_on "icu4c" - - # Per upstream - "Need g++ 4.8 or clang++ 3.4". - fails_with :clang if MacOS.version <= :snow_leopard - fails_with :gcc_4_2 - ("4.3".."4.7").each do |n| - fails_with :gcc => n - end - - def install - system "./configure", "--prefix=#{prefix}", "--with-intl=system-icu" - system "make", "install" - end - - def post_install - (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") - end - - test do - path = testpath/"test.js" - path.write "console.log('hello');" - - output = shell_output("#{bin}/node #{path}").strip - assert_equal "hello", output - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip - assert_equal "1,234.56", output - - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip - assert_equal "1.234,56", output - - # make sure npm can find node - ENV.prepend_path "PATH", opt_bin - ENV.delete "NVM_NODEJS_ORG_MIRROR" - assert_equal which("node"), opt_bin/"node" - assert_predicate bin/"npm", :exist?, "npm must exist" - assert_predicate bin/"npm", :executable?, "npm must be executable" - npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] - system "#{bin}/npm", *npm_args, "install", "npm@latest" - system "#{bin}/npm", *npm_args, "install", "bignum" - assert_predicate bin/"npx", :exist?, "npx must exist" - assert_predicate bin/"npx", :executable?, "npx must be executable" - assert_match "< hello >", shell_output("#{bin}/npx cowsay hello") - end -end diff --git a/Formula/node@6.rb b/Formula/node@6.rb deleted file mode 100644 index 6e1774d367d64..0000000000000 --- a/Formula/node@6.rb +++ /dev/null @@ -1,72 +0,0 @@ -class NodeAT6 < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v6.16.0/node-v6.16.0.tar.xz" - sha256 "0d0882a9da1ccc217518d3d1a60dd238da9f52bed0c7daac42b8dc3d83bd7546" - - bottle do - cellar :any_skip_relocation - sha256 "bb84229c998be50def2edd24704db1c50b89531df9ffd4089afc3ce79618ac3f" => :mojave - sha256 "15f2347562850d6c8cbe6bdc5045df18f05c4564d4643bcdb1975adaf3ccb195" => :high_sierra - sha256 "592951f64ef960db27cac1fefc609098a66ce0c587f9c56adc7efb0f2ce538ef" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "python@2" => :build - - # Per upstream - "Need g++ 4.8 or clang++ 3.4". - fails_with :clang if MacOS.version <= :snow_leopard - fails_with :gcc_4_2 - ("4.3".."4.7").each do |n| - fails_with :gcc => n - end - - resource "icu4c" do - url "https://ssl.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.tgz" - version "58.2" - sha256 "2b0a4410153a9b20de0e20c7d8b66049a72aef244b53683d0d7521371683da0c" - end - - def install - # Switches standard libary for native addons from libstdc++ to libc++ to - # match the superenv enforced one for the node binary itself. This fixes - # incompatibilities between native addons built with our node-gyp and our - # node binary and makes building native addons with XCode 10.1+ possible. - inreplace "common.gypi", "'MACOSX_DEPLOYMENT_TARGET': '10.7',", - "'MACOSX_DEPLOYMENT_TARGET': '#{MacOS.version}'," - resource("icu4c").stage buildpath/"deps/icu" - system "./configure", "--prefix=#{prefix}", "--with-intl=full-icu" - system "make", "install" - end - - def post_install - # sets global prefix and prevents our patched common.gypi to be overriden - # with the one downloaded by node-gyp with the header tarball otherwise - (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\nnodedir = #{opt_prefix}\n") - end - - test do - path = testpath/"test.js" - path.write "console.log('hello');" - - output = shell_output("#{bin}/node #{path}").strip - assert_equal "hello", output - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip - assert_equal "1,234.56", output - - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip - assert_equal "1.234,56", output - - # make sure npm can find node - ENV.prepend_path "PATH", opt_bin - ENV.delete "NVM_NODEJS_ORG_MIRROR" - assert_equal which("node"), opt_bin/"node" - assert_predicate bin/"npm", :exist?, "npm must exist" - assert_predicate bin/"npm", :executable?, "npm must be executable" - npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] - system "#{bin}/npm", *npm_args, "install", "npm@latest" - system "#{bin}/npm", *npm_args, "install", "bignum" - end -end diff --git a/Formula/node@8.rb b/Formula/node@8.rb deleted file mode 100644 index 3b2c8d90c5e55..0000000000000 --- a/Formula/node@8.rb +++ /dev/null @@ -1,61 +0,0 @@ -class NodeAT8 < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v8.15.0/node-v8.15.0.tar.xz" - sha256 "968523333947cc3f769d73dedc6c9c60580826d8714bc0e62ca4589de6a7c633" - - bottle do - cellar :any - sha256 "5884893d57469b18879fffe1970ec5d5e505b0370625d5d5b309fbf061eba4c3" => :mojave - sha256 "ddbae85940155efe187c4e9d6f7d1836f7184a2cfb9ab15003d2adc7698fd4a0" => :high_sierra - sha256 "70e7a459a6b16ba89c1c6c9b30b8ffe0e73e94b149ccd32f2f0771dfb3d3ff32" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "python@2" => :build - depends_on "icu4c" - - # Per upstream - "Need g++ 4.8 or clang++ 3.4". - fails_with :clang if MacOS.version <= :snow_leopard - fails_with :gcc_4_2 - ("4.3".."4.7").each do |n| - fails_with :gcc => n - end - - def install - system "./configure", "--prefix=#{prefix}", "--with-intl=system-icu" - system "make", "install" - end - - def post_install - (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n") - end - - test do - path = testpath/"test.js" - path.write "console.log('hello');" - - output = shell_output("#{bin}/node #{path}").strip - assert_equal "hello", output - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip - assert_equal "1,234.56", output - - output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"de-DE\").format(1234.56))'").strip - assert_equal "1.234,56", output - - # make sure npm can find node - ENV.prepend_path "PATH", opt_bin - ENV.delete "NVM_NODEJS_ORG_MIRROR" - assert_equal which("node"), opt_bin/"node" - assert_predicate bin/"npm", :exist?, "npm must exist" - assert_predicate bin/"npm", :executable?, "npm must be executable" - npm_args = ["-ddd", "--cache=#{HOMEBREW_CACHE}/npm_cache", "--build-from-source"] - system "#{bin}/npm", *npm_args, "install", "npm@latest" - system "#{bin}/npm", *npm_args, "install", "bignum" - assert_predicate bin/"npx", :exist?, "npx must exist" - assert_predicate bin/"npx", :executable?, "npx must be executable" - assert_match "< hello >", shell_output("#{bin}/npx cowsay hello") - end -end diff --git a/Formula/node_exporter.rb b/Formula/node_exporter.rb deleted file mode 100644 index 66a3a8dddf42b..0000000000000 --- a/Formula/node_exporter.rb +++ /dev/null @@ -1,78 +0,0 @@ -class NodeExporter < Formula - desc "Prometheus exporter for machine metrics" - homepage "https://prometheus.io/" - url "https://github.com/prometheus/node_exporter/archive/v0.16.0.tar.gz" - sha256 "2ed1c1c199e047b1524b49a6662d5969936e81520d6613b8b68cc3effda450cf" - - bottle do - cellar :any_skip_relocation - sha256 "18aec98484b6171e130b362cb4fdf061ae556889b5a4d0f5e54590bed772d40f" => :mojave - sha256 "73a63fee885b246f401e3bb5f2ba2ef151a0d445d2c5be3480eb5ad7e34c5150" => :high_sierra - sha256 "a2f81f31c72150cff3ce0442ae63e783b4c8d9ea6b04cce353caed36f373c464" => :sierra - sha256 "43917856258a8a777b2632921070b002853b266438495320ca20d5eda6a95809" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/prometheus").mkpath - ln_s buildpath, "src/github.com/prometheus/node_exporter" - system "go", "build", "-o", bin/"node_exporter", "-ldflags", - "-X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.Version=#{version}", - "github.com/prometheus/node_exporter" - end - - def caveats; <<~EOS - When used with `brew services`, node_exporter's configuration is stored as command line flags in - #{etc}/node_exporter.args - - Example configuration: - echo --web.listen-address :9101 > #{etc}/node_exporter.args - - For the full list of options, execute - node_exporter -h - EOS - end - - plist_options :manual => "node_exporter" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - sh - -c - #{opt_bin}/node_exporter $(< #{etc}/node_exporter.args) - - RunAtLoad - - KeepAlive - - StandardErrorPath - #{var}/log/node_exporter.err.log - StandardOutPath - #{var}/log/node_exporter.log - - - EOS - end - - test do - output = shell_output("#{bin}/node_exporter --version 2>&1") - assert_match version.to_s, output - begin - pid = fork { exec bin/"node_exporter" } - sleep 2 - assert_match "# HELP", shell_output("curl -s localhost:9100/metrics") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/nodebrew.rb b/Formula/nodebrew.rb deleted file mode 100644 index d4537ddc94abf..0000000000000 --- a/Formula/nodebrew.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Nodebrew < Formula - desc "Node.js version manager" - homepage "https://github.com/hokaccha/nodebrew" - url "https://github.com/hokaccha/nodebrew/archive/v1.0.1.tar.gz" - sha256 "c34e7186d4fd493c5417ad5563ad39fd493a42695bd9a7758c3df10380e43399" - head "https://github.com/hokaccha/nodebrew.git" - - bottle :unneeded - - def install - bin.install "nodebrew" - bash_completion.install "completions/bash/nodebrew-completion" => "nodebrew" - zsh_completion.install "completions/zsh/_nodebrew" - end - - def caveats; <<~EOS - You need to manually run setup_dirs to create directories required by nodebrew: - #{opt_bin}/nodebrew setup_dirs - - Add path: - export PATH=$HOME/.nodebrew/current/bin:$PATH - - To use Homebrew's directories rather than ~/.nodebrew add to your profile: - export NODEBREW_ROOT=#{var}/nodebrew - EOS - end - - test do - assert_match /v0.10.0/, shell_output("#{bin}/nodebrew ls-remote") - end -end diff --git a/Formula/nodeenv.rb b/Formula/nodeenv.rb deleted file mode 100644 index bf96d64559b14..0000000000000 --- a/Formula/nodeenv.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Nodeenv < Formula - desc "Node.js virtual environment builder" - homepage "https://github.com/ekalinin/nodeenv" - url "https://github.com/ekalinin/nodeenv/archive/1.3.3.tar.gz" - sha256 "51711cde99729c6a6d8a03b4abb03347609f861c14f2ff9a8926a9d83d9647b4" - - bottle :unneeded - - def install - bin.install "nodeenv.py" => "nodeenv" - end - - test do - system bin/"nodeenv", "--node=0.10.40", "--prebuilt", "env-0.10.40-prebuilt" - # Dropping into the virtualenv itself requires sourcing activate which - # isn't easy to deal with. This ensures current Node installed & functional. - ENV.prepend_path "PATH", testpath/"env-0.10.40-prebuilt/bin" - - (testpath/"test.js").write "console.log('hello');" - assert_match "hello", shell_output("node test.js") - assert_match "v0.10.40", shell_output("node -v") - end -end diff --git a/Formula/nodenv.rb b/Formula/nodenv.rb deleted file mode 100644 index 3462d3eaf4798..0000000000000 --- a/Formula/nodenv.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Nodenv < Formula - desc "Manage multiple NodeJS versions" - homepage "https://github.com/nodenv/nodenv" - url "https://github.com/nodenv/nodenv/archive/v1.2.0.tar.gz" - sha256 "a922ddaa9b3d7b3190a46c4db2c4550d608f752cf7a701a15957cef976508ab7" - head "https://github.com/nodenv/nodenv.git" - - bottle :unneeded - - depends_on "node-build" - - def install - inreplace "libexec/nodenv" do |s| - s.gsub! "/usr/local", HOMEBREW_PREFIX - s.gsub! '"${BASH_SOURCE%/*}"/../libexec', libexec - end - - %w[--version hooks versions].each do |cmd| - inreplace "libexec/nodenv-#{cmd}", "${BASH_SOURCE%/*}", libexec - end - - # Compile bash extension - system "src/configure" - system "make", "-C", "src" - - if build.head? - # Record exact git revision for `nodenv --version` output - git_revision = `git rev-parse --short HEAD`.chomp - inreplace "libexec/nodenv---version", /^(version=.+)/, - "\\1--g#{git_revision}" - end - - prefix.install "bin", "completions", "libexec" - end - - test do - shell_output("eval \"$(#{bin}/nodenv init -)\" && nodenv --version") - end -end diff --git a/Formula/nomad.rb b/Formula/nomad.rb deleted file mode 100644 index de7e767e43629..0000000000000 --- a/Formula/nomad.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Nomad < Formula - desc "Distributed, Highly Available, Datacenter-Aware Scheduler" - homepage "https://www.nomadproject.io" - url "https://github.com/hashicorp/nomad/archive/v0.8.6.tar.gz" - sha256 "e69b447dcc2caeb3d5ecf904cf3c8f327a5185a84442ee4241a796d89f96e143" - head "https://github.com/hashicorp/nomad.git" - - bottle do - cellar :any_skip_relocation - sha256 "a72bc9a59af130df1c630f322f981d2aba9bd59ba3f5208f883b78c014dcd355" => :mojave - sha256 "beb1081e8b25c14e0cab63f9081292533e43adf6b06c587aa72a1a5ac15e9b89" => :high_sierra - sha256 "be3396776f78d117819e643f73353344a23a52f57067d592571498dad6dde884" => :sierra - end - - depends_on "go@1.10" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/hashicorp/nomad").install buildpath.children - cd "src/github.com/hashicorp/nomad" do - system "go", "build", "-tags", "ui", "-o", bin/"nomad" - prefix.install_metafiles - end - end - - test do - begin - pid = fork do - exec "#{bin}/nomad", "agent", "-dev" - end - sleep 10 - ENV.append "NOMAD_ADDR", "http://127.0.0.1:4646" - system "#{bin}/nomad", "node-status" - ensure - Process.kill("TERM", pid) - end - end -end diff --git a/Formula/nopoll.rb b/Formula/nopoll.rb deleted file mode 100644 index 405e55d0b21ba..0000000000000 --- a/Formula/nopoll.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Nopoll < Formula - desc "Open-source C WebSocket toolkit" - homepage "https://www.aspl.es/nopoll/" - url "https://www.aspl.es/nopoll/downloads/nopoll-0.4.6.b400.tar.gz" - version "0.4.6.b400" - sha256 "7f1b20f1d0525f30cdd2a4fc386d328b4cf98c6d11cef51fe62cd9491ba19ad9" - - bottle do - cellar :any - sha256 "1bee7669f14e9edea6c8d91f1cf9935c72e2c70202dcd4de840e0c36f68541cf" => :mojave - sha256 "4a3c7a4f2657685b3de1b6700625e8e61087219c3b51868ee45e3ac0924b5eae" => :high_sierra - sha256 "7695ccb4788ae836ca8e476f0d0f70216cca693e3f014c288edee90c18cb1df5" => :sierra - sha256 "266e0d329c27be6a5c9a202b0dd7c6745d7962be606321b9172c0a57b77b91b8" => :el_capitan - end - - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - noPollCtx *ctx = nopoll_ctx_new(); - nopoll_ctx_unref(ctx); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}/nopoll", "-L#{lib}", "-lnopoll", - "-o", "test" - system "./test" - end -end diff --git a/Formula/nordugrid-arc.rb b/Formula/nordugrid-arc.rb deleted file mode 100644 index 5506806b7dc50..0000000000000 --- a/Formula/nordugrid-arc.rb +++ /dev/null @@ -1,52 +0,0 @@ -class NordugridArc < Formula - desc "Grid computing middleware" - homepage "http://www.nordugrid.org/" - url "https://download.nordugrid.org/packages/nordugrid-arc/releases/5.0.2/src/nordugrid-arc-5.0.2.tar.gz" - sha256 "d7306d91b544eeba571ede341e43760997c46d4ccdacc8b785c64f594780a9d1" - - bottle do - sha256 "a5fba26334ea41da9949cda080a7543164f65132a1288642e6457501752b84a3" => :mojave - sha256 "acfeacf8f5c913e7f7323be53fbbb8e3100fdc6f36455eea6dc9a987e10c4a64" => :high_sierra - sha256 "d216048cdcf93d89caef1a7263e532577e1684dc3217b830ec80b5f61ab175c4" => :sierra - sha256 "c78502aa7927d0376c4f3fed72d7fa258f19d26faaaf302ca5c2cbb17a36cdf2" => :el_capitan - sha256 "121eb7d254c13ae76dada8ba27922dc1dc0b160b2f9fd2c45755c02d6ed67610" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "glibmm" - depends_on "globus-toolkit" - depends_on "libxml2" - - # build fails on Mavericks due to a clang compiler bug - # and bottling also fails if gcc is being used due to conflicts between - # libc++ and libstdc++ - depends_on :macos => :yosemite - - fails_with :clang do - build 500 - cause "Fails with 'template specialization requires \"template<>\"'" - end - - # bug filed upstream at https://bugzilla.nordugrid.org/show_bug.cgi?id=3514 - patch do - url "https://gist.githubusercontent.com/tschoonj/065dabc33be5ec636058/raw/beee466cdf5fe56f93af0b07022532b1945e9d2e/nordugrid-arc.diff" - sha256 "5561ea013ddd03ee4f72437f2e01f22b2c0cac2806bf837402724be281ac2b6d" - end - - needs :cxx11 - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--disable-swig", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"foo").write("data") - system "#{bin}/arccp", "foo", "bar" - end -end diff --git a/Formula/norm.rb b/Formula/norm.rb deleted file mode 100644 index 1cda1775b3b43..0000000000000 --- a/Formula/norm.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Norm < Formula - desc "NACK-Oriented Reliable Multicast" - homepage "https://www.nrl.navy.mil/itd/ncs/products/norm" - url "https://downloads.pf.itd.nrl.navy.mil/norm/archive/src-norm-1.5r6.tgz" - version "1.5r6" - sha256 "20ea2e8dd5d5e1ff1ff91dc7dab6db53a77d7b7183d8cf2425c215fd294f22a7" - - bottle do - cellar :any - sha256 "33fe80265196bcb17409ab524723c4dd3035862e3c4d0372bca8c5f56cd0b24b" => :mojave - sha256 "253fcd48d81db23132b15a295ef822f5d9f02f13a79ff4e906ad7381ca418bc7" => :high_sierra - sha256 "a23a43d211bccabe0df629618f53acf41d6250d1fc85111397d769f007d30b9f" => :sierra - sha256 "985bbdc34e0f8f16f2d377bea4c0442abb0f7cbaf67b56cb40b924bb09c394b5" => :el_capitan - sha256 "2c165178bfce5879bb6e031b4d54f741cad2868d67b03783f89a13d15503f28d" => :yosemite - sha256 "b5f802ff09e68b712f472f45aea9b634f6c45868bccaf708d565ff98a95b145e" => :mavericks - sha256 "e04bed5670762178e4415296b95829b9e3c75da265f9375c6c6efac310b7b3d4" => :mountain_lion - end - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf", "install" - include.install "include/normApi.h" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - NormInstanceHandle i; - i = NormCreateInstance(false); - assert(i != NORM_INSTANCE_INVALID); - NormDestroyInstance(i); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lnorm", "-o", "test" - system "./test" - end -end diff --git a/Formula/normalize.rb b/Formula/normalize.rb deleted file mode 100644 index 1b106f32b33f2..0000000000000 --- a/Formula/normalize.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Normalize < Formula - desc "Adjust volume of audio files to a standard level" - homepage "https://www.nongnu.org/normalize/" - url "https://savannah.nongnu.org/download/normalize/normalize-0.7.7.tar.gz" - sha256 "6055a2abccc64296e1c38f9652f2056d3a3c096538e164b8b9526e10b486b3d8" - - bottle do - cellar :any - rebuild 1 - sha256 "8e1ac6ecbf84164c27a804b158201b75ddaabd3237e5826d7ffc78fbe8ee7377" => :mojave - sha256 "e4dd195c639807e3e2e25fee6c5c6f3c4263a37a4c7f8f25ab656a96395faeaf" => :high_sierra - sha256 "1165de2721e8b4d7f373b9ad10f52c2cd49c44a24cd8fddab5ba51983164cefe" => :sierra - sha256 "052ab2e8b1f6a2aa1e634a30749612d927b5cee5cc9302e057bd02c599a1c256" => :el_capitan - sha256 "dcb42f107b9674e50d8994215f6d125e0fb9523b1d99b393fd00ee2b827be5e0" => :yosemite - sha256 "9c12615d384a706feb8ddb693dadacfc5bfc48827e5722dd6476325bbe5e90b9" => :mavericks - end - - depends_on "mad" - - conflicts_with "num-utils", :because => "both install `normalize` binaries" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - ] - - system "./configure", *args - system "make", "install" - end - - test do - cp test_fixtures("test.mp3"), testpath - system "#{bin}/normalize", "test.mp3" - end -end diff --git a/Formula/noti.rb b/Formula/noti.rb deleted file mode 100644 index be17a19e1e6a5..0000000000000 --- a/Formula/noti.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Noti < Formula - desc "Trigger notifications when a process completes" - homepage "https://github.com/variadico/noti" - url "https://github.com/variadico/noti/archive/3.1.0.tar.gz" - sha256 "3210059aefb9dbbefc67948518509eb2800209fe61bceb158360931dc8d2bd32" - - bottle do - cellar :any_skip_relocation - sha256 "472aa21bb739b064f79f2b7aed61ec699b1aa7ae9d239baef7947fa72817b583" => :mojave - sha256 "2ce04f2a8cf722016935a83010314a08a0bb0d9ca7aeed7b62dd9ceab4b73cda" => :high_sierra - sha256 "72d72841b3a4f488014abe42d27913c8d9049f681851e4abde30a4a8b2e64554" => :sierra - sha256 "72b5fa9563eaf47e3f25f7792bcd9500fb71432932aa4840af70c81c936b94c1" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - notipath = buildpath/"src/github.com/variadico/noti" - notipath.install Dir["*"] - - cd "src/github.com/variadico/noti/cmd/noti" do - system "go", "build" - bin.install "noti" - prefix.install_metafiles - end - end - - test do - system "#{bin}/noti", "-t", "Noti", "-m", "'Noti recipe installation test has finished.'" - end -end diff --git a/Formula/notmuch.rb b/Formula/notmuch.rb deleted file mode 100644 index c720bfb6da301..0000000000000 --- a/Formula/notmuch.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Notmuch < Formula - desc "Thread-based email index, search, and tagging" - homepage "https://notmuchmail.org" - url "https://notmuchmail.org/releases/notmuch-0.27.tar.gz" - sha256 "40d3192f8f130f227b511fc80be86310c7f60ccb6d043b563f201fa505de0876" - head "git://notmuchmail.org/git/notmuch" - - bottle do - cellar :any - sha256 "051ebe84019bba0cb4cae615916e357713252e47c01aea065225b1b2f51765ef" => :mojave - sha256 "4695a937a8e9debbeb27dfd880c7ecef2ae52b3efbaa124fe11417c6891856f1" => :high_sierra - sha256 "a0d4a811d4f7c28de66361b669269198614b73e987e26d2ed5a7238786167766" => :sierra - sha256 "3f2af1545594e7a3c2d42643dfabbdc4ba5a106bfd7927e325cea3bcc68e979c" => :el_capitan - end - - option "without-python@2", "Build without python2 support" - - deprecated_option "with-python3" => "with-python" - deprecated_option "without-python" => "without-python@2" - - depends_on "doxygen" => :build - depends_on "libgpg-error" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "glib" - depends_on "gmime" - depends_on "talloc" - depends_on "xapian" - depends_on "zlib" - depends_on "python@2" => :recommended - depends_on "emacs" => :optional - depends_on "python" => :optional - depends_on "ruby" => :optional - - # Fix SIP issue with python bindings - # A more comprehensive patch has been submitted upstream - # https://notmuchmail.org/pipermail/notmuch/2016/022631.html - patch :DATA - - def install - # configure runs `python -m sphinx.writers.manpage` to detect if - # `sphinx-build` will work - ENV.prepend_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"vendor/lib/python2.7/site-packages" - ENV.prepend_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"lib/python2.7/site-packages" - - args = %W[--prefix=#{prefix} --mandir=#{man}] - - if build.with? "emacs" - ENV.deparallelize # Emacs and parallel builds aren't friends - args << "--with-emacs" << "--emacslispdir=#{elisp}" << "--emacsetcdir=#{elisp}" - else - args << "--without-emacs" - end - - args << "--without-ruby" if build.without? "ruby" - - system "./configure", *args - system "make", "V=1", "install" - - if build.with? "ruby" - cd "bindings/ruby" do - # Prevent Makefile from trying to break free of the - # sandbox and mkdir in HOMEBREW_PREFIX. - inreplace "Makefile", HOMEBREW_PREFIX/"lib/ruby", lib/"ruby" - system "make", "install" - end - end - - Language::Python.each_python(build) do |python, _version| - cd "bindings/python" do - system python, *Language::Python.setup_install_args(prefix) - end - end - end - - test do - (testpath/".notmuch-config").write "[database]\npath=#{testpath}/Mail" - (testpath/"Mail").mkpath - assert_match "0 total", shell_output("#{bin}/notmuch new") - end -end - -__END__ -diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py -index b1eec2c..bce5190 100644 ---- a/bindings/python/notmuch/globals.py -+++ b/bindings/python/notmuch/globals.py -@@ -25,7 +25,7 @@ from notmuch.version import SOVERSION - try: - from os import uname - if uname()[0] == 'Darwin': -- nmlib = CDLL("libnotmuch.{0:s}.dylib".format(SOVERSION)) -+ nmlib = CDLL("HOMEBREW_PREFIX/lib/libnotmuch.{0:s}.dylib".format(SOVERSION)) - else: - nmlib = CDLL("libnotmuch.so.{0:s}".format(SOVERSION)) - except: diff --git a/Formula/noweb.rb b/Formula/noweb.rb deleted file mode 100644 index b7d6cb0c183c1..0000000000000 --- a/Formula/noweb.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Noweb < Formula - desc "WEB-like literate-programming tool" - homepage "https://www.cs.tufts.edu/~nr/noweb/" - # new canonical url (for newer versions): http://mirrors.ctan.org/web/noweb.zip - url "https://deb.debian.org/debian/pool/main/n/noweb/noweb_2.11b.orig.tar.gz" - sha256 "c913f26c1edb37e331c747619835b4cade000b54e459bb08f4d38899ab690d82" - - bottle do - cellar :any_skip_relocation - sha256 "e37f2dd197cbd312c8635ab73e92d904b1d02d485879aac2077b5361986fcc0f" => :mojave - sha256 "7d794eab58f440c640358ba7454f04f007b26b3b35a0d19acec1915c97c25c5b" => :high_sierra - sha256 "3235ad9e73a3371058c59319f6c2363444e66e1c43e9576af3e08e14dfca682b" => :sierra - sha256 "1a3ec7b1f7fba58e0d8064d279d518d69e50b1f813284792deb6b7db702eae38" => :el_capitan - sha256 "34dd66401fe717e1ed384114d7037ea7a6e0aaabe6f2a98f314c8d6bb41c25be" => :yosemite - sha256 "54bf1e45409d1c022d08dee3a43c4e2d7f038a646f00a5d5f2f6db90ff54d668" => :mavericks - sha256 "d422058f08a621f2d6ab78adabb887b550754cbb3c8581c31fe72f52300fc3f5" => :mountain_lion - end - - depends_on "icon" - - def texpath - prefix/"tex/generic/noweb" - end - - def install - cd "src" do - system "bash", "awkname", "awk" - system "make LIBSRC=icon ICONC=icont CFLAGS='-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=1'" - - bin.mkpath - lib.mkpath - man.mkpath - texpath.mkpath - - system "make", "install", "BIN=#{bin}", - "LIB=#{lib}", - "MAN=#{man}", - "TEXINPUTS=#{texpath}" - cd "icon" do - system "make", "install", "BIN=#{bin}", - "LIB=#{lib}", - "MAN=#{man}", - "TEXINPUTS=#{texpath}" - end - end - end - - def caveats; <<~EOS - TeX support files are installed in the directory: - - #{texpath} - - You may need to add the directory to TEXINPUTS to run noweb properly. - EOS - end - - test do - (testpath/"test.nw").write <<~EOS - \section{Hello world} - - Today I awoke and decided to write - some code, so I started to write Hello World in \textsf C. - - <>= - /* - <> - */ - #include - - int main(int argc, char *argv[]) { - printf("Hello World!\n"); - return 0; - } - @ - \noindent \ldots then I did the same in PHP. - - <>= - > - */ - echo "Hello world!\n"; - ?> - @ - \section{License} - Later the same day some lawyer reminded me about licenses. - So, here it is: - - <>= - This work is placed in the public domain. - EOS - assert_match "this file was generated automatically by noweave", - shell_output("#{bin}/noweave -filter l2h -index -html test.nw | #{bin}/htmltoc") - end -end diff --git a/Formula/np2.rb b/Formula/np2.rb deleted file mode 100644 index 9e3b57bc87741..0000000000000 --- a/Formula/np2.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Np2 < Formula - desc "Neko Project 2: PC-9801 emulator" - homepage "https://www.yui.ne.jp/np2/" - url "http://amethyst.yui.ne.jp/svn/pc98/np2/tags/VER_0_86/", :using => :svn, :revision => "2606" - head "http://amethyst.yui.ne.jp/svn/pc98/np2/trunk/", :using => :svn - - bottle do - cellar :any - sha256 "0d341c9c1da3caccb8c2746e876b578fcdda626cc7d6fe3c071b2a10a2216cb4" => :high_sierra - sha256 "18f54de6cd5a7b913c9be1af8494cce362d52f94c751c63da9beffcd4f3fc41c" => :sierra - sha256 "969d59ab9401163f14b9c5830f884f0ff9f4d25f81985472f6a41b5b4debcbff" => :el_capitan - sha256 "a7340b1deadb9fdb4e117b9d793e695631d7d9a52ae111703e9bc6ea796c290b" => :yosemite - end - - depends_on :xcode => :build - depends_on "sdl2" - depends_on "sdl2_ttf" - - def install - sdl2 = Formula["sdl2"] - sdl2_ttf = Formula["sdl2_ttf"] - - cd "sdl2/MacOSX" do - # Use brewed library paths - inreplace "np2sdl2.xcodeproj/project.pbxproj" do |s| - s.gsub! "BAF84E4B195AA35E00183062", "//BAF84E4B195AA35E00183062" - s.gsub! "HEADER_SEARCH_PATHS = (", - "LIBRARY_SEARCH_PATHS = (\"$(inherited)\", #{sdl2.lib}, #{sdl2_ttf.lib}); " \ - "HEADER_SEARCH_PATHS = (#{sdl2.include}/SDL2, #{sdl2.include}, #{sdl2_ttf.include}," - s.gsub! "buildSettings = {", 'buildSettings ={ OTHER_LDFLAGS = "-lSDL2 -lSDL2_ttf";' - end - # Force to use Japanese TTF font - inreplace "np2sdl2/compiler.h", "#define RESOURCE_US", "" - # Always use current working directory - inreplace "np2sdl2/main.m", "[pstrBundlePath UTF8String]", '"./"' - - xcodebuild "SYMROOT=build" - bin.install "build/Release/np2sdl2.app/Contents/MacOS/np2sdl2" => "np2" - end - end - - def caveats; <<~EOS - A Japanese TTF file named `default.ttf` should be in the working directory. - EOS - end - - test do - assert_match %r{Usage: #{bin}/np2}, shell_output("#{bin}/np2 -h", 1) - end -end diff --git a/Formula/npth.rb b/Formula/npth.rb deleted file mode 100644 index 33b0851bc35ec..0000000000000 --- a/Formula/npth.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Npth < Formula - desc "New GNU portable threads library" - homepage "https://gnupg.org/" - url "https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2" - mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/npth/npth-1.6.tar.bz2" - sha256 "1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1" - - bottle do - cellar :any - sha256 "bb0232908eedb717f98d636b910478ef4ce044866545725344ecae0b85251e1d" => :mojave - sha256 "51a68f02a29f9b1a596048894be6425696872ddbbc928b372c07a5e256df8ba8" => :high_sierra - sha256 "930defbdfa6136f82abdaa7efea0328390079d13f284798756997217eb31427d" => :sierra - sha256 "8b2591ec804a0e410e8bf8657487f2d26248307e7cf74b2e49906037618ebc03" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/npth-config", "--version" - end -end diff --git a/Formula/npush.rb b/Formula/npush.rb deleted file mode 100644 index 7551b442266b8..0000000000000 --- a/Formula/npush.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Npush < Formula - desc "Logic game simliar to Sokoban and Boulder Dash" - homepage "https://npush.sourceforge.io/" - url "https://downloads.sourceforge.net/project/npush/npush/0.7/npush-0.7.tgz" - sha256 "f216d2b3279e8737784f77d4843c9e6f223fa131ce1ebddaf00ad802aba2bcd9" - head "http://svn.code.sf.net/p/npush/code/" - - bottle do - cellar :any_skip_relocation - sha256 "fb3618689797a95b8296a7b37f3c8f2e9cb29fdcbd9b2fc9ac9d585e46d6eab3" => :mojave - sha256 "c3d40f8709487c01053f5ea09e35c047ae6bfede34d21e97703d38c9985d67b0" => :high_sierra - sha256 "ce2f958ef8d766791137266e74b7c2cd0843755d080ecbbd6a7074bc7d035c19" => :sierra - sha256 "c37e743784c68e9c1bb1527d4c6161a5653831de44b3203be8c1cb07d9eeb7c2" => :el_capitan - sha256 "d334de125247efff9ce8031cedbb240a493b355a66cae5e6687cefb414d69ffb" => :yosemite - end - - def install - system "make" - pkgshare.install ["npush", "levels"] - (bin/"npush").write <<~EOS - #!/bin/sh - cd "#{pkgshare}" && exec ./npush $@ - EOS - end -end diff --git a/Formula/nq.rb b/Formula/nq.rb deleted file mode 100644 index 0a735488e34bb..0000000000000 --- a/Formula/nq.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Nq < Formula - desc "Unix command-line queue utility" - homepage "https://github.com/chneukirchen/nq" - url "https://github.com/chneukirchen/nq/archive/v0.3.1.tar.gz" - sha256 "8897a747843fe246a6f8a43e181ae79ef286122a596214480781a02ef4ea304b" - head "https://github.com/chneukirchen/nq.git" - - bottle do - cellar :any_skip_relocation - sha256 "b5b3f7b76cc79a5bc6d4a55e4fb3e018b08052dc7faa173300b1ddf2e16e6bee" => :mojave - sha256 "a6d18f2d7f1fafd661a5d145599969707efe71969ccc6ac34593f3f60c59081a" => :high_sierra - sha256 "0e8d6557f7713be4c1e5074ea909d36cd12e2e17d85a1c0a1141ac64f06953d3" => :sierra - sha256 "67374f5db8a35f877a16e0fdbd313276fb269db81ce49e7654fb61fa865417cd" => :el_capitan - end - - depends_on :macos => :yosemite - - def install - system "make", "all", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/nq", "touch", "TEST" - assert_match /exited with status 0/, shell_output("#{bin}/fq -a") - assert_predicate testpath/"TEST", :exist? - end -end diff --git a/Formula/nqp.rb b/Formula/nqp.rb deleted file mode 100644 index 9e2ef437926bb..0000000000000 --- a/Formula/nqp.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Nqp < Formula - desc "Lightweight Perl 6-like environment for virtual machines" - homepage "https://github.com/perl6/nqp" - url "https://rakudo.perl6.org/downloads/nqp/nqp-2018.12.tar.gz" - sha256 "219db519ad5c1848e4528a56a506dd74b0839ca1d910788411f3bfedf5045d36" - - bottle do - sha256 "569cf43abc5112a08f1f55cb4f2649eca9f1a3f6191f5f91b6d01806534e06e1" => :mojave - sha256 "e56cb5085cdd5223e6657d23deaba45f4f980aec52fc424ca2cccff91ceca165" => :high_sierra - sha256 "0c0e3f3d6995c83b8b91f3a44a0222018d8dd8b2529dc1ed31547afe19c9129c" => :sierra - end - - depends_on "moarvm" - - def install - system "perl", "Configure.pl", - "--backends=moar", - "--prefix=#{prefix}", - "--with-moar=#{Formula["moarvm"].bin}/moar" - system "make" - system "make", "install" - end - - test do - out = shell_output("#{bin}/nqp -e 'for (0,1,2,3,4,5,6,7,8,9) { print($_) }'") - assert_equal "0123456789", out - end -end diff --git a/Formula/nrg2iso.rb b/Formula/nrg2iso.rb deleted file mode 100644 index 5352e09d72ea4..0000000000000 --- a/Formula/nrg2iso.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Nrg2iso < Formula - desc "Extract ISO9660 data from Nero nrg files" - homepage "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso.en.html" - url "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso-0.4.tar.gz" - sha256 "25049d864680ec12bbe31b20597ce8c1ba3a4fe7a7f11e25742b83e2fda94aa3" - - bottle do - cellar :any_skip_relocation - sha256 "6ff39712b0f4c8ba707eb1850ced8e9e0f14d3dc615cb9fb5a16456f0f69d680" => :mojave - sha256 "7fcd88c9587e77ec07210ace97b4432197545ea4d70ff547b1b44977aef8eb8a" => :high_sierra - sha256 "01177e7bc064b062c454caad61c24b80deb20768ab2d880c77ba20708ac6e709" => :sierra - sha256 "fed88dfb217cc0b5fa0a4f7a7aec40342314998624e084921e1b5cc02d08d27d" => :el_capitan - sha256 "18949f41b9ba386c996a49541875d3320184b88dccb04136846f32b3d681e647" => :yosemite - sha256 "a46624bc9fc5f7883e923920dbc96aef720e5bb37b4ac71a281d101b96decee6" => :mavericks - sha256 "7ae80a678e7641b6b7838aac679caad0c5c2213f068c1141e8b8cb01539babb3" => :mountain_lion - end - - def install - system "make" - bin.install "nrg2iso" - end - - test do - assert_equal "nrg2iso v#{version}", - shell_output("#{bin}/nrg2iso --version").chomp - end -end diff --git a/Formula/nrpe.rb b/Formula/nrpe.rb deleted file mode 100644 index a430c178754c8..0000000000000 --- a/Formula/nrpe.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Nrpe < Formula - desc "Nagios remote plugin executor" - homepage "https://www.nagios.org/" - url "https://downloads.sourceforge.net/project/nagios/nrpe-3.x/nrpe-3.2.1.tar.gz" - sha256 "8ad2d1846ab9011fdd2942b8fc0c99dfad9a97e57f4a3e6e394a4ead99c0f1f0" - - bottle do - cellar :any - sha256 "d17a16f0cac16d2c1e075df0834a6c77e4a3489339185e0dc645250597f69cbf" => :mojave - sha256 "98eb09fe948052448134155aad5cc16892f9cffeba075cfc9afeb38219047806" => :high_sierra - sha256 "d589496fa3b62e1425f93ebf928234bcfec81cf342837e7b741c9def56ea3e28" => :sierra - sha256 "50cafb3e1545d93f0ad248a2696b83b90fa3fbb6e5afc731d72779ddab0bf6a0" => :el_capitan - end - - depends_on "nagios-plugins" - depends_on "openssl" - - def install - user = `id -un`.chomp - group = `id -gn`.chomp - - system "./configure", "--prefix=#{prefix}", - "--libexecdir=#{HOMEBREW_PREFIX}/sbin", - "--with-piddir=#{var}/run", - "--sysconfdir=#{etc}", - "--with-nrpe-user=#{user}", - "--with-nrpe-group=#{group}", - "--with-nagios-user=#{user}", - "--with-nagios-group=#{group}", - "--with-ssl=#{Formula["openssl"].opt_prefix}", - # Set both or it still looks for /usr/lib - "--with-ssl-lib=#{Formula["openssl"].opt_lib}", - "--enable-ssl", - "--enable-command-args" - - inreplace "src/Makefile" do |s| - s.gsub! "$(LIBEXECDIR)", "$(SBINDIR)" - s.gsub! "$(DESTDIR)/usr/local/sbin", "$(SBINDIR)" - end - - system "make", "all" - system "make", "install", "install-config" - end - - def post_install - (var/"run").mkpath - end - - plist_options :manual => "nrpe -n -c #{HOMEBREW_PREFIX}/etc/nrpe.cfg -d" - - def plist; <<~EOS - - - - - Label - org.nrpe.agent - ProgramArguments - - #{opt_bin}/nrpe - -c - #{etc}/nrpe.cfg - -d - - RunAtLoad - - ServiceDescription - Homebrew NRPE Agent - Debug - - - - EOS - end - - test do - pid = fork do - exec "#{bin}/nrpe", "-n", "-c", "#{etc}/nrpe.cfg", "-d" - end - sleep 2 - - begin - output = shell_output("netstat -an") - assert_match /.*\*\.5666.*LISTEN/, output, "nrpe did not start" - pid_nrpe = shell_output("pgrep nrpe").to_i - ensure - Process.kill("SIGINT", pid_nrpe) - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/nsd.rb b/Formula/nsd.rb deleted file mode 100644 index d863b97492678..0000000000000 --- a/Formula/nsd.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Nsd < Formula - desc "Name server daemon" - homepage "https://www.nlnetlabs.nl/projects/nsd/" - url "https://www.nlnetlabs.nl/downloads/nsd/nsd-4.1.26.tar.gz" - sha256 "9f8a41431d21034d64b9a910567b201636521b64b6a9947390bf898388dc15f4" - - bottle do - sha256 "c6b5c0509a19d4d2fe630072bbed9ce46669b7dac87c0bf16e6faccc3655ed5c" => :mojave - sha256 "9c34a354bef7ccd60e9ffa227ac8a815b6e05e7443ec4b11ebb540f16cea744a" => :high_sierra - sha256 "32ce66e05477e1408616e58812ca58cd6571600e7c336521ef0a8254ab99e644" => :sierra - end - - depends_on "libevent" - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}", - "--with-libevent=#{Formula["libevent"].opt_prefix}", - "--with-ssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - test do - system "#{sbin}/nsd", "-v" - end -end diff --git a/Formula/nsnake.rb b/Formula/nsnake.rb deleted file mode 100644 index 4aadf82a6c997..0000000000000 --- a/Formula/nsnake.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Nsnake < Formula - desc "Classic snake game with textual interface" - homepage "https://github.com/alexdantas/nSnake" - url "https://downloads.sourceforge.net/project/nsnake/GNU-Linux/nsnake-3.0.1.tar.gz" - sha256 "e0a39e0e188a6a8502cb9fc05de3fa83dd4d61072c5b93a182136d1bccd39bb9" - head "https://github.com/alexdantas/nSnake.git" - - bottle do - sha256 "dde29d2cb7a2c64d3127f54cdad662d466c73618cf658e8bdfd7773d480cd04c" => :mojave - sha256 "53160e1d77458a3116a8b65273bae7d515b9e1c817523a1f632ae357c835877b" => :high_sierra - sha256 "b1de1091630f4e16fc2e0767801034fc9e81618888035ab7dbc17bb3a0082d83" => :sierra - sha256 "ea456b15c9edb91530c56e0f0f1da78aef138eb4805cfd083a7fdf9e3579c36d" => :el_capitan - sha256 "bb902bc64d9028e4d2341eed665809c77e7e4bb6fb614309111962c1e46c8c17" => :yosemite - end - - def install - system "make", "install", "PREFIX=#{prefix}" - - # No need for Linux desktop - (share/"applications").rmtree - (share/"icons").rmtree - (share/"pixmaps").rmtree - end - - test do - assert_match /nsnake v#{version} /, shell_output("#{bin}/nsnake -v") - end -end diff --git a/Formula/nspr.rb b/Formula/nspr.rb deleted file mode 100644 index 9fad9066061d3..0000000000000 --- a/Formula/nspr.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Nspr < Formula - desc "Platform-neutral API for system-level and libc-like functions" - homepage "https://developer.mozilla.org/docs/Mozilla/Projects/NSPR" - url "https://archive.mozilla.org/pub/mozilla.org/nspr/releases/v4.20/src/nspr-4.20.tar.gz" - sha256 "2c8964913da89ffbaf464d49ce44d79e8804e1794ef9a8c52a7bff7224d1556e" - - bottle do - cellar :any - sha256 "7263b00a86a15844b36baedf684fce6bc2b1608cfa4759353dad6005f02e2789" => :mojave - sha256 "2f81a6af2ef8632567e45e0a1b442b33583da98ed968aeda7e167caaf38bf11a" => :high_sierra - sha256 "4b1c5d6e2e7a758c58594c569606650f4ef831b280735d5a1cc58e3201ca716e" => :sierra - sha256 "d2863a8a722ad55128333d635774c2ce3de0300000648c39fc61748f638b6320" => :el_capitan - end - - def install - ENV.deparallelize - cd "nspr" do - # Fixes a bug with linking against CoreFoundation, needed to work with SpiderMonkey - # See: https://openradar.appspot.com/7209349 - inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", "" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --enable-strip - --with-pthreads - --enable-ipv6 - --enable-macos-target=#{MacOS.version} - --enable-64bit - ] - system "./configure", *args - # Remove the broken (for anyone but Firefox) install_name - inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", "-install_name #{lib}/$@ " - - system "make" - system "make", "install" - - (bin/"compile-et.pl").unlink - (bin/"prerr.properties").unlink - end - end - - test do - system "#{bin}/nspr-config", "--version" - end -end diff --git a/Formula/nsq.rb b/Formula/nsq.rb deleted file mode 100644 index 69be4130212bc..0000000000000 --- a/Formula/nsq.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Nsq < Formula - desc "Realtime distributed messaging platform" - homepage "https://nsq.io/" - url "https://github.com/nsqio/nsq/archive/v1.1.0.tar.gz" - sha256 "85cb15cc9a7b50e779bc8e76309cff9bf555b2f925c2c8abe81d28d690fb1940" - head "https://github.com/nsqio/nsq.git" - - bottle do - cellar :any_skip_relocation - sha256 "2fa867147f43fa78509dc153f725c5e3325a1a268500811db2dfe5d90db6b823" => :mojave - sha256 "ff5ee1076510935d467a359172c57a487f5c4fa50537c28643f60b6254d60348" => :high_sierra - sha256 "e06823b1c505fff73402522d13a74f386106987c96c83dcccb0b8e68e169449a" => :sierra - sha256 "02225f180c8e5ebc9d5e0ecd30c0875738b10904143c031a07709a6661362243" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/nsqio/nsq").install buildpath.children - cd "src/github.com/nsqio/nsq" do - system "dep", "ensure", "--vendor-only" - system "make", "DESTDIR=#{prefix}", "PREFIX=", "install" - prefix.install_metafiles - end - end - - def post_install - (var/"log").mkpath - (var/"nsq").mkpath - end - - plist_options :manual => "nsqd -data-path=#{HOMEBREW_PREFIX}/var/nsq" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{bin}/nsqd - -data-path=#{var}/nsq - - RunAtLoad - - WorkingDirectory - #{var}/nsq - StandardErrorPath - #{var}/log/nsqd.error.log - StandardOutPath - #{var}/log/nsqd.log - - - EOS - end - - test do - begin - lookupd = fork do - exec bin/"nsqlookupd" - end - sleep 2 - d = fork do - exec bin/"nsqd", "--lookupd-tcp-address=127.0.0.1:4160" - end - sleep 2 - admin = fork do - exec bin/"nsqadmin", "--lookupd-http-address=127.0.0.1:4161" - end - sleep 2 - to_file = fork do - exec bin/"nsq_to_file", "--lookupd-http-address=127.0.0.1:4161", - "--output-dir=#{testpath}", - "--topic=test" - end - sleep 2 - system "curl", "-d", "hello", "http://127.0.0.1:4151/pub?topic=test" - sleep 2 - dat = File.read(Dir["*.dat"].first) - assert_match "test", dat - assert_match version.to_s, dat - ensure - Process.kill(9, lookupd) - Process.kill(9, d) - Process.kill(9, admin) - Process.kill(9, to_file) - Process.wait lookupd - Process.wait d - Process.wait admin - Process.wait to_file - end - end -end diff --git a/Formula/nss.rb b/Formula/nss.rb deleted file mode 100644 index d9f821ed0a068..0000000000000 --- a/Formula/nss.rb +++ /dev/null @@ -1,105 +0,0 @@ -class Nss < Formula - desc "Libraries for security-enabled client and server applications" - homepage "https://developer.mozilla.org/docs/NSS" - url "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_41_RTM/src/nss-3.41.tar.gz" - sha256 "ab2e18f5d0dd0079c0005396f9beb9a41e9a1bbc7e6c1d0a99affcef0471712d" - - bottle do - cellar :any - sha256 "4c2be50bd55375dcc950341de3608724a0a402610124ba987799b775991e2f7b" => :mojave - sha256 "e8e26b4f7c1f70220038ed7481f1fe762287d47374618b911c7d443404409aea" => :high_sierra - sha256 "e2169b752166641ad48d75b4e4c1be5fb97269d5783db74a5af988b050c69d0c" => :sierra - end - - keg_only <<~EOS - Firefox can pick this up instead of the built-in library, resulting in - random crashes without meaningful explanation. - - Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1142646 for details - EOS - - depends_on "nspr" - - def install - ENV.deparallelize - cd "nss" - - args = %W[ - BUILD_OPT=1 - NSS_USE_SYSTEM_SQLITE=1 - NSPR_INCLUDE_DIR=#{Formula["nspr"].opt_include}/nspr - NSPR_LIB_DIR=#{Formula["nspr"].opt_lib} - USE_64=1 - ] - - # Remove the broken (for anyone but Firefox) install_name - inreplace "coreconf/Darwin.mk", "-install_name @executable_path", "-install_name #{lib}" - inreplace "lib/freebl/config.mk", "@executable_path", lib - - system "make", "all", *args - - # We need to use cp here because all files get cross-linked into the dist - # hierarchy, and Homebrew's Pathname.install moves the symlink into the keg - # rather than copying the referenced file. - cd "../dist" - bin.mkpath - Dir.glob("Darwin*/bin/*") do |file| - cp file, bin unless file.include? ".dylib" - end - - include_target = include + "nss" - include_target.mkpath - Dir.glob("public/{dbm,nss}/*") { |file| cp file, include_target } - - lib.mkpath - libexec.mkpath - Dir.glob("Darwin*/lib/*") do |file| - if file.include? ".chk" - cp file, libexec - else - cp file, lib - end - end - # resolves conflict with openssl, see #28258 - rm lib/"libssl.a" - - (bin/"nss-config").write config_file - (lib/"pkgconfig/nss.pc").write pc_file - end - - test do - # See: https://developer.mozilla.org/docs/Mozilla/Projects/NSS/tools/NSS_Tools_certutil - (testpath/"passwd").write("It's a secret to everyone.") - system "#{bin}/certutil", "-N", "-d", pwd, "-f", "passwd" - system "#{bin}/certutil", "-L", "-d", pwd - end - - # A very minimal nss-config for configuring firefox etc. with this nss, - # see https://bugzil.la/530672 for the progress of upstream inclusion. - def config_file; <<~EOS - #!/bin/sh - for opt; do :; done - case "$opt" in - --version) opt="--modversion";; - --cflags|--libs) ;; - *) exit 1;; - esac - pkg-config "$opt" nss - EOS - end - - def pc_file; <<~EOS - prefix=#{prefix} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include/nss - - Name: NSS - Description: Mozilla Network Security Services - Version: #{version} - Requires: nspr >= 4.12 - Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 - Cflags: -I${includedir} - EOS - end -end diff --git a/Formula/nsuds.rb b/Formula/nsuds.rb deleted file mode 100644 index 167044529f301..0000000000000 --- a/Formula/nsuds.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Nsuds < Formula - desc "Ncurses Sudoku system" - homepage "https://nsuds.sourceforge.io/" - url "https://downloads.sourceforge.net/project/nsuds/nsuds/nsuds-0.7B/nsuds-0.7B.tar.gz" - sha256 "6d9b3e53f3cf45e9aa29f742f6a3f7bc83a1290099a62d9b8ba421879076926e" - - bottle do - sha256 "60d318290bb60415eb4abfdd7ffad468a24294892ac4ff90895cc0e589ea3da6" => :mojave - sha256 "26e82eae22288d51eda3742c0ae4f3e1b0b17a003461f1baec38ccaa52495d9f" => :high_sierra - sha256 "89ae2f310d8b21d98ababce7110f20d3d41da06b7a751447c56aa6dbd13a1950" => :sierra - sha256 "596fc55d7e2cc63e8fdc4f3648a23d2c3c9c9eee9775a6579410c28708c0a358" => :el_capitan - sha256 "9bc60ceced759f079112d97d9fc0a408fbe6d7d18d21d3cdcf5a3a2cbf2185cc" => :yosemite - end - - head do - url "https://git.code.sf.net/p/nsuds/code.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "autoreconf", "-i" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - inreplace "src/Makefile", /chgrp .*/, "" - system "make", "install" - end - - test do - assert_match /nsuds version #{version}$/, shell_output("#{bin}/nsuds -v") - end -end diff --git a/Formula/ntfs-3g.rb b/Formula/ntfs-3g.rb deleted file mode 100644 index aca376f7d2914..0000000000000 --- a/Formula/ntfs-3g.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Ntfs3g < Formula - desc "Read-write NTFS driver for FUSE" - homepage "https://www.tuxera.com/community/open-source-ntfs-3g/" - url "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz" - sha256 "3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5" - - bottle do - sha256 "7fca129fd960c9b8ea4459232ddbd7041b427825feb724903775b386000fb5ad" => :mojave - sha256 "f5fdf264ba84f10204564e7e33bac6cb2e657052bbf141ca735682f9d7842003" => :high_sierra - sha256 "66662baf5f187c4784ff9c4236d9595205c01c6c7141699b8afcdb4337304a0c" => :sierra - sha256 "dc2dc22afe3376cccb2a7d62f3faf4455a2422ebe4c96eaebd6d9249a00e3c2d" => :el_capitan - sha256 "160fd2811b0fe6e072194860e17e2abbe71b18a2ac2c16db15ceb2eaf1e9918a" => :yosemite - end - - head do - url "https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git", - :branch => "edge" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libgcrypt" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on :osxfuse - - # Detection of struct stat members fails Xcode 9 - # Reported by email on 2017-09-19 - if DevelopmentTools.clang_build_version >= 900 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e0b6faaa0d/ntfs-3g/10.13.patch" - sha256 "7550061c6ad7fd99e7c004d437a66af54af983acb9839e098156480106cd7a92" - end - end - - def install - ENV.append "LDFLAGS", "-lintl" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --exec-prefix=#{prefix} - --mandir=#{man} - --with-fuse=external - ] - - system "./autogen.sh" if build.head? - # Workaround for hardcoded /sbin in ntfsprogs - inreplace "ntfsprogs/Makefile.in", "/sbin", sbin - system "./configure", *args - system "make" - system "make", "install" - - # Install a script that can be used to enable automount - File.open("#{sbin}/mount_ntfs", File::CREAT|File::TRUNC|File::RDWR, 0755) do |f| - f.puts <<~EOS - #!/bin/bash - - VOLUME_NAME="${@:$#}" - VOLUME_NAME=${VOLUME_NAME#/Volumes/} - USER_ID=#{Process.uid} - GROUP_ID=#{Process.gid} - - if [ `/usr/bin/stat -f %u /dev/console` -ne 0 ]; then - USER_ID=`/usr/bin/stat -f %u /dev/console` - GROUP_ID=`/usr/bin/stat -f %g /dev/console` - fi - - #{opt_bin}/ntfs-3g \\ - -o volname="${VOLUME_NAME}" \\ - -o local \\ - -o negative_vncache \\ - -o auto_xattr \\ - -o auto_cache \\ - -o noatime \\ - -o windows_names \\ - -o user_xattr \\ - -o inherit \\ - -o uid=$USER_ID \\ - -o gid=$GROUP_ID \\ - -o allow_other \\ - "$@" >> /var/log/mount-ntfs-3g.log 2>&1 - - exit $?; - EOS - end - end - - test do - output = shell_output("#{bin}/ntfs-3g --version 2>&1") - assert_match version.to_s, output - end -end diff --git a/Formula/ntl.rb b/Formula/ntl.rb deleted file mode 100644 index bd01a0a9ae6d3..0000000000000 --- a/Formula/ntl.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Ntl < Formula - desc "C++ number theory library" - homepage "https://www.shoup.net/ntl" - url "https://www.shoup.net/ntl/ntl-11.3.0.tar.gz" - sha256 "3ae0d3647e5d52bc0907e1f4cb4a958460ee8e5b3c9862c1a4b8e9f0f75891dd" - - bottle do - cellar :any - sha256 "499ee8006071fea07f6d6d8321fdb43ff13422b250a14b079fc6603c983cccba" => :mojave - sha256 "e605a8e8d766ed861bbb53f8bc310f1fded4eeaecef5499de156c5992a98360c" => :high_sierra - sha256 "48b5d4f40cec55c8782b8bd631d470739cf0e681f1abe6dec0772d7d870534ff" => :sierra - sha256 "a9f60e9f64f1b8dd11519f3afbd9ff466a76e2410be9b9299cbc54527fea6203" => :el_capitan - end - - depends_on "gmp" - - def install - args = ["PREFIX=#{prefix}", "SHARED=on"] - - cd "src" do - system "./configure", *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"square.cc").write <<~EOS - #include - #include - - int main() - { - NTL::ZZ a; - std::cin >> a; - std::cout << NTL::power(a, 2); - return 0; - } - EOS - gmp = Formula["gmp"] - flags = %W[ - -std=c++11 - -I#{include} - -L#{gmp.opt_lib} - -L#{lib} - -lntl - -lgmp - ] - system ENV.cxx, "square.cc", "-o", "square", *flags - assert_equal "4611686018427387904", pipe_output("./square", "2147483648") - end -end diff --git a/Formula/ntopng.rb b/Formula/ntopng.rb deleted file mode 100644 index 456243de7660f..0000000000000 --- a/Formula/ntopng.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Ntopng < Formula - desc "Next generation version of the original ntop" - homepage "https://www.ntop.org/products/traffic-analysis/ntop/" - - stable do - url "https://github.com/ntop/ntopng/archive/3.6.1.tar.gz" - sha256 "3b2949d04d2b9a625f8ddfee24f5b0345fa648e135e8f947a389b599eb7117d0" - - resource "nDPI" do - url "https://github.com/ntop/nDPI/archive/2.4.tar.gz" - sha256 "5243e16b1c4a2728e9487466b2b496d8ffef18a44ff7ee6dfdc21e72008c6d29" - end - end - - bottle do - sha256 "d9070a2ff65e1ec34243718f4b34ee9553c19ce71a79f5d8bd570c4bbce41bef" => :mojave - sha256 "4ea92032db7726e6852c63bd494fd9037cf726cd3628ad83c0dd13f0b4d271bc" => :high_sierra - sha256 "c25c7c8f23a1d1f01c0bd1a170ccb0c295272716da1bcf9885a59292ca654962" => :sierra - sha256 "5da4764c214a070d75364d2f240c100271d886b0f2b31847a68ea369a4fddc8f" => :el_capitan - end - - head do - url "https://github.com/ntop/ntopng.git", :branch => "dev" - - resource "nDPI" do - url "https://github.com/ntop/nDPI.git", :branch => "dev" - end - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gnutls" => :build - depends_on "json-glib" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "zeromq" => :build - depends_on "geoip" - depends_on "json-c" - depends_on "libmaxminddb" - depends_on "lua" - depends_on "mysql-client" - depends_on "redis" - depends_on "rrdtool" - - def install - resource("nDPI").stage do - system "./autogen.sh" - system "make" - (buildpath/"nDPI").install Dir["*"] - end - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/ntopng", "-V" - end -end diff --git a/Formula/ntp.rb b/Formula/ntp.rb deleted file mode 100644 index 25431619e0bbf..0000000000000 --- a/Formula/ntp.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Ntp < Formula - desc "The Network Time Protocol (NTP) Distribution" - homepage "https://www.eecis.udel.edu/~mills/ntp/html/" - url "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p12.tar.gz" - version "4.2.8p12" - sha256 "709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454" - - bottle do - rebuild 1 - sha256 "0ad5a4953a1fc2598b0fee4ed85fdb61e62d6acd1c7a80aa8ba448cfd829e908" => :mojave - sha256 "00a29bdce9bc82c18aa824693146f8c0674af3ca8bef3f42f63c87ab5bd4aa02" => :high_sierra - sha256 "a37c6e3e17a8862d770e2f27a399d85198a68f88a592234db55fd80e06ff9cee" => :sierra - end - - depends_on "openssl" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-openssl-libdir=#{Formula["openssl"].lib} - --with-openssl-incdir=#{Formula["openssl"].include} - --with-net-snmp-config=no - ] - - system "./configure", *args - system "make", "install", "LDADD_LIBNTP=-lresolv -undefined dynamic_lookup" - end - - test do - assert_match "step time server ", shell_output("#{sbin}/ntpdate -bq pool.ntp.org") - end -end diff --git a/Formula/nu-smv.rb b/Formula/nu-smv.rb deleted file mode 100644 index a322415be8bc1..0000000000000 --- a/Formula/nu-smv.rb +++ /dev/null @@ -1,32 +0,0 @@ -class NuSmv < Formula - desc "Reimplementation and extension of SMV symbolic model checker" - homepage "http://nusmv.fbk.eu" - url "http://nusmv.fbk.eu/distrib/NuSMV-2.6.0.tar.gz" - sha256 "dba953ed6e69965a68cd4992f9cdac6c449a3d15bf60d200f704d3a02e4bbcbb" - - bottle do - cellar :any_skip_relocation - sha256 "c2cc207758d6f315db1116e0e162be72edc0356312c460cd3359dca8c7de597e" => :mojave - sha256 "f2e93143e60b64244fd25958a88480acee332fd4109a6bd356719dc6259efc36" => :high_sierra - sha256 "64f825eac53c6c16c9b3db4b505d37a6de9f1f3471863b39081b5a98d517fb3e" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "NuSMV/build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.smv").write <<~EOS - MODULE main - SPEC TRUE = TRUE - EOS - - output = shell_output("#{bin}/NuSMV test.smv") - assert_match "specification TRUE = TRUE is true", output - end -end diff --git a/Formula/nu.rb b/Formula/nu.rb deleted file mode 100644 index 69a869dabf2f3..0000000000000 --- a/Formula/nu.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Nu < Formula - desc "Object-oriented, Lisp-like programming language" - homepage "https://github.com/nulang/nu" - url "https://github.com/nulang/nu/archive/v2.2.2.tar.gz" - sha256 "7b1de5062ba2a87ee4cbf458f5f851a3c43473eec8aae3e17704e0dd4ff56b39" - - bottle do - cellar :any - sha256 "1fad2a9ee6b36b1c5afb989e9c4f2282fb3e4cdd7476f24febf561f17d4a5ef2" => :mojave - sha256 "2b2b032b705ea26fc837bb621ce54a319594112708ce2c960ee2d440723667b3" => :high_sierra - sha256 "1508d2c0376f54e1108568f79fa907244877f1d3981bbe6db69c6efcc7460c54" => :sierra - sha256 "183c89418f6803a6f1395545739da9012b4e049d160038d6d5c00e242243284a" => :el_capitan - sha256 "ba5bd173433144dbf6141cfced1c04f17f81c1cb014ea2f794090e6c5a5f8f4b" => :yosemite - end - - depends_on :macos => :lion - depends_on "pcre" - - fails_with :gcc do - build 5666 - cause "nu only builds with clang" - end - - def install - ENV.delete("SDKROOT") if MacOS.version < :sierra - ENV["PREFIX"] = prefix - - inreplace "Nukefile" do |s| - s.gsub!('(SH "sudo ', '(SH "') # don't use sudo to install - s.gsub!("\#{@destdir}/Library/Frameworks", "\#{@prefix}/Frameworks") - s.sub! /^;; source files$/, <<~EOS - ;; source files - (set @framework_install_path "#{frameworks}") - EOS - end - system "make" - system "./mininush", "tools/nuke" - bin.mkdir - lib.mkdir - include.mkdir - system "./mininush", "tools/nuke", "install" - end - - def caveats; <<~EOS - Nu.framework was installed to: - #{frameworks}/Nu.framework - - You may want to symlink this Framework to a standard macOS location, - such as: - ln -s "#{frameworks}/Nu.framework" /Library/Frameworks - EOS - end - - test do - system bin/"nush", "-e", '(puts "Everything old is Nu again.")' - end -end diff --git a/Formula/nudoku.rb b/Formula/nudoku.rb deleted file mode 100644 index b8df564cc3892..0000000000000 --- a/Formula/nudoku.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Nudoku < Formula - desc "ncurses based sudoku game" - homepage "https://jubalh.github.io/nudoku/" - url "https://github.com/jubalh/nudoku/archive/1.0.0.tar.gz" - sha256 "80fb9996c28642920951c20cfd5ca6e370d75240255bc6f11067ae68b6e44eca" - head "https://github.com/jubalh/nudoku.git" - - bottle do - cellar :any_skip_relocation - sha256 "d82e9887a876b3762c2f676c95e36fbf5b98bc4306f584618397c0fb30c97f46" => :mojave - sha256 "b6a14adadee0fb01f92397a5fdc31189492468e3d87875bed408ca41824d09b4" => :high_sierra - sha256 "d4cea1e1c0f97655feb301910aa70c65a223959ba39a8493f31ca1a614eec175" => :sierra - sha256 "8f4cd53a9cd87ac8b9b1b48a986329708134608e3ff4423e8f449e1a6c81d6f1" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "nudoku version #{version}", shell_output("#{bin}/nudoku -v") - end -end diff --git a/Formula/nuget.rb b/Formula/nuget.rb deleted file mode 100644 index 238c382c43cce..0000000000000 --- a/Formula/nuget.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Nuget < Formula - desc "Package manager for Microsoft development platform including .NET" - homepage "https://www.nuget.org/" - url "https://dist.nuget.org/win-x86-commandline/v4.7.0/NuGet.exe" - sha256 "0eabcc242d51d11a0e7ba07b7f1bc746b0e28d49c6c0fc03edf715d252b03e13" - - bottle :unneeded - - depends_on "mono" - - def install - libexec.install "NuGet.exe" => "nuget.exe" - (bin/"nuget").write <<~EOS - #!/bin/bash - mono #{libexec}/nuget.exe "$@" - EOS - end - - test do - assert_match "NuGet.Protocol.Core.v3", shell_output("#{bin}/nuget list NuGet.Protocol.Core.v3") - end -end diff --git a/Formula/num-utils.rb b/Formula/num-utils.rb deleted file mode 100644 index 7ff7aa3df6b41..0000000000000 --- a/Formula/num-utils.rb +++ /dev/null @@ -1,34 +0,0 @@ -class NumUtils < Formula - desc "Programs for dealing with numbers from the command-line" - homepage "https://suso.suso.org/programs/num-utils/" - url "https://suso.suso.org/programs/num-utils/downloads/num-utils-0.5.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/n/num-utils/num-utils_0.5.orig.tar.gz" - sha256 "03592760fc7844492163b14ddc9bb4e4d6526e17b468b5317b4a702ea7f6c64e" - - bottle do - cellar :any_skip_relocation - sha256 "ed2b66381fa6949dbf99e34e2fcf1b4b0519c892d44d8472af1f8abfa94c1c91" => :mojave - sha256 "0fb446d9d8068e05f3144c22261672b7ad22589e55b3a6d15d65f6bebabf9a14" => :high_sierra - sha256 "37c24f625dae12d9db8592de4dc9003d4ce267a7a0bb6076e156f54d8ec990d1" => :sierra - sha256 "f2021913b67fe8ece09b204aa2715a4c8067121908695cee830b363a52a987eb" => :el_capitan - sha256 "41a55ac6c46aca45473ca365443fb1fd2d77fdb6e4540edbe849d723d31ba0e0" => :yosemite - sha256 "188ff1f94691f8bf5099ec1012d4732be8fa385bf738671f86780376dd2597b9" => :mavericks - sha256 "ef3654fed50aff148b0264fdfc75f25310702e8931cc6dcecb4bb3ebce657f7a" => :mountain_lion - end - - conflicts_with "normalize", :because => "both install `normalize` binaries" - conflicts_with "crush-tools", :because => "both install an `range` binary" - conflicts_with "argyll-cms", :because => "both install `average` binaries" - - def install - %w[average bound interval normalize numgrep numprocess numsum random range round].each do |p| - system "pod2man", p, "#{p}.1" - bin.install p - man1.install "#{p}.1" - end - end - - test do - assert_equal "2", pipe_output("#{bin}/average", "1\n2\n3\n").strip - end -end diff --git a/Formula/numpy.rb b/Formula/numpy.rb deleted file mode 100644 index 6b5bd78b2b780..0000000000000 --- a/Formula/numpy.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Numpy < Formula - desc "Package for scientific computing with Python" - homepage "https://www.numpy.org/" - url "https://files.pythonhosted.org/packages/2d/80/1809de155bad674b494248bcfca0e49eb4c5d8bee58f26fe7a0dd45029e2/numpy-1.15.4.zip" - sha256 "3d734559db35aa3697dadcea492a423118c5c55d176da2f3be9c98d4803fc2a7" - revision 2 - - bottle do - cellar :any - sha256 "c17f0792cbaef597c2046b4b1cf4163c71c48d5a4bf4a02a8bbda6dc18873cee" => :mojave - sha256 "d7e1f3b29f14a8e4f8467dba9476322a8ceee3dcdabb3597c67395f8b32b3131" => :high_sierra - sha256 "3e31a959f7d0bc0ce31c642390b97aba708f1e6f83771a7b66915f44cd5a788f" => :sierra - end - - head do - url "https://github.com/numpy/numpy.git" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/f0/66/6309291b19b498b672817bd237caec787d1b18013ee659f17b1ec5844887/Cython-0.29.tar.gz" - sha256 "94916d1ede67682638d3cc0feb10648ff14dc51fb7a7f147f4fedce78eaaea97" - end - end - - depends_on "gcc" => :build # for gfortran - depends_on "openblas" - depends_on "python" - depends_on "python@2" - - resource "nose" do - url "https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz" - sha256 "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98" - end - - def install - openblas = Formula["openblas"].opt_prefix - ENV["ATLAS"] = "None" # avoid linking against Accelerate.framework - ENV["BLAS"] = ENV["LAPACK"] = "#{openblas}/lib/libopenblas.dylib" - - config = <<~EOS - [openblas] - libraries = openblas - library_dirs = #{openblas}/lib - include_dirs = #{openblas}/include - EOS - - Pathname("site.cfg").write config - - ["python2", "python3"].each do |python| - version = Language::Python.major_minor_version python - dest_path = lib/"python#{version}/site-packages" - dest_path.mkpath - - nose_path = libexec/"nose/lib/python#{version}/site-packages" - resource("nose").stage do - system python, *Language::Python.setup_install_args(libexec/"nose") - (dest_path/"homebrew-numpy-nose.pth").write "#{nose_path}\n" - end - - if build.head? - ENV.prepend_create_path "PYTHONPATH", buildpath/"tools/lib/python#{version}/site-packages" - resource("Cython").stage do - system python, *Language::Python.setup_install_args(buildpath/"tools") - end - end - - system python, "setup.py", - "build", "--fcompiler=gnu95", "--parallel=#{ENV.make_jobs}", - "install", "--prefix=#{prefix}", - "--single-version-externally-managed", "--record=installed.txt" - end - end - - def caveats - homebrew_site_packages = Language::Python.homebrew_site_packages - user_site_packages = Language::Python.user_site_packages "python" - <<~EOS - If you use system python (that comes - depending on the OS X version - - with older versions of numpy, scipy and matplotlib), you may need to - ensure that the brewed packages come earlier in Python's sys.path with: - mkdir -p #{user_site_packages} - echo 'import sys; sys.path.insert(1, "#{homebrew_site_packages}")' >> #{user_site_packages}/homebrew.pth - EOS - end - - test do - ["python2", "python3"].each do |python| - system python, "-c", <<~EOS - import numpy as np - t = np.ones((3,3), int) - assert t.sum() == 9 - assert np.dot(t, t).sum() == 27 - EOS - end - end -end diff --git a/Formula/nut.rb b/Formula/nut.rb deleted file mode 100644 index f98bb9f6e06ef..0000000000000 --- a/Formula/nut.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Nut < Formula - desc "Network UPS Tools: Support for various power devices" - homepage "https://networkupstools.org/" - url "https://networkupstools.org/source/2.7/nut-2.7.4.tar.gz" - sha256 "980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7" - - bottle do - sha256 "3f5166d461e19f8e6eb838215ba1502fb6ec039a94cdab3d88a5ccdf62c675db" => :mojave - sha256 "102d8b6e9635321a7585d79c8c3c95d0f973c91cbf031be4d6839cf10c06ad2d" => :high_sierra - sha256 "45949916c354f6c3ba50df8ada5690f36d15ca1114185f1d92f66c4b08110f63" => :sierra - sha256 "df1f1a4b7efa73d48ada9d97ec13983fd1ba674773a058f771044dcd841a4b79" => :el_capitan - sha256 "d544abc34f9ed56f76fae104b8a472fe081c5072e32aeddbbd674316e9c0931d" => :yosemite - sha256 "83183c2346ec3642b45a20e47439225d94a58d6617669dd2001922f12d544942" => :mavericks - end - - head do - url "https://github.com/networkupstools/nut.git" - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libusb-compat" - depends_on "openssl" - - conflicts_with "rhino", :because => "both install `rhino` binaries" - - def install - if build.head? - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "./autogen.sh" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--with-macosx_ups", - "--with-openssl", - "--with-serial", - "--with-usb", - "--without-avahi", - "--without-cgi", - "--without-dev", - "--without-doc", - "--without-ipmi", - "--without-libltdl", - "--without-neon", - "--without-nss", - "--without-powerman", - "--without-snmp", - "--without-wrap" - system "make", "install" - end - - test do - system "#{bin}/dummy-ups", "-L" - end -end diff --git a/Formula/nutcracker.rb b/Formula/nutcracker.rb deleted file mode 100644 index 571355c9f264c..0000000000000 --- a/Formula/nutcracker.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Nutcracker < Formula - desc "Proxy for memcached and redis" - homepage "https://github.com/twitter/twemproxy" - url "https://github.com/twitter/twemproxy/archive/v0.4.1.tar.gz" - sha256 "00c2940f91947bea9457a348316aac1aa1d4e757238aafbefc9d51057da8ede0" - head "https://github.com/twitter/twemproxy.git" - - bottle do - cellar :any_skip_relocation - sha256 "e089d40fa4c225d6d8a2f5d7aec22d073fabdcd99d38ad3f99fd292fed534d8a" => :mojave - sha256 "8d4ab58ba04b1c0622915d080a4b12e6c70b2c338df40ad357b217a6a8ac43e5" => :high_sierra - sha256 "4987e6e2ef6fffb2fe05a65795cb513d628edda38f0e0ee69cea05159d16a4b5" => :sierra - sha256 "1f3714c4459185e9002ea87f4fc4a4de429f028df957615ee9876c61a7c89a6d" => :el_capitan - sha256 "73698710fa026b8585665a9b730626df444dabe6acf118cc4f0c2f57c27e214c" => :yosemite - sha256 "8e66691c40fe71934bb5eab848c61ef07f8f427774e253c0065eb64cc5410f9b" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-ivf" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - - pkgshare.install "conf", "notes", "scripts" - end - - test do - assert_match version.to_s, shell_output("#{sbin}/nutcracker -V 2>&1") - end -end diff --git a/Formula/nuttcp.rb b/Formula/nuttcp.rb deleted file mode 100644 index 917fbbb22ef14..0000000000000 --- a/Formula/nuttcp.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Nuttcp < Formula - desc "Network performance measurement tool" - homepage "https://www.nuttcp.net/nuttcp" - url "https://www.nuttcp.net/nuttcp/nuttcp-8.1.4.tar.bz2" - sha256 "737f702ec931ec12fcf54e66c4c1d5af72bd3631439ffa724ed2ac40ab2de78d" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "82951677c224a70e463033f266791122d7419dd5308bef61da5474738151497b" => :mojave - sha256 "bb494c46c81a914bb8eb66ad4476c2503e0345fc8f9dcf82c5cd2576fe005869" => :high_sierra - sha256 "9f4ca632e04e072eea5d17a54cd42e22d63ef7902e452d1133d42fea0ca2f829" => :sierra - sha256 "c38cac9cdf461d9f44a34dc1c7db83909a38faee07c1f5c43af3a4f816527493" => :el_capitan - end - - def install - system "make", "APP=nuttcp", - "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" - bin.install "nuttcp" - man8.install "nuttcp.cat" => "nuttcp.8" - end - - test do - assert_match version.to_s, shell_output("#{bin}/nuttcp -V") - end -end diff --git a/Formula/nuvie.rb b/Formula/nuvie.rb deleted file mode 100644 index 2878b29c16685..0000000000000 --- a/Formula/nuvie.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Nuvie < Formula - desc "The Ultima 6 engine" - homepage "https://nuvie.sourceforge.io/" - url "https://downloads.sourceforge.net/project/nuvie/Nuvie/0.5/nuvie-0.5.tgz" - sha256 "ff026f6d569d006d9fe954f44fdf0c2276dbf129b0fc5c0d4ef8dce01f0fc257" - - bottle do - sha256 "482181b9e3badb5e1c1d4b22176b7c2b48bc28cf3d96034291a8833fb9aecebf" => :mojave - sha256 "f6f5c6e9396e6a8920ce10765807c07c8aea1158b18807087ece931cbe428948" => :high_sierra - sha256 "036ab5e7a6b95f33f470c00124cc498012f38e650b830eca1d84082a7296a554" => :sierra - sha256 "bbf72ee5eeb816255999fc5c331bc70d6b4af3a7f639795f736b8f46e70b9790" => :el_capitan - sha256 "324dcf4a9f1ae523fd70fbbb1141f7cfe4245348d439c37dbe7a1520eb9e00d9" => :yosemite - end - - head do - url "https://github.com/nuvie/nuvie.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "sdl" - - def install - inreplace "./nuvie.cpp" do |s| - s.gsub! 'datadir", "./data"', "datadir\", \"#{lib}/data\"" - s.gsub! 'home + "/Library', '"/Library' - s.gsub! 'config_path.append("/Library/Preferences/Nuvie Preferences");', "config_path = \"#{var}/nuvie/nuvie.cfg\";" - s.gsub! "/Library/Application Support/Nuvie Support/", "#{var}/nuvie/game/" - s.gsub! "/Library/Application Support/Nuvie/", "#{var}/nuvie/" - end - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-sdltest", - "--prefix=#{prefix}" - system "make" - bin.install "nuvie" - pkgshare.install "data" - end - - def post_install - (var/"nuvie/game").mkpath - end - - def caveats; <<~EOS - Copy your Ultima 6 game files into the following directory: - #{var}/nuvie/game/ultima6/ - Save games will be stored in the following directory: - #{var}/nuvie/savegames/ - Config file will be located at: - #{var}/nuvie/nuvie.cfg - EOS - end -end diff --git a/Formula/nuxeo.rb b/Formula/nuxeo.rb deleted file mode 100644 index 11bd7779603eb..0000000000000 --- a/Formula/nuxeo.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Nuxeo < Formula - desc "Enterprise Content Management" - homepage "https://nuxeo.github.io/" - url "https://cdn.nuxeo.com/nuxeo-10.3/nuxeo-server-10.3-tomcat.zip" - sha256 "c4ab679608584f81179a7c9a81728fe556a6aafdbfbf9cc3542a7db7f690611f" - - bottle :unneeded - - depends_on "exiftool" - depends_on "ghostscript" - depends_on "imagemagick" - depends_on "libwpd" - depends_on "poppler" - depends_on "ufraw" - - def install - libexec.install Dir["#{buildpath}/*"] - - (bin/"nuxeoctl").write_env_script "#{libexec}/bin/nuxeoctl", - :NUXEO_HOME => libexec.to_s, :NUXEO_CONF => "#{etc}/nuxeo.conf" - - inreplace "#{libexec}/bin/nuxeo.conf" do |s| - s.gsub! /#nuxeo\.log\.dir.*/, "nuxeo.log.dir=#{var}/log/nuxeo" - s.gsub! /#nuxeo\.data\.dir.*/, "nuxeo.data.dir=#{var}/lib/nuxeo/data" - s.gsub! /#nuxeo\.pid\.dir.*/, "nuxeo.pid.dir=#{var}/run/nuxeo" - end - etc.install "#{libexec}/bin/nuxeo.conf" - end - - def post_install - (var/"log/nuxeo").mkpath - (var/"lib/nuxeo/data").mkpath - (var/"run/nuxeo").mkpath - (var/"cache/nuxeo/packages").mkpath - - libexec.install_symlink var/"cache/nuxeo/packages" - end - - def caveats; <<~EOS - You need to edit #{etc}/nuxeo.conf file to configure manually the server. - Also, in case of upgrade, run 'nuxeoctl mp-upgrade' to ensure all - downloaded addons are up to date. - EOS - end - - test do - # Copy configuration file to test path, due to some automatic writes on it. - cp "#{etc}/nuxeo.conf", "#{testpath}/nuxeo.conf" - inreplace "#{testpath}/nuxeo.conf" do |s| - s.gsub! /#{var}/, testpath - s.gsub! /#nuxeo\.tmp\.dir.*/, "nuxeo.tmp.dir=#{testpath}/tmp" - end - - ENV["NUXEO_CONF"] = "#{testpath}/nuxeo.conf" - - assert_match %r{#{testpath}/nuxeo\.conf}, shell_output("#{libexec}/bin/nuxeoctl config -q --get nuxeo.conf") - assert_match /#{libexec}/, shell_output("#{libexec}/bin/nuxeoctl config -q --get nuxeo.home") - end -end diff --git a/Formula/nvc.rb b/Formula/nvc.rb deleted file mode 100644 index 2ee07be3c6a58..0000000000000 --- a/Formula/nvc.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Nvc < Formula - desc "VHDL compiler and simulator" - homepage "https://github.com/nickg/nvc" - url "https://github.com/nickg/nvc/releases/download/r1.4.0/nvc-1.4.0.tar.gz" - sha256 "1a874bde284408c137a93b22f8f12b5b8c3368cefe30f3a5458ccdeffa0c6ad6" - - bottle do - sha256 "b80db7d1bf860cf294e21504ca5016949379eb09f5e91f2ada221f7c93e0a470" => :mojave - sha256 "b7652f61cc91018c76c1c3ca245125b9a1bd13aacf0f7e3791d62748a0af89c8" => :high_sierra - sha256 "baeed30af5a9e5dfe7dd8c5fdddb7b731912bbfb99f32127e30ae9c366bb8215" => :sierra - sha256 "e5a6b787e66d0b9e599a86d8e780e81c7aa9ca9240e1ab8446b471e044f9b0b1" => :el_capitan - end - - head do - url "https://github.com/nickg/nvc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "check" => :build - depends_on "llvm" => :build - depends_on "pkg-config" => :build - - resource "vim-hdl-examples" do - url "https://github.com/suoto/vim-hdl-examples.git", - :revision => "c112c17f098f13719784df90c277683051b61d05" - end - - def install - system "./autogen.sh" if build.head? - system "./tools/fetch-ieee.sh" - system "./configure", "--with-llvm=#{Formula["llvm"].opt_bin}/llvm-config", - "--prefix=#{prefix}", - "--with-system-cc=/usr/bin/clang" - system "make" - system "make", "install" - end - - test do - resource("vim-hdl-examples").stage testpath - system "#{bin}/nvc", "-a", "#{testpath}/basic_library/very_common_pkg.vhd" - end -end diff --git a/Formula/nvi.rb b/Formula/nvi.rb deleted file mode 100644 index 1b2d8901aa6da..0000000000000 --- a/Formula/nvi.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Nvi < Formula - desc "44BSD re-implementation of vi" - homepage "https://sites.google.com/a/bostic.com/keithbostic/vi/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/n/nvi/nvi_1.81.6.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/n/nvi/nvi_1.81.6.orig.tar.gz" - sha256 "8bc348889159a34cf268f80720b26f459dbd723b5616107d36739d007e4c978d" - revision 5 - - bottle do - cellar :any - sha256 "b5ccb501038dfbb0e14241a2f5efe0c731e05ca0adc2690a473178252f5c0313" => :mojave - sha256 "dcaa5dd43e6edfc5c8188761cc8aad6b80a06abc7382b8ceac4d92498354b5c4" => :high_sierra - sha256 "1327ea05ec82ec05e9ec7b00b95ac3f7329b198a613385042a0814265b393f13" => :sierra - sha256 "e188b0a9fa040c6a11f7ed6338d28d96428e11cfa019aaa1d0aa69e0f2b87bc3" => :el_capitan - end - - depends_on "xz" => :build # Homebrew bug. Shouldn't need declaring explicitly. - depends_on "berkeley-db" - - # Patches per MacPorts - # The first corrects usage of BDB flags. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/8ef45e8b/nvi/patch-common__db.h" - sha256 "d6c67a129cec0108a0c90fd649d79de65099dc627b10967a1fad51656f519800" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/8ef45e8b/nvi/patch-dist__port.h.in" - sha256 "674adb27810da8f6342ffc912a54375af0ed7769bfa524dce01600165f78a63b" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/8ef45e8b/nvi/patch-ex_script.c.diff" - sha256 "742c4578319ddc07b0b86482b4f2b86125026f200749e07c6d2ac67976204728" - end - - # Upstream have been pretty inactive for a while, so we may want to kill this - # formula at some point unless that changes. We're leaning hard on Debian now. - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/n/nvi/nvi_1.81.6-13.debian.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/n/nvi/nvi_1.81.6-13.debian.tar.xz" - sha256 "306c6059d386a161b9884535f0243134c8c9b5b15648e09e595fd1b349a7b9e1" - apply "patches/03db4.patch", - "patches/19include_term_h.patch", - "patches/24fallback_to_dumb_term.patch", - "patches/26trailing_tab_segv.patch", - "patches/27support_C_locale.patch", - "patches/31regex_heap_overflow.patch" - end - - def install - cd "dist" do - system "./configure", "--prefix=#{prefix}", - "--program-prefix=n", - "--disable-dependency-tracking" - system "make" - ENV.deparallelize - system "make", "install" - end - end - - test do - (testpath/"test").write("This is toto!\n") - pipe_output("#{bin}/nvi -e test", "%s/toto/tutu/g\nwq\n") - assert_equal "This is tutu!\n", File.read("test") - end -end diff --git a/Formula/nvm.rb b/Formula/nvm.rb deleted file mode 100644 index 427bc6b266efb..0000000000000 --- a/Formula/nvm.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Nvm < Formula - desc "Manage multiple Node.js versions" - homepage "https://github.com/creationix/nvm" - url "https://github.com/creationix/nvm/archive/v0.33.11.tar.gz" - sha256 "1b7cba65b300d1f123ba7ee7ee9e07a40c7d0a84211e896593765899fa877d3d" - head "https://github.com/creationix/nvm.git" - - bottle :unneeded - - def install - prefix.install "nvm.sh", "nvm-exec" - bash_completion.install "bash_completion" => "nvm" - end - - def caveats; <<~EOS - Please note that upstream has asked us to make explicit managing - nvm via Homebrew is unsupported by them and you should check any - problems against the standard nvm install method prior to reporting. - - You should create NVM's working directory if it doesn't exist: - - mkdir ~/.nvm - - Add the following to #{shell_profile} or your desired shell - configuration file: - - export NVM_DIR="$HOME/.nvm" - [ -s "#{opt_prefix}/nvm.sh" ] && \. "#{opt_prefix}/nvm.sh" # This loads nvm - [ -s "#{opt_prefix}/etc/bash_completion" ] && \. "#{opt_prefix}/etc/bash_completion" # This loads nvm bash_completion - - You can set $NVM_DIR to any location, but leaving it unchanged from - #{prefix} will destroy any nvm-installed Node installations - upon upgrade/reinstall. - - Type `nvm help` for further information. - EOS - end - - test do - output = pipe_output("NODE_VERSION=homebrewtest #{prefix}/nvm-exec 2>&1") - assert_no_match /No such file or directory/, output - assert_no_match /nvm: command not found/, output - assert_match "N/A: version \"homebrewtest -> N/A\" is not yet installed", output - end -end diff --git a/Formula/nwchem.rb b/Formula/nwchem.rb deleted file mode 100644 index 13ae2f0f88b58..0000000000000 --- a/Formula/nwchem.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Nwchem < Formula - desc "NWChem: Open Source High-Performance Computational Chemistry" - homepage "http://www.nwchem-sw.org" - url "https://github.com/nwchemgit/nwchem/releases/download/6.8.1-release/nwchem-6.8.1-release.revision-v6.8-133-ge032219-src.2018-06-14.tar.bz2" - version "6.8.1" - sha256 "23ce8241a5977a93d8224f66433851c81a08ad58a4c551858ae031485b095ab7" - revision 3 - - bottle do - cellar :any - sha256 "c0f5d0352634c9bde0e9c4b8eaae85ebc957e81056494cd68de260835520a2b2" => :mojave - sha256 "5fc0cc1332f02f8562568796625ffcf2d1afb6d14f8704201a1290c394761989" => :high_sierra - sha256 "8708819edfa216328f490560a3d03450c8b02aa635cc657275cf0831cca2726d" => :sierra - end - - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "openblas" - depends_on "scalapack" - - def install - pkgshare.install "QA" - - cd "src" do - (prefix/"etc").mkdir - (prefix/"etc/nwchemrc").write <<~EOS - nwchem_basis_library #{pkgshare}/libraries/ - nwchem_nwpw_library #{pkgshare}/libraryps/ - ffield amber - amber_1 #{pkgshare}/amber_s/ - amber_2 #{pkgshare}/amber_q/ - amber_3 #{pkgshare}/amber_x/ - amber_4 #{pkgshare}/amber_u/ - spce #{pkgshare}/solvents/spce.rst - charmm_s #{pkgshare}/charmm_s/ - charmm_x #{pkgshare}/charmm_x/ - EOS - - inreplace "util/util_nwchemrc.F", "/etc/nwchemrc", "#{etc}/nwchemrc" - - ENV["NWCHEM_TOP"] = buildpath - ENV["PYTHONVERSION"] = "2.7" - pyhome = `python-config --prefix`.chomp - ENV["PYTHONHOME"] = pyhome - ENV["NWCHEM_LONG_PATHS"] = "Y" - ENV["BLASOPT"] = "-L#{Formula["openblas"].opt_lib} -lopenblas" - ENV["BLAS_SIZE"] = "4" - ENV["SCALAPACK"] = "-L#{Formula["scalapack"].opt_prefix}/lib -lscalapack" - ENV["USE_64TO32"] = "y" - system "make", "nwchem_config", "NWCHEM_MODULES=all python" - system "make", "64_to_32" - system "make", "NWCHEM_TARGET=MACX64", "USE_MPI=Y" - - bin.install "../bin/MACX64/nwchem" - pkgshare.install "basis/libraries" - pkgshare.install "nwpw/libraryps" - pkgshare.install Dir["data/*"] - end - end - - test do - cp_r pkgshare/"QA", testpath - cd "QA" do - ENV["NWCHEM_TOP"] = pkgshare - ENV["NWCHEM_TARGET"] = "MACX64" - ENV["NWCHEM_EXECUTABLE"] = "#{bin}/nwchem" - system "./runtests.mpi.unix", "procs", "2", "dft_he2+", "prop_mep_gcube", "pspw", "tddft_h2o", "tce_n2" - end - end -end diff --git a/Formula/nxengine.rb b/Formula/nxengine.rb deleted file mode 100644 index c7f9fb1f3a192..0000000000000 --- a/Formula/nxengine.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Nxengine < Formula - desc "Rewrite of Cave Story (Doukutsu Monogatari)" - homepage "https://nxengine.sourceforge.io/" - url "https://nxengine.sourceforge.io/dl/nx-src-1006.tar.bz2" - version "1.0.0.6" - sha256 "cf9cbf15dfdfdc9936720a714876bb1524afbd2931e3eaa4c89984a40b21ad68" - - bottle do - sha256 "e9e11b68627fbe16f938ba6c2b0c5fd8cb5fe3c5515ea477ff7c1556a6a34b4c" => :mojave - sha256 "32b384c1e7fdd33ecf71ccf88641096ca191402cce0c0ec4866575502ced50b3" => :high_sierra - sha256 "6f24e86f6bf1b4a41b9938a99feafffc83469561031d16d5160543e0bf24e251" => :sierra - sha256 "2002c715a6f1d169ac67eedef28c924392abc9f3a4620913d96992b6a0ae6e85" => :el_capitan - sha256 "c7990df854be6f704eee378d7f149a87fdb8519ff6272711fe875be3b74e6c9c" => :yosemite - end - - depends_on "sdl" - depends_on "sdl_ttf" - - # Freeware Cave Story 1.0.0.6 pre-patched with Aeon Genesis English translation - resource "game" do - url "https://www.cavestory.org/downloads/cavestoryen.zip" - sha256 "aa87fa30bee9b4980640c7e104791354e0f1f6411ee0d45a70af70046aa0685f" - end - - def install - # Remove unused linux header - inreplace "platform/Linux/vbesync.c", "#include ", "" - # Replacement of htole16 for OS X - inreplace ["sound/org.cpp", "sound/pxt.cpp"] do |s| - s.gsub! "endian.h", "libkern/OSByteOrder.h" - s.gsub! "htole16", "OSSwapHostToLittleInt16" - end - # Use var/nxengine for extracted data files, without messing current directory - inreplace "graphics/font.cpp", - /(fontfile) = "(\w+\.(bmp|ttf))"/, - "\\1 = \"#{var}/nxengine/\\2\"" - inreplace "platform.cpp", - /(return .*fopen)\((fname), mode\);/, - "char fn[256]; strcpy(fn, \"#{var}/nxengine/\"); strcat(fn, \\2); \\1(fn, mode);" - inreplace "graphics/nxsurface.cpp", - /(image = SDL_LoadBMP)\((pbm_name)\);/, - "char fn[256]; strcpy(fn, \"#{var}/nxengine/\"); strcat(fn, \\2); \\1(fn);" - inreplace "extract/extractpxt.cpp", - /(mkdir)\((\".+\")/, - "char dir[256]; strcpy(dir, \"#{var}/nxengine/\"); strcat(dir, \\2); \\1(dir" - inreplace "extract/extractfiles.cpp" do |s| - s.gsub! /char \*dir = strdup\((fname)\);/, - "char *dir = (char *)malloc(256); strcpy(dir, \"#{var}/nxengine/\"); strcat(dir, \\1);" - s.gsub! "strchr", "strrchr" - end - - system "make" - bin.install "nx" - pkgshare.install ["smalfont.bmp", "sprites.sif", "tilekey.dat"] - resource("game").stage do - pkgshare.install ["Doukutsu.exe", "data"] - end - end - - def post_install - # Symlink original game data to a working directory in var - (var/"nxengine").mkpath - ln_sf Dir[pkgshare/"*"], "#{var}/nxengine/" - # Use system font, avoiding any license issue - ln_sf "/Library/Fonts/Courier New.ttf", "#{var}/nxengine/font.ttf" - end - - def caveats; <<~EOS - When the game runs first time, it will extract data files into the following directory: - #{var}/nxengine - EOS - end -end diff --git a/Formula/nyancat.rb b/Formula/nyancat.rb deleted file mode 100644 index 4db65eb4c9953..0000000000000 --- a/Formula/nyancat.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Nyancat < Formula - desc "Renders an animated, color, ANSI-text loop of the Poptart Cat" - homepage "https://github.com/klange/nyancat" - url "https://github.com/klange/nyancat/archive/1.5.2.tar.gz" - sha256 "88cdcaa9c7134503dd0364a97fa860da3381a09cb555c3aae9918360827c2032" - - bottle do - cellar :any_skip_relocation - sha256 "6f14b77291021020bc45ea2182063fe16215faee9862786763798362ac664822" => :mojave - sha256 "2272aa5028ca779224f68fd25a3c07ff41c71bb7d14511186808a6b59bfe32c3" => :high_sierra - sha256 "413a6ff99b622e60b0878ca74c3051d0feac094a7eb1fa9e90db715735cdd2bf" => :sierra - sha256 "2484fb6eabaaa65a988191b9c2f920d7290bc20f73dbf41e4a996e0306827364" => :el_capitan - end - - # Makefile: Add install directory option - patch do - url "https://github.com/klange/nyancat/pull/34.patch?full_index=1" - sha256 "24a0772d2725e151b57727ce887f4b3911d19e875785eb7e13a68f4b987831e8" - end - - def install - system "make" - system "make", "install", "instdir=#{prefix}" - end - - test do - system "#{bin}/nyancat", "--frames", "1" - end -end diff --git a/Formula/nylon.rb b/Formula/nylon.rb deleted file mode 100644 index 97ab762d162cd..0000000000000 --- a/Formula/nylon.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Nylon < Formula - desc "Proxy server" - homepage "https://github.com/smeinecke/nylon" - url "https://monkey.org/~marius/nylon/nylon-1.21.tar.gz" - sha256 "34c132b005c025c1a5079aae9210855c80f50dc51dde719298e1113ad73408a4" - revision 1 - - bottle do - sha256 "81bb68359ab8969a66c60b467890e9be12a1d003844d7a76f85ca2b4c3c47ea9" => :mojave - sha256 "ad3ce3dde251f725f9659926ff529ca23e3e052a084221052bb6f4f1bf715abd" => :high_sierra - sha256 "aea3b5d69a3a6b1046597e7d5b26ff3b2084e7bd47c3f2f44933d2ff351da1d2" => :sierra - sha256 "e11dbfcb33533384db298fe84ed065f613db0c3503cd211b4404c586bfd19218" => :el_capitan - sha256 "6bf95ff668064396bae3a677320425eb5ec66e820d2099dff37ed109c2f2dca6" => :yosemite - end - - depends_on "libevent" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-libevent=#{HOMEBREW_PREFIX}" - system "make", "install" - end - - test do - assert_equal "nylon: nylon version #{version}", - shell_output("#{bin}/nylon -V 2>&1").chomp - end -end diff --git a/Formula/nyx.rb b/Formula/nyx.rb deleted file mode 100644 index c82c28e018636..0000000000000 --- a/Formula/nyx.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Nyx < Formula - desc "Command-line monitor for Tor" - homepage "https://nyx.torproject.org/" - url "https://files.pythonhosted.org/packages/42/37/85890dae5680f36f5b1c964ad41674ebb8d1186383fbca58f82e76de734c/nyx-2.0.4.tar.gz" - sha256 "38db634789c2d72e485522a490397eb5f77c0bd7c689453efe57808c99dba75e" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "895858835ef8f41c1993ecff11fec696a827fee4bb6430c0fa62239987912424" => :mojave - sha256 "9d99d881d70f0edd43304861e6ca83a3434286447ba4ac5c5e057405859848db" => :high_sierra - sha256 "9d99d881d70f0edd43304861e6ca83a3434286447ba4ac5c5e057405859848db" => :sierra - end - - depends_on "python" - - resource "stem" do - url "https://files.pythonhosted.org/packages/11/d5/e51983f81b38408ae2f0e166481ad867962f6fa07610fe71119534e12d41/stem-1.6.0.tar.gz" - sha256 "d7fe1fb13ed5a94d610b5ad77e9f1b3404db0ca0586ded7a34afd323e3b849ed" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resource("stem").stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - assert_match "Errno 61", shell_output("#{bin}/nyx -i 127.0.0.1:9000", 1) - end -end diff --git a/Formula/nzbget.rb b/Formula/nzbget.rb deleted file mode 100644 index 0f6eeebac8e29..0000000000000 --- a/Formula/nzbget.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Nzbget < Formula - desc "Binary newsgrabber for nzb files" - homepage "https://nzbget.net/" - url "https://github.com/nzbget/nzbget/releases/download/v20.0/nzbget-20.0-src.tar.gz" - sha256 "04dc36d432549c33d55145ecd95cc4309b3ab4a7731a1a03d954de389eacd06f" - head "https://github.com/nzbget/nzbget.git", :branch => "develop" - - bottle do - sha256 "6e9bb7d0fa4a14eba43d78cca17a4f8a24be119481ec3b1b4f017ebae99dedeb" => :mojave - sha256 "e28994fadf8cb1c81dd90de7cec9427f2fb7cf2e26b26a5844f8931b58549d37" => :high_sierra - sha256 "ac695e943c123fd8220c22ab9b164ec4f38aabc608f0b06d6415b85985991011" => :sierra - sha256 "90cce93915e5013766ea3f1a6ad071e33891752e053773e95c2a847e56869320" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gcc" if MacOS.version <= :mavericks - depends_on "openssl" - - fails_with :clang do - build 600 - cause "No compiler with C++14 support was found" - end - - fails_with :clang do - build 500 - cause <<~EOS - Clang older than 5.1 requires flexible array members to be POD types. - More recent versions require only that they be trivially destructible. - EOS - end - - needs :cxx11 - - def install - ENV.cxx11 - - # Fix "ncurses library not found" - # Reported 14 Aug 2016: https://github.com/nzbget/nzbget/issues/264 - (buildpath/"brew_include").install_symlink MacOS.sdk_path/"usr/include/ncurses.h" - ENV["ncurses_CFLAGS"] = "-I#{buildpath}/brew_include" - ENV["ncurses_LIBS"] = "-L/usr/lib -lncurses" - - # Tell configure to use OpenSSL - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-tlslib=OpenSSL" - system "make" - ENV.deparallelize - system "make", "install" - pkgshare.install_symlink "nzbget.conf" => "webui/nzbget.conf" - - # Set upstream's recommended values for file systems without - # sparse-file support (e.g., HFS+); see Homebrew/homebrew-core#972 - inreplace "nzbget.conf", "DirectWrite=yes", "DirectWrite=no" - inreplace "nzbget.conf", "ArticleCache=0", "ArticleCache=700" - - etc.install "nzbget.conf" - end - - plist_options :manual => "nzbget" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/nzbget - -s - -o - OutputMode=Log - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - (testpath/"downloads/dst").mkpath - # Start nzbget as a server in daemon-mode - system "#{bin}/nzbget", "-D" - # Query server for version information - system "#{bin}/nzbget", "-V" - # Shutdown server daemon - system "#{bin}/nzbget", "-Q" - end -end diff --git a/Formula/o/oak.rb b/Formula/o/oak.rb new file mode 100644 index 0000000000000..19c67286e78be --- /dev/null +++ b/Formula/o/oak.rb @@ -0,0 +1,38 @@ +class Oak < Formula + desc "Expressive, simple, dynamic programming language" + homepage "https://oaklang.org/" + url "https://github.com/thesephist/oak/archive/refs/tags/v0.3.tar.gz" + sha256 "05bc1c09da8f8d199d169e5a5c5ab2f2923bad6fac624f497f5ea365f378e38a" + license "MIT" + head "https://github.com/thesephist/oak.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "815a55a839e22f2903fa5dcd1b0b0c7add13323dba55b9b6cf25e3bf6b89644d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4add3db56fe8171421dc3fd528ee7d39b54936c03d75b89a42a24c8d8a3a151" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fb8d9531ce0034422a0233fb27c1e77c94910d91f544e18407b8420f67f7f3e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e49abb41ea0758574abb99e97cfae07adeedb324060114815b4c0ead6cbbc674" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2c258ac6aacad5e27decb196cb329fc4cb8339950fa110ee1540712872a0ddc4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cbae1b116dcccc5199d3af3e8deb66246c39be3afb5156209b814f83a946599a" + sha256 cellar: :any_skip_relocation, sonoma: "14951dfef1335e5db61166951db1cef221b86f5cd10e62ccde2170c9302e4538" + sha256 cellar: :any_skip_relocation, ventura: "472a8b58caef8874e3cd7a0a43780a0a3b5fca519815d2646b2fb6488b049e32" + sha256 cellar: :any_skip_relocation, monterey: "538fdce9778c8c182d6c369356f02c0d8cd0ba120168eaa204d9ea5d6e423fe6" + sha256 cellar: :any_skip_relocation, big_sur: "50e687e3532068bd0948b8760e0bdcf136a6f357600ab1abc5c2089f0d372436" + sha256 cellar: :any_skip_relocation, catalina: "c206c1cb5f34b507830290b8e273cf65d2c76f08ce5f014a17fd8653a63cce0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "50a204d94668d846405a53b9c16d42edea86f7448c8961139b3450702c382028" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c902712d736c06e8f065b2046ad172b66c7ae075a2ccdd3c19c859616577fe50" + end + + depends_on "go" => :build + + conflicts_with "oakc", because: "both install `oak` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_equal "Hello, World!\n14\n", shell_output("#{bin}/oak eval \"std.println('Hello, World!')\"") + end +end diff --git a/Formula/o/oakc.rb b/Formula/o/oakc.rb new file mode 100644 index 0000000000000..f0e06dcb22455 --- /dev/null +++ b/Formula/o/oakc.rb @@ -0,0 +1,43 @@ +class Oakc < Formula + desc "Portable programming language with a compact intermediate representation" + homepage "https://github.com/adam-mcdaniel/oakc" + url "https://static.crates.io/crates/oakc/oakc-0.6.1.crate" + sha256 "1f4a90a3fd5c8ae32cb55c7a38730b6bfcf634f75e6ade0fd51c9db2a2431683" + license "Apache-2.0" + head "https://github.com/adam-mcdaniel/oakc.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "60abd2db575988443d770ae177888cff9366de42bbe23c1da3fede13903385c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07e3a3b23965b457f71c6938c55dd7dfcccffc666746863345e301f4888a4f13" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7dda2bb361b0d013dae148630eb1c19a884bec2f3cec498681777f1355a4963" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2027a21cc9a6b104b4f5f28b0b75127116063abf32282890258db85b1f5c0fd6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3cdabb01c215dce0ca881f17a57c5426451fe6227f857bc9d935c23699ed31c3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ecb4eb764030b55cb485cdd0f28343b65bf2a93de1f0c4ce4ba633e80fafd76" + sha256 cellar: :any_skip_relocation, sonoma: "7a1feacc47d0b0117e8d5cde8685f72fc1ac7052d044a94f70583fc7152039d3" + sha256 cellar: :any_skip_relocation, ventura: "731ae9848fe6b0b63c6f4841399817bc2f310d806196d5e1a54220f85223f28a" + sha256 cellar: :any_skip_relocation, monterey: "57b18008429add80e4fdd436cc10091e9563e3d4c01f76f9429d146b49d17184" + sha256 cellar: :any_skip_relocation, big_sur: "df01ac42a1ff0632e6aebd2cd10f97d14631b5221556a667b71e6b61664a07e6" + sha256 cellar: :any_skip_relocation, catalina: "782964257658eba472afbe784511f772a4a84e951c582a5a57546cb682bb0b25" + sha256 cellar: :any_skip_relocation, arm64_linux: "eaa3710811313c7fa1f91eb0e19c56d530b5eaf226649fcacb1348639bf130b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ef60b48d23e35832e2d6b65a2c503ff72f88c6d5ced38a5dad9642b2147d642" + end + + depends_on "rust" => :build + + conflicts_with "oak", because: "both install `oak` binaries" + + def install + system "cargo", "install", *std_cargo_args + pkgshare.install "examples" + end + + test do + system bin/"oak", "-c", "c", pkgshare/"examples/hello_world.ok" + assert_equal "Hello world!\n", shell_output("./main") + assert_match "This file tests Oak's doc subcommand", + shell_output("#{bin}/oak doc #{pkgshare}/examples/flags/doc.ok") + end +end diff --git a/Formula/o/oasdiff.rb b/Formula/o/oasdiff.rb new file mode 100644 index 0000000000000..95bb1574b044f --- /dev/null +++ b/Formula/o/oasdiff.rb @@ -0,0 +1,54 @@ +class Oasdiff < Formula + desc "OpenAPI Diff and Breaking Changes" + homepage "https://www.oasdiff.com/" + url "https://github.com/oasdiff/oasdiff/archive/refs/tags/v1.11.7.tar.gz" + sha256 "bd06a38e62657634ab95ebc06174580fd3840fc07d8e5646eaed229d6dff424f" + license "Apache-2.0" + head "https://github.com/oasdiff/oasdiff.git", branch: "main" + + # Livecheck against GitHub latest releases is necessary because there was a v1.6.0 release after v2.1.2. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b30a69746c46c6e2ab171dc35075133c80b84602d767cfe1cdd12767d5c11d0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eb82a39e44dcda2cc1c4c712c5f8f82c84e9d9f5109e5f8afdcd815c4edcb712" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb82a39e44dcda2cc1c4c712c5f8f82c84e9d9f5109e5f8afdcd815c4edcb712" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eb82a39e44dcda2cc1c4c712c5f8f82c84e9d9f5109e5f8afdcd815c4edcb712" + sha256 cellar: :any_skip_relocation, sonoma: "a0c386191ae5fd37be8dc2900796107df8ceedc03807fe4ed5fe5d3d9df0d9f7" + sha256 cellar: :any_skip_relocation, ventura: "a0c386191ae5fd37be8dc2900796107df8ceedc03807fe4ed5fe5d3d9df0d9f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "13fba98e9166b1e63762f2ad442bd641507435846ea455655b70fe554d802f7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adb371f77689c45db9bc52f4e47cc29d4da9ad9cb8dcd1abbd7464ce28e5ec1c" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/oasdiff/oasdiff/build.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"oasdiff", "completion") + end + + test do + resource "homebrew-openapi-test1.yaml" do + url "https://raw.githubusercontent.com/oasdiff/oasdiff/8fdb99634d0f7f827810ee1ba7b23aa4ada8b124/data/openapi-test1.yaml" + sha256 "f98cd3dc42c7d7a61c1056fa5a1bd3419b776758546cf932b03324c6c1878818" + end + + resource "homebrew-openapi-test5.yaml" do + url "https://raw.githubusercontent.com/oasdiff/oasdiff/8fdb99634d0f7f827810ee1ba7b23aa4ada8b124/data/openapi-test5.yaml" + sha256 "07e872b876df5afdc1933c2eca9ee18262aeab941dc5222c0ae58363d9eec567" + end + + testpath.install resource("homebrew-openapi-test1.yaml") + testpath.install resource("homebrew-openapi-test5.yaml") + + expected = "11 changes: 3 error, 2 warning, 6 info" + assert_match expected, shell_output("#{bin}/oasdiff changelog openapi-test1.yaml openapi-test5.yaml") + + assert_match version.to_s, shell_output("#{bin}/oasdiff --version") + end +end diff --git a/Formula/o/oasis.rb b/Formula/o/oasis.rb new file mode 100644 index 0000000000000..72080848548ef --- /dev/null +++ b/Formula/o/oasis.rb @@ -0,0 +1,36 @@ +class Oasis < Formula + desc "CLI for interacting with the Oasis Protocol network" + homepage "https://github.com/oasisprotocol/cli" + url "https://github.com/oasisprotocol/cli/archive/refs/tags/v0.16.1.tar.gz" + sha256 "b0f92527b5dd1e5d9ccf08300760de51441b36067e4c164bb2cf6ff30178641f" + license "Apache-2.0" + head "https://github.com/oasisprotocol/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a4ba0cd7e47453e89f60a82f8caf725a5f3f57c5274161af23f911f407a349db" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93a69b8154344d00a76fcad886338536d3ae9904087a50697b1167b25fe4a794" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39a5b6f44d3e91bbaf6a57af7295ed1bdaa3da125f2f569ddf1d86df28824c82" + sha256 cellar: :any_skip_relocation, sonoma: "22e0f7ac55b046b04bcd513a81043e016ce11d21a6d79a10e8ab8df56c5bfba0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5888b259e68dfaccbbcdd3795638166653d876ab2d5299b5823126f0589b62c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61fb2b3e01ae1c26c6e066f4703fe5fc83cd5f7115b4def63bcf6cda69fc9b63" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/oasisprotocol/cli/version.Software=#{version} + -X github.com/oasisprotocol/cli/cmd.DisableUpdateCmd=true + ] + + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/oasis --version") + assert_match "CLI for interacting with the Oasis network", shell_output("#{bin}/oasis --help") + assert_match "Error: unknown command \"update\" for \"oasis\"", shell_output("#{bin}/oasis update 2>&1", 1) + assert_match "Error: no address given and no wallet configured", shell_output("#{bin}/oasis account show 2>&1", 1) + end +end diff --git a/Formula/o/oath-toolkit.rb b/Formula/o/oath-toolkit.rb new file mode 100644 index 0000000000000..5d78d4e1ac5b8 --- /dev/null +++ b/Formula/o/oath-toolkit.rb @@ -0,0 +1,51 @@ +class OathToolkit < Formula + desc "Tools for one-time password authentication systems" + homepage "https://www.nongnu.org/oath-toolkit/" + url "https://download-mirror.savannah.gnu.org/releases/oath-toolkit/oath-toolkit-2.6.13.tar.gz" + mirror "https://fossies.org/linux/privat/oath-toolkit-2.6.13.tar.gz" + sha256 "5b5d82e9a4455206d24fcbd7ee58bf4c79398a2e67997d80bd45ae927586b18b" + license all_of: ["GPL-3.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url "https://download.savannah.gnu.org/releases/oath-toolkit/" + regex(/href=.*?oath-toolkit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "01c085e9dcf3270fecffca88b5a99935cf75d9de0e2b5c84044bed01df67324f" + sha256 cellar: :any, arm64_sequoia: "a194b2db6ed6b3566e16a7ae5fbe0493f6e6450676468f774910fe30d83fa199" + sha256 cellar: :any, arm64_sonoma: "cf4057a1672ecedade4214940e6fe786b08d403798135dde3c78926c0b1758d2" + sha256 cellar: :any, arm64_ventura: "7a8fc9a02a185f4adff751b49551c555b104cd1733754b21ee13255b7df1e1f8" + sha256 sonoma: "8fa9c96c1fd5491d8316653a396476ebe4a3a03f2f654ae3d9de9e84c2f03d8e" + sha256 ventura: "45d3b881643fe9aae507ff2b79135bd8fced496f75c8184a4c8a2b515c3278cb" + sha256 arm64_linux: "976d358c400c6ca225db031e9c1d4934d9bf8d84b42dc23caec116dcab283bf1" + sha256 x86_64_linux: "64d5b405189368bb048ad03474b44fac7fd76853996906629ffb00fc5b4f11ac" + end + + head do + url "https://gitlab.com/oath-toolkit/oath-toolkit.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + depends_on "libxml2" + depends_on "libxmlsec1" + depends_on "openssl@3" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_equal "328482", shell_output("#{bin}/oathtool 00").chomp + end +end diff --git a/Formula/o/oatpp.rb b/Formula/o/oatpp.rb new file mode 100644 index 0000000000000..289cdec2683e8 --- /dev/null +++ b/Formula/o/oatpp.rb @@ -0,0 +1,51 @@ +class Oatpp < Formula + desc "Light and powerful C++ web framework" + homepage "https://oatpp.io/" + url "https://github.com/oatpp/oatpp/archive/refs/tags/1.3.1.tar.gz" + sha256 "9dd31f005ab0b3e8895a478d750d7dbce99e42750a147a3c42a9daecbddedd64" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1d123435c094ef3f8505f2a0123b98f5bee8686723b01e87b7eac1124319146a" + sha256 cellar: :any, arm64_sequoia: "9660efd36d9aaa939d7d03d4473cdacb0255c289105c055aa3c66e64b972790a" + sha256 cellar: :any, arm64_sonoma: "8d8f998c2c07ed45f917b85a40cc614b6820b263b8e97254d20d1149d6a91104" + sha256 cellar: :any, sonoma: "b1a74b30588c204615b87752817736ba6886e0c429228bd2c14164c6dc86bc6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "81098264566979f91f1c984db6611ef67f766bfe74a4b0ff4fcc6df4a72e2080" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12218676b146b645b2d7bebafa30e08fdc2a769bba634a161d4473a80384183b" + end + + depends_on "cmake" => :build + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}/oatpp-#{version}" if OS.linux? + + # Remove in the next release. + # See: https://github.com/oatpp/oatpp/issues/988#issuecomment-2525575710 + inreplace "src/oatpp/core/base/Environment.hpp", "1.3.0", version.to_s + + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DOATPP_BUILD_TESTS=OFF + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + oatpp::base::Environment::init(); + return 0; + } + CPP + flags = %W[-I#{include}/oatpp-#{version}/oatpp -L#{lib}/oatpp-#{version} -loatpp] + flags << "-Wl,-rpath,#{lib}/oatpp-#{version}" if OS.linux? + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/o/oauth2_proxy.rb b/Formula/o/oauth2_proxy.rb new file mode 100644 index 0000000000000..2625ca2fd4c5a --- /dev/null +++ b/Formula/o/oauth2_proxy.rb @@ -0,0 +1,70 @@ +class Oauth2Proxy < Formula + desc "Reverse proxy for authenticating users via OAuth 2 providers" + homepage "https://oauth2-proxy.github.io/oauth2-proxy/" + url "https://github.com/oauth2-proxy/oauth2-proxy/archive/refs/tags/v7.12.0.tar.gz" + sha256 "72eddf28b2fd7dc4f841fac47a9376a3f660d3d467f1fc17e69badd14870c5f4" + license "MIT" + head "https://github.com/oauth2-proxy/oauth2-proxy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "09be6dda7b5946fe025ce5d8129733b9abd4981f7e3658d00a3e0e0c5308bbe7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ea4dcb47280288cc86c4c8a9db91c724044f65a8eefbaf966799bbc43d99691" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "56ea0e2993ee1c28aaf75b8f2c89963c28dc19f42e74bf059876d590e01f3dbf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b7f25b4651eb613fdd72c7c2feb1d179f3bc0b3696d4e5f7898c874fe50f629" + sha256 cellar: :any_skip_relocation, sonoma: "60cdd8f32912f026b1b4d79d65c6e26ab4d083cd6ac99dbd0972938d1785c122" + sha256 cellar: :any_skip_relocation, ventura: "4a47b133a8e94537de109b52b32dd4b6d61addc31d402ab153959619d1005335" + sha256 cellar: :any_skip_relocation, arm64_linux: "58808a890908b1bd646297fd3e50823279873083fc4a477acd832f44e399fa28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19a332ed0f0b04571737bf898e5201351f93bbf1a098e87c4aa28984462b1d9e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.VERSION=#{version}", output: bin/"oauth2-proxy") + (etc/"oauth2-proxy").install "contrib/oauth2-proxy.cfg.example" + bash_completion.install "contrib/oauth2-proxy_autocomplete.sh" => "oauth2-proxy" + end + + def caveats + <<~EOS + #{etc}/oauth2-proxy/oauth2-proxy.cfg must be filled in. + EOS + end + + service do + run [opt_bin/"oauth2-proxy", "--config=#{etc}/oauth2-proxy/oauth2-proxy.cfg"] + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + require "timeout" + + port = free_port + + pid = fork do + exec "#{bin}/oauth2-proxy", + "--client-id=testing", + "--client-secret=testing", + # Cookie secret must be 16, 24, or 32 bytes to create an AES cipher + "--cookie-secret=0b425616d665d89fb6ee917b7122b5bf", + "--http-address=127.0.0.1:#{port}", + "--upstream=file:///tmp", + "--email-domain=*" + end + + begin + Timeout.timeout(10) do + loop do + Utils.popen_read "curl", "-s", "http://127.0.0.1:#{port}" + break if $CHILD_STATUS.exitstatus.zero? + + sleep 1 + end + end + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/o/oauth2c.rb b/Formula/o/oauth2c.rb new file mode 100644 index 0000000000000..36259ce233e2f --- /dev/null +++ b/Formula/o/oauth2c.rb @@ -0,0 +1,39 @@ +class Oauth2c < Formula + desc "User-friendly CLI for OAuth2" + homepage "https://github.com/cloudentity/oauth2c" + url "https://github.com/cloudentity/oauth2c/archive/refs/tags/v1.17.2.tar.gz" + sha256 "22c3044011b0d7adff925b4c6266e78f5ebcd7eb1065b5c9239b5c995a9c89b9" + license "Apache-2.0" + head "https://github.com/cloudentity/oauth2c.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "749022dfe7dea28b09f5799eb7792bc2e5571b2fbb085a8ce972d6946002e42a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fdb852aae32c487c08fb06513333b27f4539d2d67ab250d01c22c17adb8be630" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fdb852aae32c487c08fb06513333b27f4539d2d67ab250d01c22c17adb8be630" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fdb852aae32c487c08fb06513333b27f4539d2d67ab250d01c22c17adb8be630" + sha256 cellar: :any_skip_relocation, sonoma: "975b70217cd3e9575fe3cb7c535550e206b2c350dc7ae591ee1e9b6a36f4487b" + sha256 cellar: :any_skip_relocation, ventura: "975b70217cd3e9575fe3cb7c535550e206b2c350dc7ae591ee1e9b6a36f4487b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c5400ef0fccf68425de4fd7559b1a635e0935f06bd28c71d3767b1bd343df56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3948da012d3d9ed55544664df1d8b3ac9e10919860128b2ba359c878f9850180" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.commit= -X main.version=#{version} -X main.date=#{time.iso8601}" + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"oauth2c", "completion") + end + + test do + assert_match "\"access_token\":", + shell_output("#{bin}/oauth2c https://oauth2c.us.authz.cloudentity.io/oauth2c/demo " \ + "--client-id cauktionbud6q8ftlqq0 " \ + "--client-secret HCwQ5uuUWBRHd04ivjX5Kl0Rz8zxMOekeLtqzki0GPc " \ + "--grant-type client_credentials " \ + "--auth-method client_secret_basic " \ + "--scopes introspect_tokens,revoke_tokens") + end +end diff --git a/Formula/o/oauth2l.rb b/Formula/o/oauth2l.rb new file mode 100644 index 0000000000000..e9d05a8c6a0af --- /dev/null +++ b/Formula/o/oauth2l.rb @@ -0,0 +1,29 @@ +class Oauth2l < Formula + desc "Simple CLI for interacting with Google oauth tokens" + homepage "https://github.com/google/oauth2l" + url "https://github.com/google/oauth2l/archive/refs/tags/v1.3.3.tar.gz" + sha256 "a27f643949baa9f057bceb490c170d589728d3bda0a3066f57e17bb02b383cd9" + license "Apache-2.0" + head "https://github.com/google/oauth2l.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "879e5bfdd9fa0af54da369fa085e549dfff5416dd09be7415e34e3d0bda8b7a0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4410571958fb9512c71c88460b8c5ce402fd02885e6f157422ca133598dc4fbb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4410571958fb9512c71c88460b8c5ce402fd02885e6f157422ca133598dc4fbb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4410571958fb9512c71c88460b8c5ce402fd02885e6f157422ca133598dc4fbb" + sha256 cellar: :any_skip_relocation, sonoma: "5ad00aec35684048304e9840cf3e9353045d127684d94462bf3fdeec803ba1a0" + sha256 cellar: :any_skip_relocation, ventura: "5ad00aec35684048304e9840cf3e9353045d127684d94462bf3fdeec803ba1a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "446f2ea6782b001238cf497d81915460915841527e853e1ffdb22cdd506822e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0efdf0d0bcb9385726a0a090a0e576e1cd91efca08eede002743787eff1d4af" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "Invalid Value", shell_output("#{bin}/oauth2l info abcd1234") + end +end diff --git a/Formula/o/obfs4proxy.rb b/Formula/o/obfs4proxy.rb new file mode 100644 index 0000000000000..e165b998a4f68 --- /dev/null +++ b/Formula/o/obfs4proxy.rb @@ -0,0 +1,43 @@ +class Obfs4proxy < Formula + desc "Pluggable transport proxy for Tor, implementing obfs4" + homepage "https://gitlab.com/yawning/obfs4" + url "https://gitlab.com/yawning/obfs4/-/archive/obfs4proxy-0.0.14/obfs4-obfs4proxy-0.0.14.tar.gz" + sha256 "a4b7520e732b0f168832f6f2fdf1be57f3e2cce0612e743d3f6b51341a740903" + license "BSD-2-Clause" + head "https://gitlab.com/yawning/obfs4.git", branch: "master" + + livecheck do + url :stable + regex(/^obfs4proxy[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "35257564f9b79df7a9cd7d25113bf9671291049494537c7293e26db0c8d6b630" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5b38ec72de48413c006b6e39d6e246c1b9823a79b72b24213c9a656eb6d5d79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "893f2029d6885b023e37ba1f1d1b39d09c13d870ba361fd0dacf4fbf9ed6ac30" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4794482e9011498f424c15acb994d2f2b50ec6278e41167c6541efe69badb3f9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "95285e769376c5e715cafbb68aacffc785765a638212d9d4bbfef593d65b42cd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ac853ab274e5754ee091c84217be2618d4381200ecef0f3b1a0c0a3845dcc31d" + sha256 cellar: :any_skip_relocation, sonoma: "f35042ff00cfbfade185e80912b9ef908e9dbbe40ab8cc5a65df53adbdc2fe01" + sha256 cellar: :any_skip_relocation, ventura: "7a774c124868d26ec703c2d78d815073e51d398c7286da2147e7951ab89cc7cb" + sha256 cellar: :any_skip_relocation, monterey: "54d52bb6d65f47e8076c15a38f07e5b3e0f9545944ea627960ce2037913723b1" + sha256 cellar: :any_skip_relocation, big_sur: "b2015fe28393b6794fc18d8090732ce733d14c9b331fd0f8f123eeb87760bbc8" + sha256 cellar: :any_skip_relocation, catalina: "dcafd8b0d2cbcd4f22ccea0761a532220d40af53c95164173d7ce3c25331ecd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba8d12c85895fb64bf36a1d73b1baa173ef54569575f6f2b37e8ec9a58db9fa8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae4f95197e4ffd99a2a8e43f674eea3087cd43bbbe4a5ea38a396c32e3a97bb1" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./obfs4proxy" + end + + test do + expect = "ENV-ERROR no TOR_PT_STATE_LOCATION environment variable" + actual = shell_output("TOR_PT_MANAGED_TRANSPORT_VER=1 TOR_PT_SERVER_TRANSPORTS=obfs4 #{bin}/obfs4proxy", 1) + assert_match expect, actual + end +end diff --git a/Formula/o/objc-codegenutils.rb b/Formula/o/objc-codegenutils.rb new file mode 100644 index 0000000000000..59e866aef840e --- /dev/null +++ b/Formula/o/objc-codegenutils.rb @@ -0,0 +1,59 @@ +class ObjcCodegenutils < Formula + desc "Three small tools to help work with XCode" + homepage "https://github.com/puls/objc-codegenutils" + url "https://github.com/puls/objc-codegenutils/archive/refs/tags/v1.0.tar.gz" + sha256 "98b8819e77e18029f1bda56622d42c162e52ef98f3ba4c6c8fcf5d40c256e845" + license "Apache-2.0" + head "https://github.com/puls/objc-codegenutils.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae4db60ac9757d78ddb5870ca7b39d1de92d4ebda85497ee129e84c26e3f23ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "689a1e289323d187c0e1c89d5fb9c7c1292eb304ae9cbf265303ce701e14407a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd3e144fa7f8cddb59b171eae398fbf10d5d72b98bc0053da553e57213e26c7b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d068aa1c50d2e54ceddf2d21a04295829b30e7f3f5504c88364a1bddae5b1a1a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d5ddfb8ef11849ea3ef38002ca27c492fb9802886ac6cbaf611baa51606de4b7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9301f21479af32f32469e8235780f85b74d3a5e7c783fecaef7bb896c734dd55" + sha256 cellar: :any_skip_relocation, sonoma: "6e1172fa8991a275968751bcef4020b07f26d410cefe2f4c9efd07a91ff9165a" + sha256 cellar: :any_skip_relocation, ventura: "6e60602b0de8383fe7fceca41a4f13dc5bb65c27b1fdd84586e1e9c25bbffb52" + sha256 cellar: :any_skip_relocation, monterey: "508fba7003bf8b7e348c96b131558f19bde0a9f08a6096b79a733e1a4d906386" + sha256 cellar: :any_skip_relocation, big_sur: "5bd0a4e91d15de385bce1d3ab0ceefefe56d69d461f763373933e64e2d7db992" + sha256 cellar: :any_skip_relocation, catalina: "24745ae53d47e15598835ee0538c3f121c48b31b21902b1fd3fab0a8c9886543" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "codegenutils.xcodeproj", + "-target", "assetgen", + "-configuration", "Release", + "SYMROOT=build", + "OBJROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/objc-assetgen" + xcodebuild "-arch", Hardware::CPU.arch, + "-target", "colordump", + "-configuration", "Release", + "SYMROOT=build", + "OBJROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/objc-colordump" + xcodebuild "-arch", Hardware::CPU.arch, + "-target", "identifierconstants", + "-configuration", "Release", + "SYMROOT=build", + "OBJROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/objc-identifierconstants" + end + + test do + # Would do more verification here but it would require fixture Xcode projects not in the main repo + system bin/"objc-assetgen", "-h" + system bin/"objc-colordump", "-h" + system bin/"objc-identifierconstants", "-h" + end +end diff --git a/Formula/o/objc-run.rb b/Formula/o/objc-run.rb new file mode 100644 index 0000000000000..c3e9806674722 --- /dev/null +++ b/Formula/o/objc-run.rb @@ -0,0 +1,28 @@ +class ObjcRun < Formula + desc "Use Objective-C files for shell script-like tasks" + homepage "https://github.com/iljaiwas/objc-run" + url "https://github.com/iljaiwas/objc-run/archive/refs/tags/1.4.tar.gz" + sha256 "6d02a31764c457c4a6a9f5df0963d733d611ba873fc32672151ee02a05acd6f2" + license "MIT" + head "https://github.com/iljaiwas/objc-run.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "50066d41f8749f1c5865836c1ce1e1a89b502357aebcbd1c8c088bd04b9abc79" + end + + # failed on linux with `-fobjc-arc is not supported on platforms using the legacy runtime` + depends_on :macos + + def install + bin.install "objc-run" + pkgshare.install "examples", "test.bash" + end + + test do + cp_r pkgshare, testpath + system "./objc-run/test.bash" + end +end diff --git a/Formula/o/objconv.rb b/Formula/o/objconv.rb new file mode 100644 index 0000000000000..c86d90b53a7fa --- /dev/null +++ b/Formula/o/objconv.rb @@ -0,0 +1,54 @@ +class Objconv < Formula + desc "Object file converter" + homepage "https://www.agner.org/optimize/#objconv" + url "https://www.agner.org/optimize/objconv.zip" + version "2025-10-30" + sha256 "301149c271ffaf7b11a14d7aff637ecd580f8591bb8992b8e399af7ed4779bf9" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/objconv\.zip,.*?last\s+modified:\s+(\d{4}-(?:[a-z]+|\d{2})-\d{2})/im) + strategy :page_match do |page, regex| + date = page[regex, 1] + next if date.blank? + + Date.parse(date).strftime("%Y-%m-%d") + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5273156ed17314c65abfd7ca9a76776fada0abb44c07fc94a6b0702976085600" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "53b630adc4d0dcc0034547ca31047d72a38fb519b9d4e21ac6a54733722280cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "791d4922ed48bd70ecf5b8e15e030f7ee2683d71135dedd1b107eb7319767c56" + sha256 cellar: :any_skip_relocation, sonoma: "f13137ee96946b13e9f5dca16bcf2b6bb51db34970908d6cdca9541cef9f2dc5" + sha256 cellar: :any_skip_relocation, arm64_linux: "8754722ecaa55b9e9c7361bc7ee2927a11d5c2825a81f75b034201bc7b8fc87f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33faeb686f6b82f43adaf81920fac9fbae62239c531a6676c857f64050303046" + end + + uses_from_macos "unzip" => :build + + def install + system "unzip", "source" + system "./build.sh" + + bin.install "objconv" + doc.install "objconv-instructions.pdf" + end + + test do + (testpath/"foo.c").write "int foo() { return 0; }\n" + + system "make", "foo.o" + assert_match "foo", shell_output("nm foo.o") + + # Rename `foo` to `main`. At least one of `make` or `./bar` will fail if this did not succeed. + sym_prefix = OS.mac? ? "_" : "" + system bin/"objconv", "-nr:#{sym_prefix}foo:#{sym_prefix}main", "foo.o", "bar.o" + system "make", "bar" + refute_match "foo", shell_output("nm bar") + system "./bar" + end +end diff --git a/Formula/o/objfw.rb b/Formula/o/objfw.rb new file mode 100644 index 0000000000000..e3a016eea0ba1 --- /dev/null +++ b/Formula/o/objfw.rb @@ -0,0 +1,69 @@ +class Objfw < Formula + desc "Portable, lightweight framework for the Objective-C language" + homepage "https://objfw.nil.im/" + url "https://objfw.nil.im/downloads/objfw-1.4.2.tar.gz" + sha256 "8e6d0cd39271130a0b6c2789fa08f2598c77d9b88acbd0e2c15c8eb1144baa08" + license "LGPL-3.0-only" + head "https://git.nil.im/ObjFW/ObjFW.git", branch: "main" + + livecheck do + url "https://git.nil.im/ObjFW/ObjFW/releases" + regex(/href=.*?objfw[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "2f7aad89ceb1cafc98c3d560b27a8345f880549fea2a0c2a553af6736f2ade60" + sha256 arm64_sequoia: "020eac2025b5597f1cd8a1da69d14f76ceb66e2bd440c02e71b53fbc5d4886c9" + sha256 arm64_sonoma: "82ebb5e1a9cac88f9203376f25590a2321642a0066a353b4b8c6169dbafb6b71" + sha256 sonoma: "1799b4ecdb64a5fc50c79c09dee2ab594444b56da8a3c3292bc9a32c9099a9e1" + sha256 arm64_linux: "ee68d1c5c9bbeed79c1abea4ba0fdccd2970b64322e7b68f3f78fe1892c4744e" + sha256 x86_64_linux: "47a2062ed7cdb2b7a2e6666363a01d6ace11c39e8fa2111c37204126fd7877a9" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + on_linux do + depends_on "llvm" + depends_on "openssl@3" + depends_on "zlib" + end + + fails_with :gcc + + patch :DATA + + def install + ENV.clang if OS.linux? + + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + + return unless OS.mac? + + inreplace bin/"objfw-config", 'OBJC="clang"', 'OBJC="/usr/bin/clang"' + end + + test do + system bin/"objfw-new", "--app", "Test" + system bin/"objfw-compile", "-o", "t", "Test.m" + system "./t" + end +end + +__END__ +diff --git a/build-aux/m4/buildsys.m4 b/build-aux/m4/buildsys.m4 +index 3ec1cc5c..c0c31cac 100644 +--- a/build-aux/m4/buildsys.m4 ++++ b/build-aux/m4/buildsys.m4 +@@ -323,7 +323,7 @@ AC_DEFUN([BUILDSYS_FRAMEWORK], [ + AS_IF([test x"$host_is_ios" = x"yes"], [ + FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/Frameworks/$$out/$${out%.framework}' + ], [ +- FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/../Frameworks/$$out/$${out%.framework}' ++ FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@loader_path/../../../$$out/$${out%.framework}' + ]) + + AC_SUBST(FRAMEWORK_LDFLAGS) + diff --git a/Formula/o/observerward.rb b/Formula/o/observerward.rb new file mode 100644 index 0000000000000..2eb6544466609 --- /dev/null +++ b/Formula/o/observerward.rb @@ -0,0 +1,30 @@ +class Observerward < Formula + desc "Web application and service fingerprint identification tool" + homepage "https://emo-crab.github.io/observer_ward/" + url "https://github.com/emo-crab/observer_ward/archive/refs/tags/v2025.9.18.tar.gz" + sha256 "a2fcbb805c52ffb31b38a433de7aa66e015ef9d746a83223df9d60b792c1208c" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8a9c275ab9ba35cb0296b36442dc36c48186132e5dd076988daba5f3325feacf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2e316cec20279e56392db263268809bca8ca323fe4b292fdb94e7887315504f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab2b9c1bc85d375a2970563e3674158018488afaff2e28468c019aa8af7df4fc" + sha256 cellar: :any_skip_relocation, sonoma: "dd8f343c6678135a07d38b6a63cb9cb020109a6a4cda860946915975a63518b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb91ea7cad8a2a07cd3c8f6defabbba0ed3b3c007305c9a0ab0f3b3b54334a1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "703492aa176008c88997df123d6579e44d0e82b81a34496c44c32768e6ced25c" + end + + depends_on "rust" => :build + + def install + rm ".cargo/config.toml" # disable `+crc-static` + system "cargo", "install", *std_cargo_args(path: "observer_ward") + end + + test do + require "utils/linkage" + + system bin/"observer_ward", "-u" + assert_match "0example", shell_output("#{bin}/observer_ward -t https://www.example.com/") + end +end diff --git a/Formula/o/ocaml-findlib.rb b/Formula/o/ocaml-findlib.rb new file mode 100644 index 0000000000000..2ec4076f1a497 --- /dev/null +++ b/Formula/o/ocaml-findlib.rb @@ -0,0 +1,57 @@ +class OcamlFindlib < Formula + desc "OCaml library manager" + homepage "http://projects.camlcity.org/projects/findlib.html" + url "http://download.camlcity.org/download/findlib-1.9.8.tar.gz" + sha256 "662c910f774e9fee3a19c4e057f380581ab2fc4ee52da4761304ac9c31b8869d" + license "MIT" + revision 2 + + livecheck do + url "http://download.camlcity.org/download/" + regex(/href=.*?findlib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "78208d12d896d767f2cf86d461a3d7c7c89d4bcd300000958a64bd5a91008003" + sha256 arm64_sequoia: "d6a7d8f506f4d089a8f30572798cb972357c01eac1a487f14c3aafeecf1fe980" + sha256 arm64_sonoma: "ca98c985d8842a3f5062b7d48592b6f0347a8f5459b23907253d15e0b3abfd29" + sha256 arm64_ventura: "8b74e02480dff2c49430ee62defa16c3f9dcd87f174b98e6e8e648dcbc8bd8ef" + sha256 cellar: :any, sonoma: "40788547ebec28eaed2a8811f9b3bd748a069abe43cca7c9485705d1b82681d1" + sha256 cellar: :any, ventura: "b48edfe29118e8d0a15ac967c3dd8b8aa4de92c6e7b70190658a08e3a7e58398" + sha256 arm64_linux: "37808e687a6c05f3ffcc60ebbcc85c816e2daea1b7298f6cde2a1b67718cfc1b" + sha256 x86_64_linux: "2f34394dd75304d28a920c3f20abb41d206af10ba07b010fa3d702ea09293537" + end + + depends_on "ocaml" + + uses_from_macos "m4" => :build + + def install + # Specify HOMEBREW_PREFIX here so those are the values baked into the compile, + # rather than the Cellar + system "./configure", "-bindir", bin, + "-mandir", man, + "-sitelib", HOMEBREW_PREFIX/"lib/ocaml", + "-config", etc/"findlib.conf", + "-no-camlp4" + + system "make", "all" + system "make", "opt" + + # Override the above paths for the install step only + system "make", "install", "OCAML_SITELIB=#{lib}/ocaml", + "OCAML_CORE_STDLIB=#{lib}/ocaml" + + # Avoid conflict with ocaml-num package + rm_r(Dir[lib/"ocaml/num", lib/"ocaml/num-top"]) + + # Save extra findlib.conf to work around https://github.com/Homebrew/homebrew-test-bot/issues/805 + libexec.mkpath + cp etc/"findlib.conf", libexec/"findlib.conf" + end + + test do + output = shell_output("#{bin}/ocamlfind query findlib") + assert_equal "#{HOMEBREW_PREFIX}/lib/ocaml/findlib", output.chomp + end +end diff --git a/Formula/o/ocaml-num.rb b/Formula/o/ocaml-num.rb new file mode 100644 index 0000000000000..d33c8d710495d --- /dev/null +++ b/Formula/o/ocaml-num.rb @@ -0,0 +1,53 @@ +class OcamlNum < Formula + desc "OCaml legacy Num library for arbitrary-precision arithmetic" + homepage "https://github.com/ocaml/num" + url "https://github.com/ocaml/num/archive/refs/tags/v1.6.tar.gz" + sha256 "b5cce325449aac746d5ca963d84688a627cca5b38d41e636cf71c68b60495b3e" + license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" } + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8ee79694c29aed327203abaa275dee7f5e041f318cd137c3a3eceaf487317cf6" + sha256 cellar: :any, arm64_sequoia: "6ee1ee0d2051f4c239c9237132fa360040acd888fc3f1e22c7d09c8d848dfa23" + sha256 cellar: :any, arm64_sonoma: "459cea86755ea336dfb81795e7b1bc2109129c4db64190bc1c06e2b90e644418" + sha256 cellar: :any, sonoma: "10857c605731b1a3f944b1a3c6fcc03a2cca2857faa0ba46e0970413bb4a8b62" + sha256 cellar: :any_skip_relocation, arm64_linux: "713ed3e565058a66c023563a55c0f53fd44d479b5cf0df611fd734913711837f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1558cfe67cec4a8ce6f51be96437ddcad3a4c0ebc017e8dac395b9aacb2afa70" + end + + depends_on "ocaml-findlib" => :build + depends_on "ocaml" + + def install + ENV["OCAMLFIND_DESTDIR"] = lib/"ocaml" + + # Work around https://github.com/ocaml/num/issues/43 + inreplace "src/Makefile", "cp META.num META", "mv META.num META" + + (lib/"ocaml").mkpath + cp Formula["ocaml"].opt_lib/"ocaml/Makefile.config", lib/"ocaml" + + # install in #{lib}/ocaml not #{HOMEBREW_PREFIX}/lib/ocaml + inreplace lib/"ocaml/Makefile.config" do |s| + s.change_make_var! "prefix", prefix + end + + ENV.deparallelize { system "make" } + (lib/"ocaml/stublibs").mkpath # `make install` assumes this directory exists + system "make", "install", "STDLIBDIR=#{lib}/ocaml" + + pkgshare.install "test" + + rm lib/"ocaml/Makefile.config" # avoid conflict with ocaml + end + + test do + cp_r pkgshare/"test/.", "." + system Formula["ocaml"].opt_bin/"ocamlopt", "-I", lib/"ocaml", "-I", + Formula["ocaml"].opt_lib/"ocaml", "-o", "test", "nums.cmxa", + "test.ml", "test_nats.ml", "test_big_ints.ml", "test_ratios.ml", + "test_nums.ml", "test_io.ml", "end_test.ml" + assert_match "1... 2... 3", shell_output("./test") + end +end diff --git a/Formula/o/ocaml-zarith.rb b/Formula/o/ocaml-zarith.rb new file mode 100644 index 0000000000000..b9e5699e81d81 --- /dev/null +++ b/Formula/o/ocaml-zarith.rb @@ -0,0 +1,57 @@ +class OcamlZarith < Formula + desc "OCaml library for arbitrary-precision arithmetic" + homepage "https://github.com/ocaml/Zarith" + url "https://github.com/ocaml/Zarith/archive/refs/tags/release-1.14.tar.gz" + sha256 "5db9dcbd939153942a08581fabd846d0f3f2b8c67fe68b855127e0472d4d1859" + license "LGPL-2.0-only" + revision 3 + + bottle do + sha256 cellar: :any, arm64_tahoe: "f59725b44ef1aa8656404d833c812f2ff3d2a2bc539ef998fe5aa2baeb079f1c" + sha256 cellar: :any, arm64_sequoia: "d023c1e616b868d7fb2a773eeb426aab87d0ad4cd102df7c4eccb5cd0c3e959e" + sha256 cellar: :any, arm64_sonoma: "59b4a24ead8319c8837252ca0702265c46e3820aa5629b9a940412edd50ab144" + sha256 cellar: :any, sonoma: "69a2fafdd5ad8ecdd81ba9e812289b760feeffd275df0aa5b2bfd346272ad87c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fbd3299e51a580a8b64f03f0bf132f426a3d49d07c7cb03e4f3b2e7220520db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dee59068932c13b018ec393239f0d5c9691924998a76ea2d031da8eff1fb482e" + end + + depends_on "ocaml-findlib" => :build + depends_on "gmp" + depends_on "ocaml" + + def install + # Work around for https://github.com/Homebrew/homebrew-test-bot/issues/805 + if ENV["HOMEBREW_GITHUB_ACTIONS"] && !(Formula["ocaml-findlib"].etc/"findlib.conf").exist? + ENV["OCAMLFIND_CONF"] = Formula["ocaml-findlib"].opt_libexec/"findlib.conf" + end + + ENV["OCAMLFIND_DESTDIR"] = lib/"ocaml" + + (lib/"ocaml").mkpath + cp Formula["ocaml"].opt_lib/"ocaml/Makefile.config", lib/"ocaml" + + # install in #{lib}/ocaml not #{HOMEBREW_PREFIX}/lib/ocaml + inreplace lib/"ocaml/Makefile.config" do |s| + s.change_make_var! "prefix", prefix + end + + ENV.deparallelize + system "./configure" + system "make" + (lib/"ocaml/stublibs").mkpath # `make install` assumes this directory exists + system "make", "install", "STDLIBDIR=#{lib}/ocaml" + + pkgshare.install "tests" + + rm lib/"ocaml/Makefile.config" # avoid conflict with ocaml + end + + test do + cp_r pkgshare/"tests/.", "." + system Formula["ocaml"].opt_bin/"ocamlopt", "-I", lib/"ocaml/zarith", + "-ccopt", "-L#{lib}/ocaml -L#{Formula["gmp"].opt_lib}", + "zarith.cmxa", "-o", "zq.exe", "zq.ml" + expected = File.read("zq.output64", mode: "rb") + assert_equal expected, shell_output("./zq.exe") + end +end diff --git a/Formula/o/ocaml.rb b/Formula/o/ocaml.rb new file mode 100644 index 0000000000000..6216cf7598bb8 --- /dev/null +++ b/Formula/o/ocaml.rb @@ -0,0 +1,60 @@ +# OCaml does not preserve binary compatibility across compiler releases, +# so when updating it you should ensure that all dependent packages are +# also updated by incrementing their revisions. +# +# Specific packages to pay attention to include: +# - camlp5 +# - lablgtk +# +# Applications that really shouldn't break on a compiler update are: +# - coq +# - coccinelle +# - unison +class Ocaml < Formula + desc "General purpose programming language in the ML family" + homepage "https://ocaml.org/" + url "https://caml.inria.fr/pub/distrib/ocaml-5.4/ocaml-5.4.0.tar.xz" + sha256 "dfaa8a2e11c799bc1765d8bef44911406ee5f4803027190382a939f88c912266" + license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" } + head "https://github.com/ocaml/ocaml.git", branch: "trunk" + + livecheck do + url "https://ocaml.org/releases" + regex(%r{href=.*?/releases/v?(\d+(?:\.\d+)+)/?["']}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "9e52a52b1b531cb999c24f7f7d524f840b4630a376c3888c5e91875d15cda6ce" + sha256 arm64_sequoia: "0e269db9117ff10e44a62f85521a46f85da8c1dca79915795776f3a0f26ab5a5" + sha256 arm64_sonoma: "f67dbb07c32a737b605e9d35e65efcf05af7e6e1618faa586dad50769d5f9ba4" + sha256 cellar: :any, sonoma: "688925c23de05f913dd9ec435ae71281254892b7109e1feba690aba1567b764e" + sha256 arm64_linux: "475f722bfa5f1f4bf2eabe93829a425bf7ad167a624ad3705ca5ab62b5436477" + sha256 x86_64_linux: "9be36dc8f324cb8ef5267c9d80343860105a6f0d8c3e04394bb3f0233b3b40f1" + end + + # The ocaml compilers embed prefix information in weird ways that the default + # brew detection doesn't find, and so needs to be explicitly blocked. + pour_bottle? only_if: :default_prefix + + def install + ENV.deparallelize # Builds are not parallel-safe, esp. with many cores + + # the ./configure in this package is NOT a GNU autoconf script! + args = %W[ + --prefix=#{HOMEBREW_PREFIX} + --enable-debug-runtime + --mandir=#{man} + ] + system "./configure", *args + system "make", "world.opt" + system "make", "prefix=#{prefix}", "install" + end + + test do + output = pipe_output("#{bin}/ocaml 2>&1", "let x = 1 ;;") + assert_match "val x : int = 1", output + assert_match HOMEBREW_PREFIX.to_s, shell_output("#{bin}/ocamlc -where") + end +end diff --git a/Formula/o/ocaml@4.rb b/Formula/o/ocaml@4.rb new file mode 100644 index 0000000000000..8017d66375f03 --- /dev/null +++ b/Formula/o/ocaml@4.rb @@ -0,0 +1,64 @@ +# OCaml does not preserve binary compatibility across compiler releases, +# so when updating it you should ensure that all dependent packages are +# also updated by incrementing their revisions. +# +# Applications that really shouldn't break on a compiler update are: +# - coccinelle +class OcamlAT4 < Formula + desc "General purpose programming language in the ML family" + homepage "https://ocaml.org/" + url "https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.2.tar.xz" + sha256 "7819f68693e32946f93358df46a8ea6f517222681fcc6f7cb96214216cfec764" + license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" } + + livecheck do + url "https://ocaml.org/releases" + regex(%r{href=.*?/releases/v?(4(?:\.\d+)+)/?["']}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "2d6e6250634c72884d12c4fdfcf4f585442a6c0403ed2cdae8511870226e23c1" + sha256 arm64_sequoia: "76e0588c99b9497463259b330659ce2f53d1c0763f89639c5f42e5503117bac5" + sha256 arm64_sonoma: "6abe32932e41a40ff75c1d429fc01ea3492f7a0c3281707c5ae472fba7c5db15" + sha256 arm64_ventura: "e63d8b519711cb181b4528efa61771cc1f0075d469fd84a7878b6efb849b6efa" + sha256 arm64_monterey: "ea41a63891e8e0200aa517fcd0d8030cb721735d19e4cd119651d31cf2c428de" + sha256 sonoma: "cee37cd961b6f813bcb86b5f20c8640abf3fd691bde2f26da46a026d1fbee93b" + sha256 ventura: "54411358c0d919ff17a96d81a93020dcde72b2138c3cb382a67deb1df18a308a" + sha256 monterey: "cc525d1058ce4ef19405a80cb0dcf3af11c3a6e772fb754431c1ac1053f898bf" + sha256 arm64_linux: "18c59ccd659d804753cd938bc8c8b49d288f8a6c1099dcce9b7daaf06e7fef12" + sha256 x86_64_linux: "b9773be3973366e8d5b4d933b7cdadfd212ad9ab76dca04b709a41504b795924" + end + + # The ocaml compilers embed prefix information in weird ways that the default + # brew detection doesn't find, and so needs to be explicitly blocked. + pour_bottle? only_if: :default_prefix + + keg_only :versioned_formula + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + ENV.deparallelize # Builds are not parallel-safe, esp. with many cores + + # the ./configure in this package is NOT a GNU autoconf script! + args = %W[ + --prefix=#{prefix} + --enable-debug-runtime + --mandir=#{man} + ] + system "./configure", *args + system "make", "world.opt" + system "make", "prefix=#{prefix}", "install" + end + + test do + output = pipe_output("#{bin}/ocaml 2>&1", "let x = 1 ;;") + assert_match "val x : int = 1", output + end +end diff --git a/Formula/o/ocamlbuild.rb b/Formula/o/ocamlbuild.rb new file mode 100644 index 0000000000000..0f071fb8ca797 --- /dev/null +++ b/Formula/o/ocamlbuild.rb @@ -0,0 +1,36 @@ +class Ocamlbuild < Formula + desc "Generic build tool for OCaml" + homepage "https://github.com/ocaml/ocamlbuild" + url "https://github.com/ocaml/ocamlbuild/archive/refs/tags/0.16.1.tar.gz" + sha256 "2ba6857f2991b7f69368e8db818b163d31cf5a367f15f5953bf8f01a77b3d4fc" + license "LGPL-2.0-only" => { with: "OCaml-LGPL-linking-exception" } + head "https://github.com/ocaml/ocamlbuild.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "35ae1a6eeb68c81a591f49b397e21230a1956a22dc6cd0c8d28486c93786a501" + sha256 arm64_sequoia: "d102e1f07c6ccb751e1923efcd604fb73bbc46bcf4c5a71c9aab572200f62cb8" + sha256 arm64_sonoma: "e852cc2b3119c4b0d0cc5fb252d2f637ca0733e59500574ce07998bf72bbce35" + sha256 arm64_ventura: "c882d5db337ec2c28a818c1060945ec5a0944e0c4c4596504ad229ff59a17f2f" + sha256 sonoma: "7caad9fb8e6256e894222ad3ebf15d9e0a5fb540e461032d5cdf74abafa09dcb" + sha256 ventura: "6000d51b9774218b3e11998c0230a140e12b1eb373f124e6c12bf875d80741a8" + sha256 arm64_linux: "747624e670b7b2cc2e83a3915c5d9f38d628620c1c98218b8c1da40ae0a44b4f" + sha256 x86_64_linux: "664739d1911bb25c0a5375231fe48dd950acfd5e85e1f59154b5de9c01368e08" + end + + depends_on "ocaml" + + def install + system "make", "configure", "OCAMLBUILD_BINDIR=#{bin}", "OCAMLBUILD_LIBDIR=#{lib}", "OCAMLBUILD_MANDIR=#{man}" + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ocamlbuild --version") + end +end diff --git a/Formula/o/oci-cli.rb b/Formula/o/oci-cli.rb new file mode 100644 index 0000000000000..d5ae35b5a6f97 --- /dev/null +++ b/Formula/o/oci-cli.rb @@ -0,0 +1,124 @@ +class OciCli < Formula + include Language::Python::Virtualenv + + desc "Oracle Cloud Infrastructure CLI" + homepage "https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm" + url "https://files.pythonhosted.org/packages/37/6a/cc1d635cac18f7448f503acc0d0c2f32465e435f2b0306f3f9341f064815/oci_cli-3.70.0.tar.gz" + sha256 "cf413cdd297cddd1450ac9f42f433bb8390a83dac51558315f258559b7c308c4" + license any_of: ["UPL-1.0", "Apache-2.0"] + head "https://github.com/oracle/oci-cli.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "03c05baf5163834782953d15aaf5e8d5da577f242fa50297b77295fcff9c92ca" + sha256 cellar: :any, arm64_sequoia: "3dcb443035583b60c7aec9a809ae5f984350f6b03d327516eae279a6e2ca796e" + sha256 cellar: :any, arm64_sonoma: "4ca44fb260592c3ff70ee84a63f63de7b3d35c96f64988d2bdbb1c81624919ff" + sha256 cellar: :any, sonoma: "41802628aeff2ae87cb186a60d6d60125d7ff881e325e90711a057fe825e9da3" + sha256 cellar: :any_skip_relocation, arm64_linux: "47db4eb6e2eb160c37b5e50f89dbe84ddce78882ff2e42454677134e79e09029" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c091cc272d4bd6bfe315ccad166ec40a250b79be46217d53a8f9d3918e17c895" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "circuitbreaker" do + url "https://files.pythonhosted.org/packages/df/ac/de7a92c4ed39cba31fe5ad9203b76a25ca67c530797f6bb420fff5f65ccb/circuitbreaker-2.1.3.tar.gz" + sha256 "1a4baee510f7bea3c91b194dcce7c07805fe96c4423ed5594b75af438531d084" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/dd/cf/706c1ad49ab26abed0b77a2f867984c1341ed7387b8030a6aa914e2942a0/click-8.0.4.tar.gz" + sha256 "8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" + sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" + end + + resource "oci" do + url "https://files.pythonhosted.org/packages/0e/c2/2641fc9ac9c21c3c2909793e42547bf520b81b2d5bc7fea5f21ddb08badf/oci-2.163.0.tar.gz" + sha256 "02f4d69db74e76918709c8f7d2878edf8a931581d83fbc9238895fd0196bba81" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/cc/c6/25b6a3d5cd295304de1e32c9edbcf319a52e965b339629d37d42bb7126ca/prompt_toolkit-3.0.43.tar.gz" + sha256 "3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/04/8c/cd89ad05804f8e3c17dea8f178c3f40eeab5694c30e0c9f5bcd49f576fc3/pyopenssl-25.1.0.tar.gz" + sha256 "8d031884482e0c67ee92bf9a4d8cceb08d92aba7136432ffb0703c5280fc205b" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "terminaltables" do + url "https://files.pythonhosted.org/packages/f5/fc/0b73d782f5ab7feba8d007573a3773c58255f223c5940a7b7085f02153c3/terminaltables-3.1.10.tar.gz" + sha256 "ba6eca5cb5ba02bba4c9f4f985af80c54ec3dccf94cfcd190154386255e47543" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + venv = virtualenv_install_with_resources without: "terminaltables" + + # Switch build-system to poetry-core to avoid rust dependency on Linux. + # Remove when released: https://github.com/matthewdeanmartin/terminaltables/pull/1 + resource("terminaltables").stage do + inreplace "pyproject.toml", 'requires = ["poetry>=0.12"]', 'requires = ["poetry-core>=1.0"]' + inreplace "pyproject.toml", 'build-backend = "poetry.masonry.api"', 'build-backend = "poetry.core.masonry.api"' + venv.pip_install Pathname.pwd + end + + # TODO: remove `shells` argument to include `bash` completions with click 8.1.7+ + # https://github.com/pallets/click/commit/d9db70cabdc9cb10cd5584464b8adb9a24545b92 + generate_completions_from_executable(bin/"oci", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/oci --version") + + assert_match "Usage: oci [OPTIONS] COMMAND [ARGS]", shell_output("#{bin}/oci --help") + assert_match "Could not find config file", shell_output("#{bin}/oci session validate 2>&1", 1) + end +end diff --git a/Formula/o/ocicl.rb b/Formula/o/ocicl.rb new file mode 100644 index 0000000000000..c3fba93788488 --- /dev/null +++ b/Formula/o/ocicl.rb @@ -0,0 +1,60 @@ +class Ocicl < Formula + desc "OCI-based ASDF system distribution and management tool for Common Lisp" + homepage "https://github.com/ocicl/ocicl" + url "https://github.com/ocicl/ocicl/archive/refs/tags/v2.8.3.tar.gz" + sha256 "fd14fc5eb9f426dc462961bc7a85dbde4004701ee14fdb34f109044d25e5f686" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9504ec274a04b277b5a41b29aa0d2f2ed190f1bca3f46fd51c277507b89d2bb3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aeecf0dce04c52943ad30ffb997db34d4b394023309becd2b76b530a7edb5513" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0aec49c17358e1f541602a0ba2929737d9fe8967875c1579f4453a631a696559" + sha256 cellar: :any_skip_relocation, sonoma: "4d8f709aec96b092ec9006a872ee9e595291f1f96bbd4d1378ae9f23dbcae51a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9846e63349f808ae98bff7ca2a498d25aed5a6f6c201686e98d78807c4ed5e61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "314ec401c109a66d722fa14658fc213d97e14fc9e8298009680f8367778c2e31" + end + + depends_on "sbcl" + depends_on "zstd" + + def install + mkdir_p [libexec, bin] + + # ocicl's setup.lisp generates an executable that is the binding + # of the sbcl executable to the ocicl image core. Unfortunately, + # on Linux, homebrew somehow manipulates the resulting ELF file in + # such a way that the sbcl part of the binary can't find the image + # cores. For this reason, we are generating our own image core as + # a separate file and loading it at runtime. + system "sbcl", "--dynamic-space-size", "3072", "--no-userinit", + "--eval", "(load \"runtime/asdf.lisp\")", "--eval", <<~LISP + (progn + (asdf:initialize-source-registry + (list :source-registry + :inherit-configuration (list :tree (uiop:getcwd)))) + (asdf:load-system :ocicl) + (asdf:clear-source-registry) + (sb-ext:save-lisp-and-die "#{libexec}/ocicl.core")) + LISP + + # Write a shell script to wrap ocicl + (bin/"ocicl").write <<~LISP + #!/usr/bin/env -S sbcl --core #{libexec}/ocicl.core --script + (uiop:restore-image) + (ocicl:main) + LISP + end + + test do + system bin/"ocicl", "install", "chat" + assert_path_exists testpath/"ocicl.csv" + + version_files = testpath.glob("ocicl/cl-chat*/_00_OCICL_VERSION") + assert_equal 1, version_files.length, "Expected exactly one _00_OCICL_VERSION file" + + (testpath/"init.lisp").write shell_output("#{bin}/ocicl setup") + system "sbcl", "--non-interactive", "--load", "init.lisp", + "--eval", "(progn (asdf:load-system :chat) (sb-ext:quit))" + end +end diff --git a/Formula/o/ocl-icd.rb b/Formula/o/ocl-icd.rb new file mode 100644 index 0000000000000..c4f5b3830adef --- /dev/null +++ b/Formula/o/ocl-icd.rb @@ -0,0 +1,63 @@ +class OclIcd < Formula + desc "OpenCL ICD loader" + homepage "https://github.com/OCL-dev/ocl-icd/" + url "https://github.com/OCL-dev/ocl-icd/archive/refs/tags/v2.3.4.tar.gz" + sha256 "1a302b71b7304cca5a36f69d017b1af2b762cc4c2dd1c0c0e2fc1933db25c9cc" + license "BSD-2-Clause" + head "https://github.com/OCL-dev/ocl-icd.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7d9be02fbfaf871daf5cb668b8b4ea97d663f80417b91f472170505b9ef9789b" + sha256 cellar: :any, arm64_sequoia: "08c6eb98086b19296a76f35e4e7f4d7449e4f80901d2640d201ef04db9b0e0d7" + sha256 cellar: :any, arm64_sonoma: "88c084b65ff3a60594b313196d284d80f6abd7eacfd03a991216a29a3672e2a0" + sha256 cellar: :any, sonoma: "77ce6f71726a4c043d727ff7826b590fe3245ac7c59ae433a746494b8d4ae89d" + sha256 cellar: :any_skip_relocation, arm64_linux: "913ab871ddcffee2b49fd8ccc776758b5c918f7ab7141b72286aac0005469bd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cd60c1551f2f69e72c1be4b68440afd95960ac2e272e5ff34e12ea84c00a3ae" + end + + keg_only :shadowed_by_macos, "macOS provides OpenCL.framework" + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "opencl-headers" => [:build, :test] + depends_on "xmlto" => :build + + uses_from_macos "libxml2" => :build + uses_from_macos "libxslt" => :build + uses_from_macos "ruby" => :build + + conflicts_with "opencl-icd-loader", because: "both install `lib/libOpenCL.so` library" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "./bootstrap" + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--enable-custom-vendordir=#{etc}/OpenCL/vendors" + system "make", "install" + pkgshare.install "ocl_test.c" + end + + def caveats + s = "The default vendors directory is #{etc}/OpenCL/vendors\n" + on_linux do + s += <<~EOS + No OpenCL implementation is pre-installed, so all dependents will require either + installing a compatible formula or creating an ".icd" file mapping to an externally + installed implementation. Any ".icd" files copied or symlinked into + `#{etc}/OpenCL/vendors` will automatically be detected by `ocl-icd`. + A portable OpenCL implementation is available via the `pocl` formula. + EOS + end + s + end + + test do + cp pkgshare/"ocl_test.c", testpath + system ENV.cc, "ocl_test.c", "-o", "test", "-I#{Formula["opencl-headers"].opt_include}", "-L#{lib}", "-lOpenCL" + ENV["OCL_ICD_VENDORS"] = testpath/"vendors" + assert_equal "No platforms found!", shell_output("./test").chomp + end +end diff --git a/Formula/o/oclgrind.rb b/Formula/o/oclgrind.rb new file mode 100644 index 0000000000000..84af403d192a8 --- /dev/null +++ b/Formula/o/oclgrind.rb @@ -0,0 +1,228 @@ +class Oclgrind < Formula + desc "OpenCL device simulator and debugger" + homepage "https://github.com/jrprice/Oclgrind" + url "https://github.com/jrprice/Oclgrind/archive/refs/tags/v21.10.tar.gz" + sha256 "b40ea81fcf64e9012d63c3128640fde9785ef4f304f9f876f53496595b8e62cc" + license "BSD-3-Clause" + revision 2 + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "5125b9afb6956eca58806399252680b2e90a085bdffb3fa4549245f3549be711" + sha256 cellar: :any, arm64_sequoia: "c01a0c14afb634bcd2ccd552bb958484b447101e106bcbe13f86b2d7c207e69c" + sha256 cellar: :any, arm64_sonoma: "8f2733e4d37f63d59c26e494e777cf2ac0b4c7d70282c86a7c1715e6a0f94e0b" + sha256 cellar: :any, sonoma: "925f7da504e7ea5a8778d2074c75f6931ff435e528643c25f165212587233a63" + sha256 cellar: :any_skip_relocation, arm64_linux: "15e5413070e0711c302d2493d34b3c37d03ed3ab84eedc212099e4fcaa5fbde4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70b8d27cfcae4a9a284637525781d1c6c7b61b7236bfb94142341453af3f3fa5" + end + + depends_on "cmake" => :build + depends_on "llvm@19" # Issue for LLVM 20: https://github.com/jrprice/Oclgrind/issues/216 + depends_on "readline" + + on_linux do + depends_on "opencl-headers" => :test + end + + # Backport support for `llvm@14`. Remove in the next release. + patch do + url "https://github.com/jrprice/Oclgrind/commit/6c76e7bec0aa7fa451515a5cfcb35ab2384ba6e0.patch?full_index=1" + sha256 "8c1b8ec75d8d8c8d02246124b40452ec9ef1243d3e3c497fe4ffa8571cd98ade" + end + + # Backport CI/test changes to apply later commits + patch do + url "https://github.com/jrprice/Oclgrind/commit/92da61bbe773db2b36037ea97563750065696d10.patch?full_index=1" + sha256 "5f40561f7beb8bad5b665a52332ff865cdaf00296e56e467e11de69fa71a82b2" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/b8dea2756cee3cad61e00bd4f7572ab00ccf44bc.patch?full_index=1" + sha256 "d2c4674bc3a355695a9f27c0fb8967c288c93638e5ed7be1cc55148606e5eed3" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/7e0613dac7a585699c66043104fda401dd0234ed.patch?full_index=1" + sha256 "403b734a5cd71b245d057bb57e1573a2c77225716d55c7d90d3a9a20f801d5ca" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/accf518f8623548417c344a0193aa9b531cc9486.patch?full_index=1" + sha256 "7f0f1e1c5a61109e09cd108be8cebef81392c1815903decd3c41e3d75a71d972" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/9957047931bb9c7e2aa38c8687b6eb54a88fb4b8.patch?full_index=1" + sha256 "83be80b8052b582fc1019f8820c48d8e83c0b14d6c6b4b9d7bdffb912aaae771" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/8c41dc9d44716850dd8202d5c465dad6978491f9.patch?full_index=1" + sha256 "a87bf982c1b089d623e8a94f4c6dd57c5bd23e6f30e8563011a02254100146ae" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/6d64783add2a15c6633c52f84b6d4228048c676d.patch?full_index=1" + sha256 "7a8d64d60c9c891bd0bf74b145ccdee6067c473d7387768028da893d7f8dc308" + end + + # Backport support for LLVM 15 + patch do + url "https://github.com/jrprice/Oclgrind/commit/265d7fa8d8db2b64e2812bf529bfc0aa7bdd9734.patch?full_index=1" + sha256 "567dd21a5f30eaf31b18fd212f277783b7268b64a9761947b4f562b9a7bb1c5c" + end + patch do + url "https://github.com/jrprice/Oclgrind/commit/9fbb8b2583f7005f65f787ba4b1e950e03f606d8.patch?full_index=1" + sha256 "0f530d49acc07ba6f9be2626f8aeaff3b31958bf1919fce9eafac0b04ad6ca2c" + end + + # Backport support for LLVM 16 + patch do + url "https://github.com/jrprice/Oclgrind/commit/53ed0f7f489371a2721bfe05d28153f0f61db61f.patch?full_index=1" + sha256 "c9726ed3154b3a208bc987fbb8a09c1c19d17220c7508e9eadba5fdd81c13213" + end + + # Backport support for LLVM 17 + patch do + url "https://github.com/jrprice/Oclgrind/commit/2af59d53a98633040884bb2ae34de0755d229556.patch?full_index=1" + sha256 "ffba84f069b478c3c40435481d101228f8c60ef542070d42ed0a76412f59f9e6" + end + + # Backport support for LLVM 18 + patch do + url "https://github.com/jrprice/Oclgrind/commit/6f9bd9aee73d796d18af1f77689b4c1eb05ead02.patch?full_index=1" + sha256 "adf85b1adcd951eb82c263619b999a860166a35cbf8a68cc7d7e1b35eb217894" + end + + # Backport support for LLVM 19 + patch do + url "https://github.com/jrprice/Oclgrind/commit/7cc48c424a65dfb870b1e7614b59362dff44b348.patch?full_index=1" + sha256 "3727836bbc42691bbb34fdd16a266586e01de8ee68b948e9a43fbea10977d864" + end + + def install + llvm = deps.find { |dep| dep.name.match?(/^llvm(@\d+)?$/) } + .to_formula + rpaths = [rpath, rpath(target: llvm.opt_lib)] + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + # Install the optional ICD into #{prefix}/etc rather than #{etc} as it contains realpath + # to the shared library and needs to be kept up-to-date to work with an ICD loader. + # This relies on `brew link` automatically creating and updating #{etc} symlinks. + (prefix/"etc/OpenCL/vendors").install "build/oclgrind.icd" + end + + test do + (testpath/"rot13.c").write <<~C + #include + #include + #include + #include <#{OS.mac? ? "OpenCL" : "CL"}/cl.h> + + const char rot13_cl[] = " \\ + __kernel void rot13 \\ + ( __global const char* in \\ + , __global char* out \\ + ) \\ + { \\ + const uint index = get_global_id(0); \\ + \\ + char c=in[index]; \\ + if (c<'A' || c>'z' || (c>'Z' && c<'a')) { \\ + out[index] = in[index]; \\ + } else { \\ + if (c>'m' || (c>'M' && c<'a')) { \\ + out[index] = in[index]-13; \\ + } else { \\ + out[index] = in[index]+13; \\ + } \\ + } \\ + } \\ + "; + + void rot13 (char *buf) { + int index=0; + char c=buf[index]; + while (c!=0) { + if (c<'A' || c>'z' || (c>'Z' && c<'a')) { + buf[index] = buf[index]; + } else { + if (c>'m' || (c>'M' && c<'a')) { + buf[index] = buf[index]-13; + } else { + buf[index] = buf[index]+13; + } + } + c=buf[++index]; + } + } + + int main() { + char buf[]="Hello, World!"; + size_t srcsize, worksize=strlen(buf); + + cl_int error; + cl_platform_id platform; + cl_device_id device; + cl_uint platforms, devices; + + error=clGetPlatformIDs(1, &platform, &platforms); + error=clGetDeviceIDs(platform, CL_DEVICE_TYPE_ALL, 1, &device, &devices); + cl_context_properties properties[]={ + CL_CONTEXT_PLATFORM, (cl_context_properties)platform, + 0}; + + cl_context context=clCreateContext(properties, 1, &device, NULL, NULL, &error); + cl_command_queue cq = clCreateCommandQueue(context, device, 0, &error); + + rot13(buf); + + const char *src=rot13_cl; + srcsize=strlen(rot13_cl); + + const char *srcptr[]={src}; + cl_program prog=clCreateProgramWithSource(context, + 1, srcptr, &srcsize, &error); + error=clBuildProgram(prog, 0, NULL, "", NULL, NULL); + + if (error == CL_BUILD_PROGRAM_FAILURE) { + size_t logsize; + clGetProgramBuildInfo(prog, device, CL_PROGRAM_BUILD_LOG, 0, NULL, &logsize); + + char *log=(char *)malloc(logsize); + clGetProgramBuildInfo(prog, device, CL_PROGRAM_BUILD_LOG, logsize, log, NULL); + + fprintf(stderr, "%s\\n", log); + free(log); + + return 1; + } + + cl_mem mem1, mem2; + mem1=clCreateBuffer(context, CL_MEM_READ_ONLY, worksize, NULL, &error); + mem2=clCreateBuffer(context, CL_MEM_WRITE_ONLY, worksize, NULL, &error); + + cl_kernel k_rot13=clCreateKernel(prog, "rot13", &error); + clSetKernelArg(k_rot13, 0, sizeof(mem1), &mem1); + clSetKernelArg(k_rot13, 1, sizeof(mem2), &mem2); + + char buf2[sizeof buf]; + buf2[0]='?'; + buf2[worksize]=0; + + error=clEnqueueWriteBuffer(cq, mem1, CL_FALSE, 0, worksize, buf, 0, NULL, NULL); + error=clEnqueueNDRangeKernel(cq, k_rot13, 1, NULL, &worksize, &worksize, 0, NULL, NULL); + error=clEnqueueReadBuffer(cq, mem2, CL_FALSE, 0, worksize, buf2, 0, NULL, NULL); + error=clFinish(cq); + + puts(buf2); + } + C + + system ENV.cc, "rot13.c", "-o", "rot13", "-L#{lib}", "-loclgrind-rt" + output = shell_output("#{bin}/oclgrind ./rot13 2>&1").chomp + assert_equal "Hello, World!", output + end +end diff --git a/Formula/o/ocm.rb b/Formula/o/ocm.rb new file mode 100644 index 0000000000000..ff2e64fa07142 --- /dev/null +++ b/Formula/o/ocm.rb @@ -0,0 +1,35 @@ +class Ocm < Formula + desc "CLI for the Red Hat OpenShift Cluster Manager" + homepage "https://www.openshift.com/" + url "https://github.com/openshift-online/ocm-cli/archive/refs/tags/v1.0.8.tar.gz" + sha256 "8d64e903af844b135f761f8a61845b52bd76c066be7143d542e3f4e2ad4a622d" + license "Apache-2.0" + head "https://github.com/openshift-online/ocm-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d79bb7ede63fdb0029beffa8972e831444c7309c49b6af52dd8f135a388758e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e6bbd1864db82c6be92b6afd3615e65157afbaffe5b632748e4c7bd455f1064" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "389e8ca5aafc7516e3f1908428a85d87f2e532913ffacb32b7d5746d0bf81b65" + sha256 cellar: :any_skip_relocation, sonoma: "c482f421b767271aef663fd3a887952b916876b6652ad846679f5606d0c637b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0fdbf04a5e1be8b8d4b3904adfd743928582f2f9299d3a300a93530dfa53224" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8194906c62300381a95386bfae83b631bde7cadb8c0575bf08f1769a4f7c70a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:), "./cmd/ocm" + generate_completions_from_executable(bin/"ocm", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ocm version") + + # Test that the config can be created and configuration set in it + ENV["OCM_CONFIG"] = testpath/"ocm.json" + system bin/"ocm", "config", "set", "pager", "less" + config_json = JSON.parse(File.read(ENV["OCM_CONFIG"])) + assert_equal "less", config_json["pager"] + end +end diff --git a/Formula/o/ocmtoc.rb b/Formula/o/ocmtoc.rb new file mode 100644 index 0000000000000..317e942fbe539 --- /dev/null +++ b/Formula/o/ocmtoc.rb @@ -0,0 +1,46 @@ +class Ocmtoc < Formula + desc "Mach-O to PE/COFF binary converter" + homepage "https://github.com/acidanthera/ocmtoc" + url "https://github.com/acidanthera/ocmtoc/archive/refs/tags/1.0.4.tar.gz" + sha256 "dbc33ca5d5ae436b2845e36fc13ba878261480788db86fc6daab89dc5588e51a" + license "APSL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34843bb5ba58430a17255e04a445bf40be5d88c9063c0a322d5b7659c2b7cc4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1600fd106867c86d9c5d570832bf95bc07ee70cc735ebca1ff04b5191206dcb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb37d60cdc18321191054e2118463722ab18bb30460b0c40a9efabfd86124a6a" + sha256 cellar: :any_skip_relocation, sonoma: "3a3e4f56aa7092771863408c858c5979dd929a1b38440c60f1618a41c8e40d87" + end + + depends_on xcode: :build + depends_on :macos + + conflicts_with "mtoc", because: "both install `mtoc` binaries" + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "cctools.xcodeproj", + "-scheme", "mtoc", + "-configuration", "Release", + "CONFIGURATION_BUILD_DIR=build/Release" + bin.install "build/Release/mtoc" + man1.install "man/mtoc.1" + end + + test do + (testpath/"test.c").write <<~C + __attribute__((naked)) int start() {} + C + + args = %W[ + -nostdlib + -Wl,-preload + -Wl,-e,_start + -seg1addr 0x1000 + -o #{testpath}/test + #{testpath}/test.c + ] + system ENV.cc, *args + system bin/"mtoc", testpath/"test", testpath/"test.pe" + end +end diff --git a/Formula/o/ocp.rb b/Formula/o/ocp.rb new file mode 100644 index 0000000000000..0bb2b60674a94 --- /dev/null +++ b/Formula/o/ocp.rb @@ -0,0 +1,92 @@ +class Ocp < Formula + desc "UNIX port of the Open Cubic Player" + homepage "https://stian.cubic.org/project-ocp.php" + url "https://stian.cubic.org/ocp/ocp-3.0.1.tar.xz" + sha256 "60a03d73883ea9c5dd94253907fc2002aa229e0fc41febb17d7baa341b228db1" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/mywave82/opencubicplayer.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?ocp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "4f8cd8eaae6ce1f2faaa7fb5e7cebd035adad38c3157b15909f2a05d26f3b118" + sha256 arm64_sequoia: "91d33fe0137ccd8a79cb3419fcb61925135333944dcf031546efc859e28ed89c" + sha256 arm64_sonoma: "7d079e34e69bc73e5cb3bdcbb998c1fc647f1c7bb6e22a39715e3530170cad1a" + sha256 arm64_ventura: "4423dcac99faa9af574011771a2ef04b3e45d573ed6e0c836c5ddf28fdaf13e2" + sha256 sonoma: "20d4860786caf5f9c84a3def8e2e87501f72c896247c689c0de3735168950984" + sha256 ventura: "de51895938a849610a1d82aa709256b1f03ba2c1f67cdf4ec9caa21f3439d890" + sha256 arm64_linux: "3c6d30c6242aab1ee18d325645f162377ab18324ada0d6b4e5a01165a5cb0f14" + sha256 x86_64_linux: "1d624e55ecfc0b8b13c788690519f474588b41f7fe3960bd57e39f3371d5cbe5" + end + + depends_on "pkgconf" => :build + depends_on "xa" => :build + + depends_on "ancient" + depends_on "cjson" + depends_on "flac" + depends_on "freetype" + depends_on "game-music-emu" + depends_on "jpeg-turbo" + depends_on "libdiscid" + depends_on "libpng" + depends_on "libvorbis" + depends_on "mad" + depends_on "sdl2" + + uses_from_macos "bzip2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "libogg" + end + + on_linux do + depends_on "util-linux" => :build # for `hexdump` + depends_on "alsa-lib" + end + + # pin to 15.0.6 to use precompiled fonts + resource "unifont" do + url "https://ftpmirror.gnu.org/gnu/unifont/unifont-15.0.06/unifont-15.0.06.tar.gz" + sha256 "36668eb1326d22e1466b94b3929beeafd10b9838bf3d41f4e5e3b52406ae69f1" + end + + def install + # Required for SDL2 + resource("unifont").stage do |r| + cd "font/precompiled" do + share.install "unifont-#{r.version}.ttf" => "unifont.ttf" + share.install "unifont_csur-#{r.version}.ttf" => "unifont_csur.ttf" + share.install "unifont_upper-#{r.version}.ttf" => "unifont_upper.ttf" + end + end + + args = %W[ + --prefix=#{prefix} + --without-x11 + --without-desktop_file_install + --without-update-mime-database + --without-update-desktop-database + --with-unifontdir-ttf=#{share} + --with-unifontdir-otf=#{share} + ] + + # We do not use *std_configure_args here since + # `--prefix` is the only recognized option we pass + system "./configure", *args + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ocp --help 2>&1") + + assert_path_exists testpath/".config/ocp/ocp.ini" + end +end diff --git a/Formula/o/ocproxy.rb b/Formula/o/ocproxy.rb new file mode 100644 index 0000000000000..8fb778c38dc44 --- /dev/null +++ b/Formula/o/ocproxy.rb @@ -0,0 +1,49 @@ +class Ocproxy < Formula + desc "User-level SOCKS and port forwarding proxy" + homepage "https://github.com/cernekee/ocproxy" + url "https://github.com/cernekee/ocproxy/archive/refs/tags/v1.60.tar.gz" + sha256 "a7367647f07df33869e2f79da66b6f104f6495ae806b12a8b8d9ca82fb7899ac" + license "BSD-3-Clause" + revision 1 + head "https://github.com/cernekee/ocproxy.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d{1,3})+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "232ed1e8370dfc9d92ffba5176c4792024f8a682e1091c427ed252a9c550c0d8" + sha256 cellar: :any, arm64_sequoia: "46d04d2d8fb1173d250c9a568512984ee10c67d0538224248858944a7c65dcf2" + sha256 cellar: :any, arm64_sonoma: "28eaf6815e07abd2aa324b3adb957523b49de41139079f3ab4480be043aa8a29" + sha256 cellar: :any, arm64_ventura: "a30cfaf7533957b5a7fab43d8123047d97ad5e989189556dfff3b539c6d771aa" + sha256 cellar: :any, arm64_monterey: "e7ef216d7ca89c5c390833fd8272b5e114d45b9740d4b0a21b1c751363405b87" + sha256 cellar: :any, arm64_big_sur: "d598c7b18b39b70d0bff1cc24b044a7351f8161ada44ef860649bc658323734a" + sha256 cellar: :any, sonoma: "7a25236711849a703c3aff501fff6b004a6f4005724ca9c39e46a7e488a7c637" + sha256 cellar: :any, ventura: "ddd7dee9b0d0f05232a844a56e2a9264504ba6abc0a16742640e92c408561ad9" + sha256 cellar: :any, monterey: "27e6a065435fd38f0b59ec01a38a424272d914574c2c1b36f5e90df3f05baeba" + sha256 cellar: :any, big_sur: "c215e90cdcbcd59674c111bd2bbdf157ad554247c65025560c6688677d25be53" + sha256 cellar: :any, catalina: "53016c9f83444b015e71e2f1678b1aab1e7914f42a8c5d8de1ab581fca130ef8" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0a1a2ac8cb2cbb91663cfcf06be5ac5d931ea8e9168ddbd3ca498cd1e2ff98e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04fbf035ccc8cc3ab0073c0d2299d47276268f8d47aa298cac9b8897cc9065e1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libevent" + + def install + system "./autogen.sh" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match(/VPNFD.is.not.set/, shell_output("#{bin}/ocproxy 2>&1", 1)) + end +end diff --git a/Formula/o/ocrad.rb b/Formula/o/ocrad.rb new file mode 100644 index 0000000000000..113a923b79dc4 --- /dev/null +++ b/Formula/o/ocrad.rb @@ -0,0 +1,49 @@ +class Ocrad < Formula + desc "Optical character recognition (OCR) program" + homepage "https://www.gnu.org/software/ocrad/" + url "https://ftpmirror.gnu.org/gnu/ocrad/ocrad-0.29.tar.lz" + mirror "https://ftp.gnu.org/gnu/ocrad/ocrad-0.29.tar.lz" + sha256 "11200cc6b0b7ba16884a72dccb58ef694f7aa26cd2b2041e555580f064d2d9e9" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "116d23e8c9dd05261d3591a6c71bc68f21eaf4f31ecb196ab1663a922a382e4a" + sha256 cellar: :any, arm64_sequoia: "e64667cc0efcf07cbbdb3459f9cbb88be11b2718b75417226e910e2cfb71a5a4" + sha256 cellar: :any, arm64_sonoma: "36d45f3af4754048ddde02ce9b7d9668ae188d7140b76aeda80f65ee6bb69a17" + sha256 cellar: :any, arm64_ventura: "31bd92179ff109e10d90fbf1af54975c3a9728af8aaa01af5111ab1d6e8cc7e9" + sha256 cellar: :any, arm64_monterey: "109021715122dda81422d1867d6a11e8f06bf677b0e17a6a8b3db38338aefc3a" + sha256 cellar: :any, sonoma: "0b70492d341de711f603f80862cc1843a6f95b618845e0e20e4abfafe1957e2b" + sha256 cellar: :any, ventura: "f3676e32c5accf4cee24e327c6bf21d300d9256245d5e22a6a52e5b15cfcb8dc" + sha256 cellar: :any, monterey: "10c391fc9278aca909ff4af61c971a3cda1410b6c16b80461e3b894aebfd3f2e" + sha256 cellar: :any_skip_relocation, arm64_linux: "3084377e8340cf1599a2d841e69252f5e6320801154cca9f9ec9d6e8b85b2762" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ee19eae3b90d6753c188ab4db09ccdf39b2df45d8ecafb91c122935c83c5fef" + end + + depends_on "libpng" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install", "CXXFLAGS=#{ENV.cxxflags}" + end + + test do + (testpath/"test.pbm").write <<~EOS + P1 + # This is an example bitmap of the letter "J" + 6 10 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 1 0 0 0 1 0 + 0 1 1 1 0 0 + 0 0 0 0 0 0 + 0 0 0 0 0 0 + EOS + assert_equal "J", `#{bin}/ocrad #{testpath}/test.pbm`.strip + end +end diff --git a/Formula/o/ocrmypdf.rb b/Formula/o/ocrmypdf.rb new file mode 100644 index 0000000000000..3390f1821491d --- /dev/null +++ b/Formula/o/ocrmypdf.rb @@ -0,0 +1,129 @@ +class Ocrmypdf < Formula + include Language::Python::Virtualenv + + desc "Adds an OCR text layer to scanned PDF files" + homepage "https://ocrmypdf.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/13/11/dad06efcf749d77dfcebac0bdec7980f57a9d58a38f2fdc1e0e9ade84ec0/ocrmypdf-16.11.1.tar.gz" + sha256 "838ab69e0ee0f04feea0d5861a17badecab6d3beaed0e29a97058eadda58cbb1" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "da78df7b744c2fdc00f7feffc417738c6bf89eea416299699f7a8d7528440c3d" + sha256 cellar: :any, arm64_sequoia: "1329b3835e5f8b30f7540943a467314cdc41ecc78e314f1944372f182e3147ba" + sha256 cellar: :any, arm64_sonoma: "93e10ad0649f0f369561458c9e63a20a20284da2bb7463cd8df03c3dfdba5845" + sha256 cellar: :any, sonoma: "88f6ea27ce11e8a0ecadcd967613ade8ed92d2ccc0e03604e2eea4ce78dc656f" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6a289a0d8bf898ca86464c288867a25e2196a6052896807a9af730af1c624e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39407b1826757734fe6d58998eebfd89474713bc1c2fd5894cd0add2f245eae6" + end + + depends_on "cmake" => :build # for pikepdf + depends_on "pkgconf" => :build + depends_on "cryptography" => :no_linkage + depends_on "freetype" + depends_on "ghostscript" + depends_on "img2pdf" + depends_on "jbig2enc" + depends_on "libheif" + depends_on "libpng" + depends_on "pillow" => :no_linkage + depends_on "pngquant" + depends_on "pybind11" + depends_on "python@3.14" + depends_on "qpdf" + depends_on "tesseract" + depends_on "unpaper" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: %w[cryptography pillow] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "deprecation" do + url "https://files.pythonhosted.org/packages/5a/d3/8ae2869247df154b64c1884d7346d412fed0c49df84db635aab2d1c40e62/deprecation-2.1.0.tar.gz" + sha256 "72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff" + end + + resource "img2pdf" do + url "https://files.pythonhosted.org/packages/82/c3/023387e00682dc1b46bd719ec19c4c9206dc8eb182dfd02bc62c5b9320a2/img2pdf-0.6.1.tar.gz" + sha256 "306e279eb832bc159d7d6294b697a9fbd11b4be1f799b14b3b2174fb506af289" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pdfminer-six" do + url "https://files.pythonhosted.org/packages/78/46/5223d613ac4963e1f7c07b2660fe0e9e770102ec6bda8c038400113fb215/pdfminer_six-20250506.tar.gz" + sha256 "b03cc8df09cf3c7aba8246deae52e0bca7ebb112a38895b5e1d4f5dd2b8ca2e7" + end + + resource "pi-heif" do + url "https://files.pythonhosted.org/packages/bf/7b/7c7b2aeb4995906725f13b885884d5b22e4f2d55028e8941555d2789e5e7/pi_heif-1.1.1.tar.gz" + sha256 "42ece7c3b40569f295fd4d2b10f38d1cd5012ca548446a2ca33895f0d6900c4f" + end + + resource "pikepdf" do + url "https://files.pythonhosted.org/packages/f5/4c/62b37a3ee301c245be6ad269ca771c2c5298bf049366e1094cfdf80d850c/pikepdf-9.11.0.tar.gz" + sha256 "5ad6bffba08849c21eee273ba0b6fcd4b6a9cff81bcbca6988f87a765ba62163" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + virtualenv_install_with_resources + + bash_completion.install "misc/completion/ocrmypdf.bash" => "ocrmypdf" + fish_completion.install "misc/completion/ocrmypdf.fish" + end + + test do + system bin/"ocrmypdf", "-f", "-q", "--deskew", + test_fixtures("test.pdf"), "ocr.pdf" + assert_path_exists testpath/"ocr.pdf" + end +end diff --git a/Formula/o/octave.rb b/Formula/o/octave.rb new file mode 100644 index 0000000000000..b462d3d083e26 --- /dev/null +++ b/Formula/o/octave.rb @@ -0,0 +1,163 @@ +class Octave < Formula + desc "High-level interpreted language for numerical computing" + homepage "https://octave.org/index.html" + url "https://ftpmirror.gnu.org/gnu/octave/octave-10.3.0.tar.xz" + mirror "https://ftp.gnu.org/gnu/octave/octave-10.3.0.tar.xz" + sha256 "92ae9bf2edcd288bd2df9fd0b4f7aa719b49d3940fceb154c5fdcd846f254da1" + license "GPL-3.0-or-later" + + # New tarballs appear on https://ftp.gnu.org/gnu/octave/ before a release is + # announced, so we check the octave.org download page instead. + livecheck do + url "https://octave.org/download" + regex(%r{Octave\s+v?(\d+(?:\.\d+)+)(?:\s*]+?>)?\s+is\s+the\s+latest\s+stable\s+release}im) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "b83eb0676410572173c4befc49beba4c53e92ff6545cfb4f657f883afe01878c" + sha256 arm64_sequoia: "ed8eda61e1ee0492801d0a225cbf40ade65ac3b5c68ab8a2389e2c2eb0cf0579" + sha256 arm64_sonoma: "a89a037602534ba7adc2fb70b77e349f060937b7c4d712c3eee36efc3183933a" + sha256 sonoma: "35659321f8828b5d1230cfef3c2749d410f9ddbbbaab930bdc1c8828c5764af9" + sha256 arm64_linux: "b94f07bd3afea2a67f7de94e08559a136aa5099e7f23b16f7ab31327da5ef57a" + sha256 x86_64_linux: "23344131734979e1bafde92e0442a0b4ad74dd0b126c9e8644acd06aea65ad3d" + end + + head do + url "https://hg.octave.org/octave", using: :hg + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "icoutils" => :build + depends_on "librsvg" => :build + end + + # Complete list of dependencies at https://wiki.octave.org/Building + depends_on "gnu-sed" => :build # https://lists.gnu.org/archive/html/octave-maintainers/2016-09/msg00193.html + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + depends_on "arpack" + depends_on "epstool" + depends_on "fftw" + depends_on "fig2dev" + depends_on "fltk" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gcc" # for gfortran + depends_on "ghostscript" + depends_on "gl2ps" + depends_on "glpk" + depends_on "graphicsmagick" + depends_on "hdf5" + depends_on "libsndfile" + depends_on "libtool" + depends_on "openblas" + depends_on "pcre2" + depends_on "portaudio" + depends_on "pstoedit" + depends_on "qhull" + depends_on "qrupdate" + depends_on "qscintilla2" + depends_on "qt5compat" + depends_on "qtbase" + depends_on "qttools" + depends_on "rapidjson" + depends_on "readline" + depends_on "suite-sparse" + depends_on "sundials" + depends_on "texinfo" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "little-cms2" + end + + on_linux do + depends_on "autoconf" + depends_on "automake" + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + # Workaround until release with https://hg.octave.org/octave/rev/8cf9d5e68c96 + inreplace "configure", " --cflags-only-I $QT_", " --cflags $QT_" if build.stable? + + system "./bootstrap" if build.head? + args = [ + "--disable-silent-rules", + "--enable-shared", + "--disable-static", + "--with-hdf5-includedir=#{Formula["hdf5"].opt_include}", + "--with-hdf5-libdir=#{Formula["hdf5"].opt_lib}", + "--with-java-homedir=#{Formula["openjdk"].opt_prefix}", + "--with-x=no", + "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas", + "--with-portaudio", + "--with-sndfile", + ] + + if OS.linux? + # Explicitly specify aclocal and automake without versions + args << "ACLOCAL=aclocal" + args << "AUTOMAKE=automake" + + # Mesa OpenGL location must be supplied by LDFLAGS on Linux + args << "LDFLAGS=-L#{Formula["mesa"].opt_lib} -L#{Formula["mesa-glu"].opt_lib}" + + # Docs building is broken on Linux + args << "--disable-docs" + + # Need to regenerate aclocal.m4 so that it will work with brewed automake + system "aclocal" + end + + system "./configure", *args, *std_configure_args + # https://github.com/Homebrew/homebrew-core/pull/170959#issuecomment-2351023470 + ENV.deparallelize do + system "make", "all" + end + + # Avoid revision bumps whenever fftw's, gcc's or OpenBLAS' Cellar paths change + inreplace "src/mkoctfile.cc" do |s| + s.gsub! Formula["fftw"].prefix.realpath, Formula["fftw"].opt_prefix + s.gsub! Formula["gcc"].prefix.realpath, Formula["gcc"].opt_prefix + end + + # Make sure that Octave uses the modern texinfo at run time + rcfile = buildpath/"scripts/startup/site-rcfile" + rcfile.append_lines "makeinfo_program(\"#{Formula["texinfo"].opt_bin}/makeinfo\");" + + system "make", "install" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + system bin/"octave", "--eval", "(22/7 - pi)/pi" + # This is supposed to crash octave if there is a problem with BLAS + system bin/"octave", "--eval", "single ([1+i 2+i 3+i]) * single ([ 4+i ; 5+i ; 6+i])" + # Test basic compilation + (testpath/"oct_demo.cc").write <<~CPP + #include + DEFUN_DLD (oct_demo, args, /*nargout*/, "doc str") + { return ovl (42); } + CPP + system bin/"octave", "--eval", <<~MATLAB + mkoctfile ('-v', '-std=c++17', '-L#{lib}/octave/#{version}', 'oct_demo.cc'); + assert(oct_demo, 42) + MATLAB + # Test FLIBS environment variable + system bin/"octave", "--eval", <<~MATLAB + args = strsplit (mkoctfile ('-p', 'FLIBS')); + args = args(~cellfun('isempty', args)); + mkoctfile ('-v', '-std=c++17', '-L#{lib}/octave/#{version}', args{:}, 'oct_demo.cc'); + assert(oct_demo, 42) + MATLAB + ENV["QT_QPA_PLATFORM"] = "minimal" + system bin/"octave", "--gui" + end +end diff --git a/Formula/o/octobuild.rb b/Formula/o/octobuild.rb new file mode 100644 index 0000000000000..ba18d226a9e00 --- /dev/null +++ b/Formula/o/octobuild.rb @@ -0,0 +1,60 @@ +class Octobuild < Formula + desc "Compiler cache for Unreal Engine" + homepage "https://github.com/octobuild/octobuild" + url "https://github.com/octobuild/octobuild/archive/refs/tags/1.8.1.tar.gz" + sha256 "5638c8759899bfc7a5658d44d8cfcf091f0afc001fdcaa5d305a03f6aa668475" + license "MIT" + head "https://github.com/octobuild/octobuild.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae3196c00596806784136909afae180ce3556bc53770ca95c8266324c285f1a3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "476cd1bbe57d73e981ac7d93033892ce3a70e507dd4538bbcb3da11d615997f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84c845b11b998c5eba0e275305a19b9c7db52ffefac17b07f8de5253c52bd92b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9de6ad46ac2f152cde3007ab589650442cc5ce9da7d74399c888534bab8dd7bf" + sha256 cellar: :any_skip_relocation, sonoma: "58d75af4d61aa6ade3e137c414c4b355949e63835c731db228f939b0e3e20c7c" + sha256 cellar: :any_skip_relocation, ventura: "fb996f3b6c85217689dbc99bf94cb1646effb6bc203b5eacf864f862d20046b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "32cd6cd48bb96e40477d91f1b0519c30ddf8b26654c0620060a107e931cd999a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "252412dd4df54aa83cfe00168e09b16c2404a1269ce0ae86da3cbdff8d88fbab" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + resource "ipc-rs" do + on_linux do + on_arm do + url "https://github.com/octobuild/ipc-rs/archive/e8d76ee36146d4548d18ba8480bf5b5a2f116eac.tar.gz" + sha256 "aaa5418086f55df5bea924848671df365e85aa57102abd0751366e1237abcff5" + + # Apply commit from open PR https://github.com/octobuild/ipc-rs/pull/12 + patch do + url "https://github.com/octobuild/ipc-rs/commit/1eabde12d785ceda197588490abeb15615a00dad.patch?full_index=1" + sha256 "521d8161be9695480f5b578034166c8e7e15b078733d3571cd5db2a00951cdd8" + end + end + end + end + + def install + if OS.linux? && Hardware::CPU.arm? + (buildpath/"ipc-rs").install resource("ipc-rs") + (buildpath/"Cargo.toml").append_lines <<~TOML + [patch."https://github.com/octobuild/ipc-rs"] + ipc = { path = "./ipc-rs" } + TOML + end + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output bin/"xgConsole" + assert_match "Current configuration", output + assert_match "cache_limit_mb", output + end +end diff --git a/Formula/o/octomap.rb b/Formula/o/octomap.rb new file mode 100644 index 0000000000000..54959fce5034c --- /dev/null +++ b/Formula/o/octomap.rb @@ -0,0 +1,45 @@ +class Octomap < Formula + desc "Efficient probabilistic 3D mapping framework based on octrees" + homepage "https://octomap.github.io/" + url "https://github.com/OctoMap/octomap/archive/refs/tags/v1.10.0.tar.gz" + sha256 "8da2576ec6a0993e8900db7f91083be8682d8397a7be0752c85d1b7dd1b8e992" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f538d4ca1ff6befd6b3f0e3dd2388a1265b302d379047be9d9ad8e57f18e5cbf" + sha256 cellar: :any, arm64_sequoia: "429f4b461e548ab14d2eecd4c1599bceb2791956ef53e98c0f7814b242d799d0" + sha256 cellar: :any, arm64_sonoma: "808dfdfdf000b3da4f5223c77d5520bdb5078cc867bd98c2c27f9c1351c30e2f" + sha256 cellar: :any, arm64_ventura: "908e29c2a7423b82e4ce8cbe612595f1ab57a3e0e481d70caca34c0cbd77951a" + sha256 cellar: :any, arm64_monterey: "420b3e35f3bd06f4eb1b33af0f3c85ef21666b1c1ba8946b8c6b89508133bb1e" + sha256 cellar: :any, sonoma: "7d6b02432d6144a747ca089b0b5bf3c873162373b4239b550bdfaf64968f027d" + sha256 cellar: :any, ventura: "c23f61388fadeb444fa809c33f35f24546ccaede8b5f30d52f1e676d0a65341d" + sha256 cellar: :any, monterey: "65c3b7a193ce7eec45b4aa579776df10a6fe6981d542a013d177d75d51cd7f48" + sha256 cellar: :any_skip_relocation, arm64_linux: "523d6db6329bdbb4d6ed11dd3334643c0cf8d4e61f20bec4e39bef09955d8f72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c9e829f1df5f7f11c58e4477884ac1ba082590820b0cd00e361ba02effc6b50" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + def install + system "cmake", "-S", "octomap", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + octomap::OcTree tree(0.05); + assert(tree.size() == 0); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs octomap").chomp.split + system ENV.cxx, "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/o/octosql.rb b/Formula/o/octosql.rb new file mode 100644 index 0000000000000..09b2203d6aebd --- /dev/null +++ b/Formula/o/octosql.rb @@ -0,0 +1,54 @@ +class Octosql < Formula + desc "SQL query tool to analyze data from different file formats and databases" + homepage "https://github.com/cube2222/octosql/" + url "https://github.com/cube2222/octosql/archive/refs/tags/v0.13.0.tar.gz" + sha256 "e22bdb710ca0609019b842df347990ff9aed4f3635f5308ff1acf50d093b7942" + license "MPL-2.0" + head "https://github.com/cube2222/octosql.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c7a4f8a7b4ef2166c839bffed27d9f03cc461a397a9599a8a928d7aa13769578" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6fb02732ee419bd030f5b4114904f013d2cbcbf6a5972c7c180cc8b39b50218f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b90c0eb55eba76d94d9b74ed271cec24ece2f80626fbc8984fd89a5c3572fad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8756bbed1866ff4ec61d41c3fa9e311bc1363a92a1e5bb7bf8007f3dce1016f5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "266cbff44daa602cb4e315ab346893ec6f1c9ff8988629d25146555a702599c4" + sha256 cellar: :any_skip_relocation, sonoma: "15616e45d1f71f3adf387cccca95f024f6a47ebac1eb43cad2bcf4033ba86eca" + sha256 cellar: :any_skip_relocation, ventura: "599c917127678f30d18e2992c5e313c9551e088f6c91641f2d41887ff006b073" + sha256 cellar: :any_skip_relocation, monterey: "e66e8404c28c51cd31a53ce95ac96341355948d807b7ece05ec46aca7ea95ec3" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c74938cd61568c5b569d3f86a0077aa1b0893aee68a8320386c373046728952" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d93635da70ab7707f9a337ce7d30badfaac5c31f3d2d40c55741cdd8ff3bf6ff" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/cube2222/octosql/cmd.VERSION=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"octosql", "completion") + end + + test do + ENV["OCTOSQL_NO_TELEMETRY"] = "1" + + test_json = testpath/"test.json" + test_json.write <<~JSON + {"field1": "value", "field2": 42, "field3": {"field4": "eulav", "field5": 24}} + {"field1": "value", "field2": 42, "field3": {"field5": "eulav", "field6": "value"}} + JSON + + expected = <<~EOS + +---------+--------+--------------------------+ + | field1 | field2 | field3 | + +---------+--------+--------------------------+ + | 'value' | 42 | { , 'eulav', | + | | | 'value' } | + | 'value' | 42 | { 'eulav', 24, } | + +---------+--------+--------------------------+ + EOS + + assert_equal expected, shell_output("#{bin}/octosql \"select * from test.json\"") + + assert_match version.to_s, shell_output("#{bin}/octosql --version") + end +end diff --git a/Formula/o/odbc2parquet.rb b/Formula/o/odbc2parquet.rb new file mode 100644 index 0000000000000..4e92fbf5167bb --- /dev/null +++ b/Formula/o/odbc2parquet.rb @@ -0,0 +1,32 @@ +class Odbc2parquet < Formula + desc "CLI to query an ODBC data source and write the result into a Parquet file" + homepage "https://github.com/pacman82/odbc2parquet" + url "https://github.com/pacman82/odbc2parquet/archive/refs/tags/v8.1.4.tar.gz" + sha256 "983ab92b039646538e4196421cfd35c20d57b25d0a9cf6681965b77b39212345" + license "MIT" + head "https://github.com/pacman82/odbc2parquet.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "01074b43af634ad1bd2d205ebc21b7be80cae9b8b31d2f0a415ba20469946c82" + sha256 cellar: :any, arm64_sequoia: "3440017f2b99a65d65aa70159ef1a5913422cdb65c37258a125078afcce66d5f" + sha256 cellar: :any, arm64_sonoma: "6b3e20d37da68022e607c5d303510bd671542dc8a689db259830056bb24ecfa3" + sha256 cellar: :any, sonoma: "14677857dd5dd91396e347b546bfcf253a4f94c1ff43ddbd67b5db9b193c3df6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c0d1d751e207c7dd937dd5c2e711f578f1b0d70ab97ac5f169cf333deecdc467" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5fcd2cbaa204c2eff4099e099a393d1833681eb263aca31ec481d4b897a0275" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "unixodbc" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/odbc2parquet --version") + + system bin/"odbc2parquet", "list-data-sources" + system bin/"odbc2parquet", "list-drivers" + end +end diff --git a/Formula/o/ode.rb b/Formula/o/ode.rb new file mode 100644 index 0000000000000..7375796347404 --- /dev/null +++ b/Formula/o/ode.rb @@ -0,0 +1,85 @@ +class Ode < Formula + desc "Simulating articulated rigid body dynamics" + homepage "https://www.ode.org/" + url "https://bitbucket.org/odedevs/ode/downloads/ode-0.16.6.tar.gz" + sha256 "c91a28c6ff2650284784a79c726a380d6afec87ecf7a35c32a6be0c5b74513e8" + license any_of: ["LGPL-2.1-or-later", "BSD-3-Clause"] + head "https://bitbucket.org/odedevs/ode.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f85029563540277a80dfb3ed714d68d2dcb7e06d32b6bd190a07d6fa5f91847f" + sha256 cellar: :any, arm64_sequoia: "3aa96ecd0a92215d8005fb5f663c51b40df82454815f7bf5ab18f29ecef9d401" + sha256 cellar: :any, arm64_sonoma: "18918632c616a8dcebb91fd9f717133b8921bc1fb1c383e2da6b8fee8debb26d" + sha256 cellar: :any, arm64_ventura: "c36bfd094cdf7c2cc6d877f05e7fba556fb012bd9ef5948b097e14f0b596be15" + sha256 cellar: :any, sonoma: "3ee055bde9ea2aca43d4305de3cad0aeda9f54a3a1ff69dde4618487223f792b" + sha256 cellar: :any, ventura: "2579b830d5c07a1c799bfee7bc1c0536614da23483a02190ad6d2f87585d84b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc65c81c28d4007bdfcaf7398d065c55ee477bbd4dd37abb7017810cb457fe5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb0f3a0439ddeada4699c0ca1004810a676e4bb07d910464d9641b3b5b4dddc1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libccd" + + # Fix -flat_namespace being used on Big Sur and later. + # We patch `libtool.m4` and not `configure` because we call `./bootstrap`. + patch :DATA + + def install + inreplace "bootstrap", "libtoolize", "glibtoolize" + system "./bootstrap" + + system "./configure", "--prefix=#{prefix}", + "--enable-libccd", + "--enable-shared", + "--disable-static", + "--disable-demos", + "--enable-double-precision" + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + dInitODE(); + dCloseODE(); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-I#{include}/ode", "-L#{lib}", "-lode", + "-L#{Formula["libccd"].opt_lib}", "-lccd", "-lm", "-lpthread", + "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 10ab284..bfc1d56 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1067,16 +1067,11 @@ _LT_EOF + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) +- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; +- 10.[[012]][[,.]]*) ++ darwin*) ++ case ${MACOSX_DEPLOYMENT_TARGET},$host in ++ 10.[[012]],*|,*powerpc*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; +- 10.*) ++ *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; diff --git a/Formula/o/odin.rb b/Formula/o/odin.rb new file mode 100644 index 0000000000000..01c18da83b3ba --- /dev/null +++ b/Formula/o/odin.rb @@ -0,0 +1,186 @@ +class Odin < Formula + desc "Programming language with focus on simplicity, performance and modern systems" + homepage "https://odin-lang.org/" + url "https://github.com/odin-lang/Odin.git", + tag: "dev-2025-10", + revision: "3ad7240d3d70cdcfb05557510919d8d566aa8c59" + version "2025-10" + license "BSD-3-Clause" + head "https://github.com/odin-lang/Odin.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "bdbf56d6e83af1fe7ec3a3781150368ef833070d7695640168721457cd29c23f" + sha256 arm64_sequoia: "ec03b290dda131f186fba8999d7c8e2c20c385456483ec022e9f356971bfd6d6" + sha256 arm64_sonoma: "57c6c745e01b6bb261bb8b37204c46d8efcbbaf916b1a7678bfbe99520a04ef8" + sha256 cellar: :any, sonoma: "8609471bf83846c64c17e28e9c29d615e2ba6cf0f0eec285c151fca32dcc9f6f" + sha256 cellar: :any_skip_relocation, arm64_linux: "bdd26d56b9539409e981e25945ca30dea31e747ff3bc1b0cb54536a336c79516" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9ff427d14447fa15a81beddb308dbf6efad644208c3ec7df86dbe63817edad9" + end + + depends_on "glfw" + depends_on "lld@20" + depends_on "llvm@20" + depends_on "raylib" + + resource "raygui" do + url "https://github.com/raysan5/raygui/archive/refs/tags/4.0.tar.gz" + sha256 "299c8fcabda68309a60dc858741b76c32d7d0fc533cdc2539a55988cee236812" + end + + def install + llvm = deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+(\.\d+)*)?$/) } + ENV.llvm_clang if OS.linux? + ENV["LLVM_CONFIG"] = (llvm.opt_bin/"llvm-config").to_s + ENV.append "LDFLAGS", "-Wl,-rpath,#{llvm.opt_lib}" if OS.linux? + + # Delete pre-compiled binaries which brew does not allow. + buildpath.glob("vendor/**/*.{lib,dll,a,dylib,so,so.*}").map(&:unlink) + + cd buildpath/"vendor/miniaudio/src" do + system "make" + end + + cd buildpath/"vendor/stb/src" do + system "make", "unix" + end + + cd buildpath/"vendor/cgltf/src" do + system "make", "unix" + end + + raylib_installpath = if OS.linux? + "vendor/raylib/linux" + else + "vendor/raylib/macos" + end + + raygui_installpath = if OS.linux? + "vendor/raylib/linux" + elsif Hardware::CPU.intel? + "vendor/raylib/macos" + else + "vendor/raylib/macos-arm64" + end + + glfw_installpath = if OS.linux? + "vendor/glfw/lib" + else + "vendor/glfw/lib/darwin" + end + + ln_s Formula["glfw"].lib/"libglfw3.a", buildpath/glfw_installpath/"libglfw3.a" + + ln_s Formula["raylib"].lib/"libraylib.a", buildpath/raylib_installpath/"libraylib.a" + # In order to match the version 500 used in odin + ln_s Formula["raylib"].lib/shared_library("libraylib", "5.5.0"), + buildpath/raylib_installpath/shared_library("libraylib", "550") + + resource("raygui").stage do + cp "src/raygui.h", "src/raygui.c" + + # build static library + system ENV.cc, "-c", "-o", "raygui.o", "src/raygui.c", + "-fpic", "-DRAYGUI_IMPLEMENTATION", "-I#{Formula["raylib"].include}" + system "ar", "-rcs", "libraygui.a", "raygui.o" + cp "libraygui.a", buildpath/raygui_installpath + + # build shared library + args = [ + "-o", shared_library("libraygui"), + "src/raygui.c", + "-shared", + "-fpic", + "-DRAYGUI_IMPLEMENTATION", + "-lm", "-lpthread", "-ldl", + "-I#{Formula["raylib"].include}", + "-L#{Formula["raylib"].lib}", + "-lraylib" + ] + + args += ["-framework", "OpenGL"] if OS.mac? + system ENV.cc, *args + cp shared_library("libraygui"), buildpath/raygui_installpath + end + + # By default the build runs an example program, we don't want to run it during install. + # This would fail when gcc is used because Odin can be build with gcc, + # but programs linked by Odin need clang specifically. + inreplace "build_odin.sh", /^\s*run_demo\s*$/, "" + + # Keep version number consistent and reproducible for tagged releases. + args = [] + args << "ODIN_VERSION=dev-#{version}" if build.stable? + system "make", "release", *args + libexec.install "odin", "core", "shared", "base", "vendor" + (bin/"odin").write <<~BASH + #!/bin/bash + export PATH="#{llvm.opt_bin}:$PATH" + exec -a "${0}" "#{libexec}/odin" "${@}" + BASH + pkgshare.install "examples" + end + + test do + (testpath/"hellope.odin").write <<~ODIN + package main + + import "core:fmt" + + main :: proc() { + fmt.println("Hellope!"); + } + ODIN + system bin/"odin", "build", "hellope.odin", "-file" + assert_equal "Hellope!\n", shell_output("./hellope") + + (testpath/"miniaudio.odin").write <<~ODIN + package main + + import "core:fmt" + import "vendor:miniaudio" + + main :: proc() { + ver := miniaudio.version_string() + assert(len(ver) > 0) + fmt.println(ver) + } + ODIN + system bin/"odin", "run", "miniaudio.odin", "-file" + + (testpath/"raylib.odin").write <<~ODIN + package main + + import rl "vendor:raylib" + + main :: proc() { + // raygui. + assert(!rl.GuiIsLocked()) + + // raylib. + num := rl.GetRandomValue(42, 1337) + assert(42 <= num && num <= 1337) + } + ODIN + system bin/"odin", "run", "raylib.odin", "-file" + + if OS.mac? + system bin/"odin", "run", "raylib.odin", "-file", + "-define:RAYLIB_SHARED=true", "-define:RAYGUI_SHARED=true" + end + + (testpath/"glfw.odin").write <<~ODIN + package main + + import "core:fmt" + import "vendor:glfw" + + main :: proc() { + fmt.println(glfw.GetVersion()) + } + ODIN + ENV.prepend_path "LD_LIBRARY_PATH", Formula["glfw"].lib if OS.linux? + system bin/"odin", "run", "glfw.odin", "-file", "-define:GLFW_SHARED=true", + "-extra-linker-flags:\"-L#{Formula["glfw"].lib}\"" + system bin/"odin", "run", "glfw.odin", "-file", "-define:GLFW_SHARED=false" + end +end diff --git a/Formula/o/odo-dev.rb b/Formula/o/odo-dev.rb new file mode 100644 index 0000000000000..17316866453eb --- /dev/null +++ b/Formula/o/odo-dev.rb @@ -0,0 +1,60 @@ +class OdoDev < Formula + desc "Developer-focused CLI for Kubernetes and OpenShift" + homepage "https://odo.dev" + url "https://github.com/redhat-developer/odo.git", + tag: "v3.16.1", + revision: "cd346c5e6c0d9891b06824915ed4e3281a4ecc02" + license "Apache-2.0" + head "https://github.com/redhat-developer/odo.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3ffbddd7bb9552e07d227bfcf52579bb41b809ca2edb7f5072e6c2a64a80d11" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32ed81abf7115b46fcaf8f41f9b50aa1e4bc907945e575c1ebb26a9f6d30e60c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0fe7015bd9afd3f18cd9c156ce2f6b21a9dd36c3b410dd759390562e3cf7722" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6e8bb684ac9d7ec17bfbdda63d976a60316d2c48771d8267f713291142d09bb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "954ce19cd59112f50bd8c4cd6b29a9fe2906f914995dd05ccdcaed6a96e29424" + sha256 cellar: :any_skip_relocation, sonoma: "70206faecd21320ed843d7dcd0b21db2f94961b2a38c32828d6061bf993c2c4c" + sha256 cellar: :any_skip_relocation, ventura: "295deb9fa449f8987e06ea32e480e6c2a253e617db227ea1db03563d515edf66" + sha256 cellar: :any_skip_relocation, monterey: "3002c28c9f11304b7e42efd58e26e72b972c94c7fadfd55f0bf7d776fd929a42" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0ad1eacca24048e6260470cc6d1addc370681d26cb2b82137c84e02f932e226" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9480c0fa8376a3f2b839965f2d7095fd712dd306a975032479e45419f482679" + end + + depends_on "go" => :build + conflicts_with "odo", because: "odo also ships 'odo' binary" + + def install + # Replace `-dirty` suffix in `--version` output with `-Homebrew`. + inreplace "Makefile", "--dirty", "--dirty=-Homebrew" + + system "make", "bin" + bin.install "odo" + end + + test do + # try set preference + ENV["GLOBALODOCONFIG"] = "#{testpath}/preference.yaml" + system bin/"odo", "preference", "set", "ConsentTelemetry", "false" + system bin/"odo", "preference", "add", "registry", "StagingRegistry", "https://registry.stage.devfile.io" + assert_path_exists testpath/"preference.yaml" + + # test version + version_output = shell_output("#{bin}/odo version --client 2>&1").strip + assert_match version.to_s, version_output + + # try to create a new component + system bin/"odo", "init", "--devfile", "nodejs", "--name", "test", "--devfile-registry", "StagingRegistry" + assert_path_exists testpath/"devfile.yaml" + + dev_output = shell_output("#{bin}/odo dev 2>&1", 1).strip + assert_match "✗ unable to access the cluster", dev_output + end +end diff --git a/Formula/o/odo.rb b/Formula/o/odo.rb new file mode 100644 index 0000000000000..5567e1117477b --- /dev/null +++ b/Formula/o/odo.rb @@ -0,0 +1,40 @@ +class Odo < Formula + desc "Atomic odometer for the command-line" + homepage "https://github.com/atomicobject/odo" + url "https://github.com/atomicobject/odo/archive/refs/tags/v0.2.2.tar.gz" + sha256 "52133a6b92510d27dfe80c7e9f333b90af43d12f7ea0cf00718aee8a85824df5" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20a6c15a93b22bf5a00cbe51b03f517b71ac79ad055fe0a446b6b1296b25b0eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42a837f21b67949d9a12872adc2b2b62553071b86d947ff7640eac9547a00261" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8aa9f769724fe6c4fe7e3d0e383db74f03100a7fd90a947cc2df1835505829aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd2fad51300e663cba126f61573c740198f66f1f8a505b8907605892ab1a0c48" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6ddc4ba217251c6827fcd32c3fda2df9c294305dddc68d976072cef25c4dd768" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6606d59561c5bfb5f3b6835c16e64c6d6bf25ddc85658900a735657faaf0660f" + sha256 cellar: :any_skip_relocation, sonoma: "cfe100be3b80f12c312de93500351befbb376e7991e9f0d86c2a67c9a9f43785" + sha256 cellar: :any_skip_relocation, ventura: "8ee366eac5d82a7b60d33771791e9f44b01e648d77171b49793b5b54ae8d9ee8" + sha256 cellar: :any_skip_relocation, monterey: "42158ce35f352cb5f7172a840cf7284ffe584b36d9c080e1836d0cb03aa17c68" + sha256 cellar: :any_skip_relocation, big_sur: "366bcdb5f386521638f9f654b04a74e47364e1d59fa42ccca1d1f96b5a03a855" + sha256 cellar: :any_skip_relocation, catalina: "e5d74a7c45e3d3e8781b1b7d563733953cb15e6dffed8bcc525b063dbd5d7d69" + sha256 cellar: :any_skip_relocation, arm64_linux: "247595e46c20ec2a990af435321894b79bb0d641dde13a5586e81b421f67794d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23644efe576abf9c3e3a469cf1baad05b3a3cde749998045b2992c290cf57884" + end + + conflicts_with "odo-dev", because: "odo-dev also ships 'odo' binary" + + def install + system "make" + man1.mkpath + bin.mkpath + system "make", "test" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"odo", "testlog" + end +end diff --git a/Formula/o/odpi.rb b/Formula/o/odpi.rb new file mode 100644 index 0000000000000..dc370d92e7cba --- /dev/null +++ b/Formula/o/odpi.rb @@ -0,0 +1,41 @@ +class Odpi < Formula + desc "Oracle Database Programming Interface for Drivers and Applications" + homepage "https://oracle.github.io/odpi/" + url "https://github.com/oracle/odpi/archive/refs/tags/v5.6.3.tar.gz" + sha256 "9efbadd237b2670ed87cedf5bd01b485f645020373c655b69b9a2c1c82ce0d43" + license any_of: ["Apache-2.0", "UPL-1.0"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "05f95e0a4d38b09840028849feb22d6c93cc6973a2e728ee156f51efa949a6e9" + sha256 cellar: :any, arm64_sequoia: "f040d00a9fca66140004d8e8e565d0a2bb6aa197036e5fd9d560f9ee7ef1d972" + sha256 cellar: :any, arm64_sonoma: "aa444faf14de50a3819af2a5540fd78935e6a2ec0327e7213fb85d4c1b8698ee" + sha256 cellar: :any, sonoma: "3c1463f2b8a30b378c19a25ed4264b9bcf6a3817791e2765f2e2b8e9e299ea91" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ae52b460b7cd40be01e9b179b64ed3942ad1706c833b040902dc2bc804317dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7d55b5e5d167b8d1f16f80e0f1c407d44e0c7b99d8b5f7ee5203d3d9bab7b24" + end + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + dpiContext* context = NULL; + dpiErrorInfo errorInfo; + + dpiContext_create(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, &context, &errorInfo); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lodpic", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/odt2txt.rb b/Formula/o/odt2txt.rb new file mode 100644 index 0000000000000..967dbf685fdc1 --- /dev/null +++ b/Formula/o/odt2txt.rb @@ -0,0 +1,42 @@ +class Odt2txt < Formula + desc "Convert OpenDocument files to plain text" + homepage "https://github.com/dstosberg/odt2txt/" + url "https://github.com/dstosberg/odt2txt/archive/refs/tags/v0.5.tar.gz" + sha256 "23a889109ca9087a719c638758f14cc3b867a5dcf30a6c90bf6a0985073556dd" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "84f1e3afff2cbcce498e5f53e0735f2afd630b4eb09e1dc1342703058f2b9c4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "306d55c929e1ac95e7e4a0ae181c666b460e1e733ee3bedc106fa95f06187724" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4fc587af2f55d58d15ab56763d66b80a471c9e3db19fd58c48e923f02b55a5a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6da6cd6c262ef01c0f0c7cf9de4e4897f255bcf5266313a373c6b89ebc15d162" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1990d5bd2ed1d5d9b5f7165ecd8285ded82ff8ed0d622b5f9820e9bc2123252c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "00a813eeef30b44f3c760435055a40f5471aa64fac6f390fcbc5bea64f34e9cd" + sha256 cellar: :any_skip_relocation, sonoma: "6d6065192c2e3550077b108fde9b902659bb8ad16996e9a0295900e5301ce13e" + sha256 cellar: :any_skip_relocation, ventura: "d0beae42729ad6c48197a6575aa419f1c9b9c742252ce70b3105a3d19a2a6815" + sha256 cellar: :any_skip_relocation, monterey: "0567b8e8d71e49da55816d890481a29b0a173a88ec59ab5141a2b7581cff8e0c" + sha256 cellar: :any_skip_relocation, big_sur: "255a40ee5035ec02702587440eee33cbfd83d110daf1c90a965c4de5f92a34f0" + sha256 cellar: :any_skip_relocation, catalina: "31e17f05898b06469cbc33244f357c61baf059120e96b34d472325e38adfa4d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "21cf6bcd55e7daf00c9ad24283385b8d8a6e9070b840431d228cf815f51c411b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b48cef7a1fb7bf172435fbf6b465ea9fde29785f9be3d088075ad0e5224cfab" + end + + uses_from_macos "zlib" + + def install + system "make", "install", "DESTDIR=#{prefix}" + end + + test do + resource "homebrew-sample" do + url "https://github.com/Turbo87/odt2txt/raw/samples/samples/sample-1.odt" + sha256 "78a5b17613376e50a66501ec92260d03d9d8106a9d98128f1efb5c07c8bfa0b2" + end + + testpath.install resource("homebrew-sample") + system bin/"odt2txt", "sample-1.odt" + end +end diff --git a/Formula/o/offlineimap.rb b/Formula/o/offlineimap.rb new file mode 100644 index 0000000000000..3fd8c5598aae9 --- /dev/null +++ b/Formula/o/offlineimap.rb @@ -0,0 +1,82 @@ +class Offlineimap < Formula + include Language::Python::Virtualenv + + desc "Synchronizes emails between two repositories" + homepage "https://github.com/OfflineIMAP/offlineimap3" + url "https://github.com/OfflineIMAP/offlineimap3/archive/refs/tags/v8.0.1.tar.gz" + sha256 "82ce54136465ea1cce62f4e961e8c155ac3eee2149fa812763629448902d7d69" + license "GPL-2.0-or-later" + head "https://github.com/OfflineIMAP/offlineimap3.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f251f42c4fa68a9fbc3f3b8778f96d5b64753cd5f9c1ca0c3d8ed563239f3acf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f251f42c4fa68a9fbc3f3b8778f96d5b64753cd5f9c1ca0c3d8ed563239f3acf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f251f42c4fa68a9fbc3f3b8778f96d5b64753cd5f9c1ca0c3d8ed563239f3acf" + sha256 cellar: :any_skip_relocation, sonoma: "965d0ae92184e0f04e1739fef4fff253affbced651c03646b777d0b360d4c869" + sha256 cellar: :any_skip_relocation, arm64_linux: "965d0ae92184e0f04e1739fef4fff253affbced651c03646b777d0b360d4c869" + sha256 cellar: :any_skip_relocation, x86_64_linux: "965d0ae92184e0f04e1739fef4fff253affbced651c03646b777d0b360d4c869" + end + + depends_on "certifi" + depends_on "python@3.14" + + uses_from_macos "krb5" + + pypi_packages exclude_packages: "certifi" + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "imaplib2" do + url "https://files.pythonhosted.org/packages/e4/1a/4ccb857f4832d2836a8c996f18fa7bcad19bfdf1a375dfa12e29dbe0e44a/imaplib2-3.6.tar.gz" + sha256 "96cb485b31868a242cb98d5c5dc67b39b22a6359f30316de536060488e581e5b" + + # Fix warnings with Python 3.12+. + patch do + url "https://github.com/jazzband/imaplib2/commit/da0097f6b421c4b826416ea09b4802c163391330.patch?full_index=1" + sha256 "ff60f720cfc61bfee9eec0af4d79d307e3a8703e575a19c18d05ef3477cf3a64" + end + end + + resource "rfc6555" do + url "https://files.pythonhosted.org/packages/f6/4b/24f953c3682c134e4d0f83c7be5ede44c6c653f7d2c0b06ebb3b117f005a/rfc6555-0.1.0.tar.gz" + sha256 "123905b8f68e2bec0c15f321998a262b27e2eaadea29a28bd270021ada411b67" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/76/d9/bbbafc76b18da706451fa91bc2ebe21c0daf8868ef3c30b869ac7cb7f01d/urllib3-1.25.11.tar.gz" + sha256 "8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2" + end + + def install + virtualenv_install_with_resources + + etc.install "offlineimap.conf", "offlineimap.conf.minimal" + end + + def caveats + <<~EOS + To get started, copy one of these configurations to ~/.offlineimaprc: + * minimal configuration: + cp -n #{etc}/offlineimap.conf.minimal ~/.offlineimaprc + + * advanced configuration: + cp -n #{etc}/offlineimap.conf ~/.offlineimaprc + EOS + end + + service do + run [opt_bin/"offlineimap", "-q", "-u", "basic"] + run_type :interval + interval 300 + environment_variables PATH: std_service_path_env + log_path File::NULL + error_log_path File::NULL + end + + test do + system bin/"offlineimap", "--version" + end +end diff --git a/Formula/o/oggz.rb b/Formula/o/oggz.rb new file mode 100644 index 0000000000000..78241164ab4fe --- /dev/null +++ b/Formula/o/oggz.rb @@ -0,0 +1,42 @@ +class Oggz < Formula + desc "Command-line tool for manipulating Ogg files" + homepage "https://www.xiph.org/oggz/" + url "https://ftp.osuosl.org/pub/xiph/releases/liboggz/liboggz-1.1.3.tar.gz" + mirror "https://ftp-chi.osuosl.org/pub/xiph/releases/liboggz/liboggz-1.1.3.tar.gz" + sha256 "2466d03b67ef0bcba0e10fb352d1a9ffd9f96911657abce3cbb6ba429c656e2f" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/liboggz/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)liboggz[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "603716b336363c7460ee420337b0de8c0577261236bb6f464b95442f634c103c" + sha256 cellar: :any, arm64_sequoia: "662621ea7c3e2bba651d8a4d58de1b7e11fe77457919bec4a1a891344a9fa52b" + sha256 cellar: :any, arm64_sonoma: "b73a313c07c02a73751ff8837ff86eee990bb438c7391f3ef401ad7252a1b2fc" + sha256 cellar: :any, arm64_ventura: "574236c1d041249054c6767741940b013cebc9771ca97108fbab98973d4b5898" + sha256 cellar: :any, sonoma: "5d24d31ff9a43ff9889dea391bb86e16016efec62385d0b17e8648d0242e3bd1" + sha256 cellar: :any, ventura: "734cb42ad73f66af33c147440e1af89b3a3e1f508dbb902e12f9ab164e252aba" + sha256 cellar: :any_skip_relocation, arm64_linux: "38b2592995a25f2e1024b80fce55beed16e179fa53ee4306671e61f9b6624ec4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad3472b35ebd01c5335c7557dd3274fd27d365e09722e0beed0749e0e47c28cb" + end + + depends_on "pkgconf" => :build + depends_on "libogg" + + # build patch to include `` to fix missing printf format macros + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/liboggz/1.1.2-inttypes.patch" + sha256 "0ec758ab05982dc302592f3b328a7b7c47e60672ef7da1133bcbebc4413a20a3" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"oggz", "known-codecs" + end +end diff --git a/Formula/o/ogmtools.rb b/Formula/o/ogmtools.rb new file mode 100644 index 0000000000000..d72edb6662b41 --- /dev/null +++ b/Formula/o/ogmtools.rb @@ -0,0 +1,58 @@ +class Ogmtools < Formula + desc "OGG media streams manipulation tools" + homepage "https://www.bunkus.org/videotools/ogmtools/" + url "https://www.bunkus.org/videotools/ogmtools/ogmtools-1.5.tar.bz2" + sha256 "c8d61d1dbceb981dc7399c1a85e43b509fd3d071fb8d3ca89ea9385e6e40fdea" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?ogmtools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "86153da84a3749d259955192038722ee1f4adc2142f382cc29c2885ec07b348a" + sha256 cellar: :any, arm64_sequoia: "789b9bad9d0902bf85da322c80b14401105d4307a1affc78e523e9c9e22fd8ce" + sha256 cellar: :any, arm64_sonoma: "3a941c51496636669cd52f1d4b81195b7dd35c29af3333014f9d34070bdc8dbf" + sha256 cellar: :any, arm64_ventura: "93842b3845c01a1b3efc05d7b6f3f06957205733537e84a3b743b2df41ba692c" + sha256 cellar: :any, arm64_monterey: "21c37a98fe73b81c34dbeb8abfb29f6bc30bb7af9d1d9b8d7b379667eb84de30" + sha256 cellar: :any, arm64_big_sur: "34cfdabab2892f91fd6a6164a041f62eef1da1cf7a2097ad5fe5e2e904de21a3" + sha256 cellar: :any, sonoma: "6648b18de049a3dceb9ea8eccb8285b25227a074017cf624a534547540915d40" + sha256 cellar: :any, ventura: "fae0d207875e9368c96bd5c20a9daa5f9cc52f02f94819fd97c657d6a15ebf19" + sha256 cellar: :any, monterey: "0bcb100030a3bea8c804c7dd9091d423997c35e6bb5160251724f7397669f833" + sha256 cellar: :any, big_sur: "939be64a395371009f70c9c596e86df908e429ad6915dee142752c1114f2e1d3" + sha256 cellar: :any, catalina: "6a2e3ed95e0569dca709b5d0431ea309c008400f3f88b91133d6854340babed7" + sha256 cellar: :any_skip_relocation, arm64_linux: "3608e7bae8ff168511df1e0202734b707d90960e6982c85e65f912b12a5679e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bd76fd65c8b1627890beef905c7b8eb23119ace422c6618be47a9412862479c" + end + + depends_on "libogg" + depends_on "libvorbis" + + # Borrow patch from MacPorts + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/ogmtools/common.h.diff" + sha256 "2dd18dea6de0d2820221bde8dfea163101d0037196cb2e94cd910808d10119c0" + end + + def install + ENV.cxx11 + + ENV.append "CPPFLAGS", "-I#{Formula["libvorbis"].opt_include}" + system "./configure", "--mandir=#{man}", *std_configure_args + + system "make", "install", "LIBS=-L#{Formula["libvorbis"].opt_lib} -lvorbis -lvorbisenc" + end + + # Borrow warning from MacPorts + def caveats + <<~EOS + Ogmtools has not been updated since 2004 and is no longer being developed, + maintained or supported. There are several issues, especially on 64-bit + architectures, which the author will not fix or accept patches for. + Keep this in mind when deciding whether to use this software. + EOS + end +end diff --git a/Formula/o/oh-my-posh.rb b/Formula/o/oh-my-posh.rb new file mode 100644 index 0000000000000..80703b09c14aa --- /dev/null +++ b/Formula/o/oh-my-posh.rb @@ -0,0 +1,48 @@ +class OhMyPosh < Formula + desc "Prompt theme engine for any shell" + homepage "https://ohmyposh.dev" + url "https://github.com/JanDeDobbeleer/oh-my-posh/archive/refs/tags/v27.5.0.tar.gz" + sha256 "19cda1ac72d94268599efcf91552e2ab83ee23eb581763d5cd38fc96f837f6a3" + license "MIT" + head "https://github.com/JanDeDobbeleer/oh-my-posh.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a811d0b13d228dfc41e2132a8cc877dc39f59e284209839a15fe5c0e781b3e91" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "826795ab78268fd32ece2eaecc11624e0db3b0e5968012ed0fb44ea71008b5a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5738c970a04404cc8bc037a7b178a4a7c987e3ac02a48e5cf0667d55cf130f06" + sha256 cellar: :any_skip_relocation, sonoma: "c33c9fcaf11fd27b3ccac59d9e06ade85eca7680cc790a562da71958c151611e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8d786b1c40ea8cb520710812bc93ecaef53743611b06bea5abb7b43503806e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c487950cad8160b2f2490b9335fe883da9be7458403c9447f5ba04b7116fc9e5" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/jandedobbeleer/oh-my-posh/src/build.Version=#{version} + -X github.com/jandedobbeleer/oh-my-posh/src/build.Date=#{time.iso8601} + ] + + cd "src" do + system "go", "build", *std_go_args(ldflags:) + end + + prefix.install "themes" + pkgshare.install_symlink prefix/"themes" + end + + test do + assert_match version.to_s, shell_output("#{bin}/oh-my-posh version") + output = shell_output("#{bin}/oh-my-posh init bash") + assert_match(%r{.cache/oh-my-posh/init\.\d+\.sh}, output) + end +end diff --git a/Formula/o/oha.rb b/Formula/o/oha.rb new file mode 100644 index 0000000000000..34efa4eb649f0 --- /dev/null +++ b/Formula/o/oha.rb @@ -0,0 +1,36 @@ +class Oha < Formula + desc "HTTP load generator, inspired by rakyll/hey with tui animation" + homepage "https://github.com/hatoo/oha/" + url "https://github.com/hatoo/oha/archive/refs/tags/v1.11.0.tar.gz" + sha256 "aee9a6a638fb32f9021105d7faa7c182eaa8bc7a17a7a9a96525d5d61b32ea51" + license "MIT" + head "https://github.com/hatoo/oha.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3615368bb9198de7c12473ee70abb7505226b8d5108ba23ec7a51d2d98176d9e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4abe7889517f4662264a0730dca034f4aec14b75e70f15b4cecc21598b8586a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac69d8483bea42988c7130dbbb8018cc5588bab2baec56c5ca94191f0f440a1b" + sha256 cellar: :any_skip_relocation, sonoma: "4c064b5faadf5df3f08f1a1f46a272e8b1997d709232030c2d3a121edf508200" + sha256 cellar: :any_skip_relocation, arm64_linux: "458fb0ddd756ac20ac8b35b91e158de5bf39837c634fc5b089ce66b4f9ab311e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bbb06a64b1986f9c5f14837c3877e39dd42182eb2a06f1a77f52eaf5888bd4d" + end + + depends_on "cmake" => :build # for aws-lc-sys + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = "[200] 1 responses" + assert_match output.to_s, shell_output("#{bin}/oha -n 1 -c 1 --no-tui https://www.google.com") + + assert_match version.to_s, shell_output("#{bin}/oha --version") + end +end diff --git a/Formula/o/ohcount.rb b/Formula/o/ohcount.rb new file mode 100644 index 0000000000000..77835ff6e23af --- /dev/null +++ b/Formula/o/ohcount.rb @@ -0,0 +1,46 @@ +class Ohcount < Formula + desc "Source code line counter" + homepage "https://github.com/blackducksoftware/ohcount" + url "https://github.com/blackducksoftware/ohcount/archive/refs/tags/4.0.0.tar.gz" + sha256 "d71f69fd025f5bae58040988108f0d8d84f7204edda1247013cae555bfdae1b9" + license "GPL-2.0-only" + head "https://github.com/blackducksoftware/ohcount.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e44046c903fb421bf44b7dc8a9a4862d4cda4c7530dd3c6f6fd5c4e2f375b1ed" + sha256 cellar: :any, arm64_sequoia: "d537aa1e6a4a264ac45a9fa154b6dc8d0fdfae03fafe2cc2f81cdd4396aa5769" + sha256 cellar: :any, arm64_sonoma: "27c7e0899c7845d03e7f17f2a97f2fa6e47a6923fb1c232ce50551cd5a95122a" + sha256 cellar: :any, arm64_ventura: "2651774c46561b5dd0c6b71c9db1776367cbd6f31b83471abbe4ba54a92499c8" + sha256 cellar: :any, arm64_monterey: "4d5cc69e38917712d81bfb15e4cd044af67b6fdc3b4229e6030656dca705e8c6" + sha256 cellar: :any, arm64_big_sur: "43a0bac3974271a961f6cbb035aeb37e0f63e6fc05200bdf8b28064ca7faf128" + sha256 cellar: :any, sonoma: "8bfe6b81dc3efdb8efbb539e73d09ce97372a216269a3cdc64248d28da641a45" + sha256 cellar: :any, ventura: "2aa5b5bd949c86b0a05afe668a3d840d42e6a5c6797d7115eac0670623d2589c" + sha256 cellar: :any, monterey: "c536c13d4e615310df75e452d175b13fc036fde61675adba34b89851097ad814" + sha256 cellar: :any, big_sur: "4c6dbf352f569f3976b9c3992376f9afbd4cc05ceb1bbf129b4e462628dbe618" + sha256 cellar: :any, catalina: "49de65862c42d1e653b84aa09a3ca9015de5afa40d9c1069d5a7f5a4e35060e5" + sha256 arm64_linux: "e5b7f38361c5247632be1f37eae14d3d1fee98d4a35c3feb6864e699300f2fc2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39d8342b2b51c283aa66ab2c23b79ad9bc4a98c6c2d93bb8ae857a63fbe1f23b" + end + + depends_on "gperf" => :build + depends_on "libmagic" + depends_on "pcre" + depends_on "ragel" + + def install + system "./build", "ohcount" + bin.install "bin/ohcount" + end + + test do + (testpath/"test.rb").write <<~RUBY + # comment + puts + puts + RUBY + stats = shell_output("#{bin}/ohcount -i test.rb").lines.last + assert_equal ["ruby", "2", "1", "33.3%"], stats.split[0..3] + end +end diff --git a/Formula/o/ohdear-cli.rb b/Formula/o/ohdear-cli.rb new file mode 100644 index 0000000000000..4631c8f433e9b --- /dev/null +++ b/Formula/o/ohdear-cli.rb @@ -0,0 +1,26 @@ +class OhdearCli < Formula + desc "Tool to manage your Oh Dear sites" + homepage "https://github.com/ohdearapp/ohdear-cli" + url "https://github.com/ohdearapp/ohdear-cli/releases/download/v4.5.2/ohdear.phar" + sha256 "fa2e0e84d47adefea1a3f5e23274c245285957208e33d2e143f0ddb617b60112" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "f610a110de9f9bf223b8107dd9bd718c53d20d97fcf1962ccd6cea4a972c1327" + end + + depends_on "php" + + def install + bin.install "ohdear.phar" => "ohdear" + # The cli tool was renamed (3.x -> 4.0.0) + # Create a symlink to not break compatibility + bin.install_symlink bin/"ohdear" => "ohdear-cli" + end + + test do + assert_match "Unauthorised", shell_output("#{bin}/ohdear me", 1) + end +end diff --git a/Formula/o/oil.rb b/Formula/o/oil.rb new file mode 100644 index 0000000000000..7bb89c40a5e70 --- /dev/null +++ b/Formula/o/oil.rb @@ -0,0 +1,60 @@ +class Oil < Formula + desc "Bash-compatible Unix shell with more consistent syntax and semantics" + homepage "https://oils.pub/" + url "https://oils.pub/download/oil-0.28.0.tar.gz" + sha256 "7fbbad0b5a3f91ccc89aa4b124da2d7b86be09c784a18290b9a76ede043631f3" + license "Apache-2.0" + + livecheck do + url "https://oils.pub/releases.html" + regex(/href=.*?oil[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "4ed33cb8bd4e5b3eab753bdc2966907f1131f5e2de75c06374bcf4b3798eee1b" + sha256 arm64_sequoia: "d7f33bcf21c4d633100e696f18c3ac2da6a5040ea33b70b9150c342cf48e82a5" + sha256 arm64_sonoma: "44a9ecb0c3f6fbba0adfb0cb705c0fd598188d21718abc62d2e8ddc5be9a32a4" + sha256 arm64_ventura: "c4a576863f7a1f1b5b03c54e8fc13f48c6e1f66b36532e52ec554d131b8e914e" + sha256 sonoma: "9b141902a28ddf300bad945a5fbb29722ed033f67e7df1107670569e08c4a3b8" + sha256 ventura: "9f5cc327440859fe2de73c14326a0e02790ef42f2beb5d573cee0e06449100fc" + sha256 arm64_linux: "d37d926656cb2143910eb8eb1591175c7e479508c665a5069c2e9d6ef9e62e2d" + sha256 x86_64_linux: "cb4af168e569f703d4ed53eb46c52677089ccec0cc5bd391fdc4103666e623ec" + end + + depends_on "readline" + + conflicts_with "oils-for-unix", because: "both install 'osh' and 'ysh' binaries" + conflicts_with "etsh", "omake", because: "both install 'osh' binaries" + + def install + # Workaround for newer Clang/GCC + ENV.append_to_cflags "-Wno-implicit-function-declaration" + + system "./configure", "--prefix=#{prefix}", + "--datarootdir=#{share}", + "--with-readline=#{Formula["readline"].opt_prefix}" + system "make" + system "./install" + + # patchelf.rb cannot handle ELF with appended zip data so keep the original files + # used at https://github.com/oils-for-unix/oils/blob/master/Makefile#L189-L190 + libexec.install "_build/oil/ovm-opt.stripped", "_build/oil/bytecode-opy.zip" if build.bottle? && OS.linux? + end + + def post_install + if libexec.exist? + bin.install libexec/"ovm-opt.stripped" => "oil.ovm" + (bin/"oil.ovm").binwrite((libexec/"bytecode-opy.zip").binread, mode: "a") + (bin/"oil.ovm").chmod(0555) + rm_r(libexec) + end + end + + test do + system bin/"osh", "-c", "shopt -q parse_backticks" + assert_equal testpath.to_s, shell_output("#{bin}/osh -c 'echo `pwd -P`'").strip + + system bin/"oil", "-c", "shopt -u parse_equals" + assert_equal "bar", shell_output("#{bin}/oil -c 'var foo = \"bar\"; write $foo'").strip + end +end diff --git a/Formula/o/oils-for-unix.rb b/Formula/o/oils-for-unix.rb new file mode 100644 index 0000000000000..31314d4325353 --- /dev/null +++ b/Formula/o/oils-for-unix.rb @@ -0,0 +1,43 @@ +class OilsForUnix < Formula + desc "Bash-compatible Unix shell with more consistent syntax and semantics" + homepage "https://oils.pub/" + url "https://oils.pub/download/oils-for-unix-0.36.0.tar.gz" + sha256 "9b65fc7333708dc1dc777e8a6145ae868eac6fbe0c444a8b12bb6d6d29652902" + license "Apache-2.0" + + livecheck do + url "https://oils.pub/releases.html" + regex(/href=.*?oils-for-unix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d7e0f8dfa4ea6bf7fb83152f39594b4979d73fe69e7370c0f23c83913bfd812d" + sha256 cellar: :any, arm64_sequoia: "b9aaea4300f60d8e00d2fe72cf9dcb1046bcd2bc96ccd0a781164f36d62452de" + sha256 cellar: :any, arm64_sonoma: "bb4d0db3e96bacb67d74dc94e914f05020361a6fbf14ee0d8a5cc2734143237d" + sha256 cellar: :any, sonoma: "a65690faa7fc18ce270df922dd399ba9a99198c855655b63a50888c75697f6ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "66b798b406a9058d4f8a6df3aa3f0ef656ebc2bccbc4f590801ee65dfc3278e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad221c6faee54ae61e5a463456a56533f06ad8f498c0f207cfcd673f2e7ce89e" + end + + depends_on "readline" + + conflicts_with "oil", because: "both install 'osh' and 'ysh' binaries" + conflicts_with "etsh", "omake", because: "both install 'osh' binaries" + + def install + system "./configure", "--prefix=#{prefix}", + "--datarootdir=#{share}", + "--readline=#{Formula["readline"].opt_prefix}", + "--with-readline" + system "_build/oils.sh" + system "./install" + end + + test do + system bin/"osh", "-c", "shopt -q lastpipe" + assert_equal testpath.to_s, shell_output("#{bin}/osh -c 'echo `pwd -P`'").strip + + system bin/"ysh", "-c", "shopt -u parse_equals" + assert_equal "bar", shell_output("#{bin}/ysh -c 'var foo = \"bar\"; write $foo'").strip + end +end diff --git a/Formula/o/oj.rb b/Formula/o/oj.rb new file mode 100644 index 0000000000000..1f8f24112b670 --- /dev/null +++ b/Formula/o/oj.rb @@ -0,0 +1,27 @@ +class Oj < Formula + desc "JSON parser and visualization tool" + homepage "https://github.com/ohler55/ojg" + url "https://github.com/ohler55/ojg/archive/refs/tags/v1.26.11.tar.gz" + sha256 "f608a3976737415df466af9cdb0a509f26aaa6808eae8a892d4af277fbd1e395" + license "MIT" + head "https://github.com/ohler55/ojg.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2d4b82d54c2ad28bc055a4928bfafa55e161a8a2ba56d24f9652ccdbe5eab9f9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d4b82d54c2ad28bc055a4928bfafa55e161a8a2ba56d24f9652ccdbe5eab9f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d4b82d54c2ad28bc055a4928bfafa55e161a8a2ba56d24f9652ccdbe5eab9f9" + sha256 cellar: :any_skip_relocation, sonoma: "e88d80c8af2e09a21f2b6dd976138365cf3e6f44bdf8925e272fda95330d83e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d4eddaf514e3e2cc1eb096d6511c556b15444dc914359f7f83c90e17e448f37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "712fc1c07494f012a1db50a300cbb1b31194a11fbf56c0703e04960ec6cb2cf4" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=v#{version}"), "./cmd/oj" + end + + test do + assert_equal "1\n", pipe_output("#{bin}/oj -z @.x", "{x:1,y:2}") + end +end diff --git a/Formula/o/oksh.rb b/Formula/o/oksh.rb new file mode 100644 index 0000000000000..efe40d3865ab6 --- /dev/null +++ b/Formula/o/oksh.rb @@ -0,0 +1,27 @@ +class Oksh < Formula + desc "Portable OpenBSD ksh, based on the public domain Korn shell (pdksh)" + homepage "https://github.com/ibara/oksh" + url "https://github.com/ibara/oksh/releases/download/oksh-7.8/oksh-7.8.tar.gz" + sha256 "3b30d5a1183b829590cc020d8ab87f22d288e98dc3fdf12feb7159536beaa950" + license all_of: [:public_domain, "BSD-3-Clause", "ISC"] + head "https://github.com/ibara/oksh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ada92d98bf5afc55fa57bd5a67656dda5694f6f45a1fbaa99c22b92a792f1579" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "efe4ab1f8b53d82cb1faf48bc2b0f3fedc8bd3ea3defb33ca51dee8d2afd0553" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63a57d4c141205fae7176186dd0a4f9f74db9191a79e679e842cdf2f2b6528f2" + sha256 cellar: :any_skip_relocation, sonoma: "d13fac5d94bf0f2cab0029848d4324a4e938d8efc3d2d22f89d13ee44388aabb" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cb56f25784348e87b2824c946f27e38403cdf1a956e1dd36add9b8305484807" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c873e983dc4fb309264a6da0b94725eee67beab552cff478cd114b26b6fde3e5" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + assert_equal "hello", shell_output("#{bin}/oksh -c \"echo -n hello\"") + end +end diff --git a/Formula/o/okta-aws-cli.rb b/Formula/o/okta-aws-cli.rb new file mode 100644 index 0000000000000..00f6814d24201 --- /dev/null +++ b/Formula/o/okta-aws-cli.rb @@ -0,0 +1,37 @@ +class OktaAwsCli < Formula + desc "Okta federated identity for AWS CLI" + homepage "https://github.com/okta/okta-aws-cli" + url "https://github.com/okta/okta-aws-cli/archive/refs/tags/v2.5.0.tar.gz" + sha256 "e47f39fd2021cbcc3c86e0bfb96ee46aad506b8de4f35935a5cb86d8fd33e939" + license "Apache-2.0" + head "https://github.com/okta/okta-aws-cli.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4189c9a089c7dff88db33d591ae6248cc448b394b5f61b667cd27d25e901ee7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "391a7c50e9b1c816c5b65122d29d6aacaadd19d01520e2c134774ad0ae592648" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "391a7c50e9b1c816c5b65122d29d6aacaadd19d01520e2c134774ad0ae592648" + sha256 cellar: :any_skip_relocation, arm64_ventura: "391a7c50e9b1c816c5b65122d29d6aacaadd19d01520e2c134774ad0ae592648" + sha256 cellar: :any_skip_relocation, sonoma: "89981ade5d232179f4f30d9842286cbcec53b012db792edce069837d8496eaf0" + sha256 cellar: :any_skip_relocation, ventura: "89981ade5d232179f4f30d9842286cbcec53b012db792edce069837d8496eaf0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b664ffeb276c2f87bcc51836aa3f5eb962e25d9fa6047865843ef74dd6759d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0722e0df4cd81b34ebe80025de7393276c27ad51961f0691c31838ae810651e4" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/okta-aws-cli" + end + + test do + output = shell_output("#{bin}/okta-aws-cli list-profiles") + assert_match "Profiles:", output + + assert_match version.to_s, shell_output("#{bin}/okta-aws-cli --version") + end +end diff --git a/Formula/o/okta-awscli.rb b/Formula/o/okta-awscli.rb new file mode 100644 index 0000000000000..1c506efcfb8b9 --- /dev/null +++ b/Formula/o/okta-awscli.rb @@ -0,0 +1,113 @@ +class OktaAwscli < Formula + include Language::Python::Virtualenv + + desc "Okta authentication for awscli" + homepage "https://github.com/okta-awscli/okta-awscli" + url "https://files.pythonhosted.org/packages/ed/2c/153d8ba330660d756fe6373fb4d1c13b99e63675570042de45aedf300bb7/okta-awscli-0.5.5.tar.gz" + sha256 "a8b1277914b992fc24e934edaf1947291723ce386f2191a8952e7c008f2e77fa" + license "Apache-2.0" + revision 5 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "d0f36cebf2eb0d71ef736d8cfc529ebaf05c2822c2601379faa2da1f1ac4b933" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "configparser" do + url "https://files.pythonhosted.org/packages/8b/ac/ea19242153b5e8be412a726a70e82c7b5c1537c83f61b20995b2eda3dcd7/configparser-7.2.0.tar.gz" + sha256 "b629cc8ae916e3afbd36d1b3d093f34193d851e11998920fdcfc4552218b7b70" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "validators" do + url "https://files.pythonhosted.org/packages/53/66/a435d9ae49850b2f071f7ebd8119dd4e84872b01630d6736761e6e7fd847/validators-0.35.0.tar.gz" + sha256 "992d6c48a4e77c81f1b4daba10d16c3a9bb0dbb79b3a19ea847ff0928e70497a" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"okta-awscli", shell_parameter_format: :click) + end + + test do + assert_equal <<~EOS, shell_output("#{bin}/okta-awscli 2>&1", 1) + ERROR - The app-link is missing. Will try to retrieve it from Okta + ERROR - No profile found. Please define a default profile, or specify a named profile using `--okta-profile` + EOS + end +end diff --git a/Formula/o/okteto.rb b/Formula/o/okteto.rb new file mode 100644 index 0000000000000..c829d2a1ed0cf --- /dev/null +++ b/Formula/o/okteto.rb @@ -0,0 +1,33 @@ +class Okteto < Formula + desc "Build better apps by developing and testing code directly in Kubernetes" + homepage "https://okteto.com" + url "https://github.com/okteto/okteto/archive/refs/tags/3.12.1.tar.gz" + sha256 "16b8b2ac521c492a331f32f3f176655be64e5d14212922433ff683f3ece793fe" + license "Apache-2.0" + head "https://github.com/okteto/okteto.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3eba403e901de581034cab1d3e272eaabcda87dc8be4528db48062923d41e2e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f4dbc9f3bcc091a5a39543378b2f8d1c48492ae69dade18a9b18082b0f5b6a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10408964f84246ec4c969eae297c141ef4527915d71540c8d016fe66cb6b97e8" + sha256 cellar: :any_skip_relocation, sonoma: "1aaa3b78089ac824eeec85268c9adcfcbc193f00d0877ebc1a7d3a43716e398b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d5af84afeaad08b45ef10049fc779971cc0d5558bc2ea7025d9775185d4ba57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fdc6044930834a6a6829240d5ca9c0d76d779ea8042f2a0154088d210172921" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/okteto/okteto/pkg/config.VersionString=#{version}" + tags = "osusergo netgo static_build" + system "go", "build", *std_go_args(ldflags:, tags:) + + generate_completions_from_executable(bin/"okteto", "completion") + end + + test do + assert_match "okteto version #{version}", shell_output("#{bin}/okteto version") + + assert_match "Your context is not set", shell_output("#{bin}/okteto context list 2>&1", 1) + end +end diff --git a/Formula/o/ol.rb b/Formula/o/ol.rb new file mode 100644 index 0000000000000..df1f6baf6d1b3 --- /dev/null +++ b/Formula/o/ol.rb @@ -0,0 +1,36 @@ +class Ol < Formula + desc "Purely functional dialect of Lisp" + homepage "https://yuriy-chumak.github.io/ol/" + url "https://github.com/yuriy-chumak/ol/archive/refs/tags/2.6.tar.gz" + sha256 "c5506de4005a63039dc96962322ae94bf6c33eeaf63dcc03b07b1e8cc3a4d8f3" + license any_of: ["LGPL-3.0-or-later", "MIT"] + head "https://github.com/yuriy-chumak/ol.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "2a42c86b854dc6c419314c640401583715ae2c101e128bc99e2bda78939f6a37" + sha256 arm64_sequoia: "5a9e307abff85e27d842ad8de7f9ce281a037386154a7c39a0e8a57b3d378504" + sha256 arm64_sonoma: "6758faddc2a7dbc71e03f881bccf6ee4f5534a75c0d19a2ec9cc875668219831" + sha256 arm64_ventura: "6ccc4d40970b7514955cdb20db58682cb9dd0709ef467b4119f972869719c0f0" + sha256 sonoma: "519d8844f56b85f889046669676152e1323917320cca387da378f46238e0c29f" + sha256 ventura: "834d6d963775f098ec7ab3ab46e5438bc2bc42a0d70b9d74f2008fe1d457ef0b" + sha256 arm64_linux: "c8e473a5a22ff92d987a9a3648aba10b2f9bee971f80f45c88c81e7389d24714" + sha256 x86_64_linux: "0e38d0ccd5f4c27ee8044aa0be305b1bff4c506efc79b9d6a1abf2cebcb7db16" + end + + uses_from_macos "vim" => :build # for xxd + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "all", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"gcd.ol").write <<~LISP + (print (gcd 1071 1029)) + LISP + assert_equal "21", shell_output("#{bin}/ol gcd.ol").strip + end +end diff --git a/Formula/o/ola.rb b/Formula/o/ola.rb new file mode 100644 index 0000000000000..42cb577b2e2a0 --- /dev/null +++ b/Formula/o/ola.rb @@ -0,0 +1,178 @@ +class Ola < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Open Lighting Architecture for lighting control information" + homepage "https://github.com/OpenLightingProject/ola" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 7 + + stable do + # TODO: Check if we can use unversioned `protobuf` at version bump + url "https://github.com/OpenLightingProject/ola/releases/download/0.10.9/ola-0.10.9.tar.gz" + sha256 "44073698c147fe641507398253c2e52ff8dc7eac8606cbf286c29f37939a4ebf" + + # fix liblo 0.32 header compatibility + # upstream pr ref, https://github.com/OpenLightingProject/ola/pull/1954 + patch do + url "https://github.com/OpenLightingProject/ola/commit/e083653d2d18018fe6ef42f757bc06462de87f28.patch?full_index=1" + sha256 "1276aded269497fab2e3fc95653b5b8203308a54c40fe2dcd2215a7f0d0369de" + end + + # Backport fix for protoc version detection + patch do + url "https://github.com/OpenLightingProject/ola/commit/aed518a81340a80765e258d1523b75c22a780052.patch?full_index=1" + sha256 "7e48c0027b79e129c1f25f29fae75568a418b99c5b789ba066a4253b7176b00a" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "6ba62681374ac79077d185493e09aeefac7adc0746896ccb0485eb6668889015" + sha256 arm64_sequoia: "168690a27dd864abd1543df81298977f2a1cebe34c633a89c97afcccc010697d" + sha256 arm64_sonoma: "b9d261def4d9d8c34fb73c52aa273480fdeda6c08d1cd62d7cbadf967a4d087d" + sha256 sonoma: "f0cde66cdb2622d4f30d4c9980e61db42b71f9d8c819d3663b2fb61390297b17" + sha256 arm64_linux: "a9d38c240b245f7e0e6bbd1ae81dd88e93861858b22acb2fd9938387d14bc7b8" + sha256 x86_64_linux: "612776413721251613393b949c31da2493dd19527442b8efb23a9d1bf77abb80" + end + + head do + url "https://github.com/OpenLightingProject/ola.git", branch: "master" + + # Apply open PR to fix macOS HEAD build + # PR ref: https://github.com/OpenLightingProject/ola/pull/1983 + patch do + url "https://github.com/OpenLightingProject/ola/commit/b8134b82e15f19266c79620b9c3c012bc515357d.patch?full_index=1" + sha256 "d168118436186f0a30f4f7f2fdfcde69a5d20a8dcbef61c586d89cfd8f513e33" + end + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cppunit" => :build # TODO: remove once we no longer need to run tests + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "abseil" + depends_on "liblo" + depends_on "libmicrohttpd" + depends_on "libusb" + depends_on "numpy" + depends_on "protobuf@29" + depends_on "python@3.14" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + on_sequoia do + # Use LLVM 18 to work around https://github.com/OpenLightingProject/ola/issues/1982 + # Would be more accurate to check for Xcode 16.3 or clang 1700.0.13.3 as the change + # is not related to linker but this doesn't seem available via DSL for dependencies. + # Xcode 16.4 doesn't hit this as Apple temporarily reverted LLVM change: + # https://developer.apple.com/documentation/xcode-release-notes/xcode-16_4-release-notes#Apple-Clang-Compiler + depends_on "llvm@18" => :build if DevelopmentTools.ld64_version == "1167.4.1" + end + + on_linux do + depends_on "util-linux" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/43/29/d09e70352e4e88c9c7a198d5645d7277811448d76c23b00345670f7c8a38/protobuf-5.29.5.tar.gz" + sha256 "bc1463bafd4b0929216c35f437a8e28731a2b7fe3d98bb77a600efced5a15c84" + end + + # Apply open PR to support Protobuf 22+ API + # PR ref: https://github.com/OpenLightingProject/ola/pull/1984 + patch do + url "https://github.com/OpenLightingProject/ola/commit/4924c9908ea879b36dc9132768fca25f6f21a677.patch?full_index=1" + sha256 "4d3ed12a41d4c2717cfbb3fa790ddf115b084c1d3566a4d2f0e52a8ab25053ef" + end + + def python3 + "python3.14" + end + + def extra_python_path + opt_libexec/Language::Python.site_packages(python3) + end + + def install + # Workaround to build with newer Protobuf due to Abseil C++ standard + # Issue ref: https://github.com/OpenLightingProject/ola/issues/1879 + inreplace "configure.ac", "-std=gnu++11", "-std=gnu++17" + if ENV.compiler.to_s.match?("clang") + # Workaround until https://github.com/OpenLightingProject/ola/pull/1889 + ENV.append "CXXFLAGS", "-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" + # Workaround until https://github.com/OpenLightingProject/ola/pull/1890 + ENV.append "CXXFLAGS", "-D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS" + ENV.append "CXXFLAGS", "-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" + end + + # Aligned with dependency conditional. Remove when fixed upstream + if DevelopmentTools.ld64_version == "1167.4.1" + ENV["CXX"] = Formula["llvm@18"].opt_bin/"clang++" + ENV.append_to_cflags "-I#{Formula["protobuf@29"].opt_include} -I#{HOMEBREW_PREFIX}/include" + end + + # Skip flaky python tests. Remove when no longer running tests + inreplace "python/ola/Makefile.mk", /^test_scripts \+= \\$/, "skipped_test_scripts = \\" + # Skip flaky tests on macOS + if OS.mac? + # https://github.com/OpenLightingProject/ola/pull/1655#issuecomment-696756941 + inreplace "common/network/Makefile.mk", %r{\bcommon/network/HealthCheckedConnectionTester }, "#\\0" + inreplace "plugins/usbpro/Makefile.mk", %r{\\\n\s*plugins/usbpro/WidgetDetectorThreadTester$}, "" + # TODO: SelectServerTester may need confirmation on sporadic failures. + inreplace "common/io/Makefile.mk", %r{\bcommon/io/SelectServerTester }, "#\\0" + end + + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + + args = %W[ + --disable-fatal-warnings + --disable-silent-rules + --enable-unittests + --enable-python-libs + --enable-rdm-tests + --with-python_prefix=#{libexec} + --with-python_exec_prefix=#{libexec} + ] + + ENV["PYTHON"] = venv.root/"bin/python" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *args, *std_configure_args + system "make" + # Run tests to check the workarounds applied haven't broken basic functionality. + # TODO: Remove and revert to `--disable-unittests` when workarounds can be dropped. + ENV.deparallelize do + system "make", "check" + ensure + logs.install buildpath/"test-suite.log" if (buildpath/"test-suite.log").exist? + end + system "make", "install" + + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children + end + + def caveats + <<~EOS + To use the bundled Python libraries: + #{Utils::Shell.export_value("PYTHONPATH", extra_python_path)} + EOS + end + + service do + run [opt_bin/"olad", "--no-http-quit"] + error_log_path var/"log/olad.log" + end + + test do + ENV.prepend_path "PYTHONPATH", extra_python_path + system bin/"ola_plugin_state", "-h" + system python3, "-c", "from ola.ClientWrapper import ClientWrapper" + end +end diff --git a/Formula/o/ollama.rb b/Formula/o/ollama.rb new file mode 100644 index 0000000000000..8bfac511fae21 --- /dev/null +++ b/Formula/o/ollama.rb @@ -0,0 +1,70 @@ +class Ollama < Formula + desc "Create, run, and share large language models (LLMs)" + homepage "https://ollama.com/" + url "https://github.com/ollama/ollama.git", + tag: "v0.12.9", + revision: "392a270261dfb1d1cee1de3713836b503a7526ce" + license "MIT" + head "https://github.com/ollama/ollama.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "64f331697b03478b3c7b81ee9e7be4ec2302f661d82da1459e1262599dac6276" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5f0bfdf239c72ad18f0ffe2c18709e181893430097d83acedd610d38d801709" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0910330d5837dfa0c5a1ebb40cedf7645be8a4c3f9ccd8b13f37af83c69a923" + sha256 cellar: :any_skip_relocation, sonoma: "c772d3be2d24aac83dd396c83a5fd10d00dfa76b3075a2a9e830bf8eb0a37da0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ddf205da5d6b6410a9a04b97c9f178d9c53db1c88db08cf476db9d2e03bbecd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "653b23ece17ae57a6c925e24cc2ce88db1f51aaf9b21dce0209e6413a38754a3" + end + + depends_on "cmake" => :build + depends_on "go" => :build + + conflicts_with cask: "ollama-app" + + def install + ENV["CGO_ENABLED"] = "1" + + # Silence tens of thousands of SDK warnings + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + + ldflags = %W[ + -s -w + -X github.com/ollama/ollama/version.Version=#{version} + -X github.com/ollama/ollama/server.mode=release + ] + + system "go", "generate", "./..." + system "go", "build", *std_go_args(ldflags:) + end + + service do + run [opt_bin/"ollama", "serve"] + keep_alive true + working_dir var + log_path var/"log/ollama.log" + error_log_path var/"log/ollama.log" + environment_variables OLLAMA_FLASH_ATTENTION: "1", + OLLAMA_KV_CACHE_TYPE: "q8_0" + end + + test do + port = free_port + ENV["OLLAMA_HOST"] = "localhost:#{port}" + + pid = fork { exec bin/"ollama", "serve" } + sleep 3 + begin + assert_match "Ollama is running", shell_output("curl -s localhost:#{port}") + ensure + Process.kill "SIGTERM", pid + end + end +end diff --git a/Formula/o/olsrd.rb b/Formula/o/olsrd.rb new file mode 100644 index 0000000000000..26af9cef4ac23 --- /dev/null +++ b/Formula/o/olsrd.rb @@ -0,0 +1,85 @@ +class Olsrd < Formula + desc "Implementation of the optimized link state routing protocol" + homepage "https://github.com/OLSR/olsrd" + url "https://github.com/OLSR/olsrd/archive/refs/tags/v0.9.8.tar.gz" + sha256 "ee9e524224e5d5304dcf61f1dc5485c569da09d382934ff85b233be3e24821a3" + license "BSD-3-Clause" + revision 2 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a12891626977104dbb673e6a4f810b7c5d8a91279cbdd793c1e663d566feca02" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0aeb303759d085dad7b581e75104d268df5b320c64abe9030b55a10ab6cfbd6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b708682b004bbec11078438431bcfe45287081bfad38dc5642e3b66b8917d6b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d0390ab383fd753be5a69c7cf979639928716aecbd30cf7125d226c9aec00cf" + sha256 cellar: :any_skip_relocation, sonoma: "b455eae0e98b02d306ac032239b28c361031d79ba60d05739da0cad83c01a60e" + sha256 cellar: :any_skip_relocation, ventura: "abaac5b8b0b1a3a783e76b8d2e68acb4d51c3c6a4086e5bd78d94f598ea28460" + sha256 cellar: :any_skip_relocation, arm64_linux: "b20249ebcbba2d3ca74f80ec36e6f412cf0bc7e14d80faff72f3e032b7e07f45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33113cc2b9ddad06caa174c9fc98e49b3aa4bbb01ede5b82945d7d9c597be727" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_macos do + depends_on "coreutils" => :build # needs GNU cp + end + + on_linux do + depends_on "gpsd" + + # patch to support gpsd 3.25, remove when patch avail in the upstream + patch do + url "https://github.com/OLSR/olsrd/commit/17d583258969c1d182361e0e168b3cad79ef64e6.patch?full_index=1" + sha256 "2c7a210a3a504f1df51da3ceb0908d309c447a9a1566d6da244f4ae9e9e3cab1" + end + end + + # Apply upstream commit to fix build with bison >= 3.7.1 + patch do + url "https://github.com/OLSR/olsrd/commit/be461986c6b3180837ad776a852be9ce22da56c0.patch?full_index=1" + sha256 "6ec65c73a09f124f7e7f904cc6620699713b814eed95cd3bc44a0a3c846d28bd" + end + + # Apply 3 upstream commits to fix build with gpsd >= 3.20 + patch do + url "https://github.com/OLSR/olsrd/commit/b2dfb6c27fcf4ddae87b0e99492f4bb8472fa39a.patch?full_index=1" + sha256 "a49a20a853a1f0f1f65eb251cd2353cdbc89e6bbd574e006723c419f152ecbe3" + end + + patch do + url "https://github.com/OLSR/olsrd/commit/79a28cdb4083b66c5d3a5f9c0d70dbdc86c0420c.patch?full_index=1" + sha256 "6295918ed6affdca40c256c046483752893475f40644ec8c881ae1865139cedf" + end + + patch do + url "https://github.com/OLSR/olsrd/commit/665051a845464c0f95edb81432104dac39426f79.patch?full_index=1" + sha256 "e49ee41d980bc738c0e4682c2eca47e25230742f9bdbd69b8bd9809d2e25d5ab" + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" + lib.mkpath + args = %W[ + DESTDIR=#{prefix} + USRDIR=#{prefix} + LIBDIR=#{lib} + SBINDIR=#{sbin} + SHAREDIR=#{pkgshare} + MANDIR=#{man} + ETCDIR=#{etc} + ] + system "make", "build_all", *args + system "make", "install_all", *args + end + + test do + assert_match version.to_s, pipe_output("#{sbin}/olsrd") + end +end diff --git a/Formula/o/omake.rb b/Formula/o/omake.rb new file mode 100644 index 0000000000000..0e35335a51254 --- /dev/null +++ b/Formula/o/omake.rb @@ -0,0 +1,62 @@ +class Omake < Formula + desc "Build system designed for scalability, portability, and concision" + homepage "http://projects.camlcity.org/projects/omake.html" + url "https://github.com/ocaml-omake/omake/archive/refs/tags/omake-0.10.7.tar.gz" + sha256 "ec098107429a419965feab5cee5dfa2996fc3fdc23842d910c314590941cafb8" + license "GPL-2.0-only" + head "https://github.com/ocaml-omake/omake.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:omake[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "4de04e995e24ff3f5ce9b25a34dbf77464d3722ae1fc0e0d6a4e37e308ea7815" + sha256 arm64_sequoia: "81f480345c0653b1788f41971c2d374f1198203e1fa5e382aa68614a3855e7e4" + sha256 arm64_sonoma: "cbab9c88f4d900ccf872ce469f0eac0bf002e8fb78f47697177d59a0f5d96965" + sha256 arm64_ventura: "e1fd58352aac92f14588d5867a39240934affcb79040b869c6fb7beb1c0a5f6f" + sha256 sonoma: "f7b331439ec53664c6475b856a53f33c51f09c6065d029101315b2e3c8f37ca4" + sha256 ventura: "630d8d9aab4e7ff5bcc4eb2619b68c314e355d8353e9780a4b429827e4d1642b" + sha256 arm64_linux: "e147fab15c1388ed0a7ba8c067663417a2e779dba1c4747a130ecd3989a4bf7b" + sha256 x86_64_linux: "8663b8c6c736ad807b39f45681cd3295ed9cdf1ff8ed58a3301da2e16eefd68b" + end + + depends_on "ocaml" => [:build, :test] + depends_on "ocaml-findlib" => :test + + conflicts_with "oil", because: "both install 'osh' binaries" + conflicts_with "oils-for-unix", because: "both install 'osh' binaries" + conflicts_with "etsh", because: "both install 'osh' binaries" + + def install + system "./configure", "-prefix", prefix + system "make" + system "make", "install" + + share.install prefix/"man" + end + + test do + # example run adapted from the documentation's "quickstart guide" + system bin/"omake", "--install" + (testpath/"hello_code.c").write <<~C + #include + + int main(int argc, char **argv) + { + printf("Hello, world!\\n"); + return 0; + } + C + rm testpath/"OMakefile" + (testpath/"OMakefile").write <<~EOF + CC = #{ENV.cc} + CFLAGS += #{ENV.cflags} + CProgram(hello, hello_code) + .DEFAULT: hello$(EXE) + EOF + system bin/"omake", "hello" + assert_equal "Hello, world!\n", shell_output(testpath/"hello") + end +end diff --git a/Formula/o/omega.rb b/Formula/o/omega.rb new file mode 100644 index 0000000000000..8edd788f10e9d --- /dev/null +++ b/Formula/o/omega.rb @@ -0,0 +1,40 @@ +class Omega < Formula + desc "Packaged search engine for websites, built on top of Xapian" + homepage "https://xapian.org/" + url "https://oligarchy.co.uk/xapian/1.4.29/xapian-omega-1.4.29.tar.xz" + sha256 "4fba4e9d496b4e4dba0a409ce2342e5958a69c6ab3e60ee4dda25be5c20cf83e" + license "GPL-2.0-or-later" + + livecheck do + url "https://xapian.org/download" + regex(/href=.*?xapian-omega[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "c3f3c8fa2283c5ae7a94b6ae1905a3247076da43eb992bcd78854570203be947" + sha256 arm64_sequoia: "9872cd039fdb166ea6e2725bc555a0d4a810abfc455a5f295e94dfa50a82e1a4" + sha256 arm64_sonoma: "2c2ce6e31a93ef3ab2a346675d1afe9243ec606bc448b3d3e9b2d7c0849b05ae" + sha256 arm64_ventura: "ceda263ce18b87eea2430765bfa2eeebb905ab8b67a8ab63ad81178c0787cb49" + sha256 sonoma: "801e64be4f8663f856b9b2716ed3c4428dce9dbba21983650017cea9a011f88e" + sha256 ventura: "8984d07d97d61fb6e211c3cca3fec3f649cbefa6f01effc63a0ee9239084a8cd" + sha256 arm64_linux: "577c8aace1e6aa8595bf462ea0f58ab26ac2bcc0264d3eedaa793b92bc1bc38f" + sha256 x86_64_linux: "ddf2a15db4c87fb65d1e39c01cd07a361b2e4c3f8345c17dcb62a2869f3b3ad1" + end + + depends_on "pkgconf" => :build + depends_on "libmagic" + depends_on "pcre2" + depends_on "xapian" + + uses_from_macos "zlib" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"omindex", "--db", "./test", "--url", "/", share/"doc/xapian-omega" + assert_path_exists testpath/"./test/flintlock" + end +end diff --git a/Formula/o/omekasy.rb b/Formula/o/omekasy.rb new file mode 100644 index 0000000000000..527d3da10abfd --- /dev/null +++ b/Formula/o/omekasy.rb @@ -0,0 +1,31 @@ +class Omekasy < Formula + desc "Converts alphanumeric input to various Unicode styles" + homepage "https://github.com/ikanago/omekasy" + url "https://github.com/ikanago/omekasy/archive/refs/tags/v1.3.3.tar.gz" + sha256 "0def519ad64396aa12b341dee459049fb54a3cfae265ae739da5e65ca1d7e377" + license "MIT" + head "https://github.com/ikanago/omekasy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d090085c33c82273e051eec3b46fa61dd1fa4effbfbbeb80d29d51dbceaddc3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19a5bd78d4a91060a4b52b88d2d2948e1200093fb327f10037be87684688788d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f77760ad1454cb1f58c6b6c8fe508549500b316f97885d55c975c7bf4bc1db4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60215eebac2b7bf72f95b6b1deb0d73a50070bad4bc9b3d41a83a1eba7bb48f2" + sha256 cellar: :any_skip_relocation, sonoma: "ffb3cb8ae428ce6dc0996da234ec6ae3ba34cd4a891e15f59486f18a3652b115" + sha256 cellar: :any_skip_relocation, ventura: "6a78a6792a171d0c382e9b0452d7bea97ee9a1c62daf9650d0ec05dd935eb43f" + sha256 cellar: :any_skip_relocation, arm64_linux: "49a297886d8b90eb498b4436c7ef4fde2c72c0f98d1d687a23fa44c0bef9890d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fc9e6b08ffd9ad5ee37b0f26604c9574b616c7923e12bd5abe22dbcb28122f5" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/omekasy --version") + output = shell_output("#{bin}/omekasy -f monospace Hello") + assert_match "𝙷𝚎𝚕𝚕𝚘", output + end +end diff --git a/Formula/o/omnara.rb b/Formula/o/omnara.rb new file mode 100644 index 0000000000000..5cfdea7ea9d99 --- /dev/null +++ b/Formula/o/omnara.rb @@ -0,0 +1,408 @@ +class Omnara < Formula + include Language::Python::Virtualenv + + desc "Talk to Your AI Agents from Anywhere" + homepage "https://omnara.com/" + url "https://files.pythonhosted.org/packages/1e/0b/bcc08499ffa4584899eff34805f5ecb9b444e96a177fc29c61af9e68e89f/omnara-1.6.21.tar.gz" + sha256 "21959b1b905fb64e43a42040127eddec89671097d132df8afe695376a773264f" + license "Apache-2.0" + + no_autobump! because: "contains non-PyPI resources" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "095b9aca76b9e0837a800e78e37448ece1e73d305f4f5947eecddbb5fbb0ed1b" + sha256 cellar: :any, arm64_sequoia: "c8576be7ee091ff800313d03810c9dc6a027f477199d1b25e03d40069c44cde5" + sha256 cellar: :any, arm64_sonoma: "b3fd4495fc224451d93483e7a21ade6fb72273b79e5094c2a7b3a0647fd4a8a0" + sha256 cellar: :any, sonoma: "ebcdc0882a65084967e5c9cfddf346a10c20a6e4cc8c38497baf4419587038bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc29dd4aa17cedaefe246030451cf02d2d0c327359fb176266b0b557b1b4eddc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c435b3a9bfc648f52bba9beb00d7554390f817156b9bc81744acdd5626c3d876" + end + + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "ripgrep" + depends_on "rpds-py" => :no_linkage + + on_linux do + depends_on "openssl@3" + end + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core rpds-py] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "annotated-doc" do + url "https://files.pythonhosted.org/packages/d7/a6/dc46877b911e40c00d395771ea710d5e77b6de7bacd5fdcd78d70cc5a48f/annotated_doc-0.0.3.tar.gz" + sha256 "e18370014c70187422c33e945053ff4c286f453a984eba84d0dbfa0c935adeda" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/cd/3f/1d3bbd0bf23bdd99276d4def22f29c27a914067b4cf66f753ff9b8bbd0f3/authlib-1.6.5.tar.gz" + sha256 "6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b" + end + + resource "beartype" do + url "https://files.pythonhosted.org/packages/a6/09/9003e5662691056e0e8b2e6f57c799e71875fac0be0e785d8cb11557cd2a/beartype-0.22.5.tar.gz" + sha256 "516a9096cc77103c96153474fa35c3ebcd9d36bd2ec8d0e3a43307ced0fa6341" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "claude-code-sdk" do + url "https://files.pythonhosted.org/packages/ec/0d/0f4a71415826578a5ace16817c52df84d76ffbda5cdad02f520a2b963bde/claude_code_sdk-0.0.25.tar.gz" + sha256 "0d9e1eba432d4fe8a2f75f06ec9bb4c310f39b1d55246e7e4b2c69bfdd69eab3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "cyclopts" do + url "https://files.pythonhosted.org/packages/8a/51/a67b17fac2530d22216a335bd10f48631412dd824013ea559ec236668f76/cyclopts-4.2.1.tar.gz" + sha256 "49bb4c35644e7a9658f706ade4cf1a9958834b2dca4425e2fafecf8a0537fac7" + end + + resource "diskcache" do + url "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz" + sha256 "2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "docstring-parser" do + url "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz" + sha256 "583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "email-validator" do + url "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz" + sha256 "9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426" + end + + resource "exceptiongroup" do + url "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz" + sha256 "b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88" + end + + resource "fastapi" do + url "https://files.pythonhosted.org/packages/3f/3a/0bf90d5189d7f62dc2bd0523899629ca59b58ff4290d631cd3bb5c8889d4/fastapi-0.120.4.tar.gz" + sha256 "2d856bc847893ca4d77896d4504ffdec0fb04312b705065fca9104428eca3868" + end + + resource "fastmcp" do + url "https://files.pythonhosted.org/packages/1b/74/584a152bcd174c99ddf3cfdd7e86ec4a6c696fb190a907c2a2ec9056bda2/fastmcp-2.13.0.2.tar.gz" + sha256 "d35386561b6f3cde195ba2b5892dc89b8919a721e6b39b98e7a16f9a7c0b8e8b" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-path" do + url "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz" + sha256 "8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/f8/22/fae38092e6c2995c03232635028510d77e7decff31b4ae79dfa0ba99c635/mcp-1.20.0.tar.gz" + sha256 "9ccc09eaadbfbcbbdab1c9723cfe2e0d1d9e324d7d3ce7e332ef90b09ed35177" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "openapi-pydantic" do + url "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz" + sha256 "ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d" + end + + resource "pathable" do + url "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz" + sha256 "6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2" + end + + resource "pathvalidate" do + url "https://files.pythonhosted.org/packages/fa/2a/52a8da6fe965dea6192eb716b357558e103aea0a1e9a8352ad575a8406ca/pathvalidate-3.3.1.tar.gz" + sha256 "b18c07212bfead624345bb8e1d6141cdcf15a39736994ea0b94035ad2b1ba177" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "py-key-value-aio" do + url "https://files.pythonhosted.org/packages/ca/35/65310a4818acec0f87a46e5565e341c5a96fc062a9a03495ad28828ff4d7/py_key_value_aio-0.2.8.tar.gz" + sha256 "c0cfbb0bd4e962a3fa1a9fa6db9ba9df812899bd9312fa6368aaea7b26008b36" + end + + resource "py-key-value-shared" do + url "https://files.pythonhosted.org/packages/26/79/05a1f9280cfa0709479319cbfd2b1c5beb23d5034624f548c83fb65b0b61/py_key_value_shared-0.2.8.tar.gz" + sha256 "703b4d3c61af124f0d528ba85995c3c8d78f8bd3d2b217377bd3278598070cc1" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-rst" do + url "https://files.pythonhosted.org/packages/bc/6d/a506aaa4a9eaa945ed8ab2b7347859f53593864289853c5d6d62b77246e0/rich_rst-1.3.2.tar.gz" + sha256 "a1196fdddf1e364b02ec68a05e8ff8f6914fee10fbca2e6b6735f166bb0da8d4" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/db/3c/fa6517610dc641262b77cc7bf994ecd17465812c1b0585fe33e11be758ab/sse_starlette-3.0.3.tar.gz" + sha256 "88cfb08747e16200ea990c8ca876b03910a23b547ab3bd764c0d8eb81019b971" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/de/1a/608df0b10b53b0beb96a37854ee05864d182ddd4b1156a22f1ad3860425a/starlette-0.49.3.tar.gz" + sha256 "1c14546f299b5901a1ea0e34410575bc33bbd741377a10484a54445588d00284" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "codex" do + url "https://github.com/omnara-ai/codex/archive/refs/tags/rust-v0.2.1.tar.gz" + sha256 "ef66b4b2237024053c98bc86089fe30d240a3e368926566c7cc17e0c40edf5db" + end + + def install + if OS.linux? + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + end + resource("codex").stage do + system "cargo", "install", *std_cargo_args(path: "codex-rs/cli", root: libexec) + end + virtualenv_install_with_resources without: "codex" + bin.env_script_all_files libexec, OMNARA_CODEX_PATH: libexec/"bin/codex" + end + + test do + assert_match version.to_s, shell_output("#{bin}/omnara --version") + + output = shell_output("#{bin}/omnara --api-key dummy 2>&1", 1) + assert_match "Error: Authentication failed", output + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output("#{bin}/omnara mcp --api-key test 2>&1", json, 0) + assert_match "Starting Omnara MCP server (stdio)", output + end +end diff --git a/Formula/o/omniorb.rb b/Formula/o/omniorb.rb new file mode 100644 index 0000000000000..eb4048ef8a536 --- /dev/null +++ b/Formula/o/omniorb.rb @@ -0,0 +1,73 @@ +class Omniorb < Formula + desc "IOR and naming service utilities for omniORB" + homepage "https://omniorb.sourceforge.io/" + url "https://downloads.sourceforge.net/project/omniorb/omniORB/omniORB-4.3.3/omniORB-4.3.3.tar.bz2" + sha256 "accd25e2cb70c4e33ed227b0d93e9669e38c46019637887c771398870ed45e7a" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url :stable + regex(%r{url=.*?/omniORB[._-]v?(\d+(?:\.\d+)+(?:-\d+)?)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "d3e724bd8c66b8c85adde6ca4551f195147576384d7381e1fb23296a8d03c421" + sha256 cellar: :any, arm64_sequoia: "3de267638de92404fea8f73f7b093ffe1e1f24431c554638e6e452c7ac2adcee" + sha256 cellar: :any, arm64_sonoma: "c1f622c04da99ede9d10731c823c7ba212a701d3e054fae614b16a36202d2849" + sha256 cellar: :any, sonoma: "d2e8bc653769aef5203ef679b70e2b8cf6c571c11f668fe2b429c542d5144166" + sha256 cellar: :any_skip_relocation, arm64_linux: "64c28b492eb0b7d70e9f95f1d63861bc94c2bd202d2a159be67a57b40939a1fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b00950095cce6ed4ab5f7315da5f399e71eb8befa784afcd9e0876fc80f793d9" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "python@3.14" + depends_on "zstd" + + uses_from_macos "zlib" + + resource "bindings" do + url "https://downloads.sourceforge.net/project/omniorb/omniORBpy/omniORBpy-4.3.3/omniORBpy-4.3.3.tar.bz2" + sha256 "385c14e7ccd8463a68a388f4f2be3edcdd3f25a86b839575326bd2dc00078c22" + + livecheck do + formula :parent + end + end + + def install + odie "bindings resource needs to be updated" if version != resource("bindings").version + + # Help old config scripts identify arm64 linux + build_arg = [] + build_arg << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + ENV["PYTHON"] = python3 = which("python3.14") + xy = Language::Python.major_minor_version python3 + inreplace "configure", + /am_cv_python_version=`.*`/, + "am_cv_python_version='#{xy}'" + args = build_arg + ["--with-openssl"] + args << "--enable-cfnetwork" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + resource("bindings").stage do + inreplace "configure", + /am_cv_python_version=`.*`/, + "am_cv_python_version='#{xy}'" + system "./configure", *build_arg, *std_configure_args + ENV.deparallelize # omnipy.cc:392:44: error: use of undeclared identifier 'OMNIORBPY_DIST_DATE' + system "make", "install" + end + end + + test do + system bin/"omniidl", "-h" + system bin/"omniidl", "-bcxx", "-u" + system bin/"omniidl", "-bpython", "-u" + end +end diff --git a/Formula/o/ompl.rb b/Formula/o/ompl.rb new file mode 100644 index 0000000000000..7a3e53867cfde --- /dev/null +++ b/Formula/o/ompl.rb @@ -0,0 +1,143 @@ +class Ompl < Formula + desc "Open Motion Planning Library consists of many motion planning algorithms" + homepage "https://ompl.kavrakilab.org/" + url "https://github.com/ompl/ompl/archive/refs/tags/1.7.0.tar.gz" + sha256 "e2e2700dfb0b4c2d86e216736754dd1b316bd6a46cc8818e1ffcbce4a388aca9" + license "BSD-3-Clause" + revision 2 + head "https://github.com/ompl/ompl.git", branch: "main" + + # We check the first-party download page because the "latest" GitHub release + # isn't a reliable indicator of the latest version on this repository. + livecheck do + url "https://ompl.kavrakilab.org/download.html" + regex(%r{href=.*?/ompl/ompl/archive/v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c7afbc076fa64fd914bb0646a74bbb4d4e64658b01706eeb104ce6405e89246f" + sha256 cellar: :any, arm64_sequoia: "ef06feab9fe4c1a14c8af0c078d9a17b2501a7e0558054497aafd68a96d96bac" + sha256 cellar: :any, arm64_sonoma: "1de782dfb7fe7c4c49b11f3ed12baab6311867beee5ac9f884be7c8ecdbd9c0f" + sha256 cellar: :any, arm64_ventura: "25199cdb32d5a85df20abd180065b720537ea6b8d0d682d4720e298766e24d40" + sha256 cellar: :any, sonoma: "d2caaf1e0adcde01569c423f8f692b37d55a42cbd5546e0d52a716c7de4a427c" + sha256 cellar: :any, ventura: "b2f5b9f2f25a0056a86b1b02e0896c42dfd38eae59adf69145c04d7b658632c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f21390d59d902620a65ccdf2e147d9acd20675522738c4944eb7e0d7495f0dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ccc4b78d4b67b691b831fbdad41064e0bc0ad2d583d9cfb5a11b42acb051f35" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "eigen" + depends_on "flann" + depends_on "ode" + + # Workaround for Boost 1.89.0 until upstream fix. + # Issue ref: https://github.com/ompl/ompl/issues/1305 + patch :DATA + + def install + args = %w[ + -DOMPL_REGISTRATION=OFF + -DOMPL_BUILD_DEMOS=OFF + -DOMPL_BUILD_TESTS=OFF + -DOMPL_BUILD_PYBINDINGS=OFF + -DOMPL_BUILD_PYTESTS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_spot=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Triangle=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main(int argc, char *argv[]) { + ompl::base::RealVectorBounds bounds(3); + bounds.setLow(0); + bounds.setHigh(5); + assert(bounds.getVolume() == 5 * 5 * 5); + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}/ompl-#{version.major_minor}", "-L#{lib}", "-lompl", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5f980f45..88e0f8ca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,7 @@ set_package_properties(Boost PROPERTIES + URL "https://www.boost.org" + PURPOSE "Used throughout OMPL for data serialization, graphs, etc.") + set(Boost_USE_MULTITHREADED ON) +-find_package(Boost 1.68 REQUIRED COMPONENTS serialization filesystem system program_options) ++find_package(Boost 1.68 REQUIRED COMPONENTS serialization filesystem program_options) + + # on macOS we need to check whether to use libc++ or libstdc++ with clang++ + if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") +diff --git a/CMakeModules/OMPLUtils.cmake b/CMakeModules/OMPLUtils.cmake +index ddd6f9af..9a63df7d 100644 +--- a/CMakeModules/OMPLUtils.cmake ++++ b/CMakeModules/OMPLUtils.cmake +@@ -5,7 +5,6 @@ macro(add_ompl_test test_name) + Boost::program_options + Boost::serialization + Boost::filesystem +- Boost::system + Boost::unit_test_framework) + add_test(NAME ${test_name} COMMAND $) + endmacro(add_ompl_test) +diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt +index 3def76bf..d0827a8c 100644 +--- a/demos/CMakeLists.txt ++++ b/demos/CMakeLists.txt +@@ -12,7 +12,6 @@ if (OMPL_BUILD_DEMOS) + ompl::ompl + Eigen3::Eigen + Boost::filesystem +- Boost::system + Boost::program_options) + endmacro(add_ompl_demo) + +diff --git a/omplConfig.cmake.in b/omplConfig.cmake.in +index f1d47855..fd7dea37 100644 +--- a/omplConfig.cmake.in ++++ b/omplConfig.cmake.in +@@ -12,7 +12,7 @@ set_and_check(OMPL_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@) + + include ("${CMAKE_CURRENT_LIST_DIR}/omplExport.cmake" ) + include(CMakeFindDependencyMacro) +-set(_@PROJECT_NAME@_boost_components serialization filesystem system) ++set(_@PROJECT_NAME@_boost_components serialization filesystem) + find_dependency(Boost REQUIRED COMPONENTS ${_@PROJECT_NAME@_boost_components}) + if(Boost_FOUND) + foreach(_comp ${_@PROJECT_NAME@_boost_components}) +@@ -83,7 +83,7 @@ else() + endif() + + # Add dependent libraries +- foreach(_lib @Boost_SERIALIZATION_LIBRARY@;@Boost_FILESYSTEM_LIBRARY@;@Boost_SYSTEM_LIBRARY@;@SPOT_LIBRARIES@) ++ foreach(_lib @Boost_SERIALIZATION_LIBRARY@;@Boost_FILESYSTEM_LIBRARY@;@SPOT_LIBRARIES@) + if(_lib) + list(APPEND OMPL_LIBRARIES "${_lib}") + endif() +diff --git a/src/ompl/CMakeLists.txt b/src/ompl/CMakeLists.txt +index 463930ca..82911ef2 100644 +--- a/src/ompl/CMakeLists.txt ++++ b/src/ompl/CMakeLists.txt +@@ -44,7 +44,6 @@ target_link_libraries(ompl + PUBLIC + Boost::filesystem + Boost::serialization +- Boost::system + Eigen3::Eigen + "$<$:Threads::Threads>" + "$<$:flann::flann>" diff --git a/Formula/o/ondir.rb b/Formula/o/ondir.rb new file mode 100644 index 0000000000000..a7613e46178a5 --- /dev/null +++ b/Formula/o/ondir.rb @@ -0,0 +1,35 @@ +class Ondir < Formula + desc "Automatically execute scripts as you traverse directories" + homepage "https://swapoff.org/ondir.html" + url "https://swapoff.org/files/ondir/ondir-0.2.4.tar.gz" + sha256 "52921cdcf02273e0d47cc6172df6a0d2c56980d724568276acb0591e0bda343a" + license "GPL-2.0-or-later" + head "https://github.com/alecthomas/ondir.git", branch: "master" + + # Homepage doesn't list current versions, `/files/ondir/` isn't checkable + # (403 Forbidden), and the GitHub repository hasn't been updated since 2014 + # (and doesn't tag versions anyway). + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c6f550cf69ebab666d5ec20472e6f8c0989624a985768cf983637269a4689829" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a50815d50ce3b1e89cb6b61c496948a36d189436512178182080e6480a86cbc5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2eb866fd4fdac434823afb1a3a0dea5197f433dc6fb94aea3fb13adec8e615d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cacbe89a3130e52ca8f9ab87a8f4b304c0f6e190dc925fdd4d71c2adffe4ddfa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1e71b07b9b9b4d79d26f3d44e04da4e81e2600ce278706d687ff7050f5355382" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5d3ae1ec47c7ed7ca8d8d9b27cf3c102b5a0f6e0df230a4e9b543039934125fe" + sha256 cellar: :any_skip_relocation, sonoma: "601d8b201d33f6c181827b9660f4dbf945b9d88f9345b13a312657cf69e354a5" + sha256 cellar: :any_skip_relocation, ventura: "1c9633e8cdda40f38255b89a7be9200706bd4f608dbb23eea81f0e3ab54dce2f" + sha256 cellar: :any_skip_relocation, monterey: "4419c021fa7a33eca72284febc81d572987ab5c9ceea8c0ab7e49bcc6177a65b" + sha256 cellar: :any_skip_relocation, big_sur: "839d51e0be171f7cb5a0c61c0c81d5d58676d210080b9d75c047b8f965b40652" + sha256 cellar: :any_skip_relocation, arm64_linux: "215519cba2d769864b180f15810290cee5c09a2f3005db51411fa2795c981625" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af6c1d77f136f3ccab4ef5f6114aab283514d7bf01a893d9948e5017d1d366ea" + end + + def install + system "make" + system "make", "PREFIX=#{prefix}", "install" + end +end diff --git a/Formula/o/one-ml.rb b/Formula/o/one-ml.rb new file mode 100644 index 0000000000000..a258b48dceb88 --- /dev/null +++ b/Formula/o/one-ml.rb @@ -0,0 +1,51 @@ +class OneMl < Formula + desc "Reboot of ML, unifying its core and (now first-class) module layers" + homepage "https://people.mpi-sws.org/~rossberg/1ml/" + url "https://people.mpi-sws.org/~rossberg/1ml/1ml-0.1.zip" + sha256 "64c40c497f48355811fc198a2f515d46c1bb5031957b87f6a297822b07bb9c9a" + license "Apache-2.0" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?1ml[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "860fb358a7e0ec0e442bef49e7b48935e44f016a46a24d45d488f96944d16f7e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "518403a9c2d724be15ba74440476759174fa0f95e7e5e18d799df42dc406d0f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "207e335ea41c537930e2683266f8995d50faa3619d9ae8ed5de3b671aafcbfdb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "64459d8c45af5876e383b215b4e717ae48d897a33c0dd456bf8ba33cb383a4a8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "368f5935a15438e05e77d4293c36e2922b552b890e16819848de0c0d67a63856" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f160c6c8c3c5f2bdaa67f5b6a478718d622defd245d2c2cc292f3bb9eb7c9de1" + sha256 cellar: :any_skip_relocation, sonoma: "27b7971ea9c937351fb074cd81ca3f3434aa1f3816e90a54399fbbd2ffb3484a" + sha256 cellar: :any_skip_relocation, ventura: "ca2bfa6656aa76e091ffa4b6b8cf56701931658911e2d84f010d6b98860ad6b3" + sha256 cellar: :any_skip_relocation, monterey: "e7bfeee525cb93ea0115f8d68e3f2efb1392394bf0811869d1db7f54bc9bd783" + sha256 cellar: :any_skip_relocation, big_sur: "bc39abea38a72c696d33bc62d13f21c2ed32cd45ee8a6ab66f78d2a9b654961e" + sha256 cellar: :any_skip_relocation, catalina: "309111ca64b6c6fa02f1a93dcdc83858d74bc4d7e6a1bcb898443b72e2fa62fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec02fcb0d5d571addf9834569a211f12339d0ac9bfda48b71885214f737d0d10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "924420564fa34eddc5c750e2d12b0cddb9326d7d2001eeeebfd70d6ca32ad63f" + end + + depends_on "ocaml" => :build + + # OCaml 4.06 and later compatibility + patch do + url "https://github.com/rossberg/1ml/commit/f99c0b3497c1f18c950dfb2ae3989573f90eaafd.patch?full_index=1" + sha256 "778c9635f170a29fa6a53358e65fe85f32320eb678683ddd23e0e2c6139e7a6e" + end + + def install + system "make" + bin.install "1ml" + (pkgshare/"stdlib").install Dir.glob("*.1ml") + doc.install "README.txt" + end + + test do + system bin/"1ml", pkgshare/"stdlib/prelude.1ml", pkgshare/"stdlib/paper.1ml" + end +end diff --git a/Formula/o/onednn.rb b/Formula/o/onednn.rb new file mode 100644 index 0000000000000..89ec5b253e76a --- /dev/null +++ b/Formula/o/onednn.rb @@ -0,0 +1,45 @@ +class Onednn < Formula + desc "Basic building blocks for deep learning applications" + homepage "https://www.oneapi.io/open-source/" + url "https://github.com/uxlfoundation/oneDNN/archive/refs/tags/v3.9.2.tar.gz" + sha256 "2a4495e7070a8fcb4366b5a82ff1ca098d8526a6f127ae864aa1ca4bebeae125" + license "Apache-2.0" + head "https://github.com/uxlfoundation/oneDNN.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b9164bd6780e1067db0f57fea3ddee29f01a9223986729babd967e228304a93b" + sha256 cellar: :any, arm64_sequoia: "616cb57e2af4c821ff076bbdb1e6115a69d4fc594b4c3671410e89bedbf399f8" + sha256 cellar: :any, arm64_sonoma: "66975767943e306ec929667420eb7ed7ed958388cd2dbd4f2ea08c1e1b0516ca" + sha256 cellar: :any, sonoma: "39cf691fe025ba1631d7469915583c3fe0c490bb76467d0e5d0debf258112ac6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fc24603a71ea4a613eb3bdd527eef5b298eeb9e41b262c093b3598a4ba3d4b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "258c52c3418f96f52b44b3515b61b1e18b0c39edaf221a2a53b110bffb9c1d45" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + dnnl_engine_t engine; + dnnl_status_t status = dnnl_engine_create(&engine, dnnl_cpu, 0); + return !(status == dnnl_success); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-ldnnl", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/onedpl.rb b/Formula/o/onedpl.rb new file mode 100644 index 0000000000000..c5df324d35c26 --- /dev/null +++ b/Formula/o/onedpl.rb @@ -0,0 +1,48 @@ +class Onedpl < Formula + desc "C++ standard library algorithms with support for execution policies" + homepage "https://github.com/uxlfoundation/oneDPL" + url "https://github.com/uxlfoundation/oneDPL/archive/refs/tags/oneDPL-2022.10.0-release.tar.gz" + sha256 "abf9e0473bd4e5cab167de4f3caf49602c521ab5e13904b3b4089e3231f523bf" + # Apache License Version 2.0 with LLVM exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "8fab4cf3705da2959052f027ad53cf0fa7deb7d443fcf894f5aaf14bb546c9f1" + end + + depends_on "cmake" => :build + depends_on "tbb" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + # `cmake --build build` is for tests + system "cmake", "--install", "build" + end + + test do + tbb = Formula["tbb"] + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() { + std::array arr {{5,2,3,1,4,9,7,0,8,6}}; + dpl::sort(dpl::execution::par_unseq, arr.begin(), arr.end()); + for(int i=0; i<10; i++) + assert(i==arr.at(i)); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-L#{tbb.opt_lib}", "-ltbb", "-I#{tbb.opt_include}", + "-I#{prefix}/stdlib", "-I#{include}", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/onedrive-cli.rb b/Formula/o/onedrive-cli.rb new file mode 100644 index 0000000000000..05cbd27b3c591 --- /dev/null +++ b/Formula/o/onedrive-cli.rb @@ -0,0 +1,44 @@ +class OnedriveCli < Formula + desc "Folder synchronization with OneDrive" + homepage "https://github.com/abraunegg/onedrive" + url "https://github.com/abraunegg/onedrive/archive/refs/tags/v2.5.7.tar.gz" + sha256 "b8526bf8b0ad98967f17634271eef4435ace5c1d116ada7d2e2809b84837be4c" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "a5ed006c9b774411f9210fa338fedc66e3082f66a665cb666db551f00c815b1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16eb51d8aef5551baaf3f2ed37adbb33cffcc97abbfaedda93322bcc2e367ccd" + end + + depends_on "ldc" => :build + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "dbus" + depends_on :linux + depends_on "sqlite" + depends_on "systemd" + + def install + system "./configure", "--with-systemdsystemunitdir=no", *std_configure_args + system "make", "install" + bash_completion.install "contrib/completions/complete.bash" => "onedrive" + zsh_completion.install "contrib/completions/complete.zsh" => "_onedrive" + fish_completion.install "contrib/completions/complete.fish" => "onedrive.fish" + end + + service do + run [opt_bin/"onedrive", "--monitor"] + keep_alive true + error_log_path var/"log/onedrive.log" + log_path var/"log/onedrive.log" + working_dir Dir.home + end + + test do + assert_match <<~EOS, pipe_output("#{bin}/onedrive 2>&1", "") + Using IPv4 and IPv6 (if configured) for all network operations + Attempting to contact Microsoft OneDrive Login Service + Successfully reached Microsoft OneDrive Login Service + EOS + end +end diff --git a/Formula/o/onefetch.rb b/Formula/o/onefetch.rb new file mode 100644 index 0000000000000..c9305bb93361f --- /dev/null +++ b/Formula/o/onefetch.rb @@ -0,0 +1,51 @@ +class Onefetch < Formula + desc "Command-line Git information tool" + homepage "https://onefetch.dev/" + url "https://github.com/o2sh/onefetch/archive/refs/tags/2.25.0.tar.gz" + sha256 "c9ade471eff5f57e5a6506a08293d8e7ebc54c27e99e33c965313a7108562f35" + license "MIT" + head "https://github.com/o2sh/onefetch.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "923e9a33991228cfb21a1621c96a100de10662c864631bb0336f47cbae4b5cef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d0098b059cdc9d3ffd9239e58bd923a1913862831c325233ae8388d7ecceffa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44e27dfa89c6960c1da914cff90904b9c2733f150931c4073c79ccddac8fb955" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a622dad36ec9375f363c3f92510f59d65c99e601b6c76db4aa8b735223b51ada" + sha256 cellar: :any_skip_relocation, sonoma: "99aa5172dcb41f2b0092e8e02734fb45c1e9a682acd91fe7eb860ec4b13341d6" + sha256 cellar: :any_skip_relocation, ventura: "aa3b14a43bf08a8b3ae666fbf83f10ad68aa9804356b67e0357e6ca8afcbf67d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1000fb9a4a1aa96292b8b668a818ef9bde5a5884946cc0452e1e8f4b225e157" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca38ad24e9781d6cd902d7021b0eb30cc0d401fab12cd769fa809019878dc17a" + end + + # `cmake` is used to build `zlib`. + # upstream issue, https://github.com/rust-lang/libz-sys/issues/147 + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "zstd" + + def install + ENV["ZSTD_SYS_USE_PKG_CONFIG"] = "1" + + system "cargo", "install", *std_cargo_args + + man1.install "docs/onefetch.1" + generate_completions_from_executable(bin/"onefetch", "--generate") + end + + test do + system bin/"onefetch", "--help" + assert_match "onefetch " + version.to_s, shell_output("#{bin}/onefetch -V").chomp + + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "BrewTestBot@test.com" + + (testpath/"main.rb").write "puts 'Hello, world'\n" + system "git", "add", "main.rb" + system "git", "commit", "-m", "First commit" + assert_match("Ruby (100.0 %)", shell_output(bin/"onefetch").chomp) + end +end diff --git a/Formula/o/onigmo.rb b/Formula/o/onigmo.rb new file mode 100644 index 0000000000000..2f0bfa9a7b0d4 --- /dev/null +++ b/Formula/o/onigmo.rb @@ -0,0 +1,33 @@ +class Onigmo < Formula + desc "Regular expressions library forked from Oniguruma" + homepage "https://github.com/k-takata/Onigmo" + url "https://github.com/k-takata/Onigmo/releases/download/Onigmo-6.2.0/onigmo-6.2.0.tar.gz" + sha256 "c648496b5339953b925ebf44b8de356feda8d3428fa07dc1db95bfe2570feb76" + license "BSD-2-Clause" + head "https://github.com/k-takata/Onigmo.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6da2a45f04ccd10f3d53a55f8ee740f6e34de3028cfb90034521b8d7d75062c0" + sha256 cellar: :any, arm64_sequoia: "7dfc12c6ac3db48e2927137723a4d9ee1cf0b48d3188b142231b87add252e101" + sha256 cellar: :any, arm64_sonoma: "3e7750a967115b4f15803abf886f850cb8840f42c67749bb4b5c3bb96861273c" + sha256 cellar: :any, arm64_ventura: "982e2aa0d17a1a598740ba22040c8a33c37fc8995b75a0b86c5016975cf2aad6" + sha256 cellar: :any, sonoma: "7fbf4f9e56dd3c2059a690e45bcc65dc822cb0af307a7786daf9c1bb76ff7af0" + sha256 cellar: :any, ventura: "aae7be640b247269995fc92160e4251c47fb3c95302f549e59b8daeebb4074fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "a444a6283b28d04bf90227d5e489c4b5376ff6ac3878f685380dd9c96f879a75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f13dd8f0e389c3210abc32b970ab87259f40b37a057bc10a0cd6b4416f4b8fb" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match(/#{prefix}/, shell_output("#{bin}/onigmo-config --prefix")) + end +end diff --git a/Formula/o/oniguruma.rb b/Formula/o/oniguruma.rb new file mode 100644 index 0000000000000..2a3459c59e035 --- /dev/null +++ b/Formula/o/oniguruma.rb @@ -0,0 +1,38 @@ +class Oniguruma < Formula + desc "Regular expressions library" + homepage "https://github.com/kkos/oniguruma/" + url "https://github.com/kkos/oniguruma/releases/download/v6.9.10/onig-6.9.10.tar.gz" + sha256 "2a5cfc5ae259e4e97f86b68dfffc152cdaffe94e2060b770cb827238d769fc05" + license "BSD-2-Clause" + head "https://github.com/kkos/oniguruma.git", branch: "master" + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "eb6bda3b333f497b5d294388f39fd0902a5c79a52ae16858eff711d2d104cc4d" + sha256 cellar: :any, arm64_sequoia: "7d6ab71fff646664b91e8ff91744696ec775357787dbc1a28e45d52759662e8d" + sha256 cellar: :any, arm64_sonoma: "86beadf2205c134bfc642be07b663476532c10591743461c2c64bc85be51afc8" + sha256 cellar: :any, arm64_ventura: "b0c3bbabe91edecb282b400150f05ba77360b5ea0a5950df70f0ae53b79d3d68" + sha256 cellar: :any, sonoma: "174fa500f45c9421915e22c34f51abc2849cbce2c05b64f013e4949bf2edd7e0" + sha256 cellar: :any, ventura: "38ea1c89b9e4fe235788557ce0eaa3812d5287c66b217fe798a95f436c241918" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9c6066f02e365ccac0ca20cbcb8ca5d586c0ae781977d363bd411594946d944" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49eb885ab9a80ce30edc0aaa5f531fc0079a17e5cf41c2b6c34be0e53e763993" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + assert_match(/#{prefix}/, shell_output("#{bin}/onig-config --prefix")) + end +end diff --git a/Formula/o/onion-location.rb b/Formula/o/onion-location.rb new file mode 100644 index 0000000000000..8df7a3dcffd12 --- /dev/null +++ b/Formula/o/onion-location.rb @@ -0,0 +1,59 @@ +class OnionLocation < Formula + include Language::Python::Virtualenv + + desc "Discover advertised Onion-Location for given URLs" + homepage "https://codeberg.org/Freso/python-onion-location" + url "https://files.pythonhosted.org/packages/72/0d/e2656bdb8c66dc590da40622ca843f0513cd6f4b78bb1f9b6ed4592d283e/onion_location-0.1.0.tar.gz" + sha256 "37dc14eab3a22b8948f8301542344144682108d1564289482827dc45106ee1d5" + license "AGPL-3.0-or-later" + head "https://codeberg.org/Freso/python-onion-location.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e30c605c3b58fd6d586596c755f042551b6c73ad3756498206f1da0267dd8b28" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "98930ac764f9d223cad3aea713d38aefdab7848a26aaea1fc4db231063960247" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b2519d6936887dae46af923a925d34a42968d5922f5f260af7ff65745e9b120c" + sha256 cellar: :any_skip_relocation, sonoma: "c5a13376a090c6e5f3835ffba3c997be23ea81896e6c6bbdd16982f3ae2e89ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c8479e0347b9e497b1f290b336de0e5864a4565ddc362cb5584f29b91bbef6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e4688fffa161fdba44ea6434c2ea5f98651d30bee347f3d9c89150cbe44b17d" + end + + depends_on "python@3.14" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "bs4" do + url "https://files.pythonhosted.org/packages/c9/aa/4acaf814ff901145da37332e05bb510452ebed97bc9602695059dd46ef39/bs4-0.0.2.tar.gz" + sha256 "a48685c58f50fe127722417bae83fe6badf500d54b55f7e39ffe43b798653925" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "http://2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion/index.html", + shell_output("#{bin}/onion-location https://www.torproject.org/") + end +end diff --git a/Formula/o/onioncat.rb b/Formula/o/onioncat.rb new file mode 100644 index 0000000000000..b739d5a823a38 --- /dev/null +++ b/Formula/o/onioncat.rb @@ -0,0 +1,39 @@ +class Onioncat < Formula + desc "VPN-adapter that provides location privacy using Tor or I2P" + homepage "https://github.com/rahra/onioncat" + url "https://github.com/rahra/onioncat/archive/refs/tags/v4.11.0.tar.gz" + sha256 "75ff9eed332e97a9efb7999bbe48867d00e06ac20601cc72b87897d5b1859f99" + license "GPL-3.0-only" + head "https://github.com/rahra/onioncat.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "376be0d8ae8f091f6f6dae5beba524fd5ba07e2606264a73c1b827e187dc3ea2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29b153e2b454faccfb935cf8524b3b37fafb5b17a86ba38377d887ca0bbd86a0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "58d3c104e6597baefa21599dead5423ea1a7be37f40ca84d398c1f39458db474" + sha256 cellar: :any_skip_relocation, arm64_ventura: "313d9bc109a8fdd7f9ceb5995e359e071e6ea822f4f20a550b6c84687e638894" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d8c8dba362799a9d9646efb169e854dc964dd0f76c3837a746f074a436e0f6b9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b7b14ce567dc873d3caae2039c68b510c0311698e5d8cc89e62cd4b46d9f3258" + sha256 cellar: :any_skip_relocation, sonoma: "b3f88f8aa7942ec817d17c5d9f6807f3bdaa98c82bdabb281e865b26100df878" + sha256 cellar: :any_skip_relocation, ventura: "03dbf70b4079c360e0fe10e7909068bf277be34b9780402faf525697b7b7cfb0" + sha256 cellar: :any_skip_relocation, monterey: "3bf2a843df22a579b0965685c779df4165d0db2be9ffeeef32e2769136fd0cb7" + sha256 cellar: :any_skip_relocation, big_sur: "d3be4e31eed45930e85c8043abf03fc34ebc668bc5f9e2d8b09c4dfec8ae6090" + sha256 cellar: :any_skip_relocation, arm64_linux: "33f731f9fc0cb8ede749dd65d70b62581f80f59305a9bef7613ff69e8a2807c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7909dd65c46856bf1ba00a9253d6b51cd4c1b23b2595a57d0018607ca02bd94" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "tor" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"ocat", "-i", "fncuwbiisyh6ak3i.onion" # convert keybase's address to IPv6 address format + end +end diff --git a/Formula/o/onionprobe.rb b/Formula/o/onionprobe.rb new file mode 100644 index 0000000000000..363324c40addd --- /dev/null +++ b/Formula/o/onionprobe.rb @@ -0,0 +1,78 @@ +class Onionprobe < Formula + include Language::Python::Virtualenv + + desc "Test and monitoring tool for Tor Onion Services" + homepage "https://tpo.pages.torproject.net/onion-services/onionprobe/" + url "https://files.pythonhosted.org/packages/30/d0/6441b228ce174481ace50dec6a19ce6298eebdb35d06f40f7b1de66f51c4/onionprobe-1.4.1.tar.gz" + sha256 "45c12c89829e344422974aa9d56cc653d1e20a2f225e73ee18aeb995ca47a2be" + license "GPL-3.0-or-later" + head "https://gitlab.torproject.org/tpo/onion-services/onionprobe.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f3ea9e109aa4bbf497080de0aa06be9bbdfa51f1d8f9899615fc209ae1e7510d" + sha256 cellar: :any, arm64_sequoia: "c6b974e82c41c2c471724cf563b2726f155edf985a988bc8774decd0e66e7269" + sha256 cellar: :any, arm64_sonoma: "c4360492f7dac9f9dc4d89bcaa7cbc91c0eb965ee109c519c5862462601cf076" + sha256 cellar: :any, sonoma: "c801638b581af165da167a33094bafce25740e5f292b6e46334b9afc98d47f95" + sha256 cellar: :any_skip_relocation, arm64_linux: "325eec69098582a8fcbf3cab4f19a402bc18436fb1896487b88550312bfdedb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f5d1eed4571805965763f9b97437aa526b9aa0b4b672f7d0ffa6e708d2339b8" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "tor" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "prometheus-client" do + url "https://files.pythonhosted.org/packages/23/53/3edb5d68ecf6b38fcbcc1ad28391117d2a322d9a1a3eff04bfdb184d8c3b/prometheus_client-0.23.1.tar.gz" + sha256 "6ae8f9081eaaaf153a2e959d2e6c4f4fb57b12ef76c8c7980202f1e57b48b2ce" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "stem" do + url "https://files.pythonhosted.org/packages/94/c6/b2258155546f966744e78b9862f62bd2b8671b422bb9951a1330e4c8fd73/stem-1.8.2.tar.gz" + sha256 "83fb19ffd4c9f82207c006051480389f80af221a7e4783000aedec4e384eb582" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/onionprobe --version") + + output = shell_output("#{bin}/onionprobe -e 2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion 2>&1") + assert_match "Status code is 200", output + end +end diff --git a/Formula/o/onlykey-agent.rb b/Formula/o/onlykey-agent.rb new file mode 100644 index 0000000000000..90b23e4c67989 --- /dev/null +++ b/Formula/o/onlykey-agent.rb @@ -0,0 +1,207 @@ +class OnlykeyAgent < Formula + include Language::Python::Virtualenv + + desc "Middleware that lets you use OnlyKey as a hardware SSH/GPG device" + homepage "https://docs.crp.to/onlykey-agent.html" + url "https://files.pythonhosted.org/packages/68/80/e89b6c3680bedb1e14e99f0539ac805bddc7d8dd87c58805c64484966b7c/onlykey-agent-1.1.15.tar.gz" + sha256 "49b19bec28dc0fb7053ef01266d8a9e7a078bb146214a641bdbb1feac6fc7ddb" + license "LGPL-3.0-only" + revision 7 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e7906f79878de2dc56273033eeb185463cfc07d2ead02e276d69c7bd66389298" + sha256 cellar: :any, arm64_sequoia: "5695610e109d3b8adc292bbe6f4a22c6f84c7de6311e0012701db0dd0577f47a" + sha256 cellar: :any, arm64_sonoma: "7d9cb531924bac278de18fc7d531196b3c835c279a95591abbd8627a74d9428d" + sha256 cellar: :any, sonoma: "be5d5d76beb20617b55959cb8178064456c77737facb9e40090f008e4c5fdb86" + sha256 cellar: :any_skip_relocation, arm64_linux: "116bd86252c4cebd7963969bf68cd1d9b5aea1c3976e819a8a2690357fa70a98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2c0d4631cfaa5459cfc36d19d63fee1faf9f1e8ab6d164e16e1a5f18a8521e2" + end + + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "gnupg" + depends_on "hidapi" + depends_on "libsodium" # for pynacl + depends_on "libusb" => :no_linkage # for pyusb + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "aenum" do + url "https://files.pythonhosted.org/packages/e3/52/6ad8f63ec8da1bf40f96996d25d5b650fdd38f5975f8c813732c47388f18/aenum-3.1.16-py3-none-any.whl" + sha256 "9035092855a98e41b66e3d0998bd7b96280e85ceb3a04cc035636138a1943eaf" + end + + resource "backports-shutil-which" do + url "https://files.pythonhosted.org/packages/a0/22/51b896a4539f1bff6a7ab8514eb031b9f43f12bff23f75a4c3f4e9a666e5/backports.shutil_which-3.5.2.tar.gz" + sha256 "fe39f567cbe4fad89e8ac4dbeb23f87ef80f7fe8e829669d0221ecdb0437c133" + end + + resource "bech32" do + url "https://files.pythonhosted.org/packages/ab/fe/b67ac9b123e25a3c1b8fc3f3c92648804516ab44215adb165284e024c43f/bech32-1.2.0.tar.gz" + sha256 "7d6db8214603bd7871fcfa6c0826ef68b85b0abd90fa21c285a9c5e21d2bd899" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/a7/f6/d762df1f436a0618455d37f4e4c4872a7cd0dcfc8dec3022ee99e4389c69/cython-3.1.4.tar.gz" + sha256 "9aefefe831331e2d66ab31799814eae4d0f8a2d246cbaaaa14d1be29ef777683" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/c0/1f/924e3caae75f471eae4b26bd13b698f6af2c44279f67af317439c2f4c46a/ecdsa-0.19.1.tar.gz" + sha256 "478cba7b62555866fcb3bb3fe985e06decbdb68ef55713c4e5ab98c57d508e61" + end + + resource "fido2" do + url "https://files.pythonhosted.org/packages/74/6e/58e1bb40a284291ab483d00831c5b91fe14d498a3ae7c658f3c588658e4b/fido2-0.9.3.tar.gz" + sha256 "b45e89a6109cfcb7f1bb513776aa2d6408e95c4822f83a253918b944083466ec" + end + + resource "hidapi" do + url "https://files.pythonhosted.org/packages/47/72/21ccaaca6ffb06f544afd16191425025d831c2a6d318635e9c8854070f2d/hidapi-0.14.0.post4.tar.gz" + sha256 "48fce253e526d17b663fbf9989c71c7ef7653ced5f4be65f1437c313fb3dbdf6" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "intelhex" do + url "https://files.pythonhosted.org/packages/66/37/1e7522494557d342a24cb236e2aec5d078fac8ed03ad4b61372586406b01/intelhex-2.3.0.tar.gz" + sha256 "892b7361a719f4945237da8ccf754e9513db32f5628852785aea108dcd250093" + end + + resource "lib-agent" do + url "https://files.pythonhosted.org/packages/96/65/453f7b077b55610ad46a7018027af44d39e3affa56950d67dc1fdbfdc622/lib-agent-1.0.6.tar.gz" + sha256 "22b262cc81c320f1e8e2d55db946adeeedf5cc7a3736df2070c3b2514aa436ed" + end + + resource "lockfile" do + url "https://files.pythonhosted.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz" + sha256 "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799" + end + + resource "mnemonic" do + url "https://files.pythonhosted.org/packages/ff/77/e6232ed59fbd7b90208bb8d4f89ed5aabcf30a524bc2fb8f0dafbe8e7df9/mnemonic-0.21.tar.gz" + sha256 "1fe496356820984f45559b1540c80ff10de448368929b9c60a2b55744cc88acf" + end + + resource "onlykey" do + url "https://files.pythonhosted.org/packages/95/27/5bf7048f6d9de97610b6252b392a6d2d7e929dcd82809b973aebf1727114/onlykey-1.2.10.tar.gz" + sha256 "666427c99c7d625208c4c31d674536cdbf9000d7dcc2bb46ee24752e98339814" + end + + resource "onlykey-solo-python" do + url "https://files.pythonhosted.org/packages/f5/aa/da868b3a695ed2de3ffd71455a8269e031fd478957e888028480f7331c6b/onlykey-solo-python-0.0.32.tar.gz" + sha256 "f3c0ee8605f8142c3320acf0e11a9680cb6345d7f986e5652841c00049a29ee4" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pymsgbox" do + url "https://files.pythonhosted.org/packages/ae/6a/e80da7594ee598a776972d09e2813df2b06b3bc29218f440631dfa7c78a8/pymsgbox-2.0.1.tar.gz" + sha256 "98d055c49a511dcc10fa08c3043e7102d468f5e4b3a83c6d3c61df722c7d798d" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "python-daemon" do + url "https://files.pythonhosted.org/packages/3d/37/4f10e37bdabc058a32989da2daf29e57dc59dbc5395497f3d36d5f5e2694/python_daemon-3.1.2.tar.gz" + sha256 "f7b04335adc473de877f5117e26d5f1142f4c9f7cd765408f0877757be5afbf4" + end + + resource "pyusb" do + url "https://files.pythonhosted.org/packages/00/6b/ce3727395e52b7b76dfcf0c665e37d223b680b9becc60710d4bc08b7b7cb/pyusb-1.3.1.tar.gz" + sha256 "3af070b607467c1c164f49d5b0caabe8ac78dbed9298d703a8dbf9df4052d17e" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + def install + virtualenv_install_with_resources + end + + test do + # the device mut not be plugged in to get the expected message + # since CI is the foremost user of `brew test` we assume that there is no device + output = shell_output("#{bin}/onlykey-agent test@example.com 2>&1", 1) + assert_match("try unplugging and replugging your device", output) + end +end diff --git a/Formula/o/onnx.rb b/Formula/o/onnx.rb new file mode 100644 index 0000000000000..4ba92293cbd84 --- /dev/null +++ b/Formula/o/onnx.rb @@ -0,0 +1,119 @@ +class Onnx < Formula + desc "Open standard for machine learning interoperability" + homepage "https://onnx.ai/" + url "https://github.com/onnx/onnx/archive/refs/tags/v1.17.0.tar.gz" + sha256 "8d5e983c36037003615e5a02d36b18fc286541bf52de1a78f6cf9f32005a820e" + license "Apache-2.0" + revision 9 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2ff2d0d108b9e50c0e9633d386bf7bba5083f45e5ed5f883798c89ba5b0db0e3" + sha256 cellar: :any, arm64_sequoia: "33f7245ea5c307c6ca03766dc84206c6b6633071f58f1cac4560df977b8eaece" + sha256 cellar: :any, arm64_sonoma: "ea3ebf6bae5701b979e782ff07c270b0e301f8f8da4c475c3f98afec9931a636" + sha256 cellar: :any, sonoma: "be95884321c3cc3ef5e54e94f7f14d4b7be12eaf74df6523a7171e36a5f2192e" + sha256 arm64_linux: "e7c71220fa40b171d9d2f1598ce03985e6412caff18cea0851424ff0e2369e29" + sha256 x86_64_linux: "27a426fc293fda91b5e8d1ce3e34de5a179ea78dbd9e34f8b0d20a7dc57d73d3" + end + + depends_on "cmake" => [:build, :test] + depends_on "abseil" + depends_on "protobuf" + + uses_from_macos "python" => :build + + # Apply Fedora's workaround to allow `onnxruntime` to use `onnx` built without + # ONNX_DISABLE_STATIC_REGISTRATION[^1]. We can't use this option as it will + # break functionality for any dependents/users expecting the default behavior. + # + # [^1]: https://github.com/microsoft/onnxruntime/issues/8556#issuecomment-1006091632 + patch do + url "https://src.fedoraproject.org/rpms/onnx/raw/4de8a450afd87b1ba1931f50d841e9c50b63d8a0/f/0004-Add-fixes-for-use-with-onnxruntime.patch" + sha256 "d9ddb735c065fd5dae11ab79371e62bdcca157a6d2a7705cc83ee612abeaaa98" + end + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DONNX_USE_PROTOBUF_SHARED_LIBS=ON + -DPYTHON_EXECUTABLE=#{which("python3")} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # https://github.com/onnx/onnx/blob/main/onnx/test/cpp/ir_test.cc + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + using namespace onnx; + + bool IsValidIdentifier(const std::string& name) { + if (name.empty()) { + return false; + } + if (!isalpha(name[0]) && name[0] != '_') { + return false; + } + for (size_t i = 1; i < name.size(); ++i) { + if (!isalnum(name[i]) && name[i] != '_') { + return false; + } + } + return true; + } + + int main() { + Graph* g = new Graph(); + g->setName("test"); + Value* x = g->addInput(); + x->setUniqueName("x"); + x->setElemType(TensorProto_DataType_FLOAT); + x->setSizes({Dimension("M"), Dimension("N")}); + Node* node1 = g->create(kNeg, 1); + node1->addInput(x); + g->appendNode(node1); + Value* temp1 = node1->outputs()[0]; + Node* node2 = g->create(kNeg, 1); + node2->addInput(temp1); + g->appendNode(node2); + Value* y = node2->outputs()[0]; + g->registerOutput(y); + + ModelProto model; + ExportModelProto(&model, std::shared_ptr(g)); + + for (auto& node : model.graph().node()) { + for (auto& name : node.output()) { + assert(IsValidIdentifier(name)); + } + } + return 0; + } + CPP + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(test LANGUAGES CXX) + find_package(ONNX CONFIG REQUIRED) + add_executable(test test.cpp) + target_link_libraries(test ONNX::onnx) + CMAKE + + ENV.delete "CPATH" + args = ["-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON"] + args << "-DCMAKE_BUILD_RPATH=#{lib};#{HOMEBREW_PREFIX}/lib" if OS.linux? + system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "--build", "build" + system "./build/test" + end +end diff --git a/Formula/o/onnxruntime.rb b/Formula/o/onnxruntime.rb new file mode 100644 index 0000000000000..1b334c7d1ae71 --- /dev/null +++ b/Formula/o/onnxruntime.rb @@ -0,0 +1,197 @@ +class Onnxruntime < Formula + desc "Cross-platform, high performance scoring engine for ML models" + homepage "https://github.com/microsoft/onnxruntime" + url "https://github.com/microsoft/onnxruntime.git", + tag: "v1.22.2", + revision: "5630b081cd25e4eccc7516a652ff956e51676794" + license "MIT" + revision 5 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5abe7f2aa8556a39cec9e0359f8fe7dfe5d41d1c1850bd3f1f9e2b74d8ed13e9" + sha256 cellar: :any, arm64_sequoia: "2620bac591e1a2c418b8d126c8d3f5471a1e7f8706249de0a776b711c7e4442b" + sha256 cellar: :any, arm64_sonoma: "aff3545027a0a0d9622c108cb2d1e975fcfaf860c8424a7a5eba34eea74bca6c" + sha256 cellar: :any, sonoma: "3f847232b766fa8a8f23f43b7c2035cdae8910f0b51277ffa27cb64918981c41" + sha256 cellar: :any_skip_relocation, arm64_linux: "76cc1ebefdfcd2cd8d73343421b181f213d76d5293b5d0ecb4b6c09e10fa9457" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f94661914520744715c1e612d3ea115df67dddb9a63898d2e6b081f685d978b" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "cpp-gsl" => :build + depends_on "flatbuffers" => :build # NOTE: links to static library + depends_on "howard-hinnant-date" => :build + depends_on "nlohmann-json" => :build + depends_on "python@3.14" => :build + depends_on "safeint" => :build + depends_on "abseil" + depends_on "onnx" + depends_on "protobuf" + depends_on "re2" + + # Need newer than stable `eigen` after https://github.com/microsoft/onnxruntime/pull/21492 + # element_wise_ops.cc:708:32: error: no matching member function for call to 'min' + resource "eigen3" do + url "https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.tar.bz2" + version "1d8b82b0740839c0de7f1242a3585e3390ff5f33" + sha256 "37c2385d5b18471d46ac8c971ce9cf6a5a25d30112f5e4a2761a18c968faa202" + + livecheck do + url "https://raw.githubusercontent.com/microsoft/onnxruntime/refs/tags/v#{LATEST_VERSION}/cmake/deps.txt" + regex(%r{^eigen;.*/eigen[._-](\h+)\.zip}i) + end + end + + resource "pytorch_cpuinfo" do + url "https://github.com/pytorch/cpuinfo/archive/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.tar.gz" + version "8a1772a0c5c447df2d18edf33ec4603a8c9c04a6" + sha256 "37bb2fd2d1e87102baea8d131a0c550c4ceff5a12fba61faeb1bff63868155f1" + + livecheck do + url "https://raw.githubusercontent.com/microsoft/onnxruntime/refs/tags/v#{LATEST_VERSION}/cmake/deps.txt" + regex(%r{^pytorch_cpuinfo;.*/(\h+)\.zip}i) + end + end + + # Workaround for Abseil >= 20250814.0 which removed absl::low_level_hash. + # Issue ref: https://github.com/microsoft/onnxruntime/issues/25815 + patch do + url "https://src.fedoraproject.org/rpms/onnxruntime/raw/1e041e70baa51b4661c16ec5446daab332937cb4/f/abseil-cpp-20250814.patch" + sha256 "9b0bf4fda2acf486907005e781f68c56b47c0b05cc2a2cff04c891f2d35b92f9" + end + + # Apply Fedora's workaround[^1] to allow `onnxruntime` to use `onnx` built without + # ONNX_DISABLE_STATIC_REGISTRATION[^2]. We can't use this option as it will + # break functionality for any dependents/users expecting the default behavior. + # The main alternative is to build a bundled copy of `onnx`. + # + # [^1]: https://src.fedoraproject.org/rpms/onnxruntime/blob/rawhide/f/0013-onnx-onnxruntime-fix.patch + # [^2]: https://github.com/microsoft/onnxruntime/issues/8556#issuecomment-1006091632 + patch :DATA + + def install + python3 = which("python3.14") + ENV.runtime_cpu_detection + + resources.each do |r| + (buildpath/"build/_deps/#{r.name}-src").install r + end + + args = %W[ + -DHOMEBREW_ALLOW_FETCHCONTENT=ON + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS + -DPython_EXECUTABLE=#{python3} + -DONNX_CUSTOM_PROTOC_EXECUTABLE=#{Formula["protobuf"].opt_bin}/protoc + -Donnxruntime_BUILD_SHARED_LIB=ON + -Donnxruntime_BUILD_UNIT_TESTS=OFF + -Donnxruntime_GENERATE_TEST_REPORTS=OFF + -Donnxruntime_RUN_ONNX_TESTS=OFF + -Donnxruntime_USE_FULL_PROTOBUF=ON + ] + + # Regenerate C++ bindings to use newer `flatbuffers` + flatc = Formula["flatbuffers"].opt_bin/"flatc" + system python3, "onnxruntime/core/flatbuffers/schema/compile_schema.py", "--flatc", flatc + system python3, "onnxruntime/lora/adapter_format/compile_schema.py", "--flatc", flatc + + system "cmake", "-S", "cmake", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Modified copy of upstream's testcase at + # https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/test/wasm/test_inference.cc + (testpath/"test.cc").write <<~CPP + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. + + #include + #include + #include + + int main(void) { + Ort::Env ort_env; + Ort::Session session{ort_env, "mul_1.onnx", Ort::SessionOptions{nullptr}}; + auto memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeCPU); + + std::array input_data{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array input_shape{3, 2}; + Ort::Value input_tensor = Ort::Value::CreateTensor(memory_info, + input_data.data(), input_data.size(), + input_shape.data(), input_shape.size()); + + std::array output_data{}; + std::array output_shape{3, 2}; + Ort::Value output_tensor = Ort::Value::CreateTensor(memory_info, + output_data.data(), output_data.size(), + output_shape.data(), output_shape.size()); + + const char* input_names[] = {"X"}; + const char* output_names[] = {"Y"}; + + session.Run(Ort::RunOptions{nullptr}, input_names, &input_tensor, 1, output_names, &output_tensor, 1); + + std::array expected_data{1.0f, 4.0f, 9.0f, 16.0f, 25.0f, 36.0f}; + std::vector expected_shape{3, 2}; + + auto type_info = output_tensor.GetTensorTypeAndShapeInfo(); + assert(type_info.GetShape() == expected_shape); + auto total_len = type_info.GetElementCount(); + assert(total_len == expected_data.size()); + + float* result = output_tensor.GetTensorMutableData(); + for (size_t i = 0; i != total_len; ++i) { + assert(expected_data[i] == result[i]); + } + + std::cout << Ort::GetVersionString(); + return 0; + } + CPP + + require "base64" + mul_1_onnx = "CAMSBmNoZW50YTpwChUKAVgKAVcSAVkaBW11bF8xIgNNdWwSCG11bCB0ZXN" \ + "0KiMIAwgCEAEiGAAAgD8AAABAAABAQAAAgEAAAKBAAADAQEIBV1oTCgFYEg" \ + "4KDAgBEggKAggDCgIIAmITCgFZEg4KDAgBEggKAggDCgIIAkIECgAQBw==" + (testpath/"mul_1.onnx").write Base64.decode64(mul_1_onnx) + + system ENV.cxx, "-std=c++17", "-I#{include}", "test.cc", "-L#{lib}", "-lonnxruntime", "-o", "test" + assert_equal version, shell_output("./test 2>&1") + end +end + +__END__ +diff --git a/onnxruntime/core/session/onnxruntime_c_api.cc b/onnxruntime/core/session/onnxruntime_c_api.cc +index b60d97e38f..6951642edb 100644 +--- a/onnxruntime/core/session/onnxruntime_c_api.cc ++++ b/onnxruntime/core/session/onnxruntime_c_api.cc +@@ -45,6 +45,8 @@ + #include "core/session/ort_env.h" + #include "core/session/utils.h" + ++#include "onnx/onnxruntime_fix.h" ++ + #if defined(USE_CUDA) || defined(USE_CUDA_PROVIDER_INTERFACE) + #include "core/providers/cuda/cuda_provider_factory.h" + #include "core/providers/cuda/cuda_execution_provider_info.h" +@@ -3094,6 +3096,13 @@ ORT_API(const char*, OrtApis::GetBuildInfoString) { + } + + const OrtApiBase* ORT_API_CALL OrtGetApiBase(void) NO_EXCEPTION { ++ class RunONNXRuntimeFix { ++ public: ++ RunONNXRuntimeFix() { ++ onnx::ONNXRuntimeFix::disableStaticRegistration(); ++ } ++ }; ++ static RunONNXRuntimeFix runONNXRuntimeFix; + return &ort_api_base; + } + diff --git a/Formula/o/ooniprobe.rb b/Formula/o/ooniprobe.rb new file mode 100644 index 0000000000000..d7e6945112a89 --- /dev/null +++ b/Formula/o/ooniprobe.rb @@ -0,0 +1,69 @@ +class Ooniprobe < Formula + desc "Network interference detection tool" + homepage "https://ooni.org/" + url "https://github.com/ooni/probe-cli/archive/refs/tags/v3.27.0.tar.gz" + sha256 "6f52c75c9d09866265ed0e2a025d9b78daa2e165c6c2ff79d14a8a9ea10df4f7" + license "GPL-3.0-or-later" + head "https://github.com/ooni/probe-cli.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "641cb450eb42b22d54cbf90b6d09c131ab2c51e1b6f961718e9199c4ca063641" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "20fca266bd3ba2e8aaa7e4f1d4cac5247930f4644fb57abf1337a0e3a52852e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0475debc2e040810340a57ff648b5cf887a54f40879edb9fea1a57593d94e8a7" + sha256 cellar: :any_skip_relocation, sonoma: "a3399432333f980d7db14e51d293610f3a839e107dc1d90b3ca2cac3f81e29cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "77ad08b39da3a39a68f741f11513cb7817a87f99f3716097499ac485ecb32dcb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70740b906739c8eb107db725718f3ba1ceed246cf755f6b1502dc2194d6cb192" + end + + depends_on "go" => :build + depends_on "tor" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/ooniprobe" + (var/"ooniprobe").mkpath + end + + test do + assert_match version.to_s, shell_output("#{bin}/ooniprobe version") + + # failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). + return if OS.linux? + + (testpath/"config.json").write <<~JSON + { + "_version": 3, + "_informed_consent": false, + "_is_beta": false, + "auto_update": false, + "sharing": { + "include_ip": false, + "include_asn": true, + "upload_results": false + }, + "nettests": { + "websites_url_limit": 1, + "websites_enabled_category_codes": [] + }, + "advanced": { + "send_crash_reports": false, + "collect_usage_stats": false + } + } + JSON + + mkdir_p "#{testpath}/ooni_home" + ENV["OONI_HOME"] = "#{testpath}/ooni_home" + Open3.popen3(bin/"ooniprobe", "--config", testpath/"config.json", "run", "websites", "--batch") do |_, _, stderr| + stderr.to_a.each do |line| + j_line = JSON.parse(line) + assert_equal j_line["level"], "info" + end + end + end +end diff --git a/Formula/o/opa.rb b/Formula/o/opa.rb new file mode 100644 index 0000000000000..4d212a726d403 --- /dev/null +++ b/Formula/o/opa.rb @@ -0,0 +1,37 @@ +class Opa < Formula + desc "Open source, general-purpose policy engine" + homepage "https://www.openpolicyagent.org" + url "https://github.com/open-policy-agent/opa/archive/refs/tags/v1.10.0.tar.gz" + sha256 "c61567b0e20b2a2aa97e16235974a967d7be707a00adb13e2c85f9785005bb86" + license "Apache-2.0" + head "https://github.com/open-policy-agent/opa.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6314629f86084e82ad5bebd63c1336bb1bb08cfd865a3511be97ebeff64e1892" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d378297259159ba63aa8dc15404b27c22197233a2ab76f34f262d3116324f84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a496abe4c93772e9604f152d5de9c655e5ab01f5cad8c7d96018d2c5513bf5c" + sha256 cellar: :any_skip_relocation, sonoma: "7e5c4f5b02df06c28badef27a825c11745a415055f3af49a5fc8332679797ce3" + sha256 cellar: :any_skip_relocation, arm64_linux: "36fa1dd609d7daea00077f30b5f566eb5f7f9563837d6ef3feb2f1b0a7968b8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e6a4e5ce774c6bb883da8c77914ebd7660c9a2a6ea3fe865412435edd10b288" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/open-policy-agent/opa/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + system "./build/gen-man.sh", "man1" + man.install "man1" + + generate_completions_from_executable(bin/"opa", "completion") + end + + test do + output = shell_output("#{bin}/opa eval -f pretty '[x, 2] = [1, y]' 2>&1") + assert_equal "┌───┬───┐\n│ x │ y │\n├───┼───┤\n│ 1 │ 2 │\n└───┴───┘\n", output + assert_match "Version: #{version}", shell_output("#{bin}/opa version 2>&1") + end +end diff --git a/Formula/o/opal.rb b/Formula/o/opal.rb new file mode 100644 index 0000000000000..722caace018d4 --- /dev/null +++ b/Formula/o/opal.rb @@ -0,0 +1,46 @@ +class Opal < Formula + desc "Ruby to JavaScript transpiler" + homepage "https://opalrb.com/" + url "https://github.com/opal/opal.git", + tag: "v1.8.2", + revision: "090897655fb1c0b9006a068012990375ead28049" + license "MIT" + head "https://github.com/opal/opal.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "ef42487ed8cae694f8d10dc826cfcd68c99f316f408382284b5ec4f176111d09" + sha256 arm64_sequoia: "6c91211a8fdbeffb9335212d4d6f13cf42ba1710b74062e1dfe26a717c9db67c" + sha256 arm64_sonoma: "a4cdd1358d5eb6508bf38cc2a67613a9e487cd250bdf9b35e85dea762894dffa" + sha256 arm64_ventura: "0923489b028e208d184eeb4013e81ba78ab01e9fd76edd2d999f46998c01ccb8" + sha256 arm64_monterey: "faf628998eb0befec1ed127f51959fd57e12e5bd532aa47af4c8d142805fd734" + sha256 sonoma: "0221fb61f196b9cf8d920dab63202bbd88a1cca1c39faeddc90eeb98809a7825" + sha256 ventura: "c6d8ff163ca78c9704f439eb6028c9bfe886a8da9c33c954b4ecc6fb8ce63691" + sha256 monterey: "5509432b1bde3b1c78431961c976f1a791c547620365e73b0be9368b7376b61a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d5d252a73da8ef3044f0378d88d5dfb4d18a500fda114392cc3f6481fff46a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f250a308dd4b1ecfc9bab719bad3a47b2db363af2ca9642a3a81c1b6d9df815d" + end + + depends_on "quickjs" => :test + + uses_from_macos "ruby" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + %w[opal opal-build opal-repl].each do |program| + bin.install libexec/"bin/#{program}" + end + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + (testpath/"test.rb").write "puts 'Hello world!'" + assert_equal "Hello world!", shell_output("#{bin}/opal --runner quickjs test.rb").strip + + system bin/"opal", "--compile", "test.rb", "--output", "test.js" + assert_equal "Hello world!", shell_output("#{Formula["quickjs"].opt_bin}/qjs test.js").strip + end +end diff --git a/Formula/o/opam.rb b/Formula/o/opam.rb new file mode 100644 index 0000000000000..055c64b1822a6 --- /dev/null +++ b/Formula/o/opam.rb @@ -0,0 +1,66 @@ +class Opam < Formula + desc "OCaml package manager" + homepage "https://opam.ocaml.org" + url "https://github.com/ocaml/opam/releases/download/2.4.1/opam-full-2.4.1.tar.gz" + sha256 "c4d053029793c714e4e7340b1157428c0f90783585fb17f35158247a640467d9" + license "LGPL-2.1-only" + revision 1 + head "https://github.com/ocaml/opam.git", branch: "master" + + # Upstream sometimes publishes tarballs with a version suffix (e.g. 2.2.0-2) + # to an existing tag (e.g. 2.2.0), so we match versions from release assets. + livecheck do + url :stable + regex(/^opam-full[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + strategy :github_latest do |json, regex| + json["assets"]&.map do |asset| + match = asset["name"]&.match(regex) + next if match.blank? + + match[1] + end + end + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "363a8906100e191e775f1b199cfcbd455b233a5a8de4ab615621d65c97a516cf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df4e2cce2592afe76caa3c865e42dbebd2822c99c5260e35fe1b64b1656cb754" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "389c2cf95ce32cf161fa1f153be19b3cd39b9fbe8772ad0ef32c06e7c1cfaab7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0ac573a729732ded9d5b5a639e0196492e85c0b9b3557a0a877dd8ed0e5d7e8" + sha256 cellar: :any_skip_relocation, sonoma: "1d9e0142f44bd6417f011c05151188dc108f518f44f7ec232ea6de0a45dddd81" + sha256 cellar: :any_skip_relocation, ventura: "78222428cbf1e079456bce1f45004de794ca637247b634a44562768005e8450e" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbdad97c898c128202b6e69ae2fa891538fc251f25ac26936d8d64e08b311bec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c1137fc30211adcb4f32b57524619adf67c49b85bea082fe31930e83ac2176f" + end + + depends_on "ocaml" => [:build, :test] + depends_on "rsync" # macOS's openrsync won't work (see https://github.com/ocaml/opam/issues/6628) + + uses_from_macos "unzip" + + def install + ENV.deparallelize + + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", "--with-vendored-deps", "--with-mccs" + system "make" + system "make", "install" + + bash_completion.install "src/state/shellscripts/complete.sh" => "opam" + zsh_completion.install "src/state/shellscripts/complete.zsh" => "_opam" + end + + def caveats + <<~EOS + OPAM uses ~/.opam by default for its package database, so you need to + initialize it first by running: + + $ opam init + EOS + end + + test do + system bin/"opam", "init", "--auto-setup", "--compiler=ocaml-system", "--disable-sandboxing" + system bin/"opam", "list" + end +end diff --git a/Formula/o/open-adventure.rb b/Formula/o/open-adventure.rb new file mode 100644 index 0000000000000..1967a8273c7b6 --- /dev/null +++ b/Formula/o/open-adventure.rb @@ -0,0 +1,55 @@ +class OpenAdventure < Formula + include Language::Python::Virtualenv + + desc "Colossal Cave Adventure, the 1995 430-point version" + homepage "http://www.catb.org/~esr/open-adventure/" + url "http://www.catb.org/~esr/open-adventure/advent-1.20.tar.gz" + sha256 "88166db3356da1a11d6c5b9faa0137f046e6eb761333c8d40cb3bcab9fa03e4a" + license "BSD-2-Clause" + head "https://gitlab.com/esr/open-adventure.git", branch: "master" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a5cd8f69998d91913b55151dd6d546ad6ae558913b5691a446313bb7c479abd4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a87d0c7a7e99a6170f9e899c298109ad6443bd4b1fefe8efbbcf68c245c5878" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb42895c9ea5740634c62e6c16f1680cd1f640b0c0a00cab5a6d3be53e92b039" + sha256 cellar: :any_skip_relocation, sonoma: "703624eecbc0d021d1ea47e49738a074fb7f0f973d5b1b013c7532dd8da2ec75" + sha256 cellar: :any_skip_relocation, arm64_linux: "11986ede6b55b722c796c6e80f3eed1ac1fa3d4757b3dbc7a04a1df37f509e08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0aa4f90ca96e69a747ffa5e90d2f8388248c077f0c5f9154322f8df690bf048" + end + + depends_on "asciidoc" => :build + depends_on "libyaml" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + + uses_from_macos "libxml2" => :build + uses_from_macos "libedit" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + venv = virtualenv_create(buildpath, "python3.14") + venv.pip_install resources + system venv.root/"bin/python", "./make_dungeon.py" + system "make" + bin.install "advent" + man6.install "advent.6" + end + + test do + # there's no apparent way to get non-interactive output without providing an invalid option + output = shell_output("#{bin}/advent --invalid-option 2>&1", 1) + assert_match "Usage: #{bin}/advent", output + end +end diff --git a/Formula/o/open-babel.rb b/Formula/o/open-babel.rb new file mode 100644 index 0000000000000..112eb4b1e5463 --- /dev/null +++ b/Formula/o/open-babel.rb @@ -0,0 +1,101 @@ +class OpenBabel < Formula + desc "Chemical toolbox" + homepage "https://github.com/openbabel/openbabel" + license "GPL-2.0-only" + revision 3 + head "https://github.com/openbabel/openbabel.git", branch: "master" + + stable do + url "https://github.com/openbabel/openbabel/releases/download/openbabel-3-1-1/openbabel-3.1.1-source.tar.bz2" + sha256 "a6ec8381d59ea32a4b241c8b1fbd799acb52be94ab64cdbd72506fb4e2270e68" + + # Backport support for configuring PYTHON_INSTDIR to avoid Setuptools + patch do + url "https://github.com/openbabel/openbabel/commit/f7910915c904a18ac1bdc209b2dc9deeb92f7db3.patch?full_index=1" + sha256 "f100bb9bffb82b318624933ddc0027eeee8546bf4d6deda5067ecbd1ebd138ea" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "c47e9e8ea40a2696cec7bd243305ae343b0155fb83ea762de2fd19206d1d0fdd" + sha256 arm64_sequoia: "b27a40c13f6483684ad331885588426d47769ae3e908eddfa85fc9b9fcb5d534" + sha256 arm64_sonoma: "aea63f9ac32d735934c888291feeaed2e0df311d9d9ca245c2a3badae11785bf" + sha256 sonoma: "17283bbbb30e3510464a2317b3de1103b5d7a40a362317cc5ec073ece0991a97" + sha256 cellar: :any_skip_relocation, arm64_linux: "17fdce92285bb7c5701d4c10c24fff72e53a790537a3951ef78776c9a9e85b66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d46e406f2ac959683c827270395e4dea9f2601f00cd7c657e549cdfcd01844b2" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rapidjson" => :build + depends_on "swig" => :build + + depends_on "cairo" + depends_on "eigen" + depends_on "inchi" + depends_on "python@3.14" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def python3 + "python3.14" + end + + conflicts_with "surelog", because: "both install `roundtrip` binaries" + + def install + # Fix to error: ‘clock’ was not declared in this scope on Linux + inreplace "include/openbabel/obutil.h", "#include ", "#include \n\\0" + + args = %W[ + -DINCHI_INCLUDE_DIR=#{Formula["inchi"].opt_include}/inchi + -DOPENBABEL_USE_SYSTEM_INCHI=ON + -DRUN_SWIG=ON + -DPYTHON_BINDINGS=ON + -DPYTHON_EXECUTABLE=#{which(python3)} + -DPYTHON_INSTDIR=#{prefix/Language::Python.site_packages(python3)} + ] + + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + inreplace "CMakeLists.txt", "cmake_policy(SET CMP0042 OLD)", + "cmake_policy(SET CMP0042 NEW)" + + # Workaround to build with eigen 5.0.0 + # Issue ref: https://github.com/openbabel/openbabel/issues/2839 + args += %W[-DEIGEN3_FOUND=ON -DEIGEN3_INCLUDE_DIR=#{Formula["eigen"].opt_include}/eigen3] + inreplace "CMakeLists.txt", "set (CMAKE_CXX_STANDARD 11)", "set (CMAKE_CXX_STANDARD 14)" + rm "cmake/modules/FindEigen3.cmake" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match <<~EOS, shell_output("#{bin}/obabel -:'C1=CC=CC=C1Br' -omol") + + 7 7 0 0 0 0 0 0 0 0999 V2000 + 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 0.0000 0.0000 Br 0 0 0 0 0 0 0 0 0 0 0 0 + 1 6 1 0 0 0 0 + 1 2 2 0 0 0 0 + 2 3 1 0 0 0 0 + 3 4 2 0 0 0 0 + 4 5 1 0 0 0 0 + 5 6 2 0 0 0 0 + 6 7 1 0 0 0 0 + M END + EOS + + system python3, "-c", "from openbabel import openbabel" + end +end diff --git a/Formula/o/open-completion.rb b/Formula/o/open-completion.rb new file mode 100644 index 0000000000000..450b8dae95d38 --- /dev/null +++ b/Formula/o/open-completion.rb @@ -0,0 +1,26 @@ +class OpenCompletion < Formula + desc "Bash completion for open" + homepage "https://github.com/moshen/open-bash-completion" + url "https://github.com/moshen/open-bash-completion/archive/refs/tags/v1.0.5.tar.gz" + sha256 "bee63ee57278de3305b26a581ae23323285a3e2af80ee75d7cfca3f92dfe3721" + license "MIT" + head "https://github.com/moshen/open-bash-completion.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "446d03e5ddceca4179f58fb2378d39f0cc1559f2b876ad53291c59ae1f43d548" + end + + depends_on :macos + + def install + bash_completion.install "open" + end + + test do + assert_match "-F _open", + shell_output("bash -c 'source #{bash_completion}/open && complete -p open'") + end +end diff --git a/Formula/o/open-image-denoise.rb b/Formula/o/open-image-denoise.rb new file mode 100644 index 0000000000000..0a915df70a652 --- /dev/null +++ b/Formula/o/open-image-denoise.rb @@ -0,0 +1,46 @@ +class OpenImageDenoise < Formula + desc "High-performance denoising library for ray tracing" + homepage "https://openimagedenoise.github.io" + url "https://github.com/RenderKit/oidn/releases/download/v2.3.3/oidn-2.3.3.src.tar.gz" + sha256 "ccf221535b4007607fb53d3ff5afa74de25413bb8ef5d03d215f46c7cc2f96cf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "464548e57123e72ca84a442a9cfa62ac55eb73f86f7d7ec08c0654af1f7ed9d3" + sha256 cellar: :any, arm64_sequoia: "fb2f37cd4206daef638b9709675e8f7fff631f1490cb4350399692a466de75ca" + sha256 cellar: :any, arm64_sonoma: "8293f0fd356661e248c12c58b5e4c51f71073a5627da0877ec11510e9b7f1c2d" + sha256 cellar: :any, arm64_ventura: "ea3c2e87a36a569173f86834bd8d8d3eb55eaa306c7616767bb0dd4e930fddf0" + sha256 cellar: :any, sonoma: "99222539372f4f10834f985f8edfba2f1437a642872ef8045bb06e4f3cb25eed" + sha256 cellar: :any, ventura: "35b3558245c2e6631e88bfb6efa5c2fc095775e54507f7c80acf4b995d495bff" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e8d55aeccf7b7b57fc294722c980a7f4dfbc98ea9477bb89a8938408085e6d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a922b413332b0dc8202a4fe78c372e38a3598c95d91333c1d31de22616843f89" + end + + depends_on "cmake" => :build + depends_on "ispc" => :build + depends_on "tbb" + + uses_from_macos "python" => :build + + def install + # Fix arm64 build targeting iOS + inreplace "cmake/oidn_ispc.cmake", 'set(ISPC_TARGET_OS "--target-os=ios")', "" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + OIDNDevice device = oidnNewDevice(OIDN_DEVICE_TYPE_DEFAULT); + oidnCommitDevice(device); + return oidnGetDeviceError(device, 0); + } + C + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lOpenImageDenoise" + system "./a.out" + end +end diff --git a/Formula/o/open-jtalk.rb b/Formula/o/open-jtalk.rb new file mode 100644 index 0000000000000..15dd9aa32d1c4 --- /dev/null +++ b/Formula/o/open-jtalk.rb @@ -0,0 +1,70 @@ +class OpenJtalk < Formula + desc "Japanese text-to-speech system" + homepage "https://open-jtalk.sourceforge.net/" + url "https://downloads.sourceforge.net/project/open-jtalk/Open%20JTalk/open_jtalk-1.11/open_jtalk-1.11.tar.gz" + sha256 "20fdc6aeb6c757866034abc175820573db43e4284707c866fcd02c8ec18de71f" + license all_of: ["BSD-3-Clause", "CC-BY-3.0"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb7361d9bbf78cc39da0b9992981dc8485c7f5ac0f5f3f191f5e0b27c8c1b9ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51df7e0512ffe97b112a49dcb57c51da678a0cce2893cf8e3a9430044aef7d7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "01962b472c100d6d7e9e3b908f31bed428eabf103cdd8c0a64d5611b59bccb58" + sha256 cellar: :any_skip_relocation, arm64_ventura: "481210a86e81dd0e1deee82d4e046025d9b1cb273352b75744404f7bc30c9400" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a6fb63e85e6e7e5b3e6bc4071fe38e9bca7f3f820deb6838a4a6b700529b02c5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c0e84db4a3e1d2a336eb2da7f1060845f35ac1db68be727e524dcbfdb2f785ad" + sha256 cellar: :any_skip_relocation, sonoma: "083c7ea85b750c1479190d22ccd418d55753705653536132294e185c756246fa" + sha256 cellar: :any_skip_relocation, ventura: "54f06b56bf45958a2df00f97459427d4afc13cfc9017936c7f26b0c33635b5ed" + sha256 cellar: :any_skip_relocation, monterey: "6d2bd635abd20f62e50e9d39be4d2b1c50f1bb2a94d87bc2ab396d4f0afba310" + sha256 cellar: :any_skip_relocation, big_sur: "b68172f2ccf166ea5e1b46c1908714386cfb24dcafa374a1ab172faa4844cc9a" + sha256 cellar: :any_skip_relocation, catalina: "0a251febe3197994355ab780ce02aa45264c7d148b0f1b0dfd1a80a7f7aa9937" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb8ac88296db73881f77f3b343ac172562036e06132e06603ca18c8ab66e372d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09fa6df65a5004730ee6d41ca9580ccd58933ddc33c6b3f64f1ba732ce7f3ce8" + end + + resource "hts_engine API" do + url "https://downloads.sourceforge.net/project/hts-engine/hts_engine%20API/hts_engine_API-1.10/hts_engine_API-1.10.tar.gz" + sha256 "e2132be5860d8fb4a460be766454cfd7c3e21cf67b509c48e1804feab14968f7" + end + + resource "voice" do + url "https://downloads.sourceforge.net/project/open-jtalk/HTS%20voice/hts_voice_nitech_jp_atr503_m001-1.05/hts_voice_nitech_jp_atr503_m001-1.05.tar.gz" + sha256 "2e555c88482267b2931c7dbc7ecc0e3df140d6f68fc913aa4822f336c9e0adfc" + end + + resource "mei" do + url "https://downloads.sourceforge.net/project/mmdagent/MMDAgent_Example/MMDAgent_Example-1.8/MMDAgent_Example-1.8.zip" + sha256 "f702f2109a07dca103c7b9a5123a25c6dda038f0d7fcc899ff0281d07e873a63" + end + + def install + resource("hts_engine API").stage do + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + system "./configure", "--with-hts-engine-header-path=#{include}", + "--with-hts-engine-library-path=#{lib}", + "--with-charset=UTF-8", + "--prefix=#{prefix}" + system "make", "install" + + resource("voice").stage do + (prefix/"voice/m100").install Dir["*"] + end + + resource("mei").stage do + (prefix/"voice").install "Voice/mei" + end + end + + test do + (testpath/"sample.txt").write "OpenJTalkのインストールが完了しました。" + system bin/"open_jtalk", + "-x", "#{prefix}/dic", + "-m", "#{prefix}/voice/mei/mei_normal.htsvoice", + "-ow", "out.wav", + "sample.txt" + end +end diff --git a/Formula/o/open-mesh.rb b/Formula/o/open-mesh.rb new file mode 100644 index 0000000000000..95856aebd4478 --- /dev/null +++ b/Formula/o/open-mesh.rb @@ -0,0 +1,89 @@ +class OpenMesh < Formula + desc "Generic data structure to represent and manipulate polygonal meshes" + homepage "https://www.graphics.rwth-aachen.de/software/openmesh/" + url "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-11.0.0.tar.bz2" + sha256 "9d22e65bdd6a125ac2043350a019ec4346ea83922cafdf47e125a03c16f6fa07" + license "BSD-3-Clause" + head "https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/OpenMesh.git", branch: "master" + + livecheck do + url "https://www.graphics.rwth-aachen.de/software/openmesh/download/" + regex(/href=.*?OpenMesh[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ae2697c40c059452bd27e81c7e43c0b3646ec6105b2f0e06cff61195402a0554" + sha256 cellar: :any, arm64_sequoia: "1b1e1f2436c2eef35ba7c5a9ad38c1a95a621faca514d4e82ef1e57d668d0494" + sha256 cellar: :any, arm64_sonoma: "34a5323c42111f78314efc77e19b9b5f595718155a22e480f75d0f559666c581" + sha256 cellar: :any, arm64_ventura: "c3766a3a3366ce1da776285750738811d5b38e752d1d487fcd4fca2f0249dc84" + sha256 cellar: :any, arm64_monterey: "6ffaa80496d44e94d4ae6be0cd21e8ddfa23b5dadf9349284d65af6bebc2e45d" + sha256 cellar: :any, sonoma: "daad3b91c4ca6a713f80298891ca0287bba5118d9b2da41b209e626625b9cf86" + sha256 cellar: :any, ventura: "6c3376d904fd088a04933218be444ade532aa7dce3e956586445115f45efc776" + sha256 cellar: :any, monterey: "f7b5afee5b4b8f473457bcd29919e3dc4c1691ff168a271812a996323d5c4d15" + sha256 cellar: :any_skip_relocation, arm64_linux: "04ad430f4a13a2bf8bf02e1a0a6f3cdaea50b910c7f25138be82d694784ea346" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51111fc385d889eaee7e24daa21f468f830be446aa9fa27a6675220d65340862" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DBUILD_APPS=OFF + -DCMAKE_CXX_STANDARD=14 + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + typedef OpenMesh::PolyMesh_ArrayKernelT<> MyMesh; + int main() + { + MyMesh mesh; + MyMesh::VertexHandle vhandle[4]; + vhandle[0] = mesh.add_vertex(MyMesh::Point(-1, -1, 1)); + vhandle[1] = mesh.add_vertex(MyMesh::Point( 1, -1, 1)); + vhandle[2] = mesh.add_vertex(MyMesh::Point( 1, 1, 1)); + vhandle[3] = mesh.add_vertex(MyMesh::Point(-1, 1, 1)); + std::vector face_vhandles; + face_vhandles.clear(); + face_vhandles.push_back(vhandle[0]); + face_vhandles.push_back(vhandle[1]); + face_vhandles.push_back(vhandle[2]); + face_vhandles.push_back(vhandle[3]); + mesh.add_face(face_vhandles); + try + { + if ( !OpenMesh::IO::write_mesh(mesh, "triangle.off") ) + { + std::cerr << "Cannot write mesh to file 'triangle.off'" << std::endl; + return 1; + } + } + catch( std::exception& x ) + { + std::cerr << x.what() << std::endl; + return 1; + } + return 0; + } + + CPP + flags = %W[ + -I#{include} + -L#{lib} + -lOpenMeshCore + -lOpenMeshTools + -std=c++14 + -Wl,-rpath,#{lib} + ] + system ENV.cxx, "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/o/open-mpi.rb b/Formula/o/open-mpi.rb new file mode 100644 index 0000000000000..a5cd9243cbea1 --- /dev/null +++ b/Formula/o/open-mpi.rb @@ -0,0 +1,165 @@ +class OpenMpi < Formula + desc "High performance message passing library" + homepage "https://www.open-mpi.org/" + url "https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.8.tar.bz2" + sha256 "53131e1a57e7270f645707f8b0b65ba56048f5b5ac3f68faabed3eb0d710e449" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/MPI v?(\d+(?:\.\d+)+) release/i) + end + + bottle do + sha256 arm64_tahoe: "2cbdeda09e63368d8e37e3934348fba1da530eea416e9bfc91e93f0985741569" + sha256 arm64_sequoia: "ffda541a4f3b0f37e853066cdde31ab459834d0ded4f0e03ab4a74a8dafd6485" + sha256 arm64_sonoma: "e54a983c2ec3d1874e77a31415796679f8d98d3f3eb2cd41b1ae463578ec53dd" + sha256 arm64_ventura: "16bc25d567ddbac27e2f16a99ce21ef2e8d54d63faad081e53641bb4db3c112f" + sha256 sonoma: "acbcc6242c6e83f4b6b33a9344b3f679baae17513fb11edf84ab0871ae167583" + sha256 ventura: "416dc2ed96d4d4a7316af6594fdda738f382267e3df4763fad3dd8f0494e9b09" + sha256 arm64_linux: "e6c70ba970934f26f5edb035307b7b038297d4e730e8aa7b22fc10c7ff1fc56b" + sha256 x86_64_linux: "deafa0230ee6bef316836fe9b2a3e73a2298f0c15c10b3356ff45c5390eb1af9" + end + + head do + url "https://github.com/open-mpi/ompi.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gcc" # for gfortran + depends_on "hwloc" + depends_on "libevent" + depends_on "pmix" + + conflicts_with "mpich", because: "both install MPI compiler wrappers" + + def install + ENV.runtime_cpu_detection + + # Otherwise libmpi_usempi_ignore_tkr gets built as a static library + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version if OS.mac? + + # Remove bundled copies of libraries that shouldn't be used + unbundled_packages = %w[hwloc libevent openpmix].join(",") + rm_r Dir["3rd-party/{#{unbundled_packages}}*"] + + # Avoid references to the Homebrew shims directory + inreplace_files = %w[ + ompi/tools/ompi_info/param.c + oshmem/tools/oshmem_info/param.c + ] + cxx = OS.linux? ? "g++" : ENV.cxx + cc = OS.linux? ? "gcc" : ENV.cc + inreplace inreplace_files, "OMPI_CXX_ABSOLUTE", "\"#{cxx}\"" + inreplace inreplace_files, "OPAL_CC_ABSOLUTE", "\"#{cc}\"" + inreplace "3rd-party/prrte/src/tools/prte_info/param.c", "PRTE_CC_ABSOLUTE", "\"#{cc}\"" + + args = %W[ + --disable-silent-rules + --enable-ipv6 + --enable-mca-no-build=reachable-netlink + --sysconfdir=#{etc} + --with-hwloc=#{Formula["hwloc"].opt_prefix} + --with-libevent=#{Formula["libevent"].opt_prefix} + --with-pmix=#{Formula["pmix"].opt_prefix} + --with-sge + ] + + if build.head? + args << "--with-platform-optimized" + system "./autogen.pl", "--force", "--no-3rdparty=#{unbundled_packages}" + end + + system "./configure", *args, *std_configure_args + system "make", "all" + system "make", "check" + system "make", "install" + + # Fortran bindings install stray `.mod` files (Fortran modules) in `lib` + # that need to be moved to `include`. + include.install lib.glob("*.mod") + + # Avoid references to cellar paths. + inreplace (lib/"pkgconfig").glob("*.pc"), prefix, opt_prefix, audit_result: false + + # Avoid conflict with `putty` by renaming pterm to prte-term which matches + # upstream change[^1]. In future release, we may want to split out `prrte` + # to a separate formula and pass `--without-legacy-names`[^2]. + # + # [^1]: https://github.com/openpmix/prrte/issues/1836#issuecomment-2564882033 + # [^2]: https://github.com/openpmix/prrte/blob/master/config/prte_configure_options.m4#L390-L393 + odie "Update configure for PRRTE or split to separate formula as prte-term exists" if (bin/"prte-term").exist? + bin.install bin/"pterm" => "prte-term" + man1.install man1/"pterm.1" => "prte-term.1" + end + + test do + (testpath/"hello.c").write <<~'C' + #include + #include + + int main() + { + int size, rank, nameLen; + char name[MPI_MAX_PROCESSOR_NAME]; + MPI_Init(NULL, NULL); + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Get_processor_name(name, &nameLen); + printf("[%d/%d] Hello, world! My name is %s.\n", rank, size, name); + MPI_Finalize(); + return 0; + } + C + system bin/"mpicc", "hello.c", "-o", "hello" + system "./hello" + system bin/"mpirun", "./hello" + (testpath/"hellof.f90").write <<~FORTRAN + program hello + include 'mpif.h' + integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) + call MPI_INIT(ierror) + call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) + call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) + print*, 'node', rank, ': Hello Fortran world' + call MPI_FINALIZE(ierror) + end + FORTRAN + system bin/"mpifort", "hellof.f90", "-o", "hellof" + system "./hellof" + system bin/"mpirun", "./hellof" + + (testpath/"hellousempi.f90").write <<~FORTRAN + program hello + use mpi + integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) + call MPI_INIT(ierror) + call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) + call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) + print*, 'node', rank, ': Hello Fortran world' + call MPI_FINALIZE(ierror) + end + FORTRAN + system bin/"mpifort", "hellousempi.f90", "-o", "hellousempi" + system "./hellousempi" + system bin/"mpirun", "./hellousempi" + + (testpath/"hellousempif08.f90").write <<~FORTRAN + program hello + use mpi_f08 + integer rank, size, tag, status(MPI_STATUS_SIZE) + call MPI_INIT() + call MPI_COMM_SIZE(MPI_COMM_WORLD, size) + call MPI_COMM_RANK(MPI_COMM_WORLD, rank) + print*, 'node', rank, ': Hello Fortran world' + call MPI_FINALIZE() + end + FORTRAN + system bin/"mpifort", "hellousempif08.f90", "-o", "hellousempif08" + system "./hellousempif08" + system bin/"mpirun", "./hellousempif08" + end +end diff --git a/Formula/o/open-ocd.rb b/Formula/o/open-ocd.rb new file mode 100644 index 0000000000000..feea993b0eb64 --- /dev/null +++ b/Formula/o/open-ocd.rb @@ -0,0 +1,59 @@ +class OpenOcd < Formula + desc "On-chip debugging, in-system programming and boundary-scan testing" + homepage "https://openocd.org/" + url "https://downloads.sourceforge.net/project/openocd/openocd/0.12.0/openocd-0.12.0.tar.bz2" + sha256 "af254788be98861f2bd9103fe6e60a774ec96a8c374744eef9197f6043075afa" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/openocd[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "2f69ce7044f8af47279213325e0e46feae77ec451c1d0277a2619f62f4f3c370" + sha256 arm64_sequoia: "68476caa858a611c3026458d2d00620c5b9eddcdcf63f6d36e06ca89b6734d15" + sha256 arm64_sonoma: "e1a4ef8fa11556dab2833bd52a179e3160a7f077816c7eed9ebe903d19509885" + sha256 arm64_ventura: "2af95c6cc37afdc18ec4fad86060a994e8fb79def599b0f0e2dab8472b4c0f0a" + sha256 arm64_monterey: "29b4d09a5999e066c06aad94032162d13a020aa52a1d64b6b57114cab9ad4d2a" + sha256 arm64_big_sur: "8999e49e8e2c65a70f998e45d1ead00a9621adac26ffe93dfbf9cd712f714e51" + sha256 sonoma: "e757c2d3988325ebc500d2226f2e81f56a7ff73a4e1e435487c0d14f3a5e31a3" + sha256 ventura: "daa9924f73a731d961f1df6f2b7795324253cbfe73bf8e68f6d823d0753268c3" + sha256 monterey: "73a336499271b64f2cab04242346b9c4cd9314d3583a3992d3f6e8df2ac9573f" + sha256 big_sur: "1803ee897c13d4aefbdf87e845e06b5b4f0c2adeb6bfd11c24ed6ef1997af454" + sha256 arm64_linux: "0dd5d6c05b98f949a9fdd11a83de25df223bf8848d3e070c68d4a2b0a8095d9d" + sha256 x86_64_linux: "d912d763421e62bcd0a860b392e48f0d4ceda88c3020394ed054b90ad78f4466" + end + + head do + url "https://github.com/openocd-org/openocd.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "jimtcl" => :build + depends_on "libtool" => :build + depends_on "texinfo" => :build + end + + depends_on "pkgconf" => :build + depends_on "capstone" + depends_on "hidapi" + depends_on "libftdi" + depends_on "libusb" + + def install + ENV["CCACHE"] = "none" + + system "./bootstrap", "nosubmodule" if build.head? + system "./configure", "--enable-buspirate", + "--enable-stlink", + "--enable-dummy", + "--enable-jtag_vpi", + "--enable-remote-bitbang", + *std_configure_args + system "make", "install" + end +end diff --git a/Formula/o/open-scene-graph.rb b/Formula/o/open-scene-graph.rb new file mode 100644 index 0000000000000..f1c62d9ed52a1 --- /dev/null +++ b/Formula/o/open-scene-graph.rb @@ -0,0 +1,107 @@ +class OpenSceneGraph < Formula + desc "3D graphics toolkit" + homepage "https://github.com/openscenegraph/OpenSceneGraph" + license "LGPL-2.1-or-later" => { with: "WxWindows-exception-3.1" } + revision 2 + head "https://github.com/openscenegraph/OpenSceneGraph.git", branch: "master" + + stable do + url "https://github.com/openscenegraph/OpenSceneGraph/archive/refs/tags/OpenSceneGraph-3.6.5.tar.gz" + sha256 "aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12" + + # patch to fix build from source when asio library is present + patch do + url "https://github.com/openscenegraph/OpenSceneGraph/commit/21f5a0adfb57dc4c28b696e93beface45de28194.patch?full_index=1" + sha256 "d1e4e33b50ab006420417c7998d7e0d43d0349e6f407b5eb92a3fc6636523fbf" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "21caca227210b058d46d4817c12baef568b934d7ef6d8db034c3945af8986ae1" + sha256 arm64_sequoia: "6f82524b6c4bc107bc9d1acf481a2743670d2688130fa4ec16b568626773e39e" + sha256 arm64_sonoma: "971d66667cdd6f8a063a541b21d4b0f13318ada4223187ecf77c4c074db944a9" + sha256 arm64_ventura: "a061b2925b3d50c71102706eb8ccb68669df838cd4a716da8a1534003a55bc33" + sha256 arm64_monterey: "cea275ac6fd59178f3d55ef6bf2ffedd5d8aab1431877007cba73d7844dc6091" + sha256 arm64_big_sur: "637623babd3324b945b39a4af706874c3f48420854e7b591e0df2ef0d1c77dc1" + sha256 sonoma: "3264ae2e7b588d9f48ee557fc00d95165f3a2c7c1262630d3fe4c74837e757ca" + sha256 ventura: "3fb06fe37e263b10478e97504eacbd3588dd50a845b3a4f8b280c43798ff67fb" + sha256 monterey: "2f2617969f263e4aa08b51fb64d9a7023c42e2d14e2c075a7a4602ba95a726f3" + sha256 big_sur: "95a78e9f79bdb83a94b9d9be412e4b4520f2467a2f55ea8479b494144175b2cf" + sha256 catalina: "1d38f6730fda72b85bdd25600cd415e747f5ade8645a6f4270d9e87dd275103e" + sha256 arm64_linux: "8dede4a58f246379ccea1fed1d9eb2392b99c3e837f216e8cda9fe25968eccfa" + sha256 x86_64_linux: "43c4367454e8de65443937a3509f96d4d273b50431b0a4fde16607c88183b247" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "graphviz" => :build + depends_on "pkgconf" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "sdl2" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "cairo" + depends_on "giflib" + depends_on "glib" + depends_on "libpng" + depends_on "librsvg" + depends_on "libx11" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on "mesa" + end + + def install + args = %W[ + -DBUILD_DOCUMENTATION=ON + -DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=ON + -DCMAKE_DISABLE_FIND_PACKAGE_GDAL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Jasper=ON + -DCMAKE_DISABLE_FIND_PACKAGE_OpenEXR=ON + -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=ON + -DCMAKE_CXX_FLAGS=-Wno-error=narrowing + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + if OS.mac? + arch = Hardware::CPU.arm? ? "arm64" : "x86_64" + + args += %W[ + -DCMAKE_OSX_ARCHITECTURES=#{arch} + -DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio + -DOSG_WINDOWING_SYSTEM=Cocoa + ] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "doc_openscenegraph" + system "cmake", "--install", "build" + + doc.install Dir["#{prefix}/doc/OpenSceneGraphReferenceDocs/*"] + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + using namespace std; + int main() { + cout << osgGetVersion() << endl; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-losg", "-o", "test" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/o/open-simh.rb b/Formula/o/open-simh.rb new file mode 100644 index 0000000000000..7ca97f34aed7f --- /dev/null +++ b/Formula/o/open-simh.rb @@ -0,0 +1,60 @@ +class OpenSimh < Formula + desc "Multi-system computer simulator" + homepage "https://opensimh.org/" + url "https://github.com/open-simh/simh/archive/refs/tags/v3.12-3.tar.gz" + sha256 "9d0370c79e8910fa1cd2b19d23885bfaa5564df86101c40481dd9b6e64593b18" + license "MIT" + head "https://github.com/open-simh/simh.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(?:-\d+)?)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ce5bc721d70a624ffd4f0a85a667c83f2c86158384785dc29741cfd958aacd44" + sha256 cellar: :any, arm64_sequoia: "848fae7d7b6b38629ba56cee3fe71d9d622ae73a15f6da231fe185ebf7250607" + sha256 cellar: :any, arm64_sonoma: "43567e394094f3435e761a4114a421c0488f5af137ce9b4d8aff87d75b485fa1" + sha256 cellar: :any, arm64_ventura: "ee7d22345190d2009472b2233bb6c974790f5b38331877ec647be5971f403ae6" + sha256 cellar: :any, arm64_monterey: "134f1dff238a06523a66039d07f44493460b8b3cdc22b652cd2a6f5e64180e00" + sha256 cellar: :any, sonoma: "086bbb15c8872e69967c8b5c600ae22a5389fd37e4e3a7fcc54cabae7cbe4cc6" + sha256 cellar: :any, ventura: "28c9c12e56fea289d1d1803752e517f162e4692d76a24f33d7edc09288a02915" + sha256 cellar: :any, monterey: "c68fb8a31e1b55c2a5aa6a907df37ab80ce8672573283adf394906720309a743" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed4ccf5fd723feaf76ffe1d8ee55828a51773f71d9afa67826751ad456a79109" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15e1de5c0c7a5ac581db904d311b660667ea9937cca2745c8b225856b5454208" + end + + depends_on "libpng" + depends_on "pcre" + depends_on "vde" + + uses_from_macos "libedit" + uses_from_macos "libpcap" + uses_from_macos "zlib" + + conflicts_with "nova-fairwinds", because: "both install `nova` binaries" + conflicts_with "sigma-cli", because: "both install `sigma` binaries" + + def install + ENV.append_to_cflags "-Os -fcommon" if OS.linux? + inreplace "makefile" do |s| + s.gsub! "+= /usr/lib/", "+= /usr/lib/ #{HOMEBREW_PREFIX}/lib/" if OS.linux? + s.gsub! "GCC = gcc", "GCC = #{ENV.cc}" + s.gsub! "= -O2", "= #{ENV.cflags}" + end + system "make", "all" + + bin.install Dir["BIN/*"] + doc.install Dir["doc/*"] + Dir["**/*.txt"].each do |f| + (doc/File.dirname(f)).install f + end + (pkgshare/"vax").install Dir["VAX/*.{bin,exe}"] + end + + test do + assert_match(/Goodbye/, pipe_output("#{bin}/altair", "exit\n", 0)) + end +end diff --git a/Formula/o/open-sp.rb b/Formula/o/open-sp.rb new file mode 100644 index 0000000000000..61a7001d447f7 --- /dev/null +++ b/Formula/o/open-sp.rb @@ -0,0 +1,68 @@ +class OpenSp < Formula + desc "SGML parser" + homepage "https://openjade.sourceforge.net/" + url "https://downloads.sourceforge.net/project/openjade/opensp/1.5.2/OpenSP-1.5.2.tar.gz" + sha256 "57f4898498a368918b0d49c826aa434bb5b703d2c3b169beb348016ab25617ce" + license "X11" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_tahoe: "8686abb8d8b1f3054a19a2d57d9c2bc72820d9a5e7b61dcaea2188f103a50026" + sha256 cellar: :any, arm64_sequoia: "06f749f6c70ec8df9f8a171e3528d6d322b3d71cb59002fb4e02804f8b70bcdd" + sha256 cellar: :any, arm64_sonoma: "9e3db2e95f01de344894aad8d34353455085473885a961e3fbef3355cdaaf88f" + sha256 cellar: :any, arm64_ventura: "d6dc97e6caecf3c6090835b984cf03e7981f755e2a4e9bd884b874724fd62a34" + sha256 cellar: :any, arm64_monterey: "803db865811e2af00d1ea784c7bf0ed5d8b837f9bd5afff47bca13a5b97e8955" + sha256 cellar: :any, arm64_big_sur: "032676f1cd5c4bc0c1368cdf08bfe9a8b6df8f2c26ee4367c4a1285ab4fadc3a" + sha256 cellar: :any, sonoma: "c08e40944818db7868c5d8338c3abe08e16dcac1b9f4b34edb054048a9dd4aa3" + sha256 cellar: :any, ventura: "4075ad44cb25e963f435a1f48a9cc910c00d2de4ab2623fe803422910b0ba325" + sha256 cellar: :any, monterey: "5c869b71025c07d7b86088189985d9a22c0f0c9fb719b775fb2388f5a0cbb16f" + sha256 cellar: :any, big_sur: "50109cdb514313693454259ba30f90f550618d48a1cc71df55ed04343d0cf641" + sha256 cellar: :any, catalina: "1b2c18d6cdcd99d387770eaa14a773bb3edec5b22984ac75f3b07a181916f18f" + sha256 cellar: :any_skip_relocation, arm64_linux: "597213ee29de34da7d34d395ea5f6c8fb4681c5512934e3837f17e0d8628f012" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11f6bb56e019bea8f5fb9e2d38e62102230278ddc8fce115755a1cf6a6cbda54" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docbook" => :build + depends_on "ghostscript" => :build + depends_on "libtool" => :build + depends_on "xmlto" => :build + depends_on "gettext" + + # Apply Gentoo patch to fix build error: ISO C++11 does not allow access declarations + patch do + url "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/opensp/files/opensp-1.5.2-c11-using.patch?id=688d9675782dfc162d4e6cff04c668f7516118d0" + sha256 "3ebd2526e0f41a12b9107a09ece834043678d499252c28941eeb2a5676b1ce5e" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + # The included ./configure file is too old to work with Xcode 12 + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", + "--enable-http", + "--enable-default-catalog=#{etc}/sgml/catalog", + *std_configure_args + system "make", "pkgdatadir=#{share}/sgml/opensp", "install" + end + + test do + (testpath/"eg.sgml").write <<~EOS + + + + ]> + + Hello + + EOS + + system bin/"onsgmls", "--warning=type-valid", "eg.sgml" + end +end diff --git a/Formula/o/open-tyrian.rb b/Formula/o/open-tyrian.rb new file mode 100644 index 0000000000000..b0a5218d90c3e --- /dev/null +++ b/Formula/o/open-tyrian.rb @@ -0,0 +1,50 @@ +class OpenTyrian < Formula + desc "Open-source port of Tyrian" + homepage "https://github.com/opentyrian/opentyrian" + url "https://github.com/opentyrian/opentyrian/archive/refs/tags/v2.1.20221123.tar.gz" + sha256 "e0e8a8b0d61de10a3a65789ace9ea8e8c5d8dc67f3e423d2c852d64da38aeeb9" + license "GPL-2.0-or-later" + head "https://github.com/opentyrian/opentyrian.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f6dd404f14a99279b9ea9d9dcc7343e56e2094a329a4424340c361dcb523ca30" + sha256 arm64_sequoia: "7a860fc29e71e5a0fc1b97ca782c57d39eadde156b0d557880e840ac1a588e5f" + sha256 arm64_sonoma: "b35a65491b3b3e18929614588953e7d05c9a59ddc8037c3524a8d69f0da5a7a7" + sha256 arm64_ventura: "97b601296652fbd37fa910ae6ee874ebe3fd0d6a6744f4518b1dbdb77db31544" + sha256 arm64_monterey: "fe7198245df131d6e19dfb50e409b8e22d069d36e9375932525cac283b0cf5f9" + sha256 arm64_big_sur: "bebfff0ef49176f0141b8c9d386609bd3ce2bb0dcbb6e2e2899c3fa1cefa481a" + sha256 sonoma: "d51dc11f8810d928b6c7e352a4e6542a2f7e65994b4bc703feb224f0c5e55fd8" + sha256 ventura: "f431ffcf00b5a2080fdb5918f80f0edd794050d1b2d2a7d3de4f6fbe2e059a13" + sha256 monterey: "dd82b9fb887fb98fc009442c650b35a16c486d20d0b8b1dac74cb43f102d670f" + sha256 big_sur: "16549c5626bed5dd265ee914b75075da381cc81e1883e2a09cf841d1acfaa920" + sha256 catalina: "e23f7e095081f02181e4f7c17f5d2165da83c99691fbdacf12b036e8adb8e803" + sha256 arm64_linux: "9031f900da6fba1bb5702d9c9dee4c128772f8c5012542aa0ed4d0c15fdb4b88" + sha256 x86_64_linux: "20d32afb8db3ce9038cdbc8424c16a081b93e0060ac43f35a3d62bcde0c54fbd" + end + + depends_on "pkgconf" => :build + depends_on "sdl2" + depends_on "sdl2_net" + + resource "homebrew-test-data" do + url "https://camanis.net/tyrian/tyrian21.zip" + sha256 "7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277" + end + + def install + datadir = pkgshare/"data" + datadir.install resource("homebrew-test-data") + system "make", "TYRIAN_DIR=#{datadir}" + bin.install "opentyrian" + end + + def caveats + "Save games will be put in ~/.opentyrian" + end + + test do + system bin/"opentyrian", "--help" + end +end diff --git a/Formula/o/open62541.rb b/Formula/o/open62541.rb new file mode 100644 index 0000000000000..9830419a54ca9 --- /dev/null +++ b/Formula/o/open62541.rb @@ -0,0 +1,51 @@ +class Open62541 < Formula + desc "Open source implementation of OPC UA" + homepage "https://open62541.org/" + url "https://github.com/open62541/open62541/archive/refs/tags/v1.4.14.tar.gz" + sha256 "0a0a8830e4e5f720e901579f826c788fdbc3d49f44a9515ab15a06e877b59416" + license "MPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b4e9c9187e98ed33128c29cbf85036df1794b6794b04ac8506d09513fbec4255" + sha256 cellar: :any, arm64_sequoia: "a59ebcc71453d2a17f6a1bb19df9848d7bc8852f8c261f6cf4a572e2236795e6" + sha256 cellar: :any, arm64_sonoma: "683aee59dfd5fdda3a8ca2b26f0b6c22d1098ec4cff3517b0bfb7a44fdd04b30" + sha256 cellar: :any, sonoma: "fcbdfc7557252cc2b0ef202e34e827ed7fcced7aec5bd7a4f12d94ac6ef74ccc" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d4b7f585a53c3f9a55a943bbc8bfa71425997c0c5c1f4ffc34b8606855a7416" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66267f58eca111516b8c34a375c1510e78ece4173cddbfcb381da3b0feef056a" + end + + depends_on "cmake" => :build + uses_from_macos "python" => :build + + def install + cmake_args = %w[ + -DBUILD_SHARED_LIBS=ON + -DUA_ENABLE_DISCOVERY=ON + -DUA_ENABLE_HISTORIZING=ON + -DUA_ENABLE_JSON_ENCODING=ON + ] + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + UA_Client *client = UA_Client_new(); + assert(client != NULL); + return 0; + } + C + system ENV.cc, "./test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lopen62541" + system "./test" + end +end diff --git a/Formula/o/openai-whisper.rb b/Formula/o/openai-whisper.rb new file mode 100644 index 0000000000000..05985e1a4214a --- /dev/null +++ b/Formula/o/openai-whisper.rb @@ -0,0 +1,119 @@ +class OpenaiWhisper < Formula + include Language::Python::Virtualenv + + desc "General-purpose speech recognition model" + homepage "https://github.com/openai/whisper" + url "https://files.pythonhosted.org/packages/35/8e/d36f8880bcf18ec026a55807d02fe4c7357da9f25aebd92f85178000c0dc/openai_whisper-20250625.tar.gz" + sha256 "37a91a3921809d9f44748ffc73c0a55c9f366c85a3ef5c2ae0cc09540432eb96" + license "MIT" + revision 1 + head "https://github.com/openai/whisper.git", branch: "main" + + no_autobump! because: "`update-python-resources` cannot update resource blocks" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7f2aca24bef213888b85b6a6836ccd0741b654f02a1033f724bcdca45b93ffc2" + sha256 cellar: :any, arm64_sequoia: "65535d05c8598cbd0ee9781228d27abac5f412b41eb47740303dda0cc23406b6" + sha256 cellar: :any, arm64_sonoma: "9eefa0114835eb0beb294045f72a9dcde73589bc9f232a26d79f15cacb2ed009" + sha256 cellar: :any, sonoma: "a022fc299bf43a63cd011699f68fb6739904f7c3f43e3ef05802a394669f85d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce2a701ecdbbd852ae2537ad1a72ebd74789e2b08436eb389b963f0b8d3000d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c7784c62adef0cd329ae435f3d5ad7d680b3d652037fcd3e376b3dd9f6fc579" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build # for tiktoken + depends_on "certifi" + depends_on "ffmpeg" + depends_on "llvm@20" + depends_on "numpy" + depends_on "python@3.14" + depends_on "pytorch" + + pypi_packages exclude_packages: %w[certifi numpy torch] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "llvmlite" do + url "https://files.pythonhosted.org/packages/c1/39/be3a8255c8c40fcab6d54d147ae5bda00104e861b108c541f2b2ecb30c44/llvmlite-0.46.0b1.tar.gz" + sha256 "ea7208f342cc157e600093862ff87ab5d296680d7dfff0a01dc13668ecbc60d0" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "numba" do + url "https://files.pythonhosted.org/packages/8b/ce/efb2667849b0abac22d1499bc855f67b97c3d23bb4f43c1d854ec2a0c716/numba-0.63.0b1.tar.gz" + sha256 "66b7a0052e2cfe8befa273e5af3eae75e102ac9c3da7d2ca361b7b72cf5051c8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "tiktoken" do + url "https://files.pythonhosted.org/packages/7d/ab/4d017d0f76ec3171d469d80fc03dfbb4e48a4bcaddaa831b31d526f05edc/tiktoken-0.12.0.tar.gz" + sha256 "b18ba7ee2b093863978fcb14f74b3707cdc8d4d4d3836853ce7ec60772139931" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + ENV["LLVMLITE_SHARED"] = "1" + venv = virtualenv_install_with_resources without: "numba" + + # We depend on pytorch, but that's a separate formula, so install a `.pth` file to link them. + # NOTE: This is an exception to our usual policy as building `pytorch` is complicated + site_packages = Language::Python.site_packages(venv.root/"bin/python3") + pth_contents = "import site; site.addsitedir('#{Formula["pytorch"].opt_libexec/site_packages}')\n" + (venv.site_packages/"homebrew-pytorch.pth").write pth_contents + + # We install `numba` separately without build isolation to avoid building another `numpy` + venv.pip_install(resource("numba"), build_isolation: false) + end + + test do + resource "homebrew-test-audio" do + url "https://raw.githubusercontent.com/openai/whisper/7858aa9c08d98f75575035ecd6481f462d66ca27/tests/jfk.flac" + sha256 "63a4b1e4c1dc655ac70961ffbf518acd249df237e5a0152faae9a4a836949715" + end + + resource "homebrew-test-model" do + url "https://openaipublic.azureedge.net/main/whisper/models/d3dd57d32accea0b295c96e26691aa14d8822fac7d9d27d5dc00b4ca2826dd03/tiny.en.pt" + sha256 "d3dd57d32accea0b295c96e26691aa14d8822fac7d9d27d5dc00b4ca2826dd03" + end + + testpath.install resource("homebrew-test-audio") + (testpath/"models").install resource("homebrew-test-model") + # for some unknown reason, the file is installed as `tests` rather than `jfk.flac` + system bin/"whisper", "tests", "--model", "tiny.en", "--model_dir", "models", "--output_format", "txt" + assert_equal <<~EOS, (testpath/"tests.txt").read + And so, my fellow Americans ask not what your country can do for you + ask what you can do for your country. + EOS + end +end diff --git a/Formula/o/openal-soft.rb b/Formula/o/openal-soft.rb new file mode 100644 index 0000000000000..ef1efbcd4e82d --- /dev/null +++ b/Formula/o/openal-soft.rb @@ -0,0 +1,63 @@ +class OpenalSoft < Formula + desc "Implementation of the OpenAL 3D audio API" + # cert expired report https://github.com/kcat/openal-soft/issues/1149 + homepage "https://github.com/kcat/openal-soft" + # TODO: Remove distfiles.gentoo.org URL when openal-soft.org SSL is fixed. + # https://github.com/kcat/openal-soft/issues/1176 + url "https://distfiles.gentoo.org/distfiles/08/openal-soft-1.24.3.tar.bz2" + mirror "https://openal-soft.org/openal-releases/openal-soft-1.24.3.tar.bz2" + sha256 "cb5e6197a1c0da0edcf2a81024953cc8fa8545c3b9474e48c852af709d587892" + license "LGPL-2.0-or-later" + head "https://github.com/kcat/openal-soft.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?openal-soft[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "11fe9b015e4afb353bf87231aff595f40c4aa260c386145564ed7eacbfd755d5" + sha256 cellar: :any, arm64_sequoia: "dd26fef51c1884b65ea8fcbed3185d29e3ed93df6f61f1551b8c07c956d293d2" + sha256 cellar: :any, arm64_sonoma: "c669777ed1c01c23d12f3f9d63baa8a17c6bd64f9041d0f3a9f4423e9e1777b7" + sha256 cellar: :any, arm64_ventura: "adda1372155c4d3108305387fdcbb01fbff2d579fdb77e41f941e6ed74bf27f1" + sha256 cellar: :any, sonoma: "8a47616d6f215a0199e0d986833cf2e3e2bbb1481a5c29db50cbd543a7cbbe2e" + sha256 cellar: :any, ventura: "608b94ed45a93779809ae82bda26347504a78a0dfc16383472cbff6d22a9251a" + sha256 cellar: :any_skip_relocation, arm64_linux: "32f3b41687a7a0f2c45a9d5969279798c77abd097a180749075c7db06739fad0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e51027b581006b7ebcbe897a77d471506cf32d85f887546754ee3cb1edb17cc" + end + + keg_only :shadowed_by_macos, "macOS provides OpenAL.framework" + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + def install + # Please don't re-enable example building. See: + # https://github.com/Homebrew/homebrew/issues/38274 + args = %W[ + -DALSOFT_BACKEND_PORTAUDIO=OFF + -DALSOFT_BACKEND_PULSEAUDIO=OFF + -DALSOFT_EXAMPLES=OFF + -DALSOFT_MIDI_FLUIDSYNTH=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "AL/al.h" + #include "AL/alc.h" + int main() { + ALCdevice *device; + device = alcOpenDevice(0); + alcCloseDevice(device); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lopenal" + end +end diff --git a/Formula/o/openapi-diff.rb b/Formula/o/openapi-diff.rb new file mode 100644 index 0000000000000..6ca43104fb3fa --- /dev/null +++ b/Formula/o/openapi-diff.rb @@ -0,0 +1,41 @@ +class OpenapiDiff < Formula + desc "Utility for comparing two OpenAPI specifications" + homepage "https://github.com/OpenAPITools/openapi-diff" + url "https://github.com/OpenAPITools/openapi-diff/archive/refs/tags/2.1.5.tar.gz" + sha256 "52c036780d668c2034567b4f29c798f31cd907929b4bd2c2a79a93b1e7bc4e0c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1cbcf13308e32b39a3e4bdcb92c9b054c2d0e3573289cf161586d08dd2e4b26b" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + + system "mvn", "clean", "install", "-DskipTests" + libexec.install "cli/target/openapi-diff-cli-#{version}-all.jar" => "openapi-diff-cli-all.jar" + bin.write_jar_script libexec/"openapi-diff-cli-all.jar", "openapi-diff" + end + + test do + resource "homebrew-openapi-test1.yaml" do + url "https://raw.githubusercontent.com/Tufin/oasdiff/8fdb99634d0f7f827810ee1ba7b23aa4ada8b124/data/openapi-test1.yaml" + sha256 "f98cd3dc42c7d7a61c1056fa5a1bd3419b776758546cf932b03324c6c1878818" + end + + resource "homebrew-openapi-test5.yaml" do + url "https://raw.githubusercontent.com/Tufin/oasdiff/8fdb99634d0f7f827810ee1ba7b23aa4ada8b124/data/openapi-test5.yaml" + sha256 "07e872b876df5afdc1933c2eca9ee18262aeab941dc5222c0ae58363d9eec567" + end + + testpath.install resource("homebrew-openapi-test1.yaml") + testpath.install resource("homebrew-openapi-test5.yaml") + + output = shell_output("#{bin}/openapi-diff openapi-test1.yaml openapi-test5.yaml") + assert_includes output, "API CHANGE LOG" + assert_includes output, "API changes broke backward compatibility" + end +end diff --git a/Formula/o/openapi-generator.rb b/Formula/o/openapi-generator.rb new file mode 100644 index 0000000000000..60230f96d2096 --- /dev/null +++ b/Formula/o/openapi-generator.rb @@ -0,0 +1,70 @@ +class OpenapiGenerator < Formula + desc "Generate clients, server & docs from an OpenAPI spec (v2, v3)" + homepage "https://openapi-generator.tech/" + url "https://search.maven.org/remotecontent?filepath=org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar" + sha256 "25d6bd8273dd2be99979d544b62ea43f0ce1975f1aa582678b5093d1e7fcfce8" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/openapitools/openapi-generator-cli/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "537abe185b2907ab050a65a9810d3b300b339a0b8b3fc315568858f2c00adbb3" + end + + head do + url "https://github.com/OpenAPITools/openapi-generator.git", branch: "master" + + depends_on "maven" => :build + end + + depends_on "openjdk" + + def install + if build.head? + system "mvn", "clean", "package", "-Dmaven.javadoc.skip=true" + libexec.install "modules/openapi-generator-cli/target/openapi-generator-cli.jar" + else + libexec.install "openapi-generator-cli-#{version}.jar" => "openapi-generator-cli.jar" + end + + bin.write_jar_script libexec/"openapi-generator-cli.jar", "openapi-generator" + end + + test do + # From the OpenAPI Spec website + # https://web.archive.org/web/20230505222426/https://swagger.io/docs/specification/basic-structure/ + (testpath/"minimal.yaml").write <<~YAML + --- + openapi: 3.0.3 + info: + version: 0.0.0 + title: Sample API + servers: + - url: http://api.example.com/v1 + description: Optional server description, e.g. Main (production) server + - url: http://staging-api.example.com + description: Optional server description, e.g. Internal staging server for testing + paths: + /users: + get: + summary: Returns a list of users. + responses: + '200': + description: A JSON array of user names + content: + application/json: + schema: + type: array + items: + type: string + YAML + system bin/"openapi-generator", "generate", "-i", "minimal.yaml", "-g", "openapi", "-o", "./" + # Python is broken for (at least) Java 20 + system bin/"openapi-generator", "generate", "-i", "minimal.yaml", "-g", "python", "-o", "./" + end +end diff --git a/Formula/o/openapi-tui.rb b/Formula/o/openapi-tui.rb new file mode 100644 index 0000000000000..ed5b2aad78cb3 --- /dev/null +++ b/Formula/o/openapi-tui.rb @@ -0,0 +1,49 @@ +class OpenapiTui < Formula + desc "TUI to list, browse and run APIs defined with openapi spec" + homepage "https://github.com/zaghaghi/openapi-tui" + url "https://github.com/zaghaghi/openapi-tui/archive/refs/tags/0.10.2.tar.gz" + sha256 "e9ca7bc160ca6fdf50f7534318589fcb725564c05b81f40742e37a422f35a191" + license "MIT" + head "https://github.com/zaghaghi/openapi-tui.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "729ecb681e443c4997743c99d139df413b01406076440c6911ce1514c678257d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7b112fae0439ef77af1a9e09c8a410f01e8c1252b844bc2f7d6b60ab9d07d75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d599c38c9300b99b49333535053f1b6fc53818c44ee849ff1757a40f58d236d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "63b3e891441decfa79e4b67e540c621bd5612ffba84afa88f39331a51288a571" + sha256 cellar: :any_skip_relocation, sonoma: "d97601e0e2591e9f91575a45b4aafd1df30bb1a8e70c45c33a0bba5dfc991c66" + sha256 cellar: :any_skip_relocation, ventura: "4b3b7fbf36c415d947e3036563cf82f868a041599cb4b9a1f527df18f21a6fee" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef65bdde2ae8c1e3d8ff7732650b2e7191e3521976ceec10438a1e5151f7601c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1dcf51adfd672b44a54ee82e3e9ba21a8f0021252e50ac40eba70a7ce4e8d5c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/openapi-tui --version") + + # Fails in Linux CI with `No such device or address (os error 6)` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + openapi_url = "https://raw.githubusercontent.com/Tufin/oasdiff/8fdb99634d0f7f827810ee1ba7b23aa4ada8b124/data/openapi-test1.yaml" + + begin + output_log = testpath/"output.log" + pid = spawn bin/"openapi-tui", "--input", openapi_url, [:out, :err] => output_log.to_s + sleep 1 + assert_match "APIs", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/o/openapi.rb b/Formula/o/openapi.rb new file mode 100644 index 0000000000000..e35684422595c --- /dev/null +++ b/Formula/o/openapi.rb @@ -0,0 +1,40 @@ +class Openapi < Formula + desc "CLI tools for working with OpenAPI, Arazzo and Overlay specifications" + homepage "https://github.com/speakeasy-api/openapi" + url "https://github.com/speakeasy-api/openapi/archive/refs/tags/v1.11.0.tar.gz" + sha256 "2eed32b7610ce6a61c2acde863b92034838929f8ea91e270655d450ffd768aed" + license "MIT" + head "https://github.com/speakeasy-api/openapi.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "83a3c604a163c19dc6f47dcaea97927b85f208fa844263f3b28437a8b8d927ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83a3c604a163c19dc6f47dcaea97927b85f208fa844263f3b28437a8b8d927ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "83a3c604a163c19dc6f47dcaea97927b85f208fa844263f3b28437a8b8d927ac" + sha256 cellar: :any_skip_relocation, sonoma: "5a9958a75c04009873883fb391fa3a67be803283b414d45651b3eb5882e8ba2d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d806bc4c9bae99c031f1b5439f356d8c0ac29a6eb980ab9df516763c4e721cd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd108566e52abf19b3388fd308153267cdc470e0b5bd9497af3fb3121e46f15a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/openapi" + + generate_completions_from_executable(bin/"openapi", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/openapi --version") + + system bin/"openapi", "spec", "bootstrap", "test-api.yaml" + assert_path_exists testpath/"test-api.yaml" + + system bin/"openapi", "spec", "validate", "test-api.yaml" + end +end diff --git a/Formula/o/openapv.rb b/Formula/o/openapv.rb new file mode 100644 index 0000000000000..41e430c6c6bc2 --- /dev/null +++ b/Formula/o/openapv.rb @@ -0,0 +1,44 @@ +class Openapv < Formula + desc "Open Advanced Professional Video Codec" + homepage "https://github.com/AcademySoftwareFoundation/openapv" + url "https://github.com/AcademySoftwareFoundation/openapv/archive/refs/tags/v0.2.0.4.tar.gz" + sha256 "1d8d31b0758d4b968d9b2ab483b3edb6de3440edcb27f14801ef42d6f2368e55" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "56c6e41825fec4f798910260cefa1b449eefcc11abf0d261a46b74d991d800f1" + sha256 cellar: :any, arm64_sequoia: "2e887283159afe070ce1e246a3dd27dd699284fa33127b0baca6d4fe92d456cd" + sha256 cellar: :any, arm64_sonoma: "9ae8b4bf546d07efac15c7d06dc4bb036ec93cdb727324cdbb6d2bab609f8a05" + sha256 cellar: :any, sonoma: "d3cff51a1604c8afa0e75b19daf7f095abb886facb3e99a4adc857c379c437b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "edc20d196b0b6be866e6995749693c9acbe0b5b5539b3ac4a120608e8420cb56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29d951fa78b8a04e559cbf94c91ade64bec0d4d24234d9357eacdc224f5de162" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DOAPV_APP_STATIC_BUILD=OFF", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test_video" do + url "https://raw.githubusercontent.com/fraunhoferhhi/vvenc/master/test/data/RTn23_80x44p15_f15.yuv" + sha256 "ecd2ef466dd2975f4facc889e0ca128a6bea6645df61493a96d8e7763b6f3ae9" + end + + resource("homebrew-test_video").stage testpath + + system bin/"oapv_app_enc", "-i", "RTn23_80x44p15_f15.yuv", + "--input-csp", "2", "--width", "80", "--height", "44", "--fps", "15", + "-o", "encoded.apv" + assert_path_exists testpath/"encoded.apv" + + system bin/"oapv_app_dec", "-i", "encoded.apv", "-o", "decoded.y4m" + assert_path_exists testpath/"decoded.y4m" + end +end diff --git a/Formula/o/openbao.rb b/Formula/o/openbao.rb new file mode 100644 index 0000000000000..3a0c9c371467d --- /dev/null +++ b/Formula/o/openbao.rb @@ -0,0 +1,57 @@ +class Openbao < Formula + desc "Provides a software solution to manage, store, and distribute sensitive data" + homepage "https://openbao.org/" + url "https://github.com/openbao/openbao.git", + tag: "v2.4.3", + revision: "ef854342df72dba6ecfbdd3f130e251941ba7dca" + license "MPL-2.0" + head "https://github.com/openbao/openbao.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7d503a63eb0fce09c3822530324d927bc74cbb741b7d21099154c976d3324d44" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91466581df649b4e77a96e3665b9ce0cddb82626546603d89a16d07b37fc175b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40a2e198219ca8f07e7a4553d187a0687dc6fcaabfeb743b0ea857967d6b9e29" + sha256 cellar: :any_skip_relocation, sonoma: "ca4e35b5fe484d3ec95616395b15bfc0a40da8211ac638cd4ffe2addc9ca6ea3" + sha256 cellar: :any_skip_relocation, arm64_linux: "609fd5c07f9c5438bb6b9a19e3bbc2269c911569a594f03d0388a3bd52d806bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b30fcf4ee7808fced7d4aa436ec001b9833ce6f3abda677601a803d97935b85" + end + + depends_on "go" => :build + depends_on "node@22" => :build # failed to build with node 23, https://github.com/openbao/openbao/issues/731 + depends_on "yarn" => :build + + conflicts_with "bao", because: "both install `bao` binaries" + + def install + ENV.prepend_path "PATH", Formula["node@22"].opt_libexec/"bin" # for npm + system "make", "bootstrap", "static-dist", "dev-ui" + bin.install "bin/bao" + end + + service do + run [opt_bin/"bao", "server", "-dev"] + keep_alive true + working_dir var + log_path var/"log/openbao.log" + error_log_path var/"log/openbao.log" + end + + test do + addr = "127.0.0.1:#{free_port}" + ENV["VAULT_DEV_LISTEN_ADDRESS"] = addr + ENV["VAULT_ADDR"] = "http://#{addr}" + + pid = spawn bin/"bao", "server", "-dev" + sleep 5 + system bin/"bao", "status" + # Check the ui was properly embedded + assert_match "User-agent", shell_output("curl #{addr}/robots.txt") + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/o/openblas.rb b/Formula/o/openblas.rb new file mode 100644 index 0000000000000..db192eecfed29 --- /dev/null +++ b/Formula/o/openblas.rb @@ -0,0 +1,104 @@ +class Openblas < Formula + desc "Optimized BLAS library" + homepage "https://www.openblas.net/" + url "https://github.com/OpenMathLib/OpenBLAS/archive/refs/tags/v0.3.30.tar.gz" + sha256 "27342cff518646afb4c2b976d809102e368957974c250a25ccc965e53063c95d" + # The main license is BSD-3-Clause. Additionally, + # 1. OpenBLAS is based on GotoBLAS2 so some code is under original BSD-2-Clause-Views + # 2. lapack-netlib/ is a bundled LAPACK so it is BSD-3-Clause-Open-MPI + # 3. interface/{gemmt.c,sbgemmt.c} is BSD-2-Clause + # 4. relapack/ is MIT but license is omitted as it is not enabled + license all_of: ["BSD-3-Clause", "BSD-2-Clause-Views", "BSD-3-Clause-Open-MPI", "BSD-2-Clause"] + head "https://github.com/OpenMathLib/OpenBLAS.git", branch: "develop" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a25af8ac88166d74dcea256b9ee9ffaad0c5ace88941a3e760d32aa3813e778c" + sha256 cellar: :any, arm64_sequoia: "f194baff998d5d4418c0a647f592f14c10f8c26cd1542f64b310ac72844a095a" + sha256 cellar: :any, arm64_sonoma: "46471ce1e3f44f4c765bb6fad1690a9aa69fe9c948379e6f40b9c5e38652c4b9" + sha256 cellar: :any, arm64_ventura: "0b711f2254dc6c5ce89d21cba9f67d89da72b3cfe55bb840f4130dd2bab62fd6" + sha256 cellar: :any, sonoma: "dcef53fdbfa90411375b209ac11ae5b41e6c63f9f139e155d892bb2e4616feb6" + sha256 cellar: :any, ventura: "ebd50b45068b81d33f2269f523ade1e357a230234ef27524a37365de0b657580" + sha256 cellar: :any_skip_relocation, arm64_linux: "60f63379659c38cea3a544c5e85e612ce0a0d02433aeb581fce3e1264f909eef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08c0a5b778704cdfbf09b0db18a87cbfc2ba2a82241d2d999488a771cb308447" + end + + keg_only :shadowed_by_macos, "macOS provides BLAS in Accelerate.framework" + + depends_on "pkgconf" => :test + depends_on "gcc" # for gfortran + fails_with :clang + + def install + ENV.runtime_cpu_detection + ENV.deparallelize # build is parallel by default, but setting -j confuses it + + # The build log has many warnings of macOS build version mismatches. + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? + ENV["DYNAMIC_ARCH"] = "1" + ENV["USE_OPENMP"] = "1" + # Force a large NUM_THREADS to support larger Macs than the VMs that build the bottles + ENV["NUM_THREADS"] = "56" + # See available targets in TargetList.txt + ENV["TARGET"] = case Hardware.oldest_cpu + when :arm_vortex_tempest + "VORTEX" + when :westmere + "NEHALEM" + else + Hardware.oldest_cpu.upcase.to_s + end + + # Apple Silicon does not support SVE + # https://github.com/OpenMathLib/OpenBLAS/issues/4212 + ENV["NO_SVE"] = "1" if Hardware::CPU.arm? + + # Must call in two steps + system "make", "CC=#{ENV.cc}", "FC=gfortran", "libs", "netlib", "shared" + system "make", "PREFIX=#{prefix}", "install" + + lib.install_symlink shared_library("libopenblas") => shared_library("libblas") + lib.install_symlink shared_library("libopenblas") => shared_library("liblapack") + pkgshare.install "cpp_thread_test" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include "cblas.h" + + int main(void) { + int i; + double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; + cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); + for (i = 0; i < 9; i++) + printf("%lf ", C[i]); + printf("\\n"); + if (fabs(C[0]-11) > 1.e-5) abort(); + if (fabs(C[4]-21) > 1.e-5) abort(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lopenblas", "-o", "test" + system "./test" + + cp_r pkgshare/"cpp_thread_test/.", testpath + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" if OS.mac? + flags = shell_output("pkgconf --cflags --libs openblas").chomp.split + %w[dgemm_thread_safety dgemv_thread_safety].each do |test| + inreplace "#{test}.cpp", '"../cblas.h"', '"cblas.h"' + system ENV.cxx, *ENV.cxxflags.to_s.split, "-std=c++11", "#{test}.cpp", "-o", test, *flags + system "./#{test}" + end + end +end diff --git a/Formula/o/openblas64.rb b/Formula/o/openblas64.rb new file mode 100644 index 0000000000000..c66a2b66b8436 --- /dev/null +++ b/Formula/o/openblas64.rb @@ -0,0 +1,108 @@ +class Openblas64 < Formula + desc "Optimized BLAS library" + homepage "https://www.openblas.net/" + url "https://github.com/OpenMathLib/OpenBLAS/archive/refs/tags/v0.3.30.tar.gz" + sha256 "27342cff518646afb4c2b976d809102e368957974c250a25ccc965e53063c95d" + # The main license is BSD-3-Clause. Additionally, + # 1. OpenBLAS is based on GotoBLAS2 so some code is under original BSD-2-Clause-Views + # 2. lapack-netlib/ is a bundled LAPACK so it is BSD-3-Clause-Open-MPI + # 3. interface/{gemmt.c,sbgemmt.c} is BSD-2-Clause + # 4. relapack/ is MIT but license is omitted as it is not enabled + license all_of: ["BSD-3-Clause", "BSD-2-Clause-Views", "BSD-3-Clause-Open-MPI", "BSD-2-Clause"] + head "https://github.com/OpenMathLib/OpenBLAS.git", branch: "develop" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8899867d228f7316c37e782107ecb612f143972f7a2a1341e7db605655fee883" + sha256 cellar: :any, arm64_sequoia: "ea0034f6593d99bdc6ff3aee1a87230e56a68ae2fa6a7aca7035d7b5edf5c222" + sha256 cellar: :any, arm64_sonoma: "9334ed383743828179e954dc50afcb2f23cd969b6205ac70c8edeb88e6a55c20" + sha256 cellar: :any, sonoma: "b3cc1a88e1e76a8e78393ffa503e0589a7a11252722e1d823245f682a136e398" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc783506f2fc87c6ab3990e8b852f488ac342a025ee19028c0cbfec4c72ffe05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "930cf8ef811f2bf037e07a2448db3eb339e039727b36dbc319bd630a3943db63" + end + + keg_only "the headers conflict with `openblas`" + + depends_on "objconv" => :build + depends_on "pkgconf" => :test + depends_on "gcc" # for gfortran + fails_with :clang + + def install + ENV.runtime_cpu_detection + ENV.deparallelize # build is parallel by default, but setting -j confuses it + + # Use 64-bit integers (ILP64 model) + ENV["INTERFACE64"] = "1" + ENV["SYMBOLSUFFIX"] = "64_" + + # The build log has many warnings of macOS build version mismatches. + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? + ENV["DYNAMIC_ARCH"] = "1" + ENV["USE_OPENMP"] = "1" + # Force a large NUM_THREADS to support larger Macs than the VMs that build the bottles + ENV["NUM_THREADS"] = "56" + # See available targets in TargetList.txt + ENV["TARGET"] = case Hardware.oldest_cpu + when :arm_vortex_tempest + "VORTEX" + when :westmere + "NEHALEM" + else + Hardware.oldest_cpu.upcase.to_s + end + + # Apple Silicon does not support SVE + # https://github.com/OpenMathLib/OpenBLAS/issues/4212 + ENV["NO_SVE"] = "1" if Hardware::CPU.arm? + + # Must call in two steps + system "make", "CC=#{ENV.cc}", "FC=gfortran", "libs", "netlib", "shared" + system "make", "PREFIX=#{prefix}", "install" + + lib.install_symlink shared_library("libopenblas64_") => shared_library("libblas64_") + lib.install_symlink shared_library("libopenblas64_") => shared_library("liblapack64_") + pkgshare.install "cpp_thread_test" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include "cblas.h" + + int main(void) { + int i; + double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; + cblas_dgemm64_(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); + for (i = 0; i < 9; i++) + printf("%lf ", C[i]); + printf("\\n"); + if (fabs(C[0]-11) > 1.e-5) abort(); + if (fabs(C[4]-21) > 1.e-5) abort(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lopenblas64_", "-o", "test" + system "./test" + + cp_r pkgshare/"cpp_thread_test/.", testpath + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs openblas64").chomp.split + %w[dgemm_thread_safety dgemv_thread_safety].each do |test| + inreplace "#{test}.cpp", '"../cblas.h"', '"cblas.h"' + # Call the functions suffixed by "64_" + inreplace "#{test}.cpp", /(cblas_dgem[mv])\(CblasColMajor/, "\\164_(CblasColMajor" + system ENV.cxx, *ENV.cxxflags.to_s.split, "-std=c++11", "#{test}.cpp", "-o", test, *flags + system "./#{test}" + end + end +end diff --git a/Formula/o/opencascade.rb b/Formula/o/opencascade.rb new file mode 100644 index 0000000000000..22a7c6d79b358 --- /dev/null +++ b/Formula/o/opencascade.rb @@ -0,0 +1,143 @@ +class Opencascade < Formula + desc "3D modeling and numerical simulation software for CAD/CAM/CAE" + homepage "https://dev.opencascade.org/" + url "https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_9_2.tar.gz" + sha256 "3cd080d3fc33ba0c6c157e110afe3e015859524c4694dbb09812ec9d61595639" + license "LGPL-2.1-only" + + # The first-party download page (https://dev.opencascade.org/release) + # references version 7.5.0 and hasn't been updated for later maintenance + # releases (e.g., 7.6.2, 7.5.2), so we check the Git tags instead. Release + # information is posted at https://dev.opencascade.org/forums/occt-releases + # but the text varies enough that we can't reliably match versions from it. + livecheck do + url "https://git.dev.opencascade.org/repos/occt.git" + regex(/^v?(\d+(?:[._]\d+)+(?:p\d+)?)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "05c90efe2139c4c46c4f53536e554d356765281b824301ca21f62d5264fa1473" + sha256 cellar: :any, arm64_sequoia: "450ba8e8785c1348a3a7254d20847de69a237b39c1dc6bdb50218e1c3e306380" + sha256 cellar: :any, arm64_sonoma: "39160ae92917d9be76d9c79056a8bfdc41b3d129eada5474be5538d98c9db912" + sha256 cellar: :any, sonoma: "90aab756f98430cf0d80a62e9ef3725117900a4784080039c821166d2f621e0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "6855b87069a1f30230b0c2b359b19518e155f2bdfc35be94b7aecb63dac97a11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0a579da97350eb4843ed2a1d77c106ea74329a2b8d4e9e74bbbd150896d2e32" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "rapidjson" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "tbb" + depends_on "tcl-tk@8" # TCL 9 issue: https://tracker.dev.opencascade.org/view.php?id=33725 + + on_linux do + depends_on "libx11" + depends_on "mesa" # For OpenGL + end + + def install + # FreeImage has multiple CVEs and has been dropped by distros like Arch Linux + # Ref: https://archlinux.org/todo/drop-freeimage/ + odie "FreeImage should not be a dependency!" if deps.map(&:name).include?("freeimage") + + tcltk = Formula["tcl-tk@8"] + libtcl = tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major_minor}") + libtk = tcltk.opt_lib/shared_library("libtk#{tcltk.version.major_minor}") + + system "cmake", "-S", ".", "-B", "build", + "-DUSE_FREEIMAGE=OFF", + "-DUSE_RAPIDJSON=ON", + "-DUSE_TBB=ON", + "-DINSTALL_DOC_Overview=ON", + "-DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF", + "-D3RDPARTY_FREETYPE_DIR=#{Formula["freetype"].opt_prefix}", + "-D3RDPARTY_RAPIDJSON_DIR=#{Formula["rapidjson"].opt_prefix}", + "-D3RDPARTY_RAPIDJSON_INCLUDE_DIR=#{Formula["rapidjson"].opt_include}", + "-D3RDPARTY_TBB_DIR=#{Formula["tbb"].opt_prefix}", + "-D3RDPARTY_TCL_DIR:PATH=#{tcltk.opt_prefix}", + "-D3RDPARTY_TK_DIR:PATH=#{tcltk.opt_prefix}", + "-D3RDPARTY_TCL_INCLUDE_DIR:PATH=#{tcltk.opt_include}/tcl-tk", + "-D3RDPARTY_TK_INCLUDE_DIR:PATH=#{tcltk.opt_include}/tcl-tk", + "-D3RDPARTY_TCL_LIBRARY_DIR:PATH=#{tcltk.opt_lib}", + "-D3RDPARTY_TK_LIBRARY_DIR:PATH=#{tcltk.opt_lib}", + "-D3RDPARTY_TCL_LIBRARY:FILEPATH=#{libtcl}", + "-D3RDPARTY_TK_LIBRARY:FILEPATH=#{libtk}", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # The soname / install name of libtbb and libtbbmalloc are versioned only + # by the minor version (e.g., `libtbb.so.12`), but Open CASCADE's CMake + # config files reference the fully-versioned filenames (e.g., + # `libtbb.so.12.11`). + # This mandates rebuilding opencascade upon tbb's minor version updates. + # To avoid this, we change the fully-versioned references to the minor-only + # version. For example: + # libtbb.so.12.11 => libtbb.so.12 + # libtbbmalloc.so.2.11 => libtbbmalloc.so.2 + # libtbb.12.11.dylib => libtbb.12.dylib + # libtbbmalloc.2.11.dylib => libtbbmalloc.2.dylib + # See also: + # https://github.com/Homebrew/homebrew-core/issues/129111 + # https://dev.opencascade.org/content/cmake-files-macos-link-non-existent-libtbb128dylib + tbb_regex = / + libtbb + (malloc)? # 1 + (\.so)? # 2 + \.(\d+) # 3 + \.(\d+) # 4 + (\.dylib)? # 5 + /x + inreplace (lib/"cmake/opencascade").glob("*.cmake") do |s| + s.gsub! tbb_regex, 'libtbb\1\2.\3\5', audit_result: false + end + + bin.env_script_all_files(libexec, CASROOT: prefix) + + # Some apps expect resources in legacy ${CASROOT}/src directory + prefix.install_symlink pkgshare/"resources" => "src" + end + + test do + output = shell_output("#{bin}/DRAWEXE -b -c \"pload ALL\"") + + # Discard the first line ("DRAW is running in batch mode"), and check that the second line is "1" + assert_equal "1", output.split("\n", 2)[1].chomp + + # Make sure hardcoded library name references in our CMake config files are valid. + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + set(CMAKE_CXX_STANDARD 11) + project(test LANGUAGES CXX) + find_package(OpenCASCADE REQUIRED) + add_executable(test main.cpp) + target_include_directories(test SYSTEM PRIVATE "${OpenCASCADE_INCLUDE_DIR}") + target_link_libraries(test PRIVATE TKernel) + CMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main() { + Quantity_Color c; + std::cout << "OCCT Version: " << OCC_VERSION_COMPLETE << std::endl; + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + ENV.append_path "LD_LIBRARY_PATH", lib if OS.linux? + assert_equal "OCCT Version: #{version}", shell_output("./build/test").chomp + end +end diff --git a/Formula/o/opencbm.rb b/Formula/o/opencbm.rb new file mode 100644 index 0000000000000..ac4fc338649c3 --- /dev/null +++ b/Formula/o/opencbm.rb @@ -0,0 +1,56 @@ +class Opencbm < Formula + desc "Provides access to various floppy drive formats" + homepage "https://spiro.trikaliotis.net/opencbm" + url "https://github.com/OpenCBM/OpenCBM/archive/refs/tags/v0.4.99.104.tar.gz" + sha256 "5499cd1143b4a246d6d7e93b94efbdf31fda0269d939d227ee5bcc0406b5056a" + license "GPL-2.0-only" + head "https://github.com/OpenCBM/OpenCBM.git", branch: "master" + + livecheck do + url :homepage + regex(/]*?>VERSION v?(\d+(?:\.\d+)+)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "d5e8f6b89063a3de0040990afe6bd3a5e135bf0ed37bf05f51af658af12a58f5" + sha256 arm64_sequoia: "529ae3225eaf83d45e82682ed1e4a209f92e6998c1c646e24532f9e711a8eea1" + sha256 arm64_sonoma: "fe90bccc22f2363fad79f49fa1cc5e844d2bc3c83627a9b7460bc5a07b64877d" + sha256 arm64_ventura: "d278718401caa82cefb764cad68a547d8e09a2a28622ff012472a0dbaeebbb21" + sha256 sonoma: "c3c96a4d11cf6d06933aca2bf0ad4cdbc5d4cd7af512fdc7552bba26ec8e4bdd" + sha256 ventura: "90c901874fffef22c717c75d8958109f5b82849c6c1ae5ceac0d2c31bd5595a2" + sha256 arm64_linux: "267913de51b9eb95fc170c08943564b0106b90baf067099b415e64c588357c74" + sha256 x86_64_linux: "d7258949de49e4b268d2d236217f42982663a39430d534f32fc1dc7b60d2d043" + end + + # cc65 is only used to build binary blobs included with the programs; it's + # not necessary in its own right. + depends_on "cc65" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + uses_from_macos "ncurses" + + def install + # This one definitely breaks with parallel build. + ENV.deparallelize + + args = %W[ + -fLINUX/Makefile + PREFIX=#{prefix} + MANDIR=#{man1} + ETCDIR=#{etc} + UDEVRULESDIR=#{lib}/udev/rules.d + LDCONFIG= + ] + + system "make", *args + system "make", "install-all", *args + end + + test do + system bin/"cbmctrl", "--help" + end +end diff --git a/Formula/o/opencc.rb b/Formula/o/opencc.rb new file mode 100644 index 0000000000000..160941bf9e2f2 --- /dev/null +++ b/Formula/o/opencc.rb @@ -0,0 +1,44 @@ +class Opencc < Formula + desc "Simplified-traditional Chinese conversion tool" + homepage "https://github.com/BYVoid/OpenCC" + url "https://github.com/BYVoid/OpenCC/archive/refs/tags/ver.1.1.9.tar.gz" + sha256 "ad4bcd8d87219a240a236d4a55c9decd2132a9436697d2882ead85c8939b0a99" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "f626f8c96d7400b2836598e82243b070c9b3cbaf6e2aaa259bec3bf7d0adf1e4" + sha256 arm64_sequoia: "8b6b0e9d88ffeecb82287510d3416101529d017851b0b537f9e6b541673bed66" + sha256 arm64_sonoma: "6f5005829e63d7db587d1018470b02707ce5e47a1f253543877f7285f5a0b3eb" + sha256 arm64_ventura: "2563f2f90b6080cee6831a5873833064f03f34fad8af3c127f16ffe08a4d4376" + sha256 sonoma: "c04a149eacdc804adb89854db53fae7634aa4af832537dbe5ed9d032760f7fee" + sha256 ventura: "8a29fb0a0fe27a67c687f7ce0577fd9b8e7d4dc0574dc45af0d8f1ad4be2db95" + sha256 arm64_linux: "495cf421bfc4bdd7e449cb75e9e04648f86a29734e4ae38597c27a2e626956dd" + sha256 x86_64_linux: "9b7d0f7d8b7113014476146573c883666708cceba92f389a1cb9e0c3225c6337" + end + + depends_on "cmake" => :build + depends_on "marisa" + uses_from_macos "python" => :build + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DPYTHON_EXECUTABLE=#{which("python3")} + -DUSE_SYSTEM_MARISA=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + input = "中国鼠标软件打印机" + output = pipe_output(bin/"opencc", input) + output = output.force_encoding("UTF-8") if output.respond_to?(:force_encoding) + assert_match "中國鼠標軟件打印機", output + end +end diff --git a/Formula/o/opencl-clhpp-headers.rb b/Formula/o/opencl-clhpp-headers.rb new file mode 100644 index 0000000000000..9a79d8a9190a5 --- /dev/null +++ b/Formula/o/opencl-clhpp-headers.rb @@ -0,0 +1,33 @@ +class OpenclClhppHeaders < Formula + desc "C++ language header files for the OpenCL API" + homepage "https://www.khronos.org/registry/OpenCL/" + url "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2025.07.22.tar.gz" + sha256 "c1031afde6e9eb042e6fcfbc17078f4b437a7e8d55482a1ca6e0fa762d262a89" + license "Apache-2.0" + head "https://github.com/KhronosGroup/OpenCL-CLHPP.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "241fd874a801633618d6afe60986da9baadaa3edf7ef870a3548b68187282970" + end + + keg_only :shadowed_by_macos, "macOS provides OpenCL.framework" + + depends_on "cmake" => :build + depends_on "opencl-headers" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_DOCS=OFF", + "-DBUILD_EXAMPLES=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-c", "-I#{include}", "-I#{Formula["opencl-headers"].include}" + end +end diff --git a/Formula/o/opencl-headers.rb b/Formula/o/opencl-headers.rb new file mode 100644 index 0000000000000..6979f15c95075 --- /dev/null +++ b/Formula/o/opencl-headers.rb @@ -0,0 +1,41 @@ +class OpenclHeaders < Formula + desc "C language header files for the OpenCL API" + homepage "https://www.khronos.org/registry/OpenCL/" + url "https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v2025.07.22.tar.gz" + sha256 "98f0a3ea26b4aec051e533cb1750db2998ab8e82eda97269ed6efe66ec94a240" + license "Apache-2.0" + head "https://github.com/KhronosGroup/OpenCL-Headers.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5ad1a11035085dfb898950f5cf253247c71bc4baa748befda760fc66d093a79f" + end + + keg_only :shadowed_by_macos, "macOS provides OpenCL.framework" + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Build an `:all` bottle by adding symlinks same as macOS + include.install_symlink "CL" => "OpenCL" if OS.linux? + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + printf("opencl.h standalone test PASSED."); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}" + assert_equal "opencl.h standalone test PASSED.", shell_output("./test") + end +end diff --git a/Formula/o/opencl-icd-loader.rb b/Formula/o/opencl-icd-loader.rb new file mode 100644 index 0000000000000..bc9cfc113db15 --- /dev/null +++ b/Formula/o/opencl-icd-loader.rb @@ -0,0 +1,58 @@ +class OpenclIcdLoader < Formula + desc "OpenCL Installable Client Driver (ICD) Loader" + homepage "https://www.khronos.org/registry/OpenCL/" + url "https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2025.07.22.tar.gz" + sha256 "dff7a0b11ad5b63a669358e3476e3dc889a4a361674e5b69b267b944d0794142" + license "Apache-2.0" + head "https://github.com/KhronosGroup/OpenCL-ICD-Loader.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e0d457a1acf0efbcc69f119d0cebad5a3cb5c073690e94349c3bfdcfde5f6c77" + sha256 cellar: :any, arm64_sequoia: "bf65ff7f27a7877c993902277e68ff4b88e5e49a15fbd9ceb310352dc16a5793" + sha256 cellar: :any, arm64_sonoma: "5d863bc7eb594b7a84db8a789772d4e28fa55564c07ec34b8b2ed9e8f0936149" + sha256 cellar: :any, arm64_ventura: "3d8ba3a3c64ce7cb9f0c9a3185f8a432cd8e8bd08fb57ab8b5446f7f85db9e9a" + sha256 cellar: :any, sonoma: "3b29127cbd3ad9bfd0c59cea68ba772ce5c1c4e323b5d566d5249a1528b869b9" + sha256 cellar: :any, ventura: "fd9899b082534a219d434469052716a6a9f016b9a9fdc15a355b8e5ee2ee075a" + sha256 cellar: :any_skip_relocation, arm64_linux: "74bad9df1b4a44f9f0675fabf03d7af9225993f5c3144f4104db82cace1d42cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eaff23dec7418eeb114b986687c61f1e00aa3262d1a9d0843d06dbfe900fa4d0" + end + + keg_only :shadowed_by_macos, "macOS provides OpenCL.framework" + + depends_on "cmake" => :build + depends_on "opencl-headers" => [:build, :test] + + conflicts_with "ocl-icd", because: "both install `lib/libOpenCL.so` library" + + def install + inreplace "loader/icd_platform.h", "\"/etc/", "\"#{etc}/" + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "test/loader_test" + (pkgshare/"loader_test").install "test/inc/platform", "test/log/icd_test_log.c" + end + + def caveats + s = "The default vendors directory is #{etc}/OpenCL/vendors\n" + on_linux do + s += <<~EOS + No OpenCL implementation is pre-installed, so all dependents will require either + installing a compatible formula or creating an ".icd" file mapping to an externally + installed implementation. Any ".icd" files copied or symlinked into + `#{etc}/OpenCL/vendors` will automatically be detected by `opencl-icd-loader`. + A portable OpenCL implementation is available via the `pocl` formula. + EOS + end + s + end + + test do + cp_r (pkgshare/"loader_test").children, testpath + system ENV.cc, *testpath.glob("*.c"), "-o", "icd_loader_test", + "-DCL_TARGET_OPENCL_VERSION=300", + "-I#{Formula["opencl-headers"].opt_include}", "-I#{testpath}", + "-L#{lib}", "-lOpenCL" + assert_match "ERROR: App log and stub log differ.", shell_output("#{testpath}/icd_loader_test", 1) + end +end diff --git a/Formula/o/opencoarrays.rb b/Formula/o/opencoarrays.rb new file mode 100644 index 0000000000000..146aa70c46545 --- /dev/null +++ b/Formula/o/opencoarrays.rb @@ -0,0 +1,79 @@ +class Opencoarrays < Formula + desc "Open-source coarray Fortran ABI, API, and compiler wrapper" + homepage "http://www.opencoarrays.org" + url "https://github.com/sourceryinstitute/OpenCoarrays/releases/download/2.10.2/OpenCoarrays-2.10.2.tar.gz" + sha256 "e13f0dc54b966b0113deed7f407514d131990982ad0fe4dea6b986911d26890c" + license "BSD-3-Clause" + revision 5 + head "https://github.com/sourceryinstitute/opencoarrays.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e5eb18fc59c6f475e11f404cfc5f6d05e856bce5e6513e5573001a644f9e2d74" + sha256 cellar: :any, arm64_sequoia: "4e5f645394d698c3f4b52fd2c57db55a78bf28de6b07c40df999681e96eb7620" + sha256 cellar: :any, arm64_sonoma: "e643b4c38c1d09c076eb61ebe972256b0cbc83b59f0386007c00188aea83145d" + sha256 cellar: :any, sonoma: "aab8992088d17d826340b910a5710062d3835b5df3c1d2e944245b4695940054" + sha256 cellar: :any_skip_relocation, arm64_linux: "06a03424802a7638edee660947add4dbe87e6bce8146047d7d7935f571e450d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a695a2cb428c5a6a651f5752ccfbd95f0fe60871107a4f449380192804874290" + end + + depends_on "cmake" => :build + depends_on "gcc@14" + depends_on "open-mpi" + + def install + # Version 2.10.2 and older are incompatible with GFortran 15. + # Version 2.10.3 is incompatible with Open MPI when using GFortran 15. + # We don't support MPICH dependency as a single MPI is needed across formulae + # + # Ref: https://github.com/sourceryinstitute/OpenCoarrays/issues/793 + # Ref: https://github.com/open-mpi/ompi/issues/13385 + ENV["FC"] = which("gfortran-14") + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + # Run test in CI to check if issues mixing direct gcc@14 with indirect gcc in open-mpi. + # Avoid running on local source build as tests can be flaky (e.g. newer shellcheck installed) + if build.bottle? + # Ignore a shellcheck error from ctest if CMake finds locally installed shellcheck + with_env(PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe", SHELLCHECK_OPTS: "-e SC2329") do + system "ctest", "--test-dir", "build", "--rerun-failed", "--output-on-failure", "--parallel", ENV.make_jobs + end + end + system "cmake", "--install", "build" + + # Replace `open-mpi` Cellar path that breaks on `open-mpi` version/revision bumps. + # CMake FindMPI uses REALPATH so there isn't a clean way to handle during generation. + openmpi = Formula["open-mpi"] + inreplace_files = [bin/"caf", lib/"cmake/opencoarrays/OpenCoarraysTargets.cmake"] + inreplace inreplace_files, openmpi.prefix.realpath, openmpi.opt_prefix + end + + test do + (testpath/"tally.f90").write <<~FORTRAN + program main + use iso_c_binding, only : c_int + use iso_fortran_env, only : error_unit + implicit none + integer(c_int) :: tally + tally = this_image() ! this image's contribution + call co_sum(tally) + verify: block + integer(c_int) :: image + if (tally/=sum([(image,image=1,num_images())])) then + write(error_unit,'(a,i5)') "Incorrect tally on image ",this_image() + error stop 2 + end if + end block verify + ! Wait for all images to pass the test + sync all + if (this_image()==1) write(*,*) "Test passed" + end program + FORTRAN + system bin/"caf", "tally.f90", "-o", "tally" + system bin/"cafrun", "-np", "3", "--oversubscribe", "./tally" + assert_match Formula["open-mpi"].opt_lib.to_s, shell_output("#{bin}/caf --show") + end +end diff --git a/Formula/o/opencode.rb b/Formula/o/opencode.rb new file mode 100644 index 0000000000000..4ac3a13b310ee --- /dev/null +++ b/Formula/o/opencode.rb @@ -0,0 +1,28 @@ +class Opencode < Formula + desc "AI coding agent, built for the terminal" + homepage "https://opencode.ai" + url "https://registry.npmjs.org/opencode-ai/-/opencode-ai-1.0.20.tgz" + sha256 "23c89a3d6a134f58988ba20f2e417f84491c251421398c3a4c0fdfd8d7ea8534" + license "MIT" + + bottle do + sha256 arm64_tahoe: "080f0a93cefb17fc4e124ffffba2d6526127c30d83b5987178d4fa6603abcd80" + sha256 arm64_sequoia: "080f0a93cefb17fc4e124ffffba2d6526127c30d83b5987178d4fa6603abcd80" + sha256 arm64_sonoma: "080f0a93cefb17fc4e124ffffba2d6526127c30d83b5987178d4fa6603abcd80" + sha256 cellar: :any_skip_relocation, sonoma: "c757510ef7503675d10ac874cdf66d15be7553eae8729cff83fc7e2cdec39fb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e8466471b4c51daf7663859839fcc1eea76fc206377e3963f1b289116b2c69e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5d1f8de89a8e5177f30ccd63dca750978a75abb26ef6a7b9eb879abd99753d6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/opencode --version") + assert_match "opencode", shell_output("#{bin}/opencode models") + end +end diff --git a/Formula/o/opencolorio.rb b/Formula/o/opencolorio.rb new file mode 100644 index 0000000000000..701999fa792d2 --- /dev/null +++ b/Formula/o/opencolorio.rb @@ -0,0 +1,73 @@ +class Opencolorio < Formula + desc "Color management solution geared towards motion picture production" + homepage "https://opencolorio.org/" + url "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v2.5.0.tar.gz" + sha256 "124e2bfa8a9071959d6ddbb64ffbf78d3f6fe3c923ae23e96a6bbadde1af55b6" + license "BSD-3-Clause" + revision 1 + head "https://github.com/AcademySoftwareFoundation/OpenColorIO.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "738ce461e519c5fd7152f30062ac4a442804fbdd63ae512bbcd46611c65ec1b0" + sha256 cellar: :any, arm64_sequoia: "a3127f5babe50de226870be9f2131866579a3d8eec456f8ae09dde36923320c4" + sha256 cellar: :any, arm64_sonoma: "48eb52eccef42fbfd2989e4d0594daaf8e92d8c3f26fd04fc9274cb2c65ff46b" + sha256 cellar: :any, sonoma: "3880e7c3cd868f639b7e4e301bcffeea401d1759f37cb6668dcd051580520798" + sha256 cellar: :any_skip_relocation, arm64_linux: "260e50ee7fec0ac4e8202e6218d6bbc78d3b3e7e07ae5c14feb0615a687f34eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b9c555f35b202205d39bbcb983aeb1eafba765b0bd8a709df860b23a3fe6a08" + end + + depends_on "cmake" => :build + depends_on "pybind11" => :build + depends_on "python@3.14" => [:build, :test] # for bindings, avoid runtime dependency due to `expat` + depends_on "expat" + depends_on "imath" + depends_on "little-cms2" + depends_on "minizip-ng" + depends_on "openexr" + depends_on "pystring" + depends_on "yaml-cpp" + depends_on "zlib" + + on_arm do + depends_on "sse2neon" => :build + end + + def python3 + "python3.14" + end + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DOCIO_BUILD_GPU_TESTS=OFF + -DOCIO_BUILD_TESTS=OFF + -DOCIO_INSTALL_EXT_PACKAGES=NONE + -DOCIO_PYTHON_VERSION=#{Language::Python.major_minor_version python3} + -DPython_EXECUTABLE=#{which(python3)} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + OpenColorIO requires several environment variables to be set. + You can source the following script in your shell-startup to do that: + #{HOMEBREW_PREFIX}/share/ocio/setup_ocio.sh + + Alternatively the documentation describes what env-variables need set: + https://opencolorio.org/installation.html#environment-variables + + You will require a config for OCIO to be useful. Sample configuration files + and reference images can be found at: + https://opencolorio.org/downloads.html + EOS + end + + test do + assert_match "validate", shell_output("#{bin}/ociocheck --help", 1) + system python3, "-c", "import PyOpenColorIO as OCIO; print(OCIO.GetCurrentConfig())" + end +end diff --git a/Formula/o/openconnect.rb b/Formula/o/openconnect.rb new file mode 100644 index 0000000000000..41fc3055e2b6c --- /dev/null +++ b/Formula/o/openconnect.rb @@ -0,0 +1,101 @@ +class Openconnect < Formula + desc "Open client for Cisco AnyConnect VPN" + homepage "https://www.infradead.org/openconnect/" + url "https://www.infradead.org/openconnect/download/openconnect-9.12.tar.gz" + sha256 "a2bedce3aa4dfe75e36e407e48e8e8bc91d46def5335ac9564fbf91bd4b2413e" + license "LGPL-2.1-only" + + livecheck do + url "https://www.infradead.org/openconnect/download.html" + regex(/href=.*?openconnect[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "be0a6e0c44074274470b40a2687f0d36545111f937f6e87776dde90c1ce30900" + sha256 arm64_sequoia: "5f8451259fc62b9d9137d92ef27cb8674d429b06e4a3e2d30bd7352131126b24" + sha256 arm64_sonoma: "90a8abdf95806d378499c11c363e93ff20724d02d8366d3a0f3ad9c1484281a3" + sha256 arm64_ventura: "2c25aee8a4b6d654d03f3f66d3a2ef14193c1d4bf1c5be5a7ac8de1a39030411" + sha256 sonoma: "30ba2ca9744e4083be325a54aa62bbcb63044ffbfb1d1b22bfa1a6e4f7425e97" + sha256 ventura: "a4b0f68f401974f354e8116066306fb6c39932024911a4a64d524894ac387633" + sha256 arm64_linux: "02d74cdcd601f029c380d447f55b807ea503c88133484edca2a9757fc8d052c0" + sha256 x86_64_linux: "04741ae1bce5f7c984ddb98c787972f7186cb6b9d366e7e6ee743ea65927cafa" + end + + head do + url "git://git.infradead.org/users/dwmw2/openconnect.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gettext" => :build # for msgfmt + depends_on "pkgconf" => :build + + depends_on "gmp" + depends_on "gnutls" + depends_on "nettle" + depends_on "p11-kit" + depends_on "stoken" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + resource "vpnc-script" do + url "https://gitlab.com/openconnect/vpnc-scripts/-/raw/5b9e7e4c8e813cc6d95888e7e1d2992964270ec8/vpnc-script" + sha256 "dee08feb571dc788018b5d599e4a79177e6acc144d196a776a521ff5496fddb8" + end + + # Fix for GnuTLS v3.8.1 + # https://gitlab.com/openconnect/openconnect/-/merge_requests/490 + patch do + url "https://gitlab.com/openconnect/openconnect/-/commit/7512698217c4104aade7a2df669a20de68f3bb8c.diff" + sha256 "8a26be2116b88bf9ad491b56138498a2a18bd80bb081e90a386ee8817a1314c3" + end + + def install + (etc/"vpnc").install resource("vpnc-script") + chmod 0755, etc/"vpnc/vpnc-script" + + if build.head? + ENV["LIBTOOLIZE"] = "glibtoolize" + system "./autogen.sh" + end + + args = %W[ + --sbindir=#{bin} + --localstatedir=#{var} + --with-vpnc-script=#{etc}/vpnc/vpnc-script + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def post_install + if (etc/"vpnc/vpnc-script.default").exist? + opoo <<~EOS + To avoid destroying any local changes you have made, a newer version of `vpnc-script` has + been installed as `vpnc-script.default`. + EOS + end + end + + def caveats + <<~EOS + A `vpnc-script` has been installed at #{etc}/vpnc/vpnc-script. + EOS + end + + test do + # We need to pipe an empty string to `openconnect` for this test to work. + assert_match "POST https://localhost/", pipe_output("#{bin}/openconnect localhost 2>&1", "") + end +end diff --git a/Formula/o/opencore-amr.rb b/Formula/o/opencore-amr.rb new file mode 100644 index 0000000000000..7c88a83b5a423 --- /dev/null +++ b/Formula/o/opencore-amr.rb @@ -0,0 +1,49 @@ +class OpencoreAmr < Formula + desc "Audio codecs extracted from Android open source project" + homepage "https://opencore-amr.sourceforge.net/" + url "https://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.6.tar.gz" + sha256 "483eb4061088e2b34b358e47540b5d495a96cd468e361050fae615b1809dc4a1" + license "Apache-2.0" + + livecheck do + url :stable + regex(%r{url=.*?/opencore-amr[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "38dea780c6b453fcae6c1addb3054b0d14a4c216183a319e26575f61fda8050b" + sha256 cellar: :any, arm64_sequoia: "48a7944b5baf1d23777ff16d0f1b44ba3fb1872728e578e245993019895b0075" + sha256 cellar: :any, arm64_sonoma: "b9598108fb81e647206266d1ebfd43872454df8d9eb8292e09b550fb190e5c4f" + sha256 cellar: :any, arm64_ventura: "673be457f0de7494de04b1d079de9074e79e03a74f1fe520227f75d7c7953265" + sha256 cellar: :any, arm64_monterey: "9641b13b82cf4d325e2fc5a0b2576a9ffb6d8d3bead8c6637e4b22a35ed24776" + sha256 cellar: :any, arm64_big_sur: "6dea7b138a3e3399d4295b70cd1dd9311ecec98bf6eedb24617b91d2020404f4" + sha256 cellar: :any, sonoma: "9c8eb887fac92ec6077aff4031f73c6cf493c0e41f1f54e3850e356ee911309d" + sha256 cellar: :any, ventura: "b9aa683edb4806619271a8f462c455cf2982124660fb03219b5858c22d2eb721" + sha256 cellar: :any, monterey: "cc0a074376ddcb0b30ab94027b603f8228fa951e35fda58b7bd274ae2efb4206" + sha256 cellar: :any, big_sur: "f235307e30e1ff626c14009955d924826d86cf92518ea36707c5e63469d29a8c" + sha256 cellar: :any, catalina: "afe967f68360acc0d6c3aa40853170f228499bf6917d13257ab3b90a341d1968" + sha256 cellar: :any_skip_relocation, arm64_linux: "8119c11b0478615bb8b9942f67e333a8947abea04766d36c3b38deb175c90a8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63626c6d52b176f1289a792a8dea8845104f85e86538054e88efadbf920a9835" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + void *s = D_IF_init(); + D_IF_exit(s); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lopencore-amrwb", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/opencsg.rb b/Formula/o/opencsg.rb new file mode 100644 index 0000000000000..ae86f438271b9 --- /dev/null +++ b/Formula/o/opencsg.rb @@ -0,0 +1,53 @@ +class Opencsg < Formula + desc "Constructive solid geometry rendering library" + homepage "https://www.opencsg.org/" + url "https://www.opencsg.org/OpenCSG-1.8.1.tar.gz" + sha256 "afcc004a89ed3bc478a9e4ba39b20f3d589b24e23e275b7383f91a590d4d57c5" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?OpenCSG[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e0073b1a6fe39d878a4066d957dbaf09fb7c874d726b4e61745740881aeff69a" + sha256 cellar: :any, arm64_sequoia: "b0a69f125e5ccddc9559b3d088e44f7080a4a88903092db4a5d8cc45b2401eda" + sha256 cellar: :any, arm64_sonoma: "baabc5f08880e3740596c333b7d6736edbce5d4c56374d8310faf71b4b25ec75" + sha256 cellar: :any, arm64_ventura: "4c6433d8600f7037d2cd0b4e59b18a6d100afdc9940673a5b404fe7ff18964c1" + sha256 cellar: :any, sonoma: "b5568908930ffddc71dc9fd5d1689da95250873d8a7d510b52c9a725ed35a791" + sha256 cellar: :any, ventura: "4194e7de3bd9c4a7e16310247e47730302c95d0e43383a9b72a5bbd35243a544" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d903d2e27437f4817f58160125a8955b7b1daafca1150c446c7db65601553ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cb20cacd22251a2ea4a3c4b9549a78c51f8d32e98175f41f7618e78c3435030" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "mesa" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_EXAMPLE=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + class Test : public OpenCSG::Primitive { + public: + Test() : OpenCSG::Primitive(OpenCSG::Intersection, 0) {} + void render() {} + }; + int main(int argc, char** argv) { + Test test; + } + CPP + gl_lib = OS.mac? ? ["-framework", "OpenGL"] : ["-lGL"] + system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-lopencsg", *gl_lib + system "./test" + end +end diff --git a/Formula/o/opencv.rb b/Formula/o/opencv.rb new file mode 100644 index 0000000000000..871da4bb1d736 --- /dev/null +++ b/Formula/o/opencv.rb @@ -0,0 +1,225 @@ +class Opencv < Formula + desc "Open source computer vision library" + homepage "https://opencv.org/" + license "Apache-2.0" + revision 14 + + stable do + url "https://github.com/opencv/opencv/archive/refs/tags/4.12.0.tar.gz" + sha256 "44c106d5bb47efec04e531fd93008b3fcd1d27138985c5baf4eafac0e1ec9e9d" + + resource "contrib" do + url "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.12.0.tar.gz" + sha256 "4197722b4c5ed42b476d42e29beb29a52b6b25c34ec7b4d589c3ae5145fee98e" + + livecheck do + formula :parent + end + end + + # Backport support for FFmpeg 8.0 + patch do + url "https://github.com/opencv/opencv/commit/90c444abd387ffa70b2e72a34922903a2f0f4f5a.patch?full_index=1" + sha256 "5b662eea7b5de1dac3e06895c711955c9d1515d1202191b68594f4f9cfa23242" + end + + # Backport support for eigen 5.0.0 + patch do + url "https://github.com/opencv/opencv/commit/468de9b36740b3355f0d5cd8be2ce28b340df120.patch?full_index=1" + sha256 "b86ca3cf644a49ab7219348db2bc78497235df75ceef714d46fc80e9e80f2a06" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4e73ba74aacb6c6904a67c4374fe3f321ab83c8850c69c1ec84c31625c782dff" + sha256 arm64_sequoia: "b4ca0e76f80388b82b6815f226a2478f1d6ebbaf004d0bc86f85f24c89234c26" + sha256 arm64_sonoma: "1314a31b08110b7a02e8b045a4a3a7c3f63f4ba99091d7a2fbc9860fbe68b232" + sha256 sonoma: "eef9799d1c8c66174010c4ae3fcfc5da425c242c766be3a8d3c41d618f239658" + sha256 arm64_linux: "b6ff9c31554869d2f2599a2089826fb53ab47a3dec8b0bdd252aecd77dcc348e" + sha256 x86_64_linux: "b8687c6d87099cb5e1c959ac0390365ac0ca082d793c3dc78c9320c80031f7c2" + end + + head do + url "https://github.com/opencv/opencv.git", branch: "4.x" + + resource "contrib" do + url "https://github.com/opencv/opencv_contrib.git", branch: "4.x" + end + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "abseil" + depends_on "ceres-solver" + depends_on "eigen" + depends_on "ffmpeg" + depends_on "freetype" + depends_on "gflags" + depends_on "glog" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "jsoncpp" + depends_on "libpng" + depends_on "libtiff" + depends_on "numpy" + depends_on "openblas" + depends_on "openexr" + depends_on "openjpeg" + depends_on "openvino" + depends_on "protobuf" + depends_on "python@3.14" + depends_on "tbb" + depends_on "tesseract" + depends_on "vtk" + depends_on "webp" + + uses_from_macos "zlib" + + on_macos do + depends_on "glew" + depends_on "imath" + depends_on "libarchive" + end + + on_linux do + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + end + + def python3 + "python3.14" + end + + def install + resource("contrib").stage buildpath/"opencv_contrib" + + # Avoid Accelerate.framework + ENV["OpenBLAS_HOME"] = Formula["openblas"].opt_prefix + + # Remove bundled libraries to make sure formula dependencies are used + libdirs = %w[ffmpeg libjasper libjpeg libjpeg-turbo libpng libtiff libwebp openexr openjpeg protobuf tbb zlib] + libdirs.each { |l| rm_r(buildpath/"3rdparty"/l) } + + args = %W[ + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_OSX_DEPLOYMENT_TARGET= + -DBUILD_JASPER=OFF + -DBUILD_JPEG=OFF + -DBUILD_OPENEXR=OFF + -DBUILD_OPENJPEG=OFF + -DBUILD_PERF_TESTS=OFF + -DBUILD_PNG=OFF + -DBUILD_PROTOBUF=OFF + -DBUILD_TBB=OFF + -DBUILD_TESTS=OFF + -DBUILD_TIFF=OFF + -DBUILD_WEBP=OFF + -DBUILD_ZLIB=OFF + -DBUILD_opencv_hdf=OFF + -DBUILD_opencv_java=OFF + -DBUILD_opencv_text=ON + -DOPENCV_ENABLE_NONFREE=ON + -DOPENCV_EXTRA_MODULES_PATH=#{buildpath}/opencv_contrib/modules + -DOPENCV_GENERATE_PKGCONFIG=ON + -DPROTOBUF_UPDATE_FILES=ON + -DWITH_1394=OFF + -DWITH_CUDA=OFF + -DWITH_EIGEN=ON + -DWITH_FFMPEG=ON + -DWITH_GPHOTO2=OFF + -DWITH_GSTREAMER=OFF + -DWITH_JASPER=OFF + -DWITH_OPENEXR=ON + -DWITH_OPENGL=OFF + -DWITH_OPENVINO=ON + -DWITH_QT=OFF + -DWITH_TBB=ON + -DWITH_VTK=ON + -DBUILD_opencv_python2=OFF + -DBUILD_opencv_python3=ON + -DPYTHON3_EXECUTABLE=#{which(python3)} + ] + + args += if OS.mac? + # Requires closed-source, pre-built Orbbec SDK on macOS + ["-DWITH_OBSENSOR=OFF"] + else + # Disable precompiled headers and force opencv to use brewed libraries on Linux + %W[ + -DENABLE_PRECOMPILED_HEADERS=OFF + -DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib}/libjpeg.so + -DOpenBLAS_LIB=#{Formula["openblas"].opt_lib}/libopenblas.so + -DOPENEXR_ILMIMF_LIBRARY=#{Formula["openexr"].opt_lib}/libIlmImf.so + -DOPENEXR_ILMTHREAD_LIBRARY=#{Formula["openexr"].opt_lib}/libIlmThread.so + -DPNG_LIBRARY=#{Formula["libpng"].opt_lib}/libpng.so + -DPROTOBUF_LIBRARY=#{Formula["protobuf"].opt_lib}/libprotobuf.so + -DPROTOBUF_INCLUDE_DIR=#{Formula["protobuf"].include} + -DPROTOBUF_PROTOC_EXECUTABLE=#{Formula["protobuf"].bin}/protoc + -DTIFF_LIBRARY=#{Formula["libtiff"].opt_lib}/libtiff.so + -DWITH_V4L=OFF + -DZLIB_LIBRARY=#{Formula["zlib"].opt_lib}/libz.so + ] + end + + # Ref: https://github.com/opencv/opencv/wiki/CPU-optimizations-build-options + ENV.runtime_cpu_detection + if Hardware::CPU.intel? && build.bottle? + cpu_baseline = if OS.mac? && MacOS.version.requires_sse42? + "SSE4_2" + else + "SSSE3" + end + args += %W[-DCPU_BASELINE=#{cpu_baseline} -DCPU_BASELINE_REQUIRE=#{cpu_baseline}] + end + + system "cmake", "-S", ".", "-B", "build_shared", *args, *std_cmake_args + inreplace "build_shared/modules/core/version_string.inc", "#{Superenv.shims_path}/", "" + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", *args, *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF" + inreplace "build_static/modules/core/version_string.inc", "#{Superenv.shims_path}/", "" + system "cmake", "--build", "build_static" + lib.install buildpath.glob("build_static/{lib,3rdparty/**}/*.a") + + # Prevent dependents from using fragile Cellar paths + inreplace lib/"pkgconfig/opencv#{version.major}.pc", prefix, opt_prefix + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + int main() { + std::cout << CV_VERSION << std::endl; + cv::Mat img = cv::imread("#{test_fixtures("test.jpg")}", cv::IMREAD_COLOR); + if (img.empty()) { + std::cerr << "Could not read test.jpg fixture" << std::endl; + return 1; + } + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}/opencv4", "-o", "test", + "-L#{lib}", "-lopencv_core", "-lopencv_imgcodecs" + assert_equal version.to_s, shell_output("./test").strip + + # The test below seems to time out on Intel macOS. + return if OS.mac? && Hardware::CPU.intel? + + output = shell_output("#{python3} -c 'import cv2; print(cv2.__version__)'") + assert_equal version.to_s, output.chomp + end +end diff --git a/Formula/o/opendbx.rb b/Formula/o/opendbx.rb new file mode 100644 index 0000000000000..91f30edfb875f --- /dev/null +++ b/Formula/o/opendbx.rb @@ -0,0 +1,64 @@ +class Opendbx < Formula + desc "Lightweight but extensible database access library in C" + homepage "https://linuxnetworks.de/doc/index.php/OpenDBX" + url "https://linuxnetworks.de/opendbx/download/opendbx-1.4.6.tar.gz" + sha256 "2246a03812c7d90f10194ad01c2213a7646e383000a800277c6fb8d2bf81497c" + license "LGPL-2.0-or-later" + revision 2 + + # The download page includes a `libopendbx` development release, so we use a + # leading forward slash to only match `opendbx` versions. + livecheck do + url "https://linuxnetworks.de/doc/index.php?title=OpenDBX/Download" + regex(%r{href=.*?/opendbx[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "8cc990504a450685d677e758cf6741b058dd5b82e1ddf2f10c1e70bac003d58a" + sha256 arm64_sequoia: "b355d6e9d840dd066aa4e71bbc2b4ebcca2f13741b07153fcc91a159b0d1665c" + sha256 arm64_sonoma: "f5a84ad8458393c0dea21c9e640de968ae3184ddfcf0cf3f25136d376622d564" + sha256 arm64_ventura: "847f22724b3cd9e0fe820e25fdf778e5190f347b2bba2b81fda5753dacf44d67" + sha256 arm64_monterey: "40c22caf4823f43a2014c73f4ef86a2f6556107c2e5752975ddbf1924c9bc80c" + sha256 arm64_big_sur: "a849ec13147c5cb08b03376eae868b6c82ec075a60388bf7e6742fbb9f56b467" + sha256 sonoma: "4c4dff477fde71d015a7ba53c377fcdbc88e31a7e3b430597da5b15a4138d3ba" + sha256 ventura: "b362fccb77368d232684efe3895ae60b0f686869c677a3815c016a2dd46dc03c" + sha256 monterey: "7002fcd03b711f7dbefacd3287435d2ec4fbf96f6410dcefc1fb0d36bc3a2f25" + sha256 big_sur: "80d655556c77aeb341dd0fc52d70e61dfd8a3518cf689bcb68af6f0aacc04bd5" + sha256 catalina: "9a95027d4121667ec569d3aac52ec540a0aacd393e584b503aae73f35808ab0d" + sha256 arm64_linux: "16be2c0b756f68f456251052c96ac4436e92a96be74ff9c0e2d935be95bd2e62" + sha256 x86_64_linux: "9ef3f4d6acb641cbe910f05f8ec191ffdc886b80c1bed89a962a27031071a940" + end + + depends_on "readline" + depends_on "sqlite" + + def install + ENV.cxx11 + + # Reported upstream: http://bugs.linuxnetworks.de/index.php?do=details&id=40 + inreplace "utils/Makefile.in", "$(LIBSUFFIX)", ".dylib" if OS.mac? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--with-backends=sqlite3", *args, *std_configure_args + system "make", "install" + end + + test do + testfile = testpath/"test.sql" + testfile.write <<~SQL + create table t(x); + insert into t values("Hello"); + .header + select * from t; + .quit + SQL + + assert_match '"Hello"', + pipe_output("#{bin}/odbx-sql odbx-sql -h ./ -d test.sqlite3 -b sqlite3", (testpath/"test.sql").read) + end +end diff --git a/Formula/o/opendetex.rb b/Formula/o/opendetex.rb new file mode 100644 index 0000000000000..a71f55a17ea04 --- /dev/null +++ b/Formula/o/opendetex.rb @@ -0,0 +1,43 @@ +class Opendetex < Formula + desc "Tool to strip TeX or LaTeX commands from documents" + homepage "https://github.com/pkubowicz/opendetex" + url "https://github.com/pkubowicz/opendetex/releases/download/v2.8.11/opendetex-2.8.11.tar.bz2" + sha256 "f5771afc607134f65d502d733552cbc79ef06eee44601ae8077b79d852daa05f" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "555dfe0d3ce81e65384bdc47cfbcb7f31d8571420e42f1fd115578a3f6333b0d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9d5e6e37677f7f89079cb9180df7a7b3446abd47c410fe81eb1c75afc8ceb76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23938ef4f3e39053df242eace39677f290ec1e1ff000569635443df5fa062a70" + sha256 cellar: :any_skip_relocation, arm64_ventura: "78f98d7aadb714d796f32b60c3becd898c9ef6a88d14e58fb9c303b8d2ec368e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "55f421f5f7b3500f5ceb9fc05f76b947e012bc2c79b5695ce81b106576cfcba9" + sha256 cellar: :any_skip_relocation, sonoma: "5e458e9b340a5784f5b9c776b059a5b2310836918b414ed050d94deefa550612" + sha256 cellar: :any_skip_relocation, ventura: "3717e4f330e0abda53e3b27e83f9d46bdf701787433f8d7356cc246ffafc903d" + sha256 cellar: :any_skip_relocation, monterey: "ed14c822975353fa8962fdb4c0a3527669cec5df674924145938682f76b38f13" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccdfb99daa215fe2cb319e3820b00f49edee665f2219f2a60d520f65316c7f4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f76bf60e19353d112fdd02b250ea0d87f28688582d0c26f30f580e3cc86434d1" + end + + uses_from_macos "flex" => :build + + conflicts_with "texlive", because: "both install `detex` binaries" + + def install + system "make" + bin.install "detex" + bin.install "delatex" + man1.install "detex.1" + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \begin{document} + Simple \emph{text}. + \end{document} + TEX + + output = shell_output("#{bin}/detex test.tex") + assert_equal "Simple text.\n", output + end +end diff --git a/Formula/o/opendht.rb b/Formula/o/opendht.rb new file mode 100644 index 0000000000000..012367b2fa677 --- /dev/null +++ b/Formula/o/opendht.rb @@ -0,0 +1,63 @@ +class Opendht < Formula + desc "C++17 Distributed Hash Table implementation" + homepage "https://github.com/savoirfairelinux/opendht" + url "https://github.com/savoirfairelinux/opendht/archive/refs/tags/v3.5.4.tar.gz" + sha256 "674249c4ac07c4392566d761c0189c7bb11dd7b17e9a331c69d6881f7d01e043" + license "GPL-3.0-or-later" + revision 1 + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f4d45049caf08fd1f826f1869952f62954692a6c68f212e5a969ff3f863a74a1" + sha256 cellar: :any, arm64_sequoia: "df77e683bd89ca2fa48b3999397edbde77ef84cae513656341117d3d3101e243" + sha256 cellar: :any, arm64_sonoma: "43363010a5daf03f140e0b157ac35f940ac19b52ed2e258a6b03ae7140afd8b5" + sha256 cellar: :any, sonoma: "62be175424effde9bda516c6f027d71c6ab220232ad1007dc8a1d7cbcb650285" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e746a7d89e61ce715a0e5bb243838c9ec8ac142829df34922919c9f3cdf5a67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d7aac90140280403abba3a269270f4c1f0fd63760ee9404fd173831e5824026" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "argon2" + depends_on "asio" + depends_on "fmt" + depends_on "gnutls" + depends_on "msgpack-cxx" + depends_on "nettle" + depends_on "readline" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DOPENDHT_C=ON", + "-DOPENDHT_TOOLS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + dht::DhtRunner node; + + // Launch a dht node on a new thread, using a + // generated RSA key pair, and listen on port 4222. + node.run(4222, dht::crypto::generateIdentity(), true); + node.join(); + + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-L#{lib}", "-lopendht", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/openexr.rb b/Formula/o/openexr.rb new file mode 100644 index 0000000000000..524f35f9040e5 --- /dev/null +++ b/Formula/o/openexr.rb @@ -0,0 +1,50 @@ +class Openexr < Formula + desc "High dynamic-range image file format" + homepage "https://www.openexr.com/" + url "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.4.2.tar.gz" + sha256 "d7d38eb6a63ea8ba0f301d0ad6a80094032d488e9e6c525b35236d20a9ae3ef2" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "3c5b7795acc003e39dfcef4caf0d85396cb43edaa445851f3ca48153b2f7415a" + sha256 cellar: :any, arm64_sequoia: "48f40a378fa099694bb97fcca9991637dd55b965f7b69e17b53af4bdf43a712f" + sha256 cellar: :any, arm64_sonoma: "35899159d0b1a11b18993fb619542fb64989e13141d92b0cd18c2ed6c1ed8fc0" + sha256 cellar: :any, sonoma: "c1c93e09abdcf85a8d7fdfd8a13f371596a5ab62176c370d7cbdb2de49104b43" + sha256 cellar: :any_skip_relocation, arm64_linux: "891b700419605561871244b6bf76137ee652903bd278f965f4c4805d36abd653" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b673a100c9de00cef857aadd25077908d3518748ef99c26dfae73702c6fded2" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "imath" + depends_on "libdeflate" + depends_on "openjph" + + uses_from_macos "zlib" + + # These used to be provided by `ilmbase` + link_overwrite "include/OpenEXR" + link_overwrite "lib/libIex.dylib" + link_overwrite "lib/libIex.so" + link_overwrite "lib/libIlmThread.dylib" + link_overwrite "lib/libIlmThread.so" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-exr" do + url "https://github.com/AcademySoftwareFoundation/openexr-images/raw/f17e353fbfcde3406fe02675f4d92aeae422a560/TestImages/AllHalfValues.exr" + sha256 "eede573a0b59b79f21de15ee9d3b7649d58d8f2a8e7787ea34f192db3b3c84a4" + end + + resource("homebrew-exr").stage do + system bin/"exrheader", "AllHalfValues.exr" + end + end +end diff --git a/Formula/o/openfa.rb b/Formula/o/openfa.rb new file mode 100644 index 0000000000000..5a45ef789c4ee --- /dev/null +++ b/Formula/o/openfa.rb @@ -0,0 +1,57 @@ +class Openfa < Formula + desc "Set of algorithms that implement standard models used in fundamental astronomy" + homepage "https://gitlab.obspm.fr/imcce_openfa/openfa" + url "https://gitlab.obspm.fr/imcce_openfa/openfa/-/archive/20231011.0.3/openfa-20231011.0.3.tar.gz" + sha256 "e49de042025537e5cfd9ee55b28e58658efbda05e49fdc1fa90e2d347ee5d696" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e09325d56359bc60015dde514da142c8dafa405b278ad12b37d61aa9b9a50097" + sha256 cellar: :any, arm64_sequoia: "c0ba14a0c9fb154470b308670c6c8a6ea0115fe4c12aa402380cbbf0987c2252" + sha256 cellar: :any, arm64_sonoma: "385c6e6ec553fa81f6fc118cdcd561508bec55a0217605c40a7de1a6359ca8ee" + sha256 cellar: :any, arm64_ventura: "2bd63161a16bdf0b591420b4c7dcfac615fa2ed25192385923934719e2cbd2d5" + sha256 cellar: :any, arm64_monterey: "d4431b5f7b7b599fd0d53231a000a57392c71a8e77b245474cde88f15931ecfd" + sha256 cellar: :any, sonoma: "bfb27bf06051d8696fc549715df202bca591628a127b317184f81cca64082cd9" + sha256 cellar: :any, ventura: "fb63e4e4c4340190d0354f95da2ddb9e7bfbc1a968a373a8946976290ddb0a5d" + sha256 cellar: :any, monterey: "90af0108825d0187e45ffa9703e803747c015d2a70617b3fc367f4342dd9f5d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "40d42069bba5856f56b9f3ac7eaeab0e0137012139bb3281d2659314d3de59bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eab4f9ca29a3d57234580cdc61c2fbe34c4493702db0517f3f3f0a6938bb6f03" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"testopenfa.c").write <<~C + #include "openfa.h" + #include "openfam.h" + #include + + int main (void) { + double dj1, dj2, fd; + int iy, im, id, j; + dj1 = 2400000.5; + dj2 = 50123.9999; + j = openfaJd2cal(dj1, dj2, &iy, &im, &id, &fd); + assert (iy==1996); + assert (im==2); + assert (id==10); + assert (fd<1.); + assert (fd>0.99); + assert (j==0); + return 0; + } + C + system ENV.cc, "testopenfa.c", "-L#{lib}", "-lopenfa", "-o", "testopenfa" + system "./testopenfa" + end +end diff --git a/Formula/o/openfast.rb b/Formula/o/openfast.rb new file mode 100644 index 0000000000000..0e6cd159e7c99 --- /dev/null +++ b/Formula/o/openfast.rb @@ -0,0 +1,38 @@ +class Openfast < Formula + desc "NREL-supported OpenFAST whole-turbine simulation code" + homepage "https://openfast.readthedocs.io" + url "https://github.com/openfast/openfast.git", + tag: "v4.1.2", + revision: "02847314dfdc4069d70b8b493e37b12b810a11e2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "269867eb0f403bd5a9e1b0a1ff758efcdbf760f68b300497e95f4f632373a881" + sha256 cellar: :any, arm64_sequoia: "c733b48310104215380a08d3c0f844e6cca70f0230664d41cdaaf4bc86b1b494" + sha256 cellar: :any, arm64_sonoma: "e2474a6e66bc1b37e7efb973fed3bf973d0f557c03ed52ac32611d955e438d38" + sha256 cellar: :any, arm64_ventura: "b794c4d1a1f5ff49e853dd71174f65b6aa82c75fbb8edfd6835e6a6c4dab2121" + sha256 cellar: :any, sonoma: "7738d20b370ca541b264b61773cfe55374c8115d78a39cd0f3cc549cf200306f" + sha256 cellar: :any, ventura: "571ca344e75c0163a44c068b2de3a09de60258635c87e3eb301cf416358f6c1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e840402ec6568794ab7de2b26104e3732dd4754608d3b73cea5ab652648292a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d796ae9dbdec7d8fe0795940f8e851745be3e661adc700a67eae3a01d8fc1c18" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "openblas" + + def install + args = %w[ + -DDOUBLE_PRECISION=OFF + -DBLA_VENDOR=OpenBLAS + ] + + system "cmake", "-S", ".", "-B", ".", *args, *std_cmake_args + system "cmake", "--build", ".", "--target", "openfast" + bin.install "glue-codes/openfast/openfast" + end + + test do + assert_match version.to_s, shell_output("#{bin}/openfast -h") + end +end diff --git a/Formula/o/openfga.rb b/Formula/o/openfga.rb new file mode 100644 index 0000000000000..b59cf6fc52432 --- /dev/null +++ b/Formula/o/openfga.rb @@ -0,0 +1,46 @@ +class Openfga < Formula + desc "High performance and flexible authorization/permission engine" + homepage "https://openfga.dev/" + url "https://github.com/openfga/openfga/archive/refs/tags/v1.10.3.tar.gz" + sha256 "eb08f45418d90216151258f113aee6627fe4914c4f6e3aef59dac3ab016fffc2" + license "Apache-2.0" + head "https://github.com/openfga/openfga.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f762958418a45bf3f329eb80c4a1299fe6825e834437dcb225d72887973a159b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b58a912a741f4f2920fed5feabed6f9154110e4fb689b5716662f902f3802295" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "efc2aec22af8dac200433fd0f92566eedd61dad268845f74eb0b58fc249864d6" + sha256 cellar: :any_skip_relocation, sonoma: "582460caabe653ca53ba9c9da1aa6dc6ff319e4c7268546ac6c8e2ef749a078f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c0de8de2148402cbed35df90c2763ebc1ff5bbec1942ac750c191d51daee12a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a74be1f5faacc5c6f8847141fdaff9177ea4aec19ec3efd7a4ab0d44a3fb48e" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/openfga/openfga/internal/build.Version=#{version} + -X github.com/openfga/openfga/internal/build.Commit=brew + -X github.com/openfga/openfga/internal/build.Date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/openfga" + + generate_completions_from_executable(bin/"openfga", "completion") + end + + test do + port = free_port + pid = fork do + exec bin/"openfga", "run", "--playground-port", port.to_s + end + sleep 3 + output = shell_output("curl -s http://localhost:#{port}/playground") + assert_match "title=\"Embedded Playground\"", output + + assert_match version.to_s, shell_output("#{bin}/openfga version 2>&1") + ensure + Process.kill("SIGTERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/o/openfortivpn.rb b/Formula/o/openfortivpn.rb new file mode 100644 index 0000000000000..b90be7c30bacb --- /dev/null +++ b/Formula/o/openfortivpn.rb @@ -0,0 +1,48 @@ +class Openfortivpn < Formula + desc "Open Fortinet client for PPP+TLS VPN tunnel services" + homepage "https://github.com/adrienverge/openfortivpn" + url "https://github.com/adrienverge/openfortivpn/archive/refs/tags/v1.23.1.tar.gz" + sha256 "ecacfc7f18d87f4ff503198177e51a83316b59b4646f31caa8140fdbfaa40389" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + head "https://github.com/adrienverge/openfortivpn.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "683a43f9d6a35ecce0989ac17cb45c1d96fd1d227410fa3c1d99d9a99e210001" + sha256 arm64_sequoia: "1ae366135c78e77a61e53bc6c8c05b5517f715f64b580ee20c7f380e4772b483" + sha256 arm64_sonoma: "28994d4959537dbfe5702aed1d16e7c09096e6957b5640f3b89da6669deecefe" + sha256 arm64_ventura: "39bd9a1bd6b7a26eb5a10a4bbd2a3ed9d50b72aa1b80d64fffe95430734a36d8" + sha256 sonoma: "638d300356138d5dfb66500e01e71b2e07d7fdfbf6151cf4b3d389db04744c33" + sha256 ventura: "b3c8630701ae6d1ee308c0e4e72885e296d59bd83fec77eb21d7046e3c6a50fe" + sha256 arm64_linux: "9803841bf3a552d2220d7a213b6337cbae3cdb6759632105aa5c98bedaeeee51" + sha256 x86_64_linux: "9182218ccc8af0571af8445f8458843d61056e6186407293707c2d27f2e88903" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + # awaiting formula creation + # uses_from_macos "pppd" + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--enable-legacy-pppd", # only for pppd < 2.5.0 + "--sysconfdir=#{etc}/openfortivpn", + *std_configure_args + system "make", "install" + end + + service do + run [opt_bin/"openfortivpn", "-c", etc/"openfortivpn/openfortivpn/config"] + keep_alive true + require_root true + log_path var/"log/openfortivpn.log" + error_log_path var/"log/openfortivpn.log" + end + + test do + system bin/"openfortivpn", "--version" + end +end diff --git a/Formula/o/openfpgaloader.rb b/Formula/o/openfpgaloader.rb new file mode 100644 index 0000000000000..bd9ff0b5be672 --- /dev/null +++ b/Formula/o/openfpgaloader.rb @@ -0,0 +1,42 @@ +class Openfpgaloader < Formula + desc "Universal utility for programming FPGA" + homepage "https://github.com/trabucayre/openFPGALoader" + url "https://github.com/trabucayre/openFPGALoader/archive/refs/tags/v1.0.0.tar.gz" + sha256 "cf19b596e5dea21891b1be3cb9a04be7a1501926ee0919dcc5c9f1b6d3bd0a96" + license "Apache-2.0" + head "https://github.com/trabucayre/openFPGALoader.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "67fc3d927fc175b1d6458606e8b3f65051ed206b10502581e8d3b39c2b7654c8" + sha256 arm64_sequoia: "c5621af8a41a347e8e4fbb87b37c55832334ea681ddc5ec3cf4bfb2b93d1011a" + sha256 arm64_sonoma: "9694df81e287cbef5007d2cff991222533050950de65ff9c8946331052c1e643" + sha256 sonoma: "172c7a00da927e1e406c8a5d5a156ed4352c85ec6e4bcb9ecabb34a8631cbfba" + sha256 arm64_linux: "68fd7db44386badf4b396d1fa07553ed27c49a66a1c391a4ca110b4dc4b80f06" + sha256 x86_64_linux: "3b928bbbbda0981095ee18bcf3dad481e33e436706054805fd362bfac20dcecb" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libftdi" + depends_on "libusb" + + uses_from_macos "zlib" + + on_linux do + depends_on "systemd" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + version_output = shell_output("#{bin}/openFPGALoader -V 2>&1") + assert_match "openFPGALoader v#{version}", version_output + + error_output = shell_output("#{bin}/openFPGALoader --detect 2>&1 >/dev/null", 1) + assert_includes error_output, "JTAG init failed" + end +end diff --git a/Formula/o/openfst.rb b/Formula/o/openfst.rb new file mode 100644 index 0000000000000..11628db97e5b4 --- /dev/null +++ b/Formula/o/openfst.rb @@ -0,0 +1,60 @@ +class Openfst < Formula + desc "Library for weighted finite-state transducers" + homepage "https://www.openfst.org/twiki/bin/view/FST/WebHome" + url "https://openfst.org/twiki/pub/FST/FstDownload/openfst-1.8.4.tar.gz" + sha256 "a8ebbb6f3d92d07e671500587472518cfc87cb79b9a654a5a8abb2d0eb298016" + license "Apache-2.0" + + livecheck do + url "https://www.openfst.org/twiki/bin/view/FST/FstDownload" + regex(/href=.*?openfst[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5c254806ca055fb4a6133b87c7e8d4ad12316281db0b1ce6c0bbf89e7bc59554" + sha256 cellar: :any, arm64_sequoia: "170b2d2c3a8567af3feec554218bc4c8d6d62b2e8f04395e3fc3b5ef8451c846" + sha256 cellar: :any, arm64_sonoma: "9d437bc3a9cb1661b816b8ab6c7ab8f4d18303cf67e23ecd4285142c03a8f537" + sha256 cellar: :any, arm64_ventura: "b6111a87dbce7299b5bb7616c4886df0df105ff5f5dbad107312953017092fcc" + sha256 cellar: :any, sonoma: "053608b3f203e6d338d124bd7efbb4abaccaef09541710ada922e714e924ed45" + sha256 cellar: :any, ventura: "ee4d24be7b6490cbe241d86a4df0e3c9274e175ee9bac9ae5df410de8f0dff00" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fba19fbd00295bf3f4c8980c5f1cc7c7848eae6d22d7bc02432836f299f17db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e99e7fd868352d8f1956c5e2721ec89dbe064c39018c680d19e2ddaab3bb787" + end + + def install + system "./configure", "--disable-silent-rules", + "--enable-fsts", + "--enable-compress", + "--enable-grm", + "--enable-special", + *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"text.fst").write <<~EOS + 0 1 a x .5 + 0 1 b y 1.5 + 1 2 c z 2.5 + 2 3.5 + EOS + + (testpath/"isyms.txt").write <<~EOS + 0 + a 1 + b 2 + c 3 + EOS + + (testpath/"osyms.txt").write <<~EOS + 0 + x 1 + y 2 + z 3 + EOS + + system bin/"fstcompile", "--isymbols=isyms.txt", "--osymbols=osyms.txt", "text.fst", "binary.fst" + assert_path_exists testpath/"binary.fst" + end +end diff --git a/Formula/o/openh264.rb b/Formula/o/openh264.rb new file mode 100644 index 0000000000000..109a8d1681006 --- /dev/null +++ b/Formula/o/openh264.rb @@ -0,0 +1,47 @@ +class Openh264 < Formula + desc "H.264 codec from Cisco" + homepage "https://www.openh264.org/" + url "https://github.com/cisco/openh264/archive/refs/tags/v2.6.0.tar.gz" + sha256 "558544ad358283a7ab2930d69a9ceddf913f4a51ee9bf1bfb9e377322af81a69" + license "BSD-2-Clause" + head "https://github.com/cisco/openh264.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "66b45539594a83afa29294059d4b82cbfeb149549cf90f6034c4c786db39486f" + sha256 cellar: :any, arm64_sequoia: "a515a7ef81ee79369a4e607c78d14e1c6d778b799d75bd53a45f78bfcd512f0a" + sha256 cellar: :any, arm64_sonoma: "ee76a655687d6e7ce9bc7f9734212e609be33f96c7cce20b9706ba206a5cac19" + sha256 cellar: :any, arm64_ventura: "d5934c079e354517b1241ad91fcdfa8ffc2a3eeb023ab50288fd18141492d04f" + sha256 cellar: :any, sonoma: "8ccc47d06160704ddd908e021aa95d8f9e57c99b50d72eb4392bcc15bff2a1c5" + sha256 cellar: :any, ventura: "f15c605ca3e71e932c65c4fb1c9cfe5ff67343c0743bf15181f4172f05e567e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca36990de40af30ea3f0175926c87baaa780ad0e0abddc3328f69e22fc4ff908" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a5b7c2ddbf8e02c9590b66e49e25119cf06ca2ff1ca48bb85f89c498828304e" + end + + depends_on "nasm" => :build + + def install + system "make", "install-shared", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + ISVCDecoder *dec; + WelsCreateDecoder (&dec); + WelsDestroyDecoder (dec); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lopenh264", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/openhmd.rb b/Formula/o/openhmd.rb new file mode 100644 index 0000000000000..b976a87035881 --- /dev/null +++ b/Formula/o/openhmd.rb @@ -0,0 +1,45 @@ +class Openhmd < Formula + desc "Free and open source API and drivers for immersive technology" + homepage "http://openhmd.net" + url "https://github.com/OpenHMD/OpenHMD/archive/refs/tags/0.3.0.tar.gz" + sha256 "ec5c97ab456046a8aef3cde6d59e474603af398f1d064a66e364fe3c0b26a0fa" + license "BSL-1.0" + head "https://github.com/OpenHMD/OpenHMD.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "67a5d2f64c142bf6a00d24f1b1e1af1051db91de9af1487980702af8f9d49759" + sha256 cellar: :any, arm64_sequoia: "743ff7cdd099472c22867b6883dbebb8731898e770c6c9a9c16e42a99de5b10a" + sha256 cellar: :any, arm64_sonoma: "f234246a30572beddda70313054bf10e58a96ee842bbeded6e1d1017febc0c02" + sha256 cellar: :any, arm64_ventura: "6b2e1d6170301fe50af6c5b9bee467a9c18f346cf2ff630338fd410bfbf992ff" + sha256 cellar: :any, arm64_monterey: "536ae72b1f5e8dea9417cd010b787e4dfa94ece6c8fa3da651186f6e2ceb2d8c" + sha256 cellar: :any, arm64_big_sur: "19e9b946bbefe306dc41aa803e5cb48aec3ab62bf334b8975e660f4a3644c0c7" + sha256 cellar: :any, sonoma: "2ecd76892befd509fe79dbf294e309a7ff5ae1333abef885dc984b5a4ef0a486" + sha256 cellar: :any, ventura: "3f960a5ab5e3466341ac6fcf533c317e37183338d770ca5b63f8aec92f48cd1b" + sha256 cellar: :any, monterey: "5e04fd446926530d2a5349d07d0354c4943c75b73220319ec38d27db42bb281e" + sha256 cellar: :any, big_sur: "875f651a4d9b710ce00e899928b2b9dab6f26cbfee670135566821e524d5337a" + sha256 cellar: :any, catalina: "351e8d9e6bfa22b63b035c0f9c0c7e37be52b9e4058c50d7b7ac321eca880e5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "73a9068341d342a933ae584e67ce2820ab612e05bd3ba35f9c2127102d9f2794" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c07dcb0b3e3848fe49493fef2323a7f143fb70a695e67738355f3c1f30008d44" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "hidapi" + + conflicts_with "cspice", because: "both install `simple` binaries" + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + (pkgshare/"tests").install bin/"unittests" + end + + test do + system pkgshare/"tests/unittests" + end +end diff --git a/Formula/o/openiked.rb b/Formula/o/openiked.rb new file mode 100644 index 0000000000000..c8d4d44ef9ea7 --- /dev/null +++ b/Formula/o/openiked.rb @@ -0,0 +1,63 @@ +class Openiked < Formula + desc "IKEv2 daemon - portable version of OpenBSD iked" + homepage "https://openiked.org" + url "https://cdn.openbsd.org/pub/OpenBSD/OpenIKED/openiked-7.4.tar.gz" + mirror "https://mirror.edgecast.com/pub/OpenBSD/OpenIKED/openiked-7.4.tar.gz" + sha256 "19b72b48080240c3eff585f5cbcf6aa7b5734192ad8bc6677ae64a455074358a" + license "ISC" + + livecheck do + url "https://cdn.openbsd.org/pub/OpenBSD/OpenIKED/" + regex(/href=.*?openiked[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "389a513ece12bdc1424bfd0413472870c92b2591d92f4e4fa5c11fbcd97ca0ea" + sha256 arm64_sequoia: "6617660a67f84c4e2cc0c10be9f523df25a65ffded5fcfe49ba494557e9b1fa3" + sha256 arm64_sonoma: "36a643015e36b8c418bc506f11638f8a750f09d04a47204181084f0d6d08b6a4" + sha256 arm64_ventura: "254aef034a2d10277cc1f8234ec8c580e40cd4f12407154a3d80860a84e6439d" + sha256 sonoma: "0fc6152ed7bab0d78931c74a821e771ac561b54b8a8735885cbef6707d4f01b8" + sha256 ventura: "44a959ba4bfde86399a6eaf7843efe14db59376a159f59ce5a3b4dca6a1a4290" + sha256 cellar: :any_skip_relocation, arm64_linux: "96d79b9b681bb06ede6d673219578710236f9547f28892fee23f5b38e9a269c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d42194f764e5ed3cf329655303362999b79fb5350646e57df381c1ecd419c8a" + end + + depends_on "cmake" => :build + depends_on "libevent" + depends_on "openssl@3" + + uses_from_macos "bison" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DHOMEBREW=true", + "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", + "-DCMAKE_INSTALL_MANDIR=#{man}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + libexec.install "build/regress/dh/dhtest" + end + + service do + run opt_sbin/"iked" + keep_alive true + require_root true + working_dir etc + end + + def caveats + <<~EOS + config file can be found here: + #{etc}/iked.conf + + necessary files for configuration can be found here: + #{etc}/iked/ + EOS + end + + test do + system sbin/"iked", "-V" + system libexec/"dhtest" + end +end diff --git a/Formula/o/openimageio.rb b/Formula/o/openimageio.rb new file mode 100644 index 0000000000000..84d8c43551a57 --- /dev/null +++ b/Formula/o/openimageio.rb @@ -0,0 +1,93 @@ +class Openimageio < Formula + desc "Library for reading, processing and writing images" + homepage "https://openimageio.readthedocs.io/en/stable/" + url "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v3.1.7.0.tar.gz" + sha256 "d5160dc44a62897104f44488ebdb19249a78448a25fbae3504fc1ea6fda54878" + license "Apache-2.0" + head "https://github.com/AcademySoftwareFoundation/OpenImageIO.git", branch: "main" + + livecheck do + url :stable + regex(/(?:Release[._-])?v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "75089a4bc34106b6ec707fa0ec58b37cd879d6bd5883ba241cb15a0599cf8100" + sha256 cellar: :any, arm64_sequoia: "bb7ff6fa7ccddd8786255c8df53737ddf68b25f880c6a362f50a604a5e2e64b8" + sha256 cellar: :any, arm64_sonoma: "4b0a2a6c60b5198a46338cd246713437c5b8718b95df64162595897ea85fbb8b" + sha256 cellar: :any, sonoma: "92b82791248c13189a5d9706efef8e15dea78555d77cd23af6c82874c09f843e" + sha256 cellar: :any_skip_relocation, arm64_linux: "eab1c30978f396d67695077b0dcd012f68d83d3cd85c46b482e7ad0406b162e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8975ce7b0b7f994337f60af25fbd8dee9ca5a21edf7bacb6dd4f1315085aabe4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "pybind11" => :build + depends_on "ffmpeg" + depends_on "fmt" # needed for headers + depends_on "freetype" + depends_on "giflib" + depends_on "imath" + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libheif" + depends_on "libpng" + depends_on "libraw" + depends_on "libtiff" + depends_on "opencolorio" + depends_on "openexr" + depends_on "pugixml" + depends_on "python@3.14" + depends_on "tbb" + depends_on "webp" + depends_on "zlib" + + # https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/main/INSTALL.md + fails_with :gcc do + version "8" + cause "Requires GCC 9.3 or later" + end + + def python3 + "python3.14" + end + + def install + py3ver = Language::Python.major_minor_version python3 + ENV["PYTHONPATH"] = site_packages = prefix/Language::Python.site_packages(python3) + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath};#{rpath(source: site_packages/"OpenImageIO")} + -DPython3_EXECUTABLE=#{which(python3)} + -DPYTHON_VERSION=#{py3ver} + -DCCACHE_FOUND= + -DEMBEDPLUGINS=ON + -DOIIO_BUILD_TESTS=OFF + -DOIIO_INTERNALIZE_FMT=OFF + -DUSE_DCMTK=OFF + -DUSE_EXTERNAL_PUGIXML=ON + -DUSE_NUKE=OFF + -DUSE_OPENCV=OFF + -DUSE_OPENJPEG=OFF + -DUSE_PTEX=OFF + -DUSE_QT=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + test_image = test_fixtures("test.jpg") + assert_match "#{test_image} : 1 x 1, 3 channel, uint8 jpeg", + shell_output("#{bin}/oiiotool --info #{test_image} 2>&1") + + output = <<~PYTHON + import OpenImageIO + print(OpenImageIO.VERSION_STRING) + PYTHON + assert_match version.major_minor_patch.to_s, pipe_output(python3, output, 0) + end +end diff --git a/Formula/o/openiothub-server.rb b/Formula/o/openiothub-server.rb new file mode 100644 index 0000000000000..ea1c2db5a45bd --- /dev/null +++ b/Formula/o/openiothub-server.rb @@ -0,0 +1,50 @@ +class OpeniothubServer < Formula + desc "Server for OpenIoTHub" + homepage "https://github.com/OpenIoTHub/server-go" + url "https://github.com/OpenIoTHub/server-go.git", + tag: "v1.2.19", + revision: "3d56b2bce4ae93bc569990ad650bb3ee5102564e" + license "MIT" + head "https://github.com/OpenIoTHub/server-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d080c109d24d79605f27eb16be2e80a2de83e10d5c958f17dccc58fcc3f51a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1cd951d9bb23f7ef43edfb57d9f9bc76663697ab93640148f0ec05aa99af489d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1cd951d9bb23f7ef43edfb57d9f9bc76663697ab93640148f0ec05aa99af489d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1cd951d9bb23f7ef43edfb57d9f9bc76663697ab93640148f0ec05aa99af489d" + sha256 cellar: :any_skip_relocation, sonoma: "93e69edf70c991060b61100822a072f4bec0236254800d82651eb05d812865be" + sha256 cellar: :any_skip_relocation, ventura: "93e69edf70c991060b61100822a072f4bec0236254800d82651eb05d812865be" + sha256 cellar: :any_skip_relocation, arm64_linux: "c3b45f3dcf1ded648b174af3f3d7bcd5b98f272bb8d22e56d3539cfe13b9aca7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a792bc4b0b20944b8fa24491d177d2eaf963e17b694fc04451e5389730a09ef7" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{Utils.git_head} + -X main.date=#{time.iso8601} + -X main.builtBy=#{tap.user} + ] + + (etc/"server-go").mkpath + system "go", "build", "-mod=vendor", *std_go_args(ldflags:) + bin.install_symlink bin/"openiothub-server" => "server-go" + etc.install "server-go.yaml" => "server-go/server-go.yaml" + end + + service do + run [opt_bin/"openiothub-server", "-c", etc/"server-go.yaml"] + keep_alive true + log_path var/"log/openiothub-server.log" + error_log_path var/"log/openiothub-server.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/openiothub-server -v 2>&1") + assert_match "config created", shell_output("#{bin}/openiothub-server init --config=server.yml 2>&1") + assert_path_exists testpath/"server.yml" + end +end diff --git a/Formula/o/openj9.rb b/Formula/o/openj9.rb new file mode 100644 index 0000000000000..667d2284584ac --- /dev/null +++ b/Formula/o/openj9.rb @@ -0,0 +1,263 @@ +class Openj9 < Formula + desc "High performance, scalable, Java virtual machine" + homepage "https://www.eclipse.org/openj9/" + url "https://github.com/eclipse-openj9/openj9.git", + tag: "openj9-0.48.0", + revision: "1d5831436ec378c7dd9f57415bec39d3f5817d57" + license any_of: [ + "EPL-2.0", + "Apache-2.0", + { "GPL-2.0-only" => { with: "Classpath-exception-2.0" } }, + { "GPL-2.0-only" => { with: "OpenJDK-assembly-exception-1.0" } }, + ] + + livecheck do + url :stable + regex(/^openj9-(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "cb5163911364e7dd848768a634f55c99187f51abb9e2d7ece4c1b3f2822b7d71" + sha256 cellar: :any, arm64_sequoia: "29f9ddebb6f36fd0b5bca683d6abee61bc77741f93c6c6e61ec8e990d4e667df" + sha256 cellar: :any, arm64_sonoma: "438e8bcee5e83f44283299e7c303fa83f104d110fb366f4781cc36ba78eaa60f" + sha256 cellar: :any, arm64_ventura: "2ce146ac5d3dd24c2128a3a415ccd7cbde196fba5886a9cfe9b17456f23acef4" + sha256 cellar: :any, sonoma: "556ef126e9179af15826e7eb1877b6733b951990808b4ae5b8875d3ca0927119" + sha256 cellar: :any, ventura: "6ebb3a8c650f109ec0c0769e8d8da7217852fb26099908abd7446a81c0244132" + sha256 arm64_linux: "bb9d01b54445f63cb3ae6d6fe095e08b9c3442bcc15f2dac9858cc34d951409b" + sha256 x86_64_linux: "4a236476593a25dd692c85fc8ded426ddb7d5e63995b42e6c5aa8632a13934d2" + end + + keg_only :shadowed_by_macos + + depends_on "autoconf" => :build + depends_on "bash" => :build + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "giflib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "little-cms2" + + uses_from_macos "m4" => :build + uses_from_macos "cups" + uses_from_macos "libffi" + uses_from_macos "unzip" + uses_from_macos "zip" + uses_from_macos "zlib" + + on_linux do + keg_only "it conflicts with openjdk" + + depends_on "alsa-lib" + depends_on "libx11" + depends_on "libxext" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + depends_on "numactl" + end + + on_intel do + depends_on "nasm" => :build + end + + # From https://github.com/eclipse-openj9/openj9/blob/openj9-#{version}/doc/build-instructions/ + # We use JDK 22 to bootstrap. + resource "boot-jdk" do + on_macos do + on_arm do + url "https://github.com/AdoptOpenJDK/semeru22-binaries/releases/download/jdk-22.0.1%2B8_openj9-0.45.0/ibm-semeru-open-jdk_aarch64_mac_22.0.1_8_openj9-0.45.0.tar.gz" + sha256 "623cc15daa3b4c7f21d47f225c94a163e2261074cc3c11f30d2938fc249b9355" + end + on_intel do + url "https://github.com/AdoptOpenJDK/semeru22-binaries/releases/download/jdk-22.0.1%2B8_openj9-0.45.0/ibm-semeru-open-jdk_x64_mac_22.0.1_8_openj9-0.45.0.tar.gz" + sha256 "f0e459df70b5a3c8fc0abc099d5c06a596da40b95f8226d76474516a646a3861" + end + end + on_linux do + on_arm do + url "https://github.com/AdoptOpenJDK/semeru22-binaries/releases/download/jdk-22.0.1%2B8_openj9-0.45.0/ibm-semeru-open-jdk_aarch64_linux_22.0.1_8_openj9-0.45.0.tar.gz" + sha256 "feb2734b519990d730c577254df5a97f7110bb851994ce775977894a9fdc22c7" + end + on_intel do + url "https://github.com/AdoptOpenJDK/semeru22-binaries/releases/download/jdk-22.0.1%2B8_openj9-0.45.0/ibm-semeru-open-jdk_x64_linux_22.0.1_8_openj9-0.45.0.tar.gz" + sha256 "6e54d984bc0c058ffb7a604810dfffba210d79e12855e5c61e9295fedeff32db" + end + end + end + + resource "omr" do + url "https://github.com/eclipse-openj9/openj9-omr.git", + tag: "openj9-0.48.0", + revision: "d10a4d553a3cfbf35db0bcde9ebccb24cdf1189f" + + # Fix syntax error in OptionFlagArray class definition + # Remove when bumped to openj9-0.53.0 or later. + patch do + url "https://github.com/eclipse-openj9/openj9-omr/commit/29203c807abe45fce56e70b93e80ebaef22b0844.patch?full_index=1" + sha256 "044a26ac76fafc536feb8dfc24c521ef26a66c98b78948f4571293a41ede24ca" + end + end + + resource "openj9-openjdk-jdk" do + url "https://github.com/ibmruntimes/openj9-openjdk-jdk22.git", + tag: "openj9-0.46.1", + revision: "b77827589c585158319340068dae8497b75322c6" + end + + # Fix build on Clang 17+. Backport of: + # https://github.com/itf/libffi/commit/3065c530d3aa50c2b5ee9c01f88a9c0b61732805 + patch :DATA + + def install + openj9_files = buildpath.children + (buildpath/"openj9").install openj9_files + resource("openj9-openjdk-jdk").stage buildpath + resource("omr").stage buildpath/"omr" + boot_jdk = buildpath/"boot-jdk" + resource("boot-jdk").stage boot_jdk + boot_jdk /= "Contents/Home" if OS.mac? + java_options = ENV.delete("_JAVA_OPTIONS") + + config_args = %W[ + --disable-warnings-as-errors-omr + --disable-warnings-as-errors-openj9 + --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} + --with-debug-level=release + --with-jvm-variants=server + --with-native-debug-symbols=none + --with-extra-ldflags=-Wl,-rpath,#{loader_path.gsub("$", "\\$$")},-rpath,#{loader_path.gsub("$", "\\$$")}/server + + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-version-string=#{tap.user} + --with-vendor-vm-bug-url=#{tap.issues_url} + --with-version-build=#{revision} + --without-version-opt + --without-version-pre + + --with-freetype=system + --with-giflib=system + --with-harfbuzz=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-zlib=system + + --enable-ddr=no + --enable-full-docs=no + ] + config_args += if OS.mac? + # Allow unbundling `freetype` on macOS + inreplace "make/autoconf/lib-freetype.m4", '= "xmacosx"', '= ""' + + %W[ + --enable-dtrace + --with-freetype-include=#{Formula["freetype"].opt_include} + --with-freetype-lib=#{Formula["freetype"].opt_lib} + --with-sysroot=#{MacOS.sdk_path} + ] + else + # Override hardcoded /usr/include directory when checking for numa headers + inreplace "closed/autoconf/custom-hook.m4", "/usr/include/numa", Formula["numactl"].opt_include/"numa" + + %W[ + --with-x=#{HOMEBREW_PREFIX} + --with-cups=#{Formula["cups"].opt_prefix} + --with-fontconfig=#{Formula["fontconfig"].opt_prefix} + --with-stdc++lib=dynamic + ] + end + # Ref: https://github.com/eclipse-openj9/openj9/issues/13767 + # TODO: Remove once compressed refs mode is supported on Apple Silicon + config_args << "--with-noncompressedrefs" if OS.mac? && Hardware::CPU.arm? + + ENV["CMAKE_CONFIG_TYPE"] = "Release" + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + system "bash", "./configure", *config_args + system "make", "all", "-j" + + jdk = libexec + if OS.mac? + libexec.install Dir["build/*/images/jdk-bundle/*"].first => "openj9.jdk" + jdk /= "openj9.jdk/Contents/Home" + else + libexec.install Dir["build/linux-*-server-release/images/jdk/*"] + end + rm jdk/"lib/src.zip" + rm_r(jdk.glob("**/*.{dSYM,debuginfo}")) + + bin.install_symlink Dir[jdk/"bin/*"] + include.install_symlink Dir[jdk/"include/*.h"] + include.install_symlink Dir[jdk/"include"/OS.kernel_name.downcase/"*.h"] + man1.install_symlink Dir[jdk/"man/man1/*"] + end + + def caveats + on_macos do + <<~EOS + For the system Java wrappers to find this JDK, symlink it with + sudo ln -sfn #{opt_libexec}/openj9.jdk /Library/Java/JavaVirtualMachines/openj9.jdk + EOS + end + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system bin/"javac", "HelloWorld.java" + + assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") + end +end + +__END__ +diff --git a/runtime/libffi/aarch64/sysv.S b/runtime/libffi/aarch64/sysv.S +index eeaf3f8514..329889cfb3 100644 +--- a/runtime/libffi/aarch64/sysv.S ++++ b/runtime/libffi/aarch64/sysv.S +@@ -76,8 +76,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + x5 closure + */ + +- cfi_startproc + CNAME(ffi_call_SYSV): ++ cfi_startproc + /* Sign the lr with x1 since that is where it will be stored */ + SIGN_LR_WITH_REG(x1) + +@@ -268,8 +268,8 @@ CNAME(ffi_closure_SYSV_V): + #endif + + .align 4 +- cfi_startproc + CNAME(ffi_closure_SYSV): ++ cfi_startproc + SIGN_LR + stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! + cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) +@@ -500,8 +500,8 @@ CNAME(ffi_go_closure_SYSV_V): + #endif + + .align 4 +- cfi_startproc + CNAME(ffi_go_closure_SYSV): ++ cfi_startproc + stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! + cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) + cfi_rel_offset (x29, 0) diff --git a/Formula/o/openjazz.rb b/Formula/o/openjazz.rb new file mode 100644 index 0000000000000..efa92ebd29a57 --- /dev/null +++ b/Formula/o/openjazz.rb @@ -0,0 +1,57 @@ +class Openjazz < Formula + desc "Open source Jazz Jackrabit engine" + homepage "https://www.alister.eu/jazz/oj/" + url "https://github.com/AlisterT/openjazz/archive/refs/tags/20240919.tar.gz" + sha256 "c50193b630c375840026d729bb9dda6c7210b1523e62d7ae019ce2e37f806627" + license "GPL-2.0-only" + head "https://github.com/AlisterT/openjazz.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "0febc2f95efd03671c03ef8ce9687243a2dad0e66009c81005463ffa22590cc7" + sha256 arm64_sequoia: "a7187b8961dddc281206ef88cda1c3f4a58814d0f55b3d6f526ceb8d3c9db01e" + sha256 arm64_sonoma: "1fdf7bc6cc7a1e571240965ef4ba7a404aad892fb358223cfee277d1a0532dd0" + sha256 arm64_ventura: "d0520016ae1625393667870d16f357d577492da14f0786b68f15e3779e723aaf" + sha256 sonoma: "19b1f3221c3f5c2ebd7adfc04a31678e5b977f1ddbdbd8bc7f4a98c547fd21b2" + sha256 ventura: "f97fe8756255c753917f6983306e91dd7744e30ad8192b982f661f448c726786" + sha256 arm64_linux: "46f6d97acd3a0e936733f28485f168a49827155624ffe4d59e294d48562cb946" + sha256 x86_64_linux: "828353e6344b50b4fba0f4603e4f7794495bed782e220186129e1c9d37800daa" + end + + depends_on "cmake" => :build + depends_on "sdl2" + depends_on "sdl2_net" + + uses_from_macos "zlib" + + # From LICENSE.DOC: + # "Epic MegaGames allows and encourages all bulletin board systems and online + # services to distribute this game by modem as long as no files are altered + # or removed." + resource "shareware" do + url "https://image.dosgamesarchive.com/games/jazz.zip" + sha256 "ed025415c0bc5ebc3a41e7a070551bdfdfb0b65b5314241152d8bd31f87c22da" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DDATAPATH=#{pkgshare}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + resource("shareware").stage do + pkgshare.install Dir["*"] + end + end + + def caveats + <<~EOS + The shareware version of Jazz Jackrabbit has been installed. + You can install the full version by copying the game files to: + #{pkgshare} + EOS + end + + test do + system bin/"OpenJazz", "--version" + assert_path_exists testpath/"openjazz.log" + end +end diff --git a/Formula/o/openjdk.rb b/Formula/o/openjdk.rb new file mode 100644 index 0000000000000..9e1ea95470ec5 --- /dev/null +++ b/Formula/o/openjdk.rb @@ -0,0 +1,177 @@ +class Openjdk < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.org/" + url "https://github.com/openjdk/jdk25u/archive/refs/tags/jdk-25.0.1-ga.tar.gz" + sha256 "99864b94b65a9d8e180ec55b8e53a9ab39b0eaebd3ba4438388bf7ea7d5e079a" + license "GPL-2.0-only" => { with: "Classpath-exception-2.0" } + + livecheck do + url :stable + regex(/^jdk[._-]v?(\d+(?:\.\d+)*)-ga$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "87540c366e47ad13fb917902c4533899107be1bc00cbf9cd8f8607d2584e0d1b" + sha256 cellar: :any, arm64_sequoia: "8703b312ccf7a1d45d41e27754c91a189ebbff6f6f203f6dd1b78503b68d63a3" + sha256 cellar: :any, arm64_sonoma: "5ec03fccf5e2fa430f3effeeef62285b123d4e67b1e077f2edf19edfe9eb1437" + sha256 cellar: :any, sonoma: "8ffb199940f468f214c74179ededd183350e64a3bfc281b2e83e71c2363bf281" + sha256 arm64_linux: "60536fe1c9e78a42055182c29ed101e1b42caefeaf6a4dd816c6c2a05041ce98" + sha256 x86_64_linux: "8ab4e9b554a9d6a5253c694d47359cc461d51863b258cfae5d2eb5bd3e5f807a" + end + + keg_only :shadowed_by_macos + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on xcode: :build # for metal + depends_on "freetype" + depends_on "giflib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "little-cms2" + + uses_from_macos "cups" + uses_from_macos "unzip" + uses_from_macos "zip" + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + end + + # From https://jdk.java.net/archive/ + resource "boot-jdk" do + on_macos do + on_arm do + url "https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_macos-aarch64_bin.tar.gz" + sha256 "d2bcbedc348978625e6ad03dda9f8f9993ce6918c34ec5328ec1c1dd2e71e0c7" + end + on_intel do + url "https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_macos-x64_bin.tar.gz" + sha256 "a2ce194209f0a1c311275cdbaadf586e48295303dbacee3ebdf57d17beecdbb2" + end + end + on_linux do + on_arm do + url "https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz" + sha256 "1c2164216387c2f5cbacc7e96ecaa51168d954ac3805312b0a7d4d1e2726f58a" + end + on_intel do + url "https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz" + sha256 "635050717feab0e4c283c8e90e79e944a2b65a3b6b21f1d37dcaadad4cc29548" + end + end + end + + def install + boot_jdk = buildpath/"boot-jdk" + resource("boot-jdk").stage boot_jdk + boot_jdk /= "Contents/Home" if OS.mac? + java_options = ENV.delete("_JAVA_OPTIONS") + + args = %W[ + --disable-warnings-as-errors + --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} + --with-debug-level=release + --with-jvm-variants=server + --with-native-debug-symbols=none + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-version-string=#{tap.user} + --with-vendor-vm-bug-url=#{tap.issues_url} + --with-version-build=#{revision} + --without-version-opt + --without-version-pre + --with-freetype=system + --with-giflib=system + --with-harfbuzz=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-zlib=system + ] + + ldflags = %W[ + -Wl,-rpath,#{loader_path.gsub("$", "\\$$")} + -Wl,-rpath,#{loader_path.gsub("$", "\\$$")}/server + ] + args += if OS.mac? + ldflags << "-headerpad_max_install_names" + + # Allow unbundling `freetype` on macOS + inreplace "make/autoconf/lib-freetype.m4", '= "xmacosx"', '= ""' + + %W[ + --enable-dtrace + --with-freetype-include=#{Formula["freetype"].opt_include} + --with-freetype-lib=#{Formula["freetype"].opt_lib} + --with-sysroot=#{MacOS.sdk_path} + ] + else + %W[ + --with-x=#{HOMEBREW_PREFIX} + --with-cups=#{HOMEBREW_PREFIX} + --with-fontconfig=#{HOMEBREW_PREFIX} + --with-stdc++lib=dynamic + ] + end + args << "--with-extra-ldflags=#{ldflags.join(" ")}" + + # Workaround for Xcode 16 bug: https://bugs.openjdk.org/browse/JDK-8340341. + if DevelopmentTools.clang_build_version == 1600 + args << "--with-extra-cflags=-mllvm -enable-constraint-elimination=0" + end + + system "bash", "configure", *args + + ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" + system "make", "images" + + jdk = libexec + if OS.mac? + libexec.install Dir["build/*/images/jdk-bundle/*"].first => "openjdk.jdk" + jdk /= "openjdk.jdk/Contents/Home" + else + libexec.install Dir["build/linux-*-server-release/images/jdk/*"] + end + + bin.install_symlink Dir[jdk/"bin/*"] + include.install_symlink Dir[jdk/"include/*.h"] + include.install_symlink Dir[jdk/"include"/OS.kernel_name.downcase/"*.h"] + man1.install_symlink Dir[jdk/"man/man1/*"] + end + + def caveats + on_macos do + <<~EOS + For the system Java wrappers to find this JDK, symlink it with + sudo ln -sfn #{opt_libexec}/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk + EOS + end + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system bin/"javac", "HelloWorld.java" + + assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") + end +end diff --git a/Formula/o/openjdk@11.rb b/Formula/o/openjdk@11.rb new file mode 100644 index 0000000000000..59c5bdb81e8ad --- /dev/null +++ b/Formula/o/openjdk@11.rb @@ -0,0 +1,175 @@ +class OpenjdkAT11 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.org/" + url "https://github.com/openjdk/jdk11u/archive/refs/tags/jdk-11.0.29-ga.tar.gz" + sha256 "258bc09a2b1ce6d5965a1538ffaa2e2d25670ac3b75a43e7a08d210257e99bfc" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^jdk[._-]v?(11(?:\.\d+)*)-ga$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b875ce8663a9289eccae0fa30d62bdcda5d3b631042815a2328cdf7b7ac9dd87" + sha256 cellar: :any, arm64_sequoia: "9384f064288561194d829c9ae8ddf9317779dbb03719147bd083947102a3eae7" + sha256 cellar: :any, arm64_sonoma: "51e1988c65678c7aee681f8bd8e3a9b72990f95261a63462bea27b5e97c34165" + sha256 cellar: :any, sonoma: "ee236dbfc3233de084214b44b53b914a335b654eec29091d090ee72831fe76c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d50a89130774edf8e0f479db89fd1c474ead639c66a5c31e5d0774861ea0853a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8598539e03ab4926b51f70220f899345166cce89b72f049da2960a60b80e7692" + end + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "giflib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "little-cms2" + + uses_from_macos "cups" + uses_from_macos "unzip" + uses_from_macos "zip" + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + end + + # ARM64: https://www.azul.com/downloads/?version=java-11-lts&package=jdk + # Intel: https://jdk.java.net/archive/ + resource "boot-jdk" do + on_macos do + on_arm do + url "https://cdn.azul.com/zulu/bin/zulu11.68.17-ca-jdk11.0.21-macosx_aarch64.tar.gz" + sha256 "f7b7d10d42b75f9ac8e7311732d039faee2ce854b9ad462e0936e6c88d01a19f" + end + on_intel do + url "https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz" + sha256 "f365750d4be6111be8a62feda24e265d97536712bc51783162982b8ad96a70ee" + end + end + on_linux do + on_arm do + url "https://cdn.azul.com/zulu/bin/zulu11.68.17-ca-jdk11.0.21-linux_aarch64.tar.gz" + sha256 "5638887df0e680c890b4c6f9543c9b61c96c90fb01f877d79ae57566466d3b3d" + end + on_intel do + url "https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz" + sha256 "99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57" + end + end + end + + def install + boot_jdk = buildpath/"boot-jdk" + resource("boot-jdk").stage boot_jdk + boot_jdk /= "Contents/Home" if OS.mac? && !Hardware::CPU.arm? + java_options = ENV.delete("_JAVA_OPTIONS") + + args = %W[ + --disable-hotspot-gtest + --disable-warnings-as-errors + --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} + --with-debug-level=release + --with-conf-name=release + --with-jvm-variants=server + --with-jvm-features=shenandoahgc + --with-native-debug-symbols=none + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-version-string=#{tap.user} + --with-vendor-vm-bug-url=#{tap.issues_url} + --without-version-opt + --without-version-pre + --with-freetype=system + --with-giflib=system + --with-harfbuzz=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-zlib=system + ] + + ldflags = ["-Wl,-rpath,#{loader_path.gsub("$", "\\$$")}/server"] + args += if OS.mac? + ldflags << "-headerpad_max_install_names" + + # Allow unbundling `freetype` on macOS + inreplace "make/autoconf/lib-freetype.m4", '= "xmacosx"', '= ""' + + %W[ + --enable-dtrace + --with-freetype-include=#{Formula["freetype"].opt_include} + --with-freetype-lib=#{Formula["freetype"].opt_lib} + --with-sysroot=#{MacOS.sdk_path} + ] + else + %W[ + --with-x=#{HOMEBREW_PREFIX} + --with-cups=#{HOMEBREW_PREFIX} + --with-fontconfig=#{HOMEBREW_PREFIX} + --with-stdc++lib=dynamic + ] + end + args << "--with-extra-ldflags=#{ldflags.join(" ")}" + + if DevelopmentTools.clang_build_version == 1600 + args << "--with-extra-cflags=-mllvm -enable-constraint-elimination=0" + end + + system "bash", "configure", *args + + ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" + system "make", "images", "CONF=release" + + jdk = libexec + if OS.mac? + libexec.install Dir["build/release/images/jdk-bundle/*"].first => "openjdk.jdk" + jdk /= "openjdk.jdk/Contents/Home" + else + libexec.install Dir["build/release/images/jdk/*"] + end + + bin.install_symlink Dir[jdk/"bin/*"] + include.install_symlink Dir[jdk/"include/*.h"] + include.install_symlink Dir[jdk/"include"/OS.kernel_name.downcase/"*.h"] + man1.install_symlink Dir[jdk/"man/man1/*"] + end + + def caveats + on_macos do + <<~EOS + For the system Java wrappers to find this JDK, symlink it with + sudo ln -sfn #{opt_libexec}/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk + EOS + end + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system bin/"javac", "HelloWorld.java" + + assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") + end +end diff --git a/Formula/o/openjdk@17.rb b/Formula/o/openjdk@17.rb new file mode 100644 index 0000000000000..2d40fe57530a1 --- /dev/null +++ b/Formula/o/openjdk@17.rb @@ -0,0 +1,174 @@ +class OpenjdkAT17 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.org/" + url "https://github.com/openjdk/jdk17u/archive/refs/tags/jdk-17.0.17-ga.tar.gz" + sha256 "e2d1d92a4a593d9a87054ea54f76fcb6119f782c57945506a2ec4adff6ddc123" + license "GPL-2.0-only" => { with: "Classpath-exception-2.0" } + + livecheck do + url :stable + regex(/^jdk[._-]v?(17(?:\.\d+)*)-ga$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8973cb405d9de31e40a989d94c7ef14d5d2cb1fc9c08fe031fabdda0640b6846" + sha256 cellar: :any, arm64_sequoia: "8980db6e672373904a148f8ca10d5238d4096dbb0f081bd2b5aa48c37f370e3c" + sha256 cellar: :any, arm64_sonoma: "b304c00f857f614149d3494003748ece6ce253a0bb045df2bb40f1c86d4c051d" + sha256 cellar: :any, sonoma: "2896bdcf4e722984c3316a5461e137cb04088f95f0a421a3cfebdae5ff9e02f8" + sha256 arm64_linux: "1de3f91ff7f57024649fd9a4459b0b63354c1fe0f61f08acb66d555a9c9c4ba4" + sha256 x86_64_linux: "32129c40cb6e7ff0ffc8545b384b3714484b213588fc9c6003d49a03f45bf469" + end + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on xcode: :build # for metal + + depends_on "freetype" + depends_on "giflib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "little-cms2" + + uses_from_macos "cups" + uses_from_macos "unzip" + uses_from_macos "zip" + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + end + + # From https://jdk.java.net/archive/ + resource "boot-jdk" do + on_macos do + on_arm do + url "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_macos-aarch64_bin.tar.gz" + sha256 "602d7de72526368bb3f80d95c4427696ea639d2e0cc40455f53ff0bbb18c27c8" + end + on_intel do + url "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_macos-x64_bin.tar.gz" + sha256 "b85c4aaf7b141825ad3a0ea34b965e45c15d5963677e9b27235aa05f65c6df06" + end + end + on_linux do + on_arm do + url "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-aarch64_bin.tar.gz" + sha256 "13bfd976acf8803f862e82c7113fb0e9311ca5458b1decaef8a09ffd91119fa4" + end + on_intel do + url "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz" + sha256 "0022753d0cceecacdd3a795dd4cea2bd7ffdf9dc06e22ffd1be98411742fbb44" + end + end + end + + def install + boot_jdk = buildpath/"boot-jdk" + resource("boot-jdk").stage boot_jdk + boot_jdk /= "Contents/Home" if OS.mac? + java_options = ENV.delete("_JAVA_OPTIONS") + + args = %W[ + --disable-warnings-as-errors + --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} + --with-debug-level=release + --with-jvm-variants=server + --with-native-debug-symbols=none + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-version-string=#{tap.user} + --with-vendor-vm-bug-url=#{tap.issues_url} + --with-version-build=#{revision} + --without-version-opt + --without-version-pre + --with-freetype=system + --with-giflib=system + --with-harfbuzz=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-zlib=system + ] + + ldflags = ["-Wl,-rpath,#{loader_path.gsub("$", "\\$$")}/server"] + args += if OS.mac? + ldflags << "-headerpad_max_install_names" + + # Allow unbundling `freetype` on macOS + inreplace "make/autoconf/lib-freetype.m4", '= "xmacosx"', '= ""' + + %W[ + --enable-dtrace + --with-freetype-include=#{Formula["freetype"].opt_include} + --with-freetype-lib=#{Formula["freetype"].opt_lib} + --with-sysroot=#{MacOS.sdk_path} + ] + else + %W[ + --with-x=#{HOMEBREW_PREFIX} + --with-cups=#{HOMEBREW_PREFIX} + --with-fontconfig=#{HOMEBREW_PREFIX} + --with-stdc++lib=dynamic + ] + end + args << "--with-extra-ldflags=#{ldflags.join(" ")}" + + if DevelopmentTools.clang_build_version == 1600 && MacOS::Xcode.version < "16.2" + args << "--with-extra-cflags=-mllvm -enable-constraint-elimination=0" + end + + system "bash", "configure", *args + + ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" + system "make", "images" + + jdk = libexec + if OS.mac? + libexec.install Dir["build/*/images/jdk-bundle/*"].first => "openjdk.jdk" + jdk /= "openjdk.jdk/Contents/Home" + else + libexec.install Dir["build/linux-*-server-release/images/jdk/*"] + end + + bin.install_symlink Dir[jdk/"bin/*"] + include.install_symlink Dir[jdk/"include/*.h"] + include.install_symlink Dir[jdk/"include"/OS.kernel_name.downcase/"*.h"] + man1.install_symlink Dir[jdk/"man/man1/*"] + end + + def caveats + on_macos do + <<~EOS + For the system Java wrappers to find this JDK, symlink it with + sudo ln -sfn #{opt_libexec}/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk + EOS + end + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system bin/"javac", "HelloWorld.java" + + assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") + end +end diff --git a/Formula/o/openjdk@21.rb b/Formula/o/openjdk@21.rb new file mode 100644 index 0000000000000..5316d2bce7e40 --- /dev/null +++ b/Formula/o/openjdk@21.rb @@ -0,0 +1,173 @@ +class OpenjdkAT21 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.org/" + url "https://github.com/openjdk/jdk21u/archive/refs/tags/jdk-21.0.9-ga.tar.gz" + sha256 "4ffe05ff839192b01ed53ccd69835f7b5508bee7ca0d5703ac210897065e7ff0" + license "GPL-2.0-only" => { with: "Classpath-exception-2.0" } + + livecheck do + url :stable + regex(/^jdk[._-]v?(21(?:\.\d+)*)-ga$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "53694ee6766df66967355a00fc893355a6c3d7814d8aece0eefbb24719508cfa" + sha256 cellar: :any, arm64_sequoia: "6da1aa9d6eb871aaca17449374b3872bc67a18d3705944ffb3dc3ab838b50fc5" + sha256 cellar: :any, arm64_sonoma: "fc1236d1bb65ea00e8058f04a40a6a969293b0369e7bab43217b20b3dcdddab9" + sha256 cellar: :any, sonoma: "df11c8f9cecc07030b2780ebedd99b3998c6505a6561c48c193717fb68be5dba" + sha256 arm64_linux: "9e0ea8de81c50ebccb01562453b6d29627a99b14c03ff7eb670f1ce6530e01dd" + sha256 x86_64_linux: "9268eb6345ceb06807abce68e306a3312d9eef4116d016821feb8004700422c3" + end + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on xcode: :build # for metal + depends_on "freetype" + depends_on "giflib" + depends_on "harfbuzz" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "little-cms2" + + uses_from_macos "cups" + uses_from_macos "unzip" + uses_from_macos "zip" + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + end + + # From https://jdk.java.net/archive/ + resource "boot-jdk" do + on_macos do + on_arm do + url "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz" + sha256 "b3d588e16ec1e0ef9805d8a696591bd518a5cea62567da8f53b5ce32d11d22e4" + end + on_intel do + url "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-x64_bin.tar.gz" + sha256 "8fd09e15dc406387a0aba70bf5d99692874e999bf9cd9208b452b5d76ac922d3" + end + end + on_linux do + on_arm do + url "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz" + sha256 "08db1392a48d4eb5ea5315cf8f18b89dbaf36cda663ba882cf03c704c9257ec2" + end + on_intel do + url "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz" + sha256 "a2def047a73941e01a73739f92755f86b895811afb1f91243db214cff5bdac3f" + end + end + end + + def install + boot_jdk = buildpath/"boot-jdk" + resource("boot-jdk").stage boot_jdk + boot_jdk /= "Contents/Home" if OS.mac? + java_options = ENV.delete("_JAVA_OPTIONS") + + args = %W[ + --disable-warnings-as-errors + --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} + --with-debug-level=release + --with-jvm-variants=server + --with-native-debug-symbols=none + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-version-string=#{tap.user} + --with-vendor-vm-bug-url=#{tap.issues_url} + --with-version-build=#{revision} + --without-version-opt + --without-version-pre + --with-freetype=system + --with-giflib=system + --with-harfbuzz=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-zlib=system + ] + + ldflags = ["-Wl,-rpath,#{loader_path.gsub("$", "\\$$")}/server"] + args += if OS.mac? + ldflags << "-headerpad_max_install_names" + + # Allow unbundling `freetype` on macOS + inreplace "make/autoconf/lib-freetype.m4", '= "xmacosx"', '= ""' + + %W[ + --enable-dtrace + --with-freetype-include=#{Formula["freetype"].opt_include} + --with-freetype-lib=#{Formula["freetype"].opt_lib} + --with-sysroot=#{MacOS.sdk_path} + ] + else + %W[ + --with-x=#{HOMEBREW_PREFIX} + --with-cups=#{HOMEBREW_PREFIX} + --with-fontconfig=#{HOMEBREW_PREFIX} + --with-stdc++lib=dynamic + ] + end + args << "--with-extra-ldflags=#{ldflags.join(" ")}" + + if DevelopmentTools.clang_build_version == 1600 + args << "--with-extra-cflags=-mllvm -enable-constraint-elimination=0" + end + + system "bash", "configure", *args + + ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" + system "make", "images" + + jdk = libexec + if OS.mac? + libexec.install Dir["build/*/images/jdk-bundle/*"].first => "openjdk.jdk" + jdk /= "openjdk.jdk/Contents/Home" + else + libexec.install Dir["build/linux-*-server-release/images/jdk/*"] + end + + bin.install_symlink Dir[jdk/"bin/*"] + include.install_symlink Dir[jdk/"include/*.h"] + include.install_symlink Dir[jdk/"include"/OS.kernel_name.downcase/"*.h"] + man1.install_symlink Dir[jdk/"man/man1/*"] + end + + def caveats + on_macos do + <<~EOS + For the system Java wrappers to find this JDK, symlink it with + sudo ln -sfn #{opt_libexec}/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk + EOS + end + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system bin/"javac", "HelloWorld.java" + + assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") + end +end diff --git a/Formula/o/openjdk@8.rb b/Formula/o/openjdk@8.rb new file mode 100644 index 0000000000000..d7bf0439fb26b --- /dev/null +++ b/Formula/o/openjdk@8.rb @@ -0,0 +1,267 @@ +class OpenjdkAT8 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.org/" + url "https://github.com/openjdk/jdk8u/archive/refs/tags/jdk8u472-ga.tar.gz" + version "1.8.0-472" + BUILD_NUMBER = "b08".freeze # Please update when a new GA release is available: https://wiki.openjdk.org/display/jdk8u. + sha256 "5456de1d58bd95ecd0df04f5bddb29fd4405e50b2e48efb3bf0494e9d76e1cf0" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^jdk(8u\d+)-ga$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.gsub("8u", "1.8.0+") } + end + end + + bottle do + sha256 cellar: :any, sonoma: "39928ffb72364e89bc42915b1bbb57e4a36e73c03e393ae2e658df5430727f29" + sha256 cellar: :any_skip_relocation, arm64_linux: "0357fab4a3a2e80aebc13c6ecde1fed0c01de7c27a7bcdc9225cfca505d8160a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "338b6129353a920862869fb32a114ada3080542d7ae92ccb1d0595aa49158259" + end + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "giflib" + + uses_from_macos "cups" + uses_from_macos "unzip" + uses_from_macos "zip" + + on_macos do + depends_on arch: :x86_64 + end + + on_monterey :or_newer do + depends_on "gawk" => :build + end + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + end + + # NOTE: Oracle doesn't serve JDK 7 downloads anymore, so we use Zulu JDK 7 for bootstrapping. + # https://www.azul.com/downloads/?version=java-7-lts&package=jdk&show-old-builds=true#zulu + resource "boot-jdk" do + on_macos do + url "https://cdn.azul.com/zulu/bin/zulu7.56.0.11-ca-jdk7.0.352-macosx_x64.tar.gz" + sha256 "31909aa6233289f8f1d015586825587e95658ef59b632665e1e49fc33a2cdf06" + end + on_linux do + on_arm do + url "https://cdn.azul.com/zulu/bin/zulu8.82.0.21-ca-jdk8.0.432-linux_aarch64.tar.gz" + sha256 "b400f65b63243e41851f20b64374def6ae687de8d15bfb37ef876c2d77548bf5" + end + on_intel do + url "https://cdn.azul.com/zulu/bin/zulu7.56.0.11-ca-jdk7.0.352-linux_x64.tar.gz" + sha256 "8a7387c1ed151474301b6553c6046f865dc6c1e1890bcf106acc2780c55727c8" + end + end + end + + # NOTE: Since macOS Sonoma or newer don't include the required headers for JNF (JavaNativeFoundation.framework), + # we will use the headers provided at https://github.com/apple/openjdk. + resource "JavaNativeFoundation" do + on_sonoma :or_newer do + url "https://github.com/apple/openjdk/archive/refs/tags/iTunesOpenJDK-1014.0.2.12.1.tar.gz" + sha256 "e8556a73ea36c75953078dfc1bafc9960e64593bc01e733bc772d2e6b519fd4a" + end + end + + # Fix `clang++ -std=gnu++11` compile failure issue on macOS. + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/04ad4a17332e391cd359271965d4c6dac87a7eb2/java/openjdk8/files/0001-8181503-Can-t-compile-hotspot-with-c-11.patch" + sha256 "a02e0ea7c70390796e46b8b6565f986fedc17a08aa039ee3306438a39a60538a" + end + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/04ad4a17332e391cd359271965d4c6dac87a7eb2/java/openjdk8/files/0006-Disable-C-11-warnings.patch" + sha256 "127d9508b72005e849a6ada6adf04bd49a236731d769810e67793bdf2aa722fe" + end + patch :p0, :DATA + + def install + _, _, update = version.to_s.rpartition("-") + boot_jdk = buildpath/"boot-jdk" + resource("boot-jdk").stage boot_jdk + java_options = ENV.delete("_JAVA_OPTIONS") + + # Work around clashing -I/usr/include and -isystem headers, as superenv already handles this detail for us. + inreplace "common/autoconf/flags.m4", + '-isysroot \"$SYSROOT\"', "" + inreplace "common/autoconf/toolchain.m4", + '-isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"', "" + inreplace "hotspot/make/bsd/makefiles/saproc.make", + '-isysroot "$(SDKPATH)" -iframework"$(SDKPATH)/System/Library/Frameworks"', "" + + if OS.mac? + # Fix macOS version detection. After 10.10 this was changed to a 6 digit number, + # but this Makefile was written in the era of 4 digit numbers. + inreplace "hotspot/make/bsd/makefiles/gcc.make" do |s| + s.gsub! "$(subst .,,$(MACOSX_VERSION_MIN))", ENV["HOMEBREW_MACOS_VERSION_NUMERIC"] + s.gsub! "MACOSX_VERSION_MIN=10.7.0", "MACOSX_VERSION_MIN=#{MacOS.version}" + end + else + # Fix linker errors on brewed GCC. + inreplace "common/autoconf/flags.m4", "-Xlinker -O1", "" + inreplace "hotspot/make/linux/makefiles/gcc.make", "-Xlinker -O1", "" + end + + args = %W[ + --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} + --with-debug-level=release + --with-conf-name=release + --with-jvm-variants=server + --with-milestone=fcs + --with-native-debug-symbols=none + --with-update-version=#{update} + --with-build-number=#{BUILD_NUMBER} + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-vm-bug-url=#{tap.issues_url} + --with-giflib=system + ] + + ldflags = ["-Wl,-rpath,#{loader_path.gsub("$", "\\$$$$")}/server"] + if OS.mac? + args += %w[ + --with-toolchain-type=clang + --with-zlib=system + ] + + extra_cflags = [] + extra_cxxflags = [] + + # On macOS Sonoma or newer, we provide the missing JNF headers from an external resource. + if MacOS.version >= :sonoma + resource("JavaNativeFoundation").stage do + jnf_headers = buildpath/"jnf-headers" + jnf_headers.install Pathname.pwd/"apple/JavaNativeFoundation/JavaNativeFoundation" + # Work around for missing 'JavaNativeFoundation/JavaNativeFoundation.h' in MacosxDebuggerLocal.m. + (buildpath/"hotspot/agent/src/os/bsd").install_symlink jnf_headers + # Add JNF headers to extra flags. + extra_cflags << "-I#{jnf_headers}" + extra_cxxflags << "-I#{jnf_headers}" + end + end + + # Work around Xcode 16 bug: https://bugs.openjdk.org/browse/JDK-8340341. + extra_cflags << "-mllvm -enable-constraint-elimination=0" if DevelopmentTools.clang_build_version == 1600 + + args << "--with-extra-cflags=#{extra_cflags.join(" ")}" unless extra_cflags.empty? + args << "--with-extra-cxxflags=#{extra_cxxflags.join(" ")}" unless extra_cxxflags.empty? + else + args += %W[ + --with-toolchain-type=gcc + --x-includes=#{HOMEBREW_PREFIX}/include + --x-libraries=#{HOMEBREW_PREFIX}/lib + --with-cups=#{HOMEBREW_PREFIX} + --with-fontconfig=#{HOMEBREW_PREFIX} + --with-stdc++lib=dynamic + ] + arch = Hardware::CPU.arm? ? "aarch64" : "amd64" + extra_rpath = rpath(source: libexec/"lib"/arch, target: libexec/"jre/lib"/arch) + ldflags << "-Wl,-rpath,#{extra_rpath.gsub("$", "\\$$$$")}" + end + args << "--with-extra-ldflags=#{ldflags.join(" ")}" + + system "bash", "common/autoconf/autogen.sh" + system "bash", "configure", *args + + ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" + system "make", "bootcycle-images", "CONF=release" + + cd "build/release/images" do + jdk = libexec + + if OS.mac? + libexec.install Dir["j2sdk-bundle/*"].first => "openjdk.jdk" + jdk /= "openjdk.jdk/Contents/Home" + else + libexec.install Dir["j2sdk-image/*"] + end + + bin.install_symlink Dir[jdk/"bin/*"] + include.install_symlink Dir[jdk/"include/*.h"] + include.install_symlink Dir[jdk/"include/*/*.h"] + man1.install_symlink Dir[jdk/"man/man1/*"] + end + end + + def caveats + on_macos do + <<~EOS + For the system Java wrappers to find this JDK, symlink it with + sudo ln -sfn #{opt_libexec}/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-8.jdk + EOS + end + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system bin/"javac", "HelloWorld.java" + + assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") + end +end + +__END__ +--- jdk/src/share/bin/splashscreen_stubs.c ++++ jdk/src/share/bin/splashscreen_stubs.c +@@ -61,11 +61,11 @@ + #define INVOKEV(name) _INVOKE(name, ,;) + + int DoSplashLoadMemory(void* pdata, int size) { +- INVOKE(SplashLoadMemory, NULL)(pdata, size); ++ INVOKE(SplashLoadMemory, 0)(pdata, size); + } + + int DoSplashLoadFile(const char* filename) { +- INVOKE(SplashLoadFile, NULL)(filename); ++ INVOKE(SplashLoadFile, 0)(filename); + } + + void DoSplashInit(void) { + +--- jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp ++++ jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp +@@ -292,7 +292,7 @@ + + if (uPtr->aborting()) { + THROW_IOE(uPtr->get_abort_message()); +- return false; ++ return 0; + } + + // We have fetched all the files. +--- jdk/src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_Ports.cpp ++++ jdk/src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_Ports.cpp +@@ -609,7 +609,7 @@ + // get the channel name + char *channelName; + CFStringRef cfname = NULL; +- const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, ch}; ++ const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, (unsigned)ch}; + UInt32 size = sizeof(cfname); + OSStatus err = AudioObjectGetPropertyData(mixer->deviceID, &address, 0, NULL, &size, &cfname); + if (err == noErr) { diff --git a/Formula/o/openjpeg.rb b/Formula/o/openjpeg.rb new file mode 100644 index 0000000000000..b081d9c79ce16 --- /dev/null +++ b/Formula/o/openjpeg.rb @@ -0,0 +1,51 @@ +class Openjpeg < Formula + desc "Library for JPEG-2000 image manipulation" + homepage "https://www.openjpeg.org/" + url "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.4.tar.gz" + sha256 "a695fbe19c0165f295a8531b1e4e855cd94d0875d2f88ec4b61080677e27188a" + license "BSD-2-Clause" + head "https://github.com/uclouvain/openjpeg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e9becf9b440b08fd771dbaa75d4f5b06a49119f9ce163e6ad08f272f4f3b9c9d" + sha256 cellar: :any, arm64_sequoia: "8e3ac331458daccf876225a4236bad7d28689ea197c6bb7d2640ec47d78a510d" + sha256 cellar: :any, arm64_sonoma: "0eff9d5aae88cd27eaaedb4a4f56804ae14c4ed9df1c856846ff81ebc3dcb4c2" + sha256 cellar: :any, sonoma: "29b22e2c699765b32b3511f65bd87f6860d6bbf5f5f75e3b3ed5e268f6a547bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "b570231cdd2898452318819d0dc97662145a463e0ba3162a113163e0f0066e2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea1906cdeecd5edc87703596cc084dc305834b030af3847a8520f9eb8566eb1e" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "libpng" + depends_on "libtiff" + depends_on "little-cms2" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DBUILD_DOC=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main () { + opj_image_cmptparm_t cmptparm; + const OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY; + + opj_image_t *image; + image = opj_image_create(1, &cmptparm, color_space); + + opj_image_destroy(image); + return 0; + } + C + system ENV.cc, "-I#{include.children.first}", + testpath/"test.c", "-L#{lib}", "-lopenjp2", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/openjph.rb b/Formula/o/openjph.rb new file mode 100644 index 0000000000000..f2d573a335736 --- /dev/null +++ b/Formula/o/openjph.rb @@ -0,0 +1,44 @@ +class Openjph < Formula + desc "Open-source implementation of JPEG2000 Part-15 (or JPH or HTJ2K)" + homepage "https://github.com/aous72/OpenJPH" + url "https://github.com/aous72/OpenJPH/archive/refs/tags/0.25.0.tar.gz" + sha256 "376fe46b8234e48eff0d26ce0bb9d0ee73aab5714a8b72a31d73d166b75aa62a" + license "BSD-2-Clause" + head "https://github.com/aous72/OpenJPH.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "553c878d754d6c03a1a0110657d98062a13ff44d326cbc96f0201d16820785d1" + sha256 cellar: :any, arm64_sequoia: "6e31572a70adef98dcb35756af04e63b9427c7327e030b95ed25d74f72523d46" + sha256 cellar: :any, arm64_sonoma: "84c401ebd40403443c490be3cf29bf8a017ec8fde6048cb088ac735261550d2e" + sha256 cellar: :any, sonoma: "9c26fe1966ecf55e22e71c159d9c9a808a77c8ab1e10afb0bd8bb2eee606a650" + sha256 cellar: :any_skip_relocation, arm64_linux: "84678afac0aca54d287686c5266f1cfd4ec47401572feb6dd73bd6ce1747ce58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "640c6991922625d92baaca3beec0813cf305d0ad55e7d5aff516302e2a21ba69" + end + + depends_on "cmake" => :build + depends_on "libtiff" + + def install + ENV["DYLD_LIBRARY_PATH"] = lib.to_s + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test.ppm" do + url "https://raw.githubusercontent.com/aous72/jp2k_test_codestreams/ca2d370/openjph/references/Malamute.ppm" + sha256 "e4e36966d68a473a7f5f5719d9e41c8061f2d817f70a7de1c78d7e510a6391ff" + end + resource("homebrew-test.ppm").stage testpath + + system bin/"ojph_compress", "-i", "Malamute.ppm", "-o", "homebrew.j2c" + system bin/"ojph_expand", "-i", "homebrew.j2c", "-o", "homebrew.ppm" + assert_path_exists testpath/"homebrew.ppm" + end +end diff --git a/Formula/o/openkim-models.rb b/Formula/o/openkim-models.rb new file mode 100644 index 0000000000000..3639dc815582a --- /dev/null +++ b/Formula/o/openkim-models.rb @@ -0,0 +1,56 @@ +class OpenkimModels < Formula + desc "All OpenKIM Models compatible with kim-api" + homepage "https://openkim.org" + url "https://s3.openkim.org/archives/collection/openkim-models-2021-08-11.txz" + sha256 "f42d241969787297d839823bdd5528bc9324cd2d85f5cf2054866e654ce576da" + license "CDDL-1.0" + revision 1 + + livecheck do + url "https://s3.openkim.org/archives/collection/" + regex(/href=.*?openkim-models[._-]v?(\d+(?:-\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f0835dfa801e64cfd8157312b79d8f4c7e1de78625e6d9f8fab9fa6aa3d6d9e4" + sha256 cellar: :any, arm64_sequoia: "4b54c417f0e9a9012499d60c41935324c7de81a54bccf1710f68528201eccb9a" + sha256 cellar: :any, arm64_sonoma: "ca3243c57f7b498ea49744ea96163e585158aff2d69fe10523598a986b302e0b" + sha256 cellar: :any, arm64_ventura: "458fc81fd6c2a1b3e0599f4ac40c1d40d7168f32407ec6f3c34db3b4215daa63" + sha256 cellar: :any, arm64_monterey: "58cbde998d51cce50b663b5b5aa11cbf9e4f5c6709a01e8b4987b09702ac27e7" + sha256 cellar: :any, arm64_big_sur: "d6a0d32d4b8294e21121821eae9cb1c09b8c931f50216336b2b58fc16339655f" + sha256 cellar: :any, sonoma: "ac768544fe9309e2850baac18955339bf1f1ddc6a2139811342613aad3aee00d" + sha256 cellar: :any, ventura: "acf39b7ad37d761a964977286b954a7bee4d3e8d587e5c5bea6ae697765c5269" + sha256 cellar: :any, monterey: "be743d4bb17d99cabec6bd66e5ca8b486ba4c98722a4a6d8ff5e473e5ee0c6fb" + sha256 cellar: :any, big_sur: "0000ba2923c829367dc9e2b39c88935785aa18e5b536ab5237d61e9057bf5729" + sha256 cellar: :any, catalina: "f07f32fc9be97e8a285fc350d18feb98bbf58a8b0a4be8ee7fde853053216cf2" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d35e7b5241239dc19a17ba45ee5ed24d6f06689796d612abfec2ba28d0b393c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b10942f7fcbe44a43a4390fceef8b8b508c80c020ce5dec6101b3b30bc3977e7" + end + + depends_on "cmake" => :build + depends_on "kim-api" + + on_macos do + depends_on "gcc" + end + + def install + args = %W[ + -DKIM_API_MODEL_DRIVER_INSTALL_PREFIX=#{lib}/openkim-models/model-drivers + -DKIM_API_PORTABLE_MODEL_INSTALL_PREFIX=#{lib}/openkim-models/portable-models + -DKIM_API_SIMULATOR_MODEL_INSTALL_PREFIX=#{lib}/openkim-models/simulator-models + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("kim-api-collections-management list") + assert_match "LJ_ElliottAkerson_2015_Universal__MO_959249795837_003", output + end +end diff --git a/Formula/o/openldap.rb b/Formula/o/openldap.rb new file mode 100644 index 0000000000000..6449c2263a191 --- /dev/null +++ b/Formula/o/openldap.rb @@ -0,0 +1,102 @@ +class Openldap < Formula + desc "Open source suite of directory software" + homepage "https://www.openldap.org/software/" + url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.10.tgz" + mirror "http://fresh-center.net/linux/misc/openldap-2.6.10.tgz" + mirror "http://fresh-center.net/linux/misc/legacy/openldap-2.6.10.tgz" + sha256 "c065f04aad42737aebd60b2fe4939704ac844266bc0aeaa1609f0cad987be516" + license "OLDAP-2.8" + revision 1 + + livecheck do + url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/" + regex(/href=.*?openldap[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "2e201b0ef1eeb3990d14dd4905ecaf36cb6acbb9457093007ed304b97a6a9856" + sha256 arm64_sequoia: "248a79f1498bbff0644cb1980d1efabf399d71f4251df230b7e6161d14482309" + sha256 arm64_sonoma: "e1e547e9f5a91f21715853710892d69d0356947128b15a9ae16c7b69b2c8222c" + sha256 arm64_ventura: "bacfcb76abf64fb280a1e845abc7ef842aa8ddaafb3c7b1a4b68e7e9cd66161d" + sha256 sonoma: "8845255968f6ce00273b24b4ec963913900cd33179ee6a5b8e29b887f84364bd" + sha256 ventura: "77370c7be27839f6b1c67b6594ede02919dafe3ce30760eddd033b382b38785c" + sha256 arm64_linux: "d6aa23170013b357b634255d980bf589fc5104f38536e99a524ffbdd20dd17e7" + sha256 x86_64_linux: "6593c993b1e061f4f5bd11a3a0a98cdb64244d35a12d0787797daaaa9ea4cb47" + end + + keg_only :provided_by_macos + + depends_on "openssl@3" + + uses_from_macos "mandoc" => :build + uses_from_macos "cyrus-sasl" + + on_linux do + depends_on "util-linux" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --sysconfdir=#{etc} + --localstatedir=#{var} + --enable-accesslog + --enable-auditlog + --enable-bdb=no + --enable-constraint + --enable-dds + --enable-deref + --enable-dyngroup + --enable-dynlist + --enable-hdb=no + --enable-memberof + --enable-ppolicy + --enable-proxycache + --enable-refint + --enable-retcode + --enable-seqmod + --enable-sssvlv + --enable-translucent + --enable-unique + --enable-valsort + --with-cyrus-sasl + --without-systemd + ] + + soelim = if OS.mac? + if MacOS.version >= :ventura + "mandoc_soelim" + else + "soelim" + end + else + "bsdsoelim" + end + + system "./configure", *args + system "make", "install", "SOELIM=#{soelim}" + (var/"run").mkpath + + # https://github.com/Homebrew/homebrew-dupes/pull/452 + chmod 0755, etc.glob("openldap/*") + chmod 0755, etc.glob("openldap/schema/*") + + # Don't embed Cellar references in files installed in `etc`. + # Passing `build.bottle?` ensures that inreplace failures result in build failures + # only when building a bottle. This helps avoid problems for users who build from source + # and may have an old version of these files in `etc`. + inreplace etc.glob("openldap/slapd.{conf,ldif}"), prefix, opt_prefix, audit_result: build.bottle? + end + + test do + system sbin/"slappasswd", "-s", "test" + end +end diff --git a/Formula/o/openliberty-jakartaee8.rb b/Formula/o/openliberty-jakartaee8.rb new file mode 100644 index 0000000000000..ae5095b4c67cb --- /dev/null +++ b/Formula/o/openliberty-jakartaee8.rb @@ -0,0 +1,47 @@ +class OpenlibertyJakartaee8 < Formula + desc "Lightweight open framework for Java (Jakarta EE 8)" + homepage "https://openliberty.io" + url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/25.0.0.11/openliberty-javaee8-25.0.0.11.zip" + sha256 "16057df8c668f3068ce906b50bf14307780193e364225a6fd7e04451267efb08" + license "EPL-1.0" + + livecheck do + url "https://openliberty.io/api/builds/data" + regex(/openliberty[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "dfc605c635f7895e4e8bbb11890c6d335e7e78aa0fce63dc10b5efc91f9d1587" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/**/*.bat"]) + + libexec.install Dir["*"] + (bin/"openliberty-jakartaee8").write_env_script "#{libexec}/bin/server", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Open Liberty Jakarta EE 8 is: + #{opt_libexec} + EOS + end + + test do + ENV["WLP_USER_DIR"] = testpath + + begin + system bin/"openliberty-jakartaee8", "start" + assert_path_exists testpath/"servers/.pid/defaultServer.pid" + ensure + system bin/"openliberty-jakartaee8", "stop" + end + + refute_path_exists testpath/"servers/.pid/defaultServer.pid" + assert_match "javaee-8.0", (testpath/"servers/defaultServer/server.xml").read + end +end diff --git a/Formula/o/openliberty-jakartaee9.rb b/Formula/o/openliberty-jakartaee9.rb new file mode 100644 index 0000000000000..2cfd71e50290d --- /dev/null +++ b/Formula/o/openliberty-jakartaee9.rb @@ -0,0 +1,50 @@ +class OpenlibertyJakartaee9 < Formula + desc "Lightweight open framework for Java (Jakarta EE 9)" + homepage "https://openliberty.io" + url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/23.0.0.2/openliberty-jakartaee9-23.0.0.2.zip" + sha256 "32f267a1dceae26d9349deb252581ff7e33e2b1a6f324b9f430ad23b16efe67e" + license "EPL-1.0" + + livecheck do + url "https://openliberty.io/api/builds/data" + regex(/openliberty[._-]jakartaee9[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "69434015835d5c9c2ca412ea3c6fbc6c96cc09f85a933581fe162b8d1f12a327" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/**/*.bat"]) + + libexec.install Dir["*"] + (bin/"openliberty-jakartaee9").write_env_script "#{libexec}/bin/server", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Open Liberty Jakarta EE 9 is: + #{opt_libexec} + EOS + end + + test do + ENV["WLP_USER_DIR"] = testpath + + begin + system bin/"openliberty-jakartaee9", "start" + assert_path_exists testpath/"servers/.pid/defaultServer.pid" + ensure + system bin/"openliberty-jakartaee9", "stop" + end + + refute_path_exists testpath/"servers/.pid/defaultServer.pid" + assert_match "jakartaee-9.1", (testpath/"servers/defaultServer/server.xml").read + end +end diff --git a/Formula/o/openliberty-microprofile4.rb b/Formula/o/openliberty-microprofile4.rb new file mode 100644 index 0000000000000..dd6094e36d53c --- /dev/null +++ b/Formula/o/openliberty-microprofile4.rb @@ -0,0 +1,47 @@ +class OpenlibertyMicroprofile4 < Formula + desc "Lightweight open framework for Java (Micro Profile 4)" + homepage "https://openliberty.io" + url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/25.0.0.11/openliberty-microProfile4-25.0.0.11.zip" + sha256 "a05ee14e4f257a1f8e5cd93d9578eb888c5ea14fcba8e353a180c33c546e6b13" + license "EPL-1.0" + + livecheck do + url "https://openliberty.io/api/builds/data" + regex(/openliberty[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "9a7319079ea0eecbf13cff60623b540612d1e0078a506a20c7cac6dad1c7ccce" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/**/*.bat"]) + + libexec.install Dir["*"] + (bin/"openliberty-microprofile4").write_env_script "#{libexec}/bin/server", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Open Liberty Micro Profile 4 is: + #{opt_libexec} + EOS + end + + test do + ENV["WLP_USER_DIR"] = testpath + + begin + system bin/"openliberty-microprofile4", "start" + assert_path_exists testpath/"servers/.pid/defaultServer.pid" + ensure + system bin/"openliberty-microprofile4", "stop" + end + + refute_path_exists testpath/"servers/.pid/defaultServer.pid" + assert_match "microProfile-4.1", (testpath/"servers/defaultServer/server.xml").read + end +end diff --git a/Formula/o/openliberty-webprofile8.rb b/Formula/o/openliberty-webprofile8.rb new file mode 100644 index 0000000000000..b9c00a81c6f4f --- /dev/null +++ b/Formula/o/openliberty-webprofile8.rb @@ -0,0 +1,47 @@ +class OpenlibertyWebprofile8 < Formula + desc "Lightweight open framework for Java (Jakarta EE Web Profile 8)" + homepage "https://openliberty.io" + url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/25.0.0.11/openliberty-webProfile8-25.0.0.11.zip" + sha256 "311c74cdf3dffd9f8a13ee92a261c60968e975aa32a2a46e1362e1c15c48afe6" + license "EPL-1.0" + + livecheck do + url "https://openliberty.io/api/builds/data" + regex(/openliberty[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "1693b7e65500f2269a6a5ae1c126227e3bfa69d611d1246449e231c5ccfdf663" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/**/*.bat"]) + + libexec.install Dir["*"] + (bin/"openliberty-webprofile8").write_env_script "#{libexec}/bin/server", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Open Liberty Jakarta EE Web Profile 8 is: + #{opt_libexec} + EOS + end + + test do + ENV["WLP_USER_DIR"] = testpath + + begin + system bin/"openliberty-webprofile8", "start" + assert_path_exists testpath/"servers/.pid/defaultServer.pid" + ensure + system bin/"openliberty-webprofile8", "stop" + end + + refute_path_exists testpath/"servers/.pid/defaultServer.pid" + assert_match "webProfile-8.0", (testpath/"servers/defaultServer/server.xml").read + end +end diff --git a/Formula/o/openliberty-webprofile9.rb b/Formula/o/openliberty-webprofile9.rb new file mode 100644 index 0000000000000..520732e888f82 --- /dev/null +++ b/Formula/o/openliberty-webprofile9.rb @@ -0,0 +1,50 @@ +class OpenlibertyWebprofile9 < Formula + desc "Lightweight open framework for Java (Jakarta EE Web Profile 9)" + homepage "https://openliberty.io" + url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/23.0.0.2/openliberty-webProfile9-23.0.0.2.zip" + sha256 "dca56a1db905d1176af7ba3a4ad779355429da7b676d7f984a41d228b3fccd9c" + license "EPL-1.0" + + livecheck do + url "https://openliberty.io/api/builds/data" + regex(/openliberty[._-]webProfile9[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "02fa7826a84a6cd57bb5ca216b62c4e4e707ffaa545a7c877942d0a681f33e30" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/**/*.bat"]) + + libexec.install Dir["*"] + (bin/"openliberty-webprofile9").write_env_script "#{libexec}/bin/server", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Open Liberty Jakarta EE Web Profile 9 is: + #{opt_libexec} + EOS + end + + test do + ENV["WLP_USER_DIR"] = testpath + + begin + system bin/"openliberty-webprofile9", "start" + assert_path_exists testpath/"servers/.pid/defaultServer.pid" + ensure + system bin/"openliberty-webprofile9", "stop" + end + + refute_path_exists testpath/"servers/.pid/defaultServer.pid" + assert_match "webProfile-9.1", (testpath/"servers/defaultServer/server.xml").read + end +end diff --git a/Formula/o/openlibm.rb b/Formula/o/openlibm.rb new file mode 100644 index 0000000000000..ed2ca6ba10433 --- /dev/null +++ b/Formula/o/openlibm.rb @@ -0,0 +1,43 @@ +class Openlibm < Formula + desc "High quality, portable, open source libm implementation" + homepage "https://openlibm.org" + url "https://github.com/JuliaMath/openlibm/archive/refs/tags/v0.8.7.tar.gz" + sha256 "e328a1d59b94748b111e022bca6a9d2fc0481fb57d23c87d90f394b559d4f062" + license all_of: ["MIT", "ISC", "BSD-2-Clause"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f69832aa3e0b5037e36303fa31570016dd59cfc981e6a84e8a130803939e45a" + sha256 cellar: :any, arm64_sequoia: "e6752fb0e310f950ac52cf3b48f1bb8bf6cfd54f232a600cab2c7193c13d21a8" + sha256 cellar: :any, arm64_sonoma: "6e7c1eb94e6db408c98f94b058f90306d92b9d507565a0896a83b40fd533cb50" + sha256 cellar: :any, arm64_ventura: "f90c6264298e3fd95ac064d63e15723cae49d108b50b30bd1a080ad403040e6b" + sha256 cellar: :any, sonoma: "1d6f591d67d422a6982b28e3a59902d44bb71b24cb2133c8db0fd321f57383a8" + sha256 cellar: :any, ventura: "49ae13794c8ab5fc7de41f88ed72be8850a2cb97c1843e894c38ecebee7631e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbe1119287757ad8439a93b6cfdf94930ba7cd379e77d7f3f9ccee84043c7ee5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0c35b3584719869ecc0b55090a1edd31b5df57c52b55f110cb0be30b9849d89" + end + + def install + lib.mkpath + (lib/"pkgconfig").mkpath + (include/"openlibm").mkpath + + system "make", "install", "prefix=#{prefix}" + + lib.install Dir["lib/*"].reject { |f| File.directory? f } + (lib/"pkgconfig").install Dir["lib/pkgconfig/*"] + (include/"openlibm").install Dir["include/openlibm/*"] + end + + test do + (testpath/"test.c").write <<~C + #include + #include "openlibm.h" + int main (void) { + printf("%.1f", cos(acos(0.0))); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}/openlibm", + "-o", "test" + assert_equal "0.0", shell_output("./test") + end +end diff --git a/Formula/o/openmama.rb b/Formula/o/openmama.rb new file mode 100644 index 0000000000000..d5613b0143d92 --- /dev/null +++ b/Formula/o/openmama.rb @@ -0,0 +1,82 @@ +class Openmama < Formula + desc "Open source high performance messaging API for various Market Data sources" + homepage "https://openmama.finos.org" + url "https://github.com/finos/OpenMAMA/archive/refs/tags/OpenMAMA-6.3.2-release.tar.gz" + sha256 "5c09b5c73467c4122fe275c0f880c70e4b9f6f8d1ecbaa1aeeac7d8195d9ffef" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/^OpenMAMA[._-]v?(\d+(?:\.\d+)+)(?:-release)?$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5702a64103b3c429d8d1499aedd50c032b572b3ba6c748f185cf2566a3fdf390" + sha256 cellar: :any, arm64_sequoia: "786b187f472ddd357f105cffc281cf4f8382b46ae31c5b428a5f1d8038c812ae" + sha256 cellar: :any, arm64_sonoma: "7b9ff5f5a5bacec5396c90a71d3f473c917aa5bf33cd403cc6f5eb4259f5f8b5" + sha256 cellar: :any, arm64_ventura: "6de6d6508390baa3544fa1995f827b8bf9cd6e043d167b97411e4fdf1a82c2d5" + sha256 cellar: :any, arm64_monterey: "01798a8ef79a4568217feef635bf6c19a611df734fca69ca1d056a15ff6c8708" + sha256 cellar: :any, arm64_big_sur: "035ce67cd9725c533fd499fb06cb71bde602a6fa166ebd5ee1d4895e39dd9c09" + sha256 cellar: :any, sonoma: "d42d95ddea2a041378fa8394830624d124c4703c371a6957da3f837676f27562" + sha256 cellar: :any, ventura: "31d87546029420927fd22a57abb347c9e90886cdc3d1b53d835658100fd3f302" + sha256 cellar: :any, monterey: "411572b9bbc3d14e3ed1fa4037fd1a8cce714111b8557a2771f810408e263170" + sha256 cellar: :any, big_sur: "b0484f0ae2366f8c6170164c8067f42dd0f94a9e0afaefe3dc68924c4a57cbe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4ecfe08949d2b93113900c434389b2e662998c0dad4a23e76150dac15a53f97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62da575388fea1bf4abd1799475004e328344c01351504d33c61aac0de464e46" + end + + depends_on "cmake" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "libevent" + depends_on "qpid-proton" + + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + # UUID is provided by util-linux on Linux. + on_linux do + depends_on "util-linux" + end + + def install + args = %W[ + -DAPR_ROOT=#{Formula["apr"].opt_prefix} + -DAPRUTIL_ROOT=#{Formula["apr-util"].opt_prefix} + -DPROTON_ROOT=#{Formula["qpid-proton"].opt_prefix} + -DCMAKE_INSTALL_RPATH=#{rpath} + -DINSTALL_RUNTIME_DEPENDENCIES=OFF + -DWITH_TESTTOOLS=OFF + -DOPENMAMA_VERSION=#{version} + ] + + args << "-DUUID_INCLUDE_DIRS=#{MacOS.sdk_path_if_needed}/usr/include" << "-DUUID_LIBRARIES=c" if OS.mac? + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"mamalistenc", "-?" + + (testpath/"test.c").write <<~C + #include + #include + int main() { + mamaBridge bridge; + fclose(stderr); + mama_status status = mama_loadBridge(&bridge, "qpid"); + if (status != MAMA_STATUS_OK) return 1; + const char* version = mama_getVersion(bridge); + if (NULL == version) return 2; + printf("%s\\n", version); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmama", "-o", "test" + assert_includes shell_output("./test"), version.to_s + end +end diff --git a/Formula/o/openmotif.rb b/Formula/o/openmotif.rb new file mode 100644 index 0000000000000..1f502a7b85b19 --- /dev/null +++ b/Formula/o/openmotif.rb @@ -0,0 +1,80 @@ +class Openmotif < Formula + desc "LGPL release of the Motif toolkit" + homepage "https://motif.ics.com/motif" + url "https://downloads.sourceforge.net/project/motif/Motif%202.3.8%20Source%20Code/motif-2.3.8.tar.gz" + sha256 "859b723666eeac7df018209d66045c9853b50b4218cecadb794e2359619ebce7" + license "LGPL-2.1-or-later" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "371bb9f35979b5035726d70d03b8e5fee6cf8993b95f5328a77c8423f934c1b7" + sha256 arm64_sequoia: "a8bc176639f8fb38b41aab636e20c407232203d408d07098042a68e3f4ed610f" + sha256 arm64_sonoma: "088de6041cdf83f4d5ab19861a340937bb78e13d455d1c5819926a8a77842488" + sha256 arm64_ventura: "1019a2b092f310c8ee4d777401dd907b59e07f0c7b6ea18735a50932e2f42c1a" + sha256 arm64_monterey: "7abd4f014f6171882ad37dc0c7eea95d79f80c8ae23dca71341745e83564b211" + sha256 sonoma: "7a3a027c94087fbae8276b1b1ea1d5005aedf1e9a5c50f5bb5045f58678ebee9" + sha256 ventura: "f812e91446ca3ac40eb384466f591a41548b8a8c48b566f68cb32180a10246b7" + sha256 monterey: "14ef0a26ccc456c032334f4013d8938098f8dabcd4297f31b64c787794ed8be9" + sha256 arm64_linux: "6853dee96064d53c771ee48fc99c0a93dcd8f503f9cdec71e0a6e715a8cbf899" + sha256 x86_64_linux: "48f58afdf62747a75241a1be50fde497d04d74fe09e4385c47e01bcc4a572e4f" + end + + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libice" + depends_on "libpng" + depends_on "libsm" + depends_on "libx11" + depends_on "libxext" + depends_on "libxft" + depends_on "libxmu" + depends_on "libxp" + depends_on "libxt" + depends_on "xbitmaps" + + uses_from_macos "flex" => :build + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # Fix 2-level namespace using MacPorts patch + patch :p0 do + on_macos do + url "https://raw.githubusercontent.com/macports/macports-ports/8c436a9c53a7b786da8d42cda16eead0fb8733d4/x11/openmotif/files/patch-lib-xm-vendor.diff" + sha256 "697ac026386dec59b82883fb4a9ba77164dd999fa3fb0569dbc8fbdca57fe200" + end + end + + def install + if OS.linux? + # This patch is needed for Ubuntu 16.04 LTS, which uses + # --as-needed with ld. It should no longer + # be needed on Ubuntu 18.04 LTS. + inreplace ["demos/programs/Exm/simple_app/Makefile.am", "demos/programs/Exm/simple_app/Makefile.in"], + /(LDADD.*\n.*libExm.a)/, + "\\1 -lX11" + end + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + + # Avoid conflict with Perl + mv man3/"Core.3", man3/"openmotif-Core.3" + end + + test do + assert_match "no source file specified", pipe_output("#{bin}/uil 2>&1") + end +end diff --git a/Formula/o/openmsx.rb b/Formula/o/openmsx.rb new file mode 100644 index 0000000000000..1c32ff3c0f378 --- /dev/null +++ b/Formula/o/openmsx.rb @@ -0,0 +1,93 @@ +class Openmsx < Formula + desc "MSX emulator" + homepage "https://openmsx.org/" + url "https://github.com/openMSX/openMSX/releases/download/RELEASE_21_0/openmsx-21.0.tar.gz" + sha256 "28838bfa974a0b769b04a8820ad7953a7ad0835eb5d1764db173deac75984b6f" + license "GPL-2.0-or-later" + head "https://github.com/openMSX/openMSX.git", branch: "master" + + livecheck do + url :stable + regex(/RELEASE[._-]v?(\d+(?:[._]\d+)+)/i) + strategy :github_latest do |json, regex| + match = json["tag_name"]&.match(regex) + next if match.blank? + + match[1].tr("_", ".") + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "f163141e884181d6ddc1dfec63acfde452c26af4bc20cd424756b96f199cdf4d" + sha256 cellar: :any, arm64_sequoia: "524064efe7274201bd28490cb9b515429efa67ffbd072f84528d8f94f4485123" + sha256 cellar: :any, arm64_sonoma: "1e2a22829a8bc5ff0cfa1ed57d89d016c3d071720d419dfb7b9ca921c0f44618" + sha256 cellar: :any, sonoma: "4994c71b8a54a53fc30e51a56b4fc71076550a4f0e186a0e84b6188d6ddb1e27" + sha256 arm64_linux: "74a866c43df3f6ecccfe78e8164b37eb5d365f68a6d2dee9f72cb5dec3f03b72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25c217d5db0b730426c2afa84ef465e4b5f60b29659c91f8fc6f58382a0f4673" + end + + depends_on "freetype" + depends_on "glew" + depends_on "libogg" + depends_on "libpng" + depends_on "libvorbis" + depends_on "sdl2" + depends_on "sdl2_ttf" + depends_on "tcl-tk" + depends_on "theora" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + on_ventura :or_older do + depends_on "llvm" + + fails_with :clang do + cause "Requires C++20" + end + end + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + end + + fails_with :gcc do + version "7" + cause "Requires C++20" + end + + def install + if OS.mac? && MacOS.version <= :ventura + ENV.llvm_clang + ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/unwind -lunwind" + # When using Homebrew's superenv shims, we need to use HOMEBREW_LIBRARY_PATHS + # rather than LDFLAGS for libc++ in order to correctly link to LLVM's libc++. + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + # Hardcode prefix + inreplace "build/custom.mk", "/opt/openMSX", prefix + inreplace "build/probe.py", "platform == 'darwin'", "platform == 'linux'" if OS.linux? + inreplace "build/probe.py", "/usr/local", HOMEBREW_PREFIX + + # Help finding Tcl (https://github.com/openMSX/openMSX/issues/1082) + ENV["TCL_CONFIG"] = Formula["tcl-tk"].opt_lib + + system "./configure" + system "make", "CXX=#{ENV.cxx}", "LDFLAGS=#{ENV.ldflags}" + + if OS.mac? + prefix.install Dir["derived/**/openMSX.app"] + bin.write_exec_script "#{prefix}/openMSX.app/Contents/MacOS/openmsx" + else + system "make", "install" + end + end + + test do + system bin/"openmsx", "-testconfig" + end +end diff --git a/Formula/o/openrtsp.rb b/Formula/o/openrtsp.rb new file mode 100644 index 0000000000000..3a6de46998e09 --- /dev/null +++ b/Formula/o/openrtsp.rb @@ -0,0 +1,64 @@ +class Openrtsp < Formula + desc "Command-line RTSP client" + homepage "http://www.live555.com/openRTSP" + url "http://www.live555.com/liveMedia/public/live.2025.10.13.tar.gz" + mirror "https://download.videolan.org/pub/videolan/testing/contrib/live555/live.2025.10.13.tar.gz" + # Keep a mirror as upstream tarballs are removed after each version + sha256 "44eb6ae4ae02ef68a5028d9fc8b70c45b9ba45c058f846b68bc4d32c74355f49" + license "LGPL-3.0-or-later" + + livecheck do + url "http://www.live555.com/liveMedia/public/" + regex(/href=.*?live[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a3c6e063bc0c7a4db682023221a0fe7c98934514324836990a89b4fc72d9f1b" + sha256 cellar: :any, arm64_sequoia: "a227bbb94725b9c0c7ef1547f8d5031876c3a78387500801b6738de6c5439c1c" + sha256 cellar: :any, arm64_sonoma: "48d96a97c3accdde4701c96222d4a9bb5d187fa0b1e6a111e462212cd4c75119" + sha256 cellar: :any, sonoma: "1277e4fb2385597d0bedcfd393d6c3de3392261b20858867ecdd429385c4cb89" + sha256 cellar: :any_skip_relocation, arm64_linux: "57a6a097724a0bfdb3b203a36f6a0fdc81d3ec2a145a46f6b66296be113ff245" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe2070fb69ec821f6a9d574c89937351970b00e37b0b8a24f4a150bab759b62b" + end + + depends_on "openssl@3" + + # Support CXXFLAGS when building on macOS + # PR ref: https://github.com/rgaufman/live555/pull/46 + # TODO: Remove once changes land in a release + patch do + url "https://github.com/rgaufman/live555/commit/16701af5486bb3a2d25a28edaab07789c8a9ce57.patch?full_index=1" + sha256 "2d98a782081028fe3b7daf6b2db19e99c46f0cadab2421745de907146a3595cb" + end + + def install + # "test" was added to std::atomic_flag in C++20 + # See https://github.com/rgaufman/live555/issues/45 + ENV.append "CXXFLAGS", "-std=c++20" + + # Avoid linkage to system OpenSSL + libs = [ + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + ] + + os_flag = OS.mac? ? "macosx-bigsur" : "linux" + system "./genMakefiles", os_flag + system "make", "PREFIX=#{prefix}", + "LIBS_FOR_CONSOLE_APPLICATION=#{libs.join(" ")}", "install" + + # Move the testing executables out of the main PATH + libexec.install Dir.glob(bin/"test*") + end + + def caveats + <<~EOS + Testing executables have been placed in: + #{libexec} + EOS + end + + test do + assert_match "GNU", shell_output("#{bin}/live555ProxyServer 2>&1", 1) + end +end diff --git a/Formula/o/opensaml.rb b/Formula/o/opensaml.rb new file mode 100644 index 0000000000000..ad7437c7b855a --- /dev/null +++ b/Formula/o/opensaml.rb @@ -0,0 +1,42 @@ +class Opensaml < Formula + desc "Library for Security Assertion Markup Language" + homepage "https://wiki.shibboleth.net/confluence/display/OpenSAML/Home" + url "https://shibboleth.net/downloads/c++-opensaml/3.3.1/opensaml-3.3.1.tar.bz2" + sha256 "d8e24e070fc6bb80682632ca32c8569a9f3ef170ba57e3b82818322e75b6a37e" + license "Apache-2.0" + revision 1 + + livecheck do + url "https://shibboleth.net/downloads/c++-opensaml/latest/" + regex(/href=.*?opensaml[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5805c25d6cbc6a232a11171cbe6b42d4bd5cd79bb58a80eb58fc8897cb95d809" + sha256 cellar: :any, arm64_sequoia: "07a24e559fba8ef6206aa142b47c40d15dd68ec6ecebfcf6ef4e249461a1ebfc" + sha256 cellar: :any, arm64_sonoma: "2433e81f6f75b41ace4f4b39a8bc336aad0d07324efe4f5758966ba8db3270be" + sha256 cellar: :any, arm64_ventura: "30a5d4e496a4053fc99686974cca11d4b8be3d331fe55c0cec552d8171060730" + sha256 cellar: :any, sonoma: "11823d44fd8032eb8e3f61827de120b93656107a2e31fbeedc95a78c52e34017" + sha256 cellar: :any, ventura: "8045e1d48ada4b5fa6c2a524cda2dd2b31e33014e49d2894b9fdd134597703cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccf298955ba2cf7cc5c54feaab9baedd5faa1b351ea02525ceeda3d35d76e805" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7113cf3ec71403d5a0c60bb4f6e9c358c60f57cf80e203d9cd34cb19f5d1898e" + end + + depends_on "pkgconf" => :build + depends_on "log4shib" + depends_on "openssl@3" + depends_on "xerces-c" + depends_on "xml-security-c" + depends_on "xml-tooling-c" + + def install + ENV.cxx11 + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match "see documentation for usage", shell_output("#{bin}/samlsign 2>&1", 255) + end +end diff --git a/Formula/o/opensc.rb b/Formula/o/opensc.rb new file mode 100644 index 0000000000000..1c8ec1fb9557e --- /dev/null +++ b/Formula/o/opensc.rb @@ -0,0 +1,72 @@ +class Opensc < Formula + desc "Tools and libraries for smart cards" + homepage "https://github.com/OpenSC/OpenSC/wiki" + url "https://github.com/OpenSC/OpenSC/releases/download/0.26.1/opensc-0.26.1.tar.gz" + sha256 "f16291a031d86e570394762e9f35eaf2fcbc2337a49910f3feae42d54e1688cb" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "e30686709adbd2ed9e741d46ee7732ba4bdc26835662f674ad97d4a15c14f00b" + sha256 arm64_sequoia: "0ae0073b4ba388df854a2c1bb2a31ad83e4ff800eb392d25779403defdff1ab2" + sha256 arm64_sonoma: "4e7694a574e648659e39287e6f79dd5b78c48f284cc186a9a5877a3dfbd0972f" + sha256 arm64_ventura: "b6920b3fcde75811501cea04279e70647e5abd1a437783a3cfce8fb56082e6c7" + sha256 sonoma: "f6bdfbbcd8b3653f27d220af9f28794857e750ce919efded28f635869abc379c" + sha256 ventura: "3b59686f5df7f25f6b7b03ca4945921f4fca3831c8ae433563ee80647b545ff9" + sha256 arm64_linux: "d8a00ba58da4990a87c84d051092c088db6f904571f6b4e1db962ac9f5bb4e83" + sha256 x86_64_linux: "d4c613660abb6981348a4b68e8108ec48dbd081b3651c5b847a32cfd03ad073e" + end + + head do + url "https://github.com/OpenSC/OpenSC.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "docbook-xsl" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "pcsc-lite" + uses_from_macos "zlib" + + on_linux do + depends_on "glib" + depends_on "readline" + end + + def install + args = %W[ + --disable-silent-rules + --enable-openssl + --enable-pcsc + --enable-sm + --with-xsl-stylesheetsdir=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl + ] + + system "./bootstrap" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def caveats + on_macos do + <<~EOS + The OpenSSH PKCS11 smartcard integration will not work. + If you need this functionality, unlink this formula, then install + the OpenSC cask. + EOS + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/opensc-tool -i") + end +end diff --git a/Formula/o/opensca-cli.rb b/Formula/o/opensca-cli.rb new file mode 100644 index 0000000000000..d70991451542f --- /dev/null +++ b/Formula/o/opensca-cli.rb @@ -0,0 +1,34 @@ +class OpenscaCli < Formula + desc "OpenSCA is a supply-chain security tool for security researchers and developers" + homepage "https://opensca.xmirror.cn" + url "https://github.com/XmirrorSecurity/OpenSCA-cli/archive/refs/tags/v3.0.8.tar.gz" + sha256 "d28cdbab3e0aee1b4107a7d9e003fad6603dc145171a47079084f23452731fe8" + license "Apache-2.0" + head "https://github.com/XmirrorSecurity/OpenSCA-cli.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b747404b0ec47f59696e1a7a7b783d4f12245d40ed59fa7113bb63452e4184b5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b2bf0ba81f92faac4b0e76015344487cebd53da4c660bdaedfa63cc002e4a26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8273d141b75fd503ca405a73eaead3ea5c677e08433a2b91060ceea02317acc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67c7852691b7ad40296d4e7c328e150e6ecbc97db4057cc027bb6a2b1bc6a590" + sha256 cellar: :any_skip_relocation, sonoma: "86738a46a09bebd72eccb7ada0605f7ef8f5f8d3d1f1566056f9ed8c734ea0e5" + sha256 cellar: :any_skip_relocation, ventura: "baffcf7508ed41b2883eadd7150c57bbde8b69e99ff65ec4f578fa6feef16ba1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4149599471f39aca06d965af7b59250998098097fb5b9542705e9c9015d2108c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04bfd766ad0375c92859e4066dc9b81247f2e6f8f2a916cd1b0eaa4cb5d07511" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X 'main.version=#{version}'" + system "go", "build", *std_go_args(ldflags:) + end + + test do + system bin/"opensca-cli", "-path", testpath + assert_path_exists testpath/"opensca.log" + assert_match version.to_s, shell_output("#{bin}/opensca-cli -version") + end +end diff --git a/Formula/o/opensearch-dashboards.rb b/Formula/o/opensearch-dashboards.rb new file mode 100644 index 0000000000000..8d81c9c191114 --- /dev/null +++ b/Formula/o/opensearch-dashboards.rb @@ -0,0 +1,192 @@ +class OpensearchDashboards < Formula + desc "Open source visualization dashboards for OpenSearch" + homepage "https://docs.opensearch.org/latest/dashboards/" + url "https://github.com/opensearch-project/OpenSearch-Dashboards.git", + tag: "3.2.0", + revision: "9d91d4639ea0e0cbb909ccfda66de3288d0f02d7" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "727eecd85b6c3883e6e5844fe155b8d607a799f75c12ddc7276bad3d042d1e29" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06ef29ddb7b2fae29aea89491c495a359db9cda91ae82b4c5d3be1f5d77cedef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5659412cb97b6d9a6e9f9906c85b682bf33220cd017430589decc91eb8ed8e9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "910cdadddfa28a1491bc6ea9fcc4680b47c4cbe5faf9db83af7ccc54021c351e" + sha256 cellar: :any_skip_relocation, sonoma: "1150e0e52620adffafa7e393afd2be5874b7ad2eca7fd328f20f831d245a65e4" + sha256 cellar: :any_skip_relocation, ventura: "97d4d7f82fac9fc3f9af0c1e3e7410a3d2593ba51d77f0b9f0754c9afa2fbed8" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe915d04e7505a67722abd8cf89156462a9f63c402c1b462ccb79fecd33e8db8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af36f450b282678a5c61e29a1c55c1a8b6fe9fc2657af56d5418d295d997b7d9" + end + + deprecate! date: "2025-10-28", because: "uses deprecated node@20" + + depends_on "yarn" => :build + depends_on "opensearch" => :test + depends_on "node@20" + + # - Do not download node and discard all actions related to this node + patch :DATA + + def install + system "yarn", "osd", "bootstrap" + system "node", "scripts/build", "--release", "--skip-os-packages", "--skip-archives", "--skip-node-download" + + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + cd "build/opensearch-dashboards-#{version}-#{os}-#{arch}" do + inreplace "bin/use_node", + /NODE=".+"/, + "NODE=\"#{Formula["node@20"].opt_bin/"node"}\"" + + inreplace "config/opensearch_dashboards.yml", + /#\s*pid\.file: .+$/, + "pid.file: #{var}/run/opensearchDashboards.pid" + + (etc/"opensearch-dashboards").install Dir["config/*"] + rm_r(Dir["{config,data,plugins}"]) + + prefix.install Dir["*"] + end + end + + def post_install + (var/"log/opensearch-dashboards").mkpath + + (var/"lib/opensearch-dashboards").mkpath + ln_s var/"lib/opensearch-dashboards", prefix/"data" unless (prefix/"data").exist? + + (var/"opensearch-dashboards/plugins").mkpath + ln_s var/"opensearch-dashboards/plugins", prefix/"plugins" unless (prefix/"plugins").exist? + + ln_s etc/"opensearch-dashboards", prefix/"config" unless (prefix/"config").exist? + end + + def caveats + <<~EOS + Data: #{var}/lib/opensearch-dashboards/ + Logs: #{var}/log/opensearch-dashboards/opensearch-dashboards.log + Plugins: #{var}/opensearch-dashboards/plugins/ + Config: #{etc}/opensearch-dashboards/ + EOS + end + + service do + run opt_bin/"opensearch-dashboards" + log_path var/"log/opensearch-dashboards.log" + error_log_path var/"log/opensearch-dashboards.log" + end + + test do + ENV["BABEL_CACHE_PATH"] = testpath/".babelcache.json" + + os_port = free_port + (testpath/"data").mkdir + (testpath/"logs").mkdir + fork do + exec Formula["opensearch"].bin/"opensearch", "-Ehttp.port=#{os_port}", + "-Epath.data=#{testpath}/data", + "-Epath.logs=#{testpath}/logs" + end + + (testpath/"config.yml").write <<~YAML + server.host: "127.0.0.1" + path.data: #{testpath}/data + opensearch.hosts: ["http://127.0.0.1:#{os_port}"] + YAML + + osd_port = free_port + fork { exec bin/"opensearch-dashboards", "-p", osd_port.to_s, "-c", testpath/"config.yml" } + + output = nil + + max_attempts = 100 + attempt = 0 + + loop do + attempt += 1 + break if attempt > max_attempts + + sleep 3 + + output = Utils.popen_read("curl", "--location", "--silent", "127.0.0.1:#{osd_port}") + break if output.present? && output != "OpenSearch Dashboards server is not ready yet" + end + + assert_includes output, "OpenSearch Dashboards" + end +end + +__END__ +diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts +index d764c5df28..e37b71e04a 100644 +--- a/src/dev/build/build_distributables.ts ++++ b/src/dev/build/build_distributables.ts +@@ -63,8 +63,6 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions + */ + await run(Tasks.VerifyEnv); + await run(Tasks.Clean); +- await run(options.downloadFreshNode ? Tasks.DownloadNodeBuilds : Tasks.VerifyExistingNodeBuilds); +- await run(Tasks.ExtractNodeBuilds); + + /** + * run platform-generic build tasks +diff --git a/src/dev/build/tasks/create_archives_sources_task.ts b/src/dev/build/tasks/create_archives_sources_task.ts +index 5ba01ad129..b4ecbb0d3d 100644 +--- a/src/dev/build/tasks/create_archives_sources_task.ts ++++ b/src/dev/build/tasks/create_archives_sources_task.ts +@@ -41,38 +41,6 @@ export const CreateArchivesSources: Task = { + source: build.resolvePath(), + destination: build.resolvePathForPlatform(platform), + }); +- +- log.debug( +- 'Generic build source copied into', +- platform.getNodeArch(), +- 'specific build directory' +- ); +- +- // copy node.js install +- await scanCopy({ +- source: (await getNodeDownloadInfo(config, platform)).extractDir, +- destination: build.resolvePathForPlatform(platform, 'node'), +- }); +- +- // ToDo [NODE14]: Remove this Node.js 14 fallback download +- // Copy the Node.js 14 binaries into node/fallback to be used by `use_node` +- if (platform.getBuildName() === 'darwin-arm64') { +- log.warning(`There are no fallback Node.js versions released for darwin-arm64.`); +- } else { +- await scanCopy({ +- source: ( +- await getNodeVersionDownloadInfo( +- NODE14_FALLBACK_VERSION, +- platform.getNodeArch(), +- platform.isWindows(), +- config.resolveFromRepo() +- ) +- ).extractDir, +- destination: build.resolvePathForPlatform(platform, 'node', 'fallback'), +- }); +- } +- +- log.debug('Node.js copied into', platform.getNodeArch(), 'specific build directory'); + }) + ); + }, +diff --git a/src/dev/notice/generate_build_notice_text.js b/src/dev/notice/generate_build_notice_text.js +index b32e200915..2aab53f3ea 100644 +--- a/src/dev/notice/generate_build_notice_text.js ++++ b/src/dev/notice/generate_build_notice_text.js +@@ -48,7 +48,7 @@ export async function generateBuildNoticeText(options = {}) { + + const packageNotices = await Promise.all(packages.map(generatePackageNoticeText)); + +- return [noticeFromSource, ...packageNotices, generateNodeNoticeText(nodeDir, nodeVersion)].join( ++ return [noticeFromSource, ...packageNotices, ''].join( + '\n---\n' + ); + } diff --git a/Formula/o/opensearch.rb b/Formula/o/opensearch.rb new file mode 100644 index 0000000000000..5ec1edaa375f7 --- /dev/null +++ b/Formula/o/opensearch.rb @@ -0,0 +1,105 @@ +class Opensearch < Formula + desc "Open source distributed and RESTful search engine" + homepage "https://github.com/opensearch-project/OpenSearch" + url "https://github.com/opensearch-project/OpenSearch/archive/refs/tags/3.3.2.tar.gz" + sha256 "d1506c8d56abc6af535bb242f5285e1e342486ce236e932205bcd291a1f21de3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20ef25ccefb28402b6dff6bf7870b0bdae01fac39cbc15de393f24ef9526afe2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "61851a2c8a50f8c11cad32ff6c6cceb4b65493b6d76652b23fc75c1535432f5f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f246e77962c9f20b746b7d3663a9669af9a7719d1869cb0ce37a1fe7bf08aa54" + sha256 cellar: :any_skip_relocation, sonoma: "813fca3a3ef8a3bd196e353b75ed370313039e9f4b2c6d62e4776441fca8ba3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d6047c9ceeafa561e17d2ad9a9d39db0b5ffec48f0122ece38cb7df307a8153" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed7e7901f72f5821603109a45f4a5a8973b4354969cad5f4519fe050860db517" + end + + depends_on "gradle@8" => :build + depends_on "openjdk" + + def install + platform = OS.kernel_name.downcase + platform += "-arm64" if Hardware::CPU.arm? + system "gradle", "-Dbuild.snapshot=false", ":distribution:archives:no-jdk-#{platform}-tar:assemble" + + mkdir "tar" do + # Extract the package to the tar directory + system "tar", "--strip-components=1", "-xf", + Dir["../distribution/archives/no-jdk-#{platform}-tar/build/distributions/opensearch-*.tar.gz"].first + + # Install into package directory + libexec.install "bin", "lib", "modules", "agent" + + # Set up Opensearch for local development: + inreplace "config/opensearch.yml" do |s| + # 1. Give the cluster a unique name + s.gsub!(/#\s*cluster\.name: .*/, "cluster.name: opensearch_homebrew") + + # 2. Configure paths + s.sub!(%r{#\s*path\.data: /path/to.+$}, "path.data: #{var}/lib/opensearch/") + s.sub!(%r{#\s*path\.logs: /path/to.+$}, "path.logs: #{var}/log/opensearch/") + end + + inreplace "config/jvm.options", %r{logs/gc.log}, "#{var}/log/opensearch/gc.log" + + # add placeholder to avoid removal of empty directory + touch "config/jvm.options.d/.keepme" + + # Move config files into etc + (etc/"opensearch").install Dir["config/*"] + end + + inreplace libexec/"bin/opensearch-env", + "if [ -z \"$OPENSEARCH_PATH_CONF\" ]; then OPENSEARCH_PATH_CONF=\"$OPENSEARCH_HOME\"/config; fi", + "if [ -z \"$OPENSEARCH_PATH_CONF\" ]; then OPENSEARCH_PATH_CONF=\"#{etc}/opensearch\"; fi" + + bin.install libexec/"bin/opensearch", + libexec/"bin/opensearch-keystore", + libexec/"bin/opensearch-plugin", + libexec/"bin/opensearch-shard" + bin.env_script_all_files(libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix) + end + + def post_install + # Make sure runtime directories exist + (var/"lib/opensearch").mkpath + (var/"log/opensearch").mkpath + ln_s etc/"opensearch", libexec/"config" unless (libexec/"config").exist? + (var/"opensearch/plugins").mkpath + ln_s var/"opensearch/plugins", libexec/"plugins" unless (libexec/"plugins").exist? + (var/"opensearch/extensions").mkpath + ln_s var/"opensearch/extensions", libexec/"extensions" unless (libexec/"extensions").exist? + # fix test not being able to create keystore because of sandbox permissions + system bin/"opensearch-keystore", "create" unless (etc/"opensearch/opensearch.keystore").exist? + end + + def caveats + <<~EOS + Data: #{var}/lib/opensearch/ + Logs: #{var}/log/opensearch/opensearch_homebrew.log + Plugins: #{var}/opensearch/plugins/ + Config: #{etc}/opensearch/ + EOS + end + + service do + run opt_bin/"opensearch" + working_dir var + log_path var/"log/opensearch.log" + error_log_path var/"log/opensearch.log" + end + + test do + port = free_port + (testpath/"data").mkdir + (testpath/"logs").mkdir + spawn bin/"opensearch", "-Ehttp.port=#{port}", + "-Epath.data=#{testpath}/data", + "-Epath.logs=#{testpath}/logs" + sleep 60 + output = shell_output("curl -s -XGET localhost:#{port}/") + assert_equal "opensearch", JSON.parse(output)["version"]["distribution"] + + system bin/"opensearch-plugin", "list" + end +end diff --git a/Formula/o/openshift-cli.rb b/Formula/o/openshift-cli.rb new file mode 100644 index 0000000000000..39072943a3a3c --- /dev/null +++ b/Formula/o/openshift-cli.rb @@ -0,0 +1,66 @@ +class OpenshiftCli < Formula + desc "OpenShift command-line interface tools" + homepage "https://www.openshift.com/" + url "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.20.0/openshift-client-src.tar.gz" + # This project employs synchronized versioning so the sha256 may not change on version bumps + sha256 "694c2ab5fabd4aeff2f7d3c137ce2dcc67d31a627ad4390b9f6ec848d82c5036" + license "Apache-2.0" + head "https://github.com/openshift/oc.git", shallow: false, branch: "main" + + livecheck do + url "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/" + regex(/href=.*?openshift-client-mac-(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d8dfecadd9d2382d01a805482b5bd7400247fa1baaa23a074f52b6047bb5d0f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4270052e18e6ae7909f693f68bf159f177b09decd19b6c888af0732bcf33200" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1087b847550bd2f6cd20791ca9f94846c6a85abcc6f3e8d61e80c9fa7c3be977" + sha256 cellar: :any_skip_relocation, sonoma: "ea5706145a3ea66380c5023dcab4bcdfeb2ef6230b962b39e123739e9daf77b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "501771a17ed79caf29283c5f8ad4e76a8bcfe7dc8477cff71ea9ff9cc8196828" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0adcb62a719dec16f1da8589cbbb476375006f11bcf68599b8cb77e22df8fd18" + end + + depends_on "go" => :build + uses_from_macos "krb5" + + def install + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + os = OS.kernel_name.downcase + revision = build.head? ? Utils.git_head : Pathname.pwd.basename.to_s.delete_prefix("oc-") + + # See https://github.com/Homebrew/brew/issues/14763 + ENV.O0 if OS.linux? + + system "make", "cross-build-#{os}-#{arch}", "OS_GIT_VERSION=#{version}", "SOURCE_GIT_COMMIT=#{revision}", "SHELL=/bin/bash" + bin.install "_output/bin/#{os}_#{arch}/oc" + generate_completions_from_executable(bin/"oc", "completion") + end + + test do + # Grab version details from built client + version_raw = shell_output("#{bin}/oc version --client --output=json") + version_json = JSON.parse(version_raw) + + # Ensure that we had a clean build tree + assert_equal "clean", version_json["clientVersion"]["gitTreeState"] + + # Verify the built artifact matches the formula + assert_match version_json["clientVersion"]["gitVersion"], "v#{version}" + + # Get remote release details + release_raw = shell_output("#{bin}/oc adm release info #{version} --output=json") + release_json = JSON.parse(release_raw) + + # Verify the formula matches the release data for the version + assert_match version_json["clientVersion"]["gitCommit"], + release_json["references"]["spec"]["tags"].find { |tag| + tag["name"]=="cli" + } ["annotations"]["io.openshift.build.commit.id"] + + # Test that we can generate and write a kubeconfig + (testpath/"kubeconfig").write "" + system "KUBECONFIG=#{testpath}/kubeconfig #{bin}/oc config set-context foo 2>&1" + assert_match "foo", shell_output("KUBECONFIG=#{testpath}/kubeconfig #{bin}/oc config get-contexts -o name") + end +end diff --git a/Formula/o/openslide.rb b/Formula/o/openslide.rb new file mode 100644 index 0000000000000..d2b3a06b92be8 --- /dev/null +++ b/Formula/o/openslide.rb @@ -0,0 +1,60 @@ +class Openslide < Formula + desc "C library to read whole-slide images (a.k.a. virtual slides)" + homepage "https://openslide.org/" + url "https://github.com/openslide/openslide/releases/download/v4.0.0/openslide-4.0.0.tar.xz" + sha256 "cc227c44316abb65fb28f1c967706eb7254f91dbfab31e9ae6a48db6cf4ae562" + license "LGPL-2.1-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "908c32009c2c77cedf1e78df9d885f07f170ab3a17213777945ed232160b1d5d" + sha256 cellar: :any, arm64_sequoia: "cc59b3af87286b37130ec9a898f182814aa291268a9e2548e5525e765f4996df" + sha256 cellar: :any, arm64_sonoma: "5bdd7e9c3409e9a540d861b0cb58ff7e94b51f38ec1c04d2b07dbf8d69d01933" + sha256 cellar: :any, arm64_ventura: "389ba9d6f9bb8e28d960277976ba1159083ded06ca6b6d01cbbdb5688296579b" + sha256 cellar: :any, arm64_monterey: "413e235cb5da773c304affa0719c5b8d1e0031d0f17fbc4263ad411d4c97b784" + sha256 cellar: :any, sonoma: "24268fa9a0759d1ee9997ca8b4f34d8fbd24ad5f0b5b5cbdbf7a4eea8f447324" + sha256 cellar: :any, ventura: "954bbde8c99630dd94c6486021674eed997475307f248d4957767e4a018b0739" + sha256 cellar: :any, monterey: "05788d5b3c3101ce73c9080c0d0c360d151cf2460a68b7dfe0bd3effb2c20460" + sha256 arm64_linux: "7912c26023d19f9f9394046ab56ef53929c9c3c59e3a725f2472ebece1f0f9a0" + sha256 x86_64_linux: "d67053c017a5e1e57189a2d774cac9d8bbe2c655240183ce65247a0a8650c917" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "jpeg-turbo" + depends_on "libdicom" + depends_on "libpng" + depends_on "libtiff" + depends_on "libxml2" + depends_on "openjpeg" + depends_on "sqlite" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + resource "homebrew-svs" do + url "https://github.com/libvips/libvips/raw/d510807e/test/test-suite/images/CMU-1-Small-Region.svs" + sha256 "ed92d5a9f2e86df67640d6f92ce3e231419ce127131697fbbce42ad5e002c8a7" + end + + resource("homebrew-svs").stage do + system bin/"slidetool", "prop", "list", "CMU-1-Small-Region.svs" + end + end +end diff --git a/Formula/o/openslp.rb b/Formula/o/openslp.rb new file mode 100644 index 0000000000000..fa323d78b1049 --- /dev/null +++ b/Formula/o/openslp.rb @@ -0,0 +1,57 @@ +class Openslp < Formula + desc "Implementation of Service Location Protocol" + homepage "http://www.openslp.org" + url "https://downloads.sourceforge.net/project/openslp/2.0.0/2.0.0%20Release/openslp-2.0.0.tar.gz" + sha256 "924337a2a8e5be043ebaea2a78365c7427ac6e9cee24610a0780808b2ba7579b" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "03318a808866a33ea675a2520d6d889c9aa74f6817b9a30bed9bbc0cf4a6938d" + sha256 arm64_sequoia: "8ad62fa05cfa66977820ce7095c95f7f3f9573fe8c11565cc80adb9767bb3ae2" + sha256 arm64_sonoma: "88497463ae4bc988432fe2ec15a032ee2f4ea3516d8915405a08256c265633ee" + sha256 sonoma: "9f8b91c18c4a8e0738618531ad35f6068daa27cb6069362510622592113aada5" + sha256 ventura: "517653bc27072c320f9159e57040c51d5ba0b4ea8b234bb5af9af55a9aea9f42" + sha256 arm64_linux: "7f3de41c36959025ce20d867cfa90c065fba46d872b055d0b7c2a2e6a631b44d" + sha256 x86_64_linux: "aa1988503f1e9688dfd80e0331392ab29a053e62197b60653e933ee1bc681efb" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # Workaround for arm64 macOS to use fallback global mutex as USE_APPLE_ATOMICS + # condition uses deprecated functions and code doesn't compile + # Issue ref: https://github.com/openslp-org/openslp/issues/19 + inreplace "common/slp_atomic.c", <<~C, "#else\n" if OS.mac? && Hardware::CPU.arm? + #elif defined(__APPLE__) + # define USE_APPLE_ATOMICS + #else + C + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) { + SLPHandle hslp; + SLPError err; + err = SLPOpen("en", SLP_FALSE, &hslp); + SLPClose(hslp); + return err; + } + C + + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lslp" + system "./test" + end +end diff --git a/Formula/o/openssh.rb b/Formula/o/openssh.rb new file mode 100644 index 0000000000000..624be0c7e8756 --- /dev/null +++ b/Formula/o/openssh.rb @@ -0,0 +1,94 @@ +class Openssh < Formula + desc "OpenBSD freely-licensed SSH connectivity tools" + homepage "https://www.openssh.com/" + url "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.2p1.tar.gz" + mirror "https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.2p1.tar.gz" + version "10.2p1" + sha256 "ccc42c0419937959263fa1dbd16dafc18c56b984c03562d2937ce56a60f798b2" + license "SSH-OpenSSH" + + livecheck do + url "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/" + regex(/href=.*?openssh[._-]v?(\d+(?:\.\d+)+(?:p\d+)?)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "e959e3ad5d40de117f2fe5bc125dc9e9e3284292132ee3ae83ef6217d2351ec7" + sha256 arm64_sequoia: "92e90f40583f0b4babe109254265cf9f83517a374e9ebe596aa7f6f082e16cde" + sha256 arm64_sonoma: "a19ad93e76c623397e1b1fb6ecf522c479496eb5fa05c5581334f987f1002665" + sha256 sonoma: "5391277d1143c40b94c8c08c6041d798cd9adfd368f6a6369caa7b2641e2ddbc" + sha256 arm64_linux: "f45965c2fbb4bcd1b991ef2ec0431d08d350bebf962f802c272878738429b58e" + sha256 x86_64_linux: "135b287fc422f4d90d44aef87490776c9b353f7223f4835961e1566e658b061d" + end + + # Please don't resubmit the keychain patch option. It will never be accepted. + # https://archive.is/hSB6d#10%25 + + depends_on "pkgconf" => :build + depends_on "ldns" + depends_on "libfido2" + depends_on "openssl@3" + + uses_from_macos "mandoc" => :build + uses_from_macos "lsof" => :test + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + end + + resource "com.openssh.sshd.sb" do + url "https://raw.githubusercontent.com/apple-oss-distributions/OpenSSH/OpenSSH-268.100.4/com.openssh.sshd.sb" + sha256 "a273f86360ea5da3910cfa4c118be931d10904267605cdd4b2055ced3a829774" + end + + def install + ENV.append "CPPFLAGS", "-D__APPLE_SANDBOX_NAMED_EXTERNAL__" if OS.mac? + + args = %W[ + --sysconfdir=#{etc}/ssh + --with-ldns + --with-libedit + --with-kerberos5 + --with-pam + --with-ssl-dir=#{Formula["openssl@3"].opt_prefix} + --with-security-key-builtin + ] + + args << "--with-privsep-path=#{var}/lib/sshd" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + + # This was removed by upstream with very little announcement and has + # potential to break scripts, so recreate it for now. + # Debian have done the same thing. + bin.install_symlink bin/"ssh" => "slogin" + + buildpath.install resource("com.openssh.sshd.sb") + (etc/"ssh").install "com.openssh.sshd.sb" => "org.openssh.sshd.sb" + + # Don't hardcode Cellar paths in configuration files + inreplace etc/"ssh/sshd_config", prefix, opt_prefix + end + + test do + (etc/"ssh").find do |pn| + next unless pn.file? + + refute_match HOMEBREW_CELLAR.to_s, pn.read + end + + assert_match "OpenSSH_", shell_output("#{bin}/ssh -V 2>&1") + + port = free_port + spawn sbin/"sshd", "-D", "-p", port.to_s + sleep 2 + assert_match "sshd", shell_output("lsof -i :#{port}") + end +end diff --git a/Formula/o/openssl@3.0.rb b/Formula/o/openssl@3.0.rb new file mode 100644 index 0000000000000..c3b2e01f22e2c --- /dev/null +++ b/Formula/o/openssl@3.0.rb @@ -0,0 +1,144 @@ +class OpensslAT30 < Formula + desc "Cryptography and SSL/TLS Toolkit" + homepage "https://openssl-library.org" + url "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz" + sha256 "d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" + license "Apache-2.0" + + livecheck do + url "https://openssl-library.org/source/" + regex(/href=.*?openssl[._-]v?(3\.0(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "104514c8043870d361e83e09f366298720c9be8a40e3f3deca029ac2335a1b72" + sha256 arm64_sequoia: "22c792799100eaf0ba065a7d04ff42b1b0b909d6940b50b12eabc04a4e54f7f1" + sha256 arm64_sonoma: "cb85425e5d45d6d814758d4f260584ea1c259116c5ebb9e067ac313196474b9e" + sha256 sonoma: "bba4d9d430171e4dd6684f97b3096fd7cfbc7595235b84aabf08bec94a8047a8" + sha256 arm64_linux: "b1c671c628b9b39de79169daa0ec0b01a3d5b72239fb3f5e4272c40c9de80d1c" + sha256 x86_64_linux: "82ab0aa25d1e797a3f7a76344fe8ec8e84dd57d5c3bb32b91c2c8f91adfe0613" + end + + keg_only :versioned_formula + + # See: https://www.openssl.org/policies/releasestrat.html + deprecate! date: "2026-09-07", because: :unsupported + + depends_on "ca-certificates" + + on_linux do + resource "Test::Harness" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.52.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.52.tar.gz" + sha256 "8fe65cfc0261ed3c8a4395f0524286f5719669fe305f9b03b16cf3684d62cd70" + end + + resource "Test::More" do + url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302214.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302214.tar.gz" + sha256 "6077ecc35f37b11b3b75df2d0ba1b9ca541f1dc24b2be8e15b6e91f78e2e03fc" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.76.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.76.tar.gz" + sha256 "30bcfd75fec4d512e9081c792f7cb590009d9de2fe285ffa8eec1be35a5ae7ca" + end + end + + # SSLv2 died with 1.1.0, so no-ssl2 no longer required. + # SSLv3 & zlib are off by default with 1.1.0 but this may not + # be obvious to everyone, so explicitly state it for now to + # help debug inevitable breakage. + def configure_args + args = %W[ + --prefix=#{prefix} + --openssldir=#{openssldir} + --libdir=#{lib} + no-ssl3 + no-ssl3-method + no-zlib + ] + on_linux do + args += (ENV.cflags || "").split + args += (ENV.cppflags || "").split + args += (ENV.ldflags || "").split + end + args + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", buildpath/"lib/perl5" + ENV.prepend_path "PATH", buildpath/"bin" + + %w[ExtUtils::MakeMaker Test::Harness Test::More].each do |r| + resource(r).stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}", "CC=#{ENV.cc}" + system "make", "install" + end + end + end + + # This could interfere with how we expect OpenSSL to build. + ENV.delete("OPENSSL_LOCAL_CONFIG_DIR") + + # This ensures where Homebrew's Perl is needed the Cellar path isn't + # hardcoded into OpenSSL's scripts, causing them to break every Perl update. + # Whilst our env points to opt_bin, by default OpenSSL resolves the symlink. + ENV["PERL"] = Formula["perl"].opt_bin/"perl" if which("perl") == Formula["perl"].opt_bin/"perl" + + arch_args = [] + if OS.mac? + arch_args += %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128] + elsif Hardware::CPU.intel? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-x86_64" : "linux-elf") + elsif Hardware::CPU.arm? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-aarch64" : "linux-armv4") + end + + openssldir.mkpath + system "perl", "./Configure", *(configure_args + arch_args) + system "make" + system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" + system "make", "HARNESS_JOBS=#{ENV.make_jobs}", "test" + + # Prevent `brew` from pruning the `certs` and `private` directories. + touch %w[certs private].map { |subdir| openssldir/subdir/".keepme" } + end + + def openssldir + etc/"openssl@3.0" + end + + def post_install + rm(openssldir/"cert.pem") if (openssldir/"cert.pem").exist? + openssldir.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + end + + def caveats + <<~EOS + A CA file has been bootstrapped using certificates from the system + keychain. To add additional certificates, place .pem files in + #{openssldir}/certs + + and run + #{opt_bin}/c_rehash + EOS + end + + test do + # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody. + assert_path_exists pkgetc/"openssl.cnf", "OpenSSL requires the .cnf file for some functionality" + + # Check OpenSSL itself functions as expected. + (testpath/"testfile.txt").write("This is a test file") + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" + system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" + open("checksum.txt") do |f| + checksum = f.read(100).split("=").last.strip + assert_equal checksum, expected_checksum + end + end +end diff --git a/Formula/o/openssl@3.5.rb b/Formula/o/openssl@3.5.rb new file mode 100644 index 0000000000000..3edb58c51f28e --- /dev/null +++ b/Formula/o/openssl@3.5.rb @@ -0,0 +1,171 @@ +class OpensslAT35 < Formula + desc "Cryptography and SSL/TLS Toolkit" + homepage "https://openssl-library.org" + url "https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz" + mirror "http://fresh-center.net/linux/misc/openssl-3.5.4.tar.gz" + sha256 "967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99" + license "Apache-2.0" + + livecheck do + url "https://openssl-library.org/source/" + regex(/href=.*?openssl[._-]v?(3\.5(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "3f8bedcacdb7003d1f31e3fd31934930db0d2a9a075e414db2b4e688fa0235c6" + sha256 arm64_sequoia: "463f3305e7169463418f6a7253d34d8fc1121ed2ea010f729b1cbaa53e725f9f" + sha256 arm64_sonoma: "d8fb4693f129b1ba731f9aa45c363b27638957257fa5dce2dedae99c0200d690" + sha256 tahoe: "9a1f1cefcfb5fae1a0a704a9f64f4de3566c6d7c3d4d47e1b25044a9ea6a8480" + sha256 sequoia: "100f356386eac48209d0d7a5c2b862c42e510a023a834e38a5f96eaab6865279" + sha256 sonoma: "63bc3e14d04134c4ffdf6a1fec48dc84afd00eab66b3524d60fda99bdb140d13" + sha256 arm64_linux: "799f0fd4ae8b431cd585197a1e51f24aa7165fc41df5ce217059dc70c733924c" + sha256 x86_64_linux: "1399dde9e564f3bfc422bcdc358327a075d471a75b0eb1d79a07fe2f9543538f" + end + + keg_only :versioned_formula + + depends_on "ca-certificates" + + on_linux do + resource "Test::Harness" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.52.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.52.tar.gz" + sha256 "8fe65cfc0261ed3c8a4395f0524286f5719669fe305f9b03b16cf3684d62cd70" + end + + resource "Test::More" do + url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302214.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302214.tar.gz" + sha256 "6077ecc35f37b11b3b75df2d0ba1b9ca541f1dc24b2be8e15b6e91f78e2e03fc" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.76.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.76.tar.gz" + sha256 "30bcfd75fec4d512e9081c792f7cb590009d9de2fe285ffa8eec1be35a5ae7ca" + end + end + + # SSLv2 died with 1.1.0, so no-ssl2 no longer required. + # SSLv3 & zlib are off by default with 1.1.0 but this may not + # be obvious to everyone, so explicitly state it for now to + # help debug inevitable breakage. + def configure_args + args = %W[ + --prefix=#{prefix} + --openssldir=#{openssldir} + --libdir=lib + no-ssl3 + no-ssl3-method + no-zlib + ] + on_linux do + args += (ENV.cflags || "").split + args += (ENV.cppflags || "").split + args += (ENV.ldflags || "").split + end + args + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", buildpath/"lib/perl5" + ENV.prepend_path "PATH", buildpath/"bin" + + %w[ExtUtils::MakeMaker Test::Harness Test::More].each do |r| + resource(r).stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}", "CC=#{ENV.cc}" + system "make", "install" + end + end + end + + # This could interfere with how we expect OpenSSL to build. + ENV.delete("OPENSSL_LOCAL_CONFIG_DIR") + + # This ensures where Homebrew's Perl is needed the Cellar path isn't + # hardcoded into OpenSSL's scripts, causing them to break every Perl update. + # Whilst our env points to opt_bin, by default OpenSSL resolves the symlink. + ENV["PERL"] = Formula["perl"].opt_bin/"perl" if which("perl") == Formula["perl"].opt_bin/"perl" + + arch_args = [] + if OS.mac? + arch_args += %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128] + elsif Hardware::CPU.intel? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-x86_64" : "linux-elf") + elsif Hardware::CPU.arm? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-aarch64" : "linux-armv4") + end + + openssldir.mkpath + system "perl", "./Configure", *(configure_args + arch_args) + system "make" + system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" + # AF_ALG support isn't always enabled (e.g. some containers), which breaks the tests. + # AF_ALG is a kernel feature and failures are unlikely to be issues with the formula. + system "make", "HARNESS_JOBS=#{ENV.make_jobs}", "test", "TESTS=-test_afalg" + + # Prevent `brew` from pruning the `certs` and `private` directories. + touch %w[certs private].map { |subdir| openssldir/subdir/".keepme" } + end + + def openssldir + etc/"openssl@3.5" + end + + def post_install + rm(openssldir/"cert.pem") if (openssldir/"cert.pem").exist? + openssldir.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + end + + def caveats + <<~EOS + To add additional certificates, place .pem files in + #{openssldir}/certs + + and run + #{opt_bin}/c_rehash + EOS + end + + test do + # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody. + assert_path_exists pkgetc/"openssl.cnf", "OpenSSL requires the .cnf file for some functionality" + assert_path_exists openssldir/"certs", "OpenSSL throws confusing errors when this directory is missing" + + # Check OpenSSL itself functions as expected. + (testpath/"testfile.txt").write("This is a test file") + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" + system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" + open("checksum.txt") do |f| + checksum = f.read(100).split("=").last.strip + assert_equal checksum, expected_checksum + end + + # Invalid cert from superfish.badssl.com + bad_cert = <<~PEM + -----BEGIN CERTIFICATE----- + MIIC9TCCAl6gAwIBAgIJAK5EmlK7Klu5MA0GCSqGSIb3DQEBCwUAMFsxGDAWBgNV + BAoTD1N1cGVyZmlzaCwgSW5jLjELMAkGA1UEBxMCU0YxCzAJBgNVBAgTAkNBMQsw + CQYDVQQGEwJVUzEYMBYGA1UEAxMPU3VwZXJmaXNoLCBJbmMuMB4XDTE4MDUxNjE3 + MTUyM1oXDTIwMDUxNTE3MTUyM1owajELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh + bGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNT + TDEdMBsGA1UEAwwUc3VwZXJmaXNoLmJhZHNzbC5jb20wggEiMA0GCSqGSIb3DQEB + AQUAA4IBDwAwggEKAoIBAQDCBOz4jO4EwrPYUNVwWMyTGOtcqGhJsCK1+ZWesSss + dj5swEtgTEzqsrTAD4C2sPlyyYYC+VxBXRMrf3HES7zplC5QN6ZnHGGM9kFCxUbT + Focnn3TrCp0RUiYhc2yETHlV5NFr6AY9SBVSrbMo26r/bv9glUp3aznxJNExtt1N + wMT8U7ltQq21fP6u9RXSM0jnInHHwhR6bCjqN0rf6my1crR+WqIW3GmxV0TbChKr + 3sMPR3RcQSLhmvkbk+atIgYpLrG6SRwMJ56j+4v3QHIArJII2YxXhFOBBcvm/mtU + mEAnhccQu3Nw72kYQQdFVXz5ZD89LMOpfOuTGkyG0cqFAgMBAAGjLjAsMAkGA1Ud + EwQCMAAwHwYDVR0RBBgwFoIUc3VwZXJmaXNoLmJhZHNzbC5jb20wDQYJKoZIhvcN + AQELBQADgYEAKgHH4VD3jfwzxvtWTmIA1nwK+Fjqe9VFXyDwXiBnhqDwJp9J+/2y + r7jbXfEKf7WBS6OmnU+HTjxUCFx2ZnA4r7dU5nIsNadKEDVHDOvYEJ6mXHPkrvlt + k79iHC0DJiJX36BTXcU649wKEVjgX/kT2yy3YScPdBoN0vtzPN3yFsQ= + -----END CERTIFICATE----- + PEM + output = pipe_output("#{bin}/openssl verify 2>&1", bad_cert, 2) + assert_match "verification failed", output + refute_match "error:80000002", output + end +end diff --git a/Formula/o/openssl@3.rb b/Formula/o/openssl@3.rb new file mode 100644 index 0000000000000..ba8156bdce9ec --- /dev/null +++ b/Formula/o/openssl@3.rb @@ -0,0 +1,174 @@ +class OpensslAT3 < Formula + desc "Cryptography and SSL/TLS Toolkit" + homepage "https://openssl-library.org" + url "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/openssl-3.6.0.tar.gz" + sha256 "b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" + license "Apache-2.0" + + livecheck do + url "https://openssl-library.org/source/" + regex(/href=.*?openssl[._-]v?(3(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "932329036867164c28752b7b35f7808530b8cd79b72246bf122f36219a79d388" + sha256 arm64_sequoia: "9a8fa2ae1ef3424b116d7e6422d979e0290f4affdef072b1592e4535d2617d92" + sha256 arm64_sonoma: "055bf163fbfd98f5de31c25b1e8cac41129d3cb21581843f7ab30aec0c35bdf7" + sha256 tahoe: "422323a6751ed7c4c198d97362d8967e20379daa287db7e8311ae036b9842d62" + sha256 sequoia: "a015d2e06290484b37547a57b60c6bc5bd45be0479e0c58529ffa4359a3f6225" + sha256 sonoma: "cdf6125ff77ed7709a44a0ad95918801a3cfaadedbb66c781db7ccf9ab4fae58" + sha256 arm64_linux: "257a655d8fcb65f1a7b2a0c4ae4cb7c8152454dacc806d7e24bc7457b299829a" + sha256 x86_64_linux: "dae10cea048eae154365f18fc51154093f8ba378ace3fe138f89dda08bf09e4e" + end + + depends_on "ca-certificates" + + on_linux do + resource "Test::Harness" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.52.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.52.tar.gz" + sha256 "8fe65cfc0261ed3c8a4395f0524286f5719669fe305f9b03b16cf3684d62cd70" + end + + resource "Test::More" do + url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302214.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302214.tar.gz" + sha256 "6077ecc35f37b11b3b75df2d0ba1b9ca541f1dc24b2be8e15b6e91f78e2e03fc" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.76.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.76.tar.gz" + sha256 "30bcfd75fec4d512e9081c792f7cb590009d9de2fe285ffa8eec1be35a5ae7ca" + end + end + + link_overwrite "bin/c_rehash", "bin/openssl", "include/openssl/*" + link_overwrite "lib/libcrypto*", "lib/libssl*" + link_overwrite "lib/pkgconfig/libcrypto.pc", "lib/pkgconfig/libssl.pc", "lib/pkgconfig/openssl.pc" + link_overwrite "share/doc/openssl/*", "share/man/man*/*ssl" + + # SSLv2 died with 1.1.0, so no-ssl2 no longer required. + # SSLv3 & zlib are off by default with 1.1.0 but this may not + # be obvious to everyone, so explicitly state it for now to + # help debug inevitable breakage. + def configure_args + args = %W[ + --prefix=#{prefix} + --openssldir=#{openssldir} + --libdir=lib + no-ssl3 + no-ssl3-method + no-zlib + ] + on_linux do + args += (ENV.cflags || "").split + args += (ENV.cppflags || "").split + args += (ENV.ldflags || "").split + end + args + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", buildpath/"lib/perl5" + ENV.prepend_path "PATH", buildpath/"bin" + + %w[ExtUtils::MakeMaker Test::Harness Test::More].each do |r| + resource(r).stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}", "CC=#{ENV.cc}" + system "make", "install" + end + end + end + + # This could interfere with how we expect OpenSSL to build. + ENV.delete("OPENSSL_LOCAL_CONFIG_DIR") + + # This ensures where Homebrew's Perl is needed the Cellar path isn't + # hardcoded into OpenSSL's scripts, causing them to break every Perl update. + # Whilst our env points to opt_bin, by default OpenSSL resolves the symlink. + ENV["PERL"] = Formula["perl"].opt_bin/"perl" if which("perl") == Formula["perl"].opt_bin/"perl" + + arch_args = [] + if OS.mac? + arch_args += %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128] + elsif Hardware::CPU.intel? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-x86_64" : "linux-elf") + elsif Hardware::CPU.arm? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-aarch64" : "linux-armv4") + end + + openssldir.mkpath + system "perl", "./Configure", *(configure_args + arch_args) + system "make" + system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" + # AF_ALG support isn't always enabled (e.g. some containers), which breaks the tests. + # AF_ALG is a kernel feature and failures are unlikely to be issues with the formula. + system "make", "HARNESS_JOBS=#{ENV.make_jobs}", "test", "TESTS=-test_afalg" + + # Prevent `brew` from pruning the `certs` and `private` directories. + touch %w[certs private].map { |subdir| openssldir/subdir/".keepme" } + end + + def openssldir + etc/"openssl@3" + end + + def post_install + rm(openssldir/"cert.pem") if (openssldir/"cert.pem").exist? + openssldir.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + end + + def caveats + <<~EOS + To add additional certificates, place .pem files in + #{openssldir}/certs + + and run + #{opt_bin}/c_rehash + EOS + end + + test do + # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody. + assert_path_exists pkgetc/"openssl.cnf", "OpenSSL requires the .cnf file for some functionality" + assert_path_exists openssldir/"certs", "OpenSSL throws confusing errors when this directory is missing" + + # Check OpenSSL itself functions as expected. + (testpath/"testfile.txt").write("This is a test file") + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" + system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" + open("checksum.txt") do |f| + checksum = f.read(100).split("=").last.strip + assert_equal checksum, expected_checksum + end + + # Invalid cert from superfish.badssl.com + bad_cert = <<~PEM + -----BEGIN CERTIFICATE----- + MIIC9TCCAl6gAwIBAgIJAK5EmlK7Klu5MA0GCSqGSIb3DQEBCwUAMFsxGDAWBgNV + BAoTD1N1cGVyZmlzaCwgSW5jLjELMAkGA1UEBxMCU0YxCzAJBgNVBAgTAkNBMQsw + CQYDVQQGEwJVUzEYMBYGA1UEAxMPU3VwZXJmaXNoLCBJbmMuMB4XDTE4MDUxNjE3 + MTUyM1oXDTIwMDUxNTE3MTUyM1owajELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh + bGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNT + TDEdMBsGA1UEAwwUc3VwZXJmaXNoLmJhZHNzbC5jb20wggEiMA0GCSqGSIb3DQEB + AQUAA4IBDwAwggEKAoIBAQDCBOz4jO4EwrPYUNVwWMyTGOtcqGhJsCK1+ZWesSss + dj5swEtgTEzqsrTAD4C2sPlyyYYC+VxBXRMrf3HES7zplC5QN6ZnHGGM9kFCxUbT + Focnn3TrCp0RUiYhc2yETHlV5NFr6AY9SBVSrbMo26r/bv9glUp3aznxJNExtt1N + wMT8U7ltQq21fP6u9RXSM0jnInHHwhR6bCjqN0rf6my1crR+WqIW3GmxV0TbChKr + 3sMPR3RcQSLhmvkbk+atIgYpLrG6SRwMJ56j+4v3QHIArJII2YxXhFOBBcvm/mtU + mEAnhccQu3Nw72kYQQdFVXz5ZD89LMOpfOuTGkyG0cqFAgMBAAGjLjAsMAkGA1Ud + EwQCMAAwHwYDVR0RBBgwFoIUc3VwZXJmaXNoLmJhZHNzbC5jb20wDQYJKoZIhvcN + AQELBQADgYEAKgHH4VD3jfwzxvtWTmIA1nwK+Fjqe9VFXyDwXiBnhqDwJp9J+/2y + r7jbXfEKf7WBS6OmnU+HTjxUCFx2ZnA4r7dU5nIsNadKEDVHDOvYEJ6mXHPkrvlt + k79iHC0DJiJX36BTXcU649wKEVjgX/kT2yy3YScPdBoN0vtzPN3yFsQ= + -----END CERTIFICATE----- + PEM + output = pipe_output("#{bin}/openssl verify 2>&1", bad_cert, 2) + assert_match "verification failed", output + refute_match "error:80000002", output + end +end diff --git a/Formula/o/openstackclient.rb b/Formula/o/openstackclient.rb new file mode 100644 index 0000000000000..4dcb9ba9019be --- /dev/null +++ b/Formula/o/openstackclient.rb @@ -0,0 +1,444 @@ +class Openstackclient < Formula + include Language::Python::Virtualenv + + desc "Command-line client for OpenStack" + homepage "https://openstack.org" + url "https://files.pythonhosted.org/packages/a5/8f/7852b32aa5759ab9333b5ad50834304e61bf06b87fa01ad82063e12411aa/python_openstackclient-8.2.0.tar.gz" + sha256 "d612af18dfc66cc8f31e6ce96690b6c273ade8a240ec40b7f4835a8896fbbe01" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e6d57b3263958d560f7783d4be8339d70e5fd79878229fdff480491b91e2dbb0" + sha256 cellar: :any, arm64_sequoia: "acf2a5840af73b1bcc8a2140d496356240c00e60f39afa25dbc485101132819a" + sha256 cellar: :any, arm64_sonoma: "7a28d8afbda6a37acb8898f6082026410a95149127fc1f29c75f75216bf0387e" + sha256 cellar: :any, sonoma: "cd1ce49cb6c2682ad0bff85c4da8215dbee73f25923a6a7b99636fe8542a4c7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f695a4b6ea16ce247b4fa5e7dbcbaf3b5e34bfe487dc0c4c5bb3df59403a33c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5000e4f69ce370d71896cabf75d807cef04b1f62cf45cc8b7848beb7199e84f3" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages extra_packages: %w[keystoneauth-websso osc-placement python-barbicanclient + python-cloudkittyclient python-designateclient + python-glanceclient python-heatclient python-ironicclient + python-magnumclient python-manilaclient python-mistralclient + python-octaviaclient], + exclude_packages: %w[certifi cryptography gnureadline rpds-py] + + resource "pyinotify" do + on_linux do + url "https://files.pythonhosted.org/packages/e3/c0/fd5b18dde17c1249658521f69598f3252f11d9d7a980c5be8619970646e1/pyinotify-0.9.6.tar.gz" + sha256 "9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4" + end + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "autopage" do + url "https://files.pythonhosted.org/packages/9f/9e/559b0cfdba9f3ed6744d8cbcdbda58880d3695c43c053a31773cefcedde3/autopage-0.5.2.tar.gz" + sha256 "826996d74c5aa9f4b6916195547312ac6384bac3810b8517063f293248257b72" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/8d/43/6974bae8a54e8e49aea448f2897ba1af4d261b95328a3cc112fa0e290b1a/cliff-4.11.0.tar.gz" + sha256 "aa33c11ac2fecdf2d1eaffea9d5d0eb4584b8e777673bb55d42a693e34ccc429" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/75/68/4bf43d284e41c01c6011146e5c2824aa6f17a3bb1ef10ba3dbbae5cf31dc/cmd2-2.7.0.tar.gz" + sha256 "81d8135b46210e1d03a5a810baf859069a62214788ceeec3588f44eed86fbeeb" + end + + resource "debtcollector" do + url "https://files.pythonhosted.org/packages/31/e2/a45b5a620145937529c840df5e499c267997e85de40df27d54424a158d3c/debtcollector-3.0.0.tar.gz" + sha256 "2a8917d25b0e1f1d0d365d3c1c6ecfc7a522b1e9716e8a1a4a915126f7ccea6f" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/e7/c8/301ff89746e76745b937606df4753c032787c59ecb37dd4d4250bddc8929/dogpile_cache-1.5.0.tar.gz" + sha256 "849c5573c9a38f155cd4173103c702b637ede0361c12e864876877d0cd125eec" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonpatch" do + url "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz" + sha256 "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" + end + + resource "jsonpath-rw" do + url "https://files.pythonhosted.org/packages/71/7c/45001b1f19af8c4478489fbae4fc657b21c4c669d7a5a036a86882581d85/jsonpath-rw-1.4.0.tar.gz" + sha256 "05c471281c45ae113f6103d1268ec7a4831a2e96aa80de45edc89b11fac4fbec" + end + + resource "jsonpath-rw-ext" do + url "https://files.pythonhosted.org/packages/d5/f0/5d865b2543be45e3ab7a8c2ae8dfa5c3e56cfdd48f19d4455eb02f370386/jsonpath-rw-ext-1.2.2.tar.gz" + sha256 "a9e44e803b6d87d135b09d1e5af0db4d4cf97ba62711a80aa51c8c721980a994" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "keystoneauth-websso" do + url "https://files.pythonhosted.org/packages/59/87/6362ba7b9e48926aa0d81733af3b604ac2063a32a86594ea69ea3743e496/keystoneauth_websso-0.2.5.tar.gz" + sha256 "a30289dd4ae70ba56387bb8defe8da6e3eb7f9e6d289692d3cb5b0c7460b071c" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/e5/16/b96df223ca7ea4bfa78034b205e0eaf4875bfecb2f119f375fc5232d2061/keystoneauth1-5.12.0.tar.gz" + sha256 "dd113c2f3dcb418d9f761c73b8cd43a96ddfa8a612b51c576822381f39ca4ae8" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "multipart" do + url "https://files.pythonhosted.org/packages/6d/c9/c6f5ab81bae667d4fe42a58df29f4c2db6ad8377cfd0e9baa729e4fa3ebb/multipart-1.3.0.tar.gz" + sha256 "a46bd6b0eb4c1ba865beb88ddd886012a3da709b6e7b86084fc37e99087e5cf1" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "openstacksdk" do + url "https://files.pythonhosted.org/packages/6c/e7/4921e513dc00e2b052b196e4a7055351b74192a680470ab287b2332b0c6a/openstacksdk-4.7.1.tar.gz" + sha256 "23348aa69c6cc6c1ed0e8f03fb42b156519ed8cfcd143e783ef5c1dd800ad9f1" + end + + resource "os-client-config" do + url "https://files.pythonhosted.org/packages/50/cd/352f6f18d1fb90780b95fdc3a668a279bd41d89905d70ee06076b529077c/os_client_config-2.3.0.tar.gz" + sha256 "e16a260f2fd500af14f157b9b7b7d69292ce83b0f8a461ec68ce6a8a42967cbd" + end + + resource "os-service-types" do + url "https://files.pythonhosted.org/packages/9d/e9/1725288a94496d7780cd1624d16b86b7ed596960595d5742f051c4b90df5/os_service_types-1.8.0.tar.gz" + sha256 "890ce74f132ca334c2b23f0025112b47c6926da6d28c2f75bcfc0a83dea3603e" + end + + resource "osc-lib" do + url "https://files.pythonhosted.org/packages/7c/63/ea0eda39e1b2c0ca3e9d87798568f881ea7aa90e4f94affb78676215f72d/osc_lib-4.2.0.tar.gz" + sha256 "99718f06a990c1ad6fb9034bbed9655390a2ea83cef71a53781e7e9abd9f20ce" + end + + resource "osc-placement" do + url "https://files.pythonhosted.org/packages/7d/d8/7ff585ba924327284eb0f9d16d22f63eb9b9aace9872d90166d865841336/osc_placement-4.7.0.tar.gz" + sha256 "3efb10ee5823288fc4d9afaed75baae836b86c69aa8d233f3e48757fe30936a6" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/03/67/221128a241ab4151ecc5b101de23651e7c08491f7b2edea31744207a23dc/oslo_config-10.0.0.tar.gz" + sha256 "333e675db8c6be7715b3decf78c398ca1138439225aa274632e89314837f6ea3" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/15/a3/d4804bb24e6f8cabcae4925a02ade281c2f8d90e3d0b7b367221cfb65ad8/oslo_context-6.1.0.tar.gz" + sha256 "c1a8d17c79f50c71024d54cc17cc0b01e89dbff258315dc11d7e04e6b1a02ce3" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/c1/74/a2238cfdf6e97ee398b3fc5eda8b0e108be3913494dbef90961ebe38bf23/oslo_i18n-6.6.0.tar.gz" + sha256 "bb5e3becefa2e40488b259f9db12cc5ad894dd309b5b5aca56382ff190c18f5e" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/81/6b/a7f1c1daeadd36f71633fb3ebac9817fcb1f8edfd06d6bdd71384f39010f/oslo_log-7.2.1.tar.gz" + sha256 "01aebabdcf06b62df00e479db99df0c23f6cd24c6500ab3110e604bd059fa8d5" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/d4/ac/119c430df3a86dc6a664fa864f777b4fd5cc16c50caa1ba3dd3bf10f43ae/oslo_serialization-5.8.0.tar.gz" + sha256 "5871a62b23f98cacd5518482941ae6d2a983e2936ed52d543ad08685dc6d2343" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/d9/ec/9f12c8ded6eb7ba0774ea4a0e03bfe6cd35fea4cbc944a826c751bb49500/oslo_utils-9.1.0.tar.gz" + sha256 "01c3875e7cca005b59465c429f467113b5f4b04211cbd534c9ac2f152276d3b3" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-barbicanclient" do + url "https://files.pythonhosted.org/packages/b9/2e/cca8be3d14fceea564115ffc1e7e1a219620127f5050c31edd2c12347f35/python_barbicanclient-7.2.0.tar.gz" + sha256 "4b085b01597442e620658017aeddc6df313a9b0a6c629d13c463b9dc39bf1579" + end + + resource "python-cinderclient" do + url "https://files.pythonhosted.org/packages/56/9d/a0e1283639bcd98ac8f7a991c1ba2c6efd82ed0747246e993da1eca192b9/python_cinderclient-9.8.0.tar.gz" + sha256 "bd3ee9f9487c5e79957f018a6b3f2dece7059dad8f6155d83dd4b6eb9447a11d" + end + + resource "python-cloudkittyclient" do + url "https://files.pythonhosted.org/packages/3e/0e/38540fa99bce5ebdd4a15268d66ce347cc4bf21f904ed7a5d7dbefae8b90/python_cloudkittyclient-5.4.0.tar.gz" + sha256 "94f2cf00387b873907cad710216df0bfeaface3186fd5da1cfe0b1502f9a2183" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-designateclient" do + url "https://files.pythonhosted.org/packages/31/03/96a90b0a83c8e033a8d8d679e457acad18439f5de4a8a1b4a826ff02c412/python_designateclient-6.3.0.tar.gz" + sha256 "9aabf25e5ff69b15fb6209f9851c507d9499e63c6926245672ff0e495986e778" + end + + resource "python-glanceclient" do + url "https://files.pythonhosted.org/packages/fc/96/e0e2ea7258cb3825be4aa0c19372a182b5c17788660d9985090fe81f6ae5/python_glanceclient-4.10.0.tar.gz" + sha256 "ff6c2d42a1767c5cfa3cd1d22a3732d38ab113d471ad22c4ee64a1bd3941b103" + end + + resource "python-heatclient" do + url "https://files.pythonhosted.org/packages/6b/38/1a6a0def362dae922e559c1dfcb553c3be8b3b859fd0943a12a697d9271f/python_heatclient-4.3.0.tar.gz" + sha256 "8ada7ceb77f25f0dbe3ae2e3328a30461adb94ffbf36b0c2aabc2cce483b75f0" + end + + resource "python-ironicclient" do + url "https://files.pythonhosted.org/packages/10/a3/16315f1ba8b233a0ec45d2479fd677cc005efa687365900010b09f7e32a1/python_ironicclient-5.13.0.tar.gz" + sha256 "ad422a52969875fc8b7adce67d3cdbb42e370261c766c34496c84c98d585e288" + end + + resource "python-keystoneclient" do + url "https://files.pythonhosted.org/packages/94/29/3775d7a722924a72208753a8aa5ddb0a58de24f5a5dd287cc9a0f66038e4/python_keystoneclient-5.7.0.tar.gz" + sha256 "8ce7bf1c8cddca6d7140fc76918b44eddf1d64040a60cb8ff7059136104d4ceb" + end + + resource "python-magnumclient" do + url "https://files.pythonhosted.org/packages/4f/39/b0ea864817d58a1bfdb371602e3bd8243a781c6d7f0f57a95b60e4556799/python_magnumclient-4.9.0.tar.gz" + sha256 "35a02326271860e8072e33891f0fa1596509ab91319fed129b5c565f17bb8ec9" + end + + resource "python-manilaclient" do + url "https://files.pythonhosted.org/packages/b9/09/ac69bbccdc7a144b6c4bac3bb6722f6bfefcb0bb4c24a8ba092c71cece76/python_manilaclient-5.6.0.tar.gz" + sha256 "570f1e8b6d8c1265ceca0b703ad28b0c831c6f79c18ea38d811ae17d2185b897" + end + + resource "python-mistralclient" do + url "https://files.pythonhosted.org/packages/84/69/a5415e9d1580847ebacbe3f978f27879c98d93a77ff721be0eddbb2d63f9/python_mistralclient-6.0.0.tar.gz" + sha256 "2084033aeb4eab02aa9f35914b235019a67a06ea5ee2b9999b72ea27fe4585f0" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/57/15/96f2f42df4c1d6873c89a0cae2ba3b98f83273e965421eb11b7dbb257b4d/python_neutronclient-11.6.0.tar.gz" + sha256 "3c6958088d18c8676a10abf9d94b8dbf1a984741cbb988554f216880797e072f" + end + + resource "python-octaviaclient" do + url "https://files.pythonhosted.org/packages/1f/e3/a4c11c5fa401d99320494eaa2687104c8164916a3d9084570f5ffa28642f/python_octaviaclient-3.12.0.tar.gz" + sha256 "e5badfc64a49428bac11c5e5d187abcd80e3adf9745f2595d115cf4f3d78e98e" + end + + resource "python-swiftclient" do + url "https://files.pythonhosted.org/packages/57/a7/a30bf9fd517d7cc75fb111540c9962c166b9e9539d2ba2afab14a6aa1aa3/python_swiftclient-4.8.0.tar.gz" + sha256 "44162cab469368cafdc25e0c8c4e95a2b9db1a44456a48ce080fe2ca9a4b3863" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requestsexceptions" do + url "https://files.pythonhosted.org/packages/82/ed/61b9652d3256503c99b0b8f145d9c8aa24c514caff6efc229989505937c1/requestsexceptions-1.4.0.tar.gz" + sha256 "b095cbc77618f066d459a02b137b020c37da9f46d9b057704019c9f77dba3065" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/71/a6/34460d81e5534f6d2fc8e8d91ff99a5835fdca53578eac89e4f37b3a7c6d/rich_argparse-1.7.1.tar.gz" + sha256 "d7a493cde94043e41ea68fb43a74405fa178de981bf7b800f7a3bd02ac5c27be" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "warlock" do + url "https://files.pythonhosted.org/packages/29/c2/3ba4daeddd47f1cfdbc703048cbee27bcbc50535261a2bbe36412565f3c9/warlock-2.1.0.tar.gz" + sha256 "82319ba017341e7fcdc81efc2be9dd2f8237a0da07c71476b5425651b317b1c9" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"openstack", "-h" + openstack_subcommands = [ + "server list", + "resource provider list", # osc-placement + "stack list", # python-heatclient + "loadbalancer list", # python-octaviaclient + "rating summary get", # python-cloudkittyclient + "zone list", # python-designateclient + "secret list", # python-barbicanclient + "share list", # python-manilaclient + "workflow list", # python-mistralclient + "coe cluster list", # python-magnumclient + "baremetal node list", # python-ironicclient + ] + openstack_subcommands.each do |subcommand| + output = shell_output("#{bin}/openstack #{subcommand} 2>&1", 1) + assert_match "Missing value auth-url required", output + end + end +end diff --git a/Formula/o/opensubdiv.rb b/Formula/o/opensubdiv.rb new file mode 100644 index 0000000000000..520a8232aea28 --- /dev/null +++ b/Formula/o/opensubdiv.rb @@ -0,0 +1,52 @@ +class Opensubdiv < Formula + desc "Open-source subdivision surface library" + homepage "https://graphics.pixar.com/opensubdiv/docs/intro.html" + url "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/refs/tags/v3_7_0.tar.gz" + sha256 "f843eb49daf20264007d807cbc64516a1fed9cdb1149aaf84ff47691d97491f9" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+)$/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "0008ddc2f7b700de6b4be9c40e34265cd286eb82e2c8f3dbd5644765c7ba7992" + sha256 cellar: :any, arm64_sequoia: "b4330e55e4bc62714863e6d69ad3865e466fa91dd0eff7fab13bddc683c3afae" + sha256 cellar: :any, arm64_sonoma: "34a9b873da0935fc9cc0b68c4100c95bd1b23cc60b59672bb299ba2449b6f94f" + sha256 cellar: :any, sonoma: "1d441722962464d68ef89db0062fca468ba4e61ecfbb11192054947202aaa268" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8a10d139e39100f49e3a599fa968a5e3914d93c9e6ac86ba365ea5fe2116ed1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "110adddf9314496f0f21654961e0a173e72bb02c3c18a50152ab7ceeef52b586" + end + + depends_on "cmake" => :build + depends_on "glfw" + + def install + glfw = Formula["glfw"] + args = %W[ + -DNO_CLEW=1 + -DNO_CUDA=1 + -DNO_DOC=1 + -DNO_EXAMPLES=1 + -DNO_OMP=1 + -DNO_OPENCL=1 + -DNO_PTEX=1 + -DNO_TBB=1 + -DGLFW_LOCATION=#{glfw.opt_prefix} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install bin/"tutorials/hbr_tutorial_0" + rm_r("#{bin}/tutorials") + end + + test do + output = shell_output("#{pkgshare}/hbr_tutorial_0") + assert_match "Created a pyramid with 5 faces and 5 vertices", output + end +end diff --git a/Formula/o/opentelemetry-cpp.rb b/Formula/o/opentelemetry-cpp.rb new file mode 100644 index 0000000000000..8be2888f5890e --- /dev/null +++ b/Formula/o/opentelemetry-cpp.rb @@ -0,0 +1,101 @@ +class OpentelemetryCpp < Formula + desc "OpenTelemetry C++ Client" + homepage "https://opentelemetry.io/" + url "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.23.0.tar.gz" + sha256 "148ef298a4ef9e016228d53d7208ab9359d4fdf87f55649d60d07ffacc093b33" + license "Apache-2.0" + revision 2 + head "https://github.com/open-telemetry/opentelemetry-cpp.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "097c6cc737cd27b84a01e6aa0f28305db49345a90daacf2202676090e527a0cd" + sha256 arm64_sequoia: "06e34c75ce6c75ef603cafaa6060d05246b495517cbefcb8fae5c597f530264a" + sha256 arm64_sonoma: "0fc6bcadaafd921c7933b9df9da07b1e85415d97b2b6cc76a645821f0335fc14" + sha256 cellar: :any, sonoma: "1f68a3e8a12fbf0850898a9bcc3cb8805704aec8baef52c0bb17f9fe31ed6efe" + sha256 arm64_linux: "5e5fb2edae7fafdb7eb4340f58a334f344e7e00a0e1fcdbdb79c85e9b58048b0" + sha256 x86_64_linux: "7c88f7d384f8cafd1ff59e328e1b1d765b3cff8b8059f3a89dde0a7adb63154a" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "grpc" + depends_on "nlohmann-json" + depends_on "prometheus-cpp" + depends_on "protobuf" + + uses_from_macos "curl" + + on_macos do + depends_on "c-ares" + depends_on "openssl@3" + depends_on "re2" + end + + resource "openetelemetry-proto" do + url "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.8.0.tar.gz" + sha256 "057812cab50122c0fd504aae57b0b58424a5ec05d1b07889814bdfc7699abbe7" + end + + def install + (buildpath/"opentelemetry-proto").install resource("openetelemetry-proto") + + ENV.append "LDFLAGS", "-Wl,-undefined,dynamic_lookup" if OS.mac? + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_CXX_STANDARD=17", # Keep in sync with C++ standard in abseil.rb + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DHOMEBREW_ALLOW_FETCHCONTENT=ON", + "-DFETCHCONTENT_FULLY_DISCONNECTED=ON", + "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS", + "-DOTELCPP_PROTO_PATH=#{buildpath}/opentelemetry-proto", + "-DWITH_ELASTICSEARCH=ON", + "-DWITH_EXAMPLES=OFF", + "-DWITH_OTLP_GRPC=ON", + "-DWITH_OTLP_HTTP=ON", + "-DWITH_ABSEIL=ON", + "-DWITH_PROMETHEUS=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include "opentelemetry/sdk/trace/simple_processor.h" + #include "opentelemetry/sdk/trace/tracer_provider.h" + #include "opentelemetry/trace/provider.h" + #include "opentelemetry/exporters/ostream/span_exporter.h" + #include "opentelemetry/exporters/otlp/otlp_recordable_utils.h" + + namespace trace_api = opentelemetry::trace; + namespace trace_sdk = opentelemetry::sdk::trace; + namespace nostd = opentelemetry::nostd; + + int main() + { + auto exporter = std::unique_ptr( + new opentelemetry::exporter::trace::OStreamSpanExporter); + auto processor = std::unique_ptr( + new trace_sdk::SimpleSpanProcessor(std::move(exporter))); + auto provider = nostd::shared_ptr( + new trace_sdk::TracerProvider(std::move(processor))); + + // Set the global trace provider + trace_api::Provider::SetTracerProvider(provider); + + auto tracer = provider->GetTracer("foo_library", "1.0.0"); + auto scoped_span = trace_api::Scope(tracer->StartSpan("test")); + } + CPP + system ENV.cxx, "test.cc", "-std=c++17", + "-DHAVE_ABSEIL", + "-I#{include}", "-L#{lib}", + "-lopentelemetry_resources", + "-lopentelemetry_exporter_ostream_span", + "-lopentelemetry_trace", + "-lopentelemetry_common", + "-pthread", + "-o", "simple-example" + system "./simple-example" + end +end diff --git a/Formula/o/opentofu.rb b/Formula/o/opentofu.rb new file mode 100644 index 0000000000000..cc18544c936b1 --- /dev/null +++ b/Formula/o/opentofu.rb @@ -0,0 +1,62 @@ +class Opentofu < Formula + desc "Drop-in replacement for Terraform. Infrastructure as Code Tool" + homepage "https://opentofu.org/" + url "https://github.com/opentofu/opentofu/archive/refs/tags/v1.10.6.tar.gz" + sha256 "c6712629ef05f461d72c158de32bd009c29844a21bbcfa7bd7f582a341267f29" + license "MPL-2.0" + head "https://github.com/opentofu/opentofu.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d35a1c80527e9ff4f13b8a6eae2be4b014ff6741390b9491dcabbae83ecdbc42" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9023d6b52ab74a60d5141f6c5349433a58afeb85327acdc1923e887fd57060fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9023d6b52ab74a60d5141f6c5349433a58afeb85327acdc1923e887fd57060fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9023d6b52ab74a60d5141f6c5349433a58afeb85327acdc1923e887fd57060fe" + sha256 cellar: :any_skip_relocation, sonoma: "0673618e932cf96b7468f84f12c80b9408d5f7dbce9771f27788a722bc5590fa" + sha256 cellar: :any_skip_relocation, ventura: "0673618e932cf96b7468f84f12c80b9408d5f7dbce9771f27788a722bc5590fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "57d9e1640de2438295857b712ba947afeb3099cbce272c0c450432c78e343922" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8dc4025a3e579b2340176b7dc624a40537c9bf5ff7a4801839838644fb5168fd" + end + + depends_on "go" => :build + + conflicts_with "tenv", "tofuenv", because: "both install tofu binary" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = "-s -w -X github.com/opentofu/opentofu/version.dev=no" + system "go", "build", *std_go_args(output: bin/"tofu", ldflags:), "./cmd/tofu" + end + + test do + (testpath/"minimal.tf").write <<~HCL + variable "aws_region" { + default = "us-west-2" + } + + variable "aws_amis" { + default = { + eu-west-1 = "ami-b1cf19c6" + us-east-1 = "ami-de7ab6b6" + us-west-1 = "ami-3f75767a" + us-west-2 = "ami-21f78e11" + } + } + + # Specify the provider and access details + provider "aws" { + access_key = "this_is_a_fake_access" + secret_key = "this_is_a_fake_secret" + region = var.aws_region + } + + resource "aws_instance" "web" { + instance_type = "m1.small" + ami = var.aws_amis[var.aws_region] + count = 4 + } + HCL + + system bin/"tofu", "init" + system bin/"tofu", "graph" + end +end diff --git a/Formula/o/opentracing-cpp.rb b/Formula/o/opentracing-cpp.rb new file mode 100644 index 0000000000000..512a6c7b797f5 --- /dev/null +++ b/Formula/o/opentracing-cpp.rb @@ -0,0 +1,41 @@ +class OpentracingCpp < Formula + desc "OpenTracing API for C++" + homepage "https://opentracing.io/" + url "https://github.com/opentracing/opentracing-cpp/archive/refs/tags/v1.6.0.tar.gz" + sha256 "5b170042da4d1c4c231df6594da120875429d5231e9baa5179822ee8d1054ac3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e30de6dd8cd5968ca9e06daa0f2e6bc3f750f55adf8a7b70c981e79df7704932" + sha256 cellar: :any, arm64_sonoma: "7da4222d346f9ea96d1fbf8d89662250c82876a1f5cccbf2a335af1e6cf9ae71" + sha256 cellar: :any, arm64_ventura: "ccbb5e255e5f6708324c7d8853e5d9e16e6409d061d465628fa876f0371454bc" + sha256 cellar: :any, arm64_monterey: "50677ac8a2082e88324b45764c2f2d46dd70df23261c13e4e4fdfe4577505635" + sha256 cellar: :any, arm64_big_sur: "47fd29e6c0a73f405ac424f95299aa1d68a2735061cb6b96b262eea6a935210e" + sha256 cellar: :any, sonoma: "4ed62529cded82524f26b3e690ffa4ba74811cfa320f8d35d8f82b002f987890" + sha256 cellar: :any, ventura: "41295146fee1dafe218d97dd70061260ffa49bdee9ddc7c23bd465f97a4abb74" + sha256 cellar: :any, monterey: "a84c5a3c3fe04de1cc52d24381af68f5d054a353bee01fb10fb1abe6c4cbd0c9" + sha256 cellar: :any, big_sur: "1a904785b31fe03fc39333e81dc06e815b649c92062e23a99cf24137a013227b" + sha256 cellar: :any, catalina: "151a5af54448492f668979eb3a0e9fb92e2e1a99cb6766ba3985a9a88f26526a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77f61d48bdd3ed6cc866a9a1da22fa9ca861a67b3aa253e7bd38416eec8b9f42" + end + + deprecate! date: "2024-03-09", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived, replacement_formula: "opentelemetry-cpp" + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "example/tutorial/tutorial-example.cpp" + pkgshare.install "example/tutorial/text_map_carrier.h" + end + + test do + system ENV.cxx, "#{pkgshare}/tutorial-example.cpp", "-std=c++11", "-L#{lib}", "-I#{include}", + "-lopentracing", "-lopentracing_mocktracer", "-o", "tutorial-example" + system "./tutorial-example" + end +end diff --git a/Formula/o/opentsdb.rb b/Formula/o/opentsdb.rb new file mode 100644 index 0000000000000..49c7474ba45e5 --- /dev/null +++ b/Formula/o/opentsdb.rb @@ -0,0 +1,147 @@ +class Opentsdb < Formula + desc "Scalable, distributed Time Series Database" + homepage "http://opentsdb.net/" + url "https://github.com/OpenTSDB/opentsdb/archive/refs/tags/v2.4.1.tar.gz" + sha256 "70456fa8b33a9f0855105422f944d6ef14d077c4b4c9c26f8e4a86f329b247a0" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, sonoma: "1e94a2ce5cc95c944f5763df3442cc2fe71d12279f134b0a051549c6b4bd902a" + sha256 cellar: :any_skip_relocation, ventura: "022671a452bff9bacb3c84213f26adfb9d4fc50bdfbd28e2997262f6f5936607" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3cb78193f508228b2918205e3c4303febb1c2dd525e4a6f8d503866b41407f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c51dd6ebd008e6868a745d85dfe01374ef3b4e3ada22a54d4015d89e7973443" + end + + # Deprecated since: + # * No arm64 macOS support: https://docs.brew.sh/Support-Tiers#future-macos-support + # * CVE in stable release: https://nvd.nist.gov/vuln/detail/CVE-2023-36812 + # * Still needs OpenJDK 8 to build + deprecate! date: "2025-09-25", because: :unmaintained + disable! date: "2026-09-25", because: :unmaintained + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "openjdk@8" => :build + depends_on "python@3.13" => :build + depends_on "gnuplot" + depends_on "hbase" + depends_on "lzo" + depends_on "openjdk@11" + + on_macos do + depends_on arch: :x86_64 # openjdk@8 (needed to build) is not supported on ARM + end + + def install + with_env(JAVA_HOME: Language::Java.java_home("1.8")) do + ENV.prepend_path "PATH", Formula["python@3.13"].opt_libexec/"bin" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + "--localstatedir=#{var}/opentsdb", + "--mandir=#{man}", + "--sysconfdir=#{etc}", + *std_configure_args + system "make" + bin.mkpath + (pkgshare/"static/gwt/opentsdb/images/ie6").mkpath + ENV.deparallelize { system "make", "install" } + end + + env = Language::Java.java_home_env("11") + env["PATH"] = "$JAVA_HOME/bin:$PATH" + env["HBASE_HOME"] = Formula["hbase"].opt_libexec + # We weren't able to get HBase native LZO compression working in Monterey + env["COMPRESSION"] = (OS.mac? && MacOS.version >= :monterey) ? "NONE" : "LZO" + + create_table = pkgshare/"tools/create_table_with_env.sh" + create_table.write_env_script pkgshare/"tools/create_table.sh", env + create_table.chmod 0755 + + inreplace pkgshare/"etc/opentsdb/opentsdb.conf", "/usr/share", "#{HOMEBREW_PREFIX}/share" + etc.install pkgshare/"etc/opentsdb" + (pkgshare/"plugins/.keep").write "" + + (bin/"start-tsdb.sh").write <<~SH + #!/bin/sh + exec "#{opt_bin}/tsdb" tsd \\ + --config="#{etc}/opentsdb/opentsdb.conf" \\ + --staticroot="#{opt_pkgshare}/static/" \\ + --cachedir="#{var}/cache/opentsdb" \\ + --port=4242 \\ + --zkquorum=localhost:2181 \\ + --zkbasedir=/hbase \\ + --auto-metric \\ + "$@" + SH + (bin/"start-tsdb.sh").chmod 0755 + + libexec.mkpath + bin.env_script_all_files(libexec, env) + end + + def post_install + (var/"cache/opentsdb").mkpath + system "#{Formula["hbase"].opt_bin}/start-hbase.sh" + begin + sleep 2 + system "#{pkgshare}/tools/create_table_with_env.sh" + ensure + system "#{Formula["hbase"].opt_bin}/stop-hbase.sh" + end + end + + service do + run opt_bin/"start-tsdb.sh" + working_dir HOMEBREW_PREFIX + log_path var/"opentsdb/opentsdb.log" + error_log_path var/"opentsdb/opentsdb.err" + end + + test do + cp_r (Formula["hbase"].opt_libexec/"conf"), testpath + inreplace (testpath/"conf/hbase-site.xml") do |s| + s.gsub!(/(hbase.rootdir.*)\n.*/, "\\1\nfile://#{testpath}/hbase") + s.gsub!(/(hbase.zookeeper.property.dataDir.*)\n.*/, "\\1\n#{testpath}/zookeeper") + end + + ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}/tmp" + ENV["HBASE_LOG_DIR"] = testpath/"logs" + ENV["HBASE_CONF_DIR"] = testpath/"conf" + ENV["HBASE_PID_DIR"] = testpath/"pid" + + system Formula["hbase"].opt_bin/"start-hbase.sh" + begin + sleep 10 + + system pkgshare/"tools/create_table_with_env.sh" + + tsdb_err = testpath/"tsdb.err" + tsdb_out = testpath/"tsdb.out" + fork do + $stderr.reopen(tsdb_err, "w") + $stdout.reopen(tsdb_out, "w") + exec("#{bin}/start-tsdb.sh") + end + sleep 15 + + TCPSocket.open("localhost", 4242) do |sock| + sock.puts("put homebrew.install.test 1356998400 42.5 host=webserver01 cpu=0\n") + ensure + sock.close + end + + system bin/"tsdb", "query", "1356998000", "1356999000", "sum", + "homebrew.install.test", "host=webserver01", "cpu=0" + ensure + system "#{Formula["hbase"].opt_bin}/stop-hbase.sh" + end + end +end diff --git a/Formula/o/openvdb.rb b/Formula/o/openvdb.rb new file mode 100644 index 0000000000000..6d1e31c0f0fef --- /dev/null +++ b/Formula/o/openvdb.rb @@ -0,0 +1,51 @@ +class Openvdb < Formula + desc "Sparse volumetric data processing toolkit" + homepage "https://www.openvdb.org/" + url "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v13.0.0.tar.gz" + sha256 "4d6a91df5f347017496fe8d22c3dbb7c4b5d7289499d4eb4d53dd2c75bb454e1" + license "MPL-2.0" + head "https://github.com/AcademySoftwareFoundation/openvdb.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "445ead0c4325371ced66df0d99da1f8424dfb49c4347709f14fae008f1dd5f0e" + sha256 cellar: :any, arm64_sequoia: "420be15429bb1e5466dd1ed118089d2bda393112bb0e6cb185cf7718e26447bd" + sha256 cellar: :any, arm64_sonoma: "9cc0cd25b0f828f31b22fdf35678f1103d236afb1e0b3085567a40d5b9412582" + sha256 cellar: :any, sonoma: "7dce3911efbd25d010ea5d421456aeea2e434ab02680a6058aae9e3d843a1f31" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbfa41538b6984822cd664d9b806a6a080fc0fa73d2446086365d556c182b06e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "777fc2c5878dac4d41c5a862a5df09605afa41bf733685b2ccdccd7d77ac7817" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + + depends_on "boost" + depends_on "c-blosc" + depends_on "jemalloc" + depends_on "openexr" + depends_on "tbb" + + uses_from_macos "zlib" + + def install + args = [ + "-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON", + "-DOPENVDB_BUILD_DOCS=ON", + "-DUSE_NANOVDB=ON", + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath}", + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test_file" do + url "https://artifacts.aswf.io/io/aswf/openvdb/models/cube.vdb/1.0.0/cube.vdb-1.0.0.zip" + sha256 "05476e84e91c0214ad7593850e6e7c28f777aa4ff0a1d88d91168a7dd050f922" + end + + testpath.install resource("homebrew-test_file") + system bin/"vdb_print", "-m", "cube.vdb" + end +end diff --git a/Formula/o/openvi.rb b/Formula/o/openvi.rb new file mode 100644 index 0000000000000..acba5dfe9ad08 --- /dev/null +++ b/Formula/o/openvi.rb @@ -0,0 +1,32 @@ +class Openvi < Formula + desc "Portable OpenBSD vi for UNIX systems" + homepage "https://github.com/johnsonjh/OpenVi" + url "https://github.com/johnsonjh/OpenVi/archive/refs/tags/7.7.32.tar.gz" + sha256 "3378f371b7446708b5d909dcbf8608a74d771f2660f06014888da2163a77af81" + license "BSD-3-Clause" + head "https://github.com/johnsonjh/OpenVi.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7f9f98c1766d28f774755c5504a4e0009aa9075d0810dac96a43f670543d0836" + sha256 cellar: :any, arm64_sequoia: "21592b330f84b246945cb28063a11879f1eefe50df87ac000693362cc6cbe882" + sha256 cellar: :any, arm64_sonoma: "812ae5e06f44b6adccb233053f542332536be62b4d4dcb6d75c52aa4636ec213" + sha256 cellar: :any, sonoma: "ab51a0599172f446d17f61bf0a1c93816100854d58bf6875fb1ae1635d97d662" + sha256 cellar: :any_skip_relocation, arm64_linux: "72b16c18985eafe024d7cfe55047850f7e36375d0ca6aa42e84f2dc0b701eb36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "070f50496b0c46cc89f50bc2884e227658778557f745a8f061cdebfe5e2c94a0" + end + + depends_on "pkgconf" => :build + depends_on "ncurses" # https://github.com/johnsonjh/OpenVi/issues/32 + + def install + system "make", "install", "CURSESLIB=-lncurses", "CHOWN=true", "LTO=1", "PREFIX=#{prefix}" + end + + test do + (testpath/"test").write("This is toto!\n") + pipe_output("#{bin}/ovi -e test", "%s/toto/tutu/g\nwq\n") + assert_equal "This is tutu!\n", File.read("test") + end +end diff --git a/Formula/o/openvino.rb b/Formula/o/openvino.rb new file mode 100644 index 0000000000000..cee470c13e507 --- /dev/null +++ b/Formula/o/openvino.rb @@ -0,0 +1,255 @@ +class Openvino < Formula + include Language::Python::Virtualenv + + desc "Open Visual Inference And Optimization toolkit for AI inference" + homepage "https://docs.openvino.ai" + url "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2025.3.0.tar.gz" + sha256 "969a1b881ad0103dd522b5b09738434261d1158ebb23acb000eafef55268f7be" + license "Apache-2.0" + revision 3 + head "https://github.com/openvinotoolkit/openvino.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ae9c6b4528309cf134bc52475ec2110ded8c42ed5705f18f212325b11f168cb1" + sha256 cellar: :any, arm64_sequoia: "ec6a9d975ba902119e71ac42ee35f9646b4f4c82d7aeb75a30818e1b87678d87" + sha256 cellar: :any, arm64_sonoma: "b9e2541f8ec23fa589cda69be0a1a3f69f360b22464aa9054fe03a18aa91aa9c" + sha256 cellar: :any, sonoma: "48f27adb84bf9d07a7cc951d75b3919f66b9d23d2eb64a34e96d64e37c67624d" + sha256 arm64_linux: "24f6f675c08cc1663c8f5296c94cc13e81d19ceaf6fbf9da968c713281cfe025" + sha256 x86_64_linux: "c6718ef142c200211f94def1737b332d6007e2bf2951d4399c3db0223476decd" + end + + depends_on "cmake" => [:build, :test] + depends_on "flatbuffers" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "pybind11" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "abseil" + depends_on "nlohmann-json" + depends_on "numpy" + depends_on "onnx" + depends_on "protobuf" + depends_on "pugixml" + depends_on "snappy" + depends_on "tbb" + + on_linux do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "opencl-clhpp-headers" => :build + depends_on "opencl-headers" => :build + depends_on "rapidjson" => :build + depends_on "opencl-icd-loader" + + resource "onednn_gpu" do + url "https://github.com/uxlfoundation/oneDNN/archive/8edf6bb60fdaa2769f3cebf44bd2ee94da00744c.tar.gz" + sha256 "c943ab6e9cc6c382de48e76cb62ba075554a89b438876d945e5355e22588e06d" + end + end + + on_arm do + depends_on "scons" => :build + + resource "arm_compute" do + url "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v25.03.tar.gz" + sha256 "30f83cea6d338a0e33495c33c547b7b720027baff4c3eea66014709fdd52aaac" + end + resource "arm_kleidiai" do + url "https://github.com/ARM-software/kleidiai/archive/eaf63a6ae9a903fb4fa8a4d004a974995011f444.tar.gz" + sha256 "756fa3040ff23f78a4c3f4c1984a3814d78d302b0b5dc3f0b255322368aefc58" + end + end + + # FIXME: depends_on "xbyak" => :build + # + # compute_hash.cpp:418:53: error: use of overloaded operator '+' is ambiguous + # (with operand types 'RegistersPool::Reg' and 'const uint64_t' + # after https://github.com/herumi/xbyak/commit/689767da682edab65b55e9607535c28902370b08 + resource "xbyak" do + on_intel do + url "https://github.com/herumi/xbyak/archive/refs/tags/v7.28.tar.gz" + sha256 "c8da3d85fa322303cb312d6315592547952d7bb81f58bf98bc0a26ecd88be495" + end + end + + resource "mlas" do + url "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256 "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + end + + resource "onednn_cpu" do + url "https://github.com/openvinotoolkit/oneDNN/archive/3d7a6f1d068d8ae08f189aa4baa93d177bc07507.tar.gz" + sha256 "354fa9c44a6feaea06230082e1b9f53ea853836a29e4030320ba8e480357614b" + end + + resource "openvino-telemetry" do + url "https://files.pythonhosted.org/packages/71/8a/89d82f1a9d913fb266c2e6dc2f6030935db24b7152963a8db6c4f039787f/openvino_telemetry-2025.2.0.tar.gz" + sha256 "8bf8127218e51e99547bf38b8fb85a8b31c9bf96e6f3a82eb0b3b6a34155977c" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def python3 + "python3.14" + end + + def install + # Work around for Protobuf C++ 6.x until OpenVINO adds support + inreplace "thirdparty/dependencies.cmake", "find_package(Protobuf 5.26.0 ", + "find_package(Protobuf 6.30.0 " + + # cmake 4 build patch for third parties + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + # FIXME: workaround for + # CMake Error at cmake/developer_package/version.cmake:102 (message): + # OpenVINO_VERSION_MAJOR parsed from CI_BUILD_NUMBER () and from + # openvino/core/version.hpp (2025) are different + ENV["CI_BUILD_NUMBER"] = "#{version}-#{revision}-" + + # Remove git cloned 3rd party to make sure formula dependencies are used + dependencies = %w[thirdparty/ocl + thirdparty/xbyak thirdparty/gflags + thirdparty/ittapi thirdparty/snappy + thirdparty/pugixml thirdparty/protobuf + thirdparty/onnx/onnx thirdparty/flatbuffers + src/plugins/intel_cpu/thirdparty/mlas + src/plugins/intel_cpu/thirdparty/onednn + src/plugins/intel_gpu/thirdparty/rapidjson + src/plugins/intel_gpu/thirdparty/onednn_gpu + src/plugins/intel_cpu/thirdparty/ComputeLibrary] + dependencies.each { |d| rm_r(buildpath/d) } + + resource("mlas").stage buildpath/"src/plugins/intel_cpu/thirdparty/mlas" + resource("onednn_cpu").stage buildpath/"src/plugins/intel_cpu/thirdparty/onednn" + + if Hardware::CPU.arm? + resource("arm_compute").stage buildpath/"src/plugins/intel_cpu/thirdparty/ComputeLibrary" + resource("arm_kleidiai").stage buildpath/"src/plugins/intel_cpu/thirdparty/kleidiai" + else + # TODO: Remove once able to build with xbyak >= 7.29 + resource("xbyak").stage buildpath/"thirdparty/xbyak" + end + + resource("onednn_gpu").stage buildpath/"src/plugins/intel_gpu/thirdparty/onednn_gpu" if OS.linux? + + cmake_args = %w[ + -DENABLE_CPPLINT=OFF + -DENABLE_CLANG_FORMAT=OFF + -DENABLE_NCC_STYLE=OFF + -DENABLE_OV_JAX_FRONTEND=OFF + -DENABLE_JS=OFF + -DENABLE_TEMPLATE=OFF + -DENABLE_INTEL_NPU=OFF + -DENABLE_PYTHON=OFF + -DENABLE_SAMPLES=OFF + -DCPACK_GENERATOR=BREW + -DENABLE_SYSTEM_PUGIXML=ON + -DENABLE_SYSTEM_TBB=ON + -DENABLE_SYSTEM_PROTOBUF=ON + -DENABLE_SYSTEM_FLATBUFFERS=ON + -DENABLE_SYSTEM_SNAPPY=ON + -DProtobuf_USE_STATIC_LIBS=OFF + -DOV_FORCE_ADHOC_SIGN=ON + ] + if OS.mac? + cmake_args << "-DCMAKE_OSX_DEPLOYMENT_TARGET=#{MacOS.version}.0" + ENV["MACOSX_DEPLOYMENT_TARGET"] = "#{MacOS.version}.0" + end + + # Fix linking failure of certain binaries. + cmake_args << "-DCMAKE_BUILD_RPATH=#{HOMEBREW_PREFIX}/lib" if OS.linux? && Hardware::CPU.arm? + + openvino_binary_dir = "#{buildpath}/build" + system "cmake", "-S", ".", "-B", openvino_binary_dir, *cmake_args, *std_cmake_args + system "cmake", "--build", openvino_binary_dir + system "cmake", "--install", openvino_binary_dir + + # build & install python bindings + ENV["OPENVINO_BINARY_DIR"] = openvino_binary_dir + ENV["PY_PACKAGES_DIR"] = Language::Python.site_packages(python3) + ENV["WHEEL_VERSION"] = version + ENV["SKIP_RPATH"] = "1" + ENV["PYTHON_EXTENSIONS_ONLY"] = "1" + ENV["CPACK_GENERATOR"] = "BREW" + + # Allow our newer `numpy` + inreplace "pyproject.toml", "numpy>=1.16.6,<2.3.0", "numpy>=1.16.6" + venv = virtualenv_create(libexec, python3) + venv.pip_install resources.select { |r| r.url.start_with?("https://files.pythonhosted.org/") } + venv.pip_install_and_link "." + (prefix/Language::Python.site_packages(python3)/"homebrew-openvino.pth").write venv.site_packages + end + + test do + pkg_config_flags = shell_output("pkgconf --cflags --libs openvino tbb pugixml").chomp.split + + (testpath/"openvino_available_devices.c").write <<~C + #include + #include + + #define OV_CALL(statement) do { \ + int _ov_status = (statement); \ + if (_ov_status != 0) { \ + fprintf(stderr, "OV_CALL failed: %s at %s:%d (status=%d)\\n", \ + #statement, __FILE__, __LINE__, _ov_status); \ + return 1; \ + } \ + } while (0) + + int main() { + ov_core_t* core = NULL; + char* ret = NULL; + OV_CALL(ov_core_create(&core)); + OV_CALL(ov_core_get_property(core, "CPU", "AVAILABLE_DEVICES", &ret)); + #if !defined(__APPLE__) && !defined(__aarch64__) + // FIXME: checking `GPU` fails on aarch64 Linux. + OV_CALL(ov_core_get_property(core, "GPU", "AVAILABLE_DEVICES", &ret)); + #endif + OV_CALL(ov_core_get_property(core, "AUTO", "SUPPORTED_PROPERTIES", &ret)); + OV_CALL(ov_core_get_property(core, "MULTI", "SUPPORTED_PROPERTIES", &ret)); + OV_CALL(ov_core_get_property(core, "HETERO", "SUPPORTED_PROPERTIES", &ret)); + OV_CALL(ov_core_get_property(core, "BATCH", "SUPPORTED_PROPERTIES", &ret)); + ov_core_free(core); + return 0; + } + C + system ENV.cc, testpath/"openvino_available_devices.c", *pkg_config_flags, + "-o", testpath/"openvino_devices_test" + system testpath/"openvino_devices_test" + + (testpath/"openvino_available_frontends.cpp").write <<~CPP + #include + #include + + int main() { + std::cout << ov::frontend::FrontEndManager().get_available_front_ends().size(); + return 0; + } + CPP + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.13) + project(openvino_frontends_test) + set(CMAKE_CXX_STANDARD 11) + add_executable(${PROJECT_NAME} openvino_available_frontends.cpp) + find_package(OpenVINO REQUIRED COMPONENTS Runtime ONNX TensorFlow TensorFlowLite Paddle PyTorch) + target_link_libraries(${PROJECT_NAME} PRIVATE openvino::runtime) + CMAKE + + system "cmake", testpath.to_s + system "cmake", "--build", testpath.to_s + assert_equal "6", shell_output(testpath/"openvino_frontends_test").strip + + system python3, "-c", <<~PYTHON + import openvino.runtime as ov + assert '#{version}' in ov.__version__ + PYTHON + end +end diff --git a/Formula/o/openvpn.rb b/Formula/o/openvpn.rb new file mode 100644 index 0000000000000..510aabec74f68 --- /dev/null +++ b/Formula/o/openvpn.rb @@ -0,0 +1,75 @@ +class Openvpn < Formula + desc "SSL/TLS VPN implementing OSI layer 2 or 3 secure network extension" + homepage "https://openvpn.net/community/" + url "https://swupdate.openvpn.org/community/releases/openvpn-2.6.15.tar.gz" + mirror "https://build.openvpn.net/downloads/releases/openvpn-2.6.15.tar.gz" + sha256 "e35513ee15995e3c71adfd8891b9f33522896c70b3baa2ed9a23c7a42c4d7bde" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + + livecheck do + url "https://openvpn.net/community-downloads/" + regex(/href=.*?openvpn[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "e8fcc37e8cf1663a60bd2a828e45845953c3ed4c350dd82e96521fec9180c37b" + sha256 arm64_sequoia: "3307ef632ab113476a520edcab9bc50ca2901539ff205e2e2e76d4fed47af504" + sha256 arm64_sonoma: "3e501aedc1dc2ee77461fd0af0e36426aa0551e0a5dd5b295b81b785cd061cf3" + sha256 sonoma: "90822c5b010f1d64ceb4e4de8660f4925caf14386d468e3a80ed3fb717a27b5d" + sha256 arm64_linux: "87b5366d804e3e29e68de5405bd8e480e02c2c573ca66c6f2281ce80069b845c" + sha256 x86_64_linux: "ba2c4d6ca2615767b12685faa21ef9e03da963f686787796c4c2855c031559e5" + end + + depends_on "pkgconf" => :build + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pkcs11-helper" + + on_linux do + depends_on "libcap-ng" + depends_on "libnl" + depends_on "linux-pam" + depends_on "net-tools" + end + + def install + system "./configure", "--disable-silent-rules", + "--with-crypto-library=openssl", + "--enable-pkcs11", + *std_configure_args + inreplace "sample/sample-plugins/Makefile" do |s| + if OS.mac? + s.gsub! Superenv.shims_path/"pkg-config", Formula["pkgconf"].opt_bin/"pkg-config" + else + s.gsub! Superenv.shims_path/"ld", "ld" + end + end + system "make", "install" + + inreplace "sample/sample-config-files/openvpn-startup.sh", + "/etc/openvpn", etc/"openvpn" + + (doc/"samples").install Dir["sample/sample-*"] + (etc/"openvpn").install doc/"samples/sample-config-files/client.conf" + (etc/"openvpn").install doc/"samples/sample-config-files/server.conf" + + # We don't use mbedtls, so this file is unnecessary & somewhat confusing. + rm doc/"README.mbedtls" + end + + def post_install + (var/"run/openvpn").mkpath + end + + service do + run [opt_sbin/"openvpn", "--config", etc/"openvpn/openvpn.conf"] + keep_alive true + require_root true + working_dir etc/"openvpn" + end + + test do + system sbin/"openvpn", "--show-ciphers" + end +end diff --git a/Formula/o/operator-sdk.rb b/Formula/o/operator-sdk.rb new file mode 100644 index 0000000000000..46da49bfaa4cf --- /dev/null +++ b/Formula/o/operator-sdk.rb @@ -0,0 +1,54 @@ +class OperatorSdk < Formula + desc "SDK for building Kubernetes applications" + homepage "https://sdk.operatorframework.io/" + url "https://github.com/operator-framework/operator-sdk.git", + tag: "v1.41.1", + revision: "69ee6d4077ff769a8513571343a96f3cb8ca35ef" + license "Apache-2.0" + head "https://github.com/operator-framework/operator-sdk.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8cc575e20f4aaa085d89dcb12faa86a024deae55b89b69b2c65848733f864962" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7af87d45d23a38bdd577d79113fec7e13ed85659b08370840cc4330e9a1f522c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a56c33d80094de249513a5357106cfc05f171c4a9fcbd9d716958c025b3af00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71366694c1096f6f371093719fba04b8169c048c38255c1ef28aefba17de03d3" + sha256 cellar: :any_skip_relocation, sonoma: "5f8c7d8a716e12d7cedc8da2b7803618f54b4178dd6bc3db1a5409f5084d996e" + sha256 cellar: :any_skip_relocation, ventura: "17a5045f3c546d858044a904d97af2275f0a15f5069342430f71f4bcb9450dc0" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7d5e4e0838f3ae5941a419343a3076d0ba2e37d8f579fc365cdb36aafc76529" + sha256 cellar: :any_skip_relocation, x86_64_linux: "570ebcf4795769e4865155dc8500b15c4862535e0249f51396bc2234051ab532" + end + + depends_on "pkgconf" => :build + depends_on "go" + depends_on "gpgme" + depends_on "libassuan" + depends_on "libgpg-error" + + def install + ENV["GOBIN"] = bin + system "make", "install", "CGO_ENABLED=1" + + generate_completions_from_executable(bin/"operator-sdk", "completion") + end + + test do + output = shell_output("#{bin}/operator-sdk version") + assert_match "version: \"v#{version}\"", output + assert_match stable.specs[:revision], output + + mkdir "brewtest" do + system "go", "mod", "init", "brewtest" + + output = shell_output("#{bin}/operator-sdk init --domain=example.com --repo=github.com/example/memcached") + assert_match "$ operator-sdk create api", output + + output = shell_output("#{bin}/operator-sdk create api --group c --version v1 --kind M --resource --controller") + assert_match "$ make manifests", output + end + end +end diff --git a/Formula/o/ophcrack.rb b/Formula/o/ophcrack.rb new file mode 100644 index 0000000000000..3d5e19428d045 --- /dev/null +++ b/Formula/o/ophcrack.rb @@ -0,0 +1,50 @@ +class Ophcrack < Formula + desc "Microsoft Windows password cracker using rainbow tables" + homepage "https://ophcrack.sourceforge.io/" + url "https://downloads.sourceforge.net/project/ophcrack/ophcrack/3.8.0/ophcrack-3.8.0.tar.bz2" + mirror "https://deb.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2" + sha256 "048a6df57983a3a5a31ac7c4ec12df16aa49e652a29676d93d4ef959d50aeee0" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2553d9e208e58765c20d11a8ce7a24ba4564caca492eaeec39ff7f3143452bed" + sha256 cellar: :any, arm64_sequoia: "2cc621ee5589b47e95841913aaa74aa64a404c677c3ab2062413c17424db56f2" + sha256 cellar: :any, arm64_sonoma: "49dd51ca8558b2ee8d1604f71cfefc6ab5d154ed98e979c20493cf81ee0928ae" + sha256 cellar: :any, arm64_ventura: "2944016f7c83334b70e9be541ddb4dc1da3fd8153234897cfe133ae29e336afc" + sha256 cellar: :any, arm64_monterey: "37ecbad244ecc446c4bbdffe9d0826c76ef775e40e690b4f41dbc6c6630fdfde" + sha256 cellar: :any, arm64_big_sur: "d8c3ea08b451c0c0d27ca20e531f902fdf9b4fde1eb1fb76759dc5a7e931faab" + sha256 cellar: :any, sonoma: "03a63578e3db4ec721c74962a36a81bf3c417d05f8c557240ce0791a8c74ef4b" + sha256 cellar: :any, ventura: "fe4a6f346518d3efcfeefba25b473deb83ff1ca2701110551eed83c8c53e0e9a" + sha256 cellar: :any, monterey: "c96ec9cc73e454864271c1a8decfa64b7a5b81a2a7a26a54713167d12fd7e770" + sha256 cellar: :any, big_sur: "5a15aea7e8140b19119e29c2d4b8766a1f61bdef196458e684a95bcaaa81ad7d" + sha256 cellar: :any, catalina: "0b0e6f27354207ce5939fd31581c7913c64824752ba6e217c097dcc17041221c" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe021b18a96a207453ab400f344773412a39a7d1a527bcc2bb1b76417f2e13b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18e7c06d3f04cebc060e100f2b1a8c5825736fbd13047e6f1732a7e2d006235e" + end + + depends_on "openssl@3" + + uses_from_macos "expat" + + def install + args = %W[ + --disable-gui + --with-libssl=#{Formula["openssl@3"].opt_prefix} + ] + args << "--with-libexpat=#{Formula["expat"].opt_prefix}" if OS.linux? + + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"ophcrack", "-h" + end +end diff --git a/Formula/o/opkssh.rb b/Formula/o/opkssh.rb new file mode 100644 index 0000000000000..b6a8eb74cca21 --- /dev/null +++ b/Formula/o/opkssh.rb @@ -0,0 +1,36 @@ +class Opkssh < Formula + desc "Enables SSH to be used with OpenID Connect" + homepage "https://eprint.iacr.org/2023/296" + url "https://github.com/openpubkey/opkssh/archive/refs/tags/v0.10.0.tar.gz" + sha256 "71796c060705411e98fc7d11d944c531cea1d09df14cc1331c5647a31483de41" + license "Apache-2.0" + head "https://github.com/openpubkey/opkssh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "44ad548c145cb779e6d50733b58db55b117d4329729b70fe0cffdc3279498c24" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44ad548c145cb779e6d50733b58db55b117d4329729b70fe0cffdc3279498c24" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44ad548c145cb779e6d50733b58db55b117d4329729b70fe0cffdc3279498c24" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44ad548c145cb779e6d50733b58db55b117d4329729b70fe0cffdc3279498c24" + sha256 cellar: :any_skip_relocation, sonoma: "4a35524a4291410b6ceea50271ae654dd7eb893739a1c40968e734c08e82b5ff" + sha256 cellar: :any_skip_relocation, ventura: "4a35524a4291410b6ceea50271ae654dd7eb893739a1c40968e734c08e82b5ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "81e5ae721162aa37d4c09a40aca5e253e21cf32e601b9a8ed0abbc22fe2e7078" + sha256 cellar: :any_skip_relocation, x86_64_linux: "164ecd36445fc15136df17384e10271908eedece6c8e1b1a1b4f56a7d8fcf782" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/opkssh --version") + + output = shell_output("#{bin}/opkssh add brew brew brew 2>&1", 1) + assert_match "Failed to add to policy", output + end +end diff --git a/Formula/o/optipng.rb b/Formula/o/optipng.rb new file mode 100644 index 0000000000000..86b6dd2bade83 --- /dev/null +++ b/Formula/o/optipng.rb @@ -0,0 +1,35 @@ +class Optipng < Formula + desc "PNG file optimizer" + homepage "https://optipng.sourceforge.net/" + url "https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-7.9.1/optipng-7.9.1.tar.gz" + sha256 "c2579be58c2c66dae9d63154edcb3d427fef64cb00ec0aff079c9d156ec46f29" + license "Zlib" + head "https://git.code.sf.net/p/optipng/code.git", branch: "tmp/main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c84699200d7b820ddfa07875d5f5be83cf6e4dd3497385919c46e748a4a8fdd8" + sha256 cellar: :any, arm64_sequoia: "c2d204ed132d5c5268baf7b464e862e8201a5f80e0d3aa5891204ccccbdca28a" + sha256 cellar: :any, arm64_sonoma: "789d6ad60ed2c65a9c40850dc8401afd8c1c47239839a0b029bb1439f90bb3b7" + sha256 cellar: :any, arm64_ventura: "ff5edc78c0cc6a0541b1d1b5fe095df0bd0d577dd01e490e9552ed2af60bd967" + sha256 cellar: :any, sonoma: "8499bb0e6d795f1c3f52af1da26a10a67b97b75dd6b25a976d965e89d53ce549" + sha256 cellar: :any, ventura: "df8d6959a9682204ddcdef2c02a74c4267f6ff65940fcf330d23e5ccfdb633fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "babd33fb7d35adccc72a42b31dd796df7be85815b674bb2db204e3acce18fdb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd98dd54abf31da17c715505cd41351ceceb394a01b9927fc9454f08463e9aa6" + end + + depends_on "libpng" + + uses_from_macos "zlib" + + def install + system "./configure", "--with-system-zlib", + "--with-system-libpng", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"optipng", "-simulate", test_fixtures("test.png") + end +end diff --git a/Formula/o/opus-tools.rb b/Formula/o/opus-tools.rb new file mode 100644 index 0000000000000..527022abd9754 --- /dev/null +++ b/Formula/o/opus-tools.rb @@ -0,0 +1,56 @@ +class OpusTools < Formula + desc "Utilities to encode, inspect, and decode .opus files" + homepage "https://www.opus-codec.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/opus/opus-tools-0.2.tar.gz" + mirror "https://archive.mozilla.org/pub/opus/opus-tools-0.2.tar.gz" + sha256 "b4e56cb00d3e509acfba9a9b627ffd8273b876b4e2408642259f6da28fa0ff86" + license "BSD-2-Clause" + revision 2 + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/opus/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)opus-tools[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ec7af6774ddcc95aca50060460f3fd6fd3dcc97b78ee2c64e9230b2d7e0e958f" + sha256 cellar: :any, arm64_sequoia: "2e17161e605515377130ebeb2edecf02a4518a8c27373e3eca594cfd48ed6de5" + sha256 cellar: :any, arm64_sonoma: "1ccc81bd48aa589c8743efb2e88493da699be27e78a7c213616ddbde5caa24b2" + sha256 cellar: :any, arm64_ventura: "7f67fcf51d7b7b4e72db4e7445e4d5a6465051fe2a3d1d6655375a783d5c1372" + sha256 cellar: :any, sonoma: "be32020f65c0ac4614a81c6aee8adb3d5a2918625c7e33bafa80c7162d561784" + sha256 cellar: :any, ventura: "3916eb7536e8928698b77b9c7b40fa103e1f05848b3babca581f7f50709b9536" + sha256 cellar: :any_skip_relocation, arm64_linux: "ceba1cc3046ad55c60b3883c3d9cd1272c9f308c2bb9edb011d7ec070a6feebf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dde385e2c30d9478123ea358ab5b4786c7337cbb2728202eab4806926f02bf7d" + end + + head do + url "https://gitlab.xiph.org/xiph/opus-tools.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "libogg" + depends_on "libopusenc" + depends_on "opus" + depends_on "opusfile" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + cp test_fixtures("test.wav"), "test.wav" + assert_match "Encoding complete", shell_output("#{bin}/opusenc test.wav enc.opus 2>&1") + assert_path_exists testpath/"enc.opus", "Failed to encode to enc.opus" + assert_match "Decoding complete", shell_output("#{bin}/opusdec enc.opus dec.wav 2>&1") + assert_path_exists testpath/"dec.wav", "Failed to decode to dec.wav" + end +end diff --git a/Formula/o/opus.rb b/Formula/o/opus.rb new file mode 100644 index 0000000000000..2b6cfa42a8d7e --- /dev/null +++ b/Formula/o/opus.rb @@ -0,0 +1,71 @@ +class Opus < Formula + desc "Audio codec" + homepage "https://www.opus-codec.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/opus/opus-1.5.2.tar.gz" + mirror "https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz" + sha256 "65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/opus/" + regex(%r{href=(?:["']?|.*?/)opus[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "89bfef47e7080459c6295beb518b70faf30474929eccab1ea1e05d76fc513285" + sha256 cellar: :any, arm64_sequoia: "564c0c7f19ac41ed22baabf7c1bf2e172f81bad60ec211d03bda8eeb42ce2f1a" + sha256 cellar: :any, arm64_sonoma: "017d3d10cf679cad5cee3501a53945903eabff9f7657214944bf9156f85e9872" + sha256 cellar: :any, arm64_ventura: "d53715a8e666c4d91917f6746c2516aca2f160294ca5542a7db7a53d953c7447" + sha256 cellar: :any, arm64_monterey: "02260aea3cc13374c4366abb75e14034bb374d76873d4fbbd9f26794e1d727cb" + sha256 cellar: :any, sonoma: "858dbe63f7a6489d18c9ab19114496081881623319bce3b917e686e63550dd84" + sha256 cellar: :any, ventura: "742d2b0dabd25100776c6a57743fde9e05b02e154612ead68dc25c1ef57fcc3d" + sha256 cellar: :any, monterey: "becc7d03c9219308c69f7704d33cc7cf0579a2db902e82ef33bf5266f69a54c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "289beb9cfacf46917db19b01dc58f2409265bc7029ddfbf0dc2def345baf8f53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d35c066cdcaad6a6b9f840fc2dd70da4ca02000c11b08674fa065b8bf7a9b925" + end + + head do + url "https://gitlab.xiph.org/xiph/opus.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-doc", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char **argv) + { + int err = 0; + opus_int32 rate = 48000; + int channels = 2; + int app = OPUS_APPLICATION_AUDIO; + OpusEncoder *enc; + int ret; + + enc = opus_encoder_create(rate, channels, app, &err); + if (!(err < 0)) + { + err = opus_encoder_ctl(enc, OPUS_SET_BITRATE(OPUS_AUTO)); + if (!(err < 0)) + { + opus_encoder_destroy(enc); + return 0; + } + } + return err; + } + CPP + system ENV.cxx, "-I#{include}/opus", testpath/"test.cpp", + "-L#{lib}", "-lopus", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/opusfile.rb b/Formula/o/opusfile.rb new file mode 100644 index 0000000000000..14b10015b19a9 --- /dev/null +++ b/Formula/o/opusfile.rb @@ -0,0 +1,80 @@ +class Opusfile < Formula + desc "API for decoding and seeking in .opus files" + homepage "https://www.opus-codec.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/opus/opusfile-0.12.tar.gz" + mirror "https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz" + sha256 "118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b" + license "BSD-3-Clause" + revision 1 + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/opus/" + regex(%r{href=(?:["']?|.*?/)opusfile[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "922d401e40f524054d79245fa8b30b4025420bdc1f38fbdb4ac223ddbc0bd1df" + sha256 cellar: :any, arm64_sequoia: "ad3b05a6931361ed1be9fd61d7c378d149071cf50bf0e7741df0799da481849a" + sha256 cellar: :any, arm64_sonoma: "6de955abe2ffac326b26128bb2001110e1c91cfe171c54673bf23abc47e88283" + sha256 cellar: :any, arm64_ventura: "d2d8a06a9cf6bae410e9112ec383e928b69986c8f6d1b91cde5961008e1ec077" + sha256 cellar: :any, arm64_monterey: "cd2de61cdf56792c4d6e03d5af1c1319b028d7c0227bbeb8b221f85c6928c301" + sha256 cellar: :any, arm64_big_sur: "c82b83a7d1a4847695a7667de5537fa2b75fc737d0caedf3562891019b7e8c37" + sha256 cellar: :any, sonoma: "afa275ae206fade81999c64b1f0d6d5812be81ffb9ca8a68d7f7d5f0421ec8ee" + sha256 cellar: :any, ventura: "3f71655f0ae4529bbe68cdf389f44b835130e77078758674f0f433327aa7341f" + sha256 cellar: :any, monterey: "fa8d9e078297d10e650883b4c259d46bf955031174af802849e4151ef3b5dccc" + sha256 cellar: :any, big_sur: "f97ed204769d1f151372469bc4364076add0c7e15035bdba1a9aa630c2ee2063" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c2071a6fa1b8fba96beadcc92aae367174e03567220c066457a3490a629f919" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4b0a03f7494d92eb31cdc658c7aca5d971a1c9482ad899a2fe6643715d887f4" + end + + head do + url "https://gitlab.xiph.org/xiph/opusfile.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libogg" + depends_on "openssl@3" + depends_on "opus" + + resource "sample" do + url "https://dl.espressif.com/dl/audio/gs-16b-1c-44100hz.opus" + sha256 "f80fabebe4e00611b93019587be9abb36dbc1935cb0c9f4dfdf5c3b517207e1b" + end + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + resource("sample").stage { testpath.install Pathname.pwd.children(false).first => "sample.opus" } + (testpath/"test.c").write <<~C + #include + #include + int main(int argc, const char **argv) { + int ret; + OggOpusFile *of; + + of = op_open_file(argv[1], &ret); + if (of == NULL) { + fprintf(stderr, "Failed to open file '%s': %i\\n", argv[1], ret); + return EXIT_FAILURE; + } + op_free(of); + return EXIT_SUCCESS; + } + C + system ENV.cc, "test.c", "-I#{Formula["opus"].include}/opus", + "-L#{lib}", + "-lopusfile", + "-o", "test" + system "./test", "sample.opus" + end +end diff --git a/Formula/o/oq.rb b/Formula/o/oq.rb new file mode 100644 index 0000000000000..6ffb745828a4c --- /dev/null +++ b/Formula/o/oq.rb @@ -0,0 +1,47 @@ +class Oq < Formula + desc "Performant, and portable jq wrapper to support formats other than JSON" + homepage "https://blacksmoke16.github.io/oq" + url "https://github.com/Blacksmoke16/oq/archive/refs/tags/v1.3.5.tar.gz" + sha256 "66b2d879b6e2061121c50b8e584ce82f95fe79348bf3696ca38e5910a6c42495" + license "MIT" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "854692fbe7d27bdc8f348a68d0a10b7600556cb9cb5e31588e7366840f8a9d3b" + sha256 cellar: :any, arm64_sequoia: "1a3da7d5c1facf9978ed2e5e4b837db7979b6123839d133c947b9eb9b1200762" + sha256 cellar: :any, arm64_sonoma: "9ac4ab6b25021efebdd52241b9018349fe42721bf3545bdb991e79fa55bea62f" + sha256 cellar: :any, arm64_ventura: "db3b7b294448ad7861fdbd8c5e7356e56f60567412c8b7a423b2278618975645" + sha256 cellar: :any, sonoma: "64e1f4aa81d4189fb7d5cb01f9a1675779243b9906c07cd0a1fce59b7795d702" + sha256 cellar: :any, ventura: "40e53859430f914af54832221b6c6851ddd6f596cddc047d0d59404f91bb483a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee6a792a88c20a7d9aef0fd7ef3ae14ed64d1ba33f2490a4cd9d42f9b860c77a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b1fab86fb911af9ac17c870211e41e94fa4d3ee655cf013153807b6c9ab0f7e" + end + + depends_on "crystal" => :build + + depends_on "bdw-gc" + depends_on "jq" + depends_on "libevent" + depends_on "libyaml" + depends_on "pcre2" + + uses_from_macos "libxml2" + + def install + system "shards", "build", "--production", "--release", "--no-debug" + system "strip", "./bin/oq" + bin.install "./bin/oq" + end + + test do + assert_match version.to_s, shell_output("#{bin}/oq --version") + + assert_equal( + "\n12\n", + pipe_output("#{bin}/oq -o xml --indent 0 .", '{"foo":1, "bar":2}'), + ) + assert_equal "{\"age\":12}\n", pipe_output("#{bin}/oq -i yaml -c .", "---\nage: 12") + end +end diff --git a/Formula/o/or-tools.rb b/Formula/o/or-tools.rb new file mode 100644 index 0000000000000..bea66f9f7332e --- /dev/null +++ b/Formula/o/or-tools.rb @@ -0,0 +1,298 @@ +class OrTools < Formula + desc "Google's Operations Research tools" + homepage "https://developers.google.com/optimization/" + license "Apache-2.0" + revision 7 + head "https://github.com/google/or-tools.git", branch: "stable" + + # Remove `stable` block when patch is no longer needed. + stable do + url "https://github.com/google/or-tools/archive/refs/tags/v9.14.tar.gz" + sha256 "9019facf316b54ee72bb58827efc875df4cfbb328fbf2b367615bf2226dd94ca" + + # Fix for wrong target name for `libscip`. + # https://github.com/google/or-tools/issues/4750. + patch do + url "https://github.com/google/or-tools/commit/9d3350dcbc746d154f22a8b44d21f624604bd6c3.patch?full_index=1" + sha256 "fb39e1aa1215d685419837dc6cef339cda36e704a68afc475a820f74c0653a61" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d91980bd906d92627c31121042e9fdc5148a7d6c57bcbe6718618f0b89721726" + sha256 cellar: :any, arm64_sequoia: "bdcc22ad0243985bc8bb26c3eeea306ccf95239abbb8bc83652121c1990a0b22" + sha256 cellar: :any, arm64_sonoma: "8cc43428f1a722efd90170503a19e21b0b6a86a778ef0a0a78acafcad2c5f259" + sha256 cellar: :any, sonoma: "7a78140f62c844cc947ed8b2fc16fec028001b36fa667ede51d4ca5d9f7b904f" + sha256 arm64_linux: "5971a4a0ff21a522cd02e3bc9072d7a3a4bb9c7ab1544db109ceb6cf0a31d979" + sha256 x86_64_linux: "124de5a2dbbd4ed3eb8c8ad863d79b64935bbfcd18b498e941ebe70bf8a3e571" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => [:build, :test] + depends_on "abseil" + depends_on "cbc" + depends_on "cgl" + depends_on "clp" + depends_on "coinutils" + depends_on "eigen" + depends_on "highs" + depends_on "openblas" + depends_on "osi" + depends_on "protobuf" + depends_on "re2" + depends_on "scip" + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # Workaround until upstream updates Abseil. Likely will be handled by sync with internal copy + patch :DATA + + def install + args = %w[ + -DUSE_HIGHS=ON + -DBUILD_DEPS=OFF + -DBUILD_SAMPLES=OFF + -DBUILD_EXAMPLES=OFF + -DUSE_SCIP=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "ortools/linear_solver/samples/simple_lp_program.cc" + pkgshare.install "ortools/constraint_solver/samples/simple_routing_program.cc" + pkgshare.install "ortools/sat/samples/simple_sat_program.cc" + end + + test do + # Linear Solver & Glop Solver + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.14) + project(test LANGUAGES CXX) + find_package(ortools CONFIG REQUIRED) + add_executable(simple_lp_program #{pkgshare}/simple_lp_program.cc) + target_compile_features(simple_lp_program PUBLIC cxx_std_17) + target_link_libraries(simple_lp_program PRIVATE ortools::ortools) + CMAKE + cmake_args = [] + build_env = {} + if OS.mac? + build_env["CPATH"] = nil + else + cmake_args << "-DCMAKE_BUILD_RPATH=#{lib};#{HOMEBREW_PREFIX}/lib" + end + with_env(build_env) do + system "cmake", "-S", ".", "-B", ".", *cmake_args, *std_cmake_args + system "cmake", "--build", "." + end + system "./simple_lp_program" + + # Routing Solver + system ENV.cxx, "-std=c++17", pkgshare/"simple_routing_program.cc", + "-I#{include}", "-L#{lib}", "-lortools", + "-DOR_PROTO_DLL=", "-DPROTOBUF_USE_DLLS", + *shell_output("pkg-config --cflags --libs absl_check absl_log").chomp.split, + "-o", "simple_routing_program" + system "./simple_routing_program" + + # Sat Solver + absl_libs = %w[ + absl_check + absl_log_initialize + absl_flags + absl_flags_parse + ] + system ENV.cxx, "-std=c++17", pkgshare/"simple_sat_program.cc", + "-I#{include}", "-L#{lib}", "-lortools", + "-DOR_PROTO_DLL=", "-DPROTOBUF_USE_DLLS", + *shell_output("pkg-config --cflags --libs #{absl_libs.join(" ")}").chomp.split, + "-o", "simple_sat_program" + system "./simple_sat_program" + + # Highs backend + (testpath/"highs_test.cc").write <<~EOS + #include "ortools/linear_solver/linear_solver.h" + using operations_research::MPSolver; + int main() { + if (!MPSolver::SupportsProblemType(MPSolver::HIGHS_LINEAR_PROGRAMMING)) return 1; + MPSolver solver("t", MPSolver::HIGHS_LINEAR_PROGRAMMING); + auto* x = solver.MakeNumVar(0.0, 1.0, "x"); + auto* obj = solver.MutableObjective(); + obj->SetCoefficient(x, 1.0); + obj->SetMaximization(); + if (solver.Solve() != MPSolver::OPTIMAL) return 2; + return x->solution_value() > 0.99 ? 0 : 3; + } + EOS + system ENV.cxx, "-std=c++17", "highs_test.cc", + "-I#{include}", "-L#{lib}", "-lortools", + "-DOR_PROTO_DLL=", "-DPROTOBUF_USE_DLLS", + *shell_output("pkg-config --cflags --libs #{absl_libs.join(" ")}").chomp.split, + "-o", "highs_test" + system "./highs_test" + end +end + +__END__ +diff --git a/ortools/math_opt/cpp/model.cc b/ortools/math_opt/cpp/model.cc +index 12ea552d78..9d19f5af72 100644 +--- a/ortools/math_opt/cpp/model.cc ++++ b/ortools/math_opt/cpp/model.cc +@@ -55,7 +55,7 @@ constexpr double kInf = std::numeric_limits::infinity(); + + absl::StatusOr> Model::FromModelProto( + const ModelProto& model_proto) { +- ASSIGN_OR_RETURN(absl::Nonnull> storage, ++ ASSIGN_OR_RETURN(absl_nonnull std::unique_ptr storage, + ModelStorage::FromModelProto(model_proto)); + return std::make_unique(std::move(storage)); + } +@@ -63,10 +63,10 @@ absl::StatusOr> Model::FromModelProto( + Model::Model(const absl::string_view name) + : storage_(std::make_shared(name)) {} + +-Model::Model(absl::Nonnull> storage) ++Model::Model(absl_nonnull std::unique_ptr storage) + : storage_(ABSL_DIE_IF_NULL(std::move(storage))) {} + +-absl::Nonnull> Model::Clone( ++absl_nonnull std::unique_ptr Model::Clone( + const std::optional new_name) const { + return std::make_unique(storage_->Clone(new_name)); + } +diff --git a/ortools/math_opt/cpp/model.h b/ortools/math_opt/cpp/model.h +index bb9939f098..6cb65ed256 100644 +--- a/ortools/math_opt/cpp/model.h ++++ b/ortools/math_opt/cpp/model.h +@@ -137,7 +137,7 @@ class Model { + // This constructor is used when loading a model, for example from a + // ModelProto or an MPS file. Note that in those cases the FromModelProto() + // should be used. +- explicit Model(absl::Nonnull> storage); ++ explicit Model(absl_nonnull std::unique_ptr storage); + + Model(const Model&) = delete; + Model& operator=(const Model&) = delete; +@@ -159,7 +159,7 @@ class Model { + // * in an arbitrary order using Variables() and LinearConstraints(). + // + // Note that the returned model does not have any update tracker. +- absl::Nonnull> Clone( ++ absl_nonnull std::unique_ptr Clone( + std::optional new_name = std::nullopt) const; + + inline absl::string_view name() const; +@@ -925,7 +925,7 @@ class Model { + // We use a shared_ptr here so that the UpdateTracker class can have a + // weak_ptr on the ModelStorage. This let it have a destructor that don't + // crash when called after the destruction of the associated Model. +- const absl::Nonnull> storage_; ++ const absl_nonnull std::shared_ptr storage_; + }; + + //////////////////////////////////////////////////////////////////////////////// +diff --git a/ortools/math_opt/storage/model_storage.cc b/ortools/math_opt/storage/model_storage.cc +index 3c5139d07e..9c24890944 100644 +--- a/ortools/math_opt/storage/model_storage.cc ++++ b/ortools/math_opt/storage/model_storage.cc +@@ -46,7 +46,7 @@ + namespace operations_research { + namespace math_opt { + +-absl::StatusOr>> ++absl::StatusOr> + ModelStorage::FromModelProto(const ModelProto& model_proto) { + // We don't check names since ModelStorage does not do so before exporting + // models. Thus a model built by ModelStorage can contain duplicated +@@ -144,7 +144,7 @@ void ModelStorage::UpdateLinearConstraintCoefficients( + } + } + +-absl::Nonnull> ModelStorage::Clone( ++absl_nonnull std::unique_ptr ModelStorage::Clone( + const std::optional new_name) const { + // We leverage the private copy constructor that copies copyable_data_ but not + // update_trackers_ here. +diff --git a/ortools/math_opt/storage/model_storage.h b/ortools/math_opt/storage/model_storage.h +index 2334290cdc..127dbce14c 100644 +--- a/ortools/math_opt/storage/model_storage.h ++++ b/ortools/math_opt/storage/model_storage.h +@@ -177,7 +177,7 @@ class ModelStorage { + // considered invalid when solving. + // + // See ApplyUpdateProto() for dealing with subsequent updates. +- static absl::StatusOr > > ++ static absl::StatusOr> + FromModelProto(const ModelProto& model_proto); + + // Creates an empty minimization problem. +@@ -192,7 +192,7 @@ class ModelStorage { + // reused any id of variable/constraint that was deleted in the original. + // + // Note that the returned model does not have any update tracker. +- absl::Nonnull > Clone( ++ absl_nonnull std::unique_ptr Clone( + std::optional new_name = std::nullopt) const; + + inline const std::string& name() const { return copyable_data_.name; } +@@ -1311,10 +1311,10 @@ namespace operations_research::math_opt { + + // Aliases for non-nullable and nullable pointers to a `ModelStorage`. + // We should mostly be using the former, but in some cases we need the latter. +-using ModelStoragePtr = absl::Nonnull; +-using NullableModelStoragePtr = absl::Nullable; +-using ModelStorageCPtr = absl::Nonnull; +-using NullableModelStorageCPtr = absl::Nullable; ++using ModelStoragePtr = ModelStorage* absl_nonnull; ++using NullableModelStoragePtr = ModelStorage* absl_nullable; ++using ModelStorageCPtr = const ModelStorage* absl_nonnull; ++using NullableModelStorageCPtr = const ModelStorage* absl_nullable; + + } // namespace operations_research::math_opt + +diff --git a/ortools/math_opt/storage/model_storage_v2.cc b/ortools/math_opt/storage/model_storage_v2.cc +index e911eaecc4..60b0ec952d 100644 +--- a/ortools/math_opt/storage/model_storage_v2.cc ++++ b/ortools/math_opt/storage/model_storage_v2.cc +@@ -76,13 +76,13 @@ void ModelStorageV2::DeleteLinearConstraint(LinearConstraintId id) { + << ", it is not in the model"; + } + +-absl::StatusOr>> ++absl::StatusOr> + ModelStorageV2::FromModelProto(const ModelProto& model_proto) { + ASSIGN_OR_RETURN(Elemental e, Elemental::FromModelProto(model_proto)); + return absl::WrapUnique(new ModelStorageV2(std::move(e))); + } + +-absl::Nonnull> ModelStorageV2::Clone( ++absl_nonnull std::unique_ptr ModelStorageV2::Clone( + const std::optional new_name) const { + return absl::WrapUnique(new ModelStorageV2(elemental_.Clone(new_name))); + } +diff --git a/ortools/math_opt/storage/model_storage_v2.h b/ortools/math_opt/storage/model_storage_v2.h +index 45078bedad..c8c13b7232 100644 +--- a/ortools/math_opt/storage/model_storage_v2.h ++++ b/ortools/math_opt/storage/model_storage_v2.h +@@ -90,7 +90,7 @@ class ModelStorageV2 { + // considered invalid when solving. + // + // See ApplyUpdateProto() for dealing with subsequent updates. +- static absl::StatusOr>> ++ static absl::StatusOr> + FromModelProto(const ModelProto& model_proto); + + // Creates an empty minimization problem. +@@ -106,7 +106,7 @@ class ModelStorageV2 { + // reused any id of variable/constraint that was deleted in the original. + // + // Note that the returned model does not have any update tracker. +- absl::Nonnull> Clone( ++ absl_nonnull std::unique_ptr Clone( + std::optional new_name = std::nullopt) const; + + inline const std::string& name() const { return elemental_.model_name(); } diff --git a/Formula/o/oranda.rb b/Formula/o/oranda.rb new file mode 100644 index 0000000000000..696a0423fc627 --- /dev/null +++ b/Formula/o/oranda.rb @@ -0,0 +1,54 @@ +class Oranda < Formula + desc "Generate beautiful landing pages for your developer tools" + homepage "https://github.com/axodotdev/oranda" + url "https://github.com/axodotdev/oranda/archive/refs/tags/v0.6.5.tar.gz" + sha256 "456baf2b8e36ad6492d5d7a6d2b47b48be87c957db9068500dfd82897462d5bd" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/axodotdev/oranda.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e17f884c4cddb137cd57345777732a9e94a156c6273ac37ce16ad7a463d20901" + sha256 cellar: :any, arm64_sequoia: "6355b74d463dc310169e38b54bd9faa4a957426aefcbb4457310208c4db98c81" + sha256 cellar: :any, arm64_sonoma: "d62d7a6ea26f3d47824cf8925c0b1ffe790f7bb22c989f4e2bdefaed2a044ea6" + sha256 cellar: :any, arm64_ventura: "50de4218c89b00ec55016d6af55f0c1781888a7d516cf0b61d848f825a6651f8" + sha256 cellar: :any, sonoma: "c6add9bb2ff35ff1ea1b11fc3ab1b5a4bf9a0c8c0a143b034853ab6a84f3c884" + sha256 cellar: :any, ventura: "a061b0b2c9e3da6abddad58b5602d41c92170ade938567656692799448ea122e" + sha256 cellar: :any_skip_relocation, arm64_linux: "72c26c23c373e5c900190b32733c567a4a8b8e898c7e9f0e385c6112ecc0be56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38453321aae36b4c54631ebaa74ca576f791c4fd5e608bcb5e45088c96a3219c" + end + + depends_on "node" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" + + def install + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + + # TODO: Switch back to `ENV["ORANDA_USE_TAILWIND_BINARY"] = "1"` + # Issue ref: https://github.com/axodotdev/oranda/issues/719 + cd "oranda-css" do + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "build" + end + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "oranda #{version}", shell_output("#{bin}/oranda --version") + + system bin/"oranda", "build" + assert_path_exists testpath/"public/index.html" + + begin + output_log = testpath/"output.log" + pid = spawn bin/"oranda", "serve", [:out, :err] => output_log.to_s + sleep 2 + assert_match "SUCCESS: Your project is available", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/o/oras.rb b/Formula/o/oras.rb new file mode 100644 index 0000000000000..1f409ca4bdead --- /dev/null +++ b/Formula/o/oras.rb @@ -0,0 +1,52 @@ +class Oras < Formula + desc "OCI Registry As Storage" + homepage "https://github.com/oras-project/oras" + url "https://github.com/oras-project/oras/archive/refs/tags/v1.3.0.tar.gz" + sha256 "12fc49ddf5c940b0ebba4c318e00b4155b682d590754e0d7330b9c4259b4af51" + license "Apache-2.0" + head "https://github.com/oras-project/oras.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b88be96c1d2f56331b8abc6b1d9d40a81a308fa7da085b386bbf4a57b4f4748" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b88be96c1d2f56331b8abc6b1d9d40a81a308fa7da085b386bbf4a57b4f4748" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b88be96c1d2f56331b8abc6b1d9d40a81a308fa7da085b386bbf4a57b4f4748" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b88be96c1d2f56331b8abc6b1d9d40a81a308fa7da085b386bbf4a57b4f4748" + sha256 cellar: :any_skip_relocation, sonoma: "379b13479f92f19783a1872f3a37f050d71e175afacdfd555374c9b632607e47" + sha256 cellar: :any_skip_relocation, ventura: "379b13479f92f19783a1872f3a37f050d71e175afacdfd555374c9b632607e47" + sha256 cellar: :any_skip_relocation, arm64_linux: "b29a94a144c86de81d7879687ddc9f5a1e972d01bfe69382b17c1d5b7bc44d8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce3845f85fa9db76c94a26ba3c0e29894c895fef1232331e1977d48467a22e5a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X oras.land/oras/internal/version.Version=#{version} + -X oras.land/oras/internal/version.BuildMetadata=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/oras" + + generate_completions_from_executable(bin/"oras", "completion") + end + + test do + assert_match "#{version}+Homebrew", shell_output("#{bin}/oras version") + + port = free_port + contents = <<~JSON + { + "key": "value", + "this is": "a test" + } + JSON + (testpath/"test.json").write(contents) + + # Although it might not make much sense passing the JSON as both manifest and payload, + # it helps make the test consistent as the error can randomly switch between either hash + output = shell_output("#{bin}/oras push localhost:#{port}/test-artifact:v1 " \ + "--config test.json:application/vnd.homebrew.test.config.v1+json " \ + "./test.json 2>&1", 1) + assert_match "#{port}: connect: connection refused", output + end +end diff --git a/Formula/o/orbiton.rb b/Formula/o/orbiton.rb new file mode 100644 index 0000000000000..aeedb4d417612 --- /dev/null +++ b/Formula/o/orbiton.rb @@ -0,0 +1,50 @@ +class Orbiton < Formula + desc "Fast and config-free text editor and IDE limited by VT100" + homepage "https://roboticoverlords.org/orbiton/" + url "https://github.com/xyproto/orbiton/archive/refs/tags/v2.70.0.tar.gz" + sha256 "ab940369469a534311466621f8e65f712446aadc6a4016e9d912b68d420d5371" + license "BSD-3-Clause" + head "https://github.com/xyproto/orbiton.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b004a96e55d586d3d04b30ae885a480d7ec761cf3700f5d58d7fd070281e9d4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a82a8f1a94b850d4cf0a5377baa22d91788e15b42b62e7f93c841af1366a50a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a82a8f1a94b850d4cf0a5377baa22d91788e15b42b62e7f93c841af1366a50a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a82a8f1a94b850d4cf0a5377baa22d91788e15b42b62e7f93c841af1366a50a" + sha256 cellar: :any_skip_relocation, sonoma: "e078c56ab83f6e1f1cf7d01408a7cc9d0e99414e6eb78dc8ad363982f316c44b" + sha256 cellar: :any_skip_relocation, ventura: "e078c56ab83f6e1f1cf7d01408a7cc9d0e99414e6eb78dc8ad363982f316c44b" + sha256 cellar: :any_skip_relocation, arm64_linux: "32a1a3b94fb7df86fac0e144d73ed999da8dd2691ccdcea1c233c5be3cec43c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86dc3a94ff2a6ccfb2c91f748711bdcdfe02de071f52f96d3c4fb5813d242dd7" + end + + depends_on "go" => :build + + on_linux do + depends_on "xorg-server" => :test + depends_on "xclip" + end + + def install + system "make", "install", "symlinks", "license", "DESTDIR=", "PREFIX=#{prefix}", "MANDIR=#{man}" + end + + test do + (testpath/"hello.txt").write "hello\n" + copy_command = "#{bin}/o --copy #{testpath}/hello.txt" + paste_command = "#{bin}/o --paste #{testpath}/hello2.txt" + + if OS.linux? + system "xvfb-run", "sh", "-c", "#{copy_command} && #{paste_command}" + else + system copy_command + system paste_command + end + + assert_equal (testpath/"hello.txt").read, (testpath/"hello2.txt").read + end +end diff --git a/Formula/o/orbuculum.rb b/Formula/o/orbuculum.rb new file mode 100644 index 0000000000000..3cbb685abddc8 --- /dev/null +++ b/Formula/o/orbuculum.rb @@ -0,0 +1,67 @@ +class Orbuculum < Formula + desc "Arm Cortex-M SWO/SWV Demux and Postprocess" + homepage "https://github.com/orbcode/orbuculum" + url "https://github.com/orbcode/orbuculum/archive/refs/tags/V2.2.0.tar.gz" + sha256 "6614fba7044aa62e486b29ff4a81d0408d6e88499249bf2b839ccadfc54eec83" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3b232ad18dc8d43548fc1bfa68e3efef76ee05c5a17d9a4d3ec178139ce65dac" + sha256 cellar: :any, arm64_sequoia: "637ba000bafcaf9a19397b9039d64ec637079054b768f9494e54b27e36de95cc" + sha256 cellar: :any, arm64_sonoma: "4ec20a9f9f3682853155e53ed4abaeff98c952f59e83ff648b0c5a8fd3c52e7a" + sha256 cellar: :any, arm64_ventura: "c66bb8358fc5fd4e83f23da5748cfad5b57446783c4adce427e1c1d2c51b864e" + sha256 cellar: :any, sonoma: "188b4f0e858841b75414119a8c799da7c5fba2c3f83d584c4b94c1d6e0286d13" + sha256 cellar: :any, ventura: "cb18bac79798cffe77da5e4d05a14fcb1bc4f09fdda488d3f24eb482e740b33d" + sha256 arm64_linux: "f08fbd65255af3b5ab905a393e2dbd29407f39caabd94c07ca2d07df556af439" + sha256 x86_64_linux: "83fd1219323905730efd83508f2c67500ce83392b478b7b2a1f376a98addf3d5" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "capstone" + depends_on "dwarfutils" + depends_on "libusb" + depends_on "sdl2" + depends_on "zeromq" + + uses_from_macos "ncurses" + + on_macos do + depends_on "libelf" => :build + end + + on_linux do + depends_on "elfutils" + end + + def install + # Unbundle `dwarfutils` + inreplace "meson.build", "= subproject('libdwarf').get_variable('libdwarf')", "= dependency('libdwarf')" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_match "orbuculum version #{version}", shell_output("#{bin}/orbuculum --version 2>&1", 255) + assert_match "orbcat version #{version}", shell_output("#{bin}/orbcat --version 2>&1", 255) + assert_match "orbdump version #{version}", shell_output("#{bin}/orbdump --version 2>&1", 255) + assert_match "orbfifo version #{version}", shell_output("#{bin}/orbfifo --version 2>&1", 255) + assert_match "orblcd version #{version}", shell_output("#{bin}/orblcd --version 2>&1", 255) + assert_match "Elf File not specified", shell_output("#{bin}/orbmortem 2>&1") + assert_match "This utility is in development. Use at your own risk!!\nElf File not specified", + shell_output("#{bin}/orbprofile 2>&1", 254).delete("\r") + assert_match "Elf File not specified", shell_output("#{bin}/orbstat 2>&1", 254) + assert_match "Elf File not specified", shell_output("#{bin}/orbtop 2>&1", 247) + assert_match "No devices found", shell_output("#{bin}/orbtrace 2>&1") + assert_match "orbcat version #{version}", shell_output("#{bin}/orbzmq --version 2>&1", 255) + end +end diff --git a/Formula/o/orc-tools.rb b/Formula/o/orc-tools.rb new file mode 100644 index 0000000000000..3d4c623899a9e --- /dev/null +++ b/Formula/o/orc-tools.rb @@ -0,0 +1,27 @@ +class OrcTools < Formula + desc "ORC java command-line tools and utilities" + homepage "https://orc.apache.org/" + url "https://search.maven.org/remotecontent?filepath=org/apache/orc/orc-tools/2.2.1/orc-tools-2.2.1-uber.jar" + sha256 "537290777ef52fe9f52fc9cfa7a81d973fce268fb3c565fbb29869a31e30d362" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/apache/orc/orc-tools/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "facc4b0feb3862bbbdcfc9af66d605536cd8e1f032db59853f840495d9d64a3b" + end + + depends_on "openjdk" + + def install + libexec.install "orc-tools-#{version}-uber.jar" + bin.write_jar_script libexec/"orc-tools-#{version}-uber.jar", "orc-tools" + end + + test do + system bin/"orc-tools", "meta", "-h" + end +end diff --git a/Formula/o/orc.rb b/Formula/o/orc.rb new file mode 100644 index 0000000000000..6cec42e8ada26 --- /dev/null +++ b/Formula/o/orc.rb @@ -0,0 +1,50 @@ +class Orc < Formula + desc "Oil Runtime Compiler (ORC)" + homepage "https://gstreamer.freedesktop.org/projects/orc.html" + url "https://gstreamer.freedesktop.org/src/orc/orc-0.4.41.tar.xz" + sha256 "cb1bfd4f655289cd39bc04642d597be9de5427623f0861c1fc19c08d98467fa2" + license all_of: ["BSD-2-Clause", "BSD-3-Clause"] + + livecheck do + url "https://gstreamer.freedesktop.org/src/orc/" + regex(/href=.*?orc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "89375069efcb10db89dc7379679b12f8d0be120b8bd31921ffa66b9df4ae8926" + sha256 cellar: :any, arm64_sequoia: "8ec6640411fd5de65f5064ac884686380efb68725317a0121e3ecadbdcca196b" + sha256 cellar: :any, arm64_sonoma: "3dae83cc3cd5a637b63a012b72f45dafccd4b45da20c86dbc2eea6e7827d166c" + sha256 cellar: :any, arm64_ventura: "fede6fc3e9d0b04237bff31412097f951b2744a28270dacb0746a8fe61b27952" + sha256 cellar: :any, sonoma: "825f58d2fd7605ce40ae7876b1c79480e6f502340d9c572cfd6b7ac5a75856cf" + sha256 cellar: :any, ventura: "dabcd68e29c8efe82ea9763f6a481568147bc50b02d04b6db6df0684b3f77b18" + sha256 arm64_linux: "4e5427467da0b9ffb697dc68629c29663b98593a80146e01f75149cc6e2322d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80a5318eccb15cd2ce95c016f3406eeef7957647b409c43875b194e83d8d6666" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", "-Dgtk_doc=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/orcc --version 2>&1") + + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + if (orc_version_string() == NULL) { + return 1; + } + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}/orc-0.4", "-L#{lib}", "-lorc-0.4", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/orcania.rb b/Formula/o/orcania.rb new file mode 100644 index 0000000000000..b28fab906c8a3 --- /dev/null +++ b/Formula/o/orcania.rb @@ -0,0 +1,71 @@ +class Orcania < Formula + desc "Potluck with different functions for different purposes in C" + homepage "https://babelouest.github.io/orcania/" + url "https://github.com/babelouest/orcania/archive/refs/tags/v2.3.3.tar.gz" + sha256 "e26947f7622acf3660b71fb8018ee791c97376530ab6c4a00e4aa2775e052626" + license "LGPL-2.1-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5fee2615d28af2472b03eb9499ad1eee7e17549a421d7212d973c8cf2a39a430" + sha256 cellar: :any, arm64_sequoia: "4c6bcdc1d22075f81c8d4660d2e7f26bf495a7d3b71ba07dc73cec9cb60df3ac" + sha256 cellar: :any, arm64_sonoma: "d40e5c622f0f94b0ace12b30ee6401d198f4a988e8e2874fbc8816529c7c72d0" + sha256 cellar: :any, arm64_ventura: "8b7f8c6ad6bef28777ffa342338aae906c0c8d62c060fd66b89f7b5219e39a0e" + sha256 cellar: :any, arm64_monterey: "60cca6feb94ed04aed4ee902980e7f98115efe4f44c03d3279c217776dfe23d3" + sha256 cellar: :any, arm64_big_sur: "1f29dc9ca40b0b9411705a5b55db2739be4d8e72db4f311d48892a192ec91232" + sha256 cellar: :any, sonoma: "51ec29d50f120f42afefc27f0787cb6696dbb769e7685f4d631feb129a3eae17" + sha256 cellar: :any, ventura: "04e91894340f16e77b29b974885922c8812a8c4d94fc3098ff21ca948747d1df" + sha256 cellar: :any, monterey: "49b66d5ad6ad86a71a736c8e171843d4d6d0e83a23d94f4acd78cd90269e761a" + sha256 cellar: :any, big_sur: "18f44c9ca72121336f4333774fcc6cd09c8abcebd36a2e0a4877dfcc91a7cd86" + sha256 cellar: :any_skip_relocation, arm64_linux: "ddad2cd0a1bba267263af61519f18409bc73024cc7bac3eb2134bf6ce92c25f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd436eb031d76eb857b159813bee79f30712400f420072ef8b57476b3ff26851" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + + def install + args = %W[ + -DDINSTALL_HEADER=ON + -DBUILD_ORCANIA_DOCUMENTATION=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main() { + char *src = "Orcania test string"; + char *dup_str; + + // Test o_strdup + dup_str = o_strdup(src); + if (dup_str == NULL) { + printf("o_strdup failed"); + return 1; + } + + if (strcmp(src, dup_str) != 0) { + printf("o_strdup did not produce an identical copy"); + free(dup_str); + return 1; + } + + free(dup_str); + printf("Test passed successfully"); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lorcania", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/ord.rb b/Formula/o/ord.rb new file mode 100644 index 0000000000000..bd5b5a5293639 --- /dev/null +++ b/Formula/o/ord.rb @@ -0,0 +1,39 @@ +class Ord < Formula + desc "Index, block explorer, and command-line wallet" + homepage "https://ordinals.com/" + url "https://github.com/ordinals/ord/archive/refs/tags/0.23.3.tar.gz" + sha256 "381f8c7a788f8a17e40cd5ce8e3663c0862bb23f8e2313eeaf742721b758f5b6" + license "CC0-1.0" + head "https://github.com/ordinals/ord.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "45451e4238552bebe9ef582f49900f396e76498abefd181ba1954829f3165321" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "811e865257723cc0fb3e4c9065deee1533b99aa0861afe549869842f80710d6f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6167b39410518447720663d3049575d7bd23b4d815c4cb622b85c4c5d5cb8823" + sha256 cellar: :any_skip_relocation, sonoma: "6b7bdd358900338e5526b944e208f5851577626acbbb706f66f65759c3b191a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "51bf08b0d7d0ec47ca4266c11702d76aef85fe389e982bab37340a9fb62fad21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98a45830338b5bd8c3d648f605ea6c2f741889e622d2cd2da1ee37d1ee8a08b0" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/ord list xx:xx 2>&1", 2) + assert_match "invalid value 'xx:xx' for '': error parsing TXID", output + + assert_match "ord #{version}", shell_output("#{bin}/ord --version") + end +end diff --git a/Formula/o/org-formation.rb b/Formula/o/org-formation.rb new file mode 100644 index 0000000000000..fdcb613bd60b5 --- /dev/null +++ b/Formula/o/org-formation.rb @@ -0,0 +1,29 @@ +class OrgFormation < Formula + desc "Infrastructure as Code (IaC) tool for AWS Organizations" + homepage "https://github.com/org-formation/org-formation-cli" + url "https://registry.npmjs.org/aws-organization-formation/-/aws-organization-formation-1.0.16.tgz" + sha256 "a3d4be909939bb85b033886bbf8913ffe20e0946ad62f19a0169e2cfc8811406" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f6a65fc18513bc1b102e4e1fbfa2714b884d9fe4728d6708ad853dbd24541673" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/org-formation --version") + + ENV["AWS_REGION"] = "us-east-1" + ENV["AWS_ACCESS_KEY_ID"] = "test" + ENV["AWS_SECRET_ACCESS_KEY"] = "test" + + output = shell_output("#{bin}/org-formation init test-init 2>&1", 1) + assert_match "The security token included in the request is invalid", output + end +end diff --git a/Formula/o/orgalorg.rb b/Formula/o/orgalorg.rb new file mode 100644 index 0000000000000..ebd0b416191f0 --- /dev/null +++ b/Formula/o/orgalorg.rb @@ -0,0 +1,45 @@ +class Orgalorg < Formula + desc "Parallel SSH commands executioner and file synchronization tool" + homepage "https://github.com/reconquest/orgalorg" + url "https://github.com/reconquest/orgalorg/archive/refs/tags/1.3.1.tar.gz" + sha256 "b9292ac6af1c492c82e4c77a707a026ad9674139f02d3fa25b797f65e3d69a2c" + license "MIT" + head "https://github.com/reconquest/orgalorg.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aa11bd3501767c0c1057cdda65730e8893f9dc2f7da4cb96aaf78219df1a1fcc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc20b9130dfde0b22594c6e0956e25ca597ad7b8d5bc1fab464fd27265ba9604" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06947c8b72e6195a7f44ba80fd5fc0f9b61c5e592de035312365ad85b9c78e37" + sha256 cellar: :any_skip_relocation, arm64_ventura: "06947c8b72e6195a7f44ba80fd5fc0f9b61c5e592de035312365ad85b9c78e37" + sha256 cellar: :any_skip_relocation, arm64_monterey: "06947c8b72e6195a7f44ba80fd5fc0f9b61c5e592de035312365ad85b9c78e37" + sha256 cellar: :any_skip_relocation, sonoma: "9609c5b392fa18422370ff6e1141699d277c7fda09160188f5c8b1891a47ab8c" + sha256 cellar: :any_skip_relocation, ventura: "9609c5b392fa18422370ff6e1141699d277c7fda09160188f5c8b1891a47ab8c" + sha256 cellar: :any_skip_relocation, monterey: "9609c5b392fa18422370ff6e1141699d277c7fda09160188f5c8b1891a47ab8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc347549d933c2bc6eeff0f6a868e9022ce31d3f8603b5011a0c429a78c65e15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ddfaf7984ff3194c6966fe2765fcd79fae9bc91a5f96a96c9baba7aed1c6885" + end + + depends_on "go" => :build + + def install + system "go", "build", "-mod=mod", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/orgalorg --version") + assert_match "orgalorg - files synchronization on many hosts.", shell_output("#{bin}/orgalorg --help") + + ENV.delete "SSH_AUTH_SOCK" + + port = free_port + output = shell_output("#{bin}/orgalorg -u tester --key '' --host=127.0.0.1:#{port} -C uptime 2>&1", 1) + assert_match "connecting to cluster failed", output + assert_match "dial tcp 127.0.0.1:#{port}: connect: connection refused", output + assert_match "can't connect to address: [tester@127.0.0.1:#{port}]", output + end +end diff --git a/Formula/o/organize-tool.rb b/Formula/o/organize-tool.rb new file mode 100644 index 0000000000000..46ccd0f4c9988 --- /dev/null +++ b/Formula/o/organize-tool.rb @@ -0,0 +1,210 @@ +class OrganizeTool < Formula + include Language::Python::Virtualenv + + desc "File management automation tool" + homepage "https://github.com/tfeldmann/organize" + url "https://files.pythonhosted.org/packages/3c/bd/1b4217217aadce0d46e28042c0e06bb28863bfdfb383ce7afb18f69a1553/organize_tool-3.3.0.tar.gz" + sha256 "034fdcf9ffeb23d21b495e038665278e589fa04dc7c0c0a01a4a3b30a06c539f" + license "MIT" + head "https://github.com/tfeldmann/organize.git", branch: "main" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "82f2d77b517f37e35f50676b15ec7c9e6f80d43b2c53dfab649c722912ba4f95" + sha256 cellar: :any, arm64_sequoia: "4e2acbe0d1b7d0dac77d8d6bc1cb3ea12bece402305b5d7b8e3081b180f6cdcd" + sha256 cellar: :any, arm64_sonoma: "9ae3771db125f2270a6455d1ac603942eda74347ea433d9b8f0bcfc1263d7cc7" + sha256 cellar: :any, sonoma: "8153a2c04f628593063397b7672519f00b4e526b2c5cf1ec10e4a4c521686d37" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f659544fc071c5bb66a2d0d1c385cfa6fb013275850e86ba1ebf56e00ab9cdb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3ab8fce87d692379b3d64d0cd2fb6a7ef15adbb17391ef32b2bb9b2f5e08cb3" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build # for macos-tags + depends_on "cryptography" => :no_linkage + depends_on "freetype" + depends_on "libyaml" + depends_on "openjpeg" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1699 + end + + pypi_packages exclude_packages: ["cryptography", "pydantic-core"], + extra_packages: "pyobjc-framework-cocoa" + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "docopt-ng" do + url "https://files.pythonhosted.org/packages/e4/50/8d6806cf13138127692ae6ff79ddeb4e25eb3b0bcc3c1bd033e7e04531a9/docopt_ng-0.9.0.tar.gz" + sha256 "91c6da10b5bb6f2e9e25345829fb8278c78af019f6fc40887ad49b060483b1d7" + end + + resource "docx2txt" do + url "https://files.pythonhosted.org/packages/7d/7d/60ee3f2b16d9bfdfa72e8599470a2c1a5b759cb113c6fe1006be28359327/docx2txt-0.8.tar.gz" + sha256 "2c06d98d7cfe2d3947e5760a57d924e3ff07745b379c8737723922e7009236e5" + end + + resource "exifread" do + url "https://files.pythonhosted.org/packages/5f/a6/e5bdca841e5cc1a0eb7b9bf64854a4bf4e19e6de1a14092f93b8c907e87a/ExifRead-2.3.2.tar.gz" + sha256 "a0f74af5040168d3883bbc980efe26d06c89f026dc86ba28eb34107662d51766" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "macos-tags" do + url "https://files.pythonhosted.org/packages/d4/6e/e0b2ea37ef831a5c6b5aebbd14701d96d9dc061f04a867b05335a4bc099d/macos-tags-1.5.1.tar.gz" + sha256 "f144c5bc05d01573966d8aca2483cb345b20b76a5b32e9967786e086a38712e7" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdfind-wrapper" do + url "https://files.pythonhosted.org/packages/0e/74/148968c2665c0f2db1fbd470fbb454b1f808ea5d4cb8d75bc99f451d0ece/mdfind-wrapper-0.1.5.tar.gz" + sha256 "c0dbd5bc99c6d1fb4678bfa1841a3380ccac61e9b43a26a8d658aa9cafe27441" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "natsort" do + url "https://files.pythonhosted.org/packages/e2/a9/a0c57aee75f77794adaf35322f8b6404cbd0f89ad45c87197a937764b7d0/natsort-8.4.0.tar.gz" + sha256 "45312c4a0e5507593da193dedd04abb1469253b601ecaf63445ad80f0a1ea581" + end + + resource "pdfminer-six" do + url "https://files.pythonhosted.org/packages/78/46/5223d613ac4963e1f7c07b2660fe0e9e770102ec6bda8c038400113fb215/pdfminer_six-20250506.tar.gz" + sha256 "b03cc8df09cf3c7aba8246deae52e0bca7ebb112a38895b5e1d4f5dd2b8ca2e7" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/ab/dc/6d63019133e39e2b299dfbab786e64997fff0f145c45a417e1dd51faaf3f/pyobjc_core-12.0.tar.gz" + sha256 "7e05c805a776149a937b61b892a0459895d32d9002bedc95ce2be31ef1e37a29" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/37/6f/89837da349fe7de6476c426f118096b147de923139556d98af1832c64b97/pyobjc_framework_cocoa-12.0.tar.gz" + sha256 "02d69305b698015a20fcc8e1296e1528e413d8cf9fdcd590478d359386d76e8a" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "send2trash" do + url "https://files.pythonhosted.org/packages/fd/3a/aec9b02217bb79b87bbc1a21bc6abc51e3d5dcf65c30487ac96c0908c722/Send2Trash-1.8.3.tar.gz" + sha256 "b18e7a3966d99871aefeb00cfbcfdced55ce4871194810fc71f4aa484b953abf" + end + + resource "simplematch" do + url "https://files.pythonhosted.org/packages/d4/c5/209aa49f6c366f5b1d80e9eef2f75270079df3c9dec4658e0716e4bcd6ab/simplematch-1.4.tar.gz" + sha256 "55a77278b3d0686cb38e3ffe5a326a5f59c2995f1ba1fa1a4f68872c17caf4cb" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "xattr" do + url "https://files.pythonhosted.org/packages/91/ac/5898d1811abc88c3710317243168feff61ce12be220b9c92ee045ecd66c4/xattr-0.9.9.tar.gz" + sha256 "09cb7e1efb3aa1b4991d6be4eb25b73dc518b4fe894f0915f5b0dcede972f346" + end + + def install + if OS.mac? + # Help `pyobjc-framework-cocoa` pick correct SDK after removing -isysroot from Python formula + ENV.append_to_cflags "-isysroot #{MacOS.sdk_path}" + # pyobjc-core uses "-fdisable-block-signature-string" introduced in clang 17 + ENV.llvm_clang if DevelopmentTools.clang_build_version <= 1699 + else + # `macos-tags` and `pyobjc-framework-cocoa` + dependencies are only needed on macOS + # TODO: Currently requires manual check to confirm PyPI dependency tree + without = resources.filter_map { |r| r.name if r.name.start_with?("pyobjc") } + without += %w[macos-tags mdfind-wrapper xattr] + end + virtualenv_install_with_resources(without:) + end + + test do + config_file = testpath/"config.yaml" + config_file.write <<~YAML + rules: + - locations: #{testpath} + filters: + - extension: txt + actions: + - echo: 'Found: {path.name}' + - delete + YAML + + touch testpath/"homebrew.txt" + + assert_match "Found: homebrew.txt", shell_output("#{bin}/organize sim #{config_file}") + system bin/"organize", "run", config_file + refute_path_exists testpath/"homebrew.txt" + end +end diff --git a/Formula/o/orientdb.rb b/Formula/o/orientdb.rb new file mode 100644 index 0000000000000..aae4670510904 --- /dev/null +++ b/Formula/o/orientdb.rb @@ -0,0 +1,89 @@ +class Orientdb < Formula + desc "Graph database" + homepage "https://github.com/orientechnologies/orientdb/" + url "https://search.maven.org/remotecontent?filepath=com/orientechnologies/orientdb-community/3.2.45/orientdb-community-3.2.45.zip" + sha256 "5f8c1219b9e6bef4503d24c1dd38a7f804d7fa5de4273ef67fea9af80d315a22" + license "Apache-2.0" + + # The GitHub release description contains links to files on Maven. + livecheck do + url :homepage + regex(/orientdb-community[._-]v?(\d+(?:\.\d+)+)\.zip/i) + strategy :github_latest do |json, regex| + json["body"]&.scan(regex)&.map { |match| match[0] } + end + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "3f3e07d731100e83e1ec0124934d69d02c272d6f6f8f2801b382ee3681af44fd" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + rm_r(Dir["bin/*.bat"]) + + chmod 0755, Dir["bin/*"] + libexec.install Dir["*"] + + inreplace "#{libexec}/config/orientdb-server-config.xml", "", + <<~EOS + + + EOS + inreplace "#{libexec}/config/orientdb-server-log.properties", "../log", "#{var}/log/orientdb" + inreplace "#{libexec}/bin/orientdb.sh", "../log", "#{var}/log/orientdb" + inreplace "#{libexec}/bin/server.sh", "ORIENTDB_PID=$ORIENTDB_HOME/bin", "ORIENTDB_PID=#{var}/run/orientdb" + inreplace "#{libexec}/bin/shutdown.sh", "ORIENTDB_PID=$ORIENTDB_HOME/bin", "ORIENTDB_PID=#{var}/run/orientdb" + inreplace "#{libexec}/bin/orientdb.sh", '"YOUR_ORIENTDB_INSTALLATION_PATH"', libexec + inreplace "#{libexec}/bin/orientdb.sh", 'su $ORIENTDB_USER -c "cd \"$ORIENTDB_DIR/bin\";', "" + inreplace "#{libexec}/bin/orientdb.sh", '&"', "&" + + (bin/"orientdb").write_env_script "#{libexec}/bin/orientdb.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + (bin/"orientdb-console").write_env_script "#{libexec}/bin/console.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + (bin/"orientdb-gremlin").write_env_script "#{libexec}/bin/gremlin.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + def post_install + (var/"db/orientdb").mkpath + (var/"run/orientdb").mkpath + (var/"log/orientdb").mkpath + touch "#{var}/log/orientdb/orientdb.err" + touch "#{var}/log/orientdb/orientdb.log" + + ENV["ORIENTDB_ROOT_PASSWORD"] = "orientdb" + system bin/"orientdb", "stop" + sleep 3 + system bin/"orientdb", "start" + sleep 3 + ensure + system bin/"orientdb", "stop" + end + + def caveats + <<~EOS + The OrientDB root password was set to 'orientdb'. To reset it: + https://orientdb.org/docs/3.1.x/security/Server-Security.html#restoring-the-servers-user-root + EOS + end + + service do + run opt_libexec/"bin/server.sh" + keep_alive true + working_dir var/"orientdb" + log_path var/"log/orientdb/sout.log" + error_log_path var/"log/orientdb/serror.log" + end + + test do + ENV["CONFIG_FILE"] = "#{testpath}/orientdb-server-config.xml" + ENV["ORIENTDB_ROOT_PASSWORD"] = "orientdb" + + cp "#{libexec}/config/orientdb-server-config.xml", testpath + inreplace "#{testpath}/orientdb-server-config.xml", "", + " \n " + + assert_match "OrientDB console v.#{version}", pipe_output("#{bin}/orientdb-console \"exit;\"") + end +end diff --git a/Formula/o/ormolu.rb b/Formula/o/ormolu.rb new file mode 100644 index 0000000000000..d8db2d0cf4ebd --- /dev/null +++ b/Formula/o/ormolu.rb @@ -0,0 +1,66 @@ +class Ormolu < Formula + desc "Formatter for Haskell source code" + homepage "https://github.com/tweag/ormolu" + url "https://github.com/tweag/ormolu/archive/refs/tags/0.8.0.2.tar.gz" + sha256 "40d79a0e2ca0cdb8924d11de4cfdafa253ef82b91baf0b47388d61d749defb98" + license "BSD-3-Clause" + head "https://github.com/tweag/ormolu.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "455d08345efdd35bd58fbc526d4fbeaa8591537350e526728340bf5df683e29e" + sha256 cellar: :any, arm64_sequoia: "1217747b904943cb0fe3c5c8925fd1c384df538b1f578defc9d9dbb3458a5a54" + sha256 cellar: :any, arm64_sonoma: "2ea9791458ca9d85d257a6e6048772303b102ede366a7c58b8cc2d4908ac68c7" + sha256 cellar: :any, sonoma: "6be2df16ae9c2f99a69a414352b65edf125df8864ca4e0dfba63adde85c5698c" + sha256 cellar: :any_skip_relocation, arm64_linux: "312a416de29164e83c1fd85910ecf0d3568f27e4f9bdee3b7bde2b0ec103d7bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e633c8de861af86457fb1af18577f7cdadca5fa8ca247e66803d38966c50350e" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", "-f-fixity-th", *std_cabal_v2_args + end + + test do + (testpath/"test.hs").write <<~HASKELL + foo = + f1 + p1 + p2 p3 + + foo' = + f2 p1 + p2 + p3 + + foo'' = + f3 p1 p2 + p3 + HASKELL + expected = <<~HASKELL + foo = + f1 + p1 + p2 + p3 + + foo' = + f2 + p1 + p2 + p3 + + foo'' = + f3 + p1 + p2 + p3 + HASKELL + assert_equal expected, shell_output("#{bin}/ormolu test.hs") + end +end diff --git a/Formula/o/orocos-kdl.rb b/Formula/o/orocos-kdl.rb new file mode 100644 index 0000000000000..9f420e6d5d9b1 --- /dev/null +++ b/Formula/o/orocos-kdl.rb @@ -0,0 +1,49 @@ +class OrocosKdl < Formula + desc "Orocos Kinematics and Dynamics C++ library" + homepage "https://orocos.org/" + url "https://github.com/orocos/orocos_kinematics_dynamics/archive/refs/tags/1.5.3.tar.gz" + sha256 "3895eed1b51a6803c79e7ac4acd6a2243d621b887ac26a1a6b82a86a1131c3b6" + license "LGPL-2.1-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "f426120fbf55e9662b30801031021f06f97de8dceb6fa2b191767868e858f411" + sha256 cellar: :any, arm64_sequoia: "731dac44439182078ff405304de91785dd85c8c63ccdb9ace10b6c6892755b9a" + sha256 cellar: :any, arm64_sonoma: "1e89c7a3075cb09bc42a48dac3e0615c3fb247610e47a1fed9b4ba16452523a7" + sha256 cellar: :any, tahoe: "b3452bee349dfa41da18a7c9f3df3343561702441e13befe4f879bc4359c679e" + sha256 cellar: :any, sequoia: "7c12c1c4509464c389d04d0a273e40d09e44da3df366ba5e889dc0051fa9823f" + sha256 cellar: :any, sonoma: "c422791098d548a20a16a386b03514b3efddd1e4646804932559a98023ffd9f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0d188d3d5f65a19ecdd37d5a39d194177d341b70f755d7b8fb1459a59723fcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b9fe98f805b5c9c3944a6288a5a3abdc262ee58755d259fbeb11f04571e30dc" + end + + depends_on "cmake" => :build + depends_on "eigen" + + def install + system "cmake", "-S", "orocos_kdl", "-B", "build", + "-DCMAKE_CXX_STANDARD=14", + "-DEIGEN3_INCLUDE_DIR=#{Formula["eigen"].opt_include}/eigen3", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + using namespace KDL; + Vector v1(1.,0.,1.); + Vector v2(1.,0.,1.); + assert(v1==v2); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++14", "-I#{include}", "-L#{lib}", "-lorocos-kdl", + "-o", "test" + system "./test" + end +end diff --git a/Formula/o/orogene.rb b/Formula/o/orogene.rb new file mode 100644 index 0000000000000..b325ebd985501 --- /dev/null +++ b/Formula/o/orogene.rb @@ -0,0 +1,51 @@ +class Orogene < Formula + desc "`node_modules/` package manager and utility toolkit" + homepage "https://orogene.dev" + url "https://github.com/orogene/orogene/archive/refs/tags/v0.3.34.tar.gz" + sha256 "d4e50c2c3965e62160cf6a15db3734e4a847ca79629599fdd5ce30579aaae9a3" + license "Apache-2.0" + head "https://github.com/orogene/orogene.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d1b71b12add1cf3f8217e5d857e056c54a004638ad178be9f71ed0e7d55a0e7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68164cd2ef24f2cc58c5562c7c81cb72bc9139ef96975f459f1bd6ce05c3e73a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7a9c9b9ca6a84e14304d3d5e1f5fcb8d44d7546c0fe635c14e3bbd468175421" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1279bf1b9a1d443e8e4e5173be1e015438c0c3c0fdaa263879209fbd9fb8758b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e223abe73a6f15d8ae775209bb721c9a9513b4edac55af8b5f463587802039a4" + sha256 cellar: :any_skip_relocation, sonoma: "e72c4f89a0517891879aab76a95a3f12b9055d1dfd8510275bb5211883153c52" + sha256 cellar: :any_skip_relocation, ventura: "f94a9aa11660b3e6ad47ba48c38fdd988a8a51435ed7e6f1533983d5b939a66b" + sha256 cellar: :any_skip_relocation, monterey: "eecf977924a2d78a5b4871f5a58b3ea1733aa5b918849d743f0c2f1d9aec0e79" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8fb64cd8e5659c0d3f72fe6c994248c8e7c7c63af9e8a1b5801df5e5e73b13d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ead950a69b6ee4a7d7023264f55372d0d84e83984c46af445280d8f5281871fc" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + # rust 1.80 build patch, upstream pr ref, https://github.com/orogene/orogene/pull/315 + patch do + url "https://github.com/orogene/orogene/commit/2f774bb5b1067fb0f5f827140aff328190af0452.patch?full_index=1" + sha256 "c91711588a6fddee3055a356723a8a044cd82d287c59a7cf83802129d2ffa89b" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/oro --version") + + system bin/"oro", "ping" + end +end diff --git a/Formula/o/ortp.rb b/Formula/o/ortp.rb new file mode 100644 index 0000000000000..368a33beee494 --- /dev/null +++ b/Formula/o/ortp.rb @@ -0,0 +1,117 @@ +class Ortp < Formula + desc "Real-time transport protocol (RTP, RFC3550) library" + homepage "https://linphone.org/" + license "GPL-3.0-or-later" + + stable do + url "https://gitlab.linphone.org/BC/public/ortp/-/archive/5.4.56/ortp-5.4.56.tar.bz2" + sha256 "c02db152c9541e60f7e5c6069297fab2c72fdb192937b5c69fd6779dd6e5e69e" + + # bctoolbox appears to follow ortp's version. This can be verified at the GitHub mirror: + # https://github.com/BelledonneCommunications/bctoolbox + resource "bctoolbox" do + url "https://gitlab.linphone.org/BC/public/bctoolbox/-/archive/5.4.56/bctoolbox-5.4.56.tar.bz2" + sha256 "70243595308047fa7066e61efd47e20a5853aee2379eaea0a0f9e0be13bed9e2" + + livecheck do + formula :parent + end + + patch :DATA + end + end + + no_autobump! because: "resources cannot be updated automatically" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fefdb82968b0d24b58ed4417fbb42bcfc7242048b977ee9f12a7f78fbbb178aa" + sha256 cellar: :any, arm64_sequoia: "1cc435f918a3f90ba9d90873e242d9a9e32ec2706fa3c0213b803f32076fc422" + sha256 cellar: :any, arm64_sonoma: "9f05782b5d80e04b00759b868f200e4efa23dc6666075584eb019de039510acc" + sha256 cellar: :any, sonoma: "82aed925cc6bef294d5df29df76dfe06c71c2ff7f05e4994864f2af93bd7d6d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "eee38ed1376f5b7eea888a5f3af9dcb68426c67db75b0be3ace99071c0a3205d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de2cf525a469ebbcecdb1826690d433aedbf3026b5336fdc482402fa6a630195" + end + + head do + url "https://gitlab.linphone.org/BC/public/ortp.git", branch: "master" + + resource "bctoolbox" do + url "https://gitlab.linphone.org/BC/public/bctoolbox.git", branch: "master" + end + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "mbedtls" + + def install + odie "bctoolbox resource needs to be updated" if build.stable? && version != resource("bctoolbox").version + + resource("bctoolbox").stage do + args = %w[ + -DENABLE_TESTS_COMPONENT=OFF + -DBUILD_SHARED_LIBS=ON + -DENABLE_MBEDTLS=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" + ENV.append "LDFLAGS", "-Wl,-rpath,#{libexec}/lib" if OS.linux? + ENV.append_to_cflags "-I#{libexec}/include" + + args = %W[ + -DCMAKE_PREFIX_PATH=#{libexec} + -DBUILD_SHARED_LIBS=ON + -DENABLE_DOC=NO + -DENABLE_UNIT_TESTS=NO + ] + args << "-DCMAKE_INSTALL_RPATH=#{libexec}/Frameworks" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "ortp/logging.h" + #include "ortp/rtpsession.h" + #include "ortp/sessionset.h" + int main() + { + ORTP_PUBLIC void ortp_init(void); + return 0; + } + C + linker_flags = OS.mac? ? %W[-F#{frameworks} -framework ortp] : %W[-L#{lib} -lortp] + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-I#{libexec}/include", *linker_flags + system "./test" + end +end + +__END__ +diff --git a/src/crypto/mbedtls.cc b/src/crypto/mbedtls.cc +index cf146fd..8886b2d 100644 +--- a/src/crypto/mbedtls.cc ++++ b/src/crypto/mbedtls.cc +@@ -80,8 +80,6 @@ public: + + std::unique_ptr sRNG; + mbedtlsStaticContexts() { +- mbedtls_threading_set_alt(threading_mutex_init_cpp, threading_mutex_free_cpp, threading_mutex_lock_cpp, +- threading_mutex_unlock_cpp); + if (psa_crypto_init() != PSA_SUCCESS) { + bctbx_error("MbedTLS PSA init fail"); + } +@@ -92,7 +90,6 @@ public: + // before destroying mbedtls internal context, destroy the static RNG + sRNG = nullptr; + mbedtls_psa_crypto_free(); +- mbedtls_threading_free_alt(); + } + }; + static const auto mbedtlsStaticContextsInstance = std::make_unique(); diff --git a/Formula/o/ory-hydra.rb b/Formula/o/ory-hydra.rb new file mode 100644 index 0000000000000..61e558324f5ac --- /dev/null +++ b/Formula/o/ory-hydra.rb @@ -0,0 +1,59 @@ +class OryHydra < Formula + desc "OpenID Certified OAuth 2.0 Server and OpenID Connect Provider" + homepage "https://www.ory.sh/hydra/" + url "https://github.com/ory/hydra.git", + tag: "v2.3.0", + revision: "ee8c339ddada3a42529c0416897abc32bad03bbb" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "defca9a0378e91c56df7beffc0195a6c900e93febdc3f3a2f83d581d4eb9033f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c0a3f85167b48e6ea4b107c737e7e90fdbd4cfafe3a7d8b4be67facdb5af4c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "07b89367b51ed83fa91e6d1de162a7f1b0d16c596b47f6b52006e9054b81ee9a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b442320d9096b40cd35481016f883df160319e6b6060cf4ef6ec76820e957ea9" + sha256 cellar: :any_skip_relocation, sonoma: "1c8d55ca5dce7f630a4b23042ced6f1c35b1c187c55bdddb7ee05cff0a162826" + sha256 cellar: :any_skip_relocation, ventura: "6c4d52394e2726bf4c408dc69776d09a497c7456631a666b5115963a99a88803" + sha256 cellar: :any_skip_relocation, arm64_linux: "30944f8f85d029dfa84ded9ee820ca4bc9d7d9f865a0a0276a49b0ee2152df42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd7d10f4c7466d31197d3e5a2cf5196fe564f28f84236477b939a84fd7bd7bcb" + end + + depends_on "go" => :build + + conflicts_with "hydra", because: "both install `hydra` binaries" + + def install + ldflags = %W[ + -s -w + -X github.com/ory/hydra/v2/driver/config.Version=v#{version} + -X github.com/ory/hydra/v2/driver/config.Date=#{time.iso8601} + -X github.com/ory/hydra/v2/driver/config.Commit=#{Utils.git_head} + ] + system "go", "build", *std_go_args(ldflags:, tags: "sqlite", output: bin/"hydra") + end + + test do + assert_match version.to_s, shell_output("#{bin}/hydra version") + + admin_port = free_port + (testpath/"config.yaml").write <<~YAML + dsn: memory + serve: + public: + port: #{free_port} + admin: + port: #{admin_port} + YAML + + fork { exec bin/"hydra", "serve", "all", "--config", "#{testpath}/config.yaml" } + sleep 20 + + endpoint = "http://127.0.0.1:#{admin_port}/" + output = shell_output("#{bin}/hydra list clients --endpoint #{endpoint}") + assert_match "CLIENT ID\tCLIENT SECRET", output + end +end diff --git a/Formula/o/osc-cli.rb b/Formula/o/osc-cli.rb new file mode 100644 index 0000000000000..7936b79f4ff67 --- /dev/null +++ b/Formula/o/osc-cli.rb @@ -0,0 +1,105 @@ +class OscCli < Formula + include Language::Python::Virtualenv + + desc "Official Outscale CLI providing connectors to Outscale API" + homepage "https://github.com/outscale/osc-cli" + url "https://files.pythonhosted.org/packages/02/cd/f1b796f5e7a301f6a3c0b910be07188cbfd329d2758e036d24ef26b4ee96/osc-sdk-1.11.0.tar.gz" + sha256 "d3b71b326b0698da1b9a503cd511a992fe578375fd01b30bdec0d63d8328af66" + license "BSD-3-Clause" + revision 9 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d0c5d066c50615c4161a3c18570083fa64333afa998168c8739f5423cb23a428" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0c5d066c50615c4161a3c18570083fa64333afa998168c8739f5423cb23a428" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0c5d066c50615c4161a3c18570083fa64333afa998168c8739f5423cb23a428" + sha256 cellar: :any_skip_relocation, sonoma: "10b5e800cf5c6b4789daf2ba23eb19c3f5e9fd87d37794c4150087a19b49067f" + sha256 cellar: :any_skip_relocation, arm64_linux: "10b5e800cf5c6b4789daf2ba23eb19c3f5e9fd87d37794c4150087a19b49067f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10b5e800cf5c6b4789daf2ba23eb19c3f5e9fd87d37794c4150087a19b49067f" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "fire" do + url "https://files.pythonhosted.org/packages/c0/00/f8d10588d2019d6d6452653def1ee807353b21983db48550318424b5ff18/fire-0.7.1.tar.gz" + sha256 "3b208f05c736de98fb343310d090dcc4d8c78b2a89ea4f32b837c586270a9cbf" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" + sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + def install + virtualenv_install_with_resources + end + + test do + # we test the help which is printed in stderr + str = shell_output("#{bin}/osc-cli -- --help 2>&1 >/dev/null") + assert_match "osc-cli SERVICE CALL ", str + str = shell_output("#{bin}/osc-cli api ReadVms 2>&1 >/dev/null", 1) + assert_match "Missing Access Key for authentication", str + + mkdir testpath/".osc" + (testpath/".osc/config.json").write <<~JSON + { + "default": { + "access_key": "F4K4T706S9XKGEXAMPLE", + "secret_key": "E4XJE8EJ98ZEJ18E4J9ZE84J19Q8E1J9S87ZEXAMPLE", + "host": "outscale.com", + "https": true, + "method": "POST", + "region_name": "eu-west-2" + } + } + JSON + + str = shell_output("#{bin}/osc-cli api ReadVms 2>&1 >/dev/null", 1) + match = "raise OscApiException(http_response)" + assert_match match, str + end +end diff --git a/Formula/o/osc.rb b/Formula/o/osc.rb new file mode 100644 index 0000000000000..ebdf371e99d89 --- /dev/null +++ b/Formula/o/osc.rb @@ -0,0 +1,59 @@ +class Osc < Formula + include Language::Python::Virtualenv + + desc "Command-line interface to work with an Open Build Service" + homepage "https://openbuildservice.org" + url "https://files.pythonhosted.org/packages/11/85/c7fc2a78daeb2ff8faba56a8955fdb06f9edf653799332828584953b4644/osc-1.21.0.tar.gz" + sha256 "47511ab565af21d4ce7ffb38bfb0cffda6ee453b142b76ca89b8c9240c26e14f" + license "GPL-2.0-or-later" + head "https://github.com/openSUSE/osc.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0340d2cce15f3468d8b5fc4562b532e298662a43699744bee6bb042688132cca" + end + + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + depends_on "rpm" + + uses_from_macos "curl" + uses_from_macos "libffi" + + pypi_packages package_name: "", + extra_packages: %w[ruamel-yaml urllib3], + exclude_packages: "cryptography" + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + test_config = testpath/"oscrc" + ENV["OSC_CONFIG"] = test_config + + test_config.write <<~INI + [general] + apiurl = https://api.opensuse.org + + [https://api.opensuse.org] + credentials_mgr_class=osc.credentials.TransientCredentialsManager + user=brewtest + pass= + INI + + output = shell_output("#{bin}/osc status 2>&1", 1).chomp + assert_match "Directory '.' is not a Git SCM working copy", output + assert_match "Please specify a command", shell_output("#{bin}/osc 2>&1", 2) + end +end diff --git a/Formula/o/oscats.rb b/Formula/o/oscats.rb new file mode 100644 index 0000000000000..8ce38409f12d4 --- /dev/null +++ b/Formula/o/oscats.rb @@ -0,0 +1,69 @@ +class Oscats < Formula + desc "Computerized adaptive testing system" + homepage "https://code.google.com/archive/p/oscats/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/oscats/oscats-0.6.tar.gz" + sha256 "2f7c88cdab6a2106085f7a3e5b1073c74f7d633728c76bd73efba5dc5657a604" + license "GPL-3.0-or-later" + revision 7 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "35dc1e697fe94c6ceab3be777ef3aa53ec83df8451739125105a4fa5e24e5fd7" + sha256 cellar: :any, arm64_sequoia: "14bdf254ea5eb224c087cc3bdc7ba53b46d52b77e2c440f738871e747ad7e33a" + sha256 cellar: :any, arm64_sonoma: "ee65d5fb7e853cf11866ad5d82e42443a2c899089538f7563a3d63268af2855e" + sha256 cellar: :any, arm64_ventura: "dae032204b3f3d0d874482bec11e6ba4cc34cdf088929e5e432e75960800ddd2" + sha256 cellar: :any, arm64_monterey: "f348f164c17601c6fe88cbf6c0e403615f6466c286fdc6b7b5a809e0c4af0347" + sha256 cellar: :any, sonoma: "13bd95cd190928092251cd826497867f03f36d6a3f4f1deee6e00577c2bb4c23" + sha256 cellar: :any, ventura: "cafcdb6c91e58beebb50ab5fdf28a7f9246df0256be3285a49f70e6b79f6323c" + sha256 cellar: :any, monterey: "d86233a0472773367baa7cded028f338d8ee4121b742bfa8a0aa9fd275ac95fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "5455564ddd14e3caddfc1af6a1f7440daf719e7446c51a0f3beefab3088ce053" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cea14d82ea0d9f7fea63cbd5364ccd2a85d0d8b8e02a498904b3f1bec140712c" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + depends_on "gsl" + + on_macos do + depends_on "gettext" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + # Fix issue with conflicting definitions of select on Linux. + # Patch submitted to discussion group: + # https://groups.google.com/g/oscats/c/WZ7gRjkxmIk. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/oscats/linux.patch" + sha256 "95fcfa861ed75a9292a6dfbb246a62be3ad3bd9c63db43c3d283ba68069313af" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + pkgshare.install "examples" + # Fix shim references in examples Makefile. + if OS.mac? + inreplace pkgshare/"examples/Makefile", + Superenv.shims_path/"pkg-config", + Formula["pkgconf"].opt_bin/"pkg-config" + else + inreplace pkgshare/"examples/Makefile", Superenv.shims_path/"ld", "ld" + end + end + + test do + pkgconf_flags = shell_output("pkgconf --cflags --libs oscats glib-2.0").chomp.split + system ENV.cc, "-Wno-incompatible-pointer-types", pkgshare/"examples/ex01.c", *pkgconf_flags, "-o", "ex01" + assert_match "Done", shell_output("#{testpath}/ex01") + end +end diff --git a/Formula/o/osctrl-cli.rb b/Formula/o/osctrl-cli.rb new file mode 100644 index 0000000000000..8cc93f1a1de4a --- /dev/null +++ b/Formula/o/osctrl-cli.rb @@ -0,0 +1,30 @@ +class OsctrlCli < Formula + desc "Fast and efficient osquery management" + homepage "https://osctrl.net" + url "https://github.com/jmpsec/osctrl/archive/refs/tags/v0.4.7.tar.gz" + sha256 "bcd8637d5000e16f22ba97698ae50862dd7ed3358a51f85ad54fdbd69651037c" + license "MIT" + head "https://github.com/jmpsec/osctrl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f3cdc75e7688705575e368f106bd506f8fc53b515ca959c417336731ceba8b06" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cb7988e7c77908ed7d655b9b34972706ee0b580ab74bf6001215da0cb2204a0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c9f6820ef33aa8380f4bfe50d719f2f924bc5f1025ea9ee047b4c1c75710c012" + sha256 cellar: :any_skip_relocation, sonoma: "ef27466a962721e0d89568cafbbe3a50695a08a74dfff3da4df2b3089bd8dcbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "30e28822fd81394ead5390a85a9f685f5cb5cff1529b4fbacade25e22f76c441" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a12af433dfa24002d2e0ca74e8db6d8b6663846e22c78c090379c3ee3114704" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/cli" + end + + test do + assert_match version.to_s, shell_output("#{bin}/osctrl-cli --version") + + output = shell_output("#{bin}/osctrl-cli check-db 2>&1", 1) + assert_match "failed to create backend", output + end +end diff --git a/Formula/o/osi.rb b/Formula/o/osi.rb new file mode 100644 index 0000000000000..913942e11e34b --- /dev/null +++ b/Formula/o/osi.rb @@ -0,0 +1,56 @@ +class Osi < Formula + desc "Open Solver Interface" + homepage "https://github.com/coin-or/Osi" + url "https://github.com/coin-or/Osi/archive/refs/tags/releases/0.108.11.tar.gz" + sha256 "1063b6a057e80222e2ede3ef0c73c0c54697e0fee1d913e2bef530310c13a670" + license "EPL-2.0" + + livecheck do + url :stable + regex(%r{^releases/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "cba7ab1ccf3bfe814eef30dfe9def0b9ff44a29a31e93efbcdef050174d08f5b" + sha256 cellar: :any, arm64_sequoia: "d481d371981a212968f123ab295b4a2f891040f411dfa9cbf6b537adc851c155" + sha256 cellar: :any, arm64_sonoma: "92e1f220abefbedf5afa236f48941731101b6bc6cf3c0a5a3a42c4ded4af2a58" + sha256 cellar: :any, arm64_ventura: "62ff3b164a73eb23614ab0bf0ae1fcca5bb41e83fd64ebccb8f245cc5aa23c0c" + sha256 cellar: :any, arm64_monterey: "ab536eb79add604baa066582abcda1ad72018ce2aa1e74144d11d4a4988ad259" + sha256 cellar: :any, sonoma: "c24c4a4d44b819fa097e9b3f77602f8d21175a1ca94199933396ffb334575306" + sha256 cellar: :any, ventura: "d83b00f27e81af9188cc1066ec87b0375c3c8dcc32c71d2ea6a89aacae006003" + sha256 cellar: :any, monterey: "d05eb1c3f01d1687b03107578ed1054bfb34424c2b388a0b5c98cd2bcc0e442b" + sha256 cellar: :any_skip_relocation, arm64_linux: "215b27d8b21a6756ec8174cebb1e8e9c2f0a2769bee7fef39b95630f7b67cb47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "093a334ad180ed10951e23866b1d6df68087fc29aee54a749899bb8b5d629780" + end + + depends_on "pkgconf" => :build + depends_on "coinutils" + + on_macos do + depends_on "openblas" + end + + def install + # Work around - same as clp formula + # Error 1: "mkdir: #{include}/osi/coin: File exists." + mkdir include/"osi/coin" + + system "./configure", "--disable-silent-rules", "--includedir=#{include}/osi", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + OsiSolverInterface *si; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lOsi", + "-I#{include}/osi/coin", + "-I#{Formula["coinutils"].include}/coinutils/coin", + "-o", "test" + system "./test" + end +end diff --git a/Formula/o/osinfo-db-tools.rb b/Formula/o/osinfo-db-tools.rb new file mode 100644 index 0000000000000..6ba5521df1245 --- /dev/null +++ b/Formula/o/osinfo-db-tools.rb @@ -0,0 +1,48 @@ +class OsinfoDbTools < Formula + desc "Tools for managing the libosinfo database files" + homepage "https://libosinfo.org/" + url "https://releases.pagure.org/libosinfo/osinfo-db-tools-1.12.0.tar.xz" + sha256 "f3315f675d18770f25dea8ed04b20b8fc80efb00f60c37ee5e815f9c3776e7f3" + license "GPL-2.0-or-later" + + livecheck do + url "https://releases.pagure.org/libosinfo/?C=M&O=D" + regex(/href=.*?osinfo-db-tools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "4ed1a9113234b319e5c875fba704e8546db0edbc39a53f71b676fd87b74ee792" + sha256 arm64_sequoia: "80f2f1a41f22df092e66ad09f9859a2e8803624c721a35fb1ebfb8686f16c29f" + sha256 arm64_sonoma: "4e67be0abc92b903e05fe4f6f9a9ff4a184e2c389131867266514fa4133b99a8" + sha256 arm64_ventura: "0290289cbf19411222251e9ddd30034f5eb3ef07d1522433604553ad37ed6084" + sha256 sonoma: "6e8998ee30a50e1f554a2b60ba07fa41b060ca5e0bbd2127141c7ab3dfe14c21" + sha256 ventura: "77dc1ed0d15dec8a1e439b0d90e536e341b44ff30a0cdce795040d1dbf176537" + sha256 arm64_linux: "cf6f82c290c7b56fb518c3267cef7f49a838f41196536bc4001190ad0152bfe2" + sha256 x86_64_linux: "0b59eccfaf5d2d701369a0feebbfeed127dbdf4cbf20acc31a71e22400a1a692" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "glib" + depends_on "json-glib" + depends_on "libarchive" + depends_on "libsoup" + + uses_from_macos "pod2man" => :build + uses_from_macos "libxml2" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "install", "-C", "build" + end + + def post_install + share.install_symlink HOMEBREW_PREFIX/"share/osinfo" + end + + test do + assert_equal "#{share}/osinfo", shell_output("#{bin}/osinfo-db-path --system").strip + end +end diff --git a/Formula/o/osinfo-db.rb b/Formula/o/osinfo-db.rb new file mode 100644 index 0000000000000..959429fd560dd --- /dev/null +++ b/Formula/o/osinfo-db.rb @@ -0,0 +1,26 @@ +class OsinfoDb < Formula + desc "Osinfo database of operating systems for virtualization provisioning tools" + homepage "https://libosinfo.org/" + url "https://releases.pagure.org/libosinfo/osinfo-db-20250606.tar.xz", using: :nounzip + sha256 "9940aa47df298073c51dcf8a4dcc855f494ab864c24cdbda46bd897957357fe1" + license "GPL-2.0-or-later" + + livecheck do + url "https://releases.pagure.org/libosinfo/?C=M&O=D" + regex(/href=.*?osinfo-db[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "61619ff6e7611219a5573a9248962b8d2b466ba5be2f65ed62cb0e6b24001112" + end + + depends_on "osinfo-db-tools" => [:build, :test] + + def install + system "osinfo-db-import", "--dir=#{share}/osinfo", "osinfo-db-#{version}.tar.xz" + end + + test do + system "osinfo-db-validate", "--system" + end +end diff --git a/Formula/o/oslo.rb b/Formula/o/oslo.rb new file mode 100644 index 0000000000000..7c9ce649f30f4 --- /dev/null +++ b/Formula/o/oslo.rb @@ -0,0 +1,38 @@ +class Oslo < Formula + desc "CLI tool for the OpenSLO spec" + homepage "https://openslo.com/" + url "https://github.com/OpenSLO/oslo/archive/refs/tags/v0.13.0.tar.gz" + sha256 "8e3c501103cbfb0d9980a6ea023def0bdef2fe111a8aec3b106302669d452ec2" + license "Apache-2.0" + head "https://github.com/openslo/oslo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ff44a4a69d5f3ca100d7aa93def60b26c01d8b5e76e22629d8a148d82fddf378" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1dc252e4e8d683047409636266e7c11e62725cc9ac3a21c394c1a0f04b644654" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1dc252e4e8d683047409636266e7c11e62725cc9ac3a21c394c1a0f04b644654" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1dc252e4e8d683047409636266e7c11e62725cc9ac3a21c394c1a0f04b644654" + sha256 cellar: :any_skip_relocation, sonoma: "bd87cd615862dce34c7e3372d0b2496cb34a4813a352fa0e9c677eaaaa2cbf95" + sha256 cellar: :any_skip_relocation, ventura: "bd87cd615862dce34c7e3372d0b2496cb34a4813a352fa0e9c677eaaaa2cbf95" + sha256 cellar: :any_skip_relocation, arm64_linux: "0cf3deec2c0c32fc60d36210e844c477b0aca9a9fdbd518ae364fc2b929e37e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ab3bfa70149e279e8a2902afe6ff19044c128da80df54b70fd711ed3ac445be" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/oslo" + + generate_completions_from_executable(bin/"oslo", "completion") + + pkgshare.install "test" + end + + test do + test_file = pkgshare/"test/inputs/validate/unknown-field.yaml" + assert_match "json: unknown field", shell_output("#{bin}/oslo validate -f #{test_file} 2>&1", 1) + + output = shell_output("#{bin}/oslo fmt -f #{pkgshare}/test/inputs/fmt/service.yaml") + assert_equal File.read(pkgshare/"test/outputs/fmt/service.yaml"), output + end +end diff --git a/Formula/o/osm-gps-map.rb b/Formula/o/osm-gps-map.rb new file mode 100644 index 0000000000000..14c6d694f3ac2 --- /dev/null +++ b/Formula/o/osm-gps-map.rb @@ -0,0 +1,100 @@ +class OsmGpsMap < Formula + desc "GTK+ library to embed OpenStreetMap maps" + homepage "https://github.com/nzjrs/osm-gps-map" + license "GPL-2.0-or-later" + revision 2 + + stable do + # TODO: Make autoconf, automake, gtk-doc and libtool HEAD-only on next release + url "https://github.com/nzjrs/osm-gps-map/releases/download/1.2.0/osm-gps-map-1.2.0.tar.gz" + sha256 "ddec11449f37b5dffb4bca134d024623897c6140af1f9981a8acc512dbf6a7a5" + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # Apply Void Linux's patch for libsoup 3. Remove in the next release. + # This is a rebased copy of upstream commit that applies on stable release + # https://github.com/nzjrs/osm-gps-map/commit/a7965751821d5bb55f8fb37b4045295d0c44dd9b + patch do + url "https://raw.githubusercontent.com/void-linux/void-packages/f6b0cf8ca04678301773327b9a2d5efb043dae3d/srcpkgs/libosmgpsmap/patches/libsoup-3.patch" + sha256 "045c8c9a6a317aea89158154818399815525f5b5cb0340332f92b250d73e5bc6" + end + + # Backport fix for add_point + patch do + url "https://github.com/nzjrs/osm-gps-map/commit/639ea5e02d2cb47cbc15554d61b1ba6b0ee073b6.patch?full_index=1" + sha256 "7979e6d050e83b2e0f84c3e9671828c59de36d491b497a1b780b62bcc9ea1f69" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "e749fe56b5482a3a9418de1bba012a642a932b92fb092d669056f932a4a0f615" + sha256 arm64_sequoia: "1f92caba8e52495b92a2ed81e6e7f6959d25bb7ac12353872df3638d6ecbe7f1" + sha256 arm64_sonoma: "12026a32374a2a8797d650c925fdc5ad9c19833c1019003d542e507e0fe80448" + sha256 arm64_ventura: "e7a42cd9f4293f91416301dfd756ce762dda325b466c511c4e9cfbeacc996e97" + sha256 sonoma: "fd61181265716039211a690890598b64359740fc017868051062c23044641343" + sha256 ventura: "6ab0a704cd25d754617aa95f97fcc8ea447def786f33771a3352c31a1fbc657f" + sha256 cellar: :any_skip_relocation, arm64_linux: "40a000a5d4c6bc3b19b78e93ca25463f187a59a3f5ecd9187650955164ef7f09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1025b0a42d58429dfad4828bef5b3041e12a1bf54a8a849b3fc302f998a1c5d" + end + + head do + url "https://github.com/nzjrs/osm-gps-map.git", branch: "master" + depends_on "autoconf-archive" => :build + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gobject-introspection" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "libsoup" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + end + + def install + # TODO: Remove next release + system "autoreconf", "--force", "--install", "--verbose" if build.stable? + + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", "--enable-introspection", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + OsmGpsMap *map; + gtk_init (&argc, &argv); + map = g_object_new (OSM_TYPE_GPS_MAP, NULL); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs osmgpsmap-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + + # (test:40601): Gtk-WARNING **: 23:06:24.466: cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "./test" + end +end diff --git a/Formula/o/osm-pbf.rb b/Formula/o/osm-pbf.rb new file mode 100644 index 0000000000000..b77096bdf469d --- /dev/null +++ b/Formula/o/osm-pbf.rb @@ -0,0 +1,36 @@ +class OsmPbf < Formula + desc "Tools related to PBF (an alternative to XML format)" + homepage "https://wiki.openstreetmap.org/wiki/PBF_Format" + url "https://github.com/openstreetmap/OSM-binary/archive/refs/tags/v1.5.1.tar.gz" + sha256 "183ad76c5905c7abd35d938824320ffb82d9ca8987796018f2da8380b51cdac2" + license "LGPL-3.0-or-later" + revision 19 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "16c7b5126233e18abbe398eb0d7b4c0f17f8ccd5f47d7f8441ed99bb30072c1b" + sha256 cellar: :any, arm64_sequoia: "897d73dc0bce927a84649e2b82a78e009dda7e903620fc1a22ce13998a949155" + sha256 cellar: :any, arm64_sonoma: "c7d18ead1e75932be311942c45893270057f3d3e072b24941f0ced0f1ac65c23" + sha256 cellar: :any, sonoma: "05a73acafa27a7cba3dfb573ea071fc3ce30633d0d82ecfc7ff843feb8878004" + sha256 arm64_linux: "4ee5772592b857ccc678a5d6a14d8fdfa448dd9026be95c1c63c1a2d068014b0" + sha256 x86_64_linux: "0dcfb0722f2dd181195ae23a7a3195faae1c4d5035990c035bd9373aed9d75a3" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "protobuf" + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "resources/sample.pbf" + end + + test do + assert_match "OSMHeader", shell_output("#{bin}/osmpbf-outline #{pkgshare}/sample.pbf") + end +end diff --git a/Formula/o/osm.rb b/Formula/o/osm.rb new file mode 100644 index 0000000000000..d5e0cfc33ac95 --- /dev/null +++ b/Formula/o/osm.rb @@ -0,0 +1,42 @@ +class Osm < Formula + desc "Open Service Mesh (OSM)" + homepage "https://openservicemesh.io/" + url "https://github.com/openservicemesh/osm.git", + tag: "v1.2.4", + revision: "82651008921837b2f21113e4604a807c3f68a97c" + license "Apache-2.0" + head "https://github.com/openservicemesh/osm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3290438783446cf475bf7eb660b0f83d61bf3b6634e79ed1490ac9961dfd80e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "355b38a1dbff9c3aaa823e43908a3f8f35896ff53b6841be6049a93a27749e6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6f9fc9b20e79dbd991464f6226b5d3d06ec6831cb3def39ba96604f7570875fb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5eef76b97e7a512dd02b7e29a699cc570b25e7e2f91ee6ea9032cc8d4f4cd197" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fbe85ec87c4c92d790300149d14e518f0936ce6170d7fc0bb9594aedd736a013" + sha256 cellar: :any_skip_relocation, sonoma: "1312a5fdb310e7a30de633a528b09d80a5db7bc1c2457013bbedc0cadcea28a2" + sha256 cellar: :any_skip_relocation, ventura: "986a024863165c46cb4a73f66ea216e40ac1c2c9502dd368a9cf7e8cf5cd4e30" + sha256 cellar: :any_skip_relocation, monterey: "f1efcb2f65f52dee57e1b2544694b00201f45bb36dd391c55e807a2f4b71b8f2" + sha256 cellar: :any_skip_relocation, big_sur: "88a968fa2368ec0f1729747d0eead01c22a24cecb8689a8bc639a9a1cb22931e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c331213fde50a3f23b9e668571aa173120210ade4b7768e29c17b167584f49a1" + end + + deprecate! date: "2024-03-10", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + depends_on "go" => :build + depends_on "helm" => :build + + def install + ENV["VERSION"] = "v"+version if build.stable? + ENV["BUILD_DATE"] = time.strftime("%Y-%m-%d-%H:%M") + system "make", "build-osm" + bin.install "bin/osm" + + generate_completions_from_executable(bin/"osm", "completion") + end + + test do + assert_match "Error: Could not list namespaces related to osm", shell_output("#{bin}/osm namespace list 2>&1", 1) + assert_match "Version:\"v#{version}\"", shell_output("#{bin}/osm version 2>&1", 1) + end +end diff --git a/Formula/o/osm2pgrouting.rb b/Formula/o/osm2pgrouting.rb new file mode 100644 index 0000000000000..a922012dcb7d9 --- /dev/null +++ b/Formula/o/osm2pgrouting.rb @@ -0,0 +1,47 @@ +class Osm2pgrouting < Formula + desc "Import OSM data into pgRouting database" + homepage "https://pgrouting.org/docs/tools/osm2pgrouting.html" + url "https://github.com/pgRouting/osm2pgrouting/archive/refs/tags/v3.0.0.tar.gz" + sha256 "3d3042aa0dd30930d27801c9833ebfbe16eba0ab0e5d6277636ce17b157f2a0f" + license "GPL-2.0-or-later" + head "https://github.com/pgRouting/osm2pgrouting.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a1e6d63741efd9433243a34fe6eeabac94c997be7bfee53cddc38bdef146ecfd" + sha256 cellar: :any, arm64_sequoia: "79c6fed661046213cde072cb868cf54d4b5957d3df71e06510f3e4510488956b" + sha256 cellar: :any, arm64_sonoma: "343380fd98246518862587e7d1ee1c9ff2e9a5cf45dfd5f75f603cf6d3086073" + sha256 cellar: :any, sonoma: "58cc66aa2903ebc7a582e0aee137d8451d265de54d4bce92a7e0176dac015ba7" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd934d5d273ee9a827099f0d9fee6ab760319fc66f0fcd16500b442dcabbf5bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ceb7cff82516b6511dd821ffb18aeb0b4c4e58a32f4fbef41ebbc59e02c4b66" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "libpq" + depends_on "libpqxx" + depends_on "pgrouting" + depends_on "postgis" + + uses_from_macos "expat" + + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + def remove_brew_expat + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + + def install + remove_brew_expat if OS.mac? && MacOS.version < :sequoia + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"osm2pgrouting", "--help" + end +end diff --git a/Formula/o/osm2pgsql.rb b/Formula/o/osm2pgsql.rb new file mode 100644 index 0000000000000..40f5d25680160 --- /dev/null +++ b/Formula/o/osm2pgsql.rb @@ -0,0 +1,64 @@ +class Osm2pgsql < Formula + desc "OpenStreetMap data to PostgreSQL converter" + homepage "https://osm2pgsql.org" + url "https://github.com/osm2pgsql-dev/osm2pgsql/archive/refs/tags/2.2.0.tar.gz" + sha256 "567dad078f8a66d6d706ac1876b5251b688109d16974909d89ce2056d6e9f258" + license "GPL-2.0-only" + head "https://github.com/osm2pgsql-dev/osm2pgsql.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "ae644af87377ab7b3929748cf15cf4151b96e3e960195062dfae930a9ef92072" + sha256 arm64_sequoia: "da139f76e7af7412be8e7602dba9f505c7a340a83cbd1bad2a56c047cd69c4a6" + sha256 arm64_sonoma: "eb336eca001d75bf3285581214dbcddd702aa81cd657a1a9bdf74bc9e8f4e9d1" + sha256 sonoma: "f969b377e07e963a6389c7595cc67da42977cf68b569a34301a94cfc6ce1e69d" + sha256 arm64_linux: "c28a695b8b96dd3a35f11a2e8be256245e930dc2d260fd6b717fe72d946f6712" + sha256 x86_64_linux: "3200c49625f208c5171192dc160c001ce9a205e87050fe7ce41627d997f9e9e3" + end + + depends_on "boost" => :build + depends_on "cli11" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "libosmium" => :build + depends_on "lua" => :build + depends_on "nlohmann-json" => :build + depends_on "protozero" => :build + + depends_on "libpq" + depends_on "luajit" + depends_on "proj" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + # This is essentially a CMake disrespects superenv problem + # rather than an upstream issue to handle. + lua_version = Formula["lua"].version.to_s.match(/\d\.\d/) + inreplace "cmake/FindLua.cmake", /set\(LUA_VERSIONS5( \d\.\d)+\)/, + "set(LUA_VERSIONS5 #{lua_version})" + + # Remove bundled libraries + rm_r("contrib") + + args = %w[ + -DEXTERNAL_CLI11=ON + -DEXTERNAL_FMT=ON + -DEXTERNAL_LIBOSMIUM=ON + -DEXTERNAL_PROTOZERO=ON + -DWITH_LUAJIT=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/osm2pgsql /dev/null 2>&1", 1) + assert_match "ERROR: Connecting to database failed", output + + assert_match version.to_s, shell_output("#{bin}/osm2pgsql --version 2>&1") + end +end diff --git a/Formula/o/osmcoastline.rb b/Formula/o/osmcoastline.rb new file mode 100644 index 0000000000000..025e4a8c6acf8 --- /dev/null +++ b/Formula/o/osmcoastline.rb @@ -0,0 +1,65 @@ +class Osmcoastline < Formula + desc "Extracts coastline data from OpenStreetMap planet file" + homepage "https://osmcode.org/osmcoastline/" + url "https://github.com/osmcode/osmcoastline/archive/refs/tags/v2.4.1.tar.gz" + sha256 "3a76ed8c8481e5499c8fedbba3b6af4f33f73bbbfc4e6154ea50fe48ae7054a9" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "3315f86d657d685cfaf5e1f38277f0542b330f1b7cd733ee39f040f72e0289f3" + sha256 cellar: :any, arm64_sequoia: "7461510ebcdfa1d486b69e15595105eb324bd15c9a4e6339b811c42b5a0e7ffe" + sha256 cellar: :any, arm64_sonoma: "fe78194e9aa2964afbc350073fd162a2fdc75bd6495faf3fd70949e58cd494b7" + sha256 cellar: :any, arm64_ventura: "0865ee2f7d54ac95a1ed2981e1e0f4440757163881dcb1a56fff16267ea1b689" + sha256 cellar: :any, sonoma: "1d94935f700e30bb7b65234701104deea79fdf34cd68be53b01b94e36f9a221c" + sha256 cellar: :any, ventura: "ae0525b18cc02254813fc116b75df743a637485e32d34a047dfbbb3fa894566f" + sha256 cellar: :any_skip_relocation, arm64_linux: "214c62abaed4acdc317d89a83681fa13e7798f3e79b82b6da59ee4374d0b088a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4deb169fe2a9cc48ddd8963591cf758b0c5f895bfa3562416ac5d538963ccd42" + end + + depends_on "cmake" => :build + depends_on "libosmium" => :build + depends_on "protozero" => :build + depends_on "gdal" + depends_on "geos" + depends_on "libspatialite" + depends_on "lz4" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + def remove_brew_expat + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + + def install + remove_brew_expat if OS.mac? && MacOS.version < :sequoia + + protozero = Formula["protozero"].opt_include + args = %W[ + -DPROTOZERO_INCLUDE_DIR=#{protozero} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"input.opl").write <<~OPL + n100 v1 x1.01 y1.01 + n101 v1 x1.04 y1.01 + n102 v1 x1.04 y1.04 + n103 v1 x1.01 y1.04 + w200 v1 Tnatural=coastline Nn100,n101,n102,n103,n100 + OPL + system bin/"osmcoastline", "-v", "-o", "output.db", "input.opl" + end +end diff --git a/Formula/o/osmfilter.rb b/Formula/o/osmfilter.rb new file mode 100644 index 0000000000000..be0c2d696fecb --- /dev/null +++ b/Formula/o/osmfilter.rb @@ -0,0 +1,51 @@ +class Osmfilter < Formula + desc "Command-line tool to filter OpenStreetMap files for specific tags" + homepage "https://wiki.openstreetmap.org/wiki/Osmfilter" + url "https://gitlab.com/osm-c-tools/osmctools.git", + tag: "0.9", + revision: "f341f5f237737594c1b024338f0a2fc04fabdff3" + license "AGPL-3.0-only" + head "https://gitlab.com/osm-c-tools/osmctools.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1c75182ccbe17c6d0bf607a3301436d37728ca4964ea87ec91796b130931460a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d86b7309f3fbd2c39a78416fe5dc0eac2b08c2ef0795e9c3d83c165ddf122e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "864446d5bf53f85f504188be4f59c5f1fc1b902a647a1666de49bf467fa0fd0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "06e67f6d61cc209499475b010c4bfe2375d5e3dcb4429e89485d6b03454322c6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "daf330073a0fdad514305d1a2af9333705cc946c3bc8e52da4856ae2d0bba094" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4b37db3c9ebe77673bbd83fb7d2e6c215760450987df2ded64044eccf6f34d3b" + sha256 cellar: :any_skip_relocation, sonoma: "a9c1a36fc64e71d69d5b8f118f195dba1d0ca2ad34e43db54c5ba157eb46f74a" + sha256 cellar: :any_skip_relocation, ventura: "b89f9122cd15cd5da3e03fac3b4a1c33ecd2efb325f98918c7e9e494b3bf130b" + sha256 cellar: :any_skip_relocation, monterey: "806b9fb45a9369e43e4b7f6903cc9a3b98b55c385e7e8828e6aaef556e31b620" + sha256 cellar: :any_skip_relocation, big_sur: "5647d8f3a704bd126e2b5f24237febb50989798b425147baf1d1ce1a08fbdaaa" + sha256 cellar: :any_skip_relocation, catalina: "5e2b755a970b7432fb076d787cb1777df18861832d0e4d45132fd84e4d7aea20" + sha256 cellar: :any_skip_relocation, arm64_linux: "71fba6dd634a34968c4296190c8dd7925e6a536c0a289fe97c1bb3abfe75b6ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55e3476d7bcb3d9a71fc2d192812526ad3497f17647c9d08daac16b5cbdcfea6" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "zlib" + + resource "pbf" do + url "https://download.gisgraphy.com/openstreetmap/pbf/AD.tar.bz2" + sha256 "f8decd915758139e8bff2fdae6102efa0dc695b9d1d64cc89a090a91576efda9" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + resource("pbf").stage do + system bin/"osmconvert", "AD", "-o=test.o5m" + system bin/"osmfilter", "test.o5m", + "--drop-relations", "--drop-ways", "--drop-nodes" + end + end +end diff --git a/Formula/o/osmium-tool.rb b/Formula/o/osmium-tool.rb new file mode 100644 index 0000000000000..3985abdc8c3ba --- /dev/null +++ b/Formula/o/osmium-tool.rb @@ -0,0 +1,63 @@ +class OsmiumTool < Formula + desc "Libosmium-based command-line tool for processing OpenStreetMap data" + homepage "https://osmcode.org/osmium-tool/" + url "https://github.com/osmcode/osmium-tool/archive/refs/tags/v1.18.0.tar.gz" + sha256 "5438f57043c9df05137ca4bd1b1e4a5fb1c9c8c49cb4bec43a5f1ef30ed68fb5" + license "GPL-3.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "39ab8848b7d3cd170e244d6b41e8c7f367331f25f6cf3fa32f68d64679f9a001" + sha256 cellar: :any, arm64_sequoia: "b886fcf15d6f433f85d93af8b7b5e50d28ab7d65ebf0db6fa25988fad440c248" + sha256 cellar: :any, arm64_sonoma: "5b609383ae13cdd88a464a02f49edd29eccc95dd1fa7cdb3f1f3eb217e80c259" + sha256 cellar: :any, arm64_ventura: "e91c59db15ddbd9abd1a82d3245e8673e405ee9bb4294a94802bd93785e13dd1" + sha256 cellar: :any, sonoma: "834c9965363b4920ae4d7ff2b53dafd9a9707cd489a56e5fe0b9212c8407ec24" + sha256 cellar: :any, ventura: "af40e84b8362633d1e8b37e74b89c61bddac06254ee548fed4d53d535f989043" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1d278d2df1034fbdb2e72a6fefa9e6cb7c2fe6e885040782d5179302f167b84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9866803a6ed76ff8ea79186e180b44fe9c81d3c8fbc904bbbffe5e32a90cab20" + end + + depends_on "cmake" => :build + depends_on "libosmium" => :build + depends_on "nlohmann-json" => :build + depends_on "pandoc" => :build + depends_on "protozero" => :build + depends_on "boost" + depends_on "lz4" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + protozero = Formula["protozero"].opt_include + + system "cmake", "-S", ".", "-B", "build", "-DPROTOZERO_INCLUDE_DIR=#{protozero}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.osm").write <<~XML + + + + + + + + + + + + + + + XML + + output = shell_output("#{bin}/osmium fileinfo test.osm") + assert_match(/Compression.+generator=handwritten/m, output) + system bin/"osmium", "tags-filter", "test.osm", "w/name=line", "-f", "osm" + end +end diff --git a/Formula/o/osmosis.rb b/Formula/o/osmosis.rb new file mode 100644 index 0000000000000..9904ea4ab0ca5 --- /dev/null +++ b/Formula/o/osmosis.rb @@ -0,0 +1,68 @@ +class Osmosis < Formula + desc "Command-line OpenStreetMap data processor" + homepage "https://wiki.openstreetmap.org/wiki/Osmosis" + url "https://github.com/openstreetmap/osmosis/releases/download/0.49.2/osmosis-0.49.2.tar" + sha256 "2a23a7bf7499a0727ae6987cf66fcafc03b37379dc02177c730f352bd67a0b97" + license :public_domain + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "bbf0840fce8067bb973ff59a7e9d9774178ae11b9af976aa0842e80b90264b00" + end + + depends_on "openjdk" + + # need to adjust home dir for a clean install + patch :DATA + + def install + libexec.install %w[bin/osmosis lib script] + (bin/"osmosis").write_env_script libexec/"osmosis", Language::Java.overridable_java_home_env + end + + test do + path = testpath/"test.osm" + path.write <<~XML + + + + + + + + + + + + + + + + + + XML + + system(bin/"osmosis", "--read-xml", "file=#{path}", "--write-null") + end +end + +__END__ +diff --git a/bin/osmosis b/bin/osmosis +index 04b040a..648824e 100755 +--- a/bin/osmosis ++++ b/bin/osmosis +@@ -84,6 +84,7 @@ done + # shellcheck disable=SC2034 + APP_BASE_NAME=${0##*/} + APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit ++APP_HOME="$APP_HOME/libexec" + + # Use the maximum available, or set MAX_FD != -1 to use that value. + MAX_FD=maximum diff --git a/Formula/o/ospray.rb b/Formula/o/ospray.rb new file mode 100644 index 0000000000000..69de1f49f3e29 --- /dev/null +++ b/Formula/o/ospray.rb @@ -0,0 +1,84 @@ +class Ospray < Formula + desc "Ray-tracing-based rendering engine for high-fidelity visualization" + homepage "https://www.ospray.org/" + url "https://github.com/RenderKit/ospray/archive/refs/tags/v3.2.0.tar.gz" + sha256 "2c8108df2950bc5d1bc2a62f74629233dbe4f36e3f6a8ea032907d4a3fdc6750" + license "Apache-2.0" + head "https://github.com/RenderKit/ospray.git", branch: "devel" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "37889fb9d563aaffcfd8b7fee60874967a6d4d16e10f5a9947d629f977222c1b" + sha256 cellar: :any, arm64_sequoia: "3df35dfd82214b9ee97e1a56a867d8c01c94f37537160d0e24b11b4656e94afb" + sha256 cellar: :any, arm64_sonoma: "a9aaf78d07b916b571a4d96eae5d4a570ef9bc0f63b9ec4a02a209798f425c9f" + sha256 cellar: :any, arm64_ventura: "26c886271f141447de4017c2b469488c50f4a13ecaf825971a326dbf85ab8787" + sha256 cellar: :any, sonoma: "46f203d6c6db606e4fe48a8b63da54ece1badb1c4eae09cbcd842e297f6d04c1" + sha256 cellar: :any, ventura: "9d056ad5ebb6d60a81a44e64d5042870f8efb8579ea7b7e27e4ba4dc4f1545ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c0dbef40ef62c06ac0d81fdad78b51f2c2f4a1f81dc7a5f605abedf4c75ad57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ce0ebb61c0d3a09ce6e51d886f705e306b881d289fc9bbe62abe892b144532b" + end + + depends_on "cmake" => :build + depends_on "embree" + depends_on "ispc" + depends_on "tbb" + + resource "rkcommon" do + url "https://github.com/RenderKit/rkcommon/archive/refs/tags/v1.14.0.tar.gz" + sha256 "5aef75afc8d4fccf9e70df4cbdf29a1b28b39ee51b5588b94b83a14c6a166d83" + end + + resource "openvkl" do + url "https://github.com/RenderKit/openvkl/archive/refs/tags/v2.0.1.tar.gz" + sha256 "0c7faa9582a93e93767afdb15a6c9c9ba154af7ee83a6b553705797be5f8af62" + end + + def install + # Workaround for newer `ispc` + `llvm` until support is added + inreplace "cmake/compiler/ispc.cmake", "define_ispc_isa_options(AVX512KNL avx512knl-x16)", "" + + resources.each do |r| + r.stage do + args = %W[ + -DCMAKE_INSTALL_NAME_DIR=#{lib} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DBUILD_EXAMPLES=OFF + ] + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + end + + args = %W[ + -DCMAKE_INSTALL_NAME_DIR=#{lib} + -DOSPRAY_ENABLE_APPS=OFF + -DOSPRAY_ENABLE_TESTING=OFF + -DOSPRAY_ENABLE_TUTORIALS=OFF + ] + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main(int argc, const char **argv) { + OSPError error = ospInit(&argc, argv); + assert(error == OSP_NO_ERROR); + ospShutdown(); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lospray" + system "./a.out" + end +end diff --git a/Formula/o/osqp.rb b/Formula/o/osqp.rb new file mode 100644 index 0000000000000..1e35cbfa5f275 --- /dev/null +++ b/Formula/o/osqp.rb @@ -0,0 +1,102 @@ +class Osqp < Formula + desc "Operator splitting QP solver" + homepage "https://osqp.org/" + url "https://github.com/osqp/osqp/archive/refs/tags/v1.0.0.tar.gz" + sha256 "dd6a1c2e7e921485697d5e7cdeeb043c712526c395b3700601f51d472a7d8e48" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c954c2ec86a360b05b33c2adca519d53f4b4a668ec21dd1843c0a03811239b5d" + sha256 cellar: :any, arm64_sequoia: "ccb60f0cfb872511bca80235ac7a946fa63b37a5a3dd12824225233b53da0a0c" + sha256 cellar: :any, arm64_sonoma: "5fed88abe2497775db7e0b621beb464077d9a9d17b5d78d0e02572be8baf55dc" + sha256 cellar: :any, arm64_ventura: "108db6550c4c298e1da86ebe8577727a0bd507f1889a3e2bfdf67f7aec8d24fc" + sha256 cellar: :any, sonoma: "4870c87ac958b12511c5eee404fe346a0e2d0372b379855f934533ab8e2b039b" + sha256 cellar: :any, ventura: "2de9db6218208bcce319b7ab4a6f8ce9b74af95a8571168afce565f62bbc01b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6544280d65567811ac1fa3bd1f659545a0a1e02f50ca43f946761d325818e85d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f28787efc1e418c84e3123f0364865950be5f51250246d916419ed8d53b09cd4" + end + + depends_on "cmake" => [:build, :test] + + resource "qdldl" do + url "https://github.com/osqp/qdldl/archive/refs/tags/v0.1.8.tar.gz" + sha256 "ecf113fd6ad8714f16289eb4d5f4d8b27842b6775b978c39def5913f983f6daa" + + livecheck do + url "https://raw.githubusercontent.com/osqp/osqp/refs/tags/v#{LATEST_VERSION}/algebra/_common/lin_sys/qdldl/qdldl.cmake" + regex(/GIT_TAG\s+v?(\d+(?:\.\d+)+)/i) + end + end + + def install + (buildpath/"qdldl").install resource("qdldl") + + system "cmake", "-S", ".", "-B", "build", "-DFETCHCONTENT_SOURCE_DIR_QDLDL=#{buildpath}/qdldl", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Remove unnecessary qdldl install. + rm_r(Dir[include/"qdldl", lib/"cmake/qdldl", lib/"libqdldl.a", lib/shared_library("libqdldl")]) + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0 FATAL_ERROR) + project(osqp_demo LANGUAGES C) + find_package(osqp CONFIG REQUIRED) + + add_executable(osqp_demo osqp_demo.c) + target_link_libraries(osqp_demo PRIVATE osqp::osqp -lm) + + add_executable(osqp_demo_static osqp_demo.c) + target_link_libraries(osqp_demo_static PRIVATE osqp::osqpstatic -lm) + CMAKE + + # https://github.com/osqp/osqp/blob/master/examples/osqp_simple_demo.c + (testpath/"osqp_demo.c").write <<~C + #include + #include + #include + + int main() { + OSQPFloat P_x[3] = { 4.0, 1.0, 2.0, }; + OSQPInt P_nnz = 3; + OSQPInt P_i[3] = { 0, 0, 1, }; + OSQPInt P_p[3] = { 0, 1, 3, }; + OSQPFloat q[2] = { 1.0, 1.0, }; + OSQPFloat A_x[4] = { 1.0, 1.0, 1.0, 1.0, }; + OSQPInt A_nnz = 4; + OSQPInt A_i[4] = { 0, 1, 0, 2, }; + OSQPInt A_p[3] = { 0, 2, 4, }; + OSQPFloat l[3] = { 1.0, 0.0, 0.0, }; + OSQPFloat u[3] = { 1.0, 0.7, 0.7, }; + OSQPInt n = 2; + OSQPInt m = 3; + OSQPInt exitflag; + OSQPSolver* solver = NULL; + OSQPSettings* settings = OSQPSettings_new(); + OSQPCscMatrix* P = OSQPCscMatrix_new(n, n, P_nnz, P_x, P_i, P_p); + OSQPCscMatrix* A = OSQPCscMatrix_new(m, n, A_nnz, A_x, A_i, A_p); + if (settings) { + settings->polishing = 1; + } + OSQPInt cap = osqp_capabilities(); + exitflag = osqp_setup(&solver, P, q, A, l, u, m, n, settings); + assert(exitflag == 0); + exitflag = osqp_solve(solver); + osqp_cleanup(solver); + OSQPCscMatrix_free(A); + OSQPCscMatrix_free(P); + OSQPSettings_free(settings); + return (int)exitflag; + } + C + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + system "./build/osqp_demo" + system "./build/osqp_demo_static" + end +end diff --git a/Formula/o/osrm-backend.rb b/Formula/o/osrm-backend.rb new file mode 100644 index 0000000000000..3131ef27c0292 --- /dev/null +++ b/Formula/o/osrm-backend.rb @@ -0,0 +1,101 @@ +class OsrmBackend < Formula + desc "High performance routing engine" + homepage "https://project-osrm.org/" + url "https://github.com/Project-OSRM/osrm-backend/archive/refs/tags/v6.0.0.tar.gz" + sha256 "369192672c0041600740c623ce961ef856e618878b7d28ae5e80c9f6c2643031" + license "BSD-2-Clause" + revision 1 + head "https://github.com/Project-OSRM/osrm-backend.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7afabcb88537796080ee1f3eaa0354df30da723ca2c4b5cf2b545787e5b594d4" + sha256 cellar: :any, arm64_sequoia: "45597fecad2445f084a62b520a822fa88c744094db2b0aa53dd514390d4f1bfe" + sha256 cellar: :any, arm64_sonoma: "b33746bf0d976c08101d86da981f75ab8e22c4dfbf3d30b86b249c5a672cbe87" + sha256 cellar: :any, sonoma: "9899cd1133de3c8640e37c2a8bf80de3cfdecc74a32d2d027662e1d1dd9fabc3" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ed3aeb8b1782c42cb95cdfcdad5f2253edce21476eddf3b0cb63d02671de10c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bc254ac088ca9e5ca436288840bb8398b59db6a28172f084ecec72249df9135" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "boost" + depends_on "lua" + depends_on "tbb" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + conflicts_with "flatbuffers", because: "both install flatbuffers headers" + + fails_with :gcc do + version "11" + cause <<~CAUSE + /usr/include/c++/11/type_traits:987:52: error: static assertion failed: template argument must be a complete class or an unbounded array + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + CAUSE + end + + # Fix build with Boost 1.89.0, pr ref: https://github.com/Project-OSRM/osrm-backend/pull/7220 + patch do + url "https://github.com/Project-OSRM/osrm-backend/commit/5cea5057eb766a19fbecb68e7392e42589ce1d46.patch?full_index=1" + sha256 "51f4f089e6e29264e905661e8cf78e4707af6e004de4a2fba22c914d1c399ff5" + end + + def install + lua = Formula["lua"] + luaversion = lua.version.major_minor + + system "cmake", "-S", ".", "-B", "build", + "-DENABLE_CCACHE:BOOL=OFF", + "-DLUA_INCLUDE_DIR=#{lua.opt_include}/lua#{luaversion}", + "-DLUA_LIBRARY=#{lua.opt_lib/shared_library("liblua", luaversion.to_s)}", + "-DENABLE_GOLD_LINKER=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "profiles" + end + + test do + node1 = 'visible="true" version="1" changeset="676636" timestamp="2008-09-21T21:37:45Z"' + node2 = 'visible="true" version="1" changeset="323878" timestamp="2008-05-03T13:39:23Z"' + node3 = 'visible="true" version="1" changeset="323878" timestamp="2008-05-03T13:39:23Z"' + + (testpath/"test.osm").write <<~XML + + + + + + + + + + + + + XML + + (testpath/"tiny-profile.lua").write <<~LUA + function way_function (way, result) + result.forward_mode = mode.driving + result.forward_speed = 1 + end + LUA + + safe_system bin/"osrm-extract", "test.osm", "--profile", "tiny-profile.lua" + safe_system bin/"osrm-contract", "test.osrm" + assert_path_exists testpath/"test.osrm.names", "osrm-extract generated no output!" + end +end diff --git a/Formula/o/osslsigncode.rb b/Formula/o/osslsigncode.rb new file mode 100644 index 0000000000000..73f4d6adb0f0a --- /dev/null +++ b/Formula/o/osslsigncode.rb @@ -0,0 +1,55 @@ +class Osslsigncode < Formula + desc "OpenSSL based Authenticode signing for PE/MSI/Java CAB files" + homepage "https://github.com/mtrojnar/osslsigncode" + url "https://github.com/mtrojnar/osslsigncode/archive/refs/tags/2.10.tar.gz" + sha256 "2a864e6127ee2350fb648070fa0d459c534ac6400ca0048886aeab7afb250f65" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f9f2a1dee5f24e89a1033fd5349047de93a95dbe2919108656d67d8da9e8bc8" + sha256 cellar: :any, arm64_sequoia: "fd8ad32f52ef057d933f19cbbc7079921473b57b535614844f3960740c98581a" + sha256 cellar: :any, arm64_sonoma: "1541f1c9e846fcdf5498891da0059be1a1ba9146a6a07f66dc02ccdd4c34a423" + sha256 cellar: :any, arm64_ventura: "acca14fc721a4925e89c4ef30296cb603df30c8293d1f780fa23ec441b4bbcf9" + sha256 cellar: :any, sonoma: "9fee24489fda92fc14e53f27973119ac57f4f05c7f91595cd675cb399e405131" + sha256 cellar: :any, ventura: "08ebace710cd6560aa21bcd1112b516fd8a1513c58c9b18cb4e5a5f005bd2f3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9c903cc86a4244f0c4bc172167b25646cc1b0342c27a0488aa9ab019aa030f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97b07e1b0a71e98cac6810f3383533a908ec6349c7d2d54df23f21631ddeadfb" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "python" + uses_from_macos "zlib" + + # Fix permission issue when installing bash completionn + patch :DATA + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bash_completion.install "osslsigncode.bash" => "osslsigncode" + end + + test do + # Requires Windows PE executable as input, so we're just showing the version + assert_match "osslsigncode", shell_output("#{bin}/osslsigncode --version") + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2ffeb4e..7e2bc01 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,6 @@ include(FindCURL) + + # load CMake project modules + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") +-include(SetBashCompletion) + include(FindHeaders) + + # define the target diff --git a/Formula/o/ossp-uuid.rb b/Formula/o/ossp-uuid.rb new file mode 100644 index 0000000000000..a53e7c42befb2 --- /dev/null +++ b/Formula/o/ossp-uuid.rb @@ -0,0 +1,69 @@ +class OsspUuid < Formula + desc "ISO-C API and CLI for generating UUIDs" + homepage "http://www.ossp.org/pkg/lib/uuid/" + url "https://deb.debian.org/debian/pool/main/o/ossp-uuid/ossp-uuid_1.6.2.orig.tar.gz" + sha256 "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0" + license "BSD-1-Clause" + revision 2 + + livecheck do + url "https://deb.debian.org/debian/pool/main/o/ossp-uuid/" + regex(/href=["']?ossp-uuid[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d25ab2444dc60f7fec95cbdc75fee7b6594071e0cb203fd395e6fe29fefae1db" + sha256 cellar: :any, arm64_sequoia: "54fe9ac592343b06d7ce62e286cf0afd06f90be6c9aebd779102403c51cd55ea" + sha256 cellar: :any, arm64_sonoma: "54b71284924df66d47fb0544f6a20c058e4118b0b6c7e4e25938a9e5db0b19f9" + sha256 cellar: :any, arm64_ventura: "3285f1a05e275068e1c5aee7036066c23859b53f56fff5795e08cf18cd6d4d75" + sha256 cellar: :any, arm64_monterey: "09aff0ba17ad31b748e80e71d1138b457798a9bff6cb101750343b47f9db06d9" + sha256 cellar: :any, arm64_big_sur: "e0ce19ff28fdcdd2f39dfc8706124f4d9b75e5fc3865ba2fc17c1de2fb9b9f29" + sha256 cellar: :any, sonoma: "f1055cbbeef1485ae007d2a71818cfb7f2a3b1e4a4cb6e7d69f7bf79796dfaf5" + sha256 cellar: :any, ventura: "be5ba7669ab915635b5d56d6bccfbaf39f6706acb66329e1ad194177eae2cb5b" + sha256 cellar: :any, monterey: "46c913bd5d404f0ea9dc7467a072ddf3d29f64dff75bfa4527476a5ed67ffd87" + sha256 cellar: :any, big_sur: "610cf9d70494965c79a4f1fc39a7b9e2854efa0e69fdd152cf54485e2d6b7958" + sha256 cellar: :any, catalina: "fd727fb38c48eda8d6bcb36be17e281b2152a54144298d39cab50ec7743e8a95" + sha256 cellar: :any_skip_relocation, arm64_linux: "d085b0474a2dce5f3e7c587c3fdce4c41a1ae312c5f75657494f69dab899bd8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec70863fae3001fc9281f76cef9ac231bd6dbb957c6382457a5848312ee1f1b0" + end + + on_linux do + conflicts_with "util-linux", because: "both install `uuid.3` file" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # upstream ticket: http://cvs.ossp.org/tktview?tn=200 + # pkg-config --cflags uuid returns the wrong directory since we override the + # default, but uuid.pc.in does not use it + inreplace "uuid.pc.in" do |s| + s.gsub!(/^(exec_prefix)=\$\{prefix\}$/, '\1=@\1@') + s.gsub! %r{^(includedir)=\$\{prefix\}/include$}, '\1=@\1@' + s.gsub! %r{^(libdir)=\$\{exec_prefix\}/lib$}, '\1=@\1@' + end + + args = %W[ + --includedir=#{include}/ossp + --without-perl + --without-php + --without-pgsql + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"uuid-config", "--version" + end +end diff --git a/Formula/o/osv-scanner.rb b/Formula/o/osv-scanner.rb new file mode 100644 index 0000000000000..d21f4760ac0f2 --- /dev/null +++ b/Formula/o/osv-scanner.rb @@ -0,0 +1,40 @@ +class OsvScanner < Formula + desc "Vulnerability scanner which uses the OSV database" + homepage "https://github.com/google/osv-scanner" + url "https://github.com/google/osv-scanner/archive/refs/tags/v2.2.4.tar.gz" + sha256 "db34604f20a14cba7f383977495830020edf2ef296b09effb272c96e38de5687" + license "Apache-2.0" + head "https://github.com/google/osv-scanner.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "537cda9611a2fcac65592a48e199e7ba92a23675821490d9334e09478da7f09d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e0842d2ab6e9376ab491daebf98a41687c01547ee2795aaa1073683192b6a5d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5636eab8afc76959b3faf0affe674b5dadf6cabf5af739e161ef31ca641cb087" + sha256 cellar: :any_skip_relocation, sonoma: "ed1a4ccac39b29d585c4213e61ae24732ad8c06af4332447ec4db3934e465eec" + sha256 cellar: :any_skip_relocation, arm64_linux: "629e7b5a861d1e074cd704ee777f09edc492fe4553511562f1cc74fcc2bd8f12" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7158d5a448a1b756fa0a16584d7973ab6ccb75c0a9a0bc284efa0523836c3dbc" + end + + depends_on "go" => [:build, :test] + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/osv-scanner" + end + + test do + (testpath/"go.mod").write <<~GOMOD + module my-library + + require ( + github.com/BurntSushi/toml v1.0.0 + ) + GOMOD + + scan_output = shell_output("#{bin}/osv-scanner --lockfile #{testpath}/go.mod").strip + expected_output = <<~EOS.chomp + Scanned #{testpath}/go.mod file and found 1 package + No issues found + EOS + assert_equal expected_output, scan_output + end +end diff --git a/Formula/o/osx-cpu-temp.rb b/Formula/o/osx-cpu-temp.rb new file mode 100644 index 0000000000000..96b7a8aa62cff --- /dev/null +++ b/Formula/o/osx-cpu-temp.rb @@ -0,0 +1,34 @@ +class OsxCpuTemp < Formula + desc "Outputs current CPU temperature for OSX" + homepage "https://github.com/lavoiesl/osx-cpu-temp" + url "https://github.com/lavoiesl/osx-cpu-temp/archive/refs/tags/1.1.0.tar.gz" + sha256 "94b90ce9a1c7a428855453408708a5557bfdb76fa45eef2b8ded4686a1558363" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c7b0f3f1f33e64d4cacb4b5b8d5a7454fc23338f15caa577658ef1e0b7f3026d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1484688d7c45ad319e94d86b098150df1a028fb85b93591664a8f5c839a1383" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "50aa80f9561f2a41d78f87f5ba9998a406b3865d5bc61fcea208ead214149c64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5189807136b9dce5f62994ea3451ab91f560fcdd665e35f50387c19667af17d4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "49df01d45be6aa2740ee6e4be207d34586eb84626610fdd53c723d4e071e4f77" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d072b980bb252ce0c91fbfafdbcf20f0119d003cbfe35779c78fc262fec8a509" + sha256 cellar: :any_skip_relocation, sonoma: "6dac01ceb80b82ad667893555703aa9ef19b1ee8c86e4d03485d94e4e02d7824" + sha256 cellar: :any_skip_relocation, ventura: "9ee650236f7418567dc7544586870cd82902ebe42572df55c0170c5e22c38d44" + sha256 cellar: :any_skip_relocation, monterey: "734f1c9e1d3e8486d862fc2186ba476807d3a8da54c5cb673d6ca3c29db59b09" + sha256 cellar: :any_skip_relocation, big_sur: "d4bcaab258eb1c75078e767a24c615bc82274e672ce6fd15c2a766b0b0bd8a46" + sha256 cellar: :any_skip_relocation, catalina: "e1df41402ed817941f591a5cc094fe4491b092de8d5177dd363eccecff811bec" + end + + depends_on :macos + + def install + system "make" + bin.install "osx-cpu-temp" + end + + test do + assert_match "°C", shell_output("#{bin}/osx-cpu-temp -C") + end +end diff --git a/Formula/o/osx-trash.rb b/Formula/o/osx-trash.rb new file mode 100644 index 0000000000000..340cbc8d5add3 --- /dev/null +++ b/Formula/o/osx-trash.rb @@ -0,0 +1,36 @@ +class OsxTrash < Formula + desc "Allows trashing of files instead of tempting fate with rm" + homepage "https://github.com/morgant/tools-osx#trash" + url "https://github.com/morgant/tools-osx/archive/refs/tags/trash-0.7.1.tar.gz" + sha256 "9ac54a5eb87c4c6a71568256c0e29094a913f2adf538fb2c504f6c8b1f63be12" + license "MIT" + head "https://github.com/morgant/tools-osx.git", branch: "master" + + livecheck do + url :stable + regex(/^trash[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "1ff2a7e4c4d9e83a5cf38815cbbae8407295d8c830d85211677d6041add46bfa" + end + + keg_only :shadowed_by_macos + + depends_on :macos + + conflicts_with "macos-trash", because: "both install a `trash` binary" + conflicts_with "trash-cli", because: "both install a `trash` binary" + conflicts_with "trash", because: "both install a `trash` binary" + + def install + bin.install "src/trash" + end + + test do + # Direct execution would trigger accessibility permissions, failing CI. + assert_match "v#{version}", shell_output("strings #{bin}/trash") + end +end diff --git a/Formula/o/osxutils.rb b/Formula/o/osxutils.rb new file mode 100644 index 0000000000000..5398adfdadbd9 --- /dev/null +++ b/Formula/o/osxutils.rb @@ -0,0 +1,39 @@ +class Osxutils < Formula + desc "Collection of macOS command-line utilities" + homepage "https://github.com/specious/osxutils" + url "https://github.com/specious/osxutils/archive/refs/tags/v1.9.0.tar.gz" + sha256 "9c11d989358ed5895d9af7644b9295a17128b37f41619453026f67e99cb7ecab" + license "GPL-2.0-or-later" + head "https://github.com/specious/osxutils.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a45395a57ca736e18ff87ce1f5e6d6a1f125a56957b26680ccb93e2611a9784b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "740ef31720ead876a8af81736ee00b5e74e29c0e77b84c7d9702cc6c7460f6c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9fedf0f63481a28280cbca3c4f9aaa8a9d1cae884e4287290c80d5376108aea8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b0ede5abb14b36d57990316d9f77a47af1ba28bf3b11b908d0da7a5d2672e5c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ba6b55b6d292736fcc636f2afdc9f36e357ff2c4634936a1c357ab292b7e7817" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c5d4050cda7e5ede43231c7195ffa1eb06bf5e3b5a1efa6acf8243a0e8ee424a" + sha256 cellar: :any_skip_relocation, sonoma: "ee76c0bc782077f10bc0ac79076f6bf37f99411cacba2f4bb45fd2fcafa6002e" + sha256 cellar: :any_skip_relocation, ventura: "1a2be836a80538dedfc42b2c0143a284c7ecc2c6b635815b52bb9f9f91dd8a59" + sha256 cellar: :any_skip_relocation, monterey: "7fdfadc1766c5cc042a64798dcc7aa4093bcb8e2abe4c0b7146f6564288282aa" + sha256 cellar: :any_skip_relocation, big_sur: "499d88a58e5ab8ed2fc23e8ef3bd9234849a3d9df34b0c6bdae4b425be70d97b" + sha256 cellar: :any_skip_relocation, catalina: "95f394fa7721dc587b75adcb0a698c32858bfabf04bb569b6bf6ab0d7f52fb03" + end + + depends_on :macos + + def install + # workaround for newer clang + # upstream bug report, https://github.com/specious/osxutils/issues/11 + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1403 + + system "make" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + assert_match "osxutils", shell_output(bin/"osxutils") + end +end diff --git a/Formula/o/otel-cli.rb b/Formula/o/otel-cli.rb new file mode 100644 index 0000000000000..1997aecbbc8e9 --- /dev/null +++ b/Formula/o/otel-cli.rb @@ -0,0 +1,33 @@ +class OtelCli < Formula + desc "Tool for sending events from shell scripts & similar environments" + homepage "https://github.com/equinix-labs/otel-cli" + url "https://github.com/equinix-labs/otel-cli/archive/refs/tags/v0.4.5.tar.gz" + sha256 "331a76783974318a31d9ab06e3f05af488e0ede3cce989f8d1b634450a345536" + license "Apache-2.0" + head "https://github.com/equinix-labs/otel-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7c6c809c63d335d997e8f794037c3188bf3d5bf1eca2e2a1a533e78616b0eb80" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ae87c2f9fafe21f6f99739e0d86b3e0f1d70bb75c355e434f911d58150e1f01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ae87c2f9fafe21f6f99739e0d86b3e0f1d70bb75c355e434f911d58150e1f01" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9ae87c2f9fafe21f6f99739e0d86b3e0f1d70bb75c355e434f911d58150e1f01" + sha256 cellar: :any_skip_relocation, sonoma: "8184d3d001f134321d8d3ceb6ea5b29d61bf134b189ae9206e275010a0f9c6c8" + sha256 cellar: :any_skip_relocation, ventura: "8184d3d001f134321d8d3ceb6ea5b29d61bf134b189ae9206e275010a0f9c6c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "9825db7c6bd24d790f1270d5f2aadd3c9e96472743016f216554caccbec5edff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb6e8b16d5493b5443bced5761cfeed0322e32d2cb043f83ac4626e5c80a4d22" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"otel-cli", "completion") + end + + test do + output = shell_output("#{bin}/otel-cli status") + assert_equal "otel-cli", JSON.parse(output)["config"]["service_name"] + end +end diff --git a/Formula/o/oterm.rb b/Formula/o/oterm.rb new file mode 100644 index 0000000000000..5dd0a915bde49 --- /dev/null +++ b/Formula/o/oterm.rb @@ -0,0 +1,393 @@ +class Oterm < Formula + include Language::Python::Virtualenv + + desc "Terminal client for Ollama" + homepage "https://github.com/ggozad/oterm" + url "https://files.pythonhosted.org/packages/6f/a1/a3b7d3bc10370028087844181d85c2b4360a64f4e0844263244e27f22cfe/oterm-0.14.6.tar.gz" + sha256 "5037b5691e3bc1d77e42c308bee5781c229fff9826c913230a22bf3a05d919b1" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ed72730c035c918b920fe2a8e07b990b9aeeea934e1aa4ff4a89cd5513171a86" + sha256 cellar: :any, arm64_sequoia: "0038042b89a4d70766eac070b8791fa666bbb60f39205ead25ae00411e75ba7d" + sha256 cellar: :any, arm64_sonoma: "40be393f7af8cd6f5c12d78633923e3b8d3c58ca8c960209af227c88c4110cc7" + sha256 cellar: :any, sonoma: "08a021b7eade36b78f561b765125382b42bcda4f2ae004cb4b49585c0740a78f" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc62a62602bd072c8e450cf09a8936337ce9b3cc83fb9e7590ec1dc892714f2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ec845e47def91168a2ee5790d3680de8ba6d37338b6db9d3a353e1a77defcaf" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build # for textual_speedups + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pillow" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "zlib" + + pypi_packages exclude_packages: %w[certifi cryptography pillow pydantic-core rpds-py] + + resource "aiosql" do + url "https://files.pythonhosted.org/packages/98/3a/105cdf480d444ee059f3fbea65616fba006fba29d32e382fb1a4d947f4b7/aiosql-13.4.tar.gz" + sha256 "da6ebb4d5e735753853007a7d574e60761338fc6ca8d95d6d95b5d85d7b1354d" + end + + resource "aiosqlite" do + url "https://files.pythonhosted.org/packages/13/7d/8bca2bf9a247c2c5dfeec1d7a5f40db6518f88d314b8bca9da29670d2671/aiosqlite-0.21.0.tar.gz" + sha256 "131bb8056daa3bc875608c631c678cda73922a2d4ba8aec373b19f18c17e7aa3" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/cd/3f/1d3bbd0bf23bdd99276d4def22f29c27a914067b4cf66f753ff9b8bbd0f3/authlib-1.6.5.tar.gz" + sha256 "6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "cyclopts" do + url "https://files.pythonhosted.org/packages/8a/51/a67b17fac2530d22216a335bd10f48631412dd824013ea559ec236668f76/cyclopts-4.2.1.tar.gz" + sha256 "49bb4c35644e7a9658f706ade4cf1a9958834b2dca4425e2fafecf8a0537fac7" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "docstring-parser" do + url "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz" + sha256 "583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "email-validator" do + url "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz" + sha256 "9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426" + end + + resource "exceptiongroup" do + url "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz" + sha256 "b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88" + end + + resource "fastmcp" do + url "https://files.pythonhosted.org/packages/00/a6/e3b46cd3e228635e0064c2648788b6f66a53bf0d0ddbf5fb44cca951f908/fastmcp-2.12.5.tar.gz" + sha256 "2dfd02e255705a4afe43d26caddbc864563036e233dbc6870f389ee523b39a6a" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-path" do + url "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz" + sha256 "8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "lazy-object-proxy" do + url "https://files.pythonhosted.org/packages/08/a2/69df9c6ba6d316cfd81fe2381e464db3e6de5db45f8c43c6a23504abf8cb/lazy_object_proxy-1.12.0.tar.gz" + sha256 "1f5a462d92fd0cfb82f1fab28b51bfb209fabbe6aabf7f0d51472c0c124c0c61" + end + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/3d/a1/b1f328da3b153683d2ec34f849b4b6eac2790fb240e3aef06ff2fab3df9d/mcp-1.16.0.tar.gz" + sha256 "39b8ca25460c578ee2cdad33feeea122694cfdf73eef58bee76c42f6ef0589df" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "ollama" do + url "https://files.pythonhosted.org/packages/72/62/a36be4555e4218d6c8b35e72e0dfe0823845400097275cd81c9aec4ddf39/ollama-0.5.4.tar.gz" + sha256 "75857505a5d42e5e58114a1b78cc8c24596d8866863359d8a2329946a9b6d6f3" + end + + resource "openapi-core" do + url "https://files.pythonhosted.org/packages/b1/35/1acaa5f2fcc6e54eded34a2ec74b479439c4e469fc4e8d0e803fda0234db/openapi_core-0.19.5.tar.gz" + sha256 "421e753da56c391704454e66afe4803a290108590ac8fa6f4a4487f4ec11f2d3" + end + + resource "openapi-pydantic" do + url "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz" + sha256 "ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d" + end + + resource "openapi-schema-validator" do + url "https://files.pythonhosted.org/packages/8b/f3/5507ad3325169347cd8ced61c232ff3df70e2b250c49f0fe140edb4973c6/openapi_schema_validator-0.6.3.tar.gz" + sha256 "f37bace4fc2a5d96692f4f8b31dc0f8d7400fd04f3a937798eaf880d425de6ee" + end + + resource "openapi-spec-validator" do + url "https://files.pythonhosted.org/packages/82/af/fe2d7618d6eae6fb3a82766a44ed87cd8d6d82b4564ed1c7cfb0f6378e91/openapi_spec_validator-0.7.2.tar.gz" + sha256 "cc029309b5c5dbc7859df0372d55e9d1ff43e96d678b9ba087f7c56fc586f734" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "parse" do + url "https://files.pythonhosted.org/packages/4f/78/d9b09ba24bb36ef8b83b71be547e118d46214735b6dfb39e4bfde0e9b9dd/parse-1.20.2.tar.gz" + sha256 "b41d604d16503c79d81af5165155c0b20f6c8d6c559efa66b4b695c3e5a0a0ce" + end + + resource "pathable" do + url "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz" + sha256 "6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rfc3339-validator" do + url "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" + sha256 "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-rst" do + url "https://files.pythonhosted.org/packages/bc/6d/a506aaa4a9eaa945ed8ab2b7347859f53593864289853c5d6d62b77246e0/rich_rst-1.3.2.tar.gz" + sha256 "a1196fdddf1e364b02ec68a05e8ff8f6914fee10fbca2e6b6735f166bb0da8d4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/db/3c/fa6517610dc641262b77cc7bf994ecd17465812c1b0585fe33e11be758ab/sse_starlette-3.0.3.tar.gz" + sha256 "88cfb08747e16200ea990c8ca876b03910a23b547ab3bd764c0d8eb81019b971" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "terminaltexteffects" do + url "https://files.pythonhosted.org/packages/9d/92/0eb3f0ad206bf449b7db75f061202dce27d8cb90e598ce3c7d32c0bd80b9/terminaltexteffects-0.12.2.tar.gz" + sha256 "4a5eef341d538743e7ac4341cd74d47afc9d0345acdad330ed03fd0a72e41f5f" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/a2/30/38b615f7d4b16f6fdd73e4dcd8913e2d880bbb655e68a076e3d91181a7ee/textual-6.2.1.tar.gz" + sha256 "4699d8dfae43503b9c417bd2a6fb0da1c89e323fe91c4baa012f9298acaa83e1" + end + + resource "textual-image" do + url "https://files.pythonhosted.org/packages/f7/3e/807c5a449e9d99ba3b860acf5b83cf1da7ac46477bfe0e9e4d0149b8ed90/textual_image-0.8.4.tar.gz" + sha256 "d13f960da07659cfac9d9e417ca7057b3ac0c17a7827ae8e47c3b164d43776fc" + end + + resource "textual-speedups" do + url "https://files.pythonhosted.org/packages/ad/fa/979584993986defcf788e25ef46e2fe19a510ffe4aaabc5e706759e080c4/textual_speedups-0.2.0.tar.gz" + sha256 "e9e045e94b7daff79917f4fc699c6d99db6005559298929141d68a1293c3cc6d" + end + + resource "textualeffects" do + url "https://files.pythonhosted.org/packages/64/0e/8307b9349f79d42666e46e936d31d0224e47c8e9dac572c2585e0fa517eb/textualeffects-0.1.4.tar.gz" + sha256 "86709321d49cd7abf47ed513782130174e6f5d85ea16996a7c38709c3646c463" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/1d/3e/30bff313f4868538330c6254bbbe178d6143e43c6f3e7a34788d381f701c/typer-0.17.5.tar.gz" + sha256 "a6fe2d187feb1b4a10322b910267b6339e4cc98257fae34d22299a47eac704f1" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/32/af/d4502dc713b4ccea7175d764718d5183caf8d0867a4f0190d5d4a45cea49/werkzeug-3.1.1.tar.gz" + sha256 "8cd39dfbdfc1e051965f156163e2974e52c210f130810e9ad36858f0fd3edad4" + end + + def install + # `shellingham` auto-detection doesn't work in Homebrew CI build environment so + # defer installation to allow `typer` to use argument as shell for completions + # Ref: https://typer.tiangolo.com/features/#user-friendly-cli-apps + venv = virtualenv_install_with_resources without: "shellingham" + generate_completions_from_executable(bin/"oterm", "--show-completion") + venv.pip_install resource("shellingham") + end + + test do + assert_match version.to_s, shell_output("#{bin}/oterm --version") + assert_match "EnvConfig", shell_output("#{bin}/oterm --config") + end +end diff --git a/Formula/o/otf2.rb b/Formula/o/otf2.rb new file mode 100644 index 0000000000000..c5e0b31f6c3ad --- /dev/null +++ b/Formula/o/otf2.rb @@ -0,0 +1,107 @@ +class Otf2 < Formula + desc "Open Trace Format 2 file handling library" + homepage "https://www.vi-hps.org/projects/score-p/overview/overview.html" + url "https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-3.1.1/otf2-3.1.1.tar.gz" + sha256 "5a4e013a51ac4ed794fe35c55b700cd720346fda7f33ec84c76b86a5fb880a6e" + license "BSD-3-Clause" + + livecheck do + url "https://www.vi-hps.org/projects/score-p/download/download.html" + regex(/href=.*?otf2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "0699ada7968a7a8bac23d0a2e120d325e36f8a0aeb5637b91fb71acacfdc05ff" + sha256 arm64_sequoia: "a62f6852a4714aee63e80f10cfdd27b008c4ff5984d8a3e859baeacbc08dc42f" + sha256 arm64_sonoma: "3472c030be39bc7430179ae6d1028d4ac3539e9229dee0d86a4f95077ef898f4" + sha256 sonoma: "a1d4ee581094663d2042211869b0ad1009d7213a3df6b51d7152d2a855a4aeef" + sha256 arm64_linux: "a92b2db2f4624d69504d3cc37d88e25553ccd507e2b2b4abc1e248e1147a2523" + sha256 x86_64_linux: "966abf2c53bb4dd7f566b972e2b1c7defb27e37bdd0b5771b6acec6fc8752fe4" + end + + depends_on "python-setuptools" => :build + depends_on "sphinx-doc" => :build + depends_on "open-mpi" + depends_on "python@3.14" + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + directory "build-frontend" + end + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + directory "build-backend" + end + + def python3 + "python3.14" + end + + def install + resource("six").stage do + system python3, "-m", "pip", "install", *std_pip_args(prefix: libexec), "." + end + + ENV.prepend_path "PYTHONPATH", libexec/Language::Python.site_packages(python3) + ENV["PYTHON"] = which(python3) + ENV["SPHINX"] = Formula["sphinx-doc"].opt_bin/"sphinx-build" + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + + inreplace pkgshare/"otf2.summary", "#{Superenv.shims_path}/", "" + end + + def caveats + <<~EOS + To use the Python bindings, you will need to have the six library. + One option is to use the bundled copy through your PYTHONPATH, e.g. + export PYTHONPATH=#{opt_libexec/Language::Python.site_packages(python3)} + EOS + end + + test do + cp_r share/"doc/otf2/examples", testpath + workdir = testpath/"examples" + chdir "#{testpath}/examples" do + # build serial tests + system "make", "serial", "mpi", "pthread" + %w[ + otf2_mpi_reader_example + otf2_mpi_reader_example_cc + otf2_mpi_writer_example + otf2_pthread_writer_example + otf2_reader_example + otf2_writer_example + ].each { |p| assert_path_exists workdir/p } + system "./otf2_writer_example" + assert_path_exists workdir/"ArchivePath/ArchiveName.otf2" + system "./otf2_reader_example" + rm_r("./ArchivePath") + system Formula["open-mpi"].opt_bin/"mpirun", "-n", "2", "./otf2_mpi_writer_example" + assert_path_exists workdir/"ArchivePath/ArchiveName.otf2" + 2.times do |n| + assert_path_exists workdir/"ArchivePath/ArchiveName/#{n}.evt" + end + system Formula["open-mpi"].opt_bin/"mpirun", "-n", "2", "./otf2_mpi_reader_example" + system "./otf2_reader_example" + rm_r("./ArchivePath") + system "./otf2_pthread_writer_example" + assert_path_exists workdir/"ArchivePath/ArchiveName.otf2" + system "./otf2_reader_example" + end + + ENV.prepend_path "PYTHONPATH", libexec/Language::Python.site_packages(python3) + system python3, "-c", "import otf2" + end +end diff --git a/Formula/o/otf2bdf.rb b/Formula/o/otf2bdf.rb new file mode 100644 index 0000000000000..d5597702524fc --- /dev/null +++ b/Formula/o/otf2bdf.rb @@ -0,0 +1,56 @@ +class Otf2bdf < Formula + desc "OpenType to BDF font converter" + homepage "https://github.com/jirutka/otf2bdf" + url "https://github.com/jirutka/otf2bdf/archive/refs/tags/v3.1_p1.tar.gz" + version "3.1_p1" + sha256 "deb1590c249edf11dda1c7136759b59207ea0ac1c737e1c2d68dedf87c51716e" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(?:[._-]?p\d+)?)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5a8a13d81081f27e6115aa7096839a6db582bc96ac1aacfea9fb19607214d629" + sha256 cellar: :any, arm64_sequoia: "51d176016f0bb1ef87c844b246d9f733e594314fb7fbc19f7a2a4bbae330cf6a" + sha256 cellar: :any, arm64_sonoma: "deb8ebe605b3723509213f415b25315efbc0fb1e72ad3866cabec7830b523894" + sha256 cellar: :any, arm64_ventura: "a68522af5768c71394633ec7f1d347191d638fc89676d0d91f72fc4c95bb13f5" + sha256 cellar: :any, sonoma: "aa6b56b8934b71fca2d22699b41a11d6375f85afdd4325d9edf6529301796a21" + sha256 cellar: :any, ventura: "00c0aac1e143142550d43ababffa8551fdec3c31903fc08cb8ac130875a7f5b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0978c8ced64cd766bbbb7bfe4fbbfd1855f3f872d17628d15c5221409b01ce8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed108fc68b1333987e18c32c6ea67add776ce92b913b80e6c1a1af3af7be847b" + end + + depends_on "freetype" + + resource "test-font" do + on_linux do + url "https://raw.githubusercontent.com/paddykontschak/finder/master/fonts/LucidaGrande.ttc" + sha256 "e188b3f32f5b2d15dbf01e9b4480fed899605e287516d7c0de6809d8e7368934" + end + end + + def install + chmod 0755, "mkinstalldirs" + + # `otf2bdf.c` uses `#include `, not ``, + # so freetype2 must be put into the search path. + ENV.append "CFLAGS", "-I#{Formula["freetype"].opt_include}/freetype2" + + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + if OS.mac? + assert_match "MacRoman", shell_output("#{bin}/otf2bdf -et /System/Library/Fonts/LucidaGrande.ttc") + else + resource("test-font").stage do + assert_match "MacRoman", shell_output("#{bin}/otf2bdf -et LucidaGrande.ttc") + end + end + end +end diff --git a/Formula/o/otree.rb b/Formula/o/otree.rb new file mode 100644 index 0000000000000..b84ac5d1b5428 --- /dev/null +++ b/Formula/o/otree.rb @@ -0,0 +1,48 @@ +class Otree < Formula + desc "Command-line tool to view objects (JSON/YAML/TOML) in TUI tree widget" + homepage "https://github.com/fioncat/otree" + url "https://github.com/fioncat/otree/archive/refs/tags/v0.6.2.tar.gz" + sha256 "d5126b1231b00fe6c8bfb0ecb94e86d328090c1e33261922f54e79ef647aed42" + license "MIT" + head "https://github.com/fioncat/otree.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "070383b2ad8b2b17ccd07adda9dd8a9ffd42cf6119b1121cf1b101f5cfd9ea65" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e98f56da2d412f904d0f2347b564cf20549d66774c13323436ab17f717586dee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28645d521c25e5e5af441c9687a5fd679604f5022ff5ee5dab5c3b3634920dcb" + sha256 cellar: :any_skip_relocation, sonoma: "3517c4662dac362d9d4ac5cb9664d63734ce34abf5e3737cea40d13b04bae240" + sha256 cellar: :any_skip_relocation, arm64_linux: "355722ce7ba99f421e9d93548f17cd069783a65da83459af03e8618f02183459" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c39bfd0c7e3620313ab2dbc454545c11348230876390d443fb4e22d0be25a167" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"example.json").write <<~JSON + { + "string": "Hello, World!", + "number": 12345, + "float": 123.45 + } + JSON + require "pty" + r, w, pid = PTY.spawn("#{bin}/otree example.json") + r.winsize = [36, 120] + sleep 1 + w.write "q" + begin + output = r.read + assert_match "Hello, World!", output + assert_match "12345", output + assert_match "123.45", output + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/o/ots.rb b/Formula/o/ots.rb new file mode 100644 index 0000000000000..a90301bc1d036 --- /dev/null +++ b/Formula/o/ots.rb @@ -0,0 +1,36 @@ +class Ots < Formula + desc "Share end-to-end encrypted secrets with others via a one-time URL" + homepage "https://ots.sniptt.com" + url "https://github.com/sniptt-official/ots/archive/refs/tags/v0.3.1.tar.gz" + sha256 "09f0b0d7ca44ec8414dbf631009df8c00f4750247c0f9ba25a32f0aa270e09cc" + license "Apache-2.0" + head "https://github.com/sniptt-official/ots.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "863f6b44db75599b901949d6c8b3db28eee7457981a8d5d45a0566c1b4fa5ab3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c078703b06ed8d14bc91d73307528444a9fdbac4b30b36db115fd3936792da45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c078703b06ed8d14bc91d73307528444a9fdbac4b30b36db115fd3936792da45" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c078703b06ed8d14bc91d73307528444a9fdbac4b30b36db115fd3936792da45" + sha256 cellar: :any_skip_relocation, sonoma: "89e6c1a577e7d626108516f4fbb8c8019d8c48fb7306fe87ba215bb5c9731f95" + sha256 cellar: :any_skip_relocation, ventura: "89e6c1a577e7d626108516f4fbb8c8019d8c48fb7306fe87ba215bb5c9731f95" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba9ee98fbea6eaaf808e2d1e281498f94d88662210f3e5ac5a6d98226afdb7b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1885731e0d68230f49366c27402326fdba9697f5ee4ced9ae0affda0127b1a88" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/sniptt-official/ots/build.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"ots", "completion") + end + + test do + output = shell_output("#{bin}/ots --version") + assert_match "ots version #{version}", output + + error_output = shell_output("#{bin}/ots new -x 900h 2>&1", 1) + assert_match "Error: expiry must be less than 7 days", error_output + end +end diff --git a/Formula/o/ott.rb b/Formula/o/ott.rb new file mode 100644 index 0000000000000..e803b63eba8dd --- /dev/null +++ b/Formula/o/ott.rb @@ -0,0 +1,50 @@ +class Ott < Formula + desc "Tool for writing definitions of programming languages and calculi" + homepage "https://www.cl.cam.ac.uk/~pes20/ott/" + url "https://github.com/ott-lang/ott/archive/refs/tags/0.34.tar.gz" + sha256 "c14899fb9f9627f96fcde784829b53c014f4cd2e7633a697ac485ecb9ab8abd6" + license "BSD-3-Clause" + head "https://github.com/ott-lang/ott.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f26fa61413c7091e27399e1d844a24ac94b69f00805eb6b3f6d9fcd416d90839" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d045d9324681cbb59888db4b0f47cde465b9777faa3ead91b4dafc748698a55a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e64b4f53bc4b32c5c2300ca5e6b4ddc9f336cfc10e9b40561c00433758fd9a6b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da33fd1e6bfc151dbc8f8f1ed08e086715900c038b29537624944a36e1fb3b52" + sha256 cellar: :any_skip_relocation, sonoma: "8271dd4f6d13603b7353203cbbe021f2fb6359356a6fed14747d9c6761eaa477" + sha256 cellar: :any_skip_relocation, ventura: "606c6ecd10fad0b508c32072a518e8ff135d9a12dc7dce01e95dba94b21154d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdcc901f3f3198e2fdedd4d897ba24e554f88a208efdbbe47b87eaaa06041931" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73f293a7ca9b84a8c105e9e5106176695c3207f4e92b98890ba72652dbec2e81" + end + + depends_on "gmp" => :build + depends_on "ocaml" => :build + depends_on "opam" => :build + depends_on "pkgconf" => :build + + def install + ENV["OPAMROOT"] = opamroot = buildpath/".opam" + ENV["OPAMYES"] = "1" + + # Work around https://github.com/ocaml/ocamlfind/issues/107 when `coq` is installed in build environment + ENV.prepend_path "OCAMLPATH", opamroot/"ocaml-system/lib" if Formula["coq"].any_version_installed? + + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + system "opam", "install", ".", "--deps-only", "--yes", "--no-depexts" + system "opam", "exec", "--", "make", "world" + + bin.install "bin/ott" + pkgshare.install "examples" + elisp.install "emacs/ott-mode.el" + end + + test do + system bin/"ott", "-i", pkgshare/"examples/peterson_caml.ott", + "-o", "peterson_caml.tex", "-o", "peterson_caml.v" + end +end diff --git a/Formula/o/otterdog.rb b/Formula/o/otterdog.rb new file mode 100644 index 0000000000000..6935244526a12 --- /dev/null +++ b/Formula/o/otterdog.rb @@ -0,0 +1,280 @@ +class Otterdog < Formula + include Language::Python::Virtualenv + + desc "Manage GitHub organizations at scale using an infrastructure as code approach" + homepage "https://otterdog.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/68/d8/4c1827aa29bc22f4a8f4cb4a755f4505c7e84fc54a6a67e3a5bbd4dc0389/otterdog-1.1.0.tar.gz" + sha256 "b1dc49d7cd0b4f077aa84d924299412539960cb848efbfbe69d9689adebc4832" + license "EPL-2.0" + revision 1 + head "https://github.com/eclipse-csi/otterdog.git", branch: "main" + + # https://github.com/microsoft/playwright-python/issues/2579 + no_autobump! because: "'playwright' resource lacks PyPI sdist" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ffbd3ab3898d3116487bcd2314c50e0b72452ef77f02a3839939fbee7b92f722" + sha256 cellar: :any, arm64_sequoia: "82f61ed0e6214212cb5d9e983173856ea394ac1c567eff10dea9b3aa73eed4c3" + sha256 cellar: :any, arm64_sonoma: "58011e10291cc66fa270befd806a19f2838f3c29c2143ee77c9453fe85b4a220" + sha256 cellar: :any, sonoma: "8601a0617d176cb598f34f8c1499c8432c84c2f13b95469a33c1d097e9f060d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "23bed5c77f54ec8bff54a3f450b632830e31abd2e06f9099ce6fe4825a8b4ca8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a865d08f4c470c45294b949971654dfedfbc1ecad62c6b483ff9d7d910267fc0" + end + + depends_on "rust" => :build # for rjsonnet + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libsodium" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi cryptography rpds-py] + + # No sdist on PyPI, so we use the GitHub tarball + # Ref: https://github.com/microsoft/playwright-python/issues/2579 + resource "playwright" do + url "https://github.com/microsoft/playwright-python/archive/refs/tags/v1.55.0.tar.gz" + sha256 "adda41b4a6c02f414d535b7a0e03bc5f4c4f77fb3d4ef3028f8b609ca71f3613" + end + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/0b/03/a88171e277e8caa88a4c77808c20ebb04ba74cc4681bf1e9416c862de237/aiofiles-24.1.0.tar.gz" + sha256 "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiohttp-client-cache" do + url "https://files.pythonhosted.org/packages/29/af/b8e2f6ce10f0f71d675386a785966532a3e72db6d67558bab533f9cdb94a/aiohttp_client_cache-0.14.2.tar.gz" + sha256 "d3f4b81204de9dce59894d9ecb9c77a8dfd633d73c920bbcf8a7370650656585" + end + + resource "aiohttp-retry" do + url "https://files.pythonhosted.org/packages/9d/61/ebda4d8e3d8cfa1fd3db0fb428db2dd7461d5742cea35178277ad180b033/aiohttp_retry-2.9.1.tar.gz" + sha256 "8eb75e904ed4ee5c2ec242fefe85bf04240f685391c4879d8f541d6028ff01f1" + end + + resource "aioshutil" do + url "https://files.pythonhosted.org/packages/d3/bd/dcea5abb1792269e70cc75d5f9ae9adbdfba0f0d08a207eb788ec3b469b6/aioshutil-1.6.tar.gz" + sha256 "9eae342b9a4cacc2c2c5877877a2d2f7a2b66c62aa1ab57d7e95c8cfd4ede507" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "aiosqlite" do + url "https://files.pythonhosted.org/packages/13/7d/8bca2bf9a247c2c5dfeec1d7a5f40db6518f88d314b8bca9da29670d2671/aiosqlite-0.21.0.tar.gz" + sha256 "131bb8056daa3bc875608c631c678cda73922a2d4ba8aec373b19f18c17e7aa3" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "asyncer" do + url "https://files.pythonhosted.org/packages/6b/41/71af52c036f3e38f3d90f50efd0bc5175b2283d32b2e8a3da11b4b0db84a/asyncer-0.0.10.tar.gz" + sha256 "8ae3e569d4c0af2882be0822f848adf59712cc52aa5da6ead53473869c90d98e" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "chevron" do + url "https://files.pythonhosted.org/packages/15/1f/ca74b65b19798895d63a6e92874162f44233467c9e7c1ed8afd19016ebe9/chevron-0.14.0.tar.gz" + sha256 "87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/c9/92/bb85bd6e80148a4d2e0c59f7c0c2891029f8fd510183afc7d8d2feeed9b6/greenlet-3.2.3.tar.gz" + sha256 "8b0dd8ae4c0d6f5e54ee55ba935eeb3d735a9b58a8a1e5b5cbab64e01a39f365" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-resources" do + url "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz" + sha256 "185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jsonata-python" do + url "https://files.pythonhosted.org/packages/74/c7/f7424658f7c20266d29343d9fc2cc764a0f83460ee61a8f84b591d161450/jsonata_python-0.6.0.tar.gz" + sha256 "2f605ec016eec13ab009de00631b9bb7b6a4bf7918cfcbe7f7f393cfdc550009" + end + + resource "jsonbender" do + url "https://files.pythonhosted.org/packages/33/ba/b89ab7fb6127eda78e6351568a80cb1e45c5c2c87c3e96df6e6e5a922b43/JSONBender-0.9.3.tar.gz" + sha256 "54c0503f9e2f9768b113c12ef3d9502da14f0c434853a515cbc9c20e21572538" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "jwt" do + url "https://files.pythonhosted.org/packages/7f/20/21254c9e601e6c29445d1e8854c2a81bdb554e07a82fb1f9846137a6965c/jwt-1.4.0.tar.gz" + sha256 "f6f789128ac247142c79ee10f3dba6e366ec4e77c9920d18c1592e28aa0a7952" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "mintotp" do + url "https://files.pythonhosted.org/packages/c0/b4/126c898d8bdd6d73ee702cf221ab8ddfb8c53db9bc101272542e478eba20/mintotp-0.3.0.tar.gz" + sha256 "d0f4db5edb38a7481120176a526e8c29539b9e80581dd2dcc1811557d77cfad5" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pyee" do + url "https://files.pythonhosted.org/packages/95/03/1fd98d5841cd7964a27d729ccf2199602fe05eb7a405c1462eb7277945ed/pyee-13.0.0.tar.gz" + sha256 "b391e3c5a434d1f5118a25615001dbc8f669cf410ab67d04c4d4e07c55481c37" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "rjsonnet" do + url "https://files.pythonhosted.org/packages/70/65/4c6b1e4baf48ebbc6ff0c8cf8b50f08c63173d9abd5dd7f3af03b4bcd460/rjsonnet-0.5.6.tar.gz" + sha256 "47bd8f63b4b1def67f83001c07ff7d43d6a90dbf89cb6fb680c941db809a60ce" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "url-normalize" do + url "https://files.pythonhosted.org/packages/80/31/febb777441e5fcdaacb4522316bf2a527c44551430a4873b052d545e3279/url_normalize-2.2.1.tar.gz" + sha256 "74a540a3b6eba1d95bdc610c24f2c0141639f3ba903501e61a52a8730247ff37" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PLAYWRIGHT"] = resource("playwright").version + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"otterdog", shell_parameter_format: :click) + + # Help find playwright when installed inside virtualenv + rm(bin/name) + (bin/name).write_env_script libexec/"bin"/name, PATH: "#{libexec}/bin:${PATH}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/otterdog --version") + + assert_match "File 'otterdog.json' does not exist", shell_output("#{bin}/otterdog validate 2>&1", 2) + end +end diff --git a/Formula/o/ouch.rb b/Formula/o/ouch.rb new file mode 100644 index 0000000000000..8b3ab70b02337 --- /dev/null +++ b/Formula/o/ouch.rb @@ -0,0 +1,66 @@ +class Ouch < Formula + desc "Painless compression and decompression for your terminal" + homepage "https://github.com/ouch-org/ouch" + url "https://github.com/ouch-org/ouch/archive/refs/tags/0.6.1.tar.gz" + sha256 "e6265071affab228ba7d3ca85f2206029445038b3a3d96036e9bf02b795ad651" + license "MIT" + head "https://github.com/ouch-org/ouch.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1763a70081770f67d8246c019594ca196c8829585178b93d486ac9f92865e1c7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cfb7387471264b6089243b31d22b40ba75ac370c64c1835d06585df5c2dbfafe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "326375a6f882717b1026228a031e840133b9944115be3251edd7897c6ec00378" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66f692a605fdbfb28109a8a83e3c51539910783fc33310802c79d5b97f7ce57c" + sha256 cellar: :any_skip_relocation, sonoma: "89a565161184ecfedd0860b555615c0d01b6dc8495e1ddb99d90c2c274d96602" + sha256 cellar: :any_skip_relocation, ventura: "54dc9ec1164b7058dceabeb8db74993f87110a967fe3fa969b98f37339608837" + sha256 cellar: :any_skip_relocation, arm64_linux: "b114aa892caae3291d102fd04c811b4b60091a3a1ede4cc36fddcf16bc421866" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d0d0e3fe53abf7a1a280cf73786d1125de2800927f8a01d90d5658f02b581a6" + end + + depends_on "rust" => :build + + uses_from_macos "bzip2" + uses_from_macos "xz" + uses_from_macos "zlib" + + on_linux do + depends_on "llvm" => :build + end + + def install + # for completion and manpage generation + ENV["OUCH_ARTIFACTS_FOLDER"] = buildpath + + system "cargo", "install", *std_cargo_args + + bash_completion.install "ouch.bash" => "ouch" + fish_completion.install "ouch.fish" + zsh_completion.install "_ouch" + + man1.install Dir["*.1"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/ouch --version") + + (testpath/"file1").write "Hello" + (testpath/"file2").write "World!" + + %w[tar zip 7z tar.bz2 tar.bz3 tar.lz4 tar.gz tar.xz tar.zst tar.sz tar.br].each do |format| + system bin/"ouch", "compress", "file1", "file2", "archive.#{format}" + assert_path_exists testpath/"archive.#{format}" + + system bin/"ouch", "decompress", "-y", "archive.#{format}", "--dir", testpath/format + assert_equal "Hello", (testpath/format/"file1").read + assert_equal "World!", (testpath/format/"file2").read + end + end +end diff --git a/Formula/o/ov.rb b/Formula/o/ov.rb new file mode 100644 index 0000000000000..3affa64be51c9 --- /dev/null +++ b/Formula/o/ov.rb @@ -0,0 +1,33 @@ +class Ov < Formula + desc "Feature-rich terminal-based text viewer" + homepage "https://noborus.github.io/ov/" + url "https://github.com/noborus/ov/archive/refs/tags/v0.45.1.tar.gz" + sha256 "dc1fef378297f3bc57f4fcd2a502f389bdcaf4266601a1a3eb790e74f98542a5" + license "MIT" + head "https://github.com/noborus/ov.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0a982f640b75ab34dc7f281c27a6f58ff9b04009de6db89d0699b3a3936d4175" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0a982f640b75ab34dc7f281c27a6f58ff9b04009de6db89d0699b3a3936d4175" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a982f640b75ab34dc7f281c27a6f58ff9b04009de6db89d0699b3a3936d4175" + sha256 cellar: :any_skip_relocation, sonoma: "ed9f5667d23889af26f942c8c2ac43c9b651b625dc851d3e59b4e7bbf281f245" + sha256 cellar: :any_skip_relocation, arm64_linux: "22918d7a8cce5e7647d877760736408b5a53f86f5ea4e14427964dc883788902" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41ea79b3ac8fcd55d7c514416d22d7731b8ebb177f0935615c4c680326697dd8" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.Revision=#{tap.user}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"ov", "--completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/ov --version") + + (testpath/"test.txt").write("Hello, world!") + assert_match "Hello, world!", shell_output("#{bin}/ov test.txt") + end +end diff --git a/Formula/o/overarch.rb b/Formula/o/overarch.rb new file mode 100644 index 0000000000000..3f679561f5930 --- /dev/null +++ b/Formula/o/overarch.rb @@ -0,0 +1,73 @@ +class Overarch < Formula + desc "Data driven description of software architecture" + homepage "https://github.com/soulspace-org/overarch" + url "https://github.com/soulspace-org/overarch/releases/download/v0.40.0/overarch.jar" + sha256 "368b865b4909143f3bf3da711709a4d1d39c04fac9b8585e90c35df540b4fb18" + license "EPL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "019d9f6fdec57aa21267fa20a873af588bb5ada1c60751ff4943f4aa090a1393" + end + + head do + url "https://github.com/soulspace-org/overarch.git", branch: "main" + depends_on "leiningen" => :build + end + + depends_on "openjdk" + + def install + if build.head? + system "lein", "uberjar" + jar = "target/overarch.jar" + else + jar = "overarch.jar" + end + + libexec.install jar + bin.write_jar_script libexec/"overarch.jar", "overarch" + end + + test do + (testpath/"test.edn").write <<~EOS + \#{ + {:el :person + :id :test-customer} + {:el :system + :id :test-system} + {:el :rel + :id :customer-uses-system + :from :test-customer + :to :test-system} + {:el :context-view + :id :test-context-view + :ct [ + {:ref :test-customer} + {:ref :test-system} + {:ref :customer-uses-system}]} + {:el :container-view + :id :test-container-view + :ct [ + {:ref :test-customer} + {:ref :test-system} + {:ref :customer-uses-system}]}} + EOS + expected = <<~EOS.chomp + Model Warnings: + {:build-problems (), + :unresolved-refs-in-views (), + :unresolved-refs-in-relations ()} + Model Information: + {:nodes-by-type-count {:person 1, :system 1}, + :nodes-count 2, + :views-by-type-count {:container-view 1, :context-view 1}, + :relations-by-type-count {:rel 1}, + :views-count 2, + :elements-by-namespace-count {nil 3}, + :relations-count 1, + :synthetic-count {:normal 3}, + :external-count {:internal 3}} + EOS + assert_equal expected, shell_output("#{bin}/overarch --model-dir=#{testpath} --model-info").chomp + end +end diff --git a/Formula/o/overdrive.rb b/Formula/o/overdrive.rb new file mode 100644 index 0000000000000..4727773384342 --- /dev/null +++ b/Formula/o/overdrive.rb @@ -0,0 +1,29 @@ +class Overdrive < Formula + desc "Bash script to download mp3s from the OverDrive audiobook service" + homepage "https://github.com/chbrown/overdrive" + url "https://github.com/chbrown/overdrive/archive/refs/tags/2.4.1.tar.gz" + sha256 "accc3ec4dab889f6bc003970be102ca7c85290b6516f71c8394e61946fb28860" + license "MIT" + head "https://github.com/chbrown/overdrive.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2ea3e686b4157fced49eab3f6bbf5b467140e7d07f130a810902a5bf940aca0e" + end + + uses_from_macos "libxml2" # for xmllint + + on_linux do + depends_on "openssl@3" # for openssl (non keg-only) + depends_on "util-linux" # for uuidgen + end + + def install + bin.install "overdrive.sh" => "overdrive" + end + + test do + # A full run would require an authentic file, which can only be used once + assert_match "Specified media file does not exist", + shell_output("#{bin}/overdrive download fake_file.odm 2>&1", 2) + end +end diff --git a/Formula/o/overmind.rb b/Formula/o/overmind.rb new file mode 100644 index 0000000000000..5f7f2205afa81 --- /dev/null +++ b/Formula/o/overmind.rb @@ -0,0 +1,36 @@ +class Overmind < Formula + desc "Process manager for Procfile-based applications and tmux" + homepage "https://github.com/DarthSim/overmind" + url "https://github.com/DarthSim/overmind/archive/refs/tags/v2.5.1.tar.gz" + sha256 "d616b89465d488878ed2e1f79e66f8af5b5c2f1d3cf75c2b08e04fb04752d187" + license "MIT" + head "https://github.com/DarthSim/overmind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7e75f7028eb9c455f06ca7d1bbfdc0dd56a1b93b50f957a2b43ae25850737eca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "63ad87a46c888c096259183252addcd8ef53d521bf1a5e36fa3ef79b4a1c526a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "170345488efff9664a6e6f1c203e9f252f2a6b36f3b19a574a69e2a504ff88d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2cefab99b19b428357d41d4f27186c68a149c6b67dd317ba71e7cc985e3ab824" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5b5121a20d14591466ebfa082329d902ced52c30e7c257bebe0c6141717c29ca" + sha256 cellar: :any_skip_relocation, sonoma: "75d9f3f07a21c2bd979f50fd520bec07a4221fecf0e70afe2e167d91ca263360" + sha256 cellar: :any_skip_relocation, ventura: "d10e4a237a80de7a6119f79ab10304623e7cb5dd42d74e5feb1382bd74642862" + sha256 cellar: :any_skip_relocation, monterey: "8f39c51a41a651b932147937384d1091dd0b86ae15a040bd6dbd96c2db5f3cf4" + sha256 cellar: :any_skip_relocation, arm64_linux: "905ba5269700b1a1484869ab1a8450752ff42a38f54a070a6cb55dceac025dc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba8a085f0aae6ddeec87817674bc44a085c2ae884e0a90568b23d9e37c5a3cee" + end + + depends_on "go" => :build + depends_on "tmux" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + expected_message = "overmind: open ./Procfile: no such file or directory" + assert_match expected_message, shell_output("#{bin}/overmind start 2>&1", 1) + (testpath/"Procfile").write("test: echo 'test message'; sleep 1") + expected_message = "test message" + assert_match expected_message, shell_output("#{bin}/overmind start") + end +end diff --git a/Formula/o/overtls.rb b/Formula/o/overtls.rb new file mode 100644 index 0000000000000..893c821e7d846 --- /dev/null +++ b/Formula/o/overtls.rb @@ -0,0 +1,32 @@ +class Overtls < Formula + desc "Simple proxy tunnel for bypassing the GFW" + homepage "https://github.com/ShadowsocksR-Live/overtls" + url "https://github.com/ShadowsocksR-Live/overtls/archive/refs/tags/v0.3.7.tar.gz" + sha256 "c95e005e609c9a2d469e79a0dcc4f04960fe35bf851bd0aa75bc329f724fe483" + license "MIT" + head "https://github.com/ShadowsocksR-Live/overtls.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d47a088a1927db94fa165f249f77b6b2cdbe2315044911c5d0f92ce9954586be" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b59ea52bee942655b2dbea34df2fea7e25599e44c03e2ae44cd5291ff045e5e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa67108c284f0b1821c5c3d0a74f583b0681856a1914474e49a42bee603953a7" + sha256 cellar: :any_skip_relocation, sonoma: "566b3e119c4fedfe02f1e4df77f0fa50526e0c89d08cdd8ef6200f091021f7f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1769bbc2efb4b636fc3afd84ce3468c95bc891d834438ef5a4224cad19326eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "60674e013d27dad2fbf9dd616413dd75fbc3c83de0bc8caa0e2ee713a9641381" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + pkgshare.install "config.json" + end + + test do + assert_match version.to_s, shell_output("#{bin}/overtls-bin -V") + + output = shell_output("#{bin}/overtls-bin -r client -c #{pkgshare}/config.json 2>&1", 1) + assert_match "Error: Io(Kind(TimedOut))", output + end +end diff --git a/Formula/o/ovsx.rb b/Formula/o/ovsx.rb new file mode 100644 index 0000000000000..4c11b2e07d917 --- /dev/null +++ b/Formula/o/ovsx.rb @@ -0,0 +1,28 @@ +class Ovsx < Formula + desc "Command-line interface for Eclipse Open VSX" + homepage "https://www.npmjs.com/package/ovsx" + url "https://registry.npmjs.org/ovsx/-/ovsx-0.10.6.tgz" + sha256 "d50e7b083f235346c0b9b2a3a7c4985bf4f3f2ddd87d528e07a28859aed1045d" + license "EPL-2.0" + + bottle do + sha256 arm64_tahoe: "d9a7b92f30e129532d003c31b98ba86efc31ee0f2d5eb2fc4a6dfccd829d2b42" + sha256 arm64_sequoia: "21fda98823a6dc025e0a0e747d7035bdbdfb2bac339a33fdd92cc9faf3e53ab2" + sha256 arm64_sonoma: "f962ec113990e460707a443e6918f1a7f64d33b69eade644673875fb1376ffca" + sha256 sonoma: "e1652231f028b1c9c91c8143f6f3c6cd560b680391d2ef38dc5b2d98b789b640" + sha256 cellar: :any_skip_relocation, arm64_linux: "4013676dbca2fec57fa5cba652a53aa375532afe4b07f9ae106db75a2a9bd3c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9092529f7724d6169b014570bff62ab784ef2c66a819ff8da62fd227059b2e5c" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir[libexec/"bin/*"] + end + + test do + error = shell_output("#{bin}/ovsx verify-pat 2>&1", 1) + assert_match "Unable to read the namespace's name", error + end +end diff --git a/Formula/o/owamp.rb b/Formula/o/owamp.rb new file mode 100644 index 0000000000000..d6e19ae5807ca --- /dev/null +++ b/Formula/o/owamp.rb @@ -0,0 +1,78 @@ +class Owamp < Formula + desc "Implementation of the One-Way Active Measurement Protocol" + homepage "https://www.internet2.edu/products-services/performance-analytics/performance-tools/" + url "https://software.internet2.edu/sources/owamp/owamp-3.4-10.tar.gz" + sha256 "059f0ab99b2b3d4addde91a68e6e3641c85ce3ae43b85fe9435841d950ee2fb3" + license "Apache-2.0" + + livecheck do + url "https://software.internet2.edu/sources/owamp/" + regex(/href=.*?owamp[._-]v?(\d+(?:\.\d+)+(?:-\d+)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "408c62feb4e3c55838e9c1d60474f7e5f4879abee08e1a60ac341dc7098f4117" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9060c36f5f038c5d1b43cdb45319a414b214dc8ddef7745658b64ea756cd68e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7fc9777e3da78501d8a24156a754f8fea5135e97ae89d9357bef7efa06fab6d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "103fa8cc22dd7993f374d851aa24dbb37369e5fa442304d3623f0015d0feb0d5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "07c1548f42dba72b33b71fcebfae84e881ec9c298434d77715cdc49bdcf6b8a3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e3c656cab3adb4646e47897e27351fb92b97b9a7cd0810887567b5d1bb9a125a" + sha256 cellar: :any_skip_relocation, sonoma: "3d185d38755423475b80da8ba32c38a363ee38aea467a69bf4ce782e4bdb8442" + sha256 cellar: :any_skip_relocation, ventura: "38c978e23ada6dd9e9441b7fb577995b830f5a01d3c548ec487991ee296899b9" + sha256 cellar: :any_skip_relocation, monterey: "e66ca3211d8ae8e3bd1631451f1c014f14cc933f3d1150334a3dee37db3074c9" + sha256 cellar: :any_skip_relocation, big_sur: "d9599177f43e538b1fea107a4395cbd466ee5991e8c1d7e8d510baf32878a32a" + sha256 cellar: :any_skip_relocation, catalina: "a7bce114bb407f1663671ee68793b7751d512e0451cf9bbf35c1f36ad9b4c3f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "77ffadd4a4b4124cc3321d7a2a86d04beba9dc525f56f0883d9d358d70c97adf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7861b9b519cb1dd21940335fa2e904a72105938981e66637a4887db79988067b" + end + + depends_on "i2util" + + # Backport fix for newer Clang + patch do + url "https://github.com/perfsonar/owamp/commit/e14c6850d2e82919ca35cc591193220e4ebdc2c5.patch?full_index=1" + sha256 "bee4e43d43acea5088d03e7822bb5166b27bf8b12b43ada8751bd2cb3cd4a527" + end + + # Fix to prevent tests hanging under certain circumstances. + # Provided by Aaron Brown via perfsonar-user mailing list: + # https://lists.internet2.edu/sympa/arc/perfsonar-user/2014-11/msg00131.html + patch :DATA + + def install + # fix implicit-function-declaration error + # reported upstream by email + inreplace "owamp/capi.c", "#include ", "#include \n#include " + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"owping", "-h" + end +end + +__END__ +diff -ur owamp-3.4/owamp/endpoint.c owamp-3.4.fixed/owamp/endpoint.c +--- owamp-3.4/owamp/endpoint.c 2014-03-21 09:37:42.000000000 -0400 ++++ owamp-3.4.fixed/owamp/endpoint.c 2014-11-26 07:50:11.000000000 -0500 +@@ -2188,6 +2188,11 @@ + timespecsub((struct timespec*)&wake.it_value,&currtime); + + wake.it_value.tv_usec /= 1000; /* convert nsec to usec */ ++ while (wake.it_value.tv_usec >= 1000000) { ++ wake.it_value.tv_usec -= 1000000; ++ wake.it_value.tv_sec++; ++ } ++ + tvalclear(&wake.it_interval); + + /* diff --git a/Formula/o/owfs.rb b/Formula/o/owfs.rb new file mode 100644 index 0000000000000..4dae98df7c708 --- /dev/null +++ b/Formula/o/owfs.rb @@ -0,0 +1,55 @@ +class Owfs < Formula + desc "Monitor and control physical environment using Dallas/Maxim 1-wire system" + homepage "https://owfs.org/" + url "https://github.com/owfs/owfs/releases/download/v3.2p4/owfs-3.2p4.tar.gz" + version "3.2p4" + sha256 "af0a5035f3f3df876ca15aea13486bfed6b3ef5409dee016db0be67755c35fcc" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cfce021f58090c3ca7128b8cd83544f67ee1305486f639e0659f799381b2c0ea" + sha256 cellar: :any, arm64_sequoia: "9ffbd0a7e7138e0e41418388b894e28c1afa188d2182acd3f8518dfad76fd4a0" + sha256 cellar: :any, arm64_sonoma: "1366e03d70c70d75caede1b7144164ed21adf1396793cb0f75ce9cf3a7d6b1bc" + sha256 cellar: :any, arm64_ventura: "2c892df4127820daca0fbfd2a6ef3be23d85173ed4a67b04d5bd9501cc2c215a" + sha256 cellar: :any, arm64_monterey: "60b2cdf16ab634a941884f3053afade439202e030b20defb61371ff4bd666a50" + sha256 cellar: :any, arm64_big_sur: "62b0c429498ff8aef96aa05ec7e4502978b3d98aa289ff8283a27de41352b68a" + sha256 cellar: :any, sonoma: "6ac085fdb22ab9cf973aa439322c83ec6ec01073fe70d2af0e3d9ff42f784c8b" + sha256 cellar: :any, ventura: "ced3c8b0ea60f52938ff78d7b9362b3d501b5c593a54014b4ef8bc3a8fa22283" + sha256 cellar: :any, monterey: "578554d18620a943b499b22046d97c9fc818ad1ebad6552484a4dec245c7ce0e" + sha256 cellar: :any, big_sur: "d1f522c35882921728f0bc27c62c0b3a9c225278729ecf3b30ea093c21a1cc4b" + sha256 cellar: :any, catalina: "659e132d059f5b07c1f53f7ebc8676edf732da7b36f4e85065a30fe616358f50" + sha256 cellar: :any_skip_relocation, arm64_linux: "f84aad3b6008729382761e7b772b106b7db195baa4515f99b87810cad4652101" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc7081d7fe26ec46288fa5bb16f5404e9697f1c567dde4ded5e181f0b54bbb6b" + end + + depends_on "pkgconf" => :build + depends_on "libftdi" + depends_on "libusb" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + ENV.append_to_cflags "-D_DARWIN_C_SOURCE" if OS.mac? && MacOS.version >= :sequoia + + system "./configure", "--disable-swig", + "--disable-owtcl", + "--disable-zero", + "--disable-owpython", + "--disable-owperl", + "--disable-swig", + "--enable-ftdi", + "--enable-usb", + *std_configure_args + system "make", "install" + end + + test do + system bin/"owserver", "--version" + end +end diff --git a/Formula/o/ox.rb b/Formula/o/ox.rb new file mode 100644 index 0000000000000..94f673a0905f0 --- /dev/null +++ b/Formula/o/ox.rb @@ -0,0 +1,31 @@ +class Ox < Formula + desc "Independent Rust text editor that runs in your terminal" + homepage "https://github.com/curlpipe/ox" + url "https://github.com/curlpipe/ox/archive/refs/tags/0.7.7.tar.gz" + sha256 "9dc869836e92beb5806739da25bf929b45bbb4173a6bffac31b762fcece74a0a" + license "GPL-2.0-only" + head "https://github.com/curlpipe/ox.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0a82610add3dfd5db1da081200dc059858b37fce50d927b991f3c6c66a113279" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f9eb95e6a465fefc00454f9f2df68ca87ef65122639b18f8b65b2ebbf8b5240" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23832d0a48c0c8362ec6e5794f03aae01781ded51f96f7d8266365ec24c9a3ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc6871adc3a09c2ba19334b0fdcaae54ea1eae9d6631763577a613d025385379" + sha256 cellar: :any_skip_relocation, sonoma: "c468c1a3b8020dcc6a5eed5e715c64ed474501016fa48d205a1aa0e8fadadb32" + sha256 cellar: :any_skip_relocation, ventura: "9fd801439a60c7ce8bbcaa72b7c2f69c5fc7d25f58fe392677f07aab9a7ab6c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "31fb3bc58c5857cc0aadcef6a5601cc0b4b7bb7ea2fd47b5ca12d3739d044859" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f56fa97255719ee87aebf29c4ba0b7afdc917e399dd6dcc3788e088699136de9" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # ox is a TUI application, hard to test in CI + # see https://github.com/curlpipe/ox/issues/178 for discussions + assert_match version.to_s, shell_output("#{bin}/ox --version") + end +end diff --git a/Formula/o/oxen.rb b/Formula/o/oxen.rb new file mode 100644 index 0000000000000..6113f647a8b53 --- /dev/null +++ b/Formula/o/oxen.rb @@ -0,0 +1,51 @@ +class Oxen < Formula + desc "Data VCS for structured and unstructured machine learning datasets" + homepage "https://www.oxen.ai/" + url "https://github.com/Oxen-AI/Oxen/archive/refs/tags/v0.38.4.tar.gz" + sha256 "cb074ac7cbaaa25cddd97630ccb39c1fc101c3981f2a67d06d40116ffb92816d" + license "Apache-2.0" + head "https://github.com/Oxen-AI/Oxen.git", branch: "main" + + # The upstream repository contains tags that are not releases. + # Limit the regex to only match version numbers. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3fb3373954a6302f8874c5c9c59d410b5ebbd12ec5816cf4e0d34d11b35a34c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0df97f5e3a1b4e04499b2e012e103cada972545fb3e7e1d91e5af0d956fc183a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "52082fd1a6470330200db65a3f3ecb71e325189904713738ec1989d961ba027b" + sha256 cellar: :any_skip_relocation, sonoma: "d3f51385d229831b436d7238a0a3220be1d529715aec34774c17f6296e7c4aeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "97675ab8198301bd7f053791f575bf4bc36aec462af06fa9c92385cfa1a9d066" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c53ee2ad50284bb7cb85e4359689de09a8214af07bcd833a4bbbdc387753d5c" + end + + depends_on "cmake" => :build # for libz-ng-sys + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "llvm" # for libclang + + on_linux do + depends_on "openssl@3" + end + + def install + cd "oxen-rust" do + system "cargo", "install", *std_cargo_args(path: "src/cli") + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/oxen --version") + + system bin/"oxen", "init" + assert_match "default_host = \"hub.oxen.ai\"", (testpath/".config/oxen/auth_config.toml").read + end +end diff --git a/Formula/o/oxipng.rb b/Formula/o/oxipng.rb new file mode 100644 index 0000000000000..ebeda2ea3d35d --- /dev/null +++ b/Formula/o/oxipng.rb @@ -0,0 +1,44 @@ +class Oxipng < Formula + desc "Multithreaded PNG optimizer written in Rust" + homepage "https://github.com/oxipng/oxipng" + url "https://github.com/oxipng/oxipng/archive/refs/tags/v9.1.5.tar.gz" + sha256 "8f99d5c67efa2a7550023bf610b90e65d421375c9ed7f37097f83ae5c05f85bd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fed9aa78c4a1e95303dcdb8fb95fb4c36b3fa6134866c70bb53c192b047129e8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6eed490e9f3c9a9668213862587fed4ec27f6aa1230a5556618bc7e3de86b9a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "865784029579b8c2b4446dba962ef46379c015c554cf7f99bcdb20b94fb8b9a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c4e48bbdb999086c8a73ceaf4bc3d1fb88e61f044bdcb0b37e21277a952cd07" + sha256 cellar: :any_skip_relocation, sonoma: "a30bed265b000ba4a8ae568c40244ba8005b9cf9d8afaa41da56ba42759b3831" + sha256 cellar: :any_skip_relocation, ventura: "ce9a889f4f0df4bddaf29a866971bbabc78c35a32c07807ab3e0a8f57668a0c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3d37e577eb6aa04680c7714a307eeb1714ac3bd9eb46d25b48dec8819983356" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d810a1834a72c9c2ae54ff64a67c6fd0f6100e70d52dac77ca1638b80327ab17" + end + + depends_on "rust" => :build + + def install + # Upstream uses qemu to cross compile for Linux aarch64, which is not desirable in brew. + # https://github.com/oxipng/oxipng/commit/1f2e0f336a826bd578a49c1dd477fb38773dd6ce + # + # cargo allows setting the variable to some other non-empty string, but not fully + # unsetting it, so remove the assignment from the source file. + # https://github.com/toml-lang/toml/issues/30 + # https://doc.rust-lang.org/cargo/reference/config.html#environment-variables + # https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides + inreplace ".cargo/config.toml", "runner = \"qemu-aarch64\"", "" + + system "cargo", "install", *std_cargo_args + system "cargo", "run", + "--manifest-path", "xtask/Cargo.toml", + "--jobs", ENV.make_jobs.to_s, + "--locked", "--", "mangen" + + man1.install "target/xtask/mangen/manpages/oxipng.1" + end + + test do + system bin/"oxipng", "--pretend", test_fixtures("test.png") + end +end diff --git a/Formula/o/oxker.rb b/Formula/o/oxker.rb new file mode 100644 index 0000000000000..a9b9bd78746ef --- /dev/null +++ b/Formula/o/oxker.rb @@ -0,0 +1,30 @@ +class Oxker < Formula + desc "Terminal User Interface (TUI) to view & control docker containers" + homepage "https://github.com/mrjackwills/oxker" + url "https://github.com/mrjackwills/oxker/archive/refs/tags/v0.12.0.tar.gz" + sha256 "ef6813b4f5e471c217d68acbeed67de3567f6c40723c8cb0ba029c42be5779dc" + license "MIT" + head "https://github.com/mrjackwills/oxker.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9ba35d0ecce5b45249e6928e819a1bb0fde2ef98d91db206c43cfd78996c854f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e052db3aaa3fdaee1f65c35e92ed57db5cdf138424e9a54118e9891bf885184" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a5133c8dd798b90b47e6fde4f0404d760b37a734441499af1b33403fd53d4c8" + sha256 cellar: :any_skip_relocation, sonoma: "e4f8c3934c5860763464c028fd385ffa63e8607f13a8c3fbca4657bbdcc5bd4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "09c4d3508a740824be8a6552713dd1c3121d53c42a15c1345f85adfd030f2cbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1678a89b3eb740b50ddf910eaf33191e287fda1b2d95ccb7fe0979b953d7d37e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/oxker --version") + + assert_match "a value is required for '--host ' but none was supplied", + shell_output("#{bin}/oxker --host 2>&1", 2) + end +end diff --git a/Formula/o/oxlint.rb b/Formula/o/oxlint.rb new file mode 100644 index 0000000000000..560f312eb8d44 --- /dev/null +++ b/Formula/o/oxlint.rb @@ -0,0 +1,31 @@ +class Oxlint < Formula + desc "Suite of high-performance tools for JavaScript and TypeScript written in Rust" + homepage "https://oxc.rs/" + url "https://registry.npmjs.org/oxlint/-/oxlint-1.25.0.tgz" + sha256 "408f0a0aa25ba88e1a16892bdf4b0a2db4151e77e6113969cdab011395d6042c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c181e60dd26a74b94d2dbbd86dd817698704b8f3c7447f9859806645439a6347" + sha256 cellar: :any, arm64_sequoia: "77ac40b1baa62b1fb273f7125a20b1143ecee08e96485bc354651664cfde2323" + sha256 cellar: :any, arm64_sonoma: "77ac40b1baa62b1fb273f7125a20b1143ecee08e96485bc354651664cfde2323" + sha256 cellar: :any, sonoma: "84f2dbb7b53df39273e43c8f3c187beee2cbe7c83bd2967871cab7215ffb5469" + sha256 cellar: :any_skip_relocation, arm64_linux: "283b71953906249f5447b56162a0d99b414a2f8c44f06e00b41e17655a7e5098" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0873be8ba450e03d9e0c23df1ae72e8f9f15259b50e56056ea0f5cf1c3f291c9" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.js").write "const x = 1;" + output = shell_output("#{bin}/oxlint test.js 2>&1") + assert_match "eslint(no-unused-vars): Variable 'x' is declared but never used", output + + assert_match version.to_s, shell_output("#{bin}/oxlint --version") + end +end diff --git a/Formula/oath-toolkit.rb b/Formula/oath-toolkit.rb deleted file mode 100644 index f3ae83d284ed0..0000000000000 --- a/Formula/oath-toolkit.rb +++ /dev/null @@ -1,28 +0,0 @@ -class OathToolkit < Formula - desc "Tools for one-time password authentication systems" - homepage "https://www.nongnu.org/oath-toolkit/" - url "https://download.savannah.gnu.org/releases/oath-toolkit/oath-toolkit-2.6.2.tar.gz" - mirror "https://fossies.org/linux/privat/oath-toolkit-2.6.2.tar.gz" - sha256 "b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0" - - bottle do - rebuild 1 - sha256 "e56c414cf742ef44cef4c904c7bac6138d2fe3dde08d4733fcb6d94c62e75eae" => :mojave - sha256 "dbf06b9def1ea821269ff0b6d44f54e05c64af1fe57799803de5deb3a355c0d2" => :high_sierra - sha256 "af3c35a9cd1139b813bf5bbea9b9c0eff5890fc9beff8096d4405218d6398a42" => :sierra - sha256 "e72016ad2981cdfd75cc76aa8913ad8b41eca71eec82a769addb14cd94fc162e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libxmlsec1" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_equal "328482", shell_output("#{bin}/oathtool 00").chomp - end -end diff --git a/Formula/oauth2_proxy.rb b/Formula/oauth2_proxy.rb deleted file mode 100644 index 4894e4bed2704..0000000000000 --- a/Formula/oauth2_proxy.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Oauth2Proxy < Formula - desc "Reverse proxy for authenticating users via OAuth 2 providers" - homepage "https://github.com/bitly/oauth2_proxy" - url "https://github.com/bitly/oauth2_proxy/archive/v2.2.tar.gz" - sha256 "dae9bae213ccf2a98bf36177e04c1edf4688989c58c383525258956679ddcc19" - head "https://github.com/bitly/oauth2_proxy.git" - - bottle do - cellar :any_skip_relocation - sha256 "2c73a65a1965ae0d0b25bc8160f6bdabb743461a039415ae350af95cab233bb0" => :mojave - sha256 "062e2e65e4a9e233eeb94b711b642eb061f9eee949ef43e10845353b8fbcb9d8" => :high_sierra - sha256 "48fde51ae6c8f7c1ea348526117953ced48616c0e9a7678867c31998fdc13612" => :sierra - sha256 "56c173bc0afde492037cd5c572ae600562058ae0c9c0dc8b0155d902332bbe37" => :el_capitan - sha256 "bf940346696e4c891da94647640886d5aa78c261649730ddb08bc7efc3bea63e" => :yosemite - end - - depends_on "go" => :build - depends_on "gpm" => :build - - def install - mkdir_p "#{buildpath}/src/github.com/bitly" - ln_s buildpath, "#{buildpath}/src/github.com/bitly/oauth2_proxy" - - ENV["GOPATH"] = buildpath - - system "gpm", "install" - system "go", "build", "-o", "#{bin}/oauth2_proxy" - (etc/"oauth2_proxy").install "contrib/oauth2_proxy.cfg.example" - end - - def caveats; <<~EOS - #{etc}/oauth2_proxy/oauth2_proxy.cfg must be filled in. - EOS - end - - plist_options :manual => "oauth2_proxy" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/oauth2_proxy - --config=#{etc}/oauth2_proxy/oauth2_proxy.cfg - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - require "socket" - require "timeout" - - # Get an unused TCP port. - server = TCPServer.new(0) - port = server.addr[1] - server.close - - pid = fork do - exec "#{bin}/oauth2_proxy", - "--client-id=testing", - "--client-secret=testing", - "--cookie-secret=testing", - "--http-address=127.0.0.1:#{port}", - "--upstream=file:///tmp", - "-email-domain=*" - end - - begin - Timeout.timeout(10) do - loop do - Utils.popen_read "curl", "-s", "http://127.0.0.1:#{port}" - break if $CHILD_STATUS.exitstatus.zero? - sleep 1 - end - end - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/objc-codegenutils.rb b/Formula/objc-codegenutils.rb deleted file mode 100644 index 2a6e5712c0557..0000000000000 --- a/Formula/objc-codegenutils.rb +++ /dev/null @@ -1,36 +0,0 @@ -class ObjcCodegenutils < Formula - desc "Three small tools to help work with XCode" - homepage "https://github.com/square/objc-codegenutils" - url "https://github.com/square/objc-codegenutils/archive/v1.0.tar.gz" - sha256 "98b8819e77e18029f1bda56622d42c162e52ef98f3ba4c6c8fcf5d40c256e845" - head "https://github.com/square/objc-codegenutils.git" - - bottle do - cellar :any_skip_relocation - sha256 "7a10354a20ef417eeb521c983f4714be063b68e6d74bec7ddf6f72b99d3cbfbe" => :mojave - sha256 "118c03e858a60fa17c71fbc84fb5a8b9c5f778a0c68531e3df576e1d85d9c91a" => :high_sierra - sha256 "d7b3d3d26970add3af78b0820f3ef8b5e0290f1b2114f5bf06acddcd8d6bdb34" => :sierra - sha256 "d7b945db595b07ee5677902586e01002ba555affdcae366f1fcbe919a6013772" => :el_capitan - sha256 "46d389e6ec12462dfbdd97822ce7c6e8156bbe9fac7a3baf04c20cb1991d9f75" => :mavericks - sha256 "b2a970d293782e5dc6cdf2902df97c89dfa3552aeb5994c7b035a256e5659868" => :mountain_lion - end - - depends_on :xcode => :build - depends_on :macos => :mountain_lion - - def install - xcodebuild "-project", "codegenutils.xcodeproj", "-target", "assetgen", "-configuration", "Release", "SYMROOT=build", "OBJROOT=build" - bin.install "build/Release/objc-assetgen" - xcodebuild "-target", "colordump", "-configuration", "Release", "SYMROOT=build", "OBJROOT=build" - bin.install "build/Release/objc-colordump" - xcodebuild "-target", "identifierconstants", "-configuration", "Release", "SYMROOT=build", "OBJROOT=build" - bin.install "build/Release/objc-identifierconstants" - end - - test do - # Would do more verification here but it would require fixture Xcode projects not in the main repo - system "#{bin}/objc-assetgen", "-h" - system "#{bin}/objc-colordump", "-h" - system "#{bin}/objc-identifierconstants", "-h" - end -end diff --git a/Formula/objc-run.rb b/Formula/objc-run.rb deleted file mode 100644 index faf3bdf5b179e..0000000000000 --- a/Formula/objc-run.rb +++ /dev/null @@ -1,19 +0,0 @@ -class ObjcRun < Formula - desc "Use Objective-C files for shell script-like tasks" - homepage "https://github.com/iljaiwas/objc-run" - url "https://github.com/iljaiwas/objc-run/archive/1.4.tar.gz" - sha256 "6d02a31764c457c4a6a9f5df0963d733d611ba873fc32672151ee02a05acd6f2" - head "https://github.com/iljaiwas/objc-run.git" - - bottle :unneeded - - def install - bin.install "objc-run" - pkgshare.install "examples", "test.bash" - end - - test do - cp_r pkgshare, testpath - system "./objc-run/test.bash" - end -end diff --git a/Formula/objfw.rb b/Formula/objfw.rb deleted file mode 100644 index 6579db727c628..0000000000000 --- a/Formula/objfw.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Objfw < Formula - desc "Portable, lightweight framework for the Objective-C language" - homepage "https://heap.zone/objfw/" - url "https://heap.zone/objfw/downloads/objfw-0.90.2.tar.gz" - sha256 "4de24703d45638093a5196eba278a05b3643e8be0ae2eece5c81ba3e2c20bdbb" - - bottle do - sha256 "abc09195b6abf66d1d638af2999abe712a41cdcbb4bbf8d7ea422443150ae637" => :mojave - sha256 "33c72d86bb5a56ff4a2c9607707edb31f7af21bf863c8d34d95f6c527d9ee483" => :high_sierra - sha256 "2369c4233bafe95aeea87f678cc5e0f0b001d36b5aeff6a7b6512f766d77eb5e" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/objfw-new", "app", "Test" - system "#{bin}/objfw-compile", "-o", "t", "Test.m" - system "./t" - end -end diff --git a/Formula/ocaml-findlib.rb b/Formula/ocaml-findlib.rb deleted file mode 100644 index 6e2aeb94521d6..0000000000000 --- a/Formula/ocaml-findlib.rb +++ /dev/null @@ -1,35 +0,0 @@ -class OcamlFindlib < Formula - desc "OCaml library manager" - homepage "http://projects.camlcity.org/projects/findlib.html" - url "http://download.camlcity.org/download/findlib-1.8.0.tar.gz" - sha256 "2b7b7d6d65bb0f3f8a2c51c63c02b0bcf1fea4c23513f866140dc7dc24fe27ad" - - bottle do - sha256 "6399780e078bca007730b218f4561ef4a513ba2296230aca2bcd9b6cfc75ea98" => :mojave - sha256 "8c2e25008b18bde6fdbefacf85397ecd93a2b916d98c1e1954532509abbfd756" => :high_sierra - sha256 "16682aa54745337c9aaae81fdd22000831c2b85b021250c6d4112fb94ab918a1" => :sierra - sha256 "22b0228a6a116a7f22728b763c4d3e80b30b246a110fe726c5c572dde2d1073b" => :el_capitan - end - - depends_on "ocaml" - - def install - # See https://gitlab.camlcity.org/gerd/lib-findlib/merge_requests/8 - ENV.deparallelize - - system "./configure", "-bindir", bin, - "-mandir", man, - "-sitelib", lib/"ocaml", - "-config", etc/"findlib.conf", - "-no-topfind" - system "make", "all" - system "make", "opt" - inreplace "findlib.conf", prefix, HOMEBREW_PREFIX - system "make", "install" - end - - test do - output = shell_output("#{bin}/ocamlfind query findlib") - assert_equal "#{HOMEBREW_PREFIX}/lib/ocaml/findlib", output.chomp - end -end diff --git a/Formula/ocaml-num.rb b/Formula/ocaml-num.rb deleted file mode 100644 index 92f0ae21f7e01..0000000000000 --- a/Formula/ocaml-num.rb +++ /dev/null @@ -1,45 +0,0 @@ -class OcamlNum < Formula - desc "OCaml legacy Num library for arbitrary-precision arithmetic" - homepage "https://github.com/ocaml/num" - url "https://github.com/ocaml/num/archive/v1.1.tar.gz" - sha256 "04ac85f6465b9b2bf99e814ddc798a25bcadb3cca2667b74c1af02b6356893f6" - revision 4 - - bottle do - cellar :any - sha256 "27261ae37ce2f1ac1645899cffda5b2d38df183e97c5c52185a3a906773c297b" => :mojave - sha256 "22918db71143a26ec137101bb349c5313e670fa9a4a54cac9060d2ff16bd379b" => :high_sierra - sha256 "27e235c6b11adf22cea6e68a932b51882f4d17eaaa7983b05d4489081378b207" => :sierra - end - - depends_on "ocaml-findlib" => :build - depends_on "ocaml" - - def install - ENV["OCAMLFIND_DESTDIR"] = lib/"ocaml" - - (lib/"ocaml").mkpath - cp Formula["ocaml"].opt_lib/"ocaml/Makefile.config", lib/"ocaml" - - # install in #{lib}/ocaml not #{HOMEBREW_PREFIX}/lib/ocaml - inreplace lib/"ocaml/Makefile.config", /^PREFIX=#{HOMEBREW_PREFIX}$/, - "PREFIX=#{prefix}" - - system "make" - (lib/"ocaml/stublibs").mkpath # `make install` assumes this directory exists - system "make", "install", "STDLIBDIR=#{lib}/ocaml" - - pkgshare.install "test" - - rm lib/"ocaml/Makefile.config" # avoid conflict with ocaml - end - - test do - cp_r pkgshare/"test/.", "." - system Formula["ocaml"].opt_bin/"ocamlopt", "-I", lib/"ocaml", "-I", - Formula["ocaml"].opt_lib/"ocaml", "-o", "test", "nums.cmxa", - "test.ml", "test_nats.ml", "test_big_ints.ml", "test_ratios.ml", - "test_nums.ml", "test_io.ml", "end_test.ml" - assert_match "1... 2... 3", shell_output("./test") - end -end diff --git a/Formula/ocaml.rb b/Formula/ocaml.rb deleted file mode 100644 index de5fa376a9bd6..0000000000000 --- a/Formula/ocaml.rb +++ /dev/null @@ -1,58 +0,0 @@ -# OCaml does not preserve binary compatibility across compiler releases, -# so when updating it you should ensure that all dependent packages are -# also updated by incrementing their revisions. -# -# Specific packages to pay attention to include: -# - camlp4 -# - opam -# -# Applications that really shouldn't break on a compiler update are: -# - mldonkey -# - coq -# - coccinelle -# - unison -class Ocaml < Formula - desc "General purpose programming language in the ML family" - homepage "https://ocaml.org/" - url "https://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-4.07.1.tar.xz" - sha256 "dfe48b1da31da9c82d77612582fae74c80e8d1ac650e1c24f5ac9059e48307b8" - head "https://github.com/ocaml/ocaml.git", :branch => "trunk" - - bottle do - cellar :any - sha256 "f8490faa0dc3814633cb2eb5f6c5af00e4e8996c867f485cca4844b460966868" => :mojave - sha256 "d18ce3b54b85ffe8a6ea32c6079fbdfcfdd4cda852b32919a87644ca2153e5b0" => :high_sierra - sha256 "6477940a49ea3a5d262a12e559a296511f5445c921ff3fdf304e0f039485b6a3" => :sierra - end - - pour_bottle? do - # The ocaml compilers embed prefix information in weird ways that the default - # brew detection doesn't find, and so needs to be explicitly blacklisted. - reason "The bottle needs to be installed into /usr/local." - satisfy { HOMEBREW_PREFIX.to_s == "/usr/local" } - end - - option "with-x11", "Install with the Graphics module" - option "with-flambda", "Install with flambda support" - - depends_on :x11 => :optional - - def install - ENV.deparallelize # Builds are not parallel-safe, esp. with many cores - - # the ./configure in this package is NOT a GNU autoconf script! - args = ["-prefix", HOMEBREW_PREFIX.to_s, "-with-debug-runtime", "-mandir", man] - args << "-no-graph" if build.without? "x11" - args << "-flambda" if build.with? "flambda" - system "./configure", *args - - system "make", "world.opt" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = shell_output("echo 'let x = 1 ;;' | #{bin}/ocaml 2>&1") - assert_match "val x : int = 1", output - assert_match HOMEBREW_PREFIX.to_s, shell_output("#{bin}/ocamlc -where") - end -end diff --git a/Formula/ocamlbuild.rb b/Formula/ocamlbuild.rb deleted file mode 100644 index 5331c3baa02f1..0000000000000 --- a/Formula/ocamlbuild.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ocamlbuild < Formula - desc "Generic build tool for OCaml" - homepage "https://github.com/ocaml/ocamlbuild" - url "https://github.com/ocaml/ocamlbuild/archive/0.13.1.tar.gz" - sha256 "79839544bcaebc8f9f0d73d029e2b67e2c898bba046c559ea53de81ea763408c" - head "https://github.com/ocaml/ocamlbuild.git" - - bottle do - sha256 "fb6fb5e2d678895b9a9e5422821906e6692fbcac70e956e11f0ebd0a7a1699e2" => :mojave - sha256 "2dc60d50657f67cdcac100e7d0d082547b9e27632c8341e5e9b4a6f566484245" => :high_sierra - sha256 "3eaafd05870d1c6871ef180ba4852bb5952da23074815a4466e8aec909b1a17a" => :sierra - end - - depends_on "ocaml" - - def install - system "make", "configure", "OCAMLBUILD_BINDIR=#{bin}", "OCAMLBUILD_LIBDIR=#{lib}", "OCAMLBUILD_MANDIR=#{man}" - system "make" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ocamlbuild --version") - end -end diff --git a/Formula/ocamlsdl.rb b/Formula/ocamlsdl.rb deleted file mode 100644 index 3e5420f7dc3c3..0000000000000 --- a/Formula/ocamlsdl.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Ocamlsdl < Formula - desc "OCaml interface with the SDL C library" - homepage "https://ocamlsdl.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ocamlsdl/OCamlSDL/ocamlsdl-0.9.1/ocamlsdl-0.9.1.tar.gz" - sha256 "abfb295b263dc11e97fffdd88ea1a28b46df8cc2b196777093e4fe7f509e4f8f" - revision 11 - - bottle do - cellar :any - sha256 "6ec2880f58082026c2eab293f52d97435d4587b1b984cb96ffdec12a7eeb170b" => :mojave - sha256 "320b81a09719ec758fb36b092cd01d4fe24a79de0fc5bbb2d8168214972823ab" => :high_sierra - sha256 "36c8bc0cf25b280d3db320d9e55ffb7a9a8c961671dcad2457c5917bcf5b641c" => :sierra - end - - depends_on "ocaml" - depends_on "sdl" - depends_on "sdl_gfx" - depends_on "sdl_image" - depends_on "sdl_mixer" - depends_on "sdl_ttf" - - def install - ENV["OCAMLPARAM"] = "safe-string=0,_" # OCaml 4.06.0 compat - system "./configure", "--prefix=#{prefix}", - "OCAMLLIB=#{lib}/ocaml" - system "make" - system "make", "install" - end - - test do - (testpath/"test.ml").write <<~EOS - let main () = - Sdl.init [`VIDEO]; - Sdl.quit () - - let _ = main () - EOS - system "#{Formula["ocaml"].opt_bin}/ocamlopt", "-I", "+sdl", "sdl.cmxa", - "-cclib", "-lSDLmain", "-cclib", "-lSDL", "-cclib", - "-Wl,-framework,Cocoa", "-o", "test", "test.ml" - system "./test" - end -end diff --git a/Formula/oclgrind.rb b/Formula/oclgrind.rb deleted file mode 100644 index 2ed699ed69a4e..0000000000000 --- a/Formula/oclgrind.rb +++ /dev/null @@ -1,119 +0,0 @@ -class Oclgrind < Formula - desc "OpenCL device simulator and debugger" - homepage "https://github.com/jrprice/Oclgrind" - url "https://github.com/jrprice/Oclgrind/archive/v18.3.tar.gz" - sha256 "90518d47573e64c6c28e173dc6f10c4e0ca53a99543ef2f1afaac1cbf725fe90" - - bottle do - cellar :any - sha256 "fef83d451c0545143c476dee9115177b185520a96d0712264f33b2b3d7da321a" => :mojave - sha256 "02bef522dafb0e6a4ebdb57caf496642c21c3ae3b05eb455c91c3dee540107bb" => :high_sierra - sha256 "4c5246e9cbe98976a83a8626667cc9ce792756f5e7bba5efd318d93ab56321b0" => :sierra - sha256 "30bad2aec84a6d1d1ce222f083266fba3a483bcde59b4223035e5a838e225ee9" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "llvm" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"rot13.c").write <<~EOS - #include - #include - - #include - - const char rot13_cl[] = " \ - __kernel void rot13 \ - ( __global const char* in \ - , __global char* out \ - ) \ - { \ - const uint index = get_global_id(0); \ - \ - char c=in[index]; \ - if (c<'A' || c>'z' || (c>'Z' && c<'a')) { \ - out[index] = in[index]; \ - } else { \ - if (c>'m' || (c>'M' && c<'a')) { \ - out[index] = in[index]-13; \ - } else { \ - out[index] = in[index]+13; \ - } \ - } \ - } \ - "; - - void rot13 (char *buf) { - int index=0; - char c=buf[index]; - while (c!=0) { - if (c<'A' || c>'z' || (c>'Z' && c<'a')) { - buf[index] = buf[index]; - } else { - if (c>'m' || (c>'M' && c<'a')) { - buf[index] = buf[index]-13; - } else { - buf[index] = buf[index]+13; - } - } - c=buf[++index]; - } - } - - int main() { - char buf[]="Hello, World!"; - size_t srcsize, worksize=strlen(buf); - - cl_int error; - cl_platform_id platform; - cl_device_id device; - cl_uint platforms, devices; - - error=clGetPlatformIDs(1, &platform, &platforms); - error=clGetDeviceIDs(platform, CL_DEVICE_TYPE_ALL, 1, &device, &devices); - cl_context_properties properties[]={ - CL_CONTEXT_PLATFORM, (cl_context_properties)platform, - 0}; - - cl_context context=clCreateContext(properties, 1, &device, NULL, NULL, &error); - cl_command_queue cq = clCreateCommandQueue(context, device, 0, &error); - - rot13(buf); - - const char *src=rot13_cl; - srcsize=strlen(rot13_cl); - - const char *srcptr[]={src}; - cl_program prog=clCreateProgramWithSource(context, - 1, srcptr, &srcsize, &error); - error=clBuildProgram(prog, 0, NULL, "", NULL, NULL); - - cl_mem mem1, mem2; - mem1=clCreateBuffer(context, CL_MEM_READ_ONLY, worksize, NULL, &error); - mem2=clCreateBuffer(context, CL_MEM_WRITE_ONLY, worksize, NULL, &error); - - cl_kernel k_rot13=clCreateKernel(prog, "rot13", &error); - clSetKernelArg(k_rot13, 0, sizeof(mem1), &mem1); - clSetKernelArg(k_rot13, 1, sizeof(mem2), &mem2); - - char buf2[sizeof buf]; - buf2[0]='?'; - buf2[worksize]=0; - - error=clEnqueueWriteBuffer(cq, mem1, CL_FALSE, 0, worksize, buf, 0, NULL, NULL); - error=clEnqueueNDRangeKernel(cq, k_rot13, 1, NULL, &worksize, &worksize, 0, NULL, NULL); - error=clEnqueueReadBuffer(cq, mem2, CL_FALSE, 0, worksize, buf2, 0, NULL, NULL); - error=clFinish(cq); - - puts(buf2); - } - EOS - system ENV.cc, "rot13.c", "-o", "rot13", "-framework", "OpenCL" - assert_equal "Hello, World!", pipe_output([bin/"oclgrind", "./rot13"], "", 0).chomp - end -end diff --git a/Formula/ocp.rb b/Formula/ocp.rb deleted file mode 100644 index d0bfbd10b1b07..0000000000000 --- a/Formula/ocp.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Ocp < Formula - desc "UNIX port of the Open Cubic Player" - homepage "https://sourceforge.net/projects/opencubicplayer/" - url "https://downloads.sourceforge.net/project/opencubicplayer/ocp-0.1.21/ocp-0.1.21.tar.bz2" - sha256 "d88eeaed42902813869911e888971ab5acd86a56d03df0821b376f2ce11230bf" - - bottle do - sha256 "e07892e27e711cfaafd3a7ba2bc2a86bfe8fbc5438cc443e11a1033486a567fb" => :mojave - sha256 "93017205557b9629a506023b466400c12b4333b6d99ce48b83d53ceb02b538b5" => :high_sierra - sha256 "5566054299b2a05716a3234c7c3d0acee15b4077360c89ec815b6162bee89319" => :sierra - sha256 "4bd576f3d75594928348d30b3b3436cdeebba844be8a8ba65251eb1731de437e" => :el_capitan - sha256 "e6b941f5aa2508a9628487cf40a186188f1dbf986a9a5ab2a824c57a03d45055" => :yosemite - sha256 "d2a095ce47bdea35fad3f6f7ffac500ccc4dc8dd149a9c1dbbae2bbf92809886" => :mavericks - end - - depends_on "flac" - depends_on "libvorbis" - depends_on "mad" - - def install - ENV.deparallelize - - args = %W[ - --prefix=#{prefix} - --without-x11 - --without-sdl - --without-desktop_file_install - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - system "#{bin}/ocp", "--help" - end -end diff --git a/Formula/ocproxy.rb b/Formula/ocproxy.rb deleted file mode 100644 index 11bf002e1925f..0000000000000 --- a/Formula/ocproxy.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ocproxy < Formula - desc "User-level SOCKS and port forwarding proxy" - homepage "https://github.com/cernekee/ocproxy" - url "https://github.com/cernekee/ocproxy/archive/v1.60.tar.gz" - sha256 "a7367647f07df33869e2f79da66b6f104f6495ae806b12a8b8d9ca82fb7899ac" - head "https://github.com/cernekee/ocproxy.git" - - bottle do - cellar :any - sha256 "f4af1432c292f21479bb598a61fc9d37bd9b0a592e3b2fd09584535918391533" => :mojave - sha256 "5671c31a3b0392b5c4c9ea21644c4cbeb430e78dc9f24c28622e9a47ec7e3324" => :high_sierra - sha256 "cb12a1bc3320c0ca5580a44256f5a627f1d74ad59a315cc3cf7aa87846a30243" => :sierra - sha256 "d3f9801c5f0ffa066bdd6e00006488a6e69144beb9385f1bd70467684f50130c" => :el_capitan - sha256 "15393addc83cc3da3a88fa62e80e2e149a85c627fdd1a4320be6f47b5b74f10f" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libevent" - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /VPNFD.is.not.set/, shell_output("#{bin}/ocproxy 2>&1", 1) - end -end diff --git a/Formula/ocrad.rb b/Formula/ocrad.rb deleted file mode 100644 index df1b7074eedf1..0000000000000 --- a/Formula/ocrad.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ocrad < Formula - desc "Optical character recognition (OCR) program" - homepage "https://www.gnu.org/software/ocrad/" - url "https://ftp.gnu.org/gnu/ocrad/ocrad-0.26.tar.lz" - mirror "https://ftpmirror.gnu.org/ocrad/ocrad-0.26.tar.lz" - sha256 "c383d37869baa0990d38d38836d4d567e9e2862aa0cd704868b62dafeac18e3c" - - bottle do - cellar :any_skip_relocation - sha256 "ec28597359fb7399667a71919805981b06fed05571ecebcdd982a1b0de61b0cf" => :mojave - sha256 "9f6a1c40b39e78418342c54ca981648d0b2fe8db03c1fb81bf44aff3225e1dd9" => :high_sierra - sha256 "219b9bf172b5f7379c849a8e55b04dabd74f054564fdaec2fb40502f7e996967" => :sierra - sha256 "eb1f66d4cfb2c2c6768c89053fca5fc762c12b401b745cbbd1e6faad3ae25dcf" => :el_capitan - sha256 "fb3e7e6ab86d242c309a1bb2eaa83451b6fa7369a63222b8025de70a3dbb8615" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install", "CXXFLAGS=#{ENV.cxxflags}" - end - - test do - (testpath/"test.pbm").write <<~EOS - P1 - # This is an example bitmap of the letter "J" - 6 10 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 1 0 0 0 1 0 - 0 1 1 1 0 0 - 0 0 0 0 0 0 - 0 0 0 0 0 0 - EOS - assert_equal "J", `#{bin}/ocrad #{testpath}/test.pbm`.strip - end -end diff --git a/Formula/ocrmypdf.rb b/Formula/ocrmypdf.rb deleted file mode 100644 index 2a47c48c0d3fa..0000000000000 --- a/Formula/ocrmypdf.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Ocrmypdf < Formula - include Language::Python::Virtualenv - - desc "Adds an OCR text layer to scanned PDF files" - homepage "https://github.com/jbarlow83/OCRmyPDF" - url "https://files.pythonhosted.org/packages/c1/32/06c0381653284bab21b26612dee0c923440f35143e59a43a744e4cf1bd12/ocrmypdf-7.2.1.tar.gz" - sha256 "e56902d370f3d4766432e7b7f300fd4b0ed51bd98dedadc3923b8af20471b528" - - bottle do - cellar :any - sha256 "b1773b6a2657a167042cbd03c04e4051187dff8d2cb1f656863b8220a03de426" => :mojave - sha256 "54f466af800ce1ef583e2a8b3f5e8a1170777179021d8c7bedce6bb7ce0ba236" => :high_sierra - sha256 "af698a28872bebdcbc8123f22a43f7ae9176796b746ee46283df15a433fabb7c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "exempi" - depends_on "freetype" - depends_on "ghostscript" - depends_on "jbig2enc" - depends_on "jpeg" - depends_on "leptonica" - depends_on "libpng" - depends_on "pngquant" - depends_on "pybind11" - depends_on "python" - depends_on "qpdf" - depends_on "tesseract" - depends_on "unpaper" - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "img2pdf" do - url "https://files.pythonhosted.org/packages/3e/40/aa7b63857908566b76d1849065a700248b088bf502c244e839fa2548d99e/img2pdf-0.3.1.tar.gz" - sha256 "4409c12293eca94fdcd8e0da1ad2392b6ee3adfcedf438bb8b685924dc1b3a1c" - end - - resource "pikepdf" do - url "https://files.pythonhosted.org/packages/09/ef/db0bc644097f52382f8040633ca8bc49b04a54dfbf76147c495398e2949b/pikepdf-0.3.5.tar.gz" - sha256 "661d38fd54bf419549bb162b9dab6699395896a52e10ca5d0b52610806122d69" - end - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz" - sha256 "f8b3d413c5a8f84b12cd4c5df1d8e211777c9852c6be3ee9c094b626644d3eab" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "python-xmp-toolkit" do - url "https://files.pythonhosted.org/packages/5b/0b/4f95bc448e4e30eb0e831df0972c9a4b3efa8f9f76879558e9123215a7b7/python-xmp-toolkit-2.0.1.tar.gz" - sha256 "f8d912946ff9fd46ed5c7c355aa5d4ea193328b3f200909ef32d9a28a1419a38" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/ca/a9/62f96decb1e309d6300ebe7eee9acfd7bccaeedd693794437005b9067b44/pytz-2018.5.tar.gz" - sha256 "ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277" - end - - resource "reportlab" do - url "https://files.pythonhosted.org/packages/70/4c/19fe74b800e7d74b3dd636137aac6e8df4b19286e318c1a5b6d8ca4b17fd/reportlab-3.5.6.tar.gz" - sha256 "3836a49e7ea7bce458f437cbc094633c7fd4ac027180565875c18ecc726f261e" - end - - resource "ruffus" do - url "https://files.pythonhosted.org/packages/ea/32/5048607dd7a9104406789b15fb4078e774121b23190c9e464d4dd1f7ed89/ruffus-2.7.0.tar.gz" - sha256 "4bd46461d31aa532357019a33d8045f4e57e52f4ee41643b5b3a7372e380cae0" - end - - def install - venv = virtualenv_create(libexec, "python3") - - resource("Pillow").stage do - inreplace "setup.py" do |s| - sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" - s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" - s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" - s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')" - end - - # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs - ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" unless MacOS::CLT.installed? - venv.pip_install Pathname.pwd - end - - res = resources.map(&:name).to_set - ["Pillow"] - res.each do |r| - venv.pip_install resource(r) - end - - venv.pip_install_and_link buildpath - end - - test do - # Since we use Python 3, we require a UTF-8 locale - ENV["LC_ALL"] = "en_US.UTF-8" - - system "#{bin}/ocrmypdf", "-f", "-q", "--deskew", - test_fixtures("test.pdf"), "ocr.pdf" - assert_predicate testpath/"ocr.pdf", :exist? - end -end diff --git a/Formula/octave.rb b/Formula/octave.rb deleted file mode 100644 index 361fd9da7dc08..0000000000000 --- a/Formula/octave.rb +++ /dev/null @@ -1,107 +0,0 @@ -class Octave < Formula - desc "High-level interpreted language for numerical computing" - homepage "https://www.gnu.org/software/octave/index.html" - url "https://ftp.gnu.org/gnu/octave/octave-4.4.1.tar.xz" - mirror "https://ftpmirror.gnu.org/octave/octave-4.4.1.tar.xz" - sha256 "7e4e9ac67ed809bd56768fb69807abae0d229f4e169db63a37c11c9f08215f90" - revision 4 - - bottle do - sha256 "bfb57db4884645f00deab4ed773bd7f43bea2bb0e1a1264a320fbd0b296a7555" => :mojave - sha256 "09dd37878da04ff9deee3120e0f5a9ae663f0cadb7701e568e8df30f8d0f9f63" => :high_sierra - sha256 "4e47c8cbc4c69819e82c0acd4043b3e825581ff0948934de69b6054d48f3704b" => :sierra - end - - head do - url "https://hg.savannah.gnu.org/hgweb/octave", :branch => "default", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "icoutils" => :build - depends_on "librsvg" => :build - end - - # Complete list of dependencies at https://wiki.octave.org/Building - depends_on "gnu-sed" => :build # https://lists.gnu.org/archive/html/octave-maintainers/2016-09/msg00193.html - depends_on :java => ["1.6+", :build, :test] - depends_on "pkg-config" => :build - depends_on "arpack" - depends_on "epstool" - depends_on "fftw" - depends_on "fig2dev" - depends_on "fltk" - depends_on "fontconfig" - depends_on "freetype" - depends_on "gcc" # for gfortran - depends_on "ghostscript" - depends_on "gl2ps" - depends_on "glpk" - depends_on "gnuplot" - depends_on "graphicsmagick" - depends_on "hdf5" - depends_on "libsndfile" - depends_on "libtool" - depends_on "pcre" - depends_on "portaudio" - depends_on "pstoedit" - depends_on "qhull" - depends_on "qrupdate" - depends_on "readline" - depends_on "suite-sparse" - depends_on "sundials" - depends_on "texinfo" - depends_on "veclibfort" - - depends_on "qt" => :optional - - # Dependencies use Fortran, leading to spurious messages about GCC - cxxstdlib_check :skip - - def install - # Default configuration passes all linker flags to mkoctfile, to be - # inserted into every oct/mex build. This is unnecessary and can cause - # cause linking problems. - inreplace "src/mkoctfile.in.cc", /%OCTAVE_CONF_OCT(AVE)?_LINK_(DEPS|OPTS)%/, '""' - - args = [] - args << "--without-qt" if build.without? "qt" - - system "./bootstrap" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-link-all-dependencies", - "--enable-shared", - "--disable-static", - "--without-osmesa", - "--with-hdf5-includedir=#{Formula["hdf5"].opt_include}", - "--with-hdf5-libdir=#{Formula["hdf5"].opt_lib}", - "--with-x=no", - "--with-blas=-L#{Formula["veclibfort"].opt_lib} -lvecLibFort", - "--with-portaudio", - "--with-sndfile", - *args - system "make", "all" - - # Avoid revision bumps whenever fftw's or gcc's Cellar paths change - inreplace "src/mkoctfile.cc" do |s| - s.gsub! Formula["fftw"].prefix.realpath, Formula["fftw"].opt_prefix - s.gsub! Formula["gcc"].prefix.realpath, Formula["gcc"].opt_prefix - end - - # Make sure that Octave uses the modern texinfo at run time - rcfile = buildpath/"scripts/startup/site-rcfile" - rcfile.append_lines "makeinfo_program(\"#{Formula["texinfo"].opt_bin}/makeinfo\");" - - system "make", "install" - end - - test do - system bin/"octave", "--eval", "(22/7 - pi)/pi" - # This is supposed to crash octave if there is a problem with veclibfort - system bin/"octave", "--eval", "single ([1+i 2+i 3+i]) * single ([ 4+i ; 5+i ; 6+i])" - # Test java bindings: check if javaclasspath is working, return error if not - system bin/"octave", "--eval", "try; javaclasspath; catch; quit(1); end;" - end -end diff --git a/Formula/octomap.rb b/Formula/octomap.rb deleted file mode 100644 index 26163412b5dc4..0000000000000 --- a/Formula/octomap.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Octomap < Formula - desc "Efficient probabilistic 3D mapping framework based on octrees" - homepage "https://octomap.github.io/" - url "https://github.com/OctoMap/octomap/archive/v1.9.0.tar.gz" - sha256 "5f81c9a8cbc9526b2e725251cd3a829e5222a28201b394314002146d8b9214dd" - - bottle do - sha256 "ebcc39c4935eea656d1c9b3f4f8e4360b2cf559255cec9d84c8cf22d0ac6f661" => :mojave - sha256 "3e72d0af26510eb79310138dc80a2b2dea541e90ac58a953e5294251bca14728" => :high_sierra - sha256 "eb292c0c7005c2fd75b65f50bc2a361181ee7c3c5113f6da56f80b4f03bf75fc" => :sierra - sha256 "d29abe7987fdb2901996e8e6c4aaf2c8a0daeb98b6cee2a585f048769082a4ad" => :el_capitan - end - - depends_on "cmake" => :build - - def install - cd "octomap" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - octomap::OcTree tree(0.05); - assert(tree.size() == 0); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", - "-loctomath", "-loctomap", "-o", "test" - system "./test" - end -end diff --git a/Formula/ode.rb b/Formula/ode.rb deleted file mode 100644 index a9af11255ef70..0000000000000 --- a/Formula/ode.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Ode < Formula - desc "Simulating articulated rigid body dynamics" - homepage "https://www.ode.org/" - url "https://bitbucket.org/odedevs/ode/downloads/ode-0.15.2.tar.gz" - sha256 "2eaebb9f8b7642815e46227956ca223806f666acd11e31708bd030028cf72bac" - revision 1 - head "https://bitbucket.org/odedevs/ode/", :using => :hg - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "dc84a857363f79acf047a85ce46a3e371a478d92adbd84407bc30ca0e7658ef5" => :mojave - sha256 "d00577ab819d9e29a3c4712aa6a5bb19ebba8db82e534552d33b3d102c9cdebb" => :high_sierra - sha256 "2a01fcc4ae6ff0e197dfb66a15fe068873297c8063f5552bb80d0c10fe5383bf" => :sierra - end - - option "with-double-precision", "Compile ODE with double precision" - - deprecated_option "enable-double-precision" => "with-double-precision" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libccd" - - def install - args = ["--prefix=#{prefix}", "--enable-libccd"] - args << "--enable-double-precision" if build.with? "double-precision" - - inreplace "bootstrap", "libtoolize", "glibtoolize" - system "./bootstrap" - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - dInitODE(); - dCloseODE(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-I#{include}/ode", "-L#{lib}", "-lode", - "-L#{Formula["libccd"].opt_lib}", "-lccd", - "-lc++", "-o", "test" - system "./test" - end -end diff --git a/Formula/odo.rb b/Formula/odo.rb deleted file mode 100644 index 7a00e380023b1..0000000000000 --- a/Formula/odo.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Odo < Formula - desc "Atomic odometer for the command-line" - homepage "https://github.com/atomicobject/odo" - url "https://github.com/atomicobject/odo/archive/v0.2.2.tar.gz" - sha256 "52133a6b92510d27dfe80c7e9f333b90af43d12f7ea0cf00718aee8a85824df5" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f2bee7fa62ba66589fb75b3eb9b32c843e0bfc4f054521876fd891388765eec9" => :mojave - sha256 "0bfc54617186d149c98593c74dfaa59a42b2edcc7df1855fd452594ec42f1476" => :high_sierra - sha256 "06af025b0a2df201a9b79944dcc4809708b305242622a90c92a9906a18adf2d6" => :sierra - sha256 "979cc7131a35180614e848fa5fa12a72f734da7321358c89dfbd425fc8dff837" => :el_capitan - sha256 "ebfc6a2e616694a3862b1d6d11dda1a2c1cb4c966447678b342457490e0e0abc" => :yosemite - end - - def install - system "make" - man1.mkpath - bin.mkpath - system "make", "test" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/odo", "testlog" - end -end diff --git a/Formula/odpi.rb b/Formula/odpi.rb deleted file mode 100644 index 8e51b6edb4edc..0000000000000 --- a/Formula/odpi.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Odpi < Formula - desc "Oracle Database Programming Interface for Drivers and Applications" - homepage "https://oracle.github.io/odpi/" - url "https://github.com/oracle/odpi/archive/v3.0.0.tar.gz" - sha256 "89b48523ace6cd3fb09d4039708e78501ede52862cd94be3facfd767a7b20bad" - - bottle do - cellar :any - sha256 "1e93ab7b8e0975900e250d695d07b8a9e6202feee4b726ed31a309bc9e36071d" => :mojave - sha256 "f89cb672eb772e446103f55227dd17c4eeb346dc6a100098d70cbcb0a23294ef" => :high_sierra - sha256 "c867fb98027fb2fc4695863ea5dd380697b666771c99276c47edf3769db7ef05" => :sierra - end - - def install - system "make" - - lib.install Dir["lib/*"] - include.install Dir["include/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - dpiContext* context = NULL; - dpiErrorInfo errorInfo; - - dpiContext_create(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, &context, &errorInfo); - - return 0; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lodpic", "-o", "test" - system "./test" - end -end diff --git a/Formula/odt2txt.rb b/Formula/odt2txt.rb deleted file mode 100644 index f7cd4a1468fee..0000000000000 --- a/Formula/odt2txt.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Odt2txt < Formula - desc "Convert OpenDocument files to plain text" - homepage "https://github.com/dstosberg/odt2txt/" - url "https://github.com/dstosberg/odt2txt/archive/v0.5.tar.gz" - sha256 "23a889109ca9087a719c638758f14cc3b867a5dcf30a6c90bf6a0985073556dd" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "eb4ea913c8c1f5108adae12acf43ada9033c3bdd2e6976fcce9726108b47df2b" => :mojave - sha256 "02dd0957fda7e5845824951a3e98d2ac9a1a623a02709631d26496bbe0353dee" => :high_sierra - sha256 "88fb433f9e72c6c727f9af5ff017d6bac07f29bc64bfa59f6b53d4ab52f42cb3" => :sierra - sha256 "4b86c07be0d96899d76adee3bf65390beb4288eeddbfb531dfcdbc3f17ff5bc8" => :el_capitan - sha256 "2005cd3ccfc24aa3c188339a63d48454636ace229cffc6b2add8ecf05eea40a1" => :yosemite - end - - resource "sample" do - url "https://github.com/Turbo87/odt2txt/raw/samples/samples/sample-1.odt" - sha256 "78a5b17613376e50a66501ec92260d03d9d8106a9d98128f1efb5c07c8bfa0b2" - end - - def install - system "make", "install", "DESTDIR=#{prefix}" - end - - test do - resources.each do |r| - r.verify_download_integrity(r.fetch) - system "#{bin}/odt2txt", r.cached_download - end - end -end diff --git a/Formula/offlineimap.rb b/Formula/offlineimap.rb deleted file mode 100644 index ba5a4ecf0cca7..0000000000000 --- a/Formula/offlineimap.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Offlineimap < Formula - desc "Synchronizes emails between two repositories" - homepage "https://www.offlineimap.org/" - url "https://github.com/OfflineIMAP/offlineimap/archive/v7.2.1.tar.gz" - sha256 "1d4164941413234cf4669ae57d27176701a7e07214fe49fa265df5c085eb4280" - head "https://github.com/OfflineIMAP/offlineimap.git" - - bottle do - cellar :any_skip_relocation - sha256 "9461f9ecc12eb7c670a2aca93c27c0aaae2946b1d714b60d49ab53e1b72c4caa" => :mojave - sha256 "7156fab97be5a48067ca0c0ff713bc283fc0f1542f00842ed214d2cdbd54d7d3" => :high_sierra - sha256 "7156fab97be5a48067ca0c0ff713bc283fc0f1542f00842ed214d2cdbd54d7d3" => :sierra - sha256 "7156fab97be5a48067ca0c0ff713bc283fc0f1542f00842ed214d2cdbd54d7d3" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "docbook-xsl" => :build - depends_on "sphinx-doc" => :build - depends_on "python@2" # does not support Python 3 - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "make", "docs" - man1.install "docs/offlineimap.1" - man7.install "docs/offlineimapui.7" - - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - resource("six").stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - etc.install "offlineimap.conf", "offlineimap.conf.minimal" - libexec.install "bin/offlineimap" => "offlineimap.py" - libexec.install "offlineimap" - (bin/"offlineimap").write_env_script(libexec/"offlineimap.py", - :PYTHONPATH => ENV["PYTHONPATH"]) - end - - def caveats; <<~EOS - To get started, copy one of these configurations to ~/.offlineimaprc: - * minimal configuration: - cp -n #{etc}/offlineimap.conf.minimal ~/.offlineimaprc - - * advanced configuration: - cp -n #{etc}/offlineimap.conf ~/.offlineimaprc - EOS - end - - plist_options :manual => "offlineimap" - - def plist; <<~EOS - - - - - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/offlineimap - -q - -u - basic - - StartInterval - 300 - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - system bin/"offlineimap", "--version" - end -end diff --git a/Formula/oggz.rb b/Formula/oggz.rb deleted file mode 100644 index a92867c382275..0000000000000 --- a/Formula/oggz.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Oggz < Formula - desc "Command-line tool for manipulating Ogg files" - homepage "https://www.xiph.org/oggz/" - url "https://downloads.xiph.org/releases/liboggz/liboggz-1.1.1.tar.gz" - sha256 "6bafadb1e0a9ae4ac83304f38621a5621b8e8e32927889e65a98706d213d415a" - - bottle do - cellar :any - sha256 "21ee59402b2854a91629c96c0e3540a1e97e9661984800d4d80d650069fcf0be" => :mojave - sha256 "f444304f94866179ffcbe6322d6f25193b4fcd2dc49ad71f9c9527b0d85934de" => :high_sierra - sha256 "a0fad22ba18930be45c7226f2db0fe8b39c988c84c392807ddc75e2d40b3a9ad" => :sierra - sha256 "4c1819dbc134981faf5e2e03dc69d210deb8dabd59b71969c1f479fa32322635" => :el_capitan - sha256 "c6076111f111c5d77dc608bcb4892f10dffb84e5b4f5ebdfba311ec332fa6623" => :yosemite - sha256 "a3aa5e741dd3e7a9aebb65748f80f45947549a79915b68161a79f12cb37b4b12" => :mavericks - sha256 "41d7d2c9b6ab027579d2040579441973cc0301d6103b71d52441e02993ea3198" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "libogg" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - system "#{bin}/oggz", "known-codecs" - end -end diff --git a/Formula/ogmtools.rb b/Formula/ogmtools.rb deleted file mode 100644 index 7a753f413c364..0000000000000 --- a/Formula/ogmtools.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ogmtools < Formula - desc "OGG media streams manipulation tools" - homepage "https://www.bunkus.org/videotools/ogmtools/" - url "https://www.bunkus.org/videotools/ogmtools/ogmtools-1.5.tar.bz2" - sha256 "c8d61d1dbceb981dc7399c1a85e43b509fd3d071fb8d3ca89ea9385e6e40fdea" - - bottle do - cellar :any - sha256 "0c4c8271cbdc79f5d444aca60f7e32c489961f364923e475107021f857122b64" => :mojave - sha256 "c84b3fe9a525a0f6719bab86a5b919af73b067b48134e9b9ff3225af9b728260" => :high_sierra - sha256 "ec07a396ce68d5c646c838e3129dbe6c8ca8ff7ea9126cd31f9844016582d0ec" => :sierra - sha256 "8e0ceae59b3a69647511dff89566a734d25a96a764893c7599ee1ece73890db5" => :el_capitan - sha256 "3a43fec619944cd6fa8e57bd067477ef63997919e11174ddafb160c47b28fd5d" => :yosemite - sha256 "9dc3df5391b2203a0da69ad5be638daa066f9bfc2655bf4d553837aa90f7f4d1" => :mavericks - end - - depends_on "libogg" - depends_on "libvorbis" - - # Borrow patch from MacPorts - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e4957439/ogmtools/common.h.diff" - sha256 "2dd18dea6de0d2820221bde8dfea163101d0037196cb2e94cd910808d10119c0" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - # Borrow warning from MacPorts - def caveats; <<~EOS - Ogmtools has not been updated since 2004 and is no longer being developed, - maintained or supported. There are several issues, especially on 64-bit - architectures, which the author will not fix or accept patches for. - Keep this in mind when deciding whether to use this software. - EOS - end -end diff --git a/Formula/ohcount.rb b/Formula/ohcount.rb deleted file mode 100644 index fb970fc1b5d96..0000000000000 --- a/Formula/ohcount.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Ohcount < Formula - desc "Source code line counter" - homepage "https://github.com/blackducksw/ohcount" - url "https://github.com/blackducksw/ohcount/archive/v3.1.1.tar.gz" - sha256 "4be27e54ac0fb5016fe2f09c2f54ec0139e67d9e2d9ee2e8569f8dfb4e56f59f" - head "https://github.com/blackducksw/ohcount.git" - - bottle do - cellar :any - sha256 "dc7239bfaeebfb31a1a0ed7ae71dfdf178394e4f0842a74e457ec0e576e3683c" => :mojave - sha256 "bf00398e44c1f2c1e2b9fa22614037ce203e3e196c7675dec4273e975837d8b4" => :high_sierra - sha256 "15e8921a693b674c5ea24bc518a776b7b3ef80c207f9d2e1dd498248fce40f7a" => :sierra - sha256 "2227295bd7e77ef3881186a3835718e8018738f8b443314ec16c2c7a5ceadea8" => :el_capitan - end - - depends_on "libmagic" - depends_on "pcre" - depends_on "ragel" - - def install - system "./build", "ohcount" - bin.install "bin/ohcount" - end - - test do - (testpath/"test.rb").write <<~EOS - # comment - puts - puts - EOS - stats = shell_output("#{bin}/ohcount -i test.rb").lines.last - assert_equal ["ruby", "2", "1", "33.3%"], stats.split[0..3] - end -end diff --git a/Formula/ola.rb b/Formula/ola.rb deleted file mode 100644 index 75b840451366b..0000000000000 --- a/Formula/ola.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Ola < Formula - desc "Open Lighting Architecture for lighting control information" - homepage "https://www.openlighting.org/ola/" - url "https://github.com/OpenLightingProject/ola/releases/download/0.10.7/ola-0.10.7.tar.gz" - sha256 "8a65242d95e0622a3553df498e0db323a13e99eeb1accc63a8a2ca8913ab31a0" - - bottle do - rebuild 1 - sha256 "a8bd1491e4534a97ae5d31be6a25dda95d5513696e23931846f70d823f32d06b" => :mojave - sha256 "0d2cd27e4c0de1896ff237a3334d1a69efb396b1fc9e2ce36f4ecaa46b8fbf00" => :high_sierra - sha256 "516b9937272a72a646b2eefb6457bf2eadc125e75140ed6632d2e59fc1677c1c" => :sierra - end - - head do - url "https://github.com/OpenLightingProject/ola.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "liblo" - depends_on "libmicrohttpd" - depends_on "libusb" - depends_on "ossp-uuid" - depends_on "protobuf@3.1" - depends_on "python@2" # protobuf@3.1 does not support Python 3 - - resource "protobuf-c" do - url "https://github.com/protobuf-c/protobuf-c/releases/download/v1.2.1/protobuf-c-1.2.1.tar.gz" - sha256 "846eb4846f19598affdc349d817a8c4c0c68fd940303e6934725c889f16f00bd" - end - - def install - resource("protobuf-c").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{buildpath}/vendor/protobuf-c" - system "make", "install" - end - ENV.prepend_path "PKG_CONFIG_PATH", buildpath/"vendor/protobuf-c/lib/pkgconfig" - - protobuf_pth = Formula["protobuf@3.1"].opt_lib/"python2.7/site-packages/homebrew-protobuf.pth" - (buildpath/".brew_home/Library/Python/2.7/lib/python/site-packages").install_symlink protobuf_pth - - args = %W[ - --disable-fatal-warnings - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-unittests - --enable-python-libs - --enable-rdm-tests - ] - - system "autoreconf", "-fvi" if build.head? - system "./configure", *args - system "make", "install" - end - - test do - system bin/"ola_plugin_info" - end -end diff --git a/Formula/olsrd.rb b/Formula/olsrd.rb deleted file mode 100644 index 3b6eb47b815ff..0000000000000 --- a/Formula/olsrd.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Olsrd < Formula - desc "Implementation of the optimized link state routing protocol" - homepage "http://www.olsr.org" - url "http://www.olsr.org/releases/0.9/olsrd-0.9.0.3.tar.bz2" - sha256 "1f038ed3ea72e4f73dfc9701de83de7313f5049161c8df17b9aaeba8e9711e92" - - bottle do - cellar :any_skip_relocation - sha256 "4f10d4e0d33d101369a9b216adcdc445cd8bce3ee6a1c09548578688c7dc8ac9" => :mojave - sha256 "27524e71f30ba6e64fa5184058b6c73c4dfbfda348b2c2817258db758fcdeb99" => :high_sierra - sha256 "1131b24ca42d043af8eb8a338337150c8ad9f10d9d71968e119779c3eae1bc93" => :sierra - sha256 "88c836acf65237195c3b0d74a7fde0813c2008ab79c216ba8b36e789e58192ab" => :el_capitan - sha256 "c6c165c6ae75a58c33995a7820f83604758ed37c9fb1c4d1557cad4c68b7f752" => :yosemite - sha256 "842c328edcde3ccbffcc8dfddae63f802c716fb18aa63aea4fe620bbed5d8562" => :mavericks - end - - def install - lib.mkpath - args = %W[ - DESTDIR=#{prefix} - USRDIR=#{prefix} - LIBDIR=#{lib} - ETCDIR=#{etc} - ] - system "make", "build_all", *args - system "make", "install_all", *args - end - - plist_options :startup => true, :manual => "olsrd -f #{HOMEBREW_PREFIX}/etc/olsrd.conf" - - def startup_plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{HOMEBREW_PREFIX}/sbin/olsrd - -f - #{etc}/olsrd.conf - - KeepAlive - - NetworkState - - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{sbin}/olsrd", 1) - end -end diff --git a/Formula/omega-rpg.rb b/Formula/omega-rpg.rb deleted file mode 100644 index 4efa78c05495e..0000000000000 --- a/Formula/omega-rpg.rb +++ /dev/null @@ -1,40 +0,0 @@ -class OmegaRpg < Formula - desc "The classic Roguelike game" - homepage "http://www.alcyone.com/max/projects/omega/" - url "http://www.alcyone.com/binaries/omega/omega-0.80.2-src.tar.gz" - sha256 "60164319de90b8b5cae14f2133a080d5273e5de3d11c39df080a22bbb2886104" - revision 1 - - bottle do - sha256 "10390c232402e60f1397665338d15d0448dc992c950a09a72fbf94c812af9aa8" => :mojave - sha256 "f4a5911b81f9919e68c5bd35f8e3d13240045b09e57b622f4766e747bb3e6a03" => :high_sierra - sha256 "06008f528a9ac14c6b7e1f9be84a5e76a4ad4df234344e7e13eaedb108ce4b04" => :sierra - sha256 "d46db018d9c54c5a0460f46763a218b6bff1bf277aca19fe91b17965dac3a367" => :el_capitan - sha256 "1b5b760d814cf07c4d9daa8dbcbcccfc38038dbab140ed182ad514bad07fe932" => :yosemite - end - - def install - # Set up our target folders - inreplace "defs.h", "#define OMEGALIB \"./omegalib/\"", "#define OMEGALIB \"#{libexec}/\"" - - # Don't alias CC; also, don't need that ncurses include path - # Set the system type in CFLAGS, not in makefile - # Remove an obsolete flag - inreplace "Makefile" do |s| - s.remove_make_var! ["CC", "CFLAGS", "LDFLAGS"] - end - - ENV.append_to_cflags "-DUNIX -DSYSV" - - system "make" - - # 'make install' is weird, so we do it ourselves - bin.install "omega" - libexec.install Dir["omegalib/*"] - end - - def post_install - # omega refuses to run without license.txt in OMEGALIB - ln_s prefix/"license.txt", libexec/"license.txt" - end -end diff --git a/Formula/omega.rb b/Formula/omega.rb deleted file mode 100644 index a4a579b6951ff..0000000000000 --- a/Formula/omega.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Omega < Formula - desc "Packaged search engine for websites, built on top of Xapian" - homepage "https://xapian.org/" - url "https://oligarchy.co.uk/xapian/1.4.3/xapian-omega-1.4.3.tar.xz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/x/xapian-omega/xapian-omega_1.4.3.orig.tar.xz" - sha256 "2eea0344a0703ba379d845b86d08a9c2e9faf0deb21834d9ea6939b712c6216e" - - bottle do - sha256 "0aff76c67bcf3033e2ea54a794d93b85531154be66bf88f1b9cb1c5869337ecb" => :mojave - sha256 "7fb7918a5ffd7bb9641dc939ed792586ddc8dc4985c5c9eb442a2196a93b9dcc" => :high_sierra - sha256 "53f9899d6a964d8ae8b0de390dec626836aa24a1004d45352dd7746f53af7934" => :sierra - sha256 "cdba43e3a877484ee608c3c9a55fc96ebf38b17fb78e1bf2f5b84881aed170b8" => :el_capitan - sha256 "be5b012a19ea29890fac384b2a1ea3ffe96654da8fa65390c8345fa4d6c88900" => :yosemite - end - - depends_on "libmagic" - depends_on "pcre" - depends_on "xapian" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/omindex", "--db", "./test", "--url", "/", "#{share}/doc/xapian-omega" - assert_predicate testpath/"./test/flintlock", :exist? - end -end diff --git a/Formula/omniorb.rb b/Formula/omniorb.rb deleted file mode 100644 index 8b0cb3edd06e8..0000000000000 --- a/Formula/omniorb.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Omniorb < Formula - desc "IOR and naming service utilities for omniORB" - homepage "https://omniorb.sourceforge.io/" - url "https://downloads.sourceforge.net/project/omniorb/omniORB/omniORB-4.2.2/omniORB-4.2.2.tar.bz2" - sha256 "ddd909ce31014be2beebf67a5e9fabbf03b5bb0c26b8c53ab64d470d77348ece" - - bottle do - sha256 "f6b45b799e2266812a33098aeeb1352c009f500ada7e660104dee8c04e6486c1" => :mojave - sha256 "4d6e50aa2b7e921f95de4423576ad039549cbb10ed4ff034e4ebfac1ff2914fd" => :high_sierra - sha256 "989ec3dfa6d2cffa72b377822404ff212c9c52b10c6ce1cf7e77ebd5a26a96b4" => :sierra - sha256 "3c53f669e4832ee9e423bd1c124d3b3e7abd2f061b824fae408f5d553c61060a" => :el_capitan - end - - depends_on "pkg-config" => :build - - resource "bindings" do - url "https://downloads.sourceforge.net/project/omniorb/omniORBpy/omniORBpy-4.2.2/omniORBpy-4.2.2.tar.bz2" - sha256 "f3686e5f85b7c7fec83a1ec97dc6874d336e24830c0e68f1e1ecbd798fa1696a" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - - resource("bindings").stage do - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - system "#{bin}/omniidl", "-h" - end -end diff --git a/Formula/ompl.rb b/Formula/ompl.rb deleted file mode 100644 index 78dd7db902926..0000000000000 --- a/Formula/ompl.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Ompl < Formula - desc "Open Motion Planning Library consists of many motion planning algorithms" - homepage "https://ompl.kavrakilab.org/" - url "https://bitbucket.org/ompl/ompl/downloads/ompl-1.4.1-Source.tar.gz" - sha256 "409b968b4174df347eeb77945adb5d03c093480c50c20add958664ad2a8ab29b" - - bottle do - rebuild 1 - sha256 "c637602fadf8d0c60f53ae052685bc968cfcd1da71573fc2de55fe44b3fc4629" => :mojave - sha256 "8ff68e8b4aef7262577918ed7b2b832f7127d2206a9314a411a25e12b333d8c4" => :high_sierra - sha256 "57302b37d93b99a173dca146b9ca5f20eb63a9686372b3dc39d5a014224bf32f" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "eigen" - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main(int argc, char *argv[]) { - ompl::base::RealVectorBounds bounds(3); - bounds.setLow(0); - bounds.setHigh(5); - assert(bounds.getVolume() == 5 * 5 * 5); - } - EOS - - system ENV.cc, "test.cpp", "-L#{lib}", "-lompl", "-lstdc++", "-o", "test" - system "./test" - end -end diff --git a/Formula/ondir.rb b/Formula/ondir.rb deleted file mode 100644 index e150b42e6bef0..0000000000000 --- a/Formula/ondir.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Ondir < Formula - desc "Automatically execute scripts as you traverse directories" - homepage "https://swapoff.org/ondir.html" - url "https://swapoff.org/files/ondir/ondir-0.2.3.tar.gz" - sha256 "504a677e5b7c47c907f478d00f52c8ea629f2bf0d9134ac2a3bf0bbe64157ba3" - head "https://github.com/alecthomas/ondir.git" - - bottle do - cellar :any_skip_relocation - sha256 "d0887254ee09aa205791efded5cdec39cdd2d997132fd5b4bf3c7fa4c4f90337" => :mojave - sha256 "5f1e570b6cd0ef892deaf6f04c90d752ff976dcca8d3be31d6d6ddb546241995" => :high_sierra - sha256 "90e85060a76337368083c889379b71cda5994ab163b73337050819472f41800c" => :sierra - sha256 "8d841a2a8b98a512265dc05deb3ea74e7458a4d5412da786f595c31420b7fadd" => :el_capitan - sha256 "3d7b419d963bcd2be6d04cb3f666c8c58866f9556251f6efcb2f0b6abcad5902" => :yosemite - sha256 "a994efec34c5c9edd1b014959b3fe1a1a95c1d9ece14c5d7d7c51c2b421c7a11" => :mavericks - end - - def install - system "make" - system "make", "PREFIX=#{prefix}", "install" - end -end diff --git a/Formula/one-ml.rb b/Formula/one-ml.rb deleted file mode 100644 index 7969072ca9668..0000000000000 --- a/Formula/one-ml.rb +++ /dev/null @@ -1,31 +0,0 @@ -class OneMl < Formula - desc "Reboot of ML, unifying its core and (now first-class) module layers" - homepage "https://www.mpi-sws.org/~rossberg/1ml/" - url "https://www.mpi-sws.org/~rossberg/1ml/1ml-0.1.zip" - sha256 "64c40c497f48355811fc198a2f515d46c1bb5031957b87f6a297822b07bb9c9a" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "87fc6aab3a39f7cb615f979e08c7e61a0aba5c21b0838ca232dfca8ee2eb8fcc" => :mojave - sha256 "5a2d9a7208f81348718cc0eb2870a13ffac837bceadc9a56a7f1ea19299285cf" => :high_sierra - sha256 "97fd29ed2044756e418c6ae09c70796b112c5677d716c5032e7b77f002c3a658" => :sierra - sha256 "1d3496b1f0cc6d06d1a9b68a53c0d5d182cbc791a3795c61605e1b406d2eb394" => :el_capitan - sha256 "c1052202350991040d99b3316a18cc808d8e16f75bb475edad18a73cc71da902" => :yosemite - end - - depends_on "ocaml" => :build - - def install - ENV["OCAMLPARAM"] = "safe-string=0,_" # OCaml 4.06.0 compat - - system "make" - bin.install "1ml" - (pkgshare/"stdlib").install Dir.glob("*.1ml") - doc.install "README.txt" - end - - test do - system "#{bin}/1ml", "#{pkgshare}/stdlib/prelude.1ml", "#{pkgshare}/stdlib/paper.1ml" - end -end diff --git a/Formula/onetime.rb b/Formula/onetime.rb deleted file mode 100644 index 9e877758f766b..0000000000000 --- a/Formula/onetime.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Onetime < Formula - desc "Encryption with one-time pads" - homepage "https://www.red-bean.com/onetime/" - url "https://www.red-bean.com/onetime/onetime-1.81.tar.gz" - sha256 "36a83a83ac9f4018278bf48e868af00f3326b853229fae7e43b38d167e628348" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "0394155a2171bb959017a677a428403c0220c8f1cf39af2af72ce95f921396ed" => :mojave - sha256 "9f73f9cdb465fce1aefc3cf80c00bc8e43b41a33c3e999fb3ec531251cfc3da0" => :high_sierra - sha256 "9f73f9cdb465fce1aefc3cf80c00bc8e43b41a33c3e999fb3ec531251cfc3da0" => :sierra - sha256 "9f73f9cdb465fce1aefc3cf80c00bc8e43b41a33c3e999fb3ec531251cfc3da0" => :el_capitan - end - - # Fixes the Makefile to permit destination specification - # https://github.com/kfogel/OneTime/pull/12 - patch do - url "https://github.com/kfogel/OneTime/commit/61e534e2.patch?full_index=1" - sha256 "b74d1769e8719f06755c7c3c4ac759063b31d9d0554b64c5fb600c7edf5cc5ea" - end - - # Follow up to PR12 to fix my clumsiness in a variable call. - patch do - url "https://github.com/kfogel/OneTime/commit/fb0a12f2.patch?full_index=1" - sha256 "11417d66886630f7a3c527f63227a75a39aee18029e60de99d7cb68ebe7769f5" - end - - def install - system "make", "prefix=#{prefix}", "install" - inreplace bin/"onetime", %r{^#!/usr/bin/env python$}, "#!/usr/bin/python" - end - - test do - system "dd", "if=/dev/random", "of=pad_data.txt", "bs=1024", "count=1" - (testpath/"input.txt").write "INPUT" - system bin/"onetime", "-e", "--pad=pad_data.txt", "--no-trace", - "--config=.", "input.txt" - system bin/"onetime", "-d", "--pad=pad_data.txt", "--no-trace", - "--config=.", "input.txt.onetime" - end -end diff --git a/Formula/oniguruma.rb b/Formula/oniguruma.rb deleted file mode 100644 index 3205c3d3aee75..0000000000000 --- a/Formula/oniguruma.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Oniguruma < Formula - desc "Regular expressions library" - homepage "https://github.com/kkos/oniguruma/" - url "https://github.com/kkos/oniguruma/releases/download/v6.9.1/onig-6.9.1.tar.gz" - sha256 "c7c3feb7be45a5cc9f2dec239b4a317a422e6ffea299cf91ffab1b926633ea12" - - bottle do - cellar :any - sha256 "1983059c2eae93f1e1ec1bdb65194c64b77182c444588c15085dcdf9095bac2a" => :mojave - sha256 "5e39976b85f94f36dd7649e90c36d39a57d66bbf19cf827d0c610d09c21b7051" => :high_sierra - sha256 "9ac5799494d065272c9bfaf40eeff57131d8e30142c95cba84e57e110a8b0de2" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /#{prefix}/, shell_output("#{bin}/onig-config --prefix") - end -end diff --git a/Formula/onioncat.rb b/Formula/onioncat.rb deleted file mode 100644 index 991f26b69f0a4..0000000000000 --- a/Formula/onioncat.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Onioncat < Formula - desc "VPN-adapter that provides location privacy using Tor or I2P" - homepage "https://www.onioncat.org" - url "https://www.cypherpunk.at/ocat/download/Source/current/onioncat-0.2.2.r578.tar.gz" - version "0.2.2.r578" - sha256 "69c677e04987bd438495d575b566c358f449ff138b836925fd406cf6d6a400f5" - - bottle do - sha256 "8d31228fb732238341e83b58991673588818cd27d6be983f65cb02c4292f6d1b" => :mojave - sha256 "1062942ec61923ed49c04afd61ccc9bb56166efe0285fe93b406597d23223fa9" => :high_sierra - sha256 "539500f5eeed2771a729c9e61196831c3a3796edafcb2c27a38b26ca5674f7a6" => :sierra - sha256 "98acc41c8dc5fcefbe5a410266a762ddacbe12323e958a8fe6ca753ec51f33fe" => :el_capitan - end - - depends_on "tor" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - rm_f "#{bin}/gcat" # just a symlink that does the same as ocat -I - end - - test do - system "#{bin}/ocat", "-i", "fncuwbiisyh6ak3i.onion" # convert keybase's address to IPv6 address format - end -end diff --git a/Formula/onscripter.rb b/Formula/onscripter.rb deleted file mode 100644 index c7ac6ad04e621..0000000000000 --- a/Formula/onscripter.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Onscripter < Formula - desc "NScripter-compatible visual novel engine" - homepage "https://onscripter.osdn.jp/" - url "https://onscripter.osdn.jp/onscripter-20170814.tar.gz" - sha256 "07010e633e490f24f4c5a57dd8c7979f519d0a10a2bfbba8e04828753f1ba97a" - revision 1 - - bottle do - cellar :any - sha256 "d9d3934ce14353ab4527ab02c9f8fe4e562d78e6c707fa5eb2520f2dad1d5b54" => :mojave - sha256 "c7843b57d4404e6a7ac61d521bc60e9b572dff73d916c6a95c3ba2a5f5527125" => :high_sierra - sha256 "d32055f6e69f36da381320ffffb898b4a94e5d29e7a7ae1a00c60a4766439e8c" => :sierra - sha256 "dab8de0970901e7c63b32ad3d2071895c4259c5eb20a7abf8701b328d55bb8cf" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "lua" - depends_on "sdl" - depends_on "sdl_image" - depends_on "sdl_mixer" - depends_on "sdl_ttf" - depends_on "smpeg" - - # jpeg 9 compatibility - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/eeb2de3/onscripter/jpeg9.patch" - sha256 "08695ddcbc6b874b903694ac783f7c21c61b5ba385572463d17fbf6ed75f60a1" - end - - def install - incs = [ - `pkg-config --cflags sdl SDL_ttf SDL_image SDL_mixer`.chomp, - `smpeg-config --cflags`.chomp, - "-I#{Formula["jpeg"].include}", - "-I#{Formula["lua"].opt_include}/lua", - ] - - libs = [ - `pkg-config --libs sdl SDL_ttf SDL_image SDL_mixer`.chomp, - `smpeg-config --libs`.chomp, - "-ljpeg", - "-lbz2", - "-L#{Formula["lua"].opt_lib} -llua", - ] - - defs = %w[ - -DMACOSX - -DUSE_CDROM - -DUSE_LUA - -DUTF8_CAPTION - -DUTF8_FILESYSTEM - ] - - ext_objs = ["LUAHandler.o"] - - k = %w[INCS LIBS DEFS EXT_OBJS] - v = [incs, libs, defs, ext_objs].map { |x| x.join(" ") } - args = k.zip(v).map { |x| x.join("=") } - system "make", "-f", "Makefile.MacOSX", *args - bin.install %w[onscripter sardec nsadec sarconv nsaconv] - end - - test do - assert shell_output("#{bin}/onscripter -v").start_with? "ONScripter version #{version}" - end -end diff --git a/Formula/ooniprobe.rb b/Formula/ooniprobe.rb deleted file mode 100644 index 3ca80fe84763c..0000000000000 --- a/Formula/ooniprobe.rb +++ /dev/null @@ -1,285 +0,0 @@ -class Ooniprobe < Formula - include Language::Python::Virtualenv - - desc "Network interference detection tool" - homepage "https://ooni.torproject.org/" - url "https://files.pythonhosted.org/packages/d8/c0/b4a2ae442dd95160a75251110313d1f9b22834a76ef9bd8f70603b4a867a/ooniprobe-2.3.0.tar.gz" - sha256 "b4c4a5665d37123b1a30f26ffb37b8c06bc722f7b829cf83f6c3300774b7acb6" - - bottle do - cellar :any - rebuild 1 - sha256 "5190bd77c40eecf39da965167329fc552690965ec9d7930352c2828814e35d0d" => :mojave - sha256 "32e3e7e10bfd2105caafb57a2c91d23eb1077c6508e155766ae618ed20e66a3c" => :high_sierra - sha256 "1482b823d3d9ee2fa338fc9b08cf30de5d29f770a1aedf339115283d1c07465e" => :sierra - sha256 "38b51f8ef56029ca251c100887a1b66df0dfdd099f582913ca020027b3010f83" => :el_capitan - end - - depends_on "geoip" - depends_on "libdnet" - depends_on "libyaml" - depends_on "openssl" - depends_on "python@2" - depends_on "tor" - - # these 4 need to come first or else cryptography will let setuptools - # easy_install them (which is bad) - resource "cffi" do - url "https://files.pythonhosted.org/packages/a1/32/e3d6c3a8b5461b903651dd6ce958ed03c093d2e00128e3f33ea69f1d7965/cffi-1.9.1.tar.gz" - sha256 "563e0bd53fda03c151573217b3a49b3abad8813de9dd0632e10090f6190fdaf8" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/69/17/eec927b7604d2663fef82204578a0056e11e0fc08d485fdb3b6199d9b590/pyasn1-0.2.3.tar.gz" - sha256 "738c4ebd88a718e700ee35c8d129acce2286542daa80a82823a7073644f706ad" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/be/64/1bb257ffb17d01f4a38d7ce686809a736837ad4371bcc5c42ba7a715c3ac/pycparser-2.17.tar.gz" - sha256 "0aac31e917c24cb3357f5a4d5566f2cc91a19ca41862f6c3c22dc60a629673b6" - end - # end "these 4" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/ce/39/17e90c2efacc4060915f7d1f9b8d2a5b20e54e46233bdf3092e68193407d/asn1crypto-0.21.1.tar.gz" - sha256 "4e6d7b22814d680114a439faafeccb9402a78095fb23bf0b25f9404c6938a017" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/01/b0/3ac73bf6df716a38568a16f6a9cbc46cc9e8ed6fe30c8768260030db55d4/attrs-16.3.0.tar.gz" - sha256 "80203177723e36f3bbe15aa8553da6e80d47bfe53647220ccaa9ad7a5e473ccc" - end - - resource "Automat" do - url "https://files.pythonhosted.org/packages/73/5a/e5dc9a87e5795ba164e012f2b1cd659e31b722355b79e934e0af892d0493/Automat-0.5.0.tar.gz" - sha256 "4889ec6763377432ec4db265ad552bbe956768ea3fff39014855308ba79dd7c2" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b6/fa/ca682d5ace0700008d246664e50db8d095d23750bb212c0086305450c276/certifi-2017.1.23.tar.gz" - sha256 "81877fb7ac126e9215dfb15bfef7115fdc30e798e0013065158eed0707fd99ce" - end - - resource "constantly" do - url "https://files.pythonhosted.org/packages/95/f1/207a0a478c4bb34b1b49d5915e2db574cadc415c9ac3a7ef17e29b2e8951/constantly-15.1.0.tar.gz" - sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/5f/d5bc241d06665eed93cd8d3aa7198024ce7833af7a67f6dc92df94e00588/cryptography-1.8.1.tar.gz" - sha256 "323524312bb467565ebca7e50c8ae5e9674e544951d28a2904a50012a8828190" - end - - resource "GeoIP" do - url "https://files.pythonhosted.org/packages/f2/7b/a463b7c3df8ef4b9c92906da29ddc9e464d4045f00c475ad31cdb9a97aae/GeoIP-1.3.2.tar.gz" - sha256 "a890da6a21574050692198f14b07aa4268a01371278dfc24f71cd9bc87ebf0e6" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/d8/82/28a51052215014efc07feac7330ed758702fc0581347098a81699b5281cb/idna-2.5.tar.gz" - sha256 "3cb5ce08046c4e3a560fc02f138d0ac63e00f8ce5901a56b32ec8b7994082aab" - end - - resource "incremental" do - url "https://files.pythonhosted.org/packages/da/b0/32233c9e84b0d44b39015fba8fec03e88053723c1b455925081dc6ccd9e7/incremental-16.10.1.tar.gz" - sha256 "14ad6b720ec47aad6c9caa83e47db1843e2b9b98742da5dda08e16a99f400342" - end - - resource "ipaddr" do - url "https://files.pythonhosted.org/packages/08/80/7539938aca4901864b7767a23eb6861fac18ef5219b60257fc938dae3568/ipaddr-2.1.11.tar.gz" - sha256 "1b555b8a8800134fdafe32b7d0cb52f5bdbfdd093707c3dd484c5ea59f1d98b7" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/4e/13/774faf38b445d0b3a844b65747175b2e0500164b7c28d78e34987a5bfe06/ipaddress-1.0.18.tar.gz" - sha256 "5d8534c8e185f2d8a1fda1ef73f2c8f4b23264e8e30063feeb9511d492a413e1" - end - - resource "klein" do - url "https://files.pythonhosted.org/packages/ff/95/3104e55ea9128d3fefe14ea5dbcd73ccfe21708b99defaaadc1e87f41a4a/klein-17.2.0.tar.gz" - sha256 "1b5b27899bb694a741063f79cd8de27a1fdcfa1d021d47a583bbee119d2f4fbc" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/c6/70/bb32913de251017e266c5114d0a645f262fb10ebc9bf6de894966d124e35/packaging-16.8.tar.gz" - sha256 "5d50835fdf0a7edf0b55e311b7c887786504efea1177abd7e69329a8e5ea619e" - end - - resource "Parsley" do - url "https://files.pythonhosted.org/packages/06/52/cac2f9e78c26cff8bb518bdb4f2b5a0c7058dec7a62087ed48fe87478ef0/Parsley-1.3.tar.gz" - sha256 "9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41" - end - - resource "pyasn1-modules" do - url "https://files.pythonhosted.org/packages/60/32/7703bccdba05998e4ff04db5038a6695a93bedc45dcf491724b85b5db76a/pyasn1-modules-0.0.8.tar.gz" - sha256 "10561934f1829bcc455c7ecdcdacdb4be5ffd3696f26f468eb6eb41e107f3837" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/0c/d6/b1fe519846a21614fa4f8233361574eddb223e0bc36b182140d916acfb3b/pyOpenSSL-16.2.0.tar.gz" - sha256 "7779a3bbb74e79db234af6a08775568c6769b5821faecf6e2f4143edb227516e" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz" - sha256 "0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04" - end - - resource "pypcap" do - url "https://files.pythonhosted.org/packages/33/21/d1f24d8a93e4e11bf604d77e04080c05ecb0308a5606936a051bd2b2b5da/pypcap-1.2.2.tar.gz" - sha256 "a32322f45d63ff6196e33004c568b9f5019202a40aa2b16008b7f94e7e119c1f" - - # https://github.com/pynetwork/pypcap/pull/79 - # Adds support for the new CLT SDK with the 10.x - # series of development tools. - patch do - url "https://github.com/pynetwork/pypcap/pull/79.patch?full_index=1" - sha256 "cb0c9b271d293e49e504793bed296e0fa73cca546dbc2814e0ea01351e66d9b2" - end - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz" - sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab" - end - - resource "scapy" do - url "https://files.pythonhosted.org/packages/ac/14/c792a14b9f8bc4bb9c74c0594c167a2da36e31964098d9e27202142cbd7d/scapy-2.3.3.tgz" - sha256 "9d3b0293dcdc2cc42eedacbc9003038109558c4b5c5e4a3fa01b8ef5762f1eb0" - end - - resource "service_identity" do - url "https://files.pythonhosted.org/packages/f3/2a/7c04e7ab74f9f2be026745a9ffa81fd9d56139fa6f5f4b4c8a8c07b2bfba/service_identity-16.0.0.tar.gz" - sha256 "0630e222f59f91f3db498be46b1d879ff220955d7bbad719a5cb9ad14e3c3036" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz" - sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" - end - - resource "Twisted" do - url "https://files.pythonhosted.org/packages/d2/5d/ed5071740be94da625535f4333793d6fd238f9012f0fee189d0c5d00bd74/Twisted-17.1.0.tar.bz2" - sha256 "dbf211d70afe5b4442e3933ff01859533eba9f13d8b3e2e1b97dc2125e2d44dc" - end - - resource "txsocksx" do - url "https://files.pythonhosted.org/packages/ed/36/5bc796eb2612b500baa26a68481d699e08af5382152a9de18e5a45b44ea7/txsocksx-1.15.0.2.tar.gz" - sha256 "4f79b5225ce29709bfcee45e6f726e65b70fd6f1399d1898e54303dbd6f8065f" - end - - resource "txtorcon" do - url "https://files.pythonhosted.org/packages/03/23/4453ab8728c84963cf293d5180b9f529bb10bf8285031c4681e2621b175f/txtorcon-0.18.0.tar.gz" - sha256 "12be80f1d5e2893378c6e8c752cf159479f868f8424e16b34b75cd679a0ab171" - end - - resource "Werkzeug" do - url "https://files.pythonhosted.org/packages/13/a2/c4f2a1e1e9239cd979de00a2d7e0008559c46d920e9842e9b8063c5e6bf5/Werkzeug-0.12.tar.gz" - sha256 "f007848ed997101cb5c09a47e46c0b0b6f193d0f8a01cd2af920d77bf1ab4e68" - end - - resource "zope.interface" do - url "https://files.pythonhosted.org/packages/44/af/cea1e18bc0d3be0e0824762d3236f0e61088eeed75287e7b854d65ec9916/zope.interface-4.3.3.tar.gz" - sha256 "8780ef68ca8c3fe1abb30c058a59015129d6e04a6b02c2e56b9c7de6078dfa88" - end - - def install - # provided by libdnet - inreplace "requirements.txt", "pydumbnet", "" - - # force a distutils install - inreplace "setup.py", "def run(", "def norun(" - - # obey the settings.ini we write - inreplace "ooni/settings.py", /(IS_VIRTUALENV = ).*/, "\\1 False" - - (buildpath/"ooni/settings.ini").atomic_write <<~EOS - [directories] - usr_share = #{pkgshare} - var_lib = #{var}/lib/ooni - etc = #{etc}/ooni - EOS - - if MacOS.sdk_path_if_needed - ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/ffi" - end - - virtualenv_install_with_resources - - man1.install Dir["data/*.1"] - pkgshare.install Dir["data/*"] - end - - def post_install - return if (pkgshare/"decks-available").exist? - ln_s pkgshare/"decks", pkgshare/"decks-available" - ln_s pkgshare/"decks/web.yaml", pkgshare/"current.deck" - end - - def caveats; <<~EOS - Decks are installed to #{opt_pkgshare}/decks. - EOS - end - - plist_options :startup => "true", :manual => "ooniprobe -i #{HOMEBREW_PREFIX}/share/ooniprobe/current.deck" - - def plist - <<~EOS - - - - - Label - #{plist_name} - EnvironmentVariables - - PATH - #{HOMEBREW_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin - - ProgramArguments - - #{opt_bin}/ooniprobe-agent - run - - RunAtLoad - - KeepAlive - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - WorkingDirectory - #{opt_prefix} - - - EOS - end - - test do - (testpath/"ooni/var_lib").mkpath - (testpath/"ooni/etc").mkpath - - (testpath/"ooni/settings.ini").atomic_write <<~EOS - [directories] - usr_share = #{pkgshare} - var_lib = #{testpath}/ooni/var_lib - etc = #{testpath}/ooni/etc - EOS - touch testpath/"ooni/var_lib/initialized" - - (testpath/"ooni/hosts.txt").write "github.com:443\n" - ENV["OONIPROBE_SETTINGS"] = "#{testpath}/ooni/settings.ini" - system bin/"ooniprobe", "-ng", "blocking/tcp_connect", "-f", testpath/"ooni/hosts.txt" - end -end diff --git a/Formula/opa.rb b/Formula/opa.rb deleted file mode 100644 index 67f66e98481fb..0000000000000 --- a/Formula/opa.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Opa < Formula - desc "Open source, general-purpose policy engine" - homepage "https://www.openpolicyagent.org" - url "https://github.com/open-policy-agent/opa/archive/v0.10.2.tar.gz" - sha256 "2ffcbd4bb57790a7c397f15af6f88bad468c98dcf75bee48eb040f52c96bbc1c" - - bottle do - cellar :any_skip_relocation - sha256 "df64c27d4b39d0762d125d8368cace9d44508fb66a64b808e8d5c64f0d39022c" => :mojave - sha256 "c3e4a2baaff9d70e205d82317beb6164d13503e3b71b42d6c87ac7564733a24c" => :high_sierra - sha256 "558d64e6fc846b0c8f372c357de0bc9ac37323b9c2f158e12e973f1a607a1140" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/open-policy-agent/opa").install buildpath.children - - cd "src/github.com/open-policy-agent/opa" do - system "go", "build", "-o", bin/"opa", "-installsuffix", "static", - "-ldflags", - "-X github.com/open-policy-agent/opa/version.Version=#{version}" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/opa eval -f pretty '[x, 2] = [1, y]' 2>&1") - assert_equal "+---+---+\n| x | y |\n+---+---+\n| 1 | 2 |\n+---+---+\n", output - assert_match "Version: #{version}", shell_output("#{bin}/opa version 2>&1") - end -end diff --git a/Formula/opam.rb b/Formula/opam.rb deleted file mode 100644 index b3f2aa67cb80c..0000000000000 --- a/Formula/opam.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Opam < Formula - desc "The OCaml package manager" - homepage "https://opam.ocaml.org" - url "https://github.com/ocaml/opam/releases/download/2.0.2/opam-full-2.0.2.tar.gz" - sha256 "eeb99fdda4b10ad3467a700fa4d1dfedb30714837d18d2faf1ef9c87d94cf0bc" - head "https://github.com/ocaml/opam.git" - - bottle do - cellar :any_skip_relocation - sha256 "40f80c1a90dc1bbe63cabf10979ba12353ad523a79d0162948eff886c5427fac" => :mojave - sha256 "f76f5362a72ff5808931b7161074fb4de9335644c0442cbb941c70a2c2deeb03" => :high_sierra - sha256 "904ffb1cc140dacf82d724028b341320cd9eb7b9e28d20846e5f5ecdd9deec45" => :sierra - end - - depends_on "ocaml" => [:build, :test] - - def install - ENV.deparallelize - - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "lib-ext" - system "make" - system "make", "man" - system "make", "install" - - bash_completion.install "src/state/shellscripts/complete.sh" - zsh_completion.install "src/state/shellscripts/complete.zsh" => "_opam" - end - - def caveats; <<~EOS - OPAM uses ~/.opam by default for its package database, so you need to - initialize it first by running: - - $ opam init - EOS - end - - test do - system bin/"opam", "init", "--disable-sandboxing" - system bin/"opam", "list" - end -end diff --git a/Formula/open-babel.rb b/Formula/open-babel.rb deleted file mode 100644 index 50e2fe365c4f1..0000000000000 --- a/Formula/open-babel.rb +++ /dev/null @@ -1,68 +0,0 @@ -class OpenBabel < Formula - desc "Chemical toolbox" - homepage "https://openbabel.org" - url "https://github.com/openbabel/openbabel/archive/openbabel-2-4-1.tar.gz" - version "2.4.1" - sha256 "594c7f8a83f3502381469d643f7b185882da1dd4bc2280c16502ef980af2a776" - head "https://github.com/openbabel/openbabel.git" - - bottle do - sha256 "4dfa1e352686274b2fb985bb6dbf2b5926565dc669266f9c85f0413fa72e3f07" => :mojave - sha256 "2e830e6b8a7ae79015bb06e05b04935f6a63525cac28cca53dcb72f49334bc83" => :high_sierra - sha256 "28bb84f75639741efbbf3a19ebffc1fc122d15fa74584440b84e265cdfd18db0" => :sierra - sha256 "d2ca98556d58c6268b6be3f93cfc9a00a79559d081d7713ed14bc7882212b2ef" => :el_capitan - sha256 "48724ff8b63ea446ea0f2095361ea93de0647eec2e220c8369b9910a11450213" => :yosemite - end - - option "with-cairo", "Support PNG depiction" - option "with-java", "Compile Java language bindings" - option "with-python@2", "Compile Python 2 language bindings" - option "with-wxmac", "Build with GUI" - - deprecated_option "with-python" => "with-python@2" - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "eigen" - depends_on "cairo" => :optional - depends_on "python@2" => :optional - depends_on "swig" if build.with?("python@2") || build.with?("java") - depends_on "wxmac" => :optional - - def install - args = std_cmake_args - args << "-DRUN_SWIG=ON" if build.with?("python@2") || build.with?("java") - args << "-DJAVA_BINDINGS=ON" if build.with? "java" - args << "-DBUILD_GUI=ON" if build.with? "wxmac" - - # Point cmake towards correct python - if build.with? "python@2" - ENV.prepend_path "PATH", Formula["python@2"].opt_libexec/"bin" - pypref = `python -c 'import sys;print(sys.prefix)'`.strip - pyinc = `python -c 'from distutils import sysconfig;print(sysconfig.get_python_inc(True))'`.strip - args << "-DPYTHON_BINDINGS=ON" - args << "-DPYTHON_INCLUDE_DIR='#{pyinc}'" - args << "-DPYTHON_LIBRARY='#{pypref}/lib/libpython2.7.dylib'" - end - - args << "-DCAIRO_LIBRARY:FILEPATH=" if build.without? "cairo" - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - (pkgshare/"java").install lib/"openbabel.jar" if build.with? "java" - end - - def caveats - <<~EOS - Java libraries are installed to #{opt_pkgshare}/java so this path should - be included in the CLASSPATH environment variable. - EOS - end - - test do - system "#{bin}/obabel", "-:'C1=CC=CC=C1Br'", "-omol" - end -end diff --git a/Formula/open-cobol.rb b/Formula/open-cobol.rb deleted file mode 100644 index e0abc6f4aeb17..0000000000000 --- a/Formula/open-cobol.rb +++ /dev/null @@ -1,31 +0,0 @@ -class OpenCobol < Formula - desc "COBOL compiler" - # Canonical domain: opencobol.org - homepage "https://sourceforge.net/projects/open-cobol/" - url "https://downloads.sourceforge.net/project/open-cobol/open-cobol/1.1/open-cobol-1.1.tar.gz" - sha256 "6ae7c02eb8622c4ad55097990e9b1688a151254407943f246631d02655aec320" - revision 2 - - bottle do - sha256 "633c325469f52c99c437a44dc2647e18fd8a841caa1779e1443cef1b898d1b75" => :mojave - sha256 "c4f335dae8e5235f9615a87a018fe89b05857974023ff1973ec198705b3cd44b" => :high_sierra - sha256 "c05a8ff66d8ad775049c2e1f400c4bde52d7f0ec13d7b2b40d94d9fc4b451c01" => :sierra - sha256 "c9fc1e375ec061b9a90a5cc29446a61fe7f49e75d1a78c6888adee889e9258d5" => :el_capitan - end - - depends_on "berkeley-db" - depends_on "gmp" - - conflicts_with "gnu-cobol", - :because => "both install `cob-config`, `cobc` and `cobcrun` binaries" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--infodir=#{info}" - system "make", "install" - end - - test do - system "#{bin}/cobc", "--help" - end -end diff --git a/Formula/open-completion.rb b/Formula/open-completion.rb deleted file mode 100644 index d8d40f6c0ceb5..0000000000000 --- a/Formula/open-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class OpenCompletion < Formula - desc "Bash completion for open" - homepage "https://github.com/moshen/open-bash-completion" - url "https://github.com/moshen/open-bash-completion/archive/v1.0.3.tar.gz" - sha256 "e7ed931d49d2c9ed5bc4fcad1b60a8c4cb6d4bca86948cb54e6689f313a2029e" - head "https://github.com/moshen/open-bash-completion.git" - - bottle :unneeded - - def install - bash_completion.install "open" - end - - test do - assert_match "-F _open", - shell_output("source #{bash_completion}/open && complete -p open") - end -end diff --git a/Formula/open-jtalk.rb b/Formula/open-jtalk.rb deleted file mode 100644 index 298bb23701ed7..0000000000000 --- a/Formula/open-jtalk.rb +++ /dev/null @@ -1,67 +0,0 @@ -class OpenJtalk < Formula - desc "Japanese text-to-speech system" - homepage "https://open-jtalk.sourceforge.io/" - url "https://downloads.sourceforge.net/project/open-jtalk/Open%20JTalk/open_jtalk-1.10/open_jtalk-1.10.tar.gz" - sha256 "5b77ee729e546ca6a22d0b08cda0923fb4225fa782b26c2511b66cc644c14b7d" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f71eb4d92a5bba718ac8c7e7a16f54c65651819db3b17a99d5701cafa12e596c" => :mojave - sha256 "6acdf89723494c61c4118b157b283b2eb9579846b34b6168908132750a4f99c8" => :high_sierra - sha256 "a472664a3ab3edb6fe9198aeecfc8c4881cf62298c09eec9dce78ad04a591f5c" => :sierra - sha256 "1f688549f09842e4513ee93386e747fc5b819239a808c0b6de08e74f41619f37" => :el_capitan - sha256 "ebcd63c3814851c22a8e536791a8ece8fd7b77a9dd77856b0aec705eab82e0b0" => :yosemite - end - - resource "hts_engine API" do - url "https://downloads.sourceforge.net/project/hts-engine/hts_engine%20API/hts_engine_API-1.10/hts_engine_API-1.10.tar.gz" - sha256 "e2132be5860d8fb4a460be766454cfd7c3e21cf67b509c48e1804feab14968f7" - end - - resource "voice" do - url "https://downloads.sourceforge.net/project/open-jtalk/HTS%20voice/hts_voice_nitech_jp_atr503_m001-1.05/hts_voice_nitech_jp_atr503_m001-1.05.tar.gz" - sha256 "2e555c88482267b2931c7dbc7ecc0e3df140d6f68fc913aa4822f336c9e0adfc" - end - - resource "mei" do - url "https://downloads.sourceforge.net/project/mmdagent/MMDAgent_Example/MMDAgent_Example-1.7/MMDAgent_Example-1.7.zip" - sha256 "5b560e8c23c5acaf67688e6e25788db2c0bb230aff0635b7c75a82a87c7f6dba" - end - - def install - resource("hts_engine API").stage do - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - system "./configure", "--with-hts-engine-header-path=#{include}", - "--with-hts-engine-library-path=#{lib}", - "--with-charset=UTF-8", - "--prefix=#{prefix}" - - if MacOS.version <= :mavericks - inreplace "config.status", "-finput-charset=UTF-8 -fexec-charset=UTF-8", "" - # https://sourceforge.net/p/open-jtalk/mailman/message/33404251/ - end - - system "make", "install" - - resource("voice").stage do - (prefix/"voice/m100").install Dir["*"] - end - - resource("mei").stage do - (prefix/"voice").install "Voice/mei" - end - end - - test do - (testpath/"sample.txt").write "OpenJTalkのインストールが完了しました。" - system bin/"open_jtalk", - "-x", "#{prefix}/dic", - "-m", "#{prefix}/voice/mei/mei_normal.htsvoice", - "-ow", "out.wav", - "sample.txt" - end -end diff --git a/Formula/open-mesh.rb b/Formula/open-mesh.rb deleted file mode 100644 index 4f09d1108f400..0000000000000 --- a/Formula/open-mesh.rb +++ /dev/null @@ -1,74 +0,0 @@ -class OpenMesh < Formula - desc "Generic data structure to represent and manipulate polygonal meshes" - homepage "https://openmesh.org/" - url "https://www.openmesh.org/media/Releases/7.1/OpenMesh-7.1.tar.bz2" - sha256 "71cd5eb25893b0369ac766bb8305a525ffbb39b7f796d2878c7f9b8e0827cbac" - head "https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh.git" - - bottle do - cellar :any - sha256 "569d019aa380afeff5ab62e031426ef62660b391ee6eb5b55ef1fd793860015e" => :mojave - sha256 "b7cefbc94249260c254e22d7502c2e21d86149784c20580ad5708f69a177ad81" => :high_sierra - sha256 "5d7fbe275ebec95a6f3abe24ac13d6b9bdb1df2e07bb43c92dd8e9e6383105c5" => :sierra - sha256 "77e73ad0a825ceae51b0bb906005a1c3e6fab6527adf7f2fcde9a12351d89dc8" => :el_capitan - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - mkdir "build" do - system "cmake", "..", "-DBUILD_APPS=OFF", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - typedef OpenMesh::PolyMesh_ArrayKernelT<> MyMesh; - int main() - { - MyMesh mesh; - MyMesh::VertexHandle vhandle[4]; - vhandle[0] = mesh.add_vertex(MyMesh::Point(-1, -1, 1)); - vhandle[1] = mesh.add_vertex(MyMesh::Point( 1, -1, 1)); - vhandle[2] = mesh.add_vertex(MyMesh::Point( 1, 1, 1)); - vhandle[3] = mesh.add_vertex(MyMesh::Point(-1, 1, 1)); - std::vector face_vhandles; - face_vhandles.clear(); - face_vhandles.push_back(vhandle[0]); - face_vhandles.push_back(vhandle[1]); - face_vhandles.push_back(vhandle[2]); - face_vhandles.push_back(vhandle[3]); - mesh.add_face(face_vhandles); - try - { - if ( !OpenMesh::IO::write_mesh(mesh, "triangle.off") ) - { - std::cerr << "Cannot write mesh to file 'triangle.off'" << std::endl; - return 1; - } - } - catch( std::exception& x ) - { - std::cerr << x.what() << std::endl; - return 1; - } - return 0; - } - - EOS - flags = %W[ - -I#{include} - -L#{lib} - -lOpenMeshCore - -lOpenMeshTools - ] - system ENV.cxx, "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/open-mpi.rb b/Formula/open-mpi.rb deleted file mode 100644 index 72040ab5e1c68..0000000000000 --- a/Formula/open-mpi.rb +++ /dev/null @@ -1,95 +0,0 @@ -class OpenMpi < Formula - desc "High performance message passing library" - homepage "https://www.open-mpi.org/" - url "https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.0.tar.bz2" - sha256 "2f0b8a36cfeb7354b45dda3c5425ef8393c9b04115570b615213faaa3f97366b" - - bottle do - sha256 "144bf979a8e13639714b4d0b55a4f7a49b74f4942fc655b29c8cc56879d3e95e" => :mojave - sha256 "ba0dbe6719d413637ad2fa1557126c88bc0ac49191e4efefea75508de568311a" => :high_sierra - sha256 "b862fdf7f2c21dddc9e7e1f180622f9a398cb76091cb84fb2181cead9073eb6f" => :sierra - end - - head do - url "https://github.com/open-mpi/ompi.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - option "with-cxx-bindings", "Enable C++ MPI bindings (deprecated as of MPI-3.0)" - - depends_on "gcc" - depends_on "libevent" - - conflicts_with "mpich", :because => "both install MPI compiler wrappers" - - needs :cxx11 - - def install - # otherwise libmpi_usempi_ignore_tkr gets built as a static library - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-silent-rules - --enable-ipv6 - --with-libevent=#{Formula["libevent"].opt_prefix} - --with-sge - ] - args << "--with-platform-optimized" if build.head? - args << "--enable-mpi-cxx" if build.with? "cxx-bindings" - # fixes an issue in 4.0.0, should be fixed in 4.0.1 - args << "--enable-mpi1-compatibility" - - system "./autogen.pl" if build.head? - system "./configure", *args - system "make", "all" - system "make", "check" - system "make", "install" - - # Fortran bindings install stray `.mod` files (Fortran modules) in `lib` - # that need to be moved to `include`. - include.install Dir["#{lib}/*.mod"] - end - - test do - (testpath/"hello.c").write <<~EOS - #include - #include - - int main() - { - int size, rank, nameLen; - char name[MPI_MAX_PROCESSOR_NAME]; - MPI_Init(NULL, NULL); - MPI_Comm_size(MPI_COMM_WORLD, &size); - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Get_processor_name(name, &nameLen); - printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name); - MPI_Finalize(); - return 0; - } - EOS - system bin/"mpicc", "hello.c", "-o", "hello" - system "./hello" - system bin/"mpirun", "./hello" - (testpath/"hellof.f90").write <<~EOS - program hello - include 'mpif.h' - integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) - call MPI_INIT(ierror) - call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) - call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) - print*, 'node', rank, ': Hello Fortran world' - call MPI_FINALIZE(ierror) - end - EOS - system bin/"mpif90", "hellof.f90", "-o", "hellof" - system "./hellof" - system bin/"mpirun", "./hellof" - end -end diff --git a/Formula/open-ocd.rb b/Formula/open-ocd.rb deleted file mode 100644 index 2bef241b10786..0000000000000 --- a/Formula/open-ocd.rb +++ /dev/null @@ -1,42 +0,0 @@ -class OpenOcd < Formula - desc "On-chip debugging, in-system programming and boundary-scan testing" - homepage "https://sourceforge.net/projects/openocd/" - url "https://downloads.sourceforge.net/project/openocd/openocd/0.10.0/openocd-0.10.0.tar.bz2" - sha256 "7312e7d680752ac088b8b8f2b5ba3ff0d30e0a78139531847be4b75c101316ae" - - bottle do - rebuild 2 - sha256 "491bec9acdc4e446a6515975041f21dec919ba330f88b5a69e8651ddd9c07468" => :mojave - sha256 "0258f4d658907060d890c978a4d122ac5501119c4d28bb272e4bf5bc59bd8852" => :high_sierra - sha256 "790605e83cc22ab4a455a382f7b6a434d44c19f82e0b8a0ee6a3bf28ac6f9f31" => :sierra - end - - head do - url "https://git.code.sf.net/p/openocd/code.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "texinfo" => :build - end - - depends_on "pkg-config" => :build - depends_on "hidapi" - depends_on "libftdi" - depends_on "libusb" - depends_on "libusb-compat" - - def install - ENV["CCACHE"] = "none" - - system "./bootstrap", "nosubmodule" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-buspirate", - "--enable-stlink", - "--enable-dummy", - "--enable-jtag_vpi", - "--enable-remote-bitbang" - system "make", "install" - end -end diff --git a/Formula/open-scene-graph.rb b/Formula/open-scene-graph.rb deleted file mode 100644 index f8625571e0d93..0000000000000 --- a/Formula/open-scene-graph.rb +++ /dev/null @@ -1,82 +0,0 @@ -class OpenSceneGraph < Formula - desc "3D graphics toolkit" - homepage "https://github.com/openscenegraph/OpenSceneGraph" - url "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.3.tar.gz" - sha256 "51bbc79aa73ca602cd1518e4e25bd71d41a10abd296e18093a8acfebd3c62696" - head "https://github.com/openscenegraph/OpenSceneGraph.git" - - bottle do - sha256 "153c47045ba21b94581aed7375218a38534077fc8920090dc541627d09ef36c5" => :mojave - sha256 "adabb1b668bdfec8e6ccc1e05a91577bbe0c58487d345b662c3acaae2298e8a9" => :high_sierra - sha256 "8f69c72133ca7100385f49d104f33517c66aefe7c76bb22e08b28c8aaa4c6385" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "graphviz" => :build - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "gtkglext" - depends_on "jpeg" - depends_on "sdl" - - # patch necessary to ensure support for gtkglext-quartz - # filed as an issue to the developers https://github.com/openscenegraph/osg/issues/34 - patch :DATA - - def install - # Fix "fatal error: 'os/availability.h' file not found" on 10.11 and - # "error: expected function body after function declarator" on 10.12 - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - args = std_cmake_args - args << "-DBUILD_DOCUMENTATION=ON" - args << "-DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=ON" - args << "-DCMAKE_DISABLE_FIND_PACKAGE_GDAL=ON" - args << "-DCMAKE_DISABLE_FIND_PACKAGE_TIFF=ON" - args << "-DCMAKE_DISABLE_FIND_PACKAGE_cairo=ON" - args << "-DCMAKE_CXX_FLAGS=-Wno-error=narrowing" # or: -Wno-c++11-narrowing - args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch_64_bit}" - args << "-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio" - args << "-DOSG_WINDOWING_SYSTEM=Cocoa" - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "doc_openscenegraph" - system "make", "install" - doc.install Dir["#{prefix}/doc/OpenSceneGraphReferenceDocs/*"] - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace std; - int main() - { - cout << osgGetVersion() << endl; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-losg", "-o", "test" - assert_equal `./test`.chomp, version.to_s - end -end -__END__ -diff --git a/CMakeModules/FindGtkGl.cmake b/CMakeModules/FindGtkGl.cmake -index 321cede..6497589 100644 ---- a/CMakeModules/FindGtkGl.cmake -+++ b/CMakeModules/FindGtkGl.cmake -@@ -10,7 +10,7 @@ IF(PKG_CONFIG_FOUND) - IF(WIN32) - PKG_CHECK_MODULES(GTKGL gtkglext-win32-1.0) - ELSE() -- PKG_CHECK_MODULES(GTKGL gtkglext-x11-1.0) -+ PKG_CHECK_MODULES(GTKGL gtkglext-quartz-1.0) - ENDIF() - - ENDIF() diff --git a/Formula/open-sp.rb b/Formula/open-sp.rb deleted file mode 100644 index 1ee9144475a59..0000000000000 --- a/Formula/open-sp.rb +++ /dev/null @@ -1,46 +0,0 @@ -class OpenSp < Formula - desc "SGML parser" - homepage "https://openjade.sourceforge.io" - url "https://downloads.sourceforge.net/project/openjade/opensp/1.5.2/OpenSP-1.5.2.tar.gz" - sha256 "57f4898498a368918b0d49c826aa434bb5b703d2c3b169beb348016ab25617ce" - - bottle do - rebuild 4 - sha256 "0c34e7815d7b7f654210102518787bf4c07e6ef811bae5167967747a99b762ab" => :mojave - sha256 "41deb89bf8fd39c9d99eb171039a949fba4e82eb86d674d2584ae70a0e3ecc73" => :high_sierra - sha256 "77f282ed97f428763c7952365353a6b915ff3315d7808db73a51e785961e989c" => :sierra - sha256 "03629f243a1598b2b26fc07f8b747c77b62efe88ce435d8e018167140d22b86e" => :el_capitan - end - - depends_on "docbook" => :build - depends_on "ghostscript" => :build - depends_on "xmlto" => :build - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--enable-http", - "--enable-default-catalog=#{etc}/sgml/catalog" - - system "make", "pkgdatadir=#{share}/sgml/opensp", "install" - end - - test do - (testpath/"eg.sgml").write <<~EOS - - - - ]> - - Hello - - EOS - - system "#{bin}/onsgmls", "--warning=type-valid", "eg.sgml" - end -end diff --git a/Formula/open-tyrian.rb b/Formula/open-tyrian.rb deleted file mode 100644 index f1a702155d81e..0000000000000 --- a/Formula/open-tyrian.rb +++ /dev/null @@ -1,44 +0,0 @@ -class OpenTyrian < Formula - desc "Open-source port of Tyrian" - homepage "https://bitbucket.org/opentyrian/opentyrian" - url "https://www.camanis.net/opentyrian/releases/opentyrian-2.1.20130907-src.tar.gz" - sha256 "f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f" - head "https://bitbucket.org/opentyrian/opentyrian", :using => :hg - - bottle do - sha256 "2b3baee271c7575088df18c5172ef15ee9f7a38e87adffeb2769aad70bce0b6d" => :mojave - sha256 "d6e606749fa4e1a9d1fea42ede8d2a195677f112c20f3c23cd3b0bb86988b84f" => :high_sierra - sha256 "4f55db177b78370597bc596797cfb9f08c3a7249ce3e53130fc349d4b4fdb6d5" => :sierra - sha256 "90612b1c31262d8e0ae681842197370d278b51fdb46cce6a0a40e2595a4c831a" => :el_capitan - sha256 "6c3ebd2d00d744211373e8457a3df645a5d402e521b40f7c46139cc9e4c33dc6" => :yosemite - end - - depends_on "sdl" - depends_on "sdl_net" - - resource "data" do - url "https://camanis.net/tyrian/tyrian21.zip" - sha256 "7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277" - end - - def install - datadir = pkgshare/"data" - datadir.install resource("data") - args = [] - if build.head? - args << "TYRIAN_DIR=#{datadir}" - else - inreplace "src/file.c", "/usr/share/opentyrian/data", datadir - end - system "make", *args - bin.install "opentyrian" - end - - def caveats - "Save games will be put in ~/.opentyrian" - end - - test do - system "#{bin}/opentyrian", "--help" - end -end diff --git a/Formula/open-zwave.rb b/Formula/open-zwave.rb deleted file mode 100644 index e0093e793689a..0000000000000 --- a/Formula/open-zwave.rb +++ /dev/null @@ -1,133 +0,0 @@ -class OpenZwave < Formula - desc "Library for selected Z-Wave PC controllers" - homepage "http://www.openzwave.com" - url "http://old.openzwave.com/downloads/openzwave-1.2.919.tar.gz" - sha256 "473229f3dd3d6b260e6584b17e5c5f2e09e61805f89763f486a9f7aa2b4181ba" - - bottle do - sha256 "cf06f87e2f334038f09897ed3bc91aba37e037bd3a2a8850b81ec58d4b3bad45" => :mojave - sha256 "ee97a2cce9fed3f63fb917e09e448f35815eff5120ebae16711777be4796d5c0" => :high_sierra - sha256 "68502b64e9fb7031f9fc5fe4fa7e6714fd5e5ab93d467169e7e47e90c322ff64" => :sierra - sha256 "4bf1d8a8ba3fcf4ee39df9bfe09017d3a432047e5e6bf0dce6f6e612ad174b95" => :el_capitan - sha256 "9ceb267d8fb564daefb535f65ac71f426535f7552b9feffcb3638793f0c40810" => :yosemite - sha256 "753eb6cb76dd0c170c1e84285a702fb9fb49c76aa8d59970ecea2160938f0bba" => :mavericks - sha256 "be2b4c51703ee93865a6c755a4394b6271eb599ea98a7431b54d090276a0e9f7" => :mountain_lion - end - - # Patch to build a .dylib instead of a .so - # This patch has been merged upstream and can be removed after the next release: - # https://code.google.com/p/open-zwave/source/detail?r=954 - patch :DATA - - def install - ENV["BUILD"] = "release" - ENV["PREFIX"] = prefix - - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include "Options.h" - int main() { - OpenZWave::Options::Create("", "", ""); - return 0; - } - EOS - system ENV.cxx, "-o", "test", "-I", prefix/"include/openzwave", "-L#{lib}", "-lopenzwave", "test.cpp" - system "./test" - end -end - -__END__ -diff --git a/cpp/build/Makefile b/cpp/build/Makefile -index 24df4f5..b064029 100644 ---- a/cpp/build/Makefile -+++ b/cpp/build/Makefile -@@ -23,16 +23,24 @@ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../) - - include $(top_srcdir)/cpp/build/support.mk - -+#Mac prefers a dylib, not a so -+ifeq ($(UNAME),Darwin) -+SHARED_LIB_NAME=libopenzwave-$(VERSION).dylib -+SHARED_LIB_UNVERSIONED=libopenzwave.dylib -+else -+SHARED_LIB_NAME=libopenzwave.so.$(VERSION) -+SHARED_LIB_UNVERSIONED=libopenzwave.so -+endif - - #if we are on a Mac, add these flags and libs to the compile and link phases - ifeq ($(UNAME),Darwin) - CFLAGS += -c -DDARWIN -arch i386 -arch x86_64 --LDFLAGS += -arch i386 -arch x86_64 -+LDFLAGS += -arch i386 -arch x86_64 -dynamiclib - LIBS += -framework IOKit -framework CoreFoundation -arch i386 -arch x86_64 - else ifeq ($(UNAME),FreeBSD) - CFLAGS += -I/usr/local/include - else --LDFLAGS += -Wl,-soname,libopenzwave.so.$(VERSION) -+LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB_NAME) - LIBS += -ludev - endif - -@@ -74,10 +82,10 @@ indep := $(notdir $(filter-out $(top_srcdir)/cpp/src/vers.cpp, $(wildcard $(top_ - aes := $(notdir $(wildcard $(top_srcdir)/cpp/src/aes/*.c)) - - --default: $(LIBDIR)/libopenzwave.a $(LIBDIR)/libopenzwave.so.$(VERSION) -+default: $(LIBDIR)/libopenzwave.a $(LIBDIR)/$(SHARED_LIB_NAME) - - clean: -- @rm -rf $(DEPDIR) $(OBJDIR) $(LIBDIR)/libopenzwave.so* $(LIBDIR)/libopenzwave.a $(top_builddir)/libopenzwave.pc $(top_builddir)/docs/api $(top_builddir)/Doxyfile -+ @rm -rf $(DEPDIR) $(OBJDIR) $(LIBDIR)/libopenzwave.so* $(LIBDIR)/libopenzwave-*.dylib $(LIBDIR)/libopenzwave.a $(top_builddir)/libopenzwave.pc $(top_builddir)/docs/api $(top_builddir)/Doxyfile - - - -include $(patsubst %.cpp,$(DEPDIR)/%.d,$(tinyxml)) -@@ -110,7 +118,7 @@ $(LIBDIR)/libopenzwave.a: $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \ - @$(AR) $@ $+ - @$(RANLIB) $@ - --$(LIBDIR)/libopenzwave.so.$(VERSION): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \ -+$(LIBDIR)/$(SHARED_LIB_NAME): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \ - $(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \ - $(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \ - $(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \ -@@ -120,7 +128,7 @@ $(LIBDIR)/libopenzwave.so.$(VERSION): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) - $(OBJDIR)/vers.o - @echo "Linking Shared Library" -- @$(LD) $(LDFLAGS) -shared -o $@ $+ $(LIBS) -- @ln -sf libopenzwave.so.$(VERSION) $(LIBDIR)/libopenzwave.so -+ @$(LD) $(LDFLAGS) -o $@ $+ $(LIBS) -+ @ln -sf $(SHARED_LIB_NAME) $(LIBDIR)/$(SHARED_LIB_UNVERSIONED) - - ifeq ($(PKGCONFIG),) - $(top_builddir)/libopenzwave.pc: $(top_srcdir)/cpp/build/libopenzwave.pc.in -@@ -155,10 +163,10 @@ doc: $(top_builddir)/Doxyfile - @cd $(top_builddir); $(DOXYGEN) - endif - --install: $(LIBDIR)/libopenzwave.so.$(VERSION) doc $(top_builddir)/libopenzwave.pc -+install: $(LIBDIR)/$(SHARED_LIB_NAME) doc $(top_builddir)/libopenzwave.pc - install -d $(DESTDIR)/$(instlibdir)/ -- cp $(LIBDIR)/libopenzwave.so.$(VERSION) $(DESTDIR)/$(instlibdir)/libopenzwave.so.$(VERSION) -- ln -sf libopenzwave.so.$(VERSION) $(DESTDIR)/$(instlibdir)/libopenzwave.so -+ cp $(LIBDIR)/$(SHARED_LIB_NAME) $(DESTDIR)/$(instlibdir)/$(SHARED_LIB_NAME) -+ ln -sf $(SHARED_LIB_NAME) $(DESTDIR)/$(instlibdir)/$(SHARED_LIB_UNVERSIONED) - install -d $(DESTDIR)/$(includedir) - install -m 0644 $(top_srcdir)/cpp/src/*.h $(DESTDIR)/$(includedir) - install -d $(DESTDIR)/$(includedir)/command_classes/ -diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile -index 0f1fd50..3805a39 100644 ---- a/cpp/examples/MinOZW/Makefile -+++ b/cpp/examples/MinOZW/Makefile -@@ -19,7 +19,7 @@ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../../) - - - INCLUDES := -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/ --LIBS = $(wildcard $(LIBDIR)/*.so $(top_builddir)/*.so $(top_builddir)/cpp/build/*.so ) -+LIBS = $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/*.so $(top_builddir)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib ) - LIBSDIR = $(abspath $(dir $(firstword $(LIBS)))) - minozwsrc := $(notdir $(wildcard $(top_srcdir)/cpp/examples/MinOZW/*.cpp)) - VPATH := $(top_srcdir)/cpp/examples/MinOZW diff --git a/Formula/openal-soft.rb b/Formula/openal-soft.rb deleted file mode 100644 index 42dfcb8c7aa25..0000000000000 --- a/Formula/openal-soft.rb +++ /dev/null @@ -1,51 +0,0 @@ -class OpenalSoft < Formula - desc "Implementation of the OpenAL 3D audio API" - homepage "https://openal-soft.org/" - url "https://openal-soft.org/openal-releases/openal-soft-1.18.2.tar.bz2" - sha256 "9f8ac1e27fba15a59758a13f0c7f6540a0605b6c3a691def9d420570506d7e82" - head "https://github.com/kcat/openal-soft.git" - - bottle do - cellar :any - sha256 "1c9061ea72ae4514cc8d47a251faf23eb0c174786bcfa7ff46b10605aa7a8cb8" => :mojave - sha256 "e166ede768b1bdef14b5ae85043e05b34ac6c53e57bb6f73b4fc4b0954f8aab4" => :high_sierra - sha256 "24dd59b5106fb9d6884b20aaf0c79691c7d0eda8e13ba5b943ba5bc49a794787" => :sierra - sha256 "a7946da113c242708cf9aa80c12cc2beedf555fd6a9aed5e7656a983a80e1df4" => :el_capitan - end - - keg_only :provided_by_macos, "macOS provides OpenAL.framework" - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - # clang 4.2's support for alignas is incomplete - fails_with(:clang) { build 425 } - - def install - # Please don't reenable example building. See: - # https://github.com/Homebrew/homebrew/issues/38274 - args = std_cmake_args + %w[ - -DALSOFT_BACKEND_PORTAUDIO=OFF - -DALSOFT_BACKEND_PULSEAUDIO=OFF - -DALSOFT_EXAMPLES=OFF - -DALSOFT_MIDI_FLUIDSYNTH=OFF - ] - - system "cmake", ".", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "AL/al.h" - #include "AL/alc.h" - int main() { - ALCdevice *device; - device = alcOpenDevice(0); - alcCloseDevice(device); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lopenal" - end -end diff --git a/Formula/openapi-generator.rb b/Formula/openapi-generator.rb deleted file mode 100644 index ade736d85f906..0000000000000 --- a/Formula/openapi-generator.rb +++ /dev/null @@ -1,52 +0,0 @@ -class OpenapiGenerator < Formula - desc "Generate clients, server & docs from an OpenAPI spec (v2, v3)" - homepage "https://openapi-generator.tech/" - url "https://search.maven.org/remotecontent?filepath=org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar" - sha256 "24cb04939110cffcdd7062d2f50c6f61159dc3e0ca3b8aecbae6ade53ad3dc8c" - - head do - url "https://github.com/OpenAPITools/openapi-generator.git" - - depends_on "maven" => :build - end - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - # Need to set JAVA_HOME manually since maven overrides 1.8 with 1.7+ - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp - if build.head? - system "mvn", "clean", "package", "-Dmaven.javadoc.skip=true" - libexec.install "modules/openapi-generator-cli/target/openapi-generator-cli.jar" - bin.write_jar_script libexec/"openapi-generator-cli.jar", "openapi-generator" - else - libexec.install "openapi-generator-cli-#{version}.jar" - bin.write_jar_script libexec/"openapi-generator-cli-#{version}.jar", "openapi-generator" - end - end - - test do - (testpath/"minimal.yaml").write <<~EOS - --- - swagger: '2.0' - info: - version: 0.0.0 - title: Simple API - host: localhost - basePath: /v2 - schemes: - - http - paths: - /: - get: - operationId: test_operation - responses: - 200: - description: OK - EOS - system bin/"openapi-generator", "generate", "-i", "minimal.yaml", "-g", "openapi" - end -end diff --git a/Formula/openblas.rb b/Formula/openblas.rb deleted file mode 100644 index 8c52283eb590d..0000000000000 --- a/Formula/openblas.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Openblas < Formula - desc "Optimized BLAS library" - homepage "https://www.openblas.net/" - url "https://github.com/xianyi/OpenBLAS/archive/v0.3.5.tar.gz" - sha256 "0950c14bd77c90a6427e26210d6dab422271bc86f9fc69126725833ecdaa0e85" - head "https://github.com/xianyi/OpenBLAS.git", :branch => "develop" - - bottle do - cellar :any - sha256 "fcb95cdbf79d618ba330640316913e475d7c37c3ab6c122e765a81699e27a4b6" => :mojave - sha256 "03a17b2184b976a1700fdebf5dd74aac95fd4b175b2c724f6ee1dd867273b96a" => :high_sierra - sha256 "b75703924e7e299bdc254d151c3562f061ae0f1824d84a3a5ec4704bb24bf1d2" => :sierra - end - - keg_only :provided_by_macos, - "macOS provides BLAS and LAPACK in the Accelerate framework" - - option "with-openmp", "Enable parallel computations with OpenMP" - - depends_on "gcc" # for gfortran - - fails_with :clang if build.with? "openmp" - - def install - ENV["DYNAMIC_ARCH"] = "1" if build.bottle? - ENV["USE_OPENMP"] = "1" if build.with? "openmp" - - # Must call in two steps - system "make", "CC=#{ENV.cc}", "FC=gfortran", "libs", "netlib", "shared" - system "make", "PREFIX=#{prefix}", "install" - - lib.install_symlink "libopenblas.dylib" => "libblas.dylib" - lib.install_symlink "libopenblas.dylib" => "liblapack.dylib" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include "cblas.h" - - int main(void) { - int i; - double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; - double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; - double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; - cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, - 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); - for (i = 0; i < 9; i++) - printf("%lf ", C[i]); - printf("\\n"); - if (fabs(C[0]-11) > 1.e-5) abort(); - if (fabs(C[4]-21) > 1.e-5) abort(); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lopenblas", - "-o", "test" - system "./test" - end -end diff --git a/Formula/opencascade.rb b/Formula/opencascade.rb deleted file mode 100644 index f401f025d2dc1..0000000000000 --- a/Formula/opencascade.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Opencascade < Formula - desc "3D modeling and numerical simulation software for CAD/CAM/CAE" - homepage "https://www.opencascade.com/content/overview" - url "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_3_0;sf=tgz" - version "7.3.0" - sha256 "7298c5eadc6dd0aeb6265ff2958e8e742d6e3aa65227acce8094f96f1bf6d2ac" - - bottle do - cellar :any - sha256 "25b4aab0484451021f811cc552dd6b50f9ea3f6fcdaa0595fabb656c62e8fd92" => :mojave - sha256 "a117d0b452b4eedae53bec8f2a8156e079d17685d301043cb83c395e089e37a7" => :high_sierra - sha256 "11fb7399df16cad7f6e642fcba6194e30fb4ce3f02ebd157fbbaea69441a0f3f" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "freeimage" - depends_on "freetype" - depends_on "gl2ps" - depends_on "tbb" - - def install - system "cmake", ".", - "-DUSE_FREEIMAGE=ON", - "-DUSE_GL2PS=ON", - "-DUSE_TBB=ON", - "-DINSTALL_DOC_Overview=ON", - "-D3RDPARTY_FREEIMAGE_DIR=#{Formula["freeimage"].opt_prefix}", - "-D3RDPARTY_FREETYPE_DIR=#{Formula["freetype"].opt_prefix}", - "-D3RDPARTY_GL2PS_DIR=#{Formula["gl2ps"].opt_prefix}", - "-D3RDPARTY_TBB_DIR=#{Formula["tbb"].opt_prefix}", - "-D3RDPARTY_TCL_DIR:PATH=#{MacOS.sdk_path_if_needed}/usr", - "-D3RDPARTY_TCL_INCLUDE_DIR=#{MacOS.sdk_path_if_needed}/usr/include", - "-D3RDPARTY_TK_INCLUDE_DIR=#{MacOS.sdk_path_if_needed}/usr/include", - *std_cmake_args - system "make", "install" - - bin.env_script_all_files(libexec/"bin", :CASROOT => prefix) - - # Some apps expect resources in legacy ${CASROOT}/src directory - prefix.install_symlink pkgshare/"resources" => "src" - end - - test do - output = shell_output("#{bin}/DRAWEXE -c \"pload ALL\"") - assert_equal "1", output.chomp - end -end diff --git a/Formula/opencbm.rb b/Formula/opencbm.rb deleted file mode 100644 index dc70f9d1d748e..0000000000000 --- a/Formula/opencbm.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Opencbm < Formula - desc "Provides access to various floppy drive formats" - homepage "https://spiro.trikaliotis.net/opencbm-alpha" - url "https://spiro.trikaliotis.net/Download/opencbm-0.4.99.99/opencbm-0.4.99.99.tar.bz2" - sha256 "b1e4cd73c8459acd48c5e8536d47439bafea51f136f43fde5a4d6a5f7dbaf6c6" - head "https://git.code.sf.net/p/opencbm/code.git" - - bottle do - sha256 "489ae793f9f226c93667cf67f23d7eac1cde97d4ed33549bbe9731fcc824eb2a" => :mojave - sha256 "d9555da83fc70f801663f13cfc4ed34241feec72d29125fb12a2105fce414210" => :high_sierra - sha256 "6ff076233d442f7f15e22595623cf46c38cf1024997240bd48db1e4bb01c44c2" => :sierra - sha256 "6ba3fc869e59f002f6ae897cbb34b4ece023c11371c3d611453b330714b65cba" => :el_capitan - end - - # cc65 is only used to build binary blobs included with the programs; it's - # not necessary in its own right. - depends_on "cc65" => :build - depends_on "libusb-compat" - - # Fix "usb_echo_test.c:32:10: fatal error: 'endian.h' file not found" - # Reported 24 Nov 2017 to www-201506 AT spiro DOT trikaliotis DOT net - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/48bd0fd/opencbm/endian.diff" - sha256 "2221fab81cdc0ca0cfbd55eff01ae3cd10b4e8bfca86082c7cbffb0b73b651cf" - end - - def install - # This one definitely breaks with parallel build. - ENV.deparallelize - - args = %W[ - -fLINUX/Makefile - LIBUSB_CONFIG=#{Formula["libusb-compat"].bin}/libusb-config - PREFIX=#{prefix} - MANDIR=#{man1} - ] - - system "make", *args - system "make", "install-all", *args - end - - test do - system "#{bin}/cbmctrl", "--help" - end -end diff --git a/Formula/opencc.rb b/Formula/opencc.rb deleted file mode 100644 index 82cc7fe85566d..0000000000000 --- a/Formula/opencc.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Opencc < Formula - desc "Simplified-traditional Chinese conversion tool" - homepage "https://github.com/BYVoid/OpenCC" - url "https://dl.bintray.com/byvoid/opencc/opencc-1.0.4.tar.gz" - sha256 "34e728ba9819477e8f8e12726867965e6aa55e7f3390225b2c031f9138b404cb" - - bottle do - sha256 "4c5e5a613f0b12b3fd1dd9ca7d4dce6c67d0b1b9edd2d7b6cf52446e35d1eb27" => :mojave - sha256 "9a4d1024105557dbb8caad9548473bbbc384b4178e880a996d1b843eeaac5df1" => :high_sierra - sha256 "3c228bd803e8914ee9ca3ed00eb67fa9dfcacd8f1a99c5532962d5c4a87acb57" => :sierra - sha256 "9ddf2bdf0563a14a3e1bff8e5a067c605ac59b9f1611c69640035cdb7df6ddfd" => :el_capitan - sha256 "add47f6baf00f83d3ca00d7da59e35f18506f7858e1e6aede4f04660411f2e06" => :yosemite - sha256 "88192e5f330e185f4f18fbd3b6f8e7e5cac7a0f22d88059471ef3fad25a85c77" => :mavericks - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", "-DBUILD_DOCUMENTATION:BOOL=OFF", *std_cmake_args - system "make" - system "make", "install" - end - - test do - input = "中国鼠标软件打印机" - output = shell_output("echo #{input} | #{bin}/opencc") - output = output.force_encoding("UTF-8") if output.respond_to?(:force_encoding) - assert_match "中國鼠標軟件打印機", output - end -end diff --git a/Formula/openclonk.rb b/Formula/openclonk.rb deleted file mode 100644 index 2b4ca2455d49d..0000000000000 --- a/Formula/openclonk.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Openclonk < Formula - desc "Multiplayer action game" - homepage "https://www.openclonk.org/" - url "https://www.openclonk.org/builds/release/7.0/openclonk-7.0-src.tar.bz2" - sha256 "bc1a231d72774a7aa8819e54e1f79be27a21b579fb057609398f2aa5700b0732" - revision 2 - head "https://github.com/openclonk/openclonk", :using => :git - - bottle do - cellar :any - sha256 "e15174b64e0999fcd66abbc585e8c0b789e047bd59df85577f7fe7e3937e5cf6" => :mojave - sha256 "056037f1d797495cce2b0c28be28e76c49a318a339443b48c141a43ca0d871f1" => :high_sierra - sha256 "101621b7af46c82184ad302b2246a6d76abfa3c14ad46a7c810dafaedea87051" => :sierra - sha256 "ce6e5259b6e04779c378221974cdfee36382976aa5ec266804e57f2bad1730f8" => :el_capitan - sha256 "e3ebb625a585702c150f2f74aa71fca61d6bf5d61085fe31e6b42ac42d68ede6" => :yosemite - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "freealut" - depends_on "freetype" - depends_on "glew" - depends_on "jpeg" - depends_on "libogg" - depends_on "libpng" - depends_on "libvorbis" - # Requires some C++14 features missing in Mavericks - depends_on :macos => :yosemite - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - bin.write_exec_script "#{prefix}/openclonk.app/Contents/MacOS/openclonk" - bin.install Dir[prefix/"c4*"] - end - - test do - system bin/"c4group" - end -end diff --git a/Formula/opencoarrays.rb b/Formula/opencoarrays.rb deleted file mode 100644 index b54346bc1f729..0000000000000 --- a/Formula/opencoarrays.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Opencoarrays < Formula - desc "Open-source coarray Fortran ABI, API, and compiler wrapper" - homepage "http://opencoarrays.org" - url "https://github.com/sourceryinstitute/OpenCoarrays/releases/download/2.3.1/OpenCoarrays-2.3.1.tar.gz" - sha256 "2b87cc8c31874ecb01e0300bc99b30e4017714fc0d17690f637d8fa4d48560f3" - revision 1 - head "https://github.com/sourceryinstitute/opencoarrays.git" - - bottle do - cellar :any - sha256 "a827f29f1872e8dd6c144cfb1d42dacc30018ccef3940b56b9857153fc06a638" => :mojave - sha256 "377ee03f5ce15076516e6c7c141076f78693e4b4e81648ed4b445281bafb976b" => :high_sierra - sha256 "7d688179cb4e5ddeb1de8eda2c367b371f7b28ff6b2c6897b1a9274606112a35" => :sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - depends_on "open-mpi" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - (testpath/"tally.f90").write <<~EOS - program main - use iso_c_binding, only : c_int - use iso_fortran_env, only : error_unit - implicit none - integer(c_int) :: tally - tally = this_image() ! this image's contribution - call co_sum(tally) - verify: block - integer(c_int) :: image - if (tally/=sum([(image,image=1,num_images())])) then - write(error_unit,'(a,i5)') "Incorrect tally on image ",this_image() - error stop 2 - end if - end block verify - ! Wait for all images to pass the test - sync all - if (this_image()==1) write(*,*) "Test passed" - end program - EOS - system "#{bin}/caf", "tally.f90", "-o", "tally" - system "#{bin}/cafrun", "-np", "3", "--oversubscribe", "./tally" - end -end diff --git a/Formula/opencolorio.rb b/Formula/opencolorio.rb deleted file mode 100644 index e00a8ab97b1fc..0000000000000 --- a/Formula/opencolorio.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Opencolorio < Formula - desc "Color management solution geared towards motion picture production" - homepage "http://opencolorio.org/" - url "https://github.com/imageworks/OpenColorIO/archive/v1.1.0.tar.gz" - sha256 "228589879e1f11e455a555304007748a8904057088319ebbf172d9384b93c079" - head "https://github.com/imageworks/OpenColorIO.git" - - bottle do - cellar :any - sha256 "4058e3194f1d1667165af7af8592ac008768a82a7aea905a01db468daf83ccac" => :mojave - sha256 "4025f926a9061c72ebbecf1b5bbcb23d27c0ba6d8e2f578deb4cea45c60f409c" => :high_sierra - sha256 "18bf9288a4103a8f57f1869a884d3d1b697305e952eb977bd46f608d7d0695b3" => :sierra - sha256 "9eac0c648be323730035b3885b376db665408f02290efa9dd1263655029a914f" => :el_capitan - end - - deprecated_option "with-python" => "with-python@2" - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "little-cms2" - depends_on "python@2" => :optional - - def install - args = std_cmake_args - args << "-DCMAKE_VERBOSE_MAKEFILE=OFF" - - # OCIO's PyOpenColorIO.so doubles as a shared library. So it lives in lib, rather - # than the usual HOMEBREW_PREFIX/lib/python2.7/site-packages per developer choice. - args << "-DOCIO_BUILD_PYGLUE=OFF" if build.without? "python@2" - - mkdir "macbuild" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - end - - def caveats - <<~EOS - OpenColorIO requires several environment variables to be set. - You can source the following script in your shell-startup to do that: - - #{HOMEBREW_PREFIX}/share/ocio/setup_ocio.sh - - Alternatively the documentation describes what env-variables need set: - - http://opencolorio.org/installation.html#environment-variables - - You will require a config for OCIO to be useful. Sample configuration files - and reference images can be found at: - - http://opencolorio.org/downloads.html - EOS - end - - test do - assert_match "validate", shell_output("#{bin}/ociocheck --help", 1) - end -end diff --git a/Formula/openconnect.rb b/Formula/openconnect.rb deleted file mode 100644 index fd1c3856a5170..0000000000000 --- a/Formula/openconnect.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Openconnect < Formula - desc "Open client for Cisco AnyConnect VPN" - homepage "https://www.infradead.org/openconnect/" - url "ftp://ftp.infradead.org/pub/openconnect/openconnect-8.01.tar.gz" - mirror "https://fossies.org/linux/privat/openconnect-8.01.tar.gz" - sha256 "48868a4f99c81a7474d87fbabb41b8eaa7d32b54771c9f23a7aea72d9cd626fd" - - bottle do - sha256 "e9a11f88f2c226e6e5f9b2197e25f4f13b8c1dbdb237136de4cf1ea97cd19868" => :mojave - sha256 "834d8b3e6558cef61d83172d148d22d4f0d450768ed4e722d8101ac69ff5b5f8" => :high_sierra - sha256 "e2beb9d5cb97c346f1046f810354c06a4c39d08e958e9306f53fe1f7f6e9c894" => :sierra - end - - head do - url "git://git.infradead.org/users/dwmw2/openconnect.git", :shallow => false - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnutls" - - resource "vpnc-script" do - url "http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/6e04e0bbb66c0bf0ae055c0f4e58bea81dbb5c3c:/vpnc-script" - sha256 "48b1673e1bfaacbfa4e766c41e15dd8458726cca8f3e07991d078d0d5b7c55e9" - end - - def install - etc.install resource("vpnc-script") - chmod 0755, "#{etc}/vpnc-script" - - if build.head? - ENV["LIBTOOLIZE"] = "glibtoolize" - system "./autogen.sh" - end - - args = %W[ - --prefix=#{prefix} - --sbindir=#{bin} - --localstatedir=#{var} - --with-vpnc-script=#{etc}/vpnc-script - ] - - system "./configure", *args - system "make", "install" - end - - test do - assert_match "Open client for multiple VPN protocols", pipe_output("#{bin}/openconnect 2>&1") - end -end diff --git a/Formula/opencore-amr.rb b/Formula/opencore-amr.rb deleted file mode 100644 index 60b93ba916814..0000000000000 --- a/Formula/opencore-amr.rb +++ /dev/null @@ -1,20 +0,0 @@ -class OpencoreAmr < Formula - desc "Audio codecs extracted from Android open source project" - homepage "https://opencore-amr.sourceforge.io/" - url "https://downloads.sourceforge.net/opencore-amr/opencore-amr-0.1.5.tar.gz" - sha256 "2c006cb9d5f651bfb5e60156dbff6af3c9d35c7bbcc9015308c0aff1e14cd341" - - bottle do - cellar :any - sha256 "816d5463797b6412fd8944b98ab79d766dcf886b9eb37d83778fb7648d995603" => :mojave - sha256 "5f5f7853d97b957abb8671af372bd3a4a13191ccd135799cbad44aa3c66034ec" => :high_sierra - sha256 "2b6378d4427dc88bac7e01d2614dd100535f1d78b1e6b81560e3a074e1d5a770" => :sierra - sha256 "4b628ad01f725342698a8556c4176f5d57e3647cc0f52669092a0523b76cc5d0" => :el_capitan - sha256 "0e8940ad28407b353c69b7fa0cdcd7d90777345f5ea86dcc9974552f99c1030c" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/opencsg.rb b/Formula/opencsg.rb deleted file mode 100644 index be9c24e5c6a99..0000000000000 --- a/Formula/opencsg.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Opencsg < Formula - desc "The CSG rendering library" - homepage "http://www.opencsg.org" - url "http://www.opencsg.org/OpenCSG-1.4.2.tar.gz" - sha256 "d952ec5d3a2e46a30019c210963fcddff66813efc9c29603b72f9553adff4afb" - revision 1 - - bottle do - cellar :any - sha256 "2b07411fdabadd95d0cca10b610937e9c93f67c8c17e166b47ee3d8c1cb136a2" => :mojave - sha256 "9bbf3895cab4adcea76a072f2ee1b625e82bb4eaa9b5043d34b238ef0142f223" => :high_sierra - sha256 "18ab9e25f6af26d9f20560d9038b06f18e483e60ff55fcb63acb15e57b51e2eb" => :sierra - sha256 "1f886dbe08d51e4319b4e2c8a110a0f298e9568c21c15891f2f001f12f8b3155" => :el_capitan - sha256 "e5487c53392c8d7df4952244ecef3c35ca5b87848af2d30bc8a334fb8e3e9f04" => :yosemite - end - - depends_on "qt" => :build - depends_on "glew" - - # This patch disabling building examples - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/990b9bb/opencsg/disable-examples.diff" - sha256 "12cc799a6352eda4a18706eeefea059d14e23605a627dc12ed2a809f65328d69" - end - - def install - system "qmake", "-r", "INSTALLDIR=#{prefix}", - "INCLUDEPATH+=#{Formula["glew"].opt_include}", - "LIBS+=-L#{Formula["glew"].opt_lib} -lGLEW" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - class Test : public OpenCSG::Primitive { - public: - Test() : OpenCSG::Primitive(OpenCSG::Intersection, 0) {} - void render() {} - }; - int main(int argc, char** argv) { - Test test; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-lopencsg", - "-framework", "OpenGL" - system "./test" - end -end diff --git a/Formula/opencv.rb b/Formula/opencv.rb deleted file mode 100644 index a37aeb95dae28..0000000000000 --- a/Formula/opencv.rb +++ /dev/null @@ -1,122 +0,0 @@ -class Opencv < Formula - desc "Open source computer vision library" - homepage "https://opencv.org/" - url "https://github.com/opencv/opencv/archive/4.0.1.tar.gz" - sha256 "7b86a0ee804244e0c407321f895b15e4a7162e9c5c0d2efc85f1cadec4011af4" - - bottle do - sha256 "73f03c0b70646230276817b41cb8b3901008cffd88350309b008d19285e4a7cf" => :mojave - sha256 "5c384dfe3fc7bfa405aac1e25dfc384afb2084030153b195c24581ddac1d39ec" => :high_sierra - sha256 "8fb8cf21b549e1f603fc108fd8fee886501a377692feb27f703a629217b47dc0" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "eigen" - depends_on "ffmpeg" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "numpy" - depends_on "openexr" - depends_on "python" - depends_on "python@2" - depends_on "tbb" - - resource "contrib" do - url "https://github.com/opencv/opencv_contrib/archive/4.0.1.tar.gz" - sha256 "0d8acbad4b7074cfaafd906a7419c23629179d5e98894714402090b192ef8237" - end - - needs :cxx11 - - def install - ENV.cxx11 - ENV.prepend_path "PATH", Formula["python@2"].opt_libexec/"bin" - - resource("contrib").stage buildpath/"opencv_contrib" - - # Reset PYTHONPATH, workaround for https://github.com/Homebrew/homebrew-science/pull/4885 - ENV.delete("PYTHONPATH") - - py2_prefix = `python2-config --prefix`.chomp - py2_lib = "#{py2_prefix}/lib" - - py3_config = `python3-config --configdir`.chomp - py3_include = `python3 -c "import distutils.sysconfig as s; print(s.get_python_inc())"`.chomp - py3_version = Language::Python.major_minor_version "python3" - - args = std_cmake_args + %W[ - -DCMAKE_OSX_DEPLOYMENT_TARGET= - -DBUILD_JASPER=OFF - -DBUILD_JPEG=ON - -DBUILD_OPENEXR=OFF - -DBUILD_PERF_TESTS=OFF - -DBUILD_PNG=OFF - -DBUILD_TESTS=OFF - -DBUILD_TIFF=OFF - -DBUILD_ZLIB=OFF - -DBUILD_opencv_hdf=OFF - -DBUILD_opencv_java=OFF - -DBUILD_opencv_text=OFF - -DOPENCV_ENABLE_NONFREE=ON - -DOPENCV_EXTRA_MODULES_PATH=#{buildpath}/opencv_contrib/modules - -DOPENCV_GENERATE_PKGCONFIG=ON - -DWITH_1394=OFF - -DWITH_CUDA=OFF - -DWITH_EIGEN=ON - -DWITH_FFMPEG=ON - -DWITH_GPHOTO2=OFF - -DWITH_GSTREAMER=OFF - -DWITH_JASPER=OFF - -DWITH_OPENEXR=ON - -DWITH_OPENGL=OFF - -DWITH_QT=OFF - -DWITH_TBB=ON - -DWITH_VTK=OFF - -DBUILD_opencv_python2=ON - -DBUILD_opencv_python3=ON - -DPYTHON2_EXECUTABLE=#{which "python"} - -DPYTHON2_LIBRARY=#{py2_lib}/libpython2.7.dylib - -DPYTHON2_INCLUDE_DIR=#{py2_prefix}/include/python2.7 - -DPYTHON3_EXECUTABLE=#{which "python3"} - -DPYTHON3_LIBRARY=#{py3_config}/libpython#{py3_version}.dylib - -DPYTHON3_INCLUDE_DIR=#{py3_include} - ] - - if build.bottle? - args += %w[-DENABLE_SSE41=OFF -DENABLE_SSE42=OFF -DENABLE_AVX=OFF - -DENABLE_AVX2=OFF] - end - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *args - system "make" - lib.install Dir["lib/*.a"] - lib.install Dir["3rdparty/**/*.a"] - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - std::cout << CV_VERSION << std::endl; - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}/opencv4", - "-o", "test" - assert_equal `./test`.strip, version.to_s - - ["python2.7", "python3"].each do |python| - output = shell_output("#{python} -c 'import cv2; print(cv2.__version__)'") - assert_equal version.to_s, output.chomp - end - end -end diff --git a/Formula/opencv@2.rb b/Formula/opencv@2.rb deleted file mode 100644 index 5d6144b572ad8..0000000000000 --- a/Formula/opencv@2.rb +++ /dev/null @@ -1,93 +0,0 @@ -class OpencvAT2 < Formula - desc "Open source computer vision library" - homepage "https://opencv.org/" - url "https://github.com/opencv/opencv/archive/2.4.13.7.tar.gz" - sha256 "192d903588ae2cdceab3d7dc5a5636b023132c8369f184ca89ccec0312ae33d0" - revision 2 - - bottle do - sha256 "6580055d021fcabea83a3d2878cba7a6a7851fd2463f769e98138a099b3cc82d" => :mojave - sha256 "3ac9fdae51aea0627c1febfc25b7dc99b6f3832684b7c0e044a46aac771e02ac" => :high_sierra - sha256 "055e15f3b20df7f4db64f2d540e1a19e044edad5b33eb1f5980f747126142b5b" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "eigen" - depends_on "ffmpeg" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "numpy" - depends_on "openexr" - depends_on "python@2" # does not support Python 3 - - def install - jpeg = Formula["jpeg"] - - args = std_cmake_args + %W[ - -DCMAKE_OSX_DEPLOYMENT_TARGET= - -DBUILD_JASPER=OFF - -DBUILD_JPEG=OFF - -DBUILD_OPENEXR=OFF - -DBUILD_PERF_TESTS=OFF - -DBUILD_PNG=OFF - -DBUILD_TESTS=OFF - -DBUILD_TIFF=OFF - -DBUILD_ZLIB=OFF - -DBUILD_opencv_java=OFF - -DBUILD_opencv_python=ON - -DWITH_CUDA=OFF - -DWITH_EIGEN=ON - -DWITH_FFMPEG=ON - -DWITH_GSTREAMER=OFF - -DWITH_JASPER=OFF - -DWITH_OPENEXR=ON - -DWITH_OPENGL=ON - -DWITH_TBB=OFF - -DJPEG_INCLUDE_DIR=#{jpeg.opt_include} - -DJPEG_LIBRARY=#{jpeg.opt_lib}/libjpeg.dylib - ] - - py_prefix = `python-config --prefix`.chomp - py_lib = "#{py_prefix}/lib" - args << "-DPYTHON_LIBRARY=#{py_lib}/libpython2.7.dylib" - args << "-DPYTHON_INCLUDE_DIR=#{py_prefix}/include/python2.7" - - # Make sure find_program locates system Python - # https://github.com/Homebrew/homebrew-science/issues/2302 - args << "-DCMAKE_PREFIX_PATH=#{py_prefix}" - - if ENV.compiler == :clang && !build.bottle? - args << "-DENABLE_SSSE3=ON" if Hardware::CPU.ssse3? - args << "-DENABLE_SSE41=ON" if Hardware::CPU.sse4? - args << "-DENABLE_SSE42=ON" if Hardware::CPU.sse4_2? - args << "-DENABLE_AVX=ON" if Hardware::CPU.avx? - end - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - std::cout << CV_VERSION << std::endl; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-o", "test" - assert_equal version.to_s, shell_output("./test").strip - - ENV["PYTHONPATH"] = lib/"python2.7/site-packages" - output = shell_output("python2.7 -c 'import cv2; print(cv2.__version__)'") - assert_match version.to_s, output - end -end diff --git a/Formula/opendbx.rb b/Formula/opendbx.rb deleted file mode 100644 index 157714285471b..0000000000000 --- a/Formula/opendbx.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Opendbx < Formula - desc "Lightweight but extensible database access library in C" - homepage "https://linuxnetworks.de/doc/index.php/OpenDBX" - url "https://linuxnetworks.de/opendbx/download/opendbx-1.4.6.tar.gz" - sha256 "2246a03812c7d90f10194ad01c2213a7646e383000a800277c6fb8d2bf81497c" - revision 1 - - bottle do - sha256 "a98f96a0a70e29bba16f505dc13ea7638ef82ec398de40d6430eced24afbb4c9" => :mojave - sha256 "42ed70ef4eb93be7351b5d66ff131ad13cb92290d9dee6a721d9050ae3a187cd" => :high_sierra - sha256 "275e19f854b29f8d1d0560a4cca55395854312d678c5c64ad3c2597df7569aef" => :sierra - sha256 "84a0f694107dd4d15b949dd68474e5a270da583058b7eff29688370ef3a8e18f" => :el_capitan - sha256 "874a8b0ef941eec827bd85e59b7773269bb6b3632e38b9d192a003c4134b3227" => :yosemite - end - - depends_on "readline" - depends_on "sqlite" - - def install - # Reported upstream: http://bugs.linuxnetworks.de/index.php?do=details&id=40 - inreplace "utils/Makefile.in", "$(LIBSUFFIX)", ".dylib" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-backends=sqlite3" - system "make" - system "make", "install" - end - - test do - testfile = testpath/"test.sql" - testfile.write <<~EOS - create table t(x); - insert into t values("Hello"); - .header - select * from t; - .quit - EOS - - assert_match /"Hello"/, - shell_output("#{bin}/odbx-sql odbx-sql -h ./ -d test.sqlite3 -b sqlite3 < #{testpath}/test.sql") - end -end diff --git a/Formula/opendetex.rb b/Formula/opendetex.rb deleted file mode 100644 index c57397ed198cb..0000000000000 --- a/Formula/opendetex.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Opendetex < Formula - desc "Tool to strip TeX or LaTeX commands from documents" - homepage "https://github.com/pkubowicz/opendetex" - url "https://github.com/pkubowicz/opendetex/archive/v2.8.4.tar.gz" - sha256 "d1ca2ba332d0b948b3316052476d3699a7378ab83505fe906a2ba80828778f84" - - bottle do - cellar :any_skip_relocation - sha256 "995070391cee23f402d6e067985230d467e48b5a20b5122e05474bec73cfeb24" => :mojave - sha256 "c668bd3fd940b6f27ce4162b5625ff28e45df24e34f7f66b6a2158546a47e6d9" => :high_sierra - sha256 "4ce5d750a06de0c96682042e88aea55707e5c0b28cbea66396ec1020df130420" => :sierra - sha256 "79e56e9e50f90d6b534f29c556a648743ee10ab494d5f7cd049031eb4833f122" => :el_capitan - end - - patch :DATA - - def install - system "make" - bin.install "detex" - bin.install "delatex" - man1.install "detex.1l" => "detex.1" - end -end - -__END__ -diff --git a/detex.1l b/detex.1l -index a70c813..7033b44 100644 ---- a/detex.1l -+++ b/detex.1l -@@ -1,4 +1,4 @@ --.TH DETEX 1L "12 August 1993" "Purdue University" -+.TH DETEX 1 "12 August 1993" "Purdue University" - .SH NAME - detex \- a filter to strip \fITeX\fP commands from a .tex file. - .SH SYNOPSIS -@@ -103,7 +103,7 @@ The old functionality can be essentially duplicated by using the - .B \-s - option. - .SH SEE ALSO --tex(1L) -+tex(1) - .SH DIAGNOSTICS - Nesting of \\input is allowed but the number of opened files must not - exceed the system's limit on the number of simultaneously opened files. diff --git a/Formula/openexr.rb b/Formula/openexr.rb deleted file mode 100644 index e8057267deda4..0000000000000 --- a/Formula/openexr.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Openexr < Formula - desc "High dynamic-range image file format" - homepage "https://www.openexr.com/" - url "https://savannah.nongnu.org/download/openexr/openexr-2.2.0.tar.gz" - sha256 "36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231" - revision 1 - - bottle do - cellar :any - sha256 "a00afa239c0fc0a7cf87689afb2522b7cc8887644a0626d9a7911b2eb4a0e8f5" => :mojave - sha256 "6c96d4cae23adcf59f5a656ae922e919bf38b55cb69c1d66a7bb50d120a38a25" => :high_sierra - sha256 "d05f50377503a0b3a367e69ce463941487128c970cfb8f4db32cfb14c23a34f6" => :sierra - sha256 "f8d152a55c42645a8871906ff4d5d3f39fb8885cd02b6648ffabb3eef93e5beb" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "ilmbase" - - resource "exr" do - url "https://github.com/openexr/openexr-images/raw/master/TestImages/AllHalfValues.exr" - sha256 "eede573a0b59b79f21de15ee9d3b7649d58d8f2a8e7787ea34f192db3b3c84a4" - end - - # Fixes builds on 32-bit targets due to incorrect long literals - # Patches are already applied in the upstream git repo. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/f1a3ea4f69b7a54d8123e2f16488864d52202de8/openexr/64bit_types.patch" - sha256 "c95374d8fdcc41ddc2f7c5b3c6f295a56dd5a6249bc26d0829548e70f5bd2dc9" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - resource("exr").stage do - system bin/"exrheader", "AllHalfValues.exr" - end - end -end diff --git a/Formula/openfortivpn.rb b/Formula/openfortivpn.rb deleted file mode 100644 index a0e6982811107..0000000000000 --- a/Formula/openfortivpn.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Openfortivpn < Formula - desc "Open Fortinet client for PPP+SSL VPN tunnel services" - homepage "https://github.com/adrienverge/openfortivpn" - url "https://github.com/adrienverge/openfortivpn/archive/v1.8.1.tar.gz" - sha256 "292c84265ab33a0a0cbb063d0049ac8bd78cb0309cb207c3e575ca4a6ee13659" - - bottle do - sha256 "f90028421a138d158dbc999c801612c18439692f350a07f4212a2e52d7e2f0fd" => :mojave - sha256 "45dfd4656767ecb047f26f26dea898dc223a8bdd57e9e747194ef519db124358" => :high_sierra - sha256 "11c168aa5e680d933295cf0454787bcfc359c56ec474ee812a756032e0b7723d" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - test do - system bin/"openfortivpn", "--version" - end -end diff --git a/Formula/openh264.rb b/Formula/openh264.rb deleted file mode 100644 index ceae7b7f0b86e..0000000000000 --- a/Formula/openh264.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Openh264 < Formula - desc "H.264 codec from Cisco" - homepage "https://www.openh264.org/" - url "https://github.com/cisco/openh264/archive/v1.8.0.tar.gz" - sha256 "08670017fd0bb36594f14197f60bebea27b895511251c7c64df6cd33fc667d34" - head "https://github.com/cisco/openh264.git" - - bottle do - cellar :any - sha256 "d6034af9b67ecebd5be4e6a64d1c3f3c0438e7f5fff06819bc6f772c4a7943bd" => :mojave - sha256 "2af5e6f5ef4dc7dcce2a420c7ed12ed06a252397ee0c24867a738c1b26ca73c5" => :high_sierra - sha256 "a74aaa0c2ead93b8fbc31c6fd031be257188cd012583311541a2bc8b66dda4b2" => :sierra - sha256 "ee2db0d05f6f3897fa6ece63a509ac1fffb8f33c7b02f8872af20e69b0e679b0" => :el_capitan - end - - depends_on "nasm" => :build - - def install - system "make", "install-shared", "PREFIX=#{prefix}" - chmod 0444, "#{lib}/libopenh264.dylib" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - ISVCDecoder *dec; - WelsCreateDecoder (&dec); - WelsDestroyDecoder (dec); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lopenh264", "-o", "test" - system "./test" - end -end diff --git a/Formula/openhmd.rb b/Formula/openhmd.rb deleted file mode 100644 index eb8d8871a27d7..0000000000000 --- a/Formula/openhmd.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Openhmd < Formula - desc "Free and open source API and drivers for immersive technology" - homepage "http://openhmd.net" - url "https://github.com/OpenHMD/OpenHMD/archive/0.2.0.tar.gz" - sha256 "b5be787229d7c7c5cb763cec6207f9814b0bb993c68842ef0a390184ca25380d" - head "https://github.com/OpenHMD/OpenHMD.git" - - bottle do - cellar :any - sha256 "c6d79d0429f6bfb707bb5dc66063cbab9f7c73bea1df216fab89be6c224ac524" => :mojave - sha256 "6349f9d4cef043dfddb77db21d939c81b53ca831dd39282a07e328c691981b88" => :high_sierra - sha256 "999945d3e8003410777939f746f8f460c767ab2824dc2d1de3ab24af532daf0d" => :sierra - sha256 "0e94a1356e5f6f0fb4079e16f431aae23003fa00c3ccaa8add9d5dd382b89b34" => :el_capitan - sha256 "71e356cdd47df73193ec52341d4bc252237e48b8bad182d695fbeb74a3ed41ed" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "hidapi" - - conflicts_with "cspice", :because => "both install `simple` binaries" - conflicts_with "libftdi0", :because => "both install `simple` binaries" - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - (pkgshare/"tests").install bin/"unittests" - end - - test do - system pkgshare/"tests/unittests" - end -end diff --git a/Formula/openimageio.rb b/Formula/openimageio.rb deleted file mode 100644 index faf9a2ead321d..0000000000000 --- a/Formula/openimageio.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Openimageio < Formula - desc "Library for reading, processing and writing images" - homepage "http://openimageio.org/" - url "https://github.com/OpenImageIO/oiio/archive/Release-1.8.17.tar.gz" - sha256 "a019086c05a6150d445a2240bab1723dff540dde5f5c327c36a97f0b5ae0e157" - head "https://github.com/OpenImageIO/oiio.git" - - bottle do - sha256 "3430a6ac66281c010301f65f24532929cd33d0a6fba269ebfe83b84f86ec4a43" => :mojave - sha256 "79b13d228729a4a65b7f1b7627df4984f553722e3a6fb87ca63aa4433755c484" => :high_sierra - sha256 "c2edb3c8225fffe1573a9c625edfb91853c6be3027e47c6cf8497bbe37b3f64c" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "boost-python" - depends_on "boost-python3" - depends_on "ffmpeg" - depends_on "freetype" - depends_on "giflib" - depends_on "ilmbase" - depends_on "jpeg" - depends_on "libpng" - depends_on "libraw" - depends_on "libtiff" - depends_on "opencolorio" - depends_on "openexr" - depends_on "python" - depends_on "webp" - - def install - # -DUSE_OPENSSL=OFF can be removed in 1.9, see - # https://github.com/Homebrew/homebrew-core/pull/22522#issuecomment-364831533 - args = std_cmake_args + %w[ - -DEMBEDPLUGINS=ON - -DUSE_FIELD3D=OFF - -DUSE_JPEGTURBO=OFF - -DUSE_NUKE=OFF - -DUSE_OPENCV=OFF - -DUSE_OPENGL=OFF - -DUSE_OPENJPEG=OFF - -DUSE_OPENSSL=OFF - -DUSE_PTEX=OFF - -DUSE_QT=OFF - ] - - mkdir "build-with-python2" do - system "cmake", "..", "-DBoost_PYTHON_LIBRARIES=#{Formula["boost-python"].opt_lib}/libboost_python27-mt.dylib", - *args - system "make", "install" - end - - # CMake picks up the system's python dylib, even if we have a brewed one. - py3ver = Language::Python.major_minor_version "python3" - py3prefix = Formula["python3"].opt_frameworks/"Python.framework/Versions/#{py3ver}" - - ENV["PYTHONPATH"] = lib/"python#{py3ver}/site-packages" - - args << "-DPYTHON_EXECUTABLE=#{py3prefix}/bin/python3" - args << "-DPYTHON_LIBRARY=#{py3prefix}/lib/libpython#{py3ver}.dylib" - args << "-DPYTHON_INCLUDE_DIR=#{py3prefix}/include/python#{py3ver}m" - - # CMake picks up boost-python instead of boost-python3 - args << "-DBOOST_ROOT=#{Formula["boost"].opt_prefix}" - args << "-DBoost_PYTHON_LIBRARIES=#{Formula["boost-python3"].opt_lib}/libboost_python#{py3ver.to_s.delete(".")}-mt.dylib" - - # This is strange, but must be set to make the hack above work - args << "-DBoost_PYTHON_LIBRARY_DEBUG=''" - args << "-DBoost_PYTHON_LIBRARY_RELEASE=''" - - # Need to make a second build dir, otherwise cmake picks up cached files - # and builds against `boost-python` - mkdir "build-with-python3" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - test_image = test_fixtures("test.jpg") - assert_match "#{test_image} : 1 x 1, 3 channel, uint8 jpeg", - shell_output("#{bin}/oiiotool --info #{test_image} 2>&1") - - ["python", "python3"].each do |python| - output = <<~EOS - from __future__ import print_function - import OpenImageIO - print(OpenImageIO.VERSION_STRING) - EOS - assert_match version.to_s, pipe_output(python, output, 0) - end - end -end diff --git a/Formula/openjazz.rb b/Formula/openjazz.rb deleted file mode 100644 index ad159eee43ca1..0000000000000 --- a/Formula/openjazz.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Openjazz < Formula - desc "Open source Jazz Jackrabit engine" - homepage "http://www.alister.eu/jazz/oj/" - url "https://github.com/AlisterT/openjazz/releases/download/20180522/openjazz-20180522.tar.xz" - sha256 "35260066f307ff7e31304907a2a430a20b8d1fa5f90ad2c13275ab3aca337c24" - head "https://github.com/AlisterT/openjazz.git" - - bottle do - cellar :any - sha256 "c0f7a1ea63036f0fe37ddc60e4d161fadc549ef84de52ee1ec88c3c00516608f" => :mojave - sha256 "25b2ba3440262667196d729f4e88604dfb74e6c9191b92e30d31a241d9aab090" => :high_sierra - sha256 "ea4d18c72bc6cf5a5393d9f7ed8c40fc66d8355181c93249a926d47029eeae9c" => :sierra - sha256 "f410241a95a93323d5dd94fd7469b3912ce4105cbe3c3e5483b301f5ea642794" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libmodplug" - depends_on "sdl" - - # From LICENSE.DOC: - # "Epic MegaGames allows and encourages all bulletin board systems and online - # services to distribute this game by modem as long as no files are altered - # or removed." - resource "shareware" do - url "https://image.dosgamesarchive.com/games/jazz.zip" - sha256 "ed025415c0bc5ebc3a41e7a070551bdfdfb0b65b5314241152d8bd31f87c22da" - end - - # MSG_NOSIGNAL is only defined in Linux - # https://github.com/AlisterT/openjazz/pull/7 - patch :DATA - - def install - # the libmodplug include paths in the source don't include the libmodplug directory - ENV.append_to_cflags "-I#{Formula["libmodplug"].opt_include}/libmodplug" - - system "autoreconf", "-ivf" - system "./configure", "--prefix=#{prefix}", - "--bindir=#{pkgshare}", - "--disable-dependency-tracking" - system "make", "install" - - # Default game lookup path is the OpenJazz binary's location - (bin/"OpenJazz").write <<~EOS - #!/bin/sh - - exec "#{pkgshare}/OpenJazz" "$@" - EOS - - resource("shareware").stage do - pkgshare.install Dir["*"] - end - end - - def caveats; <<~EOS - The shareware version of Jazz Jackrabbit has been installed. - You can install the full version by copying the game files to: - #{pkgshare} - EOS - end -end - -__END__ -diff --git a/src/io/network.cpp b/src/io/network.cpp -index 8af8775..362118e 100644 ---- a/src/io/network.cpp -+++ b/src/io/network.cpp -@@ -53,6 +53,9 @@ - #include - #include - #endif -+ #ifdef __APPLE__ -+ #define MSG_NOSIGNAL SO_NOSIGPIPE -+ #endif - #elif defined USE_SDL_NET - #include - #endif diff --git a/Formula/openjpeg.rb b/Formula/openjpeg.rb deleted file mode 100644 index 670b18aa560d7..0000000000000 --- a/Formula/openjpeg.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Openjpeg < Formula - desc "Library for JPEG-2000 image manipulation" - homepage "https://www.openjpeg.org/" - url "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz" - sha256 "3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a" - head "https://github.com/uclouvain/openjpeg.git" - - bottle do - cellar :any - rebuild 1 - sha256 "fd11438ec644bba47014568565171ec2d14926031f0976cb2b38332be900699d" => :mojave - sha256 "610054f41d6111a6c9bcdb87b7f41495f416c5c570fb089fe37d1687dbc7f647" => :high_sierra - sha256 "6fd55ac1165e6c06b0f71d0c0612c8bf0fc9ff8a4686b944e119bb9368412150" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "libpng" - depends_on "libtiff" - depends_on "little-cms2" - - def install - system "cmake", ".", *std_cmake_args, "-DBUILD_DOC=ON" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main () { - opj_image_cmptparm_t cmptparm; - const OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY; - - opj_image_t *image; - image = opj_image_create(1, &cmptparm, color_space); - - opj_image_destroy(image); - return 0; - } - EOS - system ENV.cc, "-I#{include.children.first}", "-L#{lib}", "-lopenjp2", - testpath/"test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/openldap.rb b/Formula/openldap.rb deleted file mode 100644 index bc6bde9fefbd8..0000000000000 --- a/Formula/openldap.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Openldap < Formula - desc "Open source suite of directory software" - homepage "https://www.openldap.org/software/" - url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.47.tgz" - sha256 "f54c5877865233d9ada77c60c0f69b3e0bfd8b1b55889504c650047cc305520b" - - bottle do - sha256 "07e1f0e3ec1a02340a82259e1ace713cfb362126404575032713174935f4140e" => :mojave - sha256 "8901626fc45d76940dec5e516b23d81c9970f4a4a94650bdad60228d604c1b4a" => :high_sierra - sha256 "6dc84ff9e088116201a47adc5c3a2aab28ffd10dbab9d677d49ad7eef1ccc349" => :sierra - end - - keg_only :provided_by_macos - - depends_on "openssl" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --sysconfdir=#{etc} - --localstatedir=#{var} - --enable-accesslog - --enable-auditlog - --enable-bdb=no - --enable-constraint - --enable-dds - --enable-deref - --enable-dyngroup - --enable-dynlist - --enable-hdb=no - --enable-memberof - --enable-ppolicy - --enable-proxycache - --enable-refint - --enable-retcode - --enable-seqmod - --enable-translucent - --enable-unique - --enable-valsort - ] - - system "./configure", *args - system "make", "install" - (var/"run").mkpath - - # https://github.com/Homebrew/homebrew-dupes/pull/452 - chmod 0755, Dir[etc/"openldap/*"] - chmod 0755, Dir[etc/"openldap/schema/*"] - end - - test do - system sbin/"slappasswd", "-s", "test" - end -end diff --git a/Formula/openmotif.rb b/Formula/openmotif.rb deleted file mode 100644 index d2240b975a249..0000000000000 --- a/Formula/openmotif.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Openmotif < Formula - desc "LGPL release of the Motif toolkit" - homepage "https://motif.ics.com/motif" - url "https://downloads.sourceforge.net/project/motif/Motif%202.3.8%20Source%20Code/motif-2.3.8.tar.gz" - sha256 "859b723666eeac7df018209d66045c9853b50b4218cecadb794e2359619ebce7" - - bottle do - sha256 "f9eec7b02d0e04b8a41a5c7e3b8c0096c9156100fe888ee663742dca1298f7c5" => :mojave - sha256 "ca0c7a96b098ed5efc2dace2cb1b9bc2447c8f1cf0780e882bfee691160466e0" => :high_sierra - sha256 "21120a7b3aab57d5660c480ab5f1924cbfb31e8625674bf02704971f103616f9" => :sierra - sha256 "bef02966fb2d72ac23235c8038cdf864cefe47d1cb905fac08a9194d7c9ed554" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "fontconfig" - depends_on "freetype" - depends_on "jpeg" - depends_on "libpng" - depends_on :x11 - - conflicts_with "lesstif", - :because => "Lesstif and Openmotif are complete replacements for each other" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules" - system "make" - system "make", "install" - - # Avoid conflict with Perl - mv man3/"Core.3", man3/"openmotif-Core.3" - end - - test do - assert_match /no source file specified/, pipe_output("#{bin}/uil 2>&1") - end -end diff --git a/Formula/openmsx.rb b/Formula/openmsx.rb deleted file mode 100644 index 56fe8c7488b2c..0000000000000 --- a/Formula/openmsx.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Openmsx < Formula - desc "MSX emulator" - homepage "https://openmsx.org/" - url "https://github.com/openMSX/openMSX/releases/download/RELEASE_0_15_0/openmsx-0.15.0.tar.gz" - sha256 "93f209d8fed2e04e62526469bb6bb431b82ea4d07ecdc45dab2b8cc4ca21d62a" - head "https://github.com/openMSX/openMSX.git" - - bottle do - cellar :any - sha256 "64145c0b205a9eeb64e12f06b63440ee7c8bbba0153a0e248a1e37486815fb21" => :mojave - sha256 "eb64da0eff2b09fb3046903b020becc06aa8683ad398e9cea08708567fbcf194" => :high_sierra - sha256 "a2396de7cce4f6a317d6f8f3e38e32afb304580f08ccc798c36b0c5a933fcf8f" => :sierra - end - - depends_on "freetype" - depends_on "glew" - depends_on "libpng" - depends_on "sdl" - depends_on "sdl_ttf" - - def install - # Fixes a clang crash; this is an LLVM/Apple bug, not an openmsx bug - # https://github.com/Homebrew/homebrew-core/pull/9753 - # Filed with Apple: rdar://30475877 - ENV.O0 - - # Hardcode prefix - inreplace "build/custom.mk", "/opt/openMSX", prefix - - # Help finding Tcl (https://github.com/openMSX/openMSX/issues/1082) - inreplace "build/libraries.py" do |s| - s.gsub! /\((distroRoot), \)/, "(\\1, '/usr', '#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework')" - s.gsub! "lib/tcl", "." - end - - system "./configure" - system "make" - prefix.install Dir["derived/**/openMSX.app"] - bin.write_exec_script "#{prefix}/openMSX.app/Contents/MacOS/openmsx" - end - - test do - system "#{bin}/openmsx", "-testconfig" - end -end diff --git a/Formula/openrct2.rb b/Formula/openrct2.rb deleted file mode 100644 index 1d1149bfa52b6..0000000000000 --- a/Formula/openrct2.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Openrct2 < Formula - desc "Open source re-implementation of RollerCoaster Tycoon 2" - homepage "https://openrct2.io/" - url "https://github.com/OpenRCT2/OpenRCT2.git", - :tag => "v0.2.1", - :revision => "8ac731e2124ecfb43f592c7f1cc5dd6902d5d83f" - revision 1 - head "https://github.com/OpenRCT2/OpenRCT2.git", :branch => "develop" - - bottle do - cellar :any - sha256 "d6c869c40a8e2b130b974fcd904d023480a801ec189f2ded6f213199d2f6f2d8" => :mojave - sha256 "23a8a95a75981e14cbbcdc8d0f2fde2a0483353a0ebe793e1e0ac5e4675a7019" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "freetype" # for sdl2_ttf - depends_on "icu4c" - depends_on "jansson" - depends_on "libpng" - depends_on "libzip" - depends_on :macos => :high_sierra # "missing: Threads_FOUND" on Sierra - depends_on "openssl" - depends_on "sdl2" - depends_on "sdl2_ttf" - depends_on "speexdsp" - - resource "title-sequences" do - url "https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2/title-sequence-v0.1.2.zip", - :using => :nounzip - sha256 "dcb1648739b351e857e2d19fed1626bec561d5e9f4b49201568f42c475ee7e61" - end - - resource "objects" do - url "https://github.com/OpenRCT2/objects/releases/download/v1.0.6/objects.zip", - :using => :nounzip - sha256 "714257dcf6dc4af8761ecda1b313bfa63b3ef93ab7e46572a3e499fe4bf26e02" - end - - def install - # Avoid letting CMake download things during the build process. - (buildpath/"data/title").install resource("title-sequences") - (buildpath/"data/object").install resource("objects") - tversion = resource("title-sequences").version - mv buildpath/"data/title/title-sequence-v#{tversion}.zip", "title-sequences.zip" - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - - # By default macOS build only looks up data in app bundle Resources - libexec.install bin/"openrct2" - (bin/"openrct2").write <<~EOS - #!/bin/bash - exec "#{libexec}/openrct2" "$@" "--openrct-data-path=#{pkgshare}" - EOS - end - - test do - assert_match "OpenRCT2, v#{version}", shell_output("#{bin}/openrct2 -v") - end -end diff --git a/Formula/openrtsp.rb b/Formula/openrtsp.rb deleted file mode 100644 index 6475f20c73e1d..0000000000000 --- a/Formula/openrtsp.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Openrtsp < Formula - desc "Command-line RTSP client" - homepage "http://www.live555.com/openRTSP" - url "http://www.live555.com/liveMedia/public/live.2018.10.17.tar.gz" - # Keep a mirror as upstream tarballs are removed after each version - mirror "https://download.videolan.org/pub/videolan/testing/contrib/live555/live.2018.10.17.tar.gz" - sha256 "7c68d9c95b39acd309a2b6a4fc14c3837544a9be3f64062ed38d1ad6f68dc9e8" - - bottle do - cellar :any_skip_relocation - sha256 "fbf8533b65181a93a166ba5415327a4a294576c55effe2c881fbe20956772853" => :mojave - sha256 "fbff910d3f518c592e2f64afa540a17d59db664f06ce5077e1ef7959ee1ce481" => :high_sierra - sha256 "293bd6edd7d7de1ea39517b1809865f120570e3645acbd777b704c5ebed16189" => :sierra - end - - def install - system "./genMakefiles", "macosx" - system "make", "PREFIX=#{prefix}", "install" - - # Move the testing executables out of the main PATH - libexec.install Dir.glob(bin/"test*") - end - - def caveats; <<~EOS - Testing executables have been placed in: - #{libexec} - EOS - end - - test do - assert_match "GNU", shell_output("#{bin}/live555ProxyServer 2>&1", 1) - end -end diff --git a/Formula/opensaml.rb b/Formula/opensaml.rb deleted file mode 100644 index 09c7273793c45..0000000000000 --- a/Formula/opensaml.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Opensaml < Formula - desc "Library for Security Assertion Markup Language" - homepage "https://wiki.shibboleth.net/confluence/display/OpenSAML/Home" - url "https://shibboleth.net/downloads/c++-opensaml/3.0.0/opensaml-3.0.0.tar.bz2" - sha256 "a9cb72e41cc9d1af08a3d7c7843410eb41d4e97d88d516db7f0e2da1243e296e" - - bottle do - cellar :any - sha256 "14d2c6a9825c4bb74b9708fee49cfe4466537918bbd913d795b4f66256721996" => :mojave - sha256 "a243122e77ac69b74e01e69201b8bcaab5499b9b6859bfa11f7dd5e6e5bd5da9" => :high_sierra - sha256 "5287589b2ee6abc84823ea9e39fff2352b790876df6a4cea1251358926738476" => :sierra - sha256 "2134b9b9be0a181807065f905a874639d2fb780e50628cb6c365e889e65faf32" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "log4shib" - depends_on "openssl" - depends_on "xerces-c" - depends_on "xml-security-c" - depends_on "xml-tooling-c" - - needs :cxx11 - - def install - ENV.cxx11 - - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/opensc.rb b/Formula/opensc.rb deleted file mode 100644 index 4a8742176b7f3..0000000000000 --- a/Formula/opensc.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Opensc < Formula - desc "Tools and libraries for smart cards" - homepage "https://github.com/OpenSC/OpenSC/wiki" - url "https://github.com/OpenSC/OpenSC/releases/download/0.19.0/opensc-0.19.0.tar.gz" - sha256 "2c5a0e4df9027635290b9c0f3addbbf0d651db5ddb0ab789cb0e978f02fd5826" - head "https://github.com/OpenSC/OpenSC.git" - - bottle do - sha256 "75862725aed348f1f4dce78e71a384c6b5439cd7487e77710494fe66ac430ea0" => :mojave - sha256 "407bc8be487da4744b24fb2a5e931a2b0397a5376b17350771df3328a99a9fa3" => :high_sierra - sha256 "d0f61b74690cd648f36acc10890372688c84ac231fa9456193121a60fbc0d980" => :sierra - sha256 "e265daf4221e14d23b6a8a82d657a87bd4c5291a0577b43ca5377a08a0f19f09" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "docbook-xsl" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-openssl - --enable-pcsc - --enable-sm - --with-xsl-stylesheetsdir=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl - ] - - system "./bootstrap" - system "./configure", *args - system "make", "install" - end -end diff --git a/Formula/openshift-cli.rb b/Formula/openshift-cli.rb deleted file mode 100644 index fb10ca581fade..0000000000000 --- a/Formula/openshift-cli.rb +++ /dev/null @@ -1,36 +0,0 @@ -class OpenshiftCli < Formula - desc "OpenShift command-line interface tools" - homepage "https://www.openshift.com/" - url "https://github.com/openshift/origin.git", - :tag => "v3.11.0", - :revision => "0cbc58b117403b9d9169dbafdfac59ef104bb997", - :shallow => false - head "https://github.com/openshift/origin.git" - - bottle do - cellar :any_skip_relocation - sha256 "5c5799c73ddfc6f3f88b96ea9e61c76210a3c9ec8c8196c487811a25833873d1" => :mojave - sha256 "9ac46b2e32e8802fe54f00843d7edc8d2ad70de5934fd38290e8dff46955302e" => :high_sierra - sha256 "9a9273ba88209e9011c33571cdd06ad7fa1cee5aec66f5453b450723863cc894" => :sierra - end - - depends_on "go" => :build - depends_on "socat" - - def install - # this is necessary to avoid having the version marked as dirty - (buildpath/".git/info/exclude").atomic_write "/.brew_home" - - system "make", "all", "WHAT=cmd/oc", "GOFLAGS=-v", "OS_OUTPUT_GOPATH=1" - - bin.install "_output/local/bin/darwin/amd64/oc" - bin.install_symlink "oc" => "oadm" - - bash_completion.install Dir["contrib/completions/bash/*"] - end - - test do - assert_match /^oc v#{version}/, shell_output("#{bin}/oc version") - assert_match /^oc v#{version}/, shell_output("#{bin}/oadm version") - end -end diff --git a/Formula/openslide.rb b/Formula/openslide.rb deleted file mode 100644 index 309986f8d3a18..0000000000000 --- a/Formula/openslide.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Openslide < Formula - desc "C library to read whole-slide images (a.k.a. virtual slides)" - homepage "https://openslide.org/" - url "https://github.com/openslide/openslide/releases/download/v3.4.1/openslide-3.4.1.tar.xz" - sha256 "9938034dba7f48fadc90a2cdf8cfe94c5613b04098d1348a5ff19da95b990564" - revision 4 - - bottle do - cellar :any - sha256 "e368a4e6c76204484cd7dd6f0f49e3c1ca87cef338a6c6d11561eb80d01ca057" => :mojave - sha256 "9118b45fe096442eb436126366d3f617d8fc5e356b1a764535686115941b0aac" => :high_sierra - sha256 "e5f7b2fe405fcbc70797c326fba07b7311b334bdd03e7ce88cfd28231557ea51" => :sierra - sha256 "8d8bdded3aa4db040a15f1cf0c31db10832d0349320a550eaa73a0fe77abfcd6" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "libxml2" - depends_on "openjpeg" - - resource "svs" do - url "http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/CMU-1-Small-Region.svs" - sha256 "ed92d5a9f2e86df67640d6f92ce3e231419ce127131697fbbce42ad5e002c8a7" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - resource("svs").stage do - system bin/"openslide-show-properties", "CMU-1-Small-Region.svs" - end - end -end diff --git a/Formula/openslp.rb b/Formula/openslp.rb deleted file mode 100644 index 28384f3985d14..0000000000000 --- a/Formula/openslp.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Openslp < Formula - desc "Implementation of Service Location Protocol" - homepage "http://www.openslp.org" - url "https://downloads.sourceforge.net/project/openslp/2.0.0/2.0.0%20Release/openslp-2.0.0.tar.gz" - sha256 "924337a2a8e5be043ebaea2a78365c7427ac6e9cee24610a0780808b2ba7579b" - - bottle do - sha256 "948182086a86baa001d9b8864715c91d5d9b9ec76ba7c072667dc0d58e983d12" => :mojave - sha256 "3a933a2c697a2b7a00d9b1f9cc3a58664c43c18f7b4ff3d99afa7bc11d721da5" => :high_sierra - sha256 "fdd847dba24e5a96c30ccef98f0d035f39abc88617d779df627c132be5b648ae" => :sierra - sha256 "1c19d8355ddda63b9259101a0b7b56ea0fd9fb8f343e2df19f7248542fbf38e5" => :el_capitan - sha256 "95e41f7f42e80ab3234b460d90196389a0d275877195fe188ffc6249c0b762ce" => :yosemite - sha256 "883203d7fc5bbd6faefa058bf2f68dad2cc6a485f46599163d000684ae585507" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/openssh.rb b/Formula/openssh.rb deleted file mode 100644 index f3a9d0ef95194..0000000000000 --- a/Formula/openssh.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Openssh < Formula - desc "OpenBSD freely-licensed SSH connectivity tools" - homepage "https://www.openssh.com/" - url "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz" - mirror "https://mirror.vdms.io/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz" - version "7.9p1" - sha256 "6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad" - - bottle do - rebuild 1 - sha256 "475cc4f47a24d63d2050b95a48c9a0c624eb86f0f8a4539b76b3f1a5ca92aa82" => :mojave - sha256 "f0cc3763b34a7e8e9a7249b635a10453789186192c77f4fa4af7416cd8ca5a48" => :high_sierra - sha256 "e7bf2327f5d5fef76694d2dae0bce415cf452050177611d462cf6ddc0ccda79d" => :sierra - end - - # Please don't resubmit the keychain patch option. It will never be accepted. - # https://github.com/Homebrew/homebrew-dupes/pull/482#issuecomment-118994372 - - depends_on "pkg-config" => :build - depends_on "ldns" - depends_on "openssl" - - resource "com.openssh.sshd.sb" do - url "https://opensource.apple.com/source/OpenSSH/OpenSSH-209.50.1/com.openssh.sshd.sb" - sha256 "a273f86360ea5da3910cfa4c118be931d10904267605cdd4b2055ced3a829774" - end - - # Both these patches are applied by Apple. - patch do - url "https://raw.githubusercontent.com/Homebrew/patches/1860b0a74/openssh/patch-sandbox-darwin.c-apple-sandbox-named-external.diff" - sha256 "d886b98f99fd27e3157b02b5b57f3fb49f43fd33806195970d4567f12be66e71" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/patches/d8b2d8c2/openssh/patch-sshd.c-apple-sandbox-named-external.diff" - sha256 "3505c58bf1e584c8af92d916fe5f3f1899a6b15cc64a00ddece1dc0874b2f78f" - end - - def install - ENV.append "CPPFLAGS", "-D__APPLE_SANDBOX_NAMED_EXTERNAL__" - - # Ensure sandbox profile prefix is correct. - # We introduce this issue with patching, it's not an upstream bug. - inreplace "sandbox-darwin.c", "@PREFIX@/share/openssh", etc/"ssh" - - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc}/ssh - --with-ldns - --with-libedit - --with-kerberos5 - --with-pam - --with-ssl-dir=#{Formula["openssl"].opt_prefix} - ] - - system "./configure", *args - system "make" - ENV.deparallelize - system "make", "install" - - # This was removed by upstream with very little announcement and has - # potential to break scripts, so recreate it for now. - # Debian have done the same thing. - bin.install_symlink bin/"ssh" => "slogin" - - buildpath.install resource("com.openssh.sshd.sb") - (etc/"ssh").install "com.openssh.sshd.sb" => "org.openssh.sshd.sb" - end - - test do - assert_match "OpenSSH_", shell_output("#{bin}/ssh -V 2>&1") - - begin - pid = fork { exec sbin/"sshd", "-D", "-p", "8022" } - sleep 2 - assert_match "sshd", shell_output("lsof -i :8022") - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/openssl.rb b/Formula/openssl.rb deleted file mode 100644 index 8a54ca73f4c3f..0000000000000 --- a/Formula/openssl.rb +++ /dev/null @@ -1,135 +0,0 @@ -# This formula tracks 1.0.2 branch of OpenSSL, not the 1.1.0 branch. Due to -# significant breaking API changes in 1.1.0 other formulae will be migrated -# across slowly, so core will ship `openssl` & `openssl@1.1` for foreseeable. -class Openssl < Formula - desc "SSL/TLS cryptography library" - homepage "https://openssl.org/" - url "https://www.openssl.org/source/openssl-1.0.2q.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/openssl--1.0.2q.tar.gz" - mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.0.2q.tar.gz" - mirror "http://artfiles.org/openssl.org/source/openssl-1.0.2q.tar.gz" - sha256 "5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684" - - bottle do - sha256 "cdbee2befd8f2e178ff0c5f9e8796a73a7de20055aae51cba7cc749429e8c90f" => :mojave - sha256 "d3ac5de6ccd9c604a5f2b8582ebd721ab421c0fdbfefa5a4b1190f83277f2c27" => :high_sierra - sha256 "94881a8df581a9f63b6a0a6c9f362d873133c2a27f2708803bca778390356975" => :sierra - end - - keg_only :provided_by_macos, - "Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries" - - # An updated list of CA certificates for use by Leopard, whose built-in certificates - # are outdated, and Snow Leopard, whose `security` command returns no output. - resource "ca-bundle" do - url "https://curl.haxx.se/ca/cacert-2018-10-17.pem" - mirror "http://gitcdn.xyz/cdn/paragonie/certainty/d3e2777e1ca2b1401329a49c7d56d112e6414f23/data/cacert-2018-10-17.pem" - sha256 "86695b1be9225c3cf882d283f05c944e3aabbc1df6428a4424269a93e997dc65" - end - - # Use standard env on Snow Leopard to allow compilation fix below to work. - env :std if MacOS.version == :snow_leopard - - def arch_args - %w[ - darwin64-x86_64-cc - enable-ec_nistp_64_gcc_128 - ] - end - - def configure_args; %W[ - --prefix=#{prefix} - --openssldir=#{openssldir} - no-ssl2 - no-ssl3 - no-zlib - shared - enable-cms - ] - end - - def install - # OpenSSL will prefer the PERL environment variable if set over $PATH - # which can cause some odd edge cases & isn't intended. Unset for safety, - # along with perl modules in PERL5LIB. - ENV.delete("PERL") - ENV.delete("PERL5LIB") - - # Keep Leopard/Snow Leopard support alive for things like building portable Ruby by - # avoiding a makedepend issue introduced in recent versions of OpenSSL 1.0.2. - # https://github.com/Homebrew/homebrew-core/pull/34326 - depend_args = [] - depend_args << "MAKEDEPPROG=cc" if MacOS.version <= :snow_leopard - - # Build with GCC on Snow Leopard, which errors during tests if built with its clang. - # https://github.com/Homebrew/homebrew-core/issues/2766 - args = [] - args << "CC=cc" if MacOS.version == :snow_leopard - - ENV.deparallelize - system "perl", "./Configure", *(configure_args + arch_args) - system "make", "depend", *depend_args - system "make", *args - system "make", "test" - system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" - end - - def openssldir - etc/"openssl" - end - - def post_install - keychains = %w[ - /System/Library/Keychains/SystemRootCertificates.keychain - ] - - certs_list = `security find-certificate -a -p #{keychains.join(" ")}` - certs = certs_list.scan( - /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, - ) - - valid_certs = certs.select do |cert| - IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout", "w") do |openssl_io| - openssl_io.write(cert) - openssl_io.close_write - end - - $CHILD_STATUS.success? - end - - openssldir.mkpath - if MacOS.version <= :snow_leopard - resource("ca-bundle").stage do - openssldir.install "cacert-#{resource("ca-bundle").version}.pem" => "cert.pem" - end - else - (openssldir/"cert.pem").atomic_write(valid_certs.join("\n") << "\n") - end - end - - def caveats; <<~EOS - A CA file has been bootstrapped using certificates from the SystemRoots - keychain. To add additional certificates (e.g. the certificates added in - the System keychain), place .pem files in - #{openssldir}/certs - - and run - #{opt_bin}/c_rehash - EOS - end - - test do - # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody. - assert_predicate HOMEBREW_PREFIX/"etc/openssl/openssl.cnf", :exist?, - "OpenSSL requires the .cnf file for some functionality" - - # Check OpenSSL itself functions as expected. - (testpath/"testfile.txt").write("This is a test file") - expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" - system "#{bin}/openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" - open("checksum.txt") do |f| - checksum = f.read(100).split("=").last.strip - assert_equal checksum, expected_checksum - end - end -end diff --git a/Formula/openssl@1.1.rb b/Formula/openssl@1.1.rb deleted file mode 100644 index e346040fae705..0000000000000 --- a/Formula/openssl@1.1.rb +++ /dev/null @@ -1,108 +0,0 @@ -class OpensslAT11 < Formula - desc "Cryptography and SSL/TLS Toolkit" - homepage "https://openssl.org/" - url "https://www.openssl.org/source/openssl-1.1.1a.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/openssl@1.1--1.1.1a.tar.gz" - mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.1.1a.tar.gz" - sha256 "fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41" - version_scheme 1 - - bottle do - sha256 "802fef5cc7072a3dc6c1f15898d9f028d7bd32c659e93a354545e719f54a2456" => :mojave - sha256 "29ff522cbd3509b4f881643d2dfdec78396d41f8858d7d308d59f2e3b1839aa1" => :high_sierra - sha256 "af76397790ce9cb571a8e0bd1014a90a47ed1c05b5ee6727a2f6796ebdb95365" => :sierra - end - - keg_only :provided_by_macos, - "openssl/libressl is provided by macOS so don't link an incompatible version" - - # Only needs 5.10 to run, but needs >5.13.4 to run the testsuite. - # https://github.com/openssl/openssl/blob/4b16fa791d3ad8/README.PERL - # The MacOS ML tag is same hack as the way we handle most :python deps. - depends_on "perl" if MacOS.version <= :mountain_lion - - # SSLv2 died with 1.1.0, so no-ssl2 no longer required. - # SSLv3 & zlib are off by default with 1.1.0 but this may not - # be obvious to everyone, so explicitly state it for now to - # help debug inevitable breakage. - def configure_args; %W[ - --prefix=#{prefix} - --openssldir=#{openssldir} - no-ssl3 - no-ssl3-method - no-zlib - ] - end - - def install - # This could interfere with how we expect OpenSSL to build. - ENV.delete("OPENSSL_LOCAL_CONFIG_DIR") - - # This ensures where Homebrew's Perl is needed the Cellar path isn't - # hardcoded into OpenSSL's scripts, causing them to break every Perl update. - # Whilst our env points to opt_bin, by default OpenSSL resolves the symlink. - if which("perl") == Formula["perl"].opt_bin/"perl" - ENV["PERL"] = Formula["perl"].opt_bin/"perl" - end - - arch_args = %w[darwin64-x86_64-cc enable-ec_nistp_64_gcc_128] - - ENV.deparallelize - system "perl", "./Configure", *(configure_args + arch_args) - system "make" - system "make", "test" - system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" - end - - def openssldir - etc/"openssl@1.1" - end - - def post_install - keychains = %w[ - /System/Library/Keychains/SystemRootCertificates.keychain - ] - - certs_list = `security find-certificate -a -p #{keychains.join(" ")}` - certs = certs_list.scan( - /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, - ) - - valid_certs = certs.select do |cert| - IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout >/dev/null", "w") do |openssl_io| - openssl_io.write(cert) - openssl_io.close_write - end - - $CHILD_STATUS.success? - end - - openssldir.mkpath - (openssldir/"cert.pem").atomic_write(valid_certs.join("\n") << "\n") - end - - def caveats; <<~EOS - A CA file has been bootstrapped using certificates from the system - keychain. To add additional certificates, place .pem files in - #{openssldir}/certs - - and run - #{opt_bin}/c_rehash - EOS - end - - test do - # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody. - assert_predicate HOMEBREW_PREFIX/"etc/openssl@1.1/openssl.cnf", :exist?, - "OpenSSL requires the .cnf file for some functionality" - - # Check OpenSSL itself functions as expected. - (testpath/"testfile.txt").write("This is a test file") - expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" - system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" - open("checksum.txt") do |f| - checksum = f.read(100).split("=").last.strip - assert_equal checksum, expected_checksum - end - end -end diff --git a/Formula/opensubdiv.rb b/Formula/opensubdiv.rb deleted file mode 100644 index b618d278d2cf8..0000000000000 --- a/Formula/opensubdiv.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Opensubdiv < Formula - desc "Open-source subdivision surface library" - homepage "https://graphics.pixar.com/opensubdiv/docs/intro.html" - url "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_3_3.tar.gz" - sha256 "2dc81b3a085e692cca3166ac88751e4674a9ddf5b5d7935adf677bb2bd3f2d2f" - - bottle do - sha256 "bcd84fb95f1ce06d8073e1ea0ebbc0f7ff6399af21b4249e012edbab1bdb528b" => :mojave - sha256 "edd23b3384f3efeb0aaeccf672d082cd727d73b4fc3d1adb6d1762f064966509" => :high_sierra - sha256 "5230aab2724b2a0deac3b39adaa8a79092974f11ab0a90ffd5bc0bf785ccbc95" => :sierra - end - - depends_on "cmake" => :build - depends_on "glfw" - - def install - glfw = Formula["glfw"] - args = std_cmake_args + %W[ - -DNO_CLEW=1 - -DNO_CUDA=1 - -DNO_DOC=1 - -DNO_EXAMPLES=1 - -DNO_OMP=1 - -DNO_OPENCL=1 - -DNO_PTEX=1 - -DNO_TBB=1 - -DGLFW_LOCATION=#{glfw.opt_prefix} - ] - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - pkgshare.install bin/"tutorials/hbr_tutorial_0" - rm_rf "#{bin}/tutorials" - end - end - - test do - output = shell_output("#{pkgshare}/hbr_tutorial_0") - assert_match "Created a pyramid with 5 faces and 5 vertices", output - end -end diff --git a/Formula/opentracing-cpp.rb b/Formula/opentracing-cpp.rb deleted file mode 100644 index 30083d1163b2a..0000000000000 --- a/Formula/opentracing-cpp.rb +++ /dev/null @@ -1,27 +0,0 @@ -class OpentracingCpp < Formula - desc "OpenTracing API for C++" - homepage "https://opentracing.io/" - url "https://github.com/opentracing/opentracing-cpp/archive/v1.5.0.tar.gz" - sha256 "4455ca507936bc4b658ded10a90d8ebbbd61c58f06207be565a4ffdc885687b5" - - bottle do - cellar :any - sha256 "77e90986d743b410c54ba63a30cf0741eb8f2faa68392a5c726c613c6113695c" => :mojave - sha256 "e88447ef67b65da415b9c6b747eb38e18a6ef7abc268334bd5b561d825b7eedb" => :high_sierra - sha256 "5466485c5f18de7452c2d4b043e0dcf0c23f3e0fa9fc93d8d84177b38eae8c34" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - pkgshare.install "example/tutorial/tutorial-example.cpp" - pkgshare.install "example/tutorial/text_map_carrier.h" - end - - test do - system ENV.cxx, "#{pkgshare}/tutorial-example.cpp", "-std=c++11", "-L#{lib}", "-I#{include}", "-lopentracing", "-lopentracing_mocktracer", "-o", "tutorial-example" - system "./tutorial-example" - end -end diff --git a/Formula/opentsdb.rb b/Formula/opentsdb.rb deleted file mode 100644 index c1fff10b5eff3..0000000000000 --- a/Formula/opentsdb.rb +++ /dev/null @@ -1,143 +0,0 @@ -class Opentsdb < Formula - desc "Scalable, distributed Time Series Database" - homepage "http://opentsdb.net/" - url "https://github.com/OpenTSDB/opentsdb/releases/download/v2.3.1/opentsdb-2.3.1.tar.gz" - sha256 "4dba914a19cf0a56b1d0cc22b4748ebd0d0136e633eb4514a5518790ad7fc1d1" - - bottle do - cellar :any_skip_relocation - sha256 "f1d531453d09dc0b70dd1f803d117f26a09c4ab6990845aa40bf082d2c3a0eef" => :mojave - sha256 "a6b9311bccbf95f6117413ef081f3eb6d52f50fec4f9b1829cf4440e119cafc7" => :high_sierra - sha256 "4933e90ddc979787f2e477ecefcd36e5075c33cc91a5a88f5d4ddec49dfc3b8f" => :sierra - sha256 "440446c0474ce94a7c4724de2971cef50786285c636d32f1dea9f2164dccbb5d" => :el_capitan - end - - depends_on "hbase" - depends_on :java => "1.8" - depends_on "lzo" - depends_on "gnuplot" => :optional - - def install - system "./configure", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}/opentsdb" - system "make" - bin.mkpath - (pkgshare/"static/gwt/opentsdb/images/ie6").mkpath - system "make", "install" - - env = { - :HBASE_HOME => Formula["hbase"].opt_libexec, - :COMPRESSION => "LZO", - } - env = Language::Java.java_home_env("1.8").merge(env) - create_table = pkgshare/"tools/create_table_with_env.sh" - create_table.write_env_script pkgshare/"tools/create_table.sh", env - create_table.chmod 0755 - - inreplace pkgshare/"etc/opentsdb/opentsdb.conf", "/usr/share", "#{HOMEBREW_PREFIX}/share" - etc.install pkgshare/"etc/opentsdb" - (pkgshare/"plugins/.keep").write "" - - (bin/"start-tsdb.sh").write <<~EOS - #!/bin/sh - exec "#{opt_bin}/tsdb" tsd \\ - --config="#{etc}/opentsdb/opentsdb.conf" \\ - --staticroot="#{opt_pkgshare}/static/" \\ - --cachedir="#{var}/cache/opentsdb" \\ - --port=4242 \\ - --zkquorum=localhost:2181 \\ - --zkbasedir=/hbase \\ - --auto-metric \\ - "$@" - EOS - (bin/"start-tsdb.sh").chmod 0755 - - libexec.mkpath - bin.env_script_all_files(libexec, env) - end - - def post_install - (var/"cache/opentsdb").mkpath - system "#{Formula["hbase"].opt_bin}/start-hbase.sh" - begin - sleep 2 - system "#{pkgshare}/tools/create_table_with_env.sh" - ensure - system "#{Formula["hbase"].opt_bin}/stop-hbase.sh" - end - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/opentsdb/bin/start-tsdb.sh" - - def plist; <<~EOS - - - - - KeepAlive - - OtherJobEnabled - - #{Formula["hbase"].plist_name} - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/start-tsdb.sh - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/opentsdb/opentsdb.log - StandardErrorPath - #{var}/opentsdb/opentsdb.err - - - EOS - end - - test do - cp_r (Formula["hbase"].opt_libexec/"conf"), testpath - inreplace (testpath/"conf/hbase-site.xml") do |s| - s.gsub! /(hbase.rootdir.*)\n.*/, "\\1\nfile://#{testpath}/hbase" - s.gsub! /(hbase.zookeeper.property.dataDir.*)\n.*/, "\\1\n#{testpath}/zookeeper" - end - - ENV["HBASE_LOG_DIR"] = testpath/"logs" - ENV["HBASE_CONF_DIR"] = testpath/"conf" - ENV["HBASE_PID_DIR"] = testpath/"pid" - - system "#{Formula["hbase"].opt_bin}/start-hbase.sh" - begin - sleep 2 - - system "#{pkgshare}/tools/create_table_with_env.sh" - - tsdb_err = "#{testpath}/tsdb.err" - tsdb_out = "#{testpath}/tsdb.out" - tsdb_daemon_pid = fork do - $stderr.reopen(tsdb_err, "w") - $stdout.reopen(tsdb_out, "w") - exec("#{bin}/start-tsdb.sh") - end - sleep 15 - - begin - pipe_output("nc localhost 4242 2>&1", "put homebrew.install.test 1356998400 42.5 host=webserver01 cpu=0\n") - - system "#{bin}/tsdb", "query", "1356998000", "1356999000", "sum", "homebrew.install.test", "host=webserver01", "cpu=0" - ensure - Process.kill(9, tsdb_daemon_pid) - end - ensure - system "#{Formula["hbase"].opt_bin}/stop-hbase.sh" - end - end -end diff --git a/Formula/openttd.rb b/Formula/openttd.rb deleted file mode 100644 index 83df1a404cf67..0000000000000 --- a/Formula/openttd.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Openttd < Formula - desc "Simulation game based upon Transport Tycoon Deluxe" - homepage "https://www.openttd.org/" - url "https://binaries.openttd.org/releases/1.8.0/openttd-1.8.0-source.tar.xz" - sha256 "c2d32d9d736d27202a020027a3729ae763f5432ae6f424891e57a4095eeb087f" - head "https://git.openttd.org/openttd/trunk.git" - - bottle do - sha256 "5525bc99e1a325df855a27cc443b2a7ac92e618ae713be9392f52903d92530e0" => :mojave - sha256 "e5d194e126ec516ca84a4f9187e8415953cf64e319dfe31dedd1bdaa2a4e2339" => :high_sierra - sha256 "5d74a4c682236213f06a7cdeae2f62f462d59f445a66719fe86e82a872ff112e" => :sierra - sha256 "b2b8d6cf06c840acbf425d4b89daf146541d46f19cd3aa7f09a622d7897b3a9f" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "lzo" - depends_on "xz" - - resource "opengfx" do - url "https://bundles.openttdcoop.org/opengfx/releases/0.5.4/opengfx-0.5.4.zip" - sha256 "3d136d776906dbe8b5df1434cb9a68d1249511a3c4cfaca55cc24cc0028ae078" - end - - resource "opensfx" do - url "https://bundles.openttdcoop.org/opensfx/releases/0.2.3/opensfx-0.2.3.zip" - sha256 "3574745ac0c138bae53b56972591db8d778ad9faffd51deae37a48a563e71662" - end - - resource "openmsx" do - url "https://bundles.openttdcoop.org/openmsx/releases/0.3.1/openmsx-0.3.1.zip" - sha256 "92e293ae89f13ad679f43185e83fb81fb8cad47fe63f4af3d3d9f955130460f5" - end - - def install - system "./configure", "--prefix-dir=#{prefix}" - system "make", "bundle" - - (buildpath/"bundle/OpenTTD.app/Contents/Resources/data/opengfx").install resource("opengfx") - (buildpath/"bundle/OpenTTD.app/Contents/Resources/data/opensfx").install resource("opensfx") - (buildpath/"bundle/OpenTTD.app/Contents/Resources/gm/openmsx").install resource("openmsx") - - prefix.install "bundle/OpenTTD.app" - bin.write_exec_script "#{prefix}/OpenTTD.app/Contents/MacOS/openttd" - end - - def caveats - <<~EOS - If you have access to the sound and graphics files from the original - Transport Tycoon Deluxe, you can install them by following the - instructions in section 4.1 of #{prefix}/readme.txt - EOS - end - - test do - assert_match /OpenTTD #{version}\n/, shell_output("#{bin}/openttd -h") - end -end diff --git a/Formula/openvdb.rb b/Formula/openvdb.rb deleted file mode 100644 index 1fcac97c5f63e..0000000000000 --- a/Formula/openvdb.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Openvdb < Formula - desc "Sparse volume processing toolkit" - homepage "http://www.openvdb.org/" - url "https://github.com/AcademySoftwareFoundation/openvdb/archive/v6.0.0.tar.gz" - sha256 "dbdf3048336444c402e5d3727c9bfb2e84454b8d0fd468ba92a8c7225e24b7b4" - head "https://github.com/AcademySoftwareFoundation/openvdb.git" - - bottle do - sha256 "61bae9831330a80fa016b1a4337c2629648076c60ea86f3a37a9c756c16129cc" => :mojave - sha256 "948544b41fb3c32e8b3cd793b2b2c8354f66aa7b3dd828eb989735cb4f6ecf23" => :high_sierra - sha256 "f8c032884b61bd202b33991cf7bc36bdf996cc65e64e585dc126715642dea41f" => :sierra - end - - depends_on "doxygen" => :build - depends_on "boost" - depends_on "c-blosc" - depends_on "glfw" - depends_on "ilmbase" - depends_on "jemalloc" - depends_on "openexr" - depends_on "tbb" - - resource "test_file" do - url "http://www.openvdb.org/download/models/cube.vdb.zip" - sha256 "05476e84e91c0214ad7593850e6e7c28f777aa4ff0a1d88d91168a7dd050f922" - end - - needs :cxx11 - - def install - ENV.cxx11 - # Adjust hard coded paths in Makefile - args = [ - "DESTDIR=#{prefix}", - "BLOSC_INCL_DIR=#{Formula["c-blosc"].opt_include}", - "BLOSC_LIB_DIR=#{Formula["c-blosc"].opt_lib}", - "BOOST_INCL_DIR=#{Formula["boost"].opt_include}", - "BOOST_LIB_DIR=#{Formula["boost"].opt_lib}", - "BOOST_THREAD_LIB=-lboost_thread-mt", - "CONCURRENT_MALLOC_LIB_DIR=#{Formula["jemalloc"].opt_lib}", - "CPPUNIT_INCL_DIR=", # Do not use cppunit - "CPPUNIT_LIB_DIR=", - "DOXYGEN=doxygen", - "EXR_INCL_DIR=#{Formula["openexr"].opt_include}/OpenEXR", - "EXR_LIB_DIR=#{Formula["openexr"].opt_lib}", - "LOG4CPLUS_INCL_DIR=", # Do not use log4cplus - "LOG4CPLUS_LIB_DIR=", - "NUMPY_INCL_DIR=", - "PYTHON_VERSION=", - "TBB_INCL_DIR=#{Formula["tbb"].opt_include}", - "TBB_LIB_DIR=#{Formula["tbb"].opt_lib}", - "GLFW_INCL_DIR=#{Formula["glfw"].opt_include}", - "GLFW_LIB_DIR=#{Formula["glfw"].opt_lib}", - "GLFW_LIB=-lglfw", - ] - - ENV.append_to_cflags "-I #{buildpath}" - - cd "openvdb" do - system "make", "install", *args - end - end - - test do - resource("test_file").stage testpath - system "#{bin}/vdb_print", "-m", "cube.vdb" - end -end diff --git a/Formula/openvpn.rb b/Formula/openvpn.rb deleted file mode 100644 index 9be81c0912327..0000000000000 --- a/Formula/openvpn.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Openvpn < Formula - desc "SSL/TLS VPN implementing OSI layer 2 or 3 secure network extension" - homepage "https://openvpn.net/index.php/download/community-downloads.html" - url "https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.xz" - mirror "https://build.openvpn.net/downloads/releases/openvpn-2.4.6.tar.xz" - sha256 "4f6434fa541cc9e363434ea71a16a62cf2615fb2f16af5b38f43ab5939998c26" - - bottle do - sha256 "66f2838be95b48d8198f41d083d2400653bbc3d9f4d26235cc77ac79eb1d4e20" => :mojave - sha256 "47aff9000b9a23736bec4d1a58cafa8eb1511ffc85043b5eee2124735f073cd2" => :high_sierra - sha256 "9e23d0e6089f209c7bbac93594107741a1418bd71e65f4047355d1b1b2c71917" => :sierra - sha256 "6fd9609026d5f56b688f15856f19a5774f868262251cb1c8b6599a11c41a2fa1" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "lz4" - depends_on "lzo" - - # Requires tuntap for < 10.10 - depends_on :macos => :yosemite - - depends_on "openssl" - - resource "pkcs11-helper" do - url "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-1.22/pkcs11-helper-1.22.tar.bz2" - sha256 "fbc15f5ffd5af0200ff2f756cb4388494e0fb00b4f2b186712dce6c48484a942" - end - - def install - vendor = buildpath/"brew_vendor" - - resource("pkcs11-helper").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{vendor}/pkcs11-helper", - "--disable-threading", - "--disable-slotevent", - "--disable-shared" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", vendor/"pkcs11-helper/lib/pkgconfig" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-crypto-library=openssl", - "--enable-pkcs11", - "--prefix=#{prefix}" - system "make", "install" - - inreplace "sample/sample-config-files/openvpn-startup.sh", - "/etc/openvpn", "#{etc}/openvpn" - - (doc/"samples").install Dir["sample/sample-*"] - (etc/"openvpn").install doc/"samples/sample-config-files/client.conf" - (etc/"openvpn").install doc/"samples/sample-config-files/server.conf" - - # We don't use mbedtls, so this file is unnecessary & somewhat confusing. - rm doc/"README.mbedtls" - end - - def post_install - (var/"run/openvpn").mkpath - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/openvpn - --config - #{etc}/openvpn/openvpn.conf - - OnDemand - - RunAtLoad - - TimeOut - 90 - WatchPaths - - #{etc}/openvpn - - WorkingDirectory - #{etc}/openvpn - - - EOS - end - - test do - system sbin/"openvpn", "--show-ciphers" - end -end diff --git a/Formula/ophcrack.rb b/Formula/ophcrack.rb deleted file mode 100644 index 9684dec85c920..0000000000000 --- a/Formula/ophcrack.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Ophcrack < Formula - desc "Microsoft Windows password cracker using rainbow tables" - homepage "https://ophcrack.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ophcrack/ophcrack/3.8.0/ophcrack-3.8.0.tar.bz2" - mirror "https://mirrors.kernel.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2" - sha256 "048a6df57983a3a5a31ac7c4ec12df16aa49e652a29676d93d4ef959d50aeee0" - - bottle do - cellar :any - sha256 "c5477f7cf1a1092ff2c3a973bbaf48560a23df09e67d25963eee21ab2e4f91c5" => :mojave - sha256 "5fa70c9c1293d366594b8c3f16f77a31cfc562dbc7b882c919458efa34d387f8" => :high_sierra - sha256 "60021285ce03e3a40f946906879ad053ec68fec04e8ab299b3362e8b487e274f" => :sierra - sha256 "cdc8ef23e5f78936b3c3840a18a6ea2fcee63cb3ba16ff2037d995221e0ae7cf" => :el_capitan - end - - depends_on "openssl" - - def install - system "./configure", "--disable-debug", - "--disable-gui", - "--with-libssl=#{Formula["openssl"].opt_prefix}", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"ophcrack", "-h" - end -end diff --git a/Formula/optipng.rb b/Formula/optipng.rb deleted file mode 100644 index 73cb7c9d72eac..0000000000000 --- a/Formula/optipng.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Optipng < Formula - desc "PNG file optimizer" - homepage "https://optipng.sourceforge.io/" - url "https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.7/optipng-0.7.7.tar.gz" - sha256 "4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452" - head "http://hg.code.sf.net/p/optipng/mercurial", :using => :hg - - bottle do - cellar :any_skip_relocation - sha256 "150c2cace53963fa77b40e30e403fea731ac87ce3aa5bf0528205f3bcd0626ab" => :mojave - sha256 "b64e8d6bd75de2e40d481c7b0e816f45b0865e2dfa42f03e507f67607804ef2b" => :high_sierra - sha256 "416ce24daab37aaef4fecda949fc80bed2b1d9b9714406f972b093846578ab3a" => :sierra - sha256 "f59e3cedb808003915ee214f6487b968e3e6dcea669452f0a732fcced03aaa8f" => :el_capitan - end - - def install - system "./configure", "--with-system-zlib", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/optipng", "-simulate", test_fixtures("test.png") - end -end diff --git a/Formula/opus-tools.rb b/Formula/opus-tools.rb deleted file mode 100644 index 52a1fe302632a..0000000000000 --- a/Formula/opus-tools.rb +++ /dev/null @@ -1,43 +0,0 @@ -class OpusTools < Formula - desc "Utilities to encode, inspect, and decode .opus files" - homepage "https://www.opus-codec.org" - url "https://archive.mozilla.org/pub/opus/opus-tools-0.2.tar.gz" - sha256 "b4e56cb00d3e509acfba9a9b627ffd8273b876b4e2408642259f6da28fa0ff86" - - bottle do - cellar :any - sha256 "68b6c2204f54060c61d47394b2bfdb3a318a124ce0a0e8ad2ab494ae4d9feee8" => :mojave - sha256 "30e9b3686b445c3344ba2e1ba59a813a1251a93381a367ae0cb09236fc5f7ca4" => :high_sierra - sha256 "4e2f1a811051ee31ec55dc10016f2c91dc097ec38a91916274ead42b5146d0c9" => :sierra - end - - head do - url "https://git.xiph.org/opus-tools.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "libogg" - depends_on "libopusenc" - depends_on "opus" - depends_on "opusfile" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - cp test_fixtures("test.wav"), "test.wav" - assert_match "Encoding complete", shell_output("#{bin}/opusenc test.wav enc.opus 2>&1") - assert_predicate testpath/"enc.opus", :exist?, "Failed to encode to enc.opus" - assert_match "Decoding complete", shell_output("#{bin}/opusdec enc.opus dec.wav 2>&1") - assert_predicate testpath/"dec.wav", :exist?, "Failed to decode to dec.wav" - end -end diff --git a/Formula/opus.rb b/Formula/opus.rb deleted file mode 100644 index 06d374aea155f..0000000000000 --- a/Formula/opus.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Opus < Formula - desc "Audio codec" - homepage "https://www.opus-codec.org/" - url "https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz" - sha256 "4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550" - - bottle do - cellar :any - sha256 "284b7f10549043bd3dcd7e1ba8765ef75f5c87c95bf7550d3e60a94eccdafe03" => :mojave - sha256 "f7a80387cadbc0d3dcdc5cdd3f6ef6dc34d7d136d3ca7a368186dac54e2f43be" => :high_sierra - sha256 "dd8c973d58d50be078d47efdf50419fa00a36187ed0907d95dc8799b757e2b4a" => :sierra - end - - head do - url "https://git.xiph.org/opus.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - option "with-custom-modes", "Enable custom-modes for opus see https://www.opus-codec.org/docs/opus_api-1.1.3/group__opus__custom.html" - - def install - args = ["--disable-dependency-tracking", "--disable-doc", "--prefix=#{prefix}"] - args << "--enable-custom-modes" if build.with? "custom-modes" - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main(int argc, char **argv) - { - int err = 0; - opus_int32 rate = 48000; - int channels = 2; - int app = OPUS_APPLICATION_AUDIO; - OpusEncoder *enc; - int ret; - - enc = opus_encoder_create(rate, channels, app, &err); - if (!(err < 0)) - { - err = opus_encoder_ctl(enc, OPUS_SET_BITRATE(OPUS_AUTO)); - if (!(err < 0)) - { - opus_encoder_destroy(enc); - return 0; - } - } - return err; - } - EOS - system ENV.cxx, "-I#{include}/opus", "-L#{lib}", "-lopus", - testpath/"test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/opusfile.rb b/Formula/opusfile.rb deleted file mode 100644 index 37438fac478e1..0000000000000 --- a/Formula/opusfile.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Opusfile < Formula - desc "API for decoding and seeking in .opus files" - homepage "https://www.opus-codec.org/" - url "https://archive.mozilla.org/pub/opus/opusfile-0.11.tar.gz" - sha256 "74ce9b6cf4da103133e7b5c95df810ceb7195471e1162ed57af415fabf5603bf" - - bottle do - cellar :any - sha256 "b0832b77ee693d6b273d1ef2e46b87e827506797db7eb46ba15288e3eebeb095" => :mojave - sha256 "8dc04c950d22da20bd5357f248edac39bd63d9f9e6b9fc5a0d2ddbed1ab92e5e" => :high_sierra - sha256 "f61cae3c7434bf1f8a240e412c96fdf0f40ec16ad9a6e88bf74af3a4b07303bc" => :sierra - end - - head do - url "https://git.xiph.org/opusfile.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libogg" - depends_on "openssl" - depends_on "opus" - - resource "music_48kbps.opus" do - url "https://www.opus-codec.org/examples/samples/music_48kbps.opus" - sha256 "64571f56bb973c078ec784472944aff0b88ba0c88456c95ff3eb86f5e0c1357d" - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main(int argc, const char **argv) { - int ret; - OggOpusFile *of; - - of = op_open_file(argv[1], &ret); - if (of == NULL) { - fprintf(stderr, "Failed to open file '%s': %i\\n", argv[1], ret); - return EXIT_FAILURE; - } - op_free(of); - return EXIT_SUCCESS; - } - EOS - system ENV.cc, "test.c", "-I#{Formula["opus"].include}/opus", - "-L#{lib}", - "-lopusfile", - "-o", "test" - resource("music_48kbps.opus").stage testpath - system "./test", "music_48kbps.opus" - end -end diff --git a/Formula/orbit.rb b/Formula/orbit.rb deleted file mode 100644 index ce543bd4a0c54..0000000000000 --- a/Formula/orbit.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Orbit < Formula - desc "CORBA 2.4-compliant object request broker (ORB)" - homepage "https://projects.gnome.org/ORBit2" - url "https://download.gnome.org/sources/ORBit2/2.14/ORBit2-2.14.19.tar.bz2" - sha256 "55c900a905482992730f575f3eef34d50bda717c197c97c08fa5a6eafd857550" - - bottle do - sha256 "a70cbcdfb9d4350141ed258c4f61e0b16dddbf9bc9ce2658dfad9609a4ab3b22" => :mojave - sha256 "4d44dbf8d5a6dcfabcbf71a0f42fb0a3f961cd7beae541f3dd657789065269c2" => :high_sierra - sha256 "a267317818996e273fdd78837bc6e18709f273a31c21ca7dae7f09d1c634637f" => :sierra - sha256 "11bb24fb06daef1ccea017470e23e56706c24265a4f7551a14d99e4f88121781" => :el_capitan - sha256 "adf8c93736bee9ceede9f65ae9e4d6d10529a085315ec522bfd661a7b6fcd94a" => :yosemite - sha256 "ae04763dcb6ea680fba27e49b01235d65204cd9240a871b429095fa414fda4fb" => :mavericks - sha256 "9f987a2d8be82cf391d2903872cfe20ce304cbc91fbe638820c41b00a3ecb4cc" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libidl" - - # per MacPorts, re-enable use of deprecated glib functions - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/6b7eaf2b/orbit/patch-linc2-src-Makefile.in.diff" - sha256 "572771ea59f841d74ac361d51f487cc3bcb2d75dacc9c20a8bd6cbbaeae8f856" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/6b7eaf2b/orbit/patch-configure.diff" - sha256 "34d068df8fc9482cf70b291032de911f0e75a30994562d4cf56b0cc2a8e28e42" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /#{version}/, shell_output("#{bin}/orbit2-config --prefix --version") - end -end diff --git a/Formula/orc-tools.rb b/Formula/orc-tools.rb deleted file mode 100644 index a20c6c8c52e67..0000000000000 --- a/Formula/orc-tools.rb +++ /dev/null @@ -1,17 +0,0 @@ -class OrcTools < Formula - desc "ORC java command-line tools and utilities" - homepage "https://orc.apache.org/" - url "https://search.maven.org/remotecontent?filepath=org/apache/orc/orc-tools/1.5.4/orc-tools-1.5.4-uber.jar" - sha256 "f798969900a9baa845570d16e3022fe0884c9788c48e70c0c242fbfa353f2652" - - bottle :unneeded - - def install - libexec.install "orc-tools-#{version}-uber.jar" - bin.write_jar_script libexec/"orc-tools-#{version}-uber.jar", "orc-tools" - end - - test do - system "#{bin}/orc-tools", "meta", "-h" - end -end diff --git a/Formula/orc.rb b/Formula/orc.rb deleted file mode 100644 index 912f7f111fd80..0000000000000 --- a/Formula/orc.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Orc < Formula - desc "Oil Runtime Compiler (ORC)" - homepage "https://cgit.freedesktop.org/gstreamer/orc/" - url "https://gstreamer.freedesktop.org/src/orc/orc-0.4.28.tar.xz" - sha256 "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce" - - bottle do - cellar :any - sha256 "6ed19a8c63bbd23187a05d0d09a9c6d288625b4c234f8b60a022bb16763cea3f" => :mojave - sha256 "bc08fab45dc2650b71950bff090bb09e64595778f3810bca442775b7973a43dd" => :high_sierra - sha256 "6eafe23ac5c17b765ca6f59eb65c52d782d2858bbca7a4f374b77258dedb828f" => :sierra - sha256 "c640dd001774b981101cbc223c51e31aafb35a6b8bc2e2fc3fc2c15dbfe3fbae" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-gtk-doc" - system "make", "install" - end - - test do - system "#{bin}/orcc", "--version" - end -end diff --git a/Formula/ori.rb b/Formula/ori.rb deleted file mode 100644 index df512d8aeb7e5..0000000000000 --- a/Formula/ori.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ori < Formula - desc "Secure distributed file system" - homepage "http://ori.scs.stanford.edu/" - url "https://bitbucket.org/orifs/ori/downloads/ori-0.8.1.tgz" - sha256 "a6dd5677608c81d8cda657eb330661b5f9e0957a962a5588473d556ddf49f15f" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "2c40de6a29e9aa747f6370b93122a437c8ff3e35fd93129141b467ad18414894" => :mojave - sha256 "d96b3f8a41b879772d0b2e3f9eff4e43c73cb268b782c0ddbbdd82bd9680d804" => :high_sierra - sha256 "3851019914d6ea9efc9115c100b73d24775b6d5d6c517399aea4259e74097670" => :sierra - sha256 "c19677cd17c419810b6389aa7c2815f0f8da16d7035dbdad5e209a96913e1f45" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on "boost@1.60" - depends_on "libevent" - depends_on "openssl" - depends_on :osxfuse - - def install - system "scons", "BUILDTYPE=RELEASE" - system "scons", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/ori" - end -end diff --git a/Formula/orientdb.rb b/Formula/orientdb.rb deleted file mode 100644 index 7b90527d0420c..0000000000000 --- a/Formula/orientdb.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Orientdb < Formula - desc "Graph database" - homepage "https://orientdb.com/" - url "https://orientdb.com/download.php?file=orientdb-community-importers-2.2.29.tar.gz" - sha256 "ed6e65b18fed70ace3afa780a125100a19899e9b18f4d6e9bc1111e7ee88d752" - - bottle :unneeded - - depends_on :java => "1.6+" - - def install - rm_rf Dir["{bin,benchmarks}/*.{bat,exe}"] - - chmod 0755, Dir["bin/*"] - libexec.install Dir["*"] - - inreplace "#{libexec}/config/orientdb-server-config.xml", "", - <<~EOS - - - EOS - inreplace "#{libexec}/config/orientdb-server-log.properties", "../log", "#{var}/log/orientdb" - inreplace "#{libexec}/bin/orientdb.sh", "../log", "#{var}/log/orientdb" - inreplace "#{libexec}/bin/server.sh", "ORIENTDB_PID=$ORIENTDB_HOME/bin", "ORIENTDB_PID=#{var}/run/orientdb" - inreplace "#{libexec}/bin/shutdown.sh", "ORIENTDB_PID=$ORIENTDB_HOME/bin", "ORIENTDB_PID=#{var}/run/orientdb" - inreplace "#{libexec}/bin/orientdb.sh", '"YOUR_ORIENTDB_INSTALLATION_PATH"', libexec - inreplace "#{libexec}/bin/orientdb.sh", 'su $ORIENTDB_USER -c "cd \"$ORIENTDB_DIR/bin\";', "" - inreplace "#{libexec}/bin/orientdb.sh", '&"', "&" - - bin.install_symlink "#{libexec}/bin/orientdb.sh" => "orientdb" - bin.install_symlink "#{libexec}/bin/console.sh" => "orientdb-console" - bin.install_symlink "#{libexec}/bin/gremlin.sh" => "orientdb-gremlin" - end - - def post_install - (var/"db/orientdb").mkpath - (var/"run/orientdb").mkpath - (var/"log/orientdb").mkpath - touch "#{var}/log/orientdb/orientdb.err" - touch "#{var}/log/orientdb/orientdb.log" - - ENV["ORIENTDB_ROOT_PASSWORD"] = "orientdb" - system "#{bin}/orientdb", "stop" - sleep 3 - system "#{bin}/orientdb", "start" - sleep 3 - ensure - system "#{bin}/orientdb", "stop" - end - - def caveats; <<~EOS - The OrientDB root password was set to 'orientdb'. To reset it: - https://orientdb.com/docs/2.2/Server-Security.html#restoring-the-servers-user-root - EOS - end - - plist_options :manual => "orientdb start" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - homebrew.mxcl.orientdb - ProgramArguments - - /usr/local/opt/orientdb/libexec/bin/server.sh - - RunAtLoad - - WorkingDirectory - /usr/local/var - StandardErrorPath - /usr/local/var/log/orientdb/serror.log - StandardOutPath - /usr/local/var/log/orientdb/sout.log - - - EOS - end - - test do - ENV["CONFIG_FILE"] = "#{testpath}/orientdb-server-config.xml" - ENV["ORIENTDB_ROOT_PASSWORD"] = "orientdb" - - cp "#{libexec}/config/orientdb-server-config.xml", testpath - inreplace "#{testpath}/orientdb-server-config.xml", "", - " \n " - - begin - assert_match "OrientDB console v.#{version}", pipe_output("#{bin}/orientdb-console \"exit;\"") - end - end -end diff --git a/Formula/orocos-kdl.rb b/Formula/orocos-kdl.rb deleted file mode 100644 index 027d47b324d7d..0000000000000 --- a/Formula/orocos-kdl.rb +++ /dev/null @@ -1,42 +0,0 @@ -class OrocosKdl < Formula - desc "Orocos Kinematics and Dynamics C++ library" - homepage "http://www.orocos.org/kdl" - url "https://github.com/orocos/orocos_kinematics_dynamics/archive/v1.4.0.tar.gz" - sha256 "05b93e759923684dc07433ccae1e476d158d89b3c2be5079c20062406da7b4dd" - - bottle do - cellar :any - sha256 "3d88fc55d86c9d1194ed3896bf1524405997e601ae75acbd37b176f882f07868" => :mojave - sha256 "32e9cd3e10a20c046a45122557dda364352619c59acffca07f8c858cdcff9765" => :high_sierra - sha256 "2696ca8480d6be3de18a141630388ef5fe5486096c02f99726b6d07cc91ff958" => :sierra - sha256 "87d3407e88f69187f10119d109321c8ece7c04154262475665f462923f69ffe9" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "eigen" - - def install - cd "orocos_kdl" do - system "cmake", ".", "-DEIGEN3_INCLUDE_DIR=#{Formula["eigen"].opt_include}/eigen3", - *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - using namespace KDL; - Vector v1(1.,0.,1.); - Vector v2(1.,0.,1.); - assert(v1==v2); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lorocos-kdl", - "-o", "test" - system "./test" - end -end diff --git a/Formula/ortp.rb b/Formula/ortp.rb deleted file mode 100644 index 373f00d6e0f8b..0000000000000 --- a/Formula/ortp.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Ortp < Formula - desc "Real-time transport protocol (RTP, RFC3550) library" - homepage "https://www.linphone.org/technical-corner/ortp/overview" - url "https://nongnu.askapache.com/linphone/ortp/sources/ortp-0.27.0.tar.gz" - sha256 "eb61a833ab3ad80978d7007411240f46e9b2d1034373b9d9dfaac88c1b6ec0af" - revision 4 - - bottle do - sha256 "2858534d05cd9dd89af063341124f715aa200d74d893c81c7ee8f7e32bebe6e2" => :mojave - sha256 "3e65235d8bf6ec1035762ab045259c154e650e737a925bd7d766cc3e52a7d0ec" => :high_sierra - sha256 "1d762f2592d6e578d8e2cb68f5694daba1309c80f6be3124980356b526a12c0d" => :sierra - sha256 "0c28ba67b9740081bf591b3cff97ca22fc9a6d5999c1a14f0cb9e3a0b19dfb43" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "mbedtls" - - resource "bctoolbox" do - url "https://github.com/BelledonneCommunications/bctoolbox/archive/0.6.0.tar.gz" - sha256 "299dedcf8f1edea79964314504f0d24e97cdf24a289896fc09bc69c38eb9f9be" - end - - def install - resource("bctoolbox").stage do - args = std_cmake_args + %W[ - -DCMAKE_INSTALL_PREFIX=#{libexec} - -DENABLE_TESTS_COMPONENT=OFF - ] - system "cmake", ".", *args - system "make", "install" - end - - libbctoolbox = (libexec/"lib/libbctoolbox.dylib").readlink - MachO::Tools.change_dylib_id("#{libexec}/lib/libbctoolbox.dylib", - "#{libexec}/lib/#{libbctoolbox}") - - ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "ortp/logging.h" - #include "ortp/rtpsession.h" - #include "ortp/sessionset.h" - int main() - { - ORTP_PUBLIC void ortp_init(void); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lortp", - testpath/"test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/osc.rb b/Formula/osc.rb deleted file mode 100644 index 328cd8d4511e7..0000000000000 --- a/Formula/osc.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Osc < Formula - include Language::Python::Virtualenv - - desc "The command-line interface to work with an Open Build Service" - homepage "https://github.com/openSUSE/osc" - url "https://github.com/openSUSE/osc/archive/0.163.0.tar.gz" - sha256 "3d994350fe55f00c1819c669f11ab633b19df22a4bd55c3e5ef08364e600823d" - head "https://github.com/openSUSE/osc.git" - - bottle do - cellar :any - rebuild 1 - sha256 "88449403387fb548cb64c1f1c5c10e7ba1b241f1b65f97aad22254dab4454fc9" => :mojave - sha256 "66accc3b1b095b51ac09cea6f07a0fc74908afc664085c1905dae3617c22313b" => :high_sierra - sha256 "0c71a651c136e1e6ec9763e453c2c7a841062269de67cc985df119ca9eb1ead7" => :sierra - end - - depends_on "swig" => :build - depends_on "openssl" # For M2Crypto - depends_on "python@2" - - resource "pycurl" do - url "https://files.pythonhosted.org/packages/12/3f/557356b60d8e59a1cce62ffc07ecc03e4f8a202c86adae34d895826281fb/pycurl-7.43.0.tar.gz" - sha256 "aa975c19b79b6aa6c0518c0cc2ae33528900478f0b500531dbcdbf05beec584c" - end - - resource "urlgrabber" do - url "https://files.pythonhosted.org/packages/29/1a/f509987826e17369c52a80a07b257cc0de3d7864a303175f2634c8bcb3e3/urlgrabber-3.10.2.tar.gz" - sha256 "05b7164403d49b37fe00f7ac8401e56b00d0568ac45ee15d5f0610ac293c3070" - end - - resource "M2Crypto" do - url "https://files.pythonhosted.org/packages/01/bd/a41491718f9e2bebab015c42b5be7071c6695acfa301e3fc0480bfd6a15b/M2Crypto-0.27.0.tar.gz" - sha256 "82317459d653322d6b37f122ce916dc91ddcd9d1b814847497ac796c4549dd68" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/ca/38/16ba8d542e609997fdcd0214628421c971f8c395084085354b11ff4ac9c3/typing-3.6.2.tar.gz" - sha256 "d514bd84b284dd3e844f0305ac07511f097e325171f6cc4a20878d11ad771849" - end - - def install - # avoid pycurl error about compile-time and link-time curl version mismatch - ENV.delete "SDKROOT" - - ENV["SWIG_FEATURES"]="-I#{Formula["openssl"].opt_include}" - - venv = virtualenv_create(libexec) - venv.pip_install resources.reject { |r| r.name == "M2Crypto" || r.name == "pycurl" } - - resource("M2Crypto").stage do - inreplace "setup.py" do |s| - s.gsub! "self.openssl = '/usr'", - "self.openssl = '#{Formula["openssl"].opt_prefix}'" - s.gsub! "platform.system() == \"Linux\"", - "platform.system() == \"Darwin\" or \\0" - end - venv.pip_install "." - end - - # avoid error about libcurl link-time and compile-time ssl backend mismatch - resource("pycurl").stage do - system libexec/"bin/pip", "install", - "--install-option=--libcurl-dll=/usr/lib/libcurl.dylib", "-v", - "--no-binary", ":all:", "--ignore-installed", "." - end - - inreplace "osc/conf.py", "'/etc/ssl/certs'", "'#{etc}/openssl/cert.pem'" - venv.pip_install_and_link buildpath - mv bin/"osc-wrapper.py", bin/"osc" - end - - test do - system bin/"osc", "--version" - end -end diff --git a/Formula/oscats.rb b/Formula/oscats.rb deleted file mode 100644 index f3d54bd6f8677..0000000000000 --- a/Formula/oscats.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Oscats < Formula - desc "Computerized adaptive testing system" - homepage "https://code.google.com/archive/p/oscats/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/oscats/oscats-0.6.tar.gz" - sha256 "2f7c88cdab6a2106085f7a3e5b1073c74f7d633728c76bd73efba5dc5657a604" - revision 2 - - bottle do - cellar :any - sha256 "fc842d8a322fd65af377cfb8399368b993ce86a7586c71a5ddfd2b22459655c6" => :mojave - sha256 "0af1c79f43a2d2fd2fe4582477d9d9789b96d9bbb33c2adaa128c70dd7f838ad" => :high_sierra - sha256 "756f81c2343a64876be9485bb046cca78030151e7f46e606ce9b68ffa07db63b" => :sierra - sha256 "ebc36ad36c4943030c7ee58eec176461f93a2a02f8a5d6484239c0968ad94e51" => :el_capitan - sha256 "e83b19660fe00ed2c05e228646a931ad3837dafd74855921da25009833d5f387" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gsl" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/osm-gps-map.rb b/Formula/osm-gps-map.rb deleted file mode 100644 index 85577f141bb63..0000000000000 --- a/Formula/osm-gps-map.rb +++ /dev/null @@ -1,85 +0,0 @@ -class OsmGpsMap < Formula - desc "GTK+ library to embed OpenStreetMap maps" - homepage "https://nzjrs.github.com/osm-gps-map/" - url "https://github.com/nzjrs/osm-gps-map/releases/download/1.1.0/osm-gps-map-1.1.0.tar.gz" - sha256 "8f2ff865ed9ed9786cc5373c37b341b876958416139d0065ebb785cf88d33586" - revision 1 - - bottle do - sha256 "3fc5e8704885ee52388758422a586fe36f67f0bb88f260107d8d51ddaee69131" => :mojave - sha256 "9b4ff596f15ef4dd79f8a52869ce0f0dc4e104c827f79dd223c3ff3c60631c5c" => :high_sierra - sha256 "5303392a0018ff176e67b844d1808834500c1b0ac8dd5362ad5f2a70939d1bc2" => :sierra - sha256 "05bc6efb9676e68162e553bfe41f7467e5f7d8da85cb9cfda5256bf5a79ff884" => :el_capitan - end - - head do - url "https://github.com/nzjrs/osm-gps-map.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gnome-common" => :build - depends_on "gtk-doc" => :build - depends_on "libtool" => :build - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "gtk+3" - depends_on "libsoup" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--disable-silent-rules", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - OsmGpsMap *map; - gtk_init (&argc, &argv); - map = g_object_new (OSM_TYPE_GPS_MAP, NULL); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - glib = Formula["glib"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gtkx3 = Formula["gtk+3"] - pango = Formula["pango"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{pango.opt_include}/pango-1.0 - -I#{include}/osmgpsmap-1.0 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{glib.opt_lib} - -L#{gtkx3.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lgdk-3 - -lgdk_pixbuf-2.0 - -lglib-2.0 - -lgtk-3 - -lgobject-2.0 - -lpango-1.0 - -losmgpsmap-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/osm-pbf.rb b/Formula/osm-pbf.rb deleted file mode 100644 index d0141da02ca1e..0000000000000 --- a/Formula/osm-pbf.rb +++ /dev/null @@ -1,29 +0,0 @@ -class OsmPbf < Formula - desc "Tools related to PBF (an alternative to XML format)" - homepage "https://wiki.openstreetmap.org/wiki/PBF_Format" - url "https://github.com/scrosby/OSM-binary/archive/v1.3.3.tar.gz" - sha256 "a109f338ce6a8438a8faae4627cd08599d0403b8977c185499de5c17b92d0798" - revision 5 - - bottle do - cellar :any_skip_relocation - sha256 "3199cc807995df84916d63c216d0a2793ed8af5513bed9488d397e4efcf745c2" => :mojave - sha256 "68e5bf0c9924719525b0522da2656ae43a7cdb11bcdf3a6c05e481c3f5b242ec" => :high_sierra - sha256 "c4f104fa72861e982b9071e656675a3ed3c4bf2d37fddeab3c5eb952d7864d9b" => :sierra - sha256 "6e6902ebcdb50d95ab0aeeb9fcc086956eb768110f1646839dba876b1f31c643" => :el_capitan - end - - depends_on "protobuf" - - needs :cxx11 - - def install - ENV.cxx11 - - cd "src" do - system "make" - lib.install "libosmpbf.a" - end - include.install Dir["include/*"] - end -end diff --git a/Formula/osm2pgrouting.rb b/Formula/osm2pgrouting.rb deleted file mode 100644 index 9ceda89b88766..0000000000000 --- a/Formula/osm2pgrouting.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Osm2pgrouting < Formula - desc "Import OSM data into pgRouting database" - homepage "https://pgrouting.org/docs/tools/osm2pgrouting.html" - url "https://github.com/pgRouting/osm2pgrouting/archive/v2.3.6.tar.gz" - sha256 "c4b1f45ff7a9a184956182e40016fdd9455718821adb25822e2ef8182d2712a6" - head "https://github.com/pgRouting/osm2pgrouting.git" - - bottle do - cellar :any - sha256 "f940abbd92f04c51959b955799c0f2361b4c2b4cac5fbc95f258d7a791bfa701" => :mojave - sha256 "4b34f6ab8f079979cec37fe7a70f703103c0a42f9837af4cac546407314b030d" => :high_sierra - sha256 "e1e4a8753dbf77e93fe0e89c96ead722456f1657cb90fc38c03df27715c31fd7" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "expat" - depends_on "libpqxx" - depends_on "pgrouting" - depends_on "postgis" - depends_on "postgresql" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"osm2pgrouting", "--help" - end -end diff --git a/Formula/osm2pgsql.rb b/Formula/osm2pgsql.rb deleted file mode 100644 index 89a58715cd36f..0000000000000 --- a/Formula/osm2pgsql.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Osm2pgsql < Formula - desc "OpenStreetMap data to PostgreSQL converter" - homepage "https://wiki.openstreetmap.org/wiki/Osm2pgsql" - url "https://github.com/openstreetmap/osm2pgsql/archive/0.96.0.tar.gz" - sha256 "b6020e77d88772989279a69ae4678e9782989b630613754e483b5192cd39c723" - head "https://github.com/openstreetmap/osm2pgsql.git" - - bottle do - sha256 "f549068475acd4c81f6a0da191702ea105d9c29f89e1c811cdde6c001909f031" => :mojave - sha256 "ec4a8aec68bfece0b4b1e5709c74ac5a28cad76d2266da76fca4405c4c6b6d32" => :high_sierra - sha256 "ff4584cbca8c5ad00a3581b7c86d33fcc47336289c74952d3953200333fbabc1" => :sierra - sha256 "b3872d5006c687a1be8be67df8912a139865fc99e79b6e74f8bfea947032e953" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "geos" - depends_on "lua" - depends_on "postgresql" - depends_on "proj" - - def install - args = std_cmake_args - - # This is essentially a CMake disrespects superenv problem - # rather than an upstream issue to handle. - lua_version = Formula["lua"].version.to_s.match(/\d\.\d/) - inreplace "cmake/FindLua.cmake", "LUA_VERSIONS5 5.3 5.2 5.1 5.0", - "LUA_VERSIONS5 #{lua_version}" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/osm2pgsql -h 2>&1") - end -end diff --git a/Formula/osmfilter.rb b/Formula/osmfilter.rb deleted file mode 100644 index b0265477ebe9a..0000000000000 --- a/Formula/osmfilter.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Osmfilter < Formula - desc "Command-line tool to filter OpenStreetMap files for specific tags" - homepage "https://wiki.openstreetmap.org/wiki/Osmfilter" - url "https://gitlab.com/osm-c-tools/osmctools.git", - :tag => "0.9", - :revision => "f341f5f237737594c1b024338f0a2fc04fabdff3" - head "https://gitlab.com/osm-c-tools/osmctools.git" - - bottle do - cellar :any_skip_relocation - sha256 "470532603de299b9073f5511b8be798558d430f86ba4f37b330a497ec9fdae48" => :mojave - sha256 "b2e2d4190462b0b0e473da4a50ab5e25da007aca21db898d2d359e9e9eb2cde7" => :high_sierra - sha256 "d7a8285fe18af71d0093b89e9b5613a4fe30ceb4978e07f61ad1974e734d7f50" => :sierra - sha256 "6a0fd608e0bc8094f08edb6f86a51b45745506d3ef84e0454ef1498dd77f61b0" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - resource "pbf" do - url "https://download.gisgraphy.com/openstreetmap/pbf/AD.tar.bz2" - sha256 "403d74dd62f7cc59c044965c52e0e0cb8dcf2c01faa205a668e94d7258d89ad1" - end - - def install - system "autoreconf", "-v", "-i" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - resource("pbf").stage do - system bin/"osmconvert", "AD", "-o=test.o5m" - system bin/"osmfilter", "test.o5m", - "--drop-relations", "--drop-ways", "--drop-nodes" - end - end -end diff --git a/Formula/osmium-tool.rb b/Formula/osmium-tool.rb deleted file mode 100644 index 5b7c561ceeca5..0000000000000 --- a/Formula/osmium-tool.rb +++ /dev/null @@ -1,45 +0,0 @@ -class OsmiumTool < Formula - desc "Libosmium-based command-line tool for processing OpenStreetMap data" - homepage "https://osmcode.org/osmium-tool/" - url "https://github.com/osmcode/osmium-tool/archive/v1.10.0.tar.gz" - sha256 "f0a75ce39ac92c43a01d978c1ecae05d864930bf7d518ea059d7ba320735dd66" - - bottle do - cellar :any - sha256 "48679a4c837f6a91fa3ee7a9c20b3abc7668aace97c3c2023b376f7e89095e9a" => :mojave - sha256 "5dc30f884e035bfaef59e3a818907e610de1810c4b93a8532fba67d35d298abe" => :high_sierra - sha256 "323eb5aeb1c7672d0574a5b5ab6f33240ac86c907eab3cd687f756996d87c6a9" => :sierra - end - - depends_on "cmake" => :build - depends_on "libosmium" => :build - depends_on "boost" - - def install - protozero = Formula["libosmium"].opt_libexec/"include" - system "cmake", ".", "-DPROTOZERO_INCLUDE_DIR=#{protozero}", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.osm").write <<~EOS - - - - - - - - - - - - - - - EOS - output = shell_output("#{bin}/osmium fileinfo test.osm") - assert_match /Compression.+generator=handwritten/m, output - system bin/"osmium", "tags-filter", "test.osm", "w/name=line", "-f", "osm" - end -end diff --git a/Formula/osmosis.rb b/Formula/osmosis.rb deleted file mode 100644 index 2f56faac71240..0000000000000 --- a/Formula/osmosis.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Osmosis < Formula - desc "Command-line OpenStreetMap data processor" - homepage "https://wiki.openstreetmap.org/wiki/Osmosis" - url "https://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.45.zip" - sha256 "d801f1a8806359efe95d604bb8a770294bca6fcaf32b50672d2891487b97c6d1" - - bottle :unneeded - - # need to adjust home dir for a clean install - patch :DATA - - def install - bin.install "bin/osmosis" - libexec.install %w[lib config script] - end - - test do - path = testpath/"test.osm" - path.write <<~EOS - - - - - - - - - - - - - - - - - - EOS - - system("#{bin}/osmosis", "--read-xml", "file=#{path}", "--write-null") - end -end - -__END__ ---- a/bin/osmosis 2010-11-16 06:58:44.000000000 +0100 -+++ b/bin/osmosis 2010-11-23 12:13:01.000000000 +0100 -@@ -83,6 +83,7 @@ - saveddir=`pwd` - MYAPP_HOME=`dirname "$PRG"`/.. - MYAPP_HOME=`cd "$MYAPP_HOME" && pwd` -+MYAPP_HOME="$MYAPP_HOME/libexec" - cd "$saveddir" - - # Build up the classpath of required jar files via classworlds launcher. diff --git a/Formula/osquery.rb b/Formula/osquery.rb deleted file mode 100644 index 7fead6c73b4a0..0000000000000 --- a/Formula/osquery.rb +++ /dev/null @@ -1,139 +0,0 @@ -class Osquery < Formula - desc "SQL powered operating system instrumentation and analytics" - homepage "https://osquery.io" - url "https://github.com/facebook/osquery/archive/3.3.0.tar.gz" - sha256 "b633b41bd9ec7a8569eb03060cc22dd53a36d3ba4ca7fb66a976d7f9f800bf52" - revision 1 - - bottle do - cellar :any - sha256 "271d3f05c7af8f27c27eccd5243c61cc655a68cbd1134cb7d8b9a8fa48c1796a" => :sierra - end - - depends_on "bison" => :build - depends_on "cmake" => :build - depends_on "python@2" => :build - depends_on "augeas" - depends_on "boost" - depends_on "gflags" - depends_on "glog" - depends_on "libarchive" - depends_on "libmagic" - depends_on "librdkafka" - depends_on "lldpd" - # osquery only supports macOS 10.12 and above. Do not remove this. - depends_on :macos => :sierra - depends_on "openssl" - depends_on "rapidjson" - depends_on "rocksdb" - depends_on "sleuthkit" - depends_on "ssdeep" - depends_on "thrift" - depends_on "xz" - depends_on "yara" - depends_on "zstd" - - fails_with :gcc => "6" - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-0.23.tar.gz" - sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/5f/bd/5815d4d925a2b8cbbb4b4960f018441b0c65f24ba29f3bdcfb3c8218a307/Jinja2-2.8.1.tar.gz" - sha256 "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891" - end - - resource "third-party" do - url "https://github.com/osquery/third-party/archive/3.0.0.tar.gz" - sha256 "98731b92147f6c43f679a4a9f63cbb22f2a4d400d94a45e308702dee66a8de9d" - end - - resource "aws-sdk-cpp" do - url "https://github.com/aws/aws-sdk-cpp/archive/1.3.30.tar.gz" - sha256 "7b5f9b6d4215069fb75d31db2c8ab06081ab27f59ee33d5bb428fec3e30723f1" - end - - # Upstream fix for boost 1.68, remove in next version - # https://github.com/facebook/osquery/issues/5069 - patch do - url "https://github.com/facebook/osquery/commit/512f775c.diff?full_index=1" - sha256 "8bfafabf51c1b22dcab1a2a49d7d2a6583c49409def0876c79191839ccf23d53" - end - - def install - ENV.cxx11 - - vendor = buildpath/"brew_vendor" - - resource("aws-sdk-cpp").stage do - args = std_cmake_args + %W[ - -DSTATIC_LINKING=1 - -DNO_HTTP_CLIENT=1 - -DMINIMIZE_SIZE=ON - -DBUILD_SHARED_LIBS=OFF - -DBUILD_ONLY=ec2;firehose;kinesis;sts - -DCMAKE_INSTALL_PREFIX=#{vendor}/aws-sdk-cpp - ] - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - # Skip test and benchmarking. - ENV["SKIP_TESTS"] = "1" - ENV["SKIP_DEPS"] = "1" - - # Skip SMART drive tables. - # SMART requires a dependency that isn't packaged by brew. - ENV["SKIP_SMART"] = "1" - - # Link dynamically against brew-installed libraries. - ENV["BUILD_LINK_SHARED"] = "1" - # Set the version - ENV["OSQUERY_BUILD_VERSION"] = version - - ENV.prepend_create_path "PYTHONPATH", buildpath/"third-party/python/lib/python2.7/site-packages" - - res = resources.map(&:name).to_set - %w[aws-sdk-cpp third-party] - res.each do |r| - resource(r).stage do - system "python", "setup.py", "install", - "--prefix=#{buildpath}/third-party/python/", - "--single-version-externally-managed", - "--record=installed.txt" - end - end - - cxx_flags_release = %W[ - -DNDEBUG - -I#{MacOS.sdk_path}/usr/include/libxml2 - -I#{vendor}/aws-sdk-cpp/include - ] - - args = std_cmake_args + %W[ - -Daws-cpp-sdk-core_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-core.a - -Daws-cpp-sdk-firehose_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-firehose.a - -Daws-cpp-sdk-kinesis_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-kinesis.a - -Daws-cpp-sdk-sts_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-sts.a - -DCMAKE_CXX_FLAGS_RELEASE:STRING=#{cxx_flags_release.join(" ")} - ] - - (buildpath/"third-party").install resource("third-party") - - system "cmake", ".", *args - system "make" - system "make", "install" - (include/"osquery/core").install Dir["osquery/core/*.h"] - end - - plist_options :startup => true, :manual => "osqueryd" - - test do - assert_match "platform_info", shell_output("#{bin}/osqueryi -L") - end -end diff --git a/Formula/osrm-backend.rb b/Formula/osrm-backend.rb deleted file mode 100644 index bb377cd148e03..0000000000000 --- a/Formula/osrm-backend.rb +++ /dev/null @@ -1,67 +0,0 @@ -class OsrmBackend < Formula - desc "High performance routing engine" - homepage "http://project-osrm.org/" - url "https://github.com/Project-OSRM/osrm-backend/archive/v5.21.0.tar.gz" - sha256 "9698ac12887a1888551f417f1971e7dba9b1ff5b3d9a421298ddf3b393865de5" - head "https://github.com/Project-OSRM/osrm-backend.git" - - bottle do - cellar :any - sha256 "d9c889db89557220f6ecd67e0f05f506c840b85c9f27e08c2033d0cbbc966805" => :mojave - sha256 "e6f32da1af9635fe0843f89ee37f0aec9b0046bae6c78867932c2670e6999067" => :high_sierra - sha256 "e7ecfbf0b0de9871eb4914376094ff7986c79f42c334caa47051cc9a8f1d883f" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "libstxxl" - depends_on "libxml2" - depends_on "libzip" - depends_on "lua" - - # "invalid use of non-static data member 'offset'" - # https://github.com/Project-OSRM/osrm-backend/issues/3719 - depends_on :macos => :el_capitan - - depends_on "tbb" - - def install - mkdir "build" do - system "cmake", "..", "-DENABLE_CCACHE:BOOL=OFF", *std_cmake_args - system "make" - system "make", "install" - end - pkgshare.install "profiles" - end - - test do - node1 = 'visible="true" version="1" changeset="676636" timestamp="2008-09-21T21:37:45Z"' - node2 = 'visible="true" version="1" changeset="323878" timestamp="2008-05-03T13:39:23Z"' - node3 = 'visible="true" version="1" changeset="323878" timestamp="2008-05-03T13:39:23Z"' - - (testpath/"test.osm").write <<~EOS - - - - - - - - - - - - - EOS - - (testpath/"tiny-profile.lua").write <<~EOS - function way_function (way, result) - result.forward_mode = mode.driving - result.forward_speed = 1 - end - EOS - safe_system "#{bin}/osrm-extract", "test.osm", "--profile", "tiny-profile.lua" - safe_system "#{bin}/osrm-contract", "test.osrm" - assert_predicate testpath/"test.osrm", :exist?, "osrm-extract generated no output!" - end -end diff --git a/Formula/osslsigncode.rb b/Formula/osslsigncode.rb deleted file mode 100644 index 1770fcf5d4ff9..0000000000000 --- a/Formula/osslsigncode.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Osslsigncode < Formula - desc "Authenticode signing of PE(EXE/SYS/DLL/etc), CAB and MSI files" - homepage "https://sourceforge.net/projects/osslsigncode/" - url "https://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz" - sha256 "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9" - - bottle do - cellar :any - rebuild 1 - sha256 "83deaed9d81ecacfdf2674b63eb090fd4781a46bdd92d97b911ab88e0eb97ec1" => :mojave - sha256 "2106c87e481d094c2151b5da4152aea665114fda9233c1a09f437bed53ac2374" => :high_sierra - sha256 "141c40e42eb70da814daa2bb893e31c7158f74f99cdf607dcba62426aa049a5a" => :sierra - end - - head do - url "https://git.code.sf.net/p/osslsigncode/osslsigncode.git" - depends_on "automake" => :build - end - - depends_on "autoconf" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - system "autoreconf", "-ivf" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Requires Windows PE executable as input, so we're just showing the version - assert_match "osslsigncode", shell_output("#{bin}/osslsigncode --version", 255) - end -end diff --git a/Formula/ossp-uuid.rb b/Formula/ossp-uuid.rb deleted file mode 100644 index d63fe7adc8645..0000000000000 --- a/Formula/ossp-uuid.rb +++ /dev/null @@ -1,41 +0,0 @@ -class OsspUuid < Formula - desc "ISO-C API and CLI for generating UUIDs" - homepage "https://web.archive.org/web/www.ossp.org/pkg/lib/uuid/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/o/ossp-uuid/ossp-uuid_1.6.2.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/o/ossp-uuid/ossp-uuid_1.6.2.orig.tar.gz" - sha256 "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0" - revision 2 - - bottle do - cellar :any - sha256 "a6852dac557e1b804a240b4f558d9b2e262adebb64424061f2ee8002a3d19476" => :mojave - sha256 "a04214b22c58bd5167778925cb9e55b98f28330bcc6c6a37929e6085ea3a0162" => :high_sierra - sha256 "3c15cd0e25e3039e0d05b94d14b714745cec3033863d5dc7a6d9ddd7cacc1c71" => :sierra - sha256 "ac4456fc1c29db7e0d565ebdd392cf827be315b52c9eb3abcd113c4c7b981f25" => :el_capitan - sha256 "c6cfa39816d19fa8d4586d6a364cd17e3a089ea018242875dc371731578a4ac7" => :yosemite - sha256 "5253f4fab035aca3ca3b867ce0d081812eb17fe0dcaab6599087abaa385c478d" => :mavericks - end - - def install - # upstream ticket: http://cvs.ossp.org/tktview?tn=200 - # pkg-config --cflags uuid returns the wrong directory since we override the - # default, but uuid.pc.in does not use it - inreplace "uuid.pc.in" do |s| - s.gsub! /^(exec_prefix)=\$\{prefix\}$/, '\1=@\1@' - s.gsub! %r{^(includedir)=\$\{prefix\}/include$}, '\1=@\1@' - s.gsub! %r{^(libdir)=\$\{exec_prefix\}/lib$}, '\1=@\1@' - end - - system "./configure", "--prefix=#{prefix}", - "--includedir=#{include}/ossp", - "--without-perl", - "--without-php", - "--without-pgsql" - system "make" - system "make", "install" - end - - test do - system "#{bin}/uuid-config", "--version" - end -end diff --git a/Formula/osxutils.rb b/Formula/osxutils.rb deleted file mode 100644 index e0348b505fc58..0000000000000 --- a/Formula/osxutils.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Osxutils < Formula - desc "Collection of macOS command-line utilities" - homepage "https://github.com/specious/osxutils" - url "https://github.com/specious/osxutils/archive/v1.9.0.tar.gz" - sha256 "9c11d989358ed5895d9af7644b9295a17128b37f41619453026f67e99cb7ecab" - head "https://github.com/specious/osxutils.git" - - bottle do - cellar :any_skip_relocation - sha256 "744e327d1fb2183de8785880c3f7a127abdd896977e3d30cade00933ea137521" => :mojave - sha256 "d665cbec1973b73e1e1d290014786b95d36d9cfe7028fd69fa37f698d18e81dd" => :high_sierra - sha256 "8021183b4ad9c646920020e51446e555210bbb24e22da923557e1e0370353dfd" => :sierra - sha256 "3bd65cf2550b709c111e31db7cb7d829a9260ed5dd35a682c370ed01593c1989" => :el_capitan - end - - def install - system "make" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - assert_match "osxutils", shell_output("#{bin}/osxutils") - end -end diff --git a/Formula/otf2bdf.rb b/Formula/otf2bdf.rb deleted file mode 100644 index fcbe92411e4e4..0000000000000 --- a/Formula/otf2bdf.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Otf2bdf < Formula - desc "OpenType to BDF font converter" - homepage "https://www.math.nmsu.edu/~mleisher/Software/otf2bdf/" - url "https://www.math.nmsu.edu/~mleisher/Software/otf2bdf/otf2bdf-3.1.tbz2" - sha256 "3d63892e81187d5192edb96c0dc6efca2e59577f00e461c28503006681aa5a83" - - bottle do - cellar :any - sha256 "23887172e0e027f9bafd1b48752919848a44253887425dc337e98186babacaaf" => :mojave - sha256 "aad843a1a425fe06c2c32b8eb85f4389b749d0ccd92c0b38a9c9282ac5c1f055" => :high_sierra - sha256 "1bc1ef42c5ffaf8faf3e5f6e58e8678d9992d5bc5ea4ed607bf6c71f35dc6165" => :sierra - sha256 "018d348c6fb0b0a413c85bd575d93837f4bb03c654243f1c6ce9d54e417d77e9" => :el_capitan - sha256 "751f5243a8be995963d1b4e20bea3d52823fdcbadb727d0eab20e6715277db40" => :yosemite - sha256 "70fb9d592eaa1cbc1f3e2a448c023988ea5e86035633d387c959de8c725a98f8" => :mavericks - end - - depends_on "freetype" - - resource "mkinstalldirs" do - url "https://www.math.nmsu.edu/~mleisher/Software/otf2bdf/mkinstalldirs" - sha256 "e7b13759bd5caac0976facbd1672312fe624dd172bbfd989ffcc5918ab21bfc1" - end - - def install - buildpath.install resource("mkinstalldirs") - chmod 0755, "mkinstalldirs" - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - assert_match /MacRoman/, shell_output("#{bin}/otf2bdf -et /System/Library/Fonts/LucidaGrande.ttc") - end -end diff --git a/Formula/ott.rb b/Formula/ott.rb deleted file mode 100644 index 6b28546b3f29c..0000000000000 --- a/Formula/ott.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Ott < Formula - desc "Tool for writing definitions of programming languages and calculi" - homepage "https://www.cl.cam.ac.uk/~pes20/ott/" - url "https://github.com/ott-lang/ott/archive/0.28.tar.gz" - sha256 "30c7613802cdd7f03eb1df1d634da3e13197e210d5697252382d29b5f03618f2" - head "https://github.com/ott-lang/ott.git" - - bottle do - cellar :any_skip_relocation - sha256 "a64451a61a2d6cb0d34e327459bdd789233d8acc2fd89673b931220a7780b869" => :mojave - sha256 "d590c5c215ca73f47baceb8c851836c1e9ea0d78fcb6f253c02568c6db56a65d" => :high_sierra - sha256 "d2132bd134e79d0e73a4b4ea6e23363f9b14ade49b550fa65b5744dc41c35fd9" => :sierra - sha256 "12177801e7faf22a9d875d6c0e222fd7eff9fcab5755f5a6266223296ec01ef4" => :el_capitan - end - - depends_on "ocaml" => :build - - def install - system "make", "world" - bin.install "bin/ott" - pkgshare.install "examples" - (pkgshare/"emacs/site-lisp/ott").install "emacs/ott-mode.el" - end - - test do - system "#{bin}/ott", "-i", pkgshare/"examples/peterson_caml.ott", - "-o", "peterson_caml.tex", "-o", "peterson_caml.v" - end -end diff --git a/Formula/overmind.rb b/Formula/overmind.rb deleted file mode 100644 index e270371571120..0000000000000 --- a/Formula/overmind.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Overmind < Formula - desc "Process manager for Procfile-based applications and tmux" - homepage "https://github.com/DarthSim/overmind" - url "https://github.com/DarthSim/overmind/archive/v1.2.1.tar.gz" - sha256 "114a51b45fe02205d28db1fb1b6e23e501c3935f7d3b8862e7db70c41153542f" - head "https://github.com/DarthSim/overmind.git" - - bottle do - cellar :any_skip_relocation - sha256 "2c5aa09dbc0d6d00ec9e4b6f4ae56a9ec65b21992cad837996c50db403a0c261" => :mojave - sha256 "1d46dfcd6a60c9e504251302ff2c65f84f575c68f1b7315cd847e52762d83c63" => :high_sierra - sha256 "db203925a49561a4841a7c888b5a3d8b15857b62fa1d4398bfc5ade14481bf1b" => :sierra - sha256 "daf31f46ad521fdb79d74e6c7ec995e109f4714b68ac0fa9ae7d4a010793f0a7" => :el_capitan - end - - depends_on "go" => :build - depends_on "tmux" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/DarthSim/overmind").install buildpath.children - system "go", "build", "-o", "#{bin}/overmind", "-v", "github.com/DarthSim/overmind" - end - - test do - expected_message = "overmind: open ./Procfile: no such file or directory" - assert_match expected_message, shell_output("#{bin}/overmind start 2>&1", 1) - (testpath/"Procfile").write("test: echo 'test message'") - expected_message = "inappropriate ioctl for device" - assert_match expected_message, shell_output("#{bin}/overmind start") - end -end diff --git a/Formula/owamp.rb b/Formula/owamp.rb deleted file mode 100644 index e53cddb9c7fc3..0000000000000 --- a/Formula/owamp.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Owamp < Formula - desc "Implementation of the One-Way Active Measurement Protocol" - homepage "https://www.internet2.edu/products-services/performance-analytics/performance-tools/" - url "https://software.internet2.edu/sources/owamp/owamp-3.4-10.tar.gz" - sha256 "059f0ab99b2b3d4addde91a68e6e3641c85ce3ae43b85fe9435841d950ee2fb3" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "22833b09d6faa093c2d186560cd22e328b9ab11efa8f9774543392e7dca127f2" => :mojave - sha256 "0ce1d8385c1cb2036acbccbcd92ed5778c8ec0aa8e4db5c06a9ea018621f58dc" => :high_sierra - sha256 "afdeaab138caa02c535fd9d2b847c5b5b24273beef19271fc60415de16d0681f" => :sierra - sha256 "6f86a33c176ba1394560b7707466c088930f13db102b7adc159e80e889fdc5cf" => :el_capitan - sha256 "fce4cc5bf0a9b5355779fb45637651f6a78bb8d3dd93bdc3ff2826b7866617fd" => :yosemite - sha256 "6c6b6f1f143b929b892c6556db3b06299835326a72c5180c482b2630e62dc543" => :mavericks - end - - depends_on "i2util" - - # Fix to prevent tests hanging under certain circumstances. - # Provided by Aaron Brown via perfsonar-user mailing list: - # https://lists.internet2.edu/sympa/arc/perfsonar-user/2014-11/msg00131.html - patch :DATA - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/owping", "-h" - end -end - -__END__ -diff -ur owamp-3.4/owamp/endpoint.c owamp-3.4.fixed/owamp/endpoint.c ---- owamp-3.4/owamp/endpoint.c 2014-03-21 09:37:42.000000000 -0400 -+++ owamp-3.4.fixed/owamp/endpoint.c 2014-11-26 07:50:11.000000000 -0500 -@@ -2188,6 +2188,11 @@ - timespecsub((struct timespec*)&wake.it_value,&currtime); - - wake.it_value.tv_usec /= 1000; /* convert nsec to usec */ -+ while (wake.it_value.tv_usec >= 1000000) { -+ wake.it_value.tv_usec -= 1000000; -+ wake.it_value.tv_sec++; -+ } -+ - tvalclear(&wake.it_interval); - - /* diff --git a/Formula/owfs.rb b/Formula/owfs.rb deleted file mode 100644 index 60188439e1a79..0000000000000 --- a/Formula/owfs.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Owfs < Formula - desc "Monitor and control physical environment using Dallas/Maxim 1-wire system" - homepage "http://owfs.org/" - url "https://downloads.sourceforge.net/project/owfs/owfs/3.2p2/owfs-3.2p2.tar.gz" - version "3.2p2" - sha256 "39535521a65a74bd36dc31726bcf04201f60f230a7944e9a63c393c318f5113c" - - bottle do - cellar :any - sha256 "0347d5b92cf6e7c42975d5556609f30c4034936472843b7513ab5a208134d1c2" => :mojave - sha256 "51bd18872d4b55af34626459c3f6e039139647124abff190b280e4ddf2c4012f" => :high_sierra - sha256 "5dd1116b1058b7eb849905b6af987e7ea71fd3486ccc8f1670cf841b6583802f" => :sierra - sha256 "06a2b3710c371730028a58bab488064f967ef6e820f0877e723f38a4e5eaf5e7" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libftdi" - depends_on "libusb" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-swig", - "--disable-owtcl", - "--disable-zero", - "--disable-owpython", - "--disable-owperl", - "--disable-swig", - "--enable-ftdi", - "--enable-usb", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"owserver", "--version" - end -end diff --git a/Formula/oysttyer.rb b/Formula/oysttyer.rb deleted file mode 100644 index c2c57ab1611d8..0000000000000 --- a/Formula/oysttyer.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Oysttyer < Formula - desc "Command-line Twitter client" - homepage "https://github.com/oysttyer/oysttyer" - url "https://github.com/oysttyer/oysttyer/archive/2.10.0.tar.gz" - sha256 "3c0ce1c7b112f2db496cc75a6e76c67f1cad956f9e7812819c6ae7a979b2baea" - head "https://github.com/oysttyer/oysttyer.git" - - bottle :unneeded - - def install - bin.install "oysttyer.pl" => "oysttyer" - end - - test do - IO.popen("#{bin}/oysttyer", "r+") do |pipe| - assert_equal "-- using SSL for default URLs.", pipe.gets.chomp - pipe.puts "^C" - pipe.close_write - end - end -end diff --git a/Formula/p/p0f.rb b/Formula/p/p0f.rb new file mode 100644 index 0000000000000..21a5ba8bb0cfb --- /dev/null +++ b/Formula/p/p0f.rb @@ -0,0 +1,68 @@ +class P0f < Formula + desc "Versatile passive OS fingerprinting, masquerade detection tool" + homepage "https://lcamtuf.coredump.cx/p0f3/" + url "https://lcamtuf.coredump.cx/p0f3/releases/p0f-3.09b.tgz" + sha256 "543b68638e739be5c3e818c3958c3b124ac0ccb8be62ba274b4241dbdec00e7f" + license "LGPL-2.1-only" + + livecheck do + url :homepage + regex(/href=.*?p0f[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "cdd36b28e785533aadfafbd8067b7f6370894b1e709aeb22824efc7247716349" + sha256 arm64_sequoia: "26d47c74e8e4c5b3c8463acf5759301a71513c8421e00d88b79fd6acc1510f3a" + sha256 arm64_sonoma: "01187398fc42a36aabac534edad37e933c4f9a5731f2c1d7eb2c1d90a6745236" + sha256 arm64_ventura: "8a29bf28d9c094a0cf189897703653246509a2c5af95e949c910d98837d48687" + sha256 arm64_monterey: "ef6f6ea7ee52b7abc9bca1c816b53b81e1449cb4eacd27f2789c39bfb0ef74a8" + sha256 arm64_big_sur: "eb601352fdce0ac1b49dfbaa31f91f102768aad81ea907839cd424836edc541b" + sha256 sonoma: "c4fba5904bdf5abf0a304bbb5cc86a4d7075251f61b7b75e5d6daa11be8fb2fc" + sha256 ventura: "648f67e2bd6d531bcd310bd22966573f7d725f134b75f7bb1504a682981648a9" + sha256 monterey: "2d2addb10494350f34a5bf1125bd88e83d8245def1d90ebb1286b469e944880e" + sha256 big_sur: "1e5a460d94d43563f06e9eff624e8ec6bba232de496320fb6dd281333b06f045" + sha256 arm64_linux: "65866253e2c2d2cb04dd3cbaa0b7a9261a3172872c3a557afbbc61f157ee9ed8" + sha256 x86_64_linux: "ed27c8135434e63b76d61034be7a15ed48311ae6d8e146177552ad23786c03af" + end + + uses_from_macos "libpcap" + + # Fix Xcode 12 issues with "-Werror,-Wimplicit-function-declaration" + patch :DATA + + def install + inreplace "config.h", "p0f.fp", "#{etc}/p0f/p0f.fp" + system "./build.sh" + sbin.install "p0f" + (etc/"p0f").install "p0f.fp" + end + + test do + system "#{sbin}/p0f", "-r", test_fixtures("test.pcap") + end +end + +__END__ +--- p0f-3.09b/build.sh.ORIG 2020-12-23 03:36:51.000000000 +0000 ++++ p0f-3.09b/build.sh 2020-12-23 03:41:54.000000000 +0000 +@@ -174,7 +174,7 @@ + + echo "OK" + +-echo -n "[*] Checking for *modern* GCC... " ++echo -n "[*] Checking if $CC supports -Wl,-z,relro -pie ... " + + rm -f "$TMP" "$TMP.c" "$TMP.log" || exit 1 + +@@ -197,7 +197,7 @@ + + rm -f "$TMP" "$TMP.c" "$TMP.log" || exit 1 + +-echo -e "#include \"types.h\"\nvolatile u8 tmp[6]; int main() { printf(\"%d\x5cn\", *(u32*)(tmp+1)); return 0; }" >"$TMP.c" || exit 1 ++echo -e "#include \n#include \"types.h\"\nvolatile u8 tmp[6]; int main() { printf(\"%d\x5cn\", *(u32*)(tmp+1)); return 0; }" >"$TMP.c" || exit 1 + $CC $USE_CFLAGS $USE_LDFLAGS "$TMP.c" -o "$TMP" &>"$TMP.log" + + if [ ! -x "$TMP" ]; then diff --git a/Formula/p/p11-kit.rb b/Formula/p/p11-kit.rb new file mode 100644 index 0000000000000..7c3b71f70fd57 --- /dev/null +++ b/Formula/p/p11-kit.rb @@ -0,0 +1,59 @@ +class P11Kit < Formula + desc "Library to load and enumerate PKCS#11 modules" + homepage "https://p11-glue.freedesktop.org" + url "https://github.com/p11-glue/p11-kit/releases/download/0.25.10/p11-kit-0.25.10.tar.xz" + sha256 "a62a137a966fb3a9bbfa670b4422161e369ddea216be51425e3be0ab2096e408" + license "BSD-3-Clause" + + bottle do + sha256 arm64_tahoe: "799bb74bf003c38fc6e43d1bfaffa68f2ccca2757b4b5fc297980a640e7369ed" + sha256 arm64_sequoia: "5c946df0d427b82823e679f14f4462e2f646785b4de0d167ff05e9b368a35a8c" + sha256 arm64_sonoma: "94a15ec13c63e887a23b9467525c31906ab7444b81a3088e023d31d248443e4e" + sha256 sonoma: "ae3f66252d3f096e99c38031d24ce1241ca306d1fa17f7f921e1d35bec1ef182" + sha256 arm64_linux: "16803768e52ac4c5842bc8ac83ddf8da47093997188e9ec2a3ae51b926203878" + sha256 x86_64_linux: "17e36f268b12a807d8db88ea301719b927e023b6326e2f15a9a73e1e5ac342b5" + end + + head do + url "https://github.com/p11-glue/p11-kit.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "ca-certificates" + depends_on "libtasn1" + + uses_from_macos "libffi" + + def install + # https://bugs.freedesktop.org/show_bug.cgi?id=91602#c1 + ENV["FAKED_MODE"] = "1" + + args = %W[ + -Dsystem_config=#{etc} + -Dmodule_config=#{etc}/pkcs11/modules + -Dtrust_paths=#{etc}/ca-certificates/cert.pem + -Dsystemd=disabled + ] + + system "meson", "setup", "_build", *args, *std_meson_args + system "meson", "compile", "-C", "_build", "--verbose" + # This formula is used with crypto libraries, so let's run the test suite. + system "meson", "test", "-C", "_build", "--timeout-multiplier=2" + system "meson", "install", "-C", "_build" + + # HACK: Work around p11-kit: couldn't load module: .../lib/pkcs11/p11-kit-trust.so + # Issue ref: https://github.com/p11-glue/p11-kit/issues/612 + (lib/"pkcs11").install_symlink "p11-kit-trust.dylib" => "p11-kit-trust.so" if OS.mac? + end + + test do + assert_match "library-manufacturer: PKCS#11 Kit", shell_output("#{bin}/p11-kit list-modules --verbose") + end +end diff --git a/Formula/p/p7zip.rb b/Formula/p/p7zip.rb new file mode 100644 index 0000000000000..6547dd37ba116 --- /dev/null +++ b/Formula/p/p7zip.rb @@ -0,0 +1,71 @@ +class P7zip < Formula + desc "7-Zip (high compression file archiver) implementation" + homepage "https://github.com/p7zip-project/p7zip" + url "https://github.com/p7zip-project/p7zip/archive/refs/tags/v17.06.tar.gz" + sha256 "c35640020e8f044b425d9c18e1808ff9206dc7caf77c9720f57eb0849d714cd1" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2490c82b53fc8b7c05e11e5f365f525dea28ce760b58d71eee5e5f263e3bdbbd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "369d3a03a92f93bac16dd14b0a0bdfdd89ca55acbd503a5df2e6bb5db090570a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23da67120f4a22b34c56bf6ab2cae4283088eb5ad1a78a79addbb4a2a499f7c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f660dc57664af754240e077dd1ed79f78505f40d62ca41630955d0320590a75e" + sha256 cellar: :any_skip_relocation, sonoma: "6a651dc223abae92cec444770d67518606edadc976386a7a27da977ee680f7fd" + sha256 cellar: :any_skip_relocation, ventura: "593e544721a4c420f0eb97987f51778b56cc643c7dd7ae4a287489bd01bd167a" + sha256 cellar: :any_skip_relocation, arm64_linux: "1355071d140bc9e5b5f6453fa5352e5e378bb9abcbd7361ee8c9e06893ce3d69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8ba01da665c3009888c57246945052cd4bfac19007fe0dd9d9b705152089076" + end + + # Remove non-free RAR sources + patch :DATA + + def install + if OS.mac? + mv "makefile.macosx_llvm_64bits", "makefile.machine" + else + mv "makefile.linux_any_cpu", "makefile.machine" + end + system "make", "all3", + "CC=#{ENV.cc} $(ALLFLAGS)", + "CXX=#{ENV.cxx} $(ALLFLAGS)" + system "make", "DEST_HOME=#{prefix}", + "DEST_MAN=#{man}", + "install" + end + + test do + (testpath/"foo.txt").write("hello world!\n") + system bin/"7z", "a", "-t7z", "foo.7z", "foo.txt" + system bin/"7z", "e", "foo.7z", "-oout" + assert_equal "hello world!\n", File.read(testpath/"out/foo.txt") + end +end + +__END__ +diff -u -r a/makefile b/makefile +--- a/makefile 2021-02-21 14:27:14.000000000 +0800 ++++ b/makefile 2021-02-21 14:27:31.000000000 +0800 +@@ -31,7 +31,6 @@ + $(MAKE) -C CPP/7zip/UI/Client7z depend + $(MAKE) -C CPP/7zip/UI/Console depend + $(MAKE) -C CPP/7zip/Bundles/Format7zFree depend +- $(MAKE) -C CPP/7zip/Compress/Rar depend + $(MAKE) -C CPP/7zip/UI/GUI depend + $(MAKE) -C CPP/7zip/UI/FileManager depend + +@@ -42,7 +41,6 @@ + common7z:common + $(MKDIR) bin/Codecs + $(MAKE) -C CPP/7zip/Bundles/Format7zFree all +- $(MAKE) -C CPP/7zip/Compress/Rar all + + lzham:common + $(MKDIR) bin/Codecs +@@ -67,7 +65,6 @@ + $(MAKE) -C CPP/7zip/UI/FileManager clean + $(MAKE) -C CPP/7zip/UI/GUI clean + $(MAKE) -C CPP/7zip/Bundles/Format7zFree clean +- $(MAKE) -C CPP/7zip/Compress/Rar clean + $(MAKE) -C CPP/7zip/Compress/Lzham clean + $(MAKE) -C CPP/7zip/Bundles/LzmaCon clean2 + $(MAKE) -C CPP/7zip/Bundles/AloneGCOV clean diff --git a/Formula/p/pacapt.rb b/Formula/p/pacapt.rb new file mode 100644 index 0000000000000..bc09f2ca3e143 --- /dev/null +++ b/Formula/p/pacapt.rb @@ -0,0 +1,21 @@ +class Pacapt < Formula + desc "Package manager in the style of Arch's pacman" + homepage "https://github.com/icy/pacapt" + url "https://github.com/icy/pacapt/archive/refs/tags/v3.0.7.tar.gz" + sha256 "d1081b639466de7650ed66c7bb5a522482c60c24b03c292c46b86a3983e66234" + license "Fair" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "6691ef309d2ebf4b001358e04a24bf93569f5dfc42c31811cadffd6c3e605444" + end + + def install + bin.mkpath + system "make", "install", "BINDIR=#{bin}", "VERSION=#{version}" + end + + test do + system bin/"pacapt", "-Ss", "wget" + end +end diff --git a/Formula/p/pachi.rb b/Formula/p/pachi.rb new file mode 100644 index 0000000000000..f65526468e4f0 --- /dev/null +++ b/Formula/p/pachi.rb @@ -0,0 +1,53 @@ +class Pachi < Formula + desc "Software for the Board Game of Go/Weiqi/Baduk" + homepage "https://pachi.or.cz/" + url "https://github.com/pasky/pachi/archive/refs/tags/pachi-12.84.tar.gz" + sha256 "5ced9ffd9fdb0ee4cdb24ad341abbcb7df0ab8a7f244932b7dd3bfa0ff6180ba" + license "GPL-2.0-only" + head "https://github.com/pasky/pachi.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "3fc9dffa9c09610c0e425d534cfbffbf06ab07ad152c54772d36f7961ce6be33" + sha256 arm64_sequoia: "fd4a7a487d1c0d4c7597970a99008f0def56e08ae402d1d63832b0b5d41f2823" + sha256 arm64_sonoma: "57b6e6f43f52e5ef856feccee3a1a828872a90fb45a9e72149147ef8aa1e129d" + sha256 arm64_ventura: "59b6a51156dc47e96991c92ce1fdd8060a4b9f2789f53ac515d9b08b8f117941" + sha256 arm64_monterey: "cba618e09fd5920a22b9e96b44aff7daaf2c1de834cc9b30dc1d13e9b3ce9498" + sha256 sonoma: "08420848a56934b074a7044ceb0acc38c49c169a0d784b4b5bdf0af3431ba73c" + sha256 ventura: "4f2ff8e1819b0982ae09db3be0935c36e38c809795d4b45776076e9a15e0c1d2" + sha256 monterey: "8d0c1b96f212172117f2f44d2880d906d043c0601d8a7b1dd4dc796cf8ddc57d" + sha256 arm64_linux: "4b29e4d8ee8bf2f28f3aefbcd40f7c3042c14cb9398df6781006ada3e2e7ed51" + sha256 x86_64_linux: "eb13f42af4891d563b870f8840182c9b6f99f76dfd7afcfeaf9c1cbf8bff4790" + end + + resource "datafiles" do + url "https://github.com/pasky/pachi/releases/download/pachi-12.84/pachi-12.84-linux-static.zip", using: :nounzip + sha256 "c9b080a93468cb4eacfb6cb43ccd3c6ca2caacc784b02ebe5ec7ba3e4e071922" + end + + def install + ENV["MAC"] = "1" if OS.mac? + ENV["GENERIC"] = "1" + ENV["DOUBLE_FLOATING"] = "1" + + # https://github.com/pasky/pachi/issues/78 + inreplace "Makefile" do |s| + if build.stable? + s.gsub! "build.h: build.h.git", "build.h:" + s.gsub! "@cp build.h.git", "echo '#define PACHI_GIT_BRANCH \"\"\\n#define PACHI_GIT_HASH \"\"' >>" + end + s.change_make_var! "DCNN", "0" + s.change_make_var! "PREFIX", prefix + end + + # Manually extract data files from Linux build, which is actually a zip file + system "unzip", "-oj", resource("datafiles").cached_download, "*/*", "-x", "*/*/*", "-d", buildpath + system "make" + system "make", "install" + end + + test do + assert_match(/^= [A-T][0-9]+$/, pipe_output(bin/"pachi", "genmove b\n", 0)) + end +end diff --git a/Formula/p/packcc.rb b/Formula/p/packcc.rb new file mode 100644 index 0000000000000..0427f10a71c9e --- /dev/null +++ b/Formula/p/packcc.rb @@ -0,0 +1,42 @@ +class Packcc < Formula + desc "Parser generator for C" + homepage "https://github.com/arithy/packcc" + url "https://github.com/arithy/packcc/archive/refs/tags/v2.2.0.tar.gz" + sha256 "eeb123e2d328de60e0a4171649c7e4c78b25a08b60de35beffd14f3d8fdbdcc8" + license "MIT" + head "https://github.com/arithy/packcc.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a985b781ba01f8200c457f8acf7e555c5a00d41e0c959dfb6cdd18ed77114b42" + sha256 arm64_sequoia: "7d5658437a0ceec144106d77f0bae460683421de720515cbad71e8538c4d7cbe" + sha256 arm64_sonoma: "3011badb913ee3f4cb4482502e883c68a6b0a0d369c2a63a3a99ba170c946c4e" + sha256 arm64_ventura: "255f7aea2aa1751e6f4cefb5bdf94c39b8f467d13367b3e1f5a6ebb7bacb4106" + sha256 sonoma: "d4536c19e74530b56251136175507807f63547cbc67cf77c93f6b4545569c046" + sha256 ventura: "ff1768a9796d859f9ba44c04f5f7ed04692ea39d9ed62dbc8255713f8badb263" + sha256 arm64_linux: "a8f0a5decaf1f6a96c01b770938182ff10da977292f249ffa6a67e94bc411eb4" + sha256 x86_64_linux: "ace36e10dc14b5bfa32e9f13355c9b713723148ab1f34e7b9cb90c0782550e01" + end + + def install + inreplace "src/packcc.c", "/usr/share/packcc/", "#{pkgshare}/" + build_dir = buildpath/"build"/ENV.compiler.to_s.sub(/-\d+$/, "") + system "make", "-C", build_dir + bin.install build_dir/"release/bin/packcc" + pkgshare.install "examples", "import" + end + + test do + cp pkgshare/"examples/ast-calc.peg", testpath + system bin/"packcc", "ast-calc.peg" + system ENV.cc, "ast-calc.c", "-o", "ast-calc" + output = pipe_output(testpath/"ast-calc", "1+2*3\n") + assert_equal <<~EOS, output + binary: "+" + nullary: "1" + binary: "*" + nullary: "2" + nullary: "3" + EOS + end +end diff --git a/Formula/p/packer-completion.rb b/Formula/p/packer-completion.rb new file mode 100644 index 0000000000000..c85fd4b0ef258 --- /dev/null +++ b/Formula/p/packer-completion.rb @@ -0,0 +1,25 @@ +class PackerCompletion < Formula + desc "Bash completion for Packer" + homepage "https://github.com/mrolli/packer-bash-completion" + url "https://github.com/mrolli/packer-bash-completion/archive/refs/tags/1.4.3.tar.gz" + sha256 "af7b3b49b29ffdb05b519dad2d83066f3d166dd8e29abd406ca0f3d480901df4" + license "MIT" + head "https://github.com/mrolli/packer-bash-completion.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "20e50c3d1419e8e86faefc8f726f79fa19d086e438db145679b84853cb6fddeb" + end + + deprecate! date: "2024-03-12", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + def install + bash_completion.install "packer" + end + + test do + assert_match "-F _packer_completion", + shell_output("bash -c 'source #{bash_completion}/packer && complete -p packer'") + end +end diff --git a/Formula/p/packetbeat.rb b/Formula/p/packetbeat.rb new file mode 100644 index 0000000000000..0d6cde25b8473 --- /dev/null +++ b/Formula/p/packetbeat.rb @@ -0,0 +1,75 @@ +class Packetbeat < Formula + desc "Lightweight Shipper for Network Data" + homepage "https://www.elastic.co/products/beats/packetbeat" + url "https://github.com/elastic/beats.git", + tag: "v9.2.0", + revision: "09b547febe1cc9102a5d3f80ac8fbf68a5fd84f5" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4cca3f3be656e193a1c2e4f7a86867adbab5b791c0b5de12f709ece680fc506b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b24265bba3a53aaa5e49ad1b2a14bc841a72d941f443e7b66a0c738fe05cfdb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e12b1eb3dde9bceca5e9eea1a83fb63b692f52c50c9e4261cff33a4f63a9716" + sha256 cellar: :any_skip_relocation, sonoma: "182ff804bc98dc06fc309f0006a9721ff846bf4728fadb05ab7145fb00903362" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f3b2da275c73ec8104b1cc574eb8737150633291f1c5925fe1eee211fdad940" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37b5e8d922f9d13a811984d2dd0516e532dfae879431766df4196b8063d1e405" + end + + depends_on "go" => :build + depends_on "mage" => :build + + uses_from_macos "libpcap" + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + # remove non open source files + rm_r("x-pack") + + # remove requirements.txt files so that build fails if venv is used. + # currently only needed by docs/tests + rm buildpath.glob("**/requirements.txt") + + cd "packetbeat" do + # don't build docs because we aren't installing them and allows avoiding venv + inreplace "magefile.go", ", includeList, fieldDocs)", ", includeList)" + + system "mage", "-v", "build" + system "mage", "-v", "update" + + inreplace "packetbeat.yml", "packetbeat.interfaces.device: any", "packetbeat.interfaces.device: en0" + + pkgetc.install Dir["packetbeat.*"], "fields.yml" + (libexec/"bin").install "packetbeat" + prefix.install "_meta/kibana" + end + + (bin/"packetbeat").write <<~SH + #!/bin/sh + exec #{libexec}/bin/packetbeat \ + --path.config #{etc}/packetbeat \ + --path.data #{var}/lib/packetbeat \ + --path.home #{prefix} \ + --path.logs #{var}/log/packetbeat \ + "$@" + SH + + chmod 0555, bin/"packetbeat" # generate_completions_from_executable fails otherwise + generate_completions_from_executable(bin/"packetbeat", "completion", shells: [:bash, :zsh]) + end + + service do + run opt_bin/"packetbeat" + end + + test do + eth = if OS.mac? + "en" + else + "eth" + end + assert_match "0: #{eth}0", shell_output("#{bin}/packetbeat devices") + assert_match version.to_s, shell_output("#{bin}/packetbeat version") + end +end diff --git a/Formula/p/packetq.rb b/Formula/p/packetq.rb new file mode 100644 index 0000000000000..0109248ee04b1 --- /dev/null +++ b/Formula/p/packetq.rb @@ -0,0 +1,37 @@ +class Packetq < Formula + desc "SQL-like frontend to PCAP files" + homepage "https://www.dns-oarc.net/tools/packetq" + url "https://www.dns-oarc.net/files/packetq/packetq-1.7.3.tar.gz" + sha256 "faa9a3700bf6010347fbfa595b7777d32059a77abbb027f6e070b419369d7718" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?packetq[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "112e72c771291bec60d3d430e7172edaa92e1288468005e614391280823d9822" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30d4e340a8cb4181ac18e1a0861114366072fd9e7285403dede913b6d43c46d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c417535f739789d04d7738608d54fe38b4ef64031c4ff594f5e0405782ef7ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "55fcb7a4a4cea35b2508da5a7431dd3f62724a2e74d0e7f5e9fbbdf07d9266f6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "242b9c3cb3def53cf305ace64795c75dc548fb094b5820a53885db9343fba998" + sha256 cellar: :any_skip_relocation, sonoma: "ba48fbdbb805d7cd4d98a01729cf039c0d712055119a67f2b9718f01bab6c24d" + sha256 cellar: :any_skip_relocation, ventura: "38abae3b37b0e57c4f6cadc99d35d21d1e5ea1dc1712420812a65391bf943ab9" + sha256 cellar: :any_skip_relocation, monterey: "379eeee8cd1a9b095adc60ff2147aa950cf81c98afeaffcb860e200a4500113b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b6008c10a371a2a456ad6a8430b911941e6e385ecf6c5c3ebdeaecfe490fca4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95b224f56ea3ceec3c1e6a13030405cb285de6861cee6987bfb0c472c68f7b5d" + end + + uses_from_macos "zlib" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/packetq --csv -s 'select id from dns' -") + assert_equal '"id"', output.chomp + end +end diff --git a/Formula/p/packetry.rb b/Formula/p/packetry.rb new file mode 100644 index 0000000000000..086351aabed14 --- /dev/null +++ b/Formula/p/packetry.rb @@ -0,0 +1,42 @@ +class Packetry < Formula + desc "Fast, intuitive USB 2.0 protocol analysis application for use with Cynthion" + homepage "https://github.com/greatscottgadgets/packetry" + url "https://github.com/greatscottgadgets/packetry/archive/refs/tags/v0.5.0.tar.gz" + sha256 "158cd25536c6d4feab2b9e76fcbb4174fdb2fd6fb1c309775a3b2efbe84db33b" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7b44a327337008bac85d41e08c6c01d443ec193d25671791275bb846fbb49a98" + sha256 cellar: :any, arm64_sequoia: "96b22357843f520ea804060b1a2016ca1597d2944bd9ba421ee18cb4400aed5f" + sha256 cellar: :any, arm64_sonoma: "8e922696b8fe099ee251474983e678d5dca2a66fd51f9e9ca0655f44c57828bf" + sha256 cellar: :any, sonoma: "4cbed67c2f94db98371ffd4e1c22339461ced6aefcb3e1aed5aa780088a587df" + sha256 cellar: :any_skip_relocation, arm64_linux: "2069f0fd40e8bb856ffa695b73c5d446b2f4f334413ecc63a1412e185160d162" + sha256 cellar: :any_skip_relocation, x86_64_linux: "feb64fb888f5d3e9769b784226363100a57f2b81ff3ede2c8ebceec074d72d8c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk4" + depends_on "pango" + + on_macos do + depends_on "gettext" + depends_on "graphene" + depends_on "harfbuzz" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/packetry --version") + + # Expected result is panic because Cynthion is not connected via USB. + output = shell_output("#{bin}/packetry --test-cynthion 2>&1", 1) + assert_match "Test failed: No Cynthion devices found", output + end +end diff --git a/Formula/p/packmol.rb b/Formula/p/packmol.rb new file mode 100644 index 0000000000000..0dbd208fb2f8e --- /dev/null +++ b/Formula/p/packmol.rb @@ -0,0 +1,44 @@ +class Packmol < Formula + desc "Packing optimization for molecular dynamics simulations" + homepage "https://www.ime.unicamp.br/~martinez/packmol/" + url "https://github.com/m3g/packmol/archive/refs/tags/v21.1.1.tar.gz" + sha256 "4bad785e6e1b91d8b80934eeebf91013e940c577693bbecd7ec56eb563f5d97f" + license "MIT" + head "https://github.com/m3g/packmol.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a5b3df00f0d2a4f4bedf45af4907f90fb2b847fa5888e204604568f6a7895361" + sha256 cellar: :any, arm64_sequoia: "48e8f1d8e37b3fc6a44c9a5c9c4b7976bb47166fa85f14e3771cc29a349f4f36" + sha256 cellar: :any, arm64_sonoma: "c737487817e8681c2effc46a2243f2098a22c7f3928c8ccc4603ce9a43bc98ec" + sha256 cellar: :any, sonoma: "e29361da29e7d240c2d12d6857197950fe861865a2f3ac03f2abdd28cd56a75a" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ed3e203477a3f7e97beb8f84fc260b742d5879d6fb68e12ae571c087bf372aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a489ad1696ded2ee9b2bb5bba5de5a54a243d972f630e9f6a8a942cf7a99afc8" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + + resource "homebrew-testdata" do + url "https://www.ime.unicamp.br/~martinez/packmol/examples/examples.tar.gz" + sha256 "97ae64bf5833827320a8ab4ac39ce56138889f320c7782a64cd00cdfea1cf422" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "solvate.tcl" + (pkgshare/"examples").install resource("homebrew-testdata") + end + + test do + cp Dir["#{pkgshare}/examples/*"], testpath + system bin/"packmol < interface.inp" + end +end diff --git a/Formula/p/pacmc.rb b/Formula/p/pacmc.rb new file mode 100644 index 0000000000000..4e7a80a06544e --- /dev/null +++ b/Formula/p/pacmc.rb @@ -0,0 +1,26 @@ +class Pacmc < Formula + desc "Minecraft package manager and launcher" + homepage "https://github.com/jakobkmar/pacmc" + url "https://github.com/jakobkmar/pacmc/releases/download/0.5.2/pacmc-0.5.2.tar" + sha256 "b0f4d338779acfb4a8898799beb545beb0a86ce9df19709765a871e33e7f5191" + license "AGPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9d54abfccc300901396d32f398dd0560690dca1f3414ed70a66156924ea8397f" + end + + depends_on "openjdk" + + def install + rm(Dir["bin/*.bat"]) + libexec.install %w[bin lib] + (bin/"pacmc").write_env_script libexec/"bin/pacmc", Language::Java.overridable_java_home_env + end + + test do + assert_match "sodium", shell_output("#{bin}/pacmc search sodium") + end +end diff --git a/Formula/p/pacparser.rb b/Formula/p/pacparser.rb new file mode 100644 index 0000000000000..8d2a3a3c1cc71 --- /dev/null +++ b/Formula/p/pacparser.rb @@ -0,0 +1,111 @@ +class Pacparser < Formula + desc "Library to parse proxy auto-config (PAC) files" + homepage "https://github.com/manugarg/pacparser" + url "https://github.com/manugarg/pacparser/archive/refs/tags/v1.4.6.tar.gz" + sha256 "7c5f4317f59c74a969acf700a6cc8ca838fa437f1ae58bce06422e880cbc9253" + license "LGPL-3.0-or-later" + head "https://github.com/manugarg/pacparser.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c6688419225a78bf7acc656ef81d32061fce24878a307aa5c6bc0480925e78ce" + sha256 cellar: :any, arm64_sequoia: "948d76de5ebe7475ea560f44a3235ea945b2e9f89ba83b9bd92439a8811e23f7" + sha256 cellar: :any, arm64_sonoma: "bb2c49a302896015e70cf1256014965854b2d3b85637a536c515ec08d100c63e" + sha256 cellar: :any, sonoma: "7a243e5b8fa79036b76d28e917f2a5328900bd3e750d9e27e022f57a3ed0be95" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1a331f84be7b5bb4a3c65640e62d27b1b3a5c1ba06c4f18bb7df6ef1a086d42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a26b8849f3eba4554d1e87a5546709a9582ca965a946074c2859819cea56ea6" + end + + def install + # Disable parallel build due to upstream concurrency issue. + # https://github.com/manugarg/pacparser/issues/27 + ENV.deparallelize + ENV["VERSION"] = version + Dir.chdir "src" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # example pacfile taken from upstream sources + (testpath/"test.pac").write <<~'EOS' + function FindProxyForURL(url, host) { + + if ((isPlainHostName(host) || + dnsDomainIs(host, ".example.edu")) && + !localHostOrDomainIs(host, "www.example.edu")) + return "plainhost/.example.edu"; + + // Return externaldomain if host matches .*\.externaldomain\.example + if (/.*\.externaldomain\.example/.test(host)) + return "externaldomain"; + + // Test if DNS resolving is working as intended + if (dnsDomainIs(host, ".google.com") && + isResolvable(host)) + return "isResolvable"; + + // Test if DNS resolving is working as intended + if (dnsDomainIs(host, ".notresolvabledomain.invalid") && + !isResolvable(host)) + return "isNotResolvable"; + + if (/^https:\/\/.*$/.test(url)) + return "secureUrl"; + + if (isInNet(myIpAddress(), '10.10.0.0', '255.255.0.0')) + return '10.10.0.0'; + + if ((typeof(myIpAddressEx) == "function") && + isInNetEx(myIpAddressEx(), '3ffe:8311:ffff/48')) + return '3ffe:8311:ffff'; + + else + return "END-OF-SCRIPT"; + } + EOS + # Functional tests from upstream sources + test_sets = [ + { + "cmd" => "-c 3ffe:8311:ffff:1:0:0:0:0 -u http://www.example.com", + "res" => "3ffe:8311:ffff", + }, + { + "cmd" => "-c 0.0.0.0 -u http://www.example.com", + "res" => "END-OF-SCRIPT", + }, + { + "cmd" => "-u http://host1", + "res" => "plainhost/.example.edu", + }, + { + "cmd" => "-u http://www1.example.edu", + "res" => "plainhost/.example.edu", + }, + { + "cmd" => "-u http://manugarg.externaldomain.example", + "res" => "externaldomain", + }, + { + "cmd" => "-u https://www.google.com", ## internet + "res" => "isResolvable", ## required + }, + { + "cmd" => "-u https://www.notresolvabledomain.invalid", + "res" => "isNotResolvable", + }, + { + "cmd" => "-u https://www.example.com", + "res" => "secureUrl", + }, + { + "cmd" => "-c 10.10.100.112 -u http://www.example.com", + "res" => "10.10.0.0", + }, + ] + # Loop and execute tests + test_sets.each do |t| + assert_equal t["res"], + shell_output("#{bin}/pactester -p #{testpath}/test.pac " + + t["cmd"]).strip + end + end +end diff --git a/Formula/p/pacvim.rb b/Formula/p/pacvim.rb new file mode 100644 index 0000000000000..813cc2525b23f --- /dev/null +++ b/Formula/p/pacvim.rb @@ -0,0 +1,43 @@ +class Pacvim < Formula + desc "Learn vim commands via a game" + homepage "https://github.com/jmoon018/PacVim" + url "https://github.com/jmoon018/PacVim/archive/refs/tags/v1.1.1.tar.gz" + sha256 "c869c5450fbafdfe8ba8a8a9bba3718775926f276f0552052dcfa090d21acb28" + license "LGPL-3.0-or-later" + head "https://github.com/jmoon018/PacVim.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fd3523c1dca67b23666aa921d77fba212524a4bdaaf78250661d5f08ebd6e8e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eb53c0d2669f9aa5eb5cb3a955cd07986eedf27c51c278faa0f39f694e629aba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "861543e913875822f7d20ee5fec8079993723f299866ba251e7ba4dc49e48449" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49f67bf7c8bd084178d6574b3871ba35f9f2b960382af02317c28ecf203a9210" + sha256 cellar: :any_skip_relocation, arm64_monterey: "802d9f2831e1cc5fc3e4eede8440f63596b642aead5ceffabbc612495555261f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b690b089d153174f596700e750e133228e05949b3c4d01c993d93b862b102dc0" + sha256 cellar: :any_skip_relocation, sonoma: "fef138624548ac61482427a75804152c868f184336d4af73d84be30b36f66c4c" + sha256 cellar: :any_skip_relocation, ventura: "42dfa466a32d36eee64a2e949b7a8aa2d5b6316b7cb4e369511e0763d21f8934" + sha256 cellar: :any_skip_relocation, monterey: "a9a92c82a3202ee0d64140220bcbe511ec5a0a462b1bf75b84bba05b26214844" + sha256 cellar: :any_skip_relocation, big_sur: "52a18b2f8a5a6e9ab6f2c31c08432c44c3f00183e18c80154a5c6f8daa069160" + sha256 cellar: :any_skip_relocation, catalina: "85bd0087ecc54716772881e46ce00553ee037eb2ea200d34d5db28709092369f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3e0cb7a0e81b078f2513a8b9c8affd74be3c509e16cc112bed36a8dabe199cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3abc4ac74d298cd3feb45f1a48f7b5f34d099805ae541f1c4bd57ff8e7a485a8" + end + + uses_from_macos "ncurses" + + # Use ncurses.h instead of cursesw.h which is not installed by brew + # https://github.com/jmoon018/PacVim/pull/31 + patch do + on_linux do + url "https://github.com/jmoon018/PacVim/commit/2f95ef4d312d760b8a3aae463e959646b27e774a.patch?full_index=1" + sha256 "e5b753de87937c0853a1adbab31eb1ec938add4ceb0df26eafef5b4f613bc3e6" + end + end + + def install + ENV.cxx11 + system "make", "install", "PREFIX=#{prefix}" + end +end diff --git a/Formula/p/page.rb b/Formula/p/page.rb new file mode 100644 index 0000000000000..e797ccb9dc547 --- /dev/null +++ b/Formula/p/page.rb @@ -0,0 +1,47 @@ +class Page < Formula + desc "Use Neovim as pager" + homepage "https://github.com/I60R/page" + url "https://github.com/I60R/page/archive/refs/tags/v4.6.3.tar.gz" + sha256 "51cf01933180499b27027fcdbda067f0cf80cebaa06d62400b655419f1806d46" + license "MIT" + head "https://github.com/I60R/page.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f685622827fa6bec5a9dae5fc611899eb1d1348564285a34374018e9ef870115" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "85f3c4b72af05b300edd783803e965114ee38bb7d8b6702812a9632d1386ec3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf6833b56b397b904b8f9a30f219a768d399d178268c7bd90a5cdc30409719c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "115a1bee4a08a2e829bd9474e5896cc5f9ac415a509b29b26675bb14206465dc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7dff421473d67b5b753c57deb9221fbdc863ba341e72b41b1a90ce71286ced4c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8e41089194d5a0afbe9b9e7f0876ff9a30261ddcc983c2b8cc708e917cd5a0f3" + sha256 cellar: :any_skip_relocation, sonoma: "4aa4ad4cf24f0551fe3cf2164631833364c239d895fa53fe18c864cf31725dc3" + sha256 cellar: :any_skip_relocation, ventura: "9711f49884c59be816fa97363993b08b6f1655b1a4ec8de8a89c6e95355976b9" + sha256 cellar: :any_skip_relocation, monterey: "ad312adf9e277f5dede93292f1cfb5001c4ad3a26ac55f877e25690d3c386f15" + sha256 cellar: :any_skip_relocation, big_sur: "d9598c8b80efa0b238478f877b19be504a1b07d3b41c8932e227a6ea4505cda8" + sha256 cellar: :any_skip_relocation, arm64_linux: "83b220ed10b10826229798222e1ffe69d65fafd026c46dc36599ed8fff4b8c6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9cac68f8653a7f517a1cbe7429e98743e94379bf96564c11e6b81c964cb279d" + end + + depends_on "rust" => :build + depends_on "neovim" + + conflicts_with "tcl-tk", because: "both install `page` binaries" + + def install + system "cargo", "install", *std_cargo_args + + asset_dir = Dir["target/release/build/page-*/out/assets"].first + bash_completion.install "#{asset_dir}/page.bash" => "page" + zsh_completion.install "#{asset_dir}/_page" + fish_completion.install "#{asset_dir}/page.fish" + end + + test do + # Disable this part of the test on Linux because display is not available. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + text = "test" + assert_equal text, pipe_output("#{bin}/page -O 1", text) + end +end diff --git a/Formula/p/pagmo.rb b/Formula/p/pagmo.rb new file mode 100644 index 0000000000000..0282706ed581c --- /dev/null +++ b/Formula/p/pagmo.rb @@ -0,0 +1,90 @@ +class Pagmo < Formula + desc "Scientific library for massively parallel optimization" + homepage "https://esa.github.io/pagmo2/" + url "https://github.com/esa/pagmo2/archive/refs/tags/v2.19.1.tar.gz" + sha256 "ecc180e669fa6bbece959429ac7d92439e89e1fd1c523aa72b11b6c82e414a1d" + license any_of: ["LGPL-3.0-or-later", "GPL-3.0-or-later"] + revision 6 + + bottle do + sha256 cellar: :any, arm64_tahoe: "967ca7afd0f94fe22053b2cf187c97a14c853e160668700db06e8a64f76a704e" + sha256 cellar: :any, arm64_sequoia: "9d5ab6ee707031ed11dd9291c579b778e03ed5357a159fa2fa5c9b572c8fe49f" + sha256 cellar: :any, arm64_sonoma: "4ec05c1307d3e5375802ddf095106412287eea4024037c4179960564284104f4" + sha256 cellar: :any, sonoma: "9c6488dd49f684f62e4035943dc9a370a08eed979d71a5139061700570135ff3" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe0c1de3105984b315801418a3f104de528645485da9ca587777efe7b6da1820" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bf66c10d87861392ebe1158c0f58ed438190310415b2f2093f53571c00eeaa7" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "eigen" + depends_on "nlopt" + depends_on "tbb" + + # Backport support for eigen 5.0.0 + patch do + url "https://github.com/esa/pagmo2/commit/bdd8559d7663536c3a5f56b013f07da11a35c9b8.patch?full_index=1" + sha256 "f8679d6ca0d4bd5d9b44382da35ddc6f80404d389813ce05f050d00f5ce3706c" + end + patch do + url "https://github.com/esa/pagmo2/commit/d0e70403179769c326f2694673473e1d3ef0bec7.patch?full_index=1" + sha256 "6dcf5ac2cbd8e9b0de20845a51ef5d8eeb0ffd0472f32bcc833ce3f314718f0b" + end + + def install + args = %w[ + -DPAGMO_WITH_EIGEN3=ON + -DPAGMO_WITH_NLOPT=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + #include + #include + #include + #include + #include + + using namespace pagmo; + + int main() + { + // 1 - Instantiate a pagmo problem constructing it from a UDP + // (i.e., a user-defined problem, in this case the 30-dimensional + // generalised Schwefel test function). + problem prob{schwefel(30)}; + + // 2 - Instantiate a pagmo algorithm (self-adaptive differential + // evolution, 100 generations). + algorithm algo{sade(100)}; + + // 3 - Instantiate an archipelago with 16 islands having each 20 individuals. + archipelago archi{16u, algo, prob, 20u}; + + // 4 - Run the evolution in parallel on the 16 separate islands 10 times. + archi.evolve(10); + + // 5 - Wait for the evolutions to finish. + archi.wait_check(); + + // 6 - Print the fitness of the best solution in each island. + for (const auto &isl : archi) { + std::cout << isl.get_population().champion_f()[0] << std::endl; + } + + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lpagmo", + "-std=c++17", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pakchois.rb b/Formula/p/pakchois.rb new file mode 100644 index 0000000000000..f94ededd476cb --- /dev/null +++ b/Formula/p/pakchois.rb @@ -0,0 +1,71 @@ +class Pakchois < Formula + desc "PKCS #11 wrapper library" + homepage "https://www.manyfish.co.uk/pakchois/" + url "https://www.manyfish.co.uk/pakchois/pakchois-0.4.tar.gz" + sha256 "d73dc5f235fe98e4d1e8c904f40df1cf8af93204769b97dbb7ef7a4b5b958b9a" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?pakchois[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "7f225dfdf9d1ac84b9bbd38a83157664f5b03b6951a09b9888b8b67ab586ae59" + sha256 arm64_sequoia: "9634938ed93d02adaa5e477a29ee2f128d058f63cfbbe9c460ead07b53ac23d1" + sha256 arm64_sonoma: "c5e557c4172e6800ca80178acedc0a6029c4870ceb37ed56d6a3944f32a271ee" + sha256 arm64_ventura: "d8467830fd424d6fea0a0f0ff82949262d55d4221fa2a2d630b0679d374c803f" + sha256 arm64_monterey: "fb701bf9c363b4e09f285fa9c6f60aba921a93f826c37afd5fcc54b0bc5e4ed1" + sha256 cellar: :any, arm64_big_sur: "86e77a851ff2c0de31cf5e4f2587711b7b1bcc742fb878df1ce69fde836fd864" + sha256 sonoma: "95aae319e6a66c11f7f6826ded41ac0b2b45e4768319267321866118d828289c" + sha256 ventura: "b6a9c3707dd02ec65d927974bd8534be159b2dd977f14df74907eadb0165e953" + sha256 monterey: "f53bdb6cb2f47b0ed2e1df5f2c80f9568c3b2c55463de2cfdfe742da945364c0" + sha256 cellar: :any, big_sur: "fd91b09bb010ac37483a910b0431c6082903ee843a15f4cc767bde57ce0b7267" + sha256 cellar: :any, catalina: "ca82f2950582bc54e46122eb71ff8e8acdc739772baf53ab2d545755f03303f8" + sha256 arm64_linux: "f1d80aa63347835060c9d57d93c36226dc116d3c4b573e3db74128a86e4bfc1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9e96d8cef014042091db67065c8b02439cba4cfd381ca7651bc721ec120ad4a" + end + + def install + # Fix flat namespace usage + inreplace "configure", "${wl}-flat_namespace ${wl}-undefined ${wl}suppress", "${wl}-undefined ${wl}dynamic_lookup" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + pakchois_module_t *mod = NULL; + + // load non-existent module + ck_rv_t rv = pakchois_module_load(&mod, "nonexistent-module"); + printf("pakchois_module_load returned: %lu\\n", rv); + + if (rv != 0) { + printf("Module load failed as expected\\n"); + } + + if (mod != NULL) { + pakchois_module_destroy(mod); + } + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpakchois", "-o", "test" + assert_match "Module load failed as expected", shell_output("./test") + end +end diff --git a/Formula/p/pam-reattach.rb b/Formula/p/pam-reattach.rb new file mode 100644 index 0000000000000..e655e1d8cc17d --- /dev/null +++ b/Formula/p/pam-reattach.rb @@ -0,0 +1,37 @@ +class PamReattach < Formula + desc "PAM module for reattaching to the user's GUI (Aqua) session" + homepage "https://github.com/fabianishere/pam_reattach" + url "https://github.com/fabianishere/pam_reattach/archive/refs/tags/v1.3.tar.gz" + sha256 "b1b735fa7832350a23457f7d36feb6ec939e5e1de987b456b6c28f5738216570" + license "MIT" + head "https://github.com/fabianishere/pam_reattach.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ab1297caf49a797f8d06361fcb5d690b83b2b92444fe44a5be7d2cdef1ddc123" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "762bb984039bcf0a785bce5fadb36341c579dcf9f3bbca652a839fba7988978d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6e506b3690188d4a532579c2e0fbca2a0e7b3c1bef8b45cf7de99b877496f03" + sha256 cellar: :any_skip_relocation, arm64_ventura: "470ceefd11808433f82347c1ba80e905d0c5a4b1076d47efac15692b0f86d34f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d220980d0a233aeac53fc39fbd2eafcbf7cdcb9252b9c7bf24066e3dd6b0dda8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ceb022b08c5d64cbc3250a227b2496dc4181854fa4d7b90faa98efe2e31b091b" + sha256 cellar: :any_skip_relocation, sonoma: "5e97728cb68bac6d2be4581996600db21eb2492959140c77aae146c586eaabb3" + sha256 cellar: :any_skip_relocation, ventura: "d71f187aaad7e98ffb0c030802be6d4c73f245d399a52159701e80a424183622" + sha256 cellar: :any_skip_relocation, monterey: "671f461386143302144a82d67f6b1ba1073753f5c6253b8005cfe1eb1918e861" + sha256 cellar: :any_skip_relocation, big_sur: "0c40906d18c53054708a408e42f6a86d5579bd853bb69702507e659d0e7ea2ae" + sha256 cellar: :any_skip_relocation, catalina: "1ca81cd2502742faa6d88e1345c1c42f5ab401053a1aed3c38434945ec119941" + end + + depends_on "cmake" => :build + depends_on :macos + + def install + system "cmake", "-S", ".", "-B", "build", "-DENABLE_CLI=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match("Darwin", shell_output("#{bin}/reattach-to-session-namespace uname")) + end +end diff --git a/Formula/p/pam-u2f.rb b/Formula/p/pam-u2f.rb new file mode 100644 index 0000000000000..22c3676fbcd6e --- /dev/null +++ b/Formula/p/pam-u2f.rb @@ -0,0 +1,59 @@ +class PamU2f < Formula + desc "Provides an easy way to use U2F-compliant authenticators with PAM" + homepage "https://developers.yubico.com/pam-u2f/" + url "https://developers.yubico.com/pam-u2f/Releases/pam_u2f-1.4.0.tar.gz" + sha256 "a59927cea38ea8d91a6836a04e20fc629edde4204b16082f703f6db378e9c634" + license "BSD-2-Clause" + head "https://github.com/Yubico/pam-u2f.git", branch: "master" + + livecheck do + url "https://developers.yubico.com/pam-u2f/Releases/" + regex(/href=.*?pam_u2f[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9844179a60b558f985873acb95a1b19b5fe2f3f130d5a06a4e833259c010ecc2" + sha256 cellar: :any, arm64_sequoia: "f2e4356b647818a3971dc3e4feb311dd547284426717d6d4235e838b0de316c5" + sha256 cellar: :any, arm64_sonoma: "0089a1832f65debf7c4aef93e31f24f1dde60c673f888c2e6f37937e76abd23b" + sha256 cellar: :any, arm64_ventura: "dc7e13adf558fab082311b0fbb128332cafa81510059db8b23aa903ed005d76f" + sha256 cellar: :any, sonoma: "59e4b1a99b4c51f5b56de184d414bd006811d83a2d032a535407e8af00fd87a4" + sha256 cellar: :any, ventura: "30a9288a77afa266fc9fa008422e9628ebd8da77c06315d317101c9c143cdc72" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1f8f8bb7c149900e9e59fe25f24cb11ae669651a08188a801cce00cd30cd347" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a99993171f6fd57e574bf1abff0848e80aae095be2ea85e0ec766ccb5496b419" + end + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libfido2" + depends_on "openssl@3" + + on_linux do + depends_on "linux-pam" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + + ENV["A2X"] = "#{Formula["asciidoc"].opt_bin}/a2x --no-xmllint" + system "./configure", "--prefix=#{prefix}", "--with-pam-dir=#{lib}/pam" + system "make", "install" + end + + def caveats + <<~EOS + To use a U2F key for PAM authentication, specify the full path to the + module (#{opt_lib}/pam/pam_u2f.so) in a PAM + configuration. You can find all PAM configurations in /etc/pam.d. + + For further installation instructions, please visit + https://developers.yubico.com/pam-u2f/#installation. + EOS + end + + test do + system bin/"pamu2fcfg", "--version" + end +end diff --git a/Formula/p/pan.rb b/Formula/p/pan.rb new file mode 100644 index 0000000000000..094d935254c48 --- /dev/null +++ b/Formula/p/pan.rb @@ -0,0 +1,73 @@ +class Pan < Formula + desc "Usenet newsreader that's good at both text and binaries" + homepage "https://gitlab.gnome.org/GNOME/pan" + url "https://gitlab.gnome.org/GNOME/pan/-/archive/v0.164/pan-v0.164.tar.bz2" + sha256 "862609baaabbc516fe23fd9f62ae54f1a6b6481178913f3c5a6f4597d0c39244" + license "GPL-2.0-only" + + bottle do + sha256 arm64_tahoe: "a0797478edc5d73b92d1b72296c57530dec5be4263d7ad1944bafbdd789f06f6" + sha256 arm64_sequoia: "deb86a97c8007b261347fea9f0db7b925f5b8081629097a5f5480a668ffba530" + sha256 arm64_sonoma: "21d6e8b62f18043750c6f509c7bd3868d8832b3e568a252c15a604759ae4fe40" + sha256 arm64_ventura: "9d051c43ee5c8a43212f69b9c3fb9c1235d822c5522bb31fa710899325f5bec0" + sha256 sonoma: "14f55fb5865ea9b048326801a5826e5ca3509ac733d239f136a3f16f555acc3a" + sha256 ventura: "6a0c7b8e2bfea9de1de7f94be6b132ea4505c4c46d4d9429487d99c0690e8930" + sha256 arm64_linux: "31b3fc10fe506b19e6d70602566a5a4991b51b5167c593fc5a2586341fe76ff9" + sha256 x86_64_linux: "f66553706f7464e5296b8251b55bace50e3cf3d6a5527b42405b9d8f9dba5983" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "enchant" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gmime" + depends_on "gnutls" + depends_on "gspell" + depends_on "gtk+3" + depends_on "gtkspell3" + depends_on "harfbuzz" + depends_on "pango" + + uses_from_macos "zlib" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Test fails on headless CI + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + minimal = testpath/"minimal.nzb" + minimal.write <<~XML + + + + + + 0.test + + + pan$d1fb3$7054e426$ef264b33$dab0ec15@orion.org + + + + XML + + # this test works only if pan has not yet been configured with news servers + assert_match "Please configure Pan's news servers before using it as an nzb client.", + shell_output("#{bin}/pan --nzb #{testpath}/minimal.nzb 2>&1", 1) + end +end diff --git a/Formula/p/pandemics.rb b/Formula/p/pandemics.rb new file mode 100644 index 0000000000000..3c565efdd9e96 --- /dev/null +++ b/Formula/p/pandemics.rb @@ -0,0 +1,38 @@ +class Pandemics < Formula + desc "Converts your markdown document in a simplified framework" + homepage "https://pandemics.gitlab.io" + url "https://registry.npmjs.org/pandemics/-/pandemics-0.12.1.tgz" + sha256 "9be418ec78ca512cc66d57a7533a5acda003c8bc488d7fff7fa2905c9ad39e29" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "56f5dfc850d49885e631d590e330b5555985312ec11a483ac8001b3ca9f5be46" + end + + depends_on "librsvg" + depends_on "node" + depends_on "pandoc" + depends_on "pandoc-crossref" + + def install + ENV["PANDEMICS_DEPS"]="0" + # npm ignores config and ENV when in global mode so: + # - install without running the package install script + system "npm", "install", "--ignore-scripts", *std_npm_args + # - call install script manually to ensure ENV is respected + system "npm", "run", "--prefix", libexec/"lib/node_modules/pandemics", "install" + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + # version is correct? + assert_equal version, shell_output("#{libexec}/bin/pandemics --version") + # does compile to pdf? + touch testpath/"test.md" + system bin/"pandemics", "publish", "--format", "html", "#{testpath}/test.md" + assert_path_exists testpath/"pandemics/test.html" + end +end diff --git a/Formula/p/pandoc-crossref.rb b/Formula/p/pandoc-crossref.rb new file mode 100644 index 0000000000000..477c5dae5278f --- /dev/null +++ b/Formula/p/pandoc-crossref.rb @@ -0,0 +1,44 @@ +class PandocCrossref < Formula + desc "Pandoc filter for numbering and cross-referencing" + homepage "https://github.com/lierdakil/pandoc-crossref" + url "https://github.com/lierdakil/pandoc-crossref/archive/refs/tags/v0.3.22a.tar.gz" + version "0.3.22a" + sha256 "6957b4bdd121200ed61c2a3b466f192e4afce547677c4c7a5fdee3925d3daab0" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "11535bcc07f67f87326e56e6297a5466a293d938a04ed8fdfee04bb80dc81f4e" + sha256 cellar: :any, arm64_sequoia: "eeb1d6938ea191bf8c04b943452ce1e22b1f16a30664192b0c14123ed6e752db" + sha256 cellar: :any, arm64_sonoma: "dba3689a4a9b89fbc463f832c4e27ef6e7b5458dd52594a6d2e9e88aa85ca00c" + sha256 cellar: :any, sonoma: "13f4ab0774b2a1303e3a291d2bee0fc127da64ee3abd92d08c4b0f8aee24626b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4e457f88957411e313dd22bc9f0463dc56fa41319e19d483398bab8c76cb51e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99ebb2f98aa98cf57cae61abe327f2061ad5a3f2fc926b08f0fa6e2d7d714b9b" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "pandoc" + + uses_from_macos "unzip" => :build + uses_from_macos "zlib" + + def install + rm("cabal.project.freeze") + + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + (testpath/"hello.md").write <<~MARKDOWN + Demo for pandoc-crossref. + See equation @eq:eqn1 for cross-referencing. + Display equations are labelled and numbered + + $$ P_i(x) = \\sum_i a_i x^i $$ {#eq:eqn1} + MARKDOWN + output = shell_output("#{Formula["pandoc"].bin}/pandoc -F #{bin}/pandoc-crossref -o out.html hello.md 2>&1") + assert_match "∑", (testpath/"out.html").read + refute_match "WARNING: pandoc-crossref was compiled", output + end +end diff --git a/Formula/p/pandoc-plot.rb b/Formula/p/pandoc-plot.rb new file mode 100644 index 0000000000000..2df007e23bc38 --- /dev/null +++ b/Formula/p/pandoc-plot.rb @@ -0,0 +1,69 @@ +class PandocPlot < Formula + desc "Render and include figures in Pandoc documents using many plotting toolkits" + homepage "https://github.com/LaurentRDC/pandoc-plot" + url "https://hackage.haskell.org/package/pandoc-plot-1.9.1/pandoc-plot-1.9.1.tar.gz" + sha256 "a34a08faf483ed7c9c5e7c439ac275077b9262bb3384d1f551e47d6aa59dd434" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "72c9bb7d9558683d428db2490b722bf71a05b2329f587a518dba7f80ed54462a" + sha256 cellar: :any, arm64_sequoia: "d4bb1706c24f0ef83ad8c51b8c8494eb74a3494e37f7f0ac659142b57513070c" + sha256 cellar: :any, arm64_sonoma: "ee0283f71f83291ed5c5b533f5e228f6cc541cf8f345da1e15d8387f495c28f2" + sha256 cellar: :any, arm64_ventura: "05868fd036fde7fe2b67fff77ed5a3f93781331d786558e79723235e0b0f6a56" + sha256 cellar: :any, sonoma: "61bee302ba4181e8797bdaf9e6faf4d4a06a1eb74df6f367bf7ceff7c0aed259" + sha256 cellar: :any, ventura: "9755b31b27aefc4b4a0526dda6e026bb99719b85b29bb9d7dbfcb030f62476d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c7f6ff8076b1b9000b9e802a2df58f3ef78be584025281719b00ab443511b98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e672908c34a06f16722e1a3dd0e7e96dd71560ba6151bfd2986a3752df03c148" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "graphviz" => :test + + depends_on "gmp" + depends_on "pandoc" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + input_markdown_1 = <<~MARKDOWN + # pandoc-plot demo + + ```{.graphviz} + digraph { + pandoc -> plot + } + ``` + MARKDOWN + + input_markdown_2 = <<~MARKDOWN + # repeat the same thing + + ```{.graphviz} + digraph { + pandoc -> plot + } + ``` + MARKDOWN + + output_html_1 = pipe_output("pandoc --filter #{bin}/pandoc-plot -f markdown -t html5", input_markdown_1) + output_html_2 = pipe_output("pandoc --filter #{bin}/pandoc-plot -f markdown -t html5", input_markdown_2) + filename = output_html_1.match(%r{(plots/[\da-z]+\.png)}i) + + expected_html_2 = <<~HTML +

repeat the same thing

+
+ +
+ HTML + + assert_equal expected_html_2, output_html_2 + end +end diff --git a/Formula/p/pandoc.rb b/Formula/p/pandoc.rb new file mode 100644 index 0000000000000..abd96128a8c9b --- /dev/null +++ b/Formula/p/pandoc.rb @@ -0,0 +1,47 @@ +class Pandoc < Formula + desc "Swiss-army knife of markup format conversion" + homepage "https://pandoc.org/" + url "https://github.com/jgm/pandoc/archive/refs/tags/3.8.2.1.tar.gz" + sha256 "e3948e106026edbcef4e4d63f92554c814c779fa14696e635fb98e1279d4c175" + license "GPL-2.0-or-later" + head "https://github.com/jgm/pandoc.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "243bf261875489e301064243e5ff66b7ee2314b46ad6713140d28fa775642064" + sha256 cellar: :any, arm64_sequoia: "24eeaee65d0243cb8e2cc8af6b817cdfedf8e66dd62355a7e92d2222dee0bda5" + sha256 cellar: :any, arm64_sonoma: "6482bedf0add4caac5261ed1b398f9a7070bd16ff554a83f7b7ff6c27e6b14e2" + sha256 cellar: :any, sonoma: "3ef2c73fbabea2395ed9fd51c986774486e669fb611d520515b004e5c0c7ae3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "402524fe0a947a6023b3088cd41c04f7265844d21d8e0caaef245da2189375ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ee2f465219c7d84eb055b7a582b7d0da88d9ce5869987e0c44a5f3c1457bbf3" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "unzip" => :build # for cabal install + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args, "pandoc-cli" + generate_completions_from_executable(bin/"pandoc", "--bash-completion", + shells: [:bash], shell_parameter_format: :none) + man1.install "pandoc-cli/man/pandoc.1" + end + + test do + input_markdown = <<~MARKDOWN + # Homebrew + + A package manager for humans. Cats should take a look at Tigerbrew. + MARKDOWN + expected_html = <<~HTML +

Homebrew

+

A package manager for humans. Cats should take a look at + Tigerbrew.

+ HTML + assert_equal expected_html, pipe_output("#{bin}/pandoc -f markdown -t html5", input_markdown, 0) + end +end diff --git a/Formula/p/pandocomatic.rb b/Formula/p/pandocomatic.rb new file mode 100644 index 0000000000000..3f209bf01a683 --- /dev/null +++ b/Formula/p/pandocomatic.rb @@ -0,0 +1,42 @@ +class Pandocomatic < Formula + desc "Automate the use of pandoc" + homepage "https://heerdebeer.org/Software/markdown/pandocomatic/" + url "https://github.com/htdebeer/pandocomatic/archive/refs/tags/2.1.0.tar.gz" + sha256 "ca7dd1b325aa2f8abbec3d7cadabb71fe9ec803f044121589b1c89a13f66b245" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2b46f58006899e9aa3af9e460becf6821fd7d4bb87fb45ff5d4187158a56d9eb" + end + + depends_on "pandoc" + depends_on "ruby" + + def install + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg + ENV["GEM_HOME"] = libexec + + system "bundle", "config", "set", "without", "development", "test" + system "bundle", "install" + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + (testpath/"test.md").write <<~MARKDOWN + # Homebrew + + A package manager for humans. Cats should take a look at Tigerbrew. + MARKDOWN + expected_html = <<~HTML +

Homebrew

+

A package manager for humans. Cats should take a look at + Tigerbrew.

+ HTML + system bin/"pandocomatic", "-i", "test.md", "-o", "test.html" + assert_equal expected_html, (testpath/"test.html").read + end +end diff --git a/Formula/p/pangene.rb b/Formula/p/pangene.rb new file mode 100644 index 0000000000000..2be47e5eb1e07 --- /dev/null +++ b/Formula/p/pangene.rb @@ -0,0 +1,37 @@ +class Pangene < Formula + desc "Construct pangenome gene graphs" + homepage "https://github.com/lh3/pangene" + url "https://github.com/lh3/pangene/archive/refs/tags/v1.1.tar.gz" + sha256 "9fbb6faa4d53b1e163a186375ca01bbac4395aa4c88d1ca00d155e751fb89cf8" + license "MIT" + head "https://github.com/lh3/pangene.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2c6dbdfbc682f5845cae51d931b77a475097693bbd76343919365f2f3413a6e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08730dae3029ce76ebbf0bef953e839242f80bfd64f4ba430b7c94bf89b20a3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b448acf9c369e6a67524e8d7c68fb781c5f526a3c41a74679a251965c8a5de3b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03ab1d6a2d24f4629689f39536fb9422f934b86eef4dd5d0ceafeb479140c472" + sha256 cellar: :any_skip_relocation, sonoma: "9c86caf9ed1c9918e4286f785151b4af0b7e5fd665c430948c5eb0f14a8c8424" + sha256 cellar: :any_skip_relocation, ventura: "96ad645c4f2a6ae15cbf231a2e9b080fa3334d8b412e1c5dbdbe580bd66f6c22" + sha256 cellar: :any_skip_relocation, arm64_linux: "c01933d9ab50883be5455c7666cb5afadfaf1789eefb6613d8fdc51eeb9f9f64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "487052e67934b027898914dcfec64d1805b0ab9f9457704c1bb5e2aed204d5a7" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "pangene" + man1.install "pangene.1" + pkgshare.install "test" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pangene --version") + cp_r pkgshare/"test/C4/.", testpath + output = shell_output("#{bin}/pangene 31_chimpanzee.paf.gz") + assert_match "chimpanzee", output + end +end diff --git a/Formula/p/pango.rb b/Formula/p/pango.rb new file mode 100644 index 0000000000000..97e7f62b3431b --- /dev/null +++ b/Formula/p/pango.rb @@ -0,0 +1,78 @@ +class Pango < Formula + desc "Framework for layout and rendering of i18n text" + homepage "https://www.gtk.org/docs/architecture/pango" + url "https://download.gnome.org/sources/pango/1.57/pango-1.57.0.tar.xz" + sha256 "890640c841dae77d3ae3d8fe8953784b930fa241b17423e6120c7bfdf8b891e7" + license "LGPL-2.0-or-later" + revision 1 + head "https://gitlab.gnome.org/GNOME/pango.git", branch: "main" + + # Pango doesn't follow GNOME's "even-numbered minor is stable" version + # scheme but they do appear to use 90+ minor/patch versions, which may + # indicate unstable versions (e.g., 1.90, etc.). + livecheck do + url "https://download.gnome.org/sources/pango/cache.json" + regex(/pango[._-]v?(\d+(?:(?!\.9\d)\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "dd27a8a5aa57deade2909c9f8054000cf8f289e4c416b3448c4c71159941e941" + sha256 cellar: :any, arm64_sequoia: "b81624cd5d7a41cfa1242840ca5d8deb0e03e9fa1951841690fa1a94291293ef" + sha256 cellar: :any, arm64_sonoma: "6edeafd5ccd0552dfa16d7790ab1e07a736076bfead4998d4e8222ae430e7ddc" + sha256 cellar: :any, sonoma: "ae4ef39435487540dff3163e170936841edd376cd6ca56d5f4ba9765ce8f144e" + sha256 arm64_linux: "20e27986a4cb125faff80a45c80e3bf052f0f47deedb1f845f85010185d43ffa" + sha256 x86_64_linux: "0d6b77557f01f42a3143618f129f096403ac2fb84475017057b7d9fd09f00261" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "fribidi" + depends_on "glib" + depends_on "harfbuzz" + + # PR ref: https://gitlab.gnome.org/GNOME/pango/-/merge_requests/891 + patch do + url "https://gitlab.gnome.org/GNOME/pango/-/commit/4403954455f2b4a815b32e11c44f79b2e665e94c.diff" + sha256 "f674089884839f64b5c04032325c2230f19049759a94dcb1daf82f832ff70e33" + end + + def install + args = %w[ + -Ddefault_library=both + -Dintrospection=enabled + -Dfontconfig=enabled + -Dcairo=enabled + -Dfreetype=enabled + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"pango-view", "--version" + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + PangoFontMap *fontmap; + int n_families; + PangoFontFamily **families; + fontmap = pango_cairo_font_map_get_default(); + pango_font_map_list_families (fontmap, &families, &n_families); + g_free(families); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs pangocairo").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/p/pangomm.rb b/Formula/p/pangomm.rb new file mode 100644 index 0000000000000..c94d2004422f3 --- /dev/null +++ b/Formula/p/pangomm.rb @@ -0,0 +1,49 @@ +class Pangomm < Formula + desc "C++ interface to Pango" + homepage "https://www.gtk.org/docs/architecture/pango" + url "https://download.gnome.org/sources/pangomm/2.56/pangomm-2.56.1.tar.xz" + sha256 "539f5aa60e9bdc6b955bb448e2a62cc14562744df690258040fbb74bf885755d" + license "LGPL-2.1-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "47f6a5d2a8b3d0ba246aae39234a138ce18d1004ec35607b18f22f203b250171" + sha256 cellar: :any, arm64_sequoia: "fc97b28b6c7113305951d34c674a9f7a3eb480fe22e934258e1224da19ac8863" + sha256 cellar: :any, arm64_sonoma: "110fdbe5d554355086809c40170027d39daaf2adde15e25dd43001ea968c1303" + sha256 cellar: :any, arm64_ventura: "51147a02ebc43f6a0123d07c680512e7135750f0bfe1175217556f578f17ad3b" + sha256 cellar: :any, sonoma: "1bc3b3ef3f4502d595eec7787bc1464723abfdae305ed2b4118c5d1bce59a61d" + sha256 cellar: :any, ventura: "c57567987e6f32bbf3a1cd9860c52df97753f34eaab7dcb5b72539f0a57c0fdc" + sha256 arm64_linux: "2ba333c4cb46d9e32440117b87ca21123dda59066c5edf1120ab77e98c9e1289" + sha256 x86_64_linux: "4defbd47ef262aaf9aa021ab3da046d717848c61679f0f412278d74c1877d6f7" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "cairomm" + depends_on "glib" + depends_on "glibmm" + depends_on "libsigc++" + depends_on "pango" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main(int argc, char *argv[]) + { + Pango::FontDescription fd; + return 0; + } + CPP + + pkgconf_flags = shell_output("pkgconf --cflags --libs pangomm-2.48").chomp.split + system ENV.cxx, "-std=c++17", "test.cpp", *pkgconf_flags, "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pangomm@2.46.rb b/Formula/p/pangomm@2.46.rb new file mode 100644 index 0000000000000..7519fb1fdc483 --- /dev/null +++ b/Formula/p/pangomm@2.46.rb @@ -0,0 +1,55 @@ +class PangommAT246 < Formula + desc "C++ interface to Pango" + homepage "https://www.gtk.org/docs/architecture/pango" + url "https://download.gnome.org/sources/pangomm/2.46/pangomm-2.46.4.tar.xz" + sha256 "b92016661526424de4b9377f1512f59781f41fb16c9c0267d6133ba1cd68db22" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/pangomm-(2\.46(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "59acdc333ff48dcaa839724326a109208097bf5395a4a6f932f094e2479f50f4" + sha256 cellar: :any, arm64_sequoia: "c5c43ab69df3ee85326bb0abf15fd4057a46ce3900015be64abb8c8573d3202e" + sha256 cellar: :any, arm64_sonoma: "6468295dc13b7795464c8acbeb4d790c15b33e6431ff71401c05929cf2f9f3ff" + sha256 cellar: :any, arm64_ventura: "b323db7914c80c804a6804b16cb58c8cb9a11d38ce52826b1cc469fa8dfd2510" + sha256 cellar: :any, sonoma: "ee486c1037b89986dec5c26f870d092f4510ba0e121dbb96525fab6a61d358f7" + sha256 cellar: :any, ventura: "1fc51b4f1d0ffde9fffb314a586bcf812fe84496c2a5c56f9fa362cfa91e9cf2" + sha256 arm64_linux: "83a7dc15c14d9031b26bb31705692823f7579ee94d962eb0e6e48952f7c50ba9" + sha256 x86_64_linux: "6b6a26c7bf0e1ba43a9a87dcf9c5b669da81070f282c6b26a70204207713bde3" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "cairomm@1.14" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "libsigc++@2" + depends_on "pango" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + test do + (testpath/"test.cpp").write <<~CPP + #include + int main(int argc, char *argv[]) + { + Pango::FontDescription fd; + return 0; + } + CPP + + pkgconf_flags = shell_output("pkgconf --cflags --libs pangomm-1.4").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", *pkgconf_flags, "-o", "test" + system "./test" + end +end diff --git a/Formula/p/paperjam.rb b/Formula/p/paperjam.rb new file mode 100644 index 0000000000000..f64c1f47a2aff --- /dev/null +++ b/Formula/p/paperjam.rb @@ -0,0 +1,42 @@ +class Paperjam < Formula + desc "Program for transforming PDF files" + homepage "https://mj.ucw.cz/sw/paperjam/" + url "https://mj.ucw.cz/download/linux/paperjam-1.2.2.tar.gz" + sha256 "a281912d00a935f490ce20873e87b82d5203bb6180326be1bec60184acab30fc" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?paperjam[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "09f4e84aa79cc854def0e6175e28b4309108b31a1ba33e98546ae43f347d9412" + sha256 cellar: :any, arm64_sequoia: "a7c254e007515ca0b2ba42063d766f12d5bc8521ce50b2019f71f7bf76920944" + sha256 cellar: :any, arm64_sonoma: "201983b5c3c8b90a58e66d5f43cec89005935277f3b0113c9c51692f486c00d0" + sha256 cellar: :any, arm64_ventura: "6698810703ff9e4622a05bb1ddeb3428827199a2165869fb53736b088fcbaf79" + sha256 cellar: :any, sonoma: "91fa2261cd3db2b3224ec207ec99541cac0ea6aea77bb544362f288e731f8135" + sha256 cellar: :any, ventura: "53a29eb850b492e5aaffb84038267c8b23cca0c2569460568739f83553c47e25" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7c6806d04b52f70dfae2d5e3f7b4c1041ab6d18a0753cc3907eb20a487fbb9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69fa71726997dffe37df6cad5c7ca2a9c0663bacb2ef40575b5e6751c79c72bb" + end + + depends_on "asciidoc" => :build + depends_on "docbook-xsl" => :build + depends_on "libpaper" + depends_on "qpdf" + + uses_from_macos "libxslt" + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + ENV.append "LDLIBS", "-liconv" if OS.mac? + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"paperjam", "modulo(2) { 1, 2: rotate(180) }", test_fixtures("test.pdf"), "output.pdf" + assert_path_exists testpath/"output.pdf" + end +end diff --git a/Formula/p/paperkey.rb b/Formula/p/paperkey.rb new file mode 100644 index 0000000000000..6a03e35444c5c --- /dev/null +++ b/Formula/p/paperkey.rb @@ -0,0 +1,51 @@ +class Paperkey < Formula + desc "Extract just secret information out of OpenPGP secret keys" + homepage "https://www.jabberwocky.com/software/paperkey/" + url "https://www.jabberwocky.com/software/paperkey/paperkey-1.6.tar.gz" + sha256 "a245fd13271a8d2afa03dde979af3a29eb3d4ebb1fbcad4a9b52cf67a27d05f7" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?paperkey[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fc50488f52f09cbf1b0fabc8ddefa543104654dff3a462d9d0dfdca67e89ffcf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5f29efd5bd3c2ce18f744e141fbb9e3013a0474a3d391efcd1ccfdf31bc9c73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b249d92841f7cada3fbbad6ebfa77672ba9ce1925f3e8d6b1169049e35d2c161" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3334f86e54a5038f18b31f703a22981ef66b028cda73e2bc985db6a0c74a401e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e56628d74d3ba424c3c801ee83d03408a8fe0e72644b493504c1511d84eea422" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "71c9db30e077414c7504d8b20e9f5809b2cde37997881c1715e51e953d90d76d" + sha256 cellar: :any_skip_relocation, sonoma: "2e0ff420725418bfaf5cb4f18985772bdf516087d88e2b37a7916f3a382fcf75" + sha256 cellar: :any_skip_relocation, ventura: "b052c9ccf5ad09a444113225cabbfe0d6a65a0d64fd5df1451d2660a9b7a5ebb" + sha256 cellar: :any_skip_relocation, monterey: "8a3f3bdec644389ce5de309eb2ce36e5829d9da8b611bb30bbb7a73c32efc669" + sha256 cellar: :any_skip_relocation, big_sur: "c6af240418bfb7c29113a1861966302d2be55fc578298f6fb0a4f71bc8dbf89e" + sha256 cellar: :any_skip_relocation, catalina: "12be9f841cfb0d4069be3e461cd5e783ba4ea11195507a13763f90ccc026f31e" + sha256 cellar: :any_skip_relocation, arm64_linux: "53cfe21caff97562617b491ee78d77e79761907e8e490d739334999ecd89fd77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "065de554c087ac3f19246e81fdbf2a60b64c2307f420b91029d781ec901b2d94" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + resource "homebrew-test_sec" do + url "https://raw.githubusercontent.com/dmshaw/paperkey/46adad971458a798e203bf8ec65d6bc897494754/checks/papertest-rsa.sec" + sha256 "0f39397227339171209760e0f27aa60ecf7eae31c32d0ec3a358434afd38eacd" + end + + resource("homebrew-test_sec").stage do + system bin/"paperkey", "--secret-key", "papertest-rsa.sec", "--output", "test" + assert_path_exists Pathname.pwd/"test" + end + end +end diff --git a/Formula/p/papilo.rb b/Formula/p/papilo.rb new file mode 100644 index 0000000000000..0f34ced63f85d --- /dev/null +++ b/Formula/p/papilo.rb @@ -0,0 +1,46 @@ +class Papilo < Formula + desc "Parallel Presolve for Integer and Linear Optimization" + homepage "https://www.scipopt.org" + url "https://github.com/scipopt/papilo/archive/refs/tags/v2.4.4.tar.gz" + sha256 "c3b137895e4fdc1e48f70b681b475936ef8a825dc60bf61532a2d2db6610cb94" + license all_of: ["LGPL-3.0-only", "GPL-3.0-only"] + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "da754d46c250c041cf12a60fdd1884d3992468dcede72a6415566696c1bca6e5" + sha256 cellar: :any, arm64_sequoia: "7777103edae9fff71e0ff26dc43982943679c839046c922b19fa7985e7a64a53" + sha256 cellar: :any, arm64_sonoma: "ddf9ab7f8febc4832debfbbfe7de9feed110a2e04c98309772fd025b2a1b3e85" + sha256 cellar: :any, sonoma: "95609e2035153a940f0e62fc4cf22dab6691875ac3954dc39167edea298d8117" + sha256 cellar: :any_skip_relocation, arm64_linux: "724e6d10cfea779ec91761dca3040febeb11519dd8c71a2281d97fc05aa1bde9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47394fd9bddd12b1170b3ccf46620c0a42e69af12bb3bf4aa28e95ba5a006591" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "gcc" + depends_on "gmp" + depends_on "openblas" + depends_on "tbb" + + def install + cmake_args = %w[ + -DBOOST=ON + -DGMP=ON + -DLUSOL=ON + -DQUADMATH=ON + -DTBB=ON + -DBLA_VENDOR=OpenBLAS + ] + + system "cmake", "-B", "papilo-build", "-S", ".", *cmake_args, *std_cmake_args + system "cmake", "--build", "papilo-build" + system "cmake", "--install", "papilo-build" + + pkgshare.install "test/instances/test.mps" + end + + test do + output = shell_output("#{bin}/papilo presolve -f #{pkgshare}/test.mps") + assert_match "presolving finished after", output + end +end diff --git a/Formula/p/paps.rb b/Formula/p/paps.rb new file mode 100644 index 0000000000000..bb6a72f365d48 --- /dev/null +++ b/Formula/p/paps.rb @@ -0,0 +1,59 @@ +class Paps < Formula + desc "Pango to PostScript converter" + homepage "https://github.com/dov/paps" + url "https://github.com/dov/paps/archive/refs/tags/v0.8.0.tar.gz" + sha256 "8fd8db04e6f8c5c164806d2c1b5fea6096daf583f83f06d1e4813ea61edc291f" + license "LGPL-2.0-or-later" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8d95f99591217a56718331ee68a6996b39f059ca4aecfe5d0921a11566d75735" + sha256 cellar: :any, arm64_sequoia: "b26fed1929f8d01dac18fb575c540f386006b2db8ce860288001f1424b3e6baa" + sha256 cellar: :any, arm64_sonoma: "e3679db03c165c79cdbb9a8ceac9fc0df4f3226622590452249e076e38ebe0ff" + sha256 cellar: :any, sonoma: "183b02cb1d125fa77ad0320bd003589aa346d9077d530ab85779916c41503547" + sha256 arm64_linux: "f8bff76dd84fc102e71509567f16a62036320efb8d3fb10240cee22ae5b70d19" + sha256 x86_64_linux: "cf456bd3c1d9da480517bda9f2bf04ca1545c409538e802caba1c11411329029" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "fmt" + depends_on "glib" + depends_on "pango" + + on_macos do + depends_on "gettext" + end + + # Apply open PR to fix build with recent `glib`. This restores behavior before + # https://gitlab.gnome.org/GNOME/glib/-/commit/c583162cc6d7078ff549c72615617092b0bc150a + # PR ref: https://github.com/dov/paps/pull/71 + patch do + url "https://github.com/dov/paps/commit/e6ec698be127822661e31f7fca7d2e0107944b24.patch?full_index=1" + sha256 "52848f9618dab9bc98c1554cc8a7a0b3ce419cfca53781b909d543ec4e4b27ea" + end + + # Fix compatibility with fmt 12. + # https://github.com/dov/paps/pull/77 + patch do + url "https://github.com/dov/paps/commit/a26a20d7ca3feb08476a8a19fd97c3ececcc1e2e.patch?full_index=1" + sha256 "604bc9e60b33162b522d18f251e3436745ca20b39a763202cfc7660423d9a9fe" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install "examples" + end + + test do + system bin/"paps", pkgshare/"examples/small-hello.utf8", "--encoding=UTF-8", "-o", "paps.ps" + assert_path_exists testpath/"paps.ps" + assert_match "%!PS-Adobe-3.0", (testpath/"paps.ps").read + end +end diff --git a/Formula/p/par.rb b/Formula/p/par.rb new file mode 100644 index 0000000000000..942f294451219 --- /dev/null +++ b/Formula/p/par.rb @@ -0,0 +1,44 @@ +class Par < Formula + desc "Paragraph reflow for email" + homepage "http://www.nicemice.net/par/" + url "http://www.nicemice.net/par/Par-1.53.0.tar.gz" + sha256 "c809c620eb82b589553ac54b9898c8da55196d262339d13c046f2be44ac47804" + # par.doc includes a custom license and alternatively allows usage under MIT license + license any_of: [:cannot_represent, "MIT"] + + livecheck do + url :homepage + regex(/href=.*?Par[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0978d3a9780b797f148de2ec8b9c904ddca7dc7ed60b51d3d98a902f82a25ec3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9ddecfb12a39ebdfba8f7b76364ad415565f182ab871210af61218645e5e438" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39ef4ab70ff5a020f370b7cc1d8c1c70c70e1ed252ac542a1eeda1140a2d8d0f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4bc0eb239a205ede7064bb04ce4430af97633910eb2daea94ea414e8c72f6d2d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f1fb39385e25724a3f37b3376bfa2a977a9b38fd951fbc92459e4d932f770f42" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "051cff1396509692262c0b1da0e923a2d00e00b2ab7d3bcfdd877c8acb76169f" + sha256 cellar: :any_skip_relocation, sonoma: "b21d6b36ab41d6586f4db99966ed207b05be23453f63c513cb649700658650c5" + sha256 cellar: :any_skip_relocation, ventura: "903d95c6efcc78e84ab33fbff492e320f0d02f451d4886b8d82d86d3e361b9cd" + sha256 cellar: :any_skip_relocation, monterey: "ea8a083d2e64d4f28515313b3d47ea7d63f6cc9b1b6cb60ddc88d7fd643e6265" + sha256 cellar: :any_skip_relocation, big_sur: "9af002ed591438fc64cf745df797fdd4c6138a847c6ffe650a8371ef6a2243fa" + sha256 cellar: :any_skip_relocation, catalina: "457e5ff8ba94268a745fc954f84cbbaab7ac7d3a239ca602107a85a2e5d146a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "01aa6981e7f7fed828872aa316d7598667d1393db76ddfcd6a89f49fcd0db75d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "236b24853fb3dab435d98266fd26a45f1d55653e8c032165b278e47c63c1789f" + end + + conflicts_with "rancid", because: "both install `par` binaries" + + def install + system "make", "-f", "protoMakefile" + bin.install "par" + man1.install Utils::Gzip.compress("par.1") + end + + test do + expected = "homebrew\nhomebrew\n" + assert_equal expected, pipe_output("#{bin}/par 10gqr", "homebrew homebrew") + end +end diff --git a/Formula/p/par2.rb b/Formula/p/par2.rb new file mode 100644 index 0000000000000..bd83f7ff2b3a9 --- /dev/null +++ b/Formula/p/par2.rb @@ -0,0 +1,57 @@ +class Par2 < Formula + desc "Parchive: Parity Archive Volume Set for data recovery" + homepage "https://github.com/Parchive/par2cmdline" + url "https://github.com/Parchive/par2cmdline/releases/download/v1.0.0/par2cmdline-1.0.0.tar.bz2" + sha256 "d4ecfd4b6a6fc28cd5b4685efdb6d305139c755d339313925f8728fab7a37cf2" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "da1851248ab9cdff094faae097c3cdca735b950851df191f6f8d4f48e17c483b" + sha256 cellar: :any, arm64_sequoia: "5ce70b25e1d26d887fca53fa5ab3269e0e94b8964420fb749ef9ecdb01ec3592" + sha256 cellar: :any, arm64_sonoma: "263b109002436476cd6f3f1ccf77b1fa7e10562706ba0e5b2dfa2af2538bed64" + sha256 cellar: :any, arm64_ventura: "c413a56ff51e2d96061ec8c346b9f38d0ef4a346e60636928609b1ca5e8ce222" + sha256 cellar: :any, sonoma: "40eb3c43af4903e8efcdf80dcbf04a864af1b6c5b7d0245d445a54ab525b1605" + sha256 cellar: :any, ventura: "cd9c7a11d331b367075ec3e767060e8edd71d14b7b56af42431c91d93b38809b" + sha256 cellar: :any_skip_relocation, arm64_linux: "769bdf5faa546f7ed7b00ac17108839238f549d9a1ec242d7eba95133aadac31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "699aeaca750dd16232b559e676146c57903adcf96a1cfdf194b19c496fcc22b2" + end + + on_macos do + depends_on "libomp" + end + + def install + if OS.mac? + libomp = Formula["libomp"] + ENV.append_to_cflags "-Xpreprocessor -fopenmp -I#{libomp.opt_include} -L#{libomp.opt_lib} -lomp" + end + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + # Protect a file with par2. + test_file = testpath/"some-file" + File.write(test_file, "file contents") + system bin/"par2", "create", test_file + + # "Corrupt" the file by overwriting, then ask par2 to repair it. + File.write(test_file, "corrupted contents") + repair_command_output = shell_output("#{bin}/par2 repair #{test_file}") + + # Verify that par2 claimed to repair the file. + assert_match "1 file(s) exist but are damaged.", repair_command_output + assert_match "Repair complete.", repair_command_output + + # Verify that par2 actually repaired the file. + assert File.read(test_file) == "file contents" + end +end diff --git a/Formula/p/parallel-disk-usage.rb b/Formula/p/parallel-disk-usage.rb new file mode 100644 index 0000000000000..9cac0ce56194e --- /dev/null +++ b/Formula/p/parallel-disk-usage.rb @@ -0,0 +1,43 @@ +class ParallelDiskUsage < Formula + desc "Highly parallelized, blazing fast directory tree analyzer" + homepage "https://github.com/KSXGitHub/parallel-disk-usage" + url "https://github.com/KSXGitHub/parallel-disk-usage/archive/refs/tags/0.21.1.tar.gz" + sha256 "738344d89d0e7208ae501f1a96babfa5bfddac13a925c0a6a7332d759a3e643b" + license "Apache-2.0" + head "https://github.com/KSXGitHub/parallel-disk-usage.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "087a9b44fb17f904a0e64a630d18731f378938a06c1d4e1db97c313ba2df0208" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ff8961cca5f1555d8e00546b937331b5195d1cdddd15146067534f444a630e11" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "52f6a3b9fb2cd8271f2bb0d62b08a0f997172591b2776147d6af15ee1bea2086" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34c0d90115cfb290f25cdecc1daab6cb57295d54891383ab404cac4fc61a9ccb" + sha256 cellar: :any_skip_relocation, sonoma: "9fa92ee454fc377cdd4e9b62c575a7662476f65c7cb931ef228b3881510e4950" + sha256 cellar: :any_skip_relocation, ventura: "9171d44725889e7c12744474a8a751fca879ca1f110ab00482007f6e983694e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "678ffd25de3bec4c4ecc1a0b6cbed1abaf106f45e4c51f0bdb1f5a13ba01c7c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7813849ca8a1207d5cea8be2fa5d8ec038ccab966a81efc39ec19c4a24cebdd" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--features", "cli,cli-completions", *std_cargo_args + + system bin/"pdu-completions", "--name", "pdu", "--shell", "bash", "--output", "pdu.bash" + system bin/"pdu-completions", "--name", "pdu", "--shell", "fish", "--output", "pdu.fish" + system bin/"pdu-completions", "--name", "pdu", "--shell", "zsh", "--output", "_pdu" + bash_completion.install "pdu.bash" => "pdu" + fish_completion.install "pdu.fish" + zsh_completion.install "_pdu" + + rm bin/"pdu-completions" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pdu --version") + + system bin/"pdu" + + (testpath/"test").write("test") + system bin/"pdu", testpath/"test" + end +end diff --git a/Formula/p/parallel-hashmap.rb b/Formula/p/parallel-hashmap.rb new file mode 100644 index 0000000000000..19485d9ac54a0 --- /dev/null +++ b/Formula/p/parallel-hashmap.rb @@ -0,0 +1,57 @@ +class ParallelHashmap < Formula + desc "Family of header-only, fast, memory-friendly C++ hashmap and btree containers" + homepage "https://greg7mdp.github.io/parallel-hashmap/" + url "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v2.0.0.tar.gz" + sha256 "4f462f51a3468166ea4cf87c80e001dc1999093264cf55cbda3492ca39a7730b" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/greg7mdp/parallel-hashmap.git", branch: "master" + + # Upstream switched from a version format like 1.37 to semantic versions like + # 1.3.8. We're working around this by checking the "latest" release on GitHub + # until there are newer versions higher than 1.37 (e.g. 1.38.0, 2.0.0). + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "caa4a19542de0e778d7cb13ab955da943a9fd970124ab0d578971b0afe1e7a91" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + using phmap::flat_hash_map; + + int main() { + flat_hash_map examples = + { + {"foo", "a"}, + {"bar", "b"} + }; + + for (const auto& n : examples) + std::cout << n.first << ":" << n.second << std::endl; + + examples["baz"] = "c"; + std::cout << "baz:" << examples["baz"] << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}" + assert_equal "foo:a\nbar:b\nbaz:c\n", shell_output("./test") + end +end diff --git a/Formula/p/parallel.rb b/Formula/p/parallel.rb new file mode 100644 index 0000000000000..a8f792b3e1670 --- /dev/null +++ b/Formula/p/parallel.rb @@ -0,0 +1,42 @@ +class Parallel < Formula + desc "Shell command parallelization utility" + homepage "https://savannah.gnu.org/projects/parallel/" + url "https://ftpmirror.gnu.org/gnu/parallel/parallel-20251022.tar.bz2" + mirror "https://ftp.gnu.org/gnu/parallel/parallel-20251022.tar.bz2" + sha256 "474326d59688d2fc078cf89a7b0b4a11cc9684229b3fa0158fe8bc03f1b69ee1" + license "GPL-3.0-or-later" + version_scheme 1 + head "https://git.savannah.gnu.org/git/parallel.git", branch: "master" + + livecheck do + url :homepage + regex(/GNU Parallel v?(\d{6,8}).*? released/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "aad3770d3a079140abd0f2db8842228efb9b10297b16486119648d7e50630c58" + end + + conflicts_with "moreutils", because: "both install a `parallel` executable" + + def install + ENV.append_path "PATH", bin + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + bash_completion.install share/"bash-completion/completions/parallel" + end + + def caveats + <<~EOS + To use the --csv option, the Perl Text::CSV module has to be installed. + You can install it via: + perl -MCPAN -e'install Text::CSV' + EOS + end + + test do + assert_equal "test\ntest\n", + shell_output("#{bin}/parallel --will-cite echo ::: test test") + end +end diff --git a/Formula/p/parca.rb b/Formula/p/parca.rb new file mode 100644 index 0000000000000..102f214405b7c --- /dev/null +++ b/Formula/p/parca.rb @@ -0,0 +1,52 @@ +class Parca < Formula + desc "Continuous profiling for analysis of CPU and memory usage" + homepage "https://www.parca.dev/" + url "https://github.com/parca-dev/parca/archive/refs/tags/v0.24.2.tar.gz" + sha256 "5f8485d622bfb052a893beec796083d9238595c501eff20508928ac44712881d" + license "Apache-2.0" + head "https://github.com/parca-dev/parca.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b3d6c3b49e0d76dfb28ab6478cc79546fd02987d1f8dc3c1425c8b221d37df8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8dfb07487e2874a72ca29a1eb3ed85e1a7981c560c91119b303e4be05f554a0b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05f27047351b0582c6f5fb772250541eea7aefe83c356c338ceabf5368ac36f6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16ada657b4d2f78fc3315be1739a7d6ac5172c6c5c56be65c53af0014d086397" + sha256 cellar: :any_skip_relocation, sonoma: "a1fac35e98d19d1922d942b2801dd6e33872a2162a2a9845eb45b4649359896c" + sha256 cellar: :any_skip_relocation, ventura: "0e0dc6dde558aa5baa521c5182d92dbe359afbaf407db05b16811bb7b52e2bbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1acb66f37865f541f85b61efd4d934a4bfb385c130f93c996be9bdfcdf7c08d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "243125d3d4e13b662a1439f2d9f0a0a482788bc6890645f6a2a24f3076a578f9" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "pnpm" => :build + + def install + system "pnpm", "--dir", "ui", "install" + system "pnpm", "--dir", "ui", "run", "build" + + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/parca" + end + + test do + assert_match version.to_s, shell_output("#{bin}/parca --version") + + # server config, https://raw.githubusercontent.com/parca-dev/parca/cbfa19e032ee51fccd6ca9a5842129faeb27c106/parca.yaml + (testpath/"parca.yaml").write <<~YAML + object_storage: + bucket: + type: "FILESYSTEM" + config: + directory: "./data" + YAML + + output_log = testpath/"output.log" + pid = spawn bin/"parca", "--config-path=parca.yaml", [:out, :err] => output_log.to_s + sleep 1 + assert_match "starting server", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/p/pari-elldata.rb b/Formula/p/pari-elldata.rb new file mode 100644 index 0000000000000..f03a1de1b2afa --- /dev/null +++ b/Formula/p/pari-elldata.rb @@ -0,0 +1,40 @@ +class PariElldata < Formula + desc "J.E. Cremona elliptic curve data for PARI/GP" + homepage "https://pari.math.u-bordeaux.fr/packages.html" + url "https://pari.math.u-bordeaux.fr/pub/pari/packages/elldata.tgz" + # Refer to https://pari.math.u-bordeaux.fr/packages.html#packages for most recent package date + version "20210301" + sha256 "dd551e64932d4ab27b3f2b2d1da871c2353672fc1a74705c52e3c0de84bd0cf6" + license "GPL-2.0-or-later" + + # The only difference in the `livecheck` blocks for pari-* formulae is the + # package name in the regex and they should otherwise be kept in parity. + livecheck do + url :homepage + regex(%r{>\s*elldata\.t[^<]+?(?:[&(.;\s\w]+?(?:\),?|,))?\s*([a-z]+\s+\d{1,2},?\s+\d{4})\D}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "5bb7d32ce0c2deef2a58ffecd2781fa23f718a90aff73ceb6e94a3169c71d006" + end + + depends_on "pari" + + def install + (share/"pari/elldata").install Utils::Gzip.compress(*Dir["#{buildpath}/elldata/ell*"]) + doc.install "elldata/README" + end + + test do + expected_output = "[0, -1, 1, -10, -20, -4, -20, -79, -21, 496, 20008, -161051, -122023936/161051, " \ + "Vecsmall([1]), [Vecsmall([128, -1])], [0, 0, 0, 0, 0, 0, 0, 0]]" + output = pipe_output(Formula["pari"].opt_bin/"gp -q", "ellinit(\"11a1\")").chomp + assert_equal expected_output, output + end +end diff --git a/Formula/p/pari-galdata.rb b/Formula/p/pari-galdata.rb new file mode 100644 index 0000000000000..1894631f0bf6c --- /dev/null +++ b/Formula/p/pari-galdata.rb @@ -0,0 +1,38 @@ +class PariGaldata < Formula + desc "Galois resolvents data for PARI/GP" + homepage "https://pari.math.u-bordeaux.fr/packages.html" + url "https://pari.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz" + # Refer to https://pari.math.u-bordeaux.fr/packages.html#packages for most recent package date + version "20080411" + sha256 "b7c1650099b24a20bdade47a85a928351c586287f0d4c73933313873e63290dd" + license "GPL-2.0-or-later" + + # The only difference in the `livecheck` blocks for pari-* formulae is the + # package name in the regex and they should otherwise be kept in parity. + livecheck do + url :homepage + regex(%r{>\s*galdata\.t[^<]+?(?:[&(.;\s\w]+?(?:\),?|,))?\s*([a-z]+\s+\d{1,2},?\s+\d{4})\D}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "736af19f4079ffbca94f96cc0b4c7d8c325995ccc0c01cef244240d61758b02f" + end + + depends_on "pari" + + def install + (share/"pari/galdata").install Utils::Gzip.compress(*Dir["#{buildpath}/galdata/*"]) + end + + test do + expected_output = "[16, -1, 8, \"2D_8(8)=[D(4)]2\"]" + output = pipe_output(Formula["pari"].opt_bin/"gp -q", "polgalois(x^8-2)").chomp + assert_equal expected_output, output + end +end diff --git a/Formula/p/pari-galpol.rb b/Formula/p/pari-galpol.rb new file mode 100644 index 0000000000000..6be2e035d76a9 --- /dev/null +++ b/Formula/p/pari-galpol.rb @@ -0,0 +1,42 @@ +class PariGalpol < Formula + desc "Galois polynomial database for PARI/GP" + homepage "https://pari.math.u-bordeaux.fr/packages.html" + url "https://pari.math.u-bordeaux.fr/pub/pari/packages/galpol.tgz" + # Refer to https://pari.math.u-bordeaux.fr/packages.html#packages for most recent package date + version "20180625" + sha256 "562af28316ee335ee38c1172c2d5ecccb79f55c368fb9f2c6f40fc0f416bb01b" + license "GPL-2.0-or-later" + + # The only difference in the `livecheck` blocks for pari-* formulae is the + # package name in the regex and they should otherwise be kept in parity. + livecheck do + url :homepage + regex(%r{>\s*galpol\.t[^<]+?(?:[&(.;\s\w]+?(?:\),?|,))?\s*([a-z]+\s+\d{1,2},?\s+\d{4})\D}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "e025e273d014cf89f901fd09c2fc60bf7d1e48650f930d6072bc33330e5ced97" + end + + depends_on "pari" + + def install + Dir.glob("galpol/*/**/*").each do |path| + Utils::Gzip.compress(path) unless File.directory?(path) + end + + (share/"pari/galpol").install Dir["galpol/*/"] + doc.install "galpol/README" + end + + test do + assert_equal "5", pipe_output(Formula["pari"].opt_bin/"gp -q", "galoisgetpol(8)").chomp + assert_equal "\"C3 : C4\"", pipe_output(Formula["pari"].opt_bin/"gp -q", "galoisgetname(12,1)").chomp + end +end diff --git a/Formula/p/pari-nflistdata.rb b/Formula/p/pari-nflistdata.rb new file mode 100644 index 0000000000000..b0e389907c040 --- /dev/null +++ b/Formula/p/pari-nflistdata.rb @@ -0,0 +1,51 @@ +class PariNflistdata < Formula + desc "Data files for nflist() in PARI/GP" + homepage "https://pari.math.u-bordeaux.fr/packages.html" + url "https://pari.math.u-bordeaux.fr/pub/pari/packages/nflistdata.tgz" + version "20220729" + sha256 "2c19a3e02afd3bba2af3071a7faa80924a75b00bb9713286c886b7fb460944bc" + license "GPL-2.0-or-later" + + # The only difference in the `livecheck` blocks for pari-* formulae is the + # package name in the regex and they should otherwise be kept in parity. + livecheck do + url :homepage + regex(%r{>\s*nflistdata\.t[^<]+?(?:[&(.;\s\w]+?(?:\),?|,))?\s*([a-z]+\s+\d{1,2},?\s+\d{4})\D}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "52f37e4b207b7497e4c44d4bc8af0cd6126fa91e12cd4381dbd367eaac5daad5" + end + + depends_on "pari" + + def install + Dir.glob("nflistdata/*/**/*").each do |path| + Utils::Gzip.compress(path) unless File.directory?(path) + end + + (share/"pari/nflistdata").install Dir["nflistdata/*/"] + doc.install "nflistdata/README" + end + + test do + expected_output = "[x^5 - x^4 + 2*x^2 - 2*x + 2, " \ + "x^5 - x^4 + x^3 + 2*x^2 + x - 1, " \ + "x^5 - 2*x^3 - 2*x^2 + 3*x + 2, " \ + "x^5 - 2*x^4 - x^3 + 3*x^2 - x + 2, " \ + "x^5 - 2*x^4 + 6*x^3 - 8*x^2 + 10*x - 8, " \ + "x^5 - x^4 + 3*x^3 - 4*x^2 + 5*x - 1, " \ + "x^5 - 2*x^3 - 4*x^2 - 6*x - 4, " \ + "x^5 - 2*x^4 + x^2 + 4*x - 5, " \ + "x^5 - x^4 + 3*x^3 - 3*x^2 + 5*x - 1, " \ + "x^5 - 2*x^4 + x^3 - 5*x^2 + x - 2]" + output = pipe_output(Formula["pari"].opt_bin/"gp -q", "nflist(\"A5\")").chomp + assert_equal expected_output, output + end +end diff --git a/Formula/p/pari-seadata-big.rb b/Formula/p/pari-seadata-big.rb new file mode 100644 index 0000000000000..3edb7e9da6826 --- /dev/null +++ b/Formula/p/pari-seadata-big.rb @@ -0,0 +1,40 @@ +class PariSeadataBig < Formula + desc "Additional modular polynomial data for PARI/GP" + homepage "https://pari.math.u-bordeaux.fr/packages.html" + url "https://pari.math.u-bordeaux.fr/pub/pari/packages/seadata-big.tar" + # Refer to https://pari.math.u-bordeaux.fr/packages.html#packages for most recent package date + version "20170418" + sha256 "7c4db2624808a5bbd2ba00f8b644a439f0508532efd680a247610fdd5822a5f2" + license "GPL-2.0-or-later" + + # The only difference in the `livecheck` blocks for pari-* formulae is the + # package name in the regex and they should otherwise be kept in parity. + livecheck do + url :homepage + regex(%r{>\s*seadata-big\.t[^<]+?(?:[&(.;\s\w]+?(?:\),?|,))?\s*([a-z]+\s+\d{1,2},?\s+\d{4})\D}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d2610054b7d6eb25f170e25a782db3f92ca8c0b252022b8486765b408b376a7c" + end + + depends_on "pari" + depends_on "pari-seadata" + + def install + (share/"pari/seadata").install Dir["#{buildpath}/seadata/sea*"] + doc.install "seadata/README.big" => "README" + end + + test do + term = "-812742150726123010437180630597083*y^19" + output = pipe_output(Formula["pari"].opt_bin/"gp -q", "ellmodulareqn(503)").chomp + assert_match term, output + end +end diff --git a/Formula/p/pari-seadata.rb b/Formula/p/pari-seadata.rb new file mode 100644 index 0000000000000..f2ccbffbbe535 --- /dev/null +++ b/Formula/p/pari-seadata.rb @@ -0,0 +1,39 @@ +class PariSeadata < Formula + desc "Modular polynomial data for PARI/GP" + homepage "https://pari.math.u-bordeaux.fr/packages.html" + url "https://pari.math.u-bordeaux.fr/pub/pari/packages/seadata.tgz" + # Refer to https://pari.math.u-bordeaux.fr/packages.html#packages for most recent package date + version "20090618" + sha256 "c9282a525ea3f92c1f9c6c69e37ac5a87b48fb9ccd943cfd7c881a3851195833" + license "GPL-2.0-or-later" + + # The only difference in the `livecheck` blocks for pari-* formulae is the + # package name in the regex and they should otherwise be kept in parity. + livecheck do + url :homepage + regex(%r{>\s*seadata\.t[^<]+?(?:[&(.;\s\w]+?(?:\),?|,))?\s*([a-z]+\s+\d{1,2},?\s+\d{4})\D}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "0f28d380244a13252dc4f568bd5dcd762144b24468617441feaa7cb687b7ff3f" + end + + depends_on "pari" + + def install + (share/"pari/seadata").install Utils::Gzip.compress(*Dir["#{buildpath}/seadata/sea*"]) + doc.install "seadata/README" + end + + test do + expected_output = "[x^4 + 36*x^3 + 270*x^2 + (-y + 756)*x + 729, 0]" + output = pipe_output(Formula["pari"].opt_bin/"gp -q", "ellmodulareqn(3)").chomp + assert_equal expected_output, output + end +end diff --git a/Formula/p/pari.rb b/Formula/p/pari.rb new file mode 100644 index 0000000000000..0b108d898fe0a --- /dev/null +++ b/Formula/p/pari.rb @@ -0,0 +1,73 @@ +class Pari < Formula + desc "Computer algebra system designed for fast computations in number theory" + homepage "https://pari.math.u-bordeaux.fr/" + url "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-2.17.2.tar.gz" + sha256 "7d30578f5cf97b137a281f4548d131aafc0cde86bcfd10cc1e1bd72a81e65061" + license "GPL-2.0-or-later" + + livecheck do + url "https://pari.math.u-bordeaux.fr/pub/pari/unix/" + regex(/href=.*?pari[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "54e59de5b05e4490b9f15f0fdbe513045c65b75f7fdbc2350a0736c476360efc" + sha256 arm64_sequoia: "5dd598ddd07c409257bad75db3c20f0da0509c07b3be0e0a4248535457594a51" + sha256 arm64_sonoma: "bf58c1bdf22c69cf679423fa396efc69996edb7567bd30811e65fccb20816558" + sha256 arm64_ventura: "0739c7e681b5776a48634fea706d860b950f28b3020ae9f7ce830121f6208e7f" + sha256 cellar: :any, sonoma: "ddddbc46872cd877dc6d2bb383ec2c796a726c84b952a0a648220d98cfb00165" + sha256 cellar: :any, ventura: "325077871981fd84776c2cb9119b402bf5fd4ba865615e99cfeb8814b10eec08" + sha256 arm64_linux: "2bb804bf036de998864490817c533f1b5f1da685365c28a1bd66c4d92a17eb7a" + sha256 x86_64_linux: "045451f669359b20630a47b6b9fb2da2d2ad7ee2442965ddefb8efc7e67f776d" + end + + depends_on "gmp" + depends_on "readline" + + def install + # Work around for optimization bug causing corrupted last_tmp_file + # Ref: https://github.com/Homebrew/homebrew-core/issues/207722 + # Ref: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2608 + ENV.O1 if ENV.compiler == :clang + + readline = Formula["readline"].opt_prefix + gmp = Formula["gmp"].opt_prefix + system "./Configure", "--prefix=#{prefix}", + "--with-gmp=#{gmp}", + "--with-readline=#{readline}", + "--graphic=ps", + "--mt=pthread" + + # Explicitly set datadir to HOMEBREW_PREFIX/share/pari to allow for external packages to be found + # We do this here rather than in configure because we still want the actual files to be installed to the Cellar + objdir = Utils.safe_popen_read("./config/objdir").chomp + inreplace %W[#{objdir}/pari.cfg #{objdir}/paricfg.h], pkgshare, "#{HOMEBREW_PREFIX}/share/pari" + + # make needs to be done in two steps + system "make", "all" + system "make", "install" + + # Avoid references to Homebrew shims + inreplace lib/"pari/pari.cfg", Superenv.shims_path, "/usr/bin" + end + + def caveats + <<~EOS + If you need the graphical plotting functions you need to install X11 with: + brew install --cask xquartz + EOS + end + + test do + (testpath/"math.tex").write "$k_{n+1} = n^2 + k_n^2 - k_{n-1}$" + system bin/"tex2mail", testpath/"math.tex" + + (testpath/"test.gp").write <<~GP + default(parisize,"1G"); + default(realprecision,10); + dist(a,b) = sqrt(a^2+b^2); + print(dist(1,2)); + GP + assert_equal "2.236067977\n", pipe_output("#{bin}/gp --quiet test.gp", "", 0) + end +end diff --git a/Formula/p/parlay.rb b/Formula/p/parlay.rb new file mode 100644 index 0000000000000..0e30d33e121cb --- /dev/null +++ b/Formula/p/parlay.rb @@ -0,0 +1,66 @@ +class Parlay < Formula + desc "Enrich SBOMs with data from third party services" + homepage "https://github.com/snyk/parlay" + url "https://github.com/snyk/parlay/archive/refs/tags/v0.9.0.tar.gz" + sha256 "b06ae57019144bdec330747dc2593bf07976acab06990682731205a8ce819a72" + license "Apache-2.0" + head "https://github.com/snyk/parlay.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "96dbbf77cb5449ad774bcbcc89b834ba15e49298af96ff0634fa6624b3a2a0dd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9068e1250bb228d85ba7aded90418b57b27dab63a8d68cedf760d281b2f4c31d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9068e1250bb228d85ba7aded90418b57b27dab63a8d68cedf760d281b2f4c31d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9068e1250bb228d85ba7aded90418b57b27dab63a8d68cedf760d281b2f4c31d" + sha256 cellar: :any_skip_relocation, sonoma: "ae13e29edb7eb752c6588b2fec0a0fb3881d56e1f44b2d711d71923d44641cf3" + sha256 cellar: :any_skip_relocation, ventura: "ae13e29edb7eb752c6588b2fec0a0fb3881d56e1f44b2d711d71923d44641cf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "a61328e36579dbc0e2128d755821cf20f0a36f28e7ec065d969c4794c4430cbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0bd178923029b114ce65a76c9880b2c7c137fb8e2a125f103f61f9a8b280d45" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/snyk/parlay/internal/commands.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/parlay --version") + + # test sbom data from https://github.com/snyk/parlay/blob/main/README.md?plain=1#L82 + (testpath/"sbom.spdx.json").write <<~JSON + { + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "Example SPDX Document", + "documentNamespace": "https://spdx.org/spdxdocs/example-spdx-document", + "packages": [ + { + "name": "concat-map", + "SPDXID": "SPDXRef-7-concat-map-0.0.1", + "versionInfo": "0.0.1", + "downloadLocation": "NOASSERTION", + "copyrightText": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/concat-map@0.0.1" + } + ] + } + ] + } + JSON + + # enrich the SBOM with ecosyste.ms data + enriched_output = shell_output("#{bin}/parlay ecosystems enrich sbom.spdx.json") + enriched_json = JSON.parse(enriched_output) + + package = enriched_json["packages"].first + assert_equal "https://github.com/ljharb/concat-map#readme", package["homepage"] + assert_equal "MIT", package["licenseConcluded"] + assert_equal "concatenative mapdashery", package["description"] + end +end diff --git a/Formula/p/parliament.rb b/Formula/p/parliament.rb new file mode 100644 index 0000000000000..8f5da15aea18c --- /dev/null +++ b/Formula/p/parliament.rb @@ -0,0 +1,92 @@ +class Parliament < Formula + include Language::Python::Virtualenv + + desc "AWS IAM linting library" + homepage "https://github.com/duo-labs/parliament" + url "https://files.pythonhosted.org/packages/a6/12/92bbf5db0eac6d901ccca51f001b64a4a57f8b06d7189147cd3c9ee570ce/parliament-1.6.4.tar.gz" + sha256 "ea6b930de2afd2f1591d5624b56b8c9361e746c76ce50a9586cab209054dfa4c" + license "BSD-3-Clause" + revision 1 + head "https://github.com/duo-labs/parliament.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "fc29a080c27b4588721f218b164b754155961e695684734456911ff396498db3" + sha256 cellar: :any, arm64_sequoia: "aa9a5c63d757b9dec9c66cd5e6ac510a37023af7a00ab00b1ed1c47ed6cfd8ae" + sha256 cellar: :any, arm64_sonoma: "b2771a87956e8eb36297723eef81979ff6346d2b2c10ad022d2c618bf49812e4" + sha256 cellar: :any, sonoma: "32a5fdcf10a1467bf8599066c9570ae044c8def5f8b1ddc8c0cc286354164b8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca9cab62e9b64a56c64faaa2d29c0a6956742bed068ecf9cdfbd6cae05c3f19d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f35fc18cc52fff067aef688ddbceeb16a83e9caa2af7068471012fa636f30a19" + end + + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "setuptools" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "json-cfg" do + url "https://files.pythonhosted.org/packages/70/d8/34e37fb051be7c3b143bdb3cc5827cb52e60ee1014f4f18a190bb0237759/json-cfg-0.4.2.tar.gz" + sha256 "d3dd1ab30b16a3bb249b6eb35fcc42198f9656f33127e36a3fadb5e37f50d45b" + end + + resource "kwonly-args" do + url "https://files.pythonhosted.org/packages/ee/da/a7ba4f2153a536a895a9d29a222ee0f138d617862f9b982bd4ae33714308/kwonly-args-1.0.10.tar.gz" + sha256 "59c85e1fa626c0ead5438b64f10b53dda2459e0042ea24258c9dc2115979a598" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "MEDIUM - No resources match for the given action - - [{'action': 's3:GetObject', " \ + "'required_format': 'arn:*:s3:::*/*'}] - {'line': 1, 'column': 40, 'filepath': None}", + pipe_output("#{bin}/parliament --string '{\"Version\": \"2012-10-17\", \"Statement\": {\"Effect\": \"Allow\", " \ + "\"Action\": \"s3:GetObject\", \"Resource\": \"arn:aws:s3:::secretbucket\"}}'").strip + end +end diff --git a/Formula/p/parquet-cli.rb b/Formula/p/parquet-cli.rb new file mode 100644 index 0000000000000..c1e2c2e6d728f --- /dev/null +++ b/Formula/p/parquet-cli.rb @@ -0,0 +1,61 @@ +class ParquetCli < Formula + desc "Apache Parquet command-line tools and utilities" + homepage "https://parquet.apache.org/" + url "https://github.com/apache/parquet-java/archive/refs/tags/apache-parquet-1.16.0.tar.gz" + sha256 "32b786e5304d9047d4dc29b5fd70460310c266f5d5579f0ad962d1aedbb07d5c" + license "Apache-2.0" + head "https://github.com/apache/parquet-mr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2d57f7e9f8e3bbc6fe937e8beafbcbd8d717622bd723dc654b0e28a8f634660d" + end + + depends_on "maven" => :build + # Try switching back to `openjdk` when the issue below is resolved and + # Hadoop dependency is updated to include the fix/workaround. + # https://issues.apache.org/jira/browse/HADOOP-19212 + depends_on "openjdk@21" + + def install + cd "parquet-cli" do + system "mvn", "clean", "package", "-DskipTests=true" + system "mvn", "dependency:copy-dependencies" + libexec.install "target/parquet-cli-#{version}.jar" + libexec.install Dir["target/dependency/*"] + (bin/"parquet").write <<~EOS + #!/bin/sh + set -e + exec "#{Formula["openjdk@21"].opt_bin}/java" -cp "#{libexec}/*" org.apache.parquet.cli.Main "$@" + EOS + end + + (pkgshare/"test").install "parquet-avro/src/test/avro/stringBehavior.avsc" + (pkgshare/"test").install "parquet-avro/src/test/resources/strings-2.parquet" + end + + test do + output = shell_output("#{bin}/parquet schema #{pkgshare}/test/stringBehavior.avsc") + assert_match <<~EOS, output + { + "type" : "record", + "name" : "StringBehaviorTest", + "namespace" : "org.apache.parquet.avro", + "fields" : [ { + "name" : "default_class", + "type" : "string" + }, { + EOS + + output = shell_output("#{bin}/parquet schema #{pkgshare}/test/strings-2.parquet") + assert_match <<~EOS, output + { + "type" : "record", + "name" : "mystring", + "fields" : [ { + "name" : "text", + "type" : "string" + } ] + } + EOS + end +end diff --git a/Formula/p/parrot.rb b/Formula/p/parrot.rb new file mode 100644 index 0000000000000..15fe30673dc72 --- /dev/null +++ b/Formula/p/parrot.rb @@ -0,0 +1,91 @@ +class Parrot < Formula + desc "Open source virtual machine (for Perl6, et al.)" + homepage "http://www.parrot.org/" + license "Artistic-2.0" + head "https://github.com/parrot/parrot.git", branch: "master" + + stable do + url "http://ftp.parrot.org/releases/supported/8.1.0/parrot-8.1.0.tar.bz2" + mirror "https://ftp.osuosl.org/pub/parrot/releases/supported/8.1.0/parrot-8.1.0.tar.bz2" + sha256 "caf356acab64f4ea50595a846808e81d0be8ada8267afbbeb66ddb3c93cb81d3" + + # remove at 8.2.0, already in HEAD + patch do + url "https://github.com/parrot/parrot/commit/7524bf5384ddebbb3ba06a040f8acf972aa0a3ba.patch?full_index=1" + sha256 "1357090247b856416b23792a2859ae4860ed1336b05dddc1ee00793b6dc3d78a" + end + + # remove at 8.2.0, already in HEAD + patch do + url "https://github.com/parrot/parrot/commit/854aec65d6de8eaf5282995ab92100a2446f0cde.patch?full_index=1" + sha256 "4e068c3a9243f350a3e862991a1042a06a03a625361f9f01cc445a31df906c6e" + end + end + + bottle do + sha256 arm64_tahoe: "df2fd855932ffb8d6ca5866f4e38864989636aa69133bc8108987f1bf52c02ca" + sha256 arm64_sequoia: "a51d427d1063c4e9a7bf13f9039a29fb6f9f690cfc751e6d100376435cd3c3ad" + sha256 arm64_sonoma: "33247f7453684d5af68220cb3aa6590adaeadeb6f4f45fe51e3e4584502e9b33" + sha256 arm64_ventura: "8d4542d74d3269cd5f1f8a096a8a6efb53b2300a22c1e0604c379da3499216b2" + sha256 arm64_monterey: "91f7d2f17e362ea66be0f7706414a1241d5af6f8bce0c7054c1e0ef1ba39bad5" + sha256 arm64_big_sur: "d8a39b997791e6fc739322075c52ae288072b787d5f3f401b1040a6548649f63" + sha256 sonoma: "7ac793b0199ecfb12581ab18da0a014086c9c28cee8395ab6f200baa039c3aaf" + sha256 ventura: "e944d6d98ab02b17d2f563c434c85bdb72a9a2e831608c3f128ee155ebc15398" + sha256 monterey: "3790147bc1c0b294ef50417051b83abfe745149f4a102b8f0ba0ae25b8dea99f" + sha256 big_sur: "6953bdfac9ada389705bb8368d2223bb2e22640802a6e643446e018c16024e06" + sha256 catalina: "5ffc3252e0454d3d69689e8fa260011079d5684d568f5bb4a5d7d3f60368414f" + sha256 arm64_linux: "840cf36f41c1737e76b81b2964b844ea15554ce31d6e7513750facd69eff5d6b" + sha256 x86_64_linux: "26b301714008aa6c10ecd25b10d01bf361ed4772b90af0a9d50936d2108f9013" + end + + # https://github.com/parrot/parrot/commit/f89a111c06ad0367817c52fda6ff5c24165c005b + deprecate! date: "2025-01-09", because: :unmaintained + + uses_from_macos "perl" => :build + uses_from_macos "zlib" + + conflicts_with "rakudo-star" + + resource "Pod::Parser" do + on_system :linux, macos: :sonoma_or_newer do + url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.67.tar.gz" + sha256 "5deccbf55d750ce65588cd211c1a03fa1ef3aaa15d1ac2b8d85383a42c1427ea" + end + end + + def install + if OS.linux? || MacOS.version >= :sonoma + ENV.prepend_create_path "PERL5LIB", buildpath/"build_deps/lib/perl5" + resource("Pod::Parser").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}/build_deps" + system "make", "install" + end + end + + system "perl", "Configure.pl", "--prefix=#{prefix}", + "--mandir=#{man}", + "--debugging=0", + "--cc=#{ENV.cc}" + + system "make" + system "make", "install" + # Don't install this file in HOMEBREW_PREFIX/lib + rm_r(lib/"VERSION") + end + + test do + path = testpath/"test.pir" + path.write <<~PARROT + .sub _main + .local int i + i = 0 + loop: + print i + inc i + if i < 10 goto loop + .end + PARROT + + assert_equal "0123456789", shell_output("#{bin}/parrot #{path}") + end +end diff --git a/Formula/p/parsedmarc.rb b/Formula/p/parsedmarc.rb new file mode 100644 index 0000000000000..8b54b9663b54d --- /dev/null +++ b/Formula/p/parsedmarc.rb @@ -0,0 +1,380 @@ +class Parsedmarc < Formula + include Language::Python::Virtualenv + + desc "DMARC report analyzer and visualizer" + homepage "https://domainaware.github.io/parsedmarc/" + url "https://files.pythonhosted.org/packages/64/7c/4af02563cba88551f6dc3d028eae195f411699554f5cf1ac544a6d86ff05/parsedmarc-8.18.7.tar.gz" + sha256 "9906552d9ea39e51f3fc2f529b1c2b82a955d91e2153202efde27696711660ca" + license "Apache-2.0" + head "https://github.com/domainaware/parsedmarc.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "154c217e016b33a170b71826b48be487518aa765cbc538034e05b4c48847e3db" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c86d4ab21be4e147536023ce71988581fcbd30a3bc58da941d361c4fb2ab9ef3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33e831c1af38da5503cf11cf9142a5dd6a25f9549a7f0aa378237c8d4b6e587e" + sha256 cellar: :any_skip_relocation, sonoma: "31341ce3a0d0055dfa193b72e2e09f533b0e2e37d5ce077c3c3f2b5ba1363c46" + sha256 cellar: :any_skip_relocation, arm64_linux: "60abd1cd5d14a5ff51d5e21e05b9df23ee5ca7512bbc038200fcbeeee7a613e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5713de213deeb32872ecb04c30757de47a2882d70c414470b766b0c42533a76b" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/15/6b/2653adc0f33adba8f11b1903701e6b1c10d34ce5d8e25dfa13a422f832b0/azure_core-1.35.1.tar.gz" + sha256 "435d05d6df0fff2f73fb3c15493bb4721ede14203f1ff1382aa6b6b2bdd7e562" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/06/8d/1a6c41c28a37eab26dc85ab6c86992c700cd3f4a597d9ed174b0e9c69489/azure_identity-1.25.1.tar.gz" + sha256 "87ca8328883de6036443e1c37b40e8dc8fb74898240f61071e09d2e369361456" + end + + resource "azure-monitor-ingestion" do + url "https://files.pythonhosted.org/packages/71/a9/71d9da3ab13db73e3d4f344f9e4a06bc220d7fe7de8f96264d36ae2189d1/azure_monitor_ingestion-1.1.0.tar.gz" + sha256 "97afee780d9ae3069128cde77027d4cc62fa824fe64d5bac880ac4a64b0a0c4e" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "dateparser" do + url "https://files.pythonhosted.org/packages/a9/30/064144f0df1749e7bb5faaa7f52b007d7c2d08ec08fed8411aba87207f68/dateparser-1.2.2.tar.gz" + sha256 "986316f17cb8cdc23ea8ce563027c5ef12fc725b6fb1d137c14ca08777c5ecf7" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "elasticsearch" do + url "https://files.pythonhosted.org/packages/06/50/220b2d903eccaf6065b4d2d546c06d216e3c8eabcb8d9cd56af691cb712b/elasticsearch-7.13.4.tar.gz" + sha256 "52dda85f76eeb85ec873bf9ffe0ba6849e544e591f66d4048a5e48016de268e0" + end + + resource "elasticsearch-dsl" do + url "https://files.pythonhosted.org/packages/ea/a1/86b304895d346eb5d4c51584f7d3f02ba91131efbe2545e867b62275976b/elasticsearch-dsl-7.4.0.tar.gz" + sha256 "c4a7b93882918a413b63bed54018a1685d7410ffd8facbc860ee7fd57f214a6d" + end + + resource "events" do + url "https://files.pythonhosted.org/packages/25/ed/e47dec0626edd468c84c04d97769e7ab4ea6457b7f54dcb3f72b17fcd876/Events-0.5-py3-none-any.whl" + sha256 "a7286af378ba3e46640ac9825156c93bdba7502174dd696090fdfcd4d80a1abd" + end + + resource "expiringdict" do + url "https://files.pythonhosted.org/packages/fc/62/c2af4ebce24c379b949de69d49e3ba97c7e9c9775dc74d18307afa8618b7/expiringdict-1.2.2.tar.gz" + sha256 "300fb92a7e98f15b05cf9a856c1415b3bc4f2e132be07daa326da6414c23ee09" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "geoip2" do + url "https://files.pythonhosted.org/packages/0f/5f/902835f485d1c423aca9097a0e91925d6a706049f64e678ec781b168734d/geoip2-5.1.0.tar.gz" + sha256 "ee3f87f0ce9325eb6484fe18cbd9771a03d0a2bad1dd156fa3584fafa562d39a" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/32/ea/e7b6ac3c7b557b728c2d0181010548cbbdd338e9002513420c5a354fa8df/google_api_core-2.26.0.tar.gz" + sha256 "e6e6d78bd6cf757f4aee41dcc85b07f485fbb069d5daa3afb126defba1e91a62" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/7c/30/8b3a626ccf84ca43da62d77e2d40d70bedc6387951cc5104011cddce34e0/google_api_python_client-2.184.0.tar.gz" + sha256 "ef2a3330ad058cdfc8a558d199c051c3356f6ed012436c3ad3d08b67891b039f" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "google-auth-oauthlib" do + url "https://files.pythonhosted.org/packages/fb/87/e10bf24f7bcffc1421b84d6f9c3377c30ec305d082cd737ddaa6d8f77f7c/google_auth_oauthlib-1.2.2.tar.gz" + sha256 "11046fb8d3348b296302dd939ace8af0a724042e8029c1b872d87fabc9f41684" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz" + sha256 "0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257" + end + + resource "html2text" do + url "https://files.pythonhosted.org/packages/f8/27/e158d86ba1e82967cc2f790b0cb02030d4a8bef58e0c79a8590e9678107f/html2text-2025.4.15.tar.gz" + sha256 "948a645f8f0bc3abe7fd587019a2197a12436cd73d0d4908af95bfc8da337588" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "imapclient" do + url "https://files.pythonhosted.org/packages/b6/63/0eea51c9c263c18021cdc5866def55c98393f3bd74bbb8e3053e36f0f81a/IMAPClient-3.0.1.zip" + sha256 "78e6d62fbfbbe233e1f0e0e993160fd665eb1fd35973acddc61c15719b22bc02" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "kafka-python-ng" do + url "https://files.pythonhosted.org/packages/ce/04/1d65bdf3f0103a08710e226b851de4b357ac702f1cadabf6128bab7518a7/kafka_python_ng-2.2.3.tar.gz" + sha256 "f79f28e10ade9b5a9860b2ec15b7cc8dc510d5702f5a399430478cff5f93a05a" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "mail-parser" do + url "https://files.pythonhosted.org/packages/07/57/20176377e709ea57481f559159f00b366d143cc0a8cf7271b7f0e9c9c7ff/mail_parser-4.1.4.tar.gz" + sha256 "b65abad3beee3ffb75c7851bc373412c69e1a22561d49dd7142ee7fb4321ed82" + end + + resource "mailsuite" do + url "https://files.pythonhosted.org/packages/33/09/b3a97df229007b80187e2571932692911a83c500159e20cf5229c4ae4db0/mailsuite-1.10.0.tar.gz" + sha256 "c58338fcebbdd56b58c22a1b13d8a19581aef1588d4d56d22c51a2f18f723dce" + end + + resource "maxminddb" do + url "https://files.pythonhosted.org/packages/94/9c/5af549744e7a1e986bddd119c0bbca7f7fa7fb72590b554cb860a0c3acb1/maxminddb-2.8.2.tar.gz" + sha256 "26a8e536228d8cc28c5b8f574a571a2704befce3b368ceca593a76d56b6590f9" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/cf/0e/c857c46d653e104019a84f22d4494f2119b4fe9f896c92b4b864b3b045cc/msal-1.34.0.tar.gz" + sha256 "76ba83b716ea5a6d75b0279c0ac353a0e05b820ca1f6682c0eb7f45190c43c2f" + end + + resource "msal-extensions" do + url "https://files.pythonhosted.org/packages/01/99/5d239b6156eddf761a636bded1118414d161bd6b7b37a9335549ed159396/msal_extensions-1.3.1.tar.gz" + sha256 "c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4" + end + + resource "msgraph-core" do + url "https://files.pythonhosted.org/packages/35/94/e2a15b577044b6b0e4b610a26fcd4439863d8d21bda419e0fd24580316cd/msgraph-core-0.2.2.tar.gz" + sha256 "147324246788abe8ed7e05534cd9e4e0ec98b33b30e011693b8d014cebf97f63" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "opensearch-py" do + url "https://files.pythonhosted.org/packages/b8/58/ecec7f855aae7bcfb08f570088c6cb993f68c361a0727abab35dbf021acb/opensearch_py-3.0.0.tar.gz" + sha256 "ebb38f303f8a3f794db816196315bcddad880be0dc75094e3334bc271db2ed39" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/fa/a4/cc17347aa2897568beece2e674674359f911d6fe21b0b8d6268cd42727ac/protobuf-6.32.1.tar.gz" + sha256 "ee2469e4a021474ab9baafea6cd070e5bf27c7d29433504ddea1a4ee5850f68d" + end + + resource "publicsuffix2" do + url "https://files.pythonhosted.org/packages/5a/04/1759906c4c5b67b2903f546de234a824d4028ef24eb0b1122daa43376c20/publicsuffix2-2.20191221.tar.gz" + sha256 "00f8cc31aa8d0d5592a5ced19cccba7de428ebca985db26ac852d920ddd6fe7b" + end + + resource "publicsuffixlist" do + url "https://files.pythonhosted.org/packages/ad/87/0ab464d6984198154d417dd530e2d39e0b50c202a5201ef92229e69899b0/publicsuffixlist-1.0.2.20251009.tar.gz" + sha256 "b428a8cd0f468bbf5fd9f956370b9304a0ceee7fdea82ffc4701f0509f1ba413" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pygelf" do + url "https://files.pythonhosted.org/packages/49/91/ac1605bb40092ae41fbb833ee55447f72e19ce5459efa6bd3beecc67e971/pygelf-0.4.3.tar.gz" + sha256 "8ed972563be3c8f168483f01dbf522b6bc697959c97a3f4881324b3f79638911" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + venv = virtualenv_install_with_resources + + # Workaround if `numpy` is installed based on upstream fix + # Ref: https://github.com/elastic/elasticsearch-py/commit/aed94d2af193238221f7c247a3f6114084c92992 + inreplace venv.site_packages/"elasticsearch/serializer.py", /\n *np\.float_,$/, "" + end + + test do + assert_match version.to_s, shell_output("#{bin}/parsedmarc --version") + + touch testpath/"empty.xml" + output = shell_output("#{bin}/parsedmarc empty.xml 2>&1") + assert_match "Failed to parse empty.xml - Not a valid report", output + end +end diff --git a/Formula/p/partio.rb b/Formula/p/partio.rb new file mode 100644 index 0000000000000..bfb5c59b1005a --- /dev/null +++ b/Formula/p/partio.rb @@ -0,0 +1,45 @@ +class Partio < Formula + desc "Particle library for 3D graphics" + homepage "https://github.com/wdas/partio" + url "https://github.com/wdas/partio/archive/refs/tags/v1.19.0.tar.gz" + sha256 "128913266a88a0939aaa4bc951ae4d4da1c380408bcc0ea9e7f526556afeaad0" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "05ebbd168cfa1a7478360070bef9bf428fcf2fc309570d036fe23748807169b7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94dc712e12895507397e6db831b4b7bcfb39e3d62cc575b0f5aceb231ee17796" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6bcd1744a265d8f5e77467a4bb70ff7c832962dc64c9baca36be891409c1d4b5" + sha256 cellar: :any_skip_relocation, sonoma: "a6551a6ba9cc3babbb51af05b90920dd47a0510ce2dde16adf2fb748b61f6dc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "acd09d35e612f33f8b3eca6afeeba1d53bdef467250eaf0397a6a5cd7bd83752" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dc119d3bc73b357384ab579d1f24f61a2423241ee49ce4c0e50f3a29a98813f" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "python@3.14" + + uses_from_macos "zlib" + + on_linux do + depends_on "freeglut" + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + args = std_cmake_args + args << "-DPARTIO_USE_GLVND=OFF" unless OS.mac? + + system "cmake", "-S", ".", "-B", ".", *args + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "doc" + system "cmake", "--install", "." + + pkgshare.install "src/data" + end + + test do + assert_match "Number of particles: 25", shell_output("#{bin}/partinfo #{pkgshare}/data/scatter.bgeo") + end +end diff --git a/Formula/p/pass-git-helper.rb b/Formula/p/pass-git-helper.rb new file mode 100644 index 0000000000000..7a32e90dc118d --- /dev/null +++ b/Formula/p/pass-git-helper.rb @@ -0,0 +1,60 @@ +class PassGitHelper < Formula + include Language::Python::Virtualenv + + desc "Git credential helper interfacing with pass" + homepage "https://github.com/languitar/pass-git-helper" + url "https://github.com/languitar/pass-git-helper/archive/refs/tags/v4.0.0.tar.gz" + sha256 "988738b5956cd4efbcc789500860c6dcc051e8a3918edd3fac4b8af69323730e" + license "LGPL-3.0-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "a87f16bb19ee93230218979b8939bcc37229405bc6630487e541e083309b2359" + end + + depends_on "gnupg" => :test + depends_on "pass" + depends_on "python@3.14" + + pypi_packages package_name: "", + extra_packages: "pyxdg" + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + def install + virtualenv_install_with_resources + end + + test do + # Generate temporary GPG key for use with pass + pipe_output("#{Formula["gnupg"].opt_bin}/gpg --generate-key --batch", <<~EOS, 0) + %no-protection + %transient-key + Key-Type: RSA + Name-Real: Homebrew Test + EOS + + system "pass", "init", "Homebrew Test" + + pipe_output("pass insert -m -f homebrew/pass-git-helper-test", <<~EOS, 0) + test_password + test_username + EOS + + (testpath/"config.ini").write <<~EOS + [github.com*] + target=homebrew/pass-git-helper-test + EOS + + result = pipe_output("#{bin}/pass-git-helper -m #{testpath}/config.ini get", <<~EOS, 0) + protocol=https + host=github.com + path=homebrew/homebrew-core + EOS + + assert_match "password=test_password\nusername=test_username", result + end +end diff --git a/Formula/p/pass-import.rb b/Formula/p/pass-import.rb new file mode 100644 index 0000000000000..83905d95c346b --- /dev/null +++ b/Formula/p/pass-import.rb @@ -0,0 +1,74 @@ +class PassImport < Formula + include Language::Python::Virtualenv + + desc "Pass extension for importing data from most existing password managers" + homepage "https://github.com/roddhjav/pass-import" + url "https://files.pythonhosted.org/packages/f1/69/1d763287f49eb2d43f14280a1af9f6c2aa54a306071a4723a9723a6fb613/pass-import-3.5.tar.gz" + sha256 "e3e5ec38f58511904a82214f8a80780729dfe84628d7c5d6b1cedee20ff3fb23" + license "GPL-3.0-or-later" + revision 5 + head "https://github.com/roddhjav/pass-import.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e959f05da5797bccad20b2a9b821b133700d1adf12159c74c30cb5a805503580" + sha256 cellar: :any, arm64_sequoia: "0c3715697a0606d21095be44571c74bc6ccae6f37b4a571147e9dbda8371e1c2" + sha256 cellar: :any, arm64_sonoma: "2871cbf6f441743f95fa87fa5623db755873a7275f8f1ae7b1a25f2cec3e165a" + sha256 cellar: :any, sonoma: "8903d1f226db631bf633237b50db3ce0a99b70ec6af9f3d16ac80117e1763e35" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb527b91d9d6d66c29c235a46e716b590cefef5cd5b8b938c18ddd3363fc4e73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "488aa015e30852a8673c59da4aaa89afe795d787b63e6a7c3826d7657bf6117d" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "pyaml" do + url "https://files.pythonhosted.org/packages/c4/01/41f63d66a801a561c9e335523516bd5f761bc43cc61f8b75918306bf2da8/pyaml-25.7.0.tar.gz" + sha256 "e113a64ec16881bf2b092e2beb84b7dcf1bd98096ad17f5f14e8fb782a75d99b" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "zxcvbn" do + url "https://files.pythonhosted.org/packages/ae/40/9366940b1484fd4e9423c8decbbf34a73bf52badb36281e082fe02b57aca/zxcvbn-4.5.0.tar.gz" + sha256 "70392c0fff39459d7f55d0211151401e79e76fcc6e2c22b61add62900359c7c1" + end + + def install + virtualenv_install_with_resources + end + + test do + importers = shell_output("#{bin}/pimport --list-importers") + assert_match(/The \d+ supported password managers are:/, importers) + + exporters = shell_output("#{bin}/pimport --list-exporters") + assert_match(/The \d+ supported exporter password managers are/, exporters) + end +end diff --git a/Formula/p/pass-otp.rb b/Formula/p/pass-otp.rb new file mode 100644 index 0000000000000..44be06a3002ac --- /dev/null +++ b/Formula/p/pass-otp.rb @@ -0,0 +1,48 @@ +class PassOtp < Formula + desc "Pass extension for managing one-time-password tokens" + homepage "https://github.com/tadfisher/pass-otp" + url "https://github.com/tadfisher/pass-otp/releases/download/v1.2.0/pass-otp-1.2.0.tar.gz" + sha256 "5720a649267a240a4f7ba5a6445193481070049c1d08ba38b00d20fc551c3a67" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "e79fd90d07ba181d43a57123d3dfa85abbf2abf93f58dcb431e64823fcc7a19a" + end + + depends_on "gnupg" => :test + depends_on "oath-toolkit" + depends_on "pass" + + def install + system "make", "PREFIX=#{prefix}", "BASHCOMPDIR=#{bash_completion}", "install" + end + + test do + (testpath/"batch.gpg").write <<~EOS + Key-Type: RSA + Key-Length: 2048 + Subkey-Type: RSA + Subkey-Length: 2048 + Name-Real: Testing + Name-Email: testing@foo.bar + Expire-Date: 1d + %no-protection + %commit + EOS + begin + system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" + system "pass", "init", "Testing" + require "open3" + Open3.popen3("pass", "otp", "insert", "hotp-secret") do |stdin, _, _| + stdin.write "otpauth://hotp/hotp-secret?secret=AAAAAAAAAAAAAAAA&counter=1&issuer=hotp-secret" + stdin.close + end + assert_equal "073348", shell_output("pass otp show hotp-secret").strip + ensure + system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" + end + end +end diff --git a/Formula/p/pass.rb b/Formula/p/pass.rb new file mode 100644 index 0000000000000..d0b73575ab97f --- /dev/null +++ b/Formula/p/pass.rb @@ -0,0 +1,69 @@ +class Pass < Formula + desc "Password manager" + homepage "https://www.passwordstore.org/" + url "https://git.zx2c4.com/password-store/snapshot/password-store-1.7.4.tar.xz" + sha256 "cfa9faf659f2ed6b38e7a7c3fb43e177d00edbacc6265e6e32215ff40e3793c0" + license "GPL-2.0-or-later" + head "https://git.zx2c4.com/password-store.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "98bd9949756576685149b0bba825a0d4a12efc5f256d703236a09e24fb6ab2b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28e5b23335b5260675224af5d330a5d4f3b5e3d9be5f9491c68dbdb48ab8a6fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14e3206a94f04e911f0168b7e458f0149b8c42cd34014a113610431d2a142e1b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "14e3206a94f04e911f0168b7e458f0149b8c42cd34014a113610431d2a142e1b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "14e3206a94f04e911f0168b7e458f0149b8c42cd34014a113610431d2a142e1b" + sha256 cellar: :any_skip_relocation, sonoma: "1132f363a63efb874ebf98f406dcc6f9346496b10b0a3b3c2063b447c8035180" + sha256 cellar: :any_skip_relocation, ventura: "1132f363a63efb874ebf98f406dcc6f9346496b10b0a3b3c2063b447c8035180" + sha256 cellar: :any_skip_relocation, monterey: "1132f363a63efb874ebf98f406dcc6f9346496b10b0a3b3c2063b447c8035180" + sha256 cellar: :any_skip_relocation, arm64_linux: "22b1e65c5e116f21af96530d78f73e8b698debaec80c2b078d71c031895cc1fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee3104f2584abf3c35e811152282541832cc3e672d8b28024ee8d77d49cca172" + end + + depends_on "gnupg" + depends_on "qrencode" + depends_on "tree" + + on_macos do + depends_on "gnu-getopt" + end + + def install + system "make", "PREFIX=#{prefix}", "WITH_ALLCOMP=yes", "BASHCOMPDIR=#{bash_completion}", + "ZSHCOMPDIR=#{zsh_completion}", "FISHCOMPDIR=#{fish_completion}", "install" + inreplace bin/"pass", + /^SYSTEM_EXTENSION_DIR=.*$/, + "SYSTEM_EXTENSION_DIR=\"#{HOMEBREW_PREFIX}/lib/password-store/extensions\"" + elisp.install "contrib/emacs/password-store.el" + pkgshare.install "contrib" + end + + test do + (testpath/"batch.gpg").write <<~EOS + Key-Type: RSA + Key-Length: 2048 + Subkey-Type: RSA + Subkey-Length: 2048 + Name-Real: Testing + Name-Email: testing@foo.bar + Expire-Date: 1d + %no-protection + %commit + EOS + begin + system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" + system bin/"pass", "init", "Testing" + assert_match "The generated password for", shell_output("#{bin}/pass generate Email/testing@foo.bar 15") + assert_path_exists testpath/".password-store/Email/testing@foo.bar.gpg" + ensure + system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" + end + end +end diff --git a/Formula/p/passenger.rb b/Formula/p/passenger.rb new file mode 100644 index 0000000000000..8f2a6660ee696 --- /dev/null +++ b/Formula/p/passenger.rb @@ -0,0 +1,158 @@ +class Passenger < Formula + desc "Server for Ruby, Python, and Node.js apps via Apache/NGINX" + homepage "https://www.phusionpassenger.com/" + url "https://github.com/phusion/passenger/releases/download/release-6.1.0/passenger-6.1.0.tar.gz" + sha256 "1cf30bbb6d39f19811141a43cb0d67e7bbf6a4bc3fe8b4145eaeb53a6ee21268" + license "MIT" + revision 2 + head "https://github.com/phusion/passenger.git", branch: "stable-6.1" + + bottle do + sha256 cellar: :any, arm64_tahoe: "add29ed4eb960330edd6481305fafde070895dac4a8b6ec3812c1cdcc19ef02e" + sha256 cellar: :any, arm64_sequoia: "04ee94b0769eb0e6c23b0ee0163837fe1f561c4de8f9924831904058cfcb0624" + sha256 cellar: :any, arm64_sonoma: "798f12d5b47796fefdaedc1d4eafc29716e44a76e0641d13d69105cfff58e4f0" + sha256 cellar: :any, sonoma: "6c78b664ef5460acff86c6c3786f2f1a56130bc31ca2dc9981953830234e920a" + sha256 cellar: :any_skip_relocation, arm64_linux: "15d704080ecd557ab7b258327c4346dd3daf55d3d24c82d4236a1f3380771b86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "977df709f1e4d50ab4f089e593e21d3e5e3f647e6556b9b463e216a6d366644e" + end + + depends_on "httpd" => :build # to build the apache2 module + depends_on "nginx" => [:build, :test] # to build nginx module + depends_on "apr" + depends_on "apr-util" + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "xz" => :build + uses_from_macos "curl" + uses_from_macos "libxcrypt" + uses_from_macos "ruby" + uses_from_macos "zlib" + + def install + if OS.mac? && MacOS::CLT.installed? + ENV["SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version) + else + ENV.delete("SDKROOT") + end + + inreplace "src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb" do |s| + s.gsub! "-I/usr/local/opt/openssl/include", "-I#{Formula["openssl@3"].opt_include}" + s.gsub! "-L/usr/local/opt/openssl/lib", "-L#{Formula["openssl@3"].opt_lib}" + end + + system "rake", "apache2" + system "rake", "nginx" + nginx_addon_dir = `./bin/passenger-config about nginx-addon-dir`.strip + + mkdir "nginx" do + system "tar", "-xf", "#{Formula["nginx"].opt_pkgshare}/src/src.tar.xz", "--strip-components", "1" + args = (Formula["nginx"].opt_pkgshare/"src/configure_args.txt").read.split("\n") + args << "--add-dynamic-module=#{nginx_addon_dir}" + + system "./configure", *args + system "make" + (libexec/"modules").install "objs/ngx_http_passenger_module.so" + end + + (libexec/"download_cache").mkpath + + # Fixes https://github.com/phusion/passenger/issues/1288 + rm_r("buildout/libev") + rm_r("buildout/libuv") + rm_r("buildout/cache") + + necessary_files = %w[configure Rakefile README.md CONTRIBUTORS + CONTRIBUTING.md LICENSE CHANGELOG package.json + passenger.gemspec build bin doc images dev src + resources buildout] + + cp_r necessary_files, libexec, preserve: true + + # Allow Homebrew to create symlinks for the Phusion Passenger commands. + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Ensure that the Phusion Passenger commands can always find their library + # files. + + locations_ini = `./bin/passenger-config --make-locations-ini --for-native-packaging-method=homebrew` + locations_ini.gsub!(/=#{Regexp.escape Dir.pwd}/, "=#{libexec}") + (libexec/"src/ruby_supportlib/phusion_passenger/locations.ini").write(locations_ini) + + ruby_libdir = `./bin/passenger-config about ruby-libdir`.strip + ruby_libdir.gsub!(/^#{Regexp.escape Dir.pwd}/, libexec) + system "./dev/install_scripts_bootstrap_code.rb", + "--ruby", ruby_libdir, *Dir[libexec/"bin/*"] + + # Recreate the tarball with a top-level directory, and use Gzip compression. + mkdir "nginx-#{Formula["nginx"].version}" do + system "tar", "-xf", "#{Formula["nginx"].opt_pkgshare}/src/src.tar.xz", "--strip-components", "1" + end + system "tar", "-czf", buildpath/"nginx.tar.gz", "nginx-#{Formula["nginx"].version}" + + system "./bin/passenger-config", "compile-nginx-engine", + "--nginx-tarball", buildpath/"nginx.tar.gz", + "--nginx-version", Formula["nginx"].version.to_s + cp Dir["buildout/support-binaries/nginx*"], libexec/"buildout/support-binaries", preserve: true + + nginx_addon_dir.gsub!(/^#{Regexp.escape Dir.pwd}/, libexec) + system "./dev/install_scripts_bootstrap_code.rb", + "--nginx-module-config", libexec/"bin", "#{nginx_addon_dir}/config" + + man1.install Dir["man/*.1"] + man8.install Dir["man/*.8"] + end + + def caveats + <<~EOS + To activate Phusion Passenger for Nginx, run: + brew install nginx + And add the following to #{etc}/nginx/nginx.conf at the top scope (outside http{}): + load_module #{opt_libexec}/modules/ngx_http_passenger_module.so; + And add the following to #{etc}/nginx/nginx.conf in the http scope: + passenger_root #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini; + passenger_ruby /usr/bin/ruby; + + To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf: + LoadModule passenger_module #{opt_libexec}/buildout/apache2/mod_passenger.so + PassengerRoot #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini + PassengerDefaultRuby /usr/bin/ruby + EOS + end + + test do + ruby_libdir = `#{HOMEBREW_PREFIX}/bin/passenger-config --ruby-libdir`.strip + assert_equal "#{libexec}/src/ruby_supportlib", ruby_libdir + + (testpath/"nginx.conf").write <<~EOS + load_module #{opt_libexec}/modules/ngx_http_passenger_module.so; + worker_processes 4; + error_log #{testpath}/error.log; + pid #{testpath}/nginx.pid; + + events { + worker_connections 1024; + } + + http { + passenger_root #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini; + passenger_ruby /usr/bin/ruby; + client_body_temp_path #{testpath}/client_body_temp; + fastcgi_temp_path #{testpath}/fastcgi_temp; + proxy_temp_path #{testpath}/proxy_temp; + scgi_temp_path #{testpath}/scgi_temp; + uwsgi_temp_path #{testpath}/uwsgi_temp; + passenger_temp_path #{testpath}/passenger_temp; + + server { + passenger_enabled on; + listen 8080; + root #{testpath}; + access_log #{testpath}/access.log; + error_log #{testpath}/error.log; + } + } + EOS + system "#{Formula["nginx"].opt_bin}/nginx", "-t", "-c", testpath/"nginx.conf" + end +end diff --git a/Formula/p/passt.rb b/Formula/p/passt.rb new file mode 100644 index 0000000000000..f0eb58fed40fa --- /dev/null +++ b/Formula/p/passt.rb @@ -0,0 +1,41 @@ +class Passt < Formula + desc "User-mode networking daemons for virtual machines and namespaces" + homepage "https://passt.top/passt/about/" + url "https://passt.top/passt/snapshot/passt-2025_09_19.623dbf6.tar.xz" + version "2025_09_19.623dbf6" + sha256 "c5a916bdf084458ad791175aa2fe6f1984362524ada0cee84955ae144b6261cd" + license all_of: ["GPL-2.0-or-later", "BSD-3-Clause"] + head "git://passt.top/passt", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "98aec28b9829a93d7da6036d3ce261fdc6ed928353b52f424f35e7e271a24bad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbacd89b9a7ce83e9eb10218d878108029cef1939dc5eafa1b59afe49c540d06" + end + + depends_on :linux + + def install + args = ["prefix=#{prefix}"] + args << "VERSION=#{version}" if build.stable? + system "make", "install", *args + end + + test do + require "pty" + PTY.spawn("#{bin}/passt --version") do |r, _w, _pid| + sleep 1 + assert_match "passt #{version}", r.read_nonblock(1024) + end + + pidfile = testpath/"pasta.pid" + begin + # Just check failure as unable to use pasta or passt on unprivileged Docker + output = shell_output("#{bin}/pasta --pid #{pidfile} 2>&1", 1) + assert_match "Couldn't create user namespace: Operation not permitted", output + ensure + if pidfile.exist? && (pid = pidfile.read.to_i).positive? + Process.kill("TERM", pid) + end + end + end +end diff --git a/Formula/p/passwdqc.rb b/Formula/p/passwdqc.rb new file mode 100644 index 0000000000000..8de49d3250a4f --- /dev/null +++ b/Formula/p/passwdqc.rb @@ -0,0 +1,69 @@ +class Passwdqc < Formula + desc "Password/passphrase strength checking and enforcement toolset" + homepage "https://www.openwall.com/passwdqc/" + url "https://www.openwall.com/passwdqc/passwdqc-2.0.3.tar.gz" + sha256 "53b0f4bc49369f06195e9e13abb6cff352d5acb79e861004ec95973896488cf4" + license "0BSD" + + livecheck do + url :homepage + regex(/href=["']?passwdqc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "955ce4031458fb9914907717011bc5b7093d4dd9623de3ce11646e3630444745" + sha256 cellar: :any, arm64_sequoia: "ff2e3463c33e26713d8d994134dbcf4cc3b90f2eae60135ef52821ec82af6dc9" + sha256 cellar: :any, arm64_sonoma: "8c8d9e924950156472e0040224cf7f30a6e6c256eccc027746be8a9211b245f4" + sha256 cellar: :any, arm64_ventura: "d6212417a711c18e45a28eb3a24a775d091665538ed50f678d077fa47e647f7d" + sha256 cellar: :any, arm64_monterey: "1fa6444ca8237d6bed9e187245dee44ea797f13c8822ab77527df7c47f324c16" + sha256 cellar: :any, arm64_big_sur: "e8d4dc476b0ff113653823c425dcbfc89ad57112a89086fa8602f27f0c3c0f41" + sha256 cellar: :any, sonoma: "c5f29e9353bb3887d132a98468ffb9f01d7058d22a95bb062e6e63e8d2c345a1" + sha256 cellar: :any, ventura: "40dd6c923246ef225bf9e129e5ae142ed77fe7d111f92654fab0e3edd921f612" + sha256 cellar: :any, monterey: "72f01dbc795a98ac1ec65db7c31f62e13182d47c422b116c57f72d34a8fc7c6f" + sha256 cellar: :any, big_sur: "7fb7c879feb5562187e03d4d2a1bbc5be855330c1382cac43ef3378818eacb02" + sha256 cellar: :any_skip_relocation, arm64_linux: "4bf9371aae5b2908b63aba467004476df6255d29a3f84e0c4a06872084857398" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ef0b2b3f545ca92181f77b7fff78992ffe1a6a84d31dd26103ecc3696cb9a3f" + end + + uses_from_macos "libxcrypt" + + on_linux do + depends_on "linux-pam" + end + + def install + # https://github.com/openwall/passwdqc/issues/15 + inreplace "passwdqc_filter.h", "", "" if OS.mac? + + args = %W[ + BINDIR=#{bin} + CC=#{ENV.cc} + CONFDIR=#{etc} + DEVEL_LIBDIR=#{lib} + INCLUDEDIR=#{include} + MANDIR=#{man} + PREFIX=#{prefix} + SHARED_LIBDIR=#{lib} + ] + + args << if OS.mac? + "SECUREDIR_DARWIN=#{prefix}/pam" + else + "SECUREDIR=#{prefix}/pam" + end + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + args << "CFLAGS=#{ENV.cflags}" if ENV.cflags.present? + + system "make", *args + system "make", "install", *args + end + + test do + pipe_output("#{bin}/pwqcheck -1", shell_output("#{bin}/pwqgen")) + end +end diff --git a/Formula/p/pastebinit.rb b/Formula/p/pastebinit.rb new file mode 100644 index 0000000000000..00fbb5e63d5e7 --- /dev/null +++ b/Formula/p/pastebinit.rb @@ -0,0 +1,39 @@ +class Pastebinit < Formula + include Language::Python::Shebang + + desc "Send things to pastebin from the command-line" + homepage "https://github.com/pastebinit/pastebinit" + url "https://github.com/pastebinit/pastebinit/archive/refs/tags/1.7.1.tar.gz" + sha256 "8e91c2c0d02a41faaa40d9f585fe858893c3f0ef94836ee4ce14094cfc10b938" + license "GPL-2.0-or-later" + head "https://github.com/pastebinit/pastebinit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "89be086efffd69157222144a6a0606ba775daaf156927cfde6aae9d2fadec2ae" + end + + depends_on "docbook2x" => :build + depends_on "gettext" => :build # for msgfmt + + uses_from_macos "python" + + def install + inreplace "pastebinit", "confdirs = []", "confdirs = ['#{pkgetc}/pastebin.d']" + rewrite_shebang detected_python_shebang(use_python_from_path: true), "pastebinit" + + bin.install "pastebinit", *buildpath.glob("utils/*{s,t}") + pkgetc.install "pastebin.d" + + system "docbook2man", "pastebinit.xml" + man1.install "PASTEBINIT.1" => "pastebinit.1" + man1.install buildpath.glob("utils/*.1") + + system "make", "-C", "po" + (share/"locale").install (buildpath/"po/mo").children + end + + test do + url = pipe_output("#{bin}/pastebinit -a test -b paste.ubuntu.com", "Hello, world!").chomp + assert_match "://paste.ubuntu.com/", url + end +end diff --git a/Formula/p/pastel.rb b/Formula/p/pastel.rb new file mode 100644 index 0000000000000..f1f7a62f6c4b5 --- /dev/null +++ b/Formula/p/pastel.rb @@ -0,0 +1,35 @@ +class Pastel < Formula + desc "Command-line tool to generate, analyze, convert and manipulate colors" + homepage "https://github.com/sharkdp/pastel" + url "https://github.com/sharkdp/pastel/archive/refs/tags/v0.11.0.tar.gz" + sha256 "98639ae6539da5a4c20993daa559ca2d19dde63b601bcb29bb0cebbf56b1ac08" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/pastel.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5642321f2522826ff4cf9d82194d371a4da24ce6d435192b82fe015cf211de0b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0556213373e88fdb97e99e25c87ebe6a7756d1d39211bb49e2d377b6efe445ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b902288152e2829b19c229dc3e2dfc6cffaf705d69c3efa8e606e83723f9ef2" + sha256 cellar: :any_skip_relocation, sonoma: "57535b707c2cdb6d3b28a1aa890b2bd4edc1e8f15a6981913fe3f9e3baa9530d" + sha256 cellar: :any_skip_relocation, arm64_linux: "55af95886afc7eb7fa55f4da04f003af6e54cfe8e02da733d69d33310a26ca4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c227183b9d5a07b3160fc943db717c6361ca2014ca0eb5ec190a02ec2fab9234" + end + + depends_on "rust" => :build + + def install + ENV["SHELL_COMPLETIONS_DIR"] = buildpath/"completions" + + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/pastel.bash" => "pastel" + zsh_completion.install "completions/_pastel" + fish_completion.install "completions/pastel.fish" + end + + test do + output = shell_output("#{bin}/pastel format hex rebeccapurple").strip + + assert_equal "#663399", output + end +end diff --git a/Formula/p/patat.rb b/Formula/p/patat.rb new file mode 100644 index 0000000000000..e1d153d8bed94 --- /dev/null +++ b/Formula/p/patat.rb @@ -0,0 +1,45 @@ +class Patat < Formula + desc "Terminal-based presentations using Pandoc" + homepage "https://github.com/jaspervdj/patat" + url "https://hackage.haskell.org/package/patat-0.15.2.0/patat-0.15.2.0.tar.gz" + sha256 "d1f182ecdf145b8db1aacee1c4d46731d197b192e6ef855c3505067c1cea2b65" + license "GPL-2.0-or-later" + head "https://github.com/jaspervdj/patat.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00aa976ca5fdacc86e38303a701c6b39f69c66dc71df0737d797222981f377f5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90b7a9394554857c0a8535126c47949d931a7f659e4e70026cc7c3de14d3feb9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd312988933bf91ab8ed3c458ddfc17d084a37347f18021ce5633c53980435fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d92ea4a497a9bfa9f1697058c421881cb94f8dea121b676d0dbdd3e158351aaa" + sha256 cellar: :any_skip_relocation, sonoma: "a06c67fb2863949481fc857ead7592b89e464aab11530a61a41a93e4f89aef1e" + sha256 cellar: :any_skip_relocation, ventura: "5704db30193d278c0ba64e99bb67f426b19cbd7899fcbf293d294432e8d5a989" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc042157bd5597b79314b5b08f3f7baf4289e1d31fe410d00af0462489cb2a6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e117d456e17b90dec4429df57ed91c429144578f20c8e5b9f99c75f0d4e3d304" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + test_file = testpath/"test.md" + test_file.write <<~MARKDOWN + # Hello from Patat + Slide 1 + --- + Slide 2 + MARKDOWN + output = shell_output("#{bin}/patat --dump --force #{test_file}") + assert_match "Hello from Patat", output + + assert_match version.to_s, shell_output("#{bin}/patat --version") + end +end diff --git a/Formula/p/patch-package.rb b/Formula/p/patch-package.rb new file mode 100644 index 0000000000000..da55de8b62edd --- /dev/null +++ b/Formula/p/patch-package.rb @@ -0,0 +1,37 @@ +class PatchPackage < Formula + desc "Fix broken node modules instantly" + homepage "https://github.com/ds300/patch-package" + url "https://registry.npmjs.org/patch-package/-/patch-package-8.0.1.tgz" + sha256 "fb36b47e1f22a3d612311bc9a0464b0213e0971958cfabb8f26a9537b1d7c4f7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6bc435f63e2565dd2a21b9502465d52188b934b4e926f1511fe18597d18d50ee" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/patch-package 2>&1", 1) + assert_match "no package.json found for this project", output + + (testpath/"package.json").write <<~JSON + { + "name": "brewtest", + "version": "1.0.0" + } + JSON + + expected = <<~EOS + patch-package #{version} + Applying patches... + No patch files found + EOS + assert_equal expected, shell_output("#{bin}/patch-package 2>&1") + end +end diff --git a/Formula/p/patchelf.rb b/Formula/p/patchelf.rb new file mode 100644 index 0000000000000..c0da1d366cf10 --- /dev/null +++ b/Formula/p/patchelf.rb @@ -0,0 +1,64 @@ +class Patchelf < Formula + desc "Modify dynamic ELF executables" + homepage "https://github.com/NixOS/patchelf" + url "https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.bz2" + sha256 "1952b2a782ba576279c211ee942e341748fdb44997f704dd53def46cd055470b" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3eca59098dfb9987773befef12384065102f4d6e6ab03fc4e3543d9c45d81b80" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00f60cc5a6eda135bd0184aa3e4980da9017132553c2ab685b03842f4c196ea2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "25689776796afacaf452e8e74dd3805bf9ff129c00f3cc886c0857db9802c9db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37888c994e481e2b6a3a212c689195e2ca6dbeb681779845bbeda5a52262c1b5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bd75a287bcecfb33a2ca07c92225435571804a8e73f30ecc4769a6a7443dc2d0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ef4527c4a98121dd6fabcef87f00b3a8dbbd6b9cbd24d49d972a057f49ee4080" + sha256 cellar: :any_skip_relocation, sonoma: "730a1f960f0965576c25edf1525ac57c14177ff4ee5fa74d731f6892c0f519ef" + sha256 cellar: :any_skip_relocation, ventura: "6b230c2ad0a046653bb8f2b5652d069f4f9e7c6f17bdb4d4e9b6dc35a94a3693" + sha256 cellar: :any_skip_relocation, monterey: "37bd9ca1e04a76f8b160fdaf1f1f76c2f396a264f5d3af88670d3338c577638b" + sha256 cellar: :any_skip_relocation, big_sur: "0c12fe3723bc1b72e6635713ff2f6c12cf7f13e8e9533fb58360a2c163187d4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5ac0544c3916f7198d156d69a25d8f142905c694946ac1d430d5375f94f0bc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe8a76cdde4a5666cccbcdfc328bfb77f5d05b63a52ce103b487166be696ac6b" + end + + head do + url "https://github.com/NixOS/patchelf.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + if OS.linux? + # Fix ld.so path and rpath + # see https://github.com/Homebrew/linuxbrew-core/pull/20548#issuecomment-672061606 + ENV["HOMEBREW_DYNAMIC_LINKER"] = File.readlink("#{HOMEBREW_PREFIX}/lib/ld.so") + ENV["HOMEBREW_RPATH_PATHS"] = nil + end + + system "./bootstrap.sh" if build.head? + system "./configure", "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--disable-silent-rules" + system "make", "install" + end + + test do + resource "homebrew-helloworld" do + url "http://timelessname.com/elfbin/helloworld.tar.gz" + sha256 "d8c1e93f13e0b7d8fc13ce75d5b089f4d4cec15dad91d08d94a166822d749459" + end + + resource("homebrew-helloworld").stage do + assert_equal "/lib/ld-linux.so.2\n", shell_output("#{bin}/patchelf --print-interpreter chello") + assert_equal "libc.so.6\n", shell_output("#{bin}/patchelf --print-needed chello") + assert_equal "\n", shell_output("#{bin}/patchelf --print-rpath chello") + assert_empty shell_output("#{bin}/patchelf --set-rpath /usr/local/lib chello") + assert_equal "/usr/local/lib\n", shell_output("#{bin}/patchelf --print-rpath chello") + end + end +end diff --git a/Formula/p/patchutils.rb b/Formula/p/patchutils.rb new file mode 100644 index 0000000000000..9bb5f10221efe --- /dev/null +++ b/Formula/p/patchutils.rb @@ -0,0 +1,44 @@ +class Patchutils < Formula + desc "Small collection of programs that operate on patch files" + homepage "http://cyberelk.net/tim/software/patchutils/" + url "http://cyberelk.net/tim/data/patchutils/stable/patchutils-0.4.3.tar.xz" + mirror "https://deb.debian.org/debian/pool/main/p/patchutils/patchutils_0.4.3.orig.tar.xz" + sha256 "0efc96a9565fd156fc1064fdcc54c82b6229db0d402827c4c48b02f6ef956445" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url "http://cyberelk.net/tim/data/patchutils/stable/" + regex(/href=.*?patchutils[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0bf4589febeda90518d2d4d875a96f4c4a25316a80c7c1d1718e05c96d5eb101" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6a40f8058c158c1bc004362bb9fc905ef2fb7f0b3c1219a8fdcde2de8f19f37" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad5ea66690eeeba9d66fc431e9ed5f839831ae39a5be14ed363e45f3ad3805c8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "02b054e5a449dac5daaf82ff1813498ef3e6155dec5498ef912daf232f169bb2" + sha256 cellar: :any_skip_relocation, sonoma: "f4592cd1b0f1e0974000cd6d62e02a325abae667117985ebcdd8fec6a9700dc0" + sha256 cellar: :any_skip_relocation, ventura: "f13dff3b92a4a30d85ae6e7bb6ecc43a7671870281b22b66b57e886523400551" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b194dc23348077bf9093e8127bbf96faa783e8a83daabb46496b3799e6ba6f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5bc8b626210df1bb5f3e86d5cb731adfa03dbb8911186b5e424cc36ddbc573b" + end + + head do + url "https://github.com/twaugh/patchutils.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docbook" => :build + end + + depends_on "xmlto" => :build + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + system "./bootstrap" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match %r{a/libexec/NOOP}, shell_output("#{bin}/lsdiff #{test_fixtures("test.diff")}") + end +end diff --git a/Formula/p/pawk.rb b/Formula/p/pawk.rb new file mode 100644 index 0000000000000..83f222d009a2f --- /dev/null +++ b/Formula/p/pawk.rb @@ -0,0 +1,31 @@ +class Pawk < Formula + include Language::Python::Shebang + + desc "Python line processor (like AWK)" + homepage "https://github.com/alecthomas/pawk" + url "https://files.pythonhosted.org/packages/6c/90/2165e9fedd33ac172899aa3df6754971d720bf07eef2a0b049db15a7ad69/pawk-0.8.1.tar.gz" + sha256 "59ec1a4046cf545e1376c8c0a28f5f178a3b88dbc85fb3772aa3ce8c2e088349" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ac3b1c476a0e40e5eed34672c9d426989456b17907cfeee03c6e6ed88d0d01b9" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "pawk.py" + bin.install "pawk.py" => "pawk" + end + + test do + (testpath/"elements.txt").write <<~EOS + # Name Symbol + Hydrogen H + Helium He + Lithium Li + EOS + output = shell_output("#{bin}/pawk -B 'd={}' -E 'json.dumps(d)' '!/^#/ d[f[1]] = f[0]' < elements.txt") + assert_equal '{"H": "Hydrogen", "He": "Helium", "Li": "Lithium"}', output.strip + end +end diff --git a/Formula/p/pax-runner.rb b/Formula/p/pax-runner.rb new file mode 100644 index 0000000000000..4606f08f9cca8 --- /dev/null +++ b/Formula/p/pax-runner.rb @@ -0,0 +1,29 @@ +class PaxRunner < Formula + desc "Tool to provision OSGi bundles" + homepage "https://ops4j1.jira.com/wiki/spaces/paxrunner/overview" + url "https://search.maven.org/remotecontent?filepath=org/ops4j/pax/runner/pax-runner-assembly/1.9.0/pax-runner-assembly-1.9.0-jdk15.tar.gz" + version "1.9.0" + sha256 "b1ff2039dc1e73b6957653d967d6ee028f9c79d663b9031a6b77a49932352dc1" + license all_of: ["Apache-2.0", "MIT"] + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/ops4j/pax/runner/pax-runner-assembly/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f7195e6a142137e103125c0176376e562a2e0ba115d5e61ed15b0c2a00e92cf5" + end + + def install + (bin/"pax-runner").write <<~EOS + #!/bin/sh + exec java $JAVA_OPTS -cp #{libexec}/bin/pax-runner-#{version}.jar org.ops4j.pax.runner.Run "$@" + EOS + + libexec.install Dir["*"] + end +end diff --git a/Formula/p/pax.rb b/Formula/p/pax.rb new file mode 100644 index 0000000000000..cd09cd73e3fec --- /dev/null +++ b/Formula/p/pax.rb @@ -0,0 +1,47 @@ +class Pax < Formula + desc "Portable Archive Interchange archive tool" + homepage "https://mbsd.evolvis.org/pax.htm" + url "https://mbsd.evolvis.org/MirOS/dist/mir/cpio/paxmirabilis-20201030.tgz" + sha256 "1cc892c9c8ce265d28457bab4225eda71490d93def0a1d2271430c2863b728dc" + license "MirOS" + + livecheck do + url :homepage + regex(/href=.*?paxmirabilis[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5a4bce394325826fc9d441a44954a78fa2e4548da8a3c1ce21f2683676fe5cf2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a439a16ce1f3c165a8f909e2fdcca2c0947e117365465d25517eec4f7760a060" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47f4f096d2004842fb3da233b6ce4aaebd7689b3a78e652454859f32cab7f428" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d53b2b5ce68a30ac206d6692afd3340abbb4b017922fee78db2f9fb1455c55a3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4439e9d997f1e26eb76c01c5bded88103475e8867855e2b0928eae5175e974b5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e540a64c9273304c80db0069305aa90efd4151a1dfd0f9eca0afdb640636a01b" + sha256 cellar: :any_skip_relocation, sonoma: "6f739558f46a72a7b5c486e9ee8e8511e5d1635fabbab8f3c18c2f60404877ce" + sha256 cellar: :any_skip_relocation, ventura: "1d63a2f030b177f7b13a4150dadde6c3a2c843a8a15535f7a66375029feda72e" + sha256 cellar: :any_skip_relocation, monterey: "d38daea0b26ae854ac1b08b4e3df4689b9ebbc7658604ea0d61fae0a3d263933" + sha256 cellar: :any_skip_relocation, big_sur: "3bee37a3e3c998d25eb643ba3b5883d423b2209caf40f8f950f0ea72d0413f4c" + sha256 cellar: :any_skip_relocation, catalina: "7445d8ab0193bfc4e2bb4c8a7497e8010cb47b63bb9fa49c887b2f3a3e133d6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7311b4bf4cdf82d37661f21a7fa3feeb8e6d00107d89557d6326a9b6074b2dee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ebf0c050c23153d61d4bd703a0f9a4194018a54ad873a5594a70182058280ec" + end + + keg_only :provided_by_macos + + def install + mkdir "build" do + system "sh", "../Build.sh", "-r", "-tpax" + bin.install "pax" + end + end + + test do + (testpath/"foo").write "test" + system bin/"pax", "-f", "#{testpath}/foo.pax", "-w", "#{testpath}/foo" + rm testpath/"foo" + system bin/"pax", "-f", testpath/"foo.pax", "-r" + assert_path_exists testpath/"foo" + end +end diff --git a/Formula/p/payara.rb b/Formula/p/payara.rb new file mode 100644 index 0000000000000..d9c869cee2934 --- /dev/null +++ b/Formula/p/payara.rb @@ -0,0 +1,58 @@ +class Payara < Formula + desc "Java EE application server forked from GlassFish" + homepage "https://www.payara.fish" + url "https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/6.2025.10/payara-6.2025.10.zip" + sha256 "7478dd3870fde4f54e87675e4482950baa2c06bd1b6ba567e22676534fb3bbb6" + license any_of: [ + "CDDL-1.1", + { "GPL-2.0-only" => { with: "Classpath-exception-2.0" } }, + ] + + livecheck do + url "https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b290ca24c2062931c60437acf58c01bb36f3b2f5757e4f9209862eb5908be34c" + end + + depends_on :macos # The test fails on Linux. + depends_on "openjdk" + + conflicts_with "glassfish", because: "both install the same scripts" + + def install + # Remove Windows scripts + rm(Dir["**/*.{bat,exe}"]) + + inreplace "bin/asadmin", /AS_INSTALL=.*/, + "AS_INSTALL=#{libexec}/glassfish" + + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env) + end + + def caveats + <<~EOS + You may want to add the following to your .bash_profile: + export GLASSFISH_HOME=#{opt_libexec}/glassfish + export PATH=${PATH}:${GLASSFISH_HOME}/bin + EOS + end + + service do + run [opt_libexec/"glassfish/bin/asadmin", "start-domain", "--verbose", "domain1"] + keep_alive true + working_dir opt_libexec/"glassfish" + environment_variables GLASSFISH_HOME: opt_libexec/"glassfish" + end + + test do + ENV["GLASSFISH_HOME"] = opt_libexec/"glassfish" + output = shell_output("#{bin}/asadmin list-domains") + assert_match "domain1 not running", output + assert_match "Command list-domains executed successfully.", output + end +end diff --git a/Formula/p/payload-dumper-go.rb b/Formula/p/payload-dumper-go.rb new file mode 100644 index 0000000000000..064e3ceedab7a --- /dev/null +++ b/Formula/p/payload-dumper-go.rb @@ -0,0 +1,81 @@ +class PayloadDumperGo < Formula + desc "Android OTA payload dumper written in Go" + homepage "https://github.com/ssut/payload-dumper-go" + url "https://github.com/ssut/payload-dumper-go/archive/refs/tags/1.3.0.tar.gz" + sha256 "d7ba33a80c539674c0b63443b8c6dd9c2040ec996323f38ffe72e024d302eb2d" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "97ce35198d98de962751f7815760e8ba1a9887feb3b999aa65f68a04d2e47e57" + sha256 cellar: :any, arm64_sequoia: "298d73ff6bdcbe98ec51938eda5d6df35f4a67eb48538ab3d0a8d5e7f5ededea" + sha256 cellar: :any, arm64_sonoma: "a6be6a71b98e5cbccf85f5fd5ddf49ec28792545ebdff739a275c6c32a7ee34c" + sha256 cellar: :any, arm64_ventura: "adc25ef9cc348ff0f4e72aee84a8d73d4eecc77ec8228b8ef451a1ba52947a3c" + sha256 cellar: :any, sonoma: "43c27225c84681b696cc133dd3027dcdb8a99434eaaae57adf9d24b10a761b09" + sha256 cellar: :any, ventura: "9a7fe312cc474f61625712007bb096a34ec93fb165afe887cd2786c7fbd71ee1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f89b0e2f2ffb8fc2ec9c58f91aa50ea18243bbb2c15c4682df72931fda29c21c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dec1676646bcf9b015900ac1d9c7f5f1912671bdd034e511235b38c95e63cc3c" + end + + depends_on "go" => :build + depends_on "xz" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + require "base64" + + (testpath/"payload.bin").write ::Base64.decode64 <<~EOS + Q3JBVQAAAAAAAAACAAAAAAAAAQEAAAAAGIAgYABqlgEKBmtlcm5lbDonCICAgAISIMUdnt6vEEPv + 5BJXyuvBM2rCHkEau27UGDMkvm6EHESMQjAIARAAGL4KMgUIABCABEIg4dp6wOpVauyGK1xdrKTF + UvIDzO1u9nPhCGdU58+dK05CMQgBEL4KGE8yBgiABBCABEIgknB+/7eKIOYXKq8Be1HG6J582bBO + 7D4W8JVmhN0mB6pqXwoEcm9vdDolCIBgEiBWEFl9A9PinwHXIr10MpbvaNB29iPB3KLrE1NHxrjv + ukIwCAgQjQsYvAcyBAgAEANCIK6vU0+NAnVBN5BBxCv9ui5XvPa1O0UCDoeKpJbNN911cABCWmg5 + MUFZJlNZKWV0AgAAb3////////f//+zmxP+X////8P5Z7VFlkE6PSlgI/Sq+3XjQBFXhbBVkmyjM + DJEp5EjT0nkm1G1NpGgGjQHqekZNDR6am1PTUbFBso0GgAAAeoNqAAbKAyNMRk8pp6npog0IjSek + aaR6EnppoGpiaaBppoGmgeoANABoAAAAAAAAAABo9Q0aA0IMmmQGEZDQyDIGCZNBgENNNGQAYCZM + mTEGjRkDBDQGmmjQMmg0YhoGQgyaZAYRkNDIMgYJk0GAQ000ZABgJkyZMQaNGQMENAaaaNAyaDRi + GgZAiURCp+1SfqNCHpPU9Roaek0AGjT1DQAeoPU00AA0D1NGjamamQMgZAaABoDQAAaaHJVghemI + AOmC4UVFIBPoiaozBSD0FzcVUfksBQtNZliloe2oP3WJcYVY7xZmrl7PIt+9L/OBe1cl3K0rxIHQ + hM5+mQokK4hw9PTEXUjr8q4mk1VQ9SCmCKmZBWkH+IIjlwWyCA7OIHjR3XkFDodPgqQ0OfK1gISA + vbQArERUTzoqiABeioiAW4t9MYyJ3V9oC1IDZAOZ4f061ihZbm9X2WwsLKSuxv+ZlU9DZBQrOmui + LAIiRt3VNkhwosd7FiVEaO4VwbuQ1WsmSlvwlMIgQIEBFfaoRMKrvVAO0QYQmT0CpaFqLJqiz96x + 4V7BXsAtLJAREEVW/BCsBwxGkQoRpFdTyllR52lEebpQCQR1fJUkS/JEXRRBdPMvHobKOKZNdVCG + CWCIiq2w0yRVjAA2EWgRSo6W4v1sDUECQU1cNHLCJUxwoBCAmIklkVnDNAV7iOGIuKKCiq21uvDT + NzqZ/S7XPpRAV3Bv4y+mgASEek6UJEJCgBlKgW8jH2lZtbnI2DxuPthlKk7+niRybLY1VOiINiVT + A6XhWnpXqHg5FDCfThKoDhgNNZhhkHDfBgXZjzn7WoCnNSnDzoyxPnIRFzep1bzGRX7QfbVTlAAY + CGwQdjeYeQxRE4KOW8CicGqUHKG2cKJIwEJC7JRDZA6nqFpGWuQgNferlYU+uaAv0AuRxJKaJ0xC + Upb3cYsbPwIw2ONn7HAcXf0kGJW+oRXl8oDDm6Y7ByZWLCEidJLInDjnrDdBrtxdEDKahCusLW1Z + jYsAxhRcQDhkTEmKeWApv4bxgtyEJFLp+dZEdBYQFAT6ICKm1ldWsDFmfy6sZs1qVBy8OZ8KfMt3 + tPlcnBf0qIABDIsk0wD42sdeNk3hILSEEG+es6Rrv4quzqIAc8cDrd893mJjXhpotd1JhQAzsi4r + 5YSpypp4lj0XTNEQdn5uC1fcl0iqSlzFvLVo/dnAVBTpE2pG4z1FkqCmIFCsrW758YiRdpfJg9a2 + rZHsoEPzEHz+ZpOOtpkKDolTQU1tNRYWlva6M1PSSlKbGlYQ1mVaXw/JNJkBbTjjJ1xbrIHEQdtO + NVNqBVicYDVpAcyxW4CNZjCRqghZzlTlzHQ46FqmCIGbxEgE9QKOUdDimgQnMWHATohFmF9NctyE + E+HyfBKW1IhpWwzI+9NX0MSRGaKDogFipVwBbEIZbUBvCnEpburIg1IZZ0M5o/vjk+tCeunksR1n + VzdzHg1kQPnCY7DS8pWPKtm4vhzEFQgIneDYf7NVI2+xxKUuh6XDYGhsoNDJxnLTwC/QgBESEgKR + kkNDoPquwaGA8WG64NOz43Mysn4US9eoqa2pIJIOmhSqyTis3gXN198f98WX/tvBz6F0xoICKrzi + AHLqv/RxEVbIgBws4V7HH/8XckU4UJApZXQCQlpoOTFBWSZTWe0TmqYAQElViMAQQAAAASMmiAAA + CAAIIABQgAABSqnoTJ5T02BY+VUlVrihQF3nGsd+Z41r/nreQQD0XckU4UJDtE5qmP03elhaAAAA + /xLZQQIAIQEDAAAA2YgixOAv/wOCXQA0HMpq8x9QM4xULw3iwQ0waXnja/hNL1O1MPZ88VuJHvHc + FvZPOmSRO6BQR6vgnZ3WqjIpQfre9CafdGn+6ZrEq90fAsMGfx4c/HrCMEhB9EXnCDu72DW4O7mt + FiX8dk0BB5CKxOoFB5IYnyfzP4UXzwM+6cXh/Ir5ZtDaXHBHPNKeih2XV1jKl8hGGtLlbBBf0Yl0 + cbbeic9ABtO0Zn9sBLhNPMS4xTy7qO45AU8ldbeflz1KMTGnTTUJeP/iDC3ODAmC5cskA3+EHJ/B + IWPtpHGcxDfeGeumGaCRvhkxV7JmU5fVX5uFMd9A60NkYzxonNFlfk1jHXI8E0H32y1GOLrDsfDz + 7AijVGVcJLWv/AwGAKv9fTCt6Xr6shKcVEYvu1vpyX54/1d8PBEO8EjS/mZmumcl3BgTW5Vj1USX + Da1p8dR9hNUyv9tKHG1udZHsP1C4f0Z2hejKU/2riS/xqO0J80v1+6kKYg9Coo633XGWv5OAGzVV + WkQxoF+AJPkATRDif4W9gfju62vLNsc3LP4InQdxV7RtF17AG3KtUuw3HFONKD3vJvMqGH+CoiIz + ErHv8ngkGs1yInvKbKfcSkE4ZCBmOEAZGZubPA3+w92wM6EdyJxoIEct9WWxSAJMrhF8df3TIgpV + jDc1t2GpwdGTOMnQSm7WOpyXMZSAnWk0RpXGkLxVzCdRo6/JZtp2KS2nRcwYJcEzb/ogVJaDRSi7 + 4INahm/hqjSgUza886l/zfrS0sqgpJxXUNVZQsyQfZP7AKR6cisjPuIDZVnp0Sp/WfNJJXrvFJK3 + hgdTNTrYRo3iTZtctnEkTc1w1Po8vk6JGHyTqZ8ppGoIGC5M1av3OwCBo9FAcy7AEuNFYZxAe0wZ + 2Rmba6/fynodK4puR2E4RPQRNJtyfRxz2MeWsrM7pDOTjGABSuGnRd7KCMFkaZ+U3q/WZMx/3qmz + 5MOCGf6eySmNypQCgMCV8DA2Ymz+Ajb1l/lkueH3o8h738iKgZIlsJjtzL2XVmbezGiTZDLyfTaH + 9ultO0no9+PoXiStGVFdF5tN4guqPGiRkxiqvzFNvoTCUSg7mWWSZ4PPf8nYBaCxzKiixGlJHnEU + 2U1Qei+/071sTXn6dBk0pOthcN1Rw4ADNmJDWFRCAjVPZjT/wHz0tRhWdXW4tGU15TIKZIyYBjpY + /ypEUv0/uuAAAAAAAAGWB4BgAACIgMQfqAAK/AIAAAAAAFla + EOS + assert_match(/Payload Version: 2/, shell_output("#{bin}/payload-dumper-go -l payload.bin")) + end +end diff --git a/Formula/p/pazpar2.rb b/Formula/p/pazpar2.rb new file mode 100644 index 0000000000000..bc902adcc948a --- /dev/null +++ b/Formula/p/pazpar2.rb @@ -0,0 +1,61 @@ +class Pazpar2 < Formula + desc "Metasearching middleware webservice" + homepage "https://www.indexdata.com/resources/software/pazpar2/" + url "https://ftp.indexdata.com/pub/pazpar2/pazpar2-1.14.1.tar.gz" + sha256 "9baf590adb52cd796eccf01144eeaaf7353db1fd05ae436bdb174fe24362db53" + license "GPL-2.0-or-later" + revision 8 + + livecheck do + url "https://ftp.indexdata.com/pub/pazpar2/" + regex(/href=.*?pazpar2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "650626377082bec8c3530b1f8cf144b83a54b1770da9059423c23b0bc7093869" + sha256 cellar: :any, arm64_sequoia: "44eb9c8baaa3da4352d9bffbbc57a4d97023c2f26ac3c82f11791cc43b17012d" + sha256 cellar: :any, arm64_sonoma: "2aa9e4eb2662d4e016671bd0c1dd0c23f185ff7d98d5b1ad77fe59ae5728a6a6" + sha256 cellar: :any, arm64_ventura: "f30a7a5de7036e177a68214b7f727ead6dbcc832d52389d80d01521b3c636d91" + sha256 cellar: :any, sonoma: "2c60c0c004da43eb19a4b349a22d6f4da124acefb48238881550625bfbb9a129" + sha256 cellar: :any, ventura: "489ed1569becf8b4dad09fb19fa0085a40dca876351f8165c404cf6c1ecaabf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "50996b95efc667e7e352ec8f13b1e4183b5d425da8779b5e872ac51b096e9ce0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5dc29a2de7c71fb13f0defd9fc5e20d4466a9a74d1d67afb3b1710f52be869bc" + end + + head do + url "https://github.com/indexdata/pazpar2.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + depends_on "icu4c@77" + depends_on "yaz" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + def install + system "./buildconf.sh" if build.head? + system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + (testpath/"test-config.xml").write <<~XML + + + + + + + + XML + + system sbin/"pazpar2", "-t", "-f", testpath/"test-config.xml" + end +end diff --git a/Formula/p/pbc-sig.rb b/Formula/p/pbc-sig.rb new file mode 100644 index 0000000000000..8e482d9a03d38 --- /dev/null +++ b/Formula/p/pbc-sig.rb @@ -0,0 +1,92 @@ +class PbcSig < Formula + desc "Signatures library" + homepage "https://crypto.stanford.edu/pbc/sig/" + url "https://crypto.stanford.edu/pbc/sig/files/pbc_sig-0.0.8.tar.gz" + sha256 "7a343bf342e709ea41beb7090c78078a9e57b833454c695f7bcad2475de9c4bb" + license "GPL-3.0-only" + + livecheck do + url "https://crypto.stanford.edu/pbc/sig/download.html" + regex(/href=.*?pbc_sig[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "8440397e7b7310071d6ea7b5d9696d3f714e6b5cc0a49e87b9f2d8eb76d3959e" + sha256 cellar: :any, arm64_sequoia: "9af9663103707abefc59beba05f6b9e61d969944c35fb504245e9642c5d46d26" + sha256 cellar: :any, arm64_sonoma: "46b23a98ac077bfdf022b651cd1c0d465cf1a9a2e80780b024f7c4bb0df3f9ad" + sha256 cellar: :any, arm64_ventura: "a084822aa386425d1956ac3afdf2accbb8c813d371bbb20711e0f1d147f560ef" + sha256 cellar: :any, arm64_monterey: "d2fde3522eb0285c965608483e1099f231df57528446ce3ebc59cee147459d58" + sha256 cellar: :any, arm64_big_sur: "f99446bcb7e5930651fc63d4a6bea1b34b489e13ad7318a026d0be3ed6fe39f9" + sha256 cellar: :any, sonoma: "0ee9c968c5718f7742607473b2284e92acaf032cf78bc4195d8fd48299d2c89f" + sha256 cellar: :any, ventura: "8842495f3027ac174ab9c9118b3d5c32c87c197fbdb070e7f19308ad251b7947" + sha256 cellar: :any, monterey: "49ba0b0e8757276a5ab822f942f321e7fe5b7efbb2340946e21f3042dbe579bd" + sha256 cellar: :any, big_sur: "9889f70fc5cf42a096c750b61008bf48a97bfece6179db5e7a631010749f1106" + sha256 cellar: :any, catalina: "47773fefdfeb3f7381046934974bbaf7f41a641c3d3f3af5802d07a7ea340ba6" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa052f077db5ddb6e5a54e6b3fa56e350ca6877f208b0636cd703e63de2307d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c1de36643e895261969f7c184fabb031cc2eae412846409a778b21290670d45" + end + + depends_on "gmp" + depends_on "pbc" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + # https://groups.google.com/forum/#!topic/pbc-devel/ZmFCHZmrhcw + patch :DATA + + def install + # Disable -fnested-functions CFLAG on ARM, which will cause it to fail with: + # incompatible redeclaration of library function 'pow' + # Reported upstream here: https://groups.google.com/g/pbc-devel/c/WXwVWKoouj0. + inreplace "configure", "-fnested-functions", "" if OS.mac? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + pbc_param_t param; + pairing_t pairing; + bls_sys_param_t bls_param; + pbc_param_init_a_gen(param, 160, 512); + pairing_init_pbc_param(pairing, param); + bls_gen_sys_param(bls_param, pairing); + bls_clear_sys_param(bls_param); + pairing_clear(pairing); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{Formula["pbc"].lib}", + "-L#{lib}", "-lpbc", "-lpbc_sig" + system "./test" + end +end + +__END__ +diff --git a/sig/bbs.c b/sig/bbs.c +index ed1b437..8aa8331 100644 +--- a/sig/bbs.c ++++ b/sig/bbs.c +@@ -1,4 +1,5 @@ + //see Boneh, Boyen and Shacham, "Short Group Signatures" ++#include + #include + #include "pbc_sig.h" + #include "pbc_hash.h" diff --git a/Formula/p/pbc.rb b/Formula/p/pbc.rb new file mode 100644 index 0000000000000..640ef2e5e5698 --- /dev/null +++ b/Formula/p/pbc.rb @@ -0,0 +1,84 @@ +class Pbc < Formula + desc "Pairing-based cryptography" + homepage "https://crypto.stanford.edu/pbc/" + url "https://crypto.stanford.edu/pbc/files/pbc-1.0.0.tar.gz" + sha256 "18275a367283077bafe35f443200499e3b19c4a3754953da2a1b2f0d6b5922dc" + license "LGPL-3.0-only" + + livecheck do + url "https://crypto.stanford.edu/pbc/download.html" + regex(/href=.*?pbc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c9aa4953390dd8fc51665f703e72ed82c6d643a75f975cce1339ddb280d212d2" + sha256 cellar: :any, arm64_sequoia: "540e6c2c25f64b9f01683b78101895359c1e317f0c040e1d6dcae389414faff7" + sha256 cellar: :any, arm64_sonoma: "5c83b34f16294a88154eb2ca05a38730aafd3426dc5680ce92426e6377ee1f28" + sha256 cellar: :any, arm64_ventura: "b45ad43cbfe26bf2a5afd507c6f9dba996b7069635d04321466eec6805f64a64" + sha256 cellar: :any, sonoma: "87458237aa1d5e59deff3fde34155d58eba87df565e7f6c924f81171a6a634be" + sha256 cellar: :any, ventura: "339f7b3535980d063d87c42b9a22fc2b6ca882857347358f207bf6d9b8cd768e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bae3b376382982b1575a9f8b67b1cc476bedca4029a88cdb42f3407c8710f80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77d9e6a22ef1c9a1253703a33e6c734aa3c223a031cf17cec702bc1f9c8d5834" + end + + head do + url "https://repo.or.cz/pbc.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gmp" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + # fix flex yywrap function detection issue + ENV["ac_cv_search_yywrap"] = "yes" + + system "./setup" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + pbc_param_t param; + pairing_t pairing; + element_t g1, g2, gt1, gt2, gt3, a, g1a; + pbc_param_init_a_gen(param, 160, 512); + pairing_init_pbc_param(pairing, param); + element_init_G1(g1, pairing); + element_init_G2(g2, pairing); + element_init_G1(g1a, pairing); + element_init_GT(gt1, pairing); + element_init_GT(gt2, pairing); + element_init_GT(gt3, pairing); + element_init_Zr(a, pairing); + element_random(g1); element_random(g2); element_random(a); + element_pairing(gt1, g1, g2); // gt1 = e(g1, g2) + element_pow_zn(g1a, g1, a); // g1a = g1^a + element_pow_zn(gt2, gt1, a); // gt2 = gt1^a = e(g1, g2)^a + element_pairing(gt3, g1a, g2); // gt3 = e(g1a, g2) = e(g1^a, g2) + assert(element_cmp(gt2, gt3) == 0); // assert gt2 == gt3 + element_clear(g1); element_clear(g2); element_clear(gt1); + element_clear(gt2); element_clear(gt3); element_clear(a); + element_clear(g1a); + pairing_clear(pairing); + return 0; + } + C + system ENV.cc, "test.c", "-L#{Formula["gmp"].lib}", "-lgmp", "-L#{lib}", + "-lpbc", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pbzip2.rb b/Formula/p/pbzip2.rb new file mode 100644 index 0000000000000..bfbcee7a31db9 --- /dev/null +++ b/Formula/p/pbzip2.rb @@ -0,0 +1,74 @@ +class Pbzip2 < Formula + desc "Parallel bzip2" + homepage "http://compression.great-site.net/pbzip2/" + url "https://launchpad.net/pbzip2/1.1/1.1.13/+download/pbzip2-1.1.13.tar.gz" + sha256 "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6" + license "bzip2-1.0.6" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "484b76c243682d69066e15002d253fdc6179837c811a98855c53def0e830a761" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09d47c48c9c64a8c026c28f30e3e0074f1f0a195d5886d37e1a15f6925ab91bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96fd12c7e49a4710a7d718412bc0d1cbda865873486489bb068ff49bd5c23dd9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef28ddb3c52e0a2fba318d9a5e95dea37414a1a98d7e2c8277d2edccb8d09572" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0f797274e8b39d8abd60046352780028c987a268a78e3229e6ce8ff845bcd424" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a42feae1d424ac132a520973b5bb9517bdf83bda8439263008b20c2208ed493" + sha256 cellar: :any_skip_relocation, sonoma: "935dbc363cc12919d81114e7fe614ee662dfd365c831ac587e0e8630aabb8809" + sha256 cellar: :any_skip_relocation, ventura: "b4a7a29f559ab1ccc53aae75504fe277aa2037887991f8b622e9db3ad313ba8e" + sha256 cellar: :any_skip_relocation, monterey: "740e3b3cee57142c2fe385795782f86bbfd02e96cfc6c5a8f2d63da647ffbaec" + sha256 cellar: :any_skip_relocation, big_sur: "ea9f81b7830949f9e449c5277807f931e3041a63071bf0b66a9c254cbff2e965" + sha256 cellar: :any_skip_relocation, catalina: "57c1c1065cd29ee37187b87705adfb73b84d114fc46408d4690024f3a29ac837" + sha256 cellar: :any_skip_relocation, arm64_linux: "c63518fb5d60d394bcc30e58d8af968509e373d1b658fdcc0a42b48368fd4b1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33c30ab657b712607e295bb648c8d7ce7c5590ec916aef948e2f38dc25c51551" + end + + uses_from_macos "bzip2" + + # Fixes: error: implicit instantiation of undefined template 'std::char_traits' + # https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes#C++-Standard-Library + on_macos do + patch :DATA + end + + def install + # Workaround for Xcode 16 (Clang 16) + ENV.append "CXXFLAGS", "-Wno-reserved-user-defined-literal" if DevelopmentTools.clang_build_version >= 1600 + + # C++20 is required for char8_t in the patch. + ENV.append "CXXFLAGS", "-std=c++20" if OS.mac? + + system "make", "PREFIX=#{prefix}", + "CXX=#{ENV.cxx}", + "CXXFLAGS=#{ENV.cxxflags}", + "install" + end + + test do + system bin/"pbzip2", "--version" + end +end + +__END__ +--- a/BZ2StreamScanner.cpp ++++ b/BZ2StreamScanner.cpp +@@ -42,7 +42,7 @@ int BZ2StreamScanner::init( int hInFile, size_t inBuffCapacity ) + { + dispose(); + +- CharType bz2header[] = "BZh91AY&SY"; ++ CharType bz2header[] = u8"BZh91AY&SY"; + // zero-terminated string + CharType bz2ZeroHeader[] = + { 'B', 'Z', 'h', '9', 0x17, 0x72, 0x45, 0x38, 0x50, 0x90, 0 }; +--- a/BZ2StreamScanner.h ++++ b/BZ2StreamScanner.h +@@ -20,7 +20,7 @@ namespace pbzip2 + class BZ2StreamScanner + { + public: +- typedef unsigned char CharType; ++ typedef char8_t CharType; + + static const size_t DEFAULT_IN_BUFF_CAPACITY = 1024 * 1024; // 1M + static const size_t DEFAULT_OUT_BUFF_LIMIT = 1024 * 1024; diff --git a/Formula/p/pbzx.rb b/Formula/p/pbzx.rb new file mode 100644 index 0000000000000..ed8f9f0873d23 --- /dev/null +++ b/Formula/p/pbzx.rb @@ -0,0 +1,39 @@ +class Pbzx < Formula + desc "Parser for pbzx stream" + homepage "https://github.com/NiklasRosenstein/pbzx/" + url "https://github.com/NiklasRosenstein/pbzx/archive/refs/tags/v1.0.2.tar.gz" + sha256 "33db3cf9dc70ae704e1bbfba52c984f4c6dbfd0cc4449fa16408910e22b4fd90" + license "GPL-3.0-or-later" + head "https://github.com/NiklasRosenstein/pbzx.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ecaa1ce184ca795a79c535697ba31b5a4149599641d561248263f27bf175c9ca" + sha256 cellar: :any, arm64_sonoma: "37c826c9cf597002de46eeec44865b96760d06533ca6eee7352721f2fb8cf1c4" + sha256 cellar: :any, arm64_ventura: "2daae05cf14027d7cefc132e705bf69a04e4fd5425c4856bda3ba33da6ce575f" + sha256 cellar: :any, arm64_monterey: "52198369eac9a2ce3b84a3d293517c84dd9fbea20010379ece7ac849cedeba2c" + sha256 cellar: :any, arm64_big_sur: "12bb9d8f9ab80e43ed3627ffb4add78ab55d965814b8e2551ef78426ee47c869" + sha256 cellar: :any, sonoma: "b345f7bcd1e71ce488c316ecd1396a43e12c8f9bafebf5a31eb8dcae1b687ae1" + sha256 cellar: :any, ventura: "3b5afc8a47a77098c4d0d223cca7b74793a42785bf0d60274aaa841abf1d576d" + sha256 cellar: :any, monterey: "40bd57e2e67b8558e65a82a981cd864c2f9644a90475e942423a631b6cdfd190" + sha256 cellar: :any, big_sur: "8444ecb5864ac3a5324a92620b3ac280deac66cc09621cd7cdc1c5e8b94f119b" + sha256 cellar: :any, catalina: "c6d161a1c58bcbc3e1f6d8bcf7ec567a0f93cafe626849838cf4d8ec4c90044a" + end + + deprecate! date: "2024-03-13", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + # pbzx is a format employed OSX disk images + depends_on :macos + depends_on "xz" + + def install + system ENV.cc, "-llzma", "-lxar", "pbzx.c", "-o", "pbzx" + bin.install "pbzx" + end + + test do + assert_match "0 blocks", shell_output("#{bin}/pbzx -n Payload | cpio -i 2>&1") + + assert_match version.to_s, shell_output("#{bin}/pbzx -v") + end +end diff --git a/Formula/p/pc6001vx.rb b/Formula/p/pc6001vx.rb new file mode 100644 index 0000000000000..95472ddb058fb --- /dev/null +++ b/Formula/p/pc6001vx.rb @@ -0,0 +1,73 @@ +class Pc6001vx < Formula + desc "PC-6001 emulator" + # http://eighttails.seesaa.net/ gives 405 error + homepage "https://github.com/eighttails/PC6001VX" + url "https://eighttails.up.seesaa.net/bin/PC6001VX_4.2.14_src.tar.gz" + sha256 "8b572e0dfb105ad003d7ebdbfe0d081af1189052f362d4ae5455833efe0539c7" + license "LGPL-2.1-or-later" + head "https://github.com/eighttails/PC6001VX.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c3640b78c52caae41034980b2280579c6bb2499a4a4bc6132342e4e4785fd13b" + sha256 cellar: :any, arm64_sequoia: "8c21157b4335e3c97de381021b0a4e44002d04114b0214f4cef7429a0ed4e0ee" + sha256 cellar: :any, arm64_sonoma: "b5ff45c2bbd4247b053c2035769d4f9484937c581c069545b9f260ab6b14d201" + sha256 cellar: :any, sonoma: "155c94239fac16860061cdc20b9ee40b691254e25004ee12544fa9bf0af02154" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d67d8aaf2c7eeba5e349cab8d7d26696d4b56209302919bc7125082570ac386" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87fd8a3b22acf6318d2b75ed308a1a0afb924a3f9255d74aa1b4a1f5491fc569" + end + + depends_on "pkgconf" => :build + depends_on "qttools" => :build + depends_on "ffmpeg" + depends_on "qtbase" + depends_on "qtmultimedia" + depends_on "sdl2" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "libx11" + end + + def install + mkdir "build" do + system "qmake", "PREFIX=#{prefix}", + "QMAKE_CXXFLAGS=#{ENV.cxxflags}", + "CONFIG+=no_include_pwd", + ".." + system "make" + + if OS.mac? + prefix.install "PC6001VX.app" + bin.write_exec_script prefix/"PC6001VX.app/Contents/MacOS/PC6001VX" + else + bin.install "PC6001VX" + end + end + end + + test do + # Set QT_QPA_PLATFORM to minimal to avoid error: + # "This application failed to start because no Qt platform plugin could be initialized." + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + # locales aren't set correctly within the testing environment + ENV["LC_ALL"] = "en_US.UTF-8" + + user_config_dir = testpath/".pc6001vx4" + user_config_dir.mkpath + pid = spawn bin/"PC6001VX" + sleep 30 + sleep 45 if OS.mac? && Hardware::CPU.intel? + assert_path_exists user_config_dir/"rom", "User config directory should exist" + ensure + # the first SIGTERM signal closes a window which spawns another immediately + # after 5 seconds, send a second SIGTERM signal to ensure the process is fully stopped + Process.kill("TERM", pid) + sleep 5 + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/p/pcal.rb b/Formula/p/pcal.rb new file mode 100644 index 0000000000000..3bf52656fe936 --- /dev/null +++ b/Formula/p/pcal.rb @@ -0,0 +1,42 @@ +class Pcal < Formula + desc "Generate Postscript calendars without X" + homepage "https://pcal.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pcal/pcal/pcal-4.11.0/pcal-4.11.0.tgz" + sha256 "8406190e7912082719262b71b63ee31a98face49aa52297db96cc0c970f8d207" + license :cannot_represent + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f1e0e7b42a908bec8dcf41782a3e4b9397955a95a9c0781ef8e21fbf2ef8a327" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9cb1a02b94bf537f5f1aab6ee035a1ade559ce499f53afabff16e0795b21868" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19b81c568f2c5aae1c0d148f8c9746f858613c11c2fb5196264f73297dbcb7b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d837d4b3cb7b1133b733c4c688a1d36ef7117fd5b9668e8c671a38f46f6ed9b3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4b4a76aed457b08622d910fadeacd998972ed4c16a9c2747fac5c26d4ecfbab4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fdd9d437f60310691c6df93af1ee0bd2cc08e8bae5ee3fa1d73d76b76b4c88e4" + sha256 cellar: :any_skip_relocation, sonoma: "ac1418d17450998bec7de62e86d71d0bc116cd4eb0ae45d5756d701ceecfa697" + sha256 cellar: :any_skip_relocation, ventura: "3c4d6d54cba50845f194e621e60a86d71f16712a1bf643eeff14cd669b08a7d1" + sha256 cellar: :any_skip_relocation, monterey: "8b780cbb1c7a72381be2baf453fc7f9f3940aa30e73608928682a2acf6266fab" + sha256 cellar: :any_skip_relocation, big_sur: "53c8157fa626298655248853dc283fe15947f47c725de2ea0c934773f0470063" + sha256 cellar: :any_skip_relocation, catalina: "9d7f46d2cbf308cd81bcce8fb98e48d295917562a46e509e739cad51d90dcf2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8f41a9d2ac3d3944d6e0e64a4d502f9c317cfbd47ed8471c4b230b159a653d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4ca61c591e3d9f96352a2b83689f5dad406082f164eeb621602400aed315a9a" + end + + uses_from_macos "mandoc" => :build + uses_from_macos "ncompress" => :build + + def install + # mandoc is only available since Ventura, but groff is available for older macOS + inreplace "Makefile", /[gn]roff /, "mandoc " if !OS.mac? || MacOS.version >= :ventura + + ENV.deparallelize + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" + system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man1}", + "CATDIR=#{man}/cat1" + end + + test do + system bin/"pcal" + end +end diff --git a/Formula/p/pcalc.rb b/Formula/p/pcalc.rb new file mode 100644 index 0000000000000..b0b988382dac5 --- /dev/null +++ b/Formula/p/pcalc.rb @@ -0,0 +1,36 @@ +class Pcalc < Formula + desc "Calculator for those working with multiple bases, sizes, and close to the bits" + homepage "https://github.com/alt-romes/programmer-calculator" + url "https://github.com/alt-romes/programmer-calculator/archive/refs/tags/v3.0.tar.gz" + sha256 "6ede71e1442710e73edb99eb1742452e67ad5095cad328526633722850aa1136" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3ab7fd9f1bd17b8ae50aaf5c5e419e1ba13214e5362f09b235b834555001ab6e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a2b4d667859884ae73bdc1d92bcb74b9cd916f249e72b7ff11c55850caa0f83d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1213e5809a02adfdb8f3d9b37c9fc20f3bdc55f33f165c40205bab09fd118bad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8726e03985b7241593b16d00eafd49b008e479058d3bf984da595c3e4cc2195a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8cb160f96c00151800102a58e493b8e394bfdaea743329ca7af245502185bdf5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ba2a72db4f367a3ae6dceef1eba8eb5e9ea84586acef55d163d53503a3ffddb1" + sha256 cellar: :any_skip_relocation, sonoma: "d42537f4273abcdc5edac493debde8238b833ec7110e6686692ce00128c85661" + sha256 cellar: :any_skip_relocation, ventura: "7929c84fa052dc93f47b5dfe37d4332ff916e2c300739b08f721e72bea265a86" + sha256 cellar: :any_skip_relocation, monterey: "2259c04f3360d9bb7c26693fe47651972408c21d2b18a7760ecc218d2e2a33ab" + sha256 cellar: :any_skip_relocation, big_sur: "bfef357df427a5d36419bee76ac2a65ce36e191c354d9d773f53b3ed6fd7058f" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d33ee09634262b3a6328d6c1bea82836652fbae7b797f2d507026491d25fd47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bfe8638f58d9b4a6b71c50f08d37b6bf10e773ff1d43946879269cf00df69d4" + end + + uses_from_macos "ncurses" + + def install + system "make" + bin.install "pcalc" + end + + test do + assert_equal "Decimal: 0, Hex: 0x0, Operation: \nDecimal: 3, Hex: 0x3, Operation:", + shell_output("echo \"0x1+0b1+1\nquit\" | #{bin}/pcalc -n").strip + end +end diff --git a/Formula/p/pcapplusplus.rb b/Formula/p/pcapplusplus.rb new file mode 100644 index 0000000000000..7157f501668e5 --- /dev/null +++ b/Formula/p/pcapplusplus.rb @@ -0,0 +1,65 @@ +class Pcapplusplus < Formula + desc "C++ network sniffing, packet parsing and crafting framework" + homepage "https://pcapplusplus.github.io" + url "https://github.com/seladb/PcapPlusPlus/archive/refs/tags/v25.05.tar.gz" + sha256 "66c11d61f3c8019eaf74171ad10229dfaeab27eb86859c897fb0ba1298f80c94" + license "Unlicense" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "badacc3ee645e30f563ebd4c127a993b0ecb64beb34d2663965e7e57daae345c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0fa7a89759395ca21657a2f4ad0cd1ce38956a9bdef1000feffa86dfd4f3a2b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e0d980ded05983801b97aa6f7737f7c4bf91252fb2e146ed552514d5b5b8547" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eb59ce27fdc30a559228ff984d4a2f51a2ea86c693a575736537296175ec2244" + sha256 cellar: :any_skip_relocation, sonoma: "9019452d1e6616946480223d5725df1f1ea43c3bdb5652c0c387b10a8239d2c4" + sha256 cellar: :any_skip_relocation, ventura: "f6a57b0410bd1a733ee3b342addf244cda48557be7f226b46c3dfb4d1ed2df7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e09fd13802dd4b8149f58fb69cfaf46dab0faeff6b0db6381809ee03fb9188bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42c2a06a698bfd44bef147d045900a270af1418a3d2828d0ff406f1eeb0c02af" + end + + depends_on "cmake" => [:build, :test] + uses_from_macos "libpcap" + + def install + cmake_args = %w[ + -DPCAPPP_BUILD_EXAMPLES=OFF + -DPCAPPP_BUILD_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.12) + project(TestPcapPlusPlus) + set(CMAKE_CXX_STANDARD 11) + + find_package(PcapPlusPlus CONFIG REQUIRED) + + add_executable(test test.cpp) + target_link_libraries(test PUBLIC PcapPlusPlus::Pcap++) + set_target_properties(test PROPERTIES NO_SYSTEM_FROM_IMPORTED ON) + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + const std::vector& devList = + pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList(); + if (devList.size() > 0) { + if (devList[0]->getName() == "") + return 1; + return 0; + } + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build", "--target", "test" + system "./build/test" + end +end diff --git a/Formula/p/pcaudiolib.rb b/Formula/p/pcaudiolib.rb new file mode 100644 index 0000000000000..238a443007958 --- /dev/null +++ b/Formula/p/pcaudiolib.rb @@ -0,0 +1,59 @@ +class Pcaudiolib < Formula + desc "Portable C Audio Library" + homepage "https://github.com/espeak-ng/pcaudiolib" + url "https://github.com/espeak-ng/pcaudiolib/releases/download/1.3/pcaudiolib-1.3.tar.gz" + sha256 "e8bd15f460ea171ccd0769ea432e188532a7fb27fa73ec2d526088a082abaaad" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "797c5e0ec4adb982e3efbcb3ff386d0ad3bbe212e731ce88375002cc6d0cf72d" + sha256 cellar: :any, arm64_sequoia: "9581956c3f6ac62ed80312bad32f93be3bda767e7fb6ce251c600971371bbdd8" + sha256 cellar: :any, arm64_sonoma: "bd84f4e1511c570a34e372cf8f4532e92e9eaea2089e0a93d387f191d5c36845" + sha256 cellar: :any, arm64_ventura: "3d8b34973b1a08cf739c4b7ce2c6a5b80dbfb3856d5777c5f26d4b9011b62bff" + sha256 cellar: :any, sonoma: "48118ebffee0146173486843027d4b5a07c8dd0c7be2a17a8fac5de80aebf6f8" + sha256 cellar: :any, ventura: "cc9fdf752114a5959fd6906ecd9b2bf182eea8eae5a43769ba6434e3679d6d2d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f2763bfa17d7805667730aeff7bcdc00f649d41e82e51415ad36b2a135da6dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "103253ad42ee7905b3f45cba3c1fdfc646aca631b912f1346589e7f79e916fd4" + end + + head do + url "https://github.com/espeak-ng/pcaudiolib.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "pulseaudio" + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + struct audio_object *my_audio = create_audio_device_object(NULL, "test", "test"); + int error = audio_object_open(my_audio, AUDIO_OBJECT_FORMAT_S16LE, 22050, 1); + if (error != 0) + printf("audio_object_open error: %s", audio_object_strerror(my_audio, error)); + audio_object_close(my_audio); + audio_object_destroy(my_audio); + return error; + } + C + + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lpcaudio" + system "./test" + end +end diff --git a/Formula/p/pcb.rb b/Formula/p/pcb.rb new file mode 100644 index 0000000000000..c919a7106076a --- /dev/null +++ b/Formula/p/pcb.rb @@ -0,0 +1,92 @@ +class Pcb < Formula + desc "Interactive printed circuit board editor" + homepage "http://pcb.geda-project.org/" + url "https://downloads.sourceforge.net/project/pcb/pcb/pcb-4.3.0/pcb-4.3.0.tar.gz" + sha256 "ae852f46af84aba7f51d813fb916fc7fcdbeea43f7134f150507024e1743fb5e" + license "GPL-2.0-or-later" + revision 1 + version_scheme 1 + + bottle do + sha256 arm64_tahoe: "d47e9044a1a9580a71e41ffd91541653a9b8d8c721441f0d2d63406a16ca5706" + sha256 arm64_sequoia: "2a52b59cc8b8207bd28cde88cc56ad797d2aa021d1cb145bffa93368a7371014" + sha256 arm64_sonoma: "191403f5cf3241f6322f861bf87c986a5e9e584b718694a09e8d78ffe88090de" + sha256 arm64_ventura: "50572577988176158590776ea433364a6198912f1a7a723894850210ed83df8d" + sha256 arm64_monterey: "7782eb09fd3afc492dee0cf01c174076d43d57af106b0e17179309dddeb691c2" + sha256 sonoma: "c130c3df546d25dc2bd04ecab6bab91443a78ae03fbdc69ddbcd8cc9254cf41f" + sha256 ventura: "146de3e1c90e9fd5cd77cbfc9e9f803d3aeff8c15488e8c58f4131dcbd73a920" + sha256 monterey: "fcba66246a65011041d14e79b9374017581de797ed85de564ce79358f796caf4" + sha256 arm64_linux: "34ef58a579664a04a77783e8f75f4f4418b7f29de5dcdc8d1db60a030f2634c5" + sha256 x86_64_linux: "14d163a567ff23fb93d3c08b11c6e70d0ccd80a6897a01ffe4fdd3e112330ec1" + end + + head do + url "git://git.geda-project.org/pcb.git" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + # Original homepage http://pcb.geda-project.org/ redirects to + # http://www.repo.hu/projects/geda-archive/pcb.geda-project.org/ which states + # > WARNING: the gEDA/pcb project is not actively developed anymore. + # > You may want to switch to the Ringdove EDA project which is similar in spirit but is active. + deprecate! date: "2025-09-06", because: :unmaintained # TODO: replacement_formula: "pcb-rnd" + + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "dbus" + depends_on "gd" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "glib" + depends_on "gtk+" + depends_on "gtkglext" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "perl" => :build + uses_from_macos "tcl-tk" + + on_macos do + depends_on "at-spi2-core" + depends_on "gnu-sed" + depends_on "harfbuzz" + depends_on "libxrender" + depends_on "pango" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + conflicts_with "gts", because: "both install a `gts.h` header" + + def install + if OS.mac? + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" + else + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" + end + + system "./autogen.sh" if build.head? + args = %w[ + --disable-update-desktop-database + --disable-update-mime-database + --disable-gl + ] + args << "--without-x" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # Disable test on Linux because it fails with: + # Gtk-WARNING **: 09:09:35.919: cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match version.to_s, shell_output("#{bin}/pcb --version") + end +end diff --git a/Formula/p/pcb2gcode.rb b/Formula/p/pcb2gcode.rb new file mode 100644 index 0000000000000..6a415b7130124 --- /dev/null +++ b/Formula/p/pcb2gcode.rb @@ -0,0 +1,126 @@ +class Pcb2gcode < Formula + desc "Command-line tool for isolation, routing and drilling of PCBs" + homepage "https://github.com/pcb2gcode/pcb2gcode" + url "https://github.com/pcb2gcode/pcb2gcode/archive/refs/tags/v2.5.0.tar.gz" + sha256 "96f1b1b4fd58e86f152b691202a15593815949dc9250fab9ab02f2346f5c2c52" + license "GPL-3.0-or-later" + revision 10 + head "https://github.com/pcb2gcode/pcb2gcode.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1c7bb5342f773b41b6b485728e03aac465b7af391595656ca98a534092417cca" + sha256 cellar: :any, arm64_sequoia: "ff258b7d916b2586d2c1275f340e583352c050ce6e11f5fe88769fa1afa9eb18" + sha256 cellar: :any, arm64_sonoma: "f34119207d88d392cd9bc22d9e2f8a60b75dac989cfd4eacd3f65c54b6796752" + sha256 cellar: :any, arm64_ventura: "b01464e9d453255290840876db3899984cceff1a5c6c5046bd6bdae5d79d563e" + sha256 cellar: :any, sonoma: "0cd3f0c8556a36e6bfb7238ecb698108c85c97396e4a6b1966752868c6d3cbe0" + sha256 cellar: :any, ventura: "1bee47236c3414536c8c77badab1057fb363eb35cb76cde433aea647a0bf53f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "06977900652f188f45575688519d4fb379b8d1c01d778e7f5676d79afbac604b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f0101b39171e4e96a6f5db51c8316b78251cd5c78867819d376c8845c5e0ada" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cairomm@1.14" => :build + depends_on "glibmm@2.66" => :build + depends_on "gtkmm" => :build + depends_on "librsvg" => :build + depends_on "libsigc++@2" => :build + depends_on "libtool" => :build + depends_on "pangomm@2.46" => :build + depends_on "pkgconf" => :build + depends_on "at-spi2-core" + depends_on "boost" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gerbv" + depends_on "gettext" + depends_on "glib" + depends_on "gtk+" + depends_on "harfbuzz" + depends_on "pango" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"front.gbr").write <<~EOS + %FSLAX46Y46*% + %MOMM*% + G01* + %ADD11R,2.032000X2.032000*% + %ADD12O,2.032000X2.032000*% + %ADD13C,0.250000*% + D11* + X127000000Y-63500000D03* + D12* + X127000000Y-66040000D03* + D13* + X124460000Y-66040000D01* + X124460000Y-63500000D01* + X127000000Y-63500000D01* + M02* + EOS + (testpath/"edge.gbr").write <<~EOS + %FSLAX46Y46*% + %MOMM*% + G01* + %ADD11C,0.150000*% + D11* + X123190000Y-67310000D02* + X128270000Y-67310000D01* + X128270000Y-62230000D01* + X123190000Y-62230000D01* + X123190000Y-67310000D01* + M02* + EOS + (testpath/"drill.drl").write <<~EOS + M48 + FMAT,2 + METRIC,TZ + T1C1.016 + % + G90 + G05 + M71 + T1 + X127.Y-63.5 + X127.Y-66.04 + T0 + M30 + EOS + (testpath/"millproject").write <<~EOS + metric=true + zchange=10 + zsafe=5 + mill-feed=600 + mill-speed=10000 + offset=0.1 + zwork=-0.05 + drill-feed=1000 + drill-speed=10000 + zdrill=-2.5 + bridges=0.5 + bridgesnum=4 + cut-feed=600 + cut-infeed=10 + cut-speed=10000 + cutter-diameter=3 + fill-outline=true + zbridges=-0.6 + zcut=-2.5 + al-front=true + al-probefeed=100 + al-x=15 + al-y=15 + software=LinuxCNC + EOS + system bin/"pcb2gcode", "--front=front.gbr", + "--outline=edge.gbr", + "--drill=drill.drl" + end +end diff --git a/Formula/p/pce.rb b/Formula/p/pce.rb new file mode 100644 index 0000000000000..8811404d5f42b --- /dev/null +++ b/Formula/p/pce.rb @@ -0,0 +1,68 @@ +class Pce < Formula + desc "PC emulator" + homepage "http://www.hampa.ch/pce/" + license "GPL-2.0-only" + revision 3 + + # TODO: Remove `-fcommon` workaround and switch to `sdl2` on next release + stable do + url "http://www.hampa.ch/pub/pce/pce-0.2.2.tar.gz" + sha256 "a8c0560fcbf0cc154c8f5012186f3d3952afdbd144b419124c09a56f9baab999" + depends_on "sdl12-compat" + end + + livecheck do + url "http://www.hampa.ch/pce/download.html" + regex(/href=.*?pce[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e75f725e3f355fec9e470c79180eb547575cee5c223e58ec67c2d4affa16bc30" + sha256 cellar: :any, arm64_sequoia: "e3d82bb4edc2bdcf6f53ca58219d9f750cda8e0bfea13859764900e9d143d709" + sha256 cellar: :any, arm64_sonoma: "3874dacd53efffaf435c7985575be825d3c50c64d142a4936e26dd6c22ffeb1d" + sha256 cellar: :any, sonoma: "d12b682138c89026b7cdc5b6fdeab59642b2fcc1cc23c3fbd31c6d3b5d6e30b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "f04b8a55a22eed4d80da0bd08e216c4a0c1adc6c5281199fba17e59f17337257" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10292a0e1101299ae6d09ea8a36478b444148da246a25fb132d2a126b082925d" + end + + head do + url "git://git.hampa.ch/pce.git", branch: "master" + depends_on "sdl2" + end + + depends_on "nasm" => :build + uses_from_macos "libedit" # readline's license is incompatible with GPL-2.0-only + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # src/cpu/e68000/e68000.a(e68000.o):(.bss+0x0): multiple definition of `e68_ea_tab' + # TODO: Remove in the next release. + ENV.append_to_cflags "-fcommon" if OS.linux? && build.stable? + + if OS.mac? + # Workaround to allow macOS libedit to be used instead of readline + inreplace "configure", " -lhistory ", " " + else + ENV.append_to_cflags "-I#{Formula["libedit"].opt_libexec}/include" + ENV.append "LDFLAGS", "-L#{Formula["libedit"].opt_libexec}/lib" + end + + system "./configure", "--enable-readline", + "--without-x", + *std_configure_args + system "make" + + # We need to run 'make install' without parallelization, because + # of a race that may cause the 'install' utility to fail when + # two instances concurrently create the same parent directories. + ENV.deparallelize + system "make", "install" + end + + test do + system bin/"pce-ibmpc", "-V" + end +end diff --git a/Formula/p/pciutils.rb b/Formula/p/pciutils.rb new file mode 100644 index 0000000000000..2ea851504fc4d --- /dev/null +++ b/Formula/p/pciutils.rb @@ -0,0 +1,27 @@ +class Pciutils < Formula + desc "PCI utilities" + homepage "https://github.com/pciutils/pciutils" + url "https://github.com/pciutils/pciutils/archive/refs/tags/v3.14.0.tar.gz" + sha256 "9f99bb89876510435fbfc47bbc8653bc57e736a21915ec0404e0610460756cb8" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_linux: "04bcc2da98a252bebdd8b6206957de9b5d4409c58fe2533197fcc6b3a71eed5f" + sha256 x86_64_linux: "684b1f7d95352c1d14a3a9431c7cccf4e5326e6e80c517d092afd8bd7d860fdf" + end + + depends_on :linux # arm64 macOS is not supported: https://github.com/pciutils/pciutils/issues/111 + depends_on "zlib" + + def install + args = ["ZLIB=yes", "DNS=yes", "SHARED=yes", "PREFIX=#{prefix}", "MANDIR=#{man}"] + system "make", *args + system "make", "install", *args + system "make", "install-lib", *args + end + + test do + assert_match "lspci version", shell_output("#{bin}/lspci --version") + assert_match(/Host bridge:|controller:/, shell_output("#{bin}/lspci")) + end +end diff --git a/Formula/p/pcl.rb b/Formula/p/pcl.rb new file mode 100644 index 0000000000000..f3720a3239d48 --- /dev/null +++ b/Formula/p/pcl.rb @@ -0,0 +1,158 @@ +class Pcl < Formula + desc "Library for 2D/3D image and point cloud processing" + homepage "https://pointclouds.org/" + license "BSD-3-Clause" + revision 2 + head "https://github.com/PointCloudLibrary/pcl.git", branch: "master" + + stable do + url "https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.15.1.tar.gz" + sha256 "e1d862c7b6bd27a45884a825a2e509bfcbd4561307d5bfe17ce5c8a3d94a6c29" + + # Backport support for eigen 5.0.0 + patch do + url "https://github.com/PointCloudLibrary/pcl/commit/2d6929bdcd98beaa28fa8ee3a105beb566f16347.patch?full_index=1" + sha256 "66e6b47a2373224f6a64a87124c94fbe79d3624b4cb0d71603c4805323343b62" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bffd9015641e8e0f41a330b289769f391526de7fce302c55b47a1810855c7714" + sha256 cellar: :any, arm64_sequoia: "05c3ab811e06258620ba9e48aed56ebd7554212475bf2edb28b02d733caf70d3" + sha256 cellar: :any, arm64_sonoma: "ee46a4518eb4226857b485d46713fe174bc1ce94c50b00babb74e7490f88f838" + sha256 cellar: :any, sonoma: "7c576693ae1468c7a962f072e67a453caf33f33fe9d8aabcd9cdf5606dbc2c49" + sha256 cellar: :any_skip_relocation, arm64_linux: "c88cb862a00392e09048310d551d33f367d691af7320c9c261960bb7a3f7a6a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5db03271116649a3db04c7895d4f37cc0c9b8297bd748418e10310570f2736e" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => [:build, :test] + depends_on "boost" + depends_on "cjson" + depends_on "eigen" + depends_on "flann" + depends_on "glew" + depends_on "libpcap" + depends_on "libpng" + depends_on "libusb" + depends_on "lz4" + depends_on "qhull" + depends_on "qtbase" + depends_on "vtk" + + on_macos do + depends_on "freetype" + depends_on "libomp" + end + + on_linux do + depends_on "freeglut" + depends_on "libx11" + depends_on "mesa" + depends_on "mesa-glu" + end + + # Apply open PR to fix build with Boost 1.89 + # PR ref: https://github.com/PointCloudLibrary/pcl/pull/6330 + patch do + url "https://github.com/PointCloudLibrary/pcl/commit/8dfb0e10ebdf4a5086328b38f854294d2d6b1627.patch?full_index=1" + sha256 "f31c11abb6bec8864b7a109472768ba80e87ddf90533890c303294d264f389e1" + end + + def install + args = %w[ + -DBUILD_SHARED_LIBS:BOOL=ON + -DBUILD_apps=AUTO_OFF + -DBUILD_apps_3d_rec_framework=AUTO_OFF + -DBUILD_apps_cloud_composer=AUTO_OFF + -DBUILD_apps_in_hand_scanner=AUTO_OFF + -DBUILD_apps_point_cloud_editor=AUTO_OFF + -DBUILD_examples:BOOL=OFF + -DBUILD_global_tests:BOOL=OFF + -DBUILD_outofcore:BOOL=AUTO_OFF + -DBUILD_people:BOOL=AUTO_OFF + -DBUILD_simulation:BOOL=ON + -DWITH_CUDA:BOOL=OFF + -DWITH_DOCS:BOOL=OFF + -DWITH_TUTORIALS:BOOL=OFF + -DBoost_USE_DEBUG_RUNTIME:BOOL=OFF + ] + + args << if build.head? + "-DBUILD_apps_modeler=AUTO_OFF" + else + "-DBUILD_apps_modeler:BOOL=OFF" + end + + # The AppleClang versions shipped on current MacOS versions do not support the -march=native flag on arm + args << "-DPCL_ENABLE_MARCHNATIVE:BOOL=OFF" if build.bottle? + + # Work around ../../lib/libpcl_cc_tool_interface.a(mocs_compilation.cpp.o): + # relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `...' which may bind + # externally can not be used when making a shared object; recompile with -fPIC + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" if OS.linux? && Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + prefix.install bin.glob("*.app") + end + + test do + assert_match "tiff files", shell_output("#{bin}/pcl_tiff2pcd -h", 255) + # inspired by https://pointclouds.org/documentation/tutorials/writing_pcd.html + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0 FATAL_ERROR) + project(pcd_write) + find_package(PCL 1.2 REQUIRED) + include_directories(${PCL_INCLUDE_DIRS}) + link_directories(${PCL_LIBRARY_DIRS}) + add_definitions(${PCL_DEFINITIONS}) + add_executable (pcd_write pcd_write.cpp) + target_link_libraries (pcd_write ${PCL_LIBRARIES}) + CMAKE + (testpath/"pcd_write.cpp").write <<~CPP + #include + #include + #include + + int main (int argc, char** argv) + { + pcl::PointCloud cloud; + + // Fill in the cloud data + cloud.width = 2; + cloud.height = 1; + cloud.is_dense = false; + cloud.points.resize (cloud.width * cloud.height); + int i = 1; + for (auto& point: cloud) + { + point.x = i++; + point.y = i++; + point.z = i++; + } + + pcl::io::savePCDFileASCII ("test_pcd.pcd", cloud); + return (0); + } + CPP + # the following line is needed to workaround a bug in test-bot + # (Homebrew/homebrew-test-bot#544) when bumping the boost + # revision without bumping this formula's revision as well + ENV.prepend_path "PKG_CONFIG_PATH", Formula["eigen"].opt_share/"pkgconfig" + + ENV.delete "CPATH" # `error: no member named 'signbit' in the global namespace` + + args = OS.mac? ? [] : ["-DCMAKE_BUILD_RPATH=#{lib}"] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "./build/pcd_write" + assert_path_exists testpath/"test_pcd.pcd" + output = File.read("test_pcd.pcd") + assert_match "POINTS 2", output + assert_match "1 2 3", output + assert_match "4 5 6", output + end +end diff --git a/Formula/p/pcp.rb b/Formula/p/pcp.rb new file mode 100644 index 0000000000000..7182f1dfef11e --- /dev/null +++ b/Formula/p/pcp.rb @@ -0,0 +1,47 @@ +class Pcp < Formula + desc "Command-line peer-to-peer data transfer tool based on libp2p" + homepage "https://github.com/dennis-tra/pcp" + url "https://github.com/dennis-tra/pcp.git", + tag: "v0.4.0", + revision: "7f638fe42f6dbd17e5bf5a7be5854220e2858eb2" + license "Apache-2.0" + head "https://github.com/dennis-tra/pcp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "04541e8deed7d35083d097a27b11789caacd0807c092a924bcfb20f926c08a1e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b70326a9568fb548f3ce008619104436192af8cd247f06eb722057d8188e828d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1aaac9b306226ce54909757ccdb10996d84803605c1e01f6f08e907ba7b30ec0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1bfa73d57867b1d14809dca455e97ebcb4cb36c67080f64f8a44b242719cf79" + sha256 cellar: :any_skip_relocation, arm64_monterey: "127549faab2d9cb13ebd4ea2d7dfd17f0054776367769631b387aada1f7eacd6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8d495ee0f766c2d09355453d4f4691c7d5ca9bdf57ac82c0ef1d3552df19fefe" + sha256 cellar: :any_skip_relocation, sonoma: "4fddd434a5b6f469fd52bd804b85b4bad0f0814df4bc3f3e55b10534277c65d9" + sha256 cellar: :any_skip_relocation, ventura: "57e0f9db54f3539e0ef5a09bc957ca39e03fd8bd1db1764c47c06a13d7fc52a2" + sha256 cellar: :any_skip_relocation, monterey: "37aa1824b66b4581a3c2054c26731ee41ab757e3d768399ec43dedbfe2bc183e" + sha256 cellar: :any_skip_relocation, big_sur: "7fec012a0331f8ded437d4af20dd6ff527ca0b10ca8cfba73a40aa637358ec54" + sha256 cellar: :any_skip_relocation, catalina: "672ebdfce1cb30d596792cdc8652b1b2f00e19a66f9266a7796cf6b7b6d25a9f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ec19afb01280000925b73e81a3ae8de97e7bc31a6bbd9b2b1403a674a7c3942" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be128448d96fd7005c9cbda1c1ba2c71e7f7a58468c1c5bb3ec7a1f75c5109c5" + end + + deprecate! date: "2025-05-17", because: :repo_archived + + depends_on "go" => :build + + def install + # TODO: remove `-checklinkname=0` workaround when fixed + # https://github.com/dennis-tra/pcp/issues/30 + ldflags = %W[ + -s -w + -X main.RawVersion=#{version} + -X main.ShortCommit=#{Utils.git_short_head(length: 7)} + -checklinkname=0 + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/pcp" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pcp --version") + expected = "error: failed to initialize node: could not find all words in a single wordlist" + assert_equal expected, shell_output("#{bin}/pcp receive words-that-dont-exist 2>&1", 1).chomp + end +end diff --git a/Formula/p/pcre.rb b/Formula/p/pcre.rb new file mode 100644 index 0000000000000..1a03a44b37a2a --- /dev/null +++ b/Formula/p/pcre.rb @@ -0,0 +1,82 @@ +class Pcre < Formula + desc "Perl compatible regular expressions library" + homepage "https://www.pcre.org/" + license "BSD-3-Clause" + + stable do + url "https://downloads.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.bz2" + mirror "https://www.mirrorservice.org/sites/ftp.exim.org/pub/pcre/pcre-8.45.tar.bz2" + sha256 "4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + # From the PCRE homepage: + # "The older, but still widely deployed PCRE library, originally released in + # 1997, is at version 8.45. This version of PCRE is now at end of life, and + # is no longer being actively maintained. Version 8.45 is expected to be the + # final release of the older PCRE library, and new projects should use PCRE2 + # instead." + livecheck do + skip "PCRE was declared end of life in 2021-06" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0588ef1eb0d04ac9f4e653162bacdb5ed3e25e8f471d2b0c58e235a0a22756f6" + sha256 cellar: :any, arm64_sequoia: "50b8e2100e02a8649ac963449bf83bd8036608816b58412baad2310046d44d1f" + sha256 cellar: :any, arm64_sonoma: "fbc1ec29701c2c3f0eb750a0aecf03b90acb6d47f1bbf1dc07eb8a7c9340650e" + sha256 cellar: :any, arm64_ventura: "542a6e5dcf5f1ac6592992f949687a56515d154abf1bfdd71327edcfb5183fb6" + sha256 cellar: :any, arm64_monterey: "11193fd0a113c0bb330b1c2c21ab6f40d225c1893a451bba85e8a1562b914a1c" + sha256 cellar: :any, arm64_big_sur: "2d6bfcafce9da9739e32ee433087e69a78cda3f18291350953e6ad260fefc50b" + sha256 cellar: :any, sonoma: "636ad19cc22f9c7608d5be592f8404c67458723d9629dbae026a93b8a3810e39" + sha256 cellar: :any, ventura: "df481fdd99c1dff924ea2d679623512d6c0c275e3b7c223e753ec654994ac6e5" + sha256 cellar: :any, monterey: "5e5cc7a5bf8bb6488ec57d4263bf6b0bc89e93252a0a2460f846de29373162d8" + sha256 cellar: :any, big_sur: "fb2fefbe1232706a603a6b385fc37253e5aafaf3536cb68b828ad1940b95e601" + sha256 cellar: :any, catalina: "180d88dc2230e98162685b86d00436903db4349aac701f9769997d61adb78418" + sha256 cellar: :any_skip_relocation, arm64_linux: "93ad822f02719de5e91b97213d71703f9322780cc4f04c002f2f53e45fb58025" + sha256 cellar: :any_skip_relocation, x86_64_linux: "296026b6d5430399e40fb4f8074045a9a27d5374d83f2f6d4659c2647959f36d" + end + + head do + url "svn://vcs.exim.org/pcre/code/trunk" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --enable-utf8 + --enable-pcre8 + --enable-pcre16 + --enable-pcre32 + --enable-unicode-properties + --enable-pcregrep-libz + --enable-pcregrep-libbz2 + ] + + # JIT not currently supported for Apple Silicon + args << "--enable-jit" if OS.mac? && !Hardware::CPU.arm? + + system "./autogen.sh" if build.head? + system "./configure", *args + system "make" + ENV.deparallelize + system "make", "test" + system "make", "install" + end + + test do + system bin/"pcregrep", "regular expression", prefix/"README" + end +end diff --git a/Formula/p/pcre2.rb b/Formula/p/pcre2.rb new file mode 100644 index 0000000000000..e93b9c1976b4b --- /dev/null +++ b/Formula/p/pcre2.rb @@ -0,0 +1,57 @@ +class Pcre2 < Formula + desc "Perl compatible regular expressions library with a new API" + homepage "https://www.pcre.org/" + url "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.bz2" + sha256 "47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^pcre2[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "10bd8c1cf3784ab8a736f01b7f85d091276d69c5a8d48bd022b01209fb4eb870" + sha256 cellar: :any, arm64_sequoia: "603fb4c2e2d04c59cb75525a47758abbab20027f3f2296cc170fba64f9fb4b9a" + sha256 cellar: :any, arm64_sonoma: "fb34b096f84b0de1dd502b2b35cd5de9a4d1dea85ff8cb032765f8bda1278ca2" + sha256 cellar: :any, tahoe: "a9a5f8749a644762cc6ca09e4986cdaeecedc050d43b0de19562587cb98ea655" + sha256 cellar: :any, sonoma: "20d5064b4a9454114faac74629efdd7fbac4cff541488f6cf035ceaeae45c51d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f975aedeebe47c169447cbd9d4bb27ebd883c79a9fbc96154f373f0e07361409" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a80460c1a317becfa0cff0659100dfe6aacf0f7679043580c1bb6377b8fce77" + end + + head do + url "https://github.com/PCRE2Project/pcre2.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --enable-pcre2-16 + --enable-pcre2-32 + --enable-pcre2grep-libz + --enable-pcre2grep-libbz2 + --enable-jit + ] + + args << "--enable-pcre2test-libedit" if OS.mac? + + system "./autogen.sh" if build.head? + + system "./configure", *args + system "make" + system "make", "install" + end + + test do + system bin/"pcre2grep", "regular expression", prefix/"README" + end +end diff --git a/Formula/p/pcsc-lite.rb b/Formula/p/pcsc-lite.rb new file mode 100644 index 0000000000000..8c7e89b14e9bd --- /dev/null +++ b/Formula/p/pcsc-lite.rb @@ -0,0 +1,55 @@ +class PcscLite < Formula + desc "Middleware to access a smart card using SCard API" + homepage "https://pcsclite.apdu.fr/" + url "https://pcsclite.apdu.fr/files/pcsc-lite-2.4.0.tar.xz" + sha256 "22307017a99e123dbecb991136783beca07966f1376d74d9ad0004ba5f81c4f1" + license all_of: ["BSD-3-Clause", "GPL-3.0-or-later", "ISC"] + + livecheck do + url "https://pcsclite.apdu.fr/files/" + regex(/href=.*?pcsc-lite[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "624e3633fdfb5bde643c14849b17220fb75205b05b59366a39718a07f204b196" + sha256 cellar: :any, arm64_sequoia: "0e94c4180a09b362bb8fcd80176b9241cbe0f4e1627d3c3d7ddc3fee2c511e55" + sha256 cellar: :any, arm64_sonoma: "8d4a14f8e2b1c0ef123148ac876acbbb4d71442bb0b674b4c5c665566edc614d" + sha256 cellar: :any, sonoma: "cf1d373145c45d0c6f7622d8d80d68a8647bdb0184ab7ff64c1e6466a29d1418" + sha256 arm64_linux: "9b2e981ff7c80e860eb43ab3cf95029460c4a88f586ee06b30a0ae2886286720" + sha256 x86_64_linux: "63dd908bb72b286a75adf102a827e95013f63931347940e82dc0ea9ea90eaa32" + end + + keg_only :shadowed_by_macos, "macOS provides PCSC.framework" + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + uses_from_macos "flex" => :build + + on_linux do + depends_on "libusb" + depends_on "systemd" # for libudev + end + + def install + args = %W[ + -Dlibsystemd=false + -Dlibudev=false + -Dpolkit=false + -Dipcdir=#{var}/run + -Dsysconfdir=#{etc} + -Dsbindir=#{sbin} + ] + + args << "-Dlibudev=false" if OS.linux? + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system sbin/"pcscd", "--version" + end +end diff --git a/Formula/p/pdal.rb b/Formula/p/pdal.rb new file mode 100644 index 0000000000000..c40cbfe0bb889 --- /dev/null +++ b/Formula/p/pdal.rb @@ -0,0 +1,85 @@ +class Pdal < Formula + desc "Point data abstraction library" + homepage "https://www.pdal.io/" + url "https://github.com/PDAL/PDAL/releases/download/2.9.2/PDAL-2.9.2-src.tar.bz2" + sha256 "a74bbc7f4e4f709ed589dbbb851926a63c391c974e3fc40a4c3ff34f7923021b" + license "BSD-3-Clause" + revision 1 + head "https://github.com/PDAL/PDAL.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6185f73d006d25ea279e9e4a85063b5f207b7cbbb65b80060ae71e56db3493da" + sha256 cellar: :any, arm64_sequoia: "a424e98f10b68c23edf902d609844c51d75ec9d3ee655c22a935db8533f17515" + sha256 cellar: :any, arm64_sonoma: "27db6d9034170ddb1377382658118e2ad7ff0c008a60c9c39ebf09d75b43029a" + sha256 cellar: :any, sonoma: "1e987269aa3c99c261a9819f0f32ed29dd59ab4fd0891f6a63fa0abc35c5730e" + sha256 cellar: :any_skip_relocation, arm64_linux: "769e273a3af7fb2928b12ed434c07cc762048d6dff1a2ec4b8044ef79dd847f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a01e19a3b2c6d2f1c8b540eeebd6221d87119c88697f712899f3c0be3b58de96" + end + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "pkgconf" => :build + + depends_on "apache-arrow" + depends_on "curl" + depends_on "draco" + depends_on "gdal" + depends_on "hdf5" + depends_on "libgeotiff" + depends_on "libpq" + depends_on "libxml2" + depends_on "lz4" + depends_on "numpy" + depends_on "openssl@3" + depends_on "proj" + depends_on "tiledb" + depends_on "xerces-c" + depends_on "zstd" + + uses_from_macos "zlib" + + on_linux do + depends_on "libunwind" + end + + def install + args = %w[ + -DWITH_TESTS=OFF + -DENABLE_CTEST=OFF + -DBUILD_PLUGIN_ARROW=ON + -DBUILD_PLUGIN_TILEDB=ON + -DBUILD_PLUGIN_ICEBRIDGE=ON + -DBUILD_PLUGIN_HDF=ON + -DBUILD_PLUGIN_PGPOINTCLOUD=ON + -DBUILD_PLUGIN_E57=ON + -DBUILD_PLUGIN_DRACO=ON + -DBUILD_PGPOINTCLOUD_TESTS=OFF + -DWITH_ZSTD=ON + -DWITH_ZLIB=ON + ] + if OS.linux? + libunwind = Formula["libunwind"] + ENV.append_to_cflags "-I#{libunwind.opt_include}" + args += %W[ + -DLIBUNWIND_INCLUDE_DIR=#{libunwind.opt_include} + -DLIBUNWIND_LIBRARY=#{libunwind.opt_lib/shared_library("libunwind")} + ] + end + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + rm_r("test/unit") + doc.install "examples", "test" + end + + test do + system bin/"pdal", "info", doc/"test/data/las/interesting.las" + assert_match "pdal #{version}", shell_output("#{bin}/pdal --version") + end +end diff --git a/Formula/p/pdf-diff.rb b/Formula/p/pdf-diff.rb new file mode 100644 index 0000000000000..197107188f578 --- /dev/null +++ b/Formula/p/pdf-diff.rb @@ -0,0 +1,47 @@ +class PdfDiff < Formula + desc "Tool for visualizing differences between two pdf files" + homepage "https://github.com/serhack/pdf-diff" + url "https://github.com/serhack/pdf-diff/archive/refs/tags/v0.0.1.tar.gz" + sha256 "13053afc3bbe14b84639d5a6a6416863e8c6d93e4f3c2c8ba7c38d4c427ae707" + license "MIT" + head "https://github.com/serhack/pdf-diff.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3109937918e55155cabbc7db5bbe153bf22cc27f0f315e13c8539ccf8cf94529" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "33b71b6dcebe2687113628450e3a414db0c5abc4c27b4eda4090477c089f102f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9880f5520ed55ad05c505196a7d9c826c1a9afebefd1c96b56d9f38fca232a6d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe08862077f15673639f22904af5e0e6d3953e29f5df8b8a231b38f748e6af05" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fe08862077f15673639f22904af5e0e6d3953e29f5df8b8a231b38f748e6af05" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fe08862077f15673639f22904af5e0e6d3953e29f5df8b8a231b38f748e6af05" + sha256 cellar: :any_skip_relocation, sonoma: "a459eb490a382b87a8e0145910830ace8b8a736eea8c0ce3ed7d18c80ac92883" + sha256 cellar: :any_skip_relocation, ventura: "e8b0e6e652c67281398e49a6d61c2b8624c5ea7fb538771fc4b47ce50188a877" + sha256 cellar: :any_skip_relocation, monterey: "e8b0e6e652c67281398e49a6d61c2b8624c5ea7fb538771fc4b47ce50188a877" + sha256 cellar: :any_skip_relocation, big_sur: "e8b0e6e652c67281398e49a6d61c2b8624c5ea7fb538771fc4b47ce50188a877" + sha256 cellar: :any_skip_relocation, arm64_linux: "84cee2f29e043eacbe31386f0b25ec75558d4dd1971c627d71b4a5071ce5ae02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66929021a8898ca16128f0ed3b1fb9ffbc4ac8b5778bdb48259207c91daa64fa" + end + + depends_on "go" => :build + depends_on "poppler" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + pdf = test_fixtures("test.pdf") + + expected = <<~EOS + Color chosen: 255.000000 32.000000 16.000000 \ + + Image generation for: #{test_fixtures("test.pdf")} + [] + Image generation for: #{test_fixtures("test.pdf")} + The pages number 1 are the same. + EOS + assert_equal expected, + shell_output("#{bin}/pdf-diff #{pdf} #{pdf}") + end +end diff --git a/Formula/p/pdf2image.rb b/Formula/p/pdf2image.rb new file mode 100644 index 0000000000000..45c85a19c6b21 --- /dev/null +++ b/Formula/p/pdf2image.rb @@ -0,0 +1,51 @@ +class Pdf2image < Formula + desc "Convert PDFs to images" + homepage "https://code.google.com/p/pdf2image/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pdf2image/pdf2image-0.53-source.tar.gz" + sha256 "e8672c3bdba118c83033c655d90311db003557869c92903e5012cdb368a68982" + license "FSFUL" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "3441323b63b2667e68a90b70633c40813b10f0597933aadd8a46ff7a36413f8a" + sha256 arm64_sequoia: "412c25b88af18ef42fc4c705a409449b38f3fab9a792b40067ce2c510e524903" + sha256 arm64_sonoma: "caf804519e1009c069f081987d8cf3a9052649c7fa2359bf9749df195bbdbb21" + sha256 arm64_ventura: "fd39ba0dc18b50fd76f8be5b8d85335cc2b7fc40ab14e3a096890ed60f6f50b1" + sha256 arm64_monterey: "0794342647f54210c52fef1f96675b041240c046011a2cd2f1f10ccdd5e0d726" + sha256 arm64_big_sur: "283b9a01c14033bac12d833765cdcf81d896a4df12c6a9c7ac5467c340591f1e" + sha256 sonoma: "cbd829422ed134b39732586a0a439ee2a3322e27590eb5eb9503496e1dc8320a" + sha256 ventura: "ced2743201d3c6f3d2f449cebee65dce9d3348f0643f82ada1be3834090895df" + sha256 monterey: "dd02bfaa0f17e894f94ddae7848a7ed0d769a631b294b853bcab234be626c704" + sha256 big_sur: "51717dc099723d65d1aeedd18be5886fdb228dca2ceb190cde744a63e1b51bbf" + sha256 catalina: "9550e644b89b03d2e78880145d64446d1fe07ef575c2fd4109a932ef2d5258b0" + sha256 arm64_linux: "7b1588d8a5fb1c0dac620c9bebada39b426bea18c9310c9bea1de7586885a381" + sha256 x86_64_linux: "86497b2d47fec1c951e40a9ed363e8826ded682eaf6d36403ab394f0dc09e7ff" + end + + depends_on "libx11" => :build + depends_on "freetype" + depends_on "ghostscript" + + conflicts_with "pdftohtml", "poppler", "xpdf", + because: "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" + + def install + system "./configure", "--prefix=#{prefix}" + + # Fix manpage install location. See: + # https://github.com/flexpaper/pdf2json/issues/2 + inreplace "Makefile", "/man/", "/share/man/" + + # Fix incorrect variable name in Makefile + inreplace "src/Makefile", "$(srcdir)", "$(SRCDIR)" + + system "make" + system "make", "install" + end + + test do + system bin/"pdf2image", "--version" + end +end diff --git a/Formula/p/pdf2json.rb b/Formula/p/pdf2json.rb new file mode 100644 index 0000000000000..f0c22b44b470a --- /dev/null +++ b/Formula/p/pdf2json.rb @@ -0,0 +1,36 @@ +class Pdf2json < Formula + desc "PDF to JSON and XML converter" + homepage "https://github.com/flexpaper/pdf2json" + url "https://github.com/flexpaper/pdf2json/archive/refs/tags/0.71.tar.gz" + sha256 "54878473a2afb568caf2da11d6804cabe0abe505da77584a3f8f52bcd37d9c55" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "058498536ab559f677a0d83f45179b9958c5c2274378cea76f63fc8e613a1076" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6af0ae7d69db0ff147f44d9f987843ded25580c0d2c5d00b3909f18c4566bdb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a791ed61467ee9df00b0901fed7ffb14f97295d2139f01363bf433c879e7be94" + sha256 cellar: :any_skip_relocation, arm64_ventura: "323095faeba1b4fd27ec6040ef7a5037a1ecbbc7f077cbde173a72c5ab6c3396" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c113b37537d9cdd7e698502406a17d699eb823437a6d9086c68591146c074a54" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e648062e7a117f95679cd30c63773085ba2712752450f0b422be8f2fd4d66050" + sha256 cellar: :any_skip_relocation, sonoma: "1be2124143b035485aaaeae155324606f06f6400971a67b20c0bd82051770e55" + sha256 cellar: :any_skip_relocation, ventura: "a06ac07d12709d87065c455126794ee1f5f282c895ec03e90abcd498b0c83739" + sha256 cellar: :any_skip_relocation, monterey: "8af9890390ac354624c50a6cbd706d6b538ed8050bc54b1b4a5d091a249401eb" + sha256 cellar: :any_skip_relocation, big_sur: "20fe898333fa761b942ee5b0f2d41e47660389a250f5c8604ff1ed22788d9581" + sha256 cellar: :any_skip_relocation, catalina: "035c69de85f1cad569ff743faef796a88b9f9a706be802bf111a83505858b366" + sha256 cellar: :any_skip_relocation, arm64_linux: "917e8246e56311c899f8031c17eee02347d143e023b7e7f26a18a924b983a916" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddf26e386ef0d0916e59bb3aea14ccbaf5e08e87fbc043692d7a445ff481f9d7" + end + + def install + system "./configure" + system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" + bin.install "src/pdf2json" + end + + test do + system bin/"pdf2json", test_fixtures("test.pdf"), "test.json" + assert_path_exists testpath/"test.json" + end +end diff --git a/Formula/p/pdf2svg.rb b/Formula/p/pdf2svg.rb new file mode 100644 index 0000000000000..2d2d3eea3b2d2 --- /dev/null +++ b/Formula/p/pdf2svg.rb @@ -0,0 +1,38 @@ +class Pdf2svg < Formula + desc "PDF converter to SVG" + homepage "https://cityinthesky.co.uk/opensource/pdf2svg" + url "https://github.com/dawbarton/pdf2svg/archive/refs/tags/v0.2.4.tar.gz" + sha256 "fd765256f18b5890639e93cabdf631b640966ed1ea9ebd561aede9d3be2155e4" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "58b344d12758452174b82e00489ee46159fd8522d1665748c87226b390bb2a42" + sha256 cellar: :any, arm64_sequoia: "9d3dee3bc068da7b48766e2020f59c88b699526c1e0649569ff6ead73832a2d2" + sha256 cellar: :any, arm64_sonoma: "f9b0270d4da35600e7747b489f2e7e4189b61781e62ba1bf288516e4006b04e4" + sha256 cellar: :any, arm64_ventura: "e5fde5427d8f50595f2ef126a344279f95b24aed9097db080b25b3afa0999f6d" + sha256 cellar: :any, sonoma: "0f825f54919369deb5adc309ff369f6679c53b04d89a240fec3d031f004d63ef" + sha256 cellar: :any, ventura: "fba60b0a305fdb79d8034016b76a2eecd88ca173e0321115ee395c03194e4852" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6b1ca19d159da250501acac0611393208b5bd33b797014c02825eea3c7ebba3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbb6cfd9a930910cb3c8d58c1ee940b6ba0df882292f6252a7c03ce23e0bacf0" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "glib" + depends_on "poppler" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + system bin/"pdf2svg", test_fixtures("test.pdf"), "test.svg" + end +end diff --git a/Formula/p/pdfalyzer.rb b/Formula/p/pdfalyzer.rb new file mode 100644 index 0000000000000..eb5e327c38659 --- /dev/null +++ b/Formula/p/pdfalyzer.rb @@ -0,0 +1,96 @@ +class Pdfalyzer < Formula + include Language::Python::Virtualenv + + desc "PDF analysis toolkit" + homepage "https://github.com/michelcrypt4d4mus/pdfalyzer" + url "https://files.pythonhosted.org/packages/67/10/57182cc25ba70c657f1cdde68f6a56f7fea7950bba8b3164079005d2b31f/pdfalyzer-1.17.7.tar.gz" + sha256 "6c8569b4ca2da89a66fdedb8a30a87834b7a1a6bbc9568c69a19aeaf5c864e79" + license "GPL-3.0-or-later" + head "https://github.com/michelcrypt4d4mus/pdfalyzer.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ddff8e6f3ea435fb1d91d8ea9172212e2788ca91f3d2674a725af6ace1fd7dd1" + sha256 cellar: :any, arm64_sequoia: "df6dbc8579aaf4f3e77271375d2e4bc2934e1c97aee3f41d074cb062b33acc6f" + sha256 cellar: :any, arm64_sonoma: "97cbe13d6399efca411a45e441aa826fb68b20312d3b6883a138a673d8b2a3cc" + sha256 cellar: :any, sonoma: "7c47df3cdb960dff654c39697620f197964a852dc2a459b5aab15c77428a2341" + sha256 cellar: :any_skip_relocation, arm64_linux: "f47ad722a8d51d797a6ce04b6122d4fd6113ce3fb1609f67a754f3c0c186e680" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ada7746743457f0f55f091b0c7067d097e12140624f9efbd7d483f18bc0aea20" + end + + depends_on "openssl@3" + depends_on "pillow" + depends_on "python@3.14" + + resource "anytree" do + url "https://files.pythonhosted.org/packages/bc/a8/eb55fab589c56f9b6be2b3fd6997aa04bb6f3da93b01154ce6fc8e799db2/anytree-2.13.0.tar.gz" + sha256 "c9d3aa6825fdd06af7ebb05b4ef291d2db63e62bb1f9b7d9b71354be9d362714" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pypdf" do + url "https://files.pythonhosted.org/packages/13/3d/b6ead84ee437444f96862beb68f9796da8c199793bed08e9397b77579f23/pypdf-6.1.3.tar.gz" + sha256 "8d420d1e79dc1743f31a57707cabb6dcd5b17e8b9a302af64b30202c5700ab9d" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse-plus" do + url "https://files.pythonhosted.org/packages/9b/34/75eaf9752783aa93498d46ccbc7046e25cc1d44e5f6c43d829d90b9dcd02/rich_argparse_plus-0.3.1.4.tar.gz" + sha256 "aab9e49b4ba98ff501705678330eda8e9bc07d933edc5cac5f38671ee53f9998" + end + + resource "yara-python" do + url "https://files.pythonhosted.org/packages/51/38/347d1fcde4edabd338d5872ca5759ccfb95ff1cf5207dafded981fd08c4f/yara_python-4.5.4.tar.gz" + sha256 "4c682170f3d5cb3a73aa1bd0dc9ab1c0957437b937b7a83ff6d7ffd366415b9c" + end + + resource "yaralyzer" do + url "https://files.pythonhosted.org/packages/f0/0c/37c23b6071370b8fce6776b8dd440badb7a95d248cd40441d1c382033fe9/yaralyzer-1.0.9.tar.gz" + sha256 "8f37e0ad243d3db47afaefbe30093ee8ea9b168f58e771e7c765dc48614d49ad" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/pdfalyze --version") + + resource "homebrew-test-pdf" do + url "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" + sha256 "3df79d34abbca99308e79cb94461c1893582604d68329a41fd4bec1885e6adb4" + end + + resource("homebrew-test-pdf").stage testpath + + output = shell_output("#{bin}/pdfalyze dummy.pdf") + assert_match "'/Producer': 'OpenOffice.org 2.1'", output + end +end diff --git a/Formula/p/pdfcpu.rb b/Formula/p/pdfcpu.rb new file mode 100644 index 0000000000000..7ac572827a0f0 --- /dev/null +++ b/Formula/p/pdfcpu.rb @@ -0,0 +1,58 @@ +class Pdfcpu < Formula + desc "PDF processor written in Go" + homepage "https://pdfcpu.io" + url "https://github.com/pdfcpu/pdfcpu/archive/refs/tags/v0.11.1.tar.gz" + sha256 "f92a3c0953acf4dc8d6e6c39fa89053f9e506ed1cbb1dcac13ea25ca03da8f03" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3460ddd5ac0731fcbe8360bd4073dda88b3ad1584c95e04a4f10d6ad7f3ea384" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3460ddd5ac0731fcbe8360bd4073dda88b3ad1584c95e04a4f10d6ad7f3ea384" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3460ddd5ac0731fcbe8360bd4073dda88b3ad1584c95e04a4f10d6ad7f3ea384" + sha256 cellar: :any_skip_relocation, sonoma: "ec2cfb6966da2ba98a5d6d2a005f2583b7a7f01eee11d99de45da87247eaf383" + sha256 cellar: :any_skip_relocation, arm64_linux: "82c913aea72e972eeac04f67b2c8da26e13406287c2bf3663f6c3d61d1fcff56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "245a80d951be6fc212e1898d3f5bee33c771b1683d25d5a5b7fdfa49015f917b" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X github.com/pdfcpu/pdfcpu/pkg/pdfcpu.VersionStr=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/pdfcpu" + end + + test do + config_file = if OS.mac? + testpath/"Library/Application Support/pdfcpu/config.yml" + else + testpath/".config/pdfcpu/config.yml" + end + # basic config.yml + config_file.write <<~YAML + reader15: true + validationMode: ValidationRelaxed + eol: EolLF + encryptKeyLength: 256 + unit: points + YAML + + assert_match version.to_s, shell_output("#{bin}/pdfcpu version") + + info_output = shell_output("#{bin}/pdfcpu info #{test_fixtures("test.pdf")}") + assert_match <<~EOS, info_output + #{test_fixtures("test.pdf")}: + Source: #{test_fixtures("test.pdf")} + PDF version: 1.6 + Page count: 1 + Page sizes: 500.00 x 800.00 points + EOS + + assert_match "validation ok", shell_output("#{bin}/pdfcpu validate #{test_fixtures("test.pdf")}") + end +end diff --git a/Formula/p/pdfcrack.rb b/Formula/p/pdfcrack.rb new file mode 100644 index 0000000000000..68c988c3ad3e1 --- /dev/null +++ b/Formula/p/pdfcrack.rb @@ -0,0 +1,25 @@ +class Pdfcrack < Formula + desc "PDF files password cracker" + homepage "https://pdfcrack.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pdfcrack/pdfcrack/pdfcrack-0.21/pdfcrack-0.21.tar.gz" + sha256 "26f00d4afcb70b5839047bc6f62e4253073ac437bdb526f01e8c04b220e97762" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69a134ef06d1ed838be0243f923f5cd403b32a4ca83adc619bda46f6d58ef91b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52236fa60b8d96b8dc015eff612a68f9d5932150fe37b924e1d56174149929a0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59d34c847b5985a302ae965861ec1d3966475b23f17419f7ce18b6dfe8c57ff2" + sha256 cellar: :any_skip_relocation, sonoma: "2e2cd7962fcc95cac7272e42ce86b9698655398a4d370c09f1a883fe7ecd1bae" + sha256 cellar: :any_skip_relocation, arm64_linux: "faf7fb52544eb4f38866ba36569cfa621c92fd887c150a11cf05d4a5daede1ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57887b2e4d09083f00622af759046fecde428a6dbcdc736a30f0f8eec18a6e82" + end + + def install + system "make", "all" + bin.install "pdfcrack" + end + + test do + system bin/"pdfcrack", "--version" + end +end diff --git a/Formula/p/pdfgrep.rb b/Formula/p/pdfgrep.rb new file mode 100644 index 0000000000000..7ff8003db0321 --- /dev/null +++ b/Formula/p/pdfgrep.rb @@ -0,0 +1,48 @@ +class Pdfgrep < Formula + desc "Search PDFs for strings matching a regular expression" + homepage "https://pdfgrep.org/" + url "https://pdfgrep.org/download/pdfgrep-2.2.0.tar.gz" + sha256 "0661e531e4c0ef097959aa1c9773796585db39c72c84a02ff87d2c3637c620cb" + license "GPL-2.0-only" + revision 2 + + bottle do + sha256 cellar: :any, arm64_tahoe: "502319a84275612510c2c810e08793ded8b119b837bd0794e89d98e03a287221" + sha256 cellar: :any, arm64_sequoia: "9926375b2077d2480098e6d821880915a51f94a4c89284718d5b320609e00220" + sha256 cellar: :any, arm64_sonoma: "41dc9c7cfff5e4e580d773798cdf1bf190017ec15287aac86fbd44a7632f451a" + sha256 cellar: :any, arm64_ventura: "7482070f52df00a9eb14f2728145b17828ab75d95083a6c4267ba899b0ffcf12" + sha256 cellar: :any, sonoma: "9dbe21ca4fa269567f10411c1d31eb3646151557b05905343782148f1c7b2e99" + sha256 cellar: :any, ventura: "1d6942180032f100bceabe2e78e4dd68556d60a4ee60b451c959ea5c552e56f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "2eabd87eaa34a322f3f330937baece415a67effbd2f5e6737c42f54581c96044" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17e547dc318109b9fb83fa11a59c5cf07608121c5be5173d34d7762dea0498b1" + end + + head do + url "https://gitlab.com/pdfgrep/pdfgrep.git", branch: "master" + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libgcrypt" + depends_on "pcre2" + depends_on "poppler" + + on_macos do + depends_on "libgpg-error" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + ENV.cxx11 + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"pdfgrep", "-i", "homebrew", test_fixtures("test.pdf") + end +end diff --git a/Formula/p/pdfly.rb b/Formula/p/pdfly.rb new file mode 100644 index 0000000000000..d515cb6b5906d --- /dev/null +++ b/Formula/p/pdfly.rb @@ -0,0 +1,150 @@ +class Pdfly < Formula + include Language::Python::Virtualenv + + desc "CLI tool to extract (meta)data from PDF and manipulate PDF files" + homepage "https://pdfly.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/48/ae/70f161c80b3f39d8fe4ff784c78045225820d10375c81c2097c0e85ac0fc/pdfly-0.5.1.tar.gz" + sha256 "636e9736ca3296ed69ad7e14d997813ea5a662ba7a86c77d155e343494dcc3d7" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "49360be0ff3842ae3a792cfd5e7d7ec2e611024f8b2fa74f6372c7968b0ab96e" + end + + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "openssl@3" + depends_on "pillow" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography pillow pydantic-core] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "asn1crypto" do + url "https://files.pythonhosted.org/packages/de/cf/d547feed25b5244fcb9392e288ff9fdc3280b10260362fc45d37a798a6ee/asn1crypto-1.5.1.tar.gz" + sha256 "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "endesive" do + url "https://files.pythonhosted.org/packages/11/c9/3f9a0e3784fd611be5880787eff1e9b084f0f13d2dcae50ad1c1f66b771c/endesive-2.19.1-py3-none-any.whl" + sha256 "d434012bf3bf1c26f3dd156e9ad425f5ccd2e426b82b26f6474e6c6a9b5ae36f" + end + + resource "fonttools" do + url "https://files.pythonhosted.org/packages/4b/42/97a13e47a1e51a5a7142475bbcf5107fe3a68fc34aef331c897d5fb98ad0/fonttools-4.60.1.tar.gz" + sha256 "ef00af0439ebfee806b25f24c8f92109157ff3fac5731dc7867957812e87b8d9" + end + + resource "fpdf2" do + url "https://files.pythonhosted.org/packages/87/ff/4a1dd414e5c5df5a11904118afdb544f3a446c9c512cc77e9741cf74fb30/fpdf2-2.8.4.tar.gz" + sha256 "12b1f1dd35d0c2f35284bcfe10b153d6ca4baf29377379843e73d3f971eab6b7" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pypdf" do + url "https://files.pythonhosted.org/packages/13/3d/b6ead84ee437444f96862beb68f9796da8c199793bed08e9397b77579f23/pypdf-6.1.3.tar.gz" + sha256 "8d420d1e79dc1743f31a57707cabb6dcd5b17e8b9a302af64b30202c5700ab9d" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/pdfly --version") + + test_pdf = test_fixtures("test.pdf") + assert_match <<~EOS, shell_output("#{bin}/pdfly meta #{test_pdf}") + ┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓ + ┃ Attribute ┃ Value ┃ + ┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩ + │ Pages │ 1 │ + │ Encrypted │ None │ + │ PDF File Version │ %PDF-1.6 │ + │ Page Layout │ │ + │ Page Mode │ │ + │ PDF ID │ ID1=None ID2=None │ + │ Fonts (unembedded) │ /Helvetica │ + │ Fonts (embedded) │ │ + │ Attachments │ [] │ + │ Images │ 0 images (0 bytes) │ + └────────────────────┴────────────────────┘ + EOS + end +end diff --git a/Formula/p/pdfpc.rb b/Formula/p/pdfpc.rb new file mode 100644 index 0000000000000..6f5c37ebf5ceb --- /dev/null +++ b/Formula/p/pdfpc.rb @@ -0,0 +1,65 @@ +class Pdfpc < Formula + desc "Presenter console with multi-monitor support for PDF files" + homepage "https://pdfpc.github.io/" + url "https://github.com/pdfpc/pdfpc/archive/refs/tags/v4.7.0.tar.gz" + sha256 "0083a958a2e9288a15c31aabb76b3eadf104672b4e815017f31ffa0d87db02ec" + license "GPL-3.0-or-later" + head "https://github.com/pdfpc/pdfpc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "b76907d094e032d1c6d6f67be0b1774b0ceaaad44ec21102fcb82084ae8c94c2" + sha256 arm64_sequoia: "76900b6a726ed5f8c747a89957da0b81dd8b18c8b5bda6765f7b1ac4de0c26de" + sha256 arm64_sonoma: "bfbfbdcfb242b5ca2c26764e5175596609bed8b681692a07cc3cf80e1a351de9" + sha256 arm64_ventura: "102466bc213e5b6a13b8285441a3c3a22b80f73f47f197481cf20ea4331b6e71" + sha256 sonoma: "c4b524c67133b5517f563706ba4ef91438ec35d0248ff362ef83147a612c9ae1" + sha256 ventura: "b3074deef95572bbd9128bc964db5f8099b627a93a5d1c63b1f10db35c9f1939" + sha256 arm64_linux: "b1d11c2674eedab4f24630c2f9dc2888815feaa14a321d29e237045890e2b01d" + sha256 x86_64_linux: "243cdb84ac1abdc284cc3ff854d68344f549cc4cb94755eccd7b5c20e1c892b7" + end + + depends_on "cmake" => :build + depends_on "vala" => :build + + depends_on "cairo" + depends_on "discount" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gstreamer" + depends_on "gtk+3" + depends_on "json-glib" + depends_on "libgee" + depends_on "librsvg" + depends_on "libx11" + depends_on "pango" + depends_on "poppler" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "webkitgtk" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", + "-DMDVIEW=#{OS.linux?}", # Needs webkitgtk + "-DMOVIES=ON", + "-DREST=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Gtk-WARNING **: 00:25:01.545: cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + system bin/"pdfpc", "--version" + end +end diff --git a/Formula/p/pdfrip.rb b/Formula/p/pdfrip.rb new file mode 100644 index 0000000000000..0d2ff0b0f5931 --- /dev/null +++ b/Formula/p/pdfrip.rb @@ -0,0 +1,57 @@ +class Pdfrip < Formula + desc "Multi-threaded PDF password cracking utility" + homepage "https://github.com/mufeedvh/pdfrip" + url "https://github.com/mufeedvh/pdfrip/archive/refs/tags/v2.0.1.tar.gz" + sha256 "60f284d79bac98c97e6eaa1a2f29d66055de5b3c8a129eb14b24057a7cb31cd3" + license "MIT" + head "https://github.com/mufeedvh/pdfrip.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1036db7676a0822b721390e43e797e7e846dbd3b4f0c35acc3fb71fee338f938" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68c75d4a427d4512dce141506acc4d3b02e8640d3fb54a30bfc0c9be4ffa525a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eeac32a01baca1d879c37adc93518653405ffc1437ef2551eed0d7bee45a9c13" + sha256 cellar: :any_skip_relocation, sonoma: "b27b773f78bba7b8d64b60cc5c8b8cdef12d45574be2d4881223bace41d64acd" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0db2c8b883091a68cdda3fe1f4da41213bd041fbe8b93862b86e744baa60c75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de8fc88b6d291c32c7e3b0ed9fdda602f2a237e8478921f07b56bf550dbcbbde" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + # Fix to build error with `indicatif` + # PR ref: https://github.com/mufeedvh/pdfrip/pull/64 + patch :DATA + + def install + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/pdfrip --version") + + touch testpath/"test.pdf" + output = shell_output("#{bin}/pdfrip -f test.pdf range 1 5 2>&1") + assert_match "Failed to crack file", output + end +end + +__END__ +diff --git a/Cargo.toml b/Cargo.toml +index e0db059..6cdba04 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -5,7 +5,8 @@ edition = "2021" + authors = ["Mufeed VH ", "Pommaq"] + + [dependencies] +-indicatif = "0.16.2" ++console = { version = "0.16.0", features = ["std"] } ++indicatif = { version = "0.16.2", default-features = false } + log = "0.4.19" + anyhow = "1.0.72" + crossbeam = "0.8.2" diff --git a/Formula/p/pdfsandwich.rb b/Formula/p/pdfsandwich.rb new file mode 100644 index 0000000000000..088a2906e691b --- /dev/null +++ b/Formula/p/pdfsandwich.rb @@ -0,0 +1,51 @@ +class Pdfsandwich < Formula + desc "Generate sandwich OCR PDFs from scanned file" + homepage "http://www.tobias-elze.de/pdfsandwich/" + url "https://downloads.sourceforge.net/project/pdfsandwich/pdfsandwich%200.1.7/pdfsandwich-0.1.7.tar.bz2" + sha256 "9795ffea84b9b6b501f38d49a4620cf0469ddf15aac31bac6dbdc9ec1716fa39" + license "GPL-2.0-or-later" + revision 4 + head "https://svn.code.sf.net/p/pdfsandwich/code/trunk/src" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "16c76bd4f3d4fd4a22a1b23737aedd8d017cc0a51cc5aea380e6879b958184ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f02d04e6517c0a842df56f9e7e381a2c3520f20669507f9fe52412c462baa6d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f7cd2c1676f390f9e5951408248c6b8d8682d4b70835ce67af1b89b2acefd74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93a40fb73e99c341323d434d2d03b7db027dd7b931aec4c2aed61f640f649b08" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a6af2fc71eb56e9f121e035b6348a1fa984989096a7158b963a84d5f7b92cc44" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9d03e5564d606b37f3b2aaa2dc68837ca023e87c455c9543836a854ec7728c4f" + sha256 cellar: :any_skip_relocation, sonoma: "b6530b56f5e6629c147e124dc31f70d2632903681bcfcd23368bafcfc11531a8" + sha256 cellar: :any_skip_relocation, ventura: "83ad92b56bb7f058c816fa8a0fbd78b382f709ff69b42e5ae7684e98d811e2b8" + sha256 cellar: :any_skip_relocation, monterey: "d008b33e11a652bfd5e130f09aa7138fa599b22b4b48db266457aa1ceec17361" + sha256 cellar: :any_skip_relocation, big_sur: "eed36d608adf9c4c6a7bcfa2f8d51fc7d7db6b9625d8dd87420b0a49432ed099" + sha256 cellar: :any_skip_relocation, catalina: "e45ad2480a96ef2ff2ee1a0a561004510d3d3f2b61117fce51d2995b5a004b34" + sha256 cellar: :any_skip_relocation, arm64_linux: "38e8f84c9d73b6ee9caa30ecdc46eca87ad44042d0b2afd212ade6b04711fe9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f77d1aa373059a0b32d879bc45f075527a28c6a0a2068b8d38d634dfd2d7d60" + end + + depends_on "gawk" => :build + depends_on "ocaml" => :build + depends_on "exact-image" + depends_on "ghostscript" + depends_on "imagemagick" + depends_on "poppler" + depends_on "tesseract" + depends_on "unpaper" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make" + system "make", "install" + bin.env_script_all_files(libexec/"bin", PATH: "#{Formula["poppler"].opt_bin}:$PATH") + end + + test do + system bin/"pdfsandwich", "-o", testpath/"test_ocr.pdf", + test_fixtures("test.pdf") + assert_path_exists testpath/"test_ocr.pdf", "Failed to create ocr file" + end +end diff --git a/Formula/p/pdftilecut.rb b/Formula/p/pdftilecut.rb new file mode 100644 index 0000000000000..0a740c4606690 --- /dev/null +++ b/Formula/p/pdftilecut.rb @@ -0,0 +1,35 @@ +class Pdftilecut < Formula + desc "Sub-divide a PDF page(s) into smaller pages so you can print them" + homepage "https://github.com/oxplot/pdftilecut" + url "https://github.com/oxplot/pdftilecut/archive/refs/tags/v0.6.tar.gz" + sha256 "fd2383ee0d0acfa56cf6e80ac62881bd6dda4555adcd7f5a397339e7d3eca9ac" + license "BSD-3-Clause" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "90ee505ab0b2f3afc41e42a5ef8e5e3b02474868b9787fc73cb16d5ab66d909c" + sha256 cellar: :any, arm64_sequoia: "a0233594179a8bdeb42d430dfe1384c716fff5d1062b8e00be0e0a3012778730" + sha256 cellar: :any, arm64_sonoma: "11b292ad9ba8f2e3ff99e3df455bf4558e854f95fd49c58dce4e5d3c1ac2f81f" + sha256 cellar: :any, arm64_ventura: "954e44ab18431e84903ee37a9e08730458c0fc2ff3be83bb71bf54ad8aa5184f" + sha256 cellar: :any, sonoma: "02a045c5f5f1ea061b661c5f34fc9f557fa12a8a2ac47ba9ca5c240c0fe60433" + sha256 cellar: :any, ventura: "c76c17100539c6ba2aee77fd1cfad42a9464d15fd2e41edc51419308a85a1f41" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd6a82f54be78a6a4a939ff44e7364993048d76f20c9063764b61ab7b21d5473" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad6f8074acd3375047c5419afcd65722aae5949982d6611e95becfa6ee0cfc37" + end + + depends_on "go" => :build + depends_on "jpeg-turbo" + depends_on "qpdf" + + def install + system "go", "build", *std_go_args + end + + test do + testpdf = test_fixtures("test.pdf") + system bin/"pdftilecut", "-tile-size", "A6", "-in", testpdf, "-out", "split.pdf" + assert_path_exists testpath/"split.pdf", "Failed to create split.pdf" + end +end diff --git a/Formula/p/pdftk-java.rb b/Formula/p/pdftk-java.rb new file mode 100644 index 0000000000000..f8d4f9f1e5678 --- /dev/null +++ b/Formula/p/pdftk-java.rb @@ -0,0 +1,43 @@ +class PdftkJava < Formula + desc "Port of pdftk in java" + homepage "https://gitlab.com/pdftk-java/pdftk" + url "https://gitlab.com/pdftk-java/pdftk/-/archive/v3.3.3/pdftk-v3.3.3.tar.gz" + sha256 "9c947de54658539e3a136e39f9c38ece1cf2893d143abb7f5bf3a2e3e005b286" + license "GPL-2.0-or-later" + head "https://gitlab.com/pdftk-java/pdftk.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "626014736051e1e9c87441f86117b4b0edd3b5ae4ad8be645085b91447873085" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed2ffccfc3600cd148a6795445902000b1131ab4aca7a2e8d6a989d8b00aeb64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b97d535fab834a2bacf655d15869af91b05d1a88c6dc63039b29669e45cc63a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "086851972845bf87aec1535dc4d9a1f6addd1311f468c926cbe7c6ab79e3f015" + sha256 cellar: :any_skip_relocation, sonoma: "0a8f707c529d2f6a036448b5c5c864f5208b68403afb5aca2ae94052cb96b82b" + sha256 cellar: :any_skip_relocation, ventura: "a98dbbff8f1aa546bdffaee0f07b3cabb67ee74052cdbd5c03c1b720f047abbf" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc976b8e0b2bea3916feab4a2d5d5c88133cacd10e71350ba5804d0536c193c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87b00258f2f947e48b44b821179d569babbe5d0ad5ffa2728f7e56085cfccc4f" + end + + # Issue ref: https://gitlab.com/pdftk-java/pdftk/-/issues/182 + depends_on "gradle@8" => :build + depends_on "openjdk" + + def install + system "gradle", "shadowJar", "--no-daemon" + libexec.install "build/libs/pdftk-all.jar" + bin.write_jar_script libexec/"pdftk-all.jar", "pdftk" + man1.install "pdftk.1" + end + + test do + pdf = test_fixtures("test.pdf") + output_path = testpath/"output.pdf" + system bin/"pdftk", pdf, pdf, "cat", "output", output_path + assert output_path.read.start_with?("%PDF") + end +end diff --git a/Formula/p/pdftohtml.rb b/Formula/p/pdftohtml.rb new file mode 100644 index 0000000000000..7c39aee68a39d --- /dev/null +++ b/Formula/p/pdftohtml.rb @@ -0,0 +1,43 @@ +class Pdftohtml < Formula + desc "Utility which converts PDF files into HTML and XML formats" + homepage "https://pdftohtml.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pdftohtml/Experimental%20Versions/pdftohtml%200.40/pdftohtml-0.40a.tar.gz" + sha256 "277ec1c75231b0073a458b1bfa2f98b7a115f5565e53494822ec7f0bcd8d4655" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/pdftohtml[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d4d29ea04949e3054a63667e1563e018cf7b289cee59357ee46955d70f47f6cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09de57926ddbd85906d6ed7dabf427f6314d13cab5de1c0e073a1288a3ea0b2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb5b6f4137fd05ae7158f74fddf056193773308ea7195ffeec203928ac0bb52c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a18be87eedeec7c2bb94b6571e532ac3e04abf21567991c177d53f6740c71767" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0ddb14280f6046adac64bd2d731483b8bf97cd9f8bd61a52f1f7b95b608febe2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "61d5a75c1351339a1e1cee32c585172bc638503e4fea57232532daae41bbb2e6" + sha256 cellar: :any_skip_relocation, sonoma: "9daa1524d85414bda2e30ab99e13f958a3d7620f6d40d74792bd7b841695ad91" + sha256 cellar: :any_skip_relocation, ventura: "74cca150680a622965a061c05bbe754e80c63232b6b35db8508136313321d6b4" + sha256 cellar: :any_skip_relocation, monterey: "4c5979a8c315cdbe2babf1a576e86259956f129d67b416fe62dd9a5b51bc9c64" + sha256 cellar: :any_skip_relocation, big_sur: "17a699cdc73b7674f537adec7ea8ad696374921c84a52dfaacaa05882f5696da" + sha256 cellar: :any_skip_relocation, catalina: "d8a6e5bb1d84ee766898543d77307b4a9a6e6f826ebe9cc48ce6db8bb24c8923" + sha256 cellar: :any_skip_relocation, arm64_linux: "0356296698624d0111e7352dfef0d7c63aa1523144829b524f86b60d94f3021b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0e13127c7d0eeaa1dd9be51dd46644bad7fa0864849aa6476392e0f5c7b7561" + end + + conflicts_with "pdf2image", "poppler", "xpdf", + because: "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" + + def install + system "make" + bin.install "src/pdftohtml" + end + + test do + assert_match "Homebrew test", shell_output("#{bin}/pdftohtml -stdout #{test_fixtures("test.pdf")}") + end +end diff --git a/Formula/p/pdftoipe.rb b/Formula/p/pdftoipe.rb new file mode 100644 index 0000000000000..77fd4fdf5af77 --- /dev/null +++ b/Formula/p/pdftoipe.rb @@ -0,0 +1,43 @@ +class Pdftoipe < Formula + desc "Reads arbitrary PDF files and generates an XML file readable by Ipe" + homepage "https://github.com/otfried/ipe-tools" + url "https://github.com/otfried/ipe-tools/archive/refs/tags/v7.2.29.1.tar.gz" + sha256 "604ef6e83ad8648fa09c41a788549db28193bb3638033d69cac2b0b3f33bd69b" + license "GPL-2.0-or-later" + revision 11 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "aef4d333bf099830d1c9a08fb5d1fe329502388fe71e9e4658de6daece1d2934" + sha256 cellar: :any, arm64_sequoia: "c360cf7ac7f4f2c2f887be1c93290796dc4e2fc94f3bce37a305a28484eeb2f7" + sha256 cellar: :any, arm64_sonoma: "d28e0ed8bf6e83a58bb4c74ccf713f70310f48f83270ce7fcdb1d98efbdec60d" + sha256 cellar: :any, sonoma: "9a42dc11e7fd571ba972d352805d605e613224dbad138cc92effa55ac0a3db55" + sha256 cellar: :any_skip_relocation, arm64_linux: "81fdef81bd707c301ce8f6b2ae0402e5ed40f5c55aff96e1602339e69819f616" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b390f2ea059095ed3e38fffbcea9ed892024d276165d5e86d42ea0a74f9022f0" + end + + depends_on "pkgconf" => :build + depends_on "poppler" + + # Backport fix for `poppler` 25+ compatibility + # PR ref: https://github.com/otfried/ipe-tools/pull/72 + patch do + url "https://github.com/otfried/ipe-tools/commit/0da954e50fbdedf43796291853890fe36248bc16.patch?full_index=1" + sha256 "65f7010897fa4dd94cfa933d986cae6978ddd4e33e2aa1479ec7c11786e100c3" + end + + def install + cd "pdftoipe" do + system "make" + bin.install "pdftoipe" + man1.install "pdftoipe.1" + end + end + + test do + cp test_fixtures("test.pdf"), testpath + system bin/"pdftoipe", "test.pdf" + assert_match "", File.read("test.ipe") + end +end diff --git a/Formula/p/pdm.rb b/Formula/p/pdm.rb new file mode 100644 index 0000000000000..39971fb9ed265 --- /dev/null +++ b/Formula/p/pdm.rb @@ -0,0 +1,240 @@ +class Pdm < Formula + include Language::Python::Virtualenv + + desc "Modern Python package and dependency manager supporting the latest PEP standards" + homepage "https://pdm-project.org" + url "https://files.pythonhosted.org/packages/35/84/50e05b927fc9d23289b588affd6c2e2f50239f8a1afccba720c42751572a/pdm-2.26.1.tar.gz" + sha256 "60a568201424a7193b661f6fed6e446e39695b52edc5e0904ba0b07fcaf2e787" + license "MIT" + head "https://github.com/pdm-project/pdm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "caa95adc4f2918a4b8fee22938bc205fd8679558a63f67f04fbfe0d421f735ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d734ef0c46ee89733a80cbd1797905f51c5193919c222885692c4b0d43b272f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0bf712b50be5d322573d581de3554686a2fe142dbc8071447ee6789f26fcffde" + sha256 cellar: :any_skip_relocation, sonoma: "f48d583ed2b142d0bc0a9d3cb0dc1084e6479a92895633ae95c183ad7e448bc9" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b7bc98b83a556cba341286f386d8302092c603fffa392463aa6e015dda41e97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7fd10f5c2ea5e6ce4fb87939c77fd48e8072b41e794a561b4fee22510cc23c0" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "anysqlite" do + url "https://files.pythonhosted.org/packages/0f/4b/cd5d66b9f87e773bc71344a368b9472987e33514e6627e28342b9c3e7c43/anysqlite-0.0.5.tar.gz" + sha256 "9dfcf87baf6b93426ad1d9118088c41dbf24ef01b445eea4a5d486bac2755cce" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "dep-logic" do + url "https://files.pythonhosted.org/packages/d8/00/93a90a4ce514e63a181486c6408ea50e8cdf7cdb73ab5580a6f7f5e5a496/dep_logic-0.5.2.tar.gz" + sha256 "f8dc4a74d1bad0d35a45c236572cf5d6534b5c2e84de87f2a354c849eec7e562" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "findpython" do + url "https://files.pythonhosted.org/packages/1a/17/5a72566eecc9cbc1609459befe9f7dc65e101b66519a79999cc48044993c/findpython-0.7.0.tar.gz" + sha256 "8b31647c76352779a3c1a0806699b68e6a7bdc0b5c2ddd9af2a07a0d40c673dc" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hishel" do + url "https://files.pythonhosted.org/packages/e5/64/a104ccac48f123f853254483617b16e0efc1649bd7e35bcdc5a5a5ef0ae2/hishel-0.1.5.tar.gz" + sha256 "9d40c682cd94fd6e1394fb05713ae20a75ed8aeba6f5272380444039ce6257f2" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "id" do + url "https://files.pythonhosted.org/packages/22/11/102da08f88412d875fa2f1a9a469ff7ad4c874b0ca6fed0048fe385bdb3d/id-1.5.0.tar.gz" + sha256 "292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "installer" do + url "https://files.pythonhosted.org/packages/05/18/ceeb4e3ab3aa54495775775b38ae42b10a92f42ce42dfa44da684289b8c8/installer-0.7.0.tar.gz" + sha256 "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pbs-installer" do + url "https://files.pythonhosted.org/packages/c5/a8/7d0367a979c209482ac8d4ae84b0b0aa36950157399a1d0a00a4d2bb4045/pbs_installer-2025.10.28.tar.gz" + sha256 "399f1788b17c650e69c42729ba9e74d240909f36cfe187b5f9b60488314ba154" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyproject-hooks" do + url "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz" + sha256 "1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/1d/14/4669927e06631070edb968c78fdb6ce8992e27c9ab2cde4b3993e22ac7af/resolvelib-1.2.1.tar.gz" + sha256 "7d08a2022f6e16ce405d60b68c390f054efcfd0477d4b9bd019cc941c28fad1c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "socksio" do + url "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz" + sha256 "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac" + + # Unpin flit-core<3 to support 3.14+ + patch do + url "https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1.patch?full_index=1" + sha256 "7aefa906b62e2c9a8df255ea742ca97e155ac2e1238e49ce11e3e56e37ee1f8b" + end + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "truststore" do + url "https://files.pythonhosted.org/packages/53/a3/1585216310e344e8102c22482f6060c7a6ea0322b63e026372e6dcefcfd6/truststore-0.10.4.tar.gz" + sha256 "9d91bd436463ad5e4ee4aba766628dd6cd7010cf3e2461756b3303710eebc301" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "unearth" do + url "https://files.pythonhosted.org/packages/18/85/84b0d188eefc32b9e8825b43ce98c2018323ebb68d3b581e856061d1dacc/unearth-0.18.1.tar.gz" + sha256 "e8b132f73bf0dac7556a36419cb43125ced3bd172682bde1383cc5b193ccf73d" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz" + sha256 "643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c" + end + + def install + venv = virtualenv_install_with_resources + generate_completions_from_executable(bin/"pdm", "completion") + + # Build an `:all` bottle by replacing homebrew prefix on the comment block + inreplace venv.site_packages/"findpython-#{resource("findpython").version}.dist-info/METADATA", + "/opt/homebrew", + "/usr/local" + end + + test do + (testpath/"pyproject.toml").write <<~TOML + [project] + name = "testproj" + requires-python = ">=3.9" + version = "1.0" + license = {text = "MIT"} + + [build-system] + requires = ["pdm-backend"] + build-backend = "pdm.backend" + TOML + system bin/"pdm", "add", "requests==2.31.0" + assert_match "dependencies = [\"requests==2.31.0\"]", (testpath/"pyproject.toml").read + assert_path_exists testpath/"pdm.lock" + assert_match "name = \"urllib3\"", (testpath/"pdm.lock").read + output = shell_output("#{bin}/pdm run python -c 'import requests;print(requests.__version__)'") + assert_equal "2.31.0", output.strip + end +end diff --git a/Formula/p/pdns.rb b/Formula/p/pdns.rb new file mode 100644 index 0000000000000..d6d9412264e19 --- /dev/null +++ b/Formula/p/pdns.rb @@ -0,0 +1,68 @@ +class Pdns < Formula + desc "Authoritative nameserver" + homepage "https://www.powerdns.com" + url "https://downloads.powerdns.com/releases/pdns-5.0.1.tar.bz2" + sha256 "c45f91a08d343410e992ce887edcf560c4544bae07472da1a00aa8ae418a67af" + license "GPL-2.0-or-later" + + # The first-party download page (https://www.powerdns.com/downloads) isn't + # always updated for newer versions, so for now we have to check the + # directory listing page where `stable` tarballs are found. We should switch + # back to checking the download page if/when it is reliably updated with each + # release, as it doesn't have to transfer nearly as much data. + livecheck do + url "https://downloads.powerdns.com/releases/" + regex(/href=.*?pdns[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "4b38511a3291c2e60cb6492d83db9cae10d165609e747356dcbcd5a63e5d71d0" + sha256 arm64_sequoia: "4855e6e77c7ff191c7249495b9c8431cfa5f0093a58a328525970d8566780119" + sha256 arm64_sonoma: "2c73b8873813d7a1a14db937ff6d73179e97b3259e8c5b25f6bf004000d85f30" + sha256 sonoma: "965470420b62bb065908f22476b18c70ca0770ad959eccb49985cec556d3de1a" + sha256 arm64_linux: "c0fb2f1508f8d78cf236aef6b6455cc0dc92bee90530cc9d339878b79dd13a70" + sha256 x86_64_linux: "9e73a05aaac16867baceb140fd261ab5b67e01061d6fc8c5af3d32397b1dfe77" + end + + head do + url "https://github.com/powerdns/pdns.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "ragel" + end + + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "lua" + depends_on "openssl@3" + depends_on "sqlite" + + uses_from_macos "curl" + + def install + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc}/powerdns + --with-lua + --with-libcrypto=#{Formula["openssl@3"].opt_prefix} + --with-sqlite3 + --with-modules=gsqlite3 + ] + + system "./bootstrap" if build.head? + system "./configure", *args + system "make", "install" + end + + service do + run opt_sbin/"pdns_server" + keep_alive true + end + + test do + output = shell_output("#{sbin}/pdns_server --version 2>&1") + assert_match "PowerDNS Authoritative Server #{version}", output + end +end diff --git a/Formula/p/pdnsd.rb b/Formula/p/pdnsd.rb new file mode 100644 index 0000000000000..373dbdd55f260 --- /dev/null +++ b/Formula/p/pdnsd.rb @@ -0,0 +1,72 @@ +class Pdnsd < Formula + desc "Proxy DNS server with permanent caching" + # The upstream urls are currently down, so temporarily use an archived copy. + homepage "https://web.archive.org/web/20201203080556/members.home.nl/p.a.rombouts/pdnsd/" + url "https://web.archive.org/web/20200323100335/members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-1.2.9a-par.tar.gz" + mirror "https://fossies.org/linux/misc/dns/pdnsd-1.2.9a-par.tar.gz" + version "1.2.9a-par" + sha256 "bb5835d0caa8c4b31679d6fd6a1a090b71bdf70950db3b1d0cea9cf9cb7e2a7b" + license "GPL-3.0-or-later" + + bottle do + rebuild 2 + sha256 arm64_sequoia: "9ddb9a075c4ca211351979db780d89982bdaaad387b43055c96082cd50a6ed20" + sha256 arm64_sonoma: "1ff9eec76617f6a8f60821ff67791c419a44954098c6b5b4f9a41b73f5cca583" + sha256 arm64_ventura: "3319b3306f0a2561742e6f9cf3fe9fc826586ac3d9f2cb039df3f173bde01348" + sha256 arm64_monterey: "3ea74a916606066431810d0b959ca508cb0fd6cb27c2902495db6e9cf6e1e30d" + sha256 arm64_big_sur: "2a39399ddd344c3d38b4052ca914dc99eebd452a9cf323518504c19671e7b2f6" + sha256 sonoma: "52cfde24914000c9a1f809d4c31307ebae9b871c54737c08c52774b72a4ad7a4" + sha256 ventura: "2963deb135757a0f82f140f9dadbfe35e8431d83ae1eecf67dd04dea88461012" + sha256 monterey: "76c55bb21dc763f58cb9bb6c8611811cec2d414825c5b0d66a295946c8871db4" + sha256 big_sur: "1ab46d6a13884a67fe91ecb554c53c8fc5fda4f2d453016cdd1242f8c362e9d5" + sha256 catalina: "125b690bbac734558cd9a4510c1336e2a92c3fd4748ba2ed216af9a5041c5d60" + sha256 x86_64_linux: "4402ca761308936338a2c45fd5642eb8d19c80ec6700b1bcb79203f4396d76c4" + end + + # The upstream urls have been dead since at least 2021. + # Last release on 2012-03-17 + deprecate! date: "2024-03-31", because: :unmaintained + disable! date: "2025-03-31", because: :unmaintained + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + "--mandir=#{man}", + "--with-cachedir=#{var}/cache/pdnsd" + system "make", "install" + end + + def caveats + <<~EOS + This install of "pdnsd" expects config files to be in #{etc} + All state files (status and cache) are stored in #{var}/cache/pdnsd. + + pdnsd needs to run as root since it listens on privileged ports. + + Sample config file can be found at #{etc}/pdnsd.conf.sample. + + Note that you must create the config file before starting the service, + and change ownership to "root" or pdnsd will refuse to run: + sudo chown root #{etc}/pdnsd.conf + + For other related utilities, e.g. pdnsd-ctl, to run, change the ownership + to the user (default: nobody) running the service: + sudo chown -R nobody #{var}/log/pdnsd.log #{var}/cache/pdnsd + EOS + end + + service do + run opt_sbin/"pdnsd" + keep_alive true + error_log_path var/"log/pdnsd.log" + log_path var/"log/pdnsd.log" + end + + test do + assert_match "version #{version}", + shell_output("#{sbin}/pdnsd --version", 1) + end +end diff --git a/Formula/p/pdnsrec.rb b/Formula/p/pdnsrec.rb new file mode 100644 index 0000000000000..153d1d2a3db20 --- /dev/null +++ b/Formula/p/pdnsrec.rb @@ -0,0 +1,65 @@ +class Pdnsrec < Formula + desc "Non-authoritative/recursing DNS server" + homepage "https://www.powerdns.com/powerdns-recursor" + url "https://downloads.powerdns.com/releases/pdns-recursor-5.3.1.tar.xz" + sha256 "a7b633d4b5da3b5f14d51a78e21e17f1334c828ce96fcccdd97cd7aaaf14cbd5" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + + livecheck do + url "https://downloads.powerdns.com/releases/" + regex(/href=.*?pdns-recursor[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "04573b19ac9ad286f82c0b4b8bef70861875a5d358e0739f15fb0a9863824a8d" + sha256 arm64_sequoia: "b9d5877bd13b6599d8c5847b0c180b2f8a1f70c6366f73b25ca580de20e00ea4" + sha256 arm64_sonoma: "d1dcd99df6ca24a5d8ab276a9597afac6d4a549b92e1ebac028b64bb5db965bd" + sha256 sonoma: "ee8f61e0777b8571c0a7d5b90019222f3cbe44e67c9614acf08c641923307987" + sha256 arm64_linux: "83ea589a2b3213073cbec9be8ac7e520ecd0cb4eb8ff11105edb9a6e7d9b33d8" + sha256 x86_64_linux: "02f6812dc25888fa5fa098b10cb837798a28f1b205de97cc9cc3b1a1abdfb933" + end + + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "rust" => :build + depends_on "boost" + depends_on "lua" + depends_on "openssl@3" + + uses_from_macos "curl" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause <<~EOS + Undefined symbols for architecture x86_64: + "MOADNSParser::init(bool, std::__1::basic_string_view > const&)" + EOS + end + + def install + ENV.cxx11 + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc}/powerdns + --disable-silent-rules + --with-boost=#{Formula["boost"].opt_prefix} + --with-libcrypto=#{Formula["openssl@3"].opt_prefix} + --with-lua + --without-net-snmp + ] + + system "./configure", *args + system "make", "install" + end + + test do + output = shell_output("#{sbin}/pdns_recursor --version 2>&1") + assert_match "PowerDNS Recursor #{version}", output + end +end diff --git a/Formula/p/pdsh.rb b/Formula/p/pdsh.rb new file mode 100644 index 0000000000000..8de4a5d8ddd74 --- /dev/null +++ b/Formula/p/pdsh.rb @@ -0,0 +1,47 @@ +class Pdsh < Formula + desc "Efficient rsh-like utility, for using hosts in parallel" + homepage "https://github.com/chaos/pdsh" + url "https://github.com/chaos/pdsh/releases/download/pdsh-2.35/pdsh-2.35.tar.gz" + sha256 "75ef15347848fff43f8d6ff9c4424fe05c7dd2cdba029139901f861a05093cfe" + license "GPL-2.0-or-later" + head "https://github.com/chaos/pdsh.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "6c84261f0429af978db16961106e2de4752c4f2addcf29ab0934f002b2e21212" + sha256 arm64_sequoia: "4f305e8c05c690c64f73c73e4a845f21d4bbafe7d0e15e96fb4c5e2833f455c9" + sha256 arm64_sonoma: "e00a802e4fbdbbe512b3222a15da104ff75a5f35beb28fed5a6239f9b4cf0476" + sha256 arm64_ventura: "ee17c95f1182a9899b11c65a05f39286abc414c4cc66407d0f0f05a262ad81a3" + sha256 arm64_monterey: "a22ed5d817733ddbd02889fe279f1350420deca549a2aaed17c6bb58918855bc" + sha256 sonoma: "9cfecd506b0bf86abf5fc01306ae1e17f669e536bc8c07fd09398ca88e4ac12a" + sha256 ventura: "942f58f439d6a63a936970bc1e04f02bdb70b11d987a818ea5a286ff13d8bec5" + sha256 monterey: "b6cabdcc2b823e830a774349cb1fdf26d5e3a85977c6e21b27e5447b86e83b8c" + sha256 arm64_linux: "138fbccd92abf37c7abdaf86ef9b6e1a3317857c275c19b4fc3dd8e38a7c1e19" + sha256 x86_64_linux: "497c73313e668ccff797d0c3ac567ee964e0970d31488185b8788f0812626e36" + end + + depends_on "readline" + + def install + args = %W[ + --prefix=#{prefix} + --mandir=#{man} + --with-nodeupdown + --with-readline + --with-ssh + --with-dshgroups + --with-netgroup + --with-slurm + --without-rsh + --without-xcpu + ] + + system "./configure", *args + system "make", "install" + end + + test do + system bin/"pdsh", "-V" + end +end diff --git a/Formula/p/pdtm.rb b/Formula/p/pdtm.rb new file mode 100644 index 0000000000000..39b1a687718fb --- /dev/null +++ b/Formula/p/pdtm.rb @@ -0,0 +1,30 @@ +class Pdtm < Formula + desc "ProjectDiscovery's Open Source Tool Manager" + homepage "https://github.com/projectdiscovery/pdtm" + url "https://github.com/projectdiscovery/pdtm/archive/refs/tags/v0.1.3.tar.gz" + sha256 "5aa5611e3a61df37a2e4030fd8742d4a1278840fe91c1e1fde129aab81f4fe45" + license "MIT" + head "https://github.com/projectdiscovery/pdtm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f5267c24f3b4dd5f19c8eeadc4a6582cf7b9d1dfc990c083b90415a5ad460cd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9ef2bbd6f036e5c3ce6629905c5c02908ca51440cad3319094771c32077962f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96751029319e738c50fa86960e7764d68def5c5b0a08b86d4bb7aa1aafabb1ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1f8cff333aeb9050e11e8e346b54855c55a2690b697ae033db3b41a239310df1" + sha256 cellar: :any_skip_relocation, sonoma: "c0f4d7527f5baa186c8cfad4d0d956b7494af38818efeee4adbc09f908b7e0cd" + sha256 cellar: :any_skip_relocation, ventura: "1783d258be29384be1a3db469de6e1cd8bdfc9d077f0c6bd4bfe8861fc00f1fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "c521caaed87a6e797fe969cd5f555935cea1eb49aced09638e8dfaa1b427cade" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dfea4fd9e25c41239d8126f941591db53887aa456d43396bfbad42fe29b19bd" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/pdtm" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pdtm -version 2>&1") + assert_match "#{testpath}/.pdtm/go/bin", shell_output("#{bin}/pdtm -show-path") + end +end diff --git a/Formula/p/peco.rb b/Formula/p/peco.rb new file mode 100644 index 0000000000000..4ce8458ec4868 --- /dev/null +++ b/Formula/p/peco.rb @@ -0,0 +1,36 @@ +class Peco < Formula + desc "Simplistic interactive filtering tool" + homepage "https://github.com/peco/peco" + url "https://github.com/peco/peco/archive/refs/tags/v0.5.11.tar.gz" + sha256 "8e32c8af533e03795f27feb4ee134960611d2fc0266528b1c512a6f1f065b164" + license "MIT" + head "https://github.com/peco/peco.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "76327c2446971946d8fc58cfe5afe6bfbb4c6e6115fcc069a6c9801b950420d7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7a5fa08c2aa3ad21a733a5523c4fb5fc7217258bebcaaf33e0d61cf11cbefa3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "837a17172f4346d52cd042a91b1238e8765fdd829cc2c33b13911a9604612562" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6ee18836e9fb37550e7245924f49a2c4fd6031d0c03398838e93f5ca0ea80bb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c6ee18836e9fb37550e7245924f49a2c4fd6031d0c03398838e93f5ca0ea80bb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c6ee18836e9fb37550e7245924f49a2c4fd6031d0c03398838e93f5ca0ea80bb" + sha256 cellar: :any_skip_relocation, sonoma: "bd46db16c2244bb3f959b175812614f58679f13648f3713d2ce669006b39ff60" + sha256 cellar: :any_skip_relocation, ventura: "7a91ef4b46bebf8e13308598da973d70b373e30f0d0193e771b1914198120cd2" + sha256 cellar: :any_skip_relocation, monterey: "7a91ef4b46bebf8e13308598da973d70b373e30f0d0193e771b1914198120cd2" + sha256 cellar: :any_skip_relocation, big_sur: "7a91ef4b46bebf8e13308598da973d70b373e30f0d0193e771b1914198120cd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "374534cc56672f993900a9d52493162e3a6a610216b0147e97455391a5e8048e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b79dea96e98bb408b0b87bd9b2ea4371c035e23b49c1de71ce7c7387f4ffec51" + end + + depends_on "go" => :build + + def install + system "make", "build" + system "go", "build", *std_go_args, "cmd/peco/peco.go" + end + + test do + system bin/"peco", "--version" + end +end diff --git a/Formula/p/pedump.rb b/Formula/p/pedump.rb new file mode 100644 index 0000000000000..1124e61fdbeef --- /dev/null +++ b/Formula/p/pedump.rb @@ -0,0 +1,47 @@ +class Pedump < Formula + desc "Dump Windows PE files using Ruby" + homepage "https://pedump.me" + url "https://github.com/zed-0xff/pedump/archive/refs/tags/v0.6.10.tar.gz" + sha256 "fd31800d4e1e6d3cf0116b9b1a5565cde4bfc684bea3bab5a39b58745b44c3f6" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "46e2e44dae5cd4974173e1a271d602c131ecb1557869a6bd9dc979a672605d3f" + end + + depends_on "ruby" + + conflicts_with "mono", because: "both install `pedump` binaries" + + # Backport Gemfile.lock update to fix build on newer Ruby + patch do + url "https://github.com/zed-0xff/pedump/commit/55072547f30bc4377add1c47a8f0022183b7292d.patch?full_index=1" + sha256 "fdb5e6dc525c55b449afbb3082c72270f7512bdfc8e78ae08c99fb169a067efd" + end + + def install + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg + ENV["GEM_HOME"] = libexec + + system "bundle", "config", "set", "without", "development", "test" + system "bundle", "install" + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/pedump --version") + + resource "notepad.exe" do + url "https://github.com/zed-0xff/pedump/raw/master/samples/notepad.exe" + sha256 "e4dce694ba74eaa2a781f7696c44dcb54fed5aad337dac473ac8a6b77291d977" + end + + resource("notepad.exe").stage testpath + assert_match "2008-04-13 18:35:51", shell_output("#{bin}/pedump --pe notepad.exe") + end +end diff --git a/Formula/p/peg-markdown.rb b/Formula/p/peg-markdown.rb new file mode 100644 index 0000000000000..120c7b49bf25b --- /dev/null +++ b/Formula/p/peg-markdown.rb @@ -0,0 +1,47 @@ +class PegMarkdown < Formula + desc "Markdown implementation based on a PEG grammar" + homepage "https://github.com/jgm/peg-markdown" + url "https://github.com/jgm/peg-markdown/archive/refs/tags/0.4.14.tar.gz" + sha256 "111bc56058cfed11890af11bec7419e2f7ccec6b399bf05f8c55dae0a1712980" + license any_of: ["GPL-2.0-or-later", "MIT"] + revision 1 + head "https://github.com/jgm/peg-markdown.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ec72ce7ad492b44c05950b2ac9421ed3e410f1eec51e2c64b6215edced456df7" + sha256 cellar: :any, arm64_sequoia: "bd7f5543b909228fcad9af4e3173b8ca657d92ca17233c99c8415716c7a575a5" + sha256 cellar: :any, arm64_sonoma: "a98a5d30c50275c60315ca49c9a5e9f8db427bf8e14dd76eed44f5d59af8b354" + sha256 cellar: :any, arm64_ventura: "b86b3203ed481c4afb9bcbd489a4803b3f1fd204c27bbed16dc42e45e16790fb" + sha256 cellar: :any, arm64_monterey: "93a7ee730c2fb9c01ab25be02028ff8b25907d2a1693de10f07864b861f3be13" + sha256 cellar: :any, arm64_big_sur: "25d1eb833b0688d0b2db0667f105d27e50d6a46a14ea57be5aa5ef50c7127f62" + sha256 cellar: :any, sonoma: "caead381de3c5b6a910a4316968f88da93d6dda290efb0c8b77595a54082e724" + sha256 cellar: :any, ventura: "9a7b88b03ac9871d36d6072135cddb6fce38933ffbbf6836a6a9d9265bc0aaa2" + sha256 cellar: :any, monterey: "9f10d8b70ae2e5fc012c2baf976a2235c9501be317dde74b17648052dd801388" + sha256 cellar: :any, big_sur: "efefd2a49548d4abdfc97bdc12295b1f6dac5b1832f21d9b6f147cc7a3c27176" + sha256 cellar: :any, catalina: "08910e3fdd97183865c2839a4e14839826101e6dfa48120aebc60fbe838f0689" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a9e3a5818daa858757ddbac902c2d0795bfa0bb6b02ce96a6fc35469b6c96ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1b2212c3e3a3610a02a5f668e3b88785c0bf1c6383f36ed3674abe42cc941bc" + end + + depends_on "pkgconf" => :build + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + # Workaround for arm64 linux. Upstream isn't maintained + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + system "make" + bin.install "markdown" => "peg-markdown" + end + + test do + assert_equal "

Homebrew

", + pipe_output(bin/"peg-markdown", "**Homebrew**", 0).chomp + end +end diff --git a/Formula/p/peg.rb b/Formula/p/peg.rb new file mode 100644 index 0000000000000..eb9a2c2861fe5 --- /dev/null +++ b/Formula/p/peg.rb @@ -0,0 +1,47 @@ +class Peg < Formula + desc "Program to perform pattern matching on text" + homepage "https://www.piumarta.com/software/peg/" + url "https://www.piumarta.com/software/peg/peg-0.1.19.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/p/peg/peg_0.1.19.orig.tar.gz" + sha256 "0013dd83a6739778445a64bced3d74b9f50c07553f86ea43333ae5fab5c2bbb4" + license "MIT" + + # The homepage links to development tarballs using the stable version format + # (with nothing in the file name to distinguish stable/development), so we + # check the "current stable version is 1.2.3" text. + livecheck do + url :homepage + regex(/current\s+stable\s+version\s+is\s+v?(\d+(?:\.\d+)+)/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69199b8b5ca9791da1895d31d558d1205468f97741268abb2bb7944320cf050b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2404175aa4fe06bfa03b4cd11cd1aa8ae657e85353062c11c73c553544a032e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ed0bb60eaf375b862b8c0b33deb2cdf50ac0926ebcdf0570f06f1a28e5ffa00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ebbeb402eb35f2b4cf3c7d6ea4ad2a69aa5e820ab79a82009ed829a56ea6945a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8b03363610a4e6408dddc5c5b5aa6db243cb48def84e14cd910dc40e3ecbf5a4" + sha256 cellar: :any_skip_relocation, sonoma: "dde90ca660bdf7d086e1552195a2f6523550c77ce846a1ce6b72381046594861" + sha256 cellar: :any_skip_relocation, ventura: "c5093be933ee74c35e8eef5805da9db1cc5f4f5312482039dec5abdc39a9da75" + sha256 cellar: :any_skip_relocation, monterey: "e0189aa87097be5b4d6bdb026201d3920fc085df5aa33b250cd7c3c0bc0228b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4cf66155b03b7df188f33b1df5bf9b7f529a3544416292795414a6fb613b741" + sha256 cellar: :any_skip_relocation, x86_64_linux: "344b71933baafa8d0d1e9c685b67f73726f5f6372953346ae8460edab2acc015" + end + + def install + system "make", "all" + bin.install %w[peg leg] + man1.install Utils::Gzip.compress("src/peg.1") + end + + test do + (testpath/"username.peg").write <<~EOS + start <- "username" + EOS + + system bin/"peg", "-o", "username.c", "username.peg" + + assert_match 'yymatchString(yy, "username")', File.read("username.c") + end +end diff --git a/Formula/p/pegtl.rb b/Formula/p/pegtl.rb new file mode 100644 index 0000000000000..019867492cda8 --- /dev/null +++ b/Formula/p/pegtl.rb @@ -0,0 +1,34 @@ +class Pegtl < Formula + desc "Parsing Expression Grammar Template Library" + homepage "https://github.com/taocpp/PEGTL" + url "https://github.com/taocpp/PEGTL/archive/refs/tags/3.2.8.tar.gz" + sha256 "319e8238daebc3a163f60c88c78922a8012772076fdd64a8dafaf5619cd64773" + # license got changed to BSL-1.0 in main per https://github.com/taocpp/PEGTL/commit/c7630f1649906daf08b8ddca1420e66b542bae2b + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4cc6917959a4a5589e44b04a3f60a2c6be767b2d5ef302af832b62804af8a342" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DPEGTL_BUILD_TESTS=OFF + -DPEGTL_BUILD_EXAMPLES=OFF + -DCMAKE_CXX_STANDARD=17 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + rm "src/example/pegtl/CMakeLists.txt" + (pkgshare/"examples").install (buildpath/"src/example/pegtl").children + end + + test do + system ENV.cxx, pkgshare/"examples/hello_world.cpp", "-std=c++17", "-o", "helloworld" + assert_equal "Good bye, homebrew!\n", shell_output("./helloworld 'Hello, homebrew!'") + end +end diff --git a/Formula/p/pelican.rb b/Formula/p/pelican.rb new file mode 100644 index 0000000000000..37bae9db7130d --- /dev/null +++ b/Formula/p/pelican.rb @@ -0,0 +1,132 @@ +class Pelican < Formula + include Language::Python::Virtualenv + + desc "Static site generator that supports Markdown and reST syntax" + homepage "https://getpelican.com/" + url "https://files.pythonhosted.org/packages/cf/ab/a5e863de66054c561e111687b4c1f7cb2ad5f2d4805d2bb12863f0f637cd/pelican-4.11.0.post0.tar.gz" + sha256 "0d5e9c0cc9c6713ab6c25b2c4b64844f34d9be8c8c8cc7f42c3a8aa6b3bbbe33" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3e277d1a8e8d1625d447c9ef37653d430857521bc09b9de7a1807312f4607b68" + sha256 cellar: :any, arm64_sequoia: "28e907ea9ee64065b5fdb510cbbe17b9c31b3c80208f5106d4acb208d99daeb9" + sha256 cellar: :any, arm64_sonoma: "34810c7215386ec3cb9324b0e27048e2e4d730458b67031d117eb5ea108aeb86" + sha256 cellar: :any, sonoma: "82afdff03fb2b0e88758d388eee5ff6ea171f5bc127550a9acfb734856fd9129" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab92e94e5f5c2d8790df1a5cf7d923ef13d763094c731ae34d7e26fcef83f662" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f7771d3e1183bb045c920f33d6531fe2020423a0d3c4e16ecbd0abb19501618" + end + + depends_on "rust" => :build # for `watchfiles` + depends_on "python@3.14" + + pypi_packages package_name: "pelican[markdown]" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "feedgenerator" do + url "https://files.pythonhosted.org/packages/b0/d2/f05e9f4628cb0df988de66f8a97dd52877490e6ebf8e7b41cd341bf2ad6b/feedgenerator-2.2.1.tar.gz" + sha256 "0eaa955f1f0bcb5b87ac195af740f06ff9fff4a40ed30b8a7c6bbebb264d4dd1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "ordered-set" do + url "https://files.pythonhosted.org/packages/4c/ca/bfac8bc689799bcca4157e0e0ced07e70ce125193fc2e166d2e685b7e2fe/ordered-set-4.1.0.tar.gz" + sha256 "694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz" + sha256 "a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2" + end + + def install + virtualenv_install_with_resources + # Remove ARM binaries on Intel macOS + rm_r libexec.glob("lib/python*.*/site-packages/pelican/build/aarch64-*") if OS.mac? && Hardware::CPU.intel? + end + + test do + (testpath/"content/test-article.md").write <<~MARKDOWN + Title: Test Article + Date: #{Time.now} + Category: Test + + This is a test article + MARKDOWN + + system bin/"pelican" + assert_path_exists "output/test-article.html" + end +end diff --git a/Formula/p/pelikan.rb b/Formula/p/pelikan.rb new file mode 100644 index 0000000000000..62d36951a2182 --- /dev/null +++ b/Formula/p/pelikan.rb @@ -0,0 +1,44 @@ +class Pelikan < Formula + desc "Production-ready cache services" + homepage "https://twitter.github.io/pelikan" + url "https://github.com/twitter/pelikan/archive/refs/tags/0.1.2.tar.gz" + sha256 "c105fdab8306f10c1dfa660b4e958ff6f381a5099eabcb15013ba42e4635f824" + license "Apache-2.0" + head "https://github.com/twitter/pelikan.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "64704f442e8c9c1bd917a94f37d152513fe8c4691ae6aecf24599bac242975cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf1eea879a3b1eb8ec2d34616519f383cadea119d9dfec32ef89f93c5de3f248" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6074fdbebf10e608f76145fc4d41cf9be62d3b3ac67cf6b50ab1a1c21c0da76f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "395c03af1bab96be9a15937c4e3c997b8755a53abda5ab1f53227ebbc2cc6f7a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a20c89a4c6828864b1b8d5361b97357795ef49ef517668237211c00a92bb0d80" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "22f695e695353e9317b34caf92789363464100d5ef63a7883a393767030e9951" + sha256 cellar: :any_skip_relocation, sonoma: "02443d1d5646a37dbb03e300e8121f75510312b2980e6b3a44e4839f8243424c" + sha256 cellar: :any_skip_relocation, ventura: "5252a921d70fa4834ab331666620c1296c8af4fe7bd90817b27dc39e21780e3f" + sha256 cellar: :any_skip_relocation, monterey: "52559baeef959550027d8d764a2a99d831d0b4a4d3041cb1e76a9c04b67c137d" + sha256 cellar: :any_skip_relocation, big_sur: "98b69e12d5ba1d3e8824e87f3fa5773a3bf7ba63dc2c32c73f07839b2c9d0e81" + sha256 cellar: :any_skip_relocation, catalina: "61441ad2aeeb6d14ab8fa6183944c1f4ab0733776e3f810ad17b80faf2f25faf" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6fd25c2f404b5f43c23612cd1c87f1d5f87828da5110c903af3b3c58a66c7b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "313be126d5718e0053ce871bbc09446325c24d3bce02117d940dcb45a922c99a" + end + + depends_on "cmake" => :build + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `signals'; ../buffer/cc_buf.c.o:(.bss+0x20): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"pelikan_twemcache", "-c" + end +end diff --git a/Formula/p/perbase.rb b/Formula/p/perbase.rb new file mode 100644 index 0000000000000..b46fcbd09d2f3 --- /dev/null +++ b/Formula/p/perbase.rb @@ -0,0 +1,80 @@ +class Perbase < Formula + desc "Fast and correct perbase BAM/CRAM analysis" + homepage "https://github.com/sstadick/perbase" + license "MIT" + head "https://github.com/sstadick/perbase.git", branch: "master" + + stable do + url "https://github.com/sstadick/perbase/archive/refs/tags/v1.1.0.tar.gz" + sha256 "6b9e030ce0692631482ef074a7d6c37519d6400be21d2f7533ba44a0ec5dc237" + + uses_from_macos "xz" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + # Resource to avoid building bundled curl, xz and zlib-ng + # Issue ref: https://github.com/rust-bio/hts-sys/issues/23 + resource "hts-sys" do + url "https://static.crates.io/crates/hts-sys/hts-sys-2.1.1.crate" + sha256 "deebfb779c734d542e7f14c298597914b9b5425e4089aef482eacb5cab941915" + + livecheck do + url "https://raw.githubusercontent.com/sstadick/perbase/refs/tags/v#{LATEST_VERSION}/Cargo.lock" + regex(/name = "hts-sys"\nversion = "(\d+(?:\.\d+)+)"/i) + end + end + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eafb09895b546f68c784f9db1d04eccae19498a7dccf1a038e61f3383a32a34e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6381d9e4d8d9c0bf641a3c0584c8a6bce0915afe9eaf27a373a835222fbc0174" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "80c024e6e5ef7a68dc49aff72115ed37123c19d145ec9b629b84fda0a3dd64b5" + sha256 cellar: :any_skip_relocation, sonoma: "aca50eabad6b23d04cc9cf0cfb499dd80ceba95407039e389ec5c2bbca9c70c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "48658dda19de513ad974dc716dc990aede00119881703453d584692f29d31c34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "070c89be5fd7eab9c163694a9f705fa7891dbe59168bd1f33327627c94e2f52f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "bamtools" => :test + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" # need to build `openssl-sys` + end + + def install + if build.stable? + # TODO: remove this check when bump-formula-pr can automatically update resources + hts_sys_version = File.read("Cargo.lock")[/name = "hts-sys"\nversion = "(\d+(?:\.\d+)+)"/i, 1] + odie "Resource `hts-sys` version needs to be updated!" if resource("hts-sys").version != hts_sys_version + + # Workaround to disable building bundled zlib-ng in "gzp -> flate2" + inreplace "Cargo.toml", + /^(gzp = )("[\d.]+")$/, + '\1{ version = \2, default-features = false, features = ["deflate_zlib", "libdeflate"] }' + + # Workaround to disable building bundled curl, xz and zlib-ng in "rust-htslib -> hts-sys" + resource("hts-sys").stage(buildpath/"hts-sys") + inreplace "hts-sys/Cargo.toml" do |s| + s.gsub!(/^features = \[\s*"static-curl",\s*"static-ssl",/, "features = [") + s.gsub!(/^features = \[\s*"static"\s*\]$/, "") + s.gsub!(/^features = \[\s*"zlib-ng",\s*"static",\s*\]$/, "") + end + args = %w[--config patch.crates-io.hts-sys.path="hts-sys"] + end + + system "cargo", "install", *args, *std_cargo_args + pkgshare.install "test" + end + + test do + cp pkgshare/"test/test.bam", testpath + system Formula["bamtools"].opt_bin/"bamtools", "index", "-in", "test.bam" + system bin/"perbase", "base-depth", "test.bam", "-o", "output.tsv" + assert_path_exists "output.tsv" + end +end diff --git a/Formula/p/perceptualdiff.rb b/Formula/p/perceptualdiff.rb new file mode 100644 index 0000000000000..2bf7d67abf883 --- /dev/null +++ b/Formula/p/perceptualdiff.rb @@ -0,0 +1,43 @@ +class Perceptualdiff < Formula + desc "Perceptual image comparison tool" + homepage "https://pdiff.sourceforge.net/" + url "https://github.com/myint/perceptualdiff/archive/refs/tags/v2.1.tar.gz" + sha256 "0dea51046601e4d23dc45a3ec342f1a305baf3bf3328e9ccdae115fe1942f041" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "03e7c420c4d2142cbec50a5ff677801f9a2ffef94cfdcb96715cfd88eca62667" + sha256 cellar: :any, arm64_sequoia: "69f5e86989148e15fdca126111c1070bb23777eabadd346f8e735b6cedc86f5a" + sha256 cellar: :any, arm64_sonoma: "da4677947b68eca55af42a10d556324578763cb94a71cc14afaccdc3ddf99bf3" + sha256 cellar: :any, arm64_ventura: "0499b71de1b661a7c68f28c343c1fe1175dfb2cfe28b70d6fb6b27393a8613a6" + sha256 cellar: :any, sonoma: "35f5e8523401d29ed1728df2d4e23c477e441418023d52b7ab03023e81faeeb2" + sha256 cellar: :any, ventura: "1d88590df41a1619ce9c7f4b29a534179b0bd6d18d7aa296d50da6c4e0101e44" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a32ccce208ebcb91041bdf8d2508618a5e1b671ea9fccd5f16c9bc8b2015303" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d9a1e10f07e3467e60a855f18c75a07fee4c238d746dc0b91652c147733e9c8" + end + + depends_on "cmake" => :build + depends_on "freeimage" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + test_tiff = test_fixtures("test.tiff") + test_png = test_fixtures("test.png") + + # Comparing an image against itself should give no diff + identical = shell_output("#{bin}/perceptualdiff #{test_tiff} #{test_tiff} 2>&1") + assert_empty identical + + different = shell_output("#{bin}/perceptualdiff #{test_png} #{test_tiff} 2>&1", 1) + assert_equal "FAIL: Image dimensions do not match", different.strip + end +end diff --git a/Formula/p/percol.rb b/Formula/p/percol.rb new file mode 100644 index 0000000000000..a83f89a840445 --- /dev/null +++ b/Formula/p/percol.rb @@ -0,0 +1,54 @@ +class Percol < Formula + include Language::Python::Virtualenv + + desc "Interactive grep tool" + homepage "https://github.com/mooz/percol" + url "https://files.pythonhosted.org/packages/50/ea/282b2df42d6be8d4292206ea9169742951c39374af43ae0d6f9fff0af599/percol-0.2.1.tar.gz" + sha256 "7a649c6fae61635519d12a6bcacc742241aad1bff3230baef2cedd693ed9cfe8" + license "MIT" + revision 4 + head "https://github.com/mooz/percol.git", branch: "master" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "2c3890df22100cdc7677b196d924237649a0d7e3af5d0c26fa52e012cdcd1dac" + end + + depends_on "python@3.14" + + resource "cmigemo" do + url "https://files.pythonhosted.org/packages/2f/e4/374df50b655e36139334046f898469bf5e2d7600e1e638f29baf05b14b72/cmigemo-0.1.6.tar.gz" + sha256 "7313aa3007f67600b066e04a4805e444563d151341deb330135b4dcdf6444626" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + expected = "Homebrew, the missing package manager for macOS." + (testpath/"textfile").write <<~TEXT + Unrelated line + #{expected} + Another unrelated line + TEXT + + require "pty" + PTY.spawn("#{bin}/percol --query=Homebrew textfile > result") do |r, w, pid| + w.write "\n" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + ensure + r.close + w.close + Process.wait(pid) + end + assert_equal expected, (testpath/"result").read.chomp + end +end diff --git a/Formula/p/percona-server.rb b/Formula/p/percona-server.rb new file mode 100644 index 0000000000000..3195c56a40143 --- /dev/null +++ b/Formula/p/percona-server.rb @@ -0,0 +1,284 @@ +class PerconaServer < Formula + desc "Drop-in MySQL replacement" + homepage "https://www.percona.com" + url "https://downloads.percona.com/downloads/Percona-Server-8.4/Percona-Server-8.4.6-6/source/tarball/percona-server-8.4.6-6.tar.gz" + sha256 "ab4d64fbf4f3bd3ee1e766ea9fd89c73a54c96b5148cc0cd2b3d14753c805a35" + license "BSD-3-Clause" + + livecheck do + url "https://www.percona.com/products-api.php", post_form: { + version: "Percona-Server-#{version.major_minor}", + } + regex(/value=["']?[^"' >]*?v?(\d+(?:[.-]\d+)+)[|"' >]/i) + strategy :page_match do |page, regex| + page.scan(regex).map do |match| + # Convert a version like 1.2.3-4.0 to 1.2.3-4 (but leave a version like + # 1.2.3-4.5 as-is). + match[0].sub(/(-\d+)\.0$/, '\1') + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "ef95e2640f31975747187be77fbac9aadd1a02c075bb6869e3d0cbd1cfe5993d" + sha256 arm64_sequoia: "134daae6019796e5a18f9075d2724526205495e5c18535318d5474220417e478" + sha256 arm64_sonoma: "fc5e0278bf9aa6688e568cdf9eb5c0a777be39f9a09c97b18053c4d29e45ac2e" + sha256 sonoma: "28c8af915d0d7a838fc9667fd24c744600d7b1eafb53741a57b0d8656af56e39" + sha256 arm64_linux: "a75f7a639ef7968a8cfdb4059e8e8cbc0c070ac7b42c814ac928cbdf4559c89b" + sha256 x86_64_linux: "ed04bf6067b5769bf41ab4ae5c85e096cdc98a6dd6a002e4cc1907fe0c26e75a" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "icu4c@77" + depends_on "libfido2" + depends_on "lz4" + depends_on "openldap" # Needs `ldap_set_urllist_proc`, not provided by LDAP.framework + depends_on "openssl@3" + depends_on "protobuf" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "krb5" + uses_from_macos "libedit" + + on_linux do + depends_on "patchelf" => :build + depends_on "libtirpc" + end + + conflicts_with "mariadb", "mysql", because: "percona, mariadb, and mysql install the same binaries" + + # https://github.com/percona/percona-server/blob/8.4/cmake/os/Linux.cmake + fails_with :gcc do + version "9" + cause "Requires GCC 10 or newer" + end + + # Apply MySQL commit to support Protobuf >= 30 + patch do + url "https://github.com/mysql/mysql-server/commit/4c1fdd1fb34a9a80a062357a54afe134a92f8abc.patch?full_index=1" + sha256 "8943cf092d31f2ed788f9a86b11b27973ec310d53718f15f6d2dac618696e1a3" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + patch :DATA + + def datadir + var/"mysql" + end + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + keep = %w[boost coredumper duktape libbacktrace libcno libkmip lz4 opensslpp rapidjson unordered_dense xxhash] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + + # Find Homebrew OpenLDAP instead of the macOS framework + inreplace "cmake/ldap.cmake", "NAMES ldap_r ldap", "NAMES ldap" + + # Fix mysqlrouter_passwd RPATH to link to metadata_cache.so + inreplace "router/src/http/src/CMakeLists.txt", + "ADD_INSTALL_RPATH(mysqlrouter_passwd \"${ROUTER_INSTALL_RPATH}\")", + "\\0\nADD_INSTALL_RPATH(mysqlrouter_passwd \"${RPATH_ORIGIN}/../${ROUTER_INSTALL_PLUGINDIR}\")" + + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" if OS.linux? + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + args = %W[ + -DCOMPILATION_COMMENT=Homebrew + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=lib/percona-server/plugin + -DMYSQL_DATADIR=#{datadir} + -DSYSCONFDIR=#{etc} + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_EDITLINE=system + -DWITH_FIDO=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_UNIT_TESTS=OFF + -DROCKSDB_BUILD_ARCH=#{ENV.effective_arch} + -DALLOW_NO_ARMV81A_CRYPTO=ON + -DALLOW_NO_SSE42=ON + ] + args << "-DROCKSDB_DISABLE_AVX2=ON" if build.bottle? + args << "-DWITH_KERBEROS=system" unless OS.mac? + + # Workaround for + # error: a template argument list is expected after a name prefixed by the template keyword + # 84 | return Archive_derived_type::template get_size(std::forward(arg)); + # | ^ + ENV.append_to_cflags "-Wno-missing-template-arg-list-after-template-kw" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd prefix/"mysql-test" do + test_args = ["--vardir=#{buildpath}/mysql-test-vardir"] + # For Linux, disable failing on warning: "Setting thread 31563 nice to 0 failed" + # Docker containers lack CAP_SYS_NICE capability by default. + test_args << "--nowarnings" if OS.linux? + system "./mysql-test-run.pl", "check", *test_args + ensure + status_log_file = buildpath/"mysql-test-vardir/log/main.status/status.log" + logs.install status_log_file if status_log_file.exist? + end + + # Remove the tests directory + rm_r(prefix/"mysql-test") + + # Fix up the control script and link into bin. + inreplace prefix/"support-files/mysql.server", + /^(PATH=".*)(")/, + "\\1:#{HOMEBREW_PREFIX}/bin\\2" + bin.install_symlink prefix/"support-files/mysql.server" + + # Install my.cnf that binds to 127.0.0.1 by default + (buildpath/"my.cnf").write <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + bind-address = 127.0.0.1 + mysqlx-bind-address = 127.0.0.1 + INI + etc.install "my.cnf" + end + + def post_install + # Make sure the var/mysql directory exists + (var/"mysql").mkpath + + if (my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x }) + opoo <<~EOS + A "#{my_cnf}" from another install may interfere with a Homebrew-built + server starting up correctly. + EOS + end + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + unless (datadir/"mysql/general_log.CSM").exist? + ENV["TMPDIR"] = nil + system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" + end + end + + def caveats + <<~EOS + We've installed your MySQL database without a root password. To secure it run: + mysql_secure_installation + + MySQL is configured to only allow connections from localhost by default + + To connect run: + mysql -u root + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var/"mysql" + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + port = free_port + socket = testpath/"mysql.sock" + mysqld_args = %W[ + --no-defaults + --mysqlx=OFF + --user=#{ENV["USER"]} + --port=#{port} + --socket=#{socket} + --basedir=#{prefix} + --datadir=#{testpath}/mysql + --tmpdir=#{testpath}/tmp + ] + client_args = %W[ + --port=#{port} + --socket=#{socket} + --user=root + --password= + ] + + system bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/mysql #{client_args.join(" ")} --execute='show databases;'") + assert_match "information_schema", output + ensure + system bin/"mysqladmin", *client_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 438dff720c5..47863c17e23 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1948,31 +1948,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_WEBAUTHN OR + WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND diff --git a/Formula/p/percona-server@8.0.rb b/Formula/p/percona-server@8.0.rb new file mode 100644 index 0000000000000..9d5ff5cf66d24 --- /dev/null +++ b/Formula/p/percona-server@8.0.rb @@ -0,0 +1,301 @@ +class PerconaServerAT80 < Formula + desc "Drop-in MySQL replacement" + homepage "https://www.percona.com" + url "https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.43-34/source/tarball/percona-server-8.0.43-34.tar.gz" + sha256 "4469b5e3873559f366eb632c7c231e01aa700c1b9c13cce869085dbe1ec9203e" + license "BSD-3-Clause" + revision 1 + + livecheck do + url "https://www.percona.com/products-api.php", post_form: { + version: "Percona-Server-#{version.major_minor}", + } + regex(/value=["']?[^"' >]*?v?(\d+(?:[.-]\d+)+)[|"' >]/i) + strategy :page_match do |page, regex| + page.scan(regex).map do |match| + # Convert a version like 1.2.3-4.0 to 1.2.3-4 (but leave a version like + # 1.2.3-4.5 as-is). + match[0].sub(/(-\d+)\.0$/, '\1') + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "164ba274b09d03ac72cd443984595456c5490667154d1c565af6ca3fd255d8c0" + sha256 arm64_sequoia: "2eb34c976b4475cf5df268ef87a39418719448e89062e0225f9404b59fa965a4" + sha256 arm64_sonoma: "ae437d4d8e987200aead52c08550f63ce0fade843d8b329cd2e3b8914cc875ed" + sha256 sonoma: "ab7cbb3146ee5745c042896e7a4d4ff5c7123e73950e0ac52fe096edce50b760" + sha256 arm64_linux: "dce4d5a31a9acde9c5a7659b7f12828045af75cb5efad0ad66496d42e97b04a7" + sha256 x86_64_linux: "0676233db4dbf00bce0ec0c811b7e6e254bfa02d3eda2c72477667523034b223" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "icu4c@77" + depends_on "libevent" + depends_on "libfido2" + depends_on "lz4" + depends_on "openldap" # Needs `ldap_set_urllist_proc`, not provided by LDAP.framework + depends_on "openssl@3" + depends_on "protobuf" + depends_on "zlib" # Zlib 1.2.13+ + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "krb5" + uses_from_macos "libedit" + + on_linux do + depends_on "patchelf" => :build + depends_on "libtirpc" + end + + # https://github.com/percona/percona-server/blob/Percona-Server-#{version}/cmake/boost.cmake + resource "boost" do + url "https://downloads.sourceforge.net/project/boost/boost/1.77.0/boost_1_77_0.tar.bz2" + sha256 "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854" + + livecheck do + url "https://raw.githubusercontent.com/percona/percona-server/refs/tags/Percona-Server-#{LATEST_VERSION}/cmake/boost.cmake" + regex(%r{/release/v?(\d+(?:\.\d+)+)/}i) + end + end + + # Fix for system ssl add_library error + # Issue ref: https://perconadev.atlassian.net/jira/software/c/projects/PS/issues/PS-9641 + patch do + url "https://github.com/percona/percona-server/commit/a693e5d67abf6f27f5284c86361604babec529c6.patch?full_index=1" + sha256 "d4afcdfb0dd8dcb7c0f7e380a88605b515874628107295ab5b892e8f1e019604" + end + + # Apply MySQL commit to support Protobuf >= 30 + patch do + url "https://github.com/mysql/mysql-server/commit/4c1fdd1fb34a9a80a062357a54afe134a92f8abc.patch?full_index=1" + sha256 "8943cf092d31f2ed788f9a86b11b27973ec310d53718f15f6d2dac618696e1a3" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + patch :DATA + + def datadir + var/"mysql" + end + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + # FIXME: Try to get rid of these other bundled libraries. + keep = %w[coredumper duktape libkmip lz4 opensslpp rapidjson robin-hood-hashing unordered_dense + xxhash libbacktrace] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + (buildpath/"boost").install resource("boost") + + # Find Homebrew OpenLDAP instead of the macOS framework + inreplace "cmake/ldap.cmake", "NAMES ldap_r ldap", "NAMES ldap" + + # Fix mysqlrouter_passwd RPATH to link to metadata_cache.so + inreplace "router/src/http/src/CMakeLists.txt", + "ADD_INSTALL_RPATH(mysqlrouter_passwd \"${ROUTER_INSTALL_RPATH}\")", + "\\0\nADD_INSTALL_RPATH(mysqlrouter_passwd \"${RPATH_ORIGIN}/../${ROUTER_INSTALL_PLUGINDIR}\")" + + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" if OS.linux? + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) + args = %W[ + -DCOMPILATION_COMMENT=Homebrew + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci + -DINSTALL_DOCDIR=share/doc/#{name} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=lib/percona-server/plugin + -DMYSQL_DATADIR=#{datadir} + -DSYSCONFDIR=#{etc} + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_BOOST=#{buildpath}/boost + -DWITH_EDITLINE=system + -DWITH_FIDO=system + -DWITH_LIBEVENT=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DWITH_UNIT_TESTS=OFF + -DWITH_INNODB_MEMCACHED=ON + -DROCKSDB_BUILD_ARCH=#{ENV.effective_arch} + -DALLOW_NO_ARMV81A_CRYPTO=ON + -DALLOW_NO_SSE42=ON + ] + args << "-DROCKSDB_DISABLE_AVX2=ON" if build.bottle? + args << "-DWITH_KERBEROS=system" unless OS.mac? + + ENV.append "CXXFLAGS", "-std=c++17" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd prefix/"mysql-test" do + test_args = ["--vardir=#{buildpath}/mysql-test-vardir"] + # For Linux, disable failing on warning: "Setting thread 31563 nice to 0 failed" + # Docker containers lack CAP_SYS_NICE capability by default. + test_args << "--nowarnings" if OS.linux? + system "./mysql-test-run.pl", "check", *test_args + ensure + status_log_file = buildpath/"mysql-test-vardir/log/main.status/status.log" + logs.install status_log_file if status_log_file.exist? + end + + # Remove the tests directory + rm_r(prefix/"mysql-test") + + # Fix up the control script and link into bin. + inreplace prefix/"support-files/mysql.server", + /^(PATH=".*)(")/, + "\\1:#{HOMEBREW_PREFIX}/bin\\2" + bin.install_symlink prefix/"support-files/mysql.server" + + # Install my.cnf that binds to 127.0.0.1 by default + (buildpath/"my.cnf").write <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + bind-address = 127.0.0.1 + mysqlx-bind-address = 127.0.0.1 + INI + etc.install "my.cnf" + end + + def post_install + # Make sure the var/mysql directory exists + (var/"mysql").mkpath + + if (my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x }) + opoo <<~EOS + + A "#{my_cnf}" from another install may interfere with a Homebrew-built + server starting up correctly. + EOS + end + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + unless (datadir/"mysql/general_log.CSM").exist? + ENV["TMPDIR"] = nil + system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" + end + end + + def caveats + <<~EOS + We've installed your MySQL database without a root password. To secure it run: + mysql_secure_installation + + MySQL is configured to only allow connections from localhost by default + + To connect run: + mysql -u root + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var/"mysql" + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + port = free_port + socket = testpath/"mysql.sock" + mysqld_args = %W[ + --no-defaults + --mysqlx=OFF + --user=#{ENV["USER"]} + --port=#{port} + --socket=#{socket} + --basedir=#{prefix} + --datadir=#{testpath}/mysql + --tmpdir=#{testpath}/tmp + ] + client_args = %W[ + --port=#{port} + --socket=#{socket} + --user=root + --password= + ] + + system bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/mysql #{client_args.join(" ")} --execute='show databases;'") + assert_match "information_schema", output + ensure + system bin/"mysqladmin", *client_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 22fa212..ad5f90e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1927,31 +1927,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND + NOT WITH_SSL STREQUAL "system") diff --git a/Formula/p/percona-toolkit.rb b/Formula/p/percona-toolkit.rb new file mode 100644 index 0000000000000..51c6e392ed482 --- /dev/null +++ b/Formula/p/percona-toolkit.rb @@ -0,0 +1,66 @@ +class PerconaToolkit < Formula + desc "Command-line tools for MySQL, MariaDB and system tasks" + homepage "https://www.percona.com/software/percona-toolkit/" + url "https://downloads.percona.com/downloads/percona-toolkit/3.7.0-2/source/tarball/percona-toolkit-3.7.0.tar.gz" + sha256 "192c899dcfa26eca1b9e8692b7b687d143154902b6089afb03c14ea1b93e432d" + license any_of: ["GPL-2.0-only", "Artistic-1.0-Perl"] + head "https://github.com/percona/percona-toolkit.git", branch: "3.x" + + livecheck do + url "https://www.percona.com/products-api.php", post_form: { + version: "percona-toolkit", + } + regex(/value=["']?[^"' >]*?v?(\d+(?:[.-]\d+)+)[|"' >]/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "098ce6dae0da3d02a7ca65217ca96cd604afcd089ac11fa64dc25135d7ef01e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "35bbdc1161bee62d4bf0304704413393c330468eb8ce88c9bd70692b1f588c75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35bbdc1161bee62d4bf0304704413393c330468eb8ce88c9bd70692b1f588c75" + sha256 cellar: :any_skip_relocation, arm64_ventura: "15a499710d1aacc752986af8f2cc842a7652564a4938a5bc6b48e602cd8e4d59" + sha256 cellar: :any_skip_relocation, sonoma: "32586dd3bdacb64ecb568d550750a7f140542f4715c5dfb5c84898f719420040" + sha256 cellar: :any_skip_relocation, ventura: "5ee9f37aca9455631f1d4301bf141574ad8bf99601a6b5b52198fcfe31f5cb7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "6afb3a5188e3d60f607bdfe3ce49161b600d856ed0f3f6f4406f3776bf4da1fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b43428c0da2027f1a735030216ad956da2ea4395fc7d5039b6cb90b3b443463a" + end + + depends_on "go" => :build + depends_on "perl-dbd-mysql" + + uses_from_macos "perl" + + resource "JSON" do + on_linux do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" + sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + end + end + + def install + ENV.prepend_path "PERL5LIB", Formula["perl-dbd-mysql"].opt_libexec/"lib/perl5" + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", + "INSTALLMAN1DIR=none", "INSTALLMAN3DIR=none", + "NO_PERLLOCAL=1", "NO_PACKLIST=1" + system "make", "install" + end + end + + system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}", "INSTALLSITEMAN1DIR=#{man1}" + system "make", "install" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + input = "SELECT name, password FROM user WHERE id='12823';" + output = pipe_output("#{bin}/pt-fingerprint", input, 0) + assert_equal "select name, password from user where id=?;", output.chomp + + # Test a command that uses a native module, like DBI. + assert_match version.to_s, shell_output("#{bin}/pt-online-schema-change --version") + end +end diff --git a/Formula/p/percona-xtrabackup.rb b/Formula/p/percona-xtrabackup.rb new file mode 100644 index 0000000000000..20aed4baf55d4 --- /dev/null +++ b/Formula/p/percona-xtrabackup.rb @@ -0,0 +1,276 @@ +class PerconaXtrabackup < Formula + desc "Open source hot backup tool for InnoDB and XtraDB databases" + homepage "https://www.percona.com/software/mysql-database/percona-xtrabackup" + url "https://downloads.percona.com/downloads/Percona-XtraBackup-8.4/Percona-XtraBackup-8.4.0-4/source/tarball/percona-xtrabackup-8.4.0-4.tar.gz" + sha256 "e566a164a21b18781aad281b84426418ac2bcf71052ec85d8c5e62f742a7dfeb" + license "GPL-2.0-only" + revision 2 + + livecheck do + url "https://www.percona.com/products-api.php", post_form: { + version: "Percona-XtraBackup-#{version.major_minor}", + } + regex(/value=["']?[^"' >]*?v?(\d+(?:[.-]\d+)+)[|"' >]/i) + strategy :page_match do |page, regex| + page.scan(regex).map do |match| + # Convert a version like 1.2.3-4.0 to 1.2.3-4 (but leave a version like + # 1.2.3-4.5 as-is). + match[0].sub(/(-\d+)\.0$/, '\1') + end + end + end + + bottle do + sha256 arm64_tahoe: "48273ebad9e9cec37fa654b312b5eefbdfbbec59cc616e80f91e33e159419394" + sha256 arm64_sequoia: "317ae10f2b67d2a65a17be403119b20817a23abb3af19624c05a895dff86a799" + sha256 arm64_sonoma: "f19299bb7d7888668345d69c319e9bf233c6ec8756137ff7fa26f68b5ebe105d" + sha256 sonoma: "7823de5ca1ca4a9ec17c40e8bbac62d6482a64c24a0f0eb662c35678370e4eab" + sha256 arm64_linux: "714d3e9fd371d244bf1503a47a297b71c4cd1059eea158128bd4c8c7792ab21d" + sha256 x86_64_linux: "6d0e3c971710b146bf5f6e0b51a294b07f8c46d22bbc23033fc75c6254bc34f4" + end + + depends_on "bison" => :build # needs bison >= 3.0.4 + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "mysql@8.4" => :test + depends_on "icu4c@77" + depends_on "libev" + depends_on "libgcrypt" + depends_on "lz4" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "zlib" + depends_on "zstd" + + uses_from_macos "cyrus-sasl" => :build + uses_from_macos "libedit" => :build + uses_from_macos "curl" + + on_linux do + depends_on "patchelf" => :build + depends_on "libaio" + depends_on "procps" + end + + # Apply fix for newer protobuf from MySQL repo. Remove once Percona syncs with MySQL 8.0.40 / 8.4.3 + patch do + url "https://github.com/mysql/mysql-server/commit/941e4ac8cfdacc7c2cd1c11b4d72329b70c46564.patch?full_index=1" + sha256 "1c39061a6c90e25a542f547ff8e5463d84c446009b4ab317c2c52184a4f931b8" + end + + # FreeBSD patches to fix build with newer Clang + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-libs_mysql_serialization_archive.h" + sha256 "d0e2cf2c2b4c71fc905a6a88936c7c9d6750b624c57c86ead7a73bbc1fd659c8" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-libs_mysql_serialization_serializer__default__impl.hpp" + sha256 "62293818c44f0a97a3233e4ab3d82d9abcc826c57981aa40acecdcd92dd6a934" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-libs_mysql_serialization_serializer__impl.hpp" + sha256 "91b0a8381c00600695110c8ec90488a22fa0c211cbe304eca44de7602f3a097b" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_binlog__ostream.cc" + sha256 "5bbb82ff9d9594ce1c19d34c83e22b088684057fca7c4357a0ba43dcb1ede0fc" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_mdl__context__backup.cc" + sha256 "557db2bb30ff8a985f8b4d016b1e2909b7127ea77fdcd2f7611fd66dcea58e4f" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_mdl__context__backup.h" + sha256 "1352f0290fb3acb031f743bdb72d8483c42f47ba2e0d08a33617a280c2f6771f" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_range__optimizer_index__range__scan__plan.cc" + sha256 "8ca65706fd386d2837c0a32a763553a24a248d8ffb518176627bdf735fcbfa9d" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_rpl__log__encryption.cc" + sha256 "f5e993a1b56ae86f3c63ea75799493c875d6a08c81f319fede707bbe16a2e59f" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_stream__cipher.cc" + sha256 "ac74c60f6051223993c88e7a11ddd9512c951ac1401d719a2c3377efe1bee3cf" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-sql_stream__cipher.h" + sha256 "5c8646a2fdce4eb317df4f77cb582705a44e0c61485cc6c268f808e25da682b3" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-unittest_gunit_binlogevents_transaction__compression-t.cc" + sha256 "b0f7eb7524a5115bf7eaa0fdd928d1db18a274547adf8cfc8003da97fcf82b8f" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/9832739877772d46b4affedf9f796d6e70be4254/databases/mysql84-server/files/patch-unittest_gunit_stream__cipher-t.cc" + sha256 "fe23c4098e1b8c5113486800e37bb74683be0b7dd61a9608603428f395588e96" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + # + # Also, add a few fixes not covered in the FreeBSD patches. + # These fixes are analogous to the changes made by the FreeBSD patches. + patch :DATA + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + keep = %w[boost libbacktrace libcno libkmip lz4 rapidjson unordered_dense] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" if OS.linux? + + icu4c = deps.map(&:to_formula).find { |f| f.name.match?(/^icu4c@\d+$/) } + # -DWITH_FIDO=system isn't set as feature isn't enabled and bundled copy was removed. + # Formula paths are set to avoid HOMEBREW_HOME logic in CMake scripts + cmake_args = %W[ + -DBUILD_CONFIG=xtrabackup_release + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_PLUGINDIR=lib/percona-xtrabackup/plugin + -DINSTALL_MANDIR=#{man} + -DWITH_MAN_PAGES=ON + -DINSTALL_MYSQLTESTDIR= + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_EDITLINE=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + ] + # Reduce overlinking on macOS + cmake_args += %w[EXE MODULE].map { |type| "-DCMAKE_#{type}_LINKER_FLAGS=-Wl,-dead_strip_dylibs" } if OS.mac? + + # Remove conflicting manpages + rm (Dir["man/*"] - ["man/CMakeLists.txt"]) + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # remove conflicting library that is already installed by mysql + (lib/"libmysqlservices.a").unlink + # remove conflicting libraries/headers that are installed by percona-server + (lib/"libkmip.a").unlink + (lib/"libkmippp.a").unlink + (include/"kmip.h").unlink + (include/"kmippp.h").unlink + end + + test do + mysql = Formula["mysql@8.4"] + common_args = %W[--no-defaults --port=#{free_port} --socket=#{testpath}/mysql.sock] + client_args = %w[--user=root --password=] + server_args = %W[--datadir=#{testpath}/mysql --tmpdir=#{testpath}/tmp] + mysqld_args = common_args + server_args + %W[--mysqlx=OFF --user=#{ENV["USER"]}] + mysqladmin_args = common_args + client_args + xtrabackup_args = common_args + client_args + server_args + %W[--target-dir=#{testpath}/backup --backup] + + (testpath/"backup").mkpath + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + assert_match version.to_s, shell_output("#{bin}/xtrabackup --version 2>&1") + + output = shell_output("#{bin}/xtrabackup #{xtrabackup_args.join(" ")} 2>&1", 1) + assert_match "Failed to connect to MySQL server", output + + system mysql.bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(mysql.bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/xtrabackup #{xtrabackup_args.join(" ")} 2>&1") + refute_match "[ERROR]", output + assert_match "[Xtrabackup] completed OK!", output + assert_path_exists testpath/"backup/xtrabackup_info" + ensure + system mysql.bin/"mysqladmin", *mysqladmin_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 438dff720c5..47863c17e23 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1948,31 +1948,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_WEBAUTHN OR + WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND +diff --git i/sql/rpl_log_encryption.cc w/sql/rpl_log_encryption.cc +index 862e769c..d761bd7f 100644 +--- i/sql/rpl_log_encryption.cc ++++ w/sql/rpl_log_encryption.cc +@@ -213,7 +213,7 @@ bool Rpl_encryption::recover_master_key() { + Rpl_encryption_header::seqno_to_key_id(m_master_key_seqno); + auto master_key = + get_key(m_master_key.m_id, Rpl_encryption_header::get_key_type()); +- m_master_key.m_value.assign(master_key.second); ++ m_master_key.m_value = master_key.second; + /* No keyring error */ + if (master_key.first == Keyring_status::KEYRING_ERROR_FETCHING) goto err1; + } +diff --git i/storage/innobase/xtrabackup/src/keyring_plugins.cc w/storage/innobase/xtrabackup/src/keyring_plugins.cc +index 6d169078..3247f95d 100644 +--- i/storage/innobase/xtrabackup/src/keyring_plugins.cc ++++ w/storage/innobase/xtrabackup/src/keyring_plugins.cc +@@ -863,7 +863,7 @@ bool xb_binlog_password_reencrypt(const char *binlog_file_path) { + return (false); + } + +- Key_string file_password(key, Encryption::KEY_LEN); ++ Key_string file_password(key, key + Encryption::KEY_LEN); + header->encrypt_file_password(file_password); + + IO_CACHE_ostream ostream; diff --git a/Formula/p/percona-xtrabackup@8.0.rb b/Formula/p/percona-xtrabackup@8.0.rb new file mode 100644 index 0000000000000..ce3a9198791f4 --- /dev/null +++ b/Formula/p/percona-xtrabackup@8.0.rb @@ -0,0 +1,296 @@ +class PerconaXtrabackupAT80 < Formula + desc "Open source hot backup tool for InnoDB and XtraDB databases" + homepage "https://www.percona.com/software/mysql-database/percona-xtrabackup" + url "https://downloads.percona.com/downloads/Percona-XtraBackup-8.0/Percona-XtraBackup-8.0.35-34/source/tarball/percona-xtrabackup-8.0.35-34.tar.gz" + sha256 "6ca81cd647e7cb1d8fd341f97cd32248bd719f9104a63eb24f1edda6a2d2441c" + license "GPL-2.0-only" + revision 4 + + livecheck do + url "https://www.percona.com/products-api.php", post_form: { + version: "Percona-XtraBackup-#{version.major_minor}", + } + regex(/value=["']?[^"' >]*?v?(8\.0(?:[.-]\d+)+)[|"' >]/i) + strategy :page_match do |page, regex| + page.scan(regex).map do |match| + # Convert a version like 1.2.3-4.0 to 1.2.3-4 (but leave a version like + # 1.2.3-4.5 as-is). + match[0].sub(/(-\d+)\.0$/, '\1') + end + end + end + + bottle do + sha256 arm64_tahoe: "b89ca6d034b6026e8a91f71b3fa6f834610456f61774c5f61e8794f854c797d5" + sha256 arm64_sequoia: "b21429f204fb39e8245469e13e0c2ff12ec3ead20fd7b221e2c1979e1cfa9b53" + sha256 arm64_sonoma: "b2d0cfefe6a4b3ecd234fb340d1dcae5916b57e6ed39e577c3c40bc0fc96c1ef" + sha256 sonoma: "ad6dd444f62b88e1082549b41d3d6bb1559665c0d2fe03ea7527ee1e3cae0273" + sha256 arm64_linux: "204aa03a93cb981b00766d0ad9fbe2a5699d80a6d9d38534007f6c40aedd5f3d" + sha256 x86_64_linux: "dbb260a9196c9296703e175ecf7b89e5b91c425e615a0687d4699a5282f0e3c5" + end + + keg_only :versioned_formula + + depends_on "bison" => :build # needs bison >= 3.0.4 + depends_on "cmake" => :build + depends_on "libevent" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "mysql@8.0" => :test + depends_on "icu4c@77" + depends_on "libev" + depends_on "libgcrypt" + depends_on "lz4" + depends_on "openssl@3" + depends_on "perl-dbd-mysql" + depends_on "protobuf" + depends_on "zlib" + depends_on "zstd" + + uses_from_macos "cyrus-sasl" => :build + uses_from_macos "libedit" => :build + uses_from_macos "vim" => :build # needed for xxd + uses_from_macos "curl" + uses_from_macos "perl" + + on_linux do + depends_on "patchelf" => :build + depends_on "libaio" + depends_on "procps" + end + + # Check boost version via `brew livecheck percona-xtrabackup@8.0 --resources --autobump` + resource "boost" do + url "https://downloads.sourceforge.net/project/boost/boost/1.77.0/boost_1_77_0.tar.bz2" + sha256 "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854" + + livecheck do + url "https://raw.githubusercontent.com/percona/percona-xtrabackup/refs/tags/percona-xtrabackup-#{LATEST_VERSION}/cmake/boost.cmake" + regex(%r{/release/v?(\d+(?:\.\d+)+)/}i) + end + + # Apply FreeBSD patch for building with new `clang`. + patch :p2 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/58a6f3f12a0ab2a65140f588216340d49245880e/databases/mysql80-server/files/patch-boost_boost__1__77__0_boost_mpl_aux___integral__wrapper.hpp" + sha256 "203ada9cec70fe1feb2796cb7421757d7334452dfd5168120a3e7eb79aaf529d" + end + end + + # Apply fix for newer protobuf from MySQL repo. Remove once Percona syncs with MySQL 8.0.40 + patch do + url "https://github.com/mysql/mysql-server/commit/269abc0409b22bb87ec88bd4d53dfb7a1403eace.patch?full_index=1" + sha256 "ffcee32804e7e1237907432adb3590fcbf30c625eea836df6760c05a312a84e1" + end + + # FreeBSD patches for fixing build failure with newer clang + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_binlog__ostream.cc" + sha256 "16f86edd2daf5f6c87616781c9f51f76d4a695d55b354e44d639a823b1c3f681" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_mdl__context__backup.cc" + sha256 "501646e1cb6ac2ddc5eb42755d340443e4655741d6e76788f48751a2fb8f3775" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_mdl__context__backup.h" + sha256 "e515b565d1501648ce3de0add12b67c63aecb3ec4db3794de72c4eeb301ff343" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_range__optimizer_index__range__scan__plan.cc" + sha256 "44b5e76373fadd97560d66dae0dac14d98ae9a5c32d58d876bfe694016872bc7" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_rpl__log__encryption.cc" + sha256 "bdadcf4317295d1847283e20dd7fbfa2df2c4acebf45d5a13d0670bc7311f7ba" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_stream__cipher.cc" + sha256 "ac74c60f6051223993c88e7a11ddd9512c951ac1401d719a2c3377efe1bee3cf" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_stream__cipher.h" + sha256 "9a11d4658f60a63f3f10ff97a5170e865afde3ebee3e703d8272aba3cf6e32d0" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-unittest_gunit_binlogevents_transaction__compression-t.cc" + sha256 "3bd0c22a2ee30a7b1e682e645dbdf473d4f0d6f8e5ffc447f088c5f1bf21efd7" + end + + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-unittest_gunit_stream__cipher-t.cc" + sha256 "9e7629a2174e754487737ef0d73c79fc1ed47ba54a982a3a4803e19c72c5dc0f" + end + + # Patch out check for Homebrew `boost`. + # This should not be necessary when building inside `brew`. + # https://github.com/Homebrew/homebrew-test-bot/pull/820 + # + # Also, add a few fixes not covered in the FreeBSD patches. + # These fixes are analogous to the changes made by the FreeBSD patches. + patch :DATA + + def install + # Remove bundled libraries other than explicitly allowed below. + # `boost` and `rapidjson` must use bundled copy due to patches. + # `lz4` is still needed due to xxhash.c used by mysqlgcs + keep = %w[duktape libkmip lz4 rapidjson robin-hood-hashing] + (buildpath/"extra").each_child { |dir| rm_r(dir) unless keep.include?(dir.basename.to_s) } + (buildpath/"boost").install resource("boost") + + perl = "/usr/bin/perl" + if OS.linux? + perl = Formula["perl"].opt_bin/"perl" + # Disable ABI checking + inreplace "cmake/abi_check.cmake", "RUN_ABI_CHECK 1", "RUN_ABI_CHECK 0" + end + + # Make sure Perl from `perl-dbd-mysql` is used at runtime. Otherwise may have incompatible modules + inreplace "storage/innobase/xtrabackup/src/backup_copy.cc", 'popen("perl",', "popen(\"#{perl}\"," + + icu4c = deps.map(&:to_formula).find { |f| f.name.match?(/^icu4c@\d+$/) } + # -DWITH_FIDO=system isn't set as feature isn't enabled and bundled copy was removed. + # Formula paths are set to avoid HOMEBREW_HOME logic in CMake scripts + cmake_args = %W[ + -DBUILD_CONFIG=xtrabackup_release + -DCOMPILATION_COMMENT=Homebrew + -DINSTALL_PLUGINDIR=lib/percona-xtrabackup/plugin + -DINSTALL_MANDIR=#{man} + -DWITH_MAN_PAGES=ON + -DINSTALL_MYSQLTESTDIR= + -DBISON_EXECUTABLE=#{Formula["bison"].opt_bin}/bison + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_ICU=#{icu4c.opt_prefix} + -DWITH_SYSTEM_LIBS=ON + -DWITH_BOOST=#{buildpath}/boost + -DWITH_EDITLINE=system + -DWITH_LIBEVENT=system + -DWITH_LZ4=system + -DWITH_PROTOBUF=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + ] + # Reduce overlinking on macOS + cmake_args += %w[EXE MODULE].map { |type| "-DCMAKE_#{type}_LINKER_FLAGS=-Wl,-dead_strip_dylibs" } if OS.mac? + + # Remove conflicting manpages + rm (Dir["man/*"] - ["man/CMakeLists.txt"]) + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + bin.env_script_all_files(libexec/"bin", PERL5LIB: Formula["perl-dbd-mysql"].opt_libexec/"lib/perl5") + + # remove conflicting library that is already installed by mysql + (lib/"libmysqlservices.a").unlink + # remove conflicting libraries/headers that are installed by percona-server + (lib/"libkmip.a").unlink + (lib/"libkmippp.a").unlink + (include/"kmip.h").unlink + (include/"kmippp.h").unlink + end + + test do + mysql = Formula["mysql@8.0"] + common_args = %W[--no-defaults --port=#{free_port} --socket=#{testpath}/mysql.sock] + client_args = %w[--user=root --password=] + server_args = %W[--datadir=#{testpath}/mysql --tmpdir=#{testpath}/tmp] + mysqld_args = common_args + server_args + %W[--mysqlx=OFF --user=#{ENV["USER"]}] + mysqladmin_args = common_args + client_args + xtrabackup_args = common_args + client_args + server_args + %W[--target-dir=#{testpath}/backup --backup] + + (testpath/"backup").mkpath + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + + assert_match version.to_s, shell_output("#{bin}/xtrabackup --version 2>&1") + + output = shell_output("#{bin}/xtrabackup #{xtrabackup_args.join(" ")} 2>&1", 1) + assert_match "Failed to connect to MySQL server", output + + system mysql.bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(mysql.bin/"mysqld", *mysqld_args) + begin + sleep 5 + output = shell_output("#{bin}/xtrabackup #{xtrabackup_args.join(" ")} 2>&1") + refute_match "[ERROR]", output + assert_match "[Xtrabackup] completed OK!", output + assert_match "version_check Done.", output # check Perl modules work + assert_path_exists testpath/"backup/xtrabackup_info" + ensure + system mysql.bin/"mysqladmin", *mysqladmin_args, "shutdown" + Process.kill "TERM", pid + end + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42e63d0..5d21cc3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1942,31 +1942,6 @@ MYSQL_CHECK_RAPIDJSON() + MYSQL_CHECK_FIDO() + MYSQL_CHECK_FIDO_DLLS() + +-IF(APPLE) +- GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY) +- IF(EXISTS ${HOMEBREW_BASE}/include/boost) +- FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- MESSAGE(FATAL_ERROR +- "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n" +- "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n" +- "Including headers from ${HOMEBREW_BASE}/include " +- "will break the build.\n" +- "Please use WITH_${SYSTEM_LIB}=bundled\n" +- "or do 'brew uninstall boost' or 'brew unlink boost'" +- ) +- ENDIF() +- ENDFOREACH() +- ENDIF() +- # Ensure that we look in /usr/local/include or /opt/homebrew/include +- FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO) +- IF(WITH_${SYSTEM_LIB} STREQUAL "system") +- INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include) +- BREAK() +- ENDIF() +- ENDFOREACH() +-ENDIF() +- + IF(WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_CLIENT_PLUGINS) + IF(WITH_FIDO STREQUAL "system" AND + NOT WITH_SSL STREQUAL "system") +diff --git i/sql/rpl_log_encryption.cc w/sql/rpl_log_encryption.cc +index eea6a031..49352260 100644 +--- i/sql/rpl_log_encryption.cc ++++ w/sql/rpl_log_encryption.cc +@@ -449,7 +449,7 @@ bool Rpl_encryption::enable_for_xtrabackup() { + Rpl_encryption_header::seqno_to_key_id(m_master_key_seqno); + auto master_key = + get_key(m_master_key.m_id, Rpl_encryption_header::get_key_type()); +- m_master_key.m_value.assign(master_key.second); ++ m_master_key.m_value = master_key.second ; + /* No keyring error */ + if (master_key.first == Keyring_status::KEYRING_ERROR_FETCHING) res = true; + } +diff --git i/storage/innobase/xtrabackup/src/keyring_plugins.cc w/storage/innobase/xtrabackup/src/keyring_plugins.cc +index 00ab43e2..7992ab0e 100644 +--- i/storage/innobase/xtrabackup/src/keyring_plugins.cc ++++ w/storage/innobase/xtrabackup/src/keyring_plugins.cc +@@ -890,7 +890,7 @@ bool xb_binlog_password_reencrypt(const char *binlog_file_path) { + return (false); + } + +- Key_string file_password(key, Encryption::KEY_LEN); ++ Key_string file_password(key, key + Encryption::KEY_LEN); + header->encrypt_file_password(file_password); + + IO_CACHE_ostream ostream; diff --git a/Formula/p/periphery.rb b/Formula/p/periphery.rb new file mode 100644 index 0000000000000..29a5c9b492971 --- /dev/null +++ b/Formula/p/periphery.rb @@ -0,0 +1,50 @@ +class Periphery < Formula + desc "Identify unused code in Swift projects" + homepage "https://github.com/peripheryapp/periphery" + url "https://github.com/peripheryapp/periphery/archive/refs/tags/3.2.0.tar.gz" + sha256 "84041cf27e1f7b1f9981651f0d7c78b317388040f1f31cf131dabb744a5f922c" + license "MIT" + head "https://github.com/peripheryapp/periphery.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "499b5f157fb2ecfdc66cc3dcb58b185f6b16b1827dd8c1091864dacc00c5fe92" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2b0dea494e8bd21ff932fa10fac318cf2ee06c758e6797ecb23f99a6f8d2460" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "400cd8658c47b54ab5060f11df16ee035d1673aa3abd2c0244669121c744d570" + sha256 cellar: :any_skip_relocation, sonoma: "df2656985ae7b056868b3f3acf2de20abd266cbd52d9d5ae31eaae77ea447ea5" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb205dd64182f1a1b904bd0187ecb81156bdeb1a38d74476afc9a1bae87654b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4c6039249d029db5538c4d1f96014905f6d01914ecae26a8d0a76af0009fe77" + end + + depends_on xcode: ["16.0", :build] + + uses_from_macos "swift" => [:build, :test] + uses_from_macos "curl" + uses_from_macos "libxml2" + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "--configuration", "release", "--product", "periphery" + bin.install ".build/release/periphery" + generate_completions_from_executable(bin/"periphery", "--generate-completion-script") + end + + test do + # Periphery dynamically loads 'libIndexStore' at runtime and must find its location depending on the host OS. + # On macOS, the library is bundled within Xcode at a consistent location. On Linux, the library path is assumed + # to be at 'lib/libIndexStore.so' relative to the path of the 'swift' binary, which is a reasonable assumption for + # most installations. However, this is not the case on the Homebrew Linux test container, and the shared libraries + # do not appear to be present. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "swift", "package", "init", "--name", "test", "--type", "executable" + system "swift", "build", "--disable-sandbox" + manifest = shell_output "swift package --disable-sandbox describe --type json" + File.write "manifest.json", manifest + system bin/"periphery", "scan", "--strict", "--skip-build", "--json-package-manifest-path", "manifest.json" + end +end diff --git a/Formula/p/periscope.rb b/Formula/p/periscope.rb new file mode 100644 index 0000000000000..e74dd86f0835a --- /dev/null +++ b/Formula/p/periscope.rb @@ -0,0 +1,61 @@ +class Periscope < Formula + desc "Organize and de-duplicate your files without losing data" + homepage "https://github.com/anishathalye/periscope" + url "https://github.com/anishathalye/periscope.git", + tag: "v1.0.1", + revision: "a279bfd38e6ff8f4730e52fc670d8e24b98eda7a" + license "GPL-3.0-only" + head "https://github.com/anishathalye/periscope.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5765ada2bc369b8ec6146bd7ce9e93d1e30d8bb97069d940dc17ef4fb1b2ffa0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6d94c3ed7b19367c483d2e757040f66eeb55c7109d5b852ef95a4b2dceac4a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "151bac7b4998a735eb059417d814e796f26edb35a795d89542fb5f4ac35d5cd2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "461ffa9b2eda689da1a8f6d35cfb1d348a44a438a9051551d594c02781235d60" + sha256 cellar: :any_skip_relocation, sonoma: "e793cccc4729c4b1a7dc3621ec0f16f266bf3c148e3a4e0035b4bae2de7a0c5c" + sha256 cellar: :any_skip_relocation, ventura: "62beda5a28e320d04f9bb95613918fd7b55a6d59687b3db1ecb9844b4bb51889" + sha256 cellar: :any_skip_relocation, arm64_linux: "a853559bf9a3baac07b99b216416b69ecc445e3045b7147a2fae07c335d9db18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee3133ef30216e3c0d0c07d53af60848f4fd1d1815746dae655eafa8c39d4bce" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{Utils.git_head} + ] + system "go", "build", *std_go_args(output: bin/"psc", ldflags:), "./cmd/psc" + + generate_completions_from_executable(bin/"psc", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/psc version") + + # setup + scandir = testpath/"scandir" + scandir.mkdir + (scandir/"a").write("dupe") + (scandir/"b").write("dupe") + (scandir/"c").write("unique") + + # scan + summary is correct + shell_output "#{bin}/psc scan #{scandir} 2>/dev/null" + summary = shell_output("#{bin}/psc summary").strip.split("\n").map { |l| l.strip.split } + assert_equal [["tracked", "3"], ["unique", "2"], ["duplicate", "1"], ["overhead", "4", "B"]], summary + + # rm allows deleting dupes but not uniques + shell_output "#{bin}/psc rm #{scandir/"a"}" + refute_path_exists (scandir/"a") + # now b is unique + shell_output "#{bin}/psc rm #{scandir/"b"} 2>/dev/null", 1 + assert_path_exists (scandir/"b") + shell_output "#{bin}/psc rm #{scandir/"c"} 2>/dev/null", 1 + assert_path_exists (scandir/"c") + + # cleanup + shell_output("#{bin}/psc finish") + end +end diff --git a/Formula/p/perl-build.rb b/Formula/p/perl-build.rb new file mode 100644 index 0000000000000..2279f95f2c0b2 --- /dev/null +++ b/Formula/p/perl-build.rb @@ -0,0 +1,139 @@ +class PerlBuild < Formula + desc "Perl builder" + homepage "https://github.com/tokuhirom/Perl-Build" + url "https://github.com/tokuhirom/Perl-Build/archive/refs/tags/1.34.tar.gz" + sha256 "50e90b18f2541aca857b8743bd3c187b7844c608076c4f2aa13eadc0689b1644" + license any_of: ["Artistic-1.0", "GPL-1.0-or-later"] + head "https://github.com/tokuhirom/perl-build.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "63b299c6c373e14016ed4230f61d1ce8a6120f72d3665505e6948dd4b34590ea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3692d7e9799089d15e95e238a8a666883db875b08aefd182ffb49069bfeee070" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3692d7e9799089d15e95e238a8a666883db875b08aefd182ffb49069bfeee070" + sha256 cellar: :any_skip_relocation, arm64_ventura: "29f8fbb44085bb547f8a743c7c901f7ab1cd0bb571bb37a80241c874630182ef" + sha256 cellar: :any_skip_relocation, sonoma: "c3c90eb8a0abf4173cc6109f072a647a096e4c038db4384def5e91ed771abfbd" + sha256 cellar: :any_skip_relocation, ventura: "74110bb18dd37b2a407cdcbd7772900d0751740a087bd2b86ee8354b92d9a71b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5671351addb7d9c47ae0e7f7cc5a11eabb9532e0d07021dab6cd18548bc385e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3fa96b05a3ea3bfa998356d31fd7719d938aa9554aae4a72b925b6a68f11db11" + end + + uses_from_macos "perl" + + resource "Module::Build" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + end + + resource "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.045.tar.gz" + sha256 "d20692eee246d0b329b7f7659f36286b14ae0696fe91078a64b7078f8876d300" + end + + resource "ExtUtils::Config" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.008.tar.gz" + sha256 "ae5104f634650dce8a79b7ed13fb59d67a39c213a6776cfdaa3ee749e62f1a8c" + end + + resource "ExtUtils::Helpers" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz" + sha256 "de901b6790a4557cf4ec908149e035783b125bf115eb9640feb1bc1c24c33416" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz" + sha256 "84735e3037bab1fdffa3c2508567ad412a785c91599db3c12593a50a1dd434ed" + end + + resource "HTTP::Tinyish" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-0.18.tar.gz" + sha256 "80380b8d33c6bfa96bb0104fa6a41c27dcc4e9c83a48df1fad39097f5fdcfde5" + end + + resource "CPAN::Perl::Releases" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/CPAN-Perl-Releases-5.20230423.tar.gz" + sha256 "c2eda421ed14ba0feffea6748f344b7ee3c364aefce4d15a1450e06861760fea" + end + + resource "CPAN::Perl::Releases::MetaCPAN" do + url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/CPAN-Perl-Releases-MetaCPAN-0.006.tar.gz" + sha256 "d78ef4ee4f0bc6d95c38bbcb0d2af81cf59a31bde979431c1b54ec50d71d0e1b" + end + + resource "File::pushd" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-pushd-1.016.tar.gz" + sha256 "d73a7f09442983b098260df3df7a832a5f660773a313ca273fa8b56665f97cdc" + end + + resource "HTTP::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/HTTP-Tiny-0.082.tar.gz" + sha256 "54e9e4a559a92cbb90e3f19c8a88ff067ec2f68fbe39bbb694ee70828cd5f4b8" + end + + resource "Module::Pluggable" do + url "https://cpan.metacpan.org/authors/id/S/SI/SIMONW/Module-Pluggable-5.2.tar.gz" + sha256 "b3f2ad45e4fd10b3fb90d912d78d8b795ab295480db56dc64e86b9fa75c5a6df" + end + + resource "Devel::PatchPerl" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Devel-PatchPerl-2.08.tar.gz" + sha256 "69c6e97016260f408e9d7e448f942b36a6d49df5af07340f1d65d7e230167419" + end + + resource "Pod::Text" do + url "https://cpan.metacpan.org/authors/id/R/RR/RRA/podlators-5.01.tar.gz" + sha256 "ccfd1df9f1a47f095bce6d718fad5af40f78ce2491f2c7239626e15b7020bc71" + end + + resource "Pod::Usage" do + url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Usage-2.03.tar.gz" + sha256 "7d8fdc7dce60087b6cf9e493b8d6ae84a5ab4c0608a806a6d395cc6557460744" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + # Ensure we don't install the pre-packed script + rm(["perl-build", "bin/perl-build"]) + + build_pl = ["Module::Build::Tiny", "CPAN::Perl::Releases::MetaCPAN"] + resources.each do |r| + r.stage do + next if build_pl.include? r.name + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + + build_pl.each do |name| + resource(name).stage do + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + + system "perl", "Build.PL", "--install_base", libexec, "--install_path", "bindoc=#{man1}" + # Replace the dead symlink we removed earlier. + (buildpath/"bin").install_symlink buildpath/"script/perl-build" + system "./Build" + system "./Build", "install" + + bin.install libexec/"bin/plenv-install", libexec/"bin/plenv-uninstall" + (bin/"perl-build").write_env_script(libexec/"bin/perl-build", PERL5LIB: ENV["PERL5LIB"]) + + # Replace cellar path to perl with opt path. + if OS.linux? + inreplace_files = [libexec/"bin/perl-build", libexec/"bin/config_data"] + inreplace inreplace_files, Formula["perl"].bin.realpath, Formula["perl"].opt_bin, global: false + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/perl-build --version") + end +end diff --git a/Formula/p/perl-dbd-mysql.rb b/Formula/p/perl-dbd-mysql.rb new file mode 100644 index 0000000000000..c12e7a7ed7e22 --- /dev/null +++ b/Formula/p/perl-dbd-mysql.rb @@ -0,0 +1,120 @@ +# This is an exception to Homebrew's CPAN formula policy due to the workarounds +# needed to use macOS DBI and to avoid overlinking to libraries like `zlib`. +class PerlDbdMysql < Formula + desc "MySQL driver for the Perl5 Database Interface (DBI)" + homepage "https://dbi.perl.org/" + url "https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-5.013.tar.gz" + sha256 "aeb0a6e1c26fc28a5cf6de1161e0f056ddcbb739f87954dba7cb1c5acb4e1c33" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/perl5-dbi/DBD-mysql.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4ad07b6c961ce9f5bc834cd91d9e42e08ea07ae54d7ae4bcdccad9dab9dcb0fc" + sha256 cellar: :any, arm64_sequoia: "362421d937a7a3e460644202dd26cd18935d194dda030453042496b2615fe3ca" + sha256 cellar: :any, arm64_sonoma: "90fd966b55bbdaf4c3572c56df0e02618235975c160db102f908766e97038865" + sha256 cellar: :any, arm64_ventura: "aaae867fda8e960c87a295b1cf6eca715b7649bff89dc8c3d456ef5741f0c207" + sha256 cellar: :any, sonoma: "cc693a7827cd08a75dbc23e0188c34af720484fc06d022f751b3189c46da5168" + sha256 cellar: :any, ventura: "77527158123bca639ebf1fa1b68bbca79b5f164c0fa7141e1c1c84b462cae943" + sha256 cellar: :any_skip_relocation, arm64_linux: "b028bb689ed1d8e1d0c66988375750af4149ac3d2cc759fb486eee27a4f22a61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c18a48e80c359be6b7a6394aed27625c34709a42cea045d9a7e34ca31c8fe45" + end + + keg_only <<~EOS + it is mainly used internally by other formulae. + Users are advised to use `cpan` to install DBD::mysql + EOS + + depends_on "mysql" => :test + depends_on "mysql-client" + + uses_from_macos "perl" + + resource "Devel::CheckLib" do + url "https://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-1.16.tar.gz" + sha256 "869d38c258e646dcef676609f0dd7ca90f085f56cf6fd7001b019a5d5b831fca" + end + + resource "DBI" do + on_linux do + url "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-1.647.tgz" + sha256 "0df16af8e5b3225a68b7b592ab531004ddb35a9682b50300ce50174ad867d9aa" + end + end + + def install + ENV.prepend_create_path "PERL5LIB", buildpath/"build_deps/lib/perl5" + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + install_base = (r.name == "Devel::CheckLib") ? buildpath/"build_deps" : libexec + system "perl", "Makefile.PL", "INSTALL_BASE=#{install_base}", "INSTALLMAN1DIR=none", "INSTALLMAN3DIR=none" + system "make", "install" + end + end + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + + make_args = [] + if OS.mac? + # Reduce overlinking on macOS + make_args << "OTHERLDFLAGS=-Wl,-dead_strip_dylibs" + # Work around macOS DBI generating broken Makefile + inreplace "Makefile" do |s| + old_dbi_instarch_dir = s.get_make_var("DBI_INSTARCH_DIR") + new_dbi_instarch_dir = "#{MacOS.sdk_path_if_needed}#{old_dbi_instarch_dir}" + s.change_make_var! "DBI_INSTARCH_DIR", new_dbi_instarch_dir + s.gsub! " #{old_dbi_instarch_dir}/Driver_xst.h", " #{new_dbi_instarch_dir}/Driver_xst.h" + end + end + + system "make", "install", *make_args + end + + test do + perl = OS.mac? ? "/usr/bin/perl" : Formula["perl"].bin/"perl" + port = free_port + socket = testpath/"mysql.sock" + mysql = Formula["mysql"] + mysqld_args = %W[ + --no-defaults + --mysqlx=OFF + --user=#{ENV["USER"]} + --port=#{port} + --socket=#{socket} + --basedir=#{mysql.prefix} + --datadir=#{testpath}/mysql + --tmpdir=#{testpath}/tmp + ] + + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + (testpath/"test.pl").write <<~PERL + use strict; + use warnings; + use DBI; + my $dbh = DBI->connect("DBI:mysql:;port=#{port};mysql_socket=#{socket}", "root", "", {'RaiseError' => 1}); + $dbh->do("CREATE DATABASE test"); + $dbh->do("CREATE TABLE test.foo (id INTEGER, name VARCHAR(20))"); + $dbh->do("INSERT INTO test.foo VALUES (1, " . $dbh->quote("Tim") . ")"); + $dbh->do("INSERT INTO test.foo VALUES (?, ?)", undef, 2, "Jochen"); + my $sth = $dbh->prepare("SELECT * FROM test.foo"); + $sth->execute(); + while (my $ref = $sth->fetchrow_hashref()) { + print "$ref->{'id'},$ref->{'name'}\\n"; + } + $sth->finish(); + $dbh->disconnect(); + PERL + + system mysql.bin/"mysqld", *mysqld_args, "--initialize-insecure" + pid = spawn(mysql.bin/"mysqld", *mysqld_args) + with_env(PERL5LIB: libexec/"lib/perl5") do + sleep 5 + assert_equal "1,Tim\n2,Jochen\n", shell_output("#{perl} test.pl") + ensure + system mysql.bin/"mysqladmin", "--port=#{port}", "--socket=#{socket}", "--user=root", "--password=", "shutdown" + Process.kill "TERM", pid + end + end +end diff --git a/Formula/p/perl-xml-parser.rb b/Formula/p/perl-xml-parser.rb new file mode 100644 index 0000000000000..33106eeb4250c --- /dev/null +++ b/Formula/p/perl-xml-parser.rb @@ -0,0 +1,46 @@ +class PerlXmlParser < Formula + desc "Perl module for parsing XML documents" + homepage "https://github.com/cpan-authors/XML-Parser" + url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz" + sha256 "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8" + license "Artistic-2.0" + head "https://github.com/cpan-authors/XML-Parser.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4717e726e05f48b5ba27f7167a8cf36d47597042f0cc77123d51967b1df556f4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "743f65ac327d1c467d9e4f82fa910d19ae383c858073846009aca35322f9e64e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ca54e86b76d10069e88fb814728f36ddc091cfda3dcffb38e68c6ec656d05cc5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5dc622c5856a89a675ab3a23aed3158434a6a7196d9b95b19b82f4371d1f50c7" + sha256 cellar: :any_skip_relocation, sonoma: "4b5a25de8d14214ec9102591fe6812ee2674e0c3e1e6bd2e4f094690298ba55b" + sha256 cellar: :any_skip_relocation, ventura: "1f11e49aeb5e4927c4fdd2a3f23096b655b06146a34ac2c3275a0967eccc882d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea6d38240ddf5f5c8c1d8a170d3f609e5c575f6218400779d9fee264434b6eb1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fee8525a0657759385a896976246e5e8d65c948bcc81276c6edc1fe7c72a0a15" + end + + # macOS Perl already has the XML::Parser module + depends_on "perl" + uses_from_macos "expat" + + def install + system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}" + system "make" + system "make", "install" + + share.install prefix/"man" + perl_version = Formula["perl"].version.major_minor.to_s + site_perl = lib/"perl5/site_perl"/perl_version + (lib/"perl5").find do |pn| + next unless pn.file? + + subdir = pn.relative_path_from(lib/"perl5").dirname + (site_perl/subdir).install_symlink pn + end + end + + test do + system Formula["perl"].opt_bin/"perl", "-e", "require XML::Parser;" + end +end diff --git a/Formula/p/perl.rb b/Formula/p/perl.rb new file mode 100644 index 0000000000000..2acc7e50878a8 --- /dev/null +++ b/Formula/p/perl.rb @@ -0,0 +1,89 @@ +class Perl < Formula + desc "Highly capable, feature-rich programming language" + homepage "https://www.perl.org/" + url "https://www.cpan.org/src/5.0/perl-5.40.2.tar.xz" + sha256 "0551c717458e703ef7972307ab19385edfa231198d88998df74e12226abf563b" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/perl/perl5.git", branch: "blead" + + livecheck do + url "https://www.cpan.org/src/" + regex(/href=.*?perl[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "500dcc292ff8387aa3044c31401879dd47c4e653e5573b448c7edfbe3333cd99" + sha256 arm64_sequoia: "c984a79cf9dba490a830081f3587349723c8c156b79dc7b6c159360624181299" + sha256 arm64_sonoma: "3900203e58329e754f54397b61b9120a892f70d61ba48835b90b2fde45c1ecc0" + sha256 arm64_ventura: "f695d132859207d5406bb2ec7f5c522df7085065da91b2fdee94c53d090fc8b0" + sha256 sonoma: "99d35f068ce3f224448fe8a2b6d11639a0a07a5df1213907337add51e5700bc7" + sha256 ventura: "0c121d939ac294ca374240fa2aa755bb7f1debf2545961552e30ab464b337f30" + sha256 arm64_linux: "6c2b1d9010669da23fe973949dc0d714bdff92d2cbd006d52a0d4736e743ffca" + sha256 x86_64_linux: "018804347f6d231ea705e0b43c0d9ef6f996d9432697146dcce7fb65a8c3787f" + end + + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL-3.0 restrictions + depends_on "gdbm" + + uses_from_macos "expat" + uses_from_macos "libxcrypt" + + # Prevent site_perl directories from being removed + skip_clean "lib/perl5/site_perl" + + def install + args = %W[ + -des + -Dinstallstyle=lib/perl5 + -Dinstallprefix=#{prefix} + -Dprefix=#{opt_prefix} + -Dprivlib=#{opt_lib}/perl5/#{version.major_minor} + -Dsitelib=#{opt_lib}/perl5/site_perl/#{version.major_minor} + -Dotherlibdirs=#{HOMEBREW_PREFIX}/lib/perl5/site_perl/#{version.major_minor} + -Dperlpath=#{opt_bin}/perl + -Dstartperl=#!#{opt_bin}/perl + -Dman1dir=#{opt_share}/man/man1 + -Dman3dir=#{opt_share}/man/man3 + -Duseshrplib + -Duselargefiles + -Dusethreads + ] + args << "-Dusedevel" if build.head? + + system "./Configure", *args + system "make" + system "make", "install" + end + + def post_install + if OS.linux? + perl_archlib = Utils.safe_popen_read(bin/"perl", "-MConfig", "-e", "print $Config{archlib}") + perl_core = Pathname.new(perl_archlib)/"CORE" + if File.readlines("#{perl_core}/perl.h").grep(/include /).any? && + (OS::Linux::Glibc.system_version >= "2.26" || + (Formula["glibc"].any_version_installed? && Formula["glibc"].version >= "2.26")) + # Glibc does not provide the xlocale.h file since version 2.26 + # Patch the perl.h file to be able to use perl on newer versions. + # locale.h includes xlocale.h if the latter one exists + inreplace "#{perl_core}/perl.h", "include ", "include " + end + end + end + + def caveats + <<~EOS + By default non-brewed cpan modules are installed to the Cellar. If you wish + for your modules to persist across updates we recommend using `local::lib`. + + You can set that up like this: + PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib + And add the following to your shell profile e.g. ~/.profile or ~/.zshrc + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)" + EOS + end + + test do + (testpath/"test.pl").write "print 'Perl is not an acronym, but JAPH is a Perl acronym!';" + system bin/"perl", "test.pl" + end +end diff --git a/Formula/p/perltidy.rb b/Formula/p/perltidy.rb new file mode 100644 index 0000000000000..a530229eeb2d9 --- /dev/null +++ b/Formula/p/perltidy.rb @@ -0,0 +1,62 @@ +class Perltidy < Formula + desc "Indents and reformats Perl scripts to make them easier to read" + homepage "https://perltidy.sourceforge.net/" + url "https://downloads.sourceforge.net/project/perltidy/20250912/Perl-Tidy-20250912.tar.gz" + sha256 "b48ee48835fbceab2fde0f1c59c5a539f046e3bb236fa34d8b60871fd79cf0a4" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/Perl-Tidy[._-]v?(\d+(?:\.\d+)*)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "87c7fb65d9974f2e41df73d93962b8c63de3c1d90a7e09b4b7271d2fcfc884b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87c7fb65d9974f2e41df73d93962b8c63de3c1d90a7e09b4b7271d2fcfc884b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87c7fb65d9974f2e41df73d93962b8c63de3c1d90a7e09b4b7271d2fcfc884b6" + sha256 cellar: :any_skip_relocation, sonoma: "f44e71e3b2017c82d171db7123a3c4c8b45c3f24aff5bf235c21ba505e2caf4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "860a20eb27cbe64eb1eddf93704c7db881c3051d773d12aca84afbe2f7af5daa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88b3a58bb564e6e42c231a8a1cc4077824252a68658a54d1e6bc59650a20f5ee" + end + + uses_from_macos "perl" + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", + "INSTALLSITESCRIPT=#{bin}", + "INSTALLSITEMAN1DIR=#{man1}", + "INSTALLSITEMAN3DIR=#{man3}" + system "make" + system "make", "install" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + (testpath/"testfile.pl").write <<~PERL + print "Help Desk -- What Editor do you use?"; + chomp($editor = ); + if ($editor =~ /emacs/i) { + print "Why aren't you using vi?"; + } elsif ($editor =~ /vi/i) { + print "Why aren't you using emacs?"; + } else { + print "I think that's the problem"; + } + PERL + system bin/"perltidy", testpath/"testfile.pl" + assert_equal <<~PERL, (testpath/"testfile.pl.tdy").read + print "Help Desk -- What Editor do you use?"; + chomp( $editor = ); + if ( $editor =~ /emacs/i ) { + print "Why aren't you using vi?"; + } + elsif ( $editor =~ /vi/i ) { + print "Why aren't you using emacs?"; + } + else { + print "I think that's the problem"; + } + PERL + end +end diff --git a/Formula/p/permify.rb b/Formula/p/permify.rb new file mode 100644 index 0000000000000..c1328e325a130 --- /dev/null +++ b/Formula/p/permify.rb @@ -0,0 +1,42 @@ +class Permify < Formula + desc "Open-source authorization service & policy engine based on Google Zanzibar" + homepage "https://github.com/Permify/permify" + url "https://github.com/Permify/permify/archive/refs/tags/v1.5.0.tar.gz" + sha256 "4d524431c9d8eb9c79f611589e0f8ed11c4a27f234a6914f2ea2f10e49efdc26" + license "AGPL-3.0-only" + head "https://github.com/Permify/permify.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9486b09f80b5a7f0b7fd2a82837145ca34df6d9540e9a948cdebf9a98cc2b00b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "334f2d5b7598193c34afc95fa70e2e7db8dcd9e1fe5066e113ebcfeb3826522a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d4fb6735af5b84e3e38d10562a4911a6fdc8c182e1cec6a401d0d18e5d4ee81" + sha256 cellar: :any_skip_relocation, sonoma: "3db83c581349bbe7e077ff43d3e68af8e78562dc1c2f3205dd61472cc3b05768" + sha256 cellar: :any_skip_relocation, arm64_linux: "10afd688888904155beb6a1c4b80815bbc34366c19896c1f111c1c4c064ad3f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "923da33fd2c1cbefb5361ccc36fa1be7373b7d4b02d551fcc8f74c8da832cb0a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/permify" + + generate_completions_from_executable(bin/"permify", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/permify version") + + (testpath/"schema.yaml").write <<~YAML + schema: >- + entity user {} + + entity document { + relation viewer @user + action view = viewer + } + YAML + + output = shell_output("#{bin}/permify ast #{testpath}/schema.yaml") + assert_equal "document", JSON.parse(output)["entityDefinitions"]["document"]["name"] + end +end diff --git a/Formula/p/peru.rb b/Formula/p/peru.rb new file mode 100644 index 0000000000000..2988c8e7959b1 --- /dev/null +++ b/Formula/p/peru.rb @@ -0,0 +1,49 @@ +class Peru < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Dependency retriever for version control and archives" + homepage "https://github.com/buildinspace/peru" + url "https://files.pythonhosted.org/packages/46/93/97b31e2052b4308cbc413d85b6b6b08a3beeeac81996b070723418a0c24e/peru-1.3.5.tar.gz" + sha256 "2cc1a0d09c5d4fc28dda5c4bf87b4110ee2107e9ce7fb6a38f8d6f60a91af745" + license "MIT" + head "https://github.com/buildinspace/peru.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5a7e7669fb8cdf7e4bf5175f9d01be1d0a9d75aa693c6161c2b27145a8c62059" + sha256 cellar: :any, arm64_sequoia: "1b2840d24355227568032ad13df06a4ab9d0ae8c61bf2477d0f837fe7bb7b4a2" + sha256 cellar: :any, arm64_sonoma: "d4b0ba0f201b97d60292fd8f2539cdfa0e71b24ccccc963f40dbcd5ab03e8565" + sha256 cellar: :any, sonoma: "1d7ba45fd3db6b8154eee9d11ddc65859dc8be21ed882e9907c856d2d496c975" + sha256 cellar: :any_skip_relocation, arm64_linux: "d90e59b8f68ff875b46e7edea66ca293733abcdc5b071153ce347d3ca3ee484e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65b950ac4d3bb7af7bdd3221cad598590f02663010bb27d6176501dea43bd61c" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + venv = virtualenv_install_with_resources + + # Fix executable plugins looking for Python outside the virtualenv + rw_info = python_shebang_rewrite_info(venv.root/"bin/python") + rewrite_shebang rw_info, *venv.site_packages.glob("peru/resources/plugins/**/*.py") + end + + test do + (testpath/"peru.yaml").write <<~YAML + imports: + peru: peru + git module peru: + url: https://github.com/buildinspace/peru.git + YAML + + system bin/"peru", "sync" + assert_path_exists testpath/".peru" + assert_path_exists testpath/"peru" + end +end diff --git a/Formula/p/petsc-complex.rb b/Formula/p/petsc-complex.rb new file mode 100644 index 0000000000000..0def2ca0f526c --- /dev/null +++ b/Formula/p/petsc-complex.rb @@ -0,0 +1,78 @@ +class PetscComplex < Formula + desc "Portable, Extensible Toolkit for Scientific Computation (complex)" + homepage "https://petsc.org/" + url "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.24.1.tar.gz" + sha256 "d77f3fd5187a72ce5b68a056aa8fcccd37b6dc7a388991d1d8fa0bde32b0abc8" + license "BSD-2-Clause" + + livecheck do + formula "petsc" + end + + bottle do + sha256 arm64_tahoe: "6cb1c792f56a9ad68b132f95b511000d3181b45091f2c63452e3a29d2845b355" + sha256 arm64_sequoia: "c369a00b8413d43c5933812861a23b32653144735bd542d6145819f69c56a7a5" + sha256 arm64_sonoma: "cf2bd792797a99a695a2ec71ff0ac90e5cc11f693a326cefe696093993918f53" + sha256 sonoma: "d92c6858eb2781c51113a88a02be66904fcb66f7a41166caf202d1667f8bc7b9" + sha256 arm64_linux: "7a2e34e8ca619870c6c733592dc6d45cf183944b93d94ece51192ff6e5544e32" + sha256 x86_64_linux: "7b1c5d8af3c28bb5a3c703a979ef9da9b1b7c8e57338b14cb6fc984a106f72fd" + end + + depends_on "fftw" + depends_on "gcc" + depends_on "hdf5-mpi" + depends_on "hwloc" + depends_on "metis" + depends_on "open-mpi" + depends_on "openblas" + depends_on "scalapack" + depends_on "suite-sparse" + + uses_from_macos "python" => :build + + conflicts_with "petsc", because: "petsc must be installed with either real or complex support, not both" + + def install + system "./configure", "--prefix=#{prefix}", + "--with-debugging=0", + "--with-scalar-type=complex", + "--with-x=0", + "--CC=mpicc", + "--CXX=mpicxx", + "--F77=mpif77", + "--FC=mpif90", + "--with-fftw-dir=#{Formula["fftw"].opt_prefix}", + "--with-hdf5-dir=#{Formula["hdf5-mpi"].opt_prefix}", + "--with-hdf5-fortran-bindings=1", + "--with-metis-dir=#{Formula["metis"].opt_prefix}", + "--with-scalapack-dir=#{Formula["scalapack"].opt_prefix}", + "MAKEFLAGS=$MAKEFLAGS" + + # Avoid references to Homebrew shims (perform replacement before running `make`, or else the shim + # paths will still end up in compiled code) + inreplace "arch-#{OS.kernel_name.downcase}-c-opt/include/petscconf.h", "#{Superenv.shims_path}/", "" + + system "make", "all" + system "make", "install" + + # Avoid references to Homebrew shims + rm(lib/"petsc/conf/configure-hash") + + if OS.mac? || File.foreach("#{lib}/petsc/conf/petscvariables").any? { |l| l[Superenv.shims_path.to_s] } + inreplace lib/"petsc/conf/petscvariables", "#{Superenv.shims_path}/", "" + end + end + + test do + flags = %W[-I#{include} -L#{lib} -lpetsc] + flags << "-Wl,-rpath,#{lib}" if OS.linux? + system "mpicc", share/"petsc/examples/src/ksp/ksp/tutorials/ex1.c", "-o", "test", *flags + output = shell_output("./test") + # This PETSc example prints several lines of output. The last line contains + # an error norm, expected to be small. + line = output.lines.last + assert_match(/^Norm of error .+, Iterations/, line, "Unexpected output format") + error = line.split[3].to_f + assert (error >= 0.0 && error < 1.0e-13), "Error norm too large" + end +end diff --git a/Formula/p/petsc.rb b/Formula/p/petsc.rb new file mode 100644 index 0000000000000..f14ab497fdb2d --- /dev/null +++ b/Formula/p/petsc.rb @@ -0,0 +1,88 @@ +class Petsc < Formula + desc "Portable, Extensible Toolkit for Scientific Computation (real)" + homepage "https://petsc.org/" + url "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.24.1.tar.gz" + sha256 "d77f3fd5187a72ce5b68a056aa8fcccd37b6dc7a388991d1d8fa0bde32b0abc8" + license "BSD-2-Clause" + + livecheck do + url "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/" + regex(/href=.*?petsc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "aad92757a77a819f9414a1707f0866f713135e806e8a8198b710badc104c8f2e" + sha256 arm64_sequoia: "2672e05670d0f648f60db2bdbbb63078e666cf2b63dd7cb33aa90f98613f7d94" + sha256 arm64_sonoma: "63a8ed53204c6a0995efa5d8a9595258fc580c9698470a073a970b99c586e8a3" + sha256 sonoma: "eb5be67a5e3930184954723e036ced4362f631226de371e0de06119d2d9371ae" + sha256 arm64_linux: "ab3d0d36e40c2d89460ce15dde009378e64ad254920f4172541aabcab0bb03c9" + sha256 x86_64_linux: "6cfd3b5c74cfb10ede31e0e6ca4a9fe8caea3dfdba1dfad57441bb60c45aeb77" + end + + depends_on "fftw" + depends_on "gcc" + depends_on "hdf5-mpi" + depends_on "hwloc" + depends_on "metis" + depends_on "open-mpi" + depends_on "openblas" + depends_on "scalapack" + depends_on "suite-sparse" + + uses_from_macos "python" => :build + + conflicts_with "petsc-complex", because: "petsc must be installed with either real or complex support, not both" + + def install + system "./configure", "--prefix=#{prefix}", + "--with-debugging=0", + "--with-scalar-type=real", + "--with-x=0", + "--CC=mpicc", + "--CXX=mpicxx", + "--F77=mpif77", + "--FC=mpif90", + "--with-fftw-dir=#{Formula["fftw"].opt_prefix}", + "--with-hdf5-dir=#{Formula["hdf5-mpi"].opt_prefix}", + "--with-hdf5-fortran-bindings=1", + "--with-metis-dir=#{Formula["metis"].opt_prefix}", + "--with-scalapack-dir=#{Formula["scalapack"].opt_prefix}", + "MAKEFLAGS=$MAKEFLAGS" + + # Avoid references to Homebrew shims (perform replacement before running `make`, or else the shim + # paths will still end up in compiled code) + inreplace "arch-#{OS.kernel_name.downcase}-c-opt/include/petscconf.h", "#{Superenv.shims_path}/", "" + + system "make", "all" + system "make", "install" + + # Avoid references to Homebrew shims + rm(lib/"petsc/conf/configure-hash") + + if OS.mac? || File.foreach("#{lib}/petsc/conf/petscvariables").any? { |l| l[Superenv.shims_path.to_s] } + inreplace lib/"petsc/conf/petscvariables", "#{Superenv.shims_path}/", "" + end + + # Avoid references to cellar paths. + gcc = Formula["gcc"] + open_mpi = Formula["open-mpi"] + inreplace (lib/"pkgconfig").glob("*.pc") do |s| + s.gsub! prefix, opt_prefix + s.gsub! gcc.prefix.realpath, gcc.opt_prefix + s.gsub! open_mpi.prefix.realpath, open_mpi.opt_prefix + end + end + + test do + flags = %W[-I#{include} -L#{lib} -lpetsc] + flags << "-Wl,-rpath,#{lib}" if OS.linux? + system "mpicc", pkgshare/"examples/src/ksp/ksp/tutorials/ex1.c", "-o", "test", *flags + output = shell_output("./test") + # This PETSc example prints several lines of output. The last line contains + # an error norm, expected to be small. + line = output.lines.last + assert_match(/^Norm of error .+, Iterations/, line, "Unexpected output format") + error = line.split[3].to_f + assert (error >= 0.0 && error < 1.0e-13), "Error norm too large" + end +end diff --git a/Formula/p/pex.rb b/Formula/p/pex.rb new file mode 100644 index 0000000000000..417f9fe0e9fd4 --- /dev/null +++ b/Formula/p/pex.rb @@ -0,0 +1,32 @@ +class Pex < Formula + desc "Package manager for PostgreSQL" + homepage "https://github.com/petere/pex" + url "https://github.com/petere/pex/archive/refs/tags/1.20140409.tar.gz" + sha256 "5047946a2f83e00de4096cd2c3b1546bc07be431d758f97764a36b32b8f0ae57" + license "MIT" + revision 4 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "81df4ae64bf5d25705cdb0fbaf1c09ab32bc0aecb2280fea08568ecfb10ac301" + end + + depends_on "libpq" + + def install + system "make", "install", "prefix=#{prefix}", "mandir=#{man}" + end + + def caveats + <<~EOS + If installing for the first time, perform the following in order to setup the necessary directory structure: + pex init + EOS + end + + test do + assert_match "share/pex/packages", shell_output("#{bin}/pex --repo").strip + end +end diff --git a/Formula/p/pferd.rb b/Formula/p/pferd.rb new file mode 100644 index 0000000000000..452cfe5de2c8c --- /dev/null +++ b/Formula/p/pferd.rb @@ -0,0 +1,148 @@ +class Pferd < Formula + include Language::Python::Virtualenv + + desc "Programm zum Flotten Einfachen Runterladen von Dateien" + homepage "https://github.com/Garmelon/PFERD" + url "https://files.pythonhosted.org/packages/2f/af/371337e0e06866d4efb36c1ab8e375736f1e2d7280544da130ef6687534b/pferd-3.8.3.tar.gz" + sha256 "0f2c4e582a885b2a1a88b9a896cfd0932e8f25db60b252c0957a6ffdd2085763" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cccc4044b038218b198a7f0abdfef9ee253c1597cb69782959b12fe8be38c443" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1be2005073b985441e6704395f62ecc83609e14dc90ec122ec9bd6421c3b7b94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ca4a33d7c2f29bb90b17da8986581fdd84ace4e94548f1bfb196741ea1e96e55" + sha256 cellar: :any_skip_relocation, sonoma: "9d23db850c5d20373c34b81608c80c6790457d6fd88afb2621f89ff9c496b322" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f0ef070378339423e3145c1befd05283fa29ff1b8e9a4028132260706bdad33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6b0f888cf46686fa95f6e0409f9fdf2a8ba2989685db1843d4c07fcc9d894b6" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "PFERD #{version} (#{homepage})", shell_output("#{bin}/pferd --version").strip + + assert_match "Error Failed to load config", shell_output(bin/"pferd", 1) + + (testpath/"pferd.cfg").write <<~EOS + [crawl:Foo] + type = kit-ilias-web + target = 1234567 + EOS + assert_match "key 'auth': Missing value", shell_output("#{bin}/pferd -c #{testpath}/pferd.cfg", 1) + end +end diff --git a/Formula/p/pfetch-rs.rb b/Formula/p/pfetch-rs.rb new file mode 100644 index 0000000000000..21fc1a6423bb9 --- /dev/null +++ b/Formula/p/pfetch-rs.rb @@ -0,0 +1,29 @@ +class PfetchRs < Formula + desc "Pretty system information tool written in Rust" + homepage "https://github.com/Gobidev/pfetch-rs" + url "https://github.com/Gobidev/pfetch-rs/archive/refs/tags/v2.11.1.tar.gz" + sha256 "478b637b75a496f0adaba9c3ef0d3f99d9af6ed11eec156c90d0c8cb4b7df209" + license "MIT" + head "https://github.com/Gobidev/pfetch-rs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b8869eb94d2f2eacf898bd934be26ccacad111b41828cd4910d01975329ca59" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "938aaf3f057099bc1e3a498576f712982f218b1c125b0830b72fe712d5a3ce48" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6626ec120c0173e26448fcc06cce8a285d2b07414ae024e0dff4942b30451afb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d037daa279b52f6199cbb6a9fcefa156b4d95f110de49c52d4cba009d261bfe3" + sha256 cellar: :any_skip_relocation, sonoma: "270e81997e47b2d7307ce0e8ee95a4f553e0277019ac1a361abdd9ab1336833a" + sha256 cellar: :any_skip_relocation, ventura: "bc0edf9427e2be7eeff636925b06c2170b9565e7bcdede47e0b1454932c67462" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f575a553467d25369d3416cb58de53e812b91ffc3f7c3c851dff3190e6ee297" + sha256 cellar: :any_skip_relocation, x86_64_linux: "502209e4ed7e51463bee5bfb8f746c6913a9f01cef928da2a4f7df9aed7797fa" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "uptime", shell_output("#{bin}/pfetch") + end +end diff --git a/Formula/p/pfetch.rb b/Formula/p/pfetch.rb new file mode 100644 index 0000000000000..b38a2c0227307 --- /dev/null +++ b/Formula/p/pfetch.rb @@ -0,0 +1,40 @@ +class Pfetch < Formula + desc "Pretty system information tool written in POSIX sh" + homepage "https://github.com/dylanaraps/pfetch/" + url "https://github.com/dylanaraps/pfetch/archive/refs/tags/0.6.0.tar.gz" + sha256 "d1f611e61c1f8ae55bd14f8f6054d06fcb9a2d973095367c1626842db66b3182" + license "MIT" + head "https://github.com/dylanaraps/pfetch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1fb62a82ee4474d2d2de0fed793cc7b5245dd28d8b535b600c1b9ba5a6bea5fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0771fb68c047893a0b59514f822c42d3371b23734a48c62c88b151a0e386e776" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a91953275ab9b2daa26d9ffe6d6f60b5ca3ce5d556223d24c1020aa9e8285ec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a91953275ab9b2daa26d9ffe6d6f60b5ca3ce5d556223d24c1020aa9e8285ec" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d3d84a024e20f9a85803389150748894f9a9dab94593af5c0ee3967a82ebe55a" + sha256 cellar: :any_skip_relocation, sonoma: "242f869092c11236c0d848cc064eb0815ffcee95c090eb01ae40afa65bf7fdc4" + sha256 cellar: :any_skip_relocation, ventura: "7dfa1cdbfc450e489c88d72808c87de7930ebc2cbc5da51c2be784eeba7076c3" + sha256 cellar: :any_skip_relocation, monterey: "7dfa1cdbfc450e489c88d72808c87de7930ebc2cbc5da51c2be784eeba7076c3" + sha256 cellar: :any_skip_relocation, big_sur: "3e5ceb26959ab4f137221f87eefe0ba1912695cce887b30f2e4894c699d86261" + sha256 cellar: :any_skip_relocation, catalina: "f93914feee7f4e3cda77341c3bddf2cf51eb4b2aed01f6ace771db75078da570" + sha256 cellar: :any_skip_relocation, arm64_linux: "8331cf22d8477865e7c61b71c9f121b41c245f1caeb4cde2faf809dcee51058b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfa6a98908cbd7ac49f1fd4813011ee6f18849130d84b4c4fa3c01282a33c568" + end + + deprecate! date: "2024-05-04", because: :repo_archived + disable! date: "2025-05-05", because: :repo_archived + + def install + if build.head? + bin.mkdir + inreplace "Makefile", "install -Dm", "install -m" + system "make", "install", "PREFIX=#{prefix}" + else + bin.install "pfetch" + end + end + + test do + assert_match "uptime", shell_output(bin/"pfetch") + end +end diff --git a/Formula/p/pg-schema-diff.rb b/Formula/p/pg-schema-diff.rb new file mode 100644 index 0000000000000..828d88a9ae8df --- /dev/null +++ b/Formula/p/pg-schema-diff.rb @@ -0,0 +1,35 @@ +class PgSchemaDiff < Formula + desc "Diff Postgres schemas and generating SQL migrations" + homepage "https://github.com/stripe/pg-schema-diff" + url "https://github.com/stripe/pg-schema-diff/archive/refs/tags/v1.0.2.tar.gz" + sha256 "036abefc48a7c4b3fe73f8ab659f7d3f3379d85b3747cd2ceb973ae542192667" + license "MIT" + head "https://github.com/stripe/pg-schema-diff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f7b9f07306b17afb7b12fa45a249b678a07150517c971b36cb110b2bf02f45d9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b98ed4ac4b75b8b959780a011c8b4fa6399267222bd2756a0d8989e249b2677" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b98ed4ac4b75b8b959780a011c8b4fa6399267222bd2756a0d8989e249b2677" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b98ed4ac4b75b8b959780a011c8b4fa6399267222bd2756a0d8989e249b2677" + sha256 cellar: :any_skip_relocation, sonoma: "bbe23212edff4718890067907cad83d7cd8ae4c7fc53be464e1319c1c5d35a29" + sha256 cellar: :any_skip_relocation, ventura: "bbe23212edff4718890067907cad83d7cd8ae4c7fc53be464e1319c1c5d35a29" + sha256 cellar: :any_skip_relocation, arm64_linux: "52287a45b152a43d11d6f60375c3f3b31c5f8551f253f418f2045adb711f80fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "761c21b121914bd68e6e972d000f26cc08e809348945b48c467dbb51f6b9189e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/pg-schema-diff" + + generate_completions_from_executable(bin/"pg-schema-diff", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + pg_port = free_port + dsn = "postgres://postgres:postgres@127.0.0.1:#{pg_port}/postgres?sslmode=disable" + + output = shell_output("#{bin}/pg-schema-diff plan --from-dsn '#{dsn}' --to-dir #{testpath} 2>&1", 1) + assert_match "Error: creating temp db factory", output + end +end diff --git a/Formula/p/pg_cron.rb b/Formula/p/pg_cron.rb new file mode 100644 index 0000000000000..825b5bd03de53 --- /dev/null +++ b/Formula/p/pg_cron.rb @@ -0,0 +1,73 @@ +class PgCron < Formula + desc "Run periodic jobs in PostgreSQL" + homepage "https://github.com/citusdata/pg_cron" + url "https://github.com/citusdata/pg_cron/archive/refs/tags/v1.6.7.tar.gz" + sha256 "d950bc29155f31017567e23a31d268ff672e98276c0e9d062512fb7870351f03" + license "PostgreSQL" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "a07a1ecf77295372c7976d26dddb193d94b529d87d133386e40379e8497dff55" + sha256 cellar: :any, arm64_sequoia: "903e9351b2bab78c495a3044933bf02a6407464f8afcd1c900415e95e9715d0e" + sha256 cellar: :any, arm64_sonoma: "c4eed9429951152b6fae02fc2dbf701dff9edf553eb4035f3d1cfcc2708a11f3" + sha256 cellar: :any, sonoma: "a046ebbb430f4eaa26638afcfe19082f19eaf984958d01e00650c931678d289e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e994552633f54d1d1e0a77ea71209671179bd649c65c9109564bf75e3bb035b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2a9efe94dba9e08e5a7444129f73aa88c7cb51eabf8378813f2edb18a119a8b" + end + + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + depends_on "libpq" + + on_macos do + depends_on "gettext" # for libintl + end + + def postgresqls + deps.filter_map { |f| f.to_formula if f.name.start_with?("postgresql@") } + .sort_by(&:version) + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + # Work around for ld: Undefined symbols: _libintl_ngettext + # Issue ref: https://github.com/citusdata/pg_cron/issues/269 + ENV["PG_LDFLAGS"] = "-lintl" if OS.mac? + + postgresqls.each do |postgresql| + ENV["PG_CONFIG"] = postgresql.opt_bin/"pg_config" + # We force linkage to `libpq` to allow building for multiple `postgresql@X` formulae. + # The major soversion is hardcoded to at least make sure compatibility version hasn't changed. + # If it does change, then need to confirm if API/ABI change impacts running on older PostgreSQL. + system "make", "install", "libpq=#{Formula["libpq"].opt_lib/shared_library("libpq", 5)}", + "rpathdir=#{Formula["libpq"].opt_lib}", + "pkglibdir=#{lib/postgresql.name}", + "datadir=#{share/postgresql.name}" + system "make", "clean" + end + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir, "-o", "--locale=en_US.UTF-8", "-o", "'-E UTF-8'" + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'pg_cron' + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"pg_cron\";", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/pg_partman.rb b/Formula/p/pg_partman.rb new file mode 100644 index 0000000000000..b1062cc671caa --- /dev/null +++ b/Formula/p/pg_partman.rb @@ -0,0 +1,66 @@ +class PgPartman < Formula + desc "Partition management extension for PostgreSQL" + homepage "https://github.com/pgpartman/pg_partman" + url "https://github.com/pgpartman/pg_partman/archive/refs/tags/v5.3.1.tar.gz" + sha256 "9f784f9c7707712ed41ffdbd5c354bf17bd2381bdd63280fc9aa3d48d4d95a64" + license "PostgreSQL" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "82794cbd5e4434e0326446f04f7e5e63a35593886fbb152f6ab514c4d547a7ee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b56b79bb69484079e62e17d15063e34304c33d05ac14278777b68e0853f0986f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "903d6277f39e552e818660fcaae33ba311fb29981a3805d0bbd729fd0fd614d2" + sha256 cellar: :any_skip_relocation, sonoma: "3e8b03f8533c667336f6933093ee3ed32dfb31ff8e4d4a4a453fd0da6abe74a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "99bb5c0cc17f9df4224edf1b2a79b95002a7a453888e1a6dcb10e876916bccaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "892e20035b80affa8e191d43099ec1bce25ccd92c195d7705acc0b0d549de0d7" + end + + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + postgresqls.each do |postgresql| + ENV["PG_CONFIG"] = postgresql.opt_bin/"pg_config" + + system "make" + system "make", "install", "bindir=#{bin}", + "docdir=#{doc}", + "datadir=#{share/postgresql.name}", + "pkglibdir=#{lib/postgresql.name}" + system "make", "clean" + end + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'pg_partman_bgw' + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"pg_partman\";", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/pg_top.rb b/Formula/p/pg_top.rb new file mode 100644 index 0000000000000..1ae9d78fe98fa --- /dev/null +++ b/Formula/p/pg_top.rb @@ -0,0 +1,61 @@ +class PgTop < Formula + desc "Monitor PostgreSQL processes" + homepage "https://pg_top.gitlab.io" + url "https://ftp.postgresql.org/pub/projects/pgFoundry/ptop/pg_top/3.7.0/pg_top-3.7.0.tar.bz2" + mirror "https://mirrorservice.org/sites/ftp.postgresql.org/projects/pgFoundry/ptop/pg_top/3.7.0/pg_top-3.7.0.tar.bz2" + sha256 "c48d726e8cd778712e712373a428086d95e2b29932e545ff2a948d043de5a6a2" + license "BSD-3-Clause" + revision 4 + + # 4.0.0 is out, but unfortunately no longer supports OS/X. Therefore + # we only look for the latest 3.x release until upstream adds OS/X support back. + livecheck do + url "https://gitlab.com/pg_top/pg_top.git" + regex(/^v?(3(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9adc494d9d026662d8e072527c22e736fe60bf0153eecdc5d3d4b6271abfc8a9" + sha256 cellar: :any, arm64_sequoia: "b9d888449873a35c6f29b43698da65bda0e4136eb1f2d0176338fcbc617e4e5b" + sha256 cellar: :any, arm64_sonoma: "852a0e040171868c8c6c677306c82c81ed1fc52e7cb47413c1ddcb48cf5bb987" + sha256 cellar: :any, arm64_ventura: "c7d46c3124f4336b96d82dac38fdaf58ecb871587f7e1f1bc52368ab3ba29e78" + sha256 cellar: :any, arm64_monterey: "a157f605a85907c0d04410199dfcc4d7de515844f0ad41bcbcde1b8b771431c8" + sha256 cellar: :any, arm64_big_sur: "506d2459e302e37bac0f38f99cd2cc2d3c3f5fd39631ee540a6f54d59af07f4a" + sha256 cellar: :any, sonoma: "59ad81e7e985e9b841a4667a901e94cadac8923be21654c5918326a230424910" + sha256 cellar: :any, ventura: "825e51d876eb38a90e72413f751b88c291b1da0956c8f07b494da5d51f10ca95" + sha256 cellar: :any, monterey: "6252dc42f3d6e6570b0371f2f10cd146a06bd52b492636bbb35f62ff07239b7a" + sha256 cellar: :any, big_sur: "7980c5af9dec1de3a76a74fbd4b359ec1a90bdd7223fa7ffc8f4294642042fc8" + sha256 cellar: :any, catalina: "edf54d452403cf5be9b63a0a744560a00bb9e83ace3885ae33d36d96b0a8c2a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbf1018624db8c4c76d72d83d18a7d079ae6d1fba0d7c65aea8078f9e1c31519" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65fe3861c5e90a4c9403f4b551892cd8ac85fbbea1cc23f551ee0eda3c9de01d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libpq" + + uses_from_macos "ncurses" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-postgresql=#{Formula["libpq"].opt_prefix}", *std_configure_args + + (buildpath/"config.h").append_lines "#define HAVE_DECL_STRLCPY 1" + # On modern OS/X [v]snprinf() are macros that optionally add some security checks + # In c.h this package provides their own declaration of these assuming they're + # normal functions. This collides with macro expansion badly but since we don't + # need the declarations anyway just change the string to something harmless: + inreplace "c.h", "snprintf", "unneeded_declaration_of_snprintf" + # This file uses "vm_stats" as a symbol name which conflicts with vm_stats() + # function in the SDK: + inreplace "machine/m_macosx.c", "vm_stats", "vm_stats_data" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pg_top -V") + end +end diff --git a/Formula/p/pgbackrest.rb b/Formula/p/pgbackrest.rb new file mode 100644 index 0000000000000..6868ecac562cd --- /dev/null +++ b/Formula/p/pgbackrest.rb @@ -0,0 +1,44 @@ +class Pgbackrest < Formula + desc "Reliable PostgreSQL Backup & Restore" + homepage "https://pgbackrest.org" + url "https://github.com/pgbackrest/pgbackrest/archive/refs/tags/release/2.57.0.tar.gz" + sha256 "d794519c0ecb4ec17f41c4267d07fe80ab6b3ac9cc1de5c7984887c5e6d7448a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8a8c360967998cee0ae02e55a31a722ce42ce57d9a2cf66e7d9ffbfee4ef5b2e" + sha256 cellar: :any, arm64_sequoia: "7998ebdb5fac0d09d13d88e764f4bbf1f01d95d651a689195e019a659b3d36c0" + sha256 cellar: :any, arm64_sonoma: "d7901e3a61b966084f86a8941e611cf423bf5a95029930faa63dcff1b3882e78" + sha256 cellar: :any, sonoma: "88390d24c0b4a788a38f8f10633a826f3784a6d70cd923cee61068bac9860c0f" + sha256 arm64_linux: "c5f14f2d2fc6b3251bfd16688a9b0df51f70ee281bc5b2724f277649fdbfce9d" + sha256 x86_64_linux: "c3c62af8aa93ded209ad328f0ea54b2bfbe2b22052d7fdf3894f83a9fbe08488" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libpq" + depends_on "libssh2" + depends_on "libyaml" + depends_on "lz4" + depends_on "openssl@3" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: Formula["libpq"].opt_lib)}" if OS.linux? + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + output = shell_output("#{bin}/pgbackrest info") + assert_match "No stanzas exist in the repository.", output + end +end diff --git a/Formula/p/pgbadger.rb b/Formula/p/pgbadger.rb new file mode 100644 index 0000000000000..b4f122e6c869d --- /dev/null +++ b/Formula/p/pgbadger.rb @@ -0,0 +1,56 @@ +class Pgbadger < Formula + desc "Log analyzer for PostgreSQL" + homepage "https://pgbadger.darold.net/" + url "https://github.com/darold/pgbadger/archive/refs/tags/v13.1.tar.gz" + sha256 "9658ff222ed7b387d3cb76c3e3d90d1862b885c13b26aa9ff652e133f5d018f1" + license "PostgreSQL" + head "https://github.com/darold/pgbadger.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7660efd39ced9f239c33d6f2eddfa4741e980cfe7e90d8947cd268847fc2643b" + end + + def install + system "perl", "Makefile.PL", "DESTDIR=#{buildpath}" + system "make" + system "make", "install" + + man_dir = if OS.mac? + "share/man/man1" + else + "man/man1" + end + bin.install "usr/local/bin/pgbadger" + man1.install "usr/local/#{man_dir}/pgbadger.1p" + end + + def caveats + <<~EOS + You must configure your PostgreSQL server before using pgBadger. + Edit postgresql.conf (in #{var}/postgres if you use Homebrew's + PostgreSQL), set the following parameters, and restart PostgreSQL: + + log_destination = 'stderr' + log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' + log_statement = 'none' + log_duration = off + log_min_duration_statement = 0 + log_checkpoints = on + log_connections = on + log_disconnections = on + log_lock_waits = on + log_temp_files = 0 + lc_messages = 'C' + EOS + end + + test do + (testpath/"server.log").write <<~EOS + LOG: autovacuum launcher started + LOG: database system is ready to accept connections + EOS + system bin/"pgbadger", "-f", "syslog", "server.log" + assert_path_exists testpath/"out.html" + end +end diff --git a/Formula/p/pgbouncer.rb b/Formula/p/pgbouncer.rb new file mode 100644 index 0000000000000..2db41d760ffd0 --- /dev/null +++ b/Formula/p/pgbouncer.rb @@ -0,0 +1,75 @@ +class Pgbouncer < Formula + desc "Lightweight connection pooler for PostgreSQL" + homepage "https://www.pgbouncer.org/" + url "https://www.pgbouncer.org/downloads/files/1.24.1/pgbouncer-1.24.1.tar.gz" + sha256 "da72a3aba13072876d055a3e58dd4aba4a5de4ed6148e73033185245598fd3e0" + license "ISC" + + livecheck do + url "https://www.pgbouncer.org/downloads/" + regex(/href=.*?pgbouncer[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b106491a75031ce42111776b2acc0cf72690e2e248292e81829f2564a07c40a4" + sha256 cellar: :any, arm64_sequoia: "c520e5665bb21b6ab7d77518d49d1b2979f631fd87bd8e3f9c262bb350916048" + sha256 cellar: :any, arm64_sonoma: "8d48d6942ec879fa455056cc92fc75a090bae0e0acab0aa101139891bbd6a6ce" + sha256 cellar: :any, arm64_ventura: "7de7551aac5f589fb691bcc55f4bae5ebbb68da3434751fe1be14203a6186aa2" + sha256 cellar: :any, sonoma: "75a3afc5fac5c466ab0e103a8844f09d78c5347127bd90769d240a72b6383554" + sha256 cellar: :any, ventura: "680d9567e322ca0a079bd281aa54e442cec5f61b2014cd48f5b41c3e5f541c13" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9fe8b6575f317bd25b10f302ea651246a0a5b986998a6a4e33a34f771be992b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d06c2e9d58c439b5c19d7a402b66c76d3434ff8a7d44a8e4fd390057e7bd430" + end + + head do + url "https://github.com/pgbouncer/pgbouncer.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pandoc" => :build + end + + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "openssl@3" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + bin.install "etc/mkauth.py" + inreplace "etc/pgbouncer.ini" do |s| + s.gsub!(/logfile = .*/, "logfile = #{var}/log/pgbouncer.log") + s.gsub!(/pidfile = .*/, "pidfile = #{var}/run/pgbouncer.pid") + s.gsub!(/auth_file = .*/, "auth_file = #{etc}/userlist.txt") + end + etc.install %w[etc/pgbouncer.ini etc/userlist.txt] + end + + def post_install + (var/"log").mkpath + (var/"run").mkpath + end + + def caveats + <<~EOS + The config file: #{etc}/pgbouncer.ini is in the "ini" format and you + will need to edit it for your particular setup. See: + https://pgbouncer.github.io/config.html + + The auth_file option should point to the #{etc}/userlist.txt file which + can be populated by the #{bin}/mkauth.py script. + EOS + end + + service do + run [opt_bin/"pgbouncer", "-q", etc/"pgbouncer.ini"] + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + assert_match version.to_s, shell_output("#{bin}/pgbouncer -V") + end +end diff --git a/Formula/p/pgcli.rb b/Formula/p/pgcli.rb new file mode 100644 index 0000000000000..6767ddac4f346 --- /dev/null +++ b/Formula/p/pgcli.rb @@ -0,0 +1,104 @@ +class Pgcli < Formula + include Language::Python::Virtualenv + + desc "CLI for Postgres with auto-completion and syntax highlighting" + homepage "https://pgcli.com/" + url "https://files.pythonhosted.org/packages/ab/9a/c86de44b7a663f0a15cb835d317f22f2ef8438154f6b646ffe32baa3799d/pgcli-4.3.0.tar.gz" + sha256 "765ae1550c5508a481f19f16a99716c253fe91afb255797add2d635da20b6aef" + license "BSD-3-Clause" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "320d3eb85c0ef74dcb5b151e8cdfa9d021d71ba79fedc91c84dc5e8409d3bf5b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6149460db9343c9b77cce05134380a52141ebf53bcb3faab02a5088aacdb1f55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6701e5f1e0d9291df5de2d02aae08780abb58aab198c76ed666bd5d688163a1" + sha256 cellar: :any_skip_relocation, sonoma: "66d3728a035658eee88d033e59910ea16ca486a4fde8b8fbd3854e6f2d16645c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4813a183b63cf5c4c1ebfd82bc031a4cacabe87334b48f205fa9b9ac1d746468" + sha256 cellar: :any_skip_relocation, x86_64_linux: "314d231e51a99b069f55582e24f254b4b24ae70382ca3c2a93d068952476846e" + end + + depends_on "libpq" + depends_on "python@3.14" + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/5a/e6/51b043e8c4ae390af61af35f73a9c2a69a26ea9cf4d061ab45c59f8e20f4/cli_helpers-2.7.0.tar.gz" + sha256 "62d11710dbebc2fc460003de1215688325d8636859056d688b38419bd4048bc0" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "pgspecial" do + url "https://files.pythonhosted.org/packages/12/b3/f342d6a9ec37fddff8c30b4f6eb5e83990f5d33135cecf381d3f7a0c1c9c/pgspecial-2.2.1.tar.gz" + sha256 "da6c7fcc7bef7bb0132dc2046f74ec6513b1fe6f0c80e5528d630d14b7c4849d" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "psycopg" do + url "https://files.pythonhosted.org/packages/a9/f1/0258a123c045afaf3c3b60c22ccff077bceeb24b8dc2c593270899353bd0/psycopg-3.2.10.tar.gz" + sha256 "0bce99269d16ed18401683a8569b2c5abd94f72f8364856d56c0389bcd50972a" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/8d/48/49393a96a2eef1ab418b17475fb92b8fcfad83d099e678751b05472e69de/setproctitle-1.3.7.tar.gz" + sha256 "bc2bc917691c1537d5b9bca1468437176809c7e11e5694ca79a9ca12345dcb9e" + end + + resource "sqlparse" do + url "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz" + sha256 "09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + venv = virtualenv_install_with_resources without: "psycopg" + + # Help `psycopg` find our `libpq`, which is keg-only so its attempt to use `pg_config --libdir` fails + resource("psycopg").stage do + inreplace "psycopg/pq/_pq_ctypes.py", "libname := find_libpq_full_path()", + "libname := '#{Formula["libpq"].opt_lib/shared_library("libpq")}'" + venv.pip_install Pathname.pwd + end + + generate_completions_from_executable(bin/"pgcli", shell_parameter_format: :click) + end + + test do + assert_match "Invalid DSNs found in the config file", shell_output("#{bin}/pgcli --list-dsn 2>&1", 1) + (testpath/"pgclirc").write <<~EOS + [alias_dsn] + homebrew_dsn = postgresql://homebrew:password@localhost/dbname + EOS + assert_match "homebrew_dsn", shell_output("#{bin}/pgcli --pgclirc=#{testpath}/pgclirc --list-dsn") + end +end diff --git a/Formula/p/pgcopydb.rb b/Formula/p/pgcopydb.rb new file mode 100644 index 0000000000000..8e284414ef5dd --- /dev/null +++ b/Formula/p/pgcopydb.rb @@ -0,0 +1,51 @@ +class Pgcopydb < Formula + desc "Copy a Postgres database to a target Postgres server" + homepage "https://github.com/dimitri/pgcopydb" + url "https://github.com/dimitri/pgcopydb/archive/refs/tags/v0.17.tar.gz" + sha256 "7ed96f7bbc0a5250f3b73252c3a88d665df9c8101a89109cde774c3505882fdf" + license "PostgreSQL" + head "https://github.com/dimitri/pgcopydb.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "0922fc7e2a6d606e02d8e140e9d621bb9b865cb9c9ba074a057d132cb1b3b187" + sha256 arm64_sequoia: "f0f0c6e9e3ebe35b9d32a1e127cafe4fe120356dc758a1475c6830af13d048b2" + sha256 arm64_sonoma: "ff96b14430ae0b5ccea29365fb3d3b4d37a792534d74744250ebaaf425a6851d" + sha256 arm64_ventura: "b1fbef60821224b0230fae583caaebf0b70750d0dd7d8ec0a9ec2ec7cb0eb8bd" + sha256 sonoma: "a3e2806d74af8c705b2077032255a7cd39ac079c4997c980231b49651416c109" + sha256 ventura: "daefeb247366553b851071c3d429869d26695d11b4a675f7e51245039301b3f2" + sha256 arm64_linux: "c92d7b713b5620eee463b7c5a355c9c9d04676cc3d7d5e1bbf298d3bc0c4bd0d" + sha256 x86_64_linux: "6f99b95987e4d9873cb365c5be588e3b55281ccf09e2879f67d63dd97cf8370e" + end + + depends_on "sphinx-doc" => :build + depends_on "bdw-gc" + depends_on "libpq" + + def install + system "make", "bin" + libexec.install "src/bin/pgcopydb/pgcopydb" + + (bin/"pgcopydb").write_env_script libexec/"pgcopydb", PATH: "$PATH:#{Formula["libpq"].opt_bin}" + + system "make", "-C", "docs", "man" + man1.install Dir["docs/_build/man/*"] + end + + def caveats + <<~EOS + Pgcopydb searches for PostgreSQL command-line tools in your system's PATH environment variable. + To use a specific PostgreSQL version's command-line tools, ensure they are accessible in your PATH. + + When no PostgreSQL tools are found in PATH, pgcopydb defaults to using the command-line tools provided by the libpq formula. + EOS + end + + test do + assert_match 'Failed to export a snapshot on "postgresql://example.com"', + shell_output("#{bin}/pgcopydb clone --source postgresql://example.com " \ + "--target postgresql://example.com 2>&1", 12) + end +end diff --git a/Formula/p/pgdbf.rb b/Formula/p/pgdbf.rb new file mode 100644 index 0000000000000..db43a89653444 --- /dev/null +++ b/Formula/p/pgdbf.rb @@ -0,0 +1,34 @@ +class Pgdbf < Formula + desc "Converter of XBase/FoxPro tables to PostgreSQL" + homepage "https://github.com/kstrauser/pgdbf" + url "https://downloads.sourceforge.net/project/pgdbf/pgdbf/0.6.2/pgdbf-0.6.2.tar.xz" + sha256 "e46f75e9ac5f500bd12c4542b215ea09f4ebee638d41dcfd642be8e9769aa324" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be260fe3bed2656f7950f0715feee61893dc672cd737a1752896310c70b44b0b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a1747cf572e94ce2d46311dc5f7d13f736e22f0b1be93a3abd0fb8e1c3d781ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35cd208c6ab173a31b1732a64b19ae4a9f34d127ec6dbfed163452e5227c6e50" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c2ecba3b5b9e4803f45f71afbaf66d85333ec329f74513123dbfdc9822b803c6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2743386480c1d76708d184813b77daadec3bc7a70a542647308c9fb414aa65e3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b51760692708d6b3926a405f7b2e83553feeea062a1af91aa0b15858cf9e8b8c" + sha256 cellar: :any_skip_relocation, sonoma: "f559d2b12a26f57eb903013af9eee09b149a447ef49249007e1973a9932c8255" + sha256 cellar: :any_skip_relocation, ventura: "30721323815b2ff787ea33a99a3a693e126eb4f3222c447a59c8b10d3fa677ba" + sha256 cellar: :any_skip_relocation, monterey: "6381607bca777a7beb5d475f656a949e580e82b15d1f63fa109764c652da5d9c" + sha256 cellar: :any_skip_relocation, big_sur: "efd6ad07c77d7c973b9d4bd8e13ea837b43ac281c817f3ce300ac6c46de3f2e4" + sha256 cellar: :any_skip_relocation, catalina: "ae8050a5d6a6f91f529a0985a5626981d22573094791274c7bc1759b2770c4c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ae4511e609fa6ac9a2b0566969f0e511756b9e6b6c55f17655333aa7ddd01a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f2e231fc1b78b7837dfe257a04e2495128237e5800609675573dd2734185ea5" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/p/pget.rb b/Formula/p/pget.rb new file mode 100644 index 0000000000000..b0358e1d45bd1 --- /dev/null +++ b/Formula/p/pget.rb @@ -0,0 +1,40 @@ +class Pget < Formula + desc "File download client" + homepage "https://github.com/Code-Hex/pget" + url "https://github.com/Code-Hex/pget/archive/refs/tags/v0.2.1.tar.gz" + sha256 "fa7646bec975dd3995fb45d6b1f190565d6c4fae03c46c4eda34716c83ede03e" + license "MIT" + head "https://github.com/Code-Hex/pget.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6cc7cd05524fed05854389575505915428d98b973b8c3c392ea5869fbae72c04" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0cbbdf49e2ddf9f6c53982a891dff83b332e5cc760fb2bae4a5c8e2e2d738c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48b2b055afe66da789fc85f5f613bb9ea1af341f799c5ef540e9bfa889fad9ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e12737e48d675f8246fad2a72a0f79504d141de7eec04fc9f9490344770f542e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4d05a59354813de8e38ff2c01ecfeeb6baa7b27553bc4cae67c6480e6b6bcd8c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "88ab2a98f522495d6d8f6d84ff4fafeb4ec6cd78abee41a757f73ce02f2ca378" + sha256 cellar: :any_skip_relocation, sonoma: "0acfc3036de4f6d29e1a6cc004aa1b452dae41249adb8e60b85b5578bdf32310" + sha256 cellar: :any_skip_relocation, ventura: "edb9edc985e7d466dcaaacdfdb31221c7109b2604777df7e9829aa4f0185dc25" + sha256 cellar: :any_skip_relocation, monterey: "0006e845fe431ee1e419028938963cb7a5258ded5d5b18c10a0670260bd6b86e" + sha256 cellar: :any_skip_relocation, big_sur: "6cc06f23fbd3eb30d66a1e8c6d00b63225d864d7221f4775b0679a277a05ea56" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a6da0d673fdea5f2de05288170a73637d3e22b3a5505c46812e63ac468d60e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6edaa4e8d20796136fa7f95f21390d4827e88b4f596b04756489cde00260fa6" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/pget" + end + + test do + file = "https://raw.githubusercontent.com/Homebrew/homebrew-core/HEAD/README.md" + system bin/"pget", "-p", "4", file + assert_path_exists testpath/"README.md" + + assert_match version.to_s, shell_output("#{bin}/pget --help", 1) + end +end diff --git a/Formula/p/pgformatter.rb b/Formula/p/pgformatter.rb new file mode 100644 index 0000000000000..f938f9c02be5b --- /dev/null +++ b/Formula/p/pgformatter.rb @@ -0,0 +1,37 @@ +class Pgformatter < Formula + desc "PostgreSQL syntax beautifier" + homepage "https://sqlformat.darold.net/" + url "https://github.com/darold/pgFormatter/archive/refs/tags/v5.8.tar.gz" + sha256 "cde9a964788e6c59dbcfada1606b3a2fe56916a96251f851a521622fc5963332" + license "PostgreSQL" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2bd59287c3b5bac8b11cc66d61192e8f2268b68133228a46dc057f00e0e725cc" + end + + def install + system "perl", "Makefile.PL", "DESTDIR=.", "MAN1EXT=1" + system "make", "install" + + if OS.linux? + # Move man pages to share directory so they will be linked correctly on Linux + mkdir "usr/local/share" + mv "usr/local/man", "usr/local/share" + end + + prefix.install (buildpath/"usr/local").children + (libexec/"lib").install "blib/lib/pgFormatter" + libexec.install bin/"pg_format" + bin.install_symlink libexec/"pg_format" + + # Build an `:all` bottle + rm_r share/"perl" if OS.linux? + chmod 0755, [bin, share, share/"man", man1, man3] # permissions match + end + + test do + test_file = (testpath/"test.sql") + test_file.write("SELECT * FROM foo") + system bin/"pg_format", test_file + end +end diff --git a/Formula/p/pgloader.rb b/Formula/p/pgloader.rb new file mode 100644 index 0000000000000..63c4e15204297 --- /dev/null +++ b/Formula/p/pgloader.rb @@ -0,0 +1,71 @@ +class Pgloader < Formula + desc "Data loading tool for PostgreSQL" + homepage "https://github.com/dimitri/pgloader" + url "https://github.com/dimitri/pgloader/releases/download/v3.6.9/pgloader-bundle-3.6.9.tgz" + sha256 "a5d09c466a099eb7d59e485b4f45aa2eb45b0ad38499180646c5cafb7b81c9e0" + license "PostgreSQL" + revision 1 + head "https://github.com/dimitri/pgloader.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "f5baa53cabbdcdba97c61a8734543b06ffecf1edfb6a072fffe33673b6adda14" + sha256 cellar: :any, arm64_sequoia: "0b51ea7384a8623316882a7e4ca9fd5a67fd290fc2cea4f37e1b202b565a33cf" + sha256 cellar: :any, arm64_sonoma: "02643e311b7153fc874298fc931b1a685a2cacee774b094807ca907938d1d778" + sha256 cellar: :any, sonoma: "b3e66db5bd5d27ebb26eb4afad56169753c690f85606abcd28855f15eafbf5b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9dad60ccd17c70c50388e58642587f660497c819d964544cb59ef9a80f942133" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3383d6eb3b97d354416fa7257bf7beafbbaa14d671dc285e44cf6b2c0116356b" + end + + depends_on "buildapp" => :build + + depends_on "freetds" + depends_on "libpq" + depends_on "openssl@3" + depends_on "sbcl" + depends_on "zstd" + + on_linux do + # Patchelf will corrupt the SBCL core which is appended to binary. + on_arm do + pour_bottle? only_if: :default_prefix + end + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + system "make" + bin.install "bin/pgloader" + + # Work around patchelf corrupting the SBCL core which is appended to binary + # TODO: Find a better way to handle this in brew, either automatically or via DSL + if OS.linux? && build.bottle? + cp bin/"pgloader", prefix + Utils::Gzip.compress(prefix/"pgloader") + end + end + + def post_install + if (prefix/"pgloader.gz").exist? + system "gunzip", prefix/"pgloader.gz" + bin.install prefix/"pgloader" + (bin/"pgloader").chmod 0755 + end + end + + test do + output = shell_output("#{bin}/pgloader --summary 2>&1", 2) + assert_match "pgloader [ option ... ] SOURCE TARGET", output + + assert_match version.to_s, shell_output("#{bin}/pgloader --version") + end +end diff --git a/Formula/p/pgpdump.rb b/Formula/p/pgpdump.rb new file mode 100644 index 0000000000000..8a0506d0f039c --- /dev/null +++ b/Formula/p/pgpdump.rb @@ -0,0 +1,48 @@ +class Pgpdump < Formula + desc "PGP packet visualizer" + homepage "https://www.mew.org/~kazu/proj/pgpdump/en/" + url "https://github.com/kazu-yamamoto/pgpdump/archive/refs/tags/v0.36.tar.gz" + sha256 "9831fb578175f97f77e269326cb06e5367161e9ddbbfb7f753cef12f0f479c1d" + license "BSD-3-Clause" + head "https://github.com/kazu-yamamoto/pgpdump.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "85243a86d8e3ea3d785a64a923646171e20ad9be329360f6b93f74608db023b8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e1106f448c38f9e3c36c90d622db3e4e0fba0375346446d8b5f8b50acc8fae9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1486016d74d108d52c41c9b09d8d681bc7a08e553a6e65f1753b37df3ce6e18a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a989f9d5f92668d4d84666bb1cc2654a7bbc4eff4514f184d88f24eaedb074fa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "52448666ef81ee5ba314eea314299c6785f507adc28924fdfe4812bd3efeccf3" + sha256 cellar: :any_skip_relocation, sonoma: "9d251de5de502b17047090b372b041cfa01f36300da79b7cdb31c1a2742d13e8" + sha256 cellar: :any_skip_relocation, ventura: "182e8c57659d5aa820da72ba424ffe35387f18982fd203ba19c3eedc15636acf" + sha256 cellar: :any_skip_relocation, monterey: "1840aa585133917d6134062341a3f99b6d9f75bae841a5c17f03875f32550860" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b513cc3a5634c9f81ac831e5fce2db784e947233439706b34a2dc3b44391714" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee47fa9dcc4ffe236943ebbb493b3c6b95237576d3b69e1c847025632f9b4e91" + end + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"sig.pgp").write <<~EOS + -----BEGIN PGP MESSAGE----- + Version: GnuPG v1.2.6 (NetBSD) + Comment: For info see https://www.gnupg.org + + owGbwMvMwCSYq3dE6sEMJU7GNYZJLGmZOanWn4xaQzIyixWAKFEhN7W4ODE9VaEk + XyEpVaE4Mz0vNUUhqVIhwD1Aj6vDnpmVAaQeZogg060chvkFjPMr2CZNmPnwyebF + fJP+td+b6biAYb779N1eL3gcHUyNsjliW1ekbZk6wRwA + =+jUx + -----END PGP MESSAGE----- + EOS + + output = shell_output("#{bin}/pgpdump sig.pgp") + assert_match("Key ID - 0x6D2EC41AE0982209", output) + end +end diff --git a/Formula/p/pgpool-ii.rb b/Formula/p/pgpool-ii.rb new file mode 100644 index 0000000000000..8ffa17c86bb0a --- /dev/null +++ b/Formula/p/pgpool-ii.rb @@ -0,0 +1,67 @@ +class PgpoolIi < Formula + desc "PostgreSQL connection pool server" + homepage "https://www.pgpool.net/mediawiki/index.php/Main_Page" + url "https://www.pgpool.net/mediawiki/images/pgpool-II-4.6.3.tar.gz" + sha256 "46688668b2ace67d8161a320256252d98698bc7d9788cc6727269d5720299f2c" + license all_of: ["HPND", "ISC"] # ISC is only for src/utils/strlcpy.c + + livecheck do + url "https://www.pgpool.net/mediawiki/index.php/Downloads" + regex(/href=.*?pgpool-II[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "d4e452ae158f90ef4228717bbe6c9b9d3678dfe797abdda1e6dfd40faa1d0dd8" + sha256 arm64_sequoia: "3062a0e20358f8e941be43ebdafc4be5b332258494933a7ba1d5d35d1157c06e" + sha256 arm64_sonoma: "263936a2aa00c0996b06cadc34a28cf70cd27389f69de3f10ab79d0cfe19a052" + sha256 arm64_ventura: "b0c66cc882f57bec2e56dcce1fb3487680b9e183e09bdcb6f96ec97f01e0f947" + sha256 cellar: :any, sonoma: "82fcc1e906022b1a61ce212c0cb68350497c503a05be8405b12f10ec67e753bf" + sha256 cellar: :any, ventura: "6ba91098cf31925d19ab65de6c9870428ef5422cd64e2415d5b30ef1ec10f4d3" + sha256 arm64_linux: "95096edfd72538ac1b6c4e4226bd7e9ad7b7278ca138078c533538a8207869ba" + sha256 x86_64_linux: "8959b7c3cb8529ef2f429b98097f070e716bd80af8e0a5e71720d8bc06634487" + end + + depends_on "libmemcached" + depends_on "libpq" + + uses_from_macos "libxcrypt" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--sysconfdir=#{etc}", + "--with-memcached=#{Formula["libmemcached"].opt_include}", + *std_configure_args + system "make", "install" + + # Install conf file with low enough memory limits for default `memqcache_method = 'shmem'` + inreplace etc/"pgpool.conf.sample" do |s| + s.gsub! "#pid_file_name = '/var/run/pgpool/pgpool.pid'", "pid_file_name = '#{var}/pgpool-ii/pgpool.pid'" + s.gsub! "#logdir = '/tmp'", "logdir = '#{var}/log'" + s.gsub! "#memqcache_total_size = 64MB", "memqcache_total_size = 1MB" + s.gsub! "#memqcache_max_num_cache = 1000000", "memqcache_max_num_cache = 1000" + end + etc.install etc/"pgpool.conf.sample" => "pgpool.conf" + end + + def post_install + (var/"log").mkpath + (var/"pgpool-ii").mkpath + end + + service do + run [opt_bin/"pgpool", "-nf", etc/"pgpool.conf"] + keep_alive true + log_path var/"log/pgpool-ii.log" + error_log_path var/"log/pgpool-ii.log" + end + + test do + cp etc/"pgpool.conf", testpath/"pgpool.conf" + system bin/"pg_md5", "--md5auth", "pool_passwd", "--config-file", "pgpool.conf" + end +end diff --git a/Formula/p/pgrok.rb b/Formula/p/pgrok.rb new file mode 100644 index 0000000000000..323f9c450b521 --- /dev/null +++ b/Formula/p/pgrok.rb @@ -0,0 +1,47 @@ +class Pgrok < Formula + desc "Poor man's ngrok, multi-tenant HTTP/TCP reverse tunnel solution" + homepage "https://github.com/pgrok/pgrok" + url "https://github.com/pgrok/pgrok/archive/refs/tags/v1.4.6.tar.gz" + sha256 "9bec95b33c5773c5c3b85886f4bffe56ac4321c38941c36e717c9c0931e46f93" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4d5186a932f6f7d4a8158be261c494ff8031d88f7e2ebe7468cb59f2e9bcaec3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d5186a932f6f7d4a8158be261c494ff8031d88f7e2ebe7468cb59f2e9bcaec3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d5186a932f6f7d4a8158be261c494ff8031d88f7e2ebe7468cb59f2e9bcaec3" + sha256 cellar: :any_skip_relocation, sonoma: "d3f69cfd8543a90d77cb8146f49dc1ec06c35101e2214daac083b1d3969c22bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e8df264bf0d3360544c451550b59b5779856b2abd2e1b15eb246455b55c8fce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09fa7db4fd8c819fc026194d598e6a87f76cb4f7ec5aad786c85d1e569394232" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./pgrok/cli" + + etc.install "pgrok.example.yml" + end + + test do + ENV["XDG_CONFIG_HOME"] = testpath + + system bin/"pgrok", "init", "--remote-addr", "example.com:222", + "--forward-addr", "http://localhost:3000", + "--token", "brewtest" + assert_match "brewtest", (testpath/"pgrok/pgrok.yml").read + + assert_match version.to_s, shell_output("#{bin}/pgrok --version") + end +end diff --git a/Formula/p/pgroonga.rb b/Formula/p/pgroonga.rb new file mode 100644 index 0000000000000..49beff4c468f0 --- /dev/null +++ b/Formula/p/pgroonga.rb @@ -0,0 +1,66 @@ +class Pgroonga < Formula + desc "PostgreSQL plugin to use Groonga as index" + homepage "https://pgroonga.github.io/" + url "https://packages.groonga.org/source/pgroonga/pgroonga-4.0.4.tar.gz" + sha256 "2e7be664ee99b49dd23ec57b19403ff4f5b44ca21d3c039d43fd1d550d583223" + license "PostgreSQL" + + livecheck do + url "https://pgroonga.github.io/install/source.html" + regex(/pgroonga[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0280838e8535f93baa721a29e8460236ccc523f3ed77559be4118614e11020f9" + sha256 cellar: :any, arm64_sequoia: "13d674ccdd0c2d03a70c464813b38ab52b70a9108e794f982ba3fb3d11cb1d1f" + sha256 cellar: :any, arm64_sonoma: "655deb7c692416f35a2b940032d621baa2aacc592132f307406fb29d1dfb6de7" + sha256 cellar: :any, sonoma: "7bcc4ccff48fea432c7abd064ece44ef19c897d79e3879815f19a0ac091ca228" + sha256 cellar: :any_skip_relocation, arm64_linux: "22a8415656c1963cdfc8d6659de98eb4d568f3f73dfed71cb2570b7073eee26e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6bf1ac6a1df6292a061fdc48796b3c1e1bbce6e20e7161704258c8971b5eba0" + end + + depends_on "pkgconf" => :build + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + depends_on "groonga" + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + postgresqls.each do |postgresql| + with_env(PATH: "#{postgresql.opt_bin}:#{ENV["PATH"]}") do + system "make" + system "make", "install", "bindir=#{bin}", + "datadir=#{share/postgresql.name}", + "pkglibdir=#{lib/postgresql.name}", + "pkgincludedir=#{include/postgresql.name}" + system "make", "clean" + end + end + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"pgroonga\";", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/pgrouting.rb b/Formula/p/pgrouting.rb new file mode 100644 index 0000000000000..647b43d9d8374 --- /dev/null +++ b/Formula/p/pgrouting.rb @@ -0,0 +1,78 @@ +class Pgrouting < Formula + desc "Provides geospatial routing for PostGIS/PostgreSQL database" + homepage "https://pgrouting.org/" + url "https://github.com/pgRouting/pgrouting/releases/download/v3.8.0/pgrouting-3.8.0.tar.gz" + sha256 "b8a5f0472934fdf7cda3fb4754d01945378d920cdaddc01f378617ddbb9c447f" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/pgRouting/pgrouting.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "635b794cef3d095e2dd87b630953c191bdfa2773ed0bec3c6c308ca2891b50ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a726b05d0bb7a9e9595b56ab81382ead5cdffe5e1b5a4c87f615f362f3420549" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7cbfdcd6a1ebbff590ba6d8891e6771d374cb648600cbe7ddf8c5c349956e309" + sha256 cellar: :any_skip_relocation, sonoma: "4c5e7218e0d1621047793dfb8085bfd2229c4d581f50a226434b6e51d1556874" + sha256 cellar: :any_skip_relocation, arm64_linux: "edf26d8ee0b61b633e621b699eff3210a01d6809c6560836c3ddd23e586a1525" + sha256 cellar: :any_skip_relocation, x86_64_linux: "761046a6b81bde4e46bffc7c7e07f79a2a4167ee2162fcf150be89abb2aa8f0f" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + depends_on "postgis" + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + ENV["DESTDIR"] = buildpath/"stage" + + postgresqls.each do |postgresql| + builddir = "build-pg#{postgresql.version.major}" + args = ["-DPOSTGRESQL_PG_CONFIG=#{postgresql.opt_bin}/pg_config"] + # CMake MODULE libraries use .so on macOS but PostgreSQL 16+ looks for .dylib + # Ref: https://github.com/postgres/postgres/commit/b55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a + args << "-DCMAKE_SHARED_MODULE_SUFFIX_CXX=.dylib" if OS.mac? && postgresql.version >= 16 + + system "cmake", "-S", ".", "-B", builddir, *args, *std_cmake_args + system "cmake", "--build", builddir + system "cmake", "--install", builddir + end + + stage_path = File.join("stage", HOMEBREW_PREFIX) + lib.install (buildpath/stage_path/"lib").children + share.install (buildpath/stage_path/"share").children + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'libpgrouting-#{version.major_minor}' + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"pgrouting\" CASCADE;", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/pgrx.rb b/Formula/p/pgrx.rb new file mode 100644 index 0000000000000..3c042b2b6189f --- /dev/null +++ b/Formula/p/pgrx.rb @@ -0,0 +1,38 @@ +class Pgrx < Formula + desc "Build Postgres Extensions with Rust" + homepage "https://github.com/pgcentralfoundation/pgrx" + url "https://github.com/pgcentralfoundation/pgrx/archive/refs/tags/v0.16.1.tar.gz" + sha256 "8638d911003b93e8a73ad86e3cfa807165d2d3e69fce45dff98b19838ca66d13" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "18ec52d8f23536e3d83cae766791ce71909ea1ecfe8d8825ca08c28900e6e360" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0635a05b7737daf0b4920af5d82304362ac2bd68af62bbeef539b0701ff445fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a81c4f856715e16bac6cc47e06db980bff34ea6a7e0305ee62922381e2c1b88" + sha256 cellar: :any_skip_relocation, sonoma: "f51e9c9b42b10de08a5d03be749a015981b0e71863de04c1924868d763743628" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6f41bedbb746bf6b0cb10f431ea03da30c7f2c174685871ff9a48f18e30190a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6c3c8f45df8886bdf8f9a9a5065c66217b06b22af1722ef2fb233f44f5c5bb0" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args(path: "cargo-pgrx") + end + + test do + # Show that we can use a different toolchain than the one provided by the `rust` formula. + # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359 + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "beta" + + system "cargo", "pgrx", "new", "my_extension" + assert_path_exists testpath/"my_extension/my_extension.control" + end +end diff --git a/Formula/p/pgslice.rb b/Formula/p/pgslice.rb new file mode 100644 index 0000000000000..7e8558688f531 --- /dev/null +++ b/Formula/p/pgslice.rb @@ -0,0 +1,71 @@ +class Pgslice < Formula + desc "Postgres partitioning as easy as pie" + homepage "https://github.com/ankane/pgslice" + url "https://github.com/ankane/pgslice/archive/refs/tags/v0.7.1.tar.gz" + sha256 "9c4b597c376217f81b40775906a07d1a294f22236f357bc88551b4a3a67b6172" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4b804ee8c22a1b234028f9119170e2172641c89fb39adf7c46ffcbb420aff89f" + sha256 cellar: :any, arm64_sequoia: "39bfa33730c49b770aac11c0659096db74326789d732c4cb3290c3e3096008a0" + sha256 cellar: :any, arm64_sonoma: "817e87e1feb86c845b152b516b473731d58a456092631dcc0e2a98f5189ba201" + sha256 cellar: :any, arm64_ventura: "bfa5d84ec12e40fc019bfb21f0e821d29943cfb37667bb811617924ad5b43adb" + sha256 cellar: :any, sonoma: "f5c84cf25d97b04edeeddd2c8617a69962bb0286b48c2cd8295c19bb70f42643" + sha256 cellar: :any, ventura: "1179a701dc2603dd555147458d93e0bb43c2fcfcbe3ffbbb7ad43035ff210fc7" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d3ad8ecb6094fa3a807d1b24c0b022e41460860c789791d198487ddd58969f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ae944ff188b457801ef9cbd8aed418e6a41e43eada6051ea43180fb2e357fb9" + end + + depends_on "postgresql@18" => :test + depends_on "libpq" + depends_on "ruby" + + resource "pg" do + url "https://rubygems.org/gems/pg-1.6.0.gem" + sha256 "26ea1694e4ed2e387a8292373acbb62ff9696d691d3a1b8b76cf56eb1d9bd40b" + end + + resource "thor" do + url "https://rubygems.org/gems/thor-1.4.0.gem" + sha256 "8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d" + end + + def install + ENV["GEM_HOME"] = libexec + ENV["PG_CONFIG"] = Formula["libpq"].opt_bin/"pg_config" + + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + + system "gem", "build", "pgslice.gemspec" + system "gem", "install", "--ignore-dependencies", "pgslice-#{version}.gem" + + bin.install libexec/"bin/pgslice" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + ENV["LC_ALL"] = "C" + + postgresql = Formula["postgresql@18"] + pg_ctl = postgresql.opt_bin/"pg_ctl" + port = free_port + + system pg_ctl, "initdb", "-D", testpath/"test" + (testpath/"test/postgresql.conf").write <<~EOS, mode: "a+" + port = #{port} + EOS + system pg_ctl, "start", "-D", testpath/"test", "-l", testpath/"log" + + begin + ENV["PGSLICE_URL"] = "postgres://localhost:#{port}/postgres" + output = shell_output("#{bin}/pgslice prep users created_at day 2>&1", 1) + assert_match "Table not found", output + ensure + system pg_ctl, "stop", "-D", testpath/"test" + end + end +end diff --git a/Formula/p/pgstream.rb b/Formula/p/pgstream.rb new file mode 100644 index 0000000000000..3c42a7961d0a4 --- /dev/null +++ b/Formula/p/pgstream.rb @@ -0,0 +1,50 @@ +class Pgstream < Formula + desc "PostgreSQL replication with DDL changes" + homepage "https://github.com/xataio/pgstream" + url "https://github.com/xataio/pgstream/archive/refs/tags/v0.8.7.tar.gz" + sha256 "ccbb86b27f6d4edf3488ea671f846876fddc0808baefffa7f9c45e4e501045a3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "946623a2fd006f830d6d019c6755c9ddf1bec92ffda77f28716711005cc9ae18" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "946623a2fd006f830d6d019c6755c9ddf1bec92ffda77f28716711005cc9ae18" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "946623a2fd006f830d6d019c6755c9ddf1bec92ffda77f28716711005cc9ae18" + sha256 cellar: :any_skip_relocation, sonoma: "697038513a5aa00aa051ea1a38ce03933e58a9a15eca05373473c23ff009d027" + sha256 cellar: :any_skip_relocation, arm64_linux: "e523f6c726565ff33e2a3b49beffc0838c4a29e12cd07831d53efc2a9da21425" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bcd406d713f4d9d0ed9adb069c918801252fb9bb3d24b28573bbd8dc408757ea" + end + + depends_on "go" => :build + depends_on "postgresql@18" => :test + depends_on "wal2json" => :test + + def install + ldflags = "-s -w -X github.com/xataio/pgstream/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/pgstream --version") + + ENV["LC_ALL"] = "C" + + postgresql = Formula["postgresql@18"] + pg_ctl = postgresql.opt_bin/"pg_ctl" + port = free_port + + system pg_ctl, "initdb", "-D", testpath/"test" + (testpath/"test/postgresql.conf").write <<~EOS, mode: "a+" + port = #{port} + shared_preload_libraries = 'wal2json' + wal_level = logical + EOS + system pg_ctl, "start", "-D", testpath/"test", "-l", testpath/"log" + + begin + url = "postgres://localhost:#{port}/postgres?sslmode=disable" + system bin/"pgstream", "init", "--postgres-url", url + ensure + system pg_ctl, "stop", "-D", testpath/"test" + end + end +end diff --git a/Formula/p/pgsync.rb b/Formula/p/pgsync.rb new file mode 100644 index 0000000000000..a60c6a2507e26 --- /dev/null +++ b/Formula/p/pgsync.rb @@ -0,0 +1,68 @@ +class Pgsync < Formula + desc "Sync Postgres data between databases" + homepage "https://github.com/ankane/pgsync" + url "https://github.com/ankane/pgsync/archive/refs/tags/v0.8.1.tar.gz" + sha256 "485c38e4c5bfec943bf8781f8c8ca4b773011c5767fb30be44d373566f40d5dc" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1f6a6e2b970a24e8d4de77f9c1e9adfd8285fbab0bfcf279e66b99b833a03530" + sha256 cellar: :any, arm64_sequoia: "4cdc2bb0bfcfc0f306696026ed00a5025c11d34a04e6787541782ca0b47dd543" + sha256 cellar: :any, arm64_sonoma: "ce5c0f2b05b9f7380714773e17635bf35327defda51c519e751832eeff86cb76" + sha256 cellar: :any, sonoma: "25aa2a324078445ed8e7089b0f990804b6f403a31a6e8f0be2608c777f9ea0cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d5d706c169092ca88d882c52ad3b86c572182e51a41a86b01fa7747ba9b131d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ef4fcfe0b023ae63a909b42006fc3305f72695eec74256c47ef7729a8808057" + end + + depends_on "libpq" + depends_on "ruby" + + resource "parallel" do + url "https://rubygems.org/gems/parallel-1.27.0.gem" + sha256 "4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130" + end + + resource "pg" do + url "https://rubygems.org/gems/pg-1.6.2.gem" + sha256 "58614afd405cc9c2c9e15bffe8432e0d6cfc58b722344ad4a47c73a85189c875" + end + + resource "slop" do + url "https://rubygems.org/gems/slop-4.10.1.gem" + sha256 "844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7" + end + + resource "tty-cursor" do + url "https://rubygems.org/gems/tty-cursor-0.7.1.gem" + sha256 "79534185e6a777888d88628b14b6a1fdf5154a603f285f80b1753e1908e0bf48" + end + + resource "tty-spinner" do + url "https://rubygems.org/gems/tty-spinner-0.9.3.gem" + sha256 "0e036f047b4ffb61f2aa45f5a770ec00b4d04130531558a94bfc5b192b570542" + end + + def install + ENV["GEM_HOME"] = libexec + ENV["PG_CONFIG"] = Formula["libpq"].opt_bin/"pg_config" + + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + + system "gem", "build", "pgsync.gemspec" + system "gem", "install", "--ignore-dependencies", "pgsync-#{version}.gem" + + bin.install libexec/"bin/pgsync" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + system bin/"pgsync", "--init" + assert_path_exists testpath/".pgsync.yml" + end +end diff --git a/Formula/p/pgtoolkit.rb b/Formula/p/pgtoolkit.rb new file mode 100644 index 0000000000000..7a4ccdd167890 --- /dev/null +++ b/Formula/p/pgtoolkit.rb @@ -0,0 +1,25 @@ +class Pgtoolkit < Formula + desc "Tools for PostgreSQL maintenance" + homepage "https://github.com/grayhemp/pgtoolkit" + url "https://github.com/grayhemp/pgtoolkit/archive/refs/tags/v1.0.2.tar.gz" + sha256 "d86f34c579a4c921b77f313d4c7efbf4b12695df89e6b68def92ffa0332a7351" + license "PostgreSQL" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2ff68677e0eea7a722a102fabbb166117a3e199cb010d10a65f73a2427026a71" + end + + def install + bin.install "fatpack/pgcompact" + doc.install %w[CHANGES.md LICENSE.md README.md TODO.md] + end + + test do + output = IO.popen("#{bin}/pgcompact --help") + matches = output.readlines.select { |line| line.include?("pgcompact - PostgreSQL bloat reducing tool") } + !matches.empty? + end +end diff --git a/Formula/p/pgtune.rb b/Formula/p/pgtune.rb new file mode 100644 index 0000000000000..bf0c082fdb2d8 --- /dev/null +++ b/Formula/p/pgtune.rb @@ -0,0 +1,33 @@ +class Pgtune < Formula + desc "Tuning wizard for postgresql.conf" + homepage "https://github.com/gregs1104/pgtune" + url "https://ftp.postgresql.org/pub/projects/pgFoundry/pgtune/pgtune/0.9.3/pgtune-0.9.3.tar.gz" + mirror "https://mirrorservice.org/sites/ftp.postgresql.org/projects/pgFoundry/pgtune/pgtune/0.9.3/pgtune-0.9.3.tar.gz" + sha256 "31ac5774766dd9793d8d2d3681d1edb45760897c8eda3afc48b8d59350dee0ea" + license "BSD-3-Clause" + + # 0.9.3 does not have settings for PostgreSQL 9.x, but the trunk does + head "https://github.com/gregs1104/pgtune.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "99d46ab0880d22bb3a19faf759bde25d51dd0e4c5c1890d6bf0e253a9042e09f" + end + + # pgtune is for postgresql 8.x and 9.x, and is no longer maintained. + deprecate! date: "2024-08-03", because: :unmaintained + disable! date: "2025-08-03", because: :unmaintained + + def install + # By default, pgtune searches for settings in the directory + # where the script is being run from. + inreplace "pgtune" do |s| + s.sub!(/(parser\.add_option\('-S'.*default=).*,/, "\\1\"#{pkgshare}\",") + end + bin.install "pgtune" + pkgshare.install Dir["pg_settings*"] + end + + test do + system bin/"pgtune", "--help" + end +end diff --git a/Formula/p/pgvector.rb b/Formula/p/pgvector.rb new file mode 100644 index 0000000000000..bed205256a5fd --- /dev/null +++ b/Formula/p/pgvector.rb @@ -0,0 +1,58 @@ +class Pgvector < Formula + desc "Open-source vector similarity search for Postgres" + homepage "https://github.com/pgvector/pgvector" + url "https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.1.tar.gz" + sha256 "a9094dfb85ccdde3cbb295f1086d4c71a20db1d26bf1d6c39f07a7d164033eb4" + license "PostgreSQL" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "71331f9fce25247c15fa2b8c38ff776c396bedec8f157e6a55b4a8a4df8a3bf7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "020d8b756ac7ec0fc1a3bc098585d5c51135ca16aab20ce1adf24e6c41322938" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ba83ebac1b5836c368e3b5b9409650a3a8b75afd13281066bfe9e3b66b5c6c7" + sha256 cellar: :any_skip_relocation, sonoma: "b004e0e298b7cf38af96444ab2282d577595cd982176d143fbde704d22998354" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd82274ea8b8c03b811de6db28adc8e3d313daf53b2fb3270046ce4277ed277c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37f45074367bb109411982def1e757518d7ec77f2c22a3df5544d910226b92d8" + end + + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + postgresqls.each do |postgresql| + ENV["PG_CONFIG"] = postgresql.opt_bin/"pg_config" + system "make" + system "make", "install", "pkglibdir=#{lib/postgresql.name}", + "datadir=#{share/postgresql.name}", + "pkgincludedir=#{include/postgresql.name}" + system "make", "clean" + end + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION vector;", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/pgweb.rb b/Formula/p/pgweb.rb new file mode 100644 index 0000000000000..26020a0503036 --- /dev/null +++ b/Formula/p/pgweb.rb @@ -0,0 +1,46 @@ +class Pgweb < Formula + desc "Web-based PostgreSQL database browser" + homepage "https://sosedoff.github.io/pgweb/" + url "https://github.com/sosedoff/pgweb/archive/refs/tags/v0.16.2.tar.gz" + sha256 "4120b03ee5047d8ea5bc9fd05629fb60bbdf5eca6a0e8b157fa4322ed54844ec" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f7fa72d8b2f7d3810aa0aca016ade3067b07024298659471ffb1b8f81ef98f73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "797a6578aded844b296169c74045b4735a435451bee8a6dd9bbc27b6a7955fc5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "797a6578aded844b296169c74045b4735a435451bee8a6dd9bbc27b6a7955fc5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "797a6578aded844b296169c74045b4735a435451bee8a6dd9bbc27b6a7955fc5" + sha256 cellar: :any_skip_relocation, sonoma: "619152d700dfe8d083c8575d8f26dc2b026380d0c2ea8f0b8719cac147e31c08" + sha256 cellar: :any_skip_relocation, ventura: "619152d700dfe8d083c8575d8f26dc2b026380d0c2ea8f0b8719cac147e31c08" + sha256 cellar: :any_skip_relocation, arm64_linux: "6123d2f00a1c4d13a8d7180bfb0db2dbb16ed57b979b30594924dd991e4897d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c65033295bd08ffa0c3cc4d6a30b17ae7b62b957582ef0ae9689b9c5ddae332" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/sosedoff/pgweb/pkg/command.BuildTime=#{time.iso8601} + -X github.com/sosedoff/pgweb/pkg/command.GoVersion=#{Formula["go"].version} + ].join(" ") + + system "go", "build", *std_go_args(ldflags:) + end + + test do + port = free_port + + begin + pid = fork do + exec bin/"pgweb", "--listen=#{port}", + "--skip-open", + "--sessions" + end + sleep 2 + assert_match "\"version\":\"#{version}\"", shell_output("curl http://localhost:#{port}/api/info") + ensure + Process.kill("TERM", pid) + end + end +end diff --git a/Formula/p/pgxnclient.rb b/Formula/p/pgxnclient.rb new file mode 100644 index 0000000000000..d94782f3f0d4b --- /dev/null +++ b/Formula/p/pgxnclient.rb @@ -0,0 +1,35 @@ +class Pgxnclient < Formula + include Language::Python::Virtualenv + + desc "Command-line client for the PostgreSQL Extension Network" + homepage "https://pgxn.github.io/pgxnclient/" + url "https://files.pythonhosted.org/packages/54/3d/5eae61996702ce218548a98f6ccc930a80b1e4b09b7a8384b1a95129a9c2/pgxnclient-1.3.2.tar.gz" + sha256 "b0343e044b8d0044ff4be585ecce0147b1007db7ae8b12743bf222758a4ec7d9" + license "BSD-3-Clause" + revision 2 + head "https://github.com/pgxn/pgxnclient.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "34e47292dc284c01c684578dca761037d87b54c15d33de6d2be31e3f015a0001" + end + + depends_on "python@3.14" + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + venv = virtualenv_install_with_resources + inreplace venv.site_packages/name/"__init__.py", + "/usr/local/libexec/pgxnclient", venv.site_packages/name/"libexec" + end + + test do + assert_match "pgxn", shell_output("#{bin}/pgxnclient mirror") + assert_match version.to_s, shell_output("#{bin}/pgxnclient --version") + assert_match "site-packages/#{name}/libexec", shell_output("#{bin}/pgxn help --libexec") + end +end diff --git a/Formula/p/phive.rb b/Formula/p/phive.rb new file mode 100644 index 0000000000000..4e14c6f175c92 --- /dev/null +++ b/Formula/p/phive.rb @@ -0,0 +1,21 @@ +class Phive < Formula + desc "Phar Installation and Verification Environment (PHIVE)" + homepage "https://phar.io" + url "https://github.com/phar-io/phive/releases/download/0.16.0/phive-0.16.0.phar" + sha256 "1525f25afec4bcdc0aa8db7bb4b0063851332e916698daf90c747461642a42ed" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "67aba197622d728b6cd0ebd19c76de0ac6806aeacc29d46a95d41f00dd63a6f3" + end + + depends_on "php" + + def install + bin.install "phive-#{version}.phar" => "phive" + end + + test do + assert_match "No PHARs configured for this project", shell_output("#{bin}/phive status") + end +end diff --git a/Formula/p/phodav.rb b/Formula/p/phodav.rb new file mode 100644 index 0000000000000..073533b2f2931 --- /dev/null +++ b/Formula/p/phodav.rb @@ -0,0 +1,72 @@ +class Phodav < Formula + desc "WebDav server implementation using libsoup (RFC 4918)" + homepage "https://gitlab.gnome.org/GNOME/phodav" + url "https://download.gnome.org/sources/phodav/3.0/phodav-3.0.tar.xz" + sha256 "392ec2d06d50300dcff1ef269a2a985304e29bce3520002fca29f2edc1d138d1" + license "LGPL-2.1-only" + head "https://gitlab.gnome.org/GNOME/phodav.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "af1889698345e5daa448933c6efb72cf3be9002c1e85835f72809738bed13f5a" + sha256 arm64_sequoia: "d6beac9ae63de2d6fa449ca75e45a768f2b42fbe01739a6480867a969942f111" + sha256 arm64_sonoma: "e71f34ceed2c0b5ac310099aa989f2899c3d6b8a2c135aca3898e112e737437a" + sha256 arm64_ventura: "7f62bb9ee32a97be3e81f9fa437e60de55e25ac8b33fcc3a90862616afcbd3cc" + sha256 arm64_monterey: "84935f58bd6529731b3f854f3afccb7abd495b4545fd753a0414d1352586faad" + sha256 sonoma: "19bda4a63bf2f2778e6cb01121f7965c50ac94c839e933e9637a46155315bc32" + sha256 ventura: "4645f36c79e05c30cafcefba89de8be68e8af11049ed95c11876f0555200b59a" + sha256 monterey: "6b4b21ff80701f00e1b0bad840a6364cdb4b2a69e4d26b1762a0caadd03b3deb" + sha256 arm64_linux: "7fe68e4d23624cc0deff0d327d9547fa9320761978f2a084d8e3a5beb86611ae" + sha256 x86_64_linux: "bf36f39b43b04e8d0dafba15e623f7fb0a7e8873dcd2286a1dc7d62587fa0938" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + depends_on "libsoup" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + GFile *root_dir = g_file_new_for_path("./phodav-virtual-root"); + GFile *real_dir = g_file_get_child(root_dir, "real"); + PhodavVirtualDir *root = phodav_virtual_dir_new_root(); + phodav_virtual_dir_root_set_real(root, "./phodav-virtual-root"); + PhodavVirtualDir *virtual_dir = phodav_virtual_dir_new_dir(root, "/virtual", NULL); + phodav_virtual_dir_attach_real_child(virtual_dir, real_dir); + PhodavServer *phodav = phodav_server_new_for_root_file(G_FILE(root)); + g_assert_nonnull(phodav); + g_object_unref(virtual_dir); + g_object_unref(real_dir); + g_object_unref(root_dir); + g_object_unref(root); + SoupServer *server = phodav_server_get_soup_server(phodav); + g_assert_nonnull(server); + g_object_unref(phodav); + return 0; + } + CPP + + ENV.prepend_path "PKG_CONFIG_PATH", Formula["icu4c"].lib/"pkgconfig" if OS.mac? + flags = shell_output("pkgconf --libs --cflags libphodav-3.0").chomp.split + system ENV.cc, "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/p/phoneinfoga.rb b/Formula/p/phoneinfoga.rb new file mode 100644 index 0000000000000..8a6d40d9c9b3a --- /dev/null +++ b/Formula/p/phoneinfoga.rb @@ -0,0 +1,50 @@ +class Phoneinfoga < Formula + desc "Information gathering framework for phone numbers" + homepage "https://sundowndev.github.io/phoneinfoga/" + url "https://github.com/sundowndev/phoneinfoga/archive/refs/tags/v2.11.0.tar.gz" + sha256 "adb3cf459d36c4372b5cab235506afcba24df175eca87bb36539126bb1dbf64e" + license "GPL-3.0-only" + head "https://github.com/sundowndev/phoneinfoga.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e7e2e971ea2d91fd0d388784c7435045a2d80ab6d5d91edf3fb79cfa9b65dd22" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c667724c0478647ef04487e67759737ea73957e56f04d58b8aa9eec133532bd3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b50f640dc6a718a33bf69cd1320d9c437acbfb46693dbadcc1577797ef3864ae" + sha256 cellar: :any_skip_relocation, sonoma: "52c7d81cc5346eebc4f752970bbccaa955d553baa8ea2f2b5aef454b99c173c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb9ec8e8a527a8191d00e2a6a09c6fc80f0475b6bad877331f661cf8067aa44c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d764f83d254017ec95bf389ffe2e15bdcb7f711eb641bcaf119a6938478d40d" + end + + depends_on "go" => :build + depends_on "yarn" => :build + depends_on "node" + + # Bump `node-gyp` to v10+ to avoid requiring distutils + # https://github.com/sundowndev/phoneinfoga/pull/1512 + patch do + url "https://github.com/sundowndev/phoneinfoga/commit/6a5b3cc849f989fe390170a127e22d990ba5c122.patch?full_index=1" + sha256 "07ec8c3255c2183f6f42286ae498625cd51041c27a7c44130151a772d31bfcd6" + end + + def install + cd "web/client" do + ENV["npm_config_build_from_source"] = "true" + system "yarn", "install", "--immutable" + system "yarn", "build" + end + + ldflags = %W[ + -s -w + -X github.com/sundowndev/phoneinfoga/v2/build.Version=v#{version} + -X github.com/sundowndev/phoneinfoga/v2/build.Commit=brew + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match "PhoneInfoga v#{version}-brew", shell_output("#{bin}/phoneinfoga version") + system bin/"phoneinfoga", "scanners" + assert_match "given phone number is not valid", shell_output("#{bin}/phoneinfoga scan -n foobar 2>&1", 1) + end +end diff --git a/Formula/p/phoon.rb b/Formula/p/phoon.rb new file mode 100644 index 0000000000000..4737c080c75d6 --- /dev/null +++ b/Formula/p/phoon.rb @@ -0,0 +1,50 @@ +class Phoon < Formula + desc "Displays current or specified phase of the moon via ASCII art" + homepage "https://www.acme.com/software/phoon/" + url "https://www.acme.com/software/phoon/phoon_14Aug2014.tar.gz" + version "20140814" + sha256 "bad9b5e37ccaf76a10391cc1fa4aff9654e54814be652b443853706db18ad7c1" + license "BSD-2-Clause" + version_scheme 1 + + # We check the site using HTTP (rather than HTTPS) because this server + # produces the following cURL error on our Ubuntu CI: + # curl: (56) GnuTLS recv error (-110): The TLS connection was non-properly + # terminated. + # If/when this is resolved, we can update this to use `url :homepage`. + livecheck do + url "http://www.acme.com/software/phoon/" + regex(/href=.*?phoon[._-]v?(\d{1,2}[a-z]+\d{2,4})\.t/i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| Date.parse(match.first)&.strftime("%Y%m%d") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "636b515de152863a3694ddd5cab6745302e40fc8d649cd14bcf2b1debc5c2ba6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eea7e8ab443ec3e74f55f9b0572fc1fdb041d4a484f05c523820d3c9c510d646" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b1fb75a7e0219b4f893f0ffc74791a27e82e95e127e6f8c66680b046d6f8a72" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd15d230ce1c25ac23caf064b0468fcbb779b3c0ba264410f59f3d8796c9f0c6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "16e0d7747e8d27e1d2070e9c0a977e978df8e050fcfec31ad4da2363450ac297" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ffb866ee12dee9890eb0ad36b0bc1e721bba69b631951fbeba3f2fb20a87168" + sha256 cellar: :any_skip_relocation, sonoma: "de8a63bb9fa807b81f47b3b45f042d0829c7b8d2af9651a842c0098f2fed3948" + sha256 cellar: :any_skip_relocation, ventura: "503f0d23d27f7016072550d71117f16691c827f1c9f8502bd52ec1562178be30" + sha256 cellar: :any_skip_relocation, monterey: "b4beab04ea220698a14dc6a0f104205e21f5e3b1af4846b849a1398b51c667e8" + sha256 cellar: :any_skip_relocation, big_sur: "40dc9f71c308e04063cf566ba3ba64459d781f2795d0fa4aadee860768a763ab" + sha256 cellar: :any_skip_relocation, catalina: "27ac5801ac5c5b411b587df1ec799acca76c3acd3a0a02a193a187d07ee76747" + sha256 cellar: :any_skip_relocation, arm64_linux: "751a25b30911bd21075babf88ea8311ff1059a5b93ff08cdde9fadcf50b4c2c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c14a5311b93a01cfe4857784708ae9e6397525c07b07ca34f26b58d5dddc6f93" + end + + def install + system "make" + bin.install "phoon" + man1.install "phoon.1" + end + + test do + system bin/"phoon" + end +end diff --git a/Formula/p/phoronix-test-suite.rb b/Formula/p/phoronix-test-suite.rb new file mode 100644 index 0000000000000..10fd06a2f2291 --- /dev/null +++ b/Formula/p/phoronix-test-suite.rb @@ -0,0 +1,57 @@ +class PhoronixTestSuite < Formula + desc "Open-source automated testing/benchmarking software" + homepage "https://www.phoronix-test-suite.com/" + url "https://github.com/phoronix-test-suite/phoronix-test-suite/archive/refs/tags/v10.8.4.tar.gz" + sha256 "7b5da7193c0190c648fc0c7ad6cdfbde5d935e88c7bfa5e99cd3a720cd5e2c5a" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/phoronix-test-suite/phoronix-test-suite.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "71a7a32f236bc22d0990168e1fceb1d8811748295c064741177f9bdba6f905fb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "71a7a32f236bc22d0990168e1fceb1d8811748295c064741177f9bdba6f905fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71a7a32f236bc22d0990168e1fceb1d8811748295c064741177f9bdba6f905fb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71a7a32f236bc22d0990168e1fceb1d8811748295c064741177f9bdba6f905fb" + sha256 cellar: :any_skip_relocation, sonoma: "130079ac169569c6e2c45a6a31d25ce285606cbfc4ed03ccd7b2e2488d8a162d" + sha256 cellar: :any_skip_relocation, ventura: "130079ac169569c6e2c45a6a31d25ce285606cbfc4ed03ccd7b2e2488d8a162d" + sha256 cellar: :any_skip_relocation, arm64_linux: "71a7a32f236bc22d0990168e1fceb1d8811748295c064741177f9bdba6f905fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71a7a32f236bc22d0990168e1fceb1d8811748295c064741177f9bdba6f905fb" + end + + depends_on "php" + + def install + # Use homebrew's share directory + inreplace "phoronix-test-suite", "/usr/share/phoronix-test-suite/", "#{pkgshare}/" + + ENV["DESTDIR"] = buildpath/"dest" + system "./install-sh", prefix + prefix.install (buildpath/"dest/#{prefix}").children + bash_completion.install "dest/#{prefix}/../etc/bash_completion.d/phoronix-test-suite" + end + + test do + cd pkgshare if OS.mac? + + # Work around issue directly running command on Linux CI by using spawn. + # Error is "Forked child process failed: pid ##### SIGKILL" + require "pty" + output = "" + PTY.spawn(bin/"phoronix-test-suite", "version") do |r, _w, pid| + sleep 10 + Process.kill "TERM", pid + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + assert_match version.to_s, output + end +end diff --git a/Formula/p/php-code-sniffer.rb b/Formula/p/php-code-sniffer.rb new file mode 100644 index 0000000000000..f18aacc55fc1a --- /dev/null +++ b/Formula/p/php-code-sniffer.rb @@ -0,0 +1,53 @@ +class PhpCodeSniffer < Formula + desc "Check coding standards in PHP, JavaScript and CSS" + homepage "https://github.com/PHPCSStandards/PHP_CodeSniffer" + url "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/4.0.0/phpcs.phar" + sha256 "10ceb3eeee6755c11a63daf1bd96f8d80a3102944346d4a171af75411b0b3a51" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "bce4ee5f352f48fba985123fbae7b41ee52f211abd2ddd6b07e36833d27a75da" + end + + depends_on "php" + + resource "phpcbf.phar" do + url "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/4.0.0/phpcbf.phar" + sha256 "4c7d6a6c1bd837f70cc3a9df844b01e56c6118a555134e7b44e8b797d9373b8d" + + livecheck do + formula :parent + end + end + + def install + odie "phpcbf.phar resource needs to be updated" if version != resource("phpcbf.phar").version + + bin.install "phpcs.phar" => "phpcs" + resource("phpcbf.phar").stage { bin.install "phpcbf.phar" => "phpcbf" } + end + + test do + (testpath/"test.php").write <<~PHP + + * @license BSD Licence + * @link https://brew.sh/ + */ + PHP + + assert_match "FOUND 1 ERROR", shell_output("#{bin}/phpcs --runtime-set ignore_errors_on_exit true test.php") + assert_match "1 ERROR WERE FIXED", shell_output("#{bin}/phpcbf test.php") + system bin/"phpcs", "test.php" + end +end diff --git a/Formula/p/php-cs-fixer.rb b/Formula/p/php-cs-fixer.rb new file mode 100644 index 0000000000000..9202d2c29eba4 --- /dev/null +++ b/Formula/p/php-cs-fixer.rb @@ -0,0 +1,36 @@ +class PhpCsFixer < Formula + desc "Tool to automatically fix PHP coding standards issues" + homepage "https://cs.symfony.com/" + url "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.89.1/php-cs-fixer.phar" + sha256 "a37315f2e36acc2007907b3e98a9fdc0fa3667bf06f3b6be2ae529c6540f5a66" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "088b32006ad1389d0b1d94274292c60dfed0f77ebec8f519056a978d46bd64d2" + end + + depends_on "php" + + def install + libexec.install "php-cs-fixer.phar" + + (bin/"php-cs-fixer").write <<~PHP + #!#{Formula["php"].opt_bin}/php + foo( 'homebrew rox' ); + PHP + (testpath/"correct_test.php").write <<~PHP + foo('homebrew rox'); + PHP + + system bin/"php-cs-fixer", "fix", "test.php" + assert compare_file("test.php", "correct_test.php") + end +end diff --git a/Formula/p/php-intl.rb b/Formula/p/php-intl.rb new file mode 100644 index 0000000000000..27c9e7e101c13 --- /dev/null +++ b/Formula/p/php-intl.rb @@ -0,0 +1,65 @@ +class PhpIntl < Formula + desc "PHP internationalization extension" + homepage "https://www.php.net/manual/en/book.intl.php" + url "https://www.php.net/distributions/php-8.4.14.tar.xz" + mirror "https://fossies.org/linux/www/php-8.4.14.tar.xz" + sha256 "bac90ee7cf738e814c89b6b27d4d2c4b70e50942a420837e1a22f5fd5f9867a3" + license "PHP-3.01" + head "https://github.com/php/php-src.git", branch: "master" + + livecheck do + formula "php" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "09f4c2e892fe872c144972625e7fefd09939214514eafec9edfda569f5f60846" + sha256 cellar: :any, arm64_sequoia: "cb523e23e9d373ee4b4a69aaef32b945cf5bb17f0c1a94ec19981e819d22c841" + sha256 cellar: :any, arm64_sonoma: "8901b913e74a06569a7f841c20185e8f89f713ad3719ee960bc1d3917e165bd1" + sha256 cellar: :any, sonoma: "3efa5c95b6ba9ab6ea62b6e05cf3e503e1a63f6960bfa45f658cea3099ecd9d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a3e31797fdfd258f11d9a3dd2202fa597ee418fdbe44c9d3e7ad835a7c39030" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc8243c435f6e71cd0450e4ecdab30093a436e99e04bf3ea8e741a746adb28af" + end + + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "php" + + def php + # Always use matching PHP version + Formula[name.sub("-intl", "")] + end + + def install + # Keep aligned with PHP formula + extension_dir = Utils.safe_popen_read(php.bin/"php-config", "--extension-dir").chomp + extension_dir = lib/"php/pecl"/File.basename(extension_dir) + + cd "ext/intl" do + system "phpize" + system "./configure" + system "make" + system "make", "install", "EXTENSION_DIR=#{extension_dir}" + end + rm(%w[NEWS README.md]) + + # Automatically load extension on install and unload on uninstall or unlink + (prefix/"etc/php/#{version.major_minor}/conf.d/ext-intl.ini").write <<~INI + [intl] + extension="#{extension_dir}/intl.so" + INI + end + + test do + (testpath/"test.php").write <<~PHP + format(1234567), PHP_EOL; + + $formatter = new MessageFormatter('de_DE', '{0,number,#,###.##} MB'); + echo $formatter->format([12345.6789]); + ?> + PHP + assert_equal "1,234,567\n12.345,68 MB", shell_output("#{php.bin}/php test.php") + assert_match "intl", shell_output("#{php.bin}/php -m") + end +end diff --git a/Formula/p/php.rb b/Formula/p/php.rb new file mode 100644 index 0000000000000..a2d507be2bf8f --- /dev/null +++ b/Formula/p/php.rb @@ -0,0 +1,422 @@ +class Php < Formula + desc "General-purpose scripting language" + homepage "https://www.php.net/" + # Should only be updated if the new version is announced on the homepage, https://www.php.net/ + url "https://www.php.net/distributions/php-8.4.14.tar.xz" + mirror "https://fossies.org/linux/www/php-8.4.14.tar.xz" + sha256 "bac90ee7cf738e814c89b6b27d4d2c4b70e50942a420837e1a22f5fd5f9867a3" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads?source=Y" + regex(/href=.*?php[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "dee2519201495b54f11ca262060f660c1027b68df619e3edb534e725248617e3" + sha256 arm64_sequoia: "b20f0fd40dc7ddd4f54bec06f83ff68924dc14c4c2bb6d770f50c9d059299d6e" + sha256 arm64_sonoma: "72fdaa80d385c7870266d42f2517f57d6f0b5c6c64b0c85c2ed98777a525f175" + sha256 sonoma: "1c89f113cf7f46eacdd4dedaba557fff4d7dfa1f640f219d93de394ce2235af5" + sha256 arm64_linux: "a8694324060cf31ac6e0cf2b71891c275fd52b37545ab7f46bc679ab5f23a401" + sha256 x86_64_linux: "d7b180836d8035a85b7681b59ed3ecb971a7071fb38c3e79fb790485b1437a9b" + end + + head do + url "https://github.com/php/php-src.git", branch: "master" + + depends_on "bison" => :build # bison >= 3.0.0 required to generate parsers + depends_on "re2c" => :build # required to generate PHP lexers + end + + depends_on "httpd" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "argon2" + depends_on "autoconf" + depends_on "curl" + depends_on "freetds" + depends_on "gd" + depends_on "gmp" + depends_on "libpq" + depends_on "libsodium" + depends_on "libzip" + depends_on "net-snmp" + depends_on "oniguruma" + depends_on "openldap" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + depends_on "tidy-html5" + depends_on "unixodbc" + + uses_from_macos "xz" => :build + uses_from_macos "bzip2" + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_macos do + depends_on "gcc" => :build # must never be a runtime dependency + depends_on "gettext" + end + + # https://github.com/Homebrew/homebrew-core/issues/235820 + # https://clang.llvm.org/docs/UsersManual.html#gcc-extensions-not-implemented-yet + fails_with :clang do + cause "Performs worse due to lack of general global register variables" + end + + def install + system "./buildconf", "--force" if build.head? + + inreplace "configure" do |s| + s.gsub! "$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1", + "false" + s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'$($APXS -q LIBEXECDIR)", + "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" + s.gsub! "-z $($APXS -q SYSCONFDIR)", + "-z ''" + end + + # Update error message in apache sapi to better explain the requirements + # of using Apache http in combination with php if the non-compatible MPM + # has been selected. Homebrew has chosen not to support being able to + # compile a thread safe version of PHP and therefore it is not + # possible to recompile as suggested in the original message + inreplace "sapi/apache2handler/sapi_apache2.c", + "You need to recompile PHP.", + "Homebrew PHP does not support a thread-safe php binary. " \ + "To use the PHP apache sapi please change " \ + "your httpd config to use the prefork MPM" + + inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" + + config_path = etc/"php/#{version.major_minor}" + # Prevent system pear config from inhibiting pear install + (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? + + # Prevent homebrew from hardcoding path to sed shim in phpize script + ENV["lt_cv_path_SED"] = "sed" + + # Identify build provider in php -v output and phpinfo() + ENV["PHP_BUILD_PROVIDER"] = tap.user + + if OS.mac? + ENV["SASL_CFLAGS"] = "-I#{MacOS.sdk_path_if_needed}/usr/include/sasl" + ENV["SASL_LIBS"] = "-lsasl2" + else + ENV["SQLITE_CFLAGS"] = "-I#{Formula["sqlite"].opt_include}" + ENV["SQLITE_LIBS"] = "-lsqlite3" + ENV["BZIP_DIR"] = Formula["bzip2"].opt_prefix + end + + # Each extension that is built on Mojave needs a direct reference to the + # sdk path or it won't find the headers + headers_path = "=#{MacOS.sdk_path_if_needed}/usr" if OS.mac? + + # `_www` only exists on macOS. + fpm_user = OS.mac? ? "_www" : "www-data" + fpm_group = OS.mac? ? "_www" : "www-data" + + args = %W[ + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{config_path} + --with-config-file-path=#{config_path} + --with-config-file-scan-dir=#{config_path}/conf.d + --with-pear=#{pkgshare}/pear + --disable-intl + --enable-bcmath + --enable-calendar + --enable-dba + --enable-exif + --enable-ftp + --enable-fpm + --enable-gd + --enable-mbregex + --enable-mbstring + --enable-mysqlnd + --enable-pcntl + --enable-phpdbg + --enable-phpdbg-readline + --enable-shmop + --enable-soap + --enable-sockets + --enable-sysvmsg + --enable-sysvsem + --enable-sysvshm + --with-apxs2=#{Formula["httpd"].opt_bin}/apxs + --with-bz2#{headers_path} + --with-curl + --with-external-gd + --with-external-pcre + --with-ffi + --with-fpm-user=#{fpm_user} + --with-fpm-group=#{fpm_group} + --with-gettext=#{Formula["gettext"].opt_prefix} + --with-gmp=#{Formula["gmp"].opt_prefix} + --with-iconv#{headers_path} + --with-layout=GNU + --with-ldap=#{Formula["openldap"].opt_prefix} + --with-libxml + --with-libedit + --with-mhash#{headers_path} + --with-mysql-sock=/tmp/mysql.sock + --with-mysqli=mysqlnd + --with-ndbm#{headers_path} + --with-openssl + --with-password-argon2=#{Formula["argon2"].opt_prefix} + --with-pdo-dblib=#{Formula["freetds"].opt_prefix} + --with-pdo-mysql=mysqlnd + --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} + --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} + --with-pdo-sqlite + --with-pgsql=#{Formula["libpq"].opt_prefix} + --with-pic + --with-snmp=#{Formula["net-snmp"].opt_prefix} + --with-sodium + --with-sqlite3 + --with-tidy=#{Formula["tidy-html5"].opt_prefix} + --with-unixODBC + --with-xsl + --with-zip + --with-zlib + ] + + if OS.mac? + args << "--enable-dtrace" + args << "--with-ldap-sasl" + else + args << "--disable-dtrace" + args << "--without-ldap-sasl" + args << "--without-ndbm" + args << "--without-gdbm" + end + + system "./configure", *args + system "make" + system "make", "install" + + # Allow pecl to install outside of Cellar + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + orig_ext_dir = File.basename(extension_dir) + inreplace bin/"php-config", lib/"php", prefix/"pecl" + + openssl = Formula["openssl@3"] + %w[development production].each do |mode| + inreplace "php.ini-#{mode}" do |s| + # Allow pecl to install outside of Cellar + s.gsub! %r{; ?extension_dir = "\./"}, "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" + + # Use OpenSSL cert bundle + s.gsub!(/; ?openssl\.cafile=/, "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"") + s.gsub!(/; ?openssl\.capath=/, "openssl.capath = \"#{openssl.pkgetc}/certs\"") + end + end + + config_files = { + "php.ini-development" => "php.ini", + "php.ini-production" => "php.ini-production", + "sapi/fpm/php-fpm.conf" => "php-fpm.conf", + "sapi/fpm/www.conf" => "php-fpm.d/www.conf", + } + config_files.each_value do |dst| + dst_default = config_path/"#{dst}.default" + rm dst_default if dst_default.exist? + end + config_path.install config_files + + unless (var/"log/php-fpm.log").exist? + (var/"log").mkpath + touch var/"log/php-fpm.log" + end + end + + def post_install + pear_prefix = pkgshare/"pear" + pear_files = %W[ + #{pear_prefix}/.depdblock + #{pear_prefix}/.filemap + #{pear_prefix}/.depdb + #{pear_prefix}/.lock + ] + + %W[ + #{pear_prefix}/.channels + #{pear_prefix}/.channels/.alias + ].each do |f| + chmod 0755, f + pear_files.concat(Dir["#{f}/*"]) + end + + chmod 0644, pear_files + + # Custom location for extensions installed via pecl + pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" + pecl_path.mkpath + ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + php_basename = File.basename(extension_dir) + php_ext_dir = opt_prefix/"lib/php"/php_basename + (pecl_path/php_basename).mkpath + + # fix pear config to install outside cellar + pear_path = HOMEBREW_PREFIX/"share/pear" + cp_r pkgshare/"pear/.", pear_path + { + "php_ini" => etc/"php/#{version.major_minor}/php.ini", + "php_dir" => pear_path, + "doc_dir" => pear_path/"doc", + "ext_dir" => pecl_path/php_basename, + "bin_dir" => opt_bin, + "data_dir" => pear_path/"data", + "cfg_dir" => pear_path/"cfg", + "www_dir" => pear_path/"htdocs", + "man_dir" => HOMEBREW_PREFIX/"share/man", + "test_dir" => pear_path/"test", + "php_bin" => opt_bin/"php", + }.each do |key, value| + value.mkpath if /(? + SetHandler application/x-httpd-php + + + Finally, check DirectoryIndex includes index.php + DirectoryIndex index.php index.html + + The php.ini and php-fpm.ini file can be found in: + #{etc}/php/#{version.major_minor}/ + EOS + end + + service do + run [opt_sbin/"php-fpm", "--nodaemonize"] + run_type :immediate + keep_alive true + error_log_path var/"log/php-fpm.log" + working_dir var + end + + test do + assert_match(/^Zend OPcache$/, shell_output("#{bin}/php -i"), + "Zend OPCache extension not loaded") + # Test related to libxml2 and + # https://github.com/Homebrew/homebrew-core/issues/28398 + assert_includes (bin/"php").dynamically_linked_libraries, + (Formula["libpq"].opt_lib/shared_library("libpq", 5)).to_s + + system "#{sbin}/php-fpm", "-t" + system bin/"phpdbg", "-V" + system bin/"php-cgi", "-m" + + begin + port = free_port + port_fpm = free_port + + expected_output = /^Hello world!$/ + (testpath/"index.php").write <<~PHP + get('sysDescr.0')); + PHP + main_config = <<~EOS + Listen #{port} + ServerName localhost:#{port} + DocumentRoot "#{testpath}" + ErrorLog "#{testpath}/httpd-error.log" + ServerRoot "#{Formula["httpd"].opt_prefix}" + PidFile "#{testpath}/httpd.pid" + LoadModule authz_core_module lib/httpd/modules/mod_authz_core.so + LoadModule unixd_module lib/httpd/modules/mod_unixd.so + LoadModule dir_module lib/httpd/modules/mod_dir.so + DirectoryIndex index.php + EOS + + (testpath/"httpd.conf").write <<~EOS + #{main_config} + LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so + LoadModule php_module #{lib}/httpd/modules/libphp.so + + SetHandler application/x-httpd-php + + EOS + + (testpath/"fpm.conf").write <<~INI + [global] + daemonize=no + [www] + listen = 127.0.0.1:#{port_fpm} + pm = dynamic + pm.max_children = 5 + pm.start_servers = 2 + pm.min_spare_servers = 1 + pm.max_spare_servers = 3 + INI + + (testpath/"httpd-fpm.conf").write <<~EOS + #{main_config} + LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so + LoadModule proxy_module lib/httpd/modules/mod_proxy.so + LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so + + SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" + + EOS + + pid = spawn Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" + sleep 10 + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + + Process.kill("TERM", pid) + Process.wait(pid) + + fpm_pid = spawn sbin/"php-fpm", "-y", "fpm.conf" + pid = spawn Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" + sleep 10 + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + ensure + if pid + Process.kill("TERM", pid) + Process.wait(pid) + end + if fpm_pid + Process.kill("TERM", fpm_pid) + Process.wait(fpm_pid) + end + end + end +end diff --git a/Formula/p/php@8.1.rb b/Formula/p/php@8.1.rb new file mode 100644 index 0000000000000..38b16c3fb8d45 --- /dev/null +++ b/Formula/p/php@8.1.rb @@ -0,0 +1,490 @@ +class PhpAT81 < Formula + desc "General-purpose scripting language" + homepage "https://www.php.net/" + # Should only be updated if the new version is announced on the homepage, https://www.php.net/ + url "https://www.php.net/distributions/php-8.1.33.tar.xz" + mirror "https://fossies.org/linux/www/php-8.1.33.tar.xz" + sha256 "9db83bf4590375562bc1a10b353cccbcf9fcfc56c58b7c8fb814e6865bb928d1" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads?source=Y" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "bf9688c31972f1fa60eec419bb1204cc93376aeba7214e4a1fdcbb85ff436680" + sha256 arm64_sequoia: "6f6ae35e142a4b11928a612d7ca9be6ab21cbb723b0b24103c6a97ac04cec63a" + sha256 arm64_sonoma: "c93f40c5f4251bfcc25acf44c5daded51b377c532becd392cc04175b9347c4a1" + sha256 arm64_ventura: "a9ac9cf22d5790294b9f43f77efcfabaa38ec606c014f3ac7e0a898afc54656f" + sha256 sonoma: "25d08116e45de0c890d2b90fa1db8cdab2f538195210ef0003a27cfac654c231" + sha256 ventura: "f33c39baedaa58170154efb36412d1de296e1c1e495151fded3b43ea2e909e4a" + sha256 arm64_linux: "2ef104da5efe7cc6243d7ee81deef7d303c77025779ce26e9de734dfd8692cbd" + sha256 x86_64_linux: "5a0b62e7c363091df2d0ac72360003531dbdc2ca4ddd0ded9b5250150ed4fbed" + end + + keg_only :versioned_formula + + # Security Support Until 31 Dec 2025 + # https://www.php.net/supported-versions.php + deprecate! date: "2025-12-31", because: :unsupported + + depends_on "httpd" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "argon2" + depends_on "aspell" + depends_on "autoconf" + depends_on "curl" + depends_on "freetds" + depends_on "gd" + depends_on "gettext" + depends_on "gmp" + depends_on "icu4c@77" + depends_on "krb5" + depends_on "libpq" + depends_on "libsodium" + depends_on "libzip" + depends_on "oniguruma" + depends_on "openldap" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + depends_on "tidy-html5" + depends_on "unixodbc" + + uses_from_macos "xz" => :build + uses_from_macos "bzip2" + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_macos do + # PHP build system incorrectly links system libraries + # see https://github.com/php/php-src/issues/10680 + patch :DATA + end + + def install + # Backport fix for libxml2 >= 2.13 + # Ref: https://github.com/php/php-src/commit/67259e451d5d58b4842776c5696a66d74e157609 + inreplace "ext/xml/compat.c", + "!= XML_PARSER_ENTITY_VALUE && parser->parser->instate != XML_PARSER_ATTRIBUTE_VALUE)", + "== XML_PARSER_CONTENT)" + + # Work around to support `icu4c` 75, which needs C++17. + # Can remove if upstream backports support into PHP 8.1 + ENV["ICU_CXXFLAGS"] = "-std=c++17" + + # buildconf required due to system library linking bug patch + system "./buildconf", "--force" + + inreplace "configure" do |s| + s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`", + "APACHE_THREADED_MPM=" + s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", + "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" + s.gsub! "-z `$APXS -q SYSCONFDIR`", + "-z ''" + + # apxs will interpolate the @ in the versioned prefix: https://bz.apache.org/bugzilla/show_bug.cgi?id=61944 + s.gsub! "LIBEXECDIR='$APXS_LIBEXECDIR'", + "LIBEXECDIR='" + "#{lib}/httpd/modules".gsub("\\", "\\\\").gsub("@", "\\@") + "'" + end + + # Update error message in apache sapi to better explain the requirements + # of using Apache http in combination with php if the non-compatible MPM + # has been selected. Homebrew has chosen not to support being able to + # compile a thread safe version of PHP and therefore it is not + # possible to recompile as suggested in the original message + inreplace "sapi/apache2handler/sapi_apache2.c", + "You need to recompile PHP.", + "Homebrew PHP does not support a thread-safe php binary. " \ + "To use the PHP apache sapi please change " \ + "your httpd config to use the prefork MPM" + + inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" + + config_path = etc/"php/#{version.major_minor}" + # Prevent system pear config from inhibiting pear install + (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? + + # Prevent homebrew from hardcoding path to sed shim in phpize script + ENV["lt_cv_path_SED"] = "sed" + + # Identify build provider in phpinfo() + ENV["PHP_BUILD_PROVIDER"] = tap.user + + # system pkg-config missing + ENV["KERBEROS_CFLAGS"] = " " + if OS.mac? + ENV["SASL_CFLAGS"] = "-I#{MacOS.sdk_path_if_needed}/usr/include/sasl" + ENV["SASL_LIBS"] = "-lsasl2" + else + ENV["SQLITE_CFLAGS"] = "-I#{Formula["sqlite"].opt_include}" + ENV["SQLITE_LIBS"] = "-lsqlite3" + ENV["BZIP_DIR"] = Formula["bzip2"].opt_prefix + end + + # Each extension that is built on Mojave needs a direct reference to the + # sdk path or it won't find the headers + headers_path = "=#{MacOS.sdk_path_if_needed}/usr" if OS.mac? + + # `_www` only exists on macOS. + fpm_user = OS.mac? ? "_www" : "www-data" + fpm_group = OS.mac? ? "_www" : "www-data" + + args = %W[ + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{config_path} + --with-config-file-path=#{config_path} + --with-config-file-scan-dir=#{config_path}/conf.d + --with-pear=#{pkgshare}/pear + --enable-bcmath + --enable-calendar + --enable-dba + --enable-exif + --enable-ftp + --enable-fpm + --enable-gd + --enable-intl + --enable-mbregex + --enable-mbstring + --enable-mysqlnd + --enable-pcntl + --enable-phpdbg + --enable-phpdbg-readline + --enable-shmop + --enable-soap + --enable-sockets + --enable-sysvmsg + --enable-sysvsem + --enable-sysvshm + --with-apxs2=#{Formula["httpd"].opt_bin}/apxs + --with-bz2#{headers_path} + --with-curl + --with-external-gd + --with-external-pcre + --with-ffi + --with-fpm-user=#{fpm_user} + --with-fpm-group=#{fpm_group} + --with-gettext=#{Formula["gettext"].opt_prefix} + --with-gmp=#{Formula["gmp"].opt_prefix} + --with-iconv#{headers_path} + --with-kerberos + --with-layout=GNU + --with-ldap=#{Formula["openldap"].opt_prefix} + --with-libxml + --with-libedit + --with-mhash#{headers_path} + --with-mysql-sock=/tmp/mysql.sock + --with-mysqli=mysqlnd + --with-ndbm#{headers_path} + --with-openssl + --with-password-argon2=#{Formula["argon2"].opt_prefix} + --with-pdo-dblib=#{Formula["freetds"].opt_prefix} + --with-pdo-mysql=mysqlnd + --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} + --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} + --with-pdo-sqlite + --with-pgsql=#{Formula["libpq"].opt_prefix} + --with-pic + --with-pspell=#{Formula["aspell"].opt_prefix} + --with-sodium + --with-sqlite3 + --with-tidy=#{Formula["tidy-html5"].opt_prefix} + --with-unixODBC + --with-xsl + --with-zip + --with-zlib + ] + + if OS.mac? + args << "--enable-dtrace" + args << "--with-ldap-sasl" + args << "--with-os-sdkpath=#{MacOS.sdk_path_if_needed}" + else + args << "--disable-dtrace" + args << "--without-ldap-sasl" + args << "--without-ndbm" + args << "--without-gdbm" + end + + system "./configure", *args + system "make" + system "make", "install" + + # Allow pecl to install outside of Cellar + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + orig_ext_dir = File.basename(extension_dir) + inreplace bin/"php-config", lib/"php", prefix/"pecl" + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", %r{; ?extension_dir = "\./"}, + "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" + end + + # Use OpenSSL cert bundle + openssl = Formula["openssl@3"] + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", /; ?openssl\.cafile=/, + "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" + inreplace "php.ini-#{mode}", /; ?openssl\.capath=/, + "openssl.capath = \"#{openssl.pkgetc}/certs\"" + end + + config_files = { + "php.ini-development" => "php.ini", + "php.ini-production" => "php.ini-production", + "sapi/fpm/php-fpm.conf" => "php-fpm.conf", + "sapi/fpm/www.conf" => "php-fpm.d/www.conf", + } + config_files.each_value do |dst| + dst_default = config_path/"#{dst}.default" + rm dst_default if dst_default.exist? + end + config_path.install config_files + + unless (var/"log/php-fpm.log").exist? + (var/"log").mkpath + touch var/"log/php-fpm.log" + end + end + + def post_install + pear_prefix = pkgshare/"pear" + pear_files = %W[ + #{pear_prefix}/.depdblock + #{pear_prefix}/.filemap + #{pear_prefix}/.depdb + #{pear_prefix}/.lock + ] + + %W[ + #{pear_prefix}/.channels + #{pear_prefix}/.channels/.alias + ].each do |f| + chmod 0755, f + pear_files.concat(Dir["#{f}/*"]) + end + + chmod 0644, pear_files + + # Custom location for extensions installed via pecl + pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" + pecl_path.mkpath + ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + php_basename = File.basename(extension_dir) + php_ext_dir = opt_prefix/"lib/php"/php_basename + + # fix pear config to install outside cellar + pear_path = HOMEBREW_PREFIX/"share/pear@#{version.major_minor}" + cp_r pkgshare/"pear/.", pear_path + { + "php_ini" => etc/"php/#{version.major_minor}/php.ini", + "php_dir" => pear_path, + "doc_dir" => pear_path/"doc", + "ext_dir" => pecl_path/php_basename, + "bin_dir" => opt_bin, + "data_dir" => pear_path/"data", + "cfg_dir" => pear_path/"cfg", + "www_dir" => pear_path/"htdocs", + "man_dir" => HOMEBREW_PREFIX/"share/man", + "test_dir" => pear_path/"test", + "php_bin" => opt_bin/"php", + }.each do |key, value| + value.mkpath if /(? + SetHandler application/x-httpd-php + + + Finally, check DirectoryIndex includes index.php + DirectoryIndex index.php index.html + + The php.ini and php-fpm.ini file can be found in: + #{etc}/php/#{version.major_minor}/ + EOS + end + + service do + run [opt_sbin/"php-fpm", "--nodaemonize"] + run_type :immediate + keep_alive true + error_log_path var/"log/php-fpm.log" + working_dir var + end + + test do + assert_match(/^Zend OPcache$/, shell_output("#{bin}/php -i"), + "Zend OPCache extension not loaded") + # Test related to libxml2 and + # https://github.com/Homebrew/homebrew-core/issues/28398 + assert_includes (bin/"php").dynamically_linked_libraries, + (Formula["libpq"].opt_lib/shared_library("libpq", 5)).to_s + + system sbin/"php-fpm", "-t" + system bin/"phpdbg", "-V" + system bin/"php-cgi", "-m" + # Prevent SNMP extension to be added + refute_match(/^snmp$/, shell_output("#{bin}/php -m"), + "SNMP extension doesn't work reliably with Homebrew on High Sierra") + begin + port = free_port + port_fpm = free_port + + expected_output = /^Hello world!$/ + (testpath/"index.php").write <<~PHP + + SetHandler application/x-httpd-php + + EOS + + (testpath/"fpm.conf").write <<~EOS + [global] + daemonize=no + [www] + listen = 127.0.0.1:#{port_fpm} + pm = dynamic + pm.max_children = 5 + pm.start_servers = 2 + pm.min_spare_servers = 1 + pm.max_spare_servers = 3 + EOS + + (testpath/"httpd-fpm.conf").write <<~EOS + #{main_config} + LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so + LoadModule proxy_module lib/httpd/modules/mod_proxy.so + LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so + + SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" + + EOS + + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + + Process.kill("TERM", pid) + Process.wait(pid) + + fpm_pid = fork do + exec sbin/"php-fpm", "-y", "fpm.conf" + end + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + ensure + if pid + Process.kill("TERM", pid) + Process.wait(pid) + end + if fpm_pid + Process.kill("TERM", fpm_pid) + Process.wait(fpm_pid) + end + end + end +end + +__END__ +diff --git a/build/php.m4 b/build/php.m4 +index 3624a33a8e..d17a635c2c 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -425,7 +425,7 @@ dnl + dnl Adds a path to linkpath/runpath (LDFLAGS). + dnl + AC_DEFUN([PHP_ADD_LIBPATH],[ +- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then + PHP_EXPAND_PATH($1, ai_p) + ifelse([$2],,[ + _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) +@@ -470,7 +470,7 @@ dnl + dnl Add an include path. If before is 1, add in the beginning of INCLUDES. + dnl + AC_DEFUN([PHP_ADD_INCLUDE],[ +- if test "$1" != "/usr/include"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/include"; then + PHP_EXPAND_PATH($1, ai_p) + PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ + if test "$2"; then +diff --git a/configure.ac b/configure.ac +index 36c6e5e3e2..71b1a16607 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -190,6 +190,14 @@ PHP_ARG_WITH([libdir], + [lib], + [no]) + ++dnl Support systems with system libraries/includes in e.g. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk. ++PHP_ARG_WITH([os-sdkpath], ++ [for system SDK directory], ++ [AS_HELP_STRING([--with-os-sdkpath=NAME], ++ [Ignore system libraries and includes in NAME rather than /])], ++ [], ++ [no]) ++ + PHP_ARG_ENABLE([rpath], + [whether to enable runpaths], + [AS_HELP_STRING([--disable-rpath], diff --git a/Formula/p/php@8.2.rb b/Formula/p/php@8.2.rb new file mode 100644 index 0000000000000..926559df8328b --- /dev/null +++ b/Formula/p/php@8.2.rb @@ -0,0 +1,480 @@ +class PhpAT82 < Formula + desc "General-purpose scripting language" + homepage "https://www.php.net/" + # Should only be updated if the new version is announced on the homepage, https://www.php.net/ + url "https://www.php.net/distributions/php-8.2.29.tar.xz" + mirror "https://fossies.org/linux/www/php-8.2.29.tar.xz" + sha256 "475f991afd2d5b901fb410be407d929bc00c46285d3f439a02c59e8b6fe3589c" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads?source=Y" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "5f9b6752e46dd806b61c583840091e66477fe7520306e6ee21e054200d2c2c4a" + sha256 arm64_sequoia: "7576aec65c4ac7ab192e487e3942ce2e769db1b52da0d9a620f22f0cbe70af6d" + sha256 arm64_sonoma: "e12c26df9115adb17c624e6284cc95a83cdd0306d3e9facf5ef54aa8162ee91b" + sha256 arm64_ventura: "302ac8f571039ceac4bbd0c6785067d27a2974dd785c9ea0c62cad52af9b00c5" + sha256 sonoma: "bd8d3246d0af397358434dfbe6c7befec15a21626c20b1b468ad15d9d3695996" + sha256 ventura: "0322eb8c8d9e10ef6e118a9bc0cd71b83b5264edfe95fb754422e6ae6dbca30a" + sha256 arm64_linux: "210b1f02cddfce250b0f4566a36b2b7221a2f82dbd666ca3135330797bee777e" + sha256 x86_64_linux: "eab0f89ecce0f230609c0ea10c0164a227170e375735aaec8607cdc2fab9b68c" + end + + keg_only :versioned_formula + + # Security Support Until 31 Dec 2026 + # https://www.php.net/supported-versions.php + deprecate! date: "2026-12-31", because: :unsupported + + depends_on "httpd" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "argon2" + depends_on "aspell" + depends_on "autoconf" + depends_on "curl" + depends_on "freetds" + depends_on "gd" + depends_on "gettext" + depends_on "gmp" + depends_on "icu4c@77" + depends_on "krb5" + depends_on "libpq" + depends_on "libsodium" + depends_on "libzip" + depends_on "oniguruma" + depends_on "openldap" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + depends_on "tidy-html5" + depends_on "unixodbc" + + uses_from_macos "xz" => :build + uses_from_macos "bzip2" + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_macos do + # PHP build system incorrectly links system libraries + # see https://github.com/php/php-src/issues/10680 + patch :DATA + end + + def install + # buildconf required due to system library linking bug patch + system "./buildconf", "--force" + + inreplace "configure" do |s| + s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`", + "APACHE_THREADED_MPM=" + s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", + "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" + s.gsub! "-z `$APXS -q SYSCONFDIR`", + "-z ''" + + # apxs will interpolate the @ in the versioned prefix: https://bz.apache.org/bugzilla/show_bug.cgi?id=61944 + s.gsub! "LIBEXECDIR='$APXS_LIBEXECDIR'", + "LIBEXECDIR='" + "#{lib}/httpd/modules".gsub("\\", "\\\\").gsub("@", "\\@") + "'" + end + + # Update error message in apache sapi to better explain the requirements + # of using Apache http in combination with php if the non-compatible MPM + # has been selected. Homebrew has chosen not to support being able to + # compile a thread safe version of PHP and therefore it is not + # possible to recompile as suggested in the original message + inreplace "sapi/apache2handler/sapi_apache2.c", + "You need to recompile PHP.", + "Homebrew PHP does not support a thread-safe php binary. " \ + "To use the PHP apache sapi please change " \ + "your httpd config to use the prefork MPM" + + inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" + + config_path = etc/"php/#{version.major_minor}" + # Prevent system pear config from inhibiting pear install + (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? + + # Prevent homebrew from hardcoding path to sed shim in phpize script + ENV["lt_cv_path_SED"] = "sed" + + # Identify build provider in phpinfo() + ENV["PHP_BUILD_PROVIDER"] = tap.user + + # system pkg-config missing + ENV["KERBEROS_CFLAGS"] = " " + if OS.mac? + ENV["SASL_CFLAGS"] = "-I#{MacOS.sdk_path_if_needed}/usr/include/sasl" + ENV["SASL_LIBS"] = "-lsasl2" + else + ENV["SQLITE_CFLAGS"] = "-I#{Formula["sqlite"].opt_include}" + ENV["SQLITE_LIBS"] = "-lsqlite3" + ENV["BZIP_DIR"] = Formula["bzip2"].opt_prefix + end + + # Each extension that is built on Mojave needs a direct reference to the + # sdk path or it won't find the headers + headers_path = "=#{MacOS.sdk_path_if_needed}/usr" if OS.mac? + + # `_www` only exists on macOS. + fpm_user = OS.mac? ? "_www" : "www-data" + fpm_group = OS.mac? ? "_www" : "www-data" + + args = %W[ + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{config_path} + --with-config-file-path=#{config_path} + --with-config-file-scan-dir=#{config_path}/conf.d + --with-pear=#{pkgshare}/pear + --enable-bcmath + --enable-calendar + --enable-dba + --enable-exif + --enable-ftp + --enable-fpm + --enable-gd + --enable-intl + --enable-mbregex + --enable-mbstring + --enable-mysqlnd + --enable-pcntl + --enable-phpdbg + --enable-phpdbg-readline + --enable-shmop + --enable-soap + --enable-sockets + --enable-sysvmsg + --enable-sysvsem + --enable-sysvshm + --with-apxs2=#{Formula["httpd"].opt_bin}/apxs + --with-bz2#{headers_path} + --with-curl + --with-external-gd + --with-external-pcre + --with-ffi + --with-fpm-user=#{fpm_user} + --with-fpm-group=#{fpm_group} + --with-gettext=#{Formula["gettext"].opt_prefix} + --with-gmp=#{Formula["gmp"].opt_prefix} + --with-iconv#{headers_path} + --with-kerberos + --with-layout=GNU + --with-ldap=#{Formula["openldap"].opt_prefix} + --with-libxml + --with-libedit + --with-mhash#{headers_path} + --with-mysql-sock=/tmp/mysql.sock + --with-mysqli=mysqlnd + --with-ndbm#{headers_path} + --with-openssl + --with-password-argon2=#{Formula["argon2"].opt_prefix} + --with-pdo-dblib=#{Formula["freetds"].opt_prefix} + --with-pdo-mysql=mysqlnd + --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} + --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} + --with-pdo-sqlite + --with-pgsql=#{Formula["libpq"].opt_prefix} + --with-pic + --with-pspell=#{Formula["aspell"].opt_prefix} + --with-sodium + --with-sqlite3 + --with-tidy=#{Formula["tidy-html5"].opt_prefix} + --with-unixODBC + --with-xsl + --with-zip + --with-zlib + ] + + if OS.mac? + args << "--enable-dtrace" + args << "--with-ldap-sasl" + args << "--with-os-sdkpath=#{MacOS.sdk_path_if_needed}" + else + args << "--disable-dtrace" + args << "--without-ldap-sasl" + args << "--without-ndbm" + args << "--without-gdbm" + end + + system "./configure", *args + system "make" + system "make", "install" + + # Allow pecl to install outside of Cellar + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + orig_ext_dir = File.basename(extension_dir) + inreplace bin/"php-config", lib/"php", prefix/"pecl" + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", %r{; ?extension_dir = "\./"}, + "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" + end + + # Use OpenSSL cert bundle + openssl = Formula["openssl@3"] + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", /; ?openssl\.cafile=/, + "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" + inreplace "php.ini-#{mode}", /; ?openssl\.capath=/, + "openssl.capath = \"#{openssl.pkgetc}/certs\"" + end + + config_files = { + "php.ini-development" => "php.ini", + "php.ini-production" => "php.ini-production", + "sapi/fpm/php-fpm.conf" => "php-fpm.conf", + "sapi/fpm/www.conf" => "php-fpm.d/www.conf", + } + config_files.each_value do |dst| + dst_default = config_path/"#{dst}.default" + rm dst_default if dst_default.exist? + end + config_path.install config_files + + unless (var/"log/php-fpm.log").exist? + (var/"log").mkpath + touch var/"log/php-fpm.log" + end + end + + def post_install + pear_prefix = pkgshare/"pear" + pear_files = %W[ + #{pear_prefix}/.depdblock + #{pear_prefix}/.filemap + #{pear_prefix}/.depdb + #{pear_prefix}/.lock + ] + + %W[ + #{pear_prefix}/.channels + #{pear_prefix}/.channels/.alias + ].each do |f| + chmod 0755, f + pear_files.concat(Dir["#{f}/*"]) + end + + chmod 0644, pear_files + + # Custom location for extensions installed via pecl + pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" + pecl_path.mkpath + ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + php_basename = File.basename(extension_dir) + php_ext_dir = opt_prefix/"lib/php"/php_basename + + # fix pear config to install outside cellar + pear_path = HOMEBREW_PREFIX/"share/pear@#{version.major_minor}" + cp_r pkgshare/"pear/.", pear_path + { + "php_ini" => etc/"php/#{version.major_minor}/php.ini", + "php_dir" => pear_path, + "doc_dir" => pear_path/"doc", + "ext_dir" => pecl_path/php_basename, + "bin_dir" => opt_bin, + "data_dir" => pear_path/"data", + "cfg_dir" => pear_path/"cfg", + "www_dir" => pear_path/"htdocs", + "man_dir" => HOMEBREW_PREFIX/"share/man", + "test_dir" => pear_path/"test", + "php_bin" => opt_bin/"php", + }.each do |key, value| + value.mkpath if /(? + SetHandler application/x-httpd-php + + + Finally, check DirectoryIndex includes index.php + DirectoryIndex index.php index.html + + The php.ini and php-fpm.ini file can be found in: + #{etc}/php/#{version.major_minor}/ + EOS + end + + service do + run [opt_sbin/"php-fpm", "--nodaemonize"] + run_type :immediate + keep_alive true + error_log_path var/"log/php-fpm.log" + working_dir var + end + + test do + assert_match(/^Zend OPcache$/, shell_output("#{bin}/php -i"), + "Zend OPCache extension not loaded") + # Test related to libxml2 and + # https://github.com/Homebrew/homebrew-core/issues/28398 + assert_includes (bin/"php").dynamically_linked_libraries, + (Formula["libpq"].opt_lib/shared_library("libpq", 5)).to_s + + system "#{sbin}/php-fpm", "-t" + system bin/"phpdbg", "-V" + system bin/"php-cgi", "-m" + # Prevent SNMP extension to be added + refute_match(/^snmp$/, shell_output("#{bin}/php -m"), + "SNMP extension doesn't work reliably with Homebrew on High Sierra") + begin + port = free_port + port_fpm = free_port + + expected_output = /^Hello world!$/ + (testpath/"index.php").write <<~PHP + + SetHandler application/x-httpd-php + + EOS + + (testpath/"fpm.conf").write <<~EOS + [global] + daemonize=no + [www] + listen = 127.0.0.1:#{port_fpm} + pm = dynamic + pm.max_children = 5 + pm.start_servers = 2 + pm.min_spare_servers = 1 + pm.max_spare_servers = 3 + EOS + + (testpath/"httpd-fpm.conf").write <<~EOS + #{main_config} + LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so + LoadModule proxy_module lib/httpd/modules/mod_proxy.so + LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so + + SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" + + EOS + + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + + Process.kill("TERM", pid) + Process.wait(pid) + + fpm_pid = fork do + exec sbin/"php-fpm", "-y", "fpm.conf" + end + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + ensure + if pid + Process.kill("TERM", pid) + Process.wait(pid) + end + if fpm_pid + Process.kill("TERM", fpm_pid) + Process.wait(fpm_pid) + end + end + end +end + +__END__ +diff --git a/build/php.m4 b/build/php.m4 +index 3624a33a8e..d17a635c2c 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -425,7 +425,7 @@ dnl + dnl Adds a path to linkpath/runpath (LDFLAGS). + dnl + AC_DEFUN([PHP_ADD_LIBPATH],[ +- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then + PHP_EXPAND_PATH($1, ai_p) + ifelse([$2],,[ + _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) +@@ -470,7 +470,7 @@ dnl + dnl Add an include path. If before is 1, add in the beginning of INCLUDES. + dnl + AC_DEFUN([PHP_ADD_INCLUDE],[ +- if test "$1" != "/usr/include"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/include"; then + PHP_EXPAND_PATH($1, ai_p) + PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ + if test "$2"; then +diff --git a/configure.ac b/configure.ac +index 36c6e5e3e2..71b1a16607 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -190,6 +190,14 @@ PHP_ARG_WITH([libdir], + [lib], + [no]) + ++dnl Support systems with system libraries/includes in e.g. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk. ++PHP_ARG_WITH([os-sdkpath], ++ [for system SDK directory], ++ [AS_HELP_STRING([--with-os-sdkpath=NAME], ++ [Ignore system libraries and includes in NAME rather than /])], ++ [], ++ [no]) ++ + PHP_ARG_ENABLE([rpath], + [whether to enable runpaths], + [AS_HELP_STRING([--disable-rpath], diff --git a/Formula/p/php@8.3.rb b/Formula/p/php@8.3.rb new file mode 100644 index 0000000000000..f57ab140d938b --- /dev/null +++ b/Formula/p/php@8.3.rb @@ -0,0 +1,477 @@ +class PhpAT83 < Formula + desc "General-purpose scripting language" + homepage "https://www.php.net/" + # Should only be updated if the new version is announced on the homepage, https://www.php.net/ + url "https://www.php.net/distributions/php-8.3.27.tar.xz" + mirror "https://fossies.org/linux/www/php-8.3.27.tar.xz" + sha256 "c15a09a9d199437144ecfef7d712ec4ca5c6820cf34acc24cc8489dd0cee41ba" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads?source=Y" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "a77dca84f0790d6992051000e1720d64528608c0b4dbfebdfb08b52a63bf9989" + sha256 arm64_sequoia: "62fb877ea28bfa3de4a22799b6ce226478d18c0d4789283aa4e57b8157bfae03" + sha256 arm64_sonoma: "e74b973f92bf48119f74f8928eacc46e12071bc6dd03a06bc8fe4f50135681f4" + sha256 sonoma: "7d08eafa87ad95bc848240d186afd6e1dc78f0601043b2fc84a4487e3fff8a11" + sha256 arm64_linux: "e3b9ac2de4a58fb5c4b381d98f19c0bf62aabcd4b1246ea44e50c300c1359721" + sha256 x86_64_linux: "f5b5f07282e64ed301d61affc67517e3db7d5baa41b5173faa8ba6198735156e" + end + + keg_only :versioned_formula + + # Security Support Until 31 Dec 2027 + # https://www.php.net/supported-versions.php + deprecate! date: "2027-12-31", because: :unsupported + + depends_on "httpd" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "argon2" + depends_on "aspell" + depends_on "autoconf" + depends_on "curl" + depends_on "freetds" + depends_on "gd" + depends_on "gettext" + depends_on "gmp" + depends_on "icu4c@77" + depends_on "krb5" + depends_on "libpq" + depends_on "libsodium" + depends_on "libzip" + depends_on "oniguruma" + depends_on "openldap" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "sqlite" + depends_on "tidy-html5" + depends_on "unixodbc" + + uses_from_macos "xz" => :build + uses_from_macos "bzip2" + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_macos do + # PHP build system incorrectly links system libraries + # see https://github.com/php/php-src/issues/10680 + patch :DATA + end + + def install + # buildconf required due to system library linking bug patch + system "./buildconf", "--force" + + inreplace "configure" do |s| + s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`", + "APACHE_THREADED_MPM=" + s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", + "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" + s.gsub! "-z `$APXS -q SYSCONFDIR`", + "-z ''" + + # apxs will interpolate the @ in the versioned prefix: https://bz.apache.org/bugzilla/show_bug.cgi?id=61944 + s.gsub! "LIBEXECDIR='$APXS_LIBEXECDIR'", + "LIBEXECDIR='" + "#{lib}/httpd/modules".gsub("\\", "\\\\").gsub("@", "\\@") + "'" + end + + # Update error message in apache sapi to better explain the requirements + # of using Apache http in combination with php if the non-compatible MPM + # has been selected. Homebrew has chosen not to support being able to + # compile a thread safe version of PHP and therefore it is not + # possible to recompile as suggested in the original message + inreplace "sapi/apache2handler/sapi_apache2.c", + "You need to recompile PHP.", + "Homebrew PHP does not support a thread-safe php binary. " \ + "To use the PHP apache sapi please change " \ + "your httpd config to use the prefork MPM" + + inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" + + config_path = etc/"php/#{version.major_minor}" + # Prevent system pear config from inhibiting pear install + (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? + + # Prevent homebrew from hardcoding path to sed shim in phpize script + ENV["lt_cv_path_SED"] = "sed" + + # Identify build provider in phpinfo() + ENV["PHP_BUILD_PROVIDER"] = tap.user + + # system pkg-config missing + ENV["KERBEROS_CFLAGS"] = " " + if OS.mac? + ENV["SASL_CFLAGS"] = "-I#{MacOS.sdk_path_if_needed}/usr/include/sasl" + ENV["SASL_LIBS"] = "-lsasl2" + else + ENV["SQLITE_CFLAGS"] = "-I#{Formula["sqlite"].opt_include}" + ENV["SQLITE_LIBS"] = "-lsqlite3" + ENV["BZIP_DIR"] = Formula["bzip2"].opt_prefix + end + + # Each extension that is built on Mojave needs a direct reference to the + # sdk path or it won't find the headers + headers_path = "=#{MacOS.sdk_path_if_needed}/usr" if OS.mac? + + # `_www` only exists on macOS. + fpm_user = OS.mac? ? "_www" : "www-data" + fpm_group = OS.mac? ? "_www" : "www-data" + + args = %W[ + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{config_path} + --with-config-file-path=#{config_path} + --with-config-file-scan-dir=#{config_path}/conf.d + --with-pear=#{pkgshare}/pear + --enable-bcmath + --enable-calendar + --enable-dba + --enable-exif + --enable-ftp + --enable-fpm + --enable-gd + --enable-intl + --enable-mbregex + --enable-mbstring + --enable-mysqlnd + --enable-pcntl + --enable-phpdbg + --enable-phpdbg-readline + --enable-shmop + --enable-soap + --enable-sockets + --enable-sysvmsg + --enable-sysvsem + --enable-sysvshm + --with-apxs2=#{Formula["httpd"].opt_bin}/apxs + --with-bz2#{headers_path} + --with-curl + --with-external-gd + --with-external-pcre + --with-ffi + --with-fpm-user=#{fpm_user} + --with-fpm-group=#{fpm_group} + --with-gettext=#{Formula["gettext"].opt_prefix} + --with-gmp=#{Formula["gmp"].opt_prefix} + --with-iconv#{headers_path} + --with-kerberos + --with-layout=GNU + --with-ldap=#{Formula["openldap"].opt_prefix} + --with-libxml + --with-libedit + --with-mhash#{headers_path} + --with-mysql-sock=/tmp/mysql.sock + --with-mysqli=mysqlnd + --with-ndbm#{headers_path} + --with-openssl + --with-password-argon2=#{Formula["argon2"].opt_prefix} + --with-pdo-dblib=#{Formula["freetds"].opt_prefix} + --with-pdo-mysql=mysqlnd + --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} + --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} + --with-pdo-sqlite + --with-pgsql=#{Formula["libpq"].opt_prefix} + --with-pic + --with-pspell=#{Formula["aspell"].opt_prefix} + --with-sodium + --with-sqlite3 + --with-tidy=#{Formula["tidy-html5"].opt_prefix} + --with-unixODBC + --with-xsl + --with-zip + --with-zlib + ] + + if OS.mac? + args << "--enable-dtrace" + args << "--with-ldap-sasl" + args << "--with-os-sdkpath=#{MacOS.sdk_path_if_needed}" + else + args << "--disable-dtrace" + args << "--without-ldap-sasl" + args << "--without-ndbm" + args << "--without-gdbm" + end + + system "./configure", *args + system "make" + system "make", "install" + + # Allow pecl to install outside of Cellar + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + orig_ext_dir = File.basename(extension_dir) + inreplace bin/"php-config", lib/"php", prefix/"pecl" + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", %r{; ?extension_dir = "\./"}, + "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" + end + + # Use OpenSSL cert bundle + openssl = Formula["openssl@3"] + %w[development production].each do |mode| + inreplace "php.ini-#{mode}", /; ?openssl\.cafile=/, + "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" + inreplace "php.ini-#{mode}", /; ?openssl\.capath=/, + "openssl.capath = \"#{openssl.pkgetc}/certs\"" + end + + config_files = { + "php.ini-development" => "php.ini", + "php.ini-production" => "php.ini-production", + "sapi/fpm/php-fpm.conf" => "php-fpm.conf", + "sapi/fpm/www.conf" => "php-fpm.d/www.conf", + } + config_files.each_value do |dst| + dst_default = config_path/"#{dst}.default" + rm dst_default if dst_default.exist? + end + config_path.install config_files + + unless (var/"log/php-fpm.log").exist? + (var/"log").mkpath + touch var/"log/php-fpm.log" + end + end + + def post_install + pear_prefix = pkgshare/"pear" + pear_files = %W[ + #{pear_prefix}/.depdblock + #{pear_prefix}/.filemap + #{pear_prefix}/.depdb + #{pear_prefix}/.lock + ] + + %W[ + #{pear_prefix}/.channels + #{pear_prefix}/.channels/.alias + ].each do |f| + chmod 0755, f + pear_files.concat(Dir["#{f}/*"]) + end + + chmod 0644, pear_files + + # Custom location for extensions installed via pecl + pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" + pecl_path.mkpath + ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? + extension_dir = Utils.safe_popen_read(bin/"php-config", "--extension-dir").chomp + php_basename = File.basename(extension_dir) + php_ext_dir = opt_prefix/"lib/php"/php_basename + + # fix pear config to install outside cellar + pear_path = HOMEBREW_PREFIX/"share/pear" + cp_r pkgshare/"pear/.", pear_path + { + "php_ini" => etc/"php/#{version.major_minor}/php.ini", + "php_dir" => pear_path, + "doc_dir" => pear_path/"doc", + "ext_dir" => pecl_path/php_basename, + "bin_dir" => opt_bin, + "data_dir" => pear_path/"data", + "cfg_dir" => pear_path/"cfg", + "www_dir" => pear_path/"htdocs", + "man_dir" => HOMEBREW_PREFIX/"share/man", + "test_dir" => pear_path/"test", + "php_bin" => opt_bin/"php", + }.each do |key, value| + value.mkpath if /(? + SetHandler application/x-httpd-php + + + Finally, check DirectoryIndex includes index.php + DirectoryIndex index.php index.html + + The php.ini and php-fpm.ini file can be found in: + #{etc}/php/#{version.major_minor}/ + EOS + end + + service do + run [opt_sbin/"php-fpm", "--nodaemonize"] + run_type :immediate + keep_alive true + error_log_path var/"log/php-fpm.log" + working_dir var + end + + test do + assert_match(/^Zend OPcache$/, shell_output("#{bin}/php -i"), + "Zend OPCache extension not loaded") + # Test related to libxml2 and + # https://github.com/Homebrew/homebrew-core/issues/28398 + assert_includes (bin/"php").dynamically_linked_libraries, + (Formula["libpq"].opt_lib/shared_library("libpq", 5)).to_s + + system "#{sbin}/php-fpm", "-t" + system bin/"phpdbg", "-V" + system bin/"php-cgi", "-m" + # Prevent SNMP extension to be added + refute_match(/^snmp$/, shell_output("#{bin}/php -m"), + "SNMP extension doesn't work reliably with Homebrew on High Sierra") + begin + port = free_port + port_fpm = free_port + + expected_output = /^Hello world!$/ + (testpath/"index.php").write <<~PHP + + SetHandler application/x-httpd-php + + EOS + + (testpath/"fpm.conf").write <<~EOS + [global] + daemonize=no + [www] + listen = 127.0.0.1:#{port_fpm} + pm = dynamic + pm.max_children = 5 + pm.start_servers = 2 + pm.min_spare_servers = 1 + pm.max_spare_servers = 3 + EOS + + (testpath/"httpd-fpm.conf").write <<~EOS + #{main_config} + LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so + LoadModule proxy_module lib/httpd/modules/mod_proxy.so + LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so + + SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" + + EOS + + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + + Process.kill("TERM", pid) + Process.wait(pid) + + fpm_pid = fork do + exec sbin/"php-fpm", "-y", "fpm.conf" + end + pid = fork do + exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" + end + sleep 10 + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + ensure + if pid + Process.kill("TERM", pid) + Process.wait(pid) + end + if fpm_pid + Process.kill("TERM", fpm_pid) + Process.wait(fpm_pid) + end + end + end +end + +__END__ +diff --git a/build/php.m4 b/build/php.m4 +index 3624a33a8e..d17a635c2c 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -425,7 +425,7 @@ dnl + dnl Adds a path to linkpath/runpath (LDFLAGS). + dnl + AC_DEFUN([PHP_ADD_LIBPATH],[ +- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then + PHP_EXPAND_PATH($1, ai_p) + ifelse([$2],,[ + _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) +@@ -470,7 +470,7 @@ dnl + dnl Add an include path. If before is 1, add in the beginning of INCLUDES. + dnl + AC_DEFUN([PHP_ADD_INCLUDE],[ +- if test "$1" != "/usr/include"; then ++ if test "$1" != "$PHP_OS_SDKPATH/usr/include"; then + PHP_EXPAND_PATH($1, ai_p) + PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ + if test "$2"; then +diff --git a/configure.ac b/configure.ac +index 36c6e5e3e2..71b1a16607 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -190,6 +190,14 @@ PHP_ARG_WITH([libdir], + [lib], + [no]) + ++dnl Support systems with system libraries/includes in e.g. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk. ++PHP_ARG_WITH([os-sdkpath], ++ [for system SDK directory], ++ [AS_HELP_STRING([--with-os-sdkpath=NAME], ++ [Ignore system libraries and includes in NAME rather than /])], ++ [], ++ [no]) ++ + PHP_ARG_ENABLE([rpath], + [whether to enable runpaths], + [AS_HELP_STRING([--disable-rpath], diff --git a/Formula/p/phpbrew.rb b/Formula/p/phpbrew.rb new file mode 100644 index 0000000000000..c2afe13405f0b --- /dev/null +++ b/Formula/p/phpbrew.rb @@ -0,0 +1,41 @@ +class Phpbrew < Formula + desc "Brew & manage PHP versions in pure PHP at HOME" + homepage "https://phpbrew.github.io/phpbrew" + url "https://github.com/phpbrew/phpbrew/releases/download/2.2.0/phpbrew.phar" + sha256 "3247b8438888827d068542b2891392e3beffebe122f4955251fa4f9efa0da03d" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "90a16e50a47644f3efcd69153066536e4adf444a6ff67fea9ee4cf9f9788f442" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5313331a47dc3d43289333b1a1345dd53fcfd6b1cff99db2ee2483302288b1d8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5313331a47dc3d43289333b1a1345dd53fcfd6b1cff99db2ee2483302288b1d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5313331a47dc3d43289333b1a1345dd53fcfd6b1cff99db2ee2483302288b1d8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5313331a47dc3d43289333b1a1345dd53fcfd6b1cff99db2ee2483302288b1d8" + sha256 cellar: :any_skip_relocation, sonoma: "593e3afb0ab7517aba5f5576cb14b11ef5c1f58de3d6707688d1d6a751835b3f" + sha256 cellar: :any_skip_relocation, ventura: "593e3afb0ab7517aba5f5576cb14b11ef5c1f58de3d6707688d1d6a751835b3f" + sha256 cellar: :any_skip_relocation, monterey: "593e3afb0ab7517aba5f5576cb14b11ef5c1f58de3d6707688d1d6a751835b3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c5e5c1e76f1d5740e8c5ab834f5ee227809cb868f3c05709ae24caff8df9bd3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5313331a47dc3d43289333b1a1345dd53fcfd6b1cff99db2ee2483302288b1d8" + end + + depends_on "php" + + # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix + on_macos do + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + bin.install "phpbrew.phar" => "phpbrew" + end + + test do + system bin/"phpbrew", "init" + assert_match "8.0", shell_output("#{bin}/phpbrew known") + end +end diff --git a/Formula/p/phpmd.rb b/Formula/p/phpmd.rb new file mode 100644 index 0000000000000..a46d05e5be505 --- /dev/null +++ b/Formula/p/phpmd.rb @@ -0,0 +1,37 @@ +class Phpmd < Formula + desc "PHP Mess Detector" + homepage "https://phpmd.org" + url "https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar" + sha256 "6a28ef55de0c753b070d1d1580bb08a0d146016f89f0eddcef60ac4fc1083544" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "28cd360f0eea58782927875c91b4d709764ae46076f79d88681e2fcb73cf041e" + end + + # Upstream does not support Phar download anymore, see https://github.com/phpmd/phpmd/issues/971 + deprecate! date: "2024-10-18", because: :unsupported + disable! date: "2025-10-18", because: :unsupported + + depends_on "php" + + def install + bin.install "phpmd.phar" => "phpmd" + end + + test do + (testpath/"src/HelloWorld/Greetings.php").write <<~PHP + ]/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bfd3b06a94a0a347fbd5867091eacb91f18b28580f28da8fbccd59fe53457a73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bfd3b06a94a0a347fbd5867091eacb91f18b28580f28da8fbccd59fe53457a73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bfd3b06a94a0a347fbd5867091eacb91f18b28580f28da8fbccd59fe53457a73" + sha256 cellar: :any_skip_relocation, sonoma: "7a26dd35fa9ff398d8c6f69f332764f845d81e7f9b149e04783847f4a4236964" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a26dd35fa9ff398d8c6f69f332764f845d81e7f9b149e04783847f4a4236964" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a26dd35fa9ff398d8c6f69f332764f845d81e7f9b149e04783847f4a4236964" + end + + depends_on "php@8.3" => :test + + def install + pkgshare.install Dir["*"] + + etc.install pkgshare/"config.sample.inc.php" => "phpmyadmin.config.inc.php" + ln_s etc/"phpmyadmin.config.inc.php", pkgshare/"config.inc.php" + end + + def caveats + <<~EOS + To enable phpMyAdmin in Apache, add the following to httpd.conf and + restart Apache: + Alias /phpmyadmin #{HOMEBREW_PREFIX}/share/phpmyadmin + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + + Require all granted + + + Order allow,deny + Allow from all + + + Then open http://localhost/phpmyadmin + The configuration file is #{etc}/phpmyadmin.config.inc.php + EOS + end + + test do + php = Formula["php@8.3"].opt_bin/"php" + cd pkgshare do + assert_match "German", shell_output("#{php} #{pkgshare}/index.php") + end + end +end diff --git a/Formula/p/phpstan.rb b/Formula/p/phpstan.rb new file mode 100644 index 0000000000000..8c6ce4a79f55b --- /dev/null +++ b/Formula/p/phpstan.rb @@ -0,0 +1,92 @@ +class Phpstan < Formula + desc "PHP Static Analysis Tool" + homepage "https://github.com/phpstan/phpstan" + url "https://github.com/phpstan/phpstan/releases/download/2.1.31/phpstan.phar" + sha256 "f9b7ebabd110dcf628c8f62f7a974b07b54cb0bb62cf9142d8db17dbc6cd39fc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae86b1be413275813a6a694ca61d36032778da3ec1c4662d14eb4c4396f8108f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae86b1be413275813a6a694ca61d36032778da3ec1c4662d14eb4c4396f8108f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae86b1be413275813a6a694ca61d36032778da3ec1c4662d14eb4c4396f8108f" + sha256 cellar: :any_skip_relocation, sonoma: "93f0ae2ec554200cca0c6c73610f21ac761b3a618c1dede57a4c619606a40042" + sha256 cellar: :any_skip_relocation, arm64_linux: "93f0ae2ec554200cca0c6c73610f21ac761b3a618c1dede57a4c619606a40042" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93f0ae2ec554200cca0c6c73610f21ac761b3a618c1dede57a4c619606a40042" + end + + depends_on "php" => :test + + # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix + on_macos do + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + bin.install "phpstan.phar" => "phpstan" + end + + test do + (testpath/"src/autoload.php").write <<~PHP + '/Email.php' + ); + } + $cn = strtolower($class); + if (isset($classes[$cn])) { + require __DIR__ . $classes[$cn]; + } + }, + true, + false + ); + PHP + + (testpath/"src/Email.php").write <<~PHP + ensureIsValidEmail($email); + + $this->email = $email; + } + + public static function fromString(string $email): self + { + return new self($email); + } + + public function __toString(): string + { + return $this->email; + } + + private function ensureIsValidEmail(string $email): void + { + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + throw new InvalidArgumentException( + sprintf( + '"%s" is not a valid email address', + $email + ) + ); + } + } + } + PHP + assert_match(/^\n \[OK\] No errors/, + shell_output("#{bin}/phpstan analyse --level max --autoload-file src/autoload.php src/Email.php")) + end +end diff --git a/Formula/phpunit.rb b/Formula/p/phpunit.rb similarity index 77% rename from Formula/phpunit.rb rename to Formula/p/phpunit.rb index e9c9a32a2e3db..a0cdab9fcd275 100644 --- a/Formula/phpunit.rb +++ b/Formula/p/phpunit.rb @@ -1,10 +1,19 @@ class Phpunit < Formula desc "Programmer-oriented testing framework for PHP" homepage "https://phpunit.de" - url "https://phar.phpunit.de/phpunit-7.5.1.phar" - sha256 "56b891ba38980ece373df316d218a8d21c2dbba95af36975415947b549ba5b0c" + url "https://phar.phpunit.de/phpunit-12.4.2.phar" + sha256 "16af90b27ce7d938852da866b287bb8c72cc3ed7f4fafa4f40bf696f2fb03614" + license "BSD-3-Clause" + + livecheck do + url "https://phar.phpunit.de/phpunit.phar" + regex(%r{/phpunit[._-]v?(\d+(?:\.\d+)+)\.phar}i) + strategy :header_match + end - bottle :unneeded + bottle do + sha256 cellar: :any_skip_relocation, all: "c1ee035ee29e830aab6559835bf9715f79ac17298a32f0daa2030b9811f4f706" + end depends_on "php" => :test @@ -13,7 +22,7 @@ def install end test do - (testpath/"src/autoload.php").write <<~EOS + (testpath/"src/autoload.php").write <<~PHP :build + + def install + ldflags = %W[ + -s -w + -X github.com/phrase/phrase-cli/cmd.PHRASE_CLIENT_VERSION=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + bin.install_symlink "phrase-cli" => "phrase" + + generate_completions_from_executable(bin/"phrase", "completion", shells: [:bash]) + end + + test do + assert_match "ERROR: no targets for download specified", shell_output("#{bin}/phrase pull 2>&1", 1) + assert_match version.to_s, shell_output("#{bin}/phrase version") + end +end diff --git a/Formula/p/phylum-cli.rb b/Formula/p/phylum-cli.rb new file mode 100644 index 0000000000000..797cde0ad57bb --- /dev/null +++ b/Formula/p/phylum-cli.rb @@ -0,0 +1,51 @@ +class PhylumCli < Formula + desc "Command-line interface for the Phylum API" + homepage "https://www.phylum.io" + url "https://github.com/phylum-dev/cli/archive/refs/tags/v7.5.0.tar.gz" + sha256 "a3fe16d9e76872a1dc00c5ba7897806f0e8581a4f4ebb9cc8c4410ae2438d1a7" + license "GPL-3.0-or-later" + head "https://github.com/phylum-dev/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4841aa81f69b6ea50733d63e23c7528536343221248c81cd98945d3bf4883b20" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0528cf65555a5f86e2f3a9db038dc40eb019d147df4aee9b6a53e873c05db0ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7717c20f5063a9e25a9b4c63a1aaa099623f16403803d24d86d9b3cd77822ca3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb9bcd54edc2c2a31f817c71a5ce5b5b2bccc818b8cd2ba1f71aedbc35465588" + sha256 cellar: :any_skip_relocation, sonoma: "13b94a26a75cf78a3fe90e5fe425f0f69d82894785c65257b14656e6ab74cc39" + sha256 cellar: :any_skip_relocation, ventura: "9f842fa99341dcbe43ec4cfdce8c31f0be8545ae73cff012919728545d1e8a02" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e9136f95e0097a22555e606e1b6c751012f740482b85c4c5677b3ad3b9b02fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e55839055bb0e1849b304b2f4c7e1395b5f6d0c00abb16b7167f7b2b2771738c" + end + + depends_on "protobuf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + system "cargo", "install", "--no-default-features", *std_cargo_args(path: "cli") + + # Generate and install shell completions + system "cargo", "run", "--package", "xtask", "--no-default-features", "gencomp" + bash_completion.install "target/completions/phylum.bash" => "phylum" + zsh_completion.install "target/completions/_phylum" + fish_completion.install "target/completions/phylum.fish" + end + + def caveats + <<~EOS + No official extensions have been preinstalled. + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/phylum --version") + + assert_match <<~EOS, shell_output("#{bin}/phylum status") + Project: null + Group: null + Project Root: null + Dependency Files: null + EOS + end +end diff --git a/Formula/p/physfs.rb b/Formula/p/physfs.rb new file mode 100644 index 0000000000000..8963bbc11de6a --- /dev/null +++ b/Formula/p/physfs.rb @@ -0,0 +1,65 @@ +class Physfs < Formula + desc "Library to provide abstract access to various archives" + homepage "https://icculus.org/physfs/" + url "https://github.com/icculus/physfs/archive/refs/tags/release-3.2.0.tar.gz" + sha256 "1991500eaeb8d5325e3a8361847ff3bf8e03ec89252b7915e1f25b3f8ab5d560" + license "Zlib" + head "https://github.com/icculus/physfs.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0944ba1768fe03b03b2705b401890c25dccd9598ef9a0113796b95b6aeebdb49" + sha256 cellar: :any, arm64_sequoia: "e6b0663f9c6fd2b671825e510c705706dfccc018571c20e689ef082d5b701fdb" + sha256 cellar: :any, arm64_sonoma: "7556de6af5b763d6ce5fbb4e56acd432aefd2752a8bd27b38377de64f7f0ffc6" + sha256 cellar: :any, arm64_ventura: "033ca59ee6e8065927dc2c9e9161c5c673cc479d6d5991fe797c7677e474617d" + sha256 cellar: :any, arm64_monterey: "b46aa5368cc2331f6b7f9abd675e40ae06fce1c0864bcf3ded3ebabf1bbc4756" + sha256 cellar: :any, arm64_big_sur: "f627a4cae2e3476f4ed357f265d522a06a1b5d3c51064dcce1dafb0c625d8904" + sha256 cellar: :any, sonoma: "57d1132edf37fbffbd596c962efb07fbf60a038874c6fbaab3280cad289ddd24" + sha256 cellar: :any, ventura: "7cbc056544fd8a02a9e85931cf7a7e9fe9387b0c41ad485a8d0bc29a217d11a9" + sha256 cellar: :any, monterey: "8d81d2499641e8c30ccc9bcbd2d26ed59f173a4b438b64a554b8c9af62b94fec" + sha256 cellar: :any, big_sur: "6a28290a9fc698ba51ebcab233cabc708c5a611f74d94f99dc00a8348032438c" + sha256 cellar: :any_skip_relocation, arm64_linux: "16a3df7f2d1830b906dc58a405ca2754d444887806397a796739b848270355f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd94c275f27747d40f025ed1ad50fd8a50e39853a8ca0be664f316e06fa7983f" + end + + depends_on "cmake" => :build + + uses_from_macos "zip" => :test + + on_linux do + depends_on "readline" + end + + def install + # Workaround for CMake 4.0+. Remove on next release. + if build.stable? + odie "Remove CMake 4 workaround!" if version > "3.2.0" + inreplace "CMakeLists.txt", "cmake_minimum_required(VERSION 3.0)", + "cmake_minimum_required(VERSION 3.10)" + end + + system "cmake", "-S", ".", "-B", "build", + "-DPHYSFS_BUILD_TEST=TRUE", + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.txt").write "homebrew" + system "zip", "test.zip", "test.txt" + (testpath/"test").write <<~EOS + addarchive test.zip 1 + cat test.txt + EOS + output = shell_output("#{bin}/test_physfs < test 2>&1") + expected = if OS.mac? + "Successful.\nhomebrew" + else + "Successful.\n> cat test.txt\nhomebrew" + end + assert_match expected, output + end +end diff --git a/Formula/p/physunits.rb b/Formula/p/physunits.rb new file mode 100644 index 0000000000000..31e4a84379c7a --- /dev/null +++ b/Formula/p/physunits.rb @@ -0,0 +1,39 @@ +class Physunits < Formula + desc "C++ header-only for Physics unit/quantity manipulation and conversion" + homepage "https://github.com/martinmoene/PhysUnits-CT-Cpp11" + url "https://github.com/martinmoene/PhysUnits-CT-Cpp11/archive/refs/tags/v1.3.0.tar.gz" + sha256 "64187aadf886f9bade5976f5f3289637f8882f36ac4767f1be201f89e5a4a47d" + license "BSL-1.0" + head "https://github.com/martinmoene/PhysUnits-CT-Cpp11.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0d821322abd11d644d0dbf1fe20bbee6fc39a44f2e2404eea9f0e5042605d772" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "builddir", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + using namespace std; + using namespace phys::units; + using namespace phys::units::literals; + + int main() + { + quantity speed = 45_km / hour; + cout< :build + depends_on "ffmpeg" + depends_on "json-c" + depends_on "libao" + depends_on "libgcrypt" + + uses_from_macos "curl" + + def install + # Discard Homebrew's CFLAGS as Pianobar reportedly doesn't like them + ENV["CFLAGS"] = "-O2 -DNDEBUG " + + # Or it doesn't build at all + "-std=c99 " + + # build if we aren't /usr/local' + "#{ENV.cppflags} #{ENV.ldflags}" + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + + prefix.install "contrib" + end + + test do + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + require "pty" + PTY.spawn(bin/"pianobar") do |stdout, stdin, _pid| + stdin.putc "\n" + assert_match "pianobar (#{version})", stdout.read + end + end +end diff --git a/Formula/p/pianod.rb b/Formula/p/pianod.rb new file mode 100644 index 0000000000000..00f997d1fa610 --- /dev/null +++ b/Formula/p/pianod.rb @@ -0,0 +1,51 @@ +class Pianod < Formula + desc "Pandora client with multiple control interfaces" + homepage "https://deviousfish.com/pianod/" + url "https://deviousfish.com/Downloads/pianod2/pianod2-410.tar.gz" + sha256 "28c1b28b320acff3fe46c79748c55370ba4333544e0c27e90a3520d42a9914cf" + license "MIT" + revision 1 + + livecheck do + url "https://deviousfish.com/Downloads/pianod2/" + regex(/href=.*?pianod2[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "1054dcefc6d2f8d2463e1d4e220a720b3ad71e3be1c4cd1467d9c7a0f154c189" + sha256 arm64_sequoia: "65b0b7edda8a3ebe8dba97e532141dd9b985ec7ec2cc799b00b1086337a35c85" + sha256 arm64_sonoma: "92a0bf60d6c4f5a5b57cbe70d6cb357373420514b401bd1a463ced3a1fa3fd0e" + sha256 arm64_ventura: "8fa61c25c901c6c762ca574b5c398281b579a92e940c2adcdc9cbf452cbf86b3" + sha256 sonoma: "16275adaae7a5388bbda493535d734b6a5a9b84dfa3c566d600adb42751633e5" + sha256 ventura: "327ae74f956db17289622864bb4e272fe0184ee0c54f1b542c9601160a0e3765" + sha256 arm64_linux: "5317f74dd5f53f1e824b2659883704b34bca67fd86256ad573f517de9ab66e19" + sha256 x86_64_linux: "03553138132bc05944d3eaa1e23ebbbae75831148c38eed4b4567fd36d2b4314" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "gnutls" + depends_on "gstreamer" + depends_on "taglib" + + uses_from_macos "curl" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "libbsd" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"pianod", "-v" + end +end diff --git a/Formula/p/picard-tools.rb b/Formula/p/picard-tools.rb new file mode 100644 index 0000000000000..69f59b3070d41 --- /dev/null +++ b/Formula/p/picard-tools.rb @@ -0,0 +1,33 @@ +class PicardTools < Formula + desc "Tools for manipulating HTS data and formats" + homepage "https://broadinstitute.github.io/picard/" + url "https://github.com/broadinstitute/picard/releases/download/3.4.0/picard.jar" + sha256 "e76128c283889fc583c9dea33a3b7448974c067d102c9e35be152642d4d5f901" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7fbf17eca625e75fd79d09a89ba7f763725b0d3e669a6e53de7ac574b38f2e6f" + end + + depends_on "openjdk" + + def install + libexec.install "picard.jar" + bin.write_jar_script libexec/"picard.jar", "picard", "$JAVA_OPTS" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT + CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + cmd = "#{bin}/picard NormalizeFasta I=test.fasta O=/dev/stdout" + assert_match "TCTCTG", shell_output(cmd) + end +end diff --git a/Formula/p/picat.rb b/Formula/p/picat.rb new file mode 100644 index 0000000000000..bfbc76edd4e9b --- /dev/null +++ b/Formula/p/picat.rb @@ -0,0 +1,44 @@ +class Picat < Formula + desc "Simple, and yet powerful, logic-based multi-paradigm programming language" + homepage "https://picat-lang.org/" + url "https://picat-lang.org/download/picat39_src.tar.gz" + version "3.9" + sha256 "02e7ae7d7efa9e7fd58b5fb4c1218afb331710f0c6301e46ebc5f670af347331" + license "MPL-2.0" + + livecheck do + url "https://picat-lang.org/download.html" + regex(/>\s*?Released version v?(\d+(?:[.#]\d+)+)\s*?,/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2a9beaab92eecd166bd9d526e159d327d621f0fd6b6ff33b20918fb94feb571" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b504f1331d85fc37964a0562e0c54386993275d89a915c1f550baaf995b2c32a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8eebc88a6342e2b01ce5c896e175356780b44cbfa0f4ec27333cd7bbd9ddc9f" + sha256 cellar: :any_skip_relocation, sonoma: "9532dcfa7a7a997a4e011d6a7ae3970884fe5a4bd9aab21f898c5cd0330a0905" + sha256 cellar: :any_skip_relocation, arm64_linux: "e69a8477a5c33a3aa90759f9ec851a9f5f1b45cc72be52e514b031d8b8c530ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "446bb07d6962c52b3249ef7fdfd0deaa69645b3f1c5d7e86618e19b68cfaa206" + end + + def install + makefile = if OS.mac? + "Makefile.mac64" + else + ENV.cxx11 + "Makefile.linux64" + end + system "make", "-C", "emu", "-f", makefile + bin.install "emu/picat" => "picat" + prefix.install "lib" => "pi_lib" + doc.install Dir["doc/*"] + pkgshare.install "exs" + end + + test do + output = shell_output("#{bin}/picat #{pkgshare}/exs/euler/p1.pi").chomp + assert_equal "Sum of all the multiples of 3 or 5 below 1000 is 233168", output + end +end diff --git a/Formula/p/pick.rb b/Formula/p/pick.rb new file mode 100644 index 0000000000000..bc7559c7365e4 --- /dev/null +++ b/Formula/p/pick.rb @@ -0,0 +1,52 @@ +class Pick < Formula + desc "Utility to choose one option from a set of choices" + homepage "https://github.com/mptre/pick" + url "https://github.com/mptre/pick/releases/download/v4.0.0/pick-4.0.0.tar.gz" + sha256 "de768fd566fd4c7f7b630144c8120b779a61a8cd35898f0db42ba8af5131edca" + license "MIT" + head "https://github.com/mptre/pick.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "562b847ced07b32f1858a7c45887be26552e663c013f447e0f18b747790ff24b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5df3f1f792d5df3784e7d7e8204de908bb43f7ec0830bf576eedc58de28c683" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf2e439d81bbe3a7cc2fadf74c2b22835087deb28ece7b39a05312372e551d86" + sha256 cellar: :any_skip_relocation, arm64_ventura: "baf0de992329c39e5c0ed64680c7fc8438e460ccb4a261e15a987e8afac5859e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3978f455a6bf9cba97b215e8a71a4f314eb48bfd0a920ef307e46c5c3bf3e186" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "032d06aa754000e281f773bb857266efc79e1762e8f689617778a19e17505688" + sha256 cellar: :any_skip_relocation, sonoma: "bd88176ee4fec77b374b9f9ba8d948409232bc2c88d0ae4f140409ee0e79c92a" + sha256 cellar: :any_skip_relocation, ventura: "7d8ae03b4a23f8bbfba46552fac1bac70eb1d2bc80177660ce21ef4974438954" + sha256 cellar: :any_skip_relocation, monterey: "d9bfbabddcd3e479420308af573f56ac530386d110c95044a65e64f4ef7c8f28" + sha256 cellar: :any_skip_relocation, big_sur: "c8da7b41b502c8c72b90fd41bf1570e840198fa6678cc5efca8a1c26a8d5557f" + sha256 cellar: :any_skip_relocation, catalina: "754879e53b48743051bb1571bb4b6180a415ac36af8deaf335f5c193326d232f" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8633db6fbcdff4972f69dc32b3a304f117f00a1bae82122488c8294df775c02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5c80628af5eda75fa3d34827529f3f482c0dc058c1016f5a6033deca9d22566" + end + + uses_from_macos "ncurses" + + conflicts_with "nmh", because: "both install `pick` binaries" + + def install + ENV["PREFIX"] = prefix + ENV["MANDIR"] = man + system "./configure" + system "make", "install" + end + + test do + require "pty" + ENV["TERM"] = "xterm" + PTY.spawn(bin/"pick") do |r, w, _pid| + w.write "foo\nbar\nbaz\n\x04" + sleep 1 + w.write "\n" + begin + assert_match(/foo\r\nbar\r\nbaz\r\n\^D.*foo\r\n\z/, r.read) + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + end +end diff --git a/Formula/p/pickle.rb b/Formula/p/pickle.rb new file mode 100644 index 0000000000000..8427036b6ba10 --- /dev/null +++ b/Formula/p/pickle.rb @@ -0,0 +1,38 @@ +class Pickle < Formula + desc "PHP Extension installer" + homepage "https://github.com/FriendsOfPHP/pickle" + url "https://github.com/FriendsOfPHP/pickle/releases/download/v0.7.11/pickle.phar" + sha256 "fe68430bbaf01b45c7bf46fa3fd2ab51f8d3ab41e6f5620644d245a29d56cfd6" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6710d3de2aa7ed4fac47695b81fe4101759a759534dbeb5920a3a6956084c6ad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f639f368ae43bb57ae421bbd3426bab6edc063da8f7ec66f53344c104073f430" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f639f368ae43bb57ae421bbd3426bab6edc063da8f7ec66f53344c104073f430" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f639f368ae43bb57ae421bbd3426bab6edc063da8f7ec66f53344c104073f430" + sha256 cellar: :any_skip_relocation, sonoma: "91002e34b82efb2b8514339bfc45b0d0a0455dc8ba05c1ccd30fef75841914f7" + sha256 cellar: :any_skip_relocation, ventura: "91002e34b82efb2b8514339bfc45b0d0a0455dc8ba05c1ccd30fef75841914f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "23f1c4215357e0916796420abb44f644c492a3788993b0fcdab6e74a37843b4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f639f368ae43bb57ae421bbd3426bab6edc063da8f7ec66f53344c104073f430" + end + + depends_on "php" + + # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix + on_macos do + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + bin.install "pickle.phar" => "pickle" + end + + test do + assert_match(/Package name[ |]+apcu/, shell_output("#{bin}/pickle info apcu")) + end +end diff --git a/Formula/p/picoc.rb b/Formula/p/picoc.rb new file mode 100644 index 0000000000000..968411dff79fc --- /dev/null +++ b/Formula/p/picoc.rb @@ -0,0 +1,59 @@ +class Picoc < Formula + desc "C interpreter for scripting" + homepage "https://gitlab.com/zsaleeba/picoc" + license "BSD-3-Clause" + revision 1 + head "https://gitlab.com/zsaleeba/picoc.git", branch: "master" + + stable do + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/picoc/picoc-2.1.tar.bz2" + sha256 "bfed355fab810b337ccfa9e3215679d0b9886c00d9cb5e691f7e7363fd388b7e" + + # Remove for > 2.1 + # Fix abort trap due to stack overflow + # Upstream commit from 14 Oct 2013 "Fixed a problem with PlatformGetLine()" + patch do + url "https://gitlab.com/zsaleeba/picoc/commit/ed54c519169b88b7b40d1ebb11599d89a4228a71.diff" + sha256 "45b49c860c0fac1ce2f7687a2662a86d2fcfb6947cf8ad6cf21e2a3d696d7d72" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "190a69c827d572ea5c16c28021907f6eb657eaa4b3381fc379ebeeda16e1c102" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43e537db7d3f77463969b213bbb8fcaed5bef26c4c1600989140bc4c8ce77f80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10344b6c0e17692656a97e7ef1149cc7ab5797df714986bd420a211f6cd4cde3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37c038b18d6e2dd02636901429fabaced73eb533eb1254e06bb3a74f53906a66" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a572c33c2dc1b913132786154a5013d4c380bd1dcc5d64a696071ccb15b2589" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b39c116bb09cdd9f91143aaf9c928feadac8b281807e06ab87c4ca2992c13ec4" + sha256 cellar: :any_skip_relocation, sonoma: "6e15bc0d7c0729f0a32ef47dedf7b50a84cb2a9a5ab6238885cdf26b50e8f779" + sha256 cellar: :any_skip_relocation, ventura: "9237788f85a665a1e368d6cae408450ea66ae3ad8c0fedcf3fc659ceab88f73c" + sha256 cellar: :any_skip_relocation, monterey: "f5483717ef3070c38ddd65011f312f8da456f74aa9c7f6b13480d4e40aa52782" + sha256 cellar: :any_skip_relocation, big_sur: "41d9836d62b70b7fe1117f4697417d9a03615639f2ff1390f0f1d21003426bb1" + sha256 cellar: :any_skip_relocation, catalina: "168aebca830b719b3645b682c9c3f1208663b6853b62d68ddeb2957ee6c8bc07" + sha256 cellar: :any_skip_relocation, arm64_linux: "1054643132b3c1196e1630e283c7295c73e57d7e616f08eedba7ea03c5820cf4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbc930c96079c197b124afefbcf14153ad4435e9ff95d42753348778f6efb85e" + end + + on_linux do + depends_on "readline" + end + + def install + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags} -DUNIX_HOST" + bin.install "picoc" + end + + test do + (testpath/"brew.c").write <<~C + #include + int main(void) { + printf("Homebrew\n"); + return 0; + } + C + assert_match "Homebrew", shell_output("#{bin}/picoc brew.c") + end +end diff --git a/Formula/p/picocom.rb b/Formula/p/picocom.rb new file mode 100644 index 0000000000000..e376b042133de --- /dev/null +++ b/Formula/p/picocom.rb @@ -0,0 +1,45 @@ +class Picocom < Formula + desc "Minimal dumb-terminal emulation program" + homepage "https://github.com/npat-efault/picocom" + url "https://github.com/npat-efault/picocom/archive/refs/tags/3.1.tar.gz" + sha256 "e6761ca932ffc6d09bd6b11ff018bdaf70b287ce518b3282d29e0270e88420bb" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "01b35b20e38a3e06f20de103d7d5b371386fce19b8bab8d6869886c5eb09f329" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87020c916b8770f7458f4ab8323909d2ed5e1d48706507a2a262289f741ab627" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a7594ede879b71828a7e5b36cdcccb7e208001d4514c4c8e8367146d561c7ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "10704a0718469ac5d0d1b0774341b0c24d9ddeb1a5e6d2d12deb916d27bc3506" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f286430d43b8e36f2abefdf1765e960f76e2bf2c3e04f3e6fa500fa0b8dafeb2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ea502c2c427d1e389d7dd0822e6f01d6ac7b7eed6f856ee9f9e60fbd598ee845" + sha256 cellar: :any_skip_relocation, sonoma: "3359c21097ce36c5ca591b893388abe1b326002e32fa282d9e9b11905936b370" + sha256 cellar: :any_skip_relocation, ventura: "7e0e2b6e676423624e67f67a7f509332b6aa118e860c92f32308f9399405d87c" + sha256 cellar: :any_skip_relocation, monterey: "0b964f92ff9ba91ad3107dc9c435de2198bf8f37f72414ec71d6f269293144a3" + sha256 cellar: :any_skip_relocation, big_sur: "bcf999f8a55184741845fe1dbab36597c3be6723f4fa4f603ee453558bfd6170" + sha256 cellar: :any_skip_relocation, catalina: "dbbf7829cd18b6fc0b4cf2296de575e7399702fcad52a6da94280e30e3abc341" + sha256 cellar: :any_skip_relocation, arm64_linux: "98708de364229e523e74c4d15f335fe1bf758bd26c12f78fc145fc464ff3130b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c765edf56732a7dd0631c12068fd17ba7800c98ceb24f98fa65990e7fa13dadc" + end + + # Upstream picocom supports arbitrary baud-rate settings on macOS out of the + # box, but only applies that to i386 and x86_64 systems. With the advent of + # arm64 macs, it is now necessary to expand that support. + # https://github.com/npat-efault/picocom/pull/129 + patch do + url "https://github.com/npat-efault/picocom/commit/f806bf28266cccdb75ba89d754de8d8fa64c6127.patch?full_index=1" + sha256 "b1a29265d5b5e0e7e7f8f3194b818802de8c7d18e80525bc43cbb896a6def590" + end + + def install + system "make" + bin.install "picocom" + man1.install "picocom.1" + end + + test do + system bin/"picocom", "--help" + end +end diff --git a/Formula/p/picotool.rb b/Formula/p/picotool.rb new file mode 100644 index 0000000000000..1fa0f4cfc83ce --- /dev/null +++ b/Formula/p/picotool.rb @@ -0,0 +1,78 @@ +class Picotool < Formula + desc "Tool for interacting with RP2040/RP2350 devices and binaries" + homepage "https://github.com/raspberrypi/picotool" + license "BSD-3-Clause" + + stable do + url "https://github.com/raspberrypi/picotool/archive/refs/tags/2.2.0.tar.gz" + sha256 "aab3d82fb1e576d97156ddcb962ae7cf290518a5f20d9002ac27e628dc657620" + + resource "pico-sdk" do + # Use git checkout to allow fetching mbedtls submodule + url "https://github.com/raspberrypi/pico-sdk.git", + tag: "2.2.0", + revision: "a1438dff1d38bd9c65dbd693f0e5db4b9ae91779" + + livecheck do + formula :parent + end + end + end + + bottle do + sha256 arm64_tahoe: "b12cf07252361b521281cf7602d0ab010555d02abac576e1ce3be340df4d66c7" + sha256 arm64_sequoia: "49cb6c6d41e91089a09df5bf092d83d658f5db22490e391134e9c9ead450f0f8" + sha256 arm64_sonoma: "2159fc13efa5a87797d8d6d0ded1647cef3c78cbf41c83fbb18294e48f81b0cb" + sha256 arm64_ventura: "7025bf2422beece703941ecd4cafd63f2f7ec104a91197970e9a2be19f0f9bf1" + sha256 sonoma: "08e87accab4171dd4d3fbd0fc2d68ba6b4212281f39664c0d6e833f2b76acdc7" + sha256 ventura: "74c24dc9a56d7e5f3302c665452a5a0151be7554b4442eb2ba49910513ebbfc8" + sha256 arm64_linux: "d0019fa8d364fc028d890587caca5944c3f49eaa559f3e4076fefe2b347e9fbd" + sha256 x86_64_linux: "3a7872893bf73e1fa954822415d7f3dbb72d16a83899635fe091d0adb1454994" + end + + head do + url "https://github.com/raspberrypi/picotool.git", branch: "master" + + resource "pico-sdk" do + url "https://github.com/raspberrypi/pico-sdk.git", branch: "master" + end + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + odie "pico-sdk resource needs to be updated" if build.stable? && version != resource("pico-sdk").version + + resource("pico-sdk").stage buildpath/"pico-sdk" + + args = %W[-DPICO_SDK_PATH=#{buildpath}/pico-sdk] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # from https://github.com/raspberrypi/pico-examples?tab=readme-ov-file#first-examples + resource "homebrew-picow_blink" do + url "https://rptl.io/pico-w-blink" + sha256 "ba6506638166c309525b4cb9cd2a9e7c48ba4e19ecf5fcfd7a915dc540692099" + end + + resource("homebrew-picow_blink").stage do + result = <<~EOS + File blink_picow.uf2 family ID 'rp2040': + + Program Information + name: picow_blink + web site: https://github.com/raspberrypi/pico-examples/tree/HEAD/pico_w/blink + features: UART stdin / stdout + binary start: 0x10000000 + binary end: 0x1003feac + EOS + assert_equal result, shell_output("#{bin}/picotool info blink_picow.uf2") + end + end +end diff --git a/Formula/p/pict.rb b/Formula/p/pict.rb new file mode 100644 index 0000000000000..070cee33d58d6 --- /dev/null +++ b/Formula/p/pict.rb @@ -0,0 +1,46 @@ +class Pict < Formula + desc "Pairwise Independent Combinatorial Tool" + homepage "https://github.com/Microsoft/pict/" + url "https://github.com/Microsoft/pict/archive/refs/tags/v3.7.4.tar.gz" + sha256 "42af3ac7948d5dfed66525c4b6a58464dfd8f78a370b1fc03a8d35be2179928f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1943785b6611e724bda4f429efa2ccaaef18a26850370d6712b933968478c4c7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa8ac4e122053ec2c71f8c2855cb4274835f9571152427650684364bc2f84855" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14edff2fd027c72de89053d0d6ab2b5fd5ebe3b3068bf6a971b3ca18fd8ecf36" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa4517aea0e42f613cd176baa46a11f3e46d216fb1050c9059d93bca14df049c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f3b42cd438f51790b14275f2ff2d7d6dc897f8ce32489c997602d8dd5f8984f2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "863064a24888d6aef5013b37eeb22abd0fdce747badfe27c189959b01d9c7a16" + sha256 cellar: :any_skip_relocation, sonoma: "ed4ba842b942185dc01d6d83fe06320c947a5e33066171a8f6c9130a57809b2f" + sha256 cellar: :any_skip_relocation, ventura: "7dc3684b30b611acb139b8f5b908eba640a76d49cc424db06a6f814515eafddd" + sha256 cellar: :any_skip_relocation, monterey: "2acd315ec72d1d92cca685e2e6953539d2d9d37d18ea0889ad5e67c06f83b4ee" + sha256 cellar: :any_skip_relocation, big_sur: "96d58480ac15db41e7bd9831c9287afaefd1bce20d275e1a2642c070cd3fdb8b" + sha256 cellar: :any_skip_relocation, catalina: "1320678e6b2a2f174d88162541e72fff108adb4b4ff4c34eedbc435b4022fa74" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdc336a65ed22afd3c31ef236658d19e6b829e4b5ce09799e0689b09265b74e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7bc79051760ece4228b1b8effde4c16289f250aa9f6feb14f05e6065e3aba070" + end + + resource "testfile" do + url "https://gist.githubusercontent.com/glsorre/9f67891c69c21cbf477c6cedff8ee910/raw/84ec65cf37e0a8df5428c6c607dbf397c2297e06/pict.txt" + sha256 "ac5e3561f9c481d2dca9d88df75b58a80331b757a9d2632baaf3ec5c2e49ccec" + end + + def install + system "make" + bin.install "pict" + end + + test do + resource("testfile").stage testpath + output = shell_output("#{bin}/pict pict.txt") + assert_equal output.split("\n")[0], "LANGUAGES\tCURRIENCIES" + assert_match "en_US\tGBP", output + assert_match "en_US\tUSD", output + assert_match "en_UK\tGBP", output + assert_match "en_UK\tUSD", output + end +end diff --git a/Formula/p/pidcat.rb b/Formula/p/pidcat.rb new file mode 100644 index 0000000000000..d13aab17efa51 --- /dev/null +++ b/Formula/p/pidcat.rb @@ -0,0 +1,35 @@ +class Pidcat < Formula + include Language::Python::Shebang + + desc "Colored logcat script to show entries only for specified app" + homepage "https://github.com/JakeWharton/pidcat" + url "https://github.com/JakeWharton/pidcat/archive/refs/tags/2.1.0.tar.gz" + sha256 "e6f999ee0f23f0e9c9aee5ad21c6647fb1a1572063bdccd16a72464c8b522cb1" + license "Apache-2.0" + head "https://github.com/JakeWharton/pidcat.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "c340b62825f294103c9e4866ca70e7cc13b85fd6adafcee7d9661bfad1743949" + end + + uses_from_macos "python" + + def install + # FIXME: `detected_python_shebang` doesn't correctly handle shebang with arguments + inreplace "pidcat.py", "#!/usr/bin/python -u", "#!/usr/bin/env -S python3 -u" + bin.install "pidcat.py" => "pidcat" + + bash_completion.install "bash_completion.d/pidcat" + zsh_completion.install "zsh-completion/_pidcat" + end + + test do + output = shell_output("#{bin}/pidcat com.oprah.bees.android 2>&1", 1) + assert_match "No such file or directory: 'adb'", output + + assert_match version.to_s, shell_output("#{bin}/pidcat --version") + end +end diff --git a/Formula/p/pidgin.rb b/Formula/p/pidgin.rb new file mode 100644 index 0000000000000..b841b9b5eab83 --- /dev/null +++ b/Formula/p/pidgin.rb @@ -0,0 +1,168 @@ +class Pidgin < Formula + desc "Multi-protocol chat client" + homepage "https://pidgin.im/" + license "GPL-2.0-or-later" + + stable do + url "https://downloads.sourceforge.net/project/pidgin/Pidgin/2.14.14/pidgin-2.14.14.tar.bz2" + sha256 "0ffc9994def10260f98a55cd132deefa8dc4a9835451cc0e982747bd458e2356" + + depends_on "intltool" => :build + depends_on "at-spi2-core" + depends_on "gnutls" + depends_on "gtk+" + depends_on "libgcrypt" + depends_on "libgnt" + depends_on "libotr" + depends_on "ncurses" # due to `libgnt` + depends_on "tcl-tk@8" # ignores TCL 9 + + uses_from_macos "cyrus-sasl" + uses_from_macos "expat" + uses_from_macos "perl" + + on_macos do + depends_on "harfbuzz" + depends_on "libgpg-error" + end + + on_linux do + depends_on "perl-xml-parser" => :build + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + depends_on "libxscrnsaver" + end + + # Finch has an equal port called purple-otr but it is a NIGHTMARE to compile + # If you want to fix this and create a PR on Homebrew please do so. + resource "pidgin-otr" do + url "https://otr.cypherpunks.ca/pidgin-otr-4.0.2.tar.gz" + sha256 "f4b59eef4a94b1d29dbe0c106dd00cdc630e47f18619fc754e5afbf5724ebac4" + end + end + + livecheck do + url "https://sourceforge.net/projects/pidgin/files/Pidgin/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/?["' >]}i) + strategy :page_match + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "72c05493b863e1278527fbb061d93950db72355c80f712a202eb327cee396d1d" + sha256 arm64_sequoia: "b29a4ae2b61df4ebe31ec8351174e8f827504b755b6d6897278fbbbb3fba47b2" + sha256 arm64_sonoma: "56d8ee2c91d79fbc88b8545a9afd844042f21a6ad31451160395858e6b4b6caf" + sha256 arm64_ventura: "67742939cf4f3c3d2fe6ad7caae0e4006378736a08464340889543d2a5d65157" + sha256 sonoma: "90e6291f5817c36034e83bb614e2cb186f3f92a4a7d5dda7ee6a5d2fcc90d25f" + sha256 ventura: "577b9023973407ba52c619daa63c75b286a4e700d0b571ce28d0e618b39046bd" + sha256 arm64_linux: "a51d7d196fbf4c6b302a1d9b9e5c8beecdba0c6518e3fa49166c830c91c63f9e" + sha256 x86_64_linux: "f128c2b0933fb5f28a237b1d96f8d98269d3bdc64ba61531f2e194ed3ea00679" + end + + head do + url "https://keep.imfreedom.org/pidgin/pidgin/", using: :hg + + depends_on "gi-docgen" => :build + depends_on "gobject-introspection" => :build + depends_on "gstreamer" => :build + depends_on "libsoup" => :build + depends_on "mercurial" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + + depends_on "gplugin" + depends_on "gtk4" + depends_on "gtksourceview5" + depends_on "json-glib" + depends_on "libadwaita" + depends_on "libspelling" + depends_on "sqlite" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "libidn" + depends_on "pango" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + if build.head? + # TODO: Patch pidgin to read plugins from HOMEBREW_PREFIX similar to stable build + ENV["DESTDIR"] = "/" + ENV["GI_GIR_PATH"] = HOMEBREW_PREFIX/"share/gir-1.0" + system "meson", "setup", "build", "--force-fallback-for=birb,hasl,ibis,seagull,xeme", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + return + end + + unless OS.mac? + # Fix linkage error due to RPATH missing directory with libperl.so + perl = DevelopmentTools.locate("perl") + perl_archlib = Utils.safe_popen_read(perl.to_s, "-MConfig", "-e", "print $Config{archlib}") + ENV.append "LDFLAGS", "-Wl,-rpath,#{perl_archlib}/CORE" + end + + if DevelopmentTools.clang_build_version >= 1600 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types -Wno-int-conversion" + end + + args = %W[ + --disable-avahi + --disable-dbus + --disable-doxygen + --disable-gevolution + --disable-gstreamer + --disable-gstreamer-interfaces + --disable-gtkspell + --disable-meanwhile + --disable-vv + --enable-consoleui + --enable-gnutls + --with-ncurses-headers=#{Formula["ncurses"].opt_include} + --with-tclconfig=#{Formula["tcl-tk@8"].opt_lib} + --with-tkconfig=#{Formula["tcl-tk@8"].opt_lib} + ] + args << "--without-x" if OS.mac? + + # patch pidgin to read plugins and allow them to live in separate formulae which can + # all install their symlinks into these directories. See: + # https://github.com/Homebrew/homebrew-core/pull/53557 + inreplace "finch/finch.c", "LIBDIR", "\"#{HOMEBREW_PREFIX}/lib/finch\"" + inreplace "libpurple/plugin.c", "LIBDIR", "\"#{HOMEBREW_PREFIX}/lib/purple-2\"" + inreplace "pidgin/gtkmain.c", "LIBDIR", "\"#{HOMEBREW_PREFIX}/lib/pidgin\"" + inreplace "pidgin/gtkutils.c", "DATADIR", "\"#{HOMEBREW_PREFIX}/share\"" + + system "./configure", *args, *std_configure_args + system "make", "install" + + resource("pidgin-otr").stage do + ENV.prepend "CFLAGS", "-I#{Formula["libotr"].opt_include}" + ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + end + + def post_install + system Formula["glib"].opt_bin/"glib-compile-schemas", HOMEBREW_PREFIX/"share/glib-2.0/schemas" if build.head? + end + + test do + system bin/"finch", "--version" + system bin/"pidgin", "--version" + + pid = spawn(bin/"pidgin", "--config=#{testpath}") + sleep 5 + Process.kill "SIGTERM", pid + end +end diff --git a/Formula/p/pidof.rb b/Formula/p/pidof.rb new file mode 100644 index 0000000000000..515c829cd96b4 --- /dev/null +++ b/Formula/p/pidof.rb @@ -0,0 +1,69 @@ +class Pidof < Formula + desc "Display the PID number for a given process name" + # `nightproductions.net` is no longer accessible, use internet archive urls instead. + homepage "https://web.archive.org/web/20240808152721/http://www.nightproductions.net/cli.htm" + url "https://web.archive.org/web/20240808152721/http://www.nightproductions.net/downloads/pidof_source.tar.gz" + mirror "https://distfiles.macports.org/pidof/pidof_source.tar.gz" + version "0.1.4" + sha256 "2a2cd618c7b9130e1a1d9be0210e786b85cbc9849c9b6f0cad9cbde31541e1b8" + license :cannot_represent + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a4a39bf5d7afe77664897dcd7eb1eb696554d932724b266fd0ff54b8f9a7602b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ec5871a736544b3d218e48cb3883ae457aa097eb0b9a37e666d069d00080fb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b066475e9ddce61ef79c68b32e46f173c2c8c685a7269f30fb966efc137bccd8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "964d09783be4f829eeac50a16939ba0f289fa2c88dc7fba155f258683f009884" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6b299aebe4224da62d4f287f46a6816362986a9a78089c3315ab2c4e2f946420" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a7d1943e3d14377270554f16198f105b0e00cc9d53da79c7d22bc7974b711a23" + sha256 cellar: :any_skip_relocation, sonoma: "e6282b449ff80b52362718d1fc34cdcb13ee00a570fbd0897a8a171040f5022b" + sha256 cellar: :any_skip_relocation, ventura: "0accd2ab3d57c68efa55bd50dfc7c5343ce1da7f6c9e76d534a6d6a234209973" + sha256 cellar: :any_skip_relocation, monterey: "1509f0473f6860e3836d43ed83f594982c3e4aa4af5b2a6be3f69ee55e1f74d1" + sha256 cellar: :any_skip_relocation, big_sur: "c3a5a73563d4ca6e329d293423f19639e98151ec72505fb926b00eab067cac55" + sha256 cellar: :any_skip_relocation, catalina: "634f42559aaa0582a6700c268737ba7cb7ec3bdadf2f3aa37c5a846604759459" + end + + # `nightproductions.net` is no longer accessible + deprecate! date: "2025-01-12", because: :repo_removed + + # Hard dependency on sys/proc.h, which isn't available on Linux + depends_on :macos + + def install + # Fix "error: call to undeclared function 'strcasestr'" and "error: call to undeclared function 'kill'" + # Contacted the upstream author via email on 2023-09-29 + inreplace "pidof.c", + "#import \n", + "#import \n#import \n#import \n" + + system "make", "all", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" + man1.install Utils::Gzip.compress("pidof.1") + bin.install "pidof" + end + + test do + assert_match "pidof version #{version}", shell_output("#{bin}/pidof -v") + (testpath/"homebrew_testing.c").write <<~C + #include + #include + + int main() + { + printf("Testing Pidof\\n"); + sleep(10); + return 0; + } + C + system ENV.cc, "homebrew_testing.c", "-o", "homebrew_testing" + (testpath/"homebrew_testing").chmod 0555 + + pid = fork { exec "./homebrew_testing" } + sleep 1 + begin + assert_match(/\d+/, shell_output("#{bin}/pidof homebrew_testing")) + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/p/pie.rb b/Formula/p/pie.rb new file mode 100644 index 0000000000000..261383d8dd770 --- /dev/null +++ b/Formula/p/pie.rb @@ -0,0 +1,29 @@ +class Pie < Formula + desc "PHP Installer for Extensions" + homepage "https://github.com/php/pie" + url "https://github.com/php/pie/releases/download/1.2.1/pie.phar" + sha256 "b3a30c3e70f6b590505f76e27f1163b328b3523f369200a8f769ca1005ac42f7" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f92f04f969d77f970faa6c6463a70dbb758778d159feaa3b9606d1a17a9026ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f92f04f969d77f970faa6c6463a70dbb758778d159feaa3b9606d1a17a9026ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f92f04f969d77f970faa6c6463a70dbb758778d159feaa3b9606d1a17a9026ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f92f04f969d77f970faa6c6463a70dbb758778d159feaa3b9606d1a17a9026ca" + sha256 cellar: :any_skip_relocation, sonoma: "e0952c74ab24eb0054f500fb169c1acf61d17ec87dec3ee6e9ce00a2f4ab5224" + sha256 cellar: :any_skip_relocation, ventura: "e0952c74ab24eb0054f500fb169c1acf61d17ec87dec3ee6e9ce00a2f4ab5224" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0952c74ab24eb0054f500fb169c1acf61d17ec87dec3ee6e9ce00a2f4ab5224" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0952c74ab24eb0054f500fb169c1acf61d17ec87dec3ee6e9ce00a2f4ab5224" + end + + depends_on "php" + + def install + bin.install "pie.phar" => "pie" + generate_completions_from_executable("php", bin/"pie", "completion") + end + + test do + system bin/"pie", "build", "apcu/apcu" + end +end diff --git a/Formula/p/pieces-cli.rb b/Formula/p/pieces-cli.rb new file mode 100644 index 0000000000000..ff4d2478dff79 --- /dev/null +++ b/Formula/p/pieces-cli.rb @@ -0,0 +1,251 @@ +class PiecesCli < Formula + include Language::Python::Virtualenv + + desc "Command-line tool for Pieces.app" + homepage "https://docs.pieces.app/products/cli" + url "https://files.pythonhosted.org/packages/f8/bb/48f95f63ca1c5b86564e6569f2e7bed542d351002dbc49702e1235bd7d1c/pieces_cli-1.19.0.tar.gz" + sha256 "0bfea482de3eada8d3612f7c107f02ba38d5f54e056e86743cad41f6cb9576c9" + license "MIT" + revision 1 + head "https://github.com/pieces-app/cli-agent.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "569d6c18a7eddac688b45181d601fdf67fd373cf593877c2aca84ba43eb2a7d5" + sha256 cellar: :any, arm64_sequoia: "fb37237268b2692a36387d8389d337decd51a64d7675954038216b94926c1c1a" + sha256 cellar: :any, arm64_sonoma: "2bb94a1a9a07634e2a075c641688d284566ff738bc605cbf4ec38d1c8dac6258" + sha256 cellar: :any, sonoma: "02d8e298c6a510dcf57759cf25af3bacdd2327c11bb37c90a256c3bde62aa7f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "20b115e0f948102d4a6ed3b5fad49af635d21632323fbbeabe6ad05f0b9d590d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3fa4bc1dc96a70d2bdde705c31ec9eda4a488f031df856e4342d6199dc28060f" + end + + depends_on "rust" => :build # for pydantic-core + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.13" # Pydantic v1 is incompatible with Python 3.14, issue ref: https://github.com/pieces-app/cli-agent/issues/430 + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi rpds-py] + + resource "aenum" do + url "https://files.pythonhosted.org/packages/e3/52/6ad8f63ec8da1bf40f96996d25d5b650fdd38f5975f8c813732c47388f18/aenum-3.1.16-py3-none-any.whl" + sha256 "9035092855a98e41b66e3d0998bd7b96280e85ceb3a04cc035636138a1943eaf" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/5a/79/5724a540df19e192e8606c543cdcf162de8eb435077520cca150f7365ec0/mcp-1.17.0.tar.gz" + sha256 "1b57fabf3203240ccc48e39859faf3ae1ccb0b571ff798bbedae800c73c6df90" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/c3/da/b8a7ee04378a53f6fefefc0c5e05570a3ebfdfa0523a878bcd3b475683ee/pydantic-2.12.0.tar.gz" + sha256 "c1a077e6270dbfb37bfd8b498b3981e2bb18f68103720e51fa6c306a5a9af563" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/7d/14/12b4a0d2b0b10d8e1d9a24ad94e7bbb43335eaf29c0c4e57860e8a30734a/pydantic_core-2.41.1.tar.gz" + sha256 "1ad375859a6d8c356b7704ec0f547a58e82ee80bb41baa811ad710e124bc8f2f" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/b3/18/09875b4323b03ca9025bae7e6539797b27e4fc032998a466b4b9c3d24653/sentry_sdk-2.43.0.tar.gz" + sha256 "52ed6e251c5d2c084224d73efee56b007ef5c2d408a4a071270e82131d336e20" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/db/3c/fa6517610dc641262b77cc7bf994ecd17465812c1b0585fe33e11be758ab/sse_starlette-3.0.3.tar.gz" + sha256 "88cfb08747e16200ea990c8ca876b03910a23b547ab3bd764c0d8eb81019b971" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ba/b8/73a0e6a6e079a9d9cfa64113d771e421640b6f679a52eeb9b32f72d871a1/starlette-0.50.0.tar.gz" + sha256 "a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + def install + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + test do + require "open3" + ## Most of the commands depends on PiecesOS so let's test the others + # Test the CLI version + assert_match version.to_s, shell_output("#{bin}/pieces --version --ignore-onboarding") + + # Try the list command (should ask to open PiecesOS) + stdin, stdout, _stderr, _wait_thr = Open3.popen3("#{bin}/pieces --ignore-onboarding list") + stdin.puts "n" + stdin.close + assert_match("Pieces OS is required but wasn’t found or couldn’t be launched.", stdout.read) + + ### Test the feedback command + stdin, stdout, _stderr, _wait_thr = Open3.popen3("#{bin}/pieces --ignore-onboarding feedback") + stdin.puts "n" + stdin.close + + # Collect output + feedback_output = stdout.read + assert_match("Thank you for using Pieces CLI!", feedback_output) + end +end diff --git a/Formula/p/pig.rb b/Formula/p/pig.rb new file mode 100644 index 0000000000000..a17cac3038452 --- /dev/null +++ b/Formula/p/pig.rb @@ -0,0 +1,33 @@ +class Pig < Formula + desc "Platform for analyzing large data sets" + homepage "https://pig.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=pig/pig-0.17.0/pig-0.17.0.tar.gz" + mirror "https://archive.apache.org/dist/pig/pig-0.17.0/pig-0.17.0.tar.gz" + sha256 "6d613768e9a6435ae8fa758f8eef4bd4f9d7f336a209bba3cd89b843387897f3" + license "Apache-2.0" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c64b39772253801fc72a6400bdbed3245bbd4308c78fc08ad329a1ce1781840a" + end + + depends_on "openjdk@17" + + def install + (libexec/"bin").install "bin/pig" + libexec.install Dir["pig-#{version}-core-h*.jar"] + libexec.install "lib" + + env = Language::Java.overridable_java_home_env("17") + env["PIG_HOME"] = libexec + (bin/"pig").write_env_script libexec/"bin/pig", env + end + + test do + (testpath/"test.pig").write <<~EOS + sh echo "Hello World" + EOS + assert_match "Hello World", shell_output("#{bin}/pig -x local test.pig") + end +end diff --git a/Formula/p/pigz.rb b/Formula/p/pigz.rb new file mode 100644 index 0000000000000..3f0d9e1060837 --- /dev/null +++ b/Formula/p/pigz.rb @@ -0,0 +1,52 @@ +class Pigz < Formula + desc "Parallel gzip" + homepage "https://zlib.net/pigz/" + url "https://zlib.net/pigz/pigz-2.8.tar.gz" + sha256 "eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0" + license "Zlib" + head "https://github.com/madler/pigz.git", branch: "develop" + + livecheck do + url :homepage + regex(/href=.*?pigz[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "61447a94a14880951c88b71720cd1528a5763708b692ad2c7fe0cfbd42f94f75" + sha256 cellar: :any, arm64_sequoia: "64097e66f14e0e16ab597007639492ac10e2d0f499968b757f91fa700f06f952" + sha256 cellar: :any, arm64_sonoma: "97752b6fd2b65df80d73068299789a714fb01b6b904fd843c142677e4f2c3db7" + sha256 cellar: :any, arm64_ventura: "ddd9fed16f07f42285d3a4a46b6d769f4ca2e902827dbd44a3f69597eca5cb77" + sha256 cellar: :any, arm64_monterey: "043af6f4e17cb7776003f982331552ed3b6ce10a46fdce4687952fa9443fbab8" + sha256 cellar: :any, arm64_big_sur: "1f4b378d4427db80c89231ddf0ca710f11c6a300d36687b30025dcd263c9441e" + sha256 cellar: :any, sonoma: "cd7b739570e228afbea2ad719c4789607d41a441d6c03dd4115a97e67cae729c" + sha256 cellar: :any, ventura: "0d30f581ef66c28103ccec510b9df46f2cd761bc9f9ce76af0422b60256739f7" + sha256 cellar: :any, monterey: "0ef362a072b9e707ee292162d44d46a23e9f04c1e239d05f462d20fad9c8c1b2" + sha256 cellar: :any, big_sur: "cd36e7d4ec7c3f373a4e74f280ac1001aa834d035f20a3ec3a2e3140f75fd525" + sha256 cellar: :any_skip_relocation, arm64_linux: "60978f631c2c096cd2ee62e2e3e8742ce16ef0ee7fb76d9258aec97915578d32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca1011cd83d5acec7b50fd581f4efa9d189c22058d652736f3dc565a0165c67b" + end + + depends_on "zopfli" + uses_from_macos "zlib" + + def install + libzopfli = Formula["zopfli"].opt_lib/shared_library("libzopfli") + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "ZOP=#{libzopfli}" + bin.install "pigz", "unpigz" + man1.install "pigz.1" + man1.install_symlink "pigz.1" => "unpigz.1" + end + + test do + test_data = "a" * 1000 + (testpath/"example").write test_data + system bin/"pigz", testpath/"example" + assert_predicate testpath/"example.gz", :file? + system bin/"unpigz", testpath/"example.gz" + assert_equal test_data, (testpath/"example").read + system "/bin/dd", "if=/dev/random", "of=foo.bin", "bs=1024k", "count=10" + system bin/"pigz", "foo.bin" + end +end diff --git a/Formula/p/pike.rb b/Formula/p/pike.rb new file mode 100644 index 0000000000000..cf47cba5d8b8a --- /dev/null +++ b/Formula/p/pike.rb @@ -0,0 +1,86 @@ +class Pike < Formula + desc "Dynamic programming language" + homepage "https://pike.lysator.liu.se/" + url "https://pike.lysator.liu.se/pub/pike/latest-stable/Pike-v8.0.1956.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/p/pike8.0/pike8.0_8.0.1956.orig.tar.gz" + sha256 "6a0f2677eb579865321bd75118c638c335860157a420a96e52e2765513dad4c0" + license any_of: ["GPL-2.0-only", "LGPL-2.1-only", "MPL-1.1"] + + livecheck do + url "https://pike.lysator.liu.se/download/pub/pike/latest-stable/" + regex(/href=.*?Pike[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0c0dbf05213979a83add31b2d9c0983fbaeda715b9d644886ae523e6da58524f" + sha256 arm64_sequoia: "1f3675eb394156e536145ea57151f73999675893f4827358673338d31e5dd044" + sha256 arm64_sonoma: "86a5d508ea7ef36bc6c160adce3672556ca34b0f636227cc78fb69b1ebe69579" + sha256 arm64_ventura: "6b6f4b66d20a1d4f0d12955f939280a02635e8c459d803ae90ba900d9b3d2401" + sha256 sonoma: "3020a095c90dea0257703d3c47f594c5c9d136655469d57e369d9e89daf3fe97" + sha256 ventura: "6cbd38e90fd0f66a8e87e084e7b78a659cf8e27c9b6f5e3ab001bdec2bd72656" + sha256 arm64_linux: "d508b63e39b6dc8e7be55395dc1a87dfc1da292ddc638a254b49c0bd7052887d" + sha256 x86_64_linux: "59dae235eeb446e2a34bcf99aa113b9571bb012f4559e44b973d2fbbd6d40832" + end + + depends_on "gettext" + depends_on "gmp" + depends_on "jpeg-turbo" + depends_on "libtiff" + depends_on "nettle" + depends_on "pcre" + depends_on "webp" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libxcrypt" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + depends_on "gnu-sed" => :build + end + + on_linux do + depends_on "libnsl" + end + + def install + ENV.append "CFLAGS", "-m64" if !OS.linux? || Hardware::CPU.intel? + ENV.deparallelize + + # Use GNU sed on macOS to avoid this build failure: + # sed: RE error: illegal byte sequence + # Reported upstream here: https://git.lysator.liu.se/pikelang/pike/-/issues/10082. + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + # clang: error: unsupported option '-mrdrnd' for target 'arm64-apple-darwin25.0.0' + ENV["pike_cv_option_opt_rdrnd"] = "no" if Hardware::CPU.arm? + + configure_args = %W[ + --prefix=#{libexec} + --with-abi=64 + --without-bundles + --without-freetype + --without-gdbm + --without-odbc + ] + + system "make", "CONFIGUREARGS=#{configure_args.join(" ")}" + system "make", "install", "INSTALLARGS=--traditional" + + bin.install_symlink libexec/"bin/pike" + man1.install_symlink libexec/"share/man/man1/pike.1" + end + + test do + path = testpath/"test.pike" + path.write <<~EOS + int main() { + for (int i=0; i<10; i++) { write("%d", i); } + return 0; + } + EOS + + assert_equal "0123456789", shell_output("#{bin}/pike #{path}").strip + end +end diff --git a/Formula/p/piknik.rb b/Formula/p/piknik.rb new file mode 100644 index 0000000000000..f0812b5c2c9fc --- /dev/null +++ b/Formula/p/piknik.rb @@ -0,0 +1,63 @@ +class Piknik < Formula + desc "Copy/paste anything over the network" + homepage "https://github.com/jedisct1/piknik" + url "https://github.com/jedisct1/piknik/archive/refs/tags/0.10.2.tar.gz" + sha256 "937e98cc80569e4e295baa0ad7fa998da593af137eb33e191b12b23d2ca3a666" + license "BSD-2-Clause" + head "https://github.com/jedisct1/piknik.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f7929f75bf041543fa64ab97f1d36ae8bda93d70ab052e9e6e886c1fad752e6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5c60ad4cad0bbf6a504f28053f1668b8b209a6bf473a8c477f53a5bf7b4665b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a5c60ad4cad0bbf6a504f28053f1668b8b209a6bf473a8c477f53a5bf7b4665b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5c60ad4cad0bbf6a504f28053f1668b8b209a6bf473a8c477f53a5bf7b4665b" + sha256 cellar: :any_skip_relocation, sonoma: "794e44f78e1ac05b76da93e9ebcd02080d4dae1fbcdb5e186fd8779215499136" + sha256 cellar: :any_skip_relocation, ventura: "794e44f78e1ac05b76da93e9ebcd02080d4dae1fbcdb5e186fd8779215499136" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1b1c1a5ddc70994723a063303873b3283283e42bc38267630ffe613195e16bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec30a0fe6f7a5e8995c8f14174d5e7fd5e51a843db398bdf1e5d05b5a1c0fa74" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + (prefix/"etc/profile.d").install "zsh.aliases" => "piknik.sh" + end + + def caveats + <<~EOS + In order to get convenient shell aliases, add the following to your shell + profile e.g. ~/.profile or ~/.zshrc: + . #{etc}/profile.d/piknik.sh + EOS + end + + service do + run [opt_bin/"piknik", "-server"] + end + + test do + conffile = testpath/"testconfig.toml" + + genkeys = shell_output("#{bin}/piknik -genkeys") + lines = genkeys.lines.grep(/\s+=\s+/).map { |x| x.gsub(/\s+/, " ").gsub(/#.*/, "") }.uniq + conffile.write lines.join("\n") + pid = fork do + exec bin/"piknik", "-server", "-config", conffile + end + begin + sleep 1 + IO.popen([{}, bin/"piknik", "-config", conffile, "-copy"], "w+") do |p| + p.write "test" + end + IO.popen([{}, bin/"piknik", "-config", conffile, "-move"], "r") do |p| + clipboard = p.read + assert_equal clipboard, "test" + end + ensure + Process.kill("TERM", pid) + Process.wait(pid) + conffile.unlink + end + end +end diff --git a/Formula/p/pillow.rb b/Formula/p/pillow.rb new file mode 100644 index 0000000000000..9f571997d524e --- /dev/null +++ b/Formula/p/pillow.rb @@ -0,0 +1,109 @@ +class Pillow < Formula + desc "Friendly PIL fork (Python Imaging Library)" + homepage "https://python-pillow.github.io/" + url "https://files.pythonhosted.org/packages/5a/b0/cace85a1b0c9775a9f8f5d5423c8261c858760e2466c79b2dd184638b056/pillow-12.0.0.tar.gz" + sha256 "87d4f8125c9988bfbed67af47dd7a953e2fc7b0cc1e7800ec6d2080d490bb353" + license "HPND" + head "https://github.com/python-pillow/Pillow.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ff2bbd99dda7ce7abb304d4928959c1724f6ddf193194021b1c3074966eeb4b3" + sha256 cellar: :any, arm64_sequoia: "1833bd4053addaf27fc722cd8a492436a59e3cf02a219a94bf84f49c63537d2e" + sha256 cellar: :any, arm64_sonoma: "fcb4113eb505824c5c113b6aef44af0dea7b9bf7c877f07483d5ebed1265948a" + sha256 cellar: :any, sonoma: "e54ba44aa57a4ca0654b4dd48e65205b1d410f232658280ca24af471bacc6bae" + sha256 arm64_linux: "b106456d1752531caca067c9a2759f5eb27da100fb40adf30b6326056e7edc8d" + sha256 x86_64_linux: "46340278cadab63940fbcf66191001ac0ab1e89522c9cd9801cf484939e963c3" + end + + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libavif" + depends_on "libimagequant" + depends_on "libraqm" + depends_on "libtiff" + depends_on "libxcb" + depends_on "little-cms2" + depends_on "openjpeg" + depends_on "webp" + + uses_from_macos "zlib" + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@\d\.\d+$/) } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + ENV["MAX_CONCURRENCY"] = ENV.make_jobs.to_s + deps.each do |dep| + next if dep.build? || dep.test? + + ENV.prepend "CPPFLAGS", "-I#{dep.to_formula.opt_include}" + ENV.prepend "LDFLAGS", "-L#{dep.to_formula.opt_lib}" + end + + pythons.each do |python| + system python, "-m", "pip", "install", *std_pip_args(build_isolation: true), + "-C", "debug=true", # Useful in case of build failures. + "-C", "tiff=enable", + "-C", "freetype=enable", + "-C", "lcms=enable", + "-C", "webp=enable", + "-C", "xcb=enable", + "-C", "avif=enable", + "." + end + end + + test do + (testpath/"test.py").write <<~PYTHON + from PIL import Image + im = Image.open("#{test_fixtures("test.jpg")}") + print(im.format, im.size, im.mode) + PYTHON + + pythons.each do |python| + assert_equal "JPEG (1, 1) RGB", shell_output("#{python} test.py").chomp + end + + # Test webp support + resource "test-webp" do + url "https://raw.githubusercontent.com/python-pillow/Pillow/refs/heads/main/Tests/images/flower.webp" + sha256 "af5bf1a0e420467c09d221fbfbb739646956c17f2b67f8280eacfacf87059a37" + end + + testpath.install resource("test-webp") + test_webp = testpath/"flower.webp" + (testpath/"test_webp.py").write <<~PYTHON + from PIL import Image + im = Image.open("#{test_webp}") + print(im.format, im.size, im.mode) + PYTHON + + pythons.each do |python| + assert_equal "WEBP (480, 360) RGB", shell_output("#{python} test_webp.py").chomp + end + + # Test avif support + resource "test-avif" do + url "https://raw.githubusercontent.com/python-pillow/Pillow/refs/heads/main/Tests/images/avif/exif.avif" + sha256 "438dc63eb5aa722f4b23a93ac48cd0c19b7a575865c89e666c86b7ac363cff04" + end + + testpath.install resource("test-avif") + test_avif = testpath/"exif.avif" + (testpath/"test_avif.py").write <<~PYTHON + from PIL import Image + im = Image.open("#{test_avif}") + print(im.format, im.size, im.mode) + PYTHON + + pythons.each do |python| + assert_equal "AVIF (512, 512) RGB", shell_output("#{python} test_avif.py").chomp + end + end +end diff --git a/Formula/p/pinact.rb b/Formula/p/pinact.rb new file mode 100644 index 0000000000000..dce9c05fb6dfe --- /dev/null +++ b/Formula/p/pinact.rb @@ -0,0 +1,59 @@ +class Pinact < Formula + desc "Pins GitHub Actions to full hashes and versions" + homepage "https://github.com/suzuki-shunsuke/pinact" + url "https://github.com/suzuki-shunsuke/pinact/archive/refs/tags/v3.4.2.tar.gz" + sha256 "2b47c1d6fee9b41a58e21d1d9452fae7434134637472e80e499490079922f389" + license "MIT" + head "https://github.com/suzuki-shunsuke/pinact.git", branch: "main" + + # Pre-release version has a suffix `-\d` for example `3.0.0-0` + # so we restrict the regex to only match stable versions + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9e3cf9e0c727a364e9cd161cdc0f42280bc0469b794f932c5ff8a3a727491dac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa2d9116a18e4ea598c6be98753d56b5a5d6fab0824bbd3f52c8489d81342f8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa2d9116a18e4ea598c6be98753d56b5a5d6fab0824bbd3f52c8489d81342f8c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa2d9116a18e4ea598c6be98753d56b5a5d6fab0824bbd3f52c8489d81342f8c" + sha256 cellar: :any_skip_relocation, sonoma: "94deb0851fff9d0d0bc1aa2c69c365fd36b8db031de05e67d67386db8dd05c3b" + sha256 cellar: :any_skip_relocation, ventura: "94deb0851fff9d0d0bc1aa2c69c365fd36b8db031de05e67d67386db8dd05c3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e261ce1825ea0479308c9ab855910bc12183331548b07e980c94a044bd401627" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94f6d8cc146f483b4bf1cf260d6ec023e6a49d56dae26c2f3c4cd8cd8b6a7724" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/pinact" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pinact --version") + + (testpath/"action.yml").write <<~YAML + name: CI + + on: push + + jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: npm install && npm test + YAML + + system bin/"pinact", "run", "action.yml" + + assert_match(%r{.*?actions/checkout@[a-f0-9]{40}}, (testpath/"action.yml").read) + end +end diff --git a/Formula/p/pinboard-notes-backup.rb b/Formula/p/pinboard-notes-backup.rb new file mode 100644 index 0000000000000..8e88ff49ce074 --- /dev/null +++ b/Formula/p/pinboard-notes-backup.rb @@ -0,0 +1,39 @@ +class PinboardNotesBackup < Formula + desc "Efficiently back up the notes you've saved to Pinboard" + homepage "https://github.com/bdesham/pinboard-notes-backup" + url "https://github.com/bdesham/pinboard-notes-backup/archive/refs/tags/v1.0.7.1.tar.gz" + sha256 "8539a62b8a4a718a716ecc4bf17150d7cef8a358b43fbca458de3540db3d5177" + license "GPL-3.0-or-later" + head "https://github.com/bdesham/pinboard-notes-backup.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7ecf5ebe63dd2afd072c841fdd93b48a83a4432ff21cf382eaf5d63513139768" + sha256 cellar: :any, arm64_sequoia: "3adc5f0a65085d294884fb2e4d9f30c5680258993cf42109fed2e888b060ef30" + sha256 cellar: :any, arm64_sonoma: "0d68e9af81f782a5e5448b689c3dabc728b85271730b4dd9bbd54ecf3837f98c" + sha256 cellar: :any, arm64_ventura: "adaebd25181a724dec9e17272ef0f2fcd98d0219fbd36653038dddcaf9b11f7b" + sha256 cellar: :any, sonoma: "ddccefd960008324daef76cd30ea92b6870d939c01c3c3e6caa15e01428f65fb" + sha256 cellar: :any, ventura: "4ddbd28f4fb04213eb995c1e4dde8acd9ca1d7f339155ffd3b818ad5100ca366" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a286933d552029876b9c8957cf278b92eddc5c37abc8758ebc234fc3e053ce4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97a89973ad6d4fcb0ff7c5caa530764272ff4d73ed938cbb86acd0692cf36b08" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + man1.install "man/pnbackup.1" + end + + # A real test would require hard-coding someone's Pinboard API key here + test do + assert_match "TOKEN", shell_output("#{bin}/pnbackup Notes.sqlite 2>&1", 1) + output = shell_output("#{bin}/pnbackup -t token Notes.sqlite 2>&1", 1) + assert_match "HTTP 500 response", output + end +end diff --git a/Formula/p/pinentry-mac.rb b/Formula/p/pinentry-mac.rb new file mode 100644 index 0000000000000..59bac7430852b --- /dev/null +++ b/Formula/p/pinentry-mac.rb @@ -0,0 +1,55 @@ +class PinentryMac < Formula + desc "Pinentry for GPG on Mac" + homepage "https://github.com/GPGTools/pinentry" + url "https://github.com/GPGTools/pinentry/archive/refs/tags/v1.3.1.1.tar.gz" + sha256 "ba929dd1c57b102fbfca12bc2d784be441498e7c82ee97a1231cbe03dcda7ae9" + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later"] + head "https://github.com/GPGTools/pinentry.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "784844f7e5ccb8be3b5eeb567318c8948f492c57e70289189a296dcdaa31cb7d" + sha256 cellar: :any, arm64_sequoia: "f0cacdc9497edf7391983fe84573ddfd826d0315680847a3f78ec020b6d145e5" + sha256 cellar: :any, arm64_sonoma: "6c879dba2621079072e566b95c00f96e7731a164dc6206054933058375df7014" + sha256 cellar: :any, arm64_ventura: "9fd717f5a5b6223bd307503d72290ba678b8f0af9d185e952741bd6f73dab482" + sha256 cellar: :any, sonoma: "bac8b8241d3fa0eaaba5bb9073f1f5a32fa064ab59ab2f230a1e86efb432d9d8" + sha256 cellar: :any, ventura: "e454945cc2ca007d6c030f75389380aa3892183bf9214181c98b5949cc3ecddf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on xcode: :build # for ibtool + depends_on "libassuan" + depends_on "libgpg-error" + depends_on :macos + + def install + ENV.append_path "ACLOCAL_PATH", Formula["gettext"].pkgshare/"m4" + + system "./autogen.sh" + system "./configure", "--disable-doc", + "--disable-ncurses", + "--disable-silent-rules", + "--enable-maintainer-mode", + *std_configure_args + system "make" + prefix.install "macosx/pinentry-mac.app" + bin.write_exec_script prefix/"pinentry-mac.app/Contents/MacOS/pinentry-mac" + end + + def caveats + <<~EOS + You can now set this as your pinentry program like + + ~/.gnupg/gpg-agent.conf + pinentry-program #{HOMEBREW_PREFIX}/bin/pinentry-mac + EOS + end + + test do + assert_match version.major_minor_patch.to_s, shell_output("#{bin}/pinentry-mac --version") + end +end diff --git a/Formula/p/pinentry.rb b/Formula/p/pinentry.rb new file mode 100644 index 0000000000000..1663ed9f4569a --- /dev/null +++ b/Formula/p/pinentry.rb @@ -0,0 +1,59 @@ +class Pinentry < Formula + desc "Passphrase entry dialog utilizing the Assuan protocol" + homepage "https://www.gnupg.org/related_software/pinentry/" + url "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.3.2.tar.bz2" + mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/pinentry/pinentry-1.3.2.tar.bz2" + sha256 "8e986ed88561b4da6e9efe0c54fa4ca8923035c99264df0b0464497c5fb94e9e" + license "GPL-2.0-only" + + livecheck do + url "https://gnupg.org/ftp/gcrypt/pinentry/" + regex(/href=.*?pinentry[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8db428e52232580a5acf1da5a370c39c425e5320a28e967ae091f1c82596b50a" + sha256 cellar: :any, arm64_sequoia: "f6dfd4bfdda001ddfddbed01c6ad7e06408ff022788a7718d35e443ebcb31274" + sha256 cellar: :any, arm64_sonoma: "45317e1d4023306c38e0118f48f75fbdc09df2b22ca0428f747ad4844413bd2c" + sha256 cellar: :any, arm64_ventura: "114df538a9d7172db7eb15b1c1380617fe8e7f3da735d1941dd3fef520aeaeec" + sha256 cellar: :any, sonoma: "d0efed8b2727ae08821905faaae114946dc6ca476acc9e64f05b9d54923ec965" + sha256 cellar: :any, ventura: "d5febb0ffec00281abc40d54ebf90929861452ea2a9dee1394a54f9ccb96dc3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5b34aeb57f37731401747e632485c6e5d8d6b60f1e025323558d7b0b3dac96e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92da639e8c37468025b9464abc36f6b15d13a2a096c25c0c860450745c7d696d" + end + + depends_on "pkgconf" => :build + depends_on "libassuan" + depends_on "libgpg-error" + + uses_from_macos "ncurses" + + on_linux do + depends_on "glib" + depends_on "libsecret" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + args = %w[ + --disable-silent-rules + --disable-pinentry-fltk + --disable-pinentry-gnome3 + --disable-pinentry-gtk2 + --disable-pinentry-qt + --disable-pinentry-qt5 + --disable-pinentry-tqt + --enable-pinentry-tty + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"pinentry", "--version" + system bin/"pinentry-tty", "--version" + end +end diff --git a/Formula/p/pinfo.rb b/Formula/p/pinfo.rb new file mode 100644 index 0000000000000..a240fe79fe6cf --- /dev/null +++ b/Formula/p/pinfo.rb @@ -0,0 +1,54 @@ +class Pinfo < Formula + desc "User-friendly, console-based viewer for Info documents" + homepage "https://packages.debian.org/sid/pinfo" + url "https://github.com/baszoetekouw/pinfo/archive/refs/tags/v0.6.13.tar.gz" + sha256 "9dc5e848a7a86cb665a885bc5f0fdf6d09ad60e814d75e78019ae3accb42c217" + license "GPL-2.0-only" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "667ab0c89a77262f57669ed57148c06df889bdc835231752a1dd4fd279142263" + sha256 arm64_sequoia: "156abee096126843dea45d4b863b41cfaf28f9acd4fd8932b1388b981b299e5f" + sha256 arm64_sonoma: "8cd30c690fd15b9a98a0c7ebf41c7529d6c1fd06467290d228eb585d5de04d9e" + sha256 arm64_ventura: "40d137796340727ecdbb3d1c82a2fe46852cd944eec6cc30d18fe2b8a11e1e97" + sha256 arm64_monterey: "64b61bdd18dca5533f6bee2239e0c0eb8740b324697c58e03249c840b66d87d9" + sha256 arm64_big_sur: "2592140c0bf2f8e5889f3e2020e163d097b6256bde001139dd88b778f7a985a6" + sha256 sonoma: "8c1ed7c9caa2cb4c5bd596b7ef1ff34b71769a1cacd84994934d85ecda801295" + sha256 ventura: "d58cfe18f25ef00cf2ccf976de9be9d7ce169f67370710aa596d82c0b1722396" + sha256 monterey: "46b86e8f4ff8565977416468316300d749bc65850d5c6fb6afc4b5d8cbcf9162" + sha256 big_sur: "9d4ae5da430d85f09f2ef7a2b5292976c3db781f80fd1b249e9d0caa05f74c4e" + sha256 catalina: "a41b568910292b2119d0f63f53d5015d781b03576a58f08d397535560d407bf5" + sha256 arm64_linux: "0fc3fd25aa157f655c7c9e98252b638f7233bb98de481e07808270df7f390a8f" + sha256 x86_64_linux: "9823885d8c5febf0b8415e6ac455fec62834b65b75333eec2a314dfeaf2bfd61" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "gettext" + + uses_from_macos "ncurses" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `use_manual'; pinfo-pinfo.o:(.bss+0x8): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "autoreconf", "--force", "--install" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"pinfo", "-h" + end +end diff --git a/Formula/p/pinocchio.rb b/Formula/p/pinocchio.rb new file mode 100644 index 0000000000000..fd62c90f4e500 --- /dev/null +++ b/Formula/p/pinocchio.rb @@ -0,0 +1,93 @@ +class Pinocchio < Formula + desc "Efficient and fast C++ library implementing Rigid Body Dynamics algorithms" + homepage "https://stack-of-tasks.github.io/pinocchio" + license "BSD-2-Clause" + revision 2 + head "https://github.com/stack-of-tasks/pinocchio.git", branch: "devel" + + stable do + url "https://github.com/stack-of-tasks/pinocchio/releases/download/v3.8.0/pinocchio-3.8.0.tar.gz" + sha256 "aa4664d95a54af7197354a80f5ad324cb291b00593886b78dd868b1fd13636ca" + + # Backport support for Boost 1.89.0 + patch do + url "https://github.com/stack-of-tasks/pinocchio/commit/fbc4ee6dcf3a082834472faef137aff680aed185.patch?full_index=1" + sha256 "3e06a335e5722d8bce41825d2e4cc7c24ecb901c59bf5b4e1a41e7534508c35c" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "e19d2282d0794c232d922aa9e3a5af8f5ca23fbe4b25c28e9602450e6f39a61e" + sha256 arm64_sequoia: "beed70e9a4fcd296b71206024dedf8881ec0fcf0b6dbf58dc8c6b3f43b59ba99" + sha256 arm64_sonoma: "44ad5aeba610332c165aec43354f5c93a44a46894626de76dc878c5bb3e4826f" + sha256 cellar: :any, sonoma: "477f4b339d7469f71458bff271d3195f0d91e33efab32d967bd30edd8546095b" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fad8d887a620862757488344c7652a2ba75edbcd1aa67f0cf7bc346a5a38d9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "442ad85615f7ef8f854c80ae37ac5607f50eeeca5d047092a763f832606ab4c3" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + + depends_on "boost" + depends_on "boost-python3" + depends_on "coal" + depends_on "console_bridge" + depends_on "eigen" + depends_on "eigenpy" + depends_on "python@3.14" + depends_on "urdfdom" + + on_macos do + depends_on "octomap" + end + + # Apply open PR to fix build with eigen 5.0.0 + # PR ref: https://github.com/stack-of-tasks/pinocchio/pull/2779 + patch do + url "https://github.com/stack-of-tasks/pinocchio/commit/cd06f874671f44507777663fe36d643035d20300.patch?full_index=1" + sha256 "f3bde3a9c1a094aff88ea11d767651f11a245d24857f375f4fed20f0abf58cbf" + end + patch do + url "https://github.com/stack-of-tasks/pinocchio/commit/a25d222611a695a209375a27780cef5579c0e50a.patch?full_index=1" + sha256 "1c54ce6f2b0ce1eb4f804794ac3ce812866cdfa784c521beb555d463a332dca2" + end + patch do + url "https://github.com/stack-of-tasks/pinocchio/commit/2dd5857b4fb418de3b37c98d49b5f31fc59c5bb3.patch?full_index=1" + sha256 "8a6b1f107af678de080b64f95e4525044e50f31c95a91cf0d892fdd09bdaa2c3" + end + + def python3 + "python3.14" + end + + def install + if build.head? + system "git", "submodule", "update", "--init" + system "git", "pull", "--unshallow", "--tags" + end + + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which(python3)}", + "-DBUILD_UNIT_TESTS=OFF", + "-DBUILD_WITH_COLLISION_SUPPORT=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system python3, "-c", <<~PYTHON + import pinocchio + model = pinocchio.Model() + data = model.createData() + assert model.nv == 0 and model.nq == 0 + PYTHON + end +end diff --git a/Formula/p/pinot.rb b/Formula/p/pinot.rb new file mode 100644 index 0000000000000..7e5f3faee31c1 --- /dev/null +++ b/Formula/p/pinot.rb @@ -0,0 +1,68 @@ +class Pinot < Formula + desc "Realtime distributed OLAP datastore" + homepage "https://pinot.apache.org/" + url "https://downloads.apache.org/pinot/apache-pinot-1.4.0/apache-pinot-1.4.0-bin.tar.gz" + sha256 "cb2a03abcdd0aa35e20e8c2918f78438efb1301a6f1918c3ae27b9ac1daa3f2b" + license "Apache-2.0" + head "https://github.com/apache/pinot.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b506cb9aee29895a8e06e79df73e078a71146b32ee758d0071b388ac30d93c7c" + end + + depends_on "openjdk@21" + + def install + java_env = Language::Java.java_home_env("21").merge(PATH: "${JAVA_HOME}/bin:${PATH}") + (var/"lib/pinot/data").mkpath + + libexec.install "lib" + libexec.install "plugins" + + prefix.install "bin" + bin.env_script_all_files(libexec/"bin", java_env) + bin.glob("*.sh").each { |f| mv f, bin/f.basename(".sh") } + end + + service do + run [opt_bin/"pinot-admin", "QuickStart", "-type", "BATCH", "-dataDir", var/"lib/pinot/data"] + keep_alive true + working_dir var/"lib/pinot" + log_path var/"log/pinot/pinot_output.log" + error_log_path var/"log/pinot/pinot_output.log" + end + + test do + zkport = free_port + controller_port = free_port + + zkpid = fork do + exec "#{opt_bin}/pinot-admin", + "StartZookeeper", + "-zkPort", + zkport.to_s + end + + sleep 10 + sleep 30 if Hardware::CPU.intel? + + controller_pid = fork do + exec "#{opt_bin}/pinot-admin", + "StartController", + "-zkAddress", + "localhost:#{zkport}", + "-controllerPort", + controller_port.to_s + end + + sleep 30 + sleep 30 if Hardware::CPU.intel? + + assert_match("HTTP/1.1 200 OK", shell_output("curl -i http://localhost:#{controller_port} 2>&1")) + ensure + Process.kill "TERM", controller_pid + Process.wait controller_pid + Process.kill "TERM", zkpid + Process.wait zkpid + end +end diff --git a/Formula/p/pint.rb b/Formula/p/pint.rb new file mode 100644 index 0000000000000..30b2e650afad8 --- /dev/null +++ b/Formula/p/pint.rb @@ -0,0 +1,52 @@ +class Pint < Formula + desc "Prometheus rule linter/validator" + homepage "https://cloudflare.github.io/pint/" + url "https://github.com/cloudflare/pint/archive/refs/tags/v0.76.1.tar.gz" + sha256 "c73f506e0465fac36e3e43f599b623c5a1e4f33c467895cbe85b4b47bab58b2c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bb5ed85c0864d3a295367e3bebde2bff85fd01c05d141ea81782b0c1bc85dd84" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d268460ee0157f7eb7b669cfb4648128ed37f69a42c5c1b3d72300ca948e302" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "046802acaf9a83591fb43770f7e9104389a99a244118f456e0c51ae89bb77d6c" + sha256 cellar: :any_skip_relocation, sonoma: "f1c51b909491934376f5885ea59e094c1c20b60695d7308348a2400284e6acb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a565702fb0bfb5db7c29d13c7cdde99ad0feea054070cb110c5ba52e601856c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d2c93f5c7aab53cdd2ba446b891636f945e9c87508dd2b500193fba5eddf75e6" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/pint" + + pkgshare.install "docs/examples" + end + + test do + (testpath/"test.yaml").write <<~YAML + groups: + - name: example + rules: + - alert: HighRequestLatency + expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5 + for: 10m + labels: + severity: page + annotations: + summary: High request latency + YAML + + cp pkgshare/"examples/simple.hcl", testpath/".pint.hcl" + + output = shell_output("#{bin}/pint -n lint #{testpath}/test.yaml 2>&1") + assert_match "level=INFO msg=\"Loading configuration file\" path=.pint.hcl", output + assert_match "level=INFO msg=\"Problems found\" Warning=6", output + + assert_match version.to_s, shell_output("#{bin}/pint version") + end +end diff --git a/Formula/p/pioneer.rb b/Formula/p/pioneer.rb new file mode 100644 index 0000000000000..e34ce152c6174 --- /dev/null +++ b/Formula/p/pioneer.rb @@ -0,0 +1,53 @@ +class Pioneer < Formula + desc "Game of lonely space adventure" + homepage "https://pioneerspacesim.net/" + url "https://github.com/pioneerspacesim/pioneer/archive/refs/tags/20250501.tar.gz" + sha256 "959902d98a79536bd44f25bd7b29e48da94aeac597228776b0f91635877f362e" + license "GPL-3.0-only" + revision 1 + head "https://github.com/pioneerspacesim/pioneer.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "108e3d19d6b670ac092545116b6a9d33464edd8a37c517a3dcc424331f28b527" + sha256 arm64_sequoia: "574d8bbe6db0b59bc597150357e398b585d43a73fc0d42caa35065431940bdf3" + sha256 arm64_sonoma: "1435e6d5b33fa91933bf3fd78dc18bb77e049865b30cc39c2e2b69d09d6c258e" + sha256 arm64_ventura: "ae2dc446aff1982e591b87bfe6ba1f299d1a3d086efe948838a1af08e8adb0f1" + sha256 sonoma: "63abc82602c824bc4e5e481ca5614903adc120b7a4e4df580e37ca3d6a0b7366" + sha256 ventura: "7cae2e2ac52da2fbf163cc15c9d4e0b1f20e698eb084cd7ce29be948d3c313a5" + sha256 arm64_linux: "551fc6bc1f0ac03a7b11e03b9b39e0a9e17dcc6ce3e11b4bf83a4b819e8cbdb2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c6ab627311d3943bdafbde7f773e0fff0257267ae95753b4d720ed309fc2423" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "assimp" + depends_on "freetype" + depends_on "glew" + depends_on "libpng" + depends_on "libsigc++@2" + depends_on "libvorbis" + depends_on "sdl2" + depends_on "sdl2_image" + + on_linux do + depends_on "mesa" + end + + # patch to fix `pi_lua_generic_push` call, upstream pr ref, https://github.com/pioneerspacesim/pioneer/pull/6000 + patch do + url "https://github.com/pioneerspacesim/pioneer/commit/9293a5f84584d7dd10699c64f28647a576ca059b.patch?full_index=1" + sha256 "c93e0f8745d9e1dc7989a0051489be7825df452e0d1fa0cf654038f1486e2f9f" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "pioneer #{version}", shell_output("#{bin}/pioneer -v 2>&1").chomp + assert_match "modelcompiler #{version}", shell_output("#{bin}/modelcompiler -v 2>&1").chomp + end +end diff --git a/Formula/p/pioneers.rb b/Formula/p/pioneers.rb new file mode 100644 index 0000000000000..cb6636feaa2ab --- /dev/null +++ b/Formula/p/pioneers.rb @@ -0,0 +1,69 @@ +class Pioneers < Formula + desc "Settlers of Catan clone" + homepage "https://pio.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pio/Source/pioneers-15.6.tar.gz" + sha256 "9a358d88548e3866e14c46c2707f66c98f8040a7857d47965e1ed9805aeb631d" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "adf66c9f80045db5ecfe7557d06d1e6aa95dc4a8e07c6d144106b350f5826c7c" + sha256 arm64_sequoia: "f8818813a32e582cfe48b07fea5acb1f9796fb529586e2b1d73eded630f64eb4" + sha256 arm64_sonoma: "322552b3012b80d29fbb86bd7986a9819857e34f37a4e25d5787ba891318f17f" + sha256 arm64_ventura: "e4593b8a69cf0aa9ce87ffe07240f877ec2462d6f2956d7757bc35656e7946d2" + sha256 arm64_monterey: "9dc75e65f88e84ce1354958dab915fc80436b07ea720239479e1d82ead6fbd8c" + sha256 sonoma: "18c79c7b8137ddbb485fa0a501ab0b163dd08670370a25b8d1abbcac7032ccb7" + sha256 ventura: "120b652031fbd995e43ef02538d039e44c99f5b845901d329703fb5d027b6d27" + sha256 monterey: "b1f802ac210dbce9ce41084ea23c54af80519e44730546734b56dc2db6ae44f2" + sha256 arm64_linux: "dee6715b417bc783ebdce0da7c02b6bca21d1ffa02e6f84db1dad9d409abaee4" + sha256 x86_64_linux: "3efeb1b6c8a348562ebb969cbd877612cefe83e65b54bd52533f9bed290f8bc9" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "itstool" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "librsvg" # svg images for gdk-pixbuf + depends_on "pango" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" unless OS.mac? + + # fix usage of echo options not supported by sh + inreplace "Makefile.in", /\becho/, "/bin/echo" + + # GNU ld-only options + inreplace Dir["configure{,.ac}"] do |s| + s.gsub!(" -Wl,--as-needed", "") + s.gsub!(/ -Wl,-z,(relro|now)/, "") + end + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"pioneers-editor", "--help" + server = spawn bin/"pioneers-server-console" + sleep 5 + Process.kill("TERM", server) + end +end diff --git a/Formula/p/pip-audit.rb b/Formula/p/pip-audit.rb new file mode 100644 index 0000000000000..227283f71ee71 --- /dev/null +++ b/Formula/p/pip-audit.rb @@ -0,0 +1,159 @@ +class PipAudit < Formula + include Language::Python::Virtualenv + + desc "Audits Python environments and dependency trees for known vulnerabilities" + homepage "https://pypi.org/project/pip-audit/" + url "https://files.pythonhosted.org/packages/cc/7f/28fad19a9806f796f13192ab6974c07c4a04d9cbb8e30dd895c3c11ce7ee/pip_audit-2.9.0.tar.gz" + sha256 "0b998410b58339d7a231e5aa004326a294e4c7c6295289cdc9d5e1ef07b1f44d" + license "Apache-2.0" + revision 2 + version_scheme 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "017e8e28f5b008268a3758cd3a4f298bd3ff6989d27cc8cf2bec06b6a6ab3b28" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5da23007467c4c8c6b6f10e4caf0070e922a53f29065ac69b4bc64657796fef8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2be5f69a14ce581fe424f22df5940cc07c815a577a3e250e70c3c1b8712b93a7" + sha256 cellar: :any_skip_relocation, sonoma: "b93880459ced676a57b313c60acbf6513cb2261d402c09d627c4f22ceafe8b48" + sha256 cellar: :any_skip_relocation, arm64_linux: "8037699fecf2b10d29613b26915465e2612f6956019f78433be0e28cd8a36793" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5881e06137a7145b196061ba8cf62ef86c571d8f8a211b749815e1431049719" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "cachecontrol" do + url "https://files.pythonhosted.org/packages/58/3a/0cbeb04ea57d2493f3ec5a069a117ab467f85e4a10017c6d854ddcbff104/cachecontrol-0.14.3.tar.gz" + sha256 "73e7efec4b06b20d9267b441c1f733664f989fb8688391b670ca812d70795d11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "cyclonedx-python-lib" do + url "https://files.pythonhosted.org/packages/66/fc/abaad5482f7b59c9a0a9d8f354ce4ce23346d582a0d85730b559562bbeb4/cyclonedx_python_lib-9.1.0.tar.gz" + sha256 "86935f2c88a7b47a529b93c724dbd3e903bc573f6f8bd977628a7ca1b5dadea1" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/3a/f0/de0ac00a4484c0d87b71e3d9985518278d89797fa725e90abd3453bccb42/packageurl_python-0.17.5.tar.gz" + sha256 "a7be3f3ba70d705f738ace9bf6124f31920245a49fa69d4b416da7037dd2de61" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pip-api" do + url "https://files.pythonhosted.org/packages/b9/f1/ee85f8c7e82bccf90a3c7aad22863cc6e20057860a1361083cd2adacb92e/pip_api-0.0.34.tar.gz" + sha256 "9b75e958f14c5a2614bae415f2adf7eeb54d50a2cfbe7e24fd4826471bac3625" + end + + resource "pip-requirements-parser" do + url "https://files.pythonhosted.org/packages/5e/2a/63b574101850e7f7b306ddbdb02cb294380d37948140eecd468fae392b54/pip-requirements-parser-32.0.1.tar.gz" + sha256 "b4fa3a7a0be38243123cf9d1f3518da10c51bdb165a2b2985566247f9155a7d3" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "py-serializable" do + url "https://files.pythonhosted.org/packages/73/21/d250cfca8ff30c2e5a7447bc13861541126ce9bd4426cd5d0c9f08b5547d/py_serializable-2.1.0.tar.gz" + sha256 "9d5db56154a867a9b897c0163b33a793c804c80cee984116d02d49e4578fc103" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + test_file = testpath/"requirements.txt" + test_file.write <<~REQUIREMENTS + six==1.16.0 + REQUIREMENTS + output = shell_output("#{bin}/pip-audit --requirement #{test_file} --no-deps --progress-spinner=off 2>&1") + assert_match "No known vulnerabilities found", output + end +end diff --git a/Formula/p/pip-completion.rb b/Formula/p/pip-completion.rb new file mode 100644 index 0000000000000..f8e3ad877237d --- /dev/null +++ b/Formula/p/pip-completion.rb @@ -0,0 +1,31 @@ +class PipCompletion < Formula + desc "Bash completion for Pip" + homepage "https://github.com/ekalinin/pip-bash-completion" + url "https://github.com/ekalinin/pip-bash-completion.git", + revision: "321d8bd2c56bb1565ac20210367bd272a111a1aa" + version "20200731" + license "MIT" + head "https://github.com/ekalinin/pip-bash-completion.git", branch: "master" + + # There currently aren't any versions of pip-completion and the formula + # simply uses a revision from the upstream GitHub repo. The YYYYMMDD version + # in the formula isn't from upstream and was created on our end to indicate + # the date of the revision that's being used. + livecheck do + skip "No version information available" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ea3a13ea2cc0274e22c8afff04f203677ea90969ff2a6bcb9eb7eb7d072d1f17" + end + + def install + bash_completion.install "pip" + end + + test do + assert_match "-F _pip", + shell_output("bash -c 'source #{bash_completion}/pip && complete -p pip'") + end +end diff --git a/Formula/p/pip-tools.rb b/Formula/p/pip-tools.rb new file mode 100644 index 0000000000000..ab4ea752c647f --- /dev/null +++ b/Formula/p/pip-tools.rb @@ -0,0 +1,83 @@ +class PipTools < Formula + include Language::Python::Virtualenv + + desc "Locking and sync for Pip requirements files" + homepage "https://pip-tools.readthedocs.io" + # TODO: remove `pip` resource after https://github.com/jazzband/pip-tools/issues/2252 + url "https://files.pythonhosted.org/packages/94/a1/54ac29bdb98660f2b9aeab8c2bf105595614edc7858d899fd4ec1bfaad20/pip_tools-7.5.1.tar.gz" + sha256 "a051a94794ba52df9acad2d7c9b0b09ae001617db458a543f8287fea7b89c2cf" + license "BSD-3-Clause" + revision 1 + head "https://github.com/jazzband/pip-tools.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9b7e6ef29e087417d08ef65b5944c9ec1e4546c57453809dd47f9c805513f732" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b7e6ef29e087417d08ef65b5944c9ec1e4546c57453809dd47f9c805513f732" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b7e6ef29e087417d08ef65b5944c9ec1e4546c57453809dd47f9c805513f732" + sha256 cellar: :any_skip_relocation, sonoma: "3b59f26e1ef0666c2d7f3b93fc0037b44f6954ba5c8026e87dd61ae146a3812a" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b59f26e1ef0666c2d7f3b93fc0037b44f6954ba5c8026e87dd61ae146a3812a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b59f26e1ef0666c2d7f3b93fc0037b44f6954ba5c8026e87dd61ae146a3812a" + end + + depends_on "python@3.14" + + resource "build" do + url "https://files.pythonhosted.org/packages/25/1c/23e33405a7c9eac261dff640926b8b5adaed6a6eb3e1767d441ed611d0c0/build-1.3.0.tar.gz" + sha256 "698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/20/16/650289cd3f43d5a2fadfd98c68bd1e1e7f2550a1a5326768cddfbcedb2c5/pip-25.2.tar.gz" + sha256 "578283f006390f85bb6282dffb876454593d637f5d1be494b5202ce4877e71f2" + end + + resource "pyproject-hooks" do + url "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz" + sha256 "1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Fix syntax warning on python 3.14: https://github.com/jazzband/pip-tools/pull/2249 + patch do + url "https://github.com/jazzband/pip-tools/commit/c742e381cbe5a6953c2bd89d6fbc147c5003d921.patch?full_index=1" + sha256 "4869f1e7857a665659d582c3268dc28508bf6f8b331e053dac403218cb65d662" + end + + def install + virtualenv_install_with_resources + + %w[pip-compile pip-sync].each do |script| + generate_completions_from_executable(bin/script, shell_parameter_format: :click) + end + end + + test do + (testpath/"requirements.in").write <<~REQUIREMENTS + pip-tools + typing-extensions + REQUIREMENTS + + compiled = shell_output("#{bin}/pip-compile requirements.in -q -o -") + assert_match "This file is autogenerated by pip-compile", compiled + assert_match "# via pip-tools", compiled + end +end diff --git a/Formula/p/pipdeptree.rb b/Formula/p/pipdeptree.rb new file mode 100644 index 0000000000000..cc3e08f1311a0 --- /dev/null +++ b/Formula/p/pipdeptree.rb @@ -0,0 +1,33 @@ +class Pipdeptree < Formula + include Language::Python::Virtualenv + + desc "CLI to display dependency tree of the installed Python packages" + homepage "https://github.com/tox-dev/pipdeptree" + url "https://files.pythonhosted.org/packages/87/95/4910e17272db545b8c97854bdc509bfb7a48d16055c5247c8f566984438a/pipdeptree-2.29.0.tar.gz" + sha256 "e21ea782b6266611a5505d76db2f187f43eb140248029e06b535928617f6847f" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "702591662406050d8fc7f63cb383c94385f47329e879570cceda2cb0b88b73f8" + end + + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "pipdeptree==#{version}", shell_output("#{bin}/pipdeptree --all") + + assert_empty shell_output("#{bin}/pipdeptree --user-only").strip + + assert_equal version.to_s, shell_output("#{bin}/pipdeptree --version").strip + end +end diff --git a/Formula/p/pipe-rename.rb b/Formula/p/pipe-rename.rb new file mode 100644 index 0000000000000..c859ee56034b1 --- /dev/null +++ b/Formula/p/pipe-rename.rb @@ -0,0 +1,39 @@ +class PipeRename < Formula + desc "Rename your files using your favorite text editor" + homepage "https://github.com/marcusbuffett/pipe-rename" + url "https://github.com/marcusbuffett/pipe-rename/archive/refs/tags/1.6.5.tar.gz" + sha256 "bc3cc51e02578e0c56f252e65136dbeb635ffc8468c45b5c38df311cab611b09" + license "MIT" + revision 1 + head "https://github.com/marcusbuffett/pipe-rename.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9fd3ea356570b8c33201ff8b6e4c226be7dc46b29d648ede51b9e4ad7c51ee94" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "05b5d7a3e3d2800214c3d6c019965abc4c79153e877f9646f0785b731403cd42" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "78ad5f875ea0698f555e7cd1ae0e9cbf3f2288df1a629aea13d73e88d8410868" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ead196d4a945b353937da16ba88d97705b9e63359a66a7d1413e84be958728c" + sha256 cellar: :any_skip_relocation, sonoma: "55b14b5cc02d4940996223565bffe107205f002b712b1851759121e32352478b" + sha256 cellar: :any_skip_relocation, ventura: "e78cf189b9daf7abe12c7067ee35d9716e268abe6210014b85ced4aa201c605d" + sha256 cellar: :any_skip_relocation, arm64_linux: "76acb0c610a7ca3269b0330affdcfdee2f6549c0fd59883b00bca7bcc61f0393" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf3c6d9051347cca1f0a699b770f0acb148b5f079a75bec57e9f1b690360e935" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + touch "test.log" + (testpath/"rename.sh").write <<~SHELL + #!/bin/sh + echo "$(cat "$1").txt" > "$1" + SHELL + + chmod "+x", testpath/"rename.sh" + ENV["EDITOR"] = testpath/"rename.sh" + system bin/"renamer", "-y", "test.log" + assert_path_exists testpath/"test.log.txt" + end +end diff --git a/Formula/p/pipebench.rb b/Formula/p/pipebench.rb new file mode 100644 index 0000000000000..a47a003c7fe83 --- /dev/null +++ b/Formula/p/pipebench.rb @@ -0,0 +1,47 @@ +class Pipebench < Formula + desc "Measure the speed of STDIN/STDOUT communication" + homepage "https://www.habets.pp.se/synscan/programs_pipebench.html" + # Upstream server behaves oddly: https://github.com/Homebrew/homebrew/issues/40897 + # url "http://www.habets.pp.se/synscan/files/pipebench-0.40.tar.gz" + url "https://deb.debian.org/debian/pool/main/p/pipebench/pipebench_0.40.orig.tar.gz" + sha256 "ca764003446222ad9dbd33bbc7d94cdb96fa72608705299b6cc8734cd3562211" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?pipebench[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d072d62376b997ef53206ada73eb8eb22c9ad10b04f5c4c53ebbf77f92706b8a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e0843adb8181028ccf82ae98d94804996f5ca6f13bb2499049748de186c454c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b30b6b4a2108fbe48632fcb4c9a65a40d7dcff2e7757dd8b0ae67d5c9482d0ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "09e7033208ec037cf78d7fca9c3ffcbaeb06a2a51ae8b6b53915c83b9745ed3a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7704012e0f066c3a9ffa837df9e1f346a3dacbd37047aefce2d4d3f427e00562" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5bb970ea3b27cad7960f3f60a86b3a55ad36d29cf11169019c5057e803d8ea75" + sha256 cellar: :any_skip_relocation, sonoma: "330b5c2d7b56101540829652a392086ca686b6c4154bf9b6cca81d607c14f89a" + sha256 cellar: :any_skip_relocation, ventura: "d9faf1c0f4d7a4986a7137f14eb3fe246351b594e64fe6bb07622b282d72da3e" + sha256 cellar: :any_skip_relocation, monterey: "f367e67b0def209b0553b577a767a8451f91f21d321f1addf6f01e5920c162dc" + sha256 cellar: :any_skip_relocation, big_sur: "5e5856f67d0e9f663d04895b33cf50406b8fc584f2d01cf9c364b8a549620184" + sha256 cellar: :any_skip_relocation, catalina: "a7a63d8cdd084919304019c06290b7b808f637071c30f688219b47e2cc49f469" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f0404896dc102bec6f5934ed5f5cff1a9458b1afc182ebd0feab239bb0caa1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2230dc11d838a89ac74db6c346dee27398a0d4fb7377c93ca9f27876f51a6591" + end + + def install + # Contacted the upstream author at https://www.habets.pp.se/synscan/contact.html on 2023-09-28 + inreplace "pipebench.c", + "#include \n", + "#include \n#include \n#include \n" + + system "make" + bin.install "pipebench" + man1.install "pipebench.1" + end + + test do + system bin/"pipebench", "-h" + end +end diff --git a/Formula/p/pipelight.rb b/Formula/p/pipelight.rb new file mode 100644 index 0000000000000..ff69ee8c68671 --- /dev/null +++ b/Formula/p/pipelight.rb @@ -0,0 +1,58 @@ +class Pipelight < Formula + desc "Self-hosted, lightweight CI/CD pipelines for small projects via CLI" + homepage "https://pipelight.dev" + url "https://github.com/pipelight/pipelight/archive/refs/tags/v0.10.0.tar.gz" + sha256 "8d3862757e5e91c19c9a8528a6e98a2f86c824a4529d52c320ebc7eee0135d43" + license "GPL-2.0-only" + head "https://github.com/pipelight/pipelight.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9decdd34701f05d8da607c6246a21f895971966a1794c6ee1bb96497d8d5e1cd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96adf14db27651fe99ec9078aa498d9ab44bbee167181e28ef3f2e618936983f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21227916e98d2e5abc4efc7ae84c4eef1e19ee0cdc5fb80e9e72bbed7fd14253" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41fa397d45714a97f19f9b0993a12b064cd66052751fa8a9c1d9bd78b9f1cdfd" + sha256 cellar: :any_skip_relocation, sonoma: "9538539a6b67e33d5db97fc883d0833661b6995b6174e380759beb75b732fe2d" + sha256 cellar: :any_skip_relocation, ventura: "49ac565299b8f5d08ead5b65eb27548b4c2fe993bf2121115e3c13efb5267fcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee9c9c17ff2793a195f554a654f53bf342ffe7f8f833aae9fef01d371bcec1a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46123e6bfd89ff6ad47c942c4c8ced3b26ba3dabe51969e42419c99c16804b40" + end + + depends_on "rust" => :build + + def install + # upstream pr ref, https://github.com/pipelight/pipelight/pull/33 + system "cargo", "update", "-p", "libc" + + inreplace "cli/Cargo.toml", "version = \"0.0.0\"", "version = \"#{version}\"" if build.stable? + + system "cargo", "install", *std_cargo_args(path: "pipelight") + + bash_completion.install "autocompletion/pipelight.bash" => "pipelight" + fish_completion.install "autocompletion/pipelight.fish" + zsh_completion.install "autocompletion/_pipelight" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pipelight --version") + + # /opt/homebrew/Cellar/pipelight/0.10.0/bin/pipelight init --template yaml + system bin/"pipelight", "init", "--template", "yaml" + assert_equal <<~YAML, (testpath/"pipelight.yaml").read + pipelines: + - name: example + steps: + - name: first + commands: + - ls + - pwd + - name: second + commands: + - ls + - pwd + YAML + + assert_match "example", shell_output("#{bin}/pipelight ls") + + system bin/"pipelight", "run", "example" + end +end diff --git a/Formula/p/pipemeter.rb b/Formula/p/pipemeter.rb new file mode 100644 index 0000000000000..f087dcf1c9106 --- /dev/null +++ b/Formula/p/pipemeter.rb @@ -0,0 +1,45 @@ +class Pipemeter < Formula + desc "Shows speed of data moving from input to output" + homepage "https://launchpad.net/pipemeter" + url "https://launchpad.net/pipemeter/trunk/1.1.5/+download/pipemeter-1.1.5.tar.gz" + sha256 "e470ac5f3e71b5eee1a925d7174a6fa8f0753f2107e067fbca3f383fab2e87d8" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f87dfabadf8edc8e63b7032810808c7b126c8ade8712687113170ae531796760" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0653426bc1f7a2f36bc886279953ec40660d867797f4623162cc749c2f48ba0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "197626afa86a59a767aa171fc9c7244c0fecb1548175c59aee7af5a64051e7d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d3ac998da1225db393df052edb693c65caaca7f04e267f924b6936d284f0e03" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d46321ba4f29458d93dc2e04aebf6e6a935f64cbead1dfec03d2e44114a28f80" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1ca7da50232374280744805d8497a42c4e8795d4592a1e6ec35fb3e51812cea9" + sha256 cellar: :any_skip_relocation, sonoma: "c24ccbfa414a1fe38893a2d26a219bf09c278028a94dfe04befec9bed787e9b3" + sha256 cellar: :any_skip_relocation, ventura: "389145513b346cad14c8ae13c231816b9b679087464396182cdf047a04b93db9" + sha256 cellar: :any_skip_relocation, monterey: "55c1cfc32045a6ceeb62ce15159f5d5f43c807eb119eef4b32eb2359c37a7b59" + sha256 cellar: :any_skip_relocation, big_sur: "ef9f94223b9b5d583ca7f3714e85fbdc59721be6bdc31f46bda43cecb4a4c0b5" + sha256 cellar: :any_skip_relocation, catalina: "faf2fcb90aebb9e26bfd1f9dcfd32bb43fd4247a87a466640dcd74824806da00" + sha256 cellar: :any_skip_relocation, arm64_linux: "128d3f2743369e05eab0274a428c4f64054def38c7bdd6636602c66cbf8289cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bcb2fe10310749fb1afdee597abd956efefd6ad1b501440c322a7c876a7ad36" + end + + def install + system "./configure", "--disable-debug", + "--prefix=#{prefix}", + "--mandir=#{man}" + + # Fix GNU `install -D` syntax issue + inreplace "Makefile", "install -Dp -t $(DESTDIR)$(PREFIX)/bin pipemeter", + "install -p pipemeter $(PREFIX)/bin" + inreplace "Makefile", "install -Dp -t $(DESTDIR)$(PREFIX)/man/man1 pipemeter.1", + "install -p pipemeter.1 $(PREFIX)/share/man/man1" + + bin.mkpath + man1.mkpath + system "make", "install" + end + + test do + assert_match "3.00B", pipe_output("#{bin}/pipemeter -r 2>&1 >/dev/null", "foo", 0) + end +end diff --git a/Formula/p/pipenv.rb b/Formula/p/pipenv.rb new file mode 100644 index 0000000000000..f563786ffe55f --- /dev/null +++ b/Formula/p/pipenv.rb @@ -0,0 +1,88 @@ +class Pipenv < Formula + include Language::Python::Virtualenv + + desc "Python dependency management tool" + homepage "https://github.com/pypa/pipenv" + url "https://files.pythonhosted.org/packages/3b/15/4c869c2ec2819f8e6529cc26a044c9f7c714246c972b9b2cbbafda0847f9/pipenv-2025.0.4.tar.gz" + sha256 "36fc2a7841ccdb2f58a9f787b296c2e15dea3b5b79b84d4071812f28b7e8d7a2" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "07cffcfd928212629021bb5f0ee06f81afdb9b37cbec8dea985436b4715e2877" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07cffcfd928212629021bb5f0ee06f81afdb9b37cbec8dea985436b4715e2877" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "07cffcfd928212629021bb5f0ee06f81afdb9b37cbec8dea985436b4715e2877" + sha256 cellar: :any_skip_relocation, sonoma: "8e8db95cc1c6e320e5e6aef90b4ea31ecbb9708d5763244f2ec93e71917d4354" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e8db95cc1c6e320e5e6aef90b4ea31ecbb9708d5763244f2ec93e71917d4354" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e8db95cc1c6e320e5e6aef90b4ea31ecbb9708d5763244f2ec93e71917d4354" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + def python3 + "python3.14" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/pipenv", shell_parameter_format: :click) + end + + # Avoid relative paths + def post_install + lib_python_path = Pathname.glob(libexec/"lib/python*").first + lib_python_path.each_child do |f| + next unless f.symlink? + + realpath = f.realpath + rm f + ln_s realpath, f + end + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + assert_match "Commands", shell_output(bin/"pipenv") + system bin/"pipenv", "--python", which(python3) + system bin/"pipenv", "install", "requests" + system bin/"pipenv", "install", "boto3" + assert_path_exists testpath/"Pipfile" + assert_path_exists testpath/"Pipfile.lock" + assert_match "requests", (testpath/"Pipfile").read + assert_match "boto3", (testpath/"Pipfile").read + end +end diff --git a/Formula/p/pipes-sh.rb b/Formula/p/pipes-sh.rb new file mode 100644 index 0000000000000..32ee50abed890 --- /dev/null +++ b/Formula/p/pipes-sh.rb @@ -0,0 +1,30 @@ +class PipesSh < Formula + desc "Animated pipes terminal screensaver" + homepage "https://github.com/pipeseroni/pipes.sh" + url "https://github.com/pipeseroni/pipes.sh/archive/refs/tags/v1.3.0.tar.gz" + sha256 "532976dd8dc2d98330c45a8bcb6d7dc19e0b0e30bba8872dcce352361655a426" + license "MIT" + head "https://github.com/pipeseroni/pipes.sh.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "339995e9ef29b4952bf61b4fe406d71c4c6ad5fc96e3e8f291d98150c6789cb8" + end + + depends_on "bash" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/pipes.sh -v").strip.split[-1] + end +end diff --git a/Formula/p/pipet.rb b/Formula/p/pipet.rb new file mode 100644 index 0000000000000..18ef8e70bcd38 --- /dev/null +++ b/Formula/p/pipet.rb @@ -0,0 +1,34 @@ +class Pipet < Formula + desc "Swiss-army tool for web scraping, made for hackers" + homepage "https://github.com/bjesus/pipet" + url "https://github.com/bjesus/pipet/archive/refs/tags/0.3.0.tar.gz" + sha256 "9fb35bcc4be8b7655a4075c3b2bf7b0368ae7bb97e9e6dbbcf00422c8e18cc6b" + license "MIT" + head "https://github.com/bjesus/pipet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "63abd2f8e1acdd4351fa4e9f87a98b41574785f4a841347110b6ab01b3037eb0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "560a89ed526f7be6a13af3eaaa88fa4bbd108a488a251d1f562a4ef7af9a5e38" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "560a89ed526f7be6a13af3eaaa88fa4bbd108a488a251d1f562a4ef7af9a5e38" + sha256 cellar: :any_skip_relocation, arm64_ventura: "560a89ed526f7be6a13af3eaaa88fa4bbd108a488a251d1f562a4ef7af9a5e38" + sha256 cellar: :any_skip_relocation, sonoma: "80d52f08edf8293bf7c71ae75dfff7e79df2575251bff9f6c9b5041a0168d8e6" + sha256 cellar: :any_skip_relocation, ventura: "80d52f08edf8293bf7c71ae75dfff7e79df2575251bff9f6c9b5041a0168d8e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "155b71857798f70e3829c1bbf5eb418530a7c97a6eb00c39d2685c41aaf0657f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "524fe9b1d57b91baafd8ebad6440a9745e6659fdf95ddf2c956226f649ebbc1f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/pipet" + end + + test do + (testpath/"example.pipet").write <<~EOS + curl https://example.com + head > title + EOS + + assert_match "Example Domain", shell_output("#{bin}/pipet example.pipet") + end +end diff --git a/Formula/p/pipgrip.rb b/Formula/p/pipgrip.rb new file mode 100644 index 0000000000000..f6ab45460771e --- /dev/null +++ b/Formula/p/pipgrip.rb @@ -0,0 +1,59 @@ +class Pipgrip < Formula + include Language::Python::Virtualenv + + desc "Lightweight pip dependency resolver" + homepage "https://github.com/ddelange/pipgrip" + url "https://files.pythonhosted.org/packages/10/b5/fbca40a14be2772f436a0fad2851db906ca1642d46664757267a7fca9503/pipgrip-0.11.0.tar.gz" + sha256 "5bde0d03fa7bf33c3f2e37bbc636071547224fb1aa21f246309cd007e8cec2e0" + license "BSD-3-Clause" + head "https://github.com/ddelange/pipgrip.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67752a5234171ce8d055afd391c179f19e7cf98984b005228c649ed22f330957" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67752a5234171ce8d055afd391c179f19e7cf98984b005228c649ed22f330957" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67752a5234171ce8d055afd391c179f19e7cf98984b005228c649ed22f330957" + sha256 cellar: :any_skip_relocation, sonoma: "754a6d084aba7b4916d82b4787e63ec71bf4d53b83185496688a8e3f693c26c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "754a6d084aba7b4916d82b4787e63ec71bf4d53b83185496688a8e3f693c26c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "754a6d084aba7b4916d82b4787e63ec71bf4d53b83185496688a8e3f693c26c2" + end + + depends_on "python@3.14" + + resource "anytree" do + url "https://files.pythonhosted.org/packages/bc/a8/eb55fab589c56f9b6be2b3fd6997aa04bb6f3da93b01154ce6fc8e799db2/anytree-2.13.0.tar.gz" + sha256 "c9d3aa6825fdd06af7ebb05b4ef291d2db63e62bb1f9b7d9b71354be9d362714" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"pipgrip", shell_parameter_format: :click) + end + + test do + assert_match "pip==25.0.1", shell_output("#{bin}/pipgrip --no-cache-dir pip==25.0.1") + # Test gcc dependency + assert_match "dxpy==", shell_output("#{bin}/pipgrip --no-cache-dir dxpy==0.394.0") + end +end diff --git a/Formula/p/pipx.rb b/Formula/p/pipx.rb new file mode 100644 index 0000000000000..bc7c63823990d --- /dev/null +++ b/Formula/p/pipx.rb @@ -0,0 +1,72 @@ +class Pipx < Formula + include Language::Python::Virtualenv + + desc "Execute binaries from Python packages in isolated environments" + homepage "https://pipx.pypa.io" + url "https://files.pythonhosted.org/packages/14/2c/092e89e59450b29ed8c9e88ce879c7066b72782576b6136322547540c93c/pipx-1.8.0.tar.gz" + sha256 "61a653ef2046de67c3201306b9d07428e93c80e6bebdcbbcb8177ecf3328b403" + license "MIT" + head "https://github.com/pypa/pipx.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3fef69289fa10429ad0ec47931aa8433dc19dbe5ba3a8ae1048ddf4716c4df22" + end + + depends_on "python@3.14" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "userpath" do + url "https://files.pythonhosted.org/packages/d5/b7/30753098208505d7ff9be5b3a32112fb8a4cb3ddfccbbb7ba9973f2e29ff/userpath-1.9.2.tar.gz" + sha256 "6c52288dab069257cc831846d15d48133522455d4677ee69a9781f11dbefd815" + end + + def python3 + deps.map(&:to_formula) + .find { |f| f.name.start_with?("python@") } + end + + def install + # Avoid Cellar path reference, which is only good for one version. + inreplace "src/pipx/interpreter.py", + "DEFAULT_PYTHON = _get_sys_executable()", + "DEFAULT_PYTHON = '#{python3.opt_libexec/"bin/python"}'" + + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "pipx", + shell_parameter_format: :arg) + + # Build an `:all` bottle by replacing comments + site_packages = libexec/Language::Python.site_packages("python3") + file = site_packages/"argcomplete-#{resource("argcomplete").version}.dist-info/METADATA" + inreplace file, "/opt/homebrew/bin/bash", "$HOMEBREW_PREFIX/bin/bash" + end + + test do + assert_match "PIPX_HOME", shell_output("#{bin}/pipx --help") + system bin/"pipx", "install", "csvkit" + assert_path_exists testpath/".local/bin/csvjoin" + system bin/"pipx", "uninstall", "csvkit" + refute_match "csvjoin", shell_output("#{bin}/pipx list") + end +end diff --git a/Formula/p/pistache.rb b/Formula/p/pistache.rb new file mode 100644 index 0000000000000..bf9b08cb5a62c --- /dev/null +++ b/Formula/p/pistache.rb @@ -0,0 +1,173 @@ +class Pistache < Formula + desc "Modern, fast, elegant HTTP + REST C++17 framework with pleasant API" + homepage "https://github.com/pistacheio/pistache" + url "https://github.com/pistacheio/pistache/archive/refs/tags/v0.4.26.tar.gz" + sha256 "29af6562547497acf6f49170661786fe8cf1ed3712ad80e69c53da4661c59544" + license "Apache-2.0" + head "https://github.com/pistacheio/pistache.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e3debddab926a1b7ddc20bec37d36630bb517f44fb96d98d37c503db10d5fe82" + sha256 cellar: :any, arm64_sequoia: "df6e5955a69ba59d16fa1085e2a264b6886ac13eaefcfdad36b6cde24fdd357f" + sha256 cellar: :any, arm64_sonoma: "17198b6e042abadfa94de4824bb3e9d9a2696230ed2d54cae8dabf8550467fd7" + sha256 cellar: :any, arm64_ventura: "d7a4d961bd52ea6e84601692baf0aa290738c73f31b2522627e766e386fe470f" + sha256 cellar: :any, sonoma: "8eaf723d1a39743fee0bbcd114aba4bb58cc28a1a5dd2b6ee6a398c1e6164e98" + sha256 cellar: :any, ventura: "c15f1071afc06d9f6f60e54921af214d6c8e6787db6e9ca0fc249c9d208b5aef" + sha256 arm64_linux: "f2f94bda2565558e53b6ce5359d82dddf46c486f19744622795da71f2dcb28dc" + sha256 x86_64_linux: "e864df73e63ce4399b8c6324f3b86e36c83128f0034aceea2b6dd3941f8a5385" + end + + depends_on "cmake" => :build # for howard-hinnant-date + depends_on "cpp-httplib" => :build + depends_on "googletest" => :build + depends_on "howard-hinnant-date" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "rapidjson" => :build + + depends_on "brotli" + depends_on "libevent" + depends_on "openssl@3" + depends_on "zstd" + + uses_from_macos "curl" => :build + uses_from_macos "zlib" + + def install + system "meson", "setup", "build", + "-DPISTACHE_USE_SSL=true", + "-DPISTACHE_BUILD_EXAMPLES=false", + "-DPISTACHE_BUILD_TESTS=false", + "-DPISTACHE_BUILD_DOCS=false", + "-DPISTACHE_USE_CONTENT_ENCODING_DEFLATE=true", + "-DPISTACHE_USE_CONTENT_ENCODING_BROTLI=true", + "-DPISTACHE_USE_CONTENT_ENCODING_ZSTD=true", + *std_meson_args + + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + // Testing multiple clients making requests of a multithreaded server + + #include + #include + #include + #include + + #include + #include + #include + + using namespace Pistache; + using namespace std::chrono; + + struct HelloHandler : public Http::Handler + { + HTTP_PROTOTYPE(HelloHandler) + + void onRequest(const Http::Request& /*request*/, + Http::ResponseWriter writer) override + { + writer.send(Http::Code::Ok, "Hello, World!"); + } + }; + + static int clientLogicFunc(size_t response_size, + const std::string& server_page, + int wait_seconds) + { + Http::Experimental::Client client; + client.init(); + + std::vector> responses; + auto rb = client.get(server_page); + + int resolver_counter = 0; + int reject_counter = 0; + for (size_t i = 0; i < response_size; ++i) + { + auto response = rb.send(); + + response.then( + [&resolver_counter, pos = i](Http::Response resp) { + if (resp.code() == Http::Code::Ok) + { + ++resolver_counter; + } + }, + [&reject_counter, pos = i](std::exception_ptr exc) { + std::cout << "Request rejected" << std::endl; + PrintException excPrinter; + + excPrinter(exc); + ++reject_counter; + }); + responses.push_back(std::move(response)); + } + + { // encapsulate + auto sync = Async::whenAll(responses.begin(), responses.end()); + Async::Barrier> barrier(sync); + barrier.wait_for(std::chrono::seconds(wait_seconds)); + } + + client.shutdown(); + return resolver_counter; + } + + int main() + { + const Pistache::Address address("localhost", Pistache::Port(0)); + + Http::Endpoint server(address); + auto flags = Tcp::Options::ReuseAddr; + auto server_opts = Http::Endpoint::options().flags(flags).threads(3); + server.init(server_opts); + server.setHandler(Http::make_handler()); + server.serveThreaded(); + + const std::string server_address = + "localhost:" + server.getPort().toString(); + + const int SIX_SECONDS_TIMOUT = 6; + const int FIRST_CLIENT_REQUEST_SIZE = 4; + std::future result1(std::async(clientLogicFunc, + FIRST_CLIENT_REQUEST_SIZE, server_address, + SIX_SECONDS_TIMOUT)); + const int SECOND_CLIENT_REQUEST_SIZE = 5; + std::future result2( + std::async(clientLogicFunc, SECOND_CLIENT_REQUEST_SIZE, + server_address, SIX_SECONDS_TIMOUT)); + + int res1 = result1.get(); + int res2 = result2.get(); + + server.shutdown(); + + if (res1 != FIRST_CLIENT_REQUEST_SIZE) + { + std::cerr << "Response count res1 is " << res1 << ", expected " + << FIRST_CLIENT_REQUEST_SIZE << std::endl; + return 1; + } + + if (res2 != SECOND_CLIENT_REQUEST_SIZE) + { + std::cerr << "Response count res2 is " << res2 << ", expected " + << SECOND_CLIENT_REQUEST_SIZE << std::endl; + return 2; + } + + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lpistache", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pit.rb b/Formula/p/pit.rb new file mode 100644 index 0000000000000..e4df61dc966e8 --- /dev/null +++ b/Formula/p/pit.rb @@ -0,0 +1,63 @@ +class Pit < Formula + desc "Project manager from hell (integrates with Git)" + homepage "https://github.com/michaeldv/pit" + license "BSD-2-Clause" + head "https://github.com/michaeldv/pit.git", branch: "master" + + # upstream commit to allow PREFIX-ed installs + stable do + url "https://github.com/michaeldv/pit/archive/refs/tags/0.1.0.tar.gz" + sha256 "ddf78b2734c6dd3967ce215291c3f2e48030e0f3033b568eb080a22f041c7a0e" + + patch do + url "https://github.com/michaeldv/pit/commit/f64978d6c2628e1d4897696997b551f6b186d4bc.patch?full_index=1" + sha256 "f97a553bc5ca0eddf379e3ca3f96374508f8627e18aaff846786c41d7ba1987b" + end + + # upstream commit to fix a segfault when using absolute paths + patch do + url "https://github.com/michaeldv/pit/commit/e378582f4d04760d1195675ab034aac5d7908d8d.patch?full_index=1" + sha256 "73651472d98aa02e58fbf6f1cc4ce29100616d6f6d155907c4680eb73217f43f" + end + + # upstream commit to return 0 on success instead of 1 + patch do + url "https://github.com/michaeldv/pit/commit/5d81148349cc442d81cc98779a4678f03f59df67.patch?full_index=1" + sha256 "3ae9004fe9551ab51be44df2195bf5e373e1473a888c11601de0d046322d382f" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f777c3a9a9df0126578d3bfcac99340c9de06de98f9a81af90a5e0f1c11a2dfc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1c47710f90f70ca700d78780d7a9ecca7edb1c00d131c5b35eca39d22ca50b20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4bb4f8b9fcc6c163347d862d0886d998600259a914148dbb56bd1ef720fa96ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bab334d334f9076b84f008dffa276886491a4567dcce911bca2de19f0a4d462e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cdb46ba810ed638aa93d076788bbc3a21f0d563aa5175fdccdae7b9c3476608c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2d3857a0cf9c47d2d53f87109d87a4823fed481398cf2adb6c9f3809b8085985" + sha256 cellar: :any_skip_relocation, sonoma: "c58c911d92fce75efe1c60827d6a3d55df5eb063e579d60e4272883a17bc9b33" + sha256 cellar: :any_skip_relocation, ventura: "43d88cf92d08f7169764740b0dcf55d529ad3e88e5297d8eede1b9cbcbca2849" + sha256 cellar: :any_skip_relocation, monterey: "cea94d460905b3f03d850b3e15a99d9a2e1d18558be52a8740dfbae36d7b27e4" + sha256 cellar: :any_skip_relocation, big_sur: "853489d4ee4f37e97f89415f5a3d1e0c225cb2dace8f61680293bb61ad57dd52" + sha256 cellar: :any_skip_relocation, catalina: "3ff5098a860de65a101fafe58d9ef76ac4c392f0b127720ecb34f0141554c27d" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb9c8ae7f2445d94adf1d721988c9c03e4501ce200d9b82ddb6e278befe533d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9d22e313984a6d20930041fd3cbb5896826e0be8a687992866ceef0e79152c7" + end + + uses_from_macos "ruby" + + def install + ENV.deparallelize + bin.mkpath + + system "make" + system "make", "test" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"pit", "init" + end +end diff --git a/Formula/p/pius.rb b/Formula/p/pius.rb new file mode 100644 index 0000000000000..3abd4667cd21f --- /dev/null +++ b/Formula/p/pius.rb @@ -0,0 +1,41 @@ +class Pius < Formula + include Language::Python::Virtualenv + + desc "PGP individual UID signer" + homepage "https://github.com/jaymzh/pius" + url "https://github.com/jaymzh/pius/archive/refs/tags/v3.0.0.tar.gz" + sha256 "3454ade5540687caf6d8b271dd18eb773a57ab4f5503fc71b4769cc3c5f2b572" + license "GPL-2.0-only" + revision 3 + head "https://github.com/jaymzh/pius.git", branch: "main" + + bottle do + rebuild 7 + sha256 cellar: :any_skip_relocation, all: "4140e7427663db5e6c5d33d1b1589afe1d257b135c2874c15ac3d6b9aee3d743" + end + + depends_on "gnupg" + depends_on "python@3.14" + + def install + # Replace hardcoded gpg path (WONTFIX) + inreplace "libpius/constants.py", %r{/usr/bin/gpg2?}, "/usr/bin/env gpg" + + virtualenv_install_with_resources + end + + def caveats + <<~TEXT + The path to gpg is hardcoded in pius as `/usr/bin/env gpg`. + You can specify a different path by editing ~/.pius: + gpg-path=/path/to/gpg + TEXT + end + + test do + output = shell_output("#{bin}/pius -T") + assert_match "Welcome to PIUS, the PGP Individual UID Signer", output + + assert_match version.to_s, shell_output("#{bin}/pius --version") + end +end diff --git a/Formula/p/pivit.rb b/Formula/p/pivit.rb new file mode 100644 index 0000000000000..8507ae8b26f71 --- /dev/null +++ b/Formula/p/pivit.rb @@ -0,0 +1,36 @@ +class Pivit < Formula + desc "Sign and verify data using hardware (Yubikey) backed x509 certificates (PIV)" + homepage "https://github.com/cashapp/pivit" + url "https://github.com/cashapp/pivit/archive/refs/tags/v0.9.2.tar.gz" + sha256 "dadaee7a84634c55087fbf6bf0d2de1838aa89ce31125eafbb0b5779757583f9" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3dac5137cfcd0bcce589cb545b773578ffc80a463f3e3583b2067176e4709a06" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10b9bdad1f60c409382076623452598cdd78a74aca0c8730a73017e615ce2889" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76b90fcb5fdd851b6343daaccf3e70bfc5d17e0a6286c73bb0a9ebf46ee96871" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fff9b3eb6c37d38e7dac30a5845b4dbe31ebfecec201a8136e82b364c21c8505" + sha256 cellar: :any_skip_relocation, sonoma: "6340b6f017c995c72b72924dc0744e4ea787c517b4f944c80883c26d1ce3f76c" + sha256 cellar: :any_skip_relocation, ventura: "dc2dbaf0b6e87774aa069b10fe6714a7f5f8a2d54c11248c585afa8c8dbfd450" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8cfbf2adeb50c1950bc699a38810b5d6f7cc9e6c4dc76dbf65eb9fbd7da249a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df76cbe5172a33ea40688700ffc719af53244bb94043cb83f62bfd05fcfb5405" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "pcsc-lite" + end + + def install + ENV["CGO_ENABLED"] = "1" + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/pivit" + end + + test do + output = shell_output("#{bin}/pivit -p 2>&1", 1).strip + assert_match "the Smart card resource manager is not running", output + end +end diff --git a/Formula/p/pivy.rb b/Formula/p/pivy.rb new file mode 100644 index 0000000000000..872d55658c9a4 --- /dev/null +++ b/Formula/p/pivy.rb @@ -0,0 +1,56 @@ +class Pivy < Formula + desc "Python bindings to coin3d" + homepage "https://github.com/coin3d/pivy" + url "https://github.com/coin3d/pivy/archive/refs/tags/0.6.10.tar.gz" + sha256 "7b409816c9fad84cf94f93659281f9dd2501d285eb2fc609e9401a3d004ce723" + license "ISC" + head "https://github.com/coin3d/pivy.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "cbb8303807dc68efa785a595b464ea44c17aa17c5811848d26a4ffefdeaf6783" + sha256 cellar: :any, arm64_sequoia: "711d681b19f5b4b6277890b04c480ef1fbfd8c7f5529c6628004fc1d057553b9" + sha256 cellar: :any, arm64_sonoma: "90c2d18f4261f8f4c65405dc18f32c322b03f24504bdff55c03608e2e5c53762" + sha256 cellar: :any, sonoma: "f8b2a7c238524c232c368b45c0ac5761e56e794970b79fe7a84d31efdda7e4a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "735ebf4fddd4b49343e5baf4e60580f3e2134d13f7bbbc36b18011fbe549206a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58037db476464761029fa53f2c5a2365dbe2e4fcb87ef993556cb3b2fa1400ac" + end + + depends_on "cmake" => :build + depends_on "swig" => :build + depends_on "coin3d" + depends_on "pyside" + depends_on "python@3.13" + depends_on "qtbase" + + def python3 + "python3.13" + end + + def install + site_packages = prefix/Language::Python.site_packages(python3) + rpaths = [rpath(source: site_packages/"pivy"), rpath(source: site_packages/"pivy/gui")] + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + "-DPython_EXECUTABLE=#{which(python3)}", + "-DPIVY_Python_SITEARCH=#{site_packages}", + "-DPIVY_USE_QT6=ON", + *std_cmake_args(find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Set QT_QPA_PLATFORM to minimal to avoid error: + # "This application failed to start because no Qt platform plugin could be initialized." + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", <<~PYTHON + import shiboken6 + from pivy.quarter import QuarterWidget + from pivy.sogui import SoGui + assert SoGui.init("test") is not None + PYTHON + end +end diff --git a/Formula/p/pixd.rb b/Formula/p/pixd.rb new file mode 100644 index 0000000000000..a7a6fba70693e --- /dev/null +++ b/Formula/p/pixd.rb @@ -0,0 +1,39 @@ +class Pixd < Formula + desc "Visual binary data using a colour palette" + homepage "https://github.com/FireyFly/pixd" + url "https://github.com/FireyFly/pixd/archive/refs/tags/v1.0.0.tar.gz" + sha256 "011440a8d191e40a572910b0ce7a094e9b4ee75cf972abc6d30674348edf4158" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00a4d99285c81b2948df43e3e25515596d12980af8f535419d1665ba77b5ef33" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c41c69c03c8f20507a9014e41e7e02cc6813abe0c919ae40a16f82e0b01fe899" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d31f44763a25c242c3b0c55433e3c3615e61b1db85dd3729fab3f69468661b0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04df14dafa37644469c807bd9d00fe86ff95186bb8e068fcbc01bc7b0ce95acb" + sha256 cellar: :any_skip_relocation, sonoma: "4ac1c7187b65cde2b4061710214b5a004b2f05f1d692b69d042327b9d9b319eb" + sha256 cellar: :any_skip_relocation, ventura: "f04e390bac553c784c3cc78f5b5a3113fe23c42e9ead74cd886014e87d72bb96" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f986efd6ff8664144233f39b4f3f2118b97b2387ee1373ad66e538c48a666d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa387cb2dd091d0b261fbe63ff989362f7f9269a0565f68ff1fe5acfceb16167" + end + + def install + bin.mkdir + man1.mkpath + + # BSD install does not understand the GNU "-D" flag. + inreplace "Makefile", "install -D", "install" + + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.txt").write "H" + + assert_match \ + "0000 \e[0m\e[38;2;147;221;0m▀\e[m", + shell_output("#{bin}/pixd test.txt") + end +end diff --git a/Formula/p/pixi-pack.rb b/Formula/p/pixi-pack.rb new file mode 100644 index 0000000000000..c39df06cb4a2f --- /dev/null +++ b/Formula/p/pixi-pack.rb @@ -0,0 +1,77 @@ +class PixiPack < Formula + desc "Pack and unpack conda environments created with pixi" + homepage "https://pixi.sh/latest/advanced/production_deployment/#pixi-pack" + url "https://github.com/quantco/pixi-pack/archive/refs/tags/v0.7.4.tar.gz" + sha256 "28421eda4187559b3c2934b16d15818b840d69fc7588172cbc0ad98530d6dca7" + license "BSD-3-Clause" + head "https://github.com/quantco/pixi-pack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c4c6ff535614b36633b166468dd36aae9d54a865f77f8c4189bcf9fd4a79a9eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb857ea3c8bd6806c7c9c1040d8bfc52bebc42ddd83a9812374d4236aa68f55a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6f396d176103d65875d50637614b0ea5aceae8aab2197df67460917fab1beee2" + sha256 cellar: :any_skip_relocation, sonoma: "abcf383d9bcb5a49f71d324249f300fad175b5d4e002b73dcbf54617b2749653" + sha256 cellar: :any_skip_relocation, arm64_linux: "b70d5a662eda3ac7d58be5758615520b20145fcb9cad9568bc59ff414cd2a7c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d7ab4bb3f8e164142792260427c50448d92189802fb02a068cf2b77b6793b36" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"pixi-pack", "completion", "-s") + generate_completions_from_executable(bin/"pixi-unpack", "completion", "-s") + end + + test do + assert_equal "pixi-pack #{version}", shell_output("#{bin}/pixi-pack --version").strip + assert_equal "pixi-unpack #{version}", shell_output("#{bin}/pixi-unpack --version").strip + + (testpath/"pixi.lock").write <<~YAML + version: 6 + environments: + default: + channels: + - url: https://conda.anaconda.org/conda-forge/ + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.6.15-hbd8a1cb_0.conda + linux-aarch64: + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.6.15-hbd8a1cb_0.conda + osx-64: + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.6.15-hbd8a1cb_0.conda + osx-arm64: + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.6.15-hbd8a1cb_0.conda + packages: + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.6.15-hbd8a1cb_0.conda + sha256: 7cfec9804c84844ea544d98bda1d9121672b66ff7149141b8415ca42dfcd44f6 + md5: 72525f07d72806e3b639ad4504c30ce5 + depends: + - __unix + license: ISC + size: 151069 + timestamp: 1749990087500 + YAML + + (testpath/"pixi.toml").write <<~TOML + [project] + name = "test" + version = "0.1.0" + TOML + + system bin/"pixi-pack" + assert_path_exists testpath/"environment.tar" + system bin/"pixi-unpack", "environment.tar" + assert_path_exists testpath/"env" + assert_path_exists testpath/"activate.sh" + end +end diff --git a/Formula/p/pixi.rb b/Formula/p/pixi.rb new file mode 100644 index 0000000000000..2d6b745f8a486 --- /dev/null +++ b/Formula/p/pixi.rb @@ -0,0 +1,57 @@ +class Pixi < Formula + desc "Package management made easy" + homepage "https://pixi.sh" + url "https://github.com/prefix-dev/pixi/archive/refs/tags/v0.59.0.tar.gz" + sha256 "d3610917b2b952ec3eb87c7a9d7cca284a452c8c6733bab8016ca82ca704fc7a" + license "BSD-3-Clause" + head "https://github.com/prefix-dev/pixi.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c25c6cea42fc1aca0a4f51ad644b2b73ed7f683fcacb20e1498f1eb72cc654b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19f9fce887256d61dd48fb43aacc61c87d92279f8dde1590c1c29c510eadcaf6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fb60ca60d5de96ee4acb3c8f61cd2091afbc2d781cd7cdf55a1f7dcffb38fab" + sha256 cellar: :any_skip_relocation, sonoma: "38209e1777c6d44d9f333b39d3179c06153052ef69dc664fa5bc3d054ac33057" + sha256 cellar: :any_skip_relocation, arm64_linux: "5aacc1475319c0607a2e8d8048aca17d00212bb46e169e55adedd592c4d79cb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "854ae048388dc43574ff24f199e511e55d70250d0a6690b4e35911549de2c209" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" + depends_on "xz" # for liblzma + end + + def install + ENV["PIXI_VERSION"] = Utils.safe_popen_read("git", "describe", "--tags").chomp.delete_prefix("v") if build.head? + + ENV["PIXI_SELF_UPDATE_DISABLED_MESSAGE"] = <<~EOS + `self-update` has been disabled for this build. + Run `brew upgrade pixi` instead. + EOS + system "cargo", "install", *std_cargo_args(path: "crates/pixi") + + generate_completions_from_executable(bin/"pixi", "completion", "-s") + end + + test do + ENV["PIXI_HOME"] = testpath + + assert_equal "pixi #{version}", shell_output("#{bin}/pixi --version").strip + + system bin/"pixi", "init" + assert_path_exists testpath/"pixi.toml" + end +end diff --git a/Formula/p/pixie.rb b/Formula/p/pixie.rb new file mode 100644 index 0000000000000..ed68ef087c855 --- /dev/null +++ b/Formula/p/pixie.rb @@ -0,0 +1,51 @@ +class Pixie < Formula + desc "Observability tool for Kubernetes applications" + homepage "https://px.dev/" + url "https://github.com/pixie-io/pixie.git", + tag: "release/cli/v0.8.8", + revision: "042e35639f16d32fced41939c5fbc5085e1272ff" + license "Apache-2.0" + head "https://github.com/pixie-io/pixie.git", branch: "main" + + livecheck do + url :stable + regex(%r{^release/cli/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6e17b0e1ecc5bf561d54cccb31a1303c348bee8bf51f640942463a7d6a8bb5dc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c7fbaafa23de8f05e452d24747a4edd4c8a0d61a0a01b3ba664ca804c843e8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76f8833feb8e94f8f7fb33848057603d35acf63c1d6acdbfd02d3a4c22e863fb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1cf672d31b3b683081c257958eb297f56ff5f0b394dc48f51e4be862751f9bce" + sha256 cellar: :any_skip_relocation, sonoma: "8fdd739ced12415fabcad6ceeb96550171e1b585143f274376ec56f776c83d90" + sha256 cellar: :any_skip_relocation, ventura: "afdfd7b18e2528f563336d90b53d9266a72b86d847df1afac796fc70f7f6e8e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "eac95efb5aa8d4021a5c102cfcba35c8f5be2ebc2ce5f310cea8214699ae5f45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da530afc94d1ab1753b32d48e963b6cb6e4c45ef4daaaa2cad0255e54fab966a" + end + + depends_on "go" => :build + + conflicts_with "px", because: "both install `px` binaries" + + def install + semver = build.head? ? "0.0.0-dev" : version + ldflags = %W[ + -s -w + -X px.dev/pixie/src/shared/goversion.buildSCMRevision=#{Utils.git_short_head} + -X px.dev/pixie/src/shared/goversion.buildSCMStatus=Distribution + -X px.dev/pixie/src/shared/goversion.buildSemver=#{semver} + -X px.dev/pixie/src/shared/goversion.buildTimeStamp=#{time.to_i} + -X px.dev/pixie/src/shared/goversion.buildNumber=#{revision + bottle&.rebuild.to_i + 1} + -X px.dev/pixie/src/shared/goversion.builtBy=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"px"), "./src/pixie_cli" + + generate_completions_from_executable(bin/"px", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/px version") + assert_match tap.user.to_s, shell_output("#{bin}/px version") + assert_match "You must be logged in to perform this operation.", shell_output("#{bin}/px deploy 2>&1", 1) + end +end diff --git a/Formula/p/pixiewps.rb b/Formula/p/pixiewps.rb new file mode 100644 index 0000000000000..44f9d548d4e2f --- /dev/null +++ b/Formula/p/pixiewps.rb @@ -0,0 +1,55 @@ +class Pixiewps < Formula + desc "Offline Wi-Fi Protected Setup brute-force utility" + homepage "https://github.com/wiire-a/pixiewps" + url "https://github.com/wiire-a/pixiewps/releases/download/v1.4.2/pixiewps-1.4.2.tar.xz" + sha256 "c4dc0569e476ebdbd85992da2d1ff799db97ed0040da9dc44e13d08a97a9de1e" + license "GPL-3.0-or-later" + head "https://github.com/wiire-a/pixiewps.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "39f6d24e45aca635aea5b72c94fae6fc63fd53cdf10b9f23b97e02d1a567e948" + sha256 cellar: :any, arm64_sequoia: "c88ef0a54b523b538d88e491bf10933853e5600ebb4c391d0529e28b5feac368" + sha256 cellar: :any, arm64_sonoma: "db1461e5abc8e20b06a0e50a99a377367aa6f7840303307b49962ce4d31dcbe8" + sha256 cellar: :any, arm64_ventura: "721604be69bab25231f1bda20ed0f5c6f8dcb5a2788e2350c28726f86e043a1c" + sha256 cellar: :any, arm64_monterey: "faac5957f271cf40bed4393b1bcaa534ddc451c86b3898063d8f0261ef6702d3" + sha256 cellar: :any, arm64_big_sur: "2f777465467b09513a89236e118390430e9f019a8df3cec11bf8984ebc2d1453" + sha256 cellar: :any, sonoma: "a3840cc6caeabe8b3b10ab4647635514caccac688edee6c6830a7f961ec0057b" + sha256 cellar: :any, ventura: "5bca2f2fa9f976cb82339438061efabb2f6dc8c311d1aae97765890d00bba93e" + sha256 cellar: :any, monterey: "55bf66c8040b07df2441c3fcf7c13eb27686e4b9c9ca62daf74d57f144fa90f7" + sha256 cellar: :any, big_sur: "d714557686dab4f733d680e7d127452599a5bf9707941e275088848f2674070d" + sha256 cellar: :any, catalina: "30700b0eb892878e10b1a8bbc47188e8d9487c6f7afc7495050b4f0f5051dfd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed23311b1d5fba1e327d4897c4373df6b992c8d4eeca4cb9e531d04b6ddde7ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5a93abb2c126230b4c9254243b6fc99b778fb0d4aa220d0296a02940a46865e" + end + + depends_on "openssl@3" + + def install + system "make", "PREFIX=#{prefix}", "OPENSSL=1", "install" + end + + test do + output = shell_output( + "#{bin}/pixiewps " \ + "-a 7f:de:11:b9:69:1c:de:26:4a:21:a4:6f:eb:3d:b8:aa:aa:d7:30:09:09:32:b8:24:43:9b:e0:91:78:e7:6f:2c " \ + "-e d4:38:91:0d:4e:6e:15:fe:70:f0:97:a8:70:2a:b8:94:f5:75:74:bf:64:19:9f:92:82:9b:e0:2c:c0:a3:75:48" \ + ":08:8f:63:0a:82:37:0c:b7:95:42:cf:55:ca:a5:f0:f7:6c:b2:c7:5f:0e:23:18:44:f4:2d:00:f1:da:d4:94:23:56" \ + ":c7:2c:b0:f6:87:c7:77:d0:cc:11:35:cf:b7:4f:bc:44:8d:ca:35:8a:78:3d:99:7f:2b:cf:44:21:d8:e2:0f:3c:7d" \ + ":a4:72:c8:03:6f:77:2a:e9:fa:c1:e9:a8:2c:74:65:99:5a:e0:a5:26:d9:23:5e:4e:ec:5a:07:07:ab:80:db:3f:5f" \ + ":18:7f:fa:fa:f1:57:74:b2:8d:a9:97:a6:c6:0a:a5:e0:ec:93:09:23:67:f6:3e:ec:1f:55:32:a4:5d:73:8f:ab:91" \ + ":74:cf:1d:79:85:12:c1:81:f5:ea:a6:68:9d:8e:c7:c6:be:01:dc:d9:f8:68:80:11:55:d7:44:6a " \ + "-r bc:ad:54:2f:88:44:7c:12:69:ef:34:31:4a:17:1c:92:b1:d7:06:4c:73:be:9f:d3:ed:87:63:74:10:46:0f:46" \ + ":8c:36:b5:d4:a0:ba:af:85:9c:b2:30:42:d7:59:43:75:5a:d7:79:96:fb:ee:7b:66:db:b7:a8:f9:22:9c:a5:d3:b8" \ + ":e7:c0:c4:5c:58:34:1f:56:a8:1a:41:a8:d2:e8:f6:3e:c9:3a:93:d9:9b:59:5c:a8:e0:78:84:6c:fc:05:e8:76:a3" \ + ":e6:3b:33:94:4a:a9:ff:50:fb:60:fa:97:3b:6d:cc:04:f1:5e:36:24:a9:06:7a:f8:6b:00:e9:71:9d:89:be:9c:b2" \ + ":9c:1f:ca:6d:d6:4d:ab:46:3d:b3:11:1f:8d:40:f7:c8:a4:39:48:c5:ca:1b:f6:30:95:7d:d9:68:41:ef:0a:37:b2" \ + ":4a:37:e4:a4:b0:dd:7e:c1:af:3e:66:ea:bf:16:0a:7a:8a:05:00:01:a4:29:77:a9:d4:81:d4:0e " \ + "-s 90:5f:f5:7d:93:e5:c4:3c:62:0d:26:65:dd:59:57:d5:ba:ba:f1:b7:30:91:72:7c:54:94:38:08:1e:13:35:38 " \ + "-z b0:2b:07:50:28:e7:6e:5f:fa:27:1b:31:92:85:43:cb:c5:6a:ec:73:e2:27:c3:b9:80:ec:5b:ed:88:f0:1e:ec " \ + "-n 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + ) + assert_match "WPS pin: 04847533", output + end +end diff --git a/Formula/p/pixman.rb b/Formula/p/pixman.rb new file mode 100644 index 0000000000000..3e8d98b770191 --- /dev/null +++ b/Formula/p/pixman.rb @@ -0,0 +1,52 @@ +class Pixman < Formula + desc "Low-level library for pixel manipulation" + homepage "https://cairographics.org/" + url "https://cairographics.org/releases/pixman-0.46.4.tar.gz" + sha256 "d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c" + license "MIT" + + livecheck do + url "https://cairographics.org/releases/?C=M&O=D" + regex(/href=.*?pixman[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2b011051909d7f9ad432a76d32c0490f796ad545f7acbd6445356024f0c712e5" + sha256 cellar: :any, arm64_sequoia: "86f5fc013d2b22bbe41c1c14661287bf8e8e4c3ac95cd05b08b886d24918fe34" + sha256 cellar: :any, arm64_sonoma: "13dbd43835c979d6857f9b0e29a9eba81fadc0804f11cad392fb344f27a71f9b" + sha256 cellar: :any, arm64_ventura: "3cf671513baea31dfd16eb5ac688e23ed6c8209e0688ba96e2aa994e34c17676" + sha256 cellar: :any, sonoma: "491c963c8c80dc12305465d1191e4f29670a0cbda311d741ef8d074660392abc" + sha256 cellar: :any, ventura: "76ca1ceb7abe16fc7980e4b49284c64fc91868a98cb0bea14c3602685ba67281" + sha256 cellar: :any_skip_relocation, arm64_linux: "c16a1c1e8cfd9b07b36f2c53eac2e8ab8d6b26e9c2961ff060588b8a60b217d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "acad642a52a0e39159ba340f1e676c63d014422bf1d90e218ba7397b5873a2d1" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + def install + system "meson", "setup", "build", "--default-library=both", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) + { + pixman_color_t white = { 0xffff, 0xffff, 0xffff, 0xffff }; + pixman_image_t *image = pixman_image_create_solid_fill(&white); + pixman_image_unref(image); + return 0; + } + C + + pkgconf_flags = shell_output("pkgconf --cflags --libs pixman-1").chomp.split + system ENV.cc, "test.c", "-o", "test", *pkgconf_flags + system "./test" + end +end diff --git a/Formula/p/pixz.rb b/Formula/p/pixz.rb new file mode 100644 index 0000000000000..4e122da36c611 --- /dev/null +++ b/Formula/p/pixz.rb @@ -0,0 +1,52 @@ +class Pixz < Formula + desc "Parallel, indexed, xz compressor" + homepage "https://github.com/vasi/pixz" + url "https://github.com/vasi/pixz/releases/download/v1.0.7/pixz-1.0.7.tar.gz" + sha256 "d1b6de1c0399e54cbd18321b8091bbffef6d209ec136d4466f398689f62c3b5f" + license "BSD-2-Clause" + head "https://github.com/vasi/pixz.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b760a3d166ab9febb997a2e8b0b295fbbc8d5d4b50ecbc068a38e61a09ba5977" + sha256 cellar: :any, arm64_sequoia: "a92eaf0c89c34b5db225090adeedd24d26e3481d46e43eca1e94a2fdd509a98a" + sha256 cellar: :any, arm64_sonoma: "b563d62f32ca6b6382d1ed936be2bde9d83259081ff18b709ef4537d3aaa83b5" + sha256 cellar: :any, arm64_ventura: "8b8196d1d48f4104e40bd0963e7ffa5eca16e4499b746802fb55ff528e2fad25" + sha256 cellar: :any, arm64_monterey: "c4b1e3fe61fa37f1e6854d8adc032e18d16093b17060a97cd81f421bf9b1c9fc" + sha256 cellar: :any, arm64_big_sur: "7a61cbb0485e22375ce03a81089da37f34aac406a14447856e7f81b7240a1b86" + sha256 cellar: :any, sonoma: "b584017019900bd6e4e8d1040b74b54095c2d17e3ade4b08dbd963a03ce44917" + sha256 cellar: :any, ventura: "b76e0ef617047c5db1d634e87630904018c01d89468576c50fced29b08887f85" + sha256 cellar: :any, monterey: "e106250f6eee640ca6061f55ff2339539c2047325d878478bd7e5c5acf354d08" + sha256 cellar: :any, big_sur: "088fd95bfc5540586369b0adb35f6f37009b1f30d4b29de58342828202b8317e" + sha256 cellar: :any_skip_relocation, arm64_linux: "87cb676de2f355d9918910e4649f45f4a1b1b474cb91479bc21ad19c0bddf2c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a110294724b79c7a130b3705c91d25fa52e01f7cf6655d486a0901ada6d6b24" + end + + depends_on "asciidoc" => :build + depends_on "docbook-xsl" => :build + depends_on "pkgconf" => :build + depends_on "libarchive" + depends_on "xz" + + uses_from_macos "libxslt" + + def install + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libarchive"].opt_lib/"pkgconfig" + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + system "a2x", "--doctype", "manpage", "--format", "manpage", "src/pixz.1.asciidoc" + man1.install "src/pixz.1" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + testfile = testpath/"file.txt" + testfile.write "foo" + system bin/"pixz", testfile, "#{testpath}/file.xz" + end +end diff --git a/Formula/p/pjproject.rb b/Formula/p/pjproject.rb new file mode 100644 index 0000000000000..c80c9ed338b63 --- /dev/null +++ b/Formula/p/pjproject.rb @@ -0,0 +1,49 @@ +class Pjproject < Formula + desc "C library for multimedia protocols such as SIP, SDP, RTP and more" + homepage "https://www.pjsip.org/" + url "https://github.com/pjsip/pjproject/archive/refs/tags/2.15.1.tar.gz" + sha256 "8f3bd99caf003f96ed8038b8a36031eb9d8cd9eaea1eaff7e01c2eef6bd55706" + license "GPL-2.0-or-later" + head "https://github.com/pjsip/pjproject.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e614d35816c69c1cabcccee4c1a3409184f4829fe44c37d1b366821d32fd6bc1" + sha256 cellar: :any, arm64_sequoia: "6934065fa7d3cf8901366cb2a892aa434cced856977d74ed3c39826a9108b769" + sha256 cellar: :any, arm64_sonoma: "37aee9503222ef91a2b238f04655f915f6f4cb64666a81250b3fda956559afd5" + sha256 cellar: :any, arm64_ventura: "8a168da1989261e327802b0416972f5dd7a743598da0607a99ba3f19d2fba116" + sha256 cellar: :any, sonoma: "04c5521468cab3b1985f3a9ad0d936bdaddf84c3bf20cc907465672a500ae530" + sha256 cellar: :any, ventura: "142ed76d42dc51b501f2efadeb7ef4dfe214ad90bc64e93447fb80a591e67705" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c3249ca0b0e84e1f6e8e5c9fce8213727d2cfb16f0224daaeb88e3d6e9fd6f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0fb2516ec89621fc3622cd52ed7dfa0d814f49f496c32ec6763c2a8f605be66" + end + + depends_on "openssl@3" + + def install + system "./configure", "--prefix=#{prefix}" + ENV.deparallelize + system "make", "dep" + system "make" + system "make", "install" + + arch = if OS.mac? && Hardware::CPU.arm? + "arm" + elsif Hardware::CPU.arm? + "aarch64" + else + Hardware::CPU.arch.to_s + end + target = OS.mac? ? "apple-darwin#{OS.kernel_version}" : "unknown-linux-gnu" + + bin.install "pjsip-apps/bin/pjsua-#{arch}-#{target}" => "pjsua" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pjsua --version 2>&1") + end +end diff --git a/Formula/p/pk.rb b/Formula/p/pk.rb new file mode 100644 index 0000000000000..e1885645636f2 --- /dev/null +++ b/Formula/p/pk.rb @@ -0,0 +1,42 @@ +class Pk < Formula + desc "Field extractor command-line utility" + homepage "https://github.com/johnmorrow/pk" + url "https://github.com/johnmorrow/pk/releases/download/v1.0.2/pk-1.0.2.tar.gz" + sha256 "0431fe8fcbdfb3ac8ccfdef3d098d6397556f8905b7dec21bc15942a8fc5f110" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1ef1dd86ba0dbedafb386987968dbdf0f22472cb290a7742e80e55efd6976b00" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be0b36f6d80ee6d6191207faa7454eff5a35fac1aaa54cb3df986482bb4129fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df016243a24085cb085bd78cb4e2a0c0a58f0f017a94a09f5b9f7555e6739745" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ca0e954622b756edff41bb508288566a7a950c3a30e83ba0d8013289599afa0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "123a225b6c4a6208cb0b6847bae1cf60ce8934dccbfb1c5c9eb7ed5d055f6c0a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "410e868c6d09c373aba677fe256bea9dd1e3a09d867c009e0afba66c6c671c8e" + sha256 cellar: :any_skip_relocation, sonoma: "827832f8c2cedee3e1c6f4e954a8d601a6da16bdbc6d629f96aa1434a5a0286b" + sha256 cellar: :any_skip_relocation, ventura: "abd231d946e68bfa108184889fd1685c060908ffdfe2c09c203918f340160181" + sha256 cellar: :any_skip_relocation, monterey: "21e1d9edcb574d9c010e7bbb08bb4430eeccac5e89f85029a6e247a586117c1f" + sha256 cellar: :any_skip_relocation, big_sur: "37e03d0ccea4bda2a3616ba39950d8c685e0a49775ed61abfd4b25649e4d2a25" + sha256 cellar: :any_skip_relocation, catalina: "2f9c36e03681f154a24e063e2600d0de8f8afd5f9b114083ef1f34656a7721e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c8968e6c98f33f8dc985fa43ad59ced699019c620095f1f7569f73bba19d654" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eebcfa3e63674f0aed1d0e541cfa74edd1efcdb1e1a4a4919ef993c14b4b9b6b" + end + + on_macos do + depends_on "argp-standalone" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make" + system "make", "test" + system "make", "install" + end + + test do + assert_equal "B C D", pipe_output("#{bin}/pk 2..4", "A B C D E", 0).chomp + end +end diff --git a/Formula/p/pkcs11-helper.rb b/Formula/p/pkcs11-helper.rb new file mode 100644 index 0000000000000..76c8058de1f28 --- /dev/null +++ b/Formula/p/pkcs11-helper.rb @@ -0,0 +1,56 @@ +class Pkcs11Helper < Formula + desc "Library to simplify the interaction with PKCS#11" + homepage "https://github.com/OpenSC/OpenSC/wiki/pkcs11-helper" + url "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-1.30.0/pkcs11-helper-1.30.0.tar.bz2" + sha256 "4c5815ba910cabf26df08d449ca2909daf4538c9899aa7f7fadc61229d3488a9" + license any_of: ["BSD-3-Clause", "GPL-2.0-or-later"] + head "https://github.com/OpenSC/pkcs11-helper.git", branch: "master" + + livecheck do + url :stable + regex(/pkcs11-helper[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "dc2f5704425099ef5e72485ab502243159567b827452fc009c753b0f0d11878e" + sha256 cellar: :any, arm64_sequoia: "02b61fe7186023ea090b8fab072d980451ef4edc5e860c247c2ccba6c422de2b" + sha256 cellar: :any, arm64_sonoma: "d5877e3655d952f137610ab0168b4e996dec23dfc16b1ac4db5ab0cdb46eb525" + sha256 cellar: :any, arm64_ventura: "720ab7371a01c2ffe4884736240afb22b32c04162a2f5bdf658658556ed7ff74" + sha256 cellar: :any, arm64_monterey: "341be8334102c4305e939ec2b171724076afeb36182cbecc585b84a79de9eb04" + sha256 cellar: :any, sonoma: "6e3be91e06ad419132aec259d8d7d2700e8672f2011493da0b8635409523fc0e" + sha256 cellar: :any, ventura: "322d2589c5b33c6ee5ed63b379661701b3bafb3ffb468dc862b33476765448e8" + sha256 cellar: :any, monterey: "c809e4cf49d88ce528e2469be931667f121cbe243e04bf549da28bbe20c05ac3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b3b99c82949368e2f0d2f44ba07e37f59ea6b9dc48596c7cab2259d27234dee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ce66c1a7dcf6725cf1b4f480e734cd4b7ff2f74835b4464c2bf182ce9640d1b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + printf("Version: %08x", pkcs11h_getVersion ()); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpkcs11-helper", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pkcs11-tools.rb b/Formula/p/pkcs11-tools.rb new file mode 100644 index 0000000000000..4f899d278ae6e --- /dev/null +++ b/Formula/p/pkcs11-tools.rb @@ -0,0 +1,71 @@ +class Pkcs11Tools < Formula + desc "Tools to manage objects on PKCS#11 crypotographic tokens" + homepage "https://github.com/Mastercard/pkcs11-tools" + url "https://github.com/Mastercard/pkcs11-tools/releases/download/v2.6.0/pkcs11-tools-2.6.0.tar.gz" + sha256 "5fcda842ed009dacef5d935f5d46bda81bdc26795737af525aa904655a640ba0" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "99d3a5104235020c9ba34054b886dff32a538917592f9b9a7d4535c26513b072" + sha256 cellar: :any, arm64_sequoia: "22183ecdec16099e7c38d97f5499deb1fbcb9236a9d4deb2c08fa22fd7007358" + sha256 cellar: :any, arm64_sonoma: "41dd63eb44f9015459c816515202120069605a31875d536a920ec87ede6c1990" + sha256 cellar: :any, arm64_ventura: "c1babe9a656e43094e4c1e824ae76eaf60111376d57a77e31c6e3c9186fed553" + sha256 cellar: :any, arm64_monterey: "861b3b73c9e30599ddbb2fed03b89a6a648f74106d834551500971cdacbae820" + sha256 cellar: :any, arm64_big_sur: "a2f9db1cff53bf73aaaadd1117dd72f8aac42d38e7ef40b59b56be535e4067c1" + sha256 cellar: :any, sonoma: "2086010d622865bce37c477946bda04a16d7f488f7a9d7cee6ba94bad3708f80" + sha256 cellar: :any, ventura: "f98f64e004a340203e91c268d37751fec2426b8a1b6a3a4d910f7834176b8b3f" + sha256 cellar: :any, monterey: "d54d48ba1f3f92918c56441059b1da04a2231779e9f3a6ed67c036303d68499a" + sha256 cellar: :any, big_sur: "27d568c817878042985a01e7cdb1ee74da2904c8bd42c87f9eaf72496c0e7c68" + sha256 cellar: :any_skip_relocation, arm64_linux: "4de234bc0e7f615fe95f3ab3604d8d5915d2bfa2948f778fb10921b92c83dc2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "204de485eee7fdc9c63d60924bf2a2559bcddb2b13badbd60f97c8fcbd6ab4c3" + end + + depends_on "pkgconf" => :build + depends_on "softhsm" => :test + depends_on "openssl@3" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + # Fix Linux build error using gnulib upstream commit. + # ../gl/string.h:965:1: error: expected ',' or ';' before '_GL_ATTRIBUTE_MALLOC' + # Remove when the gnulib submodule is updated and available in a release + patch :p2 do + on_linux do + url "https://git.savannah.gnu.org/cgit/gnulib.git/patch/lib?id=cc91160a1ea5e18fcb2ccadb32e857d365581f53" + directory "gl" + end + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + # configure new softhsm token, generate a token key, and use it + mkdir testpath/"tokens" + softhsm_conf = testpath/"softhsm.conf" + + softhsm_conf.write <<~EOS + directories.tokendir = #{testpath}/tokens + directories.backend = file + log.level = INFO + slots.removable = false + slots.mechanisms = ALL + library.reset_on_fork = false + EOS + + ENV["SOFTHSM2_CONF"] = softhsm_conf + ENV["PKCS11LIB"] = Formula["softhsm"].lib/"softhsm/libsofthsm2.so" + ENV["PKCS11TOKENLABEL"] = "test" + ENV["PKCS11PASSWORD"] = "0000" + + system "softhsm2-util", "--init-token", "--slot", "0", "--label", "test", "--pin", "0000", "--so-pin", "0000" + system bin/"p11keygen", "-i", "test", "-k", "aes", "-b", "128", "encrypt" + system bin/"p11kcv", "seck/test" + system bin/"p11ls" + end +end diff --git a/Formula/p/pkg-config-wrapper.rb b/Formula/p/pkg-config-wrapper.rb new file mode 100644 index 0000000000000..4c666d9921eae --- /dev/null +++ b/Formula/p/pkg-config-wrapper.rb @@ -0,0 +1,35 @@ +class PkgConfigWrapper < Formula + desc "Easier way to include C code in your Go program" + homepage "https://github.com/influxdata/pkg-config" + url "https://github.com/influxdata/pkg-config/archive/refs/tags/v0.3.0.tar.gz" + sha256 "769deabe12733224eaebbfff3b5a9d69491b0158bdf58bbbbc7089326d33a9c8" + license "MIT" + head "https://github.com/influxdata/pkg-config.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "38db4194e6c73d61d01365e344422ad23e3ab1384d61bef30aaf75db5db3de73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5433945b3eb446dabe6a51967215e163fc075721d1fa308d08a851d1a1ef909a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5433945b3eb446dabe6a51967215e163fc075721d1fa308d08a851d1a1ef909a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5433945b3eb446dabe6a51967215e163fc075721d1fa308d08a851d1a1ef909a" + sha256 cellar: :any_skip_relocation, sonoma: "a1c1fb8986bc47a941874b3e3c42c915bc59266952ed06f621d948c33141d89a" + sha256 cellar: :any_skip_relocation, ventura: "a1c1fb8986bc47a941874b3e3c42c915bc59266952ed06f621d948c33141d89a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe16f70242ebb3d1a235d15aa2cdb4225352b5bedb28e82a06ff1b122fab3f9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea8df3f7ff08e285a8e1a05b6bcf7baf24978719522b67f3dfaf3b9d4cdc8847" + end + + depends_on "go" => :build + depends_on "pkgconf" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "Found pkg-config executable", shell_output("#{bin}/pkg-config-wrapper 2>&1", 1) + end +end diff --git a/Formula/p/pkgconf.rb b/Formula/p/pkgconf.rb new file mode 100644 index 0000000000000..a09d2bbe2f92f --- /dev/null +++ b/Formula/p/pkgconf.rb @@ -0,0 +1,115 @@ +class Pkgconf < Formula + desc "Package compiler and linker metadata toolkit" + homepage "https://github.com/pkgconf/pkgconf" + url "https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.xz" + mirror "https://fossies.org/linux/misc/pkgconf-2.5.1.tar.xz" + mirror "http://fresh-center.net/linux/misc/pkgconf-2.5.1.tar.xz" + sha256 "cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243" + license "ISC" + + livecheck do + url "https://distfiles.ariadne.space/pkgconf/" + regex(/href=.*?pkgconf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "84f26aae5e27d846e00a9fb741dfe3b02a14cb2f81ca4a4246617379cda99fc0" + sha256 arm64_sequoia: "6fabdc3d0a656e2d505aec4e39b2f8e354601ee141469554fa71eabc3386e18f" + sha256 arm64_sonoma: "bc7f9963756598248220da128a5f06ea0e6685aa7cd965a5ce357fcfaad2cdec" + sha256 arm64_ventura: "8d53ac0deb003f8866315c4c27a1aa4767467c9fa13c912f52cb29e37fbe7916" + sha256 tahoe: "ab1a7c8edaffa3a27400174deb4845140bdd56942d9ab2a7bccdf30f7ef74d91" + sha256 sequoia: "a074f871aa476dec1101c13b4fcfbb9354a8b35bcb6e056f8411463913632071" + sha256 sonoma: "439e8e638986c4423f430719f28cd7c62e8d9a1b87ac658c069fd5da939784f8" + sha256 ventura: "e38acbfd930c9588f4d1eabe061b956948aaff32cccb30c457430779c1e4f7f5" + sha256 arm64_linux: "abdf9fbefab1d7b7219a619fb5bd44b58c00a71146a43cb24b71700c2ead369e" + sha256 x86_64_linux: "9df0ce4d9ebae822b763a9c18565d1596a40b2a2e5849c743e768a99f554f24b" + end + + head do + url "https://github.com/pkgconf/pkgconf.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + if build.head? + ENV["LIBTOOLIZE"] = "glibtoolize" + system "./autogen.sh" + end + + pc_path = %W[ + #{HOMEBREW_PREFIX}/lib/pkgconfig + #{HOMEBREW_PREFIX}/share/pkgconfig + ] + pc_path += if OS.mac? + %W[ + /usr/local/lib/pkgconfig + /usr/lib/pkgconfig + #{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version} + ] + else + ["#{HOMEBREW_LIBRARY}/Homebrew/os/linux/pkgconfig"] + end + + args = %W[ + --disable-silent-rules + --with-pkg-config-dir=#{pc_path.uniq.join(File::PATH_SEPARATOR)} + --with-system-includedir=#{MacOS.sdk_path_if_needed if OS.mac?}/usr/include + --with-system-libdir=/usr/lib + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + # Make `pkgconf` a drop-in replacement for `pkg-config` by adding symlink[^1]. + # Similar to Debian[^2], Fedora, ArchLinux and MacPorts. + # + # [^1]: https://github.com/pkgconf/pkgconf/#pkg-config-symlink + # [^2]: https://salsa.debian.org/debian/pkgconf/-/blob/debian/unstable/debian/pkgconf.links?ref_type=heads + bin.install_symlink "pkgconf" => "pkg-config" + man1.install_symlink "pkgconf.1" => "pkg-config.1" + end + + test do + (testpath/"foo.pc").write <<~PC + prefix=/usr + exec_prefix=${prefix} + includedir=${prefix}/include + libdir=${exec_prefix}/lib + + Name: foo + Description: The foo library + Version: 1.0.0 + Cflags: -I${includedir}/foo + Libs: -L${libdir} -lfoo + PC + + ENV["PKG_CONFIG_LIBDIR"] = testpath + system bin/"pkgconf", "--validate", "foo" + assert_equal "1.0.0", shell_output("#{bin}/pkgconf --modversion foo").strip + assert_equal "-lfoo", shell_output("#{bin}/pkgconf --libs-only-l foo").strip + assert_equal "-I/usr/include/foo", shell_output("#{bin}/pkgconf --cflags foo").strip + + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + assert(pkgconf_compare_version(LIBPKGCONF_VERSION_STR, LIBPKGCONF_VERSION_STR) == 0); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}/pkgconf", "-L#{lib}", "-lpkgconf" + system "./a.out" + + # Make sure system-libdir is removed as it can cause problems in superenv + if OS.mac? + ENV.delete "PKG_CONFIG_LIBDIR" + refute_match "-L/usr/lib", shell_output("#{bin}/pkgconf --libs libcurl") + end + end +end diff --git a/Formula/p/pkgdiff.rb b/Formula/p/pkgdiff.rb new file mode 100644 index 0000000000000..d01d858fe1312 --- /dev/null +++ b/Formula/p/pkgdiff.rb @@ -0,0 +1,23 @@ +class Pkgdiff < Formula + desc "Tool for analyzing changes in software packages (e.g. RPM, DEB, TAR.GZ)" + homepage "https://lvc.github.io/pkgdiff/" + url "https://github.com/lvc/pkgdiff/archive/refs/tags/1.8.tar.gz" + sha256 "4b44a933a776500937887134cf89b94a89199304c416ad05b2ac365cce1076d8" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d61bc9f1e348b223672343dccd6a023459f729576a4850d91406ef253ccaa8b0" + end + + depends_on "binutils" + depends_on "gawk" + depends_on "wdiff" + + def install + system "perl", "Makefile.pl", "--install", "--prefix=#{prefix}" + end + + test do + system bin/"pkgdiff" + end +end diff --git a/Formula/p/pkgx.rb b/Formula/p/pkgx.rb new file mode 100644 index 0000000000000..bfb0b7f5b6aee --- /dev/null +++ b/Formula/p/pkgx.rb @@ -0,0 +1,42 @@ +class Pkgx < Formula + desc "Standalone binary that can run anything" + homepage "https://pkgx.sh" + url "https://github.com/pkgxdev/pkgx/archive/refs/tags/v2.7.tar.gz" + sha256 "479897abc6d51df25bda10b98ab6efef8424cb14bfd3003148d55216e6ca353b" + license "Apache-2.0" + head "https://github.com/pkgxdev/pkgx.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cf31f5eaabb8fd15f2bb5f8f73b55e4133813cc06d761fc3690a2044c8422e6b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d54923e20f0940729bec3cda7d4d597ea3b5535776e8aaaffa76927a5d83fdf4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d02236c3096e6cb1755fe79a4f35002f20afd3ec72debc05c5e23c85e287c81f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c74465ddc16dded699648b040ec1d7a7d45bd1d0ed5f3fb64c2155379f1d5372" + sha256 cellar: :any_skip_relocation, sonoma: "8b4a08f77e540968ad06d9910b56f2aeaf3e95a8e9eb62a71f6ca5047f7eea5d" + sha256 cellar: :any_skip_relocation, ventura: "a8931040aed065d0d8374df553904f6da327fdc3b6b22b0516893de41447bef6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2bf05af625f05d00d025bf90f48d195a3ad1e78f514cb000827260a18aeed11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cdeed2e0e4c6d5943a8edacddbe544ac18eb1a6fd7024d7d476cdf5342ae1afb" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "crates/cli") + end + + test do + (testpath/"main.go").write <<~GO + package main + + func main() { + println("Hello world") + } + GO + assert_match "1.23", shell_output("#{bin}/pkgx go@1.23 version") + assert_match "Hello world", shell_output("#{bin}/pkgx go@1.23 run main.go 2>&1") + end +end diff --git a/Formula/p/pkl-lsp.rb b/Formula/p/pkl-lsp.rb new file mode 100644 index 0000000000000..2da2fe9055e0c --- /dev/null +++ b/Formula/p/pkl-lsp.rb @@ -0,0 +1,50 @@ +class PklLsp < Formula + desc "Language server for Pkl" + homepage "https://pkl-lang.org/lsp/current/index.html" + url "https://github.com/apple/pkl-lsp/releases/download/0.4.0/pkl-lsp-0.4.0.jar" + sha256 "4e2f63416f258f3117d75d6b1c20b718c7c418b974461960fffe1d051e0424ba" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "2c1c5a522fb441d2587911e97756e1fe926ad91ec099fc626b7aee0dc83f0889" + end + + depends_on "openjdk" + + def install + libexec.install "pkl-lsp-#{version}.jar" => "pkl-lsp.jar" + bin.write_jar_script libexec/"pkl-lsp.jar", "pkl-lsp" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pkl-lsp --version") + + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"pkl-lsp") do |stdin, stdout, _, w| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + stdin.close + sleep 1 + sleep 2 if OS.mac? && Hardware::CPU.intel? + Process.kill("TERM", w.pid) + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/p/pkl.rb b/Formula/p/pkl.rb new file mode 100644 index 0000000000000..35c0d6d16e3cd --- /dev/null +++ b/Formula/p/pkl.rb @@ -0,0 +1,44 @@ +class Pkl < Formula + desc "CLI for the Pkl programming language" + homepage "https://pkl-lang.org" + url "https://github.com/apple/pkl/archive/refs/tags/0.30.0.tar.gz" + sha256 "f3788e253ca26a5d74ac2f933c0646fa3012af130be084079cc9dee9e283cc40" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6bff17f1d02b703c683b8b70fa9ebb21bb1eafca6a9b9e98993fd36bc34caf50" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "766d3e34c1cd773a9f2852c2028b0956717f74cef458f49684ac31ace3b07499" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3284e574abbb612d359236718204f960835353b90f56e0927a130de6d6e5de8f" + sha256 cellar: :any_skip_relocation, sonoma: "37b70356b715c322ff5ff6d3cfb045d1cd4e6593129815af3307ce994dc30825" + sha256 cellar: :any_skip_relocation, arm64_linux: "b749810825d3b91cb521751a61085fe7d5151f02abda1453cbcd60568f8320df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "462e0a5edf8dc2e6f5b5d6c4a905c5da2dc5c3eafb56bef59ec9e51a768a1408" + end + + depends_on "gradle@8" => :build + depends_on "openjdk@21" => :build + + uses_from_macos "zlib" + + def install + ENV["JAVA_HOME"] = Formula["openjdk@21"].opt_prefix + + arch = Hardware::CPU.arm? ? "aarch64" : "amd64" + job_name = "pkl-cli:#{OS.mac? ? "mac" : "linux"}Executable#{arch.capitalize}" + + args = %W[ + --no-daemon + -DreleaseBuild=true + -Dpkl.native-Dpolyglot.engine.userResourceCache=#{HOMEBREW_CACHE}/polyglot-cache + ] + + system "gradle", *args, job_name + bin.install "pkl-cli/build/executable/pkl-#{OS.mac? ? "macos" : "linux"}-#{arch}" => "pkl" + generate_completions_from_executable(bin/"pkl", "shell-completion") + end + + test do + assert_equal "1", pipe_output("#{bin}/pkl eval -x bar -", "bar = 1") + + assert_match version.to_s, shell_output("#{bin}/pkl --version") + end +end diff --git a/Formula/p/pktanon.rb b/Formula/p/pktanon.rb new file mode 100644 index 0000000000000..4e272618187c8 --- /dev/null +++ b/Formula/p/pktanon.rb @@ -0,0 +1,45 @@ +class Pktanon < Formula + desc "Packet trace anonymization" + homepage "https://www.tm.kit.edu/software/pktanon/index.html" + url "https://www.tm.kit.edu/software/pktanon/download/pktanon-1.4.0-dev.tar.gz" + sha256 "db3f437bcb8ddb40323ddef7a9de25a465c5f6b4cce078202060f661d4b97ba3" + license "GPL-2.0-or-later" + revision 5 + + # The regex below matches development versions, as a stable version isn't yet + # available. If stable versions appear in the future, we should modify the + # regex to omit development versions (i.e., remove `(?:[._-]dev)?`). + livecheck do + url "https://www.tm.kit.edu/software/pktanon/download/index.html" + regex(/href=.*?pktanon[._-]v?(\d+(?:\.\d+)+)(?:[._-]dev)?\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d90ddd6a6904fe38ba56eb87fc3b31c29cf19e4f67f3251245cb8ca8aa072c8e" + sha256 cellar: :any, arm64_sequoia: "44134c55be8a09ccfa54203ccf2ce297df8c8a76e4ef3c94040a523c0bf50cda" + sha256 cellar: :any, arm64_sonoma: "2cbb5ed4c7c0e22a3de3025fe12860026c7b8264a08374c4f662467ab91187f3" + sha256 cellar: :any, arm64_ventura: "0016600c5e396a07b502fe6060b8e83ad0659479a433e4baf7b0d1a3afba27eb" + sha256 cellar: :any, sonoma: "202a34eac518440e7d191d05e083a66a424ba49e1df4bca38f83175ca6eafab8" + sha256 cellar: :any, ventura: "af27c678d49a0928c17ee03cb2af56e3997ffa71c53efbb5edb9c2db3bab1491" + sha256 cellar: :any_skip_relocation, arm64_linux: "4977778371998ed8200618874c1897db9733812e2a7aeeafcae134353fd8e88b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a169dd1f2a8226cb31c4039f5a34e62c2077d9667da21f4f6c9a23a7198ca852" + end + + depends_on "boost" => :build + depends_on "xerces-c" + + def install + # fix compile failure caused by undefined function 'sleep'. + inreplace "src/Timer.cpp", %Q(#include "Timer.h"\r\n), + %Q(#include "Timer.h"\r\n#include "unistd.h"\r\n) + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"pktanon", "--version" + end +end diff --git a/Formula/p/pla.rb b/Formula/p/pla.rb new file mode 100644 index 0000000000000..a53203c3b5caa --- /dev/null +++ b/Formula/p/pla.rb @@ -0,0 +1,53 @@ +class Pla < Formula + desc "Tool for building Gantt charts in PNG, EPS, PDF or SVG format" + homepage "https://www.arpalert.org/pla.html" + url "https://github.com/thierry-f-78/pla/archive/refs/tags/1.3.tar.gz" + sha256 "966ff0de604cfe4fe6e9650ee7776c5096211ad76e060ff4fd9edbd711977ef2" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "daa4f5dec64b4beba34a971523cc108879bc605eb20d0f69cbb9bbcea837b424" + sha256 cellar: :any, arm64_sequoia: "bb80455464cd182092c87cc0c242eda1050fdb3579ac6204338934741c5af632" + sha256 cellar: :any, arm64_sonoma: "34622b25b182676b0af0bcb5832d47a7d72672d3ad6e972036efdb551011fa7e" + sha256 cellar: :any, arm64_ventura: "7be71e6a234104ac6da8b3fdbf000f04345d08c4e1ba933bf736833628e1c415" + sha256 cellar: :any, arm64_monterey: "f335f954b419f71258a566f1abee2db8211f21aee91bb98f1c97ea8d42e48761" + sha256 cellar: :any, arm64_big_sur: "2cf83294bbf3d2bd6679e81eb248c588a413ddeadac46ceb24de6affb368aa06" + sha256 cellar: :any, sonoma: "0f45496b905bbfe8c259e01559fb2a2b4a1675bc211b80af5c5b62b4a5cf132d" + sha256 cellar: :any, ventura: "326cc1c21ff09f02478fc21e8a9050c413c5a6d233e53a49920bc8b0fde09b83" + sha256 cellar: :any, monterey: "0787de036e4a83bc03c2153ec4f447d187d6382c5bbf55f19cefb96488412b1a" + sha256 cellar: :any, big_sur: "a40094ed802100f73d1ba8fedf5e536649c7fcae1e8a1bed9e240abdc690f221" + sha256 cellar: :any, catalina: "9f16be821eecfd9fdc72071f1c2071790904f06ca56c0cf106021e7a1f4c8342" + sha256 cellar: :any_skip_relocation, arm64_linux: "64bb6856b07419d9cab8f02202a2410766c5da793d41d71f3464f20775e64175" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9d8b9816ad19faa6e3fafc3c461124f00a9633ef3c22d4c66c589f25395d60e" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + + def install + # Ubuntu-specific fix to add --no-as-needed linker flag on Linux. + inreplace "Makefile", "LDFLAGS = -lm", "LDFLAGS = -lm -Wl,--no-as-needed" if OS.linux? + system "make" + bin.install "pla" + end + + test do + (testpath/"test.pla").write <<~EOS + [4] REF0 Install des serveurs + color #8cb6ce + child 1 + child 2 + child 3 + + [1] REF0 Install 1 + start 2010-04-08 01 + duration 24 + color #8cb6ce + dep 2 + dep 6 + EOS + system bin/"pla", "-i", "#{testpath}/test.pla", "-o test" + end +end diff --git a/Formula/p/plakar.rb b/Formula/p/plakar.rb new file mode 100644 index 0000000000000..29d9f8fd9b0a1 --- /dev/null +++ b/Formula/p/plakar.rb @@ -0,0 +1,36 @@ +class Plakar < Formula + desc "Create backups with compression, encryption and deduplication" + homepage "https://plakar.io" + url "https://github.com/PlakarKorp/plakar/archive/refs/tags/v1.0.5.tar.gz" + sha256 "403062192081f65aaab598ec1837a6c52a0cf3ca22d4c77c658d83be5edb66b0" + license "ISC" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "28ce10ed9474bcc0a78b73e05090999fe5d87fc5064540df2716510b42b456b2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1cc727cd39a1196ef0ace1783fb7aea21419549b9e849a8d5978672f9ac16c25" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "849455f36a2031332508f9b260553ba9e44e180a7d0b9d521beccdccec2bc14e" + sha256 cellar: :any_skip_relocation, sonoma: "acc28eacd552939fb0e1dc68d036f3d152d32404c0ee33a844b77d649b856bc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "86f6af7a42ef77eea9a6224a9070bde3113d224e7c8f1978fb5f82a5a938b3b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10229b28cf56bc0c4719a69723322183e9be5657728867f05ee521451dbc5854" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/plakar version") + + repo = testpath/"plakar" + system bin/"plakar", "-no-agent", "at", repo, "create", "-plaintext", "-no-compression" + assert_path_exists repo + assert_match "Repository", shell_output("#{bin}/plakar -no-agent at #{repo} info") + end +end diff --git a/Formula/p/planck.rb b/Formula/p/planck.rb new file mode 100644 index 0000000000000..8e57344e1d43f --- /dev/null +++ b/Formula/p/planck.rb @@ -0,0 +1,101 @@ +class Planck < Formula + desc "Stand-alone ClojureScript REPL" + homepage "https://planck-repl.org/" + license "EPL-1.0" + revision 3 + head "https://github.com/planck-repl/planck.git", branch: "master" + + stable do + url "https://github.com/planck-repl/planck/archive/refs/tags/2.28.0.tar.gz" + sha256 "44f52e170d9a319ec89d3f7a67a7bb8082354f3da385a83bd3c7ac15b70b9825" + + # Backport fix for CMake 4 + patch do + url "https://github.com/planck-repl/planck/commit/0e336f722b52f18e130d3866d4c512b20bafcbd7.patch?full_index=1" + sha256 "685fb05b666f5ed419d986be6a35bda6448f062eaeb6666a9910a2c4dd4fd16a" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c64aeb509dadf3faeb898be147ed2e9a8ccdc6ae1b675a3fb3a616dbdf71a63" + sha256 cellar: :any, arm64_sequoia: "94dbee8e25f82b3d6af4c0f5aa768b072b5f42c37c17a6ee55820a6c3e9a9210" + sha256 cellar: :any, arm64_sonoma: "9b48ec0e76cc42f5a7bcee1704e043b6ee37cecbcc65acc9f9926367cb99b54a" + sha256 cellar: :any, arm64_ventura: "698191a3c5a7d477a3d21bd0f7638b67fbc34c8d71b69fa44d5814dcc842ac2b" + sha256 cellar: :any, sonoma: "1569b2fbd7b63d35aa7a8c86df20494825214a1b66e5f789cbf4c72c3a595560" + sha256 cellar: :any, ventura: "bc7daa8d9acfdf57759f78bacf47c2f5d03843bfb9885e29f87c288dfeee2c44" + sha256 cellar: :any_skip_relocation, arm64_linux: "454bc28f6cdd3a17ec9019e262b7af06a8970dfdef59850c371ae8a2922d0e04" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f833bad418d1787df2686c970188abd9dfad3657707a309827773253dfa5487b" + end + + depends_on "clojure" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on xcode: :build + depends_on "icu4c@77" + depends_on "libzip" + + uses_from_macos "vim" => :build # for xxd + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "webkitgtk" + end + + # Don't mix our ICU4C headers with the system `libicucore`. + # TODO: Upstream this. + patch :DATA + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + + if OS.linux? + ENV.prepend_path "PATH", Formula["openjdk"].opt_bin + + # The webkitgtk pkg-config .pc file includes the API version in its name (ex. javascriptcore-4.1.pc). + # We extract this from the filename programmatically and store it in javascriptcore_api_version + # and make sure planck-c/CMakeLists.txt is updated accordingly. + # On macOS this dependency is provided by JavaScriptCore.Framework, a component of macOS. + javascriptcore_pc_file = (Formula["webkitgtk"].lib/"pkgconfig").glob("javascriptcoregtk-*.pc").first + javascriptcore_api_version = javascriptcore_pc_file.basename(".pc").to_s.split("-").second + inreplace "planck-c/CMakeLists.txt", "javascriptcoregtk-4.0", "javascriptcoregtk-#{javascriptcore_api_version}" + end + + system "./script/build-sandbox" + bin.install "planck-c/build/planck" + bin.install "planck-sh/plk" + man1.install Dir["planck-man/*.1"] + end + + test do + assert_equal "0", shell_output("#{bin}/planck -e '(- 1 1)'").chomp + end +end + +__END__ +diff --git a/planck-c/CMakeLists.txt b/planck-c/CMakeLists.txt +index ec0dd3a..9bf1496 100644 +--- a/planck-c/CMakeLists.txt ++++ b/planck-c/CMakeLists.txt +@@ -104,17 +104,12 @@ elseif(UNIX) + target_link_libraries(planck ${JAVASCRIPTCORE_LDFLAGS}) + endif(APPLE) + +-if(APPLE) +- add_definitions(-DU_DISABLE_RENAMING) +- include_directories(/usr/local/opt/icu4c/include) +- find_library(ICU4C icucore) +- target_link_libraries(planck ${ICU4C}) +-elseif(UNIX) ++if(UNIX) + pkg_check_modules(ICU_UC REQUIRED icu-uc) + pkg_check_modules(ICU_IO REQUIRED icu-io) + include_directories(${ICU_UC_INCLUDE_DIRS} ${ICU_IO_INCLUDE_DIRS}) + target_link_libraries(planck ${ICU_UC_LDFLAGS} ${ICU_IO_LDFLAGS}) +-endif(APPLE) ++endif(UNIX) + + if(APPLE) + elseif(UNIX) diff --git a/Formula/p/plank.rb b/Formula/p/plank.rb new file mode 100644 index 0000000000000..bcf1adc6f6f2b --- /dev/null +++ b/Formula/p/plank.rb @@ -0,0 +1,64 @@ +class Plank < Formula + desc "Framework for generating immutable model objects" + homepage "https://pinterest.github.io/plank/" + url "https://github.com/pinterest/plank/archive/refs/tags/v1.6.tar.gz" + sha256 "6a233120905ff371b5c06a23b3fc7dd67e96355dd4d992a58ac087db22c500ef" + license "Apache-2.0" + head "https://github.com/pinterest/plank.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ac1ceb4106e80992e3660b5952f11d6a0e29c1269ebbef672f647cf752d26e20" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "902d73cd939a2dabe044db2f5023ba45c1c5ac8c83e77f650110fd167d03dd04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c300759e15cbfe318181f9a32a7642f297c72f20b6e5503e90d6ffe72dd9f04" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e8373c6eb34b0b7d1e82233fab34cec1a4bd1362daf8b85253367ab5e1373e9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6a91615ae4446513edd3ddb6fe91bcd8ae9768359da3af805ac7154e5a62487a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ba560dc8f11ecdeef3e745cc00a0b7f6cae8074d4cfff100f43227e548c5db7a" + sha256 cellar: :any_skip_relocation, sonoma: "4acb07fc0f33ab110982572fd68f70b14af77fc6765feb5b02d0c50652238225" + sha256 cellar: :any_skip_relocation, ventura: "14075f5bdbf249f033c85087b7e65acc1f9b984b3a4d79f72bbb34485bebb5b2" + sha256 cellar: :any_skip_relocation, monterey: "93cee4a7fa60747f1fc7f7e993d23b2af943bff41184ca681b807cfbc10582e3" + sha256 cellar: :any_skip_relocation, big_sur: "ea5dbcccb44df98be951af22f29b81b24bdba7731f88a472708fe7c5bc3d53e3" + sha256 cellar: :any_skip_relocation, catalina: "fc6838079a8a975c9bb77d17a050aa722d8446fcf9f62ca9fe09c8822d8651b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "69d69e6bee1ede7fecdb840ac121ce0d61d72d1d0218e501ca0bcea06c1a3d89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea941cd9c41a8ac9cb53678eaf17d5f0eeb04930758bcac1be793d17d60fe861" + end + + depends_on xcode: ["11.3", :build] + + uses_from_macos "swift" => :build + + # fix build failures, upstream pr ref, https://github.com/pinterest/plank/pull/301 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/plank/1.6.patch" + sha256 "782de4c235f03d5997c88506cd02e1cf97e5793fecf0e3bbff25d62f5393412a" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"pin.json").write <<~JSON + { + "id": "pin.json", + "title": "pin", + "description" : "Schema definition of a Pin", + "$schema": "https://json-schema.org/schema#", + "type": "object", + "properties": { + "id": { "type": "string" }, + "link": { "type": "string", "format": "uri"} + } + } + JSON + system bin/"plank", "--lang", "objc,flow", "--output_dir", testpath, "pin.json" + assert_path_exists testpath/"Pin.h", "[ObjC] Generated file does not exist" + assert_path_exists testpath/"PinType.js", "[Flow] Generated file does not exist" + end +end diff --git a/Formula/p/plantuml.rb b/Formula/p/plantuml.rb new file mode 100644 index 0000000000000..c7e938e92e042 --- /dev/null +++ b/Formula/p/plantuml.rb @@ -0,0 +1,37 @@ +class Plantuml < Formula + desc "Draw UML diagrams" + homepage "https://plantuml.com/" + url "https://github.com/plantuml/plantuml/releases/download/v1.2025.9/plantuml-1.2025.9.jar" + sha256 "280f4aa97f4f3b7af39358dd0d79f65e353b54a1630b5f121a13b1651162185d" + license "GPL-3.0-or-later" + version_scheme 1 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "404927df092a96d048a18dfdc14eb3655db0c8ac727b770563dd43d3cb69d0fd" + end + + depends_on "graphviz" + depends_on "openjdk" + + def install + jar = "plantuml.jar" + libexec.install "plantuml-#{version}.jar" => jar + (bin/"plantuml").write <<~EOS + #!/bin/bash + if [[ "$*" != *"-gui"* ]]; then + VMARGS="-Djava.awt.headless=true" + fi + GRAPHVIZ_DOT="#{Formula["graphviz"].opt_bin}/dot" exec "#{Formula["openjdk"].opt_bin}/java" $VMARGS -jar #{libexec}/#{jar} "$@" + EOS + chmod 0755, bin/"plantuml" + end + + test do + system bin/"plantuml", "-testdot" + end +end diff --git a/Formula/p/planus.rb b/Formula/p/planus.rb new file mode 100644 index 0000000000000..c9d29a0eb55a4 --- /dev/null +++ b/Formula/p/planus.rb @@ -0,0 +1,62 @@ +class Planus < Formula + desc "Alternative compiler for flatbuffers," + homepage "https://github.com/planus-org/planus" + url "https://github.com/planus-org/planus/archive/refs/tags/v1.2.0.tar.gz" + sha256 "b703a3ea88fbe6e5afee6b190c85805b589512c6ac56c0a1e35c115f4cb96bcc" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/planus-org/planus.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d5ab71bb5933d69b94775f87ce68ed005b5d7e99806293143470899c29bbe1da" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4287cc939380dc2981efe6fe7a4bb04547befb1f8e9c799c969bdd7a8c0c73d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc5e42cbcf34a7c697139d15ae73522eca8e015e4a0c3cc4830a6a1287c12789" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e5a07d91b93984e48c0016cb00cd3d3e7c91fb7278800ca7d198d15c2faf1b6b" + sha256 cellar: :any_skip_relocation, sonoma: "6942d3567cbfbe52c0eae99322703e1c5e6ba764bbb537a4096fc0fdf561cf97" + sha256 cellar: :any_skip_relocation, ventura: "d49b051a620f3e1779b80028980eb4a91382a1fcaaa491b9d30c39e24b2068a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "a878c0c743a78b1f7d64ca438f4bc66a6ffcb5623bd5d19499f5b29fd5bbcd36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e676ce06649a60ccb6c6c4236bc97a10cb2196348ee54628abe49f942b8e35cd" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/planus-cli") + + generate_completions_from_executable(bin/"planus", "generate-completions") + end + + test do + test_fbs = testpath/"test.fbs" + test_fbs.write <<~EOS + // example IDL file + + namespace MyGame.Sample; + + enum Color:byte { Red = 0, Green, Blue = 2 } + + union Any { Monster } // add more elements.. + + struct Vec3 { + x:float; + y:float; + z:float; + } + + table Monster { + pos:Vec3; + mana:short = 150; + hp:short = 100; + name:string; + friendly:bool = false (deprecated); + inventory:[ubyte]; + color:Color = Blue; + } + + root_type Monster; + + EOS + + system bin/"planus", "format", test_fbs + system bin/"planus", "check", test_fbs + end +end diff --git a/Formula/p/platformio.rb b/Formula/p/platformio.rb new file mode 100644 index 0000000000000..97699ba8bfdd2 --- /dev/null +++ b/Formula/p/platformio.rb @@ -0,0 +1,137 @@ +class Platformio < Formula + include Language::Python::Virtualenv + + desc "Your Gateway to Embedded Software Development Excellence" + homepage "https://platformio.org/" + url "https://files.pythonhosted.org/packages/2f/c5/ba3c1ba120b0466bb621615e4075a5c4752400c6adbf2a15edd91b9aefe9/platformio-6.1.18.tar.gz" + sha256 "6ea19c66fba3c5272378afa6ae11abbf883243dd8e503ac5f4ff8ac277ccc7c6" + license "Apache-2.0" + revision 3 + head "https://github.com/platformio/platformio-core.git", branch: "develop" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "203273b33fd4dc4a6ed81ff67434ff421ce3f7142a810227d282e83e168680b5" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "ajsonrpc" do + url "https://files.pythonhosted.org/packages/da/5c/95a9b83195d37620028421e00d69d598aafaa181d3e55caec485468838e1/ajsonrpc-1.2.0.tar.gz" + sha256 "791bac18f0bf0dee109194644f151cf8b7ff529c4b8d6239ac48104a3251a19f" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "bottle" do + url "https://files.pythonhosted.org/packages/7a/71/cca6167c06d00c81375fd668719df245864076d284f7cb46a694cbeb5454/bottle-0.13.4.tar.gz" + sha256 "787e78327e12b227938de02248333d788cfe45987edca735f8f88e03472c3f47" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "marshmallow" do + url "https://files.pythonhosted.org/packages/ab/5e/5e53d26b42ab75491cda89b871dab9e97c840bf12c63ec58a1919710cd06/marshmallow-3.26.1.tar.gz" + sha256 "e6d8affb6cb61d39d26402096dc0aee12d5a26d490a121f118d2e81dc0719dc6" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/b9/ab/33968940b2deb3d92f5b146bc6d4009a5f95d1d06c148ea2f9ee965071af/pyelftools-0.32.tar.gz" + sha256 "6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "semantic-version" do + url "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz" + sha256 "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ce/20/08dfcd9c983f6a6f4a1000d934b9e6d626cff8d2eeb77a89a68eef20a2b7/starlette-0.46.2.tar.gz" + sha256 "7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/de/ad/713be230bcda622eaa35c28f0d328c3675c371238470abdea52417f17a8e/uvicorn-0.34.3.tar.gz" + sha256 "35919a9a979d7a59334b6b10e05d77c1d0d574c50e0fc98b8b1a0f165708b55a" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"pio", shell_parameter_format: :click) + end + + test do + output = shell_output("#{bin}/pio boards ststm32") + assert_match "ST Nucleo F401RE", output + end +end diff --git a/Formula/p/playwright-mcp.rb b/Formula/p/playwright-mcp.rb new file mode 100644 index 0000000000000..f9868baa008fd --- /dev/null +++ b/Formula/p/playwright-mcp.rb @@ -0,0 +1,30 @@ +class PlaywrightMcp < Formula + desc "MCP server for Playwright" + homepage "https://github.com/microsoft/playwright-mcp" + url "https://registry.npmjs.org/@playwright/mcp/-/mcp-0.0.45.tgz" + sha256 "2ac1414025028c22e457d8c10df699f332cecee1187d1b83837482adf9d7469c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "896d398e309e5ef2a5a9dff33ef3b33ffc3485515ae02cf81ba830fa15186fb7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcp-server-playwright --version") + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"homebrew","version":"#{version}"}}} + {"jsonrpc":"2.0","method":"notifications/initialized","params":{}} + {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}} + JSON + + assert_match "browser_close", pipe_output(bin/"mcp-server-playwright", json, 0) + end +end diff --git a/Formula/p/plenv.rb b/Formula/p/plenv.rb new file mode 100644 index 0000000000000..614020158c555 --- /dev/null +++ b/Formula/p/plenv.rb @@ -0,0 +1,42 @@ +class Plenv < Formula + desc "Perl binary manager" + homepage "https://github.com/tokuhirom/plenv" + url "https://github.com/tokuhirom/plenv/archive/refs/tags/2.3.1.tar.gz" + sha256 "12004cfed7ed083911dbda3228a9fb9ce6e40e259b34e791d970c4f335935fa3" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/tokuhirom/plenv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5a0466e4db621c88c365d43a2833a11f9fb5c8284c906b34e2d8d71365370d31" + end + + depends_on "perl-build" + + def install + prefix.install "bin", "plenv.d", "completions", "libexec" + + # Run rehash after installing. + system bin/"plenv", "rehash" + + # Build an `:all` bottle + inreplace libexec/"plenv", "/usr/local/etc/plenv.d", "#{HOMEBREW_PREFIX}/etc/plenv.d" + end + + def caveats + <<~EOS + To enable shims add to your profile: + if which plenv > /dev/null; then eval "$(plenv init -)"; fi + With zsh, add to your .zshrc: + if which plenv > /dev/null; then eval "$(plenv init - zsh)"; fi + With fish, add to your config.fish + if plenv > /dev/null; plenv init - | source ; end + EOS + end + + test do + assert_match(/\* system \(set by/, shell_output("#{bin}/plenv versions")) + end +end diff --git a/Formula/p/plod.rb b/Formula/p/plod.rb new file mode 100644 index 0000000000000..637c7054c7325 --- /dev/null +++ b/Formula/p/plod.rb @@ -0,0 +1,92 @@ +class Plod < Formula + desc "Keep an online journal of what you're working on" + homepage "https://web.archive.org/web/20240510181918/https://deer-run.com/users/hal/" + url "https://web.archive.org/web/20160821040241/https://deer-run.com/~hal/plod/plod.shar" + version "1.9" + sha256 "1b7b8267c41b11c2f5413a8d6850099e0547b7506031b0c733121ed5e8d182f5" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c66eae9ec8211f26b1dd03894db3be83acd71fac5b27d39a6381482bf7f22d9a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b9c9cd2b570e27155488643d25109a5782ef3acbf76aa86ce249630999c5043" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8361343544ac10cdf1c2c6b37b4a8a4882d199c2d49ac22fc35b776199527fbf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8361343544ac10cdf1c2c6b37b4a8a4882d199c2d49ac22fc35b776199527fbf" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8361343544ac10cdf1c2c6b37b4a8a4882d199c2d49ac22fc35b776199527fbf" + sha256 cellar: :any_skip_relocation, sonoma: "50b1de5ad6d7fd6c74d36d14f45ea812fd606b1d1c1c3779c071c7c957323d48" + sha256 cellar: :any_skip_relocation, ventura: "7398f28822ffb0a9b2d84ba2bf98ed4bb49dea0c26ed4d8b6b0c16360173ca4b" + sha256 cellar: :any_skip_relocation, monterey: "7398f28822ffb0a9b2d84ba2bf98ed4bb49dea0c26ed4d8b6b0c16360173ca4b" + sha256 cellar: :any_skip_relocation, big_sur: "7398f28822ffb0a9b2d84ba2bf98ed4bb49dea0c26ed4d8b6b0c16360173ca4b" + sha256 cellar: :any_skip_relocation, catalina: "7398f28822ffb0a9b2d84ba2bf98ed4bb49dea0c26ed4d8b6b0c16360173ca4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "427039e1e718a334f7d4a2e803de0567e33d38908ea56204f3bb6476709d82ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8361343544ac10cdf1c2c6b37b4a8a4882d199c2d49ac22fc35b776199527fbf" + end + + # Upstream site shows error 503. As of deprecation date, + # install-on-request: 0 (30 days), 1 (90 days), 12 (365 days) + deprecate! date: "2024-09-14", because: :unmaintained + disable! date: "2025-09-14", because: :unmaintained + + def install + system "sh", "plod.shar" + + pager = ENV["PAGER"] || "/usr/bin/less" + editor = ENV["EDITOR"] || "/usr/bin/emacs" + visual = ENV["VISUAL"] || editor + + inreplace "plod" do |s| + s.gsub! "#!/usr/local/bin/perl", "#!/usr/bin/env perl" + s.gsub! '"/bin/crypt"', "undef" + s.gsub! "/usr/local/bin/less", pager + s.gsub! '$EDITOR = "/usr/local/bin/emacs"', "$EDITOR = \"#{editor}\"" + s.gsub! '$VISUAL = "/usr/local/bin/emacs"', "$VISUAL = \"#{visual}\"" + end + man1.install "plod.man" => "plod.1" + bin.install "plod" + prefix.install "plod.el.v1", "plod.el.v2" + + (prefix/"plodrc").write <<~EOS + # Uncomment lines and change their values to override defaults. + # man plod for further details. + # + # $PROMPT = 0; + # $CRYPTCMD = undef; + # $TMPFILE = "/tmp/plodtmp$$"; + # $HOME = (getpwuid($<))[7]; + # $EDITOR = "#{editor}"; + # $VISUAL = "#{visual}"; + # $PAGER = "#{pager}"; + # $LINES = 24; + # $LOGDIR = "$HOME/.logdir"; + # $LOGFILE = sprintf("%04d%02d", $YY+1900, $MM); + # $BACKUP = ".plod$$.bak"; + # $DEADLOG = "dead.log"; + # $STAMP = sprintf("%02d/%02d/%04d, %02d:%02d --", $MM, $DD, $YY+1900, $hh, $mm); + # $PREFIX = ''; + # $SUFFIX = ''; + # $SEPARATOR = '-----'; + EOS + end + + def caveats + <<~EOS + Emacs users may want to peruse the two available plod modes. They've been + installed at: + + #{prefix}/plod.el.v1 + #{prefix}/plod.el.v2 + + Certain environment variables can be customized. + + cp #{prefix}/plodrc ~/.plodrc + + See man page for details. + EOS + end + + test do + ENV["LOGDIR"] = testpath/".logdir" + system bin/"plod", "this", "is", "Homebrew" + assert File.directory? "#{testpath}/.logdir" + assert_match(/this is Homebrew/, shell_output("#{bin}/plod -P")) + end +end diff --git a/Formula/p/plog.rb b/Formula/p/plog.rb new file mode 100644 index 0000000000000..429dcd68efda2 --- /dev/null +++ b/Formula/p/plog.rb @@ -0,0 +1,71 @@ +class Plog < Formula + desc "Portable, simple and extensible C++ logging library" + homepage "https://github.com/SergiusTheBest/plog" + url "https://github.com/SergiusTheBest/plog/archive/refs/tags/1.1.11.tar.gz" + sha256 "d60b8b35f56c7c852b7f00f58cbe9c1c2e9e59566c5b200512d0cdbb6309a7c2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1128d5665015871186eb36b6ad55699345e184c854f510884bce557207d532fc" + end + + depends_on "cmake" => [:build, :test] + + resource "freertos_kernel" do + on_linux do + url "https://github.com/FreeRTOS/FreeRTOS-Kernel/archive/refs/tags/V11.1.0.tar.gz" + sha256 "0e21928b3bcc4f9bcaf7333fb1c8c0299d97e2ec9e13e3faa2c5a7ac8a3bc573" + end + end + + def install + args = [] + if OS.linux? + resource("freertos_kernel").stage buildpath/"freertos_kernel" + args << "-DFETCHCONTENT_SOURCE_DIR_FREERTOS_KERNEL=#{buildpath}/freertos_kernel" + end + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(TestPlog) + find_package(plog REQUIRED) + + add_executable(test_plog test.cpp) + include_directories(${PLOG_INCLUDE_DIRS}) + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include // Step1: include the headers + #include "plog/Initializers/RollingFileInitializer.h" + + int main() + { + plog::init(plog::debug, "Hello.txt"); // Step2: initialize the logger + + // Step3: write log messages using a special macro + // There are several log macros, use the macro you liked the most + + PLOGD << "Hello log!"; // short macro + PLOG_DEBUG << "Hello log!"; // long macro + PLOG(plog::debug) << "Hello log!"; // function-style macro + + // Also you can use LOG_XXX macro but it may clash with other logging libraries + LOGD << "Hello log!"; // short macro + LOG_DEBUG << "Hello log!"; // long macro + LOG(plog::debug) << "Hello log!"; // function-style macro + + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug", *std_cmake_args + system "cmake", "--build", "build", "--target", "test_plog" + system "build/test_plog" + assert_match "Hello log!", (testpath/"Hello.txt").read + end +end diff --git a/Formula/p/plotutils.rb b/Formula/p/plotutils.rb new file mode 100644 index 0000000000000..df83762ec6769 --- /dev/null +++ b/Formula/p/plotutils.rb @@ -0,0 +1,62 @@ +class Plotutils < Formula + desc "C/C++ function library for exporting 2-D vector graphics" + homepage "https://www.gnu.org/software/plotutils/" + url "https://ftpmirror.gnu.org/gnu/plotutils/plotutils-2.6.tar.gz" + mirror "https://ftp.gnu.org/gnu/plotutils/plotutils-2.6.tar.gz" + sha256 "4f4222820f97ca08c7ea707e4c53e5a3556af4d8f1ab51e0da6ff1627ff433ab" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "d0c2f1bd4307fc85da7079c7e215075d8440c8bb92c44e47d7b449d76afb6055" + sha256 cellar: :any, arm64_sequoia: "75033cc12b08f20dedc35745e9e85bedd357e49bdeb1f85c18aa3e6c094f7c4a" + sha256 cellar: :any, arm64_sonoma: "b9cb22e1853063ad3da1d788c15166565b20533ea54484dcca6311839795f6e4" + sha256 cellar: :any, arm64_ventura: "0f7f764c7ed45dcf462cc30ec41ea6d9439060145bd7b3ee3770c38b8c5adfaf" + sha256 cellar: :any, arm64_monterey: "e20de0661d2b4bed5cd649ac4bc113f652642d539be2cc3a806dc3d991e08ae8" + sha256 cellar: :any, arm64_big_sur: "df2133fa4e5dd7c50d8145c3960afd6a75e1ff6e5d9e3255ff03cea00ddfdab6" + sha256 cellar: :any, sonoma: "cf4be8e3f730ac440f962c7b586b5265933121ed6d94c4dc675e9a355b8909ba" + sha256 cellar: :any, ventura: "5b899b62f779098696d71a54ddba9ed0307110b9f04a21f6a7c11f65d777842a" + sha256 cellar: :any, monterey: "3ee9b41dfac9fef4f67c7cc09a10cc9ded3337ff31e1bcd3ddab89ab997f82ea" + sha256 cellar: :any, big_sur: "3ca14b49804af8b7364087731097dc992816d16a82fb6da2afeae18c1772e886" + sha256 cellar: :any, catalina: "edab5b91771162c1783dc69482834de6a2ca0fd077ea83b79d1934a365f7276d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f042f52c72e85c663689b220172d739a64e95948fc2c3b6175696c513fca1cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74b0edefd4bc7eb703cf1579159b7d746502c77538f58b981405c1cf9ba6d042" + end + + depends_on "libpng" + + on_linux do + depends_on "libx11" + depends_on "libxaw" + depends_on "libxext" + depends_on "libxt" + end + + def install + # Fix usage of libpng to be 1.5 compatible + inreplace "libplot/z_write.c", "png_ptr->jmpbuf", "png_jmpbuf (png_ptr)" + + # Avoid `-flat_namespace` flag. + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? + + args = %w[ + --disable-silent-rules + --enable-libplotter + ] + # Prevent opportunistic linkage to X11 + args << "--without-x" if OS.mac? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + assert pipe_output("#{bin}/graph -T ps", "0.0 0.0\n1.0 0.2\n").start_with?("") + end +end diff --git a/Formula/p/plow.rb b/Formula/p/plow.rb new file mode 100644 index 0000000000000..e08bb0f453789 --- /dev/null +++ b/Formula/p/plow.rb @@ -0,0 +1,34 @@ +class Plow < Formula + desc "High-performance and real-time metrics displaying HTTP benchmarking tool" + homepage "https://github.com/six-ddc/plow" + url "https://github.com/six-ddc/plow/archive/refs/tags/v1.3.2.tar.gz" + sha256 "a828641d9cf2876701e09865d259081a3005a29ea69391bda2fb6b1565489edf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "39ae40ee34b6fd5a0ac583152561e56db3d96a13e6c86613e8f0b7a7d3a0ce70" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65d432e948866ff0e5f31cc540f2e8e637d272eff116eb78bc621800e41965cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "65d432e948866ff0e5f31cc540f2e8e637d272eff116eb78bc621800e41965cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "65d432e948866ff0e5f31cc540f2e8e637d272eff116eb78bc621800e41965cb" + sha256 cellar: :any_skip_relocation, sonoma: "cf1c17517b61305a59fa751432db7398aa9d01f549d7bdcc0204e0d50a65821f" + sha256 cellar: :any_skip_relocation, ventura: "cf1c17517b61305a59fa751432db7398aa9d01f549d7bdcc0204e0d50a65821f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad04969ca26b96b3394e78b8a940eab678549a97fba6c051dc92ba82f7d646ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73cd9367711a8a191faafdf5782efa6b282a1f076b841e8218235c2b211c6a98" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + + generate_completions_from_executable(bin/"plow", shell_parameter_format: "--completion-script-", + shells: [:bash, :zsh]) + end + + test do + output = "2xx" + assert_match output.to_s, shell_output("#{bin}/plow -n 1 https://httpbin.org/get") + + assert_match version.to_s, shell_output("#{bin}/plow --version") + end +end diff --git a/Formula/p/plowshare.rb b/Formula/p/plowshare.rb new file mode 100644 index 0000000000000..8cd09bed9f414 --- /dev/null +++ b/Formula/p/plowshare.rb @@ -0,0 +1,48 @@ +class Plowshare < Formula + desc "Download/upload tool for popular file sharing websites" + homepage "https://github.com/mcrapet/plowshare" + url "https://github.com/mcrapet/plowshare/archive/refs/tags/v2.1.7.tar.gz" + sha256 "c17d0cc1b3323f72b2c1a5b183a9fcef04e8bfc53c9679a4e1523642310d22ad" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1010ee8073ce51f2450ac66e60978f6a5a3f7f0a48b9a0239e66b792a089d17b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9a2dcee44e65269a88332c733ecf4e8f6be114bb689283bfcdf35e091792902d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f580fd10b96117f7860b8c4bdd970f1d82f3f276b625a5960b2865801391dfbd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "861153a64f192c3e5ba25f43e59d5b3d8a96064cfb422b4d7a76986f96a4699d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0fdf55cf9624e4d8a9abfd52b93db4edb8540082d2ddad5bdee597612862aca0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d5552280803160034db82652d6eb8fa9ead72d8bd4c9be2c0e03c9b6ee2a897c" + sha256 cellar: :any_skip_relocation, sonoma: "d8a4b138d04f914d64ac46493274c001f7fcaa90e15fc99fde7041b770fa001e" + sha256 cellar: :any_skip_relocation, ventura: "459e03bc4ae1b5474cb45ede0e4cf578ac07e09ddf53ef5576a4d8565727f25c" + sha256 cellar: :any_skip_relocation, monterey: "9ee2632cc598eab9744d758e037c8a0eecc202c19e93ed01670bdefecb6ba00a" + sha256 cellar: :any_skip_relocation, big_sur: "3d995918e629820f93c9a6d9e2661c4182ba181d2959306adbbfea1b24af5498" + sha256 cellar: :any_skip_relocation, catalina: "71fc52474893fbb6b7d0a9644ea1a368a59f91fb59c946052a060a10e493157b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5afc0b7489b2da73229e12e21b35824f4eaa61e648f7eabc564872c95faedb1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5b299d87fbdd4deb61521da33c68f81bed370130a2ecaa3565d059055f315d8" + end + + depends_on "bash" + depends_on "feh" + depends_on "libcaca" + depends_on "recode" + depends_on "spidermonkey" + + on_macos do + depends_on "coreutils" + depends_on "gnu-sed" + end + + def install + sed_args = OS.mac? ? ["patch_gnused", "GNU_SED=#{Formula["gnu-sed"].opt_bin}/gsed"] : [] + system "make", "install", *sed_args, "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/plowlist 2>&1", 15) + assert_match "no folder URL specified!", output + end +end diff --git a/Formula/p/plplot.rb b/Formula/p/plplot.rb new file mode 100644 index 0000000000000..0b1476ec266f3 --- /dev/null +++ b/Formula/p/plplot.rb @@ -0,0 +1,82 @@ +class Plplot < Formula + desc "Cross-platform software package for creating scientific plots" + homepage "https://plplot.sourceforge.net/" + url "https://downloads.sourceforge.net/project/plplot/plplot/5.15.0%20Source/plplot-5.15.0.tar.gz" + sha256 "b92de4d8f626a9b20c84fc94f4f6a9976edd76e33fb1eae44f6804bdcc628c7b" + # The `:cannot_represent` is for lib/csa/* which is similar to BSD-Source-Code + # license but is not an exact match due to phrasing. It refers to "materials" + # rather than "software" and clause 2 does not mention contributor names + license all_of: ["LGPL-2.0-or-later", "BSD-3-Clause", "HPND", :cannot_represent] + revision 4 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "8299e82b21073d81694f33383bc0dd37931cfc8f468be9107b8c7b8fcd1cf501" + sha256 arm64_sequoia: "9305edca28268f6aed4efa7da578545c70d5feec4c2161da9f0e60aca9d3ace0" + sha256 arm64_sonoma: "bdc0cc407dee50cc18fe7b6b37db420f9331acb5b63b534931337fa151bf1d95" + sha256 arm64_ventura: "93efe317d3c6e9e265061402aec9a37c332d15420261e47faa3a5c3f06a4aa02" + sha256 sonoma: "fe49328f9a4c77b4ef5890371504401147804bb4254525186f1f85a651a740e0" + sha256 ventura: "32fde8a89d5580c4e09d9fac911a5ac0c5ee2c745a967109e1c130600c30fce7" + sha256 arm64_linux: "3d07131a9d21a41cc2e5ffcb258312724f3c474220e5d9a0baa8abdfea2c6013" + sha256 x86_64_linux: "91ae9fc5f0d6d1ba8d8bb494bee3304655c35a7c8fa224baad1b9427a3ca3848" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "freetype" + depends_on "gcc" # for gfortran + depends_on "glib" + depends_on "pango" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + # These example files end up with references to the Homebrew build + # shims unless we tweak them: + inreplace "examples/c/Makefile.examples.in", "@CC@", ENV.cc + inreplace "examples/c++/Makefile.examples.in", "@CXX@", ENV.cxx + + args = %w[ + -DPL_HAVE_QHULL=OFF + -DENABLE_ada=OFF + -DENABLE_d=OFF + -DENABLE_octave=OFF + -DENABLE_qt=OFF + -DENABLE_lua=OFF + -DENABLE_tk=OFF + -DENABLE_python=OFF + -DENABLE_tcl=OFF + -DPLD_xcairo=OFF + -DPLD_wxwidgets=OFF + -DENABLE_wxwidgets=OFF + -DENABLE_DYNDRIVERS=OFF + -DENABLE_java=OFF + -DPLD_xwin=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args(install_libdir: lib) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(int argc, char *argv[]) { + plparseopts(&argc, argv, PL_PARSE_FULL); + plsdev("extcairo"); + plinit(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}/plplot", "-L#{lib}", + "-lcsirocsa", "-lm", "-lplplot", "-lqsastime" + system "./test" + end +end diff --git a/Formula/p/pluto.rb b/Formula/p/pluto.rb new file mode 100644 index 0000000000000..a4fc94ccc1174 --- /dev/null +++ b/Formula/p/pluto.rb @@ -0,0 +1,39 @@ +class Pluto < Formula + desc "CLI tool to help discover deprecated apiVersions in Kubernetes" + homepage "https://fairwinds.com" + url "https://github.com/FairwindsOps/pluto/archive/refs/tags/v5.22.6.tar.gz" + sha256 "bfaff80908ac0d7de1c574ed9bb634cc592588b9abc66f48b3502e13e38b27ac" + license "Apache-2.0" + head "https://github.com/FairwindsOps/pluto.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e835e0deb45fbeddbe5d788c1ed2b46f361a056a580b0cbb3ac0dbc0f6de4e3c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e835e0deb45fbeddbe5d788c1ed2b46f361a056a580b0cbb3ac0dbc0f6de4e3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e835e0deb45fbeddbe5d788c1ed2b46f361a056a580b0cbb3ac0dbc0f6de4e3c" + sha256 cellar: :any_skip_relocation, sonoma: "6df298500debcbd30d28ad8fc8b4811a0d51675585a18225089b7de73e10167a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d973b32e8f0540312bb5bb7d44c29725129705c38a36e342a9097f2ede3bee4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2fe65dbafaa3c2b53f75735635d465790e94533ec1dffdba53be4e16a8699a25" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:), "cmd/pluto/main.go" + generate_completions_from_executable(bin/"pluto", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/pluto version") + assert_match "Deployment", shell_output("#{bin}/pluto list-versions") + + (testpath/"deployment.yaml").write <<~YAML + apiVersion: extensions/v1beta1 + kind: Deployment + metadata: + name: homebrew-test + spec: {} + YAML + assert_match "homebrew-test", shell_output("#{bin}/pluto detect deployment.yaml", 3) + end +end diff --git a/Formula/p/plutobook.rb b/Formula/p/plutobook.rb new file mode 100644 index 0000000000000..38974819231e5 --- /dev/null +++ b/Formula/p/plutobook.rb @@ -0,0 +1,76 @@ +class Plutobook < Formula + desc "Paged HTML Rendering Library" + homepage "https://github.com/plutoprint/plutobook" + url "https://github.com/plutoprint/plutobook/archive/refs/tags/v0.10.0.tar.gz" + sha256 "466f45581e9e274beede8a78f64ace3b3ad94d813d6c7b1a05594ab7e7f7fa84" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "baf08dda2b00b8182d5b44b174f7a2c347e9499208097b864458fcd6608182c5" + sha256 cellar: :any, arm64_sequoia: "f0a1e4f60e2a9d82d7e484e3fd58bdbd445b334457416fb9a1b6a041995635a1" + sha256 cellar: :any, arm64_sonoma: "65cb56b31039b1f8bbd1fdc884d60c2c03a5b93297dcf214544716114afe3c48" + sha256 cellar: :any, sonoma: "945cdea6346df29eb75eac1e1860502b43ccc3456112449f08d27316d324c0b1" + sha256 arm64_linux: "52b691c9ae517ffc39e70875d29b13fec6cda6a035adf2c383f3865d871debad" + sha256 x86_64_linux: "adc4527c479627b49a983c3fd2e7b952256dac2d01b62f3e90c222adca8f9e00" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "libidn2" + depends_on "webp" + uses_from_macos "expat" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1499 + end + + on_ventura do + depends_on "llvm" => :build + end + + fails_with :clang do + build 1499 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "9" + cause "requires GCC 10+" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + static const char kHTMLContent[] = R"HTML( + + + Hello! + + )HTML"; + + int main() { + plutobook::Book book(plutobook::PageSize::A4, plutobook::PageMargins::Narrow); + book.loadHtml(kHTMLContent); + book.writeToPdf("test.pdf"); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++20", "-I#{include}", "-L#{lib}", "-lplutobook", "-o", "test" + system "./test" + assert_path_exists testpath/"test.pdf" + end +end diff --git a/Formula/p/plutoprint.rb b/Formula/p/plutoprint.rb new file mode 100644 index 0000000000000..e3d3a747a53e6 --- /dev/null +++ b/Formula/p/plutoprint.rb @@ -0,0 +1,66 @@ +class Plutoprint < Formula + include Language::Python::Virtualenv + + desc "Generate PDFs and Images from HTML" + homepage "https://github.com/plutoprint/plutoprint" + url "https://files.pythonhosted.org/packages/ef/d0/af1b23123d37d1f672dbf5d68cf33b1ad1e274936079d33118ae9e18ce47/plutoprint-0.12.0.tar.gz" + sha256 "cbca7d1f2bc1c61c14c3feb9ab16b54583cfaa350ec8266de879940494e7dbe1" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ee61df735c944b3a3175b2e334991facc2efb3e6a36004e03a3b6bfa9c55d2b3" + sha256 cellar: :any, arm64_sequoia: "56b3831569d7b22d9194d4af5fcc3ad5f9d4eabd3751cacebead3ff45b6f3cee" + sha256 cellar: :any, arm64_sonoma: "83793fcf1f842cb335430289862178d0c151aa785089c8d663e7049529cbe073" + sha256 cellar: :any, sonoma: "58f05010899888e358c582e519f5588554e9a4abc6a4f1fd439b5c78da8a29fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb85b3c719aff6570f47fd4192951e50de21e73425d30734bd395a7297d2ee40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6867799febf98cf466f256adf3bc35c91fd51a59c68117ac9674ac09ac72c540" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "plutobook" + depends_on "python@3.14" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1499 + end + + on_ventura do + depends_on "llvm" => :build + end + + on_linux do + depends_on "patchelf" => :build + end + + fails_with :clang do + build 1499 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "9" + cause "requires GCC 10+" + end + + def python3 + "python3.14" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/plutoprint --version") + + (testpath/"test.html").write <<~HTML +

Hello World!

+ HTML + + system bin/"plutoprint", "test.html", "test.pdf" + assert_path_exists testpath/"test.pdf" + end +end diff --git a/Formula/p/plutovg.rb b/Formula/p/plutovg.rb new file mode 100644 index 0000000000000..1e6684f571322 --- /dev/null +++ b/Formula/p/plutovg.rb @@ -0,0 +1,36 @@ +class Plutovg < Formula + desc "Tiny 2D vector graphics library in C" + homepage "https://github.com/sammycage/plutovg" + url "https://github.com/sammycage/plutovg/archive/refs/tags/v1.3.1.tar.gz" + sha256 "bea672eb96ee36c2cbeb911b9bac66dfe989b3ad9a9943101e00aeb2df2aefdb" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "22711ec01c6c22f80d3d08b7dd9654f40b9ca652a739f6a69e5b78461f31ce05" + sha256 cellar: :any, arm64_sequoia: "774025b21d030a547097e0b34ee8cb92698daeef0a4f5e0de33f5795c5af3607" + sha256 cellar: :any, arm64_sonoma: "a712898f39053da6b3910d408854e8e9b534720fe613ef755f4c144b0773b351" + sha256 cellar: :any, sonoma: "448ad0244f6b6aecc8b3fde9de6ae55f447adbe8720f2d0b499968621808ec82" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a3aa64b816fcea3ca52c7ea9bc13db1bc0583a39c0426439b816fbda15c7df7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e453529bb5bfbdb2ce7651f6df369e2a02c14140e8434e309e8bb3eba08787a" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DPLUTOVG_BUILD_EXAMPLES=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (pkgshare/"examples").install "examples/smiley.c" + end + + test do + system ENV.cc, pkgshare/"examples/smiley.c", "-o", "smiley", "-I#{include}/plutovg", "-L#{lib}", "-lplutovg" + system testpath/"smiley" + assert File.size("smiley.png").positive? + end +end diff --git a/Formula/p/plz-cli.rb b/Formula/p/plz-cli.rb new file mode 100644 index 0000000000000..2a5e0916967c3 --- /dev/null +++ b/Formula/p/plz-cli.rb @@ -0,0 +1,34 @@ +class PlzCli < Formula + desc "Copilot for your terminal" + homepage "https://github.com/m1guelpf/plz-cli" + url "https://github.com/m1guelpf/plz-cli/archive/refs/tags/v0.1.9.tar.gz" + sha256 "ea6b65deb69f86e53210d2457f49a53bb73ab52282fccc5b6cae8e8c059ecb00" + license "MIT" + head "https://github.com/m1guelpf/plz-cli.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d9b537e8c4b84783ca6dd75eb6135a87aa7bf3acc6a0add1ae66468f0aefe85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "50e07537995ee92719ff5fa052d27a9e7207f5038ffbafb27550be81524e6921" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59f64a97b496d8cc7c177ad2a3ffd31d7c970b465bee348af314374a41b55443" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e728d0f2ea4149108122318610baf957e76c54ea046cb5b6cb1bec68155aad53" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e24a82b1820ee36a68fc47e7727b4022ed01e47ffdc6421471e4cbf7463898fb" + sha256 cellar: :any_skip_relocation, sonoma: "39166129ea2eb9136b48d262ab4b70a3ec523932f206c4903531c271919f9aef" + sha256 cellar: :any_skip_relocation, ventura: "c7d9faf76691065577ded69403cda475780883ce581b767ce72d1d4d498e5511" + sha256 cellar: :any_skip_relocation, monterey: "af063e2c326b92f311ec47ea495f96a7599b3c167b039d4dfe9c376c88c8434a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea4b6e1cae5242425c697d53ae081d4e06f4a8197caa56a45cc5cb7b2399dc10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eed33ef10df03c8dfcdb9be1f4921af47c94773a972747066fecfd66e1d0d9c1" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ENV["OPENAI_API_KEY"] = "sk-XXXXXXXX" + assert_match "API error", shell_output("#{bin}/plz brewtest", 1) + end +end diff --git a/Formula/p/plzip.rb b/Formula/p/plzip.rb new file mode 100644 index 0000000000000..8db3d2728583f --- /dev/null +++ b/Formula/p/plzip.rb @@ -0,0 +1,56 @@ +class Plzip < Formula + desc "Data compressor" + homepage "https://www.nongnu.org/lzip/plzip.html" + url "https://download.savannah.gnu.org/releases/lzip/plzip/plzip-1.12.tar.gz" + mirror "https://download-mirror.savannah.gnu.org/releases/lzip/plzip/plzip-1.12.tar.gz" + sha256 "50d71aad6fa154ad8c824279e86eade4bcf3bb4932d757d8f281ac09cfadae30" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/plzip/" + regex(/href=.*?plzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "6ba7db43465095e0bfb4b8a117f14bda8588fafc7dc605a2ada4035e81cfdb37" + sha256 cellar: :any, arm64_sequoia: "fa68bcaa48dd0802050154c8d55a806cdb2438147002937446900a25f252d386" + sha256 cellar: :any, arm64_sonoma: "f1170578b9745c5eea571dbafe958f3fdcdf455e3e2e60a8e2ced6cb7bf0b1b4" + sha256 cellar: :any, sonoma: "c8ca22b92ad54aa1ead0e792d0f34731d24b288d18968ae47f31a136d994434d" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8bc9d28a291384c6be41a8db706e57f5fe186d65fcab884ce351651e6439abf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1ca5446b35b910a59409dcde145db4957a80fcf1a65d6b5cb0903476070eb6b" + end + + depends_on "lzlib" + + # `make check` fails with "(stdin): Not enough memory" since Apple Clang 1700 / LLVM Clang 18 + on_macos do + depends_on "llvm@17" => :build if DevelopmentTools.clang_build_version >= 1700 + end + + def install + args = ["--prefix=#{prefix}"] + + # `make check` fails with "(stdin): Not enough memory" since Apple Clang 1700 / LLVM Clang 18 + if ENV.compiler == :clang && DevelopmentTools.clang_build_version >= 1700 + ENV.append_to_cflags "-I#{Formula["lzlib"].opt_include}" + args += %W[ + CC=#{Formula["llvm@17"].opt_bin}/clang + CXX=#{Formula["llvm@17"].opt_bin}/clang++ + CXXFLAGS=#{ENV.cxxflags} + ] + end + + system "./configure", *args + system "make" + system "make", "check" + ENV.deparallelize + system "make", "install" + end + + test do + text = "Hello Homebrew!" + compressed = pipe_output("#{bin}/plzip -c", text) + assert_equal text, pipe_output("#{bin}/plzip -d", compressed) + end +end diff --git a/Formula/p/pmccabe.rb b/Formula/p/pmccabe.rb new file mode 100644 index 0000000000000..0c93348daf750 --- /dev/null +++ b/Formula/p/pmccabe.rb @@ -0,0 +1,45 @@ +class Pmccabe < Formula + desc "Calculate McCabe-style cyclomatic complexity for C/C++ code" + homepage "https://gitlab.com/pmccabe/pmccabe" + url "https://gitlab.com/pmccabe/pmccabe/-/archive/v2.8/pmccabe-v2.8.tar.bz2" + sha256 "d37cafadfb64507c32d75297193f99f1afcf12289b7fcc1ddde4a852f0f2ac8a" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+[a-z]?)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6009f8f139c0e42442a816ca33c1bfdfc37139431948350fdc107d35d24c7cf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e638bf96079e2650e33e91114ab8b2559fbc1d9b998e6afa5eae06a6e1d4eca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "910d1bd786def57f3f61e080e1d8918f8dbebd42d0474fd273c93949b169d154" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f712276e9c471ef5ebb6de8c2849ca16372b9a5328e742c3c63a23b3106b84d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8c6016e6ab56ccce1d1582831e05a5f4d66650b7668a83fe8a73047badfc8dd3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e0510e85fcc8a8420a603b7d49ceb3e13e564f232092bd9c585e1917fb5433a9" + sha256 cellar: :any_skip_relocation, sonoma: "cd57edd23101b3dfef261c1a490f465631ba19486d4f18ea25bab760d18de972" + sha256 cellar: :any_skip_relocation, ventura: "532ca4f8afb763ea7cb3b1b5e657df66657ceac9d5d62ae3c91c142419c36e91" + sha256 cellar: :any_skip_relocation, monterey: "c2c173eb072bf9df7e1a17ab8293ca29739df8fc4432aa6d3441b600d693159e" + sha256 cellar: :any_skip_relocation, big_sur: "dde2bd06ac574cfa68f4f4f095fa09b3e9ed6a2656748d333aaa19fb09d81820" + sha256 cellar: :any_skip_relocation, catalina: "61595681c5b5a9a8b22b83728e2ee89d5280b5e970c3f6e93aee438fe763f93f" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdd2686801fae30006c4e4b28c937caa03fd01773b05c60c1c3900a90d4242fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90f8e8df8eab3561f9a8a91438cb4903395dda9d18d3f61daece3cd5f58445da" + end + + def install + ENV.append_to_cflags "-D__unix" + + system "make", "CFLAGS=#{ENV.cflags}" + bin.install "pmccabe", "codechanges", "decomment", "vifn" + man1.install Dir["*.1"] + end + + test do + assert_match "pmccabe #{version}", shell_output("#{bin}/pmccabe -V") + end +end diff --git a/Formula/p/pmd.rb b/Formula/p/pmd.rb new file mode 100644 index 0000000000000..7a1340926c56a --- /dev/null +++ b/Formula/p/pmd.rb @@ -0,0 +1,41 @@ +class Pmd < Formula + desc "Source code analyzer for Java, JavaScript, and more" + homepage "https://pmd.github.io" + url "https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.18.0/pmd-dist-7.18.0-bin.zip" + sha256 "2edb886669c91e1dee6b745beb2f9129a899e7f402a21ad616f034455c0af74a" + license "BSD-4-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "594a379e3bece2a5de2b80a64cd8af2fed7d70565635c1d6337106423f6d860d" + end + + depends_on "openjdk" + + def install + rm Dir["bin/*.bat"] + libexec.install Dir["*"] + (bin/"pmd").write_env_script libexec/"bin/pmd", Language::Java.overridable_java_home_env + end + + test do + (testpath/"java/testClass.java").write <<~JAVA + public class BrewTestClass { + // dummy constant + public String SOME_CONST = "foo"; + + public boolean doTest () { + return true; + } + } + JAVA + + output = shell_output("#{bin}/pmd check -d #{testpath}/java " \ + "-R category/java/bestpractices.xml -f json") + assert_empty JSON.parse(output)["processingErrors"] + end +end diff --git a/Formula/p/pmdmini.rb b/Formula/p/pmdmini.rb new file mode 100644 index 0000000000000..072c5d5c89102 --- /dev/null +++ b/Formula/p/pmdmini.rb @@ -0,0 +1,88 @@ +class Pmdmini < Formula + desc "Plays music in PC-88/98 PMD chiptune format" + homepage "https://github.com/mistydemeo/pmdmini" + url "https://github.com/mistydemeo/pmdmini/archive/refs/tags/v2.0.0.tar.gz" + sha256 "e3288dcf356e83ef4ad48cde44fcb703ca9ce478b9fcac1b44bd9d2d84bf2ba3" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f8e542c127cf51bbdc497e778ab932849fdc4d88e49ee9d7b0e127eaf5d74242" + sha256 cellar: :any, arm64_sequoia: "d3d140be8d8be65eaa695bb6e2b83964e989e141cfdd7ab8d2c9e05d81b55f54" + sha256 cellar: :any, arm64_sonoma: "a7f473c3f27a8a2e781391b383060545cfd8af27425b2c5eca4e18a2821ee2ff" + sha256 cellar: :any, arm64_ventura: "40b0b5792363acec17804091d52164083487b90a027f4fe2bdf05ca5a7045ba6" + sha256 cellar: :any, arm64_monterey: "27137c3e0caeb62401f16ff188ab94c629935342615a97be38e2a12e77877f33" + sha256 cellar: :any, arm64_big_sur: "a2c9ff100327daa46dae7c0fb7d49ee5dd71f7dbd28d585d6a8f6f74b3c2db92" + sha256 cellar: :any, sonoma: "6512a8514b45e27bd01920299f9cc0678fa6728a2cf29c8e8f4595448e01ff58" + sha256 cellar: :any, ventura: "1579283d159ce1e4a6cc100211eb926a463401e0cdee4ebf314008c478c14c09" + sha256 cellar: :any, monterey: "b84f6ad8b040a1b193b753e8d9934045d605b7ba37a547acab95302aea802a77" + sha256 cellar: :any, big_sur: "149cbae3b8b5b93ad8b5e55590e87b96120aa5c4fa729f142d2ab62ea3758d4a" + sha256 cellar: :any, catalina: "32eaf2e42986d019c891e922a4c6744abdc243c7d927210f65a26c4b363aa569" + sha256 cellar: :any_skip_relocation, arm64_linux: "42e14c83af0230e2c74fd9b47f6c9b2c55f8df98f8c55971f949c7c701068643" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40d7b0addf0328bbb2bd4ab80af954ce4feaa11d57fb76aecc21da90b522cf9e" + end + + depends_on "sdl2" + + resource "test_song" do + url "https://ftp.modland.com/pub/modules/PMD/Shiori%20Ueno/His%20Name%20Is%20Diamond/dd06.m" + sha256 "36be8cfbb1d3556554447c0f77a02a319a88d8c7a47f9b7a3578d4a21ac85510" + end + + # Add missing include + # Upstreamed here: https://github.com/mistydemeo/pmdmini/pull/3 + patch :DATA + + def install + # Add -fPIC on Linux + # Upstreamed here: https://github.com/mistydemeo/pmdmini/pull/3 + inreplace "mak/general.mak", "CFLAGS = -O2", "CFLAGS = -fPIC -O2 -fpermissive" + system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx} -std=c++03", "LD=#{ENV.cxx}" + + # Makefile doesn't build a dylib + flags = if OS.mac? + ["-dynamiclib", + "-install_name", "#{lib}/libpmdmini.dylib", + "-undefined", "dynamic_lookup"] + else + ["-shared"] + end + + system ENV.cxx, *flags, "-o", shared_library("libpmdmini"), *Dir["obj/*.o"] + + bin.install "pmdplay" + lib.install "libpmdmini.a", shared_library("libpmdmini") + (include/"libpmdmini").install Dir["src/*.h"] + (include/"libpmdmini/pmdwin").install Dir["src/pmdwin/*.h"] + end + + test do + resource("test_song").stage testpath + (testpath/"pmdtest.c").write <<~C + #include + #include "libpmdmini/pmdmini.h" + + int main(int argc, char** argv) + { + char title[1024]; + pmd_init(); + pmd_play(argv[1], argv[2]); + pmd_get_title(title); + printf("%s", title); + } + C + system ENV.cc, "pmdtest.c", "-L#{lib}", "-lpmdmini", "-o", "pmdtest" + assert_equal "mus #06", shell_output("#{testpath}/pmdtest #{testpath}/dd06.m #{testpath}") + end +end + +__END__ +diff --git a/sdlplay.c b/sdlplay.c +index 14c721e..1338cf9 100644 +--- a/sdlplay.c ++++ b/sdlplay.c +@@ -1,3 +1,4 @@ ++#include + #include + #include diff --git a/Formula/p/pmix.rb b/Formula/p/pmix.rb new file mode 100644 index 0000000000000..4c8f2ae12d354 --- /dev/null +++ b/Formula/p/pmix.rb @@ -0,0 +1,85 @@ +class Pmix < Formula + desc "Process Management Interface for HPC environments" + homepage "https://openpmix.github.io/" + license "BSD-3-Clause" + + stable do + url "https://github.com/openpmix/openpmix/releases/download/v5.0.9/pmix-5.0.9.tar.bz2" + sha256 "38d0667636e35a092e61f97be2dd84481f4cf566bfca11bb73c6b3d5da993b7a" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "0e5f353dd812019287f31b381c551b9a3f77772ab712ab1607b930a2c3a52f84" + sha256 arm64_sequoia: "1ee7ba6f1b0345697fb712c5ad5bc85135675dc4d6b61bca1b11cbcc401aea4f" + sha256 arm64_sonoma: "9ab0329a6e1145d5ef30f62a00682cd62f9d1b08de40a7a5038dbbee9070b324" + sha256 arm64_ventura: "7a317bc1c072c4d5abd971b5b85e349bef1e65b1bd772ab6979766caff48b71b" + sha256 sonoma: "43155c48adbf01dd0511b9f8ee7cc9ab22509963db829b79a66b2ec83124ffbd" + sha256 ventura: "b4256c6ba6136854eb0ddec59de740194fec67df3e25897bde079a3f5189919b" + sha256 arm64_linux: "cfceca59052a3e27623b35fb040b679afdf45aebf4ead3b0fe3747a6970b5ec2" + sha256 x86_64_linux: "72df17f01735c1d20071ae2e35b4314019a2c76aa56d8931bef599272aecf1c4" + end + + head do + url "https://github.com/openpmix/openpmix.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "hwloc" + depends_on "libevent" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + def install + # Avoid references to the Homebrew shims directory + cc = OS.linux? ? "gcc" : ENV.cc + inreplace "src/tools/pmix_info/support.c", "PMIX_CC_ABSOLUTE", "\"#{cc}\"" + + args = %W[ + --disable-silent-rules + --enable-ipv6 + --sysconfdir=#{etc} + --with-hwloc=#{Formula["hwloc"].opt_prefix} + --with-libevent=#{Formula["libevent"].opt_prefix} + --with-sge + ] + + system "./autogen.pl", "--force" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char **argv) { + pmix_value_t *val; + pmix_proc_t myproc; + pmix_status_t rc; + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpmix", "-o", "test" + system "./test" + + assert_match "PMIX: #{version}", shell_output("#{bin}/pmix_info --pretty-print") + end +end diff --git a/Formula/p/pms.rb b/Formula/p/pms.rb new file mode 100644 index 0000000000000..8beb1b7410fb5 --- /dev/null +++ b/Formula/p/pms.rb @@ -0,0 +1,43 @@ +class Pms < Formula + desc "Practical Music Search, an ncurses-based MPD client" + homepage "https://kimtore.github.io/pms/" + url "https://downloads.sourceforge.net/project/pms/pms/0.42/pms-0.42.tar.bz2" + sha256 "96bf942b08cba10ee891a63eeccad307fd082ef3bd20be879f189e1959e775a6" + license "MIT" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9ea144b1cf1481050e378149ef8731963f537878c38d74faa182a687e85d64a0" + sha256 cellar: :any, arm64_sequoia: "24de40d237ca53721190a990da548b37b777fa60e7599c9c0c0dcf289333bbeb" + sha256 cellar: :any, arm64_sonoma: "2992d520cbc631a4764f7387d6f37efbb9dc5d75a387993217fb83204fa17a50" + sha256 cellar: :any, arm64_ventura: "b5b477e377dcf2b781a503e8eb00673d7218e43d788fa56b70b960fad91c26f9" + sha256 cellar: :any, arm64_monterey: "5928678a604a80ee70d57b581b408890b4137d3c16f6123e3e455b636c36c14d" + sha256 cellar: :any, arm64_big_sur: "c119951216c45f24ff265bb5046631b6cbd5730300b8f4d441e7ac2be1363fcd" + sha256 cellar: :any, sonoma: "a931529745300c09aa3f2b9a9b0099927a8d268904771ae80adc6e1cb31df1f3" + sha256 cellar: :any, ventura: "c1bad14da37f77e32560f8369ec9978d7bdf9f23027a9e6e3be067e37ab8eded" + sha256 cellar: :any, monterey: "1c75eaf6c2e4a91e9c48323faf5c1426e53856447ce511002187c90001f72cb1" + sha256 cellar: :any, big_sur: "61b7be3d89ec3436b9e14733936d31564c6989bccb05cb675e529383ba799924" + sha256 cellar: :any, catalina: "de929bc53474adfa2a300f8954e0597489f88c22a29661e85c66d1ea8cc619ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "49c08001404ac52846502ef4173d8df4907aa2f3ce45bd55c48faf3c672100da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c3d1cf4ac839cd2c6ae549d4c303dfeed70951bf0473b4919bcbe62a2530961" + end + + depends_on "pkgconf" => :build + + depends_on "gettext" + depends_on "glib" + + uses_from_macos "ncurses" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/pms -?", 4) + assert_match "Practical Music Search v#{version}", output + end +end diff --git a/Formula/p/pmtiles.rb b/Formula/p/pmtiles.rb new file mode 100644 index 0000000000000..97470aba5ac7f --- /dev/null +++ b/Formula/p/pmtiles.rb @@ -0,0 +1,40 @@ +class Pmtiles < Formula + desc "Single-file executable tool for creating, reading and uploading PMTiles archives" + homepage "https://protomaps.com/docs/pmtiles" + url "https://github.com/protomaps/go-pmtiles/archive/refs/tags/v1.28.2.tar.gz" + sha256 "2085939dcaa616767fc7997d200693f40a62adc6e79f3db2a6d2a9eaa0ba0298" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5853e76d1dae2d7dec69439fe6f3cc2a8fcd6b4c7c462e97d6eb9071e8a68326" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5853e76d1dae2d7dec69439fe6f3cc2a8fcd6b4c7c462e97d6eb9071e8a68326" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5853e76d1dae2d7dec69439fe6f3cc2a8fcd6b4c7c462e97d6eb9071e8a68326" + sha256 cellar: :any_skip_relocation, sonoma: "416d46180f7726074a57789f797ca8b0493610129ca078dd648205c9e28f9ae0" + sha256 cellar: :any_skip_relocation, arm64_linux: "174d9a4e94c7feb05b63c16417a6157cfafa4f97dfb8c311810aa8f510bf70aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac37734d4973564f17b4de0576a5772a07b497dc69161024294dea90cf8c9098" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + port = free_port + + pid = fork do + exec bin/"pmtiles", "serve", ".", "--port", port.to_s + end + sleep 3 + output = shell_output("curl -sI http://localhost:#{port}") + assert_match "HTTP/1.1 204 No Content", output + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/p/pnetcdf.rb b/Formula/p/pnetcdf.rb new file mode 100644 index 0000000000000..96028b936a9d6 --- /dev/null +++ b/Formula/p/pnetcdf.rb @@ -0,0 +1,76 @@ +class Pnetcdf < Formula + desc "Parallel netCDF library for scientific data using the OpenMPI library" + homepage "https://parallel-netcdf.github.io/index.html" + url "https://parallel-netcdf.github.io/Release/pnetcdf-1.14.1.tar.gz" + sha256 "6f0f7221006c211fce9ddd2c008796b8c69dd717b2ad1be0b4027fc328fd3220" + license "NetCDF" + + livecheck do + url "https://parallel-netcdf.github.io/wiki/Download.html" + regex(/href=.*?pnetcdf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "bf7af9e280e7cd4ed65b1224c5162e438019e694acaddf3879fb762df70b9613" + sha256 arm64_sequoia: "ec1741e4908ba779f792995be4683b91815886f71a064e528e386ad4a0f6da25" + sha256 arm64_sonoma: "574fb8c333ad1b5c41f411214c8aafc8c16bba0fdae87adab77e0f156c14bc3b" + sha256 sonoma: "b81de914fd1a1240034c507f426aa28b0cf959abd106824cf39fd7e030a1481a" + sha256 arm64_linux: "f14a3eb2fdc8bdf79d7958132945e8756f9b5af261961efc7d943266b20a87cf" + sha256 x86_64_linux: "8a3e4533fbc8a1a5d1267dfe81cb3a1ab389ac4b0971de4eb6ade996bc2cc7a6" + end + + depends_on "gcc" + depends_on "open-mpi" + + uses_from_macos "m4" => :build + + def install + system "./configure", "--disable-silent-rules", + "--enable-shared", + *std_configure_args + system "make", "install" + end + + # These tests were converted from the netcdf formula. + test do + (testpath/"test.c").write <<~C + #include + #include "pnetcdf.h" + int main() + { + printf(PNETCDF_VERSION); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lpnetcdf", + "-o", "test" + assert_equal `./test`, version.to_s + + (testpath/"test.f90").write <<~FORTRAN + program test + use mpi + use pnetcdf + integer :: ncid, varid, dimids(2), ierr + integer :: dat(2,2) = reshape([1, 2, 3, 4], [2, 2]) + call mpi_init(ierr) + call check( nfmpi_create(MPI_COMM_WORLD, "test.nc", NF_CLOBBER, MPI_INFO_NULL, ncid) ) + call check( nfmpi_def_dim(ncid, "x", 2_MPI_OFFSET_KIND, dimids(2)) ) + call check( nfmpi_def_dim(ncid, "y", 2_MPI_OFFSET_KIND, dimids(1)) ) + call check( nfmpi_def_var(ncid, "data", NF_INT, 2, dimids, varid) ) + call check( nfmpi_enddef(ncid) ) + call check( nfmpi_put_var_int_all(ncid, varid, dat) ) + call check( nfmpi_close(ncid) ) + call mpi_finalize(ierr) + contains + subroutine check(status) + integer, intent(in) :: status + if (status /= nf_noerr) call abort + end subroutine check + end program test + FORTRAN + system "mpif90", "test.f90", "-L#{lib}", "-I#{include}", "-lpnetcdf", + "-o", "testf" + system "./testf" + end +end diff --git a/Formula/p/png++.rb b/Formula/p/png++.rb new file mode 100644 index 0000000000000..7004b673c93d6 --- /dev/null +++ b/Formula/p/png++.rb @@ -0,0 +1,39 @@ +class Pngxx < Formula + desc "C++ wrapper for libpng library" + homepage "https://www.nongnu.org/pngpp/" + url "https://download.savannah.gnu.org/releases/pngpp/png++-0.2.10.tar.gz" + sha256 "998af216ab16ebb88543fbaa2dbb9175855e944775b66f2996fc945c8444eee1" + license "BSD-3-Clause" + + livecheck do + url "https://download.savannah.gnu.org/releases/pngpp/" + regex(/href=.*?png\+\+[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "691981245534fb80ef1d86b9d7c2fff6f57ece7b50d7def13d5930be8dbf00f7" + end + + depends_on "libpng" + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + png::image image(200, 300); + if (image.get_width() != 200) return 1; + if (image.get_height() != 300) return 2; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/png2ico.rb b/Formula/p/png2ico.rb new file mode 100644 index 0000000000000..74b0b89dc1cda --- /dev/null +++ b/Formula/p/png2ico.rb @@ -0,0 +1,64 @@ +class Png2ico < Formula + desc "PNG to icon converter" + homepage "https://www.freshports.org/graphics/png2ico/" + url "https://pkg.freebsd.org/ports-distfiles/png2ico-src-2002-12-08.tar.gz" + sha256 "d6bc2b8f9dacfb8010e5f5654aaba56476df18d88e344ea1a32523bb5843b68e" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?png2ico-src[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "1230f7e82d9a9af6e1a67d105b01ef64d00e3bb6ed2e34f9710ca32e8b4d39c3" + sha256 cellar: :any, arm64_sequoia: "a6af9f89d575ccf1b4bb27b2b24eac106315c65775ca654859931a8b90cf09de" + sha256 cellar: :any, arm64_sonoma: "509b072c04016428a60fa1f3513e1dbcc71ff1706581b1e98998955914c42155" + sha256 cellar: :any, arm64_ventura: "6c622455e21df4ad015229e650548f113e34da96dc9e3fce58917ac55a2dc59c" + sha256 cellar: :any, arm64_monterey: "065215647e66fd79ec6412ce65189d5f26ecda3e6f71220707e57952351a8c80" + sha256 cellar: :any, arm64_big_sur: "af73312990d3438e1a996e9f22cd034805b4851b2fa13d8fae17437e8123538b" + sha256 cellar: :any, sonoma: "cc6ca2cf58514c7d2543bc85e9572fbbde0f7633470850e603d82769e71bb205" + sha256 cellar: :any, ventura: "2ecc84b99276ef5631e78be7ee5af4890972b3071aa288174a215ce3fdfc5b53" + sha256 cellar: :any, monterey: "df5fa87e241b6bf89efb2fc809cc499151ca2911030b33aa53547b6837810a35" + sha256 cellar: :any, big_sur: "b1fd25cc9bdcb94af6aa9bfa1a3b3fb401561e1c923ba5d88eef9fd12dd62678" + sha256 cellar: :any, catalina: "dfe2ebcf6a6b8c7e97e7b80c9d98aa46b27c27de7ace88464750d8db61aadf55" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a6b840c65addf3f2e5d113ac2b15abcf50adace8b5baf740f4066deeea4f5ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52b7eb707f96b3b8526ca15ce86c442247f0e4c34112ccef3ed22fe6cafb5a3b" + end + + depends_on "libpng" + + # Fix build with recent clang + patch :DATA + + def install + inreplace "Makefile", "g++", "$(CXX)" + system "make", "CPPFLAGS=#{ENV.cxxflags} #{ENV.cppflags} #{ENV.ldflags}" + bin.install "png2ico" + man1.install "doc/png2ico.1" + end + + test do + system bin/"png2ico", "out.ico", test_fixtures("test.png") + assert_path_exists testpath/"out.ico" + end +end + +__END__ +diff --git a/png2ico.cpp b/png2ico.cpp +index 8fb87e4..9dedb97 100644 +--- a/png2ico.cpp ++++ b/png2ico.cpp +@@ -34,6 +34,8 @@ Notes about transparent and inverted pixels: + #include + #include + #include ++#include ++#include + + #if __GNUC__ > 2 + #include diff --git a/Formula/p/pngcheck.rb b/Formula/p/pngcheck.rb new file mode 100644 index 0000000000000..57c6e08f805f4 --- /dev/null +++ b/Formula/p/pngcheck.rb @@ -0,0 +1,41 @@ +class Pngcheck < Formula + desc "Print info and check PNG, JNG, and MNG files" + homepage "http://www.libpng.org/pub/png/apps/pngcheck.html" + url "http://www.libpng.org/pub/png/src/pngcheck-3.0.3.tar.gz" + sha256 "c36a4491634af751f7798ea421321642f9590faa032eccb0dd5fb4533609dee6" + license all_of: ["MIT", "GPL-2.0-or-later"] + + livecheck do + url :homepage + regex(/href=.*?pngcheck[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "450096a7464e3698c4c42388293c1a21ee77c377b1e63fad1beb1c852258b8cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2a29178b3ecfedf6214021f290ebb12464f76b1b2179aa7aea7ae22be605b34" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd889a6e98aced57897687ed9c5235a5b6d617bb7a4e92c8c81f0d68c5b8662c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2bf9bb55a086b248952b1c262fe8f97dbd69b59fa01009775003867a2a891262" + sha256 cellar: :any_skip_relocation, arm64_monterey: "25f8462c7bd187f4fca2429f6844652ba6f1cc18143028fdf3fdb2ca98afd8aa" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a009523aaa8a5c8eb879fda99829ce1007b682b2caa2413af78112aa94ee741c" + sha256 cellar: :any_skip_relocation, sonoma: "931e18b72a84155a469606157602d4863b6287a5ce2e95b3acf1e9460962a51c" + sha256 cellar: :any_skip_relocation, ventura: "37dda1d112b78ff92c0af09a33a582645d3648019501f44ce3f76989b801777f" + sha256 cellar: :any_skip_relocation, monterey: "c5d47d9ee6ecfe6704d146c78531ad34c42e62a43a0bbfd0adc01e6a570d5a65" + sha256 cellar: :any_skip_relocation, big_sur: "8a025005cde9e8423606279cea498d921810f2334fe17a7bf23a1eba6ee54aef" + sha256 cellar: :any_skip_relocation, catalina: "a4256bacc1a8025fa298b35d93af3ecf213449ab9118106530cdd29455293ead" + sha256 cellar: :any_skip_relocation, arm64_linux: "56207f4e4eed3abba71a341c885dcddce5ed871563254ab20a626b38f87be57f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bee1eb579044cbdf33c6e4f045a800debb49b2f9ca4d3517d718956872a58a97" + end + + uses_from_macos "zlib" + + def install + system "make", "-f", "Makefile.unx", "ZINC=", "ZLIB=-lz" + bin.install %w[pngcheck pngsplit png-fix-IDAT-windowsize] + end + + test do + system bin/"pngcheck", test_fixtures("test.png") + end +end diff --git a/Formula/p/pngcrush.rb b/Formula/p/pngcrush.rb new file mode 100644 index 0000000000000..26aecfb7203ca --- /dev/null +++ b/Formula/p/pngcrush.rb @@ -0,0 +1,61 @@ +class Pngcrush < Formula + desc "Optimizer for PNG files" + homepage "https://pmt.sourceforge.io/pngcrush/" + url "https://downloads.sourceforge.net/project/pmt/pngcrush/1.8.13/pngcrush-1.8.13-nolib.tar.xz" + sha256 "3b4eac8c5c69fe0894ad63534acedf6375b420f7038f7fc003346dd352618350" + # The license is similar to "Zlib" license with clauses phrased like + # the "Libpng" license section for libpng version 0.5 through 0.88. + license :cannot_represent + + livecheck do + url :stable + regex(%r{url=.*?/pngcrush[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "50d8436ee484470b88c0cdf9a26a3ad4944eeaa2361b367ec4fd8a2672a09dec" + sha256 cellar: :any, arm64_sequoia: "75989b83be1fbc178d98f4f95701ad605c5374b1f46bde052c9b00da7cd30451" + sha256 cellar: :any, arm64_sonoma: "dc9ce31ceb46f11395e278373105809e820a7f5c7f5f5ccb5f13ea524d11778a" + sha256 cellar: :any, arm64_ventura: "dd2cab183f751d9587c1a6d7fbb9413354efbb4c608439969a301cc1d156f7ba" + sha256 cellar: :any, arm64_monterey: "748b50c94bac90c737a32e6292b60c2d122cac6bd41152dedb0250f96b577520" + sha256 cellar: :any, sonoma: "1b0c5196ebfe0b7a78313a4ab95345d0309fcf0904322e7a4efa57f85ebe8270" + sha256 cellar: :any, ventura: "5db90e14f1775d85c6dbb33ab0d0c6d96232f4da05489b845f0f6d3c4ffa579c" + sha256 cellar: :any, monterey: "6d59cef2837c1e448fd0501291b94c363229b6af303f2bf2534e17d5e46cfa21" + sha256 cellar: :any_skip_relocation, arm64_linux: "b85fdd4432e188ce43213bcb8f023303cb8b3e196424c793af66f15ffe1457d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a27f56827740191ffc0b61fc71746628d09270bf82d42bbbe009ebeae299f8a2" + end + + depends_on "libpng" + + uses_from_macos "zlib" + + # Use Debian's patch to fix build with `libpng`. + # Issue ref: https://sourceforge.net/p/pmt/bugs/82/ + patch do + url "https://sources.debian.org/data/main/p/pngcrush/1.8.13-1/debian/patches/ignore_PNG_IGNORE_ADLER32.patch" + sha256 "d1794d1ffef25a1c974caa219d7e33c0aa94f98c572170ec12285298d0216c29" + end + + def install + zlib = OS.mac? ? "#{MacOS.sdk_path_if_needed}/usr" : Formula["zlib"].opt_prefix + args = %W[ + CC=#{ENV.cc} + LD=#{ENV.cc} + CFLAGS=#{ENV.cflags} + LDFLAGS=#{ENV.ldflags} + PNGINC=#{Formula["libpng"].opt_include} + PNGLIB=#{Formula["libpng"].opt_lib} + ZINC=#{zlib}/include + ZLIB=#{zlib}/lib + ] + system "make", *args + bin.install "pngcrush" + end + + test do + system bin/"pngcrush", test_fixtures("test.png"), File::NULL + end +end diff --git a/Formula/p/pngnq.rb b/Formula/p/pngnq.rb new file mode 100644 index 0000000000000..ed0d68f27597e --- /dev/null +++ b/Formula/p/pngnq.rb @@ -0,0 +1,62 @@ +class Pngnq < Formula + desc "Tool for optimizing PNG images" + homepage "https://pngnq.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pngnq/pngnq/1.1/pngnq-1.1.tar.gz" + sha256 "c147fe0a94b32d323ef60be9fdcc9b683d1a82cd7513786229ef294310b5b6e2" + license "BSD-3-Clause" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "d463943082fa76cf5dac7bfc957001bb2445351a77b79dd4f317dc6266b114e5" + sha256 cellar: :any, arm64_sequoia: "06007a7ead893b75a74fa9f5cc7c466219fe2be5149a245e0ae560dd52503aae" + sha256 cellar: :any, arm64_sonoma: "951d02bef2eeb1252344215eb818f95c269506f4f678b3755df4a0c483277f8e" + sha256 cellar: :any, arm64_ventura: "871a8ea613320d94c57aae21e6fb9e3d42016d8ab88a6fd30b1f4e915591badf" + sha256 cellar: :any, arm64_monterey: "31c85fafb9fd2051db06856042a3f216f9fd24fbfd8acf95f5a51bf695989a02" + sha256 cellar: :any, arm64_big_sur: "21e94d2f987e060920488bdaf121792282548dcf196eed01e4fd5221db414685" + sha256 cellar: :any, sonoma: "5b5739e2d4628da75276dc69041c088fd960f1aae9d6f827c8fb92bddabd2e59" + sha256 cellar: :any, ventura: "0cc5748776f48d4460f726fd20d0015761c3640e8ab644a024dd967edf9d67bd" + sha256 cellar: :any, monterey: "d84ba4d373165ff3999b3c20e49ebdc69f8374a7c04a6fa48fc68d337a2e5924" + sha256 cellar: :any, big_sur: "42695d06f657acabd7c229206d3623ca3830667c4ab1308d5371cbca7beb48bd" + sha256 cellar: :any, catalina: "f438c5d73e9dd9c3c36283aa9f8253168de30f52242955a803714350cc247c80" + sha256 cellar: :any_skip_relocation, arm64_linux: "1af6b55b0fed98058a42791addbbd0793767c0e7a8de383abdb0476b57bdc1f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18ba477730fc049d9a7b16d94247a14e3ad6fbace2f40f8aa5d180822d12e173" + end + + depends_on "pkgconf" => :build + depends_on "libpng" + + uses_from_macos "zlib" + + def install + # Starting from libpng 1.5, the zlib.h header file + # is no longer included internally by libpng. + # See: https://sourceforge.net/p/pngnq/bugs/13/ + # See: https://sourceforge.net/p/pngnq/bugs/14/ + # + # strncmp(3) is declared in . + # See: https://sourceforge.net/p/pngnq/patches/6/ + inreplace "src/rwpng.c", + "#include \n", + "#include \n#include \n#include \n" + + # The Makefile passes libpng link flags too early in the + # command invocation, resulting in undefined references to + # libpng symbols due to incorrect link order. + # See: https://sourceforge.net/p/pngnq/bugs/17/ + inreplace "src/Makefile.in", + "AM_LDFLAGS = `libpng-config --ldflags` -lz\n", + "LDADD = `libpng-config --ldflags` -lz\n" + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + cp test_fixtures("test.png"), "test.png" + system bin/"pngnq", "-v", "test.png" + assert_path_exists testpath/"test-nq8.png" + end +end diff --git a/Formula/p/pngpaste.rb b/Formula/p/pngpaste.rb new file mode 100644 index 0000000000000..be722f46cded2 --- /dev/null +++ b/Formula/p/pngpaste.rb @@ -0,0 +1,37 @@ +class Pngpaste < Formula + desc "Paste PNG into files" + homepage "https://github.com/jcsalterego/pngpaste" + url "https://github.com/jcsalterego/pngpaste/archive/refs/tags/0.2.3.tar.gz" + sha256 "6221201cb05191855f0d2707ce7f4055f6e1330de8efc09d386be2a6629f543b" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54f10ac12b67938941a167fd959d4bda563c37a23b4cf1407513e855f75fba78" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c50c153907877dd733f9e98807bf00246a12cb2f8add332a9e3842fe6057cf9e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15c6b1b199b6fb33956d42c3bc0cbe2f6d19ed8a578ecf49e44234fec474534c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a78c376be51591db8cee5254f92b275a0d7c5516b96818400b60786a6b1a7b6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1199369118afc2095238084d9b632fc8d277b17d4a73d2edf40582e4d329614f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d28443efa53d8c51e0ba85a6985506cc21aad15a346df76ff04c2eea0acd33ff" + sha256 cellar: :any_skip_relocation, sonoma: "c7dca23ac978315853e90df0fd9da592b219837a0493858a33db081246d98ead" + sha256 cellar: :any_skip_relocation, ventura: "b41718216a8c084f6c8aa9324e17083daa05dd4a1099e71f0e317cbfca2f92d6" + sha256 cellar: :any_skip_relocation, monterey: "e9a350b69811aa02e6b01d906cc184f35a8806e322bf62430b81bff8a6d27fd2" + sha256 cellar: :any_skip_relocation, big_sur: "20d394d6036f0ffe382b36151c15d3ea9b20ce9d1e5fe6166ce11546c5e871f4" + sha256 cellar: :any_skip_relocation, catalina: "692e8f099ee7426310daa078d6bf2103b763b4549804f1775a5238acb1ead616" + end + + depends_on :macos + + def install + system "make", "all" + bin.install "pngpaste" + end + + test do + png = test_fixtures("test.png") + system "osascript", "-e", "set the clipboard to POSIX file (\"#{png}\")" + system bin/"pngpaste", "test.png" + assert_path_exists testpath/"test.png" + end +end diff --git a/Formula/p/pngquant.rb b/Formula/p/pngquant.rb new file mode 100644 index 0000000000000..e44273700a2c0 --- /dev/null +++ b/Formula/p/pngquant.rb @@ -0,0 +1,44 @@ +class Pngquant < Formula + desc "PNG image optimizing utility" + homepage "https://pngquant.org/" + url "https://static.crates.io/crates/pngquant/pngquant-3.0.3.crate" + sha256 "68a12bdd8825f9989f4ee9a6ab0b42727dae57728b939ef63453366697a07232" + license all_of: ["GPL-3.0-or-later", "HPND", "BSD-2-Clause"] + head "https://github.com/kornelski/pngquant.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7bb45863272a81baeda8398132e02862643af78f1bc992eedc4c382efa1b8ecf" + sha256 cellar: :any, arm64_sequoia: "3ebc758f4e803c26bf87d7a0cb1d34b7e3048958e360eae18de7579f02eb081e" + sha256 cellar: :any, arm64_sonoma: "7304b28d6ac4803b515bc6d5f7a56115f993d0af414cc20173ac5e766e6b8dd6" + sha256 cellar: :any, arm64_ventura: "8fe4369e28cadb40f580f8788202124e9c8cecc8adf160422d941df8132b7105" + sha256 cellar: :any, arm64_monterey: "c142cd5a58cbcc5dc2a642bd87ab7696dcd371c4c87db5138b8a54735adb37d6" + sha256 cellar: :any, sonoma: "6810c2738ecc54130198b31380b8fdd8629aab89a497e7bc456ac72417d90936" + sha256 cellar: :any, ventura: "e9a2a6f6276529634cf601eb2c15b257db31d0d7b5fab624ef6f4001af4faac9" + sha256 cellar: :any, monterey: "190bce955acdfcf9999a2dec7902d3bc1864b29eb2a2e636b3820fedd9ad81be" + sha256 cellar: :any_skip_relocation, arm64_linux: "14ee8acb1241bb83143c700d424872923c8c5b158a1c4f797db43472c658263b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "088abd195e0063a9ff6f8b3e041f50c9cc08807c475ac573349cf47607519e51" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libpng" + depends_on "little-cms2" + + # remove when upstream merge and release https://github.com/kornelski/pngquant/pull/418 + resource "manpage" do + url "https://raw.githubusercontent.com/kornelski/pngquant/53a332a58f44357b6b41842a54d74aa1e245913d/pngquant.1" + sha256 "831f485ccb3664436e72c4c8142f15cc35b93854e18c5f01f0d2f3dbc918d374" + end + + def install + system "cargo", "install", *std_cargo_args + + man1.install resource("manpage") + end + + test do + system bin/"pngquant", test_fixtures("test.png"), "-o", "out.png" + assert_path_exists testpath/"out.png" + end +end diff --git a/Formula/p/pnpm.rb b/Formula/p/pnpm.rb new file mode 100644 index 0000000000000..317a430f0c311 --- /dev/null +++ b/Formula/p/pnpm.rb @@ -0,0 +1,51 @@ +class Pnpm < Formula + desc "Fast, disk space efficient package manager" + homepage "https://pnpm.io/" + url "https://registry.npmjs.org/pnpm/-/pnpm-10.20.0.tgz" + sha256 "47a3352808501b8d1ef20112273b6a5dcfa53d28a55bcce36d268e878bd6bfe9" + license "MIT" + + livecheck do + url "https://registry.npmjs.org/pnpm/latest-10" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5557eb8401211ee92409ab3c379019a593320125f14fd804fd8cc34e00e3d125" + sha256 cellar: :any, arm64_sequoia: "af02a4669bb501714e445faa4ddc0e1931875b09077a518c7d2b48d3889b8010" + sha256 cellar: :any, arm64_sonoma: "af02a4669bb501714e445faa4ddc0e1931875b09077a518c7d2b48d3889b8010" + sha256 cellar: :any, sonoma: "36c2fcc22e457a393a72331c3766134267292f3981daa2d9b5d68d7d01ef4d91" + sha256 cellar: :any_skip_relocation, arm64_linux: "39f45c8ecc52bfddb3aa20edcc9406cf455b6fa8155cdd227a14c24b2a93b019" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39f45c8ecc52bfddb3aa20edcc9406cf455b6fa8155cdd227a14c24b2a93b019" + end + + depends_on "node" => [:build, :test] + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + generate_completions_from_executable(bin/"pnpm", "completion") + + # remove non-native architecture pre-built binaries + (libexec/"lib/node_modules/pnpm/dist").glob("reflink.*.node").each do |f| + next if f.arch == Hardware::CPU.arch + + rm f + end + end + + def caveats + <<~EOS + pnpm requires a Node installation to function. You can install one with: + brew install node + EOS + end + + test do + system bin/"pnpm", "init" + assert_path_exists testpath/"package.json", "package.json must exist" + end +end diff --git a/Formula/p/pnpm@8.rb b/Formula/p/pnpm@8.rb new file mode 100644 index 0000000000000..e14bbe6da83c1 --- /dev/null +++ b/Formula/p/pnpm@8.rb @@ -0,0 +1,54 @@ +class PnpmAT8 < Formula + desc "Fast, disk space efficient package manager" + homepage "https://pnpm.io/" + url "https://registry.npmjs.org/pnpm/-/pnpm-8.15.9.tgz" + sha256 "daa27a0b541bc635323ff96c2ded995467ff9fe6d69ff67021558aa9ad9dcc36" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "d27023c0a4cd4905688132e77e2729c06816516b1e35d9c73fcc4f70aedb05bf" + sha256 cellar: :any, arm64_sonoma: "d27023c0a4cd4905688132e77e2729c06816516b1e35d9c73fcc4f70aedb05bf" + sha256 cellar: :any, arm64_ventura: "d27023c0a4cd4905688132e77e2729c06816516b1e35d9c73fcc4f70aedb05bf" + sha256 cellar: :any, arm64_monterey: "d27023c0a4cd4905688132e77e2729c06816516b1e35d9c73fcc4f70aedb05bf" + sha256 cellar: :any, sonoma: "b0146e361c9446d60b53583e83ca15eb49843b7d7056db3eced35b1c7066fc8c" + sha256 cellar: :any, ventura: "b0146e361c9446d60b53583e83ca15eb49843b7d7056db3eced35b1c7066fc8c" + sha256 cellar: :any, monterey: "b0146e361c9446d60b53583e83ca15eb49843b7d7056db3eced35b1c7066fc8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0ebd800d22d8e8c65092bfe4778a268493f5f0c4eca6df5fe9d7bcb63876245" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7814ebe5944979026566edb11fa7466d282b4e7ec4fcfa6778c1a9cefdf02948" + end + + keg_only :versioned_formula + + disable! date: "2025-04-30", because: :unmaintained + + depends_on "node" => [:build, :test] + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + bin.install_symlink bin/"pnpm" => "pnpm@8" + bin.install_symlink bin/"pnpx" => "pnpx@8" + + generate_completions_from_executable(bin/"pnpm", "completion") + + # remove non-native architecture pre-built binaries + (libexec/"lib/node_modules/pnpm/dist").glob("reflink.*.node").each do |f| + next if f.arch == Hardware::CPU.arch + + rm f + end + end + + def caveats + <<~EOS + pnpm@8 requires a Node installation to function. You can install one with: + brew install node + EOS + end + + test do + system bin/"pnpm", "init" + assert_path_exists testpath/"package.json", "package.json must exist" + end +end diff --git a/Formula/p/pnpm@9.rb b/Formula/p/pnpm@9.rb new file mode 100644 index 0000000000000..b8681b84ad75b --- /dev/null +++ b/Formula/p/pnpm@9.rb @@ -0,0 +1,57 @@ +class PnpmAT9 < Formula + desc "Fast, disk space efficient package manager" + homepage "https://pnpm.io/" + url "https://registry.npmjs.org/pnpm/-/pnpm-9.15.9.tgz" + sha256 "cf86a7ad764406395d4286a6d09d730711720acc6d93e9dce9ac7ac4dc4a28a7" + license "MIT" + + livecheck do + url "https://registry.npmjs.org/pnpm/latest-9" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "065dfbb68112b1fa1f55b86a0e575944b20811fe2e50a9dc87761c88067d232d" + sha256 cellar: :any, arm64_sequoia: "ae74b37d814b99dd613cb07f94b593dab2bb1dca09ff9ade108ff180aba53db5" + sha256 cellar: :any, arm64_sonoma: "ae74b37d814b99dd613cb07f94b593dab2bb1dca09ff9ade108ff180aba53db5" + sha256 cellar: :any, arm64_ventura: "ae74b37d814b99dd613cb07f94b593dab2bb1dca09ff9ade108ff180aba53db5" + sha256 cellar: :any, sonoma: "4ecc62fb50f7704d9afa60dc3e161ec772c59f85d0df91808813f26bd7fe3ace" + sha256 cellar: :any, ventura: "4ecc62fb50f7704d9afa60dc3e161ec772c59f85d0df91808813f26bd7fe3ace" + sha256 cellar: :any_skip_relocation, arm64_linux: "b604d8e5694ed2c72031680e1ad2a3b56a88dc9a808c6714f47969ecd7ccd02d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b604d8e5694ed2c72031680e1ad2a3b56a88dc9a808c6714f47969ecd7ccd02d" + end + + keg_only :versioned_formula + + depends_on "node" => [:build, :test] + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + bin.install_symlink bin/"pnpm" => "pnpm@9" + bin.install_symlink bin/"pnpx" => "pnpx@9" + + generate_completions_from_executable(bin/"pnpm", "completion") + + # remove non-native architecture pre-built binaries + (libexec/"lib/node_modules/pnpm/dist").glob("reflink.*.node").each do |f| + next if f.arch == Hardware::CPU.arch + + rm f + end + end + + def caveats + <<~EOS + pnpm requires a Node installation to function. You can install one with: + brew install node + EOS + end + + test do + system bin/"pnpm", "init" + assert_path_exists testpath/"package.json", "package.json must exist" + end +end diff --git a/Formula/p/po4a.rb b/Formula/p/po4a.rb new file mode 100644 index 0000000000000..4be0d4cb24ade --- /dev/null +++ b/Formula/p/po4a.rb @@ -0,0 +1,151 @@ +require "language/perl" + +class Po4a < Formula + include Language::Perl::Shebang + + desc "Documentation translation maintenance tool" + homepage "https://po4a.org" + url "https://github.com/mquinson/po4a/archive/refs/tags/v0.74.tar.gz" + sha256 "6e390eb7707501a86f2e648d78fddb0d211d1e8699aa1ee201176e9f966a798b" + license "GPL-2.0-or-later" + head "https://github.com/mquinson/po4a.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7624436108971c111880fd35bc7766707a6bd3e0065371004417b1b2cd3de75f" + sha256 cellar: :any, arm64_sequoia: "bdccf6b6345463afc6e11516c74d5c585ac9fe6f98011cfcd4e8c2ce930eb44e" + sha256 cellar: :any, arm64_sonoma: "3c49b77a9b3e77a508fc1d6bad432d289ed433d7926209f3325488a21b4aa054" + sha256 cellar: :any, arm64_ventura: "067ad1ef4e3830635e59a12e6884632f11a9140c9af5538381ede46815c33ae5" + sha256 cellar: :any, sonoma: "650b1513dcb4670a7a55a8b686cd2d8e09d23eb7f0ae1ed71d1f34c56272cfc9" + sha256 cellar: :any, ventura: "22a57781a1083f9e41507a45b80de0b63ce207e8a6ce52a0c166084d87922c93" + sha256 cellar: :any_skip_relocation, arm64_linux: "873a75f430ad21edd023fbb9dc858fc75df48092bc77e19ece740ce766006f8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56d33a2d3cfe1d88e5af7367056285675c41681ccb10cc9bf696200b9ade107a" + end + + depends_on "docbook-xsl" => :build + depends_on "gettext" + depends_on "perl" + + uses_from_macos "libxslt" + + resource "Locale::gettext" do + url "https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/Locale-gettext-1.07.tar.gz" + sha256 "909d47954697e7c04218f972915b787bd1244d75e3bd01620bc167d5bbc49c15" + end + + resource "Module::Build" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + end + + resource "Pod::Parser" do + url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.67.tar.gz" + sha256 "5deccbf55d750ce65588cd211c1a03fa1ef3aaa15d1ac2b8d85383a42c1427ea" + end + + resource "SGMLS" do + url "https://cpan.metacpan.org/authors/id/R/RA/RAAB/SGMLSpm-1.1.tar.gz" + sha256 "550c9245291c8df2242f7e88f7921a0f636c7eec92c644418e7d89cfea70b2bd" + end + + resource "Term::ReadKey" do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" + sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" + end + + resource "Text::WrapI18N" do + url "https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/Text-WrapI18N-0.06.tar.gz" + sha256 "4bd29a17f0c2c792d12c1005b3c276f2ab0fae39c00859ae1741d7941846a488" + end + + resource "Unicode::GCString" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Unicode-LineBreak-2019.001.tar.gz" + sha256 "486762e4cacddcc77b13989f979a029f84630b8175e7fef17989e157d4b6318a" + end + + resource "YAML::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.76.tar.gz" + sha256 "a8d584394cf069bf8f17cba3dd5099003b097fce316c31fb094f1b1c171c08a3" + end + + resource "ExtUtils::CChecker" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/ExtUtils-CChecker-0.12.tar.gz" + sha256 "8b87d145337dec1ee754d30871d0b105c180ad4c92c7dc0c7fadd76cec8c57d3" + end + + resource "Class::Inspector" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Class-Inspector-1.32.tar.gz" + sha256 "cefadc8b5338e43e570bc43f583e7c98d535c17b196bcf9084bb41d561cc0535" + end + + resource "File::ShareDir" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-1.118.tar.gz" + sha256 "3bb2a20ba35df958dc0a4f2306fc05d903d8b8c4de3c8beefce17739d281c958" + end + + resource "XS::Parse::Keyword::Builder" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/XS-Parse-Keyword-0.48.tar.gz" + sha256 "857a070ba465ab5b89d4d8d36d92358edd66e5e7b4a91584611d85125ac9a9c7" + end + + resource "Syntax::Keyword::Try" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Syntax-Keyword-Try-0.30.tar.gz" + sha256 "f068f0b9c71fff8fef6d8a9e9ed6951cb7a52b976322bd955181cc5e7b17e692" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + + resources.each do |r| + r.stage do + if File.exist?("Makefile.PL") + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "NO_MYMETA=1" + system "make", "install" + else + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + end + + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + + shell_scripts = %w[po4a-display-man po4a-display-pod] + + %w[msguntypot po4a po4a-display-man po4a-display-pod + po4a-gettextize po4a-translate po4a-normalize po4a-updatepo].each do |cmd| + rewrite_shebang detected_perl_shebang, libexec/"bin"/cmd unless shell_scripts.include? cmd + + (bin/cmd).write_env_script(libexec/"bin"/cmd, PERL5LIB: ENV["PERL5LIB"]) + end + + man1.install Dir[libexec/"man/man1/{msguntypot.1p.gz,po4a*}"] + man3.install Dir[libexec/"man/man3/Locale::Po4a::*"] + man7.install Dir[libexec/"man/man7/*"] + end + + test do + # LaTeX + + (testpath/"en.tex").write <<~'TEX' + \documentclass[a4paper]{article} + \begin{document} + Hello from Homebrew! + \end{document} + TEX + + system bin/"po4a-updatepo", "-f", "latex", "-m", "en.tex", "-p", "latex.pot" + assert_match "Hello from Homebrew!", (testpath/"latex.pot").read + + # Markdown + + (testpath/"en.md").write("Hello from Homebrew!") + system bin/"po4a-updatepo", "-f", "text", "-m", "en.md", "-p", "text.pot" + assert_match "Hello from Homebrew!", (testpath/"text.pot").read + end +end diff --git a/Formula/p/pocketbase.rb b/Formula/p/pocketbase.rb new file mode 100644 index 0000000000000..d6ea95ec98b36 --- /dev/null +++ b/Formula/p/pocketbase.rb @@ -0,0 +1,46 @@ +class Pocketbase < Formula + desc "Open source backend for your next project in 1 file" + homepage "https://pocketbase.io/" + url "https://github.com/pocketbase/pocketbase/archive/refs/tags/v0.31.0.tar.gz" + sha256 "c028e3e08f9ef6ee4d5603972e0cfb8bc37a7b909b9b24f89c4eb94b8a968fca" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "473c410598b43621a42b426f531d8b80feb395f74570262886fca54eb6504723" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "473c410598b43621a42b426f531d8b80feb395f74570262886fca54eb6504723" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "473c410598b43621a42b426f531d8b80feb395f74570262886fca54eb6504723" + sha256 cellar: :any_skip_relocation, sonoma: "1f86fd9e2f4642ed5b6bc6276d6f92f6b851cc86c911c9982d849cc48095c201" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e01258be99890e324f0effc2398f3cd968c471c899fab2933e5dcbe2612d3e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67d6429950a8a8bfde5677ce069c8d6310f81ede7465e7d22efb91d8208b8df1" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/pocketbase/pocketbase.Version=#{version}"), "./examples/base" + end + + test do + assert_match "pocketbase version #{version}", shell_output("#{bin}/pocketbase --version") + + port = free_port + PTY.spawn("#{bin}/pocketbase serve --dir #{testpath}/pb_data --http 127.0.0.1:#{port}") do |_, _, pid| + sleep 5 + + assert_match "API is healthy", shell_output("curl -s http://localhost:#{port}/api/health") + + assert_path_exists testpath/"pb_data", "pb_data directory should exist" + assert_predicate testpath/"pb_data", :directory?, "pb_data should be a directory" + + assert_path_exists testpath/"pb_data/data.db", "pb_data/data.db should exist" + assert_predicate testpath/"pb_data/data.db", :file?, "pb_data/data.db should be a file" + + assert_path_exists testpath/"pb_data/auxiliary.db", "pb_data/auxiliary.db should exist" + assert_predicate testpath/"pb_data/auxiliary.db", :file?, "pb_data/auxiliary.db should be a file" + ensure + Process.kill "TERM", pid + end + end +end diff --git a/Formula/p/pocl.rb b/Formula/p/pocl.rb new file mode 100644 index 0000000000000..0684eb0340145 --- /dev/null +++ b/Formula/p/pocl.rb @@ -0,0 +1,79 @@ +class Pocl < Formula + desc "Portable Computing Language" + homepage "https://portablecl.org/" + url "https://github.com/pocl/pocl/archive/refs/tags/v7.1.tar.gz" + sha256 "1110057cb0736c74819ad65238655a03f7b93403a0ca60cdd8849082f515ca25" + license "MIT" + head "https://github.com/pocl/pocl.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "cc45a16ddaf37efac69ad995690efe2979143b304c20c30179581b04161cf6b4" + sha256 arm64_sequoia: "03a539344b6f557b050cbda86913e9936cf7dfa3d157ee90e438b40eab16610d" + sha256 arm64_sonoma: "c1492bebca73399ccdbe9db343f5c9999f58ec2dab464cf9249b4b8f07b287d6" + sha256 sonoma: "ac55a8d49c48770e574446ff3ab95e023370059c0e954fe674103a7751fa9b27" + sha256 arm64_linux: "4c88564ba6f258b924e62ea47306847a1a2ed9356f6723de2273d4235dc959a2" + sha256 x86_64_linux: "b3fb64a5cd37f39d1e70240495f41a1d3e3b267911e50ed4a912b1da4edf162d" + end + + depends_on "cmake" => :build + depends_on "opencl-headers" => :build + depends_on "pkgconf" => :build + depends_on "hwloc" + depends_on "llvm" + depends_on "opencl-icd-loader" + uses_from_macos "python" => :build + + def llvm + deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+)?$/) } + end + + def install + # Install the ICD into #{prefix}/etc rather than #{etc} as it contains the realpath + # to the shared library and needs to be kept up-to-date to work with an ICD loader. + # This relies on `brew link` automatically creating and updating #{etc} symlinks. + rpaths = [loader_path, rpath(source: lib/"pocl")] + rpaths << llvm.opt_lib.to_s if OS.linux? + args = %W[ + -DPOCL_INSTALL_ICD_VENDORDIR=#{prefix}/etc/OpenCL/vendors + -DCMAKE_INSTALL_RPATH=#{rpaths.join(";")} + -DENABLE_EXAMPLES=OFF + -DENABLE_TESTS=OFF + -DINSTALL_OPENCL_HEADERS=OFF + -DWITH_LLVM_CONFIG=#{llvm.opt_bin}/llvm-config + -DLLVM_PREFIX=#{llvm.opt_prefix} + -DLLVM_BINDIR=#{llvm.opt_bin} + -DLLVM_LIBDIR=#{llvm.opt_lib} + -DLLVM_INCLUDEDIR=#{llvm.opt_include} + ] + if build.bottle? + args << if Hardware::CPU.intel? + # Only x86_64 supports "distro" which allows runtime detection of SSE/AVX + "-DKERNELLIB_HOST_CPU_VARIANTS=distro" + elsif OS.mac? + "-DLLC_HOST_CPU=apple-m1" + else + "-DLLC_HOST_CPU=generic" + end + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (pkgshare/"examples").install "examples/poclcc" + end + + test do + ENV["OCL_ICD_VENDORS"] = "#{opt_prefix}/etc/OpenCL/vendors" # Ignore any other ICD that may be installed + cp pkgshare/"examples/poclcc/poclcc.cl", testpath + system bin/"poclcc", "-o", "poclcc.cl.pocl", "poclcc.cl" + assert_path_exists testpath/"poclcc.cl.pocl" + # Make sure that CMake found our OpenCL headers and didn't install a copy + refute_path_exists include/"OpenCL" + end +end diff --git a/Formula/p/poco.rb b/Formula/p/poco.rb new file mode 100644 index 0000000000000..0b5d3e5c9549d --- /dev/null +++ b/Formula/p/poco.rb @@ -0,0 +1,50 @@ +class Poco < Formula + desc "C++ class libraries for building network and internet-based applications" + homepage "https://pocoproject.org/" + url "https://pocoproject.org/releases/poco-1.14.1/poco-1.14.1-all.tar.gz" + sha256 "c4b547070eec8330302ffbfee1d6ba02da2e0e120626f6c5dd52192e5b641f34" + license "BSL-1.0" + head "https://github.com/pocoproject/poco.git", branch: "master" + + livecheck do + url "https://pocoproject.org/releases/" + regex(%r{href=.*?poco[._-]v?(\d+(?:\.\d+)+\w*)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b77df128ce99c553bf3312fb351cc44e06df60133f684dd445913b7faf3e4741" + sha256 cellar: :any, arm64_sequoia: "efd50007f2f6f18fc7d94f03e20796008daefe8a062ebac08bc3731de6a170a7" + sha256 cellar: :any, arm64_sonoma: "f16b1697467095c8f3e11397022619892223504aeae27d7d33a9c11d655080ee" + sha256 cellar: :any, arm64_ventura: "72df7a28c1e8bb067246452e788a8f1e05de8e748956591b91914227d0217fdb" + sha256 cellar: :any, sonoma: "814fd9e9e80d345389f66784f78537fce57f887b8710c88320ab70ec9b36e7ce" + sha256 cellar: :any, ventura: "1e6d1e5b6b0f37747880611b53bfee90133dd8efb6830ac894c141c34dd9c330" + sha256 arm64_linux: "95eb6763038beb833471ceb4c86ac9259d509b78d164ea16704c7009d17a3f72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9d80b80347cabba99b05c81ea5cb87c2ade6e93bb6dc445bab172cd48cfc29d" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "pcre2" + depends_on "utf8proc" + + uses_from_macos "expat" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + def install + args = %W[ + -DENABLE_DATA_MYSQL=OFF + -DENABLE_DATA_ODBC=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + -DPOCO_UNBUNDLED=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"cpspc", "-h" + end +end diff --git a/Formula/p/pocsuite3.rb b/Formula/p/pocsuite3.rb new file mode 100644 index 0000000000000..8f130368e0737 --- /dev/null +++ b/Formula/p/pocsuite3.rb @@ -0,0 +1,162 @@ +class Pocsuite3 < Formula + include Language::Python::Virtualenv + + desc "Open-sourced remote vulnerability testing framework" + homepage "https://pocsuite.org/" + url "https://files.pythonhosted.org/packages/12/33/a9f77b222075f034c04c615de19c9ef0f93457d9b627e95cc40d07949e70/pocsuite3-2.1.0.tar.gz" + sha256 "4107396b5fbbeeb65b27b574c6fb5a40831d1983ad4fd2f9a83c87006bed98e6" + license "GPL-2.0-only" + revision 2 + head "https://github.com/knownsec/pocsuite3.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3820c4606bf2391ddbc2443aeaece0eb4ebdc955b365ce1b6cb0eaa16d2995d3" + sha256 cellar: :any, arm64_sequoia: "8eefd6ea533f2dac62d1c5c2110315c394e9df5cad497a477181eeac308715bc" + sha256 cellar: :any, arm64_sonoma: "945f59e5feee3b7fc8aed95829823ad4c9ff0257115f75bbf2b6ed7eff164691" + sha256 cellar: :any, sonoma: "bc83c8f39b3487f28deeaab0ea034c8b9271211fee6d79c7fb0adae4b0f53510" + sha256 cellar: :any_skip_relocation, arm64_linux: "d542f8d47225c6d97d08ad71720542ba320c8789cf587df52b988cd757b6490e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b1ef91ce3014750a36196c2fc64d7a00f100b996bd464057ae0522aabfc5bca" + end + + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages package_name: "pocsuite3[complete]", + exclude_packages: %w[certifi cryptography] + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz" + sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2" + end + + resource "dacite" do + url "https://files.pythonhosted.org/packages/55/a0/7ca79796e799a3e782045d29bf052b5cde7439a2bbb17f15ff44f7aacc63/dacite-1.9.2.tar.gz" + sha256 "6ccc3b299727c7aa17582f0021f6ae14d5de47c7227932c47fec4cdfefd26f09" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "faker" do + url "https://files.pythonhosted.org/packages/c9/4b/ca43f6bbcef63deb8ac01201af306388670a172587169aab3b192f7490f0/faker-37.11.0.tar.gz" + sha256 "22969803849ba0618be8eee2dd01d0d9e2cd3b75e6ff1a291fa9abcdb34da5e6" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jq" do + url "https://files.pythonhosted.org/packages/5c/86/6935afb6c1789d4c6ba5343607e2d2f473069eaac29fac555dbbd154c2d7/jq-1.10.0.tar.gz" + sha256 "fc38803075dbf1867e1b4ed268fef501feecb0c50f3555985a500faedfa70f08" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "mmh3" do + url "https://files.pythonhosted.org/packages/a7/af/f28c2c2f51f31abb4725f9a64bc7863d5f491f6539bd26aee2a1d21a649e/mmh3-5.2.0.tar.gz" + sha256 "1efc8fec8478e9243a78bb993422cf79f8ff85cb4cf6b79647480a31e0d950a8" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "scapy" do + url "https://files.pythonhosted.org/packages/df/2f/035d3888f26d999e9680af8c7ddb7ce4ea0fd8d0e01c000de634c22dcf13/scapy-2.6.1.tar.gz" + sha256 "7600d7e2383c853e5c3a6e05d37e17643beebf2b3e10d7914dffcc3bc3c6e6c5" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" + sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Module (pocs_ecshop_rce) options:", shell_output("#{bin}/pocsuite -k ecshop --options") + end +end diff --git a/Formula/p/pod2man.rb b/Formula/p/pod2man.rb new file mode 100644 index 0000000000000..208a39b58101f --- /dev/null +++ b/Formula/p/pod2man.rb @@ -0,0 +1,54 @@ +class Pod2man < Formula + desc "Perl documentation generator" + homepage "https://www.eyrie.org/~eagle/software/podlators/" + url "https://archives.eyrie.org/software/perl/podlators-v6.0.2.tar.xz" + sha256 "22f5941c848756c05396356437dc799b32703f4fc282f0f281b9c83696500183" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + + livecheck do + url "https://archives.eyrie.org/software/perl/" + regex(/href=.*?podlators[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "29bf28b46917bfa959a3e04e2285491b9da82a78540341141c45cef662db5897" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0937a01be86e0dd18adaca7675da973dfbfa8c9d5dbca3e0a2eacad020aa8ef7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b40bf5470087e943cc5a965f9788962d4dd44c831d08e95105a50bc5c325123c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c0a9a958c8614e6452f8e1d893f0a277011ca50b8160929b307139c911511b14" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c0a9a958c8614e6452f8e1d893f0a277011ca50b8160929b307139c911511b14" + sha256 cellar: :any_skip_relocation, sonoma: "c18bed6c302dfaa0c4373d546f99d0b1dbee75bc618fa2f914b54379e9a57bbd" + sha256 cellar: :any_skip_relocation, ventura: "c8b7d64bb1ed99ec0d43c980a0b559e40a0c23dec4651fd2098b8728f33e3c71" + sha256 cellar: :any_skip_relocation, monterey: "c8b7d64bb1ed99ec0d43c980a0b559e40a0c23dec4651fd2098b8728f33e3c71" + sha256 cellar: :any_skip_relocation, arm64_linux: "36c74b6c69d5f917a362b69be53f2e269951278607071c65f700c39462ee422b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "269cdc0db938df147bab44127e86b05cf46074741bd9d8644b08f88a00e62f97" + end + + keg_only "it conflicts with the pod2man that ships with Perl" + + resource "Pod::Simple" do + url "https://cpan.metacpan.org/authors/id/K/KH/KHW/Pod-Simple-3.45.tar.gz" + sha256 "8483bb95cd3e4307d66def092a3779f843af772482bfdc024e3e00d0c4db0cfa" + end + + def install + resource("Pod::Simple").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + ENV.prepend_path "PERL5LIB", libexec/"lib/perl5" + + system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}", + "INSTALLSITEMAN1DIR=#{man1}", "INSTALLSITEMAN3DIR=#{man3}" + system "make" + system "make", "install" + bin.env_script_all_files libexec/"bin", PERL5LIB: "#{lib}/perl5:#{libexec}/lib/perl5" + end + + test do + (testpath/"test.pod").write "=head2 Test heading\n" + manpage = shell_output("#{bin}/pod2man #{testpath}/test.pod") + assert_match '.SS "Test heading"', manpage + assert_match "Pod::Man v#{version}", manpage + end +end diff --git a/Formula/p/podcast-archiver.rb b/Formula/p/podcast-archiver.rb new file mode 100644 index 0000000000000..5585a61bec943 --- /dev/null +++ b/Formula/p/podcast-archiver.rb @@ -0,0 +1,150 @@ +class PodcastArchiver < Formula + include Language::Python::Virtualenv + + desc "Archive all episodes from your favorite podcasts" + homepage "https://codeberg.org/janw/podcast-archiver" + url "https://files.pythonhosted.org/packages/96/05/8f08025cbfb32ad8a0589d90e69c9da04d4ecf201b48815569a114ffed2e/podcast_archiver-2.3.5.tar.gz" + sha256 "1c157df1202d1ce05e2303d7d729e4e1e87ba202cba6f51c6024b38a2236b937" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "50145c2ca3dc8c26e6edd170d9b12bca045699d307b3ea0de5a29310409cd9dc" + sha256 cellar: :any, arm64_sequoia: "fdbc8a8b4d11480e9c5e31c58663f2f9333835f7dc1c47bbef71e29ee909029f" + sha256 cellar: :any, arm64_sonoma: "93bec0f4917c4355bb5e14393cee8d786a2f8d9b24542737c6273c27e942aa5b" + sha256 cellar: :any, sonoma: "84f770398a986409d08014b23173f32be1fa4463a896b21ed10ac89a276ed410" + sha256 cellar: :any_skip_relocation, arm64_linux: "6bc8bf94b19ec9c0a74de24ae0d049b9b193722deda0af00f1a92a7bc321cdc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1703539685bd628621226495fa098b0738c732b29bca91354b16397a0bfed89" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "feedparser" do + url "https://files.pythonhosted.org/packages/dc/79/db7edb5e77d6dfbc54d7d9df72828be4318275b2e580549ff45a962f6461/feedparser-6.0.12.tar.gz" + sha256 "64f76ce90ae3e8ef5d1ede0f8d3b50ce26bcce71dd8ae5e82b1cd2d4a5f94228" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-slugify" do + url "https://files.pythonhosted.org/packages/87/c7/5e1547c44e31da50a460df93af11a535ace568ef89d7a811069ead340c4a/python-slugify-8.0.4.tar.gz" + sha256 "59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-click" do + url "https://files.pythonhosted.org/packages/bf/d8/f2c1b7e9a645ba40f756d7a5b195fc104729bc6b19061ba3ab385f342931/rich_click-1.9.4.tar.gz" + sha256 "af73dc68e85f3bebb80ce302a642b9fe3b65f3df0ceb42eb9a27c467c1b678c8" + end + + resource "sgmllib3k" do + url "https://files.pythonhosted.org/packages/9e/bd/3704a8c3e0942d711c1299ebf7b9091930adae6675d7c8f476a7ce48653c/sgmllib3k-1.0.0.tar.gz" + sha256 "7868fb1c8bfa764c1ac563d3cf369c381d1325d36124933a726f29fcdaa812e9" + end + + resource "text-unidecode" do + url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" + sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"podcast-archiver", shell_parameter_format: :click) + end + + test do + config_file = testpath/"config.yaml" + config_file.write <<~YAML + feeds: [https://codeberg.org/janw/podcast-archiver/raw/branch/main/tests/fixtures/feed_lautsprecher_empty.xml] + YAML + + assert_match( + "Processing: Der Lautsprecher", + shell_output("#{bin}/podcast-archiver --config '#{config_file}' --ignore-database 2>&1"), + ) + + assert_match version.to_s, shell_output("#{bin}/podcast-archiver --version") + end +end diff --git a/Formula/p/podiff.rb b/Formula/p/podiff.rb new file mode 100644 index 0000000000000..a555c0adc0b17 --- /dev/null +++ b/Formula/p/podiff.rb @@ -0,0 +1,56 @@ +class Podiff < Formula + desc "Compare textual information in two PO files" + homepage "https://puszcza.gnu.org.ua/software/podiff/" + url "https://download.gnu.org.ua/pub/release/podiff/podiff-1.4.tar.gz" + sha256 "231531f3b0b17615a1f0ca9d712a3c196686df9f1a641688c74a2574af78b22a" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.gnu.org.ua/pub/release/podiff/" + regex(/href=.*?podiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "625ab776965963465a17dd8c25d5457d8e032218e5a2e329d0ae5d07e46d6350" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f182567ba8a6a7b58d52d49833b794b0347a7e35d32dc0fb786ded005b36f407" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4410226ffe7c84b1612f2546a2975a4bf6467b7c84dff6aeb19b86b306f2679b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "657c4211b999a913ed69c42f55bb522c35d27988a8ea6ab72eb165780a2238b4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9a2621d0ce49422987139fd852a650667b5a2985c8c216c318af66c144d6d8b2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9e7f705d124f8b240f16ab6edacd30c094275e5ebcb5814ba5e9bdf9ae7bfeba" + sha256 cellar: :any_skip_relocation, sonoma: "3979eade3df6735431d2246aa409e3d475f3b8beda8aaaa60b1643f2f32051b2" + sha256 cellar: :any_skip_relocation, ventura: "96d7320bfcaf7ca38f215341e709c4236b75a29f467381a77352e343399cbfd0" + sha256 cellar: :any_skip_relocation, monterey: "0c49d38d09ff613608a0aa1347e9fdd08d4a59056b74843e4a81cbd2d6f3e84d" + sha256 cellar: :any_skip_relocation, big_sur: "102324c4a33351f8ade8b7ca889945300a5dc36a7b1fb93460b0d26124bda63f" + sha256 cellar: :any_skip_relocation, catalina: "72109e409ad2097e8e6137b7cf7cc2464df145ff2e2c8db65504f0185f9c4ac0" + sha256 cellar: :any_skip_relocation, arm64_linux: "26f2355ea5742f14c20c4ae5b57aa6a50dac0ed10364cf3ce8f2fd7075ed6388" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b64d367ffe00d91903f42a1b643e1b467b219f773f8d34b722d1c88ddfcc30c" + end + + def install + system "make" + bin.install "podiff" + man1.install "podiff.1" + end + + def caveats + <<~EOS + To use with git, add this to your .git/config or global git config file: + + [diff "podiff"] + command = #{HOMEBREW_PREFIX}/bin/podiff -D-u + + Then add the following line to the .gitattributes file in + the directory with your PO files: + + *.po diff=podiff + + See `man podiff` for more information. + EOS + end + + test do + system bin/"podiff", "-v" + end +end diff --git a/Formula/p/podlet.rb b/Formula/p/podlet.rb new file mode 100644 index 0000000000000..ad19623f489d5 --- /dev/null +++ b/Formula/p/podlet.rb @@ -0,0 +1,37 @@ +class Podlet < Formula + desc "Generate podman quadlet files from a podman command or compose file" + homepage "https://github.com/containers/podlet" + url "https://github.com/containers/podlet/archive/refs/tags/v0.3.0.tar.gz" + sha256 "b91398ef75566a2a646e9845d1211854e7275fce727d4b976e7d8a3c4430ae52" + license "MPL-2.0" + head "https://github.com/containers/podlet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "37776de2f4d6b1a4089c86731e451ebc520751a7d794e757fb7020647c75de75" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f333911ead765bc92f880d126fe26ff1c18b91b441d596e1f19c4eca8db6c4bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8fc99a00efbb003102cb5857b8117438341e451e2cc3dfc3b896cae6923f4f33" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e5797f123e7bbdca07b927e311c0eb0e2cb22dace9a7ce61cd644103a9c9c12" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fc64dddd79d76d64b4a3a2fcda7e0f22b9644e05f8a90486ed9b53911994ac55" + sha256 cellar: :any_skip_relocation, sonoma: "7d4e1f96832eb6a64c3fb5a368aba8c11cbc863b0e273cd6bd12d0e3380f8389" + sha256 cellar: :any_skip_relocation, ventura: "fad99f8be93c835b25dab8cb0a206434bb07b94a5ef1fccb79123d2f9575506f" + sha256 cellar: :any_skip_relocation, monterey: "9ae49fd7b7dea4e064f75138fb5e816d1678897c36f869a4f31153999d63e968" + sha256 cellar: :any_skip_relocation, arm64_linux: "9968475ef2db45ac48ebe49bb425fe20b47f28895353b4de2f97634192355d73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd73b27b073b7fc17d8e204cb4b62813e6bdfff78f9e6108dfec4a533232042f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + expected_output = <<~EOS + # hello.container + [Container] + Image=quay.io/podman/hello + EOS + + assert_equal expected_output, shell_output("#{bin}/podlet podman run quay.io/podman/hello") + end +end diff --git a/Formula/p/podman-compose.rb b/Formula/p/podman-compose.rb new file mode 100644 index 0000000000000..aee14d26186cc --- /dev/null +++ b/Formula/p/podman-compose.rb @@ -0,0 +1,61 @@ +class PodmanCompose < Formula + include Language::Python::Virtualenv + + desc "Alternative to docker-compose using podman" + homepage "https://github.com/containers/podman-compose" + url "https://files.pythonhosted.org/packages/24/91/b168a685ca6813ff9b467d76a7365a099aec16a1032b6edf39b0cd19f6c3/podman_compose-1.5.0.tar.gz" + sha256 "5cc09362852711ce5d27648e41cb5fd058ea5a75acbcdec2f8d0b0c114a18e8e" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "6d9765042f7c657a9988eba299ea87413ebc88b51dd301bf0824eb2f42cb5fbf" + sha256 cellar: :any, arm64_sequoia: "64ec31c99c8f3eef79b7bff65d15f3aa9fee7c3d2cf10db798934655650b2eb7" + sha256 cellar: :any, arm64_sonoma: "b090788eeecfb9762576fc0579cca1e237dbe78fe81d1bf83ec5027ce654550c" + sha256 cellar: :any, sonoma: "0c3fef86a51ea1e01f3b292042a21721adbb26b2d3220be6a4cf3d4a64ee1b9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fca19cda30ccd74d9837a3fadcc36b637d85a38fa42ba765f39ebaaabda87f79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2225e553f4109c8f560ede2cb744456f8c53e625ad1f168cc66f9d4cad789835" + end + + depends_on "libyaml" + depends_on "podman" + depends_on "python@3.14" + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz" + sha256 "a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["COMPOSE_PROJECT_NAME"] = "brewtest" + + port = free_port + + (testpath/"compose.yml").write <<~YAML + version: "3" + services: + test: + image: nginx:1.22 + ports: + - #{port}:80 + environment: + - NGINX_PORT=80 + YAML + + assert_match "podman ps --filter label=io.podman.compose.project=brewtest", + shell_output("#{bin}/podman-compose up -d 2>&1", 1) + # If it's trying to connect to Podman, we know it at least found the + # compose.yml file and parsed/validated the contents + expected = OS.linux? ? "Error: cannot re-exec process" : "Cannot connect to Podman" + assert_match expected, shell_output("#{bin}/podman-compose down 2>&1", 1) + end +end diff --git a/Formula/p/podman-tui.rb b/Formula/p/podman-tui.rb new file mode 100644 index 0000000000000..9407eaadfb1dc --- /dev/null +++ b/Formula/p/podman-tui.rb @@ -0,0 +1,46 @@ +class PodmanTui < Formula + desc "Podman Terminal User Interface" + homepage "https://github.com/containers/podman-tui" + url "https://github.com/containers/podman-tui/archive/refs/tags/v1.9.0.tar.gz" + sha256 "7a0e89d71a18527f01be061c8d449823770cff768b6d716cef96b979f3672de7" + license "Apache-2.0" + head "https://github.com/containers/podman-tui.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "159fe3cbe81cb90352a7cdd6e9fecda9ffbe0d4ed70b8238d23b28a3a577cad3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae8d3b12b6d240b955412b516b7481d078f0df567ee1bf2505b6f5d7fa0fee2f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ce978d60030735023a0ea7b7c60654264d8a78766ec62f04cebb5fce418be85" + sha256 cellar: :any_skip_relocation, sonoma: "0c3901ccd6a710f3a1ba420543192de39ef4ed1682e3259a6612b4cdc382f031" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb3be056e3171386c8d9c3819f52b91e44c318d2af71e9689dd744a16f1fd134" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04453e9ee308df6601ac642852498519989e8213cac4dcf1699fd9495d2e7c3f" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + tags = "exclude_graphdriver_btrfs containers_image_openpgp remote" + system "go", "build", *std_go_args(ldflags: "-s -w", tags:) + end + + test do + require "pty" + ENV["TERM"] = "xterm" + + PTY.spawn(bin/"podman-tui") do |r, w, _pid| + sleep 4 + w.write "\cC" + begin + output = r.read + assert_match "Connection:", output + assert_match "SYSTEM CONNECTIONS[1]", output + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + assert_match "podman-tui v#{version}", shell_output("#{bin}/podman-tui version") + end +end diff --git a/Formula/p/podman.rb b/Formula/p/podman.rb new file mode 100644 index 0000000000000..21447bbe8056c --- /dev/null +++ b/Formula/p/podman.rb @@ -0,0 +1,227 @@ +class Podman < Formula + desc "Tool for managing OCI containers and pods" + homepage "https://podman.io/" + url "https://github.com/containers/podman/archive/refs/tags/v5.6.2.tar.gz" + sha256 "c6de8f347ee93e4626d7c82e3adcb1b34e64175b5ca9959e790e52a0b4bbf2a1" + license all_of: ["Apache-2.0", "GPL-3.0-or-later"] + head "https://github.com/containers/podman.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created and upstream uses GitHub releases to + # indicate when a version is released, so we check the "latest" release + # instead of the Git tags. Maintainers confirmed: + # https://github.com/Homebrew/homebrew-core/pull/205162#issuecomment-2607793814 + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e50e94b47564eadea1382de73d4b43d36da1bb42fad982f40f6c9afc5dc3e782" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d5b75fcf79c6d2c93b9f85985e9f144df9ddd1b9aed25b89e7763a795f610d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99d2985932f85ddbbe2a419444253b8276935413f2597e80b00b83c586692c18" + sha256 cellar: :any_skip_relocation, sonoma: "5c9493137126c703225e143e170096cf086af779bf2187a8500b52bc15fbe35b" + sha256 arm64_linux: "1ca052627f383875445a6a669a8af543d468e29794f606f191c1ec0197f0e241" + sha256 x86_64_linux: "b88544bd104340950e24a9e2026e1bfe7add887ca734b968c3f6f8a222bc0573" + end + + depends_on "go" => :build + depends_on "go-md2man" => :build + depends_on macos: :ventura # see discussions in https://github.com/containers/podman/issues/22121 + uses_from_macos "python" => :build + + on_macos do + depends_on "make" => :build + end + + on_linux do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + depends_on "conmon" + depends_on "crun" + depends_on "fuse-overlayfs" + depends_on "gpgme" + depends_on "libseccomp" + depends_on "passt" + depends_on "slirp4netns" + depends_on "sqlite" + depends_on "systemd" + end + + # Bump these resources versions to match those in the corresponding version-tagged Makefile + # at https://github.com/containers/podman/blob/#{version}/contrib/pkginstaller/Makefile + # + # More context: https://github.com/Homebrew/homebrew-core/pull/205303 + resource "gvproxy" do + on_macos do + url "https://github.com/containers/gvisor-tap-vsock/archive/refs/tags/v0.8.7.tar.gz" + sha256 "ef9765d24bc3339014dd4a8f2e2224f039823278c249fb9bd1416ba8bbab590b" + end + end + + resource "vfkit" do + on_macos do + url "https://github.com/crc-org/vfkit/archive/refs/tags/v0.6.1.tar.gz" + sha256 "e35b44338e43d465f76dddbd3def25cbb31e56d822db365df9a79b13fc22698c" + end + end + + resource "catatonit" do + on_linux do + url "https://github.com/openSUSE/catatonit/archive/refs/tags/v0.2.1.tar.gz" + sha256 "771385049516fdd561fbb9164eddf376075c4c7de3900a8b18654660172748f1" + end + end + + resource "netavark" do + on_linux do + url "https://github.com/containers/netavark/archive/refs/tags/v1.16.1.tar.gz" + sha256 "e655fcd882fe891bcc8328ddcfff3745831c8b1013ae59f012d37ce87175b0b3" + end + end + + resource "aardvark-dns" do + on_linux do + url "https://github.com/containers/aardvark-dns/archive/refs/tags/v1.16.0.tar.gz" + sha256 "6c84a3371087d6af95407b0d3de26cdc1e720ae8cd983a9bdaec8883e2216959" + end + end + + def install + if OS.mac? + ENV["CGO_ENABLED"] = "1" + ENV["BUILD_ORIGIN"] = "brew" + + system "gmake", "podman-remote" + bin.install "bin/darwin/podman" => "podman-remote" + bin.install_symlink bin/"podman-remote" => "podman" + + system "gmake", "podman-mac-helper" + bin.install "bin/darwin/podman-mac-helper" => "podman-mac-helper" + + resource("gvproxy").stage do + system "gmake", "gvproxy" + (libexec/"podman").install "bin/gvproxy" + end + + resource("vfkit").stage do + ENV["CGO_ENABLED"] = "1" + ENV["CGO_CFLAGS"] = "-mmacosx-version-min=11.0" + ENV["GOOS"]="darwin" + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + system "gmake", "out/vfkit-#{arch}" + (libexec/"podman").install "out/vfkit-#{arch}" => "vfkit" + end + + system "gmake", "podman-remote-darwin-docs" + man1.install Dir["docs/build/remote/darwin/*.1"] + + bash_completion.install "completions/bash/podman" + zsh_completion.install "completions/zsh/_podman" + fish_completion.install "completions/fish/podman.fish" + else + paths = Dir["**/*.go"].select do |file| + (buildpath/file).read.lines.grep(%r{/etc/containers/}).any? + end + inreplace paths, "/etc/containers/", etc/"containers/" + + ENV.O0 + ENV["PREFIX"] = prefix + ENV["HELPER_BINARIES_DIR"] = opt_libexec/"podman" + ENV["BUILD_ORIGIN"] = "brew" + + # Workaround to avoid patchelf corruption when cgo is required + if Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie -trimpath" + end + + system "make" + system "make", "install", "install.completions" + + (prefix/"etc/containers/policy.json").write <<~JSON + {"default":[{"type":"insecureAcceptAnything"}]} + JSON + + (prefix/"etc/containers/storage.conf").write <<~EOS + [storage] + driver="overlay" + EOS + + (prefix/"etc/containers/registries.conf").write <<~EOS + unqualified-search-registries=["docker.io"] + EOS + + resource("catatonit").stage do + system "./autogen.sh" + system "./configure" + system "make" + mv "catatonit", libexec/"podman/" + end + + resource("netavark").stage do + system "make" + mv "bin/netavark", libexec/"podman/" + end + + resource("aardvark-dns").stage do + system "make" + mv "bin/aardvark-dns", libexec/"podman/" + end + end + end + + def caveats + on_linux do + <<~EOS + You need "newuidmap" and "newgidmap" binaries installed system-wide + for rootless containers to work properly. + EOS + end + on_macos do + <<~EOS + In order to run containers locally, podman depends on a Linux kernel. + One can be started manually using `podman machine` from this package. + To start a podman VM automatically at login, also install the cask + "podman-desktop". + EOS + end + end + + service do + run linux: [opt_bin/"podman", "system", "service", "--time", "0"] + environment_variables PATH: std_service_path_env + working_dir HOMEBREW_PREFIX + end + + test do + assert_match "podman-remote version #{version}", shell_output("#{bin}/podman-remote -v") + out = shell_output("#{bin}/podman-remote info 2>&1", 125) + assert_match "Cannot connect to Podman", out + + if OS.mac? + # This test will fail if VM images are not built yet. Re-run after VM images are built if this is the case + # See https://github.com/Homebrew/homebrew-core/pull/166471 + out = shell_output("#{bin}/podman-remote machine init homebrew-testvm") + assert_match "Machine init complete", out + system bin/"podman-remote", "machine", "rm", "-f", "homebrew-testvm" + else + assert_equal %w[podman podman-remote podmansh] + .map { |binary| File.join(bin, binary) }.sort, Dir[bin/"*"] + assert_equal %W[ + #{libexec}/podman/catatonit + #{libexec}/podman/netavark + #{libexec}/podman/aardvark-dns + #{libexec}/podman/quadlet + #{libexec}/podman/rootlessport + ].sort, Dir[libexec/"podman/*"] + out = shell_output("file #{libexec}/podman/catatonit") + assert_match "statically linked", out + end + end +end diff --git a/Formula/p/podofo.rb b/Formula/p/podofo.rb new file mode 100644 index 0000000000000..0dba2471dc5b0 --- /dev/null +++ b/Formula/p/podofo.rb @@ -0,0 +1,70 @@ +class Podofo < Formula + desc "Library to work with the PDF file format" + homepage "https://github.com/podofo/podofo" + url "https://github.com/podofo/podofo/archive/refs/tags/1.0.2.tar.gz" + sha256 "4f46edac16e0b3badba2e972b3e3b7d8381845fad3eb39a02562cb7a04207d45" + license all_of: ["LGPL-2.0-only", "GPL-2.0-only"] + head "https://github.com/podofo/podofo.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "087debfaf5086a933deda3bd9178e3d5b7f094ad5e03bb2a4dccdcef42194273" + sha256 cellar: :any, arm64_sequoia: "7355a7ea6cef2c5e2a9594fb743d9ac9f2be8fd88521e259467197ba1aeccfab" + sha256 cellar: :any, arm64_sonoma: "c8724b528af9b6c9002f30793a6fe1a0d1e95b72ed4757a1d0ddf24709a85f37" + sha256 cellar: :any, arm64_ventura: "e94c577a3ee275ebc4c9b917441af055b91bae18aa9469916fc44ddd9fb7cc90" + sha256 cellar: :any, sonoma: "a4cb1de96cf8c928fe96293e051c41a81c6dd1de35ac0bd0f93abc806c3afe15" + sha256 cellar: :any, ventura: "d2ca3b3ed1d023f777971e46b535956bdc55172973cf296f241c057a95e068fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "de028ffaf3cde82277c24a1d67897753bff5ea8659876db678a305231406d2d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be719e3165a2147327f15f9e338fcf218589c60c594df3455927be5e31868b73" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_ventura :or_older do + depends_on "llvm" + + fails_with :clang do + cause "error: 'to_chars' is unavailable: introduced in macOS 13.3" + end + end + + def install + if OS.mac? && MacOS.version <= :ventura + ENV.llvm_clang + # When using Homebrew's superenv shims, we need to use HOMEBREW_LIBRARY_PATHS + # rather than LDFLAGS for libc++ in order to correctly link to LLVM's libc++. + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + # Workaround for error: call to 'from_chars' is ambiguous + inreplace "src/podofo/private/charconv_compat.h", "#define WANT_FROM_CHARS", "" + end + + args = %W[ + -DCMAKE_INSTALL_NAME_DIR=#{opt_lib} + -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON + -DPODOFO_BUILD_UNSUPPORTED_TOOLS=TRUE + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + cp test_fixtures("test.pdf"), testpath + assert_match "500 x 800 pts", shell_output("#{bin}/podofopdfinfo test.pdf") + end +end diff --git a/Formula/p/podsync.rb b/Formula/p/podsync.rb new file mode 100644 index 0000000000000..a496ddb71ecda --- /dev/null +++ b/Formula/p/podsync.rb @@ -0,0 +1,58 @@ +class Podsync < Formula + desc "Turn YouTube or Vimeo channels, users, or playlists into podcast feeds" + homepage "https://github.com/mxpv/podsync" + url "https://github.com/mxpv/podsync/archive/refs/tags/v2.8.0.tar.gz" + sha256 "ec23c744294884c8621faeec78b411f3434f75470986837a6b371ed05373204c" + license "MIT" + head "https://github.com/mxpv/podsync.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "22537f59a33bac8bed4440849e3997a185fdcaf768e3866d16fecca40e83eb3c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b72aff6c92db971877d7d991633587ab3618b554ae58909aa8b9cc2e4abe66cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3bc61487934281dcc05b9750a9c3ec8ac562e432acaceb1ab650f42ecd8c9971" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ddfc6f47832c2496d85747da38144fb3ad2257920cdfe506984d9719b222c23" + sha256 cellar: :any_skip_relocation, sonoma: "076d6a5b15d3928fb68f0f63ccdf406c139e55ca2ba0f2dcb6641d9c04e1e2fd" + sha256 cellar: :any_skip_relocation, ventura: "ce6b3c9f883b9d1274abd99d4f4cfb3f1187c14c425b2760067f87d5f92a4180" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f94e0aeb79fdcfc692ccb4348fcbef0e589940db56313a41cb57a8fb2e4bc46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e85c76e45e098adc8b4310dfe93b9c3fc48cff6b54223743acd28beb8ac2651c" + end + + depends_on "go" => :build + depends_on "ffmpeg" + depends_on "yt-dlp" + + def install + system "make", "build" + bin.install "bin/podsync" + end + + test do + port = free_port + + (testpath/"config.toml").write <<~TOML + [server] + port = #{port} + + [log] + filename = "podsync.log" + + [storage] + [storage.local] + data_dir = "data/podsync/" + + [feeds] + [feeds.ID1] + url = "https://www.youtube.com/channel/UCxC5Ls6DwqV0e-CYcAKkExQ" + TOML + + pid = fork do + exec bin/"podsync" + end + sleep 3 + + Process.kill("SIGINT", pid) + Process.wait(pid) + + assert_path_exists testpath/"podsync.log" + end +end diff --git a/Formula/p/poetry.rb b/Formula/p/poetry.rb new file mode 100644 index 0000000000000..2d7c76c086e78 --- /dev/null +++ b/Formula/p/poetry.rb @@ -0,0 +1,278 @@ +class Poetry < Formula + include Language::Python::Virtualenv + + desc "Python package management tool" + homepage "https://python-poetry.org/" + url "https://files.pythonhosted.org/packages/19/28/f790e21769afaaa1f326d9634f9a5c700c4cdb4c468a1707c6db0b350505/poetry-2.2.1.tar.gz" + sha256 "bef9aa4bb00ce4c10b28b25e7bac724094802d6958190762c45df6c12749b37c" + license "MIT" + head "https://github.com/python-poetry/poetry.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3634e2e46795a773ef17e811c89a03bf2730aee8135c6d01d9a1a85b7a71a2ba" + sha256 cellar: :any, arm64_sequoia: "73154a8324caaa733cbcf4fa4b967c33ab2c7c9fd4d2346af71d11374c02f8ee" + sha256 cellar: :any, arm64_sonoma: "ab15d46a72f4fbd2ff9917e491acd33bb223a2a4081e36b20265f1af1db19815" + sha256 cellar: :any, sonoma: "84680fdd2134cef84d1172855cebce9d7abf5c6dd51eb618a817f2146fe595f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c20b4bfe11be553beecc812b5e033992b39dd54620fc1ef2511bcdb8ee5f759" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4bf4acdf938b4f10d98b311c76478446989061c5bc8ca543ddb7c19d7c21ce8" + end + + depends_on "cmake" => :build # for rapidfuzz + depends_on "ninja" => :build # for rapidfuzz + depends_on "python-setuptools" => :build # for zstandard to bypass build isolation + depends_on "certifi" + depends_on "cffi" + depends_on "python@3.14" + depends_on "zstd" + + uses_from_macos "libffi" + + on_linux do + depends_on "cryptography" + end + + pypi_packages exclude_packages: %w[certifi cryptography], + extra_packages: %w[cffi jeepney secretstorage xattr] + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "build" do + url "https://files.pythonhosted.org/packages/25/1c/23e33405a7c9eac261dff640926b8b5adaed6a6eb3e1767d441ed611d0c0/build-1.3.0.tar.gz" + sha256 "698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397" + end + + resource "cachecontrol" do + url "https://files.pythonhosted.org/packages/58/3a/0cbeb04ea57d2493f3ec5a069a117ab467f85e4a10017c6d854ddcbff104/cachecontrol-0.14.3.tar.gz" + sha256 "73e7efec4b06b20d9267b441c1f733664f989fb8688391b670ca812d70795d11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "cleo" do + url "https://files.pythonhosted.org/packages/3c/30/f7960ed7041b158301c46774f87620352d50a9028d111b4211187af13783/cleo-2.1.0.tar.gz" + sha256 "0b2c880b5d13660a7ea651001fb4acb527696c01f15c9ee650f377aa543fd523" + end + + resource "crashtest" do + url "https://files.pythonhosted.org/packages/6e/5d/d79f51058e75948d6c9e7a3d679080a47be61c84d3cc8f71ee31255eb22b/crashtest-0.4.1.tar.gz" + sha256 "80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "dulwich" do + url "https://files.pythonhosted.org/packages/82/d0/b1275f9609e0d32800daf72786e5bec5602e71dde8db4995d0420d6b5cec/dulwich-0.24.2.tar.gz" + sha256 "d474844cf81bf95a6537a80aeec59d714d5d77d8e83d6d37991e2bde54746ca7" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/20/b5/23b216d9d985a956623b6bd12d4086b60f0059b27799f23016af04a74ea1/fastjsonschema-2.21.2.tar.gz" + sha256 "b1eb43748041c880796cd077f1a07c3d94e93ae84bba5ed36800a33554ae05de" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "findpython" do + url "https://files.pythonhosted.org/packages/1a/17/5a72566eecc9cbc1609459befe9f7dc65e101b66519a79999cc48044993c/findpython-0.7.0.tar.gz" + sha256 "8b31647c76352779a3c1a0806699b68e6a7bdc0b5c2ddd9af2a07a0d40c673dc" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "installer" do + url "https://files.pythonhosted.org/packages/05/18/ceeb4e3ab3aa54495775775b38ae42b10a92f42ce42dfa44da684289b8c8/installer-0.7.0.tar.gz" + sha256 "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pbs-installer" do + url "https://files.pythonhosted.org/packages/9a/b5/4922c6818d15c22430d2e79c4ebce8b482007aed1baf419626e3e405c5ae/pbs_installer-2025.10.10.tar.gz" + sha256 "568999771793eb337c107b089272c2269a011b1770f0f16c7afb3dbbb4a72ae9" + end + + resource "pkginfo" do + url "https://files.pythonhosted.org/packages/24/03/e26bf3d6453b7fda5bd2b84029a426553bb373d6277ef6b5ac8863421f87/pkginfo-1.12.1.2.tar.gz" + sha256 "5cd957824ac36f140260964eba3c6be6442a8359b8c48f4adf90210f33a04b7b" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "poetry-core" do + url "https://files.pythonhosted.org/packages/54/ef/a16c11de95b638341961765e072dfdd4c9a0be51d6b22d594c5f3255e4bb/poetry_core-2.2.1.tar.gz" + sha256 "97e50d8593c8729d3f49364b428583e044087ee3def1e010c6496db76bd65ac5" + end + + resource "pyproject-hooks" do + url "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz" + sha256 "1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8" + end + + resource "rapidfuzz" do + url "https://files.pythonhosted.org/packages/ed/fc/a98b616db9a42dcdda7c78c76bdfdf6fe290ac4c5ffbb186f73ec981ad5b/rapidfuzz-3.14.1.tar.gz" + sha256 "b02850e7f7152bd1edff27e9d584505b84968cacedee7a734ec4050c655a803c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "trove-classifiers" do + url "https://files.pythonhosted.org/packages/ca/9a/778622bc06632529817c3c524c82749a112603ae2bbcf72ee3eb33a2c4f1/trove_classifiers-2025.9.11.17.tar.gz" + sha256 "931ca9841a5e9c9408bc2ae67b50d28acf85bef56219b56860876dd1f2d024dd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + resource "xattr" do + url "https://files.pythonhosted.org/packages/50/65/14438ae55acf7f8fc396ee8340d740a3e1d6ef382bf25bf24156cfb83563/xattr-1.2.0.tar.gz" + sha256 "a64c8e21eff1be143accf80fd3b8fde3e28a478c37da298742af647ac3e5e0a7" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz" + sha256 "7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + venv = virtualenv_install_with_resources without: "zstandard" + resource("zstandard").stage do + system_zstd = "--config-settings=--build-option=--system-zstd" + system venv.root/"bin/python", "-m", "pip", "install", system_zstd, *std_pip_args(prefix: false), "." + end + + generate_completions_from_executable(bin/"poetry", "completions") + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + + # The poetry add command would fail in CI when keyring is enabled + # https://github.com/Homebrew/homebrew-core/pull/109777#issuecomment-1248353918 + ENV["PYTHON_KEYRING_BACKEND"] = "keyring.backends.null.Keyring" + + assert_match version.to_s, shell_output("#{bin}/poetry --version") + assert_match "Created package", shell_output("#{bin}/poetry new homebrew") + + cd testpath/"homebrew" do + system bin/"poetry", "config", "virtualenvs.in-project", "true" + system bin/"poetry", "add", "requests" + system bin/"poetry", "add", "boto3" + end + + assert_path_exists testpath/"homebrew/pyproject.toml" + assert_path_exists testpath/"homebrew/poetry.lock" + assert_match "requests", (testpath/"homebrew/pyproject.toml").read + assert_match "boto3", (testpath/"homebrew/pyproject.toml").read + end +end diff --git a/Formula/p/poke.rb b/Formula/p/poke.rb new file mode 100644 index 0000000000000..a1358251fc21a --- /dev/null +++ b/Formula/p/poke.rb @@ -0,0 +1,49 @@ +class Poke < Formula + desc "Extensible editor for structured binary data" + homepage "https://jemarch.net/poke" + url "https://ftpmirror.gnu.org/gnu/poke/poke-4.3.tar.gz" + sha256 "a84cb9175d50d45a411f2481fd0662b83cb32ce517316b889cfb570819579373" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "821eefd5e063b58af3ef23658e016cbed9d7869c9dce45f832d8da03b4db559a" + sha256 arm64_sequoia: "70cac0d1d59525b97a594c9a16eab3797419b766608dd48fb0490941e0e96ea8" + sha256 arm64_sonoma: "96c98aed96e957144166238b78d28199876e6a4e1c45e1bbc3ab94d84826db13" + sha256 arm64_ventura: "07539d167175536ece64fdef868664dec7dd8631ddc0ee3b2a66a1d08c76c00d" + sha256 sonoma: "109401dd79744517c3d41bb73108fc778e3dd8dbc8b31032cfc70dbc06b5c12d" + sha256 ventura: "4262e197f77325c4871dd782ee3a8952f996f24af723d1fc4504055aa19784f8" + sha256 arm64_linux: "e9f8c5b017fbc20596b897784e4bbea573085a3bb243d39d5a901ada5f63189c" + sha256 x86_64_linux: "016bf647c3fad54272c7efde148cb755cd9015e3b3c7d394937f36a201667773" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "help2man" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "bdw-gc" + depends_on "gettext" + depends_on "readline" + + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-silent-rules", "--with-lispdir=#{elisp}", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.pk").write <<~EOS + .file #{bin}/poke + dump :size 4#B :ruler 0 :ascii 0 + .exit + EOS + if OS.mac? + assert_match "00000000: cffa edfe", shell_output("#{bin}/poke --quiet -s test.pk") + else + assert_match "00000000: 7f45 4c46", shell_output("#{bin}/poke --quiet -s test.pk") + end + end +end diff --git a/Formula/p/pokerstove.rb b/Formula/p/pokerstove.rb new file mode 100644 index 0000000000000..0ba477f25aed3 --- /dev/null +++ b/Formula/p/pokerstove.rb @@ -0,0 +1,41 @@ +class Pokerstove < Formula + desc "Poker evaluation and enumeration software" + homepage "https://github.com/andrewprock/pokerstove" + url "https://github.com/andrewprock/pokerstove/archive/refs/tags/v1.1.tar.gz" + sha256 "ee263f579846b95df51cf3a4b6beeb2ea5ea0450ce7f1c8d87ed6dd77b377220" + license "BSD-3-Clause" + revision 6 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9813ded756c83d5f0ec4e42648a3de6ac4f572f8593a17c6e64943e20f4e27da" + sha256 cellar: :any, arm64_sequoia: "f7130808f62e33bc114d8485bdd8448020f06a6c00449f6ef73cfcc6ce6eb6ee" + sha256 cellar: :any, arm64_sonoma: "85e003ac98afcd71cd83cfb7c406eed5bfb8e27a7fe0e9a38587dbe70a3f2337" + sha256 cellar: :any, arm64_ventura: "c34a21407e69e70f400fb9c2fd7c1834606498ff027dad0a86e8a198c123e48f" + sha256 cellar: :any, sonoma: "443d4d27cd085b1230a21f809107ddea5ce8675dea0807988bbc5c1c527042de" + sha256 cellar: :any, ventura: "3e49b9e0aae12e1f39606dced90b7ca9ab29c40fbf9225e83918c03ecbbb99fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "1cfdc4881d8bd0797ea748e6cc1e02b9cc38d81449d415bfbb5f07d0c863f741" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ba1969e30c9063708d69009cab0d8e1bf22a443cb6b320fd51e13e0511af29d" + end + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "boost" + + # Backport commit to build with CMake 4 + patch do + url "https://github.com/andrewprock/pokerstove/commit/8ca71960b3ee68bf7cbc419d5aee2065276054bb.patch?full_index=1" + sha256 "379461a6e3258ebf9803ff4a52020d027a745e1676d7aee865f5dd035c51c6e9" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_CXX_STANDARD=14", *std_cmake_args + system "cmake", "--build", "build" + prefix.install "build/bin" + end + + test do + system bin/"peval_tests" + end +end diff --git a/Formula/p/polaris.rb b/Formula/p/polaris.rb new file mode 100644 index 0000000000000..929c3da65e7ec --- /dev/null +++ b/Formula/p/polaris.rb @@ -0,0 +1,53 @@ +class Polaris < Formula + desc "Validation of best practices in your Kubernetes clusters" + homepage "https://www.fairwinds.com/polaris" + url "https://github.com/FairwindsOps/polaris/archive/refs/tags/10.1.2.tar.gz" + sha256 "16897c2e419b3ad28a0330113b4a1ed3ad2ced376e0b2e7c7bb92ccb88bfdea5" + license "Apache-2.0" + head "https://github.com/FairwindsOps/polaris.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b85278302fa410b54bb57509ba76719fca66958f51dbe16ca1dbb55a978a8181" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "81e0533e29be4fec5f3dcf1de025720ba040e0f17e88d5e3596a36caed07e8c7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a46d318db8249de42f9682b85641c7cc7414949ddb0db891a759a3a02a6a09f4" + sha256 cellar: :any_skip_relocation, sonoma: "ae661c67473ed220721522e013b56aa730275a94e9bb3812745f09bcdc4c871b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e4f3c9de2305212091f8182f55dcbf42f3abf40b87dd643d88c6878d3c6b93e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ef47cf49db79185e1b88b6dbcf21f2a0de30c94550d06ad52e090dfec851eea" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version} -X main.Commit=#{tap.user}") + + generate_completions_from_executable(bin/"polaris", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/polaris version") + + (testpath/"deployment.yaml").write <<~YAML + apiVersion: apps/v1 + kind: Deployment + metadata: + name: nginx + spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.14.2 + resources: {} + YAML + + output = shell_output("#{bin}/polaris audit --format=json #{testpath}/deployment.yaml 2>&1", 1) + assert_match "try setting KUBERNETES_MASTER environment variable", output + end +end diff --git a/Formula/p/policy-engine.rb b/Formula/p/policy-engine.rb new file mode 100644 index 0000000000000..b608e61d99879 --- /dev/null +++ b/Formula/p/policy-engine.rb @@ -0,0 +1,47 @@ +class PolicyEngine < Formula + desc "Unified Policy Engine" + homepage "https://github.com/snyk/policy-engine" + url "https://github.com/snyk/policy-engine/archive/refs/tags/v1.1.0.tar.gz" + sha256 "1bcff9b335404a5c505887208ea1a1d4d9fed73af757889ba3594525bfded643" + license "Apache-2.0" + head "https://github.com/snyk/policy-engine.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1a7b6e5da094097583ac46a181aab8f200f60f302d1f8d976910cfa3b9aa0b3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "140f936020aef4bec9555f01b75d4efc2bbe7e4cf24aceda756ec9ba466328a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "140f936020aef4bec9555f01b75d4efc2bbe7e4cf24aceda756ec9ba466328a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "140f936020aef4bec9555f01b75d4efc2bbe7e4cf24aceda756ec9ba466328a3" + sha256 cellar: :any_skip_relocation, sonoma: "828e03e6ac7d701c9a294bb80c58842888b6dc281e883bed99973c0c8d0d1a7f" + sha256 cellar: :any_skip_relocation, ventura: "828e03e6ac7d701c9a294bb80c58842888b6dc281e883bed99973c0c8d0d1a7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c57f3894e5318ef5241a4e7785ffffb40c3add087859c20485c686b02f5b760" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d6c08b38966d9334e76d04d8a023781430c3fbac95b06ee55abae297eb3f081" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/snyk/policy-engine/pkg/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"policy-engine", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/policy-engine version") + + (testpath/"infra/test.tf").write <<~HCL + resource "aws_s3_bucket" "foo-bucket" { + region = "us-east-1" + bucket = "test" + acl = "public-read" + force_destroy = true + + versioning { + enabled = true + } + } + HCL + + assert_match "\"rule_results\": []", shell_output("#{bin}/policy-engine run infra") + end +end diff --git a/Formula/p/policy_sentry.rb b/Formula/p/policy_sentry.rb new file mode 100644 index 0000000000000..784680c23be13 --- /dev/null +++ b/Formula/p/policy_sentry.rb @@ -0,0 +1,97 @@ +class PolicySentry < Formula + include Language::Python::Virtualenv + + desc "Generate locked-down AWS IAM Policies" + homepage "https://policy-sentry.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/2c/62/5ef0720302fff4a3b194c99ee7c6570a7b8086589588f2d5aab352deee35/policy_sentry-0.14.1.tar.gz" + sha256 "dda37098a5e8038c5d8a0e6b4e644736cd3cfec167b53007604dd92f8a20ea97" + license "MIT" + head "https://github.com/salesforce/policy_sentry.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "074c4f24407743d54fe65753e32551173039fe70238ef9e292f820051f9911a0" + sha256 cellar: :any, arm64_sequoia: "b7bb0431dcc36eabe84332acf12e394fa800c83fdf1e715db1bf7a4d47576e09" + sha256 cellar: :any, arm64_sonoma: "3ea133ab0ab3b812fa6ab471717a6a1d17bce667ccff44dd77f3f7416cc259e8" + sha256 cellar: :any, sonoma: "bd2b002cb6d4ff8331a42ac75149b4bfe350982ca6ab7c93d50b5f09a6baeb9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf0144de03e26e755cc384c6d2e4c2f46879aaa8c015d8db37293c02edd56845" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c123cbc2db34118ccbcb47142f16fbccfe30d57bfb6d802a163bb513c1f4839" + end + + depends_on "rust" => :build # for orjson + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/be/4d/8df5f83256a809c22c4d6792ce8d43bb503be0fb7a8e4da9025754b09658/orjson-3.11.3.tar.gz" + sha256 "1c0603b1d2ffcd43a411d64797a19556ef76958aef1c182f22dc30860152a98a" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/fb/2e/8da627b65577a8f130fe9dfa88ce94fcb24b1f8b59e0fc763ee61abef8b8/schema-0.7.8.tar.gz" + sha256 "e86cc08edd6fe6e2522648f4e47e3a31920a76e82cce8937535422e310862ab5" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"policy_sentry", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/policy_sentry --version") + + test_file = testpath/"policy_sentry.yml" + output = shell_output("#{bin}/policy_sentry create-template -o #{test_file} -t actions") + assert_match "write-policy template file written to: #{test_file}", output + assert_match "mode: actions", test_file.read + end +end diff --git a/Formula/p/polkit.rb b/Formula/p/polkit.rb new file mode 100644 index 0000000000000..a2fc6e4f09440 --- /dev/null +++ b/Formula/p/polkit.rb @@ -0,0 +1,77 @@ +class Polkit < Formula + desc "Toolkit for defining and handling authorizations" + homepage "https://github.com/polkit-org/polkit" + url "https://github.com/polkit-org/polkit/archive/refs/tags/126.tar.gz" + sha256 "2814a7281989f6baa9e57bd33bbc5e148827e2721ccef22aaf28ab2b376068e8" + license "LGPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "47b85fe0aa9c25cad44dde9da642d59fd8f1732aa082df5c6cf7b469c3b35e39" + sha256 arm64_sequoia: "e77b3e8f31c45b34937b1f89ca6f18cad5f6aa814c81058342f0c3cc3f32d09d" + sha256 arm64_sonoma: "8f04ff2a66b7a0e8ca8b4901c729a9843b864fedc3e6f4ffc078db9b1ebcb87c" + sha256 arm64_ventura: "ce6a75f52c04e97238e06d43eb9bdbd03120f6c9f136428c5f8020949cbb19f6" + sha256 sonoma: "50e70a9c6929ecf3a3a0dbef0687e33ee600a8200047056d5f3bded135decd89" + sha256 ventura: "87c115ceb02aa6acde393d7be4d3467ab7b06b501c01964d03d4d755a17c5ef0" + sha256 arm64_linux: "cf0f7c1f5fad68e6ce88ed6343e3f3999e5ce6e65e10cb7e1b4e185b1183f761" + sha256 x86_64_linux: "8c76a6ddd098a13e90a1d0026ea96b7f3ed329587425297b36719b523424b9e1" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "duktape" + depends_on "glib" + uses_from_macos "expat" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "linux-pam" + depends_on "systemd" + end + + def install + inreplace "meson.build" do |s| + s.gsub!("sysusers_dir = '/usr/lib/sysusers.d'", "sysusers_dir = '#{etc}/sysusers.d'") + s.gsub!("tmpfiles_dir = '/usr/lib/tmpfiles.d'", "tmpfiles_dir = '#{etc}/tmpfiles.d'") + end + + args = [ + "-Dsystemdsystemunitdir=#{lib}/systemd/system", + "-Dpam_prefix=#{etc}/pam.d", + "-Dpam_module_dir=#{lib}/pam", + ] + args << "-Dsession_tracking=ConsoleKit" if OS.mac? + + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + PolkitUnixGroup *group = POLKIT_UNIX_GROUP(polkit_unix_group_new(0)); + g_assert(group); + + gint group_gid = polkit_unix_group_get_gid(group); + g_assert_cmpint(group_gid, ==, 0); + + g_object_unref(group); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs polkit-gobject-1").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/p/polyglot.rb b/Formula/p/polyglot.rb new file mode 100644 index 0000000000000..128c53f356733 --- /dev/null +++ b/Formula/p/polyglot.rb @@ -0,0 +1,38 @@ +class Polyglot < Formula + desc "Protocol adapter to run UCI engines under XBoard" + homepage "https://www.chessprogramming.org/PolyGlot" + url "http://hgm.nubati.net/releases/polyglot-2.0.4.tar.gz" + sha256 "c11647d1e1cb4ad5aca3d80ef425b16b499aaa453458054c3aa6bec9cac65fc1" + license "GPL-2.0-or-later" + head "http://hgm.nubati.net/git/polyglot.git", branch: "learn" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6bf5814277c6a0cc6281f0d3e6911d909ef872edc68db77c9a382d17162020af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c17a367c2d5da43b534695330ea6467fb27dcd887afeb6dc582601c4a6a5fdc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc554a6ab1946c530812eef33e2092102df23edfb12dcb14d98d288b5f15de96" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d7bed90c3c1774a9a1765d8305b2fc0c9c38734a478777d35033570777f6a20" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dbcf961b5015dc2f909d421c6f1967a75110a44fa904718e599aa428341797d6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "74eb07a34cb1629966a192061f5ee507b8ff5db472b1fad9eeddba473b08570c" + sha256 cellar: :any_skip_relocation, sonoma: "84974144b7683943964b93e4686af237ef4a36f722b57e6c12dea8a78a65287c" + sha256 cellar: :any_skip_relocation, ventura: "719661c4cfbe1a0b809299d9285f4a715100783a6d2e7d8b89a5b3715ff4bb34" + sha256 cellar: :any_skip_relocation, monterey: "902514277b538f0d20c73875570832802028e7ba6c3f570ff0c2e4262625d7ea" + sha256 cellar: :any_skip_relocation, big_sur: "96fe594c38129a85e97eed368154664e9e318fb16b3f97127a9a4e829ff47f39" + sha256 cellar: :any_skip_relocation, catalina: "2c29c3f2dd2547bfb05fc123f997ac118fae9fccb4354d151ecdb9f4d056c792" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ad5fabb4324b9766a57bfb9889d17d2044e0f4ad9cdd8758e8fc968571919d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d78f2053c59df94cc0389beaf43906198ebc01dcb86c8cb888fdc6c640a9bc2" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match(/^PolyGlot \d\.\d\.[0-9a-z]+ by Fabien Letouzey/, shell_output("#{bin}/polyglot --help")) + end +end diff --git a/Formula/p/polyml.rb b/Formula/p/polyml.rb new file mode 100644 index 0000000000000..bbf71143aa1ed --- /dev/null +++ b/Formula/p/polyml.rb @@ -0,0 +1,35 @@ +class Polyml < Formula + desc "Standard ML implementation" + homepage "https://www.polyml.org/" + url "https://github.com/polyml/polyml/archive/refs/tags/v5.9.2.tar.gz" + sha256 "5cf5f77767568c25cf880acc2d0a32ee3d399e935475ab1626e8192fc3b07390" + license "LGPL-2.1-or-later" + head "https://github.com/polyml/polyml.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "2e1a65ca5584fbed5d8809d26b612abdedd723df506daa33d82bdd2144a8c8f7" + sha256 arm64_sequoia: "73159083107e398682b609d20c700a909a15e9cf8ccb95fc6311c567cc39a9a1" + sha256 arm64_sonoma: "e2f1500bcbb66c6ac5ff92627229efba5c6c3702f22d17bfd7a5648801a22125" + sha256 sonoma: "ebfa52db23d6ce50906a8c66957230db9ba791429c5e1e5cbc96bd2ad3eed16c" + sha256 arm64_linux: "dbb61f66617d3c19fc0d8cc1d5eadd8c2986fa048af9e1e720540ae3e8aae40a" + sha256 x86_64_linux: "cce638901b7e6baf678c145347a882cbc4589d92e52b61e0dc45ea5b30199592" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"hello.ml").write <<~EOS + let + fun concatWithSpace(a,b) = a ^ " " ^ b + in + TextIO.print(concatWithSpace("Hello", "World")) + end + EOS + assert_match "Hello World", shell_output("#{bin}/poly --script hello.ml") + end +end diff --git a/Formula/p/polynote.rb b/Formula/p/polynote.rb new file mode 100644 index 0000000000000..fe9096e0ef5ef --- /dev/null +++ b/Formula/p/polynote.rb @@ -0,0 +1,101 @@ +class Polynote < Formula + include Language::Python::Shebang + + desc "Polyglot notebook with first-class Scala support" + homepage "https://polynote.org/" + url "https://github.com/polynote/polynote/releases/download/0.6.1/polynote-dist.tar.gz" + sha256 "3d460e6929945591b6781ce11b11df8eebbfb9b6f0b3203861e70687c3eca3a1" + license "Apache-2.0" + + # Upstream marks all releases as "pre-release", so we have to use + # `GithubReleases` to be able to match pre-release releases until there's a + # "latest" release for us to be able to use the `GithubLatest` strategy. + livecheck do + url :stable + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + strategy :github_releases do |json, regex| + json.map do |release| + next if release["draft"] # || release["prerelease"] + + match = release["tag_name"]&.match(regex) + next if match.blank? + + match[1] + end + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "83a7b0af49ba4ab4ad4da51b15ffe2e9609cda61d2027f566d97d87461557974" + sha256 cellar: :any, arm64_sequoia: "4747bf5c546668f894b6fe33984237f7dd1bd6bb90220df4923797f670b014ee" + sha256 cellar: :any, arm64_sonoma: "1ee1662e8ef70df9244d5d4bff9df24ab2ac50c06871f1ee77902a4453f41dc3" + sha256 cellar: :any, sonoma: "987e62d3b5ccf2d0bf0b3d7055628478d3b8fcd4d7ad889c13c8fa9aff6ded02" + sha256 arm64_linux: "426f9eafe5932f3b4e48f8dcab47ea25b0af7c7683fb3f7c814d27439dd2bd09" + sha256 x86_64_linux: "6815b22885a9e13f6d381db68b8bddc4249786d2f33bacd98ef95df6a9bcb8ca" + end + + depends_on "numpy" # used by `jep` for Java primitive arrays + depends_on "openjdk" + depends_on "python@3.14" + + resource "jep" do + url "https://files.pythonhosted.org/packages/0e/92/994ae1013446f26103e9ff71676f4c96a7a6c0a9d6baa8f12805884f7b5e/jep-4.2.2.tar.gz" + sha256 "4eb79d903133e468c239ba39c8bb5ade021ef202025bf1c9b34a210003e0eab9" + end + + def install + python3 = "python3.14" + + with_env(JAVA_HOME: Language::Java.java_home) do + resource("jep").stage do + # Help native shared library in jep resource find libjvm.so on Linux. + unless OS.mac? + ENV.append "LDFLAGS", "-L#{Formula["openjdk"].libexec}/lib/server" + ENV.append "LDFLAGS", "-Wl,-rpath,#{Formula["openjdk"].libexec}/lib/server" + end + + system python3, "-m", "pip", "install", *std_pip_args(prefix: libexec/"vendor", build_isolation: true), "." + end + end + + libexec.install Dir["*"] + rewrite_shebang detected_python_shebang, libexec/"polynote.py" + + env = Language::Java.overridable_java_home_env + env["PYTHONPATH"] = libexec/"vendor"/Language::Python.site_packages(python3) + env["LD_LIBRARY_PATH"] = lib + (bin/"polynote").write_env_script libexec/"polynote.py", env + end + + test do + mkdir testpath/"notebooks" + + assert_path_exists bin/"polynote" + assert_predicate bin/"polynote", :executable? + + output = shell_output("#{bin}/polynote version 2>&1", 1) + assert_match "Unknown command version", output + + port = free_port + (testpath/"config.yml").write <<~YAML + listen: + host: 127.0.0.1 + port: #{port} + storage: + dir: #{testpath}/notebooks + YAML + + begin + pid = fork do + exec bin/"polynote", "--config", "#{testpath}/config.yml" + end + sleep 5 + + assert_match "Polynote", shell_output("curl -s 127.0.0.1:#{port}") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/p/polypolish.rb b/Formula/p/polypolish.rb new file mode 100644 index 0000000000000..f6e76c9814c36 --- /dev/null +++ b/Formula/p/polypolish.rb @@ -0,0 +1,34 @@ +class Polypolish < Formula + desc "Short-read polishing tool for long-read assemblies" + homepage "https://github.com/rrwick/Polypolish" + url "https://github.com/rrwick/Polypolish/archive/refs/tags/v0.6.1.tar.gz" + sha256 "7a9b803aac87a7963c08c162c502f90f9cf93b1f58d1502047eefc43aca65bde" + license "GPL-3.0-or-later" + head "https://github.com/rrwick/Polypolish.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "573d4d8f109f484e2b03832122174f6c3cb16bdfe357f617306233f4613da268" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27e21ac9ec859c4d3a4cac3894979bbf348f2749212961dfbda022b23a93fb41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "75763e9f7d2d958960e52b71f14abce7cfacb5613c939ea85b0dfbc3e08f6117" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66487941bbfaf2f02730c793390833f31c2e077388ff58c111924171a4268161" + sha256 cellar: :any_skip_relocation, sonoma: "4212609959e8a9f235f9f47f89c7b482676f51d194b3fd65204bb281f7ac5a8a" + sha256 cellar: :any_skip_relocation, ventura: "f7920a878f69050433f0e45de27d916dba31117ceed34751b650ba1c35a5f7ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "dde17d5e05b5b7b1418a8840d1cbd60d83636946571e7dcd27c0a79f94fa32bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49147fa1a9be87eb69b0ad655335450c7cb1ae203d0b81f6bda1daa913511471" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + output = shell_output("#{bin}/polypolish polish test.fasta") + assert_match "polypolish", output + end +end diff --git a/Formula/p/pomsky.rb b/Formula/p/pomsky.rb new file mode 100644 index 0000000000000..237a9cbcd65a4 --- /dev/null +++ b/Formula/p/pomsky.rb @@ -0,0 +1,39 @@ +class Pomsky < Formula + desc "Regular expression language" + homepage "https://pomsky-lang.org/" + url "https://github.com/pomsky-lang/pomsky/archive/refs/tags/v0.11.tar.gz" + sha256 "602cf73d7f7343b8c59ae82973635f5f62f26e2fe341fa990fca5fe504736384" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/pomsky-lang/pomsky.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "07c3c1a818b5e2925cc7bb37493554ae6fc726ba219d0ba88670c5799007d85a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e2c2f94091ab38f06f95ddca0c90df7cb9c7f4fb16e78518b365756f68d04d8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f191a0eb866fe3c9a43e6af5ffc963c5a08ba72ea49dd93eabf5ced8c960081" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41595db77e38123a28d0976497c6ac257214fed22254755e54b89cb5dee7d127" + sha256 cellar: :any_skip_relocation, sonoma: "b7072d58cef2e775feb2cfd3c2f9da2e8b8f5ae656ff530b8bc3c8aaffd048fc" + sha256 cellar: :any_skip_relocation, ventura: "6079d8a1dfc89585ad17b5adeb197c38f995fb0db087fd341d0aa1320f090eaf" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3c3d80cdc65fccbf6c579f35576d07add4a9cb9ecfdc96e94704507a4393f4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b045ede5c8563463d1afc5058db6721ea82017350d4faa86394502fb756d286" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "pomsky-bin") + + bash_completion.install "completions/pomsky.bash" => "pomsky" + fish_completion.install "completions/pomsky.fish" + zsh_completion.install "completions/pomsky.zsh" => "_pomsky" + end + + test do + assert_match "Backslash escapes are not supported", + shell_output("#{bin}/pomsky \"'Hello world'* \\X+\" 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/pomsky --version") + end +end diff --git a/Formula/p/ponyc.rb b/Formula/p/ponyc.rb new file mode 100644 index 0000000000000..9bef14937fbc9 --- /dev/null +++ b/Formula/p/ponyc.rb @@ -0,0 +1,59 @@ +class Ponyc < Formula + desc "Object-oriented, actor-model, capabilities-secure programming language" + homepage "https://www.ponylang.io/" + url "https://github.com/ponylang/ponyc.git", + tag: "0.60.4", + revision: "17b87bd708879d66827e56780a0a13601ea82e8a" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6ac487b53bb7995e41d4da3e816d1678e2ac581817a28eb62c2e347325f70239" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3bbc75214d3fb75a693c2bfc4fb2633d6cc56dda92d93db2069880ef473c13e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c4ae708cbe92306ddea79495376682d78b27a84d5f0c2f6741738bc4fb00f7e" + sha256 cellar: :any_skip_relocation, sonoma: "d1acb73969bd4dc9b4ac615e5964619b4dd161b360a77a9832280eaff2b4a1e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "0deae9922ecedca2ee066c23f8c72cf218ca0af7c57a2ae7b5acf9036037a977" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8b422add393d475acf45ab83cde9e897aa9ccb9a966cf91b07264faf1302cba" + end + + depends_on "cmake" => :build + + uses_from_macos "llvm" => [:build, :test] + uses_from_macos "python" => :build + uses_from_macos "zlib" + + # We use LLVM to work around an error while building bundled `google-benchmark` with GCC + fails_with :gcc do + cause <<~EOS + .../src/gbenchmark/src/thread_manager.h:50:31: error: expected ')' before '(' token + 50 | GUARDED_BY(GetBenchmarkMutex()) Result results; + | ^ + EOS + end + + def install + inreplace "CMakeLists.txt", "PONY_COMPILER=\"${CMAKE_C_COMPILER}\"", "PONY_COMPILER=\"#{ENV.cc}\"" if OS.linux? + + ENV["CMAKE_FLAGS"] = "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}" if OS.mac? + ENV["MAKEFLAGS"] = "build_flags=-j#{ENV.make_jobs}" + + system "make", "libs" + system "make", "configure" + system "make", "build" + system "make", "install", "DESTDIR=#{prefix}" + end + + test do + # ENV["CC"] returns llvm_clang, which does not work in a test block. + ENV.clang + + system bin/"ponyc", "-rexpr", "#{prefix}/packages/stdlib" + + (testpath/"test/main.pony").write <<~PONY + actor Main + new create(env: Env) => + env.out.print("Hello World!") + PONY + system bin/"ponyc", "test" + assert_equal "Hello World!", shell_output("./test1").strip + end +end diff --git a/Formula/p/ponysay.rb b/Formula/p/ponysay.rb new file mode 100644 index 0000000000000..a688885bf5c9a --- /dev/null +++ b/Formula/p/ponysay.rb @@ -0,0 +1,54 @@ +class Ponysay < Formula + desc "Cowsay but with ponies" + homepage "https://github.com/erkin/ponysay/" + license "GPL-3.0-or-later" + revision 7 + head "https://github.com/erkin/ponysay.git", branch: "master" + + stable do + url "https://github.com/erkin/ponysay/archive/refs/tags/3.0.3.tar.gz" + sha256 "c382d7f299fa63667d1a4469e1ffbf10b6813dcd29e861de6be55e56dc52b28a" + + # upstream commit 16 Nov 2019, `fix: do not compare literal with "is not"` + patch do + url "https://github.com/erkin/ponysay/commit/69c23e3a.patch?full_index=1" + sha256 "2c58d5785186d1f891474258ee87450a88f799408e3039a1dc4a62784de91b63" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "436a1f52adab32d7d21c3ebe39dee39f8d2bec2cdcfe0c650973b47961aa3852" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f62fa211582ff29e9494cd2215609d16b6296ea0affb2582b1335db3270ee4a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ce3e3d143f8164f2c88c4357e780ff8ba9b606892f88550aa6bb9bc00ffb57f" + sha256 cellar: :any_skip_relocation, sonoma: "a4ed42c1e433ff890d69b8efd820ec6f95171904c8ec0af96da7c72701bf2369" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b029e23e21fd4ac75a4cd6d69a10b766cbff2199b342db7ccca88b33aacf26e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb8cc2a4ab043dbb08c57344164315a5653bbcb1f9dd36103d9e697eb010f2c1" + end + + depends_on "gzip" => :build + depends_on "coreutils" + depends_on "python@3.14" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./setup.py", + "--freedom=partial", + "--prefix=#{prefix}", + "--cache-dir=#{prefix}/var/cache", + "--sysconf-dir=#{prefix}/etc", + "--with-custom-env-python=#{Formula["python@3.14"].opt_bin}/python3.14", + "install" + end + + test do + output = shell_output("#{bin}/ponysay test") + assert_match "test", output + assert_match "____", output + end +end diff --git a/Formula/p/pop.rb b/Formula/p/pop.rb new file mode 100644 index 0000000000000..bb2229eb8235c --- /dev/null +++ b/Formula/p/pop.rb @@ -0,0 +1,45 @@ +class Pop < Formula + desc "Send emails from your terminal" + homepage "https://github.com/charmbracelet/pop" + url "https://github.com/charmbracelet/pop/archive/refs/tags/v0.2.0.tar.gz" + sha256 "360db66ff46cf6331b2851f53477b7bf3a49303b0b46aaacff3d6c1027bf3f40" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e74d2da1df617b4c74212e2a3228da9fd103c65fe8915beeb1d5c38bb8af8a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f942784cbbe4d0e5e24f74f9e4431d8a798d6109c2ea3f483405430ca7279f5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dfda627b23f5fe1cef94ea1f9932edcd93f8930af29e6ded7161546112e30e60" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03eb314794237b4fc005f0d7128d4679dda5415979c7ee28646d8c88f176a696" + sha256 cellar: :any_skip_relocation, arm64_monterey: "03eb314794237b4fc005f0d7128d4679dda5415979c7ee28646d8c88f176a696" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "03eb314794237b4fc005f0d7128d4679dda5415979c7ee28646d8c88f176a696" + sha256 cellar: :any_skip_relocation, sonoma: "6d3084e9113707d91e78dad216111b682b2a3d3e69a2113f16bdd1afbf154815" + sha256 cellar: :any_skip_relocation, ventura: "4e17cddc694a0d7da02829d8dd7039dad792b31801468cd13beac526a0855d2b" + sha256 cellar: :any_skip_relocation, monterey: "4e17cddc694a0d7da02829d8dd7039dad792b31801468cd13beac526a0855d2b" + sha256 cellar: :any_skip_relocation, big_sur: "4e17cddc694a0d7da02829d8dd7039dad792b31801468cd13beac526a0855d2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbff57ed23b8f4906e232d52655f96377bf72b0fee5c38ebad138c2764c977ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0be47be0676bdfcf2a246fc6295eb3b454328e35e827455f0c921ab1a723d1be" + end + + depends_on "go" => :build + + # patch error status code, remove in next release + patch do + url "https://github.com/charmbracelet/pop/commit/65b34a366addd90a9d4da32ac8e5d22268ec16bd.patch?full_index=1" + sha256 "386fda7d26240d5574b7f402595d01497d7c2d3254e6ad9276a8dd02de0513b7" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + generate_completions_from_executable(bin/"pop", "completion") + (man1/"pop.1").write Utils.safe_popen_read(bin/"pop", "man") + end + + test do + assert_match "environment variable is required", + shell_output("#{bin}/pop --body 'hi' --subject 'Hello'", 1).chomp + + assert_match version.to_s, shell_output("#{bin}/pop --version") + end +end diff --git a/Formula/p/popeye.rb b/Formula/p/popeye.rb new file mode 100644 index 0000000000000..5425f34326266 --- /dev/null +++ b/Formula/p/popeye.rb @@ -0,0 +1,39 @@ +class Popeye < Formula + desc "Kubernetes cluster resource sanitizer" + homepage "https://popeyecli.io" + url "https://github.com/derailed/popeye/archive/refs/tags/v0.22.1.tar.gz" + sha256 "f8eef3d6b9cda24f4d9bdc24620c1368cd6a749f1321a499e88b339258e01d92" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7f2ff1b22e885412cd8c699159328387edc033aea8dc59e3b452832ca22099ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a29f831f909394c8c98753f0ca3cc25dbe30ce7b69c6241b8350376e40736092" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32632ae7cda036371ba5a29c5826f07665c9fab00d92f08914ddecb34705c709" + sha256 cellar: :any_skip_relocation, arm64_ventura: "95a5e69a47e586959e8fa11c1ffbd011bcaebbe9b27bb967380812cff73b8ed7" + sha256 cellar: :any_skip_relocation, sonoma: "7c2b6d822b30777d3fd02b65cd00595c8e6b8642f57468f423c1a998dfaa91be" + sha256 cellar: :any_skip_relocation, ventura: "df324d577d9723ecf63f7f9aa6e32c6018b30bc71a0cc505095a8c0a5e54f7f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "98c0311e4e966a6b7d956ecac5d5394a577cf22f899337d92eb43faa3872e74b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a29bddbc8b4d01dc7c21663db65b1d22f740f0f33544e89ba900f5a0674dd06" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/derailed/popeye/cmd.version=#{version} + -X github.com/derailed/popeye/cmd.commit=#{tap.user} + -X github.com/derailed/popeye/cmd.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"popeye", "completion") + end + + test do + output = shell_output("#{bin}/popeye --save --out html --output-file report.html 2>&1", 1) + assert_match "connect: connection refused", output + + assert_match version.to_s, shell_output("#{bin}/popeye version") + end +end diff --git a/Formula/p/poppler-qt5.rb b/Formula/p/poppler-qt5.rb new file mode 100644 index 0000000000000..a8de443a803a1 --- /dev/null +++ b/Formula/p/poppler-qt5.rb @@ -0,0 +1,97 @@ +class PopplerQt5 < Formula + desc "PDF rendering library (based on the xpdf-3.0 code base)" + homepage "https://poppler.freedesktop.org/" + url "https://poppler.freedesktop.org/poppler-25.11.0.tar.xz" + sha256 "63f155142b77349e2bccaef148e754e7506ab1641e713b83af4f54a8f8b15369" + license "GPL-2.0-only" + head "https://gitlab.freedesktop.org/poppler/poppler.git", branch: "master" + + livecheck do + formula "poppler" + end + + bottle do + sha256 arm64_tahoe: "2789f339896cd67d3a7da30c29c82819334b330dd3f99fd9c2e4c88ebddccea2" + sha256 arm64_sequoia: "067f5572934d3aa14c03039d39c449a1ff0585868012241f89346cd09925638b" + sha256 arm64_sonoma: "933d76ae2e33a7fe72cc9958d4e187c755911c7c840873e4483cfbfb9f6ea51b" + sha256 sonoma: "98559e41febd2f3d269503db4144fd02b434c225bfcd8d754f95ed3f2eabe79b" + sha256 arm64_linux: "9548170fd0ba88b8a44c9febbfd6c0cf85b3b232bc2164ded3182f82308daf48" + sha256 x86_64_linux: "fb333837c0e528e25bd64c2df016eedb49f045db1d7ff76f710ebb7e70c02cfe" + end + + keg_only "it conflicts with poppler" + + deprecate! date: "2026-05-19", because: "is for end-of-life Qt 5" + + depends_on "cmake" => :build + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gettext" + depends_on "glib" + depends_on "gpgme" + depends_on "gpgmepp" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "little-cms2" + depends_on "nspr" + depends_on "nss" + depends_on "openjpeg" + depends_on "qt@5" + + uses_from_macos "gperf" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "libassuan" + end + + resource "font-data" do + url "https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz" + sha256 "c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74" + + livecheck do + url "https://poppler.freedesktop.org/" + regex(/href=.*?poppler-data[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + def install + ENV.cxx11 + + args = std_cmake_args + %W[ + -DBUILD_GTK_TESTS=OFF + -DENABLE_BOOST=OFF + -DENABLE_CMS=lcms2 + -DENABLE_GLIB=ON + -DENABLE_QT5=ON + -DENABLE_QT6=OFF + -DENABLE_UNSTABLE_API_ABI_HEADERS=ON + -DWITH_GObjectIntrospection=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build_shared", *args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", *args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build_static" + lib.install "build_static/libpoppler.a" + lib.install "build_static/cpp/libpoppler-cpp.a" + lib.install "build_static/glib/libpoppler-glib.a" + + resource("font-data").stage do + system "make", "install", "prefix=#{prefix}" + end + end + + test do + system bin/"pdfinfo", test_fixtures("test.pdf") + end +end diff --git a/Formula/p/poppler.rb b/Formula/p/poppler.rb new file mode 100644 index 0000000000000..60dc5f49fb941 --- /dev/null +++ b/Formula/p/poppler.rb @@ -0,0 +1,96 @@ +class Poppler < Formula + desc "PDF rendering library (based on the xpdf-3.0 code base)" + homepage "https://poppler.freedesktop.org/" + url "https://poppler.freedesktop.org/poppler-25.11.0.tar.xz" + sha256 "63f155142b77349e2bccaef148e754e7506ab1641e713b83af4f54a8f8b15369" + license "GPL-2.0-only" + head "https://gitlab.freedesktop.org/poppler/poppler.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?poppler[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "b42042c656ef08e49b65bc094015b644cdf6487009493699132899996fe27062" + sha256 arm64_sequoia: "1ade1cb99b7fea1953ee43536f2cc6f8209f2828ce502cfecf021fbccf3d946b" + sha256 arm64_sonoma: "337581283b15c27a26009b04688aa9a155b02d13fd75e563c270c06ef2922205" + sha256 sonoma: "3c0830f7c31c3a5df15cbda699fe33dd54b8536f0016e9a3a021d9bd741a9d36" + sha256 arm64_linux: "36705bbec6f982d21f69e925619dc2426d7dbdedfc5baf34995bd1f98bf7d739" + sha256 x86_64_linux: "270a2139b5985b05ae717d51b3818789fb08b615f27f497a722398302f283161" + end + + depends_on "cmake" => :build + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gettext" + depends_on "glib" + depends_on "gpgme" + depends_on "gpgmepp" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "little-cms2" + depends_on "nspr" + depends_on "nss" + depends_on "openjpeg" + + uses_from_macos "gperf" => :build + uses_from_macos "curl", since: :monterey # 7.68.0 required by poppler as of https://gitlab.freedesktop.org/poppler/poppler/-/commit/8646a6aa2cb60644b56dc6e6e3b3af30ba920245 + uses_from_macos "zlib" + + on_macos do + depends_on "libassuan" + end + + conflicts_with "pdftohtml", "pdf2image", "xpdf", + because: "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" + + resource "font-data" do + url "https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz" + sha256 "c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74" + + livecheck do + url "https://poppler.freedesktop.org/" + regex(/href=.*?poppler-data[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + def install + ENV.cxx11 + + args = std_cmake_args + %W[ + -DBUILD_GTK_TESTS=OFF + -DENABLE_BOOST=OFF + -DENABLE_CMS=lcms2 + -DENABLE_GLIB=ON + -DENABLE_QT5=OFF + -DENABLE_QT6=OFF + -DENABLE_UNSTABLE_API_ABI_HEADERS=ON + -DWITH_GObjectIntrospection=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build_shared", *args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", *args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build_static" + lib.install "build_static/libpoppler.a" + lib.install "build_static/cpp/libpoppler-cpp.a" + lib.install "build_static/glib/libpoppler-glib.a" + + resource("font-data").stage do + system "make", "install", "prefix=#{prefix}" + end + end + + test do + system bin/"pdfinfo", test_fixtures("test.pdf") + end +end diff --git a/Formula/p/popt.rb b/Formula/p/popt.rb new file mode 100644 index 0000000000000..c62840873ea3e --- /dev/null +++ b/Formula/p/popt.rb @@ -0,0 +1,98 @@ +class Popt < Formula + desc "Library like getopt(3) with a number of enhancements" + homepage "https://github.com/rpm-software-management/popt" + url "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-1.19.tar.gz" + mirror "http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.19.tar.gz" + sha256 "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9" + license "MIT" + + # The stable archive is found at https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/ + # but it's unclear whether this would be a reliable check in the long term. + # We're simply checking the Git repository tags for the moment, as we + # shouldn't encounter problems with this method. + livecheck do + url :homepage + regex(/^(?:popt[._-])?v?(\d+(?:[._]\d+)+)(?:[._-]release)?$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "365d143d0d38003c60c1d6fb6d399ab4361690a64467d46a8f27c2f50d2dcfb6" + sha256 cellar: :any, arm64_sequoia: "4ff5f0c8c34f510a7336b16f42a6e058d028ff2025e9b01093b294be84d90bb2" + sha256 cellar: :any, arm64_sonoma: "2fb8801217b8bcddc5c15974478b7fd89992868fdd6b09360835e7b6f0cef791" + sha256 cellar: :any, arm64_ventura: "9cabf84985466e8531cff42433a8df6b16668222537544b0295dab0cef292e53" + sha256 cellar: :any, arm64_monterey: "1154aeb3aedee17c3dddb8f7896f4b5f6b4d7d9dc5334fd1011fb96768788e9c" + sha256 cellar: :any, arm64_big_sur: "36a746fdc0e913f77421aebbde75099112fb452beeca9d5420cd1d3907802fa6" + sha256 cellar: :any, sonoma: "0eab78dae2d0e5dab0d54f51c43fa8fbbfd777628078c4318622ae9416f6dbcd" + sha256 cellar: :any, ventura: "4826c003aae6f5407fc0f7e9db8ae2a8e8aad55fab65e1556d7a8db300af8110" + sha256 cellar: :any, monterey: "7d6cc173811a3aa97adae35f9c0a759acec73e0bc2c948fdb012f2691b4aef3d" + sha256 cellar: :any, big_sur: "92d031d6010ce339beb5d179471ac14b76e887cba2d8cd7699c41aa1d76bcee5" + sha256 cellar: :any, catalina: "bab861fc16b94cf46a1a438503ea5e7a602a2c750be14706210e83f63f4abaaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b137c17f2231710bf51430cb36d013b38bfa8ddef947adcf7a000d7ece9660c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eaf6aef4cf756e5ad7d75b04d51efb181e673be05bbc40053123b7e8f975db76" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char *argv[]) { + int optiona=-1, optionb=-1, optionc=-1, flag1=0, flag2=0; + + poptContext pc; + struct poptOption po[] = { + {"optiona", 'a', POPT_ARG_INT, &optiona, 11001, "descrip1", "argDescrip1"}, + {"optionb", 'b', POPT_ARG_INT, &optionb, 11002, "descrip2", "argDescrip2"}, + {"optionc", 'c', POPT_ARG_INT, &optionc, 11003, "descrip3", "argDescrip3"}, + {"flag1", 'f', POPT_ARG_NONE, &flag1, 11004, "descrip4", "argDescrip4"}, + {"flag2", 'g', POPT_ARG_NONE, &flag2, 11005, "descrip5", "argDescrip5"}, + POPT_AUTOHELP + {NULL} + }; + + pc = poptGetContext(NULL, argc, (const char **)argv, po, 0); + poptSetOtherOptionHelp(pc, "[ARG...]"); + if (argc < 2) { + poptPrintUsage(pc, stderr, 0); + exit(1); + } + + int val; + while ((val = poptGetNextOpt(pc)) >= 0); + + if (val != -1) { + switch(val) { + case POPT_ERROR_NOARG: + printf("Argument missing for an option\\n"); + exit(1); + case POPT_ERROR_BADOPT: + printf("Option's argument could not be parsed\\n"); + exit(1); + case POPT_ERROR_BADNUMBER: + case POPT_ERROR_OVERFLOW: + printf("Option could not be converted to number\\n"); + exit(1); + default: + printf("Unknown error in option processing\\n"); + exit(1); + } + } + + printf("%d\\n%d\\n%d\\n%d\\n%d\\n", optiona, optionb, optionc, flag1, flag2); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpopt", "-o", "test" + assert_equal "123\n456\n789\n1\n0\n", shell_output("./test -a 123 -b 456 -c 789 -f") + assert_equal "987\n654\n321\n0\n1\n", shell_output("./test --optiona=987 --optionb=654 --optionc=321 --flag2") + end +end diff --git a/Formula/p/portable-libffi.rb b/Formula/p/portable-libffi.rb new file mode 100644 index 0000000000000..6c1e29d198f89 --- /dev/null +++ b/Formula/p/portable-libffi.rb @@ -0,0 +1,69 @@ +require File.expand_path("../../Abstract/portable-formula", __dir__) + +class PortableLibffi < PortableFormula + desc "Portable Foreign Function Interface library" + homepage "https://sourceware.org/libffi/" + url "https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2.tar.gz" + sha256 "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc" + license "MIT" + + livecheck do + formula "libffi" + end + + def install + system "./configure", *portable_configure_args, + *std_configure_args, + "--enable-static", + "--disable-shared", + "--disable-docs" + system "make", "install" + end + + test do + (testpath/"closure.c").write <<~EOS + #include + #include + /* Acts like puts with the file given at time of enclosure. */ + void puts_binding(ffi_cif *cif, unsigned int *ret, void* args[], + FILE *stream) + { + *ret = fputs(*(char **)args[0], stream); + } + int main() + { + ffi_cif cif; + ffi_type *args[1]; + ffi_closure *closure; + int (*bound_puts)(char *); + int rc; + /* Allocate closure and bound_puts */ + closure = ffi_closure_alloc(sizeof(ffi_closure), &bound_puts); + if (closure) + { + /* Initialize the argument info vectors */ + args[0] = &ffi_type_pointer; + /* Initialize the cif */ + if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_uint, args) == FFI_OK) + { + /* Initialize the closure, setting stream to stdout */ + if (ffi_prep_closure_loc(closure, &cif, puts_binding, + stdout, bound_puts) == FFI_OK) + { + rc = bound_puts("Hello World!"); + /* rc now holds the result of the call to fputs */ + } + } + } + /* Deallocate both closure, and bound_puts */ + ffi_closure_free(closure); + return 0; + } + EOS + + flags = ["-L#{lib}", "-lffi", "-I#{include}"] + system ENV.cc, "-o", "closure", "closure.c", *(flags + ENV.cflags.to_s.split) + system "./closure" + end +end diff --git a/Formula/p/portable-libxcrypt.rb b/Formula/p/portable-libxcrypt.rb new file mode 100644 index 0000000000000..40ea2c164be62 --- /dev/null +++ b/Formula/p/portable-libxcrypt.rb @@ -0,0 +1,56 @@ +require File.expand_path("../../Abstract/portable-formula", __dir__) + +class PortableLibxcrypt < PortableFormula + desc "Extended crypt library for descrypt, md5crypt, bcrypt, and others" + homepage "https://github.com/besser82/libxcrypt" + url "https://github.com/besser82/libxcrypt/releases/download/v4.5.0/libxcrypt-4.5.0.tar.xz" + sha256 "825e764e4ff2e6304adb814cda297074b222d54a04edbd8ebc7cf58fc3af857d" + license "LGPL-2.1-or-later" + + livecheck do + formula "libxcrypt" + end + + def install + system "./configure", *portable_configure_args, + *std_configure_args, + "--enable-static", + "--disable-shared", + "--disable-obsolete-api", + "--disable-xcrypt-compat-files", + "--disable-failure-tokens", + "--disable-valgrind" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~EOS + #include + #include + #include + #include + + int main() + { + char *hash = crypt("abc", "$2b$05$abcdefghijklmnopqrstuu"); + + if (errno) { + fprintf(stderr, "Received error: %s", strerror(errno)); + return errno; + } + if (hash == NULL) { + fprintf(stderr, "Hash is NULL"); + return -1; + } + if (strcmp(hash, "$2b$05$abcdefghijklmnopqrstuuRWUgMyyCUnsDr8evYotXg5ZXVF/HhzS")) { + fprintf(stderr, "Unexpected hash output"); + return -1; + } + + return 0; + } + EOS + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcrypt", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/portable-libyaml.rb b/Formula/p/portable-libyaml.rb new file mode 100644 index 0000000000000..3a79685461a28 --- /dev/null +++ b/Formula/p/portable-libyaml.rb @@ -0,0 +1,38 @@ +require File.expand_path("../../Abstract/portable-formula", __dir__) + +class PortableLibyaml < PortableFormula + desc "YAML Parser" + homepage "https://github.com/yaml/libyaml" + url "https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz" + sha256 "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4" + license "MIT" + + livecheck do + formula "libyaml" + end + + def install + system "./configure", *portable_configure_args, + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-static", + "--disable-shared" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~EOS + #include + + int main() + { + yaml_parser_t parser; + yaml_parser_initialize(&parser); + yaml_parser_delete(&parser); + return 0; + } + EOS + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lyaml", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/portable-openssl.rb b/Formula/p/portable-openssl.rb new file mode 100644 index 0000000000000..b15dd3845061e --- /dev/null +++ b/Formula/p/portable-openssl.rb @@ -0,0 +1,129 @@ +require File.expand_path("../../Abstract/portable-formula", __dir__) + +class PortableOpenssl < PortableFormula + desc "Cryptography and SSL/TLS Toolkit" + homepage "https://openssl.org/" + url "https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz" + mirror "https://www.openssl.org/source/openssl-3.5.4.tar.gz" + mirror "http://fresh-center.net/linux/misc/openssl-3.5.4.tar.gz" + sha256 "967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_releases do |json, regex| + json.filter_map do |release| + next if release["draft"] || release["prerelease"] + + match = release["tag_name"]&.match(regex) + next if match.blank? + + version = Version.new(match[1]) + next if version.patch.to_i.zero? + + version + end + end + end + + resource "cacert" do + # https://curl.se/docs/caextract.html + url "https://curl.se/ca/cacert-2025-11-04.pem" + sha256 "8ac40bdd3d3e151a6b4078d2b2029796e8f843e3f86fbf2adbc4dd9f05e79def" + + livecheck do + url "https://curl.se/ca/cadate.t" + regex(/^#define\s+CA_DATE\s+(.+)$/) + strategy :page_match do |page, regex| + match = page.match(regex) + next if match.blank? + + Date.parse(match[1]).iso8601 + end + end + end + + def openssldir + libexec/"etc/openssl" + end + + def arch_args + if OS.mac? + %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128] + elsif Hardware::CPU.intel? + if Hardware::CPU.is_64_bit? + ["linux-x86_64"] + else + ["linux-elf"] + end + elsif Hardware::CPU.arm? + if Hardware::CPU.is_64_bit? + ["linux-aarch64"] + else + ["linux-armv4"] + end + end + end + + def configure_args + %W[ + --prefix=#{prefix} + --openssldir=#{openssldir} + --libdir=#{lib} + no-legacy + no-module + no-shared + no-engine + ] + end + + def install + # OpenSSL is not fully portable and certificate paths are backed into the library. + # We therefore need to set the certificate path at runtime via an environment variable. + # We however don't want to touch _other_ OpenSSL usages, so we change the variable name to differ. + inreplace "include/internal/common.h", "\"SSL_CERT_FILE\"", "\"PORTABLE_RUBY_SSL_CERT_FILE\"" + + openssldir.mkpath + system "perl", "./Configure", *(configure_args + arch_args) + system "make" + system "make", "test" + + system "make", "install_dev" + + # Ruby doesn't support passing --static to pkg-config. + # Unfortunately, this means we need to modify the OpenSSL pc file. + # This is a Ruby bug - not an OpenSSL one. + inreplace lib/"pkgconfig/libcrypto.pc", "\nLibs.private:", "" + + cacert = resource("cacert") + filename = Pathname.new(cacert.url).basename + openssldir.install cacert.files(filename => "cert.pem") + end + + test do + (testpath/"test.c").write <<~EOS + #include + #include + #include + + int main(int argc, char *argv[]) + { + if (argc < 2) + return -1; + + unsigned char md[EVP_MAX_MD_SIZE]; + unsigned int size; + + if (!EVP_Digest(argv[1], strlen(argv[1]), md, &size, EVP_sha256(), NULL)) + return 1; + + for (unsigned int i = 0; i < size; i++) + printf("%02x", md[i]); + return 0; + } + EOS + system ENV.cc, "test.c", "-L#{lib}", "-lcrypto", "-o", "test" + assert_equal "717ac506950da0ccb6404cdd5e7591f72018a20cbca27c8a423e9c9e5626ac61", + shell_output("./test 'This is a test string'") + end +end diff --git a/Formula/p/portable-ruby.rb b/Formula/p/portable-ruby.rb new file mode 100644 index 0000000000000..442610df085b1 --- /dev/null +++ b/Formula/p/portable-ruby.rb @@ -0,0 +1,200 @@ +require File.expand_path("../../Abstract/portable-formula", __dir__) + +class PortableRuby < PortableFormula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + url "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.7.tar.gz" + sha256 "23815a6d095696f7919090fdc3e2f9459b2c83d57224b2e446ce1f5f7333ef36" + license "Ruby" + + # This regex restricts matching to versions other than X.Y.0. + livecheck do + formula "ruby" + regex(/href=.*?ruby[._-]v?(\d+\.\d+\.(?:(?!0)\d+)(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c6946ba2c387b47934e77c352c2056489421003ec7ddb2abf246cef2168ec140" + sha256 cellar: :any_skip_relocation, catalina: "b48c918b7693c6d27e8027dc803a18cf64ddce49552fb45d88f3cabb9eead0fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "39900ec84f8b944f3d8719a5fd2812b2b55533fca6a5996a23391cbf6ae10430" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cca179476f84b0055766aa976005e3d45da635f0bc7616984675e2232db1eb4" + end + + depends_on "pkgconf" => :build + depends_on "portable-libyaml" => :build + depends_on "portable-openssl" => :build + + on_linux do + depends_on "portable-libffi" => :build + depends_on "portable-libxcrypt" => :build + depends_on "portable-zlib" => :build + end + + resource "msgpack" do + url "https://rubygems.org/downloads/msgpack-1.8.0.gem" + sha256 "e64ce0212000d016809f5048b48eb3a65ffb169db22238fb4b72472fecb2d732" + + livecheck do + url "https://rubygems.org/api/v1/versions/msgpack.json" + strategy :json do |json| + json.first["number"] + end + end + end + + resource "bootsnap" do + url "https://rubygems.org/downloads/bootsnap-1.18.6.gem" + sha256 "0ae2393c1e911e38be0f24e9173e7be570c3650128251bf06240046f84a07d00" + + livecheck do + url "https://rubygems.org/api/v1/versions/bootsnap.json" + strategy :json do |json| + json.first["number"] + end + end + end + + # Fix compile on macOS 10.11 + patch do + url "https://github.com/Bo98/ruby/commit/7aec5ca6e8ec13d92307615c32a511e02437d7de.patch?full_index=1" + sha256 "644f706bbbb708c2e1d32de65138c335c3710e6d47f86624f9dd98806627e83f" + end + + def install + # Remove almost all bundled gems and replace with our own set. + rm_r ".bundle" + allowed_gems = ["debug"] + bundled_gems = File.foreach("gems/bundled_gems").select do |line| + line.blank? || line.start_with?("#") || allowed_gems.any? { |gem| line.match?(/\A#{Regexp.escape(gem)}\s/) } + end + rm_r(Dir["gems/*.gem"].reject do |gem_path| + gem_basename = File.basename(gem_path) + allowed_gems.any? { |gem| gem_basename.match?(/\A#{Regexp.escape(gem)}-\d/) } + end) + resources.each do |resource| + resource.stage "gems" + bundled_gems << "#{resource.name} #{resource.version}\n" + end + File.write("gems/bundled_gems", bundled_gems.join) + + libyaml = Formula["portable-libyaml"] + libxcrypt = Formula["portable-libxcrypt"] + openssl = Formula["portable-openssl"] + libffi = Formula["portable-libffi"] + zlib = Formula["portable-zlib"] + + args = portable_configure_args + %W[ + --prefix=#{prefix} + --enable-load-relative + --with-static-linked-ext + --with-baseruby=#{RbConfig.ruby} + --with-out-ext=win32,win32ole + --without-gmp + --disable-install-doc + --disable-install-rdoc + --disable-dependency-tracking + ] + + # We don't specify OpenSSL as we want it to use the pkg-config, which `--with-openssl-dir` will disable + args += %W[ + --with-libyaml-dir=#{libyaml.opt_prefix} + ] + + if OS.linux? + ENV["XCFLAGS"] = "-I#{libxcrypt.opt_include}" + ENV["XLDFLAGS"] = "-L#{libxcrypt.opt_lib}" + + args += %W[ + --with-libffi-dir=#{libffi.opt_prefix} + --with-zlib-dir=#{zlib.opt_prefix} + ] + + # Ensure compatibility with older Ubuntu when built with Ubuntu 22.04 + args << "MKDIR_P=/bin/mkdir -p" + + # Don't make libruby link to zlib as it means all extensions will require it + # It's also not used with the older glibc we use anyway + args << "ac_cv_lib_z_uncompress=no" + end + + # Append flags rather than override + ENV["cflags"] = ENV.delete("CFLAGS") + ENV["cppflags"] = ENV.delete("CPPFLAGS") + ENV["cxxflags"] = ENV.delete("CXXFLAGS") + + system "./configure", *args + system "make", "extract-gems" + system "make" + + # Add a helper load path file so bundled gems can be easily used (used by brew's standalone/init.rb) + system "make", "ruby.pc" + arch = Utils.safe_popen_read("pkg-config", "--variable=arch", "./ruby-#{version.major_minor}.pc").chomp + mkdir_p "lib/#{arch}" + File.open("lib/#{arch}/portable_ruby_gems.rb", "w") do |file| + (Dir["extensions/*/*/*", base: ".bundle"] + Dir["gems/*/lib", base: ".bundle"]).each do |require_path| + file.write <<~RUBY + $:.unshift "\#{RbConfig::CONFIG["rubylibprefix"]}/gems/\#{RbConfig::CONFIG["ruby_version"]}/#{require_path}" + RUBY + end + end + + system "make", "install" + + abi_version = `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["ruby_version"]'` + abi_arch = `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["arch"]'` + + if OS.linux? + # Don't restrict to a specific GCC compiler binary we used (e.g. gcc-5). + inreplace lib/"ruby/#{abi_version}/#{abi_arch}/rbconfig.rb" do |s| + s.gsub! ENV.cxx, "c++" + s.gsub! ENV.cc, "cc" + # Change e.g. `CONFIG["AR"] = "gcc-ar-11"` to `CONFIG["AR"] = "ar"` + s.gsub!(/(CONFIG\[".+"\] = )"gcc-(.*)-\d+"/, '\\1"\\2"') + # C++ compiler might have been disabled because we break it with glibc@* builds + s.sub!(/(CONFIG\["CXX"\] = )"false"/, '\\1"c++"') + end + + # Ship libcrypt.a so that building native gems doesn't need system libcrypt installed. + cp libxcrypt.lib/"libcrypt.a", lib/"libcrypt.a" + end + + libexec.mkpath + cp openssl.libexec/"etc/openssl/cert.pem", libexec/"cert.pem" + openssl_rb = lib/"ruby/#{abi_version}/openssl.rb" + inreplace openssl_rb, "require 'openssl.so'", <<~EOS.chomp + ENV["PORTABLE_RUBY_SSL_CERT_FILE"] = ENV["SSL_CERT_FILE"] || File.expand_path("../../libexec/cert.pem", RbConfig.ruby) + \\0 + EOS + end + + test do + cp_r Dir["#{prefix}/*"], testpath + ENV["PATH"] = "/usr/bin:/bin" + ruby = (testpath/"bin/ruby").realpath + assert_equal version.to_s.split("-").first, shell_output("#{ruby} -e 'puts RUBY_VERSION'").chomp + assert_equal ruby.to_s, shell_output("#{ruby} -e 'puts RbConfig.ruby'").chomp + assert_equal "3632233996", + shell_output("#{ruby} -rzlib -e 'puts Zlib.crc32(\"test\")'").chomp + assert_equal " \t\n`><=;|&{(", + shell_output("#{ruby} -rreadline -e 'puts Readline.basic_word_break_characters'").chomp + assert_equal '{"a" => "b"}', + shell_output("#{ruby} -ryaml -e 'puts YAML.load(\"a: b\")'").chomp + assert_equal "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + shell_output("#{ruby} -ropenssl -e 'puts OpenSSL::Digest::SHA256.hexdigest(\"\")'").chomp + assert_match "200", + shell_output("#{ruby} -ropen-uri -e 'URI.open(\"https://google.com\") { |f| puts f.status.first }'").chomp + system ruby, "-rrbconfig", "-e", <<~EOS + Gem.discover_gems_on_require = false + require "portable_ruby_gems" + require "debug" + require "fiddle" + require "bootsnap" + EOS + system testpath/"bin/gem", "environment" + system testpath/"bin/bundle", "init" + # install gem with native components + system testpath/"bin/gem", "install", "byebug" + assert_match "byebug", + shell_output("#{testpath}/bin/byebug --version") + end +end diff --git a/Formula/p/portable-zlib.rb b/Formula/p/portable-zlib.rb new file mode 100644 index 0000000000000..16a96ee81f223 --- /dev/null +++ b/Formula/p/portable-zlib.rb @@ -0,0 +1,42 @@ +require File.expand_path("../../Abstract/portable-formula", __dir__) + +class PortableZlib < PortableFormula + desc "General-purpose lossless data-compression library" + homepage "https://zlib.net/" + url "https://zlib.net/zlib-1.3.1.tar.gz" + mirror "https://downloads.sourceforge.net/project/libpng/zlib/1.3.1/zlib-1.3.1.tar.gz" + mirror "http://fresh-center.net/linux/misc/zlib-1.3.1.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/zlib-1.3.1.tar.gz" + sha256 "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" + license "Zlib" + + livecheck do + formula "zlib" + end + + # https://zlib.net/zlib_how.html + resource "test_artifact" do + url "https://zlib.net/zpipe.c" + version "20051211" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + + livecheck do + skip "Static test artifact" + end + end + + def install + system "./configure", "--static", "--prefix=#{prefix}" + system "make", "install" + end + + test do + testpath.install resource("test_artifact") + system ENV.cc, "zpipe.c", "-I#{include}", "-L#{lib}", "-lz", "-o", "zpipe" + + touch "foo.txt" + output = "./zpipe < foo.txt > foo.txt.z" + system output + assert File.exist?("foo.txt.z") + end +end diff --git a/Formula/p/portablegl.rb b/Formula/p/portablegl.rb new file mode 100644 index 0000000000000..bff3e17fd6433 --- /dev/null +++ b/Formula/p/portablegl.rb @@ -0,0 +1,32 @@ +class Portablegl < Formula + desc "Implementation of OpenGL 3.x-ish in clean C" + homepage "https://github.com/rswinkle/PortableGL" + url "https://github.com/rswinkle/PortableGL.git", + tag: "0.99.0", + revision: "4af8053b31c71eb074b1f944efe8152351dfbec9" + license "MIT" + head "https://github.com/rswinkle/PortableGL.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ee2bac44840d1db63fc11b34aa4814ef75ffb0c71fbecad705e2961b6e9c8e6b" + end + + depends_on "sdl2" => :test + + def install + include.install "portablegl.h" + (pkgshare/"tests").install %w[glcommon media testing] + end + + test do + # Tests require PNG image outputs to be pixel-identical. + # Such exactness may be broken by -march=native. + ENV.remove_from_cflags "-march=native" + + cp_r Dir["#{pkgshare}/tests/*"], testpath + cd "testing" do + system "make", "run_tests" + assert_match "All tests passed", shell_output("./run_tests") + end + end +end diff --git a/Formula/p/portal.rb b/Formula/p/portal.rb new file mode 100644 index 0000000000000..73249c8cc544d --- /dev/null +++ b/Formula/p/portal.rb @@ -0,0 +1,71 @@ +class Portal < Formula + desc "Quick and easy command-line file transfer utility from any computer to another" + homepage "https://github.com/SpatiumPortae/portal" + url "https://github.com/SpatiumPortae/portal/archive/refs/tags/v1.2.3.tar.gz" + sha256 "7a457ab1efa559b89eb5d7edbebccb1342896a42e30dbd943ffb6eea14179b36" + license "MIT" + head "https://github.com/SpatiumPortae/portal.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1eb19a1a5286dff89e6c783dfb092baa8b5fc2e6a859c4fa19c748918b00299e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c0f1d260c58e98e4fd7899ef87280ffe8efcc67d77764203a9d54fe35e47ab4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c0f1d260c58e98e4fd7899ef87280ffe8efcc67d77764203a9d54fe35e47ab4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c0f1d260c58e98e4fd7899ef87280ffe8efcc67d77764203a9d54fe35e47ab4" + sha256 cellar: :any_skip_relocation, sonoma: "b091e6d917f3c32d54ae00142dbecf84c98b74985626b43df1dc4ea4c4bcf54c" + sha256 cellar: :any_skip_relocation, ventura: "b091e6d917f3c32d54ae00142dbecf84c98b74985626b43df1dc4ea4c4bcf54c" + sha256 cellar: :any_skip_relocation, arm64_linux: "7eaec7e69e6599f5618d67f3f1869d24ab28c7032f6817b0f9945cb9ca06d504" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4416bc3aa73043e6120fd97676142abae1de1f131454036ff9baecf61253068d" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=v#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/portal/" + + generate_completions_from_executable(bin/"portal", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/portal version") + + # Start a local relay server on an open port. + port=free_port + fork do + exec bin/"portal", "serve", "--port=#{port}" + end + sleep 2 + + test_file_name="test.txt" + test_file_content="sup, world" + + # Send a testing text file through the local relay (raw flag to easily extract the password). + # Write the password to "password.txt" in the testpath. + test_file_sender=(testpath/"sender"/test_file_name) + test_file_sender.write(test_file_content) + password_file=(testpath/"password.txt") + fork do + $stdout.reopen(password_file) + exec bin/"portal", "send", "-s=raw", "--relay=:#{port}", test_file_sender + end + sleep 2 + + # Receive the text file through the local relay. + receiver_path=(testpath/"receiver") + fork do + mkdir_p receiver_path + cd receiver_path do + exec bin/"portal", "receive", "-s=raw", "-y", "--relay=:#{port}", password_file.read.strip + end + end + sleep 2 + + test_file_receiver=(receiver_path/test_file_name) + + assert_path_exists test_file_receiver + assert_equal test_file_receiver.read, test_file_content + end +end diff --git a/Formula/p/portaudio.rb b/Formula/p/portaudio.rb new file mode 100644 index 0000000000000..94262d9a4a416 --- /dev/null +++ b/Formula/p/portaudio.rb @@ -0,0 +1,80 @@ +class Portaudio < Formula + desc "Cross-platform library for audio I/O" + homepage "https://www.portaudio.com" + url "https://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz" + version "19.7.0" + sha256 "47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def" + license "MIT" + version_scheme 1 + head "https://github.com/PortAudio/portaudio.git", branch: "master" + + livecheck do + url "https://files.portaudio.com/download.html" + regex(/href=.*?pa[._-]stable[._-]v?(\d+)(?:[._-]\d+)?\.t/i) + strategy :page_match do |page, regex| + # Modify filename version (190700) to match formula version (19.7.0) + page.scan(regex).map { |match| match[0].scan(/\d{2}/).map(&:to_i).join(".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7c24f222a11d112034b8a5e95f01feb4b610022c63bdc85d1ae2fe6abbd712e1" + sha256 cellar: :any, arm64_sequoia: "8ad9f1c15a4bc9c05a9dd184b53b8f5f5d13a2458a70535bfb01e54ce4f8b4bd" + sha256 cellar: :any, arm64_sonoma: "e5f86790b92dc68b3e1770cffb14dcfa42ed8cb2496b1ae9fb30c2d8ae66c037" + sha256 cellar: :any, arm64_ventura: "0f9a24bce721238c9f6fffaf6c490bb82e24fa0171bd23c66002d96ee67381e8" + sha256 cellar: :any, arm64_monterey: "8f390bc5ee1fffa1191df48e2947acafd5063abdc713c595760f3ac6a7a8ebd6" + sha256 cellar: :any, arm64_big_sur: "3daf7c4d5a1b948b2564de026336e3f3496f693ea0743e42b50f78d09ee32469" + sha256 cellar: :any, sonoma: "7e89c242dfe4a49421d45416ac28e5b00c9b434664e81fcafb0a192a6f83076e" + sha256 cellar: :any, ventura: "ef762c7cd5d48df14a6455e7302cf9ff4fcb64e625ecaa779c4dee8b71e346ae" + sha256 cellar: :any, monterey: "69daed6f99f96edb350f06043d5d7121bb0d3eaa88e64ef5bac247f300d552e9" + sha256 cellar: :any, big_sur: "f67d3a167142d0afa6ef446260075a7e1c29cf3d1246a95bac2f12732004398a" + sha256 cellar: :any, catalina: "9b0934f5a868dc0c3874ae6491d685cff6537923cc49d6abea18c1bf59cddaea" + sha256 cellar: :any_skip_relocation, arm64_linux: "abab20444fd53b2503b0f48172fe84c6503cd6219d00a83b63af96e60d395557" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01048cd3e5c934f5fb7b7cd11430833c69022a621fcc2d868159e07bbef1e3e4" + end + + depends_on "pkgconf" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "jack" + end + + def install + system "./configure", "--enable-mac-universal=no", + "--enable-cxx", + *std_configure_args + system "make", "install" + + # Need 'pa_mac_core.h' to compile PyAudio + include.install "include/pa_mac_core.h" if OS.mac? + end + + test do + (testpath/"test.c").write <<~C + #include + #include "portaudio.h" + + int main() { + printf("%s",Pa_GetVersionInfo()->versionText); + } + C + + (testpath/"test.cpp").write <<~CPP + #include + #include "portaudiocpp/System.hxx" + + int main() { + std::cout << portaudio::System::versionText(); + } + CPP + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lportaudio", "-o", "test" + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lportaudiocpp", "-o", "test_cpp" + assert_match stable.version.to_s, shell_output("./test") + assert_match stable.version.to_s, shell_output("./test_cpp") + end +end diff --git a/Formula/p/porter.rb b/Formula/p/porter.rb new file mode 100644 index 0000000000000..755c488f5984d --- /dev/null +++ b/Formula/p/porter.rb @@ -0,0 +1,39 @@ +class Porter < Formula + desc "App artifacts, tools, configs, and logic packaged as distributable installer" + homepage "https://porter.sh" + url "https://github.com/getporter/porter/archive/refs/tags/v1.3.0.tar.gz" + sha256 "5b1fd2ab73c9d90f3d3d1aa5f8bb8de75abe2093905230f496085502202d7688" + license "Apache-2.0" + head "https://github.com/getporter/porter.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "77ef2384be561f0c35b0eeb43b045ca750ac84deb91ac00f03fda4a2027decf2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8545005db3856f571c1fcbeb7ff824524a4fbf7223294bfde05953fe385fdcd1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a3ad5d0b344c9e57dd3676ce269f5aeca8112f429369416b060a3f514711a828" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ede90d8affd7f13e50c9f43dec5e968e5dc81ce4aa68287ef7e03e904cdf898" + sha256 cellar: :any_skip_relocation, sonoma: "85e03f0fbf0ff9ff72bf512a2a46c17b5b413576bbb39ca81655b61bce5d28da" + sha256 cellar: :any_skip_relocation, ventura: "329ebe1db268ace4d7650608ff9659ca175c8d02c24490ddb41a97f74d2b1a43" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ed5ddbd8e7281a5722ee70190bcb2436cf16ba1e0ec28afad159546bf458b55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92ff44a87f882ae8cb5184f67804cbdcff4340d2feab37d3aa7f2fdcb2c6686a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X get.porter.sh/porter/pkg.Version=#{version} + -X get.porter.sh/porter/pkg.Commit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/porter" + generate_completions_from_executable(bin/"porter", "completion") + end + + test do + assert_match "porter #{version}", shell_output("#{bin}/porter --version") + + system bin/"porter", "create" + assert_path_exists testpath/"porter.yaml" + end +end diff --git a/Formula/p/portmidi.rb b/Formula/p/portmidi.rb new file mode 100644 index 0000000000000..e29ea9ab79c27 --- /dev/null +++ b/Formula/p/portmidi.rb @@ -0,0 +1,47 @@ +class Portmidi < Formula + desc "Cross-platform library for real-time MIDI I/O" + homepage "https://github.com/PortMidi/portmidi" + url "https://github.com/PortMidi/portmidi/archive/refs/tags/v2.0.7.tar.gz" + sha256 "43fa65b4ed7ebaa68b0028a538ba8b2ca4dc9b86a7e22ec48842070e010f823f" + license "MIT" + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "78a7e46df8019297d38f47a4e0b1d1338a842473ce818348681b39379a0b8e03" + sha256 cellar: :any, arm64_sequoia: "47b659e50f8ab01b1c1606c81bd25e927f3757ae84bf0b3c77f9e93bcbd74f3f" + sha256 cellar: :any, arm64_sonoma: "a8c3ea6a6efd6be8d4d9ddb63bea9415e606476bcae0ea9d1646078b972e831d" + sha256 cellar: :any, sonoma: "1e1ce71bf25b00b29b4b0d6963f1fac0ecd95228f47a675ee04488342df3b398" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b276ff1f2f820e52e2b66165f2ac97889c9a71c9c5654f302e6a49ea717275c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c67a6ae4b4f17947cf80aa1de8b90590ca76647b946817dbf601e472212eaa83" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "alsa-lib" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + int count = -1; + count = Pm_CountDevices(); + if(count >= 0) + return 0; + else + return 1; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lportmidi", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/poselib.rb b/Formula/p/poselib.rb new file mode 100644 index 0000000000000..365f56aec6b3f --- /dev/null +++ b/Formula/p/poselib.rb @@ -0,0 +1,82 @@ +class Poselib < Formula + desc "Minimal solvers for calibrated camera pose estimation" + homepage "https://github.com/PoseLib/PoseLib/" + url "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.5.tar.gz" + sha256 "a9493e6725c58e6ae541fe416c0a6179185a60006880ff3ddf32737a43695668" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "dd83a55d57f61c2c99e5711cf0bd80e792d686a82f3e326945eaf42675340589" + sha256 cellar: :any, arm64_sequoia: "72e32c33fce8115a8e061c70f2d96f67daa47d5fd44ad211ab367ac472d85540" + sha256 cellar: :any, arm64_sonoma: "31a44969e52bc29df45aa648e264be5689b0e4c129c6b77a95ef7b205b90d719" + sha256 cellar: :any, arm64_ventura: "0af8973a43aa261e9becdf5c1595e1682e8b6d153ec754e66df76056db6efdf8" + sha256 cellar: :any, sonoma: "7dedd4a54068190cb6a94a1f3974e26ecdaa860f49c3a98d4b2c17464eece401" + sha256 cellar: :any, ventura: "693a649c3146d200f474af3905394f4b0287a0b0b00b715462ad3ad5715f8db9" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4dbeb31076c8ad21201c7d6c2b9c4044663e5dc4a07ffec881a855fcfd1256e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "590b3174a491f0e1349a974c3b73f0fddbe3a66e887da4e882854ab65c843f61" + end + + depends_on "cmake" => :build + depends_on "eigen" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system "cmake", "-S", ".", "-B", "static", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args + system "cmake", "--build", "static" + lib.install Dir["static/PoseLib/*.a"] + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "PoseLib/poselib.h" + #include + + int main(int argc, char *argv[]) + { + Eigen::Vector2d imgA(315, 217); + Eigen::Vector2d imgB(361, 295); + Eigen::Vector2d imgC(392, 660); + Eigen::Vector2d imgD(146, 220); + + Eigen::Vector2d pp(280, 420); + + std::vector points2D = { imgA - pp, imgB - pp, imgC - pp, imgD - pp}; + + Eigen::Vector3d a(-20.96, 3.54, 13.86); + Eigen::Vector3d b(-20.96, 3.57, 13.24); + Eigen::Vector3d c(-20.95, 2.01, 13.25); + Eigen::Vector3d d(-21.66, 3.74, 13.86); + + std::vector points3D = { a, b, c, d }; + + std::vector output; + std::vector output_fx, output_fy; + + int result = poselib::p4pf(points2D, points3D, &output, &output_fx, &output_fy, true); + + for(int k = 0; k < output.size(); ++k) { + poselib::CameraPose pose = output[k]; + double fx = output_fx[k]; + double fy = output_fy[k]; + + std::cout << pose.R() << std::endl; + } + + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", + "-I#{Formula["eigen"].opt_include}/eigen3", + "-L#{lib}", "-lPoseLib", "-o", "test" + + expected_output = <<~EOS + \s 0.934064 -0.0235118 -0.356331 + \s-0.165184 -0.91311 -0.372753 + \s-0.316605 0.407035 -0.856787 + EOS + assert_equal expected_output, shell_output("./test") + end +end diff --git a/Formula/p/posh.rb b/Formula/p/posh.rb new file mode 100644 index 0000000000000..2ccb06a0eebb9 --- /dev/null +++ b/Formula/p/posh.rb @@ -0,0 +1,37 @@ +class Posh < Formula + desc "Policy-compliant ordinary shell" + homepage "https://salsa.debian.org/clint/posh" + url "https://salsa.debian.org/clint/posh/-/archive/debian/0.14.2/posh-debian-0.14.2.tar.bz2" + sha256 "e78cc733c13087398548acdebf1d805ee5520fc2d9e190d4a7e33ab63a4fde82" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(%r{^debian/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c3ca3975b323a5129749c73735cc8b7ec32c00201f9162eeceef9eabb8229b27" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5521ebcdfc7adeb500e695de86c246a35ea196081c7685a57df8d7843ff018e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd77d2ab476deb15961b1ada548f29239c0e1522a4215bf60f86599364e99974" + sha256 cellar: :any_skip_relocation, arm64_ventura: "395839fc84859a9d46173aa90f04ce21d71ebee46969d78ad478ba0daf55a559" + sha256 cellar: :any_skip_relocation, sonoma: "f2612844178de8cdf96374c59b161631d45ed1329a86f0cb3b89ec86ac9a25e4" + sha256 cellar: :any_skip_relocation, ventura: "41cb17fbbf01fabd160bcb42a7a3d3eb8081b620c8c067c05e2317118e89e747" + sha256 cellar: :any_skip_relocation, arm64_linux: "15eaeb12495305a8341399582b4eeed3a7632bde7822960e94f22349acbaa32c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6255ff6feee66604318f82a9ed6ad93ce1aead32500374506321ccc0b2c3d4b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/posh -c 'echo homebrew'") + assert_equal "homebrew", output.chomp + end +end diff --git a/Formula/p/poster.rb b/Formula/p/poster.rb new file mode 100644 index 0000000000000..bb3095c6c2245 --- /dev/null +++ b/Formula/p/poster.rb @@ -0,0 +1,35 @@ +class Poster < Formula + desc "Create large posters out of PostScript pages" + homepage "https://schrfr.github.io/poster/" + url "https://github.com/schrfr/poster/archive/refs/tags/1.0.0.tar.gz" + sha256 "1df49dfd4e50ffd66e0b6e279b454a76329a36280e0dc73b08e5b5dcd5cff451" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34f60256105b4965b85f65e6dafaba94f046ce0bc39dd94b9ccbdef4721b756a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1d75eca414c1495f824f18e6b8007e5352233f9afb9c63d2b588f15f0a44cf8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9391507786944573699dca31e2089215514fbc3785b8cac70bf3576db33328fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3502b06b6c852fa6ba935acf4a862b72987beff8658b37a11f40cf349acbafde" + sha256 cellar: :any_skip_relocation, arm64_monterey: "33532f868bdc3667b1be77b533608c5f5837f19fe5683f0ee5d33ec945748e67" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ebf74df79fee5779f0a6631c938af2db579bfdf27c077fadcca06f21579bfee1" + sha256 cellar: :any_skip_relocation, sonoma: "4bb82868022cae59a6c8e6a41374de558382d3cc09998172650de1ce46a5d928" + sha256 cellar: :any_skip_relocation, ventura: "fc8ca26f680993d3584c3aaad86a2b9f3ae56d199a0cc614fbb1f93fd27493aa" + sha256 cellar: :any_skip_relocation, monterey: "fa63cfd184e101b839afd59ff181bd3e089925ce5a8b93936b579249dd08f955" + sha256 cellar: :any_skip_relocation, big_sur: "1dfc4b7649d3ad9c7b22693d9dd966c395a11385c6f5ecea07ab879972f5845f" + sha256 cellar: :any_skip_relocation, catalina: "e0afaa430ab84862c5a481145e73affbb572c008c1b40d6b8cd93eb465163b4e" + sha256 cellar: :any_skip_relocation, arm64_linux: "23bc2f446f1525bd074e89f5165a233c8e0080d454d00bd4a4dbbab884334ea1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "623f96d36fc59df594dd8ed5e0073b1d2892e083176346e93821436664351909" + end + + def install + system "make" + bin.install "poster" + man1.install "poster.1" + end + + test do + system bin/"poster", test_fixtures("test.ps") + end +end diff --git a/Formula/p/postgis.rb b/Formula/p/postgis.rb new file mode 100644 index 0000000000000..e433c642e9fe3 --- /dev/null +++ b/Formula/p/postgis.rb @@ -0,0 +1,176 @@ +class Postgis < Formula + desc "Adds support for geographic objects to PostgreSQL" + homepage "https://postgis.net/" + url "https://download.osgeo.org/postgis/source/postgis-3.6.0.tar.gz" + sha256 "8caffef4b457ed70d5328bf4e5a21f9306b06c271662e03e1a65d30090e5f25f" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://download.osgeo.org/postgis/source/" + regex(/href=.*?postgis[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ba758c3bad80ee44b6337f6740a40de629192060aa0b93539ad8ba7516705313" + sha256 cellar: :any, arm64_sequoia: "3dc689d8882df3c1b0313a8ec6e92a5e80e2f87c04dfac28e801beffeffce2c0" + sha256 cellar: :any, arm64_sonoma: "80a134d70401385c85762b5c7c4faf1d47f4b7860fb599bcaa63519419e2188f" + sha256 cellar: :any, sonoma: "25f5e7b840c1279fb3e68e790879456ed668c273c786ca10691e22198e011380" + sha256 cellar: :any_skip_relocation, arm64_linux: "efaf47acc8546d833bfa7514986405af88954d2e600230d7b696b8027ed58f21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32d430c1056caaea59d67c5a796ccf310454487eb885c69201ee23a591a31d08" + end + + head do + url "https://git.osgeo.org/gitea/postgis/postgis.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + + depends_on "gdal" + depends_on "geos" + depends_on "icu4c@77" + depends_on "json-c" + depends_on "libpq" + depends_on "libxml2" + depends_on "pcre2" + depends_on "proj" + depends_on "protobuf-c" + depends_on "sfcgal" + + uses_from_macos "perl" + + on_macos do + depends_on "gettext" + end + + def postgresqls + deps.filter_map { |dep| dep.to_formula if dep.name.start_with?("postgresql@") } + .sort_by(&:version) + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + # C++17 is required. + ENV.append "CXXFLAGS", "-std=c++17" + # Avoid linking to libc++ on Linux due to indirect LLVM dependency + ENV["ac_cv_lib_cpp_main"] = "no" if OS.linux? + + bin.mkpath + system "./autogen.sh" if build.head? + + postgresqls.each do |postgresql| + # PostGIS' build system assumes it is being installed to the same place as + # PostgreSQL, and looks for the `postgres` binary relative to the + # installation `bindir`. We gently support this system using an illusion. + # + # PostGIS links against the `postgres` binary for symbols that aren't + # exported in the public libraries `libpgcommon.a` and similar, so the + # build will break with confusing errors if this is omitted. + # + # See: https://github.com/NixOS/nixpkgs/commit/330fff02a675f389f429d872a590ed65fc93aedb + bin.install_symlink postgresql.opt_bin/"postgres" + + mkdir "build-pg#{postgresql.version.major}" do + system "../configure", "--with-projdir=#{Formula["proj"].opt_prefix}", + "--with-jsondir=#{Formula["json-c"].opt_prefix}", + "--with-pgconfig=#{postgresql.opt_bin}/pg_config", + "--with-protobufdir=#{Formula["protobuf-c"].opt_bin}", + *std_configure_args + # Force `bin/pgsql2shp` to link to `libpq` + system "make", "PGSQL_FE_CPPFLAGS=-I#{Formula["libpq"].opt_include}", + "PGSQL_FE_LDFLAGS=-L#{Formula["libpq"].opt_lib} -lpq" + # Override the hardcoded install paths set by the PGXS makefiles + system "make", "install", "bindir=#{bin}", + "docdir=#{doc}", + "mandir=#{man}", + "pkglibdir=#{lib/postgresql.name}", + "datadir=#{share/postgresql.name}", + "PG_SHAREDIR=#{share/postgresql.name}" + end + + rm(bin/"postgres") + end + + # Extension scripts + bin.install %w[ + utils/create_upgrade.pl + utils/profile_intersects.pl + utils/test_estimation.pl + utils/test_geography_estimation.pl + utils/test_geography_joinestimation.pl + utils/test_joinestimation.pl + ] + end + + test do + ENV["LC_ALL"] = "C" + require "base64" + (testpath/"brew.shp").write ::Base64.decode64 <<~EOS + AAAnCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoOgDAAALAAAAAAAAAAAAAAAA + AAAAAADwPwAAAAAAABBAAAAAAAAAFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAEAAAASCwAAAAAAAAAAAPA/AAAAAAAA8D8AAAAAAAAA + AAAAAAAAAAAAAAAAAgAAABILAAAAAAAAAAAACEAAAAAAAADwPwAAAAAAAAAA + AAAAAAAAAAAAAAADAAAAEgsAAAAAAAAAAAAQQAAAAAAAAAhAAAAAAAAAAAAA + AAAAAAAAAAAAAAQAAAASCwAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAA + AAAAAAAAAAAABQAAABILAAAAAAAAAAAAAAAAAAAAAAAUQAAAAAAAACJAAAAA + AAAAAEA= + EOS + (testpath/"brew.dbf").write ::Base64.decode64 <<~EOS + A3IJGgUAAABhAFsAAAAAAAAAAAAAAAAAAAAAAAAAAABGSVJTVF9GTEQAAEMA + AAAAMgAAAAAAAAAAAAAAAAAAAFNFQ09ORF9GTEQAQwAAAAAoAAAAAAAAAAAA + AAAAAAAADSBGaXJzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgIFBvaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgU2Vjb25kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICBQb2ludCAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgIFRoaXJkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgUG9pbnQgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICBGb3VydGggICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgIFBvaW50ICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgQXBwZW5kZWQgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICBQb2ludCAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAg + EOS + (testpath/"brew.shx").write ::Base64.decode64 <<~EOS + AAAnCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARugDAAALAAAAAAAAAAAAAAAA + AAAAAADwPwAAAAAAABBAAAAAAAAAFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAADIAAAASAAAASAAAABIAAABeAAAAEgAAAHQAAAASAAAA + igAAABI= + EOS + + result = shell_output("#{bin}/shp2pgsql #{testpath}/brew.shp") + assert_match "Point", result + assert_match "AddGeometryColumn", result + + postgresqls.each do |postgresql| + pg_version = postgresql.version.major + expected = /'PostGIS built for PostgreSQL % cannot be loaded in PostgreSQL %',\s+#{pg_version}\.\d,/ + postgis_version = version.major_minor + assert_match expected, (share/postgresql.name/"contrib/postgis-#{postgis_version}/postgis.sql").read + + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'postgis-3' + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"postgis\";", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/postgraphile.rb b/Formula/p/postgraphile.rb new file mode 100644 index 0000000000000..c387054a60c3d --- /dev/null +++ b/Formula/p/postgraphile.rb @@ -0,0 +1,40 @@ +class Postgraphile < Formula + desc "GraphQL schema created by reflection over a PostgreSQL schema" + homepage "https://www.graphile.org/postgraphile/" + url "https://registry.npmjs.org/postgraphile/-/postgraphile-4.14.1.tgz" + sha256 "131cb5c572c68a42a6c612b65041a4fa656a5364a75f7384f1446f62a684c9fc" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "50536d0d0000e441a09373ba89a497efda82318192103e59f212814dcc3ee20b" + end + + depends_on "postgresql@18" => :test + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + ENV["LC_ALL"] = "C" + assert_match "postgraphile", shell_output("#{bin}/postgraphile --help") + + pg_bin = Formula["postgresql@18"].opt_bin + system pg_bin/"initdb", "-D", testpath/"test" + pid = spawn("#{pg_bin}/postgres", "-D", testpath/"test") + + begin + sleep 2 + system pg_bin/"createdb", "test" + system bin/"postgraphile", "-c", "postgres:///test", "-X" + ensure + Process.kill 9, pid + Process.wait pid + end + end +end diff --git a/Formula/p/postgres-language-server.rb b/Formula/p/postgres-language-server.rb new file mode 100644 index 0000000000000..69fbd6a6634a4 --- /dev/null +++ b/Formula/p/postgres-language-server.rb @@ -0,0 +1,36 @@ +class PostgresLanguageServer < Formula + desc "Language Server for Postgres" + homepage "https://pg-language-server.com/" + url "https://github.com/supabase-community/postgres-language-server/archive/refs/tags/0.17.2.tar.gz" + sha256 "05e8cd8dcee06974ccb10c6371d2ecd871e024d51cef5c95ff429862afc50252" + license "MIT" + head "https://github.com/supabase-community/postgres-language-server.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1b902f96e99e20f2b597f032da9ece01e4c67f7c2fedf1a41832244019ea4caa" + sha256 cellar: :any, arm64_sequoia: "f21869b23db9a186e6ecc6cff40ccd24c5d4239fef7887b53d4035e1e07851f1" + sha256 cellar: :any, arm64_sonoma: "fba208f8d36d825a9be2f9cb56ee57ff856b5c0ec9ca1d48cb5e761ba30c6ea8" + sha256 cellar: :any, sonoma: "607cdca7a4040e31e679ff65cb06d41b9492de8aebb4ac753f8afc3aae84aca2" + sha256 cellar: :any_skip_relocation, arm64_linux: "e70cde4802daf411a8f7ad31444b754874ca286d1a905f167063bafda671280a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df82689c8cb1a7c0d594b171da01bd7f0750fe03ad6196e2d6793f695526217c" + end + + depends_on "llvm" => :build + depends_on "node" => :build + depends_on "rust" => :build + depends_on "tree-sitter" => :build + depends_on "libpg_query" + + def install + ENV["PGLS_VERSION"] = version.to_s + ENV["LIBPG_QUERY_PATH"] = Formula["libpg_query"].opt_prefix + system "cargo", "install", *std_cargo_args(path: "crates/pgls_cli") + end + + test do + (testpath/"test.sql").write("selet 1;") + output = shell_output("#{bin}/postgres-language-server check #{testpath}/test.sql", 1) + assert_includes output, "Checked 1 file" + assert_match version.to_s, shell_output("#{bin}/postgres-language-server --version") + end +end diff --git a/Formula/p/postgresql-hll.rb b/Formula/p/postgresql-hll.rb new file mode 100644 index 0000000000000..ac088ce96d1f3 --- /dev/null +++ b/Formula/p/postgresql-hll.rb @@ -0,0 +1,57 @@ +class PostgresqlHll < Formula + desc "PostgreSQL extension adding HyperLogLog data structures as a native data type" + homepage "https://github.com/citusdata/postgresql-hll" + url "https://github.com/citusdata/postgresql-hll/archive/refs/tags/v2.19.tar.gz" + sha256 "d63d56522145f2d737e0d056c9cfdfe3e8b61008c12ca4c45bde7d9b942f9c46" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "17db595caa269ee31d2b540fa9e441019ffac25b4062690824f5f726dcaa992d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e235a1f63bb5da5ac21e425ca4e051bf99a24eb6986e62eb8823e3dc010763e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69c8dad6e719c444fd0fea42b7def97b3503aa12875eca051f8488ada44d22c8" + sha256 cellar: :any_skip_relocation, sonoma: "214e7844d487ea202d54ebf8ae65677d980b8e371b26d29f067eb5f069a2a6d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c34d132dd0e9543d3c14e707bf16fc28c36a41c51f81ff9bf8f8f0b6f9ce51c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5e546957897b0dcb512910e16d9a5667e10f2bb1bc8d672eae77a21d49ee289" + end + + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + postgresqls.each do |postgresql| + ENV["PG_CONFIG"] = postgresql.opt_bin/"pg_config" + system "make" + system "make", "install", "pkglibdir=#{lib/postgresql.name}", + "datadir=#{share/postgresql.name}", + "pkgincludedir=#{include/postgresql.name}" + system "make", "clean" + end + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION hll;", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/p/postgresql@11.rb b/Formula/p/postgresql@11.rb new file mode 100644 index 0000000000000..9b1ee1ec93c3f --- /dev/null +++ b/Formula/p/postgresql@11.rb @@ -0,0 +1,227 @@ +class PostgresqlAT11 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2" + sha256 "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0" + license "PostgreSQL" + revision 3 + + bottle do + sha256 arm64_sequoia: "465e5d787088e8430b34127706cef775e370465e397cd7a0f8d1f9f6e100b250" + sha256 arm64_sonoma: "9a90a8863e2249ddec6fdfc780234245c627bb712167c9d4ae049724d7603d57" + sha256 arm64_ventura: "c49160f76e1c932fbad47d7a46bfac677fa08b48c1a81ece6a2bfd221dba4421" + sha256 sonoma: "1d2800bd5a00502a1e12af09bc83fbe2cbb5ad7f94fbf043bf7e1a2c78e41ff2" + sha256 ventura: "cd1b4cedfee0cf1c3bd27f19be06f520543af8dd9d8ddad488bc7f35be8b2483" + sha256 x86_64_linux: "28741909116720116113759f20a2532b4c40452d4019162b0dc2339d5f088b79" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + disable! date: "2024-11-09", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "icu4c@76" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "krb5" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + # Fix compatibility with OpenSSL 3.2 + # Ref https://www.postgresql.org/message-id/CX9SU44GH3P4.17X6ZZUJ5D40N%40neon.tech + patch :DATA + + def install + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + args = %W[ + --disable-debug + --prefix=#{prefix} + --datadir=#{opt_pkgshare} + --libdir=#{opt_lib} + --includedir=#{opt_include} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + ] + if OS.mac? + args += %w[ + --with-bonjour + --with-tcl + ] + end + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args + system "make" + system "make", "install-world", "datadir=#{pkgshare}", + "libdir=#{lib}", + "pkglibdir=#{lib}", + "includedir=#{include}", + "pkgincludedir=#{include}", + "includedir_server=#{include}/server", + "includedir_internal=#{include}/internal" + + if OS.linux? + inreplace lib/"pgxs/src/Makefile.global", + "LD = #{HOMEBREW_PREFIX}/Homebrew/Library/Homebrew/shims/linux/super/ld", + "LD = #{HOMEBREW_PREFIX}/bin/ld" + end + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=C", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=C -E UTF-8 #{postgresql_datadir} + For more details, read: + https://www.postgresql.org/docs/#{version.major}/app-initdb.html + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_equal opt_pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp + assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp + assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp + end +end + +__END__ +diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c +index e307bfea82..255f5d61b7 100644 +--- a/src/backend/libpq/be-secure-openssl.c ++++ b/src/backend/libpq/be-secure-openssl.c +@@ -663,11 +663,6 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor) + * to retry; do we need to adopt their logic for that? + */ + +-#ifndef HAVE_BIO_GET_DATA +-#define BIO_get_data(bio) (bio->ptr) +-#define BIO_set_data(bio, data) (bio->ptr = data) +-#endif +- + static BIO_METHOD *my_bio_methods = NULL; + + static int +@@ -677,7 +672,7 @@ my_sock_read(BIO *h, char *buf, int size) + + if (buf != NULL) + { +- res = secure_raw_read(((Port *) BIO_get_data(h)), buf, size); ++ res = secure_raw_read(((Port *) BIO_get_app_data(h)), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -697,7 +692,7 @@ my_sock_write(BIO *h, const char *buf, int size) + { + int res = 0; + +- res = secure_raw_write(((Port *) BIO_get_data(h)), buf, size); ++ res = secure_raw_write(((Port *) BIO_get_app_data(h)), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -773,7 +768,7 @@ my_SSL_set_fd(Port *port, int fd) + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); + goto err; + } +- BIO_set_data(bio, port); ++ BIO_set_app_data(bio, port); + + BIO_set_fd(bio, fd, BIO_NOCLOSE); + SSL_set_bio(port->ssl, bio, bio); +diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c +index 55e231e849..bf091c0ec5 100644 +--- a/src/interfaces/libpq/fe-secure-openssl.c ++++ b/src/interfaces/libpq/fe-secure-openssl.c +@@ -1491,11 +1491,6 @@ PQsslAttribute(PGconn *conn, const char *attribute_name) + * to retry; do we need to adopt their logic for that? + */ + +-#ifndef HAVE_BIO_GET_DATA +-#define BIO_get_data(bio) (bio->ptr) +-#define BIO_set_data(bio, data) (bio->ptr = data) +-#endif +- + static BIO_METHOD *my_bio_methods; + + static int +@@ -1503,7 +1498,7 @@ my_sock_read(BIO *h, char *buf, int size) + { + int res; + +- res = pqsecure_raw_read((PGconn *) BIO_get_data(h), buf, size); ++ res = pqsecure_raw_read((PGconn *) BIO_get_app_data(h), buf, size); + BIO_clear_retry_flags(h); + if (res < 0) + { +@@ -1533,7 +1528,7 @@ my_sock_write(BIO *h, const char *buf, int size) + { + int res; + +- res = pqsecure_raw_write((PGconn *) BIO_get_data(h), buf, size); ++ res = pqsecure_raw_write((PGconn *) BIO_get_app_data(h), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -1624,7 +1619,7 @@ my_SSL_set_fd(PGconn *conn, int fd) + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); + goto err; + } +- BIO_set_data(bio, conn); ++ BIO_set_app_data(bio, conn); + + SSL_set_bio(conn->ssl, bio, bio); + BIO_set_fd(bio, fd, BIO_NOCLOSE); diff --git a/Formula/p/postgresql@12.rb b/Formula/p/postgresql@12.rb new file mode 100644 index 0000000000000..d4a8fd3b5e62d --- /dev/null +++ b/Formula/p/postgresql@12.rb @@ -0,0 +1,145 @@ +class PostgresqlAT12 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2" + sha256 "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b" + license "PostgreSQL" + revision 1 + + bottle do + sha256 arm64_tahoe: "7dbbc04a01b70d5a0dd2ff13259a235abb3f0594a25c2f2ee14dab982ba49312" + sha256 arm64_sequoia: "770808f2893a90101c6043beb222509fdbaeb27d43231ce86a823c880167a869" + sha256 arm64_sonoma: "5c7563d9142be7b9f6d9a196ac5962f0df9d2b280b89c3d4a854c88d9a4ddbef" + sha256 arm64_ventura: "b033000c5e7fbb428492181650dc33b07da3046da0e0f78daa7a26154db5c5ce" + sha256 sonoma: "e0bbf74f24d63185fb22e85127c6ba5f02909a85b50f3df6a26420572f7148e4" + sha256 ventura: "5bdb379616fc91d0bbca3f337a2f15360a3f417f323de32fef2171be4af4652e" + sha256 arm64_linux: "2c9084a2fbc2dc1ce69a132d0d5e05ddfb21bef567e03bddb5ca940cd477cce8" + sha256 x86_64_linux: "a75e2288530172594e6ec77b02a22a0aeda119feaaa21337b8d1922926472fdb" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + deprecate! date: "2024-11-14", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "icu4c@77" + + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + ENV.runtime_cpu_detection + ENV.delete "PKG_CONFIG_LIBDIR" if OS.mac? && MacOS.version == :catalina + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + args = %W[ + --disable-debug + --prefix=#{prefix} + --datadir=#{opt_pkgshare} + --libdir=#{opt_lib} + --includedir=#{opt_include} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + ] + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args + + # Work around busted path magic in Makefile.global.in. This can't be specified + # in ./configure, but needs to be set here otherwise install prefixes containing + # the string "postgres" will get an incorrect pkglibdir. + # See https://github.com/Homebrew/homebrew-core/issues/62930#issuecomment-709411789 + system "make", "pkglibdir=#{opt_lib}/postgresql", + "pkgincludedir=#{opt_include}/postgresql", + "includedir_server=#{opt_include}/postgresql/server" + system "make", "install-world", "datadir=#{pkgshare}", + "libdir=#{lib}", + "pkglibdir=#{lib}/postgresql", + "includedir=#{include}", + "pkgincludedir=#{include}/postgresql", + "includedir_server=#{include}/postgresql/server", + "includedir_internal=#{include}/postgresql/internal" + return unless OS.linux? + + inreplace lib/"postgresql/pgxs/src/Makefile.global", + "LD = #{Superenv.shims_path}/ld", + "LD = #{HOMEBREW_PREFIX}/bin/ld" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=C", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=C -E UTF-8 #{postgresql_datadir} + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_equal opt_pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp + assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp + assert_equal (opt_lib/"postgresql").to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp + assert_equal (opt_include/"postgresql").to_s, shell_output("#{bin}/pg_config --pkgincludedir").chomp + assert_equal (opt_include/"postgresql/server").to_s, shell_output("#{bin}/pg_config --includedir-server").chomp + end +end diff --git a/Formula/p/postgresql@13.rb b/Formula/p/postgresql@13.rb new file mode 100644 index 0000000000000..0f282c105cccc --- /dev/null +++ b/Formula/p/postgresql@13.rb @@ -0,0 +1,148 @@ +class PostgresqlAT13 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v13.22/postgresql-13.22.tar.bz2" + sha256 "d36d83dc89e625502cf6fb1d0529642ba1266bd614b4e4a41cefd1dddcf09080" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(13(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "af0bbae06a169a5fa3b162c5b9f66449cb71a096d2b6aa9e99cef4989dc2019a" + sha256 arm64_sequoia: "2a77c7eb5df3b1c5b558228d31ec36a2908cac3d615a5e11c67fc8f314ab8ab9" + sha256 arm64_sonoma: "8d60dfb0619642149de994a907e11833c7a19b2d9ab1846844717610d511c73d" + sha256 sonoma: "b94b31763f096640a3d04ee587ac539eb61f0fd34c3c64666fa6d2d487c8847a" + sha256 arm64_linux: "3a991b4872a16d749e06fd67c89b0a14c754ce2de086cfd99dcbf31231f1f73a" + sha256 x86_64_linux: "ac7de4c683451b3bc203fdc72f4a3b195eed31cf936f99cf9b1bd533c052d40a" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + disable! date: "2026-03-01", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "icu4c@77" + + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + ENV.runtime_cpu_detection + ENV.delete "PKG_CONFIG_LIBDIR" if OS.mac? && MacOS.version == :catalina + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + args = %W[ + --disable-debug + --prefix=#{prefix} + --datadir=#{opt_pkgshare} + --libdir=#{opt_lib} + --includedir=#{opt_include} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + ] + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args + + # Work around busted path magic in Makefile.global.in. This can't be specified + # in ./configure, but needs to be set here otherwise install prefixes containing + # the string "postgres" will get an incorrect pkglibdir. + # See https://github.com/Homebrew/homebrew-core/issues/62930#issuecomment-709411789 + system "make", "pkglibdir=#{opt_lib}/postgresql", + "pkgincludedir=#{opt_include}/postgresql", + "includedir_server=#{opt_include}/postgresql/server" + system "make", "install-world", "datadir=#{pkgshare}", + "libdir=#{lib}", + "pkglibdir=#{lib}/postgresql", + "includedir=#{include}", + "pkgincludedir=#{include}/postgresql", + "includedir_server=#{include}/postgresql/server", + "includedir_internal=#{include}/postgresql/internal" + return unless OS.linux? + + inreplace lib/"postgresql/pgxs/src/Makefile.global", + "LD = #{Superenv.shims_path}/ld", + "LD = #{HOMEBREW_PREFIX}/bin/ld" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=en_US.UTF-8", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=en_US.UTF-8 -E UTF-8 #{postgresql_datadir} + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", "--locale=en_US.UTF-8", "-E UTF-8", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_equal opt_pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp + assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp + assert_equal (opt_lib/"postgresql").to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp + assert_equal (opt_include/"postgresql").to_s, shell_output("#{bin}/pg_config --pkgincludedir").chomp + assert_equal (opt_include/"postgresql/server").to_s, shell_output("#{bin}/pg_config --includedir-server").chomp + end +end diff --git a/Formula/p/postgresql@14.rb b/Formula/p/postgresql@14.rb new file mode 100644 index 0000000000000..13191c7cc71aa --- /dev/null +++ b/Formula/p/postgresql@14.rb @@ -0,0 +1,153 @@ +class PostgresqlAT14 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v14.19/postgresql-14.19.tar.bz2" + sha256 "727e9e334bc1a31940df808259f69fe47a59f6d42174b22ae62d67fe7a01ad80" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(14(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "f654ad5909a87ed4081380315edf82329301abbff4e01fd4641073ea332fb3b6" + sha256 arm64_sequoia: "0254f39e196653fcd93ba8462fb0a33655c4b7dff7b961d21c9c53d4e473ad3f" + sha256 arm64_sonoma: "b6d6b2344659a64b785164918e8019d39ee039e34710c584ae05729e785dc13e" + sha256 sonoma: "771ebb371c41a42d72d9d1b3b9dd9dadb0298c293c9629ea479daa8b0222f9f9" + sha256 arm64_linux: "7ccd62cb69a764c4a73ad09ba5e21e53abe56b1966e88f6c971b7547359eaf9c" + sha256 x86_64_linux: "64f1d1dea887cf2d97220eb572e8cbd4e017d09ef0cc3db8707141462371dc8e" + end + + # deprecating one year before the last release, + # see: https://www.postgresql.org/support/versioning/ + deprecate! date: "2025-11-12", because: :unsupported + disable! date: "2026-11-12", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "icu4c@77" + + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + + depends_on "lz4" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + ENV.runtime_cpu_detection + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + args = %W[ + --disable-debug + --prefix=#{prefix} + --datadir=#{HOMEBREW_PREFIX}/share/#{name} + --libdir=#{HOMEBREW_PREFIX}/lib/#{name} + --includedir=#{HOMEBREW_PREFIX}/include/#{name} + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-lz4 + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + --with-extra-version=\ (#{tap.user}) + ] + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args + system "make" + system "make", "install-world", "datadir=#{pkgshare}", + "libdir=#{lib}/#{name}", + "pkglibdir=#{lib}/#{name}", + "includedir=#{include}/#{name}", + "pkgincludedir=#{include}/#{name}", + "includedir_server=#{include}/#{name}/server", + "includedir_internal=#{include}/#{name}/internal" + return unless OS.linux? + + inreplace lib/name/"pgxs/src/Makefile.global", + "LD = #{Superenv.shims_path}/ld", + "LD = #{HOMEBREW_PREFIX}/bin/ld" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + old_postgres_data_dir = var/"postgres" + if old_postgres_data_dir.exist? + opoo "The old PostgreSQL data directory (#{old_postgres_data_dir}) still exists!" + puts <<~EOS + Previous versions of postgresql shared the same data directory. + + You can migrate to a versioned data directory by running: + mv -v "#{old_postgres_data_dir}" "#{postgresql_datadir}" + + (Make sure PostgreSQL is stopped before executing this command) + EOS + end + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=en_US.UTF-8", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=en_US.UTF-8 -E UTF-8 #{postgresql_datadir} + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", "--locale=en_US.UTF-8", "-E UTF-8", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_equal "#{HOMEBREW_PREFIX}/share/#{name}", shell_output("#{bin}/pg_config --sharedir").chomp + assert_equal "#{HOMEBREW_PREFIX}/lib/#{name}", shell_output("#{bin}/pg_config --libdir").chomp + assert_equal "#{HOMEBREW_PREFIX}/lib/#{name}", shell_output("#{bin}/pg_config --pkglibdir").chomp + assert_equal "#{HOMEBREW_PREFIX}/include/#{name}", shell_output("#{bin}/pg_config --includedir").chomp + end +end diff --git a/Formula/p/postgresql@15.rb b/Formula/p/postgresql@15.rb new file mode 100644 index 0000000000000..680efd9a1c0f4 --- /dev/null +++ b/Formula/p/postgresql@15.rb @@ -0,0 +1,165 @@ +class PostgresqlAT15 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v15.14/postgresql-15.14.tar.bz2" + sha256 "06dd75d305cd3870ee62b3932e661c624543eaf9ae2ba37cdec0a4f8edd051d2" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(15(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "d35768934adaa7c472cb5e92ad6d1def1260900cf66270e3f8e4dc768608e298" + sha256 arm64_sequoia: "c9ddb7666742e0543897962cf774ac3c3b2defaadc6f9ba5585ebdb2f81f88df" + sha256 arm64_sonoma: "0957cb0d7d2ed99bfd3894274b5ec570a515c04b24d9f2a3d5194dc00c7d0eed" + sha256 sonoma: "657585ae8c6b9d39eaea9e92694bc1affaaa7237fe48b1ca30d81f64664a0097" + sha256 arm64_linux: "de3160b76120d11ce1fd4d5bff94f89de5a3ff6495f6eb8c533be0ffe816a202" + sha256 x86_64_linux: "9d0a37c5e1dc351bdb84daa3ec8e5fcbac4b543ebb2281c02f71632df2c924c4" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + deprecate! date: "2027-11-11", because: :unsupported + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + + depends_on "lz4" + depends_on "openssl@3" + depends_on "readline" + depends_on "zstd" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + ENV.runtime_cpu_detection + ENV.delete "PKG_CONFIG_LIBDIR" + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + # Fix 'libintl.h' file not found for extensions + if OS.mac? + ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include}" + end + + args = std_configure_args + %W[ + --datadir=#{opt_pkgshare} + --libdir=#{opt_lib} + --includedir=#{opt_include} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-nls + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-lz4 + --with-zstd + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + --with-extra-version=\ (#{tap.user}) + ] + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args + + # Work around busted path magic in Makefile.global.in. This can't be specified + # in ./configure, but needs to be set here otherwise install prefixes containing + # the string "postgres" will get an incorrect pkglibdir. + # See https://github.com/Homebrew/homebrew-core/issues/62930#issuecomment-709411789 + system "make", "pkglibdir=#{opt_lib}/postgresql", + "pkgincludedir=#{opt_include}/postgresql", + "includedir_server=#{opt_include}/postgresql/server" + system "make", "install-world", "datadir=#{pkgshare}", + "libdir=#{lib}", + "pkglibdir=#{lib}/postgresql", + "includedir=#{include}", + "pkgincludedir=#{include}/postgresql", + "includedir_server=#{include}/postgresql/server", + "includedir_internal=#{include}/postgresql/internal" + return unless OS.linux? + + inreplace lib/"postgresql/pgxs/src/Makefile.global", + "LD = #{Superenv.shims_path}/ld", + "LD = #{HOMEBREW_PREFIX}/bin/ld" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=en_US.UTF-8", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=en_US.UTF-8 -E UTF-8 #{postgresql_datadir} + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + environment_variables LC_ALL: "en_US.UTF-8" + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", "--locale=en_US.UTF-8", "-E UTF-8", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_equal opt_pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp + assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp + assert_equal (opt_lib/"postgresql").to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp + assert_equal (opt_include/"postgresql").to_s, shell_output("#{bin}/pg_config --pkgincludedir").chomp + assert_equal (opt_include/"postgresql/server").to_s, shell_output("#{bin}/pg_config --includedir-server").chomp + assert_match "-I#{Formula["gettext"].opt_include}", shell_output("#{bin}/pg_config --cppflags") if OS.mac? + end +end diff --git a/Formula/p/postgresql@16.rb b/Formula/p/postgresql@16.rb new file mode 100644 index 0000000000000..d6857f087fc62 --- /dev/null +++ b/Formula/p/postgresql@16.rb @@ -0,0 +1,160 @@ +class PostgresqlAT16 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v16.10/postgresql-16.10.tar.bz2" + sha256 "de8485f4ce9c32e3ddfeef0b7c261eed1cecb54c9bcd170e437ff454cb292b42" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(16(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c93c1378e064107fb10770caddc13c166f6f6d183f60d88b24cf7317642e0290" + sha256 arm64_sequoia: "e17bc8c4cd757bd8812d78eab2cf2f49d31b6f384d0fea6d531611a5b7fa1799" + sha256 arm64_sonoma: "2f4f2e9b339a1f9780c32a40a587b6d751f76a32c3053a49a2e6afa3e7df41fc" + sha256 sonoma: "88f9e28831045d206ceb7bea5d5663593813d6a65fc8e5adbe11020ed40e9dfb" + sha256 arm64_linux: "25423371909a7a31baa278a56db46566d925b9aab73de981194c2a44182cbd01" + sha256 x86_64_linux: "03f395d6b473313c23fc967cbc347cbf8ac09162797002f368d5ac9ad54a7744" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + deprecate! date: "2028-11-09", because: :unsupported + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + + depends_on "lz4" + depends_on "openssl@3" + depends_on "readline" + depends_on "zstd" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + ENV.runtime_cpu_detection + ENV.delete "PKG_CONFIG_LIBDIR" + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + # Fix 'libintl.h' file not found for extensions + # Update config to fix `error: could not find function 'gss_store_cred_into' required for GSSAPI` + if OS.mac? + ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib} -L#{Formula["krb5"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include} -I#{Formula["krb5"].opt_include}" + end + + args = %W[ + --datadir=#{opt_pkgshare} + --includedir=#{opt_include} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-nls + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-lz4 + --with-zstd + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + ] + args << "--with-extra-version= (#{tap.user})" if tap + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args, *std_configure_args(libdir: opt_lib) + + # Work around busted path magic in Makefile.global.in. This can't be specified + # in ./configure, but needs to be set here otherwise install prefixes containing + # the string "postgres" will get an incorrect pkglibdir. + # See https://github.com/Homebrew/homebrew-core/issues/62930#issuecomment-709411789 + system "make", "pkglibdir=#{opt_lib}/postgresql", + "pkgincludedir=#{opt_include}/postgresql", + "includedir_server=#{opt_include}/postgresql/server" + system "make", "install-world", "datadir=#{pkgshare}", + "libdir=#{lib}", + "pkglibdir=#{lib}/postgresql", + "includedir=#{include}", + "pkgincludedir=#{include}/postgresql", + "includedir_server=#{include}/postgresql/server", + "includedir_internal=#{include}/postgresql/internal" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=en_US.UTF-8", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=en_US.UTF-8 -E UTF-8 #{postgresql_datadir} + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + environment_variables LC_ALL: "en_US.UTF-8" + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", "--locale=en_US.UTF-8", "-E UTF-8", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_equal opt_pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp + assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp + assert_equal (opt_lib/"postgresql").to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp + assert_equal (opt_include/"postgresql").to_s, shell_output("#{bin}/pg_config --pkgincludedir").chomp + assert_equal (opt_include/"postgresql/server").to_s, shell_output("#{bin}/pg_config --includedir-server").chomp + assert_match "-I#{Formula["gettext"].opt_include}", shell_output("#{bin}/pg_config --cppflags") if OS.mac? + end +end diff --git a/Formula/p/postgresql@17.rb b/Formula/p/postgresql@17.rb new file mode 100644 index 0000000000000..e507da71aa786 --- /dev/null +++ b/Formula/p/postgresql@17.rb @@ -0,0 +1,192 @@ +class PostgresqlAT17 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v17.6/postgresql-17.6.tar.bz2" + sha256 "e0630a3600aea27511715563259ec2111cd5f4353a4b040e0be827f94cd7a8b0" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(17(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "414f2c7c21e50d5b2928efa985e0db9e94dbaf893f34506ba9bf357b731cf2c3" + sha256 arm64_sequoia: "0d45910e5c1b1df8f707960b7b3854a4eef08ce9da60db91dd633ad8b24e5cc0" + sha256 arm64_sonoma: "75a39672f8b779c5d668c1e19e139f3ba7835617f41d21f7f05ea2bf8523b30a" + sha256 sonoma: "b7b92a725fca35f974d036e3c3cfb5df67d269dc6139bb6debf01bf26ed4e560" + sha256 arm64_linux: "a98397a993f02bf41f29ed25f339756df2b4f1977839e9293fa9997c74f03b4a" + sha256 x86_64_linux: "2a3ffe4158f5966926463ad03a2d0450879f673b816e45fa3dc73e107c05fd06" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + deprecate! date: "2029-11-08", because: :unsupported + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + depends_on "lz4" + depends_on "openssl@3" + depends_on "readline" + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + # Modify Makefile to link macOS binaries using Cellar path. Otherwise, binaries are linked + # using #{HOMEBREW_PREFIX}/lib path set during ./configure, which will cause audit failures + # for broken linkage as the paths are not created until post-install step. + inreplace "src/Makefile.shlib", "-install_name '$(libdir)/", "-install_name '#{lib}/postgresql/" + + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + ENV.runtime_cpu_detection + ENV.delete "PKG_CONFIG_LIBDIR" + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + # Fix 'libintl.h' file not found for extensions + # Update config to fix `error: could not find function 'gss_store_cred_into' required for GSSAPI` + if OS.mac? + ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib} -L#{Formula["krb5"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include} -I#{Formula["krb5"].opt_include}" + end + + args = %W[ + --datadir=#{HOMEBREW_PREFIX}/share/#{name} + --includedir=#{HOMEBREW_PREFIX}/include/#{name} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-nls + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-lz4 + --with-zstd + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + ] + args << "--with-extra-version= (#{tap.user})" if tap + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args, *std_configure_args(libdir: HOMEBREW_PREFIX/"lib/#{name}") + system "make" + # We use an unversioned `postgresql` subdirectory rather than `#{name}` so that the + # post-installed symlinks can use non-conflicting `#{name}` and be retained on `brew unlink`. + # Removing symlinks may break PostgreSQL as its binaries expect paths from ./configure step. + system "make", "install-world", "datadir=#{share}/postgresql", + "libdir=#{lib}/postgresql", + "includedir=#{include}/postgresql" + + # Modify the Makefile back so dependents pick up common path + makefile = lib/"postgresql/pgxs/src/Makefile.shlib" + inreplace makefile, "-install_name '#{lib}/postgresql/", "-install_name '$(libdir)/" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Manually link files from keg to non-conflicting versioned directories in HOMEBREW_PREFIX. + %w[include lib share].each do |dir| + dst_dir = HOMEBREW_PREFIX/dir/name + src_dir = prefix/dir/"postgresql" + src_dir.find do |src| + dst = dst_dir/src.relative_path_from(src_dir) + + # Retain existing real directories for extensions if directory structure matches + next if dst.directory? && !dst.symlink? && src.directory? && !src.symlink? + + rm_r(dst) if dst.exist? || dst.symlink? + if src.symlink? || src.file? + Find.prune if src.basename.to_s == ".DS_Store" + dst.parent.install_symlink src + elsif src.directory? + dst.mkpath + end + end + end + + # Also link versioned executables + bin.each_child { |f| (HOMEBREW_PREFIX/"bin").install_symlink f => "#{f.basename}-#{version.major}" } + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=en_US.UTF-8", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=en_US.UTF-8 -E UTF-8 #{postgresql_datadir} + + When uninstalling, some dead symlinks are left behind so you may want to run: + brew cleanup --prune-prefix + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + environment_variables LC_ALL: "en_US.UTF-8" + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", "--locale=en_US.UTF-8", "-E UTF-8", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + [bin/"pg_config", HOMEBREW_PREFIX/"bin/pg_config-#{version.major}"].each do |pg_config| + assert_equal "#{HOMEBREW_PREFIX}/share/#{name}", shell_output("#{pg_config} --sharedir").chomp + assert_equal "#{HOMEBREW_PREFIX}/lib/#{name}", shell_output("#{pg_config} --libdir").chomp + assert_equal "#{HOMEBREW_PREFIX}/lib/#{name}", shell_output("#{pg_config} --pkglibdir").chomp + assert_equal "#{HOMEBREW_PREFIX}/include/#{name}", shell_output("#{pg_config} --pkgincludedir").chomp + assert_equal "#{HOMEBREW_PREFIX}/include/#{name}/server", shell_output("#{pg_config} --includedir-server").chomp + assert_match "-I#{Formula["gettext"].opt_include}", shell_output("#{pg_config} --cppflags") if OS.mac? + end + end +end diff --git a/Formula/p/postgresql@18.rb b/Formula/p/postgresql@18.rb new file mode 100644 index 0000000000000..ebda91a5d6ad9 --- /dev/null +++ b/Formula/p/postgresql@18.rb @@ -0,0 +1,192 @@ +class PostgresqlAT18 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v18.0/postgresql-18.0.tar.bz2" + sha256 "0d5b903b1e5fe361bca7aa9507519933773eb34266b1357c4e7780fdee6d6078" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(18(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "da2d4fc73f261c036b8a5775c3ddae44afe408b4c04be92f63106ac1473cc500" + sha256 arm64_sequoia: "560a2a77b1e929faf4f7e8c5772472c7c80938ab7fa0cca8816c905cf6d2e263" + sha256 arm64_sonoma: "95468ac1a35c07beaff8c728b863a66d24057340e52cad052ff3a465a37a81a9" + sha256 sonoma: "bfed1ba65aca099b4f43cc5b6b544cf03c791271095707ea5a9408099e2a41f7" + sha256 arm64_linux: "3d2946a0e732125570a2b4b8b4ba8ccfdde7def666b1b12b72aa883e7224a138" + sha256 x86_64_linux: "f17c915f70487169f45aada2cea3c9753044a4ac27832c26fe22dac5193b881d" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + deprecate! date: "2030-11-14", because: :unsupported + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + # GSSAPI provided by Kerberos.framework crashes when forked. + # See https://github.com/Homebrew/homebrew-core/issues/47494. + depends_on "krb5" + depends_on "lz4" + depends_on "openssl@3" + depends_on "readline" + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "openldap" + uses_from_macos "perl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "linux-pam" + depends_on "util-linux" + end + + def install + # Modify Makefile to link macOS binaries using Cellar path. Otherwise, binaries are linked + # using #{HOMEBREW_PREFIX}/lib path set during ./configure, which will cause audit failures + # for broken linkage as the paths are not created until post-install step. + inreplace "src/Makefile.shlib", "-install_name '$(libdir)/", "-install_name '#{lib}/postgresql/" + + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + ENV.runtime_cpu_detection + ENV.delete "PKG_CONFIG_LIBDIR" + ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" + + # Fix 'libintl.h' file not found for extensions + # Update config to fix `error: could not find function 'gss_store_cred_into' required for GSSAPI` + if OS.mac? + ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib} -L#{Formula["krb5"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include} -I#{Formula["krb5"].opt_include}" + end + + args = %W[ + --datadir=#{HOMEBREW_PREFIX}/share/#{name} + --includedir=#{HOMEBREW_PREFIX}/include/#{name} + --sysconfdir=#{etc} + --docdir=#{doc} + --enable-nls + --enable-thread-safety + --with-gssapi + --with-icu + --with-ldap + --with-libxml + --with-libxslt + --with-lz4 + --with-zstd + --with-openssl + --with-pam + --with-perl + --with-uuid=e2fs + ] + args << "--with-extra-version= (#{tap.user})" if tap + args += %w[--with-bonjour --with-tcl] if OS.mac? + + # PostgreSQL by default uses xcodebuild internally to determine this, + # which does not work on CLT-only installs. + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? + + system "./configure", *args, *std_configure_args(libdir: HOMEBREW_PREFIX/"lib/#{name}") + system "make" + # We use an unversioned `postgresql` subdirectory rather than `#{name}` so that the + # post-installed symlinks can use non-conflicting `#{name}` and be retained on `brew unlink`. + # Removing symlinks may break PostgreSQL as its binaries expect paths from ./configure step. + system "make", "install-world", "datadir=#{share}/postgresql", + "libdir=#{lib}/postgresql", + "includedir=#{include}/postgresql" + + # Modify the Makefile back so dependents pick up common path + makefile = lib/"postgresql/pgxs/src/Makefile.shlib" + inreplace makefile, "-install_name '#{lib}/postgresql/", "-install_name '$(libdir)/" + end + + def post_install + (var/"log").mkpath + postgresql_datadir.mkpath + + # Manually link files from keg to non-conflicting versioned directories in HOMEBREW_PREFIX. + %w[include lib share].each do |dir| + dst_dir = HOMEBREW_PREFIX/dir/name + src_dir = prefix/dir/"postgresql" + src_dir.find do |src| + dst = dst_dir/src.relative_path_from(src_dir) + + # Retain existing real directories for extensions if directory structure matches + next if dst.directory? && !dst.symlink? && src.directory? && !src.symlink? + + rm_r(dst) if dst.exist? || dst.symlink? + if src.symlink? || src.file? + Find.prune if src.basename.to_s == ".DS_Store" + dst.parent.install_symlink src + elsif src.directory? + dst.mkpath + end + end + end + + # Also link versioned executables + bin.each_child { |f| (HOMEBREW_PREFIX/"bin").install_symlink f => "#{f.basename}-#{version.major}" } + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"initdb", "--locale=en_US.UTF-8", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? + end + + def postgresql_datadir + var/name + end + + def postgresql_log_path + var/"log/#{name}.log" + end + + def pg_version_exists? + (postgresql_datadir/"PG_VERSION").exist? + end + + def caveats + <<~EOS + This formula has created a default database cluster with: + initdb --locale=en_US.UTF-8 -E UTF-8 #{postgresql_datadir} + + When uninstalling, some dead symlinks are left behind so you may want to run: + brew cleanup --prune-prefix + EOS + end + + service do + run [opt_bin/"postgres", "-D", f.postgresql_datadir] + environment_variables LC_ALL: "en_US.UTF-8" + keep_alive true + log_path f.postgresql_log_path + error_log_path f.postgresql_log_path + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"initdb", "--locale=en_US.UTF-8", "-E UTF-8", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] + [bin/"pg_config", HOMEBREW_PREFIX/"bin/pg_config-#{version.major}"].each do |pg_config| + assert_equal "#{HOMEBREW_PREFIX}/share/#{name}", shell_output("#{pg_config} --sharedir").chomp + assert_equal "#{HOMEBREW_PREFIX}/lib/#{name}", shell_output("#{pg_config} --libdir").chomp + assert_equal "#{HOMEBREW_PREFIX}/lib/#{name}", shell_output("#{pg_config} --pkglibdir").chomp + assert_equal "#{HOMEBREW_PREFIX}/include/#{name}", shell_output("#{pg_config} --pkgincludedir").chomp + assert_equal "#{HOMEBREW_PREFIX}/include/#{name}/server", shell_output("#{pg_config} --includedir-server").chomp + assert_match "-I#{Formula["gettext"].opt_include}", shell_output("#{pg_config} --cppflags") if OS.mac? + end + end +end diff --git a/Formula/p/postgrest.rb b/Formula/p/postgrest.rb new file mode 100644 index 0000000000000..7451f2e310028 --- /dev/null +++ b/Formula/p/postgrest.rb @@ -0,0 +1,41 @@ +class Postgrest < Formula + desc "Serves a fully RESTful API from any existing PostgreSQL database" + homepage "https://github.com/PostgREST/postgrest" + url "https://github.com/PostgREST/postgrest/archive/refs/tags/v14.0.tar.gz" + sha256 "133a75bb978f2bd41f24cd80d2fa42165f1166bad90260ec8b1188b9d2d948db" + license "MIT" + head "https://github.com/PostgREST/postgrest.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "50cb13ac153d5b4af1313f111aa7ed2142e594a13fd7df02a76ccc11a9d8537f" + sha256 cellar: :any, arm64_sequoia: "7968e91a1c44bd3a3ee644e997a8f362f3ec7b07cf42899defdec3cb0634c83b" + sha256 cellar: :any, arm64_sonoma: "7342540cf0f0935200feed7f320590a86905c5624f0b48ac5d450eb95502e27b" + sha256 cellar: :any, sonoma: "3bc80f801836514cc64a84269a8cf4cac48b5cf2b722bff97b09f68dc313a051" + sha256 cellar: :any_skip_relocation, arm64_linux: "68071f10b689caf583af267634fff03e93cbdbe423ba0fbc9d320af21f6661a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae22c943d8b05c4ef78847d7371483cabdcd68360ca7f4ef5fce99cae63f0867" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.8" => :build # GHC 9.10 blocked by deps, e.g. https://github.com/protolude/protolude/issues/149 + depends_on "libpq" + + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", "--ignore-project", *std_cabal_v2_args + end + + test do + output = shell_output("#{bin}/postgrest --dump-config 2>&1") + assert_match "db-anon-role", output + assert_match "Failed to query database settings for the config parameters", output + + assert_match version.to_s, shell_output("#{bin}/postgrest --version") + end +end diff --git a/Formula/p/posting.rb b/Formula/p/posting.rb new file mode 100644 index 0000000000000..27e3823c2a740 --- /dev/null +++ b/Formula/p/posting.rb @@ -0,0 +1,299 @@ +class Posting < Formula + include Language::Python::Virtualenv + + desc "Modern API client that lives in your terminal" + homepage "https://github.com/darrenburns/posting" + url "https://files.pythonhosted.org/packages/b0/a6/9e0558c58d151a8db169ab6d6bd76aac6749e9acbc89d8a1c0f9aa9a81a9/posting-2.9.2.tar.gz" + sha256 "e97015308e80e07064f5f8ef90c6819c5a0ffeb6cbce094e55dd5a9f86e382b8" + license "Apache-2.0" + + no_autobump! because: "contains non-PyPI resources" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "381eaf060278a6cc497e1e17a70741829ac0173c28479c03233c488f73a587b9" + sha256 cellar: :any, arm64_sequoia: "0fc93cf601756b1089ab170e5f5ad8b20e739fa1c368d3d0ca8b3261f91d1194" + sha256 cellar: :any, arm64_sonoma: "55ff1db4dc71a5cc318c44593c79d5f2e7ea08a1579b92164c86526f2e215258" + sha256 cellar: :any, sonoma: "cf652f0eebb7b422abd0fb1531fbf7f6d4e3cb04601eca5eb5c43a83548028a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d5477266fb7ec5e30e02c7c38ec55dd6adff228c2d172ae28dc019455fe4d1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13fc29a93708315f4acf513cd6fdaf81e1e0556cde25654be15a22f159787f5e" + end + + depends_on "cmake" => :build + depends_on "rust" => :build # for watchfiles + + depends_on "brotli" + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "tree-sitter" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "brotli" do + url "https://files.pythonhosted.org/packages/2f/c2/f9e977608bdf958650638c3f1e28f85a1b075f075ebbe77db8555463787b/Brotli-1.1.0.tar.gz" + sha256 "81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "openapi-pydantic" do + url "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz" + sha256 "ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/da/44/4b524b2f06e0fa6c4ede56a4e9af5edd5f3f83cf2eea5cb4fd0ce5bbe063/textual-6.1.0.tar.gz" + sha256 "cc89826ca2146c645563259320ca4ddc75d183c77afb7d58acdd46849df9144d" + end + + resource "textual-autocomplete" do + url "https://files.pythonhosted.org/packages/1e/3a/80411bc7b94969eb116ad1b18db90f8dce8a1de441278c4a81fee55a27ca/textual_autocomplete-4.0.6.tar.gz" + sha256 "2ba2f0d767be4480ecacb3e4b130cf07340e033c3500fc424fed9125d27a4586" + end + + resource "tree-sitter" do + url "https://files.pythonhosted.org/packages/66/7c/0350cfc47faadc0d3cf7d8237a4e34032b3014ddf4a12ded9933e1648b55/tree-sitter-0.25.2.tar.gz" + sha256 "fe43c158555da46723b28b52e058ad444195afd1db3ca7720c59a254544e9c20" + end + + resource "tree-sitter-bash" do + url "https://github.com/tree-sitter/tree-sitter-bash/archive/refs/tags/v0.25.0.tar.gz" + sha256 "9d6bad618e712b51ff060515b0ce6872e33727148f35becb8aa3ad80044c2348" + end + + resource "tree-sitter-css" do + url "https://github.com/tree-sitter/tree-sitter-css/archive/refs/tags/v0.25.0.tar.gz" + sha256 "03965344d8c0435dc54fb45b281578420bb7db8b99df4d34e7e74105a274cb79" + end + + resource "tree-sitter-go" do + url "https://github.com/tree-sitter/tree-sitter-go/archive/refs/tags/v0.25.0.tar.gz" + sha256 "2dc241b97872c53195e01b86542b411a3c1a6201d9c946c78d5c60c063bba1ef" + end + + resource "tree-sitter-html" do + url "https://github.com/tree-sitter/tree-sitter-html/archive/refs/tags/v0.23.2.tar.gz" + sha256 "21fa4f2d4dcb890ef12d09f4979a0007814f67f1c7294a9b17b0108a09e45ef7" + end + + resource "tree-sitter-java" do + url "https://github.com/tree-sitter/tree-sitter-java/archive/refs/tags/v0.23.5.tar.gz" + sha256 "cb199e0faae4b2c08425f88cbb51c1a9319612e7b96315a174a624db9bf3d9f0" + end + + resource "tree-sitter-javascript" do + url "https://github.com/tree-sitter/tree-sitter-javascript/archive/refs/tags/v0.25.0.tar.gz" + sha256 "9712fc283d3dc01d996d20b6392143445d05867a7aad76fdd723824468428b86" + end + + resource "tree-sitter-json" do + url "https://github.com/tree-sitter/tree-sitter-json/archive/refs/tags/v0.24.8.tar.gz" + sha256 "acf6e8362457e819ed8b613f2ad9a0e1b621a77556c296f3abea58f7880a9213" + end + + resource "tree-sitter-markdown" do + url "https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v0.5.1.tar.gz" + sha256 "acaffe5a54b4890f1a082ad6b309b600b792e93fc6ee2903d022257d5b15e216" + end + + resource "tree-sitter-python" do + url "https://github.com/tree-sitter/tree-sitter-python/archive/refs/tags/v0.25.0.tar.gz" + sha256 "4609a3665a620e117acf795ff01b9e965880f81745f287a16336f4ca86cf270c" + end + + resource "tree-sitter-regex" do + url "https://github.com/tree-sitter/tree-sitter-regex/archive/refs/tags/v0.25.0.tar.gz" + sha256 "853200795c4cf856eba9de3f4f9abb370d22aef4fb32e8911e210bb7e4253087" + end + + resource "tree-sitter-rust" do + url "https://github.com/tree-sitter/tree-sitter-rust/archive/refs/tags/v0.24.0.tar.gz" + sha256 "79c9eb05af4ebcce8c40760fc65405e0255e2d562702314b813a5dec1273b9a2" + end + + resource "tree-sitter-sql" do + url "https://github.com/DerekStride/tree-sitter-sql/releases/download/v0.3.11/tree-sitter-sql-v0.3.11.tar.gz" + sha256 "a97a324eae9c81ed68f6e162b9b33f8911fc6442caa2950e57c498e2460d1387" + end + + resource "tree-sitter-toml" do + url "https://github.com/tree-sitter-grammars/tree-sitter-toml/archive/refs/tags/v0.7.0.tar.gz" + sha256 "7d52a7d4884f307aabc872867c69084d94456d8afcdc63b0a73031a8b29036dc" + end + + resource "tree-sitter-xml" do + url "https://github.com/tree-sitter-grammars/tree-sitter-xml/archive/refs/tags/v0.7.0.tar.gz" + sha256 "4330a6b3685c2f66d108e1df0448eb40c468518c3a66f2c1607a924c262a3eb9" + end + + resource "tree-sitter-yaml" do + url "https://github.com/tree-sitter-grammars/tree-sitter-yaml/archive/refs/tags/v0.7.2.tar.gz" + sha256 "aeaff5731bb8b66c7054c8aed33cd5edea5f4cd2ac71654f3f6c2ba2073d8fac" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz" + sha256 "a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2" + end + + resource "xdg-base-dirs" do + url "https://files.pythonhosted.org/packages/bf/d0/bbe05a15347538aaf9fa5b51ac3b97075dfb834931fcb77d81fbdb69e8f6/xdg_base_dirs-6.0.2.tar.gz" + sha256 "950504e14d27cf3c9cb37744680a43bf0ac42efefc4ef4acf98dc736cab2bced" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"posting", shell_parameter_format: :click) + end + + test do + # From the OpenAPI Spec website + # https://web.archive.org/web/20230505222426/https://swagger.io/docs/specification/basic-structure/ + (testpath/"minimal.yaml").write <<~YAML + --- + openapi: 3.1.1 + info: + version: "0.0.0" + title: Sample API + servers: + - url: http://api.example.com/v1 + description: Optional server description, e.g. Main (production) server + - url: http://staging-api.example.com + description: Optional server description, e.g. Internal staging server for testing + paths: + /users: + get: + summary: Returns a list of users. + responses: + '200': + description: A JSON array of user names + content: + application/json: + schema: + type: array + items: + type: string + components: {} + YAML + + output = shell_output("#{bin}/posting import minimal.yaml") + assert_match "Importing OpenAPI spec from 'minimal.yaml'", output + assert_path_exists testpath/"api_example_com_v1.env" + end +end diff --git a/Formula/p/potrace.rb b/Formula/p/potrace.rb new file mode 100644 index 0000000000000..b20810e4f015e --- /dev/null +++ b/Formula/p/potrace.rb @@ -0,0 +1,51 @@ +class Potrace < Formula + desc "Convert bitmaps to vector graphics" + homepage "https://potrace.sourceforge.net/" + url "https://potrace.sourceforge.net/download/1.16/potrace-1.16.tar.gz" + sha256 "be8248a17dedd6ccbaab2fcc45835bb0502d062e40fbded3bc56028ce5eb7acc" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?potrace[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a89d78a0b5fc305c6f8bf0067c3c87069b515578066c8ec151b42cf6828d392" + sha256 cellar: :any, arm64_sequoia: "dec55e697af533180d68158fd557f596e65887a1e5043214dc0532464aa6ef27" + sha256 cellar: :any, arm64_sonoma: "003f7041bd6b4ea6de5ac2c8fbe9e2537a6a6dbd169f0c872627c5e2daa00afa" + sha256 cellar: :any, arm64_ventura: "a7201a2a7bc8af588056ef0319281dab31dd376af60a379430edc495eea29041" + sha256 cellar: :any, arm64_monterey: "cc774c2a6d82a036c9ccf80ed467aabbf39697e8a36ef210cb5b793fb4b6be05" + sha256 cellar: :any, arm64_big_sur: "80d3d0256f9b7add7d3835f6c84f30afec6a4893f2fcd2aa44b07ebe95876c7f" + sha256 cellar: :any, sonoma: "84bb1788a245f7bbd5c2bb8adb2f4693c5ff4ca7a97dda75235be2d5a590106c" + sha256 cellar: :any, ventura: "a79629c4ae550b6894ce39a3afd6ed75063c885155bf44365feaa551c346e2ca" + sha256 cellar: :any, monterey: "2e65796f5e50c82a6b11475034b04f6a0647f044c5c81a819bb6b3e8f0d5e6cc" + sha256 cellar: :any, big_sur: "3b5294deed86179a4e496236fb882eb0b7ad3c020741e2a1398861b545062712" + sha256 cellar: :any, catalina: "c3f357a8bd6460384400acd00dab0d8571ad0b1543a81e5b9d5ff49d1ece4fa1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1226c34ff1e1baf0622e69e59d69bf515aa1d6a8a6381b7c82349c4d578447d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d47c98611b15465f29e55972018135927d42929e5901153ad99c6579de32863c" + end + + uses_from_macos "zlib" + + resource "head.pbm" do + url "https://potrace.sourceforge.net/img/head.pbm" + sha256 "3c8dd6643b43cf006b30a7a5ee9604efab82faa40ac7fbf31d8b907b8814814f" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-libpotrace" + system "make", "install" + end + + test do + resource("head.pbm").stage testpath + system bin/"potrace", "-o", "test.eps", "head.pbm" + assert_path_exists testpath/"test.eps" + end +end diff --git a/Formula/p/poutine.rb b/Formula/p/poutine.rb new file mode 100644 index 0000000000000..bcbb4a992152c --- /dev/null +++ b/Formula/p/poutine.rb @@ -0,0 +1,64 @@ +class Poutine < Formula + desc "Security scanner that detects vulnerabilities in build pipelines" + homepage "https://boostsecurityio.github.io/poutine/" + url "https://github.com/boostsecurityio/poutine/archive/refs/tags/v1.0.4.tar.gz" + sha256 "91fd5c703e27385809fc40deb49af3b3de2feda47bf1f75fb6c1065602a880a8" + license "Apache-2.0" + head "https://github.com/boostsecurityio/poutine.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0afa5f904991ba614cf1db698ce0c04183c6344a7c3ce11c4b8b8314f9ba10cf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f8374f4d3d0d5959c8517717d27258eef38cc94c85eff7442893ff6818fb0a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91d35839002da6d0a56c792bc9ea5e52f4b1eaba6ed745778403e4dcefeabcac" + sha256 cellar: :any_skip_relocation, sonoma: "9dc49d0cc8d30e052e274a1256eb5290fc86075cfec2ee2404ffb67178e0797d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2a0eeb8d9a18a3c114cb36aa373bb31f469cc4bf80cd514710c56ae9c708fef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48c55c8e40e28044455775e8dc4ac9a3207dd2a11ea791483a3a0e8548fafc18" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"poutine", "completion") + end + + test do + mkdir testpath/".poutine" + (testpath/".poutine.yml").write <<~YAML + include: + - path: .poutine + ignoreForks: true + YAML + + assert_match version.to_s, shell_output("#{bin}/poutine version") + + # Creating local Git repo with vulnerable test file that the scanner can detect + # This makes no outbound network call and does not read or write outside the of the temp directory + (testpath/"repo/.github/workflows/").mkpath + system "git", "-C", testpath/"repo", "init" + system "git", "-C", testpath/"repo", "remote", "add", "origin", "git@github.com:actions/whatever.git" + (testpath/"repo/.github/workflows/build.yml").write <<~YAML + on: + pull_request_target: + jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + - run: make test + YAML + system "git", "-C", testpath/"repo", "add", ".github/workflows/build.yml" + system "git", "-C", testpath/"repo", "commit", "-m", "message" + assert_match "Detected usage of `make`", shell_output("#{bin}/poutine analyze_local #{testpath}/repo") + end +end diff --git a/Formula/p/povray.rb b/Formula/p/povray.rb new file mode 100644 index 0000000000000..03e72b7881fe1 --- /dev/null +++ b/Formula/p/povray.rb @@ -0,0 +1,113 @@ +class Povray < Formula + desc "Persistence Of Vision RAYtracer (POVRAY)" + homepage "https://www.povray.org/" + license "AGPL-3.0-or-later" + revision 14 + + stable do + url "https://github.com/POV-Ray/povray/archive/refs/tags/v3.7.0.10.tar.gz" + sha256 "7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff" + + depends_on "boost" + + on_sequoia :or_newer do + # Apply FreeBSD patches for libc++ >= 19 needed in Xcode 16.3 + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/6133473e4227abbfcf023bea6ab5eeed9c17e55b/graphics/povray37/files/patch-vfe_vfe.cpp" + sha256 "81e6ad64dadce1581cbab3be9774d5a5c22307e8738ee1452eb7e4d3e5a7e234" + end + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/6133473e4227abbfcf023bea6ab5eeed9c17e55b/graphics/povray37/files/patch-vfe_vfeconf.h" + sha256 "8e2246c5ded770b0fe835ae062aca44e98fc220314e39ba6c068ed7f270b71b2" + end + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+\.\d{1,4})$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "17590093744d2c86dda3f3d87a39db0db202a5947e3c8d73ba3b9a5a9703578a" + sha256 arm64_sequoia: "ad0601b4708711e74b3e8b5b3a749a1868b645742d14302f6bfad7ef0d5d93fa" + sha256 arm64_sonoma: "11f41dfc4f8920a4f13eb9cdd5f3b3b6f700b68ae721b9ab106052f2c64efe08" + sha256 sonoma: "1132092cc0b5439e291b32c098276dba1deb33a44c09794a6be847259e14ad33" + sha256 arm64_linux: "7c8f60ac259482b77f07ff435848294c41242d4d88180aa087003f1abe939642" + sha256 x86_64_linux: "bad283a82fc7128d95e1cda1efc7010dbf97b9a1c82ab30c8635a2d3e963b19e" + end + + head do + url "https://github.com/POV-Ray/povray.git", branch: "master" + depends_on "boost" => :build + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "imath" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openexr" + + uses_from_macos "zlib" + + def install + ENV.cxx11 + # See https://github.com/freebsd/freebsd-ports/commit/6133473e4227abbfcf023bea6ab5eeed9c17e55b + if build.stable? && OS.mac? && MacOS.version >= :sequoia + ENV.append "CPPFLAGS", "-DPOVMSUCS2=char16_t -DUCS2=char16_t -DUCS4=char32_t" + end + + # Workaround for Xcode 16.3+, issue ref: https://github.com/POV-Ray/povray/issues/479 + inreplace "source/#{build.stable? ? "backend" : "core"}/shape/truetype.cpp", + "#if !defined(TARGET_OS_MAC)", + "#if !defined(__MACTYPES__)" + + # Remove bundled libraries + rm_r("libraries") + + # Disable optimizations similar to Debian/Fedora. This mainly removes `-ffast-math` + # as `povray` has open bugs like https://github.com/POV-Ray/povray/issues/460. + # Other optimizations like `-O3` and `-march=native` were always removed by brew. + args = %W[ + COMPILED_BY=#{tap&.user || "Homebrew"} + --disable-optimiz + --mandir=#{man} + --with-boost=#{Formula["boost"].opt_prefix} + --with-openexr=#{Formula["openexr"].opt_prefix} + --without-libsdl + --without-x + ] + + # Adjust some scripts to search for `etc` in HOMEBREW_PREFIX. + %w[allanim allscene portfolio].each do |script| + inreplace "unix/scripts/#{script}.sh", /^DEFAULT_DIR=.*$/, "DEFAULT_DIR=#{HOMEBREW_PREFIX}" + end + + cd "unix" do + system "./prebuild.sh" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # Render variants of the famous Utah teapot as a quick smoke test + sampledir = share/"povray-#{version.major_minor}" + scenes = sampledir.glob("scenes/advanced/teapot/*.pov") + refute_empty scenes, "Failed to find test scenes." + + # Also render a sample without viewing angle set + scenes << (sampledir/"scenes/advanced/chess2.pov") + + scenes.each do |scene| + system sampledir/"scripts/render_scene.sh", ".", scene + end + end +end diff --git a/Formula/p/powerlevel10k.rb b/Formula/p/powerlevel10k.rb new file mode 100644 index 0000000000000..5e715229822a7 --- /dev/null +++ b/Formula/p/powerlevel10k.rb @@ -0,0 +1,45 @@ +class Powerlevel10k < Formula + desc "Theme for zsh" + homepage "https://github.com/romkatv/powerlevel10k" + url "https://github.com/romkatv/powerlevel10k/archive/refs/tags/v1.20.0.tar.gz" + sha256 "d8187d44b697b3a37a8c4896678b4380e717cbf2850179529358348780a2d3d7" + license "MIT" + head "https://github.com/romkatv/powerlevel10k.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "041441647fed3026648bee86884891b68238016a5c84f416c80a2332582460f8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b5a4692b2768f76c867ae5815e2e8b3d05f08053302c69d0b5f7137cefd1fc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53d306e0deb9f0ec13c023b1d1b4def2fb96e7280f33a967fa5b0ce1637c47fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "53d306e0deb9f0ec13c023b1d1b4def2fb96e7280f33a967fa5b0ce1637c47fa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c7c1892abfa0b69d3f198c51bcec09e83591dbbbc22ce51f337b065c6bc2e370" + sha256 cellar: :any_skip_relocation, sonoma: "df58ced2ccb576d8da9b0f3e5d6986c22414365354872cd2c9e620f2a8ce65e4" + sha256 cellar: :any_skip_relocation, ventura: "df58ced2ccb576d8da9b0f3e5d6986c22414365354872cd2c9e620f2a8ce65e4" + sha256 cellar: :any_skip_relocation, monterey: "bef10fff91d174c71544f0a1b0d0a1790131fe959cdd1bd4e9d1bcea682f1767" + sha256 cellar: :any_skip_relocation, arm64_linux: "e94d2b66f4c17f3060ab6440a604401aff259c965b8100e0442419a6448041e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20bde83ee0e3a59d86aaca90273b6a88819264d47892cb23c66b47ab5230c22a" + end + + uses_from_macos "zsh" => :test + + def install + system "make", "pkg" + pkgshare.install Dir["*"] + end + + def caveats + <<~EOS + To activate this theme, add the following at the end of your .zshrc: + + source #{HOMEBREW_PREFIX}/share/powerlevel10k/powerlevel10k.zsh-theme + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + output = shell_output("zsh -fic '. #{pkgshare}/powerlevel10k.zsh-theme && (( ${+P9K_SSH} )) && echo SUCCESS'") + assert_match "SUCCESS", output + end +end diff --git a/Formula/p/powerline-go.rb b/Formula/p/powerline-go.rb new file mode 100644 index 0000000000000..b8a9c58c2088a --- /dev/null +++ b/Formula/p/powerline-go.rb @@ -0,0 +1,28 @@ +class PowerlineGo < Formula + desc "Beautiful and useful low-latency prompt for your shell" + homepage "https://github.com/justjanne/powerline-go" + url "https://github.com/justjanne/powerline-go/archive/refs/tags/v1.25.tar.gz" + sha256 "64cb194bbf08536320d0f4c24ef9524fdf486f579147cacdb0b6dc0afc1134e2" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5915cb9fd5390ee5cba9caf9f991b03c837756af3c24a292b202ffe7ad1f9c10" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7016b0b4b949f29f28f6184c6954c072196c5d97a35fdf113b23be20ee8546e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7f698ff3ffaef1601e4ba82581ebb94d28cf9cb7a5bbc4e3c1034ad0e8da13f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe228337f5d9019509b79924ec03bf73e8c567d35801ba004d203855ebf0ec99" + sha256 cellar: :any_skip_relocation, sonoma: "e42db1091864a2e65757b17b5ff2777912b98b43de30f9b3c9add5b60885dfbe" + sha256 cellar: :any_skip_relocation, ventura: "91422811ec55ebdb10ac1763fcb75da19723767491b5fa5988b4e7e2d5c085e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "07c6b48da3ddc88e3ff65484755edaa3d5951ebbbf5ff07eb48f7c17ad43dc24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18782f87199e7dbcc1470c2c13a6bd0d79bcf0dca59d60f75816c77a9479ac97" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"powerline-go" + end +end diff --git a/Formula/p/powerman-dockerize.rb b/Formula/p/powerman-dockerize.rb new file mode 100644 index 0000000000000..2fba393cb44b3 --- /dev/null +++ b/Formula/p/powerman-dockerize.rb @@ -0,0 +1,31 @@ +class PowermanDockerize < Formula + desc "Utility to simplify running applications in docker containers" + homepage "https://github.com/powerman/dockerize" + url "https://github.com/powerman/dockerize.git", + tag: "v0.24.0", + revision: "98df0a9e614d389b06622bb66b44481011fc16c5" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fa4531120658b5d83e82f63c80be0e774e8057f8c984369625e536ae2f582b42" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4f03c8b8543e474af29da228cea9608fc3e0126ef4ecf14042f423be17c73be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4f03c8b8543e474af29da228cea9608fc3e0126ef4ecf14042f423be17c73be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4f03c8b8543e474af29da228cea9608fc3e0126ef4ecf14042f423be17c73be" + sha256 cellar: :any_skip_relocation, sonoma: "7a8423454af9a78459fc06ec92374092403780afa12d59ac277551c8038cd140" + sha256 cellar: :any_skip_relocation, ventura: "7a8423454af9a78459fc06ec92374092403780afa12d59ac277551c8038cd140" + sha256 cellar: :any_skip_relocation, arm64_linux: "021e00cfb5fb36a6b7a81850abd8cc9fbb9276f16238f5b5f3b6531db5d2b872" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34b68e1e44ae7024f51d75786c99ff2822c73cf59cc54f285bb8e151b3b7451f" + end + + depends_on "go" => :build + conflicts_with "dockerize", because: "powerman-dockerize and dockerize install conflicting executables" + + def install + system "go", "build", *std_go_args(output: bin/"dockerize", ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/dockerize --version") + system bin/"dockerize", "-wait", "https://www.google.com/", "-wait-retry-interval=1s", "-timeout", "5s" + end +end diff --git a/Formula/p/powerman.rb b/Formula/p/powerman.rb new file mode 100644 index 0000000000000..62b87287b9d2d --- /dev/null +++ b/Formula/p/powerman.rb @@ -0,0 +1,51 @@ +class Powerman < Formula + desc "Control (remotely and in parallel) switched power distribution units" + homepage "https://github.com/chaos/powerman" + url "https://github.com/chaos/powerman/releases/download/v2.4.4/powerman-2.4.4.tar.gz" + sha256 "d675502144bc0875def92dad4c0efc6d43bc81c78d6fdb09ebc5f3558b3b7c85" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "2a025f4f16f450afaa40d3189d3f2725afd466850251d60bbe5db4aa0f2bcdbb" + sha256 arm64_sequoia: "54a0c75c35b58a6eb25dc9f56b019643b33fbfcc3b71f6d1316f2eb32447eb11" + sha256 arm64_sonoma: "6274589c50d20da83fdc311f6810716088ecdeab30dd079faffd7622694ae8ae" + sha256 arm64_ventura: "bed3bba37a720c974c0752e1026bafabf8c6c647b6cb344a372d3354429a15ee" + sha256 arm64_monterey: "e218e0db90cd2e380ebfd077218c11dd0431006677e34a30fd253b73a3bdffaa" + sha256 sonoma: "86b2910601c00324092ad76240a00179fc9f957131804f621bd06f54af35d826" + sha256 ventura: "0e043048d342891a2062efc4a573b0d434276eb59401881cb30a90528ebcecbb" + sha256 monterey: "2df1fa862eaa9e2fa6c9af732f77430919cc6664db0a9a1e170029830cc3ea37" + sha256 arm64_linux: "20f73051a9c1de9c28dec2bd869631da3397d4cafe88f391b14a7aeb6093c6b4" + sha256 x86_64_linux: "995393b52583123c1791404fca6de037205ea8b8ae14817c817328a6eb3e7b96" + end + + head do + url "https://github.com/chaos/powerman.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "curl" + depends_on "jansson" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--localstatedir=#{var}", + "--with-httppower", + "--with-ncurses", + "--without-genders", + "--without-snmppower", + "--without-tcp-wrappers" + system "make", "install" + end + + test do + system "#{sbin}/powermand", "-h" + end +end diff --git a/Formula/p/ppl.rb b/Formula/p/ppl.rb new file mode 100644 index 0000000000000..193a349b3abbd --- /dev/null +++ b/Formula/p/ppl.rb @@ -0,0 +1,103 @@ +class Ppl < Formula + desc "Parma Polyhedra Library: numerical abstractions for analysis, verification" + homepage "https://www.bugseng.com/ppl" + url "https://deb.debian.org/debian/pool/main/p/ppl/ppl_1.2.orig.tar.xz" + sha256 "691f0d5a4fb0e206f4e132fc9132c71d6e33cdda168470d40ac3cf62340e9a60" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url "https://deb.debian.org/debian/pool/main/p/ppl/" + regex(/href=.*?ppl[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "aea93f11cba2f9c6d6d64225405165be26d8ae84d9f668cdfd5f479a5a53e169" + sha256 arm64_sequoia: "527d1a14323856ce82d73c94a18da7b53363c5f9064de4f70dda5a5aa1c84ee6" + sha256 arm64_sonoma: "72645288d73cc251a6310649cbd8782c07438ce56d1a66fe190ceea5e7a10782" + sha256 arm64_ventura: "7b34ee3fa741ad47e0ec32a5fac0dffddea220097ea7938618586d1b1016f9ba" + sha256 arm64_monterey: "3b7d7b75d9c40347d165192e5189725d94129dc5f95d848cc86251f493ccef91" + sha256 arm64_big_sur: "f607e5d5ebefa0cb480bc84b1ba6e4eb1f2f07e7d7a00ae1f4c71958b5c82323" + sha256 sonoma: "a67e256076ad9de40aa134fe1ea3ae194fc1ef12454f0e637d74c4a037037722" + sha256 ventura: "c37e9a48bbaa4eee1c8c25b3e04cb6886da8bc19f684316dd93c7c121ba262c1" + sha256 monterey: "f75956df3abc16149ff87a0df7347973863331d8cadad40fef8dc3b760bfd6cf" + sha256 big_sur: "ceae5dd7024558587efdf935a870154a38e0cbf7e4882ba507cb3cebf574bed3" + sha256 catalina: "65aa31c0201a860d32e874ab34cbdea7132101fc6461510e06641a11ca762e82" + sha256 arm64_linux: "cae59d336bc919b7924cf6507ed0fef355e1a9ecc9770f06cc34cd05741d96df" + sha256 x86_64_linux: "09999d2760a2d719f28918c3040eadeceffd32112eee8e5f28f5b93db80d4d9d" + end + + depends_on "gmp" + + on_linux do + depends_on "m4" => :build + end + + # Fix build failure with clang 5+. + # https://www.cs.unipr.it/mantis/view.php?id=2128 + # http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=c39f6a07b51f89e365b05ba4147aa2aa448febd7 + # since 401 error on the `www.cs.unipr.it` links adopt the patch from macports + # patch reference, https://github.com/macports/macports-ports/commit/e5de9cc65a8e91fcbb9a3d90911569169f0ccf88 + patch :DATA + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--with-gmp=#{Formula["gmp"].opt_prefix}", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #ifndef PPL_VERSION_MAJOR + #error "No PPL header" + #endif + int main() { + ppl_initialize(); + return ppl_finalize(); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lppl_c", "-lppl", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/src/Determinate_inlines.hh b/src/Determinate_inlines.hh +index c918b23..de672a0 100644 +--- a/src/Determinate_inlines.hh ++++ b/src/Determinate_inlines.hh +@@ -289,8 +289,8 @@ operator()(Determinate& x, const Determinate& y) const { + + template + template +-inline +-Determinate::Binary_Operator_Assign_Lifter ++inline typename ++Determinate::template Binary_Operator_Assign_Lifter + Determinate::lift_op_assign(Binary_Operator_Assign op_assign) { + return Binary_Operator_Assign_Lifter(op_assign); + } +diff --git a/src/OR_Matrix_inlines.hh b/src/OR_Matrix_inlines.hh +index a5f2856..560f8d6 100644 +--- a/src/OR_Matrix_inlines.hh ++++ b/src/OR_Matrix_inlines.hh +@@ -97,7 +97,7 @@ OR_Matrix::Pseudo_Row::Pseudo_Row(const Pseudo_Row& y) + + template + template +-inline OR_Matrix::Pseudo_Row& ++inline typename OR_Matrix::template Pseudo_Row& + OR_Matrix::Pseudo_Row::operator=(const Pseudo_Row& y) { + first = y.first; + #if PPL_OR_MATRIX_EXTRA_DEBUG diff --git a/Formula/p/ppss.rb b/Formula/p/ppss.rb new file mode 100644 index 0000000000000..53039b7ea3437 --- /dev/null +++ b/Formula/p/ppss.rb @@ -0,0 +1,22 @@ +class Ppss < Formula + desc "Shell script to execute commands in parallel" + homepage "https://github.com/louwrentius/PPSS" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ppss/ppss-2.97.tgz" + sha256 "25d819a97d8ca04a27907be4bfcc3151712837ea12a671f1a3c9e58bc025360f" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e341e42c45d8ab9d5251b5330405329c45f1342a2cd94a466764b894a2b9ac6c" + end + + def install + bin.install "ppss" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ppss --version") + end +end diff --git a/Formula/p/ppsspp.rb b/Formula/p/ppsspp.rb new file mode 100644 index 0000000000000..915d5b06f302b --- /dev/null +++ b/Formula/p/ppsspp.rb @@ -0,0 +1,194 @@ +class Ppsspp < Formula + desc "PlayStation Portable emulator" + homepage "https://ppsspp.org/" + license all_of: ["GPL-2.0-or-later", "BSD-3-Clause"] + revision 4 + head "https://github.com/hrydgard/ppsspp.git", branch: "master" + + # TODO: Can remove CMAKE_POLICY_VERSION_MINIMUM when bumping version to 1.18+ + # https://github.com/hrydgard/ppsspp/commit/fe91f246b2d22a25fcd52deb57211f1e86717c35 + stable do + url "https://github.com/hrydgard/ppsspp/releases/download/v1.17.1/ppsspp-1.17.1.tar.xz" + sha256 "23e0b8649cc8124b0c22a62d4d41b592b6bd4064bce8c09b0d4abce895e132ae" + + # miniupnpc 2.2.8 compatibility patch + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a66702cd0e81bd04a626ebc871b728043ea4bda90d198b1212c06c40e14a0a16" + sha256 cellar: :any, arm64_sequoia: "8f5212b45e4cc85e00696a97c7b2f19faf46eaff672261ffe4a9a1600f88918b" + sha256 cellar: :any, arm64_sonoma: "15ea4f6454395652c4bc38f9162265f037c73f6adedc72ee24e1d6d8152da938" + sha256 cellar: :any, arm64_ventura: "cb233294259787c8052cbb7bf288ae9f96cfb2409349471c62345a77daf05e2b" + sha256 cellar: :any, sonoma: "0251f2c42361a1a554ad9525992f22009291e6a540a0f5a656d59fd837884817" + sha256 cellar: :any, ventura: "1343d50d74938e6f46ff7b8a478af9437f1195952877c9d964af6b6c71d5fd56" + sha256 arm64_linux: "713d5f95e87d12e957e1c1fe542bc7db12d962164d1c736c711c3eec85319ec3" + sha256 x86_64_linux: "db4ce3ac375ce1f4e6bf06a3453c8cf5b118a2080e7614b244db39da56a0f367" + end + + depends_on "cmake" => :build + depends_on "nasm" => :build + depends_on "pkgconf" => :build + + depends_on "libzip" + depends_on "miniupnpc" + depends_on "sdl2" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + on_macos do + depends_on "molten-vk" + end + + on_linux do + depends_on "glew" + depends_on "mesa" + end + + on_intel do + # ARM uses a bundled, unreleased libpng. + # Make unconditional when we have libpng 1.7. + depends_on "libpng" + end + + def install + # Build PPSSPP-bundled ffmpeg from source. Changes in more recent + # versions in ffmpeg make it unsuitable for use with PPSSPP, so + # upstream ships a modified version of ffmpeg 3. + # See https://github.com/Homebrew/homebrew-core/issues/84737. + cd "ffmpeg" do + if OS.mac? + rm_r("macosx") + system "./mac-build.sh" + else + rm_r("linux") + arch = Hardware::CPU.intel? ? "x86-64" : Hardware::CPU.arch + system "./linux_#{arch}.sh" + end + end + + # Replace bundled MoltenVK dylib with symlink to Homebrew-managed dylib + vulkan_frameworks = buildpath/"ext/vulkan/macOS/Frameworks" + vulkan_frameworks.install_symlink Formula["molten-vk"].opt_lib/"libMoltenVK.dylib" + + args = %w[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DUSE_SYSTEM_LIBZIP=ON + -DUSE_SYSTEM_SNAPPY=ON + -DUSE_SYSTEM_LIBSDL2=ON + -DUSE_SYSTEM_LIBPNG=ON + -DUSE_SYSTEM_ZSTD=ON + -DUSE_SYSTEM_MINIUPNPC=ON + -DUSE_WAYLAND_WSI=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + + if OS.mac? + prefix.install "build/PPSSPPSDL.app" + bin.write_exec_script prefix/"PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL" + + # Replace app bundles with symlinks to allow dependencies to be updated + app_frameworks = prefix/"PPSSPPSDL.app/Contents/Frameworks" + ln_sf (Formula["molten-vk"].opt_lib/"libMoltenVK.dylib").relative_path_from(app_frameworks), app_frameworks + else + system "cmake", "--install", "build" + end + + bin.install_symlink "PPSSPPSDL" => "ppsspp" + end + + test do + system bin/"ppsspp", "--version" + if OS.mac? + app_frameworks = prefix/"PPSSPPSDL.app/Contents/Frameworks" + assert_path_exists app_frameworks/"libMoltenVK.dylib", "Broken linkage with `molten-vk`" + end + end +end + +__END__ +diff --git a/Core/Util/PortManager.cpp b/Core/Util/PortManager.cpp +index cfb81e9dbd..dfd6a8e583 100644 +--- a/Core/Util/PortManager.cpp ++++ b/Core/Util/PortManager.cpp +@@ -48,7 +48,7 @@ std::thread upnpServiceThread; + std::recursive_mutex upnpLock; + std::deque upnpReqs; + +-PortManager::PortManager(): ++PortManager::PortManager(): + m_InitState(UPNP_INITSTATE_NONE), + m_LocalPort(UPNP_LOCAL_PORT_ANY), + m_leaseDuration("43200") { +@@ -99,7 +99,7 @@ bool PortManager::Initialize(const unsigned int timeout) { + int ipv6 = 0; // 0 = IPv4, 1 = IPv6 + unsigned char ttl = 2; // defaulting to 2 + int error = 0; +- ++ + VERBOSE_LOG(SCENET, "PortManager::Initialize(%d)", timeout); + if (!g_Config.bEnableUPnP) { + ERROR_LOG(SCENET, "PortManager::Initialize - UPnP is Disabled on Networking Settings"); +@@ -161,9 +161,21 @@ bool PortManager::Initialize(const unsigned int timeout) { + + // Get LAN IP address that connects to the router + char lanaddr[64] = "unset"; +- int status = UPNP_GetValidIGD(devlist, urls, datas, lanaddr, sizeof(lanaddr)); //possible "status" values, 0 = NO IGD found, 1 = A valid connected IGD has been found, 2 = A valid IGD has been found but it reported as not connected, 3 = an UPnP device has been found but was not recognized as an IGD ++ ++ // possible "status" values: ++ // -1 = Internal error ++ // 0 = NO IGD found ++ // 1 = A valid connected IGD has been found ++ // 2 = A valid connected IGD has been found but its IP address is reserved (non routable) ++ // 3 = A valid IGD has been found but it reported as not connected ++ // 4 = an UPnP device has been found but was not recognized as an IGD ++#if (MINIUPNPC_API_VERSION >= 18) ++ int status = UPNP_GetValidIGD(devlist, urls, datas, lanaddr, sizeof(lanaddr), nullptr, 0); ++#else ++ int status = UPNP_GetValidIGD(devlist, urls, datas, lanaddr, sizeof(lanaddr)); ++#endif + m_lanip = std::string(lanaddr); +- INFO_LOG(SCENET, "PortManager - Detected LAN IP: %s", m_lanip.c_str()); ++ INFO_LOG(SCENET, "PortManager - Detected LAN IP: %s (status=%d)", m_lanip.c_str(), status); + + // Additional Info + char connectionType[64] = ""; +@@ -206,7 +218,7 @@ bool PortManager::Add(const char* protocol, unsigned short port, unsigned short + char intport_str[16]; + int r; + auto n = GetI18NCategory(I18NCat::NETWORKING); +- ++ + if (intport == 0) + intport = port; + INFO_LOG(SCENET, "PortManager::Add(%s, %d, %d)", protocol, port, intport); +@@ -325,7 +337,7 @@ bool PortManager::Restore() { + } + } + // Add the original owner back +- r = UPNP_AddPortMapping(urls->controlURL, datas->first.servicetype, ++ r = UPNP_AddPortMapping(urls->controlURL, datas->first.servicetype, + it->extPort_str.c_str(), it->intPort_str.c_str(), it->lanip.c_str(), it->desc.c_str(), it->protocol.c_str(), it->remoteHost.c_str(), it->duration.c_str()); + if (r == 0) { + it->taken = false; +@@ -334,7 +346,7 @@ bool PortManager::Restore() { + ERROR_LOG(SCENET, "PortManager::Restore - AddPortMapping failed (error: %i)", r); + if (r == UPNPCOMMAND_HTTP_ERROR) + return false; // Might be better not to exit here, but exiting a loop will avoid long timeouts in the case the router is no longer reachable +- } ++ } + } + } + return true; +@@ -538,4 +550,3 @@ void UPnP_Remove(const char* protocol, unsigned short port) { + std::lock_guard upnpGuard(upnpLock); + upnpReqs.push_back({ UPNP_CMD_REMOVE, protocol, port, port }); + } +- diff --git a/Formula/p/pqiv.rb b/Formula/p/pqiv.rb new file mode 100644 index 0000000000000..06b517ffe0a8f --- /dev/null +++ b/Formula/p/pqiv.rb @@ -0,0 +1,54 @@ +class Pqiv < Formula + desc "Powerful image viewer with minimal UI" + homepage "https://github.com/phillipberndt/pqiv" + url "https://github.com/phillipberndt/pqiv/archive/refs/tags/2.13.2.tar.gz" + sha256 "154cbbe0a62be12cee23b0a46a86b2305d8128fd19924308ad5e9d22fa5ad4f7" + license "GPL-3.0-or-later" + revision 2 + head "https://github.com/phillipberndt/pqiv.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "41152b2624a9e2672fd94c0c366e8d4fd5bfd3136b87bba48e13e78ac0d78205" + sha256 cellar: :any, arm64_sequoia: "e44986d59fbbfadb05ec2d40c769eb87deac34da0a21291a3ad933dd30af109c" + sha256 cellar: :any, arm64_sonoma: "021459c868cb76745936d836395a26210307ad99b7145f4ad365eb18c97fc9a1" + sha256 cellar: :any, arm64_ventura: "c0d57afe7ac1a17e4e3430fe0e07ebb6edafca503f2725f49ba9942e553f7a77" + sha256 cellar: :any, sonoma: "ca0cb5916c301360054b74d1ce2732273fce60f3b03d96b0fb9ca774f6bff32e" + sha256 cellar: :any, ventura: "4e7dbe5ea248fd4bd10c0fec39ac71680cab1a019b7501a3d8b3a28a9f9b89ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa5bfd357ec838bc9611ebfcd5e8cb8d6b769b1393e8d8e46d89b8947f714e48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ad555fc865b2af09114d0e8132435f9b166696bfdc8ed588e26b19cb5531f99" + end + + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "imagemagick" + depends_on "libarchive" + depends_on "libspectre" + depends_on "pango" + depends_on "poppler" + depends_on "webp" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "libtiff" + depends_on "libx11" + end + + def install + args = *std_configure_args.reject { |s| s["--disable-debug"]|| s["--disable-dependency-tracking"] } + system "./configure", *args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pqiv --version 2>&1") + end +end diff --git a/Formula/p/pre-commit.rb b/Formula/p/pre-commit.rb new file mode 100644 index 0000000000000..ecc5f471c2155 --- /dev/null +++ b/Formula/p/pre-commit.rb @@ -0,0 +1,98 @@ +class PreCommit < Formula + include Language::Python::Virtualenv + + desc "Framework for managing multi-language pre-commit hooks" + homepage "https://pre-commit.com/" + url "https://files.pythonhosted.org/packages/ff/29/7cf5bbc236333876e4b41f56e06857a87937ce4bf91e117a6991a2dbb02a/pre_commit-4.3.0.tar.gz" + sha256 "499fe450cc9d42e9d58e606262795ecb64dd05438943c62b66f6a8673da30b16" + license "MIT" + head "https://github.com/pre-commit/pre-commit.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "68539bbf76255e4ad5fc5a17964ba30501238cb093a7dd7dfe43b2194e68f9eb" + sha256 cellar: :any, arm64_sequoia: "49391e8a3fced6ef0771634063b4d3fb3652cf34956571b13bcc7494fc086d05" + sha256 cellar: :any, arm64_sonoma: "14203088fd2ff4ec749112ebb5d76ee45da5ef748e74d837b5a864d925e75bf8" + sha256 cellar: :any, sonoma: "94bd944ac86f44ae5969ae93aa5ec1397afd330ab6826e34c0731bf540039e7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "67d35d7e19d9537bb070d6293a98dd9ec3c45ece7c0a02479384cc8e88058942" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0569196fdb4a85648ce0d89f369ed96033538aef91a81f6c6c1335a0350832e0" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "cfgv" do + url "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz" + sha256 "e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "identify" do + url "https://files.pythonhosted.org/packages/ff/e7/685de97986c916a6d93b3876139e00eef26ad5bbbd61925d670ae8013449/identify-2.6.15.tar.gz" + sha256 "e4f4864b96c6557ef2a1e1c951771838f4edc9df3a72ec7118b338801b11c7bf" + end + + resource "nodeenv" do + url "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz" + sha256 "6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + def python3 + "python3.14" + end + + def install + # Avoid Cellar path reference, which is only good for one version. + inreplace "pre_commit/commands/install_uninstall.py", + "f'INSTALL_PYTHON={shlex.quote(sys.executable)}\\n'", + "f'INSTALL_PYTHON={shlex.quote(\"#{opt_libexec}/bin/#{python3}\")}\\n'" + + virtualenv_install_with_resources + end + + test do + system "git", "init" + (testpath/".pre-commit-config.yaml").write <<~YAML + repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v0.9.1 + hooks: + - id: trailing-whitespace + YAML + system bin/"pre-commit", "install" + (testpath/"f").write "hi\n" + system "git", "add", "f" + + ENV["GIT_AUTHOR_NAME"] = "test user" + ENV["GIT_AUTHOR_EMAIL"] = "test@example.com" + ENV["GIT_COMMITTER_NAME"] = "test user" + ENV["GIT_COMMITTER_EMAIL"] = "test@example.com" + git_exe = which("git") + ENV["PATH"] = "/usr/bin:/bin" + system git_exe, "commit", "-m", "test" + end +end diff --git a/Formula/p/precice.rb b/Formula/p/precice.rb new file mode 100644 index 0000000000000..2f2dc96b7e684 --- /dev/null +++ b/Formula/p/precice.rb @@ -0,0 +1,41 @@ +class Precice < Formula + desc "Coupling library for partitioned multi-physics simulations" + homepage "https://precice.org/" + url "https://github.com/precice/precice/archive/refs/tags/v3.3.0.tar.gz" + sha256 "300df9dbaec066c1d0f93f2dbf055705110d297bca23fc0f20a99847a55a24f4" + license "LGPL-3.0-or-later" + head "https://github.com/precice/precice.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7c456e7082ab2a026dd0805cb3866760da48c6d599a72789298f37b56cb13340" + sha256 cellar: :any, arm64_sequoia: "2f31dab890a00ca4dc49266f8126e6f33ebeff11f05cdcdc2bf95c9e6ba4d6c4" + sha256 cellar: :any, arm64_sonoma: "17de77b45778f8394d43423a7d6ed02624d033ce19d8ec8cb8adf024df77b7f8" + sha256 cellar: :any, sonoma: "751fa6ee50cf9bb085d3a89b95f9101391882d1fd3f3c3a2b18e5ca0c851e9f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "dde18fbb9082d2bf672e311d5c1dc637210ed9be61cb05016806faf5ccceb378" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bce6c711ca7ddaf61b96baaeb5aab43df83be9e0f45c149790ff0345c8cbeb8" + end + + depends_on "cmake" => :build + + depends_on "boost" + depends_on "eigen" + depends_on "numpy" + depends_on "open-mpi" + depends_on "petsc" + depends_on "python@3.14" + + uses_from_macos "libxml2" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"precice-version", "version" + system bin/"precice-config-doc", "md" + system bin/"precice-config-validate", pkgshare/"examples/solverdummies/precice-config.xml" + end +end diff --git a/Formula/p/precious.rb b/Formula/p/precious.rb new file mode 100644 index 0000000000000..7dbb64bcf2f62 --- /dev/null +++ b/Formula/p/precious.rb @@ -0,0 +1,30 @@ +class Precious < Formula + desc "One code quality tool to rule them all" + homepage "https://github.com/houseabsolute/precious" + url "https://github.com/houseabsolute/precious/archive/refs/tags/v0.10.1.tar.gz" + sha256 "01f9a43247d42c84c85f5e07721736264b7fdc1e4a6ec5776b17563b1efcef5a" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/houseabsolute/precious.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13e61bab5ea58804dd6869c0489300ccd9d01d971c38a2d243d9a03dce4da0c5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b50c34ba56c97deb50b4c4bd30b8db046db520ad338f29dd7e3e6d4b64f4547" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7d73a4676c1a07e7d3af036d88f5a903cd7866e276400652d2ea285c2b9a9870" + sha256 cellar: :any_skip_relocation, sonoma: "2122714da7a13b32617137780f7bcdb8e01f561ece3b4fda0aafb54c43675be4" + sha256 cellar: :any_skip_relocation, arm64_linux: "109308f96f8ed3f4d36f7f8a6f2c61174e202bd99d2baec0dd7a3a4fcfa5017f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7c6b535d38cc25ab828dfb49bed6fed78a8c72341cbf65e3a4544e3b8704cfa" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/precious --version") + + system bin/"precious", "config", "init", "--auto" + assert_path_exists testpath/"precious.toml" + end +end diff --git a/Formula/p/precomp.rb b/Formula/p/precomp.rb new file mode 100644 index 0000000000000..728290efbd5a1 --- /dev/null +++ b/Formula/p/precomp.rb @@ -0,0 +1,50 @@ +class Precomp < Formula + desc "Command-line precompressor to achieve better compression" + homepage "http://schnaader.info/precomp.php" + url "https://github.com/schnaader/precomp-cpp/archive/refs/tags/v0.4.7.tar.gz" + sha256 "b4064f9a18b9885e574c274f93d73d8a4e7f2bbd9e959beaa773f2e61292fb2b" + license "Apache-2.0" + head "https://github.com/schnaader/precomp-cpp.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "37a2fbc9d8ef7f210168e5c4f2a3ce13944482c26207fb06ed6cec0138464395" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e17e36888fa003ff01ce0af6dd634576f21c2f303cea989f507730c95af6f827" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac582dec76b87c1affdf3a0065385f587b7fb47a3c7bdecd391a0e067fbcbf1c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "33c0801e82dd120a4300a93190e59d99da46d28acb0cef6f6946ec9a75cad1e0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5567c2d4a2a3e18046d75f916742f0d112c81c2c744e63aabfaa0f75bb3ab0a8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "527a77954282f384fd4bd01ec67750d73ee5fc0d989cee4be22ba688a461a90f" + sha256 cellar: :any_skip_relocation, sonoma: "be2cd21d5897846900b73dd4e6677cbf0f5e58d488d41115dd74548866f6401e" + sha256 cellar: :any_skip_relocation, ventura: "77b3e5aedbb4e12c3ded5f546045d04e8cecadcc2c5a4700299ffad6be3912b2" + sha256 cellar: :any_skip_relocation, monterey: "d7b2be3194f675f7db87d9952635a1f0bcb36b2b4cffdc63078d1adf8683bc63" + sha256 cellar: :any_skip_relocation, big_sur: "98d1f2f0987f9317b372895c3af39358585a461023e286baf2ebc67d118cf3be" + sha256 cellar: :any_skip_relocation, catalina: "9ac9f156315ae463a1e378bdd9ed06d5f36437ccff4505740dfa10ee914b5adf" + sha256 cellar: :any_skip_relocation, arm64_linux: "94d7a49395b7ea41b35d5ba993dc244fa2dd0795f300bc27b2f94821047daba3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7affc5c732e89618e28cbdc3a5b93adfd8588fe0af291dde9c940b0667ea8c06" + end + + depends_on "cmake" => :build + + def install + # https://github.com/schnaader/precomp-cpp/pull/146 + inreplace "contrib/liblzma/rangecoder/range_encoder.h", "#include \"price.h\"", + "#include \"price.h\"\n#include " + + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/precomp" + end + + test do + cp bin/"precomp", testpath/"precomp" + system "gzip", "-1", testpath/"precomp" + + system bin/"precomp", testpath/"precomp.gz" + rm testpath/"precomp.gz", force: true + system bin/"precomp", "-r", testpath/"precomp.pcf" + system "gzip", "-d", testpath/"precomp.gz" + end +end diff --git a/Formula/p/preevy.rb b/Formula/p/preevy.rb new file mode 100644 index 0000000000000..e6a60c0895eb1 --- /dev/null +++ b/Formula/p/preevy.rb @@ -0,0 +1,32 @@ +class Preevy < Formula + desc "Quickly deploy preview environments to the cloud" + homepage "https://preevy.dev/" + url "https://registry.npmjs.org/preevy/-/preevy-0.0.67.tgz" + sha256 "7f07237d5d5112250b7ee8a3f2ee1af3df1ef2f6cfa984040aef2e2a884b30e7" + license "Apache-2.0" + + bottle do + sha256 arm64_tahoe: "0ecfe50451d749ef862d67a719df6877d1bc707ae3a4254fabd37635ac0581a7" + sha256 arm64_sequoia: "13f0d0eb46761af3cfad9914316e60ff0a57b9c66de29c6ff5a36c075a126c5e" + sha256 arm64_sonoma: "2a80857e600f0e08aae2cdaa68220e3ce26a5e9f5d282cb5368d934944ed8355" + sha256 arm64_ventura: "b3d2111934d904a21e073113ffb2a53da7d8784907cf06bd92a64d24be3e6399" + sha256 sonoma: "a511ef38d0a334bb9eb9ab49781d75974a33d08074870a153339087e9e950428" + sha256 ventura: "92c7b3fe2e0fb816a63b6b0c2feb8446be062eec443dbb6a5416b4b9937f056a" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e99bec653db6fb724499c73557bfde947aad0f58d6e1b0698ec173803efa175" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a58855d54fa97236e0fad7088c96a745ac2ef33b6f3a9caf03bd6cfd08ebaa1" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/preevy --version") + + output = shell_output("#{bin}/preevy ls 2>&1", 2) + assert_match "Error: Profile not initialized", output + end +end diff --git a/Formula/p/prefixsuffix.rb b/Formula/p/prefixsuffix.rb new file mode 100644 index 0000000000000..a25dd8e3a97c4 --- /dev/null +++ b/Formula/p/prefixsuffix.rb @@ -0,0 +1,70 @@ +class Prefixsuffix < Formula + desc "GUI batch renaming utility" + homepage "https://github.com/murraycu/prefixsuffix" + url "https://download.gnome.org/sources/prefixsuffix/0.6/prefixsuffix-0.6.9.tar.xz" + sha256 "fc3202bddf2ebbb93ffd31fc2a079cfc05957e4bf219535f26e6d8784d859e9b" + license "GPL-2.0-or-later" + revision 10 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "9685f6462cb7c8c464ba24562d8d79038c4982fa6e173765570d11d7d2fef6bb" + sha256 arm64_sequoia: "30ef0ba35485343f36734f212295160cedd798991dfa2abd35a6b60f7f95405e" + sha256 arm64_sonoma: "6e197205c70b3923ae50f5f33bd203810348f2846a3eabaf86839a978c598426" + sha256 arm64_ventura: "8a718e3a241904ac15db3d608b23d2450743cd649168f623d3033717ef604939" + sha256 arm64_monterey: "c61092d6a233b89eba50ad58cd33acdf79110cececfe86b4b9c00c1a8713af58" + sha256 sonoma: "e5750bf2bc2db7e78a87ce10a8e348c15b6cc8f560a1ee4f97dafcd3968a8dc9" + sha256 ventura: "5226011c5383e3328b4872a1e559ce249b5da4f817c7d4bfab2d417ce0fc095f" + sha256 monterey: "4a0a8c588c5d78a1bffbeeeb1f6dc566fb1ff39de91900ce2d089af27e19fd5e" + sha256 arm64_linux: "74bcf8905a1953a54f17b65d4c68b48d0fb78e0d5f3988204e99620aa6b474bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bd8de221d43b7d0d511a7a0cb6ebd3a35f045524a02917cf839eb426ae65d41" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "atkmm@2.28" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "gtk+3" + depends_on "gtkmm3" + depends_on "libsigc++@2" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "cairomm@1.14" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + depends_on "pangomm@2.46" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" unless OS.mac? + + ENV.cxx11 + system "./configure", "--disable-silent-rules", + "--disable-schemas-compile", + *std_configure_args + system "make", "install" + end + + def post_install + system Formula["glib"].opt_bin/"glib-compile-schemas", HOMEBREW_PREFIX/"share/glib-2.0/schemas" + end + + test do + # Disable this part of the test on Linux because display is not available. + system bin/"prefixsuffix", "--version" if OS.mac? + end +end diff --git a/Formula/p/prek.rb b/Formula/p/prek.rb new file mode 100644 index 0000000000000..e7a433ee0357f --- /dev/null +++ b/Formula/p/prek.rb @@ -0,0 +1,31 @@ +class Prek < Formula + desc "Pre-commit re-implemented in Rust" + homepage "https://github.com/j178/prek" + url "https://github.com/j178/prek/archive/refs/tags/v0.2.13.tar.gz" + sha256 "21c9bec0eac881761a6ad7a6f918e49a2436c9d85256b583ab930d947935f9e9" + license "MIT" + head "https://github.com/j178/prek.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "05abdc9912cd38716616bd555dd7ab2b4cfe82a2d8168d4be939927c0e170c41" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "21fbe585e3d797c62cd64330dfaec0d9415100a8da2842413dce63265de5d1a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0247310e9a15582b42411c03e71c1a4dece115c2d942b8da476ef76069e4b06c" + sha256 cellar: :any_skip_relocation, sonoma: "00ba379d10fa8cb02c259d26c905b13f080b05db6a9fdff97812b1db0400f13b" + sha256 cellar: :any_skip_relocation, arm64_linux: "86bf8e75fa40f1cd78b3ace146aa6aae5282b347429c29da48d2af6f667aa1a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81a9b559460439569825fd2fd11e3b346f5b83dd87a64596f01b2eaf7f733b35" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"prek", shell_parameter_format: :clap) + end + + test do + assert_match version.to_s, shell_output("#{bin}/prek --version") + + output = shell_output("#{bin}/prek sample-config") + assert_match "See https://pre-commit.com for more information", output + end +end diff --git a/Formula/p/premake.rb b/Formula/p/premake.rb new file mode 100644 index 0000000000000..a287ab7dcedc1 --- /dev/null +++ b/Formula/p/premake.rb @@ -0,0 +1,53 @@ +class Premake < Formula + desc "Write once, build anywhere Lua-based build system" + homepage "https://premake.github.io/" + url "https://github.com/premake/premake-core/releases/download/v5.0.0-beta6/premake-5.0.0-beta6-src.zip" + sha256 "8832890451889c7ca9ab62c507d86fc9bfde45094274e5e4f46f82a258b5789b" + license "BSD-3-Clause" + version_scheme 1 + head "https://github.com/premake/premake-core.git", branch: "master" + + livecheck do + url "https://premake.github.io/download/" + regex(/href=.*?premake[._-]v?(\d+(?:\.\d+)+(?:[._-][a-z]+\d*)?)[._-]src\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2dc23c50c92584a54178a98a2dfe5a19feedd8ed3dfa036df57a7fe78a699849" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17a38d85ea292defa6e0f96af719c574203fe799a2bfcf3434f35ec4f4dbae4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5ca85506485fb7ba8ba9be1b0fde896f4e63487a7e2d144151c3820b0cf550a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b3390965bb92d8be8b1e44fd5456d79e0bd016c7ce6bf5033a94d4be02f3773" + sha256 cellar: :any_skip_relocation, sonoma: "5969d0aa6e3c766096136df6ea1a6bbebdcac14648295efb6c974b35203cb84c" + sha256 cellar: :any_skip_relocation, ventura: "9055d18a025e139f8327e74cb52602c70c179d6e4f9671b1fddfad947a9e8d6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "97a3190152d567da4f60ef0037497d7b1569c3464811a9cfecf176b88da50bb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "023e7461f6a4cdac85ec71db6bef3889d9d1b0bca9c8f29dc570d0a45c087de2" + end + + on_linux do + depends_on "util-linux" # for uuid + end + + def install + # Fix compile with newer Clang + # upstream issue, https://github.com/premake/premake-core/issues/2092 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Fix to avoid fdopen() redefinition for vendored `zlib` + if OS.mac? && DevelopmentTools.clang_build_version >= 1700 + inreplace "contrib/zlib/zutil.h", + "# define fdopen(fd,mode) NULL /* No fdopen() */", + "#if !defined(__APPLE__)\n# define fdopen(fd,mode) NULL /* No fdopen() */\n#endif" + end + + platform = OS.mac? ? "osx" : "linux" + system "make", "-f", "Bootstrap.mak", platform + system "./bin/release/premake5", "gmake2" + system "./bin/release/premake5", "embed" + system "make" + bin.install "bin/release/premake5" + end + + test do + assert_match version.to_s, shell_output("#{bin}/premake5 --version") + end +end diff --git a/Formula/p/presenterm.rb b/Formula/p/presenterm.rb new file mode 100644 index 0000000000000..00e599aec1ac8 --- /dev/null +++ b/Formula/p/presenterm.rb @@ -0,0 +1,30 @@ +class Presenterm < Formula + desc "Terminal slideshow tool" + homepage "https://github.com/mfontanini/presenterm" + url "https://github.com/mfontanini/presenterm/archive/refs/tags/v0.15.1.tar.gz" + sha256 "ce925da26d9a30e2eb319acafcbd4ea4734945b1afd59b12c925bf7650b2771f" + license "BSD-2-Clause" + head "https://github.com/mfontanini/presenterm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8cdc1d99aaddb30950ca365bb4abdb895766e459e65552b39f2b945c4db5befe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3c413356d993d87b3d63f2add98cd8aff54dc14ad553e7f9697f770548358cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96ca4508224948ec574fd292332bb1376eca16523d13de6d2e73fdad4758aa33" + sha256 cellar: :any_skip_relocation, arm64_ventura: "223dd7eaabaa7287e4273c2bdc8eeebdbd2f0d1d11b03e02f696d00580446739" + sha256 cellar: :any_skip_relocation, sonoma: "a620da9bce23a727936d36c0eeb86d5a7fd631a5d0da62b79b2d461f08545a61" + sha256 cellar: :any_skip_relocation, ventura: "ffd4a5041f06046713c8024a1e7a4daae3222c10f6a7cdc4440d9a1f902e8f55" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c01c999ef3403e979bc4f612e75b23e64cea671ec41465468ac2b8e232b30ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a75a974e9f0d1e38f6069da5247e9146c5308dab836ae009f4afea8ced039107" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # presenterm is a TUI application + assert_match version.to_s, shell_output("#{bin}/presenterm --version") + end +end diff --git a/Formula/p/prestd.rb b/Formula/p/prestd.rb new file mode 100644 index 0000000000000..bd53dc68047b4 --- /dev/null +++ b/Formula/p/prestd.rb @@ -0,0 +1,53 @@ +class Prestd < Formula + desc "Simplify and accelerate development on any Postgres application, existing or new" + homepage "https://github.com/prest/prest" + url "https://github.com/prest/prest/archive/refs/tags/v1.5.5.tar.gz" + sha256 "a9a94f4c00629044bf60de214b51d4defb17b30a41b369d404043adde955673f" + license "MIT" + head "https://github.com/prest/prest.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6bf355f7cd67bdee9b319c0ac5b6399cae1931a634f472f9c530c4d721ae7a9b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eea2264c1eb95f71a00ea3f6dab68693bb5b1b9298e2f6761afd1ba3bd257e83" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9f98b664aed92e07ef3e312d71f344aad084b42566fdf0462a35cdaa30acaf4b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21c93a08c0034b94acb228e73af97e4e86f3d659b6ddd77c4ce8695208150dc4" + sha256 cellar: :any_skip_relocation, sonoma: "6a8079afe0412aee14b9fe226f92b6a8170c7e982110439b34dbfa0f91da9b49" + sha256 cellar: :any_skip_relocation, ventura: "9f772bf14cb42300aa8bd426651df3f628898bbd50418260fc3dec288af47f6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6154aa99c1ee993ecb5f5c38a1e22b84554bf0d3c6ac7cb387fc789f85c7e0fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53b738570b9680eab675d95dcb91a8498b7c14a98beff05602330f52034889f3" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/prest/prest/helpers.PrestVersionNumber=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/prestd" + + generate_completions_from_executable(bin/"prestd", "completion") + end + + test do + (testpath/"prest.toml").write <<~TOML + [jwt] + default = false + + [pg] + host = "127.0.0.1" + user = "prest" + pass = "prest" + port = 5432 + database = "prest" + TOML + + output = shell_output("#{bin}/prestd migrate up --path .", 255) + assert_match "connect: connection refused", output + + assert_match version.to_s, shell_output("#{bin}/prestd version") + end +end diff --git a/Formula/p/prestodb.rb b/Formula/p/prestodb.rb new file mode 100644 index 0000000000000..7f92fbf159624 --- /dev/null +++ b/Formula/p/prestodb.rb @@ -0,0 +1,123 @@ +class Prestodb < Formula + include Language::Python::Shebang + + desc "Distributed SQL query engine for big data" + homepage "https://prestodb.io" + url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/0.295/presto-server-0.295.tar.gz" + sha256 "a585527431a57212baadb201eb1b971b9ab8d2e3323c14d089ba41f60fd0812d" + license "Apache-2.0" + + # Upstream has said that we should check Maven for Presto version information + # and the highest version found there is newest: + # https://github.com/prestodb/presto/issues/16200 + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b6501b9830a797f20b39269822a202b098c827abd17ee6193577e13cbf434356" + end + + depends_on "openjdk@17" + depends_on "python@3.14" + + resource "presto-cli" do + url "https://github.com/prestodb/presto/releases/download/0.295/presto-cli-0.295-executable.jar" + sha256 "e5b15f37ef402d9b9eb5e71b2e4593241bb24fcb551327359353f06176c69624" + + livecheck do + formula :parent + end + end + + def install + java_version = "17" + odie "presto-cli resource needs to be updated" if version != resource("presto-cli").version + + libexec.install Dir["*"] + + (libexec/"etc/node.properties").write <<~EOS + node.environment=production + node.id=ffffffff-ffff-ffff-ffff-ffffffffffff + node.data-dir=#{var}/prestodb/data + EOS + + (libexec/"etc/jvm.config").write <<~EOS + -server + -Xmx16G + -XX:+UseG1GC + -XX:G1HeapRegionSize=32M + -XX:+UseGCOverheadLimit + -XX:+ExplicitGCInvokesConcurrent + -XX:+HeapDumpOnOutOfMemoryError + -XX:+ExitOnOutOfMemoryError + -Djdk.attach.allowAttachSelf=true + EOS + + (libexec/"etc/config.properties").write <<~EOS + coordinator=true + node-scheduler.include-coordinator=true + http-server.http.port=8080 + query.max-memory=5GB + query.max-memory-per-node=1GB + discovery-server.enabled=true + discovery.uri=http://localhost:8080 + EOS + + (libexec/"etc/log.properties").write "com.facebook.presto=INFO" + + (libexec/"etc/catalog/jmx.properties").write "connector.name=jmx" + + rewrite_shebang detected_python_shebang, libexec/"bin/launcher.py" + env = Language::Java.overridable_java_home_env(java_version) + (bin/"presto-server").write_env_script libexec/"bin/launcher", env + + resource("presto-cli").stage do + libexec.install "presto-cli-#{version}-executable.jar" + bin.write_jar_script(libexec/"presto-cli-#{version}-executable.jar", "presto", java_version:) + end + + # Remove incompatible pre-built binaries + libprocname_dirs = (libexec/"bin/procname").children + # Keep the Linux-x86_64 directory to make bottles identical + libprocname_dirs.reject! { |dir| dir.basename.to_s == "Linux-x86_64" } + libprocname_dirs.reject! { |dir| dir.basename.to_s == "#{OS.kernel_name}-#{Hardware::CPU.arch}" } + rm_r libprocname_dirs + end + + def post_install + (var/"presto/data").mkpath + end + + def caveats + <<~EOS + Add connectors to #{opt_libexec}/etc/catalog/. See: + https://prestodb.io/docs/current/connector.html + EOS + end + + service do + run [opt_bin/"presto-server", "run"] + working_dir opt_libexec + end + + test do + port = free_port + cp libexec/"etc/config.properties", testpath/"config.properties" + inreplace testpath/"config.properties", "8080", port.to_s + server = fork do + exec bin/"presto-server", "run", "--verbose", + "--data-dir", testpath, + "--config", testpath/"config.properties" + end + sleep 60 + + query = "SELECT state FROM system.runtime.nodes" + output = shell_output("#{bin}/presto --debug --server localhost:#{port} --execute '#{query}'") + assert_match "\"active\"", output + ensure + Process.kill("TERM", server) + Process.wait server + end +end diff --git a/Formula/p/prettier.rb b/Formula/p/prettier.rb new file mode 100644 index 0000000000000..3304039d2dcca --- /dev/null +++ b/Formula/p/prettier.rb @@ -0,0 +1,25 @@ +class Prettier < Formula + desc "Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML" + homepage "https://prettier.io/" + url "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz" + sha256 "bc81ab83674f175a8601b7d013786f48ec2507dd4a5fcf3415831ff13a875bdf" + license "MIT" + head "https://github.com/prettier/prettier.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2a7d562b5ef51fbc4126e9b8589bacbc05413f7e40f59c86244a08d117f48aed" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.js").write("const arr = [1,2];") + output = shell_output("#{bin}/prettier test.js") + assert_equal "const arr = [1, 2];", output.chomp + end +end diff --git a/Formula/p/prettierd.rb b/Formula/p/prettierd.rb new file mode 100644 index 0000000000000..e001aa7dc4cba --- /dev/null +++ b/Formula/p/prettierd.rb @@ -0,0 +1,23 @@ +class Prettierd < Formula + desc "Prettier daemon" + homepage "https://github.com/fsouza/prettierd" + url "https://registry.npmjs.org/@fsouza/prettierd/-/prettierd-0.26.2.tgz" + sha256 "452b29cb958b4f5623ad06e8f3bf54ca16f6b668bfface1ee023c5278166fc42" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b11cac5d3d092efcc70afca7557edeae6af57e55a6be059585ba50ff6f423a5b" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = pipe_output("#{bin}/prettierd test.js", "const arr = [1,2];", 0) + assert_equal "const arr = [1, 2];", output.chomp + end +end diff --git a/Formula/p/prettyping.rb b/Formula/p/prettyping.rb new file mode 100644 index 0000000000000..1e83551304523 --- /dev/null +++ b/Formula/p/prettyping.rb @@ -0,0 +1,21 @@ +class Prettyping < Formula + desc "Wrapper to colorize and simplify ping's output" + homepage "https://denilsonsa.github.io/prettyping/" + url "https://github.com/denilsonsa/prettyping/archive/refs/tags/v1.1.0.tar.gz" + sha256 "e8484492e3c704b2460a00b0e417a07ad7112b5f4ad9a211931ee031fe64b4b6" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "34b060c257cb158f76339e83dc74f498fce30be734f9d007b203f7f95699d5e2" + end + + def install + bin.install "prettyping" + end + + test do + system bin/"prettyping", "-c", "3", "127.0.0.1" + end +end diff --git a/Formula/p/primecount.rb b/Formula/p/primecount.rb new file mode 100644 index 0000000000000..2cb247c9b9d2d --- /dev/null +++ b/Formula/p/primecount.rb @@ -0,0 +1,38 @@ +class Primecount < Formula + desc "Fast prime counting function program and C/C++ library" + homepage "https://github.com/kimwalisch/primecount" + url "https://github.com/kimwalisch/primecount/archive/refs/tags/v7.19.tar.gz" + sha256 "0ecb63282c02e3056707671b3d6c5bdb783b64a33c911f0fd4abe6e79e9f8a34" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "531ba2fc100912589277fae228110fa727182603ae1e572529b17c332c2dc635" + sha256 cellar: :any, arm64_sequoia: "3b11d5023b905870365a96e7b4233a5dd6d601c54632a066ca7bddccc46e56f4" + sha256 cellar: :any, arm64_sonoma: "76877d4a667be28a6213be4003ad9449bc3857d6c8765f4fcc683fe4b254bccb" + sha256 cellar: :any, arm64_ventura: "a7189f7a075892d62aa776d7e7dcd153eaa8e1597567d8d3216a37e0a1d3e716" + sha256 cellar: :any, sonoma: "3fc3ceae1e26ad44c2601d19a8f7380e9842c75e0562b98c6e2ddec670925365" + sha256 cellar: :any, ventura: "1ed880bc9fd10c30438f8dd7e5340d7993ecebeef3f9d52baaff9173102efa8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b6978a7c73429ee018db844be5eded68421b7852055724b49f24dfff872c96e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "848dced425035cb0ca9084512c2e1926e5b1f4b1004a2c9e97cf5a2dbb21c7dc" + end + + depends_on "cmake" => :build + depends_on "primesieve" + + on_macos do + depends_on "libomp" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", + "-DBUILD_LIBPRIMESIEVE=OFF", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_equal "37607912018\n", shell_output("#{bin}/primecount 1e12") + end +end diff --git a/Formula/p/primer3.rb b/Formula/p/primer3.rb new file mode 100644 index 0000000000000..e22c9cafda606 --- /dev/null +++ b/Formula/p/primer3.rb @@ -0,0 +1,39 @@ +class Primer3 < Formula + desc "Program for designing PCR primers" + homepage "https://primer3.org/" + url "https://github.com/primer3-org/primer3/archive/refs/tags/v2.6.1.tar.gz" + sha256 "805cef7ef39607cd40f0f5bb8b32e35e20007153a0a55131dd430ce644c8fb9e" + license all_of: [ + "GPL-2.0-or-later", + "GPL-3.0-or-later", # Amplicon3 + ] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b96d43ea44fb89eaf75ea0f5bcc76877ca7d73bac9dc4d2084f971c7e5a3d04" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7272f6819aa6154307869334e14b9c6bf7f7e2946cb29e6ce27e0e32b591772" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe6b4f0f13b4c390a9b0760ec731e50fe176456d404ef253d0b2836fb0924aa9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f669fca578e49237e85cfa9ebb37eef493657afdbf7152349d69addb91d4a6d" + sha256 cellar: :any_skip_relocation, sonoma: "3b4742c4eb4d8eb8194804c426e4bfcc99816751a67d0a8ed3a9f9a762aa7f8f" + sha256 cellar: :any_skip_relocation, ventura: "0451ce226e2aab9d03dbac0cf45b7790650dda666246a0c8f7789c407cdd34d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab0022a10895d283cf54cb3c24136a31643345487d75b39d355aa68340ce8904" + sha256 cellar: :any_skip_relocation, x86_64_linux: "858d715a269e3ecad988c9bbbf7e04df1570e85f601a43bcde16fb8ee94255c2" + end + + def install + system "make", "-C", "src", "install", "PREFIX=#{prefix}" + pkgshare.install "src/primer3_config" + prefix.install "src/LICENSE_GPL3_for_Amplicon3" + end + + test do + output = shell_output("#{bin}/long_seq_tm_test AAAAGGGCCCCCCCCTTTTTTTTTTT 3 20") + assert_match "tm = 52.452902", output.lines.last + end +end diff --git a/Formula/p/primesieve.rb b/Formula/p/primesieve.rb new file mode 100644 index 0000000000000..6955fcea33c0b --- /dev/null +++ b/Formula/p/primesieve.rb @@ -0,0 +1,30 @@ +class Primesieve < Formula + desc "Fast C/C++ prime number generator" + homepage "https://github.com/kimwalisch/primesieve" + url "https://github.com/kimwalisch/primesieve/archive/refs/tags/v12.9.tar.gz" + sha256 "0638f82a3dc35c0dc0b598857dfd1bc280b6de71e930724a40a35af60b440278" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c600e4a43405ed2fc2dbb54724a5f7e656a5f5ec7adf09c6e49085cd178bbb2f" + sha256 cellar: :any, arm64_sequoia: "cc0679201b60d4ac4d6a7cd3c60b18678ad96d19eaab3a8dfe0d9e4e769072d4" + sha256 cellar: :any, arm64_sonoma: "a6383880f88712f8fd81d15a3b00591153e8a77f578cceae774ec904eb0922bc" + sha256 cellar: :any, arm64_ventura: "8945ed23f37b449a3d56d9d0622ea6f78b3151ed11cd699f8c49ea5ea1125f05" + sha256 cellar: :any, sonoma: "03297c90a17bab55ce05fdfe1126f633314c034aac378009cba64483c92d8fb6" + sha256 cellar: :any, ventura: "e23540c21969a4cf2f34d57c5e0f107bfcf0de9de28ae07c2bd13a15a2ee61f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "b628601087e0d1cebfb0e7ce72001740cc6e7c2f4b659635514709d91c9d71de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d1ff8dd0b14fd3c1269285ad76699b8fac6077feb8d5ed7bb1d09e34710f2ca" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"primesieve", "100", "--count", "--print" + end +end diff --git a/Formula/p/principalmapper.rb b/Formula/p/principalmapper.rb new file mode 100644 index 0000000000000..ded7639f282d0 --- /dev/null +++ b/Formula/p/principalmapper.rb @@ -0,0 +1,71 @@ +class Principalmapper < Formula + include Language::Python::Virtualenv + + desc "Quickly evaluate IAM permissions in AWS" + homepage "https://github.com/nccgroup/PMapper" + url "https://files.pythonhosted.org/packages/3f/8c/3d2efe475e9244bd45e3a776ea8207f34a9bb15caaa02f6c95e473b2ada2/principalmapper-1.1.5.tar.gz" + sha256 "04cb9dcff0cc512df4714b3c4ea63a261001f271f95c8a453b2805290c57bbc2" + license "AGPL-3.0-or-later" + revision 5 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "47b833ae3377b5c3b707df350aea43caba38636553ae5ce0549dbdb2c634b72f" + end + + depends_on "python@3.14" + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pydot" do + url "https://files.pythonhosted.org/packages/50/35/b17cb89ff865484c6a20ef46bf9d95a5f07328292578de0b295f4a6beec2/pydot-4.0.1.tar.gz" + sha256 "c2148f681c4a33e08bf0e26a9e5f8e4099a82e0e2a068098f32ce86577364ad5" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + # Support Python 3.10, remove on next release + patch do + url "https://github.com/nccgroup/PMapper/commit/88bad89bd84a20a264165514363e52a84d39e8d7.patch?full_index=1" + sha256 "9c731e2613095ea5098eda7141ae854fceec3fc8477a7a7e3202ed6c751e68dc" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "Account IDs:\n---", shell_output("#{bin}/pmapper graph list").strip + end +end diff --git a/Formula/p/prips.rb b/Formula/p/prips.rb new file mode 100644 index 0000000000000..7ecfee9df97e0 --- /dev/null +++ b/Formula/p/prips.rb @@ -0,0 +1,36 @@ +class Prips < Formula + desc "Print the IP addresses in a given range" + homepage "https://devel.ringlet.net/sysutils/prips/" + url "https://devel.ringlet.net/files/sys/prips/prips-1.2.2.tar.xz" + sha256 "f9d710ba19ea0d9f68b633b7093092c84f519313ca28ec0632b37c4e5a85a0b2" + license "GPL-2.0-or-later" + + livecheck do + url "https://devel.ringlet.net/sysutils/prips/download/" + regex(/href=.*?prips[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c6ebfff5e1dc46e910a96a6c503115aa7b8774cdb74593bfa0b06fe3aa3ecb12" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "119d431a378f96585d6d92857c3dbf524cca2bad9e993d81763015f2e876ebf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4824dd5010e37dd1c8dd3689fd00b7a7bc861aa229ce86bb67d14e814832f3a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "154be43d4c20994c4d9dccf42241280a8303ec678d8bc7cd75d8c13eec590809" + sha256 cellar: :any_skip_relocation, sonoma: "128083e5ded105075f9158cf78e8b516aaf6cc909b09bd1e9212d7f2df30f1bc" + sha256 cellar: :any_skip_relocation, ventura: "9503baebbb4bb27ba78205df85c92b120830707544988328f25fc97983cdf2f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a1ce4c011174062fa45e6cad1c9535e7cf321e2eb1d5f2a6b40d9f9a322fd99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9e565bae503a491ee0e2ecc37889989bfab8cfe96571877a3163cbf28544d61" + end + + def install + system "make" + bin.install "prips" + man1.install "prips.1" + end + + test do + assert_equal "127.0.0.0\n127.0.0.1", + shell_output("#{bin}/prips 127.0.0.0/31").strip + end +end diff --git a/Formula/p/prism-cli.rb b/Formula/p/prism-cli.rb new file mode 100644 index 0000000000000..d4ac59ded9bb5 --- /dev/null +++ b/Formula/p/prism-cli.rb @@ -0,0 +1,41 @@ +class PrismCli < Formula + desc "Set of packages for API mocking and contract testing" + homepage "https://stoplight.io/open-source/prism" + url "https://registry.npmjs.org/@stoplight/prism-cli/-/prism-cli-5.14.2.tgz" + sha256 "61a3b45fbb0325b85fbe94baf836588de676c0db91c3b1f191738070c2f7410f" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7800a83ca6cb47e11df9264d4ff6e06d6ee0a5d5e6cba2456c98198c4f50046a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Backport https://github.com/stoplightio/json-schema-ref-parser/commit/ab6ad5a312672c37fd5936d3cef78fbf0ad85234 + node_modules = libexec/"lib/node_modules/@stoplight/prism-cli/node_modules" + inreplace node_modules/"@stoplight/json-schema-ref-parser/lib/resolvers/http.js", + 'const { AbortController } = require("node-abort-controller");', + "" + end + + test do + port = free_port + pid = spawn bin/"prism", "mock", "--port", port.to_s, "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/refs/tags/3.1.1/examples/v3.0/petstore.yaml" + + sleep 10 + sleep 15 if OS.mac? && Hardware::CPU.intel? + + system "curl", "http://127.0.0.1:#{port}/pets" + + assert_match version.to_s, shell_output("#{bin}/prism --version") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/p/privatebin-cli.rb b/Formula/p/privatebin-cli.rb new file mode 100644 index 0000000000000..4dc3d3d534e73 --- /dev/null +++ b/Formula/p/privatebin-cli.rb @@ -0,0 +1,29 @@ +class PrivatebinCli < Formula + desc "CLI for creating and managing PrivateBin pastes" + homepage "https://github.com/gearnode/privatebin" + url "https://github.com/gearnode/privatebin/archive/refs/tags/v2.1.1.tar.gz" + sha256 "eb143ed6d2ab88d66e615c5a98fb2c3f8b0ee5a8394590b68ddbf59bfb2c39d3" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bb4c13c2f9ea53f51675c8647c55767c74939837c097578ba38d3039e4c2d7c4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb4c13c2f9ea53f51675c8647c55767c74939837c097578ba38d3039e4c2d7c4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb4c13c2f9ea53f51675c8647c55767c74939837c097578ba38d3039e4c2d7c4" + sha256 cellar: :any_skip_relocation, sonoma: "e91653fc6b2105a834846e498a97865246f173e20a1cc48e30fb2fa2f7b8d192" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2f4a75e45e63f8228738a2c4d9a6c793465168ee3831ee1c8b8c32b12f8920d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bbee2ff0b938abdcb16eeeeafb7b33a77123df28a3615574488104c186cf847" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags: ldflags, output: bin/"privatebin"), "./cmd/privatebin" + end + + test do + assert_match version.to_s, shell_output("#{bin}/privatebin --version") + + assert_match "Error: cannot load configuration", shell_output("#{bin}/privatebin create foo 2>&1", 1) + end +end diff --git a/Formula/p/privoxy.rb b/Formula/p/privoxy.rb new file mode 100644 index 0000000000000..20ae61159a40b --- /dev/null +++ b/Formula/p/privoxy.rb @@ -0,0 +1,60 @@ +class Privoxy < Formula + desc "Advanced filtering web proxy" + homepage "https://www.privoxy.org/" + url "https://downloads.sourceforge.net/project/ijbswa/Sources/4.0.0%20%28stable%29/privoxy-4.0.0-stable-src.tar.gz" + sha256 "c08e2ba0049307017bf9d8a63dd2a0dfb96aa0cdeb34ae007776e63eba62a26f" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/privoxy[._-]v?(\d+(?:\.\d+)+)[._-]stable[._-]src\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "94236b3fa68f8bf7018b3665783ba73d85eb752d785e36e5f2e64a635125bb32" + sha256 cellar: :any, arm64_sequoia: "d83863aa3c2b997f07b85eb2c0508411720d70c7d9e2d8a0d3aad6f6570dd4c7" + sha256 cellar: :any, arm64_sonoma: "5ffeba4e02190b9ef05a1991918b68f35816922b1e5ea18222823abd3b04efae" + sha256 cellar: :any, arm64_ventura: "320b704c330b960bff73567056912529c9840b7be022b2fa36d336755fab634e" + sha256 cellar: :any, sonoma: "890bbcfe55da09152be6367010e6a102ea9163b0e95c76a93051f41fc069a84d" + sha256 cellar: :any, ventura: "87f744512b9c327b249c529495b8604cb6e4b0dbcd4bccbe8380e300dc1dfde8" + sha256 cellar: :any_skip_relocation, arm64_linux: "44e368da9249571e6f5cc634b511d39adf5dc28c8cf667a893740a9201807e5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "deeadf7f6f8e636fecafd58b7b3c201f1303f7b971af0667d43c54ccf3977bc7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pcre2" + + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--sysconfdir=#{pkgetc}", + "--localstatedir=#{var}", + *std_configure_args + system "make" + system "make", "install" + end + + service do + run [opt_sbin/"privoxy", "--no-daemon", etc/"privoxy/config"] + keep_alive true + working_dir var + error_log_path var/"log/privoxy/logfile" + end + + test do + bind_address = "127.0.0.1:#{free_port}" + (testpath/"config").write("listen-address #{bind_address}\n") + pid = spawn sbin/"privoxy", "--no-daemon", testpath/"config" + begin + sleep 5 + output = shell_output("curl --head --proxy #{bind_address} https://github.com") + assert_match "HTTP/1.1 200 Connection established", output + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/p/prjtrellis.rb b/Formula/p/prjtrellis.rb new file mode 100644 index 0000000000000..6459eb87b2312 --- /dev/null +++ b/Formula/p/prjtrellis.rb @@ -0,0 +1,78 @@ +class Prjtrellis < Formula + desc "Documenting the Lattice ECP5 bit-stream format" + homepage "https://github.com/YosysHQ/prjtrellis" + url "https://github.com/YosysHQ/prjtrellis/archive/refs/tags/1.4.tar.gz" + sha256 "46fe9d98676953e0cccf1d6332755d217a0861e420f1a12dabfda74d81ccc147" + license all_of: ["ISC", "MIT"] + revision 7 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a6b7ec5be496ea0d129abfd976de357fe0c84ce34d95f7b21640b1ad8308fae8" + sha256 cellar: :any, arm64_sequoia: "945c15148287fb63e62ca3773572f2cb6abcc13c6eb82c06356c0ced7b075496" + sha256 cellar: :any, arm64_sonoma: "55776f6d948b1c99b15b6f84c75296f5324a0fda317f2c2c0946718ca4621257" + sha256 cellar: :any, sonoma: "81c233a5b2325a8c60c88a5dc097e65f7e901f253c9d8fb4884ed1303f6b4707" + sha256 cellar: :any_skip_relocation, arm64_linux: "7234b8ff08a258b6cd47965db615ae6a923a1880f4a7660dd6bd550518906a29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e56f2ed4c1a258ae7024c507e51d74093bc89f3f456a62affdd70b92fbe275fe" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "boost-python3" + depends_on "python@3.14" + + resource "prjtrellis-db" do + url "https://github.com/YosysHQ/prjtrellis/releases/download/1.4/prjtrellis-db-1.4.zip" + sha256 "4f8a8a5344f85c628fb3ba3862476058c80bcb8ffb3604c5cca84fede11ff9f0" + end + + # Workaround to build with Boost 1.89.0 until fixed upstream + # Issue ref: https://github.com/YosysHQ/prjtrellis/issues/251 + patch :DATA + + def install + (buildpath/"database").install resource("prjtrellis-db") + + system "cmake", "-S", "libtrellis", "-B", "libtrellis", + "-DCURRENT_GIT_VERSION=#{version}", *std_cmake_args + system "cmake", "--build", "libtrellis" + system "cmake", "--install", "libtrellis" + end + + test do + resource "homeebrew-ecp-config" do + url "https://www.trabucayre.com/blink.config" + sha256 "394d71ba416517cceee5135b853dd1e94f99b07d5e9a809760618fa820d32619" + end + + testpath.install resource("homeebrew-ecp-config") + + system bin/"ecppack", testpath/"blink.config", testpath/"blink.bit" + assert_path_exists testpath/"blink.bit" + + system bin/"ecpunpack", testpath/"blink.bit", testpath/"foo.config" + assert_path_exists testpath/"foo.config" + + system bin/"ecppll", "-i", "12", "-o", "24", "-f", "pll.v" + assert_path_exists testpath/"pll.v" + + system bin/"ecpbram", "-g", "ram.hex", "-w", "16", "-d", "512" + assert_path_exists testpath/"ram.hex" + end +end + +__END__ +diff --git a/libtrellis/CMakeLists.txt b/libtrellis/CMakeLists.txt +index b4f02c7..02242d2 100644 +--- a/libtrellis/CMakeLists.txt ++++ b/libtrellis/CMakeLists.txt +@@ -46,7 +46,7 @@ if (WASI) + endif() + endif() + +-set(boost_libs filesystem program_options system) ++set(boost_libs filesystem program_options) + if (Threads_FOUND) + list(APPEND boost_libs thread) + else() diff --git a/Formula/p/probe-rs-tools.rb b/Formula/p/probe-rs-tools.rb new file mode 100644 index 0000000000000..67ec296b7f6a0 --- /dev/null +++ b/Formula/p/probe-rs-tools.rb @@ -0,0 +1,44 @@ +class ProbeRsTools < Formula + desc "Collection of on chip debugging tools to communicate with microchips" + homepage "https://probe.rs" + url "https://github.com/probe-rs/probe-rs/archive/refs/tags/v0.30.0.tar.gz" + sha256 "73cd494f6864d4a74709a9c8adc251105c27d039f91a8b05a01c1ac10a07aab9" + license "Apache-2.0" + head "https://github.com/probe-rs/probe-rs.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ed154405d1f3cc91ac0862ece1042adf2ff9ec2843e4eb1986a43d9eb8cbdda5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92e6587c44bb9b278ec45baaabff1457240a57459224965650116bf77e120b4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "616034c2f4580a2b58122eb91a434593954e183e9ac2e28e0a985d6979884a84" + sha256 cellar: :any_skip_relocation, sonoma: "ce830609bc40f7a91855727da68d99950ae387af8d41d1444d9f65b6009111ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "e859833bbef36d7d80a7fba1578f07fa4c56cfdc05cc5b197bb6a8d5ee636807" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bd9ef243131eebce3701347fb267d5506bcc03e2cbcd8482f9fd2a9e405ff3a" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "systemd" # for libudev + end + + def install + system "cargo", "install", *std_cargo_args(path: "probe-rs-tools") + end + + test do + assert_match version.to_s, shell_output("#{bin}/probe-rs --version") + + output = shell_output("#{bin}/probe-rs chip list") + assert_match "nRF52833_xxAA", output # micro:bit v2 + assert_match "STM32F3 Series", output + end +end diff --git a/Formula/p/procmail.rb b/Formula/p/procmail.rb new file mode 100644 index 0000000000000..996afed3d8a98 --- /dev/null +++ b/Formula/p/procmail.rb @@ -0,0 +1,51 @@ +class Procmail < Formula + desc "Autonomous mail processor" + homepage "https://github.com/BuGlessRB/procmail" + url "https://github.com/BuGlessRB/procmail/archive/refs/tags/v3.24.tar.gz" + sha256 "514ea433339783e95df9321e794771e4887b9823ac55fdb2469702cf69bd3989" + license any_of: ["GPL-2.0-or-later", "Artistic-1.0-Perl"] + version_scheme 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b1bfc16b0cf3a29c2782b0bd30bbf11b04f0586a01a6ebeac2aad63fbb9a8c16" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a2dee1f884a35fe10236bd86b12bd6bc507aa720f764be04e75fdc042c75fd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a9daf01dcf08b8b98d376cc6a99f1e8404db58f51ee2d62305ec604ddbcf3d7f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "09fcc2d016f1f67c3f69caa887411eab4e0b44c0c1e465841604bf6210522e8c" + sha256 cellar: :any_skip_relocation, sonoma: "d075ce7ac129209d21b5eeb25f2c5431f7921bb42d36140913855c27ee1aa53d" + sha256 cellar: :any_skip_relocation, ventura: "f3b010bf2fb93f2dea465f19d898358e75f0fce1bfca7e31cb6298b607426f8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5f7f578ac20ba0e61130aaf67f1e0357cae7419791754ed9163a90c758a005c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09534e911a38143ef58d749661b6359585308a1f42cb842b425f3fa6f803ff70" + end + + # Apply open PR to fix build on modern Clang/GCC rather than disabling errors. + # Same patch used by Fedora, Gentoo, MacPorts and NixOS. + # PR ref: https://github.com/BuGlessRB/procmail/pull/7 + patch do + url "https://github.com/BuGlessRB/procmail/commit/8cfd570fd14c8fb9983859767ab1851bfd064b64.patch?full_index=1" + sha256 "2258b13da244b8ffbd242bc2a7e1e8c6129ab2aed4126e3394287bcafc1018e1" + end + + def install + # avoid issue from case-insensitive filesystem + mv "INSTALL", "INSTALL.txt" if OS.mac? + + system "make", "install", "BASENAME=#{prefix}", "MANDIR=#{man}", "LOCKINGTEST=1" + end + + test do + path = testpath/"test.mail" + path.write <<~EOS + From alice@example.net Tue Sep 15 15:33:41 2015 + Date: Tue, 15 Sep 2015 15:33:41 +0200 + From: Alice + To: Bob + Subject: Test + + please ignore + EOS + assert_match "Subject: Test", shell_output("#{bin}/formail -X 'Subject' < #{path}") + assert_match "please ignore", shell_output("#{bin}/formail -I '' < #{path}") + end +end diff --git a/Formula/p/procps.rb b/Formula/p/procps.rb new file mode 100644 index 0000000000000..c1990e41012ae --- /dev/null +++ b/Formula/p/procps.rb @@ -0,0 +1,35 @@ +class Procps < Formula + desc "Utilities for browsing procfs" + homepage "https://gitlab.com/procps-ng/procps" + url "https://gitlab.com/procps-ng/procps/-/archive/v4.0.5/procps-v4.0.5.tar.gz" + sha256 "2c6d7ed9f2acde1d4dd4602c6172fe56eff86953fe8639bd633dbd22cc18f5db" + license "GPL-2.0-or-later" + head "https://gitlab.com/procps-ng/procps.git", branch: "master" + + bottle do + sha256 arm64_linux: "e72429535b856a66c6eef1a52332377a5f9299f6075465d1c3aeb90f0109e270" + sha256 x86_64_linux: "db70a3ee416f46a0d7b5618a3e3036afeec4e79dc4dddaa1802f4c2475c99c48" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on :linux + depends_on "ncurses" + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + + # kill and uptime are also provided by coreutils + rm [bin/"kill", bin/"uptime", man1/"kill.1", man1/"uptime.1"] + end + + test do + system bin/"ps", "--version" + assert_match "grep homebrew", shell_output("#{bin}/ps aux | grep homebrew") + end +end diff --git a/Formula/p/procs.rb b/Formula/p/procs.rb new file mode 100644 index 0000000000000..5673f1e383c93 --- /dev/null +++ b/Formula/p/procs.rb @@ -0,0 +1,38 @@ +class Procs < Formula + desc "Modern replacement for ps written in Rust" + homepage "https://github.com/dalance/procs" + url "https://github.com/dalance/procs/archive/refs/tags/v0.14.10.tar.gz" + sha256 "7b287ac253fd1d202b0ea6a9a8ba2ed97598cf8e7dfd539bd40e382c6dc6d350" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b1f2b86cdce127a951ea878549dec3d11cff8963480fe09fba395af42366444" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5049a80b8fe8d23bbee453de47cbb4347b0d56c173b7a4cfd29b76a7ebc4a900" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69ffb28f79ffd46055d4ce1a4f98628430d65114cf72d7c329735ea3ec963290" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cafbe79fabf8648fb1914aab023f3a3444266adda84a92284db37a6ef4d3e393" + sha256 cellar: :any_skip_relocation, sonoma: "009fa13890972f60741b94dc2f3fdb9de285c2dbf1bbb82a5d0a3fa30ad72b0a" + sha256 cellar: :any_skip_relocation, ventura: "a714f28f239c2b5ec662cfbaadc61203680de5ac0f090841960dc1617e8dfcec" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a756c3aec5df02f365d8a7a42372bc461b9f80132328f6041b299fde1a3d1af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "343a27e3b76e161887adc165e9867a8b639d6def4d3d65757c7d2dae91ac76c3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + system bin/"procs", "--gen-completion", "bash" + system bin/"procs", "--gen-completion", "fish" + system bin/"procs", "--gen-completion", "zsh" + bash_completion.install "procs.bash" => "procs" + fish_completion.install "procs.fish" + zsh_completion.install "_procs" + end + + test do + output = shell_output(bin/"procs") + count = output.lines.count + assert count > 2 + assert output.start_with?(" PID:") + end +end diff --git a/Formula/p/proctools.rb b/Formula/p/proctools.rb new file mode 100644 index 0000000000000..6908950a2e573 --- /dev/null +++ b/Formula/p/proctools.rb @@ -0,0 +1,56 @@ +class Proctools < Formula + desc "OpenBSD and Darwin versions of pgrep, pkill, and pfind" + homepage "https://proctools.sourceforge.net/" + url "https://downloads.sourceforge.net/project/proctools/proctools/0.4pre1/proctools-0.4pre1.tar.gz" + sha256 "4553b9c6eda959b12913bc39b6e048a8a66dad18f888f983697fece155ec5538" + license all_of: ["BSD-3-Clause", "BSD-4-Clause-UC"] + + livecheck do + url :stable + regex(%r{url=.*?/proctools/[^/]+/proctools[._-]v?(\d+(?:\.\d+)+(?:pre\d+)?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a04c37c6e995cbce8ff70386029b5b3a00c61cbd1e9c7399cbb177670035df8d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9cc18c0b6d9837cad062ce69de2544bf534d4bcc7380230b81ac126dc2ca4be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5be8d4a80309fe84a132613a2338daa436e041b98569d0846648fc6e35e3d452" + sha256 cellar: :any_skip_relocation, arm64_ventura: "954a65be7f21a18e1defc733342a049bef559402c5b14b8fb8879cff05cb7af5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e7616c8fd8dae9c8eed3686b7bf76cf2ecd46b44ba8b0cfed12c22c9f3f18c69" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "526b231a9b0d8e8d2a4155507bc77e2cc3dab60a6905c44c3371839b391e0b74" + sha256 cellar: :any_skip_relocation, sonoma: "05aed8b98b5faf6ac1e0026998e7ab30de66318c9165bd4efb78ff35eecb7473" + sha256 cellar: :any_skip_relocation, ventura: "7beaae2873e1c6c390b4a9471ea9bc4f16cb4a4f591a7ba5119546ab46169132" + sha256 cellar: :any_skip_relocation, monterey: "9bdbe7d4b78f52517f8c215c2aea77a49e988d9fb473d6277b5dbe1cc4b737e4" + sha256 cellar: :any_skip_relocation, big_sur: "3a8ffd535edba47371a0617666b6eced7b0b13c4b27b4303b483d71f07de2e04" + sha256 cellar: :any_skip_relocation, catalina: "f0fe70530d22c270ac3d5a105f2dbbbb0dc6a664acd03f3ad7da3f86255fd548" + end + + depends_on "bsdmake" => :build + depends_on :macos + + # Patches via MacPorts + { + "pfind-Makefile" => "d3ee204bbc708ee650b7310f58e45681c5ca0b3c3c5aa82fa4b402f7f5868b11", + "pfind-pfind.c" => "88f1bc60e3cf269ad012799dc6ddce27c2470eeafb7745bc5d14b78a2bdfbe96", + "pgrep-Makefile" => "f7f2bc21cab6ef02a89ee9e9f975d6a533d012b23720c3c22e66b746beb493fb", + "pkill-Makefile" => "bac12837958bc214234d47abe204ee6ad0da2d69440cf38b1e39ab986cc39d29", + "proctools-fmt.c" => "1a95516de3b6573a96f4ec4be933137e152631ad495f1364c1dd5ce3a9c79bc8", + "proctools-proctools.c" => "1d08e570cc32ff08f8073308da187e918a89a783837b1ea20735ea25ae18bfdb", + "proctools-proctools.h" => "7c2ee6ac3dc7b26fb6738496fbabb1d1d065302a39207ae3fbacb1bc3a64371a", + }.each do |name, sha| + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/proctools/patch-#{name}.diff" + sha256 sha + end + end + + def install + system "bsdmake", "PREFIX=#{prefix}" + + ["pgrep/pgrep", "pkill/pkill", "pfind/pfind"].each do |prog| + bin.install prog + man1.install prog + ".1" + end + end +end diff --git a/Formula/p/procyon-decompiler.rb b/Formula/p/procyon-decompiler.rb new file mode 100644 index 0000000000000..a3511eb271557 --- /dev/null +++ b/Formula/p/procyon-decompiler.rb @@ -0,0 +1,36 @@ +class ProcyonDecompiler < Formula + desc "Modern decompiler for Java 5 and beyond" + homepage "https://github.com/mstrobel/procyon" + url "https://github.com/mstrobel/procyon/releases/download/v0.6.0/procyon-decompiler-0.6.0.jar" + sha256 "821da96012fc69244fa1ea298c90455ee4e021434bc796d3b9546ab24601b779" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "6d383fdfc3e0cd6e98271bc33299c2553943305e40c4cc48b127ab4157dff604" + end + + depends_on "openjdk@21" + + def install + libexec.install "procyon-decompiler-#{version}.jar" + bin.write_jar_script libexec/"procyon-decompiler-#{version}.jar", "procyon-decompiler", java_version: "21" + end + + test do + fixture = <<~JAVA + class T + { + public static void main(final String[] array) { + System.out.println("Hello World!"); + } + } + JAVA + + (testpath/"T.java").write fixture + system Formula["openjdk@21"].bin/"javac", "T.java" + assert_match fixture, shell_output("#{bin}/procyon-decompiler T.class") + end +end diff --git a/Formula/p/prodigal.rb b/Formula/p/prodigal.rb new file mode 100644 index 0000000000000..af17564ab6e7b --- /dev/null +++ b/Formula/p/prodigal.rb @@ -0,0 +1,72 @@ +class Prodigal < Formula + desc "Microbial gene prediction" + homepage "https://github.com/hyattpd/Prodigal" + url "https://github.com/hyattpd/Prodigal/archive/refs/tags/v2.6.3.tar.gz" + sha256 "89094ad4bff5a8a8732d899f31cec350f5a4c27bcbdd12663f87c9d1f0ec599f" + license "GPL-3.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "53b753a4ebac8132ae38ba5c35f9c5466ea322b76bb87d4b408a11ace114ae9f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0586dd1f22c8cdb1ed73c2eefc20f80ff3ad711cfb16e2f72ca7f72798161f51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7dfefaef30d736f08630c536dc66bfe2608c36793dde08eea5b3d13d3d7ff76f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a790b0ef414bf71bd6382b1e7e2acee149988003a3def80085c4ae555e436ed0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bcf9c5deb46b542d95f4bcca4f4f947d60fee5138b76eab5018b61eb6f86279d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "abcf0f632ae6187b7b29e2ebd9680717c3678d3e2694b87840591a0f51d4db09" + sha256 cellar: :any_skip_relocation, sonoma: "4430b671ce9d701a63214ed2f557cdd60ff9cf0809de53f494cc8709705cfd5a" + sha256 cellar: :any_skip_relocation, ventura: "8b27c484b78ade21719983f96701441033f3c8bc409f12db3678a4da740b108e" + sha256 cellar: :any_skip_relocation, monterey: "19a6b172b25f41612c11427cb12b19cca27580935c756ac5337c9bce27e3b4a5" + sha256 cellar: :any_skip_relocation, big_sur: "5f61811f05bc3e784428dd1ece760e6375f2624b103393e1809ece54659d440c" + sha256 cellar: :any_skip_relocation, catalina: "5cebc25d98ba4439aa810c4e05c9f30e7ecf768035d135d0989cf58c18517a87" + sha256 cellar: :any_skip_relocation, arm64_linux: "82c184c80fe91b972ed50eccdbc1c80e99438d577f9a8decbe2083ae15a09b5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9974eaeb5029133abe08d54412f419ea1159eda1dba47a6c89ee661e865285b2" + end + + # Prodigal will have incorrect output if compiled with certain compilers. + # This will be fixed in the next release. Also see: + # https://github.com/hyattpd/Prodigal/issues/34 + # https://github.com/hyattpd/Prodigal/issues/41 + # https://github.com/hyattpd/Prodigal/pull/35 + patch do + on_linux do + url "https://github.com/hyattpd/Prodigal/commit/cbbb5db21d120f100724b69d5212cf1275ab3759.patch?full_index=1" + sha256 "fd292c0a98412a7f2ed06d86e0e3f96a9ad698f6772990321ad56985323b99a6" + end + end + + # Avoid undefined behavior accessing array at index -1 + patch :DATA + + def install + system "make", "install", "INSTALLDIR=#{bin}" + end + + test do + fasta = <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + assert_match "CDS", pipe_output("#{bin}/prodigal -q -p meta", fasta, 0) + end +end + +__END__ +diff --git a/main.c b/main.c +index 0834a07..712135d 100644 +--- a/main.c ++++ b/main.c +@@ -556,7 +556,7 @@ int main(int argc, char *argv[]) { + score_nodes(seq, rseq, slen, nodes, nn, meta[i].tinf, closed, is_meta); + record_overlapping_starts(nodes, nn, meta[i].tinf, 1); + ipath = dprog(nodes, nn, meta[i].tinf, 1); +- if(nodes[ipath].score > max_score) { ++ if(ipath >= 0 && nodes[ipath].score > max_score) { + max_phase = i; + max_score = nodes[ipath].score; + eliminate_bad_genes(nodes, ipath, meta[i].tinf); diff --git a/Formula/p/profanity.rb b/Formula/p/profanity.rb new file mode 100644 index 0000000000000..e3aa1677cc5a5 --- /dev/null +++ b/Formula/p/profanity.rb @@ -0,0 +1,68 @@ +class Profanity < Formula + desc "Console based XMPP client" + homepage "https://profanity-im.github.io" + url "https://profanity-im.github.io/tarballs/profanity-0.15.1.tar.gz" + sha256 "c1e28a849aa178fd1ec5f384b0f8bdd244bce453dc4ef7bb76d0830382fec304" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "f9b9d4492654717f9424c1e2f791a7090ca707aa0717890e7817934ad66692eb" + sha256 arm64_sequoia: "c0b93ead858fcc1b75252816960ed823229b1a26e13c23acf2fd9e6cf3e319aa" + sha256 arm64_sonoma: "dfc08a97ed654765ec4e180b4be29f27997f44460c8b8cb00a86d5bd53f3b886" + sha256 sonoma: "8992d942be22bb4ea9907fd43400795c022881ce0bca0502a80396eadfe90a8d" + sha256 arm64_linux: "6d086793018f24cefa935a296be7b985a5fd749f16ed91f20f68b258c061fe50" + sha256 x86_64_linux: "d71c0460eeeb71db2e81733d8745386265154e77329080a71d26733a5b58ecfe" + end + + head do + url "https://github.com/profanity-im/profanity.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "libomemo-c" => :build + depends_on "pkgconf" => :build + + depends_on "curl" + depends_on "glib" + depends_on "gnutls" + depends_on "gpgme" + depends_on "libgcrypt" + depends_on "libotr" + depends_on "libstrophe" + depends_on "python@3.14" + depends_on "readline" + depends_on "sqlite" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + depends_on "libassuan" + depends_on "libgpg-error" + depends_on "terminal-notifier" + end + + def install + ENV.prepend_path "PATH", Formula["python@3.14"].opt_libexec/"bin" + + system "./bootstrap.sh" if build.head? + + # We need to pass `BREW` to `configure` to make sure it can be found inside the sandbox in non-default + # prefixes. `configure` knows to check `/opt/homebrew` and `/usr/local`, but the sanitised build + # environment will prevent any other `brew` installations from being found. + system "./configure", "--disable-silent-rules", + "--enable-python-plugins", + "BREW=#{HOMEBREW_BREW_FILE}", + *std_configure_args + system "make", "install" + end + + test do + system bin/"profanity", "-v" + end +end diff --git a/Formula/p/proftpd.rb b/Formula/p/proftpd.rb new file mode 100644 index 0000000000000..40113c066d20b --- /dev/null +++ b/Formula/p/proftpd.rb @@ -0,0 +1,98 @@ +class Proftpd < Formula + desc "Highly configurable GPL-licensed FTP server software" + homepage "http://www.proftpd.org/" + url "https://github.com/proftpd/proftpd/archive/refs/tags/v1.3.9.tar.gz" + mirror "https://fossies.org/linux/misc/proftpd-1.3.9.tar.gz/" + sha256 "4a5f13b666226813b4da0ade34535d325e204ab16cf8008c7353b1b5a972f74b" + license "GPL-2.0-or-later" + + # Proftpd uses an incrementing letter after the numeric version for + # maintenance releases. Versions like `1.2.3a` and `1.2.3b` are not alpha and + # beta respectively. Prerelease versions use a format like `1.2.3rc1`. + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+[a-z]?)/i) + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "0403d12abcf2e2503d5a0cb195188de6ad4f9276d99b7f80b39da7c5fc815ccf" + sha256 arm64_sequoia: "4e369912c18c4ea78435f13a74ce45180e656d04290f20ff398443de3a68ee9b" + sha256 arm64_sonoma: "12eff8d0547d82048f227c50da34717e7595a7a07ac784ae5c2978ce676b0328" + sha256 sonoma: "294004644b0e2d4799b1e4753c2ef6cc44a93001b017a7d177be890cf79a647a" + sha256 arm64_linux: "8d1a0954158c3c5fad4e736cf9ddb60802cf8e1fe8317d70ea3ba766b3ba2c30" + sha256 x86_64_linux: "cf38eeacafb8c58b2a3e5e1bc2fb67426dfe0f65ce7d13d037edacd41f834f3e" + end + + depends_on "inetutils" => :test + + uses_from_macos "libxcrypt" + + on_macos do + depends_on "gettext" + end + + def install + install_user = ENV["USER"] + install_group = Utils.safe_popen_read("groups").split.first + + # MacOS nobody/nogroup have negative uid/gid which causes errors when running service + # Linux also blame about uid e.g. unable to set UID to 65534, current UID: 1000 + # So, we replace them with the user and group used for installation + inreplace "sample-configurations/basic.conf" do |s| + s.gsub! "nobody", install_user + s.gsub! "nogroup", install_group + end + + system "./configure", "--prefix=#{prefix}", + "--sbindir=#{sbin}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "--enable-nls" + ENV.deparallelize + system "make", "all" + system "make", "INSTALL_USER=#{install_user}", "INSTALL_GROUP=#{install_group}", "install" + end + + service do + run [opt_sbin/"proftpd", "--nodaemon"] + keep_alive false + working_dir HOMEBREW_PREFIX + log_path File::NULL + error_log_path File::NULL + end + + test do + assert_match version.to_s, shell_output("#{opt_sbin}/proftpd --version") + + port = free_port + install_user = ENV["USER"] + install_group = Utils.safe_popen_read("groups").split.first + (testpath/"proftpd.conf").write <<~EOS + ServerName Homebrew-Test + ServerType standalone + DefaultServer on + Port #{port} + UseIPv6 off + Umask 022 + MaxInstances 3 + User #{install_user} + Group #{install_group} + ScoreboardFile #{testpath}/proftpd.scoreboard + PidFile #{testpath}/proftpd.pid + EOS + + pid = spawn sbin/"proftpd", "--config", testpath/"proftpd.conf", "--nodaemon" + sleep 2 + output = pipe_output( + "#{Formula["inetutils"].opt_bin}/ftp --no-login --no-prompt --verbose", + "open 127.0.0.1 #{port}\nuser anonymous anonymous\nquit\n", + 0, + ) + assert_match "Connected to 127.0.0.1.\n220 ProFTPD Server (Homebrew-Test)", output + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/p/prog8.rb b/Formula/p/prog8.rb new file mode 100644 index 0000000000000..468cb3fcd757a --- /dev/null +++ b/Formula/p/prog8.rb @@ -0,0 +1,39 @@ +class Prog8 < Formula + desc "Compiled programming language targeting the 8-bit 6502 CPU family" + homepage "https://prog8.readthedocs.io" + url "https://github.com/irmen/prog8/archive/refs/tags/v11.4.1.tar.gz" + sha256 "a1d2dfd962d4919075472235f11fd06aa4b07f3b91ca0f9fb1ef5b8593907ab4" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68ce0b74ba490aef44454b33b8221ad0e335570395b29c0f428287e276a055f8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f4a669c0fc9201cb272b01b57daac522ab9b92596f2a1d1ef454f1c82c7b018" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d0e7a40e01fa2f9834773f50bad5d585e2e65d3feaa7ec73bbff359397203ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd92a487b7018f9708b811f302a6de44f01323bed5f1c2f7447baa7b830a7c15" + sha256 cellar: :any_skip_relocation, sonoma: "14ca83ff9ca7cc7563514d5a43441998d9fe9bbdb148a29422223e3e3bd687e0" + sha256 cellar: :any_skip_relocation, ventura: "f722698eec16f7873de512ff8f8f45419eff863bbd81ca324a39150c959ece13" + sha256 cellar: :any_skip_relocation, arm64_linux: "bdfd39ecd1a7ec2ccb57cb7120ea07f6f5a1274fcff40fcf2ff7df0f9bba5f8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bd4f3b4d848521fcd2d8ce102e0f9b1c5101f0b362c7f516dbeb9582038fda3" + end + + depends_on "gradle" => :build + depends_on "kotlin" => :build + + depends_on "openjdk" + depends_on "tass64" + + def install + system "gradle", "installDist" + + libexec.install Dir["compiler/build/install/prog8c/*"] + (bin/"prog8c").write_env_script libexec/"bin/prog8c", JAVA_HOME: Formula["openjdk"].opt_prefix + rm_r(libexec/"bin/prog8c.bat") + + pkgshare.install "examples" + end + + test do + system bin/"prog8c", "-target", "c64", "#{pkgshare}/examples/primes.p8" + assert_match "; 6502 assembly code for 'primes'", File.open(testpath/"primes.asm").first + end +end diff --git a/Formula/p/progress.rb b/Formula/p/progress.rb new file mode 100644 index 0000000000000..af8cf16d33bfe --- /dev/null +++ b/Formula/p/progress.rb @@ -0,0 +1,42 @@ +class Progress < Formula + desc "Coreutils progress viewer" + homepage "https://github.com/Xfennec/progress" + url "https://github.com/Xfennec/progress/archive/refs/tags/v0.17.tar.gz" + sha256 "ee9538fce98895dcf0d108087d3ee2e13f5c08ed94c983f0218a7a3d153b725d" + license "GPL-3.0-or-later" + head "https://github.com/Xfennec/progress.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8c2f2b8662edb63080b92379916d9a3baf7e79147bdcaac1e5ce734d883eb20a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f661615f320a4ac93f492d247054c8e244b2a234f37b3a7d7852f2b4541ab927" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d7b757f8bcc4961b40058126f0614470418e55ac6fead877cdd8e4f98684a32" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4102bb16c1bf18d9d0a46b8a170cef1f0b1032ec07f0835de750b2f998d03393" + sha256 cellar: :any_skip_relocation, arm64_monterey: "11cff7ffa2580585d9fab4f550d1229a59337dcddf07a1e7980b46b473bfd4b0" + sha256 cellar: :any_skip_relocation, sonoma: "69d736301d682b39561e659e6a7a37f886cf842dcced3dd7856c32947eee6995" + sha256 cellar: :any_skip_relocation, ventura: "c838dd67490a7aaf419ca5e538b699c895b42911d4c8998876258648b8eb06f2" + sha256 cellar: :any_skip_relocation, monterey: "b91471bcf961169742cca485c90b52dd6be8cfb0f9ef8b5169124309d2143f7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca13d94aa5c8ad7eb020650e96c0d120a72d1e9e8ef4c656febd2e6595b188bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86cdd8365a105b82a4ab6a8f041bdc8c1dc277ce12eb06626f32e484636b5a78" + end + + depends_on "pkgconf" => :build + uses_from_macos "ncurses" + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + pid = spawn "/bin/dd", "if=/dev/urandom", "of=foo", "bs=512", "count=1048576" + sleep 1 + begin + assert_match "dd", shell_output(bin/"progress") + ensure + Process.kill 9, pid + Process.wait pid + rm "foo" + end + end +end diff --git a/Formula/p/progressline.rb b/Formula/p/progressline.rb new file mode 100644 index 0000000000000..45e067c5d779a --- /dev/null +++ b/Formula/p/progressline.rb @@ -0,0 +1,40 @@ +class Progressline < Formula + desc "Track commands progress in a compact one-line format" + homepage "https://github.com/kattouf/ProgressLine" + url "https://github.com/kattouf/ProgressLine/archive/refs/tags/0.2.4.tar.gz" + sha256 "6649fa7d9b840bf8af2ddef3819c6c99b883dd1e0ca349e6d8bdb93985cb00fa" + license "MIT" + head "https://github.com/kattouf/ProgressLine.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6e82f5a1a3adf652f5e8bd8b6941507eb9fd2b995ec36fb5a673c66208c128d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "045e5418e7f4e6b95b5466c1305de384ebe61c46751d945ab9b85e2eff18dd06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4de062267b1d1ee13d97e9b1b9413f8eb6b921fb586a22ec35603de6bc3a799" + sha256 cellar: :any, arm64_ventura: "0ae3e7443b2d0f26ca6a2707cc5190a8ec2e1a939076fdf4fdd319b37e13fca3" + sha256 cellar: :any_skip_relocation, sonoma: "e1e76d606b4aae24fc61ba66a3a4cc4014efe3390a1bd89f022546bdfaf4ca67" + sha256 cellar: :any, ventura: "b9d20a041aa6b083706306d87490f0f831d0747317037c912537ad50f37c2693" + sha256 cellar: :any_skip_relocation, arm64_linux: "826e2a32265a039262ed40703e99acbad76a8b4db2762b723a3baecdb997cbd0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff927b499b1881aad2a4f5f0ce1bcc86c72b5b7fc34a0b85303a31928b124105" + end + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "--configuration", "release" + bin.install ".build/release/progressline" + generate_completions_from_executable(bin/"progressline", "--generate-completion-script") + end + + test do + some_command_multiline_output = "First line\nSecond line\nLast line" + assert_match "✓ 0s ❯ Last line", pipe_output(bin/"progressline", some_command_multiline_output).chomp + end +end diff --git a/Formula/p/proguard.rb b/Formula/p/proguard.rb new file mode 100644 index 0000000000000..6c394ee4f049d --- /dev/null +++ b/Formula/p/proguard.rb @@ -0,0 +1,45 @@ +class Proguard < Formula + desc "Java class file shrinker, optimizer, and obfuscator" + homepage "https://www.guardsquare.com/en/products/proguard" + url "https://github.com/Guardsquare/proguard/releases/download/v7.8.1/proguard-7.8.1.tar.gz" + sha256 "57133f21ba8f0abcf0b173060861f150498940428791cd97512f4b68a6dae14b" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, all: "cae9ecd4863737c4fc34f59608f26d3fdb2783b76d82ecb15e6b2370efa218d6" + end + + depends_on "openjdk" + + conflicts_with cask: "android-commandlinetools", because: "both install `retrace` binaries" + + def install + libexec.install "lib/proguard.jar" + libexec.install "lib/proguardgui.jar" + libexec.install "lib/retrace.jar" + bin.write_jar_script libexec/"proguard.jar", "proguard" + bin.write_jar_script libexec/"proguardgui.jar", "proguardgui" + bin.write_jar_script libexec/"retrace.jar", "retrace" + end + + test do + expect = <<~EOS + ProGuard, version #{version} + Usage: java proguard.ProGuard [options ...] + EOS + assert_equal expect, shell_output(bin/"proguard", 1) + + expect = <<~EOS + Picked up _JAVA_OPTIONS: #{ENV["_JAVA_OPTIONS"]} + Usage: java proguard.retrace.ReTrace [-regex ] [-allclassnames] [-verbose] [] + EOS + assert_match expect, pipe_output("#{bin}/retrace 2>&1") + end +end diff --git a/Formula/p/proj.rb b/Formula/p/proj.rb new file mode 100644 index 0000000000000..58c366774d8d8 --- /dev/null +++ b/Formula/p/proj.rb @@ -0,0 +1,71 @@ +class Proj < Formula + desc "Cartographic Projections Library" + homepage "https://proj.org/" + url "https://github.com/OSGeo/PROJ/releases/download/9.7.0/proj-9.7.0.tar.gz" + sha256 "65705ecd987b50bf63e15820ce6bd17c042feaabda981249831bd230f6689709" + license "MIT" + head "https://github.com/OSGeo/proj.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "3f2a261bb59caa3ee347be881638ddcfc12b9ca17932083875dfe349cdbc9c92" + sha256 arm64_sequoia: "fca0806f8cd6cb3adda9773905223b8d54953358ab13f3d09e51f2f4cc375b64" + sha256 arm64_sonoma: "294eef8e71361edbff6b498ce36836371fb3649b0daa948164aa0fd3f28ff5b2" + sha256 sonoma: "2bf1a69543056eba5438bec66b6c5db2b6a72c111242f2d2211e20d2d2a7f468" + sha256 arm64_linux: "7e01531f786ca1ddf9ff91a5b272727264ed26488f76cd74e1ce668f3e538169" + sha256 x86_64_linux: "b41f77cb6e2425428d1524a43d635e8a7b648196854a4fde4e424a32779a836a" + end + + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libtiff" + + uses_from_macos "curl" + uses_from_macos "sqlite" + + conflicts_with "blast", because: "both install a `libproj.a` library" + + skip_clean :la + + # The datum grid files are required to support datum shifting + resource "proj-data" do + url "https://github.com/OSGeo/PROJ-data/releases/download/1.23.0/proj-data-1.23.zip" + mirror "https://download.osgeo.org/proj/proj-data-1.23.zip" + sha256 "f5cac6342566cfa7481ed6f2be24e1cb2f6d7e17544edb9fc829fca25ddcc4a8" + + livecheck do + url "https://download.osgeo.org/proj/" + regex(/href=.*?proj-data[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "static", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "static" + lib.install Dir["static/lib/*.a"] + resource("proj-data").stage do + cp_r Dir["*"], pkgshare + end + end + + test do + (testpath/"test").write <<~EOS + 45d15n 71d07w Boston, United States + 40d40n 73d58w New York, United States + 48d51n 2d20e Paris, France + 51d30n 7'w London, England + EOS + match = <<~EOS + -4887590.49\t7317961.48 Boston, United States + -5542524.55\t6982689.05 New York, United States + 171224.94\t5415352.81 Paris, France + -8101.66\t5707500.23 London, England + EOS + + output = shell_output("#{bin}/proj +proj=poly +ellps=clrk66 -r #{testpath}/test") + assert_equal match, output + end +end diff --git a/Formula/p/projectable.rb b/Formula/p/projectable.rb new file mode 100644 index 0000000000000..f64bbea43c49b --- /dev/null +++ b/Formula/p/projectable.rb @@ -0,0 +1,67 @@ +class Projectable < Formula + desc "TUI file manager built for projects" + homepage "https://dzfrias.dev/blog/projectable" + url "https://github.com/dzfrias/projectable/archive/refs/tags/1.3.2.tar.gz" + sha256 "8677aa186b50e28ae1addaa9178b65de9e07b3fcd54056fd92464b49c9f71312" + license "MIT" + head "https://github.com/dzfrias/projectable.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b1841396e1fbe48ea92b634be22e4c1f15356fda280eacb4cadf3c5795c29cbe" + sha256 cellar: :any, arm64_sequoia: "f355d14b2034c1fb76bf40a0ac128cb5676f234169393a61de59ae51e77da776" + sha256 cellar: :any, arm64_sonoma: "0eafa10a8ae0d7b2a90f70145efb71a517609fa31e09ee10b7fe734201965f0c" + sha256 cellar: :any, arm64_ventura: "a288dcbf708ffeb16c512655d9426e801553471fee1c095a6d2d329f41ccb6ec" + sha256 cellar: :any, sonoma: "69ff855f70534030139cdda5c4097aa271b15d3d1a0fb0f12455fa6c1e35e94a" + sha256 cellar: :any, ventura: "9e4c0a031c0e5a51107f68cceaa6840ef7a39fbcd434d1ec04b80a8b891a2cc9" + sha256 cellar: :any_skip_relocation, arm64_linux: "94f11e18c380dbb5abb93f6d4869b17e28703cec992939d30e86f9c2583f7683" + sha256 cellar: :any_skip_relocation, x86_64_linux: "136b8c39fe40e6103870b2b193562107b86302613337bce7892b24dcb2007515" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + require "utils/linkage" + + system bin/"prj", "--version" + + # Fails in Linux CI with "No such device or address (os error 6)" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + begin + output_log = testpath/"output.log" + pid = spawn bin/"prj", testpath, [:out, :err] => output_log.to_s + sleep 1 + assert_match "output.log", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"prj", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/p/projectm.rb b/Formula/p/projectm.rb new file mode 100644 index 0000000000000..171d61389c48b --- /dev/null +++ b/Formula/p/projectm.rb @@ -0,0 +1,85 @@ +class Projectm < Formula + desc "Milkdrop-compatible music visualizer" + homepage "https://github.com/projectM-visualizer/projectm" + url "https://github.com/projectM-visualizer/projectm/releases/download/v3.1.12/projectM-3.1.12.tar.gz" + sha256 "b6b99dde5c8f0822ae362606a0429628ee478f4ec943a156723841b742954707" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "7f0815b03bcecd38afe7c9a8750a0822d9a17646c7e92f420e0fedb096c2709c" + sha256 arm64_sequoia: "a579de759ddbc2ca8b39a3dfc1cd7d2b936369790efaeda1c59efdbd63db5b2f" + sha256 arm64_sonoma: "a854f24612ce8bd9456d71f42d0e02bdca89fe39e4d8a4009f56f06536255f72" + sha256 arm64_ventura: "f3f6b5e3b0d40bcc55658e7f06f16ae49eb4cdc449772b5dc526a84e40c965e0" + sha256 arm64_monterey: "a8dae00eb95d2123fda97a19085933944cc35cc1bb2eceaad0b2bb8555e4f961" + sha256 arm64_big_sur: "4124ed10310e00ab4d706dcf40814adf0497af26cc95733aec708b82f4aaeced" + sha256 sonoma: "22a8e128f8a99fa09e7b99ad12cdb6da037e9417beb4f6ae4a712ed096d7f214" + sha256 ventura: "68f9b93a6f6abef42c42bbcc8a70be06fb9845bf1caa5b68cd7e14beba13ca5f" + sha256 monterey: "473cd386b1daec76f796cffff2c29b6b6cc57f749a517f91cc5466a7ccc2fd81" + sha256 big_sur: "c8ece4df06966643cf9aaae5f31610b98eaacddbfb7b0e56b21531d5e2f8f1a5" + sha256 catalina: "8d11933c220cde67c4515ee5d42d99bc8e1c18479a4d3b746074c6080712cf0f" + sha256 arm64_linux: "c3813a64b58332351ad6fe801cd1ede4ac96bdc17d6eaae7937571e149f6a253" + sha256 x86_64_linux: "05caf42b3d5a023b4c22e2f51e7699645cc5077fbd37c7c27f1f8260025d608b" + end + + head do + url "https://github.com/projectM-visualizer/projectm.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => [:build, :test] + depends_on "sdl2" + + on_linux do + depends_on "mesa" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_path_exists prefix/"share/projectM/config.inp" + assert_path_exists prefix/"share/projectM/presets" + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() + { + // initialize SDL video + openGL + if (SDL_Init(SDL_INIT_VIDEO) < 0) + { + fprintf(stderr, "Video init failed: %s", SDL_GetError()); + return 1; + } + atexit(SDL_Quit); + + SDL_Window *win = SDL_CreateWindow("projectM Test", 0, 0, 320, 240, + SDL_WINDOW_OPENGL | SDL_WINDOW_ALLOW_HIGHDPI); + SDL_GLContext glCtx = SDL_GL_CreateContext(win); + + auto *settings = new projectM::Settings(); + auto *pm = new projectM(*settings, projectM::FLAG_DISABLE_PLAYLIST_LOAD); + + // if we get this far without crashing we're in good shape + return 0; + } + CPP + flags = shell_output("pkgconf libprojectM sdl2 --cflags --libs").split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + + # Fails in Linux CI with "Video init failed: No available video device" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "./test" + end +end diff --git a/Formula/p/prometheus-cpp.rb b/Formula/p/prometheus-cpp.rb new file mode 100644 index 0000000000000..c84478cd3b7c3 --- /dev/null +++ b/Formula/p/prometheus-cpp.rb @@ -0,0 +1,47 @@ +class PrometheusCpp < Formula + desc "Prometheus Client Library for Modern C++" + homepage "https://github.com/jupp0r/prometheus-cpp" + url "https://github.com/jupp0r/prometheus-cpp/releases/download/v1.3.0/prometheus-cpp-with-submodules.tar.gz" + sha256 "62bc2cc9772db2314dbaae506ae2a75c8ee897dab053d8729e86a637b018fdb6" + license "MIT" + revision 1 + head "https://github.com/jupp0r/prometheus-cpp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a31529be0b28fd1105ef7303ea057fd2da2bf90952b90147181fc36ec9f274d2" + sha256 cellar: :any, arm64_sequoia: "67fe748cad481abce5867c7402ea31ad4deaee191260205d8800abf5a892c3d4" + sha256 cellar: :any, arm64_sonoma: "ab7bf9c8c6814af4fe56d2a669a602dbf2f3a802685527308c1d03d19772fd58" + sha256 cellar: :any, arm64_ventura: "a57c78acfdc6c2da03a6a86bfc67a198d171d0c6769cb4435efd51c07e36d8aa" + sha256 cellar: :any, sonoma: "e8ee4564c89feef24f7abf08bd218dc6b69de9f40ebc69fc178f67661bc40c99" + sha256 cellar: :any, ventura: "8d82c34b65dbc59e5b0817bc4cbe22745e2ba39eef9b2579b39cb31f55b51f9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "4093c9bee3ed15272957c3254c042fe99bbb85e8d8dfe0614a072c46d36f7525" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ed60a657d6508498016fb99c917682d5c5cf7c3931eb042d6cb3a248ed6d51b" + end + + depends_on "cmake" => :build + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DENABLE_TESTING=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + prometheus::Registry reg; + return 0; + } + CPP + system ENV.cxx, "-std=c++14", "test.cpp", "-I#{include}", "-L#{lib}", "-lprometheus-cpp-core", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/prometheus.rb b/Formula/p/prometheus.rb new file mode 100644 index 0000000000000..1ada8861e923b --- /dev/null +++ b/Formula/p/prometheus.rb @@ -0,0 +1,90 @@ +class Prometheus < Formula + desc "Service monitoring system and time series database" + homepage "https://prometheus.io/" + url "https://github.com/prometheus/prometheus/archive/refs/tags/v3.7.3.tar.gz" + sha256 "c3f6be8b3198d547c548dc6289f06688c245b46dcc28490e60445b06e5360347" + license "Apache-2.0" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c66eb74bd4067f6221cbfc4736953cdc4094cf2a013b6e74d3f70f25b56eaa3b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb2a66b2d841010db0b71cae9e3096fb78bc6c10cc6d0444e0ad9e93de4aeb03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3ad404c46d44d3bd77d0fcc85b08899793722b675bfa396dedc37602d273e922" + sha256 cellar: :any_skip_relocation, sonoma: "efe3ced7cc9fcdfe836160ba8446ff261029d73415663678ffe440d834d61133" + sha256 cellar: :any_skip_relocation, arm64_linux: "84b0e404edfde54ec6c7594a85db7a7efcb8f9eeb4481d04a45c873846c23ed5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cbcf42ef5e5dc75549cae1b9ac96758d0faa204993bbcd745985332cdce3ee8" + end + + depends_on "gnu-tar" => :build + depends_on "go" => :build + depends_on "node" => :build + depends_on "yarn" => :build + + def install + ENV.deparallelize + ENV.prepend_path "PATH", Formula["gnu-tar"].opt_libexec/"gnubin" + ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin" + mkdir_p buildpath/"src/github.com/prometheus" + ln_sf buildpath, buildpath/"src/github.com/prometheus/prometheus" + + system "make", "assets" + system "make", "build" + bin.install %w[promtool prometheus] + + (bin/"prometheus_brew_services").write <<~EOS + #!/bin/bash + exec #{bin}/prometheus $(<#{etc}/prometheus.args) + EOS + + (buildpath/"prometheus.args").write <<~EOS + --config.file #{etc}/prometheus.yml + --web.listen-address=127.0.0.1:9090 + --storage.tsdb.path #{var}/prometheus + EOS + + (buildpath/"prometheus.yml").write <<~YAML + global: + scrape_interval: 15s + + scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["localhost:9090"] + YAML + etc.install "prometheus.args", "prometheus.yml" + end + + def caveats + <<~EOS + When run from `brew services`, `prometheus` is run from + `prometheus_brew_services` and uses the flags in: + #{etc}/prometheus.args + EOS + end + + service do + run [opt_bin/"prometheus_brew_services"] + keep_alive false + log_path var/"log/prometheus.log" + error_log_path var/"log/prometheus.err.log" + end + + test do + (testpath/"rules.example").write <<~YAML + groups: + - name: http + rules: + - record: job:http_inprogress_requests:sum + expr: sum(http_inprogress_requests) by (job) + YAML + + system bin/"promtool", "check", "rules", testpath/"rules.example" + end +end diff --git a/Formula/p/promptfoo.rb b/Formula/p/promptfoo.rb new file mode 100644 index 0000000000000..1fa1e06ad6803 --- /dev/null +++ b/Formula/p/promptfoo.rb @@ -0,0 +1,38 @@ +class Promptfoo < Formula + desc "Test your LLM app locally" + homepage "https://promptfoo.dev/" + url "https://registry.npmjs.org/promptfoo/-/promptfoo-0.119.2.tgz" + sha256 "32579fd9a8e6c6e1b1c4975aa117cd8be7730b5635603b3fe15cf8de6a5d468f" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4f481e154dff6573c57ebef4d10cbf2b37d6c6f08965c01042fa6b66d0e3a986" + sha256 cellar: :any, arm64_sequoia: "aeb5d5574eae99e874dd26727d8586c59adf2123b0de8e1280b6a707438ff756" + sha256 cellar: :any, arm64_sonoma: "81b8c7100ace23679ab39114b2ee498bde6b63f9fa4396917efe685979262b3c" + sha256 cellar: :any, sonoma: "50fb2ca69d79f47309e5ea85d7703ad0b246a02e3113bc249236de34cf89b6b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e5eba92b39ae5fb8e0615afb38a99551c85637ed6334cb1c03461baefc32a25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "add4800562ee18412b2c432ccb7336058b20ac409ffbfd5bc3ed97a9060b2378" + end + + depends_on "node@24" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binaries + node_modules = libexec/"lib/node_modules/promptfoo/node_modules" + ripgrep_vendor_dir = node_modules/"@anthropic-ai/claude-agent-sdk/vendor/ripgrep" + rm_r(ripgrep_vendor_dir) + end + + test do + ENV["PROMPTFOO_DISABLE_TELEMETRY"] = "1" + + system bin/"promptfoo", "init", "--no-interactive" + assert_path_exists testpath/"promptfooconfig.yaml" + assert_match "description: \"My eval\"", (testpath/"promptfooconfig.yaml").read + + assert_match version.to_s, shell_output("#{bin}/promptfoo --version") + end +end diff --git a/Formula/p/promtail.rb b/Formula/p/promtail.rb new file mode 100644 index 0000000000000..7d63393e709c5 --- /dev/null +++ b/Formula/p/promtail.rb @@ -0,0 +1,66 @@ +class Promtail < Formula + desc "Log agent for Loki" + homepage "https://grafana.com/loki" + url "https://github.com/grafana/loki/archive/refs/tags/v3.5.7.tar.gz" + sha256 "a3ffbdc68f3481444c16a7733e4640718af502bcef25d592e77d03da388c4aa1" + license "AGPL-3.0-only" + head "https://github.com/grafana/loki.git", branch: "main" + + livecheck do + formula "loki" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a90803389587419ce932b5725f5e821696d10e8fd223615703873216cabc182a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b05d363a2b977704d9005efe5c211fdac8c0e902ce5945d848bbabdf4526b746" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8eacdd12a3e96c927dfd5a2123e556e45262f8b2fc7a43d452b64790fab5d113" + sha256 cellar: :any_skip_relocation, sonoma: "ccb75da4b340e2d59b8dd842ad51fc86bc6efeec082c1d36985f597cc1a2d587" + sha256 cellar: :any_skip_relocation, arm64_linux: "32a2da8e803cf28d2a963ba39ce1fd6e3793ca1ea8a064e2beb7df78022bc3ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b030589a4c39de94111373d735030f9e3b45c0560dac088ea566c2507d5dc90a" + end + + depends_on "go" => :build + + on_linux do + depends_on "systemd" + end + + # Fix to link: duplicated definition of symbol dlopen + # PR ref: https://github.com/grafana/loki/pull/17807 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/loki/loki-3.5.1-purego.patch" + sha256 "fbbbaea8e2069ef0a8fc721f592c48bb50f1224d7eff94afe87dfb184692a9b4" + end + + def install + cd "clients/cmd/promtail" do + system "go", "build", *std_go_args(ldflags: "-s -w") + etc.install "promtail-local-config.yaml" + end + end + + service do + run [opt_bin/"promtail", "-config.file=#{etc}/promtail-local-config.yaml"] + keep_alive true + working_dir var + log_path var/"log/promtail.log" + error_log_path var/"log/promtail.log" + end + + test do + port = free_port + + cp etc/"promtail-local-config.yaml", testpath + inreplace "promtail-local-config.yaml" do |s| + s.gsub! "9080", port.to_s + s.gsub!(/__path__: .+$/, "__path__: #{testpath}") + end + + fork { exec bin/"promtail", "-config.file=promtail-local-config.yaml" } + sleep 3 + sleep 3 if OS.mac? && Hardware::CPU.intel? + + output = shell_output("curl -s localhost:#{port}/metrics") + assert_match "log_messages_total", output + end +end diff --git a/Formula/p/proof-general.rb b/Formula/p/proof-general.rb new file mode 100644 index 0000000000000..d2bb881cf9546 --- /dev/null +++ b/Formula/p/proof-general.rb @@ -0,0 +1,61 @@ +class ProofGeneral < Formula + desc "Emacs-based generic interface for theorem provers" + homepage "https://proofgeneral.github.io" + url "https://github.com/ProofGeneral/PG/archive/refs/tags/v4.5.tar.gz" + sha256 "b408ab943cfbfe4fcb0d3322f079f41e2a2d29b50cf0cc704fbb4d5e6c26e3a2" + license "GPL-3.0-or-later" + head "https://github.com/ProofGeneral/PG.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4efbf2e4aacd72d00f58a2f6a0f0748790e44a22af1bf97543c29ce077c133de" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0afc78703aed0f2cdd4ec47dc841b5bf2ecc69b52d7f4a1b3ef7c2189a127b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0c27f7ce047eac700c1aa07cf9a723b54f4bb0d2f62ee2375bde197a5434af9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b87a94e0c06c19d5d57aedd9a628b69a22d559cfd331f563dcb93c02b5f0a402" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b87a94e0c06c19d5d57aedd9a628b69a22d559cfd331f563dcb93c02b5f0a402" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b87a94e0c06c19d5d57aedd9a628b69a22d559cfd331f563dcb93c02b5f0a402" + sha256 cellar: :any_skip_relocation, sonoma: "4c7ea3668b2b0df4de8eb60962f128fdbb26fbf1c7f72511c67a707c3d0c833c" + sha256 cellar: :any_skip_relocation, ventura: "e0f721f16c2c5e2ffa6b7ef00595ab6bdbdeda815f00a04ca30d2df2cc474e8b" + sha256 cellar: :any_skip_relocation, monterey: "e0f721f16c2c5e2ffa6b7ef00595ab6bdbdeda815f00a04ca30d2df2cc474e8b" + sha256 cellar: :any_skip_relocation, big_sur: "e0f721f16c2c5e2ffa6b7ef00595ab6bdbdeda815f00a04ca30d2df2cc474e8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "68fae82f1c9768c66e94b3a413a4b8c17ab7207629e1faf8645593a8bda8cfb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b87a94e0c06c19d5d57aedd9a628b69a22d559cfd331f563dcb93c02b5f0a402" + end + + depends_on "texi2html" => :build + depends_on "texinfo" => :build + depends_on "emacs" + + def install + ENV.deparallelize # Otherwise lisp compilation can result in 0-byte files + + args = %W[ + PREFIX=#{prefix} + DEST_PREFIX=#{prefix} + ELISPP=share/emacs/site-lisp/proof-general + ELISP_START=#{elisp}/site-start.d + EMACS=#{which "emacs"} + ] + + system "make", "install", *args + + cd "doc" do + system "make", "info", "html" + end + man1.install "doc/proofgeneral.1" + info.install "doc/ProofGeneral.info", "doc/PG-adapting.info" + doc.install "doc/ProofGeneral_html", "doc/PG-adapting_html" + end + + def caveats + <<~EOS + HTML documentation is available in: #{HOMEBREW_PREFIX}/share/doc/proof-general + EOS + end + + test do + system bin/"coqtags", "--help" + end +end diff --git a/Formula/p/proper.rb b/Formula/p/proper.rb new file mode 100644 index 0000000000000..8fdfb82ad7c69 --- /dev/null +++ b/Formula/p/proper.rb @@ -0,0 +1,39 @@ +class Proper < Formula + desc "QuickCheck-inspired property-based testing tool for Erlang" + homepage "https://proper-testing.github.io" + url "https://github.com/proper-testing/proper/archive/refs/tags/v1.5.0.tar.gz" + sha256 "68fcc3b23ea98537d7a2b926de688dc347e02804c54d0f8d79ca7092c9456b68" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3dd4b207dc41e3788810712f20a50c614ce31ccafa0d309dbac29fc4f1cc8d1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a639af1f2fb8cb688b919b54037d671b65ecc5ae791ddd8d73ba115af86e135" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a9399e52a16770d3d839cab3d68e563e6d5cdfa978c9fbaefd3681799d64358" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ebfd48008cf6e2414fd327b4417dcd3f178733eb0bf4c8f482820078d606ecf" + sha256 cellar: :any_skip_relocation, sonoma: "b871a437a48e0bd4f35687256c82caff38cc8ed91662daacf465638290dbad49" + sha256 cellar: :any_skip_relocation, ventura: "8121ebc9c4160073387dbdb7012f0c536783f811152220a7b09108ec6777886f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d95538e53374c507c624b17c23e9bc1218d83ad2a8c96006bb941681d7170be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c46ff9ea392d1503cfc49f425fd04ed35376da507fe13985306057715558924" + end + + depends_on "rebar3" => :build + depends_on "erlang" + + def install + system "make" + prefix.install Dir["_build/default/lib/proper/ebin", "include"] + (prefix/"proper-#{version.major_minor}").install_symlink prefix/"ebin", include + end + + def caveats + <<~EOS + To use PropEr in Erlang, you may need: + export ERL_LIBS=#{opt_prefix}/proper-#{version.major_minor} + EOS + end + + test do + output = shell_output("erl -noshell -pa #{opt_prefix}/ebin -eval 'io:write(code:which(proper))' -s init stop") + refute_equal "non_existing", output + end +end diff --git a/Formula/p/proselint.rb b/Formula/p/proselint.rb new file mode 100644 index 0000000000000..d5bf4e61c6500 --- /dev/null +++ b/Formula/p/proselint.rb @@ -0,0 +1,33 @@ +class Proselint < Formula + include Language::Python::Virtualenv + + desc "Linter for prose" + homepage "https://github.com/amperser/proselint" + url "https://files.pythonhosted.org/packages/58/66/bc509b61df9a317689f6a87679f2f9f625f6f02dfb9d0e220bd41f121f07/proselint-0.14.0.tar.gz" + sha256 "624964272bea14767e5df2561d87dd30767938c8cb52fb23585bc37580680e86" + license "BSD-3-Clause" + head "https://github.com/amperser/proselint.git", branch: "main" + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "eca80d4fc32861309f11f5a4c36ae7b2ec898d803e5dba3bb4ac7eed0be5902b" + end + + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"proselint", shell_parameter_format: :click) + end + + test do + output = pipe_output("#{bin}/proselint --compact -", "John is very unique.", 1) + assert_match "Comparison of an uncomparable", output + end +end diff --git a/Formula/p/proteinortho.rb b/Formula/p/proteinortho.rb new file mode 100644 index 0000000000000..02106d5edbcf3 --- /dev/null +++ b/Formula/p/proteinortho.rb @@ -0,0 +1,50 @@ +class Proteinortho < Formula + desc "Detecting orthologous genes within different species" + homepage "https://gitlab.com/paulklemm_PHD/proteinortho" + url "https://gitlab.com/paulklemm_PHD/proteinortho/-/archive/v6.3.6/proteinortho-v6.3.6.tar.gz" + sha256 "2e41c9698bb7eaacdde242233e3a1643b429587d4b458577ecc5be2e752a2be5" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "91f55f765f3656a53a7b3a1725c7998f282544133755ed3eab45df72a28e59eb" + sha256 cellar: :any, arm64_sequoia: "4006d9977aa6a7393f902a01fc9a229258c075f04a6f4bae1167c513f4182dd7" + sha256 cellar: :any, arm64_sonoma: "7cbff76f79a4ccc38517c9c839a7398fa09d3be50040619eb0b5cac6d555d376" + sha256 cellar: :any, arm64_ventura: "14bc4553c7280b330912079c579c06d33a7a2f14d51469638d583088909ed8d5" + sha256 cellar: :any, sonoma: "43fec91bde54c6e2dd98c7638b186f1154994e36333f0bb4d996f5b283341f9c" + sha256 cellar: :any, ventura: "619a56ae341233fc034ad5108375991c3ad44ce35a8d17b072c73b95d126c76e" + sha256 cellar: :any_skip_relocation, arm64_linux: "34176fe378a8eecdb6c09cd40bf4c92344fb528cb60f0b95e5123e8e70e6d4cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b51d536e573f48acbf32d863ed493217e2d9cda3be9c810e1cd0d9301cf87d9" + end + + depends_on "diamond" + depends_on "openblas" + + on_macos do + depends_on "libomp" + end + + def install + ENV.cxx11 + + # Enable OpenMP + if OS.mac? + ENV.append_to_cflags "-Xpreprocessor -fopenmp -I#{Formula["libomp"].opt_include}" + ENV.append "LDFLAGS", "-L#{Formula["libomp"].opt_lib} -lomp" + end + + bin.mkpath + system "make", "install", "PREFIX=#{bin}" + doc.install "manual.html" + pkgshare.install "test" + end + + test do + system bin/"proteinortho", "-test" + system bin/"proteinortho_clustering", "-test" + + # This test exercises OpenMP + cp_r pkgshare/"test", testpath + files = Dir[testpath/"test/*.faa"] + system bin/"proteinortho", *files + end +end diff --git a/Formula/p/proto.rb b/Formula/p/proto.rb new file mode 100644 index 0000000000000..0d03925251249 --- /dev/null +++ b/Formula/p/proto.rb @@ -0,0 +1,67 @@ +class Proto < Formula + desc "Pluggable multi-language version manager" + homepage "https://moonrepo.dev/proto" + url "https://github.com/moonrepo/proto/archive/refs/tags/v0.54.0.tar.gz" + sha256 "dec204e18be7da765af800b5e3634e2fc462a70980bcacdacb4c751059a9842b" + license "MIT" + head "https://github.com/moonrepo/proto.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ad58ea9a8deed173c8c24ba3965b0e12b1efabf20a98be24a4cb125716f3488" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b777c70710f6869c8bea756832e009350af4582ba7af48f6019e99f38aa2067a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "153986ea9cc22697c1f947cbaaba83e849c0ed727eada06641ef21ecb69b1f41" + sha256 cellar: :any_skip_relocation, sonoma: "59c0f3afde2d1b59092e090fb62e57d771da5ae801ca543d12abf90db88dec9f" + sha256 cellar: :any_skip_relocation, arm64_linux: "aae2e1469e6e386b8ccadd197c8b339462884ce699070bdd8fa82799f878f3de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32f5ff6d0d9248e6f9fc8c9ae05a57d680f2f76090ee2ac8890e5115f8efc212" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "openssl@3" + depends_on "xz" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/cli") + generate_completions_from_executable(bin/"proto", "completions", "--shell") + + bin.each_child do |f| + basename = f.basename + + # shimming proto-shim would break any shims proto itself creates, + # it luckily works fine without PROTO_LOOKUP_DIR + next if basename.to_s == "proto-shim" + + (libexec/"bin").install f + # PROTO_LOOKUP_DIR is necessary for proto to find its proto-shim binary + (bin/basename).write_env_script libexec/"bin"/basename, PROTO_LOOKUP_DIR: opt_prefix/"bin" + end + end + + def caveats + <<~EOS + To finish the installation, run: + proto setup + EOS + end + + test do + system bin/"proto", "install", "node", "19.0.1" + node = shell_output("#{bin}/proto bin node").chomp + assert_match "19.0.1", shell_output("#{node} --version") + + path = testpath/"test.js" + path.write "console.log('hello');" + output = shell_output("#{testpath}/.proto/shims/node #{path}").strip + assert_equal "hello", output + end +end diff --git a/Formula/p/protobuf-c.rb b/Formula/p/protobuf-c.rb new file mode 100644 index 0000000000000..d1eea3b8f067b --- /dev/null +++ b/Formula/p/protobuf-c.rb @@ -0,0 +1,54 @@ +class ProtobufC < Formula + desc "Protocol buffers library" + homepage "https://github.com/protobuf-c/protobuf-c" + url "https://github.com/protobuf-c/protobuf-c/releases/download/v1.5.2/protobuf-c-1.5.2.tar.gz" + sha256 "e2c86271873a79c92b58fef7ebf8de1aa0df4738347a8bd5d4e65a80a16d0d24" + license "BSD-2-Clause" + revision 6 + + bottle do + sha256 cellar: :any, arm64_tahoe: "a1a04ba412326f28d61d83f7f4a50f580447fe1402c8ba6c46ef4396f2627463" + sha256 cellar: :any, arm64_sequoia: "ffc3d776736ddcb16b9c050d9cfd43d73cb1493c64aa4505dab7f7d06129580b" + sha256 cellar: :any, arm64_sonoma: "9a1bb30a18c4fcee0807b707df899416c65758324990f31b7b3b1d3935a34c36" + sha256 cellar: :any, sonoma: "fd1d27bc2a7c9c7b7406119407bf973791762a15d70956d116d01d3c85d7745c" + sha256 arm64_linux: "1e541a71b82316d1f6f0bdf3f705bbda55a580a745431dd1a74b64770db161c4" + sha256 x86_64_linux: "195451b729abe5e190ffa718d9d27e685cef16674070a6657e309987808bba3e" + end + + head do + url "https://github.com/protobuf-c/protobuf-c.git", branch: "master" + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "protobuf" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + testdata = <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + PROTO + (testpath/"test.proto").write testdata + system Formula["protobuf"].opt_bin/"protoc", "test.proto", "--c_out=." + + testpath.glob("test.pb-c.*").map(&:unlink) + system bin/"protoc-c", "test.proto", "--c_out=." + end +end diff --git a/Formula/p/protobuf.rb b/Formula/p/protobuf.rb new file mode 100644 index 0000000000000..51c72f4c86ce9 --- /dev/null +++ b/Formula/p/protobuf.rb @@ -0,0 +1,65 @@ +class Protobuf < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://protobuf.dev/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protobuf-33.0.tar.gz" + sha256 "cbc536064706b628dcfe507bef386ef3e2214d563657612296f1781aa155ee07" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "68e78815df265bd26b52c98e9dc54a2be61ccb9096b0faffcd946ef929a9b29d" + sha256 cellar: :any, arm64_sequoia: "c2209942fec8de30bdca4568a4dc0d2c8966012b8d2cfa2fdcf198ea9e67a348" + sha256 cellar: :any, arm64_sonoma: "5e88a2f82b5a8cb8f724923ec4b64f7e172d0b443083932a268e952d60fab5d5" + sha256 cellar: :any, sonoma: "f2178c6185be41da78c713f08126e26b8e7b029b667ff7980213d706446ba487" + sha256 arm64_linux: "8150ba1722485b78d81ad35b11ae05dd279758599be46e80024755c7b35f1adb" + sha256 x86_64_linux: "ae607e3c7968673570431d1f9efdfbbe08ed8e9ccc1e4f8ae4612d4818e753e8" + end + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "abseil" + uses_from_macos "zlib" + + def install + # Keep `CMAKE_CXX_STANDARD` in sync with the same variable in `abseil.rb`. + abseil_cxx_standard = 17 + cmake_args = %W[ + -DCMAKE_CXX_STANDARD=#{abseil_cxx_standard} + -DBUILD_SHARED_LIBS=ON + -Dprotobuf_BUILD_LIBPROTOC=ON + -Dprotobuf_BUILD_SHARED_LIBS=ON + -Dprotobuf_INSTALL_EXAMPLES=ON + -Dprotobuf_BUILD_TESTS=ON + -Dprotobuf_USE_EXTERNAL_GTEST=ON + -Dprotobuf_FORCE_FETCH_DEPENDENCIES=OFF + -Dprotobuf_LOCAL_DEPENDENCIES_ONLY=ON + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", "--verbose" + system "cmake", "--install", "build" + + (share/"vim/vimfiles/syntax").install "editors/proto.vim" + elisp.install "editors/protobuf-mode.el" + end + + test do + (testpath/"test.proto").write <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + PROTO + system bin/"protoc", "test.proto", "--cpp_out=." + end +end diff --git a/Formula/p/protobuf@21.rb b/Formula/p/protobuf@21.rb new file mode 100644 index 0000000000000..e9abbd61ec4b3 --- /dev/null +++ b/Formula/p/protobuf@21.rb @@ -0,0 +1,103 @@ +class ProtobufAT21 < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://protobuf.dev/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protobuf-all-21.12.tar.gz" + sha256 "2c6a36c7b5a55accae063667ef3c55f2642e67476d96d355ff0acb13dbb47f09" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 arm64_tahoe: "65023d2a73ac89c385ff14782c38c1f629828d753d880f8e910a7ee19fc35e47" + sha256 arm64_sequoia: "9a941768e6f914b2c5a412728f3794a49a53b894b3cbe637809df93bc9b521e3" + sha256 arm64_sonoma: "a906fb18cfff9e07a71c34d01c74676ea28290fa6c4cfa26f68e48449abf242a" + sha256 arm64_ventura: "f2997129a1170a2e472499cdfc829c03f8e8613826360837498fc42843f7bb94" + sha256 sonoma: "f14d28a66a3801b28475e4913e9d5515074179ec8eec48c8fea5ec0c829e8f19" + sha256 ventura: "2b155b3335e6db2264fbc0bfb5c1d89a3bc7ac2fd4a15d844d653df8b0aa2858" + sha256 cellar: :any_skip_relocation, arm64_linux: "db77181834de160a35c791b30f45a43cd01c6206784a1d5ff1e7591a52ded2a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2557598e344f5da522d3a819c63cd59a46ed043dc4d9aecfa9b721c162b7778" + end + + keg_only :versioned_formula + + # Support for protoc 21.x (protobuf C++ 3.21.x) ended on 2024-03-31 + # Ref: https://protobuf.dev/support/version-support/#cpp + deprecate! date: "2025-01-08", because: :versioned_formula + disable! date: "2026-01-08", because: :versioned_formula + + depends_on "cmake" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + + uses_from_macos "zlib" + + # Fix build with python@3.11 + patch do + url "https://github.com/protocolbuffers/protobuf/commit/da973aff2adab60a9e516d3202c111dbdde1a50f.patch?full_index=1" + sha256 "911925e427a396fa5e54354db8324c0178f5c602b3f819f7d471bb569cc34f53" + end + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@\d\.\d+$/) } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + cmake_args = %w[ + -Dprotobuf_BUILD_LIBPROTOC=ON + -Dprotobuf_INSTALL_EXAMPLES=ON + -Dprotobuf_BUILD_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-Dprotobuf_BUILD_SHARED_LIBS=ON", + *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "editors/proto.vim" + elisp.install "editors/protobuf-mode.el" + + ENV.append_to_cflags "-I#{include}" + ENV.append_to_cflags "-L#{lib}" + ENV["PROTOC"] = bin/"protoc" + + pip_args = ["--config-settings=--build-option=--cpp_implementation"] + pythons.each do |python| + pyext_dir = prefix/Language::Python.site_packages(python)/"google/protobuf/pyext" + with_env(LDFLAGS: "-Wl,-rpath,#{rpath(source: pyext_dir)} #{ENV.ldflags}".strip) do + system python, "-m", "pip", "install", *pip_args, *std_pip_args(build_isolation: true), "./python" + end + end + + system "cmake", "-S", ".", "-B", "static", + "-Dprotobuf_BUILD_SHARED_LIBS=OFF", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DWITH_PROTOC=#{bin}/protoc", + *cmake_args, *std_cmake_args + system "cmake", "--build", "static" + lib.install buildpath.glob("static/*.a") + end + + test do + testdata = <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + PROTO + (testpath/"test.proto").write testdata + system bin/"protoc", "test.proto", "--cpp_out=." + + pythons.each do |python| + with_env(PYTHONPATH: (prefix/Language::Python.site_packages(python)).to_s) do + system python, "-c", "import google.protobuf" + end + end + end +end diff --git a/Formula/p/protobuf@29.rb b/Formula/p/protobuf@29.rb new file mode 100644 index 0000000000000..eef538b167cbf --- /dev/null +++ b/Formula/p/protobuf@29.rb @@ -0,0 +1,189 @@ +class ProtobufAT29 < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://protobuf.dev/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v29.5/protobuf-29.5.tar.gz" + sha256 "a191d2afdd75997ba59f62019425016703daed356a9d92f7425f4741439ae544" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(29(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bd19655ceb70bf16498679c0ae2b3cc6a5fe120757ba3849427cd05b382c0a8c" + sha256 cellar: :any, arm64_sequoia: "528c423462116bb411a5da6b965361d4ad205ca0b6b53434efc4acbd3d5e87bd" + sha256 cellar: :any, arm64_sonoma: "92323b0b9e90b9431c6c9f3c6f6b048e2f9439da2e5bc36a1ef0a5a633fd7387" + sha256 cellar: :any, arm64_ventura: "363d21aa93375caf21806c54c3da022f1bb880729dc87d0171a6731e4692dbdc" + sha256 cellar: :any, sonoma: "da3395782f6666eba1a9c48b159e6ccfaa26e4ce7c6c37101168b1d5d885ec00" + sha256 cellar: :any, ventura: "83642e846f15ceb4211e66ec55aefdb63eb8facf4e9684aa083885b0422ad1f7" + sha256 arm64_linux: "0a567f7ee0d6a937c22e38176da87de07e014ce967af46cde6b39a2ec5cfcc49" + sha256 x86_64_linux: "5c29ea136cda77ada1aefd78d66c9150e674fbc52f821670721a8abbe7bab3d7" + end + + keg_only :versioned_formula + + # Support for protoc 29.x (protobuf C++ 5.29.x) will end on 2026-03-31 + # Ref: https://protobuf.dev/support/version-support/#cpp + deprecate! date: "2026-03-31", because: :versioned_formula + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "abseil" + uses_from_macos "zlib" + + # Backport to expose java-related symbols + patch do + url "https://github.com/protocolbuffers/protobuf/commit/9dc5aaa1e99f16065e25be4b9aab0a19bfb65ea2.patch?full_index=1" + sha256 "edc1befbc3d7f7eded6b7516b3b21e1aa339aee70e17c96ab337f22e60e154d7" + end + + # Backport patch for compatibility with new Abseil. + patch do + url "https://github.com/protocolbuffers/protobuf/commit/d801cbd86818b587e0ebba2de13614a3ee83d369.patch?full_index=1" + sha256 "ebab85f5b2c817b4adcd0bc66a7377a0aa4b9ecf667f1893f918c318369d3ef0" + end + + # Backport of (for compatibility with new Abseil): + # https://github.com/protocolbuffers/protobuf/commit/0ea5ccd61c69ff5000631781c6c9a3a50241392c.patch?full_index=1 + # Backport to reduce flaky test failures: + # https://github.com/protocolbuffers/protobuf/commit/7df353d94a84eacdfc0a19ee6db445d95fc57679.patch?full_index=1 + patch :DATA + + def install + # Keep `CMAKE_CXX_STANDARD` in sync with the same variable in `abseil.rb`. + abseil_cxx_standard = 17 + cmake_args = %W[ + -DCMAKE_CXX_STANDARD=#{abseil_cxx_standard} + -DBUILD_SHARED_LIBS=ON + -Dprotobuf_BUILD_LIBPROTOC=ON + -Dprotobuf_BUILD_SHARED_LIBS=ON + -Dprotobuf_INSTALL_EXAMPLES=ON + -Dprotobuf_BUILD_TESTS=ON + -Dprotobuf_USE_EXTERNAL_GTEST=ON + -Dprotobuf_ABSL_PROVIDER=package + -Dprotobuf_JSONCPP_PROVIDER=package + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", "--verbose" + system "cmake", "--install", "build" + + (share/"vim/vimfiles/syntax").install "editors/proto.vim" + elisp.install "editors/protobuf-mode.el" + end + + test do + (testpath/"test.proto").write <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + PROTO + system bin/"protoc", "test.proto", "--cpp_out=." + end +end + +__END__ +diff --git i/src/google/protobuf/arena.h w/src/google/protobuf/arena.h +index 545fd51..55b1ec8 100644 +--- i/src/google/protobuf/arena.h ++++ w/src/google/protobuf/arena.h +@@ -32,7 +32,6 @@ using type_info = ::type_info; + #include "absl/base/optimization.h" + #include "absl/base/prefetch.h" + #include "absl/log/absl_check.h" +-#include "absl/utility/internal/if_constexpr.h" + #include "google/protobuf/arena_align.h" + #include "google/protobuf/arena_allocation_policy.h" + #include "google/protobuf/port.h" +@@ -214,41 +213,31 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { + // otherwise, returns a heap-allocated object. + template + PROTOBUF_NDEBUG_INLINE static T* Create(Arena* arena, Args&&... args) { +- return absl::utility_internal::IfConstexprElse< +- is_arena_constructable::value>( +- // Arena-constructable +- [arena](auto&&... args) { +- using Type = std::remove_const_t; +-#ifdef __cpp_if_constexpr +- // DefaultConstruct/CopyConstruct are optimized for messages, which +- // are both arena constructible and destructor skippable and they +- // assume much. Don't use these functions unless the invariants +- // hold. +- if constexpr (is_destructor_skippable::value) { +- constexpr auto construct_type = GetConstructType(); +- // We delegate to DefaultConstruct/CopyConstruct where appropriate +- // because protobuf generated classes have external templates for +- // these functions for code size reasons. When `if constexpr` is not +- // available always use the fallback. +- if constexpr (construct_type == ConstructType::kDefault) { +- return static_cast(DefaultConstruct(arena)); +- } else if constexpr (construct_type == ConstructType::kCopy) { +- return static_cast(CopyConstruct(arena, &args...)); +- } +- } +-#endif +- return CreateArenaCompatible(arena, +- std::forward(args)...); +- }, +- // Non arena-constructable +- [arena](auto&&... args) { +- if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) { +- return new T(std::forward(args)...); +- } +- return new (arena->AllocateInternal()) +- T(std::forward(args)...); +- }, +- std::forward(args)...); ++ if constexpr (is_arena_constructable::value) { ++ using Type = std::remove_const_t; ++ // DefaultConstruct/CopyConstruct are optimized for messages, which ++ // are both arena constructible and destructor skippable and they ++ // assume much. Don't use these functions unless the invariants ++ // hold. ++ if constexpr (is_destructor_skippable::value) { ++ constexpr auto construct_type = GetConstructType(); ++ // We delegate to DefaultConstruct/CopyConstruct where appropriate ++ // because protobuf generated classes have external templates for ++ // these functions for code size reasons. When `if constexpr` is not ++ // available always use the fallback. ++ if constexpr (construct_type == ConstructType::kDefault) { ++ return static_cast(DefaultConstruct(arena)); ++ } else if constexpr (construct_type == ConstructType::kCopy) { ++ return static_cast(CopyConstruct(arena, &args...)); ++ } ++ } ++ return CreateArenaCompatible(arena, std::forward(args)...); ++ } else { ++ if (ABSL_PREDICT_FALSE(arena == nullptr)) { ++ return new T(std::forward(args)...); ++ } ++ return new (arena->AllocateInternal()) T(std::forward(args)...); ++ } + } + + // API to delete any objects not on an arena. This can be used to safely +diff --git a/src/google/protobuf/map_test.inc b/src/google/protobuf/map_test.inc +index df8ce2e411631b1dda93f1a8b05602357126d9d4..a87f9dc6df55ef51d4bfbdc9ccb8611984119f38 100644 +--- a/src/google/protobuf/map_test.inc ++++ b/src/google/protobuf/map_test.inc +@@ -1365,9 +1365,9 @@ TEST_F(MapImplTest, SpaceUsed) { + bool MapOrderingIsRandom(int a, int b) { + bool saw_a_first = false; + bool saw_b_first = false; +- std::vector> v(50); +- for (int i = 0; i < 50; ++i) { +- Map& m = v[i]; ++ std::vector> v; ++ while (v.size() < 100) { ++ Map& m = v.emplace_back(); + m[a] = 0; + m[b] = 0; + int32_t first_element = m.begin()->first; diff --git a/Formula/p/protobuf@3.rb b/Formula/p/protobuf@3.rb new file mode 100644 index 0000000000000..c97403dd13eee --- /dev/null +++ b/Formula/p/protobuf@3.rb @@ -0,0 +1,88 @@ +class ProtobufAT3 < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://github.com/protocolbuffers/protobuf/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protobuf-all-3.20.3.tar.gz" + sha256 "acb71ce46502683c31d4f15bafb611b9e7b858b6024804d6fb84b85750884208" + license "BSD-3-Clause" + + bottle do + rebuild 4 + sha256 cellar: :any, arm64_sequoia: "b6215fe7415a0af6a030e42af7cfce3c08b31ca8e29ed0f262989fc7ea38b12f" + sha256 cellar: :any, arm64_sonoma: "38970c2fb478351045c2c3be21876d4604f83e1ef8d0fab54b38f63a8f43a496" + sha256 cellar: :any, arm64_ventura: "fc53172db0444cca706a5d2d0283bed72e86536dba717da02822691cde488fb5" + sha256 cellar: :any, arm64_monterey: "6412e052fbeb376013fd0be287332b6bba9d0a1698ca17df4a43c9eaecce468d" + sha256 cellar: :any, sonoma: "4b52807c8afcdcc00fc8828e747aa9032c0e5a3b00c0674fa0bb71a67cf43985" + sha256 cellar: :any, ventura: "7dff34237d218a0b9620c28a3a6f28a9fde7a25878f090d99ad1a63439a0c322" + sha256 cellar: :any, monterey: "6570ec6cd341a8404b54513ed64da009c73e1ef0aac41a077aba4a14ca2a91ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac89be756fbceabd12ebdd291aa2456af895bc6d329accdd3c0bbe06cb377e5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a0ee63ac3e8f01bd14213820b91d73c6b964982d186f12648063688b3860073" + end + + keg_only :versioned_formula + + disable! date: "2025-07-01", because: :versioned_formula + + depends_on "python@3.11" => [:build, :test] + depends_on "python@3.12" => [:build, :test] + + uses_from_macos "zlib" + + # Backport support for Python 3.11 + patch do + url "https://github.com/protocolbuffers/protobuf/commit/da973aff2adab60a9e516d3202c111dbdde1a50f.patch?full_index=1" + sha256 "911925e427a396fa5e54354db8324c0178f5c602b3f819f7d471bb569cc34f53" + end + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@\d\.\d+$/) } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + # Don't build in debug mode. See: + # https://github.com/Homebrew/homebrew/issues/9279 + # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 + ENV.prepend "CXXFLAGS", "-DNDEBUG" + ENV.cxx11 + + system "./autogen.sh" if build.head? + system "./configure", "--with-zlib", "--with-pic", *std_configure_args + system "make" + system "make", "install" + + # Install editor support and examples + pkgshare.install "editors/proto.vim", "examples" + elisp.install "editors/protobuf-mode.el" + + ENV.append_to_cflags "-I#{include}" + ENV.append_to_cflags "-L#{lib}" + + pip_args = ["--config-settings=--build-option=--cpp_implementation"] + pythons.each do |python| + build_isolation = Language::Python.major_minor_version(python) >= "3.12" + system python, "-m", "pip", "install", *pip_args, *std_pip_args(build_isolation:), "./python" + end + end + + test do + testdata = <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + PROTO + (testpath/"test.proto").write testdata + system bin/"protoc", "test.proto", "--cpp_out=." + + pythons.each do |python| + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python)) do + system python, "-c", "import google.protobuf" + end + end + end +end diff --git a/Formula/p/protoc-gen-doc.rb b/Formula/p/protoc-gen-doc.rb new file mode 100644 index 0000000000000..3b813ab3c751e --- /dev/null +++ b/Formula/p/protoc-gen-doc.rb @@ -0,0 +1,45 @@ +class ProtocGenDoc < Formula + desc "Documentation generator plugin for Google Protocol Buffers" + homepage "https://github.com/pseudomuto/protoc-gen-doc" + url "https://github.com/pseudomuto/protoc-gen-doc/archive/refs/tags/v1.5.1.tar.gz" + sha256 "75667f5e4f9b4fecf5c38f85a046180745fc73f518d85422d9c71cb845cd3d43" + license "MIT" + head "https://github.com/pseudomuto/protoc-gen-doc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4cc365e45a28d202cf246071d99bcec458033ae269cd4b69d16691628c783e83" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f0234e290bc9f5d0d09bf239cc5c413588bc49e01d101ca7dc5ea26e4dfd2fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f0234e290bc9f5d0d09bf239cc5c413588bc49e01d101ca7dc5ea26e4dfd2fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f0234e290bc9f5d0d09bf239cc5c413588bc49e01d101ca7dc5ea26e4dfd2fa" + sha256 cellar: :any_skip_relocation, sonoma: "18a8a8ac59d204179f88c0371314c66da653062752267295cc89ccbab9da0d60" + sha256 cellar: :any_skip_relocation, ventura: "18a8a8ac59d204179f88c0371314c66da653062752267295cc89ccbab9da0d60" + sha256 cellar: :any_skip_relocation, arm64_linux: "eec4e5b96583ea14c8a9e43f0f494abdae35944eeecc1878d31d3150242a96b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e23d75e3d15957c6ba2581fe5e3688c5fc7a6b78572bb80df3ad360730b07585" + end + + depends_on "go" => :build + depends_on "protobuf" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/protoc-gen-doc" + end + + test do + assert_match version.to_s, shell_output("#{bin}/protoc-gen-doc -version") + + protofile = testpath/"proto3.proto" + protofile.write <<~EOS + syntax = "proto3"; + package proto3; + + message Request { + string name = 1; + repeated int64 key = 2; + } + EOS + + system "protoc", "--doc_out=.", "--doc_opt=html,index.html", "proto3.proto" + assert_path_exists testpath/"index.html" + refute_predicate (testpath/"index.html").size, :zero? + end +end diff --git a/Formula/p/protoc-gen-go-grpc.rb b/Formula/p/protoc-gen-go-grpc.rb new file mode 100644 index 0000000000000..8fa397a6a6196 --- /dev/null +++ b/Formula/p/protoc-gen-go-grpc.rb @@ -0,0 +1,52 @@ +class ProtocGenGoGrpc < Formula + desc "Protoc plugin that generates code for gRPC-Go clients" + homepage "https://github.com/grpc/grpc-go" + url "https://github.com/grpc/grpc-go/archive/refs/tags/cmd/protoc-gen-go-grpc/v1.5.1.tar.gz" + sha256 "54cb438abe590c9366e08251f811810fa004b1193154fe6e6a7d7c782a37332e" + license "Apache-2.0" + + livecheck do + url :stable + regex(%r{cmd/protoc-gen-go-grpc/v?(\d+(?:\.\d+)+)}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "618c07377befc6a80d45181cff22b9160c711bdce8e2bc3f677187785dc06f19" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6fea4b83597ec851d649c1b749618dda37e3815b4780b28467557aa0a29df606" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6fea4b83597ec851d649c1b749618dda37e3815b4780b28467557aa0a29df606" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6fea4b83597ec851d649c1b749618dda37e3815b4780b28467557aa0a29df606" + sha256 cellar: :any_skip_relocation, sonoma: "5f99bc500ba51adf40e538a0400b8f345647cc0e7b0275745aa1f195e87910a3" + sha256 cellar: :any_skip_relocation, ventura: "5f99bc500ba51adf40e538a0400b8f345647cc0e7b0275745aa1f195e87910a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "62026292030029c59eae929f0bf18641e9fd74e88a1b4ec68450c7b7bf4bd61a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b754fb14b20c7f4fe1f9f3f03693b2100ea882ffb3fad7c40f96df092437f870" + end + + depends_on "go" => :build + depends_on "protobuf" + + def install + cd "cmd/protoc-gen-go-grpc" do + system "go", "build", *std_go_args(ldflags: "-s -w") + end + end + + test do + (testpath/"service.proto").write <<~PROTO + syntax = "proto3"; + + option go_package = ".;proto"; + + service Greeter { + rpc Hello(HelloRequest) returns (HelloResponse); + } + + message HelloRequest {} + message HelloResponse {} + PROTO + + system "protoc", "--plugin=#{bin}/protoc-gen-go-grpc", "--go-grpc_out=.", "service.proto" + + assert_path_exists testpath/"service_grpc.pb.go" + end +end diff --git a/Formula/p/protoc-gen-go.rb b/Formula/p/protoc-gen-go.rb new file mode 100644 index 0000000000000..ae18641127ae4 --- /dev/null +++ b/Formula/p/protoc-gen-go.rb @@ -0,0 +1,40 @@ +class ProtocGenGo < Formula + desc "Go support for Google's protocol buffers" + homepage "https://github.com/protocolbuffers/protobuf-go" + url "https://github.com/protocolbuffers/protobuf-go/archive/refs/tags/v1.36.10.tar.gz" + sha256 "41671a3121345fb6b9f98cf41609379ba379c0aaf86be9e862f87a1d69a40e89" + license "BSD-3-Clause" + head "https://github.com/protocolbuffers/protobuf-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54a88571329f7a1cedfe1bb20d6e216ec8dcdc03302d1a800f879e0f02f3edf9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "54a88571329f7a1cedfe1bb20d6e216ec8dcdc03302d1a800f879e0f02f3edf9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "54a88571329f7a1cedfe1bb20d6e216ec8dcdc03302d1a800f879e0f02f3edf9" + sha256 cellar: :any_skip_relocation, sonoma: "6ad92eb7e2e6a5e91d5ebc21ca2a718e27e3671c25a5da5a31370fb42c5cbd12" + sha256 cellar: :any_skip_relocation, arm64_linux: "078aa03a0d5c3fb93240afc99bbaa40074e806f30a276a251f23059cec11a7ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d68e135ce9be4aadd202bcb969accc48113d57e511d1d35f1565b5154735dfab" + end + + depends_on "go" => :build + depends_on "protobuf" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/protoc-gen-go" + end + + test do + protofile = testpath/"proto3.proto" + protofile.write <<~EOS + syntax = "proto3"; + package proto3; + option go_package = "package/test"; + message Request { + string name = 1; + repeated int64 key = 2; + } + EOS + system "protoc", "--go_out=.", "--go_opt=paths=source_relative", "proto3.proto" + assert_path_exists testpath/"proto3.pb.go" + refute_predicate (testpath/"proto3.pb.go").size, :zero? + end +end diff --git a/Formula/p/protoc-gen-grpc-java.rb b/Formula/p/protoc-gen-grpc-java.rb new file mode 100644 index 0000000000000..fb9d49a1383ec --- /dev/null +++ b/Formula/p/protoc-gen-grpc-java.rb @@ -0,0 +1,55 @@ +class ProtocGenGrpcJava < Formula + desc "Protoc plugin for gRPC Java" + homepage "https://grpc.io/docs/languages/java/" + url "https://github.com/grpc/grpc-java/archive/refs/tags/v1.76.0.tar.gz" + sha256 "8c7ec45c35b0956044041799f7a028ccf76eb6c1fc8bde7bb3fcd8d896eb7b70" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "347fa553cf8ac4ee16b0fe983c1b98fae32c58df48beba1fd3ca52df20d60772" + sha256 cellar: :any, arm64_sequoia: "fc1a7dd8de9c5e2c66f34c5f234678f36cfd3bd48d2dc94126cfdbeb9a6c3582" + sha256 cellar: :any, arm64_sonoma: "03ea239f91f56203f8dbb64b9c3292147cc3d625af0ff6046d3ec3d2503750b3" + sha256 cellar: :any, sonoma: "674fe206527e0d336ff94846b4d42664e9f208bf045aaac130abffdb293a898b" + sha256 cellar: :any_skip_relocation, arm64_linux: "03612155b04355f33e7076ca671b64a64b21303ab177a5df1db9d52b521e7c40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc9a063380cc50f735e80478560c4f4480937998d91ae09d5d0d2a72514cfe34" + end + + depends_on "gradle@8" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "protobuf" + + def install + # Workaround for newer Protobuf to link to Abseil libraries + # Ref: https://github.com/grpc/grpc-java/issues/11475 + ENV.append "CXXFLAGS", "-std=c++17" + ENV.append "CXXFLAGS", Utils.safe_popen_read("pkgconf", "--cflags", "protobuf").chomp + ENV.append "LDFLAGS", Utils.safe_popen_read("pkgconf", "--libs", "protobuf").chomp + + inreplace "compiler/build.gradle" do |s| + # Avoid build errors on ARM macOS from old minimum macOS deployment + s.gsub! '"-mmacosx-version-min=10.7",', "" + # Avoid static linkage on Linux + s.gsub! '"-Wl,-Bstatic"', "\"-L#{Formula["protobuf"].opt_lib}\"" + s.gsub! ', "-static-libgcc"', "" + end + + args = %w[--no-daemon --project-dir=compiler -PskipAndroid=true] + # Show extra logs for failures other than slow Intel macOS + args += %w[--stacktrace --debug] if !OS.mac? || !Hardware::CPU.intel? + + system "gradle", *args, "java_pluginExecutable" + bin.install "compiler/build/exe/java_plugin/protoc-gen-grpc-java" + + pkgshare.install "examples/src/main/proto/helloworld.proto" + end + + test do + system Formula["protobuf"].bin/"protoc", "--grpc-java_out=.", "--proto_path=#{pkgshare}", "helloworld.proto" + output_file = testpath/"io/grpc/examples/helloworld/GreeterGrpc.java" + assert_path_exists output_file + assert_match "public io.grpc.examples.helloworld.HelloReply sayHello(", output_file.read + end +end diff --git a/Formula/p/protoc-gen-grpc-swift.rb b/Formula/p/protoc-gen-grpc-swift.rb new file mode 100644 index 0000000000000..095f8f5b214e2 --- /dev/null +++ b/Formula/p/protoc-gen-grpc-swift.rb @@ -0,0 +1,59 @@ +class ProtocGenGrpcSwift < Formula + desc "Protoc plugin for generating gRPC Swift stubs" + homepage "https://github.com/grpc/grpc-swift-protobuf" + url "https://github.com/grpc/grpc-swift-protobuf/archive/refs/tags/2.1.1.tar.gz" + sha256 "7b8302b306cd060e833995a99d1f9c806e7d9eecfcfb8c85c42c928d8abc67f7" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/grpc/grpc-swift-protobuf.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "62e99816a2642fccde1bbcb2130f0ede39fc14865d2430d33e869f763e06357d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f833d326fff0c5bd0617feb9a083ca2bca268ab258422ab2344ccf9b029e55af" + sha256 cellar: :any_skip_relocation, arm64_linux: "9987056eef6262da1fb314c171f7a67a8bd37bc0470e3681b83c0e2c4809e855" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b78b922582da46d9564e7f32a15d61b0cb95e3183ab07f7ad5ea38d554faaf46" + end + + depends_on xcode: ["15.0", :build] + # https://swiftpackageindex.com/grpc/grpc-swift/documentation/grpccore/compatibility#Platforms + depends_on macos: :sequoia + depends_on "protobuf" + depends_on "swift-protobuf" + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "--product", "protoc-gen-grpc-swift-2" + bin.install ".build/release/protoc-gen-grpc-swift-2" + end + + test do + (testpath/"echo.proto").write <<~PROTO + syntax = "proto3"; + service Echo { + rpc Get(EchoRequest) returns (EchoResponse) {} + rpc Expand(EchoRequest) returns (stream EchoResponse) {} + rpc Collect(stream EchoRequest) returns (EchoResponse) {} + rpc Update(stream EchoRequest) returns (stream EchoResponse) {} + } + message EchoRequest { + string text = 1; + } + message EchoResponse { + string text = 1; + } + PROTO + system Formula["protobuf"].opt_bin/"protoc", "echo.proto", "--grpc-swift-2_out=." + assert_path_exists testpath/"echo.grpc.swift" + end +end diff --git a/Formula/p/protoc-gen-grpc-web.rb b/Formula/p/protoc-gen-grpc-web.rb new file mode 100644 index 0000000000000..2945c5eb1788d --- /dev/null +++ b/Formula/p/protoc-gen-grpc-web.rb @@ -0,0 +1,74 @@ +class ProtocGenGrpcWeb < Formula + desc "Protoc plugin that generates code for gRPC-Web clients" + homepage "https://github.com/grpc/grpc-web" + url "https://github.com/grpc/grpc-web/archive/refs/tags/2.0.2.tar.gz" + sha256 "0f0c8c0c1104306d67dad678be7c14efe52a698795a58b2b72ab67a8bb100c15" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d7c7fa3e703cb3a73a2c40eae79eb32d5192b34eb77ff931350337fe860375a9" + sha256 cellar: :any, arm64_sequoia: "7a083a9a7ae60994a3898f7dc61375dbf8a5705b12e7ae7be392de584ed90832" + sha256 cellar: :any, arm64_sonoma: "adce43fdc5a56ab4592bbe6c0959a624f215eebbcfed219c1b4fd19c68230062" + sha256 cellar: :any, sonoma: "1d7475acee08122debcf4ae8d514892bf606e0392bb806b7f969f60f80149627" + sha256 cellar: :any_skip_relocation, arm64_linux: "f59db0212739c4b8c98474e2fb642ade70042f7003c43cbdb4666970665164bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a2da89855c161c0bcb2d39ea2fa33a75ad5bc21deadf05da95dcfb7714d631a" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "node" => :test + depends_on "typescript" => :test + depends_on "abseil" + depends_on "protobuf@29" + depends_on "protoc-gen-js" + + def install + # Workarounds to build with latest `protobuf` which needs Abseil link flags and C++17 + ENV.append "LDFLAGS", Utils.safe_popen_read("pkgconf", "--libs", "protobuf").chomp + inreplace "javascript/net/grpc/web/generator/Makefile", "-std=c++11", "-std=c++17" + + args = ["PREFIX=#{prefix}", "STATIC=no"] + args << "MIN_MACOS_VERSION=#{MacOS.version}" if OS.mac? + + system "make", "install-plugin", *args + end + + test do + # First use the plugin to generate the files. + (testpath/"test.proto").write <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + message TestResult { + bool passed = 1; + } + service TestService { + rpc RunTest(Test) returns (TestResult); + } + PROTO + protoc = Formula["protobuf@29"].bin/"protoc" + system protoc, "test.proto", "--plugin=#{bin}/protoc-gen-grpc-web", + "--js_out=import_style=commonjs:.", + "--grpc-web_out=import_style=typescript,mode=grpcwebtext:." + + # Now see if we can import them. + (testpath/"test.ts").write <<~TYPESCRIPT + import * as grpcWeb from 'grpc-web'; + import {TestServiceClient} from './TestServiceClientPb'; + import {Test, TestResult} from './test_pb'; + TYPESCRIPT + system "npm", "install", *std_npm_args(prefix: false), "grpc-web", "@types/google-protobuf" + # Include DOM for AbortSignal used by grpc-web 2.x typings; ES level also satisfies @types/google-protobuf. + system "tsc", "--lib", "es2021,dom", "test.ts" + end +end diff --git a/Formula/p/protoc-gen-js.rb b/Formula/p/protoc-gen-js.rb new file mode 100644 index 0000000000000..542f2f5ace7cc --- /dev/null +++ b/Formula/p/protoc-gen-js.rb @@ -0,0 +1,46 @@ +class ProtocGenJs < Formula + desc "Protocol buffers JavaScript generator plugin" + homepage "https://github.com/protocolbuffers/protobuf-javascript" + url "https://github.com/protocolbuffers/protobuf-javascript/archive/refs/tags/v4.0.0.tar.gz" + sha256 "7d3cd714bf99660ecc96882468a5a23465efca07064ff8105da634372649ee6e" + license "BSD-3-Clause" + head "https://github.com/protocolbuffers/protobuf-javascript.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "549663501180ed14b58a4ba42786f7dbcb0a8afd43e1196cd80dca38d955dfdf" + sha256 cellar: :any, arm64_sequoia: "4f1706dd3fa26e2abdc29d72a7327f730aee6324eb12f69d787aac10988ab954" + sha256 cellar: :any, arm64_sonoma: "3893f5fe97808fe1b89035f50230a0d157a8d3ceeb7a5ab57029f4949315d791" + sha256 cellar: :any, arm64_ventura: "22f7d5fcbfc9fd011ca0059016497a6f86af6de205162e5e880a3f91751e05f7" + sha256 cellar: :any, sonoma: "bfb23af337fe2d1caa4a89fecab7b1b1475c4117721add0e7fb3975896ad7e13" + sha256 cellar: :any, ventura: "8bd3ad1569477f9cc0f998add4035bbd81215bacf46f7e579b41355abbd820c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb1a45f894813e6d02dce4bc3ca6d8b1da12ab8c25604812924c92122db2162c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc107e124e47d727df28d35d2b5899dacf383e2985024aef639a156cd11a939a" + end + + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "protobuf@29" + + # We manually build rather than use Bazel as Bazel will build its own copy of Abseil + # and Protobuf that get statically linked into binary. Check for any upstream changes at + # https://github.com/protocolbuffers/protobuf-javascript/blob/main/generator/BUILD.bazel + def install + protobuf_flags = Utils.safe_popen_read("pkgconf", "--cflags", "--libs", "protobuf").chomp.split.uniq + system ENV.cxx, "-std=c++17", *Dir["generator/*.cc"], "-o", "protoc-gen-js", "-I.", *protobuf_flags, "-lprotoc" + bin.install "protoc-gen-js" + end + + test do + (testpath/"person.proto").write <<~PROTO + syntax = "proto3"; + + message Person { + int64 id = 1; + string name = 2; + } + PROTO + system Formula["protobuf@29"].bin/"protoc", "--js_out=import_style=commonjs:.", "person.proto" + assert_path_exists testpath/"person_pb.js" + refute_predicate (testpath/"person_pb.js").size, :zero? + end +end diff --git a/Formula/p/protolint.rb b/Formula/p/protolint.rb new file mode 100644 index 0000000000000..a3dc5836e0bdb --- /dev/null +++ b/Formula/p/protolint.rb @@ -0,0 +1,55 @@ +class Protolint < Formula + desc "Pluggable linter and fixer to enforce Protocol Buffer style and conventions" + homepage "https://github.com/yoheimuta/protolint" + url "https://github.com/yoheimuta/protolint/archive/refs/tags/v0.56.4.tar.gz" + sha256 "c513f7fbd712b2079c2b646252eab7d75d714337c369a5b77a8dfda133d5b27d" + license "MIT" + head "https://github.com/yoheimuta/protolint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9ddf06ae37f281ddd466bc53193e7f3adb78a9781d498454ad02a08eabfcdffc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7afab0c2bf2eabdfe873483fd2683056765a488d1f6f56eeecda301b752e2fc8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7afab0c2bf2eabdfe873483fd2683056765a488d1f6f56eeecda301b752e2fc8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7afab0c2bf2eabdfe873483fd2683056765a488d1f6f56eeecda301b752e2fc8" + sha256 cellar: :any_skip_relocation, sonoma: "bc91cad8bb74a6282339793fcac0d9f69b9cfa64679aaa62b996c6a3e6b64ae1" + sha256 cellar: :any_skip_relocation, ventura: "bc91cad8bb74a6282339793fcac0d9f69b9cfa64679aaa62b996c6a3e6b64ae1" + sha256 cellar: :any_skip_relocation, arm64_linux: "50ea3b0ea97b6f1706fa2552a34e6a74e78660cd22eaf84cac12f5891a7bfaea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e9ad1c4fa4fe3bd3259266444237c81538570c920eeb4f6a7d8bc45578a258a" + end + + depends_on "go" => :build + + def install + protolint_ldflags = %W[ + -s -w + -X github.com/yoheimuta/protolint/internal/cmd.version=#{version} + -X github.com/yoheimuta/protolint/internal/cmd.revision=#{tap.user} + ] + protocgenprotolint_ldflags = %W[ + -s -w + -X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.version=#{version} + -X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.revision=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags: protolint_ldflags), "./cmd/protolint" + system "go", "build", + *std_go_args(ldflags: protocgenprotolint_ldflags, output: bin/"protoc-gen-protolint"), + "./cmd/protoc-gen-protolint" + + pkgshare.install Dir["_example/proto/*.proto"] + end + + test do + cp_r Dir[pkgshare/"*.proto"], testpath + + output = "[invalidFileName.proto:1:1] File name \"invalidFileName.proto\" " \ + "should be lower_snake_case.proto like \"invalid_file_name.proto\"." + assert_equal output, + shell_output("#{bin}/protolint lint #{testpath}/invalidFileName.proto 2>&1", 1).chomp + + output = "Quoted string should be \"other.proto\" but was 'other.proto'." + assert_match output, shell_output("#{bin}/protolint lint #{testpath}/simple.proto 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/protolint version") + assert_match version.to_s, shell_output("#{bin}/protoc-gen-protolint version") + end +end diff --git a/Formula/p/protozero.rb b/Formula/p/protozero.rb new file mode 100644 index 0000000000000..b573ac02574e5 --- /dev/null +++ b/Formula/p/protozero.rb @@ -0,0 +1,25 @@ +class Protozero < Formula + desc "Minimalist protocol buffer decoder and encoder in C++" + homepage "https://github.com/mapbox/protozero" + url "https://github.com/mapbox/protozero/archive/refs/tags/v1.8.1.tar.gz" + sha256 "6c7a896f1dc08435e8cd4f3780ff688cd0bfce6890599b755f6f3cb36398dc25" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0e5449eeed0e64413afe0b49e9bbc162c0a5c9a1d2e91e992adf5c281413ad5a" + end + + depends_on "cmake" => :build + + def install + # We only install headers, so we can skip `cmake --build`. + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--install", "build" + pkgshare.install "tools" + end + + test do + system ENV.cxx, "-std=c++14", "-I#{include}", pkgshare/"tools/pbf-decoder.cpp", "-o", "pbf-decoder" + assert_empty pipe_output("./pbf-decoder -", "") + end +end diff --git a/Formula/p/prover9.rb b/Formula/p/prover9.rb new file mode 100644 index 0000000000000..2190f568435f2 --- /dev/null +++ b/Formula/p/prover9.rb @@ -0,0 +1,115 @@ +class Prover9 < Formula + desc "Automated theorem prover for first-order and equational logic" + homepage "https://www.cs.unm.edu/~mccune/prover9/" + url "https://www.cs.unm.edu/~mccune/prover9/download/LADR-2009-11A.tar.gz" + version "2009-11A" + sha256 "c32bed5807000c0b7161c276e50d9ca0af0cb248df2c1affb2f6fc02471b51d0" + license "GPL-2.0-only" + + livecheck do + url "https://www.cs.unm.edu/~mccune/prover9/download/" + regex(/href=.*?LADR[._-]v?(\d+(?:[.-]\d+[A-Z]?)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f50efa708e0a002db67d676da0207bed5d12c71b5ca5c3da1db857e21864c294" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc3e744b9971aabf272db720d2fb90a8b99dca8cb8799ef9d9d89beb306eb291" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "92508ef60be4768b9567c677c4aae881f04ef84de98d2bbff299739f906198ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e4ab7e6152098318be4a839b1fa2c6e50dc6868ef6b08c8d34d2175aac1736fe" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4f864bc7f43cde5bf0e7f5b69e26879833b53e5d1c3a8b9404c16062cbe7ca14" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3d5bf0492b97661c22bc8077463c7f577971e1a6f2db5a70f0bb86337c8de02f" + sha256 cellar: :any_skip_relocation, sonoma: "928f8946fa76129d2d394caeb5a0b75dd574ad485ba5fa39c408eb6c602a5c27" + sha256 cellar: :any_skip_relocation, ventura: "605c09fc8888af3a28e2b8de5b41fdb41ca19a8eb2d4f2f7f7e47187eae6ac4c" + sha256 cellar: :any_skip_relocation, monterey: "eb0ab8deaf0e9866c6fb241877767f99ca7b4d7d8b5268a0c6ce7ef9fb0cfbd3" + sha256 cellar: :any_skip_relocation, big_sur: "a81af1adbb27059709ec9bd9afd30e7819fbd750ea18736c079640058e9ca5b0" + sha256 cellar: :any_skip_relocation, catalina: "1f637c295f07ddf31eedf6bcc73b957584da4d55cb92c7bfea3264d6c3780d1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a61553c5a3e18b08afb168e0decbf7037fafca31b3b48430730096404520908c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f1cf6703e83cffd06e2025d6b5062dbf7e4dd7f3ca398618ac688e8ce165e1d" + end + + on_linux do + # Order of parameters passed to gcc matters + # This patch is needed for Ubuntu 16.04 LTS, which uses + # --as-needed with ld. It should no longer + # be needed on Ubuntu 18.04 LTS. + patch :DATA + end + + def install + # Workaround for newer Clang + ENV.append "XFLAGS", "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + ENV.deparallelize + system "make", "all" + bin.install "bin/prover9", "bin/mace4" + man1.install Dir["manpages/*.1"] + end + + test do + (testpath/"x2.in").write <<~EOS + formulas(sos). + e * x = x. + x' * x = e. + (x * y) * z = x * (y * z). + x * x = e. + end_of_list. + formulas(goals). + x * y = y * x. + end_of_list. + EOS + (testpath/"group2.in").write <<~EOS + assign(iterate_up_to, 12). + set(verbose). + formulas(theory). + all x all y all z ((x * y) * z = x * (y * z)). + exists e ((all x (e * x = x)) & + (all x exists y (y * x = e))). + exists a exists b (a * b != b * a). + end_of_list. + EOS + + system bin/"prover9", "-f", testpath/"x2.in" + system bin/"mace4", "-f", testpath/"group2.in" + end +end + +__END__ +diff --git a/provers.src/Makefile b/provers.src/Makefile +index 78c2543..9c91b4e 100644 +--- a/provers.src/Makefile ++++ b/provers.src/Makefile +@@ -63,25 +63,25 @@ prover: + $(MAKE) prover9 + + prover9: prover9.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o prover9 prover9.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o prover9 prover9.o $(OBJECTS) ../ladr/libladr.a -lm + + fof-prover9: fof-prover9.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o fof-prover9 fof-prover9.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o fof-prover9 fof-prover9.o $(OBJECTS) ../ladr/libladr.a -lm + + ladr_to_tptp: ladr_to_tptp.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o ladr_to_tptp ladr_to_tptp.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o ladr_to_tptp ladr_to_tptp.o $(OBJECTS) ../ladr/libladr.a -lm + + tptp_to_ladr: tptp_to_ladr.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o tptp_to_ladr tptp_to_ladr.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o tptp_to_ladr tptp_to_ladr.o $(OBJECTS) ../ladr/libladr.a -lm + + autosketches4: autosketches4.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o autosketches4 autosketches4.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o autosketches4 autosketches4.o $(OBJECTS) ../ladr/libladr.a -lm + + newauto: newauto.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o newauto newauto.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o newauto newauto.o $(OBJECTS) ../ladr/libladr.a -lm + + newsax: newsax.o $(OBJECTS) +- $(CC) $(CFLAGS) -lm -o newsax newsax.o $(OBJECTS) ../ladr/libladr.a ++ $(CC) $(CFLAGS) -o newsax newsax.o $(OBJECTS) ../ladr/libladr.a -lm + + cgrep: cgrep.o $(OBJECTS) + $(CC) $(CFLAGS) -o cgrep cgrep.o $(OBJECTS) ../ladr/libladr.a diff --git a/Formula/p/prowler.rb b/Formula/p/prowler.rb new file mode 100644 index 0000000000000..718c6b9485865 --- /dev/null +++ b/Formula/p/prowler.rb @@ -0,0 +1,846 @@ +class Prowler < Formula + include Language::Python::Virtualenv + + desc "Tool for cloud security assessments, audits, incident response, and more" + homepage "https://prowler.com/" + url "https://files.pythonhosted.org/packages/7e/a9/ef93f2572e3922dfaf84ece5f2b5288b95b683058ef50c58b3fe089d8176/prowler-5.13.0.tar.gz" + sha256 "f70ebe05e054828280915f3ac7633d78ef9d110db588296a0c5c61bcde46ef44" + license "Apache-2.0" + head "https://github.com/prowler-cloud/prowler.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e5213bc6efcda72873140ba653ff61490dc3b60f7058ab2256845b1b4226c790" + sha256 cellar: :any, arm64_sequoia: "5c7067a471b1f084368657fa67fb75f9e9ea65ea6b7cbeae4321b1c9ea09ae6a" + sha256 cellar: :any, arm64_sonoma: "bf82035256cdf9dae1e8895ca2e0495497b20ffd441f25ca0acb23792807ee8d" + sha256 cellar: :any, sonoma: "73b1ae4121706d7a1de0fc8d2299adfaf565ab1f8dd9be7b295eb3f88f78bf3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdc655588227ce19451b48d5565987e91dd91fb7726c8290e96c587296c8fd93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "293135a1ad861894ff520854dd80500cfd1f083c1898020f034ebeaa4a857ee1" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "openssl@3" + depends_on "python@3.12" # https://github.com/prowler-cloud/prowler/issues/6737 + + uses_from_macos "libffi" + + on_linux do + depends_on "patchelf" => :build + depends_on "openblas" + end + + pypi_packages exclude_packages: "certifi" + + resource "about-time" do + url "https://files.pythonhosted.org/packages/1c/3f/ccb16bdc53ebb81c1bf837c1ee4b5b0b69584fd2e4a802a2a79936691c0a/about-time-4.2.1.tar.gz" + sha256 "6a538862d33ce67d997429d14998310e1dbfda6cb7d9bbfbf799c4709847fece" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/ba/fa/3ae643cd525cf6844d3dc810481e5748107368eb49563c15a5fb9f680750/aiohttp-3.13.1.tar.gz" + sha256 "4b7ee9c355015813a6aa085170b96ec22315dabc3d866fd77d147927000e9464" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "alive-progress" do + url "https://files.pythonhosted.org/packages/9a/26/d43128764a6f8fe1668c4f87aba6b1fe52bea81d05a35c84a70d3c70b6f7/alive-progress-3.3.0.tar.gz" + sha256 "457dd2428b48dacd49854022a46448d236a48f1b7277874071c39395307e830c" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "awsipranges" do + url "https://files.pythonhosted.org/packages/19/2e/6efa95f995369da828715f41705686cd214b9259ed758266942553d40441/awsipranges-0.3.3.tar.gz" + sha256 "4f0b3f22a9dc1163c85b513bed812b6c92bdacd674e6a7b68252a3c25b99e2c0" + end + + resource "azure-common" do + url "https://files.pythonhosted.org/packages/3e/71/f6f71a276e2e69264a97ad39ef850dca0a04fce67b12570730cb38d0ccac/azure-common-1.1.28.zip" + sha256 "4ac0cd3214e36b6a1b6a442686722a5d8cc449603aa833f3f0f40bda836704a3" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/0a/c4/d4ff3bc3ddf155156460bff340bbe9533f99fac54ddea165f35a8619f162/azure_core-1.36.0.tar.gz" + sha256 "22e5605e6d0bf1d229726af56d9e92bc37b6e726b141a18be0b4d424131741b7" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/b5/a1/f1a683672e7a88ea0e3119f57b6c7843ed52650fdcac8bfa66ed84e86e40/azure_identity-1.21.0.tar.gz" + sha256 "ea22ce6e6b0f429bc1b8d9212d5b9f9877bd4c82f1724bfa910760612c07a9a6" + end + + resource "azure-keyvault-keys" do + url "https://files.pythonhosted.org/packages/56/f9/85c95072c4f396126a8ae145ffb45fb3e7bea660b6cb8ff8b2f702944a57/azure_keyvault_keys-4.10.0.tar.gz" + sha256 "511206ae90aec1726a4d6ff5a92d754bd0c0f1e8751891368d30fb70b62955f1" + end + + resource "azure-mgmt-apimanagement" do + url "https://files.pythonhosted.org/packages/25/e4/3e536f0374bccb203886ef7aeb1148e063de6be31187034179ddcbf1adff/azure_mgmt_apimanagement-5.0.0.tar.gz" + sha256 "0ab7fe17e70fe3154cd840ff47d19d7a4610217003eaa7c21acf3511a6e57999" + end + + resource "azure-mgmt-applicationinsights" do + url "https://files.pythonhosted.org/packages/e7/8b/f3c8886ecd90d440458c4cc2b1db4ff47215f189cc3c0ba3cf11b7d4d64e/azure_mgmt_applicationinsights-4.1.0.tar.gz" + sha256 "15531390f12ce3d767cd3f1949af36aa39077c145c952fec4d80303c86ec7b6c" + end + + resource "azure-mgmt-authorization" do + url "https://files.pythonhosted.org/packages/9e/ab/e79874f166eed24f4456ce4d532b29a926fb4c798c2c609eefd916a3f73d/azure-mgmt-authorization-4.0.0.zip" + sha256 "69b85abc09ae64fc72975bd43431170d8c7eb5d166754b98aac5f3845de57dc4" + end + + resource "azure-mgmt-compute" do + url "https://files.pythonhosted.org/packages/fe/3f/72e09a6f9a12d8afed8f56c929e8e142de21be9c19c27e4b2b94d60eb73a/azure_mgmt_compute-34.0.0.tar.gz" + sha256 "58cd01d025efa02870b84dbfb69834a3b23501a135658c03854d2434e8dfee1e" + end + + resource "azure-mgmt-containerregistry" do + url "https://files.pythonhosted.org/packages/70/be/5806085a314e314ca5a53f5fa7ac87de55aad9bcde4c417b12d515edec8e/azure_mgmt_containerregistry-12.0.0.tar.gz" + sha256 "f19f8faa7881deaf2b5015c0eb050a92e2380cd9d18dee33cdb5f27d44a06c03" + end + + resource "azure-mgmt-containerservice" do + url "https://files.pythonhosted.org/packages/31/b0/a5a2d6c2b2f9f7404f86732d400786d7cd996a155467f47ecaf786ce56d9/azure_mgmt_containerservice-34.1.0.tar.gz" + sha256 "637a6cf8f06636c016ad151d76f9c7ba75bd05d4334b3dd7837eb8b517f30dbe" + end + + resource "azure-mgmt-core" do + url "https://files.pythonhosted.org/packages/3e/99/fa9e7551313d8c7099c89ebf3b03cd31beb12e1b498d575aa19bb59a5d04/azure_mgmt_core-1.6.0.tar.gz" + sha256 "b26232af857b021e61d813d9f4ae530465255cb10b3dde945ad3743f7a58e79c" + end + + resource "azure-mgmt-cosmosdb" do + url "https://files.pythonhosted.org/packages/74/2a/3240e83aff38443d334a17467d32a46bab269164ab9477bb17d2277b32f8/azure_mgmt_cosmosdb-9.7.0.tar.gz" + sha256 "b5072d319f11953d8f12e22459aded1912d5f27e442e1d8b49596a85005410a1" + end + + resource "azure-mgmt-databricks" do + url "https://files.pythonhosted.org/packages/ef/6d/b5e549a1287a4a0a2a194dcc4578c81af66111b8b18a73f4dbd434539b07/azure-mgmt-databricks-2.0.0.zip" + sha256 "70d11362dc2d17f5fb1db0cfe65c1af55b8f136f1a0db9a5b51e7acf760cf5b9" + end + + resource "azure-mgmt-keyvault" do + url "https://files.pythonhosted.org/packages/6f/c9/c9cd047729de3996656da854e361636dafa4f5e9b35af449abe23ec75582/azure-mgmt-keyvault-10.3.1.tar.gz" + sha256 "34b92956aefbdd571cae5a03f7078e037d8087b2c00cfa6748835dc73abb5a30" + end + + resource "azure-mgmt-loganalytics" do + url "https://files.pythonhosted.org/packages/8d/66/99802a1711cadb1c41e322dd42aaa3acfb58c70aba13e0f0cdbead21e6c4/azure-mgmt-loganalytics-12.0.0.zip" + sha256 "da128a7e0291be7fa2063848df92a9180cf5c16d42adc09d2bc2efd711536bfb" + end + + resource "azure-mgmt-monitor" do + url "https://files.pythonhosted.org/packages/e4/31/ebabafe0be1a177428880a8ec0fc44d681ac9dc1ae66a70d859cb5c7fbc3/azure-mgmt-monitor-6.0.2.tar.gz" + sha256 "5ffbf500e499ab7912b1ba6d26cef26480d9ae411532019bb78d72562196e07b" + end + + resource "azure-mgmt-network" do + url "https://files.pythonhosted.org/packages/19/a3/8d2fa6e33107354c8cd2abcca4e0f02138bda4c6024984ae5fce5cf23b27/azure_mgmt_network-28.1.0.tar.gz" + sha256 "8c84bffb5ec75c6e0244e58ecf07c00d5fc421d616b0cb369c6fe585af33cf87" + end + + resource "azure-mgmt-rdbms" do + url "https://files.pythonhosted.org/packages/51/3c/c1e03a11cf3dc2567ba947cc196d695d125d0d0e86af6731a7c067c5404a/azure-mgmt-rdbms-10.1.0.zip" + sha256 "a87d401c876c84734cdd4888af551e4a1461b4b328d9816af60cb8ac5979f035" + end + + resource "azure-mgmt-recoveryservices" do + url "https://files.pythonhosted.org/packages/df/52/b1b2047ffa71cda33250e5f2286966ed805feeff58f763e771fbd855a1e6/azure_mgmt_recoveryservices-3.1.0.tar.gz" + sha256 "7f2db98401708cf145322f50bc491caf7967bec4af3bf7b0984b9f07d3092687" + end + + resource "azure-mgmt-recoveryservicesbackup" do + url "https://files.pythonhosted.org/packages/72/28/99997bb991c8d1d53ec1164a4f07adc520e3c10c55b7e0b814f6e6c6043e/azure_mgmt_recoveryservicesbackup-9.2.0.tar.gz" + sha256 "c402b3e22a6c3879df56bc37e0063142c3352c5102599ff102d19824f1b32b29" + end + + resource "azure-mgmt-resource" do + url "https://files.pythonhosted.org/packages/a7/28/e950da2d89e55e2315ff0f4de075da4ac0fed4c27a489f7c774dedde9854/azure_mgmt_resource-23.3.0.tar.gz" + sha256 "fc4f1fd8b6aad23f8af4ed1f913df5f5c92df117449dc354fea6802a2829fea4" + end + + resource "azure-mgmt-search" do + url "https://files.pythonhosted.org/packages/63/b7/b9431f1ab621f83849f3ace5ba9d2820c731409fce8466b5f06d330d19f4/azure-mgmt-search-9.1.0.tar.gz" + sha256 "53bc6eeadb0974d21f120bb21bb5e6827df6d650e17347460fd83e2d68883599" + end + + resource "azure-mgmt-security" do + url "https://files.pythonhosted.org/packages/3d/90/13186657355452bdce44f27db6b194b99f78f8c185301b47624fff6d9531/azure-mgmt-security-7.0.0.tar.gz" + sha256 "5912eed7e9d3758fdca8d26e1dc26b41943dc4703208a1184266e2c252e1ad66" + end + + resource "azure-mgmt-sql" do + url "https://files.pythonhosted.org/packages/3f/af/398c57d15064ea23475076cd087b1a143b66d33a029e6e47c4688ca32310/azure-mgmt-sql-3.0.1.zip" + sha256 "129042cc011225e27aee6ef2697d585fa5722e5d1aeb0038af6ad2451a285457" + end + + resource "azure-mgmt-storage" do + url "https://files.pythonhosted.org/packages/2f/e7/1f6a1384a77513c0d636ae411e169d22433a07fd146c8b8b7d6027f90dbb/azure_mgmt_storage-22.1.1.tar.gz" + sha256 "25aaa5ae8c40c30e2f91f8aae6f52906b0557e947d5c1b9817d4ff9decc11340" + end + + resource "azure-mgmt-subscription" do + url "https://files.pythonhosted.org/packages/84/67/14b19a006e13d86f05ee59faf78c39dc443d4fd6967344e9c94f688949c1/azure-mgmt-subscription-3.1.1.zip" + sha256 "4e255b4ce9b924357bb8c5009b3c88a2014d3203b2495e2256fa027bf84e800e" + end + + resource "azure-mgmt-web" do + url "https://files.pythonhosted.org/packages/3a/55/5a24bc2d98830f0dc224e2baaf28b0091b7b646b390dc35c8234ae2f4830/azure_mgmt_web-8.0.0.tar.gz" + sha256 "c8d9c042c09db7aacb20270a9effed4d4e651e365af32d80897b84dc7bf35098" + end + + resource "azure-monitor-query" do + url "https://files.pythonhosted.org/packages/04/c0/e5c760f38224575f1eba35c319842f2be30fab599854ba9bd0b19d39c261/azure_monitor_query-2.0.0.tar.gz" + sha256 "7b05f2fcac4fb67fc9f77a7d4c5d98a0f3099fb73b57c69ec1b080773994671b" + end + + resource "azure-storage-blob" do + url "https://files.pythonhosted.org/packages/aa/ff/f6e81d15687510d83a06cafba9ac38d17df71a2bb18f35a0fb169aee3af3/azure_storage_blob-12.24.1.tar.gz" + sha256 "052b2a1ea41725ba12e2f4f17be85a54df1129e13ea0321f5a2fcc851cbf47d4" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/63/65/ddd4f52d138e52c1345c2d2421281a98449a6e4365290477befe06fa649a/boto3-1.39.15.tar.gz" + sha256 "b4483625f0d8c35045254dee46cd3c851bbc0450814f20b9b25bee1b5c0d8409" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/2f/e2/8cd9560e7e44cf977dc0cc2e48da7634e78b7104ae6e47f4e1dfc1093965/botocore-1.39.15.tar.gz" + sha256 "2aa29a717f14f8c7ca058c2e297aaed0aa10ecea24b91514eee802814d1b7600" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "circuitbreaker" do + url "https://files.pythonhosted.org/packages/df/ac/de7a92c4ed39cba31fe5ad9203b76a25ca67c530797f6bb420fff5f65ccb/circuitbreaker-2.1.3.tar.gz" + sha256 "1a4baee510f7bea3c91b194dcce7c07805fe96c4423ed5594b75af438531d084" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "contextlib2" do + url "https://files.pythonhosted.org/packages/c7/13/37ea7805ae3057992e96ecb1cffa2fa35c2ef4498543b846f90dd2348d8f/contextlib2-21.6.0.tar.gz" + sha256 "ab1e2bfe1d01d968e1b7e8d9023bc51ef3509bba217bb730cee3827e1ee82869" + end + + resource "cryptography" do + url "https://files.pythonhosted.org/packages/c7/67/545c79fe50f7af51dbad56d16b23fe33f63ee6a5d956b3cb68ea110cbe64/cryptography-44.0.1.tar.gz" + sha256 "f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14" + end + + resource "dash" do + url "https://files.pythonhosted.org/packages/db/7c/8569c50a4c07fabee6b2428a1515c0c92247e2127367b438a9f99d69723c/dash-3.1.1.tar.gz" + sha256 "916b31cec46da0a3339da0e9df9f446126aa7f293c0544e07adf9fe4ba060b18" + end + + resource "dash-bootstrap-components" do + url "https://files.pythonhosted.org/packages/49/8d/0f641e7c7878ac65b4bb78a2c7cb707db036f82da13fd61948adec44d5aa/dash_bootstrap_components-2.0.3.tar.gz" + sha256 "5c161b04a6e7ed19a7d54e42f070c29fd6c385d5a7797e7a82999aa2fc15b1de" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "detect-secrets" do + url "https://files.pythonhosted.org/packages/69/67/382a863fff94eae5a0cf05542179169a1c49a4c8784a9480621e2066ca7d/detect_secrets-1.5.0.tar.gz" + sha256 "6bb46dcc553c10df51475641bb30fd69d25645cc12339e46c824c1e0c388898a" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "dulwich" do + url "https://files.pythonhosted.org/packages/4b/ac/ba58cf420640c7bc77ae8e1b31e174d83c9117750c63cf9ea3b5e202e5c4/dulwich-0.23.0.tar.gz" + sha256 "0aa6c2489dd5e978b27e9b75983b7331a66c999f0efc54ebe37cab808ed322ae" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/9d/a4/e44218c2b394e31a6dd0d6b095c4e1f32d0be54c2a4b250032d717647bab/durationpy-0.10.tar.gz" + sha256 "1fa6893409a6e739c9c72334fc65cca1f355dbdd93405d30f726deb5bde42fba" + end + + resource "email-validator" do + url "https://files.pythonhosted.org/packages/48/ce/13508a1ec3f8bb981ae4ca79ea40384becc868bfae97fd1c942bb3a001b1/email_validator-2.2.0.tar.gz" + sha256 "cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz" + sha256 "bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/da/99/6c8b44ecc28026fd9441d7fcc5434ee1b3976c491f2f810b464c4702c975/google_api_core-2.27.0.tar.gz" + sha256 "d32e2f5dd0517e91037169e75bf0a9783b255aff1d11730517c0b2b29e9db06a" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/29/9f/535346bb1469ec91139c38f0438ad70bd229a6b11452367065fe49303860/google_api_python_client-2.163.0.tar.gz" + sha256 "88dee87553a2d82176e2224648bf89272d536c8f04dcdda37ef0a71473886dd7" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "graphemeu" do + url "https://files.pythonhosted.org/packages/76/20/d012f71e7d00e0d5bb25176b9a96c5313d0e30cf947153bfdfa78089f4bb/graphemeu-0.7.2.tar.gz" + sha256 "42bbe373d7c146160f286cd5f76b1a8ad29172d7333ce10705c5cc282462a4f8" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "h2" do + url "https://files.pythonhosted.org/packages/1d/17/afa56379f94ad0fe8defd37d6eb3f89a25404ffc71d4d848893d270325fc/h2-4.3.0.tar.gz" + sha256 "6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1" + end + + resource "hpack" do + url "https://files.pythonhosted.org/packages/2c/48/71de9ed269fdae9c8057e5a4c0aa7402e8bb16f2c6e90b3aa53327b113f8/hpack-4.1.0.tar.gz" + sha256 "ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "hyperframe" do + url "https://files.pythonhosted.org/packages/02/e7/94f8232d4a74cc99514c13a9f995811485a6903d48e5d952771ef6322e30/hyperframe-6.1.0.tar.gz" + sha256 "f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08" + end + + resource "iamdata" do + url "https://files.pythonhosted.org/packages/77/38/3a3b2b1235908672a8930db97034891f0b5bcaceedaa0d24d735dc252e05/iamdata-0.1.202510241.tar.gz" + sha256 "c95ffcbb1a50bc67cb67b276d55696639abdde787b7d026e4e35b4d553ce5250" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/b7/e8/0598f0e8b4af37cd9b10d8b87386cf3173cb8045d834ab5f6ec347a758b3/kubernetes-32.0.1.tar.gz" + sha256 "42f43d49abd437ada79a79a16bd48a604d3471a117a8347e87db693f2ba0ba28" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "microsoft-kiota-abstractions" do + url "https://files.pythonhosted.org/packages/fa/42/e9ddbdf6c2c772651e09ad74bd28dbf1c11e3f54bbb7cdb88ce57959f7c3/microsoft_kiota_abstractions-1.9.2.tar.gz" + sha256 "29cdafe8d0672f23099556e0b120dca6231c752cca9393e1e0092fa9ca594572" + end + + resource "microsoft-kiota-authentication-azure" do + url "https://files.pythonhosted.org/packages/97/bc/91b07dd6923f351afaa3121d12eab99a49f4da8128975fc8eefc1d1bef9b/microsoft_kiota_authentication_azure-1.9.2.tar.gz" + sha256 "171045f522a93d9340fbddc4cabb218f14f1d9d289e82e535b3d9291986c3d5a" + end + + resource "microsoft-kiota-http" do + url "https://files.pythonhosted.org/packages/5d/f3/4738613a6711917a1b4f829c962f3ce09a286c12a1037dc0fd666a9f4ad7/microsoft_kiota_http-1.9.2.tar.gz" + sha256 "2ba3d04a3d1d5d600736eebc1e33533d54d87799ac4fbb92c9cce4a97809af61" + end + + resource "microsoft-kiota-serialization-form" do + url "https://files.pythonhosted.org/packages/5d/51/ddbed9c6a3d7197c94d03d5a71bd01181fa0e6051b5919ca81e116061a30/microsoft_kiota_serialization_form-1.9.2.tar.gz" + sha256 "badfbe65d8ec3369bd58b01022d13ef590edf14babeef94188efe3f4ec24fe41" + end + + resource "microsoft-kiota-serialization-json" do + url "https://files.pythonhosted.org/packages/7d/ea/fee81f1cb68d5163573294935311a9c45d7da7dc08aa4acd86690ddafdcb/microsoft_kiota_serialization_json-1.9.2.tar.gz" + sha256 "19f7beb69c67b2cb77ca96f77824ee78a693929e20237bb5476ea54f69118bf1" + end + + resource "microsoft-kiota-serialization-multipart" do + url "https://files.pythonhosted.org/packages/d0/10/a8ea0a0f58bbc79c5f22bf868f10eac9f505f092e3f72ba1f050ab13316c/microsoft_kiota_serialization_multipart-1.9.2.tar.gz" + sha256 "b1851409205668d83f5c7a35a8b6fca974b341985b4a92841e95aaec93b7ca0a" + end + + resource "microsoft-kiota-serialization-text" do + url "https://files.pythonhosted.org/packages/81/20/aac457a8a0ce90510dc82ca5ba0d80484aeaf87d75d08ebefcbb81373683/microsoft_kiota_serialization_text-1.9.2.tar.gz" + sha256 "4289508ebac0cefdc4fa21c545051769a9409913972355ccda9116b647f978f2" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/cf/0e/c857c46d653e104019a84f22d4494f2119b4fe9f896c92b4b864b3b045cc/msal-1.34.0.tar.gz" + sha256 "76ba83b716ea5a6d75b0279c0ac353a0e05b820ca1f6682c0eb7f45190c43c2f" + end + + resource "msal-extensions" do + url "https://files.pythonhosted.org/packages/01/99/5d239b6156eddf761a636bded1118414d161bd6b7b37a9335549ed159396/msal_extensions-1.3.1.tar.gz" + sha256 "c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4" + end + + resource "msgraph-core" do + url "https://files.pythonhosted.org/packages/68/4e/123f9530ec43b306c597bb830c62bedab830ffa76e0edf33ea88a26f756e/msgraph_core-1.3.8.tar.gz" + sha256 "6e883f9d4c4ad57501234749e07b010478c1a5f19550ef4cf005bbcac4a63ae7" + end + + resource "msgraph-sdk" do + url "https://files.pythonhosted.org/packages/7b/3b/e0129b84e981004d5305418119a8c54ad7e75df27215028895716960e09b/msgraph_sdk-1.23.0.tar.gz" + sha256 "6dd1ba9a46f5f0ce8599fd9610133adbd9d1493941438b5d3632fce9e55ed607" + end + + resource "msrest" do + url "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip" + sha256 "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "narwhals" do + url "https://files.pythonhosted.org/packages/b7/95/aa46616f5e567ff5d262f4c207d5ca79cb2766010c786c351b8e7f930ef4/narwhals-2.9.0.tar.gz" + sha256 "d8cde40a6a8a7049d8e66608b7115ab19464acc6f305d136a8dc8ba396c4acfe" + end + + resource "nest-asyncio" do + url "https://files.pythonhosted.org/packages/83/f8/51569ac65d696c8ecbee95938f89d4abf00f47d58d48f6fbabfe8f0baefe/nest_asyncio-1.6.0.tar.gz" + sha256 "6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe" + end + + resource "numpy" do + url "https://files.pythonhosted.org/packages/a9/75/10dd1f8116a8b796cb2c737b674e02d02e80454bda953fa7e65d8c12b016/numpy-2.0.2.tar.gz" + sha256 "883c987dee1880e2a864ab0dc9892292582510604156762362d9326444636e78" + + # Backport fix until prowler uses numpy >= 2.1.2 + patch do + url "https://github.com/numpy/numpy/commit/5e314c7378b4d1b10aead7f854003f7318d5cb8e.patch?full_index=1" + sha256 "13371cbe50aded5b0d4ac21a2cb6ce39b2b136b870cc7a55199f5fb2f4189e38" + end + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "oci" do + url "https://files.pythonhosted.org/packages/7f/51/3b400abbfe14a91187d80e95f10bc76c8260248b4e4a7b48aa380c2b3ed2/oci-2.160.3.tar.gz" + sha256 "57514889be3b713a8385d86e3ba8a33cf46e3563c2a7e29a93027fb30b8a2537" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/08/d8/0f354c375628e048bd0570645b310797299754730079853095bf000fba69/opentelemetry_api-1.38.0.tar.gz" + sha256 "f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12" + end + + resource "opentelemetry-sdk" do + url "https://files.pythonhosted.org/packages/85/cb/f0eee1445161faf4c9af3ba7b848cc22a50a3d3e2515051ad8628c35ff80/opentelemetry_sdk-1.38.0.tar.gz" + sha256 "93df5d4d871ed09cb4272305be4d996236eedb232253e3ab864c8620f051cebe" + end + + resource "opentelemetry-semantic-conventions" do + url "https://files.pythonhosted.org/packages/40/bc/8b9ad3802cd8ac6583a4eb7de7e5d7db004e89cb7efe7008f9c8a537ee75/opentelemetry_semantic_conventions-0.59b0.tar.gz" + sha256 "7a6db3f30d70202d5bf9fa4b69bc866ca6a30437287de6c510fb594878aed6b0" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pandas" do + url "https://files.pythonhosted.org/packages/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz" + sha256 "4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667" + end + + resource "plotly" do + url "https://files.pythonhosted.org/packages/0c/63/961d47c9ffd592a575495891cdcf7875dc0903ebb33ac238935714213789/plotly-6.3.1.tar.gz" + sha256 "dd896e3d940e653a7ce0470087e82c2bd903969a55e30d1b01bb389319461bb0" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "py-iam-expand" do + url "https://files.pythonhosted.org/packages/22/99/8d31a30b37825577275bb3663885b55075fba80257fcd6813b85d3aaffa8/py_iam_expand-0.1.0.tar.gz" + sha256 "5a2884dc267ac59a02c3a80fefc0b34c309dac681baa0f87c436067c6cf53a96" + end + + resource "py-ocsf-models" do + url "https://files.pythonhosted.org/packages/b1/25/820201e0fe87dc13f6a039f2c76ddbe453372a9f39a052db08f05b37c6f7/py_ocsf_models-0.5.0.tar.gz" + sha256 "bf05e955809d1ec3ab1007e4a4b2a8a0afa74b6e744ea8ffbf386e46b3af0a76" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/df/18/d0944e8eaaa3efd0a91b0f1fc537d3be55ad35091b6a87638211ba691964/pydantic_core-2.41.4.tar.gz" + sha256 "70e47929a9d4a1905a67e4b687d5946026390568a8e952b92824118063cee4d5" + end + + resource "pygithub" do + url "https://files.pythonhosted.org/packages/16/ce/aa91d30040d9552c274e7ea8bd10a977600d508d579a4bb262b95eccf961/pygithub-2.5.0.tar.gz" + sha256 "e1613ac508a9be710920d26eb18b1905ebd9926aa49398e88151c1b526aad3cf" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz" + sha256 "c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/3c/f8/5dc70102e4d337063452c82e1f0d95e39abfe67aa222ed8a5ddeb9df8de8/requests_file-3.0.1.tar.gz" + sha256 "f14243d7796c588f3521bd423c5dea2ee4cc730e54a3cac9574d78aca1272576" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "retrying" do + url "https://files.pythonhosted.org/packages/c8/5a/b17e1e257d3e6f2e7758930e1256832c9ddd576f8631781e6a072914befa/retrying-1.4.2.tar.gz" + sha256 "d102e75d53d8d30b88562d45361d6c6c934da06fab31bd81c0420acb97a8ba39" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/48/dc/95f074d43452b3ef5d06276696ece4b3b5d696e7c9ad7173c54b1390cd70/rpds_py-0.28.0.tar.gz" + sha256 "abd4df20485a0983e2ca334a216249b6186d6e3c1627e106651943dbdb791aea" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/6d/05/d52bf1e65044b4e5e27d4e63e8d1579dbdec54fce685908ae09bc3720030/s3transfer-0.13.1.tar.gz" + sha256 "c3fdba22ba1bd367922f27ec8032d6a1cf5f10c934fb5d68cf60fd5a23d936cf" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/4e/e8/01e1b46d9e04cdaee91c9c736d9117304df53361a191144c8eccda7f0ee9/schema-0.7.5.tar.gz" + sha256 "f06717112c61895cabc4707752b88716e8420a8819d71404501e114f91043197" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shodan" do + url "https://files.pythonhosted.org/packages/c5/06/c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28/shodan-1.31.0.tar.gz" + sha256 "c73275386ea02390e196c35c660706a28dd4d537c5a21eb387ab6236fac251f6" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "slack-sdk" do + url "https://files.pythonhosted.org/packages/6e/ff/6eb67fd5bd179fa804dbd859d88d872d3ae343955e63a319a73a132d406f/slack_sdk-3.34.0.tar.gz" + sha256 "ff61db7012160eed742285ea91f11c72b7a38a6500a7f6c5335662b4bc6b853d" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "std-uritemplate" do + url "https://files.pythonhosted.org/packages/93/62/61866776cd32df3f984ff2f79b1428e10700e0a33ca7a7536e3fcba3cf2a/std_uritemplate-2.0.8.tar.gz" + sha256 "138ceff2c5bfef18a650372a5e8c82fe7f780c87235513de6c342fb5f7e18347" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/46/2c/c06ef49dc36e7954e55b802a8b231770d286a9758b3d936bd1e04ce5ba88/xlsxwriter-3.2.9.tar.gz" + sha256 "254b1c37a368c444eac6e2f867405cc9e461b0ed97a3233b2ac1e574efb4140c" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + assert_match "ens_rd2022_aws", shell_output("#{bin}/prowler aws --list-compliance") + assert_match "rds", shell_output("#{bin}/prowler aws --list-services") + + assert_match "Unable to locate credentials", shell_output("#{bin}/prowler aws --quick-inventory 2>&1", 1) + assert_match "Prowler #{version}", shell_output("#{bin}/prowler -v") + end +end diff --git a/Formula/p/proxify.rb b/Formula/p/proxify.rb new file mode 100644 index 0000000000000..40f50c57e7526 --- /dev/null +++ b/Formula/p/proxify.rb @@ -0,0 +1,31 @@ +class Proxify < Formula + desc "Portable proxy for capturing, manipulating, and replaying HTTP/HTTPS traffic" + homepage "https://github.com/projectdiscovery/proxify" + url "https://github.com/projectdiscovery/proxify/archive/refs/tags/v0.0.16.tar.gz" + sha256 "a156d8094ac5a31bc92029c1a9e02300caa5e2f189dc13949410d792e9f4e63c" + license "MIT" + head "https://github.com/projectdiscovery/proxify.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0115217c88f10cfbdc76745ef04ae0d7f1d663cbd081d57b1fb1a4da7819fe68" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3e2bdfdedcdcb3ebddd535df0f187dab19b794869793bc5f0a096412423122b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f512065276786dbe49e669c2bd6dda009952c5650817d7fda48659a7e99c08d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "55d02209f5e215cc15c57df775866a9f95de9de9c797acce7ca87ba95c715aca" + sha256 cellar: :any_skip_relocation, sonoma: "d0b34a5b8faca1288c434e2181c24ad5770f8cbcc02cedb05f37fbe04442257c" + sha256 cellar: :any_skip_relocation, ventura: "4a80fa274bbc79f69b63d71aa4a823a0dbeaee02f802a30a01cc98b3b4cb7869" + sha256 cellar: :any_skip_relocation, arm64_linux: "47ba9d44e07adf3fc672bcb94daf2e9d058ca432862206a9e115972af567c7ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6ae504f9d04fce697580389190a075d1707b2d658e6867cb12c5dc2e4c9d86e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/proxify" + end + + test do + # Other commands start proxify, which causes Homebrew CI to time out + assert_match version.to_s, shell_output("#{bin}/proxify -version 2>&1") + assert_match "given config file 'brew' does not exist", shell_output("#{bin}/proxify -config brew 2>&1", 1) + end +end diff --git a/Formula/p/proxsuite.rb b/Formula/p/proxsuite.rb new file mode 100644 index 0000000000000..95969996a7be5 --- /dev/null +++ b/Formula/p/proxsuite.rb @@ -0,0 +1,59 @@ +class Proxsuite < Formula + desc "Advanced Proximal Optimization Toolbox" + homepage "https://github.com/Simple-Robotics/proxsuite" + url "https://github.com/Simple-Robotics/proxsuite/releases/download/v0.7.2/proxsuite-0.7.2.tar.gz" + sha256 "dedda8e06b2880f99562622368abb0c0130cc2ab3bff0dc0b26477f88458a136" + license "BSD-2-Clause" + head "https://github.com/Simple-Robotics/proxsuite.git", branch: "devel" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2912fb63e15581feb0bb390fd5ed3e525c46bcb7b6781d12bd813dfe6282ce59" + sha256 cellar: :any, arm64_sequoia: "493ab8fd75c3da238ccf667516e248abfde1a8feb04ab5a6ce6813c7f35631ad" + sha256 cellar: :any, arm64_sonoma: "d0484ed787682b90d87bfb5bb834b88e68ea04ac9d9fed36f27defa821469225" + sha256 cellar: :any, sonoma: "3ff24000da0064252d189835999b4775042709339922ac3891c75c7201a91a08" + sha256 cellar: :any_skip_relocation, arm64_linux: "696c5bd08330dba311f390d3aa3be29016d4d74ebc7d714bf2aee89c31580537" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd84dda9a674cf2ff721ce5cd3a2b62d03977601306072a905adec2559de78e2" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "eigen" + depends_on "numpy" + depends_on "python@3.14" + depends_on "scipy" => :no_linkage + depends_on "simde" + + def python3 + "python3.14" + end + + def install + system "git", "submodule", "update", "--init", "--recursive" if build.head? + + # Workaround to fix error: a template argument list is expected after + # a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] + if DevelopmentTools.clang_build_version >= 1700 + ENV.append_to_cflags "-Wno-missing-template-arg-list-after-template-kw" + end + + args = %W[ + -DPYTHON_EXECUTABLE=#{which(python3)} + -DBUILD_UNIT_TESTS=OFF + -DBUILD_PYTHON_INTERFACE=ON + -DINSTALL_DOCUMENTATION=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system python3, "-c", <<~PYTHON + import proxsuite + qp = proxsuite.proxqp.dense.QP(10,0,0) + assert qp.model.H.shape[0] == 10 and qp.model.H.shape[1] == 10 + PYTHON + end +end diff --git a/Formula/p/proxychains-ng.rb b/Formula/p/proxychains-ng.rb new file mode 100644 index 0000000000000..85db8fb708982 --- /dev/null +++ b/Formula/p/proxychains-ng.rb @@ -0,0 +1,43 @@ +class ProxychainsNg < Formula + desc "Hook preloader" + homepage "https://github.com/rofl0r/proxychains-ng" + license "GPL-2.0-or-later" + head "https://github.com/rofl0r/proxychains-ng.git", branch: "master" + + stable do + url "https://github.com/rofl0r/proxychains-ng/archive/refs/tags/v4.17.tar.gz" + sha256 "1a2dc68fcbcb2546a07a915343c1ffc75845f5d9cc3ea5eb3bf0b62a66c0196f" + + # Backport fix for incompatible function pointer types + patch do + url "https://github.com/rofl0r/proxychains-ng/commit/fffd2532ad34bdf7bf430b128e4c68d1164833c6.patch?full_index=1" + sha256 "86b5db00415bb7d81a8dc1a3d2429ddafbf135090dc67e57620cd18cd71f3b28" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cfc77a32629806d155490f333305c7f0e063f9c98389192c60d2e6238db4e31c" + sha256 arm64_sequoia: "98974765fe2ae812f54eac9b71dfc62814e11bb4cb360a17b4125076c4a0ccae" + sha256 arm64_sonoma: "840c1349abf6f4e62edfab1d308e698463deed5a4a8089da31407998bfc819c2" + sha256 arm64_ventura: "70b173f39b5c72b9b4bceb2f59c8fa9dff806cb320b1cfe9ecd665a55559b914" + sha256 arm64_monterey: "f58b8cd85b1e6ce69fdcebcd7c4666f7720e8c8ca773f40a6c27669829cd4fde" + sha256 sonoma: "614c2caeb62d41e1de4d4cf4ca346fa16c04dc42f2ff39f19595fcbb3ddb925b" + sha256 ventura: "4e7e2b51f1e2def46860b2866342ccb99612d9f711d52a8fd3f99cf92f542264" + sha256 monterey: "10937a8845690b9953cc95d30ab8984b1fbe2d5baf6b8b0b602c10579adb8f91" + sha256 arm64_linux: "d8fcdce08eb197325b1534e3645916d4966c7facddcea9b3a14f9db258d1c320" + sha256 x86_64_linux: "72117ba62cdda573a388e3ba19b52a7991fb941237197f624249a906db414c47" + end + + def install + system "./configure", *std_configure_args, "--sysconfdir=#{etc}" + system "make" + system "make", "install" + system "make", "install-config" + end + + test do + assert_match "config file found", shell_output("#{bin}/proxychains4 test 2>&1", 1) + end +end diff --git a/Formula/p/proxyfor.rb b/Formula/p/proxyfor.rb new file mode 100644 index 0000000000000..b1a76623f77b5 --- /dev/null +++ b/Formula/p/proxyfor.rb @@ -0,0 +1,50 @@ +class Proxyfor < Formula + desc "Proxy CLI for capturing and inspecting HTTP(S) and WS(S) traffic" + homepage "https://github.com/sigoden/proxyfor" + url "https://github.com/sigoden/proxyfor/archive/refs/tags/v0.5.0.tar.gz" + sha256 "f4e2340dbce232333ce05473b75f3b1eacf27d1699071b52a9cf420a8c47fd96" + license any_of: ["Apache-2.0", "MIT"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "949fa8ba3a87e64a58c042fe41b28d8f81891b08436757a0fd43c55a8a7276b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6447af4607f2a07504be751324b5771f1db26846b5c4b426a11a615ba9b7487d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "312dae34b5b94992b9224e8eb2b38e11643ca63d2f8c3372544dcce1d39e4d49" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a39e9bfc86def60ea447ea2e19b335aa72865762cc7eaa2b99275036664d7ff3" + sha256 cellar: :any_skip_relocation, sonoma: "60d4e3ed50f2cd2813b494a02be5386e9b41aade19c5ade38cfd9ecfeea0a6eb" + sha256 cellar: :any_skip_relocation, ventura: "30898aa6abea5af4799fefe20be28ab97cdb1a7492015ad68ee478b28b75af47" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4b6723eea32a8a33afe29de95462553e9abbf58dcc0b7e944a6504f84b74031" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88ea7fa84ae3d56bc167a24efa5aecd74e238bc22ba4fb618e0f68339c92a737" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/proxyfor --version") + + port = free_port + + require "pty" + PTY.spawn "#{bin}/proxyfor --dump -l 127.0.0.1:#{port}" do |r, _w, pid| + sleep 5 + system "curl -A 'HOMEBREW' -x http://127.0.0.1:#{port} http://brew.sh/ > /dev/null 2>&1" + + Process.kill("TERM", pid) + + output = "" + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + + assert_match "# GET http://brew.sh/ 301", output + assert_match "user-agent: HOMEBREW", output + end + end +end diff --git a/Formula/p/proxygen.rb b/Formula/p/proxygen.rb new file mode 100644 index 0000000000000..99bc5ce1f6adc --- /dev/null +++ b/Formula/p/proxygen.rb @@ -0,0 +1,68 @@ +class Proxygen < Formula + desc "Collection of C++ HTTP libraries" + homepage "https://github.com/facebook/proxygen" + url "https://github.com/facebook/proxygen/releases/download/v2025.11.03.00/proxygen-v2025.11.03.00.tar.gz" + sha256 "3b64379efab47c4ab434b9e01a2bb02a50b109b73455e9d1074801dcdc278c17" + license "BSD-3-Clause" + head "https://github.com/facebook/proxygen.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "263b45b8dfa392419a6dd5fd7606157eaf0574f187cc19ee232029de215682fa" + sha256 arm64_sequoia: "cca99fb3226ece0e881d0cd1e85a6313280d9e60380de8168d6ca36c443c3bb7" + sha256 arm64_sonoma: "26e5daca8f0f9062f26023fb96b8ebe2e61c7c4727645603c2f459c2d2ecc0b0" + sha256 cellar: :any, sonoma: "f6b76e07a84d7b6fd0059a5fb57f53a9b25c299daf01bba4e0f7e9807c6bfa96" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fec5204fed9837fe4497dc6b1c7a60727d5db7f14771d06ffedced38aa32459" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f96cfa5d809f1b71562bac3be9cc9f64d8618e5a49b7e68e7bea2329070a02bb" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "c-ares" + depends_on "double-conversion" + depends_on "fizz" + depends_on "fmt" + depends_on "folly" + depends_on "gflags" + depends_on "glog" + depends_on "mvfst" + depends_on "openssl@3" + depends_on "wangle" + depends_on "zstd" + + uses_from_macos "gperf" => :build + uses_from_macos "python" => :build + uses_from_macos "zlib" + + conflicts_with "hq", because: "both install `hq` binaries" + + # Fix name of `liblibhttperf2`. + # https://github.com/facebook/proxygen/pull/574 + patch do + url "https://github.com/facebook/proxygen/commit/415ed3320f3d110f1d8c6846ca0582a4db7d225a.patch?full_index=1" + sha256 "4ea28c2f87732526afad0f2b2b66be330ad3d4fc18d0f20eb5e1242b557a6fcf" + end + + def install + args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"] + if OS.mac? + args += [ + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs", + "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs", + ] + end + + system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + test do + port = free_port + pid = spawn(bin/"proxygen_echo", "--http_port", port.to_s) + sleep 30 + sleep 30 if OS.mac? && Hardware::CPU.intel? + system "curl", "-v", "http://localhost:#{port}" + ensure + Process.kill "TERM", pid + end +end diff --git a/Formula/p/proxytunnel.rb b/Formula/p/proxytunnel.rb new file mode 100644 index 0000000000000..94ec06c475ee5 --- /dev/null +++ b/Formula/p/proxytunnel.rb @@ -0,0 +1,32 @@ +class Proxytunnel < Formula + desc "Create TCP tunnels through HTTPS proxies" + homepage "https://github.com/proxytunnel/proxytunnel" + url "https://github.com/proxytunnel/proxytunnel/archive/refs/tags/v1.12.3.tar.gz" + sha256 "106cfba7aba91faccb158e1c12a4a7c4c65adc95aa1f81b76b987882a68c5afb" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + bottle do + sha256 cellar: :any, arm64_tahoe: "b6003b5468d9eb16d028cfac02ad7700bb173650fbcb7b4c1be87cf3267a636f" + sha256 cellar: :any, arm64_sequoia: "6b7dd6ac425100875ce71c7439bfba022d89b03470e108f040abf8f9a1865ed1" + sha256 cellar: :any, arm64_sonoma: "4180c52f43d7bc1d79471a57ec13978ace1642e6a9ebf003b5867ad12c22b08f" + sha256 cellar: :any, arm64_ventura: "b304a1e197fc8840549b2b4f240a6eec34dbdd45eb035bed45fb591201dd0ed3" + sha256 cellar: :any, sonoma: "20b05437c58f9ac5e129dbfd9da88d6c57338deb994ad88af6ee2a558a430304" + sha256 cellar: :any, ventura: "a7877a40edfc840c91921d0bfb161e1f87d4eef6b8f3bc06789d9a6b89b06dbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "1054f31d72acfeb8d3e4b925620f5d8140349158552c6288db753af40097b72c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68f0a86ab22a1406b3215b1f48abd7bb1cd686a2eab4cd707f989a9bee830a4c" + end + + depends_on "asciidoc" => :build + depends_on "xmlto" => :build + depends_on "openssl@3" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "make" + system "make", "install", "prefix=#{prefix}" + end + + test do + system bin/"proxytunnel", "--version" + end +end diff --git a/Formula/p/prqlc.rb b/Formula/p/prqlc.rb new file mode 100644 index 0000000000000..614e2b794ff36 --- /dev/null +++ b/Formula/p/prqlc.rb @@ -0,0 +1,33 @@ +class Prqlc < Formula + desc "Simple, powerful, pipelined SQL replacement" + homepage "https://prql-lang.org" + url "https://github.com/PRQL/prql/archive/refs/tags/0.13.6.tar.gz" + sha256 "929f9c76b685029b5bf7d5852bb735558ff664290b766fe3d531893377d1c67e" + license "Apache-2.0" + head "https://github.com/prql/prql.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4438f5f86cea8bad43aa330fb7ec47b68c9bb489b4a36fc532edeb2a24b9967c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4febaece1de29a6bbcafb0a6492cf26d774ea6bf524c341acb3cb86bb420666" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b2241800a230cd6fd005864af444661906f8c11d1ac2540825138274c58b737" + sha256 cellar: :any_skip_relocation, sonoma: "00a108d479c54e04e11d8e7e2dff6f42293fbd47fce71aa9abd3cafe5180625a" + sha256 cellar: :any_skip_relocation, arm64_linux: "045bdb4516b2e23e1ff5a47430edd66af65eb7ffdb8d1d5e95d3d5cb8d1353b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28ea9e5cbff542e041c86d7f941de9ea9d2fb72eeffe3dde74bd2fabcac6a4ac" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "prqlc", *std_cargo_args(path: "prqlc/prqlc") + + generate_completions_from_executable(bin/"prqlc", "shell-completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/prqlc --version") + + stdin = "from employees | filter has_dog | select salary" + stdout = pipe_output("#{bin}/prqlc compile", stdin) + assert_match "SELECT", stdout + end +end diff --git a/Formula/p/prr.rb b/Formula/p/prr.rb new file mode 100644 index 0000000000000..5be64b69b7a68 --- /dev/null +++ b/Formula/p/prr.rb @@ -0,0 +1,59 @@ +class Prr < Formula + desc "Mailing list style code reviews for github" + homepage "https://github.com/danobi/prr" + url "https://github.com/danobi/prr/archive/refs/tags/v0.21.0.tar.gz" + sha256 "891d8b2bc0397027e909750ac7891ca3d6e215acab59a48d5b2da35e60b45b8c" + license "GPL-2.0-only" + head "https://github.com/danobi/prr.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4104e21453d0b34b7ab2b183c0d5206fd2a3a8be8e3d053988ac27028f95eae4" + sha256 cellar: :any, arm64_sequoia: "c17217ab2cf5ad6349ded14664733f58db5273cab612e577dbd7aef6ef56eb49" + sha256 cellar: :any, arm64_sonoma: "a3ef5940ceafe8a6dd74d317a77d6714a69ccff78d1d77f198275acba96ba0f4" + sha256 cellar: :any, sonoma: "834ea3bb39f1f520a14afd064408a0fc4cdaa672a35e3fec3db33a6643016585" + sha256 cellar: :any_skip_relocation, arm64_linux: "d415636ffbe9e8e3d16707775f318c6ac944b9419d6e643f3aed7107267f43ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6e45b8471f685c0070c1f9f5197f5eec6174adcd2a0687bfc0defc66a063225" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + # Ensure the correct `openssl` will be picked up. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + # Specify GEN_DIR for shell completions and manpage generation + ENV["GEN_DIR"] = buildpath + + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/prr.bash" => "prr" + fish_completion.install "completions/prr.fish" + zsh_completion.install "completions/_prr" + man1.install Dir["man/*.1"] + end + + test do + require "utils/linkage" + + assert_match "Failed to read config", shell_output("#{bin}/prr get Homebrew/homebrew-core/6 2>&1", 1) + + [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"prr", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/p/prs.rb b/Formula/p/prs.rb new file mode 100644 index 0000000000000..046ea65c402a1 --- /dev/null +++ b/Formula/p/prs.rb @@ -0,0 +1,44 @@ +class Prs < Formula + desc "Secure, fast & convenient password manager CLI with GPG & git sync" + homepage "https://timvisee.com/projects/prs" + url "https://github.com/timvisee/prs/archive/refs/tags/v0.5.5.tar.gz" + sha256 "833e47894b64e9da25183782fd10b16c6879d201cf5f60e02ce3d4c654309f53" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6b6ba3893c637d7d43c3cd63427f125b0e0033a04247284b8fa81e6daf2c72c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eccd7f0e9e1519265b50002aa29def833a870cb826cf3e71ee1231b493181acd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3514b10156042e9b99cf4dfe627ab9a968178ebb21b85e25e8a7ab264cd35d9" + sha256 cellar: :any_skip_relocation, sonoma: "f612132dc672132ed25235e3678b17658f5acad5d0efb226174374c0787fe8d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "e2a819c27ce1f9742733d7e6f5e79dd6ee9ee75f7caf7a66d03052bf6b7b062d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7481a21f903a29e8dc9dcc33b321aa5253a6089b0ee088315d3513a73371d2ad" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "gpgme" + + on_linux do + depends_on "libxcb" + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + + generate_completions_from_executable(bin/"prs", "internal", "completions") + end + + test do + ENV["PASSWORD_STORE_DIR"] = testpath/".store" + expected = <<~EOS + Now generate and add a new recipient key for yourself: + prs recipients generate + + EOS + + assert_equal expected, shell_output("#{bin}/prs init --no-interactive 2>&1") + assert_equal "prs #{version}\n", shell_output("#{bin}/prs --version") + assert_empty shell_output("#{bin}/prs list --no-interactive --quiet") + end +end diff --git a/Formula/p/ps2eps.rb b/Formula/p/ps2eps.rb new file mode 100644 index 0000000000000..42eb479b607bb --- /dev/null +++ b/Formula/p/ps2eps.rb @@ -0,0 +1,45 @@ +class Ps2eps < Formula + desc "Convert PostScript to EPS files" + homepage "https://github.com/roland-bless/ps2eps" + url "https://github.com/roland-bless/ps2eps/archive/refs/tags/v1.70.tar.gz" + sha256 "cd7064e3787ddb79246d78dc8f76104007a21c2f97280b1bed3e7d273af97945" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "07c8fdeb6cd50b5a03d6cd29b80a45cddb0c40149d3e739ab56d8ac33f0ccd45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0cd7a84b33465e03768eb2c76ec181b730c775f18e57eeb282df636ee1a8e10f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "09d6e7f0fbbec5bd6e494715028e9730c32ddb1284261d5593734d1bd35c79da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0993f1da048518572c4388a4eab1e7c37151c97859eec0802b639ef803d71eca" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bdadaaab653031dd42695d12d97e7b831e15d6e823f00abc74a5a2f89a7e4954" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cb048bafbe5b44a17151bc81c5743045f3f4963d6f3cf2adf38685bba82c8c67" + sha256 cellar: :any_skip_relocation, sonoma: "2fc82fc12235919d0057debb4376ad1102a9f914f8e0da4bb473c74506fa020e" + sha256 cellar: :any_skip_relocation, ventura: "1942c75b041b2ffd5b15664549297c06a558564f487f49b16bad3abb329c5fe9" + sha256 cellar: :any_skip_relocation, monterey: "692aad4f078bddacb438898e625887ae1278fc07de6a1c9ce37ee9683cc5f7fe" + sha256 cellar: :any_skip_relocation, big_sur: "91e08e8ced4f5394ad3f4990a092fa61a547cce4264127350f97912c50dda5f3" + sha256 cellar: :any_skip_relocation, catalina: "b2d84470b90f037632206b6318f87bf1024e0d0ed83fb8344e44642dc8751187" + sha256 cellar: :any_skip_relocation, arm64_linux: "2cc5adea6dcc3ef017b112ef05708e0fef1ee7a8205bc26542ee9ba023bc8732" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e392648b006b21de93a33d1fbb1b5505c1de5353d0168368a71f15efd9a39df6" + end + + depends_on "ghostscript" + + def install + system ENV.cc, "src/C/bbox.c", "-o", "bbox" + bin.install "bbox" + (libexec/"bin").install "src/perl/ps2eps" + (bin/"ps2eps").write <<~EOS + #!/bin/sh + perl -S #{libexec}/bin/ps2eps "$@" + EOS + man1.install Dir["doc/*.1"] + doc.install Dir["doc/*.pdf", "doc/*.html"] + end + + test do + cp test_fixtures("test.ps"), testpath/"test.ps" + system bin/"ps2eps", testpath/"test.ps" + assert_path_exists testpath/"test.eps" + end +end diff --git a/Formula/p/psalm.rb b/Formula/p/psalm.rb new file mode 100644 index 0000000000000..82bc6aca0fad6 --- /dev/null +++ b/Formula/p/psalm.rb @@ -0,0 +1,106 @@ +class Psalm < Formula + desc "PHP Static Analysis Tool" + homepage "https://psalm.dev" + url "https://github.com/vimeo/psalm/releases/download/6.13.1/psalm.phar" + sha256 "6cec66e4b622403098d2153df7c5a79e9dbec78e2c89d7c27ff3aa950fb582f0" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9d2edb6efa8eb8f5a442f7a55cea422e8eec3d82f1ad5607348fc7ae7fa127a5" + end + + depends_on "composer" => :test + depends_on "php" + + # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix + on_macos do + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + libexec.install "psalm.phar" => "psalm" + + (bin/"psalm").write <<~EOS + #!#{Formula["php"].opt_bin}/php + =8.1" + }, + "license": "MIT", + "autoload": { + "psr-4": { + "Homebrew\\\\PsalmTest\\\\": "src/" + } + }, + "minimum-stability": "stable" + } + JSON + + (testpath/"src/Email.php").write <<~PHP + ensureIsValidEmail($email); + + $this->email = $email; + } + + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public static function fromString(string $email): self + { + return new self($email); + } + + public function __toString(): string + { + return $this->email; + } + + private function ensureIsValidEmail(string $email): void + { + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + throw new \\InvalidArgumentException( + sprintf( + '"%s" is not a valid email address', + $email + ) + ); + } + } + } + PHP + + system "composer", "install" + + assert_match "Config file created successfully. Please re-run psalm.", + shell_output("#{bin}/psalm --init") + system bin/"psalm", "--no-progress" + end +end diff --git a/Formula/p/psc-package.rb b/Formula/p/psc-package.rb new file mode 100644 index 0000000000000..1e4e2a32ba34e --- /dev/null +++ b/Formula/p/psc-package.rb @@ -0,0 +1,78 @@ +class PscPackage < Formula + desc "Package manager for PureScript based on package sets" + homepage "https://psc-package.readthedocs.io" + url "https://github.com/purescript/psc-package/archive/refs/tags/v0.6.2.tar.gz" + sha256 "96c3bf2c65d381c61eff3d16d600eadd71ac821bbe7db02acec1d8b3b6dbecfc" + license "BSD-3-Clause" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d0b451d9760801f148494b4e3e0038186fdd645a2099f43a8209e4c67593ed4d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "caa3fd862fbd5b0fee519827956ee81da5cb790c8f4818b63c25e4e3b4647f9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60ce822c848d09c9d477d37c8c3e7667ffae266897f06d538368c5d66746e1f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d218b3190d7af58a6dee769d8fc8b0543ac7eed760af9552b871ec9e6c28b918" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0f896fa8803f8405c76b6814302c9a81bc88ad63facccf653f302ca6c7314862" + sha256 cellar: :any_skip_relocation, sonoma: "2745b40b2ca64e1a6e369b79ab2c3141ea04c84538d335be866978c594e2bde6" + sha256 cellar: :any_skip_relocation, ventura: "34a6d89e4900fadd0f3844622d53df285ab26a54fb2b46c61191bd6b1b835c29" + sha256 cellar: :any_skip_relocation, monterey: "c96222df112a5a511469867e560157aab7ffc0fba812261302ac227fc682aebe" + sha256 cellar: :any_skip_relocation, arm64_linux: "680bb83343573560dfa3bc8628fcb60ef41ec5f116fba1e0cec88f81f3d0fb40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57150c2dfc8edce29db3b116563bb83d58c573b95cf497381a711f960f804378" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + depends_on "purescript" + + # Apply upstream patch to fix build. Remove with next release. + patch do + url "https://github.com/purescript/psc-package/commit/2817cfd7bbc29de790d2ab7bee582cd6167c16b5.patch?full_index=1" + sha256 "e49585ff8127ccca0b35dc8a7caa04551de1638edfd9ac38e031d1148212091c" + end + + # Another patch to fix build. See https://github.com/purescript/psc-package/pull/169. + patch :DATA + + def install + # Workaround to build with GHC 9.10 until upstream allows `turtle >= 1.6` + args = ["--allow-newer=turtle:text"] + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *std_cabal_v2_args + end + + test do + assert_match "Initializing new project in current directory", shell_output("#{bin}/psc-package init --set=master") + package_json = (testpath/"psc-package.json").read + package_hash = JSON.parse(package_json) + assert_match "master", package_hash["set"] + assert_match "Install complete", shell_output("#{bin}/psc-package install") + end +end + +__END__ +diff --git a/app/Types.hs b/app/Types.hs +index e0a6b73..3614dab 100644 +--- a/app/Types.hs ++++ b/app/Types.hs +@@ -10,6 +10,7 @@ module Types + + import Control.Category ((>>>)) + import Data.Aeson (FromJSON, ToJSON, FromJSONKey(..), ToJSONKey(..), ToJSONKeyFunction(..), FromJSONKeyFunction(..), parseJSON, toJSON, withText) ++import Data.Aeson.Types (toJSONKeyText) + import qualified Data.Aeson.Encoding as AesonEncoding + import Data.Char (isAscii, isLower, isDigit) + import Data.Text (Text) +@@ -34,9 +35,7 @@ fromText t = + + instance ToJSONKey PackageName where + toJSONKey = +- ToJSONKeyText +- runPackageName +- (AesonEncoding.text . runPackageName) ++ toJSONKeyText runPackageName + + instance FromJSONKey PackageName where + fromJSONKey = diff --git a/Formula/p/pscale.rb b/Formula/p/pscale.rb new file mode 100644 index 0000000000000..83c87c7835d04 --- /dev/null +++ b/Formula/p/pscale.rb @@ -0,0 +1,32 @@ +class Pscale < Formula + desc "CLI for PlanetScale Database" + homepage "https://www.planetscale.com/" + url "https://github.com/planetscale/cli/archive/refs/tags/v0.259.0.tar.gz" + sha256 "522e9e832c493ddf7d43d4d18ed78581e531c4903947e499a23448ea01c88963" + license "Apache-2.0" + head "https://github.com/planetscale/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e55c26c2ccd32aa8a809fba635e884de26683872892c1358bcb65c91b9f13b27" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "afa74ecc12714a2a39ea602d9dc09fd3d4a53e87440035517651b7ad40c6312e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "65cc09297ec22dd8fa77bb937c0c3c90cefc5defed6d28aed6debb8012fbf517" + sha256 cellar: :any_skip_relocation, sonoma: "04e11c59a1f8af8d550b8a6a8b5a593ad32eb07470682c052e97f55c63d36cbd" + sha256 cellar: :any_skip_relocation, arm64_linux: "dcfcf711622cd1510f9ffa10ffd32a774f724a9be443f4a376793c8d2c397016" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7dc72c185d0b1f26f8602965ce1cad986e3e1389341a53ecc9f149adcc846a12" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/pscale" + + generate_completions_from_executable(bin/"pscale", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/pscale version") + + assert_match "Error: not authenticated yet", shell_output("#{bin}/pscale org list 2>&1", 2) + end +end diff --git a/Formula/p/psftools.rb b/Formula/p/psftools.rb new file mode 100644 index 0000000000000..83f29521f04e4 --- /dev/null +++ b/Formula/p/psftools.rb @@ -0,0 +1,66 @@ +class Psftools < Formula + desc "Tools for fixed-width bitmap fonts" + homepage "https://www.seasip.info/Unix/PSF/" + # psftools-1.1.10.tar.gz (dated 2017) was a typo of 1.0.10 and has since been deleted. + # You may still find it on some mirrors but it should not be used. + url "https://www.seasip.info/Unix/PSF/psftools-1.0.14.tar.gz" + sha256 "dcf8308fa414b486e6df7c48a2626e8dcb3c8a472c94ff04816ba95c6c51d19e" + license "GPL-2.0-or-later" + version_scheme 1 + + # The development release on the homepage uses the same filename format as + # the stable release (e.g., psftools-1.1.1.tar.gz). However, the "Development + # Release" section comes before the "Stable Release" section, so we can use + # this heading to anchor stable releases for now. + livecheck do + url :homepage + regex(/Stable Release.+?href=.*?psftools[._-]v?(\d+(?:\.\d+)+)\.t/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "06f275a8b9d1fe1537d8456c91ee2e58b90d514bfc721f2d89a4ef1f56f6f17d" + sha256 cellar: :any, arm64_sequoia: "12640a4b3994e97fca6c888cdd660d554598bf8bcbb308ceeb9b84215e7d8fb3" + sha256 cellar: :any, arm64_sonoma: "7b3c2ecfcbac182eeb598a944eb04ae8506330cd0ae1b058a96679f52dad028b" + sha256 cellar: :any, arm64_ventura: "6d1a0f368538d9943d29048cc34f0db13a9df55d2c100f831dd2a66f987fa32d" + sha256 cellar: :any, arm64_monterey: "1142f7422c522acca28091e7e522e384d00ea96148a74ac67bef674c59f44325" + sha256 cellar: :any, arm64_big_sur: "474daee5c218ce90013ce498fa84dc5486bfdd1ff736535a87bd618fa72f3da9" + sha256 cellar: :any, sonoma: "782668ee44ce5af9aecca5d3333653b27970ee7599677ca66a23ad73765e7bdb" + sha256 cellar: :any, ventura: "99749cecc8e45fe27e56b6d7ab1a8fa17e2486566a065b62f850779d166ae625" + sha256 cellar: :any, monterey: "cdb289bf8f4b4e86d1145bfbea21cf5ec091c758cfa1f3902fa636a934dbc55b" + sha256 cellar: :any, big_sur: "42056401c680e3a2372f2b16c78936b6e06c1cb3f8125f1a7c0fff8d23372de9" + sha256 cellar: :any, catalina: "ac3cc35325cd2b565044a9e864bbf4b3c2e34a39f46b267ae3fc753d63857a83" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbf0f067b25985fc24add1230dded4b7d54680dcc2d1f4764afc1d5e762ed28f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c750eb92e19169c1bb81129ab8ce270963e9168500b7c59d59d8bb7fc68ee7b4" + end + + # The `autoconf` dependency originates from 54cfae502ee4 + # which was meant to fix a bug in the `configure` script. + # We add `automake` and `libtool` to run `autoreconf` to + # work around the `-flat_namespace` bug. Our usual patches + # don't work here because the install method called `autoconf`. + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + resource "pc8x8font" do + url "https://www.zone38.net/font/pc8x8.zip" + sha256 "13a17d57276e9ef5d9617b2d97aa0246cec9b2d4716e31b77d0708d54e5b978f" + end + + def install + # Regenerate `configure` to fix `-flat_namespace`. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + # The zip file has a fon in it, use fon2fnts to extract to fnt + resource("pc8x8font").stage do + system bin/"fon2fnts", "pc8x8.fon" + assert_path_exists Pathname.pwd/"PC8X8_9.fnt" + end + end +end diff --git a/Formula/p/psgrep.rb b/Formula/p/psgrep.rb new file mode 100644 index 0000000000000..b2747592a6487 --- /dev/null +++ b/Formula/p/psgrep.rb @@ -0,0 +1,25 @@ +class Psgrep < Formula + desc "Shortcut for the 'ps aux | grep' idiom" + homepage "https://github.com/jvz/psgrep" + url "https://github.com/jvz/psgrep/archive/refs/tags/1.0.9.tar.gz" + sha256 "6408e4fc99414367ad08bfbeda6aa86400985efe1ccb1a1f00f294f86dd8b984" + license "GPL-3.0-or-later" + head "https://github.com/jvz/psgrep.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9e809775d826f04be40a2cea6237bddf7447458bd4933e474db09b836b02e69b" + end + + def install + bin.install "psgrep" + man1.install "psgrep.1" + end + + test do + system bin/"psgrep", Process.pid + assert_match version.to_s, shell_output("#{bin}/psgrep -v", 2) + end +end diff --git a/Formula/p/pspg.rb b/Formula/p/pspg.rb new file mode 100644 index 0000000000000..31fa0fab9cbb7 --- /dev/null +++ b/Formula/p/pspg.rb @@ -0,0 +1,42 @@ +class Pspg < Formula + desc "Unix pager optimized for psql" + homepage "https://github.com/okbob/pspg" + url "https://github.com/okbob/pspg/archive/refs/tags/5.8.12.tar.gz" + sha256 "9f74c236944bea79586a3a12ab9d36735bfa62a92a8d7953e8c1ff5c108277af" + license "BSD-2-Clause" + head "https://github.com/okbob/pspg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7fe2a3cbd810de303eedd8f00a1924cebc6a355091ad2db3f3388bbe496a35e3" + sha256 cellar: :any, arm64_sequoia: "fbe4f496a3be5e9693ed3fb8f532c4be80249f5a1d027a4596cb99b068260251" + sha256 cellar: :any, arm64_sonoma: "4f040dd530d13e63abd48b42ba1fcfce456521b6e614d29b6459affc5dfb3ef2" + sha256 cellar: :any, arm64_ventura: "74f4d329d3a79d1eff8c630da561f88c38c9b4a9063cded46984e8fb708e8ab0" + sha256 cellar: :any, sonoma: "868c9354fdb876a4ae62698a16ccf3a78cc3ac1436e3c696cc97cff2371f564f" + sha256 cellar: :any, ventura: "584924c89855547aa825967a064f74069fdf4362ba763751506d2be715745d43" + sha256 cellar: :any_skip_relocation, arm64_linux: "74d4498d4936a5f20fc9a3d0633fb5d16c51d7f2f32d3cedbb1f44f6a6784af0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9119d05dae43df503adc6629c39fe856604f469c7f4b1ecb300b12c6ffe815b" + end + + depends_on "libpq" + depends_on "ncurses" + depends_on "readline" + + def install + system "./configure", "--disable-debug", + "--prefix=#{prefix}" + system "make", "install" + end + + def caveats + <<~EOS + Add the following line to your psql profile (e.g. ~/.psqlrc) + \\setenv PAGER pspg + \\pset border 2 + \\pset linestyle unicode + EOS + end + + test do + assert_match "pspg-#{version}", shell_output("#{bin}/pspg --version") + end +end diff --git a/Formula/p/psql2csv.rb b/Formula/p/psql2csv.rb new file mode 100644 index 0000000000000..a72ad43b7b0a7 --- /dev/null +++ b/Formula/p/psql2csv.rb @@ -0,0 +1,27 @@ +class Psql2csv < Formula + desc "Run a query in psql and output the result as CSV" + homepage "https://github.com/fphilipe/psql2csv" + url "https://github.com/fphilipe/psql2csv/archive/refs/tags/v0.12.tar.gz" + sha256 "bd99442ee5b6892589986cb93f928ec9e823d17d06f10c8e74e7522bf021ca28" + license "MIT" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2bd408af21ea8fd340ab8a95d11c4a0b0d0c106a2aa9b87cdd9d8f4c09390290" + end + + depends_on "libpq" + + def install + bin.install "psql2csv" + end + + test do + expected = "COPY (SELECT 1) TO STDOUT WITH (FORMAT csv, ENCODING 'UTF8', HEADER true)" + output = shell_output(%Q(#{bin}/psql2csv --dry-run "SELECT 1")).strip + assert_equal expected, output + end +end diff --git a/Formula/p/psqlodbc.rb b/Formula/p/psqlodbc.rb new file mode 100644 index 0000000000000..933e2f5f05850 --- /dev/null +++ b/Formula/p/psqlodbc.rb @@ -0,0 +1,48 @@ +class Psqlodbc < Formula + desc "Official PostgreSQL ODBC driver" + homepage "https://odbc.postgresql.org" + url "https://github.com/postgresql-interfaces/psqlodbc/archive/refs/tags/REL-17_00_0006.tar.gz" + sha256 "1c886c5303a43fae3b7bdc4f674aaf3927813e937c310716b6f83fd61434f44c" + license "LGPL-2.0-or-later" + head "https://github.com/postgresql-interfaces/psqlodbc.git", branch: "main" + + livecheck do + url :stable + regex(/^REL[._-]?v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "843daf9498246ce2639a04d3c341c3f248f824c2795d65e9ee732448e80e1473" + sha256 cellar: :any, arm64_sequoia: "9aa0e50a32cd06602fd8ca3c9e9a7e7be2dd43f43fa7baa287a8f2fb33d35b67" + sha256 cellar: :any, arm64_sonoma: "fdd9914597028be6afe45103c0502f97027850d3c28587bdaa71eca7ec77b6ca" + sha256 cellar: :any, arm64_ventura: "416058e5349573dd91929c36507e2c6b4bf26ba06a7e61b902626e27276991b5" + sha256 cellar: :any, sonoma: "866ba671fda96d5abdd7ea6d897403485829310ff629cb18ea68251e2686b222" + sha256 cellar: :any, ventura: "e8fc788ff3819c7f5b46982baf695d586e50c9046b5970ad11c418c0b9431bd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a2a492bfca18421c0df06dbb1154b6432878c9689a79bf0497f051fe1278ab0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4e915e1ad71414c65162bc86332943510b8899d03c2c21a1795a67d42308a80" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libpq" + depends_on "unixodbc" + + def install + system "./bootstrap" + system "./configure", "--prefix=#{prefix}", + "--with-unixodbc=#{Formula["unixodbc"].opt_prefix}" + system "make" + system "make", "install" + end + + test do + output = shell_output("#{Formula["unixodbc"].bin}/dltest #{lib}/psqlodbcw.so") + assert_equal "SUCCESS: Loaded #{lib}/psqlodbcw.so\n", output + end +end diff --git a/Formula/p/pssh.rb b/Formula/p/pssh.rb new file mode 100644 index 0000000000000..51dd23f86b7bd --- /dev/null +++ b/Formula/p/pssh.rb @@ -0,0 +1,27 @@ +class Pssh < Formula + include Language::Python::Virtualenv + + desc "Parallel versions of OpenSSH and related tools" + homepage "https://github.com/lilydjwg/pssh" + url "https://github.com/lilydjwg/pssh/archive/refs/tags/v2.3.5.tar.gz" + sha256 "97277f9d08b512c6a1b6dc5eac9677f34038096bae24484452d326137ba0d080" + license "BSD-3-Clause" + head "https://github.com/lilydjwg/pssh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "71f66f7ce2b43dede8c6719028a4772db8d453d568bc88cd57c93987ecde5743" + end + + depends_on "python@3.14" + + conflicts_with "putty", because: "both install `pscp` binaries" + + def install + virtualenv_install_with_resources + man1.install buildpath.glob("man/man1/*.1") + end + + test do + system bin/"pssh", "--version" + end +end diff --git a/Formula/p/pstoedit.rb b/Formula/p/pstoedit.rb new file mode 100644 index 0000000000000..ddd9c8ae86f50 --- /dev/null +++ b/Formula/p/pstoedit.rb @@ -0,0 +1,40 @@ +class Pstoedit < Formula + desc "Convert PostScript and PDF files to editable vector graphics" + homepage "http://www.pstoedit.net/" + url "https://downloads.sourceforge.net/project/pstoedit/pstoedit/4.02/pstoedit-4.02.tar.gz" + sha256 "5588b432d2c6b2ad9828b44915ea5813ff9a3a3312a41fa0de4c38ddac9df72f" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "e773007c11d92ed03d522da9acddabe00010345187e10dcf2b8921bdcac62cb4" + sha256 arm64_sequoia: "4577e541a3d69e7c9fdc3291b552e4cfb50a8a3603c080a3c2c2d1f9ea7e96a6" + sha256 arm64_sonoma: "b17eff3c581194a6bf0290507456b75edbbad20cde4c01793cc9754425e59712" + sha256 arm64_ventura: "355cc44f552bd82c5cf39915449de0a4051eb2f9efba352323b87eb0403f15db" + sha256 sonoma: "6353b2d9287a6e0524047a32cafb61f8c09d4d476d1bc13d40b73289aace060c" + sha256 ventura: "bd4b577c2ed8b2f4c1b9ded0ed953365f445b29bff62e262caef589cb49d049c" + sha256 arm64_linux: "ae82c51bc2186d4b32fa75d8b8bceff7bec7f2da0bf20c4cf51d669d0c5a4cec" + sha256 x86_64_linux: "c2c8d0315852f2dca193e34433526f2635f9a8b3b6fd02ccca85646f92cbf56a" + end + + depends_on "pkgconf" => :build + depends_on "gd" + depends_on "ghostscript" + depends_on "imagemagick" + depends_on "plotutils" + + def install + # Avoid Linux libc-specific behavior when building on macOS + # Notified author about the issue via email + inreplace "src/pstoedit.cpp", "#ifndef _MSC_VER\n", "#if !defined(_MSC_VER) && !defined(__APPLE__)\n" + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"pstoedit", "-f", "gs:pdfwrite", test_fixtures("test.ps"), "test.pdf" + assert_path_exists testpath/"test.pdf" + end +end diff --git a/Formula/p/pstree.rb b/Formula/p/pstree.rb new file mode 100644 index 0000000000000..ca737bfcf4d4e --- /dev/null +++ b/Formula/p/pstree.rb @@ -0,0 +1,40 @@ +# NOTE: The version of pstree used on Linux requires +# the /proc file system, which is not available on macOS. + +class Pstree < Formula + desc "Show ps output as a tree" + homepage "https://github.com/FredHucht/pstree" + url "https://github.com/FredHucht/pstree/archive/refs/tags/v2.40.tar.gz" + sha256 "64d613d8f66685b29f13a80e08cddc08616cf3e315a0692cbbf9de0d8aa376b3" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "999cb5fb08aa25b078cf66c5a24c1b1244532e5757965e0089631b3bf4e4836e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d294c9c8a1f140ad0505ab702204a8d909c860318e0013694dd760b95a39d1d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05dcf81f64516f4b96ccb2a82fe610e65d2733d0cfb6dbff41b54fcd9f45f111" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ca06848c6042d6f8c7ee44477aae9d5e1ed8f73be77dc99d9ec126460bc1f9f8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e43ea23b1cc41dbd5717b22c8de73faae3fa58e88a9f18845533e7f4acc24eeb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bc1765755ab89e61a17983692eb4ceb6c659f2f90b1f26bfea0ed1a908a7dc07" + sha256 cellar: :any_skip_relocation, sonoma: "ceea272a5221af7418627c38fb6c310e65bdd316ca201d06861e1ddb5314e570" + sha256 cellar: :any_skip_relocation, ventura: "b95d35e5b4f3bb8953ccec2ee1e3f25fdd14ed942606de9f4abcd9b2dfa31a5b" + sha256 cellar: :any_skip_relocation, monterey: "fc23e46dee144842b941ad5b6527018154d38b67827e4f019bf9efab24a15365" + sha256 cellar: :any_skip_relocation, big_sur: "bf6f7f6e9a1ec7b0e5454e15973ee091a143eb887c67d81b07f262c447c685b7" + sha256 cellar: :any_skip_relocation, catalina: "820b3dd1b26142457348dfc27c29ad8f1b6d86367995d8895ff41d8c74f91c8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "070950551bff0bbaa284ba426e1535a87698a3e732af9275e2c49efcfdb79d76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d65aff524b410c2ea45556fad2e5b07b9052896c07ee386fc6213208fdc7bc43" + end + + def install + system "make", "pstree" + bin.install "pstree" + man1.install "pstree.1" + end + + test do + lines = shell_output("#{bin}/pstree #{Process.pid}").strip.split("\n") + assert_match $PROGRAM_NAME, lines[0] + assert_match (bin/"pstree").to_s, lines[1] + end +end diff --git a/Formula/p/psutils.rb b/Formula/p/psutils.rb new file mode 100644 index 0000000000000..edb595f5f7843 --- /dev/null +++ b/Formula/p/psutils.rb @@ -0,0 +1,48 @@ +class Psutils < Formula + include Language::Python::Virtualenv + + desc "Utilities for manipulating PostScript documents" + homepage "https://github.com/rrthomas/psutils" + url "https://files.pythonhosted.org/packages/45/ff/4af412351a21ee38835b7597555936c547830d9a8246a2b7d2aa41aabdd3/psutils-3.3.14.tar.gz" + sha256 "6212167dd8c09f59c9535d5e416c4f8c01431b7a5beab0ee68f4ec416ca3980c" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "55b66a30b82f74cd6068fb5e8451b385b9b5a8cf51ce4631a464e6dad872587b" + end + + depends_on "libpaper" + depends_on "python@3.14" + + resource "puremagic" do + url "https://files.pythonhosted.org/packages/dd/7f/9998706bc516bdd664ccf929a1da6c6e5ee06e48f723ce45aae7cf3ff36e/puremagic-1.30.tar.gz" + sha256 "f9ff7ac157d54e9cf3bff1addfd97233548e75e685282d84ae11e7ffee1614c9" + end + + resource "pypdf" do + url "https://files.pythonhosted.org/packages/13/3d/b6ead84ee437444f96862beb68f9796da8c199793bed08e9397b77579f23/pypdf-6.1.3.tar.gz" + sha256 "8d420d1e79dc1743f31a57707cabb6dcd5b17e8b9a302af64b30202c5700ab9d" + end + + def install + virtualenv_install_with_resources + end + + test do + resource "homebrew-test-ps" do + url "https://raw.githubusercontent.com/rrthomas/psutils/e00061c21e114d80fbd5073a4509164f3799cc24/tests/test-files/psbook/3/expected.ps" + sha256 "bf3f1b708c3e6a70d0f28af55b3b511d2528b98c2a1537674439565cecf0aed6" + end + resource("homebrew-test-ps").stage testpath + + expected_psbook_output = "[4] [1] [2] [3] \nWrote 4 pages\n" + assert_equal expected_psbook_output, shell_output("#{bin}/psbook expected.ps book.ps 2>&1") + + expected_psnup_output = "[1,2] [3,4] \nWrote 2 pages\n" + assert_equal expected_psnup_output, shell_output("#{bin}/psnup -2 expected.ps nup.ps 2>&1") + + expected_psselect_output = "[1] \nWrote 1 pages\n" + assert_equal expected_psselect_output, shell_output("#{bin}/psselect -p1 expected.ps test2.ps 2>&1") + end +end diff --git a/Formula/p/psysh.rb b/Formula/p/psysh.rb new file mode 100644 index 0000000000000..97619d9668b30 --- /dev/null +++ b/Formula/p/psysh.rb @@ -0,0 +1,27 @@ +class Psysh < Formula + desc "Runtime developer console, interactive debugger and REPL for PHP" + homepage "https://psysh.org/" + url "https://github.com/bobthecow/psysh/releases/download/v0.12.14/psysh-v0.12.14.tar.gz" + sha256 "e384531884739d79dec8f1c7efaeff68e2124eee0ffc6547f27e8f049068b56a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9daf51688dcb0b101cb606195fc789ec24baa35de1a7bb4e093b66e5553ae435" + end + + depends_on "php" + + def install + bin.install "psysh" => "psysh" + end + + test do + assert_match version.to_s, shell_output("#{bin}/psysh --version") + + (testpath/"src/hello.php").write <<~PHP + :build + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-wtest" do + url "https://raw.githubusercontent.com/wdas/ptex/v2.4.2/src/tests/wtest.cpp" + sha256 "95c78f97421eac034401b579037b7ba4536a96f4b356f8f1bb1e87b9db752444" + end + + testpath.install resource("homebrew-wtest") + system ENV.cxx, "wtest.cpp", "-o", "wtest", "-I#{opt_include}", "-L#{opt_lib}", "-lPtex" + system "./wtest" + system bin/"ptxinfo", "-c", "test.ptx" + end +end diff --git a/Formula/p/pth.rb b/Formula/p/pth.rb new file mode 100644 index 0000000000000..f2bbd0252c5be --- /dev/null +++ b/Formula/p/pth.rb @@ -0,0 +1,50 @@ +class Pth < Formula + desc "GNU Portable THreads" + homepage "https://www.gnu.org/software/pth/" + url "https://ftpmirror.gnu.org/gnu/pth/pth-2.0.7.tar.gz" + mirror "https://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz" + sha256 "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "5d78afef8be0d57784a9fba9321b7939ac9e57492d9e1ff68192c465d1f001e6" + sha256 cellar: :any, arm64_sequoia: "ebea43fc620e5a3ca68ab4b1f05222b45ff99430e0572ad43a26ba2dc08178d2" + sha256 cellar: :any, arm64_sonoma: "2d11f5c8d0c953bd31407c69a481501bac6a990a0ca174304b0e9eae67028a6f" + sha256 cellar: :any, arm64_ventura: "fab1a0762b2bb6d4a662d7584e7e53a40c0c6e0a47173ee1b352ba5df0307d4c" + sha256 cellar: :any, arm64_monterey: "43290f4af74260a674cffc3fa75fc0576a89e4040f57473e0601ff3052eca8e9" + sha256 cellar: :any, arm64_big_sur: "746ea3501c80f444585f9e8c532815ff97cc94e050d1f5672307451abfb1bcfa" + sha256 cellar: :any, sonoma: "42572a1ad204768fb92064ab80052ae590b6fb75428bfdd3211c3ed15518138c" + sha256 cellar: :any, ventura: "eb899862aa5c37f46b09b483a9dd2808fd3459f459fa0ebb715a56055e501e1f" + sha256 cellar: :any, monterey: "13d83d8a576279a5487fe65a8973ac416aacec3f2ca87a8ab3a85bb46b169148" + sha256 cellar: :any, big_sur: "ce0bf2885f2ff76922d2306e84e328b3bcbe5b3c8365806a66f75d5fce0568fb" + sha256 cellar: :any, catalina: "4e468eea8984b9eb265dcd2f1e10a12ec5827088986042cea278b24f1a4dc1d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8ac563cbeacea2eab01935e62cc4835b1811dfac30f9fb3c0d6a80cfc8b3f41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66cd52703b09b137d33237be545677ba50729264ef0ad34d5f4c3891bba86173" + end + + def install + ENV.deparallelize + + # Fix -flat_namespace usage on macOS. + inreplace "configure", "${wl}-flat_namespace ${wl}-undefined ${wl}suppress", + "${wl}-undefined ${wl}dynamic_lookup" + + args = [] + # Help old config scripts identify arm64 linux + if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + args += ["--build=aarch64-unknown-linux-gnu", "--host=aarch64-unknown-linux-gnu"] + end + + # NOTE: The shared library will not be build with --disable-debug, so don't add that flag + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", *args + system "make" + system "make", "install" + end + + test do + system bin/"pth-config", "--all" + end +end diff --git a/Formula/p/ptpython.rb b/Formula/p/ptpython.rb new file mode 100644 index 0000000000000..6ea763cdd26d3 --- /dev/null +++ b/Formula/p/ptpython.rb @@ -0,0 +1,56 @@ +class Ptpython < Formula + include Language::Python::Virtualenv + + desc "Advanced Python REPL" + homepage "https://github.com/prompt-toolkit/ptpython" + url "https://files.pythonhosted.org/packages/b2/55/6275ed7bcfc146719ecbe22291054c18847c464285854265ee516a5b4c8b/ptpython-3.0.31.tar.gz" + sha256 "4fed0be42bad01b7c299922cf262f51d8a77c9c8ab8e261c902e981a57439c13" + license "BSD-3-Clause" + head "https://github.com/prompt-toolkit/ptpython.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "20735c91a2a9bdc85f85e15f4352e27025c0fcedc6d57ade2d9d2e34d07606c5" + end + + depends_on "python@3.14" + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "jedi" do + url "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz" + sha256 "4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0" + end + + resource "parso" do + url "https://files.pythonhosted.org/packages/d4/de/53e0bcf53d13e005bd8c92e7855142494f41171b34c2536b86187474184d/parso-0.8.5.tar.gz" + sha256 "034d7354a9a018bdce352f48b2a8a450f05e9d6ee85db84764e9b6bd96dafe5a" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.py").write "print(2+2)\n" + assert_equal "4", shell_output("#{bin}/ptpython test.py").chomp + end +end diff --git a/Formula/p/ptunnel.rb b/Formula/p/ptunnel.rb new file mode 100644 index 0000000000000..0a2cfc0f0c0d1 --- /dev/null +++ b/Formula/p/ptunnel.rb @@ -0,0 +1,50 @@ +class Ptunnel < Formula + desc "Tunnel over ICMP" + homepage "https://www.cs.uit.no/~daniels/PingTunnel/" + url "https://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-0.72.tar.gz" + sha256 "b318f7aa7d88918b6269d054a7e26f04f97d8870f47bd49a76cb2c99c73407a4" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?PingTunnel[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0049b270a67c200fc498f50bfa732e2812106e758b2ee1eac0e43ca41e48c241" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc5d1df7e57ad9f2fe35f68eef503fd2f9bf7da2edc2d0374acc3a37891ee13e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d848b4fd2c1139d8ae71d471f17fec38d775c6d6a24db390d1abdc425d4a522c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1de9c44033945ce32afe27993fee10ab0811b3fa64c50482dbb046feeb92c34b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6d64c07c1f6080241961bd8744f5990af83217198b6385a2a878c10e5e4e8352" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "706c9eaf3a158032cf0f361ceee4779ef2afe74f515853405afd24cc9c6e8ade" + sha256 cellar: :any_skip_relocation, sonoma: "f65aa88ce0023383667679f121c2c849fe0391b6684ddb25d79255d18773a67b" + sha256 cellar: :any_skip_relocation, ventura: "42d5d51d090829c42004c09ee3558247818c654f2adc25ea39f377f0c3cc54ee" + sha256 cellar: :any_skip_relocation, monterey: "58964687f840c6e5c7b785060b23068ab6735c798a284bd07bd8457747717def" + sha256 cellar: :any_skip_relocation, big_sur: "23ebdbcf1362144e6fc8b02d950ee43e6216338b940fd90c471a132c0e5f49b3" + sha256 cellar: :any_skip_relocation, catalina: "15d1785092ce8788e96232fc051be9311aaa6565c6a65dfbb96d0ec597970384" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b8e66df9c54317634708382da6d32f7d5f0e8fa5b2e6a226dae499338e335ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "635b36ee0d56fa5b28aebb302aad7d8d3e922c4a143854b17cc8087e7f2c0683" + end + + uses_from_macos "libpcap" + + def install + system "make", "install", "prefix=#{prefix}" + end + + def caveats + <<~EOS + Normally, ptunnel uses raw sockets and must be run as root (using sudo, for example). + + Alternatively, you can try using the -u flag to start ptunnel in 'unprivileged' mode, + but this is not recommended. See https://www.cs.uit.no/~daniels/PingTunnel/ for details. + EOS + end + + test do + assert_match "v #{version}", shell_output("#{bin}/ptunnel -h", 1) + end +end diff --git a/Formula/p/publish.rb b/Formula/p/publish.rb new file mode 100644 index 0000000000000..c5a26cccb3880 --- /dev/null +++ b/Formula/p/publish.rb @@ -0,0 +1,46 @@ +class Publish < Formula + desc "Static site generator for Swift developers" + homepage "https://github.com/JohnSundell/Publish" + url "https://github.com/JohnSundell/Publish/archive/refs/tags/0.9.0.tar.gz" + sha256 "e098a48e8763d3aef9abd1a673b8b28b4b35f8dbad15218125e18461104874ca" + license "MIT" + revision 2 + head "https://github.com/JohnSundell/Publish.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3d712d342ef986f6c33dee070c00858ca051c1341b510a1ed9bfffd323c38d72" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "12bb9d41814cacbe362e02d37825f9eabb5c2c228d2502441389a31deff9cd06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d595b1f7732f64fd874095b0c17ec22b77d7261fa83e0324f4657bfd8dbbedf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75ad288c89a4abfff3648d4628b71133b15a9da2a7e85ea2ce72558c8b6a5ced" + sha256 cellar: :any_skip_relocation, sonoma: "4653f1571901ea7091329d5f935e8a5c05b2c7a5d9a8c8751b9a0ad6052547e4" + sha256 cellar: :any_skip_relocation, ventura: "4e568dd197329c4fe8ef509c03dbc0071615353caccd1fca8307b97a039fa08c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f58f789837bfe9b47b668faf048f2324176d665cc91d8f28b8bd3e6644425378" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbf8d184068be460c2c8fb09aa1faad7180b1341bd50f670d7ca97a6d93e8672" + end + + # https://github.com/JohnSundell/Publish#system-requirements + depends_on xcode: ["13.0", :build] + # missing `libswift_Concurrency.dylib` on big_sur` + depends_on macos: :monterey + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release" + bin.install ".build/release/publish-cli" => "publish" + end + + test do + mkdir testpath/"test" do + system bin/"publish", "new" + assert_path_exists testpath/"test"/"Package.swift" + end + end +end diff --git a/Formula/p/pueue.rb b/Formula/p/pueue.rb new file mode 100644 index 0000000000000..ef410ddbe61bf --- /dev/null +++ b/Formula/p/pueue.rb @@ -0,0 +1,61 @@ +class Pueue < Formula + desc "Command-line tool for managing long-running shell commands" + homepage "https://github.com/Nukesor/pueue" + url "https://github.com/Nukesor/pueue/archive/refs/tags/v4.0.1.tar.gz" + sha256 "7bbe552700041b2e9cd360b69c328d6932ad57d0e0a480a8992fab3a2737cdf8" + license "MIT" + head "https://github.com/Nukesor/pueue.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "47f7a90e264ff587c6aea3a2b9d22ab299f01ffff21ab57555a1e2dc3f1d7381" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7401d5fd541b7434ad9e32192bb87aca9005264e74221425af579029a03d273a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7bc6759a32036c73c595b374d27a5bfbe9a90c8686510ae1d214547a2e02d894" + sha256 cellar: :any_skip_relocation, arm64_ventura: "111eacd663ec1d99e4e38a853cfd827f357c73d41052f245afad6d00cb174f5a" + sha256 cellar: :any_skip_relocation, sonoma: "da6ac299cb09ad63c0ad7a47a5ebb4e2522975f7df67d5ab54e619205102934b" + sha256 cellar: :any_skip_relocation, ventura: "49f5765541590b87a5cd4ae3333e6c6259b3b9dada68e31b3adc9b196b83d97f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7f16f36d9aa5b2a6935d725fa83bfddd77be23e4a37812b93f6c725afdfdb7d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87cd64ee72fd805188640798966bfb0cf81d8891d35ab81c14ad839013245cbc" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "pueue") + + generate_completions_from_executable(bin/"pueue", "completions") + end + + service do + run [opt_bin/"pueued", "--verbose"] + keep_alive false + working_dir var + log_path var/"log/pueued.log" + error_log_path var/"log/pueued.log" + end + + test do + pid = fork do + exec bin/"pueued" + end + sleep 2 + + begin + mkdir testpath/"Library/Preferences" # For macOS + mkdir testpath/".config" # For Linux + + output = shell_output("#{bin}/pueue status") + assert_match "Task list is empty. Add tasks with `pueue add -- [cmd]`", output + + output = shell_output("#{bin}/pueue add x") + assert_match "New task added (id 0).", output + + output = shell_output("#{bin}/pueue status") + assert_match "(1 parallel): running", output + ensure + Process.kill("TERM", pid) + end + + assert_match "pueued #{version}", shell_output("#{bin}/pueued --version") + assert_match "pueue #{version}", shell_output("#{bin}/pueue --version") + end +end diff --git a/Formula/p/puf.rb b/Formula/p/puf.rb new file mode 100644 index 0000000000000..0008c9128a10c --- /dev/null +++ b/Formula/p/puf.rb @@ -0,0 +1,38 @@ +class Puf < Formula + desc "Parallel URL fetcher" + homepage "https://puf.sourceforge.net/" + url "https://downloads.sourceforge.net/project/puf/puf/1.0.0/puf-1.0.0.tar.gz" + sha256 "3f1602057dc47debeb54effc2db9eadcffae266834389bdbf5ab14fc611eeaf0" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ec01e1392c1d20a55a38aa3f02102a9687184966b760254a2fb280c37f48da73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "148adff9f4f307fc6b8a94bf5a5baa2c66dd8f3aee810c349a4cc3a356517d90" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb2dd937eb2ae17b8c5abb9df4e2a8639c02dfce8ae5d6a78f26a51ec5104d44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ba1fc9eecb1a5920c6eadb88fe5c2142bafd356d420356f15afb0a923ef5b3b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "48d6dada2a26fdd71146a6e83b2cd5792af6a365804f5d714171eccbdcbcdc7b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f9daf26921e00b28187380efab232b5f4d4e02877e258ec6e4e204d446c25cf0" + sha256 cellar: :any_skip_relocation, sonoma: "6341794aaef25ff32f718ae11389dea24c95da2ea7b6d0dc375b44f6d17cc829" + sha256 cellar: :any_skip_relocation, ventura: "34f663287a1e6eccd24478afff1260281cdca68dda5efa9a6211d1aebd6d425b" + sha256 cellar: :any_skip_relocation, monterey: "c1afcd4b99802518b7cee90c23225bec8d2d7104efa503c4115830ab51f582e0" + sha256 cellar: :any_skip_relocation, big_sur: "590e0087a563c0fa38996f69c80316f95a54a3a788f0e07390ba192db1d67c44" + sha256 cellar: :any_skip_relocation, catalina: "cad4c55abee941651ac9e1f203041240aae43b990f3e9efdce7cd9e0342b727c" + sha256 cellar: :any_skip_relocation, arm64_linux: "94b07bacd92695fdd33ae7adc47e52dba95c837adf0ee6d653e0c5f564b414f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0dccb5f5a95571338a440abdc6df58db883ad1ce1b4a3ddc8bae95da82be9de" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"puf", "-r", "example.com" + end +end diff --git a/Formula/p/pug.rb b/Formula/p/pug.rb new file mode 100644 index 0000000000000..cd93ebc0b83e1 --- /dev/null +++ b/Formula/p/pug.rb @@ -0,0 +1,46 @@ +class Pug < Formula + desc "Drive terraform at terminal velocity" + homepage "https://github.com/leg100/pug" + url "https://github.com/leg100/pug/archive/refs/tags/v0.6.2.tar.gz" + sha256 "e4a298523b450883be7bb3a9ab3f40c5d821ac88bd91d682093595c537a7f45d" + license "MPL-2.0" + head "https://github.com/leg100/pug.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "287f4c4179583f224f6727b0a652451e143097b41102fc7f25be59c134069e36" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42846ed3a6a39b4a03222a858abe4d8c2e7997f897f7dcce63f1c14ac4dcc5f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42846ed3a6a39b4a03222a858abe4d8c2e7997f897f7dcce63f1c14ac4dcc5f6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "42846ed3a6a39b4a03222a858abe4d8c2e7997f897f7dcce63f1c14ac4dcc5f6" + sha256 cellar: :any_skip_relocation, sonoma: "446973d6d7d50bd36a091955da5350479b69d92bd6adabea81cfaafdadecc04b" + sha256 cellar: :any_skip_relocation, ventura: "446973d6d7d50bd36a091955da5350479b69d92bd6adabea81cfaafdadecc04b" + sha256 cellar: :any_skip_relocation, arm64_linux: "04b69c5aca4624ea65e4e1514689a7b8c00c93195a30868d8fb8849c1da6da8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "084b94edf9580a6e255587ed3b9745df7db27780feb351b31eb559e9a6157964" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/leg100/pug/internal/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/pug --version") + + # Fails in Linux CI with `open /dev/tty: no such device or address` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + begin + output_log = testpath/"output.log" + pid = spawn bin/"pug", "--debug", [:out, :err] => output_log.to_s + + sleep 1 + + assert_match "loaded 0 modules", output_log.read + assert_path_exists testpath/"messages.log" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/p/pugixml.rb b/Formula/p/pugixml.rb new file mode 100644 index 0000000000000..ab2eb29e72876 --- /dev/null +++ b/Formula/p/pugixml.rb @@ -0,0 +1,59 @@ +class Pugixml < Formula + desc "Light-weight C++ XML processing library" + homepage "https://pugixml.org/" + url "https://github.com/zeux/pugixml/releases/download/v1.15/pugixml-1.15.tar.gz" + sha256 "655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "815d949fe34679a2c3e0df5d253b824ebe69305ae29ce28d03e4e2cd604ce46c" + sha256 cellar: :any, arm64_sequoia: "1d3349e3cf6dc0d06fffd2c52c62801b3c804e36cabcb01f46682738bb1485c2" + sha256 cellar: :any, arm64_sonoma: "d648b349479d6bd41c0ee2e22fb9108abb33a553c5ab21584564a6a36fac04c6" + sha256 cellar: :any, arm64_ventura: "e6641fb533ddb45418980698aab6b06a02a3c5e763cae6ab7bb513289e5248d3" + sha256 cellar: :any, sonoma: "32cc92f8679e9a6d8b0c45140a19f0ac5c330e470bbca5cddcf494c6511beae6" + sha256 cellar: :any, ventura: "fc421bf66929e255b8a433eae74d0f32482ce73dea8b8da850f9f6efd1970a92" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfd7825a7cb16dab42a7884e8626dc8d7380081f0e163517037e28bd5136491f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2578c1114075b488ec20a5c627d9616af5a6e5f22d9f99e54d0bb6221a861f77" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DPUGIXML_BUILD_SHARED_AND_STATIC_LIBS=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(int argc, char *argv[]) { + pugi::xml_document doc; + pugi::xml_parse_result result = doc.load_file("test.xml"); + + assert(result); + assert(strcmp(doc.child_value("root"), "Hello world!") == 0); + } + CPP + + (testpath/"test.xml").write <<~XML + Hello world! + XML + + system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lpugixml" + system "./test" + end +end diff --git a/Formula/p/pulledpork.rb b/Formula/p/pulledpork.rb new file mode 100644 index 0000000000000..a4dc1f72e5146 --- /dev/null +++ b/Formula/p/pulledpork.rb @@ -0,0 +1,91 @@ +class Pulledpork < Formula + desc "Snort rule management" + homepage "https://github.com/shirkdog/pulledpork" + url "https://github.com/shirkdog/pulledpork/archive/refs/tags/v0.7.4.tar.gz" + sha256 "f0149eb6f723b622024295e0ee00e1acade93fae464b9fdc323fdf15e99c388c" + license "GPL-2.0-or-later" + head "https://github.com/shirkdog/pulledpork.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6cc19983e6d8418de919dfefbd48de58655b16751cbf82a0a37814d819072d62" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "521630afa230a7c06cec0e42ff50663ceb86232c24780d3f26b414a05ce539ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "73420470b3baa100fcd93013911028bf923cb110e9ef7a76d5aa3bce5700dd60" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c426bbb74ebe2d71cdcc359b5b627d3cee771138be816e22aafcf9bacab773e2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c426bbb74ebe2d71cdcc359b5b627d3cee771138be816e22aafcf9bacab773e2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9d356a368ba34f3ebabf869b9edf2038d962b7cdd661be3317e3b3b68b825c03" + sha256 cellar: :any_skip_relocation, sonoma: "ca02edd3b3c9f8520ffb30a7cfec1f73e07dc18c7a85fa769534ce304afb9979" + sha256 cellar: :any_skip_relocation, ventura: "9ac992cb245188689c716615660393ff8904ed48b56ddf5d5b36df147274480c" + sha256 cellar: :any_skip_relocation, monterey: "9ac992cb245188689c716615660393ff8904ed48b56ddf5d5b36df147274480c" + sha256 cellar: :any_skip_relocation, big_sur: "ef9c66506c6ac34967fbc3c9bf48ecfc2946814a2dccb3e1fb53f1212e7a3bb1" + sha256 cellar: :any_skip_relocation, catalina: "deaaf558752aa6c864008dbf4cd058850d4206f5e97b50bc6e1f5b2706694fa5" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e4bc594fcded62faba1a9dbc1003b161d8eca7007a19245833d888010d17026" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f925daf30d6bdfa68a3d8ebf2e2d0fef9a069aa14cd6d45c2b1e41b72665acdd" + end + + depends_on "openssl@3" + + uses_from_macos "perl" + + on_linux do + resource "Encode::Locale" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz" + sha256 "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1" + end + + resource "HTTP::Request" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.36.tar.gz" + sha256 "576a53b486af87db56261a36099776370c06f0087d179fc8c7bb803b48cddd76" + end + + resource "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.05.tar.gz" + sha256 "365d6294dfbd37ebc51def8b65b81eb79b3934ecbc95a2ec2d4d827efe6a922b" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.10.tar.gz" + sha256 "16325d5e308c7b7ab623d1bf944e1354c5f2245afcfadb8eed1e2cae9a0bd0b5" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + end + + resource "LWP::UserAgent" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.64.tar.gz" + sha256 "48335e0992b4875bd73c6661439f3506c2c6d92b5dd601582b8dc22e767d3dae" + end + end + + resource "Switch" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Switch-2.17.tar.gz" + sha256 "31354975140fe6235ac130a109496491ad33dd42f9c62189e23f49f75f936d75" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + + inreplace "pulledpork.pl", "#!/usr/bin/env perl", "#!/usr/bin/perl" + + chmod 0755, "pulledpork.pl" + bin.install "pulledpork.pl" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + doc.install Dir["doc/*"] + (etc/"pulledpork").install Dir["etc/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/pulledpork.pl -V") + end +end diff --git a/Formula/p/pulp-cli.rb b/Formula/p/pulp-cli.rb new file mode 100644 index 0000000000000..3459fd101b617 --- /dev/null +++ b/Formula/p/pulp-cli.rb @@ -0,0 +1,98 @@ +class PulpCli < Formula + include Language::Python::Virtualenv + + desc "Command-line interface for Pulp 3" + homepage "https://github.com/pulp/pulp-cli" + url "https://files.pythonhosted.org/packages/69/01/d999e6c13a2d0487edd3ffbffbcf77fa7ef6fd3c1b5ee01837c529f1bec1/pulp_cli-0.36.1.tar.gz" + sha256 "5ed0856a97486829e487639e8acf58f81024ee251277de20abd2bd35400b129b" + license "GPL-2.0-or-later" + head "https://github.com/pulp/pulp-cli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4b94657013ab35a0a8b06afd9ee2558ab7fe5c0eec1c0e2bf86e27c24a32ea05" + sha256 cellar: :any, arm64_sequoia: "4206259a650999b4f024963c67d5045e4efc12ba421415d93d2f2aefdd59083c" + sha256 cellar: :any, arm64_sonoma: "e24503214c49735b56bc8605acd3a8a4ac4c8a51d09cdec2f7077801b9172ebb" + sha256 cellar: :any, sonoma: "333b6a64bb430ca041a77e506537a6e98a14f442ea6444f929796680f380d618" + sha256 cellar: :any_skip_relocation, arm64_linux: "e79e4b3378fb5c978e53bdee5ff03e033295fe7bbe209ef9b354670a39920f71" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28e7354845a96afa582971bd9513fcd581e52fb1f07145ed299ff0d83cd0ed25" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz" + sha256 "27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/69/7f/0652e6ed47ab288e3756ea9c0df8b14950781184d4bd7883f4d87dd41245/multidict-6.6.4.tar.gz" + sha256 "d2d4e4787672911b48350df02ed3fa3fffdc2f2e8ca06dd6afdf34189b76a9dd" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pulp-glue" do + url "https://files.pythonhosted.org/packages/38/ce/3826a8f318fd69ba8b266a4cbbc99b25f66d40893ad71cbbb1c3490e468b/pulp_glue-0.36.1.tar.gz" + sha256 "9418b16400aaaeedadf3e7e45ca5ddc32ec0eeb28f53e4a50a369b25d4c83509" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/fb/2e/8da627b65577a8f130fe9dfa88ce94fcb24b1f8b59e0fc763ee61abef8b8/schema-0.7.8.tar.gz" + sha256 "e86cc08edd6fe6e2522648f4e47e3a31920a76e82cce8937535422e310862ab5" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/pulp --version") + + (testpath/"config.toml").write <<~TEXT + [cli] + base_url = "https://pulp.dev" + verify_ssl = false + format = "json" + TEXT + + output = shell_output("#{bin}/pulp config validate --location #{testpath}/config.toml") + assert_match "valid pulp-cli config", output + end +end diff --git a/Formula/p/pulp.rb b/Formula/p/pulp.rb new file mode 100644 index 0000000000000..a4433fe6c70c5 --- /dev/null +++ b/Formula/p/pulp.rb @@ -0,0 +1,36 @@ +class Pulp < Formula + desc "Build tool for PureScript projects" + homepage "https://github.com/purescript-contrib/pulp" + url "https://registry.npmjs.org/pulp/-/pulp-16.0.2.tgz" + sha256 "a70585e06c1786492fde10c9c1bc550405351c2e6283bbd3f777a6a04fb462ff" + license "LGPL-3.0-or-later" + + livecheck do + url :stable + regex(%r{href=.*?/package/pulp/v/(\d+(?:[.-]\d+)+)["']}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "0de9300b253bf5fa068c578ff479fc02a5371a7367bfaf9b3563122b8163ae4a" + end + + depends_on "bower" + depends_on "node" + depends_on "purescript" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/pulp --version") + + system bin/"pulp", "init" + assert_path_exists testpath/".gitignore" + assert_path_exists testpath/"bower.json" + end +end diff --git a/Formula/p/pulsarctl.rb b/Formula/p/pulsarctl.rb new file mode 100644 index 0000000000000..f08b943640988 --- /dev/null +++ b/Formula/p/pulsarctl.rb @@ -0,0 +1,50 @@ +class Pulsarctl < Formula + desc "CLI for Apache Pulsar written in Go" + homepage "https://streamnative.io/" + url "https://github.com/streamnative/pulsarctl/archive/refs/tags/v4.1.0.5.tar.gz" + sha256 "3f6df173e1a61d9f11482180537f47440d49bacfa5a4a4f199e0991f49748b00" + license "Apache-2.0" + head "https://github.com/streamnative/pulsarctl.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to check releases instead of Git tags. Upstream also publishes + # releases for multiple major/minor versions and the "latest" release + # may not be the highest stable version, so we have to use the + # `GithubReleases` strategy while this is the case. + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4b175a8b4b100de5436e335c529a140356ffb704df3400d843e389f554b73f52" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f4ff1a98cca50078a47fcd4dca80a8964826aeef55e17a4850986b9ca4fe161" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8966aab3f8792cc9f99732bd33873c9094ad6f2b658c3dedce2ec271cd6acdc2" + sha256 cellar: :any_skip_relocation, sonoma: "302bd44f198489a2755e4a7351942f71d2325f184fbfff36563fd9b6a20bf3f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a74fabec0688de655f6a013c855aeaf0e91e2caf60f03512e5438d6c1bf8334" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f110f99ea743a921997bf62b7e68de5467fc92c38a63f957cd01106da487c59" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/streamnative/pulsarctl/pkg/cmdutils.ReleaseVersion=v#{version} + -X github.com/streamnative/pulsarctl/pkg/cmdutils.BuildTS=#{time.iso8601} + -X github.com/streamnative/pulsarctl/pkg/cmdutils.GitHash=#{tap.user} + -X github.com/streamnative/pulsarctl/pkg/cmdutils.GitBranch=master + -X github.com/streamnative/pulsarctl/pkg/cmdutils.GoVersion=go#{Formula["go"].version} + ] + system "go", "build", *std_go_args(ldflags:) + + # Install shell completions + generate_completions_from_executable(bin/"pulsarctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/pulsarctl --version") + assert_match "connection refused", shell_output("#{bin}/pulsarctl clusters list 2>&1", 1) + end +end diff --git a/Formula/p/pulseaudio.rb b/Formula/p/pulseaudio.rb new file mode 100644 index 0000000000000..ef047f4a2c69b --- /dev/null +++ b/Formula/p/pulseaudio.rb @@ -0,0 +1,113 @@ +class Pulseaudio < Formula + desc "Sound system for POSIX OSes" + homepage "https://wiki.freedesktop.org/www/Software/PulseAudio/" + url "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-17.0.tar.xz" + sha256 "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later", "BSD-3-Clause"] + head "https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git", branch: "master" + + # The regex here avoids x.99 releases, as they're pre-release versions. + livecheck do + url :stable + regex(/href=["']?pulseaudio[._-]v?((?!\d+\.9\d+)\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "a5fb7e3985bda5814f9eac5afa28073cc8aa1690ef73981c98c5712731e0dc4b" + sha256 arm64_sequoia: "f279ea9efd07106c6e049b0d5bcca39a5fb06f5bd95079f998b2175726050c79" + sha256 arm64_sonoma: "6c8704f6c5bce3450d75da7983a9d5ef2eca52ce9ef944c85a54e8e86c9c4354" + sha256 arm64_ventura: "8f36cbfefb820a38dce3efca6458c3837950448a59ff77337105f7f3cd550429" + sha256 sonoma: "43cc094dbeb0681caa68cc3ed6e3dab115a0c52ae09fb39b6e3ac16a810edd4b" + sha256 ventura: "26a46b5af9fa4436be2057e2c838ff5b4220cb6724ffa28ad10dec4437ba99ea" + sha256 arm64_linux: "cbb10721c978f2be94f38829b6f1ab941cd6dd310fc00c45ee8b1d4ebdb16ab1" + sha256 x86_64_linux: "0a8deac02332caf78aef95c279d76dd381ae1b08e0c8f74277880570a4d60527" + end + + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libsndfile" + depends_on "libsoxr" + depends_on "libtool" + depends_on "openssl@3" + depends_on "orc" + depends_on "speexdsp" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "gettext" # for libintl + end + + on_linux do + depends_on "perl-xml-parser" => :build + depends_on "alsa-lib" + depends_on "dbus" + depends_on "libcap" + end + + def install + enabled_on_linux = if OS.linux? + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" + "enabled" + else + # Restore coreaudio module as default on macOS + inreplace "meson.build", "cdata.set('HAVE_COREAUDIO', 0)", "cdata.set('HAVE_COREAUDIO', 1)" + "disabled" + end + + # Default `tdb` database isn't available in Homebrew + args = %W[ + --sysconfdir=#{etc} + -Ddatabase=simple + -Ddoxygen=false + -Dman=true + -Dtests=false + -Dstream-restore-clear-old-devices=true + + -Dlocalstatedir=#{var} + -Dbashcompletiondir=#{bash_completion} + -Dzshcompletiondir=#{zsh_completion} + -Dudevrulesdir=#{lib}/udev/rules.d + + -Dalsa=#{enabled_on_linux} + -Ddbus=#{enabled_on_linux} + -Dglib=enabled + -Dgtk=disabled + -Dopenssl=enabled + -Dorc=enabled + -Dsoxr=enabled + -Dspeex=enabled + -Dsystemd=disabled + -Dx11=disabled + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # Don't hardcode Cellar references in configuration files + inreplace etc.glob("pulse/*"), prefix, opt_prefix, audit_result: false + + # Create the `default.pa.d` directory to avoid error messages like + # https://github.com/Homebrew/homebrew-core/issues/224722 + (etc/"pulse/default.pa.d").mkpath + touch etc/"pulse/default.pa.d/.keepme" + end + + service do + run [opt_bin/"pulseaudio", "--exit-idle-time=-1", "--verbose"] + keep_alive true + log_path var/"log/pulseaudio.log" + error_log_path var/"log/pulseaudio.log" + end + + test do + assert_match "module-sine", shell_output("#{bin}/pulseaudio --dump-modules") + end +end diff --git a/Formula/p/pulumi.rb b/Formula/p/pulumi.rb new file mode 100644 index 0000000000000..26d0f648ebdf5 --- /dev/null +++ b/Formula/p/pulumi.rb @@ -0,0 +1,47 @@ +class Pulumi < Formula + desc "Cloud native development platform" + homepage "https://pulumi.io/" + url "https://github.com/pulumi/pulumi.git", + tag: "v3.205.0", + revision: "f412e2ad2eda71f29874cda807bc76c501df1805" + license "Apache-2.0" + head "https://github.com/pulumi/pulumi.git", branch: "master" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20f9677205351252de554d1d770ad45775cb0fdc1301579637781281e8a3450c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a2f9b8beb02e18861202ffc56ce2e5ee620e9a7f3a3c4fff8ab8443ae73f63ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "58ac586a20392561a5c716f2cecec3a31f651b1f5e4194f103349567f980f033" + sha256 cellar: :any_skip_relocation, sonoma: "a1e7a3d59842efa72140d843f9ffd130b659551b888607703d2df07e58494c65" + sha256 cellar: :any_skip_relocation, arm64_linux: "402c86207312c6dd4ea5b393dd2c78282258c5b34c046cb1342e982cea7f7ea7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59b2c6959159792ca7c2c46e698fba9d0d31985ad18f6090d5cad20bbd3f2344" + end + + depends_on "go" => :build + + def install + cd "./sdk" do + system "go", "mod", "download" + end + + cd "./pkg" do + system "go", "mod", "download" + end + + system "make", "brew" + + bin.install Dir["#{ENV["GOPATH"]}/bin/pulumi*"] + + # Install shell completions + generate_completions_from_executable(bin/"pulumi", "gen-completion") + end + + test do + ENV["PULUMI_ACCESS_TOKEN"] = "local://" + ENV["PULUMI_HOME"] = testpath + ENV["PULUMI_TEMPLATE_PATH"] = testpath/"templates" + assert_match "Your new project is ready to go!", + shell_output("#{bin}/pulumi new aws-typescript --generate-only --force --yes") + end +end diff --git a/Formula/p/pulumictl.rb b/Formula/p/pulumictl.rb new file mode 100644 index 0000000000000..c6ed52dfd846d --- /dev/null +++ b/Formula/p/pulumictl.rb @@ -0,0 +1,38 @@ +class Pulumictl < Formula + desc "Swiss army knife for Pulumi development" + homepage "https://github.com/pulumi/pulumictl" + url "https://github.com/pulumi/pulumictl/archive/refs/tags/v0.0.50.tar.gz" + sha256 "5950c1e147480068cf292f0e6d68bdf38a31be971ec8dad2f6052963d3fe5eb2" + license "Apache-2.0" + head "https://github.com/pulumi/pulumictl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "48dce17fc4889c8a7b274cf58f6cd0f6a3e24063a505930f98c12fe7c409784f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07ef245cd91ed7be0b36a07f73b41e3c20a95c589a98ff50a1a41c401d90f0cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "07ef245cd91ed7be0b36a07f73b41e3c20a95c589a98ff50a1a41c401d90f0cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "07ef245cd91ed7be0b36a07f73b41e3c20a95c589a98ff50a1a41c401d90f0cb" + sha256 cellar: :any_skip_relocation, sonoma: "054af9bbe6d7c11b30814f7aae599fdba815b7baadd3c637982f28b1c1023ef2" + sha256 cellar: :any_skip_relocation, ventura: "054af9bbe6d7c11b30814f7aae599fdba815b7baadd3c637982f28b1c1023ef2" + sha256 cellar: :any_skip_relocation, arm64_linux: "2527999f798d58194819b11fe1386555234c32ed4c2be61c086a2b91aae5ca11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f708231496a7cf63fe03a18deead41fc8040f0eba7f76e8d8e9f85ebc3032aab" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/pulumi/pulumictl/pkg/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/pulumictl" + + generate_completions_from_executable(bin/"pulumictl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/pulumictl version") + + output = shell_output("#{bin}/pulumictl convert-version --language generic --version v1.2.3") + assert_equal "1.2.3", output.strip + + output = shell_output("#{bin}/pulumictl create homebrew-bump v1.0.0 test-repo --org test-org 2>&1", 1) + assert_match "Error: unable to create dispatch event", output.strip + end +end diff --git a/Formula/p/pumba.rb b/Formula/p/pumba.rb new file mode 100644 index 0000000000000..2761000aa04ec --- /dev/null +++ b/Formula/p/pumba.rb @@ -0,0 +1,46 @@ +class Pumba < Formula + desc "Chaos testing tool for Docker" + homepage "https://github.com/alexei-led/pumba" + url "https://github.com/alexei-led/pumba/archive/refs/tags/0.11.6.tar.gz" + sha256 "50df612ecd3cfb2b99c41732f5ed80018aea4e4cdaa8dfee2a60ea9ff9d474eb" + license "Apache-2.0" + head "https://github.com/alexei-led/pumba.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "38788444c09830d651974c980b94d4bab3032ffbb6cb6d228b447ab039c5340a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a9f66c6aa33a8fb69c81a1da31157c7db688de6a28e774a09cea0c77b6a9d73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a9f66c6aa33a8fb69c81a1da31157c7db688de6a28e774a09cea0c77b6a9d73" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a9f66c6aa33a8fb69c81a1da31157c7db688de6a28e774a09cea0c77b6a9d73" + sha256 cellar: :any_skip_relocation, sonoma: "7449b4acb586f84c5de04d97f71c5f4fa56451e1437d46e0c8f001f53f5ac74b" + sha256 cellar: :any_skip_relocation, ventura: "7449b4acb586f84c5de04d97f71c5f4fa56451e1437d46e0c8f001f53f5ac74b" + sha256 cellar: :any_skip_relocation, arm64_linux: "44f6462686633e36b358e4c1fae0d050f51efb860c4bb0ffec8630ec4eaf1431" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5edfec7bb124601265d2a2654435bef2118e3e6187d60b48e746a6d8abb9dee9" + end + + depends_on "go" => :build + + def install + goldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.branch=master + -X main.buildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags: goldflags), "./cmd" + end + + test do + assert_match version.to_s, shell_output("#{bin}/pumba --version") + # CI runs in a Docker container, so the test does not run as expected. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + output = pipe_output("#{bin}/pumba rm test-container 2>&1") + assert_match "Is the docker daemon running?", output + end +end diff --git a/Formula/p/punktf.rb b/Formula/p/punktf.rb new file mode 100644 index 0000000000000..d9b4a6d6767bc --- /dev/null +++ b/Formula/p/punktf.rb @@ -0,0 +1,37 @@ +class Punktf < Formula + desc "Cross-platform multi-target dotfiles manager" + homepage "https://shemnei.github.io/punktf/" + url "https://github.com/Shemnei/punktf/archive/refs/tags/v3.1.2.tar.gz" + sha256 "99d5c42a621a609c59cfa5088391e4e0384739850df0eab3917b4a7d10fbebcc" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/Shemnei/punktf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0bc1e636ada40b6160fec2095fedbcd472a369b61ec45a1464801621b89ea61a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fef7aaa4d61cf8f3bb0ebec8d120a4ac3608c7a98ed18fca64d83ac1840d5c4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7b2b1e0a8b29988b87a3ea87e53eca3acc461f6398b0d5d7f5eaed5aef543de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67350704bf6c38504627f458d3f6246efe92368ce4b5ee3991c974b70302267e" + sha256 cellar: :any_skip_relocation, sonoma: "a4d96933235b92eedbfc083698c362ec32222191d87d7971f5f84ecc785c437d" + sha256 cellar: :any_skip_relocation, ventura: "608bd63000e880a3d2722f6379ce8103c1a01e05d651b8285ebb4cc3936d259a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3f7359d14c59e8948dab52df36093bbc121645c692bc8e7e8cbda8c3ce21842" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1656a42b900b124a41f8d6d155714dcf8879eea6823489b29fee3cc895b9c14d" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/punktf-cli") + + generate_completions_from_executable(bin/"punktf", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/punktf --version") + + mkdir_p testpath/"profiles" + touch testpath/"profiles/test.yaml" + + output = shell_output("#{bin}/punktf deploy --profile test --source #{testpath} --target #{testpath}") + assert_match "SUCCESS", output + end +end diff --git a/Formula/p/pup.rb b/Formula/p/pup.rb new file mode 100644 index 0000000000000..64e0ba0216f06 --- /dev/null +++ b/Formula/p/pup.rb @@ -0,0 +1,52 @@ +class Pup < Formula + desc "Parse HTML at the command-line" + homepage "https://github.com/EricChiang/pup" + url "https://github.com/ericchiang/pup/archive/refs/tags/v0.4.0.tar.gz" + sha256 "0d546ab78588e07e1601007772d83795495aa329b19bd1c3cde589ddb1c538b0" + license "MIT" + head "https://github.com/EricChiang/pup.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "011465853c0a2aa9712231f8aa3cd4e40037c9050ffa90a56fadc32f8dfbb822" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0a8a91d48aeea561d2a0f1cb092b9dfd0c0d4ab97ddaf86aefade8602af326c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8023f82224007c85960698b96baa60a1749de8ecc9aeb24e56cda2fc2208433a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b6854a47afc836d12ed5447f9d285484e200f0d4350411f5aac7bf5e30f33a07" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8933d95f5318154ec8f9e7d2080c24c3657d2c850935f9c165e485ad98ad6bff" + sha256 cellar: :any_skip_relocation, sonoma: "8c4d03af8256c9c84f2c5e4e82fcfcc606613a3135b49ca87d1a1a5acadbfeb6" + sha256 cellar: :any_skip_relocation, ventura: "19411ce020f2503f340ad55bc8662a738d404ba40c8119d65e6daa38a468e999" + sha256 cellar: :any_skip_relocation, monterey: "a4e7f5510d0f6a38934fae0c75c8f54949bb13b8a60e5536afa937e2a8951444" + sha256 cellar: :any_skip_relocation, big_sur: "929baa98965ce865620bc15bf4f5951dff558b0ad1f9e439d47faf92798f5405" + sha256 cellar: :any_skip_relocation, catalina: "f5f4f5c09cc76054eac2b96357f4b2aca8501daa8c805801d17079aa7e5395f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "984ec42bb2a863b2afec7954b8b1c706a5474e0cbd278ed5e4f5439c13f02bb2" + end + + # https://github.com/ericchiang/pup/issues/189 + deprecate! date: "2024-02-20", because: :unmaintained + disable! date: "2025-02-24", because: :unmaintained + + depends_on "go" => :build + depends_on "gox" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + dir = buildpath/"src/github.com/ericchiang/pup" + dir.install buildpath.children + + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + + cd dir do + system "gox", "-arch", arch, "-os", os, "./..." + bin.install "pup_#{os}_#{arch}" => "pup" + end + + prefix.install_metafiles dir + end + + test do + output = pipe_output("#{bin}/pup p text{}", "

Hello

", 0) + assert_equal "Hello", output.chomp + end +end diff --git a/Formula/p/pure-ftpd.rb b/Formula/p/pure-ftpd.rb new file mode 100644 index 0000000000000..47035286d0f3e --- /dev/null +++ b/Formula/p/pure-ftpd.rb @@ -0,0 +1,61 @@ +class PureFtpd < Formula + desc "Secure and efficient FTP server" + homepage "https://www.pureftpd.org/" + url "https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.52.tar.gz" + sha256 "1126f3a95856d08889ff89703cb1aa9ec9924d939d154e96904c920f05dc3c74" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "BSD-4-Clause", "ISC"] + + livecheck do + url "https://download.pureftpd.org/pub/pure-ftpd/releases/" + regex(/href=.*?pure-ftpd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "074159e0cd8e43d95bd13eb594a71c72633f447098845594f0fb198cd84860c0" + sha256 cellar: :any, arm64_sequoia: "373b7548ab16130c222ce6d0d5f572058d9861ec3131646dbebe02e49c25f45c" + sha256 cellar: :any, arm64_sonoma: "9bd6c0ac304fdd31a8add00908af3537ab6d1044d2f62845164fd77d04ae3b3e" + sha256 cellar: :any, arm64_ventura: "12f524ce868de1e8cba324a2247bcba19cb13554cc2e8bf1addea3193a1b9dbe" + sha256 cellar: :any, sonoma: "0b042372d9d3d61067a8607a8dd6bbe6206344fac47bdf43c83affe0c12d4290" + sha256 cellar: :any, ventura: "6b565281bbbaa6d6f1db74766b2eb631c93620efdaffe822707e4270ee4ee2ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "318cc3007e75d2ec4361c68eaad1376ad2d50983deafeff9b9dca0a21722d97d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdb09570741e1b04ee89849d62cdc4b7440b2ab283cd7d6d90724009a122e442" + end + + depends_on "libsodium" + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + + on_linux do + depends_on "linux-pam" + end + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --mandir=#{man} + --sysconfdir=#{etc} + --with-everything + --with-pam + --with-tls + --with-bonjour + ] + + system "./configure", *args + system "make", "install" + end + + service do + run [opt_sbin/"pure-ftpd", "--chrooteveryone", "--createhomedir", "--allowdotfiles", + "--login=puredb:#{etc}/pureftpd.pdb"] + keep_alive true + working_dir var + log_path var/"log/pure-ftpd.log" + error_log_path var/"log/pure-ftpd.log" + end + + test do + system bin/"pure-pw", "--help" + end +end diff --git a/Formula/p/pure.rb b/Formula/p/pure.rb new file mode 100644 index 0000000000000..82c689b084f45 --- /dev/null +++ b/Formula/p/pure.rb @@ -0,0 +1,23 @@ +class Pure < Formula + desc "Pretty, minimal and fast ZSH prompt" + homepage "https://github.com/sindresorhus/pure" + url "https://github.com/sindresorhus/pure/archive/refs/tags/v1.24.0.tar.gz" + sha256 "9f6822357e21567eb946ad4de867bc7aea32db3fd58d1d14076604daae305608" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "bedbe228db62ce677631395a78e48945f99b00f80421a686b58c9d14fc6edc2c" + end + + depends_on "zsh" => :test + depends_on "zsh-async" + + def install + zsh_function.install "pure.zsh" => "prompt_pure_setup" + end + + test do + zsh_command = "setopt prompt_subst; autoload -U promptinit; promptinit && prompt -p pure" + assert_match "❯", shell_output("zsh -c '#{zsh_command}'") + end +end diff --git a/Formula/p/purescript-language-server.rb b/Formula/p/purescript-language-server.rb new file mode 100644 index 0000000000000..b1ed6a55982e5 --- /dev/null +++ b/Formula/p/purescript-language-server.rb @@ -0,0 +1,40 @@ +class PurescriptLanguageServer < Formula + desc "Language Server Protocol server for PureScript" + homepage "https://github.com/nwolverson/purescript-language-server" + url "https://registry.npmjs.org/purescript-language-server/-/purescript-language-server-0.18.5.tgz" + sha256 "2b4a55ab4ee71dda3f9feb290437dcf2b8b083344cab8490089d6caab123341d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "dc5f49524090444f724689302457dff282c2ee7655893e172c47cdaf83ebb533" + end + + depends_on "node" + depends_on "purescript" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"purescript-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/p/purescript.rb b/Formula/p/purescript.rb new file mode 100644 index 0000000000000..503021ff027e4 --- /dev/null +++ b/Formula/p/purescript.rb @@ -0,0 +1,60 @@ +class Purescript < Formula + desc "Strongly typed programming language that compiles to JavaScript" + homepage "https://www.purescript.org/" + license "BSD-3-Clause" + + stable do + # NOTE: If the build fails due to dependency resolution, do not report issue + # upstream as we modify upstream's constraints in order to use a newer GHC. + # TODO: Switch to `ghc@9.8` on 0.15.16 and drop `--allow-newer` + url "https://hackage.haskell.org/package/purescript-0.15.15/purescript-0.15.15.tar.gz" + sha256 "9c4a23ea47ff09adc34e260610beabd940ec5c15088234cf120e8660dd220e67" + + depends_on "ghc@9.6" => :build + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b9aeb3f72c90bcf7747ac0000e2609b7d39ad535d00a7ba733dd40f51dbcb5b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c1767c6fe89d2e486911f5c60c81222996c3b47971d57b533bb57ace2d22a4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69551d14eb101c3640582d055929b2d6338310c5422530edb2b1e35dbd648830" + sha256 cellar: :any_skip_relocation, arm64_ventura: "720d717ad6d38ba67c288cca2cc03b236cf29ed3badeb823743d1ab091f8704f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7d4a9daf4fca5b870a4e45590a13e56e8e78f9bef3729047f064a48a86e7e3f9" + sha256 cellar: :any_skip_relocation, sonoma: "133fd37b35ea0ebc610965f55332f02bbf67a00db14c4b518f9e7b714fdd705f" + sha256 cellar: :any_skip_relocation, ventura: "25f3df8f4c4e5eaf94f4fb9411dfcd48ffaaf257f96e454eef88ff387dd7bc8d" + sha256 cellar: :any_skip_relocation, monterey: "a5cf0585bded8ce93f09124d885a8dc00b373b6ca63407300d5b3bcc10aebe9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b63d16bc91ca4f7bb745607399bf01273f7a4b31afb689ea10b7db7ac43bd13e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c07fee914dfa9648df6df6152b7c5d7f0297d2e8133a653a4f3511dcfb72b01c" + end + + head do + url "https://github.com/purescript/purescript.git", branch: "master" + + depends_on "ghc@9.8" => :build + end + + depends_on "cabal-install" => :build + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + # Minimal set of dependencies that need to be unbound to build with newer GHC + args = ["--allow-newer=aeson,base,memory,template-haskell"] if build.stable? + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *std_cabal_v2_args + end + + test do + test_module_path = testpath/"Test.purs" + test_target_path = testpath/"test-module.js" + test_module_path.write <<~PURESCRIPT + module Test where + + main :: Int + main = 1 + PURESCRIPT + system bin/"purs", "compile", test_module_path, "-o", test_target_path + assert_path_exists test_target_path + end +end diff --git a/Formula/p/purr.rb b/Formula/p/purr.rb new file mode 100644 index 0000000000000..941974a1aeb06 --- /dev/null +++ b/Formula/p/purr.rb @@ -0,0 +1,50 @@ +class Purr < Formula + desc "Versatile zsh CLI tool for viewing and searching through Android logcat output" + homepage "https://github.com/google/purr" + url "https://github.com/google/purr/archive/refs/tags/2.0.4.tar.gz" + sha256 "ce8b4d31d6b56e79808f12a37795ea15127f3e01eb94f2becb1ee1cd8724844a" + license "Apache-2.0" + head "https://github.com/google/purr.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8b49680bea9c23c42497fb937f830479971b2c5aa6a7d1fb4ba14b7a83da6baf" + end + + depends_on "fzf" + + uses_from_macos "zsh" + + on_macos do + depends_on "gnu-sed" => :build + end + + def install + # For `sed -i` usage used to remove comments + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + system "make" + bin.install "out/purr" + + # This is needed for test + system "make", "adb_mock", "file_tester", "OUTDIR=#{pkgshare}" + chmod 0755, "#{pkgshare}/adb_mock" + chmod 0755, "#{pkgshare}/file_tester" + end + + def caveats + <<~EOS + At runtime, adb must be accessible from your PATH. + + You can install adb from Homebrew Cask: + brew install --cask android-platform-tools + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/purr -v") + system pkgshare/"file_tester", "-a", pkgshare/"adb_mock", "-p", bin/"purr" + end +end diff --git a/Formula/p/pushpin.rb b/Formula/p/pushpin.rb new file mode 100644 index 0000000000000..308ef0f1bdad9 --- /dev/null +++ b/Formula/p/pushpin.rb @@ -0,0 +1,120 @@ +class Pushpin < Formula + desc "Reverse proxy for realtime web services" + homepage "https://pushpin.org/" + url "https://github.com/fastly/pushpin/releases/download/v1.41.0/pushpin-1.41.0.tar.bz2" + sha256 "1ceef0b8da5229a066906797e47795905f1fe8fb1477edc9d5799720df9943ef" + license "Apache-2.0" + head "https://github.com/fastly/pushpin.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "9cb6d39776602c4d4169a89d281ae69733646412b8fbbba9b9a99344ba7b31a4" + sha256 cellar: :any, arm64_sequoia: "10d962ce0bcb230d74ed1749762f3979abedf90c08bc54bfa26962c29eb8e6db" + sha256 cellar: :any, arm64_sonoma: "343772a7d9955e016e3a7081bc1dabe70915a77702bf460f8f611f7452410294" + sha256 cellar: :any, sonoma: "0be6e6bb46c5d8b38368b3d2719bff619c3c68ceca932e79b3961c3825b635a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fe7194d3f79941769c3b67d92ddae001ed7a5eb4bbcf50dd976729ab3c964fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b598f60bcaf636f79032f8e3d91544a495109746f7d02c7fde223e5befc4768" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "openssl@3" + depends_on "python@3.14" + depends_on "qtbase" + depends_on "zeromq" + depends_on "zurl" + + def install + # Work around `cc` crate picking non-shim compiler when compiling `ring`. + # This causes include/GFp/check.h:27:11: fatal error: 'assert.h' file not found + ENV["HOST_CC"] = ENV.cc + + args = %W[ + RELEASE=1 + PREFIX=#{prefix} + LIBDIR=#{lib} + CONFIGDIR=#{etc} + RUNDIR=#{var}/run + LOGDIR=#{var}/log + BOOST_INCLUDE_DIR=#{Formula["boost"].include} + ] + + system "make", *args + system "make", *args, "install" + end + + test do + conffile = testpath/"pushpin.conf" + routesfile = testpath/"routes" + runfile = testpath/"test.py" + + cp HOMEBREW_PREFIX/"etc/pushpin/pushpin.conf", conffile + + inreplace conffile do |s| + s.gsub! "rundir=#{HOMEBREW_PREFIX}/var/run/pushpin", "rundir=#{testpath}/var/run/pushpin" + s.gsub! "logdir=#{HOMEBREW_PREFIX}/var/log/pushpin", "logdir=#{testpath}/var/log/pushpin" + end + + routesfile.write <<~EOS + * localhost:10080 + EOS + + runfile.write <<~PYTHON + import threading + import time + from http.server import BaseHTTPRequestHandler, HTTPServer + from urllib.request import urlopen + class TestHandler(BaseHTTPRequestHandler): + def do_GET(self): + self.send_response(200) + self.end_headers() + self.wfile.write(b'test response\\n') + def server_worker(c): + global port + server = HTTPServer(('', 10080), TestHandler) + port = server.server_address[1] + c.acquire() + c.notify() + c.release() + try: + server.serve_forever() + except: + server.server_close() + c = threading.Condition() + c.acquire() + server_thread = threading.Thread(target=server_worker, args=(c,)) + server_thread.daemon = True + server_thread.start() + c.wait() + c.release() + tries = 0 + while True: + try: + with urlopen('http://localhost:7999/test') as f: + body = f.read() + assert(body == b'test response\\n') + break + except Exception: + # pushpin may not be listening yet. try again soon + tries += 1 + if tries >= 10: + raise Exception(f'test client giving up after {tries} tries') + time.sleep(1) + PYTHON + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["LANG"] = "en_US.UTF-8" + + pid = spawn bin/"pushpin", "--config=#{conffile}" + sleep 5 + + begin + system Formula["python@3.14"].opt_bin/"python3.14", runfile + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/p/putty.rb b/Formula/p/putty.rb new file mode 100644 index 0000000000000..172606d45c865 --- /dev/null +++ b/Formula/p/putty.rb @@ -0,0 +1,63 @@ +class Putty < Formula + desc "Implementation of Telnet and SSH" + homepage "https://putty.software/" + url "https://the.earth.li/~sgtatham/putty/0.83/putty-0.83.tar.gz" + sha256 "718777c13d63d0dff91fe03162bc2a05b4dfc8b0827634cd60b51cefdff631c6" + license "MIT" + head "https://git.tartarus.org/simon/putty.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4435fad45783e698f8e87ac2a9c4a99aa0341cbe7b5a3f4f200cb8e8daa6852f" + sha256 cellar: :any, arm64_sequoia: "d1f1bb98a018698957ee04e663858ef5c0ccbcb2467d611043b0e71c3f2d62f0" + sha256 cellar: :any, arm64_sonoma: "188ad54b237bb00dfcea34a591d99fb6b6cbeb2595300b2e010c029c282194d6" + sha256 cellar: :any, arm64_ventura: "3e07713c84bc44c06f74d946194006f3f3b3e231ab2a16bd7d55bdd6663eb80b" + sha256 cellar: :any, sonoma: "4578c6f0f69004373c7e7f99d7a5c11a46884bc361aa3817f02ea89a1a78c4bf" + sha256 cellar: :any, ventura: "41a0e25f2b1fedad2710a1aceb2f399eb3c0b6ab52f4efb8509d3153c70aad34" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8ecc1dafeb153935ef7ea554f65257fa91109f67b1a569e92d750f07c4d6445" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7401a1dd4eeb3dd9d0ff69ac9c60f88a3174cc143bbc321803b604d00249e8e2" + end + + depends_on "cmake" => :build + depends_on "halibut" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + uses_from_macos "perl" => :build + + on_linux do + depends_on "libx11" + end + + conflicts_with "pssh", because: "both install `pscp` binaries" + + def install + args = ["-DPUTTY_GTK_VERSION=3"] + args << "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? # to reduce overlinking + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + require "expect" + require "pty" + + PTY.spawn(bin/"puttygen", "-t", "rsa", "-b", "4096", "-q", "-o", "test.key") do |r, w, _pid| + r.expect "Enter passphrase to save key: " + w.write "Homebrew\n" + r.expect "Re-enter passphrase to verify: " + w.write "Homebrew\n" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + + assert_path_exists testpath/"test.key" + end +end diff --git a/Formula/p/puzzles.rb b/Formula/p/puzzles.rb new file mode 100644 index 0000000000000..ae50635522bbe --- /dev/null +++ b/Formula/p/puzzles.rb @@ -0,0 +1,66 @@ +class Puzzles < Formula + desc "Collection of one-player puzzle games" + homepage "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/" + # Extract https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz to get the version number + url "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-20251021.790f585.tar.gz" + version "20251021" + sha256 "e0466016cc0fd28aa34b43996e4c931c2b3b74a9b63e050aa6c256b2c400bd0e" + license "MIT" + head "https://git.tartarus.org/simon/puzzles.git", branch: "main" + + # There's no directory listing page and the homepage only lists an unversioned + # tarball. The Git repository doesn't report any tags when we use that. The + # version in the footer of the first-party documentation seems to be the only + # available source that's up to date (as of writing). + livecheck do + url "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/doc/" + regex(/version v?(\d{6,8})(?:\.[a-z0-9]+)?/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9a14afd110449bd40e0e2a528405f4f7e254f2e2e32f2ca44eca743b1c01c18" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b45821caa7a9d19b66db48756ccad981800e5ff74f5a0432525eeb4c937dae3d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9785985ba28d9c26e0ca522e3c61cc0937ed177891fcbe0f683ee9a77681078e" + sha256 cellar: :any_skip_relocation, sonoma: "447cabf0403a6031857148de5fe7e45c30eabc61bc1ff58c1e50b337d415deeb" + sha256 arm64_linux: "592360f21ab723e3c84c67f58e8c5d527015e4495f953bdb0112afe5e16c937c" + sha256 x86_64_linux: "698d365a00234a6266fe3d1d719335a79412c8178b58a0c6e6e8fdc5c8fa01ba" + end + + depends_on "cmake" => :build + depends_on "halibut" => :build + + on_linux do + depends_on "imagemagick" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + end + + conflicts_with "samba", because: "both install `net` binaries" + + def install + # Disable universal binaries + inreplace "cmake/platforms/osx.cmake", "set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)", "" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bin.write_exec_script prefix/"Puzzles.app/Contents/MacOS/Puzzles" if OS.mac? + end + + test do + if OS.mac? + assert_predicate prefix/"Puzzles.app/Contents/MacOS/Puzzles", :executable? + else + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match "Mines, from Simon Tatham's Portable Puzzle Collection", shell_output(bin/"mines") + end + end +end diff --git a/Formula/p/pv.rb b/Formula/p/pv.rb new file mode 100644 index 0000000000000..18c3379d78490 --- /dev/null +++ b/Formula/p/pv.rb @@ -0,0 +1,42 @@ +class Pv < Formula + desc "Monitor data's progress through a pipe" + homepage "https://www.ivarch.com/programs/pv.shtml" + url "https://www.ivarch.com/programs/sources/pv-1.9.44.tar.gz" + sha256 "e130c9e18b1e6e9e2ef95bec6117c72cb9be27a1b8ffe97fca787e4c8e014562" + license "Artistic-2.0" + + livecheck do + url :homepage + regex(/href=.*?pv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "dc90c15c90bc946e83e2ac2c16d581369d838b646848a440704e79ad4c28895b" + sha256 arm64_sequoia: "5e44f96263daf881300a0f7ddc7fd24489f474d5fc78cd7fdb6e86c264647878" + sha256 arm64_sonoma: "4e0d1c438092f0cb48377da1d63ba770b53bde593c8e56a3ebb512076ca2e2da" + sha256 sonoma: "8a2ea04d6890bdd86abc07690abb2705930cd5c437a02d440ac876e08d52c936" + sha256 arm64_linux: "e4d5588cc85f2e62e4614e7794368fc737a843faef483ee781ad96a734a3f7d0" + sha256 x86_64_linux: "f3542aaa9f1c7109bd8bfed76d89e4fe80e5a278b19b5302013029d0e6c2fba1" + end + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + progress = pipe_output("#{bin}/pv -ns 4 2>&1 >/dev/null", "beer") + assert_equal "100", progress.strip + + assert_match version.to_s, shell_output("#{bin}/pv --version") + end +end diff --git a/Formula/p/pwgen.rb b/Formula/p/pwgen.rb new file mode 100644 index 0000000000000..e59c8e51266ed --- /dev/null +++ b/Formula/p/pwgen.rb @@ -0,0 +1,36 @@ +class Pwgen < Formula + desc "Password generator" + homepage "https://pwgen.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pwgen/pwgen/2.08/pwgen-2.08.tar.gz" + sha256 "dab03dd30ad5a58e578c5581241a6e87e184a18eb2c3b2e0fffa8a9cf105c97b" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7b3297c6e36caa295415af3c677a5ef056f824ae8280d7eb5023a693848a0dd5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78e78f3269e5a571f309e859d1765104c3a85a227bc12292efe437ca838696bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8d6d5e6fb87ca3906b04af23e27464f3ae52100e9f0c98ed3cbbc9701e47a1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae06c8a28b9126b1eb4ce8e02d88b761d76ed35499de2c71881b51b247e9d612" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0c66f05513440592d1642a258992d076ff1b3c86f3646c88861aa0f4e443f6b0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cc4d1e845384c5170c9fd6e9c5b054e152b8690763a55b3c9a1a0e51fbee31c4" + sha256 cellar: :any_skip_relocation, sonoma: "8abc21c960ad147e32253c1820d5119c1b7675314ee9bb89d1b4e91a6009740c" + sha256 cellar: :any_skip_relocation, ventura: "8c83635eedb3e60f976b8b36c618cd29b8e08fabd8cda8cfecad02d04b74169c" + sha256 cellar: :any_skip_relocation, monterey: "d83b242a43d7403f540e56a85399132205a38f5972e8eb2b8744e709b1da2bf4" + sha256 cellar: :any_skip_relocation, big_sur: "0a47de6eec09b1a2e938da0bebca8386261bb63040f9ca77fadfc3d28db7efc8" + sha256 cellar: :any_skip_relocation, catalina: "725911d1fd71b259acb7b907c09ef86a03545afe95e161856130992fc0789ffc" + sha256 cellar: :any_skip_relocation, arm64_linux: "6115d9586e530f771801c25cde3ba6c33b287db18d84b73911d68721b5cd7eb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d869f0f3b08bf09648754a037fedc9a729b1b5e718bc366e2cf9a7cca2861813" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"pwgen", "--secure", "20", "10" + end +end diff --git a/Formula/p/pwnat.rb b/Formula/p/pwnat.rb new file mode 100644 index 0000000000000..bd4769f3f3dd0 --- /dev/null +++ b/Formula/p/pwnat.rb @@ -0,0 +1,37 @@ +class Pwnat < Formula + desc "Proxy server that works behind a NAT" + homepage "https://samy.pl/pwnat/" + url "https://github.com/samyk/pwnat/archive/refs/tags/v0.3.0.tar.gz" + sha256 "c784ac0ef2249ae5b314a95ff5049f16c253c1f9b3720f3f88c50fc811140b44" + license "GPL-3.0-or-later" + head "https://github.com/samyk/pwnat.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3fe94650a5636132e1ea4325a88f58602079e8f0e82ac12286ef3b41912b72fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cad8dc7797afa7c06b216dd8c22990593fcdf4c020ac76a23ec4c7de3c7413d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a483fb305ae5edf4765c7fc1e881aafaf4d6ecab13267057c6434b7eda572760" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5ddbd4df3ba08892d85b2a3dd4a09df2530b1e6c65eab0ece114d756245ef8e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a54673faf81eda9764a05196c50daa8c5b078d171bbf94b9b3213c478b265a4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b529e5fb4cbb41a4ecbccaaeb3f5801b52036c61d1d7d747e8001c327ae9bba7" + sha256 cellar: :any_skip_relocation, sonoma: "e350ed81847b94a8bb052b8c48f135ae8f984abf90586cbf37d9bd0f6c6d5798" + sha256 cellar: :any_skip_relocation, ventura: "1551d449a55de940254f0050a256c2a9297cec0fd7f483acb89de825b3bfd15c" + sha256 cellar: :any_skip_relocation, monterey: "d68b2a2bd9f47b349bd50fca156330eac3abd07ab7704da5ea4c9fb5be120605" + sha256 cellar: :any_skip_relocation, big_sur: "5b2649eef333edd35081d7aa05b128cc7957fedc7037383ef986cbffe4d4f1be" + sha256 cellar: :any_skip_relocation, catalina: "ba13960f81cbb1e739807717b54f7232b8ae5658b112c6a943d9560f9d68114f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b4609ea9b0e88cbb8d62bcb69fbc1f98a5fda3aa7c688f96efc0efad2be9b6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d00f8d395764951d6f77834e4fab75bed808679e85f7fe9cd939657481da51c" + end + + def install + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" + bin.install "pwnat" + man1.install "manpage.txt" => "pwnat.1" + end + + test do + assert_match "pwnat <-s | -c> ", shell_output("#{bin}/pwnat -h", 1) + end +end diff --git a/Formula/p/pwncat.rb b/Formula/p/pwncat.rb new file mode 100644 index 0000000000000..7a5041d0e77fc --- /dev/null +++ b/Formula/p/pwncat.rb @@ -0,0 +1,25 @@ +class Pwncat < Formula + include Language::Python::Virtualenv + + desc "Netcat with FW/IDS/IPS evasion, self-inject-, bind- and reverse shell" + homepage "https://pwncat.org" + url "https://files.pythonhosted.org/packages/c9/ce/51f7b53a8ee3b4afe4350577ee92f416f32b9b166f0d84b480fec1717a42/pwncat-0.1.2.tar.gz" + sha256 "c7f879df3a58bae153b730848a88b0e324c8b7f8c6daa146e67cf45a6c736088" + license "MIT" + head "https://github.com/cytopia/pwncat.git", branch: "master" + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, all: "b1d84dd6fab9c761c073e4c598688836ab8f5a07b15cf87f8eb3cd9f1afba9a1" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + system "echo HEAD | #{bin}/pwncat www.google.com 80 | grep ^HTTP" + end +end diff --git a/Formula/p/pwned.rb b/Formula/p/pwned.rb new file mode 100644 index 0000000000000..730756f7ae058 --- /dev/null +++ b/Formula/p/pwned.rb @@ -0,0 +1,26 @@ +class Pwned < Formula + desc "CLI for the 'Have I been pwned?' service" + homepage "https://github.com/wKovacs64/pwned" + url "https://registry.npmjs.org/pwned/-/pwned-13.0.0.tgz" + sha256 "7fc19a4a01c0d25356b7f700583fdfce1963f3942312cfd33e32b225ab7f2e91" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "85fef6c273b01f0dbbccd45e0b76008832fddbdfe6fdfd402e672eb751bb208c" + end + + depends_on "node" + + conflicts_with "bash-snippets", because: "both install `pwned` binaries" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/pwned --version") + + assert_match "Oh no — pwned", shell_output("#{bin}/pwned pw homebrew 2>&1") + end +end diff --git a/Formula/p/pwntools.rb b/Formula/p/pwntools.rb new file mode 100644 index 0000000000000..9e291fd868f77 --- /dev/null +++ b/Formula/p/pwntools.rb @@ -0,0 +1,197 @@ +class Pwntools < Formula + include Language::Python::Virtualenv + + desc "CTF framework used by Gallopsled in every CTF" + homepage "https://github.com/Gallopsled/pwntools" + url "https://files.pythonhosted.org/packages/f2/5c/9ae3d94c98b0b038ffd7f09ebdac506d346fe1b964999f71c96c8a904efd/pwntools-4.15.0.tar.gz" + sha256 "d99a917298c1ca7241b51bba9ad2212f2af441ef66488059b2426508e9a2a776" + license "MIT" + head "https://github.com/Gallopsled/pwntools.git", branch: "dev" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "4c355eda7c35221bc892f10b1ee92f1b7f91ce1ed8170f22fc8c05216ffc5710" + sha256 cellar: :any, arm64_sequoia: "b55c6551ef56de78b535e116434f699d1690918bd6085a42221cbd135968c561" + sha256 cellar: :any, arm64_sonoma: "b11119452f91e64a62dce1eb574b64466629381d13c36914cd0c8a659095f28c" + sha256 cellar: :any, sonoma: "541ed20ad304e85dde99114cff63f2c0ac2b313e2b09a254f5f3496a8022161a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7991431d3e5e52fc0e38a04d55a08bbc80b2bed541b320522e4d3fe44d74baf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f55b7d5850811f509a03834f25d042123337192d06cc1611299c88098662acc" + end + + depends_on "rust" => :build # for bcrypt + depends_on "capstone" + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libsodium" # for pynacl + depends_on "python@3.14" + depends_on "unicorn" => :no_linkage # for unicorn resource + + uses_from_macos "libffi" + + conflicts_with "moreutils", because: "both install an `errno` executable" + conflicts_with "cspice", because: "both install `version` binaries" + conflicts_with "jena", because: "both install `update` binaries" + conflicts_with "scala", because: "both install `common` binaries" + + pypi_packages exclude_packages: %w[capstone certifi cryptography] + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "colored-traceback" do + url "https://files.pythonhosted.org/packages/07/80/afcf567031ab8565f8f8d2bd14b007d313ea3258e50394e85b10a405099c/colored-traceback-0.4.2.tar.gz" + sha256 "ecbc8e41f0712ea81931d7cd436b8beb9f3eff1595d2498f183e0ef69b56fe84" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "intervaltree" do + url "https://files.pythonhosted.org/packages/50/fb/396d568039d21344639db96d940d40eb62befe704ef849b27949ded5c3bb/intervaltree-3.1.0.tar.gz" + sha256 "902b1b88936918f9b2a19e0e5eb7ccb430ae45cde4f39ea4b36932920d33952d" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "plumbum" do + url "https://files.pythonhosted.org/packages/f0/5d/49ba324ad4ae5b1a4caefafbce7a1648540129344481f2ed4ef6bb68d451/plumbum-1.9.0.tar.gz" + sha256 "e640062b72642c3873bd5bdc3effed75ba4d3c70ef6b6a7b907357a84d909219" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/b9/ab/33968940b2deb3d92f5b146bc6d4009a5f95d1d06c148ea2f9ee965071af/pyelftools-0.32.tar.gz" + sha256 "6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "ropgadget" do + url "https://files.pythonhosted.org/packages/b5/ad/7c6c9078c143d5cb7965f2d06a3aadc5f9e638276dd86e57ce8c9a30457c/ropgadget-7.6.tar.gz" + sha256 "8883c54e4627073a2ce7cd8adbaf7ef72478442c0a5da1308c3c2e37641174c3" + end + + resource "rpyc" do + url "https://files.pythonhosted.org/packages/8b/e7/1c17410673b634f4658bb5d2232d0c4507432a97508b2c6708e59481644a/rpyc-6.0.2.tar.gz" + sha256 "8e780a6a71b842128a80a337c64adfb6f919014e069951832161c9efc630c93b" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "unicorn" do + url "https://files.pythonhosted.org/packages/90/12/a10f01a3e1dafcd21e2eb0c0d99bb51d5bda1d3fee20047cb2a4b2de6285/unicorn-2.1.2.tar.gz" + sha256 "e4a9d671bdea71806f29a396734cfb83317f82943b52d0001d3bca1dcbaee893" + end + + resource "unix-ar" do + url "https://files.pythonhosted.org/packages/3e/37/65cb206bd7110887248fe041e00e61124abdcd23de8f19418898a51363fc/unix_ar-0.2.1.tar.gz" + sha256 "bf9328ec70fa3a82f94dc26dc125264dbf62a2d8ffb1a3c8c8a8230175e72c4e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz" + sha256 "7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b" + end + + def install + ENV["LIBUNICORN_PATH"] = Formula["unicorn"].opt_lib + ENV["SODIUM_INSTALL"] = "system" + venv = virtualenv_install_with_resources + + # Use shared library from `unicorn` formula. The is mainly required if + # `unicorn` is unlinked as fallback load can find lib from linked path + pyunicorn_lib = venv.site_packages/"unicorn/lib" + pyunicorn_lib.mkpath + Formula["unicorn"].opt_lib.glob(shared_library("libunicorn", "*")).each do |libunicorn| + ln_s libunicorn.relative_path_from(pyunicorn_lib), pyunicorn_lib + end + + bash_completion.install "extra/bash_completion.d/pwn" + zsh_completion.install "extra/zsh_completion/_pwn" + end + + test do + assert_equal "686f6d6562726577696e7374616c6c636f6d706c657465", + shell_output("#{bin}/hex homebrewinstallcomplete").strip + + # Test that unicorn shared library can be loaded + system libexec/"bin/python", "-c", "import unicorn.unicorn" + end +end diff --git a/Formula/p/pwsafe.rb b/Formula/p/pwsafe.rb new file mode 100644 index 0000000000000..fa9402f5453cb --- /dev/null +++ b/Formula/p/pwsafe.rb @@ -0,0 +1,75 @@ +class Pwsafe < Formula + desc "Generate passwords and manage encrypted password databases" + homepage "https://github.com/nsd20463/pwsafe" + url "https://src.fedoraproject.org/repo/pkgs/pwsafe/pwsafe-0.2.0.tar.gz/4bb36538a2772ecbf1a542bc7d4746c0/pwsafe-0.2.0.tar.gz" + sha256 "61e91dc5114fe014a49afabd574eda5ff49b36c81a6d492c03fcb10ba6af47b7" + license "GPL-2.0-or-later" + revision 4 + + livecheck do + url "https://src.fedoraproject.org/repo/pkgs/pwsafe/" + regex(/href=.*?pwsafe[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "294f8a817d0eee693be29e24ea04c118f50a51d5f5d6c8531e994abf731f9041" + sha256 cellar: :any, arm64_sequoia: "fcd7dd6ac6b4755c4f6e165e8fad94838cb260a07b47a890f1f1e54ab6d04e3d" + sha256 cellar: :any, arm64_sonoma: "30fb31e5db711f3481af149a41ddc4dfe3957c0d94c4ee68ca7285aee57f6b19" + sha256 cellar: :any, arm64_ventura: "f2f69ecce57634d5a3911badcea213810fb8a25b7b2a242e7f342980760703d3" + sha256 cellar: :any, arm64_monterey: "109f4ad6b786e20de525ce0006c5e6ea0c049c8977c2d82833f41a9dd534721a" + sha256 cellar: :any, arm64_big_sur: "92fe9319e5412529ea46bbf4813b8cb009636efe05c2b1448ec7a332e4c15df5" + sha256 cellar: :any, sonoma: "eb846550598837551cc50cf973ef55b655d385c25d47b4e7da87664963eff544" + sha256 cellar: :any, ventura: "f955d487b5a38817af4455dae4f9324e854bc550b1384a6940f7d2b49917eb2a" + sha256 cellar: :any, monterey: "1c773e828b7a92a8d8da681549a8cc20a9fb2dded715cc82331eb74037a98e26" + sha256 cellar: :any, big_sur: "e7c3595ff796b678efd8aedd74dcc59e057b3a4b96908c820fae3b643d9d8e45" + sha256 cellar: :any, catalina: "ceda65b7835ed7e72491565952827cc23c8a56f70dd2f875b269eaa8bcaf4f9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "400819e0247e3fd2cafc708b7e53f89760fd7f10ff016ab1bc370002de59899e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8dcacc8d3f09ec672a4130e55695240788145e0159f6a606c67912d8411c2c0d" + end + + head do + url "https://github.com/nsd20463/pwsafe.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "openssl@3" + depends_on "readline" + + # A password database for testing is provided upstream. How nice! + resource "test-pwsafe-db" do + url "https://raw.githubusercontent.com/nsd20463/pwsafe/208de3a94339df36b6e9cd8aeb7e0be0a67fd3d7/test.dat" + sha256 "7ecff955871e6e58e55e0794d21dfdea44a962ff5925c2cd0683875667fbcc79" + end + + def install + args = ["--mandir=#{man}", "--without-x"] + if build.head? + system "autoreconf", "--force", "--install", "--verbose" + elsif OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + test_db_passphrase = "abc" + test_account_name = "testing" + test_account_pass = "sg1rIWHL?WTOV=d#q~DmxiQq%_j-$f__U7EU" + + resource("test-pwsafe-db").stage do + Utils.popen( + "#{bin}/pwsafe -f test.dat -p #{test_account_name}", "r+" + ) do |pipe| + pipe.puts test_db_passphrase + assert_match(/^#{Regexp.escape(test_account_pass)}$/, pipe.read) + end + end + end +end diff --git a/Formula/p/px.rb b/Formula/p/px.rb new file mode 100644 index 0000000000000..abe0aac4adccb --- /dev/null +++ b/Formula/p/px.rb @@ -0,0 +1,33 @@ +class Px < Formula + include Language::Python::Virtualenv + + desc "Ps and top for human beings (px / ptop)" + homepage "https://github.com/walles/px" + url "https://files.pythonhosted.org/packages/17/7f/42d82f262d4d2ae8bba8d02b3e4a9116f95df60b8b799713201848154445/pxpx-3.9.0.tar.gz" + sha256 "1c9854f6d337a330c8ab75db3728d8c9e80d88cbba6169e3394affb8113470c1" + license "MIT" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, all: "43918037b490edfdf5a7522a5fb170a3aca0a9cad329a83590a5ecd596aa59be" + end + + depends_on "python@3.14" + + uses_from_macos "lsof" + + conflicts_with "fpc", because: "both install `ptop` binaries" + conflicts_with "pixie", because: "both install `px` binaries" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/px --version") + + split_first_line = pipe_output("#{bin}/px --no-pager").lines.first.split + assert_equal %w[PID COMMAND USERNAME CPU CPUTIME RAM COMMANDLINE], split_first_line + end +end diff --git a/Formula/p/py-spy.rb b/Formula/p/py-spy.rb new file mode 100644 index 0000000000000..6964b628df497 --- /dev/null +++ b/Formula/p/py-spy.rb @@ -0,0 +1,42 @@ +class PySpy < Formula + desc "Sampling profiler for Python programs" + homepage "https://github.com/benfred/py-spy" + url "https://github.com/benfred/py-spy/archive/refs/tags/v0.4.1.tar.gz" + sha256 "6abc303d4e2db30d472997838f83d547a990df7747e1d327249a757863ee9225" + license "MIT" + head "https://github.com/benfred/py-spy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5c57da0e3df21cd321b23697cf85e673332e3117f65884b36dd3878c6220d493" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ddf6302d7bbcf54e77d35b76010be52f915621d4c3eb3a8457d4ee0fdd4723d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ab14c15a32b71c5b79c38adf7cc9ac1e433d64f7a52f3e1f9ea0360d8d9af08" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a444ad8b9393d62f247af02a176e0f852e6a34a3add46f0e787b5e8b3da30747" + sha256 cellar: :any_skip_relocation, sonoma: "a40ac52cfac0d14364a85f73c76a908c70c0d218e4014081c6751eecae51164f" + sha256 cellar: :any_skip_relocation, ventura: "7d5ffaff6bf0881536f31ba00b04acbd770e5947a6c583d5eb246475879e8bef" + sha256 cellar: :any_skip_relocation, arm64_linux: "45f6a6fa9597398cf748e685d1edef0c898f84319213a3ebdfdc1186945a0680" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a7074dd2174a4cd2980518b33cb54e59883a7a90e4c04553dae7a5cc5dcba1b" + end + + depends_on "rust" => :build + uses_from_macos "python" => :test + + on_linux do + depends_on "libunwind" + end + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"py-spy", "completions") + end + + test do + python = "python3" + if OS.mac? + output = shell_output("#{bin}/py-spy record #{python} 2>&1", 1) + assert_match "Try running again with elevated permissions by going", output + else + output = shell_output("#{bin}/py-spy record -- #{python} -c 'import time; time.sleep(1)' 2>&1") + assert_match(/Samples: \d+ Errors: 0/, output) + end + end +end diff --git a/Formula/p/py3cairo.rb b/Formula/p/py3cairo.rb new file mode 100644 index 0000000000000..ca3a39bb48a2b --- /dev/null +++ b/Formula/p/py3cairo.rb @@ -0,0 +1,53 @@ +class Py3cairo < Formula + desc "Python 3 bindings for the Cairo graphics library" + homepage "https://cairographics.org/pycairo/" + url "https://github.com/pygobject/pycairo/releases/download/v1.28.0/pycairo-1.28.0.tar.gz" + sha256 "26ec5c6126781eb167089a123919f87baa2740da2cca9098be8b3a6b91cc5fbc" + license any_of: ["LGPL-2.1-only", "MPL-1.1"] + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "2c77e291f2095afb6e2d2904b2c64e43840de2d8d3b4819bddf52d136f1dadee" + sha256 cellar: :any, arm64_sequoia: "b77c713e6aa751c3506635993c0b64efcd61ef54eb73d25ec589293ae8ce4c4f" + sha256 cellar: :any, arm64_sonoma: "10aa68f1f543afce5df0864afa7fed6e231afe0d3d39054e3e8bce0cddb3a59d" + sha256 cellar: :any, sonoma: "f188206fc23ce8575ade7b42ff4590f42f3f7b04183cf5c8c1fbc140556ffb1a" + sha256 arm64_linux: "83cfdf6e8e3a7a06d39961044cdc71e830fc218d5ac50dfc84354cc1184a861d" + sha256 x86_64_linux: "f3ad42b50dc9862d076c5aeb4b660b52d85b8c8b62ae8ac219b20d5450ff47ce" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "cairo" + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@\d\.\d+$/) } + .map { |f| f.opt_libexec/"bin/python" } + end + + def site_packages(python) + prefix/Language::Python.site_packages(python) + end + + def install + pythons.each do |python| + python_version = Language::Python.major_minor_version(python) + builddir = "build#{python_version}" + system "meson", "setup", builddir, "-Dpython=#{python}", + "-Dpython.platlibdir=#{site_packages(python)}", + "-Dpython.purelibdir=#{site_packages(python)}", + *std_meson_args + system "meson", "compile", "-C", builddir + system "meson", "install", "-C", builddir + end + end + + test do + pythons.each do |python| + system python, "-c", "import cairo; print(cairo.version)" + end + end +end diff --git a/Formula/p/pybind11.rb b/Formula/p/pybind11.rb new file mode 100644 index 0000000000000..55d877a6dab67 --- /dev/null +++ b/Formula/p/pybind11.rb @@ -0,0 +1,120 @@ +class Pybind11 < Formula + desc "Seamless operability between C++11 and Python" + homepage "https://github.com/pybind/pybind11" + url "https://github.com/pybind/pybind11/archive/refs/tags/v3.0.1.tar.gz" + sha256 "741633da746b7c738bb71f1854f957b9da660bcd2dce68d71949037f0969d0ca" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "5cf8e28a751807c0fe409e09c042ea247dcbe2540e48ea6dc3dc6c8c25a009e4" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@3\.\d+$/) } + end + + def install + # Install /include and /share/cmake to the global location + system "cmake", "-S", ".", "-B", "build", "-DPYBIND11_TEST=OFF", "-DPYBIND11_NOPYTHON=ON", *std_cmake_args + system "cmake", "--install", "build" + + # build an `:all` bottle. + inreplace share/"pkgconfig/pybind11.pc", /^prefix=$/, "\\0#{opt_prefix}" + + pythons.each do |python| + # Install Python package too + python_exe = python.opt_libexec/"bin/python" + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + + pyversion = Language::Python.major_minor_version(python_exe) + (buildpath/"pybind11-config-#{pyversion}").write <<~BASH + #!/bin/bash + exec -a "$0" "#{python.opt_bin}/python#{pyversion}" -m pybind11 "$@" + BASH + chmod "+x", "pybind11-config-#{pyversion}" + bin.install "pybind11-config-#{pyversion}" + + site_packages_pybind11 = prefix/Language::Python.site_packages(python_exe)/"pybind11" + + # Avoid installing duplicate files from the prefix + site_packages_share = site_packages_pybind11/"share" + rm_r site_packages_share.children + site_packages_share.install_symlink share.children + + site_packages_include = site_packages_pybind11/"include" + rm_r site_packages_include + site_packages_include.install_symlink include.children + + next if python != pythons.max_by(&:version) + + # The newest one is used as the default + bin.install_symlink "pybind11-config-#{pyversion}" => "pybind11-config" + end + end + + test do + (testpath/"example.cpp").write <<~CPP + #include + + int add(int i, int j) { + return i + j; + } + namespace py = pybind11; + PYBIND11_MODULE(example, m) { + m.doc() = "pybind11 example plugin"; + m.def("add", &add, "A function which adds two numbers"); + } + CPP + + (testpath/"example.py").write <<~PYTHON + import example + example.add(1,2) + PYTHON + + pythons.each do |python| + python_exe = python.opt_libexec/"bin/python" + pyversion = Language::Python.major_minor_version(python_exe) + site_packages = Language::Python.site_packages(python_exe) + + python_flags = Utils.safe_popen_read( + python.opt_libexec/"bin/python-config", + "--cflags", + "--ldflags", + "--embed", + ).split + system ENV.cxx, "-shared", "-fPIC", "-O3", "-std=c++11", "example.cpp", "-o", "example.so", *python_flags + system python_exe, "example.py" + + test_module = shell_output( + "#{python_exe} -m pybind11 --includes", + ).chomp.gsub(python.opt_prefix.to_s, HOMEBREW_PREFIX.to_s) + assert_match (HOMEBREW_PREFIX/site_packages/"pybind11").to_s, test_module + + test_script = shell_output( + "#{bin}/pybind11-config-#{pyversion} --includes", + ).chomp.gsub(python.opt_prefix.to_s, HOMEBREW_PREFIX.to_s) + assert_equal test_module, test_script + + next if python != pythons.max_by(&:version) + + test_module = shell_output( + "#{python_exe} -m pybind11 --includes", + ).chomp.gsub(python.opt_prefix.to_s, HOMEBREW_PREFIX.to_s) + test_script = shell_output( + "#{bin}/pybind11-config --includes", + ).chomp.gsub(python.opt_prefix.to_s, HOMEBREW_PREFIX.to_s) + assert_equal test_module, test_script + end + end +end diff --git a/Formula/p/pycodestyle.rb b/Formula/p/pycodestyle.rb new file mode 100644 index 0000000000000..a640d7639b8e7 --- /dev/null +++ b/Formula/p/pycodestyle.rb @@ -0,0 +1,44 @@ +class Pycodestyle < Formula + include Language::Python::Virtualenv + + desc "Simple Python style checker in one Python file" + homepage "https://pycodestyle.pycqa.org/" + url "https://github.com/PyCQA/pycodestyle/archive/refs/tags/2.14.0.tar.gz" + sha256 "ffcf4dc55f1e5fbdc6dd6acf5db0fd07ded534ae376eee23a742e1410b48d9ae" + license "MIT" + head "https://github.com/PyCQA/pycodestyle.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cbab819ac63a266ecb40a5cf66d17f03c9acdff4c17eb44aa102a5cf20985506" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + # test invocation on a file with no issues + (testpath/"ok.py").write <<~PYTHON + print(1) + PYTHON + assert_empty shell_output("#{bin}/pycodestyle ok.py") + + # test invocation on a file with a whitespace style issue + (testpath/"ws.py").write <<~PYTHON + print( 1) + PYTHON + assert_equal "ws.py:1:7: E201 whitespace after '('\n", + shell_output("#{bin}/pycodestyle ws.py", 1) + + # test invocation on a file with an import not at top of file + (testpath/"imp.py").write <<~PYTHON + pass + import sys + PYTHON + assert_equal "imp.py:2:1: E402 module level import not at top of file\n", + shell_output("#{bin}/pycodestyle imp.py", 1) + end +end diff --git a/Formula/p/pycparser.rb b/Formula/p/pycparser.rb new file mode 100644 index 0000000000000..376e38466e571 --- /dev/null +++ b/Formula/p/pycparser.rb @@ -0,0 +1,35 @@ +class Pycparser < Formula + desc "C parser in Python" + homepage "https://github.com/eliben/pycparser" + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "9e1c78dae771f3b5f7e085ec7600b1317c259e5b493d81cb66334a919b1a81c6" + end + + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python| + system python, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + pkgshare.install "examples" + end + + test do + examples = pkgshare/"examples" + pythons.each do |python| + system python, examples/"c-to-c.py", examples/"c_files/basic.c" + end + end +end diff --git a/Formula/p/pydantic-core.rb b/Formula/p/pydantic-core.rb new file mode 100644 index 0000000000000..b31f4fe80a775 --- /dev/null +++ b/Formula/p/pydantic-core.rb @@ -0,0 +1,50 @@ +class PydanticCore < Formula + include Language::Python::Virtualenv + + desc "Core functionality for Pydantic validation and serialization" + homepage "https://github.com/pydantic/pydantic-core" + url "https://files.pythonhosted.org/packages/df/18/d0944e8eaaa3efd0a91b0f1fc537d3be55ad35091b6a87638211ba691964/pydantic_core-2.41.4.tar.gz" + sha256 "70e47929a9d4a1905a67e4b687d5946026390568a8e952b92824118063cee4d5" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "03e07dbfdc8d8af1e28b997b12246eac3ca36c31e3e30ee511537a7100f90353" + sha256 cellar: :any, arm64_sequoia: "1428d96bb50eb9df27fb8802b67f0f0c2e8a1f58593adf918140b398f7d95a6e" + sha256 cellar: :any, arm64_sonoma: "629ea1f77bd3b2337ed11be11477497e99e7685cf5d02cbf5f264daccfce6243" + sha256 cellar: :any, sonoma: "7f83e5e52e2f6d831b7eae4a322807486502a26633a9c74217caad25195b41df" + sha256 cellar: :any_skip_relocation, arm64_linux: "5785e0d43e69891af22932b9a7eeef76a49d1b9b184110de680cbd9e009e6034" + sha256 cellar: :any_skip_relocation, x86_64_linux: "846245f7d616a112af9c85c8978851b158543681a0242e1f3818e4ca246dda9a" + end + + depends_on "maturin" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "rust" => :build + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + pythons.each do |python3| + resource("typing-extensions").stage do + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + + system python3, "-m", "pip", "install", *std_pip_args, "." + end + end + + test do + pythons.each do |python3| + system python3, "-c", "import pydantic_core;" + end + end +end diff --git a/Formula/p/pyenv-ccache.rb b/Formula/p/pyenv-ccache.rb new file mode 100644 index 0000000000000..4ebcd17101eec --- /dev/null +++ b/Formula/p/pyenv-ccache.rb @@ -0,0 +1,28 @@ +class PyenvCcache < Formula + desc "Make Python build faster, using the leverage of `ccache`" + homepage "https://github.com/pyenv/pyenv-ccache" + url "https://github.com/pyenv/pyenv-ccache/archive/refs/tags/v0.0.2.tar.gz" + sha256 "ebfb8a5ed754df485b3f391078c5dc913f0587791a5e3815e61078f0db180b9e" + license "MIT" + head "https://github.com/pyenv/pyenv-ccache.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9e3904fdb63362c45c9e2ccd1421a83a444125518b176c5b86c8a547eebd2b56" + end + + depends_on "ccache" + depends_on "pyenv" + + def install + ENV["PREFIX"] = prefix + system "./install.sh" + end + + test do + output = shell_output("eval \"$(pyenv init -)\" && pyenv hooks install && ls") + assert_match "ccache.bash", output + end +end diff --git a/Formula/p/pyenv-pip-migrate.rb b/Formula/p/pyenv-pip-migrate.rb new file mode 100644 index 0000000000000..12ca7dfee4fb4 --- /dev/null +++ b/Formula/p/pyenv-pip-migrate.rb @@ -0,0 +1,25 @@ +class PyenvPipMigrate < Formula + desc "Migrate pip packages from one Python version to another" + homepage "https://github.com/pyenv/pyenv-pip-migrate" + url "https://github.com/pyenv/pyenv-pip-migrate/archive/refs/tags/v20181205.tar.gz" + sha256 "c064c76b854fa905c40e71b5223699bacf18ca492547aad93cdde2b98ca4e58c" + license "MIT" + head "https://github.com/pyenv/pyenv-pip-migrate.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "22d0416340223bd3821c6f57f00515c5dff2d92772f0613dcd81ee13730fab6f" + end + + depends_on "pyenv" + + def install + prefix.install Dir["*"] + end + + test do + shell_output("eval \"$(pyenv init -)\" && pyenv help migrate") + end +end diff --git a/Formula/p/pyenv-virtualenv.rb b/Formula/p/pyenv-virtualenv.rb new file mode 100644 index 0000000000000..3b846eadc022c --- /dev/null +++ b/Formula/p/pyenv-virtualenv.rb @@ -0,0 +1,46 @@ +class PyenvVirtualenv < Formula + desc "Pyenv plugin to manage virtualenv" + homepage "https://github.com/pyenv/pyenv-virtualenv" + url "https://github.com/pyenv/pyenv-virtualenv/archive/refs/tags/v1.2.4.tar.gz" + sha256 "6f49a395a17221f87e1e16f0f92c99c3d21d4fc27072d5c80e65ca11b686eedd" + license "MIT" + version_scheme 1 + head "https://github.com/pyenv/pyenv-virtualenv.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4471ee71c65c00eb696e6caeda86d7cd9fa128c17657ab040592cf5a89502b75" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dbb7fd295ec2ea03460bcb5b367be4ec2772fc2d2ecf64765309fd39e10e18a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5520ee72fd178ae11886721c276fcfe4008434519d8d56b25ff9eee7d40f5a9f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5520ee72fd178ae11886721c276fcfe4008434519d8d56b25ff9eee7d40f5a9f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5520ee72fd178ae11886721c276fcfe4008434519d8d56b25ff9eee7d40f5a9f" + sha256 cellar: :any_skip_relocation, sonoma: "5974b4594ca7e79058e457bbe88147751611efc836ab587cf9ba65732a3ecde5" + sha256 cellar: :any_skip_relocation, ventura: "5974b4594ca7e79058e457bbe88147751611efc836ab587cf9ba65732a3ecde5" + sha256 cellar: :any_skip_relocation, monterey: "5974b4594ca7e79058e457bbe88147751611efc836ab587cf9ba65732a3ecde5" + sha256 cellar: :any_skip_relocation, arm64_linux: "56ce37582f357b6e5bdd841b9d9a780e2a1b3ed473f20eef778105cfec203176" + sha256 cellar: :any_skip_relocation, x86_64_linux: "248fd1598c1d3a342b6b0c23491b4b7b8700faf3c985635409f5f3fdd09932fd" + end + + depends_on "pyenv" + + on_macos do + # `readlink` on macOS Big Sur and earlier doesn't support the `-f` option + depends_on "coreutils" + end + + def install + ENV["PREFIX"] = prefix + system "./install.sh" + + # macOS Big Sur and earlier do not support `readlink -f` + inreplace bin/"pyenv-virtualenv-prefix", "readlink", "#{Formula["coreutils"].opt_bin}/greadlink" if OS.mac? + end + + test do + shell_output("eval \"$(pyenv init -)\" && pyenv virtualenvs") + end +end diff --git a/Formula/p/pyenv-virtualenvwrapper.rb b/Formula/p/pyenv-virtualenvwrapper.rb new file mode 100644 index 0000000000000..b68ebc1e1d5fe --- /dev/null +++ b/Formula/p/pyenv-virtualenvwrapper.rb @@ -0,0 +1,26 @@ +class PyenvVirtualenvwrapper < Formula + desc "Alternative to pyenv for managing virtualenvs" + homepage "https://github.com/pyenv/pyenv-virtualenvwrapper" + url "https://github.com/pyenv/pyenv-virtualenvwrapper/archive/refs/tags/v20140609.tar.gz" + sha256 "c1c812c4954394c58628952654ba745c4fb814d045adc076f7fb9e310bed03bf" + license "MIT" + head "https://github.com/pyenv/pyenv-virtualenvwrapper.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0aeb3455529d63f4cd1ca55acb525e4f38e1fc7b8dca986302f475bc8596a650" + end + + depends_on "pyenv" + + def install + ENV["PREFIX"] = prefix + system "./install.sh" + end + + test do + shell_output("eval \"$(pyenv init -)\" && pyenv virtualenvwrapper") + end +end diff --git a/Formula/p/pyenv.rb b/Formula/p/pyenv.rb new file mode 100644 index 0000000000000..757f4add75b05 --- /dev/null +++ b/Formula/p/pyenv.rb @@ -0,0 +1,79 @@ +class Pyenv < Formula + desc "Python version management" + homepage "https://github.com/pyenv/pyenv" + url "https://github.com/pyenv/pyenv/archive/refs/tags/v2.6.12.tar.gz" + sha256 "75fe91b18e617bf0261e40901d3ebc3e3c1b94b0b62da2fd7dddd1778f45dcb7" + license "MIT" + version_scheme 1 + head "https://github.com/pyenv/pyenv.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(-\d+)?)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b3805e941f5429f443e9d47cc2d1e5cc73ae69112e244021ada98a3986ebbaa9" + sha256 cellar: :any, arm64_sequoia: "a549634e8cae374641830023ef1d8e5935449bc2ae0ad84a7f369d644c28d449" + sha256 cellar: :any, arm64_sonoma: "06bfdb44f62390788e4539dd4cb8083298465572838dc2818d6daa918addd672" + sha256 cellar: :any, sonoma: "d4b591d91859b7c265f5a976c7828c4aa2ed5b0fc5120fd230b09bf61be89071" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c4cfdafe02636cb7901da97d68e87369dccb06e5933c6f44f8c335acf65c3dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96e58b8b35d1e1d238a8f0d7968268598e99373a0899f6bef8f1f1af706de882" + end + + depends_on "autoconf" + depends_on "openssl@3" + depends_on "pkgconf" + depends_on "readline" + + uses_from_macos "python" => :test + uses_from_macos "bzip2" + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "xz" + uses_from_macos "zlib" + + def install + inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX + inreplace "libexec/pyenv-rehash", "$(command -v pyenv)", opt_bin/"pyenv" + inreplace "pyenv.d/rehash/source.bash", "$(command -v pyenv)", opt_bin/"pyenv" + + system "src/configure" + system "make", "-C", "src" + + prefix.install Dir["*"] + %w[pyenv-install pyenv-uninstall python-build].each do |cmd| + bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}" + end + + share.install prefix/"man" + + # Do not manually install shell completions. See: + # - https://github.com/pyenv/pyenv/issues/1056#issuecomment-356818337 + # - https://github.com/Homebrew/homebrew-core/pull/22727 + end + + test do + # Create a fake python version and executable. + pyenv_root = Pathname(shell_output("#{bin}/pyenv root").strip) + python_bin = pyenv_root/"versions/1.2.3/bin" + foo_script = python_bin/"foo" + foo_script.write "echo hello" + chmod "+x", foo_script + + # Test versions. + versions = shell_output("eval \"$(#{bin}/pyenv init --path)\" " \ + "&& eval \"$(#{bin}/pyenv init -)\" " \ + "&& #{bin}/pyenv versions").split("\n") + assert_equal 2, versions.length + assert_match(/\* system/, versions[0]) + assert_equal(" 1.2.3", versions[1]) + + # Test rehash. + system bin/"pyenv", "rehash" + refute_match "Cellar", (pyenv_root/"shims/foo").read + assert_equal "hello", shell_output("eval \"$(#{bin}/pyenv init --path)\" " \ + "&& eval \"$(#{bin}/pyenv init -)\" " \ + "&& PYENV_VERSION='1.2.3' foo").chomp + end +end diff --git a/Formula/p/pyflow.rb b/Formula/p/pyflow.rb new file mode 100644 index 0000000000000..abfaf2b53e0fd --- /dev/null +++ b/Formula/p/pyflow.rb @@ -0,0 +1,43 @@ +class Pyflow < Formula + desc "Installation and dependency system for Python" + homepage "https://github.com/David-OConnor/pyflow" + url "https://github.com/David-OConnor/pyflow/archive/refs/tags/0.3.1.tar.gz" + sha256 "36be46aaebf7bc77d2f250b3646024fb1f2f04d92113d3ce46ea5846f7e4c4f4" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aa703dd2439edffa6913792989f73fa44a98dde75dcb397a58865326ae29a105" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93dec35941a4d5096bdb4b9816702d4488f84dcd17fde1bfcd5ac9f8ca710810" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0cf7c32c65325f80d0862ff60c2ffcd8b035eff01e67d6cd963262c5c35c6e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "01dd9e7751c3b6f7fbbc362d81d9710ddf015624feacfb8e218a4897e5aaae5a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9f564d5e5cd3db39ed6f74016b81c68bc85ac9984e37e1ed104b411c24027359" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "31e49056e5aca63db575e0666caea6b7d9a49e2d1a96e5875b4f635996ef7dbf" + sha256 cellar: :any_skip_relocation, sonoma: "85badaa331253d59b3d1dcd382a0b8eca400156bd20a6ca2a0723cb9d1fbd5ca" + sha256 cellar: :any_skip_relocation, ventura: "27eff1a7ce06ac450eb3e7ea37bef599738f92fadb17107602dd89166fa1bd58" + sha256 cellar: :any_skip_relocation, monterey: "669b62cb0547ffc164ad936a930cb0108052b7d1f92f7e6c7f5a25a04cb2167f" + sha256 cellar: :any_skip_relocation, big_sur: "06c81ecf12284c17a47d8701ff9bff608809038943ae473e36af80d166faf956" + sha256 cellar: :any_skip_relocation, catalina: "33cca1590360162f960d97c4544b0ee0bb3449e55b43d0f2f7f652fd5f0b7be5" + sha256 cellar: :any_skip_relocation, arm64_linux: "170b84149913a41134a4c6463c661306fc3920c105a420e2bcc55c734b65d575" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f63dcd026d508c2db194de790d0f3c9e5d7f6ca40ef6e4c294f00d2a42778201" + end + + # https://github.com/David-OConnor/pyflow/issues/193 + deprecate! date: "2024-10-06", because: :unmaintained + disable! date: "2025-10-06", because: :unmaintained + + depends_on "rust" => :build + uses_from_macos "python" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + python3 = "python3" + pyver = Language::Python.major_minor_version python3 + pipe_output("#{bin}/pyflow init", "#{pyver}\n1") + assert_path_exists testpath/"pyproject.toml" + assert_path_exists testpath/"pyflow.lock" + end +end diff --git a/Formula/p/pygit2.rb b/Formula/p/pygit2.rb new file mode 100644 index 0000000000000..628fa9b4c7b93 --- /dev/null +++ b/Formula/p/pygit2.rb @@ -0,0 +1,65 @@ +class Pygit2 < Formula + desc "Bindings to the libgit2 shared library" + homepage "https://github.com/libgit2/pygit2" + url "https://files.pythonhosted.org/packages/6c/4b/da6f1a1a48a4095e3c12c5fa1f2784f4423db3e16159e08740cc5c6ee639/pygit2-1.19.0.tar.gz" + sha256 "ca5db6f395a74166a019d777895f96bcb211ee60ce0be4132b139603e0066d83" + license "GPL-2.0-only" => { with: "GCC-exception-2.0" } + head "https://github.com/libgit2/pygit2.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c423238a2a9248d8e87bd250c401b2f88f50f476fcefc69f660eb868303b71de" + sha256 cellar: :any, arm64_sequoia: "a5ff092a5dd0c38f6786ecc4b444640678c7d9e1a4734a7c3cddf3a69cf9ea85" + sha256 cellar: :any, arm64_sonoma: "bdb60a77d388a037941975a278119509510163c692094b7c72d57f5cc959a5ad" + sha256 cellar: :any, sonoma: "f08387023d4714e1308680923feafda014e4b539e164a9dc278f461170f44520" + sha256 cellar: :any_skip_relocation, arm64_linux: "97833a1c9ad4c54da82fcc7af8265979575a675a00f70e8163ae8b5e492e0cef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "119c10991289e7b902f9540d8624b2d04d5d79b97c130386848016461effc2fb" + end + + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "cffi" + depends_on "libgit2" + + pypi_packages exclude_packages: %w[cffi pycparser] + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python3| + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + end + + test do + assert_empty resources, "This formula should not have any resources!" + + pythons.each do |python3| + pyversion = Language::Python.major_minor_version(python3).to_s + + (testpath/pyversion/"hello.txt").write "Hello, pygit2." + mkdir pyversion do + system python3, "-c", <<~PYTHON + import pygit2 + repo = pygit2.init_repository('#{testpath/pyversion}', False) # git init + + index = repo.index + index.add('hello.txt') + index.write() # git add + + ref = 'HEAD' + author = pygit2.Signature('BrewTestBot', 'testbot@brew.sh') + message = 'Initial commit' + tree = index.write_tree() + repo.create_commit(ref, author, author, message, tree, []) # git commit + PYTHON + + system "git", "status" + assert_match "hello.txt", shell_output("git ls-tree --name-only HEAD") + end + end + end +end diff --git a/Formula/p/pygitup.rb b/Formula/p/pygitup.rb new file mode 100644 index 0000000000000..955a6a07b80c5 --- /dev/null +++ b/Formula/p/pygitup.rb @@ -0,0 +1,53 @@ +class Pygitup < Formula + include Language::Python::Virtualenv + + desc "Nicer 'git pull'" + homepage "https://github.com/msiemens/PyGitUp" + url "https://files.pythonhosted.org/packages/43/d3/8fa476380d3b330a9284efd9b8f309cb239a90d7a86b0446f189d05692c0/git_up-2.3.0.tar.gz" + sha256 "4a771b9cae8bc6c95e2916bfb120a6ffc76c80fc3f5c91af61f91c21e5980f2e" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "a43349fa4547826549999712ffa9c656930a51e4e9606528968c1e21ae6507b3" + end + + depends_on "python@3.14" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + system "git", "clone", "https://github.com/Homebrew/install.git" + cd "install" do + assert_match "Fetching origin", shell_output("#{bin}/git-up") + end + end +end diff --git a/Formula/p/pygments.rb b/Formula/p/pygments.rb new file mode 100644 index 0000000000000..a6d4f9fae971a --- /dev/null +++ b/Formula/p/pygments.rb @@ -0,0 +1,32 @@ +class Pygments < Formula + include Language::Python::Virtualenv + + desc "Generic syntax highlighter" + homepage "https://pygments.org/" + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + license "BSD-2-Clause" + head "https://github.com/pygments/pygments.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "13629b2d67522d01f51474bf73054400510add4af1f9e5664d8b075aedb9a8a2" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + bash_completion.install "external/pygments.bashcomp" => "pygmentize" + end + + test do + (testpath/"test.py").write <<~PYTHON + import os + print(os.getcwd()) + PYTHON + + system bin/"pygmentize", "-f", "html", "-o", "test.html", testpath/"test.py" + assert_path_exists testpath/"test.html" + end +end diff --git a/Formula/p/pygobject3.rb b/Formula/p/pygobject3.rb new file mode 100644 index 0000000000000..7a3e9bba47a18 --- /dev/null +++ b/Formula/p/pygobject3.rb @@ -0,0 +1,66 @@ +class Pygobject3 < Formula + desc "GNOME Python bindings (based on GObject Introspection)" + homepage "https://pygobject.gnome.org" + url "https://download.gnome.org/sources/pygobject/3.54/pygobject-3.54.5.tar.gz" + sha256 "b6656f6348f5245606cf15ea48c384c7f05156c75ead206c1b246c80a22fb585" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7cc2327a27298ec1c57d4d751b7fca8f22f23ddd7940bc9bfde112f461433621" + sha256 cellar: :any, arm64_sequoia: "b67057e4a6d222d2d7de913305a620d4f35f3e3dfc6249a794b918d80b778af1" + sha256 cellar: :any, arm64_sonoma: "a0834eec43887a3b8c7924215b909ff2f4ed5495a5049123cb96a3f876d12095" + sha256 cellar: :any, sonoma: "30ebc00d2c80ba7fa169019c363f2cb16fccdb26709faab469f5dcbb7ba7a6ae" + sha256 arm64_linux: "81b896d550dc7e52d18678558152cbd20ff692f27eebd480dca8293325287623" + sha256 x86_64_linux: "915f6aafd4d607348675e47d00c8eab241232d184e28998073dd69661c17cbeb" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + + depends_on "cairo" + depends_on "glib" + depends_on "gobject-introspection" + depends_on "py3cairo" + + uses_from_macos "libffi" + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@\d\.\d+$/) } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python| + xy = Language::Python.major_minor_version(python) + builddir = "buildpy#{xy}".delete(".") + site_packages = prefix/Language::Python.site_packages(python) + + system "meson", "setup", builddir, "-Dpycairo=enabled", + "-Dpython=#{python}", + "-Dpython.platlibdir=#{site_packages}", + "-Dpython.purelibdir=#{site_packages}", + "-Dtests=false", + *std_meson_args + system "meson", "compile", "-C", builddir, "--verbose" + system "meson", "install", "-C", builddir + end + end + + test do + Pathname("test.py").write <<~PYTHON + import gi + gi.require_version("GLib", "2.0") + assert("__init__" in gi.__file__) + from gi.repository import GLib + assert(31 == GLib.Date.get_days_in_month(GLib.DateMonth.JANUARY, 2000)) + PYTHON + + pythons.each do |python| + system python, "test.py" + end + end +end diff --git a/Formula/p/pyinstaller.rb b/Formula/p/pyinstaller.rb new file mode 100644 index 0000000000000..fc6564b44340a --- /dev/null +++ b/Formula/p/pyinstaller.rb @@ -0,0 +1,71 @@ +class Pyinstaller < Formula + include Language::Python::Virtualenv + + desc "Bundle a Python application and all its dependencies" + homepage "https://pyinstaller.org/" + url "https://files.pythonhosted.org/packages/94/94/1f62e95e4a28b64cfbb5b922ef3046f968b47170d37a1e1a029f56ac9cb4/pyinstaller-6.16.0.tar.gz" + sha256 "53559fe1e041a234f2b4dcc3288ea8bdd57f7cad8a6644e422c27bb407f3edef" + license "GPL-2.0-or-later" + head "https://github.com/pyinstaller/pyinstaller.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fc10b01609a928c23f3b44059c7084c8ae2206e49514c4219d6a9500698cb0db" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "473e6c10eb021090c32fd031dce1473e9a0847523c2eb5c6a2cb7ff08a3000c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8b1b597fcb354e4ffce092b91457adaff8a6775c52852b87dbf6639e7a4247c" + sha256 cellar: :any_skip_relocation, sonoma: "68894b05bf5b8ca0934d8300d3ed75f0fc93e5de0be425caf048d117faa16f49" + sha256 cellar: :any_skip_relocation, arm64_linux: "1010bf24a461d198a984f668a6d4a5a663c5f5538130ec22edb336f6c87e21df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87db990b0f53f2b143d829272b420dc6c462c20d6451b495ecd443358a9567bf" + end + + depends_on "python@3.14" + + uses_from_macos "zlib" + + pypi_packages exclude_packages: "macholib" + + resource "altgraph" do + url "https://files.pythonhosted.org/packages/de/a8/7145824cf0b9e3c28046520480f207df47e927df83aa9555fb47f8505922/altgraph-0.17.4.tar.gz" + sha256 "1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406" + end + + resource "macholib" do + url "https://files.pythonhosted.org/packages/95/ee/af1a3842bdd5902ce133bd246eb7ffd4375c38642aeb5dc0ae3a0329dfa2/macholib-1.16.3.tar.gz" + sha256 "07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyinstaller-hooks-contrib" do + url "https://files.pythonhosted.org/packages/7d/83/be0f57c0b77b66c33c2283ebd4ea341022b5a743e97c5fb3bebab82b38b9/pyinstaller_hooks_contrib-2025.9.tar.gz" + sha256 "56e972bdaad4e9af767ed47d132362d162112260cbe488c9da7fee01f228a5a6" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def install + cd "bootloader" do + system "python3.14", "./waf", "all", "--no-universal2", "STRIP=/usr/bin/strip" + end + virtualenv_install_with_resources + end + + test do + (testpath/"easy_install.py").write <<~PYTHON + """Run the EasyInstall command""" + + if __name__ == '__main__': + from setuptools.command.easy_install import main + main() + PYTHON + system bin/"pyinstaller", "-F", "--distpath=#{testpath}/dist", "--workpath=#{testpath}/build", + "#{testpath}/easy_install.py" + assert_path_exists testpath/"dist/easy_install" + end +end diff --git a/Formula/p/pyinvoke.rb b/Formula/p/pyinvoke.rb new file mode 100644 index 0000000000000..cf3ee2485d2b1 --- /dev/null +++ b/Formula/p/pyinvoke.rb @@ -0,0 +1,43 @@ +class Pyinvoke < Formula + include Language::Python::Virtualenv + + desc "Pythonic task management & command execution" + homepage "https://www.pyinvoke.org/" + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + license "BSD-2-Clause" + head "https://github.com/pyinvoke/invoke.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e0fd28c483546b397e1c2f3c95091200b89d1eb0ddd4970178c8e944f91095ab" + end + + depends_on "python@3.14" # Do not remove runtime dependency https://github.com/Homebrew/homebrew-core/issues/151248 + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"tasks.py").write <<~PYTHON + from invoke import run, task + + @task + def clean(ctx, extra=''): + patterns = ['foo'] + if extra: + patterns.append(extra) + for pattern in patterns: + run("rm -rf {}".format(pattern)) + PYTHON + (testpath/"foo"/"bar").mkpath + (testpath/"baz").mkpath + system bin/"invoke", "clean" + refute_path_exists testpath/"foo", "\"pyinvoke clean\" should have deleted \"foo\"" + assert_path_exists testpath/"baz", "pyinvoke should have left \"baz\"" + system bin/"invoke", "clean", "--extra=baz" + refute_path_exists testpath/"foo", "\"pyinvoke clean-extra\" should have still deleted \"foo\"" + refute_path_exists testpath/"baz", "pyinvoke clean-extra should have deleted \"baz\"" + end +end diff --git a/Formula/p/pylint.rb b/Formula/p/pylint.rb new file mode 100644 index 0000000000000..e8ed5a0e56dce --- /dev/null +++ b/Formula/p/pylint.rb @@ -0,0 +1,57 @@ +class Pylint < Formula + include Language::Python::Virtualenv + + desc "It's not just a linter that annoys you!" + homepage "https://github.com/pylint-dev/pylint" + url "https://files.pythonhosted.org/packages/b6/f8/2feda2bc72654811f2596e856c33c2a98225fba717df2b55c8d6a1f5cdad/pylint-4.0.2.tar.gz" + sha256 "9c22dfa52781d3b79ce86ab2463940f874921a3e5707bcfc98dd0c019945014e" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0bc3d1648496ab480ee45a45acb0fb8e84b5fa4c148f284670a698b2d25291f2" + end + + depends_on "python@3.14" + + resource "astroid" do + url "https://files.pythonhosted.org/packages/a7/d1/6eee8726a863f28ff50d26c5eacb1a590f96ccbb273ce0a8c047ffb10f5a/astroid-4.0.1.tar.gz" + sha256 "0d778ec0def05b935e198412e62f9bcca8b3b5c39fdbe50b0ba074005e477aab" + end + + resource "dill" do + url "https://files.pythonhosted.org/packages/12/80/630b4b88364e9a8c8c5797f4602d0f76ef820909ee32f0bacb9f90654042/dill-0.4.0.tar.gz" + sha256 "0633f1d2df477324f53a895b02c901fb961bdbf65a17122586ea7019292cbcf0" + end + + resource "isort" do + url "https://files.pythonhosted.org/packages/63/53/4f3c058e3bace40282876f9b553343376ee687f3c35a525dc79dbd450f88/isort-7.0.0.tar.gz" + sha256 "5513527951aadb3ac4292a41a16cbc50dd1642432f5e8c20057d414bdafb4187" + end + + resource "mccabe" do + url "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz" + sha256 "348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"pylint_test.py").write <<~PYTHON + print('Test file' + ) + PYTHON + system bin/"pylint", "--exit-zero", "pylint_test.py" + end +end diff --git a/Formula/p/pylyzer.rb b/Formula/p/pylyzer.rb new file mode 100644 index 0000000000000..c96ef7ce13f32 --- /dev/null +++ b/Formula/p/pylyzer.rb @@ -0,0 +1,43 @@ +class Pylyzer < Formula + desc "Fast static code analyzer & language server for Python" + homepage "https://github.com/mtshiba/pylyzer" + url "https://github.com/mtshiba/pylyzer/archive/refs/tags/v0.0.82.tar.gz" + sha256 "c2b30b29764321ba2f2be50cbeded24add03bc17a663a92825b1bce8a60ba24c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2679c879365d5385c2833d37469b4e68b23f033a88e1ee7fc894b65199eeed1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "384c45ef35a14321ec11e8de0940b8f7ce1dcf78f99221aacc61c12e70d8cb39" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1899d17ec224e0d9381499ed1c45b76cefb49e6a9fb2c36ac09095a1587c29b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8978544d1715bb35ac3ba1008f8c35f24657809848762d1ba6763ec0e666c37f" + sha256 cellar: :any_skip_relocation, sonoma: "26b44bdeb0c056279e0d33784763085902559b0e886e956d6df31681105b594a" + sha256 cellar: :any_skip_relocation, ventura: "62e11efa74eb3ddf6889c89c5a8103091f676f3b0c879d8f9c76337cf2ea40dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "eaddb80359ab329ac866d56826ae40004d3b2c62d027a5637e275fde7bddc534" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da07ee959c8519069c6846ded47178f8564265755851c1e65d794e03756182fe" + end + + depends_on "rust" => :build + + def install + ENV["HOME"] = buildpath # The build will write to HOME/.erg + system "cargo", "install", *std_cargo_args(root: libexec) + erg_path = libexec/"erg" + erg_path.install Dir[buildpath/".erg/*"] + (bin/"pylyzer").write_env_script(libexec/"bin/pylyzer", ERG_PATH: erg_path) + end + + test do + (testpath/"test.py").write <<~PYTHON + print("test") + PYTHON + + expected = <<~EOS + \e[94mStart checking\e[m: test.py + \e[92mAll checks OK\e[m: test.py + EOS + + assert_equal expected, shell_output("#{bin}/pylyzer #{testpath}/test.py") + + assert_match "pylyzer #{version}", shell_output("#{bin}/pylyzer --version") + end +end diff --git a/Formula/p/pymol.rb b/Formula/p/pymol.rb new file mode 100644 index 0000000000000..4d2926456bd02 --- /dev/null +++ b/Formula/p/pymol.rb @@ -0,0 +1,106 @@ +class Pymol < Formula + include Language::Python::Virtualenv + + desc "Molecular visualization system" + homepage "https://pymol.org/" + url "https://github.com/schrodinger/pymol-open-source/archive/refs/tags/v3.1.0.tar.gz" + sha256 "54306d65060bd58ed8b3dab1a8af521aeb4fd417871f15f463ff05ccb4e121fe" + license :cannot_represent + revision 1 + head "https://github.com/schrodinger/pymol-open-source.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "05c7ebc310a6c2ec2e91da1a897470ef61750b97c18d31879c80e9562bb4c7a0" + sha256 cellar: :any, arm64_sequoia: "262b8a1c6702c62c9e21d3593e0575e5496165b9d93d67841d9d2faa6ac94f67" + sha256 cellar: :any, arm64_sonoma: "77dfd4698b6e5b90f3e4a9117301c020e6b3b67b16e5c76e1886a0f17a1c5612" + sha256 cellar: :any, sonoma: "4958fb877f750f6d443c407c265a73839dfdc98a600845ca6f90af766d26925d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7896d871f2cac3ef8b508fa4e71d5e82706b3ea110f2fd614951f1124a786fcc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c162a6c917186bb44563bcf497476a0a5c7e4be2c2847a9337ac282d4831c396" + end + + depends_on "cmake" => :build + depends_on "glm" => :build + depends_on "msgpack-cxx" => :build + depends_on "sip" => :build + + depends_on "freetype" + depends_on "glew" + depends_on "libpng" + depends_on "netcdf" + depends_on "numpy" + depends_on "pyqt" + depends_on "python@3.14" + + uses_from_macos "libxml2" + + on_linux do + depends_on "patchelf" => :build + depends_on "freeglut" + depends_on "mesa" + end + + resource "mmtf-cpp" do + url "https://github.com/rcsb/mmtf-cpp/archive/refs/tags/v1.1.0.tar.gz" + sha256 "021173bdc1814b1d0541c4426277d39df2b629af53151999b137e015418f76c0" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "mmtf-python" do + url "https://files.pythonhosted.org/packages/d8/0f/f3c132dc9aac9a3f32a0eba7a80f07d14e7624e96f9245eeac5fe48f42cd/mmtf-python-1.1.3.tar.gz" + sha256 "12a02fe1b7131f0a2b8ce45b46f1e0cdd28b9818fe4499554c26884987ea0c32" + end + + resource "pmw" do + url "https://github.com/schrodinger/pmw-patched/archive/8bedfc8747e7757c1048bc5e11899d1163717a43.tar.gz" + sha256 "3a59e6d33857733d0a8ff0c968140b8728f8e27aaa51306160ae6ab13cea26d3" + end + + # Allow numpy 2+, remove on next release + patch do + url "https://github.com/schrodinger/pymol-open-source/commit/1b3aca8c053336fc5c7f72e79b4801f8fdd1af39.patch?full_index=1" + sha256 "639261ff5b4d9c930ead3179cbbf64bf1e8fa575678561a0287c11f5a6cfa4d6" + end + + def python3 + which("python3.14") + end + + def install + resource("mmtf-cpp").stage do + system "cmake", "-S", ".", "-B", "build", *std_cmake_args(install_prefix: buildpath/"mmtf") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + inreplace "setup.py" do |s| + s.gsub!(/ no_glut = True$/, " no_glut = False") + s.gsub!(/ use_msgpackc = "guess"$/, ' use_msgpackc = "c++11"') + end + + ENV["PREFIX_PATH"] = "#{buildpath}/mmtf:#{ENV["CMAKE_PREFIX_PATH"]}" + venv = virtualenv_install_with_resources without: "mmtf-cpp" + (prefix/Language::Python.site_packages(python3)/"homebrew-pymol.pth").write venv.site_packages + end + + def caveats + "To generate movies, run `brew install ffmpeg`." + end + + test do + (testpath/"test.py").write <<~PYTHON + from pymol import cmd + cmd.fragment('ala') + cmd.zoom() + cmd.png("test.png", 200, 200) + PYTHON + + system bin/"pymol", "-cq", testpath/"test.py" + assert_path_exists testpath/"test.png", "Amino acid image should exist" + system python3, "-c", "import pymol" + end +end diff --git a/Formula/p/pympress.rb b/Formula/p/pympress.rb new file mode 100644 index 0000000000000..877bcad6c9dfd --- /dev/null +++ b/Formula/p/pympress.rb @@ -0,0 +1,56 @@ +class Pympress < Formula + include Language::Python::Virtualenv + + desc "Simple and powerful dual-screen PDF reader designed for presentations" + homepage "https://github.com/Cimbali/pympress/" + url "https://files.pythonhosted.org/packages/87/66/fb9f8f2975740ea8880de293eb16b543965387881c71ca323a00a5d77d8a/pympress-1.8.6.tar.gz" + sha256 "243dc5dd225acd13fb6bae680e2de1816d521203b98a9cff588b66f141fffd9a" + license "GPL-2.0-or-later" + head "https://github.com/Cimbali/pympress.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1a9ef0a8dddce6dc59d94b8306551292a7d729bac7cd65ee155525c1172f4522" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d45f3cf0538dbea0b86d894b29cad51a898474aa279aab3fbf5fd56a19951cf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "502282c5a2e40f39bd9b13325cc4b51b7650416985ada770d3fe05fdc756f06b" + sha256 cellar: :any_skip_relocation, sonoma: "91a85242406ec115336bf6968550b383d7ccc175ce040690b90f1502b55a34d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2688fa0cd6b49f869cc7d6eab21815441c7d1c44e55e20fbef26f22fb75dd19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2688fa0cd6b49f869cc7d6eab21815441c7d1c44e55e20fbef26f22fb75dd19" + end + + depends_on "gobject-introspection" + depends_on "gstreamer" + depends_on "gtk+3" + depends_on "libyaml" + depends_on "poppler" + depends_on "pygobject3" + depends_on "python@3.14" + + resource "watchdog" do + url "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz" + sha256 "9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282" + end + + def install + virtualenv_install_with_resources + end + + test do + # (pympress:48790): Gtk-WARNING **: 13:03:37.080: cannot open display + ENV["PYMPRESS_HEADLESS_TEST"] = "1" if ENV["HOMEBREW_GITHUB_ACTIONS"] + + (testpath/"Library/Preferences").mkpath + + system bin/"pympress", "--quit" + + # Check everything ran fine at least until reporting the version string in the log file + # which means all dependencies got loaded OK. Do not check actual version numbers as it breaks --HEAD tests. + log = if OS.linux? + Pathname.new(ENV["XDG_CACHE_HOME"] || (testpath/".cache"))/"pympress.log" + else + testpath/"Library/Logs/pympress.log" + end + assert_path_exists log + assert_match "INFO:pympress.app:Pympress:", log.read + end +end diff --git a/Formula/p/pymupdf.rb b/Formula/p/pymupdf.rb new file mode 100644 index 0000000000000..20b9990d10633 --- /dev/null +++ b/Formula/p/pymupdf.rb @@ -0,0 +1,62 @@ +class Pymupdf < Formula + desc "Python bindings for the PDF toolkit and renderer MuPDF" + homepage "https://pymupdf.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/8d/9a/e0a4e92a85fc17be7c54afdbb113f0ade2a8bca49856d510e28bd249e462/pymupdf-1.26.5.tar.gz" + sha256 "8ef335e07f648492df240f2247854d0e7c0467afb9c4dc2376ec30978ec158c3" + license "AGPL-3.0-only" + revision 2 + + bottle do + sha256 cellar: :any, arm64_tahoe: "db033482073562d13e2b4bbbf6476779d2e150d17f2b9d9084e9b7110e6d1939" + sha256 cellar: :any, arm64_sequoia: "14aa7a312c2171f0d9ceff363aec5899e2842254d0843ab4195c2a916c7ba192" + sha256 cellar: :any, arm64_sonoma: "21d10fe188a2031adca38586a0776b1dbab6417f9ee243b214e36e3670e97cc8" + sha256 cellar: :any, sonoma: "d872257471aa20ed916e07355adb84123b91e5bd1c05d9d9f5b59aed5528d257" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2d899c88a0428e1b29f1e620fa08de7204261bc6c3d3261dc4e0f6f35d7d01d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9b681ae5897e145b2a231d0a783847e103a7d09a85bc17b843323d9c7731146" + end + + depends_on "freetype" => :build + depends_on "python-setuptools" => :build + depends_on "swig" => :build + depends_on "mupdf" + depends_on "python@3.14" + + def python3 + "python3.14" + end + + def install + # Makes setup skip build stage for mupdf + # https://github.com/pymupdf/PyMuPDF/blob/1.20.0/setup.py#L447 + ENV["PYMUPDF_SETUP_MUPDF_BUILD"] = "" + ENV["PYMUPDF_INCLUDES"] = "#{Formula["mupdf"].opt_include}:#{Formula["freetype"].opt_include}/freetype2" + ENV["PYMUPDF_MUPDF_LIB"] = Formula["mupdf"].opt_lib.to_s + + system python3, "-m", "pip", "install", *std_pip_args, "." + end + + test do + (testpath/"test.py").write <<~PYTHON + import sys + from pathlib import Path + + import fitz + + in_pdf = sys.argv[1] + out_png = sys.argv[2] + + # Convert first page to PNG + pdf_doc = fitz.open(in_pdf) + pdf_page = pdf_doc.load_page(0) + png_bytes = pdf_page.get_pixmap().tobytes() + + Path(out_png).write_bytes(png_bytes) + PYTHON + + in_pdf = test_fixtures("test.pdf") + out_png = testpath/"test.png" + + system python3, testpath/"test.py", in_pdf, out_png + assert_path_exists out_png + end +end diff --git a/Formula/p/pyoxidizer.rb b/Formula/p/pyoxidizer.rb new file mode 100644 index 0000000000000..61c78d75b5068 --- /dev/null +++ b/Formula/p/pyoxidizer.rb @@ -0,0 +1,57 @@ +class Pyoxidizer < Formula + desc "Modern Python application packaging and distribution tool" + homepage "https://github.com/indygreg/PyOxidizer" + url "https://github.com/indygreg/PyOxidizer/archive/refs/tags/pyoxidizer/0.24.0.tar.gz" + sha256 "d52a2727a18a3414d7ec920b8523ef4d19cb2e6db3f1276b65a83e5dd4ae8d24" + license "MPL-2.0" + head "https://github.com/indygreg/PyOxidizer.git", branch: "main" + + livecheck do + url :stable + regex(%r{^pyoxidizer/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c7abbaf7e9a5308e6235da7568798a3520450eb78626615f08a40f5739de5a3f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fffc8fb7d0f4c1c4743521228edcb637b4ec0969c488f669ca0f49abba884f3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6124e2f8cd40cd7462fa28f70b719edce33751cda845bc1a56284b94290275a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa37a4ac504621090ea1f67abee2694e8c6798f5f8b35dba0f67411d70c9e133" + sha256 cellar: :any_skip_relocation, arm64_monterey: "32a2e334bd1345638385aa4d56b635b8faecb5095607ed4f177660965979478d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6286b57cb42b275d4f6325e17842cd49bc6bedb9804616349a95250e96eb8294" + sha256 cellar: :any_skip_relocation, sonoma: "5ef7aac85b9e30d86343ca1e51b84991ad4db83aff58bf885aef6b43218005ac" + sha256 cellar: :any_skip_relocation, ventura: "46aa367ab70a1488edd31411f85942a7179c090feecd1cdfa46735668d80b457" + sha256 cellar: :any_skip_relocation, monterey: "ea59d68a7bcdf1237d3eb72348901ea846546598194a44758e4db2521cc38880" + sha256 cellar: :any_skip_relocation, big_sur: "5b9f21cdbd215dbaf5c0a41e70674244b4e192e6a64e6a4e1a3e03c933e4670a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3ddb85f14631d16c2ab17e117fb82e8a418bacce1c5dd54a6fe848dff4e13f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0648492b46bc163e396b0e6e2ca99350a937476050c158dd5d8a32b9b0fc102d" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "pyoxidizer") + end + + test do + assert_match version.to_s, shell_output("#{bin}/pyoxidizer --version") + + # FIXME: restore brew `rust` usage if support is added for newer Rust + # system bin/"pyoxidizer", "init-rust-project", "--system-rust", "hello_world" + system bin/"pyoxidizer", "init-rust-project", "hello_world" + assert_path_exists testpath/"hello_world/Cargo.toml" + + # Intel macOS runners are slow enough that extra time from fetching Rust causes timeout + return if OS.mac? && Hardware::CPU.intel? + + cd "hello_world" do + if Hardware::CPU.arm? && OS.mac? && MacOS.version < :ventura + # Use Python 3.8 to work around: + # https://github.com/Homebrew/homebrew-core/pull/136910#issuecomment-1704568838 + inreplace "pyoxidizer.bzl", + "dist = default_python_distribution()", + "dist = default_python_distribution(python_version='3.8')" + end + system bin/"pyoxidizer", "build" # FIXME: , "--system-rust" + end + end +end diff --git a/Formula/p/pyp.rb b/Formula/p/pyp.rb new file mode 100644 index 0000000000000..f91d66e473551 --- /dev/null +++ b/Formula/p/pyp.rb @@ -0,0 +1,25 @@ +class Pyp < Formula + include Language::Python::Virtualenv + + desc "Easily run Python at the shell! Magical, but never mysterious" + homepage "https://github.com/hauntsaninja/pyp" + url "https://files.pythonhosted.org/packages/0c/65/c275ff380e4412438577eab23810dd7a1ba2cf54a6ba558a3d22cf0fb68b/pypyp-1.3.0.tar.gz" + sha256 "97c78f8fd6d4550bf67bb5001a4c5c1fa58184d9bd8256abac3e240fa38aa05c" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7cd48c76de3d2b2e5503adab30d97ac87dff691499d9fc10f65dea95b916bf68" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/pyp --version") + assert_equal "6", pipe_output("#{bin}/pyp 'sum(map(int, stdin))'", "1\n2\n3\n", 0).strip + end +end diff --git a/Formula/p/pypy.rb b/Formula/p/pypy.rb new file mode 100644 index 0000000000000..ffe590393d102 --- /dev/null +++ b/Formula/p/pypy.rb @@ -0,0 +1,220 @@ +class Pypy < Formula + desc "Highly performant implementation of Python 2 in Python" + homepage "https://pypy.org/" + url "https://downloads.python.org/pypy/pypy2.7-v7.3.20-src.tar.bz2" + sha256 "bf958498445f7bf78338723c8d86bd6711e8792461725d2481df77a9566a3e62" + license "MIT" + head "https://github.com/pypy/pypy.git", branch: "main" + + livecheck do + url "https://downloads.python.org/pypy/" + regex(/href=.*?pypy2(?:\.\d+)*[._-]v?(\d+(?:\.\d+)+)-src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fe02ce959245ac0b015c388b1c86a542ae9d873a26c8c577cef72e55141747ed" + sha256 cellar: :any, arm64_sequoia: "46e4b322006b665c0e5d7f5d99dc14ed77456a815c52d3f61fc4bb31cb9ed4ee" + sha256 cellar: :any, arm64_sonoma: "2eec3f57f8559d7f294bb0bba5f4ccc15481688e7bb08ae9ef55b4424eca489f" + sha256 cellar: :any, arm64_ventura: "3c743dd76590b1f95e0c13bc1448731cbeae3d5dcb3c6aa9c6ef98eb683873e9" + sha256 cellar: :any, sonoma: "bb2157324648efdf4ac18d98f2222bda06a5cec3864997d5bc83df36784d003f" + sha256 cellar: :any, ventura: "d734256266802ccafb1555fab97e36f15d48d68de1316efe217a1df638fb567a" + sha256 cellar: :any_skip_relocation, arm64_linux: "db99059aacdb6edfd8bb74e19ed4c495d3acdb5f561572156cf01a9b32164e5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4c768850fbb4013133edcf053c1d11d3250255f52c2dba0ef2f491e181b06dd" + end + + depends_on "pkgconf" => :build + depends_on "gdbm" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "tcl-tk@8" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + resource "bootstrap" do + on_macos do + on_arm do + url "https://downloads.python.org/pypy/pypy2.7-v7.3.11-macos_arm64.tar.bz2" + sha256 "cc5696ab4f93cd3481c1e4990b5dedd7ba60ac0602fa1890d368889a6c5bf771" + end + on_intel do + url "https://downloads.python.org/pypy/pypy2.7-v7.3.11-macos_x86_64.tar.bz2" + sha256 "56deee9c22640f5686c35b9d64fdb1ce3abd044583e4078f0b171ca2fd2a198e" + end + end + on_linux do + on_arm do + url "https://downloads.python.org/pypy/pypy2.7-v7.3.11-aarch64.tar.bz2" + sha256 "ea924da1defe9325ef760e288b04f984614e405580f5321eb6a5c8f539bd415a" + end + on_intel do + url "https://downloads.python.org/pypy/pypy2.7-v7.3.11-linux64.tar.bz2" + sha256 "ba8ed958a905c0735a4cfff2875c25089954dc020e087d982b0ffa5b9da316cd" + end + end + end + + # > Setuptools as a project continues to support Python 2 with bugfixes and important features on Setuptools 44.x. + # See https://setuptools.readthedocs.io/en/latest/python%202%20sunset.html#python-2-sunset + resource "setuptools" do + url "https://files.pythonhosted.org/packages/b2/40/4e00501c204b457f10fe410da0c97537214b2265247bc9a5bc6edd55b9e4/setuptools-44.1.1.zip" + sha256 "c67aa55db532a0dadc4d2e20ba9961cbd3ccc84d544e9029699822542b5a476b" + end + + # > pip 20.3 was the last version of pip that supported Python 2. + # See https://pip.pypa.io/en/stable/development/release-process/#python-2-support + resource "pip" do + url "https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz" + sha256 "6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc" + end + + # Build fixes: + # - Disable Linux tcl-tk detection since the build script only searches system paths. + # When tcl-tk is not found, it uses unversioned `-ltcl -ltk`, which breaks build. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/pypy/tcl-tk.diff" + sha256 "d17725c11842d83b5432312348715241b1b402173cd68166620c1b6bd8162fbd" + end + + def install + # Work-around for build issue with Xcode 15.3 + # upstream bug report, https://github.com/pypy/pypy/issues/4931 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + # Avoid statically linking to libffi + inreplace "rpython/rlib/clibffi.py", '"libffi.a"', "\"#{shared_library("libffi")}\"" + + # The `tcl-tk` library paths are hardcoded and need to be modified for non-/usr/local prefix + tcltk = Formula["tcl-tk@8"] + inreplace "lib_pypy/_tkinter/tklib_build.py" do |s| + s.gsub! "['/usr/local/opt/tcl-tk/include']", "[]" + s.gsub! "(homebrew + '/include')", "('#{tcltk.opt_include}/tcl-tk')" + s.gsub! "(homebrew + '/opt/tcl-tk/lib')", "('#{tcltk.opt_lib}')" + end + + if OS.mac? + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "lib-python/2.7/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + end + + # See https://github.com/Homebrew/homebrew/issues/24364 + ENV["PYTHONPATH"] = "" + ENV["PYPY_USESSION_DIR"] = buildpath + + resource("bootstrap").stage buildpath/"bootstrap" + python = buildpath/"bootstrap/bin/pypy" + + cd "pypy/goal" do + system python, "../../rpython/bin/rpython", "--opt", "jit", + "--cc", ENV.cc, + "--make-jobs", ENV.make_jobs, + "--shared", + "--verbose" + end + + system python, "pypy/tool/release/package.py", "--archive-name", "pypy", + "--targetdir", ".", + "--no-embedded-dependencies", + "--no-keep-debug", + "--no-make-portable" + libexec.mkpath + system "tar", "-C", libexec.to_s, "--strip-components", "1", "-xf", "pypy.tar.bz2" + + # The PyPy binary install instructions suggest installing somewhere + # (like /opt) and symlinking in binaries as needed. Specifically, + # we want to avoid putting PyPy's Python.h somewhere that configure + # scripts will find it. + bin.install_symlink libexec/"bin/pypy" + lib.install_symlink libexec/"bin"/shared_library("libpypy-c") + end + + def post_install + # Post-install, fix up the site-packages and install-scripts folders + # so that user-installed Python software survives minor updates, such + # as going from 1.7.0 to 1.7.1. + + # Create a site-packages in the prefix. + prefix_site_packages.mkpath + + # Symlink the prefix site-packages into the cellar. + unless (libexec/"site-packages").symlink? + # fix the case where libexec/site-packages/site-packages was installed + rm_r(libexec/"site-packages/site-packages") if (libexec/"site-packages/site-packages").exist? + mv Dir[libexec/"site-packages/*"], prefix_site_packages + rm_r(libexec/"site-packages") + end + libexec.install_symlink prefix_site_packages + + # Tell distutils-based installers where to put scripts + scripts_folder.mkpath + (distutils/"distutils.cfg").atomic_write <<~INI + [install] + install-scripts=#{scripts_folder} + INI + + %w[setuptools pip].each do |pkg| + resource(pkg).stage do + system bin/"pypy", "-s", "setup.py", "--no-user-cfg", "install", "--force", "--verbose" + end + end + + # Symlinks to easy_install_pypy and pip_pypy + bin.install_symlink scripts_folder/"easy_install" => "easy_install_pypy" + bin.install_symlink scripts_folder/"pip" => "pip_pypy" + + # post_install happens after linking + %w[easy_install_pypy pip_pypy].each { |e| (HOMEBREW_PREFIX/"bin").install_symlink bin/e } + end + + def caveats + <<~EOS + A "distutils.cfg" has been written to: + #{distutils} + specifying the install-scripts folder as: + #{scripts_folder} + + If you install Python packages via "pypy setup.py install", easy_install_pypy, + or pip_pypy, any provided scripts will go into the install-scripts folder + above, so you may want to add it to your PATH *after* #{HOMEBREW_PREFIX}/bin + so you don't overwrite tools from CPython. + + Setuptools and pip have been installed, so you can use easy_install_pypy and + pip_pypy. + To update setuptools and pip between pypy releases, run: + pip_pypy install --upgrade pip setuptools + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + # The HOMEBREW_PREFIX location of site-packages + def prefix_site_packages + HOMEBREW_PREFIX/"lib/pypy/site-packages" + end + + # Where setuptools will install executable scripts + def scripts_folder + HOMEBREW_PREFIX/"share/pypy" + end + + # The Cellar location of distutils + def distutils + libexec/"lib-python/2.7/distutils" + end + + test do + system bin/"pypy", "-c", "print('Hello, world!')" + system bin/"pypy", "-c", "import time; time.clock()" + system scripts_folder/"pip", "list" + end +end diff --git a/Formula/p/pypy3.10.rb b/Formula/p/pypy3.10.rb new file mode 100644 index 0000000000000..fe9939cbccd53 --- /dev/null +++ b/Formula/p/pypy3.10.rb @@ -0,0 +1,231 @@ +class Pypy310 < Formula + desc "Implementation of Python 3 in Python" + homepage "https://pypy.org/" + url "https://downloads.python.org/pypy/pypy3.10-v7.3.17-src.tar.bz2" + sha256 "6ad74bc578e9c6d3a8a1c51503313058e3c58c35df86f7485453c4be6ab24bf7" + license "MIT" + revision 1 + head "https://github.com/pypy/pypy.git", branch: "main" + + livecheck do + url "https://downloads.python.org/pypy/" + regex(/href=.*?pypy3\.10[._-]v?(\d+(?:\.\d+)+)-src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "de425a276a64d92a0e2d69d589753d119733d0e3cc18aa985ae329aaf1bfa910" + sha256 cellar: :any, arm64_sequoia: "311b947a1528ae90983edc2176864a00865fb678c13c2286efe24075463a1796" + sha256 cellar: :any, arm64_sonoma: "8276c86a74591aec5dcd72722caeaa9c5a950f922b77c5ac20fc1147e21698b5" + sha256 cellar: :any, arm64_ventura: "9e80dff6aaa3e465055533fe201daa041baf2e24af5ea96dca4951b56a171589" + sha256 cellar: :any, sonoma: "cbac71c93a07a6e926836763d9d67662b157a12525ce5c333504a4e10eff14f6" + sha256 cellar: :any, ventura: "f8216079a9bc035470ac314f3dacaab40839ea20edc53b8fea250af4128612e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c838f8f2bde36ec834a8d390cd441e75aec83b1cc21126e8e974e05024a5d09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4032a756625270ffb7945d97b0116ac7e9acb1e5731eab7590241874f2fb12d" + end + + depends_on "pkgconf" => :build + depends_on "pypy" => :build + depends_on "gdbm" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "tcl-tk@8" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + # setuptools >= 60 required sysconfig patch + # See https://github.com/Homebrew/homebrew-core/pull/99892#issuecomment-1108492321 + resource "setuptools" do + url "https://files.pythonhosted.org/packages/ef/75/2bc7bef4d668f9caa9c6ed3f3187989922765403198243040d08d2a52725/setuptools-59.8.0.tar.gz" + sha256 "09980778aa734c3037a47997f28d6db5ab18bdf2af0e49f719bfc53967fd2e82" + end + + # always pull the latest pip, https://pypi.org/project/pip/#files + resource "pip" do + url "https://files.pythonhosted.org/packages/b7/06/6b1ad0ae8f97d7a0d6f6ad640db10780578999e647a9593512ceb6f06469/pip-23.3.2.tar.gz" + sha256 "7fd9972f96db22c8077a1ee2691b172c8089b17a5652a44494a9ecb0d78f9149" + end + + # Build fixes: + # - Disable Linux tcl-tk detection since the build script only searches system paths. + # When tcl-tk is not found, it uses unversioned `-ltcl -ltk`, which breaks build. + # Upstream issue ref: https://github.com/pypy/pypy/issues/3538 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/pypy/tcl-tk.diff" + sha256 "d17725c11842d83b5432312348715241b1b402173cd68166620c1b6bd8162fbd" + end + + def abi_version + stable.url[/pypy(\d+\.\d+)/, 1] + end + + def newest_abi_version? + self == Formula["pypy3"] + end + + def install + # The `tcl-tk` library paths are hardcoded and need to be modified for non-/usr/local prefix + tcltk = Formula["tcl-tk@8"] + inreplace "lib_pypy/_tkinter/tklib_build.py" do |s| + s.gsub! "['/usr/local/opt/tcl-tk/include']", "[]" + # We moved `tcl-tk` headers to `include/tcl-tk` and versioned TCL 8 + # TODO: upstream this. + s.gsub! "(homebrew + '/include')", "('#{tcltk.opt_include}/tcl-tk')" + s.gsub! "(homebrew + '/opt/tcl-tk/lib')", "('#{tcltk.opt_lib}')" + end + + if OS.mac? + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "lib-python/3/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', " + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + end + + # Having PYTHONPATH set can cause the build to fail if another + # Python is present, e.g. a Homebrew-provided Python 2.x + # See https://github.com/Homebrew/homebrew/issues/24364 + ENV["PYTHONPATH"] = nil + ENV["PYPY_USESSION_DIR"] = buildpath + + python = Formula["pypy"].opt_bin/"pypy" + cd "pypy/goal" do + system python, buildpath/"rpython/bin/rpython", + "-Ojit", "--shared", "--cc", ENV.cc, "--verbose", + "--make-jobs", ENV.make_jobs, "targetpypystandalone.py" + + with_env(PYTHONPATH: buildpath) do + system "./pypy#{abi_version}-c", buildpath/"lib_pypy/pypy_tools/build_cffi_imports.py" + end + end + + libexec.mkpath + cd "pypy/tool/release" do + package_args = %w[--archive-name pypy3 --targetdir . --no-make-portable --no-embedded-dependencies] + system python, "package.py", *package_args + system "tar", "-C", libexec.to_s, "--strip-components", "1", "-xf", "pypy3.tar.bz2" + end + + # The PyPy binary install instructions suggest installing somewhere + # (like /opt) and symlinking in binaries as needed. Specifically, + # we want to avoid putting PyPy's Python.h somewhere that configure + # scripts will find it. + bin.install_symlink libexec/"bin/pypy#{abi_version}" + lib.install_symlink libexec/"bin"/shared_library("libpypy#{abi_version}-c") + include.install_symlink libexec/"include/pypy#{abi_version}" + + if newest_abi_version? + bin.install_symlink "pypy#{abi_version}" => "pypy3" + lib.install_symlink shared_library("libpypy#{abi_version}-c") => shared_library("libpypy3-c") + end + + return unless OS.linux? + + # Delete two files shipped which we do not want to deliver + # These files make patchelf fail + rm([libexec/"bin/libpypy#{abi_version}-c.so.debug", libexec/"bin/pypy#{abi_version}.debug"]) + end + + def post_install + # Precompile cffi extensions in lib_pypy + # list from create_cffi_import_libraries in pypy/tool/release/package.py + %w[_sqlite3 _curses syslog gdbm _tkinter].each do |module_name| + quiet_system bin/"pypy#{abi_version}", "-c", "import #{module_name}" + end + + # Post-install, fix up the site-packages and install-scripts folders + # so that user-installed Python software survives minor updates, such + # as going from 1.7.0 to 1.7.1. + + # Create a site-packages in the prefix. + site_packages(HOMEBREW_PREFIX).mkpath + touch site_packages(HOMEBREW_PREFIX)/".keepme" + rm_r(site_packages(libexec)) + + # Symlink the prefix site-packages into the cellar. + site_packages(libexec).parent.install_symlink site_packages(HOMEBREW_PREFIX) + + # Tell distutils-based installers where to put scripts + scripts_folder.mkpath + (distutils/"distutils.cfg").atomic_write <<~EOS + [install] + install-scripts=#{scripts_folder} + EOS + + %w[setuptools pip].each do |pkg| + resource(pkg).stage do + system bin/"pypy#{abi_version}", "-s", "setup.py", "--no-user-cfg", "install", "--force", "--verbose" + end + end + + # Symlinks to pip_pypy3 + bin.install_symlink scripts_folder/"pip#{abi_version}" => "pip_pypy#{abi_version}" + symlink_to_prefix = [bin/"pip_pypy#{abi_version}"] + + if newest_abi_version? + bin.install_symlink "pip_pypy#{abi_version}" => "pip_pypy3" + symlink_to_prefix << (bin/"pip_pypy3") + end + + # post_install happens after linking + (HOMEBREW_PREFIX/"bin").install_symlink symlink_to_prefix + end + + def caveats + <<~EOS + A "distutils.cfg" has been written to: + #{distutils} + specifying the install-scripts folder as: + #{scripts_folder} + + If you install Python packages via "pypy#{abi_version} setup.py install" or pip_pypy#{abi_version}, + any provided scripts will go into the install-scripts folder + above, so you may want to add it to your PATH *after* #{HOMEBREW_PREFIX}/bin + so you don't overwrite tools from CPython. + + Setuptools and pip have been installed, so you can use pip_pypy#{abi_version}. + To update pip and setuptools between pypy#{abi_version} releases, run: + pip_pypy#{abi_version} install --upgrade pip setuptools + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + # The HOMEBREW_PREFIX location of site-packages + def site_packages(root) + root/"lib/pypy#{abi_version}/site-packages" + end + + # Where setuptools will install executable scripts + def scripts_folder + HOMEBREW_PREFIX/"share/pypy#{abi_version}" + end + + # The Cellar location of distutils + def distutils + site_packages(libexec).parent/"distutils" + end + + test do + newest_pypy3_formula_name = CoreTap.instance + .formula_names + .select { |fn| fn.start_with?("pypy3") } + .max_by { |fn| Version.new(fn[/\d+\.\d+$/]) } + + assert_equal Formula["pypy3"], + Formula[newest_pypy3_formula_name], + "The `pypy3` symlink needs to be updated!" + assert_equal abi_version, name[/\d+\.\d+$/] + system bin/"pypy#{abi_version}", "-c", "print('Hello, world!')" + system bin/"pypy#{abi_version}", "-c", "import time; time.clock()" + system scripts_folder/"pip#{abi_version}", "list" + end +end diff --git a/Formula/p/pypy3.9.rb b/Formula/p/pypy3.9.rb new file mode 100644 index 0000000000000..83212be5d4e7e --- /dev/null +++ b/Formula/p/pypy3.9.rb @@ -0,0 +1,238 @@ +class Pypy39 < Formula + desc "Implementation of Python 3 in Python" + homepage "https://pypy.org/" + url "https://downloads.python.org/pypy/pypy3.9-v7.3.16-src.tar.bz2" + sha256 "5b75af3f8e76041e79c1ef5ce22ce63f8bd131733e9302081897d8f650e81843" + license "MIT" + revision 1 + head "https://github.com/pypy/pypy.git", branch: "py3.9" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ed01fb6eb45c0578207c4dbf98b0d52331fb00bef1d396642ef09805775c0877" + sha256 cellar: :any, arm64_sonoma: "01ca079d9a0367c1c9b269d7b0070d3433d90734f9f29d12dc6a6d6928bea184" + sha256 cellar: :any, arm64_ventura: "7093697807420f79bee3f5460e9b299f2af0b5a6c0575f7b0d62818240674c2f" + sha256 cellar: :any, sonoma: "f7f05f94c024769c30430cf4f6bcd7f2f623a3750f79e1bcc329c0494c37560f" + sha256 cellar: :any, ventura: "62da1b87b483f0820b1f4e39980bcd4199ac8a9b29622e596841d1128cf4a417" + sha256 cellar: :any_skip_relocation, arm64_linux: "185a9042e0501b1bab93f7741ff4bada3d5fa288b2c680958c89d2df73238052" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e93eaacb73d4693cd455999a555fffacc3f718b52b25294ae72aaa7ba358e256" + end + + # https://doc.pypy.org/en/latest/release-v7.3.17.html#pypy-versions-and-speed-pypy-org + deprecate! date: "2024-09-04", because: :deprecated_upstream + disable! date: "2025-09-05", because: :deprecated_upstream + + depends_on "pkgconf" => :build + depends_on "pypy" => :build + depends_on "gdbm" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "tcl-tk@8" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + pypi_packages package_name: "", + extra_packages: %w[pip setuptools] + + # setup.py got removed in pip 24.1b1 and above + resource "pip" do + url "https://files.pythonhosted.org/packages/94/59/6638090c25e9bc4ce0c42817b5a234e183872a1129735a9330c472cc2056/pip-24.0.tar.gz" + sha256 "ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/6a/21/8fd457d5a979109603e0e460c73177c3a9b6b7abcd136d0146156da95895/setuptools-74.0.0.tar.gz" + sha256 "a85e96b8be2b906f3e3e789adec6a9323abf79758ecfa3065bd740d81158b11e" + end + + # Build fixes: + # - Disable Linux tcl-tk detection since the build script only searches system paths. + # When tcl-tk is not found, it uses unversioned `-ltcl -ltk`, which breaks build. + # Upstream issue ref: https://github.com/pypy/pypy/issues/3538 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/pypy/tcl-tk.diff" + sha256 "d17725c11842d83b5432312348715241b1b402173cd68166620c1b6bd8162fbd" + end + + def abi_version + stable.url[/pypy(\d+\.\d+)/, 1] + end + + def newest_abi_version? + self == Formula["pypy3"] + end + + def install + # Work around build failure with Xcode 15.3 + # _curses_cffi.c:6795:38: error: incompatible function pointer types assigning to + # 'char *(*)(const char *, ...)' from 'char *(char *, ...)' [-Wincompatible-function-pointer-types] + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + # The `tcl-tk` library paths are hardcoded and need to be modified for non-/usr/local prefix + tcltk = Formula["tcl-tk@8"] + inreplace "lib_pypy/_tkinter/tklib_build.py" do |s| + s.gsub! "['/usr/local/opt/tcl-tk/include']", "[]" + # We moved `tcl-tk` headers to `include/tcl-tk` and versioned TCL 8 + # TODO: upstream this. + s.gsub! "(homebrew + '/include')", "('#{tcltk.opt_include}/tcl-tk')" + s.gsub! "(homebrew + '/opt/tcl-tk/lib')", "('#{tcltk.opt_lib}')" + end + + # Having PYTHONPATH set can cause the build to fail if another + # Python is present, e.g. a Homebrew-provided Python 2.x + # See https://github.com/Homebrew/homebrew/issues/24364 + ENV["PYTHONPATH"] = nil + ENV["PYPY_USESSION_DIR"] = buildpath + + python = Formula["pypy"].opt_bin/"pypy" + cd "pypy/goal" do + system python, buildpath/"rpython/bin/rpython", + "-Ojit", "--shared", "--cc", ENV.cc, "--verbose", + "--make-jobs", ENV.make_jobs, "targetpypystandalone.py" + + with_env(PYTHONPATH: buildpath) do + system "./pypy#{abi_version}-c", buildpath/"lib_pypy/pypy_tools/build_cffi_imports.py" + end + end + + libexec.mkpath + cd "pypy/tool/release" do + package_args = %w[--archive-name pypy3 --targetdir . --no-make-portable --no-embedded-dependencies] + system python, "package.py", *package_args + system "tar", "-C", libexec.to_s, "--strip-components", "1", "-xf", "pypy3.tar.bz2" + end + + # Move original libexec/bin directory to allow preserving user-installed scripts. + # Also create symlinks inside pkgshare to allow `brew link/unlink` to work. + libexec.install libexec/"bin" => "pypybin" + pkgshare.install_symlink (libexec/"pypybin").children + + # The PyPy binary install instructions suggest installing somewhere + # (like /opt) and symlinking in binaries as needed. Specifically, + # we want to avoid putting PyPy's Python.h somewhere that configure + # scripts will find it. + bin.install_symlink libexec/"pypybin/pypy#{abi_version}" + lib.install_symlink libexec/"pypybin"/shared_library("libpypy#{abi_version}-c") + include.install_symlink libexec/"include/pypy#{abi_version}" + + if newest_abi_version? + bin.install_symlink "pypy#{abi_version}" => "pypy3" + lib.install_symlink shared_library("libpypy#{abi_version}-c") => shared_library("libpypy3-c") + end + + return unless OS.linux? + + # Delete two files shipped which we do not want to deliver + # These files make patchelf fail + rm [libexec/"pypybin/libpypy#{abi_version}-c.so.debug", libexec/"pypybin/pypy#{abi_version}.debug"] + end + + def post_install + # Precompile cffi extensions in lib_pypy + # list from create_cffi_import_libraries in pypy/tool/release/package.py + %w[_sqlite3 _curses syslog gdbm _tkinter].each do |module_name| + quiet_system bin/"pypy#{abi_version}", "-c", "import #{module_name}" + end + + # Post-install, fix up the site-packages and install-scripts folders + # so that user-installed Python software survives minor updates, such + # as going from 1.7.0 to 1.7.1. + + # Create a site-packages in the prefix. + site_packages(HOMEBREW_PREFIX).mkpath + touch site_packages(HOMEBREW_PREFIX)/".keepme" + rm_r(site_packages(libexec)) + + # Symlink the prefix site-packages into the cellar. + site_packages(libexec).parent.install_symlink site_packages(HOMEBREW_PREFIX) + + # Create a scripts folder in the prefix and symlink it as libexec/bin. + # This is needed as setuptools' distutils ignores our distutils.cfg. + # If `brew link` created a symlink for scripts folder, replace it with a directory + if scripts_folder.symlink? + scripts_folder.unlink + scripts_folder.install_symlink pkgshare.children + end + libexec.install_symlink scripts_folder => "bin" unless (libexec/"bin").exist? + + # Tell distutils-based installers where to put scripts + (distutils/"distutils.cfg").atomic_write <<~INI + [install] + install-scripts=#{scripts_folder} + INI + + %w[setuptools pip].each do |pkg| + resource(pkg).stage do + system bin/"pypy#{abi_version}", "-s", "setup.py", "--no-user-cfg", "install", "--force", "--verbose" + end + end + + # Symlinks to pip_pypy3 + bin.install_symlink scripts_folder/"pip#{abi_version}" => "pip_pypy#{abi_version}" + symlink_to_prefix = [bin/"pip_pypy#{abi_version}"] + + if newest_abi_version? + bin.install_symlink "pip_pypy#{abi_version}" => "pip_pypy3" + symlink_to_prefix << (bin/"pip_pypy3") + end + + # post_install happens after linking + (HOMEBREW_PREFIX/"bin").install_symlink symlink_to_prefix + end + + def caveats + <<~EOS + A "distutils.cfg" has been written to: + #{distutils} + specifying the install-scripts folder as: + #{scripts_folder} + + If you install Python packages via "pypy#{abi_version} setup.py install" or pip_pypy#{abi_version}, + any provided scripts will go into the install-scripts folder + above, so you may want to add it to your PATH *after* #{HOMEBREW_PREFIX}/bin + so you don't overwrite tools from CPython. + + Setuptools and pip have been installed, so you can use pip_pypy#{abi_version}. + To update pip and setuptools between pypy#{abi_version} releases, run: + pip_pypy#{abi_version} install --upgrade pip setuptools + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + # The HOMEBREW_PREFIX location of site-packages + def site_packages(root) + root/"lib/pypy#{abi_version}/site-packages" + end + + # Where setuptools will install executable scripts + def scripts_folder + HOMEBREW_PREFIX/"share/pypy#{abi_version}" + end + + # The Cellar location of distutils + def distutils + site_packages(libexec).parent/"distutils" + end + + test do + newest_pypy3_formula_name = CoreTap.instance + .formula_names + .select { |fn| fn.start_with?("pypy3") } + .max_by { |fn| Version.new(fn[/\d+\.\d+$/]) } + + assert_equal Formula["pypy3"], + Formula[newest_pypy3_formula_name], + "The `pypy3` symlink needs to be updated!" + assert_equal abi_version, name[/\d+\.\d+$/] + system bin/"pypy#{abi_version}", "-c", "print('Hello, world!')" + system bin/"pypy#{abi_version}", "-c", "import time; time.clock()" + system scripts_folder/"pip#{abi_version}", "list" + end +end diff --git a/Formula/p/pyqt-builder.rb b/Formula/p/pyqt-builder.rb new file mode 100644 index 0000000000000..c2896d5d8dd05 --- /dev/null +++ b/Formula/p/pyqt-builder.rb @@ -0,0 +1,54 @@ +class PyqtBuilder < Formula + include Language::Python::Virtualenv + + desc "Tool to build PyQt" + homepage "https://pyqt-builder.readthedocs.io/" + url "https://files.pythonhosted.org/packages/f7/25/e8ad047efd873e07139f703b681017fa0c3326540cc4f42b02e1a237a3b0/pyqt_builder-1.19.0.tar.gz" + sha256 "79540e001c476bc050180db00fffcb1e9fa74544d95c148e48ad6117e49d6ea2" + license "BSD-2-Clause" + head "https://github.com/Python-PyQt/PyQt-builder.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ecfcd5b57f733f4ed32dea12d7826bea613bb2da1109ebcded9c15e27a16599b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ecfcd5b57f733f4ed32dea12d7826bea613bb2da1109ebcded9c15e27a16599b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ecfcd5b57f733f4ed32dea12d7826bea613bb2da1109ebcded9c15e27a16599b" + sha256 cellar: :any_skip_relocation, sonoma: "30112f1fa107c03b9b474b41fee3ae63a1932905e7c9c355281e4068455b6f8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "30112f1fa107c03b9b474b41fee3ae63a1932905e7c9c355281e4068455b6f8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30112f1fa107c03b9b474b41fee3ae63a1932905e7c9c355281e4068455b6f8a" + end + + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "sip" do + url "https://files.pythonhosted.org/packages/a7/8a/869417bc2ea45a29bc6ed4ee82757e472f0c7490cf5b7ddb82b70806bce4/sip-6.14.0.tar.gz" + sha256 "20c086aba387707b34cf47fd96d1a978d01e2b95807e86f8aaa960081f163b28" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_install_with_resources + + # Modify the path sip-install writes in scripts as we install into a + # virtualenv but expect dependents to run with path to Python formula + inreplace venv.site_packages/"sipbuild/builder.py", /\bsys\.executable\b/, "\"#{which(python3)}\"" + end + + test do + system bin/"pyqt-bundle", "-V" + system libexec/"bin/python", "-c", "import pyqtbuild" + end +end diff --git a/Formula/p/pyqt.rb b/Formula/p/pyqt.rb new file mode 100644 index 0000000000000..6007291d4ab74 --- /dev/null +++ b/Formula/p/pyqt.rb @@ -0,0 +1,168 @@ +class Pyqt < Formula + desc "Python bindings for v6 of Qt" + homepage "https://www.riverbankcomputing.com/software/pyqt/intro" + url "https://files.pythonhosted.org/packages/f2/57/48985490c01584e00b70040ec0eb02dfe950471097201acb1b65deb633e5/pyqt6-6.10.0.tar.gz" + sha256 "710ecfd720d9a03b2c684881ae37f528e11d17e8f1bf96431d00a6a73f308e36" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6aab7750b928dd4d1191ee3226181fca13abe61fdbe54f2b2d1466ae5fab5ecc" + sha256 cellar: :any, arm64_sequoia: "dc9d2459cc739f6e9a19b1772091c0ed6eaa634862903540e695eb462788950a" + sha256 cellar: :any, arm64_sonoma: "106c4e1365ce24970f86143b135be794972021c87306b18883356175a7d180cb" + sha256 cellar: :any, sonoma: "e2cef869a6e765609c88f40254587755d5175e7e7d96184eb126359c022df3fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "3227a1d7c8826ab2ca702448916d1d8f71a64f83f62ba6769a83fb34bf67594e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "983e3c2594fb2bcacd0addf4010f35d915076e463f937368389acd4c41037130" + end + + depends_on "pyqt-builder" => :build + depends_on "python@3.14" + depends_on "qt3d" + depends_on "qtbase" + depends_on "qtcharts" + depends_on "qtconnectivity" + depends_on "qtdatavis3d" + depends_on "qtdeclarative" + depends_on "qtmultimedia" + depends_on "qtnetworkauth" + depends_on "qtpositioning" + depends_on "qtquick3d" + depends_on "qtremoteobjects" + depends_on "qtscxml" + depends_on "qtsensors" + depends_on "qtserialport" + depends_on "qtspeech" + depends_on "qtsvg" + depends_on "qttools" + depends_on "qtwebchannel" + depends_on "qtwebsockets" + + on_macos do + depends_on "qtshadertools" + end + + on_sonoma :or_newer do + depends_on "qtwebengine" + end + + on_linux do + # TODO: Add dependencies on all Linux when `qtwebengine` is bottled on arm64 Linux + on_intel do + depends_on "qtwebengine" + end + end + + pypi_packages exclude_packages: %w[pyqt6-3d-qt6 pyqt6-charts-qt6 + pyqt6-datavisualization-qt6 pyqt6-networkauth-qt6 + pyqt6-webengine-qt6 pyqt6-qt6], + extra_packages: %w[pyqt6-3d pyqt6-charts pyqt6-datavisualization + pyqt6-networkauth pyqt6-webengine] + + # extra components + resource "pyqt6-3d" do + url "https://files.pythonhosted.org/packages/df/ca/2399911c654e0ff2c8f35043c6e240ab91b78557a53d7e4360e6ade5ec98/pyqt6_3d-6.10.0.tar.gz" + sha256 "93d89fe30d98804b0983e9b52079d15ae82b1f0a279a5f90f2ff48ed3e6489ed" + end + + resource "pyqt6-charts" do + url "https://files.pythonhosted.org/packages/98/1d/ca03b2ebdf08a06780fea0ec2ca3bc1eeac0e68e59eb9f6ad95666b1e6aa/pyqt6_charts-6.10.0.tar.gz" + sha256 "91e15e28d011caa4c83881a90687b35e3d05ef57290cdd9760824c95bdac6a3e" + end + + resource "pyqt6-datavisualization" do + url "https://files.pythonhosted.org/packages/a4/c6/ae606113706dbf4ca1f99e93e4a338595cb13f19996d17af810248155499/pyqt6_datavisualization-6.10.0.tar.gz" + sha256 "4581c6f6f5e84f6431b01f563ef7b5036204a5f8823b0ea1ce5a083a880c4ee5" + end + + resource "pyqt6-networkauth" do + url "https://files.pythonhosted.org/packages/9b/a2/d9982657322efbfb4d3cfcbadfdb5c782ad19bcf54005bc6a730b156de01/pyqt6_networkauth-6.10.0.tar.gz" + sha256 "94c9504613c8ff68f08eb1ff6ba7804c277b56e335baa6e44c1eba5279961f7b" + end + + resource "pyqt6-sip" do + url "https://files.pythonhosted.org/packages/2f/4a/96daf6c2e4f689faae9bd8cebb52754e76522c58a6af9b5ec86a2e8ec8b4/pyqt6_sip-13.10.2.tar.gz" + sha256 "464ad156bf526500ce6bd05cac7a82280af6309974d816739b4a9a627156fafe" + end + + resource "pyqt6-webengine" do + url "https://files.pythonhosted.org/packages/8f/1a/9971af004a7e859347702f816fb71ecd67c3e32b2f0ae8daf1c1ded99f62/pyqt6_webengine-6.9.0.tar.gz" + sha256 "6ae537e3bbda06b8e06535e4852297e0bc3b00543c47929541fcc9b11981aa25" + end + + def python3 + "python3.14" + end + + def webengine_supported? + on_sonoma :or_newer do + return true + end + on_linux do + on_intel do + return true + end + end + false + end + + def install + # HACK: there is no option to set the plugindir + inreplace "project.py", "builder.qt_configuration['QT_INSTALL_PLUGINS']", "'#{share}/qt/plugins'" + + sip_install = Formula["pyqt-builder"].opt_libexec/"bin/sip-install" + site_packages = prefix/Language::Python.site_packages(python3) + args = %W[ + --target-dir #{site_packages} + --scripts-dir #{bin} + --confirm-license + ] + system sip_install, *args + + resource("pyqt6-sip").stage do + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + + resources.each do |r| + next if r.name == "pyqt6-sip" + # Don't build WebEngineCore bindings on macOS if the SDK is too old to have built qtwebengine in qt. + next if r.name == "pyqt6-webengine" && !webengine_supported? + + r.stage do + inreplace "pyproject.toml", "[tool.sip.project]", <<~TOML + [tool.sip.project] + sip-include-dirs = ["#{site_packages}/PyQt#{version.major}/bindings"] + TOML + system sip_install, "--target-dir", site_packages, "--verbose" + end + end + end + + test do + system bin/"pyuic#{version.major}", "-V" + system bin/"pylupdate#{version.major}", "-V" + + system python3, "-c", "import PyQt#{version.major}" + pyqt_modules = %w[ + 3DAnimation + 3DCore + 3DExtras + 3DInput + 3DLogic + 3DRender + Gui + Multimedia + Network + NetworkAuth + Positioning + Quick + Svg + Widgets + Xml + ] + # Don't test WebEngineCore bindings on macOS if the SDK is too old to have built qtwebengine in qt. + pyqt_modules << "WebEngineCore" if webengine_supported? + pyqt_modules.each { |mod| system python3, "-c", "import PyQt#{version.major}.Qt#{mod}" } + + # Make sure plugin is installed as it currently gets skipped on wheel build, e.g. `pip install` + assert_path_exists share/"qt/plugins/designer"/shared_library("libpyqt#{version.major}") + end +end diff --git a/Formula/p/pyqt@5.rb b/Formula/p/pyqt@5.rb new file mode 100644 index 0000000000000..8fa1c33ca57f0 --- /dev/null +++ b/Formula/p/pyqt@5.rb @@ -0,0 +1,118 @@ +class PyqtAT5 < Formula + desc "Python bindings for v5 of Qt" + homepage "https://www.riverbankcomputing.com/software/pyqt/intro" + url "https://files.pythonhosted.org/packages/0e/07/c9ed0bd428df6f87183fca565a79fee19fa7c88c7f00a7f011ab4379e77a/PyQt5-5.15.11.tar.gz" + sha256 "fda45743ebb4a27b4b1a51c6d8ef455c4c1b5d610c90d2934c7802b5c1557c52" + license "GPL-3.0-only" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c644cc70170c656e7c4f6604b663a5af0f8bc1d09b095711cab7a920a397386" + sha256 cellar: :any, arm64_sequoia: "7db6700257362834be48fdb3f21216c623062568dbee04ee726eaf1b38b98365" + sha256 cellar: :any, arm64_sonoma: "9b4dd05af3998cc273b6ad22754cdbca605889c291992bfea744d190e09d4d38" + sha256 cellar: :any, sonoma: "091e15df83f1e875c8994b8ba89393a30ab2ddc891f39c6c102475d0022164f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9febdc10fe92c98c76bd1cb3d58acdde779a65d6fbebc21c5bc0effed143b24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97e6286b2b996eac230230c2d886f3f901ff77288881e488fada2124d13f6c6d" + end + + deprecate! date: "2026-05-19", because: "is for end-of-life Qt 5" + + depends_on "pyqt-builder" => :build + depends_on "python@3.14" + depends_on "qt@5" + + pypi_packages exclude_packages: %w[pyqt5-qt5 pyqt3d-qt5 pyqtchart-qt5 + pyqtdatavisualization-qt5 pyqtnetworkauth-qt5 + pyqtpurchasing-qt5 pyqtwebengine-qt5], + extra_packages: %w[pyqt3d pyqtchart pyqtdatavisualization + pyqtnetworkauth pyqtpurchasing pyqtwebengine] + + # extra components + resource "pyqt3d" do + url "https://files.pythonhosted.org/packages/ba/96/ab5686191cabca224dc0ecefedf8ff4c50c9e358ae3495f9a23a57068885/PyQt3D-5.15.7.tar.gz" + sha256 "ea783eb546c7dad2d5eaaf82ea5050dde45255a9842e0a1d7584881e9e25a951" + end + + resource "pyqt5-sip" do + url "https://files.pythonhosted.org/packages/ea/08/88a20c862f40b5c178c517cdc7e93767967dec5ac1b994e226d517991c9b/pyqt5_sip-12.17.1.tar.gz" + sha256 "0eab72bcb628f1926bf5b9ac51259d4fa18e8b2a81d199071135458f7d087ea8" + end + + resource "pyqtchart" do + url "https://files.pythonhosted.org/packages/f0/b9/c9548f0f5cab6640f4ea9e598a6a48e6d6a59ca23dad6004f90d25dc799a/PyQtChart-5.15.7.tar.gz" + sha256 "bc9f1d26c725e820b0fff8db6e906e8b286128a14b3a98c59a0cd0c3d9924095" + end + + resource "pyqtdatavisualization" do + url "https://files.pythonhosted.org/packages/33/d5/0e531557035e4b51aecbf6f2a7e58c0539f4047e2b550af75f44d5c37e1e/PyQtDataVisualization-5.15.6.tar.gz" + sha256 "9ed33b20e747bc69e1d619f147bb1625cc00d6ef404dbf076ba13a9ff6f6061d" + end + + resource "pyqtnetworkauth" do + url "https://files.pythonhosted.org/packages/59/44/927d519cd6f4ee1ec364c103205f16c2f8474df34b35a99ffc4a64d357ed/PyQtNetworkAuth-5.15.6.tar.gz" + sha256 "85ada0c82b9787ffd614abff93bd6d9314d6528265f5f1d23a1922ef0cbeecb9" + end + + resource "pyqtpurchasing" do + url "https://files.pythonhosted.org/packages/68/cf/005c9e79536473c8354c1c2b59a2adcae8aa5b7269b42c06514490aa47fb/PyQtPurchasing-5.15.6.tar.gz" + sha256 "304b1ea3bfb6555202751220700d9a98d1de9eab464515dfccca96f306ddf00e" + end + + resource "pyqtwebengine" do + url "https://files.pythonhosted.org/packages/18/e8/19a00646866e950307f8cd73841575cdb92800ae14837d5821bcbb91392c/PyQtWebEngine-5.15.7.tar.gz" + sha256 "f121ac6e4a2f96ac289619bcfc37f64e68362f24a346553f5d6c42efa4228a4d" + end + + def python3 + "python3.14" + end + + def install + sip_install = Formula["pyqt-builder"].opt_libexec/"bin/sip-install" + site_packages = prefix/Language::Python.site_packages(python3) + args = [ + "--target-dir", site_packages, + "--scripts-dir", bin, + "--confirm-license", + "--no-designer-plugin", + "--no-qml-plugin" + ] + system sip_install, *args + + resource("pyqt5-sip").stage do + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + + resources.each do |r| + next if r.name == "pyqt5-sip" + + r.stage do + inreplace "pyproject.toml", "[tool.sip.project]", <<~TOML + [tool.sip.project] + sip-include-dirs = ["#{site_packages}/PyQt#{version.major}/bindings"] + TOML + system sip_install, "--target-dir", site_packages + end + end + end + + test do + system bin/"pyuic#{version.major}", "--version" + system bin/"pylupdate#{version.major}", "-version" + + components = %w[ + Gui + Location + Multimedia + Network + Quick + Svg + WebEngineWidgets + Widgets + Xml + ] + + system python3, "-c", "import PyQt#{version.major}" + components.each { |mod| system python3, "-c", "import PyQt5.Qt#{mod}" } + end +end diff --git a/Formula/p/pyrefly.rb b/Formula/p/pyrefly.rb new file mode 100644 index 0000000000000..d10a8772fe90d --- /dev/null +++ b/Formula/p/pyrefly.rb @@ -0,0 +1,41 @@ +class Pyrefly < Formula + desc "Fast type checker and IDE for Python" + homepage "https://pyrefly.org/" + url "https://github.com/facebook/pyrefly/archive/refs/tags/0.40.0.tar.gz" + sha256 "4ff176c213cde3c7eb710bb075897bd0148941c2d805aabbab1cfb31deee4464" + license "MIT" + head "https://github.com/facebook/pyrefly.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9e840ffc993a3c9ef96b46fd1862f2818cbd0a2a74262ad41329f1c2edd793a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65e76cb25e9f2cd2265e8ad8cbb7e98e36a063075f0968c51d4a0af63f3ffefd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "588fb1918fac3904d052132e4dfb95cd36afd532a15fcb97016690dab6dd2f11" + sha256 cellar: :any_skip_relocation, sonoma: "989fcfe312c984b45154afe9005fb50c027049711fa9b62b61fb59499635f78e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd842d3d438f7928a0c3c12ff18409d4001c4feaabc77b4dcad4b43593aca21c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07df4f9cd398ab188709c24c7f5adbd5060066c20bb2cb292cc372aaea6ab214" + end + + depends_on "rust" => :build + + def install + # Currently uses nightly rust features. Allow our stable rust to compile + # these unstable features to avoid needing a rustup-downloaded nightly. + # See https://rustc-dev-guide.rust-lang.org/building/bootstrapping/what-bootstrapping-does.html#complications-of-bootstrapping + # Remove when fixed: https://github.com/facebook/pyrefly/issues/374 + ENV["RUSTC_BOOTSTRAP"] = "1" + # Set JEMALLOC configuration for ARM builds + ENV["JEMALLOC_SYS_WITH_LG_PAGE"] = "16" if Hardware::CPU.arm? + + system "cargo", "install", *std_cargo_args(path: "pyrefly") + end + + test do + (testpath/"test.py").write <<~PYTHON + def hello(name: str) -> int: + return f"Hello, {name}!" + PYTHON + + output = shell_output("#{bin}/pyrefly check #{testpath}/test.py 2>&1", 1) + assert_match "`str` is not assignable to declared return type `int`", output + end +end diff --git a/Formula/p/pyright.rb b/Formula/p/pyright.rb new file mode 100644 index 0000000000000..d6b04f1fb24b2 --- /dev/null +++ b/Formula/p/pyright.rb @@ -0,0 +1,27 @@ +class Pyright < Formula + desc "Static type checker for Python" + homepage "https://github.com/microsoft/pyright" + url "https://registry.npmjs.org/pyright/-/pyright-1.1.407.tgz" + sha256 "24f3e5481fe638415622774c0ba0fc949dc560e2baab0d604c6d67f10bb3c0a4" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4f7164ff0dce2a13eee3262e87b8014df8776086e2fc118d0cf136e23559b4b8" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"broken.py").write <<~PYTHON + def wrong_types(a: int, b: int) -> str: + return a + b + PYTHON + output = pipe_output("#{bin}/pyright broken.py 2>&1") + assert_match "error: Type \"int\" is not assignable to return type \"str\"", output + end +end diff --git a/Formula/p/pyscn.rb b/Formula/p/pyscn.rb new file mode 100644 index 0000000000000..7d90c2136cb80 --- /dev/null +++ b/Formula/p/pyscn.rb @@ -0,0 +1,47 @@ +class Pyscn < Formula + desc "Intelligent Python Code Quality Analyzer" + homepage "https://github.com/ludo-technologies/pyscn" + url "https://github.com/ludo-technologies/pyscn/archive/refs/tags/v1.2.2.tar.gz" + sha256 "dbb5a4708eb9dcd850b979e73b311dda308e99ae110a5733e00776ccc4a5f3a6" + license "MIT" + head "https://github.com/ludo-technologies/pyscn.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4f0007d71c60215930f13fe918507c471155d12e2b90a99dc494ae17eb3d0e31" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f8bb3d3cf8a73ea3da386218afc79f19d14518003544117fdd80e339932d911" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "238d0f163d7544efe7bc78c4f62c28cc0f000057d9d66bd26f0c92df8add6743" + sha256 cellar: :any_skip_relocation, sonoma: "f3525b3dedb14ec77768a26065dfd4cf7bdd7d9633ab1f0f8ef977005aecd866" + sha256 cellar: :any_skip_relocation, arm64_linux: "a32adc3e343df8484849f2d6001985659621a28b4f889097777b768259feb351" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3d01837d3eb0fc03fd510fc4e84c7b479bdf31008b7a20cb8dc8fe3d3bccfec" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" + + ldflags = %W[ + -s -w + -X github.com/ludo-technologies/pyscn/internal/version.Version=#{version} + -X github.com/ludo-technologies/pyscn/internal/version.Commit=#{tap.user} + -X github.com/ludo-technologies/pyscn/internal/version.Date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/pyscn" + + generate_completions_from_executable(bin/"pyscn", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/pyscn version") + + (testpath/"test.py").write <<~PY + def add(a, b): + return a + b + + print(add(2, 3)) + PY + + output = shell_output("#{bin}/pyscn analyze #{testpath}/test.py 2>&1") + assert_match "Health Score: 98/100 (Grade: A)", output + end +end diff --git a/Formula/p/pyside.rb b/Formula/p/pyside.rb new file mode 100644 index 0000000000000..a991f96a38c1b --- /dev/null +++ b/Formula/p/pyside.rb @@ -0,0 +1,182 @@ +class Pyside < Formula + desc "Official Python bindings for Qt" + homepage "https://wiki.qt.io/Qt_for_Python" + url "https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-6.9.3-src/pyside-setup-everywhere-src-6.9.3.tar.xz" + mirror "https://cdimage.debian.org/mirror/qt.io/qtproject/official_releases/QtForPython/pyside6/PySide6-6.9.3-src/pyside-setup-everywhere-src-6.9.3.tar.xz" + sha256 "7cd2d5abb98f2e6f442b0e41f5fcf930e7312ae4b17f681316b1adc7b63bb172" + # NOTE: We omit some licenses even though they are in SPDX-License-Identifier or LICENSES/ directory: + # 1. LicenseRef-Qt-Commercial is removed from "OR" options as non-free + # 2. GFDL-1.3-no-invariants-only is only used by not installed docs, e.g. sources/{pyside6,shiboken6}/doc + # 3. BSD-3-Clause is only used by not installed examples, tutorials and build scripts + # 4. Apache-2.0 is only used by not installed examples + license all_of: [ + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + ] + + livecheck do + url "https://download.qt.io/official_releases/QtForPython/pyside6/" + regex(%r{href=.*?PySide6[._-]v?(\d+(?:\.\d+)+)-src/}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "cbd932a63ed44d0a86f061cd923eaba44933a6194fb3c82429cd56492ad6b2d3" + sha256 arm64_sequoia: "fdf377a139efc333ed0db796cfc57ec3438dc90d39d154c13078be084b2d1e53" + sha256 arm64_sonoma: "c231f54ac3566b9b5097b85f573c81b0b48e89d586bf6097967daa23eebd476d" + sha256 cellar: :any, sonoma: "9149138ebb5e98687c1b31d33880066a5c4eafbbfc7ae0bfee8ff838426d6e52" + sha256 cellar: :any_skip_relocation, arm64_linux: "f840ae550d2cb727219170cbc621584d8c66d6ebccde6e4380b08b9bdb2627b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0157febc0649c4a7feac6ee8a174b43cebcd089fb4879eeb2bc26bfe5736ab85" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python-setuptools" => :build + depends_on "qtshadertools" => :build + depends_on xcode: :build + depends_on "pkgconf" => :test + + depends_on "llvm" + depends_on "python@3.13" + depends_on "qt3d" + depends_on "qtbase" + depends_on "qtcharts" + depends_on "qtconnectivity" + depends_on "qtdatavis3d" + depends_on "qtdeclarative" + depends_on "qtgraphs" + depends_on "qthttpserver" + depends_on "qtlocation" + depends_on "qtmultimedia" + depends_on "qtnetworkauth" + depends_on "qtpositioning" + depends_on "qtquick3d" + depends_on "qtremoteobjects" + depends_on "qtscxml" + depends_on "qtsensors" + depends_on "qtserialbus" + depends_on "qtserialport" + depends_on "qtspeech" + depends_on "qtsvg" + depends_on "qttools" + depends_on "qtwebchannel" + depends_on "qtwebsockets" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + on_macos do + depends_on "qtshadertools" + end + + on_sonoma :or_newer do + depends_on "qtwebengine" + depends_on "qtwebview" + end + + on_linux do + depends_on "mesa" + + # TODO: Add dependencies on all Linux when `qtwebengine` is bottled on arm64 Linux + on_intel do + depends_on "qtwebengine" + depends_on "qtwebview" + end + end + + # Fix .../sources/pyside6/qtexampleicons/module.c:4:10: fatal error: 'Python.h' file not found + # Upstream issue: https://bugreports.qt.io/browse/PYSIDE-2491 + patch :DATA + + def python3 + "python3.13" + end + + def install + ENV.append_path "PYTHONPATH", buildpath/"build/sources" + + extra_include_dirs = [Formula["qttools"].opt_include] + + # upstream issue: https://bugreports.qt.io/browse/PYSIDE-1684 + inreplace "sources/pyside6/cmake/Macros/PySideModules.cmake", + "${shiboken_include_dirs}", + "${shiboken_include_dirs}:#{extra_include_dirs.join(":")}" + + # Install python scripts into pkgshare rather than bin + inreplace "sources/pyside-tools/CMakeLists.txt", "DESTINATION bin", "DESTINATION #{pkgshare}" + + # Avoid shim reference + inreplace "sources/shiboken6/ApiExtractor/CMakeLists.txt", "${CMAKE_CXX_COMPILER}", ENV.cxx + + shiboken6_module = prefix/Language::Python.site_packages(python3)/"shiboken6" + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,#{rpath(source: shiboken6_module)}", + "-DPython_EXECUTABLE=#{which(python3)}", + "-DBUILD_TESTS=OFF", + "-DNO_QT_TOOLS=yes", + # Limited API (maybe combined with keg relocation) breaks the Linux bottle + "-DFORCE_LIMITED_API=#{OS.mac? ? "yes" : "no"}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system python3, "-c", "import PySide6" + system python3, "-c", "import shiboken6" + + modules = %w[ + Core + Gui + Network + Positioning + Quick + Svg + Widgets + Xml + ] + modules << "WebEngineCore" if (OS.linux? && Hardware::CPU.intel?) || (OS.mac? && MacOS.version >= :sonoma) + modules.each { |mod| system python3, "-c", "import PySide6.Qt#{mod}" } + + pyincludes = shell_output("#{python3}-config --includes").chomp.split + pylib = shell_output("#{python3}-config --ldflags --embed").chomp.split + + if OS.linux? + pyver = Language::Python.major_minor_version python3 + pylib += %W[ + -Wl,-rpath,#{Formula["python@#{pyver}"].opt_lib} + -Wl,-rpath,#{lib} + ] + end + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + Py_Initialize(); + Shiboken::AutoDecRef module(Shiboken::Module::import("shiboken6")); + assert(!module.isNull()); + return 0; + } + CPP + shiboken_flags = shell_output("pkgconf --cflags --libs shiboken6").chomp.split + system ENV.cxx, "-std=c++17", "test.cpp", *shiboken_flags, *pyincludes, *pylib, "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/sources/pyside6/qtexampleicons/CMakeLists.txt b/sources/pyside6/qtexampleicons/CMakeLists.txt +index 1562f7b..0611399 100644 +--- a/sources/pyside6/qtexampleicons/CMakeLists.txt ++++ b/sources/pyside6/qtexampleicons/CMakeLists.txt +@@ -32,6 +32,8 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Release") + target_compile_definitions(QtExampleIcons PRIVATE "-DNDEBUG") + endif() + ++get_property(SHIBOKEN_PYTHON_INCLUDE_DIRS GLOBAL PROPERTY shiboken_python_include_dirs) ++ + target_include_directories(QtExampleIcons PRIVATE ${SHIBOKEN_PYTHON_INCLUDE_DIRS}) + + get_property(SHIBOKEN_PYTHON_LIBRARIES GLOBAL PROPERTY shiboken_python_libraries) diff --git a/Formula/p/pyside@2.rb b/Formula/p/pyside@2.rb new file mode 100644 index 0000000000000..bacde9ea5fd12 --- /dev/null +++ b/Formula/p/pyside@2.rb @@ -0,0 +1,144 @@ +class PysideAT2 < Formula + desc "Official Python bindings for Qt" + homepage "https://wiki.qt.io/Qt_for_Python" + url "https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.15.17-src/pyside-setup-opensource-src-5.15.17.tar.xz" + sha256 "84a4b328f6a60235b8717ad522b88a7b600059260c57a2189ed005109f24c527" + # NOTE: We omit some licenses: + # 1. LICENSE.COMMERCIAL is removed from "OR" options as non-free + # 2. GFDL-1.3-only is only used by not installed docs, e.g. sources/{pyside2,shiboken2}/doc + # 3. BSD-3-Clause is only used by not installed examples + license all_of: [ + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + ] + + bottle do + sha256 arm64_sequoia: "49044784ca72cc2c0b6a2cbf1c531854d8cf6293b13fa60c8265835e52403d2a" + sha256 arm64_sonoma: "20ba3bca0f3bfea74630e7caa6fcd82f5da40e4970f5073fe5091a6c08e48d8b" + sha256 arm64_ventura: "62c1472775311f41aceb05954caa84520e71f3905e2c9582336015dc800cabef" + sha256 cellar: :any, sonoma: "b910886b9a7b04f34af7c895361faa4821b1681f12555d8a72c2fbf22126cf9c" + sha256 cellar: :any, ventura: "871b29070a8cee9730509ca9c27339147e372a601add0ea0ecc5493e3f42ba67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e633d78c4c6207fde6216d4b17df91c77f06489c32826bdcf96921156cad9243" + end + + keg_only :versioned_formula + + # Requires various patches and cannot be built with `FORCE_LIMITED_API` with Python 3.12. + # `qt@5` is also officially EOL on 2025-05-25. + disable! date: "2025-05-26", because: :versioned_formula + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "llvm" + depends_on "python@3.10" + depends_on "qt@5" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + on_linux do + depends_on "libxcb" + depends_on "mesa" + end + + # Don't copy qt@5 tools. + patch do + url "https://src.fedoraproject.org/rpms/python-pyside2/raw/009100c67a63972e4c5252576af1894fec2e8855/f/pyside2-tools-obsolete.patch" + sha256 "ede69549176b7b083f2825f328ca68bd99ebf8f42d245908abd320093bac60c9" + end + + # Apply Debian patches to support newer Clang + # Upstream issue ref: https://bugreports.qt.io/browse/PYSIDE-2268 + patch do + url "https://deb.debian.org/debian/pool/main/p/pyside2/pyside2_5.15.16-3.1.debian.tar.xz" + sha256 "523d191e45b1a9720e8eb8ea66fd930f49ffad54df1295ca09efea8838257aa6" + apply "patches/shiboken2-clang-Fix-clashes-between-type-name-and-enumera.patch", + "patches/shiboken2-clang-Fix-and-simplify-resolveType-helper.patch", + "patches/shiboken2-clang-Remove-typedef-expansion.patch", + "patches/shiboken2-clang-Fix-build-with-clang-16.patch", + "patches/shiboken2-clang-Record-scope-resolution-of-arguments-func.patch", + "patches/shiboken2-clang-Suppress-class-scope-look-up-for-paramete.patch", + "patches/shiboken2-clang-Write-scope-resolution-for-all-parameters.patch" + end + patch do + url "https://salsa.debian.org/qt-kde-team/qt/pyside2/-/raw/46111b30f4b4f01bed7b55dc7cc9a800809b2cb4/debian/patches/Modify-sendCommand-signatures.patch" + sha256 "2f39461136a718a9f75bd94c1e71fc358764af25f68c650fd503c777e32ff302" + end + + def python3 + "python3.10" + end + + def install + rpaths = if OS.mac? + pyside2_module = prefix/Language::Python.site_packages(python3)/"PySide2" + [rpath, rpath(source: pyside2_module)] + else + # Add missing include dirs on Linux. + # upstream issue: https://bugreports.qt.io/browse/PYSIDE-1684 + extra_include_dirs = [Formula["mesa"].opt_include, Formula["libxcb"].opt_include] + inreplace "sources/pyside2/cmake/Macros/PySideModules.cmake", + "--include-paths=${shiboken_include_dirs}", + "--include-paths=${shiboken_include_dirs}:#{extra_include_dirs.join(":")}" + + # Add rpath to qt@5 because it is keg-only. + [lib, Formula["qt@5"].opt_lib] + end + + # Avoid shim reference. + inreplace "sources/shiboken2/ApiExtractor/CMakeLists.txt", "${CMAKE_CXX_COMPILER}", ENV.cxx + + ENV.append_path "CMAKE_PREFIX_PATH", Formula["qt@5"].opt_lib + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which(python3)}", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DFORCE_LIMITED_API=#{OS.mac? ? "yes" : "no"}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + python = which(python3) + ENV.append_path "PYTHONPATH", prefix/Language::Python.site_packages(python) + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + + system python, "-c", "import PySide2" + system python, "-c", "import shiboken2" + + modules = %w[ + Core + Gui + Location + Multimedia + Network + Quick + Svg + WebEngineWidgets + Widgets + Xml + ] + + modules.each { |mod| system python, "-c", "import PySide2.Qt#{mod}" } + + pyincludes = shell_output("#{python}-config --includes").chomp.split + pylib = shell_output("#{python}-config --ldflags --embed").chomp.split + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + Py_Initialize(); + Shiboken::AutoDecRef module(Shiboken::Module::import("shiboken2")); + assert(!module.isNull()); + return 0; + } + CPP + rpaths = [] + rpaths += ["-Wl,-rpath,#{lib}", "-Wl,-rpath,#{Formula["python@3.10"].opt_lib}"] unless OS.mac? + shiboken_flags = shell_output("pkgconf --cflags --libs shiboken2").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", *shiboken_flags, *rpaths, *pyincludes, *pylib, "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pyspelling.rb b/Formula/p/pyspelling.rb new file mode 100644 index 0000000000000..8147c448353ec --- /dev/null +++ b/Formula/p/pyspelling.rb @@ -0,0 +1,118 @@ +class Pyspelling < Formula + include Language::Python::Virtualenv + + desc "Spell checker automation tool" + homepage "https://facelessuser.github.io/pyspelling/" + url "https://files.pythonhosted.org/packages/d2/8d/10c7685389449464172ff4383d9f1b6b96df8825ea6b513004a713aa034e/pyspelling-2.12.tar.gz" + sha256 "7b397911e46b7fa7c1056b2867c02e81547fc8d00bbcd84465655df23e49dbaa" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ac2397e3f98b7012bf1424ee7be07594f278eb105685043fc2aa7c36c2db92a2" + sha256 cellar: :any, arm64_sequoia: "665f7c3576dd4d9093f2a0819fa7bcdcc8cfc7d3f33eef95136c68b02ef7cca5" + sha256 cellar: :any, arm64_sonoma: "91c505186ec1f7451f06887a96298b6c7659228f69fdf89b62ece14da92816f8" + sha256 cellar: :any, sonoma: "2ec92d3172a81a404d68e96fd45006d236913e145850ae3a928ff92b4f977e84" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3829c5760504c4acae172a24ac06b23b6bba44367d958d2291b32ea3d952392" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edad5d0d721973f7a20493a8dcecfeb8bc6275624c8d854bcbd86ec087309e3b" + end + + depends_on "aspell" => :test + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz" + sha256 "98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7" + end + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + + # Fix to build with Python 3.14 + # PR ref: https://github.com/html5lib/html5lib-python/pull/589 + patch do + url "https://github.com/html5lib/html5lib-python/commit/b90dafff1bf342d34d539098013d0b9f318c7641.patch?full_index=1" + sha256 "779f8bab52308792b7ac2f01c3cd61335587640f98812c88cb074dce9fe8162d" + end + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz" + sha256 "d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/79/3e/c0bdc27cf06f4e47680bd5803a07cb3dfd17de84cde92dd217dcb9e05253/wcmatch-10.1.tar.gz" + sha256 "f11f94208c8c8484a16f4f48638a85d771d9513f4ab3f37595978801cb9465af" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath / "text.txt").write("Homebrew is my favourite package manager!") + (testpath / "en-custom.txt").write("homebrew") + (testpath / ".pyspelling.yml").write <<~YAML + spellchecker: aspell + matrix: + - name: Python Source + aspell: + lang: en + d: en_US + dictionary: + wordlists: + - #{testpath}/en-custom.txt + sources: + - #{testpath}/text.txt + YAML + + output = shell_output(bin/"pyspelling", 1) + assert_match <<~EOS, output + Misspelled words: + #{testpath}/text.txt + -------------------------------------------------------------------------------- + favourite + -------------------------------------------------------------------------------- + EOS + end +end diff --git a/Formula/p/pystring.rb b/Formula/p/pystring.rb new file mode 100644 index 0000000000000..a0350d28e5adf --- /dev/null +++ b/Formula/p/pystring.rb @@ -0,0 +1,44 @@ +class Pystring < Formula + desc "Collection of C++ functions for the interface of Python's string class methods" + homepage "https://github.com/imageworks/pystring" + url "https://github.com/imageworks/pystring/archive/refs/tags/v1.1.4.tar.gz" + sha256 "49da0fe2a049340d3c45cce530df63a2278af936003642330287b68cefd788fb" + license "BSD-3-Clause" + head "https://github.com/imageworks/pystring.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9a006d97490404a81cfa354f0cb193e5d3763cbc756a2b2551829abbfe10b519" + sha256 cellar: :any, arm64_sequoia: "9e8695ee4b99ef0ec12667a9dee997d4f0f06509b7c262a4a5c74aa1ec7002c4" + sha256 cellar: :any, arm64_sonoma: "c26e8b819cc438eca6d9cbc63695d5de3946e8593e2a6ae7a80dad9f00755291" + sha256 cellar: :any, arm64_ventura: "7691c2829ccd208b1805929cff0802595a93e1603710279064eae8d05eb4d56f" + sha256 cellar: :any, arm64_monterey: "1890973661e9420d561fbff94d3679ac9cb60e3b224753b9c91313606e26beda" + sha256 cellar: :any, arm64_big_sur: "d9c0e8a46ac482f4e5e55484cb629263244cd7ab4bc90f9cd25bcac2e28b2755" + sha256 cellar: :any, sonoma: "743ac4c3b6deb23ba26d6d35fb38e7fac4ad7fa7f8daf99913810b42a5c64793" + sha256 cellar: :any, ventura: "02c48d989fc55ecf9e197d512c4f256a5338327427492bac35e84d5f89a2de8f" + sha256 cellar: :any, monterey: "99038ecff46d9ea2ba35f6a3e976d92a2206082c7299447f331914da9477b75a" + sha256 cellar: :any, big_sur: "e9e60b007a95bba54ef74fdae69c817b3888a8ae05bca19e4f01371a12fc90bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b11eaa5062fdc58a7f3226687b3801cefbc222cbc8eede81d54bfea7dae1847" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07f1dc79610a20ac5cc9376dbb992f7a568554b484f318e24dd621b5c7bae6f0" + end + + depends_on "cmake" => :build + + def install + # Fix build with CMake 4.0+. Remove on next release. + inreplace "CMakeLists.txt", "cmake_minimum_required(VERSION 3.2)", + "cmake_minimum_required(VERSION 3.10)" + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + include.install "pystring.h" + pkgshare.install "test.cpp", "unittest.h" + end + + test do + system ENV.cxx, pkgshare/"test.cpp", "-I#{include}", "-I#{pkgshare}", "-L#{lib}", + "-lpystring", "-o", "test" + system "./test" + end +end diff --git a/Formula/p/pytest.rb b/Formula/p/pytest.rb new file mode 100644 index 0000000000000..8c6a68481c59d --- /dev/null +++ b/Formula/p/pytest.rb @@ -0,0 +1,48 @@ +class Pytest < Formula + include Language::Python::Virtualenv + + desc "Simple powerful testing with Python" + homepage "https://docs.pytest.org/en/latest/" + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cb4c17ce52d0a40e77c384ce0c241eced92764e6d7601c95a1f6df61273b93d3" + end + + depends_on "python@3.14" + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" + sha256 "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test_example.py").write <<~PYTHON + def test_example(): + assert 1 + 1 == 2 + PYTHON + system bin/"pytest", "test_example.py" + end +end diff --git a/Formula/p/python-argcomplete.rb b/Formula/p/python-argcomplete.rb new file mode 100644 index 0000000000000..8b708de9079ad --- /dev/null +++ b/Formula/p/python-argcomplete.rb @@ -0,0 +1,36 @@ +class PythonArgcomplete < Formula + include Language::Python::Virtualenv + + desc "Tab completion for Python argparse" + homepage "https://kislyuk.github.io/argcomplete/" + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3cbfebfe5fc664a233aec15fcd7049e5ded3cd8d69b7ba58bce32e084e2a2db7" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + + # Bash completions are not compatible with Bash 3 so don't use v1 directory. + # Ref: https://kislyuk.github.io/argcomplete/#global-completion + bash_completion_script = "argcomplete/bash_completion.d/_python-argcomplete" + (share/"bash-completion/completions").install bash_completion_script => "python-argcomplete" + zsh_completion.install_symlink bash_completion/"python-argcomplete" => "_python-argcomplete" + + # Build an `:all` bottle by replacing comments + site_packages = libexec/Language::Python.site_packages("python3") + inreplace site_packages/"argcomplete-#{version}.dist-info/METADATA", + "/opt/homebrew/bin/bash", + "$HOMEBREW_PREFIX/bin/bash" + end + + test do + output = shell_output("#{bin}/register-python-argcomplete foo") + assert_match "_python_argcomplete foo", output + end +end diff --git a/Formula/p/python-build.rb b/Formula/p/python-build.rb new file mode 100644 index 0000000000000..f4b03fee942ee --- /dev/null +++ b/Formula/p/python-build.rb @@ -0,0 +1,39 @@ +class PythonBuild < Formula + include Language::Python::Virtualenv + + desc "Simple, correct PEP 517 build frontend" + homepage "https://github.com/pypa/build" + url "https://files.pythonhosted.org/packages/25/1c/23e33405a7c9eac261dff640926b8b5adaed6a6eb3e1767d441ed611d0c0/build-1.3.0.tar.gz" + sha256 "698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397" + license "MIT" + head "https://github.com/pypa/build.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "05b71eea25849daef6ceb6289287114f1a9ef9f66e04cca4a1de4a5c4d5dd5c4" + end + + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyproject-hooks" do + url "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz" + sha256 "1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8" + end + + def install + virtualenv_install_with_resources + end + + test do + stable.stage do + system bin/"pyproject-build" + assert_path_exists Pathname.pwd/"dist/build-#{stable.version}.tar.gz" + assert_path_exists Pathname.pwd/"dist/build-#{stable.version}-py3-none-any.whl" + end + end +end diff --git a/Formula/p/python-freethreading.rb b/Formula/p/python-freethreading.rb new file mode 100644 index 0000000000000..4426f6fed81f8 --- /dev/null +++ b/Formula/p/python-freethreading.rb @@ -0,0 +1,466 @@ +class PythonFreethreading < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz" + sha256 "88d2da4eed42fa9a5f42ff58a8bc8988881bd6c547e297e46682c2687638a851" + license "Python-2.0" + revision 1 + + livecheck do + formula "python" + end + + bottle do + sha256 arm64_tahoe: "df6201bc1169d77cfb491afc7ed747bb5f3776261f2a7699fe624604d8280c5f" + sha256 arm64_sequoia: "1c787feaca327ae5cc5ff9260900007ec6d26384d7d8efda2ec26c1648110482" + sha256 arm64_sonoma: "9ae7d2cc1e3250a0e093772a019623027539c661d4dbf58763e190f1595c41df" + sha256 tahoe: "6f733ae57726b2f2b655f8d66b0e369367d4a56a71df1d9484c61d8cd644bf3c" + sha256 sequoia: "83767759cd4b5560eea734978d69d44ca59096e8ef0b0bc1925b3827899e81e5" + sha256 sonoma: "7cc8ebe54805b234e60c20be6cb9a0e179f3a39141372212f6998cfd08f4435f" + sha256 arm64_linux: "1dbd68fbdc696b2bc1e9ad72d6f35e8c6458bae5c5db7f56dbf3daf3b2f9df22" + sha256 x86_64_linux: "4662b0788d51cb9e42f7603045f455a024116ce06be9f4cd9afc6a6a4ff9fe95" + end + + depends_on "pkgconf" => :build + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xz" + depends_on "zstd" + + # not actually used, we just want this installed to ensure there are no conflicts. + uses_from_macos "python" => :test + uses_from_macos "bzip2" + uses_from_macos "expat", since: :sequoia + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "berkeley-db@5" + depends_on "libnsl" + depends_on "libtirpc" + end + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip wheel] + + # Always update to latest release + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Modify default sysconfig to match the brew install layout. + # Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976). + # We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.13-sysconfig.diff" + sha256 "9f2eae1d08720b06ac3d9ef1999c09388b9db39dfb52687fc261ff820bff20c3" + end + + def lib_cellar + on_macos do + return frameworks/"PythonT.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}t" + end + on_linux do + return lib/"python#{version.major_minor}t" + end + end + + def site_packages_cellar + lib_cellar/"site-packages" + end + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages + HOMEBREW_PREFIX/"lib/python#{version.major_minor}t/site-packages" + end + + def python3 + bin/"python#{version.major_minor}t" + end + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection of libmpdec, which assumes a universal build. + # This is currently an inreplace due to https://github.com/python/cpython/issues/98557. + if OS.mac? + inreplace "configure", "libmpdec_machine=universal", + "libmpdec_machine=#{ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64"}" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --enable-optimizations + --with-system-expat + --with-system-libmpdec + --with-readline=editline + --disable-gil + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" + args << "--enable-framework=#{frameworks}" + args << "--with-framework-name=PythonT" + args << "--with-dtrace" + args << "--with-dbmliborder=ndbm" + + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + args << "--with-dbmliborder=bdb" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + # Disabled modules - provided in separate formulae + args += %w[ + py_cv_module__tkinter=disabled + ] + + system "./configure", *args + system "make" + + ENV.deparallelize do + # Tell Python not to install into /Applications (default for framework builds) + system "make", "install", "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = lib_cellar.parent/"pkgconfig" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.glob("*#{version.major_minor}t*") + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata_t_darwin_darwin.py", + lib_cellar/"config-#{version.major_minor}t-darwin/Makefile", + pc_dir/"python-#{version.major_minor}t.pc", + pc_dir/"python-#{version.major_minor}t-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}t-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata_t_darwin_darwin.py", + %r{('LINKFORSHARED': .*?) (PythonT.framework/Versions/3.\d+/PythonT)'}m, + "\\1 #{opt_prefix}/Frameworks/\\2'" + + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_t_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}t-config", + lib/"pkgconfig/python-3*.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}t-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + end + + # Remove the site-packages that Python created in its Cellar. + rm_r site_packages_cellar.children + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + %w[flit-core wheel].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + end + resource("wheel").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/pip-*.whl") + resource("pip").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + + # Patch ensurepip to bootstrap our updated version of pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Rename idle, pydoc to t variants + mv bin/"idle#{version.major_minor}", bin/"idle#{version.major_minor}t" + mv bin/"pydoc#{version.major_minor}", bin/"pydoc#{version.major_minor}t" + + # Remove files that conflict with the main python3 formula + bin.glob("{idle,pydoc}3").map(&:unlink) + [bin, lib, lib/"pkgconfig", include].each do |directory| + (directory.glob("*python*") - directory.glob("*#{version.major_minor}t*")).map(&:unlink) + end + rm_r share + + # Bootstrap initial install of pip. + system python3, "-Im", "ensurepip" + + # Install desired versions of pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + root_site_packages = lib/"python#{version.major_minor}t/site-packages" + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{root_site_packages}", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (root_site_packages/"bin").children, bin + rmdir root_site_packages/"bin" + + rm [bin/"pip", bin/"pip3"] + mv bin/"wheel", bin/"wheel#{version.major_minor}t" + mv bin/"pip#{version.major_minor}", bin/"pip#{version.major_minor}t" + + if OS.mac? + # Replace framework site-packages with a symlink to the real one. + rm_r site_packages_cellar + site_packages_cellar.parent.install_symlink root_site_packages + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Mark Homebrew python as externally managed: https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager + # Placed after ensurepip since it invokes pip in isolated mode, meaning + # we can't pass --break-system-packages. + (lib_cellar/"EXTERNALLY-MANAGED").write <<~INI + [externally-managed] + Error=To install Python packages system-wide, try brew install + xyz, where xyz is the package you are trying to + install. + + If you wish to install a Python library that isn't in Homebrew, + use a virtual environment: + + #{python3.basename} -m venv path/to/venv + source path/to/venv/bin/activate + #{python3.basename} -m pip install xyz + + If you wish to install a Python application that isn't in Homebrew, + it may be easiest to use 'pipx install xyz', which will manage a + virtual environment for you. You can install pipx with + + brew install pipx + + You may restore the old behavior of pip by passing + the '--break-system-packages' flag to pip, or by adding + 'break-system-packages = true' to your pip.conf file. The latter + will permanently disable this error. + + If you disable this error, we STRONGLY recommend that you additionally + pass the '--user' flag to pip, or set 'user = true' in your pip.conf + file. Failure to do this can result in a broken Homebrew installation. + + Read more about this behavior here: + INI + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}t/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/(?:[0-9\\._abrc]+/Frameworks/PythonT\\.framework/Versions/#{version.major_minor}/)?lib/python#{version.major_minor}t/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}t' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_prefix) + site.PREFIXES[:] = [new_prefix if x == sys.base_prefix else x for x in site.PREFIXES] + if sys.prefix == sys.base_prefix: + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_exec_prefix) + site.PREFIXES[:] = [new_exec_prefix if x == sys.base_exec_prefix else x for x in site.PREFIXES] + if sys.exec_prefix == sys.base_exec_prefix: + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Make site.getsitepackages() return the HOMEBREW_PREFIX site-packages, + # but only if we are outside a venv or in one with include-system-site-packages. + if sys.base_prefix in site.PREFIXES: + site.PREFIXES.insert(site.PREFIXES.index(sys.base_prefix), '#{HOMEBREW_PREFIX}') + site.addsitedir('#{site_packages}') + PYTHON + end + + def caveats + <<~EOS + Python has been installed as + #{HOMEBREW_PREFIX}/bin/#{python3.basename} + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import pyexpat" + system python3, "-c", "import readline" + system python3, "-c", "import zlib" + system python3, "-c", "import _zstd" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # gdbm is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import _gdbm' 2>&1", 1) + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import dbm.gnu' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}t", "list", "--format=columns" + + # Verify our sysconfig patches + sysconfig_path = "import sysconfig; print(sysconfig.get_paths(\"osx_framework_library\")[\"data\"])" + assert_equal HOMEBREW_PREFIX.to_s, shell_output("#{python3} -c '#{sysconfig_path}'").strip + linkforshared_var = "import sysconfig; print(sysconfig.get_config_var(\"LINKFORSHARED\"))" + assert_match opt_prefix.to_s, shell_output("#{python3} -c '#{linkforshared_var}'") if OS.mac? + + # Check our externally managed marker + assert_match "If you wish to install a Python library", + shell_output("#{python3} -m pip install pip 2>&1", 1) + assert_equal "False", shell_output("#{python3} -c 'import sys; print(sys._is_gil_enabled())'").chomp + end +end diff --git a/Formula/p/python-gdbm@3.11.rb b/Formula/p/python-gdbm@3.11.rb new file mode 100644 index 0000000000000..facb0bc4bcfd7 --- /dev/null +++ b/Formula/p/python-gdbm@3.11.rb @@ -0,0 +1,61 @@ +class PythonGdbmAT311 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tgz" + sha256 "563d2a1b2a5ba5d5409b5ecd05a0e1bf9b028cf3e6a6f0c87a5dc8dc3f2d9182" + license "Python-2.0" + + livecheck do + formula "python@3.11" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "77a0d87ce12ea5c7ada880e9b920ce774e7925d5d08b7d0d328b34d9d403bcf1" + sha256 cellar: :any, arm64_sequoia: "f78d34a36e3f0c0a68a52bdd65f4ba15e55281d5250cbe7a888fb841015cfcf8" + sha256 cellar: :any, arm64_sonoma: "72dde9c046252b6fb30ed3b7cac5fa80a77cbc7d07d8554add636e75b5531019" + sha256 cellar: :any, sonoma: "bfe4be40a89acd2419a36feefc5a4da7eb638996d190bb2f9e2d0b88d3a6cbf0" + sha256 arm64_linux: "10ccef03b65856bae55760a4199c3e0820b1a85a73a96a88e78170a639cdac2b" + sha256 x86_64_linux: "7371952f40a62c0552c00adbc5455d30737d9319e040718fc913bf727e34d0bd" + end + + depends_on "gdbm" + depends_on "python@3.11" + + def python3 + "python3.11" + end + + def install + cd "Modules" do + (Pathname.pwd/"setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="gdbm", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_gdbm", ["_gdbmmodule.c"], + include_dirs=["#{Formula["gdbm"].opt_include}"], + libraries=["gdbm"], + library_dirs=["#{Formula["gdbm"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false), "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + testdb = testpath/"test.db" + system python3, "-c", <<~PYTHON + import dbm.gnu + + with dbm.gnu.open("#{testdb}", "n") as db: + db["testkey"] = "testvalue" + + with dbm.gnu.open("#{testdb}", "r") as db: + assert db["testkey"] == b"testvalue" + PYTHON + end +end diff --git a/Formula/p/python-gdbm@3.12.rb b/Formula/p/python-gdbm@3.12.rb new file mode 100644 index 0000000000000..fcf828936f69a --- /dev/null +++ b/Formula/p/python-gdbm@3.12.rb @@ -0,0 +1,69 @@ +class PythonGdbmAT312 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz" + sha256 "487c908ddf4097a1b9ba859f25fe46d22ccaabfb335880faac305ac62bffb79b" + license "Python-2.0" + + livecheck do + formula "python@3.12" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "68ed9a1c7a748ca1d8607f33f021fbbe6d2ec0fb7d623dcf8c0787ae4d833faa" + sha256 cellar: :any, arm64_sequoia: "74c09bb14030cc7696dad2824882577a27b215800d68c7ff815371babed645cb" + sha256 cellar: :any, arm64_sonoma: "21054c1db4cc70b382615b2be938b9a56551b33cb5d3d82c5f95e99ea9118800" + sha256 cellar: :any, sonoma: "071b93500396e9746c8d3567d8763a8446eb288e0b3b61aa5e9c8e897e44af9b" + sha256 arm64_linux: "33020fd29f43c0ff62d9f8c739761d748ad2e2fdc3651c7cb20f7bc5e51b5f23" + sha256 x86_64_linux: "fe17b63305c292568db10752614ff14042c37fd6a42b99d559ccb8a903876bf9" + end + + depends_on "gdbm" + depends_on "python@3.12" + + def python3 + "python3.12" + end + + def install + xy = Language::Python.major_minor_version python3 + python_include = if OS.mac? + Formula["python@#{xy}"].opt_frameworks/"Python.framework/Versions/#{xy}/include/python#{xy}" + else + Formula["python@#{xy}"].opt_include/"python#{xy}" + end + + cd "Modules" do + (Pathname.pwd/"setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="gdbm", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_gdbm", ["_gdbmmodule.c"], + include_dirs=["#{Formula["gdbm"].opt_include}", "#{python_include}/internal"], + libraries=["gdbm"], + library_dirs=["#{Formula["gdbm"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false, build_isolation: true), + "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + testdb = testpath/"test.db" + system python3, "-c", <<~PYTHON + import dbm.gnu + + with dbm.gnu.open("#{testdb}", "n") as db: + db["testkey"] = "testvalue" + + with dbm.gnu.open("#{testdb}", "r") as db: + assert db["testkey"] == b"testvalue" + PYTHON + end +end diff --git a/Formula/p/python-gdbm@3.13.rb b/Formula/p/python-gdbm@3.13.rb new file mode 100644 index 0000000000000..7c53a4b3da05b --- /dev/null +++ b/Formula/p/python-gdbm@3.13.rb @@ -0,0 +1,69 @@ +class PythonGdbmAT313 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tgz" + sha256 "c4c066af19c98fb7835d473bebd7e23be84f6e9874d47db9e39a68ee5d0ce35c" + license "Python-2.0" + + livecheck do + formula "python@3.13" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "07dde29f754d6a8a19c2e66b0b3611840b9c192f0c94bf4abd6e13904b01e874" + sha256 cellar: :any, arm64_sequoia: "d935a57318702874da1c2d9e5a2ba0517242088b2bd11190f076197519699202" + sha256 cellar: :any, arm64_sonoma: "e61ffe279515ea69c625c5107377d5f5e077e8b951c80a373e48b2fc0dba37bf" + sha256 cellar: :any, sonoma: "2124224056904b88155916523c49778df001b9677291a8204b5aa48bd22d4cec" + sha256 arm64_linux: "721ef1ed0e9d199e190c5fcc6472a18a35feb6d90c2f5b3fb462331f2e63404d" + sha256 x86_64_linux: "bbb1fe6059430f4f778fae3fab0152c9ff47b06f5ca7335763c3e081e9934d68" + end + + depends_on "gdbm" + depends_on "python@3.13" + + def python3 + "python3.13" + end + + def install + xy = Language::Python.major_minor_version python3 + python_include = if OS.mac? + Formula["python@#{xy}"].opt_frameworks/"Python.framework/Versions/#{xy}/include/python#{xy}" + else + Formula["python@#{xy}"].opt_include/"python#{xy}" + end + + cd "Modules" do + (Pathname.pwd/"setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="gdbm", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_gdbm", ["_gdbmmodule.c"], + include_dirs=["#{Formula["gdbm"].opt_include}", "#{python_include}/internal"], + libraries=["gdbm"], + library_dirs=["#{Formula["gdbm"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false, build_isolation: true), + "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + testdb = testpath/"test.db" + system python3, "-c", <<~PYTHON + import dbm.gnu + + with dbm.gnu.open("#{testdb}", "n") as db: + db["testkey"] = "testvalue" + + with dbm.gnu.open("#{testdb}", "r") as db: + assert db["testkey"] == b"testvalue" + PYTHON + end +end diff --git a/Formula/p/python-gdbm@3.14.rb b/Formula/p/python-gdbm@3.14.rb new file mode 100644 index 0000000000000..11efaf002c661 --- /dev/null +++ b/Formula/p/python-gdbm@3.14.rb @@ -0,0 +1,69 @@ +class PythonGdbmAT314 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz" + sha256 "88d2da4eed42fa9a5f42ff58a8bc8988881bd6c547e297e46682c2687638a851" + license "Python-2.0" + + livecheck do + formula "python@3.14" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8381106cc45125d87bbc5f1f40f984b3875b42b0281d37913f541d6f6335d7d8" + sha256 cellar: :any, arm64_sequoia: "609ec5c041cab8d6ea4f46cca01272ddf3e1c307b09b0f3c3974cd1eb05e326f" + sha256 cellar: :any, arm64_sonoma: "a6499f73f34d8f346df65daa50da033a33583381795743599c4cb797c0816a81" + sha256 cellar: :any, sonoma: "dec0a6beebde2002d41e0a313dea1e428ed04eba37b21426ad9860dc92ae1f1f" + sha256 arm64_linux: "a26ddde4afa8c96a1fb3e00a7ff3e041992021fc043f189f56c07e90062e4b5d" + sha256 x86_64_linux: "4f19f6e8cbe5644b8201502069e8a43138fd9ad180115a5705b75cebb7bf33ea" + end + + depends_on "gdbm" + depends_on "python@3.14" + + def python3 + "python3.14" + end + + def install + xy = Language::Python.major_minor_version python3 + python_include = if OS.mac? + Formula["python@#{xy}"].opt_frameworks/"Python.framework/Versions/#{xy}/include/python#{xy}" + else + Formula["python@#{xy}"].opt_include/"python#{xy}" + end + + cd "Modules" do + (Pathname.pwd/"setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="gdbm", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_gdbm", ["_gdbmmodule.c"], + include_dirs=["#{Formula["gdbm"].opt_include}", "#{python_include}/internal"], + libraries=["gdbm"], + library_dirs=["#{Formula["gdbm"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false, build_isolation: true), + "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + testdb = testpath/"test.db" + system python3, "-c", <<~PYTHON + import dbm.gnu + + with dbm.gnu.open("#{testdb}", "n") as db: + db["testkey"] = "testvalue" + + with dbm.gnu.open("#{testdb}", "r") as db: + assert db["testkey"] == b"testvalue" + PYTHON + end +end diff --git a/Formula/p/python-launcher.rb b/Formula/p/python-launcher.rb new file mode 100644 index 0000000000000..accd8dc162e88 --- /dev/null +++ b/Formula/p/python-launcher.rb @@ -0,0 +1,38 @@ +class PythonLauncher < Formula + desc "Launch your Python interpreter the lazy/smart way" + homepage "https://github.com/brettcannon/python-launcher" + url "https://github.com/brettcannon/python-launcher/archive/refs/tags/v1.0.1.tar.gz" + sha256 "6f868da0217b74e05775e7ebcbec4779ce12956728397ea57fd59c8529c56b6d" + license "MIT" + head "https://github.com/brettcannon/python-launcher.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d27061039235be846906ba326bd45b8f80aeb0141be76073b509711d3fe28cb3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3af917b0de67e1c9922fe684b03a9097297591db60a7991b8b7229851180f548" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0146c61c87ead63c9c650d43e12d5050001109ff75d9a7f410cd747c36a484bc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0f3708b110318c5c3596eb21ecd45390921eac40ae0201fcd262fdb476d9c744" + sha256 cellar: :any_skip_relocation, arm64_monterey: "09f64d96d2ebb83f2c9520ed535a77b8a3e4095f9a6c216de53553357242fee0" + sha256 cellar: :any_skip_relocation, sonoma: "04dae312adf70a9df94f79210ccf241013f58ce4aadf6cc29951c03cc16957b5" + sha256 cellar: :any_skip_relocation, ventura: "6b82f0178b46f14118b120598178b823812db7caecdf91b4e8822a4b8f143227" + sha256 cellar: :any_skip_relocation, monterey: "a3b9e42353ee19f5354a4e8f6b19c941926977398f021261b5cc3c11aa28d8d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a6564958fb0d3fa22689e1806b8dfdb86b25f0d243b6eb6e3a3b513c4a7eb87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "252b4ae87c81431c5f8929f9c41922224856ac40aaf928e2c7874ff5400acf3b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + man1.install "man-page/py.1" + fish_completion.install "completions/py.fish" + end + + test do + binary = testpath/"python3.6" + binary.write("Fake Python 3.6 executable") + with_env("PATH" => testpath) do + assert_match("3.6 │ #{binary}", shell_output("#{bin}/py --list")) + end + end +end diff --git a/Formula/p/python-lsp-server.rb b/Formula/p/python-lsp-server.rb new file mode 100644 index 0000000000000..203ff1e1028ce --- /dev/null +++ b/Formula/p/python-lsp-server.rb @@ -0,0 +1,197 @@ +class PythonLspServer < Formula + include Language::Python::Virtualenv + + desc "Python Language Server for the Language Server Protocol" + homepage "https://github.com/python-lsp/python-lsp-server" + url "https://files.pythonhosted.org/packages/ca/92/bd60cbe7d7d6c90e5e556a90497aa1892a3f779d9915026eca6e37a0b59b/python_lsp_server-1.13.1.tar.gz" + sha256 "bfa3d6bbca3fc3e6d0137b27cd1eabee65783a8d4314c36e1e230c603419afa3" + license "MIT" + head "https://github.com/python-lsp/python-lsp-server.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e9337645a5771b3c8c62698d507924e8791c6c7690d01ee9dbe12a7cd386967b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "85adffdb135376325ffba9af8ca44ef2a1f41aa6ead732b5b4008d641ede3202" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "12c95e360da7495204359bcb698459d9dd2108036bea2fdc364b023b4b5c8d60" + sha256 cellar: :any_skip_relocation, sonoma: "399cf95cbfd5c0063fe802edcf5caff51108f02c5091ec1274c9c74846052185" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ae863f8e3d5cd313f3f34f2afde24ca060389f10a1463daab520ff00ccbcfb7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e9e917e6a8595522110cae4532abc8f144cfc964e56a99cb51172585eb2369e" + end + + depends_on "rust" => :build + depends_on "python@3.14" + + pypi_packages package_name: "python-lsp-server[websockets]", + extra_packages: %w[python-lsp-black pylsp-mypy python-lsp-ruff pylsp-rope] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "black" do + url "https://files.pythonhosted.org/packages/4b/43/20b5c90612d7bdb2bdbcceeb53d588acca3bb8f0e4c5d5c751a2c8fdd55a/black-25.9.0.tar.gz" + sha256 "0474bca9a0dd1b51791fcc507a4e02078a1c63f6d4e4ae5544b9848c7adfb619" + end + + resource "cattrs" do + url "https://files.pythonhosted.org/packages/6e/00/2432bb2d445b39b5407f0a90e01b9a271475eea7caf913d7a86bcb956385/cattrs-25.3.0.tar.gz" + sha256 "1ac88d9e5eda10436c4517e390a4142d88638fe682c436c93db7ce4a277b884a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "docstring-to-markdown" do + url "https://files.pythonhosted.org/packages/52/d8/8abe80d62c5dce1075578031bcfde07e735bcf0afe2886dd48b470162ab4/docstring_to_markdown-0.17.tar.gz" + sha256 "df72a112294c7492487c9da2451cae0faeee06e86008245c188c5761c9590ca3" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "jedi" do + url "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz" + sha256 "4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0" + end + + resource "lsprotocol" do + url "https://files.pythonhosted.org/packages/e9/26/67b84e6ec1402f0e6764ef3d2a0aaf9a79522cc1d37738f4e5bb0b21521a/lsprotocol-2025.0.0.tar.gz" + sha256 "e879da2b9301e82cfc3e60d805630487ac2f7ab17492f4f5ba5aaba94fe56c29" + end + + resource "mypy" do + url "https://files.pythonhosted.org/packages/c0/77/8f0d0001ffad290cef2f7f216f96c814866248a0b92a722365ed54648e7e/mypy-1.18.2.tar.gz" + sha256 "06a398102a5f203d7477b2923dda3634c36727fa5c237d8f859ef90c42a9924b" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "parso" do + url "https://files.pythonhosted.org/packages/d4/de/53e0bcf53d13e005bd8c92e7855142494f41171b34c2536b86187474184d/parso-0.8.5.tar.gz" + sha256 "034d7354a9a018bdce352f48b2a8a450f05e9d6ee85db84764e9b6bd96dafe5a" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pylsp-mypy" do + url "https://files.pythonhosted.org/packages/e9/4d/9683a57f2e8b9263910ef497a99d88622f4fb1c158decb867fd40a41bfdd/pylsp_mypy-0.7.0.tar.gz" + sha256 "e94f531d4ce523222c2af7471abe396cfeb4cc3c4b181d54462fb6d553e1e0b3" + end + + resource "pylsp-rope" do + url "https://files.pythonhosted.org/packages/51/3d/cfcf7e093c98cccadbccdc8762194cd3afaa4d8aac6731ced5bea92489cb/pylsp_rope-0.1.17.tar.gz" + sha256 "4cd6f2fb32c84302b94cb4ce002bc0700b1b656dd5147e7db3dd92303a9a8dc2" + end + + resource "python-lsp-black" do + url "https://files.pythonhosted.org/packages/c0/48/06edc947f711fb076b564ee97bbecb5ae877816ccc0edf4347f57cd9d6b9/python-lsp-black-2.0.0.tar.gz" + sha256 "8286d2d310c566844b3c116b824ada6fccfa6ba228b1a09a0526b74c04e0805f" + end + + resource "python-lsp-jsonrpc" do + url "https://files.pythonhosted.org/packages/48/b6/fd92e2ea4635d88966bb42c20198df1a981340f07843b5e3c6694ba3557b/python-lsp-jsonrpc-1.1.2.tar.gz" + sha256 "4688e453eef55cd952bff762c705cedefa12055c0aec17a06f595bcc002cc912" + end + + resource "python-lsp-ruff" do + url "https://files.pythonhosted.org/packages/af/79/2f6322c47bd2956447e0a6787084b4110b4473e3d2501b86aa47c802e6a0/python_lsp_ruff-2.3.0.tar.gz" + sha256 "647745b7f3010ac101e3c53a797b8f9deb1f52228b608d70ad0e8e056978c3b7" + end + + resource "pytokens" do + url "https://files.pythonhosted.org/packages/30/5f/e959a442435e24f6fb5a01aec6c657079ceaca1b3baf18561c3728d681da/pytokens-0.1.10.tar.gz" + sha256 "c9a4bfa0be1d26aebce03e6884ba454e842f186a59ea43a6d3b25af58223c044" + end + + resource "pytoolconfig" do + url "https://files.pythonhosted.org/packages/18/dc/abf70d2c2bcac20e8c71a7cdf6d44e4ddba4edf65acb179248d554d743db/pytoolconfig-1.3.1.tar.gz" + sha256 "51e6bd1a6f108238ae6aab6a65e5eed5e75d456be1c2bf29b04e5c1e7d7adbae" + end + + resource "rope" do + url "https://files.pythonhosted.org/packages/74/3a/85e60d154f26ecdc1d47a63ac58bd9f32a5a9f3f771f6672197f02a00ade/rope-1.14.0.tar.gz" + sha256 "8803e3b667315044f6270b0c69a10c0679f9f322ed8efe6245a93ceb7658da69" + end + + resource "ruff" do + url "https://files.pythonhosted.org/packages/41/b9/9bd84453ed6dd04688de9b3f3a4146a1698e8faae2ceeccce4e14c67ae17/ruff-0.14.0.tar.gz" + sha256 "62ec8969b7510f77945df916de15da55311fade8d6050995ff7f680afe582c57" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "ujson" do + url "https://files.pythonhosted.org/packages/43/d9/3f17e3c5773fb4941c68d9a37a47b1a79c9649d6c56aefbed87cc409d18a/ujson-5.11.0.tar.gz" + sha256 "e204ae6f909f099ba6b6b942131cee359ddda2b6e4ea39c12eb8b991fe2010e0" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + virtualenv_install_with_resources + end + + test do + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output("#{bin}/pylsp -v 2>&1", input) + assert_match(/^Content-Length: \d+/i, output) + + expected_plugins = %w[ + black + pylsp_mypy + pylsp_rope + ruff + ] + expected_plugins.each do |plugin_name| + assert_match("Loaded pylsp plugin #{plugin_name}", output) + end + end +end diff --git a/Formula/p/python-markdown.rb b/Formula/p/python-markdown.rb new file mode 100644 index 0000000000000..9e8810688e3c9 --- /dev/null +++ b/Formula/p/python-markdown.rb @@ -0,0 +1,25 @@ +class PythonMarkdown < Formula + include Language::Python::Virtualenv + + desc "Python implementation of Markdown" + homepage "https://python-markdown.github.io" + url "https://files.pythonhosted.org/packages/7d/ab/7dd27d9d863b3376fcf23a5a13cb5d024aed1db46f963f1b5735ae43b3be/markdown-3.10.tar.gz" + sha256 "37062d4f2aa4b2b6b32aefb80faa300f82cc790cb949a35b8caede34f2b68c0e" + license "BSD-3-Clause" + head "https://github.com/Python-Markdown/markdown.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5291a0c598bff1e71842309bb62b509c6094369b8a82e131afe51cf3e3273526" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.md").write("# Hello World!") + assert_equal "

Hello World!

", shell_output("#{bin}/markdown_py test.md").strip + end +end diff --git a/Formula/p/python-matplotlib.rb b/Formula/p/python-matplotlib.rb new file mode 100644 index 0000000000000..301df5eb23373 --- /dev/null +++ b/Formula/p/python-matplotlib.rb @@ -0,0 +1,95 @@ +class PythonMatplotlib < Formula + include Language::Python::Virtualenv + + desc "Python library for creating static, animated, and interactive visualizations" + homepage "https://matplotlib.org/" + url "https://files.pythonhosted.org/packages/ae/e2/d2d5295be2f44c678ebaf3544ba32d20c1f9ef08c49fe47f496180e1db15/matplotlib-3.10.7.tar.gz" + sha256 "a06ba7e2a2ef9131c79c49e63dad355d2d878413a0376c1727c8b9335ff731c7" + license "PSF-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ef681c9b01992ddd9c51dacd5e0ac459bc33e6a28b05e5c66402891dfd89869b" + sha256 cellar: :any, arm64_sequoia: "9fbc1b0f4d473080a3b9459ecb016e5325689d348b11a0733f537ed864815c1e" + sha256 cellar: :any, arm64_sonoma: "6f226ce14460cc7061fec37fbc7631a64da8ceeac5df9eb651ad44f6046c716e" + sha256 cellar: :any, sonoma: "ba6f871691012ee1559a1c27a2b573f0e0bec4c9354f061e3b37eeccd061d756" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac62fe8d76734bdfce67c2a83c4fc88a40e9c3251143adb8ac400952bf9bcf84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93a4966b98ee3ea44019ef4ff132d0aebb8f8bca6aebe2a0f7c8dcb5836ec37f" + end + + depends_on "cmake" => :build # for contourpy + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "numpy" + depends_on "pillow" => :no_linkage + depends_on "python@3.14" + depends_on "qhull" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[numpy pillow] + + resource "contourpy" do + url "https://files.pythonhosted.org/packages/58/01/1253e6698a07380cd31a736d248a3f2a50a7c88779a1813da27503cadc2a/contourpy-1.3.3.tar.gz" + sha256 "083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880" + end + + resource "cycler" do + url "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz" + sha256 "88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c" + end + + resource "fonttools" do + url "https://files.pythonhosted.org/packages/4b/42/97a13e47a1e51a5a7142475bbcf5107fe3a68fc34aef331c897d5fb98ad0/fonttools-4.60.1.tar.gz" + sha256 "ef00af0439ebfee806b25f24c8f92109157ff3fac5731dc7867957812e87b8d9" + end + + resource "kiwisolver" do + url "https://files.pythonhosted.org/packages/5c/3c/85844f1b0feb11ee581ac23fe5fce65cd049a200c1446708cc1b7f922875/kiwisolver-1.4.9.tar.gz" + sha256 "c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def python3 + which("python3.14") + end + + def install + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + system python3, "-m", "pip", "--python=#{venv.root}", "install", + "--config-settings=setup-args=-Dsystem-freetype=true", + "--config-settings=setup-args=-Dsystem-qhull=true", + *std_pip_args(prefix: false, build_isolation: true), "." + + (prefix/Language::Python.site_packages(python3)/"homebrew-matplotlib.pth").write venv.site_packages + end + + test do + backend = shell_output("#{python3} -c 'import matplotlib; print(matplotlib.get_backend())'").chomp + assert_equal OS.mac? ? "macosx" : "agg", backend + end +end diff --git a/Formula/p/python-packaging.rb b/Formula/p/python-packaging.rb new file mode 100644 index 0000000000000..6f192dfdb4be6 --- /dev/null +++ b/Formula/p/python-packaging.rb @@ -0,0 +1,35 @@ +# This is an exception to Homebrew policy on Python libraries. See: +# https://github.com/Homebrew/homebrew-core/issues/167905#issuecomment-2328118401 +class PythonPackaging < Formula + desc "Core utilities for Python packages" + homepage "https://packaging.pypa.io/" + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + license any_of: ["Apache-2.0", "BSD-2-Clause"] + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "13de227e0e4d6219e076c15a8b240ba79d873abe90bc7e3fdd7537065bef3340" + end + + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python| + system python, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + end + + test do + pythons.each do |python| + system python, "-c", "import packaging" + end + end +end diff --git a/Formula/p/python-setuptools.rb b/Formula/p/python-setuptools.rb new file mode 100644 index 0000000000000..844005526757d --- /dev/null +++ b/Formula/p/python-setuptools.rb @@ -0,0 +1,57 @@ +class PythonSetuptools < Formula + desc "Easily download, build, install, upgrade, and uninstall Python packages" + homepage "https://setuptools.pypa.io/" + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3f1216774825c551075a7a28ca8c7412e56ddb635f495275e5c231801d3a5abd" + end + + depends_on "python@3.14" => [:build, :test] + depends_on "python@3.12" => :test # keep on oldest python to support (externally managed and not EOL) + + def pythons + deps.filter_map { |dep| dep.to_formula if dep.name.start_with?("python@") } + end + + def install + odie "Need exactly 2 python dependencies!" if pythons.count != 2 + oldest_python, python = pythons.sort_by(&:version) + python_exe = python.opt_libexec/"bin/python" + system python_exe, "-m", "pip", "install", *std_pip_args, "." + + # Pure python setuptools installation can be used on different Python versions + site_packages = prefix/Language::Python.site_packages(python_exe) + python.versioned_formulae.each do |extra_python| + next if extra_python.version < oldest_python.version + + # Cannot use Python.site_packages as that requires formula to be installed + extra_site_packages = lib/"python#{extra_python.version.major_minor}/site-packages" + site_packages.find do |path| + next unless path.file? + + target = extra_site_packages/path.relative_path_from(site_packages) + target.dirname.install_symlink path + end + end + + # Ensure uniform bottles + setuptools_site_packages = site_packages/"setuptools" + inreplace_files = %W[ + #{setuptools_site_packages}/_distutils/compilers/C/unix.py + #{setuptools_site_packages}/_vendor/platformdirs/unix.py + ] + setuptools_site_packages.glob("_vendor/platformdirs-*dist-info/METADATA") + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX + inreplace setuptools_site_packages/"_vendor/platformdirs/macos.py", "/opt/homebrew", HOMEBREW_PREFIX + end + + test do + pythons.each do |python| + system python.opt_libexec/"bin/python", "-c", "import setuptools" + end + end +end diff --git a/Formula/p/python-tabulate.rb b/Formula/p/python-tabulate.rb new file mode 100644 index 0000000000000..043ba7daa8733 --- /dev/null +++ b/Formula/p/python-tabulate.rb @@ -0,0 +1,41 @@ +class PythonTabulate < Formula + include Language::Python::Virtualenv + + desc "Pretty-print tabular data in Python" + homepage "https://github.com/astanin/python-tabulate" + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + license "MIT" + revision 1 + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, all: "bf04dabaefe13b12d6ee7fc435aab9e87fb25473a0ec5e0adb9afcf516243cc7" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"in.txt").write <<~EOS + name qty + eggs 451 + spam 42 + EOS + + (testpath/"out.txt").write <<~EOS + +------+-----+ + | name | qty | + +------+-----+ + | eggs | 451 | + +------+-----+ + | spam | 42 | + +------+-----+ + EOS + + assert_equal (testpath/"out.txt").read, shell_output("#{bin}/tabulate -f grid #{testpath}/in.txt") + end +end diff --git a/Formula/p/python-tk@3.10.rb b/Formula/p/python-tk@3.10.rb new file mode 100644 index 0000000000000..421cc9c2a84fc --- /dev/null +++ b/Formula/p/python-tk@3.10.rb @@ -0,0 +1,61 @@ +class PythonTkAT310 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.10.19/Python-3.10.19.tgz" + sha256 "a078fb2d7a216071ebbe2e34b5f5355dd6b6e9b0cd1bacc4a41c63990c5a0eec" + license "Python-2.0" + + livecheck do + formula "python@3.10" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "2ba7645c83ffe837d1310a83f08cb920dc8eb3884bfa2f62f66a434746dc9e91" + sha256 cellar: :any, arm64_sequoia: "014bf0672e61b43b3c9c42b777d642c485ce637a8700272ca088c659dae5b190" + sha256 cellar: :any, arm64_sonoma: "4279255fcae24b936d68a3bb10e42b2e34fe8a4fc37646d2ad1289d083864d15" + sha256 cellar: :any, sonoma: "c33e7e0f2f9159ef4facf7882105e15334195ea75d6b7778d33be6541b8d09c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea2a876610f29fafaed5f569d5d8f28eb560687f204d88fddf152fa30cd548b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c8d7cc10aa2657beb4b197992c97ed9eb3b7a1252317bda2cfc24783d12d7b2" + end + + keg_only :versioned_formula + + depends_on "python@3.10" + depends_on "tcl-tk@8" + + def python3 + "python3.10" + end + + def install + cd "Modules" do + tcltk = Formula["tcl-tk@8"] + tcltk_version = tcltk.any_installed_version.major_minor + Pathname("setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="tkinter", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_tkinter", ["_tkinter.c", "tkappinit.c"], + define_macros=[("WITH_APPINIT", 1)], + include_dirs=["#{tcltk.opt_include/"tcl-tk"}"], + libraries=["tcl#{tcltk_version}", "tk#{tcltk_version}"], + library_dirs=["#{tcltk.opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false), "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + system python3, "-c", "import tkinter" + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", "import tkinter; root = tkinter.Tk()" + end +end diff --git a/Formula/p/python-tk@3.11.rb b/Formula/p/python-tk@3.11.rb new file mode 100644 index 0000000000000..77ded49f7727d --- /dev/null +++ b/Formula/p/python-tk@3.11.rb @@ -0,0 +1,59 @@ +class PythonTkAT311 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tgz" + sha256 "563d2a1b2a5ba5d5409b5ecd05a0e1bf9b028cf3e6a6f0c87a5dc8dc3f2d9182" + license "Python-2.0" + + livecheck do + formula "python@3.11" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b54423a812944469eb095929f91b851e2b0bd95d0c0220a911f377afddb78bf3" + sha256 cellar: :any, arm64_sequoia: "6a0ce386d5b3e473fe149dfff86c75731c66aa1789d2b59a60859ce09dc2a438" + sha256 cellar: :any, arm64_sonoma: "a93945fa0b4fb66aad07521b8990f5d57a942445586c4cc5b298b35fce1d25d8" + sha256 cellar: :any, sonoma: "86057239dd2e50c6b833fb17ab12c95906137ae3681f2c6846980217910ec306" + sha256 cellar: :any_skip_relocation, arm64_linux: "edd82a83b1ef25840c2f2eb963ae126191331019894d70ae858e01195cf44415" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ebb3928e752f424202fdbaff87a3aca61e6b19943224dbca7178c87d942ff2d" + end + + depends_on "python@3.11" + depends_on "tcl-tk@8" + + def python3 + "python3.11" + end + + def install + cd "Modules" do + tcltk = Formula["tcl-tk@8"] + tcltk_version = tcltk.any_installed_version.major_minor + Pathname("setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="tkinter", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_tkinter", ["_tkinter.c", "tkappinit.c"], + define_macros=[("WITH_APPINIT", 1)], + include_dirs=["#{tcltk.opt_include/"tcl-tk"}"], + libraries=["tcl#{tcltk_version}", "tk#{tcltk_version}"], + library_dirs=["#{tcltk.opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false), "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + system python3, "-c", "import tkinter" + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", "import tkinter; root = tkinter.Tk()" + end +end diff --git a/Formula/p/python-tk@3.12.rb b/Formula/p/python-tk@3.12.rb new file mode 100644 index 0000000000000..29342e536adb4 --- /dev/null +++ b/Formula/p/python-tk@3.12.rb @@ -0,0 +1,122 @@ +class PythonTkAT312 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz" + sha256 "487c908ddf4097a1b9ba859f25fe46d22ccaabfb335880faac305ac62bffb79b" + license "Python-2.0" + + livecheck do + formula "python@3.12" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0bb29270b8431e329c47c5792052734d098c5417cd27384120517c45ab54be3d" + sha256 cellar: :any, arm64_sequoia: "91dda177cf121807c4946d97620390a9e79c7420989f72cdabdf8bc0633fc630" + sha256 cellar: :any, arm64_sonoma: "63757c0e73baccb662009dc46f2fbc1c96b29e1767c2b0a65dfd45c3f14d8ed9" + sha256 cellar: :any, sonoma: "633a835577f718b53bc04f6c73e34953f3c68a5fbcbe120a1b994a3bbd4b3072" + sha256 arm64_linux: "f03ae64ee303bb60f73b73041185f0bfdae857eba3d27735cede970bc4f34164" + sha256 x86_64_linux: "79e4b1ea5ac92d35c3152a75b9cce0ce4be5f25e103edf514311146230103b94" + end + + depends_on "python@3.12" + depends_on "tcl-tk" + + def python3 + "python3.12" + end + + # Apply commit from open PR to fix TCL 9 threaded detection + # PR ref: https://github.com/python/cpython/pull/128103 + patch do + url "https://github.com/python/cpython/commit/a2019e226e4650cef35ebfde7ecd7ce044a4a670.patch?full_index=1" + sha256 "03c4b6a293d4a51f534858657717bdc1465c42acb3b78e64c41f9011f966e449" + end + + # Backport of https://github.com/python/cpython/commit/47cbf038850852cdcbe7a404ed7c64542340d58a + # TODO: Remove if https://github.com/python/cpython/pull/124156 is backported to Python 3.12 + patch :DATA + + def install + xy = Language::Python.major_minor_version python3 + python_include = if OS.mac? + Formula["python@#{xy}"].opt_frameworks/"Python.framework/Versions/#{xy}/include/python#{xy}" + else + Formula["python@#{xy}"].opt_include/"python#{xy}" + end + + cd "Modules" do + tcltk_version = Formula["tcl-tk"].any_installed_version.major_minor + Pathname("setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="tkinter", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_tkinter", ["_tkinter.c", "tkappinit.c"], + define_macros=[("WITH_APPINIT", 1), ("TCL_WITH_EXTERNAL_TOMMATH", 1)], + include_dirs=["#{python_include}/internal", "#{Formula["tcl-tk"].opt_include/"tcl-tk"}"], + libraries=["tcl#{tcltk_version}", "tcl#{tcltk_version.major}tk#{tcltk_version}"], + library_dirs=["#{Formula["tcl-tk"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false, build_isolation: true), + "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + system python3, "-c", "import tkinter" + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", "import tkinter; root = tkinter.Tk()" + end +end + +__END__ +diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py +index 073b3ae20797c3..8ddb7f97e3b233 100644 +--- a/Lib/tkinter/ttk.py ++++ b/Lib/tkinter/ttk.py +@@ -321,6 +321,8 @@ def _tclobj_to_py(val): + elif hasattr(val, 'typename'): # some other (single) Tcl object + val = _convert_stringval(val) + ++ if isinstance(val, tuple) and len(val) == 0: ++ return '' + return val + + def tclobjs_to_py(adict): +diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c +index b0b70ccb8cc3d3..45897817a56051 100644 +--- a/Modules/_tkinter.c ++++ b/Modules/_tkinter.c +@@ -325,6 +325,7 @@ typedef struct { + const Tcl_ObjType *ListType; + const Tcl_ObjType *StringType; + const Tcl_ObjType *UTF32StringType; ++ const Tcl_ObjType *PixelType; + } TkappObject; + + #define Tkapp_Interp(v) (((TkappObject *) (v))->interp) +@@ -637,6 +638,7 @@ Tkapp_New(const char *screenName, const char *className, + v->ListType = Tcl_GetObjType("list"); + v->StringType = Tcl_GetObjType("string"); + v->UTF32StringType = Tcl_GetObjType("utf32string"); ++ v->PixelType = Tcl_GetObjType("pixel"); + + /* Delete the 'exit' command, which can screw things up */ + Tcl_DeleteCommand(v->interp, "exit"); +@@ -1236,7 +1238,8 @@ FromObj(TkappObject *tkapp, Tcl_Obj *value) + } + + if (value->typePtr == tkapp->StringType || +- value->typePtr == tkapp->UTF32StringType) ++ value->typePtr == tkapp->UTF32StringType || ++ value->typePtr == tkapp->PixelType) + { + return unicodeFromTclObj(tkapp, value); + } diff --git a/Formula/p/python-tk@3.13.rb b/Formula/p/python-tk@3.13.rb new file mode 100644 index 0000000000000..3f8c1d8dfa059 --- /dev/null +++ b/Formula/p/python-tk@3.13.rb @@ -0,0 +1,122 @@ +class PythonTkAT313 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tgz" + sha256 "c4c066af19c98fb7835d473bebd7e23be84f6e9874d47db9e39a68ee5d0ce35c" + license "Python-2.0" + + livecheck do + formula "python@3.13" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "05b420881a6f7ebcac232c3aa607e577b46add5972bdf7d1913861fe50f36673" + sha256 cellar: :any, arm64_sequoia: "7dde8b8ebd7fccf9e81c2e4c6b4c927f36b4b35b75bbf7670f27fa927da459a0" + sha256 cellar: :any, arm64_sonoma: "330ccdf0ec7e9923d10941a68867d8f1ef27aa6aa8a3b9dcd8eac8e5feedf06f" + sha256 cellar: :any, sonoma: "dd6da0d9ce30b0e7a418e328ae007588aaec3ea7892e18857ee6c1595292a5e0" + sha256 arm64_linux: "84168c269d5216c43eda64df8b75ec82e8090f58b2ae4008a83b1c60cbddfc0b" + sha256 x86_64_linux: "eb220e502a409282e6615a41ae0f1b7e605435edc0c3dd4b68226074394e5e65" + end + + depends_on "python@3.13" + depends_on "tcl-tk" + + def python3 + "python3.13" + end + + # Apply commit from open PR to fix TCL 9 threaded detection + # PR ref: https://github.com/python/cpython/pull/128103 + patch do + url "https://github.com/python/cpython/commit/a2019e226e4650cef35ebfde7ecd7ce044a4a670.patch?full_index=1" + sha256 "03c4b6a293d4a51f534858657717bdc1465c42acb3b78e64c41f9011f966e449" + end + + # Backport of https://github.com/python/cpython/commit/47cbf038850852cdcbe7a404ed7c64542340d58a + # TODO: Remove if https://github.com/python/cpython/pull/127364 is merged and released + patch :DATA + + def install + xy = Language::Python.major_minor_version python3 + python_include = if OS.mac? + Formula["python@#{xy}"].opt_frameworks/"Python.framework/Versions/#{xy}/include/python#{xy}" + else + Formula["python@#{xy}"].opt_include/"python#{xy}" + end + + cd "Modules" do + tcltk_version = Formula["tcl-tk"].any_installed_version.major_minor + Pathname("setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="tkinter", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_tkinter", ["_tkinter.c", "tkappinit.c"], + define_macros=[("WITH_APPINIT", 1), ("TCL_WITH_EXTERNAL_TOMMATH", 1)], + include_dirs=["#{python_include}/internal", "#{Formula["tcl-tk"].opt_include/"tcl-tk"}"], + libraries=["tcl#{tcltk_version}", "tcl#{tcltk_version.major}tk#{tcltk_version}"], + library_dirs=["#{Formula["tcl-tk"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false, build_isolation: true), + "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + system python3, "-c", "import tkinter" + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", "import tkinter; root = tkinter.Tk()" + end +end + +__END__ +diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py +index 073b3ae20797c3..8ddb7f97e3b233 100644 +--- a/Lib/tkinter/ttk.py ++++ b/Lib/tkinter/ttk.py +@@ -321,6 +321,8 @@ def _tclobj_to_py(val): + elif hasattr(val, 'typename'): # some other (single) Tcl object + val = _convert_stringval(val) + ++ if isinstance(val, tuple) and len(val) == 0: ++ return '' + return val + + def tclobjs_to_py(adict): +diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c +index b0b70ccb8cc3d3..45897817a56051 100644 +--- a/Modules/_tkinter.c ++++ b/Modules/_tkinter.c +@@ -325,6 +325,7 @@ typedef struct { + const Tcl_ObjType *ListType; + const Tcl_ObjType *StringType; + const Tcl_ObjType *UTF32StringType; ++ const Tcl_ObjType *PixelType; + } TkappObject; + + #define Tkapp_Interp(v) (((TkappObject *) (v))->interp) +@@ -637,6 +638,7 @@ Tkapp_New(const char *screenName, const char *className, + v->ListType = Tcl_GetObjType("list"); + v->StringType = Tcl_GetObjType("string"); + v->UTF32StringType = Tcl_GetObjType("utf32string"); ++ v->PixelType = Tcl_GetObjType("pixel"); + + /* Delete the 'exit' command, which can screw things up */ + Tcl_DeleteCommand(v->interp, "exit"); +@@ -1236,7 +1238,8 @@ FromObj(TkappObject *tkapp, Tcl_Obj *value) + } + + if (value->typePtr == tkapp->StringType || +- value->typePtr == tkapp->UTF32StringType) ++ value->typePtr == tkapp->UTF32StringType || ++ value->typePtr == tkapp->PixelType) + { + return unicodeFromTclObj(tkapp, value); + } diff --git a/Formula/p/python-tk@3.14.rb b/Formula/p/python-tk@3.14.rb new file mode 100644 index 0000000000000..9209c95278f51 --- /dev/null +++ b/Formula/p/python-tk@3.14.rb @@ -0,0 +1,73 @@ +class PythonTkAT314 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz" + sha256 "88d2da4eed42fa9a5f42ff58a8bc8988881bd6c547e297e46682c2687638a851" + license "Python-2.0" + + livecheck do + formula "python@3.14" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "284cf632a3596aaacb14b1ef56be29610c5052e93d780c808f567ab8593bbd01" + sha256 cellar: :any, arm64_sequoia: "212ee18acee1f8510fceb7ec11a6b572d9764e0293aef1ebe66a0560e572a4d0" + sha256 cellar: :any, arm64_sonoma: "8458bb7ec90e51b6b78fb718330826050112ae8d061c3c46b3bc96d227b35428" + sha256 cellar: :any, sonoma: "d342b8b1a74c6902c1cff925b165780473076fed0aeb2b4e067ca228e434fddf" + sha256 arm64_linux: "ed95e44bcb768cb3e1f4f6e2c86f59cd808e49fb07a443875d67e2388803b0c2" + sha256 x86_64_linux: "42e07cd8bbd7f98ca193f92ed91b023cfa0d71fac91eb7ebec5dc0964cbbe6c5" + end + + depends_on "python@3.14" + depends_on "tcl-tk" + + def python3 + "python3.14" + end + + # Apply commit from open PR to fix TCL 9 threaded detection + # PR ref: https://github.com/python/cpython/pull/128103 + patch do + url "https://github.com/python/cpython/commit/a2019e226e4650cef35ebfde7ecd7ce044a4a670.patch?full_index=1" + sha256 "03c4b6a293d4a51f534858657717bdc1465c42acb3b78e64c41f9011f966e449" + end + + def install + xy = Language::Python.major_minor_version python3 + python_include = if OS.mac? + Formula["python@#{xy}"].opt_frameworks/"Python.framework/Versions/#{xy}/include/python#{xy}" + else + Formula["python@#{xy}"].opt_include/"python#{xy}" + end + + cd "Modules" do + tcltk_version = Formula["tcl-tk"].any_installed_version.major_minor + Pathname("setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="tkinter", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_tkinter", ["_tkinter.c", "tkappinit.c"], + define_macros=[("WITH_APPINIT", 1), ("TCL_WITH_EXTERNAL_TOMMATH", 1)], + include_dirs=["#{python_include}/internal", "#{Formula["tcl-tk"].opt_include/"tcl-tk"}"], + libraries=["tcl#{tcltk_version}", "tcl#{tcltk_version.major}tk#{tcltk_version}"], + library_dirs=["#{Formula["tcl-tk"].opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false, build_isolation: true), + "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + system python3, "-c", "import tkinter" + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", "import tkinter; root = tkinter.Tk()" + end +end diff --git a/Formula/p/python-tk@3.9.rb b/Formula/p/python-tk@3.9.rb new file mode 100644 index 0000000000000..3ad8712024781 --- /dev/null +++ b/Formula/p/python-tk@3.9.rb @@ -0,0 +1,65 @@ +class PythonTkAT39 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.9.24/Python-3.9.24.tar.xz" + sha256 "668391afabd5083faafa4543753d190f82f33ce6ba22d6e9ac728b43644b278a" + license "Python-2.0" + + livecheck do + formula "python@3.9" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "787a3760917a3f6ac64e8294c42a5ffbc997a19b7b8ab78c2d798b5e4a8bcce9" + sha256 cellar: :any, arm64_sequoia: "6132ef0a8f4712fe8d4f1a5524d72d4a826e64df8a357c9976a544dcfd256dde" + sha256 cellar: :any, arm64_sonoma: "9bc5ce6643d44c6a5cfbf00dbfc09e490e4061fdd0a2a27e87a21870e710cca5" + sha256 cellar: :any, sonoma: "68a3ee0b1fb5bb1199b050231c7e5f4873d83854c9285f4ff02a01536d3a6595" + sha256 cellar: :any_skip_relocation, arm64_linux: "584c2f7e4a9a4e6723ab14659c4fdfd40913e2394b8e744af2bbe180cb868e2f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75d144c971b8266750f99b1afbe9cb486d45be5d141f9ab15c9ce5af35e0bb13" + end + + # Follow up to python@3.9 deprecation + deprecate! date: "2025-10-15", because: :deprecated_upstream + disable! date: "2026-10-15", because: :deprecated_upstream + + depends_on "python@3.9" + depends_on "tcl-tk@8" + + def python3 + "python3.9" + end + + def install + cd "Modules" do + tcltk = Formula["tcl-tk@8"] + tcltk_version = tcltk.any_installed_version.major_minor + Pathname("setup.py").write <<~PYTHON + from setuptools import setup, Extension + + setup(name="tkinter", + description="#{desc}", + version="#{version}", + ext_modules = [ + Extension("_tkinter", ["_tkinter.c", "tkappinit.c"], + define_macros=[("WITH_APPINIT", 1)], + include_dirs=["#{tcltk.opt_include/"tcl-tk"}"], + libraries=["tcl#{tcltk_version}", "tk#{tcltk_version}"], + library_dirs=["#{tcltk.opt_lib}"]) + ] + ) + PYTHON + system python3, "-m", "pip", "install", *std_pip_args(prefix: false), "--target=#{libexec}", "." + rm_r libexec.glob("*.dist-info") + end + end + + test do + system python3, "-c", "import tkinter" + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system python3, "-c", "import tkinter; root = tkinter.Tk()" + end +end diff --git a/Formula/p/python-yq.rb b/Formula/p/python-yq.rb new file mode 100644 index 0000000000000..489a3f56a3d64 --- /dev/null +++ b/Formula/p/python-yq.rb @@ -0,0 +1,68 @@ +class PythonYq < Formula + include Language::Python::Virtualenv + + desc "Command-line YAML and XML processor that wraps jq" + homepage "https://kislyuk.github.io/yq/" + url "https://files.pythonhosted.org/packages/38/6a/eb9721ed0929d0f55d167c2222d288b529723afbef0a07ed7aa6cca72380/yq-3.4.3.tar.gz" + sha256 "ba586a1a6f30cf705b2f92206712df2281cd320280210e7b7b80adcb8f256e3b" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "78582756df6d73b461cb5d48153aa07693ba9966df4b870d2947c35ba65d96f3" + sha256 cellar: :any, arm64_sequoia: "6fcc7e5152176d214b6ed0e8c310f1635b2276704b1cad2d2ee58438abe83ba5" + sha256 cellar: :any, arm64_sonoma: "18e8c8295b92643e711ffe3ca298dcb0157052a51e62550c24cac2aab67d1aee" + sha256 cellar: :any, sonoma: "0f215ad7173ff1309208dd0526c061d50f5b6b7838853b704fb1c9923473bdf4" + sha256 cellar: :any_skip_relocation, arm64_linux: "524ae6c009837ecb5d6c6dab1d93038040d93dce3864c6de2fa477eb0f285806" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ece36385f46a4d31df2fd58129088085b20ca6a964dfb8b8b02b6ec90361e14c" + end + + depends_on "jq" + depends_on "libyaml" + depends_on "python@3.14" + + conflicts_with "yq", because: "both install `yq` executables" + conflicts_with "xq", because: "both install `xq` binaries" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + def install + virtualenv_install_with_resources + %w[yq xq tomlq].each do |script| + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", script, + base_name: script, shell_parameter_format: :arg) + end + end + + test do + input = <<~YAML + foo: + bar: 1 + baz: {bat: 3} + YAML + expected = <<~EOS + 3 + ... + EOS + assert_equal expected, pipe_output("#{bin}/yq -y .foo.baz.bat", input, 0) + end +end diff --git a/Formula/p/python@3.10.rb b/Formula/p/python@3.10.rb new file mode 100644 index 0000000000000..e70f7926db397 --- /dev/null +++ b/Formula/p/python@3.10.rb @@ -0,0 +1,510 @@ +class PythonAT310 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.10.19/Python-3.10.19.tgz" + sha256 "a078fb2d7a216071ebbe2e34b5f5355dd6b6e9b0cd1bacc4a41c63990c5a0eec" + license "Python-2.0" + revision 1 + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.10(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "f147213c973175c225164fca912a33fb455342c0c93e0f70c53da7217f11137e" + sha256 arm64_sequoia: "ff18e23ca5efc90534a9234b1365ff180290e82a74f2aa6e8bd82220504737a2" + sha256 arm64_sonoma: "32bda2aa0fa7c62e409e31e170d028f9b4834f5e414be9cd9c8fcf2920c24122" + sha256 sonoma: "41d2532e5b733bfeb604e68013faeb925706d371acf5104e63493c9ec808ef35" + sha256 arm64_linux: "423100f9ecf8fb21a9e79e9acfd9464aa3fe54034371592390eae90697674313" + sha256 x86_64_linux: "31db8c1c6a4a7a3e16ca822f324cb078244aa57c139d4c2b5ea5cb9fc2ee01ce" + end + + # setuptools remembers the build flags python is built with and uses them to + # build packages later. Xcode-only systems need different flags. + pour_bottle? only_if: :clt_installed + + depends_on "pkgconf" => :build + depends_on "gdbm" + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "readline" + depends_on "sqlite" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "libnsl" + depends_on "libtirpc" + end + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip setuptools wheel] + + # Always update to latest release + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Modify default sysconfig to match the brew install layout. + # Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976). + # We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.10-sysconfig.diff" + sha256 "51bc741a7f201bf7382067f5561a10968476c98d952e54a4f1931f17f1397ef8" + end + + # Make bundled distutils look at preferred sysconfig scheme. + # Remove with Python 3.12. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.10-distutils-scheme.diff" + sha256 "d1a29b3c9ecf8aecd65e1e54efc42fb1422b2f5d05cba0c747178f4ef8a69683" + end + + def lib_cellar + on_macos do + return frameworks/"Python.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}" + end + on_linux do + return lib/"python#{version.major_minor}" + end + end + + def site_packages_cellar + lib_cellar/"site-packages" + end + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages + HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages" + end + + def python3 + bin/"python#{version.major_minor}" + end + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection in setup.py, which assumes a universal build. + if OS.mac? + ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --with-dbmliborder=gdbm:ndbm + --enable-optimizations + --with-system-expat + --with-system-libmpdec + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" + args << "--enable-framework=#{frameworks}" + args << "--with-dtrace" + + if MacOS.sdk_path_if_needed + # Help Python's build system (setuptools/pip) to build things on SDK-based systems + # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) + cflags << "-isysroot #{MacOS.sdk_path}" + ldflags << "-isysroot #{MacOS.sdk_path}" + end + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + end + + # Disable _tkinter - this is built in a separate formula python-tk + inreplace "setup.py", "DISABLED_MODULE_LIST = []", "DISABLED_MODULE_LIST = ['_tkinter']" + + # We want our readline! This is just to outsmart the detection code, + # superenv makes cc always find includes/libs! + inreplace "setup.py", + /do_readline = self.compiler.find_library_file\(self.lib_dirs,\s*readline_lib\)/, + "do_readline = '#{Formula["readline"].opt_lib/shared_library("libhistory")}'" + + inreplace "setup.py" do |s| + s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True" + s.gsub! "for d_ in self.inc_dirs + sqlite_inc_paths:", + "for d_ in ['#{Formula["sqlite"].opt_include}']:" + end + + if OS.linux? + # Python's configure adds the system ncurses include entry to CPPFLAGS + # when doing curses header check. The check may fail when there exists + # a 32-bit system ncurses (conflicts with the brewed 64-bit one). + # See https://github.com/Homebrew/linuxbrew-core/pull/22307#issuecomment-781896552 + # We want our ncurses! Override system ncurses includes! + inreplace "configure", 'CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"', + "CPPFLAGS=\"$CPPFLAGS -I#{Formula["ncurses"].opt_include}\"" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + system "./configure", *args + system "make" + + ENV.deparallelize do + # The `altinstall` target prevents the installation of files with only Python's major + # version in its name. This allows us to link multiple versioned Python formulae. + # https://github.com/python/cpython#installing-multiple-versions + # + # Tell Python not to install into /Applications (default for framework builds) + system "make", "altinstall", "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = frameworks/"Python.framework/Versions"/version.major_minor/"lib/pkgconfig" + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata__darwin_darwin.py", + lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + pc_dir/"python-#{version.major_minor}.pc", + pc_dir/"python-#{version.major_minor}-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata__darwin_darwin.py", + %r{('LINKFORSHARED': .*?)'(Python.framework/Versions/3.\d+/Python)'}m, + "\\1'#{opt_prefix}/Frameworks/\\2'" + + # Remove symlinks that conflict with the main Python formula. + rm %w[Headers Python Resources Versions/Current].map { |subdir| frameworks/"Python.framework"/subdir } + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}-config", + lib/"pkgconfig/python-3*.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + + # Remove symlinks that conflict with the main Python formula. + rm lib/"libpython3.so" + end + + # Remove the site-packages that Python created in its Cellar. + rm_r(site_packages_cellar) + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + resource("flit-core").stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + resource("wheel").stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled setuptools/pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/{setuptools,pip}-*.whl") + %w[setuptools pip].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + end + + # Patch ensurepip to bootstrap our updated versions of setuptools/pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_SETUPTOOLS_VERSION = .*/, "_SETUPTOOLS_VERSION = \"#{resource("setuptools").version}\"") + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Install unversioned and major-versioned symlinks in libexec/bin. + { + "idle" => "idle#{version.major_minor}", + "idle3" => "idle#{version.major_minor}", + "pydoc" => "pydoc#{version.major_minor}", + "pydoc3" => "pydoc#{version.major_minor}", + "python" => "python#{version.major_minor}", + "python3" => "python#{version.major_minor}", + "python-config" => "python#{version.major_minor}-config", + "python3-config" => "python#{version.major_minor}-config", + }.each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + end + + def post_install + ENV.delete "PYTHONPATH" + + # Fix up the site-packages so that user-installed Python software survives + # minor updates, such as going from 3.3.2 to 3.3.3: + + # Create a site-packages in HOMEBREW_PREFIX/lib/python#{version.major_minor}/site-packages + site_packages.mkpath + + # Symlink the prefix site-packages into the cellar. + site_packages_cellar.unlink if site_packages_cellar.exist? + site_packages_cellar.parent.install_symlink site_packages + + # Remove old sitecustomize.py. Now stored in the cellar. + rm_r(Dir["#{site_packages}/sitecustomize.py[co]"]) + + # Remove old setuptools installations that may still fly around and be + # listed in the easy_install.pth. This can break setuptools build with + # zipimport.ZipImportError: bad local file header + # setuptools-0.9.8-py3.3.egg + rm_r(Dir["#{site_packages}/setuptools[-_.][0-9]*", "#{site_packages}/setuptools"]) + rm_r(Dir["#{site_packages}/distribute[-_.][0-9]*", "#{site_packages}/distribute"]) + rm_r(Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]) + rm_r(Dir["#{site_packages}/wheel[-_.][0-9]*", "#{site_packages}/wheel"]) + + system python3, "-Im", "ensurepip" + + # Install desired versions of setuptools, pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{site_packages}", + bundled/"setuptools-#{resource("setuptools").version}-py3-none-any.whl", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (site_packages/"bin").children, bin + rmdir site_packages/"bin" + + rm_r(bin.glob("pip{,3}")) + mv bin/"wheel", bin/"wheel#{version.major_minor}" + + # Install unversioned and major-versioned symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "pip3" => "pip#{version.major_minor}", + "wheel" => "wheel#{version.major_minor}", + "wheel3" => "wheel#{version.major_minor}", + }.each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + # post_install happens after link + %W[wheel#{version.major_minor} pip#{version.major_minor}].each do |e| + (HOMEBREW_PREFIX/"bin").install_symlink bin/e + end + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/Frameworks/Python\\.framework/Versions/#{version.major_minor}/lib/python#{version.major_minor}/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_prefix) + if sys.prefix == sys.base_prefix: + site.PREFIXES[:] = [new_prefix if x == sys.prefix else x for x in site.PREFIXES] + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_exec_prefix) + if sys.exec_prefix == sys.base_exec_prefix: + site.PREFIXES[:] = [new_exec_prefix if x == sys.exec_prefix else x for x in site.PREFIXES] + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Check for and add the python-tk prefix. + tkinter_prefix = "#{HOMEBREW_PREFIX}/opt/python-tk@#{version.major_minor}/libexec" + if os.path.isdir(tkinter_prefix): + sys.path.append(tkinter_prefix) + PYTHON + end + + def caveats + <<~EOS + Python is installed as + #{HOMEBREW_PREFIX}/bin/python#{version.major_minor} + + Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to + `python#{version.major_minor}`, `python#{version.major_minor}-config`, `pip#{version.major_minor}` etc., respectively, are installed into + #{opt_libexec}/bin + + You can install Python packages with + pip#{version.major_minor} install + They will install into the site-package directory + #{HOMEBREW_PREFIX}/lib/python#{version.major_minor}/site-packages + + `idle#{version.major_minor}` requires tkinter, which is available separately: + brew install python-tk@#{version.major_minor} + + If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH: + brew install python3 + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import _gdbm" + system python3, "-c", "import pyexpat" + system python3, "-c", "import zlib" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + end +end diff --git a/Formula/p/python@3.11.rb b/Formula/p/python@3.11.rb new file mode 100644 index 0000000000000..40559dcd5e2a3 --- /dev/null +++ b/Formula/p/python@3.11.rb @@ -0,0 +1,526 @@ +class PythonAT311 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tgz" + sha256 "563d2a1b2a5ba5d5409b5ecd05a0e1bf9b028cf3e6a6f0c87a5dc8dc3f2d9182" + license "Python-2.0" + revision 1 + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.11(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "9e609dc553e4f962751863590c8d4276ff88352aa70879ffe7c657bf4f7f1239" + sha256 arm64_sequoia: "1f45f5ef42e5cce4e37f001b7e9848c02805a920ca2a6413042eeb212d14dfb8" + sha256 arm64_sonoma: "ecae0169191ecabda2b38bcf5c6e234feadd5e03eae3bb0fcb88617165379849" + sha256 sonoma: "e2034328e1932ba64a5217ac76610ca7159c5df0eda00edde04a464a7d2c90da" + sha256 arm64_linux: "9de68eb6c23d6cc4e5a9975a1e47e79ae7fc6675dd7061ea4b1c9f1a9bce113f" + sha256 x86_64_linux: "425d7ca6959c161cdfdda95e6151e5e1f33e727aa8f1b301f95107598f51d289" + end + + # setuptools remembers the build flags python is built with and uses them to + # build packages later. Xcode-only systems need different flags. + pour_bottle? only_if: :clt_installed + + depends_on "pkgconf" => :build + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "berkeley-db@5" + depends_on "libnsl" + depends_on "libtirpc" + end + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip setuptools wheel] + + # Always update to latest release + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Modify default sysconfig to match the brew install layout. + # Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976). + # We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.11-sysconfig.diff" + sha256 "8bfe417c815da4ca2c0a2457ce7ef81bc9dae310e20e4fb36235901ea4be1658" + end + + # Make bundled distutils look at preferred sysconfig scheme. + # Remove with Python 3.12. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.10-distutils-scheme.diff" + sha256 "d1a29b3c9ecf8aecd65e1e54efc42fb1422b2f5d05cba0c747178f4ef8a69683" + end + + def lib_cellar + on_macos do + return frameworks/"Python.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}" + end + on_linux do + return lib/"python#{version.major_minor}" + end + end + + def site_packages_cellar + lib_cellar/"site-packages" + end + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages + HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages" + end + + def python3 + bin/"python#{version.major_minor}" + end + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection of libmpdec, which assumes a universal build. + # This is currently an inreplace due to https://github.com/python/cpython/issues/98557. + if OS.mac? + inreplace "configure", "libmpdec_machine=universal", + "libmpdec_machine=#{ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64"}" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --enable-optimizations + --with-system-expat + --with-system-libmpdec + --with-readline=editline + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" + args << "--enable-framework=#{frameworks}" + args << "--with-dtrace" + args << "--with-dbmliborder=ndbm" + + if MacOS.sdk_path_if_needed + # Help Python's build system (setuptools/pip) to build things on SDK-based systems + # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) + cflags << "-isysroot #{MacOS.sdk_path}" + ldflags << "-isysroot #{MacOS.sdk_path}" + end + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + args << "--with-dbmliborder=bdb" + end + + # We want our readline! This is just to outsmart the detection code, + # superenv makes cc always find includes/libs! + if OS.linux? + inreplace "setup.py", + /do_readline = self.compiler.find_library_file\(self.lib_dirs,\s*readline_lib\)/, + "do_readline = '#{Formula["libedit"].opt_lib/shared_library("libedit")}'" + end + + if OS.linux? + # Python's configure adds the system ncurses include entry to CPPFLAGS + # when doing curses header check. The check may fail when there exists + # a 32-bit system ncurses (conflicts with the brewed 64-bit one). + # See https://github.com/Homebrew/linuxbrew-core/pull/22307#issuecomment-781896552 + # We want our ncurses! Override system ncurses includes! + inreplace "configure", 'CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"', + "CPPFLAGS=\"$CPPFLAGS -I#{Formula["ncurses"].opt_include}\"" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + # Disabled modules - provided in separate formulae + args += %w[ + py_cv_module__tkinter=disabled + ] + + system "./configure", *args + system "make" + + ENV.deparallelize do + # The `altinstall` target prevents the installation of files with only Python's major + # version in its name. This allows us to link multiple versioned Python formulae. + # https://github.com/python/cpython#installing-multiple-versions + # + # Tell Python not to install into /Applications (default for framework builds) + system "make", "altinstall", "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = frameworks/"Python.framework/Versions"/version.major_minor/"lib/pkgconfig" + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata__darwin_darwin.py", + lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + pc_dir/"python-#{version.major_minor}.pc", + pc_dir/"python-#{version.major_minor}-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata__darwin_darwin.py", + %r{('LINKFORSHARED': .*?)'(Python.framework/Versions/3.\d+/Python)'}m, + "\\1'#{opt_prefix}/Frameworks/\\2'" + + # Remove symlinks that conflict with the main Python formula. + rm %w[Headers Python Resources Versions/Current].map { |subdir| frameworks/"Python.framework"/subdir } + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}-config", + lib/"pkgconfig/python-3*.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + + # Remove symlinks that conflict with the main Python formula. + rm lib/"libpython3.so" + end + + # Remove the site-packages that Python created in its Cellar. + rm_r(site_packages_cellar) + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + resource("flit-core").stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + resource("wheel").stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled setuptools/pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/{setuptools,pip}-*.whl") + %w[setuptools pip].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + end + + # Patch ensurepip to bootstrap our updated versions of setuptools/pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_SETUPTOOLS_VERSION = .*/, "_SETUPTOOLS_VERSION = \"#{resource("setuptools").version}\"") + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Install unversioned and major-versioned symlinks in libexec/bin. + { + "idle" => "idle#{version.major_minor}", + "idle3" => "idle#{version.major_minor}", + "pydoc" => "pydoc#{version.major_minor}", + "pydoc3" => "pydoc#{version.major_minor}", + "python" => "python#{version.major_minor}", + "python3" => "python#{version.major_minor}", + "python-config" => "python#{version.major_minor}-config", + "python3-config" => "python#{version.major_minor}-config", + }.each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + end + + def post_install + ENV.delete "PYTHONPATH" + + # Fix up the site-packages so that user-installed Python software survives + # minor updates, such as going from 3.3.2 to 3.3.3: + + # Create a site-packages in HOMEBREW_PREFIX/lib/python#{version.major_minor}/site-packages + site_packages.mkpath + + # Symlink the prefix site-packages into the cellar. + site_packages_cellar.unlink if site_packages_cellar.exist? + site_packages_cellar.parent.install_symlink site_packages + + # Remove old sitecustomize.py. Now stored in the cellar. + rm_r(Dir["#{site_packages}/sitecustomize.py[co]"]) + + # Remove old setuptools installations that may still fly around and be + # listed in the easy_install.pth. This can break setuptools build with + # zipimport.ZipImportError: bad local file header + # setuptools-0.9.8-py3.3.egg + rm_r(Dir["#{site_packages}/setuptools[-_.][0-9]*", "#{site_packages}/setuptools"]) + rm_r(Dir["#{site_packages}/distribute[-_.][0-9]*", "#{site_packages}/distribute"]) + rm_r(Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]) + rm_r(Dir["#{site_packages}/wheel[-_.][0-9]*", "#{site_packages}/wheel"]) + + system python3, "-Im", "ensurepip" + + # Install desired versions of setuptools, pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{site_packages}", + bundled/"setuptools-#{resource("setuptools").version}-py3-none-any.whl", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (site_packages/"bin").children, bin + rmdir site_packages/"bin" + + rm_r(bin.glob("pip{,3}")) + mv bin/"wheel", bin/"wheel#{version.major_minor}" + + # Install unversioned and major-versioned symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "pip3" => "pip#{version.major_minor}", + "wheel" => "wheel#{version.major_minor}", + "wheel3" => "wheel#{version.major_minor}", + }.each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + # post_install happens after link + %W[wheel#{version.major_minor} pip#{version.major_minor}].each do |e| + (HOMEBREW_PREFIX/"bin").install_symlink bin/e + end + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/Frameworks/Python\\.framework/Versions/#{version.major_minor}/lib/python#{version.major_minor}/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_prefix) + if sys.prefix == sys.base_prefix: + site.PREFIXES[:] = [new_prefix if x == sys.prefix else x for x in site.PREFIXES] + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_exec_prefix) + if sys.exec_prefix == sys.base_exec_prefix: + site.PREFIXES[:] = [new_exec_prefix if x == sys.exec_prefix else x for x in site.PREFIXES] + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Check for and add the prefix of split Python formulae. + for split_module in ["tk", "gdbm"]: + split_prefix = f"#{HOMEBREW_PREFIX}/opt/python-{split_module}@#{version.major_minor}/libexec" + if os.path.isdir(split_prefix): + sys.path.append(split_prefix) + PYTHON + end + + def caveats + <<~EOS + Python is installed as + #{HOMEBREW_PREFIX}/bin/python#{version.major_minor} + + Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to + `python#{version.major_minor}`, `python#{version.major_minor}-config`, `pip#{version.major_minor}` etc., respectively, are installed into + #{opt_libexec}/bin + + You can install Python packages with + pip#{version.major_minor} install + They will install into the site-package directory + #{HOMEBREW_PREFIX}/lib/python#{version.major_minor}/site-packages + + `idle#{version.major_minor}` requires tkinter, which is available separately: + brew install python-tk@#{version.major_minor} + + gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately: + brew install python-gdbm@#{version.major_minor} + `dbm.ndbm` changed database backends in Homebrew Python 3.11. + If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`, + you'll need to read your database using the older version of Homebrew Python and convert to another format. + `dbm` still defaults to `dbm.gnu` when it is installed. + + If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH: + brew install python3 + + For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import pyexpat" + system python3, "-c", "import readline" + system python3, "-c", "import zlib" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # gdbm is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import _gdbm' 2>&1", 1) + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import dbm.gnu' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + end +end diff --git a/Formula/p/python@3.12.rb b/Formula/p/python@3.12.rb new file mode 100644 index 0000000000000..835b22d0ed1a1 --- /dev/null +++ b/Formula/p/python@3.12.rb @@ -0,0 +1,516 @@ +class PythonAT312 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz" + sha256 "487c908ddf4097a1b9ba859f25fe46d22ccaabfb335880faac305ac62bffb79b" + license "Python-2.0" + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.12(?:\.\d+)*)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "427efb2e74f4f1179ff13cb7f2149f2051d6c1abcfd5b73ab77f9ea986a23ea2" + sha256 arm64_sequoia: "f242c770cd7d0aac1d13832b5a72f8fce97add7b18c7c98092544374a9a2666d" + sha256 arm64_sonoma: "764e9a5adf22b1d9545af241fc70dc3b7a9b0d0b5f223adb44e9f05b0d107b9e" + sha256 tahoe: "78040610f0b342e0c0fc718ad9f0a685648ebffb69bf7a8746557ab2243a395b" + sha256 sequoia: "37fad88a480dc48ea022111a316087cc18dbb4f03ab218386be0c67ad5e86136" + sha256 sonoma: "14563ff18aaa32e5ff3c8d646dc03b54a05355db60ed9a5c47f3bec63c0dcbf4" + sha256 arm64_linux: "6c0fab49a54e3e0724049356249aeb01b48c18f7e5b305c0bdba3af25fa2c4cf" + sha256 x86_64_linux: "9730e6d94b34c1af2c99d5c924c4a9ec2270cda129c627cc60b31d255f29927f" + end + + depends_on "pkgconf" => :build + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "berkeley-db@5" + depends_on "libnsl" + depends_on "libtirpc" + end + + link_overwrite "lib/python3.12/site-packages/pip*" + link_overwrite "lib/python3.12/site-packages/wheel*" + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip wheel] + + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Modify default sysconfig to match the brew install layout. + # Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976). + # We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.11-sysconfig.diff" + sha256 "8bfe417c815da4ca2c0a2457ce7ef81bc9dae310e20e4fb36235901ea4be1658" + end + + def lib_cellar + on_macos do + return frameworks/"Python.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}" + end + on_linux do + return lib/"python#{version.major_minor}" + end + end + + def site_packages_cellar = lib_cellar/"site-packages" + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages = HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages" + + def altinstall? = self != Formula["python3"] + + def python3 = bin/"python#{version.major_minor}" + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection of libmpdec, which assumes a universal build. + # This is currently an inreplace due to https://github.com/python/cpython/issues/98557. + if OS.mac? + inreplace "configure", "libmpdec_machine=universal", + "libmpdec_machine=#{ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64"}" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --enable-optimizations + --with-system-expat + --with-system-libmpdec + --with-readline=editline + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" + args << "--enable-framework=#{frameworks}" + args << "--with-dtrace" + args << "--with-dbmliborder=ndbm" + + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + args << "--with-dbmliborder=bdb" + end + + if OS.linux? + # Python's configure adds the system ncurses include entry to CPPFLAGS + # when doing curses header check. The check may fail when there exists + # a 32-bit system ncurses (conflicts with the brewed 64-bit one). + # See https://github.com/Homebrew/linuxbrew-core/pull/22307#issuecomment-781896552 + # We want our ncurses! Override system ncurses includes! + inreplace "configure", 'CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"', + "CPPFLAGS=\"$CPPFLAGS -I#{Formula["ncurses"].opt_include}\"" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + # Disabled modules - provided in separate formulae + args += %w[ + py_cv_module__tkinter=n/a + ] + + system "./configure", *args + system "make" + + ENV.deparallelize do + # The `altinstall` target prevents the installation of files with only Python's major + # version in its name. This allows us to link multiple versioned Python formulae. + # https://github.com/python/cpython#installing-multiple-versions + # + # Tell Python not to install into /Applications (default for framework builds) + target = "#{"alt" if altinstall?}install" + system "make", target, "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = frameworks/"Python.framework/Versions"/version.major_minor/"lib/pkgconfig" + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata__darwin_darwin.py", + lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + pc_dir/"python-#{version.major_minor}.pc", + pc_dir/"python-#{version.major_minor}-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata__darwin_darwin.py", + %r{('LINKFORSHARED': .*?)'(Python.framework/Versions/3.\d+/Python)'}m, + "\\1'#{opt_prefix}/Frameworks/\\2'" + + # For an altinstall, remove symlinks that conflict with the main Python formula. + rm frameworks.glob("Python.framework/{Headers,Python,Resources,Versions/Current}") if altinstall? + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}-config", + lib/"pkgconfig/python-3*.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + + # For an altinstall, remove symlinks that conflict with the main Python formula. + rm lib/"libpython3.so" if altinstall? + end + + # Remove the site-packages that Python created in its Cellar. + rm_r site_packages_cellar.children + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + %w[flit-core wheel].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + end + resource("wheel").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/pip-*.whl") + resource("pip").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + + # Patch ensurepip to bootstrap our updated version of pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Install unversioned (and for an altinstall, major-versioned) symlinks in libexec/bin. + { + "idle" => "idle#{version.major_minor}", + "pydoc" => "pydoc#{version.major_minor}", + "python" => "python#{version.major_minor}", + "python-config" => "python#{version.major_minor}-config", + }.merge(altinstall? ? { + "idle3" => "idle#{version.major_minor}", + "pydoc3" => "pydoc#{version.major_minor}", + "python3" => "python#{version.major_minor}", + "python3-config" => "python#{version.major_minor}-config", + } : {}).each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + # Bootstrap initial install of pip. + system python3, "-Im", "ensurepip" + + # Install desired versions of pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + root_site_packages = lib/"python#{version.major_minor}/site-packages" + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{root_site_packages}", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (root_site_packages/"bin").children, bin + rmdir root_site_packages/"bin" + + rm bin/"pip" + rm bin/"pip3" if altinstall? + mv bin/"wheel", bin/"wheel#{version.major_minor}" + bin.install_symlink "wheel#{version.major_minor}" => "wheel3" unless altinstall? + + # Install unversioned (and for an altinstall, major-versioned) symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "wheel" => "wheel#{version.major_minor}", + }.merge(altinstall? ? { + "pip3" => "pip#{version.major_minor}", + "wheel3" => "wheel#{version.major_minor}", + } : {}).each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + if OS.mac? + # Replace framework site-packages with a symlink to the real one. + rm_r site_packages_cellar + site_packages_cellar.parent.install_symlink root_site_packages + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Mark Homebrew python as externally managed: https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager + # Placed after ensurepip since it invokes pip in isolated mode, meaning + # we can't pass --break-system-packages. + (lib_cellar/"EXTERNALLY-MANAGED").write <<~INI + [externally-managed] + Error=To install Python packages system-wide, try brew install + xyz, where xyz is the package you are trying to + install. + + If you wish to install a Python library that isn't in Homebrew, + use a virtual environment: + + python3 -m venv path/to/venv + source path/to/venv/bin/activate + python3 -m pip install xyz + + If you wish to install a Python application that isn't in Homebrew, + it may be easiest to use 'pipx install xyz', which will manage a + virtual environment for you. You can install pipx with + + brew install pipx + + You may restore the old behavior of pip by passing + the '--break-system-packages' flag to pip, or by adding + 'break-system-packages = true' to your pip.conf file. The latter + will permanently disable this error. + + If you disable this error, we STRONGLY recommend that you additionally + pass the '--user' flag to pip, or set 'user = true' in your pip.conf + file. Failure to do this can result in a broken Homebrew installation. + + Read more about this behavior here: + INI + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/(?:Frameworks/Python\\.framework/Versions/#{version.major_minor}/)?lib/python#{version.major_minor}/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+(?=/|$)') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}', sys.base_prefix) + site.PREFIXES[:] = [new_prefix if x == sys.base_prefix else x for x in site.PREFIXES] + if sys.prefix == sys.base_prefix: + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}', sys.base_exec_prefix) + site.PREFIXES[:] = [new_exec_prefix if x == sys.base_exec_prefix else x for x in site.PREFIXES] + if sys.exec_prefix == sys.base_exec_prefix: + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Make site.getsitepackages() return the HOMEBREW_PREFIX site-packages, + # but only if we are outside a venv or in one with include-system-site-packages. + if sys.base_prefix in site.PREFIXES: + site.PREFIXES.insert(site.PREFIXES.index(sys.base_prefix), '#{HOMEBREW_PREFIX}') + site.addsitedir('#{site_packages}') + # Check for and add the prefix of split Python formulae. + for split_module in ["tk", "gdbm"]: + split_prefix = f"#{HOMEBREW_PREFIX}/opt/python-{split_module}@#{version.major_minor}/libexec" + if os.path.isdir(split_prefix): + sys.path.append(split_prefix) + PYTHON + end + + def caveats + <<~EOS + Python is installed as + #{HOMEBREW_PREFIX}/bin/python#{version.major_minor} + + Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to + `python#{version.major_minor}`, `python#{version.major_minor}-config`, `pip#{version.major_minor}` etc., respectively, are installed into + #{opt_libexec}/bin + + If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH: + brew install python3 + + `idle#{version.major_minor}` requires tkinter, which is available separately: + brew install python-tk@#{version.major_minor} + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import pyexpat" + system python3, "-c", "import readline" + system python3, "-c", "import zlib" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # gdbm is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import _gdbm' 2>&1", 1) + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import dbm.gnu' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + + # Check our sitecustomize.py + assert_match HOMEBREW_CELLAR.to_s, shell_output("#{python3} -Sc 'import sys; print(sys.base_prefix)'") + refute_match HOMEBREW_CELLAR.to_s, shell_output("#{python3} -c 'import sys; print(sys.base_prefix)'") + refute_match site_packages_cellar.to_s, shell_output("#{python3} -c 'import sys; print(sys.path)'") + + # Verify our sysconfig patches + sysconfig_path = "import sysconfig; print(sysconfig.get_paths(\"osx_framework_library\")[\"data\"])" + assert_equal HOMEBREW_PREFIX.to_s, shell_output("#{python3} -c '#{sysconfig_path}'").strip + linkforshared_var = "import sysconfig; print(sysconfig.get_config_var(\"LINKFORSHARED\"))" + assert_match opt_prefix.to_s, shell_output("#{python3} -c '#{linkforshared_var}'") if OS.mac? + + # Check our externally managed marker + assert_match "If you wish to install a Python library", + shell_output("#{python3} -m pip install pip 2>&1", 1) + end +end diff --git a/Formula/p/python@3.13.rb b/Formula/p/python@3.13.rb new file mode 100644 index 0000000000000..7473994d0e417 --- /dev/null +++ b/Formula/p/python@3.13.rb @@ -0,0 +1,503 @@ +class PythonAT313 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tgz" + sha256 "c4c066af19c98fb7835d473bebd7e23be84f6e9874d47db9e39a68ee5d0ce35c" + license "Python-2.0" + revision 1 + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.13(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "03eb2d172710c86df3dd45c640b0a3e404646deaff9dd36e9cc6584f73797043" + sha256 arm64_sequoia: "1e69017b62b04ec5ed8369bd6ea90d0f483187b9e111afdf1c853f22feba0b65" + sha256 arm64_sonoma: "eb694b873eaca9e05e721f22da66b1a0484230e8c5c0c0b43fe0663bc8c303d4" + sha256 tahoe: "77ec038bd37c453589fb715054f4652b53437d484abf94d7e88f7f56d9c5a6aa" + sha256 sequoia: "6960c0f0121d539c9035dff825a97666f41c59f3ea7e4044a71cb3aa50182b12" + sha256 sonoma: "4142735df04ef4c8a87339869b6e5687aa4a2285934cea5d226bfdc63d426c73" + sha256 arm64_linux: "f05a221a15372591c82888863d9bf1a272d180dc5275273b3ed27c5be533481a" + sha256 x86_64_linux: "eb3a1f2e5c3b653e6de402b701f20fb7a9f80ffc98afb9c235f36436cc59ac78" + end + + depends_on "pkgconf" => :build + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat", since: :sequoia + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "berkeley-db@5" + end + + link_overwrite "lib/python3.13/site-packages/pip*" + link_overwrite "lib/python3.13/site-packages/wheel*" + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip wheel] + + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Modify default sysconfig to match the brew install layout. + # Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976). + # We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.13-sysconfig.diff" + sha256 "9f2eae1d08720b06ac3d9ef1999c09388b9db39dfb52687fc261ff820bff20c3" + end + + def lib_cellar + on_macos do + return frameworks/"Python.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}" + end + on_linux do + return lib/"python#{version.major_minor}" + end + end + + def site_packages_cellar = lib_cellar/"site-packages" + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages = HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages" + + def altinstall? = self != Formula["python3"] + + def python3 = bin/"python#{version.major_minor}" + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection of libmpdec, which assumes a universal build. + # This is currently an inreplace due to https://github.com/python/cpython/issues/98557. + if OS.mac? + inreplace "configure", "libmpdec_machine=universal", + "libmpdec_machine=#{ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64"}" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --enable-optimizations + --with-system-expat + --with-system-libmpdec + --with-readline=editline + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" + args << "--enable-framework=#{frameworks}" + args << "--with-dtrace" + args << "--with-dbmliborder=ndbm" + + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + args << "--with-dbmliborder=bdb" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + # Disabled modules - provided in separate formulae + args += %w[ + py_cv_module__tkinter=n/a + ] + + system "./configure", *args + system "make" + + ENV.deparallelize do + # The `altinstall` target prevents the installation of files with only Python's major + # version in its name. This allows us to link multiple versioned Python formulae. + # https://github.com/python/cpython#installing-multiple-versions + # + # Tell Python not to install into /Applications (default for framework builds) + target = "#{"alt" if altinstall?}install" + system "make", target, "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = frameworks/"Python.framework/Versions"/version.major_minor/"lib/pkgconfig" + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata__darwin_darwin.py", + lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + pc_dir/"python-#{version.major_minor}.pc", + pc_dir/"python-#{version.major_minor}-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata__darwin_darwin.py", + %r{('LINKFORSHARED': .*?) (Python.framework/Versions/3.\d+/Python)'}m, + "\\1 #{opt_prefix}/Frameworks/\\2'" + + # For an altinstall, remove symlinks that conflict with the main Python formula. + rm frameworks.glob("Python.framework/{Headers,Python,Resources,Versions/Current}") if altinstall? + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}-config", + lib/"pkgconfig/python-3*.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + + # For an altinstall, remove symlinks that conflict with the main Python formula. + rm lib/"libpython3.so" if altinstall? + end + + # Remove the site-packages that Python created in its Cellar. + rm_r site_packages_cellar.children + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + %w[flit-core wheel].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + end + resource("wheel").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/pip-*.whl") + resource("pip").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + + # Patch ensurepip to bootstrap our updated version of pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Install unversioned (and for an altinstall, major-versioned) symlinks in libexec/bin. + { + "idle" => "idle#{version.major_minor}", + "pydoc" => "pydoc#{version.major_minor}", + "python" => "python#{version.major_minor}", + "python-config" => "python#{version.major_minor}-config", + }.merge(altinstall? ? { + "idle3" => "idle#{version.major_minor}", + "pydoc3" => "pydoc#{version.major_minor}", + "python3" => "python#{version.major_minor}", + "python3-config" => "python#{version.major_minor}-config", + } : {}).each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + # Bootstrap initial install of pip. + system python3, "-Im", "ensurepip" + + # Install desired versions of pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + root_site_packages = lib/"python#{version.major_minor}/site-packages" + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{root_site_packages}", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (root_site_packages/"bin").children, bin + rmdir root_site_packages/"bin" + + rm bin/"pip" + rm bin/"pip3" if altinstall? + mv bin/"wheel", bin/"wheel#{version.major_minor}" + bin.install_symlink "wheel#{version.major_minor}" => "wheel3" unless altinstall? + + # Install unversioned (and for an altinstall, major-versioned) symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "wheel" => "wheel#{version.major_minor}", + }.merge(altinstall? ? { + "pip3" => "pip#{version.major_minor}", + "wheel3" => "wheel#{version.major_minor}", + } : {}).each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + if OS.mac? + # Replace framework site-packages with a symlink to the real one. + rm_r site_packages_cellar + site_packages_cellar.parent.install_symlink root_site_packages + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Mark Homebrew python as externally managed: https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager + # Placed after ensurepip since it invokes pip in isolated mode, meaning + # we can't pass --break-system-packages. + (lib_cellar/"EXTERNALLY-MANAGED").write <<~INI + [externally-managed] + Error=To install Python packages system-wide, try brew install + xyz, where xyz is the package you are trying to + install. + + If you wish to install a Python library that isn't in Homebrew, + use a virtual environment: + + python3 -m venv path/to/venv + source path/to/venv/bin/activate + python3 -m pip install xyz + + If you wish to install a Python application that isn't in Homebrew, + it may be easiest to use 'pipx install xyz', which will manage a + virtual environment for you. You can install pipx with + + brew install pipx + + You may restore the old behavior of pip by passing + the '--break-system-packages' flag to pip, or by adding + 'break-system-packages = true' to your pip.conf file. The latter + will permanently disable this error. + + If you disable this error, we STRONGLY recommend that you additionally + pass the '--user' flag to pip, or set 'user = true' in your pip.conf + file. Failure to do this can result in a broken Homebrew installation. + + Read more about this behavior here: + INI + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/(?:Frameworks/Python\\.framework/Versions/#{version.major_minor}/)?lib/python#{version.major_minor}/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+(?=/|$)') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}', sys.base_prefix) + site.PREFIXES[:] = [new_prefix if x == sys.base_prefix else x for x in site.PREFIXES] + if sys.prefix == sys.base_prefix: + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}', sys.base_exec_prefix) + site.PREFIXES[:] = [new_exec_prefix if x == sys.base_exec_prefix else x for x in site.PREFIXES] + if sys.exec_prefix == sys.base_exec_prefix: + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Make site.getsitepackages() return the HOMEBREW_PREFIX site-packages, + # but only if we are outside a venv or in one with include-system-site-packages. + if sys.base_prefix in site.PREFIXES: + site.PREFIXES.insert(site.PREFIXES.index(sys.base_prefix), '#{HOMEBREW_PREFIX}') + site.addsitedir('#{site_packages}') + # Check for and add the prefix of split Python formulae. + for split_module in ["tk", "gdbm"]: + split_prefix = f"#{HOMEBREW_PREFIX}/opt/python-{split_module}@#{version.major_minor}/libexec" + if os.path.isdir(split_prefix): + sys.path.append(split_prefix) + PYTHON + end + + def caveats + <<~EOS + Python is installed as + #{HOMEBREW_PREFIX}/bin/python#{version.major_minor} + + Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to + `python#{version.major_minor}`, `python#{version.major_minor}-config`, `pip#{version.major_minor}` etc., respectively, are installed into + #{opt_libexec}/bin + + If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH: + brew install python3 + + `idle#{version.major_minor}` requires tkinter, which is available separately: + brew install python-tk@#{version.major_minor} + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import pyexpat" + system python3, "-c", "import readline" + system python3, "-c", "import zlib" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # gdbm is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import _gdbm' 2>&1", 1) + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import dbm.gnu' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + + # Check our sitecustomize.py + assert_match HOMEBREW_CELLAR.to_s, shell_output("#{python3} -Sc 'import sys; print(sys.base_prefix)'") + refute_match HOMEBREW_CELLAR.to_s, shell_output("#{python3} -c 'import sys; print(sys.base_prefix)'") + refute_match site_packages_cellar.to_s, shell_output("#{python3} -c 'import sys; print(sys.path)'") + + # Verify our sysconfig patches + sysconfig_path = "import sysconfig; print(sysconfig.get_paths(\"osx_framework_library\")[\"data\"])" + assert_equal HOMEBREW_PREFIX.to_s, shell_output("#{python3} -c '#{sysconfig_path}'").strip + linkforshared_var = "import sysconfig; print(sysconfig.get_config_var(\"LINKFORSHARED\"))" + assert_match opt_prefix.to_s, shell_output("#{python3} -c '#{linkforshared_var}'") if OS.mac? + + # Check our externally managed marker + assert_match "If you wish to install a Python library", + shell_output("#{python3} -m pip install pip 2>&1", 1) + end +end diff --git a/Formula/p/python@3.14.rb b/Formula/p/python@3.14.rb new file mode 100644 index 0000000000000..4abb69a2bc781 --- /dev/null +++ b/Formula/p/python@3.14.rb @@ -0,0 +1,517 @@ +class PythonAT314 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz" + sha256 "88d2da4eed42fa9a5f42ff58a8bc8988881bd6c547e297e46682c2687638a851" + license "Python-2.0" + revision 1 + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.14(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "a38acea4d1f5f87dbaaad21cf1b034659bdcc1c3ea668b60170d16972d6690df" + sha256 arm64_sequoia: "f59474e8481341bf8308aaa1ca7cd553a8db19c7aab64f6402fba55fe2c6fc1a" + sha256 arm64_sonoma: "fe1dff72bfb49003c153923c4d6738678e2430910af8315579052d49f11b57e0" + sha256 tahoe: "a583024a08c626b7ef617510c7a9278dd4a29d27f6245b7b154af1a90ed8b60e" + sha256 sequoia: "6a080c2ba49a1d39175d5b56d05cca1528726178c228a22c40aa7749275fcecf" + sha256 sonoma: "c8224e9c6b5a23dfdf34370f16e558ad02987c66c8fd8cf2945be69ef4d46008" + sha256 arm64_linux: "db2b31bb0c834ee8d3d29fdb1be1462c6c56cc975c554c59ab80e238706ebe2a" + sha256 x86_64_linux: "f9ed58c30dbf9a21b7a7632a7379d2fac95d6d1da68d6b56972d601366a99f3c" + end + + depends_on "pkgconf" => :build + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "expat", since: :sequoia + uses_from_macos "libedit" + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "berkeley-db@5" + end + + link_overwrite "bin/idle3" + link_overwrite "bin/pip3" + link_overwrite "bin/pydoc3" + link_overwrite "bin/python3" + link_overwrite "bin/python3-config" + link_overwrite "bin/wheel3" + link_overwrite "share/man/man1/python3.1" + link_overwrite "lib/libpython3.so" + link_overwrite "lib/pkgconfig/python3.pc" + link_overwrite "lib/pkgconfig/python3-embed.pc" + link_overwrite "lib/python3.14/site-packages/pip*" + link_overwrite "lib/python3.14/site-packages/wheel*" + link_overwrite "Frameworks/Python.framework/Headers" + link_overwrite "Frameworks/Python.framework/Python" + link_overwrite "Frameworks/Python.framework/Resources" + link_overwrite "Frameworks/Python.framework/Versions/Current" + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip wheel] + + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/fe/6e/74a3f0179a4a73a53d66ce57fdb4de0080a8baa1de0063de206d6167acc2/pip-25.3.tar.gz" + sha256 "8d0538dbbd7babbd207f261ed969c65de439f6bc9e5dbd3b3b9a77f25d95f343" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Modify default sysconfig to match the brew install layout. + # Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976). + # We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/python/3.13-sysconfig.diff" + sha256 "9f2eae1d08720b06ac3d9ef1999c09388b9db39dfb52687fc261ff820bff20c3" + end + + def lib_cellar + on_macos do + return frameworks/"Python.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}" + end + on_linux do + return lib/"python#{version.major_minor}" + end + end + + def site_packages_cellar = lib_cellar/"site-packages" + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages = HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages" + + def altinstall? = self != Formula["python3"] + + def python3 = bin/"python#{version.major_minor}" + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection of libmpdec, which assumes a universal build. + # This is currently an inreplace due to https://github.com/python/cpython/issues/98557. + if OS.mac? + inreplace "configure", "libmpdec_machine=universal", + "libmpdec_machine=#{ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64"}" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --enable-optimizations + --with-system-expat + --with-system-libmpdec + --with-readline=editline + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" + args << "--enable-framework=#{frameworks}" + args << "--with-dtrace" + args << "--with-dbmliborder=ndbm" + + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + args << "--with-dbmliborder=bdb" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + # Disabled modules - provided in separate formulae + args += %w[ + py_cv_module__tkinter=n/a + ] + + system "./configure", *args + system "make" + + ENV.deparallelize do + # The `altinstall` target prevents the installation of files with only Python's major + # version in its name. This allows us to link multiple versioned Python formulae. + # https://github.com/python/cpython#installing-multiple-versions + # + # Tell Python not to install into /Applications (default for framework builds) + target = "#{"alt" if altinstall?}install" + system "make", target, "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = frameworks/"Python.framework/Versions"/version.major_minor/"lib/pkgconfig" + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata__darwin_darwin.py", + lib_cellar/"_sysconfig_vars__darwin_darwin.json", + lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + pc_dir/"python-#{version.major_minor}.pc", + pc_dir/"python-#{version.major_minor}-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata__darwin_darwin.py", + %r{('LINKFORSHARED': .*?) (Python.framework/Versions/3.\d+/Python)'}m, + "\\1 #{opt_prefix}/Frameworks/\\2'" + + # For an altinstall, remove symlinks that conflict with the main Python formula. + rm frameworks.glob("Python.framework/{Headers,Python,Resources,Versions/Current}") if altinstall? + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}-config", + lib/"pkgconfig/python-3*.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + + # For an altinstall, remove symlinks that conflict with the main Python formula. + rm lib/"libpython3.so" if altinstall? + end + + # Remove the site-packages that Python created in its Cellar. + rm_r site_packages_cellar.children + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + %w[flit-core wheel].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + end + resource("wheel").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/pip-*.whl") + resource("pip").stage do + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + + # Patch ensurepip to bootstrap our updated version of pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Install unversioned (and for an altinstall, major-versioned) symlinks in libexec/bin. + { + "idle" => "idle#{version.major_minor}", + "pydoc" => "pydoc#{version.major_minor}", + "python" => "python#{version.major_minor}", + "python-config" => "python#{version.major_minor}-config", + }.merge(altinstall? ? { + "idle3" => "idle#{version.major_minor}", + "pydoc3" => "pydoc#{version.major_minor}", + "python3" => "python#{version.major_minor}", + "python3-config" => "python#{version.major_minor}-config", + } : {}).each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + # Bootstrap initial install of pip. + system python3, "-Im", "ensurepip" + + # Install desired versions of pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + root_site_packages = lib/"python#{version.major_minor}/site-packages" + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{root_site_packages}", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (root_site_packages/"bin").children, bin + rmdir root_site_packages/"bin" + + rm bin/"pip" + rm bin/"pip3" if altinstall? + mv bin/"wheel", bin/"wheel#{version.major_minor}" + bin.install_symlink "wheel#{version.major_minor}" => "wheel3" unless altinstall? + + # Install unversioned (and for an altinstall, major-versioned) symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "wheel" => "wheel#{version.major_minor}", + }.merge(altinstall? ? { + "pip3" => "pip#{version.major_minor}", + "wheel3" => "wheel#{version.major_minor}", + } : {}).each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + if OS.mac? + # Replace framework site-packages with a symlink to the real one. + rm_r site_packages_cellar + site_packages_cellar.parent.install_symlink root_site_packages + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Mark Homebrew python as externally managed: https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager + # Placed after ensurepip since it invokes pip in isolated mode, meaning + # we can't pass --break-system-packages. + (lib_cellar/"EXTERNALLY-MANAGED").write <<~INI + [externally-managed] + Error=To install Python packages system-wide, try brew install + xyz, where xyz is the package you are trying to + install. + + If you wish to install a Python library that isn't in Homebrew, + use a virtual environment: + + python3 -m venv path/to/venv + source path/to/venv/bin/activate + python3 -m pip install xyz + + If you wish to install a Python application that isn't in Homebrew, + it may be easiest to use 'pipx install xyz', which will manage a + virtual environment for you. You can install pipx with + + brew install pipx + + You may restore the old behavior of pip by passing + the '--break-system-packages' flag to pip, or by adding + 'break-system-packages = true' to your pip.conf file. The latter + will permanently disable this error. + + If you disable this error, we STRONGLY recommend that you additionally + pass the '--user' flag to pip, or set 'user = true' in your pip.conf + file. Failure to do this can result in a broken Homebrew installation. + + Read more about this behavior here: + INI + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/(?:Frameworks/Python\\.framework/Versions/#{version.major_minor}/)?lib/python#{version.major_minor}/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+(?=/|$)') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}', sys.base_prefix) + site.PREFIXES[:] = [new_prefix if x == sys.base_prefix else x for x in site.PREFIXES] + if sys.prefix == sys.base_prefix: + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}', sys.base_exec_prefix) + site.PREFIXES[:] = [new_exec_prefix if x == sys.base_exec_prefix else x for x in site.PREFIXES] + if sys.exec_prefix == sys.base_exec_prefix: + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Make site.getsitepackages() return the HOMEBREW_PREFIX site-packages, + # but only if we are outside a venv or in one with include-system-site-packages. + if sys.base_prefix in site.PREFIXES: + site.PREFIXES.insert(site.PREFIXES.index(sys.base_prefix), '#{HOMEBREW_PREFIX}') + site.addsitedir('#{site_packages}') + # Check for and add the prefix of split Python formulae. + for split_module in ["tk", "gdbm"]: + split_prefix = f"#{HOMEBREW_PREFIX}/opt/python-{split_module}@#{version.major_minor}/libexec" + if os.path.isdir(split_prefix): + sys.path.append(split_prefix) + PYTHON + end + + def caveats + <<~EOS + Python is installed as + #{HOMEBREW_PREFIX}/bin/python3 + + Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to + `python3`, `python3-config`, `pip3` etc., respectively, are installed into + #{opt_libexec}/bin + + `idle#{version.major_minor}` requires tkinter, which is available separately: + brew install python-tk@#{version.major_minor} + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import pyexpat" + system python3, "-c", "import readline" + system python3, "-c", "import zlib" + system python3, "-c", "import _zstd" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # gdbm is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import _gdbm' 2>&1", 1) + assert_match "ModuleNotFoundError: No module named '_gdbm'", + shell_output("#{python3} -Sc 'import dbm.gnu' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + + # Check our sitecustomize.py + assert_match HOMEBREW_CELLAR.to_s, shell_output("#{python3} -Sc 'import sys; print(sys.base_prefix)'") + refute_match HOMEBREW_CELLAR.to_s, shell_output("#{python3} -c 'import sys; print(sys.base_prefix)'") + refute_match site_packages_cellar.to_s, shell_output("#{python3} -c 'import sys; print(sys.path)'") + + # Verify our sysconfig patches + sysconfig_path = "import sysconfig; print(sysconfig.get_paths(\"osx_framework_library\")[\"data\"])" + assert_equal HOMEBREW_PREFIX.to_s, shell_output("#{python3} -c '#{sysconfig_path}'").strip + linkforshared_var = "import sysconfig; print(sysconfig.get_config_var(\"LINKFORSHARED\"))" + assert_match opt_prefix.to_s, shell_output("#{python3} -c '#{linkforshared_var}'") if OS.mac? + + # Check our externally managed marker + assert_match "If you wish to install a Python library", + shell_output("#{python3} -m pip install pip 2>&1", 1) + end +end diff --git a/Formula/p/python@3.9.rb b/Formula/p/python@3.9.rb new file mode 100644 index 0000000000000..ff9e9ba3116f6 --- /dev/null +++ b/Formula/p/python@3.9.rb @@ -0,0 +1,523 @@ +class PythonAT39 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.9.24/Python-3.9.24.tar.xz" + sha256 "668391afabd5083faafa4543753d190f82f33ce6ba22d6e9ac728b43644b278a" + license "Python-2.0" + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.9(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_tahoe: "c1740ccd90c69b9c8c767055f18c149c33430231d1b239b76cc295d13522919f" + sha256 arm64_sequoia: "f31c21e07521fbb34130f893b83885f2f60229fab8c584d52309f5fc5ab18b84" + sha256 arm64_sonoma: "2fea1247267c392bf9a9a9d7ad7836209852383342b4fb5aefcdbddc2674d3c3" + sha256 sonoma: "536846c88914b36d35009dffa5e8cb28f39d56a5eddc41051fedb406e4a2cb07" + sha256 arm64_linux: "38c4acd925d5fbe917fa10386aadf6f3b6228e34331fa5d388d0610d214c63ea" + sha256 x86_64_linux: "88fbeab5c8a0c9401d47b7150eca96f401f99b92f014756951ca22bd3602c21e" + end + + # setuptools remembers the build flags python is built with and uses them to + # build packages later. Xcode-only systems need different flags. + pour_bottle? only_if: :clt_installed + + # https://devguide.python.org/versions/#versions + deprecate! date: "2025-10-15", because: :deprecated_upstream + disable! date: "2026-10-15", because: :deprecated_upstream + + depends_on "pkgconf" => :build + depends_on "gdbm" + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "readline" + depends_on "sqlite" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "libnsl" + depends_on "libtirpc" + end + + pypi_packages package_name: "", + extra_packages: %w[flit-core pip setuptools wheel] + + # Always update to latest release + resource "flit-core" do + url "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz" + sha256 "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/20/16/650289cd3f43d5a2fadfd98c68bd1e1e7f2550a1a5326768cddfbcedb2c5/pip-25.2.tar.gz" + sha256 "578283f006390f85bb6282dffb876454593d637f5d1be494b5202ce4877e71f2" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + # Link against libmpdec.so.3, update for mpdecimal.h symbol cleanup. + patch do + url "https://www.bytereef.org/contrib/decimal.diff" + sha256 "b0716ba88a4061dcc8c9bdd1acc57f62884000d1f959075090bf2c05ffa28bf3" + end + + def lib_cellar + on_macos do + return frameworks/"Python.framework/Versions"/version.major_minor/"lib/python#{version.major_minor}" + end + on_linux do + return lib/"python#{version.major_minor}" + end + end + + def site_packages_cellar + lib_cellar/"site-packages" + end + + # The HOMEBREW_PREFIX location of site-packages. + def site_packages + HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages" + end + + def python3 + bin/"python#{version.major_minor}" + end + + def install + # Unset these so that installing pip and setuptools puts them where we want + # and not into some other Python the user has installed. + ENV["PYTHONHOME"] = nil + ENV["PYTHONPATH"] = nil + + # Override the auto-detection in setup.py, which assumes a universal build. + if OS.mac? + ENV["PYTHON_DECIMAL_WITH_MACHINE"] = Hardware::CPU.arm? ? "uint128" : "x64" + end + + # The --enable-optimization and --with-lto flags diverge from what upstream + # python does for their macOS binary releases. They have chosen not to apply + # these flags because they want one build that will work across many macOS + # releases. Homebrew is not so constrained because the bottling + # infrastructure specializes for each macOS major release. + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --without-ensurepip + --enable-loadable-sqlite-extensions + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --with-dbmliborder=gdbm:ndbm + --enable-optimizations + --with-lto + --with-system-expat + --with-system-libmpdec + ] + + # Python re-uses flags when building native modules. + # Since we don't want native modules prioritizing the brew + # include path, we move them to [C|LD]FLAGS_NODIST. + # Note: Changing CPPFLAGS causes issues with dbm, so we + # leave it as-is. + cflags = [] + cflags_nodist = ["-I#{HOMEBREW_PREFIX}/include"] + ldflags = [] + ldflags_nodist = ["-L#{HOMEBREW_PREFIX}/lib", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"] + cppflags = ["-I#{HOMEBREW_PREFIX}/include"] + + if OS.mac? + args << "--enable-framework=#{frameworks}" + args << "--with-dtrace" + + if MacOS.sdk_path_if_needed + # Help Python's build system (setuptools/pip) to build things on SDK-based systems + # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) + cflags << "-isysroot #{MacOS.sdk_path}" + ldflags << "-isysroot #{MacOS.sdk_path}" + end + # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html + args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + else + args << "--enable-shared" + end + + # Disable _tkinter - this is built in a separate formula python-tk + inreplace "setup.py", "DISABLED_MODULE_LIST = []", "DISABLED_MODULE_LIST = ['_tkinter']" + + # We want our readline! This is just to outsmart the detection code, + # superenv makes cc always find includes/libs! + inreplace "setup.py", + "do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline')", + "do_readline = '#{Formula["readline"].opt_lib/shared_library("libhistory")}'" + + inreplace "setup.py" do |s| + s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True" + s.gsub! "for d_ in self.inc_dirs + sqlite_inc_paths:", + "for d_ in ['#{Formula["sqlite"].opt_include}']:" + end + + if OS.linux? + # Python's configure adds the system ncurses include entry to CPPFLAGS + # when doing curses header check. The check may fail when there exists + # a 32-bit system ncurses (conflicts with the brewed 64-bit one). + # See https://github.com/Homebrew/linuxbrew-core/pull/22307#issuecomment-781896552 + # We want our ncurses! Override system ncurses includes! + inreplace "configure", 'CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"', + "CPPFLAGS=\"$CPPFLAGS -I#{Formula["ncurses"].opt_include}\"" + end + + # Allow python modules to use ctypes.find_library to find homebrew's stuff + # even if homebrew is not a /usr/local/lib. Try this with: + # `brew install enchant && pip install pyenchant` + inreplace "./Lib/ctypes/macholib/dyld.py" do |f| + f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", + "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}'," + f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," + end + + args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? + args << "CFLAGS_NODIST=#{cflags_nodist.join(" ")}" unless cflags_nodist.empty? + args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? + args << "LDFLAGS_NODIST=#{ldflags_nodist.join(" ")}" unless ldflags_nodist.empty? + args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? + + system "./configure", *args + system "make" + + ENV.deparallelize do + # The `altinstall` target prevents the installation of files with only Python's major + # version in its name. This allows us to link multiple versioned Python formulae. + # https://github.com/python/cpython#installing-multiple-versions + # + # Tell Python not to install into /Applications (default for framework builds) + system "make", "altinstall", "PYTHONAPPSDIR=#{prefix}" + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? + end + + if OS.mac? + # Any .app get a " 3" attached, so it does not conflict with python 2.x. + prefix.glob("*.app") { |app| mv app, app.to_s.sub(/\.app$/, " 3.app") } + + pc_dir = frameworks/"Python.framework/Versions"/version.major_minor/"lib/pkgconfig" + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Prevent third-party packages from building against fragile Cellar paths + bad_cellar_path_files = [ + lib_cellar/"_sysconfigdata__darwin_darwin.py", + lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + pc_dir/"python-#{version.major_minor}.pc", + pc_dir/"python-#{version.major_minor}-embed.pc", + ] + inreplace bad_cellar_path_files, prefix, opt_prefix + + # Help third-party packages find the Python framework + inreplace lib_cellar/"config-#{version.major_minor}-darwin/Makefile", + /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, + "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" + + # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. + (lib/"pkgconfig").install_symlink pc_dir.children + + # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 + inreplace lib_cellar/"_sysconfigdata__darwin_darwin.py", + %r{('LINKFORSHARED': .*?)'(Python.framework/Versions/3.\d+/Python)'}m, + "\\1'#{opt_prefix}/Frameworks/\\2'" + + # Remove symlinks that conflict with the main Python formula. + rm %w[Headers Python Resources Versions/Current].map { |subdir| frameworks/"Python.framework"/subdir } + else + # Prevent third-party packages from building against fragile Cellar paths + inreplace Dir[lib_cellar/"**/_sysconfigdata_*linux_x86_64-*.py", + lib_cellar/"config*/Makefile", + bin/"python#{version.major_minor}-config", + lib/"pkgconfig/python-3.?.pc"], + prefix, opt_prefix + + inreplace bin/"python#{version.major_minor}-config", + 'prefix_real=$(installed_prefix "$0")', + "prefix_real=#{opt_prefix}" + + # Remove symlinks that conflict with the main Python formula. + rm lib/"libpython3.so" + end + + # Remove the site-packages that Python created in its Cellar. + rm_r(site_packages_cellar) + + # Prepare a wheel of wheel to install later. + common_pip_args = %w[ + -v + --no-deps + --no-binary :all: + --no-index + --no-build-isolation + ] + whl_build = buildpath/"whl_build" + system python3, "-m", "venv", whl_build + resource("flit-core").stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + end + resource("wheel").stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{libexec}", + "." + end + + # Replace bundled setuptools/pip with our own. + rm lib_cellar.glob("ensurepip/_bundled/{setuptools,pip}-*.whl") + %w[setuptools pip].each do |r| + resource(r).stage do + system whl_build/"bin/pip3", "install", *common_pip_args, "." if r == "setuptools" + system whl_build/"bin/pip3", "wheel", *common_pip_args, + "--wheel-dir=#{lib_cellar}/ensurepip/_bundled", + "." + end + end + + # Patch ensurepip to bootstrap our updated versions of setuptools/pip + inreplace lib_cellar/"ensurepip/__init__.py" do |s| + s.gsub!(/_SETUPTOOLS_VERSION = .*/, "_SETUPTOOLS_VERSION = \"#{resource("setuptools").version}\"") + s.gsub!(/_PIP_VERSION = .*/, "_PIP_VERSION = \"#{resource("pip").version}\"") + end + + # Write out sitecustomize.py + (lib_cellar/"sitecustomize.py").atomic_write(sitecustomize) + + # Install unversioned and major-versioned symlinks in libexec/bin. + { + "idle" => "idle#{version.major_minor}", + "idle3" => "idle#{version.major_minor}", + "pydoc" => "pydoc#{version.major_minor}", + "pydoc3" => "pydoc#{version.major_minor}", + "python" => "python#{version.major_minor}", + "python3" => "python#{version.major_minor}", + "python-config" => "python#{version.major_minor}-config", + "python3-config" => "python#{version.major_minor}-config", + }.each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + end + + def post_install + ENV.delete "PYTHONPATH" + + # Fix up the site-packages so that user-installed Python software survives + # minor updates, such as going from 3.3.2 to 3.3.3: + + # Create a site-packages in HOMEBREW_PREFIX/lib/python#{version.major_minor}/site-packages + site_packages.mkpath + + # Symlink the prefix site-packages into the cellar. + site_packages_cellar.unlink if site_packages_cellar.exist? + site_packages_cellar.parent.install_symlink site_packages + + # Remove old sitecustomize.py. Now stored in the cellar. + rm_r(Dir["#{site_packages}/sitecustomize.py[co]"]) + + # Remove old setuptools installations that may still fly around and be + # listed in the easy_install.pth. This can break setuptools build with + # zipimport.ZipImportError: bad local file header + # setuptools-0.9.8-py3.3.egg + rm_r(Dir["#{site_packages}/setuptools[-_.][0-9]*", "#{site_packages}/setuptools"]) + rm_r(Dir["#{site_packages}/distribute[-_.][0-9]*", "#{site_packages}/distribute"]) + rm_r(Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]) + rm_r(Dir["#{site_packages}/wheel[-_.][0-9]*", "#{site_packages}/wheel"]) + + system python3, "-Im", "ensurepip" + + # Install desired versions of setuptools, pip, wheel using the version of + # pip bootstrapped by ensurepip. + # Note that while we replaced the ensurepip wheels, there's no guarantee + # ensurepip actually used them, since other existing installations could + # have been picked up (and we can't pass --ignore-installed). + bundled = lib_cellar/"ensurepip/_bundled" + system python3, "-Im", "pip", "install", "-v", + "--no-deps", + "--no-index", + "--upgrade", + "--isolated", + "--target=#{site_packages}", + bundled/"setuptools-#{resource("setuptools").version}-py3-none-any.whl", + bundled/"pip-#{resource("pip").version}-py3-none-any.whl", + libexec/"wheel-#{resource("wheel").version}-py3-none-any.whl" + + # pip install with --target flag will just place the bin folder into the + # target, so move its contents into the appropriate location + mv (site_packages/"bin").children, bin + rmdir site_packages/"bin" + + rm_r(bin.glob("pip{,3}")) + mv bin/"wheel", bin/"wheel#{version.major_minor}" + + # Install unversioned and major-versioned symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "pip3" => "pip#{version.major_minor}", + "wheel" => "wheel#{version.major_minor}", + "wheel3" => "wheel#{version.major_minor}", + }.each do |short_name, long_name| + (libexec/"bin").install_symlink (bin/long_name).realpath => short_name + end + + # post_install happens after link + %W[wheel#{version.major_minor} pip#{version.major_minor}].each do |e| + (HOMEBREW_PREFIX/"bin").install_symlink bin/e + end + + # Help distutils find brewed stuff when building extensions + include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl@3"].opt_include, + Formula["sqlite"].opt_include] + library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl@3"].opt_lib, + Formula["sqlite"].opt_lib] + + cfg = lib_cellar/"distutils/distutils.cfg" + cfg.atomic_write <<~INI + [install] + prefix=#{HOMEBREW_PREFIX} + [build_ext] + include_dirs=#{include_dirs.join ":"} + library_dirs=#{library_dirs.join ":"} + INI + + # setuptools 63.2.0+ breaks when used inside superenv. + # https://github.com/pypa/distutils/pull/155 + # https://github.com/pypa/distutils/issues/158 + inreplace site_packages/"setuptools/_distutils/command/_framework_compat.py", + /^(\s+homebrew_prefix\s+=\s+).*/, + "\\1'#{HOMEBREW_PREFIX}'" + end + + def sitecustomize + <<~PYTHON + # This file is created by Homebrew and is executed on each python startup. + # Don't print from here, or else python command line scripts may fail! + # + import re + import os + import site + import sys + if sys.version_info[:2] != (#{version.major}, #{version.minor}): + # This can only happen if the user has set the PYTHONPATH to a mismatching site-packages directory. + # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, + # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are + # built only for a specific version of Python and will fail with cryptic error messages. + # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. + exit(f'Your PYTHONPATH points to a site-packages dir for Python #{version.major_minor} ' + f'but you are running Python {sys.version_info[0]}.{sys.version_info[1]}!\\n' + f' PYTHONPATH is currently: "{os.environ["PYTHONPATH"]}"\\n' + f' You should `unset PYTHONPATH` to fix this.') + # Only do this for a brewed python: + if os.path.realpath(sys.executable).startswith('#{rack}'): + # Shuffle /Library site-packages to the end of sys.path + library_site = '/Library/Python/#{version.major_minor}/site-packages' + library_packages = [p for p in sys.path if p.startswith(library_site)] + sys.path = [p for p in sys.path if not p.startswith(library_site)] + # .pth files have already been processed so don't use addsitedir + sys.path.extend(library_packages) + # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX + # site_packages; prefer the shorter paths + long_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/Frameworks/Python\\.framework/Versions/#{version.major_minor}/lib/python#{version.major_minor}/site-packages') + sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] + # Set the sys.executable to use the opt_prefix. Only do this if PYTHONEXECUTABLE is not + # explicitly set and we are not in a virtualenv: + if 'PYTHONEXECUTABLE' not in os.environ and sys.prefix == sys.base_prefix: + sys.executable = sys._base_executable = '#{opt_bin}/python#{version.major_minor}' + if 'PYTHONHOME' not in os.environ: + cellar_prefix = re.compile(r'#{rack}/[0-9\\._abrc]+/') + if os.path.realpath(sys.base_prefix).startswith('#{rack}'): + new_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_prefix) + if sys.prefix == sys.base_prefix: + site.PREFIXES[:] = [new_prefix if x == sys.prefix else x for x in site.PREFIXES] + sys.prefix = new_prefix + sys.base_prefix = new_prefix + if os.path.realpath(sys.base_exec_prefix).startswith('#{rack}'): + new_exec_prefix = cellar_prefix.sub('#{opt_prefix}/', sys.base_exec_prefix) + if sys.exec_prefix == sys.base_exec_prefix: + site.PREFIXES[:] = [new_exec_prefix if x == sys.exec_prefix else x for x in site.PREFIXES] + sys.exec_prefix = new_exec_prefix + sys.base_exec_prefix = new_exec_prefix + # Check for and add the python-tk prefix. + tkinter_prefix = "#{HOMEBREW_PREFIX}/opt/python-tk@#{version.major_minor}/libexec" + if os.path.isdir(tkinter_prefix): + sys.path.append(tkinter_prefix) + PYTHON + end + + def caveats + <<~EOS + Python is installed as + #{HOMEBREW_PREFIX}/bin/python#{version.major_minor} + + Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to + `python#{version.major_minor}`, `python#{version.major_minor}-config`, `pip#{version.major_minor}` etc., respectively, are installed into + #{opt_libexec}/bin + + You can install Python packages with + pip#{version.major_minor} install + They will install into the site-package directory + #{HOMEBREW_PREFIX}/lib/python#{version.major_minor}/site-packages + + `idle#{version.major_minor}` requires tkinter, which is available separately: + brew install python-tk@#{version.major_minor} + + If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH: + brew install python3 + + See: https://docs.brew.sh/Homebrew-and-Python + EOS + end + + test do + # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions + # and it can occur that building sqlite silently fails if OSX's sqlite is used. + system python3, "-c", "import sqlite3" + + # check to see if we can create a venv + system python3, "-m", "venv", testpath/"myvenv" + + # Check if some other modules import. Then the linked libs are working. + system python3, "-c", "import _ctypes" + system python3, "-c", "import _decimal" + system python3, "-c", "import _gdbm" + system python3, "-c", "import pyexpat" + system python3, "-c", "import zlib" + + # tkinter is provided in a separate formula + assert_match "ModuleNotFoundError: No module named '_tkinter'", + shell_output("#{python3} -Sc 'import tkinter' 2>&1", 1) + + # Verify that the selected DBM interface works + (testpath/"dbm_test.py").write <<~PYTHON + import dbm + + with dbm.ndbm.open("test", "c") as db: + db[b"foo \\xbd"] = b"bar \\xbd" + with dbm.ndbm.open("test", "r") as db: + assert list(db.keys()) == [b"foo \\xbd"] + assert b"foo \\xbd" in db + assert db[b"foo \\xbd"] == b"bar \\xbd" + PYTHON + system python3, "dbm_test.py" + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + end +end diff --git a/Formula/p/pythran.rb b/Formula/p/pythran.rb new file mode 100644 index 0000000000000..285505827cf18 --- /dev/null +++ b/Formula/p/pythran.rb @@ -0,0 +1,106 @@ +class Pythran < Formula + include Language::Python::Virtualenv + + desc "Ahead of Time compiler for numeric kernels" + homepage "https://pythran.readthedocs.io/" + url "https://files.pythonhosted.org/packages/94/0a/95a72f09f25dae48f41e367959075ed4c7a0ff02dd3f54eec111501d648a/pythran-0.18.0.tar.gz" + sha256 "5c003e8cbedf6dbb68c2869c49fc110ce8b5e8982993078a4a819f1dadc4fc6a" + license "BSD-3-Clause" + revision 1 + head "https://github.com/serge-sans-paille/pythran.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ba138882ae0352d6e01ba04f7aaa06983cc3f1f77c1f6018def8db0420436f2a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba138882ae0352d6e01ba04f7aaa06983cc3f1f77c1f6018def8db0420436f2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ba138882ae0352d6e01ba04f7aaa06983cc3f1f77c1f6018def8db0420436f2a" + sha256 cellar: :any_skip_relocation, sonoma: "eb21d693f082e1a34a0fc8049c1c36da9a88570683e1e58f6465fca470e19af9" + sha256 cellar: :any_skip_relocation, arm64_linux: "550ea45f043411e2b794b1359e80146f2c07cc3d97f4890a7cb5aabd75f77324" + sha256 cellar: :any_skip_relocation, x86_64_linux: "550ea45f043411e2b794b1359e80146f2c07cc3d97f4890a7cb5aabd75f77324" + end + + depends_on "gcc" # for OpenMP + depends_on "numpy" + depends_on "openblas" + depends_on "python@3.14" + + pypi_packages exclude_packages: "numpy" + + resource "beniget" do + url "https://files.pythonhosted.org/packages/2e/27/5bb01af8f2860d431b98d0721b96ff2cea979106cae3f2d093ec74f6400c/beniget-0.4.2.post1.tar.gz" + sha256 "a0258537e65e7e14ec33a86802f865a667f949bb6c73646d55e42f7c45a052ae" + end + + resource "gast" do + url "https://files.pythonhosted.org/packages/3c/14/c566f5ca00c115db7725263408ff952b8ae6d6a4e792ef9c84e77d9af7a1/gast-0.6.0.tar.gz" + sha256 "88fc5300d32c7ac6ca7b515310862f71e6fdf2c029bbec7c66c0f5dd47b6b1fb" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def install + if OS.mac? + gcc_major_ver = Formula["gcc"].any_installed_version.major + inreplace "pythran/pythran-darwin.cfg" do |s| + s.gsub!(/^include_dirs=/, "include_dirs=#{Formula["openblas"].opt_include}") + s.gsub!(/^library_dirs=/, "library_dirs=#{Formula["openblas"].opt_lib}") + s.gsub!(/^blas=.*/, "blas=openblas") + s.gsub!(/^CC=.*/, "CC=#{Formula["gcc"].opt_bin}/gcc-#{gcc_major_ver}") + s.gsub!(/^CXX=.*/, "CXX=#{Formula["gcc"].opt_bin}/g++-#{gcc_major_ver}") + end + end + + virtualenv_install_with_resources + end + + test do + python3 = which("python3.14") + pythran = Formula["pythran"].opt_bin/"pythran" + + (testpath/"dprod.py").write <<~PYTHON + #pythran export dprod(int list, int list) + def dprod(arr0, arr1): + return sum([x*y for x,y in zip(arr0, arr1)]) + PYTHON + system pythran, testpath/"dprod.py" + rm(testpath/"dprod.py") + + assert_equal "11", shell_output("#{python3} -c 'import dprod; print(dprod.dprod([1,2], [3,4]))'").chomp + + (testpath/"arc_distance.py").write <<~PYTHON + #pythran export arc_distance(float[], float[], float[], float[]) + import numpy as np + def arc_distance(theta_1, phi_1, theta_2, phi_2): + """ + Calculates the pairwise arc distance between all points in vector a and b. + """ + temp = np.sin((theta_2-theta_1)/2)**2 + np.cos(theta_1)*np.cos(theta_2)*np.sin((phi_2-phi_1)/2)**2 + distance_matrix = 2 * np.arctan2(np.sqrt(temp), np.sqrt(1-temp)) + return distance_matrix + PYTHON + + # Test with configured gcc to detect breakages from gcc major versions and for OpenMP support + with_env(CC: nil, CXX: nil) do + system pythran, "-DUSE_XSIMD", "-fopenmp", "-march=native", testpath/"arc_distance.py" + end + rm(testpath/"arc_distance.py") + + system python3, "-c", <<~PYTHON + import numpy as np + import arc_distance + d = arc_distance.arc_distance( + np.array([12.4,0.5,-5.6,12.34,9.21]), np.array([-5.6,3.4,2.3,-23.31,12.6]), + np.array([3.45,1.5,55.4,567.0,43.2]), np.array([56.1,3.4,1.34,-56.9,-3.4]), + ) + assert ([1.927, 1., 1.975, 1.83, 1.032] == np.round(d, 3)).all() + PYTHON + end +end diff --git a/Formula/p/pytorch.rb b/Formula/p/pytorch.rb new file mode 100644 index 0000000000000..2d0f6f69de57a --- /dev/null +++ b/Formula/p/pytorch.rb @@ -0,0 +1,193 @@ +class Pytorch < Formula + include Language::Python::Virtualenv + + desc "Tensors and dynamic neural networks" + homepage "https://pytorch.org/" + url "https://github.com/pytorch/pytorch/releases/download/v2.9.0/pytorch-v2.9.0.tar.gz" + sha256 "c6980af3c0ea311f49f90987982be715e4d702539fea41e52f55ad7f0b105dc3" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "580a5a2b22ed3dbf1ca9486ac54d1e43ac628543226008dc426168d61fff19a7" + sha256 cellar: :any, arm64_sequoia: "8bdc7bed1b02b6e5d60858753f457a17a1ccab17aa80d0013071ae138168af69" + sha256 cellar: :any, arm64_sonoma: "0f37e0a2aabe74bb50775785054749a8f4b7beec4e66f2b905721df194881e34" + sha256 cellar: :any, sonoma: "f40de3d44de7b223dc446f8872557f1ffd08e9884ea48dd04b6575e29ca77c52" + sha256 arm64_linux: "4a3d153f17734a30a3527a374095895bfd5ea05d20e16ffe7434ec49c68a63ed" + sha256 x86_64_linux: "d2fdb7433b5238280ce2003ef71c2148a172921dbd0509c5b324e4033a23cf62" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.14" => [:build, :test] + depends_on xcode: :build + depends_on "abseil" + depends_on "eigen" + depends_on "libuv" + depends_on "libyaml" + depends_on macos: :monterey # MPS backend only supports 12.3 and above + depends_on "numpy" + depends_on "openblas" + depends_on "protobuf" + depends_on "pybind11" + depends_on "sleef" + + on_macos do + depends_on "libomp" + end + + pypi_packages package_name: "torch[opt-einsum]", + extra_packages: "pyyaml", + exclude_packages: "numpy" + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/de/e0/bab50af11c2d75c9c4a2a26a5254573c0bd97cea152254401510950486fa/fsspec-2025.9.0.tar.gz" + sha256 "19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mpmath" do + url "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz" + sha256 "7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "opt-einsum" do + url "https://files.pythonhosted.org/packages/8c/b9/2ac072041e899a52f20cf9510850ff58295003aa75525e58343591b0cbfb/opt_einsum-3.4.0.tar.gz" + sha256 "96ca72f1b886d148241348783498194c577fa30a8faac108586b14f1ba4473ac" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "sympy" do + url "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz" + sha256 "d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + python3 = "python3.14" + + # Avoid building AVX512 code + inreplace "cmake/Modules/FindAVX.cmake", /^CHECK_SSE\(CXX "AVX512"/, "#\\0" + + # Disable SVE support as it requires enabling support in `sleef` formula. + # This is not recommended as SLEEF is moving SVE support to unmaintained status: + # https://github.com/shibatch/sleef/discussions/673#discussioncomment-12610711 + inreplace "cmake/Modules/FindARM.cmake", /^\s*CHECK_COMPILES\(CXX "SVE256"/, "#\\0" + + # Avoid bundling libomp + inreplace "setup.py", /^(\s*)self\._embed_libomp\(\)$/, "\\1pass" + + ENV["ATEN_NO_TEST"] = "ON" + ENV["BLAS"] = "OpenBLAS" + ENV["BUILD_CUSTOM_PROTOBUF"] = "OFF" + ENV["BUILD_PYTHON"] = "ON" + ENV["BUILD_TEST"] = "OFF" + ENV["OpenBLAS_HOME"] = Formula["openblas"].opt_prefix + ENV["PYTHON_EXECUTABLE"] = which(python3) + ENV["PYTORCH_BUILD_VERSION"] = version.to_s + ENV["PYTORCH_BUILD_NUMBER"] = "1" + ENV["USE_CCACHE"] = "OFF" + ENV["USE_CUDA"] = "OFF" + ENV["USE_DISTRIBUTED"] = "ON" + ENV["USE_MKLDNN"] = "OFF" + ENV["USE_NNPACK"] = "OFF" + ENV["USE_OPENMP"] = "ON" + ENV["USE_SYSTEM_EIGEN_INSTALL"] = "ON" + ENV["USE_SYSTEM_PYBIND11"] = "ON" + ENV["USE_SYSTEM_SLEEF"] = "ON" + ENV["USE_MPS"] = "ON" if OS.mac? + ENV["USE_KLEIDIAI"] = "OFF" + + # Workaround for + # error: a template argument list is expected after a name prefixed by the template keyword + ENV.append_to_cflags "-Wmissing-template-arg-list-after-template-kw" + + # Avoid references to Homebrew shims + inreplace "caffe2/core/macros.h.in", "${CMAKE_CXX_COMPILER}", ENV.cxx + + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + + # PyTorch needs to pass `-march=armv8.2-a+fp16` to compile runtime detected code + ENV.runtime_cpu_detection if OS.linux? && Hardware::CPU.arch == :arm64 + + venv.pip_install_and_link(buildpath, build_isolation: false) + + # Expose C++ API + torch = venv.site_packages/"torch" + include.install_symlink ((torch/"include").children - [torch/"include/fmt"]) + lib.install_symlink (torch/"lib").children + (share/"cmake").install_symlink (torch/"share/cmake").children + end + + test do + # test that C++ libraries are available + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + torch::Tensor tensor = torch::rand({2, 3}); + std::cout << tensor << std::endl; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", + "-I#{include}/torch/csrc/api/include", + "-L#{lib}", "-ltorch", "-ltorch_cpu", "-lc10" + system "./test" + + # test that the `torch` Python module is available + system libexec/"bin/python", "-c", <<~PYTHON + import torch + t = torch.rand(5, 3) + assert isinstance(t, torch.Tensor), "not a tensor" + assert torch.distributed.is_available(), "torch.distributed is unavailable" + PYTHON + return unless OS.mac? + + # test that we have the MPS backend + system libexec/"bin/python", "-c", <<~PYTHON + import torch + assert torch.backends.mps.is_built(), "MPS backend is not built" + PYTHON + end +end diff --git a/Formula/p/pytr.rb b/Formula/p/pytr.rb new file mode 100644 index 0000000000000..074c53a478669 --- /dev/null +++ b/Formula/p/pytr.rb @@ -0,0 +1,114 @@ +class Pytr < Formula + include Language::Python::Virtualenv + + desc "Use TradeRepublic in terminal and mass download all documents" + homepage "https://github.com/pytr-org/pytr" + url "https://files.pythonhosted.org/packages/c3/ae/4e19a7477f65d432421a001af03d70e2caafb4f7398d791b28bd8d47a892/pytr-0.4.3.tar.gz" + sha256 "efd6f11506e2be93d7c0e0e4fe4feaf9cb6b466beb76ba2ef03c6197d3ab719d" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ce4afa2775d6b3801e1ddbd689da1afcb7a0a5eba86fc861fee2fef6941d63aa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c246d51a03a047b132bc9ad7eb76d5c7b32990157d263455f2de1d16867268a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5340a8c3a09673d014cb6d70b25cd672644afc1af225de34f44179d9fb231ff6" + sha256 cellar: :any_skip_relocation, sonoma: "dfb75231d784e3c3355874cd04f7fa2d8234d61c19f115b6eb0d4009085fb187" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7dca9ec90ace62ea5dd60fed9a42fd62269e051c9965eadbb7c220b0696b2e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "088a05e597cfd7e65a61503d74057a564ec8528c1f639e4a1c3e6221d364d251" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "coloredlogs" do + url "https://files.pythonhosted.org/packages/cc/c7/eed8f27100517e8c0e6b923d5f0845d0cb99763da6fdee00478f91db7325/coloredlogs-15.0.1.tar.gz" + sha256 "7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/c0/1f/924e3caae75f471eae4b26bd13b698f6af2c44279f67af317439c2f4c46a/ecdsa-0.19.1.tar.gz" + sha256 "478cba7b62555866fcb3bb3fe985e06decbdb68ef55713c4e5ab98c57d508e61" + end + + resource "humanfriendly" do + url "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz" + sha256 "6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathvalidate" do + url "https://files.pythonhosted.org/packages/fa/2a/52a8da6fe965dea6192eb716b357558e103aea0a1e9a8352ad575a8406ca/pathvalidate-3.3.1.tar.gz" + sha256 "b18c07212bfead624345bb8e1d6141cdcf15a39736994ea0b94035ad2b1ba177" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-futures" do + url "https://files.pythonhosted.org/packages/88/f8/175b823241536ba09da033850d66194c372c65c38804847ac9cef0239542/requests_futures-1.0.2.tar.gz" + sha256 "6b7eb57940336e800faebc3dab506360edec9478f7b22dc570858ad3aa7458da" + end + + resource "shtab" do + url "https://files.pythonhosted.org/packages/5a/3e/837067b970c1d2ffa936c72f384a63fdec4e186b74da781e921354a94024/shtab-1.7.2.tar.gz" + sha256 "8c16673ade76a2d42417f03e57acf239bfb5968e842204c17990cae357d07d6f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"pytr", "completion", shells: [:bash, :zsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/pytr --version") + + assert_match "NUMBER_INVALID", shell_output( + "#{bin}/pytr --debug-logfile pytr.log login -n +4912345678 -p 1234 2>&1", 1 + ) + assert_path_exists testpath/"pytr.log" + end +end diff --git a/Formula/p/pyupgrade.rb b/Formula/p/pyupgrade.rb new file mode 100644 index 0000000000000..2c4660c1f97ff --- /dev/null +++ b/Formula/p/pyupgrade.rb @@ -0,0 +1,35 @@ +class Pyupgrade < Formula + include Language::Python::Virtualenv + + desc "Upgrade syntax for newer versions of Python" + homepage "https://github.com/asottile/pyupgrade" + url "https://files.pythonhosted.org/packages/cb/11/b08f5e4d50575c944e4ea0a86f070a1ba2c0d5a4dc42fac571a605ada78d/pyupgrade-3.21.0.tar.gz" + sha256 "3e63a882ec1d16f5621736d938952df3cdc2446501fb049e711415cb8d273960" + license "MIT" + head "https://github.com/asottile/pyupgrade.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8fe6a40d022d201b410e6ed96e5a4b0d92637ace5c73f38b1fd48a3151dd34a7" + end + + depends_on "python@3.14" + + resource "tokenize-rt" do + url "https://files.pythonhosted.org/packages/69/ed/8f07e893132d5051d86a553e749d5c89b2a4776eb3a579b72ed61f8559ca/tokenize_rt-6.2.0.tar.gz" + sha256 "8439c042b330c553fdbe1758e4a05c0ed460dbbbb24a606f11f0dee75da4cad6" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.py").write <<~PYTHON + print(("foo")) + PYTHON + + system bin/"pyupgrade", "--exit-zero-even-if-changed", testpath/"test.py" + assert_match "print(\"foo\")", (testpath/"test.py").read + end +end diff --git a/Formula/p/pyvim.rb b/Formula/p/pyvim.rb new file mode 100644 index 0000000000000..5e0a138fa3ab5 --- /dev/null +++ b/Formula/p/pyvim.rb @@ -0,0 +1,60 @@ +class Pyvim < Formula + include Language::Python::Virtualenv + + desc "Pure Python Vim clone" + homepage "https://github.com/prompt-toolkit/pyvim" + url "https://files.pythonhosted.org/packages/c3/31/04e144ec3a3a0303e3ef1ef9c6c1ec8a3b5ba9e88b98d21442d9152783c1/pyvim-3.0.3.tar.gz" + sha256 "2a3506690f73a79dd02cdc45f872d3edf20a214d4c3666d12459e2ce5b644baa" + license "BSD-3-Clause" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "1d60636ec54fbcaad3250b79216de6541628e84b08c9bf60d4956ff2c1e0d768" + end + + depends_on "python@3.14" + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pyflakes" do + url "https://files.pythonhosted.org/packages/45/dc/fd034dc20b4b264b3d015808458391acbf9df40b1e54750ef175d39180b1/pyflakes-3.4.0.tar.gz" + sha256 "b24f96fafb7d2ab0ec5075b7350b3d2d2218eab42003821c06344973d3ea2f58" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # Need a pty due to https://github.com/prompt-toolkit/pyvim/issues/101 + require "pty" + PTY.spawn(bin/"pyvim", "--help") do |r, _w, _pid| + assert_match "Vim clone", r.read + end + end +end diff --git a/Formula/p/pywhat.rb b/Formula/p/pywhat.rb new file mode 100644 index 0000000000000..ee2d9ac9e9433 --- /dev/null +++ b/Formula/p/pywhat.rb @@ -0,0 +1,51 @@ +class Pywhat < Formula + include Language::Python::Virtualenv + + desc "Identify anything: emails, IP addresses, and more" + homepage "https://github.com/bee-san/pyWhat" + url "https://files.pythonhosted.org/packages/ae/31/57bb23df3d3474c1e0a0ae207f8571e763018fa064823310a76758eaef81/pywhat-5.1.0.tar.gz" + sha256 "8a6f2b3060f5ce9808802b9ca3eaf91e19c932e4eaa03a4c2e5255d0baad85c4" + license "MIT" + revision 1 + head "https://github.com/bee-san/pyWhat.git", branch: "main" + + bottle do + rebuild 8 + sha256 cellar: :any_skip_relocation, all: "9d956d1343e983ae55c8c7b067200adac30063879734eec1b4e1f04eac8c6470" + end + + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" + sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "commonmark" do + url "https://files.pythonhosted.org/packages/60/48/a60f593447e8f0894ebb7f6e6c1f25dafc5e89c5879fdc9360ae93ff83f0/commonmark-0.9.1.tar.gz" + sha256 "452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/74/c3/e55ebdd66540503cee29cd3bb18a90bcfd5587a0cf3680173c368be56093/rich-10.16.2.tar.gz" + sha256 "720974689960e06c2efdb54327f8bf0cdbdf4eae4ad73b6c94213cad405c371b" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Internet Protocol (IP)", shell_output("#{bin}/pywhat 127.0.0.1").strip + end +end diff --git a/Formula/p0f.rb b/Formula/p0f.rb deleted file mode 100644 index a0312c932275c..0000000000000 --- a/Formula/p0f.rb +++ /dev/null @@ -1,25 +0,0 @@ -class P0f < Formula - desc "Versatile passive OS fingerprinting, masquerade detection tool" - homepage "http://lcamtuf.coredump.cx/p0f3/" - url "http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.09b.tgz" - sha256 "543b68638e739be5c3e818c3958c3b124ac0ccb8be62ba274b4241dbdec00e7f" - - bottle do - rebuild 1 - sha256 "616522a36fb167db7a3e36c2113d6214e0e054be9c8fe7dc67a9c9da1b9a1c23" => :mojave - sha256 "ccd5b804de7e6fd430540283d6064d4647e1224dd2663f21e309a4077b1c30b9" => :high_sierra - sha256 "bd25792c98fd8c88599ab373ed8b9265fe4b69c47b6b3ebc84911750f48f190d" => :sierra - sha256 "37aea629cea6430b8516ea80eaaf687844a2a1656eebe7744ba6f3746381ce48" => :el_capitan - end - - def install - inreplace "config.h", "p0f.fp", "#{etc}/p0f/p0f.fp" - system "./build.sh" - sbin.install "p0f" - (etc/"p0f").install "p0f.fp" - end - - test do - system "#{sbin}/p0f", "-r", test_fixtures("test.pcap") - end -end diff --git a/Formula/p11-kit.rb b/Formula/p11-kit.rb deleted file mode 100644 index 49e0ad506ccf6..0000000000000 --- a/Formula/p11-kit.rb +++ /dev/null @@ -1,50 +0,0 @@ -class P11Kit < Formula - desc "Library to load and enumerate PKCS#11 modules" - homepage "https://p11-glue.freedesktop.org" - url "https://github.com/p11-glue/p11-kit/releases/download/0.23.14/p11-kit-0.23.14.tar.gz" - sha256 "1cb9fa6d237539f25f62f4c3d4ec71a1c8e0772957ec45ec5af92134129e0d70" - - bottle do - sha256 "42760c3b204ec89a91c3d6612faa7dd12e4a15673bf324e41ae4952ae7cab790" => :mojave - sha256 "d1c17d13b8b3a2257c3273d1be310128c370a2a3f9542b9ffe7eb1e92a094846" => :high_sierra - sha256 "8e1a60e5e5f876636c8e6b2124bf0107d5f7c570a00082cc55a372a71e2cb819" => :sierra - sha256 "af9c149cd855e559ec2d7547746da8370f8b5037048e419d04ce744c6316fc48" => :el_capitan - end - - head do - url "https://github.com/p11-glue/p11-kit.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libffi" - - def install - # https://bugs.freedesktop.org/show_bug.cgi?id=91602#c1 - ENV["FAKED_MODE"] = "1" - - if build.head? - ENV["NOCONFIGURE"] = "1" - system "./autogen.sh" - end - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-trust-module", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--with-module-config=#{etc}/pkcs11/modules", - "--without-libtasn1" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/p11-kit", "list-modules" - end -end diff --git a/Formula/p7zip.rb b/Formula/p7zip.rb deleted file mode 100644 index 0951b8d855ef5..0000000000000 --- a/Formula/p7zip.rb +++ /dev/null @@ -1,40 +0,0 @@ -class P7zip < Formula - desc "7-Zip (high compression file archiver) implementation" - homepage "https://p7zip.sourceforge.io/" - url "https://downloads.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2" - sha256 "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "bb715042a9067df735cd7d032a15988da430fbf5a297d9624b9a4a021af6fea2" => :mojave - sha256 "fb52fc214eb4ecd032666997976a514212adcb3c33ca23f15547310d5dc14a6e" => :high_sierra - sha256 "a2b914eebce9108f278e33b53ca798999eb81397c370bd1eaa7f63ddc5e51867" => :sierra - sha256 "229fc3a0badd5325e69b93121c9d55e7860110093e57ef46af063daccb2af372" => :el_capitan - end - - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/p/p7zip/p7zip_16.02+dfsg-6.debian.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/p/p7zip/p7zip_16.02+dfsg-6.debian.tar.xz" - sha256 "fab0be1764efdbde1804072f1daa833de4e11ea65f718ad141a592404162643c" - apply "patches/12-CVE-2016-9296.patch", - "patches/13-CVE-2017-17969.patch" - end - - def install - mv "makefile.macosx_llvm_64bits", "makefile.machine" - system "make", "all3", - "CC=#{ENV.cc} $(ALLFLAGS)", - "CXX=#{ENV.cxx} $(ALLFLAGS)" - system "make", "DEST_HOME=#{prefix}", - "DEST_MAN=#{man}", - "install" - end - - test do - (testpath/"foo.txt").write("hello world!\n") - system bin/"7z", "a", "-t7z", "foo.7z", "foo.txt" - system bin/"7z", "e", "foo.7z", "-oout" - assert_equal "hello world!\n", File.read(testpath/"out/foo.txt") - end -end diff --git a/Formula/pacapt.rb b/Formula/pacapt.rb deleted file mode 100644 index 51316bc7882d6..0000000000000 --- a/Formula/pacapt.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Pacapt < Formula - desc "Package manager in the style of Arch's pacman" - homepage "https://github.com/icy/pacapt" - url "https://github.com/icy/pacapt/archive/v2.4.0.tar.gz" - sha256 "9f43d727ae25750661c155126479f00d9742ef5623a05b98da11561cd402534e" - - bottle do - cellar :any_skip_relocation - sha256 "15a4adaeae087d3f7d21074293bd401a4a63e56ebdd307cce3054039bd4ed9d1" => :mojave - sha256 "041c799bd75724e4a25ab4594a64dbe4fdd3ee152e68b552cf9564d9051972d5" => :high_sierra - sha256 "041c799bd75724e4a25ab4594a64dbe4fdd3ee152e68b552cf9564d9051972d5" => :sierra - end - - def install - bin.mkpath - system "make", "install", "BINDIR=#{bin}", "VERSION=#{version}" - end - - test do - system "#{bin}/pacapt", "-Ss", "wget" - end -end diff --git a/Formula/pachi.rb b/Formula/pachi.rb deleted file mode 100644 index 7753539eab704..0000000000000 --- a/Formula/pachi.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Pachi < Formula - desc "Software for the Board Game of Go/Weiqi/Baduk" - homepage "http://pachi.or.cz/" - url "https://repo.or.cz/pachi.git/snapshot/pachi-11.00-retsugen.tar.gz" - sha256 "2aaf9aba098d816d20950d283c8eaed522f3fa71f68390a4c384c0c1ab03cd6f" - revision 1 - head "https://github.com/pasky/pachi.git" - - bottle do - cellar :any_skip_relocation - sha256 "0b415ef29c6636bcdff11cb56dba0d3822d826cf6f2313427337695ba249e47d" => :mojave - sha256 "0d32845e7628104c0748c8263c4da549766cfada77adcdb7d02141a72b29c69a" => :high_sierra - sha256 "738716a5b3cbb1d23ff52db5a4375a014060ed9d836f938be9200bfd25b83324" => :sierra - sha256 "0296a8eab88a76533da8c45630d53bf54c98236b061666ebba72a0065d32ca7c" => :el_capitan - sha256 "88480b1583b55e3eb05dd1f3b32617024873465f09d19e5998c2c81afb4d9dba" => :yosemite - end - - fails_with :clang if MacOS.version <= :mavericks - - resource "patterns" do - url "https://sainet-dist.s3.amazonaws.com/pachi_patterns.zip" - sha256 "73045eed2a15c5cb54bcdb7e60b106729009fa0a809d388dfd80f26c07ca7cbc" - end - - resource "book" do - url "https://gnugo.baduk.org/books/ra6.zip" - sha256 "1e7ffc75c424e94338308c048aacc479da6ac5cbe77c0df8adc733956872485a" - end - - def install - ENV["MAC"] = "1" - ENV["DOUBLE_FLOATING"] = "1" - - system "make" - bin.install "pachi" - - pkgshare.install resource("patterns") - pkgshare.install resource("book") - end - - def caveats; <<~EOS - This formula also downloads additional data, such as opening books - and pattern files. They are stored in #{opt_pkgshare}. - - At present, pachi cannot be pointed to external files, so make sure - to set the working directory to #{opt_pkgshare} if you want pachi - to take advantage of these additional files. - EOS - end - - test do - assert_match /^= [A-T][0-9]+$/, pipe_output("#{bin}/pachi", "genmove b\n", 0) - end -end diff --git a/Formula/packer-completion.rb b/Formula/packer-completion.rb deleted file mode 100644 index 5036ba5e4960b..0000000000000 --- a/Formula/packer-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class PackerCompletion < Formula - desc "Bash completion for Packer" - homepage "https://github.com/mrolli/packer-bash-completion" - url "https://github.com/mrolli/packer-bash-completion/archive/1.0.0.tar.gz" - sha256 "20ebfacd3f3a60f8dbd09e25b97d3b6e5049cbdf00a2d607fe79eaaef39e1eea" - head "https://github.com/mrolli/packer-bash-completion.git" - - bottle :unneeded - - def install - bash_completion.install "packer" - end - - test do - assert_match "-F _packer_completion", - shell_output("source #{bash_completion}/packer && complete -p packer") - end -end diff --git a/Formula/packer.rb b/Formula/packer.rb deleted file mode 100644 index 99d27076798fa..0000000000000 --- a/Formula/packer.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Packer < Formula - desc "Tool for creating identical machine images for multiple platforms" - homepage "https://packer.io" - url "https://github.com/hashicorp/packer.git", - :tag => "v1.3.3", - :revision => "508b6efb4ababd3efa3614033f9529a30970899d" - head "https://github.com/hashicorp/packer.git" - - bottle do - cellar :any_skip_relocation - sha256 "e64d9e9f418f07a310e952edcf7c697a76e189c94f3432404c45d4ef54aff60f" => :mojave - sha256 "1e73d0a14a5ec13e9ddf28f143828524ee9dd740224355d710be8ecab8e31dac" => :high_sierra - sha256 "2333c971f8f0cb7ebbf693af8b0d2c3918d65b57e4fb3ac7fc30cc1c19c68755" => :sierra - end - - depends_on "go" => :build - depends_on "govendor" => :build - depends_on "gox" => :build - - def install - ENV["XC_OS"] = "darwin" - ENV["XC_ARCH"] = MacOS.prefer_64_bit? ? "amd64" : "386" - ENV["GOPATH"] = buildpath - - packerpath = buildpath/"src/github.com/hashicorp/packer" - packerpath.install Dir["{*,.git}"] - - cd packerpath do - # Avoid running `go get` - inreplace "Makefile" do |s| - s.gsub! "go get github.com/mitchellh/gox", "" - s.gsub! "go get golang.org/x/tools/cmd/stringer", "" - s.gsub! "go get github.com/kardianos/govendor", "" - end - - (buildpath/"bin").mkpath - if build.head? - system "make", "bin" - else - system "make", "releasebin" - end - bin.install buildpath/"bin/packer" - zsh_completion.install "contrib/zsh-completion/_packer" - prefix.install_metafiles - end - end - - test do - minimal = testpath/"minimal.json" - minimal.write <<~EOS - { - "builders": [{ - "type": "amazon-ebs", - "region": "us-east-1", - "source_ami": "ami-59a4a230", - "instance_type": "m3.medium", - "ssh_username": "ubuntu", - "ami_name": "homebrew packer test {{timestamp}}" - }], - "provisioners": [{ - "type": "shell", - "inline": [ - "sleep 30", - "sudo apt-get update" - ] - }] - } - EOS - system "#{bin}/packer", "validate", "-syntax-only", minimal - end -end diff --git a/Formula/packetbeat.rb b/Formula/packetbeat.rb deleted file mode 100644 index 0c70c7fd37198..0000000000000 --- a/Formula/packetbeat.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Packetbeat < Formula - desc "Lightweight Shipper for Network Data" - homepage "https://www.elastic.co/products/beats/packetbeat" - # Pinned at 6.2.x because of a licencing issue - # See: https://github.com/Homebrew/homebrew-core/pull/28995 - url "https://github.com/elastic/beats/archive/v6.2.4.tar.gz" - sha256 "87d863cf55863329ca80e76c3d813af2960492f4834d4fea919f1d4b49aaf699" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "78a69711df0bd6000c6ac9175d0722eb63036742aa95685789f52ab8c69230c2" => :mojave - sha256 "c49e265502b3be8c83ec949e1c25781ca2560a2956fe4bdcb462dd871c35a4b7" => :high_sierra - sha256 "db873b1e0f6344a316b234402f8994b12eef03eb4deb662b50277e6eabea8053" => :sierra - sha256 "a655b33e3a1602a68ae3e2954cb03bd3b3f2d17954a68b9df2e48eb990c8c140" => :el_capitan - end - - depends_on "go" => :build - depends_on "python@2" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages" - - resource("virtualenv").stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" - - cd "src/github.com/elastic/beats/packetbeat" do - system "make" - # prevent downloading binary wheels during python setup - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "make", "DEV_OS=darwin", "update" - - inreplace "packetbeat.yml", "packetbeat.interfaces.device: any", "packetbeat.interfaces.device: en0" - - (etc/"packetbeat").install Dir["packetbeat.*", "fields.yml"] - (libexec/"bin").install "packetbeat" - prefix.install "_meta/kibana" - end - - prefix.install_metafiles buildpath/"src/github.com/elastic/beats" - - (bin/"packetbeat").write <<~EOS - #!/bin/sh - exec #{libexec}/bin/packetbeat \ - --path.config #{etc}/packetbeat \ - --path.data #{var}/lib/packetbeat \ - --path.home #{prefix} \ - --path.logs #{var}/log/packetbeat \ - "$@" - EOS - end - - plist_options :manual => "packetbeat" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/packetbeat - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/packetbeat", "devices" - end -end diff --git a/Formula/packetq.rb b/Formula/packetq.rb deleted file mode 100644 index 26e79d55b3386..0000000000000 --- a/Formula/packetq.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Packetq < Formula - desc "SQL-frontend to PCAP-files" - homepage "https://www.dns-oarc.net/tools/packetq" - url "https://www.dns-oarc.net/files/packetq/packetq-1.4.1.tar.gz" - sha256 "de374930dcc36c4b23ef4807ac798016fef6f45d29d3464f993df21e154e57d1" - - bottle do - cellar :any_skip_relocation - sha256 "58d903042f0fb1c352bdd422f087c444796dc11161d50de69093e4a583d02b59" => :mojave - sha256 "299409c99a253199b8b5896ecc8f1490ef4989ff72b10abd2651981a0bd47974" => :high_sierra - sha256 "eda7fdbbfc232e370b03e762c24551e92c3207f23f66e42db1c9ec10c448e1e1" => :sierra - sha256 "1cc4d10a81e062c41d7641d8fc3a7e94a1bf3b9e92ad6c4d70c8bdc730cee1d4" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/packetq --csv -s 'select id from dns' -") - assert_equal '"id"', output.chomp - end -end diff --git a/Formula/packmol.rb b/Formula/packmol.rb deleted file mode 100644 index 9c7fd0d2ef4a2..0000000000000 --- a/Formula/packmol.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Packmol < Formula - desc "Packing optimization for molecular dynamics simulations" - homepage "https://www.ime.unicamp.br/~martinez/packmol/" - url "https://github.com/leandromartinez98/packmol/archive/18.169.tar.gz" - sha256 "8acf2cbc742a609e763eb00cae55aecd09af2edb4cc4e931706e2f06ac380de9" - head "https://github.com/leandromartinez98/packmol.git" - - bottle do - sha256 "5b66edef2e722da0b565bdfee29df4dac53e43f20f94d7e02ffc0e8e7adf3443" => :mojave - sha256 "74e54488ffe1f078f2e703f475e20639c6de5e518b8c9c010c29a2a74786bb10" => :high_sierra - sha256 "32e6f9cc2f6d4e010982e63b5e316afe3786f38e4a5bb5b6ff1908815cc11192" => :sierra - sha256 "ca93be32b9abda9bf4c6a7f70404122108f66e1199da4e979cf96be37d1e34a6" => :el_capitan - end - - depends_on "gcc" # for gfortran - - resource "examples" do - url "https://www.ime.unicamp.br/~martinez/packmol/examples/examples.tar.gz" - sha256 "97ae64bf5833827320a8ab4ac39ce56138889f320c7782a64cd00cdfea1cf422" - end - - def install - system "./configure" - system "make" - bin.install("packmol") - pkgshare.install "solvate.tcl" - (pkgshare/"examples").install resource("examples") - end - - test do - cp Dir["#{pkgshare}/examples/*"], testpath - system bin/"packmol < interface.inp" - end -end diff --git a/Formula/pacman4console.rb b/Formula/pacman4console.rb deleted file mode 100644 index 5ad6f715126c6..0000000000000 --- a/Formula/pacman4console.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Pacman4console < Formula - desc "Pacman for console" - homepage "https://sites.google.com/site/doctormike/pacman.html" - url "https://sites.google.com/site/doctormike/pacman-1.3.tar.gz" - sha256 "9a5c4a96395ce4a3b26a9896343a2cdf488182da1b96374a13bf5d811679eb90" - - bottle do - sha256 "ea3959a6317d2a3cfdb317622dafa97be5763b13509e06c7c0199eda4e349d33" => :mojave - sha256 "8b75a7198742924ea2e7545c4ed98dac3d28dcdc9469ff097666b0249a8ff2f7" => :high_sierra - sha256 "496938f00189695a57af2ef862b97c237d8bcf4c422b8e1d24c309cb8e83d0cd" => :sierra - sha256 "713a6a48016edcd709c27f84c5e743a0f95f95a3d01da7303a2562b2f3dee68d" => :el_capitan - sha256 "0177bce0045d06947a44cd810e3af8abdf2853981fe8564782a83474fc45f727" => :yosemite - end - - def install - system "make", "prefix=#{prefix}", "datarootdir=#{pkgshare}" - bin.install ["pacman", "pacmanedit"] - (pkgshare+"pacman").install "Levels" - end -end diff --git a/Formula/pacparser.rb b/Formula/pacparser.rb deleted file mode 100644 index 122e341088a36..0000000000000 --- a/Formula/pacparser.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Pacparser < Formula - desc "Library to parse proxy auto-config (PAC) files" - homepage "https://github.com/pacparser/pacparser" - url "https://github.com/pacparser/pacparser/archive/1.3.7.tar.gz" - sha256 "575c5d8096b4c842b2af852bbb8bcfde96170b28b49f33249dbe2057a8beea13" - head "https://github.com/pacparser/pacparser.git" - - bottle do - cellar :any - rebuild 1 - sha256 "5a4db686679c753a806fa2e2df5e93263f973f447f9357fcdadc071687c10071" => :mojave - sha256 "1bb0af844e0cfd58357987f2f9e6f82b0e72a13df961f13ad8b81b3e00a3dff2" => :high_sierra - sha256 "719e5eadacf71e3a2e863447609322c45f3be3a9d3ee63373c05a9a2ae7f31b8" => :sierra - end - - def install - # Disable parallel build due to upstream concurrency issue. - # https://github.com/pacparser/pacparser/issues/27 - ENV.deparallelize - ENV["VERSION"] = version - Dir.chdir "src" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # example pacfile taken from upstream sources - (testpath/"test.pac").write <<~'EOS' - function FindProxyForURL(url, host) { - - if ((isPlainHostName(host) || - dnsDomainIs(host, ".example.edu")) && - !localHostOrDomainIs(host, "www.example.edu")) - return "plainhost/.example.edu"; - - // Return externaldomain if host matches .*\.externaldomain\.example - if (/.*\.externaldomain\.example/.test(host)) - return "externaldomain"; - - // Test if DNS resolving is working as intended - if (dnsDomainIs(host, ".google.com") && - isResolvable(host)) - return "isResolvable"; - - // Test if DNS resolving is working as intended - if (dnsDomainIs(host, ".notresolvabledomain.invalid") && - !isResolvable(host)) - return "isNotResolvable"; - - if (/^https:\/\/.*$/.test(url)) - return "secureUrl"; - - if (isInNet(myIpAddress(), '10.10.0.0', '255.255.0.0')) - return '10.10.0.0'; - - if ((typeof(myIpAddressEx) == "function") && - isInNetEx(myIpAddressEx(), '3ffe:8311:ffff/48')) - return '3ffe:8311:ffff'; - - else - return "END-OF-SCRIPT"; - } - EOS - # Functional tests from upstream sources - test_sets = [ - { - "cmd" => "-c 3ffe:8311:ffff:1:0:0:0:0 -u http://www.example.com", - "res" => "3ffe:8311:ffff", - }, - { - "cmd" => "-c 0.0.0.0 -u http://www.example.com", - "res" => "END-OF-SCRIPT", - }, - { - "cmd" => "-u http://host1", - "res" => "plainhost/.example.edu", - }, - { - "cmd" => "-u http://www1.example.edu", - "res" => "plainhost/.example.edu", - }, - { - "cmd" => "-u http://manugarg.externaldomain.example", - "res" => "externaldomain", - }, - { - "cmd" => "-u https://www.google.com", ## internet - "res" => "isResolvable", ## required - }, - { - "cmd" => "-u https://www.notresolvabledomain.invalid", - "res" => "isNotResolvable", - }, - { - "cmd" => "-u https://www.example.com", - "res" => "secureUrl", - }, - { - "cmd" => "-c 10.10.100.112 -u http://www.example.com", - "res" => "10.10.0.0", - }, - ] - # Loop and execute tests - test_sets.each do |t| - assert_equal t["res"], - shell_output("#{bin}/pactester -p #{testpath}/test.pac " + - t["cmd"]).strip - end - end -end diff --git a/Formula/pacvim.rb b/Formula/pacvim.rb deleted file mode 100644 index 1a2f5b736e71b..0000000000000 --- a/Formula/pacvim.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Pacvim < Formula - desc "Learn vim commands via a game" - homepage "https://github.com/jmoon018/PacVim" - url "https://github.com/jmoon018/PacVim/archive/v1.1.1.tar.gz" - sha256 "c869c5450fbafdfe8ba8a8a9bba3718775926f276f0552052dcfa090d21acb28" - head "https://github.com/jmoon018/PacVim.git" - - bottle do - sha256 "adb164c1decfda7414827e3c7932f6b49c055ef093618dfc6f9381f118df2e73" => :mojave - sha256 "ce8a3d33ea044109ca9d32e486a8373e732dfea439bc68169335a260c5947659" => :high_sierra - sha256 "7cdbfca5fe0209e68f3f79e7949a6e60c96435c3a8da68e59036142d54a706dc" => :sierra - sha256 "91b0806e76c36ddb814f6a54cac2722b21784f9be1604aee45e7091099172f8a" => :el_capitan - sha256 "36b138084ac97f4eb28bc6b7068e19dc28cc478459fc59de12e8e849820ac65d" => :yosemite - sha256 "1f5e908420b40f2af868727b7065a51ebc39525c241b983f7f9b9449b95fdc1c" => :mavericks - sha256 "13f43d00b08183febdc7afcba0553cd512dd9ae23a7fd770b09e3eedb4f8ea37" => :mountain_lion - end - - needs :cxx11 - - def install - ENV.cxx11 - system "make", "install", "PREFIX=#{prefix}" - end -end diff --git a/Formula/pagmo.rb b/Formula/pagmo.rb deleted file mode 100644 index aba4950c824ea..0000000000000 --- a/Formula/pagmo.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Pagmo < Formula - desc "Scientific library for massively parallel optimization" - homepage "https://esa.github.io/pagmo2/" - url "https://github.com/esa/pagmo2/archive/v2.10.tar.gz" - sha256 "2fa95e2b464ddeadb9fc09bd314081293f02a1b6abc11c0b05064729a077227c" - - bottle do - cellar :any_skip_relocation - sha256 "11a158a55b100b182c49807d68d5400ca55d98011535b4d923f1ee232f58a9b0" => :mojave - sha256 "2c8e09c8e42c16f36f4c5b4fa82b465402fd6b50e5c55e9b4befdae04636a5fc" => :high_sierra - sha256 "2c8e09c8e42c16f36f4c5b4fa82b465402fd6b50e5c55e9b4befdae04636a5fc" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "eigen" - depends_on "nlopt" - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", "-DPAGMO_WITH_EIGEN3=ON", "-DPAGMO_WITH_NLOPT=ON", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - #include - #include - #include - #include - #include - - using namespace pagmo; - - int main() - { - // 1 - Instantiate a pagmo problem constructing it from a UDP - // (user defined problem). - problem prob{schwefel(30)}; - - // 2 - Instantiate a pagmo algorithm - algorithm algo{sade(100)}; - - // 3 - Instantiate an archipelago with 16 islands having each 20 individuals - archipelago archi{16, algo, prob, 20}; - - // 4 - Run the evolution in parallel on the 16 separate islands 10 times. - archi.evolve(10); - - // 5 - Wait for the evolutions to be finished - archi.wait_check(); - - // 6 - Print the fitness of the best solution in each island - for (const auto &isl : archi) { - std::cout << isl.get_population().champion_f()[0] << std::endl; - } - - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{Formula["eigen"].include}/eigen3", - "-I#{include}", "-std=c++11", "-o", "test" - system "./test" - end -end diff --git a/Formula/pakchois.rb b/Formula/pakchois.rb deleted file mode 100644 index efcafffbd5990..0000000000000 --- a/Formula/pakchois.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Pakchois < Formula - desc "PKCS #11 wrapper library" - homepage "https://web.archive.org/web/www.manyfish.co.uk/pakchois/" - url "https://web.archive.org/web/20161220165909/www.manyfish.co.uk/pakchois/pakchois-0.4.tar.gz" - sha256 "d73dc5f235fe98e4d1e8c904f40df1cf8af93204769b97dbb7ef7a4b5b958b9a" - - bottle do - sha256 "40909ddce4f17e53dd3b6bd68b61c45cfd824ccc486fe2bf0e76be5f55d5681d" => :mojave - sha256 "ee7978dad7998e747e468f1b9afaa692304efb2ca857d4c0903945f030841fb7" => :high_sierra - sha256 "84a90b245c59676817d4c9100d64d7747068e0d3557fc5c3218d8a83a98f78fe" => :sierra - sha256 "b02057a2cc01daa05754c537820b58d7c77b632fc5fdb2a6f6dcec77341fe65b" => :el_capitan - sha256 "30a06a914f2025d7d23dff48fa8523be455bf925a3282a8c35f56779fd8bd27a" => :yosemite - sha256 "03d6ab9d51bdebf61b3c415908e222467fd31cefc4811200eee9e407c604f7f5" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/paket.rb b/Formula/paket.rb deleted file mode 100644 index 1816f1deafb77..0000000000000 --- a/Formula/paket.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Paket < Formula - desc "Dependency manager for .NET with support for NuGet and Git repositories" - homepage "https://fsprojects.github.io/Paket/" - url "https://github.com/fsprojects/Paket/releases/download/5.194.4/paket.exe" - sha256 "26d72b270cdf47dab33f981a08f65d230a5fd35f6eb3718d21afc9a641902600" - - bottle :unneeded - - depends_on "mono" - - def install - libexec.install "paket.exe" - (bin/"paket").write <<~EOS - #!/bin/bash - mono #{libexec}/paket.exe "$@" - EOS - end - - test do - test_package_id = "Paket.Test" - test_package_version = "1.2.3" - - touch testpath/"paket.dependencies" - touch testpath/"testfile.txt" - - system bin/"paket", "install" - assert_predicate testpath/"paket.lock", :exist? - - (testpath/"paket.template").write <<~EOS - type file - - id #{test_package_id} - version #{test_package_version} - authors Test package author - - description - Description of this test package - - files - testfile.txt ==> lib - EOS - - system bin/"paket", "pack", "output", testpath - assert_predicate testpath/"#{test_package_id}.#{test_package_version}.nupkg", :exist? - end -end diff --git a/Formula/pam-u2f.rb b/Formula/pam-u2f.rb deleted file mode 100644 index 52a26e5aebe8e..0000000000000 --- a/Formula/pam-u2f.rb +++ /dev/null @@ -1,45 +0,0 @@ -class PamU2f < Formula - desc "Provides an easy way to use U2F-compliant authenticators with PAM" - homepage "https://developers.yubico.com/pam-u2f/" - url "https://developers.yubico.com/pam-u2f/Releases/pam_u2f-1.0.7.tar.gz" - sha256 "034aad8e29b159443dd6c1b7740006addc83d0659304fc4b0b4fb592f768e7cf" - head "https://github.com/Yubico/pam-u2f.git" - - bottle do - cellar :any - sha256 "ed80bbd945c357cf4cd184fb97a742f975cbd49f10eee7ab78bea19a13dd0d63" => :mojave - sha256 "aeea6df4ee9fd8a1625a15aa5a1d1a09429cf4b48c697e0a423dd9874c4b868e" => :high_sierra - sha256 "873567775f9cf3a1d87c8dcc93d7a5cf1d41e536595b8b2e2b3bca12eed1e595" => :sierra - sha256 "10730971bc1100e4288204cec75f3115235e0cbbaef19f8acad1ddf9a4aeb0d2" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libu2f-host" - depends_on "libu2f-server" - - def install - system "autoreconf", "--install" - - ENV["A2X"] = "#{Formula["asciidoc"].opt_bin}/a2x --no-xmllint" - system "./configure", "--prefix=#{prefix}", "--with-pam-dir=#{lib}/pam" - system "make", "install" - end - - def caveats; <<~EOS - To use a U2F key for PAM authentication, specify the full path to the - module (#{opt_lib}/pam/pam_u2f.so) in a PAM - configuration. You can find all PAM configurations in /etc/pam.d. - - For further installation instructions, please visit - https://developers.yubico.com/pam-u2f/#installation. - EOS - end - - test do - system "#{bin}/pamu2fcfg", "--version" - end -end diff --git a/Formula/pam_yubico.rb b/Formula/pam_yubico.rb deleted file mode 100644 index c1d1a48a16a81..0000000000000 --- a/Formula/pam_yubico.rb +++ /dev/null @@ -1,33 +0,0 @@ -class PamYubico < Formula - desc "Yubico pluggable authentication module" - homepage "https://developers.yubico.com/yubico-pam/" - url "https://developers.yubico.com/yubico-pam/Releases/pam_yubico-2.26.tar.gz" - sha256 "2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966" - - bottle do - cellar :any - sha256 "bb57ab33d7b79a6461648cd510d5524ea636db738c46bba5aa8f1fe8451c4e49" => :mojave - sha256 "a9a21d8b84d95c76d13118d1c525b93f9bbdf5c49b8aae5304df966d1a1ea669" => :high_sierra - sha256 "7b0027b330f0f2bb6da798a7b405d80e09db71892c403206ba6c31bed5a3c804" => :sierra - sha256 "102680d53f9ef736089e1e4a4eeaab60962fbbf4156c1fb3e77d82f425b0eed7" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libyubikey" - depends_on "ykclient" - depends_on "ykpers" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "./configure", "--prefix=#{prefix}", - "--with-libyubikey-prefix=#{Formula["libyubikey"].opt_prefix}", - "--with-libykclient-prefix=#{Formula["ykclient"].opt_prefix}" - system "make", "install" - end - - test do - # Not much more to test without an actual yubikey device. - system "#{bin}/ykpamcfg", "-V" - end -end diff --git a/Formula/pandoc-citeproc.rb b/Formula/pandoc-citeproc.rb deleted file mode 100644 index 32628183b1e12..0000000000000 --- a/Formula/pandoc-citeproc.rb +++ /dev/null @@ -1,55 +0,0 @@ -require "language/haskell" - -class PandocCiteproc < Formula - include Language::Haskell::Cabal - - desc "Library and executable for using citeproc with pandoc" - homepage "https://github.com/jgm/pandoc-citeproc" - url "https://hackage.haskell.org/package/pandoc-citeproc-0.15.0.1/pandoc-citeproc-0.15.0.1.tar.gz" - sha256 "29db5f2aad3225859727271855461724574f3695ab3856ceac33b24a55ae92f8" - head "https://github.com/jgm/pandoc-citeproc.git" - - bottle do - sha256 "d3340b2e2dfabd3b7834d79dcd6bc3e6881bf8ff8590925a301935bc7715d848" => :mojave - sha256 "4bbdebdd9869705997ca54174de6f1f5ac9b78df9c8637889bf4e67fca2eba8b" => :high_sierra - sha256 "e91d2532e758a8a88d7bd1079110c2fdcbf609a4925255012dd67f526a7cf8a6" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "pandoc" - - def install - args = [] - args << "--constraint=cryptonite -support_aesni" if MacOS.version <= :lion - install_cabal_package *args - end - - test do - (testpath/"test.bib").write <<~EOS - @Book{item1, - author="John Doe", - title="First Book", - year="2005", - address="Cambridge", - publisher="Cambridge University Press" - } - EOS - expected = <<~EOS - --- - references: - - id: item1 - type: book - author: - - family: Doe - given: John - issued: - - year: 2005 - title: First book - publisher: Cambridge University Press - publisher-place: Cambridge - ... - EOS - assert_equal expected, shell_output("#{bin}/pandoc-citeproc -y test.bib") - end -end diff --git a/Formula/pandoc-crossref.rb b/Formula/pandoc-crossref.rb deleted file mode 100644 index 2af153a4f675b..0000000000000 --- a/Formula/pandoc-crossref.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "language/haskell" - -class PandocCrossref < Formula - include Language::Haskell::Cabal - - desc "Pandoc filter for numbering and cross-referencing" - homepage "https://github.com/lierdakil/pandoc-crossref" - url "https://hackage.haskell.org/package/pandoc-crossref-0.3.4.0/pandoc-crossref-0.3.4.0.tar.gz" - sha256 "ff5515e76884aa0d7f9991fc22853622b185a92f940084d2d396133eddc56e97" - - bottle do - cellar :any_skip_relocation - sha256 "b921f684a1f3418cbc0b315c249c087f0dd76dba841bb88174204d3b2ed1fb4c" => :mojave - sha256 "085ae0758587544cf0f49c388579982d66fcd7db2806de4a6fc965f19119bd5e" => :high_sierra - sha256 "de5daf23c19c4f34d5ba3a22ce0a2fd8ba9bda8e867620ea5a50106d71aeb031" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "pandoc" - - def install - args = [] - args << "--constraint=cryptonite -support_aesni" if MacOS.version <= :lion - install_cabal_package *args - end - - test do - (testpath/"hello.md").write <<~EOS - Demo for pandoc-crossref. - See equation @eq:eqn1 for cross-referencing. - Display equations are labelled and numbered - - $$ P_i(x) = \\sum_i a_i x^i $$ {#eq:eqn1} - EOS - system Formula["pandoc"].bin/"pandoc", "-F", bin/"pandoc-crossref", "-o", "out.html", "hello.md" - assert_match "∑", (testpath/"out.html").read - end -end diff --git a/Formula/pandoc.rb b/Formula/pandoc.rb deleted file mode 100644 index 5d300a26a943d..0000000000000 --- a/Formula/pandoc.rb +++ /dev/null @@ -1,42 +0,0 @@ -require "language/haskell" - -class Pandoc < Formula - include Language::Haskell::Cabal - - desc "Swiss-army knife of markup format conversion" - homepage "https://pandoc.org/" - url "https://hackage.haskell.org/package/pandoc-2.5/pandoc-2.5.tar.gz" - sha256 "d57dc5db78a0a304de70436fe59a7599ab0c6d0fb2ab6704eeae498a4536222e" - head "https://github.com/jgm/pandoc.git" - - bottle do - sha256 "daec3da0ebbeb6674a6efc2cc8a95c5563fd393ffa102fa1d8b589b5c7026d3f" => :mojave - sha256 "d8a8ad1220ff8aa672e3c6fe88abdd22b27fd69f5894e8f7821e70f0c7650154" => :high_sierra - sha256 "cd93731b019ed9a377761fc277ecce40a9778306d24a0addafa4c22ab42e5319" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - cabal_sandbox do - args = [] - args << "--constraint=cryptonite -support_aesni" if MacOS.version <= :lion - install_cabal_package *args - end - (bash_completion/"pandoc").write `#{bin}/pandoc --bash-completion` - end - - test do - input_markdown = <<~EOS - # Homebrew - - A package manager for humans. Cats should take a look at Tigerbrew. - EOS - expected_html = <<~EOS -

Homebrew

-

A package manager for humans. Cats should take a look at Tigerbrew.

- EOS - assert_equal expected_html, pipe_output("#{bin}/pandoc -f markdown -t html5", input_markdown) - end -end diff --git a/Formula/pango.rb b/Formula/pango.rb deleted file mode 100644 index 2fd86f7ebd256..0000000000000 --- a/Formula/pango.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Pango < Formula - desc "Framework for layout and rendering of i18n text" - homepage "https://www.pango.org/" - url "https://download.gnome.org/sources/pango/1.42/pango-1.42.4.tar.xz" - sha256 "1d2b74cd63e8bd41961f2f8d952355aa0f9be6002b52c8aa7699d9f5da597c9d" - - bottle do - sha256 "2e0b04d458fc0c856d41d14642af4cde2da7e98c241c40ed5188a803710d3921" => :mojave - sha256 "724efe4176988ca7dd3d5668929064d0a1ec9ed95de56cea5050c4b349a509b8" => :high_sierra - sha256 "707e4f73f2cb17cf3584312a7f768de4b2b7b1868b1620826f0ed93072b0a321" => :sierra - sha256 "63181347fdcedd1a797121b93126ed3e4a45907c39efa693b2803da112487f73" => :el_capitan - end - - head do - url "https://gitlab.gnome.org/GNOME/pango.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gtk-doc" => :build - depends_on "libtool" => :build - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "fontconfig" - depends_on "fribidi" - depends_on "glib" - depends_on "harfbuzz" - - # This fixes a font-size problem in gtk - # For discussion, see https://bugzilla.gnome.org/show_bug.cgi?id=787867 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e0aa10/pango/pango_font_size.patch" - sha256 "d5ece753cf393ef507dd2b0415721b4381159da5e2f40793c6d85741b1b163bc" - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-html-dir=#{share}/doc", - "--enable-introspection=yes", - "--enable-static", - "--without-xft" - - system "make" - system "make", "install" - end - - test do - system "#{bin}/pango-view", "--version" - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - PangoFontMap *fontmap; - int n_families; - PangoFontFamily **families; - fontmap = pango_cairo_font_map_get_default(); - pango_font_map_list_families (fontmap, &families, &n_families); - g_free(families); - return 0; - } - EOS - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gettext = Formula["gettext"] - glib = Formula["glib"] - libpng = Formula["libpng"] - pixman = Formula["pixman"] - flags = %W[ - -I#{cairo.opt_include}/cairo - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/pango-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{cairo.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lcairo - -lglib-2.0 - -lgobject-2.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/pangomm.rb b/Formula/pangomm.rb deleted file mode 100644 index 99789d3bcbf46..0000000000000 --- a/Formula/pangomm.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Pangomm < Formula - desc "C++ interface to Pango" - homepage "https://www.pango.org/" - url "https://download.gnome.org/sources/pangomm/2.42/pangomm-2.42.0.tar.xz" - sha256 "ca6da067ff93a6445780c0b4b226eb84f484ab104b8391fb744a45cbc7edbf56" - - bottle do - cellar :any - sha256 "c008d458e22ce9f9cfaf4ecb05fa240885a8fbc43d40baa70a3acb66de81627e" => :mojave - sha256 "6b25f12f26122818dd7888de85efabe0fc5362e97e6ebd487a735d5011ca8bd5" => :high_sierra - sha256 "2e6c6e412d53446ed21018a68eca0ea227d16c5954c74f564b4f430fdc519ebd" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "cairomm" - depends_on "glibmm" - depends_on "pango" - - needs :cxx11 - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(int argc, char *argv[]) - { - Pango::FontDescription fd; - return 0; - } - EOS - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - harfbuzz = Formula["harfbuzz"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{cairo.opt_include}/cairo - -I#{cairomm.opt_include}/cairomm-1.0 - -I#{cairomm.opt_lib}/cairomm-1.0/include - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{glibmm.opt_include}/glibmm-2.4 - -I#{glibmm.opt_lib}/glibmm-2.4/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/pangomm-1.4 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/pangomm-1.4/include - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -lcairo - -lcairomm-1.0 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lpangomm-1.4 - -lsigc-2.0 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/paperkey.rb b/Formula/paperkey.rb deleted file mode 100644 index 435c561e41596..0000000000000 --- a/Formula/paperkey.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Paperkey < Formula - desc "Extract just secret information out of OpenPGP secret keys" - homepage "https://www.jabberwocky.com/software/paperkey/" - url "https://www.jabberwocky.com/software/paperkey/paperkey-1.5.tar.gz" - sha256 "c4737943083ce92e41faf13c27a9d608105b6285c0840dfb684a7ee294142ddf" - - bottle do - cellar :any_skip_relocation - sha256 "b6d8cc4b86c7a9a5f7185cb8113aed57670c1754701dc2afb6f419775dda29a1" => :mojave - sha256 "a541e2c254870a1e53049a478dd7067537a7d3e9ededad8123fd7d9f7c48f576" => :high_sierra - sha256 "9c96b3110a0af3abb54d19f6fb73b60bbcf1868e5343ba69fde37d7abbd5714c" => :sierra - sha256 "e98cb1a1b43ec005129d6346a7d6df00bcc50ce12366bb741581f448f9321d59" => :el_capitan - end - - resource "secret.gpg" do - url "https://gist.github.com/bfontaine/5b0e3efa97e2dc42a970/raw/915e802578339ddde2967de541ed65cb76cd14b9/secret.gpg" - sha256 "eec8f32a401d1077feb19ea4b8e1816feeac02b9bfe6bd09e75c9985ff740890" - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - resource("secret.gpg").stage do - system "#{bin}/paperkey", "--secret-key", "secret.gpg", "--output", "test" - assert_predicate Pathname.pwd/"test", :exist? - end - end -end diff --git a/Formula/paps.rb b/Formula/paps.rb deleted file mode 100644 index e304a8d30ce54..0000000000000 --- a/Formula/paps.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Paps < Formula - desc "Pango to PostScript converter" - homepage "https://github.com/dov/paps" - url "https://github.com/dov/paps/archive/0.7.0.tar.gz" - sha256 "7a18e8096944a21e0d9fcfb389770d1e7672ba90569180cb5d45984914cedb13" - - bottle do - cellar :any - sha256 "d83539a5f07741571e46050c7fe444cd62ff0c8c51909a26e193e2abdd5ecd41" => :mojave - sha256 "b5599742d6b369366a9bc00f42d6f3513cfb9c670bf6199222b7580c19c1706b" => :high_sierra - sha256 "985afbb83ca67f6190f299ac8d22d929cc4b2bd12173954dab8d0ab4e7e485ef" => :sierra - sha256 "4164c3d56b5b572d38f8f30d852e56a541b587f67c063213133842421302390b" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "fontconfig" - depends_on "freetype" - depends_on "gettext" - depends_on "glib" - depends_on "pango" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "examples" - end - - test do - system bin/"paps", pkgshare/"examples/small-hello.utf8", "-o", "paps.ps" - assert_predicate testpath/"paps.ps", :exist? - assert_match "Ch\\340o", (testpath/"paps.ps").read - end -end diff --git a/Formula/par.rb b/Formula/par.rb deleted file mode 100644 index 59f220cdd95be..0000000000000 --- a/Formula/par.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Par < Formula - desc "Paragraph reflow for email" - homepage "http://www.nicemice.net/par/" - url "http://www.nicemice.net/par/Par152.tar.gz" - version "1.52" - sha256 "33dcdae905f4b4267b4dc1f3efb032d79705ca8d2122e17efdecfd8162067082" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "5f35670c248a421d3b8d4605ea689d3d40f2a9a902d91a3ad8b5d6802564d4cf" => :mojave - sha256 "a73f538602df2f35f6d10b8a50fb893a26b407e5e5bc2e2065c9c2b9bcdce668" => :high_sierra - sha256 "efa3ba3bdd3b34ad8e5089b8cd5562d8b8cf4a5e5488e54e43dfb45760a1b4fa" => :sierra - sha256 "3683d5918dc91fcd073fc8e35af2fca416b3756aff8479ff549598bcd2500e8b" => :el_capitan - sha256 "cb1042ef12ead6645653775571ebe84798b707194922030563ff4056687954e3" => :yosemite - end - - conflicts_with "rancid", :because => "both install `par` binaries" - - # Patch to add support for multibyte charsets (like UTF-8), plus Debian - # packaging. - patch do - url "http://sysmic.org/dl/par/par-1.52-i18n.4.patch" - sha256 "2ab2d6039529aa3e7aff4920c1630003b8c97c722c8adc6d7762aa34e795861e" - end - - def install - system "make", "-f", "protoMakefile" - bin.install "par" - man1.install gzip("par.1") - end - - test do - expected = "homebrew\nhomebrew\n" - assert_equal expected, pipe_output("#{bin}/par 10gqr", "homebrew homebrew") - end -end diff --git a/Formula/par2.rb b/Formula/par2.rb deleted file mode 100644 index 4be85da3ac7f2..0000000000000 --- a/Formula/par2.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Par2 < Formula - desc "Parchive: Parity Archive Volume Set for data recovery" - homepage "https://github.com/Parchive/par2cmdline" - url "https://github.com/Parchive/par2cmdline/releases/download/v0.8.0/par2cmdline-0.8.0.tar.bz2" - sha256 "496430e185f2d82e54245a0554341a1826f06c5e673fa12a10f176c7f9b42964" - - bottle do - cellar :any_skip_relocation - sha256 "b47768e76669350def4fa99bd4c5f6462a8f73446d7709c00453e1acceab66df" => :mojave - sha256 "569f6c3227a6e65de30991c3b921e321cb3b5e4e85e341042b2e3fcb00d2685e" => :high_sierra - sha256 "85ca540e5daeb33c115c6cc37ae2bcb52b4db822679471ccf31598125f475d63" => :sierra - sha256 "d6e135782c3e4279e2233cba53d5fc62dc6ea3b5c8f0d2c07c653cc66cac2bcd" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Protect a file with par2. - test_file = testpath/"some-file" - File.write(test_file, "file contents") - system "#{bin}/par2", "create", test_file - - # "Corrupt" the file by overwriting, then ask par2 to repair it. - File.write(test_file, "corrupted contents") - repair_command_output = shell_output("#{bin}/par2 repair #{test_file}") - - # Verify that par2 claimed to repair the file. - assert_match "1 file(s) exist but are damaged.", repair_command_output - assert_match "Repair complete.", repair_command_output - - # Verify that par2 actually repaired the file. - assert File.read(test_file) == "file contents" - end -end diff --git a/Formula/parallel.rb b/Formula/parallel.rb deleted file mode 100644 index 9fe5a4075bae9..0000000000000 --- a/Formula/parallel.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Parallel < Formula - desc "Shell command parallelization utility" - homepage "https://savannah.gnu.org/projects/parallel/" - url "https://ftp.gnu.org/gnu/parallel/parallel-20181222.tar.bz2" - mirror "https://ftpmirror.gnu.org/parallel/parallel-20181222.tar.bz2" - sha256 "058c9f7cf599652aef5b54cf5c95c9a5b6d57d59ce4deebebf7938f7be4da369" - head "https://git.savannah.gnu.org/git/parallel.git" - - bottle do - cellar :any_skip_relocation - sha256 "2e15c960dcc3d1685493edd7d64e0733e15cc54a7715f286089e0d4a8f9ab09d" => :mojave - sha256 "b7dae5354d62c318201f2df86bfcca2bf9d34ca74b24646353668e596cc2a2bc" => :high_sierra - sha256 "b7dae5354d62c318201f2df86bfcca2bf9d34ca74b24646353668e596cc2a2bc" => :sierra - end - - if Tab.for_name("moreutils").with?("parallel") - conflicts_with "moreutils", - :because => "both install a `parallel` executable." - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "test\ntest\n", - shell_output("#{bin}/parallel --will-cite echo ::: test test") - end -end diff --git a/Formula/parallelstl.rb b/Formula/parallelstl.rb deleted file mode 100644 index 38fc1a02bf367..0000000000000 --- a/Formula/parallelstl.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Parallelstl < Formula - desc "C++ standard library algorithms with support for execution policies" - homepage "https://github.com/intel/parallelstl" - url "https://github.com/intel/parallelstl/archive/20181204.tar.gz" - sha256 "e706db273ada1e5d971ebac2775faacf0d1f7e02aa15a754217a6566c4f2b4f8" - - bottle :unneeded - - depends_on "tbb" - - def install - include.install Dir["include/*"] - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - - int main() { - std::array arr {{5,2,3,1,4,9,7,0,8,6}}; - std::sort(std::execution::par_unseq, arr.begin(), arr.end()); - for(int i=0; i<10; i++) - assert(i==arr.at(i)); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "-L#{Formula["tbb"].opt_lib}", "-ltbb", - "-I#{include}", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/pari.rb b/Formula/pari.rb deleted file mode 100644 index 6fd528b43775f..0000000000000 --- a/Formula/pari.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Pari < Formula - desc "Computer algebra system designed for fast computations in number theory" - homepage "https://pari.math.u-bordeaux.fr/" - url "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-2.11.0.tar.gz" - sha256 "3835caccaa3e0c64764521032d89efeb8773cce841f6655fec6d58e790f4c9a1" - - bottle do - sha256 "62dd478f21d266b95bc7ef62a1cefbb760416540fa9ad4c481dab4160c61f6ae" => :mojave - sha256 "695ad213a9fbb81ca3ae948b5b597f5bd992e4f016fd04631aa031f455a2a218" => :high_sierra - sha256 "5763ae6604f64710145363b7eaf3e6a2c14f759f05329222da4ef973da1ceeed" => :sierra - sha256 "0445d9d8f3cfe90c13ed276b869b847667a4e610dc99477f02e4af356c02eff7" => :el_capitan - end - - depends_on "gmp" - depends_on "readline" - depends_on :x11 - - def install - readline = Formula["readline"].opt_prefix - gmp = Formula["gmp"].opt_prefix - system "./Configure", "--prefix=#{prefix}", - "--with-gmp=#{gmp}", - "--with-readline=#{readline}" - # make needs to be done in two steps - system "make", "all" - system "make", "install" - end - - test do - (testpath/"math.tex").write "$k_{n+1} = n^2 + k_n^2 - k_{n-1}$" - system bin/"tex2mail", testpath/"math.tex" - end -end diff --git a/Formula/parquet-tools.rb b/Formula/parquet-tools.rb deleted file mode 100644 index e9f9f1ed9ff11..0000000000000 --- a/Formula/parquet-tools.rb +++ /dev/null @@ -1,30 +0,0 @@ -class ParquetTools < Formula - desc "Apache Parquet command-line tools and utilities" - homepage "https://parquet.apache.org/" - url "https://github.com/apache/parquet-mr.git", - :tag => "apache-parquet-1.10.0", - :revision => "031a6654009e3b82020012a18434c582bd74c73a" - head "https://github.com/apache/parquet-mr.git" - - bottle do - cellar :any_skip_relocation - sha256 "80bbeb4f549cb06c1195fbd4b9170a428cf435678a579d1437d9b7f5fc0399da" => :mojave - sha256 "727a15da8f38f3a9accf1b5850e98c12a6b783d97014826442421eb2b25a1006" => :high_sierra - sha256 "9d0889dcab15c776d2878796562ec41a8e4baf539996e51714180138cb005c15" => :sierra - sha256 "5847b83a96097c31497caf966d3d28185b16912bb4017bfbc4a2dd284b3c350d" => :el_capitan - end - - depends_on "maven" => :build - - def install - cd "parquet-tools" do - system "mvn", "clean", "package", "-Plocal" - libexec.install "target/parquet-tools-#{version}.jar" - bin.write_jar_script libexec/"parquet-tools-#{version}.jar", "parquet-tools" - end - end - - test do - system "#{bin}/parquet-tools", "cat", "-h" - end -end diff --git a/Formula/parrot.rb b/Formula/parrot.rb deleted file mode 100644 index e831581e649a1..0000000000000 --- a/Formula/parrot.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Parrot < Formula - desc "Open source virtual machine (for Perl6, et al.)" - homepage "http://www.parrot.org/" - head "https://github.com/parrot/parrot.git" - - stable do - url "http://ftp.parrot.org/releases/supported/8.1.0/parrot-8.1.0.tar.bz2" - sha256 "caf356acab64f4ea50595a846808e81d0be8ada8267afbbeb66ddb3c93cb81d3" - - # remove at 8.2.0, already in HEAD - patch do - url "https://github.com/parrot/parrot/commit/7524bf5384ddebbb3ba06a040f8acf972aa0a3ba.diff?full_index=1" - sha256 "55b6cae8b48e1f942c7be83955250b0a6d3b1132539b42cee532c9b2b6952b0a" - end - - # remove at 8.2.0, already in HEAD - patch do - url "https://github.com/parrot/parrot/commit/854aec65d6de8eaf5282995ab92100a2446f0cde.diff?full_index=1" - sha256 "3452227cfdf4827ef26d0d9d09db5528c20fbbc19a95f76fb4356b19cfb88e88" - end - end - - bottle do - sha256 "91a463baca8872dbd12183a61326c78c8ac0e05a01bd1a0421578cb0f6e58427" => :mojave - sha256 "c3ce1d1fe24e6f5172629cd092cc03db16b957649865af052ee6a72d75fa10e6" => :high_sierra - sha256 "e8c50fee6a2111412b5f6ac31292f3ff7d3e4dd2be9a02cc94a890026588ae63" => :sierra - sha256 "3b78be029276ca642cb2bc705888ed0cd7745c0398cf90bf67031190191c76a8" => :el_capitan - sha256 "37a9ad2396bcf355d6d7ae2d432489e316d3290528947a6f1a30e753fed59902" => :yosemite - sha256 "ff4125f633f43c19134e2520c0964025f4ea14efd5ce826d0cd905c550fbb24a" => :mavericks - end - - conflicts_with "rakudo-star" - - def install - system "perl", "Configure.pl", "--prefix=#{prefix}", - "--mandir=#{man}", - "--debugging=0", - "--cc=#{ENV.cc}" - - system "make" - system "make", "install" - # Don't install this file in HOMEBREW_PREFIX/lib - rm_rf lib/"VERSION" - end - - test do - path = testpath/"test.pir" - path.write <<~EOS - .sub _main - .local int i - i = 0 - loop: - print i - inc i - if i < 10 goto loop - .end - EOS - - out = `#{bin}/parrot #{path}` - assert_equal "0123456789", out - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/partio.rb b/Formula/partio.rb deleted file mode 100644 index b07ed69a6a18e..0000000000000 --- a/Formula/partio.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Partio < Formula - desc "Particle library for 3D graphics" - homepage "https://github.com/wdas/partio" - url "https://github.com/wdas/partio/archive/v1.1.0.tar.gz" - sha256 "133f386f076bd6958292646b6ba0e3db6d1e37bde3b8a6d1bc4b7809d693999d" - - bottle do - cellar :any_skip_relocation - sha256 "553577c6a9293fbfc098cea8153e6b273e2dc6584db96aa0ea7071be4f6ddd12" => :mojave - sha256 "42d4fe9271be76bca99f13bc73146328265995f707fdf50d3c274f5a65193cdd" => :high_sierra - sha256 "1db67357f3ce32f14c84788605a167838753433a1a81e17f40758fb2f2630445" => :sierra - sha256 "da106b6a4b5667f84b6528081510b12d0da2acb1bfd74afbf3f7af72316afe63" => :el_capitan - sha256 "a496ac6afbd60f605e2d3347d06a1850ae2617651b748e28c33a7c4c9c3bf957" => :yosemite - sha256 "78e2ac329d90feb8c0211135d2337b5e754b0cc5d70a4d58ebae3acc8442c32e" => :mavericks - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "swig" => :build - - # These fixes are upstream and can be removed in the next released version. - patch do - url "https://github.com/wdas/partio/commit/5b80b00ddedaef9ffed19ea4e6773ed1dc27394e.diff?full_index=1" - sha256 "b14b5526d5b61a3dfec7ddd07b54d5a678170b15b3f83687ab1b4151ae0cd5f3" - end - - patch do - url "https://github.com/wdas/partio/commit/bdce60e316b699fb4fd813c6cad9d369205657c8.diff?full_index=1" - sha256 "58dc0b77155b80301595c0b6a439e852f41779a31348f1716f2c9714273c638b" - end - - patch do - url "https://github.com/wdas/partio/commit/e557c212b0e8e0c4830e7991541686d568853afd.diff?full_index=1" - sha256 "b20a25142316cf93c0cc1188508c39a01275cf784d628e9768d5ee1471adbee2" - end - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "doc" - system "make", "install" - end - end -end diff --git a/Formula/pass-otp.rb b/Formula/pass-otp.rb deleted file mode 100644 index 13f86b78ba417..0000000000000 --- a/Formula/pass-otp.rb +++ /dev/null @@ -1,46 +0,0 @@ -class PassOtp < Formula - desc "The Pass extension for managing one-time-password (OTP) tokens" - homepage "https://github.com/tadfisher/pass-otp#readme" - url "https://github.com/tadfisher/pass-otp/releases/download/v1.2.0/pass-otp-1.2.0.tar.gz" - sha256 "5720a649267a240a4f7ba5a6445193481070049c1d08ba38b00d20fc551c3a67" - - bottle do - cellar :any_skip_relocation - sha256 "74b97a3e1331e84067eee707a6242d30e9f215befc563e79b86102f6995ce374" => :mojave - sha256 "4b123f03ae8a1237e7b04731d3d39e66e9acf031924f757becf889c8b12f1efc" => :high_sierra - sha256 "4b123f03ae8a1237e7b04731d3d39e66e9acf031924f757becf889c8b12f1efc" => :sierra - end - - depends_on "oath-toolkit" - depends_on "pass" - - def install - system "make", "PREFIX=#{prefix}", "BASHCOMPDIR=#{bash_completion}", "install" - end - - test do - (testpath/"batch.gpg").write <<~EOS - Key-Type: RSA - Key-Length: 2048 - Subkey-Type: RSA - Subkey-Length: 2048 - Name-Real: Testing - Name-Email: testing@foo.bar - Expire-Date: 1d - %no-protection - %commit - EOS - begin - system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" - system "pass", "init", "Testing" - require "open3" - Open3.popen3("pass", "otp", "insert", "hotp-secret") do |stdin, _, _| - stdin.write "otpauth://hotp/hotp-secret?secret=AAAAAAAAAAAAAAAA&counter=1&issuer=hotp-secret" - stdin.close - end - assert_equal "073348", `pass otp show hotp-secret`.strip - ensure - system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" - end - end -end diff --git a/Formula/pass.rb b/Formula/pass.rb deleted file mode 100644 index 44fdf765efccf..0000000000000 --- a/Formula/pass.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Pass < Formula - desc "Password manager" - homepage "https://www.passwordstore.org/" - url "https://git.zx2c4.com/password-store/snapshot/password-store-1.7.3.tar.xz" - sha256 "2b6c65846ebace9a15a118503dcd31b6440949a30d3b5291dfb5b1615b99a3f4" - head "https://git.zx2c4.com/password-store", :using => :git - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1a70cc714c9d37c24898d7da1431b5e5af1926abd41915cb546d6979ded1a4cb" => :mojave - sha256 "c08575225a6e5aeace358c9c65666e08743814fd66017238e32b8fc3dff812aa" => :high_sierra - sha256 "c08575225a6e5aeace358c9c65666e08743814fd66017238e32b8fc3dff812aa" => :sierra - end - - depends_on "gnu-getopt" - depends_on "gnupg" - depends_on "qrencode" - depends_on "tree" - - def install - system "make", "PREFIX=#{prefix}", "WITH_ALLCOMP=yes", "BASHCOMPDIR=#{bash_completion}", "ZSHCOMPDIR=#{zsh_completion}", "FISHCOMPDIR=#{fish_completion}", "install" - inreplace "#{bin}/pass", /^SYSTEM_EXTENSION_DIR=.*$/, "SYSTEM_EXTENSION_DIR=\"#{HOMEBREW_PREFIX}/lib/password-store/extensions\"" - elisp.install "contrib/emacs/password-store.el" - pkgshare.install "contrib" - end - - test do - (testpath/"batch.gpg").write <<~EOS - Key-Type: RSA - Key-Length: 2048 - Subkey-Type: RSA - Subkey-Length: 2048 - Name-Real: Testing - Name-Email: testing@foo.bar - Expire-Date: 1d - %no-protection - %commit - EOS - begin - system Formula["gnupg"].opt_bin/"gpg", "--batch", "--gen-key", "batch.gpg" - system bin/"pass", "init", "Testing" - system bin/"pass", "generate", "Email/testing@foo.bar", "15" - assert_predicate testpath/".password-store/Email/testing@foo.bar.gpg", :exist? - ensure - system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" - end - end -end diff --git a/Formula/passenger.rb b/Formula/passenger.rb deleted file mode 100644 index 2a5f998a11261..0000000000000 --- a/Formula/passenger.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Passenger < Formula - desc "Server for Ruby, Python, and Node.js apps via Apache/NGINX" - homepage "https://www.phusionpassenger.com/" - url "https://github.com/phusion/passenger/releases/download/release-6.0.0/passenger-6.0.0.tar.gz" - sha256 "3f826e55065bb69ff5cc945b7b8ab5eb69f957e108053d15401c2ea059321b83" - head "https://github.com/phusion/passenger.git", :branch => "stable-6.0" - - bottle do - sha256 "215b84b960021443f48c9425299dacce7532140e0c4b560a012354116ff6a996" => :mojave - sha256 "9d7dc31d44f43c9f09da7aba58c07ee0a9dd97c49655f917c443a6f1e8a2fd32" => :high_sierra - sha256 "3c0ec433a8b3158c39cc1c56753a16af3011fb3ae4f2d496be968c4e3991064a" => :sierra - end - - option "without-apache2-module", "Disable Apache2 module" - - depends_on :macos => :lion - depends_on "openssl" - depends_on "pcre" - - def install - # https://github.com/Homebrew/homebrew-core/pull/1046 - ENV.delete("SDKROOT") - - inreplace "src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb" do |s| - s.gsub! "-I/usr/local/opt/openssl/include", "-I#{Formula["openssl"].opt_include}" - s.gsub! "-L/usr/local/opt/openssl/lib", "-L#{Formula["openssl"].opt_lib}" - end - - system "rake", "apache2" if build.with? "apache2-module" - system "rake", "nginx" - - (libexec/"download_cache").mkpath - - # Fixes https://github.com/phusion/passenger/issues/1288 - rm_rf "buildout/libev" - rm_rf "buildout/libuv" - rm_rf "buildout/cache" - - necessary_files = %w[configure Rakefile README.md CONTRIBUTORS - CONTRIBUTING.md LICENSE CHANGELOG package.json - passenger.gemspec build bin doc images man dev src - resources buildout] - libexec.mkpath - cp_r necessary_files, libexec, :preserve => true - - # Allow Homebrew to create symlinks for the Phusion Passenger commands. - bin.install_symlink Dir["#{libexec}/bin/*"] - - # Ensure that the Phusion Passenger commands can always find their library - # files. - - locations_ini = `/usr/bin/ruby ./bin/passenger-config --make-locations-ini --for-native-packaging-method=homebrew` - locations_ini.gsub!(/=#{Regexp.escape Dir.pwd}/, "=#{libexec}") - (libexec/"src/ruby_supportlib/phusion_passenger/locations.ini").write(locations_ini) - - ruby_libdir = `/usr/bin/ruby ./bin/passenger-config about ruby-libdir`.strip - ruby_libdir.gsub!(/^#{Regexp.escape Dir.pwd}/, libexec) - system "/usr/bin/ruby", "./dev/install_scripts_bootstrap_code.rb", - "--ruby", ruby_libdir, *Dir[libexec/"bin/*"] - - system("/usr/bin/ruby ./bin/passenger-config compile-nginx-engine") - cp Dir["buildout/support-binaries/nginx*"], libexec/"buildout/support-binaries", :preserve => true - - nginx_addon_dir = `/usr/bin/ruby ./bin/passenger-config about nginx-addon-dir`.strip - nginx_addon_dir.gsub!(/^#{Regexp.escape Dir.pwd}/, libexec) - system "/usr/bin/ruby", "./dev/install_scripts_bootstrap_code.rb", - "--nginx-module-config", libexec/"bin", "#{nginx_addon_dir}/config" - - mv libexec/"man", share - end - - def caveats - s = <<~EOS - To activate Phusion Passenger for Nginx, run: - brew install nginx --with-passenger - - EOS - - s += <<~EOS if build.with? "apache2-module" - To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf: - LoadModule passenger_module #{opt_libexec}/buildout/apache2/mod_passenger.so - PassengerRoot #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini - PassengerDefaultRuby /usr/bin/ruby - - EOS - s - end - - test do - ruby_libdir = `#{HOMEBREW_PREFIX}/bin/passenger-config --ruby-libdir`.strip - assert_equal "#{libexec}/src/ruby_supportlib", ruby_libdir - end -end diff --git a/Formula/passpie.rb b/Formula/passpie.rb deleted file mode 100644 index 1f2c579fcfbe0..0000000000000 --- a/Formula/passpie.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Passpie < Formula - include Language::Python::Virtualenv - - desc "Manage login credentials from the terminal" - homepage "https://github.com/marcwebbie/passpie" - url "https://files.pythonhosted.org/packages/c8/2e/db84fa9d33c9361024343411875835143dc7b73eb3320b41c4f543b40ad6/passpie-1.6.1.tar.gz" - sha256 "eec50eabb9f4c9abd9a1d89794f86afe3956e1ba9f6c831d04b164fd4fc0ad02" - head "https://github.com/marcwebbie/passpie.git" - - bottle do - cellar :any_skip_relocation - sha256 "8d0bea708df6b337834af0eff5e387a2f134001233171210f854a48b4b53bbbe" => :mojave - sha256 "864bb80f52775b4941847c929922169fafebce6642ee7301f198e74acd6b0817" => :high_sierra - sha256 "619b05a27170c7fd8881e1922a7836625175b984ecc1a2cdadb5103bff7a8b58" => :sierra - end - - depends_on "gnupg" - depends_on "python" - - resource "click" do - url "https://files.pythonhosted.org/packages/7a/00/c14926d8232b36b08218067bcd5853caefb4737cda3f0a47437151344792/click-6.6.tar.gz" - sha256 "cc6a19da8ebff6e7074f731447ef7e112bd23adf3de5c597cf9989f2fd8defe9" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/75/5e/b84feba55e20f8da46ead76f14a3943c8cb722d40360702b2365b91dec00/PyYAML-3.11.tar.gz" - sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8" - end - - resource "rstr" do - url "https://files.pythonhosted.org/packages/34/73/bf268029482255aa125f015baab1522a22ad201ea5e324038fb542bc3706/rstr-2.2.4.tar.gz" - sha256 "64a086a7449a576de7f40327f8cd0a7752efbbb298e65dc68363ee7db0a1c8cf" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/db/40/6ffc855c365769c454591ac30a25e9ea0b3e8c952a1259141f5b9878bd3d/tabulate-0.7.5.tar.gz" - sha256 "9071aacbd97a9a915096c1aaf0dc684ac2672904cd876db5904085d6dac9810e" - end - - resource "tinydb" do - url "https://files.pythonhosted.org/packages/6c/2e/0df79439cf5cb3c6acfc9fb87e12d9a0ff45d3c573558079b09c72b64ced/tinydb-3.2.1.zip" - sha256 "7fc5bfc2439a0b379bd60638b517b52bcbf70220195b3f3245663cb8ad9dbcf0" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"passpie", "--help" - end -end diff --git a/Formula/passwdqc.rb b/Formula/passwdqc.rb deleted file mode 100644 index 187b597619c0c..0000000000000 --- a/Formula/passwdqc.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Passwdqc < Formula - desc "Password/passphrase strength checking and enforcement toolset" - homepage "https://www.openwall.com/passwdqc/" - url "https://www.openwall.com/passwdqc/passwdqc-1.3.1.tar.gz" - sha256 "d1fedeaf759e8a0f32d28b5811ef11b5a5365154849190f4b7fab670a70ffb14" - - bottle do - cellar :any - sha256 "e0f9450b595fb6935ed0cba174755cda95a7ff2fc7f9cc0e9e9027f69e5c1b6c" => :mojave - sha256 "f3225da4795b1f3c89e25aac62101021f533faebe52fda91101a497da156f797" => :high_sierra - sha256 "e63d866e12db3c5b031b33681a8a6b5163908cbbedde6d33e72e2543a4a75ef2" => :sierra - sha256 "607a5adfb33eca79f847569357c77d643b9be4b17ba73c915575990ad676bddd" => :el_capitan - sha256 "6aac1b96be6144cdb889af5cbcccc3c6779593f3544abdc186d17c61cc4acf34" => :yosemite - end - - def install - args = %W[ - BINDIR=#{bin} - CC=#{ENV.cc} - CONFDIR=#{etc} - DEVEL_LIBDIR=#{lib} - INCLUDEDIR=#{include} - MANDIR=#{man} - PREFIX=#{prefix} - SECUREDIR_DARWIN=#{prefix}/pam - SHARED_LIBDIR=#{lib} - ] - - system "make", *args - system "make", "install", *args - end - - test do - pipe_output("#{bin}/pwqcheck -1", shell_output("#{bin}/pwqgen")) - end -end diff --git a/Formula/pastebinit.rb b/Formula/pastebinit.rb deleted file mode 100644 index ca60804b5bc20..0000000000000 --- a/Formula/pastebinit.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Pastebinit < Formula - desc "Send things to pastebin from the command-line" - homepage "https://launchpad.net/pastebinit" - url "https://launchpad.net/pastebinit/trunk/1.5/+download/pastebinit-1.5.tar.gz" - sha256 "0d931dddb3744ed38aa2d319dd2d8a2f38a391011ff99db68ce7c83ab8f5b62f" - revision 1 - - bottle do - sha256 "e9a0967af35772fecd4908ed2a8f5476def47e8f278b40f88f1e92d3a67cfc3d" => :mojave - sha256 "4ca7c20ef94d78dcfb93241855c10be2113f538eae93e0a31702049a4d95e825" => :high_sierra - sha256 "4ca7c20ef94d78dcfb93241855c10be2113f538eae93e0a31702049a4d95e825" => :sierra - sha256 "4ca7c20ef94d78dcfb93241855c10be2113f538eae93e0a31702049a4d95e825" => :el_capitan - end - - depends_on "docbook2x" => :build - depends_on "python" - - def install - inreplace "pastebinit" do |s| - s.gsub! "/usr/bin/python3", Formula["python"].opt_bin/"python3" - s.gsub! "/usr/local/etc/pastebin.d", etc/"pastebin.d" - end - - system "docbook2man", "pastebinit.xml" - bin.install "pastebinit" - etc.install "pastebin.d" - man1.install "PASTEBINIT.1" => "pastebinit.1" - libexec.install %w[po utils] - end - - test do - url = pipe_output("#{bin}/pastebinit -a test -b paste.ubuntu.com", "Hello, world!").chomp - assert_match "://paste.ubuntu.com/", url - end -end diff --git a/Formula/patchelf.rb b/Formula/patchelf.rb deleted file mode 100644 index 62e587eeff62e..0000000000000 --- a/Formula/patchelf.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Patchelf < Formula - desc "Modify dynamic ELF executables" - homepage "https://nixos.org/patchelf.html" - url "https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.gz" - sha256 "f2aa40a6148cb3b0ca807a1bf836b081793e55ec9e5540a5356d800132be7e0a" - - bottle do - cellar :any_skip_relocation - sha256 "f079a1cb7d49867669704e55758484b3098b9f8ec6cc3600611ea43d5ff7b3cc" => :mojave - sha256 "c97defd1aa773a8b3a36ce9941f860bd0d4348c47beb97e2c59e43c096234fd6" => :high_sierra - sha256 "8994925b02e7d2ce043df104ceb64b959543e1a869dd126b02c00f0f6a20bfd0" => :sierra - sha256 "38c85e00a1dc54d103713d04a0d458c55cf3f2618d2a7848f5750f66068206d2" => :el_capitan - end - - resource "hellworld" do - url "http://timelessname.com/elfbin/helloworld.tar.gz" - sha256 "d8c1e93f13e0b7d8fc13ce75d5b089f4d4cec15dad91d08d94a166822d749459" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules" - system "make", "install" - end - - test do - resource("hellworld").stage do - assert_equal "/lib/ld-linux.so.2\n", shell_output("#{bin}/patchelf --print-interpreter chello") - assert_equal "libc.so.6\n", shell_output("#{bin}/patchelf --print-needed chello") - assert_equal "\n", shell_output("#{bin}/patchelf --print-rpath chello") - assert_equal "", shell_output("#{bin}/patchelf --set-rpath /usr/local/lib chello") - assert_equal "/usr/local/lib\n", shell_output("#{bin}/patchelf --print-rpath chello") - end - end -end diff --git a/Formula/patchutils.rb b/Formula/patchutils.rb deleted file mode 100644 index dd6b325961640..0000000000000 --- a/Formula/patchutils.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Patchutils < Formula - desc "Small collection of programs that operate on patch files" - homepage "http://cyberelk.net/tim/software/patchutils/" - url "http://cyberelk.net/tim/data/patchutils/stable/patchutils-0.3.4.tar.xz" - mirror "https://mirrors.kernel.org/debian/pool/main/p/patchutils/patchutils_0.3.4.orig.tar.xz" - sha256 "cf55d4db83ead41188f5b6be16f60f6b76a87d5db1c42f5459d596e81dabe876" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "50671cd67bc54857e9ba8b80f340ad14445ce9af6219dc28a50fb66fb85a9be6" => :mojave - sha256 "3b9acf217323af3cfceda6499aff6bf31086a301533effebe831757a625721f5" => :high_sierra - sha256 "948da3692c5f55995ea83303063cc0a9f01387c220f262365ef0e8cc775e8a39" => :sierra - sha256 "08689727cdf1f89cc075ec2e6e71ac456c5429067899ccb5dac12848a6c2abcd" => :el_capitan - sha256 "df5a0b90219fe01b6934696d27782920c3e9c45152980e72a1c542006c625ae9" => :yosemite - sha256 "84cae8e92f1e9b3f377fd6584c0811a3c3989fb898bb7596ba0d1192ae10a834" => :mavericks - end - - head do - url "https://github.com/twaugh/patchutils.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "docbook" => :build - end - - depends_on "xmlto" => :build - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" if build.head? - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match %r{a\/libexec\/NOOP}, shell_output("#{bin}/lsdiff #{test_fixtures("test.diff")}") - end -end diff --git a/Formula/path-extractor.rb b/Formula/path-extractor.rb deleted file mode 100644 index 601bce110badb..0000000000000 --- a/Formula/path-extractor.rb +++ /dev/null @@ -1,35 +0,0 @@ -class PathExtractor < Formula - desc "UNIX filter which outputs the filepaths found in stdin" - homepage "https://github.com/edi9999/path-extractor" - url "https://github.com/edi9999/path-extractor/archive/v0.2.0.tar.gz" - sha256 "7d6c7463e833305e6d27c63727fec1029651bfe8bca5e8d23ac7db920c2066e7" - head "https://github.com/edi9999/path-extractor.git" - - bottle do - cellar :any_skip_relocation - sha256 "8feb5be3e88fa0370593d8d349a90b54ac953a504439ec61722cff7e843153cc" => :mojave - sha256 "38faa134c10a82b9ac28077d6df73da8b1ce2fed2fb8fe4f24ddebb08c18b623" => :high_sierra - sha256 "bf30c2d715d52035b57b640d849c21e1508fb189259b5e02343f8104f50d6624" => :sierra - sha256 "90521da4fd1834db41fbf19b7b6ce9f82a943ab2412acd41b6c5d749146770e7" => :el_capitan - sha256 "718512fe3585d82dee8d655c2ab534dac70d0b24a8164bcc012f0f2a65a55e5b" => :yosemite - sha256 "f883b0656efe0d31b35b98ab0c82d82f1fa827b39d3712136c49bae2363f539d" => :mavericks - end - - depends_on "go" => :build - - def install - ENV["GOBIN"] = bin - ENV["GOPATH"] = buildpath - ENV["GOHOME"] = buildpath - - (buildpath/"src/github.com/edi9999").mkpath - ln_sf buildpath, buildpath/"src/github.com/edi9999/path-extractor" - - system "go", "build", "-o", bin/"path-extractor", "path-extractor/pe.go" - end - - test do - assert_equal "foo/bar/baz\n", - pipe_output("#{bin}/path-extractor", "a\nfoo/bar/baz\nd\n") - end -end diff --git a/Formula/pax-construct.rb b/Formula/pax-construct.rb deleted file mode 100644 index 7c114cb671e51..0000000000000 --- a/Formula/pax-construct.rb +++ /dev/null @@ -1,24 +0,0 @@ -class PaxConstruct < Formula - desc "Tools to setup and develop OSGi projects quickly" - homepage "https://ops4j1.jira.com/wiki/display/paxconstruct/Pax+Construct" - url "https://search.maven.org/remotecontent?filepath=org/ops4j/pax/construct/scripts/1.5/scripts-1.5.zip" - sha256 "d0325bbe571783097d4be782576569ea0a61529695c14e33a86bbebfe44859d1" - - bottle :unneeded - - # Needed at runtime! pax-clone: line 47: exec: mvn: not found - depends_on "maven" - - def install - rm_rf Dir["bin/*.bat"] - prefix.install_metafiles "bin" # Don't put these in bin! - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/bin/*"].select { |f| File.executable? f } - end - - test do - system bin/"pax-create-project", "-g", "Homebrew", "-a", "testing", - "-v", "alpha-1" - assert_predicate testpath/"testing/pom.xml", :exist? - end -end diff --git a/Formula/pax-runner.rb b/Formula/pax-runner.rb deleted file mode 100644 index 655837b4e58a7..0000000000000 --- a/Formula/pax-runner.rb +++ /dev/null @@ -1,18 +0,0 @@ -class PaxRunner < Formula - desc "Tool to provision OSGi bundles" - homepage "https://ops4j1.jira.com/" - url "https://search.maven.org/remotecontent?filepath=org/ops4j/pax/runner/pax-runner-assembly/1.8.6/pax-runner-assembly-1.8.6-jdk15.tar.gz" - version "1.8.6" - sha256 "42a650efdedcb48dca89f3e4272a9e2e1dcc6bc84570dbb176b5e578ca1ce2d4" - - bottle :unneeded - - def install - (bin+"pax-runner").write <<~EOS - #!/bin/sh - exec java $JAVA_OPTS -cp #{libexec}/bin/pax-runner-#{version}.jar org.ops4j.pax.runner.Run "$@" - EOS - - libexec.install Dir["*"] - end -end diff --git a/Formula/payara.rb b/Formula/payara.rb deleted file mode 100644 index 49f2f189aa551..0000000000000 --- a/Formula/payara.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Payara < Formula - desc "Java EE application server forked from GlassFish" - homepage "https://www.payara.fish" - url "https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/5.183/payara-5.183.zip" - sha256 "2940a780c781643f5bc3044658e935443e5d51d96e2ee62bac4baefa7e6122df" - - bottle :unneeded - - depends_on :java => "1.8" - - conflicts_with "glassfish", :because => "both install the same scripts" - - def install - # Remove Windows scripts - rm_f Dir["**/*.{bat,exe}"] - - inreplace "bin/asadmin", /AS_INSTALL=.*/, - "AS_INSTALL=#{libexec}/glassfish" - - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - def caveats; <<~EOS - You may want to add the following to your .bash_profile: - export GLASSFISH_HOME=#{opt_libexec}/glassfish - export PATH=${PATH}:${GLASSFISH_HOME}/bin - EOS - end - - plist_options :manual => "asadmin start-domain --verbose domain1" - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - Crashed - - SuccessfulExit - - - WorkingDirectory - #{opt_libexec}/glassfish - EnvironmentVariables - - GLASSFISH_HOME - #{opt_libexec}/glassfish - - ProgramArguments - - #{opt_libexec}/glassfish/bin/asadmin - start-domain - --verbose - domain1 - - - - EOS - end - - test do - ENV["GLASSFISH_HOME"] = opt_libexec/"glassfish" - output = shell_output("#{bin}/asadmin list-domains") - assert_match /^domain1 not running$/, output - assert_match /^production not running$/, output - assert_match /^Command list-domains executed successfully\.$/, output - end -end diff --git a/Formula/pazpar2.rb b/Formula/pazpar2.rb deleted file mode 100644 index 459916eb9ad53..0000000000000 --- a/Formula/pazpar2.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Pazpar2 < Formula - desc "Metasearching middleware webservice" - homepage "https://www.indexdata.com/pazpar2" - url "http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.13.1.tar.gz" - sha256 "d3cdeff52914a82c4d815e4570f6aab0e14586754377b5d2b9cffdcbcb1ccc29" - revision 1 - - bottle do - cellar :any - sha256 "53937090561ad043932b1da6d141ea769396cc6bb4f5cdd49a2a20ecce39d436" => :mojave - sha256 "9ba978deab4a3910cfd7382711d582151c9aa190b7f27a6c005f1ed35358c73d" => :high_sierra - sha256 "8cd5847dd58310b8883e5a60b08c5da0b098f64fa2ca2e46aed24aad3129277c" => :sierra - end - - head do - url "https://github.com/indexdata/pazpar2.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "yaz" - - def install - system "./buildconf.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test-config.xml").write <<~EOS - - - - - - - - EOS - - system "#{sbin}/pazpar2", "-t", "-f", "#{testpath}/test-config.xml" - end -end diff --git a/Formula/pbc-sig.rb b/Formula/pbc-sig.rb deleted file mode 100644 index 9628310ac4756..0000000000000 --- a/Formula/pbc-sig.rb +++ /dev/null @@ -1,62 +0,0 @@ -class PbcSig < Formula - desc "Signatures library" - homepage "https://crypto.stanford.edu/pbc/sig/" - url "https://crypto.stanford.edu/pbc/sig/files/pbc_sig-0.0.8.tar.gz" - sha256 "7a343bf342e709ea41beb7090c78078a9e57b833454c695f7bcad2475de9c4bb" - - bottle do - cellar :any - sha256 "af397bbffe6ae6d891187d74fc0ba821f97484d706a4eb075a8532625cadad74" => :mojave - sha256 "f6dcb432ad9143a883b5eeefb2bf2efd7cc139cba99cc180a18789294f2c6875" => :high_sierra - sha256 "be0d7bea5943fcdcfafe6c4526617a8cb7b5b99489fa4fce07d1217a5970a9fe" => :sierra - sha256 "bef7dfdc8f790b1b1d774e886090b4ddad91ed0781d08e214a55b3656aae9618" => :el_capitan - sha256 "55e7092f16ec44d2bfcb411466954ec42e8359bed59ed312148f053242e9bbd1" => :yosemite - sha256 "8559952df67fda6a8ee2a865df439f6ac2380d13491bb874d271a30e94813c75" => :mavericks - sha256 "b5d63cd6e512d8da34ec218b14fcc50534c34b15a6bc65034cc9dd8f7bc8b528" => :mountain_lion - end - - depends_on "pbc" - - # https://groups.google.com/forum/#!topic/pbc-devel/ZmFCHZmrhcw - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - pbc_param_t param; - pairing_t pairing; - bls_sys_param_t bls_param; - pbc_param_init_a_gen(param, 160, 512); - pairing_init_pbc_param(pairing, param); - bls_gen_sys_param(bls_param, pairing); - bls_clear_sys_param(bls_param); - pairing_clear(pairing); - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lpbc", "-lpbc_sig" - system "./test" - end -end - -__END__ -diff --git a/sig/bbs.c b/sig/bbs.c -index ed1b437..8aa8331 100644 ---- a/sig/bbs.c -+++ b/sig/bbs.c -@@ -1,4 +1,5 @@ - //see Boneh, Boyen and Shacham, "Short Group Signatures" -+#include - #include - #include "pbc_sig.h" - #include "pbc_hash.h" diff --git a/Formula/pbc.rb b/Formula/pbc.rb deleted file mode 100644 index c7042fefffeb7..0000000000000 --- a/Formula/pbc.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Pbc < Formula - desc "Pairing-based cryptography" - homepage "https://crypto.stanford.edu/pbc/" - url "https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz" - sha256 "772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2" - head "https://repo.or.cz/pbc.git" - - bottle do - cellar :any - sha256 "3d34df3cd1f1d357a3893f53d19496721d3dfb04b86b1d22b87fb88df27746c1" => :mojave - sha256 "f737a917951f31a9477b2ee46761eb3d9323ca96d77b5b0ab78d7566eb743213" => :high_sierra - sha256 "9ec971f355f67d0faf644e955a26e9a86b667066eac0791288b802bbe7c0f4aa" => :sierra - sha256 "5295bb2d5b2698685ff7ff8b64e0578a5b8c9b9f9602fc51583cae058ee24b81" => :el_capitan - sha256 "5ec07e1b5752aa02b6a479665ca8a57b85ed55d5cd3b05a34cf403d7b47ea142" => :yosemite - sha256 "3be60cf755e2d568867c2d5c53a46774627afe1fe7439b7f86437e718ba52ed8" => :mavericks - sha256 "f9f7455441a38df308bd433f1a13a208ef65a2081a1884f45156f3b63072c832" => :mountain_lion - end - - depends_on "gmp" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - pbc_param_t param; - pairing_t pairing; - element_t g1, g2, gt1, gt2, gt3, a, g1a; - pbc_param_init_a_gen(param, 160, 512); - pairing_init_pbc_param(pairing, param); - element_init_G1(g1, pairing); - element_init_G2(g2, pairing); - element_init_G1(g1a, pairing); - element_init_GT(gt1, pairing); - element_init_GT(gt2, pairing); - element_init_GT(gt3, pairing); - element_init_Zr(a, pairing); - element_random(g1); element_random(g2); element_random(a); - element_pairing(gt1, g1, g2); // gt1 = e(g1, g2) - element_pow_zn(g1a, g1, a); // g1a = g1^a - element_pow_zn(gt2, gt1, a); // gt2 = gt1^a = e(g1, g2)^a - element_pairing(gt3, g1a, g2); // gt3 = e(g1a, g2) = e(g1^a, g2) - assert(element_cmp(gt2, gt3) == 0); // assert gt2 == gt3 - pairing_clear(pairing); - element_clear(g1); element_clear(g2); element_clear(gt1); - element_clear(gt2); element_clear(gt3); element_clear(a); - element_clear(g1a); - return 0; - } - EOS - system ENV.cc, "test.c", "-lgmp", "-L#{lib}", "-lpbc", "-o", "test" - system "./test" - end -end diff --git a/Formula/pbrt.rb b/Formula/pbrt.rb deleted file mode 100644 index 49b179a8d0eff..0000000000000 --- a/Formula/pbrt.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pbrt < Formula - desc "Physically based rendering" - homepage "https://pbrt.org/" - url "https://github.com/mmp/pbrt-v2/archive/2.0.342.tar.gz" - sha256 "397941435d4b217cd4a4adaca12ab6add9a960d46984972f259789d1462fb6d5" - revision 1 - - bottle do - cellar :any - sha256 "bbef8afbd930c10498a65d8e70621eba607489a97994ba1b875523eec2db8b88" => :mojave - sha256 "c1914092491b0a3e9b8f0aa53c08c290e4548d4c8236652f6987f585506c840b" => :high_sierra - sha256 "e55782038c1b74d847254afae36fbfe11d3af774431b84bd7d56f16bbe73986b" => :sierra - sha256 "f9104d3cf2dc87dc5b8cdc6b43b7c32447508ad4282d4caa850136e9742b61be" => :el_capitan - end - - depends_on "flex" - depends_on "openexr" - - def install - system "make", "-C", "src" - prefix.install "src/bin" - end - - test do - system "#{bin}/pbrt", "--version" - end -end diff --git a/Formula/pbzip2.rb b/Formula/pbzip2.rb deleted file mode 100644 index e322fb4f95d10..0000000000000 --- a/Formula/pbzip2.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pbzip2 < Formula - desc "Parallel bzip2" - homepage "https://web.archive.org/web/20180226093549/compression.ca/pbzip2/" - url "https://launchpad.net/pbzip2/1.1/1.1.13/+download/pbzip2-1.1.13.tar.gz" - sha256 "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6" - - bottle do - cellar :any_skip_relocation - sha256 "5594212d69f619f7fa59cfec23ce2c6eefa0f8c69d5e77cdd84cf9e2478d0d51" => :mojave - sha256 "d72e618d7301937ab6a392e1ef3d9ed1f8d5380cd6516ea17b4e4bde11eea9a7" => :high_sierra - sha256 "c15b9c38b5302286033e54ff4be006c3b31ccb179f96641e44f1126958527d7e" => :sierra - sha256 "be653d724b6f061cb9939dbdbf457aebc275e16dbf599f598b9ff3999fdd5db3" => :el_capitan - sha256 "ad103aef3e2d72293cfed3fcc42999afee9b4fc332f8319e3c079758215411c9" => :yosemite - end - - def install - system "make", "PREFIX=#{prefix}", - "CC=#{ENV.cxx}", - "CFLAGS=#{ENV.cflags}", - "PREFIX=#{prefix}", - "install" - end - - test do - system "#{bin}/pbzip2", "--version" - end -end diff --git a/Formula/pc6001vx.rb b/Formula/pc6001vx.rb deleted file mode 100644 index 41c597f2e4674..0000000000000 --- a/Formula/pc6001vx.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Pc6001vx < Formula - desc "PC-6001 emulator" - homepage "http://eighttails.seesaa.net/" - url "http://eighttails.up.seesaa.net/bin/PC6001VX_3.0.0_src.tar.gz" - sha256 "ab8915407833d95f4b38e9d86b14f548c9f6431eaa324eb046b3ef4fc95a8f51" - head "https://github.com/eighttails/PC6001VX.git" - - bottle do - cellar :any - sha256 "7a3d0b9bd2e67dba50d39b1a9a9bb697824bbba8e811c9df27fe5623bcd4dc41" => :mojave - sha256 "7d554aec28e66b88025e6438b2a776c000bebf470a5b04c04d551ad0fcec2ae7" => :high_sierra - sha256 "ce1b8bb4d6271a5c5bfdcc3d3c2f23131976d17ed426cee1e957cd220e26a697" => :sierra - sha256 "0c0066a5765c75071974af3dcbeabc13c440e4ec90c803e0f81120a42909ff42" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "qt" - depends_on "sdl2" - - def install - # Need to explicitly set up include directories - ENV.append_to_cflags "-I#{Formula["sdl2"].opt_include}" - ENV.append_to_cflags "-I#{Formula["ffmpeg"].opt_include}" - # Turn off errors on C++11 build which used for properly linking standard lib - ENV.append_to_cflags "-Wno-reserved-user-defined-literal" - # Use libc++ explicitly, otherwise build fails - ENV.append_to_cflags "-stdlib=libc++" if ENV.compiler == :clang - - system "qmake", "PREFIX=#{prefix}", "QMAKE_CXXFLAGS=#{ENV.cxxflags}", "CONFIG+=c++11" - system "make" - prefix.install "PC6001VX.app" - bin.write_exec_script "#{prefix}/PC6001VX.app/Contents/MacOS/PC6001VX" - end -end diff --git a/Formula/pcal.rb b/Formula/pcal.rb deleted file mode 100644 index ebdf30cdac592..0000000000000 --- a/Formula/pcal.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pcal < Formula - desc "Generate Postscript calendars without X" - homepage "https://pcal.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pcal/pcal/pcal-4.11.0/pcal-4.11.0.tgz" - sha256 "8406190e7912082719262b71b63ee31a98face49aa52297db96cc0c970f8d207" - - bottle do - cellar :any_skip_relocation - sha256 "0d4a63fb432c80894e629b89cf5500ffb1a03928b68b0e8c334c96adda01ce2b" => :mojave - sha256 "25a667f9b166482637d890497e6fc9465ff8e28a4315a25ba5413fef9c68d79c" => :high_sierra - sha256 "134df5abc458995e6092041db145e9bca45e2ff71eeeec9de410d497afbe7177" => :sierra - sha256 "271667aef1031a0007e042fb3f933708aa33398d6bf9982a7353e6023d0d955c" => :el_capitan - sha256 "f88d2fc2ede97fd94333dea90617d02405b008ef359edb694926f4e476c6ae53" => :yosemite - sha256 "b0662dd7e1841adf260b267fa8f9187c60c87c7b7c07075e6179cdabd230e2bd" => :mavericks - end - - def install - ENV.deparallelize - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" - system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man1}", - "CATDIR=#{man}/cat1" - end - - test do - system "#{bin}/pcal" - end -end diff --git a/Formula/pcapplusplus.rb b/Formula/pcapplusplus.rb deleted file mode 100644 index 3759b4fd9571f..0000000000000 --- a/Formula/pcapplusplus.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Pcapplusplus < Formula - desc "C++ network sniffing, packet parsing and crafting framework" - homepage "https://seladb.github.io/PcapPlusPlus-Doc" - url "https://github.com/seladb/PcapPlusPlus/archive/v18.08.tar.gz" - sha256 "dff6f7c677b2050f880043b125e984238cd8af0f1c25864e09e87fb8d71ec9ab" - - bottle do - cellar :any_skip_relocation - sha256 "ed81e6545d41b9fe6e2b5712c0ad6210a31346144912d8503ff7c06ffd91000f" => :mojave - sha256 "2e9f6a851da52dd885e284b0393392dfbb2dec52b56517a553087fa67a608ddd" => :high_sierra - sha256 "abdd89390998f292ed04f518471e815767285bd004165933de082d753dc44af1" => :sierra - sha256 "bf6c8b35cc86e7acd5ddbed6ac0051a175e3329befa670fa432c6f4dc8eb6575" => :el_capitan - end - - def install - system "./configure-mac_os_x.sh", "--install-dir", prefix - - # library requires to run 'make all' and - # 'make install' in two separate commands. - system "make", "all" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "stdlib.h" - #include "PcapLiveDeviceList.h" - int main() { - const std::vector& devList = - pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList(); - if (devList.size() > 0) { - if (devList[0]->getName() == NULL) - return 1; - return 0; - } - return 0; - } - EOS - - (testpath/"Makefile").write <<~EOS - include #{etc}/PcapPlusPlus.mk - all: - \tg++ $(PCAPPP_BUILD_FLAGS) $(PCAPPP_INCLUDES) -c -o test.o test.cpp - \tg++ $(PCAPPP_LIBS_DIR) -o test test.o $(PCAPPP_LIBS) - EOS - - system "make", "all" - system "./test" - end -end diff --git a/Formula/pcb.rb b/Formula/pcb.rb deleted file mode 100644 index 3c80676d6b4dd..0000000000000 --- a/Formula/pcb.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Pcb < Formula - desc "Interactive printed circuit board editor" - homepage "http://pcb.geda-project.org/" - url "https://downloads.sourceforge.net/project/pcb/pcb/pcb-4.1.2/pcb-4.1.2.tar.gz" - sha256 "c6b4df11930d2b3d27032475850e15dd95797fb43876caa6e77c288724fdf05b" - version_scheme 1 - - bottle do - sha256 "b5f5c3c8c057a50c49b0ba426ad1edcd7e1bee8d7183dd85d0e3098ffcf3685c" => :mojave - sha256 "8885f48b85c579d192e8492ef3f48a84460af797e90f40d26d3fbda26962be23" => :high_sierra - sha256 "e4dc058b053ba4ce4203770063712007420592bbe3f552c1ea949f055f4f3a61" => :sierra - sha256 "381e6760f94254e92d95be3abe734e94db490fe2c443e9be1f25cb3c6ae08686" => :el_capitan - end - - head do - url "git://git.geda-project.org/pcb.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "dbus" - depends_on "gd" - depends_on "gettext" - depends_on "glib" - depends_on "gtk+" - depends_on "gtkglext" - - conflicts_with "gts", :because => "both install a `gts.h` header" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-update-desktop-database", - "--disable-update-mime-database", - "--disable-gl", - "--without-x" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/pcb --version") - end -end diff --git a/Formula/pcb2gcode.rb b/Formula/pcb2gcode.rb deleted file mode 100644 index ebc5f3f4384dc..0000000000000 --- a/Formula/pcb2gcode.rb +++ /dev/null @@ -1,163 +0,0 @@ -class Pcb2gcode < Formula - desc "Command-line tool for isolation, routing and drilling of PCBs" - homepage "https://github.com/pcb2gcode/pcb2gcode" - url "https://github.com/pcb2gcode/pcb2gcode/releases/download/v1.3.2/pcb2gcode-1.3.2.tar.gz" - sha256 "c4135cd3981c4a5d6baffa81b7f8e890ae29776107b0d1938b744a8dfebdbc63" - revision 4 - - bottle do - cellar :any - sha256 "1461210908fa8c399a4cb0b45b734b3f5b73fc7a3a5af95d1e24d350d503569b" => :mojave - sha256 "0fc767ddeae68a0fa5274bdf756021b9cdb26b6b0ab0cbc5abc6edea5c0843fc" => :high_sierra - sha256 "1cff2417d1bfa373a0d3af179177837bda345b81ddc8bbf9c16d5bd4dd370b25" => :sierra - sha256 "47cce5c85523d623639e542e096e7571fe40906ae0e5345bd35200f575933950" => :el_capitan - end - - head do - url "https://github.com/pcb2gcode/pcb2gcode.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gerbv" - depends_on "gtkmm" - - # Upstream maintainer claims that the geometry library from boost >= 1.67 - # is severely broken. Remove the vendoring once fixed. - # See https://github.com/Homebrew/homebrew-core/pull/30914#issuecomment-411662760 - # and https://svn.boost.org/trac10/ticket/13645 - resource "boost" do - url "https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2" - sha256 "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9" - end - - def install - resource("boost").stage do - # Force boost to compile with the desired compiler - open("user-config.jam", "a") do |file| - file.write "using darwin : : #{ENV.cxx} ;\n" - end - - bootstrap_args = %W[ - --prefix=#{buildpath}/boost - --libdir=#{buildpath}/boost/lib - --with-libraries=program_options - --without-icu - ] - - args = %W[ - --prefix=#{buildpath}/boost - --libdir=#{buildpath}/boost/lib - -d2 - -j#{ENV.make_jobs} - --ignore-site-config - --layout=tagged - --user-config=user-config.jam - install - threading=multi - link=static - optimization=space - variant=release - cxxflags=-std=c++11 - ] - - if ENV.compiler == :clang - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" - end - - system "./bootstrap.sh", *bootstrap_args - system "./b2", "headers" - system "./b2", *args - end - - system "autoreconf", "-fvi" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-boost=#{buildpath}/boost", - "--enable-static-boost" - system "make", "install" - end - - test do - (testpath/"front.gbr").write <<~EOS - %FSLAX46Y46*% - %MOMM*% - G01* - %ADD11R,2.032000X2.032000*% - %ADD12O,2.032000X2.032000*% - %ADD13C,0.250000*% - D11* - X127000000Y-63500000D03* - D12* - X127000000Y-66040000D03* - D13* - X124460000Y-66040000D01* - X124460000Y-63500000D01* - X127000000Y-63500000D01* - M02* - EOS - (testpath/"edge.gbr").write <<~EOS - %FSLAX46Y46*% - %MOMM*% - G01* - %ADD11C,0.150000*% - D11* - X123190000Y-67310000D02* - X128270000Y-67310000D01* - X128270000Y-62230000D01* - X123190000Y-62230000D01* - X123190000Y-67310000D01* - M02* - EOS - (testpath/"drill.drl").write <<~EOS - M48 - FMAT,2 - METRIC,TZ - T1C1.016 - % - G90 - G05 - M71 - T1 - X127.Y-63.5 - X127.Y-66.04 - T0 - M30 - EOS - (testpath/"millproject").write <<~EOS - dpi=500 - metric=true - zchange=10 - zsafe=5 - mill-feed=600 - mill-speed=10000 - offset=0.1 - zwork=-0.05 - drill-feed=1000 - drill-speed=10000 - zdrill=-2.5 - bridges=0.5 - bridgesnum=4 - cut-feed=600 - cut-infeed=10 - cut-speed=10000 - cutter-diameter=3 - fill-outline=true - outline-width=0.15 - zbridges=-0.6 - zcut=-2.5 - al-front=true - al-probefeed=100 - al-x=15 - al-y=15 - software=LinuxCNC - EOS - system "#{bin}/pcb2gcode", "--front=front.gbr", - "--outline=edge.gbr", - "--drill=drill.drl" - end -end diff --git a/Formula/pce.rb b/Formula/pce.rb deleted file mode 100644 index 7aa4ff2530e21..0000000000000 --- a/Formula/pce.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Pce < Formula - desc "PC emulator" - homepage "http://www.hampa.ch/pce/" - url "http://www.hampa.ch/pub/pce/pce-0.2.2.tar.gz" - sha256 "a8c0560fcbf0cc154c8f5012186f3d3952afdbd144b419124c09a56f9baab999" - revision 1 - head "git://git.hampa.ch/pce.git" - - bottle do - cellar :any - sha256 "43d68fb33e9edfb191d49c5966954f30dd9805b793b8fe31f2f53c4e0b3306a1" => :high_sierra - sha256 "5eac356a0cc4e27d748c3eaaba446f64005dd45cfdc7b7be915bdf186eb01655" => :sierra - sha256 "8574731084cdd4efd9394e7b92d262e80dcb23dc5d9d8bc14746c81ea9f66bcf" => :el_capitan - sha256 "5166b5f8b91d05e8d45f8683326e865cb75e2f574dff790d423ac4f4215d51f5" => :yosemite - end - - depends_on "readline" - depends_on "sdl" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-x", - "--enable-readline" - system "make" - - # We need to run 'make install' without parallelization, because - # of a race that may cause the 'install' utility to fail when - # two instances concurrently create the same parent directories. - ENV.deparallelize - system "make", "install" - end - - test do - system "#{bin}/pce-ibmpc", "-V" - end -end diff --git a/Formula/pcl.rb b/Formula/pcl.rb deleted file mode 100644 index 3cc92227c26e2..0000000000000 --- a/Formula/pcl.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Pcl < Formula - desc "Library for 2D/3D image and point cloud processing" - homepage "http://www.pointclouds.org/" - url "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.9.1.tar.gz" - sha256 "0add34d53cd27f8c468a59b8e931a636ad3174b60581c0387abb98a9fc9cddb6" - head "https://github.com/PointCloudLibrary/pcl.git" - - bottle do - sha256 "8b50d4bbe3e47293621368c684a34e337ba1bad2fa94099bd99a95eaf6503453" => :mojave - sha256 "6cf8f5d0b5c108deb68a88130210a00876a2a78213e513cd34a42e6c14fdc4b1" => :high_sierra - sha256 "b5f8c7d7220a6bc68a9938ee9554bfc7070e592fd2f8918a57a2435a43e433d2" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "cminpack" - depends_on "eigen" - depends_on "flann" - depends_on "glew" - depends_on "libusb" - depends_on "qhull" - depends_on "vtk" - - def install - args = std_cmake_args + %w[ - -DBUILD_SHARED_LIBS:BOOL=ON - -DBUILD_apps=AUTO_OFF - -DBUILD_apps_3d_rec_framework=AUTO_OFF - -DBUILD_apps_cloud_composer=AUTO_OFF - -DBUILD_apps_in_hand_scanner=AUTO_OFF - -DBUILD_apps_optronic_viewer=AUTO_OFF - -DBUILD_apps_point_cloud_editor=AUTO_OFF - -DBUILD_examples:BOOL=ON - -DBUILD_global_tests:BOOL=OFF - -DBUILD_outofcore:BOOL=AUTO_OFF - -DBUILD_people:BOOL=AUTO_OFF - -DBUILD_simulation:BOOL=AUTO_OFF - -DWITH_CUDA:BOOL=OFF - -DWITH_DOCS:BOOL=OFF - -DWITH_QT:BOOL=FALSE - -DWITH_TUTORIALS:BOOL=OFF - ] - - if build.head? - args << "-DBUILD_apps_modeler=AUTO_OFF" - else - args << "-DBUILD_apps_modeler:BOOL=OFF" - end - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - prefix.install Dir["#{bin}/*.app"] - end - end - - test do - assert_match "tiff files", shell_output("#{bin}/pcl_tiff2pcd -h", 255) - end -end diff --git a/Formula/pcre++.rb b/Formula/pcre++.rb deleted file mode 100644 index ecf1b00a84769..0000000000000 --- a/Formula/pcre++.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Pcrexx < Formula - desc "C++ wrapper for the Perl Compatible Regular Expressions" - homepage "https://www.daemon.de/PCRE" - url "https://www.daemon.de/idisk/Apps/pcre++/pcre++-0.9.5.tar.gz" - sha256 "77ee9fc1afe142e4ba2726416239ced66c3add4295ab1e5ed37ca8a9e7bb638a" - - bottle do - cellar :any - sha256 "74eb2f78269663a150978c7a221af9bb453c459f14838cbe551f9b25cba222ce" => :mojave - sha256 "65018b1dd42de0fc89e533f5343754cf8b07e0b989d0fc1820483fd76a36caab" => :high_sierra - sha256 "04da88d9c66600d7f636106f00b496e90fbd213431b7c4a2c20cc43f7e206a21" => :sierra - sha256 "5c30b4cbf987ad3b9a05521f83c672419b636277714838b6f7dee5a656c9868b" => :el_capitan - sha256 "c883ed380b38f020e7383643fedf80f4bad9ed1205592fe8127423e340c02c05" => :yosemite - sha256 "fd7050ff36dbb4c5605a4f0a9bb5d5de3ea01e6b959dd2026297a9ae35b99f51" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pcre" - - # Fix building with libc++. Patch sent to maintainer. - patch :DATA - - def install - pcre = Formula["pcre"] - system "autoreconf", "-fvi" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-pcre-lib=#{pcre.opt_lib}", - "--with-pcre-include=#{pcre.opt_include}" - system "make", "install" - - # Pcre++ ships Pcre.3, which causes a conflict with pcre.3 from pcre - # in case-insensitive file system. Rename it to pcre++.3 to avoid - # this problem. - mv man3/"Pcre.3", man3/"pcre++.3" - end - - def caveats; <<~EOS - The man page has been renamed to pcre++.3 to avoid conflicts with - pcre in case-insensitive file system. Please use "man pcre++" - instead. - EOS - end -end - -__END__ -diff --git a/libpcre++/pcre++.h b/libpcre++/pcre++.h -index d80b387..21869fc 100644 ---- a/libpcre++/pcre++.h -+++ b/libpcre++/pcre++.h -@@ -47,11 +47,11 @@ - #include - #include - #include -+#include - - - extern "C" { - #include -- #include - } - - namespace pcrepp { diff --git a/Formula/pcre.rb b/Formula/pcre.rb deleted file mode 100644 index 949a647a7a23a..0000000000000 --- a/Formula/pcre.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Pcre < Formula - desc "Perl compatible regular expressions library" - homepage "https://www.pcre.org/" - url "https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.bz2" - mirror "https://www.mirrorservice.org/sites/ftp.exim.org/pub/pcre/pcre-8.42.tar.bz2" - sha256 "2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301" - - bottle do - cellar :any - sha256 "f848e72c9a6ddfdd4e57d25df859830187cbb8e850996b22a84270a6590f56ff" => :mojave - sha256 "b904c008c04003c3f40e30c6ee6a3b411aad81aa2f2684db9bf59bccd9d58b01" => :high_sierra - sha256 "d8f8faec67df2d86e12757cac6f076c48d0fafac8f2a88c87c64d5807dce7142" => :sierra - sha256 "b07b9523cbab3c86423fecc7f5e79a1eb9dd47958d915f8915c78e6faa4f4435" => :el_capitan - end - - head do - url "svn://vcs.exim.org/pcre/code/trunk" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-utf8", - "--enable-pcre8", - "--enable-pcre16", - "--enable-pcre32", - "--enable-unicode-properties", - "--enable-pcregrep-libz", - "--enable-pcregrep-libbz2", - "--enable-jit" - system "make" - ENV.deparallelize - system "make", "test" - system "make", "install" - end - - test do - system "#{bin}/pcregrep", "regular expression", "#{prefix}/README" - end -end diff --git a/Formula/pcre2.rb b/Formula/pcre2.rb deleted file mode 100644 index c2b91ff9b16ee..0000000000000 --- a/Formula/pcre2.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pcre2 < Formula - desc "Perl compatible regular expressions library with a new API" - homepage "https://www.pcre.org/" - url "https://ftp.pcre.org/pub/pcre/pcre2-10.32.tar.bz2" - sha256 "f29e89cc5de813f45786580101aaee3984a65818631d4ddbda7b32f699b87c2e" - head "svn://vcs.exim.org/pcre2/code/trunk" - - bottle do - cellar :any - sha256 "4ab53b8ef4ba5c9100b115cebcd0d510f8613a799598f232209f31066d1cbf8e" => :mojave - sha256 "b331ad445f1f5b0cfb2600c3a3b379d4908e12ec536e0004130ec13d979255d0" => :high_sierra - sha256 "20aac21af6a73297c34cb493f1424d34a32f18bda27b6ce9193115647ccdfc7c" => :sierra - sha256 "874fa184a674b4d8385f9a57b815e61992e0909a273268add0b70d7c0ffaedbd" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-pcre2-16", - "--enable-pcre2-32", - "--enable-pcre2grep-libz", - "--enable-pcre2grep-libbz2", - "--enable-jit" - system "make" - system "make", "install" - end - - test do - system bin/"pcre2grep", "regular expression", prefix/"README" - end -end diff --git a/Formula/pcsc-lite.rb b/Formula/pcsc-lite.rb deleted file mode 100644 index 244101e40492e..0000000000000 --- a/Formula/pcsc-lite.rb +++ /dev/null @@ -1,29 +0,0 @@ -class PcscLite < Formula - desc "Middleware to access a smart card using SCard API" - homepage "https://pcsclite.apdu.fr/" - url "https://pcsclite.apdu.fr/files/pcsc-lite-1.8.23.tar.bz2" - sha256 "5a27262586eff39cfd5c19aadc8891dd71c0818d3d629539bd631b958be689c9" - - bottle do - sha256 "be4068d6d357c142d4978b1325cb1c534fcc369cba2bbbe44fb3eaceb8fdd501" => :mojave - sha256 "0ed981ad7244d50d3084cef08991c5662658cd321d24784b2a6c2f8586f8f205" => :high_sierra - sha256 "16167530e755c8c59a43b72433e9e1aba53b14f4f7364e85fc3159ecdc8ce75b" => :sierra - sha256 "9a2816b3aaa1717d6c5d2c59495681915b62de67e496bb3edfecf1e5b6d537c0" => :el_capitan - end - - keg_only :provided_by_macos, - "pcsc-lite interferes with detection of macOS's PCSC.framework" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--disable-libsystemd" - system "make", "install" - end - - test do - system sbin/"pcscd", "--version" - end -end diff --git a/Formula/pdal.rb b/Formula/pdal.rb deleted file mode 100644 index 2a81aaf4be4f7..0000000000000 --- a/Formula/pdal.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Pdal < Formula - desc "Point data abstraction library" - homepage "https://www.pdal.io/" - url "https://github.com/PDAL/PDAL/archive/1.8.0.tar.gz" - sha256 "ef3a32c06865383feac46fd7eb7491f034cad6b0b246b3c917271ae0c8f25b69" - revision 1 - head "https://github.com/PDAL/PDAL.git" - - bottle do - sha256 "a9ac84371841682d01b9dd29cd784ec928ab3fcacc1d87d2f2b394518605af9e" => :mojave - sha256 "6911791de98ac037aa4f1ba701dcb4fe5f23d76484c2519e3508a34c9bcaecbf" => :high_sierra - sha256 "f1220dd6e4e789a7606659689c2a19c46ec20c92dfd32a9c2b2711dace0b0d5c" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gdal" - depends_on "hdf5" - depends_on "laszip" - depends_on "numpy" - depends_on "pcl" - depends_on "postgresql" - - def install - system "cmake", ".", *std_cmake_args, - "-DWITH_LASZIP=TRUE", - "-DBUILD_PLUGIN_GREYHOUND=ON", - "-DBUILD_PLUGIN_ICEBRIDGE=ON", - "-DBUILD_PLUGIN_PCL=ON", - "-DBUILD_PLUGIN_PGPOINTCLOUD=ON", - "-DBUILD_PLUGIN_PYTHON=ON", - "-DBUILD_PLUGIN_SQLITE=ON" - - system "make", "install" - doc.install "examples", "test" - end - - test do - system bin/"pdal", "info", doc/"test/data/las/interesting.las" - end -end diff --git a/Formula/pdf-redact-tools.rb b/Formula/pdf-redact-tools.rb deleted file mode 100644 index 1c25fc5d668f9..0000000000000 --- a/Formula/pdf-redact-tools.rb +++ /dev/null @@ -1,40 +0,0 @@ -class PdfRedactTools < Formula - desc "Securely redacting and stripping metadata" - homepage "https://github.com/firstlookmedia/pdf-redact-tools" - url "https://github.com/firstlookmedia/pdf-redact-tools/archive/v0.1.2.tar.gz" - sha256 "5874a7b76be15ccaa4c20874299ef51fbaf520a858229a58678bc72a305305fc" - head "https://github.com/firstlookmedia/pdf-redact-tools.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "57ca77cff062d910ddf754b3b8604e6bbc25c0cef9d5eed10d9be31a3e09f9c6" => :mojave - sha256 "2f365098071c52ccf595a93d708dec02fa25fbaee0a9c0a30026b20d313b8147" => :high_sierra - sha256 "2f365098071c52ccf595a93d708dec02fa25fbaee0a9c0a30026b20d313b8147" => :sierra - sha256 "2f365098071c52ccf595a93d708dec02fa25fbaee0a9c0a30026b20d313b8147" => :el_capitan - end - - depends_on "exiftool" - depends_on "ghostscript" - depends_on "imagemagick" - depends_on "python@2" # does not support Python 3 - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - # Modifies the file in the directory the file is placed in. - cp test_fixtures("test.pdf"), "test.pdf" - system bin/"pdf-redact-tools", "-e", "test.pdf" - assert_predicate testpath/"test_pages/page-0.png", :exist? - rm_rf "test_pages" - - system bin/"pdf-redact-tools", "-s", "test.pdf" - assert_predicate testpath/"test-final.pdf", :exist? - end -end diff --git a/Formula/pdf2htmlex.rb b/Formula/pdf2htmlex.rb deleted file mode 100644 index f6bd1bc88d798..0000000000000 --- a/Formula/pdf2htmlex.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Pdf2htmlex < Formula - desc "PDF to HTML converter" - homepage "https://coolwanglu.github.io/pdf2htmlEX/" - url "https://github.com/coolwanglu/pdf2htmlEX/archive/v0.14.6.tar.gz" - sha256 "320ac2e1c2ea4a2972970f52809d90073ee00a6c42ef6d9833fb48436222f0e5" - revision 20 - head "https://github.com/coolwanglu/pdf2htmlEX.git" - - bottle do - sha256 "44c53a6568f7ccf89f3c2ee6ecb9b68e852b98ac3e8aac394815b03a42bbc07d" => :mojave - sha256 "316df8e38b0533e5c7ebbd3b120fe4e5d2957f7d7de92ccc0dbe75c72d1285b6" => :high_sierra - sha256 "e02628e81215b1e9fea902f9b353e6f8ea93f1eda7e385f886cee95e39627d20" => :sierra - sha256 "5c72b64128d75ce84c0158f6c90c8e710c299de71f593a5b15868c006c5396fb" => :el_capitan - end - - depends_on "autoconf" => :build # for fontforge - depends_on "automake" => :build # for fontforge - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "cairo" # for fontforge - depends_on "freetype" # for fontforge - depends_on "gettext" # for fontforge - depends_on "giflib" # for fontforge - depends_on "glib" # for fontforge - depends_on "gnu-getopt" - depends_on "jpeg" # for fontforge - depends_on "libpng" # for fontforge - depends_on "libtiff" # for fontforge - depends_on "libtool" # for fontforge - depends_on :macos => :lion - depends_on "openjpeg" # for poppler - depends_on "pango" # for fontforge - depends_on "ttfautohint" - - # Pdf2htmlex use an outdated, customised Fontforge installation. - # See https://github.com/coolwanglu/pdf2htmlEX/wiki/Building - resource "fontforge" do - url "https://github.com/coolwanglu/fontforge.git", :branch => "pdf2htmlEX" - end - - # Upstream issue "poppler 0.59.0 incompatibility" - # Reported 4 Sep 2017 https://github.com/coolwanglu/pdf2htmlEX/issues/733 - resource "poppler" do - url "https://poppler.freedesktop.org/poppler-0.57.0.tar.xz" - sha256 "0ea37de71b7db78212ebc79df59f99b66409a29c2eac4d882dae9f2397fe44d8" - end - - resource "poppler-data" do - url "https://poppler.freedesktop.org/poppler-data-0.4.8.tar.gz" - sha256 "1096a18161f263cccdc6d8a2eb5548c41ff8fcf9a3609243f1b6296abdf72872" - end - - def install - ENV.cxx11 if MacOS.version < :mavericks - - resource("fontforge").stage do - # Fix for incomplete giflib 5 support, see - # https://github.com/coolwanglu/pdf2htmlEX/issues/713 - inreplace "gutils/gimagereadgif.c", "DGifCloseFile(gif)", "DGifCloseFile(gif, NULL)" - - # Fix linker error; see: https://trac.macports.org/ticket/25012 - ENV.append "LDFLAGS", "-lintl" - - # Reset ARCHFLAGS to match how we build - ENV["ARCHFLAGS"] = "-arch #{MacOS.preferred_arch}" - - system "./autogen.sh" - system "./configure", "--prefix=#{libexec}/fontforge", - "--without-libzmq", - "--without-x", - "--without-iconv", - "--disable-python-scripting", - "--disable-python-extension" - system "make" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", "#{libexec}/fontforge/lib/pkgconfig" - ENV.prepend_path "PATH", "#{libexec}/fontforge/bin" - - resource("poppler").stage do - inreplace "poppler.pc.in", "Cflags: -I${includedir}/poppler", - "Cflags: -I${includedir}/poppler -I${includedir}" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}/poppler", - "--enable-xpdf-headers", - "--enable-poppler-glib", - "--disable-gtk-test", - "--enable-introspection=no", - "--disable-poppler-qt4" - system "make", "install" - resource("poppler-data").stage do - system "make", "install", "prefix=#{libexec}/poppler" - end - end - - ENV.prepend_path "PKG_CONFIG_PATH", "#{libexec}/poppler/lib/pkgconfig" - ENV.prepend_path "PATH", "#{libexec}/poppler/bin" - - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end - - test do - system "#{bin}/pdf2htmlEX", test_fixtures("test.pdf") - end -end diff --git a/Formula/pdf2image.rb b/Formula/pdf2image.rb deleted file mode 100644 index cd1090e79ce96..0000000000000 --- a/Formula/pdf2image.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Pdf2image < Formula - desc "Convert PDFs to images" - homepage "https://code.google.com/p/pdf2image/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pdf2image/pdf2image-0.53-source.tar.gz" - sha256 "e8672c3bdba118c83033c655d90311db003557869c92903e5012cdb368a68982" - - bottle do - sha256 "722d8eefc7f7f12555f4997ca13470fda8b508a2683bc9edc6bfa5b883707202" => :mojave - sha256 "59ba0fc004f64cafaeb8e9beb6c07964b8df8fb10bf653aeb83713e3610ac182" => :high_sierra - sha256 "46df7ae58a1bfc73cd1a1c1075de032724514d29995e965169d69f51409cad7e" => :sierra - sha256 "c12d781ab5136a717cb88cadb50b2dfcd1f67cf263b5b668b1e171f562bcb072" => :el_capitan - sha256 "a0bb792123e4754d5cf80cf248e8932dd1885616af2c4c9c7f00e35cda962725" => :yosemite - end - - depends_on "freetype" - depends_on "ghostscript" - depends_on :x11 - - conflicts_with "poppler", "xpdf", - :because => "pdf2image, poppler, and xpdf install conflicting executables" - - def install - system "./configure", "--prefix=#{prefix}" - - # Fix manpage install location. See: - # https://github.com/flexpaper/pdf2json/issues/2 - inreplace "Makefile", "/man/", "/share/man/" - - # Fix incorrect variable name in Makefile - inreplace "src/Makefile", "$(srcdir)", "$(SRCDIR)" - - # Add X11 libs manually; the Makefiles don't use LDFLAGS properly - inreplace ["src/Makefile", "xpdf/Makefile"], - "LDFLAGS =", "LDFLAGS=-L#{MacOS::X11.lib}" - - system "make" - system "make", "install" - end - - test do - system "#{bin}/pdf2image", "--version" - end -end diff --git a/Formula/pdf2json.rb b/Formula/pdf2json.rb deleted file mode 100644 index 873713b2f18ee..0000000000000 --- a/Formula/pdf2json.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Pdf2json < Formula - desc "PDF to JSON and XML converter" - homepage "https://github.com/flexpaper/pdf2json" - url "https://github.com/flexpaper/pdf2json/releases/download/v0.69/pdf2json-0.69.tar.gz" - sha256 "69394ef5d5d5504f7106e8b55e15bf491c48d906d611e6bc2e5952005a85b593" - - bottle do - sha256 "d04e13e9a3dcb0593b594575afbc67acc1c6e0bda8e2cefa85b2027fa97b2036" => :mojave - sha256 "60d1c24f08283b8040f2e7e9154f7fcccaa415199fb77fefe843eebb74583019" => :high_sierra - sha256 "586c26331ad9becac719c803c71be519ea3684c28ab80db457e8f61df9485234" => :sierra - sha256 "92852d5246f34ed87340f347f8645c60e39f7cbd924c2e94cf199f4f9d42ddc6" => :el_capitan - sha256 "3c10495304bdf5d1c99127219e79d3693bfd8141c861596e791935472c59246c" => :yosemite - end - - def install - system "./configure" - system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" - bin.install "src/pdf2json" - end - - test do - system bin/"pdf2json", test_fixtures("test.pdf"), "test.json" - assert_predicate testpath/"test.json", :exist? - end -end diff --git a/Formula/pdf2svg.rb b/Formula/pdf2svg.rb deleted file mode 100644 index ec0fd99179e19..0000000000000 --- a/Formula/pdf2svg.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Pdf2svg < Formula - desc "PDF converter to SVG" - homepage "http://www.cityinthesky.co.uk/opensource/pdf2svg" - url "https://github.com/db9052/pdf2svg/archive/v0.2.3.tar.gz" - sha256 "4fb186070b3e7d33a51821e3307dce57300a062570d028feccd4e628d50dea8a" - revision 4 - - bottle do - cellar :any - sha256 "72e8c415a7a7f1f9661f43a6f6f624edfaed8d94c2e954847f212ca39a021778" => :mojave - sha256 "6744c9c679779473e33f590240ff3d5ac73abfd2f4ac9050efd9c7e95f171998" => :high_sierra - sha256 "ba6b9232b27927695184348ccb8eef5efd1c7a8cbde0d2448dd6f4dc62466e8a" => :sierra - sha256 "ca28e65059216738a1632e17c0859145fe64f685ae49a6bfebf327b28c18e69d" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "poppler" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/pdf2svg", test_fixtures("test.pdf"), "test.svg" - end -end diff --git a/Formula/pdfcrack.rb b/Formula/pdfcrack.rb deleted file mode 100644 index ee18715f324a8..0000000000000 --- a/Formula/pdfcrack.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Pdfcrack < Formula - desc "PDF files password cracker" - homepage "https://pdfcrack.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pdfcrack/pdfcrack/pdfcrack-0.16/pdfcrack-0.16.tar.gz" - sha256 "7865b203074ccfd5c612c8ce00c46ffcb4fabaa26154ce9304dfc668c7cb73ef" - - bottle do - cellar :any_skip_relocation - sha256 "536c58b929d56ecd58787a99806ba35eb77c6d84e685c768ac340a2565868538" => :mojave - sha256 "267ea30516a748d4e47e36608dbac86b4447ce1f27b96c8333f7866a1787128d" => :high_sierra - sha256 "aa99f4d2cdf38a95b2ce720875c446a83a15f4b912d09e6b70e41caa5e95cf55" => :sierra - sha256 "56e86ec915cc0f470b12a7f5ce22afb12d03a79bc99285a71503fbea1769204d" => :el_capitan - end - - def install - system "make", "all" - bin.install "pdfcrack" - end - - test do - system "#{bin}/pdfcrack", "--version" - end -end diff --git a/Formula/pdfgrep.rb b/Formula/pdfgrep.rb deleted file mode 100644 index 7620a5eaa2d89..0000000000000 --- a/Formula/pdfgrep.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Pdfgrep < Formula - desc "Search PDFs for strings matching a regular expression" - homepage "https://pdfgrep.org/" - url "https://pdfgrep.org/download/pdfgrep-2.1.1.tar.gz" - sha256 "2c8155f30fe5d9d8ec4340e48133ed0b241496bbebe29498931f975c67a10c0b" - - bottle do - cellar :any - sha256 "d60488a632255a11357beea91d489bbb707d883cd549140ffdb2b1f8abe193dc" => :mojave - sha256 "164e7937ccf496ae35b3abbb5f7718a09428a25b9d67b7d6e35f7f6a55e06ac7" => :high_sierra - sha256 "99b80991db034c80573ab2153c831b9feccf535ca453ce3ffa770561e91e95b2" => :sierra - sha256 "633b29af2386f3feaf857ba3cd44258c614295c0b49f32ed95292abfb1c434b2" => :el_capitan - end - - head do - url "https://gitlab.com/pdfgrep/pdfgrep.git" - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "libgcrypt" - depends_on "poppler" - depends_on "pcre" => :optional - - needs :cxx11 - - def install - ENV.cxx11 - system "./autogen.sh" if build.head? - - args = %W[--disable-dependency-tracking --prefix=#{prefix}] - args << "--without-libpcre" if build.without? "pcre" - system "./configure", *args - - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "make", "install" - end - - test do - system bin/"pdfgrep", "-i", "homebrew", test_fixtures("test.pdf") - end -end diff --git a/Formula/pdflib-lite.rb b/Formula/pdflib-lite.rb deleted file mode 100644 index d1d2c97fb211e..0000000000000 --- a/Formula/pdflib-lite.rb +++ /dev/null @@ -1,44 +0,0 @@ -class PdflibLite < Formula - desc "Subset of the functionality of PDFlib 7" - homepage "https://www.pdflib.com/download/free-software/pdflib-lite-7/" - url "https://dl.bintray.com/homebrew/mirror/pdflib-lite--7.0.5p3.tar.xz" - mirror "https://fossies.org/linux/misc/old/PDFlib-Lite-7.0.5p3.tar.gz" - mirror "https://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz" - version "7.0.5p3" - sha256 "e5fb30678165d28b2bf066f78d5f5787e73a2a28d4902b63e3e07ce1678616c9" - - bottle do - cellar :any - rebuild 2 - sha256 "67334e52d81135fa1c1fbc5ff4065b745087d2072955b052aac6fad79520f663" => :mojave - sha256 "7a3783e63304556c7c93604449ac09718cca6ea4e2244ff5819edb2a5d99f8f7" => :high_sierra - sha256 "466701d2cac2d101b470fbdb122ba3a8f4f9169fe6a28fc8846859d8f7cfafc8" => :sierra - sha256 "c05f42bfb25d1fa204440a1d421af10f9bf853e94dd17c7325e0382d7683d589" => :el_capitan - sha256 "e2e8891b33b4f3f2bab8f809e19d9df0450c1e872d39e6d5090094630210ee45" => :yosemite - sha256 "d4506f8523153b8e452c17f2897d10ce526476ed8e27c913a9325aac2f2b4f0f" => :mavericks - end - - def install - # Without the following substitution, pdflib-lite runs into weird - # build errors due to bad interactions with the TIFF headers. - # This workaround comes from the MacPorts.org portfile for pdflib. - ENV["CPPFLAGS"] = "-isystem#{prefix}" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-java", - "--without-perl", - "--without-py", - "--without-tcl", - "--without-ruby" - system "make" - system "make", "install" - end - - def caveats; <<~EOS - pdflib-lite is not open source software; usage restrictions apply! - Be sure to understand and obey the license terms, which can be found at: - https://www.pdflib.com/download/free-software/pdflib-lite-7/pdflib-lite-licensing/ - EOS - end -end diff --git a/Formula/pdfpc.rb b/Formula/pdfpc.rb deleted file mode 100644 index 4c90bc135d015..0000000000000 --- a/Formula/pdfpc.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Pdfpc < Formula - desc "Presenter console with multi-monitor support for PDF files" - homepage "https://pdfpc.github.io/" - url "https://github.com/pdfpc/pdfpc/archive/v4.3.0.tar.gz" - sha256 "15bb8f202988a978635f9b569f57be6dfe6e29e8ed3fc4929781cf8ef553ea2a" - head "https://github.com/pdfpc/pdfpc.git" - - bottle do - sha256 "47adc3527b7db1f32aee5efc071e737db59e66d99fe6eb9207d58a6f95259348" => :mojave - sha256 "84e7142812adbe4f04287236cd0b88084fff32bd0bbeef07fd487618b588276d" => :high_sierra - sha256 "af761af075aa7a3231bb447726d949afaa7f9fe55f85d11eba75ce88d41ed809" => :sierra - end - - depends_on "cmake" => :build - depends_on "vala" => :build - depends_on "gtk+3" - depends_on "libgee" - depends_on "librsvg" - depends_on "poppler" - - def install - system "cmake", ".", "-DMOVIES=off", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/pdfpc", "--version" - end -end diff --git a/Formula/pdfsandwich.rb b/Formula/pdfsandwich.rb deleted file mode 100644 index 98b73586f5e73..0000000000000 --- a/Formula/pdfsandwich.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Pdfsandwich < Formula - desc "Generate sandwich OCR PDFs from scanned file" - homepage "http://www.tobias-elze.de/pdfsandwich/" - url "https://downloads.sourceforge.net/project/pdfsandwich/pdfsandwich%200.1.7/pdfsandwich-0.1.7.tar.bz2" - sha256 "9795ffea84b9b6b501f38d49a4620cf0469ddf15aac31bac6dbdc9ec1716fa39" - head "http://svn.code.sf.net/p/pdfsandwich/code/trunk/src" - - bottle do - cellar :any_skip_relocation - sha256 "0b298e9deb1b4b62ebfe4eca95b678aff27f9ed76b6f0b13dd6ff9679768cba2" => :mojave - sha256 "2471d2ff0242228e150a825e08b051803ffa96442c2949155d89aa5ab0163e0c" => :high_sierra - sha256 "55481ac412ee714452c1ef754718e28a215c395106fac5eb25c07d5908c38603" => :sierra - sha256 "af5eaeb89d1e89eb0fb48d2e1661ddfdc21c3f35f08cbfb4fb3aff594b4ab1da" => :el_capitan - end - - depends_on "gawk" => :build - depends_on "ocaml" => :build - depends_on "exact-image" - depends_on "ghostscript" - depends_on "imagemagick" - depends_on "poppler" - depends_on "tesseract" - depends_on "unpaper" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - bin.env_script_all_files(libexec/"bin", :PATH => "#{Formula["poppler"].opt_bin}:$PATH") - end - - test do - system "#{bin}/pdfsandwich", "-o", testpath/"test_ocr.pdf", - test_fixtures("test.pdf") - assert_predicate testpath/"test_ocr.pdf", :exist?, - "Failed to create ocr file" - end -end diff --git a/Formula/pdftoedn.rb b/Formula/pdftoedn.rb deleted file mode 100644 index c19abdcd5b501..0000000000000 --- a/Formula/pdftoedn.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Pdftoedn < Formula - desc "Extract PDF document data and save the output in EDN format" - homepage "https://github.com/edporras/pdftoedn" - url "https://github.com/edporras/pdftoedn/archive/v0.36.3.tar.gz" - sha256 "89d8cd10e960841083a4a1ab7b2266a741b47763b76818e272f7b81016e4eabb" - - bottle do - cellar :any - sha256 "3da465d632d051a1fc511bb0e446751b6881fac5f2e5e8458252c1967c727046" => :mojave - sha256 "7e69803973e82f9083f6bfc97c52190287d8f5a878c8290cb0e8635f56c76840" => :high_sierra - sha256 "5737d13d9453c45839dd8c331c85d8b399a99aec3ce2b999d01157c71a693583" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "freetype" - depends_on "leptonica" - depends_on "libpng" - depends_on "openssl" - depends_on "poppler" - depends_on "rapidjson" - - needs :cxx11 - - def install - ENV.cxx11 - - system "autoreconf", "-i" - system "./configure", "--with-openssl=#{Formula["openssl"].opt_prefix}", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/pdftoedn", "-o", "test.edn", test_fixtures("test.pdf") - end -end diff --git a/Formula/pdftohtml.rb b/Formula/pdftohtml.rb deleted file mode 100644 index 000558b90827b..0000000000000 --- a/Formula/pdftohtml.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Pdftohtml < Formula - desc "PDF to HTML converter (based on xpdf)" - homepage "https://pdftohtml.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pdftohtml/Experimental%20Versions/pdftohtml%200.40/pdftohtml-0.40a.tar.gz" - sha256 "277ec1c75231b0073a458b1bfa2f98b7a115f5565e53494822ec7f0bcd8d4655" - - bottle do - rebuild 1 - sha256 "bce2abacc7dcc8f397e0d4f82538492bdc00b085124e9c4ec71cd087f13d0d1a" => :mojave - sha256 "082040145afee0addd7252e2042526113986eb251185923a0210333e6b5a3316" => :high_sierra - sha256 "22264623cdbc31cb0d24f1a7fa5afa22a7fbea71f420877ab921611ea9b5c983" => :sierra - sha256 "8ecdcb1b267387509e8efc6637f119c782a70c6d4326201e0e76f06eb29dbcc1" => :el_capitan - end - - conflicts_with "poppler", :because => "both install `pdftohtml` binaries" - - def install - system "make" - bin.install "src/pdftohtml" - end -end diff --git a/Formula/pdftoipe.rb b/Formula/pdftoipe.rb deleted file mode 100644 index 8fd09af662467..0000000000000 --- a/Formula/pdftoipe.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Pdftoipe < Formula - desc "Reads arbitrary PDF files and generates an XML file readable by Ipe" - homepage "https://github.com/otfried/ipe-tools" - url "https://github.com/otfried/ipe-tools/archive/v7.2.7.3.tar.gz" - sha256 "1ab1c9303ad2e05d07229d3879ecf52f150639deb0e3b02130cf3facc2609be1" - - bottle do - cellar :any - sha256 "07ed1775adadc3b241bb7994fece568815c173960cf5fa613f1e6aa871cf5ffe" => :mojave - sha256 "217fbc3e5539f5e7507ecdcf7b5def07477136903e6e9ce073c4d692ee8618b9" => :high_sierra - sha256 "e9179da87748c561bf55a6866eb88301c4b1f53baae4d6137fdb9b5f78c01186" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "poppler" - - needs :cxx11 - - def install - ENV.cxx11 - - cd "pdftoipe" do - system "make" - bin.install "pdftoipe" - man1.install "pdftoipe.1" - end - end - - test do - cp test_fixtures("test.pdf"), testpath - system bin/"pdftoipe", "test.pdf" - assert_match "Homebrew test.
", File.read("test.ipe") - end -end diff --git a/Formula/pdns.rb b/Formula/pdns.rb deleted file mode 100644 index 1a942175ebe17..0000000000000 --- a/Formula/pdns.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Pdns < Formula - desc "Authoritative nameserver" - homepage "https://www.powerdns.com" - url "https://downloads.powerdns.com/releases/pdns-4.1.4.tar.bz2" - sha256 "e9408603383d529b3bbee2509b73187d2186c502a9b052d07e250cd8f3873ed5" - - bottle do - sha256 "bc1a65731abdae414d570226baba57f4c36b1052422d2382f40a8c53536eb5aa" => :mojave - sha256 "1c11ec28d719c51ef467f008f4237873317f03feb414d29a220cc4207552ff95" => :high_sierra - sha256 "bfc38558f2e8c7a2e76e7757ed7a89d1c384fd25bcd9ca8882153dc73f61be4b" => :sierra - sha256 "33926c7c32351853246ffbaef636fcc24dfd8516afead31e84f3a151daba9816" => :el_capitan - end - - head do - url "https://github.com/powerdns/pdns.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "ragel" - end - - option "with-postgresql", "Enable the PostgreSQL backend" - option "with-remote", "enable the Remote backend" - - deprecated_option "pgsql" => "with-postgresql" - deprecated_option "with-pgsql" => "with-postgresql" - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "lua" - depends_on "openssl" - depends_on "sqlite" - depends_on "postgresql" => :optional - - def install - # Fix "configure: error: cannot find boost/program_options.hpp" - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc}/powerdns - --with-lua - --with-openssl=#{Formula["openssl"].opt_prefix} - --with-sqlite3 - ] - - # Include the PostgreSQL backend if requested - if build.with? "postgresql" - args << "--with-modules=gsqlite3 gpgsql" - elsif build.with? "remote" - args << "--with-modules=gsqlite3 remote" - else - # SQLite3 backend only is the default - args << "--with-modules=gsqlite3" - end - - system "./bootstrap" if build.head? - system "./configure", *args - - system "make", "install" - end - - plist_options :manual => "pdns_server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pdns_server - - EnvironmentVariables - KeepAlive - - SHAuthorizationRight - system.preferences - - - EOS - end - - test do - output = shell_output("#{sbin}/pdns_server --version 2>&1", 99) - assert_match "PowerDNS Authoritative Server #{version}", output - end -end diff --git a/Formula/pdnsd.rb b/Formula/pdnsd.rb deleted file mode 100644 index ee02f70ffc4f9..0000000000000 --- a/Formula/pdnsd.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Pdnsd < Formula - desc "Proxy DNS server with permanent caching" - homepage "http://members.home.nl/p.a.rombouts/pdnsd/" - url "http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-1.2.9a-par.tar.gz" - version "1.2.9a-par" - sha256 "bb5835d0caa8c4b31679d6fd6a1a090b71bdf70950db3b1d0cea9cf9cb7e2a7b" - - bottle do - rebuild 2 - sha256 "822ab7ede7c626ab8cb0c5e7340f3896cdef7cc112c8d9843e55d601f5847297" => :mojave - sha256 "be218973e8fe1d807e7d9ec2762cab2a9968ce302fb46fb89974a686c1afcc43" => :high_sierra - sha256 "81c4852b1093820909afc140f052f732cbd94e428d9aff261b90d74cb4935b09" => :sierra - sha256 "1fa2f1f6ba9fc4fe710c1dc1d5bfb2b9663c557f5cdddf3a2fff8394f138a08f" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sysconfdir=#{etc}", - "--mandir=#{man}", - "--with-cachedir=#{var}/cache/pdnsd" - system "make", "install" - end - - def caveats; <<~EOS - This install of "pdnsd" expects config files to be in #{etc} - All state files (status and cache) are stored in #{var}/cache/pdnsd. - - pdnsd needs to run as root since it listens on privileged ports. - - Sample config file can be found at #{etc}/pdnsd.conf.sample. - - Note that you must create the config file before starting the service, - and change ownership to "root" or pdnsd will refuse to run: - sudo chown root #{etc}/pdnsd.conf - - For other related utilities, e.g. pdnsd-ctl, to run, change the ownership - to the user (default: nobody) running the service: - sudo chown -R nobody #{var}/log/pdnsd.log #{var}/cache/pdnsd - EOS - end - - plist_options :startup => true, :manual => "sudo pdnsd" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - Program - #{opt_sbin}/pdnsd - StandardErrorPath - #{var}/log/pdnsd.log - StandardOutputPath - #{var}/log/pdnsd.log - Disabled - - - - EOS - end - - test do - assert_match "version #{version}", - shell_output("#{sbin}/pdnsd --version", 1) - end -end diff --git a/Formula/pdnsrec.rb b/Formula/pdnsrec.rb deleted file mode 100644 index 865a90d3bde8f..0000000000000 --- a/Formula/pdnsrec.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Pdnsrec < Formula - desc "Non-authoritative/recursing DNS server" - homepage "https://www.powerdns.com/recursor.html" - url "https://downloads.powerdns.com/releases/pdns-recursor-4.1.4.tar.bz2" - sha256 "b19f4353bea3fe54a581a4e7ace101637f8474f5ebfe925e2d3ff4910b71b550" - - bottle do - sha256 "324b5650c13c396603b3a3146ec1d34cae0ee6f6581e6a03d4c4cf3f4279e98c" => :mojave - sha256 "0bec1537a23c906110eb882451e7f6a23c8cd1f4efe4f0b8d231441aee29712c" => :high_sierra - sha256 "13d7deb2f2f06d40842f60f1f641bbd0c00006bbc69673e93a0885563f9cb562" => :sierra - sha256 "6c2a044482066cbdf24c8fcf7a828f5035d4757ba678c7640db526f4d6126230" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "gcc" if DevelopmentTools.clang_build_version <= 600 - depends_on "lua" - depends_on "openssl" - - fails_with :clang do - build 600 - cause "incomplete C++11 support" - end - - needs :cxx11 - - def install - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc}/powerdns - --disable-silent-rules - --with-boost=#{Formula["boost"].opt_prefix} - --with-libcrypto=#{Formula["openssl"].opt_prefix} - --with-lua - --without-net-snmp - ] - - system "./configure", *args - system "make", "install" - end - - test do - output = shell_output("#{sbin}/pdns_recursor --version 2>&1") - assert_match "PowerDNS Recursor #{version}", output - end -end diff --git a/Formula/pdsh.rb b/Formula/pdsh.rb deleted file mode 100644 index 3c28d5e4dea5b..0000000000000 --- a/Formula/pdsh.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Pdsh < Formula - desc "Efficient rsh-like utility, for using hosts in parallel" - homepage "https://github.com/chaos/pdsh" - url "https://github.com/chaos/pdsh/releases/download/pdsh-2.33/pdsh-2.33.tar.gz" - sha256 "7368087429d6269f0a6313c406ef38c6a6a947bc003ca7368fc6481b139d942f" - head "https://github.com/chaos/pdsh.git" - - bottle do - rebuild 1 - sha256 "656fcfbc4e1dd9cd365379556bf558bffb78069f51f0f844efc7f63775d57f90" => :mojave - sha256 "8e96d1e821e525b0dd2acade7224957db5dcd9b4a6fb1dc90d4dabcd9f4e1067" => :high_sierra - sha256 "7834800168a6b0bddb5587df934864caf7d6b17a52b319d98afcb857c931af94" => :sierra - end - - depends_on "readline" - - def install - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --with-nodeupdown - --with-readline - --with-ssh - --without-dshgroups - --without-rsh - --without-xcpu - ] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/pdsh", "-V" - end -end diff --git a/Formula/peco.rb b/Formula/peco.rb deleted file mode 100644 index 7e739ab38f3d0..0000000000000 --- a/Formula/peco.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Peco < Formula - desc "Simplistic interactive filtering tool" - homepage "https://github.com/peco/peco" - url "https://github.com/peco/peco/archive/v0.5.3.tar.gz" - sha256 "ac7d12a1f960ef04afea0c54c5ee754301fb4d85b0e65746826b142de13c843a" - head "https://github.com/peco/peco.git" - - bottle do - cellar :any_skip_relocation - sha256 "d2a3d2950d81cf76b42950eba381f3359e0fa8c2b95829f8eb771013ff4cc4a1" => :mojave - sha256 "653707beb0b04d448f7d4184213575df8a6ce138e42abff2861a98a8f1aa60b6" => :high_sierra - sha256 "e4a10c067d24b7b790c9e522f9405cb5437d2b11837a3291ca2fd2ba00cfc253" => :sierra - sha256 "80596ba0cbd75b50f01c31c406bb3fab28b7f0cffc9bb3e465a3dc6be1e56697" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - (buildpath/"src/github.com/peco/peco").install buildpath.children - cd "src/github.com/peco/peco" do - system "glide", "install" - system "go", "build", "-o", bin/"peco", "cmd/peco/peco.go" - prefix.install_metafiles - end - end - - test do - system "#{bin}/peco", "--version" - end -end diff --git a/Formula/peg-markdown.rb b/Formula/peg-markdown.rb deleted file mode 100644 index b4d8cdc1461be..0000000000000 --- a/Formula/peg-markdown.rb +++ /dev/null @@ -1,31 +0,0 @@ -class PegMarkdown < Formula - desc "Markdown implementation based on a PEG grammar" - homepage "https://github.com/jgm/peg-markdown" - url "https://github.com/jgm/peg-markdown/archive/0.4.14.tar.gz" - sha256 "111bc56058cfed11890af11bec7419e2f7ccec6b399bf05f8c55dae0a1712980" - head "https://github.com/jgm/peg-markdown.git" - - bottle do - cellar :any - sha256 "724cf50020cb91154d7e8dec5a612427cd66469d9469c5141622dafc9c6bba2b" => :mojave - sha256 "de2ac88d9fbcb0ffc76c35be5e1f6ffbcf359f823a64d497992d6fe54fb68120" => :high_sierra - sha256 "fe01189854debd593f6106fea4c79cb1f524d377f20d0e23f526e598461fc276" => :sierra - sha256 "75fc993aa8e861092785f6e235adf55eaf49af419f721ed983e633b9afb96bba" => :el_capitan - sha256 "8b73ccf611b6639935b1fe7b42d5bab2518703f81b182769c537f7224ac1e803" => :yosemite - sha256 "67d5b05f4cb166d398f352cfa2a1d9ce97ae6ed1a7da5f8012c1d3544ec496d6" => :mavericks - sha256 "81b615979242abe96da6a8657c9357ad6f59d585a2533db1469b2e9ead567d9b" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "make" - bin.install "markdown" => "peg-markdown" - end - - test do - assert_equal "

Homebrew

", - pipe_output("#{bin}/peg-markdown", "**Homebrew**", 0).chomp - end -end diff --git a/Formula/peg.rb b/Formula/peg.rb deleted file mode 100644 index 0988201f1d9de..0000000000000 --- a/Formula/peg.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Peg < Formula - desc "Program to perform pattern matching on text" - homepage "http://piumarta.com/software/peg/" - url "http://piumarta.com/software/peg/peg-0.1.18.tar.gz" - sha256 "20193bdd673fc7487a38937e297fff08aa73751b633a086ac28c3b34890f9084" - - bottle do - cellar :any_skip_relocation - sha256 "335fda7dd0c4cbd0a2c929daf19693729b3e1592f1880f5a1cb2ebd5ae587c3c" => :mojave - sha256 "622cd7695294bcac63049e45e934ea1936dfc0f9373046dd028f63a3fe6fa2a4" => :high_sierra - sha256 "15dfb147f388a8a486714d17d519a1ad1195f79bad5843d37726e8efaab1ae79" => :sierra - sha256 "44d0ab83d1bc3ee71294d328dc70dd14206b8d8ddf05a195f2cdf354d746d5dc" => :el_capitan - sha256 "9abe69e43c8e2672aa7b5b26df5c80976c2d0365b5d85d672e8948cebe88646f" => :yosemite - sha256 "bbe71ecc8acb17bdf2538f41ae56472bc104a69e310cfd533565507c3468c53c" => :mavericks - end - - def install - system "make", "all" - bin.install %w[peg leg] - man1.install gzip("src/peg.1") - end - - test do - (testpath/"username.peg").write <<~EOS - start <- "username" - EOS - - system "#{bin}/peg", "-o", "username.c", "username.peg" - - assert_match /yymatchString\(yy, "username"\)/, File.read("username.c") - end -end diff --git a/Formula/pegtl.rb b/Formula/pegtl.rb deleted file mode 100644 index e98b5a5ff3954..0000000000000 --- a/Formula/pegtl.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Pegtl < Formula - desc "Parsing Expression Grammar Template Library" - homepage "https://github.com/taocpp/PEGTL" - url "https://github.com/taocpp/PEGTL/archive/2.7.1.tar.gz" - sha256 "af68ee953d4efc48e090722f8cb9ad4ef1140f6a5443581563e003e060376718" - - bottle :unneeded - - def install - prefix.install "include" - rm "src/example/pegtl/CMakeLists.txt" - (pkgshare/"examples").install (buildpath/"src/example/pegtl").children - end - - test do - system ENV.cxx, pkgshare/"examples/hello_world.cpp", "-std=c++11", "-o", "helloworld" - assert_equal "Good bye, homebrew!\n", shell_output("./helloworld 'Hello, homebrew!'") - end -end diff --git a/Formula/pelikan.rb b/Formula/pelikan.rb deleted file mode 100644 index 6d59b50288633..0000000000000 --- a/Formula/pelikan.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pelikan < Formula - desc "Production-ready cache services" - homepage "https://twitter.github.io/pelikan" - url "https://github.com/twitter/pelikan/archive/0.1.2.tar.gz" - sha256 "c105fdab8306f10c1dfa660b4e958ff6f381a5099eabcb15013ba42e4635f824" - head "https://github.com/twitter/pelikan.git" - - bottle do - cellar :any_skip_relocation - sha256 "a313660eb003974995537cef07e391d3051218f7c65f3326c270b68f0855a59f" => :mojave - sha256 "a80ae1b508d4eae75d03fc5ad07477039a50a37419681b2472af4f9dc5f240ea" => :high_sierra - sha256 "37a675674b7ef33f07099029042f56c054f09b5d22400010d583fbfa41c0ce50" => :sierra - sha256 "e314ce6288bf76e271bf69ce844e2e846b16cad68ce635faf1e5130c3c6911d0" => :el_capitan - sha256 "ab04b8488e6272d0000c8e67842c4b286eb23459a6de9e9a392f14aa87c9978e" => :yosemite - sha256 "80459134cbab7aa94ab55d38488b2058696f7408869306f75e80cfa0350ed40d" => :mavericks - end - - depends_on "cmake" => :build - - def install - mkdir "_build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/pelikan_twemcache", "-c" - end -end diff --git a/Formula/perceptualdiff.rb b/Formula/perceptualdiff.rb deleted file mode 100644 index 7052b6337da3b..0000000000000 --- a/Formula/perceptualdiff.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Perceptualdiff < Formula - desc "Perceptual image comparison tool" - homepage "https://pdiff.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pdiff/pdiff/perceptualdiff-1.1.1/perceptualdiff-1.1.1-src.tar.gz" - sha256 "ab349279a63018663930133b04852bde2f6a373cc175184b615944a10c1c7c6a" - - bottle do - cellar :any - sha256 "1d3d02c27772801105fe9cf3e3ad697bcbeb4db9b260f134bd3e342344455481" => :mojave - sha256 "683d05fc64186ee518180b56345d446be90ff2c42666c80adb86bc185d20d283" => :high_sierra - sha256 "eb2da458eda1cebc7872b2621c96e5aa627d9711f8d31fb792cb092d92d060db" => :sierra - sha256 "d47d680df91ee88897f95123e6b9f972351a603a5f4921726b2877cc2e67924f" => :el_capitan - sha256 "7a1956479cc1176b7340f4614db1b556318513b6359a025dca942142956b65d9" => :yosemite - sha256 "99baa893fa0ceaa71fd8c4443a315c2d8e51c567f65a6917eaa5e4ab3952a900" => :mavericks - end - - depends_on "cmake" => :build - depends_on "freeimage" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end -end diff --git a/Formula/percol.rb b/Formula/percol.rb deleted file mode 100644 index 3aa9bfe81c451..0000000000000 --- a/Formula/percol.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Percol < Formula - desc "Interactive grep tool" - homepage "https://github.com/mooz/percol" - url "https://github.com/mooz/percol/archive/v0.2.1.tar.gz" - sha256 "75056ba1fe190ae4c728e68df963c0e7d19bfe5a85649e51ae4193d4011042f9" - revision 1 - head "https://github.com/mooz/percol.git" - - bottle do - cellar :any_skip_relocation - sha256 "43a0d42c2184fcc78ee6cb187c0bd4167133debe35be81d724bd3b2a26848de3" => :mojave - sha256 "dee76bc835dadd9f37058c6ef642eddca4278d5f5d0995b72bdb0c5fa4d537a4" => :high_sierra - sha256 "dee76bc835dadd9f37058c6ef642eddca4278d5f5d0995b72bdb0c5fa4d537a4" => :sierra - end - - depends_on "python" - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "cmigemo" do - url "https://files.pythonhosted.org/packages/2f/e4/374df50b655e36139334046f898469bf5e2d7600e1e638f29baf05b14b72/cmigemo-0.1.6.tar.gz" - sha256 "7313aa3007f67600b066e04a4805e444563d151341deb330135b4dcdf6444626" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - (testpath/"textfile").write <<~EOS - Homebrew, the missing package manager for macOS. - EOS - (testpath/"expect-script").write <<~EOS - spawn #{bin}/percol --query=Homebrew textfile - expect "QUERY> Homebrew" - EOS - assert_match "Homebrew", shell_output("/usr/bin/expect -f expect-script") - end -end diff --git a/Formula/percona-server-mongodb.rb b/Formula/percona-server-mongodb.rb deleted file mode 100644 index 9da5ae6d95f19..0000000000000 --- a/Formula/percona-server-mongodb.rb +++ /dev/null @@ -1,172 +0,0 @@ -class PerconaServerMongodb < Formula - desc "Drop-in MongoDB replacement" - homepage "https://www.percona.com" - url "https://www.percona.com/downloads/percona-server-mongodb-3.6/percona-server-mongodb-3.6.6-1.4/source/tarball/percona-server-mongodb-3.6.6-1.4.tar.gz" - version "3.6.6-1.4" - sha256 "a30d3932c449b61df049807a51d7fbaf6c3534b68116e82829f63049dff69d2a" - - bottle do - cellar :any - rebuild 1 - sha256 "65e23fd9b4e0a03964950fa1d0323e3730c41d47c511e3f7ef8c08352538e2de" => :mojave - sha256 "2908790361d2e6248f0505c6e7997f6fb45f33e436a6eb8c35e42fc49625486d" => :high_sierra - sha256 "f43cd51a2678db2ca1a1ef80076bd029681c91cc8ccb176dc9931b1638b1db82" => :sierra - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on :macos => :sierra - depends_on "openssl" - - conflicts_with "mongodb", - :because => "percona-server-mongodb and mongodb install the same binaries." - - resource "Cheetah" do - url "https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz" - sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/ec/cc/28444132a25c113149cec54618abc909596f0b272a74c55bab9593f8876c/typing-3.6.4.tar.gz" - sha256 "d400a9344254803a2368533e4533a4200d21eb7b6b729c173bc38201a74db3f2" - end - - def install - ["Cheetah", "PyYAML", "typing"].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(buildpath/"vendor") - end - end - - (buildpath/".brew_home/Library/Python/2.7/lib/python/site-packages/vendor.pth").write <<~EOS - import site; site.addsitedir("#{buildpath}/vendor/lib/python2.7/site-packages") - EOS - - # New Go tools have their own build script but the server scons "install" target is still - # responsible for installing them. - - cd "src/mongo/gotools" do - inreplace "build.sh" do |s| - s.gsub! "$(git describe)", version.to_s.split("-")[0] - s.gsub! "$(git rev-parse HEAD)", "homebrew" - end - - ENV["LIBRARY_PATH"] = Formula["openssl"].opt_lib - ENV["CPATH"] = Formula["openssl"].opt_include - - system "./build.sh", "ssl" - end - - (buildpath/"src/mongo-tools").install Dir["src/mongo/gotools/bin/*"] - - args = %W[ - --prefix=#{prefix} - --ssl - --use-new-tools - -j#{ENV.make_jobs} - CC=#{ENV.cc} - CXX=#{ENV.cxx} - CCFLAGS=-I#{Formula["openssl"].opt_include} - LINKFLAGS=-L#{Formula["openssl"].opt_lib} - ] - - args << "--disable-warnings-as-errors" if MacOS.version >= :yosemite - - system "scons", "install", *args - - (buildpath/"mongod.conf").write <<~EOS - systemLog: - destination: file - path: #{var}/log/mongodb/mongo.log - logAppend: true - storage: - dbPath: #{var}/mongodb - net: - bindIp: 127.0.0.1 - EOS - etc.install "mongod.conf" - end - - def post_install - (var/"mongodb").mkpath - (var/"log/mongodb").mkpath - end - - plist_options :manual => "mongod --config #{HOMEBREW_PREFIX}/etc/mongod.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mongod - --config - #{etc}/mongod.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/mongodb/output.log - StandardOutPath - #{var}/log/mongodb/output.log - HardResourceLimits - - NumberOfFiles - 4096 - - SoftResourceLimits - - NumberOfFiles - 4096 - - - - EOS - end - - test do - begin - (testpath/"mongodb_test.js").write <<~EOS - printjson(db.getCollectionNames()) - // create test collection - db.test.insertOne( - { - "name": "test" - } - ) - printjson(db.getCollectionNames()) - // shows documents - cursor = db.test.find({}) - while (cursor.hasNext()) { - printjson(cursor.next()) - } - db.test.deleteMany({}) - // drop test collection - db.test.drop() - printjson(db.getCollectionNames()) - EOS - pid = fork do - exec "#{bin}/mongod", "--port", "27018", "--dbpath", testpath - end - sleep 1 - system "#{bin}/mongo", "localhost:27018", testpath/"mongodb_test.js" - ensure - Process.kill "SIGTERM", pid - Process.wait pid - end - end -end diff --git a/Formula/percona-server.rb b/Formula/percona-server.rb deleted file mode 100644 index 12a89d4682ed2..0000000000000 --- a/Formula/percona-server.rb +++ /dev/null @@ -1,186 +0,0 @@ -class PerconaServer < Formula - desc "Drop-in MySQL replacement" - homepage "https://www.percona.com" - url "https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.24-27/source/tarball/percona-server-5.7.24-27.tar.gz" - sha256 "999593afa241660bc7860264b46a826faf97d80d411966fade24084f47b249a0" - - bottle do - sha256 "79938125efb509b03ae247a23198c65fb6684eb49be9336860b5a92b56931b5b" => :mojave - sha256 "31d1745e94bc82f5fc8d2c677052a323f1dc76fdebe2369a6e23e583e48cc9ad" => :high_sierra - sha256 "1d6ad1ff891982cee38d7886df5dc99f907a802287a6bddb56c55c552dfcb430" => :sierra - end - - pour_bottle? do - reason "The bottle needs a var/mysql datadir (yours is var/percona)." - satisfy { datadir == var/"mysql" } - end - - depends_on "cmake" => :build - # https://github.com/Homebrew/homebrew-core/issues/1475 - # Needs at least Clang 3.3, which shipped alongside Lion. - # Note: MySQL themselves don't support anything below El Capitan. - depends_on :macos => :lion - depends_on "openssl" - - conflicts_with "mariadb", "mysql", "mysql-cluster", - :because => "percona, mariadb, and mysql install the same binaries." - conflicts_with "mysql-connector-c", - :because => "both install MySQL client libraries" - conflicts_with "mariadb-connector-c", - :because => "both install plugins" - - resource "boost" do - url "https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2" - sha256 "727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca" - end - - # Where the database files should be located. Existing installs have them - # under var/percona, but going forward they will be under var/mysql to be - # shared with the mysql and mariadb formulae. - def datadir - @datadir ||= (var/"percona").directory? ? var/"percona" : var/"mysql" - end - - def install - # Set HAVE_MEMSET_S flag to fix compilation - # https://bugs.launchpad.net/percona-server/+bug/1741647 - ENV.prepend "CPPFLAGS", "-DHAVE_MEMSET_S=1" - - # https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DCOMPILATION_COMMENT=Homebrew - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_PLUGINDIR=lib/plugin - -DMYSQL_DATADIR=#{datadir} - -DSYSCONFDIR=#{etc} - -DWITH_EDITLINE=system - -DWITH_SSL=yes - ] - - # MySQL >5.7.x mandates Boost as a requirement to build & has a strict - # version check in place to ensure it only builds against expected release. - # This is problematic when Boost releases don't align with MySQL releases. - (buildpath/"boost").install resource("boost") - args << "-DWITH_BOOST=#{buildpath}/boost" - - # Percona MyRocks does not compile on macOS - # https://bugs.launchpad.net/percona-server/+bug/1741639 - args.concat %w[-DWITHOUT_ROCKSDB=1] - - # TokuDB does not compile on macOS - # https://bugs.launchpad.net/percona-server/+bug/1531446 - args.concat %w[-DWITHOUT_TOKUDB=1] - - args << "-DWITH_UNIT_TESTS=OFF" - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}" - end - - # Remove the tests directory - rm_rf prefix/"mysql-test" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix/"data" - - # Fix up the control script and link into bin. - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, - "\\1:#{HOMEBREW_PREFIX}/bin\\2" - bin.install_symlink prefix/"support-files/mysql.server" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the datadir exists - datadir.mkpath - unless (datadir/"mysql/user.frm").exist? - ENV["TMPDIR"] = nil - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" - end - end - - def caveats - s = <<~EOS - We've installed your MySQL database without a root password. To secure it run: - mysql_secure_installation - MySQL is configured to only allow connections from localhost by default - To connect run: - mysql -uroot - EOS - if my_cnf = ["/etc/my.cnf", "/etc/mysql/my.cnf"].find { |x| File.exist? x } - s += <<~EOS - A "#{my_cnf}" from another install may interfere with a Homebrew-built - server starting up correctly. - EOS - end - s - end - - plist_options :manual => "mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{datadir} - - RunAtLoad - - WorkingDirectory - #{datadir} - - - EOS - end - - test do - begin - # Expects datadir to be a completely clean dir, which testpath isn't. - dir = Dir.mktmpdir - system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{dir}", "--tmpdir=#{dir}" - - pid = fork do - exec bin/"mysqld", "--bind-address=127.0.0.1", "--datadir=#{dir}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:3306") - output.force_encoding("ASCII-8BIT") if output.respond_to?(:force_encoding) - assert_match version.to_s, output - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/percona-server@5.6.rb b/Formula/percona-server@5.6.rb deleted file mode 100644 index 8107c4b12e648..0000000000000 --- a/Formula/percona-server@5.6.rb +++ /dev/null @@ -1,152 +0,0 @@ -class PerconaServerAT56 < Formula - desc "Drop-in MySQL replacement" - homepage "https://www.percona.com" - url "https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.42-84.2/source/tarball/percona-server-5.6.42-84.2.tar.gz" - version "5.6.42-84.2" - sha256 "3105ead687f56a1ae0ace557d276fe8dc7f4e1f71d8523032f713ebb80635347" - - bottle do - sha256 "14c44d88f544e03bf096e96f077f2ab9a1cd9ad6b95c1b5b69bab67d337bb416" => :mojave - sha256 "42aee545ba8add7b71afc189b9f92ec133d1fa712577708bf5b741a58146b416" => :high_sierra - sha256 "1ebf06f5346e40267f69744df6827ff593b43901413c4b4e644974326ca2fdc9" => :sierra - end - - pour_bottle? do - reason "The bottle needs a var/mysql datadir (yours is var/percona)." - satisfy { datadir == var/"mysql" } - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pidof" unless MacOS.version >= :mountain_lion - depends_on "openssl" - - # Where the database files should be located. Existing installs have them - # under var/percona, but going forward they will be under var/mysql to be - # shared with the mysql and mariadb formulae. - def datadir - @datadir ||= (var/"percona").directory? ? var/"percona" : var/"mysql" - end - - def install - # Don't hard-code the libtool path. See: - # https://github.com/Homebrew/homebrew/issues/20185 - inreplace "cmake/libutils.cmake", - "COMMAND /usr/bin/libtool -static -o ${TARGET_LOCATION}", - "COMMAND libtool -static -o ${TARGET_LOCATION}" - - args = std_cmake_args + %W[ - -DMYSQL_DATADIR=#{datadir} - -DINSTALL_PLUGINDIR=lib/plugin - -DSYSCONFDIR=#{etc} - -DINSTALL_MANDIR=#{man} - -DINSTALL_DOCDIR=#{doc} - -DINSTALL_INFODIR=#{info} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MYSQLSHAREDIR=#{share.basename}/mysql - -DWITH_SSL=yes - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - -DCOMPILATION_COMMENT=Homebrew - -DWITH_EDITLINE=system - -DWITH_UNIT_TESTS=OFF - -DCMAKE_FIND_FRAMEWORK=LAST - -DCMAKE_VERBOSE_MAKEFILE=ON - ] - - # PAM plugin is Linux-only at the moment - args.concat %w[ - -DWITHOUT_AUTH_PAM=1 - -DWITHOUT_AUTH_PAM_COMPAT=1 - -DWITHOUT_DIALOG=1 - ] - - # TokuDB is broken on MacOsX - # https://bugs.launchpad.net/percona-server/+bug/1531446 - args.concat %w[-DWITHOUT_TOKUDB=1] - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix+"data" - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", - /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - # mysqlaccess deprecated on 5.6.17, and removed in 5.7.4. - # See: https://bugs.mysql.com/bug.php?id=69012 - # Move mysqlaccess to libexec - libexec.mkpath - mv "#{bin}/mysqlaccess", libexec - mv "#{bin}/mysqlaccess.conf", libexec - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure that data directory exists - datadir.mkpath - unless File.exist? "#{datadir}/mysql/user.frm" - ENV["TMPDIR"] = nil - system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - Program - #{opt_bin}/mysqld_safe - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system "/bin/sh", "-n", "#{bin}/mysqld_safe" - (prefix/"mysql-test").cd do - system "./mysql-test-run.pl", "status", "--vardir=#{testpath}" - end - end -end diff --git a/Formula/percona-toolkit.rb b/Formula/percona-toolkit.rb deleted file mode 100644 index fa874f7589581..0000000000000 --- a/Formula/percona-toolkit.rb +++ /dev/null @@ -1,56 +0,0 @@ -class PerconaToolkit < Formula - desc "Percona Toolkit for MySQL" - homepage "https://www.percona.com/software/percona-toolkit/" - url "https://www.percona.com/downloads/percona-toolkit/3.0.12/source/tarball/percona-toolkit-3.0.12.tar.gz" - sha256 "7d15d6b186a0fa6e45a1f9c390fab210b1d18f66d24d58b1bea30d2f59b35e20" - head "lp:percona-toolkit", :using => :bzr - - bottle do - cellar :any - sha256 "41f11cadd02f6de1c0a0f92ec9d09d6a8031b29a50a0155098005024aba0434c" => :mojave - sha256 "e7790d1db85e264098b9be5a8e94846f7ee77c3aac8dcca60304c1efd09f94d0" => :high_sierra - sha256 "10ccc762d3af04cf387469b305afed1ebbc712ef5176b5ef35a4f03173a22c00" => :sierra - end - - depends_on "mysql-client" - depends_on "openssl" - - # In Mojave, this is not part of the system Perl anymore - if MacOS.version >= :mojave - resource "DBI" do - url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.641.tar.gz" - sha256 "5509e532cdd0e3d91eda550578deaac29e2f008a12b64576e8c261bb92e8c2c1" - end - end - - resource "DBD::mysql" do - url "https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.046.tar.gz" - sha256 "6165652ec959d05b97f5413fa3dff014b78a44cf6de21ae87283b28378daf1f7" - end - - resource "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-2.97001.tar.gz" - sha256 "e277d9385633574923f48c297e1b8acad3170c69fa590e31fa466040fc6f8f5a" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}" - system "make", "test", "install" - share.install prefix/"man" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - input = "SELECT name, password FROM user WHERE id='12823';" - output = pipe_output("#{bin}/pt-fingerprint", input, 0) - assert_equal "select name, password from user where id=?;", output.chomp - end -end diff --git a/Formula/percona-xtrabackup.rb b/Formula/percona-xtrabackup.rb deleted file mode 100644 index 91aaa9018766c..0000000000000 --- a/Formula/percona-xtrabackup.rb +++ /dev/null @@ -1,85 +0,0 @@ -class PerconaXtrabackup < Formula - desc "Open source hot backup tool for InnoDB and XtraDB databases" - homepage "https://www.percona.com/software/mysql-database/percona-xtrabackup" - url "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.12/source/tarball/percona-xtrabackup-2.4.12.tar.gz" - sha256 "de02cfd5bde96ddbf50339ef3a4646004dde52239698df45c19ed3e8ee40738e" - - bottle do - rebuild 1 - sha256 "ef5bf99911e8cd49c218154b34ab0f66f257b518888ec5b8bb21104b3f761422" => :mojave - sha256 "0d78f86e1768a845f703b4fd5a2cef722f382c6f7bfef2725933d5af02ed19ba" => :high_sierra - sha256 "fd664421defce224cee2753357b80521aaa6db4aaf5769fd026037db9b767104" => :sierra - end - - depends_on "cmake" => :build - depends_on "sphinx-doc" => :build - depends_on "libev" - depends_on "libgcrypt" - depends_on "mysql-client" - depends_on "openssl" - - resource "DBI" do - url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.641.tar.gz" - sha256 "5509e532cdd0e3d91eda550578deaac29e2f008a12b64576e8c261bb92e8c2c1" - end - - resource "DBD::mysql" do - url "https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.046.tar.gz" - sha256 "6165652ec959d05b97f5413fa3dff014b78a44cf6de21ae87283b28378daf1f7" - end - - resource "boost" do - url "https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2" - sha256 "727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca" - end - - def install - cmake_args = %w[ - -DBUILD_CONFIG=xtrabackup_release - -DCOMPILATION_COMMENT=Homebrew - -DINSTALL_MANDIR=share/man - -DWITH_MAN_PAGES=ON - ] - - # macOS has this value empty by default. - # See https://bugs.python.org/issue18378#msg215215 - ENV["LC_ALL"] = "en_US.UTF-8" - - # 1.59.0 specifically required. Detailed in cmake/boost.cmake - (buildpath/"boost_1_59_0").install resource("boost") - cmake_args << "-DWITH_BOOST=#{buildpath}/boost_1_59_0" - - cmake_args.concat std_cmake_args - - system "cmake", *cmake_args - system "make" - system "make", "install" - - share.install "share/man" - - rm_rf prefix/"xtrabackup-test" # Remove unnecessary files - # remove conflicting libraries that are already installed by mysql - rm lib/"libmysqlservices.a" - rm lib/"plugin/keyring_file.so" - - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - # In Mojave, this is not part of the system Perl anymore - if MacOS.version >= :mojave - resource("DBI").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - resource("DBD::mysql").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - assert_match version.to_s, shell_output("#{bin}/xtrabackup --version 2>&1") - end -end diff --git a/Formula/perkeep.rb b/Formula/perkeep.rb deleted file mode 100644 index 494e88b7ec6e9..0000000000000 --- a/Formula/perkeep.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Perkeep < Formula - desc "Lets you permanently keep your stuff, for life" - homepage "https://perkeep.org/" - url "https://github.com/perkeep/perkeep.git", - :tag => "0.10", - :revision => "0cbe4d5e05a40a17efe7441d75ce0ffdf9d6b9f5" - head "https://github.com/perkeep/perkeep.git" - - bottle do - sha256 "1e51d2d991309cec65b66411ff9dbbd1d93ec40c4c595d1b91a786541c15d738" => :mojave - sha256 "4db15262421ce0cefad97fd2df3affba61cba2e1ba1e4153614940cec138ae10" => :high_sierra - sha256 "9ab629c218f4af8f769520ec269c81c6499c6c9676c5ae43da8fc7ac8212c0ff" => :sierra - sha256 "e4e42c68017500af8a8aa7b542e89905849b09b398a547da818323f08a6e680a" => :el_capitan - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - - conflicts_with "hello", :because => "both install `hello` binaries" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/perkeep.org").install buildpath.children - cd "src/perkeep.org" do - system "go", "run", "make.go" - prefix.install_metafiles - end - bin.install Dir["bin/*"].select { |f| File.executable? f } - end - - plist_options :manual => "perkeepd" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/perkeepd - -openbrowser=false - - RunAtLoad - - - - EOS - end - - test do - system bin/"pk-get", "-version" - end -end diff --git a/Formula/perl-build.rb b/Formula/perl-build.rb deleted file mode 100644 index 418a7dca378dd..0000000000000 --- a/Formula/perl-build.rb +++ /dev/null @@ -1,221 +0,0 @@ -class PerlBuild < Formula - desc "Perl builder" - homepage "https://github.com/tokuhirom/Perl-Build" - url "https://github.com/tokuhirom/Perl-Build/archive/1.25.tar.gz" - sha256 "1a3b666ebdab1ce0c58f3d19dfff5ea85b7f803b51a77c4165fe65ff4313ec48" - head "https://github.com/tokuhirom/perl-build.git" - - bottle do - cellar :any_skip_relocation - sha256 "334d758431276eab85dedb6d85f49ba231cbf6f1403a924ee09bbe036c97778b" => :high_sierra - sha256 "db1311750f48a2bd5cb8571f4dc7688c59b510855ca5481f65d57042cbdfc883" => :sierra - sha256 "fd55b31409de788975a6118a73786b845a131e944edc8cf41877c5eea21044bf" => :el_capitan - end - - resource "inc::latest" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/inc-latest-0.500.tar.gz" - sha256 "daa905f363c6a748deb7c408473870563fcac79b9e3e95b26e130a4a8dc3c611" - end - - resource "Module::Build" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4222.tar.gz" - sha256 "e74b45d9a74736472b74830599cec0d1123f992760f9cd97104f94bee800b160" - end - - resource "Module::Build::Tiny" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.039.tar.gz" - sha256 "7d580ff6ace0cbe555bf36b86dc8ea232581530cbeaaea09bccb57b55797f11c" - end - - resource "ExtUtils::Config" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.008.tar.gz" - sha256 "ae5104f634650dce8a79b7ed13fb59d67a39c213a6776cfdaa3ee749e62f1a8c" - end - - resource "ExtUtils::Helpers" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz" - sha256 "de901b6790a4557cf4ec908149e035783b125bf115eb9640feb1bc1c24c33416" - end - - resource "ExtUtils::InstallPaths" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz" - sha256 "84735e3037bab1fdffa3c2508567ad412a785c91599db3c12593a50a1dd434ed" - end - - resource "HTTP::Tinyish" do - url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-0.14.tar.gz" - sha256 "43fd54bd6d015827801343202f227844ac5af8c9f93c72d9683369be0bd5c194" - end - - # Perl::Strip dependency - resource "common::sense" do - url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/common-sense-3.74.tar.gz" - sha256 "771f7d02abd1ded94d9e37d3f66e795c8d2026d04defbeb5b679ca058116bbf3" - end - - resource "Perl::Strip" do - url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Perl-Strip-1.1.tar.gz" - sha256 "38030abf96af7d8080157ea42ede8564565cc0de4e7689dd8f85d824b4f54142" - end - - resource "App::FatPacker" do - url "https://cpan.metacpan.org/authors/id/M/MS/MSTROUT/App-FatPacker-0.010007.tar.gz" - sha256 "d1158202cae6052385e8c7b1e5874992f5c2c5d85ef40894dcedbce6927336bd" - end - - resource "CPAN::Perl::Releases" do - url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/CPAN-Perl-Releases-3.72.tar.gz" - sha256 "48685fa0e53bb5820edc3bc0a5abed4ab708b42eaf35921d3a720cb884ef4ace" - end - - resource "CPAN::Perl::Releases::MetaCPAN" do - url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/CPAN-Perl-Releases-MetaCPAN-0.006.tar.gz" - sha256 "d78ef4ee4f0bc6d95c38bbcb0d2af81cf59a31bde979431c1b54ec50d71d0e1b" - end - - resource "File::pushd" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-pushd-1.014.tar.gz" - sha256 "b5ab37ffe3acbec53efb7c77b4423a2c79afa30a48298e751b9ebee3fdc6340b" - end - - resource "HTTP::Tiny" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/HTTP-Tiny-0.070.tar.gz" - sha256 "74f385d1e96de887a4df5a222d93afdc7d81ea9ad721a56ff3d8449bb12f7733" - end - - # Devel::PatchPerl dependencies - resource "IO::File" do - url "https://cpan.metacpan.org/authors/id/G/GB/GBARR/IO-1.25.tar.gz" - sha256 "89790db8b9281235dc995c1a85d532042ff68a90e1504abd39d463f05623e7b5" - end - - resource "MIME::Base64" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/MIME-Base64-3.15.tar.gz" - sha256 "7f863566a6a9cb93eda93beadb77d9aa04b9304d769cea3bb921b9a91b3a1eb9" - end - - resource "XSLoader" do - url "https://cpan.metacpan.org/authors/id/S/SA/SAPER/XSLoader-0.24.tar.gz" - sha256 "e819a35a6b8e55cb61b290159861f0dc00fe9d8c4f54578eb24f612d45c8d85f" - end - - resource "Module::Pluggable" do - url "https://cpan.metacpan.org/authors/id/S/SI/SIMONW/Module-Pluggable-5.2.tar.gz" - sha256 "b3f2ad45e4fd10b3fb90d912d78d8b795ab295480db56dc64e86b9fa75c5a6df" - end - - resource "Exporter" do - url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/Exporter-5.72.tar.gz" - sha256 "cd13b7a0e91e8505a0ce4b25f40fab2c92bb28a99ef0d03da1001d95a32f0291" - end - - resource "Carp" do - url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Carp-1.38.tar.gz" - sha256 "a5a9ce3cbb959dfefa8c2dd16552567199b286d39b0e55053ca247c038977101" - end - - resource "ExtUtils::MakeMaker" do - url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.24.tar.gz" - sha256 "416abc97c3bb2cc72bef28852522f2859de53e37bf3d0ae8b292067d78755e69" - end - - resource "Data::Dumper" do - url "https://cpan.metacpan.org/authors/id/S/SM/SMUELLER/Data-Dumper-2.161.tar.gz" - sha256 "3aa4ac1b042b3880438165fb2b2139d377564a8e9928ffe689ede5304ee90558" - end - - resource "Encode" do - url "https://cpan.metacpan.org/authors/id/D/DA/DANKOGAI/Encode-2.89.tar.gz" - sha256 "e6299e67bc7379117015fcff38ba09da37441046a7f16a63dbaaf48b5738fcb4" - end - - resource "parent" do - url "https://cpan.metacpan.org/authors/id/C/CO/CORION/parent-0.236.tar.gz" - sha256 "2d837ebd04f6aa4b8634c9fa9d0bead83f1bee4a8072defe862ee6eb82be127a" - end - - resource "PathTools" do - url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/PathTools-3.62.tar.gz" - sha256 "36350e12f58871437ba03391f80a506e447e3c6630cc37d0625bc25ff1c7b4d2" - end - - resource "Scalar-List-Utils" do - url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.47.tar.gz" - sha256 "c483347372a96972d61fd186522a9dafc2da899ef2951964513b7e8efb37efe1" - end - - resource "if" do - url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/if-0.0606.tar.gz" - sha256 "63d69282d6c4c9e76370b78d770ca720cea88cfe5ee5b612709240fc6078d50e" - end - - # end of Devel::PatchPerl dependencies - - resource "Devel::PatchPerl" do - url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Devel-PatchPerl-1.48.tar.gz" - sha256 "26a9bc8e52af739384cece2773921dd44d2371b6cdf92fe452ecc348eb0d90fe" - end - - resource "File::Temp" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-Temp-0.2304.tar.gz" - sha256 "13415323e48f7c9f34efdedf3d35141a7c3435e2beb8c6b922229dc317d321ac" - end - - resource "Getopt::Long" do - url "https://cpan.metacpan.org/authors/id/J/JV/JV/Getopt-Long-2.49.1.tar.gz" - sha256 "98fad4235509aa24608d9ef895b5c60fe2acd2bca70ebdf1acaf6824e17a882f" - end - - # Pod::Usage dependency - resource "Pod::Text" do - url "https://cpan.metacpan.org/authors/id/R/RR/RRA/podlators-4.09.tar.gz" - sha256 "c86d9633487e47196bfea678622a042ac1c1f910d6f22a06ba4667239f2236ba" - end - - resource "Pod::Usage" do - url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Usage-1.69.tar.gz" - sha256 "1a920c067b3c905b72291a76efcdf1935ba5423ab0187b9a5a63cfc930965132" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - # Ensure we don't install the pre-packed script - (buildpath/"perl-build").unlink - # Remove this apparently dead symlink. - (buildpath/"bin/perl-build").unlink - - build_pl = ["Module::Build::Tiny", "CPAN::Perl::Releases::MetaCPAN"] - resources.each do |r| - r.stage do - next if build_pl.include? r.name - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - end - - build_pl.each do |name| - resource(name).stage do - system "perl", "Build.PL", "--install_base", libexec - system "./Build" - system "./Build", "install" - end - end - - ENV.prepend_path "PATH", libexec/"bin" - system "perl", "Build.PL", "--install_base", libexec - # Replace the dead symlink we removed earlier. - (buildpath/"bin").install_symlink buildpath/"script/perl-build" - system "./Build" - system "./Build", "install" - - %w[perl-build plenv-install plenv-uninstall].each do |cmd| - (bin/cmd).write_env_script(libexec/"bin/#{cmd}", :PERL5LIB => ENV["PERL5LIB"]) - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/perl-build --version") - end -end diff --git a/Formula/perl.rb b/Formula/perl.rb deleted file mode 100644 index 9cfcc308f9a2f..0000000000000 --- a/Formula/perl.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Perl < Formula - desc "Highly capable, feature-rich programming language" - homepage "https://www.perl.org/" - url "https://www.cpan.org/src/5.0/perl-5.28.1.tar.gz" - sha256 "3ebf85fe65df2ee165b22596540b7d5d42f84d4b72d84834f74e2e0b8956c347" - head "https://perl5.git.perl.org/perl.git", :branch => "blead" - - bottle do - sha256 "f5865e090930cb57cdb33b571dfcb4ab927d31d5b750cf4ea349c5fe8e0496ff" => :mojave - sha256 "93dde29e3b480d98b09bedc0b7613763dfadb77f105509ad5c2fbc6a795dde5f" => :high_sierra - sha256 "3c6172271e054af71da670399a0947acd82a648af10b943742ecae7c0986e28b" => :sierra - end - - option "with-dtrace", "Build with DTrace probes" - - # Prevent site_perl directories from being removed - skip_clean "lib/perl5/site_perl" - - def install - args = %W[ - -des - -Dprefix=#{prefix} - -Dprivlib=#{lib}/perl5/#{version} - -Dsitelib=#{lib}/perl5/site_perl/#{version} - -Dotherlibdirs=#{HOMEBREW_PREFIX}/lib/perl5/site_perl/#{version} - -Dperlpath=#{opt_bin}/perl - -Dstartperl=#!#{opt_bin}/perl - -Dman1dir=#{man1} - -Dman3dir=#{man3} - -Duseshrplib - -Duselargefiles - -Dusethreads - ] - - args << "-Dusedtrace" if build.with? "dtrace" - args << "-Dusedevel" if build.head? - - system "./Configure", *args - - # macOS's SIP feature prevents DYLD_LIBRARY_PATH from being passed to child - # processes, which causes the `make test` step to fail. - # https://rt.perl.org/Ticket/Display.html?id=126706 - # https://github.com/Homebrew/legacy-homebrew/issues/41716 - # As of perl 5.28.0 `make` fails, too, so work around it with a symlink. - # Reported 25 Jun 2018 https://rt.perl.org/Ticket/Display.html?id=133306 - (lib/"perl5/#{version}/darwin-thread-multi-2level/CORE").install_symlink buildpath/"libperl.dylib" - - system "make" - system "make", "test" if build.bottle? - - # Remove the symlink so the library actually gets installed. - rm lib/"perl5/#{version}/darwin-thread-multi-2level/CORE/libperl.dylib" - - system "make", "install" - end - - def caveats; <<~EOS - By default non-brewed cpan modules are installed to the Cellar. If you wish - for your modules to persist across updates we recommend using `local::lib`. - - You can set that up like this: - PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib - echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"' >> #{shell_profile} - EOS - end - - test do - (testpath/"test.pl").write "print 'Perl is not an acronym, but JAPH is a Perl acronym!';" - system "#{bin}/perl", "test.pl" - end -end diff --git a/Formula/perl@5.18.rb b/Formula/perl@5.18.rb deleted file mode 100644 index 92d03de7cfeea..0000000000000 --- a/Formula/perl@5.18.rb +++ /dev/null @@ -1,41 +0,0 @@ -class PerlAT518 < Formula - desc "Highly capable, feature-rich programming language" - homepage "https://www.perl.org/" - url "https://www.cpan.org/src/5.0/perl-5.18.4.tar.gz" - sha256 "01a4e11a9a34616396c4a77b3cef51f76a297e1a2c2c490ae6138bf0351eb29f" - - bottle do - sha256 "bdfac28ec4bf1ea1859b23564e0e4fd80ffe5ec5f7b54efc21cf8f1c47b396b8" => :high_sierra - sha256 "a73a2bbb48200827c3cca867b2145808735e5f250af55a01580fffd875da983e" => :sierra - sha256 "a4400e07a3930625832082f113abbd9069f818dc22c1bac17b23e99edaff66ff" => :el_capitan - end - - keg_only :versioned_formula - - def install - args = [ - "-des", - "-Dprefix=#{prefix}", - "-Dman1dir=#{man1}", - "-Dman3dir=#{man3}", - "-Duseshrplib", - "-Duselargefiles", - "-Dusethreads", - ] - - system "./Configure", *args - system "make" - system "make", "install" - end - - def caveats; <<~EOS - By default Perl installs modules in your HOME dir. If this is an issue run: - #{bin}/cpan o conf init - EOS - end - - test do - (testpath/"test.pl").write "print 'Perl is not an acronym, but JAPH is a Perl acronym!';" - system "#{bin}/perl", "test.pl" - end -end diff --git a/Formula/perltidy.rb b/Formula/perltidy.rb deleted file mode 100644 index 97a942d08c1ae..0000000000000 --- a/Formula/perltidy.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Perltidy < Formula - desc "Indents and reformats Perl scripts to make them easier to read" - homepage "https://perltidy.sourceforge.io/" - url "https://downloads.sourceforge.net/project/perltidy/20180220/Perl-Tidy-20180220.tar.gz" - sha256 "e9973ce28b7518108c1e68fa767c6566822480e739df275375a0dfcc9c2b3370" - - bottle do - cellar :any_skip_relocation - sha256 "3eea0c9c4f72dfe772301c153a0aaed43105020086cda3721b785389bd3515ce" => :mojave - sha256 "74062f9591fa421b637127521c7aa79b140d7741042671a1f21d2148cb50c3f0" => :high_sierra - sha256 "62a1de49e77f4214b8f689c74f0b5de888e6df0d2e51741d2e5650c2df09ed02" => :sierra - sha256 "ed1fbd3fcb92487349a6d5431a32f1c9824ce63ecce9e7d2d9371636da42a3a6" => :el_capitan - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", - "INSTALLSITESCRIPT=#{bin}", - "INSTALLSITEMAN1DIR=#{man1}", - "INSTALLSITEMAN3DIR=#{man3}" - system "make" - system "make", "test" - system "make", "install" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - (testpath/"testfile.pl").write <<~EOS - print "Help Desk -- What Editor do you use?"; - chomp($editor = ); - if ($editor =~ /emacs/i) { - print "Why aren't you using vi?\n"; - } elsif ($editor =~ /vi/i) { - print "Why aren't you using emacs?\n"; - } else { - print "I think that's the problem\n"; - } - EOS - system bin/"perltidy", testpath/"testfile.pl" - assert_predicate testpath/"testfile.pl.tdy", :exist? - end -end diff --git a/Formula/peru.rb b/Formula/peru.rb deleted file mode 100644 index 92e52a540aeee..0000000000000 --- a/Formula/peru.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Peru < Formula - include Language::Python::Virtualenv - - desc "Dependency retriever for version control and archives" - homepage "https://github.com/buildinspace/peru" - url "https://files.pythonhosted.org/packages/8e/db/ad9aa0e58bffc4f6f306d40608a7a755777ef283c28dee5a4c6a4dc47cad/peru-1.1.4.tar.gz" - sha256 "d899e1376009f7f95d220863ea79ca51712cd4bf769fff48973c239bf54e56d4" - - bottle do - cellar :any_skip_relocation - sha256 "8b8144cf1a442b8a90136e27491ae79713ff1785581af483d90f5114edf7f463" => :mojave - sha256 "e100f5fc856b9a9812fcc8d4cdda97c9bba3881e5e512e55b84ea64daa0d847c" => :high_sierra - sha256 "9dcd787fdc76ac4c11144e03ffa34cf2ed1b6faaf431d837be10fb3af29fbd5e" => :sierra - sha256 "bd08d3f6a70996f70e5074f839d14995cfa81cb08f677fd0e705df7b89045ec1" => :el_capitan - end - - depends_on "python" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"peru.yaml").write <<~EOS - imports: - peru: peru - git module peru: - url: https://github.com/buildinspace/peru.git - EOS - system "#{bin}/peru", "sync" - assert_predicate testpath/".peru", :exist? - assert_predicate testpath/"peru", :exist? - end -end diff --git a/Formula/petsc-complex.rb b/Formula/petsc-complex.rb deleted file mode 100644 index 0892f2396a95f..0000000000000 --- a/Formula/petsc-complex.rb +++ /dev/null @@ -1,48 +0,0 @@ -class PetscComplex < Formula - desc "Portable, Extensible Toolkit for Scientific Computation (complex)" - homepage "https://www.mcs.anl.gov/petsc/" - url "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.9.3.tar.gz" - sha256 "8828fe1221f038d78a8eee3325cdb22ad1055a2f0671871815ee9f47365f93bb" - revision 1 - - bottle do - sha256 "b113b3d241bc68e0fd51ea56ef94d78a0833d0d41158f2cd39e8510f5cddbd69" => :mojave - sha256 "d7980bb61e3ef91e02981da9455a2c17e07cbae647467128b152aaf59834163c" => :high_sierra - sha256 "66d5f2aea2efc4cd1a05b141cf4d7c81aab9cbc01db4cf0506387dfb38eb7297" => :sierra - end - - depends_on "hdf5" - depends_on "hwloc" - depends_on "metis" - depends_on "netcdf" - depends_on "open-mpi" - depends_on "scalapack" - depends_on "suite-sparse" - - conflicts_with "petsc", :because => "petsc must be installed with either real or complex support, not both" - - def install - ENV["CC"] = "mpicc" - ENV["CXX"] = "mpicxx" - ENV["F77"] = "mpif77" - ENV["FC"] = "mpif90" - system "./configure", "--prefix=#{prefix}", - "--with-debugging=0", - "--with-scalar-type=complex", - "--with-x=0" - system "make", "all" - system "make", "install" - end - - test do - test_case = "#{share}/petsc/examples/ksp/ksp/examples/tutorials/ex1.c" - system "mpicc", test_case, "-I#{include}", "-L#{lib}", "-lpetsc", "-o", "test" - output = shell_output("./test") - # This PETSc example prints several lines of output. The last line contains - # an error norm, expected to be small. - line = output.lines.last - assert_match /^Norm of error .+, Iterations/, line, "Unexpected output format" - error = line.split[3].to_f - assert (error >= 0.0 && error < 1.0e-13), "Error norm too large" - end -end diff --git a/Formula/petsc.rb b/Formula/petsc.rb deleted file mode 100644 index 79ecb14559f8d..0000000000000 --- a/Formula/petsc.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Petsc < Formula - desc "Portable, Extensible Toolkit for Scientific Computation (real)" - homepage "https://www.mcs.anl.gov/petsc/" - url "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.9.3.tar.gz" - sha256 "8828fe1221f038d78a8eee3325cdb22ad1055a2f0671871815ee9f47365f93bb" - revision 1 - - bottle do - sha256 "6e66ec170be825e239934665ef4cf7c29a15c80fa45b9f5416a2f035c858a4cb" => :mojave - sha256 "c24a7548da334ed9bac84119647d9ed4694c4c2f3078b5e6641806f1e2a9fc40" => :high_sierra - sha256 "7cb880e11b7da9784e3c8e2b9057090b9cacd8726f91bf5239f8f29366ef8017" => :sierra - end - - depends_on "hdf5" - depends_on "hwloc" - depends_on "metis" - depends_on "netcdf" - depends_on "open-mpi" - depends_on "scalapack" - depends_on "suite-sparse" - - conflicts_with "petsc-complex", :because => "petsc must be installed with either real or complex support, not both" - - def install - ENV["CC"] = "mpicc" - ENV["CXX"] = "mpicxx" - ENV["F77"] = "mpif77" - ENV["FC"] = "mpif90" - system "./configure", "--prefix=#{prefix}", - "--with-debugging=0", - "--with-scalar-type=real", - "--with-x=0" - system "make", "all" - system "make", "install" - end - - test do - test_case = "#{pkgshare}/examples/ksp/ksp/examples/tutorials/ex1.c" - system "mpicc", test_case, "-I#{include}", "-L#{lib}", "-lpetsc", "-o", "test" - output = shell_output("./test") - # This PETSc example prints several lines of output. The last line contains - # an error norm, expected to be small. - line = output.lines.last - assert_match /^Norm of error .+, Iterations/, line, "Unexpected output format" - error = line.split[3].to_f - assert (error >= 0.0 && error < 1.0e-13), "Error norm too large" - end -end diff --git a/Formula/pev.rb b/Formula/pev.rb deleted file mode 100644 index b1be107156852..0000000000000 --- a/Formula/pev.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Pev < Formula - desc "PE analysis toolkit" - homepage "https://pev.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pev/pev-0.80/pev-0.80.tar.gz" - sha256 "f68c8596f16d221d9a742812f6f728bcc739be90957bc1b00fbaa5943ffc5cfa" - head "https://github.com/merces/pev.git" - - bottle do - sha256 "dbc6f431e9f70bbbf582e07bcbd9cd852413d57adbd213573ec2b4c0ca3c19bb" => :mojave - sha256 "9f7b8ec7a8796b91524d7fdb5e9913db5afdd220f1fadbbc5a2e32ab7a994e8c" => :high_sierra - sha256 "c995e2ccdc4fde4e2e1beaa3039421ef8e77cdbe0ec00f1af50d7ba551d2c695" => :sierra - sha256 "ec81bb70fec6dd27f249a575194c62db766b2e31349224d503ecb1cbf2603c37" => :el_capitan - sha256 "1013086fe324f7b6147181762541d89dcf4837bd29bd89756d7df23c26fad1f2" => :yosemite - end - - depends_on "openssl" - depends_on "pcre" - - def install - ENV.deparallelize - system "make", "prefix=#{prefix}", "CC=#{ENV.cc}" - system "make", "prefix=#{prefix}", "install" - end - - test do - system "#{bin}/pedis", "--version" - end -end diff --git a/Formula/pex.rb b/Formula/pex.rb deleted file mode 100644 index 0e464c5fef3fd..0000000000000 --- a/Formula/pex.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pex < Formula - desc "Package manager for PostgreSQL" - homepage "https://github.com/petere/pex" - url "https://github.com/petere/pex/archive/1.20140409.tar.gz" - sha256 "5047946a2f83e00de4096cd2c3b1546bc07be431d758f97764a36b32b8f0ae57" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "427b8a701474aa879f8728ec463d3f20aad7c67f7b0ce330245015ec2830806a" => :mojave - sha256 "ed1429f15df1e663735f27b1c7660e289953494b84a84bdd919a7eb077576a72" => :high_sierra - sha256 "ed1429f15df1e663735f27b1c7660e289953494b84a84bdd919a7eb077576a72" => :sierra - sha256 "ed1429f15df1e663735f27b1c7660e289953494b84a84bdd919a7eb077576a72" => :el_capitan - end - - depends_on "postgresql" - - def install - system "make", "install", "prefix=#{prefix}", "mandir=#{man}" - end - - def caveats; <<~EOS - If installing for the first time, perform the following in order to setup the necessary directory structure: - pex init - EOS - end - - test do - assert_match "share/pex/packages", shell_output("#{bin}/pex --repo").strip - end -end diff --git a/Formula/pg_top.rb b/Formula/pg_top.rb deleted file mode 100644 index 1d7b125dad6ca..0000000000000 --- a/Formula/pg_top.rb +++ /dev/null @@ -1,29 +0,0 @@ -class PgTop < Formula - desc "Monitor PostgreSQL processes" - homepage "https://git.postgresql.org/gitweb/?p=pg_top.git" - url "https://ftp.postgresql.org/pub/projects/pgFoundry/ptop/pg_top/3.7.0/pg_top-3.7.0.tar.bz2" - mirror "https://mirrorservice.org/sites/ftp.postgresql.org/projects/pgFoundry/ptop/pg_top/3.7.0/pg_top-3.7.0.tar.bz2" - sha256 "c48d726e8cd778712e712373a428086d95e2b29932e545ff2a948d043de5a6a2" - revision 3 - - bottle do - cellar :any - sha256 "d31b2fb44c6d363f0f635bf6a16427968ca610ea285569bfa867bea6d0437549" => :mojave - sha256 "32637c635d8da78d4910df2dabd474f4115c31cba57890ad053b3a43cb38a758" => :high_sierra - sha256 "5f06ae8b8ef1c979143e19c0527c31c8d649d23e1e9612c63bc6c5ff05bf8276" => :sierra - sha256 "6d0104d461d7187ad02e1085098f2dad4fa00c4f2db93b1b910a6a072517ca54" => :el_capitan - end - - depends_on "postgresql" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - (buildpath/"config.h").append_lines "#define HAVE_DECL_STRLCPY 1" if MacOS.version >= :mavericks - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/pg_top -V") - end -end diff --git a/Formula/pgbadger.rb b/Formula/pgbadger.rb deleted file mode 100644 index 6c5039d1a37e3..0000000000000 --- a/Formula/pgbadger.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Pgbadger < Formula - desc "Log analyzer for PostgreSQL" - homepage "https://pgbadger.darold.net/" - url "https://github.com/darold/pgbadger/archive/v10.2.tar.gz" - sha256 "90d8a7795b8be80ba2d7b9b1d69e15a0d94f44182a50f4790bfc5121d88a39f3" - head "https://github.com/darold/pgbadger.git" - - bottle do - cellar :any_skip_relocation - sha256 "315118fab00e0a511d9cc19c112ac6cdd607a97f76c493525a1a991cf1f68b28" => :mojave - sha256 "a8b5bdda8217248967eaca40aa084ae2e810377327099bc9c96676e7df3425a4" => :high_sierra - sha256 "a8b5bdda8217248967eaca40aa084ae2e810377327099bc9c96676e7df3425a4" => :sierra - end - - def install - system "perl", "Makefile.PL", "DESTDIR=#{buildpath}" - system "make" - system "make", "install" - - bin.install "usr/local/bin/pgbadger" - man1.install "usr/local/share/man/man1/pgbadger.1p" - end - - def caveats; <<~EOS - You must configure your PostgreSQL server before using pgBadger. - Edit postgresql.conf (in #{var}/postgres if you use Homebrew's - PostgreSQL), set the following parameters, and restart PostgreSQL: - - log_destination = 'stderr' - log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' - log_statement = 'none' - log_duration = off - log_min_duration_statement = 0 - log_checkpoints = on - log_connections = on - log_disconnections = on - log_lock_waits = on - log_temp_files = 0 - lc_messages = 'C' - EOS - end - - test do - (testpath/"server.log").write <<~EOS - LOG: autovacuum launcher started - LOG: database system is ready to accept connections - EOS - system bin/"pgbadger", "-f", "syslog", "server.log" - assert_predicate testpath/"out.html", :exist? - end -end diff --git a/Formula/pgbouncer.rb b/Formula/pgbouncer.rb deleted file mode 100644 index f711f9e06a247..0000000000000 --- a/Formula/pgbouncer.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Pgbouncer < Formula - desc "Lightweight connection pooler for PostgreSQL" - homepage "https://wiki.postgresql.org/wiki/PgBouncer" - url "https://pgbouncer.github.io/downloads/files/1.9.0/pgbouncer-1.9.0.tar.gz" - sha256 "39eca9613398636327e79cbcbd5b41115035bca9ca1bd3725539646468825f04" - - bottle do - cellar :any - sha256 "ff4be2490697fe770c31b0daee18fae4c8911652162dd7590c36e6c10f645f91" => :mojave - sha256 "ef9421f5cb50c9ac632151f5058f78976fcd80dbb395fca5344a849e497368ff" => :high_sierra - sha256 "1913c8bc33932cb10583a2cbbb37735345db29a2d84571c4f137d0d9d9c68336" => :sierra - sha256 "2bd0cd45ec8291fbf9db4965a50a063a9d6b2137f6ef160170a07bdb7a068629" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "libevent" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "./configure", "--disable-debug", - "--with-libevent=#{HOMEBREW_PREFIX}", - "--prefix=#{prefix}" - ln_s "../install-sh", "doc/install-sh" - system "make", "install" - bin.install "etc/mkauth.py" - etc.install %w[etc/pgbouncer.ini etc/userlist.txt] - end - - def caveats; <<~EOS - The config file: #{etc}/pgbouncer.ini is in the "ini" format and you - will need to edit it for your particular setup. See: - https://pgbouncer.github.io/config.html - - The auth_file option should point to the #{etc}/userlist.txt file which - can be populated by the #{bin}/mkauth.py script. - EOS - end - - plist_options :manual => "pgbouncer -q #{HOMEBREW_PREFIX}/etc/pgbouncer.ini" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pgbouncer - -d - -q - #{etc}/pgbouncer.ini - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/pgbouncer -V") - end -end diff --git a/Formula/pgcli.rb b/Formula/pgcli.rb deleted file mode 100644 index 1a2a0dcbc8442..0000000000000 --- a/Formula/pgcli.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Pgcli < Formula - include Language::Python::Virtualenv - - desc "CLI for Postgres with auto-completion and syntax highlighting" - homepage "https://pgcli.com/" - url "https://files.pythonhosted.org/packages/a6/23/c3b9a86116b6d5d248a794fd2d874ae0e7f0efb6b3c8175c1e41cb7bde12/pgcli-2.0.2.tar.gz" - sha256 "04f4d3f4dd61d2d165eb2fd8d77879357489a74ca1446cd09fa375c7561392dc" - - bottle do - cellar :any - sha256 "1bb6153d2e32b837f9fd47357bca0eaf5b38abfcc17a7f76273fe8f447b83555" => :mojave - sha256 "3e3d925115ab5bc9a02a468ba00878632c2e4728dddd026b45fdc71df055bbab" => :high_sierra - sha256 "ea7e5cf0fdccd45e85deb6d141d6be6c44e9ed21878540603eb9b1488c122684" => :sierra - end - - depends_on "libpq" - depends_on "openssl" - depends_on "python" - - resource "backports.csv" do - url "https://files.pythonhosted.org/packages/c5/d2/6adc8e81e57a847fbe63b7967223aa13e340875a273be218ef15f162037d/backports.csv-1.0.6.tar.gz" - sha256 "bed884eeb967c8d6f517dfcf672914324180f1e9ceeb0376fde2c4c32fd7008d" - end - - resource "cli-helpers" do - url "https://files.pythonhosted.org/packages/b1/18/7997f55d8128df26a3d12bfa1ebb2ed0d9834d9b073126f03f26695d7224/cli_helpers-1.1.0.tar.gz" - sha256 "7c2038bba0c41f41acae0f6e660ff3b00d69f55d9d968f024952cace78111e12" - end - - resource "Click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "humanize" do - url "https://files.pythonhosted.org/packages/8c/e0/e512e4ac6d091fc990bbe13f9e0378f34cf6eecd1c6c268c9e598dcf5bb9/humanize-0.5.1.tar.gz" - sha256 "a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19" - end - - resource "pgspecial" do - url "https://files.pythonhosted.org/packages/08/2e/4faf028a873f5592a701082b6082e364e649a2c8c736ee41785929b5f036/pgspecial-1.11.5.tar.gz" - sha256 "f44dd48db53fd93dc78d61ebac0ca2cc3c58203f94b30edc730b02bfd3ee747b" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/d9/a5/4b2dd1a05403e34c3ba0d9c00f237c01967c0a4f59a427c9b241129cdfe4/prompt_toolkit-2.0.7.tar.gz" - sha256 "fd17048d8335c1e6d5ee403c3569953ba3eb8555d710bfc548faf0712666ea39" - end - - resource "psycopg2" do - url "https://files.pythonhosted.org/packages/c0/07/93573b97ed61b6fb907c8439bf58f09957564cf7c39612cef36c547e68c6/psycopg2-2.7.6.1.tar.gz" - sha256 "27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/64/69/413708eaf3a64a6abb8972644e0f20891a55e621c6759e2c3f3891e05d63/Pygments-2.3.1.tar.gz" - sha256 "5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a" - end - - resource "setproctitle" do - url "https://files.pythonhosted.org/packages/5a/0d/dc0d2234aacba6cf1a729964383e3452c52096dc695581248b548786f2b3/setproctitle-1.1.10.tar.gz" - sha256 "6283b7a58477dd8478fbb9e76defb37968ee4ba47b05ec1c053cb39638bd7398" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "sqlparse" do - url "https://files.pythonhosted.org/packages/79/3c/2ad76ba49f9e3d88d2b58e135b7821d93741856d1fe49970171f73529303/sqlparse-0.2.4.tar.gz" - sha256 "ce028444cfab83be538752a2ffdb56bc417b7784ff35bb9a3062413717807dec" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz" - sha256 "e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2" - end - - resource "terminaltables" do - url "https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/terminaltables-3.1.0.tar.gz" - sha256 "f3eb0eb92e3833972ac36796293ca0906e998dc3be91fbe1f8615b331b853b81" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"pgcli", "--help" - end -end diff --git a/Formula/pgdbf.rb b/Formula/pgdbf.rb deleted file mode 100644 index 0804f74d0e501..0000000000000 --- a/Formula/pgdbf.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Pgdbf < Formula - desc "Converter of XBase/FoxPro tables to PostgreSQL" - homepage "https://github.com/kstrauser/pgdbf" - url "https://downloads.sourceforge.net/project/pgdbf/pgdbf/0.6.2/pgdbf-0.6.2.tar.xz" - sha256 "e46f75e9ac5f500bd12c4542b215ea09f4ebee638d41dcfd642be8e9769aa324" - - bottle do - cellar :any_skip_relocation - sha256 "4a76ca05c6b73ea6fcf57d6699cbaf3e249c5e3b20990e51ab33d11bfbdd7d50" => :mojave - sha256 "caf544eee09339bb34ab68a35880bc863bb13aa7943de98ef25680cb0182f901" => :high_sierra - sha256 "7d0eabf3051e9cf450d985987f89cf0d70476b37202b3b5bdc84ec48e8cb670d" => :sierra - sha256 "72ad6b801d25db2008d0ab4badd2bb280f55eb6f6956925ee5620d62d8f06bbb" => :el_capitan - sha256 "4042a284cac8abe88e7d1c9e6c003e00a9b8247905739829cd768a824df7993b" => :yosemite - sha256 "c53298c57bb2d31d82ddce41ed65057d7781de2118857f5f795aaaefe3c00110" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/pgformatter.rb b/Formula/pgformatter.rb deleted file mode 100644 index b9b2bae3050fd..0000000000000 --- a/Formula/pgformatter.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Pgformatter < Formula - desc "PostgreSQL syntax beautifier" - homepage "https://sqlformat.darold.net/" - url "https://github.com/darold/pgFormatter/archive/v3.3.tar.gz" - sha256 "f56ff7d7b8d59e85ac325a4b954d98b6aeae8369da74970f7948c7f4a1448ffa" - - bottle do - cellar :any_skip_relocation - sha256 "f93a3e3df7309520df02fb29f5ff386f52a6f081b6fec33e66d6ffa928b5e875" => :mojave - sha256 "812ff63ece606b2edf98ae23afc75f00ea2ffd59f49eb67e6fd59d11000222ef" => :high_sierra - sha256 "812ff63ece606b2edf98ae23afc75f00ea2ffd59f49eb67e6fd59d11000222ef" => :sierra - end - - def install - system "perl", "Makefile.PL", "DESTDIR=." - system "make", "install" - - prefix.install (buildpath/"usr/local").children - (libexec/"lib").install "blib/lib/pgFormatter" - libexec.install bin/"pg_format" - bin.install_symlink libexec/"pg_format" - end - - test do - test_file = (testpath/"test.sql") - test_file.write("SELECT * FROM foo") - system "#{bin}/pg_format", test_file - end -end diff --git a/Formula/pgloader.rb b/Formula/pgloader.rb deleted file mode 100644 index 2613c72cd336b..0000000000000 --- a/Formula/pgloader.rb +++ /dev/null @@ -1,400 +0,0 @@ -class Pgloader < Formula - desc "Data loading tool for PostgreSQL" - homepage "https://github.com/dimitri/pgloader" - url "https://github.com/dimitri/pgloader/archive/v3.5.2.tar.gz" - sha256 "1a07a91db6b5e0d96c43fed3e429d49d920d71ca31c4f50929529b6fe75665ae" - head "https://github.com/dimitri/pgloader.git" - - bottle do - sha256 "76b19db15b4574a9297d5b37ff170ea428b5e0954097c77fe75a0d83d79dfb85" => :high_sierra - sha256 "9cdf7c6276fff08858d0fd4ddc46c659a9ea5578baa24fb2584f780a544dced7" => :sierra - sha256 "125532b10e7cbbc7f3246290ce0d3ea1915c68f1e1b6d6277b4875f316c20fd2" => :el_capitan - end - - depends_on "buildapp" => :build - depends_on "sphinx-doc" => :build - depends_on "freetds" - depends_on "sbcl" - depends_on "postgresql" => :recommended - - # Resource stanzas are generated automatically by quicklisp-roundup. - # See: https://github.com/benesch/quicklisp-homebrew-roundup - - resource "alexandria" do - url "https://beta.quicklisp.org/archive/alexandria/2017-08-30/alexandria-20170830-git.tgz" - sha256 "894e54f77594b13137b5b8ec05937ad6b78bc15c4630ffd1e550e1f226a2f96e" - end - - resource "anaphora" do - url "https://beta.quicklisp.org/archive/anaphora/2018-02-28/anaphora-20180228-git.tgz" - sha256 "8134f1c629a63b4504dc973984655f707f9977a623bd9a310786b8d6f3aea2ad" - end - - resource "asdf-finalizers" do - url "https://beta.quicklisp.org/archive/asdf-finalizers/2017-04-03/asdf-finalizers-20170403-git.tgz" - sha256 "b22f0fa44b662abdab5e844b03cd104f1c391234ad3d7bd4928bc521025053f0" - end - - resource "asdf-system-connections" do - url "https://beta.quicklisp.org/archive/asdf-system-connections/2017-01-24/asdf-system-connections-20170124-git.tgz" - sha256 "f8723e0b0b8bd5f964f7726536e52aacb2e9833d475fcde8333cda81d7190241" - end - - resource "babel" do - url "https://beta.quicklisp.org/archive/babel/2017-12-27/babel-20171227-git.tgz" - sha256 "2e0b1e1513d2cf61f23f38f4d2b5fec23efecf88cb72b68aff7d07559334de98" - end - - resource "bordeaux-threads" do - url "https://beta.quicklisp.org/archive/bordeaux-threads/2016-03-18/bordeaux-threads-v0.8.5.tgz" - sha256 "edaedd450d9267b0a578c9da421fdc96e5f93b119d1502abb1d428e646eb0127" - end - - resource "cffi" do - url "https://beta.quicklisp.org/archive/cffi/2018-02-28/cffi_0.19.0.tgz" - sha256 "49366f97ce20f1a9081b1abce89ab62608dc781dfeb40105a6c98d8b8182638b" - end - - resource "chipz" do - url "https://beta.quicklisp.org/archive/chipz/2018-03-28/chipz-20180328-git.tgz" - sha256 "c7754335cabf87a4e0d1facb774f4b1ae11dfbf7cdc694cefa53fa4fb3cbd267" - end - - resource "chunga" do - url "https://beta.quicklisp.org/archive/chunga/2018-01-31/chunga-20180131-git.tgz" - sha256 "38db3685ffe2fdf15cef49a8cc3f2c3082834668d2dd06c84af25065acd93433" - end - - resource "cl+ssl" do - url "https://beta.quicklisp.org/archive/cl+ssl/2018-03-28/cl+ssl-20180328-git.tgz" - sha256 "c248aa12938f55a1088187e84da18c4b252a8e2496f82c5755f247401bb0b924" - end - - resource "cl-abnf" do - url "https://beta.quicklisp.org/archive/cl-abnf/2015-06-08/cl-abnf-20150608-git.tgz" - sha256 "0799bfdc43b7c645934af8c190e58d4d0fac3973ec669ef2feeae0b20f2ca903" - end - - resource "cl-base64" do - url "https://beta.quicklisp.org/archive/cl-base64/2015-09-23/cl-base64-20150923-git.tgz" - sha256 "17fab703f316d232b477bd2f8b521283cc0c7410f9b787544f3924007ab95141" - end - - resource "cl-containers" do - url "https://beta.quicklisp.org/archive/cl-containers/2017-04-03/cl-containers-20170403-git.tgz" - sha256 "afafc5d18d07c783e37b1ad6ef29e8bc552292b4ddd5fd7544868cddcb5f9c72" - end - - resource "cl-csv" do - url "https://beta.quicklisp.org/archive/cl-csv/2018-02-28/cl-csv-20180228-git.tgz" - sha256 "7924fc4baf5a5592a6b410e303d3ab495ce3748a3e44ec68b671a423bb8fcdf5" - end - - resource "cl-db3" do - url "https://beta.quicklisp.org/archive/cl-db3/2015-03-02/cl-db3-20150302-git.tgz" - sha256 "b1ffd5c0d0e3eca1a505e20e0c4e888a2ec87f37faa9f1fc62adefc6ceba8d57" - end - - resource "cl-fad" do - url "https://beta.quicklisp.org/archive/cl-fad/2018-04-30/cl-fad-20180430-git.tgz" - sha256 "9a051defe62f5c168003dc1c928d3a5cd74b08b7c831d51562171b2c8637bb9c" - end - - resource "cl-interpol" do - url "https://beta.quicklisp.org/archive/cl-interpol/2017-12-27/cl-interpol-20171227-git.tgz" - sha256 "fe4f01a27e51d4bb26691e9fa592a92266bbb89df8d4692b88f84d0d11ef9bd4" - end - - resource "cl-ixf" do - url "https://beta.quicklisp.org/archive/cl-ixf/2018-02-28/cl-ixf-20180228-git.tgz" - sha256 "7adba0bf221f6f91777457c9d6c52a0a7e034c628e18f09c7445ce50a8ff14fb" - end - - resource "cl-log" do - url "https://beta.quicklisp.org/archive/cl-log/2013-01-28/cl-log.1.0.1.tgz" - sha256 "4d7840b9e3bf5a979f780ba937f4e268c73db48e2f91f6c7c541d86e3ac0ab71" - end - - resource "cl-markdown" do - url "https://beta.quicklisp.org/archive/cl-markdown/2010-10-06/cl-markdown-20101006-darcs.tgz" - sha256 "3c1da678be4f7ee71c245fafa56c1b6f4d3e49e7c6d5cc9b5aafc30abf3e3bc3" - end - - resource "cl-mssql" do - url "https://beta.quicklisp.org/archive/cl-mssql/2018-02-28/cl-mssql-20180228-git.tgz" - sha256 "a07288fd3e26c83eb49f191b9f0db3b3c65f1370f34586120a7b93ded1c13bb9" - end - - resource "cl-mustache" do - url "https://beta.quicklisp.org/archive/cl-mustache/2015-09-23/cl-mustache-20150923-git.tgz" - sha256 "22b0938a3765229a54bd84f70c7de2a56e8903fef4dbc987a3c8621314d800e4" - end - - resource "cl-ppcre" do - url "https://beta.quicklisp.org/archive/cl-ppcre/2017-12-27/cl-ppcre-20171227-git.tgz" - sha256 "84d77df5e6913535deea5d0b7d13e0108da5eaa90034039da2976ad96762b16d" - end - - resource "cl-sqlite" do - url "https://beta.quicklisp.org/archive/cl-sqlite/2013-06-15/cl-sqlite-20130615-git.tgz" - sha256 "105333bbdccc3c2ab76ce4a35c63e6b27ac8a7a0967971c4addd666df7766135" - end - - resource "cl-unicode" do - url "https://beta.quicklisp.org/archive/cl-unicode/2018-03-28/cl-unicode-20180328-git.tgz" - sha256 "96dec5e7f874df77791093246c426e896af101f1fb63864fdbfe291d37c4c8cf" - end - - resource "cl-utilities" do - url "https://beta.quicklisp.org/archive/cl-utilities/2010-10-06/cl-utilities-1.2.4.tgz" - sha256 "07a9318732d73b5195b1a442391d10395c7de471f1fe12feedfe71b1edbd51fc" - end - - resource "closer-mop" do - url "https://beta.quicklisp.org/archive/closer-mop/2018-04-30/closer-mop-20180430-git.tgz" - sha256 "db2cdae1d3e59637484ee6c4095906adb3ac68bb185f6dfc7fed042ef1947bad" - end - - resource "closure-common" do - url "https://beta.quicklisp.org/archive/closure-common/2010-11-07/closure-common-20101107-git.tgz" - sha256 "64c2b19fd64be8606f8208191b3269022e8fe34abe3f72acfd349f2fec6d02a5" - end - - resource "command-line-arguments" do - url "https://beta.quicklisp.org/archive/command-line-arguments/2015-12-18/command-line-arguments-20151218-git.tgz" - sha256 "d0fba1c0ac361aab4273425079945ee1ac8e7d7e7b9a960026a8c999e41edb1f" - end - - resource "cxml" do - url "https://beta.quicklisp.org/archive/cxml/2011-06-19/cxml-20110619-git.tgz" - sha256 "d38bbad4b2d8f519f9e13402cd322ceb8a38934d4b4d82e2571a9f9bacd76612" - end - - resource "drakma" do - url "https://beta.quicklisp.org/archive/drakma/2017-08-30/drakma-v2.0.4.tgz" - sha256 "ea15c928676c94c484b9c8a093adde274a0d2d439c23871c60be10b102af0d44" - end - - resource "dynamic-classes" do - url "https://beta.quicklisp.org/archive/dynamic-classes/2013-01-28/dynamic-classes-20130128-git.tgz" - sha256 "4a93d3a39dca61c87b29877fa9707b647fc08f117f80f2a741f649e4d04c4b44" - end - - resource "esrap" do - url "https://beta.quicklisp.org/archive/esrap/2018-04-30/esrap-20180430-git.tgz" - sha256 "5ba9ee9285b4244884b8d636e424eaf88176954d303aba48b6119aaabf1d63f3" - end - - resource "flexi-streams" do - url "https://beta.quicklisp.org/archive/flexi-streams/2018-03-28/flexi-streams-20180328-git.tgz" - sha256 "21707f3682009e291f6d9d9ed67e74f1ddad4ae073ba96cc319b8f1861fcb541" - end - - resource "garbage-pools" do - url "https://beta.quicklisp.org/archive/garbage-pools/2013-07-20/garbage-pools-20130720-git.tgz" - sha256 "05f014fd95526107af6d99a612b78292fbf3b8a6e9e2efcb04d6ab7e835ab6c5" - end - - resource "ieee-floats" do - url "https://beta.quicklisp.org/archive/ieee-floats/2017-08-30/ieee-floats-20170830-git.tgz" - sha256 "137bc5b3385c35101a6440112757df46570395cdaeed4bf11648353638c18495" - end - - resource "ironclad" do - url "https://beta.quicklisp.org/archive/ironclad/2018-04-30/ironclad-v0.39.tgz" - sha256 "080ef9df4bc20a118c53a7e71e6077eccec647b125d33f064367c7d8ed32155b" - end - - resource "iterate" do - url "https://beta.quicklisp.org/archive/iterate/2018-02-28/iterate-20180228-git.tgz" - sha256 "2b1e968360ffe6296b8de3c2ad916ab59a92d146bdc4e59a131b9dd3af6ee52f" - end - - resource "local-time" do - url "https://beta.quicklisp.org/archive/local-time/2018-02-28/local-time-20180228-git.tgz" - sha256 "a1ae2789780f2e6ec8f6a0ba7d83c60eb2878117a4edbc221995649951cd6868" - end - - resource "lparallel" do - url "https://beta.quicklisp.org/archive/lparallel/2016-08-25/lparallel-20160825-git.tgz" - sha256 "213bc89e6bbabe07fc3bcb21be1021b31f6f2ab1b7a2abb358a01ab9bee69c73" - end - - resource "md5" do - url "https://beta.quicklisp.org/archive/md5/2018-02-28/md5-20180228-git.tgz" - sha256 "a4599d7733cfede17d3b47ab30eab330fb3781d2d3c83b17ea5eceba4c8fc188" - end - - resource "metabang-bind" do - url "https://beta.quicklisp.org/archive/metabang-bind/2017-11-30/metabang-bind-20171130-git.tgz" - sha256 "2ac820a212756f49b7987f2603c22c8eb10ded912903843f9792e28004794c56" - end - - resource "metatilities-base" do - url "https://beta.quicklisp.org/archive/metatilities-base/2017-04-03/metatilities-base-20170403-git.tgz" - sha256 "799d8a3743660bb98bf517a22aae0c73269061fdf9e69214c3b679f3ee9f8191" - end - - resource "nibbles" do - url "https://beta.quicklisp.org/archive/nibbles/2018-04-30/nibbles-20180430-git.tgz" - sha256 "8f0c4893472d24475daa95830efcad7999c2a60c4cd1837bdbc65c0cf8e9e9fc" - end - - resource "parse-number" do - url "https://beta.quicklisp.org/archive/parse-number/2018-02-28/parse-number-v1.7.tgz" - sha256 "0a6a6b9a7a351306c4eae1ab1c3a8a0e2a88fafb8133124b9cb8de680a425186" - end - - resource "postmodern" do - url "https://beta.quicklisp.org/archive/postmodern/2018-04-30/postmodern-20180430-git.tgz" - sha256 "ee2866c7d4261b8a81956ce0b4a285bd04a3edd49e3217b619602e188b43dc2c" - end - - resource "puri" do - url "https://beta.quicklisp.org/archive/puri/2018-02-28/puri-20180228-git.tgz" - sha256 "7fd9fce21a83fb6d4f42bf146bdc6e5e36d8e95c6cf5427cd6aa78999b2a99e8" - end - - resource "py-configparser" do - url "https://beta.quicklisp.org/archive/py-configparser/2017-08-30/py-configparser-20170830-svn.tgz" - sha256 "325d2c059deaf3506f69ae7d8c71a0d5aa38a0f3f244a73a0b06676baa30c051" - end - - resource "qmynd" do - url "https://beta.quicklisp.org/archive/qmynd/2018-01-31/qmynd-20180131-git.tgz" - sha256 "2c98ca6500f171744d12bd1bd8476092016787e1c875b13437e3fe9bfd5537e6" - end - - resource "quri" do - url "https://beta.quicklisp.org/archive/quri/2016-12-04/quri-20161204-git.tgz" - sha256 "7b29fe2c2746f2cf59eee703b2ff65b10e6ed2e10232f2c8456657d1e6402e92" - end - - resource "split-sequence" do - url "https://beta.quicklisp.org/archive/split-sequence/2018-02-28/split-sequence-v1.4.1.tgz" - sha256 "78e07795414ed97b5809363f145bbcb0610b2767eb5ca96f210c624a1b334f11" - end - - resource "trivial-backtrace" do - url "https://beta.quicklisp.org/archive/trivial-backtrace/2016-05-31/trivial-backtrace-20160531-git.tgz" - sha256 "1df68d7d0f4a9611e5470cdacae58d594b26cc63b223e89fd85152b119559bed" - end - - resource "trivial-features" do - url "https://beta.quicklisp.org/archive/trivial-features/2016-12-04/trivial-features-20161204-git.tgz" - sha256 "424681538abfa8c5af41fae0099c6e5cb9b05f823a094abba42fcac312f35f44" - end - - resource "trivial-garbage" do - url "https://beta.quicklisp.org/archive/trivial-garbage/2015-01-13/trivial-garbage-20150113-git.tgz" - sha256 "08c0a03595843576835086dc5973cfb535f75f77de4b90e9c9b97c7eba97c1fb" - end - - resource "trivial-gray-streams" do - url "https://beta.quicklisp.org/archive/trivial-gray-streams/2018-03-28/trivial-gray-streams-20180328-git.tgz" - sha256 "ce8085287b3e4ab78e17fc164b6a45d58b8c1f7e43c3aff67dbb0010ceade507" - end - - resource "trivial-utf-8" do - url "https://beta.quicklisp.org/archive/trivial-utf-8/2011-10-01/trivial-utf-8-20111001-darcs.tgz" - sha256 "8b17c345da11796663cfd04584445c62f09e789981a83ebefe7970a30b0aafd2" - end - - resource "usocket" do - url "https://beta.quicklisp.org/archive/usocket/2016-10-31/usocket-0.7.0.1.tgz" - sha256 "c2454e8d8f65bf81aadf877d65d9b6364ed25f8560ad405063e2b4bfb872ecd6" - end - - resource "uuid" do - url "https://beta.quicklisp.org/archive/uuid/2013-08-13/uuid-20130813-git.tgz" - sha256 "0e8657bdf7ad131641f6d878f953ebf74d3cda06b8be99dd8bb8cffbe34308de" - end - - resource "yason" do - url "https://beta.quicklisp.org/archive/yason/2016-02-08/yason-v0.7.6.tgz" - sha256 "1332170b030067e2ea7119e8a18abb7778b89fd6a2163f808d80dbbd48b0ee01" - end - - resource "zs3" do - url "https://beta.quicklisp.org/archive/zs3/2017-12-27/zs3-1.3.1.tgz" - sha256 "ddd9e180d23bce21482cb0d9bcd3f5636c85963290ac19fa9ddc39fa9b12b990" - end - - def install - resources.each do |resource| - resource.stage buildpath/"lib"/resource.name - end - - ENV["CL_SOURCE_REGISTRY"] = "#{buildpath}/lib//:#{buildpath}//" - ENV["ASDF_OUTPUT_TRANSLATIONS"] = "/:/" - system "make", "pgloader-standalone", "BUILDAPP=buildapp" - - bin.install "build/bin/pgloader" - - system "make", "-C", "docs", "man" - man1.install "docs/_build/man/pgloader.1" - end - - def launch_postgres(socket_dir) - require "timeout" - - socket_dir = Pathname.new(socket_dir) - mkdir_p socket_dir - - postgres_command = [ - "postgres", - "--listen_addresses=", - "--unix_socket_directories=#{socket_dir}", - ] - - IO.popen(postgres_command * " ") do |postgres| - begin - ohai postgres_command * " " - # Postgres won't create the socket until it's ready for connections, but - # if it fails to start, we'll be waiting for the socket forever. So we - # time out quickly; this is simpler than mucking with child process - # signals. - Timeout.timeout(5) { sleep 0.2 while socket_dir.children.empty? } - yield - ensure - Process.kill(:TERM, postgres.pid) - end - end - end - - test do - # Remove any Postgres environment variables that might prevent us from - # isolating this disposable copy of Postgres. - ENV.reject! { |key, _| key.start_with?("PG") } - - ENV["PGDATA"] = testpath/"data" - ENV["PGHOST"] = testpath/"socket" - ENV["PGDATABASE"] = "brew" - - (testpath/"test.load").write <<~EOS - LOAD CSV - FROM inline (code, country) - INTO postgresql:///#{ENV["PGDATABASE"]}?tablename=csv - WITH fields terminated by ',' - - BEFORE LOAD DO - $$ CREATE TABLE csv (code char(2), country text); $$; - - GB,United Kingdom - US,United States - CA,Canada - US,United States - GB,United Kingdom - CA,Canada - EOS - - system "initdb" - - launch_postgres(ENV["PGHOST"]) do - system "createdb" - system "#{bin}/pgloader", testpath/"test.load" - output = shell_output("psql -Atc 'SELECT COUNT(*) FROM csv'") - assert_equal "6", output.lines.last.chomp - end - end -end diff --git a/Formula/pgpdump.rb b/Formula/pgpdump.rb deleted file mode 100644 index 3bb3b1ee881b8..0000000000000 --- a/Formula/pgpdump.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Pgpdump < Formula - desc "PGP packet visualizer" - homepage "https://www.mew.org/~kazu/proj/pgpdump/en/" - url "https://github.com/kazu-yamamoto/pgpdump/archive/v0.33.tar.gz" - sha256 "fe580ef43f651da59816c70f38f177ea4fa769d64e3d6883a9d1f661bb0a6952" - head "https://github.com/kazu-yamamoto/pgpdump.git" - - bottle do - cellar :any_skip_relocation - sha256 "8141ac85359c7be7ac5ef51075823612582ecd0e02f0048cace4b4bae2217771" => :mojave - sha256 "2d5ad982f29c20cad30f5a90d4fcd8af3d369432e2c4ab4f35fcfa3b31712a1f" => :high_sierra - sha256 "9c2ed5f4eb7e0c833a90d53fc8d96d613b781b36c3524959fa102ae62a4d167e" => :sierra - sha256 "1cfd7cb5b0cdbc7e70031841d7efb1196ddbbd6f11f5af3cce4b38b6f7358ae2" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"sig.pgp").write <<~EOS - -----BEGIN PGP MESSAGE----- - Version: GnuPG v1.2.6 (NetBSD) - Comment: For info see https://www.gnupg.org - - owGbwMvMwCSYq3dE6sEMJU7GNYZJLGmZOanWn4xaQzIyixWAKFEhN7W4ODE9VaEk - XyEpVaE4Mz0vNUUhqVIhwD1Aj6vDnpmVAaQeZogg060chvkFjPMr2CZNmPnwyebF - fJP+td+b6biAYb779N1eL3gcHUyNsjliW1ekbZk6wRwA - =+jUx - -----END PGP MESSAGE----- - EOS - - output = shell_output("#{bin}/pgpdump sig.pgp") - assert_match("Key ID - 0x6D2EC41AE0982209", output) - end -end diff --git a/Formula/pgplot.rb b/Formula/pgplot.rb deleted file mode 100644 index b7e8dca307861..0000000000000 --- a/Formula/pgplot.rb +++ /dev/null @@ -1,158 +0,0 @@ -class Pgplot < Formula - desc "Device-independent graphics package for making simple scientific graphs" - homepage "http://www.astro.caltech.edu/~tjp/pgplot/" - url "ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot522.tar.gz" - mirror "https://distfiles.macports.org/pgplot/pgplot522.tar.gz" - mirror "https://gentoo.osuosl.org/distfiles/pgplot522.tar.gz" - version "5.2.2" - sha256 "a5799ff719a510d84d26df4ae7409ae61fe66477e3f1e8820422a9a4727a5be4" - revision 7 - - bottle do - sha256 "6cad7a8a0a86d1da33229741e3eaef5076f7d74b543e86c804c4be8f7e87dc7f" => :mojave - sha256 "6d5b648916ed3ba123ef88b51634ddb83e095cf6439fa8ed4b2ac948e8da57b7" => :high_sierra - sha256 "ae03d19097ec74e38a52ccef1782da14024cbd5df13f2d1b58cab1d0b1e43ee2" => :sierra - sha256 "91bd322f1fd2220e95fddad56b024c93ae6f446cd501cb6fbeafa4619fee9588" => :el_capitan - end - - depends_on "gcc" # for gfortran - depends_on "libpng" - depends_on :x11 - - # from MacPorts: https://trac.macports.org/browser/trunk/dports/graphics/pgplot/files - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/patches/b520c2d/pgplot/patch-makemake.diff" - sha256 "1af44204240dd91a59c899714b4f6012ff1eccfcad8f2133765beec34d6f1423" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/patches/b520c2d/pgplot/patch-proccom.c.diff" - sha256 "93c55078389c660407c0052569d3ed543c92107c139c765d207b90687cfb7a0c" - end - - def install - ENV.deparallelize - ENV.append "CPPFLAGS", "-DPG_PPU" - - # re-hardcode the share dir - inreplace "src/grgfil.f", "/usr/local/pgplot", share - # perl may not be in /usr/local - inreplace "makehtml", "/usr/local/bin/perl", which("perl") - # prevent a "dereferencing pointer to incomplete type" in libpng - inreplace "drivers/pndriv.c", "setjmp(png_ptr->jmpbuf)", "setjmp(png_jmpbuf(png_ptr))" - - # configure options - (buildpath/"sys_darwin/homebrew.conf").write <<~EOS - XINCL="#{ENV.cppflags}" - MOTIF_INCL="" - ATHENA_INCL="" - TK_INCL="" - RV_INCL="" - FCOMPL="gfortran" - FFLAGC="-ffixed-line-length-none" - FFLAGD="" - CCOMPL="#{ENV.cc}" - CFLAGC="#{ENV.cppflags}" - CFLAGD="" - PGBIND_FLAGS="bsd" - LIBS="#{ENV.ldflags} -lX11" - MOTIF_LIBS="" - ATHENA_LIBS="" - TK_LIBS="" - RANLIB="#{which "ranlib"}" - SHARED_LIB="libpgplot.dylib" - SHARED_LD="gfortran -dynamiclib -single_module $LDFLAGS -lX11 -install_name libpgplot.dylib" - SHARED_LIB_LIBS="#{ENV.ldflags} -lpng -lX11" - MCOMPL="" - MFLAGC="" - SYSDIR="$SYSDIR" - CSHARED_LIB="libcpgplot.dylib" - CSHARED_LD="gfortran -dynamiclib -single_module $LDFLAGS -lX11" - EOS - - mkdir "build" do - # activate drivers - cp "../drivers.list", "." - %w[GIF VGIF LATEX PNG TPNG PS - VPS CPS VCPS XWINDOW XSERVE].each do |drv| - inreplace "drivers.list", %r{^! (.*\/#{drv} .*)}, ' \1' - end - - # make everything - system "../makemake .. darwin; make; make cpg; make pgplot.html" - - # install - bin.install "pgxwin_server", "pgbind" - lib.install Dir["*.dylib", "*.a"] - include.install Dir["*.h"] - share.install Dir["*.txt", "*.dat"] - doc.install Dir["*.doc", "*.html"] - (share/"examples").install Dir["*demo*", "../examples/pgdemo*.f", "../cpg/cpgdemo*.c", "../drivers/*/pg*demo.*"] - end - end - - test do - # build Fortran version of test program - (testpath/"pgtest.f90").write <<~EOS - PROGRAM SIMPLE - INTEGER I, IER, PGBEG - REAL XR(100), YR(100) - REAL XS(5), YS(5) - data XS/1.,2.,3.,4.,5./ - data YS/1.,4.,9.,16.,25./ - IER = PGOPEN('pgtest.png/PNG') - IF (IER.LE.0) STOP - CALL PGENV(0.,10.,0.,20.,0,1) - CALL PGLAB('(x)', '(y)', 'A Simple Graph') - CALL PGPT(5,XS,YS,9) - DO 10 I=1,60 - XR(I) = 0.1*I - YR(I) = XR(I)**2 - 10 CONTINUE - CALL PGLINE(60,XR,YR) - CALL PGCLOS - END - EOS - system "gfortran", "-o", "pgtest", "pgtest.f90", "-L#{lib}", "-lpgplot" - - # build C version of test program - (testpath/"cpgtest.c").write <<~EOS - #include "cpgplot.h" - - #include - #include - #include - - int main() - { - int i; - static float xs[] = {1.0, 2.0, 3.0, 4.0, 5.0 }; - static float ys[] = {1.0, 4.0, 9.0, 16.0, 25.0 }; - float xr[60], yr[60]; - int n = sizeof(xr) / sizeof(xr[0]); - if(cpgopen("cpgtest.png/PNG") <= 0) - return EXIT_FAILURE; - cpgenv(0.0, 10.0, 0.0, 20.0, 0, 1); - cpglab("(x)", "(y)", "A Simple Graph"); - cpgpt(5, xs, ys, 9); - for(i=0; i :mojave - sha256 "ef331729edaa2b021f3c1aa7f681aef91afeed1c953d07a0193d50e33c8def03" => :high_sierra - sha256 "a6971651f3305e14bd675eca89652722445d49e83dff68d5ebfdf7792a4171c9" => :sierra - sha256 "e277a0b2d1f240f4ba4047b48f03a852ea9c4b6b9dcc33b1b149938d0c0c7e20" => :el_capitan - end - - depends_on "postgresql" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - end - - test do - cp etc/"pgpool.conf.sample", testpath/"pgpool.conf" - system bin/"pg_md5", "--md5auth", "pool_passwd", "--config-file", "pgpool.conf" - end -end diff --git a/Formula/pgroonga.rb b/Formula/pgroonga.rb deleted file mode 100644 index c58267ccca04f..0000000000000 --- a/Formula/pgroonga.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Pgroonga < Formula - desc "PostgreSQL plugin to use Groonga as index" - homepage "https://pgroonga.github.io/" - url "https://packages.groonga.org/source/pgroonga/pgroonga-2.1.6.tar.gz" - sha256 "89eb70c1df6a4ca33aa968ae3d8169ac481cdbbfa73b385f27b77c5aab5b9ee9" - revision 1 - - bottle do - cellar :any - sha256 "510707d53e61523286a3ea1df0b6f03f0c7efa51af0d951cc530b31173be2b4d" => :mojave - sha256 "17e146f66176c97cc127e4ae8aaa9e0c18d0697c360dc811d9f5e725a8aa269d" => :high_sierra - sha256 "cb5157b2231542471046f2b5875ed0c705e82926ecfe0b3ca4a061780776f44d" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "groonga" - depends_on "postgresql" - - def install - system "make" - mkdir "stage" - system "make", "install", "DESTDIR=#{buildpath}/stage" - - lib.install Dir["stage/**/lib/*"] - (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] - end - - test do - pg_bin = Formula["postgresql"].opt_bin - pg_port = "55561" - system "#{pg_bin}/initdb", testpath/"test" - pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } - - begin - sleep 2 - system "#{pg_bin}/createdb", "-p", pg_port - system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;" - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgroonga;" - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/pgrouting.rb b/Formula/pgrouting.rb deleted file mode 100644 index 796212cabdc55..0000000000000 --- a/Formula/pgrouting.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Pgrouting < Formula - desc "Provides geospatial routing for PostGIS/PostgreSQL database" - homepage "https://pgrouting.org/" - url "https://github.com/pgRouting/pgrouting/archive/v2.6.2.tar.gz" - sha256 "328fb46fbb865aecad9771b2892b06602fa796949a985b8973ce8bb09b469295" - head "https://github.com/pgRouting/pgrouting.git" - - bottle do - cellar :any - sha256 "ff55fe464965d0a636b90029ea51c6a8e11d9cb7ddcd2c331180714efea17e9e" => :mojave - sha256 "c0a852dd7eb64c1a2faa1445a886a7ceb8d84eed3fb9a7011268f12b1d3f9a74" => :high_sierra - sha256 "6df533874805d06622bea6b918112c8a2ad4f717a7a6ead2676e98dcd6a6a2f1" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "cgal" - depends_on "gmp" - depends_on "postgis" - depends_on "postgresql" - - def install - mkdir "stage" - mkdir "build" do - system "cmake", "-DWITH_DD=ON", "..", *std_cmake_args - system "make" - system "make", "install", "DESTDIR=#{buildpath}/stage" - end - - lib.install Dir["stage/**/lib/*"] - (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] - end - - test do - pg_bin = Formula["postgresql"].opt_bin - pg_port = "55561" - system "#{pg_bin}/initdb", testpath/"test" - pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } - - begin - sleep 2 - system "#{pg_bin}/createdb", "-p", pg_port - system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;" - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION postgis;" - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgrouting;" - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/pgtoolkit.rb b/Formula/pgtoolkit.rb deleted file mode 100644 index cba5c9d5cd559..0000000000000 --- a/Formula/pgtoolkit.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Pgtoolkit < Formula - desc "Tools for PostgreSQL maintenance" - homepage "https://github.com/grayhemp/pgtoolkit" - url "https://github.com/grayhemp/pgtoolkit/archive/v1.0.2.tar.gz" - sha256 "d86f34c579a4c921b77f313d4c7efbf4b12695df89e6b68def92ffa0332a7351" - - bottle :unneeded - - def install - bin.install "fatpack/pgcompact" - doc.install %w[CHANGES.md LICENSE.md README.md TODO.md] - end - - test do - output = IO.popen("#{bin}/pgcompact --help") - matches = output.readlines.select { |line| line =~ /pgcompact - PostgreSQL bloat reducing tool/ } - !matches.empty? - end -end diff --git a/Formula/pgtune.rb b/Formula/pgtune.rb deleted file mode 100644 index 9621ecc554bd5..0000000000000 --- a/Formula/pgtune.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pgtune < Formula - desc "Tuning wizard for postgresql.conf" - homepage "http://pgfoundry.org/projects/pgtune" - url "https://ftp.postgresql.org/pub/projects/pgFoundry/pgtune/pgtune/0.9.3/pgtune-0.9.3.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.postgresql.org/projects/pgFoundry/pgtune/pgtune/0.9.3/pgtune-0.9.3.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/p/pgtune/pgtune_0.9.3.orig.tar.gz" - sha256 "31ac5774766dd9793d8d2d3681d1edb45760897c8eda3afc48b8d59350dee0ea" - - # 0.9.3 does not have settings for PostgreSQL 9.x, but the trunk does - head "https://github.com/gregs1104/pgtune.git" - - bottle :unneeded - - def install - # By default, pgtune searches for settings in the directory - # where the script is being run from. - inreplace "pgtune" do |s| - s.sub! /(parser\.add_option\('-S'.*default=).*,/, "\\1\"#{pkgshare}\"," - end - bin.install "pgtune" - pkgshare.install Dir["pg_settings*"] - end - - test do - system bin/"pgtune", "--help" - end -end diff --git a/Formula/pgweb.rb b/Formula/pgweb.rb deleted file mode 100644 index 963285f6dd026..0000000000000 --- a/Formula/pgweb.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Pgweb < Formula - desc "Web-based PostgreSQL database browser" - homepage "https://sosedoff.github.io/pgweb/" - url "https://github.com/sosedoff/pgweb/archive/v0.11.0.tar.gz" - sha256 "c3d73792a1deee527a4213e0b725a0caea8bb232c7e8e0a5162f2082bd86b368" - - bottle do - cellar :any_skip_relocation - sha256 "a6a28fce4d70533892f95837b1796e580639e12a3d152f2e609f251aa46ee037" => :mojave - sha256 "f92481df4a5de9e1a4789a176b0dc6619fc9f4414319a6109ea508fd9e8c4f41" => :high_sierra - sha256 "6483e7a8777afb98500189de965cf80ab213f3a7ae82ecbca416980bcb7b62db" => :sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/sosedoff/pgweb").install buildpath.children - - cd "src/github.com/sosedoff/pgweb" do - # Avoid running `go get` - inreplace "Makefile", "go get", "" - - system "make", "build" - bin.install "pgweb" - prefix.install_metafiles - end - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - begin - pid = fork do - exec bin/"pgweb", "--listen=#{port}", - "--skip-open", - "--sessions" - end - sleep 2 - assert_match "\"version\":\"#{version}\"", shell_output("curl http://localhost:#{port}/api/info") - ensure - Process.kill("TERM", pid) - end - end -end diff --git a/Formula/phoon.rb b/Formula/phoon.rb deleted file mode 100644 index ef255e63316dc..0000000000000 --- a/Formula/phoon.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Phoon < Formula - desc "Displays current or specified phase of the moon via ASCII art" - homepage "https://www.acme.com/software/phoon/" - url "https://www.acme.com/software/phoon/phoon_14Aug2014.tar.gz" - version "04A" - sha256 "bad9b5e37ccaf76a10391cc1fa4aff9654e54814be652b443853706db18ad7c1" - - bottle do - cellar :any_skip_relocation - sha256 "fc8ebcd250b06b5f4b387f7ff84c9935b10a0b2cd4515f2d1dfc993d64f528dc" => :mojave - sha256 "b02d96f879caf26f69d807a5f7e4ede911e3d8d954fa3ab943e27efe6da15814" => :high_sierra - sha256 "ef7e685f7a9894e894807a555c4a9d52dd947184c15986f0a5578a46d892e46a" => :sierra - sha256 "ae91a1dc089678416ddeab9bd3dfbe76f0fd9f4789a86b187740167d0658926d" => :el_capitan - sha256 "d6f259769364eab6cacb4e45301f0ab8cd6edab369da99b4ecfbef7927791adc" => :yosemite - sha256 "378c1f09dcffbd0a0fd79cbcbe9a988d8505fa9b657fc803e6c0e5bb62545047" => :mavericks - sha256 "e6ddb6af5a0f4f1fe42ad4cb653434159fb9849d364fea7bb2e2784e7e0d8fa6" => :mountain_lion - end - - def install - system "make" - bin.install "phoon" - man1.install "phoon.1" - end - - test do - system "#{bin}/phoon" - end -end diff --git a/Formula/phoronix-test-suite.rb b/Formula/phoronix-test-suite.rb deleted file mode 100644 index f8f9fcf79a7f2..0000000000000 --- a/Formula/phoronix-test-suite.rb +++ /dev/null @@ -1,25 +0,0 @@ -class PhoronixTestSuite < Formula - desc "Open-source automated testing/benchmarking software" - homepage "https://www.phoronix-test-suite.com/" - url "https://github.com/phoronix-test-suite/phoronix-test-suite/archive/v8.4.1.tar.gz" - sha256 "29e2221ce0db9d11f98cbdab3f45c60e87868b366b00ad698e1a45fee8a96764" - head "https://github.com/phoronix-test-suite/phoronix-test-suite.git" - - bottle :unneeded - - def install - ENV["DESTDIR"] = buildpath/"dest" - system "./install-sh", prefix - prefix.install (buildpath/"dest/#{prefix}").children - bash_completion.install "dest/#{prefix}/../etc/bash_completion.d/phoronix-test-suite" - end - - # 7.4.0 installed files in the formula's rack so clean up the mess. - def post_install - rm_rf [prefix/"../etc", prefix/"../usr"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/phoronix-test-suite version") - end -end diff --git a/Formula/php-code-sniffer.rb b/Formula/php-code-sniffer.rb deleted file mode 100644 index 292a6ad724df5..0000000000000 --- a/Formula/php-code-sniffer.rb +++ /dev/null @@ -1,37 +0,0 @@ -class PhpCodeSniffer < Formula - desc "Check coding standards in PHP, JavaScript and CSS" - homepage "https://github.com/squizlabs/PHP_CodeSniffer/" - url "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.4.0/phpcs.phar" - sha256 "bc26904f539f17114183db3d5020cff0200f69d4866080d68a259bb31470dfb4" - - bottle :unneeded - - resource "phpcbf.phar" do - url "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.4.0/phpcbf.phar" - sha256 "e9a9f4ecf8d0c405f4d70f9738f07aa3bc60fbaa6dd68b524053d7f020d14c47" - end - - def install - bin.install "phpcs.phar" => "phpcs" - resource("phpcbf.phar").stage { bin.install "phpcbf.phar" => "phpcbf" } - end - - test do - (testpath/"test.php").write <<~EOS - - * @license BSD Licence - * @link https://brew.sh/ - */ - EOS - - assert_match /FOUND 13 ERRORS/, shell_output("#{bin}/phpcs --runtime-set ignore_errors_on_exit true test.php") - assert_match /13 ERRORS WERE FIXED/, shell_output("#{bin}/phpcbf test.php", 1) - system "#{bin}/phpcs", "test.php" - end -end diff --git a/Formula/php-cs-fixer.rb b/Formula/php-cs-fixer.rb deleted file mode 100644 index ba4937866b1a7..0000000000000 --- a/Formula/php-cs-fixer.rb +++ /dev/null @@ -1,27 +0,0 @@ -class PhpCsFixer < Formula - desc "Tool to automatically fix PHP coding standards issues" - homepage "https://cs.sensiolabs.org/" - url "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.14.0/php-cs-fixer.phar" - version "2.14.0" - sha256 "8171ade74ef392405e28fc2fd338a9770929872d7f1dc8e8f78d0a182a5ce52a" - - bottle :unneeded - - depends_on "php" if MacOS.version <= :el_capitan - - def install - bin.install "php-cs-fixer.phar" => "php-cs-fixer" - end - - test do - (testpath/"test.php").write <<~EOS - foo( 'homebrew rox' ); - EOS - (testpath/"correct_test.php").write <<~EOS - foo('homebrew rox'); - EOS - - system "#{bin}/php-cs-fixer", "fix", "test.php" - assert compare_file("test.php", "correct_test.php") - end -end diff --git a/Formula/php.rb b/Formula/php.rb deleted file mode 100644 index 28ef7a439bfaa..0000000000000 --- a/Formula/php.rb +++ /dev/null @@ -1,474 +0,0 @@ -class Php < Formula - desc "General-purpose scripting language" - homepage "https://secure.php.net/" - url "https://php.net/get/php-7.3.0.tar.xz/from/this/mirror" - sha256 "7d195cad55af8b288c3919c67023a14ff870a73e3acc2165a6d17a4850a560b5" - revision 1 - - bottle do - sha256 "74ba1ffaa12631b3413617915d8de0ab54e9714530ba31530e228580cc91327a" => :mojave - sha256 "99bd809cc18678667bc12c516dd9d11fbaa38e2b873b19654dee70b6a3364ab8" => :high_sierra - sha256 "7e6bd74a51cb710e3bd0b6b125f59343911b85e1eabffe5e716b49b91b7d57c6" => :sierra - end - - depends_on "httpd" => [:build, :test] - depends_on "pkg-config" => :build - depends_on "apr" - depends_on "apr-util" - depends_on "argon2" - depends_on "aspell" - depends_on "autoconf" - depends_on "curl-openssl" - depends_on "freetds" - depends_on "freetype" - depends_on "gettext" - depends_on "glib" - depends_on "gmp" - depends_on "icu4c" - depends_on "jpeg" - depends_on "libpng" - depends_on "libpq" - depends_on "libsodium" - depends_on "libzip" - depends_on "openldap" - depends_on "openssl" - depends_on "pcre2" - depends_on "sqlite" - depends_on "tidy-html5" - depends_on "unixodbc" - depends_on "webp" - - # PHP build system incorrectly links system libraries - # see https://github.com/php/php-src/pull/3472 - patch :DATA - - needs :cxx11 - - def install - # Ensure that libxml2 will be detected correctly in older MacOS - if MacOS.version == :el_capitan || MacOS.version == :sierra - ENV["SDKROOT"] = MacOS.sdk_path - end - - # buildconf required due to system library linking bug patch - system "./buildconf", "--force" - - inreplace "configure" do |s| - s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`", - "APACHE_THREADED_MPM=" - s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", - "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" - s.gsub! "-z `$APXS -q SYSCONFDIR`", - "-z ''" - end - - # Update error message in apache sapi to better explain the requirements - # of using Apache http in combination with php if the non-compatible MPM - # has been selected. Homebrew has chosen not to support being able to - # compile a thread safe version of PHP and therefore it is not - # possible to recompile as suggested in the original message - inreplace "sapi/apache2handler/sapi_apache2.c", - "You need to recompile PHP.", - "Homebrew PHP does not support a thread-safe php binary. "\ - "To use the PHP apache sapi please change "\ - "your httpd config to use the prefork MPM" - - inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" - - # Required due to icu4c dependency - ENV.cxx11 - - config_path = etc/"php/#{php_version}" - # Prevent system pear config from inhibiting pear install - (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? - - # Prevent homebrew from harcoding path to sed shim in phpize script - ENV["lt_cv_path_SED"] = "sed" - - # Each extension that is built on Mojave needs a direct reference to the - # sdk path or it won't find the headers - headers_path = "=#{MacOS.sdk_path_if_needed}/usr" - - args = %W[ - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{config_path} - --with-config-file-path=#{config_path} - --with-config-file-scan-dir=#{config_path}/conf.d - --with-pear=#{pkgshare}/pear - --enable-bcmath - --enable-calendar - --enable-dba - --enable-dtrace - --enable-exif - --enable-ftp - --enable-fpm - --enable-intl - --enable-mbregex - --enable-mbstring - --enable-mysqlnd - --enable-opcache-file - --enable-pcntl - --enable-phpdbg - --enable-phpdbg-webhelper - --enable-shmop - --enable-soap - --enable-sockets - --enable-sysvmsg - --enable-sysvsem - --enable-sysvshm - --enable-wddx - --enable-zip - --with-apxs2=#{Formula["httpd"].opt_bin}/apxs - --with-bz2#{headers_path} - --with-curl=#{Formula["curl-openssl"].opt_prefix} - --with-fpm-user=_www - --with-fpm-group=_www - --with-freetype-dir=#{Formula["freetype"].opt_prefix} - --with-gd - --with-gettext=#{Formula["gettext"].opt_prefix} - --with-gmp=#{Formula["gmp"].opt_prefix} - --with-iconv#{headers_path} - --with-icu-dir=#{Formula["icu4c"].opt_prefix} - --with-jpeg-dir=#{Formula["jpeg"].opt_prefix} - --with-kerberos#{headers_path} - --with-layout=GNU - --with-ldap=#{Formula["openldap"].opt_prefix} - --with-ldap-sasl#{headers_path} - --with-libxml-dir#{headers_path} - --with-libedit#{headers_path} - --with-libzip - --with-mhash#{headers_path} - --with-mysql-sock=/tmp/mysql.sock - --with-mysqli=mysqlnd - --with-ndbm#{headers_path} - --with-openssl=#{Formula["openssl"].opt_prefix} - --with-password-argon2=#{Formula["argon2"].opt_prefix} - --with-pdo-dblib=#{Formula["freetds"].opt_prefix} - --with-pdo-mysql=mysqlnd - --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} - --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} - --with-pdo-sqlite=#{Formula["sqlite"].opt_prefix} - --with-pgsql=#{Formula["libpq"].opt_prefix} - --with-pic - --with-png-dir=#{Formula["libpng"].opt_prefix} - --with-pspell=#{Formula["aspell"].opt_prefix} - --with-sodium=#{Formula["libsodium"].opt_prefix} - --with-sqlite3=#{Formula["sqlite"].opt_prefix} - --with-tidy=#{Formula["tidy-html5"].opt_prefix} - --with-unixODBC=#{Formula["unixodbc"].opt_prefix} - --with-webp-dir=#{Formula["webp"].opt_prefix} - --with-xmlrpc - --with-xsl#{headers_path} - --with-zlib#{headers_path} - ] - - system "./configure", *args - system "make" - system "make", "install" - - # Allow pecl to install outside of Cellar - extension_dir = Utils.popen_read("#{bin}/php-config --extension-dir").chomp - orig_ext_dir = File.basename(extension_dir) - inreplace bin/"php-config", lib/"php", prefix/"pecl" - inreplace "php.ini-development", %r{; ?extension_dir = "\./"}, - "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" - - config_files = { - "php.ini-development" => "php.ini", - "sapi/fpm/php-fpm.conf" => "php-fpm.conf", - "sapi/fpm/www.conf" => "php-fpm.d/www.conf", - } - config_files.each_value do |dst| - dst_default = config_path/"#{dst}.default" - rm dst_default if dst_default.exist? - end - config_path.install config_files - - unless (var/"log/php-fpm.log").exist? - (var/"log").mkpath - touch var/"log/php-fpm.log" - end - end - - def post_install - pear_prefix = pkgshare/"pear" - pear_files = %W[ - #{pear_prefix}/.depdblock - #{pear_prefix}/.filemap - #{pear_prefix}/.depdb - #{pear_prefix}/.lock - ] - - %W[ - #{pear_prefix}/.channels - #{pear_prefix}/.channels/.alias - ].each do |f| - chmod 0755, f - pear_files.concat(Dir["#{f}/*"]) - end - - chmod 0644, pear_files - - # Custom location for extensions installed via pecl - pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" - ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? - extension_dir = Utils.popen_read("#{bin}/php-config --extension-dir").chomp - php_basename = File.basename(extension_dir) - php_ext_dir = opt_prefix/"lib/php"/php_basename - - # fix pear config to install outside cellar - pear_path = HOMEBREW_PREFIX/"share/pear" - cp_r pkgshare/"pear/.", pear_path - { - "php_ini" => etc/"php/#{php_version}/php.ini", - "php_dir" => pear_path, - "doc_dir" => pear_path/"doc", - "ext_dir" => pecl_path/php_basename, - "bin_dir" => opt_bin, - "data_dir" => pear_path/"data", - "cfg_dir" => pear_path/"cfg", - "www_dir" => pear_path/"htdocs", - "man_dir" => HOMEBREW_PREFIX/"share/man", - "test_dir" => pear_path/"test", - "php_bin" => opt_bin/"php", - }.each do |key, value| - value.mkpath if key =~ /(? - SetHandler application/x-httpd-php - - - Finally, check DirectoryIndex includes index.php - DirectoryIndex index.php index.html - - The php.ini and php-fpm.ini file can be found in: - #{etc}/php/#{php_version}/ - EOS - end - - def php_version - version.to_s.split(".")[0..1].join(".") - end - - plist_options :manual => "php-fpm" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/php-fpm - --nodaemonize - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/php-fpm.log - - - EOS - end - - test do - assert_match /^Zend OPcache$/, shell_output("#{bin}/php -i"), - "Zend OPCache extension not loaded" - # Test related to libxml2 and - # https://github.com/Homebrew/homebrew-core/issues/28398 - assert_includes MachO::Tools.dylibs("#{bin}/php"), - "#{Formula["libpq"].opt_lib}/libpq.5.dylib" - system "#{sbin}/php-fpm", "-t" - system "#{bin}/phpdbg", "-V" - system "#{bin}/php-cgi", "-m" - # Prevent SNMP extension to be added - assert_no_match /^snmp$/, shell_output("#{bin}/php -m"), - "SNMP extension doesn't work reliably with Homebrew on High Sierra" - begin - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server_fpm = TCPServer.new(0) - port_fpm = server_fpm.addr[1] - server.close - server_fpm.close - - expected_output = /^Hello world!$/ - (testpath/"index.php").write <<~EOS - - SetHandler application/x-httpd-php - - EOS - - (testpath/"fpm.conf").write <<~EOS - [global] - daemonize=no - [www] - listen = 127.0.0.1:#{port_fpm} - pm = dynamic - pm.max_children = 5 - pm.start_servers = 2 - pm.min_spare_servers = 1 - pm.max_spare_servers = 3 - EOS - - (testpath/"httpd-fpm.conf").write <<~EOS - #{main_config} - LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so - LoadModule proxy_module lib/httpd/modules/mod_proxy.so - LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so - - SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" - - EOS - - pid = fork do - exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - - Process.kill("TERM", pid) - Process.wait(pid) - - fpm_pid = fork do - exec sbin/"php-fpm", "-y", "fpm.conf" - end - pid = fork do - exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - ensure - if pid - Process.kill("TERM", pid) - Process.wait(pid) - end - if fpm_pid - Process.kill("TERM", fpm_pid) - Process.wait(fpm_pid) - end - end - end -end - -__END__ -diff --git a/acinclude.m4 b/acinclude.m4 -index 168c465f8d..6c087d152f 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -441,7 +441,11 @@ dnl - dnl Adds a path to linkpath/runpath (LDFLAGS) - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then -+ case "$1" in -+ "/usr/$PHP_LIBDIR"|"/usr/lib"[)] ;; -+ /Library/Developer/CommandLineTools/SDKs/*/usr/lib[)] ;; -+ /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/lib[)] ;; -+ *[)] - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -452,8 +456,8 @@ AC_DEFUN([PHP_ADD_LIBPATH],[ - else - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl -@@ -487,7 +491,11 @@ dnl add an include path. - dnl if before is 1, add in the beginning of INCLUDES. - dnl - AC_DEFUN([PHP_ADD_INCLUDE],[ -- if test "$1" != "/usr/include"; then -+ case "$1" in -+ "/usr/include"[)] ;; -+ /Library/Developer/CommandLineTools/SDKs/*/usr/include[)] ;; -+ /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/include[)] ;; -+ *[)] - PHP_EXPAND_PATH($1, ai_p) - PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ - if test "$2"; then -@@ -495,8 +503,8 @@ AC_DEFUN([PHP_ADD_INCLUDE],[ - else - INCLUDES="$INCLUDES -I$ai_p" - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl internal, don't use -@@ -2411,7 +2419,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ - fi - - if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || -- test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME -+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || -+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.tbd - then - PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ - found_iconv=yes diff --git a/Formula/php@7.1.rb b/Formula/php@7.1.rb deleted file mode 100644 index 31d7b931764e1..0000000000000 --- a/Formula/php@7.1.rb +++ /dev/null @@ -1,477 +0,0 @@ -class PhpAT71 < Formula - desc "General-purpose scripting language" - homepage "https://secure.php.net/" - url "https://php.net/get/php-7.1.25.tar.xz/from/this/mirror" - sha256 "0fd8dad1903cd0b2d615a1fe4209f99e53b7292403c8ffa1919c0f4dd1eada88" - - bottle do - sha256 "46df1961981fe57c163921f5ac363c1bcf2063993f654c45e7f7c731683bae56" => :mojave - sha256 "deee221834493c7dd87c0759c9ab3916f499a9761bb036270736b240f85c50f1" => :high_sierra - sha256 "fb1973b3ce2b9dde48ddd330052a25e72e37be13cd601b8a326bfc508db117ee" => :sierra - end - - keg_only :versioned_formula - - depends_on "httpd" => [:build, :test] - depends_on "pkg-config" => :build - depends_on "apr" - depends_on "apr-util" - depends_on "aspell" - depends_on "autoconf" - depends_on "curl-openssl" - depends_on "freetds" - depends_on "freetype" - depends_on "gettext" - depends_on "glib" - depends_on "gmp" - depends_on "icu4c" - depends_on "jpeg" - depends_on "libpng" - depends_on "libpq" - depends_on "libtool" - depends_on "libzip" - depends_on "mcrypt" - depends_on "openldap" - depends_on "openssl" - depends_on "pcre" - depends_on "sqlite" - depends_on "tidy-html5" - depends_on "unixodbc" - depends_on "webp" - - # PHP build system incorrectly links system libraries - # see https://github.com/php/php-src/pull/3472 - patch :DATA - - needs :cxx11 - - def install - # Ensure that libxml2 will be detected correctly in older MacOS - if MacOS.version == :el_capitan || MacOS.version == :sierra - ENV["SDKROOT"] = MacOS.sdk_path - end - - # buildconf required due to system library linking bug patch - system "./buildconf", "--force" - - inreplace "configure" do |s| - s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`", - "APACHE_THREADED_MPM=" - s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", - "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" - s.gsub! "-z `$APXS -q SYSCONFDIR`", - "-z ''" - # apxs will interpolate the @ in the versioned prefix: https://bz.apache.org/bugzilla/show_bug.cgi?id=61944 - s.gsub! "LIBEXECDIR='$APXS_LIBEXECDIR'", - "LIBEXECDIR='" + "#{lib}/httpd/modules".gsub("@", "\\@") + "'" - end - - # Update error message in apache sapi to better explain the requirements - # of using Apache http in combination with php if the non-compatible MPM - # has been selected. Homebrew has chosen not to support being able to - # compile a thread safe version of PHP and therefore it is not - # possible to recompile as suggested in the original message - inreplace "sapi/apache2handler/sapi_apache2.c", - "You need to recompile PHP.", - "Homebrew PHP does not support a thread-safe php binary. "\ - "To use the PHP apache sapi please change "\ - "your httpd config to use the prefork MPM" - - inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" - - # Required due to icu4c dependency - ENV.cxx11 - - config_path = etc/"php/#{php_version}" - # Prevent system pear config from inhibiting pear install - (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? - - # Prevent homebrew from harcoding path to sed shim in phpize script - ENV["lt_cv_path_SED"] = "sed" - - # Each extension that is built on Mojave needs a direct reference to the - # sdk path or it won't find the headers - headers_path = "=#{MacOS.sdk_path_if_needed}/usr" - - args = %W[ - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{config_path} - --with-config-file-path=#{config_path} - --with-config-file-scan-dir=#{config_path}/conf.d - --with-pear=#{pkgshare}/pear - --enable-bcmath - --enable-calendar - --enable-dba - --enable-dtrace - --enable-exif - --enable-ftp - --enable-fpm - --enable-intl - --enable-mbregex - --enable-mbstring - --enable-mysqlnd - --enable-opcache-file - --enable-pcntl - --enable-phpdbg - --enable-phpdbg-webhelper - --enable-shmop - --enable-soap - --enable-sockets - --enable-sysvmsg - --enable-sysvsem - --enable-sysvshm - --enable-wddx - --enable-zip - --with-apxs2=#{Formula["httpd"].opt_bin}/apxs - --with-bz2#{headers_path} - --with-curl=#{Formula["curl-openssl"].opt_prefix} - --with-fpm-user=_www - --with-fpm-group=_www - --with-freetype-dir=#{Formula["freetype"].opt_prefix} - --with-gd - --with-gettext=#{Formula["gettext"].opt_prefix} - --with-gmp=#{Formula["gmp"].opt_prefix} - --with-iconv#{headers_path} - --with-icu-dir=#{Formula["icu4c"].opt_prefix} - --with-jpeg-dir=#{Formula["jpeg"].opt_prefix} - --with-kerberos#{headers_path} - --with-layout=GNU - --with-ldap=#{Formula["openldap"].opt_prefix} - --with-ldap-sasl#{headers_path} - --with-libedit#{headers_path} - --with-libxml-dir#{headers_path} - --with-libzip - --with-mcrypt=#{Formula["mcrypt"].opt_prefix} - --with-mhash#{headers_path} - --with-mysql-sock=/tmp/mysql.sock - --with-mysqli=mysqlnd - --with-ndbm#{headers_path} - --with-openssl=#{Formula["openssl"].opt_prefix} - --with-pdo-dblib=#{Formula["freetds"].opt_prefix} - --with-pdo-mysql=mysqlnd - --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} - --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} - --with-pdo-sqlite=#{Formula["sqlite"].opt_prefix} - --with-pgsql=#{Formula["libpq"].opt_prefix} - --with-pic - --with-png-dir=#{Formula["libpng"].opt_prefix} - --with-pspell=#{Formula["aspell"].opt_prefix} - --with-sqlite3=#{Formula["sqlite"].opt_prefix} - --with-tidy=#{Formula["tidy-html5"].opt_prefix} - --with-unixODBC=#{Formula["unixodbc"].opt_prefix} - --with-webp-dir=#{Formula["webp"].opt_prefix} - --with-xmlrpc - --with-xsl#{headers_path} - --with-zlib#{headers_path} - ] - - system "./configure", *args - system "make" - system "make", "install" - - # Allow pecl to install outside of Cellar - extension_dir = Utils.popen_read("#{bin}/php-config --extension-dir").chomp - orig_ext_dir = File.basename(extension_dir) - inreplace bin/"php-config", lib/"php", prefix/"pecl" - inreplace "php.ini-development", %r{; ?extension_dir = "\./"}, - "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" - - config_files = { - "php.ini-development" => "php.ini", - "sapi/fpm/php-fpm.conf" => "php-fpm.conf", - "sapi/fpm/www.conf" => "php-fpm.d/www.conf", - } - config_files.each_value do |dst| - dst_default = config_path/"#{dst}.default" - rm dst_default if dst_default.exist? - end - config_path.install config_files - - unless (var/"log/php-fpm.log").exist? - (var/"log").mkpath - touch var/"log/php-fpm.log" - end - end - - def post_install - pear_prefix = pkgshare/"pear" - pear_files = %W[ - #{pear_prefix}/.depdblock - #{pear_prefix}/.filemap - #{pear_prefix}/.depdb - #{pear_prefix}/.lock - ] - - %W[ - #{pear_prefix}/.channels - #{pear_prefix}/.channels/.alias - ].each do |f| - chmod 0755, f - pear_files.concat(Dir["#{f}/*"]) - end - - chmod 0644, pear_files - - # Custom location for extensions installed via pecl - pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" - ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? - extension_dir = Utils.popen_read("#{bin}/php-config --extension-dir").chomp - php_basename = File.basename(extension_dir) - php_ext_dir = opt_prefix/"lib/php"/php_basename - - # fix pear config to install outside cellar - pear_path = HOMEBREW_PREFIX/"share/pear@#{php_version}" - cp_r pkgshare/"pear/.", pear_path - { - "php_ini" => etc/"php/#{php_version}/php.ini", - "php_dir" => pear_path, - "doc_dir" => pear_path/"doc", - "ext_dir" => pecl_path/php_basename, - "bin_dir" => opt_bin, - "data_dir" => pear_path/"data", - "cfg_dir" => pear_path/"cfg", - "www_dir" => pear_path/"htdocs", - "man_dir" => HOMEBREW_PREFIX/"share/man", - "test_dir" => pear_path/"test", - "php_bin" => opt_bin/"php", - }.each do |key, value| - value.mkpath if key =~ /(? - SetHandler application/x-httpd-php - - - Finally, check DirectoryIndex includes index.php - DirectoryIndex index.php index.html - - The php.ini and php-fpm.ini file can be found in: - #{etc}/php/#{php_version}/ - EOS - end - - def php_version - version.to_s.split(".")[0..1].join(".") - end - - plist_options :manual => "php-fpm" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/php-fpm - --nodaemonize - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/php-fpm.log - - - EOS - end - - test do - assert_match /^Zend OPcache$/, shell_output("#{bin}/php -i"), - "Zend OPCache extension not loaded" - # Test related to libxml2 and - # https://github.com/Homebrew/homebrew-core/issues/28398 - assert_includes MachO::Tools.dylibs("#{bin}/php"), - "#{Formula["libpq"].opt_lib}/libpq.5.dylib" - system "#{sbin}/php-fpm", "-t" - system "#{bin}/phpdbg", "-V" - system "#{bin}/php-cgi", "-m" - # Prevent SNMP extension to be added - assert_no_match /^snmp$/, shell_output("#{bin}/php -m"), - "SNMP extension doesn't work reliably with Homebrew on High Sierra" - begin - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server_fpm = TCPServer.new(0) - port_fpm = server_fpm.addr[1] - server.close - server_fpm.close - - expected_output = /^Hello world!$/ - (testpath/"index.php").write <<~EOS - - SetHandler application/x-httpd-php - - EOS - - (testpath/"fpm.conf").write <<~EOS - [global] - daemonize=no - [www] - listen = 127.0.0.1:#{port_fpm} - pm = dynamic - pm.max_children = 5 - pm.start_servers = 2 - pm.min_spare_servers = 1 - pm.max_spare_servers = 3 - EOS - - (testpath/"httpd-fpm.conf").write <<~EOS - #{main_config} - LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so - LoadModule proxy_module lib/httpd/modules/mod_proxy.so - LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so - - SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" - - EOS - - pid = fork do - exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - - Process.kill("TERM", pid) - Process.wait(pid) - - fpm_pid = fork do - exec sbin/"php-fpm", "-y", "fpm.conf" - end - pid = fork do - exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - ensure - if pid - Process.kill("TERM", pid) - Process.wait(pid) - end - if fpm_pid - Process.kill("TERM", fpm_pid) - Process.wait(fpm_pid) - end - end - end -end - -__END__ -diff --git a/acinclude.m4 b/acinclude.m4 -index 168c465f8d..6c087d152f 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -441,7 +441,11 @@ dnl - dnl Adds a path to linkpath/runpath (LDFLAGS) - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then -+ case "$1" in -+ "/usr/$PHP_LIBDIR"|"/usr/lib"[)] ;; -+ /Library/Developer/CommandLineTools/SDKs/*/usr/lib[)] ;; -+ /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/lib[)] ;; -+ *[)] - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -452,8 +456,8 @@ AC_DEFUN([PHP_ADD_LIBPATH],[ - else - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl -@@ -487,7 +491,11 @@ dnl add an include path. - dnl if before is 1, add in the beginning of INCLUDES. - dnl - AC_DEFUN([PHP_ADD_INCLUDE],[ -- if test "$1" != "/usr/include"; then -+ case "$1" in -+ "/usr/include"[)] ;; -+ /Library/Developer/CommandLineTools/SDKs/*/usr/include[)] ;; -+ /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/include[)] ;; -+ *[)] - PHP_EXPAND_PATH($1, ai_p) - PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ - if test "$2"; then -@@ -495,8 +503,8 @@ AC_DEFUN([PHP_ADD_INCLUDE],[ - else - INCLUDES="$INCLUDES -I$ai_p" - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl internal, don't use -@@ -2411,7 +2419,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ - fi - - if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || -- test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME -+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || -+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.tbd - then - PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ - found_iconv=yes diff --git a/Formula/php@7.2.rb b/Formula/php@7.2.rb deleted file mode 100644 index 2fab372388218..0000000000000 --- a/Formula/php@7.2.rb +++ /dev/null @@ -1,479 +0,0 @@ -class PhpAT72 < Formula - desc "General-purpose scripting language" - homepage "https://secure.php.net/" - url "https://php.net/get/php-7.2.13.tar.xz/from/this/mirror" - sha256 "14b0429abdb46b65c843e5882c9a8c46b31dfbf279c747293b8ab950c2644a4b" - - bottle do - sha256 "6dfcf4baffb4a9b929725a69d6d162dcf38f403788ef45740a2572cb1b610765" => :mojave - sha256 "30f1ada91bee7fe2fb2ee69ce6b7714dae947f2fafe8a408ca4e19b2d4e5d3da" => :high_sierra - sha256 "7a1c6d536b23d1c2fc06b17ada65c8d62ad56cf4304b3f1fdb41dd66db48e38b" => :sierra - end - - keg_only :versioned_formula - - depends_on "httpd" => [:build, :test] - depends_on "pkg-config" => :build - depends_on "apr" - depends_on "apr-util" - depends_on "argon2" - depends_on "aspell" - depends_on "autoconf" - depends_on "curl-openssl" - depends_on "freetds" - depends_on "freetype" - depends_on "gettext" - depends_on "glib" - depends_on "gmp" - depends_on "icu4c" - depends_on "jpeg" - depends_on "libpng" - depends_on "libpq" - depends_on "libsodium" - depends_on "libzip" - depends_on "openldap" - depends_on "openssl" - depends_on "pcre" - depends_on "sqlite" - depends_on "tidy-html5" - depends_on "unixodbc" - depends_on "webp" - - # PHP build system incorrectly links system libraries - # see https://github.com/php/php-src/pull/3472 - patch :DATA - - needs :cxx11 - - def install - # Ensure that libxml2 will be detected correctly in older MacOS - if MacOS.version == :el_capitan || MacOS.version == :sierra - ENV["SDKROOT"] = MacOS.sdk_path - end - - # buildconf required due to system library linking bug patch - system "./buildconf", "--force" - - inreplace "configure" do |s| - s.gsub! "APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`", - "APACHE_THREADED_MPM=" - s.gsub! "APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`", - "APXS_LIBEXECDIR='$(INSTALL_ROOT)#{lib}/httpd/modules'" - s.gsub! "-z `$APXS -q SYSCONFDIR`", - "-z ''" - - # apxs will interpolate the @ in the versioned prefix: https://bz.apache.org/bugzilla/show_bug.cgi?id=61944 - s.gsub! "LIBEXECDIR='$APXS_LIBEXECDIR'", - "LIBEXECDIR='" + "#{lib}/httpd/modules".gsub("@", "\\@") + "'" - end - - # Update error message in apache sapi to better explain the requirements - # of using Apache http in combination with php if the non-compatible MPM - # has been selected. Homebrew has chosen not to support being able to - # compile a thread safe version of PHP and therefore it is not - # possible to recompile as suggested in the original message - inreplace "sapi/apache2handler/sapi_apache2.c", - "You need to recompile PHP.", - "Homebrew PHP does not support a thread-safe php binary. "\ - "To use the PHP apache sapi please change "\ - "your httpd config to use the prefork MPM" - - inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no" - - # Required due to icu4c dependency - ENV.cxx11 - - config_path = etc/"php/#{php_version}" - # Prevent system pear config from inhibiting pear install - (config_path/"pear.conf").delete if (config_path/"pear.conf").exist? - - # Prevent homebrew from harcoding path to sed shim in phpize script - ENV["lt_cv_path_SED"] = "sed" - - # Each extension that is built on Mojave needs a direct reference to the - # sdk path or it won't find the headers - headers_path = "=#{MacOS.sdk_path_if_needed}/usr" - - args = %W[ - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{config_path} - --with-config-file-path=#{config_path} - --with-config-file-scan-dir=#{config_path}/conf.d - --with-pear=#{pkgshare}/pear - --enable-bcmath - --enable-calendar - --enable-dba - --enable-dtrace - --enable-exif - --enable-ftp - --enable-fpm - --enable-intl - --enable-mbregex - --enable-mbstring - --enable-mysqlnd - --enable-opcache-file - --enable-pcntl - --enable-phpdbg - --enable-phpdbg-webhelper - --enable-shmop - --enable-soap - --enable-sockets - --enable-sysvmsg - --enable-sysvsem - --enable-sysvshm - --enable-wddx - --enable-zip - --with-apxs2=#{Formula["httpd"].opt_bin}/apxs - --with-bz2#{headers_path} - --with-curl=#{Formula["curl-openssl"].opt_prefix} - --with-fpm-user=_www - --with-fpm-group=_www - --with-freetype-dir=#{Formula["freetype"].opt_prefix} - --with-gd - --with-gettext=#{Formula["gettext"].opt_prefix} - --with-gmp=#{Formula["gmp"].opt_prefix} - --with-iconv#{headers_path} - --with-icu-dir=#{Formula["icu4c"].opt_prefix} - --with-jpeg-dir=#{Formula["jpeg"].opt_prefix} - --with-kerberos#{headers_path} - --with-layout=GNU - --with-ldap=#{Formula["openldap"].opt_prefix} - --with-ldap-sasl#{headers_path} - --with-libxml-dir#{headers_path} - --with-libedit#{headers_path} - --with-libzip - --with-mhash#{headers_path} - --with-mysql-sock=/tmp/mysql.sock - --with-mysqli=mysqlnd - --with-ndbm#{headers_path} - --with-openssl=#{Formula["openssl"].opt_prefix} - --with-password-argon2=#{Formula["argon2"].opt_prefix} - --with-pdo-dblib=#{Formula["freetds"].opt_prefix} - --with-pdo-mysql=mysqlnd - --with-pdo-odbc=unixODBC,#{Formula["unixodbc"].opt_prefix} - --with-pdo-pgsql=#{Formula["libpq"].opt_prefix} - --with-pdo-sqlite=#{Formula["sqlite"].opt_prefix} - --with-pgsql=#{Formula["libpq"].opt_prefix} - --with-pic - --with-png-dir=#{Formula["libpng"].opt_prefix} - --with-pspell=#{Formula["aspell"].opt_prefix} - --with-sodium=#{Formula["libsodium"].opt_prefix} - --with-sqlite3=#{Formula["sqlite"].opt_prefix} - --with-tidy=#{Formula["tidy-html5"].opt_prefix} - --with-unixODBC=#{Formula["unixodbc"].opt_prefix} - --with-webp-dir=#{Formula["webp"].opt_prefix} - --with-xmlrpc - --with-xsl#{headers_path} - --with-zlib#{headers_path} - ] - - system "./configure", *args - system "make" - system "make", "install" - - # Allow pecl to install outside of Cellar - extension_dir = Utils.popen_read("#{bin}/php-config --extension-dir").chomp - orig_ext_dir = File.basename(extension_dir) - inreplace bin/"php-config", lib/"php", prefix/"pecl" - inreplace "php.ini-development", %r{; ?extension_dir = "\./"}, - "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" - - config_files = { - "php.ini-development" => "php.ini", - "sapi/fpm/php-fpm.conf" => "php-fpm.conf", - "sapi/fpm/www.conf" => "php-fpm.d/www.conf", - } - config_files.each_value do |dst| - dst_default = config_path/"#{dst}.default" - rm dst_default if dst_default.exist? - end - config_path.install config_files - - unless (var/"log/php-fpm.log").exist? - (var/"log").mkpath - touch var/"log/php-fpm.log" - end - end - - def post_install - pear_prefix = pkgshare/"pear" - pear_files = %W[ - #{pear_prefix}/.depdblock - #{pear_prefix}/.filemap - #{pear_prefix}/.depdb - #{pear_prefix}/.lock - ] - - %W[ - #{pear_prefix}/.channels - #{pear_prefix}/.channels/.alias - ].each do |f| - chmod 0755, f - pear_files.concat(Dir["#{f}/*"]) - end - - chmod 0644, pear_files - - # Custom location for extensions installed via pecl - pecl_path = HOMEBREW_PREFIX/"lib/php/pecl" - ln_s pecl_path, prefix/"pecl" unless (prefix/"pecl").exist? - extension_dir = Utils.popen_read("#{bin}/php-config --extension-dir").chomp - php_basename = File.basename(extension_dir) - php_ext_dir = opt_prefix/"lib/php"/php_basename - - # fix pear config to install outside cellar - pear_path = HOMEBREW_PREFIX/"share/pear@#{php_version}" - cp_r pkgshare/"pear/.", pear_path - { - "php_ini" => etc/"php/#{php_version}/php.ini", - "php_dir" => pear_path, - "doc_dir" => pear_path/"doc", - "ext_dir" => pecl_path/php_basename, - "bin_dir" => opt_bin, - "data_dir" => pear_path/"data", - "cfg_dir" => pear_path/"cfg", - "www_dir" => pear_path/"htdocs", - "man_dir" => HOMEBREW_PREFIX/"share/man", - "test_dir" => pear_path/"test", - "php_bin" => opt_bin/"php", - }.each do |key, value| - value.mkpath if key =~ /(? - SetHandler application/x-httpd-php - - - Finally, check DirectoryIndex includes index.php - DirectoryIndex index.php index.html - - The php.ini and php-fpm.ini file can be found in: - #{etc}/php/#{php_version}/ - EOS - end - - def php_version - version.to_s.split(".")[0..1].join(".") - end - - plist_options :manual => "php-fpm" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/php-fpm - --nodaemonize - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/php-fpm.log - - - EOS - end - - test do - assert_match /^Zend OPcache$/, shell_output("#{bin}/php -i"), - "Zend OPCache extension not loaded" - # Test related to libxml2 and - # https://github.com/Homebrew/homebrew-core/issues/28398 - assert_includes MachO::Tools.dylibs("#{bin}/php"), - "#{Formula["libpq"].opt_lib}/libpq.5.dylib" - system "#{sbin}/php-fpm", "-t" - system "#{bin}/phpdbg", "-V" - system "#{bin}/php-cgi", "-m" - # Prevent SNMP extension to be added - assert_no_match /^snmp$/, shell_output("#{bin}/php -m"), - "SNMP extension doesn't work reliably with Homebrew on High Sierra" - begin - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server_fpm = TCPServer.new(0) - port_fpm = server_fpm.addr[1] - server.close - server_fpm.close - - expected_output = /^Hello world!$/ - (testpath/"index.php").write <<~EOS - - SetHandler application/x-httpd-php - - EOS - - (testpath/"fpm.conf").write <<~EOS - [global] - daemonize=no - [www] - listen = 127.0.0.1:#{port_fpm} - pm = dynamic - pm.max_children = 5 - pm.start_servers = 2 - pm.min_spare_servers = 1 - pm.max_spare_servers = 3 - EOS - - (testpath/"httpd-fpm.conf").write <<~EOS - #{main_config} - LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so - LoadModule proxy_module lib/httpd/modules/mod_proxy.so - LoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so - - SetHandler "proxy:fcgi://127.0.0.1:#{port_fpm}" - - EOS - - pid = fork do - exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - - Process.kill("TERM", pid) - Process.wait(pid) - - fpm_pid = fork do - exec sbin/"php-fpm", "-y", "fpm.conf" - end - pid = fork do - exec Formula["httpd"].opt_bin/"httpd", "-X", "-f", "#{testpath}/httpd-fpm.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - ensure - if pid - Process.kill("TERM", pid) - Process.wait(pid) - end - if fpm_pid - Process.kill("TERM", fpm_pid) - Process.wait(fpm_pid) - end - end - end -end - -__END__ -diff --git a/acinclude.m4 b/acinclude.m4 -index 168c465f8d..6c087d152f 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -441,7 +441,11 @@ dnl - dnl Adds a path to linkpath/runpath (LDFLAGS) - dnl - AC_DEFUN([PHP_ADD_LIBPATH],[ -- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then -+ case "$1" in -+ "/usr/$PHP_LIBDIR"|"/usr/lib"[)] ;; -+ /Library/Developer/CommandLineTools/SDKs/*/usr/lib[)] ;; -+ /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/lib[)] ;; -+ *[)] - PHP_EXPAND_PATH($1, ai_p) - ifelse([$2],,[ - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) -@@ -452,8 +456,8 @@ AC_DEFUN([PHP_ADD_LIBPATH],[ - else - _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl -@@ -487,7 +491,11 @@ dnl add an include path. - dnl if before is 1, add in the beginning of INCLUDES. - dnl - AC_DEFUN([PHP_ADD_INCLUDE],[ -- if test "$1" != "/usr/include"; then -+ case "$1" in -+ "/usr/include"[)] ;; -+ /Library/Developer/CommandLineTools/SDKs/*/usr/include[)] ;; -+ /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/include[)] ;; -+ *[)] - PHP_EXPAND_PATH($1, ai_p) - PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ - if test "$2"; then -@@ -495,8 +503,8 @@ AC_DEFUN([PHP_ADD_INCLUDE],[ - else - INCLUDES="$INCLUDES -I$ai_p" - fi -- ]) -- fi -+ ]) ;; -+ esac - ]) - - dnl internal, don't use -@@ -2411,7 +2419,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ - fi - - if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || -- test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME -+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || -+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.tbd - then - PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ - found_iconv=yes diff --git a/Formula/phplint.rb b/Formula/phplint.rb deleted file mode 100644 index 5faa71345a996..0000000000000 --- a/Formula/phplint.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Phplint < Formula - desc "Validator and documentator for PHP 5 and 7 programs" - homepage "https://www.icosaedro.it/phplint/" - url "https://www.icosaedro.it/phplint/phplint-3.2_20180727.tar.gz" - version "3.2-20180727" - sha256 "337b7a0d717ea7ff454ded7b3298d65f0cabeaf309598357b8354c96ce4e9f85" - - bottle :unneeded - - depends_on "php" - - def install - inreplace "php", "/opt/php/bin/php", Formula["php"].opt_bin/"php" - libexec.install "modules", "php", "phpl", "stdlib", "utils" - bin.install_symlink libexec/"phpl" - end - - test do - (testpath/"Email.php").write <<~EOS - ensureIsValidEmail($email); - - $this->email = $email; - } - - public static function fromString(string $email): self - { - return new self($email); - } - - public function __toString(): string - { - return $this->email; - } - - private function ensureIsValidEmail(string $email): void - { - if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { - throw new InvalidArgumentException( - sprintf( - '"%s" is not a valid email address', - $email - ) - ); - } - } - } - EOS - output = shell_output("#{bin}/phpl Email.php", 1) - assert_match "Overall test results: 15 errors, 0 warnings.", output - end -end diff --git a/Formula/phpmyadmin.rb b/Formula/phpmyadmin.rb deleted file mode 100644 index d0d6c5d04e731..0000000000000 --- a/Formula/phpmyadmin.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Phpmyadmin < Formula - desc "Web interface for MySQL and MariaDB" - homepage "https://www.phpmyadmin.net" - url "https://files.phpmyadmin.net/phpMyAdmin/4.8.4/phpMyAdmin-4.8.4-all-languages.tar.gz" - sha256 "4716ad8d0e2fb74f01adc32b7aa0dedcadf6671346a74a521182f62ae8954880" - - bottle :unneeded - - depends_on "php" => :test - - def install - pkgshare.install Dir["*"] - - etc.install pkgshare/"config.sample.inc.php" => "phpmyadmin.config.inc.php" - ln_s etc/"phpmyadmin.config.inc.php", pkgshare/"config.inc.php" - end - - def caveats; <<~EOS - To enable phpMyAdmin in Apache, add the following to httpd.conf and - restart Apache: - Alias /phpmyadmin #{HOMEBREW_PREFIX}/share/phpmyadmin - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - - Require all granted - - - Order allow,deny - Allow from all - - - Then open http://localhost/phpmyadmin - The configuration file is #{etc}/phpmyadmin.config.inc.php - EOS - end - - test do - cd pkgshare do - assert_match "German", shell_output("php #{pkgshare}/index.php") - end - end -end diff --git a/Formula/physfs.rb b/Formula/physfs.rb deleted file mode 100644 index 6ed7ad561d4cd..0000000000000 --- a/Formula/physfs.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Physfs < Formula - desc "Library to provide abstract access to various archives" - homepage "https://icculus.org/physfs/" - url "https://icculus.org/physfs/downloads/physfs-3.0.1.tar.bz2" - sha256 "b77b9f853168d9636a44f75fca372b363106f52d789d18a2f776397bf117f2f1" - head "https://hg.icculus.org/icculus/physfs/", :using => :hg - - bottle do - cellar :any - sha256 "4b2cf49af5b93bb1d0a0670ceccae84cb26c77a51c4e8230dd792c9da4dc0962" => :mojave - sha256 "03128f703af35b557fe9e6792dc93dec7b520e7d38a86b782cfdc5e00f850a71" => :high_sierra - sha256 "9549999aa9862efb9f59fd0448eef8bdfb458cef44367bad6a4fe436584e1977" => :sierra - sha256 "a8b9f8b640dc1aca30c1505fd738474f71f6122d86216bdaa33e4e3135d97367" => :el_capitan - end - - depends_on "cmake" => :build - - def install - mkdir "macbuild" do - args = std_cmake_args - args << "-DPHYSFS_BUILD_TEST=TRUE" - args << "-DPHYSFS_BUILD_WX_TEST=FALSE" unless build.head? - system "cmake", "..", *args - system "make", "install" - end - end - - test do - (testpath/"test.txt").write "homebrew" - system "zip", "test.zip", "test.txt" - (testpath/"test").write <<~EOS - addarchive test.zip 1 - cat test.txt - EOS - assert_match /Successful\.\nhomebrew/, shell_output("#{bin}/test_physfs < test 2>&1") - end -end diff --git a/Formula/pianobar.rb b/Formula/pianobar.rb deleted file mode 100644 index 6273162a00817..0000000000000 --- a/Formula/pianobar.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Pianobar < Formula - desc "Command-line player for https://pandora.com" - homepage "https://github.com/PromyLOPh/pianobar/" - url "https://6xq.net/pianobar/pianobar-2018.06.22.tar.bz2" - sha256 "946357718a7b5fea661247ad10187e77f94724ef2bb29a2482afeb2d8c8bd4c2" - head "https://github.com/PromyLOPh/pianobar.git" - - bottle do - cellar :any - sha256 "5b542cb16f0ea880c56e9e6a4e3607b5a3b0c99716948b62d01e259a3ad8bd9c" => :mojave - sha256 "ae7c37f76393133eb0c89ab71a4d85d3a379a4c83e79fe925627096229218878" => :high_sierra - sha256 "2482cbc242c836393dfbbe5a586d33dc58899e572aa3e929c9a371ea557071db" => :sierra - sha256 "d7f002bd258a1423a040e6ed1c78e74ade37f3af1e447e37506ba4af9b658718" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "faad2" - depends_on "ffmpeg" - depends_on "gnutls" - depends_on "json-c" - depends_on "libao" - depends_on "libgcrypt" - depends_on "mad" - - def install - # Discard Homebrew's CFLAGS as Pianobar reportedly doesn't like them - ENV["CFLAGS"] = "-O2 -DNDEBUG " + - # Or it doesn't build at all - "-std=c99 " + - # build if we aren't /usr/local' - "#{ENV.cppflags} #{ENV.ldflags}" - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - - prefix.install "contrib" - end -end diff --git a/Formula/pianod.rb b/Formula/pianod.rb deleted file mode 100644 index 33937537bcd6a..0000000000000 --- a/Formula/pianod.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Pianod < Formula - desc "Pandora client with multiple control interfaces" - homepage "https://deviousfish.com/pianod/" - url "https://deviousfish.com/Downloads/pianod/pianod-176.tar.gz" - sha256 "4f3be12daef1adb3bcbbcf8ec529abf0ac018e03140be9c5b0f1203d6e1b9bf0" - revision 1 - - bottle do - sha256 "01b47d23674efaf3ddefced7f4dfee0db683d956ea455ebd9a8bd0e8f3cf7d9d" => :mojave - sha256 "d0aa3614b2b70ca8140820bd059c1ebdbb54799b69ab6346f36a42a4dac600de" => :high_sierra - sha256 "fe7983c06b7fe6163792e7e0eeed5990b9d09e44ffc19d0c62808503ca409f5f" => :sierra - sha256 "3ed572ebaf767ba924cc7b402362775b77a19cd69337f940344988f86d2a1936" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "faad2" - depends_on "gnutls" - depends_on "json-c" - depends_on "libao" - depends_on "libgcrypt" - depends_on "mad" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/pianod", "-v" - end -end diff --git a/Formula/picard-tools.rb b/Formula/picard-tools.rb deleted file mode 100644 index 845e6d29abe8a..0000000000000 --- a/Formula/picard-tools.rb +++ /dev/null @@ -1,25 +0,0 @@ -class PicardTools < Formula - desc "Tools for manipulating HTS data and formats" - homepage "https://broadinstitute.github.io/picard/" - url "https://github.com/broadinstitute/picard/releases/download/2.18.23/picard.jar" - sha256 "c45f90f3a08bc3b1404375939b1f42757f8a29363c6706f5268b2dba180da28c" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install "picard.jar" - bin.write_jar_script libexec/"picard.jar", "picard" - end - - test do - (testpath/"test.fasta").write <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT - CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - cmd = "#{bin}/picard NormalizeFasta I=test.fasta O=/dev/stdout" - assert_match "TCTCTG", shell_output(cmd) - end -end diff --git a/Formula/picat.rb b/Formula/picat.rb deleted file mode 100644 index ef0712e46ce17..0000000000000 --- a/Formula/picat.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Picat < Formula - desc "Simple, and yet powerful, logic-based multi-paradigm programming language" - homepage "http://picat-lang.org/" - url "http://picat-lang.org/download/picat25_src.tar.gz" - version "2.5" - sha256 "143cf2b0823d7fa78830339ab800876d277bae18834349f484f2bdd4e3b7213f" - - bottle do - cellar :any_skip_relocation - sha256 "de7d9d97948f380b606f891045c1ac0aac72a682e309817701b8c1220668e692" => :mojave - sha256 "d5a9cf2cb98d6684762e52e5bce6c87c98b67e1d34d0fbb4e4c9b3a77e68d602" => :high_sierra - sha256 "25bd920ae6629f6aa3dd0415fbad8f14ac466fdb80a0c7e463e421e27555ca73" => :sierra - end - - def install - # Hardcode in Makefile issue is reported to upstream in the official Google Groups - # https://groups.google.com/d/msg/picat-lang/0kZYUJKgnkY/3Vig5X1NCAAJ - inreplace "emu/Makefile.picat.mac64", "/usr/local/bin/gcc", "gcc" - system "make", "-C", "emu", "-f", "Makefile.picat.mac64" - - bin.install "emu/picat_macx" => "picat" - prefix.install "lib" => "pi_lib" - doc.install Dir["doc/*"] - pkgshare.install "exs" - end - - test do - output = shell_output("#{bin}/picat #{pkgshare}/exs/euler/p1.pi").chomp - assert_equal "Sum of all the multiples of 3 or 5 below 1000 is 233168", output - end -end diff --git a/Formula/pick.rb b/Formula/pick.rb deleted file mode 100644 index c41e4dd80909f..0000000000000 --- a/Formula/pick.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Pick < Formula - desc "Utility to choose one option from a set of choices" - homepage "https://github.com/calleerlandsson/pick" - url "https://github.com/calleerlandsson/pick/releases/download/v2.0.2/pick-2.0.2.tar.gz" - sha256 "f2b43aaa540ad3ff05a256a531c2f47d3d95145b82c1d1b0d62dfb40d793d385" - - bottle do - cellar :any_skip_relocation - sha256 "d30bca053dccb474b04c013c9c1bcdc171b4f2aaee2522e58eb00e2064ad72ea" => :mojave - sha256 "4390712366447f8cdba5dcf58467fc352dbebb3be360c1e885103552afb688f2" => :high_sierra - sha256 "f2e70f7e7f304b3df2d342646bd8e990aeda284ee25b83d8796dd97b01684083" => :sierra - sha256 "17a0dd7c4317fda933bbfb311a49a4d2672a45ef35244af543c7d6ef4ac7849a" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/pick", "-v" - end -end diff --git a/Formula/picoc.rb b/Formula/picoc.rb deleted file mode 100644 index bd631679abed0..0000000000000 --- a/Formula/picoc.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Picoc < Formula - desc "C interpreter for scripting" - homepage "https://github.com/zsaleeba/picoc" - revision 1 - head "https://github.com/zsaleeba/picoc.git" - - stable do - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/picoc/picoc-2.1.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/picoc-2.1.tar.bz2" - sha256 "bfed355fab810b337ccfa9e3215679d0b9886c00d9cb5e691f7e7363fd388b7e" - - # Remove for > 2.1 - # Fix abort trap due to stack overflow - # Upstream commit from 14 Oct 2013 "Fixed a problem with PlatformGetLine()" - patch do - url "https://github.com/zsaleeba/picoc/commit/ed54c51.patch?full_index=1" - sha256 "2111ad8d038cf0063430746bf868b56f4658e79b87e4b94b03d00fb58af8564f" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "a3a2e949287349f46033c961de43fd8122a55b2ebc7881100c464fe965f2b4da" => :mojave - sha256 "f321e8e5bb302b30c946fa239709afaf7609f4151803ca3e722eeb26872e119b" => :high_sierra - sha256 "456707c08da75cf7ad3f98898dda357617b5295c4a09631366e06f9bdb1e09f4" => :sierra - sha256 "abd8328d9db2961516c421b09d0da77f7df9c09314d2d09530af27a0fe2d55d7" => :el_capitan - sha256 "5d732cb34ea6a0349f82bf39f948ab9b49be72273a264c52d0a0773ade2acba1" => :yosemite - end - - def install - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags} -DUNIX_HOST" - bin.install "picoc" - end - - test do - (testpath/"brew.c").write <<~EOS - #include - int main(void) { - printf("Homebrew\n"); - return 0; - } - EOS - assert_match "Homebrew", shell_output("#{bin}/picoc brew.c") - end -end diff --git a/Formula/picocom.rb b/Formula/picocom.rb deleted file mode 100644 index e2e64ef40726a..0000000000000 --- a/Formula/picocom.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Picocom < Formula - desc "Minimal dumb-terminal emulation program" - homepage "https://github.com/npat-efault/picocom" - url "https://github.com/npat-efault/picocom/archive/3.1.tar.gz" - sha256 "e6761ca932ffc6d09bd6b11ff018bdaf70b287ce518b3282d29e0270e88420bb" - - bottle do - cellar :any_skip_relocation - sha256 "e087cd6b60814a9b0638d6bdcc3a79e154b40f5013a0247878c1f1ab35c8d077" => :mojave - sha256 "7fec5e767653710fa87d0be9d97735550af70aeb32fdcba1c7c0159e9078ee1a" => :high_sierra - sha256 "fb1bd439cb84f2667feee5e5c125ec9a51698e7d153c56decf95502848edc621" => :sierra - sha256 "ec353723ddf1f785bd75bb3a0e9bd5e92adacbe5b4a86ed5dabe53d20b1a362c" => :el_capitan - end - - def install - system "make" - bin.install "picocom" - man1.install "picocom.1" - end - - test do - system "#{bin}/picocom", "--help" - end -end diff --git a/Formula/pict.rb b/Formula/pict.rb deleted file mode 100644 index f72caabcaf3da..0000000000000 --- a/Formula/pict.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pict < Formula - desc "Pairwise Independent Combinatorial Tool" - homepage "https://github.com/Microsoft/pict/" - url "https://github.com/Microsoft/pict/archive/v3.7.1.tar.gz" - sha256 "4fc7939c708f9c8d6346430b3b90f122f2cc5e341f172f94eb711b1c48f2518a" - - bottle do - cellar :any_skip_relocation - sha256 "ee531627e5fa6a0e8ba68aeb1e7bc5c420fb307bedccbc5b8aa248b73291a665" => :mojave - sha256 "f6ebf8ee9bb2ff705de0f9975cc96a4284a127b093ece87b44643d83f5b636de" => :high_sierra - sha256 "6ba3b37a9a8a0ce77430baddda0f57eebd71ad4adcf412c8f2f6b935073d7548" => :sierra - end - - resource "testfile" do - url "https://gist.githubusercontent.com/glsorre/9f67891c69c21cbf477c6cedff8ee910/raw/84ec65cf37e0a8df5428c6c607dbf397c2297e06/pict.txt" - sha256 "ac5e3561f9c481d2dca9d88df75b58a80331b757a9d2632baaf3ec5c2e49ccec" - end - - def install - system "make" - bin.install "pict" - end - - test do - resource("testfile").stage testpath - output = shell_output("#{bin}/pict pict.txt").split("\n") - assert_equal output[0], "LANGUAGES\tCURRIENCIES" - assert_equal output[4], "en_US\tGBP" - end -end diff --git a/Formula/pidcat.rb b/Formula/pidcat.rb deleted file mode 100644 index 5fbc9eb2d6b00..0000000000000 --- a/Formula/pidcat.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Pidcat < Formula - desc "Colored logcat script to show entries only for specified app" - homepage "https://github.com/JakeWharton/pidcat" - url "https://github.com/JakeWharton/pidcat/archive/2.1.0.tar.gz" - sha256 "e6f999ee0f23f0e9c9aee5ad21c6647fb1a1572063bdccd16a72464c8b522cb1" - head "https://github.com/JakeWharton/pidcat.git" - - bottle :unneeded - - def install - bin.install "pidcat.py" => "pidcat" - bash_completion.install "bash_completion.d/pidcat" - zsh_completion.install "zsh-completion/_pidcat" - end - - test do - assert_match /^usage: pidcat/, shell_output("#{bin}/pidcat --help").strip - end -end diff --git a/Formula/pidgin.rb b/Formula/pidgin.rb deleted file mode 100644 index 166c9b002f481..0000000000000 --- a/Formula/pidgin.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Pidgin < Formula - desc "Multi-protocol chat client" - homepage "https://pidgin.im/" - url "https://downloads.sourceforge.net/project/pidgin/Pidgin/2.13.0/pidgin-2.13.0.tar.bz2" - sha256 "2747150c6f711146bddd333c496870bfd55058bab22ffb7e4eb784018ec46d8f" - revision 2 - - bottle do - sha256 "4ebf5677a98572c213b2b2a0a15145140affd52ad659a1bf71da6c705651cea0" => :mojave - sha256 "39388fd5f805236cb972d68da78f54cbb042f650a2194c6fbb4231dd2f2a2fb0" => :high_sierra - sha256 "3e89f23e44404b8299562785f612259140d25c8b1af4c5c77d9da0008d1bdd84" => :sierra - sha256 "5bb5d41124e21b68b6172c025f0faf342d70a87fd95da067b7c450b76d3ab8cb" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "gettext" - depends_on "glib" - depends_on "gnutls" - depends_on "gtk+" - depends_on "libgcrypt" - depends_on "libidn" - depends_on "libotr" - depends_on "pango" - - # Finch has an equal port called purple-otr but it is a NIGHTMARE to compile - # If you want to fix this and create a PR on Homebrew please do so. - resource "pidgin-otr" do - url "https://otr.cypherpunks.ca/pidgin-otr-4.0.2.tar.gz" - sha256 "f4b59eef4a94b1d29dbe0c106dd00cdc630e47f18619fc754e5afbf5724ebac4" - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --disable-avahi - --disable-dbus - --disable-doxygen - --disable-gevolution - --disable-gstreamer - --disable-gstreamer-interfaces - --disable-gtkspell - --disable-meanwhile - --disable-vv - --enable-gnutls=yes - --with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework - --with-tkconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework - --without-x - ] - - system "./configure", *args - system "make", "install" - - resource("pidgin-otr").stage do - ENV.prepend "CFLAGS", "-I#{Formula["libotr"].opt_include}" - ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - end - - test do - system "#{bin}/finch", "--version" - end -end diff --git a/Formula/pidof.rb b/Formula/pidof.rb deleted file mode 100644 index 3ad73d48d0198..0000000000000 --- a/Formula/pidof.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Pidof < Formula - desc "Display the PID number for a given process name" - homepage "http://www.nightproductions.net/cli.htm" - url "http://www.nightproductions.net/downloads/pidof_source.tar.gz" - version "0.1.4" - sha256 "2a2cd618c7b9130e1a1d9be0210e786b85cbc9849c9b6f0cad9cbde31541e1b8" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "1a88c923954c4511fb64fe6cbfb27f5248c39d1676053c671ab71c652a377a2f" => :mojave - sha256 "fd5f89cf3a9685142e08a23980d9438e961096d74ee508a96ccbaecb55da6e1a" => :high_sierra - sha256 "6991d110a73724959f84edc398647e3cac5a029645daedef5f263ae51218130d" => :sierra - sha256 "d02c826db5564d7750c0e309a771b164f7764250507955d0b87d09837c3c2ba6" => :el_capitan - sha256 "54ffe0be6ef278aa45cacb856687df925bab1c117d1ab4c1a8f81ae835fb293e" => :mavericks - sha256 "d79dbbb55e7103639a1bb01413115b2526940cd9a198e59da05fec304369f443" => :mountain_lion - sha256 "ce5f3ea346e86cd98880ece0e457a5febfd48165ba947152bea9a3c459f41b3f" => :lion - end - - def install - system "make", "all", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" - man1.install gzip("pidof.1") - bin.install "pidof" - end - - test do - (testpath/"homebrew_testing.c").write <<~EOS - #include - #include - - int main() - { - printf("Testing Pidof\\n"); - sleep(10); - return 0; - } - EOS - system ENV.cc, "homebrew_testing.c", "-o", "homebrew_testing" - (testpath/"homebrew_testing").chmod 0555 - - pid = fork { exec "./homebrew_testing" } - sleep 1 - begin - assert_match(/\d+/, shell_output("#{bin}/pidof homebrew_testing")) - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/pig.rb b/Formula/pig.rb deleted file mode 100644 index 80c22999abf28..0000000000000 --- a/Formula/pig.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Pig < Formula - desc "Platform for analyzing large data sets" - homepage "https://pig.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=pig/pig-0.17.0/pig-0.17.0.tar.gz" - mirror "https://archive.apache.org/dist/pig/pig-0.17.0/pig-0.17.0.tar.gz" - sha256 "6d613768e9a6435ae8fa758f8eef4bd4f9d7f336a209bba3cd89b843387897f3" - - bottle :unneeded - - depends_on :java => "1.6+" - - def install - (libexec/"bin").install "bin/pig" - libexec.install Dir["pig-#{version}-core-h*.jar"] - libexec.install "lib" - (bin/"pig").write_env_script libexec/"bin/pig", Language::Java.java_home_env("1.6+").merge(:PIG_HOME => libexec) - end - - test do - (testpath/"test.pig").write <<~EOS - sh echo "Hello World" - EOS - assert_match "Hello World", shell_output("#{bin}/pig -x local test.pig") - end -end diff --git a/Formula/pigz.rb b/Formula/pigz.rb deleted file mode 100644 index cddcead858dec..0000000000000 --- a/Formula/pigz.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Pigz < Formula - desc "Parallel gzip" - homepage "https://zlib.net/pigz/" - url "https://zlib.net/pigz/pigz-2.4.tar.gz" - sha256 "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73" - - bottle do - cellar :any_skip_relocation - sha256 "341c5f3c0a82aedd822b2dd187ecc12b3dbdea9b2f00b08ce7ba049916557314" => :mojave - sha256 "216e716eafd2786ed6fa672daf27bb77b420e05f92a14cfeccab28a6be6b7778" => :high_sierra - sha256 "9173b4bdf36c787ad7a3b7d738236e0393430b607ba44d5a32fa387b008a347a" => :sierra - sha256 "d0c4ec5ac96ab0262d5e67bd5df5432d7dc40ac1404341962c02835ca8451b5c" => :el_capitan - end - - def install - # Fix dyld: lazy symbol binding failed: Symbol not found: _deflatePending - # Reported 8 Dec 2016 to madler at alumni.caltech.edu - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "pigz.c", "ZLIB_VERNUM >= 0x1260", "ZLIB_VERNUM >= 0x9999" - end - - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" - bin.install "pigz", "unpigz" - man1.install "pigz.1" - man1.install_symlink "pigz.1" => "unpigz.1" - end - - test do - test_data = "a" * 1000 - (testpath/"example").write test_data - system bin/"pigz", testpath/"example" - assert (testpath/"example.gz").file? - system bin/"unpigz", testpath/"example.gz" - assert_equal test_data, (testpath/"example").read - system "/bin/dd", "if=/dev/random", "of=foo.bin", "bs=1m", "count=10" - system bin/"pigz", "foo.bin" - end -end diff --git a/Formula/pijul.rb b/Formula/pijul.rb deleted file mode 100644 index dcd674b386f2a..0000000000000 --- a/Formula/pijul.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Pijul < Formula - desc "Patch-based distributed version control system" - homepage "https://pijul.org" - url "https://pijul.org/releases/pijul-0.11.0.tar.gz" - sha256 "e60793ab124e9054c1d5509698acbae507ebb2fab5364d964067bc9ae8b6b5e5" - - bottle do - sha256 "ed13c0d4328ed2c0fd47213410ccbc6c2ff63580d5219cdf26bb8e7c745b9f4a" => :mojave - sha256 "531e458e6d68d5dd6a32ae16a3b31a861c6cdcdec9450fbf4add7af65a341402" => :high_sierra - sha256 "63de9a8e4eef6dc1778192456db5b3470a2ef7cacb327128e032f188099a0107" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "libsodium" - depends_on "openssl" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix - - cd "pijul" do - system "cargo", "install", "--root", prefix, "--path", "." - end - end - - test do - system bin/"pijul", "init" - %w[haunted house].each { |f| touch testpath/f } - system bin/"pijul", "add", "haunted", "house" - system bin/"pijul", "record", "--all", - "--message='Initial Patch'", - "--author='Foo Bar '" - assert_equal "haunted\nhouse\n", shell_output("#{bin}/pijul ls") - end -end diff --git a/Formula/pike.rb b/Formula/pike.rb deleted file mode 100644 index 231c1c7f0d083..0000000000000 --- a/Formula/pike.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Pike < Formula - desc "Dynamic programming language" - homepage "https://pike.lysator.liu.se/" - url "https://pike.lysator.liu.se/pub/pike/latest-stable/Pike-v8.0.702.tar.gz" - sha256 "c47aad2e4f2c501c0eeea5f32a50385b46bda444f922a387a5c7754302f12a16" - - bottle do - sha256 "0985d750f7b4fe325483bcba5af44bfa93971c1660c27266b2597cabb77b2fdc" => :mojave - sha256 "432a58be844ff2f0f9ed535264ee959ab905db0299b1b516915ccd97366b81ab" => :high_sierra - sha256 "082ef34d2cbd6b9cb269be07f1ba8c29fe0121be59f17cf4ff71440a25af7ecc" => :sierra - end - - depends_on "gmp" - depends_on "libtiff" - depends_on "nettle" - depends_on "pcre" - - def install - ENV.append "CFLAGS", "-m64" - ENV.deparallelize - - system "make", "CONFIGUREARGS='--prefix=#{prefix} --without-bundles --with-abi=64'" - - system "make", "install", - "prefix=#{libexec}", - "exec_prefix=#{libexec}", - "share_prefix=#{libexec}/share", - "lib_prefix=#{libexec}/lib", - "man_prefix=#{libexec}/man", - "include_path=#{libexec}/include", - "INSTALLARGS=--traditional" - - bin.install_symlink "#{libexec}/bin/pike" - share.install_symlink "#{libexec}/share/man" - end - - test do - path = testpath/"test.pike" - path.write <<~EOS - int main() { - for (int i=0; i<10; i++) { write("%d", i); } - return 0; - } - EOS - - assert_equal "0123456789", shell_output("#{bin}/pike #{path}").strip - end -end diff --git a/Formula/piknik.rb b/Formula/piknik.rb deleted file mode 100644 index 3d3d867715a79..0000000000000 --- a/Formula/piknik.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Piknik < Formula - desc "Copy/paste anything over the network" - homepage "https://github.com/jedisct1/piknik" - url "https://github.com/jedisct1/piknik/archive/0.9.1.tar.gz" - sha256 "a682e16d937a5487eda5b0d0889ae114e228bd3c9beddd743cad40f1bad94448" - head "https://github.com/jedisct1/piknik.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "eee56739c24346b50d4fb7afa1285c87fbea135f3acd5fa90d1c2b9a81f84284" => :mojave - sha256 "1209dc34580813c42b1075174e9f78e049f43449845c63aa3f033e761ecf0bd0" => :high_sierra - sha256 "fffe6c2329ae0840061a464162703ec7cd26649cd985d1ff4de37315059b9357" => :sierra - sha256 "40b1bdb322e89f3c955519a3156f8ab9ed7aa3833f0887f1bb1ccf6224038de8" => :el_capitan - sha256 "c1bb1b4632aca54d93490f53b9142f7f808abec1cd6761418df63f11abeb80fe" => :yosemite - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - dir = buildpath/"src/github.com/jedisct1/" - dir.install Dir["*"] - ln_s buildpath/"src", dir - cd dir do - system "glide", "install" - system "go", "build", "-o", bin/"piknik", "." - (prefix/"etc/profile.d").install "zsh.aliases" => "piknik.sh" - prefix.install_metafiles - end - end - - def caveats; <<~EOS - In order to get convenient shell aliases, put something like this in #{shell_profile}: - . #{etc}/profile.d/piknik.sh - EOS - end - - plist_options :manual => "piknik -server" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/piknik - -server - - RunAtLoad - - - - EOS - end - - test do - conffile = testpath/"testconfig.toml" - - genkeys = shell_output("#{bin}/piknik -genkeys") - lines = genkeys.lines.grep(/\s+=\s+/).map { |x| x.gsub(/\s+/, " ").gsub(/#.*/, "") }.uniq - conffile.write lines.join("\n") - pid = fork do - exec "#{bin}/piknik", "-server", "-config", conffile - end - begin - IO.popen([{}, "#{bin}/piknik", "-config", conffile, "-copy"], "w+") do |p| - p.write "test" - end - IO.popen([{}, "#{bin}/piknik", "-config", conffile, "-move"], "r") do |p| - clipboard = p.read - assert_equal clipboard, "test" - end - ensure - Process.kill("TERM", pid) - Process.wait(pid) - conffile.unlink - end - end -end diff --git a/Formula/pillar.rb b/Formula/pillar.rb deleted file mode 100644 index 0e19ccf6c0a40..0000000000000 --- a/Formula/pillar.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Pillar < Formula - desc "Manage migrations for Cassandra data stores" - homepage "https://github.com/comeara/pillar" - url "https://github.com/comeara/pillar/archive/v2.3.0.tar.gz" - sha256 "f1bb1f2913b10529263b5cf738dd171b14aff70e97a3c9f654c6fb49c91ef16f" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f75ff57f647c404dbc95a7dc00330a5c9304d380437b7fd370795a1651fc3f7a" => :mojave - sha256 "821dac9ddc56019fb7542a7ea77b33e6d3985a483a7f4d52482081389864d276" => :high_sierra - sha256 "c84c1441dace68a35a68d280a3880ac4a62721480652474241b8d6a6b175742a" => :sierra - sha256 "1f2264e263268d479e04a584003127c833eec237a3514c607f7d8090de48084c" => :el_capitan - end - - depends_on "sbt" => :build - depends_on :java => "1.8" - - def install - inreplace "src/main/bash/pillar" do |s| - s.gsub! "$JAVA ", "`/usr/libexec/java_home --version 1.8`/bin/java " - s.gsub! "${PILLAR_ROOT}/lib/pillar.jar", "#{libexec}/pillar-assembly-#{version}.jar" - s.gsub! "${PILLAR_ROOT}/conf", "#{etc}/pillar-log4j.properties" - end - - system "sbt", "assembly" - - bin.install "src/main/bash/pillar" - etc.install "src/main/resources/pillar-log4j.properties" - libexec.install "target/scala-2.10/pillar-assembly-#{version}.jar" - end - - test do - assert_match "Missing parameter", shell_output("#{bin}/pillar 2>&1", 1) - end -end diff --git a/Formula/pilosa.rb b/Formula/pilosa.rb deleted file mode 100644 index 88bb66541f4be..0000000000000 --- a/Formula/pilosa.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Pilosa < Formula - desc "Distributed bitmap index that queries across data sets" - homepage "https://www.pilosa.com" - url "https://github.com/pilosa/pilosa/archive/v1.2.0.tar.gz" - sha256 "3497808a698c83ac4b29a6597fef2e78c59d4a2d5cda55bb03e94f9763c206c9" - - bottle do - cellar :any_skip_relocation - sha256 "17b2abd56288854a913b80e761baac608a2f841092fbeb519b2465a254b19c31" => :mojave - sha256 "e53f96b58a3d8cb0344d5ef5d133608a8291fc3d6b4e169b92d28914ae11dbc8" => :high_sierra - sha256 "ae71b47cc9f21ffbfd250cd40dcad8f312200dfa44852e54b9b517778d1e2de2" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/pilosa/pilosa").install buildpath.children - - cd "src/github.com/pilosa/pilosa" do - system "make", "build", "FLAGS=-o #{bin}/pilosa", "VERSION=v#{version}" - prefix.install_metafiles - end - end - - plist_options :manual => "pilosa server" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pilosa - server - - RunAtLoad - - KeepAlive - - SuccessfulExit - - - WorkingDirectory - #{var} - - - EOS - end - - test do - begin - server = fork do - exec "#{bin}/pilosa", "server" - end - sleep 0.5 - assert_match("Welcome. Pilosa is running.", shell_output("curl localhost:10101")) - ensure - Process.kill "TERM", server - Process.wait server - end - end -end diff --git a/Formula/pinboard-notes-backup.rb b/Formula/pinboard-notes-backup.rb deleted file mode 100644 index 0b56c1c47ace5..0000000000000 --- a/Formula/pinboard-notes-backup.rb +++ /dev/null @@ -1,33 +0,0 @@ -require "language/haskell" - -class PinboardNotesBackup < Formula - include Language::Haskell::Cabal - - desc "Efficiently back up the notes you've saved to Pinboard" - homepage "https://github.com/bdesham/pinboard-notes-backup" - url "https://github.com/bdesham/pinboard-notes-backup/archive/v1.0.3.tar.gz" - sha256 "bc3ab1a8a3d92fcbda86dd8b4756b035be89e1e5b50bdd61f998b67c89243ae3" - head "https://github.com/bdesham/pinboard-notes-backup.git" - - bottle do - cellar :any_skip_relocation - sha256 "a660948396cd9c35a0766c36257d25d537b7b6fca2b9661eb0360cd41c4f9a5f" => :mojave - sha256 "1138cbd05fc88464afb783d8509336fb8bb82495700b34199d5c16dee1cbac41" => :high_sierra - sha256 "77d4f8e3de1887bbae724aaaf2b72b7399adb8435153a192b7f39cabb8846c54" => :sierra - sha256 "357931ecd198a6fad58d6a9cf3d8543b1dbc3a2fd0ec60e1887725791a2e6c6b" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - install_cabal_package - end - - # A real test would require hard-coding someone's Pinboard API key here - test do - assert_match "TOKEN", shell_output("#{bin}/pnbackup Notes.sqlite 2>&1", 1) - output = shell_output("#{bin}/pnbackup -t token Notes.sqlite 2>&1", 1) - assert_match "statusCode = 500", output - end -end diff --git a/Formula/pincaster.rb b/Formula/pincaster.rb deleted file mode 100644 index 4680a1ac7e3ec..0000000000000 --- a/Formula/pincaster.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Pincaster < Formula - desc "Nosql database with a HTTP/JSON interface" - homepage "https://github.com/jedisct1/Pincaster" - url "https://download.pureftpd.org/pincaster/releases/pincaster-0.6.tar.bz2" - sha256 "c88be055ecf357b50b965afe70b5fc15dff295fbe2b6f0c473cf7e4a795a9f97" - revision 1 - - bottle do - rebuild 1 - sha256 "e1cdc55085e31ff199e4beb9726ae30100f3e729d116d8b10d730ae6ebfb07d2" => :mojave - sha256 "434c3551a2707f2197913a767c90ddb00ff5d542408379aeac623254d0594332" => :high_sierra - sha256 "77649ce6e3ab74ca1a58f15e7764ee467fc8de69a2b56f2fa03d1c5f0324e93d" => :sierra - sha256 "217521a03c99cdf721cefb339c4a1d5fb61b7838116b49bded875dbe2cfceb65" => :el_capitan - end - - depends_on "openssl" - - conflicts_with "libevent", :because => "Pincaster embeds libevent" - - def install - system "./configure", "--prefix=#{prefix}", "--with-yajl=embedded" - system "make", "install" - - inreplace "pincaster.conf" do |s| - s.gsub! "/var/db/pincaster/pincaster.db", "#{var}/db/pincaster/pincaster.db" - s.gsub! "# LogFileName /tmp/pincaster.log", "LogFileName #{var}/log/pincaster.log" - end - - etc.install "pincaster.conf" - (var/"db/pincaster/").mkpath - end - - plist_options :manual => "pincaster #{HOMEBREW_PREFIX}/etc/pincaster.conf" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pincaster - #{etc}/pincaster.conf - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/pincaster.log - StandardOutPath - #{var}/log/pincaster.log - - - EOS - end - - test do - cp etc/"pincaster.conf", testpath - inreplace "pincaster.conf", "/usr/local/var", testpath/"var" - (testpath/"var/db/pincaster/").mkpath - (testpath/"var/log").mkpath - - pid = fork do - exec "#{bin}/pincaster pincaster.conf" - end - sleep 2 - - begin - assert_match /pong":"pong"/, shell_output("curl localhost:4269/api/1.0/system/ping.json") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/pinentry-mac.rb b/Formula/pinentry-mac.rb deleted file mode 100644 index c70292cfe6e81..0000000000000 --- a/Formula/pinentry-mac.rb +++ /dev/null @@ -1,44 +0,0 @@ -class PinentryMac < Formula - desc "Pinentry for GPG on Mac" - homepage "https://github.com/GPGTools/pinentry-mac" - url "https://github.com/GPGTools/pinentry-mac/archive/v0.9.4.tar.gz" - sha256 "037ebb010377d3a3879ae2a832cefc4513f5c397d7d887d7b86b4e5d9a628271" - head "https://github.com/GPGTools/pinentry-mac.git" - - bottle do - cellar :any_skip_relocation - sha256 "6b2e8f260b2c9d2d7cd3f39516d7794656492cf7726a92a847aa86ba02d83179" => :mojave - sha256 "aa7a00ec594541e43a74cf7ae16cb05317d5b73c7b6b6647ca349584280eaad7" => :high_sierra - sha256 "3da6a88abbd4bb04eb2455d8e6998f4fc4db77c3f765d52b7eadf364e82aeaa7" => :sierra - sha256 "c3d508c96256c50b6a62f9e64fc4cb28810a910927c21f7defbe8af11a3c5961" => :el_capitan - sha256 "b96a51a263a9447101d4bb8dc4247f324531bd4fd96218f6e170edfc983a87f7" => :yosemite - sha256 "c2538b57edce2eb7ccc10a32e16ccfbbbe8e61c384c4db8d5a62b04d3815c0ed" => :mavericks - sha256 "0d6eb6b84a6389e208d4ec055d5f10f84b48bad94d00e9599b9aafb3dfaf71d8" => :mountain_lion - end - - depends_on :xcode => :build - - patch do - # patch header locations for macOS 10.14 - url "https://github.com/GPGTools/pinentry-mac/pull/7.patch?full_index=1" - sha256 "d4bcf2003fa1345ecb1809461140179a3737e8e03eb49d623435beb3c2f09b64" - end - - def install - system "make" - prefix.install "build/Release/pinentry-mac.app" - bin.write_exec_script "#{prefix}/pinentry-mac.app/Contents/MacOS/pinentry-mac" - end - - def caveats; <<~EOS - You can now set this as your pinentry program like - - ~/.gnupg/gpg-agent.conf - pinentry-program #{HOMEBREW_PREFIX}/bin/pinentry-mac - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/pinentry-mac --version") - end -end diff --git a/Formula/pinentry.rb b/Formula/pinentry.rb deleted file mode 100644 index b6ae3aeff06f5..0000000000000 --- a/Formula/pinentry.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Pinentry < Formula - desc "Passphrase entry dialog utilizing the Assuan protocol" - homepage "https://www.gnupg.org/related_software/pinentry/" - url "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.tar.bz2" - mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/pinentry/pinentry-1.1.0.tar.bz2" - sha256 "68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570" - revision 1 - - bottle do - cellar :any - sha256 "206708ea13875bc8197f7d066bc0cb36893bd95b9ecc7ba6102c2f33b0fbd6c4" => :mojave - sha256 "a1a0e526f622d7dc4e2b3e0dcde061dbb383050b8efbe424d916bf983ae66c74" => :high_sierra - sha256 "fd93c11a28d38ba1b78c7fe646f027f98ce29c08ba02c7a0e14e69f355614e35" => :sierra - sha256 "e8c6180d9d86f008d0d9cdf0bc9638f2c119bb426504955ecbd16ef6b108d01d" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libassuan" - depends_on "libgpg-error" - depends_on "gtk+" => :optional - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-pinentry-qt - --disable-pinentry-qt5 - --disable-pinentry-gnome3 - --disable-pinentry-tqt - --disable-pinentry-fltk - --enable-pinentry-tty - ] - - args << "--disable-pinentry-gtk2" if build.without? "gtk+" - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/pinentry", "--version" - system "#{bin}/pinentry-tty", "--version" - end -end diff --git a/Formula/pinfo.rb b/Formula/pinfo.rb deleted file mode 100644 index 2af9da20d7204..0000000000000 --- a/Formula/pinfo.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Pinfo < Formula - desc "User-friendly, console-based viewer for Info documents" - homepage "https://packages.debian.org/sid/pinfo" - url "https://mirrorservice.org/sites/distfiles.macports.org/pinfo/pinfo-0.6.10.tar.bz2" - sha256 "122180a0c23d11bc9eb569a4de3ff97d3052af96e32466fa62f2daf46ff61c5d" - - bottle do - sha256 "4a516a4f2b9857e15750d63f4d29bd6965c9e7e8f2f1972bf1413bc0a33c98e5" => :mojave - sha256 "157eb8d83e00de837d96ffaea390fc7ff0dae3998422349653fd1fb1aecd96b3" => :high_sierra - sha256 "ae8359dabf4e46535b4dcdb5edeab6ed7809a844143f57ce58eac7e030840bdc" => :sierra - sha256 "b16b4d3ad4086adbb409cc7b5122cb5002df29f4fcec79510ec1b6b1678139b0" => :el_capitan - sha256 "f17994059227efc06af65d1e7d7be4fcd3a0907c3f64ad58336df61e12dab847" => :yosemite - sha256 "8accf82707225645802b54c80e2db03b08fae54abe03d86cb94f9244606ce5a0" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gettext" - - def install - system "autoreconf", "--force", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/pinfo", "-h" - end -end diff --git a/Formula/pioneer.rb b/Formula/pioneer.rb deleted file mode 100644 index b699fca0beaf0..0000000000000 --- a/Formula/pioneer.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Pioneer < Formula - desc "Game of lonely space adventure" - homepage "https://pioneerspacesim.net/" - url "https://github.com/pioneerspacesim/pioneer/archive/20180203.tar.gz" - sha256 "19aa89e8ec0221b937b9279e0d4897b3016e0ce80858d03600d3e80cd7daa907" - head "https://github.com/pioneerspacesim/pioneer.git" - - bottle do - sha256 "2166f735db89aa995b06055b23e94592a00a634d9791524ddd2560d5ebc4bad9" => :mojave - sha256 "fe7123f2a61de3bc5a367fbad1f1a61d554c59e3526e7d79e319fefb46d977d3" => :high_sierra - sha256 "24482bf17e5d4294e760a121e93949aa8c2bf6930629995f8693d23a549f13ca" => :sierra - sha256 "eb188ce5b4aff9025a664e4276f64fba3521b581eb1f13df610b83ae924ddf5d" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "assimp" - depends_on "freetype" - depends_on "libpng" - depends_on "libsigc++" - depends_on "libvorbis" - depends_on "sdl2" - depends_on "sdl2_image" - - needs :cxx11 - - def install - ENV.cxx11 - ENV["PIONEER_DATA_DIR"] = "#{pkgshare}/data" - - system "./bootstrap" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-version=#{version}" - system "make", "install" - end - - test do - assert_equal "#{name} #{version}", shell_output("#{bin}/pioneer -v 2>&1").chomp - assert_equal "modelcompiler #{version}", shell_output("#{bin}/modelcompiler -v 2>&1").chomp - end -end diff --git a/Formula/pioneers.rb b/Formula/pioneers.rb deleted file mode 100644 index c6e96c73a41d5..0000000000000 --- a/Formula/pioneers.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Pioneers < Formula - desc "Settlers of Catan clone" - homepage "https://pio.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pio/Source/pioneers-15.5.tar.gz" - sha256 "3ee1415e7c48dc144fbdb99105a6ef8a818e67ed34e9d0f8e01224c3636cef0c" - - bottle do - sha256 "5fb252c345552e1d485f2dbc833cf47bf37037a0c71856c02fa05d2ec6a37f21" => :mojave - sha256 "e65fd2300b96f0339eb72d955b7a44c3d941d1275828a9f9a2fcfb31fe5f5f3b" => :high_sierra - sha256 "b93d58fda500c7774afe281663c69e09b846d59e5e8c44481195bbf715a39387" => :sierra - sha256 "e366345048bf9d0ea67815050233846432d6bb8ef15bb5efd92e78e2a2384d1e" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gtk+3" - depends_on "librsvg" # svg images for gdk-pixbuf - - fails_with :clang do - build 318 - cause "'#line directive requires a positive integer' argument in generated file" - end - - def install - # fix usage of echo options not supported by sh - inreplace "Makefile.in", /\becho/, "/bin/echo" - - # GNU ld-only options - inreplace Dir["configure{,.ac}"] do |s| - s.gsub!(/ -Wl\,--as-needed/, "") - s.gsub!(/ -Wl,-z,(relro|now)/, "") - end - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/pioneers-editor", "--help" - server = fork do - system "#{bin}/pioneers-server-console" - end - sleep 5 - Process.kill("TERM", server) - end -end diff --git a/Formula/pip-completion.rb b/Formula/pip-completion.rb deleted file mode 100644 index cb76b1e7169bf..0000000000000 --- a/Formula/pip-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class PipCompletion < Formula - desc "Bash completion for Pip" - homepage "https://github.com/ekalinin/pip-bash-completion" - url "https://github.com/ekalinin/pip-bash-completion.git", - :revision => "87983a927dc372b66952a6ef84ade70dd86450f9" - version "20161126" - head "https://github.com/ekalinin/pip-bash-completion.git" - - bottle :unneeded - - def install - bash_completion.install "pip" - end - - test do - assert_match "-F _pip", - shell_output("source #{bash_completion}/pip && complete -p pip") - end -end diff --git a/Formula/pipebench.rb b/Formula/pipebench.rb deleted file mode 100644 index fbad504f202c9..0000000000000 --- a/Formula/pipebench.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pipebench < Formula - desc "Measure the speed of STDIN/STDOUT communication" - homepage "http://www.habets.pp.se/synscan/programs.php?prog=pipebench" - # Upstream server behaves oddly: https://github.com/Homebrew/homebrew/issues/40897 - # url "http://www.habets.pp.se/synscan/files/pipebench-0.40.tar.gz" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/p/pipebench/pipebench_0.40.orig.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/p/pipebench/pipebench_0.40.orig.tar.gz" - sha256 "ca764003446222ad9dbd33bbc7d94cdb96fa72608705299b6cc8734cd3562211" - - bottle do - cellar :any_skip_relocation - sha256 "7489b10153744c61c74be048fb8c5d0acb4abae2f03437a0a633a312253c3345" => :mojave - sha256 "9ece6aaf7dcf0e1dbdbba28979ffbb6384f1d69aee8d194db2e009994c655cf2" => :high_sierra - sha256 "213e31962005a876277c6f8edd3c9cd8964c253496f7945d48aef7338c76277e" => :sierra - sha256 "353cabdaf04a41e2169c1e489cd038f9fbe7f33cfd24a5a0b3068449ccc3446d" => :el_capitan - sha256 "a999c7ba2978e60d38bdeec63d1f1a8b2667cb0d77d35c4da2e57212a37b85ac" => :yosemite - sha256 "c5b0805588d8a8d9047d30b9330dd0be0215bfe694ed662cf11fa84595bba85c" => :mavericks - sha256 "217b9b59e5592718c530e4843cb0dfdc830f9f8fc175766abfd3cade97c66c80" => :mountain_lion - end - - def install - system "make" - bin.install "pipebench" - man1.install "pipebench.1" - end - - test do - system "#{bin}/pipebench", "-h" - end -end diff --git a/Formula/pipemeter.rb b/Formula/pipemeter.rb deleted file mode 100644 index 61e2f7889f516..0000000000000 --- a/Formula/pipemeter.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Pipemeter < Formula - desc "Shows speed of data moving from input to output" - homepage "https://launchpad.net/pipemeter" - url "https://launchpad.net/pipemeter/trunk/1.1.3/+download/pipemeter-1.1.3.tar.gz" - sha256 "1ff952cb2127476ca9879f4b28fb92d6dabb0cc02db41f657025f7782fd50aaf" - - bottle do - cellar :any_skip_relocation - sha256 "2e8cc64e9e25c27c2c18680f22f59b68962740d04f6f80c9406ca915747ae990" => :mojave - sha256 "977077866b51a7c0620fe036431ea207b72d38bc383422d682dbfde40a90d6a6" => :high_sierra - sha256 "19c2d3933e5d0ac8e80559ae77ea09ad83bb8746ebf313d4cdd8a30374eadaa3" => :sierra - sha256 "bf99d50927a1277c1a481af0eea25314dfbd1449dbd1394368f7a933da367e9a" => :el_capitan - sha256 "cee0b494c5f7647d0c597e90dbc8be2c7b759d53a12cd87f89f9620b9260c3ac" => :yosemite - sha256 "a1bd1a5466eb44aeeba7ab2563f3bd34978d248deec50964624f985f066fe2bf" => :mavericks - sha256 "e09a0f2e40995592ab93cff23d12cd58b3ef911acc598e4fab2a5211058f3521" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--mandir=#{man}" - - # Fix the man1 directory location - inreplace "Makefile", "$(PREFIX)/man/man1", man1 - - bin.mkpath - man1.mkpath - system "make", "install" - end - - test do - assert_match "3.00B", pipe_output("#{bin}/pipemeter -r 2>&1 >/dev/null", "foo", 0) - end -end diff --git a/Formula/pipenv.rb b/Formula/pipenv.rb deleted file mode 100644 index 9414f177b494f..0000000000000 --- a/Formula/pipenv.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Pipenv < Formula - include Language::Python::Virtualenv - - desc "Python dependency management tool" - homepage "https://docs.pipenv.org/" - url "https://files.pythonhosted.org/packages/fd/e9/01822318551caa0d62a181ba3b10f0f3757bb1e270da97165bd52db92776/pipenv-2018.11.26.tar.gz" - sha256 "a673e606e8452185e9817a987572b55360f4d28b50831ef3b42ac3cab3fee846" - - bottle do - cellar :any_skip_relocation - sha256 "c50a41d34326330157b17971819a2731f3a96bd7a81144e6dd72bd3770ff4e33" => :mojave - sha256 "cc7d1a8abef1e4061611011f2096ef459c09215ea67d78f3c67891a7c6fe717c" => :high_sierra - sha256 "b9b4b4f7ddbeed6ba270eb400810e11c1903494747a9acfb8dba5e56f9fe1557" => :sierra - end - - depends_on "python" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz" - sha256 "6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/4e/8b/75469c270ac544265f0020aa7c4ea925c5284b23e445cf3aa8b99f662690/virtualenv-16.1.0.tar.gz" - sha256 "f899fafcd92e1150f40c8215328be38ff24b519cd95357fa6e78e006c7638208" - end - - resource "virtualenv-clone" do - url "https://files.pythonhosted.org/packages/14/2f/84b6a8e380439cdfdb71e0ced2a805a66e343ac540d3304bde6bc28fbb46/virtualenv-clone-0.3.0.tar.gz" - sha256 "b5cfe535d14dc68dfc1d1bb4ac1209ea28235b91156e2bba8e250d291c3fb4f8" - end - - def install - # Using the virtualenv DSL here because the alternative of using - # write_env_script to set a PYTHONPATH breaks things. - # https://github.com/Homebrew/homebrew-core/pull/19060#issuecomment-338397417 - venv = virtualenv_create(libexec, "python3") - venv.pip_install resources - venv.pip_install buildpath - - # `pipenv` needs to be able to find `virtualenv` and `pewtwo` on PATH. So we - # install symlinks for those scripts in `#{libexec}/tools` and create a - # wrapper script for `pipenv` which adds `#{libexec}/tools` to PATH. - (libexec/"tools").install_symlink libexec/"bin/pewtwo", libexec/"bin/pip", - libexec/"bin/virtualenv" - env = { - :PATH => "#{libexec}/tools:$PATH", - } - (bin/"pipenv").write_env_script(libexec/"bin/pipenv", env) - - output = Utils.popen_read("#{libexec}/bin/pipenv --completion") - (bash_completion/"pipenv").write output - end - - # Avoid relative paths - def post_install - lib_python_path = Pathname.glob(libexec/"lib/python*").first - lib_python_path.each_child do |f| - next unless f.symlink? - realpath = f.realpath - rm f - ln_s realpath, f - end - inreplace lib_python_path/"orig-prefix.txt", - Formula["python"].opt_prefix, Formula["python"].prefix.realpath - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - assert_match "Commands", shell_output("#{bin}/pipenv") - system "#{bin}/pipenv", "install", "requests" - system "#{bin}/pipenv", "install", "boto3" - assert_predicate testpath/"Pipfile", :exist? - assert_predicate testpath/"Pipfile.lock", :exist? - assert_match "requests", (testpath/"Pipfile").read - assert_match "boto3", (testpath/"Pipfile").read - end -end diff --git a/Formula/pipes-sh.rb b/Formula/pipes-sh.rb deleted file mode 100644 index 09f1059dd2493..0000000000000 --- a/Formula/pipes-sh.rb +++ /dev/null @@ -1,25 +0,0 @@ -class PipesSh < Formula - desc "Animated pipes terminal screensaver" - homepage "https://github.com/pipeseroni/pipes.sh" - url "https://github.com/pipeseroni/pipes.sh/archive/v1.3.0.tar.gz" - sha256 "532976dd8dc2d98330c45a8bcb6d7dc19e0b0e30bba8872dcce352361655a426" - head "https://github.com/pipeseroni/pipes.sh.git" - - bottle do - cellar :any_skip_relocation - sha256 "b78492e9f13a815dc97200b33c4e228292a4679eb6d048c1094c64aa46504879" => :mojave - sha256 "2793ad5fb825b4f805a4731c7028cbcb2ca5e9dd904133df0cce7481c5961322" => :high_sierra - sha256 "2793ad5fb825b4f805a4731c7028cbcb2ca5e9dd904133df0cce7481c5961322" => :sierra - sha256 "2793ad5fb825b4f805a4731c7028cbcb2ca5e9dd904133df0cce7481c5961322" => :el_capitan - end - - depends_on "bash" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_equal version.to_s, shell_output("#{bin}/pipes.sh -v").strip.split[-1] - end -end diff --git a/Formula/pit.rb b/Formula/pit.rb deleted file mode 100644 index 00225f6a10c03..0000000000000 --- a/Formula/pit.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Pit < Formula - desc "Project manager from hell (integrates with Git)" - homepage "https://github.com/michaeldv/pit" - head "https://github.com/michaeldv/pit.git" - - # upstream commit to allow PREFIX-ed installs - stable do - url "https://github.com/michaeldv/pit/archive/0.1.0.tar.gz" - sha256 "ddf78b2734c6dd3967ce215291c3f2e48030e0f3033b568eb080a22f041c7a0e" - - patch do - url "https://github.com/michaeldv/pit/commit/f64978d6c2628e1d4897696997b551f6b186d4bc.diff?full_index=1" - sha256 "87c0849b095597ca8cff3d2973a2cb15875d1c1637b6a12597224e9a1778e8e8" - end - - # upstream commit to fix a segfault when using absolute paths - patch do - url "https://github.com/michaeldv/pit/commit/e378582f4d04760d1195675ab034aac5d7908d8d.diff?full_index=1" - sha256 "142c3653e0d899511c0e774a0d0676980dec49f004f1c8f757e29ceddf2b116a" - end - - # upstream commit to return 0 on success instead of 1 - patch do - url "https://github.com/michaeldv/pit/commit/5d81148349cc442d81cc98779a4678f03f59df67.diff?full_index=1" - sha256 "6c5aebe47c771993eac5d8bfc6167a550e30b4abb8644dd2b72c3c473bbb21d4" - end - end - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "7c23637b9f925de09953cc5288e884ee9c08a5b62b2a16a3596cf6fcfc3c0677" => :mojave - sha256 "0fcb58f56565c207f8030853336ba313d93ba9bd3f1c09480a0ad37de1d961f2" => :high_sierra - sha256 "fd6ce87e3c42f5418c28e6a8a60184ac51b596bb59343de5523930980071103b" => :sierra - sha256 "20064d0b1496360f820f55aae90b0e4adf00a70cb4f607668a6beadd0ae11c08" => :el_capitan - sha256 "20d5d870a4a2cb926cfcdbf4ad8066281c0bc8c4318e7a74d316077c71fdf175" => :yosemite - sha256 "f7211a93b715fc54ebe2fde4aba9c6696eafef7133e551ec5b8f9899ba2b5b75" => :mavericks - end - - def install - bin.mkpath - - system "make" - system "make", "test" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/pit", "init" - end -end diff --git a/Formula/pius.rb b/Formula/pius.rb deleted file mode 100644 index 522fa1251ce72..0000000000000 --- a/Formula/pius.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Pius < Formula - include Language::Python::Virtualenv - - desc "PGP individual UID signer" - homepage "https://www.phildev.net/pius/" - url "https://github.com/jaymzh/pius/archive/v2.2.6.tar.gz" - sha256 "88727d2377db6d57e9832c0d923d42edd835ba1b14f1e455f90b024eba291921" - revision 1 - head "https://github.com/jaymzh/pius.git" - - bottle do - cellar :any_skip_relocation - sha256 "d879b8fa36572f39451238f0de4b83f243d74370e6cf5d0c908d1f758591adb8" => :mojave - sha256 "e113e0d49fd040b5c5a338e40dbbe541158f8d7fbd8de3d73a0d9f5b717969cc" => :high_sierra - sha256 "104cc7287e9a26087ac5060a79365cdf1a24cd69cd693e942bfa4a4d0b18e300" => :sierra - end - - depends_on "gnupg" - depends_on "python" - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - # Replace hardcoded gpg path (WONTFIX) - inreplace "libpius/constants.py", %r{/usr/bin/gpg2?}, "/usr/bin/env gpg" - virtualenv_install_with_resources - end - - def caveats; <<~EOS - The path to gpg is hardcoded in pius as `/usr/bin/env gpg`. - You can specify a different path by editing ~/.pius: - gpg-path=/path/to/gpg - EOS - end - - test do - system bin/"pius", "-T" - end -end diff --git a/Formula/pixman.rb b/Formula/pixman.rb deleted file mode 100644 index 2879f8cb29d81..0000000000000 --- a/Formula/pixman.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Pixman < Formula - desc "Low-level library for pixel manipulation" - homepage "https://cairographics.org/" - url "https://cairographics.org/releases/pixman-0.36.0.tar.gz" - sha256 "1ca19c8d4d37682adfbc42741d24977903fec1169b4153ec05bb690d4acf9fae" - - bottle do - cellar :any - sha256 "2102c5d59a61940603b8746cff968e3ee9aecf245c0682aa89f1b793547d5268" => :mojave - sha256 "104afb27acd98d592fdc50df39236fa592772a297aa70fc145bdd3019c471b62" => :high_sierra - sha256 "d793a8b455c39dd082f625c5cf7547eedca9aaa184a0629a580c7af28743589c" => :sierra - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-gtk", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) - { - pixman_color_t white = { 0xffff, 0xffff, 0xffff, 0xffff }; - pixman_image_t *image = pixman_image_create_solid_fill(&white); - pixman_image_unref(image); - return 0; - } - EOS - flags = %W[ - -I#{include}/pixman-1 - -L#{lib} - -lpixman-1 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/pixz.rb b/Formula/pixz.rb deleted file mode 100644 index a1b25f11453b8..0000000000000 --- a/Formula/pixz.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Pixz < Formula - desc "Parallel, indexed, xz compressor" - homepage "https://github.com/vasi/pixz" - url "https://github.com/vasi/pixz/releases/download/v1.0.6/pixz-1.0.6.tar.gz" - sha256 "c54a406dddc6c2226779aeb4b5d5b5649c1d3787b39794fbae218f7535a1af63" - revision 1 - head "https://github.com/vasi/pixz.git" - - bottle do - cellar :any - sha256 "1fba8335b8dd4b061f961ce2e5d03eafa550a7a92edc8b8a95b6129c55bd6b7b" => :mojave - sha256 "4c971701c82c6444dec792341b49b8ce38e88b2d9e3d549c12433d2fef37cd0a" => :high_sierra - sha256 "9d2f908cb1c21882c95f3c3284c9b4c1eea74c2b25d3ba6df9ad47fadbcc0813" => :sierra - end - - depends_on "asciidoc" => :build - depends_on "docbook" => :build - depends_on "pkg-config" => :build - depends_on "libarchive" - depends_on "xz" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libarchive"].opt_lib/"pkgconfig" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "a2x", "--doctype", "manpage", "--format", "manpage", "src/pixz.1.asciidoc" - man1.install "src/pixz.1" - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - testfile = testpath/"file.txt" - testfile.write "foo" - system "#{bin}/pixz", testfile, "#{testpath}/file.xz" - end -end diff --git a/Formula/pjproject.rb b/Formula/pjproject.rb deleted file mode 100644 index fc52c5f94623b..0000000000000 --- a/Formula/pjproject.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Pjproject < Formula - desc "C library for multimedia protocols such as SIP, SDP, RTP and more" - homepage "https://www.pjsip.org/" - url "https://www.pjsip.org/release/2.7.2/pjproject-2.7.2.tar.bz2" - sha256 "9c2c828abab7626edf18e04b041ef274bfaa86f99adf2c25ff56f1509e813772" - head "https://svn.pjsip.org/repos/pjproject/trunk" - - bottle do - cellar :any - sha256 "2aa9d3fa63190d540d0a97203d086a096d7806db0d3fdb2995b1f1cc85674998" => :mojave - sha256 "eec232d8fe6c5b4e05521a87a4bd1a5cb4fcc6a4f0a996ddaacc33bd2d93255f" => :high_sierra - sha256 "f7d12f6bcb2a628df0e87e4bbaffc368ca004ed6de12d11d4d019b080257a2d0" => :sierra - sha256 "52a55c49ef0d0d53abf447fd060e7eaf8bd1d10c8f6b419582c5e453634d5b61" => :el_capitan - end - - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "dep" - system "make" - system "make", "install" - - arch = Utils.popen_read("uname -m").chomp - rel = Utils.popen_read("uname -r").chomp - bin.install "pjsip-apps/bin/pjsua-#{arch}-apple-darwin#{rel}" => "pjsua" - end - - test do - assert_match version.to_s, shell_output("#{bin}/pjsua --version 2>&1") - end -end diff --git a/Formula/pk.rb b/Formula/pk.rb deleted file mode 100644 index a634b627f88a1..0000000000000 --- a/Formula/pk.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pk < Formula - desc "Field extractor command-line utility" - homepage "https://github.com/johnmorrow/pk" - url "https://github.com/johnmorrow/pk/releases/download/v1.0.2/pk-1.0.2.tar.gz" - sha256 "0431fe8fcbdfb3ac8ccfdef3d098d6397556f8905b7dec21bc15942a8fc5f110" - - bottle do - cellar :any_skip_relocation - sha256 "56a1d31b7c52fddecdd11dba3c394b91b38cdf91a9d294c24ae849fa7e27321a" => :mojave - sha256 "12cc1f5a82f305734355bc527d6dc936039a86f0b8888d226d0b36a9400d234f" => :high_sierra - sha256 "790f7e9670dcda15b7472264eea54666e7e34e8adb4343b3699ab87a60c9f3b1" => :sierra - sha256 "74c7822b2e3a74bc657d5e8490f184af120eddf9230695fe26dbb075391e10e6" => :el_capitan - sha256 "2e86bd1b33521a5856308b58ab35f7384988e9cb6506a4f3d9191ea38361235d" => :yosemite - sha256 "29897298823bb20019ab5f608e1e6f2c8189076a5c0097d5f09eb504e6e814bf" => :mavericks - end - - depends_on "argp-standalone" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "test" - system "make", "install" - end - - test do - assert_equal "B C D", pipe_output("#{bin}/pk 2..4", "A B C D E", 0).chomp - end -end diff --git a/Formula/pkcrack.rb b/Formula/pkcrack.rb deleted file mode 100644 index 2f50d646eb9b8..0000000000000 --- a/Formula/pkcrack.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pkcrack < Formula - desc "Implementation of an algorithm for breaking the PkZip cipher" - homepage "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html" - url "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-1.2.2.tar.gz" - sha256 "4d2dc193ffa4342ac2ed3a6311fdf770ae6a0771226b3ef453dca8d03e43895a" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "43571237e186fe6907bef85b5584772b80ed96b7336e55c47a1b18a41ef75278" => :mojave - sha256 "13c80200a6a1b96c74c590c595c1860447b04a6bb44d10210d82e0fa53e8f61b" => :high_sierra - sha256 "264358646b08985192cd06c9bc032c16296eb00198dd9852521e0cfdfe1703ef" => :sierra - sha256 "9b46e1c0097cc4024d4f5b182ac8fdbc27e3caec52874b19d570aba6f946fc10" => :el_capitan - sha256 "47f2ffa2e27f0dc5e6df45de7335e316a8ea83288153b274ae5d8e11c7157055" => :yosemite - end - - conflicts_with "libextractor", :because => "both install `extract` binaries" - - def install - # Fix "fatal error: 'malloc.h' file not found" - # Reported 18 Sep 2017 to conrad AT unix-ag DOT uni-kl DOT de - ENV.prepend "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/malloc" - - system "make", "-C", "src/" - bin.install Dir["src/*"].select { |f| File.executable? f } - end - - test do - shell_output("#{bin}/pkcrack", 1) - end -end diff --git a/Formula/pkcs11-helper.rb b/Formula/pkcs11-helper.rb deleted file mode 100644 index 2cea4afd39610..0000000000000 --- a/Formula/pkcs11-helper.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Pkcs11Helper < Formula - desc "Library to simplify the interaction with PKCS#11" - homepage "https://github.com/OpenSC/OpenSC/wiki/pkcs11-helper" - url "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-1.25.1/pkcs11-helper-1.25.1.tar.bz2" - sha256 "10dd8a1dbcf41ece051fdc3e9642b8c8111fe2c524cb966c0870ef3413c75a77" - head "https://github.com/OpenSC/pkcs11-helper.git" - - bottle do - cellar :any - rebuild 1 - sha256 "4bf7e16dffead843a4158c7d5d17faaa2e4bcc1c7cde292e8faffff4cec8de47" => :mojave - sha256 "321866c8bf6dc4ba2cd670971e71b87e49b6c6f5d039b3c765b1af3cf1b4926c" => :high_sierra - sha256 "87e74dd0bff5614912c69b8c071096b804ebe82003dcc9e92c15cc73bdce86cb" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - ] - - system "autoreconf", "--verbose", "--install", "--force" - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main() { - printf("Version: %08x", pkcs11h_getVersion ()); - return 0; - } - EOS - system ENV.cc, testpath/"test.c", "-I#{include}", "-L#{lib}", - "-lpkcs11-helper", "-o", "test" - system "./test" - end -end diff --git a/Formula/pkg-config.rb b/Formula/pkg-config.rb deleted file mode 100644 index 38987a30518c4..0000000000000 --- a/Formula/pkg-config.rb +++ /dev/null @@ -1,39 +0,0 @@ -class PkgConfig < Formula - desc "Manage compile and link flags for libraries" - homepage "https://freedesktop.org/wiki/Software/pkg-config/" - url "https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/pkg-config-0.29.2.tar.gz" - mirror "http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/pkgconfig/pkg-config-0.29.2.tar.gz" - sha256 "6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591" - - bottle do - sha256 "85e5bbffb3424f22cd1bf54b69161110481bab100f9abea54e0a0f00fcf761b9" => :mojave - sha256 "f1b29fb5388dccab0fcaf665ab43d308ee51816b24262417bf83a686b6e308ae" => :high_sierra - sha256 "8eb723bfc03cd468d779d54d015d47d2e8ab1dd4d35e595ab4abaca8833b3277" => :sierra - sha256 "93f044f166bcbd84db14133ee4f56104031c65409cfd2801c7ac0d182936dc78" => :el_capitan - sha256 "d9ccc19f1a55919408a1b27260b0404aa36dc6782a4a5964e6fd8409abf3b830" => :yosemite - end - - def install - pc_path = %W[ - #{HOMEBREW_PREFIX}/lib/pkgconfig - #{HOMEBREW_PREFIX}/share/pkgconfig - /usr/local/lib/pkgconfig - /usr/lib/pkgconfig - #{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version} - ].uniq.join(File::PATH_SEPARATOR) - - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--disable-host-tool", - "--with-internal-glib", - "--with-pc-path=#{pc_path}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/pkg-config", "--libs", "libpcre" - end -end diff --git a/Formula/pkgdiff.rb b/Formula/pkgdiff.rb deleted file mode 100644 index 24e82c32eec36..0000000000000 --- a/Formula/pkgdiff.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Pkgdiff < Formula - desc "Tool for analyzing changes in software packages (e.g. RPM, DEB, TAR.GZ)" - homepage "https://lvc.github.io/pkgdiff/" - url "https://github.com/lvc/pkgdiff/archive/1.7.2.tar.gz" - sha256 "d0ef5c8ef04f019f00c3278d988350201becfbe40d04b734defd5789eaa0d321" - - bottle do - cellar :any_skip_relocation - sha256 "8de5a84d08a9bc063313a7319be93cbaba8b4e293e2604552e2771d9f9c93d81" => :mojave - sha256 "28ed130d50f00ec5617be39a8bc627591d310d47e8023844b54f27fbf0daede8" => :high_sierra - sha256 "fc92f55909e0499c1d0054100183567465603ac85fa9f8b20d5ab1d84e36ceae" => :sierra - sha256 "18895054433b4b050c3a863306c62a910be7fa4e36b0020a742c5c7541c0df65" => :el_capitan - sha256 "c566b1a44ed89a1b7b3547adf0a0e0fa784174e1acc4a1dd46a240ea6d09bbff" => :yosemite - sha256 "a9ccac49037c91c63af967e67256daa24e878f38fd17959ba30fffb8e1fcc2a2" => :mavericks - end - - depends_on "binutils" - depends_on "gawk" - depends_on "wdiff" - - def install - system "perl", "Makefile.pl", "--install", "--prefix=#{prefix}" - end - - test do - system bin/"pkgdiff" - end -end diff --git a/Formula/pktanon.rb b/Formula/pktanon.rb deleted file mode 100644 index cef1273ab0b65..0000000000000 --- a/Formula/pktanon.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Pktanon < Formula - desc "Packet trace anonymization" - homepage "https://www.tm.uka.de/software/pktanon/index.html" - url "https://www.tm.uka.de/software/pktanon/download/pktanon-1.4.0-dev.tar.gz" - sha256 "db3f437bcb8ddb40323ddef7a9de25a465c5f6b4cce078202060f661d4b97ba3" - revision 2 - - bottle do - cellar :any - sha256 "8d5bb1d5ac9f2cc9bcf73d45b22a0c724e42da26ac0dccc6c66c2e2a4e8a024d" => :mojave - sha256 "5a3c101ebf3a3bb948c6005977367da0f72fa17fe2ffc3c410b8428325a140f8" => :high_sierra - sha256 "20773e51330880065df3de1c5e80107f1f20cfe53c4735be80b39d9e1d0cca41" => :sierra - end - - depends_on "boost" - depends_on "xerces-c" - - def install - # fix compile failure caused by undefined function 'sleep'. - inreplace "src/Timer.cpp", %Q(#include "Timer.h"\r\n), - %Q(#include "Timer.h"\r\n#include "unistd.h"\r\n) - - # include the boost system library to resolve compilation errors - ENV["LIBS"] = "-lboost_system-mt" - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/pktanon", "--version" - end -end diff --git a/Formula/pla.rb b/Formula/pla.rb deleted file mode 100644 index ac321e098cfd0..0000000000000 --- a/Formula/pla.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Pla < Formula - desc "Tool for building Gantt charts in PNG, EPS, PDF or SVG format" - homepage "https://www.arpalert.org/pla.html" - url "https://www.arpalert.org/src/pla-1.2.tar.gz" - sha256 "c2f1ce50b04032abf7f88ac07648ea40bed2443e86e9f28f104d341965f52b9c" - - bottle do - cellar :any - sha256 "9d5e86767de6c9a2ac741e9edd32d053da5fde96563446a63d1b0475f4da595a" => :mojave - sha256 "af3163cf8322d872694753f3d3352384fb9c8ce923c66f7be82f50bdbbe734bc" => :high_sierra - sha256 "c6edebbefcf192ea4bcad704ca5b4c27157f77b4a47e3a993ac2a61e7165c13c" => :sierra - sha256 "3fd0d11d1bdfa24e93bf94cb854e28382307c291b25994c82a2a8c1a64ce5072" => :el_capitan - sha256 "308920e8bf8642826cd973eaa63e22f0fc3dec43a0152485d358ba575638291f" => :yosemite - sha256 "df4b500589672dc1c415866b7da4c678621858f48cbac2cab5765c2b4fb1857d" => :mavericks - sha256 "81969ccdf4fe754600e348d7aa34243ccf86d4ee4bcaf85b12fa5b5df99d9ec7" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "cairo" - - def install - system "make" - bin.install "pla" - end - - test do - (testpath/"test.pla").write <<~EOS - [4] REF0 Install des serveurs - color #8cb6ce - child 1 - child 2 - child 3 - - [1] REF0 Install 1 - start 2010-04-08 01 - duration 24 - color #8cb6ce - dep 2 - dep 6 - EOS - system "#{bin}/pla", "-i", "#{testpath}/test.pla", "-o test" - end -end diff --git a/Formula/plan9port.rb b/Formula/plan9port.rb deleted file mode 100644 index ab9de91ba57ec..0000000000000 --- a/Formula/plan9port.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Plan9port < Formula - desc "Many Plan 9 programs ported to UNIX-like operating systems" - homepage "https://swtch.com/plan9port/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/plan9port/plan9port-20140306.tgz" - sha256 "cbb826cde693abdaa2051c49e7ebf75119bf2a4791fe3b3229f1ac36a408eaeb" - head "https://github.com/9fans/plan9port.git" - - bottle do - cellar :any_skip_relocation - sha256 "bdcaa55afb6e28c4f9f1540e9e1d81d111f2ed9f85db76ca4705ad1d610e57e2" => :mojave - sha256 "5c2efeb97b9d5a9171fc41e862223682a5b86a9af064a13381d10624bdf32d04" => :high_sierra - sha256 "5f2d48d2f3a732795c8ab050bb705caf59a18ee86d3d89c143b22533a46bd71c" => :sierra - sha256 "eb56faa4c63a522e34ba609fc0d4eb5af9b22715c0915629776129eb64d8625f" => :el_capitan - sha256 "86fd2ed15a0fe79927c04a064222f88455bfc0e72bc1f97576e2962b11a70cc8" => :yosemite - sha256 "ef0059997655128f6b41faa1023b37a071ff9976f4c94d3b3bd706be65177aa1" => :mavericks - end - - depends_on :x11 => :optional - - def install - ENV["PLAN9_TARGET"] = libexec - - # Make macOS system fonts available to Plan 9 - (buildpath/"LOCAL.config").write "FONTSRV=fontsrv" if build.with? "x11" - - system "./INSTALL" - libexec.install Dir["*"] - bin.install_symlink libexec/"bin/9" - prefix.install Dir[libexec/"mac/*.app"] - end - - def caveats; <<~EOS - In order not to collide with OSX system binaries, the Plan 9 binaries have - been installed to #{opt_libexec}/bin. - To run the Plan 9 version of a command simply call it through the command - "9", which has been installed into the Homebrew prefix bin. For example, - to run Plan 9's ls run: - # 9 ls - EOS - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main(void) { - return printf("Hello World\\n"); - } - EOS - system bin/"9", "9c", "test.c" - system bin/"9", "9l", "-o", "test", "test.o" - assert_equal "Hello World\n", shell_output("./test", 1) - end -end diff --git a/Formula/planck.rb b/Formula/planck.rb deleted file mode 100644 index 83dfcac1242dd..0000000000000 --- a/Formula/planck.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Planck < Formula - desc "Stand-alone ClojureScript REPL" - homepage "http://planck-repl.org/" - url "https://github.com/planck-repl/planck/archive/2.19.0.tar.gz" - sha256 "bb33984f986a7ac68b331cfd64bd0f9e41daf5391b1a36e158e15d94d886dd04" - revision 1 - head "https://github.com/planck-repl/planck.git" - - bottle do - cellar :any - sha256 "eabb90e5ef6d0fbb74df0dd4cfc5160751ed1cef85e09a68dace21dde9e268e4" => :mojave - sha256 "a337e3c890f99a82723409f1c52f2bf3b83b77bf5a910e75f80e9cb93b39ccc6" => :high_sierra - sha256 "258f24567d4c5a791a0162c3536de69c52eab990362c704ec9497290a9240776" => :sierra - end - - depends_on "clojure" => :build - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on :xcode => :build - depends_on "icu4c" - depends_on "libzip" - depends_on :macos => :mavericks - - def install - system "./script/build-sandbox" - bin.install "planck-c/build/planck" - bin.install "planck-sh/plk" - man1.install Dir["planck-man/*.1"] - end - - test do - assert_equal "0", shell_output("#{bin}/planck -e '(- 1 1)'").chomp - end -end diff --git a/Formula/plank.rb b/Formula/plank.rb deleted file mode 100644 index b8e7692849bb6..0000000000000 --- a/Formula/plank.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Plank < Formula - desc "Framework for generating immutable model objects" - homepage "https://pinterest.github.io/plank/" - url "https://github.com/pinterest/plank/archive/v1.4.1.tar.gz" - sha256 "021889470c1568364fb12e3c704ab98e74c5992749a244a1ef785dd870cad57b" - - bottle do - cellar :any_skip_relocation - sha256 "a8ef5d8f039de6c40a87101d69a0fea96a151008fc72796be3d1eb1598d465c8" => :mojave - sha256 "b5731e67f8155038764e927d6363c16f04cce69edc3c25bff78d9c39beaae4f9" => :high_sierra - sha256 "374262fdc60398fdf217c8bb2e458641ce683eb5dc6c5979cea84f0a5a4adc82" => :sierra - end - - depends_on :xcode => ["9.0", :build] - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"pin.json").write <<~EOS - { - "id": "pin.json", - "title": "pin", - "description" : "Schema definition of a Pin", - "$schema": "https://json-schema.org/schema#", - "type": "object", - "properties": { - "id": { "type": "string" }, - "link": { "type": "string", "format": "uri"} - } - } - EOS - system "#{bin}/plank", "--lang", "objc,flow", "--output_dir", testpath, "pin.json" - assert_predicate testpath/"Pin.h", :exist?, "[ObjC] Generated file does not exist" - assert_predicate testpath/"PinType.js", :exist?, "[Flow] Generated file does not exist" - end -end diff --git a/Formula/plantuml.rb b/Formula/plantuml.rb deleted file mode 100644 index f5f63b6c5479f..0000000000000 --- a/Formula/plantuml.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Plantuml < Formula - desc "Draw UML diagrams" - homepage "https://plantuml.com/" - url "https://downloads.sourceforge.net/project/plantuml/1.2018.14/plantuml.1.2018.14.jar" - sha256 "1e9884f75194e955d7c3cbd47675985e1aaae3a9d9e79ce0f170f0226ecc9a2a" - version_scheme 1 - - bottle :unneeded - - depends_on "graphviz" - depends_on :java - - def install - jar = "plantuml.jar" - libexec.install "plantuml.#{version}.jar" => jar - (bin/"plantuml").write <<~EOS - #!/bin/bash - GRAPHVIZ_DOT="#{Formula["graphviz"].opt_bin}/dot" exec java -jar #{libexec}/#{jar} "$@" - EOS - chmod 0555, bin/"plantuml" - end - - test do - system bin/"plantuml", "-testdot" - end -end diff --git a/Formula/platformio.rb b/Formula/platformio.rb deleted file mode 100644 index d5299140cbeca..0000000000000 --- a/Formula/platformio.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Platformio < Formula - include Language::Python::Virtualenv - - desc "Ecosystem for IoT development (Arduino and ARM mbed compatible)" - homepage "https://platformio.org/" - url "https://files.pythonhosted.org/packages/8c/d0/99da2ec4a2f0f2ca3a6122a29c20a8157fcfffabce2e4227744f9cb3e5d6/platformio-3.6.3.tar.gz" - sha256 "5b339df778f846392e37b49d98a44ef561425ba811a1e51c2b2e1b4445e3ce03" - - bottle do - cellar :any_skip_relocation - sha256 "f6672bce44fcb4512a3c85587573d36c5553b844c8f6be0129ff593e3ed6e517" => :mojave - sha256 "0b287bbbc021dd041b76d25c84728eada32d41e2c948552069818f784959d503" => :high_sierra - sha256 "097c18ade34fd2d4f86242b7978a564c75df380d573e96157680294a23f229da" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - resource "bottle" do - url "https://files.pythonhosted.org/packages/38/6d/593c8338851a249c9981322bab2bcffade1101127dce27d4c682ed234558/bottle-0.12.15.tar.gz" - sha256 "b5529f8956682320b90f518041269784a37770d5fcc1ae6d70d288e9fc060fbc" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/b7/34/a496632c4fb6c1ee76efedf77bb8d28b29363d839953d95095b12defe791/click-5.1.tar.gz" - sha256 "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "pyserial" do - url "https://files.pythonhosted.org/packages/cc/74/11b04703ec416717b247d789103277269d567db575d2fd88f25d9767fe3d/pyserial-3.4.tar.gz" - sha256 "6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz" - sha256 "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e" - end - - resource "semantic_version" do - url "https://files.pythonhosted.org/packages/72/83/f76958017f3094b072d8e3a72d25c3ed65f754cc607fdb6a7b33d84ab1d5/semantic_version-2.6.0.tar.gz" - sha256 "2a4328680073e9b243667b201119772aefc5fc63ae32398d6afafff07c4f54c0" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"platformio" - system bin/"pio" - system bin/"piodebuggdb", "--help" - end -end diff --git a/Formula/platypus.rb b/Formula/platypus.rb deleted file mode 100644 index 3aa977e0fae91..0000000000000 --- a/Formula/platypus.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Platypus < Formula - desc "Create macOS applications from {Perl,Ruby,sh,Python} scripts" - homepage "https://sveinbjorn.org/platypus" - url "https://sveinbjorn.org/files/software/platypus/platypus5.2.src.zip" - sha256 "0c0201804e13c09a33fe95ba715ed995872d35d3cdfa2cb694cf378980ed4c08" - head "https://github.com/sveinbjornt/Platypus.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "968362767410bc2055c0847543a95ba8a272a29015bd7c118ac47feeca12b649" => :mojave - sha256 "598660d8723204958b3f891597408e24ef0ee1b6914037e9759949d20491290c" => :high_sierra - sha256 "9b3b01e6a10711db553f8d59589701d1763f5d178a7c87496b0bc02d94a24f7b" => :sierra - end - - depends_on :xcode => ["8.0", :build] - - def install - xcodebuild "SYMROOT=build", "DSTROOT=#{buildpath}/dst", - "-project", "Platypus.xcodeproj", - "-target", "platypus", - "-target", "ScriptExec", - "clean", - "install" - - man1.install "CommandLineTool/man/platypus.1" - bin.install "dst/platypus_clt" => "platypus" - - cd "build/UninstalledProducts/macosx/ScriptExec.app/Contents" do - pkgshare.install "Resources/MainMenu.nib", "MacOS/ScriptExec" - end - end - - def caveats; <<~EOS - This formula only installs the command-line Platypus tool, not the GUI. - - The GUI can be downloaded from Platypus' website: - https://sveinbjorn.org/platypus - - Alternatively, install with Homebrew Cask: - brew cask install platypus - EOS - end - - test do - system "#{bin}/platypus", "-v" - end -end diff --git a/Formula/plenv.rb b/Formula/plenv.rb deleted file mode 100644 index 778fae408107a..0000000000000 --- a/Formula/plenv.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Plenv < Formula - desc "Perl binary manager" - homepage "https://github.com/tokuhirom/plenv" - url "https://github.com/tokuhirom/plenv/archive/2.3.0.tar.gz" - sha256 "49ea2770627f40d1fafccf03bf459839bf1d005b3d8c3c5772f0242c84423876" - head "https://github.com/tokuhirom/plenv.git" - - bottle :unneeded - - def install - prefix.install "bin", "plenv.d", "completions", "libexec" - - # Run rehash after installing. - system "#{bin}/plenv", "rehash" - end - - def caveats; <<~EOS - To enable shims add to your profile: - if which plenv > /dev/null; then eval "$(plenv init -)"; fi - With zsh, add to your .zshrc: - if which plenv > /dev/null; then eval "$(plenv init - zsh)"; fi - With fish, add to your config.fish - if plenv > /dev/null; plenv init - | source ; end - EOS - end - - test do - system "#{bin}/plenv", "--version" - end -end diff --git a/Formula/plod.rb b/Formula/plod.rb deleted file mode 100644 index 9602a5dbad4a8..0000000000000 --- a/Formula/plod.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Plod < Formula - desc "Keep an online journal of what you're working on" - homepage "http://www.deer-run.com/~hal/" - url "http://www.deer-run.com/~hal/plod/plod.shar" - version "1.9" - sha256 "1b7b8267c41b11c2f5413a8d6850099e0547b7506031b0c733121ed5e8d182f5" - - bottle :unneeded - - def install - system "sh", "plod.shar" - - pager = ENV["PAGER"] || "/usr/bin/less" - editor = ENV["EDITOR"] || "/usr/bin/emacs" - visual = ENV["VISUAL"] || editor - - inreplace "plod" do |s| - s.gsub! "#!/usr/local/bin/perl", "#!/usr/bin/env perl" - s.gsub! '"/bin/crypt"', "undef" - s.gsub! "/usr/local/bin/less", pager - s.gsub! '$EDITOR = "/usr/local/bin/emacs"', "$EDITOR = \"#{editor}\"" - s.gsub! '$VISUAL = "/usr/local/bin/emacs"', "$VISUAL = \"#{visual}\"" - end - man1.install "plod.man" => "plod.1" - bin.install "plod" - prefix.install "plod.el.v1", "plod.el.v2" - - (prefix/"plodrc").write <<~EOS - # Uncomment lines and change their values to override defaults. - # man plod for further details. - # - # $PROMPT = 0; - # $CRYPTCMD = undef; - # $TMPFILE = "/tmp/plodtmp$$"; - # $HOME = (getpwuid($<))[7]; - # $EDITOR = "#{editor}"; - # $VISUAL = "#{visual}"; - # $PAGER = "#{pager}"; - # $LINES = 24; - # $LOGDIR = "$HOME/.logdir"; - # $LOGFILE = sprintf("%04d%02d", $YY+1900, $MM); - # $BACKUP = ".plod$$.bak"; - # $DEADLOG = "dead.log"; - # $STAMP = sprintf("%02d/%02d/%04d, %02d:%02d --", $MM, $DD, $YY+1900, $hh, $mm); - # $PREFIX = ''; - # $SUFFIX = ''; - # $SEPARATOR = '-----'; - EOS - end - - def caveats - <<~EOS - Emacs users may want to peruse the two available plod modes. They've been - installed at: - - #{prefix}/plod.el.v1 - #{prefix}/plod.el.v2 - - Certain environment variables can be customized. - - cp #{prefix}/plodrc ~/.plodrc - - See man page for details. - EOS - end - - test do - ENV["LOGDIR"] = testpath/".logdir" - system "#{bin}/plod", "this", "is", "Homebrew" - assert File.directory? "#{testpath}/.logdir" - assert_match(/this is Homebrew/, shell_output("#{bin}/plod -P")) - end -end diff --git a/Formula/ploticus.rb b/Formula/ploticus.rb deleted file mode 100644 index ce587435908bb..0000000000000 --- a/Formula/ploticus.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Ploticus < Formula - desc "Scriptable plotting and graphing utility" - homepage "https://ploticus.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ploticus/ploticus/2.42/ploticus242_src.tar.gz" - version "2.42" - sha256 "3f29e4b9f405203a93efec900e5816d9e1b4381821881e241c08cab7dd66e0b0" - revision 1 - - bottle do - sha256 "b9ba4732a13508d6aba81b81c31a71ca65543fbcda431d57263f28255072087f" => :mojave - sha256 "bfdaab8cdaf7c0c97e02caea8fa79e76e7ac85704d21591ced4a59914b4c5c26" => :high_sierra - sha256 "06456d2606a86782cd75ee63f67e738e7ce33271902d3f4e7807d2061c0a5f4a" => :sierra - sha256 "088f4ba0eea75ed4b401f94331b70dd64e23f02fa0d95731fbaccf6904c8cea5" => :el_capitan - sha256 "b15be72d80abf16b348c625945de811bf1fb411b1cb329adc701bc04cfb41dd8" => :yosemite - sha256 "c2b4982907f4a9de66973cf55729fed03f17c42704593d6dbcce955ce53cd9bb" => :mavericks - end - - depends_on "libpng" - - def install - # Use alternate name because "pl" conflicts with macOS "pl" utility - args=["INSTALLBIN=#{bin}", - "EXE=ploticus"] - inreplace "src/pl.h", /#define\s+PREFABS_DIR\s+""/, "#define PREFABS_DIR \"#{pkgshare}\"" - system "make", "-C", "src", *args - # Required because the Makefile assumes INSTALLBIN dir exists - bin.mkdir - system "make", "-C", "src", "install", *args - pkgshare.install Dir["prefabs/*"] - end - - def caveats; <<~EOS - Ploticus prefabs have been installed to #{opt_pkgshare} - EOS - end - - test do - assert_match "ploticus 2.", shell_output("#{bin}/ploticus -version 2>&1", 1) - - (testpath/"test.in").write <<~EOS - #proc areadef - rectangle: 1 1 4 2 - xrange: 0 5 - yrange: 0 100 - - #proc xaxis: - stubs: text - Africa - Americas - Asia - Europe,\\nAustralia,\\n\& Pacific - EOS - system "#{bin}/ploticus", "-f", "test.in", "-png", "-o", "test.png" - assert_match "PNG image data", shell_output("file test.png") - end -end diff --git a/Formula/plotutils.rb b/Formula/plotutils.rb deleted file mode 100644 index f9754ed989189..0000000000000 --- a/Formula/plotutils.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Plotutils < Formula - desc "C/C++ function library for exporting 2-D vector graphics" - homepage "https://www.gnu.org/software/plotutils/" - url "https://ftp.gnu.org/gnu/plotutils/plotutils-2.6.tar.gz" - mirror "https://ftpmirror.gnu.org/plotutils/plotutils-2.6.tar.gz" - sha256 "4f4222820f97ca08c7ea707e4c53e5a3556af4d8f1ab51e0da6ff1627ff433ab" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "96a618ea8123f08d676b0db38c1c3b93dc8f707c742e97442b74650c2dd8e4c5" => :mojave - sha256 "00796c7f6aa36203eb0fd919ef4f096c6016d3c5973b2032328c95c87b354d92" => :high_sierra - sha256 "b63f4f051452f8fd9b5ddb50f9d574122c2277c9778e1a56c3f2d59e55c3da73" => :sierra - sha256 "b734cdcbc7ce11c4a716bc96ee7671f3883a5d41dadceac28d994ad2c20292f9" => :el_capitan - sha256 "fae89f252628820ac83a0896fa022b1c08cacca6e6234b2fb23c10554f424fd3" => :yosemite - sha256 "e51b4b5c367e8f9ec533f54e20c9df0b887818ee35c4cde19ba8feb73d4d2ff2" => :mavericks - sha256 "f77398849e9a064feee52712c8c71a60e07dbc7a2d00967ed584e046ff4bc4d7" => :mountain_lion - end - - depends_on "libpng" - depends_on :x11 => :optional - - def install - # Fix usage of libpng to be 1.5 compatible - inreplace "libplot/z_write.c", "png_ptr->jmpbuf", "png_jmpbuf (png_ptr)" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-libplotter - ] - - args << "--with-x" if build.with? "x11" - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - assert pipe_output("#{bin}/graph -T ps", "0.0 0.0\n1.0 0.2\n").start_with?("") - end -end diff --git a/Formula/plowshare.rb b/Formula/plowshare.rb deleted file mode 100644 index a72681e88967e..0000000000000 --- a/Formula/plowshare.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Plowshare < Formula - desc "Download/upload tool for popular file sharing websites" - homepage "https://github.com/mcrapet/plowshare" - url "https://github.com/mcrapet/plowshare/archive/v2.1.7.tar.gz" - sha256 "c17d0cc1b3323f72b2c1a5b183a9fcef04e8bfc53c9679a4e1523642310d22ad" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "b9099a281503dde8b677db021242fa0e495d036ce2e9b13838badf8ff17caff9" => :mojave - sha256 "fe966c7db7ceb08f5d9c522c68f332eb87927dccf71b53947824d541ae889904" => :high_sierra - sha256 "fe966c7db7ceb08f5d9c522c68f332eb87927dccf71b53947824d541ae889904" => :sierra - sha256 "fe966c7db7ceb08f5d9c522c68f332eb87927dccf71b53947824d541ae889904" => :el_capitan - end - - depends_on "bash" - depends_on "coreutils" - depends_on "feh" - depends_on "gnu-sed" - depends_on "libcaca" - depends_on "recode" - depends_on "spidermonkey" - - def install - system "make", "install", "patch_gnused", "GNU_SED=#{Formula["gnu-sed"].opt_bin}/gsed", "PREFIX=#{prefix}" - end -end diff --git a/Formula/plplot.rb b/Formula/plplot.rb deleted file mode 100644 index 2a2d23c74fd3c..0000000000000 --- a/Formula/plplot.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Plplot < Formula - desc "Cross-platform software package for creating scientific plots" - homepage "https://plplot.sourceforge.io" - url "https://downloads.sourceforge.net/project/plplot/plplot/5.14.0%20Source/plplot-5.14.0.tar.gz" - sha256 "331009037c9cad9fcefacd7dbe9c7cfae25e766f5590f9efd739a294c649df97" - revision 1 - - bottle do - sha256 "d38e07c8b56d1f5eb392f655f2420eac9f6a8c4f94312499d17796c0f5e00e5b" => :mojave - sha256 "d912ca0e40535d001e8303b5b7e55306191c25f40aeb3e32469547f4feebb0a5" => :high_sierra - sha256 "d129f9e4341a5a0040cd0e7ecedfaf8d288269cbb423df89bf0e0ec559530131" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "freetype" - depends_on "gcc" # for gfortran - depends_on "pango" - depends_on :java => :optional - depends_on :x11 => :optional - - def install - args = std_cmake_args + %w[ - -DPL_HAVE_QHULL=OFF - -DENABLE_ada=OFF - -DENABLE_d=OFF - -DENABLE_qt=OFF - -DENABLE_lua=OFF - -DENABLE_tk=OFF - -DENABLE_python=OFF - -DENABLE_tcl=OFF - -DPLD_xcairo=OFF - -DPLD_wxwidgets=OFF - -DENABLE_wxwidgets=OFF - -DENABLE_DYNDRIVERS=OFF - ] - args << "-DENABLE_java=OFF" if build.without? "java" - args << "-DPLD_xwin=OFF" if build.without? "x11" - - mkdir "plplot-build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - - # fix rpaths - cd (lib.to_s) do - Dir["*.dylib"].select { |f| File.ftype(f) == "file" }.each do |f| - MachO::Tools.dylibs(f).select { |d| d.start_with?("@rpath") }.each do |d| - d_new = d.sub("@rpath", opt_lib.to_s) - MachO::Tools.change_install_name(f, d, d_new) - end - end - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(int argc, char *argv[]) { - plparseopts(&argc, argv, PL_PARSE_FULL); - plsdev("extcairo"); - plinit(); - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-I#{include}/plplot", "-L#{lib}", - "-lcsirocsa", "-lm", "-lplplot", "-lqsastime" - system "./test" - end -end diff --git a/Formula/plustache.rb b/Formula/plustache.rb deleted file mode 100644 index c6df3fff132f3..0000000000000 --- a/Formula/plustache.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Plustache < Formula - desc "C++ port of Mustache templating system" - homepage "https://github.com/mrtazz/plustache" - url "https://github.com/mrtazz/plustache/archive/0.4.0.tar.gz" - sha256 "83960c412a7c176664c48ba4d718e72b5d39935b24dc13d7b0f0840b98b06824" - - bottle do - cellar :any - sha256 "853b1c9c7d7f1c8cf8b7c6a1d0928a991b9c5646a326fe520d90a2cd28fc42dc" => :mojave - sha256 "7be831bc5c4402d088a31cd3e3c55e9e0ae105d969eea9a676744b212bdbc446" => :high_sierra - sha256 "5122ac5404ae416955c5f3b64b63bfd617a530e746194590d3779ae61710f281" => :sierra - sha256 "d5a98c71ef6162127b0a9017a85e929effff39ce1d75318a75cfca93086ff922" => :el_capitan - sha256 "71e6a72ee994c2cabe2639dcd030a2ee577c1ceced012027766e108812bf7505" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "boost" - - def install - system "autoreconf", "--force", "--install" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/plzip.rb b/Formula/plzip.rb deleted file mode 100644 index 1bccae3eb3d3f..0000000000000 --- a/Formula/plzip.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Plzip < Formula - desc "Data compressor" - homepage "https://www.nongnu.org/lzip/plzip.html" - url "https://download.savannah.gnu.org/releases/lzip/plzip/plzip-1.7.tar.gz" - sha256 "95e22cdd98eb2f41bf4fb169530a5945aad2fec20c2e2284d597e77972baf2b7" - - bottle do - cellar :any_skip_relocation - sha256 "85137992bdd087a806159c860ca47685dc9633c82d2c7892bd149c50fbbadec5" => :mojave - sha256 "af30afb47c2eb2b2392c4402fa4deaeb505d34bc1a9dbd31d25fed666cfdc6a9" => :high_sierra - sha256 "4461870d7a81404b53b7aae5d73180cbb3677bf65e2b815808311ad0573e5494" => :sierra - sha256 "69b750626b5cdd03b7b2c6b6e260d8ebe5caf99e2a712503743c085baece4d8a" => :el_capitan - end - - depends_on "lzlib" - - # error: unknown type name 'pthread_mutex_t' and 'pthread_cond_t' - # Reported 24 Nov 2017 to lzip-bug AT nongnu DOT org - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/68e2af8/plzip/pthread.diff" - sha256 "9e6653248ade666922b353b362eda6383af73c85cd93936c70bd8257e027f2b1" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "check" - ENV.deparallelize - system "make", "install" - end - - test do - text = "Hello Homebrew!" - compressed = pipe_output("#{bin}/plzip -c", text) - assert_equal text, pipe_output("#{bin}/plzip -d", compressed) - end -end diff --git a/Formula/pmccabe.rb b/Formula/pmccabe.rb deleted file mode 100644 index 1c7ef80be505a..0000000000000 --- a/Formula/pmccabe.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pmccabe < Formula - desc "Calculate McCabe-style cyclomatic complexity for C/C++ code" - homepage "https://packages.debian.org/sid/pmccabe" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/p/pmccabe/pmccabe_2.6.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/p/pmccabe/pmccabe_2.6.tar.gz" - sha256 "e490fe7c9368fec3613326265dd44563dc47182d142f579a40eca0e5d20a7028" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "660ae3ce966863082ba287ba9e52c0772c41e1d58571e02c3d898b71ac4682a5" => :mojave - sha256 "054dd89d0934715b169875d8d0bcce39db919550752eab9cadc083eab0e148cf" => :high_sierra - sha256 "220285c0f0ae07835785574504d1d7730fb2abc06ddacfb76e1fe73f999d2cc1" => :sierra - sha256 "d6189f6ae7341da933653c687adec0bb8952b14ed8a2883b19aec4db90b65eea" => :el_capitan - sha256 "cb369d2f04ce0fccdb22b2640f1f6e37fc056b6edda79767474040cb52f76936" => :yosemite - sha256 "d64603cace1f97227e6efc2c26f628fece4e49f762e1e6d0903400a579be0a0f" => :mavericks - end - - def install - ENV.append_to_cflags "-D__unix" - - system "make" - bin.install "pmccabe", "codechanges", "decomment", "vifn" - man1.install Dir["*.1"] - end - - test do - assert_match /pmccabe #{version}/, shell_output("#{bin}/pmccabe -V") - end -end diff --git a/Formula/pmd.rb b/Formula/pmd.rb deleted file mode 100644 index 8e2256dd19f03..0000000000000 --- a/Formula/pmd.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Pmd < Formula - desc "Source code analyzer for Java, JavaScript, and more" - homepage "https://pmd.github.io" - url "https://github.com/pmd/pmd/releases/download/pmd_releases/6.10.0/pmd-bin-6.10.0.zip" - sha256 "ab62be2ce4fe9c77d3b6a8b528dd9d49049b11e624d47ac0e2dac145858deffb" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm Dir["bin/*.bat"] - libexec.install Dir["*"] - (bin/"pmd").write_env_script libexec/"bin/run.sh", - Language::Java.java_home_env("1.8+") - end - - def caveats; <<~EOS - Run with `pmd` (instead of `run.sh` as described in the documentation). - EOS - end - - test do - (testpath/"java/testClass.java").write <<~EOS - public class BrewTestClass { - // dummy constant - public String SOME_CONST = "foo"; - - public boolean doTest () { - return true; - } - } - EOS - - system "#{bin}/pmd", "pmd", "-d", "#{testpath}/java", "-R", - "rulesets/java/basic.xml", "-f", "textcolor", "-l", "java" - end -end diff --git a/Formula/pmdmini.rb b/Formula/pmdmini.rb deleted file mode 100644 index 59125bebf25b1..0000000000000 --- a/Formula/pmdmini.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Pmdmini < Formula - desc "Plays music in PC-88/98 PMD chiptune format" - homepage "https://github.com/mistydemeo/pmdmini" - url "https://github.com/mistydemeo/pmdmini/archive/v1.0.1.tar.gz" - sha256 "5c866121d58fbea55d9ffc28ec7d48dba916c8e1bed1574453656ef92ee5cea9" - - bottle do - cellar :any - sha256 "fe87429ee546fa0629d178c52476c4cc5696abac76b21abcd3e4977c7527bd22" => :mojave - sha256 "c3195012d5b5333e76c1a8a44b3f734575540deee884dfb6685e139e1038c138" => :high_sierra - sha256 "59b287650c6e40c20da8000f5e73b910f8096bd949e4432b4f11e70b1c779a5d" => :sierra - sha256 "72afd84c66fef9f142a1922fd0995a6a173b46c40d06715808345cc1c71b6702" => :el_capitan - end - - depends_on "sdl" - - resource "test_song" do - url "https://ftp.modland.com/pub/modules/PMD/Shiori%20Ueno/His%20Name%20Is%20Diamond/dd06.m" - sha256 "36be8cfbb1d3556554447c0f77a02a319a88d8c7a47f9b7a3578d4a21ac85510" - end - - def install - # Specify Homebrew's cc - inreplace "mak/general.mak", "gcc", ENV.cc - system "make" - - # Makefile doesn't build a dylib - system "#{ENV.cc} -dynamiclib -install_name #{lib}/libpmdmini.dylib -o libpmdmini.dylib -undefined dynamic_lookup obj/*.o" - - bin.install "pmdplay" - lib.install "libpmdmini.a", "libpmdmini.dylib" - (include+"libpmdmini").install Dir["src/*.h"] - (include+"libpmdmini/pmdwin").install Dir["src/pmdwin/*.h"] - end - - test do - resource("test_song").stage testpath - (testpath/"pmdtest.c").write <<~EOS - #include - #include "libpmdmini/pmdmini.h" - - int main(int argc, char** argv) - { - char title[1024]; - pmd_init(); - pmd_play(argv[1], argv[2]); - pmd_get_title(title); - printf("%s\\n", title); - } - EOS - system ENV.cc, "pmdtest.c", "-L#{lib}", "-lpmdmini", "-o", "pmdtest" - result = `#{testpath}/pmdtest #{testpath}/dd06.m #{testpath}`.chomp - assert_equal "mus #06", result - end -end diff --git a/Formula/pms.rb b/Formula/pms.rb deleted file mode 100644 index 3f57ab7ee9554..0000000000000 --- a/Formula/pms.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pms < Formula - desc "Practical Music Search, an ncurses-based MPD client" - homepage "https://pms.sourceforge.io" - url "https://downloads.sourceforge.net/project/pms/pms/0.42/pms-0.42.tar.bz2" - sha256 "96bf942b08cba10ee891a63eeccad307fd082ef3bd20be879f189e1959e775a6" - - bottle do - sha256 "9526998c8cbe888fcf0b494d4d717b3b8cc9501b5f559c719274dd1de75d2d1a" => :mojave - sha256 "6a7b2229b39104ec96032e9e893514fa8a61b18a52106729332c22d8aba8a065" => :high_sierra - sha256 "8d96a7dafe25504a4bf927b94119265f6dfd0459aaaed9d1867601aa24ed8728" => :sierra - sha256 "65b6bfe7e5eca6e7f073e4f9c3fc7c46df538c91010059781369bacbc628256b" => :el_capitan - sha256 "4093093ca7be2f6aaee5f50d3185323df4fcea2ed389f29615a1b79fb3648be4" => :yosemite - sha256 "2f7dd91d357ac34393e55d7de6ffca2b21a64adfa084a6b6dd5c5aa43caed170" => :mavericks - sha256 "772bff39de0b88e164b5f14b22ed4fa22c274468d07d735318284fee5157d6c1" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match(/Practical Music Search v#{version}/, - shell_output("#{bin}/pms -?", 4)) - end -end diff --git a/Formula/png++.rb b/Formula/png++.rb deleted file mode 100644 index 7a3099458eaab..0000000000000 --- a/Formula/png++.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Pngxx < Formula - desc "C++ wrapper for libpng library" - homepage "https://www.nongnu.org/pngpp/" - url "https://savannah.nongnu.org/download/pngpp/png++-0.2.5.tar.gz" - sha256 "339fa2dff2cdd117efb43768cb272745faef4d02705b5e0e840537a2c1467b72" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "0a5221ea49fb845c830698b2d1c170cb8d59d18916ca843a5c80ef7d48b37435" => :mojave - sha256 "4085580bff1ec2116c321e84a426d195943a002f84b4662c9814a64e5925c627" => :high_sierra - sha256 "41785b523dc50e5b237d83d027b34b6532114a6751eff3f409ee0ba9e0730f04" => :sierra - sha256 "7b01b3ff0af9e60f2887bb45ff5ba2f5823a9a440c2d78e51e69904d3edd80d8" => :el_capitan - sha256 "de37d7fadb7308b45ba0448308256d00bf36442bacbab1e734ee8398aea8a8dd" => :yosemite - sha256 "f2e242ee428f191645418a9897eb2fd729408dd67d04e7af4cefc7dcb5715250" => :mavericks - end - - depends_on "libpng" - - def install - system "make", "PREFIX=#{prefix}", "install" - end -end diff --git a/Formula/png2ico.rb b/Formula/png2ico.rb deleted file mode 100644 index f57ac12f68e5b..0000000000000 --- a/Formula/png2ico.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Png2ico < Formula - desc "PNG to icon converter" - homepage "https://www.winterdrache.de/freeware/png2ico/" - url "https://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz" - sha256 "d6bc2b8f9dacfb8010e5f5654aaba56476df18d88e344ea1a32523bb5843b68e" - revision 1 - - bottle do - cellar :any - rebuild 2 - sha256 "52180eb9b080ae4cfbe33f441e0119d2cbcd2654c2b7c7d1b37120912215df95" => :mojave - sha256 "986b5a9efe66ddeec63f2f523a36214f0bbf3ce43a9697c83adb3c237912f38b" => :high_sierra - sha256 "63d789e767bf5fdfd3b26102441a7331531d83215c73fa61ae2b548ecf08ea74" => :sierra - sha256 "6b3b8e132ff06ed21308e73e1a30a3b74a593092e56dc94693c27ae4d03add09" => :el_capitan - sha256 "0cf4b0ca3e7ce5c3fcf24006f0624d9046a36191450ea2a3de36bea47b3921e4" => :yosemite - end - - depends_on "libpng" - - # Fix build with recent clang - patch :DATA - - def install - inreplace "Makefile", "g++", "$(CXX)" - system "make", "CPPFLAGS=#{ENV.cxxflags} #{ENV.cppflags} #{ENV.ldflags}" - bin.install "png2ico" - man1.install "doc/png2ico.1" - end - - test do - system "#{bin}/png2ico", "out.ico", test_fixtures("test.png") - assert_predicate testpath/"out.ico", :exist? - end -end - -__END__ -diff --git a/png2ico.cpp b/png2ico.cpp -index 8fb87e4..9dedb97 100644 ---- a/png2ico.cpp -+++ b/png2ico.cpp -@@ -34,6 +34,7 @@ Notes about transparent and inverted pixels: - #include - #include - #include -+#include - - #if __GNUC__ > 2 - #include diff --git a/Formula/pngcheck.rb b/Formula/pngcheck.rb deleted file mode 100644 index 288a5379eaa12..0000000000000 --- a/Formula/pngcheck.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pngcheck < Formula - desc "Print info and check PNG, JNG, and MNG files" - homepage "http://www.libpng.org/pub/png/apps/pngcheck.html" - url "https://downloads.sourceforge.net/project/png-mng/pngcheck/2.3.0/pngcheck-2.3.0.tar.gz" - sha256 "77f0a039ac64df55fbd06af6f872fdbad4f639d009bbb5cd5cbe4db25690f35f" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "22033aa6f7b96ecb9d7eb038b7103e5faa782f4d36c142c3220f1e1ff1fc9e9e" => :mojave - sha256 "f4cdf56cdf51ab156bcc1009cce5cdd46d86de12811549136d50a1a18295b7c7" => :high_sierra - sha256 "c98b0fd09e8b615f98d4ee9762485a8e9026c9cdb3dc576ef81ee0bbff6058d7" => :sierra - sha256 "98e0a49125511f279c09c99fdb33ea5e2d44f489be4a8a6d70ce9faba48e8b92" => :el_capitan - sha256 "2f8901f0259f2ec24478268e5fa4cd8fe904a160592f118efdddf4ba20221dd6" => :yosemite - sha256 "af2af2a3771b7730c0da6fe3c74f6044b3664498c0b9f5070be3cf4d7ec1274e" => :mavericks - sha256 "b4ebae530dd4e2cb7822f15c9da98cbfe6dd62540b222c6a85f297e446f67d66" => :mountain_lion - end - - def install - system "make", "-f", "Makefile.unx", "ZINC=", "ZLIB=-lz" - bin.install %w[pngcheck pngsplit png-fix-IDAT-windowsize] - end - - test do - system bin/"pngcheck", test_fixtures("test.png") - end -end diff --git a/Formula/pngcrush.rb b/Formula/pngcrush.rb deleted file mode 100644 index f502b95b50d15..0000000000000 --- a/Formula/pngcrush.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pngcrush < Formula - desc "Optimizer for PNG files" - homepage "https://pmt.sourceforge.io/pngcrush" - url "https://downloads.sourceforge.net/project/pmt/pngcrush/1.8.13/pngcrush-1.8.13.tar.xz" - sha256 "8fc18bcbcc65146769241e20f9e21e443b0f4538d581250dce89b1e969a30705" - - bottle do - cellar :any_skip_relocation - sha256 "904e958b1198e2931ab233981764b1ec66b26da793445c0fa10182588b5369a7" => :mojave - sha256 "db13f642eae1815e00e1a80d363228e0311d85ca510e9c9de94dba8483fa2d87" => :high_sierra - sha256 "f648ad0c664699f67bba8ba791358e8b294d0c1d975f026aa67fc1635badbc73" => :sierra - sha256 "2633aff1e7cec8bb6c55da5c4daf9f555c74e516ebcc5f3027589588f76d3e17" => :el_capitan - sha256 "5505ea179a71996eb4fab04feebd09ebbef7e8ea4c1efba1e0184333c1883d1b" => :yosemite - end - - def install - system "make", "CC=#{ENV.cc}", - "LD=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}" - bin.install "pngcrush" - end - - test do - system "#{bin}/pngcrush", test_fixtures("test.png"), "/dev/null" - end -end diff --git a/Formula/pngnq.rb b/Formula/pngnq.rb deleted file mode 100644 index 41a736cbf34b0..0000000000000 --- a/Formula/pngnq.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Pngnq < Formula - desc "Tool for optimizing PNG images" - homepage "https://pngnq.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pngnq/pngnq/1.1/pngnq-1.1.tar.gz" - sha256 "c147fe0a94b32d323ef60be9fdcc9b683d1a82cd7513786229ef294310b5b6e2" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "2287986066f131dbcac5ab97b033898a611b2b07348847ce5094f09bba06c7fa" => :mojave - sha256 "258abdbd2805617e3c36c0926b3168e0632d3eafacba9e9b63c8e35dee6c28f7" => :high_sierra - sha256 "0914104edfd7c6089ae4b053e5a57cf1b5a0d9bb476424ce654a923cafef651c" => :sierra - sha256 "dd6970fb9055fb1a6702c820e75a3d7b826e165e61c23c17b0845cca780c3da9" => :el_capitan - sha256 "cba40b130f3d16666580be2b572721d0d8d312f60f62e4fdef656ffa825bc65e" => :yosemite - sha256 "4d9e35ec7c627bd2dc8c1ca26982e9c93e0a74687600830d5d491587ec04f967" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libpng" - - # Fixes compilation on OSX Lion - # png.h on Lion does not, in fact, include zlib.h - # See: https://sourceforge.net/p/pngnq/bugs/13/ - # See: https://sourceforge.net/p/pngnq/bugs/14/ - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end - - -__END__ -diff --git a/src/rwpng.c b/src/rwpng.c -index aaa21fc..5324afe 100644 ---- a/src/rwpng.c -+++ b/src/rwpng.c -@@ -31,6 +31,7 @@ - - #include - #include -+#include - - #include "png.h" /* libpng header; includes zlib.h */ - #include "rwpng.h" /* typedefs, common macros, public prototypes */ diff --git a/Formula/pngpaste.rb b/Formula/pngpaste.rb deleted file mode 100644 index 9b33e3b2df5a6..0000000000000 --- a/Formula/pngpaste.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pngpaste < Formula - desc "Paste PNG into files" - homepage "https://github.com/jcsalterego/pngpaste" - url "https://github.com/jcsalterego/pngpaste/archive/0.2.2.tar.gz" - sha256 "f7566b4eba94916df5723cdcef8e325ee7151c530eec025e996d0e784293362c" - - bottle do - cellar :any_skip_relocation - sha256 "795c9c105acb5751e01466c85703305dfa2410d24abf65eb234d1fc0d6201e34" => :mojave - sha256 "9c215daf838e0aaa433a0672de6eef2254a917b4ce93fa15d6a85ef26daab917" => :high_sierra - sha256 "53dcb74c9ae6f97470adda82a565e70b821879dd02733aa404a8c59db49eff79" => :sierra - sha256 "8dec6973a1c579264b4832dd6b766c5e1ce344b486bf2c302b47a299a14e6952" => :el_capitan - end - - # Sierra's CLT is sufficient, but El Capitain's isn't - depends_on :xcode => ["8.0", :build] if MacOS.version < :sierra - - depends_on :macos => :el_capitan # needs NSBitmapImageFileTypePNG, etc. - - def install - system "make", "all" - bin.install "pngpaste" - end - - test do - png = test_fixtures("test.png") - system "osascript", "-e", "set the clipboard to POSIX file (\"#{png}\")" - system bin/"pngpaste", "test.png" - assert_predicate testpath/"test.png", :exist? - end -end diff --git a/Formula/pngquant.rb b/Formula/pngquant.rb deleted file mode 100644 index eecfa65d03a42..0000000000000 --- a/Formula/pngquant.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Pngquant < Formula - desc "PNG image optimizing utility" - homepage "https://pngquant.org/" - url "https://pngquant.org/pngquant-2.12.2-src.tar.gz" - sha256 "bb031c48039ee73ea0e60709bb9ab80c55bfa3a5920b798ea37a03f2757b099c" - head "https://github.com/kornelski/pngquant.git" - - bottle do - cellar :any - sha256 "71656950218e1bc4382a43615f41b02b12539db9b7352e2e423212bec6d7a07e" => :mojave - sha256 "a71a5b271f72aafce935ebf665afc158b5a1e8d3b62fa916773363dfd43d4ce6" => :high_sierra - sha256 "898ad660558ca14a04cb465ccf374e24439c6067f428cb665f99486ddb41dcea" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "libpng" - depends_on "little-cms2" - - def install - system "cargo", "install", "--root", prefix, "--path", "." - man1.install "pngquant.1" - end - - test do - system "#{bin}/pngquant", test_fixtures("test.png"), "-o", "out.png" - assert_predicate testpath/"out.png", :exist? - end -end diff --git a/Formula/poco.rb b/Formula/poco.rb deleted file mode 100644 index 5151062cdb771..0000000000000 --- a/Formula/poco.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Poco < Formula - desc "C++ class libraries for building network and internet-based applications" - homepage "https://pocoproject.org/" - url "https://pocoproject.org/releases/poco-1.9.0/poco-1.9.0-all.tar.gz" - sha256 "0387bf0f9d313e2311742e1ad0b64e07f2f3e76039eed20e3b9aa9951b88e187" - revision 1 - head "https://github.com/pocoproject/poco.git", :branch => "develop" - - bottle do - cellar :any - rebuild 1 - sha256 "8fcf6c4bfd4bda264b87c4d3ad4813d7c44adc486c2a83d1d3a769d8a17679ba" => :mojave - sha256 "b620f2bbd0326a84c6acc7b0bf1765e77198cc690d1141d6ec93ed244ae9886c" => :high_sierra - sha256 "a2e2b25aa10903f7976fae5d647238c74206f22d58bf916f6205d332a54cd64d" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl" - - def install - ENV.cxx11 - - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DENABLE_DATA_MYSQL=OFF", - "-DENABLE_DATA_ODBC=OFF" - system "make", "install" - end - end - - test do - system bin/"cpspc", "-h" - end -end diff --git a/Formula/pod2man.rb b/Formula/pod2man.rb deleted file mode 100644 index cd62e09cdb804..0000000000000 --- a/Formula/pod2man.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pod2man < Formula - desc "Perl documentation generator" - homepage "https://www.eyrie.org/~eagle/software/podlators/" - url "https://archives.eyrie.org/software/perl/podlators-4.11.tar.xz" - sha256 "4c08c5dd08c63831ac2fa5a18ee0c9e55a178db7bb145be89fe71ef8e9d8d91d" - - bottle do - cellar :any_skip_relocation - sha256 "c7e444c6b55bc4943f4508a3f9f8d5999895f6f0242216c53854c55998156102" => :mojave - sha256 "6c780c4466590c859810bda4c1e851f3d36bd6b053302cef045ddcfb94a0d964" => :high_sierra - sha256 "94d9f00a8c1226b62a0d3d729770eb4e9a8be0a51a3e60ef7dd466152710bbe0" => :sierra - sha256 "54894e5d48ada5a3746777469f95b7ab83d59f409812d4cf48284ab2a8bb14fb" => :el_capitan - end - - keg_only :provided_by_macos - - def install - system "perl", "Makefile.PL", "PREFIX=#{prefix}", - "INSTALLSCRIPT=#{bin}", - "INSTALLMAN1DIR=#{man1}", "INSTALLMAN3DIR=#{man3}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.pod").write "=head2 Test heading\n" - manpage = shell_output("#{bin}/pod2man #{testpath}/test.pod") - assert_match '.SS "Test heading"', manpage - end -end diff --git a/Formula/podiff.rb b/Formula/podiff.rb deleted file mode 100644 index 100ca3eda3efd..0000000000000 --- a/Formula/podiff.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Podiff < Formula - desc "Compare textual information in two PO files" - homepage "https://puszcza.gnu.org.ua/software/podiff/" - url "https://download.gnu.org.ua/pub/release/podiff/podiff-1.1.tar.gz" - sha256 "a97480109c26837ffa868ff629a32205622a44d8b89c83b398fb17352b5be6ff" - - bottle do - cellar :any_skip_relocation - sha256 "2a9b5cb91d5f6b36ea965f2d7bd85fd47c5719f3a9d9079cba7e5d2f6cd667c3" => :mojave - sha256 "c862b6ec4c259c495879fd91dcb143e9768b2cbb12ae5e07506d63350e36cdbb" => :high_sierra - sha256 "be964cc5259d37f0f4676d5e3a0fac77b42e4f3e7641c7579d47182e4f036e83" => :sierra - sha256 "24f385afff1c9074d995cd1374c005e8770a80ef11b06058f6024eee67a9de69" => :el_capitan - sha256 "21cc248bf36ce685061e234f57c6fc5cbe0d207b201e7a8e485ee7b71d3d21c6" => :yosemite - sha256 "c3a3b66344303ad473d8c6808eb9e2a2124bb0a801536870b739beba4de3d5ae" => :mavericks - end - - def install - system "make" - bin.install "podiff" - man1.install "podiff.1" - end - - def caveats; <<~EOS - To use with git, add this to your .git/config or global git config file: - - [diff "podiff"] - command = #{HOMEBREW_PREFIX}/bin/podiff -D-u - - Then add the following line to the .gitattributes file in - the directory with your PO files: - - *.po diff=podiff - - See `man podiff` for more information. - EOS - end - - test do - system "#{bin}/podiff", "-v" - end -end diff --git a/Formula/podofo.rb b/Formula/podofo.rb deleted file mode 100644 index 2f26330c97bef..0000000000000 --- a/Formula/podofo.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Podofo < Formula - desc "Library to work with the PDF file format" - homepage "https://podofo.sourceforge.io" - url "https://downloads.sourceforge.net/podofo/podofo-0.9.5.tar.gz" - sha256 "854981cb897ebc14bac854ea0f25305372261a48a205363fe1c61659ba7b5304" - revision 2 - - bottle do - cellar :any - sha256 "b744f10486e5373bc3ca29b1a5530008f90b48ea176b8098ae73fd91070ea60b" => :mojave - sha256 "b1ec1d67c725b6021617013c49d989bd0c91be23e5302f6d3421e6fb0c9aeb5d" => :high_sierra - sha256 "aea9066461ba04300b0cd20a30063c349a821b62a5285aaa2abea9068966da82" => :sierra - end - - depends_on "cmake" => :build - depends_on "fontconfig" - depends_on "freetype" - depends_on "jpeg" - depends_on "libidn" - depends_on "libpng" - depends_on "libtiff" - depends_on "openssl" - - # Upstream commit to fix cmake 3.12.0 build issue, remove in >= 0.9.7 - # https://sourceforge.net/p/podofo/tickets/24/ - patch :p0 do - url "https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch" - sha256 "33e8bd8b57cc04884528d64c80624a852f61c8918b6fe320d26ca7d4905bdd54" - end - - def install - args = std_cmake_args + %W[ - -DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON - -DCMAKE_DISABLE_FIND_PACKAGE_LUA=ON - -DPODOFO_BUILD_SHARED:BOOL=ON - -DFREETYPE_INCLUDE_DIR_FT2BUILD=#{Formula["freetype"].opt_include}/freetype2 - -DFREETYPE_INCLUDE_DIR_FTHEADER=#{Formula["freetype"].opt_include}/freetype2/config/ - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - cp test_fixtures("test.pdf"), testpath - assert_match "500 x 800 pts", shell_output("#{bin}/podofopdfinfo test.pdf") - end -end diff --git a/Formula/points2grid.rb b/Formula/points2grid.rb deleted file mode 100644 index 88acd76778a0e..0000000000000 --- a/Formula/points2grid.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Points2grid < Formula - desc "Generate digital elevation models using local griding" - homepage "https://github.com/CRREL/points2grid" - url "https://github.com/CRREL/points2grid/archive/1.3.1.tar.gz" - sha256 "6e2f2d3bbfd6f0f5c2d0c7d263cbd5453745a6fbe3113a3a2a630a997f4a1807" - revision 3 - - bottle do - cellar :any - sha256 "03d183ed5be6f1ecffdd3439b0ef4287ed2bcdda29bfcd3d6305f2f2e93eb244" => :high_sierra - sha256 "cb58d67da29769bf2481f60eb4668697699babb90ed18340a6fac217c6d3bd75" => :sierra - sha256 "498339350edde2ace1538bf8f361ae8a81afb5e7563859687f6309326525db1b" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "gdal" - depends_on :macos => :mavericks - - def install - args = std_cmake_args + ["-DWITH_GDAL=ON"] - libexec.install "test/data/example.las" - system "cmake", ".", *args - system "make", "install" - end - - test do - system bin/"points2grid", - "-i", libexec/"example.las", - "-o", "example", - "--max", "--output_format", "grid" - assert_equal 13, File.read("example.max.grid").scan("423.820000").size - end -end diff --git a/Formula/polipo.rb b/Formula/polipo.rb deleted file mode 100644 index 0cf71d3ed0bdb..0000000000000 --- a/Formula/polipo.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Polipo < Formula - desc "Web caching proxy" - homepage "https://www.irif.univ-paris-diderot.fr/~jch/software/polipo/" - url "https://www.irif.univ-paris-diderot.fr/~jch/software/files/polipo/polipo-1.1.1.tar.gz" - sha256 "a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015" - head "https://github.com/jech/polipo.git" - - bottle do - rebuild 2 - sha256 "2653a1ffd719d82318a04fd94b8a2573714c03e974b43ae7b3df6ad4b9e410f3" => :mojave - sha256 "6fe78288ca28698ac07fd96d99fbbf311a6b410eb7150dfac5388564b76d4195" => :high_sierra - sha256 "7a943f9e9952d78c692d5ec155b407319181a6a66ee1367801f77da8f7bb8459" => :sierra - end - - def install - cache_root = (var + "cache/polipo") - cache_root.mkpath - - args = %W[ - PREFIX=#{prefix} - LOCAL_ROOT=#{pkgshare}/www - DISK_CACHE_ROOT=#{cache_root} - MANDIR=#{man} - INFODIR=#{info} - PLATFORM_DEFINES=-DHAVE_IPv6 - ] - - system "make", "all", *args - system "make", "install", *args - end - - plist_options :manual => "polipo" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/polipo - - - SoftResourceLimits - - NumberOfFiles - 65536 - - - - EOS - end - - test do - pid = fork do - exec "#{bin}/polipo" - end - sleep 2 - - begin - output = shell_output("curl -s http://localhost:8123") - assert_match "Welcome to Polipo", output, "Polipo webserver did not start!" - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/polyglot.rb b/Formula/polyglot.rb deleted file mode 100644 index afa3b1b27e79a..0000000000000 --- a/Formula/polyglot.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Polyglot < Formula - desc "Protocol adapter to run UCI engines under XBoard" - homepage "https://chessprogramming.wikispaces.com/PolyGlot" - url "http://hgm.nubati.net/releases/polyglot-2.0.4.tar.gz" - sha256 "c11647d1e1cb4ad5aca3d80ef425b16b499aaa453458054c3aa6bec9cac65fc1" - head "http://hgm.nubati.net/git/polyglot.git", :branch => "learn" - - bottle do - cellar :any_skip_relocation - sha256 "8427c9bc2e5ca5137ee27ce8f6fc5f74cf0c216519ec20a66270fdff8547fb33" => :mojave - sha256 "7192204bd2c30b3d2d3eb482678c76e0c6069e7bb931864a26728f961116982f" => :high_sierra - sha256 "de7a79cd7b59fb412b245a50c601ec0546da345f5901b2bec260fba86fc27ce9" => :sierra - sha256 "36d5170db384175c1f6f097f6d179243d265c3a06dcf34a11266cbd370be5aad" => :el_capitan - sha256 "eff91a02101ab40e05f3479100120da2f54b1a9832cea957a054ed92872748a8" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /^PolyGlot \d\.\d\.[0-9a-z]+ by Fabien Letouzey/, shell_output("#{bin}/polyglot --help") - end -end diff --git a/Formula/polyml.rb b/Formula/polyml.rb deleted file mode 100644 index f4303f679bac9..0000000000000 --- a/Formula/polyml.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Polyml < Formula - desc "Standard ML implementation" - homepage "https://www.polyml.org/" - url "https://github.com/polyml/polyml/archive/v5.7.1.tar.gz" - sha256 "d18dd824b426edaed1cec71dded354b57df9ebdbd38863bc7540a60bd0667028" - head "https://github.com/polyml/polyml.git" - - bottle do - sha256 "ac906a03567d473a5827a8c6ccb8dc12944e4c28ed85925d62fd09b8d2c401d9" => :mojave - sha256 "5a1f478b3b2b26ab1f2326031c5ea930aa97ac08b83881151e976942c674df65" => :high_sierra - sha256 "d4c027b336791cc932cebddb6ea901af8a17f482511e9858a4766b380a1b3391" => :sierra - sha256 "5adaaa6d45b674090dd49918532a5035737e7d7d2a1acf861a053ac96d297596" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", "--disable-debug", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/pony-stable.rb b/Formula/pony-stable.rb deleted file mode 100644 index ead6bcfe0cb99..0000000000000 --- a/Formula/pony-stable.rb +++ /dev/null @@ -1,31 +0,0 @@ -class PonyStable < Formula - desc "Dependency manager for the Pony language" - homepage "https://github.com/ponylang/pony-stable" - url "https://github.com/ponylang/pony-stable/archive/0.1.6.tar.gz" - sha256 "1e980924ff7ea03e07f2eb16e5ae826ff9142f659aa83127ca80c1055af59748" - head "https://github.com/ponylang/pony-stable.git" - - bottle do - cellar :any_skip_relocation - sha256 "91185d0a73628759d5e3462ab943d5af75d0d93924f342d3a1dc482218375eca" => :mojave - sha256 "571fd986d8e2bd5fc89e382b14d8753c8ce1c3192c9965685564ee5cdb31e697" => :high_sierra - sha256 "5d0b08013d2cf38ffbd4e0fe521caf03281e897b3c64e565fd169c885bf56c22" => :sierra - sha256 "2396f10782e12343c245196d0265df84e106cd2a26496f1e7f1c90f9b55a99b3" => :el_capitan - end - - depends_on "ponyc" - - def install - system "make", "prefix=#{prefix}", "install" - end - - test do - (testpath/"test/main.pony").write <<~EOS - actor Main - new create(env: Env) => - env.out.print("Hello World!") - EOS - system "#{bin}/stable", "env", "ponyc", "test" - assert_equal "Hello World!", shell_output("./test1").chomp - end -end diff --git a/Formula/ponyc.rb b/Formula/ponyc.rb deleted file mode 100644 index 0fbd779ba0b6e..0000000000000 --- a/Formula/ponyc.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Ponyc < Formula - desc "Object-oriented, actor-model, capabilities-secure programming language" - homepage "https://www.ponylang.org/" - url "https://github.com/ponylang/ponyc/archive/0.25.0.tar.gz" - sha256 "8420d84f178db325934d77dc407a7f98d6bd14b8cf8036e17b41f886f5820cb2" - head "https://github.com/ponylang/ponyc.git" - - bottle do - cellar :any - sha256 "2dae291b0e2aaafb6864b0cc96b04b9c1eab4187dfd55b2f720c86e9c5f2af83" => :mojave - sha256 "b0d92521cc7b31c809de94b392940ea3c526f21db1c18e384e3e4a1275882665" => :high_sierra - sha256 "f516cf4cf8d1bdf3ee8c82adf5b3d58184ad0105722b354e851c78b152b1f97d" => :sierra - end - - # https://github.com/ponylang/ponyc/issues/1274 - # https://github.com/Homebrew/homebrew-core/issues/5346 - pour_bottle? do - reason <<~EOS - The bottle requires Xcode/CLT 8.0 or later to work properly. - EOS - satisfy { DevelopmentTools.clang_build_version >= 800 } - end - - depends_on "libressl" - depends_on "llvm@3.9" - depends_on :macos => :yosemite - depends_on "pcre2" - - needs :cxx11 - - def install - ENV.cxx11 - ENV["LLVM_CONFIG"] = "#{Formula["llvm@3.9"].opt_bin}/llvm-config" - system "make", "install", "verbose=1", "config=release", - "ponydir=#{prefix}", "prefix=" - end - - test do - system "#{bin}/ponyc", "-rexpr", "#{prefix}/packages/stdlib" - - (testpath/"test/main.pony").write <<~EOS - actor Main - new create(env: Env) => - env.out.print("Hello World!") - EOS - system "#{bin}/ponyc", "test" - assert_equal "Hello World!", shell_output("./test1").strip - end -end diff --git a/Formula/ponysay.rb b/Formula/ponysay.rb deleted file mode 100644 index 9a183889b2712..0000000000000 --- a/Formula/ponysay.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Ponysay < Formula - desc "Cowsay but with ponies" - homepage "https://erkin.co/ponysay/" - url "https://github.com/erkin/ponysay/archive/3.0.3.tar.gz" - sha256 "c382d7f299fa63667d1a4469e1ffbf10b6813dcd29e861de6be55e56dc52b28a" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "9aaf7cdbe355ecc5f41ed2ab753ef18b848a36a5e475b9bda38e4551af886203" => :mojave - sha256 "481d6431bc586203d237787eaceafc116d9eccbf8d11489e1197a6eb0e034710" => :high_sierra - sha256 "e51c96a3bf6997b73150b75eb758eb8359ca89a27a5b171b50eba3628192a31c" => :sierra - sha256 "594b78b627cad84edef6de6dba32879cf5547215b33e7946bb3ee44c73e49214" => :el_capitan - end - - depends_on "coreutils" - depends_on "python" - - def install - system "./setup.py", - "--freedom=partial", - "--prefix=#{prefix}", - "--cache-dir=#{prefix}/var/cache", - "--sysconf-dir=#{prefix}/etc", - "install" - end - - test do - system "#{bin}/ponysay", "-A" - end -end diff --git a/Formula/poppler.rb b/Formula/poppler.rb deleted file mode 100644 index 9275396ee6518..0000000000000 --- a/Formula/poppler.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Poppler < Formula - desc "PDF rendering library (based on the xpdf-3.0 code base)" - homepage "https://poppler.freedesktop.org/" - url "https://poppler.freedesktop.org/poppler-0.72.0.tar.xz" - sha256 "c1747eb8f26e9e753c4001ed951db2896edc1021b6d0f547a0bd2a27c30ada51" - head "https://anongit.freedesktop.org/git/poppler/poppler.git" - - bottle do - sha256 "0ec68e256f14f005279279b5b6bbd3fa7b6127e567072eab2948a028df0d36d7" => :mojave - sha256 "dcac471ce08221a99ddf8aebfde60281ef170bbc5edf0ffd41f146e2de89250b" => :high_sierra - sha256 "1321cf5f90a60eb65e407e766b08f91307a9e579dac2ed91998fb4fdfd30bac5" => :sierra - end - - option "with-qt", "Build Qt5 backend" - - deprecated_option "with-qt4" => "with-qt" - deprecated_option "with-qt5" => "with-qt" - - depends_on "cmake" => :build - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "fontconfig" - depends_on "freetype" - depends_on "gettext" - depends_on "glib" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "little-cms2" - depends_on "nss" - depends_on "openjpeg" - depends_on "qt" => :optional - - conflicts_with "pdftohtml", "pdf2image", "xpdf", - :because => "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" - - resource "font-data" do - url "https://poppler.freedesktop.org/poppler-data-0.4.9.tar.gz" - sha256 "1f9c7e7de9ecd0db6ab287349e31bf815ca108a5a175cf906a90163bdbe32012" - end - - needs :cxx11 if build.with?("qt") || MacOS.version < :mavericks - - def install - ENV.cxx11 if build.with?("qt") || MacOS.version < :mavericks - - args = std_cmake_args + %w[ - -DBUILD_GTK_TESTS=OFF - -DENABLE_CMS=lcms2 - -DENABLE_GLIB=ON - -DENABLE_QT4=OFF - -DENABLE_XPDF_HEADERS=ON - -DWITH_GObjectIntrospection=ON - ] - - if build.with? "qt" - args << "-DENABLE_QT5=ON" - else - args << "-DENABLE_QT5=OFF" - end - - system "cmake", ".", *args - system "make", "install" - system "make", "clean" - system "cmake", ".", "-DBUILD_SHARED_LIBS=OFF", *args - system "make" - lib.install "libpoppler.a" - lib.install "cpp/libpoppler-cpp.a" - lib.install "glib/libpoppler-glib.a" - resource("font-data").stage do - system "make", "install", "prefix=#{prefix}" - end - - libpoppler = (lib/"libpoppler.dylib").readlink - to_fix = ["#{lib}/libpoppler-cpp.dylib", "#{lib}/libpoppler-glib.dylib", - *Dir["#{bin}/*"]] - to_fix << "#{lib}/libpoppler-qt5.dylib" if build.with?("qt") - to_fix.each do |f| - macho = MachO.open(f) - macho.change_dylib("@rpath/#{libpoppler}", "#{lib}/#{libpoppler}") - macho.write! - end - - # fix gobject-introspection support - # issue reported upstream as https://gitlab.freedesktop.org/poppler/poppler/issues/18 - # patch attached there does not work though... - inreplace share/"gir-1.0/Poppler-0.18.gir", "@rpath", lib.to_s - system "g-ir-compiler", "--output=#{lib}/girepository-1.0/Poppler-0.18.typelib", share/"gir-1.0/Poppler-0.18.gir" - end - - test do - system "#{bin}/pdfinfo", test_fixtures("test.pdf") - end -end diff --git a/Formula/popt.rb b/Formula/popt.rb deleted file mode 100644 index 219ae35840e01..0000000000000 --- a/Formula/popt.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Popt < Formula - desc "Library like getopt(3) with a number of enhancements" - homepage "http://rpm5.org" - url "http://rpm5.org/files/popt/popt-1.16.tar.gz" - mirror "https://ftp.openbsd.org/pub/OpenBSD/distfiles/popt-1.16.tar.gz" - sha256 "e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8" - - bottle do - rebuild 1 - sha256 "20b8ee08d436d2d37782ecddc315cfa1598bd50765e8089070c8b1d1e8355c69" => :mojave - sha256 "242ffcbf7f9796f970d45612b025d8be787f739aa5f16a02ce097196d3f56941" => :high_sierra - sha256 "ceae94fc8e588309670a7a045186eee8ff3a9966a68650f044a14d101267b7b2" => :sierra - sha256 "60a7f19e8fecafd92a5beb7d6438efac915e8f3afe3d83575fb64bb4a6190aab" => :el_capitan - sha256 "56d1104516e23bb314a248904b8ec85afe2fdbf71555417eb8f91edc1286e6da" => :yosemite - sha256 "ba122e7f34b9b03ab5a32ab01124b61eb608c29e0c0d023462953ed03782dd2a" => :mavericks - sha256 "6d95c3530a7bd4d7099d91f448669b53bb51a071c5e9a8b9915cdc750bd72aec" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/portaudio.rb b/Formula/portaudio.rb deleted file mode 100644 index 602ab36cb5061..0000000000000 --- a/Formula/portaudio.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Portaudio < Formula - desc "Cross-platform library for audio I/O" - homepage "http://www.portaudio.com" - url "http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz" - version "19.6.0" - sha256 "f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513" - version_scheme 1 - head "https://git.assembla.com/portaudio.git" - - bottle do - cellar :any - sha256 "54d0d7a2e270221cef38c5405a5102a0efc19df4aa88d907d74d0eefebbc31ba" => :mojave - sha256 "c8c55723ecdb61b8e4f4431062814d6ce8a267a19fe3e34c70b2bd677a0e20f9" => :high_sierra - sha256 "4fb62387583b02607e013f376c02b4a1f6c2a2fa9b68ee43e79c9c04d12f9a45" => :sierra - sha256 "96afa37e0de1723e4fa206360f189ed0486ecd74a5554dcab75eb47395be78db" => :el_capitan - sha256 "64b21e55c28066264ee09918c045b77c0b1049a19f8df4636283ce17b1d84944" => :yosemite - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking", - "--enable-mac-universal=no", - "--enable-cxx" - system "make", "install" - - # Need 'pa_mac_core.h' to compile PyAudio - include.install "include/pa_mac_core.h" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "portaudio.h" - - int main(){ - printf("%s",Pa_GetVersionInfo()->versionText); - } - EOS - - (testpath/"test.cpp").write <<~EOS - #include - #include "portaudiocpp/System.hxx" - - int main(){ - std::cout << portaudio::System::versionText(); - } - EOS - - system ENV.cc, testpath/"test.c", "-I#{include}", "-L#{lib}", "-lportaudio", "-o", "test" - system ENV.cxx, testpath/"test.cpp", "-I#{include}", "-L#{lib}", "-lportaudiocpp", "-o", "test_cpp" - assert_match stable.version.to_s, shell_output(testpath/"test") - assert_match stable.version.to_s, shell_output(testpath/"test_cpp") - end -end diff --git a/Formula/portmidi.rb b/Formula/portmidi.rb deleted file mode 100644 index 0a1c1840b7d59..0000000000000 --- a/Formula/portmidi.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Portmidi < Formula - desc "Cross-platform library for real-time MIDI I/O" - homepage "https://sourceforge.net/projects/portmedia/" - url "https://downloads.sourceforge.net/project/portmedia/portmidi/217/portmidi-src-217.zip" - sha256 "08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f" - revision 2 - - bottle do - cellar :any - sha256 "0dfe3a9b8ba85cf769c54a66fef958bfc0579700c3b8a3b494597a931e78db00" => :mojave - sha256 "746ef0d9f4013333e18b65160559ad578f2e491d5252ea22434cf8718885eb1e" => :high_sierra - sha256 "fba5058ec32b4f448c35104824f503a687bca51201e47c9e27020c08dd21fc41" => :sierra - end - - depends_on "cmake" => :build - - def install - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - inreplace "pm_mac/Makefile.osx", "PF=/usr/local", "PF=#{prefix}" - - # need to create include/lib directories since make won't create them itself - include.mkpath - lib.mkpath - - # Fix outdated SYSROOT to avoid: - # No rule to make target `/Developer/SDKs/MacOSX10.5.sdk/...' - inreplace "pm_common/CMakeLists.txt", - "set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk CACHE", - "set(CMAKE_OSX_SYSROOT /#{MacOS.sdk_path} CACHE" - - system "make", "-f", "pm_mac/Makefile.osx" - system "make", "-f", "pm_mac/Makefile.osx", "install" - end -end diff --git a/Formula/posh.rb b/Formula/posh.rb deleted file mode 100644 index 88a0052817a7d..0000000000000 --- a/Formula/posh.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Posh < Formula - desc "Policy-compliant ordinary shell" - homepage "https://salsa.debian.org/clint/posh" - url "https://salsa.debian.org/clint/posh/repository/debian/0.13.2/archive.tar.gz" - sha256 "d4ea1e08b4e2916a6a43f50f7892ab4152e9438b19f7a008e5b2a46e4f5ac774" - - bottle do - cellar :any_skip_relocation - sha256 "700e48f30128fa0fdd35c3117154dd24455ba2a8839bd56fda146f5cf8e4eb11" => :mojave - sha256 "9c38d14973e3fd33480cfdb45442a1e2e5291d4a60008ea61c689d497f8ff7ef" => :high_sierra - sha256 "d8528d6120edc6a45b43c7e3b148b5cb8859dcd10ee24c60ae7b1c7cfaa992d5" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/posh -c 'echo homebrew'") - assert_equal "homebrew", output.chomp - end -end diff --git a/Formula/poster.rb b/Formula/poster.rb deleted file mode 100644 index c52acd8bbf4f9..0000000000000 --- a/Formula/poster.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Poster < Formula - desc "Create large posters out of PostScript pages" - homepage "https://schrfr.github.io/poster/" - url "https://github.com/schrfr/poster/archive/1.0.0.tar.gz" - sha256 "1df49dfd4e50ffd66e0b6e279b454a76329a36280e0dc73b08e5b5dcd5cff451" - - bottle do - cellar :any_skip_relocation - sha256 "110db1120ca8bcf6b68f14cfb24cf92f0027b6897fb9a44a8c067f4feca54182" => :mojave - sha256 "74db7055649cd3f68316b99db48139641f916b4434008300f2bfcd1146f92c77" => :high_sierra - sha256 "caa5474e5d7baf13ae6495c01a7530146d55531e41c88a469b0e44ee892c4be4" => :sierra - sha256 "07702fc6f1d43a3875637f8ff9d3509d6eb913abda301c24c23d824a76a858b6" => :el_capitan - sha256 "718131fa123a69d0db610d95722d968fbda597da2477abe520146393ff0321c2" => :yosemite - sha256 "5c109f3122d33b73aecbb3a7e5aaeece5c9e9d3be8aae9c6e39001b6a5feea4e" => :mavericks - end - - def install - system "make" - bin.install "poster" - man1.install "poster.1" - end - - test do - system "#{bin}/poster", test_fixtures("test.ps") - end -end diff --git a/Formula/postgis.rb b/Formula/postgis.rb deleted file mode 100644 index 9183fa59aa787..0000000000000 --- a/Formula/postgis.rb +++ /dev/null @@ -1,139 +0,0 @@ -class Postgis < Formula - desc "Adds support for geographic objects to PostgreSQL" - homepage "https://postgis.net/" - url "https://download.osgeo.org/postgis/source/postgis-2.5.1.tar.gz" - sha256 "fb137056f43aae0e9d475dc5b7934eccce466f86f5ceeb69ec8b5cea26817a91" - - bottle do - cellar :any - sha256 "4b2a6bc8fd4be4eb126266b7abc893a61f0323355594768e34de2b8031d21339" => :mojave - sha256 "39aa93761802a7d885bc0db8b10ef66314725ca5114f77859be1be05480b3c67" => :high_sierra - sha256 "934efc3deeb8c3bfa3a4cf0dc2e2eb0a48853412702cc51d10405a28cdffd8ee" => :sierra - end - - head do - url "https://svn.osgeo.org/postgis/trunk/" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - option "with-gui", "Build shp2pgsql-gui in addition to command line tools" - option "with-protobuf-c", "Build with protobuf-c to enable Geobuf and Mapbox Vector Tile support" - - depends_on "gpp" => :build - depends_on "pkg-config" => :build - depends_on "gdal" # for GeoJSON and raster handling - depends_on "geos" - depends_on "gtk+" if build.with? "gui" - depends_on "json-c" # for GeoJSON and raster handling - depends_on "pcre" - depends_on "postgresql" - depends_on "proj" - depends_on "sfcgal" # for advanced 2D/3D functions - depends_on "protobuf-c" => :optional - - def install - ENV.deparallelize - - args = [ - "--with-projdir=#{Formula["proj"].opt_prefix}", - "--with-jsondir=#{Formula["json-c"].opt_prefix}", - "--with-pgconfig=#{Formula["postgresql"].opt_bin}/pg_config", - # Unfortunately, NLS support causes all kinds of headaches because - # PostGIS gets all of its compiler flags from the PGXS makefiles. This - # makes it nigh impossible to tell the buildsystem where our keg-only - # gettext installations are. - "--disable-nls", - ] - - args << "--with-gui" if build.with? "gui" - args << "--with-protobufdir=#{Formula["protobuf-c"].opt_bin}" if build.with? "protobuf-c" - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - - mkdir "stage" - system "make", "install", "DESTDIR=#{buildpath}/stage" - - bin.install Dir["stage/**/bin/*"] - lib.install Dir["stage/**/lib/*"] - include.install Dir["stage/**/include/*"] - (doc/"postgresql/extension").install Dir["stage/**/share/doc/postgresql/extension/*"] - (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] - pkgshare.install Dir["stage/**/contrib/postgis-*/*"] - (share/"postgis_topology").install Dir["stage/**/contrib/postgis_topology-*/*"] - - # Extension scripts - bin.install %w[ - utils/create_undef.pl - utils/postgis_proc_upgrade.pl - utils/postgis_restore.pl - utils/profile_intersects.pl - utils/test_estimation.pl - utils/test_geography_estimation.pl - utils/test_geography_joinestimation.pl - utils/test_joinestimation.pl - ] - - man1.install Dir["doc/**/*.1"] - end - - def caveats - <<~EOS - To create a spatially-enabled database, see the documentation: - https://postgis.net/docs/manual-2.4/postgis_installation.html#create_new_db_extensions - If you are currently using PostGIS 2.0+, you can go the soft upgrade path: - ALTER EXTENSION postgis UPDATE TO "#{version}"; - Users of 1.5 and below will need to go the hard-upgrade path, see here: - https://postgis.net/docs/manual-2.4/postgis_installation.html#upgrading - - PostGIS SQL scripts installed to: - #{opt_pkgshare} - PostGIS plugin libraries installed to: - #{HOMEBREW_PREFIX}/lib - PostGIS extension modules installed to: - #{HOMEBREW_PREFIX}/share/postgresql/extension - EOS - end - - test do - require "base64" - (testpath/"brew.shp").write ::Base64.decode64 <<~EOS - AAAnCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoOgDAAALAAAAAAAAAAAAAAAA - AAAAAADwPwAAAAAAABBAAAAAAAAAFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAEAAAASCwAAAAAAAAAAAPA/AAAAAAAA8D8AAAAAAAAA - AAAAAAAAAAAAAAAAAgAAABILAAAAAAAAAAAACEAAAAAAAADwPwAAAAAAAAAA - AAAAAAAAAAAAAAADAAAAEgsAAAAAAAAAAAAQQAAAAAAAAAhAAAAAAAAAAAAA - AAAAAAAAAAAAAAQAAAASCwAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAA - AAAAAAAAAAAABQAAABILAAAAAAAAAAAAAAAAAAAAAAAUQAAAAAAAACJAAAAA - AAAAAEA= - EOS - (testpath/"brew.dbf").write ::Base64.decode64 <<~EOS - A3IJGgUAAABhAFsAAAAAAAAAAAAAAAAAAAAAAAAAAABGSVJTVF9GTEQAAEMA - AAAAMgAAAAAAAAAAAAAAAAAAAFNFQ09ORF9GTEQAQwAAAAAoAAAAAAAAAAAA - AAAAAAAADSBGaXJzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgIFBvaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgU2Vjb25kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICBQb2ludCAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgIFRoaXJkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgUG9pbnQgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICBGb3VydGggICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgIFBvaW50ICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgQXBwZW5kZWQgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICBQb2ludCAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAg - EOS - (testpath/"brew.shx").write ::Base64.decode64 <<~EOS - AAAnCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARugDAAALAAAAAAAAAAAAAAAA - AAAAAADwPwAAAAAAABBAAAAAAAAAFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAADIAAAASAAAASAAAABIAAABeAAAAEgAAAHQAAAASAAAA - igAAABI= - EOS - result = shell_output("#{bin}/shp2pgsql #{testpath}/brew.shp") - assert_match /Point/, result - assert_match /AddGeometryColumn/, result - end -end diff --git a/Formula/postgres-xc.rb b/Formula/postgres-xc.rb deleted file mode 100644 index 64b86b494f766..0000000000000 --- a/Formula/postgres-xc.rb +++ /dev/null @@ -1,281 +0,0 @@ -class PostgresXc < Formula - desc "PostgreSQL cluster based on shared-nothing architecture" - homepage "https://postgres-xc.sourceforge.io/" - url "https://downloads.sourceforge.net/project/postgres-xc/Version_1.0/pgxc-v1.0.4.tar.gz" - sha256 "b467cbb7d562a8545645182958efd1608799ed4e04a9c3906211878d477b29c1" - revision 1 - - bottle do - rebuild 1 - sha256 "0b41238976c5eb1c1998845aacdc98d4c5d22adc96a0ff264efb1c55318e1925" => :mojave - sha256 "fa227de1722867aadf57d0868bc137a67f30d79b613fbf713396ba846b33f908" => :high_sierra - sha256 "9219ea92a221cae45f87c8119afbae22a190c396f41972ab2f8019ede381207d" => :sierra - sha256 "8c17e52f8c1171e0a4e36d77180ee5113aa61d35acbe0d11741372d3fe93e9f5" => :el_capitan - sha256 "3dc1e2e4d10cc1cf2604b5bc91c4167257bd84b27a167580d2342e7ab7539428" => :yosemite - end - - depends_on :arch => :x86_64 - depends_on "openssl" - depends_on "ossp-uuid" - depends_on "readline" - - conflicts_with "postgresql", - :because => "postgres-xc and postgresql install the same binaries." - - fails_with :clang do - build 211 - cause "Miscompilation resulting in segfault on queries" - end - - # Fix PL/Python build: https://github.com/Homebrew/homebrew/issues/11162 - patch :DATA - - def install - # Fix uuid-ossp build issues: https://www.postgresql.org/message-id/05843630-E25D-442A-A6B0-5CA63622A400@likeness.com - ENV.append_to_cflags "-D_XOPEN_SOURCE" - # See https://sourceforge.net/p/postgres-xc/mailman/postgres-xc-bugs/thread/82E44F89-543A-44F2-8AF8-F6909B5DC561@uniud.it/ - ENV.append "CFLAGS", "-D_FORTIFY_SOURCE=0 -O2" if MacOS.version >= :mavericks - - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include} -I#{Formula["readline"].opt_include}" - - ENV.append "CFLAGS", `uuid-config --cflags`.strip - ENV.append "LDFLAGS", `uuid-config --ldflags`.strip - ENV.append "LIBS", `uuid-config --libs`.strip - - args = [ - "--disable-debug", - "--prefix=#{prefix}", - "--datadir=#{pkgshare}", - "--docdir=#{doc}", - "--enable-thread-safety", - "--with-bonjour", - "--with-gssapi", - "--with-krb5", - "--with-libxml", - "--with-libxslt", - "--with-openssl", - "--with-ossp-uuid", - "ARCHFLAGS=-arch x86_64", - ] - - system "./configure", *args - - # Building the documentation looks for Jade or OpenJade, neither of which exist on macOS - # or are supplied by Homebrew at this point in time. Disable for now, since error fatal. - inreplace "GNUmakefile", "recurse,install-world,doc-xc src", "recurse,install-world,src" - system "make", "install-world" - - plist_path("gtm").write gtm_startup_plist("gtm") - plist_path("gtm").chmod 0644 - plist_path("gtm_proxy").write gtm_proxy_startup_plist("gtm_proxy") - plist_path("gtm_proxy").chmod 0644 - plist_path("coord").write coordinator_startup_plist("coord") - plist_path("coord").chmod 0644 - plist_path("datanode").write datanode_startup_plist("datanode") - plist_path("datanode").chmod 0644 - end - - def post_install - (var/"postgres-xc").mkpath - end - - def caveats; <<~EOS - To get started with Postgres-XC, read the documents at - https://sourceforge.net/projects/postgres-xc/files/Publication/ - https://postgres-xc.sourceforge.io/docs/1_0/tutorial-start.html - - For a first cluster, you may start with a single GTM (Global Transaction Manager), - a pair of Data Nodes and a single Coordinator, all on the same machine: - - initgtm -Z gtm -D #{var}/postgres-xc/gtm - initdb -D #{var}/postgres-xc/datanode1 --nodename datanode1 - initdb -D #{var}/postgres-xc/datanode2 --nodename datanode2 - initdb -D #{var}/postgres-xc/coord --nodename coord - - Then edit: - - #{var}/postgres-xc/datanode1/postgresql.conf - #{var}/postgres-xc/datanode2/postgresql.conf - - and change the port to 15432 and 15433, respectively. - - Then, launch the nodes and connect to the coordinator: - - gtm -D #{var}/postgres-xc/gtm -l #{var}/postgres-xc/gtm/server.log & - postgres -i -X -D #{var}/postgres-xc/datanode1 -r #{var}/postgres-xc/datanode1/server.log & - postgres -i -X -D #{var}/postgres-xc/datanode2 -r #{var}/postgres-xc/datanode2/server.log & - postgres -i -C -D #{var}/postgres-xc/coord -r #{var}/postgres-xc/coord/server.log & - psql postgres - create node datanode1 with (type='datanode', port=15432); - create node datanode2 with (type='datanode', port=15433); - select * from pgxc_node; - select pgxc_pool_reload(); - - To shutdown everything, kill the processes in reverse order: - - kill -SIGTERM `head -1 #{var}/postgres-xc/coord/postmaster.pid` - kill -SIGTERM `head -1 #{var}/postgres-xc/datanode1/postmaster.pid` - kill -SIGTERM `head -1 #{var}/postgres-xc/datanode2/postmaster.pid` - kill -SIGTERM `head -1 #{var}/postgres-xc/gtm/gtm.pid` - - If you get the following error: - FATAL: could not create shared memory segment: Cannot allocate memory - then you need to tweak your system's shared memory parameters: - https://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC - EOS - end - - plist_options :startup => true - - # Override Formula#plist_name - def plist_name(extra = nil) - extra ? super()+"-"+extra : super()+"-gtm" - end - - # Override Formula#plist_path - def plist_path(extra = nil) - extra ? super().dirname+(plist_name(extra)+".plist") : super() - end - - def gtm_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/gtm - -D - #{var}/postgres-xc/#{name} - -l - #{var}/postgres-xc/#{name}/server.log - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/postgres-xc/#{name}/server.log - - - EOS - end - - def gtm_proxy_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/gtm_proxy - -D - #{var}/postgres-xc/#{name} - -n - 2 - -s - localhost - -t - 6666 - -l - #{var}/postgres-xc/#{name}/server.log - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/postgres-xc/#{name}/server.log - - - EOS - end - - def coordinator_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/postgres - -i - -C - -D - #{var}/postgres-xc/#{name} - -r - #{var}/postgres-xc/#{name}/server.log - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/postgres-xc/#{name}/server.log - - - EOS - end - - def datanode_startup_plist(name); <<~EOS - - - - - KeepAlive - - Label - #{plist_name(name)} - ProgramArguments - - #{opt_bin}/postgres - -i - -X - -D - #{var}/postgres-xc/#{name} - -r - #{var}/postgres-xc/#{name}/server.log - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/postgres-xc/#{name}/server.log - - - EOS - end - - test do - system "#{bin}/initdb", "--nodename=brew", testpath/"test" - assert_predicate testpath/"test", :exist? - end -end - - -__END__ ---- a/src/pl/plpython/Makefile 2011-09-23 08:03:52.000000000 +1000 -+++ b/src/pl/plpython/Makefile 2011-10-26 21:43:40.000000000 +1100 -@@ -24,8 +24,6 @@ - # Darwin (OS X) has its own ideas about how to do this. - ifeq ($(PORTNAME), darwin) - shared_libpython = yes --override python_libspec = -framework Python --override python_additional_libs = - endif - - # If we don't have a shared library and the platform doesn't allow it diff --git a/Formula/postgresql.rb b/Formula/postgresql.rb deleted file mode 100644 index fcea59e6b9ce7..0000000000000 --- a/Formula/postgresql.rb +++ /dev/null @@ -1,125 +0,0 @@ -class Postgresql < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v11.1/postgresql-11.1.tar.bz2" - sha256 "90815e812874831e9a4bf6e1136bf73bc2c5a0464ef142e2dfea40cda206db08" - head "https://github.com/postgres/postgres.git" - - bottle do - sha256 "d82e5ff0b8996cd40daba78d9279c94def44e653899084bda9f218c4bafc7253" => :mojave - sha256 "9c9f814e08bc7a28105e326a04271031c38dd8e0e5da3781434dcca9ceb364a5" => :high_sierra - sha256 "eacc5bd8eac9c6f77831346095393f6ed0361d1697f0fe071927e7c556ff1a86" => :sierra - end - - option "with-python", "Enable PL/Python3" - - deprecated_option "with-python3" => "with-python" - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "openssl" - depends_on "readline" - depends_on "python" => :optional - - conflicts_with "postgres-xc", - :because => "postgresql and postgres-xc install the same binaries." - - def install - # avoid adding the SDK library directory to the linker search path - ENV["XML2_CONFIG"] = "xml2-config --exec-prefix=/usr" - - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include} -I#{Formula["readline"].opt_include}" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --datadir=#{HOMEBREW_PREFIX}/share/postgresql - --libdir=#{HOMEBREW_PREFIX}/lib - --sysconfdir=#{etc} - --docdir=#{doc} - --enable-thread-safety - --with-bonjour - --with-gssapi - --with-icu - --with-ldap - --with-libxml - --with-libxslt - --with-openssl - --with-pam - --with-perl - --with-uuid=e2fs - ] - - if build.with?("python") - args << "--with-python" - ENV["PYTHON"] = which("python3") - end - - # The CLT is required to build Tcl support on 10.7 and 10.8 because - # tclConfig.sh is not part of the SDK - if MacOS.version >= :mavericks || MacOS::CLT.installed? - args << "--with-tcl" - if File.exist?("#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/tclConfig.sh") - args << "--with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework" - end - end - - system "./configure", *args - system "make" - system "make", "install-world", "datadir=#{pkgshare}", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql" - end - - def post_install - (var/"log").mkpath - (var/"postgres").mkpath - unless File.exist? "#{var}/postgres/PG_VERSION" - system "#{bin}/initdb", "#{var}/postgres" - end - end - - def caveats; <<~EOS - To migrate existing data from a previous major version of PostgreSQL run: - brew postgresql-upgrade-database - EOS - end - - plist_options :manual => "pg_ctl -D #{HOMEBREW_PREFIX}/var/postgres start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/postgres - -D - #{var}/postgres - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/log/postgres.log - StandardErrorPath - #{var}/log/postgres.log - - - EOS - end - - test do - system "#{bin}/initdb", testpath/"test" - assert_equal "#{HOMEBREW_PREFIX}/share/postgresql", shell_output("#{bin}/pg_config --sharedir").chomp - assert_equal "#{HOMEBREW_PREFIX}/lib", shell_output("#{bin}/pg_config --libdir").chomp - assert_equal "#{HOMEBREW_PREFIX}/lib/postgresql", shell_output("#{bin}/pg_config --pkglibdir").chomp - end -end diff --git a/Formula/postgresql@10.rb b/Formula/postgresql@10.rb deleted file mode 100644 index efbd3875726de..0000000000000 --- a/Formula/postgresql@10.rb +++ /dev/null @@ -1,136 +0,0 @@ -class PostgresqlAT10 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v10.6/postgresql-10.6.tar.bz2" - sha256 "68a8276f08bda8fbefe562faaf8831cb20664a7a1d3ffdbbcc5b83e08637624b" - - bottle do - rebuild 1 - sha256 "16a3c8380446f2e3b4356acd47217afbdb5b1dc8c6acede4e7834dfff897d4f8" => :mojave - sha256 "cd4719c624150c163a6b52d5135742088d608e31c7b668531e91516bbbfcf100" => :high_sierra - sha256 "e5565c3fe490a6f5fb703b2aaca8228a23fd97d94585169667a61dc9b1780ff9" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "openssl" - depends_on "readline" - - def install - # avoid adding the SDK library directory to the linker search path - ENV["XML2_CONFIG"] = "xml2-config --exec-prefix=/usr" - - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include} -I#{Formula["readline"].opt_include}" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --datadir=#{pkgshare} - --libdir=#{lib} - --sysconfdir=#{etc} - --docdir=#{doc} - --enable-thread-safety - --with-bonjour - --with-gssapi - --with-icu - --with-ldap - --with-libxml - --with-libxslt - --with-openssl - --with-pam - --with-perl - --with-uuid=e2fs - ] - - # The CLT is required to build Tcl support on 10.7 and 10.8 because - # tclConfig.sh is not part of the SDK - if MacOS.version >= :mavericks || MacOS::CLT.installed? - args << "--with-tcl" - if File.exist?("#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/tclConfig.sh") - args << "--with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework" - end - end - - # As of Xcode/CLT 10.x the Perl headers were moved from /System - # to inside the SDK, so we need to use `-iwithsysroot` instead - # of `-I` to point to the correct location. - # https://www.postgresql.org/message-id/153558865647.1483.573481613491501077%40wrigleys.postgresql.org - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib} -R#{lib}/postgresql" - - system "./configure", *args - system "make" - - # pkglibdir=#{lib}/postgresql - dirs = %W[datadir=#{pkgshare} libdir=#{lib} pkglibdir=#{lib}] - - # Temporarily disable building/installing the documentation. - # Postgresql seems to "know" the build system has been altered and - # tries to regenerate the documentation when using `install-world`. - # This results in the build failing: - # `ERROR: `osx' is missing on your system.` - # Attempting to fix that by adding a dependency on `open-sp` doesn't - # work and the build errors out on generating the documentation, so - # for now let's simply omit it so we can package Postgresql for Mojave. - if DevelopmentTools.clang_build_version >= 1000 - system "make", "all" - system "make", "-C", "contrib", "install", "all", *dirs - system "make", "install", "all", *dirs - else - system "make", "install-world", *dirs - end - end - - def post_install - (var/"log").mkpath - (var/"postgres").mkpath - unless File.exist? "#{var}/postgres/PG_VERSION" - system "#{bin}/initdb", "#{var}/postgres" - end - end - - def caveats; <<~EOS - To migrate existing data from a previous major version of PostgreSQL run: - brew postgresql-upgrade-database - EOS - end - - plist_options :manual => "pg_ctl -D #{HOMEBREW_PREFIX}/var/postgresql@10 start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/postgres - -D - #{var}/#{name} - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/log/#{name}.log - StandardErrorPath - #{var}/log/#{name}.log - - - EOS - end - - test do - system "#{bin}/initdb", testpath/"test" - assert_equal pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp - assert_equal lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp - assert_equal lib.to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp - end -end diff --git a/Formula/postgresql@9.4.rb b/Formula/postgresql@9.4.rb deleted file mode 100644 index 0a43a0b42a50c..0000000000000 --- a/Formula/postgresql@9.4.rb +++ /dev/null @@ -1,143 +0,0 @@ -class PostgresqlAT94 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v9.4.19/postgresql-9.4.19.tar.bz2" - sha256 "03776b036b2a05371083558e10c21cc4b90bde9eb3aff60299c4ce7c084c168b" - - bottle do - rebuild 1 - sha256 "bf71496f747f1e90c621ffc1e6ad3b131e06e4bf23e7b93e75433cbb0dccddf6" => :mojave - sha256 "687baf2e20e8c7e839c83ae4225d7e4e125d0adb5ce1774cde11c59395330c0b" => :high_sierra - sha256 "cdc01c855445b500b4fe65dc6a2051f76b6276310c00656f8ba427583d5acc36" => :sierra - sha256 "6553e72e7f9ef8dd4263a3723369b7e46b4e1227eec868ffd6a576b6b8f25706" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "openssl" - depends_on "readline" - - def install - # Fix "configure: error: readline library not found" - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include} -I#{Formula["readline"].opt_include}" - ENV.append_to_cflags "-D_XOPEN_SOURCE" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --datadir=#{pkgshare} - --docdir=#{doc} - --enable-thread-safety - --with-bonjour - --with-gssapi - --with-ldap - --with-openssl - --with-pam - --with-libxml - --with-libxslt - --with-perl - --with-uuid=e2fs - ] - - # The CLT is required to build tcl support on 10.7 and 10.8 because tclConfig.sh is not part of the SDK - if MacOS.version >= :mavericks || MacOS::CLT.installed? - args << "--with-tcl" - if File.exist?("#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/tclConfig.sh") - args << "--with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework" - end - end - - # As of Xcode/CLT 10.x the Perl headers were moved from /System - # to inside the SDK, so we need to use `-iwithsysroot` instead - # of `-I` to point to the correct location. - # https://www.postgresql.org/message-id/153558865647.1483.573481613491501077%40wrigleys.postgresql.org - if DevelopmentTools.clang_build_version >= 1000 - inreplace "configure", - "-I$perl_archlibexp/CORE", - "-iwithsysroot $perl_archlibexp/CORE" - inreplace "src/pl/plperl/GNUmakefile", - "-I$(perl_archlibexp)/CORE", - "-iwithsysroot $(perl_archlibexp)/CORE" - end - - system "./configure", *args - - # Temporarily disable building/installing the documentation. - # Postgresql seems to "know" the build system has been altered and - # tries to regenerate the documentation when using `install-world`. - # This results in the build failing: - # `ERROR: `osx' is missing on your system.` - # Attempting to fix that by adding a dependency on `open-sp` doesn't - # work and the build errors out on generating the documentation, so - # for now let's simply omit it so we can package Postgresql for Mojave. - if DevelopmentTools.clang_build_version >= 1000 - system "make", "all" - system "make", "-C", "contrib", "install", "all" - system "make", "install", "all" - else - system "make", "install-world" - end - end - - def post_install - (var/"log").mkpath - (var/name).mkpath - unless File.exist? "#{var}/#{name}/PG_VERSION" - system "#{bin}/initdb", "#{var}/#{name}" - end - end - - def caveats - <<~EOS - If builds of PostgreSQL 9 are failing and you have version 8.x installed, - you may need to remove the previous version first. See: - https://github.com/Homebrew/legacy-homebrew/issues/2510 - - To migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see: - https://www.postgresql.org/docs/9.3/static/upgrading.html - - When installing the postgres gem, including ARCHFLAGS is recommended: - ARCHFLAGS="-arch x86_64" gem install pg - - To install gems without sudo, see the Homebrew documentation: - https://docs.brew.sh/Gems,-Eggs-and-Perl-Modules - EOS - end - - plist_options :manual => "pg_ctl -D #{HOMEBREW_PREFIX}/var/postgresql@9.4 start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/postgres - -D - #{var}/#{name} - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/#{name}.log - - - EOS - end - - test do - system "#{bin}/initdb", testpath/"test" - end -end diff --git a/Formula/postgresql@9.5.rb b/Formula/postgresql@9.5.rb deleted file mode 100644 index c3fc05b5740c1..0000000000000 --- a/Formula/postgresql@9.5.rb +++ /dev/null @@ -1,151 +0,0 @@ -class PostgresqlAT95 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v9.5.14/postgresql-9.5.14.tar.bz2" - sha256 "3e2cd5ea0117431f72c9917c1bbad578ea68732cb284d1691f37356ca0301a4d" - - bottle do - rebuild 1 - sha256 "f1c97a44291531e70d037b91f82d9a902456fa31cc6bbd873a72b95ea335c4d5" => :mojave - sha256 "67ebc5e4f2232d9dad5be6216df6e0230133c5d03b768372b815250d179edf40" => :high_sierra - sha256 "03880c89fae2a5c0939147cc2c95ef35f325f945719afbb534f3bf86ee5859a1" => :sierra - sha256 "00907721406b25d94072d18e0c0cd927b2ac5be9a13681c17e90e9de07b1cd27" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "openssl" - depends_on "readline" - - def install - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include} -I#{Formula["readline"].opt_include}" - - # avoid adding the SDK library directory to the linker search path - ENV["XML2_CONFIG"] = "xml2-config --exec-prefix=/usr" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --datadir=#{pkgshare} - --libdir=#{lib} - --sysconfdir=#{prefix}/etc - --docdir=#{doc} - --enable-thread-safety - --with-bonjour - --with-gssapi - --with-ldap - --with-libxml - --with-libxslt - --with-openssl - --with-pam - --with-perl - --with-uuid=e2fs - ] - - # The CLT is required to build Tcl support on 10.7 and 10.8 because - # tclConfig.sh is not part of the SDK - if MacOS.version >= :mavericks || MacOS::CLT.installed? - args << "--with-tcl" - if File.exist?("#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/tclConfig.sh") - args << "--with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework" - end - end - - # As of Xcode/CLT 10.x the Perl headers were moved from /System - # to inside the SDK, so we need to use `-iwithsysroot` instead - # of `-I` to point to the correct location. - # https://www.postgresql.org/message-id/153558865647.1483.573481613491501077%40wrigleys.postgresql.org - if DevelopmentTools.clang_build_version >= 1000 - inreplace "configure", - "-I$perl_archlibexp/CORE", - "-iwithsysroot $perl_archlibexp/CORE" - inreplace "contrib/hstore_plperl/Makefile", - "-I$(perl_archlibexp)/CORE", - "-iwithsysroot $(perl_archlibexp)/CORE" - inreplace "src/pl/plperl/GNUmakefile", - "-I$(perl_archlibexp)/CORE", - "-iwithsysroot $(perl_archlibexp)/CORE" - end - - system "./configure", *args - system "make" - - dirs = %W[datadir=#{pkgshare} libdir=#{lib} pkglibdir=#{lib}] - - # Temporarily disable building/installing the documentation. - # Postgresql seems to "know" the build system has been altered and - # tries to regenerate the documentation when using `install-world`. - # This results in the build failing: - # `ERROR: `osx' is missing on your system.` - # Attempting to fix that by adding a dependency on `open-sp` doesn't - # work and the build errors out on generating the documentation, so - # for now let's simply omit it so we can package Postgresql for Mojave. - if DevelopmentTools.clang_build_version >= 1000 - system "make", "all" - system "make", "-C", "contrib", "install", "all", *dirs - system "make", "install", "all", *dirs - else - system "make", "install-world", *dirs - end - end - - def post_install - (var/"log").mkpath - (var/name).mkpath - unless File.exist? "#{var}/#{name}/PG_VERSION" - system "#{bin}/initdb", "#{var}/#{name}" - end - end - - def caveats; <<~EOS - If builds of PostgreSQL 9 are failing and you have version 8.x installed, - you may need to remove the previous version first. See: - https://github.com/Homebrew/legacy-homebrew/issues/2510 - - To migrate existing data from a previous major version (pre-9.0) of PostgreSQL, see: - https://www.postgresql.org/docs/9.5/static/upgrading.html - - To migrate existing data from a previous minor version (9.0-9.4) of PostgreSQL, see: - https://www.postgresql.org/docs/9.5/static/pgupgrade.html - - You will need your previous PostgreSQL installation from brew to perform `pg_upgrade`. - Do not run `brew cleanup postgresql@9.5` until you have performed the migration. - EOS - end - - plist_options :manual => "pg_ctl -D #{HOMEBREW_PREFIX}/var/postgresql@9.5 start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/postgres - -D - #{var}/#{name} - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/#{name}.log - - - EOS - end - - test do - system "#{bin}/initdb", testpath/"test" - assert_equal pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp - assert_equal lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp - assert_equal lib.to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp - end -end diff --git a/Formula/postgresql@9.6.rb b/Formula/postgresql@9.6.rb deleted file mode 100644 index ea74ec415d421..0000000000000 --- a/Formula/postgresql@9.6.rb +++ /dev/null @@ -1,151 +0,0 @@ -class PostgresqlAT96 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v9.6.10/postgresql-9.6.10.tar.bz2" - sha256 "8615acc56646401f0ede97a767dfd27ce07a8ae9c952afdb57163b7234fe8426" - - bottle do - rebuild 1 - sha256 "50f7b551e865c43c91507073c44bf454c22f52889326a161b033888dfaba190f" => :mojave - sha256 "da0d71fb4913b6ad4fc959a770295416b69c7d04ceb3995b5d46006949fc1c46" => :high_sierra - sha256 "ab319da939279bf3409c03ea44885dc96fff01b973c3c20c250b5a52478abc3a" => :sierra - sha256 "eb38e039d8390e99f13deb51be32ec9543437f9804bcd9fe391698d8d2ce37df" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "openssl" - depends_on "readline" - - def install - # avoid adding the SDK library directory to the linker search path - ENV["XML2_CONFIG"] = "xml2-config --exec-prefix=/usr" - - ENV.prepend "LDFLAGS", "-L#{Formula["openssl"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl"].opt_include} -I#{Formula["readline"].opt_include}" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --datadir=#{pkgshare} - --libdir=#{lib} - --sysconfdir=#{prefix}/etc - --docdir=#{doc} - --enable-thread-safety - --with-bonjour - --with-gssapi - --with-ldap - --with-openssl - --with-pam - --with-libxml - --with-libxslt - --with-perl - --with-uuid=e2fs - ] - - # The CLT is required to build Tcl support on 10.7 and 10.8 because - # tclConfig.sh is not part of the SDK - if MacOS.version >= :mavericks || MacOS::CLT.installed? - args << "--with-tcl" - if File.exist?("#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/tclConfig.sh") - args << "--with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework" - end - end - - # As of Xcode/CLT 10.x the Perl headers were moved from /System - # to inside the SDK, so we need to use `-iwithsysroot` instead - # of `-I` to point to the correct location. - # https://www.postgresql.org/message-id/153558865647.1483.573481613491501077%40wrigleys.postgresql.org - if DevelopmentTools.clang_build_version >= 1000 - inreplace "configure", - "-I$perl_archlibexp/CORE", - "-iwithsysroot $perl_archlibexp/CORE" - inreplace "contrib/hstore_plperl/Makefile", - "-I$(perl_archlibexp)/CORE", - "-iwithsysroot $(perl_archlibexp)/CORE" - inreplace "src/pl/plperl/GNUmakefile", - "-I$(perl_archlibexp)/CORE", - "-iwithsysroot $(perl_archlibexp)/CORE" - end - - system "./configure", *args - system "make" - - dirs = %W[datadir=#{pkgshare} libdir=#{lib} pkglibdir=#{lib}] - - # Temporarily disable building/installing the documentation. - # Postgresql seems to "know" the build system has been altered and - # tries to regenerate the documentation when using `install-world`. - # This results in the build failing: - # `ERROR: `osx' is missing on your system.` - # Attempting to fix that by adding a dependency on `open-sp` doesn't - # work and the build errors out on generating the documentation, so - # for now let's simply omit it so we can package Postgresql for Mojave. - if DevelopmentTools.clang_build_version >= 1000 - system "make", "all" - system "make", "-C", "contrib", "install", "all", *dirs - system "make", "install", "all", *dirs - else - system "make", "install-world", *dirs - end - end - - def post_install - (var/"log").mkpath - (var/name).mkpath - unless File.exist? "#{var}/#{name}/PG_VERSION" - system "#{bin}/initdb", "#{var}/#{name}" - end - end - - def caveats; <<~EOS - If builds of PostgreSQL 9 are failing and you have version 8.x installed, - you may need to remove the previous version first. See: - https://github.com/Homebrew/legacy-homebrew/issues/2510 - - To migrate existing data from a previous major version (pre-9.0) of PostgreSQL, see: - https://www.postgresql.org/docs/9.6/static/upgrading.html - - To migrate existing data from a previous minor version (9.0-9.5) of PostgreSQL, see: - https://www.postgresql.org/docs/9.6/static/pgupgrade.html - - You will need your previous PostgreSQL installation from brew to perform `pg_upgrade`. - Do not run `brew cleanup postgresql@9.6` until you have performed the migration. - EOS - end - - plist_options :manual => "pg_ctl -D #{HOMEBREW_PREFIX}/var/postgresql@9.6 start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/postgres - -D - #{var}/#{name} - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/#{name}.log - - - EOS - end - - test do - system "#{bin}/initdb", testpath/"test" - assert_equal pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp - assert_equal lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp - assert_equal lib.to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp - end -end diff --git a/Formula/postgrest.rb b/Formula/postgrest.rb deleted file mode 100644 index 3cd5be6b9ec78..0000000000000 --- a/Formula/postgrest.rb +++ /dev/null @@ -1,72 +0,0 @@ -require "language/haskell" -require "net/http" - -class Postgrest < Formula - include Language::Haskell::Cabal - - desc "Serves a fully RESTful API from any existing PostgreSQL database" - homepage "https://github.com/PostgREST/postgrest" - url "https://github.com/PostgREST/postgrest/archive/v0.5.0.0.tar.gz" - sha256 "cfc9a6477d0f087051f654a0a7070804db388ed3c97e4e68d7d286e82d5be4b8" - head "https://github.com/PostgREST/postgrest.git" - - bottle do - cellar :any - sha256 "ea1508ab22eaffe64955cbdd76647854e289d9ed3b6172e0fdd1a220fe2e6815" => :high_sierra - sha256 "fba956125442f3db5548fce364269c98b599ed5c762992941c4461c9c60ca693" => :sierra - sha256 "bfea24b8036f2bd5a81271cada5248f96ff0bc8ecf88492b4240cf77187b99e2" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.2" => :build - depends_on "postgresql" - - # Fix build failure with protolude 0.2.2 and hasql-transaction 0.6 - # Upstream PR 14 May 2018 "postgrest.cabal: fix constraints on protolude and - # hasql-transaction" - patch do - url "https://github.com/PostgREST/postgrest/pull/1111.patch?full_index=1" - sha256 "c740da96fb0dfb4a920d9f5091ec34fafcf9d8fe53b4eadda3cbdc80b02d09cd" - end - - def install - install_cabal_package :using => ["happy"] - end - - test do - pg_bin = Formula["postgresql"].bin - pg_port = 55561 - pg_user = "postgrest_test_user" - test_db = "test_postgrest_formula" - - system "#{pg_bin}/initdb", "-D", testpath/test_db, - "--auth=trust", "--username=#{pg_user}" - - system "#{pg_bin}/pg_ctl", "-D", testpath/test_db, "-l", - testpath/"#{test_db}.log", "-w", "-o", %Q("-p #{pg_port}"), "start" - - begin - system "#{pg_bin}/createdb", "-w", "-p", pg_port, "-U", pg_user, test_db - (testpath/"postgrest.config").write <<~EOS - db-uri = "postgres://#{pg_user}@localhost:#{pg_port}/#{test_db}" - db-schema = "public" - db-anon-role = "#{pg_user}" - server-port = 55560 - EOS - pid = fork do - exec "#{bin}/postgrest", "postgrest.config" - end - Process.detach(pid) - sleep(5) # Wait for the server to start - response = Net::HTTP.get(URI("http://localhost:55560")) - assert_match /responses.*200.*OK/, response - ensure - begin - Process.kill("TERM", pid) if pid - ensure - system "#{pg_bin}/pg_ctl", "-D", testpath/test_db, "stop", - "-s", "-m", "fast" - end - end - end -end diff --git a/Formula/postmark.rb b/Formula/postmark.rb deleted file mode 100644 index 8938cce814b40..0000000000000 --- a/Formula/postmark.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Postmark < Formula - desc "File system benchmark from NetApp" - homepage "https://packages.debian.org/sid/postmark" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/p/postmark/postmark_1.53.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/p/postmark/postmark_1.53.orig.tar.gz" - sha256 "8a88fd322e1c5f0772df759de73c42aa055b1cd36cbba4ce6ee610ac5a3c47d3" - - bottle do - cellar :any_skip_relocation - sha256 "df5e68b280b40151c28cefb46a97605044af5c0e879f73a6d972676007aeffe6" => :mojave - sha256 "0e7f59c257967fd72381d86fca353c88f4af9d4843c0aa9e3eb4f606a6619fc4" => :high_sierra - sha256 "9d702b7bc49f646fd1623b316fd62c84ee6413e035a81e95866b0ca7240f100e" => :sierra - sha256 "784b46fe9883d27d347a44da73413ccf5c589088c0b57da577ebc1c79e64e1e6" => :el_capitan - sha256 "7fb38c3960e124a836cdc48650fd5f4d1fc446897b590e0dd6b6b6b5cbdec522" => :yosemite - sha256 "2ccb3812b371bc02e66d84ff853cb9684f8941485af3287424b4c183205bc649" => :mavericks - end - - def install - system ENV.cc, "-o", "postmark", "postmark-#{version}.c" - bin.install "postmark" - man1.install "postmark.1" - end - - test do - (testpath/"config").write <<~EOS - set transactions 50 - set location #{testpath} - run - EOS - - output = pipe_output("#{bin}/postmark #{testpath}/config") - assert_match /(50 per second)/, output - end -end diff --git a/Formula/potrace.rb b/Formula/potrace.rb deleted file mode 100644 index 91dd833024e02..0000000000000 --- a/Formula/potrace.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Potrace < Formula - desc "Convert bitmaps to vector graphics" - homepage "https://potrace.sourceforge.io/" - url "https://potrace.sourceforge.io/download/1.15/potrace-1.15.tar.gz" - sha256 "a9b33904ace328340c850a01458199e0064e03ccaaa731bc869a842b1b8d529d" - - bottle do - cellar :any - sha256 "3d25cc97a832eb016be11e133d0196308b0b3dd21b2f62302215ba566ee77399" => :mojave - sha256 "f98e3daaed06c6296d446c53087b82a7e100eb3407d41075e706e66327c26f95" => :high_sierra - sha256 "b71fa6c507b43df9e48dc0259e5dfb803a13c9728ffd6978b9798d03da363e0d" => :sierra - sha256 "318e2448e2596b9629537edc4e5c408ea4e1f538ec6f1d90b17589aced9836ff" => :el_capitan - sha256 "dad163b773ea01123ccefc6a9ddba7d02c234fe384a9a41e6029887c319ececc" => :yosemite - end - - resource "head.pbm" do - url "https://potrace.sourceforge.io/img/head.pbm" - sha256 "3c8dd6643b43cf006b30a7a5ee9604efab82faa40ac7fbf31d8b907b8814814f" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-libpotrace" - system "make", "install" - end - - test do - resource("head.pbm").stage testpath - system "#{bin}/potrace", "-o", "test.eps", "head.pbm" - assert_predicate testpath/"test.eps", :exist? - end -end diff --git a/Formula/pound.rb b/Formula/pound.rb deleted file mode 100644 index 3e0e9d9d0ff98..0000000000000 --- a/Formula/pound.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Pound < Formula - desc "Reverse proxy, load balancer and HTTPS front-end for web servers" - homepage "http://www.apsis.ch/pound" - url "http://www.apsis.ch/pound/Pound-2.8.tgz" - sha256 "a7fd8690de0fd390615e79fd0f4bfd56a544b8ef97dd6659c07ecd3207480c25" - - bottle do - sha256 "3ac2ac693cb4fdaceec7bd76f53194b52547385d583c798021973b40f9ab951f" => :mojave - sha256 "2b8c55bbd7d5fd6596766f186289cbb239789b50e1cc9854916107738cc216f6" => :high_sierra - sha256 "c39e63c7e5e173faf98a8be51df5ec7ea2d3347b912d62cd8b051955b3f75c91" => :sierra - sha256 "d16c3c0aba3eafe8f50bc4e79401a0ce3129519860d0b3bca8cdfd10023ff7b5" => :el_capitan - end - - depends_on "gperftools" - depends_on "openssl" - depends_on "pcre" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-tcmalloc" - system "make" - # Manual install to get around group issues - sbin.install "pound", "poundctl" - man8.install "pound.8", "poundctl.8" - end - - test do - (testpath/"pound.cfg").write <<~EOS - ListenHTTP - Address 1.2.3.4 - Port 80 - Service - HeadRequire "Host: .*www.server0.com.*" - BackEnd - Address 192.168.0.10 - Port 80 - End - End - End - EOS - - system "#{sbin}/pound", "-f", "#{testpath}/pound.cfg", "-c" - end -end diff --git a/Formula/povray.rb b/Formula/povray.rb deleted file mode 100644 index 2c4c620068844..0000000000000 --- a/Formula/povray.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Povray < Formula - desc "Persistence Of Vision RAYtracer (POVRAY)" - homepage "https://www.povray.org/" - url "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz" - sha256 "53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4" - revision 1 - - bottle do - rebuild 1 - sha256 "eae4cf975215cdfdeadb665c53061c6ed2b4f9fa95121e7145222409b0e44c56" => :mojave - sha256 "4472bb00380eb26d3045dd5e67effa4f75934936263129009f9a80bbf5290633" => :high_sierra - sha256 "f21cb29c30c8367aa14f6a4485bf03377f23e30b2e7178be466d12bb84be26a9" => :sierra - sha256 "f2f0bf20fbe2d5b1ce91ecdf4eca52e4a544323910febae396d8b9fb1c0044ec" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "boost" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on :macos => :lion - depends_on "openexr" - - needs :cxx11 - - def install - ENV.cxx11 - - args = %W[ - COMPILED_BY=homebrew - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --with-boost=#{Formula["boost"].opt_prefix} - --with-openexr=#{Formula["openexr"].opt_prefix} - --without-libsdl - --without-x - ] - - # Adjust some scripts to search for `etc` in HOMEBREW_PREFIX. - %w[allanim allscene portfolio].each do |script| - inreplace "unix/scripts/#{script}.sh", - /^DEFAULT_DIR=.*$/, "DEFAULT_DIR=#{HOMEBREW_PREFIX}" - end - - cd "unix" do - system "./prebuild.sh" - end - - system "./configure", *args - system "make", "install" - end - - test do - # Condensed version of `share/povray-3.7/scripts/allscene.sh` that only - # renders variants of the famous Utah teapot as a quick smoke test. - scenes = Dir["#{share}/povray-3.7/scenes/advanced/teapot/*.pov"] - assert !scenes.empty?, "Failed to find test scenes." - scenes.each do |scene| - system "#{share}/povray-3.7/scripts/render_scene.sh", ".", scene - end - end -end diff --git a/Formula/pow.rb b/Formula/pow.rb deleted file mode 100644 index 2679f14e2aff8..0000000000000 --- a/Formula/pow.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Pow < Formula - desc "Zero-config Rack server for local apps on macOS" - homepage "http://pow.cx/" - url "http://get.pow.cx/versions/0.6.0.tar.gz" - sha256 "225e52bdc0ace5747197a5ece777785245110e576a5136a3d17136ab88a74364" - - bottle :unneeded - - depends_on "node" - - def install - libexec.install Dir["*"] - (bin/"pow").write <<~EOS - #!/bin/sh - export POW_BIN="#{bin}/pow" - exec "#{Formula["node"].opt_bin}/node" "#{libexec}/lib/command.js" "$@" - EOS - end - - def caveats - <<~EOS - Create the required host directories: - mkdir -p ~/Library/Application\\ Support/Pow/Hosts - ln -s ~/Library/Application\\ Support/Pow/Hosts ~/.pow - - Setup port 80 forwarding and launchd agents: - sudo pow --install-system - pow --install-local - - Load launchd agents: - sudo launchctl load -w /Library/LaunchDaemons/cx.pow.firewall.plist - launchctl load -w ~/Library/LaunchAgents/cx.pow.powd.plist - EOS - end -end diff --git a/Formula/powerman.rb b/Formula/powerman.rb deleted file mode 100644 index c8d4e931b72a3..0000000000000 --- a/Formula/powerman.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Powerman < Formula - desc "Control (remotely and in parallel) switched power distribution units" - homepage "https://code.google.com/p/powerman/" - url "https://github.com/chaos/powerman/releases/download/2.3.24/powerman-2.3.24.tar.gz" - sha256 "85d5d0e0aef05a1637a8efe58f436f1548d2411c98c90c1616d22ee79c19d275" - - bottle do - sha256 "1c5fc630daa743f59a60d9db27d4660aa02a8d629e40d3dfeb6d8a77ebb8246f" => :mojave - sha256 "d451560676e07f1ae3f3d8b72c025bc8ad77cd9c31f52bb52cbc96e3f82ce178" => :high_sierra - sha256 "c31cb738ebc06c20c07cd2c6c10ff69bd21df62657cbf7f5d08a8a54317f0fc5" => :sierra - sha256 "26b893065e1f5e2f345d8b75fe2770bb4616fb62d7aec73022c4472df8158b2a" => :el_capitan - sha256 "e90be29b1ab6ab310f39775973edbaa647a0ac12d81bbde374bbc5ed262c317c" => :yosemite - sha256 "412042f83e03f1cbd9e285b1566bb785471dd79f93049df8bbfdde3544122a24" => :mavericks - end - - head do - url "https://github.com/chaos/powerman.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "curl" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--with-httppower", - "--with-ncurses", - "--without-genders", - "--without-snmppower", - "--without-tcp-wrappers" - system "make", "install" - end - - test do - system "#{sbin}/powermand", "-h" - end -end diff --git a/Formula/ppl.rb b/Formula/ppl.rb deleted file mode 100644 index 2a047072bad89..0000000000000 --- a/Formula/ppl.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Ppl < Formula - desc "Parma Polyhedra Library: numerical abstractions for analysis, verification" - homepage "https://bugseng.com/ppl" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/p/ppl/ppl_1.2.orig.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/p/ppl/ppl_1.2.orig.tar.xz" - sha256 "691f0d5a4fb0e206f4e132fc9132c71d6e33cdda168470d40ac3cf62340e9a60" - - bottle do - rebuild 1 - sha256 "59aa81dbfdc59de055e528724282fb0a1f7c627fc4bbc2f6b2d026e0c623db6c" => :mojave - sha256 "c6ff41541033e2c27648dff1c336aa0d4548f80fb355569f1e6677991ae6436f" => :high_sierra - sha256 "f9aef2f3cfb6bfd0732b544e836baf59f279efc9830531f104509b11d8964b0d" => :sierra - end - - depends_on "gmp" - - # Fix compilation with Xcode 10 - # Upstream commit, remove for next version - patch do - url "http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commitdiff_plain;h=c39f6a07b51f89e365b05ba4147aa2aa448febd7" - sha256 "6786f432784b74b81805b1d97e97cd1cc9f68653077681bb4f531466cbf8dc99" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-gmp=#{Formula["gmp"].opt_prefix}", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #ifndef PPL_VERSION_MAJOR - #error "No PPL header" - #endif - int main() { - ppl_initialize(); - return ppl_finalize(); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lppl_c", "-lppl", "-o", "test" - system "./test" - end -end diff --git a/Formula/ppss.rb b/Formula/ppss.rb deleted file mode 100644 index 2d50da410e555..0000000000000 --- a/Formula/ppss.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Ppss < Formula - desc "Shell script to execute commands in parallel" - homepage "https://github.com/louwrentius/PPSS" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ppss/ppss-2.97.tgz" - sha256 "25d819a97d8ca04a27907be4bfcc3151712837ea12a671f1a3c9e58bc025360f" - - bottle :unneeded - - def install - bin.install "ppss" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ppss --version") - end -end diff --git a/Formula/ppsspp.rb b/Formula/ppsspp.rb deleted file mode 100644 index 2ed53638bfb9b..0000000000000 --- a/Formula/ppsspp.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ppsspp < Formula - desc "PlayStation Portable emulator" - homepage "https://ppsspp.org/" - url "https://github.com/hrydgard/ppsspp.git", - :tag => "v1.7.5", - :revision => "74d87fa2b4a3c943c1df09cc26a8c70b1335fd30" - head "https://github.com/hrydgard/ppsspp.git" - - bottle do - cellar :any - sha256 "7764875931cd896e2af50763b49c435642d0343df8ff3e4a143a9a9b35d271ac" => :mojave - sha256 "0cfb5a660f2915328c5e43734b4b0d7509b8a12a94d488df9d5d7c14beb457f4" => :high_sierra - sha256 "c9b297d4396304995564a102555a15525ff863bd72ad74b50cd8765da957df4d" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "glew" - depends_on "libzip" - depends_on "sdl2" - depends_on "snappy" - - def install - args = std_cmake_args - # Use brewed FFmpeg rather than precompiled binaries in the repo - args << "-DUSE_SYSTEM_FFMPEG=ON" - - # fix missing include for zipconf.h - ENV.append_to_cflags "-I#{Formula["libzip"].opt_prefix}/lib/libzip/include" - - mkdir "build" do - system "cmake", "..", *args - system "make" - prefix.install "PPSSPPSDL.app" - bin.write_exec_script "#{prefix}/PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL" - mv "#{bin}/PPSSPPSDL", "#{bin}/ppsspp" - end - end -end diff --git a/Formula/pqiv.rb b/Formula/pqiv.rb deleted file mode 100644 index 019ebb8958759..0000000000000 --- a/Formula/pqiv.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pqiv < Formula - desc "Powerful image viewer with minimal UI" - homepage "https://github.com/phillipberndt/pqiv" - url "https://github.com/phillipberndt/pqiv/archive/2.11.tar.gz" - sha256 "ea1f8b6bcb58dee19e2d8168ef4efd01e222c653eabbd3109aad57a870cc8c9b" - head "https://github.com/phillipberndt/pqiv.git" - - bottle do - cellar :any - sha256 "bb4071cdad65798b3ab3c1c55f7bb4e3ad42d17baebce931b3c49962cbf7afae" => :mojave - sha256 "9c6b2cbef946577e7736a9e3a5926808c66034e58a44fc0002cc83459e0b526a" => :high_sierra - sha256 "25d7864b81b2bd292a14ddf46ad855244f8821b4f290eb222b8e674fa388c617" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+3" - depends_on "imagemagick" - depends_on "libarchive" - depends_on "libspectre" - depends_on "poppler" - depends_on "webp" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/pqiv --version 2>&1") - end -end diff --git a/Formula/pre-commit.rb b/Formula/pre-commit.rb deleted file mode 100644 index 81dc0c834265f..0000000000000 --- a/Formula/pre-commit.rb +++ /dev/null @@ -1,61 +0,0 @@ -class PreCommit < Formula - include Language::Python::Virtualenv - - desc "Framework for managing multi-language pre-commit hooks" - homepage "https://pre-commit.com/" - url "https://github.com/pre-commit/pre-commit/archive/v1.13.0.tar.gz" - sha256 "cfbc652ca7fdeff268d7f76366056bf7ff7d0280210ac3aab2f65d85c4629410" - - bottle do - cellar :any_skip_relocation - sha256 "be8bc81b144acc508041964dfa66437e1046da0ff5ffc934463bd517ff91bd6c" => :mojave - sha256 "143e505be7c01b366740f2c038dc57b1bbba05908d9686fea9f14deb4c90b1bd" => :high_sierra - sha256 "cfd06c43fc89c0d9eeff22e2b34b94a4e541f83b58fe88cfe2afeac66cae5b7f" => :sierra - end - - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", "PyYAML==3.13b1", buildpath - system libexec/"bin/pip", "uninstall", "-y", "pre-commit" - venv.pip_install_and_link buildpath - end - - # Avoid relative paths - def post_install - lib_python_path = Pathname.glob(libexec/"lib/python*").first - lib_python_path.each_child do |f| - next unless f.symlink? - realpath = f.realpath - rm f - ln_s realpath, f - end - inreplace lib_python_path/"orig-prefix.txt", - Formula["python3"].opt_prefix, Formula["python3"].prefix.realpath - end - - test do - testpath.cd do - system "git", "init" - (testpath/".pre-commit-config.yaml").write <<~EOS - - repo: https://github.com/pre-commit/pre-commit-hooks - sha: v0.9.1 - hooks: - - id: trailing-whitespace - EOS - system bin/"pre-commit", "install" - (testpath/"f").write "hi\n" - system "git", "add", "f" - - ENV["GIT_AUTHOR_NAME"] = "test user" - ENV["GIT_AUTHOR_EMAIL"] = "test@example.com" - ENV["GIT_COMMITTER_NAME"] = "test user" - ENV["GIT_COMMITTER_EMAIL"] = "test@example.com" - git_exe = which("git") - ENV["PATH"] = "/usr/bin:/bin" - system git_exe, "commit", "-m", "test" - end - end -end diff --git a/Formula/precomp.rb b/Formula/precomp.rb deleted file mode 100644 index fc7e0326560a3..0000000000000 --- a/Formula/precomp.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Precomp < Formula - desc "Command-line precompressor to achieve better compression" - homepage "http://schnaader.info/precomp.php" - url "https://github.com/schnaader/precomp-cpp/archive/v0.4.6.tar.gz" - sha256 "673b9ceb0df62abb5ef12ab0600a18fc3b82003cc9af5e1cc2f196237ed350d3" - head "https://github.com/schnaader/precomp-cpp.git" - - bottle do - cellar :any_skip_relocation - sha256 "007ecd8dbf6db55a52ca49765d1aafd9e4f72c6a6f377e8eec8b28641fd486ed" => :mojave - sha256 "83f6d3eec9ce5b05a5cc7197e89fc6fe968c7ecb71c795343ead7ec98edcf758" => :high_sierra - sha256 "93eaa1f454f3af8d1c9872c263e3e67b56aac5e6772a65ccce8c9ec493c6989c" => :sierra - sha256 "62c8a72958b6fa8ef0208560ff0ad6abf187aae842715bb84cddb21d46a69d35" => :el_capitan - end - - def install - # Seems like Yosemite does not like the -s flag - inreplace "Makefile", " -s ", " " - - system "make" - bin.install "precomp" - end - - test do - cp "#{bin}/precomp", testpath/"precomp" - system "gzip", "-1", testpath/"precomp" - - system "#{bin}/precomp", testpath/"precomp.gz" - rm testpath/"precomp.gz", :force => true - system "#{bin}/precomp", "-r", testpath/"precomp.pcf" - system "gzip", "-d", testpath/"precomp.gz" - end -end diff --git a/Formula/predictionio.rb b/Formula/predictionio.rb deleted file mode 100644 index 702798a744cdb..0000000000000 --- a/Formula/predictionio.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Predictionio < Formula - desc "Source machine learning server" - homepage "https://predictionio.incubator.apache.org/" - url "https://github.com/apache/incubator-predictionio/releases/download/v0.9.6/PredictionIO-0.9.6.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/predictionio-0.9.6.tar.gz" - sha256 "d64ee99f50094b36accac4deae1008372c15f2cbc6112f6a7d8094842cf57e86" - - bottle :unneeded - - depends_on "apache-spark" - depends_on "elasticsearch" - depends_on "hadoop" - depends_on "hbase" - depends_on :java => "1.7+" - - def install - rm_f Dir["bin/*.bat"] - - libexec.install Dir["*"] - bin.write_exec_script libexec/"bin/pio" - - inreplace libexec/"conf/pio-env.sh" do |s| - s.gsub! /#\s*ES_CONF_DIR=.+$/, "ES_CONF_DIR=#{Formula["elasticsearch"].opt_prefix}/config" - s.gsub! /SPARK_HOME=.+$/, "SPARK_HOME=#{Formula["apache-spark"].opt_prefix}" - end - end -end diff --git a/Formula/prefixsuffix.rb b/Formula/prefixsuffix.rb deleted file mode 100644 index 550bb7f579584..0000000000000 --- a/Formula/prefixsuffix.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Prefixsuffix < Formula - desc "GUI batch renaming utility" - homepage "https://github.com/murraycu/prefixsuffix" - url "https://download.gnome.org/sources/prefixsuffix/0.6/prefixsuffix-0.6.9.tar.xz" - sha256 "fc3202bddf2ebbb93ffd31fc2a079cfc05957e4bf219535f26e6d8784d859e9b" - revision 1 - - bottle do - sha256 "87b5aed4fa1e4dd94b2d5f296d47078cd3f177e0c68bc7b16e285f2b8c40b83c" => :mojave - sha256 "0a0937d3ebef51cf2c39007ea99e31f75490c07f7b6b441f64f7a87bbda54a7c" => :high_sierra - sha256 "68a7a15fe3b8ea30c1f09e90dfbf8d95348367f74e497b9c1b31ac1795e71211" => :sierra - sha256 "48cc4b33c63c410b4d5827f689ccf6ea59608deee4735f84edea90c2ddc394f1" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gtkmm3" - - needs :cxx11 - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-schemas-compile" - system "make", "install" - end - - def post_install - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - end - - test do - system "#{bin}/prefixsuffix", "--version" - end -end diff --git a/Formula/premake.rb b/Formula/premake.rb deleted file mode 100644 index 0f6c96ea06903..0000000000000 --- a/Formula/premake.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Premake < Formula - desc "Write once, build anywhere Lua-based build system" - homepage "https://premake.github.io/" - url "https://downloads.sourceforge.net/project/premake/Premake/4.4/premake-4.4-beta5-src.zip" - sha256 "0fa1ed02c5229d931e87995123cdb11d44fcc8bd99bba8e8bb1bbc0aaa798161" - version_scheme 1 - head "https://github.com/premake/premake-core.git" - - bottle do - cellar :any_skip_relocation - sha256 "07c29fc6cf66a091b2cac29c3d6efb079f0212d7a66c5a96153117eac7cf6d77" => :mojave - sha256 "b2ad51fca2552a674929ec4d048fc05a88d24373673a701705e3b35c50a8611e" => :high_sierra - sha256 "9e5d1dd706b3b3af1c8fc5cfe42141cf2a023185f9d19bb25dc58f8aced440e2" => :sierra - sha256 "9e5d1dd706b3b3af1c8fc5cfe42141cf2a023185f9d19bb25dc58f8aced440e2" => :el_capitan - sha256 "4b1ce1c63cc3ecca7e195d4c0350fb6f823f659c36ff6c1193fd99023ed25b12" => :yosemite - end - - def install - if build.head? - system "make", "-f", "Bootstrap.mak", "osx" - system "./premake5", "gmake" - end - - system "make", "-C", "build/gmake.macosx" - - if build.head? - bin.install "bin/release/premake5" - else - bin.install "bin/release/premake4" - end - end - - test do - if build.head? - assert_match version.to_s, shell_output("#{bin}/premake5 --version") - else - assert_match version.to_s, shell_output("#{bin}/premake4 --version", 1) - end - end -end diff --git a/Formula/prest.rb b/Formula/prest.rb deleted file mode 100644 index 6055090083739..0000000000000 --- a/Formula/prest.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Prest < Formula - desc "Serve a RESTful API from any PostgreSQL database" - homepage "https://github.com/prest/prest" - url "https://github.com/prest/prest/archive/v0.3.4.tar.gz" - sha256 "cc45eb5de17a1957124545e11ae6dcc6e3957e9d5e9b06acf37a341113963829" - - bottle do - cellar :any_skip_relocation - sha256 "bdffe99b9524f0bf10cb23e6a25c3a8eafab8ede6f8303bcb100a8097db9ba23" => :mojave - sha256 "6a79ee6fc88b5a450348d977b8adf0d14c80aa5ba0bbd22375d1795cf3d8e070" => :high_sierra - sha256 "3b6a51b5a9c9ee58510fd70416dc8953f037e3575a255b6171363d2364bce1be" => :sierra - sha256 "e0ec971459deb768c19460db26246dcd2ea71baa34706052d0a4f572bff9606d" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/prest/prest").install buildpath.children - cd "src/github.com/prest/prest" do - system "go", "build", "-ldflags", - "-X github.com/prest/prest/vendor/github.com/prest/helpers.PrestVersionNumber=#{version}", - "-o", bin/"prest" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/prest version") - end -end diff --git a/Formula/presto.rb b/Formula/presto.rb deleted file mode 100644 index 4b728071893d3..0000000000000 --- a/Formula/presto.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Presto < Formula - desc "Distributed SQL query engine for big data" - homepage "https://prestodb.io" - url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/0.215/presto-server-0.215.tar.gz" - sha256 "c58138a84b15a04759e93bc73525d186a31926119fb1569553909ee11379ef57" - - bottle :unneeded - - depends_on :java => "1.8+" - - resource "presto-cli" do - url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.215/presto-cli-0.215-executable.jar" - sha256 "6ca3f4909ba9055dc2bb872855bbf2b9480aaab633f80bcf2b0741c66b48f84a" - end - - def install - libexec.install Dir["*"] - - (libexec/"etc/node.properties").write <<~EOS - node.environment=production - node.id=ffffffff-ffff-ffff-ffff-ffffffffffff - node.data-dir=#{var}/presto/data - EOS - - (libexec/"etc/jvm.config").write <<~EOS - -server - -Xmx16G - -XX:+UseG1GC - -XX:G1HeapRegionSize=32M - -XX:+UseGCOverheadLimit - -XX:+ExplicitGCInvokesConcurrent - -XX:+HeapDumpOnOutOfMemoryError - -XX:+ExitOnOutOfMemoryError - EOS - - (libexec/"etc/config.properties").write <<~EOS - coordinator=true - node-scheduler.include-coordinator=true - http-server.http.port=8080 - query.max-memory=5GB - query.max-memory-per-node=1GB - discovery-server.enabled=true - discovery.uri=http://localhost:8080 - EOS - - (libexec/"etc/log.properties").write "com.facebook.presto=INFO" - - (libexec/"etc/catalog/jmx.properties").write "connector.name=jmx" - - (bin/"presto-server").write <<~EOS - #!/bin/bash - exec "#{libexec}/bin/launcher" "$@" - EOS - - resource("presto-cli").stage do - bin.install "presto-cli-#{version}-executable.jar" => "presto" - end - end - - def post_install - (var/"presto/data").mkpath - end - - def caveats; <<~EOS - Add connectors to #{libexec}/etc/catalog/. See: - https://prestodb.io/docs/current/connector.html - EOS - end - - plist_options :manual => "presto-server run" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - AbandonProcessGroup - - WorkingDirectory - #{opt_libexec} - ProgramArguments - - #{opt_bin}/presto-server - run - - - - EOS - end - - test do - system bin/"presto-server", "run", "--help" - assert_equal "Presto CLI #{version}", shell_output("#{bin}/presto --version").chomp - end -end diff --git a/Formula/prettier.rb b/Formula/prettier.rb deleted file mode 100644 index 29efe00de4010..0000000000000 --- a/Formula/prettier.rb +++ /dev/null @@ -1,28 +0,0 @@ -require "language/node" - -class Prettier < Formula - desc "Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML" - homepage "https://prettier.io/" - url "https://registry.npmjs.org/prettier/-/prettier-1.15.3.tgz" - sha256 "a9335e62455b1670e71c8d5cc8d5f69709a94c5a25405aa94cae3b2aa4aa0080" - - bottle do - cellar :any_skip_relocation - sha256 "9c58623d31b4af00142b57b681052d88fb0b5157d90a8de2ef33d88484df0cf6" => :mojave - sha256 "6f13c267100cc32e4cae82863d0702f8e0280740f3a44e0a83ef73e8964c49e2" => :high_sierra - sha256 "8eeb4ca102daa1612484c8b29ea4d5c9dfc8bd3438aa3e4c085d04320bd8cc23" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.js").write("const arr = [1,2];") - output = shell_output("#{bin}/prettier test.js") - assert_equal "const arr = [1, 2];", output.chomp - end -end diff --git a/Formula/prettyping.rb b/Formula/prettyping.rb deleted file mode 100644 index 19e4f3df4682c..0000000000000 --- a/Formula/prettyping.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Prettyping < Formula - desc "Wrapper to colorize and simplify ping's output" - homepage "https://denilsonsa.github.io/prettyping/" - url "https://github.com/denilsonsa/prettyping/archive/v1.0.1.tar.gz" - sha256 "48ff5dce1d18761c4ee3c860afd3360266f7079b8e85af9e231eb15c45247323" - - bottle :unneeded - - # Fixes IPv6 handling on BSD/OSX: - # https://github.com/denilsonsa/prettyping/issues/7 - # https://github.com/denilsonsa/prettyping/pull/11 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/6ecea23/prettyping/ipv6.patch" - sha256 "765ae3e3aa7705fd9d2c74161e07942fcebecfe9f95412ed645f39af1cdda4b0" - end - - def install - bin.install "prettyping" - end - - test do - system "#{bin}/prettyping", "-c", "3", "127.0.0.1" - end -end diff --git a/Formula/primer3.rb b/Formula/primer3.rb deleted file mode 100644 index e14c81ab29942..0000000000000 --- a/Formula/primer3.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Primer3 < Formula - desc "Program for designing PCR primers" - homepage "https://primer3.sourceforge.io/" - url "https://downloads.sourceforge.net/project/primer3/primer3/2.4.0/primer3-2.4.0.tar.gz" - sha256 "6d537640c86e2b4656ae77f75b6ad4478fd0ca43985a56cce531fb9fc0431c47" - - bottle do - cellar :any_skip_relocation - sha256 "42d8c134f8dde43bc127a0f5f66eda246de195604b952ed9b8ac6b3fa8aba373" => :mojave - sha256 "f72fac01bb380b5ea55b41249b2d6bc2f799e9cb7cef55fae0a1f92e1de7ba64" => :high_sierra - sha256 "0337aa96c5d5f25caa15177236c5f5d269adaaad01cb63a77c933eb01f7a6ed0" => :sierra - sha256 "45ca3618888becc12b4d6be0ab9957ba5c8fdf2e818f74dc5312900c641b06c9" => :el_capitan - end - - def install - cd "src" do - system "make" - - # Lack of make install target reported to upstream - # https://github.com/primer3-org/primer3/issues/1 - bin.install %w[primer3_core ntdpal ntthal oligotm long_seq_tm_test] - pkgshare.install "primer3_config" - end - end - - test do - output = shell_output("#{bin}/long_seq_tm_test AAAAGGGCCCCCCCCTTTTTTTTTTT 3 20") - assert_match "tm = 52.452902", output.lines.last - end -end diff --git a/Formula/primesieve.rb b/Formula/primesieve.rb deleted file mode 100644 index bff1e60b3b50c..0000000000000 --- a/Formula/primesieve.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Primesieve < Formula - desc "Fast C/C++ prime number generator" - homepage "https://primesieve.org/" - url "https://github.com/kimwalisch/primesieve/archive/v7.3.tar.gz" - sha256 "bbf4a068ba220a479f3b6895513a85ab25f6b1dcbd690b188032c2c3482ef050" - - bottle do - cellar :any - sha256 "3a2eac9faab2782f53331a2ef034471502e40b8daaab6bcd069cb7c31837172d" => :mojave - sha256 "432bfb6ee8be028223865e795ed2d0db05cdd70acbea9f3f848f0cf9b7529702" => :high_sierra - sha256 "98a263207135a700cecffbfd2c00ce3c4172cd719fec3b80168a228a529e493d" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system "#{bin}/primesieve", "100", "--count", "--print" - end -end diff --git a/Formula/prips.rb b/Formula/prips.rb deleted file mode 100644 index 4b5a714c14da2..0000000000000 --- a/Formula/prips.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Prips < Formula - desc "Print the IP addresses in a given range" - homepage "https://devel.ringlet.net/sysutils/prips/" - url "https://devel.ringlet.net/files/sys/prips/prips-1.1.0.tar.xz" - mirror "https://deb.debian.org/debian/pool/main/p/prips/prips_1.1.0.orig.tar.xz" - sha256 "f6f85ee0234218e426cb72b27411902a55e1daa02f22d1e7270ff41e07fe0444" - - bottle do - cellar :any_skip_relocation - sha256 "6dd9b01ce2a3e4267378068d0e48539d82637be1147064b1417f7bb70c4eed8b" => :mojave - sha256 "5ce5225196dc7056ca5083f4b872ba0db72a1e2482f6410c8f6e20e92b838525" => :high_sierra - sha256 "fc7f9aa1dcb04691722fe04f020c69da38eec97f4292269350a2934f624ac373" => :sierra - end - - def install - system "make" - bin.install "prips" - man1.install "prips.1" - end - - test do - assert_equal "127.0.0.0\n127.0.0.1", - shell_output("#{bin}/prips 127.0.0.0/31").strip - end -end diff --git a/Formula/privoxy.rb b/Formula/privoxy.rb deleted file mode 100644 index 0d7df269e54c3..0000000000000 --- a/Formula/privoxy.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Privoxy < Formula - desc "Advanced filtering web proxy" - homepage "https://www.privoxy.org/" - url "https://downloads.sourceforge.net/project/ijbswa/Sources/3.0.26%20%28stable%29/privoxy-3.0.26-stable-src.tar.gz" - sha256 "57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8" - - bottle do - cellar :any - rebuild 1 - sha256 "89c7bd4cfc6bce1cdcae9d05bac4a316ec03a32b8ff23640d44b4f76f9a83e5f" => :mojave - sha256 "6d73d0568bf02dc31bce3e87a92ed8a90c67d19340ecbc2d22102522dc12a74b" => :high_sierra - sha256 "bd606ba22bca049b7f0457cdfa846aefa09eaf2c9d1e18ff3584254e1fc05048" => :sierra - sha256 "4aa50d19fa164c7bb5b6a14f5ef562fb9b40acebe8575cd5af4dffac78fa3400" => :el_capitan - sha256 "8a0e661df5d221ae65b6367791a923d1f2b769b0206b3fb50c1e6a84f2830d7b" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pcre" - - def install - # Find Homebrew's libpcre - ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" - - # No configure script is shipped with the source - system "autoreconf", "-i" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}/privoxy", - "--localstatedir=#{var}" - system "make" - system "make", "install" - end - - plist_options :manual => "privoxy #{HOMEBREW_PREFIX}/etc/privoxy/config" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - WorkingDirectory - #{var} - ProgramArguments - - #{sbin}/privoxy - --no-daemon - #{etc}/privoxy/config - - RunAtLoad - - StandardErrorPath - #{var}/log/privoxy/logfile - - - EOS - end - - test do - bind_address = "127.0.0.1:8118" - (testpath/"config").write("listen-address #{bind_address}\n") - begin - server = IO.popen("#{sbin}/privoxy --no-daemon #{testpath}/config") - sleep 1 - assert_match "200 OK", shell_output("/usr/bin/curl -I -x #{bind_address} https://github.com") - ensure - Process.kill("SIGINT", server.pid) - Process.wait(server.pid) - end - end -end diff --git a/Formula/procmail.rb b/Formula/procmail.rb deleted file mode 100644 index ff2519b845b23..0000000000000 --- a/Formula/procmail.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Procmail < Formula - desc "Autonomous mail processor" - homepage "https://web.archive.org/web/20151013184044/procmail.org/" - # Note the use of the patched version from Apple - url "https://opensource.apple.com/tarballs/procmail/procmail-14.tar.gz" - sha256 "f3bd815d82bb70625f2ae135df65769c31dd94b320377f0067cd3c2eab968e81" - - bottle do - cellar :any_skip_relocation - sha256 "48be3e5215b4ac296ef1f9150b313964112e5c7d04fe20489f336342548656e0" => :mojave - sha256 "c64920b1989d941d9aa4de7c275cf2e80306cb8bd2ee5d8263e883ddab7ef2e3" => :high_sierra - sha256 "c64ccf998d9c71d1b73004abe4c96a8c35993cf4c1a899cd6d92bfab82b9272a" => :sierra - sha256 "3328bcda4649612afba606950e59f4cb0c22e10fe97a4f1e38f190e3e4115800" => :el_capitan - sha256 "cd5a5cdfbe9d03067533df0ef3f09cc2c05bd16a9b75d2d19cd9c2d1da2986e5" => :yosemite - sha256 "9e476567851a38caedbbb894afb83d3f5575bb494aaab296f884387feca9bf54" => :mavericks - end - - def install - system "make", "-C", "procmail", "BASENAME=#{prefix}", "MANDIR=#{man}", - "LOCKINGTEST=1", "install" - end - - test do - path = testpath/"test.mail" - path.write <<~EOS - From alice@example.net Tue Sep 15 15:33:41 2015 - Date: Tue, 15 Sep 2015 15:33:41 +0200 - From: Alice - To: Bob - Subject: Test - - please ignore - EOS - assert_match /Subject: Test/, shell_output("#{bin}/formail -X 'Subject' < #{path}") - assert_match /please ignore/, shell_output("#{bin}/formail -I '' < #{path}") - end -end diff --git a/Formula/proctools.rb b/Formula/proctools.rb deleted file mode 100644 index 53c12d57eff67..0000000000000 --- a/Formula/proctools.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Proctools < Formula - desc "pgrep, pkill, and pfind for OpenBSD and Darwin (macOS)" - homepage "https://proctools.sourceforge.io/" - url "https://downloads.sourceforge.net/project/proctools/proctools/0.4pre1/proctools-0.4pre1.tar.gz" - sha256 "4553b9c6eda959b12913bc39b6e048a8a66dad18f888f983697fece155ec5538" - - bottle do - cellar :any_skip_relocation - sha256 "f7466405a3aab3cd7b00669ea685b1fe463a19bbdd7fef8b8c25f86595de2d34" => :mojave - sha256 "d41f76776e37f54cabf5d76ce2cb89d13052f1221a70b325245f600a7bd047ae" => :high_sierra - sha256 "8567dd0ffde620f8b1dd18e0529d670a235bcde6dac7b3f19d6528ecf843613a" => :sierra - sha256 "ed8136da9f7b607eec69d014b1c3f81b9ef3f004f38cc2904400861c0d6adab0" => :el_capitan - sha256 "a05e2adbc0ff0e11be133a81748fc123adc8b32002ff5efb49d141a354f92d70" => :yosemite - sha256 "812961a8a321441010a786c4de1b97c830181a013dae457b6b44c96ce799eb22" => :mavericks - end - - depends_on "bsdmake" => :build - - # Patches via MacPorts - { - "pfind-Makefile" => "d3ee204bbc708ee650b7310f58e45681c5ca0b3c3c5aa82fa4b402f7f5868b11", - "pfind-pfind.c" => "88f1bc60e3cf269ad012799dc6ddce27c2470eeafb7745bc5d14b78a2bdfbe96", - "pgrep-Makefile" => "f7f2bc21cab6ef02a89ee9e9f975d6a533d012b23720c3c22e66b746beb493fb", - "pkill-Makefile" => "bac12837958bc214234d47abe204ee6ad0da2d69440cf38b1e39ab986cc39d29", - "proctools-fmt.c" => "1a95516de3b6573a96f4ec4be933137e152631ad495f1364c1dd5ce3a9c79bc8", - "proctools-proctools.c" => "1d08e570cc32ff08f8073308da187e918a89a783837b1ea20735ea25ae18bfdb", - "proctools-proctools.h" => "7c2ee6ac3dc7b26fb6738496fbabb1d1d065302a39207ae3fbacb1bc3a64371a", - }.each do |name, sha| - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/f411d167/proctools/patch-#{name}.diff" - sha256 sha - end - end - - def install - system "bsdmake", "PREFIX=#{prefix}" - - ["pgrep/pgrep", "pkill/pkill", "pfind/pfind"].each do |prog| - bin.install prog - man1.install prog + ".1" - end - end -end diff --git a/Formula/procyon-decompiler.rb b/Formula/procyon-decompiler.rb deleted file mode 100644 index 66fd14f58748e..0000000000000 --- a/Formula/procyon-decompiler.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ProcyonDecompiler < Formula - desc "Modern decompiler for Java 5 and beyond" - homepage "https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler" - url "https://bitbucket.org/mstrobel/procyon/downloads/procyon-decompiler-0.5.30.jar" - sha256 "cd9a2177f72f490842b0b84909f58b5548614a78ecd135ce28b833f93429e5a0" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - libexec.install "procyon-decompiler-#{version}.jar" - bin.write_jar_script libexec/"procyon-decompiler-#{version}.jar", "procyon-decompiler" - end - - test do - fixture = <<~EOS - class T - { - public static void main(final String[] array) { - System.out.println("Hello World!"); - } - } - EOS - (testpath/"T.java").write fixture - system "javac", "T.java" - fixture.match pipe_output("#{bin}/procyon-decompiler", "T.class") - end -end diff --git a/Formula/prodigal.rb b/Formula/prodigal.rb deleted file mode 100644 index b1fc341aa89b3..0000000000000 --- a/Formula/prodigal.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Prodigal < Formula - desc "Microbial gene prediction" - homepage "https://github.com/hyattpd/Prodigal" - url "https://github.com/hyattpd/Prodigal/archive/v2.6.3.tar.gz" - sha256 "89094ad4bff5a8a8732d899f31cec350f5a4c27bcbdd12663f87c9d1f0ec599f" - - bottle do - cellar :any_skip_relocation - sha256 "8751eedad40b08714b52a78b9cf48e4101ffa4b871a0ab943830a59137a67e53" => :mojave - sha256 "c120fed8e29bb3b1a4ff69d5ca05e051a0fe3822784b3d585e142da3452d1ac1" => :high_sierra - sha256 "a27fe5316181d4826e5aa5291d0fc1b1a7087c32c7b4e6aedabf1209d5a8ac36" => :sierra - sha256 "70b432e3d3da1f4089680b06c0745b7dac3611f05d8ec9440faa918bc82d6fe5" => :el_capitan - end - - def install - system "make", "install", "INSTALLDIR=#{bin}" - end - - test do - fasta = <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - assert_match "CDS", pipe_output("#{bin}/prodigal -q -p meta", fasta, 0) - end -end diff --git a/Formula/profanity.rb b/Formula/profanity.rb deleted file mode 100644 index e23683b40009a..0000000000000 --- a/Formula/profanity.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Profanity < Formula - desc "Console based XMPP client" - homepage "http://www.profanity.im/" - url "http://www.profanity.im/profanity-0.5.1.tar.gz" - sha256 "e3513713e74ec3363fbdbac2919bdc17e249988780cc5a4589d1425807a7feb8" - revision 1 - - bottle do - sha256 "51cfcfe6bd1cbada4749999ae0dd26a9285b8f8c7e756dc7e38ca879394792b4" => :mojave - sha256 "c97ecd459069c638acb346488507b3f216c485d5667f3999875b8166e2e36fef" => :high_sierra - sha256 "50e1f4970c62dfd02c0c0fe5f439d87d18d6de276fdc2982c7713b74a57e38d9" => :sierra - sha256 "90d81d6a2f308a5ae8a0ed69abcea2e4ed531f3d237600b51d41406c705f6443" => :el_capitan - end - - head do - url "https://github.com/boothj5/profanity.git" - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "gpgme" - depends_on "libotr" - depends_on "libstrophe" - depends_on "openssl" - depends_on "ossp-uuid" - depends_on "readline" - depends_on "terminal-notifier" - - def install - system "./bootstrap.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/profanity", "-v" - end -end diff --git a/Formula/proftpd.rb b/Formula/proftpd.rb deleted file mode 100644 index 845f03c81b591..0000000000000 --- a/Formula/proftpd.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Proftpd < Formula - desc "Highly configurable GPL-licensed FTP server software" - homepage "http://www.proftpd.org/" - url "ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.6.tar.gz" - mirror "https://fossies.org/linux/misc/proftpd-1.3.6.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/proftpd/proftpd-1.3.6.tar.gz" - sha256 "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf" - - bottle do - sha256 "bf1b06c934ef7810d111125069f992382f0744ecfbdfcdea02e8f7b1ed4774d3" => :mojave - sha256 "58c448066f5eeb96a68b8b5727e0f83ae83857aeec7a2354c501b5f6a6405cf8" => :high_sierra - sha256 "ff7d5535f7aeb76aab782bdfb534ae22b3109840228c0c93ad6e7dcfecb56f5f" => :sierra - sha256 "4ac3a9a6ab8a21e05d82fefae042d7b94e920d5f3d172485202364b489d9d629" => :el_capitan - sha256 "ebf19b0218a7e3897457f91c6721a59ef897329db3f49461415b56168361a2d8" => :yosemite - end - - def install - # fixes unknown group 'nogroup' - # http://www.proftpd.org/docs/faq/linked/faq-ch4.html#AEN434 - inreplace "sample-configurations/basic.conf", "nogroup", "nobody" - - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - ENV.deparallelize - install_user = ENV["USER"] - install_group = `groups`.split[0] - system "make", "INSTALL_USER=#{install_user}", "INSTALL_GROUP=#{install_group}", "install" - end - - plist_options :manual => "proftpd" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_sbin}/proftpd - - UserName - root - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{opt_sbin}/proftpd -v") - end -end diff --git a/Formula/progress.rb b/Formula/progress.rb deleted file mode 100644 index 379cb23ef3f9c..0000000000000 --- a/Formula/progress.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Progress < Formula - desc "Progress: Coreutils Progress Viewer" - homepage "https://github.com/Xfennec/progress" - url "https://github.com/Xfennec/progress/archive/v0.14.tar.gz" - sha256 "214a0d84b3ee5dde57ec9952ec9aa68ad9261fb336ef025324b344ed7ab48af1" - head "https://github.com/Xfennec/progress.git" - - bottle do - cellar :any_skip_relocation - sha256 "a8247f7d99f2bd201810ad887d2354fa72e79f8c14d4ab896b0e60861c52b3d9" => :mojave - sha256 "30283abf5c811af72c62e3c2467479f7373ce176e3eb6ca940039ca77cb938e0" => :high_sierra - sha256 "cdceba6fffdaca9563a5888452a4227f7e715547a2345c5ba36ff12945e8bfd2" => :sierra - sha256 "11217f309893e35b8be163a077f9934ce4d71e4a8ff0098e3f12751f64310925" => :el_capitan - end - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - pid = fork do - system "/bin/dd", "if=/dev/urandom", "of=foo", "bs=512", "count=1048576" - end - sleep 1 - begin - assert_match "dd", shell_output("#{bin}/progress") - ensure - Process.kill 9, pid - Process.wait pid - rm "foo" - end - end -end diff --git a/Formula/proguard.rb b/Formula/proguard.rb deleted file mode 100644 index 50574f0b9a42e..0000000000000 --- a/Formula/proguard.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Proguard < Formula - desc "Java class file shrinker, optimizer, and obfuscator" - homepage "https://proguard.sourceforge.io/" - url "https://downloads.sourceforge.net/project/proguard/proguard/6.0/proguard6.0.3.tar.gz" - sha256 "db175575313d11eb75a3ab68c079123d2787529b63c5cb434b1f653ececb3e48" - - bottle :unneeded - - def install - libexec.install "lib/proguard.jar" - libexec.install "lib/proguardgui.jar" - bin.write_jar_script libexec/"proguard.jar", "proguard" - bin.write_jar_script libexec/"proguardgui.jar", "proguardgui" - end - - test do - expect = <<~EOS - ProGuard, version #{version} - Usage: java proguard.ProGuard [options ...] - EOS - assert_equal expect, shell_output("#{bin}/proguard", 1) - end -end diff --git a/Formula/proj.rb b/Formula/proj.rb deleted file mode 100644 index 1b594a47fd5bf..0000000000000 --- a/Formula/proj.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Proj < Formula - desc "Cartographic Projections Library" - homepage "https://proj4.org/" - url "https://download.osgeo.org/proj/proj-5.2.0.tar.gz" - sha256 "ef919499ffbc62a4aae2659a55e2b25ff09cccbbe230656ba71c6224056c7e60" - - bottle do - sha256 "bead47d7970ed3a59ef4c9567e86cf834fcaf01a1a8b63efeb372b62e2f39b83" => :mojave - sha256 "80caa7d9b6ffc5cee9c397b8821b834a16b37c05cd0acd0262f825fa95eb8e08" => :high_sierra - sha256 "1906c694029b8a01fbd912733b3c9ba295f4b8ba9d32d0d3f8f2b549b179d04a" => :sierra - sha256 "9cbf5a3dfb98c5b5ee82a3e4b8d9d0f927a4d45e514d99a71ca78eb123d5cafe" => :el_capitan - end - - head do - url "https://github.com/OSGeo/proj.4.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - option "with-vdatum", "Install vertical datum files (~380 MB)" - - conflicts_with "blast", :because => "both install a `libproj.a` library" - - skip_clean :la - - # The datum grid files are required to support datum shifting - resource "datumgrid" do - url "https://download.osgeo.org/proj/proj-datumgrid-1.8.zip" - sha256 "b9838ae7e5f27ee732fb0bfed618f85b36e8bb56d7afb287d506338e9f33861e" - end - - # Vertical datum files - resource "usa_geoid2012b" do - url "https://download.osgeo.org/proj/vdatum/usa_geoid2012b.zip" - sha256 "7a2bddfff18c303853b692830515b86eb46a3e6f81f14d4f193f0e28b1d57aca" - end - - resource "usa_geoid2012" do - url "https://download.osgeo.org/proj/vdatum/usa_geoid2012.zip" - sha256 "afe49dc2c405d19a467ec756483944a3c9148e8c1460cb7e82dc8d4a64c4c472" - end - - resource "usa_geoid2009" do - url "https://download.osgeo.org/proj/vdatum/usa_geoid2009.zip" - sha256 "1a232fb7fe34d2dad2d48872025597ac7696882755ded1493118a573f60008b1" - end - - resource "usa_geoid2003" do - url "https://download.osgeo.org/proj/vdatum/usa_geoid2003.zip" - sha256 "1d15950f46e96e422ebc9202c24aadec221774587b7a4cd963c63f8837421351" - end - - resource "usa_geoid1999" do - url "https://download.osgeo.org/proj/vdatum/usa_geoid1999.zip" - sha256 "665cd4dfc991f2517752f9db84d632b56bba31a1ed6a5f0dc397e4b0b3311f36" - end - - resource "vertconc" do - url "https://download.osgeo.org/proj/vdatum/vertcon/vertconc.gtx" - sha256 "ecf7bce7bf9e56f6f79a2356d8d6b20b9cb49743701f81db802d979b5a01fcff" - end - - resource "vertcone" do - url "https://download.osgeo.org/proj/vdatum/vertcon/vertcone.gtx" - sha256 "f6da1c615c2682ecb7adcfdf22b1d37aba2771c2ea00abe8907acea07413903b" - end - - resource "vertconw" do - url "https://download.osgeo.org/proj/vdatum/vertcon/vertconw.gtx" - sha256 "de648c0f6e8b5ebfc4b2d82f056c7b993ca3c37373a7f6b7844fe9bd4871821b" - end - - resource "egm08_25" do - url "https://download.osgeo.org/proj/vdatum/egm08_25/egm08_25.gtx" - sha256 "c18f20d1fe88616e3497a3eff993227371e1d9acc76f96253e8d84b475bbe6bf" - end - - def install - resources.each do |r| - if r.name == "datumgrid" - (buildpath/"nad").install r - elsif build.with? "vdatum" - pkgshare.install r - end - end - - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test").write <<~EOS - 45d15n 71d07w Boston, United States - 40d40n 73d58w New York, United States - 48d51n 2d20e Paris, France - 51d30n 7'w London, England - EOS - match = <<~EOS - -4887590.49\t7317961.48 Boston, United States - -5542524.55\t6982689.05 New York, United States - 171224.94\t5415352.81 Paris, France - -8101.66\t5707500.23 London, England - EOS - assert_equal match, - `#{bin}/proj +proj=poly +ellps=clrk66 -r #{testpath}/test` - end -end diff --git a/Formula/prometheus.rb b/Formula/prometheus.rb deleted file mode 100644 index 892e46dc6a33c..0000000000000 --- a/Formula/prometheus.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Prometheus < Formula - desc "Service monitoring system and time series database" - homepage "https://prometheus.io/" - url "https://github.com/prometheus/prometheus/archive/v2.6.0.tar.gz" - sha256 "e0d3e77e45466fd055726268354a02834968a3275791be6cbd17513ec7860c1d" - - bottle do - cellar :any_skip_relocation - sha256 "c924ac72e5fe7c20efe65a9873737e6082ef335b8673fcdfd2ab306afb365a96" => :mojave - sha256 "5e12d0d8235fe1200fd48fa624dbb9276bd955c4b080a5fb3ca054d7a626e76f" => :high_sierra - sha256 "ad1c08a415f2233b442157ef8f0f3d0ab3f3008036556e6c81b65ae65a7eb731" => :sierra - end - - depends_on "go" => :build - - def install - mkdir_p buildpath/"src/github.com/prometheus" - ln_sf buildpath, buildpath/"src/github.com/prometheus/prometheus" - - system "make", "build" - bin.install %w[promtool prometheus] - libexec.install %w[consoles console_libraries] - end - - def caveats; <<~EOS - When used with `brew services`, prometheus' configuration is stored as command line flags in - #{etc}/prometheus.args - - Example configuration: - echo "--config.file ~/.config/prometheus.yml" > #{etc}/prometheus.args - - EOS - end - - plist_options :manual => "prometheus" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - sh - -c - #{opt_bin}/prometheus $(< #{etc}/prometheus.args) - - RunAtLoad - - KeepAlive - - StandardErrorPath - #{var}/log/prometheus.err.log - StandardOutPath - #{var}/log/prometheus.log - - - EOS - end - - test do - (testpath/"rules.example").write <<~EOS - groups: - - name: http - rules: - - record: job:http_inprogress_requests:sum - expr: sum(http_inprogress_requests) by (job) - EOS - system "#{bin}/promtool", "check", "rules", testpath/"rules.example" - end -end diff --git a/Formula/proof-general.rb b/Formula/proof-general.rb deleted file mode 100644 index c77f49ffc5a26..0000000000000 --- a/Formula/proof-general.rb +++ /dev/null @@ -1,50 +0,0 @@ -class ProofGeneral < Formula - desc "Emacs-based generic interface for theorem provers" - homepage "https://proofgeneral.github.io" - url "https://github.com/ProofGeneral/PG/archive/v4.4.tar.gz" - sha256 "1ba236d81768a87afa0287f49d4b2223097bc61d180468cbd997d46ab6132e7e" - revision 2 - head "https://github.com/ProofGeneral/PG.git" - - bottle do - rebuild 2 - sha256 "fb33f343985000a24f2f3b8737ac8732d22cdfc43c178b089652abe50297c54b" => :mojave - sha256 "da11c2494db95b66a9db3528a98198878d1ac56cc63ac104b6bedafb1676a9a4" => :high_sierra - sha256 "da11c2494db95b66a9db3528a98198878d1ac56cc63ac104b6bedafb1676a9a4" => :sierra - sha256 "da11c2494db95b66a9db3528a98198878d1ac56cc63ac104b6bedafb1676a9a4" => :el_capitan - end - - depends_on "texi2html" => :build - depends_on "texinfo" => :build - depends_on "emacs" - - def install - ENV.deparallelize # Otherwise lisp compilation can result in 0-byte files - - args = %W[ - PREFIX=#{prefix} - DEST_PREFIX=#{prefix} - ELISPP=share/emacs/site-lisp/proof-general - ELISP_START=#{elisp}/site-start.d - EMACS=#{which "emacs"} - ] - - system "make", "install", *args - - cd "doc" do - system "make", "info", "html" - end - man1.install "doc/proofgeneral.1" - info.install "doc/ProofGeneral.info", "doc/PG-adapting.info" - doc.install "doc/ProofGeneral", "doc/PG-adapting" - end - - def caveats; <<~EOS - HTML documentation is available in: #{HOMEBREW_PREFIX}/share/doc/proof-general - EOS - end - - test do - system bin/"proofgeneral", "--help" - end -end diff --git a/Formula/proselint.rb b/Formula/proselint.rb deleted file mode 100644 index 6278adae9d8fd..0000000000000 --- a/Formula/proselint.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Proselint < Formula - include Language::Python::Virtualenv - - desc "Linter for prose" - homepage "http://proselint.com" - url "https://files.pythonhosted.org/packages/42/ff/8e7ad0108b8faffdf2ec7d170b4a8a3c9bc91f5077debf5381ef14702588/proselint-0.10.2.tar.gz" - sha256 "3a87eb393056d1bc77d898e4bcf8998f50e9ad84f7b9ff7cf2720509ac8ef904" - revision 1 - head "https://github.com/amperser/proselint.git" - - bottle do - cellar :any_skip_relocation - sha256 "86b6c654cfd476829a85840f9b0586e1d26463e90c372701a51a01ba02556ee7" => :mojave - sha256 "551302164886e545b8d16001a47bba13192f7797e794bf4edffb346e6afcc6fd" => :high_sierra - sha256 "7834267f43950c5d637d354c584a5e3093b3bce26b8b5869773745a60b7a0b29" => :sierra - end - - depends_on "python" - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - output = pipe_output("#{bin}/proselint --compact -", "John is very unique.") - assert_match "Comparison of an uncomparable", output - end -end diff --git a/Formula/protobuf-c.rb b/Formula/protobuf-c.rb deleted file mode 100644 index 56e3c6cafad72..0000000000000 --- a/Formula/protobuf-c.rb +++ /dev/null @@ -1,42 +0,0 @@ -class ProtobufC < Formula - desc "Protocol buffers library" - homepage "https://github.com/protobuf-c/protobuf-c" - url "https://github.com/protobuf-c/protobuf-c/releases/download/v1.3.1/protobuf-c-1.3.1.tar.gz" - sha256 "51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267" - revision 1 - - bottle do - cellar :any - sha256 "091069fd8d0e0ee029eb4b1fe60218a580325b5e9a4185d6d92441bcc5ced531" => :mojave - sha256 "0eebbb3a3fdbe9446dda2aa384c25c851bd26a40d79803c2c45953e70207e10a" => :high_sierra - sha256 "5f46c8bda4cf0214396ee8221fb9e0443f3bf8131e4e4e359e282e71288c5042" => :sierra - sha256 "137df0af212e53d2e640ca57e8d80511a92bfa782f3d851a535afe340422602c" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "protobuf" - - needs :cxx11 - - def install - ENV.cxx11 - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - testdata = <<~EOS - syntax = "proto3"; - package test; - message TestCase { - string name = 4; - } - message Test { - repeated TestCase case = 1; - } - EOS - (testpath/"test.proto").write testdata - system Formula["protobuf"].opt_bin/"protoc", "test.proto", "--c_out=." - end -end diff --git a/Formula/protobuf-swift.rb b/Formula/protobuf-swift.rb deleted file mode 100644 index 04694e3366f34..0000000000000 --- a/Formula/protobuf-swift.rb +++ /dev/null @@ -1,52 +0,0 @@ -class ProtobufSwift < Formula - desc "Implementation of Protocol Buffers in Swift" - homepage "https://github.com/alexeyxo/protobuf-swift" - url "https://github.com/alexeyxo/protobuf-swift/archive/4.0.6.tar.gz" - sha256 "598d9e459b4ac74bfbcf22857c7e8fda8f5219c10caac0aa18aea7d8710cce22" - - bottle do - cellar :any - sha256 "64c6b817c6d228fc67069f71b02c22c417ab78c5a9af5852cbc97288a5c68359" => :mojave - sha256 "c6c9d9b4d5297302f46c61815f8dc312daa18038462efb3a5678406732ebbebe" => :high_sierra - sha256 "94a30e32d24bb183e2b27a5fb6f47204b563b579e0d1e2daecb3c615052bc072" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "protobuf" - - conflicts_with "swift-protobuf", - :because => "both install `protoc-gen-swift` binaries" - - needs :cxx11 - - def install - ENV.cxx11 - - system "protoc", "-Iplugin/compiler", - "plugin/compiler/google/protobuf/descriptor.proto", - "plugin/compiler/google/protobuf/swift-descriptor.proto", - "--cpp_out=plugin/compiler" - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - testdata = <<~EOS - syntax = "proto3"; - enum Flavor { - CHOCOLATE = 0; - VANILLA = 1; - } - message IceCreamCone { - int32 scoops = 1; - Flavor flavor = 2; - } - EOS - (testpath/"test.proto").write(testdata) - system Formula["protobuf"].opt_bin/"protoc", "test.proto", "--swift_out=." - end -end diff --git a/Formula/protobuf.rb b/Formula/protobuf.rb deleted file mode 100644 index 725b5814833de..0000000000000 --- a/Formula/protobuf.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Protobuf < Formula - desc "Protocol buffers (Google's data interchange format)" - homepage "https://github.com/protocolbuffers/protobuf/" - url "https://github.com/protocolbuffers/protobuf.git", - :tag => "v3.6.1.3", - :revision => "66dc42d891a4fc8e9190c524fd67961688a37bbe" - revision 1 - head "https://github.com/protocolbuffers/protobuf.git" - - bottle do - cellar :any - sha256 "587c01fb41ef890636c73751035b94fbff711b4176f0629c78484b4beb752211" => :mojave - sha256 "a110365419ed380141d06fae861ddfb76b3dfda47984c30ba999c3820b2e7278" => :high_sierra - sha256 "87abe0838ac015768cb6f4577332bfaf8ae4031254a63350461280ff2f62303c" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "python" - depends_on "python@2" - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - needs :cxx11 - - def install - # Don't build in debug mode. See: - # https://github.com/Homebrew/homebrew/issues/9279 - # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 - ENV.prepend "CXXFLAGS", "-DNDEBUG" - ENV.cxx11 - - system "./autogen.sh" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-zlib" - system "make" - system "make", "check" if build.bottle? - system "make", "install" - - # Install editor support and examples - doc.install "editors", "examples" - - ENV.append_to_cflags "-I#{include}" - ENV.append_to_cflags "-L#{lib}" - - ["python2", "python3"].each do |python| - resource("six").stage do - system python, *Language::Python.setup_install_args(libexec) - end - chdir "python" do - system python, *Language::Python.setup_install_args(libexec), - "--cpp_implementation" - end - - version = Language::Python.major_minor_version python - site_packages = "lib/python#{version}/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-protobuf.pth").write pth_contents - end - end - - def caveats; <<~EOS - Editor support and examples have been installed to: - #{doc} - EOS - end - - test do - testdata = <<~EOS - syntax = "proto3"; - package test; - message TestCase { - string name = 4; - } - message Test { - repeated TestCase case = 1; - } - EOS - (testpath/"test.proto").write testdata - system bin/"protoc", "test.proto", "--cpp_out=." - system "python2.7", "-c", "import google.protobuf" - system "python3", "-c", "import google.protobuf" - end -end diff --git a/Formula/protobuf@2.5.rb b/Formula/protobuf@2.5.rb deleted file mode 100644 index 59f7560e34b80..0000000000000 --- a/Formula/protobuf@2.5.rb +++ /dev/null @@ -1,53 +0,0 @@ -class ProtobufAT25 < Formula - desc "Protocol buffers (Google's data interchange format)" - homepage "https://github.com/protocolbuffers/protobuf" - url "https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2" - sha256 "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677" - - bottle do - cellar :any - sha256 "9b8bd06980b0e7b9b3f86c405f5da1fceac9c756e6d2937fb07646e13cee123e" => :mojave - sha256 "57b751631332e48464f3547d6608b24422001d7e98f50eb67bc8594f3dfc6284" => :high_sierra - sha256 "2666bcf184708bdd23c1df2c209f3bf6fcdfe4769e02db878632be3b2267a106" => :sierra - sha256 "738a1b9437b4fa18d607d9b385e83c5065c683da3aee3d88b7b30c06a85b7960" => :el_capitan - sha256 "18c6d55b58fa0e9b8d36738f937a86cb2583b7eeb66412905ffe4870f7e5b60b" => :yosemite - end - - keg_only :versioned_formula - - def install - # Don't build in debug mode. See: - # https://github.com/Homebrew/homebrew/issues/9279 - ENV.prepend "CXXFLAGS", "-DNDEBUG" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-zlib" - system "make" - system "make", "check" if build.bottle? - system "make", "install" - - # Install editor support and examples - doc.install "editors", "examples" - end - - def caveats; <<~EOS - Editor support and examples have been installed to: - #{doc} - EOS - end - - test do - (testpath/"test.proto").write <<~EOS - package test; - message TestCase { - required string name = 4; - } - message Test { - repeated TestCase case = 1; - } - EOS - system bin/"protoc", "test.proto", "--cpp_out=." - end -end diff --git a/Formula/protobuf@2.6.rb b/Formula/protobuf@2.6.rb deleted file mode 100644 index 18202e6deb241..0000000000000 --- a/Formula/protobuf@2.6.rb +++ /dev/null @@ -1,125 +0,0 @@ -class ProtobufAT26 < Formula - desc "Protocol buffers - Google data interchange format" - homepage "https://github.com/protocolbuffers/protobuf/" - url "https://github.com/protocolbuffers/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2" - sha256 "ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910" - - bottle do - sha256 "0c9e16290618523a67f58df3ef0ab7690ae86bafc74fead2ad199840e30ca57b" => :mojave - sha256 "1ceb82b9eea2e86848d959bab4d5468b9388c45b7d687330cc709a11d591f893" => :high_sierra - sha256 "c3a17e095f0bba62fc1dc9a84adf830b4ab9d1198ec497c8bb2575fde97b5d30" => :sierra - sha256 "e1bf141c14c28ea10aec3cde34d228facbe0082c40dbb69d4d997b7103b72662" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "python@2" # does not support Python 3 - - resource "six" do - url "https://files.pythonhosted.org/packages/16/64/1dc5e5976b17466fd7d712e59cbe9fb1e18bec153109e5ba3ed6c9102f1a/six-1.9.0.tar.gz" - sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/62/fe/45044dfa6bfa6ff18ddfe1df85fbf01d333c284b94e8c9a02fe12241c8cf/python-dateutil-2.4.1.tar.bz2" - sha256 "a9f62b12e28f11c732ad8e255721a9c7ab905f9479759491bc1f1e91de548d0f" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/63/15/8cdc183c669ef4c870099848b6fb37f11e5aeb2fa06601d0015ac4201e51/pytz-2014.10.tar.bz2" - sha256 "387f968fde793b142865802916561839f5591d8b4b14c941125eb0fca7e4e58d" - end - - resource "python-gflags" do - url "https://files.pythonhosted.org/packages/46/47/12c17c3216c04a85e5ffd9163ad09f0c1661c2cc2ccc0faf70e39cb8dc96/python-gflags-2.0.tar.gz" - sha256 "0dff6360423f3ec08cbe3bfaf37b339461a54a21d13be0dd5d9c9999ce531078" - end - - resource "google-apputils" do - url "https://files.pythonhosted.org/packages/69/66/a511c428fef8591c5adfa432a257a333e0d14184b6c5d03f1450827f7fe7/google-apputils-0.4.2.tar.gz" - sha256 "47959d0651c32102c10ad919b8a0ffe0ae85f44b8457ddcf2bdc0358fb03dc29" - end - - # Fixes the unexpected identifier error when compiling software against protobuf: - # https://github.com/protocolbuffers/protobuf/issues/549 - patch :p1, :DATA - - def install - # Don't build in debug mode. See: - # https://github.com/Homebrew/homebrew/issues/9279 - # https://github.com/protocolbuffers/protobuf/blob/e9a122eb19ec54dbca15da80355ed0c17cada9b1/configure.ac#L71-L74 - ENV.prepend "CXXFLAGS", "-DNDEBUG" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-zlib" - system "make" - system "make", "check" if build.bottle? - system "make", "install" - - # Install editor support and examples - doc.install "editors", "examples" - - # google-apputils is a build-time dependency - ENV.prepend_create_path "PYTHONPATH", buildpath/"homebrew/lib/python2.7/site-packages" - %w[six python-dateutil pytz python-gflags google-apputils].each do |package| - resource(package).stage do - system "python", *Language::Python.setup_install_args(buildpath/"homebrew") - end - end - # google is a namespace package and .pth files aren't processed from - # PYTHONPATH - touch buildpath/"homebrew/lib/python2.7/site-packages/google/__init__.py" - chdir "python" do - ENV.append_to_cflags "-I#{include}" - ENV.append_to_cflags "-L#{lib}" - args = Language::Python.setup_install_args libexec - args << "--cpp_implementation" - system "python", *args - end - site_packages = "lib/python2.7/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-protobuf.pth").write pth_contents - end - - def caveats; <<~EOS - Editor support and examples have been installed to: - #{doc} - EOS - end - - test do - testdata = - <<~EOS - package test; - message TestCase { - required string name = 4; - } - message Test { - repeated TestCase case = 1; - } - EOS - (testpath/"test.proto").write(testdata) - system bin/"protoc", "test.proto", "--cpp_out=." - - protobuf_pth = lib/"python2.7/site-packages/homebrew-protobuf.pth" - (testpath.realpath/"Library/Python/2.7/lib/python/site-packages").install_symlink protobuf_pth - system "python2.7", "-c", "import google.protobuf" - end -end - -__END__ -diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h -index 67afc77..504d5fe 100644 ---- a/src/google/protobuf/descriptor.h -+++ b/src/google/protobuf/descriptor.h -@@ -59,6 +59,9 @@ - #include - #include - -+#ifdef TYPE_BOOL -+#undef TYPE_BOOL -+#endif - - namespace google { - namespace protobuf { diff --git a/Formula/protobuf@3.1.rb b/Formula/protobuf@3.1.rb deleted file mode 100644 index 7e0c0430e4e53..0000000000000 --- a/Formula/protobuf@3.1.rb +++ /dev/null @@ -1,140 +0,0 @@ -class ProtobufAT31 < Formula - desc "Protocol buffers (Google's data interchange format)" - homepage "https://github.com/protocolbuffers/protobuf/" - url "https://github.com/protocolbuffers/protobuf/archive/v3.1.0.tar.gz" - sha256 "fb2a314f4be897491bb2446697be693d489af645cb0e165a85e7e64e07eb134d" - - bottle do - sha256 "a5fbefb868759d915dbac23e3a5c24def770503e3680ac122299dbaab3bc018d" => :mojave - sha256 "8648436399064763689f1e39b6c2e7a0ce8d6682064197adb467d7ccc803aa9e" => :high_sierra - sha256 "941385129ac0e5a34923a373cb57daccfecbaaa25b429624c741873e144ba581" => :sierra - sha256 "b7d053c5f1dfef00da3c05fd9ad3db7317a8d0abb983290869844d1ef28a799e" => :el_capitan - sha256 "813126845f50a0d885b9fedb213e566fc5e3d5959f1f69733d8c2d04fa530c67" => :yosemite - end - - keg_only :versioned_formula - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "python@2" # does not support Python 3 - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/bd/66/0a7f48a0f3fb1d3a4072bceb5bbd78b1a6de4d801fb7135578e7c7b1f563/appdirs-1.4.0.tar.gz" - sha256 "8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/c6/70/bb32913de251017e266c5114d0a645f262fb10ebc9bf6de894966d124e35/packaging-16.8.tar.gz" - sha256 "5d50835fdf0a7edf0b55e311b7c887786504efea1177abd7e69329a8e5ea619e" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/38/bb/bf325351dd8ab6eb3c3b7c07c3978f38b2103e2ab48d59726916907cd6fb/pyparsing-2.1.10.tar.gz" - sha256 "811c3e7b0031021137fc83e051795025fcb98674d07eb8fe922ba4de53d39188" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz" - sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" - end - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/64/88/d434873ba1ce02c0ed669f574afeabaeaaeec207929a41b5c1ed947270fc/setuptools-34.1.0.zip" - sha256 "c0cc0c7d7f86e03b63fd093032890569a944f210358fbfea339252ba33fb1097" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/51/fc/39a3fbde6864942e8bb24c93663734b74e281b984d1b8c4f95d64b0c21f6/python-dateutil-2.6.0.tar.gz" - sha256 "62a2f8df3d66f878373fd0072eacf4ee52194ba302e00082828e0d263b0418d2" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2" - sha256 "7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b" - end - - resource "python-gflags" do - url "https://files.pythonhosted.org/packages/82/9c/7ed91459f01422d90a734afcf30de7df6b701b90a2e7c7a7d01fd580242d/python-gflags-3.1.0.tar.gz" - sha256 "3377d9dbeedb99c0325beb1f535f8fa9fa131d1d8b50db7481006f0a4c6919b4" - end - - resource "google-apputils" do - url "https://files.pythonhosted.org/packages/69/66/a511c428fef8591c5adfa432a257a333e0d14184b6c5d03f1450827f7fe7/google-apputils-0.4.2.tar.gz" - sha256 "47959d0651c32102c10ad919b8a0ffe0ae85f44b8457ddcf2bdc0358fb03dc29" - end - - # Upstream's autogen script fetches this if not present - # but does no integrity verification & mandates being online to install. - resource "gmock" do - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/googlemock/gmock-1.7.0.zip" - mirror "https://dl.bintray.com/homebrew/mirror/gmock-1.7.0.zip" - sha256 "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b" - end - - def install - # Don't build in debug mode. See: - # https://github.com/Homebrew/homebrew/issues/9279 - # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 - ENV.prepend "CXXFLAGS", "-DNDEBUG" - - (buildpath/"gmock").install resource("gmock") - system "./autogen.sh" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-zlib" - system "make" - system "make", "check" if build.bottle? - system "make", "install" - - # Install editor support and examples - doc.install "editors", "examples" - - # google-apputils is a build-time dependency - ENV.prepend_create_path "PYTHONPATH", buildpath/"homebrew/lib/python2.7/site-packages" - res = resources.map(&:name).to_set - ["gmock"] - res.each do |package| - resource(package).stage do - system "python", *Language::Python.setup_install_args(buildpath/"homebrew") - end - end - # google is a namespace package and .pth files aren't processed from - # PYTHONPATH - touch buildpath/"homebrew/lib/python2.7/site-packages/google/__init__.py" - chdir "python" do - ENV.append_to_cflags "-I#{include}" - ENV.append_to_cflags "-L#{lib}" - args = Language::Python.setup_install_args libexec - args << "--cpp_implementation" - system "python", *args - end - site_packages = "lib/python2.7/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-protobuf.pth").write pth_contents - end - - def caveats; <<~EOS - Editor support and examples have been installed to: - #{doc} - EOS - end - - test do - testdata = <<~EOS - syntax = "proto3"; - package test; - message TestCase { - string name = 4; - } - message Test { - repeated TestCase case = 1; - } - EOS - (testpath/"test.proto").write testdata - system bin/"protoc", "test.proto", "--cpp_out=." - - protobuf_pth = lib/"python2.7/site-packages/homebrew-protobuf.pth" - (testpath.realpath/"Library/Python/2.7/lib/python/site-packages").install_symlink protobuf_pth - system "python2.7", "-c", "import google.protobuf" - end -end diff --git a/Formula/prototool.rb b/Formula/prototool.rb deleted file mode 100644 index 6ee3691ea4762..0000000000000 --- a/Formula/prototool.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Prototool < Formula - desc "Your Swiss Army Knife for Protocol Buffers" - homepage "https://github.com/uber/prototool" - url "https://github.com/uber/prototool/archive/v1.3.0.tar.gz" - sha256 "727c64ce45e2f07445838677bd08009f7975d70648d327008ec5369631266493" - - bottle do - cellar :any_skip_relocation - sha256 "b596a61d1a00123c749d473b87460d2dc84123c1b6b2a25307b5a3557232da0e" => :mojave - sha256 "d0c768377d7336ace520a3476ec40740a21249b46b600d44c6ef95b23d6dfed0" => :high_sierra - sha256 "b2781bc1baccfb8957ecfd2db0c1a67d337dcb6eb123f7cd681ec74bb3157b0f" => :sierra - sha256 "b159f5c718bea7a8dae0c5a920ceb9e3de783e7bad8bed4c1898eff874003321" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/uber/prototool" - dir.install buildpath.children - cd dir do - system "make", "brewgen" - cd "brew" do - bin.install "bin/prototool" - bash_completion.install "etc/bash_completion.d/prototool" - zsh_completion.install "etc/zsh/site-functions/_prototool" - man1.install Dir["share/man/man1/*.1"] - prefix.install_metafiles - end - end - end - - test do - system bin/"prototool", "config", "init" - assert_predicate testpath/"prototool.yaml", :exist? - end -end diff --git a/Formula/proxychains-ng.rb b/Formula/proxychains-ng.rb deleted file mode 100644 index 6d221f0939d21..0000000000000 --- a/Formula/proxychains-ng.rb +++ /dev/null @@ -1,25 +0,0 @@ -class ProxychainsNg < Formula - desc "Hook preloader" - homepage "https://sourceforge.net/projects/proxychains-ng/" - url "https://github.com/rofl0r/proxychains-ng/archive/v4.13.tar.gz" - sha256 "ff15295efc227fec99c2b8131ad532e83e833a02470c7a48ae7e7f131e1b08bc" - head "https://github.com/rofl0r/proxychains-ng.git" - - bottle do - sha256 "9d1d0ca3e57ab91965b863c2bf350242ef65bf7d7de275c19c01f29a9ea5d506" => :mojave - sha256 "71c967d3a664d42441ccd0917e4c47f58a5077c4e316279b9960529733826ac0" => :high_sierra - sha256 "231b56ce95d2df4d3949f919176033afca0ad5ac80250ee73fbdad5c2ee2709d" => :sierra - sha256 "211eff05f188af0e1555b44d0d93fce74458f5018280a9e1e02007c61192511c" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" - system "make" - system "make", "install" - system "make", "install-config" - end - - test do - assert_match "config file found", shell_output("#{bin}/proxychains4 test 2>&1", 1) - end -end diff --git a/Formula/proxytunnel.rb b/Formula/proxytunnel.rb deleted file mode 100644 index 809c9cd8d715c..0000000000000 --- a/Formula/proxytunnel.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Proxytunnel < Formula - desc "Create TCP tunnels through HTTPS proxies" - homepage "https://github.com/proxytunnel/proxytunnel" - url "https://github.com/proxytunnel/proxytunnel/archive/1.9.1.tar.gz" - sha256 "4a68d2c33bf53c290346b0a76e2c3d25556e954ba346be68cf65ae8f73ae8007" - - bottle do - cellar :any - sha256 "314fb0fca0c00e2ae02be5bd4cf5c78eda383d554a7e9f85bfc8b2356463ad2e" => :mojave - sha256 "2b609ba5cca3c9c646b22853402bac1b3c86377301616bd37543a5e81b4dc2fa" => :high_sierra - sha256 "d57947d51d68cecf55d6180d3561b30d31f6bf9e9f370e60261ab96bf9088677" => :sierra - sha256 "2bb3a40e31c0bb0173a869ef5045ba80941ef78ce80bfe9f1d200993aae46a5d" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "openssl" - - # Remove for > 1.9.1 - # Remove conflicting strlcpy/strlcat declarations - # Upstream commit 8 Nov 2016 "Make building on OSX work out of the box" - patch do - url "https://github.com/proxytunnel/proxytunnel/commit/0cfce96.patch?full_index=1" - sha256 "9d1341860cebfed4851896f657bf8d204dc3efdc57f973f969ca1782b55e2fe3" - end - - # Fix "install: illegal option -- D" - # Upstream PR from 14 May 2018 "Makefile: don't use non-portable -D option" - patch do - url "https://github.com/proxytunnel/proxytunnel/pull/27.patch?full_index=1" - sha256 "981737b32526b7ff9520236175ac36831d23d71195275f68f444c3832c5db8ab" - end - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - system "make" - system "make", "install", "prefix=#{prefix}" - end - - test do - system "#{bin}/proxytunnel", "--version" - end -end diff --git a/Formula/ps2eps.rb b/Formula/ps2eps.rb deleted file mode 100644 index da5cf806c54a2..0000000000000 --- a/Formula/ps2eps.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Ps2eps < Formula - desc "Convert PostScript to EPS files" - homepage "https://www.tm.uka.de/~bless/ps2eps" - url "https://www.tm.uka.de/~bless/ps2eps-1.68.tar.gz" - sha256 "b08f12eed88965d1891261fb70e87c7e3a3f3172ebc31bdb7994a7ce854dd925" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "2d77404809045015e8de81dc40e5ac200fcdeab46cb04df65d6e3e50d1b9490e" => :mojave - sha256 "d7f3f76cc2ef7b221c099811059dc7901feeb86eea6aad5fffe4dfc50448b80a" => :high_sierra - sha256 "eb9e2a32e389d61270e196d45bccf6ce78720ee5104487d16e4e906ec888c8d4" => :sierra - end - - depends_on "ghostscript" - - def install - system ENV.cc, "src/C/bbox.c", "-o", "bbox" - bin.install "bbox" - (libexec/"bin").install "bin/ps2eps" - (bin/"ps2eps").write <<~EOS - #!/bin/sh - perl -S #{libexec}/bin/ps2eps \"$@\" - EOS - share.install "doc/man" - doc.install "doc/pdf", "doc/html" - end - - test do - cp test_fixtures("test.ps"), testpath/"test.ps" - system bin/"ps2eps", testpath/"test.ps" - assert_predicate testpath/"test.eps", :exist? - end -end diff --git a/Formula/psftools.rb b/Formula/psftools.rb deleted file mode 100644 index 0270510cabadb..0000000000000 --- a/Formula/psftools.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Psftools < Formula - desc "Tools for fixed-width bitmap fonts" - homepage "https://www.seasip.info/Unix/PSF/" - url "https://www.seasip.info/Unix/PSF/psftools-1.1.10.tar.gz" - sha256 "1bc03214a29c4fc461a7aa11b9a3debde419b1271fa5110273ded961774e2b6f" - - bottle do - cellar :any - sha256 "710ec6da54d533e4ccc37c87093408ec5519d67852bda95485c1ac35564e0a07" => :mojave - sha256 "40c3b6b56dfa842d6a3058d5082bbe16dd3ef0360258279cca98f9da05ec9cd4" => :high_sierra - sha256 "532260f14b0b77301c7bf6b89ae1cf7f5948f26dc9d27898bb5588cb9cd4f99e" => :sierra - sha256 "ecfe3cabea7cb93be49b1189394253c09f8614877e76f8d7f59a7c1e05bc0128" => :el_capitan - end - - depends_on "autoconf" => :build - - resource "pc8x8font" do - url "https://www.zone38.net/font/pc8x8.zip" - sha256 "13a17d57276e9ef5d9617b2d97aa0246cec9b2d4716e31b77d0708d54e5b978f" - end - - def install - system "autoconf" - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - # The zip file has a fon in it, use fon2fnts to extrat to fnt - resource("pc8x8font").stage do - system "#{bin}/fon2fnts", "pc8x8.fon" - assert_predicate Pathname.pwd/"PC8X8_9.fnt", :exist? - end - end -end diff --git a/Formula/psgrep.rb b/Formula/psgrep.rb deleted file mode 100644 index 3ac35c9c3885a..0000000000000 --- a/Formula/psgrep.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Psgrep < Formula - desc "Shortcut for the 'ps aux | grep' idiom" - homepage "https://github.com/jvz/psgrep" - url "https://github.com/jvz/psgrep/archive/1.0.9.tar.gz" - sha256 "6408e4fc99414367ad08bfbeda6aa86400985efe1ccb1a1f00f294f86dd8b984" - head "https://github.com/jvz/psgrep.git" - - bottle :unneeded - - def install - bin.install "psgrep" - man1.install "psgrep.1" - end - - test do - assert_match $PROGRAM_NAME, shell_output("#{bin}/psgrep #{Process.pid}") - end -end diff --git a/Formula/pspg.rb b/Formula/pspg.rb deleted file mode 100644 index af3ea49a97b65..0000000000000 --- a/Formula/pspg.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Pspg < Formula - desc "Unix pager optimized for psql" - homepage "https://github.com/okbob/pspg" - url "https://github.com/okbob/pspg/archive/1.6.3.tar.gz" - sha256 "5ea8499a745a14428323419f256c4c609437e6c6c0cbd839b47137c398f5640f" - head "https://github.com/okbob/pspg.git" - - bottle do - cellar :any - sha256 "78e87ef94d45c242e35278aa9a08c58e323a5b416787ef82face8152eac6d8c1" => :mojave - sha256 "e54f3a97bb410cb15a1dddf862a9c516568d339533317dfe3a4e3894951f41e5" => :high_sierra - sha256 "d38a0cd6834d50e9e9e3a3edc55866c7c3c110f4e091d93923f9290f246ff076" => :sierra - end - - depends_on "ncurses" - depends_on "readline" - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - Add the following line to your psql profile (e.g. ~/.psqlrc) - \\setenv PAGER pspg - \\pset border 2 - \\pset linestyle unicode - EOS - end - - test do - assert_match "pspg-#{version.to_f}", shell_output("#{bin}/pspg --version") - end -end diff --git a/Formula/psql2csv.rb b/Formula/psql2csv.rb deleted file mode 100644 index fe6df7129f451..0000000000000 --- a/Formula/psql2csv.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Psql2csv < Formula - desc "Run a query in psql and output the result as CSV" - homepage "https://github.com/fphilipe/psql2csv" - url "https://github.com/fphilipe/psql2csv/archive/v0.9.tar.gz" - sha256 "80dffcb2b41de131dd6023f5f496ff5981d86877de81f154f56c169793026022" - revision 2 - - bottle :unneeded - - depends_on "postgresql" - - def install - bin.install "psql2csv" - end - - test do - expected = "COPY (SELECT 1) TO STDOUT WITH (FORMAT csv, ENCODING 'UTF8', HEADER true)" - output = shell_output(%Q(#{bin}/psql2csv --dry-run "SELECT 1")).strip - assert_equal expected, output - end -end diff --git a/Formula/psqlodbc.rb b/Formula/psqlodbc.rb deleted file mode 100644 index face8881b42d6..0000000000000 --- a/Formula/psqlodbc.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Psqlodbc < Formula - desc "Official PostgreSQL ODBC driver" - homepage "https://odbc.postgresql.org" - url "https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-10.03.0000.tar.gz" - sha256 "0d2ff2d10d9347ef6ce83c7ca24f4cb20b4044eeef9638c8ae3bc8107e9e92f8" - - bottle do - cellar :any - sha256 "260c8444a2a9b34d77bd08b523ff5e570006aca67527a9afdc3ae5f84c31eb7d" => :mojave - sha256 "e24fc6b6c219c8ee08a1448fe8fb8fe7e70cadae99d197c21838515dc96751de" => :high_sierra - sha256 "420b5d885afc1839b1ec764e07d28803cfe88680c233dd7833d22cd382df8c40" => :sierra - sha256 "846df80d05b7692bb2cf7d3fd13b9be0e720e02dabfd32c14a560385e0592895" => :el_capitan - end - - head do - url "https://git.postgresql.org/git/psqlodbc.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl" - depends_on "postgresql" - depends_on "unixodbc" - - def install - system "./bootstrap" if build.head? - system "./configure", "--prefix=#{prefix}", - "--with-unixodbc=#{Formula["unixodbc"].opt_prefix}" - system "make" - system "make", "install" - end - - test do - output = shell_output("#{Formula["unixodbc"].bin}/dltest #{lib}/psqlodbcw.so") - assert_equal "SUCCESS: Loaded #{lib}/psqlodbcw.so\n", output - end -end diff --git a/Formula/pssh.rb b/Formula/pssh.rb deleted file mode 100644 index 2d31c2546daaf..0000000000000 --- a/Formula/pssh.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Pssh < Formula - desc "Parallel versions of OpenSSH and related tools" - homepage "https://code.google.com/archive/p/parallel-ssh/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/parallel-ssh/pssh-2.3.1.tar.gz" - sha256 "539f8d8363b722712310f3296f189d1ae8c690898eca93627fc89a9cb311f6b4" - - bottle do - cellar :any_skip_relocation - sha256 "c1fd4fa8d8ecf0d14653822cba442d183a8a2d79b016ecab5c54e565c6972ed2" => :mojave - sha256 "ce781e0051a5a1855088a25df9eeb828b7a4bbbdafff90b2713c557acba2b19d" => :high_sierra - sha256 "b4a9f92943bcfb34d5230d90658176ef5fe3a304f3abe48a1aad5fbda38c8efb" => :sierra - sha256 "b13dcf5091ba493f21cd44c9ef43d028a4e23627b7b855ab4d299f0d543037a1" => :el_capitan - sha256 "16f3c0b42cd3bfabea6a22a39b62299de53e1fb894b72da0c12574f25a09963a" => :yosemite - sha256 "62595390d018a9a953928cf6adf8e9299b92f00c3846d74757a18437abbc5f27" => :mavericks - end - - depends_on "python@2" # does not support Python 3 - - conflicts_with "putty", :because => "both install `pscp` binaries" - - def install - ENV["PYTHONPATH"] = lib/"python2.7/site-packages" - - system "python", "setup.py", "install", "--prefix=#{prefix}", - "--install-data=#{share}" - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system bin/"pssh", "--version" - end -end diff --git a/Formula/pstoedit.rb b/Formula/pstoedit.rb deleted file mode 100644 index f1dce77004070..0000000000000 --- a/Formula/pstoedit.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pstoedit < Formula - desc "Convert PostScript and PDF files to editable vector graphics" - homepage "http://www.pstoedit.net/" - url "https://downloads.sourceforge.net/project/pstoedit/pstoedit/3.73/pstoedit-3.73.tar.gz" - sha256 "ad31d13bf4dd1b9e2590dccdbe9e4abe74727aaa16376be85cd5d854f79bf290" - - bottle do - sha256 "44f8a102c1d605669e13f3e36daae3842fb5c43136be27bf858ebdf28d021d79" => :mojave - sha256 "11f3efb3f5f5aa6912bc34f72be786abbfd176406bf6635166a5057415e6af08" => :high_sierra - sha256 "83a6324270f93ae5bca3843f52e0ae84050fc72f68c150d3456947b961f4f16a" => :sierra - sha256 "fd0e52881d4397cbca26f851b2fbbc65b382ee3c70ba46c362b90b30d9280428" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "ghostscript" - depends_on "imagemagick" - depends_on "plotutils" - depends_on "xz" if MacOS.version < :mavericks - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"pstoedit", "-f", "gs:pdfwrite", test_fixtures("test.ps"), "test.pdf" - assert_predicate testpath/"test.pdf", :exist? - end -end diff --git a/Formula/pstree.rb b/Formula/pstree.rb deleted file mode 100644 index 9cfe636d7104b..0000000000000 --- a/Formula/pstree.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Note, the version of pstree used on Linux requires -# the /proc file system, which is not available on macOS. - -class Pstree < Formula - desc "Show ps output as a tree" - homepage "http://www.thp.uni-duisburg.de/pstree/" - url "ftp://ftp.thp.uni-duisburg.de/pub/source/pstree-2.39.tar.gz" - mirror "https://fossies.org/linux/misc/pstree-2.39.tar.gz" - sha256 "7c9bc3b43ee6f93a9bc054eeff1e79d30a01cac13df810e2953e3fc24ad8479f" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "27b643077e6fa2e233945f505b024f3e725ed8b930bdd89a9df73817197acbea" => :mojave - sha256 "426d5701e835bc1f9313c3b7cd630aa0f2b279ad5f95406bd73f50d174e8eaf1" => :high_sierra - sha256 "063d2498a346002265c44bf9ad237ae47fd9923a10dd529575640d7d63bef2fa" => :sierra - sha256 "624458274db8e826c170121061ad25547c5a245788c8108bd2bf0af4a3678dea" => :el_capitan - sha256 "127b605bf4b20cbddf63f875bd15f78ad5fc31eaebb57d9ce2051a3b856a8bd5" => :yosemite - sha256 "2334d959beae2171fe10f6781a060eab40d57b841aa1905ead0b0936fb4145ef" => :mavericks - end - - def install - system "make", "pstree" - bin.install "pstree" - man1.install "pstree.1" - end - - test do - lines = shell_output("#{bin}/pstree #{Process.pid}").strip.split("\n") - assert_match $PROGRAM_NAME, lines[0] - assert_match "#{bin}/pstree", lines[1] - end -end diff --git a/Formula/psutils.rb b/Formula/psutils.rb deleted file mode 100644 index af9cf398dd48d..0000000000000 --- a/Formula/psutils.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Psutils < Formula - desc "Collection of PostScript document handling utilities" - homepage "http://knackered.org/angus/psutils/" - url "ftp://ftp.knackered.org/pub/psutils/psutils-p17.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/psutils/psutils-p17.tar.gz" - version "p17" - sha256 "3853eb79584ba8fbe27a815425b65a9f7f15b258e0d43a05a856bdb75d588ae4" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d2ba48c88116be774d989d71c791ef97f8eac3723e63a0924e08ea48f4b3ab39" => :mojave - sha256 "d9408c8f70db105a621195339f357107d6f234c75be581b1ca8365d0e82e62c2" => :high_sierra - sha256 "1319662888a509ceee3993bf17e7fb2f9dfaea5ce25c983c0bcda13283b5d612" => :sierra - sha256 "def5b3fc8cef9b4c532cc26ae216d1c6b0dae54da5a39acbdb818d53a04bf697" => :el_capitan - sha256 "8fedc8290fdcbd5cb5f8042cc83e4c10c6c2a29888c2a89f72280d3b5b53946d" => :yosemite - sha256 "032a98149e12af8c223532b01aa74a2ab57ab3c1b5b6d3f0762d2cd2b51d62ee" => :mavericks - end - - def install - # This is required, because the makefile expects that its man folder exists - man1.mkpath - system "make", "-f", "Makefile.unix", - "PERL=/usr/bin/perl", - "BINDIR=#{bin}", - "INCLUDEDIR=#{pkgshare}", - "MANDIR=#{man1}", - "install" - end - - test do - system "sh", "-c", "#{bin}/showchar Palatino B > test.ps" - system "#{bin}/psmerge", "-omulti.ps", "test.ps", "test.ps", - "test.ps", "test.ps" - system "#{bin}/psnup", "-n", "2", "multi.ps", "nup.ps" - system "#{bin}/psselect", "-p1", "multi.ps", "test2.ps" - end -end diff --git a/Formula/ptex.rb b/Formula/ptex.rb deleted file mode 100644 index 34a230968db76..0000000000000 --- a/Formula/ptex.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Ptex < Formula - desc "Texture mapping system" - homepage "http://ptex.us" - url "https://github.com/wdas/ptex/archive/v2.1.33.tar.gz" - sha256 "7c437de43fbfd45b8355f528b0276650e6f6a82357591a8540ca4b7e2012a327" - - bottle do - cellar :any - sha256 "d7c01bb272e283de0f1bba6f923f42a63513b419fbd2c02f512ad3dbd35b9a9c" => :mojave - sha256 "4da50057c397b08a7dabbc621947f607b98cfbc887cd43f0bfa41960b36c6466" => :high_sierra - sha256 "227c2b01f8398714d38c494061a630385dfd630e1b30bf5a651c14667c9f0621" => :sierra - sha256 "12d030b336d928a80776188daa86fe4de608e5bc4516b8382d52a508a5a4091f" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "make", "prefix=#{prefix}" - system "make", "test" - system "make", "install" - end -end diff --git a/Formula/pth.rb b/Formula/pth.rb deleted file mode 100644 index 3af2f61b47c11..0000000000000 --- a/Formula/pth.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Pth < Formula - desc "GNU Portable THreads" - homepage "https://www.gnu.org/software/pth/" - url "https://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz" - mirror "https://ftpmirror.gnu.org/pth/pth-2.0.7.tar.gz" - sha256 "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232" - - bottle do - cellar :any - rebuild 2 - sha256 "e7ed86c562756b07fcf9bb148c76f17c6cb4f3b02bf84ffe82285e3b279e7836" => :mojave - sha256 "da4549f9e89a71478b47f4454f9a259dc3a56a109f24083ce8f4ea69b11ac9c5" => :high_sierra - sha256 "583d6ae1681974c7461650151253c5a302f33fb16dae74b5546a4a693cec71d1" => :sierra - sha256 "bac7f73c061797768be28e21bec2e7773cfd70ff7c3f46eafd464b9632d5eae4" => :el_capitan - sha256 "7b31c6d65a97c722e661feb4c73a59a9025f1eac6b297ff181931bbdbc894ff3" => :yosemite - sha256 "4271f5c483e95641caa088059669dad1ab6d95774ff66eecae2af1c5c0ddaf0a" => :mavericks - sha256 "b478e70f3b391d547d98334070185e44d9d9074943bafbb3a7bf2e13dfdc34b9" => :mountain_lion - end - - def install - ENV.deparallelize - - # Note: shared library will not be build with --disable-debug, so don't add that flag - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "test" - system "make", "install" - end - - test do - system "#{bin}/pth-config", "--all" - end -end diff --git a/Formula/ptunnel.rb b/Formula/ptunnel.rb deleted file mode 100644 index c9e1a73ea65d2..0000000000000 --- a/Formula/ptunnel.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ptunnel < Formula - desc "Tunnel over ICMP" - homepage "https://www.cs.uit.no/~daniels/PingTunnel/" - url "https://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-0.72.tar.gz" - sha256 "b318f7aa7d88918b6269d054a7e26f04f97d8870f47bd49a76cb2c99c73407a4" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "3c8f8ec4d66e42ad4a6513a4c92e0f3e0babfebe25fb08ff4c690b1a37557fdd" => :mojave - sha256 "67bd833b70dc704ab565d526fd99044e122a4e2fcd583b083db0a5f642d46041" => :high_sierra - sha256 "048404c7b3fe3365abfc24fb623bf9548ed7e61458a00148348bbdc2f5f12f33" => :sierra - sha256 "516181dbd16539c1f8817d65637bd42cc951d551e1a3b61a4d83dc6c71dc6397" => :el_capitan - sha256 "72db3faba8fbd7c268acf22d02ae0df4dbb5dde2db8a17ca4d62b2293d0763e0" => :yosemite - sha256 "a39ae93cf1d20d9a24cf194d8b1fde7166b64276056cb084824d4291bd3f8faf" => :mavericks - end - - def install - system "make", "install", "prefix=#{prefix}" - end - - def caveats; <<~EOS - Normally, ptunnel uses raw sockets and must be run as root (using sudo, for example). - - Alternatively, you can try using the -u flag to start ptunnel in 'unprivileged' mode, - but this is not recommended. See https://www.cs.uit.no/~daniels/PingTunnel/ for details. - EOS - end - - test do - assert_match "v #{version}", shell_output("#{bin}/ptunnel -h", 1) - end -end diff --git a/Formula/puf.rb b/Formula/puf.rb deleted file mode 100644 index f55d0d5ab9f1b..0000000000000 --- a/Formula/puf.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Puf < Formula - desc "Parallel URL fetcher" - homepage "https://puf.sourceforge.io/" - url "https://downloads.sourceforge.net/project/puf/puf/1.0.0/puf-1.0.0.tar.gz" - sha256 "3f1602057dc47debeb54effc2db9eadcffae266834389bdbf5ab14fc611eeaf0" - - bottle do - cellar :any_skip_relocation - sha256 "0135ce2eda650af382ccefebc51bce5b83b356234ad02177a311309a1799af79" => :mojave - sha256 "e9f5c12dedbca6d80be8321abdea89162af0097d68401b77aadf93605877a967" => :high_sierra - sha256 "3153e22f42620f0ceb69f11080e6ba113765d7847cbbb2672f30a7a6766db972" => :sierra - sha256 "24952b79335eb08d7a8880a16714e6afe3b73a65f5f26c59b106020198c1b3f3" => :el_capitan - sha256 "d96385896fd7831b71af3b05d55f3c5cd2c3a9565f9083c2efe96309989dcf15" => :yosemite - sha256 "7b76565452fb4f2b03a8b01d6e7495634965ba0bad74906cb907c0642805e5e5" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/pugixml.rb b/Formula/pugixml.rb deleted file mode 100644 index d92e30081ae6b..0000000000000 --- a/Formula/pugixml.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Pugixml < Formula - desc "Light-weight C++ XML processing library" - homepage "https://pugixml.org/" - url "https://github.com/zeux/pugixml/releases/download/v1.9/pugixml-1.9.tar.gz" - sha256 "d156d35b83f680e40fd6412c4455fdd03544339779134617b9b28d19e11fdba6" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "65415981e37fc57d6e01ccd5ce9ef3a28f0b127ebefad23978a826fbf90ce6c1" => :mojave - sha256 "88887f5773727df5b02405326b57821c7d8ae625bc36878d5abc9317e66a9f74" => :high_sierra - sha256 "349e189771d80c798d920be6ff8f6d24612528a05e4285c4957e806092792604" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DBUILD_SHARED_LIBS=OFF", - "-DBUILD_PKGCONFIG=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - int main(int argc, char *argv[]) { - pugi::xml_document doc; - pugi::xml_parse_result result = doc.load_file("test.xml"); - - assert(result); - assert(strcmp(doc.child_value("root"), "Hello world!") == 0); - } - EOS - - (testpath/"test.xml").write <<~EOS - Hello world! - EOS - - system ENV.cc, "test.cpp", "-o", "test", "-lstdc++", - "-L#{Dir["#{lib}/pug*"].first}", "-lpugixml", - "-I#{include.children.first}" - system "./test" - end -end diff --git a/Formula/pulledpork.rb b/Formula/pulledpork.rb deleted file mode 100644 index 414fe0beb6980..0000000000000 --- a/Formula/pulledpork.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Pulledpork < Formula - desc "Snort rule management" - homepage "https://github.com/shirkdog/pulledpork" - url "https://github.com/shirkdog/pulledpork/archive/v0.7.3.tar.gz" - sha256 "48c66dc9abb7545186d4fba497263c1d1b247c0ea7f0953db4d515e7898461a2" - head "https://github.com/shirkdog/pulledpork.git" - - bottle do - cellar :any - sha256 "5638c0dd4c2a28e24369ea1b02ffd09ae4a5f7e38231fc9f00cb250f47f519f4" => :mojave - sha256 "4e8a01b1531f4b1824358e3a28c968ac04f7c5c78c5c4a878178ae825472b228" => :high_sierra - sha256 "33cf47b4c02e4f2ba57f6b34770bafcda115d9b249b1227596e71c3f200c4083" => :sierra - sha256 "e17149bd41a6f5f74d796c95c92710996e936dba1c2b1d523e89c3c29bdc2219" => :el_capitan - end - - depends_on "openssl" - - resource "Switch" do - url "https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Switch-2.17.tar.gz" - sha256 "31354975140fe6235ac130a109496491ad33dd42f9c62189e23f49f75f936d75" - end - - resource "Crypt::SSLeay" do - url "https://cpan.metacpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-0.72.tar.gz" - sha256 "f5d34f813677829857cf8a0458623db45b4d9c2311daaebe446f9e01afa9ffe8" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - end - - chmod 0755, "pulledpork.pl" - bin.install "pulledpork.pl" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - doc.install Dir["doc/*"] - (etc/"pulledpork").install Dir["etc/*"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/pulledpork.pl -V") - end -end diff --git a/Formula/pulseaudio.rb b/Formula/pulseaudio.rb deleted file mode 100644 index 0f1dfe62b03a4..0000000000000 --- a/Formula/pulseaudio.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Pulseaudio < Formula - desc "Sound system for POSIX OSes" - homepage "https://wiki.freedesktop.org/www/Software/PulseAudio/" - url "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-12.2.tar.xz" - sha256 "809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055" - - bottle do - sha256 "d4e3317b4dbe4a94da0d4214dd283a905ad9a6cf0af6350cf8c7fdeca9178b41" => :mojave - sha256 "863574c4a45f3c8b0654e265d2febb545e483b6a6d958847d32e8c81c510af43" => :high_sierra - sha256 "1cdb396a073ac27b1f974530ecb3d663be522dc171cdfd473491a42d7ccb602c" => :sierra - sha256 "f2c4ebc01c8c104daab6739f61bc8aeeafe323fa8ed88f7730313cd6e84bb019" => :el_capitan - end - - head do - url "https://anongit.freedesktop.org/git/pulseaudio/pulseaudio.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "intltool" => :build - end - - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "libsndfile" - depends_on "libsoxr" - depends_on "libtool" - depends_on "openssl" - depends_on "speexdsp" - depends_on "glib" => :optional - - fails_with :clang do - build 421 - cause "error: thread-local storage is unsupported for the current target" - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-coreaudio-output - --disable-neon-opt - --disable-nls - --disable-x11 - --with-mac-sysroot=#{MacOS.sdk_path} - --with-mac-version-min=#{MacOS.version} - ] - - if build.head? - # autogen.sh runs bootstrap.sh then ./configure - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - end - - plist_options :manual => "pulseaudio" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pulseaudio - --start - - RunAtLoad - - - - EOS - end - - test do - assert_match "module-sine", shell_output("#{bin}/pulseaudio --dump-modules") - end -end diff --git a/Formula/pulumi.rb b/Formula/pulumi.rb deleted file mode 100644 index 222151f2f55c7..0000000000000 --- a/Formula/pulumi.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Pulumi < Formula - desc "Cloud native development platform" - homepage "https://pulumi.io/" - url "https://github.com/pulumi/pulumi.git", - :tag => "v0.16.9", - :revision => "c189a49172aff6c9155d1e86a66669070f30592d" - - bottle do - cellar :any_skip_relocation - sha256 "29126914ba80aad46a1628f284708ea5dda260f9be708658d0f34236ec8333c6" => :mojave - sha256 "fb8ad73928444a8909fed436b41c7d3cb18615b31f7047375c6cd3d98c546399" => :high_sierra - sha256 "aa1d7525f94ecd5046fbfca0caa7109e04af679f25507517c8d259d23e8939b6" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/pulumi/pulumi" - dir.install buildpath.children - - cd dir do - system "dep", "ensure", "-vendor-only" - system "make", "dist" - bin.install Dir["#{buildpath}/bin/*"] - prefix.install_metafiles - - # Install bash completion - output = Utils.popen_read("#{bin}/pulumi gen-completion bash") - (bash_completion/"pulumi").write output - - # Install zsh completion - output = Utils.popen_read("#{bin}/pulumi gen-completion zsh") - (zsh_completion/"_pulumi").write output - end - end - - test do - ENV["PULUMI_ACCESS_TOKEN"] = "local://" - ENV["PULUMI_TEMPLATE_PATH"] = testpath/"templates" - system "#{bin}/pulumi", "new", "aws-typescript", "--generate-only", - "--force", "-y" - assert_predicate testpath/"Pulumi.yaml", :exist?, "Project was not created" - end -end diff --git a/Formula/pumba.rb b/Formula/pumba.rb deleted file mode 100644 index 567617cad5bf9..0000000000000 --- a/Formula/pumba.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Pumba < Formula - desc "Chaos testing tool for Docker" - homepage "https://github.com/alexei-led/pumba" - url "https://github.com/alexei-led/pumba/archive/0.6.2.tar.gz" - sha256 "d94be5696cde2b1c6ef409040f24b8b1260d3a34b9e40f08dd492c2aa0c5b656" - head "https://github.com/alexei-led/pumba.git" - - bottle do - cellar :any_skip_relocation - sha256 "ad17a6187a071b8de82f9f11cc6b031bed2e21bffc95055d84baf9f193056681" => :mojave - sha256 "c7804cc4dc62cca20b8c50b975fcfd4424206bbcf8344928ff2fe03a2db078e2" => :high_sierra - sha256 "1eb0685f20f4cf3d5b84e493c09d045dad41947351ffc7bfa5b4f3fd21c48042" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/alexei-led/pumba").install buildpath.children - - cd "src/github.com/alexei-led/pumba" do - system "go", "build", "-o", bin/"pumba", "-ldflags", - "-X main.Version=#{version}", "./cmd" - prefix.install_metafiles - end - end - - test do - output = pipe_output("#{bin}/pumba rm test-container 2>&1") - assert_match "Is the docker daemon running?", output - end -end diff --git a/Formula/pup.rb b/Formula/pup.rb deleted file mode 100644 index 9386981e4be77..0000000000000 --- a/Formula/pup.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Pup < Formula - desc "Parse HTML at the command-line" - homepage "https://github.com/EricChiang/pup" - url "https://github.com/ericchiang/pup/archive/v0.4.0.tar.gz" - sha256 "0d546ab78588e07e1601007772d83795495aa329b19bd1c3cde589ddb1c538b0" - head "https://github.com/EricChiang/pup.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "baeef002d46ed4c9872242419ed991b9d9f26d8e5b296f54b2ffb9e1e6bcfc84" => :mojave - sha256 "f470de75187b994ef9612c5404dc7622a356c8ee6af21f6b2549b5d7c5d88d32" => :high_sierra - sha256 "4ba84cffa7cfd01bd252223055abdf5fd8b6cfc27474131cf313e688ea8eeecf" => :sierra - sha256 "a1aa49640871c127c76f4aea6db65487db964a055e2aa4d86ee2d8b7f5dcb561" => :el_capitan - end - - depends_on "go" => :build - depends_on "gox" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/ericchiang/pup" - dir.install buildpath.children - - cd dir do - arch = MacOS.prefer_64_bit? ? "amd64" : "386" - system "gox", "-arch", arch, "-os", "darwin", "./..." - bin.install "pup_darwin_#{arch}" => "pup" - end - - prefix.install_metafiles dir - end - - test do - output = pipe_output("#{bin}/pup p text{}", "

Hello

", 0) - assert_equal "Hello", output.chomp - end -end diff --git a/Formula/pure-ftpd.rb b/Formula/pure-ftpd.rb deleted file mode 100644 index 7294b1561afff..0000000000000 --- a/Formula/pure-ftpd.rb +++ /dev/null @@ -1,68 +0,0 @@ -class PureFtpd < Formula - desc "Secure and efficient FTP server" - homepage "https://www.pureftpd.org/" - url "https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.47.tar.gz" - sha256 "4740c316f5df879a2d68464489fb9b8b90113fe7dce58e2cdd2054a4768f27ad" - - bottle do - sha256 "f848669051fc9f2dcd98373a5c2c12029c3f59cc4cebae13bb246164650c0fa3" => :mojave - sha256 "3ee0ae276bad11f6459e2a866f96f7618a12b8625e69dd1d2b3fbcb3c7f3d3fe" => :high_sierra - sha256 "fcde5497abd815c560b9b8dc1bcb40d1018e378e16fcbc04cb942d244a64c972" => :sierra - sha256 "db8752838fcba745378a65f79c40ee8e573f50cd648d48b23b47b813dfb5cba1" => :el_capitan - end - - depends_on "libsodium" - depends_on "openssl" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --sysconfdir=#{etc} - --with-everything - --with-pam - --with-tls - --with-bonjour - ] - - system "./configure", *args - system "make", "install" - end - - plist_options :manual => "pure-ftpd" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/pure-ftpd - --chrooteveryone - --createhomedir - --allowdotfiles - --login=puredb:#{etc}/pureftpd.pdb - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/pure-ftpd.log - StandardOutPath - #{var}/log/pure-ftpd.log - - - EOS - end - - test do - system bin/"pure-pw", "--help" - end -end diff --git a/Formula/purescript.rb b/Formula/purescript.rb deleted file mode 100644 index 3156f29ca5127..0000000000000 --- a/Formula/purescript.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "language/haskell" - -class Purescript < Formula - include Language::Haskell::Cabal - - desc "Strongly typed programming language that compiles to JavaScript" - homepage "http://www.purescript.org" - url "https://hackage.haskell.org/package/purescript-0.12.1/purescript-0.12.1.tar.gz" - sha256 "81ab67e994a85e4ee455d35a5023b5ee2f191c83e9de2be65a8cd2892e302454" - head "https://github.com/purescript/purescript.git" - - bottle do - cellar :any_skip_relocation - sha256 "6d93184292a93f8b9b7f142b949bf8d6b4c32cbb2cc61b531cee3ae1c11f1d36" => :mojave - sha256 "1c9541e29396f4779653874705b70081d1b7ecbfd03504c075d6592eac1a64b7" => :high_sierra - sha256 "d22668820085862153e81213b2e127b9162b6ea337aaa6c09b3b988e33f3a49c" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - cabal_sandbox do - if build.head? - cabal_install "hpack" - system "./.cabal-sandbox/bin/hpack" - end - - install_cabal_package "-f", "release", :using => ["alex", "happy"] - end - end - - test do - test_module_path = testpath/"Test.purs" - test_target_path = testpath/"test-module.js" - test_module_path.write <<~EOS - module Test where - - main :: Int - main = 1 - EOS - system bin/"purs", "compile", test_module_path, "-o", test_target_path - assert_predicate test_target_path, :exist? - end -end diff --git a/Formula/pushpin.rb b/Formula/pushpin.rb deleted file mode 100644 index fc92f14dd7359..0000000000000 --- a/Formula/pushpin.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Pushpin < Formula - desc "Reverse proxy for realtime web services" - homepage "https://pushpin.org/" - url "https://dl.bintray.com/fanout/source/pushpin-1.19.0.tar.bz2" - sha256 "75582b97bd394ac8ada058bd840cf58145b3a60e7e59b7f762a020c043b6d46b" - head "https://github.com/fanout/pushpin.git" - - bottle do - sha256 "4963677141e01ec41344055d4b6bd9ec17c9c8786aadcefdeef5fb4cb0900c24" => :mojave - sha256 "a0d2403e36b0b631e32b51e19ec9605003da3e016187d196d255a19e5850d2b1" => :high_sierra - sha256 "616ba91808da5108efb1892fd1729171737fb9b7605b93086a2ce6211cdef58f" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "mongrel2" - depends_on "qt" - depends_on "zeromq" - depends_on "zurl" - - def install - system "./configure", "--prefix=#{prefix}", - "--configdir=#{etc}", - "--rundir=#{var}/run", - "--logdir=#{var}/log", - "--extraconf=QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - conffile = testpath/"pushpin.conf" - routesfile = testpath/"routes" - runfile = testpath/"test.py" - - cp HOMEBREW_PREFIX/"etc/pushpin/pushpin.conf", conffile - - inreplace conffile do |s| - s.gsub! "rundir=#{HOMEBREW_PREFIX}/var/run/pushpin", "rundir=#{testpath}/var/run/pushpin" - s.gsub! "logdir=#{HOMEBREW_PREFIX}/var/log/pushpin", "logdir=#{testpath}/var/log/pushpin" - end - - routesfile.write <<~EOS - * localhost:10080 - EOS - - runfile.write <<~EOS - import urllib2 - import threading - from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer - class TestHandler(BaseHTTPRequestHandler): - def do_GET(self): - self.send_response(200) - self.end_headers() - self.wfile.write('test response\\n') - def server_worker(c): - global port - server = HTTPServer(('', 10080), TestHandler) - port = server.server_address[1] - c.acquire() - c.notify() - c.release() - try: - server.serve_forever() - except: - server.server_close() - c = threading.Condition() - c.acquire() - server_thread = threading.Thread(target=server_worker, args=(c,)) - server_thread.daemon = True - server_thread.start() - c.wait() - c.release() - f = urllib2.urlopen('http://localhost:7999/test') - body = f.read() - assert(body == 'test response\\n') - EOS - - pid = fork do - exec "#{bin}/pushpin", "--config=#{conffile}" - end - - begin - sleep 3 # make sure pushpin processes have started - system "python", runfile - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/putmail-queue.rb b/Formula/putmail-queue.rb deleted file mode 100644 index bd373112bb995..0000000000000 --- a/Formula/putmail-queue.rb +++ /dev/null @@ -1,15 +0,0 @@ -class PutmailQueue < Formula - desc "Putmail queue package" - homepage "https://putmail.sourceforge.io" - url "https://downloads.sourceforge.net/project/putmail/putmail-queue/0.2/putmail-queue-0.2.tar.bz2" - sha256 "09349ad26345783e061bfe4ad7586fbbbc5d1cc48e45faa9ba9f667104f9447c" - - bottle :unneeded - - depends_on "putmail" - - def install - bin.install "putmail_dequeue.py", "putmail_enqueue.py" - man1.install Dir["man/man1/*.1"] - end -end diff --git a/Formula/putmail.rb b/Formula/putmail.rb deleted file mode 100644 index ceedcc5261e04..0000000000000 --- a/Formula/putmail.rb +++ /dev/null @@ -1,15 +0,0 @@ -class Putmail < Formula - desc "MTA or SMTP client designed to replace the sendmail command" - homepage "https://putmail.sourceforge.io" - url "https://downloads.sourceforge.net/project/putmail/putmail.py/1.4/putmail.py-1.4.tar.bz2" - sha256 "1f4e6f33496100ad89b8f029621fb78ab2f80258994c7cd8687fd46730df45be" - - bottle :unneeded - - def install - bin.install "putmail.py" - man1.install "man/man1/putmail.py.1" - bin.install_symlink "putmail.py" => "putmail" - man1.install_symlink "putmail.py.1" => "putmail.1" - end -end diff --git a/Formula/putty.rb b/Formula/putty.rb deleted file mode 100644 index 2bd974f78186c..0000000000000 --- a/Formula/putty.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Putty < Formula - desc "Implementation of Telnet and SSH" - homepage "https://www.chiark.greenend.org.uk/~sgtatham/putty/" - url "https://the.earth.li/~sgtatham/putty/0.70/putty-0.70.tar.gz" - sha256 "bb8aa49d6e96c5a8e18a057f3150a1695ed99a24eef699e783651d1f24e7b0be" - - bottle do - cellar :any_skip_relocation - sha256 "cf7d4ac28f94d4486e3edd4424d86c7074cd5dd59a876d49a03b6d248277260f" => :mojave - sha256 "832bf75b4d9927e461c853e802a7951724522fd083a0774f0609141965c06c82" => :high_sierra - sha256 "b212b6d5db7478c43d0f6883c459373e257219f9bfc4aa24abe2992d82f9294e" => :sierra - sha256 "658a1736398dedd1dc5bc1c267c08b126a6bd9b2653fb2ef3b425f401a14f293" => :el_capitan - sha256 "ef3e944e9b322ce16da3264e68bce6a23f58a23f45f8d84d27954670a8d71379" => :yosemite - end - - head do - url "https://git.tartarus.org/simon/putty.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "halibut" => :build - depends_on "gtk+3" => :optional - end - - depends_on "pkg-config" => :build - - conflicts_with "pssh", :because => "both install `pscp` binaries" - - def install - if build.head? - system "./mkfiles.pl" - system "./mkauto.sh" - system "make", "-C", "doc" - end - - args = %W[ - --prefix=#{prefix} - --disable-silent-rules - --disable-dependency-tracking - --disable-gtktest - ] - - if build.head? && build.with?("gtk+3") - args << "--with-gtk=3" << "--with-quartz" - else - args << "--without-gtk" - end - - system "./configure", *args - - build_version = build.head? ? "svn-#{version}" : version - system "make", "VER=-DRELEASE=#{build_version}" - - bin.install %w[plink pscp psftp puttygen] - bin.install %w[putty puttytel pterm] if build.head? && build.with?("gtk+3") - - cd "doc" do - man1.install %w[plink.1 pscp.1 psftp.1 puttygen.1] - man1.install %w[putty.1 puttytel.1 pterm.1] if build.head? && build.with?("gtk+3") - end - end - - test do - (testpath/"command.sh").write <<~EOS - #!/usr/bin/expect -f - set timeout -1 - spawn #{bin}/puttygen -t rsa -b 4096 -q -o test.key - expect -exact "Enter passphrase to save key: " - send -- "Homebrew\n" - expect -exact "\r - Re-enter passphrase to verify: " - send -- "Homebrew\n" - expect eof - EOS - chmod 0755, testpath/"command.sh" - - system "./command.sh" - assert_predicate testpath/"test.key", :exist? - end -end diff --git a/Formula/puzzles.rb b/Formula/puzzles.rb deleted file mode 100644 index c17e8271b9643..0000000000000 --- a/Formula/puzzles.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Puzzles < Formula - desc "Collection of one-player puzzle games" - homepage "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/" - # Extract https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz to get the version number - url "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-20180924.d8d5064.tar.gz" - version "20180924" - sha256 "e040e965c52dd7b60603737e2530dda654b2d25f79d2a0a4ee06ab757e62ac6d" - head "https://git.tartarus.org/simon/puzzles.git" - - bottle do - cellar :any_skip_relocation - sha256 "51ebb5b34f2b5c0c7b26d9a474c3e31d82d0dec73ca3b8c08b07dc22a331f41b" => :mojave - sha256 "6689b218a12a6d2d7040c1bc74907a617e53e90861500d107fc18917719e8f92" => :high_sierra - sha256 "e1fcd9573717c26270ee4597059337ea9d51e3d660d3aac47e5cdd9748b8f85e" => :sierra - end - - depends_on "halibut" - - def install - # Do not build for i386 - inreplace "mkfiles.pl", /@osxarchs = .*/, "@osxarchs = ('x86_64');" - - system "perl", "mkfiles.pl" - system "make", "-d", "-f", "Makefile.osx", "all" - prefix.install "Puzzles.app" - end - - test do - assert_predicate prefix/"Puzzles.app/Contents/MacOS/Puzzles", :executable? - end -end diff --git a/Formula/pv.rb b/Formula/pv.rb deleted file mode 100644 index dbe7f1811112a..0000000000000 --- a/Formula/pv.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Pv < Formula - desc "Monitor data's progress through a pipe" - homepage "https://www.ivarch.com/programs/pv.shtml" - url "https://www.ivarch.com/programs/sources/pv-1.6.6.tar.bz2" - sha256 "608ef935f7a377e1439c181c4fc188d247da10d51a19ef79bcdee5043b0973f1" - - bottle do - cellar :any_skip_relocation - sha256 "790e86acba53eecbff8e20753df00ef139dbc686d0dac27062d57c0a47eaac76" => :mojave - sha256 "4beeaa40f09a609c2706a945ec04b2b6a156efc0befe9dc571ec426f3a152cba" => :high_sierra - sha256 "231a659ee3aca5a6f474bc058ed02a0a5f2c366d04c8c56043d310644c46e393" => :sierra - sha256 "d461d873a47091a52b6114ac0976f16b0ade9e13d02fa0609f574369b8cfc8f0" => :el_capitan - sha256 "0c4d4a90c188370ed312490b7ff76fdb8a31399170cdc0ad5dfc1542af4c4fc0" => :yosemite - end - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}", - "--mandir=#{man}", "--disable-nls" - system "make", "install" - end - - test do - progress = pipe_output("#{bin}/pv -ns 4 2>&1 >/dev/null", "beer") - assert_equal "100", progress.strip - end -end diff --git a/Formula/pwgen.rb b/Formula/pwgen.rb deleted file mode 100644 index d44e9aa36c584..0000000000000 --- a/Formula/pwgen.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Pwgen < Formula - desc "Password generator" - homepage "https://pwgen.sourceforge.io/" - url "https://downloads.sourceforge.net/project/pwgen/pwgen/2.08/pwgen-2.08.tar.gz" - sha256 "dab03dd30ad5a58e578c5581241a6e87e184a18eb2c3b2e0fffa8a9cf105c97b" - - bottle do - cellar :any_skip_relocation - sha256 "2f35a2d575e16a2ab0497cabfc927a7b40aba68edba574889bf9bbdf03572c12" => :mojave - sha256 "185f2f56eb03da60277520734452204ec2e0059cbc1f0af5d0fec1e7fa837658" => :high_sierra - sha256 "01a0709f74923e7b86d680f03d3ec056d3175cb7e54be176a26d5bfae890fd21" => :sierra - sha256 "7dade70b172cb91635afffe8bb1eadb251f9dbd3368ab9e4a37f98a7c0a14b01" => :el_capitan - sha256 "1799bdbb42974d10e2ff3a4e382351b1f03f0a3be31c15ff718d8935d1226101" => :yosemite - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/pwgen", "--secure", "20", "10" - end -end diff --git a/Formula/pwnat.rb b/Formula/pwnat.rb deleted file mode 100644 index d0fb12909ccd3..0000000000000 --- a/Formula/pwnat.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Pwnat < Formula - desc "Proxy server that works behind a NAT" - homepage "https://samy.pl/pwnat/" - url "https://samy.pl/pwnat/pwnat-0.3-beta.tgz" - sha256 "d5d6ea14f1cf0d52e4f946be5c3630d6440f8389e7467c0117d1fe33b9d130a2" - head "https://github.com/samyk/pwnat.git" - - bottle do - cellar :any_skip_relocation - sha256 "483e476edd037e89dc1c24fbf115132a815a9a4d6fcb987ceea6a4c07a5944da" => :mojave - sha256 "3a4bf09acd5eda4e54fbe21d0028948613fa398a3a1272722957079a9f18c836" => :high_sierra - sha256 "f8319cece67a334c14129e706f9d1b249d7905cf1ad62df9b5ee9553dbb8d001" => :sierra - sha256 "0149fc977622f2fd55db5845a377437028df31bb847230d3fd73d548e481e289" => :el_capitan - sha256 "cf17568c4053240ffe61594bcc618577c0d0c569abda8b3b956a4e4b441a755e" => :yosemite - sha256 "0baed31dc05b28a330501a0d4119e8997c1038d14311c64f2d7b367ebdf9f01e" => :mavericks - sha256 "ed78a0577b4e2f4555b4c7724cf829032b0af99713c58a5ffd943d21b551b199" => :mountain_lion - end - - def install - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LDFLAGS=-lz" - bin.install "pwnat" - end - - test do - shell_output("#{bin}/pwnat -h", 1) - end -end diff --git a/Formula/pwntools.rb b/Formula/pwntools.rb deleted file mode 100644 index b70b6e3a8bdca..0000000000000 --- a/Formula/pwntools.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Pwntools < Formula - include Language::Python::Virtualenv - - desc "CTF framework used by Gallopsled in every CTF" - homepage "https://github.com/Gallopsled/pwntools" - url "https://github.com/Gallopsled/pwntools/archive/3.12.1.tar.gz" - sha256 "dfea4140d345f2749086e07ed9c08d5625e50e0f969e2894509e69f9d4755c3d" - - bottle do - cellar :any - rebuild 1 - sha256 "6c7c1dafcec78ddf24109f89afba154bb459217c8d9759a7277c2903b80fc6cf" => :mojave - sha256 "48e83940f7b360d563c42ec38fa80584f24acbd6264bd02b9dd0bf28d98a1466" => :high_sierra - sha256 "bba26510ada47ee822ad552d0b0b4febfbb0f5435af53302c50f8655f85093cf" => :sierra - end - - depends_on "openssl" - depends_on "python@2" # does not support Python 3 - - if Tab.for_name("moreutils").with?("errno") - conflicts_with "moreutils", :because => "Both install `errno` binaries" - end - - def install - venv = virtualenv_create(libexec) - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", name - venv.pip_install_and_link buildpath - end - - test do - assert_equal "686f6d6562726577696e7374616c6c636f6d706c657465", - shell_output("#{bin}/hex homebrewinstallcomplete").strip - end -end diff --git a/Formula/pwsafe.rb b/Formula/pwsafe.rb deleted file mode 100644 index 849259a03257e..0000000000000 --- a/Formula/pwsafe.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Pwsafe < Formula - desc "Generate passwords and manage encrypted password databases" - homepage "https://github.com/nsd20463/pwsafe" - url "https://src.fedoraproject.org/repo/pkgs/pwsafe/pwsafe-0.2.0.tar.gz/4bb36538a2772ecbf1a542bc7d4746c0/pwsafe-0.2.0.tar.gz" - sha256 "61e91dc5114fe014a49afabd574eda5ff49b36c81a6d492c03fcb10ba6af47b7" - revision 2 - - bottle do - cellar :any - sha256 "bdd412155cacaf41af7df75e4fb33d27dd035645af3167dd7457cda2bd4542ef" => :mojave - sha256 "be2e0da22fa321f9745b9f9bfe09c20e9fee17852f6369fe365fc457654afb34" => :high_sierra - sha256 "2e8928d27de84dac239832ba22f66ebbc85d14ac8c420f5971db90b407e5781e" => :sierra - sha256 "124f8d5da3927bf76826f0a3ccfeb59e1fc8674b7f7c8ed4e2b6aed3e86a5263" => :el_capitan - sha256 "6c8fffd07460664b877c97d00a9507b232d6fae885a29ed5f0842192bee410f4" => :yosemite - end - - depends_on "openssl" - depends_on "readline" - - # A password database for testing is provided upstream. How nice! - resource "test-pwsafe-db" do - url "https://raw.githubusercontent.com/nsd20463/pwsafe/208de3a94339df36b6e9cd8aeb7e0be0a67fd3d7/test.dat" - sha256 "7ecff955871e6e58e55e0794d21dfdea44a962ff5925c2cd0683875667fbcc79" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - test_db_passphrase = "abc" - test_account_name = "testing" - test_account_pass = "sg1rIWHL?WTOV=d#q~DmxiQq%_j-$f__U7EU" - - resource("test-pwsafe-db").stage do - Utils.popen( - "#{bin}/pwsafe -f test.dat -p #{test_account_name}", "r+" - ) do |pipe| - pipe.puts test_db_passphrase - assert_match(/^#{Regexp.escape(test_account_pass)}$/, pipe.read) - end - end - end -end diff --git a/Formula/py2cairo.rb b/Formula/py2cairo.rb deleted file mode 100644 index 25c56f02476c0..0000000000000 --- a/Formula/py2cairo.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Py2cairo < Formula - desc "Python 2 bindings for the Cairo graphics library" - homepage "https://cairographics.org/pycairo/" - url "https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-1.18.0.tar.gz" - sha256 "abd42a4c9c2069febb4c38fe74bfc4b4a9d3a89fea3bc2e4ba7baff7a20f783f" - - bottle do - cellar :any - sha256 "46599e5f1abc91308b81ff7c8dea1df675ffc7349f0953aae40742f450e54932" => :mojave - sha256 "a20fd135bf7242a1978cda0d4dfdba2529875bc476ed3322f407832a9ce04445" => :high_sierra - sha256 "1ff1752697e067f46f10923d234e7352b6f68254faaa630a173ce3a6b50ca8c0" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "python@2" - - def install - system "python", *Language::Python.setup_install_args(prefix) - end - - test do - system "python", "-c", "import cairo; print(cairo.version)" - end -end diff --git a/Formula/py3cairo.rb b/Formula/py3cairo.rb deleted file mode 100644 index 7d4bae5ba2aad..0000000000000 --- a/Formula/py3cairo.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Py3cairo < Formula - desc "Python 3 bindings for the Cairo graphics library" - homepage "https://cairographics.org/pycairo/" - url "https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-1.18.0.tar.gz" - sha256 "abd42a4c9c2069febb4c38fe74bfc4b4a9d3a89fea3bc2e4ba7baff7a20f783f" - - bottle do - cellar :any - sha256 "f4f21f7bfd11b21b5885cd8fd514897f906fc003c224098c6ab0b01e9ac0a6ce" => :mojave - sha256 "4c8d11b53dcad73b398d63967734f251bba7794143b69e11505b2c5f912ca031" => :high_sierra - sha256 "8f36a76c0ced8e4203e2198ddcb7f32e2f254221d8f8a6c07909a50f5bcf29ac" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "python" - - def install - system "python3", *Language::Python.setup_install_args(prefix) - end - - test do - system "python3", "-c", "import cairo; print(cairo.version)" - end -end diff --git a/Formula/pybind11.rb b/Formula/pybind11.rb deleted file mode 100644 index af9641bd93707..0000000000000 --- a/Formula/pybind11.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Pybind11 < Formula - desc "Seamless operability between C++11 and Python" - homepage "https://github.com/pybind/pybind11" - url "https://github.com/pybind/pybind11/archive/v2.2.4.tar.gz" - sha256 "b69e83658513215b8d1443544d0549b7d231b9f201f6fc787a2b2218b408181e" - - bottle do - cellar :any_skip_relocation - sha256 "416f1b42821bc2c4fae7753e6d1e002496ab68827289c9c6c81ef8573f080335" => :mojave - sha256 "56e63099ecd908c86fed027a4fd2c83c63325f1aa715fa1df5b8cf9d6491f6af" => :high_sierra - sha256 "56e63099ecd908c86fed027a4fd2c83c63325f1aa715fa1df5b8cf9d6491f6af" => :sierra - sha256 "56e63099ecd908c86fed027a4fd2c83c63325f1aa715fa1df5b8cf9d6491f6af" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "python" - - def install - system "cmake", ".", "-DPYBIND11_TEST=OFF", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"example.cpp").write <<~EOS - #include - - int add(int i, int j) { - return i + j; - } - namespace py = pybind11; - PYBIND11_PLUGIN(example) { - py::module m("example", "pybind11 example plugin"); - m.def("add", &add, "A function which adds two numbers"); - return m.ptr(); - } - EOS - - (testpath/"example.py").write <<~EOS - import example - example.add(1,2) - EOS - - python_flags = `python3-config --cflags --ldflags`.split(" ") - system ENV.cxx, "-O3", "-shared", "-std=c++11", *python_flags, "example.cpp", "-o", "example.so" - system "python3", "example.py" - end -end diff --git a/Formula/pycodestyle.rb b/Formula/pycodestyle.rb deleted file mode 100644 index 3856eae8db61b..0000000000000 --- a/Formula/pycodestyle.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Pycodestyle < Formula - desc "Simple Python style checker in one Python file" - homepage "http://pycodestyle.pycqa.org" - url "https://github.com/PyCQA/pycodestyle/archive/2.4.0.tar.gz" - sha256 "b8656dc08ab4af23d001a42b3f68510d15790df28d7d666d3f91e3fe9bf8e938" - head "https://github.com/PyCQA/pycodestyle.git" - - bottle :unneeded - - def install - bin.install "pycodestyle.py" => "pycodestyle" - end - - test do - # test invocation on a file with no issues - (testpath/"ok.py").write <<~EOS - print(1) - EOS - assert_equal "", - shell_output("#{bin}/pycodestyle ok.py") - - # test invocation on a file with a whitespace style issue - (testpath/"ws.py").write <<~EOS - print( 1) - EOS - assert_equal "ws.py:1:7: E201 whitespace after '('\n", - shell_output("#{bin}/pycodestyle ws.py", 1) - - # test invocation on a file with an import not at top of file - (testpath/"imp.py").write <<~EOS - pass - import sys - EOS - assert_equal "imp.py:2:1: E402 module level import not at top of file\n", - shell_output("#{bin}/pycodestyle imp.py", 1) - end -end diff --git a/Formula/pyenv-ccache.rb b/Formula/pyenv-ccache.rb deleted file mode 100644 index 052d1f8f76ac5..0000000000000 --- a/Formula/pyenv-ccache.rb +++ /dev/null @@ -1,22 +0,0 @@ -class PyenvCcache < Formula - desc "Make Python build faster, using the leverage of `ccache`" - homepage "https://github.com/pyenv/pyenv-ccache" - url "https://github.com/pyenv/pyenv-ccache/archive/v0.0.2.tar.gz" - sha256 "ebfb8a5ed754df485b3f391078c5dc913f0587791a5e3815e61078f0db180b9e" - head "https://github.com/pyenv/pyenv-ccache.git" - - bottle :unneeded - - depends_on "ccache" - depends_on "pyenv" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - test do - output = shell_output("eval \"$(pyenv init -)\" && pyenv hooks install && ls") - assert_match /ccache.bash/, output - end -end diff --git a/Formula/pyenv-pip-migrate.rb b/Formula/pyenv-pip-migrate.rb deleted file mode 100644 index 4bbf446f4f8cc..0000000000000 --- a/Formula/pyenv-pip-migrate.rb +++ /dev/null @@ -1,19 +0,0 @@ -class PyenvPipMigrate < Formula - desc "Migrate pip packages from one Python version to another" - homepage "https://github.com/pyenv/pyenv-pip-migrate" - url "https://github.com/pyenv/pyenv-pip-migrate/archive/v20130527.tar.gz" - sha256 "1ec5a590a05792843d493a66825ede852b6afc6e95a6a2d2a813e73497c6637a" - head "https://github.com/pyenv/pyenv-pip-migrate.git" - - bottle :unneeded - - depends_on "pyenv" - - def install - prefix.install Dir["*"] - end - - test do - shell_output("eval \"$(pyenv init -)\" && pyenv help migrate") - end -end diff --git a/Formula/pyenv-virtualenv.rb b/Formula/pyenv-virtualenv.rb deleted file mode 100644 index 850c8b23ab1c2..0000000000000 --- a/Formula/pyenv-virtualenv.rb +++ /dev/null @@ -1,27 +0,0 @@ -class PyenvVirtualenv < Formula - desc "Pyenv plugin to manage virtualenv" - homepage "https://github.com/pyenv/pyenv-virtualenv" - url "https://github.com/pyenv/pyenv-virtualenv/archive/v1.1.3.tar.gz" - sha256 "247618b294b46e269bf1c1c3ed0f240d36ae9b454ce96856a57fd3f1053c90cd" - version_scheme 1 - head "https://github.com/pyenv/pyenv-virtualenv.git" - - bottle :unneeded - - depends_on "pyenv" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - def caveats; <<~EOS - To enable auto-activation add to your profile: - if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi - EOS - end - - test do - shell_output("eval \"$(pyenv init -)\" && pyenv virtualenvs") - end -end diff --git a/Formula/pyenv-virtualenvwrapper.rb b/Formula/pyenv-virtualenvwrapper.rb deleted file mode 100644 index d1b3d10b4c9b7..0000000000000 --- a/Formula/pyenv-virtualenvwrapper.rb +++ /dev/null @@ -1,20 +0,0 @@ -class PyenvVirtualenvwrapper < Formula - desc "Alternative to pyenv for managing virtualenvs" - homepage "https://github.com/pyenv/pyenv-virtualenvwrapper" - url "https://github.com/pyenv/pyenv-virtualenvwrapper/archive/v20140609.tar.gz" - sha256 "c1c812c4954394c58628952654ba745c4fb814d045adc076f7fb9e310bed03bf" - head "https://github.com/pyenv/pyenv-virtualenvwrapper.git" - - bottle :unneeded - - depends_on "pyenv" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - test do - shell_output("eval \"$(pyenv init -)\" && pyenv virtualenvwrapper") - end -end diff --git a/Formula/pyenv-which-ext.rb b/Formula/pyenv-which-ext.rb deleted file mode 100644 index c281bd78b5a02..0000000000000 --- a/Formula/pyenv-which-ext.rb +++ /dev/null @@ -1,20 +0,0 @@ -class PyenvWhichExt < Formula - desc "Integrate pyenv and system commands" - homepage "https://github.com/pyenv/pyenv-which-ext" - url "https://github.com/pyenv/pyenv-which-ext/archive/v0.0.2.tar.gz" - sha256 "4098e5a96b048192b0eab66ca5f588602e30ed16aac816e96ff514f6b5896257" - head "https://github.com/pyenv/pyenv-which-ext.git" - - bottle :unneeded - - depends_on "pyenv" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - test do - shell_output("eval \"$(pyenv init -)\" && pyenv which python") - end -end diff --git a/Formula/pyenv.rb b/Formula/pyenv.rb deleted file mode 100644 index d2205d89047d7..0000000000000 --- a/Formula/pyenv.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Pyenv < Formula - desc "Python version management" - homepage "https://github.com/pyenv/pyenv" - url "https://github.com/pyenv/pyenv/archive/v1.2.8.tar.gz" - sha256 "79c0ba0fa6fce3aa71e71d666d8082badbb52bc88dc3ed05b3c4b1ceeba54991" - revision 1 - version_scheme 1 - head "https://github.com/pyenv/pyenv.git" - - bottle do - cellar :any - rebuild 1 - sha256 "7b780d9fc25b882d27ea9c8fd1d26712bfef93151ce3da9482b17d3a606b653a" => :mojave - sha256 "0c5f7419a9d26729335a95c8f547b88ece5165909b529aa2240191ea91388f97" => :high_sierra - sha256 "433f3a6337dbb2e35d45aafba2589d58ee76c272e81e711691239529513d6077" => :sierra - end - - depends_on "autoconf" - depends_on "openssl" - depends_on "pkg-config" - depends_on "readline" - - def install - inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX - - system "src/configure" - system "make", "-C", "src" - - prefix.install Dir["*"] - %w[pyenv-install pyenv-uninstall python-build].each do |cmd| - bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}" - end - - # Do not manually install shell completions. See: - # - https://github.com/pyenv/pyenv/issues/1056#issuecomment-356818337 - # - https://github.com/Homebrew/homebrew-core/pull/22727 - end - - test do - shell_output("eval \"$(#{bin}/pyenv init -)\" && pyenv versions") - end -end diff --git a/Formula/pygitup.rb b/Formula/pygitup.rb deleted file mode 100644 index b1c575b35f91e..0000000000000 --- a/Formula/pygitup.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Pygitup < Formula - include Language::Python::Virtualenv - - desc "Nicer 'git pull'" - homepage "https://github.com/msiemens/PyGitUp" - url "https://files.pythonhosted.org/packages/46/45/32dc0bf07c620644a8ed899e381309f4f25b50f20a91e555285522592833/git-up-1.6.1.tar.gz" - sha256 "ea83441e7ab05011624e2e7333ef875c263124db5eed74507acd32b07c48473f" - - bottle do - cellar :any_skip_relocation - sha256 "a5234c02ac78373479e0158a18da087750f30da501ddae29899ec0e8e2b93a54" => :mojave - sha256 "be1a8770fa5fe2ad6b06ad090bf5ef490d6df59afb802703799fa4c99ef08955" => :high_sierra - sha256 "3ca5dc9d6443ec789e54686ee3d71662e69db2da877749bbb1e5ba7b562279ff" => :sierra - end - - depends_on "python" - - resource "click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "gitdb2" do - url "https://files.pythonhosted.org/packages/c4/5c/579abccd59187eaf6b3c8a4a6ecd86fce1dfd818155bfe4c52ac28dca6b7/gitdb2-2.0.5.tar.gz" - sha256 "83361131a1836661a155172932a13c08bda2db3674e4caa32368aa6eb02f38c2" - end - - resource "GitPython" do - url "https://files.pythonhosted.org/packages/4d/e8/98e06d3bc954e3c5b34e2a579ddf26255e762d21eb24fede458eff654c51/GitPython-2.1.11.tar.gz" - sha256 "8237dc5bfd6f1366abeee5624111b9d6879393d84745a507de0fda86043b65a8" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "smmap2" do - url "https://files.pythonhosted.org/packages/3b/ba/e49102b3e8ffff644edded25394b2d22ebe3e645f3f6a8139129c4842ffe/smmap2-2.0.5.tar.gz" - sha256 "29a9ffa0497e7f2be94ca0ed1ca1aa3cd4cf25a1f6b4f5f87f74b46ed91d609a" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - system "git", "clone", "https://github.com/Homebrew/install.git" - cd "install" do - assert_match "Fetching origin", shell_output("#{bin}/git-up") - end - end -end diff --git a/Formula/pygobject.rb b/Formula/pygobject.rb deleted file mode 100644 index fa5a569d0e426..0000000000000 --- a/Formula/pygobject.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Pygobject < Formula - desc "GLib/GObject/GIO Python bindings for Python 2" - homepage "https://wiki.gnome.org/Projects/PyGObject" - url "https://download.gnome.org/sources/pygobject/2.28/pygobject-2.28.7.tar.xz" - sha256 "bb9d25a3442ca7511385a7c01b057492095c263784ef31231ffe589d83a96a5a" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "22913c15bd330f9f1401299a0729330e103c5be2f5da0775d16a99a77ce4f434" => :mojave - sha256 "c442ae4c5065422f9c522c9e1000dd50f1e9bd565d496cba14a0edb0f378bb6c" => :high_sierra - sha256 "d483ec396469442c8efb3a0936db2ac3027c131a70c8117f5a1ef6a97a007b00" => :sierra - sha256 "a1302d922cfb12f36c25ebe6f35438ccb06fe8e7a155d4a9f326f71e8033b644" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "python@2" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-introspection" - system "make", "install" - (lib/"python2.7/site-packages/pygtk.pth").append_lines <<~EOS - #{HOMEBREW_PREFIX}/lib/python2.7/site-packages/gtk-2.0 - EOS - end - - test do - system Formula["python@2"].opt_bin/"python2.7", "-c", "import dsextras" - end -end diff --git a/Formula/pygobject3.rb b/Formula/pygobject3.rb deleted file mode 100644 index 692049b0155f3..0000000000000 --- a/Formula/pygobject3.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Pygobject3 < Formula - desc "GNOME Python bindings (based on GObject Introspection)" - homepage "https://wiki.gnome.org/Projects/PyGObject" - url "https://download.gnome.org/sources/pygobject/3.30/pygobject-3.30.4.tar.xz" - sha256 "2dc1a1a444b82955e65b81c2a2511ecf8032404beba4ef1d48144168f2f64c43" - - bottle do - sha256 "c4004732688326f968423751c18861a21297e36bd628bd19e0c410747d60f07a" => :mojave - sha256 "342769a9ab3cbb29bd30368cb4ef7024821f45032f185c952dfdc9b32ccb4b39" => :high_sierra - sha256 "34cb3f702e580475d18bb44652fdcfb02041a1a7153246e2b710df17576b93e4" => :sierra - end - - option "without-python", "Build without python3 support" - option "with-python@2", "Build with python2 support" - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python" => [:build, :recommended] - depends_on "gobject-introspection" - depends_on "py3cairo" if build.with? "python" - depends_on "python@2" => :optional - depends_on "py2cairo" if build.with? "python@2" - - def install - Language::Python.each_python(build) do |python, version| - mkdir "build#{version}" do - system "meson", "--prefix=#{prefix}", - "-Dpycairo=true", - "-Dpython=#{python}", - ".." - system "ninja", "-v" - system "ninja", "install" - end - end - end - - test do - Pathname("test.py").write <<~EOS - import gi - assert("__init__" in gi.__file__) - EOS - Language::Python.each_python(build) do |python, pyversion| - ENV.prepend_path "PYTHONPATH", lib/"python#{pyversion}/site-packages" - system python, "test.py" - end - end -end diff --git a/Formula/pygtk.rb b/Formula/pygtk.rb deleted file mode 100644 index 64865218bff1a..0000000000000 --- a/Formula/pygtk.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Pygtk < Formula - desc "GTK+ bindings for Python" - homepage "http://www.pygtk.org/" - url "https://download.gnome.org/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2" - sha256 "cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912" - revision 2 - - bottle do - cellar :any - sha256 "6aa04785bcbf9c1e79a268b27263ce61dbfa64cb21023c426b70ead3b6671689" => :mojave - sha256 "228a919cbba58afc99747e9b5dc6d01013ef8463de2ede5d81c20103afccbb9f" => :high_sierra - sha256 "fce76d2bf1e1748ac110aede98a622e5f8b737390a3a5e22f56872834b73c033" => :sierra - sha256 "fd1cef5484267e02971c4daa1eda42e3a66c77786923b0f76b496007282b10a1" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "atk" - depends_on "glib" - depends_on "gtk+" - depends_on "py2cairo" - depends_on "pygobject" - - def install - ENV.append "CFLAGS", "-ObjC" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - - # Fixing the pkgconfig file to find codegen, because it was moved from - # pygtk to pygobject. But our pkgfiles point into the cellar and in the - # pygtk-cellar there is no pygobject. - inreplace lib/"pkgconfig/pygtk-2.0.pc", "codegendir=${datadir}/pygobject/2.0/codegen", "codegendir=#{HOMEBREW_PREFIX}/share/pygobject/2.0/codegen" - inreplace bin/"pygtk-codegen-2.0", "exec_prefix=${prefix}", "exec_prefix=#{Formula["pygobject"].opt_prefix}" - end - - test do - (testpath/"codegen.def").write("(define-enum asdf)") - system "#{bin}/pygtk-codegen-2.0", "codegen.def" - end -end diff --git a/Formula/pygtkglext.rb b/Formula/pygtkglext.rb deleted file mode 100644 index effb6c6d993ca..0000000000000 --- a/Formula/pygtkglext.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Pygtkglext < Formula - desc "Python bindings to OpenGL GTK+ extension" - homepage "https://projects.gnome.org/gtkglext/download.html#pygtkglext" - url "https://download.gnome.org/sources/pygtkglext/1.1/pygtkglext-1.1.0.tar.gz" - sha256 "9712c04c60bf6ee7d05e0c6a6672040095c2ea803a1546af6dfde562dc0178a3" - revision 3 - - bottle do - cellar :any - sha256 "43b3818d1812269ac6897d843ac35da5a1358744681f93997fc47dd9b40b39b1" => :mojave - sha256 "6b23a741936e9c1642777211397fc59e5e41fa4f34d45c85aad8dd1810ac2aca" => :high_sierra - sha256 "9ca36d2fbeedb1f45c3151c93df3a827d66f7596f2a91b11de72e7edc830cf98" => :sierra - sha256 "2d16fc485d3e86ae0d879261984fd2a0cd7725964939a10487ae51e1876716d3" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gtkglext" - depends_on "pygobject" - depends_on "pygtk" - - def install - inreplace "gtk/gdkgl/gdkglext.override", "#include ", "#include " - - ENV["PYGTK_CODEGEN"] = "#{Formula["pygobject"].opt_bin}/pygobject-codegen-2.0" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV.append_path "PYTHONPATH", Formula["pygtk"].opt_lib/"python2.7/site-packages/gtk-2.0" - system "python2.7", "-c", "import pygtk", "pygtk.require('2.0')", "import gtk.gtkgl" - end -end diff --git a/Formula/pygtksourceview.rb b/Formula/pygtksourceview.rb deleted file mode 100644 index 05322c45854e2..0000000000000 --- a/Formula/pygtksourceview.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Pygtksourceview < Formula - desc "Python wrapper for the GtkSourceView widget library" - homepage "https://projects.gnome.org/gtksourceview/pygtksourceview.html" - url "https://download.gnome.org/sources/pygtksourceview/2.10/pygtksourceview-2.10.1.tar.bz2" - sha256 "b4b47c5aeb67a26141cb03663091dfdf5c15c8a8aae4d69c46a6a943ca4c5974" - revision 3 - - bottle do - cellar :any - sha256 "7d4a804d4870770f76675099c50749c9582f739393948b02a71ae72be223eb53" => :mojave - sha256 "403e577aada95260735e2c8d5764f780cc7f064e2a1916f279845be8cb0342f7" => :high_sierra - sha256 "3d85551378f74ecbab39ab028dde5e1542fc473a9a9baba3413fa53edfe6f2d5" => :sierra - sha256 "566425ceba6539e9a40d1024fd036de26ba9d0f81961d556a931208ebfc6abe5" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "gtksourceview" - depends_on "pygtk" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-docs" # attempts to download chunk.xsl on demand (and sometimes fails) - system "make", "install" - end - - test do - ENV.append_path "PYTHONPATH", lib+"python2.7/site-packages" - ENV.append_path "PYTHONPATH", Formula["pygtk"].opt_lib/"python2.7/site-packages/gtk-2.0" - system "python2.7", "-c", "import gtksourceview2" - end -end diff --git a/Formula/pyinvoke.rb b/Formula/pyinvoke.rb deleted file mode 100644 index d58a11bafdb62..0000000000000 --- a/Formula/pyinvoke.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Pyinvoke < Formula - include Language::Python::Virtualenv - - desc "Pythonic task management & command execution" - homepage "https://www.pyinvoke.org/" - url "https://github.com/pyinvoke/invoke/archive/1.2.0.tar.gz" - sha256 "266003d33a8b3a565268e33aa0f9767b9441cf1476a20258f929768ee5acd390" - revision 1 - head "https://github.com/pyinvoke/invoke.git" - - bottle do - cellar :any_skip_relocation - sha256 "381a13898c676f211ae0866eda70d51d4b500fa470e198c9cb32a57483f71b71" => :mojave - sha256 "6f242a9c102fbd1e02c86e7c5e26eb4053b5ef50c9d0530393158662998538e6" => :high_sierra - sha256 "e581b8aade463fae2f82209a2ef250cbaa5c346c6826b13770141b3551457d34" => :sierra - end - - depends_on "python" - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"tasks.py").write <<~EOS - from invoke import run, task - - @task - def clean(ctx, extra=''): - patterns = ['foo'] - if extra: - patterns.append(extra) - for pattern in patterns: - run("rm -rf {}".format(pattern)) - EOS - (testpath/"foo"/"bar").mkpath - (testpath/"baz").mkpath - system bin/"invoke", "clean" - refute_predicate testpath/"foo", :exist?, "\"pyinvoke clean\" should have deleted \"foo\"" - assert_predicate testpath/"baz", :exist?, "pyinvoke should have left \"baz\"" - system bin/"invoke", "clean", "--extra=baz" - refute_predicate testpath/"foo", :exist?, "\"pyinvoke clean-extra\" should have still deleted \"foo\"" - refute_predicate testpath/"baz", :exist?, "pyinvoke clean-extra should have deleted \"baz\"" - end -end diff --git a/Formula/pypy.rb b/Formula/pypy.rb deleted file mode 100644 index 3ab71a99796a7..0000000000000 --- a/Formula/pypy.rb +++ /dev/null @@ -1,159 +0,0 @@ -class Pypy < Formula - desc "Highly performant implementation of Python 2 in Python" - homepage "https://pypy.org/" - url "https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-src.tar.bz2" - sha256 "6097ec5ee23d0d34d8cd27a1072bed041c8a080ad48731190a03a2223029212d" - head "https://bitbucket.org/pypy/pypy", :using => :hg - - bottle do - cellar :any - rebuild 2 - sha256 "9900f0310051127ad2935df61c22256f837b256cfa2475f114082fbb37a0f2d9" => :mojave - sha256 "f0e0ad67095ff19e37c1ea445c6b778928ea188a45c0bcea30a8a364e7b21b47" => :high_sierra - sha256 "102a0e56f25c1d7ee2e91ccf91e3fd157e53d94126d8a534a67f0b70fef18c5f" => :sierra - end - - depends_on "pkg-config" => :build - depends_on :arch => :x86_64 - depends_on "gdbm" - # pypy does not find system libffi, and its location cannot be given - # as a build option - depends_on "libffi" if DevelopmentTools.clang_build_version >= 1000 - depends_on "openssl" - depends_on "sqlite" - - # https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/187391 - fails_with :gcc_4_2 - - resource "bootstrap" do - url "https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-osx64.tar.bz2" - version "6.0.0" - sha256 "d7dc443e6bb9a45212e8d8f5a63e9f6ce23f1d88c50709efea1c75b76c8bc186" - end - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip" - sha256 "f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz" - sha256 "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68" - end - - def install - # Having PYTHONPATH set can cause the build to fail if another - # Python is present, e.g. a Homebrew-provided Python 2.x - # See https://github.com/Homebrew/homebrew/issues/24364 - ENV["PYTHONPATH"] = "" - ENV["PYPY_USESSION_DIR"] = buildpath - - resource("bootstrap").stage buildpath/"bootstrap" - python = buildpath/"bootstrap/bin/pypy" - - cd "pypy/goal" do - system python, buildpath/"rpython/bin/rpython", - "-Ojit", "--shared", "--cc", ENV.cc, "--verbose", - "--make-jobs", ENV.make_jobs, "targetpypystandalone.py" - end - - libexec.mkpath - cd "pypy/tool/release" do - package_args = %w[--archive-name pypy --targetdir .] - system python, "package.py", *package_args - system "tar", "-C", libexec.to_s, "--strip-components", "1", "-xf", "pypy.tar.bz2" - end - - (libexec/"lib").install libexec/"bin/libpypy-c.dylib" - MachO::Tools.change_install_name("#{libexec}/bin/pypy", - "@rpath/libpypy-c.dylib", - "#{libexec}/lib/libpypy-c.dylib") - - # The PyPy binary install instructions suggest installing somewhere - # (like /opt) and symlinking in binaries as needed. Specifically, - # we want to avoid putting PyPy's Python.h somewhere that configure - # scripts will find it. - bin.install_symlink libexec/"bin/pypy" - lib.install_symlink libexec/"lib/libpypy-c.dylib" - end - - def post_install - # Post-install, fix up the site-packages and install-scripts folders - # so that user-installed Python software survives minor updates, such - # as going from 1.7.0 to 1.7.1. - - # Create a site-packages in the prefix. - prefix_site_packages.mkpath - - # Symlink the prefix site-packages into the cellar. - unless (libexec/"site-packages").symlink? - # fix the case where libexec/site-packages/site-packages was installed - rm_rf libexec/"site-packages/site-packages" - mv Dir[libexec/"site-packages/*"], prefix_site_packages - rm_rf libexec/"site-packages" - end - libexec.install_symlink prefix_site_packages - - # Tell distutils-based installers where to put scripts - scripts_folder.mkpath - (distutils+"distutils.cfg").atomic_write <<~EOS - [install] - install-scripts=#{scripts_folder} - EOS - - %w[setuptools pip].each do |pkg| - resource(pkg).stage do - system bin/"pypy", "-s", "setup.py", "--no-user-cfg", "install", - "--force", "--verbose" - end - end - - # Symlinks to easy_install_pypy and pip_pypy - bin.install_symlink scripts_folder/"easy_install" => "easy_install_pypy" - bin.install_symlink scripts_folder/"pip" => "pip_pypy" - - # post_install happens after linking - %w[easy_install_pypy pip_pypy].each { |e| (HOMEBREW_PREFIX/"bin").install_symlink bin/e } - end - - def caveats; <<~EOS - A "distutils.cfg" has been written to: - #{distutils} - specifying the install-scripts folder as: - #{scripts_folder} - - If you install Python packages via "pypy setup.py install", easy_install_pypy, - or pip_pypy, any provided scripts will go into the install-scripts folder - above, so you may want to add it to your PATH *after* #{HOMEBREW_PREFIX}/bin - so you don't overwrite tools from CPython. - - Setuptools and pip have been installed, so you can use easy_install_pypy and - pip_pypy. - To update setuptools and pip between pypy releases, run: - pip_pypy install --upgrade pip setuptools - - See: https://docs.brew.sh/Homebrew-and-Python - EOS - end - - # The HOMEBREW_PREFIX location of site-packages - def prefix_site_packages - HOMEBREW_PREFIX+"lib/pypy/site-packages" - end - - # Where setuptools will install executable scripts - def scripts_folder - HOMEBREW_PREFIX+"share/pypy" - end - - # The Cellar location of distutils - def distutils - libexec+"lib-python/2.7/distutils" - end - - test do - system bin/"pypy", "-c", "print('Hello, world!')" - system bin/"pypy", "-c", "import time; time.clock()" - system scripts_folder/"pip", "list" - end -end diff --git a/Formula/pypy3.rb b/Formula/pypy3.rb deleted file mode 100644 index a68d9099916ac..0000000000000 --- a/Formula/pypy3.rb +++ /dev/null @@ -1,197 +0,0 @@ -class Pypy3 < Formula - desc "Implementation of Python 3 in Python" - homepage "https://pypy.org/" - url "https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-src.tar.bz2" - sha256 "ed8005202b46d6fc6831df1d13a4613bc40084bfa42f275068edadf8954034a3" - - bottle do - cellar :any - rebuild 1 - sha256 "a2da5d37954296140125b0d8b817c546375eeb074fe834bf3d1d933a74b369e0" => :mojave - sha256 "25f4b9222205b8d951cf54c771e70b0959daefb55bbe84f0c0529251d1f0a3b0" => :high_sierra - sha256 "2cb646b4b7bfb7b9c9f7381a376143d18e97eb570b2150bd7147b4cb06a5eacd" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "pypy" => :build - depends_on :arch => :x86_64 - depends_on "gdbm" - # pypy does not find system libffi, and its location cannot be given - # as a build option - depends_on "libffi" if DevelopmentTools.clang_build_version >= 1000 - depends_on "openssl" - depends_on "sqlite" - depends_on "xz" - - # https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/187391 - fails_with :gcc_4_2 - - # packaging depends on pyparsing - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz" - sha256 "0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04" - end - - # packaging and setuptools depend on six - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - # setuptools depends on packaging - resource "packaging" do - url "https://files.pythonhosted.org/packages/77/32/439f47be99809c12ef2da8b60a2c47987786d2c6c9205549dd6ef95df8bd/packaging-17.1.tar.gz" - sha256 "f019b770dd64e585a99714f1fd5e01c7a8f11b45635aa953fd41c689a657375b" - end - - # setuptools depends on appdirs - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - end - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/72/c2/c09362ab29338413ab687b47dab03bab4a792e2bbb727a1eb5e0a88e3b86/setuptools-39.0.1.zip" - sha256 "bec7badf0f60e7fc8153fac47836edc41b74e5d541d7692e614e635720d6a7c7" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz" - sha256 "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68" - end - - def install - # Work around "dyld: Symbol not found: _utimensat" - if MacOS.version == :sierra && MacOS::Xcode.installed? && MacOS::Xcode.version >= "9.0" - ENV.delete("SDKROOT") - end - - # This has been completely rewritten upstream in master so check with - # the next release whether this can be removed or not. - inreplace "pypy/tool/build_cffi_imports.py" do |s| - s.gsub! "http://", "https://" - s.gsub! "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.6.2.tar.gz", - "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.6.2.tar.gz" - s.gsub! "https://tukaani.org/xz/xz-5.2.3.tar.gz", - "https://netix.dl.sourceforge.net/project/lzmautils/xz-5.2.3.tar.gz" - s.gsub! "os.path.join(tempfile.gettempdir(), 'pypy-archives')", - "os.path.join('#{buildpath}', 'pypy-archives')" - end - - # Having PYTHONPATH set can cause the build to fail if another - # Python is present, e.g. a Homebrew-provided Python 2.x - # See https://github.com/Homebrew/homebrew/issues/24364 - ENV["PYTHONPATH"] = "" - ENV["PYPY_USESSION_DIR"] = buildpath - - python = Formula["pypy"].opt_bin/"pypy" - cd "pypy/goal" do - system python, buildpath/"rpython/bin/rpython", - "-Ojit", "--shared", "--cc", ENV.cc, "--verbose", - "--make-jobs", ENV.make_jobs, "targetpypystandalone.py" - end - - libexec.mkpath - cd "pypy/tool/release" do - system python, "package.py", "--archive-name", "pypy3", "--targetdir", "." - system "tar", "-C", libexec.to_s, "--strip-components", "1", "-xf", "pypy3.tar.bz2" - end - - (libexec/"lib").install libexec/"bin/libpypy3-c.dylib" => "libpypy3-c.dylib" - - MachO::Tools.change_install_name("#{libexec}/bin/pypy3", - "@rpath/libpypy3-c.dylib", - "#{libexec}/lib/libpypy3-c.dylib") - MachO::Tools.change_dylib_id("#{libexec}/lib/libpypy3-c.dylib", - "#{opt_libexec}/lib/libpypy3-c.dylib") - - (libexec/"lib-python").install "lib-python/3" - libexec.install %w[include lib_pypy] - - # The PyPy binary install instructions suggest installing somewhere - # (like /opt) and symlinking in binaries as needed. Specifically, - # we want to avoid putting PyPy's Python.h somewhere that configure - # scripts will find it. - bin.install_symlink libexec/"bin/pypy3" - bin.install_symlink libexec/"bin/pypy" => "pypy3.5" - lib.install_symlink libexec/"lib/libpypy3-c.dylib" - end - - def post_install - # Precompile cffi extensions in lib_pypy - # list from create_cffi_import_libraries in pypy/tool/release/package.py - %w[_sqlite3 _curses syslog gdbm _tkinter].each do |module_name| - quiet_system bin/"pypy3", "-c", "import #{module_name}" - end - - # Post-install, fix up the site-packages and install-scripts folders - # so that user-installed Python software survives minor updates, such - # as going from 1.7.0 to 1.7.1. - - # Create a site-packages in the prefix. - prefix_site_packages.mkpath - - # Symlink the prefix site-packages into the cellar. - libexec.install_symlink prefix_site_packages - - # Tell distutils-based installers where to put scripts - scripts_folder.mkpath - (distutils+"distutils.cfg").atomic_write <<~EOS - [install] - install-scripts=#{scripts_folder} - EOS - - %w[appdirs pyparsing six packaging setuptools pip].each do |pkg| - resource(pkg).stage do - system bin/"pypy3", "-s", "setup.py", "install", "--force", "--verbose" - end - end - - # Symlinks to easy_install_pypy3 and pip_pypy3 - bin.install_symlink scripts_folder/"easy_install" => "easy_install_pypy3" - bin.install_symlink scripts_folder/"pip" => "pip_pypy3" - - # post_install happens after linking - %w[easy_install_pypy3 pip_pypy3].each { |e| (HOMEBREW_PREFIX/"bin").install_symlink bin/e } - end - - def caveats; <<~EOS - A "distutils.cfg" has been written to: - #{distutils} - specifying the install-scripts folder as: - #{scripts_folder} - - If you install Python packages via "pypy3 setup.py install", easy_install_pypy3, - or pip_pypy3, any provided scripts will go into the install-scripts folder - above, so you may want to add it to your PATH *after* #{HOMEBREW_PREFIX}/bin - so you don't overwrite tools from CPython. - - Setuptools and pip have been installed, so you can use easy_install_pypy3 and - pip_pypy3. - To update pip and setuptools between pypy3 releases, run: - pip_pypy3 install --upgrade pip setuptools - - See: https://docs.brew.sh/Homebrew-and-Python - EOS - end - - # The HOMEBREW_PREFIX location of site-packages - def prefix_site_packages - HOMEBREW_PREFIX+"lib/pypy3/site-packages" - end - - # Where setuptools will install executable scripts - def scripts_folder - HOMEBREW_PREFIX+"share/pypy3" - end - - # The Cellar location of distutils - def distutils - libexec+"lib-python/3/distutils" - end - - test do - system bin/"pypy3", "-c", "print('Hello, world!')" - system scripts_folder/"pip", "list" - end -end diff --git a/Formula/pyqt.rb b/Formula/pyqt.rb deleted file mode 100644 index be7ce90538181..0000000000000 --- a/Formula/pyqt.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Pyqt < Formula - desc "Python bindings for v5 of Qt" - homepage "https://www.riverbankcomputing.com/software/pyqt/download5" - url "https://dl.bintray.com/homebrew/mirror/pyqt-5.10.1.tar.gz" - mirror "https://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-5.10.1/PyQt5_gpl-5.10.1.tar.gz" - sha256 "9932e971e825ece4ea08f84ad95017837fa8f3f29c6b0496985fa1093661e9ef" - revision 1 - - bottle do - cellar :any - rebuild 2 - sha256 "c941b19b803f11da31ec2cd93550a7b70b1ef919868890abf37b8d6d8e9dc089" => :mojave - sha256 "cdbf71cc3b3c6b372787dc402f3c5ce48e17167d69349af7f8fd7fbd08b5286b" => :high_sierra - sha256 "7f300676f7d52223129dc4e5080db09aa639ab5b92ca27a3424655ca438a0bf4" => :sierra - end - - depends_on "python" - depends_on "python@2" - depends_on "qt" - depends_on "sip" - - # Patch from openSUSE for compatibility with Qt 5.11.0 - # https://build.opensuse.org/package/show/home:cgiboudeaux:branches:KDE:Qt5/python-qt5 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/4f563668/pyqt/qt-5.11.diff" - sha256 "34bba97f87615ea072312bfc03c4d3fb0a1cf7a4cd9d6907857c1dca6cc89200" - end - - def install - ["python2", "python3"].each do |python| - version = Language::Python.major_minor_version python - args = ["--confirm-license", - "--bindir=#{bin}", - "--destdir=#{lib}/python#{version}/site-packages", - "--stubsdir=#{lib}/python#{version}/site-packages/PyQt5", - "--sipdir=#{share}/sip/Qt5", - # sip.h could not be found automatically - "--sip-incdir=#{Formula["sip"].opt_include}", - "--qmake=#{Formula["qt"].bin}/qmake", - # Force deployment target to avoid libc++ issues - "QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", - "--qml-plugindir=#{pkgshare}/plugins", - "--verbose"] - - system python, "configure.py", *args - system "make" - system "make", "install" - system "make", "clean" - end - end - - test do - system "#{bin}/pyuic5", "--version" - system "#{bin}/pylupdate5", "-version" - - ["python2", "python3"].each do |python| - system python, "-c", "import PyQt5" - %w[ - Gui - Location - Multimedia - Network - Quick - Svg - WebEngineWidgets - Widgets - Xml - ].each { |mod| system python, "-c", "import PyQt5.Qt#{mod}" } - end - end -end diff --git a/Formula/pyside.rb b/Formula/pyside.rb deleted file mode 100644 index 1c8e6d9a20657..0000000000000 --- a/Formula/pyside.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Pyside < Formula - desc "Official Python bindings for Qt" - homepage "https://wiki.qt.io/Qt_for_Python" - url "https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.11.2-src/pyside-setup-everywhere-src-5.11.2.tar.xz" - sha256 "18f572f1f832e476083d30fccabab167450f2a8cbe5cd9c6e6e4fa078ccb86c2" - - bottle do - sha256 "4d0afc4ec29bb5038b9200401533617c726dfcdf9734ce6d0d7946ccf6448ade" => :mojave - sha256 "282a171f80a2f6eadd354e868077759a702595396e5f2e0bfdd638509c4d5e6b" => :high_sierra - sha256 "1a9e043fb1993fb2673f4aeb947fac0d87fe862e922a387f268249d2bdcaf7d1" => :sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "llvm" - depends_on "python" - depends_on "python@2" - depends_on "qt" - - def install - args = %W[ - --ignore-git - --no-examples - --macos-use-libc++ - --jobs=#{ENV.make_jobs} - --install-scripts #{bin} - ] - - xy = Language::Python.major_minor_version "python3" - - system "python3", *Language::Python.setup_install_args(prefix), - "--install-lib", lib/"python#{xy}/site-packages", *args - - system "python2", *Language::Python.setup_install_args(prefix), - "--install-lib", lib/"python2.7/site-packages", *args - - pkgshare.install "examples/samplebinding", "examples/utils" - end - - test do - ["python2", "python3"].each do |python| - system python, "-c", "import PySide2" - %w[ - Core - Gui - Location - Multimedia - Network - Quick - Svg - WebEngineWidgets - Widgets - Xml - ].each { |mod| system python, "-c", "import PySide2.Qt#{mod}" } - end - ["python@2", "python"].each do |python| - if python == "python" - ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin" - end - system "cmake", "-H#{pkgshare}/samplebinding", - "-B.", - "-G", - "Unix Makefiles", - "-DCMAKE_BUILD_TYPE=Release" - system "make" - end - end -end diff --git a/Formula/python-markdown.rb b/Formula/python-markdown.rb deleted file mode 100644 index 593b945f0ffa1..0000000000000 --- a/Formula/python-markdown.rb +++ /dev/null @@ -1,29 +0,0 @@ -class PythonMarkdown < Formula - desc "Python implementation of Markdown" - homepage "https://pypi.python.org/pypi/Markdown" - url "https://files.pythonhosted.org/packages/b3/73/fc5c850f44af5889192dff783b7b0d8f3fe8d30b65c8e3f78f8f0265fecf/Markdown-2.6.11.tar.gz" - sha256 "a856869c7ff079ad84a3e19cd87a64998350c2b94e9e08e44270faef33400f81" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "923867169d4ade0ee1db1ad297587fc5f8f2067c5cb1610ea96d2f50d9fe0025" => :mojave - sha256 "06ed36407b1575cfd06f0252bdf1d6985ed338491c9737803827a1a6cd3e5998" => :high_sierra - sha256 "06ed36407b1575cfd06f0252bdf1d6985ed338491c9737803827a1a6cd3e5998" => :sierra - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - (testpath/"test.md").write("# Hello World!") - assert_equal "

Hello World!

", shell_output(bin/"markdown_py test.md").strip - end -end diff --git a/Formula/python-yq.rb b/Formula/python-yq.rb deleted file mode 100644 index 7f4718935297f..0000000000000 --- a/Formula/python-yq.rb +++ /dev/null @@ -1,64 +0,0 @@ -class PythonYq < Formula - desc "Command-line YAML and XML processor that wraps jq" - homepage "https://yq.readthedocs.io/" - url "https://files.pythonhosted.org/packages/56/5f/d60ffaba376257b60304a8ee9fafdc0be4852a4bcdeece48d931e6b36487/yq-2.6.0.tar.gz" - sha256 "c64f763e8409ed55eb055793c26fc347b5a6666b303d49e9d2f8d7cea979df73" - - bottle do - cellar :any_skip_relocation - sha256 "ca6ade4e6bdf9cc0897ea3c58bd5460fbf010b2bfed250aff40d9543ea04cac2" => :mojave - sha256 "7365858d49340df37abf5fb5236ebef2516effacfdb748f89890121250786f38" => :high_sierra - sha256 "7365858d49340df37abf5fb5236ebef2516effacfdb748f89890121250786f38" => :sierra - sha256 "7365858d49340df37abf5fb5236ebef2516effacfdb748f89890121250786f38" => :el_capitan - end - - depends_on "jq" - depends_on "python" - - conflicts_with "yq", :because => "both install `yq` executables" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/57/17/a6acddc5f5993ea6eaf792b2e6c3be55e3e11f3b85206c818572585f61e1/xmltodict-0.11.0.tar.gz" - sha256 "8f8d7d40aa28d83f4109a7e8aa86e67a4df202d9538be40c0cb1d70da527b0df" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV["PYTHONPATH"] = libexec/"lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - env = { - :PATH => "#{Formula["jq"].opt_bin}:$PATH", - :PYTHONPATH => ENV["PYTHONPATH"], - } - bin.env_script_all_files(libexec/"bin", env) - end - - test do - input = <<~EOS - foo: - bar: 1 - baz: {bat: 3} - EOS - expected = <<~EOS - 3 - ... - EOS - assert_equal expected, pipe_output("#{bin}/yq -y .foo.baz.bat", input, 0) - end -end diff --git a/Formula/python.rb b/Formula/python.rb deleted file mode 100644 index 8d50e5816399c..0000000000000 --- a/Formula/python.rb +++ /dev/null @@ -1,327 +0,0 @@ -class Python < Formula - desc "Interpreted, interactive, object-oriented programming language" - homepage "https://www.python.org/" - url "https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz" - sha256 "f09d83c773b9cc72421abba2c317e4e6e05d919f9bcf34468e192b6a6c8e328d" - head "https://github.com/python/cpython.git" - - bottle do - sha256 "ea3a8b291cfcf494788dc5bd7cde446d2de49ed2d252ba721a25dea0dc177ebb" => :mojave - sha256 "00d1d9e326cff16943a226956a851c47069631ea6a352aac0735e2959e0379dd" => :high_sierra - sha256 "35c7dd45474e864137514e54526ce5530e506bdcbd376a03b4a5d8cfdaa11d5a" => :sierra - end - - # setuptools remembers the build flags python is built with and uses them to - # build packages later. Xcode-only systems need different flags. - pour_bottle? do - reason <<~EOS - The bottle needs the Apple Command Line Tools to be installed. - You can install them, if desired, with: - xcode-select --install - EOS - satisfy { MacOS::CLT.installed? } - end - - depends_on "pkg-config" => :build - depends_on "gdbm" - depends_on "openssl" - depends_on "readline" - depends_on "sqlite" - depends_on "xz" - - skip_clean "bin/pip3", "bin/pip-3.4", "bin/pip-3.5", "bin/pip-3.6", "bin/pip-3.7" - skip_clean "bin/easy_install3", "bin/easy_install-3.4", "bin/easy_install-3.5", "bin/easy_install-3.6", "bin/easy_install-3.7" - - fails_with :clang do - build 425 - cause "https://bugs.python.org/issue24844" - end - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/37/1b/b25507861991beeade31473868463dad0e58b1978c209de27384ae541b0b/setuptools-40.6.3.zip" - sha256 "3b474dad69c49f0d2d86696b68105f3a6f195f7ab655af12ef9a9c326d2b08f8" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/45/ae/8a0ad77defb7cc903f09e551d88b443304a9bd6e6f124e75c0fbbf6de8f7/pip-18.1.tar.gz" - sha256 "c0a292bd977ef590379a3f05d7b7f65135487b67470f6281289a94e015650ea1" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/d8/55/221a530d66bf78e72996453d1e2dedef526063546e131d70bed548d80588/wheel-0.32.3.tar.gz" - sha256 "029703bf514e16c8271c3821806a1c171220cc5bdd325cbf4e7da1e056a01db6" - end - - def install - # Unset these so that installing pip and setuptools puts them where we want - # and not into some other Python the user has installed. - ENV["PYTHONHOME"] = nil - ENV["PYTHONPATH"] = nil - - xy = (buildpath/"configure.ac").read.slice(/PYTHON_VERSION, (3\.\d)/, 1) - lib_cellar = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}" - - args = %W[ - --prefix=#{prefix} - --enable-ipv6 - --datarootdir=#{share} - --datadir=#{share} - --enable-framework=#{frameworks} - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-dtrace - --with-openssl=#{Formula["openssl"].opt_prefix} - ] - - args << "--without-gcc" if ENV.compiler == :clang - - cflags = [] - ldflags = [] - cppflags = [] - - if MacOS.sdk_path_if_needed - # Help Python's build system (setuptools/pip) to build things on SDK-based systems - # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) - cflags << "-isysroot #{MacOS.sdk_path}" << "-I#{MacOS.sdk_path}/usr/include" - ldflags << "-isysroot #{MacOS.sdk_path}" - # For the Xlib.h, Python needs this header dir with the system Tk - # Yep, this needs the absolute path where zlib needed a path relative - # to the SDK. - cflags << "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" - end - # Avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html - args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - - # We want our readline! This is just to outsmart the detection code, - # superenv makes cc always find includes/libs! - inreplace "setup.py", - "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')", - "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'" - - inreplace "setup.py" do |s| - s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True" - s.gsub! "for d_ in inc_dirs + sqlite_inc_paths:", - "for d_ in ['#{Formula["sqlite"].opt_include}']:" - end - - # Allow python modules to use ctypes.find_library to find homebrew's stuff - # even if homebrew is not a /usr/local/lib. Try this with: - # `brew install enchant && pip install pyenchant` - inreplace "./Lib/ctypes/macholib/dyld.py" do |f| - f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib'," - f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," - end - - args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? - args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? - args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? - - system "./configure", *args - system "make" - - ENV.deparallelize do - # Tell Python not to install into /Applications (default for framework builds) - system "make", "install", "PYTHONAPPSDIR=#{prefix}" - system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" - end - - # Any .app get a " 3" attached, so it does not conflict with python 2.x. - Dir.glob("#{prefix}/*.app") { |app| mv app, app.sub(/\.app$/, " 3.app") } - - # Prevent third-party packages from building against fragile Cellar paths - inreplace Dir[lib_cellar/"**/_sysconfigdata_m_darwin_darwin.py", - lib_cellar/"config*/Makefile", - frameworks/"Python.framework/Versions/3*/lib/pkgconfig/python-3.?.pc"], - prefix, opt_prefix - - # Help third-party packages find the Python framework - inreplace Dir[lib_cellar/"config*/Makefile"], - /^LINKFORSHARED=(.*)PYTHONFRAMEWORKDIR(.*)/, - "LINKFORSHARED=\\1PYTHONFRAMEWORKINSTALLDIR\\2" - - # Fix for https://github.com/Homebrew/homebrew-core/issues/21212 - inreplace Dir[lib_cellar/"**/_sysconfigdata_m_darwin_darwin.py"], - %r{('LINKFORSHARED': .*?)'(Python.framework/Versions/3.\d+/Python)'}m, - "\\1'#{opt_prefix}/Frameworks/\\2'" - - # A fix, because python and python3 both want to install Python.framework - # and therefore we can't link both into HOMEBREW_PREFIX/Frameworks - # https://github.com/Homebrew/homebrew/issues/15943 - ["Headers", "Python", "Resources"].each { |f| rm(prefix/"Frameworks/Python.framework/#{f}") } - rm prefix/"Frameworks/Python.framework/Versions/Current" - - # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. - (lib/"pkgconfig").install_symlink Dir["#{frameworks}/Python.framework/Versions/#{xy}/lib/pkgconfig/*"] - - # Remove the site-packages that Python created in its Cellar. - (prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/site-packages").rmtree - - %w[setuptools pip wheel].each do |r| - (libexec/r).install resource(r) - end - - # Install unversioned symlinks in libexec/bin. - { - "idle" => "idle3", - "pydoc" => "pydoc3", - "python" => "python3", - "python-config" => "python3-config", - }.each do |unversioned_name, versioned_name| - (libexec/"bin").install_symlink (bin/versioned_name).realpath => unversioned_name - end - end - - def post_install - ENV.delete "PYTHONPATH" - - xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s - site_packages = HOMEBREW_PREFIX/"lib/python#{xy}/site-packages" - site_packages_cellar = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/site-packages" - - # Fix up the site-packages so that user-installed Python software survives - # minor updates, such as going from 3.3.2 to 3.3.3: - - # Create a site-packages in HOMEBREW_PREFIX/lib/python#{xy}/site-packages - site_packages.mkpath - - # Symlink the prefix site-packages into the cellar. - site_packages_cellar.unlink if site_packages_cellar.exist? - site_packages_cellar.parent.install_symlink site_packages - - # Write our sitecustomize.py - rm_rf Dir["#{site_packages}/sitecustomize.py[co]"] - (site_packages/"sitecustomize.py").atomic_write(sitecustomize) - - # Remove old setuptools installations that may still fly around and be - # listed in the easy_install.pth. This can break setuptools build with - # zipimport.ZipImportError: bad local file header - # setuptools-0.9.8-py3.3.egg - rm_rf Dir["#{site_packages}/setuptools*"] - rm_rf Dir["#{site_packages}/distribute*"] - rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"] - - %w[setuptools pip wheel].each do |pkg| - (libexec/pkg).cd do - system bin/"python3", "-s", "setup.py", "--no-user-cfg", "install", - "--force", "--verbose", "--install-scripts=#{bin}", - "--install-lib=#{site_packages}", - "--single-version-externally-managed", - "--record=installed.txt" - end - end - - rm_rf [bin/"pip", bin/"easy_install"] - mv bin/"wheel", bin/"wheel3" - - # Install unversioned symlinks in libexec/bin. - { - "easy_install" => "easy_install-#{xy}", - "pip" => "pip3", - "wheel" => "wheel3", - }.each do |unversioned_name, versioned_name| - (libexec/"bin").install_symlink (bin/versioned_name).realpath => unversioned_name - end - - # post_install happens after link - %W[pip3 pip#{xy} easy_install-#{xy} wheel3].each do |e| - (HOMEBREW_PREFIX/"bin").install_symlink bin/e - end - - # Help distutils find brewed stuff when building extensions - include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include, - Formula["sqlite"].opt_include] - library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib, - Formula["sqlite"].opt_lib] - - cfg = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/distutils/distutils.cfg" - - cfg.atomic_write <<~EOS - [install] - prefix=#{HOMEBREW_PREFIX} - - [build_ext] - include_dirs=#{include_dirs.join ":"} - library_dirs=#{library_dirs.join ":"} - EOS - end - - def sitecustomize - xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s - - <<~EOS - # This file is created by Homebrew and is executed on each python startup. - # Don't print from here, or else python command line scripts may fail! - # - import re - import os - import sys - - if sys.version_info[0] != 3: - # This can only happen if the user has set the PYTHONPATH for 3.x and run Python 2.x or vice versa. - # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, - # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are - # built only for a specific version of Python and will fail with cryptic error messages. - # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. - exit('Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python ' + - str(sys.version_info[0]) + '.x!\\n PYTHONPATH is currently: "' + str(os.environ['PYTHONPATH']) + '"\\n' + - ' You should `unset PYTHONPATH` to fix this.') - - # Only do this for a brewed python: - if os.path.realpath(sys.executable).startswith('#{rack}'): - # Shuffle /Library site-packages to the end of sys.path - library_site = '/Library/Python/#{xy}/site-packages' - library_packages = [p for p in sys.path if p.startswith(library_site)] - sys.path = [p for p in sys.path if not p.startswith(library_site)] - # .pth files have already been processed so don't use addsitedir - sys.path.extend(library_packages) - - # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX - # site_packages; prefer the shorter paths - long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/#{xy}/lib/python#{xy}/site-packages') - sys.path = [long_prefix.sub('#{HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"}', p) for p in sys.path] - - # Set the sys.executable to use the opt_prefix, unless explicitly set - # with PYTHONEXECUTABLE: - if 'PYTHONEXECUTABLE' not in os.environ: - sys.executable = '#{opt_bin}/python#{xy}' - EOS - end - - def caveats - if prefix.exist? - xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s - else - xy = version.to_s.slice(/(3\.\d)/) || "3.7" - end - <<~EOS - Python has been installed as - #{HOMEBREW_PREFIX}/bin/python3 - - Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to - `python3`, `python3-config`, `pip3` etc., respectively, have been installed into - #{opt_libexec}/bin - - If you need Homebrew's Python 2.7 run - brew install python@2 - - You can install Python packages with - pip3 install - They will install into the site-package directory - #{HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"} - - See: https://docs.brew.sh/Homebrew-and-Python - EOS - end - - test do - xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s - # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions - # and it can occur that building sqlite silently fails if OSX's sqlite is used. - system "#{bin}/python#{xy}", "-c", "import sqlite3" - # Check if some other modules import. Then the linked libs are working. - system "#{bin}/python#{xy}", "-c", "import tkinter; root = tkinter.Tk()" - system "#{bin}/python#{xy}", "-c", "import _gdbm" - system "#{bin}/python#{xy}", "-c", "import zlib" - system bin/"pip3", "list", "--format=columns" - end -end diff --git a/Formula/python@2.rb b/Formula/python@2.rb deleted file mode 100644 index f30850e1eee19..0000000000000 --- a/Formula/python@2.rb +++ /dev/null @@ -1,318 +0,0 @@ -class PythonAT2 < Formula - desc "Interpreted, interactive, object-oriented programming language" - homepage "https://www.python.org/" - url "https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz" - sha256 "22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574" - revision 1 - head "https://github.com/python/cpython.git", :branch => "2.7" - - bottle do - rebuild 8 - sha256 "8ef28a14c27cfc43b554ba7c9d89269a6db4362da637aea14b9de2e8cdcf5ffd" => :mojave - sha256 "35a654d96ac4bf0a890b54e2a40643d93279ef753eec95dec5ad295cb3e0284f" => :high_sierra - sha256 "82a48b730979c7b30e0850e45467ea2016e2678da259c6503ae493994d70f889" => :sierra - end - - # setuptools remembers the build flags python is built with and uses them to - # build packages later. Xcode-only systems need different flags. - pour_bottle? do - reason <<~EOS - The bottle needs the Apple Command Line Tools to be installed. - You can install them, if desired, with: - xcode-select --install - EOS - satisfy { MacOS::CLT.installed? } - end - - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build if MacOS.version > :snow_leopard - depends_on "gdbm" - depends_on "openssl" - depends_on "readline" - depends_on "sqlite" - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/37/1b/b25507861991beeade31473868463dad0e58b1978c209de27384ae541b0b/setuptools-40.6.3.zip" - sha256 "3b474dad69c49f0d2d86696b68105f3a6f195f7ab655af12ef9a9c326d2b08f8" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/45/ae/8a0ad77defb7cc903f09e551d88b443304a9bd6e6f124e75c0fbbf6de8f7/pip-18.1.tar.gz" - sha256 "c0a292bd977ef590379a3f05d7b7f65135487b67470f6281289a94e015650ea1" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/d8/55/221a530d66bf78e72996453d1e2dedef526063546e131d70bed548d80588/wheel-0.32.3.tar.gz" - sha256 "029703bf514e16c8271c3821806a1c171220cc5bdd325cbf4e7da1e056a01db6" - end - - def lib_cellar - prefix/"Frameworks/Python.framework/Versions/2.7/lib/python2.7" - end - - def site_packages_cellar - lib_cellar/"site-packages" - end - - # The HOMEBREW_PREFIX location of site-packages. - def site_packages - HOMEBREW_PREFIX/"lib/python2.7/site-packages" - end - - def install - # Unset these so that installing pip and setuptools puts them where we want - # and not into some other Python the user has installed. - ENV["PYTHONHOME"] = nil - ENV["PYTHONPATH"] = nil - - args = %W[ - --prefix=#{prefix} - --enable-ipv6 - --datarootdir=#{share} - --datadir=#{share} - --enable-framework=#{frameworks} - --without-ensurepip - ] - - # See upstream bug report from 22 Jan 2018 "Significant performance problems - # with Python 2.7 built with clang 3.x or 4.x" - # https://bugs.python.org/issue32616 - # https://github.com/Homebrew/homebrew-core/issues/22743 - if DevelopmentTools.clang_build_version >= 802 && - DevelopmentTools.clang_build_version < 902 - args << "--without-computed-gotos" - end - - args << "--without-gcc" if ENV.compiler == :clang - - cflags = [] - ldflags = [] - cppflags = [] - - if MacOS.sdk_path_if_needed - # Help Python's build system (setuptools/pip) to build things on SDK-based systems - # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) - cflags << "-isysroot #{MacOS.sdk_path}" << "-I#{MacOS.sdk_path}/usr/include" - ldflags << "-isysroot #{MacOS.sdk_path}" - # For the Xlib.h, Python needs this header dir with the system Tk - # Yep, this needs the absolute path where zlib needed a path relative - # to the SDK. - cflags << "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" - end - - # Avoid linking to libgcc https://code.activestate.com/lists/python-dev/112195/ - args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - - # We want our readline and openssl! This is just to outsmart the detection code, - # superenv handles that cc finds includes/libs! - inreplace "setup.py" do |s| - s.gsub! "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')", - "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'" - s.gsub! "/usr/local/ssl", Formula["openssl"].opt_prefix - end - - inreplace "setup.py" do |s| - s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True" - s.gsub! "for d_ in inc_dirs + sqlite_inc_paths:", - "for d_ in ['#{Formula["sqlite"].opt_include}']:" - - # Allow sqlite3 module to load extensions: - # https://docs.python.org/library/sqlite3.html#f1 - s.gsub! 'sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))', "" - end - - # Allow python modules to use ctypes.find_library to find homebrew's stuff - # even if homebrew is not a /usr/local/lib. Try this with: - # `brew install enchant && pip install pyenchant` - inreplace "./Lib/ctypes/macholib/dyld.py" do |f| - f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib'," - f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," - end - - args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? - args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? - args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? - - system "./configure", *args - system "make" - - ENV.deparallelize do - # Tell Python not to install into /Applications - system "make", "install", "PYTHONAPPSDIR=#{prefix}" - system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" - end - - # Fixes setting Python build flags for certain software - # See: https://github.com/Homebrew/homebrew/pull/20182 - # https://bugs.python.org/issue3588 - inreplace lib_cellar/"config/Makefile" do |s| - s.change_make_var! "LINKFORSHARED", - "-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)" - end - - # Prevent third-party packages from building against fragile Cellar paths - inreplace [lib_cellar/"_sysconfigdata.py", - lib_cellar/"config/Makefile", - frameworks/"Python.framework/Versions/Current/lib/pkgconfig/python-2.7.pc"], - prefix, opt_prefix - - # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. - (lib/"pkgconfig").install_symlink Dir[frameworks/"Python.framework/Versions/Current/lib/pkgconfig/*"] - - # Remove 2to3 because Python 3 also installs it - rm bin/"2to3" - - # Remove the site-packages that Python created in its Cellar. - site_packages_cellar.rmtree - - (libexec/"setuptools").install resource("setuptools") - (libexec/"pip").install resource("pip") - (libexec/"wheel").install resource("wheel") - - if MacOS.version > :snow_leopard - cd "Doc" do - system "make", "html" - doc.install Dir["build/html/*"] - end - end - end - - def post_install - # Avoid conflicts with lingering unversioned files from Python 3 - rm_f %W[ - #{HOMEBREW_PREFIX}/bin/easy_install - #{HOMEBREW_PREFIX}/bin/pip - #{HOMEBREW_PREFIX}/bin/wheel - ] - - # Fix up the site-packages so that user-installed Python software survives - # minor updates, such as going from 2.7.0 to 2.7.1: - - # Create a site-packages in HOMEBREW_PREFIX/lib/python2.7/site-packages - site_packages.mkpath - - # Symlink the prefix site-packages into the cellar. - site_packages_cellar.unlink if site_packages_cellar.exist? - site_packages_cellar.parent.install_symlink site_packages - - # Write our sitecustomize.py - rm_rf Dir["#{site_packages}/sitecustomize.py[co]"] - (site_packages/"sitecustomize.py").atomic_write(sitecustomize) - - # Remove old setuptools installations that may still fly around and be - # listed in the easy_install.pth. This can break setuptools build with - # zipimport.ZipImportError: bad local file header - # setuptools-0.9.5-py3.3.egg - rm_rf Dir["#{site_packages}/setuptools*"] - rm_rf Dir["#{site_packages}/distribute*"] - rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"] - - setup_args = ["-s", "setup.py", "--no-user-cfg", "install", "--force", - "--verbose", - "--single-version-externally-managed", - "--record=installed.txt", - "--install-scripts=#{bin}", - "--install-lib=#{site_packages}"] - - (libexec/"setuptools").cd { system "#{bin}/python", *setup_args } - (libexec/"pip").cd { system "#{bin}/python", *setup_args } - (libexec/"wheel").cd { system "#{bin}/python", *setup_args } - - # When building from source, these symlinks will not exist, since - # post_install happens after linking. - %w[pip pip2 pip2.7 easy_install easy_install-2.7 wheel].each do |e| - (HOMEBREW_PREFIX/"bin").install_symlink bin/e - end - - # Help distutils find brewed stuff when building extensions - include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include, - Formula["sqlite"].opt_include] - library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib, - Formula["sqlite"].opt_lib] - - cfg = lib_cellar/"distutils/distutils.cfg" - cfg.atomic_write <<~EOS - [install] - prefix=#{HOMEBREW_PREFIX} - - [build_ext] - include_dirs=#{include_dirs.join ":"} - library_dirs=#{library_dirs.join ":"} - EOS - end - - def sitecustomize - <<~EOS - # This file is created by Homebrew and is executed on each python startup. - # Don't print from here, or else python command line scripts may fail! - # - import re - import os - import sys - - if sys.version_info[0] != 2: - # This can only happen if the user has set the PYTHONPATH for 3.x and run Python 2.x or vice versa. - # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, - # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are - # built only for a specific version of Python and will fail with cryptic error messages. - # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. - exit('Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python ' + - str(sys.version_info[0]) + '.x!\\n PYTHONPATH is currently: "' + str(os.environ['PYTHONPATH']) + '"\\n' + - ' You should `unset PYTHONPATH` to fix this.') - - # Only do this for a brewed python: - if os.path.realpath(sys.executable).startswith('#{rack}'): - # Shuffle /Library site-packages to the end of sys.path and reject - # paths in /System pre-emptively (#14712) - library_site = '/Library/Python/2.7/site-packages' - library_packages = [p for p in sys.path if p.startswith(library_site)] - sys.path = [p for p in sys.path if not p.startswith(library_site) and - not p.startswith('/System')] - # .pth files have already been processed so don't use addsitedir - sys.path.extend(library_packages) - - # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX - # site_packages; prefer the shorter paths - long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/2\.7/lib/python2\.7/site-packages') - sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] - - # LINKFORSHARED (and python-config --ldflags) return the - # full path to the lib (yes, "Python" is actually the lib, not a - # dir) so that third-party software does not need to add the - # -F/#{HOMEBREW_PREFIX}/Frameworks switch. - try: - from _sysconfigdata import build_time_vars - build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/2.7/Python' - except: - pass # remember: don't print here. Better to fail silently. - - # Set the sys.executable to use the opt_prefix - sys.executable = '#{opt_bin}/python2.7' - EOS - end - - def caveats; <<~EOS - Pip and setuptools have been installed. To update them - pip install --upgrade pip setuptools - - You can install Python packages with - pip install - - They will install into the site-package directory - #{site_packages} - - See: https://docs.brew.sh/Homebrew-and-Python - EOS - end - - test do - # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions - # and it can occur that building sqlite silently fails if OSX's sqlite is used. - system "#{bin}/python", "-c", "import sqlite3" - # Check if some other modules import. Then the linked libs are working. - system "#{bin}/python", "-c", "import Tkinter; root = Tkinter.Tk()" - system "#{bin}/python", "-c", "import gdbm" - system "#{bin}/python", "-c", "import zlib" - system bin/"pip", "list", "--format=columns" - end -end diff --git a/Formula/pytouhou.rb b/Formula/pytouhou.rb deleted file mode 100644 index 90bd26de07eae..0000000000000 --- a/Formula/pytouhou.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Pytouhou < Formula - desc "Libre implementation of Touhou 6 engine" - homepage "https://pytouhou.linkmauve.fr/" - url "https://hg.linkmauve.fr/touhou", :revision => "5270c34b4c00", :using => :hg - version "634" - revision 5 - head "https://hg.linkmauve.fr/touhou", :using => :hg - - bottle do - cellar :any - sha256 "f2bf5020d5fbf9e83847d416e8909bb583cbea9ce406453d2471dbbb6945b202" => :mojave - sha256 "f5e3c88bea9e1a533f0a96b401df4c2df90195d684ab8ecc2fc9471b9a09a4cd" => :high_sierra - sha256 "48d508217894d69689ba1d9c1ee65fab622f0895a7358e928dba38516c004de0" => :sierra - sha256 "edb451dc773f69a0550c687b90326d9baecb5d2bd1898b32cc550662b90c6eeb" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gtk+3" - depends_on "libepoxy" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - depends_on "sdl2_ttf" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/b3/ae/971d3b936a7ad10e65cb7672356cff156000c5132cf406cb0f4d7a980fd3/Cython-0.28.3.tar.gz" - sha256 "1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526" - end - - def install - pyver = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{pyver}/site-packages" - resource("Cython").stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - # hg can't determine revision number (no .hg on the stage) - inreplace "setup.py", /(version)=.+,$/, "\\1='#{version}'," - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{pyver}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - # Set default game path to pkgshare - inreplace "#{libexec}/bin/pytouhou", /('path'): '\.'/, "\\1: '#{pkgshare}/game'" - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - def caveats; <<~EOS - The default path for the game data is: - #{pkgshare}/game - EOS - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - system "#{bin}/pytouhou", "--help" - end -end diff --git a/Formula/pyvim.rb b/Formula/pyvim.rb deleted file mode 100644 index 5d4a5e46be138..0000000000000 --- a/Formula/pyvim.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Pyvim < Formula - desc "Pure Python Vim clone" - homepage "https://github.com/jonathanslenders/pyvim" - url "https://files.pythonhosted.org/packages/96/3f/2fc173e4fec288adc9cd1dd52de15ca2a9947a941ee98d0ea3c678f89cd9/pyvim-2.0.22.tar.gz" - sha256 "7534753a891d85fda859214e04e585371c61c1402157738be3904081a585369b" - - bottle do - cellar :any_skip_relocation - sha256 "f9770b97a7bed89fac287b7f07e8edf841d8917053d9e73abf2b54ab3f256676" => :mojave - sha256 "dbbf3ac781e4717fcb8e7e607c6a7c2076b28a50324035b022ee119ed926cb43" => :high_sierra - sha256 "dbbf3ac781e4717fcb8e7e607c6a7c2076b28a50324035b022ee119ed926cb43" => :sierra - sha256 "dbbf3ac781e4717fcb8e7e607c6a7c2076b28a50324035b022ee119ed926cb43" => :el_capitan - end - - depends_on "python@2" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/3e/36/d24222c4a44cb7b8d902db407e1918d8553c765b1384d78c7ea7a85b144c/prompt_toolkit-2.0.3.tar.gz" - sha256 "d9ea14304a2633e4b40dde874c63da6b94a075f61e837011e035ffcd5bb39a1d" - end - - resource "pyflakes" do - url "https://files.pythonhosted.org/packages/92/9e/386c0d9deef14996eb90d9deebbcb9d3ceb70296840b09615cb61b2ae231/pyflakes-2.0.0.tar.gz" - sha256 "9a7662ec724d0120012f6e29d6248ae3727d821bba522a0e6b356eff19126a49" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - resources.each do |r| - r.stage do - system "python", *Language::Python.setup_install_args(libexec) - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - # Need a pty due to https://github.com/jonathanslenders/pyvim/issues/101 - require "pty" - PTY.spawn(bin/"pyvim", "--help") do |r, _w, _pid| - assert_match "Vim clone", r.read - end - end -end diff --git a/Formula/q.rb b/Formula/q.rb deleted file mode 100644 index 7f7bc031d5edf..0000000000000 --- a/Formula/q.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Q < Formula - desc "Treat text as a database" - homepage "https://github.com/harelba/q" - url "https://github.com/harelba/q/archive/1.7.4.tar.gz" - sha256 "97a21907e4599bfdc8937ee4cb4d7e899c45ae09ae8d3c96235efa469e4f2ac3" - head "https://github.com/harelba/q.git" - - bottle :unneeded - - def install - bin.install "bin/q" - end - - test do - seq = (1..100).map(&:to_s).join("\n") - output = pipe_output("#{bin}/q 'select sum(c1) from -'", seq) - assert_equal "5050\n", output - end -end diff --git a/Formula/q/q.rb b/Formula/q/q.rb new file mode 100644 index 0000000000000..923b039a9d63a --- /dev/null +++ b/Formula/q/q.rb @@ -0,0 +1,33 @@ +class Q < Formula + desc "Tiny command-line DNS client with support for UDP, TCP, DoT, DoH, DoQ and ODoH" + homepage "https://github.com/natesales/q" + url "https://github.com/natesales/q/archive/refs/tags/v0.19.9.tar.gz" + sha256 "18a68f067daccce97f2a7e4ce4c72e206eba03a1c57040f8c7488f100040d2fc" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d601d03915b15c3729f1b1ce5d1f1e5a2d59cb25953cae53d1d2e8354899115" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d601d03915b15c3729f1b1ce5d1f1e5a2d59cb25953cae53d1d2e8354899115" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d601d03915b15c3729f1b1ce5d1f1e5a2d59cb25953cae53d1d2e8354899115" + sha256 cellar: :any_skip_relocation, sonoma: "e4dcaa7ed1d6a1bf6d852a5b98feb09d613452685f2e35c6536e23b1aab881b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "30281c1a7141b9e26ee5c9ca5695c167341d6ee46809e8373dcea5a4f9788fd9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d99cb88155b05dfea7798eacf2aba53dbb764aa2ca87f3fe249fab5e163482be" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/q --version") + assert_match "ns: ns1.dnsimple.com.", shell_output("#{bin}/q brew.sh NS --format yaml") + end +end diff --git a/Formula/q/qalculate-gtk.rb b/Formula/q/qalculate-gtk.rb new file mode 100644 index 0000000000000..a2c8147bcb4c5 --- /dev/null +++ b/Formula/q/qalculate-gtk.rb @@ -0,0 +1,51 @@ +class QalculateGtk < Formula + desc "Multi-purpose desktop calculator" + homepage "https://qalculate.github.io/" + url "https://github.com/Qalculate/qalculate-gtk/releases/download/v5.8.1/qalculate-gtk-5.8.1.tar.gz" + sha256 "6e4ae008f10a46a6bd91adc68dacca33fabaee10cbd96481a367fee588d5f4f6" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "ceab122f3b2c52ad84da986bd7aa44997903157a1029d56e277000ff312fc5a4" + sha256 arm64_sequoia: "355cc323f0b5669c68715d81d11945d20c7ff78b63fb0216c8bf91c7090fbcf2" + sha256 arm64_sonoma: "33282ef361956244942d9e5673f623677a19e85949d7b84d6843e868160a1153" + sha256 sonoma: "ac44faff648d663334a3043868b23113ad13dd5bf79964a1ce273086e0c2b5af" + sha256 arm64_linux: "f6776d96b9a4ff7ae7e8594cac309d79b3288aac77d50e3a525d8f21e7120579" + sha256 x86_64_linux: "1ede38321cc3e396957a070c0a196a6dd47db91d357ece361f71aba33af6b87b" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "libqalculate" + depends_on "pango" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" unless OS.mac? + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"qalculate-gtk", "-v" + end +end diff --git a/Formula/q/qalculate-qt.rb b/Formula/q/qalculate-qt.rb new file mode 100644 index 0000000000000..b76f9efe7155f --- /dev/null +++ b/Formula/q/qalculate-qt.rb @@ -0,0 +1,45 @@ +class QalculateQt < Formula + desc "Multi-purpose desktop calculator" + homepage "https://qalculate.github.io/" + url "https://github.com/Qalculate/qalculate-qt/releases/download/v5.8.1/qalculate-qt-5.8.1.tar.gz" + sha256 "3cfc08bdf46bb88db004d73be4f462825d5fb90345e645cd302bfe8f0feccdb4" + license "GPL-2.0-or-later" + head "https://github.com/Qalculate/qalculate-qt.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3b413d6e599538f17e505f94ddca4c1157cee4d458ff0d34765596c8c21f9f1d" + sha256 cellar: :any, arm64_sequoia: "bcc297917adeac48d196191ab44972c53cb7ff16788690c271fb547c9acc2e5e" + sha256 cellar: :any, arm64_sonoma: "8f0360ec33ad0fd4fe6652f43d2bcbc5c41d49cc0ffadcaaa7ecd1242620069a" + sha256 cellar: :any, sonoma: "26acd9503accf85cef5ef892f11a4ea4a87e18605893b3ffb10d6d99a1cba81d" + sha256 cellar: :any_skip_relocation, arm64_linux: "34cb304e2d4823e6ad8da6965bade6c9d31270cdfab848e25a662f70674760bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bb677b45036b96616c61105287eb15dff494ff46b39125b9506b393a7a5d10d" + end + + depends_on "pkgconf" => :build + depends_on "qttools" => :build + + depends_on "libqalculate" + depends_on "qtbase" + + on_macos do + depends_on "gmp" + depends_on "mpfr" + end + + def install + system Formula["qtbase"].bin/"qmake", "qalculate-qt.pro" + system "make" + if OS.mac? + prefix.install "qalculate-qt.app" + bin.install_symlink prefix/"qalculate-qt.app/Contents/MacOS/qalculate-qt" => "qalculate-qt" + else + bin.install "qalculate-qt" + end + end + + test do + # Set QT_QPA_PLATFORM to minimal to avoid error "qt.qpa.xcb: could not connect to display" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_match version.to_s, shell_output("#{bin}/qalculate-qt -v") + end +end diff --git a/Formula/q/qbe.rb b/Formula/q/qbe.rb new file mode 100644 index 0000000000000..62886ac4c90e7 --- /dev/null +++ b/Formula/q/qbe.rb @@ -0,0 +1,50 @@ +class Qbe < Formula + desc "Compiler Backend" + homepage "https://c9x.me/compile/" + url "https://c9x.me/compile/release/qbe-1.2.tar.xz" + sha256 "a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d" + license "MIT" + + livecheck do + url "https://c9x.me/compile/releases.html" + regex(/href=.*?qbe[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c91a5215a04c30570ccba0a0c958e748e4ffe2ea953a08721ab712c82ed022cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3ca1c4e4642a2846dc825fa86ea27b7b4118829ce5e7c72bdf56d668c7a29ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a90df32c350542929724a253efe4d9f5039fb3cf27364e7b08a2f6aff816d50" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8cee652f4a0941d2ffda250f8b8da61502de995ac1f84ad64aec8127b24e091e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5eff52847b1d8b30c6c56d65986801508cef2bb613c0f2c202c518c276b97cbb" + sha256 cellar: :any_skip_relocation, sonoma: "08b4c0f09bc6459c9439b017e60848b4cef7ae2f9c69fe9b54576b64a9c66742" + sha256 cellar: :any_skip_relocation, ventura: "5a74085a4f075f38f4945d760ab274c4a5e4fc059ef27f0fdecef82b8f29eafc" + sha256 cellar: :any_skip_relocation, monterey: "ffb1426fef8e72648b3fcc550d2dd72454cb40d82f553b75c42f16e4d91f4a23" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcf0274fdecef1821c3fcaed007074429d8517168f31747c1eaed904a3bb13dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56401769cc3485e1d15f4a245404068c2b2d7996e86e470904a76b77f9eae01f" + end + + def install + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"main.ssa").write <<~EOS + function w $add(w %a, w %b) { # Define a function add + @start + %c =w add %a, %b # Adds the 2 arguments + ret %c # Return the result + } + export function w $main() { # Main function + @start + %r =w call $add(w 1, w 1) # Call add(1, 1) + call $printf(l $fmt, ..., w %r) # Show the result + ret 0 + } + data $fmt = { b "One and one make %d!\n", b 0 } + EOS + + system bin/"qbe", "-o", "out.s", "main.ssa" + assert_path_exists testpath/"out.s" + end +end diff --git a/Formula/q/qbec.rb b/Formula/q/qbec.rb new file mode 100644 index 0000000000000..d58f74ba0e752 --- /dev/null +++ b/Formula/q/qbec.rb @@ -0,0 +1,40 @@ +class Qbec < Formula + desc "Configure Kubernetes objects on multiple clusters using jsonnet" + homepage "https://qbec.io" + url "https://github.com/splunk/qbec/archive/refs/tags/v0.27.0.tar.gz" + sha256 "2789a49d0e3d421fed2db40d9cea0411dc76d759a7e80eec1e77fce201e089d4" + license "Apache-2.0" + head "https://github.com/splunk/qbec.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68c05bf8e3b78547e57e4c06c5c2dcfdf29a86e3ba1ba58ac5b0593c6ddb7718" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f9f156de37414e1c7d4e993c7c88f24de794e58d95dfde4de9b2b892e2d74d6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8e1e3bf7294e8787969a00d7b5f7f4d685fc20b02e43046cb1417757ae89600" + sha256 cellar: :any_skip_relocation, sonoma: "ab57db399ddfb465dcbb99dec51dd3555c9556e27d5b2c9c9992a4afdc83475e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0c99147cb8bbe99c3ecb288feeba5ea36be2f161bbab1dc3c4f6ac1582abc37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eda8e0931ba248694966aff7ec3a0477e8551c80d7211f828b5acf93dc772e82" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/splunk/qbec/internal/commands.version=#{version} + -X github.com/splunk/qbec/internal/commands.commit=#{tap.user} + -X github.com/splunk/qbec/internal/commands.goVersion=#{Formula["go"].version} + ] + system "go", "build", *std_go_args(ldflags:) + + # only support bash at the moment + generate_completions_from_executable(bin/"qbec", "completion", shells: [:bash]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/qbec version") + + system bin/"qbec", "init", "test" + assert_path_exists testpath/"test/environments/base.libsonnet" + assert_match "apiVersion: qbec.io/v1alpha1", (testpath/"test/qbec.yaml").read + end +end diff --git a/Formula/q/qbittorrent-cli.rb b/Formula/q/qbittorrent-cli.rb new file mode 100644 index 0000000000000..5b0410df668b5 --- /dev/null +++ b/Formula/q/qbittorrent-cli.rb @@ -0,0 +1,41 @@ +class QbittorrentCli < Formula + desc "Command-line interface for qBittorrent written in Go" + homepage "https://github.com/ludviglundgren/qbittorrent-cli" + url "https://github.com/ludviglundgren/qbittorrent-cli/archive/refs/tags/v2.2.0.tar.gz" + sha256 "66b082b4b1653aae785b0f12bc00d7ac4dd8f17028d99e3feafac8aded931957" + license "MIT" + head "https://github.com/ludviglundgren/qbittorrent-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8dbb1e0f3009ea428e38774124b3fd34a710fcff9a1f35cdffe613978ca55089" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e89063ee1ee9e114a32ce09eff29422cfb5b50f8a3ed324139e60828ab10123b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e89063ee1ee9e114a32ce09eff29422cfb5b50f8a3ed324139e60828ab10123b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e89063ee1ee9e114a32ce09eff29422cfb5b50f8a3ed324139e60828ab10123b" + sha256 cellar: :any_skip_relocation, sonoma: "78d01479e9ca94aa71093187fba7d532eca1057bd9b020bdf0440cb502c1ad0e" + sha256 cellar: :any_skip_relocation, ventura: "78d01479e9ca94aa71093187fba7d532eca1057bd9b020bdf0440cb502c1ad0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "48f2a2cb1e4cab81c481d4240fc488381faa6ea03e6b1665b4b87e677be4e88e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0949049acfbe454c435d710c62a96ca0651d32108511aefbc1d9f07e6daebc68" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:, output: bin/"qbt"), "./cmd/qbt" + + generate_completions_from_executable(bin/"qbt", "completion") + end + + test do + port = free_port + (testpath/"config.qbt.toml").write <<~TOML + [qbittorrent] + addr = "http://127.0.0.1:#{port}" + TOML + + output = shell_output("#{bin}/qbt app version --config #{testpath}/config.qbt.toml 2>&1", 1) + assert_match "could not get app version", output + + assert_match version.to_s, shell_output("#{bin}/qbt version") + end +end diff --git a/Formula/q/qbs.rb b/Formula/q/qbs.rb new file mode 100644 index 0000000000000..e940078fc1df0 --- /dev/null +++ b/Formula/q/qbs.rb @@ -0,0 +1,60 @@ +class Qbs < Formula + desc "Build tool for developing projects across multiple platforms" + homepage "https://wiki.qt.io/Qbs" + url "https://download.qt.io/official_releases/qbs/3.1.1/qbs-src-3.1.1.tar.gz" + sha256 "95e8de11cd66710975d4225d35ee01fd43691e4b65609399de367cb8a1df3af9" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only"] }, + { any_of: ["LGPL-3.0-only", "LGPL-2.1-only" => { with: "Qt-LGPL-exception-1.1" }] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + ] + head "https://code.qt.io/qbs/qbs.git", branch: "master" + + livecheck do + url "https://download.qt.io/official_releases/qbs/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "db039c21061aab9b2a21c2a7fb7521650536e8a9e4fea80641bb566d4a6a86b3" + sha256 cellar: :any, arm64_sequoia: "6c82107e93d73b2a72cd125968806484ac831ad77c5600886a8e2854a3ce9783" + sha256 cellar: :any, arm64_sonoma: "cdb657dd6003bd6730e8584b3d6d611d759f8b06d3012d9e9c35cfcef59cc02e" + sha256 cellar: :any, sonoma: "91b852713a5a31e674c3657dd3ef06e274c937f18a4feae1aaa9dca9991feabd" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc1031a9aa3769989ecf2648f0050f66957093d04e21a71b1c5c1dc38d6717be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac7ac0414e853295957695db4ffbd90816513cbda3099aadb6708e2aad1310f3" + end + + depends_on "cmake" => :build + depends_on "qt5compat" + depends_on "qtbase" + + def install + args = %w[ + -DQBS_ENABLE_RPATH=NO + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + int main() { + return 0; + } + C + + (testpath/"test.qbs").write <<~QBS + import qbs + + CppApplication { + name: "test" + files: ["test.c"] + consoleApplication: true + } + QBS + + system bin/"qbs", "run", "-f", "test.qbs" + end +end diff --git a/Formula/q/qca.rb b/Formula/q/qca.rb new file mode 100644 index 0000000000000..3153c0f8f45d6 --- /dev/null +++ b/Formula/q/qca.rb @@ -0,0 +1,86 @@ +class Qca < Formula + desc "Qt Cryptographic Architecture (QCA)" + homepage "https://userbase.kde.org/QCA" + url "https://download.kde.org/stable/qca/2.3.10/qca-2.3.10.tar.xz" + sha256 "1c5b722da93d559365719226bb121c726ec3c0dc4c67dea34f1e50e4e0d14a02" + license "LGPL-2.1-or-later" + revision 2 + head "https://invent.kde.org/libraries/qca.git", branch: "master" + + livecheck do + url "https://download.kde.org/stable/qca/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "81e3b152a9660b27637c135b59fb13e07a9f7ca944419cc162adcc52a919db4b" + sha256 cellar: :any, arm64_sequoia: "a1ee6516de34fc765d7ca60cf598f8f716f5bad4634a8fd1b195948e128fec12" + sha256 cellar: :any, arm64_sonoma: "25e20fb1574789ed7b20656e4efadee81ba6ebe6e39b3d168eeb47bc60bfd32c" + sha256 cellar: :any, sonoma: "6a3c15800f653ccd8451603eccc71abdedc94b975ffb03351a2a16efd2c8299a" + sha256 cellar: :any_skip_relocation, arm64_linux: "23bcf97868e6ef038fce215771abad083bd92d95683685fd0657ee34e861fb9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39d29761f9f41df9c2687bab36309d5f1eb866da3b2f1b2561e06be725f51f2b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "botan" + depends_on "ca-certificates" + depends_on "gnupg" + depends_on "libgcrypt" + depends_on "nss" + depends_on "openssl@3" + depends_on "pkcs11-helper" + depends_on "qt5compat" + depends_on "qtbase" + + uses_from_macos "cyrus-sasl" + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1400 + depends_on "nspr" + end + + fails_with :clang do + build 1400 + cause "Requires C++20" + end + + def install + if OS.mac? && DevelopmentTools.clang_build_version <= 1400 + ENV.llvm_clang + ENV.append "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/c++ -L#{Formula["llvm"].opt_lib}/unwind -lunwind" + end + + ENV["QC_CERTSTORE_PATH"] = Formula["ca-certificates"].pkgetc/"cert.pem" + + # FIXME: QCA_PLUGINS_INSTALL_DIR should match qt's directory "{share}/qt/plugins"; + # however, building with that directory results in segmentation faults inside + # PluginInstance destructor at `delete _instance`. + args = %W[ + -DBUILD_TESTS=OFF + -DBUILD_WITH_QT6=ON + -DQCA_PLUGINS_INSTALL_DIR=#{lib}/qt/plugins + ] + + # Disable some plugins. qca-ossl, qca-cyrus-sasl, qca-logger, + # qca-softstore are always built. + %w[botan gcrypt gnupg nss pkcs11].each do |plugin| + args << "-DWITH_#{plugin}_PLUGIN=ON" + end + + # ensure opt_lib for framework install name and linking (can't be done via CMake configure) + inreplace "src/CMakeLists.txt", + /^(\s+)(INSTALL_NAME_DIR )("\$\{QCA_LIBRARY_INSTALL_DIR\}")$/, + "\\1\\2\"#{opt_lib}\"" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"qcatool-qt6", "--noprompt", "--newpass=", + "key", "make", "rsa", "2048", "test.key" + end +end diff --git a/Formula/q/qcachegrind.rb b/Formula/q/qcachegrind.rb new file mode 100644 index 0000000000000..207ef0ca3c67f --- /dev/null +++ b/Formula/q/qcachegrind.rb @@ -0,0 +1,46 @@ +class Qcachegrind < Formula + desc "Visualize data generated by Cachegrind and Calltree" + homepage "https://apps.kde.org/kcachegrind/" + url "https://download.kde.org/stable/release-service/25.08.2/src/kcachegrind-25.08.2.tar.xz" + sha256 "8d50c071a23db62acecdf22d6e94396aa03e4d5ff97acc7d2be84863b34fbfc8" + license "GPL-2.0-or-later" + head "https://invent.kde.org/sdk/kcachegrind.git", branch: "master" + + # We don't match versions like 19.07.80 or 19.07.90 where the patch number + # is 80+ (beta) or 90+ (RC), as these aren't stable releases. + livecheck do + url "https://download.kde.org/stable/release-service/" + regex(%r{href=.*?v?(\d+\.\d+\.(?:(?![89]\d)\d+)(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "2b75a14bf0a31e5b78aac0b6ea3a844ed6616183e75a05c6132e9d7856190c92" + sha256 cellar: :any, arm64_sequoia: "39d1839e8c09d71be121a016242caca0d5bf4e2beae51deff8df319a32183f3f" + sha256 cellar: :any, arm64_sonoma: "f93c5d2f1aa6298d9946b49b7e0f711631605ce26b94757957ea477e54cfc456" + sha256 cellar: :any, sonoma: "8c474db773a55ffc8231a626380603b634db50556a0f1a91da1a58ddf4704899" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b01a2cb5830ba9b2cf763da9e09eec04dc875bb32a3186337a8e7fbed6412a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d86cf913e1e58d2f6a3f74cf0ea02e3bf423a3f3aa5231b34f27e9c4b2bb8f1f" + end + + depends_on "graphviz" + depends_on "qtbase" + + def install + args = %w[-config release] + if OS.mac? + spec = (ENV.compiler == :clang) ? "macx-clang" : "macx-g++" + args += %W[-spec #{spec}] + end + + qt = Formula["qtbase"] + system qt.opt_bin/"qmake", *args + system "make" + + if OS.mac? + prefix.install "qcachegrind/qcachegrind.app" + bin.install_symlink prefix/"qcachegrind.app/Contents/MacOS/qcachegrind" + else + bin.install "qcachegrind/qcachegrind" + end + end +end diff --git a/Formula/q/qcli.rb b/Formula/q/qcli.rb new file mode 100644 index 0000000000000..e41e564186ecb --- /dev/null +++ b/Formula/q/qcli.rb @@ -0,0 +1,50 @@ +class Qcli < Formula + desc "Report audiovisual metrics via libavfilter" + homepage "https://bavc.org/preserve-media/preservation-tools" + url "https://github.com/bavc/qctools.git", + tag: "v1.4", + revision: "982619270ff49987328343909ea2179d1af52004" + license "GPL-3.0-or-later" + head "https://github.com/bavc/qctools.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "cf444e12eb4d646d9b80a325aec6df56361d9dd39ce2e80d90906f0916117dde" + sha256 cellar: :any, arm64_sonoma: "fb63a2f6ab9e1bb330fc899b52228665b941e42a9201958f9d0594df19a384ad" + sha256 cellar: :any, sonoma: "dbac2e76a60e184f4fec01ff89c988bc5e6c6908ca3f675569749a6ba77d4ae5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d480d344f4e4241e95030eef80d7d38440d9079f68d3c35f6707b8dd4a29372" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb6419243bf6240de5d24047020a8ef6eebef3f43c8adc5c00fbecbf19f3bf2c" + end + + depends_on "pkgconf" => :build + depends_on "qtmultimedia" => :build + depends_on "qwt" => :build + depends_on "ffmpeg@6" # Issue ref: https://github.com/bavc/qctools/issues/552 + depends_on "qtbase" + + uses_from_macos "zlib" + + def install + ENV["USE_BREW"] = "true" + + cd "Project/QtCreator/qctools-lib" do + system "qmake", "qctools-lib.pro" + system "make" + end + cd "Project/QtCreator/qctools-cli" do + system "qmake", "qctools-cli.pro" + system "make" + bin.install "qcli" + end + end + + test do + # Create an example mp4 file + mp4out = testpath/"video.mp4" + system Formula["ffmpeg@6"].bin/"ffmpeg", "-filter_complex", "testsrc=rate=1:duration=1", mp4out + # Create a qcli report from the mp4 + qcliout = testpath/"video.mp4.qctools.xml.gz" + system bin/"qcli", "-i", mp4out, "-o", qcliout + assert_path_exists qcliout + end +end diff --git a/Formula/q/qcoro6.rb b/Formula/q/qcoro6.rb new file mode 100644 index 0000000000000..7da7ba6813317 --- /dev/null +++ b/Formula/q/qcoro6.rb @@ -0,0 +1,71 @@ +class Qcoro6 < Formula + desc "C++ Coroutines for Qt" + homepage "https://qcoro.dev" + url "https://github.com/qcoro/qcoro/archive/refs/tags/v0.12.0.tar.gz" + sha256 "809afafab61593f994c005ca6e242300e1e3e7f4db8b5d41f8c642aab9450fbc" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "29e63a82cea7891ef2e9844a57e7836d9c4ebf91db2991432038fa9ce4b971a6" + sha256 cellar: :any, arm64_sequoia: "c77df01948a62ed7857b568b86ea585018632050d2ba57872205a3ae54eadb76" + sha256 cellar: :any, arm64_sonoma: "f0d57a2e74521709c59b8c8c13727dcc91127378507b5c43e9757e5aaa4ddc44" + sha256 cellar: :any, sonoma: "4dcbd1c72b2d23a8a7c870611ac6de0f47d6c473c49da1fd111908b253914a9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "72c9a6c92632c060f34b85158517ecd7d204da2ebab40b7994e8c9228b613755" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28ffddc636d502cc3d763fab6deef4348c4f77c7b8e6d14594cfd30d5cdad1d2" + end + + depends_on "cmake" => [:build, :test] + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtwebsockets" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DQCORO_BUILD_EXAMPLES=OFF", + "-DQCORO_BUILD_TESTING=OFF", + "-DUSE_QT_VERSION=6", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.16) + project(QCoroTest LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 20) + find_package(QCoro6 REQUIRED COMPONENTS Coro Core Network WebSockets Quick Qml Test) + find_package(Qt6 REQUIRED COMPONENTS Core Network WebSockets Quick Qml Test) + add_executable(testapp test.cpp) + target_link_libraries(testapp PRIVATE + QCoro6::Coro + QCoro6::Core Qt6::Core + QCoro6::Network Qt6::Network + QCoro6::WebSockets Qt6::WebSockets + QCoro6::Quick Qt6::Quick + QCoro6::Qml Qt6::Qml + QCoro6::Test Qt6::Test) + qcoro_enable_coroutines() + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include // from QCoroCoro + #include // from QCoroCore + #include // from QCoroNetwork + #include // from QCoroWebSockets + #include // from QCoroQuick + #include // from QCoroQml + #include // from QCoroTest + int main(int argc, char **argv) { + QCoro::Task t = []() -> QCoro::Task { co_return 42; }(); + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + system "./build/testapp" + end +end diff --git a/Formula/q/qd.rb b/Formula/q/qd.rb new file mode 100644 index 0000000000000..b4c466c05e5f1 --- /dev/null +++ b/Formula/q/qd.rb @@ -0,0 +1,43 @@ +class Qd < Formula + desc "C++/Fortran-90 double-double and quad-double package" + homepage "https://www.davidhbailey.com/dhbsoftware/" + url "https://www.davidhbailey.com/dhbsoftware/qd-2.3.24.tar.gz" + sha256 "a47b6c73f86e6421e86a883568dd08e299b20e36c11a99bdfbe50e01bde60e38" + license "BSD-3-Clause-LBNL" + + # The homepage no longer links to a QD tarball and instead directs users to + # the GitHub repository, so we check the Git tags. + livecheck do + url "https://github.com/BL-highprecision/QD.git" + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3ca655810301b79586645117410defae98de1cd731c33980836abdb4d35d8515" + sha256 cellar: :any, arm64_sequoia: "1cbee32662495e167dce863c774fdd9aa87c4ee3650da5da477daccdc685a46e" + sha256 cellar: :any, arm64_sonoma: "24301f8d2b3266a495fa80163ee64a56322d4445b42232c214fa2a58a8907644" + sha256 cellar: :any, sonoma: "62f94278c224f2b052894b132fb33bbf77ae1b12eb2c505416337cf66895b629" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6b10538c68aa7fb95aba6d7df372be107ff09d64451d8a55dcf224e6f01a722" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdae75a75becb67577f375febf3594bbed031f7197252360234cc1509c6e14ef" + end + + # Drop `autoconf`, `automake`, `libtool` when the patch is removed. + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "gcc" # for gfortran + + def install + odie "check if autoreconf line can be removed" if version > "2.3.24" + # regenerate since the files were generated using automake 1.16.5 + system "autoreconf", "--install", "--force", "--verbose" + + system "./configure", "--enable-shared", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/qd-config --configure-args") + end +end diff --git a/Formula/q/qdbm.rb b/Formula/q/qdbm.rb new file mode 100644 index 0000000000000..c751e615a2047 --- /dev/null +++ b/Formula/q/qdbm.rb @@ -0,0 +1,89 @@ +class Qdbm < Formula + desc "Library of routines for managing a database" + homepage "https://dbmx.net/qdbm/" + url "https://dbmx.net/qdbm/qdbm-1.8.78.tar.gz" + sha256 "b466fe730d751e4bfc5900d1f37b0fb955f2826ac456e70012785e012cdcb73e" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?qdbm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "5222aa09e8299b7db382992f7630bd0881e928823e961c2033535adb2b4c95a4" + sha256 cellar: :any, arm64_sequoia: "93ffe465aedaa92b472c387fcee97ce7c8611b32aba5127cde60558746aed441" + sha256 cellar: :any, arm64_sonoma: "5f9e5e025feda86f511d850b0af43d251f52637aa1bfeb3428b5cbd0a23df7eb" + sha256 cellar: :any, arm64_ventura: "2b37f6d105b64d9320f71ea174c959d8d8df01a70805662be04cf5b54eb73ffa" + sha256 cellar: :any, sonoma: "e9f9b7bb82d908e6278be6164b85495237decfab1548b3c65e7856e873bf7c1c" + sha256 cellar: :any, ventura: "77d8ac2179ec650753482086110e5907bf9535647f9d3b3dbe911aba0327d292" + sha256 cellar: :any_skip_relocation, arm64_linux: "b52710b49798647bb9921dedcb31765f7245e53b6c9e858bce89604f679ed610" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d63d9159c7ec417881369e52b6d4da71982b91487b03fb5d73280670296fea90" + end + + uses_from_macos "zlib" + + def install + args = %W[ + --disable-debug + --prefix=#{prefix} + --enable-zlib + --enable-iconv + ] + + if OS.mac? + # Does not want to build on Linux + args << "--enable-bzip" + else + ENV.append "LDFLAGS", "-L#{Formula["zlib"].opt_lib}" + end + + # GCC < 13 with -O2 or higher can cause segmentation faults from loop optimisation bug + if ENV.compiler.to_s.start_with?("gcc") && DevelopmentTools.gcc_version("gcc") < 13 + ENV.append "CPPFLAGS", "-fno-tree-vrp" + end + + system "./configure", *args + if OS.mac? + system "make", "mac" + system "make", "install-mac" + else + system "make" + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + #define NAME "mike" + #define NUMBER "00-12-34-56" + #define DBNAME "book" + + int main(void) { + DEPOT *depot; + char *val; + + if(!(depot = dpopen(DBNAME, DP_OWRITER | DP_OCREAT, -1))) { return 1; } + if(!dpput(depot, NAME, -1, NUMBER, -1, DP_DOVER)) { return 1; } + if(!(val = dpget(depot, NAME, -1, 0, -1, NULL))) { return 1; } + + printf("%s, %s\\n", NAME, val); + free(val); + + if(!dpclose(depot)) { return 1; } + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lqdbm", "-o", "test" + assert_equal "mike, 00-12-34-56", shell_output("./test").chomp + end +end diff --git a/Formula/q/qdmr.rb b/Formula/q/qdmr.rb new file mode 100644 index 0000000000000..d94023e691dd4 --- /dev/null +++ b/Formula/q/qdmr.rb @@ -0,0 +1,47 @@ +class Qdmr < Formula + desc "Codeplug programming tool for DMR radios" + homepage "https://dm3mat.darc.de/qdmr/" + url "https://github.com/hmatuschek/qdmr/archive/refs/tags/v0.13.1.tar.gz" + sha256 "72d93d53dcdd781fd18e6769d985caff77e13fdd21e7466c9ffec65a4b0af56f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "62c635e152f647454303ea78a2a5a8f87afd78e20c1f7f45b1272ff863f5c6e6" + sha256 cellar: :any, arm64_sequoia: "a9f12ca56f82fa77075ca95f489dcf040a74d3b4a03f47468ff6fbe6a192c9a3" + sha256 cellar: :any, arm64_sonoma: "df423e25ca37c145fe00820d91ac0dbe3572368e7d5061036470d268117c6d10" + sha256 cellar: :any, sonoma: "01594eff74247edbe635d495334a67cdee47141f040d88a8da29c6aec72fa942" + sha256 cellar: :any_skip_relocation, arm64_linux: "7fb6437c169ee164e4c893e23ffc5e993925ad5f7acf04bd4d28261524b691ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9771b178d2ccb208187d14f76d535a3a996721f4f45f3303a1732c4c663ab8c" + end + + depends_on "cmake" => :build + depends_on "librsvg" + depends_on "libusb" + depends_on "qtbase" + depends_on "qtpositioning" + depends_on "qtserialport" + depends_on "qttools" + depends_on "yaml-cpp" + + def install + system "cmake", "-S", ".", "-B", "build", "-DINSTALL_UDEV_RULES=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"config.yaml").write <<~YAML + radioIDs: + - dmr: {id: id1, name: DM3MAT, number: 2621370} + + channels: + - dmr: + id: ch1 + name: "Test Channel" + rxFrequency: 123.456780 # <- Up to 10Hz precision + txFrequency: 1234.567890 + + YAML + system bin/"dmrconf", "--radio=d878uv2", "encode", "config.yaml", "config.dfu" + end +end diff --git a/Formula/q/qemu.rb b/Formula/q/qemu.rb new file mode 100644 index 0000000000000..6bf7861aebf7f --- /dev/null +++ b/Formula/q/qemu.rb @@ -0,0 +1,137 @@ +class Qemu < Formula + desc "Generic machine emulator and virtualizer" + homepage "https://www.qemu.org/" + url "https://download.qemu.org/qemu-10.1.2.tar.xz" + sha256 "9d75f331c1a5cb9b6eb8fd9f64f563ec2eab346c822cb97f8b35cd82d3f11479" + license "GPL-2.0-only" + head "https://gitlab.com/qemu-project/qemu.git", branch: "master" + + livecheck do + url "https://www.qemu.org/download/" + regex(/href=.*?qemu[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "9c7205bd69dc8e90413a327ab2c0079ef64d4fb95efe392f7e328ba9177fc8aa" + sha256 arm64_sequoia: "32d5e80011b3bd1ac0ff786c08f65f7312c00b884c9b170728c39e525afa38e6" + sha256 arm64_sonoma: "c2512a943a1ec662a392ae09c1dd50c38a15fc1990f4fbf4930a82fab447391b" + sha256 sonoma: "fa78741a8a2b27f31431177fe19791748bd1a80931adbcf392f1a9de1cbccea0" + sha256 arm64_linux: "e020ada579685964a50e51cac5dd45ec73caa7aeb9674b0018240f3672729558" + sha256 x86_64_linux: "ca85512f2c9df0b32d73e327705f92eedae2c1d0b90999b7f7e22b5c70ae0d72" + end + + depends_on "libtool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build # keep aligned with meson + depends_on "spice-protocol" => :build + + depends_on "capstone" + depends_on "dtc" + depends_on "glib" + depends_on "gnutls" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libslirp" + depends_on "libssh" + depends_on "libusb" + depends_on "lzo" + depends_on "ncurses" + depends_on "nettle" + depends_on "pixman" + depends_on "snappy" + depends_on "vde" + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "attr" + depends_on "cairo" + depends_on "elfutils" + depends_on "gdk-pixbuf" + depends_on "gtk+3" + depends_on "libcap-ng" + depends_on "libepoxy" + depends_on "libx11" + depends_on "libxkbcommon" + depends_on "mesa" + depends_on "systemd" + end + + def install + ENV["LIBTOOL"] = "glibtool" + + # Remove wheels unless explicitly permitted. Currently this: + # * removes `meson` so that brew `meson` is always used + # * keeps `pycotap` which is a pure-python "none-any" wheel (allowed in homebrew/core) + rm(Dir["python/wheels/*"] - Dir["python/wheels/pycotap-*-none-any.whl"]) + + args = %W[ + --prefix=#{prefix} + --cc=#{ENV.cc} + --host-cc=#{ENV.cc} + --disable-bsd-user + --disable-download + --disable-guest-agent + --enable-slirp + --enable-capstone + --enable-curses + --enable-fdt=system + --enable-libssh + --enable-vde + --enable-virtfs + --enable-zstd + --extra-cflags=-DNCURSES_WIDECHAR=1 + --disable-sdl + ] + + # Sharing Samba directories in QEMU requires the samba.org smbd which is + # incompatible with the macOS-provided version. This will lead to + # silent runtime failures, so we set it to a Homebrew path in order to + # obtain sensible runtime errors. This will also be compatible with + # Samba installations from external taps. + args << "--smbd=#{HOMEBREW_PREFIX}/sbin/samba-dot-org-smbd" + + args += if OS.mac? + ["--disable-gtk", "--enable-cocoa"] + else + ["--enable-gtk"] + end + + system "./configure", *args + system "make", "V=1", "install" + end + + test do + # 820KB floppy disk image file of FreeDOS 1.2, used to test QEMU + # NOTE: Keep outside test block so that `brew fetch` is able to handle slow download/retries + resource "homebrew-test-image" do + url "https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/official/FD12FLOPPY.zip" + sha256 "81237c7b42dc0ffc8b32a2f5734e3480a3f9a470c50c14a9c4576a2561a35807" + end + + archs = %w[ + aarch64 alpha arm avr hppa i386 loongarch64 m68k microblaze microblazeel mips + mips64 mips64el mipsel or1k ppc ppc64 riscv32 riscv64 rx + s390x sh4 sh4eb sparc sparc64 tricore x86_64 xtensa xtensaeb + ] + archs.each do |guest_arch| + assert_match version.to_s, shell_output("#{bin}/qemu-system-#{guest_arch} --version") + end + + resource("homebrew-test-image").stage testpath + assert_match "file format: raw", shell_output("#{bin}/qemu-img info FLOPPY.img") + + # On macOS, verify that we haven't clobbered the signature on the qemu-system-x86_64 binary + if OS.mac? + output = shell_output("codesign --verify --verbose #{bin}/qemu-system-x86_64 2>&1") + assert_match "valid on disk", output + assert_match "satisfies its Designated Requirement", output + end + end +end diff --git a/Formula/q/qhull.rb b/Formula/q/qhull.rb new file mode 100644 index 0000000000000..6c07b8d29626c --- /dev/null +++ b/Formula/q/qhull.rb @@ -0,0 +1,52 @@ +class Qhull < Formula + desc "Computes convex hulls in n dimensions" + homepage "http://www.qhull.org/" + url "http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz" + version "2020.2" + sha256 "b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e" + license "Qhull" + head "https://github.com/qhull/qhull.git", branch: "master" + + # It's necessary to match the version from the link text, as the filename + # only contains the year (`2020`), not a full version like `2020.2`. + livecheck do + url "http://www.qhull.org/download/" + regex(/href=.*?qhull[._-][^"' >]+?[._-]src[^>]*?\.t[^>]+?>[^<]*Qhull v?(\d+(?:\.\d+)*)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e63077686c1ef66ea9f65e7e10d842aa788bdf21b6011dd3c0b2ccd35195ddb7" + sha256 cellar: :any, arm64_sequoia: "03294d7f8db8437cdf8d4d679ae41808a195b733907bf638671f99089592dc17" + sha256 cellar: :any, arm64_sonoma: "f2d64f8e284b65fd97bb19b8add86502b3b88c71e9338723aa38ac5a34361f91" + sha256 cellar: :any, arm64_ventura: "33bd3b7b6225c502fa1a21501cdd2ce72f92ab942bc9b5092f3c9172a2312f22" + sha256 cellar: :any, arm64_monterey: "6d207280ccb3591c233825c16707691f2502b2e1d65d5e0c18fa66342cd8bea3" + sha256 cellar: :any, arm64_big_sur: "7aae401ecc2b918c1a860e6ead74141cbb0b58b2d797f5c5a214fb7ca088424d" + sha256 cellar: :any, sonoma: "4bc43edb0bba14a92203f6e4a31649db8d15a0fae8d71f7977d1e8189f1a597e" + sha256 cellar: :any, ventura: "8c5922f72dbf8061a0e6e0b459e6eca4898ee2236223965daae35fca77309b5c" + sha256 cellar: :any, monterey: "67ee6237ae95266f7acbb4e19ec2db41fd3fe22faa60060d9988e87cd473e073" + sha256 cellar: :any, big_sur: "dfd8138816f958dece1b6f30188ad3bfa53c3c8c74abf2ab22f3462477924b84" + sha256 cellar: :any_skip_relocation, arm64_linux: "674616b881abea9139c0f2db580b813eecdc401e46842f792b19f843cff5eb11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1dc32a7258d2f678417041a1dbd2ea922369e67209062ada7b19caee4fd2c55c" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4.0+ + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + odie "Remove cmake workaround" if build.stable? && version > "2020.2" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + input = shell_output("#{bin}/rbox c D2") + output = pipe_output("#{bin}/qconvex s n 2>&1", input, 0) + assert_match "Number of facets: 4", output + end +end diff --git a/Formula/q/qjackctl.rb b/Formula/q/qjackctl.rb new file mode 100644 index 0000000000000..b80ed9f7e098d --- /dev/null +++ b/Formula/q/qjackctl.rb @@ -0,0 +1,61 @@ +class Qjackctl < Formula + desc "Simple Qt application to control the JACK sound server daemon" + homepage "https://qjackctl.sourceforge.io/" + url "https://downloads.sourceforge.net/project/qjackctl/qjackctl/1.0.4/qjackctl-1.0.4.tar.gz" + sha256 "e3eb6f989d947dcd97b4fe774294347106a0a6829c0480a965393ebca97514ae" + license "GPL-2.0-or-later" + head "https://git.code.sf.net/p/qjackctl/code.git", branch: "main" + + livecheck do + url :stable + regex(%r{url=.*?/qjackctl[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "b6b29448edf9d0cb0e99406289f410a3a8adc6c288f9092777be85958b3434b7" + sha256 arm64_sequoia: "dfc335c469d0b4f65ae054343c453377b0db2e8e8171eec52b0fe244fc615ad9" + sha256 arm64_sonoma: "c3c3215ed601d2689849cdb23adc9a50d4b50203a0a6f336ca55bea90e6610b0" + sha256 sonoma: "8f8e32f847d7118c7c15fae9eeb551982a8ad74b7f5ea3d280944b72bbb51ad2" + sha256 arm64_linux: "bf7cf0202b94f8c8324c2f73cfc39c29c38c15ddb8dad9038365e87c42ce8346" + sha256 x86_64_linux: "dc312c775a04b6226512ff0867dc3365e3a9db3d3b06fd88ae40170c73421aa9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "qttools" => :build + depends_on "jack" + depends_on "qtbase" + depends_on "qtsvg" + + on_linux do + depends_on "alsa-lib" + end + + def install + args = %w[ + -DCONFIG_DBUS=OFF + -DCONFIG_PORTAUDIO=OFF + -DCONFIG_XUNIQUE=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + if OS.mac? + prefix.install bin/"qjackctl.app" + bin.install_symlink prefix/"qjackctl.app/Contents/MacOS/qjackctl" + end + end + + test do + # Detected locale "C" with character encoding "US-ASCII", which is not UTF-8. + ENV["LC_ALL"] = "en_US.UTF-8" + + # Set QT_QPA_PLATFORM to minimal to avoid error "qt.qpa.xcb: could not connect to display" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match version.to_s, shell_output("#{bin}/qjackctl --version 2>&1", 1) + end +end diff --git a/Formula/q/qjson.rb b/Formula/q/qjson.rb new file mode 100644 index 0000000000000..7b8afeeed7c97 --- /dev/null +++ b/Formula/q/qjson.rb @@ -0,0 +1,70 @@ +class Qjson < Formula + desc "Map JSON to QVariant objects" + homepage "https://qjson.sourceforge.net/" + url "https://github.com/flavio/qjson/archive/refs/tags/0.9.0.tar.gz" + sha256 "e812617477f3c2bb990561767a4cd8b1d3803a52018d4878da302529552610d4" + license "LGPL-2.1-only" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0e477768711d2b9e0aca6455293f497e860e54455b2eb4fbf7fbfec1ad3754ba" + sha256 cellar: :any, arm64_sequoia: "d2d3a43592241e2217ea2508fa0ac418058d95d774f5d9fac89cbfe6ec031af0" + sha256 cellar: :any, arm64_sonoma: "c38d82d6a5e21a82d588066f62825febd4710d2826349ac5bddbe517f22d60a3" + sha256 cellar: :any, arm64_ventura: "7b927cd12810ef0c8bca41a65c906af9021ef100fcfd1a4686e81607c213fc7e" + sha256 cellar: :any, arm64_monterey: "f9bf3676c0e2b53c3820eb8b9fc6b8a3b3222c86836a925531c4a1ec902bb346" + sha256 cellar: :any, arm64_big_sur: "073b41a1515c6da30255c50957567eed6f70243aa6845c919fc4d525516fed61" + sha256 cellar: :any, sonoma: "72a7eb2c9151344e4add590d9107341934efcb6684cfced1a75807d6e57ebbeb" + sha256 cellar: :any, ventura: "c644e9cc4192087e8cb03fd0c420a8a164354f33453ed4dc15ecde05e475b8c4" + sha256 cellar: :any, monterey: "49c80dc061c008fb20ebc722596d17845973ee735236be19b8b26cb5293cd043" + sha256 cellar: :any, big_sur: "282f4fa0cccf91b2f993e6742c295e57016a5a25dc89acd1d5c0f19fdf661734" + sha256 cellar: :any, catalina: "23138020da1a1d5fc965e242d40ee73838cd233498c1f6aa06fa0146aa895b94" + sha256 cellar: :any_skip_relocation, arm64_linux: "beab44351c3cb609985653759a33e712015c6a8689fdaeb70306f90c9225b63d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b64e82e4791c3dc66f6304add6ac44a993b82a9d88d02704af280daa080f5d64" + end + + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "cmake" => :build + depends_on "qt@5" # Qt6 issue: https://github.com/flavio/qjson/issues/122 + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + inreplace "CMakeLists.txt", "cmake_policy(SET CMP0020 OLD)", "" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QJson::Parser parser; + return 0; + } + CPP + flags = ["-I#{Formula["qt@5"].opt_include}"] + flags += if OS.mac? + [ + "-F#{Formula["qt@5"].opt_lib}", + "-framework", "QtCore" + ] + else + [ + "-fPIC", + "-L#{Formula["qt@5"].opt_lib}", "-lQt5Core", + "-Wl,-rpath,#{Formula["qt@5"].opt_lib}", + "-Wl,-rpath,#{lib}" + ] + end + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", "-I#{include}", + "-L#{lib}", "-lqjson-qt5", *flags + system "./test" + end +end diff --git a/Formula/q/qman.rb b/Formula/q/qman.rb new file mode 100644 index 0000000000000..e7e3d9172f2e6 --- /dev/null +++ b/Formula/q/qman.rb @@ -0,0 +1,78 @@ +class Qman < Formula + desc "Modern man page viewer" + homepage "https://github.com/plp13/qman" + url "https://github.com/plp13/qman/archive/refs/tags/v1.5.0.tar.gz" + sha256 "785441bf11e99ff27869c08f0d36ce3f5c75db1b045b8712fe515059cf396780" + license "BSD-2-Clause" + + bottle do + sha256 arm64_tahoe: "76e73e941c8644a419e621767c8fcf264fb6648bd2ac9d1ca45036f7771b9662" + sha256 arm64_sequoia: "242f89831ea2de296836320100941480578948076051262e9c5a4a55f099d7f5" + sha256 arm64_sonoma: "d8ed1519a4e75f283581a084d86c58fcb4f9a99ea35fb11848688f1e7542d428" + sha256 arm64_ventura: "f80ec8da63ae6047755d58a238e6d668ad42f418a0ba2ee4effd1ab357fcce97" + sha256 cellar: :any, sonoma: "8413046064145228637319223914e277a13ad7b0eadf201d1f633963d16c89b3" + sha256 cellar: :any, ventura: "445caa196096dcbdbc4b3814cc2f2d1d41995fe3d1c4d4b5ce1c1eed911033a7" + sha256 arm64_linux: "01382320e7a0ba1239144fcaeca19f9a2c4d4d044fb56ac2dcdf159c873d2ceb" + sha256 x86_64_linux: "156d528908713d8438b6da5ca03cd92b9629a3c082f7b417f77e13d253067061" + end + + depends_on "cogapp" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "groff" + depends_on "ncurses" + + uses_from_macos "zlib" + + on_linux do + depends_on "man-db" => :test + depends_on "libbsd" + end + + def install + args = %W[ + -Dtests=disabled + -Dbzip2=disabled + -Dlzma=disabled + -Dconfigdir=#{pkgetc} + ] + args += %w[-Dlibbsd=enabled] if OS.linux? + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + systype = if OS.mac? + "darwin" + else + "mandb" + end + inreplace pkgetc/"qman.conf", "[misc]", <<~EOS + [misc] + system_type=#{systype} + groff_path=#{Formula["groff"].opt_bin}/groff + EOS + end + + test do + match_str = "more modern manual page viewer" + result = 0 + + # Linux CI has no man-related support files + opts = if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + cp_r pkgetc, testpath/"qman" + inreplace testpath/"qman/qman.conf", "[misc]", <<-EOS + [misc] + whatis_path=#{Formula["man-db"].opt_bin}/gwhatis + apropos_path=#{Formula["man-db"].opt_bin}/gapropos + EOS + match_str = "This system has been minimized by removing packages and content" + result = 2 + + "-C #{testpath}/qman/qman.conf" + end + + assert_match match_str, shell_output("#{bin}/qman #{opts} -T -l #{man1}/qman.1 2>&1", result) + end +end diff --git a/Formula/q/qmmp.rb b/Formula/q/qmmp.rb new file mode 100644 index 0000000000000..59db7d694dcc6 --- /dev/null +++ b/Formula/q/qmmp.rb @@ -0,0 +1,114 @@ +class Qmmp < Formula + desc "Qt-based Multimedia Player" + homepage "https://qmmp.ylsoftware.com/" + url "https://qmmp.ylsoftware.com/files/qmmp/2.3/qmmp-2.3.0.tar.bz2" + sha256 "01c3e30367c885178cd115594d20f694a47a352fd7e65fcf5722e12ac8333063" + license "GPL-2.0-or-later" + + livecheck do + url "https://qmmp.ylsoftware.com/downloads.php" + regex(/href=.*?qmmp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e6da5eb38b48ffe1d8f40676be1444e840c833c3311f7a631ca9762694e81aad" + sha256 cellar: :any, arm64_sequoia: "7fa781c7162c07690e998ab6c9d598f24115ceedca718bd12528c15b96d243ed" + sha256 cellar: :any, arm64_sonoma: "3fc459eb502ada770aa7fbfcc3e0e311bdea4f39d6ff4d4b341453b01ba4a948" + sha256 cellar: :any, sonoma: "0a74c8a1511f9c9347723a0d6a478fb0d9a93604649804f5011310ea4a5b4a2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fe28066049c5fc79e28a19dd8aced21f78deaa12fecfbfb017a827a7aba2e3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a643156b0ee13bbeb993e38550a14fe2c367de12828fa8a18cf7db7e5e083531" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "qttools" => :build + + # TODO: on linux: pipewire + depends_on "faad2" + depends_on "ffmpeg" + depends_on "flac" + depends_on "game-music-emu" + depends_on "jack" + depends_on "libarchive" + depends_on "libbs2b" + depends_on "libcddb" + depends_on "libcdio" + depends_on "libmms" + depends_on "libmodplug" + depends_on "libogg" + depends_on "libsamplerate" + depends_on "libshout" + depends_on "libsndfile" + depends_on "libsoxr" + depends_on "libvorbis" + depends_on "libxcb" + depends_on "libxmp" + depends_on "mad" + depends_on "mpg123" + depends_on "mplayer" + depends_on "musepack" + depends_on "opus" + depends_on "opusfile" + depends_on "projectm" + depends_on "pulseaudio" + depends_on "qtbase" + depends_on "qtmultimedia" + depends_on "taglib" + depends_on "wavpack" + depends_on "wildmidi" + + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + depends_on "glib" + end + + on_linux do + depends_on "alsa-lib" + depends_on "libx11" + depends_on "mesa" + end + + resource "qmmp-plugin-pack" do + url "https://qmmp.ylsoftware.com/files/qmmp-plugin-pack/2.3/qmmp-plugin-pack-2.3.0.tar.bz2" + sha256 "a23c202f90faaf6aebb97a9c02ee21fb3c8164b07755514349ccb3e1acb81ab5" + + livecheck do + url "https://qmmp.ylsoftware.com/plugins.php" + regex(/href=.*?qmmp-plugin-pack[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + def install + cmake_args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_STAGING_PREFIX=#{prefix} + -DUSE_SKINNED=ON + -DUSE_ENCA=ON + -DUSE_QMMP_DIALOG=ON + ] + if OS.mac? + cmake_args << "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup" + cmake_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup" + cmake_args << "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup" + end + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + ENV.append_path "PKG_CONFIG_PATH", lib/"pkgconfig" + resource("qmmp-plugin-pack").stage do + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + end + + test do + # Set QT_QPA_PLATFORM to minimal to avoid error "qt.qpa.xcb: could not connect to display" + ENV["QT_QPA_PLATFORM"] = "minimal" unless OS.mac? + system bin/"qmmp", "--version" + end +end diff --git a/Formula/q/qnm.rb b/Formula/q/qnm.rb new file mode 100644 index 0000000000000..774c829bc7f13 --- /dev/null +++ b/Formula/q/qnm.rb @@ -0,0 +1,51 @@ +class Qnm < Formula + desc "CLI for querying the node_modules directory" + homepage "https://github.com/ranyitz/qnm" + url "https://registry.npmjs.org/qnm/-/qnm-2.10.4.tgz" + sha256 "205044b4bbc4637917ac55f936c17b2763e622040cfa84acb1a0289b50b21098" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "360bcebfd1a8e6fba957b45863d7601122002474f16895e74e6fbc56100939f8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "360bcebfd1a8e6fba957b45863d7601122002474f16895e74e6fbc56100939f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "360bcebfd1a8e6fba957b45863d7601122002474f16895e74e6fbc56100939f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "360bcebfd1a8e6fba957b45863d7601122002474f16895e74e6fbc56100939f8" + sha256 cellar: :any_skip_relocation, sonoma: "ba15766ca2e00720af7c0022eb8c05dbe2bcf2744fd61fa5ededd82da4a0d441" + sha256 cellar: :any_skip_relocation, ventura: "ba15766ca2e00720af7c0022eb8c05dbe2bcf2744fd61fa5ededd82da4a0d441" + sha256 cellar: :any_skip_relocation, arm64_linux: "360bcebfd1a8e6fba957b45863d7601122002474f16895e74e6fbc56100939f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "360bcebfd1a8e6fba957b45863d7601122002474f16895e74e6fbc56100939f8" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/qnm --version") + + (testpath/"package.json").write <<~EOS + { + "name": "test", + "version": "0.0.1", + "dependencies": { + "lodash": "^4.17.21" + } + } + EOS + + # Simulate a node_modules directory with lodash to avoid `npm install` + (testpath/"node_modules/lodash/package.json").write <<~EOS + { + "name": "lodash", + "version": "4.17.21" + } + EOS + + # Disable remote fetch with `--no-remote` + output = shell_output("#{bin}/qnm --no-remote lodash") + assert_match "lodash", output + end +end diff --git a/Formula/q/qodem.rb b/Formula/q/qodem.rb new file mode 100644 index 0000000000000..0dd7961737ecc --- /dev/null +++ b/Formula/q/qodem.rb @@ -0,0 +1,46 @@ +class Qodem < Formula + desc "Terminal emulator and BBS client" + homepage "https://qodem.sourceforge.io/" + url "https://downloads.sourceforge.net/project/qodem/qodem/1.0.1/qodem-1.0.1.tar.gz" + sha256 "dedc73bfa73ced5c6193f1baf1ffe91f7accaad55a749240db326cebb9323359" + license :public_domain + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "62259c018c435331adcb0c9d99b72f119e03d4cb549a100e758f96deae273b8f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82b1c05936cabb7c92111db07b6443f9dcf4313bb092321cdfb32b9b0866e675" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf3db8bf2f510749816adf4d24e383033ac3211742e922788dd0b0686287985b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c88b2b10336d0562d9858744dac90f4f895efa643ae7441170a2c33fafd76c23" + sha256 cellar: :any_skip_relocation, arm64_monterey: "230b60c0f6dbd68eb6842acc073e21b0fb2bb5e4e47a8f37b2fd812980849c7f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0edd8a307de97c0844df4940c87ea88cfe68e5b41ca55e6c6d67f4b024b31477" + sha256 cellar: :any_skip_relocation, sonoma: "e8d54c0a6aeddabfb41011dc78dd6ad6a5c3363a89574cefb7f93835ff54c335" + sha256 cellar: :any_skip_relocation, ventura: "eb099f141c43635088e5069c8f519aa88100348db0172f1f54847de32a6c45b8" + sha256 cellar: :any_skip_relocation, monterey: "ded91d17b85bfa34b3cd3eb01a338f19ed91711a2c4fdea71d5543cc3953c2ab" + sha256 cellar: :any_skip_relocation, big_sur: "ac2537f733ed6952656aec3016302414b37166b64b2d89836f17354008276f73" + sha256 cellar: :any_skip_relocation, catalina: "14491121c60a5368cf41e4cab4df43bd918f31342f8aedf7e43241a3e49b22b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e3c2992c032736b98f58b50eaa897b282a3843012fc22371dd43bd93cd4ed7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19414f9b69d7423a5f2ab1ecb2690bf1bd285f96832d151835741867f22f2e6e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "ncurses" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--disable-gpm", + "--disable-sdl", + "--disable-serial", + "--disable-upnp", + "--disable-x11" + system "make", "install" + end + + test do + system bin/"qodem", "--exit-on-completion", "--capfile", testpath/"qodem.out", "uname" + assert_match OS.kernel_name, File.read(testpath/"qodem.out") + end +end diff --git a/Formula/q/qp.rb b/Formula/q/qp.rb new file mode 100644 index 0000000000000..dc90c9e13b4f6 --- /dev/null +++ b/Formula/q/qp.rb @@ -0,0 +1,50 @@ +class Qp < Formula + desc "Command-line (ND)JSON querying" + homepage "https://github.com/f5io/qp" + url "https://github.com/f5io/qp/archive/refs/tags/1.0.1.tar.gz" + sha256 "6ef12fd4494262899ee12cc1ac0361ec0dd7b67e29c6ac6899d1df21efc7642b" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2ce20d5b9492b790930a30e31d9cc0676ff4620e89ab8ce1175fd918915f52f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "057596b8dcd5522e27c794855e7660cb04ca8573e49f1fbeee9ed62fad13d985" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c04341a1fa1b769bc85961552aa9d561e2d6d6eb690603a34ff51845aa5a80c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3eec317220476506f3fd8acacf1ea1adc09184aa349f8ba040f3d32f45a6f330" + sha256 cellar: :any_skip_relocation, arm64_monterey: "458188f1637fb0dc6f865c73b9dfb5e6146070ad0193507df7979236afc60294" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2c583d1f819ffba8adcc8139efe3366ad4570f3efc7c94fb25742e4da602202e" + sha256 cellar: :any_skip_relocation, sonoma: "ac7cee390c258e581ae419daf0e08a6d3f6dcf261cc1e7ec5eac5a8fd399c720" + sha256 cellar: :any_skip_relocation, ventura: "9c5b1e3ed8e0e27e8f0b83a80037426153b1e4b9674ffa4b522027d97d55345a" + sha256 cellar: :any_skip_relocation, monterey: "ff9da9b5b7578cb0a87aeb8dff3aeaec5521952dc0764d1623f7e4241e0e1044" + sha256 cellar: :any_skip_relocation, big_sur: "83085c1f8cbeaf59a69f00f779a878ceb78b7aeaaf16278010d5d968c9d94742" + sha256 cellar: :any_skip_relocation, catalina: "a65499deed12110ed5a21f3bbd657acdaaf1452dea48877caac93bda55759370" + sha256 cellar: :any_skip_relocation, arm64_linux: "71a9566be7b0f409f5d73dd7f8c175f5b131732bd86e64bd3fd1fe54d5c631c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9a688fd124da927fb627c02b2a043c34d48727785a5be844dd1853a65ba8814" + end + + depends_on "quickjs" => :build + + resource "csp-js" do + url "https://unpkg.com/@paybase/csp@1.0.8/dist/esm/index.js" + sha256 "d50e6a6d5111a27a5b50c2b173d805a8f680b7ac996aa1c543e7b855ade4681c" + end + + def install + mkdir bin.to_s + + resource("csp-js").stage { cp_r "index.js", buildpath/"src/csp.js" } + + system "qjsc", "-o", bin/"qp", + "-fno-proxy", + "-fno-eval", + "-fno-string-normalize", + "-fno-map", + "-fno-typedarray", + "src/main.js" + end + + test do + assert_equal "{\"id\":1}\n", pipe_output("#{bin}/qp 'select id'", "{\"id\": 1, \"name\": \"test\"}") + end +end diff --git a/Formula/q/qpdf.rb b/Formula/q/qpdf.rb new file mode 100644 index 0000000000000..15dbf4e4e1f89 --- /dev/null +++ b/Formula/q/qpdf.rb @@ -0,0 +1,38 @@ +class Qpdf < Formula + desc "Tools for and transforming and inspecting PDF files" + homepage "https://github.com/qpdf/qpdf" + url "https://github.com/qpdf/qpdf/releases/download/v12.2.0/qpdf-12.2.0.tar.gz" + sha256 "b3d1575b2218badc3549d6977524bb0f8c468c6528eebc8967bbe3078cf2cace" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab1f5d8c3971bf00c4d203782ca925f1bb7088d0a8f835f0fc64d76aeecbf8b7" + sha256 cellar: :any, arm64_sequoia: "402fda223390d4fbe22d3c213a1b20a08e4472ecb9c88c3aedbd018071e5d533" + sha256 cellar: :any, arm64_sonoma: "f3225c6dc278a1a0284d44583ff89d46885b43fd7199f0713c7941e176c4d6e5" + sha256 cellar: :any, arm64_ventura: "d19d7552a5e40c451d80f739dbbc8475d082701d98bb8d7e6b9d300393f8cadb" + sha256 cellar: :any, sonoma: "506b946cf917a12bf2d06a3066a92e6fb0cd9f3197f26aa9c162ee619f8b43ed" + sha256 cellar: :any, ventura: "8b6836b38b18e6f0475b9ea2d1e72808c10387f05e0f0bf7d5614b9d9b0a69ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "a46169ba560636f07619b767ea0e31984b8b081c0b2a8a303f23ecb9ee9a7dcc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4d32c18a220370eabbe62d4fc2a0e1d0c2c095183ae425ba5e940a023d4307f" + end + + depends_on "cmake" => :build + depends_on "jpeg-turbo" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DUSE_IMPLICIT_CRYPTO=0", + "-DREQUIRE_CRYPTO_OPENSSL=1", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"qpdf", "--version" + end +end diff --git a/Formula/q/qpid-proton.rb b/Formula/q/qpid-proton.rb new file mode 100644 index 0000000000000..ad273b82cf70c --- /dev/null +++ b/Formula/q/qpid-proton.rb @@ -0,0 +1,56 @@ +class QpidProton < Formula + desc "High-performance, lightweight AMQP 1.0 messaging library" + homepage "https://qpid.apache.org/proton/" + url "https://www.apache.org/dyn/closer.lua?path=qpid/proton/0.40.0/qpid-proton-0.40.0.tar.gz" + mirror "https://archive.apache.org/dist/qpid/proton/0.40.0/qpid-proton-0.40.0.tar.gz" + sha256 "0acb39e92d947e30175de0969a5b2e479e2983bc3e3d69c835ee5174610e9636" + license "Apache-2.0" + head "https://gitbox.apache.org/repos/asf/qpid-proton.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fb2e582995d74fa3b379e8e4d895fbf0d8ddd291cdb79e9d8d11c82e42180da1" + sha256 cellar: :any, arm64_sequoia: "ad2d0628f2d4cfca80bd45f29612ec776c48de10a3f4f49f65e8c7f4cc2bbe0d" + sha256 cellar: :any, arm64_sonoma: "80e748066920432d06e1ef02053cf91ca25126f72432c7cb48d4b58d70b0213d" + sha256 cellar: :any, arm64_ventura: "7ba2629ad9f29a3fdfc38b9400f805fb598d68a9740cb1f950bb27a21ceaea9f" + sha256 cellar: :any, sonoma: "91a726082f6b056f11bf05f702270977a08c3c3d842f1e5ecc3c0e6501501dcd" + sha256 cellar: :any, ventura: "7dcf7fac3dc9cb98a388b4e7fa0c0ca9c33897f5fa0657afadc55fd018eb84e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "264e02d20e0fe761f2c866e52d21955063c016c58841a8333255cf70a8d677f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "529a54660787834c31b10aae535c4b99faf146b5f567715f9a44e06fdc3b37b0" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libuv" + depends_on "openssl@3" + + uses_from_macos "python" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_BINDINGS=", + "-DLIB_INSTALL_DIR=#{lib}", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-Dproactor=libuv", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "proton/message.h" + #include "proton/messenger.h" + int main() + { + pn_message_t * message; + pn_messenger_t * messenger; + pn_data_t * body; + message = pn_message(); + messenger = pn_messenger(NULL); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lqpid-proton", "-o", "test" + system "./test" + end +end diff --git a/Formula/q/qprint.rb b/Formula/q/qprint.rb new file mode 100644 index 0000000000000..9e4015a73adea --- /dev/null +++ b/Formula/q/qprint.rb @@ -0,0 +1,44 @@ +class Qprint < Formula + desc "Encoder and decoder for quoted-printable encoding" + homepage "https://www.fourmilab.ch/webtools/qprint/" + url "https://www.fourmilab.ch/webtools/qprint/qprint-1.1.tar.gz" + sha256 "ffa9ca1d51c871fb3b56a4bf0165418348cf080f01ff7e59cd04511b9665019c" + license :public_domain + + livecheck do + url :homepage + regex(/href=.*?qprint[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a29390a05c5e5744170726101f054366cf8c2cf8d8112b861574a4f9327d9ae1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ac2245e4a3f2c14009c6e9c3418374623e94b32f7f265ffe6cd30f0693299a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f2189ee3bf4741aa2c3625d23cdd55109db17d854f0a6a01bc00bd944b28f7b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "92e8b2bf88c82066a97efb04a8b65eab7f08a464d75bb9d4105e50a243f130cd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f17bf6ccfb63afc8908771488d0b1ffbbbdad4a3575c0654fe11e031c89ef0a7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "05903a905caebf80944f4705898c5377849b7a411cf234614205b3136dba4a38" + sha256 cellar: :any_skip_relocation, sonoma: "1baf6813dacc645d4047a021f89ce5ea5e1c56b70c0e8cae12a694b41e8b5ed3" + sha256 cellar: :any_skip_relocation, ventura: "3c1073fb345d02023615ffad4d949dd6fec097adf7f0947c58548061d42e5892" + sha256 cellar: :any_skip_relocation, monterey: "0cadd8be56fb57e11e69c2a144bfc204e36298458c71d327d5d76abfddee2e9c" + sha256 cellar: :any_skip_relocation, big_sur: "500367c9c89f50739d2b09f37f72ba1e0ec5418398d4570bf51363a725f57189" + sha256 cellar: :any_skip_relocation, catalina: "081c0663cccb890326323fce7ac57b8bb020d3505eaf0d19f1824dd63c304de2" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e776f58e2f735c499f4fdb99568f2c0fd3854d5d86c482bb086cc674e43082d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adea30e44e1c128bf4f466fbca2a3eaad7f71bd90a9868492b8365611bb76489" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + bin.mkpath + man1.mkpath + system "make", "install" + end + + test do + msg = "test homebrew" + encoded = pipe_output("#{bin}/qprint -e", msg) + assert_equal msg, pipe_output("#{bin}/qprint -d", encoded) + end +end diff --git a/Formula/q/qrcp.rb b/Formula/q/qrcp.rb new file mode 100644 index 0000000000000..4a2f6cabf78d2 --- /dev/null +++ b/Formula/q/qrcp.rb @@ -0,0 +1,63 @@ +class Qrcp < Formula + desc "Transfer files to and from your computer by scanning a QR code" + homepage "https://qrcp.sh" + url "https://github.com/claudiodangelis/qrcp/archive/refs/tags/v0.11.6.tar.gz" + sha256 "a3eff505f366713fcb7694e0e292ff2da05e270f9539b6a8561c4cf267ec23c8" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34ee2cedf3dbb46de85b7d6118830450f59a5aaeda93aea898a1d18331415d52" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30cabeb3467581c02c9d1a4927d837fc5ac96b8dea21e9f1b92ce2ee14addecd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30cabeb3467581c02c9d1a4927d837fc5ac96b8dea21e9f1b92ce2ee14addecd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "30cabeb3467581c02c9d1a4927d837fc5ac96b8dea21e9f1b92ce2ee14addecd" + sha256 cellar: :any_skip_relocation, sonoma: "2210e68f4eeae23cf63041718cdce05fedbd072ceb434f9f1f1761667091e862" + sha256 cellar: :any_skip_relocation, ventura: "2210e68f4eeae23cf63041718cdce05fedbd072ceb434f9f1f1761667091e862" + sha256 cellar: :any_skip_relocation, arm64_linux: "796bdc0d75a55864879e3131ac332d3d99af5020bde0ccf0c7229da2aa7c0592" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cedce7a5fa2e8b0c5277bcce76038ca2f03a9eca77673d5636676717cd41134d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/claudiodangelis/qrcp/version.version=#{version} + -X github.com/claudiodangelis/qrcp/version.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"qrcp", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/qrcp version") + + (testpath/"test_data.txt").write <<~EOS + Hello there, big world + EOS + + port = free_port + server_url = "http://localhost:#{port}/send/testing" + + (testpath/"config.json").write <<~JSON + { + "interface": "any", + "fqdn": "localhost", + "port": #{port} + } + JSON + + fork do + exec bin/"qrcp", "-c", testpath/"config.json", "--path", "testing", testpath/"test_data.txt" + end + sleep 1 + + # User-Agent header needed in order for curl to be able to receive file + assert_equal "Hello there, big world\n", shell_output("curl -H \"User-Agent: Mozilla\" #{server_url}") + end +end diff --git a/Formula/q/qrencode.rb b/Formula/q/qrencode.rb new file mode 100644 index 0000000000000..49c798e7d50f4 --- /dev/null +++ b/Formula/q/qrencode.rb @@ -0,0 +1,37 @@ +class Qrencode < Formula + desc "QR Code generation" + homepage "https://fukuchi.org/works/qrencode/index.html.en" + url "https://github.com/fukuchi/libqrencode/archive/refs/tags/v4.1.1.tar.gz" + sha256 "5385bc1b8c2f20f3b91d258bf8ccc8cf62023935df2d2676b5b67049f31a049c" + license "LGPL-2.1-or-later" + head "https://github.com/fukuchi/libqrencode.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "43022662b77fc3e4181eb5b0d8e671f6208c9217c307073c2e76d4e5c98ea9f9" + sha256 cellar: :any, arm64_sequoia: "3fec9ad635eb185c133cca4e3ab3e8ab7c2094453c462c457b1e5624960bca35" + sha256 cellar: :any, arm64_sonoma: "74e41b86ddec16b100ac17a756235f377b0e7b8990af8e37a66571b204db40c8" + sha256 cellar: :any, arm64_ventura: "01e05ae6c40b460ebc0dbba2fe76a4310ee538a692e7712dda77c07e18789ed8" + sha256 cellar: :any, sonoma: "b9af340917ff148b24e48c24e5313423e16df56a99a7a612d0b23af59e2394b9" + sha256 cellar: :any, ventura: "6995e471fbd7e8f9c3c507e7576ba53a5636fb329a049f61f54494b7b5d9fe2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a598b96cd3fa15c9c028d7c6d86f884ece57ac86feca9939e862b17a14143bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "181bcd364cef78e8be564a42859f3b431febc429fc3db940d5c06bb572493999" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libpng" + + def install + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"qrencode", "123456789", "-o", "test.png" + end +end diff --git a/Formula/q/qrkey.rb b/Formula/q/qrkey.rb new file mode 100644 index 0000000000000..ed81db2f4abe9 --- /dev/null +++ b/Formula/q/qrkey.rb @@ -0,0 +1,30 @@ +class Qrkey < Formula + desc "Generate and recover QR codes from files for offline private key backup" + homepage "https://github.com/Techwolf12/qrkey" + url "https://github.com/Techwolf12/qrkey/archive/refs/tags/v0.0.1.tar.gz" + sha256 "7c1777245e44014d53046383a96c1ee02b3ac1a4b014725a61ae707a79b7e82d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e5a04be8111567d2c19eb01cb0fd762ddd6056c47bfe78bcf3679d1f738b899" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb0fc3c4115102c6544d9f753c2e16dba1533314099ff50385b7442689b378a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb0fc3c4115102c6544d9f753c2e16dba1533314099ff50385b7442689b378a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb0fc3c4115102c6544d9f753c2e16dba1533314099ff50385b7442689b378a4" + sha256 cellar: :any_skip_relocation, sonoma: "7d9d690e34e9d67f33134a59820b1c3d7936cf0c8b33e0f0297c58b0c7a25520" + sha256 cellar: :any_skip_relocation, ventura: "7d9d690e34e9d67f33134a59820b1c3d7936cf0c8b33e0f0297c58b0c7a25520" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa36d7f2c17914c7c27abb0854d381500385630ca14a0167df6042f7ddae198d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d151a47fbbc11d37a7e9613ecd6d9e0427ac8a54134cdd74e18d32f69b2dba9e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + generate_completions_from_executable(bin/"qrkey", "completion") + end + + test do + system bin/"qrkey", "generate", "--in", test_fixtures("test.jpg"), "--out", "generated.pdf" + assert_path_exists testpath/"generated.pdf" + end +end diff --git a/Formula/q/qrtool.rb b/Formula/q/qrtool.rb new file mode 100644 index 0000000000000..30a45e63a4e1d --- /dev/null +++ b/Formula/q/qrtool.rb @@ -0,0 +1,38 @@ +class Qrtool < Formula + desc "Utility for encoding or decoding QR code" + homepage "https://sorairolake.github.io/qrtool/book/index.html" + url "https://github.com/sorairolake/qrtool/archive/refs/tags/v0.13.1.tar.gz" + sha256 "3271127e2be7ef3e51cd22648b5f6168e1da00d19cd4b35c1b752029be08d41a" + license all_of: [ + "CC-BY-4.0", + any_of: ["Apache-2.0", "MIT"], + ] + head "https://github.com/sorairolake/qrtool.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae622c06212700aca23dc02eb547ad048d725ce0362abb75ed7f05c8006d62e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c96a940b830ad2e0ac5f8ff3170d8c94596c521a67383337a42c0a4e5567bc9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "249ed7ff901645e8a7c9b6ff7ff260e2bacb7f0056a738f498fe3f19123ebe01" + sha256 cellar: :any_skip_relocation, sonoma: "a2da0b6b354049c0d4a11e0ee10735e8ca8e352f2a0e1523a1303598c2e8a83d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d1ce21be8979eb1680030361a86a40353ff9c106231f9bb506c68d7d5e6c7cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66167709896dbc309226f03f81d8db56b29b259aad013c520b0569bbd38be7bb" + end + + depends_on "asciidoctor" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"qrtool", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + + system "asciidoctor", "-b", "manpage", "docs/man/man1/*.1.adoc" + man1.install Dir["docs/man/man1/*.1"] + end + + test do + (testpath/"output.png").write shell_output("#{bin}/qrtool encode 'QR code'") + assert_path_exists testpath/"output.png" + assert_equal "QR code", shell_output("#{bin}/qrtool decode output.png") + end +end diff --git a/Formula/q/qrupdate.rb b/Formula/q/qrupdate.rb new file mode 100644 index 0000000000000..a3a3d4edd98b2 --- /dev/null +++ b/Formula/q/qrupdate.rb @@ -0,0 +1,62 @@ +class Qrupdate < Formula + desc "Fast updates of QR and Cholesky decompositions" + homepage "https://sourceforge.net/projects/qrupdate/" + url "https://downloads.sourceforge.net/project/qrupdate/qrupdate/1.2/qrupdate-1.1.2.tar.gz" + sha256 "e2a1c711dc8ebc418e21195833814cb2f84b878b90a2774365f0166402308e08" + license "GPL-3.0-or-later" + revision 15 + + livecheck do + url :stable + regex(%r{url=.*?/qrupdate[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "06f87282b23c5f3cec4efedea8259122807837de4e2fa0928ca380a69357ab74" + sha256 cellar: :any, arm64_sequoia: "5ea96ebb5b0af96ca5976f5c0a188c772eadc46fa52edb44cdb89f3d2e69436c" + sha256 cellar: :any, arm64_sonoma: "30d96fead1ad674156f1ca3121c2c5df27f3a2e42d226425ca6f83554628a86b" + sha256 cellar: :any, arm64_ventura: "883c11e84b2dcdd6ed46344697e8363a2c61e68d26aa6439d4684bc1a7abc76b" + sha256 cellar: :any, arm64_monterey: "c8c154ece840edeeb4b4d0fe76383b60177ada3a525d96a124dc3fac80d9ae34" + sha256 cellar: :any, arm64_big_sur: "349ff7a34aacf021f8df3d129fa7e8897bd1b87a41d7df6b270fa98d73039ab4" + sha256 cellar: :any, sonoma: "117263ab5d0be7513bd9f5eebf3f32abfce63fcee8e5b3cfbd43d3325943a99b" + sha256 cellar: :any, ventura: "eae9333e11a79c651d8313e0b9c969c104a083edc3f6c835d484b10394f1f32b" + sha256 cellar: :any, monterey: "20e6d9ac347bc1903177aa5273e25ac2fd1f6dd56211e4170d46741ebdbd0b4d" + sha256 cellar: :any, big_sur: "12240dfe307818f58b11e495c81258979570e55640173382d3be77e39ee8dd0a" + sha256 cellar: :any, catalina: "b5a26e72c3d49e5b8b70432c11c93ffb392325c4a8a16cce2497b203bd23559d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b06dc5dc420eec5a92256e31369688142112ce6c5ddf4b4bb07c638fe8e7f62" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf21846969fac2323ea2d8762b04c7f090bb0d9092c98636a853c50aaab49230" + end + + depends_on "gcc" # for gfortran + depends_on "openblas" + + def install + # Parallel compilation not supported. Reported on 2017-07-21 at + # https://sourceforge.net/p/qrupdate/discussion/905477/thread/d8f9c7e5/ + ENV.deparallelize + + system "make", "lib", "solib", + "BLAS=-L#{Formula["openblas"].opt_lib} -lopenblas" + + # Confuses "make install" on case-insensitive filesystems + rm "INSTALL" + + # BSD "install" does not understand GNU -D flag. + # Create the parent directory ourselves. + inreplace "src/Makefile", "install -D", "install" + lib.mkpath + + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install "test/tch1dn.f", "test/utils.f" + end + + test do + system "gfortran", "-o", "test", pkgshare/"tch1dn.f", pkgshare/"utils.f", + "-fallow-argument-mismatch", + "-L#{lib}", "-lqrupdate", + "-L#{Formula["openblas"].opt_lib}", "-lopenblas" + assert_match "PASSED 4 FAILED 0", shell_output("./test") + end +end diff --git a/Formula/q/qscintilla2.rb b/Formula/q/qscintilla2.rb new file mode 100644 index 0000000000000..3c986566ff7db --- /dev/null +++ b/Formula/q/qscintilla2.rb @@ -0,0 +1,130 @@ +class Qscintilla2 < Formula + desc "Port to Qt of the Scintilla editing component" + homepage "https://www.riverbankcomputing.com/software/qscintilla/intro" + url "https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.14.1/QScintilla_src-2.14.1.tar.gz" + sha256 "dfe13c6acc9d85dfcba76ccc8061e71a223957a6c02f3c343b30a9d43a4cdd4d" + license "GPL-3.0-only" + revision 5 + + # The downloads page also lists pre-release versions, which use the same file + # name format as stable versions. The only difference is that files for + # stable versions are kept in corresponding version subdirectories and + # pre-release files are in the parent QScintilla directory. The regex below + # omits pre-release versions by only matching tarballs in a version directory. + livecheck do + url "https://www.riverbankcomputing.com/software/qscintilla/download" + regex(%r{href=.*?QScintilla/v?\d+(?:\.\d+)+/QScintilla(?:[._-](?:gpl|src))?[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a4ce4700e5e688b9b0b60890459a3793fc53e8cbaf27884f9ba88e94fa719515" + sha256 cellar: :any, arm64_sequoia: "27499e5e9430c801ac7265f06845ccc56d6669f1626fab44a16f1b7aec80d61b" + sha256 cellar: :any, arm64_sonoma: "02d7ea7c1097a24289133b376012cc1592b395c6dd6bae358491de18a2c89d0d" + sha256 cellar: :any, sonoma: "d31a27c30e7b08f0635bb310d7f585de74a99d41f31705cb3ab3bf6b9f921cdb" + sha256 cellar: :any_skip_relocation, arm64_linux: "72fdcaf8876a39d1d6f68eb1cc46377fb444d4850fdec6e86e7658a16579bff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "388eef42d4cde7ec7ebd053bea92d3fae910ba2aff0167644b0b14bc3428e28f" + end + + depends_on "pyqt" => [:build, :test] + depends_on "pyqt-builder" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "qtbase" + + def python3 + "python3.14" + end + + def install + args = %w[-config release] + if OS.mac? + spec = (ENV.compiler == :clang) ? "macx-clang" : "macx-g++" + args += %W[-spec #{spec}] + end + + pyqt = Formula["pyqt"] + qt = Formula["qtbase"] + site_packages = Language::Python.site_packages(python3) + + cd "src" do + inreplace "qscintilla.pro" do |s| + s.gsub! "QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET)", + "QMAKE_POST_LINK += install_name_tool -id #{lib}/$(TARGET1) $(TARGET)" + s.gsub! "$$[QT_INSTALL_LIBS]", lib + s.gsub! "$$[QT_INSTALL_HEADERS]", include + s.gsub! "$$[QT_INSTALL_TRANSLATIONS]", share/"qt/translations" + s.gsub! "$$[QT_INSTALL_DATA]", share/"qt" + s.gsub! "$$[QT_HOST_DATA]", share/"qt" + end + + inreplace "features/qscintilla2.prf" do |s| + s.gsub! "$$[QT_INSTALL_LIBS]", lib + s.gsub! "$$[QT_INSTALL_HEADERS]", include + end + + system qt.opt_bin/"qmake", "qscintilla.pro", *args + system "make" + system "make", "install" + end + + cd "Python" do + mv "pyproject-qt#{qt.version.major}.toml", "pyproject.toml" + (buildpath/"Python/pyproject.toml").append_lines <<~TOML + [tool.sip.project] + sip-include-dirs = ["#{pyqt.opt_prefix/site_packages}/PyQt#{pyqt.version.major}/bindings"] + TOML + + args = %W[ + --target-dir #{prefix/site_packages} + --qsci-features-dir #{share}/qt/mkspecs/features + --qsci-include-dir #{include} + --qsci-library-dir #{lib} + --api-dir #{share}/qt/qsci/api/python + ] + system Formula["pyqt-builder"].opt_libexec/"bin/sip-install", *args + end + end + + def caveats + "You will need to `brew install pyqt` to use the Python bindings." + end + + test do + (testpath/"test.pro").write <<~QMAKE + CONFIG += qscintilla2 sdk_no_version_check + CONFIG -= app_bundle + SOURCES = test.cpp + QMAKE + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(int argc, char *argv[]) { + QApplication app(argc, argv); + QsciScintilla test; + test.setText("homebrew"); + std::cout << test.text().toStdString(); + return 0; + } + CPP + + ENV.delete "CPATH" if OS.mac? + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system Formula["qtbase"].bin/"qmake" + system "make" + assert_equal "homebrew", shell_output("./test") + + pyqt = Formula["pyqt"] + (testpath/"test.py").write <<~PYTHON + import PyQt#{pyqt.version.major}.Qsci + assert("QsciLexer" in dir(PyQt#{pyqt.version.major}.Qsci)) + PYTHON + + system python3, "test.py" + end +end diff --git a/Formula/q/qshell.rb b/Formula/q/qshell.rb new file mode 100644 index 0000000000000..3c25b9a3f5321 --- /dev/null +++ b/Formula/q/qshell.rb @@ -0,0 +1,39 @@ +class Qshell < Formula + desc "Shell Tools for Qiniu Cloud" + homepage "https://github.com/qiniu/qshell" + url "https://github.com/qiniu/qshell/archive/refs/tags/v2.16.1.tar.gz" + sha256 "40748fe8f194111e94bc6cc483c71f19c07575133e8d356df06d47d67fa4e8c6" + license "MIT" + head "https://github.com/qiniu/qshell.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "725516a913241331f9c939e90770a76275d62d00d815aad709881f6e2cce3a01" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d40bdded5fa597ae35519b8c1d130d9fdd2ba831b8b7607ca3c892a4d98df63a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d40bdded5fa597ae35519b8c1d130d9fdd2ba831b8b7607ca3c892a4d98df63a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d40bdded5fa597ae35519b8c1d130d9fdd2ba831b8b7607ca3c892a4d98df63a" + sha256 cellar: :any_skip_relocation, sonoma: "fb202dbbeefd821950a549a7bfa5f60e90ff33795752d426ed063f98fe2242a9" + sha256 cellar: :any_skip_relocation, ventura: "fb202dbbeefd821950a549a7bfa5f60e90ff33795752d426ed063f98fe2242a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2203a9d4c63cdc004b8928ea709877a8f1eae2756b0713eb2cfd9e0453de7ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7c7b373ea3d5ca50d4e48d844aebece5ea22a4d959a02833822e1a14915d17c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/qiniu/qshell/v2/iqshell/common/version.version=v#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./main" + generate_completions_from_executable(bin/"qshell", "completion") + end + + test do + output = shell_output "#{bin}/qshell -v" + assert_match "qshell version v#{version}", output + + # Test base64 encode of string "abc" + output2 = shell_output "#{bin}/qshell b64encode abc" + assert_match "YWJj", output2 + end +end diff --git a/Formula/q/qsoas.rb b/Formula/q/qsoas.rb new file mode 100644 index 0000000000000..4d8702d3abd0e --- /dev/null +++ b/Formula/q/qsoas.rb @@ -0,0 +1,72 @@ +class Qsoas < Formula + desc "Versatile software for data analysis" + homepage "https://bip.cnrs.fr/groups/bip06/software/" + url "https://bip.cnrs.fr/wp-content/uploads/qsoas/qsoas-3.3.tar.gz" + mirror "https://web.archive.org/web/20250919084255/https://bip.cnrs.fr/wp-content/uploads/qsoas/qsoas-3.3.tar.gz" + sha256 "c5a701dfed23c682892479b43b92aac79a7db5ceb9ed6b6cd0a41129d2690492" + license "GPL-2.0-only" + revision 1 + + # The upstream server has an incomplete certificate chain, producing a + # curl error on Linux (`(60) SSL certificate problem: unable to get local + # issuer certificate`). This check can still work on macOS but we can't add + # this formula to the autoump list until this is resolved. + livecheck do + url "https://bip.cnrs.fr/groups/bip06/software/downloads/" + regex(/href=.*?qsoas[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7b91bd04e345e0cc279acb813e24a5b55cae526ca6df690095b800407e09e1cb" + sha256 cellar: :any, arm64_sequoia: "709468b0dea8e5700fadd12d2613a64af895204a3b7dfbf48da4fe6239ed7fb6" + sha256 cellar: :any, arm64_sonoma: "59cf34ad9e7db06d2e7e6d68dd60d12ba6f7a1b1818a322ac866f4895a0e3af8" + sha256 cellar: :any, arm64_ventura: "1aa8ad3b027fa61914688ca5857cd9ef030fa2d3e07a7555d06479f429d29691" + sha256 cellar: :any, arm64_monterey: "25cd57d44b1e89044e1da640288bc33a511cadb10659137d2bb71f38b2d74b3d" + sha256 cellar: :any, sonoma: "8bd41179d0dcd078ac4731c5edc181352cdd6f639d49ee082b0cbab9a9c00f88" + sha256 cellar: :any, ventura: "6d3850245479bad8b493a9ffd52cca5e382dcc899fec0382dbcda96790e8f350" + sha256 cellar: :any, monterey: "751f9a7fda93b3193f2fb8c3118c79ec52bbaba6c95e0420b0ca981ac78cfdb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "f724e65ae8751e271e8e9c45737d33bc7fca1b9992e904fdf53dd83afb0bd87c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d99b2b0c412e82eb58102d3722c32b5629773334ac81996ee6d4e58f0dffef3" + end + + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "bison" => :build + depends_on "gsl" + depends_on "mruby" + depends_on "qt@5" + + uses_from_macos "ruby" + + def install + # Workaround for MRuby 3.4.0 and to avoid C standard passed to C++ compiler + # Issue ref: https://github.com/fourmond/QSoas/issues/5 + inreplace "src/mruby.cc", "(OP_LOADI,", "(OP_LOADI8," + inreplace "QSoas.pro", "mruby-config --cflags)", "mruby-config --cxxflags)" + + gsl = Formula["gsl"].opt_prefix + qt5 = Formula["qt@5"].opt_prefix + + system "#{qt5}/bin/qmake", "MRUBY_DIR=#{Formula["mruby"].opt_prefix}", + "GSL_DIR=#{gsl}/include", + "QMAKE_LFLAGS=-L#{libexec}/lib -L#{gsl}/lib" + system "make" + + if OS.mac? + prefix.install "QSoas.app" + bin.write_exec_script "#{prefix}/QSoas.app/Contents/MacOS/QSoas" + else + bin.install "QSoas" + end + end + + test do + # Set QT_QPA_PLATFORM to minimal to avoid error "qt.qpa.xcb: could not connect to display" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_match "mfit-linear-kinetic-system", + shell_output("#{bin}/QSoas --list-commands") + end +end diff --git a/Formula/q/qstat.rb b/Formula/q/qstat.rb new file mode 100644 index 0000000000000..92533061ef5eb --- /dev/null +++ b/Formula/q/qstat.rb @@ -0,0 +1,41 @@ +class Qstat < Formula + desc "Query Quake servers from the command-line" + homepage "https://github.com/Unity-Technologies/qstat" + url "https://github.com/Unity-Technologies/qstat/archive/refs/tags/v2.17.tar.gz" + sha256 "ff0a050e867ad1d6fdf6b5d707e2fc7aea2826b8a382321220b390c621fb1562" + license "Artistic-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "588775a7cf8278e02f0a64a1567357dc445ac85016bc356a04715cdbf2cce1c3" + sha256 arm64_sequoia: "bcce7c206dbb478fe19b9e6560c5c480d613fefeab90d30c0720b5e24ddb0090" + sha256 arm64_sonoma: "f2a21de14cf56f81071c54f323b70b96d745203b3e7cc4343e3b49e9ca683dfa" + sha256 arm64_ventura: "11a9a33fc7615e85441444af37ed41d87f0659f672d958824f7cca77eacd2729" + sha256 arm64_monterey: "407570a7c868ec0815588e1b2c5ed8716b1392bc7452fcc31ab1b16f217febaf" + sha256 arm64_big_sur: "381072b9472ed1ab8a8f0d7409571262555d33da9d02f3ccdabc117bc9d6a6c5" + sha256 sonoma: "df87597a43685ed18dda22fdd04a08e04c41565ebcc52d2673623baf7a2aa6d8" + sha256 ventura: "288eff7f500462b9adcc7e3704fdd2b07ce5853830adfa9d246aa67ff1411df3" + sha256 monterey: "1e7728d7b8689eec71c2285e3c1595180a985f6d44d32d6452df62da33ab4bab" + sha256 big_sur: "e7620697e587b4e46f1f0a1558e2fb9a1dee96c289958ea54269cf7321197d26" + sha256 catalina: "c8308182a8669cd883eca05230d449aaeb0026bb47bd4b1a2d420a34b6051549" + sha256 arm64_linux: "840e11f9ea6d01948439c85e05405e382d236b93d256119716623ebe1e6c55f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed20930d202d32949a50b610cf9897ee8d33e3fcea72de224ef1815827c55e70" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "autoupdate" unless OS.mac? + system "./autogen.sh" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"qstat", "--help" + end +end diff --git a/Formula/q/qsv.rb b/Formula/q/qsv.rb new file mode 100644 index 0000000000000..d1e8d247a1949 --- /dev/null +++ b/Formula/q/qsv.rb @@ -0,0 +1,54 @@ +class Qsv < Formula + desc "Ultra-fast CSV data-wrangling toolkit" + homepage "https://qsv.dathere.com/" + url "https://github.com/dathere/qsv/archive/refs/tags/9.1.0.tar.gz" + sha256 "86af23420dd97862524cb4c1a2c15b56aa2153ac4a7a0c6025a5d40cb4bfe873" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/dathere/qsv.git", branch: "master" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "124b9f703644340f3e8bac4b785fdef9dd20d3d8a84fab1f239ea5852f3e17ad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3ae032c2ebcef35fc11a0641e20cf7e824cbd070dbccd4a05dd75afd4884675b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea2dcdb2d20ef0a6e5724c426bf338b9f6a96dad5d0bc0f302a2558845882466" + sha256 cellar: :any_skip_relocation, sonoma: "eb54ff79572e2763d2027406e974cd42a63df8989eee61f75bc4d0cf20af7e4e" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2832eb5387e52571afc5d07a040dbd5be6a25b39fb1bd112636495f3115e589" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1235e00687b542834afdd8dddc16af55d5b34f2ea729216e0909754478faaa22" + end + + depends_on "cmake" => :build # for libz-ng-sys + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "libmagic" + end + + def install + # Use explicit CPU target instead of "native" to avoid brittle behavior + # see discussion at https://github.com/briansmith/ring/discussions/2528#discussioncomment-13196576 + ENV.append_to_rustflags "-C target-cpu=apple-m1" if OS.mac? && Hardware::CPU.arm? + + system "cargo", "install", *std_cargo_args, "--features", "apply,lens,luau,feature_capable" + bash_completion.install "contrib/completions/examples/qsv.bash" => "qsv" + fish_completion.install "contrib/completions/examples/qsv.fish" + zsh_completion.install "contrib/completions/examples/qsv.zsh" => "_qsv" + pwsh_completion.install "contrib/completions/examples/qsv.ps1" => "qsv" + end + + test do + (testpath/"test.csv").write("first header,second header") + assert_equal <<~EOS, shell_output("#{bin}/qsv stats test.csv") + field,type,is_ascii,sum,min,max,range,sort_order,sortiness,min_length,max_length,sum_length,avg_length,stddev_length,variance_length,cv_length,mean,sem,geometric_mean,harmonic_mean,stddev,variance,cv,nullcount,max_precision,sparsity + first header,NULL,,,,,,,,,,,,,,,,,,,,,,0,, + second header,NULL,,,,,,,,,,,,,,,,,,,,,,0,, + EOS + end +end diff --git a/Formula/q/qt-libiodbc.rb b/Formula/q/qt-libiodbc.rb new file mode 100644 index 0000000000000..895b8806228e3 --- /dev/null +++ b/Formula/q/qt-libiodbc.rb @@ -0,0 +1,97 @@ +class QtLibiodbc < Formula + desc "Qt SQL Database Driver" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e58c533025f682ab28db1f89b4d387adde80ffd79c50cbec4e309d62519f216d" + sha256 cellar: :any, arm64_sequoia: "4ccdf342b8c7337adfee162e55019309d4881488d9ca82d8c09bfc8188e0a33c" + sha256 cellar: :any, arm64_sonoma: "b82851f36abd77784695c2454222fd0acbe639e91175fa4d36c9400d9f8294a3" + sha256 cellar: :any, sonoma: "48dc97a37314f751e4a622a4e61e01636951dcad7ea5a8acfab52395309477f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "82e925c9dde82537e90048962eee0539c83b16ffe22f91aa1057c0b18635e18c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4486a9c6a15694766d15887f3e6f888932fccea893b7977d4615aff95316d4e7" + end + + depends_on "cmake" => [:build, :test] + + depends_on "libiodbc" + depends_on "qtbase" + + conflicts_with "qt-unixodbc", + because: "qt-unixodbc and qt-libiodbc install the same binaries" + + def install + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_sql_ibase=OFF + -DFEATURE_sql_mysql=OFF + -DFEATURE_sql_oci=OFF + -DFEATURE_sql_odbc=ON + -DFEATURE_sql_psql=OFF + -DFEATURE_sql_sqlite=OFF + -DQT_GENERATE_SBOM=OFF + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", "src/plugins/sqldrivers", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 COMPONENTS Core Sql REQUIRED) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core Qt6::Sql) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + QCoreApplication::addLibraryPath("#{share}/qt/plugins"); + QCoreApplication a(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); + assert(db.isValid()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug" + system "cmake", "--build", "build" + system "./build/test" + + ENV.delete "CPATH" + system "qmake" + system "make" + system "./test" + end +end diff --git a/Formula/q/qt-mariadb.rb b/Formula/q/qt-mariadb.rb new file mode 100644 index 0000000000000..6d0858ec3dcd2 --- /dev/null +++ b/Formula/q/qt-mariadb.rb @@ -0,0 +1,97 @@ +class QtMariadb < Formula + desc "Qt SQL Database Driver" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8bf1788850de1c6cec6aa1db77a53340d5dcb39c06e4656405ad063fb377bcdc" + sha256 cellar: :any, arm64_sequoia: "8e9eca41a0b17b84d468b04f043259e9515ba0d0a4d1d851b1cf0f55af0956ea" + sha256 cellar: :any, arm64_sonoma: "5f255d8ed571f6bc636303d9d125e4e2c0ceeb739fdf5c2b8b2baf39d89c48d9" + sha256 cellar: :any, sonoma: "de0dc48006e82698892b108199782fecaf51fd3c2564cd7f24f195b91e14b428" + sha256 cellar: :any_skip_relocation, arm64_linux: "59e21db9adbe41790b543341bcf70a73669eb3a886783b774e802839466afdbc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ea7baba2dbba72d8a457901a22a6750095a3edfd57a681815a4a3697ba6366b" + end + + depends_on "cmake" => [:build, :test] + + depends_on "mariadb" + depends_on "qtbase" + + conflicts_with "qt-mysql", "qt-percona-server", + because: "qt-mysql, qt-mariadb, and qt-percona-server install the same binaries" + + def install + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_sql_ibase=OFF + -DFEATURE_sql_mysql=ON + -DFEATURE_sql_oci=OFF + -DFEATURE_sql_odbc=OFF + -DFEATURE_sql_psql=OFF + -DFEATURE_sql_sqlite=OFF + -DQT_GENERATE_SBOM=OFF + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", "src/plugins/sqldrivers", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 COMPONENTS Core Sql REQUIRED) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core Qt6::Sql) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + QCoreApplication::addLibraryPath("#{share}/qt/plugins"); + QCoreApplication a(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QMARIADB"); + assert(db.isValid()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug" + system "cmake", "--build", "build" + system "./build/test" + + ENV.delete "CPATH" + system "qmake" + system "make" + system "./test" + end +end diff --git a/Formula/q/qt-mysql.rb b/Formula/q/qt-mysql.rb new file mode 100644 index 0000000000000..3adc9bc4eed57 --- /dev/null +++ b/Formula/q/qt-mysql.rb @@ -0,0 +1,97 @@ +class QtMysql < Formula + desc "Qt SQL Database Driver" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "40a0ca101e970f1d964a20ea27b2b265e7bbff20d18fe2c496e0a378e0d8a933" + sha256 cellar: :any, arm64_sequoia: "cb39625e7ecc3d831816a78ded763f008b17638f06a6b805ff073f1af0a7c25d" + sha256 cellar: :any, arm64_sonoma: "5e657faa6c8719a3ec947b74be625ab0aa69fa8cfa300ae9abeddd7fdfe27651" + sha256 cellar: :any, sonoma: "4eb26a9b9cc88ebb0a67577fb709b5a6695e545eca42f4031b9a04551e11bd5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1cba2d622571e3a5bf15d541102f60280ea2dd7d6d20b6588ddec79397b2f4ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d512ed74acd9d1509d6d0e9ee829ca01cdb0e4d2ce96904a1a0c196587e3ad3e" + end + + depends_on "cmake" => [:build, :test] + + depends_on "mysql" + depends_on "qtbase" + + conflicts_with "qt-mariadb", "qt-percona-server", + because: "qt-mysql, qt-mariadb, and qt-percona-server install the same binaries" + + def install + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_sql_ibase=OFF + -DFEATURE_sql_mysql=ON + -DFEATURE_sql_oci=OFF + -DFEATURE_sql_odbc=OFF + -DFEATURE_sql_psql=OFF + -DFEATURE_sql_sqlite=OFF + -DQT_GENERATE_SBOM=OFF + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", "src/plugins/sqldrivers", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 COMPONENTS Core Sql REQUIRED) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core Qt6::Sql) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + QCoreApplication::addLibraryPath("#{share}/qt/plugins"); + QCoreApplication a(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); + assert(db.isValid()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug" + system "cmake", "--build", "build" + system "./build/test" + + ENV.delete "CPATH" + system "qmake" + system "make" + system "./test" + end +end diff --git a/Formula/q/qt-percona-server.rb b/Formula/q/qt-percona-server.rb new file mode 100644 index 0000000000000..0e26cdab19c0e --- /dev/null +++ b/Formula/q/qt-percona-server.rb @@ -0,0 +1,102 @@ +class QtPerconaServer < Formula + desc "Qt SQL Database Driver" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c61120bbce4d1c610981c891d46b533b91f9f42f25bfb713cffb38754e36f143" + sha256 cellar: :any, arm64_sequoia: "e893f07fe1dd3f2629860adcb6c586c7c374eb5ee0a49cbcefa3e7611cd450dc" + sha256 cellar: :any, arm64_sonoma: "0f47f8f4315aab469775a83936d5b1ad402b504f01cd49acb3b1943352545601" + sha256 cellar: :any, sonoma: "4cee6a48c6d924b15692d2671a935092794f436a578ee0c3658115eb708ad9db" + sha256 cellar: :any_skip_relocation, arm64_linux: "958597e0a036bd75841a2d7ea4ae0c5c02338dcb83d255f65f4c2f845b20dcf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b75b67d199de55822c1cf2ec3c2302a6de15985a5b6f4c38c74bb90993c501d" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => :build + + depends_on "percona-server" + depends_on "qtbase" + + conflicts_with "qt-mysql", "qt-mariadb", + because: "qt-mysql, qt-mariadb, and qt-percona-server install the same binaries" + + def install + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_sql_ibase=OFF + -DFEATURE_sql_mysql=ON + -DFEATURE_sql_oci=OFF + -DFEATURE_sql_odbc=OFF + -DFEATURE_sql_psql=OFF + -DFEATURE_sql_sqlite=OFF + -DMySQL_LIBRARY=#{Formula["percona-server"].opt_lib/shared_library("libperconaserverclient")} + -DQT_GENERATE_SBOM=OFF + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + # Workaround for missing libraries failure in CI dependent tests when `percona-server` + # is unlinked due to conflict handling but not re-linked before linkage test + args << "-DCMAKE_INSTALL_RPATH=#{Formula["percona-server"].opt_lib}" if OS.linux? + + system "cmake", "-S", "src/plugins/sqldrivers", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.16.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 COMPONENTS Core Sql REQUIRED) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core Qt6::Sql) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core sql + QT -= gui + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + QCoreApplication::addLibraryPath("#{share}/qt/plugins"); + QCoreApplication a(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); + assert(db.isValid()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "-DCMAKE_BUILD_TYPE=Debug", testpath + system "make" + system "./test" + + ENV.delete "CPATH" + system "qmake" + system "make" + system "./test" + end +end diff --git a/Formula/q/qt-postgresql.rb b/Formula/q/qt-postgresql.rb new file mode 100644 index 0000000000000..38164b3d44d8f --- /dev/null +++ b/Formula/q/qt-postgresql.rb @@ -0,0 +1,94 @@ +class QtPostgresql < Formula + desc "Qt SQL Database Driver" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5c96761b2e7ea442c538ef760ad7893a313187c8574360091b250799b39aca53" + sha256 cellar: :any, arm64_sequoia: "b6fdcec3879066e1cc49c1ad127113fcbd4d9c1a92e5b3fa03417beb4fced52f" + sha256 cellar: :any, arm64_sonoma: "d5c958fcd10ccc5a9ee939c0acb41a3146ea9d84778a8f359799bd5e70585a4e" + sha256 cellar: :any, sonoma: "0d8111f52bcae4f7c652732e24b1a70c189d4e3599969eee8462390ff4cf0e70" + sha256 cellar: :any_skip_relocation, arm64_linux: "639e79e14909e6882777096b570d81fad50462c8969a988e9744d0ad6bae097c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1470a5add576b606c151e82fcaa04318a58245e46d9104f9a3bb9d0504543f8" + end + + depends_on "cmake" => [:build, :test] + + depends_on "libpq" + depends_on "qtbase" + + def install + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_sql_ibase=OFF + -DFEATURE_sql_mysql=OFF + -DFEATURE_sql_oci=OFF + -DFEATURE_sql_odbc=OFF + -DFEATURE_sql_psql=ON + -DFEATURE_sql_sqlite=OFF + -DQT_GENERATE_SBOM=OFF + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", "src/plugins/sqldrivers", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 COMPONENTS Core Sql REQUIRED) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core Qt6::Sql) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + QCoreApplication::addLibraryPath("#{share}/qt/plugins"); + QCoreApplication a(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL"); + assert(db.isValid()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug" + system "cmake", "--build", "build" + system "./build/test" + + ENV.delete "CPATH" + system "qmake" + system "make" + system "./test" + end +end diff --git a/Formula/q/qt-unixodbc.rb b/Formula/q/qt-unixodbc.rb new file mode 100644 index 0000000000000..38f8fe4b66b99 --- /dev/null +++ b/Formula/q/qt-unixodbc.rb @@ -0,0 +1,97 @@ +class QtUnixodbc < Formula + desc "Qt SQL Database Driver" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1589d4a98b18cf52d15a61dace7830fcd03d6211f69b64e1b0c4863768e6d8c5" + sha256 cellar: :any, arm64_sequoia: "1b5461acec7bba9750afa1b51ef716925c4ff20d09964752492adbce9f500682" + sha256 cellar: :any, arm64_sonoma: "5fabce420fa3ed6a8d5021867eaaeb9b3f9e34d0dff991ced59092dd0bed52c0" + sha256 cellar: :any, sonoma: "1d1036ee7ba9efad7060650522a428d46245b69adeaab8458ca81620ae72e736" + sha256 cellar: :any_skip_relocation, arm64_linux: "de6b1187ab26141901825b1c538d2f3347c09cb3083e21afc98e26029172dbf1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e86a8aaf55ee4bce3c938528d25666bc1fb980cca69953d714d18dd4c2ebfa5" + end + + depends_on "cmake" => [:build, :test] + + depends_on "qtbase" + depends_on "unixodbc" + + conflicts_with "qt-libiodbc", + because: "qt-unixodbc and qt-libiodbc install the same binaries" + + def install + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_sql_ibase=OFF + -DFEATURE_sql_mysql=OFF + -DFEATURE_sql_oci=OFF + -DFEATURE_sql_odbc=ON + -DFEATURE_sql_psql=OFF + -DFEATURE_sql_sqlite=OFF + -DQT_GENERATE_SBOM=OFF + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", "src/plugins/sqldrivers", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 COMPONENTS Core Sql REQUIRED) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core Qt6::Sql) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + int main(int argc, char *argv[]) + { + QCoreApplication::addLibraryPath("#{share}/qt/plugins"); + QCoreApplication a(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); + assert(db.isValid()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug" + system "cmake", "--build", "build" + system "./build/test" + + ENV.delete "CPATH" + system "qmake" + system "make" + system "./test" + end +end diff --git a/Formula/q/qt.rb b/Formula/q/qt.rb new file mode 100644 index 0000000000000..a471837433062 --- /dev/null +++ b/Formula/q/qt.rb @@ -0,0 +1,230 @@ +class Qt < Formula + desc "Cross-platform application and UI framework" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/md5sums.txt" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/md5sums.txt" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/md5sums.txt" + version "6.9.3" + sha256 "6da59a97380cfb2dd7e93c8172e794f2cc2ccc6ab29620689932ee3b8169c964" + license all_of: [ + "BSD-3-Clause", + "GFDL-1.3-no-invariants-only", + "GPL-2.0-only", + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + "LGPL-3.0-only", + ] + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a7a8f4d26c4a05521c4710b9344bc4bdb1b7e17af9aecf865a7568c054d2828f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a7a8f4d26c4a05521c4710b9344bc4bdb1b7e17af9aecf865a7568c054d2828f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7a8f4d26c4a05521c4710b9344bc4bdb1b7e17af9aecf865a7568c054d2828f" + sha256 cellar: :any_skip_relocation, sonoma: "a7a8f4d26c4a05521c4710b9344bc4bdb1b7e17af9aecf865a7568c054d2828f" + sha256 cellar: :any_skip_relocation, arm64_linux: "99d36053c1ce8a9c612ccfb86dc14de602e8c52d5971a9cba72616409ebb94ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "871c7faf37bbad450a86c91ca3201123d152d8decc879041193f5b5af07633a5" + end + + depends_on "cmake" => :test + depends_on "pkgconf" => :test + depends_on "vulkan-headers" => :test + + depends_on "qt3d" + depends_on "qt5compat" + depends_on "qtbase" + depends_on "qtcharts" + depends_on "qtconnectivity" + depends_on "qtdatavis3d" + depends_on "qtdeclarative" + depends_on "qtgraphs" + depends_on "qtgrpc" + depends_on "qthttpserver" + depends_on "qtimageformats" + depends_on "qtlanguageserver" + depends_on "qtlocation" + depends_on "qtlottie" + depends_on "qtmultimedia" + depends_on "qtnetworkauth" + depends_on "qtpositioning" + depends_on "qtquick3d" + depends_on "qtquick3dphysics" + depends_on "qtquickeffectmaker" + depends_on "qtquicktimeline" + depends_on "qtremoteobjects" + depends_on "qtscxml" + depends_on "qtsensors" + depends_on "qtserialbus" + depends_on "qtserialport" + depends_on "qtshadertools" + depends_on "qtspeech" + depends_on "qtsvg" + depends_on "qttools" + depends_on "qttranslations" + depends_on "qtvirtualkeyboard" + depends_on "qtwebchannel" + depends_on "qtwebsockets" + + on_sonoma :or_newer do + depends_on "qtwebengine" + depends_on "qtwebview" + end + + on_linux do + depends_on "qtwayland" + + # TODO: Add dependencies on all Linux when `qtwebengine` is bottled on arm64 Linux + on_intel do + depends_on "qtwebengine" + depends_on "qtwebview" + end + end + + def webengine_supported? + on_sonoma :or_newer do + return true + end + on_linux do + on_intel do + return true + end + end + false + end + + def install + # Check for any new formulae that need to be created before bottling + if build.bottle? + submodules = File.read("md5sums.txt").scan(/^\h+[ \t]+(\S+)-everywhere-src-/i).flatten.to_set + submodules -= ["qtwebengine", "qtwebview"] unless webengine_supported? + submodules.delete("qtwayland") unless OS.linux? + submodules.delete("qtactiveqt") # Windows-only + submodules.delete("qtdoc") # skip HTML documentation + + dep_names = deps.reject(&:test?).to_set(&:name) + missing = submodules - dep_names + odie "Possible new #{Utils.pluralize("formula", missing.count)}: #{missing.join(", ")}" unless missing.empty? + extras = dep_names - submodules + odie "Unexpected #{Utils.pluralize("dependency", extras.count)}: #{extras.join(", ")}" unless extras.empty? + end + + # Create compatibility symlinks so existing usage of `Formula["qt"]` still works. + # These are done pointing to HOMEBREW_PREFIX paths to avoid making `qt` keg-only + # which causes an unwanted caveat message. Anyways, Qt won't work correctly if + # any dependencies are not linked as it is built to find modules in linked path + deps.each do |dep| + next if dep.test? + + formula = dep.to_formula + Find.find(*formula.opt_prefix.glob("{#{Keg.keg_link_directories.join(",")}}")) do |src| + src = Pathname(src) + dst = prefix/src.relative_path_from(formula.opt_prefix) + linked_src = HOMEBREW_PREFIX/src.relative_path_from(formula.opt_prefix) + + # Skip directories that have been symlinked already. We just link all directories + # starting with "Qt", which helps reduce the total number of symlinks by over 90%. + Find.prune if dst.symlink? + + if src.symlink? || src.file? + dst.dirname.install_symlink linked_src + elsif src.directory? && (linked_src.symlink? || src.basename.to_s.start_with?(/qt/i)) + dst.dirname.install_symlink linked_src + Find.prune + end + end + + # Also symlink apps from libexec directories. Need to use ln_s to retain opt path + formula.opt_libexec.glob("*.app") do |app| + libexec.mkpath + ln_s app.relative_path_from(libexec), libexec + end + end + end + + test do + modules = %w[Core Gui Widgets Sql Concurrent 3DCore Svg Quick3D Network NetworkAuth] + modules << "WebEngineCore" if webengine_supported? + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS #{modules.join(" ")}) + qt_standard_project_setup() + qt_add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::#{modules.join(" Qt6::")}) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += #{modules.join(" ").downcase} + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + INCLUDEPATH += #{Formula["vulkan-headers"].opt_include} + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + #include + #include + #include + #include + #include + #include + #{"#include " if webengine_supported?} + #include + + int main(int argc, char *argv[]) + { + QCoreApplication app(argc, argv); + QSvgGenerator generator; + auto *handler = new QOAuthHttpServerReplyHandler(); + delete handler; handler = nullptr; + auto *root = new Qt3DCore::QEntity(); + delete root; root = nullptr; + Q_ASSERT(QSqlDatabase::isDriverAvailable("QSQLITE")); + const auto &list = QImageReader::supportedImageFormats(); + QVulkanInstance inst; + // See https://github.com/actions/runner-images/issues/1779 + // if (!inst.create()) + // qFatal("Failed to create Vulkan instance: %d", inst.errorCode()); + for(const char* fmt:{"bmp", "cur", "gif", + #ifdef __APPLE__ + "heic", "heif", + #endif + "icns", "ico", "jp2", "jpeg", "jpg", "pbm", "pgm", "png", + "ppm", "svg", "svgz", "tga", "tif", "tiff", "wbmp", "webp", + "xbm", "xpm"}) { + Q_ASSERT(list.contains(fmt)); + } + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6#{modules.join(" Qt6")}").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + + # Check QT_INSTALL_PREFIX is HOMEBREW_PREFIX to support split `qt-*` formulae + assert_equal HOMEBREW_PREFIX.to_s, shell_output("#{bin}/qmake -query QT_INSTALL_PREFIX").chomp + end +end diff --git a/Formula/q/qt3d.rb b/Formula/q/qt3d.rb new file mode 100644 index 0000000000000..da7dad2149c83 --- /dev/null +++ b/Formula/q/qt3d.rb @@ -0,0 +1,124 @@ +class Qt3d < Formula + desc "Provides functionality for near-realtime simulation systems" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qt3d-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qt3d-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qt3d-everywhere-src-6.9.3.tar.xz" + sha256 "7e8664ddf21a79d4eeaebf76dddf017ed31142a2df005cf4ac784dff10627fff" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + "MIT", # bundled imgui + ] + head "https://code.qt.io/qt/qt3d.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7c4070b5517cc9d66832b3f9f86a128552326891b12a1d0305a45863a215b559" + sha256 cellar: :any, arm64_sequoia: "f5eadd6340ec9eaff1fe237276ac1c96d92d00418781ce0193c54513ccb86794" + sha256 cellar: :any, arm64_sonoma: "65a561bf7e4b9c141f098989d559b52774f7f333cddc278bcf491a1fd9bc2a8e" + sha256 cellar: :any, sonoma: "67afad57e2f2d4a670ccd11ca69b605c98f6667a45fcda1cce8bada408ce8418" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb9d9961e488ac949eede9654228e1785304b592ba3077479ad06e6bcade7ae2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04cf1968db2f3e0b069b819de7666edc18283d45623c9df19156659f3490d91e" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "vulkan-headers" => :build + depends_on "vulkan-loader" => :build + depends_on "pkgconf" => :test + + depends_on "assimp" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtshadertools" + + # Apply Arch Linux patches for assimp 6 support + # Issue ref: https://bugreports.qt.io/browse/QTBUG-137996 + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-3d/-/raw/811dd8b18b4042f7120722b63953499830b51ddd/assimp-6.patch" + sha256 "244589b0a353da757d61ce6b86d4fcf2fc8c11e9c0d9c5b109180cec9273055a" + end + + def install + rm_r("src/3rdparty/assimp/src") + + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_qt3d_system_assimp=ON + -DFEATURE_qt3d_vulkan=ON + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + modules = %w[3DCore 3DRender 3DInput 3DLogic 3DExtras 3DAnimation] + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS #{modules.join(" ")}) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::#{modules.join(" Qt6::")}) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += #{modules.join(" ").downcase} + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + + int main(void) { + Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity; + Qt3DCore::QEntity *torusEntity = new Qt3DCore::QEntity(rootEntity); + Qt3DExtras::QTorusMesh *torusMesh = new Qt3DExtras::QTorusMesh; + torusMesh->setRadius(5); + torusMesh->setMinorRadius(1); + torusMesh->setRings(100); + torusMesh->setSlices(20); + delete torusMesh; + delete torusEntity; + delete rootEntity; + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6#{modules.join(" Qt6")}").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qt5compat.rb b/Formula/q/qt5compat.rb new file mode 100644 index 0000000000000..224d3e995c4ed --- /dev/null +++ b/Formula/q/qt5compat.rb @@ -0,0 +1,101 @@ +class Qt5compat < Formula + desc "Qt 5 Core APIs that were removed in Qt 6" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qt5compat-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qt5compat-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qt5compat-everywhere-src-6.9.3.tar.xz" + sha256 "091dac2124c2291c3566408720f89b1796cd458897c6acabd11f03976ad04461" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-2-Clause", # src/core5/codecs + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qt5compat.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e1b8ad9a71c5400e60b0a8b5da8853e299f37f508445e71fc2d1355871b8c728" + sha256 cellar: :any, arm64_sequoia: "a9cd817fce35c8a59ebd45d1a38bb1f9bee94eb56212274796ad628791ee752f" + sha256 cellar: :any, arm64_sonoma: "b1ac9fcfca639fed98614eb6574a0316bc4977421fbe15f7ce3a6a2f9531ea72" + sha256 cellar: :any, sonoma: "4647c4d81b9e3bd2b84093bd537348a32bd0bcdd3c0189fea7dda826251d7de3" + sha256 cellar: :any_skip_relocation, arm64_linux: "f84073a583286b510c2d2159788f3691205c47b1b2ce3e0d686a0c537acc157c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91a0dd5f6f77909277a021c4bf80d56012aeb3d2e61aa01f645f7f89028aa82e" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "icu4c@77" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtshadertools" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Core5Compat) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core5Compat) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += core5compat + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + + int main(void) { + const QString hw = QStringLiteral("Hello World"); + const QStringRef ref = QStringRef(&hw).mid(6); + Q_ASSERT(ref.at(0) == QChar('W')); + Q_ASSERT(ref.at(4) == QChar('d')); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Core5Compat").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qt@5.rb b/Formula/q/qt@5.rb new file mode 100644 index 0000000000000..3b13a6e93daea --- /dev/null +++ b/Formula/q/qt@5.rb @@ -0,0 +1,479 @@ +# Patches for Qt must be at the very least submitted to Qt's Gerrit codereview +# rather than their bug-report Jira. The latter is rarely reviewed by Qt. +class QtAT5 < Formula + include Language::Python::Virtualenv + + desc "Cross-platform application and UI framework" + homepage "https://www.qt.io/" + # NOTE: Use *.diff for GitLab/KDE patches to avoid their checksums changing. + url "https://download.qt.io/official_releases/qt/5.15/5.15.17/single/qt-everywhere-opensource-src-5.15.17.tar.xz" + mirror "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.17/single/qt-everywhere-opensource-src-5.15.17.tar.xz" + mirror "https://mirrors.ocf.berkeley.edu/qt/archive/qt/5.15/5.15.17/single/qt-everywhere-opensource-src-5.15.17.tar.xz" + sha256 "85eb566333d6ba59be3a97c9445a6e52f2af1b52fc3c54b8a2e7f9ea040a7de4" + license all_of: ["GFDL-1.3-only", "GPL-2.0-only", "GPL-3.0-only", "LGPL-2.1-only", "LGPL-3.0-only"] + + livecheck do + url "https://download.qt.io/official_releases/qt/5.15/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "114f6e5d992eb6e0ccc4228165021fd7dfa737b7546753159b8cb4f215c3c0d0" + sha256 cellar: :any, arm64_sequoia: "71e99646e19f6bbfb49bef4ce5fb144967158846b6c63819f24f3769dba01570" + sha256 cellar: :any, arm64_sonoma: "37b737c30cd357390362d8b732b87a665f6f3d35b06d31951251e6e3616a37a9" + sha256 cellar: :any, arm64_ventura: "7149d97837f5cecc2a773f32e855f059e7d92b1fe2502a142c97f777acb4fe66" + sha256 cellar: :any, sonoma: "18882946bb6b34ace4fae1fe0fd53bc94666823b1d8007c7add580d4128d8884" + sha256 cellar: :any, ventura: "2b768884998655899253a3887c8d01011bd609bc754c5ef897323af5cb4b361d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9907eed9a4529f6dbc095e09244c2fb124fc60bebef4489301cb1ad16456a462" + sha256 cellar: :any_skip_relocation, x86_64_linux: "343311cd12f13c145f45fcb608b4803a4aebbb1d78914ca7fcd2982feb50303c" + end + + keg_only :versioned_formula + + # Deprecating on expected date of Qt 5.15.19 open-source release which is + # planned for 1 year after the commercial release date of 2025-05-19[^1]. + # Standard support officially ended on 2025-05-26 and Qt5 is now in EoS[^2]. + # Any new CVEs found are no longer being fixed since commercial release. + # Also, we rely on Linux distro patches and they are planning removal too, + # e.g. Alpine[^3], Gentoo[^4] and Ubuntu[^5]. + # + # [^1]: https://www.qt.io/blog/commercial-lts-qt-5.15.19-released + # [^2]: https://www.qt.io/blog/extended-security-maintenance-for-qt-5.15-begins-may-2025 + # [^3]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/17114 + # [^4]: https://bugs.gentoo.org/948836 + # [^5]: https://discourse.ubuntu.com/t/removing-qt-5-from-ubuntu-before-the-release-of-26-04-lts/49296 + deprecate! date: "2026-05-19", because: :unsupported + + depends_on "ninja" => :build + depends_on "node" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on xcode: :build + depends_on "freetype" + depends_on "glib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "md4c" + depends_on "pcre2" + depends_on "sqlite" + depends_on "webp" + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "gperf" => :build + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "alsa-lib" + depends_on "at-spi2-core" + depends_on "dbus" + depends_on "double-conversion" + depends_on "expat" + depends_on "fontconfig" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "libdrm" + depends_on "libevent" + depends_on "libice" + depends_on "libsm" + depends_on "libvpx" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxcomposite" + depends_on "libxdamage" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxkbcommon" + depends_on "libxkbfile" + depends_on "libxml2" + depends_on "libxrandr" + depends_on "libxslt" + depends_on "libxtst" + depends_on "llvm" + depends_on "mesa" + depends_on "minizip" + depends_on "nspr" + depends_on "nss" + depends_on "opus" + depends_on "pulseaudio" + depends_on "sdl2" + depends_on "snappy" + depends_on "systemd" + depends_on "wayland" + depends_on "xcb-util-image" + depends_on "xcb-util-keysyms" + depends_on "xcb-util-renderutil" + depends_on "xcb-util-wm" + end + + resource "qtwebengine" do + url "https://code.qt.io/qt/qtwebengine.git", + tag: "v5.15.19-lts", + revision: "a5d11cd6f8c487443c15c7e3a6cd8090b65cb313" + + # Apply FreeBSD patches for newer LLVM/Clang + # Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281431 + on_sequoia :or_newer do + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/0ddd6468fb3cb9ba390973520517cb1ca2cd690d/www/qt5-webengine/files/patch-libc%2B%2B19" + sha256 "45455e5b5cbeb2abf74733e550ed1c4fdc85a43de9f209dcbbe04ba6c93e1775" + end + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/0ddd6468fb3cb9ba390973520517cb1ca2cd690d/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_hash__table.h" + sha256 "d1738d95f24fe38b5b5bc86110f9dff9c2df98f229401e162e8f8fdfa8e9ac6e" + end + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/0ddd6468fb3cb9ba390973520517cb1ca2cd690d/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__data__source.h" + sha256 "b75ffdf65ba35c63f208b34c908a5f0554683c7b9034f924cb2dc9b2d4f3f215" + end + end + + # Use Debian patches for ICU 75+, brew Ninja and Python 3.13 + patch do + url "https://deb.debian.org/debian/pool/main/q/qtwebengine-opensource-src/qtwebengine-opensource-src_5.15.19+dfsg-3.debian.tar.xz" + sha256 "38ef54e497ad0464950776b1055807d9e6b1a42aa0f8f76aa3b1323f7d59fa55" + apply "patches/build-with-c++17.patch", + "patches/ninja-1.12.patch", + "patches/python3.13-pipes.patch" + end + + # Backport fix for bundled libpng used on macOS + patch do + url "https://github.com/qt/qtwebengine-chromium/commit/eb486f33ed1109a78f2794c98aad624023ea26ea.patch?full_index=1" + sha256 "7377fd75bd63f789563aa229ff861a1b934fe9b6052ce86d5d01f1f3fff94d89" + directory "src/3rdparty" + end + + # Backport fix for https://bugreports.qt.io/browse/QTBUG-138486 + patch do + url "https://github.com/qt/qtwebengine-chromium/commit/1d29d95bf4732a2d6f46547aa2773c9e742ad52e.patch?full_index=1" + sha256 "0bc0855a104d695acc8e9dabd5aa122b292fbd123058c0b52e7c733bcbe2d801" + directory "src/3rdparty" + end + end + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + # Fix build with ICU 75 + patch do + on_linux do + url "https://invent.kde.org/qt/qt/qtlocation-mapboxgl/-/commit/35d566724c48180c9a372c2ed50a253871a51574.diff" + sha256 "9e61d46c0a8ae39903cbcbb228e384f2878a06e50448f3bba60ec65fe2890081" + directory "qtlocation/src/3rdparty/mapbox-gl-native" + end + end + + # Fix build with Xcode 14.3. + # https://bugreports.qt.io/browse/QTBUG-112906 + patch do + url "https://invent.kde.org/qt/qt/qtlocation-mapboxgl/-/commit/5a07e1967dcc925d9def47accadae991436b9686.diff" + sha256 "4f433bb009087d3fe51e3eec3eee6e33a51fde5c37712935b9ab96a7d7571e7d" + directory "qtlocation/src/3rdparty/mapbox-gl-native" + end + + # Fix build with Xcode 26 with backport from Qt6 + # https://github.com/qt/qtbase/commit/cdb33c3d5621ce035ad6950c8e2268fe94b73de5 + patch :DATA + + # Apply patch from Gentoo bug tracker (https://bugs.gentoo.org/936486) to fix build + # on macOS. Not possible to upstream as the final Qt5 commercial release is done. + patch do + on_sequoia :or_newer do + url "https://bugs.gentoo.org/attachment.cgi?id=916782" + sha256 "6b655ba61128c04811e0426a1e25456914fc79c845469da6df10f2d3e29aa510" + directory "qtlocation" + end + end + + # Below are CVE patches from https://download.qt.io/official_releases/qt/5.15/ + # detailed at https://wiki.qt.io/List_of_known_vulnerabilities_in_Qt_products + + # CVE-2024-39936 + # Remove with Qt 5.15.18 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2024-39936-qtbase-5.15.patch" + sha256 "2cc23afba9d7e48f8faf8664b4c0324a9ac31a4191da3f18bd0accac5c7704de" + directory "qtbase" + end + + # CVE-2025-23050 + # Remove with Qt 5.15.19 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2025-23050-qtconnectivity-5.15.diff" + sha256 "76e303b6465babb6d0d275792f7f3c41e3df87a6a17992e8b7b8e47272682ce7" + directory "qtconnectivity" + end + + # CVE-2025-30348 + # Remove with Qt 5.15.19 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2025-30348-qtbase-5.15.diff" + sha256 "fcd011754040d961fec1b48fe9828b2c8d501f2d9c30f0f475487a590de6d3c8" + directory "qtbase" + end + + # CVE-2025-4211 + # Remove with Qt 5.15.19 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2025-4211-qtbase-5.15.diff" + sha256 "7bc92fb0423f25195fcc59a851570a2f944cfeecbd843540f0e80f09b6b0e822" + directory "qtbase" + end + + # CVE-2025-5455 + # Remove with Qt 5.15.19 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2025-5455-qtbase-5.15.patch" + sha256 "967fe137ee358f60ac3338f658624ae2663ec77552c38bcbd94c6f2eff107506" + directory "qtbase" + end + + def install + # Install python dependencies for QtWebEngine + venv = virtualenv_create(buildpath/"venv", "python3.13") + venv.pip_install resources.reject { |r| r.name == "qtwebengine" } + ENV.prepend_path "PATH", venv.root/"bin" + + rm_r(buildpath/"qtwebengine") + (buildpath/"qtwebengine").install resource("qtwebengine") + + # FIXME: GN requires clang in clangBasePath/bin + inreplace "qtwebengine/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn", + 'rebase_path("$clang_base_path/bin/", root_build_dir)', '""' + + args = %W[ + -verbose + -prefix #{prefix} + -release + -opensource -confirm-license + -nomake examples + -nomake tests + -pkg-config + -dbus-runtime + -proprietary-codecs + -system-freetype + -system-libjpeg + -system-libmd4c + -system-libpng + -system-pcre + -system-sqlite + -system-zlib + -webengine-python-version python3 + ] + + if OS.mac? + args << "-no-rpath" + args << "-no-assimp" if Hardware::CPU.arm? + + # Modify Assistant path as we manually move `*.app` bundles from `bin` to `libexec`. + # This fixes invocation of Assistant via the Help menu of apps like Designer and + # Linguist as they originally relied on Assistant.app being in `bin`. + assistant_files = %w[ + qttools/src/designer/src/designer/assistantclient.cpp + qttools/src/linguist/linguist/mainwindow.cpp + ] + inreplace assistant_files, '"Assistant.app/Contents/MacOS/Assistant"', '"Assistant"' + else + args << "-R#{lib}" + # https://bugreports.qt.io/browse/QTBUG-71564 + args << "-no-avx2" + args << "-no-avx512" + args << "-no-sql-mysql" + + # Use additional system libraries on Linux. + # Currently we have to use vendored ffmpeg because the chromium copy adds a symbol not + # provided by the brewed version. + # See here for an explanation of why upstream ffmpeg does not want to add this: + # https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg124998.html + # On macOS chromium will always use bundled copies and the webengine_* + # arguments are ignored. + args += %w[ + -system-doubleconversion + -system-harfbuzz + -webengine-alsa + -webengine-icu + -webengine-kerberos + -webengine-opus + -webengine-pulseaudio + -webengine-webp + ] + + # Chromium in QtWebEngine needs hardware CRC32 support via `-march=armv8-a+crc` + ENV.runtime_cpu_detection if Hardware::CPU.arm? + + # Homebrew-specific workaround to ignore spurious linker warnings on Linux. + inreplace "qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn", + "fatal_linker_warnings = true", + "fatal_linker_warnings = false" + end + + # Work around Clang failure in bundled Boost and V8: + # error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type + if DevelopmentTools.clang_build_version >= 1500 + args << "QMAKE_CXXFLAGS+=-Wno-enum-constexpr-conversion" + inreplace "qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn", + /^\s*"-Wno-thread-safety-attributes",$/, + "\\0 \"-Wno-enum-constexpr-conversion\"," + end + + # Work around Clang failure in bundled freetype: error: unknown type name 'Byte' + # https://gitlab.freedesktop.org/freetype/freetype/-/commit/a25e85ed95dc855e42e6bb55138e27d362c5ea1e + if DevelopmentTools.clang_build_version >= 1600 + inreplace "qtwebengine/src/3rdparty/chromium/third_party/freetype/src/src/gzip/ftzconf.h", + "#if !defined(MACOS) && !defined(TARGET_OS_MAC)", "#if !defined(__MACTYPES__)" + end + + system "./configure", *args + system "make" + ENV.deparallelize + system "make", "install" + + # Remove reference to shims directory + inreplace prefix/"mkspecs/qmodule.pri", + /^PKG_CONFIG_EXECUTABLE = .*$/, + "PKG_CONFIG_EXECUTABLE = #{Formula["pkgconf"].opt_bin}/pkg-config" + + # Fix find_package call using QtWebEngine version to find other Qt5 modules. + inreplace lib.glob("cmake/Qt5WebEngine*/*Config.cmake"), + " #{resource("qtwebengine").version} ", " #{version} " + + # Install a qtversion.xml to ease integration with QtCreator + # As far as we can tell, there is no ability to make the Qt buildsystem + # generate this and it's in the Qt source tarball at all. + # Multiple people on StackOverflow have asked for this and it's a pain + # to add Qt to QtCreator (the official IDE) without it. + # Given Qt upstream seems extremely unlikely to accept this: let's ship our + # own version. + # If you read this and you can eliminate it or upstream it: please do! + # More context in https://github.com/Homebrew/homebrew-core/pull/124923 + (share/"qtcreator/QtProject/qtcreator/qtversion.xml").write <<~XML + + + + + QtVersion.0 + + 1 + Qt %{Qt:Version} (#{opt_prefix}) + #{opt_bin}/qmake + Qt4ProjectManager.QtVersion.Desktop + + false + + + + Version + 1 + + + XML + + return unless OS.mac? + + # The pkg-config files installed suggest that headers can be found in the + # `include` directory. Make this so by creating symlinks from `include` to + # the Frameworks' Headers folders. + lib.glob("*.framework") do |f| + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink f + include.install_symlink f/"Headers" => f.stem + end + + # Move `*.app` bundles into `libexec` to expose them to `brew linkapps` and + # because we don't like having them in `bin`. + bin.glob("*.app") do |app| + libexec.install app + bin.write_exec_script libexec/app.basename/"Contents/MacOS"/app.stem + end + end + + def caveats + <<~EOS + We agreed to the Qt open source license for you. + If this is unacceptable you should uninstall. + + You can add Homebrew's Qt to QtCreator's "Qt Versions" in: + Preferences > Qt Versions > Link with Qt... + pressing "Choose..." and selecting as the Qt installation path: + #{opt_prefix} + EOS + end + + test do + (testpath/"hello.pro").write <<~EOS + QT += core + QT -= gui + TARGET = hello + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (testpath/"main.cpp").write <<~CPP + #include + #include + + int main(int argc, char *argv[]) + { + QCoreApplication a(argc, argv); + qDebug() << "Hello World!"; + return 0; + } + CPP + + # Work around "error: no member named 'signbit' in the global namespace" + ENV.delete "CPATH" + + system bin/"qmake", testpath/"hello.pro" + system "make" + assert_path_exists testpath/"hello" + assert_path_exists testpath/"main.o" + system "./hello" + end +end + +__END__ +--- a/qtbase/mkspecs/common/mac.conf ++++ b/qtbase/mkspecs/common/mac.conf +@@ -18,8 +18,7 @@ QMAKE_LIBDIR = + + # sdk.prf will prefix the proper SDK sysroot + QMAKE_INCDIR_OPENGL = \ +- /System/Library/Frameworks/OpenGL.framework/Headers \ +- /System/Library/Frameworks/AGL.framework/Headers/ ++ /System/Library/Frameworks/OpenGL.framework/Headers + + QMAKE_FIX_RPATH = install_name_tool -id + +@@ -30,7 +29,7 @@ QMAKE_LFLAGS_REL_RPATH = + QMAKE_REL_RPATH_BASE = @loader_path + + QMAKE_LIBS_DYNLOAD = +-QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL ++QMAKE_LIBS_OPENGL = -framework OpenGL + QMAKE_LIBS_THREAD = + + QMAKE_INCDIR_WAYLAND = diff --git a/Formula/q/qtads.rb b/Formula/q/qtads.rb new file mode 100644 index 0000000000000..2aa3085ff1715 --- /dev/null +++ b/Formula/q/qtads.rb @@ -0,0 +1,65 @@ +class Qtads < Formula + desc "TADS multimedia interpreter" + homepage "https://realnc.github.io/qtads/" + url "https://github.com/realnc/qtads/releases/download/v3.4.0/qtads-3.4.0-source.tar.xz" + sha256 "3c8f1b47ee42d89753d68e7c804ca3677b0c89a5d765d1fd4f80f9cdc29d3473" + license "GPL-3.0-or-later" + head "https://github.com/realnc/qtads.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d6549a2b3f706a45c5e6e73bfc1ead1f3cd80eed681a3c713731cf6b9681ea88" + sha256 cellar: :any, arm64_sequoia: "6e3606d6b81aace60e22a195af69bdc1a487903f6199f66f625b5cd80063b468" + sha256 cellar: :any, arm64_sonoma: "c8737515d6dc5506c6c44f91ceba97426015e71112171006ab57f1646a4d2231" + sha256 cellar: :any, arm64_ventura: "06f702f167f0b8579f382b626a612fb14a646221420d84b605ad46738751e4bd" + sha256 cellar: :any, arm64_monterey: "8bd68c471a53ce7d00aadc3fde4a51a3b86a6130a3312a326b5293b3223d253b" + sha256 cellar: :any, arm64_big_sur: "fce9e5ba4f310c2d8d6fe7929bec2779aa7651645229d0f98cf344e76fb711c3" + sha256 cellar: :any, sonoma: "b2e9db9097b1712b7d5fa30f978031048032bd18e71d0157a2ba5deaa0659dcc" + sha256 cellar: :any, ventura: "eefed02a2f64f4bb5da5f9eb9af4a47e268ef02c695d9c94ae01ae1213a1d254" + sha256 cellar: :any, monterey: "463fd847281ae7edf08b71824d36d0a87a01bd7feaefa452d132c35ccd63d68c" + sha256 cellar: :any, big_sur: "2cabcaf186de69de6790202587c6ffb6e9484106b13b0b6dea221ea46728010b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca269c91add3713169db676f9f70182d210a42bf7b2b4511b8929f48e24ffe99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "251840532a70387d1007ab9a992bb9f6e8d6c543133fc19d5d41b0dd81c822a5" + end + + # Last release on 2023-05-17, last commit on 2023-05-19. + # PR for Qt 6 open since 2023-10-28: https://github.com/realnc/qtads/pull/21 + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "pkgconf" => :build + depends_on "fluid-synth" + depends_on "libsndfile" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "qt@5" # Qt6 PR: https://github.com/realnc/qtads/pull/21 + depends_on "sdl2" + + def install + args = ["DEFINES+=NO_STATIC_TEXTCODEC_PLUGINS"] + args << "PREFIX=#{prefix}" unless OS.mac? + + system "qmake", *args + system "make" + + if OS.mac? + prefix.install "QTads.app" + bin.write_exec_script "#{prefix}/QTads.app/Contents/MacOS/QTads" + else + system "make", "install" + end + + man6.install "desktop/man/man6/qtads.6" + end + + test do + bin_name = OS.mac? ? "QTads" : "qtads" + assert_path_exists testpath/"#{bin}/#{bin_name}", "I'm an untestable GUI app." + end +end diff --git a/Formula/q/qtbase.rb b/Formula/q/qtbase.rb new file mode 100644 index 0000000000000..ea7511425226b --- /dev/null +++ b/Formula/q/qtbase.rb @@ -0,0 +1,283 @@ +class Qtbase < Formula + desc "Cross-platform application and UI framework" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtbase-everywhere-src-6.9.3.tar.xz" + sha256 "c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qmake + "BSD-3-Clause", # *.cmake + "GFDL-1.3-no-invariants-only", # *.qdoc + ] + head "https://code.qt.io/qt/qtbase.git", branch: "dev" + + # The first-party website doesn't make version information readily available, + # so we check the `head` repository tags instead. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b71662b2a584d66df3cb7693453c0c685aeaac59bdbebf09c6525a95336c92d8" + sha256 cellar: :any, arm64_sequoia: "e01b6da67665aacb7251e9402f9ff61cdf15eefbe18d3bd162a4f031e24b0375" + sha256 cellar: :any, arm64_sonoma: "e5e9230b6d4d803f2c82d317832ef225debd4218b0289ea58e1e2abffbb4f62a" + sha256 cellar: :any, sonoma: "ea8dd5c6dd29e5d2c8477024026cb841d0982f01b3d698bd2751bff1875b3656" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0790ab124d71c60905dcc5d6a9023b9aebe0392c9e374422341eb3a2e068b95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d65327cb727685833b1706b1f431d61bc80e4172526fb8a61c27870979d1bbee" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vulkan-headers" => [:build, :test] + depends_on xcode: :build + + depends_on "brotli" + depends_on "dbus" + depends_on "double-conversion" + depends_on "freetype" + depends_on "glib" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "libb2" + depends_on "libpng" + depends_on "md4c" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "zstd" + + uses_from_macos "cups" + uses_from_macos "krb5" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + depends_on "molten-vk" => :build + end + + on_linux do + depends_on "fontconfig" + depends_on "gdk-pixbuf" + depends_on "gtk+3" + depends_on "libdrm" + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxkbcommon" + depends_on "mesa" + depends_on "pango" + depends_on "systemd" + depends_on "xcb-util-cursor" + depends_on "xcb-util-image" + depends_on "xcb-util-keysyms" + depends_on "xcb-util-renderutil" + depends_on "xcb-util-wm" + + # https://github.com/orgs/Homebrew/discussions/6468#discussioncomment-14687372 + pour_bottle? only_if: :default_prefix + end + + # Add framework directory to Cflags on macOS + # Ref: https://codereview.qt-project.org/c/qt/qtbase/+/682915 + patch do + url "https://codereview.qt-project.org/changes/qt%2Fqtbase~682915/revisions/1/patch?zip" + sha256 "41fc97843c891cc8c5fe513acfc5779bb42a2ac417e6c931efee08ed5eb62201" + end + + def install + # Allow -march options to be passed through, as Qt builds + # arch-specific code with runtime detection of capabilities: + # https://bugreports.qt.io/browse/QTBUG-113391 + ENV.runtime_cpu_detection + + # Remove bundled libraries + rm_r(%w[ + src/3rdparty/double-conversion + src/3rdparty/freetype + src/3rdparty/harfbuzz-ng + src/3rdparty/libjpeg + src/3rdparty/libpng + src/3rdparty/md4c + src/3rdparty/pcre2 + src/3rdparty/sqlite + src/3rdparty/xcb + src/3rdparty/zlib + ]) + + # The install prefix is HOMEBREW_PREFIX so that modules can be installed in separate formulae + cmake_args = std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DINSTALL_ARCHDATADIR=share/qt + -DINSTALL_DATADIR=share/qt + -DINSTALL_EXAMPLESDIR=share/qt/examples + -DINSTALL_MKSPECSDIR=share/qt/mkspecs + -DINSTALL_TESTSDIR=share/qt/tests + + -DFEATURE_sql_mysql=OFF + -DFEATURE_sql_odbc=OFF + -DFEATURE_sql_psql=OFF + + -DFEATURE_openssl_linked=ON + -DFEATURE_pkg_config=ON + -DFEATURE_system_doubleconversion=ON + -DFEATURE_system_freetype=ON + -DFEATURE_system_harfbuzz=ON + -DFEATURE_system_jpeg=ON + -DFEATURE_system_libb2=ON + -DFEATURE_system_pcre2=ON + -DFEATURE_system_png=ON + -DFEATURE_system_sqlite=ON + -DFEATURE_system_zlib=ON + -DQT_ALLOW_SYMLINK_IN_PATHS=ON + ] + + cmake_args += if OS.mac? + # Workaround to support relocatable installs in Homebrew's symlink directory structure. + inreplace "cmake/QtQmakeHelpers.cmake", + 'set(QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH "${from_lib_location_to_prefix}")', + "set(QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH \"#{HOMEBREW_PREFIX.relative_path_from(lib)}\")" + + # Cannoy deploy to version later than 14, due to functions obsoleted in macOS 15.0 + # https://bugreports.qt.io/browse/QTBUG-128900 + deploy = [MacOS.version, MacOSVersion.from_symbol(:sonoma)].min + + %W[ + -DCMAKE_OSX_DEPLOYMENT_TARGET=#{deploy}.0 + -DFEATURE_relocatable=ON + -DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON + ] + else + # FIXME: Unable to use workaround for relocatable installs as paths are resolved relative + # to absolutePath() rather than canonicalPath(). This can break based on order of RPATH. + # https://github.com/qt/qtbase/blob/v6.9.2/src/corelib/global/qlibraryinfo.cpp#L304 + %w[ + -DFEATURE_relocatable=OFF + -DFEATURE_xcb=ON + -DFEATURE_system_xcb_xinput=ON + ] + end + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", *cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + + inreplace lib/"cmake/Qt6/qt.toolchain.cmake", "#{Superenv.shims_path}/", "" + + # Install a qtversion.xml to ease integration with QtCreator + # As far as we can tell, there is no ability to make the Qt buildsystem + # generate this and it's in the Qt source tarball at all. + # Multiple people on StackOverflow have asked for this and it's a pain + # to add Qt to QtCreator (the official IDE) without it. + # Given Qt upstream seems extremely unlikely to accept this: let's ship our + # own version. + # If you read this and you can eliminate it or upstream it: please do! + # More context in https://github.com/Homebrew/homebrew-core/pull/124923 + (share/"qtcreator/QtProject/qtcreator/qtversion.xml").write <<~XML + + + + + QtVersion.0 + + 1 + Qt %{Qt:Version} (#{HOMEBREW_PREFIX}) + #{opt_bin}/qmake + Qt4ProjectManager.QtVersion.Desktop + + false + + + + Version + 1 + + + XML + end + + def caveats + <<~CAVEATS + You can add Homebrew's Qt to QtCreator's "Qt Versions" in: + Preferences > Qt Versions > Link with Qt... + pressing "Choose..." and selecting as the Qt installation path: + #{HOMEBREW_PREFIX} + CAVEATS + end + + test do + modules = %w[Core Gui Widgets Sql Concurrent Network] + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + find_package(Qt6 REQUIRED COMPONENTS #{modules.join(" ")}) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::#{modules.join(" Qt6::")}) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += #{modules.join(" ").downcase} + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + INCLUDEPATH += #{Formula["vulkan-headers"].opt_include} + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + #include + + int main(int argc, char *argv[]) { + QCoreApplication app(argc, argv); + Q_ASSERT(QSqlDatabase::isDriverAvailable("QSQLITE")); + const auto &list = QImageReader::supportedImageFormats(); + QVulkanInstance inst; + // See https://github.com/actions/runner-images/issues/1779 + // if (!inst.create()) + // qFatal("Failed to create Vulkan instance: %d", inst.errorCode()); + for (const char* fmt : {"bmp", "cur", "gif", "ico", "jpeg", "jpg", "pbm", "pgm", "png", "ppm", "xbm", "xpm"}) { + Q_ASSERT(list.contains(fmt)); + } + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6#{modules.join(" Qt6")}").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + + # Check QT_INSTALL_PREFIX is HOMEBREW_PREFIX to support split formulae + assert_equal HOMEBREW_PREFIX.to_s, shell_output("#{bin}/qmake -query QT_INSTALL_PREFIX").chomp + end +end diff --git a/Formula/q/qtcharts.rb b/Formula/q/qtcharts.rb new file mode 100644 index 0000000000000..338430c09acdb --- /dev/null +++ b/Formula/q/qtcharts.rb @@ -0,0 +1,97 @@ +class Qtcharts < Formula + desc "UI Components for displaying visually pleasing charts" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtcharts-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtcharts-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtcharts-everywhere-src-6.9.3.tar.xz" + sha256 "29d7cbbdb31d6a2e6c3ab5b5b52f34ff457db55d87d28a7c335b015d749d4c53" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtcharts.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6989029968b93881caad18fdd1d934a393278d91b6c011c04b830b36516dc952" + sha256 cellar: :any, arm64_sequoia: "b9c242e1bb487a6685ace068cca91117ea9635069487bb307ee3bb5116e46bd2" + sha256 cellar: :any, arm64_sonoma: "adace123938506892453c5de1fb2c7cbc736fd6ea57f7b47af7c2a39ae331049" + sha256 cellar: :any, sonoma: "9f6eaf6f26e846c925c3d864df798afae8333d094552b82c72c70fe3500079ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "47297c9dcac8c10f8a05b858c64e129229e12dda31f44a8b9145436b31a43126" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5efe0fadc5a94b8c80105e862e8bad18ade727945d3bc78072c2bfe5ecdc9871" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Charts) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Charts) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += charts + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + + int main(void) { + QLineSeries series; + series.append(QList()); + series.append(0.0,0.0); + series.append(QPointF()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Charts").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtconnectivity.rb b/Formula/q/qtconnectivity.rb new file mode 100644 index 0000000000000..a982b6e605951 --- /dev/null +++ b/Formula/q/qtconnectivity.rb @@ -0,0 +1,106 @@ +class Qtconnectivity < Formula + desc "Provides access to Bluetooth hardware" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtconnectivity-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtconnectivity-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtconnectivity-everywhere-src-6.9.3.tar.xz" + sha256 "e21bba5efb174c4456c5e5a7b4d52bba1ee62dfb4509bcff73fdfad9cb1dd7f5" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtconnectivity.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "46990ccc8f093045c2062b4ce93ef453ec9a4b37789f96b22c32b425e3ff6f8b" + sha256 cellar: :any, arm64_sequoia: "fd9521753c641880c1c195936787a70ad33023c6c481d990e11db44e04e68a4e" + sha256 cellar: :any, arm64_sonoma: "9309787fa0b27c8a7a17be3a317cf413d8c7db8cdb46b643f6813ca7e40f18c5" + sha256 cellar: :any, sonoma: "0561107aa7d4c025cd48aec78034789d7629eb5ca918ee3e251c1e9bbaed9925" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe829fc263f15cfd263764fc5707f90fb7c70b315759b91facd869a5f5bf4389" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49aab37a8f1da9d6b8a68b690d75877f8a5c48265b3dd7dd67e5d0f930059ee5" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + + uses_from_macos "pcsc-lite" + + on_linux do + depends_on "pkgconf" => :build + depends_on "bluez" + end + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + # NOTE: On macOS we cannot run executable as it requires Bluetooth permissions via interactive prompt + run_executable = !OS.mac? + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Bluetooth) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Bluetooth) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += bluetooth + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + + int main(void) { + QBluetoothLocalDevice localDevice; + if (localDevice.isValid()) { + qInfo() << localDevice.name(); + } + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" if run_executable + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" if run_executable + end + + flags = shell_output("pkgconf --cflags --libs Qt6Bluetooth").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" if run_executable + end +end diff --git a/Formula/q/qtdatavis3d.rb b/Formula/q/qtdatavis3d.rb new file mode 100644 index 0000000000000..b7f33759e0c28 --- /dev/null +++ b/Formula/q/qtdatavis3d.rb @@ -0,0 +1,96 @@ +class Qtdatavis3d < Formula + desc "Provides functionality for 3D visualization" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtdatavis3d-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtdatavis3d-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtdatavis3d-everywhere-src-6.9.3.tar.xz" + sha256 "aa4b45b896a629a1bc5ebbb7990086b5d52d0ab9fabc996dd047a27f256fbfec" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtdatavis3d.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f0c88a3975ea69bafab13c3c009019d61d15ea68bab813fc79a6936f0ba8aeb7" + sha256 cellar: :any, arm64_sequoia: "048fb1a7ca21911b673b60cfab84ffe5b1df0e456074c3d2ae0931c6082d782b" + sha256 cellar: :any, arm64_sonoma: "0f775673261ecc87fa57013deca8507e97c9f4460f3292fa8bd9d269535ae747" + sha256 cellar: :any, sonoma: "d93635c60a9b4748fb72d17cc7ff1e340656967a0bcfa61083404813d472f4b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "8fe73f58cae95e31b26674b9a2090efb1f53958ce69a23df4fdf8a1746a2f03d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4eb1f8259a9425da6ea8f22654c6226f5382f7be12e8b37c2e5f5bf9bd41752e" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS DataVisualization) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::DataVisualization) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += datavisualization + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + QBar3DSeries series; + QBarDataRow *data = new QBarDataRow; + *data << -1.0f << 3.0f << 7.5f << 5.0f << 2.2f; + series.dataProxy()->addRow(data); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6DataVisualization").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtdeclarative.rb b/Formula/q/qtdeclarative.rb new file mode 100644 index 0000000000000..642c30d505ee6 --- /dev/null +++ b/Formula/q/qtdeclarative.rb @@ -0,0 +1,70 @@ +class Qtdeclarative < Formula + desc "QML, Qt Quick and several related modules" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtdeclarative-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtdeclarative-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtdeclarative-everywhere-src-6.9.3.tar.xz" + sha256 "5a071b227229afbf5c976b7b59a0d850818d06ae861fcdf6d690351ca3f8a260" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qml + "BSD-2-Clause", # masm + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtdeclarative.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 arm64_tahoe: "01c719a27a1fa9961ded9a195e326468d7c5a9c3ab5462eb10cd553539e62b0e" + sha256 arm64_sequoia: "4073f5e4d88bcc78c24f38d8ba11fb9d474b70c0fec3a76c7997108ac50241c8" + sha256 arm64_sonoma: "830c76d0e22f0d7ecc800f1d26b920fd65bc5f5ef3b6e219267e7c673d1534dc" + sha256 cellar: :any, sonoma: "d4f34e19e1e6ce6dd7452dea1cb4b42bf39c7e3e7d6f7b73e42cf72a5635f53e" + sha256 cellar: :any_skip_relocation, arm64_linux: "578fa8f1b82c9375bd421b06ec8524e81759b69a0f76cefc1a4adc879ab72828" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25c2ae6327941d10525bec6b4596b92239bcccd7a6468b522579ae410a1c0e03" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "qtlanguageserver" => :build + depends_on "qtshadertools" => :build + depends_on "vulkan-headers" => :build + + depends_on "qtbase" + depends_on "qtsvg" + + uses_from_macos "python" => :build + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + # https://github.com/qt/qtdeclarative/blob/dev/tests/auto/qml/qqmlapplicationengine/testapp/immediateQuit.qml + (testpath/"immediateQuit.qml").write <<~QML + import QtQml + import QtQuick + QtObject { + Component.onCompleted: { + console.log("End: " + Qt.application.arguments[1]); + Qt.quit() + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? + assert_match "qml: End: immediateQuit.qml", shell_output("#{bin}/qml immediateQuit.qml 2>&1") + end +end diff --git a/Formula/q/qtgraphs.rb b/Formula/q/qtgraphs.rb new file mode 100644 index 0000000000000..e1bc33eda5ee8 --- /dev/null +++ b/Formula/q/qtgraphs.rb @@ -0,0 +1,101 @@ +class Qtgraphs < Formula + desc "Provides functionality for 2D and 3D graphs" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtgraphs-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtgraphs-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtgraphs-everywhere-src-6.9.3.tar.xz" + sha256 "50dc63d055125c30c0bf3a15dd1f71363e474f2fdcb35f927e754042440e048c" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtgraphs.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "842062cd5b5b9783204c54e38fc9dc0e946876bfe108a9ca87115212b8a47d97" + sha256 cellar: :any, arm64_sequoia: "00e182933e70c234a022d5a2afaf6550df39fd7a3b9a17af0b6cc06e6dad9d31" + sha256 cellar: :any, arm64_sonoma: "b02ebfcc4f94c3ac10445b271b43fb36d31fc0dd93c7d8aa08862a2936727ada" + sha256 cellar: :any, sonoma: "7d4b370a336415cf30358bad0baf6e6054497ed77c3860a85abdbb66f1679e45" + sha256 cellar: :any_skip_relocation, arm64_linux: "180e3431696718ea0010ade945c930e16c1aa331027b6d3b9af4c36731cab5b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8132f63315170949acea92ad6b5c39e6b593219f848455984ae5d7c33119e87b" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtquick3d" + + on_macos do + depends_on "qtshadertools" + end + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Graphs) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Graphs) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += graphs + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + QLineSeries series; + series.append(QList()); + series.append(0.0,0.0); + series.append(QPointF()); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Graphs").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtgrpc.rb b/Formula/q/qtgrpc.rb new file mode 100644 index 0000000000000..590929dddb1ec --- /dev/null +++ b/Formula/q/qtgrpc.rb @@ -0,0 +1,101 @@ +class Qtgrpc < Formula + desc "Provides support for communicating with gRPC services" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtgrpc-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtgrpc-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtgrpc-everywhere-src-6.9.3.tar.xz" + sha256 "7963c879cb72d5bebea1724602e6896cdc26e8555d872259f217c6b1130afe02" + license all_of: [ + "GPL-3.0-only", # QtGrpc + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, # QtProtobuf + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qtgrpcgen; qtprotobufgen + "BSD-3-Clause", # *.cmake + ] + revision 1 + head "https://code.qt.io/qt/qtgrpc.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "024146b259e09d6a9b08e4ce0476a159e9f630d510a3c6cc3a74649dff6f9328" + sha256 cellar: :any, arm64_sequoia: "1ca2018114dda5ad5ce0be7bfe2d56414222f2bbebe5d89bfceca07ce710e917" + sha256 cellar: :any, arm64_sonoma: "ec2fb21e611a02008d174bd22ec22c172e3687b6e5013146db227ebd39e69dc1" + sha256 cellar: :any, sonoma: "82d423e172d378e8d8acf454ed82add86279dc7793b9eca9ef9bb95b6b25c8ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "58c4c6ad6149807a3c7a41f2a2074feef44c6c1fbcc3685245c1ae42a6e022ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cad946ebb98bdd45217d6aee72ecaeba59554aaaed4e1b33c1a3083449908e34" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "abseil" + depends_on "protobuf" + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 COMPONENTS Protobuf Grpc) + qt_standard_project_setup() + qt_add_executable(clientguide_client main.cpp) + qt_add_protobuf(clientguide_client PROTO_FILES clientguide.proto) + qt_add_grpc(clientguide_client CLIENT PROTO_FILES clientguide.proto) + target_link_libraries(clientguide_client PRIVATE Qt6::Protobuf Qt6::Grpc) + CMAKE + + (testpath/"clientguide.proto").write <<~PROTO + syntax = "proto3"; + package client.guide; + message Request { + int64 time = 1; + sint32 num = 2; + } + message Response { + int64 time = 1; + sint32 num = 2; + } + service ClientGuideService { + rpc UnaryCall (Request) returns (Response); + rpc ServerStreaming (Request) returns (stream Response); + rpc ClientStreaming (stream Request) returns (Response); + rpc BidirectionalStreaming (stream Request) returns (stream Response); + } + PROTO + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include "clientguide.qpb.h" + #include "clientguide_client.grpc.qpb.h" + + int main(void) { + auto channel = std::make_shared(QUrl("http://localhost:#{free_port}")); + client::guide::ClientGuideService::Client client; + client.attachChannel(std::move(channel)); + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "." + system "cmake", "--build", "." + system "./clientguide_client" + end +end diff --git a/Formula/q/qthreads.rb b/Formula/q/qthreads.rb new file mode 100644 index 0000000000000..4028e410e7d99 --- /dev/null +++ b/Formula/q/qthreads.rb @@ -0,0 +1,34 @@ +class Qthreads < Formula + desc "Lightweight locality-aware user-level threading runtime" + homepage "https://www.sandia.gov/qthreads/" + url "https://github.com/sandialabs/qthreads/archive/refs/tags/1.22.tar.gz" + sha256 "76804e730145ee26f661c0fbe3f773f2886d96cb8a72ea79666f7714403d48ad" + license "BSD-3-Clause" + head "https://github.com/sandialabs/qthreads.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "eaac263c06614347b5a22262ca2d655171ef4270f70078167ccfa6808b32b5e2" + sha256 cellar: :any, arm64_sequoia: "1188df7c2c0b888e42e8958aab67b0aa563f3e4579281053d8a9b7635f6693d1" + sha256 cellar: :any, arm64_sonoma: "2b17730f29d4c8e5c35c9293799261e1f6003ff1f27e1c24f5cf5fb26f89df5c" + sha256 cellar: :any, arm64_ventura: "fc5d929394203a698cfdafb7172344f68f0e86eedb6df2a2619b30011bb352bd" + sha256 cellar: :any, sonoma: "65aaf051110cc87ff81dfa3bcbc53c0f50fb94ecc6247328e6bd1be026317f1f" + sha256 cellar: :any, ventura: "3670129186200d05bd096d1a7f58374cf346bc8d23245cb583c2f385e0e1ea7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d861e9b0e27ab4312c6ca2b6836c040a13e77ef5e7222f05c4530809afcb4ada" + sha256 cellar: :any_skip_relocation, x86_64_linux: "feae8cb66d7a8c8258f4da08523a1c94da25a89ef4d645b5cd14d35b8d3c2190" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "userguide/examples" + doc.install "userguide" + end + + test do + system ENV.cc, pkgshare/"examples/hello_world.c", "-o", "hello", "-I#{include}", "-L#{lib}", "-lqthread" + assert_equal "Hello, world!", shell_output("./hello").chomp + end +end diff --git a/Formula/q/qthttpserver.rb b/Formula/q/qthttpserver.rb new file mode 100644 index 0000000000000..f55f856bbecd0 --- /dev/null +++ b/Formula/q/qthttpserver.rb @@ -0,0 +1,94 @@ +class Qthttpserver < Formula + desc "Framework for embedding an HTTP server into a Qt application" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qthttpserver-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qthttpserver-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qthttpserver-everywhere-src-6.9.3.tar.xz" + sha256 "7aa78793dba5cfb81a1d1e4b840bf0faf1e31beea08945b5689f404160dd2e8f" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qthttpserver.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5e0fe1076f314ddb05b1a90e1d503fc75e4791edb9f2dad4a6e9ce68a6893369" + sha256 cellar: :any, arm64_sequoia: "00448db412835a0cbf5122710eb850691d623e684bbeebdd29b8453455d1871e" + sha256 cellar: :any, arm64_sonoma: "21021f558680347f1d8eb095da082e1493841578f3d8ad0e9d1b4f5a48f0901c" + sha256 cellar: :any, sonoma: "e1ada1a98da0ea43fa4132be5fb312dfc492adfbd8e2385d0fd8a6ddae320afa" + sha256 cellar: :any_skip_relocation, arm64_linux: "035ab1808fdd1405de0d238dfe15ae2a2131bb5db2485a64c7331f3cfc653125" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7d1ce8ddcb81a5820e6a2598c314a026a80487a4c577babc0c94ee4cc5a436b" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtwebsockets" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS HttpServer) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::HttpServer) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += httpserver + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + QHttpServer httpServer; + httpServer.route("/", []() { return "Hello world"; }); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6HttpServer").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtimageformats.rb b/Formula/q/qtimageformats.rb new file mode 100644 index 0000000000000..a5647cf665604 --- /dev/null +++ b/Formula/q/qtimageformats.rb @@ -0,0 +1,110 @@ +class Qtimageformats < Formula + desc "Plugins for additional image formats: TIFF, MNG, TGA, WBMP" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtimageformats-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtimageformats-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtimageformats-everywhere-src-6.9.3.tar.xz" + sha256 "4fb26bdbfbd4b8e480087896514e11c33aba7b6b39246547355ea340c4572ffe" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtimageformats.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9f36e8943686802d046651f233ff63386c126443cd3bd9bd92e55940e1a93124" + sha256 cellar: :any, arm64_sequoia: "4730520a5ffe2a0dc02b4037bbb073cae05e5b8926ca9786cb76cfb03e6da177" + sha256 cellar: :any, arm64_sonoma: "9e8c7cc840f05e1babafbcb767e5e5ed6e47d5cd48d2592579a09910d1b02894" + sha256 cellar: :any, sonoma: "87cd8046387e13613f6b04d1d60d3c45340cc16201db30f32f9e4c45113f7fd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a23663253c2382fadb27f04600d5b4f1e78f2d5b349643086e313cb9d928e82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bc7a304fcdfb672f8205bbfc268dc9bddb35a5ee6bf58ffdb329aa4fc0bd4ef" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "libmng" + depends_on "libtiff" + depends_on "qtbase" + depends_on "webp" + + def install + rm_r("src/3rdparty") + + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_system_tiff=ON + -DFEATURE_system_webp=ON + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Gui) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Gui) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += gui + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + const auto &list = QImageReader::supportedImageFormats(); + for(const char* fmt : {"icns", "jp2", "tga", "tif", "tiff", "wbmp", "webp"}) { + Q_ASSERT(list.contains(fmt)); + } + #ifdef __APPLE__ + Q_ASSERT(list.contains("heic")); + Q_ASSERT(list.contains("heif")); + #endif + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Gui").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtkeychain.rb b/Formula/q/qtkeychain.rb new file mode 100644 index 0000000000000..fd6f4950a9759 --- /dev/null +++ b/Formula/q/qtkeychain.rb @@ -0,0 +1,60 @@ +class Qtkeychain < Formula + desc "Platform-independent Qt API for storing passwords securely" + homepage "https://github.com/frankosterfeld/qtkeychain" + url "https://github.com/frankosterfeld/qtkeychain/archive/refs/tags/0.15.0.tar.gz" + sha256 "f4254dc8f0933b06d90672d683eab08ef770acd8336e44dfa030ce041dc2ca22" + license "BSD-2-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "4bac16d3d1b6ea7c7ef54da66872ca0b6eb106be5d8fe9a3b293bec8f28e5612" + sha256 cellar: :any, arm64_sequoia: "fe4522c0672e68076e5a6caabade89eb43f0842af5d10a2f6b9bffbf1c60918e" + sha256 cellar: :any, arm64_sonoma: "8e25450053fa00c0c96a1a458b8a71eb6f01eb2dfff70ae9621106f863b2bbf5" + sha256 cellar: :any, sonoma: "94c0e9f2d3d3723769cc8084e3bef5e15f0990844782743a2f6fc501a7fc640c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1802b46a69c8458733001a41570a683c32bbccb682dc8dd9440af5ba774fc84f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c8606b46a5628d4ac64761e1bd0e5ae118c18267cbae6b9cbd8f2c0e95a26a8" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "qtbase" + + on_linux do + depends_on "glib" + depends_on "libsecret" + end + + def install + args = %w[-DBUILD_TRANSLATIONS=OFF -DBUILD_WITH_QT6=ON] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QKeychain::ReadPasswordJob job(QLatin1String("")); + return 0; + } + CPP + flags = ["-I#{Formula["qtbase"].opt_include}"] + flags += if OS.mac? + [ + "-F#{Formula["qtbase"].opt_lib}", + "-framework", "QtCore" + ] + else + [ + "-fPIC", + "-L#{Formula["qtbase"].opt_lib}", "-lQt6Core", + "-Wl,-rpath,#{Formula["qtbase"].opt_lib}", + "-Wl,-rpath,#{lib}" + ] + end + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++17", "-I#{include}", + "-L#{lib}", "-lqt6keychain", *flags + system "./test" + end +end diff --git a/Formula/q/qtlanguageserver.rb b/Formula/q/qtlanguageserver.rb new file mode 100644 index 0000000000000..ee319ccce5122 --- /dev/null +++ b/Formula/q/qtlanguageserver.rb @@ -0,0 +1,96 @@ +class Qtlanguageserver < Formula + desc "Implementation of the Language Server Protocol and JSON-RPC" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtlanguageserver-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtlanguageserver-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtlanguageserver-everywhere-src-6.9.3.tar.xz" + sha256 "c8e8a6c4f8cb25626922e78f398b13b02eea21c4cc5525ffc2a0da7469369d33" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtlanguageserver.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0d4229ffcdccf46c7de6c85f6c172fe4d32e98c4de97eac26308d325d101285e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "224eff3ca1a5461c2e30e2a2ce2e08255c5ef59e6e155a101fd76f89f0ce3658" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e70336d46487107ec97a74126f4abe4fb81eb376f1fbb44194ee330b690330c" + sha256 cellar: :any_skip_relocation, sonoma: "c02e42a854bdce647fbdbee94996bd4ef0527d55768b1a724279d003a4589a66" + sha256 cellar: :any_skip_relocation, arm64_linux: "38f6f031e539929940c80febf7c5720e4efeae36b98f626a6a9a4ac8be9acca9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f88fd9cdb6fde0da393d684f91fd8d80a7edbbbcce56d33a8131ffa838f464f5" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + + depends_on "qtbase" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS JsonRpcPrivate) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::JsonRpcPrivate) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += jsonrpc_private + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + + class TestTransport : public QJsonRpcTransport { + public: + void sendMessage(const QJsonDocument &) final {} + void receiveData(const QByteArray &) final {} + }; + + int main(void) { + QJsonRpcProtocol protocol; + TestTransport transport; + protocol.setTransport(&transport); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + end +end diff --git a/Formula/q/qtlocation.rb b/Formula/q/qtlocation.rb new file mode 100644 index 0000000000000..43142d89f5b1d --- /dev/null +++ b/Formula/q/qtlocation.rb @@ -0,0 +1,110 @@ +class Qtlocation < Formula + desc "Provides C++ interfaces to retrieve location and navigational information" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtlocation-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtlocation-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtlocation-everywhere-src-6.9.3.tar.xz" + sha256 "141227d1fdaf4e1574c99127b2eb91ab171107bf067121aecb03b618b2e71605" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtlocation.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "831359e108cbc2fd02990922ce88684785cc75a32b41c803879515745f26382b" + sha256 cellar: :any, arm64_sequoia: "b23e22d09ff487b3fabcf34448e6e425533a2e0c73bb0d9eca119284ad1cba3b" + sha256 cellar: :any, arm64_sonoma: "4e8930e10b00a68c2d89dc6bccb2b9b2eec38ee3cf2a68a4bf007ba35a5d214b" + sha256 cellar: :any, sonoma: "5ddab821cdfd09656ba0fce4078573f82aa16e660ddb064b2ea30fb7ead50dc6" + sha256 cellar: :any_skip_relocation, arm64_linux: "80fbc6b07511d2d1e483adfe2fdf8dbad85e74aae4916f31418d57f424fce55e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c1ce01496cff0cd094e8466b9bbbea6e56f095a250292d12b1104c88cdda125" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtpositioning" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Location) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Location) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += location + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + #include + #include + + int main(void) { + QPlace testObj; + testObj.setPlaceId("testId"); + QPlaceAttribute paymentMethods; + paymentMethods.setLabel("Payment methods"); + paymentMethods.setText("Visa"); + testObj.setExtendedAttribute(QStringLiteral("paymentMethods"), paymentMethods); + QGeoLocation loc; + loc.setCoordinate(QGeoCoordinate(10,20)); + testObj.setLocation(loc); + QPlace *testObjPtr = new QPlace(testObj); + Q_ASSERT(testObjPtr != NULL); + Q_ASSERT(*testObjPtr == testObj); + delete testObjPtr; + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Location").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtlottie.rb b/Formula/q/qtlottie.rb new file mode 100644 index 0000000000000..d7cfa60072c6a --- /dev/null +++ b/Formula/q/qtlottie.rb @@ -0,0 +1,86 @@ +class Qtlottie < Formula + desc "Display graphics and animations exported by the Bodymovin plugin" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtlottie-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtlottie-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtlottie-everywhere-src-6.9.3.tar.xz" + sha256 "116e105574f0bb442b80251fa60b88d1c9fe55db64e11b549e8fc2063b90df33" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtlottie.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "638ca0b85bad94892f667db6cab7b794d8d4e12d248ce452877a1f88d171b59f" + sha256 cellar: :any, arm64_sequoia: "2bdb25e54cd94248e580137ce08b74f380b3868286702cc043630d89ff3a56de" + sha256 cellar: :any, arm64_sonoma: "388c2261688b21086cfd85bfae8f9a8db9833cee13fb47ad27cd2b7cc6912832" + sha256 cellar: :any, sonoma: "159a91be2af2925b26a0eb2ebb25d987184e68d77e5b915db772c52853e85276" + sha256 cellar: :any_skip_relocation, arm64_linux: "6526e1149d8e85929bb675933a2fcad7d2e610b1a5b1690297d2f87ec19687f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "619b473ce6b5b3230a3667ba7b6e86a5532202057157d839769b9a4867165b35" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + resource "rect_rotate.json" do + url "https://raw.githubusercontent.com/qt/qtlottie/888fb0ca5d5e18fe5d8b88ed721544bf204ac158/tests/manual/testApp/rect_rotate.json" + sha256 "d0d5d2b036c04d4b2c1211d062fe1c123053ea0d4639cd33a2cec724236bf328" + end + testpath.install resource("rect_rotate.json") + + # Based on https://github.com/qt/qtlottie/blob/dev/tests/manual/testApp/main.qml + (testpath/"test.qml").write <<~QML + import QtQuick + import QtQuick.Window + import Qt.labs.lottieqt + + Window { + visible: true + width: animContainer.width + height: animContainer.height + title: qsTr("Animation test") + color: "black" + + Item { + id: animContainer + width: childrenRect.width + height: childrenRect.height + + LottieAnimation { + id: bmAnim + quality: LottieAnimation.MediumQuality + source: "rect_rotate.json" + onFinished: Qt.quit() + } + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? + system Formula["qtdeclarative"].bin/"qml", "test.qml" + end +end diff --git a/Formula/q/qtmultimedia.rb b/Formula/q/qtmultimedia.rb new file mode 100644 index 0000000000000..7ef156d304c07 --- /dev/null +++ b/Formula/q/qtmultimedia.rb @@ -0,0 +1,131 @@ +class Qtmultimedia < Formula + desc "Provides APIs for playing back and recording audiovisual content" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtmultimedia-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtmultimedia-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtmultimedia-everywhere-src-6.9.3.tar.xz" + sha256 "a275bee7ea60c91851236acdf99d76b891da90f428b68f51fe332354f19b86f5" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { all_of: ["MPL-2.0", "BSD-3-Clause"] }, # bundled eigen + "Apache-2.0", # bundled resonance-audio + "BSD-3-Clause", # bundled pffft; *.cmake + "GPL-3.0-only", # Qt6MultimediaTestLib + "MIT", # bundled signalsmith-stretch (Linux) + ] + head "https://code.qt.io/qt/qtmultimedia.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8c98117497f1e2f5bd945d05bc3b3f067d7bd5bd3c905f48d702f3ea57805d2c" + sha256 cellar: :any, arm64_sequoia: "6b3f315f1376b882bbaa53ae8aa1e2332f4d59bfb3dfdc66707f960f7062792d" + sha256 cellar: :any, arm64_sonoma: "2e907662de15c622360bc5b660cbf65161b6751f4014ec32cc0fe1c2d985b545" + sha256 cellar: :any, sonoma: "d3e94fc3374bd95e2239c636fd8919153d9a1211844070993086b373d98218ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "8091085974b33f71688fda156e04ac91ff9c62e87334f4464746cc7a6b96dfe3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecbdada04e1d7ec73800531f1f3bd52a9f6bea16f12b54e8ceb12f3b4b64b31f" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "qtshadertools" => :build + depends_on "vulkan-headers" => :build + depends_on "pkgconf" => :test + + depends_on macos: :ventura + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtquick3d" + + on_macos do + depends_on "qtshadertools" + end + + on_ventura do + depends_on xcode: ["15.0", :build] # for `@available(macOS 14)` + end + + on_linux do + depends_on "ffmpeg" + depends_on "glib" + depends_on "gstreamer" + depends_on "libx11" + depends_on "libxext" + depends_on "libxrandr" + depends_on "mesa" + depends_on "pulseaudio" + end + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + if OS.mac? + args << "-DQT_FEATURE_ffmpeg=OFF" + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" + end + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + modules = %w[Core Multimedia] + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS #{modules.join(" ")}) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::#{modules.join(" Qt6::")}) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += #{modules.join(" ").downcase} + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + #include + + int main(int argc, char *argv[]) { + QCoreApplication app(argc, argv); + QTextStream out(stdout); + for(const QAudioDevice &device : QMediaDevices::audioInputs()) { + out << "ID: " << device.id() << Qt::endl; + } + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6#{modules.join(" Qt6")}").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtnetworkauth.rb b/Formula/q/qtnetworkauth.rb new file mode 100644 index 0000000000000..93b0669ee9b8f --- /dev/null +++ b/Formula/q/qtnetworkauth.rb @@ -0,0 +1,96 @@ +class Qtnetworkauth < Formula + desc "Provides support for OAuth-based authorization to online services" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtnetworkauth-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtnetworkauth-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtnetworkauth-everywhere-src-6.9.3.tar.xz" + sha256 "67d9dc47ed133e22aa78bedef53963bee3761318e5e74dc98f82ad9814cc7ec7" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtnetworkauth.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab399edf6cc959b73a5efb50875654f815f49b46789f3f1554d191b34ed20a24" + sha256 cellar: :any, arm64_sequoia: "5377a05fb0d37fd2a3ade99f81275728ec8a48af682da3a9cbb59f2986a83943" + sha256 cellar: :any, arm64_sonoma: "8d8ad5c1ebb1011236058ee0d21fe06f665010072a9f578e7ccc8b2a7fdbd62d" + sha256 cellar: :any, sonoma: "3c569735e684a5926c427b6afed07add72853779889a649d2f30c5215a077bf8" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d9cb0f09c8be38179c5098167c34466751869600c47d596435a1201c1354911" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fef5988a3cb2a31a2f2673aa4ade0d78512f681ef5350fd7fca1020b31f7e0be" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS NetworkAuth) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::NetworkAuth) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += networkauth + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + + int main(void) { + QOAuth2AuthorizationCodeFlow oauth2; + auto replyHandler = new QOAuthHttpServerReplyHandler(QHostAddress::Any, 1337); + oauth2.setReplyHandler(replyHandler); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6NetworkAuth").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtpositioning.rb b/Formula/q/qtpositioning.rb new file mode 100644 index 0000000000000..fd463d49dcb79 --- /dev/null +++ b/Formula/q/qtpositioning.rb @@ -0,0 +1,96 @@ +class Qtpositioning < Formula + desc "Provides access to position, satellite info and area monitoring classes" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtpositioning-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtpositioning-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtpositioning-everywhere-src-6.9.3.tar.xz" + sha256 "0c87c980f704c17aadaf0bf8a03845dd0a60cc0313be24bd7b5b90685d5835b4" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # bundled poly2tri; *.cmake + "BSL-1.0", # bundled clipper + "MIT", # bundled clip2tri + ] + head "https://code.qt.io/qt/qtpositioning.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0527cd554ef27823760fc1b58b749f484c2a54da05745188b6e8da6fd8505667" + sha256 cellar: :any, arm64_sequoia: "752f8c9bddbc745cb99897f30d918b7bbf5481faf19031df5af6d6fa7034953b" + sha256 cellar: :any, arm64_sonoma: "6d51d148e6cc63c0b1a0178fae03dbc5f1b7f231fe27904f87449eca158e1564" + sha256 cellar: :any, sonoma: "939737840db8646bcf700862955b1037d7fc15c3e63ec249973b4ffe97c8f637" + sha256 cellar: :any_skip_relocation, arm64_linux: "b857a07595e1962e101b453e07db1a0acbfaff243a18b572c7ff9407350b8b0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d21a7d8372cbd1fe44966d5eba3fab9f189d8331c504249e905e36bf1430189" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtserialport" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Positioning) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Positioning) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += positioning + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + Q_ASSERT(QGeoPositionInfoSource::availableSources().contains("nmea")); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Positioning").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtquick3d.rb b/Formula/q/qtquick3d.rb new file mode 100644 index 0000000000000..e0837260cdb77 --- /dev/null +++ b/Formula/q/qtquick3d.rb @@ -0,0 +1,117 @@ +class Qtquick3d < Formula + desc "Provides a high-level API for creating 3D content or UIs based on Qt Quick" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtquick3d-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtquick3d-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtquick3d-everywhere-src-6.9.3.tar.xz" + sha256 "91b270049f38ad2b7370c2e6edc72c19ed7d5d2281d914457586f29daccace73" + license all_of: [ + "GPL-3.0-only", + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + "Apache-2.0", # bundled embree; bundled openxr + "BSD-3-Clause", # bundled tinyexr; *.cmake + "MIT", # bundled jsoncpp + ] + head "https://code.qt.io/qt/qtquick3d.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "79885a388c2b7f028a61e79edd28fa996cf0a0da9b65e2ed5cf04c620baec428" + sha256 cellar: :any, arm64_sequoia: "53d5d526f7c5cbfc00784c394d79c9ee0116956c6be33ecb0d5e6709638184ca" + sha256 cellar: :any, arm64_sonoma: "4ef0671faa485029e32512124fa6d03fcfa27bc3eead1fde5023699abeaac622" + sha256 cellar: :any, sonoma: "afbcecc705bd9163dfb28a1b87249ff8301f5e09fa8b9c9a9f7bcf2ffef7cd78" + sha256 cellar: :any_skip_relocation, arm64_linux: "217ed5235e03f772a6531a333f10f1da3ca88a2f6c0081bf649d080758a51882" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58b559aa384660f248f828ddf6cdcc96e43470468e43620735a2e28ee15a6575" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "vulkan-headers" => :build + depends_on "pkgconf" => :test + + depends_on "assimp" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtquicktimeline" + depends_on "qtshadertools" + + uses_from_macos "zlib" + + # Apply Arch Linux patches for assimp 6 support + # Issue ref: https://bugreports.qt.io/browse/QTBUG-137996 + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-quick3d/-/raw/2c6f918ee81adb61290cf56453c2d67e5dce259f/assimp-6.patch" + sha256 "573f00cdad90d77786fba80066d61d5ee97fc56a8b11d0896949acd16bda8e91" + end + + def install + rm_r("src/3rdparty/assimp") + + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_system_assimp=ON + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Quick3D) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Quick3D) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += quick3d + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + + int main(int argc, char *argv[]) { + QGuiApplication app(argc, argv); + QSurfaceFormat::setDefaultFormat(QQuick3D::idealSurfaceFormat(4)); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Quick3D").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtquick3dphysics.rb b/Formula/q/qtquick3dphysics.rb new file mode 100644 index 0000000000000..35ab90ad42e62 --- /dev/null +++ b/Formula/q/qtquick3dphysics.rb @@ -0,0 +1,127 @@ +class Qtquick3dphysics < Formula + desc "High-level QML module adding physical simulation capabilities to Qt Quick 3D" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtquick3dphysics-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtquick3dphysics-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtquick3dphysics-everywhere-src-6.9.3.tar.xz" + sha256 "dcd7b22d745d249eb602c5d4d8af8a8e9d11217ccb42b3dd611bb047153b5a6e" + license all_of: [ + "GPL-3.0-only", + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # cooker + "BSD-3-Clause", # bundled PhysX; *.cmake + ] + head "https://code.qt.io/qt/qtquick3dphysics.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "821fb7522f7756940c7f86760f31c1d3171a7a2a3c01306c3931fd1c713bc180" + sha256 cellar: :any, arm64_sequoia: "ea3cf9eac77865b8a79a12e4cd4f0ff8617f902307b91ca30072fcb9a0b5dbc0" + sha256 cellar: :any, arm64_sonoma: "b548ef2824ee560dfeecdd114cc05fe2a0d453f12bc73b185dcaf62a3681799a" + sha256 cellar: :any, sonoma: "e4390f70dd85beff44fa7fae526836cffe45532c9acff35ec14b55aeaf7db196" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccdaee4f4fe6eca58805b1aba30d2798c239c6127ce9f8497c1c0d9f4d462c02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10884c823dcc774344c7fb8bfa38d90532ad4bcc8fbe815aeefb912651183faf" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtquick3d" + + on_macos do + depends_on "qtshadertools" + end + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + # https://github.com/qt/qtquick3dphysics/blob/dev/examples/quick3dphysics/simple/main.qml + (testpath/"test.qml").write <<~QML + import QtQuick + import QtQuick3D + import QtQuick3D.Helpers + import QtQuick3D.Physics + + Window { + width: 640 + height: 480 + visible: true + + PhysicsWorld { + scene: viewport.scene + } + View3D { + id: viewport + anchors.fill: parent + environment: SceneEnvironment { + clearColor: "#d6dbdf" + backgroundMode: SceneEnvironment.Color + } + PerspectiveCamera { + position: Qt.vector3d(-200, 100, 500) + eulerRotation: Qt.vector3d(-20, -20, 0) + clipFar: 5000 + clipNear: 1 + } + DirectionalLight { + eulerRotation.x: -45 + eulerRotation.y: 45 + castsShadow: true + brightness: 1 + shadowFactor: 50 + } + StaticRigidBody { + position: Qt.vector3d(0, -100, 0) + eulerRotation: Qt.vector3d(-90, 0, 0) + collisionShapes: PlaneShape {} + Model { + source: "#Rectangle" + scale: Qt.vector3d(10, 10, 1) + materials: PrincipledMaterial { + baseColor: "green" + } + castsShadows: false + receivesShadows: true + } + } + DynamicRigidBody { + position: Qt.vector3d(-100, 100, 0) + collisionShapes: BoxShape { + id: boxShape + } + Model { + source: "#Cube" + materials: PrincipledMaterial { + baseColor: "yellow" + } + } + } + } + Timer { + interval: 2000 + running: true + onTriggered: Qt.quit() + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? + system Formula["qtdeclarative"].bin/"qml", "test.qml" + end +end diff --git a/Formula/q/qtquickeffectmaker.rb b/Formula/q/qtquickeffectmaker.rb new file mode 100644 index 0000000000000..c0091f84ef4a1 --- /dev/null +++ b/Formula/q/qtquickeffectmaker.rb @@ -0,0 +1,59 @@ +class Qtquickeffectmaker < Formula + desc "Tool to create custom Qt Quick shader effects" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtquickeffectmaker-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtquickeffectmaker-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtquickeffectmaker-everywhere-src-6.9.3.tar.xz" + sha256 "6bf0361d24a0865cba9d94ff169c64cd69ac5d90c85260c29ec84ee5c2a59912" + license all_of: [ + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + "BSD-3-Clause", # BlurHelper.qml + ] + head "https://code.qt.io/qt/qtquickeffectmaker.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a893524bbe82cdfed488af655dfd5a0c81b8ce5dc6b3ded527c8fd454776a76" + sha256 cellar: :any, arm64_sequoia: "8d1a4e9a7b3b73527846100eca76403824a6dd7d8197f09063dc3f372f2e687d" + sha256 cellar: :any, arm64_sonoma: "a7bb6d986ce05d5944ff0f1a3d020bf8d33ffcb0be5424789f0082b8039ffd6d" + sha256 cellar: :any, sonoma: "4c3b005e4a97bb2243b6e7f591c27a4da2f2040c75d0f1e587c63d99b828a19e" + sha256 cellar: :any_skip_relocation, arm64_linux: "56e1b9cd2562345d7aa91f7a6b5f5e4c715f99478815f5f4306b868bcba828fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "978ad9f866e424a5ca384c2cb0c4e0c6269ad2a39893bb5e5a12d23c0788a9e4" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtquick3d" + depends_on "qtshadertools" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + return unless OS.mac? + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") + + bin.glob("*.app") do |app| + libexec.install app + bin.write_exec_script libexec/app.basename/"Contents/MacOS"/app.stem + end + end + + test do + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_match "Qt Quick Effect Maker", shell_output("#{bin}/qqem --help") + end +end diff --git a/Formula/q/qtquicktimeline.rb b/Formula/q/qtquicktimeline.rb new file mode 100644 index 0000000000000..4452e4ff63319 --- /dev/null +++ b/Formula/q/qtquicktimeline.rb @@ -0,0 +1,86 @@ +class Qtquicktimeline < Formula + desc "Enables keyframe-based animations and parameterization" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtquicktimeline-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtquicktimeline-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtquicktimeline-everywhere-src-6.9.3.tar.xz" + sha256 "284f4ba65ea71fa32751525c845f540c99d2f86fed88387e8c3d5869cf6c11f7" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtquicktimeline.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e5ab96426a4d5bc5380466047a012c132a84a1728a77e6b27c19a16ab86fdc4" + sha256 cellar: :any, arm64_sequoia: "b88713278fbdd593b1e7039f6a10d58dcad1e60f8052cb3cb778edfdf5db3aa2" + sha256 cellar: :any, arm64_sonoma: "c709c762e9bfdf072debaca4350e3a771dca1f938e34105a6c69851d907a334f" + sha256 cellar: :any, sonoma: "c7359b758c5a20e3246b652739f688937f3a29e4846b4ba42d1b54144181881a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b109e589563914d9675744a0a7fa23c5b08517708d7a8ba69f739af1eb9ab5b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ef59c4ebf0c10f60ddf24312cea5bbcd8eef955df2a5f702fc3c890dc8470ec" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"test.qml").write <<~QML + import QtQuick 2.0 + import QtQuick.Timeline 1.0 + + Item { + Timeline { + id: timeline + startFrame: 0 + endFrame: 100 + enabled: true + animations: [ + TimelineAnimation { + duration: 1000 + from: 0 + to: 100 + running: true + onRunningChanged: { if(!running) { Qt.quit() } } + } + ] + KeyframeGroup { + target: rectangle + property: "color" + Keyframe { frame: 0; value: "red" } + Keyframe { frame: 100; value: "blue" } + } + } + Rectangle { + id: rectangle + width: 50 + height: 50 + color: "red" + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? + system Formula["qtdeclarative"].bin/"qml", "test.qml" + end +end diff --git a/Formula/q/qtremoteobjects.rb b/Formula/q/qtremoteobjects.rb new file mode 100644 index 0000000000000..37b8303c2023c --- /dev/null +++ b/Formula/q/qtremoteobjects.rb @@ -0,0 +1,95 @@ +class Qtremoteobjects < Formula + desc "Provides APIs for inter-process communication" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtremoteobjects-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtremoteobjects-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtremoteobjects-everywhere-src-6.9.3.tar.xz" + sha256 "98987c0055d4e1a6d31dac85c3445d99ed8142c21995f70b391ef0ebafaad85b" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # repc + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtremoteobjects.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "577d93ff23c63974f04bf0ce68b5301944deff455e49a3cc7123dcd596a12dbb" + sha256 cellar: :any, arm64_sequoia: "c780c6033c163f66e55a4cf19a6cf2312323008517352977885c69fa5be0a94c" + sha256 cellar: :any, arm64_sonoma: "135cda0ed437bd28a541d0ac7430f2bf2b1764aebedd1a9f5a5f1501a5b0f90e" + sha256 cellar: :any, sonoma: "feec346ed5396597e88c0a4a2a7717247a903318760118298c550af9674faffc" + sha256 cellar: :any_skip_relocation, arm64_linux: "71ac89d7ba9469e98f644f85817cbd616949543a1c492f21970d5bf5b9cf85c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cfc7c94c958908102f324514ebb26bcce192383c5554aec6329f85ae1134d5c" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::RemoteObjects) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += remoteobjects + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + QRemoteObjectHost node(QUrl(QStringLiteral("local:replica"))); + QRemoteObjectRegistryHost node2(QUrl(QStringLiteral("local:registry"))); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6RemoteObjects").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtscxml.rb b/Formula/q/qtscxml.rb new file mode 100644 index 0000000000000..519ea13d9c5d4 --- /dev/null +++ b/Formula/q/qtscxml.rb @@ -0,0 +1,111 @@ +class Qtscxml < Formula + desc "Provides functionality to create state machines from SCXML files" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtscxml-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtscxml-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtscxml-everywhere-src-6.9.3.tar.xz" + sha256 "f389c0c051df908eae392fbe94a8513e6fe15f88399d88fd33a763165f5b34b7" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qscxmlc + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtscxml.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5c723564b1130e6030944d3eb19b844e169b0768380f8e4e91044540eb609b3a" + sha256 cellar: :any, arm64_sequoia: "004c40cecb4b10056eb19a8e47637d9c00b58160735c255507930b72741ce927" + sha256 cellar: :any, arm64_sonoma: "95663d1f120f49b7d62c4dbe805004c2d888f4e1c19c1b7ecf316bd880972759" + sha256 cellar: :any, sonoma: "46b06c2375955e2ee1e7597006f1eb3cdf55fbf660f10c8cb5a3fd6f28853cc5" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4c278705537169c0689b35dc2875eda465d9b7c6aaeb7c0a1ae17e93ca5f27e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e883ccfcb801ac56233c52c5d15c05ae8e290dd3a24c049e87be34eddba9ecb" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Scxml) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Scxml) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += scxml + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"statemachine.scxml").write <<~XML + + + + + + + XML + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + + int main(void) { + QScopedPointer stateMachine( + QScxmlStateMachine::fromFile(QString("#{testpath}/statemachine.scxml"))); + Q_ASSERT(!stateMachine.isNull()); + Q_ASSERT(stateMachine->parseErrors().isEmpty()); + auto states = stateMachine->stateNames(); + Q_ASSERT(states.size() == 3); + Q_ASSERT(states.at(1) == QLatin1String("b")); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Scxml").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtsensors.rb b/Formula/q/qtsensors.rb new file mode 100644 index 0000000000000..306627cda6646 --- /dev/null +++ b/Formula/q/qtsensors.rb @@ -0,0 +1,93 @@ +class Qtsensors < Formula + desc "Provides access to sensors via QML and C++ interfaces" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtsensors-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtsensors-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtsensors-everywhere-src-6.9.3.tar.xz" + sha256 "a2db5168e5f37631a4ad087deaed69abdfa0be6d182f56e8604764658df92f68" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtsensors.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "dca45295912da2383cad2f3e6779ed2aa96ff664699f195a12eec0f125352bdd" + sha256 cellar: :any, arm64_sequoia: "5b6bdfc6f3a672609e24dfd8e2d71b204583f8a71418a422d220cb2fd8ce690c" + sha256 cellar: :any, arm64_sonoma: "1635586cca09a521c0ee68324e21b3bf85ae9f37a9f5a146fc79cd7edf740afd" + sha256 cellar: :any, sonoma: "465beb97f05da8f693c3e84489142261c93b9c7bc4aa2d291f3132614ecbffe5" + sha256 cellar: :any_skip_relocation, arm64_linux: "9af92409ff64662bf3b4884b244b86be5bd1e25e73e065b50a139f4cfb42779f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0693ae7ee4d158061579435e40cc4c012984ab7ec61a0ac1817819dde01117f7" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Sensors) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Sensors) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += sensors + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + qDebug() << QSensor::sensorTypes(); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Sensors").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtserialbus.rb b/Formula/q/qtserialbus.rb new file mode 100644 index 0000000000000..66b8046387ee7 --- /dev/null +++ b/Formula/q/qtserialbus.rb @@ -0,0 +1,98 @@ +class Qtserialbus < Formula + desc "Provides access to serial industrial bus interfaces" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtserialbus-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtserialbus-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtserialbus-everywhere-src-6.9.3.tar.xz" + sha256 "0a8139da071afcb768b9d115f514a3e5783312530b2be69e3ee42b301d775bcf" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # canbusutil + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtserialbus.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "854ed284b3edd23113f1a8ad41071fe71e632b4025020eebf87798ee3d05babb" + sha256 cellar: :any, arm64_sequoia: "eedebb571a0bd192211723eb32c09a2d5bf397f2dd514c44e59800725d3db312" + sha256 cellar: :any, arm64_sonoma: "49d639f622ba2c58ed055c00ab083d6e4139c0e8cf4a77ac92e7a636a20190a0" + sha256 cellar: :any, sonoma: "f22b0a4973e5082e8d9ef5cd9e05b952146e45a8c3906c9ac8d63dc9d1a76cf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "28553934744f46bf5a20949ad5cbd788cc28c672fe010ca31bd27f8045394602" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2564f16918575baaac56edace8e77bd0320be2209bc39cdcd09758e0a3c30232" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtserialport" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS SerialBus) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::SerialBus) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += serialbus + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + + int main(void) { + // NOTE: Can safely ignore "Cannot load library" as it checks for proprietary drivers + for (auto device : QCanBus::instance()->availableDevices()) { + qDebug() << device.name(); + } + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6SerialBus").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtserialport.rb b/Formula/q/qtserialport.rb new file mode 100644 index 0000000000000..ba9b71fa0da0d --- /dev/null +++ b/Formula/q/qtserialport.rb @@ -0,0 +1,101 @@ +class Qtserialport < Formula + desc "Provides classes to interact with hardware and virtual serial ports" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtserialport-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtserialport-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtserialport-everywhere-src-6.9.3.tar.xz" + sha256 "4b18ec030ff2644698c3f5c776894d8ffe5d3174c964d9bd8668429c943e8298" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtserialport.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a8a89abf674c18356e224b863c50ef93de9443c4c00f4988a54c3a1719f1b184" + sha256 cellar: :any, arm64_sequoia: "e73491d79f3318f356bbedfdf194b30e24d4591c3c7e0daa3556d1977b812607" + sha256 cellar: :any, arm64_sonoma: "be4b0ebdc65e7f9c6162d08e86db40e90923bb6c70907591533f39c107e582b9" + sha256 cellar: :any, sonoma: "6c03a8b4fb34e06d80abdab55dc6821dbb7b04d7f508b980af32681e3ef91f02" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a6286dcb267ef4602cb8b11faba3a1ce80c19fd1affd2d0dca59bc3e59384ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6f4079925529e453d07694d63aa22a15a19cec659cce192559a3857832d67c9" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + + on_linux do + depends_on "pkgconf" => :build + depends_on "systemd" + end + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS SerialPort) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::SerialPort) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += serialport + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~'CPP' + #undef QT_NO_DEBUG + #include + #include + + int main(void) { + const auto serialPortInfos = QSerialPortInfo::availablePorts(); + for (const QSerialPortInfo &portInfo : serialPortInfos) { + qDebug() << "Port:" << portInfo.portName() << "\n" + << "Location:" << portInfo.systemLocation() << "\n"; + } + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6SerialPort").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtshadertools.rb b/Formula/q/qtshadertools.rb new file mode 100644 index 0000000000000..884b25abe4424 --- /dev/null +++ b/Formula/q/qtshadertools.rb @@ -0,0 +1,72 @@ +class Qtshadertools < Formula + desc "Provides tools for the cross-platform Qt shader pipeline" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtshadertools-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtshadertools-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtshadertools-everywhere-src-6.9.3.tar.xz" + sha256 "629804ee86a35503e4b616f9ab5175caef3da07bd771cf88a24da3b5d4284567" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qsb + { all_of: ["Apache-2.0", "MIT-Khronos-old"] }, # bundled SPIRV-Cross + { all_of: ["BSD-3-Clause", "MIT-Khronos-old", "Apache-2.0", "AML-glslang", + "GPL-3.0-or-later" => { with: "Bison-exception-2.2" }] }, # bundled glslang + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtshadertools.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bb579540bf38f45c33f8608e40022c7000e682eb4186d84264f8f240770a4e85" + sha256 cellar: :any, arm64_sequoia: "205156158b29aa23357605ad9e2be6a4d784641dbf2dd42ac6d69107375ca84d" + sha256 cellar: :any, arm64_sonoma: "1e54af54279cb0d96388f878e4f8ffb4f1b46a22ef0ae292b86a5631b951b377" + sha256 cellar: :any, sonoma: "21f5464d71410117011e6035ab999264e902d90d28c91649d42b2aaded0f3830" + sha256 cellar: :any_skip_relocation, arm64_linux: "64925118158a7861dd2d6291a7cee093ac87bbdc69db3857f8e87876e769e2a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de225d737f69ffacd8b1b130fa55dc1c6e844e5df18d876c73653821a947cc5a" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + + depends_on "qtbase" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"shader.frag").write <<~GLSL + #version 440 + + layout(location = 0) in vec2 v_texcoord; + layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D tex; + + layout(std140, binding = 0) uniform buf { + float uAlpha; + }; + + void main() { + vec4 c = texture(tex, v_texcoord); + fragColor = vec4(c.rgb, uAlpha); + } + GLSL + + ENV["LC_ALL"] = "en_US.UTF-8" + system bin/"qsb", "--output", "shader.frag.qsb", "shader.frag" + assert_path_exists testpath/"shader.frag.qsb" + assert_match "Shader 0: SPIR-V 100", shell_output("#{bin}/qsb --dump shader.frag.qsb") + end +end diff --git a/Formula/q/qtspeech.rb b/Formula/q/qtspeech.rb new file mode 100644 index 0000000000000..6b1a5e0ba48c4 --- /dev/null +++ b/Formula/q/qtspeech.rb @@ -0,0 +1,94 @@ +class Qtspeech < Formula + desc "Enables access to text-to-speech engines" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtspeech-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtspeech-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtspeech-everywhere-src-6.9.3.tar.xz" + sha256 "f86f5a4c742fb86ccc6e90ee72a9213150986575c3d238829a4b48a28bc9ab3e" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtspeech.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ade8f12a77ecc4e7a9fec711f8edd06d6bc9c151cb6c4b2425f3ab2182601cc7" + sha256 cellar: :any, arm64_sequoia: "5ed7f091c061e87dafff8a91d1133b975b3e7f2da8490e7d01fe409483c46125" + sha256 cellar: :any, arm64_sonoma: "de34302e9338a9ea4b837526d5fb8df7310ebda11caf609bc0834811b9c29cc2" + sha256 cellar: :any, sonoma: "e10253cae4f4c384f17743fd8750d66b3589bd20c56bf203990be678ae25de62" + sha256 cellar: :any_skip_relocation, arm64_linux: "edae18bb214bc1d6821d72d030dd5398dc0411b76f3decd6d36aba700ecda803" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1855d1dd465f4f8c9ab8a8f6bec354b5ca062794d072b6d0eb21438d4478683" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtmultimedia" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS TextToSpeech) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::TextToSpeech) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += texttospeech + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + Q_ASSERT(QTextToSpeech::availableEngines().contains("mock")); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6TextToSpeech").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtsvg.rb b/Formula/q/qtsvg.rb new file mode 100644 index 0000000000000..4829ed00f6041 --- /dev/null +++ b/Formula/q/qtsvg.rb @@ -0,0 +1,98 @@ +class Qtsvg < Formula + desc "Classes for displaying the contents of SVG files" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtsvg-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtsvg-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtsvg-everywhere-src-6.9.3.tar.xz" + sha256 "db76aa3358cbbe6fce7da576ff4669cb9801920188c750d3b12783bbe97026e2" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtsvg.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1b999d5ec5374d07bf0bd9054bbfa07e5c99600a2a66ac1443a60f82db322ca8" + sha256 cellar: :any, arm64_sequoia: "1c957a3056610a7c6df750b38cb77e1f36be981755f8c6b13be05fd5bd9c0b15" + sha256 cellar: :any, arm64_sonoma: "207ffa2660c6101fcdaeb82fb96f3f4fe01908c0c8e5d5768857ed74dfaca5cb" + sha256 cellar: :any, sonoma: "25d2a966b420dedf3c935cb08339b4b57bc0fccf3e9c6e21f754cd82fdb6e819" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cbfec9d62bdfca1c483c1cd565ee4d3b1c436dd200063a81efc00ff02484227" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0520e7c62d0c903d2bd5a75c5e8493ea13e0f21b0dd8d72c96e5f65a17509eee" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + + uses_from_macos "zlib" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Svg) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Svg) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += svg + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + + int main(void) { + QSvgGenerator generator; + const auto &list = QImageReader::supportedImageFormats(); + Q_ASSERT(list.contains("svg")); + Q_ASSERT(list.contains("svgz")); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6Svg").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qttools.rb b/Formula/q/qttools.rb new file mode 100644 index 0000000000000..7f645d84487ef --- /dev/null +++ b/Formula/q/qttools.rb @@ -0,0 +1,126 @@ +class Qttools < Formula + desc "Facilitate the design, development, testing and deployment of applications" + homepage "https://www.qt.io/" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, + "BSD-3-Clause", # *.cmake + "BSL-1.0", # bundled catch2 + ] + head "https://code.qt.io/qt/qttools.git", branch: "dev" + + stable do + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qttools-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qttools-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qttools-everywhere-src-6.9.3.tar.xz" + sha256 "0cf7ab0e975fc57f5ce1375576a0a76e9ede25e6b01db3cf2339cd4d9750b4e9" + + # Backport fix for build on Linux + patch do + url "https://github.com/qt/qttools/commit/b676278a24eb880eeeed35bbf203a76950a9ab4e.patch?full_index=1" + sha256 "36740336b401055ca1699787921d474377ec65f0b041351141b158b9ced7ef42" + end + end + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1118eea06e96114a12fe3283ca95d4635a1df5c61ef9bac1aa32e89c6270b3d2" + sha256 cellar: :any, arm64_sequoia: "0f55c7a0531956e28a0d43709732dc5aa64d46e00036919512fd8e5667de5a96" + sha256 cellar: :any, arm64_sonoma: "77936861c7a0e8ef304d1de1984e77f11408085fcdcbd3fe74f40f2b935e7ff7" + sha256 cellar: :any, sonoma: "c03e46e01c366253d940a8466fbe385ef049f67bbb728ca5a5e0fd8fbd3611e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "fffabae308dcaee15d75c9662c0b78c12759073552a598519950e4d98d114c27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ea8fb896bfb7495515265341360c6090845fa68fc67b9bbee03a1a91d0405a2" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "vulkan-headers" => :build + + depends_on "litehtml" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "zstd" + + on_macos do + depends_on "gumbo-parser" + end + + def install + rm_r("src/assistant/qlitehtml/src/3rdparty/litehtml") + + # Modify Assistant path as we manually move `*.app` bundles from `bin` to `prefix`. + # This fixes invocation of Assistant via the Help menu of apps like Designer and + # Linguist as they originally relied on Assistant.app being in `bin`. + assistant_files = %w[ + src/designer/src/designer/assistantclient.cpp + src/linguist/linguist/mainwindow.cpp + ] + inreplace assistant_files, '"Assistant.app/Contents/MacOS/Assistant"', '"Assistant"' + + # We disable clang feature to avoid linkage to `llvm`. This is how we have always + # built on macOS and it prevents complicating `llvm` version bumps on Linux. + args = %W[ + -DFEATURE_clang=OFF + -DCMAKE_STAGING_PREFIX=#{prefix} + -DQLITEHTML_USE_SYSTEM_LITEHTML=ON + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + return unless OS.mac? + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") + + bin.glob("*.app") do |app| + libexec.install app + bin.write_exec_script libexec/app.basename/"Contents/MacOS"/app.stem + end + end + + test do + # Based on https://doc.qt.io/qt-6/qtlinguist-hellotr-example.html + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(hellotr LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Core LinguistTools) + qt_standard_project_setup(I18N_TRANSLATED_LANGUAGES la) + qt_add_executable(hellotr main.cpp) + qt6_add_translations(hellotr QM_FILES_OUTPUT_VARIABLE qm_files) + target_link_libraries(hellotr PUBLIC Qt::Core) + CMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + + int main(void) { + QTranslator translator; + Q_UNUSED(translator.load("hellotr_la")); + std::cout << translator.translate("main", "Hello world!").toStdString(); + return 0; + } + CPP + + (testpath/"hellotr_la.ts").write <<~XML + + + + XML + + ENV["LC_ALL"] = "en_US.UTF-8" + system "cmake", "." + system "cmake", "--build", ".", "--target", "update_translations" + inreplace "hellotr_la.ts", '', + "Orbis, te saluto!" + system "cmake", "--build", "." + assert_equal "Orbis, te saluto!", shell_output("./hellotr") + end +end diff --git a/Formula/q/qttranslations.rb b/Formula/q/qttranslations.rb new file mode 100644 index 0000000000000..26e1e36d060b7 --- /dev/null +++ b/Formula/q/qttranslations.rb @@ -0,0 +1,67 @@ +class Qttranslations < Formula + desc "Qt translation catalogs" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qttranslations-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qttranslations-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qttranslations-everywhere-src-6.9.3.tar.xz" + sha256 "f36d545e6681b146fd79b3ebb74ef275e88694cf81eae8323327cae3bfc490a1" + license "BSD-3-Clause" + head "https://code.qt.io/qt/qttranslations.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b444965fa2e6815ced5a489dc9f9020d676cf86c0961738c0a8777bfdb3442cc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14b105e3e2d71c7a7d0781928d01de26f2223bc4a5682e54b7443394f84f81fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "65ff305605000a5ff86438ba7826130ce0741a67bca9f4a497a4201d7e429382" + sha256 cellar: :any_skip_relocation, sonoma: "36f2d1ff2cc9213b23e5e51be6d816bf53762673fdc344ff52f389b30e3cc64e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5314a36b867f31b8978508cc8d2aee0aa540e2d6a50487aec451582abc56d67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e5714a90b2b3bef43f1184686edc21d633f7c4e51cccc4a896e45f236defc56" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "qtbase" => [:build, :test] + depends_on "qttools" => :build + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS Core) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::Core) + CMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + #include + + int main(void) { + QTranslator translator; + Q_ASSERT(translator.load(QLocale::Spanish, "qt", "_", QLibraryInfo::path(QLibraryInfo::TranslationsPath))); + std::cout << translator.translate("CloseButton", "Close Tab").toStdString(); + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + assert_equal "Cerrar pestaña", shell_output("./build/test") + end +end diff --git a/Formula/q/qtvirtualkeyboard.rb b/Formula/q/qtvirtualkeyboard.rb new file mode 100644 index 0000000000000..0448da92e848a --- /dev/null +++ b/Formula/q/qtvirtualkeyboard.rb @@ -0,0 +1,85 @@ +class Qtvirtualkeyboard < Formula + desc "Provides an input framework and reference keyboard frontend" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtvirtualkeyboard-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtvirtualkeyboard-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtvirtualkeyboard-everywhere-src-6.9.3.tar.xz" + sha256 "a1a0d5c91c9e7fe608867718c152272feae8560d920effa59c2c84b6dd415534" + license all_of: [ + "GPL-3.0-only", + "Apache-2.0", # bundled openwnn, pinyin and tcime + "BSD-3-Clause", # bundled tcime; *.cmake + ] + head "https://code.qt.io/qt/qtvirtualkeyboard.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "78a84f372e813098650d43337913bf4112c3420136d4b64767cb5968fae8878c" + sha256 cellar: :any, arm64_sequoia: "ea7625eabe9a4c93c1866da81e1ba50bae0297c6e03b5f95f14fd7522b98d1e0" + sha256 cellar: :any, arm64_sonoma: "2010c623e221e4c520775236e7eedfe42e5cabba2434a5b5525073aa9b13e1b4" + sha256 cellar: :any, sonoma: "460f1745bcb772f68336ac4e6ff43a328a6628db1b2fc7ce1c5c5d28a5cd0af5" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ab62e97585753a9c834b12f2078add9d4e73fb46e5082cc9fabb9bb7e2f7573" + sha256 cellar: :any_skip_relocation, x86_64_linux: "752a918558c0469dadfee3a461ae4c61bd833a68280d8c50bd3f1ed5c168ddb2" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "hunspell" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtmultimedia" + depends_on "qtsvg" + + def install + rm_r("src/plugins/hunspell/3rdparty/hunspell") + + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_system_hunspell=ON + ] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"test.qml").write <<~QML + import QtQuick + import QtQuick.Window + import QtQuick.VirtualKeyboard + + Window { + visible: true + width: 640 + height: 480 + id: root + + InputPanel { + id: inputPanel + anchors.bottom: parent.bottom + width: root.width + } + Timer { + interval: 2000 + running: true + onTriggered: Qt.quit() + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? + system Formula["qtdeclarative"].bin/"qml", "test.qml" + end +end diff --git a/Formula/q/qtwayland.rb b/Formula/q/qtwayland.rb new file mode 100644 index 0000000000000..0b9c421974f6e --- /dev/null +++ b/Formula/q/qtwayland.rb @@ -0,0 +1,97 @@ +class Qtwayland < Formula + desc "Wayland platform plugin and QtWaylandCompositor API" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtwayland-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtwayland-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtwayland-everywhere-src-6.9.3.tar.xz" + sha256 "e413d4bc9263e80a465761debf8cb8317aa6b01e814b20046a05258e6573dadd" + license all_of: [ + "GPL-3.0-only", # WaylandCompositor + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, # WaylandClient + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qtwaylandscanner + "BSD-3-Clause", # *.cmake + "HPND", # src/3rdparty/protocol/text-input/v2/ + "LGPL-2.1-or-later", # src/3rdparty/protocol/appmenu/ + "MIT", # src/3rdparty/protocol/ + ] + head "https://code.qt.io/qt/qtwayland.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "e97508f41212028a79bf46340f0dcb228178eff02c22e5aa0ef192be7c885144" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b64595c383ef49bbfa53f62c4b736dbfebf6037af5c85c37ee21cd5671115b8b" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "vulkan-headers" => :build + + depends_on "libxkbcommon" + depends_on :linux + depends_on "mesa" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtsvg" + depends_on "wayland" + + def install + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + "-DCMAKE_STAGING_PREFIX=#{prefix}", + *std_cmake_args(install_prefix: HOMEBREW_PREFIX) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # https://github.com/qt/qtwayland/blob/dev/examples/wayland/minimal-qml/main.qml + (testpath/"test.qml").write <<~QML + import QtQuick + import QtQuick.Window + import QtWayland.Compositor + import QtWayland.Compositor.XdgShell + import QtWayland.Compositor.WlShell + import QtWayland.Compositor.IviApplication + + WaylandCompositor { + WaylandOutput { + sizeFollowsWindow: true + window: Window { + width: 1024 + height: 768 + visible: true + Repeater { + model: shellSurfaces + ShellSurfaceItem { + shellSurface: modelData + onSurfaceDestroyed: shellSurfaces.remove(index) + } + } + } + } + WlShell { + onWlShellSurfaceCreated: (shellSurface) => shellSurfaces.append({shellSurface: shellSurface}); + } + XdgShell { + onToplevelCreated: (toplevel, xdgSurface) => shellSurfaces.append({shellSurface: xdgSurface}); + } + IviApplication { + onIviSurfaceCreated: (iviSurface) => shellSurfaces.append({shellSurface: iviSurface}); + } + ListModel { id: shellSurfaces } + Timer { + interval: 2000 + running: true + onTriggered: Qt.quit() + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" + ENV["XDG_RUNTIME_DIR"] = testpath + system Formula["qtdeclarative"].bin/"qml", "test.qml" + end +end diff --git a/Formula/q/qtwebchannel.rb b/Formula/q/qtwebchannel.rb new file mode 100644 index 0000000000000..63a06134cf85a --- /dev/null +++ b/Formula/q/qtwebchannel.rb @@ -0,0 +1,102 @@ +class Qtwebchannel < Formula + desc "Bridges the gap between Qt applications and HTML/JavaScript" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtwebchannel-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtwebchannel-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtwebchannel-everywhere-src-6.9.3.tar.xz" + sha256 "9457bbc1e5a13d9cf277c1fc121cdeb0a21546abf7fba091779b7ce9806fa305" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtwebchannel.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "251c29737a4e6243453c8ded8268ade0fa651cfa3d2d930ff4c6a657c4ea0c06" + sha256 cellar: :any, arm64_sequoia: "28052c4594637a53dfdf9f2bcd777aa4099536804683a1d3bf91e7dc16bf5780" + sha256 cellar: :any, arm64_sonoma: "062a158a045c00529d538dbdb8c66ab3a761960546fbb5cf969cbd8fc03ec6a7" + sha256 cellar: :any, sonoma: "8892f43cf82fd849d38024a2c7aebc4e0c27f38770e9cb55b8d0edf9eb89ed3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "08d9c962e3dd1f1b3c40ad953d624b6fa33b5940e0f588c251115d3f7b6da05d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c48878bc36675db7e0c090eecd81d000abf759ffb0ee2ae90b222e9aac6360c" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS WebChannel) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::WebChannel) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += webchannel + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + #include + #include + #include + #include + + int main(void) { + QWebChannel channel; + QObject plain; + QHash objects; + objects[QStringLiteral("plain")] = &plain; + objects[QStringLiteral("channel")] = &channel; + channel.registerObjects(objects); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6WebChannel").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtwebengine.rb b/Formula/q/qtwebengine.rb new file mode 100644 index 0000000000000..82a42d870bb2b --- /dev/null +++ b/Formula/q/qtwebengine.rb @@ -0,0 +1,270 @@ +class Qtwebengine < Formula + include Language::Python::Virtualenv + + desc "Provides functionality for rendering regions of dynamic web content" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtwebengine-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtwebengine-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtwebengine-everywhere-src-6.9.3.tar.xz" + sha256 "d50b3b11d51dd876418cc36b4d6c96b4721e0aab773a3dd6beda606d46da8966" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + { "GPL-3.0-only" => { with: "Qt-GPL-exception-1.0" } }, # qwebengine_convert_dict; QtWebEngineProcess + "BSD-3-Clause", # *.cmake; main Chromium license + + # The following extra licenses are for Chromium's bundled libraries + # https://doc.qt.io/qt-6/qtwebengine-licensing.html#third-party-licenses + "Apache-2.0", # Abseil; Crashpad; FlatBuffers; libgav1; ... + "blessing", # sqlite + "BSD-2-Clause", # aom; cpuinfo; dav1d; libavif + "LGPL-2.1-or-later", # ffmpeg (macOS); speech-dispatcher (Linux) + "libpng-2.0", # libpng (macOS) + "MIT", # Brotli; CityHash; FP16; fast_float; ... + "MPL-1.1", # hunspell + "NCL", # PFFFT + "SGI-B-2.0", # mesa_headers + "SunPro", # fdlibm + "Zlib", # zlib (macOS) + :public_domain, # sigslot; SPL-SQRT-FLOOR + { all_of: ["ISC", "OpenSSL"] }, # boringssl, TODO: remove in Chromium 134+ + ] + head "https://code.qt.io/qt/qtwebengine.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fc061f1a6948b3cd55b56a75255926348bf7313f09f9d150bc8bd3c92c4c9d18" + sha256 cellar: :any, arm64_sequoia: "9df4c8809d485020236fc790ae397b5b2220e6cd26432ea03ad3c1eea8ea393f" + sha256 cellar: :any, arm64_sonoma: "bcd697cc0be3dcaf4648854c6b954ca8f70994c62ba8cc9dca2b457d15d8eadf" + sha256 cellar: :any, sonoma: "8812fb7078e8756e40290f9cd5e8c1f7ce4438b93591c8bca36a16bc14e57361" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d44bac3fb4e40746803fdba22decab93539a102434c31dfc6eab4b0ba48a48af" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "node" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => :build + depends_on "qttools" => :build + # Chromium needs Xcode 15.3+ and using LLVM Clang is not supported on macOS + # See https://bugreports.qt.io/browse/QTBUG-130922 + depends_on xcode: ["15.3", :build] # for metal and xcodebuild + + depends_on "libpng" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtpositioning" + depends_on "qtwebchannel" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "gperf" => :build + + uses_from_macos "krb5" # dlopen-ed in http_auth_gssapi_posix.cc + uses_from_macos "zlib" + + on_macos do + depends_on "qttools" + end + + on_linux do + depends_on "libva" => :build + depends_on "libxcursor" => :build + depends_on "libxi" => :build + depends_on "libxshmfence" => :build + depends_on "pulseaudio" => :build + depends_on "xorgproto" => :build + + depends_on "alsa-lib" + depends_on "dbus" + depends_on "expat" + depends_on "ffmpeg" + depends_on "fontconfig" + depends_on "freetype" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "libdrm" + depends_on "libevent" + depends_on "libtiff" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxcomposite" + depends_on "libxdamage" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxkbcommon" + depends_on "libxkbfile" + depends_on "libxml2" + depends_on "libxrandr" + depends_on "libxslt" + depends_on "libxtst" + depends_on "little-cms2" + depends_on "mesa" + depends_on "minizip" + depends_on "nspr" + depends_on "nss" + depends_on "openjpeg" + depends_on "opus" + depends_on "snappy" + depends_on "systemd" + depends_on "webp" + end + + pypi_packages package_name: "", + extra_packages: "html5lib" + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + + # Apply Fedora's upstreamed patch to support Python 3.14+ + # Ref: https://github.com/html5lib/html5lib-python/pull/583 + # Ref: https://src.fedoraproject.org/rpms/python-html5lib/blob/rawhide/f/583.patch + patch do + url "https://github.com/html5lib/html5lib-python/commit/379f9476c2a5ee370cd7ec856ee9092cace88499.patch?full_index=1" + sha256 "97ae2474704eedf72dc5d5c46ad86e2144c10022ea950cb1c42a9ad894705014" + end + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + def install + # Kill run early to avoid timing out and skipping dependent tests for Qt version bumps + # FIXME: Remove when we add a self-hosted runner and automatically handle via labels + github_arm64_linux = OS.linux? && Hardware::CPU.arm? && + ENV["HOMEBREW_GITHUB_ACTIONS"].present? && + ENV["GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED"].blank? + odie "Unable to build on GitHub-hosted arm64 Linux runner!" if github_arm64_linux + + python3 = "python3.14" + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + ENV.prepend_path "PYTHONPATH", venv.site_packages + + # Allow -march options to be passed through as Chromium builds runtime + # detected code and arm64 compilation will fail if shim removes -march + ENV.runtime_cpu_detection + + # Work around GN requiring clang in clangBasePath/bin + inreplace "src/3rdparty/chromium/build/toolchain/apple/toolchain.gni", + 'rebase_path("$clang_base_path/bin/", root_build_dir)', '""' + + args = %W[ + -DCMAKE_STAGING_PREFIX=#{prefix} + -DFEATURE_webengine_proprietary_codecs=ON + -DFEATURE_webengine_kerberos=ON + -DNinja_EXECUTABLE=#{which("ninja")} + ] + + # Chromium always uses bundled libraries on macOS + args += if OS.mac? + # Cannot deploy to version later than 14, due to functions obsoleted in macOS 15.0 + # https://bugreports.qt.io/browse/QTBUG-128900 + deploy = [MacOS.version, MacOSVersion.from_symbol(:sonoma)].min + + %W[ + -DCMAKE_OSX_DEPLOYMENT_TARGET=#{deploy}.0 + -DFEATURE_webengine_native_spellchecker=ON + -DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON + ] + else + # The vendored copy of `libvpx` is required for VA-API hardware acceleration, + # see https://codereview.qt-project.org/c/qt/qtwebengine/+/454908 + # + # The vendored copy of `re2` is used to avoid rebuilds with `re2` version + # bumps and due to frequent API incompatibilities in Qt's copy of Chromium. + %w[ + -DFEATURE_webengine_ozone_x11=ON + -DFEATURE_webengine_system_alsa=ON + -DFEATURE_webengine_system_ffmpeg=ON + -DFEATURE_webengine_system_freetype=ON + -DFEATURE_webengine_system_gbm=ON + -DFEATURE_webengine_system_harfbuzz=ON + -DFEATURE_webengine_system_icu=ON + -DFEATURE_webengine_system_lcms2=ON + -DFEATURE_webengine_system_libevent=ON + -DFEATURE_webengine_system_libjpeg=ON + -DFEATURE_webengine_system_libpng=ON + -DFEATURE_webengine_system_libxml=ON + -DFEATURE_webengine_system_libwebp=ON + -DFEATURE_webengine_system_minizip=ON + -DFEATURE_webengine_system_opus=ON + -DFEATURE_webengine_system_pulseaudio=ON + -DFEATURE_webengine_system_snappy=ON + -DFEATURE_webengine_system_zlib=ON + -DFEATURE_webengine_vaapi=ON + ] + end + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::WebEngineWidgets) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += webenginewidgets + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + #include + + int main(int argc, char *argv[]) { + QApplication app(argc, argv); + QWebEngineView view; + view.setUrl(QUrl(QStringLiteral("https://brew.sh/"))); + view.show(); + QTimer::singleShot(2000, &app, SLOT(quit())); + return app.exec(); + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + ENV.delete "CPATH" if OS.mac? + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6WebEngineWidgets").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtwebsockets.rb b/Formula/q/qtwebsockets.rb new file mode 100644 index 0000000000000..e995ebc8d9e8a --- /dev/null +++ b/Formula/q/qtwebsockets.rb @@ -0,0 +1,95 @@ +class Qtwebsockets < Formula + desc "Provides WebSocket communication compliant with RFC 6455" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtwebsockets-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtwebsockets-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtwebsockets-everywhere-src-6.9.3.tar.xz" + sha256 "e27dda8cf3cb31cc235f92e186340ba70a76c47aed7eb32b239d68feb94282c4" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtwebsockets.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c0745d53faad96232dc00ca9e99986c2fa8ef7dd93eafba68c5f9614f74dc00" + sha256 cellar: :any, arm64_sequoia: "51a3bd0223bc2472f370c60de5151366c15a52b9ef05d1df98076e871c84461c" + sha256 cellar: :any, arm64_sonoma: "99965065d7ee4c646633336483a7ce97124f55658326017b13999de9afc26941" + sha256 cellar: :any, sonoma: "2211cf78134662aa53afeda76d7445eb12d9d280cbe80ae2e7baa659f720fcb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbae2e1155b0b2ab9bcfebbf55c60501705c0f77862458fc8a021a1d4e1da9a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "35e652918f94cbdc8373635652e4bcabec4219b6548e8c3f61d53e922b65417c" + end + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + depends_on "pkgconf" => :test + + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test VERSION 1.0.0 LANGUAGES CXX) + find_package(Qt6 REQUIRED COMPONENTS WebSockets) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::WebSockets) + CMAKE + + (testpath/"test.pro").write <<~QMAKE + QT += websockets + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + QMAKE + + (testpath/"main.cpp").write <<~CPP + #undef QT_NO_DEBUG + #include + + int main(void) { + QWebSocketServer server{QStringLiteral("Test Server"), QWebSocketServer::NonSecureMode}; + Q_ASSERT(server.listen(QHostAddress::Any, #{free_port})); + server.close(); + return 0; + } + CPP + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "cmake", "-S", ".", "-B", "cmake" + system "cmake", "--build", "cmake" + system "./cmake/test" + + ENV.delete "CPATH" if OS.mac? + mkdir "qmake" do + system Formula["qtbase"].bin/"qmake", testpath/"test.pro" + system "make" + system "./test" + end + + flags = shell_output("pkgconf --cflags --libs Qt6WebSockets").chomp.split + system ENV.cxx, "-std=c++17", "main.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/q/qtwebview.rb b/Formula/q/qtwebview.rb new file mode 100644 index 0000000000000..b32a7e9ff52db --- /dev/null +++ b/Formula/q/qtwebview.rb @@ -0,0 +1,74 @@ +class Qtwebview < Formula + desc "Displays web content in a QML application" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtwebview-everywhere-src-6.9.3.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.3/submodules/qtwebview-everywhere-src-6.9.3.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.3/submodules/qtwebview-everywhere-src-6.9.3.tar.xz" + sha256 "c65e1fc0b1f1cb80ac05577059d2c294256761ab0686d569ca88010c85c42cc8" + license all_of: [ + { any_of: ["LGPL-3.0-only", "GPL-2.0-only", "GPL-3.0-only"] }, + "BSD-3-Clause", # *.cmake + ] + head "https://code.qt.io/qt/qtwebview.git", branch: "dev" + + livecheck do + formula "qtbase" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4d52e628774a62aa29e98f9009379983ea83368d0e77c3e99b56e6b6f1c0fedc" + sha256 cellar: :any, arm64_sequoia: "1072fc879e5334907231e52b4e44a19a5b3987a43c1772ca45f9789a5d09a103" + sha256 cellar: :any, arm64_sonoma: "5c11fbaba791f6ff23ce41077739a44efd440b46ee12e37ec99b9d5502afaba0" + sha256 cellar: :any, sonoma: "3b1d771cdd26b94632867a14fcb81b237ed4623ac11e716ce0ef9a6cf14d37e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fd896feb109232e1871f3b4fdb259ec86c7f5f93e1502ee7566ec3a52fb8bcd" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "qtwebengine" + + on_macos do + depends_on "qtpositioning" + depends_on "qtwebchannel" + end + + def install + args = ["-DCMAKE_STAGING_PREFIX=#{prefix}"] + args << "-DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", + *args, *std_cmake_args(install_prefix: HOMEBREW_PREFIX, find_framework: "FIRST") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink lib.glob("*.framework") if OS.mac? + end + + test do + (testpath/"test.qml").write <<~QML + import QtQml + import QtQuick + import QtWebView + + Item { + WebView { + anchors.fill: parent + url: "https://brew.sh/" + } + Timer { + interval: 2000 + running: true + onTriggered: Qt.quit() + } + } + QML + + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + system Formula["qtdeclarative"].bin/"qml", "test.qml" + end +end diff --git a/Formula/q/quadcastrgb.rb b/Formula/q/quadcastrgb.rb new file mode 100644 index 0000000000000..07f8833de8345 --- /dev/null +++ b/Formula/q/quadcastrgb.rb @@ -0,0 +1,41 @@ +class Quadcastrgb < Formula + desc "Set RGB lights on HyperX QuadCast S and Duocast microphones" + homepage "https://ors1mer.xyz/quadcastrgb.html" + url "https://ors1mer.xyz/downloads/quadcastrgb-1.0.5.tgz" + sha256 "cdbe8d638ac772579acca203bb2663d7c3a47006190a78ee2971b06c63c69648" + license "GPL-2.0-only" + head "https://github.com/Ors1mer/QuadcastRGB.git", branch: "main" + + livecheck do + url :homepage + regex(/quadcastrgb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4f5fd1f115292a34a1d8c04ff306313c41c37d97a174d933d08197654e6dc2ea" + sha256 cellar: :any, arm64_sequoia: "e1684c8f4af8812803239f4a03601d5eaf2ac7e6ed0f49be43968e3b0f41b60a" + sha256 cellar: :any, arm64_sonoma: "136dd48804bc7f5d90f3f1b50c069ac5c95a898dc3a78e987bdab56ccdca72d7" + sha256 cellar: :any, arm64_ventura: "9107904542014591dbd2f97c66ce1363da3725a5ff3064ad3339d58872a4f71f" + sha256 cellar: :any, sonoma: "a48b6ff4a332dfb6fb30312ef091372bf4f84d73692ec73e041fe1df4af8b8aa" + sha256 cellar: :any, ventura: "0a057c592b4dc9bd1475ecdee53f4c055a5c9cd0e4831cbbe6db94877f57e98d" + sha256 cellar: :any_skip_relocation, arm64_linux: "6310f846898c6bf48c71a78426a47015594bf4b96f2a522ae9dde2d1716e8565" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2801d5cd4a174741bc30148f65714b4aa8fcf15a97294df3e7482bb088bd6d56" + end + + depends_on "make" => :build + depends_on "libusb" + + def install + system "make", OS.mac? ? "OS=macos" : "OS=linux", "quadcastrgb" + bin.install "quadcastrgb" + man1.install "man/quadcastrgb.1.gz" + end + + test do + assert_match version.to_s, shell_output("#{bin}/quadcastrgb --version") + assert_match "No mode specified (solid|blink|cycle|lightning|wave)", + shell_output("#{bin}/quadcastrgb 2>&1", 1) + assert_match "Unknown option: bad_mode", + shell_output("#{bin}/quadcastrgb bad_mode 2>&1", 1) + end +end diff --git a/Formula/q/quantlib.rb b/Formula/q/quantlib.rb new file mode 100644 index 0000000000000..3972d1f4b7a07 --- /dev/null +++ b/Formula/q/quantlib.rb @@ -0,0 +1,44 @@ +class Quantlib < Formula + desc "Library for quantitative finance" + homepage "https://www.quantlib.org/" + url "https://github.com/lballabio/QuantLib/releases/download/v1.40/QuantLib-1.40.tar.gz" + sha256 "5d6b971b998b8b47e5694dfc4851e9c8809624ff24c620579efc7fedef9dc149" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "58937ba7f8806db68889903a328ddc94edf78bf92bbc8ee09fb71272649bd1db" + sha256 cellar: :any, arm64_sequoia: "77f85d593d7c0dff0bf47800fed21cb86c2338049af672cc19cdaa0325a5e5bf" + sha256 cellar: :any, arm64_sonoma: "06b5e6ee4920b501f7e2676167d4622fed88bb18629d68b02e61beb53bbb5f13" + sha256 cellar: :any, sonoma: "e01238d588812433834915f2f8589297f19a033f45b1fe104654741ab19c1c67" + sha256 cellar: :any_skip_relocation, arm64_linux: "499049928740908c868de1fdc617702d74cf7045d776ae02612c840eb37233d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b1dbe754cf7b0d255b9161577ee51acea10a19a60178299bfebad0f24755099" + end + + head do + url "https://github.com/lballabio/quantlib.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "boost" + + def install + ENV.cxx11 + (buildpath/"QuantLib").install buildpath.children if build.stable? + cd "QuantLib" do + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-lispdir=#{elisp}", + "--enable-intraday" + + system "make", "install" + end + end + + test do + system bin/"quantlib-config", "--prefix=#{prefix}", "--libs", "--cflags" + end +end diff --git a/Formula/q/quantum++.rb b/Formula/q/quantum++.rb new file mode 100644 index 0000000000000..8bea839b80a8b --- /dev/null +++ b/Formula/q/quantum++.rb @@ -0,0 +1,58 @@ +class Quantumxx < Formula + desc "Modern C++ quantum computing library" + homepage "https://github.com/softwareQinc/qpp" + url "https://github.com/softwareQinc/qpp/archive/refs/tags/v6.0.tar.gz" + sha256 "cdd6acf287b2f2dd124120ef2aba85660eee9482f5484dbd229c93b53a7d8a54" + license "MIT" + revision 1 + head "https://github.com/softwareQinc/qpp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "99ebcbbe1c4f2197f74a726891f3dc35b93a34c1419d66bf568a4016c91ad9d3" + end + + depends_on "cmake" => [:build, :test] + depends_on "googletest" => :build + depends_on "eigen" + depends_on "pybind11" + + # Apply open PR to support eigen 5.0.0 + # PR ref: https://github.com/softwareQinc/qpp/pull/192 + patch do + url "https://github.com/softwareQinc/qpp/commit/dfe131d87ee304f7ceff5f346825874db3a7b7ed.patch?full_index=1" + sha256 "6cda6778e4799e9135b20330a506315de2e41dc6fe2775d07f00606750310a4c" + end + + def install + args = %w[ + -DFETCHCONTENT_FULLY_DISCONNECTED=OFF + -DHOMEBREW_ALLOW_FETCHCONTENT=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build", "--target", "install" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.15) + project(qpp_test) + set(CMAKE_CXX_STANDARD 17) + + find_package(qpp REQUIRED) + add_executable(qpp_test qpp_test.cpp) + target_link_libraries(qpp_test PUBLIC ${QPP_LINK_DEPS} libqpp) + CMAKE + (testpath/"qpp_test.cpp").write <<~CPP + #include + #include + + int main() { + using namespace qpp; + std::cout << disp(transpose(0_ket)) << std::endl; + } + CPP + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + assert_equal "1 0", shell_output("./build/qpp_test").chomp + end +end diff --git a/Formula/q/quartz-wm.rb b/Formula/q/quartz-wm.rb new file mode 100644 index 0000000000000..a587f55964173 --- /dev/null +++ b/Formula/q/quartz-wm.rb @@ -0,0 +1,52 @@ +class QuartzWm < Formula + desc "XQuartz window-manager" + homepage "https://gitlab.freedesktop.org/xorg/app/quartz-wm" + url "https://gitlab.freedesktop.org/xorg/app/quartz-wm/-/archive/babff9d70f61239c46c53a3e41ce10c7ca1419ce/quartz-wm-babff9d70f61239c46c53a3e41ce10c7ca1419ce.tar.bz2" + version "1.3.2" + sha256 "11a344d8ad9375b61461f0e90b465bc569e60ce973f78e84d3476e7542065be0" + license "APSL-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "06ea0e9f6b34bc42af50738f3d878afd8cd0ebbf1cb5df938fdd8b1295e9c965" + sha256 cellar: :any, arm64_sequoia: "4c47db2f95f422bf84be4900c8ed90c96f5337a34c0a6279f524b618671c2425" + sha256 cellar: :any, arm64_sonoma: "8383efc0dafe5d0f14b6dd255b3f4a336ff8b5ad347005fab412e0b466bf3253" + sha256 cellar: :any, arm64_ventura: "a6c735c400154429cb612b7886bdcab1337a7e1b65e2c94a14bef1404e6aa4dd" + sha256 cellar: :any, arm64_monterey: "cabeb2c482930b2f1e03a6328659546bd6847497a56c838f48efb86678cf798b" + sha256 cellar: :any, arm64_big_sur: "b0cdccaa2c76e580c9d35c2a75c459e965254f226e635d3951f4b20b228fbd44" + sha256 cellar: :any, sonoma: "c4a725767d49a67ecd9b03c2916cc9dbaf7aaeee973d1342e93e0bf714fe50c8" + sha256 cellar: :any, ventura: "b994c864513fbfab4728a5b3cb3b26c69072a1c82d3140908ed7bde34df56b37" + sha256 cellar: :any, monterey: "8107b0c85a02432912e041960e1f3ec1096bdf46ca876a696550a98b645ade00" + sha256 cellar: :any, big_sur: "4d0abe6b48b2ce5ee2c6c44c3c7af67201f0df90b2fe7d75e9273238df19fdce" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorg-server" => :test + + depends_on "libapplewm" + depends_on "libx11" + depends_on "libxext" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on :macos + depends_on "pixman" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-bundle-id-prefix=#{Formula["xinit"].plist_name.chomp ".startx"}", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + spawn Formula["xorg-server"].bin/"Xvfb", ":1" + ENV["DISPLAY"] = ":1" + sleep 10 + spawn bin/"quartz-wm" + end +end diff --git a/Formula/q/quasi88.rb b/Formula/q/quasi88.rb new file mode 100644 index 0000000000000..81d6ed9557541 --- /dev/null +++ b/Formula/q/quasi88.rb @@ -0,0 +1,52 @@ +class Quasi88 < Formula + desc "PC-8801 emulator" + homepage "https://www.eonet.ne.jp/~showtime/quasi88/" + url "https://www.eonet.ne.jp/~showtime/quasi88/release/quasi88-0.7.3.zip" + sha256 "ea8b7095917a841a5f38ce817654ee823ae1e7b0ad7c8629348d584b29667350" + license "BSD-3-Clause" + + livecheck do + url "https://www.eonet.ne.jp/~showtime/quasi88/download.html" + regex(/href=.*?quasi88[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "842ac1ca7dff5eab4167dbc2c254c9d10906925b88ce89358d8d60d845915acb" + sha256 cellar: :any, arm64_sequoia: "20231bb2bc8ee681fd26333fec50a8d641abb9decc2a9aeedded11adce5fa046" + sha256 cellar: :any, arm64_sonoma: "c7039f1e39858b42023516c859a375d478dea926b76f274b624dfd9130a9598f" + sha256 cellar: :any, arm64_ventura: "c88abc6fbf41106452bf7b3fb13c6e3626c8367382d2918d14f1041bc2e1a0b6" + sha256 cellar: :any, sonoma: "72f63671f466c20d84d1c148f2682283526d1ca2a4ea65dbcdf16d53fb476def" + sha256 cellar: :any, ventura: "d73202052e48e221a118f9f010f1c284cf83caa4c5a95c1fa7e3c393b6e4a993" + sha256 cellar: :any_skip_relocation, arm64_linux: "89265c3d0c0abaed57404054d2b2ebbb65d9eee0f79c9041428ef07c019d3f13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f397f98e66812a49e708963bd8cccc62c07179828358bbebac9073fef06ecd6" + end + + depends_on "sdl2" + + def install + ENV.deparallelize + + args = %W[ + CC=#{ENV.cc} + CXX=#{ENV.cxx} + LD=#{ENV.cxx} + CXXLIBS= + ] + system "make", *args + bin.install "quasi88" + end + + def caveats + <<~EOS + You will need to place ROM and disk files. + Default arguments for the directories are: + -romdir ~/quasi88/rom/ + -diskdir ~/quasi88/disk/ + -tapedir ~/quasi88/tape/ + EOS + end + + test do + system bin/"quasi88", "-help" + end +end diff --git a/Formula/q/quazip.rb b/Formula/q/quazip.rb new file mode 100644 index 0000000000000..de2693e4fc896 --- /dev/null +++ b/Formula/q/quazip.rb @@ -0,0 +1,63 @@ +class Quazip < Formula + desc "C++ wrapper over Gilles Vollant's ZIP/UNZIP package" + homepage "https://github.com/stachenov/quazip/" + url "https://github.com/stachenov/quazip/archive/refs/tags/v1.5.tar.gz" + sha256 "405b72b6e76c8987ff41a762523b8f64876ba406d8a831d268ee0b63f1369582" + license "LGPL-2.1-only" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f1fd2fadf19095977d5632337b0bbe73cefa515ef6b17c3d9de2fea32bfd1b24" + sha256 cellar: :any, arm64_sequoia: "185ebc43b7a1136a46c8af18b442f2f2f8b7196422072a1a6835bbd0a30875a2" + sha256 cellar: :any, arm64_sonoma: "535fb4aab113e08ae887ee225e49583f347cd727a918a46b91c84b04c5c2c465" + sha256 cellar: :any, sonoma: "ee6d72c263395d2bd8cb95341cca19f620b851196cbfdabfd0192f51d75748cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d457d617c5a876a3ad949e196936bbdf1d26cc9d34319418a53bfd9c0df1234" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ae3f76ea4c6aed76a42025c5475c4b1a030cccd04ea102a54b98efc7d1a3f57" + end + + depends_on "cmake" => :build + depends_on xcode: :build + depends_on "qt5compat" + depends_on "qtbase" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd include do + include.install_symlink "QuaZip-Qt#{Formula["qtbase"].version.major}-#{version}/quazip" => "quazip" + end + end + + test do + ENV.delete "CPATH" + (testpath/"test.pro").write <<~EOS + TEMPLATE = app + CONFIG += console + CONFIG -= app_bundle + TARGET = test + SOURCES += test.cpp + INCLUDEPATH += #{include} #{Formula["zlib"].include} + LIBPATH += #{lib} + LIBS += -lquazip#{version.major}-qt#{Formula["qt"].version.major} + QMAKE_RPATHDIR += #{lib} + EOS + + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QuaZip zip; + return 0; + } + CPP + + system Formula["qtbase"].bin/"qmake", "test.pro" + system "make" + assert_path_exists testpath/"test", "test output file does not exist!" + system "./test" + end +end diff --git a/Formula/q/questdb.rb b/Formula/q/questdb.rb new file mode 100644 index 0000000000000..8f64948152acd --- /dev/null +++ b/Formula/q/questdb.rb @@ -0,0 +1,57 @@ +class Questdb < Formula + desc "Time Series Database" + homepage "https://questdb.io" + url "https://github.com/questdb/questdb/releases/download/9.1.1/questdb-9.1.1-no-jre-bin.tar.gz" + sha256 "15bcd80227a174c881ce3278c0526b473fd3da9aefc8db31e5652ea8a384de62" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "32a4bf7d72afcc01b92b24e2a99c85eda0df1aae75575c39acf3f8856898ba76" + end + + depends_on "openjdk" + + def install + rm_r("questdb.exe") + libexec.install Dir["*"] + (bin/"questdb").write_env_script libexec/"questdb.sh", Language::Java.overridable_java_home_env + inreplace libexec/"questdb.sh", "/usr/local/var/questdb", var/"questdb" + end + + def post_install + # Make sure the var/questdb directory exists + (var/"questdb").mkpath + end + + service do + run [opt_bin/"questdb", "start", "-d", var/"questdb", "-n", "-f"] + keep_alive successful_exit: false + error_log_path var/"log/questdb.log" + log_path var/"log/questdb.log" + working_dir var/"questdb" + end + + test do + # questdb.sh uses `ps | grep` to verify server is running, but output is truncated to COLUMNS + # See https://github.com/Homebrew/homebrew-core/pull/133887#issuecomment-1679907729 + ENV.delete "COLUMNS" if OS.linux? + + mkdir_p testpath/"data" + begin + fork do + exec bin/"questdb", "start", "-d", testpath/"data" + end + sleep 30 + output = shell_output("curl -Is localhost:9000/index.html") + sleep 8 + assert_match "questDB", output + ensure + system bin/"questdb", "stop" + end + end +end diff --git a/Formula/q/quex.rb b/Formula/q/quex.rb new file mode 100644 index 0000000000000..2eb436b6aaf8e --- /dev/null +++ b/Formula/q/quex.rb @@ -0,0 +1,45 @@ +class Quex < Formula + include Language::Python::Shebang + + desc "Generate lexical analyzers" + homepage "https://quex.sourceforge.net/" + url "https://downloads.sourceforge.net/project/quex/quex-0.71.2.zip" + sha256 "0453227304a37497e247e11b41a1a8eb04bcd0af06a3f9d627d706b175a8a965" + license "MIT" + revision 1 + head "https://svn.code.sf.net/p/quex/code/trunk" + + livecheck do + url :stable + regex(%r{url=.*?/quex[._-]v?(\d+(?:\.\d+)+)\.[tz]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "f2d44465311851dc3bf25c68adc4d5041315e089d91ba9fce5d34a47f8a26782" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "quex-exe.py" + libexec.install "quex", "quex-exe.py" + doc.install "README", "demo" + + # Use a shim script to set QUEX_PATH on the user's behalf + (bin/"quex").write_env_script libexec/"quex-exe.py", QUEX_PATH: libexec + + if build.head? + man1.install "doc/manpage/quex.1" + else + man1.install "manpage/quex.1" + end + end + + test do + system bin/"quex", "-i", doc/"demo/C/01-Trivial/easy.qx", "-o", "tiny_lexer" + assert_path_exists testpath/"tiny_lexer" + end +end diff --git a/Formula/q/quick-lint-js.rb b/Formula/q/quick-lint-js.rb new file mode 100644 index 0000000000000..792893e338a86 --- /dev/null +++ b/Formula/q/quick-lint-js.rb @@ -0,0 +1,54 @@ +class QuickLintJs < Formula + desc "Find bugs in your JavaScript code" + homepage "https://quick-lint-js.com/" + url "https://c.quick-lint-js.com/releases/3.2.0/source/quick-lint-js-3.2.0.tar.gz" + sha256 "f17b39726622637946136076c406e89d3a98ae363d5e3c2a93ab1139bf0e828d" + license "GPL-3.0-or-later" + revision 9 + head "https://github.com/quick-lint/quick-lint-js.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0105ff78875739281d68a084a2e2758c54c1c984ea67de1eae5dcce6414808c3" + sha256 cellar: :any, arm64_sequoia: "b185f0ee6a48613600a09ed7e1bf3b3b4911ed32eea0b6a0fc8df698c2f1d6ce" + sha256 cellar: :any, arm64_sonoma: "3de9423e6a160c3d355c84bc1f196569cd246343febdde91c3302188c3db50aa" + sha256 cellar: :any, sonoma: "01a124fa8367ed0a4b89524d5d8c001d93bf87f6479f6a21ba9662e1d2a76517" + sha256 cellar: :any_skip_relocation, arm64_linux: "718e296b58655067ae01de388cd33e3f748a54773fa87e000549c2847a1c1fa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "892f74b7f4ed3f69f32b4273ce65d8587d7480201734c95b35c2c18083e0c92d" + end + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "pkgconf" => :build + depends_on "simdjson" + + fails_with :gcc do + version "7" + cause "requires C++17" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_TESTING=ON", + "-DQUICK_LINT_JS_ENABLE_BENCHMARKS=OFF", + "-DQUICK_LINT_JS_INSTALL_EMACS_DIR=#{elisp}", + "-DQUICK_LINT_JS_INSTALL_VIM_NEOVIM_TAGS=ON", + "-DQUICK_LINT_JS_USE_BUNDLED_GOOGLE_BENCHMARK=OFF", + "-DQUICK_LINT_JS_USE_BUNDLED_GOOGLE_TEST=OFF", + "-DQUICK_LINT_JS_USE_BUNDLED_SIMDJSON=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "ctest", "--verbose", "--parallel", ENV.make_jobs, "--test-dir", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"errors.js").write <<~EOF + const x = 3; + const x = 4; + EOF + assert_match "E0034", shell_output("#{bin}/quick-lint-js errors.js 2>&1", 1) + + (testpath/"no-errors.js").write 'console.log("hello, world!");' + assert_empty shell_output("#{bin}/quick-lint-js no-errors.js") + end +end diff --git a/Formula/q/quickjs.rb b/Formula/q/quickjs.rb new file mode 100644 index 0000000000000..d00037df3ec4d --- /dev/null +++ b/Formula/q/quickjs.rb @@ -0,0 +1,36 @@ +class Quickjs < Formula + desc "Small and embeddable JavaScript engine" + homepage "https://bellard.org/quickjs/" + url "https://bellard.org/quickjs/quickjs-2025-09-13-2.tar.xz" + version "2025-09-13-2" + sha256 "996c6b5018fc955ad4d06426d0e9cb713685a00c825aa5c0418bd53f7df8b0b4" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?quickjs[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0c4a5557adceba07641b2d0df1a7dc4a80a95cb8d95cb8e89a75deabd2cac755" + sha256 arm64_sequoia: "6b8a9c3c838646ff828233f6ed5af58974985f076ab68a9b4337da8d0e01411a" + sha256 arm64_sonoma: "6ac5d8f62afabf4912fb5173a417c08f9118f3ed0fd88c069ee91d74d6a08c1b" + sha256 sonoma: "a2ce1cdd3b921b02c123850b83ff78d4d983fc487c04bfdf93352d415bf6f253" + sha256 arm64_linux: "4a3b2817c7f28db585ece2b4e317fe6ce0079a6c716dd2ef9e612a80d7106089" + sha256 x86_64_linux: "547f293bb0c5b1de7fe993352bc26192627f16a36128d64bb9b9dbd9b2afca2e" + end + + def install + system "make", "install", "PREFIX=#{prefix}", "CONFIG_M32=" + end + + test do + output = shell_output("#{bin}/qjs --eval 'const js=\"JS\"; console.log(`Q${js}${(7 + 35)}`);'").strip + assert_match(/^QJS42/, output) + + test_file = testpath/"test.js" + test_file.write "console.log('hello');" + system bin/"qjsc", test_file + assert_equal "hello", shell_output(testpath/"a.out").strip + end +end diff --git a/Formula/q/quicktype.rb b/Formula/q/quicktype.rb new file mode 100644 index 0000000000000..b881eadc22093 --- /dev/null +++ b/Formula/q/quicktype.rb @@ -0,0 +1,31 @@ +class Quicktype < Formula + desc "Generate types and converters from JSON, Schema, and GraphQL" + homepage "https://github.com/glideapps/quicktype" + url "https://registry.npmjs.org/quicktype/-/quicktype-23.2.6.tgz" + sha256 "a8cf7412ccc3ce1c04b1083cced2c47b0b7b043b77fc56cbef5c151aff2c9daa" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1f596c091f22130c5e3365124d67bdbbc0076d062d65e1fdb8e2f7e4a905f17b" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"sample.json").write <<~JSON + { + "i": [0, 1], + "s": "quicktype" + } + JSON + output = shell_output("#{bin}/quicktype --lang typescript --src sample.json") + assert_match "i: number[];", output + assert_match "s: string;", output + end +end diff --git a/Formula/q/quictls.rb b/Formula/q/quictls.rb new file mode 100644 index 0000000000000..9b3f6e0a99be3 --- /dev/null +++ b/Formula/q/quictls.rb @@ -0,0 +1,136 @@ +class Quictls < Formula + desc "TLS/SSL and crypto library with QUIC APIs" + homepage "https://github.com/quictls/openssl" + url "https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz" + version "3.3.0-quic1" + sha256 "78d675d94c0ac3a8b44073f0c2b373d948c5afd12b25c9e245262f563307a566" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^openssl[._-]v?(\d(?:\.\d)+[+._-]quic\d*)$/i) + end + + bottle do + sha256 arm64_tahoe: "7d899abd908cd31282776b93be0a4b8d573d906669496b6b5a2fc7eb73059ae2" + sha256 arm64_sequoia: "d23ad26d2efb1dc8f1a9030696fe96ed1f39df568093ef64fa9c264c28da574a" + sha256 arm64_sonoma: "a2b2a74d18ef19a9753296517bd60b9e26c4139238f76f4f252dd8ee4656beca" + sha256 arm64_ventura: "b4a00903b3a19f1f486eb724cd41ef1dbc332cbef1961dadf8f08d23007e2b4d" + sha256 sonoma: "d62a944f9b45478aff3b5b1bd14ad7913ac48d23b7a9d037568d04ba539f2449" + sha256 ventura: "0d4335f3009b02faff17bc049ed596dfae00c82455a664dc43b230398bf3574e" + sha256 arm64_linux: "badde66c7078fe9f19a77c7ef6c75f2f3503b502bc6c1b268d962b94cd904773" + sha256 x86_64_linux: "3e1326258525b2d2ea8fb9bf9f84625790136617ca3abf2a2ee8b5912180aaab" + end + + keg_only "it conflicts with OpenSSL" + + deprecate! date: "2025-10-02", because: :repo_archived + + depends_on "ca-certificates" + + on_linux do + resource "Test::Harness" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.50.tar.gz" + sha256 "79b6acdc444f1924cd4c2e9ed868bdc6e09580021aca8ff078ede2ffef8a6f54" + end + + resource "Test::More" do + url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302204.tar.gz" + sha256 "03749d1027a7817ca7f11e420ef72951f20a849ea65af2eb595f34df47d1226e" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.70.tar.gz" + sha256 "f108bd46420d2f00d242825f865b0f68851084924924f92261d684c49e3e7a74" + end + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}", "CC=#{ENV.cc}" + system "make", "install" + end + end + end + + # This could interfere with how we expect OpenSSL to build. + ENV.delete("OPENSSL_LOCAL_CONFIG_DIR") + + # This ensures where Homebrew's Perl is needed the Cellar path isn't + # hardcoded into OpenSSL's scripts, causing them to break every Perl update. + # Whilst our env points to opt_bin, by default OpenSSL resolves the symlink. + ENV["PERL"] = Formula["perl"].opt_bin/"perl" if which("perl") == Formula["perl"].opt_bin/"perl" + + # SSLv2 died with 1.1.0, so no-ssl2 no longer required. + # SSLv3 & zlib are off by default with 1.1.0 but this may not + # be obvious to everyone, so explicitly state it for now to + # help debug inevitable breakage. + args = %W[ + --prefix=#{prefix} + --openssldir=#{quictlsdir} + --libdir=#{lib} + no-ssl3 + no-ssl3-method + no-zlib + ] + + if OS.linux? + args += (ENV.cflags || "").split + args += (ENV.cppflags || "").split + args += (ENV.ldflags || "").split + end + + if OS.mac? + args += %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128] + elsif Hardware::CPU.intel? + args << (Hardware::CPU.is_64_bit? ? "linux-x86_64" : "linux-elf") + elsif Hardware::CPU.arm? + args << (Hardware::CPU.is_64_bit? ? "linux-aarch64" : "linux-armv4") + end + + quictlsdir.mkpath + system "perl", "./Configure", *args + system "make" + system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" + system "make", "test" + end + + def quictlsdir + etc/"quictls" + end + + def post_install + rm(quictlsdir/"cert.pem") if (quictlsdir/"cert.pem").exist? + quictlsdir.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + end + + def caveats + <<~EOS + A CA file has been bootstrapped using certificates from the system + keychain. To add additional certificates, place .pem files in + #{quictlsdir}/certs + + and run + #{opt_bin}/c_rehash + EOS + end + + test do + # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody. + assert_path_exists pkgetc/"openssl.cnf", "OpenSSL requires the .cnf file for some functionality" + + # Check OpenSSL itself functions as expected. + (testpath/"testfile.txt").write("This is a test file") + expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" + system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" + open("checksum.txt") do |f| + checksum = f.read(100).split("=").last.strip + assert_equal checksum, expected_checksum + end + end +end diff --git a/Formula/q/quill.rb b/Formula/q/quill.rb new file mode 100644 index 0000000000000..c33e82781457c --- /dev/null +++ b/Formula/q/quill.rb @@ -0,0 +1,55 @@ +class Quill < Formula + desc "C++17 Asynchronous Low Latency Logging Library" + homepage "https://github.com/odygrd/quill" + url "https://github.com/odygrd/quill/archive/refs/tags/v10.2.0.tar.gz" + sha256 "d0756ce6716e01c48e52588cdec12b7c77854204bf96f27fb683fd6c11a6be13" + license "MIT" + head "https://github.com/odygrd/quill.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0478564bbc13b0a9b5e58b36df4e6d5f138ec2dcc510c5c3ab48bf496cbc5b5f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "quill/Backend.h" + #include "quill/Frontend.h" + #include "quill/LogMacros.h" + #include "quill/Logger.h" + #include "quill/sinks/ConsoleSink.h" + + int main() + { + // Start the backend thread + quill::Backend::start(); + + // Frontend + auto console_sink = quill::Frontend::create_or_get_sink("sink_id_1"); + quill::Logger* logger = quill::Frontend::create_or_get_logger("root", std::move(console_sink)); + + // Change the LogLevel to print everything + logger->set_log_level(quill::LogLevel::TraceL3); + + LOG_INFO(logger, "Welcome to Quill!"); + LOG_ERROR(logger, "An error message. error code {}", 123); + LOG_WARNING(logger, "A warning message."); + LOG_CRITICAL(logger, "A critical error."); + LOG_DEBUG(logger, "Debugging foo {}", 1234); + LOG_TRACE_L1(logger, "{:>30}", "right aligned"); + LOG_TRACE_L2(logger, "Positional arguments are {1} {0} ", "too", "supported"); + LOG_TRACE_L3(logger, "Support for floats {:03.2f}", 1.23456); + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-o", "test", "-pthread" + system "./test" + end +end diff --git a/Formula/q/quilt-installer.rb b/Formula/q/quilt-installer.rb new file mode 100644 index 0000000000000..d9a8e7e84ca68 --- /dev/null +++ b/Formula/q/quilt-installer.rb @@ -0,0 +1,28 @@ +class QuiltInstaller < Formula + desc "Installer for Quilt for the vanilla launcher" + homepage "https://quiltmc.org/" + url "https://maven.quiltmc.org/repository/release/org/quiltmc/quilt-installer/0.12.1/quilt-installer-0.12.1.jar" + sha256 "8b716edc692a2fa1fb78dbc2f432643be1bc6c867e5605f36f691f44257120ca" + license "Apache-2.0" + + livecheck do + url "https://maven.quiltmc.org/repository/release/org/quiltmc/quilt-installer/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c2c3e3aa829bedf8617e2a6159dd32b8f80177f6ad1035e9a5fc51bef91330ab" + end + + depends_on "openjdk" + + def install + libexec.install "quilt-installer-#{version}.jar" + bin.write_jar_script libexec/"quilt-installer-#{version}.jar", "quilt-installer" + end + + test do + system bin/"quilt-installer", "install", "server", "1.19.2" + assert_path_exists testpath/"server/quilt-server-launch.jar" + end +end diff --git a/Formula/q/quilt.rb b/Formula/q/quilt.rb new file mode 100644 index 0000000000000..ff4136ba54280 --- /dev/null +++ b/Formula/q/quilt.rb @@ -0,0 +1,65 @@ +class Quilt < Formula + desc "Work with series of patches" + homepage "https://savannah.nongnu.org/projects/quilt" + url "https://download.savannah.gnu.org/releases/quilt/quilt-0.69.tar.gz" + sha256 "555ddffde22da3c86d1caf5a9c1fb8a152ac2b84730437bd39cc08849c9f4852" + license "GPL-2.0-or-later" + head "https://git.savannah.gnu.org/git/quilt.git", branch: "master" + + livecheck do + url "https://download.savannah.gnu.org/releases/quilt/" + regex(/href=.*?quilt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "93979fd118d49801525b0d28a8572a055893d3e3169ee9eff1bca64e69d9ccc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93979fd118d49801525b0d28a8572a055893d3e3169ee9eff1bca64e69d9ccc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93979fd118d49801525b0d28a8572a055893d3e3169ee9eff1bca64e69d9ccc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93979fd118d49801525b0d28a8572a055893d3e3169ee9eff1bca64e69d9ccc2" + sha256 cellar: :any_skip_relocation, sonoma: "93979fd118d49801525b0d28a8572a055893d3e3169ee9eff1bca64e69d9ccc2" + sha256 cellar: :any_skip_relocation, ventura: "93979fd118d49801525b0d28a8572a055893d3e3169ee9eff1bca64e69d9ccc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0aadd65237093e1356cf63eef91a5ab80f8cba26bc8e034d05de7c3095dd64c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0aadd65237093e1356cf63eef91a5ab80f8cba26bc8e034d05de7c3095dd64c" + end + + depends_on "coreutils" + depends_on "gnu-sed" + + on_ventura :or_newer do + depends_on "diffutils" + depends_on "gpatch" + end + + def install + args = [ + "--prefix=#{prefix}", + "--without-getopt", + ] + if OS.mac? + args << "--with-sed=#{Formula["gnu-sed"].opt_bin}/gsed" + args << "--with-stat=/usr/bin/stat" # on macOS, quilt expects BSD stat + if MacOS.version >= :ventura + args << "--with-diff=#{Formula["diffutils"].opt_bin}/diff" + args << "--with-patch=#{Formula["gpatch"].opt_bin}/gpatch" + end + else + args << "--with-sed=#{Formula["gnu-sed"].opt_bin}/sed" + end + system "./configure", *args + + system "make" + system "make", "install", "emacsdir=#{elisp}" + end + + test do + (testpath/"patches").mkpath + (testpath/"test.txt").write "Hello, World!" + system bin/"quilt", "new", "test.patch" + system bin/"quilt", "add", "test.txt" + rm "test.txt" + (testpath/"test.txt").write "Hi!" + system bin/"quilt", "refresh" + assert_match(/-Hello, World!/, File.read("patches/test.patch")) + assert_match(/\+Hi!/, File.read("patches/test.patch")) + end +end diff --git a/Formula/q/quint.rb b/Formula/q/quint.rb new file mode 100644 index 0000000000000..9f2a0478e59a7 --- /dev/null +++ b/Formula/q/quint.rb @@ -0,0 +1,52 @@ +class Quint < Formula + desc "Core tool for the Quint specification language" + homepage "https://github.com/informalsystems/quint" + url "https://registry.npmjs.org/@informalsystems/quint/-/quint-0.29.0.tgz" + sha256 "80eb1993ecb28271cfda7313304a22f866c84274082dffeec52b806cb1a6623a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1cd5380ed6a33bfe31dc2dcafddbd59c1c47cd2219fefc24934cc3eec5f60366" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/quint --version") + + (testpath/"bank.qnt").write <<~QNT + module bank { + var balances: str -> int + pure val ADDRESSES = Set("alice", "bob", "charlie") + + action deposit(account, amount) = { + balances' = balances.setBy(account, curr => curr + amount) + } + + action withdraw(account, amount) = all { + balances.get(account) >= amount, + balances' = balances.setBy(account, curr => curr - amount), + } + + action init = { balances' = ADDRESSES.mapBy(_ => 0) } + + action step = { + nondet account = ADDRESSES.oneOf() + nondet amount = 1.to(100).oneOf() + any { deposit(account, amount), withdraw(account, amount) } + } + + val no_negatives = ADDRESSES.forall(addr => balances.get(addr) >= 0) + } + QNT + + out = shell_output("#{bin}/quint run bank.qnt --invariant=no_negatives --mbt --verbosity 1") + + assert_match "No violation found", out + end +end diff --git a/Formula/q/quotatool.rb b/Formula/q/quotatool.rb new file mode 100644 index 0000000000000..612341306a48c --- /dev/null +++ b/Formula/q/quotatool.rb @@ -0,0 +1,36 @@ +class Quotatool < Formula + desc "Edit disk quotas from the command-line" + homepage "https://quotatool.ekenberg.se/" + url "https://github.com/ekenberg/quotatool.git", + tag: "v1.6.5", + revision: "62180fb1cc7d5d4e90cbbb578cba6bcc967c7ca8" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "848359b8b48ae2e6d493cbdd7fbcc5a75445692e0d235acd937391bf01829973" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c0f6b1df823e091ee76ad2ed173177e9c4375f8f8cd0523b5989d4767a8d48e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "73fe8aa2a02124cafcf9abdac863eba005e9eb1ab81d8e135cd33f6eb2d40685" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5a43288144374c56357b8086915aaca5eba18e53f0940837d4cf298e70d07e9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9eecb97ad263acbc09900928486b0fe14a1b87e4e8bdff42c86bcc1ca3d8c8bd" + sha256 cellar: :any_skip_relocation, sonoma: "b978f4cf5786ea8301c04df5c0ca7454c18532af3dda7b6ebc873ef05a57113a" + sha256 cellar: :any_skip_relocation, ventura: "aa6e214389d5b093d52adacca8254ed4938d2b22f00e49df43b7cae204eebeef" + sha256 cellar: :any_skip_relocation, monterey: "2ef1c105633c850e2f2ecff526621787052f683e6aa463c8b8be85c50ea3d6dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "03e1221ed2e5f5bb52560e39b82a3facecf883aed167349499de3fb843712077" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c0feda58df20431481105e54c7cdc01e78168423035c50cbcf813c096dc5121" + end + + on_macos do + depends_on "coreutils" => :build # make install uses `-D` flag + end + + def install + system "./configure", "--prefix=#{prefix}" + sbin.mkpath + man8.mkpath + system "make", "install" + end + + test do + system "#{sbin}/quotatool", "-V" + end +end diff --git a/Formula/q/quran.rb b/Formula/q/quran.rb new file mode 100644 index 0000000000000..707570b5b6533 --- /dev/null +++ b/Formula/q/quran.rb @@ -0,0 +1,39 @@ +class Quran < Formula + desc "Print Qur'an chapters and verses right in the terminal" + homepage "https://git.hanabi.in/quran-go" + url "https://git.hanabi.in/repos/quran-go.git", + tag: "v1.0.1", + revision: "c0e271a69a2e817bf75c8ad79a1fc93aa1b868c9" + license "AGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b24abef229a42a67114aa6c1153955c0a494ad3348c320dc58358ca63082f103" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "20b7b1031a5da9f17bd4916cc3d4eeb78242fbdd08e71485febe5861afd9ba78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "042b57a9c4db3996221e8295c01bd101c6b443e1c7259010358511df7f96fdb8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d5293e470499a0038308e0f00b6a935fe3d88218b764a7ea7bd3ed7a3d34547" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9683304765649e2600b2d85b6df69132dc343a5a13c56da23d051c52b2c63661" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a660a78088ed889659b0ac451c41e5c457df67b3a97fe21f291e6edc8b7f9508" + sha256 cellar: :any_skip_relocation, sonoma: "504abbff199d534add1e55f97f712cd9957a925faeffea7c91c032a0e43c80b8" + sha256 cellar: :any_skip_relocation, ventura: "056efc1003e84d26b7335cff42ae1249551a890fffcb180ea4b321c3cf302402" + sha256 cellar: :any_skip_relocation, monterey: "1bc0099dede2f1cd7b27882858a763e8ed97c7ded46c8384cc20793f87fb1218" + sha256 cellar: :any_skip_relocation, big_sur: "0c585b46974099934335f6b8f3da950be3392f7f799d6153a68c5787d685c005" + sha256 cellar: :any_skip_relocation, catalina: "600167279eccfa40badfb475003949dca659d2545e9e65e1ea08ab57645d036b" + sha256 cellar: :any_skip_relocation, arm64_linux: "80f68e6c0762664536967f559c8543c726e14ecb1bbf87f5fedc3cf84b8c8caf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93cc2a0059d0e6faf82b0723bebe80e77fb4056895ad6a6488be408c9123cb02" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "src/main.go" + end + + test do + assert_match "Saheeh International", shell_output("#{bin}/quran ls-translations") + + op = shell_output("#{bin}/quran -trans 20 1:1").strip + assert_equal "In the name of Allāh, the Entirely Merciful, the Especially Merciful.", op + end +end diff --git a/Formula/q/qwen-code.rb b/Formula/q/qwen-code.rb new file mode 100644 index 0000000000000..f9f503d310fe9 --- /dev/null +++ b/Formula/q/qwen-code.rb @@ -0,0 +1,31 @@ +class QwenCode < Formula + desc "AI-powered command-line workflow tool for developers" + homepage "https://github.com/QwenLM/qwen-code" + url "https://registry.npmjs.org/@qwen-code/qwen-code/-/qwen-code-0.1.3.tgz" + sha256 "4b71cc73166fc1f686cfce7a2060679da3bed27261d20b1be9784ad117e3880e" + license "Apache-2.0" + + bottle do + sha256 arm64_tahoe: "f2d1c9ee2beec87dae662ffd1a03aeb70a1e1523eec2e31d264a9e541c1e1538" + sha256 arm64_sequoia: "8ef50b75d5bf742cff0234a5da87b7adcc5a0d20814f33c107554e9ff8c1fb8f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "78a94166d236dbffc007129667dd0037c1d0ab0e23df0b8bf1f544ba8e074f95" + sha256 cellar: :any_skip_relocation, sonoma: "9f41c9195333e69ce76b4ec90cab308a0ee368cc20276c768f17e372110fb9a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "266c7ebe8f13417e8dbae818c807fb5ceacaf3306f93ad840a05387e79815cf5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "983fbadb891f1effcee0e3346f695375bb7718bfb47cbc097185e6d5b3412f66" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binaries + rm_r(libexec/"lib/node_modules/@qwen-code/qwen-code/vendor/ripgrep") + end + + test do + assert_match version.to_s, shell_output("#{bin}/qwen --version") + assert_match "No MCP servers configured.", shell_output("#{bin}/qwen mcp list") + end +end diff --git a/Formula/q/qwt-qt5.rb b/Formula/q/qwt-qt5.rb new file mode 100644 index 0000000000000..fddccf358a85d --- /dev/null +++ b/Formula/q/qwt-qt5.rb @@ -0,0 +1,116 @@ +class QwtQt5 < Formula + desc "Qt Widgets for Technical Applications" + homepage "https://qwt.sourceforge.io/" + url "https://downloads.sourceforge.net/project/qwt/qwt/6.3.0/qwt-6.3.0.tar.bz2" + sha256 "dcb085896c28aaec5518cbc08c0ee2b4e60ada7ac929d82639f6189851a6129a" + license "LGPL-2.1-only" => { with: "Qwt-exception-1.0" } + + livecheck do + formula "qwt" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "50d8256a3eed2810739b8e3ef00d8290ec2b70c526578063864b73540e09b897" + sha256 cellar: :any, arm64_sequoia: "92b1dc9c4e182b760312b9b520cc45ae9a236566ec0183bc6eea6e92ab874651" + sha256 cellar: :any, arm64_sonoma: "894d743586ad9e9dcbbb45f9448c6f2fc945aae526f50b2d17e2162b82527402" + sha256 cellar: :any, arm64_ventura: "45d280f8c2f948576ed5648f386d99ca4dcefce046a47a07e16255f633a4e49d" + sha256 cellar: :any, arm64_monterey: "6ba637b0ba53bc6aa54b8373e125706946dcb0f4f0dfefe3a8927d15e52b5a26" + sha256 cellar: :any, sonoma: "f99f4ba3c3aec0a92ee319b16bf8478258eecb4fedb0c635a9bbfdb605110adf" + sha256 cellar: :any, ventura: "2ee3ad50be50bb89db51bc72219f66fde4cb89638bf0f65b39116ca223b26fb3" + sha256 cellar: :any, monterey: "861ae528a6977db8f7588aa055849d5e45e4dbb36b596313ff76d33da4e56de5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7499edc1cd2721d47889cdd38e30ebefdeb7137090e25eebd1f310a5f6a91cfa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a367f75f804b12fd9f2bd9706a47a0f67cd9862035448063e81d9e8ae1c620e" + end + + keg_only "it conflicts with qwt" + + deprecate! date: "2026-05-19", because: "is for end-of-life Qt 5" + + depends_on "qt@5" + + # Update designer plugin linking back to qwt framework/lib after install + # See: https://sourceforge.net/p/qwt/patches/45/ + patch :DATA + + def install + inreplace "qwtconfig.pri" do |s| + s.gsub!(/^\s*QWT_INSTALL_PREFIX\s*=(.*)$/, "QWT_INSTALL_PREFIX=#{prefix}") + + # Install Qt plugin in `lib/qt/plugins/designer`, not `plugins/designer`. + s.sub! %r{(= \$\$\{QWT_INSTALL_PREFIX\})/(plugins/designer)$}, + "\\1/lib/qt/\\2" + end + + args = ["-config", "release", "-spec"] + spec = if OS.linux? + "linux-g++" + elsif ENV.compiler == :clang + "macx-clang" + else + "macx-g++" + end + args << spec + + qt5 = Formula["qt@5"].opt_prefix + system "#{qt5}/bin/qmake", *args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1"); + return (curve1 == NULL); + } + CPP + if OS.mac? + system ENV.cxx, "test.cpp", "-o", "out", + "-std=c++11", + "-framework", "qwt", "-framework", "QtCore", + "-F#{lib}", "-F#{Formula["qt@5"].opt_lib}", + "-I#{lib}/qwt.framework/Headers", + "-I#{Formula["qt@5"].opt_lib}/QtCore.framework/Versions/5/Headers", + "-I#{Formula["qt@5"].opt_lib}/QtGui.framework/Versions/5/Headers" + else + system ENV.cxx, + "-I#{Formula["qt@5"].opt_include}", + "-I#{Formula["qt@5"].opt_include}/QtCore", + "-I#{Formula["qt@5"].opt_include}/QtGui", + "test.cpp", + "-lqwt", "-lQt5Core", "-lQt5Gui", + "-L#{Formula["qt@5"].opt_lib}", + "-L#{lib}", + "-Wl,-rpath=#{Formula["qt@5"].opt_lib}", + "-Wl,-rpath=#{lib}", + "-o", "out", "-std=c++11", "-fPIC" + end + system "./out" + end +end + +__END__ +diff --git a/designer/designer.pro b/designer/designer.pro +index c269e9d..c2e07ae 100644 +--- a/designer/designer.pro ++++ b/designer/designer.pro +@@ -126,6 +126,16 @@ contains(QWT_CONFIG, QwtDesigner) { + + target.path = $${QWT_INSTALL_PLUGINS} + INSTALLS += target ++ ++ macx { ++ contains(QWT_CONFIG, QwtFramework) { ++ QWT_LIB = qwt.framework/Versions/$${QWT_VER_MAJ}/qwt ++ } ++ else { ++ QWT_LIB = libqwt.$${QWT_VER_MAJ}.dylib ++ } ++ QMAKE_POST_LINK = install_name_tool -change $${QWT_LIB} $${QWT_INSTALL_LIBS}/$${QWT_LIB} $(DESTDIR)$(TARGET) ++ } + } + else { + TEMPLATE = subdirs # do nothing diff --git a/Formula/q/qwt.rb b/Formula/q/qwt.rb new file mode 100644 index 0000000000000..e5062aeb77a2c --- /dev/null +++ b/Formula/q/qwt.rb @@ -0,0 +1,85 @@ +class Qwt < Formula + desc "Qt Widgets for Technical Applications" + homepage "https://qwt.sourceforge.io/" + url "https://downloads.sourceforge.net/project/qwt/qwt/6.3.0/qwt-6.3.0.tar.bz2" + sha256 "dcb085896c28aaec5518cbc08c0ee2b4e60ada7ac929d82639f6189851a6129a" + license "LGPL-2.1-only" => { with: "Qwt-exception-1.0" } + + livecheck do + url :stable + regex(%r{url=.*?/qwt[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "b9997bee5756f9c2f27627b70b4af65e8e83cf742a69fbf190bb82b745ade6f2" + sha256 cellar: :any, arm64_sequoia: "ad7400e7b47e1141ab0dc73e38ba9277e64815563ab09d098d291c279280c042" + sha256 cellar: :any, arm64_sonoma: "7119f5e278adbd4ea156188b77c2f9a4cb50cce88d78407986c37e431c0a4195" + sha256 cellar: :any, sonoma: "bfece3bd182b3bacc33ad714238fccbe59427aa405a4f0fe92bc3b7d9c8ac631" + sha256 cellar: :any_skip_relocation, arm64_linux: "48d6ffede0996476e329902394fe8848a346f057b9a1f7113686b163a4c917c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f2c7c9b88d0214e3fdc7b8fcf9f412fd5f306eacc069adbc388683d1f0f9603" + end + + depends_on "qttools" => :build + depends_on "qtbase" + depends_on "qtsvg" + + on_macos do + depends_on "qttools" + end + + # Apply Fedora patch to fix pkgconfig file. + # Issue ref: https://sourceforge.net/p/qwt/bugs/353/ + patch do + url "https://src.fedoraproject.org/rpms/qwt/raw/ea40e765e46413ae865a00f606688ea05e378e8a/f/qwt-pkgconfig.patch" + sha256 "7ceb1153ba1d8da4dd61f343023fe742a304fba9f7ff8737c0e62f7dcb0e2bc2" + end + + def install + inreplace "qwtconfig.pri" do |s| + s.gsub!(/^(\s*QWT_INSTALL_PREFIX\s*=).*$/, "\\1 #{prefix}") + s.gsub! "= $${QWT_INSTALL_PREFIX}/doc", "= #{doc}" + s.gsub! "= $${QWT_INSTALL_PREFIX}/plugins/designer", "= $${QWT_INSTALL_PREFIX}/share/qt/plugins/designer" + s.gsub! "= $${QWT_INSTALL_PREFIX}/features", "= $${QWT_INSTALL_PREFIX}/share/qt/mkspecs/features" + end + + os = OS.mac? ? "macx" : OS.kernel_name.downcase + compiler = ENV.compiler.to_s.match?("clang") ? "clang" : "g++" + + system "qmake", "-config", "release", "-spec", "#{os}-#{compiler}" + system "make" + system "make", "install" + + # Backwards compatibility symlinks. Remove in a future release + odie "Remove backwards compatibility symlinks!" if version >= 7 + prefix.install_symlink share/"qt/mkspecs/features" + (lib/"qt/plugins/designer").install_symlink share.glob("qt/plugins/designer/*") + end + + test do + (testpath/"test.pro").write <<~QMAKE + CONFIG += console qwt + CONFIG -= app_bundle + SOURCES += test.cpp + TARGET = test + TEMPLATE = app + QMAKE + + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1"); + return (curve1 == NULL); + } + CPP + + ENV.delete "CPATH" + ENV["LC_ALL"] = "en_US.UTF-8" + + system Formula["qtbase"].bin/"qmake", "test.pro" + system "make" + system "./test" + end +end diff --git a/Formula/q/qxmpp.rb b/Formula/q/qxmpp.rb new file mode 100644 index 0000000000000..42cab0c4bce54 --- /dev/null +++ b/Formula/q/qxmpp.rb @@ -0,0 +1,72 @@ +class Qxmpp < Formula + desc "Cross-platform C++ XMPP client and server library" + homepage "https://invent.kde.org/libraries/qxmpp" + url "https://invent.kde.org/libraries/qxmpp/-/archive/v1.11.3/qxmpp-v1.11.3.tar.bz2" + sha256 "afa01989d80d06c377b91af82cd951b8bdf568e6f8f76b9446756d99de7f5e29" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "eb1bf0e04f33601f45c01516446d20b92f7195523f952b49e37e3b9df6f1d35c" + sha256 cellar: :any, arm64_sequoia: "6333f736c870a3281ab985f60d7bc9ebf6794e03ad06cd0b25c036a9fadffe1e" + sha256 cellar: :any, arm64_sonoma: "96ade5ffd3bd722939e8e8ae5400bf37b076b81d6bfb555c711ad56df6c6c510" + sha256 cellar: :any, sonoma: "7abb7b04f9bcf03446bb731223e89cbd2b823275089948281d473959dbd70b14" + sha256 cellar: :any_skip_relocation, arm64_linux: "2baaec7a642c6c283025f3707d0691955b92a1636be59fb739748302ac9f5faa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0cb30f679858afb6133e09e3de793b2dded1e1e7b5dc5fd5796df2ad70d191b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on xcode: :build + depends_on "qtbase" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1400 + end + + fails_with :clang do + build 1400 + cause "Requires C++20" + end + + fails_with :gcc do + version "9" + cause "Requires C++20" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1400 + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV.delete "CPATH" + (testpath/"test.pro").write <<~QMAKE + TEMPLATE = app + CONFIG += console + CONFIG -= app_bundle + TARGET = test + QT += network + SOURCES += test.cpp + INCLUDEPATH += #{include} + LIBPATH += #{lib} + LIBS += -lQXmppQt6 + QMAKE_RPATHDIR += #{lib} + QMAKE + + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QXmppClient client; + return 0; + } + CPP + + system Formula["qtbase"].bin/"qmake", "test.pro" + system "make" + assert_path_exists testpath/"test", "test output file does not exist!" + system "./test" + end +end diff --git a/Formula/qalculate-gtk.rb b/Formula/qalculate-gtk.rb deleted file mode 100644 index 3f33a06978bb0..0000000000000 --- a/Formula/qalculate-gtk.rb +++ /dev/null @@ -1,28 +0,0 @@ -class QalculateGtk < Formula - desc "Multi-purpose desktop calculator" - homepage "https://qalculate.github.io/" - url "https://github.com/Qalculate/qalculate-gtk/releases/download/v2.8.2/qalculate-gtk-2.8.2.tar.gz" - sha256 "cf924d3de4f5c70a95d83c35540fa6820fe3e19a49ce87fa1182e757246e29e9" - - bottle do - cellar :any - sha256 "b83640765c09ab534524b5a9e66e7f7109a5ce2d51e0dd41ec31583c191186a1" => :mojave - sha256 "9a263641da3ba1072b30f8e8682a465d03aee7786d2fabc1e214d5561d8222c2" => :high_sierra - sha256 "373a0de63d6a778cd7e8c381b929bfa2c13baae28bcb6027950f3f05d54cd22c" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "gtk+3" - depends_on "libqalculate" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/qalculate-gtk", "-v" - end -end diff --git a/Formula/qbs.rb b/Formula/qbs.rb deleted file mode 100644 index b7f0c0f35fbdf..0000000000000 --- a/Formula/qbs.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Qbs < Formula - desc "Build tool for developing projects across multiple platforms" - homepage "https://wiki.qt.io/Qbs" - url "https://download.qt.io/official_releases/qbs/1.12.2/qbs-src-1.12.2.tar.gz" - sha256 "97819b8b404a6ee5715d38ceda5ac1d992500a38f8956abe4a58a1d66e64d6f1" - head "https://code.qt.io/qbs/qbs.git" - - bottle do - cellar :any - sha256 "034118c02dd613f4ea1ec5a194b2bce35fd92e7da8980833bd73c26fefe6cc83" => :mojave - sha256 "8e1ab3e24fb13e9cbc9f8f48412baab93fcad9b53b6bbcde182aa54e52492f84" => :high_sierra - sha256 "db191a9143a006bf964add16229ae5d7f564a554e2d44ccb1b8b5c1d79241fff" => :sierra - end - - depends_on "qt" - - def install - system "qmake", "qbs.pro", "-r", "QBS_INSTALL_PREFIX=#{prefix}", "CONFIG+=qbs_disable_rpath" - system "make", "install", "INSTALL_ROOT=/" - end - - test do - (testpath/"test.c").write <<~EOS - int main() { - return 0; - } - EOS - - (testpath/"test.qbs").write <<~EOS - import qbs - - CppApplication { - name: "test" - files: ["test.c"] - consoleApplication: true - } - EOS - - system "#{bin}/qbs", "run", "-f", "test.qbs" - end -end diff --git a/Formula/qca.rb b/Formula/qca.rb deleted file mode 100644 index a28e131027fad..0000000000000 --- a/Formula/qca.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Qca < Formula - desc "Qt Cryptographic Architecture (QCA)" - homepage "https://userbase.kde.org/QCA" - revision 2 - head "https://anongit.kde.org/qca.git" - - stable do - url "https://github.com/KDE/qca/archive/v2.1.3.tar.gz" - sha256 "a5135ffb0250a40e9c361eb10cd3fe28293f0cf4e5c69d3761481eafd7968067" - - # upstream fixes for macOS building (remove on 2.2.0 upgrade) - patch do - url "https://github.com/KDE/qca/commit/7ba0ee591e0f50a7e7b532f9eb7e500e7da784fb.diff?full_index=1" - sha256 "3f6c8a8bbd246556c690142c209a34973981be66e46fee991a456fb2e8b66d72" - end - patch do - url "https://github.com/KDE/qca/commit/b435c1b87b14ac2d2de9f83e586bfd6d8c2a755e.diff?full_index=1" - sha256 "9ea01ad6b21282ff62b18ac02588f7106b75056ab8379dff3fdfcff13a6c122f" - end - patch do - url "https://github.com/KDE/qca/commit/f4b2eb0ced5310f3c43398eb1f03e0c065e08a82.diff?full_index=1" - sha256 "d6c27ebfd8fec5284e4a0a39faf62e44764be5baff08141bd7f4da6d0b9f438d" - end - - # use major version for framework, instead of full version - # see: https://github.com/KDE/qca/pull/3 - patch do - url "https://github.com/KDE/qca/pull/3.patch?full_index=1" - sha256 "37281b8fefbbdab768d7abcc39fb1c1bf85159730c2a4de6e84f0bf318ebac2c" - end - end - - bottle do - rebuild 2 - sha256 "2bb9c83e54cd7ffef77b7111c1163ce2aa2efe450aab7be62c4ba4f8968f2bfc" => :mojave - sha256 "ec20d95d269615e6ab276c21866b54ecd13fcaf33d543e47b8b9f45362f4d801" => :high_sierra - sha256 "23eeb0c71865eaa6e5c29311480bbdcf2a80aa9c818853e8b7155b5a97689fb1" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl" # qca-ossl plugin - depends_on "qt" - - def install - args = std_cmake_args - args << "-DQT4_BUILD=OFF" - args << "-DBUILD_TESTS=OFF" - args << "-DQCA_PLUGINS_INSTALL_DIR=#{lib}/qt5/plugins" - - # Disable some plugins. qca-ossl, qca-cyrus-sasl, qca-logger, - # qca-softstore are always built. - args << "-DWITH_botan_PLUGIN=NO" - args << "-DWITH_gcrypt_PLUGIN=NO" - args << "-DWITH_gnupg_PLUGIN=NO" - args << "-DWITH_nss_PLUGIN=NO" - args << "-DWITH_pkcs11_PLUGIN=NO" - - # ensure opt_lib for framework install name and linking (can't be done via CMake configure) - inreplace "src/CMakeLists.txt", - /^(\s+)(INSTALL_NAME_DIR )("\$\{QCA_LIBRARY_INSTALL_DIR\}")$/, - "\\1\\2\"#{opt_lib}\"" - - system "cmake", ".", *args - system "make", "install" - end - - test do - system bin/"qcatool-qt5", "--noprompt", "--newpass=", - "key", "make", "rsa", "2048", "test.key" - end -end diff --git a/Formula/qcachegrind.rb b/Formula/qcachegrind.rb deleted file mode 100644 index 94bf840ece2d2..0000000000000 --- a/Formula/qcachegrind.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Qcachegrind < Formula - desc "Visualize data generated by Cachegrind and Calltree" - homepage "https://kcachegrind.github.io/" - url "https://download.kde.org/stable/applications/18.04.3/src/kcachegrind-18.04.3.tar.xz" - sha256 "2370827f8d3c29ec931fc3ebf34726e42d25aaaab6c2f10dc5dd87f57056acfd" - revision 1 - - bottle do - cellar :any - sha256 "e53f3805eed322c207ea13e6d8a5917f16329b423adf11864ad6b4778110c07a" => :mojave - sha256 "7a0dd392028ecb443bf84284dc671c1697781c5099c253dc526cd02d5530e697" => :high_sierra - sha256 "f8ec63325129315fd760eccdc59ef14ac096f9f5ddb49e52a495c67e6980b835" => :sierra - sha256 "4f5b0000b8391dcadbb9b043c475a80753e1421d314749076029674116840eed" => :el_capitan - end - - depends_on "graphviz" - depends_on "qt" - - def install - cd "qcachegrind" do - system "#{Formula["qt"].opt_bin}/qmake", "-spec", "macx-clang", - "-config", "release" - system "make" - prefix.install "qcachegrind.app" - bin.install_symlink prefix/"qcachegrind.app/Contents/MacOS/qcachegrind" - end - end -end diff --git a/Formula/qcli.rb b/Formula/qcli.rb deleted file mode 100644 index 3105cb52da5df..0000000000000 --- a/Formula/qcli.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Qcli < Formula - desc "Report audiovisual metrics via libavfilter" - homepage "https://bavc.org/preserve-media/preservation-tools" - url "https://github.com/bavc/qctools/archive/v1.0.tar.gz" - sha256 "4b687eb9aedf29a8262393079669d3870c04b510669b9df406021243b8ebd918" - head "https://github.com/bavc/qctools.git" - - bottle do - cellar :any - sha256 "ff59d63feaa9096773228c1e4dd866da2e5bd5812c38645669c80c31be3c7bc8" => :mojave - sha256 "d726ff0f06c9e604a95d36d0eae58ca886c6b2024cefe4d77adc92598dd8d56d" => :high_sierra - sha256 "837745fe83f29aa3d83de03bd7ed22785248eb9328a5f18bda8a04e151af3c62" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "qt" - depends_on "qwt" - - def install - ENV["QCTOOLS_USE_BREW"]="true" - - cd "Project/QtCreator/qctools-lib" do - system "qmake", "qctools-lib.pro" - system "make" - end - cd "Project/QtCreator/qctools-cli" do - system "qmake", "qctools-cli.pro" - system "make" - bin.install "qcli" - end - end - - test do - # Create an example mp4 file - mp4out = testpath/"video.mp4" - system "ffmpeg", "-filter_complex", "testsrc=rate=1:duration=1", mp4out - # Create a qcli report from the mp4 - qcliout = testpath/"video.mp4.qctools.xml.gz" - system bin/"qcli", "-i", mp4out, "-o", qcliout - assert_predicate qcliout, :exist? - end -end diff --git a/Formula/qd.rb b/Formula/qd.rb deleted file mode 100644 index 12c4cf7b49fcd..0000000000000 --- a/Formula/qd.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Qd < Formula - desc "C++/Fortran-90 double-double and quad-double package" - homepage "https://crd.lbl.gov/~dhbailey/mpdist/" - url "https://crd.lbl.gov/~dhbailey/mpdist/qd-2.3.21.tar.gz" - sha256 "185c97e38b00edf6f5dea3dfc48c5c0e3e8386f6ad2d815a2b93b72998d509f2" - - bottle do - cellar :any - sha256 "f6a06e197e6d4b466a1d1f11f2505dc3c46b97370ae46cdbe008472006db8369" => :mojave - sha256 "e265f9098008e2bf26e2f1b1e5ca1e5ec7309575a98f0eac9cb73aa2273896a0" => :high_sierra - sha256 "cafc8e6f65cebd1c01f90adb18bc481efa5b8b3d4acf4c0f122940c6088192ba" => :sierra - sha256 "7665a3c6b50383b20369c304038df2c75c874229cc79bf96bdd4c12c2efa937f" => :el_capitan - end - - depends_on "gcc" # for gfortran - - def install - system "./configure", "--disable-dependency-tracking", "--enable-shared", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/qd-config --configure-args") - end -end diff --git a/Formula/qdae.rb b/Formula/qdae.rb deleted file mode 100644 index 8c3524a4c8843..0000000000000 --- a/Formula/qdae.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Qdae < Formula - desc "Quick and Dirty Apricot Emulator" - homepage "https://www.seasip.info/Unix/QDAE/" - url "https://www.seasip.info/Unix/QDAE/qdae-0.0.10.tar.gz" - sha256 "780752c37c9ec68dd0cd08bd6fe288a1028277e10f74ef405ca200770edb5227" - - bottle do - sha256 "0d4d08d365cd0945d39a04cf9ffdff5b8692dd4b0038553398a62e7b25361590" => :mojave - sha256 "60fdb0801b8db3e5b36bc896aca8d4e71278ffe2106019e38f34ffd9605500ec" => :high_sierra - sha256 "bf2425bdeea4a4ac407056410f6758d44f2b31a9c9afc13871f96914c1d17651" => :sierra - sha256 "b8882074853ecfcbf6d2426361d5baa553380efbb5896777f0c829cac65811a4" => :el_capitan - sha256 "1a4eeaff6ff2a86179b673c04837aebe2664ca1eeb065e3081296f653b762cc7" => :yosemite - end - - depends_on "libxml2" - depends_on "sdl" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - Data files are located in the following directory: - #{share}/QDAE - EOS - end - - test do - assert_predicate bin/"qdae", :executable? - end -end diff --git a/Formula/qdbm.rb b/Formula/qdbm.rb deleted file mode 100644 index 7bc4229751cdd..0000000000000 --- a/Formula/qdbm.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Qdbm < Formula - desc "Library of routines for managing a database" - homepage "https://fallabs.com/qdbm/" - url "https://fallabs.com/qdbm/qdbm-1.8.78.tar.gz" - sha256 "b466fe730d751e4bfc5900d1f37b0fb955f2826ac456e70012785e012cdcb73e" - - bottle do - cellar :any - rebuild 1 - sha256 "4861035c21a7fcd02efca60c922d06a45f3078eaffa374784a533932f9efa806" => :mojave - sha256 "4ec4e60b16efb21fd7835c182fcf5d8f43c4af4329dd8afb07b4900bc1b17f60" => :high_sierra - sha256 "547ecf82252706d276c8359448b7f4e738264999028b06cd3738af34ba58276c" => :sierra - sha256 "6fd80b953a53cdf048bf686d2ac3620deda19a022a10a1e7cbd7aea073bf9b6a" => :el_capitan - sha256 "4784d30c880c089dcef588c7d91d537269404a4917c9b2b1ef8b5123a727cee1" => :yosemite - sha256 "bf5c5c1a087e22f9f06d29e2e139e55f6866ac1826ef725733d108ace6cf4d67" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--enable-bzip", - "--enable-zlib", - "--enable-iconv" - system "make", "mac" - system "make", "check-mac" - system "make", "install-mac" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - #define NAME "mike" - #define NUMBER "00-12-34-56" - #define DBNAME "book" - - int main(void) { - DEPOT *depot; - char *val; - - if(!(depot = dpopen(DBNAME, DP_OWRITER | DP_OCREAT, -1))) { return 1; } - if(!dpput(depot, NAME, -1, NUMBER, -1, DP_DOVER)) { return 1; } - if(!(val = dpget(depot, NAME, -1, 0, -1, NULL))) { return 1; } - - printf("%s, %s\\n", NAME, val); - free(val); - - if(!dpclose(depot)) { return 1; } - - return 0; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lqdbm", "-o", "test" - assert_equal "mike, 00-12-34-56", shell_output("./test").chomp - end -end diff --git a/Formula/qemu.rb b/Formula/qemu.rb deleted file mode 100644 index 4a96d254f8758..0000000000000 --- a/Formula/qemu.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Qemu < Formula - desc "x86 and PowerPC Emulator" - homepage "https://www.qemu.org/" - url "https://download.qemu.org/qemu-3.1.0.tar.xz" - sha256 "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc" - revision 1 - head "https://git.qemu.org/git/qemu.git" - - bottle do - rebuild 1 - sha256 "dd7cb5e2b5d7fc3738c72f1e8fe47ee2fd335223b1ec4694749800b6ba87d552" => :mojave - sha256 "86cad762d521c4170c0af2fa2932e0d123db2838097895e155f49f12525eb90a" => :high_sierra - sha256 "ff6d0904a871d605aefda6cd0574a0ccfb09b758cca832d347ff843eb52f97fd" => :sierra - end - - deprecated_option "with-sdl" => "with-sdl2" - deprecated_option "with-gtk+" => "with-gtk+3" - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "jpeg" - depends_on "libpng" - depends_on "libssh2" - depends_on "libusb" - depends_on "ncurses" - depends_on "pixman" - depends_on "vde" - depends_on "gtk+3" => :optional - depends_on "sdl2" => :optional - - fails_with :gcc do - cause "qemu requires a compiler with support for the __thread specifier" - end - - # 820KB floppy disk image file of FreeDOS 1.2, used to test QEMU - resource "test-image" do - url "https://dl.bintray.com/homebrew/mirror/FD12FLOPPY.zip" - sha256 "81237c7b42dc0ffc8b32a2f5734e3480a3f9a470c50c14a9c4576a2561a35807" - end - - def install - ENV["LIBTOOL"] = "glibtool" - - args = %W[ - --prefix=#{prefix} - --cc=#{ENV.cc} - --host-cc=#{ENV.cc} - --disable-bsd-user - --disable-guest-agent - --enable-curses - --enable-libssh2 - --enable-vde - --extra-cflags=-DNCURSES_WIDECHAR=1 - ] - - # Cocoa and SDL2/GTK+ UIs cannot both be enabled at once. - if build.with?("sdl2") || build.with?("gtk+3") - args << "--disable-cocoa" - else - args << "--enable-cocoa" - end - - # Sharing Samba directories in QEMU requires the samba.org smbd which is - # incompatible with the macOS-provided version. This will lead to - # silent runtime failures, so we set it to a Homebrew path in order to - # obtain sensible runtime errors. This will also be compatible with - # Samba installations from external taps. - args << "--smbd=#{HOMEBREW_PREFIX}/sbin/samba-dot-org-smbd" - - args << (build.with?("sdl2") ? "--enable-sdl" : "--disable-sdl") - args << (build.with?("gtk+3") ? "--enable-gtk" : "--disable-gtk") - - system "./configure", *args - system "make", "V=1", "install" - end - - test do - expected = build.stable? ? version.to_s : "QEMU Project" - assert_match expected, shell_output("#{bin}/qemu-system-i386 --version") - resource("test-image").stage testpath - assert_match "file format: raw", shell_output("#{bin}/qemu-img info FLOPPY.img") - end -end diff --git a/Formula/qhull.rb b/Formula/qhull.rb deleted file mode 100644 index 08c8a1ca1aa23..0000000000000 --- a/Formula/qhull.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Qhull < Formula - desc "Computes convex hulls in n dimensions" - homepage "http://www.qhull.org/" - url "http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz" - version "2015.2" - sha256 "78b010925c3b577adc3d58278787d7df08f7c8fb02c3490e375eab91bb58a436" - - bottle do - cellar :any - sha256 "33b41bad4871bd781b91ca4c418a1b5c94dc29f676288bd8f41b5ae8c302b329" => :mojave - sha256 "91d7e43f955fb4d9513d588e4f56a6b6c6101e9a9e0f6ed73c63a045bd4b8c25" => :high_sierra - sha256 "2b0192507bef8e077cae894ee59a2a25b490170cc1be64413caa1ac6e48da86d" => :sierra - sha256 "98d3967e46833ff3278b6815b638b5c4b049bb621543b9015124fef83276ab01" => :el_capitan - sha256 "00fb087ce5f3d674d22959ea820b4e3605b02ea31694d4f00d2044bc54ca3c02" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - input = Utils.popen_read(bin/"rbox", "c", "D2") - output = pipe_output("#{bin}/qconvex s n 2>&1", input, 0) - assert_match "Number of facets: 4", output - end -end diff --git a/Formula/qjackctl.rb b/Formula/qjackctl.rb deleted file mode 100644 index 0eb3461676e62..0000000000000 --- a/Formula/qjackctl.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Qjackctl < Formula - desc "Simple Qt application to control the JACK sound server daemon" - homepage "https://qjackctl.sourceforge.io/" - url "https://downloads.sourceforge.net/qjackctl/qjackctl-0.5.3.tar.gz" - sha256 "813be3b92442ee89a1894407980cb3c95b549e6e94b6b155f218d15291530874" - head "https://git.code.sf.net/p/qjackctl/code.git" - - bottle do - sha256 "e661c47a8bb9be298dabc9d0c656f962b7157c6aa7dcebef18119af8ea07c26b" => :mojave - sha256 "e23c9278a737692dffba9f15d4ba96ee3545d5054d4dc40b8f298fa2ac88d6d0" => :high_sierra - sha256 "b5561ee222cd865048a52ea95c98f1a06b05d17ed31500a8f7e8407ef8caace2" => :sierra - sha256 "8c0022b1933f24a53f54ca478a51231951efb00bfbe7f54f68645b5559a551e1" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "jack" - depends_on "qt" - - needs :cxx11 - - def install - ENV.cxx11 - system "./configure", "--disable-debug", - "--disable-dbus", - "--disable-portaudio", - "--disable-xunique", - "--prefix=#{prefix}", - "--with-jack=#{Formula["jack"].opt_prefix}", - "--with-qt5=#{Formula["qt"].opt_prefix}" - - system "make", "install" - prefix.install bin/"qjackctl.app" - bin.install_symlink prefix/"qjackctl.app/Contents/MacOS/qjackctl" - end - - test do - assert_match version.to_s, shell_output("#{bin}/qjackctl --version 2>&1", 1) - end -end diff --git a/Formula/qjson.rb b/Formula/qjson.rb deleted file mode 100644 index 94362a00d9b25..0000000000000 --- a/Formula/qjson.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Qjson < Formula - desc "Map JSON to QVariant objects" - homepage "https://qjson.sourceforge.io" - url "https://github.com/flavio/qjson/archive/0.9.0.tar.gz" - sha256 "e812617477f3c2bb990561767a4cd8b1d3803a52018d4878da302529552610d4" - revision 1 - - bottle do - cellar :any - sha256 "02abebab98b79dd60197c0e2d5f7a468e96cb738e5c2065a3664db0bf59cf59e" => :mojave - sha256 "1bd2a1a0fcabf72acedd8a7c9d68bae090d31cc6a673515461ce487f15b88772" => :high_sierra - sha256 "bd50e784f99285df8e70448f041c67fe1f8c79f5d6b17f130a2e3a11bc19227d" => :sierra - sha256 "befe6eeb2426c2f698dd54999398fa569d91246d239aef3e877680902a20f945" => :el_capitan - sha256 "f17d608977669101c13d3f57136d8d8121a0f87e26a0d7a55ee5a21659294355" => :yosemite - end - - depends_on "cmake" => :build - depends_on "qt" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - QJson::Parser parser; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", "-I#{include}", - "-L#{lib}", "-lqjson-qt5", - "-I#{Formula["qt"].opt_include}", - "-F#{Formula["qt"].opt_lib}", "-framework", "QtCore" - system "./test" - end -end diff --git a/Formula/qmmp.rb b/Formula/qmmp.rb deleted file mode 100644 index e793f41a80f9b..0000000000000 --- a/Formula/qmmp.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Qmmp < Formula - desc "Qt-based Multimedia Player" - homepage "http://qmmp.ylsoftware.com/" - url "http://qmmp.ylsoftware.com/files/qmmp-1.2.4.tar.bz2" - sha256 "224904f073e3921a080dca008e6c99e3d606f5442d1df08835cba000a069ae66" - revision 1 - head "http://svn.code.sf.net/p/qmmp-dev/code/branches/qmmp-1.2/" - - bottle do - rebuild 1 - sha256 "7f9ab945240bc5f263c4561bdd82b1095992908dca40f4686e7cb6b2ec3c4a48" => :mojave - sha256 "4d2b7beca1e024c6994e8fe7cfb822b04abff5d7f9b2e200ed7263c34955417d" => :high_sierra - sha256 "9ffc7e387987e788fb75c1691a3ad7586598b85f79868b616aafbd87df33fb47" => :sierra - end - - depends_on "cmake" => :build - depends_on "faad2" - depends_on "ffmpeg" - depends_on "flac" - depends_on "libbs2b" - depends_on "libmms" - depends_on "libogg" - depends_on "libsamplerate" - depends_on "libsndfile" - depends_on "libsoxr" - depends_on "libvorbis" - depends_on "mad" - depends_on "mplayer" - depends_on "musepack" - depends_on "opus" - depends_on "opusfile" - depends_on "qt" - depends_on "taglib" - - def install - system "cmake", "./", "-USE_SKINNED", "-USE_ENCA", "-USE_QMMP_DIALOG", *std_cmake_args - system "make", "install" - - # fix linkage - cd (lib.to_s) do - Dir["*.dylib", "qmmp/*/*.so"].select { |f| File.ftype(f) == "file" }.each do |f| - MachO::Tools.dylibs(f).select { |d| d.start_with?("/tmp") }.each do |d| - bname = File.dirname(d) - d_new = d.sub(bname, opt_lib.to_s) - MachO::Tools.change_install_name(f, d, d_new) - end - end - end - end - - test do - system bin/"qmmp", "--version" - end -end diff --git a/Formula/qpdf.rb b/Formula/qpdf.rb deleted file mode 100644 index e9ed43f4c3d65..0000000000000 --- a/Formula/qpdf.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Qpdf < Formula - desc "Tools for and transforming and inspecting PDF files" - homepage "https://github.com/qpdf/qpdf" - url "https://github.com/qpdf/qpdf/releases/download/release-qpdf-8.2.1/qpdf-8.2.1.tar.gz" - sha256 "f445d3ebda833fe675b7551378f41fa1971cc6f7a7921bbbb94d3a71a404abc9" - - bottle do - cellar :any - sha256 "d1dc8195734a59a37b403d4354d5a1df78d9e546ee48b54333f55bdce2fb8f05" => :mojave - sha256 "375e32a6c852c44b16fbc143b3b15185607b2bbbcd1084343999839deff1dd0b" => :high_sierra - sha256 "dcfc26a15e4cc9031901701cd708440d38cbf92bd3908c941331ade49a94ea5d" => :sierra - sha256 "62d7195d5e9aa34dfd55ae65d554d55c4a8ef3f74a3abe1e85c2abfd8bd63c70" => :el_capitan - end - - depends_on "jpeg" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/qpdf", "--version" - end -end diff --git a/Formula/qpid-proton.rb b/Formula/qpid-proton.rb deleted file mode 100644 index 1e6d3baf88dc3..0000000000000 --- a/Formula/qpid-proton.rb +++ /dev/null @@ -1,43 +0,0 @@ -class QpidProton < Formula - desc "High-performance, lightweight AMQP 1.0 messaging library" - homepage "https://qpid.apache.org/proton/" - url "https://www.apache.org/dyn/closer.lua?path=qpid/proton/0.26.0/qpid-proton-0.26.0.tar.gz" - sha256 "0eddac870f0085b9aeb0c9da333bd3f53fedb7c872164171a7cc06761ddbbd75" - head "https://git.apache.org/qpid-proton.git" - - bottle do - cellar :any - sha256 "3da4e0e50e5e8bd6fc6ce1cb8ce3373444746b100f4b9be12070c5835502ebdb" => :mojave - sha256 "4892c0e802cb050bcc5eccda6dd94c9ac59a028672fe099dd2469eec702914ce" => :high_sierra - sha256 "b5b4898b4902957ce8d0b36d9afadc766f1f134e0f1acfc771d57506f7c80e7d" => :sierra - end - - depends_on "cmake" => :build - depends_on "libuv" - depends_on "openssl" - - def install - system "cmake", ".", "-DBUILD_BINDINGS=", - "-DLIB_INSTALL_DIR=#{lib}", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "proton/message.h" - #include "proton/messenger.h" - int main() - { - pn_message_t * message; - pn_messenger_t * messenger; - pn_data_t * body; - message = pn_message(); - messenger = pn_messenger(NULL); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lqpid-proton", "-o", "test" - system "./test" - end -end diff --git a/Formula/qpm.rb b/Formula/qpm.rb deleted file mode 100644 index 2ea4f948fd02c..0000000000000 --- a/Formula/qpm.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Qpm < Formula - desc "Package manager for Qt applications" - homepage "https://www.qpm.io" - url "https://github.com/Cutehacks/qpm.git", - :tag => "v0.11.0", - :revision => "fc340f20ddcfe7e09f046fd22d2af582ff0cd4ef" - - bottle do - cellar :any_skip_relocation - sha256 "4ef0d236caf32a763f7c6dc717a47d23a99d2058617ed6ac151bc8b8a75fb881" => :mojave - sha256 "af6f724ef7820ce62453edcd72f39b9c283554aa5bb2be091d37f48935fe7f5e" => :high_sierra - sha256 "5c57c74e4079c59241e96b16f6236346efb4e358953f4c1edba359aa21d0d10c" => :sierra - sha256 "316bf8d4802e252fe6ff20a1b1dec582968a0f5a34fde5001b6a92f7ad30dfa9" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src").mkpath - ln_s buildpath, "src/qpm.io" - system "go", "build", "-o", "bin/qpm", "qpm.io/qpm" - bin.install "bin/qpm" - end - - test do - system bin/"qpm", "install", "io.qpm.example" - assert_predicate testpath/"qpm.json", :exist? - end -end diff --git a/Formula/qprint.rb b/Formula/qprint.rb deleted file mode 100644 index c673e091462b1..0000000000000 --- a/Formula/qprint.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Qprint < Formula - desc "Encoder and decoder for quoted-printable encoding" - homepage "https://www.fourmilab.ch/webtools/qprint" - url "https://www.fourmilab.ch/webtools/qprint/qprint-1.1.tar.gz" - sha256 "ffa9ca1d51c871fb3b56a4bf0165418348cf080f01ff7e59cd04511b9665019c" - - bottle do - cellar :any_skip_relocation - sha256 "0915aa3e8b8481b717c4c84b0eda595821ecc99c9ffdcd0aa3e4952a3de9ae87" => :mojave - sha256 "57950dba66674d62c84076374427f6c3de6d8cda81448c50b579c11b1b1959e4" => :high_sierra - sha256 "f26387daf3d025dd45843784dd90fb3bf77609bdf0eb870f1b66782c89571950" => :sierra - sha256 "9660443356a1f9571b39ea496349482e17f7c0d06829dd06945ca7680291c0bf" => :el_capitan - sha256 "92470bcb0bd97c4d13181969ebeb0339faa85338ad139bf4a5ac19550635f5c1" => :yosemite - sha256 "fbf2eadbf60b30557e3741e28545070bb377602aa8f1c1c49b5f65375381a2c4" => :mavericks - sha256 "9c3ac1e5f9b8275be6ce9c9d47471dca3b08f02e1b269b68e77a5b5bc31d9477" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - bin.mkpath - man1.mkpath - system "make", "install" - end - - test do - msg = "test homebrew" - encoded = pipe_output("#{bin}/qprint -e", msg) - assert_equal msg, pipe_output("#{bin}/qprint -d", encoded) - end -end diff --git a/Formula/qrencode.rb b/Formula/qrencode.rb deleted file mode 100644 index 7aea883f23a25..0000000000000 --- a/Formula/qrencode.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Qrencode < Formula - desc "QR Code generation" - homepage "https://fukuchi.org/works/qrencode/index.html.en" - url "https://fukuchi.org/works/qrencode/qrencode-4.0.2.tar.gz" - sha256 "dbabe79c07614625d1f74d8c0ae2ee5358c4e27eab8fd8fe31f9365f821a3b1d" - - bottle do - cellar :any - sha256 "1da2c679c176cd636ba258e6f504b35e86b0378f1a97608187b7cc7bb133cc9c" => :mojave - sha256 "a541a4b376c69168e1d3392c90810893e02bfc1ba235437453018495901a0171" => :high_sierra - sha256 "9b876f9388c74c61e1d5a3c87663b424c4215e546c37a3a8e1543e5de976988d" => :sierra - sha256 "83b2cb0f1f60421584a5e6694907ccb636834349a61a40dc8e1a40272a95cc9f" => :el_capitan - end - - head do - url "https://github.com/fukuchi/libqrencode.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libpng" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/qrencode", "123456789", "-o", "test.png" - end -end diff --git a/Formula/qriollo.rb b/Formula/qriollo.rb deleted file mode 100644 index 71fa9a1a72302..0000000000000 --- a/Formula/qriollo.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Qriollo < Formula - desc "Impure functional language, based on Rioplatense Spanish" - homepage "https://qriollo.github.io" - url "https://qriollo.github.io/Qriollo-0.91.tar.gz" - sha256 "c8357af8254a082d8e4da1de1bbf13bee27cfde8adb31ea0a5a0966bfbb7b28d" - head "https://github.com/qriollo/qriollo.git" - - bottle do - sha256 "c3e2482646a584e5ba13e795dc464bd8ee272dbbf42de8eb7d2c9a8663e4ec88" => :mojave - sha256 "589772b174426b627088e6586e8fb95196db74543b28d2871b3c643ed0570107" => :high_sierra - sha256 "eac8f1a19aebca8ab21b5d992b61f8d7d702a2a81d1bc04534acb5f46517f6d4" => :sierra - sha256 "c570641b476c08b7e8d26ea37486f6db64cb6f573e0228b3893742857ceca7a0" => :el_capitan - sha256 "dab13bc1d92169631801eaa347f58a71049a762b3994ace1efbbcb813a72afb3" => :yosemite - sha256 "bc0ef3114f072bfcbf3b647f47d77f82e24f650b52edfbd1b3f34fd4dcc08c98" => :mavericks - end - - depends_on "ghc" => :build - - def install - system "make" - bin.install "qr" - (lib/"chamuyo").install "Chamuyo.q" - end - - def caveats - <<~EOS - The standard module "Chamuyo.q" has been placed in: - #{lib}/chamuyo - EOS - end - - test do - test_file_name = "HolaMundo.q" - (testpath/test_file_name).write <<~EOS - enchufar Chamuyo - el programa es - escupir "Hola mundo\n" - EOS - system bin/"qr", "--ruta", "#{lib/"chamuyo"}:#{testpath}", test_file_name - end -end diff --git a/Formula/qrupdate.rb b/Formula/qrupdate.rb deleted file mode 100644 index 6350f035460a6..0000000000000 --- a/Formula/qrupdate.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Qrupdate < Formula - desc "Fast updates of QR and Cholesky decompositions" - homepage "https://sourceforge.net/projects/qrupdate/" - url "https://downloads.sourceforge.net/qrupdate/qrupdate-1.1.2.tar.gz" - sha256 "e2a1c711dc8ebc418e21195833814cb2f84b878b90a2774365f0166402308e08" - revision 8 - - bottle do - cellar :any - sha256 "3e9beaab01eb493f63fd2e472397423bdb6eb4da9ad21d77142450823b971ffa" => :mojave - sha256 "b5f9fcfd7ddaca8e64b8b200bd413588a7fe608b31b7d1b9a23be53a2084bd3a" => :high_sierra - sha256 "f1213f270e9c6a84e8c1707d3b956e7bb2a6670f53bbf405cdba4d8da2393846" => :sierra - sha256 "c84f04635d00f139bcc5114b36395e7347c675ccb10fbf88a1779de5c6816c3a" => :el_capitan - end - - depends_on "gcc" # for gfortran - depends_on "veclibfort" - - def install - # Parallel compilation not supported. Reported on 2017-07-21 at - # https://sourceforge.net/p/qrupdate/discussion/905477/thread/d8f9c7e5/ - ENV.deparallelize - - system "make", "lib", "solib", - "BLAS=-L#{Formula["veclibfort"].opt_lib} -lvecLibFort" - - # Confuses "make install" on case-insensitive filesystems - rm "INSTALL" - - # BSD "install" does not understand GNU -D flag. - # Create the parent directory ourselves. - inreplace "src/Makefile", "install -D", "install" - lib.mkpath - - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install "test/tch1dn.f", "test/utils.f" - end - - test do - system "gfortran", "-o", "test", pkgshare/"tch1dn.f", pkgshare/"utils.f", - "-L#{lib}", "-lqrupdate", - "-L#{Formula["veclibfort"].opt_lib}", "-lvecLibFort" - assert_match "PASSED 4 FAILED 0", shell_output("./test") - end -end diff --git a/Formula/qscintilla2.rb b/Formula/qscintilla2.rb deleted file mode 100644 index 697fc943d41ce..0000000000000 --- a/Formula/qscintilla2.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Qscintilla2 < Formula - desc "Port to Qt of the Scintilla editing component" - homepage "https://www.riverbankcomputing.com/software/qscintilla/intro" - url "https://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-2.10.4/QScintilla_gpl-2.10.4.tar.gz" - sha256 "0353e694a67081e2ecdd7c80e1a848cf79a36dbba78b2afa36009482149b022d" - revision 1 - - bottle do - cellar :any - sha256 "1fe86c636385cca113a39abc08bd95852ee3cd14cb49642316a19aff114781f2" => :mojave - sha256 "5d798036fba1637e6f8808598c3df7f7b48118e5cc8d21a87e56ebd221ae7683" => :high_sierra - sha256 "975755a7c0c04cc24c120f997809b562974e6dbd718879fa9a71031bff45959d" => :sierra - sha256 "24f06d0a2019efd91ef51954e850ddcb1b6d2581071a08b0e9763e3b3e483fa3" => :el_capitan - end - - depends_on "pyqt" - depends_on "python" - depends_on "python@2" - depends_on "qt" - depends_on "sip" - - def install - spec = (ENV.compiler == :clang && MacOS.version >= :mavericks) ? "macx-clang" : "macx-g++" - args = %W[-config release -spec #{spec}] - - cd "Qt4Qt5" do - inreplace "qscintilla.pro" do |s| - s.gsub! "$$[QT_INSTALL_LIBS]", lib - s.gsub! "$$[QT_INSTALL_HEADERS]", include - s.gsub! "$$[QT_INSTALL_TRANSLATIONS]", prefix/"trans" - s.gsub! "$$[QT_INSTALL_DATA]", prefix/"data" - s.gsub! "$$[QT_HOST_DATA]", prefix/"data" - end - - inreplace "features/qscintilla2.prf" do |s| - s.gsub! "$$[QT_INSTALL_LIBS]", lib - s.gsub! "$$[QT_INSTALL_HEADERS]", include - end - - system "qmake", "qscintilla.pro", *args - system "make" - system "make", "install" - end - - # Add qscintilla2 features search path, since it is not installed in Qt keg's mkspecs/features/ - ENV["QMAKEFEATURES"] = prefix/"data/mkspecs/features" - - cd "Python" do - Language::Python.each_python(build) do |python, version| - (share/"sip").mkpath - system python, "configure.py", "-o", lib, "-n", include, - "--apidir=#{prefix}/qsci", - "--destdir=#{lib}/python#{version}/site-packages/PyQt5", - "--stubsdir=#{lib}/python#{version}/site-packages/PyQt5", - "--qsci-sipdir=#{share}/sip", - "--qsci-incdir=#{include}", - "--qsci-libdir=#{lib}", - "--pyqt=PyQt5", - "--pyqt-sipdir=#{Formula["pyqt"].opt_share}/sip/Qt5", - "--sip-incdir=#{Formula["sip"].opt_include}", - "--spec=#{spec}" - system "make" - system "make", "install" - system "make", "clean" - end - end - end - - test do - (testpath/"test.py").write <<~EOS - import PyQt5.Qsci - assert("QsciLexer" in dir(PyQt5.Qsci)) - EOS - Language::Python.each_python(build) do |python, _version| - system python, "test.py" - end - end -end diff --git a/Formula/qsoas.rb b/Formula/qsoas.rb deleted file mode 100644 index b55281d081aac..0000000000000 --- a/Formula/qsoas.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Qsoas < Formula - desc "Versatile software for data analysis" - homepage "http://bip.cnrs-mrs.fr/bip06/qsoas/" - url "http://bip.cnrs-mrs.fr/bip06/qsoas/downloads/qsoas-2.2.0.tar.gz" - sha256 "acefcbb4286a6e0bf96353f924115d04a77d241962ceda890508bca19ee3b4f6" - - bottle do - sha256 "95be99b152857cd84d23c847d66ec90ed5dbccb245032aeaa63f9cb1c000c72f" => :mojave - sha256 "2864c431780caeff59926d6c51d2a5a925814b33d172b03065f8713d2b9d49ee" => :high_sierra - sha256 "8fd2e6ddb2224a9b00218572dc9e6f74ae45df730e468250b8674cf116975471" => :sierra - sha256 "34be95fb5a3919dad8d41579e1822bd9ba46a553c96b4f8f90268ef3491e228a" => :el_capitan - end - - depends_on "gsl" - depends_on "mruby" - depends_on "qt" - - def install - gsl = Formula["gsl"].opt_prefix - mruby = Formula["mruby"].opt_prefix - - system "qmake", "MRUBY_DIR=#{mruby}", "GSL_DIR=#{gsl}/include", - "QMAKE_LFLAGS=-L#{mruby}/lib -L#{gsl}/lib" - system "make" - - prefix.install "QSoas.app" - bin.write_exec_script "#{prefix}/QSoas.app/Contents/MacOS/QSoas" - end - - test do - assert_match "mfit-linear-kinetic-system", - shell_output("#{bin}/QSoas --list-commands") - end -end diff --git a/Formula/qstat.rb b/Formula/qstat.rb deleted file mode 100644 index 23ce104121888..0000000000000 --- a/Formula/qstat.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Qstat < Formula - desc "Query Quake servers from the command-line" - homepage "https://qstat.sourceforge.io" - url "https://downloads.sourceforge.net/project/qstat/qstat/qstat-2.11/qstat-2.11.tar.gz" - sha256 "16f0c0f55567597d7f2db5136a0858c56effb4481a2c821a48cd0432ea572150" - - bottle do - sha256 "1225042ca663297e1a38ab1da3a13998fa169dea184c569a17c3f0905894a64f" => :mojave - sha256 "a1eb6ad1e866332084773b799ae547f75d4b9f9684ce44d6177c8ee6d0bf3778" => :high_sierra - sha256 "816789bcb602cd112a64dadad943752fed3c7f32785e60a10e486026d5b26adc" => :sierra - sha256 "2f674bb005dab3dcce93c131e5b238f0813638a974f82c85bffdbbeef49eb698" => :el_capitan - sha256 "d63924f48565d8c17295544765e0dac015d7189c7608179dd9d0848c69f9e67b" => :yosemite - sha256 "96b05212759a5a648f24ade7334738bda8d4ef4eeb8669e31afe45ed6293dc52" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/qstat", "--help" - end -end diff --git a/Formula/qt.rb b/Formula/qt.rb deleted file mode 100644 index 54a179fd432ca..0000000000000 --- a/Formula/qt.rb +++ /dev/null @@ -1,102 +0,0 @@ -# Patches for Qt must be at the very least submitted to Qt's Gerrit codereview -# rather than their bug-report Jira. The latter is rarely reviewed by Qt. -class Qt < Formula - desc "Cross-platform application and UI framework" - homepage "https://www.qt.io/" - url "https://download.qt.io/official_releases/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz" - mirror "https://qt.mirror.constant.com/archive/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/qt5/qt-everywhere-src-5.12.0.tar.xz" - sha256 "356f42d9087718f22f03d13d0c2cdfb308f91dc3cf0c6318bed33f2094cd9d6c" - - head "https://code.qt.io/qt/qt5.git", :branch => "5.12", :shallow => false - - bottle do - cellar :any - sha256 "57779419d69d3155f10cd35b2c8be0426b206b12a78eed9fc16d1bc8f38de462" => :mojave - sha256 "b59a8686dcb7b95e14ec4c78a8aa989e8d8cbb5837618f3afbd5d42566c98c2b" => :high_sierra - sha256 "ca94b08badffa3d79912561d50781b632ac02ebef0890b691a7230d808ec727f" => :sierra - end - - keg_only "Qt 5 has CMake issues when linked" - - depends_on "pkg-config" => :build - depends_on :xcode => :build - - def install - args = %W[ - -verbose - -prefix #{prefix} - -release - -opensource -confirm-license - -system-zlib - -qt-libpng - -qt-libjpeg - -qt-freetype - -qt-pcre - -nomake examples - -nomake tests - -no-rpath - -pkg-config - -dbus-runtime - -proprietary-codecs - ] - - system "./configure", *args - system "make" - ENV.deparallelize - system "make", "install" - - # Some config scripts will only find Qt in a "Frameworks" folder - frameworks.install_symlink Dir["#{lib}/*.framework"] - - # The pkg-config files installed suggest that headers can be found in the - # `include` directory. Make this so by creating symlinks from `include` to - # the Frameworks' Headers folders. - Pathname.glob("#{lib}/*.framework/Headers") do |path| - include.install_symlink path => path.parent.basename(".framework") - end - - # Move `*.app` bundles into `libexec` to expose them to `brew linkapps` and - # because we don't like having them in `bin`. - # (Note: This move breaks invocation of Assistant via the Help menu - # of both Designer and Linguist as that relies on Assistant being in `bin`.) - libexec.mkpath - Pathname.glob("#{bin}/*.app") { |app| mv app, libexec } - end - - def caveats; <<~EOS - We agreed to the Qt open source license for you. - If this is unacceptable you should uninstall. - EOS - end - - test do - (testpath/"hello.pro").write <<~EOS - QT += core - QT -= gui - TARGET = hello - CONFIG += console - CONFIG -= app_bundle - TEMPLATE = app - SOURCES += main.cpp - EOS - - (testpath/"main.cpp").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) - { - QCoreApplication a(argc, argv); - qDebug() << "Hello World!"; - return 0; - } - EOS - - system bin/"qmake", testpath/"hello.pro" - system "make" - assert_predicate testpath/"hello", :exist? - assert_predicate testpath/"main.o", :exist? - system "./hello" - end -end diff --git a/Formula/qtads.rb b/Formula/qtads.rb deleted file mode 100644 index a1339cc2c0496..0000000000000 --- a/Formula/qtads.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Qtads < Formula - desc "TADS multimedia interpreter" - homepage "https://qtads.sourceforge.io/" - revision 1 - head "https://github.com/realnc/qtads.git" - - stable do - url "https://downloads.sourceforge.net/project/qtads/qtads-2.x/2.1.7/qtads-2.1.7.tar.bz2" - sha256 "7477bb3cb1f74dcf7995a25579be8322c13f64fb02b7a6e3b2b95a36276ef231" - - # Remove for > 2.1.7 - # fix infinite recursion - patch do - url "https://github.com/realnc/qtads/commit/d22054b.patch?full_index=1" - sha256 "e6af1eb7a8a4af72c9319ac6032a0bb8ffa098e7dd64d76da08ed0c7e50eaa7f" - end - - # Remove for > 2.1.7 - # fix pointer/integer comparison - patch do - url "https://github.com/realnc/qtads/commit/46701a2.patch?full_index=1" - sha256 "02c86bfa44769ec15844bbefa066360fb83ac923360ced140545fb782f4f3397" - end - - # Fix "error: ordered comparison between pointer and zero" - # Reported 11 Dec 2017 https://github.com/realnc/qtads/issues/7 - if DevelopmentTools.clang_build_version >= "900" - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e189341/qtads/xcode9.diff" - sha256 "2016fef6e867b7b8dfe1bd5db64d588161aad1357faa1962ee48edbe35042ddc" - end - end - end - - bottle do - cellar :any - sha256 "3158fb6eb3d97f548c908983348e221ee190835bda5ce70704747117ecf7611d" => :mojave - sha256 "ef218d294d01133003c6e52fc32f9482726d6f237b3b5b90add019960ffe9eb2" => :high_sierra - sha256 "51fff5c39b8c234bb72b9a3865f7a067fb2dab902316c7943261ba66ed98ab19" => :sierra - sha256 "fe8ab65019c324c13c9024291b3e6288aff3ec28049a0cf321da421b4c28f0f6" => :el_capitan - sha256 "e2383ed761b051e337ed2a4a4162655cb9eaa19ed8ab0666e8a7d1efa236b9b2" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "qt" - depends_on "sdl2" - depends_on "sdl2_mixer" - depends_on "sdl_sound" - - def install - sdl_sound_include = Formula["sdl_sound"].opt_include - inreplace "qtads.pro", - "INCLUDEPATH += src $$T2DIR $$T3DIR $$HTDIR", - "INCLUDEPATH += src $$T2DIR $$T3DIR $$HTDIR #{sdl_sound_include}/SDL" - - system "qmake", "DEFINES+=NO_STATIC_TEXTCODEC_PLUGINS" - system "make" - prefix.install "QTads.app" - bin.write_exec_script "#{prefix}/QTads.app/Contents/MacOS/QTads" - man6.install "share/man/man6/qtads.6" - end - - test do - assert_predicate testpath/"#{bin}/QTads", :exist?, "I'm an untestable GUI app." - end -end diff --git a/Formula/qtfaststart.rb b/Formula/qtfaststart.rb deleted file mode 100644 index 6d8c6649683db..0000000000000 --- a/Formula/qtfaststart.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Qtfaststart < Formula - desc "Utility for Quicktime files" - homepage "https://libav.org/" - url "https://libav.org/releases/libav-12.3.tar.gz" - sha256 "115b659022dd387f662e26fbc5bc0cc14ec18daa100003ffd34f4da0479b272e" - - bottle do - cellar :any_skip_relocation - sha256 "72a7b46a652dc99b3c24df9a868008927e795f438ef2e68fb3d7456abbc3724a" => :mojave - sha256 "4534f204dcc950ad18c3a141119fcd8d9a9623645092ae3f003b08dd94851dcf" => :high_sierra - sha256 "a11b3b623a2682567830cb05810ed4445037f5b43a52f2378a10291aad70a2c6" => :sierra - sha256 "00ed1702b08f3fe7d0660aab963f15baab6a5bac8db02048fe5d0b4d80b4abe0" => :el_capitan - end - - resource "mov" do - url "https://github.com/van7hu/fanca/raw/master/examples/kmplayer/samples/H264_test4_Talkingheadclipped_mov_480x320.mov" - sha256 "5af004e182ac7214dadf34816086d0a25c7a6cac568ae3741fca527cbbd242fc" - end - - def install - system ENV.cc, "-o", "tools/qt-faststart", "tools/qt-faststart.c" - bin.install "tools/qt-faststart" - end - - test do - input = "H264_test4_Talkingheadclipped_mov_480x320.mov" - output = "out.mov" - resource("mov").stage testpath - system "#{bin}/qt-faststart", input, output - - assert_predicate testpath/output, :exist? - end -end diff --git a/Formula/qtkeychain.rb b/Formula/qtkeychain.rb deleted file mode 100644 index e3a13ffae6268..0000000000000 --- a/Formula/qtkeychain.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Qtkeychain < Formula - desc "Platform-independent Qt API for storing passwords securely" - homepage "https://github.com/frankosterfeld/qtkeychain" - url "https://github.com/frankosterfeld/qtkeychain/archive/v0.9.1.tar.gz" - sha256 "9c2762d9d0759a65cdb80106d547db83c6e9fdea66f1973c6e9014f867c6f28e" - - bottle do - cellar :any - sha256 "f9b7e82c191c67ab37a8307632254ef8c737c814472f64ee673148d5e2437397" => :mojave - sha256 "762e3117de29b6935378bf54cfc0fd9a3d49ef35469a8621333bfb88d22c77a8" => :high_sierra - sha256 "fd43ab15dd3da11cc4a7a5c068067af8a66e957317af8848892368e450ed6c17" => :sierra - sha256 "2547d3aa216eeb767df920a63ed33f6a06ce355a59e0d3d70c2ce73a225af91f" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "qt" - - def install - system "cmake", ".", "-DBUILD_TRANSLATIONS=OFF", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - QKeychain::ReadPasswordJob job(QLatin1String("")); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", "-I#{include}", - "-L#{lib}", "-lqt5keychain", - "-I#{Formula["qt"].opt_include}", - "-F#{Formula["qt"].opt_lib}", "-framework", "QtCore" - system "./test" - end -end diff --git a/Formula/quantlib.rb b/Formula/quantlib.rb deleted file mode 100644 index 968dfd919274a..0000000000000 --- a/Formula/quantlib.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Quantlib < Formula - desc "Library for quantitative finance" - homepage "https://www.quantlib.org/" - url "https://dl.bintray.com/quantlib/releases/QuantLib-1.13.tar.gz" - sha256 "bb52df179781f9c19ef8e976780c4798b0cdc4d21fa72a7a386016e24d1a86e6" - - bottle do - cellar :any - rebuild 1 - sha256 "989470332d705fa1a29be14b9e5ffea1eec2d6a1e214579fcd78918002dbc088" => :mojave - sha256 "9b53ed5ffa25b50b9cafd16d06685982d5ff94bb804c685dcead4bee1826bfa5" => :high_sierra - sha256 "79b525bb08faf52e69ec487047cdfa2492d015d78a64f241faf82a7f30afa0a5" => :sierra - end - - head do - url "https://github.com/lballabio/quantlib.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "boost" - - def install - (buildpath/"QuantLib").install buildpath.children if build.stable? - cd "QuantLib" do - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-lispdir=#{elisp}", - "--enable-intraday" - - system "make", "install" - prefix.install_metafiles - end - end - - test do - system bin/"quantlib-config", "--prefix=#{prefix}", "--libs", "--cflags" - end -end diff --git a/Formula/quasi88.rb b/Formula/quasi88.rb deleted file mode 100644 index 85fc56ca6b457..0000000000000 --- a/Formula/quasi88.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Quasi88 < Formula - desc "PC-8801 emulator" - homepage "https://www.eonet.ne.jp/~showtime/quasi88/" - url "https://www.eonet.ne.jp/~showtime/quasi88/release/quasi88-0.6.4.tgz" - sha256 "2c4329f9f77e02a1e1f23c941be07fbe6e4a32353b5d012531f53b06996881ff" - - bottle do - cellar :any - sha256 "8b16ac77e4b8c6481fb7f518d5f7f446ff3b8b39465fa99d7bcbb8b28a3c745f" => :mojave - sha256 "8199a69a8ecad4247752091f3eeaf5181eaa1dd0e4b2670059e21df807c646c6" => :high_sierra - sha256 "d9ff4c5657c4179371d60317e0455cbadd59d45d81d0cc71d62d14d681619e95" => :sierra - sha256 "4bef6f92d4fcdf3547e0e7b9d699f392de0ff4764bbed0d8b23ea37e22e33f78" => :el_capitan - sha256 "f9b4ef36396de67507df8148ad22ecca3940505c40468656df03ac685930b2d9" => :yosemite - end - - depends_on "sdl" - - def install - args = %W[ - X11_VERSION= - SDL_VERSION=1 - ARCH=macosx - SOUND_SDL=1 - LD=#{ENV.cxx} - CXX=#{ENV.cxx} - CXXLIBS= - ] - system "make", *args - bin.install "quasi88.sdl" => "quasi88" - end - - def caveats; <<~EOS - You will need to place ROM and disk files. - Default arguments for the directories are: - -romdir ~/quasi88/rom/ - -diskdir ~/quasi88/disk/ - -tapedir ~/quasi88/tape/ - EOS - end - - test do - system "#{bin}/quasi88", "-help" - end -end diff --git a/Formula/quazip.rb b/Formula/quazip.rb deleted file mode 100644 index 1d16416c72445..0000000000000 --- a/Formula/quazip.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Quazip < Formula - desc "C++ wrapper over Gilles Vollant's ZIP/UNZIP package" - homepage "https://quazip.sourceforge.io/" - url "https://downloads.sourceforge.net/project/quazip/quazip/0.7.3/quazip-0.7.3.tar.gz" - sha256 "2ad4f354746e8260d46036cde1496c223ec79765041ea28eb920ced015e269b5" - revision 1 - - bottle do - cellar :any - sha256 "b13bd6ecd6f2a2272146f0116db139338e734d094df442e695b9e4520a3d1ac4" => :mojave - sha256 "907e72c7b9ee1af624c684c960925b3227409d3c95324bfc00aef2ad6384d22c" => :high_sierra - sha256 "9ec688664e0354803611744d1aaeec073cf0912762652be352404ac1c1fadfb4" => :sierra - sha256 "ce3454f5f7c5c8083df617ec63ccaf7291091da544287719573fc2c3dbb744c6" => :el_capitan - sha256 "dc296670c3c7bd52c825bb545132df0731c274af47f44d8ecefc53eda3c2065c" => :yosemite - end - - depends_on "qt" - - def install - system "qmake", "quazip.pro", "-config", "release", - "PREFIX=#{prefix}", "LIBS+=-lz" - system "make", "install" - end - - test do - (testpath/"test.pro").write <<~EOS - TEMPLATE = app - CONFIG += console - CONFIG -= app_bundle - TARGET = test - SOURCES += test.cpp - INCLUDEPATH += #{include} - LIBPATH += #{lib} - LIBS += -lquazip - EOS - - (testpath/"test.cpp").write <<~EOS - #include - int main() { - QuaZip zip; - return 0; - } - EOS - - system "#{Formula["qt"].bin}/qmake", "test.pro" - system "make" - assert_predicate testpath/"test", :exist?, "test output file does not exist!" - system "./test" - end -end diff --git a/Formula/questdb.rb b/Formula/questdb.rb deleted file mode 100644 index f0d591c91c522..0000000000000 --- a/Formula/questdb.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Questdb < Formula - desc "Time Series Database" - homepage "https://www.questdb.org" - url "https://www.questdb.org/download/questdb-1.0.4-bin.tar.gz" - sha256 "a8d907d88c5bf67aeb465540c7e16ad45eccd13d152b34cdcf4e5056ad908739" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8" - - def install - inreplace "questdb.sh", "1.7+", "1.8" - rm_rf "questdb.exe" - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/questdb.sh" => "questdb" - end - - plist_options :manual => "questdb start" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/questdb - start - -d - var/"questdb" - -n - - RunAtLoad - - WorkingDirectory - #{var}/questdb - StandardErrorPath - #{var}/log/questdb.log - StandardOutPath - #{var}/log/questdb.log - SoftResourceLimits - - NumberOfFiles - 1024 - - - - EOS - end - - test do - mkdir_p testpath/"data" - begin - fork do - exec "#{bin}/questdb start -d #{testpath}/data" - end - sleep 2 - output = shell_output("curl -Is localhost:9000/js?q=x") - sleep 1 - assert_match /questDB/, output - ensure - system "#{bin}/questdb", "stop" - end - end -end diff --git a/Formula/quex.rb b/Formula/quex.rb deleted file mode 100644 index 4ee980f963e3e..0000000000000 --- a/Formula/quex.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Quex < Formula - desc "Generate lexical analyzers" - homepage "https://quex.sourceforge.io/" - url "https://downloads.sourceforge.net/project/quex/DOWNLOAD/quex-0.68.2.tar.gz" - sha256 "b6a9325f92110c52126fec18432d0d6c9bd8a7593bde950db303881aac16a506" - head "http://svn.code.sf.net/p/quex/code/trunk" - - bottle do - cellar :any_skip_relocation - sha256 "d3dc54f074080d5853374c14ffc866417f4effbe6c547d316f147523ca02c9e9" => :mojave - sha256 "e5d0e22c8d988408e52ddabcd0b1ddd7e858c6256b1449b919a83f8da5934354" => :high_sierra - sha256 "e5d0e22c8d988408e52ddabcd0b1ddd7e858c6256b1449b919a83f8da5934354" => :sierra - sha256 "e5d0e22c8d988408e52ddabcd0b1ddd7e858c6256b1449b919a83f8da5934354" => :el_capitan - end - - def install - libexec.install "quex", "quex-exe.py" - doc.install "README", "demo" - - # Use a shim script to set QUEX_PATH on the user's behalf - (bin/"quex").write <<~EOS - #!/bin/bash - QUEX_PATH="#{libexec}" "#{libexec}/quex-exe.py" "$@" - EOS - - if build.head? - man1.install "doc/manpage/quex.1" - else - man1.install "manpage/quex.1" - end - end - - test do - system bin/"quex", "-i", doc/"demo/C/01-Trivial/simple.qx", "-o", "tiny_lexer" - assert_predicate testpath/"tiny_lexer", :exist? - end -end diff --git a/Formula/quicktype.rb b/Formula/quicktype.rb deleted file mode 100644 index 49d3935e38f2b..0000000000000 --- a/Formula/quicktype.rb +++ /dev/null @@ -1,35 +0,0 @@ -require "language/node" - -class Quicktype < Formula - desc "Generate types and converters from JSON, Schema, and GraphQL" - homepage "https://github.com/quicktype/quicktype" - # quicktype should only be updated every 10 releases on multiples of 10 - url "https://registry.npmjs.org/quicktype/-/quicktype-15.0.160.tgz" - sha256 "78f8710596ce755853401c9c2e8b7919e8b157c4406fed6737b14427d3f8b1c7" - - bottle do - cellar :any_skip_relocation - sha256 "dd5ff21d05787bbc4f00136fbbb763e76ec909fbbbe559d7e031a7a4e031c353" => :mojave - sha256 "113a536930c4c950122ed00e55d30f7999da8b19c5cc33c83a66a8a3f49bedce" => :high_sierra - sha256 "13761db950b5fb839570fb1ecb57b6b4802b0c1d9a891b5d439af9843cafb796" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"sample.json").write <<~EOS - { - "i": [0, 1], - "s": "quicktype" - } - EOS - output = shell_output("#{bin}/quicktype --lang typescript --src sample.json") - assert_match "i: number[];", output - assert_match "s: string;", output - end -end diff --git a/Formula/quilt.rb b/Formula/quilt.rb deleted file mode 100644 index 29d7c9b9541e9..0000000000000 --- a/Formula/quilt.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Quilt < Formula - desc "Work with series of patches" - homepage "https://savannah.nongnu.org/projects/quilt" - url "https://download.savannah.gnu.org/releases/quilt/quilt-0.65.tar.gz" - sha256 "f6cbc788e5cbbb381a3c6eab5b9efce67c776a8662a7795c7432fd27aa096819" - head "https://git.savannah.gnu.org/git/quilt.git" - - bottle do - cellar :any_skip_relocation - sha256 "924f0efd884663cc2ad2b991f51b450518e74f6071a0a722bf2e23b84c4bb108" => :mojave - sha256 "6905212919229016ef984a2aca56b424da0057ad3404a9cab0290997838bb785" => :high_sierra - sha256 "8ea83c73d0043e442c32351e84c591a39305abd13745a5968993c43f750c046a" => :sierra - sha256 "8ea83c73d0043e442c32351e84c591a39305abd13745a5968993c43f750c046a" => :el_capitan - sha256 "8ea83c73d0043e442c32351e84c591a39305abd13745a5968993c43f750c046a" => :yosemite - end - - depends_on "coreutils" - depends_on "gnu-sed" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-sed=#{HOMEBREW_PREFIX}/bin/gsed", - "--without-getopt" - system "make" - system "make", "install", "emacsdir=#{elisp}" - end - - test do - (testpath/"patches").mkpath - (testpath/"test.txt").write "Hello, World!" - system bin/"quilt", "new", "test.patch" - system bin/"quilt", "add", "test.txt" - rm "test.txt" - (testpath/"test.txt").write "Hi!" - system bin/"quilt", "refresh" - assert_match(/-Hello, World!/, File.read("patches/test.patch")) - assert_match(/\+Hi!/, File.read("patches/test.patch")) - end -end diff --git a/Formula/quotatool.rb b/Formula/quotatool.rb deleted file mode 100644 index 88ab47dda50d5..0000000000000 --- a/Formula/quotatool.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Quotatool < Formula - desc "Edit disk quotas from the command-line" - homepage "https://quotatool.ekenberg.se/" - url "https://quotatool.ekenberg.se/quotatool-1.6.2.tar.gz" - sha256 "e53adc480d54ae873d160dc0e88d78095f95d9131e528749fd982245513ea090" - - bottle do - cellar :any_skip_relocation - sha256 "2d2b6f53466ec7b211f44b0319966b7120e3bbf0e1d57c1f0ae3d272bc8f4ce4" => :mojave - sha256 "bbf7543458972806f3c15b25bf7cd71276159b54ae1ada3beb12e6d29328ec0e" => :high_sierra - sha256 "4d04c382c8cf8b0376b34ce12813be06e879fdf6b60711cf90643d08887304fb" => :sierra - sha256 "da5c90f85204fa90a38da073765ec5c0f0a20333bcdcd131d79b682afa74233f" => :el_capitan - sha256 "8af3549d42247f0b79458c96978f8f5e5fbe04cc1c0dd86f84accdf03e8e510f" => :yosemite - sha256 "724a3fc561188de5e0e050f7459480cc8c613d399faee5290ec7a68b9715960d" => :mavericks - sha256 "29271c3bc97b9623264fe2f67e821f1810442f11b15ad1b7f231472905d078e4" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - sbin.mkpath - man8.mkpath - system "make", "install" - end - - test do - system "#{sbin}/quotatool", "-V" - end -end diff --git a/Formula/quvi.rb b/Formula/quvi.rb deleted file mode 100644 index 2fa35677d03a6..0000000000000 --- a/Formula/quvi.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Quvi < Formula - desc "Parse video download URLs" - homepage "https://quvi.sourceforge.io/" - url "https://downloads.sourceforge.net/project/quvi/0.4/quvi/quvi-0.4.2.tar.bz2" - sha256 "1f4e40c14373cb3d358ae1b14a427625774fd09a366b6da0c97d94cb1ff733c3" - - bottle do - cellar :any - sha256 "403d1157a64341c76067353225c6acbe1c0f3e9c0b69634ed80f0bb6400c4c7c" => :mojave - sha256 "10fe26a54bcdf8e33e9798b399a3a72e8b571c9668e4398a3f8d1a7952f9c652" => :high_sierra - sha256 "9e3b86dff84297edec9c63ff1593136c2ce62e8a9f8d523e9d9137943da939bb" => :sierra - sha256 "c5a8c9b53432e15b4ec31a9c1374bde130d56f73f8ee43e392917a52f34ab945" => :el_capitan - sha256 "944922426376a9962bb90f032e02ef2404d3155ed3bba81a0b4d349ba1f1aec8" => :yosemite - sha256 "631889c5bfbfa3741a33efb350b020abaffd163016d375bfa41aedf5cf93262e" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libquvi" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/quvi", "--version" - end -end diff --git a/Formula/qwt.rb b/Formula/qwt.rb deleted file mode 100644 index 6bf61c6c8595d..0000000000000 --- a/Formula/qwt.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Qwt < Formula - desc "Qt Widgets for Technical Applications" - homepage "https://qwt.sourceforge.io/" - url "https://downloads.sourceforge.net/project/qwt/qwt/6.1.3/qwt-6.1.3.tar.bz2" - sha256 "f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733" - revision 4 - - bottle do - rebuild 1 - sha256 "a0440f8bbfaa4a88a44ad02aac93cd1d96a45b59f0b4e3c6133c150dd877e100" => :mojave - sha256 "fefafb68b60362fb7c2f268171cf111a7676044d2586698d786bc448263cd315" => :high_sierra - sha256 "b333be61fb0188cdf98510566dd28ac51c677eba50c7257d7b5145d7619d7a44" => :sierra - end - - depends_on "qt" - - # Update designer plugin linking back to qwt framework/lib after install - # See: https://sourceforge.net/p/qwt/patches/45/ - patch :DATA - - def install - inreplace "qwtconfig.pri" do |s| - s.gsub! /^\s*QWT_INSTALL_PREFIX\s*=(.*)$/, "QWT_INSTALL_PREFIX=#{prefix}" - - # Install Qt plugin in `lib/qt/plugins/designer`, not `plugins/designer`. - s.sub! %r{(= \$\$\{QWT_INSTALL_PREFIX\})/(plugins/designer)$}, - "\\1/lib/qt/\\2" - end - - args = ["-config", "release", "-spec"] - # On Mavericks we want to target libc++, this requires a unsupported/macx-clang-libc++ flag - if ENV.compiler == :clang && MacOS.version >= :mavericks - args << "macx-clang" - else - args << "macx-g++" - end - - system "qmake", *args - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1"); - return (curve1 == NULL); - } - EOS - system ENV.cxx, "test.cpp", "-o", "out", - "-std=c++11", - "-framework", "qwt", "-framework", "QtCore", - "-F#{lib}", "-F#{Formula["qt"].opt_lib}", - "-I#{lib}/qwt.framework/Headers", - "-I#{Formula["qt"].opt_lib}/QtCore.framework/Versions/5/Headers", - "-I#{Formula["qt"].opt_lib}/QtGui.framework/Versions/5/Headers" - system "./out" - end -end - -__END__ -diff --git a/designer/designer.pro b/designer/designer.pro -index c269e9d..c2e07ae 100644 ---- a/designer/designer.pro -+++ b/designer/designer.pro -@@ -126,6 +126,16 @@ contains(QWT_CONFIG, QwtDesigner) { - - target.path = $${QWT_INSTALL_PLUGINS} - INSTALLS += target -+ -+ macx { -+ contains(QWT_CONFIG, QwtFramework) { -+ QWT_LIB = qwt.framework/Versions/$${QWT_VER_MAJ}/qwt -+ } -+ else { -+ QWT_LIB = libqwt.$${QWT_VER_MAJ}.dylib -+ } -+ QMAKE_POST_LINK = install_name_tool -change $${QWT_LIB} $${QWT_INSTALL_LIBS}/$${QWT_LIB} $(DESTDIR)$(TARGET) -+ } - } - else { - TEMPLATE = subdirs # do nothing diff --git a/Formula/qwtpolar.rb b/Formula/qwtpolar.rb deleted file mode 100644 index 9c4abcfcf504f..0000000000000 --- a/Formula/qwtpolar.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Qwtpolar < Formula - desc "Library for displaying values on a polar coordinate system" - homepage "https://qwtpolar.sourceforge.io/" - url "https://downloads.sourceforge.net/project/qwtpolar/qwtpolar/1.1.1/qwtpolar-1.1.1.tar.bz2" - sha256 "6168baa9dbc8d527ae1ebf2631313291a1d545da268a05f4caa52ceadbe8b295" - revision 3 - - bottle do - sha256 "7526c2528d7bc15e6624d472f4738ad9bf06026ec7708d6e5cd5a167949d1b99" => :mojave - sha256 "41e46c5c73df6518ec55cd0c7fba26d98f6b9bce72da7e40a1dba12e6e3f88a5" => :high_sierra - sha256 "b558ba6e4b4b269cd8ff207eccf1882073103aa702e2848a7a0f0cce711aff73" => :sierra - sha256 "8d9e370d42d980081cf7626fc9a0ff7315e05fe1c41dc48c9de21edf353aab5d" => :el_capitan - sha256 "e9ac24fce3339281d5b17f38a6c0fc1ff11b2d1afa3f7f727b620992348bf4c4" => :yosemite - end - - depends_on "qt" - depends_on "qwt" - - # Update designer plugin linking back to qwtpolar framework/lib after install - # See: https://sourceforge.net/p/qwtpolar/patches/2/ - patch :DATA - - def install - cd "doc" do - doc.install "html" - man3.install Dir["man/man3/{q,Q}wt*"] - end - # Remove leftover doxygen files, so they don't get installed - rm_r "doc" - - inreplace "qwtpolarconfig.pri" do |s| - s.gsub!(/^(\s*)QWT_POLAR_INSTALL_PREFIX\s*=\s*(.*)$/, - "\\1QWT_POLAR_INSTALL_PREFIX=#{prefix}") - # Don't build examples now, since linking flawed until qwtpolar installed - s.sub!(/\+(=\s*QwtPolarExamples)/, "-\\1") - - # Install Qt plugin in `lib/qt/plugins/designer`, not `plugins/designer`. - s.sub! %r{(= \$\$\{QWT_POLAR_INSTALL_PREFIX\})/(plugins/designer)$}, - "\\1/lib/qt/\\2" - end - - ENV["QMAKEFEATURES"] = "#{Formula["qwt"].opt_prefix}/features" - system "qmake", "-config", "release" - system "make" - system "make", "install" - pkgshare.install "examples" - pkgshare.install Dir["*.p*"] - end - - test do - cp_r pkgshare.children, testpath - qwtpolar_framework = lib/"qwtpolar.framework" - qwt_framework = Formula["qwt"].opt_lib/"qwt.framework" - (testpath/"lib").mkpath - ln_s qwtpolar_framework, "lib" - ln_s qwt_framework, "lib" - inreplace "examples/examples.pri" do |s| - s.gsub! "INCLUDEPATH += $${QWT_POLAR_ROOT}/src", - "INCLUDEPATH += #{qwtpolar_framework}/Headers\nINCLUDEPATH += #{qwt_framework}/Headers" - s.gsub! "qwtPolarAddLibrary(qwtpolar)", "qwtPolarAddLibrary(qwtpolar)\nqwtPolarAddLibrary(qwt)" - end - cd "examples" do - system Formula["qt"].opt_bin/"qmake" - rm_rf "bin" # just in case - system "make" - assert_predicate Pathname.pwd/"bin/polardemo.app/Contents/MacOS/polardemo", - :exist?, - "Failed to build polardemo" - assert_predicate Pathname.pwd/"bin/spectrogram.app/Contents/MacOS/spectrogram", - :exist?, - "Failed to build spectrogram" - end - end -end - -__END__ -diff --git a/designer/designer.pro b/designer/designer.pro -index 24770fd..3ff0761 100644 ---- a/designer/designer.pro -+++ b/designer/designer.pro -@@ -75,6 +75,16 @@ contains(QWT_POLAR_CONFIG, QwtPolarDesigner) { - - target.path = $${QWT_POLAR_INSTALL_PLUGINS} - INSTALLS += target -+ -+ macx { -+ contains(QWT_POLAR_CONFIG, QwtPolarFramework) { -+ QWTP_LIB = qwtpolar.framework/Versions/$${QWT_POLAR_VER_MAJ}/qwtpolar -+ } -+ else { -+ QWTP_LIB = libqwtpolar.$${QWT_POLAR_VER_MAJ}.dylib -+ } -+ QMAKE_POST_LINK = install_name_tool -change $${QWTP_LIB} $${QWT_POLAR_INSTALL_LIBS}/$${QWTP_LIB} $(DESTDIR)$(TARGET) -+ } - } - else { - TEMPLATE = subdirs # do nothing diff --git a/Formula/qxmpp.rb b/Formula/qxmpp.rb deleted file mode 100644 index 2a6ce6af118e3..0000000000000 --- a/Formula/qxmpp.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Qxmpp < Formula - desc "Cross-platform C++ XMPP client and server library" - homepage "https://github.com/qxmpp-project/qxmpp/" - url "https://github.com/qxmpp-project/qxmpp/archive/v0.9.3.tar.gz" - sha256 "13f5162a1df720702c6ae15a476a4cb8ea3e57d861a992c4de9147909765e6de" - revision 2 - - bottle do - cellar :any - sha256 "0c733b26e6753a206dd7bc4340977c7392e0e86042aab643656b6a730b142a03" => :mojave - sha256 "4a810995bced82af3afb6c9c56dd6d0ddaa8b89c191dc506433d31ffc7df2d19" => :high_sierra - sha256 "2aae5596c491b1904299d29e8c309cf68debee312a1c613cc5b9dab3b8271777" => :sierra - sha256 "f783c251ee39546cd4cbc893565f5174a4510d41ac4861932c53f02b3f621d96" => :el_capitan - sha256 "6205c7bb9b62fbf5bcbce366e77c2a77992a3bcd88d5666e751a7dfee9202936" => :yosemite - end - - depends_on "qt" - - def install - system "qmake", "-config", "release", "PREFIX=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.pro").write <<~EOS - TEMPLATE = app - CONFIG += console - CONFIG -= app_bundle - TARGET = test - QT += network - SOURCES += test.cpp - INCLUDEPATH += #{include} - LIBPATH += #{lib} - LIBS += -lqxmpp - EOS - - (testpath/"test.cpp").write <<~EOS - #include - int main() { - QXmppClient client; - return 0; - } - EOS - - system "#{Formula["qt"].bin}/qmake", "test.pro" - system "make" - assert_predicate testpath/"test", :exist?, "test output file does not exist!" - system "./test" - end -end diff --git a/Formula/r.rb b/Formula/r.rb deleted file mode 100644 index aa07e1dca72e1..0000000000000 --- a/Formula/r.rb +++ /dev/null @@ -1,106 +0,0 @@ -class R < Formula - desc "Software environment for statistical computing" - homepage "https://www.r-project.org/" - url "https://cran.r-project.org/src/base/R-3/R-3.5.2.tar.gz" - sha256 "e53d8c3cf20f2b8d7a9c1631b6f6a22874506fb392034758b3bb341c586c5b62" - revision 1 - - bottle do - sha256 "fdb0d7c09fe57f64360fa1cfc00efeb1d744db92cf7f210cbd8087df9ae7d563" => :mojave - sha256 "2d197e3ad00b72a63d254ed43d98602cff6501142a42759097c2527964a8cc91" => :high_sierra - sha256 "9af374ab39270621340a45e5b35a201931780cbdb2b67d865320ed84f6a4d4e1" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gcc" # for gfortran - depends_on "gettext" - depends_on "jpeg" - depends_on "libpng" - depends_on "openblas" - depends_on "pcre" - depends_on "readline" - depends_on "xz" - - # needed to preserve executable permissions on files without shebangs - skip_clean "lib/R/bin" - - resource "gss" do - url "https://cloud.r-project.org/src/contrib/gss_2.1-9.tar.gz", :using => :nounzip - mirror "https://mirror.las.iastate.edu/CRAN/src/contrib/gss_2.1-9.tar.gz" - sha256 "2961fe61c1d3bb3fe7b8e1070d6fb1dfc5d71e0c6e8a6b7c46ff6b42867c4cf3" - end - - def install - # Fix dyld: lazy symbol binding failed: Symbol not found: _clock_gettime - if MacOS.version == "10.11" && MacOS::Xcode.installed? && - MacOS::Xcode.version >= "8.0" - ENV["ac_cv_have_decl_clock_gettime"] = "no" - end - - args = [ - "--prefix=#{prefix}", - "--enable-memory-profiling", - "--without-cairo", - "--without-x", - "--with-aqua", - "--with-lapack", - "--enable-R-shlib", - "SED=/usr/bin/sed", # don't remember Homebrew's sed shim - "--disable-java", - "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas", - ] - - # Help CRAN packages find gettext and readline - ["gettext", "readline"].each do |f| - ENV.append "CPPFLAGS", "-I#{Formula[f].opt_include}" - ENV.append "LDFLAGS", "-L#{Formula[f].opt_lib}" - end - - system "./configure", *args - system "make" - ENV.deparallelize do - system "make", "install" - end - - cd "src/nmath/standalone" do - system "make" - ENV.deparallelize do - system "make", "install" - end - end - - r_home = lib/"R" - - # make Homebrew packages discoverable for R CMD INSTALL - inreplace r_home/"etc/Makeconf" do |s| - s.gsub!(/^CPPFLAGS =.*/, "\\0 -I#{HOMEBREW_PREFIX}/include") - s.gsub!(/^LDFLAGS =.*/, "\\0 -L#{HOMEBREW_PREFIX}/lib") - s.gsub!(/.LDFLAGS =.*/, "\\0 $(LDFLAGS)") - end - - include.install_symlink Dir[r_home/"include/*"] - lib.install_symlink Dir[r_home/"lib/*"] - - # avoid triggering mandatory rebuilds of r when gcc is upgraded - inreplace lib/"R/etc/Makeconf", Formula["gcc"].prefix.realpath, - Formula["gcc"].opt_prefix - end - - def post_install - short_version = - `#{bin}/Rscript -e 'cat(as.character(getRversion()[1,1:2]))'`.strip - site_library = HOMEBREW_PREFIX/"lib/R/#{short_version}/site-library" - site_library.mkpath - ln_s site_library, lib/"R/site-library" - end - - test do - assert_equal "[1] 2", shell_output("#{bin}/Rscript -e 'print(1+1)'").chomp - assert_equal ".dylib", shell_output("#{bin}/R CMD config DYLIB_EXT").chomp - - testpath.install resource("gss") - system bin/"R", "CMD", "INSTALL", "--library=.", Dir["gss*"].first - assert_predicate testpath/"gss/libs/gss.so", :exist?, - "Failed to install gss package" - end -end diff --git a/Formula/r/r.rb b/Formula/r/r.rb new file mode 100644 index 0000000000000..a18695a48b4ec --- /dev/null +++ b/Formula/r/r.rb @@ -0,0 +1,166 @@ +class R < Formula + desc "Software environment for statistical computing" + homepage "https://www.r-project.org/" + url "https://cran.r-project.org/src/base/R-4/R-4.5.2.tar.gz" + sha256 "87a41ce9b50e096dd2c4282f48efea30c9916fcb7b167fa2bc988c9cf3cb6642" + license "GPL-2.0-or-later" + + livecheck do + url "https://cran.rstudio.com/banner.shtml" + regex(%r{href=(?:["']?|.*?/)R[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "dc6c4526de74dbf10e392e6d0e1cbc5feefe6002fbc64fd9adbc7d9dbecfb58d" + sha256 arm64_sequoia: "b4a6f0f7c84bfe12d1f56009ee3b1a8fe81246b4f79896eef75ef53d2174a211" + sha256 arm64_sonoma: "153e31877f32adcebdc0e153861e348a6d8dd1850dab71a36584bf62ffb5ac67" + sha256 sonoma: "c040bfb623e70a79e1959f704c5d28bf6f2575aed946839f475ac9a568a81f26" + sha256 arm64_linux: "2fe007ad9b4f55656b202ca038d3aae9ff1bbae5c2127312e3cd3ef56c28d9bf" + sha256 x86_64_linux: "f5ea87311b3af27ff30b0179cb5f5d066433a95fe8e6e13f04ea0ce94c3edbc0" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "gcc" # for gfortran + depends_on "gettext" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libxext" + depends_on "openblas" + depends_on "pcre2" + depends_on "readline" + depends_on "tcl-tk" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "libffi" + uses_from_macos "zlib" + + on_macos do + depends_on "fontconfig" + depends_on "freetype" + depends_on "libx11" + depends_on "libxau" + depends_on "libxcb" + depends_on "libxdmcp" + depends_on "libxrender" + depends_on "pixman" + end + + on_linux do + depends_on "glib" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "libice" + depends_on "libsm" + depends_on "libtirpc" + depends_on "libx11" + depends_on "libxt" + depends_on "pango" + end + + # needed to preserve executable permissions on files without shebangs + skip_clean "lib/R/bin", "lib/R/doc" + + def install + # `configure` doesn't like curl 8+, but convince it that everything is ok. + # TODO: report this upstream. + ENV["r_cv_have_curl728"] = "yes" + + args = [ + "--prefix=#{prefix}", + "--enable-memory-profiling", + "--with-tcl-config=#{Formula["tcl-tk"].opt_lib}/tclConfig.sh", + "--with-tk-config=#{Formula["tcl-tk"].opt_lib}/tkConfig.sh", + "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas", + "--enable-R-shlib", + "--disable-java", + "--with-cairo", + # This isn't necessary to build R, but it's saved in Makeconf + # and helps CRAN packages find gfortran when Homebrew may not be + # in PATH (e.g. under RStudio, launched from Finder) + "FC=#{Formula["gcc"].opt_bin}/gfortran", + ] + + if OS.mac? + args << "--without-x" + args << "--with-aqua" + else + args << "--libdir=#{lib}" # avoid using lib64 on CentOS + + # Avoid references to homebrew shims + args << "LD=ld" + + # If LDFLAGS contains any -L options, configure sets LD_LIBRARY_PATH to + # search those directories. Remove -LHOMEBREW_PREFIX/lib from LDFLAGS. + ENV.remove "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" + + ENV.append "CPPFLAGS", "-I#{Formula["libtirpc"].opt_include}/tirpc" + ENV.append "LDFLAGS", "-L#{Formula["libtirpc"].opt_lib}" + end + + # Help CRAN packages find gettext and readline + ["gettext", "readline", "xz"].each do |f| + ENV.append "CPPFLAGS", "-I#{Formula[f].opt_include}" + ENV.append "LDFLAGS", "-L#{Formula[f].opt_lib}" + end + + system "./configure", *args + system "make" + ENV.deparallelize do + system "make", "install" + end + + system "make", "-C", "src/nmath/standalone" + ENV.deparallelize do + system "make", "-C", "src/nmath/standalone", "install" + end + + r_home = lib/"R" + + # make Homebrew packages discoverable for R CMD INSTALL + inreplace r_home/"etc/Makeconf" do |s| + s.gsub!(/^CPPFLAGS =.*/, "\\0 -I#{HOMEBREW_PREFIX}/include") + s.gsub!(/^LDFLAGS =.*/, "\\0 -L#{HOMEBREW_PREFIX}/lib") + s.gsub!(/.LDFLAGS =.*/, "\\0 $(LDFLAGS)") + end + + include.install_symlink Dir[r_home/"include/*"] + lib.install_symlink Dir[r_home/"lib/*"] + + # avoid triggering mandatory rebuilds of r when gcc is upgraded + inreplace lib/"R/etc/Makeconf", Formula["gcc"].prefix.realpath, + Formula["gcc"].opt_prefix, + audit_result: OS.mac? + end + + def post_install + short_version = Utils.safe_popen_read(bin/"Rscript", "-e", "cat(as.character(getRversion()[1,1:2]))") + site_library = HOMEBREW_PREFIX/"lib/R"/short_version/"site-library" + site_library.mkpath + touch site_library/".keepme" + site_library_cellar = lib/"R/site-library" + site_library_cellar.unlink if site_library_cellar.exist? + site_library_cellar.parent.install_symlink site_library + end + + test do + assert_equal "[1] 2", shell_output("#{bin}/Rscript -e 'print(1+1)'").chomp + assert_equal shared_library(""), shell_output("#{bin}/R CMD config DYLIB_EXT").chomp + system bin/"Rscript", "-e", "if(!capabilities('cairo')) stop('cairo not available')" + + system bin/"Rscript", "-e", "install.packages('gss', '.', 'https://cloud.r-project.org')" + assert_path_exists testpath/"gss/libs/gss.so", "Failed to install gss package" + + winsys = "[1] \"aqua\"" + if OS.linux? + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + winsys = "[1] \"x11\"" + end + assert_equal winsys, + shell_output("#{bin}/Rscript -e 'library(tcltk)' -e 'tclvalue(.Tcl(\"tk windowingsystem\"))'").chomp + end +end diff --git a/Formula/r/r3.rb b/Formula/r/r3.rb new file mode 100644 index 0000000000000..229fa5100bdba --- /dev/null +++ b/Formula/r/r3.rb @@ -0,0 +1,60 @@ +class R3 < Formula + desc "High-performance URL router library" + homepage "https://github.com/c9s/r3" + url "https://github.com/c9s/r3/archive/refs/tags/1.3.4.tar.gz" + sha256 "db1fb91e51646e523e78b458643c0250231a2640488d5781109f95bd77c5eb82" + license "MIT" + head "https://github.com/c9s/r3.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b6f7a41b6a7f3197243733ce8a7bd9837f0d96b3b1d78046e8ed135db7a7109b" + sha256 cellar: :any, arm64_sequoia: "0e983875043e6a6111ce6f46615faf14adb57a8fa96c7a1cf5ae10d7d415a879" + sha256 cellar: :any, arm64_sonoma: "9648d6bd8f125398cc101581e8ee3b8b304fa6e8ab92f018dc538843c04fd920" + sha256 cellar: :any, arm64_ventura: "fa1e649709ce6c6d16c631a2192d2dd7fea34b7398e55eabe5f7bd51953745ab" + sha256 cellar: :any, arm64_monterey: "2f26748893003e7e0b99a574126c06c451222144979b0230babe37128328214f" + sha256 cellar: :any, arm64_big_sur: "be0883f3dfc67b2469eef537376a04bbae36ec3aab8ca58ffb66491a81e6db5d" + sha256 cellar: :any, sonoma: "bdf44bc7e03016c2b5c4b2f414d2c4560d6b6a502023f5225dfb98cbd615d9fb" + sha256 cellar: :any, ventura: "95f67c8b6bd1c106e6c61623df3ea82a5faf030928bb4a996fb1bea738f27679" + sha256 cellar: :any, monterey: "a33cc32d0cfb9190bb99931d5dc9dba21899df9103ef7d892b8b083672d78662" + sha256 cellar: :any, big_sur: "c9fa16048947ebd0c297b700ff7a528c7e45f46bd719cd196d4f7c74de7b491d" + sha256 cellar: :any, catalina: "96787f402bbc3a37207c3d5c3468d3b98028a12335a66d176d18d268e2406462" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d5a55e6af91f035641e99ced2f417050df5bb6d782922cb7270866659fe105d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36037bda00ae1253fb158f5cdf2619c2194a33a6ddb6598f9fb7901f37928348" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "jemalloc" + depends_on "pcre" + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--with-malloc=jemalloc", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "r3.h" + int main() { + node * n = r3_tree_create(1); + r3_tree_free(n); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-o", "test", + "-L#{lib}", "-lr3", "-I#{include}/r3" + system "./test" + end +end diff --git a/Formula/r/ra-multiplex.rb b/Formula/r/ra-multiplex.rb new file mode 100644 index 0000000000000..70e5c9b07eba2 --- /dev/null +++ b/Formula/r/ra-multiplex.rb @@ -0,0 +1,94 @@ +class RaMultiplex < Formula + desc "Share one rust-analyzer instance between multiple LSP clients to save resources" + homepage "https://github.com/pr2502/ra-multiplex" + url "https://github.com/pr2502/ra-multiplex/archive/refs/tags/v0.2.5.tar.gz" + sha256 "c24a7e277adce9bbfb86641905d75f166e46459cf4e5b5f3aaa7456b052392dc" + license "MIT" + head "https://github.com/pr2502/ra-multiplex.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "caef414f28ae5416c4527c7ae9b703370b0ba60fa57e7b2ca3e9f013b86ce987" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e50b9bbf819cb3d63e167b26f8eaf81b455383223a918c1de2d8f95847b34591" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3368801066ec9a6af29b02b91b4d94d5ab518bafef2e43b6b6bb124ddf0219be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4c694cbe6cbcd8eed58c68e0bacc0711b4ee407b9b27f188d555774997768b8" + sha256 cellar: :any_skip_relocation, sonoma: "1d1b275cbd97cb722b65047ac00e0ef68272e6334127b3e76e8239416dc0cb5d" + sha256 cellar: :any_skip_relocation, ventura: "6e7171999fb2b27b47ca7b1ff5672dc716f79b87a1d0e8c5fea79e627ffad620" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e4bb0024328d5472dd733aa22f06e37d583413e6a62f736160b002c06dc7443" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fa3b594fcdab0a99ba159c74def4f4a14d2e7f79f4909a0e9c4f907da45d198" + end + + depends_on "rust" => :build + depends_on "rust-analyzer" + + def install + system "cargo", "install", *std_cargo_args + end + + service do + run [opt_bin/"ra-multiplex", "server"] + keep_alive true + error_log_path var/"log/ra-multiplex.log" + log_path var/"log/ra-multiplex.log" + + # Need cargo and rust-analyzer in PATH + environment_variables PATH: std_service_path_env + end + + def rpc(json) + "Content-Length: #{json.size}\r\n" \ + "\r\n" \ + "#{json}" + end + + test do + input = rpc <<~JSON + { + "jsonrpc":"2.0", + "id":1, + "method":"initialize", + "params": { + "rootUri": null, + "initializationOptions": {}, + "capabilities": {} + } + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "method":"initialized", + "params": {} + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "id": 2, + "method":"shutdown", + "params": null + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "method":"exit", + "params": {} + } + JSON + + output = /Content-Length: \d+\r\n\r\n/ + + begin + pid = spawn bin/"ra-multiplex", "server" + assert_match output, pipe_output(bin/"ra-multiplex", input, 0) + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/r/rabbitmq-c.rb b/Formula/r/rabbitmq-c.rb new file mode 100644 index 0000000000000..c89d7bd89cc3f --- /dev/null +++ b/Formula/r/rabbitmq-c.rb @@ -0,0 +1,43 @@ +class RabbitmqC < Formula + desc "C AMQP client library for RabbitMQ" + homepage "https://github.com/alanxz/rabbitmq-c" + url "https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v0.15.0.tar.gz" + sha256 "7b652df52c0de4d19ca36c798ed81378cba7a03a0f0c5d498881ae2d79b241c2" + license "MIT" + head "https://github.com/alanxz/rabbitmq-c.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ed808af191d028a6eff168ded49fb10a38aacfc2f8d92147e78f06b0b7f7742a" + sha256 cellar: :any, arm64_sequoia: "e101c4dc4a3661e074f43e351d755b4bf004bf0dc0c3cb89779b071a97be3324" + sha256 cellar: :any, arm64_sonoma: "2a87e5561540b3c5b5e29907aabc4bb87b003ab1aa2359cf803ef43182b61730" + sha256 cellar: :any, arm64_ventura: "08984332c63cb740fab4eaf803679260938a20cd0d0c8a0e68f94abef6f89927" + sha256 cellar: :any, sonoma: "3fb725256372918473d3bcfbdbab2f86f90a218f4f67e491f49fa27fe870b209" + sha256 cellar: :any, ventura: "77ca0d167a6af5b3f22e8557336dba784305505edbae2c469b5e0d468a5bd621" + sha256 cellar: :any_skip_relocation, arm64_linux: "02df84684b63e2ea8013274c96df59017f26c5ea45787eae6a7503962e5c5555" + sha256 cellar: :any_skip_relocation, x86_64_linux: "835505a60c65b2630a70ded7eedd09fa35a48102e5b65509a0af22a26d204a2a" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + depends_on "openssl@3" + depends_on "popt" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_API_DOCS=OFF", + "-DBUILD_EXAMPLES=OFF", + "-DBUILD_TESTS=OFF", + "-DBUILD_TOOLS=ON", + "-DBUILD_TOOLS_DOCS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"amqp-get", "--help" + end +end diff --git a/Formula/r/rabbitmq.rb b/Formula/r/rabbitmq.rb new file mode 100644 index 0000000000000..cc32952fdbb7c --- /dev/null +++ b/Formula/r/rabbitmq.rb @@ -0,0 +1,99 @@ +class Rabbitmq < Formula + desc "Messaging and streaming broker" + homepage "https://www.rabbitmq.com" + url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v4.2.0/rabbitmq-server-generic-unix-4.2.0.tar.xz" + sha256 "5eaebefc8d2e3e24fe123a38769577f98d2085e56429bc5024fd437e65514c85" + license "MPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e22cc3a3a1c78737a6abae6a96f4edcf25dee57fea48357c421fca073b11df2d" + end + + depends_on "erlang" + + uses_from_macos "python" => :build + + def install + # Install the base files + prefix.install Dir["*"] + + # Setup the lib files + (var/"lib/rabbitmq").mkpath + (var/"log/rabbitmq").mkpath + + # Correct SYS_PREFIX for things like rabbitmq-plugins + erlang = Formula["erlang"] + inreplace sbin/"rabbitmq-defaults" do |s| + s.gsub! "SYS_PREFIX=${RABBITMQ_HOME}", "SYS_PREFIX=#{HOMEBREW_PREFIX}" + s.gsub! "CLEAN_BOOT_FILE=start_clean", "CLEAN_BOOT_FILE=#{erlang.opt_lib/"erlang/bin/start_clean"}" + s.gsub! "SASL_BOOT_FILE=start_sasl", "SASL_BOOT_FILE=#{erlang.opt_lib/"erlang/bin/start_clean"}" + end + + # Set RABBITMQ_HOME in rabbitmq-env + inreplace sbin/"rabbitmq-env", + 'RABBITMQ_HOME="$(rmq_realpath "${RABBITMQ_SCRIPTS_DIR}/..")"', + "RABBITMQ_HOME=#{prefix}" + + # Create the rabbitmq-env.conf file + rabbitmq_env_conf = etc/"rabbitmq/rabbitmq-env.conf" + rabbitmq_env_conf.write rabbitmq_env unless rabbitmq_env_conf.exist? + + # Enable plugins - management web UI; STOMP, MQTT, AMQP 1.0 protocols + enabled_plugins_path = etc/"rabbitmq/enabled_plugins" + unless enabled_plugins_path.exist? + enabled_plugins_path.write "[rabbitmq_management,rabbitmq_stomp,rabbitmq_amqp1_0," \ + "rabbitmq_mqtt,rabbitmq_stream]." + end + + rabbitmqadmin = prefix.glob("plugins/rabbitmq_management-*/priv/www/cli/rabbitmqadmin") + if (rabbitmqadmin_count = rabbitmqadmin.count) > 1 + odie "Expected only one `rabbitmqadmin`, got #{rabbitmqadmin_count}" + end + + sbin.install rabbitmqadmin + (sbin/"rabbitmqadmin").chmod 0755 + generate_completions_from_executable(sbin/"rabbitmqadmin", "--bash-completion", + shells: [:bash], + shell_parameter_format: :none) + end + + def caveats + <<~EOS + Management UI: http://localhost:15672 + Homebrew-specific docs: https://rabbitmq.com/install-homebrew.html + EOS + end + + def rabbitmq_env + <<~EOS + CONFIG_FILE=#{etc}/rabbitmq/rabbitmq + NODE_IP_ADDRESS=127.0.0.1 + NODENAME=rabbit@localhost + RABBITMQ_LOG_BASE=#{var}/log/rabbitmq + PLUGINS_DIR="#{opt_prefix}/plugins:#{HOMEBREW_PREFIX}/share/rabbitmq/plugins" + EOS + end + + service do + run opt_sbin/"rabbitmq-server" + log_path var/"log/rabbitmq/std_out.log" + error_log_path var/"log/rabbitmq/std_error.log" + # need erl in PATH + environment_variables PATH: "#{HOMEBREW_PREFIX}/sbin:/usr/sbin:/usr/bin:/bin:#{HOMEBREW_PREFIX}/bin", + CONF_ENV_FILE: etc/"rabbitmq/rabbitmq-env.conf" + end + + test do + ENV["RABBITMQ_MNESIA_BASE"] = testpath/"var/lib/rabbitmq/mnesia" + pid = fork { exec sbin/"rabbitmq-server" } + system sbin/"rabbitmq-diagnostics", "wait", "--pid", pid + system sbin/"rabbitmqctl", "status" + system sbin/"rabbitmqctl", "stop" + end +end diff --git a/Formula/r/radamsa.rb b/Formula/r/radamsa.rb new file mode 100644 index 0000000000000..ce7968c7f8740 --- /dev/null +++ b/Formula/r/radamsa.rb @@ -0,0 +1,45 @@ +class Radamsa < Formula + desc "Test case generator for robustness testing (a.k.a. a \"fuzzer\")" + homepage "https://gitlab.com/akihe/radamsa" + url "https://gitlab.com/akihe/radamsa/-/archive/v0.7/radamsa-v0.7.tar.gz" + sha256 "d9a6981be276cd8dfc02a701829631c5a882451f32c202b73664068d56f622a2" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c6fba460536c28334781bb3c1d5471794de9e6ab3ccd64bf9a9ee67dbfcaae8f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68a800cd47ad72dcaf605c67d01e86fab1af8c40b678f06317489887d3d1eeb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4868ee9e0dcbe6da781d40d6a513e2185ba0b8e09a125eca2dbb36c8e5cb4ab3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "568e7f3b24edb8d8aca56b0835eea5fcd32dff97d2c2a2985362329bf8555169" + sha256 cellar: :any_skip_relocation, sonoma: "2535c22f7a6faf37a7b7ffb7eab908de0a0d265e4f887718a65ef7b7d9d015f0" + sha256 cellar: :any_skip_relocation, ventura: "1463cedbf5969dc913d6878fab2a860d9aefd4d9a80f960ee8383086c6d17806" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9e5bd4345a4a6858c4dc6ecabbadb8d920bcc8941241e1300fc11ec9931b335" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c32fe0dcf5a76ce7251b8caebf2ecdd09427990a52c88adfd993efeae138fe41" + end + + # https://gitlab.com/akihe/radamsa/-/blob/v#{version}/Makefile?ref_type=tags#L7 + resource "ol.c" do + url "https://haltp.org/files/ol-0.2.2.c.gz" + version "0.2.2" + sha256 "fca85dae36910108598d8a4a244df7a8c2719e7803ac46d270762ece4aefc55c" + + livecheck do + url "https://gitlab.com/akihe/radamsa/-/raw/v#{LATEST_VERSION}/Makefile?ref_type=tags" + regex(/OWLURL=.*?ol[._-]v?(\d+(?:\.\d+)+)\.c/i) + end + end + + def install + resource("ol.c").stage { buildpath.install Dir["*"].first => "ol.c" } + system "make", "install", "PREFIX=#{prefix}" + # Manually replace the manpage which is not reproducible + rm(man1/"radamsa.1.gz") + man1.install Utils::Gzip.compress("doc/radamsa.1") + end + + test do + assert_match "Radamsa is a general purpose fuzzer.", shell_output("#{bin}/radamsa --about") + assert_match "drop a byte", shell_output("#{bin}/radamsa --list") + assert_match version.to_s, shell_output("#{bin}/radamsa --version") + end +end diff --git a/Formula/r/radare2.rb b/Formula/r/radare2.rb new file mode 100644 index 0000000000000..6727a91dca8e9 --- /dev/null +++ b/Formula/r/radare2.rb @@ -0,0 +1,35 @@ +class Radare2 < Formula + desc "Reverse engineering framework" + homepage "https://radare.org" + url "https://github.com/radareorg/radare2/archive/refs/tags/6.0.4.tar.gz" + sha256 "2aadf26066c396961949656f304cb5d99b76c88adbe30ad923db4e98b10f3bbc" + license "LGPL-3.0-only" + head "https://github.com/radareorg/radare2.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "c9cdefc81f641fd66e29367b3ed33b7a2af3fa57f3740c72a62954e6870c7896" + sha256 arm64_sequoia: "95cb10d5c670ccae599e39d08ac3849b0ad815e44a0fe1621b0b1c2382130679" + sha256 arm64_sonoma: "9a409a5845bb6906b07427f67340168e2b3d6c9929a2eddc63cc37f26689eedb" + sha256 sonoma: "ebea2e2b60e82bbd52e7cc1ead1c35d4dd59baffabdd14b7067db9d3730ab85f" + sha256 arm64_linux: "f3439dc6a99112966b23e3014d365a2b25383c303a50d49177477a7bd30c6892" + sha256 x86_64_linux: "7f4e8468d149400552f1311d7e8917728c653ccdcf110201bddf6c15678ff11e" + end + + # Required for r2pm (https://github.com/radareorg/radare2-pm/issues/170) + depends_on "pkgconf" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + assert_match "radare2 #{version}", shell_output("#{bin}/r2 -v") + end +end diff --git a/Formula/r/radvd.rb b/Formula/r/radvd.rb new file mode 100644 index 0000000000000..b25989ef8bf4f --- /dev/null +++ b/Formula/r/radvd.rb @@ -0,0 +1,79 @@ +class Radvd < Formula + desc "IPv6 Router Advertisement Daemon" + homepage "https://radvd.litech.org/" + url "https://github.com/radvd-project/radvd/releases/download/v2.20/radvd-2.20.tar.xz" + sha256 "25d2960fb977ac35c45a8d85b71db22ed8af325db7dbf4a562fb03eab2848dcd" + license "radvd" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d37d87602c7c0ca6e9b088215c1ca3a7bf01e8b62aa3be7b76ada6a9823f9078" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eec560f303de91f1806f46c6f54f4e51ec080f1dfc229fa569d2c0baab0711e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "54485d998b57f3e9a199f53216530e0ca07e2da6d6a54872f5a2f4d1b4642a1b" + sha256 cellar: :any_skip_relocation, sonoma: "a4f4a3af815645871d6eadf2574adad2450da398f767876acdbdd06fe04fb93b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad3ddab263acc0d7b55b37cb661117c8f1c72c4b3a87347bfef40e94552799b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4e8076563de9d02831b7ebfcedca64b085732111b2363ed46da86faeb382c51" + end + + head do + url "https://github.com/radvd-project/radvd.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libbsd" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"radvd.conf").write <<~EOS + # Example config + interface lo + { + AdvSendAdvert on; + IgnoreIfMissing on; + MinRtrAdvInterval 3; + MaxRtrAdvInterval 10; + AdvDefaultPreference low; + AdvHomeAgentFlag off; + prefix 2001:db8:1:0::/64 + { + AdvOnLink on; + AdvAutonomous on; + AdvRouterAddr off; + }; + prefix 0:0:0:1234::/64 + { + AdvOnLink on; + AdvAutonomous on; + AdvRouterAddr off; + Base6to4Interface ppp0; + AdvPreferredLifetime 120; + AdvValidLifetime 300; + }; + route 2001:db0:fff::/48 + { + AdvRoutePreference high; + AdvRouteLifetime 3600; + }; + RDNSS 2001:db8::1 2001:db8::2 + { + AdvRDNSSLifetime 30; + }; + DNSSL branch.example.com example.com + { + AdvDNSSLLifetime 30; + }; + }; + EOS + system sbin/"radvd", "-cC", testpath/"radvd.conf" + end +end diff --git a/Formula/r/rage.rb b/Formula/r/rage.rb new file mode 100644 index 0000000000000..bcb9e544e8380 --- /dev/null +++ b/Formula/r/rage.rb @@ -0,0 +1,52 @@ +class Rage < Formula + desc "Simple, modern, secure file encryption" + homepage "https://str4d.xyz/rage" + url "https://github.com/str4d/rage/archive/refs/tags/v0.11.1.tar.gz" + sha256 "b00559285c9fa5779b2908726d7a952cbf7cb629008e4c4c23a5c137c98f3f09" + license any_of: ["MIT", "Apache-2.0"] + head "https://github.com/str4d/rage.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "25f8887b6d990b955f190d9ed8dcbdea5b812b984c69b7adc1b5604233f607ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e67f141f38b2b412b46128c485063801adcbcf959b07534a8f551a52c4a60ecc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "66ae99a18be59aaf0e4320d5730dd614b255c2dbb7dfb983ca99458c8853f8c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c083e92caadb55e63ba0a77f37e06a6e2c0d8bfdc8a60a3e19ccc4de0102745" + sha256 cellar: :any_skip_relocation, sonoma: "5030ea9c84062928ec800a5101edf75e70ec4459984aaa51858b9d250e80bcdb" + sha256 cellar: :any_skip_relocation, ventura: "c1ef3aec2a5cb8148d8928a1585142e9b761e2d0f35c1acaee7da19c0e3a876e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e76cd438e4e721db962eb18c5e7d2d22c134be7b38fb9a3c2c197fa56a429399" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87a45f4a404552dd7911b5f35180e7ca31a130628b420607d32c8699849deaa4" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "./rage") + + src_dir = "target/release/completions" + bash_completion.install "#{src_dir}/rage.bash" => "rage" + fish_completion.install "#{src_dir}/rage.fish" + zsh_completion.install "#{src_dir}/_rage" + bash_completion.install "#{src_dir}/rage-keygen.bash" => "rage-keygen" + fish_completion.install "#{src_dir}/rage-keygen.fish" + zsh_completion.install "#{src_dir}/_rage-keygen" + + man.install Dir["target/release/manpages/*"] + end + + test do + # Test key generation + system bin/"rage-keygen", "-o", "#{testpath}/output.txt" + assert_path_exists testpath/"output.txt" + + # Test encryption + (testpath/"test.txt").write("Hello World!\n") + system bin/"rage", "-r", "age1y8m84r6pwd4da5d45zzk03rlgv2xr7fn9px80suw3psrahul44ashl0usm", + "-o", "#{testpath}/test.txt.age", "#{testpath}/test.txt" + assert_path_exists testpath/"test.txt.age" + assert_equal "age-encryption.org/v1", File.open(testpath/"test.txt.age", &:gets).chomp + + # Test decryption + (testpath/"test.key").write("AGE-SECRET-KEY-1TRYTV7PQS5XPUYSTAQZCD7DQCWC7Q77YJD7UVFJRMW4J82Q6930QS70MRX\n") + assert_equal "Hello World!", shell_output("#{bin}/rage -d -i #{testpath}/test.key #{testpath}/test.txt.age").strip + end +end diff --git a/Formula/r/ragel.rb b/Formula/r/ragel.rb new file mode 100644 index 0000000000000..ef0eafa8c2582 --- /dev/null +++ b/Formula/r/ragel.rb @@ -0,0 +1,58 @@ +class Ragel < Formula + desc "State machine compiler" + homepage "https://www.colm.net/open-source/ragel/" + url "https://www.colm.net/files/ragel/ragel-6.10.tar.gz" + sha256 "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/Stable.*?href=.*?ragel[._-]v?(\d+(?:\.\d+)+)\.t/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a861e1645f5b8f830a41c21217ff8423360dcc678bd5f25648f3737e75e3f0d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2bbe81eb822afe87192cd8b4688fe5bb9f84b2fe87ea343ef0155ff8b6590ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41ee07f4d272aeaa30c28763be68741670e7e38c518e49fc9c214db1cdfa717d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a023336bcea614167bc5f77ed303c53e2d26319057c835f0d49c841895515a9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b4427818a8647c06fe09fffa1960f6fbf4ce2c10dee048b1880486390c151585" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "858ef57e50114e0406d7afc3beb7c06462bc1b5ce2155948af84af0c41d739f1" + sha256 cellar: :any_skip_relocation, sonoma: "5771ddc6f4f2930842f90d27dd598a70fe35a0b8d0961dd67cf96fa5f1280f42" + sha256 cellar: :any_skip_relocation, ventura: "389f08b69edbc2fd8d9f79351549d31d2509e660c595c94e8e170432a4ba3d4e" + sha256 cellar: :any_skip_relocation, monterey: "1fe77eea34f4c9d9cc26f94706f55a3b38a595c9fb334fc0d3c168ea7abbf5b6" + sha256 cellar: :any_skip_relocation, big_sur: "712245a75110f6628e7c07130d2905577f1a533bf760692e0f4b3071df20cc40" + sha256 cellar: :any_skip_relocation, catalina: "a402204e97c35c6a9487d2b0707e27766d9b39c9c2116d49e9c561e1d0bd54b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "1273e5876162710bb47f6c16ec99b755035cb171d3b5d32be4e362ae7a3d08e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2306dd1c44d304bc0e86093e9f87e0e885d0d9ce03579ab55d7a6c9bf2ada95b" + end + + resource "pdf" do + url "https://www.colm.net/files/ragel/ragel-guide-6.10.pdf" + sha256 "efa9cf3163640e1340157c497db03feb4bc67d918fc34bc5b28b32e57e5d3a4e" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + doc.install resource("pdf") + end + + test do + testfile = testpath/"rubytest.rl" + testfile.write <<~EOS + %%{ + machine homebrew_test; + main := ( 'h' @ { puts "homebrew" } + | 't' @ { puts "test" } + )*; + }%% + data = 'ht' + %% write data; + %% write init; + %% write exec; + EOS + system bin/"ragel", "-Rs", testfile + end +end diff --git a/Formula/r/rails-completion.rb b/Formula/r/rails-completion.rb new file mode 100644 index 0000000000000..9ed52b720b0d0 --- /dev/null +++ b/Formula/r/rails-completion.rb @@ -0,0 +1,28 @@ +class RailsCompletion < Formula + desc "Bash completion for Rails" + homepage "https://github.com/mernen/completion-ruby" + url "https://github.com/mernen/completion-ruby/archive/refs/tags/v1.0.3.tar.gz" + sha256 "cbcd002bba2a43730cff54f5386565917913d9dec16dcd89345fbe298fe4316b" + license "MIT" + version_scheme 1 + head "https://github.com/mernen/completion-ruby.git", branch: "main" + + livecheck do + formula "ruby-completion" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "c8a61b7b584a29b0be33464a28714a01f798a7fcaceaf1c96f1b447363bc51f3" + end + + def install + bash_completion.install "completion-rails" => "rails" + end + + test do + assert_match "-F __rails", + shell_output("bash -c 'source #{bash_completion}/rails && complete -p rails'") + end +end diff --git a/Formula/r/rails-mcp-server.rb b/Formula/r/rails-mcp-server.rb new file mode 100644 index 0000000000000..15f88f993a0b5 --- /dev/null +++ b/Formula/r/rails-mcp-server.rb @@ -0,0 +1,50 @@ +class RailsMcpServer < Formula + desc "MCP server for Rails applications" + homepage "https://github.com/maquina-app/rails-mcp-server" + url "https://github.com/maquina-app/rails-mcp-server/archive/refs/tags/v1.2.2.tar.gz" + sha256 "5383902c2efcae00f3d6edd83b14db2cd926844ce01d62cd3fdbce989f5dfb29" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e0d02c6aefc3fcff4241e0568e111f739c561e44384fd3c48d793f90fd726d32" + sha256 cellar: :any, arm64_sequoia: "6c97f82fee4a2832a703d07c13558e90ac74b6b6cc2b6d624f3e067cdcb1f09e" + sha256 cellar: :any, arm64_sonoma: "aea94137aac15e7b5352cc78f1722446644c4db36d4a2e70c164b0c4027ac456" + sha256 cellar: :any, sonoma: "581825aa12a93c7975ad7d47fbf37eba16b96429d6a5ec89a88a6e24e37059b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cb9d0d0c4a8f45f9652e819192f367f0b1dcdaf2f6e24fa3dd117f89a16db39" + sha256 cellar: :any_skip_relocation, x86_64_linux: "514d61cdca7e9320709ad14a925ec3abdf4d89ea5a88e5cdf92e754d2c937b2c" + end + + depends_on "openssl@3" + depends_on "ruby" + + def install + ENV["BUNDLE_FORCE_RUBY_PLATFORM"] = "1" + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg + ENV["BUNDLE_WITHOUT"] = "development test" + ENV["GEM_HOME"] = libexec + + system "bundle", "install" + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + bin.install libexec/"bin/rails-mcp-server" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + (testpath/".config/rails-mcp/projects.yml").write <<~YAML + projects: + - name: test + path: #{testpath} + YAML + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}} + {"jsonrpc":"2.0","method":"notifications/initialized","params":{}} + {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{"cursor":null}} + JSON + + output = pipe_output("#{bin}/rails-mcp-server 2>&1", json, 0) + assert_match "Change the active Rails project to interact with a different codebase", output + end +end diff --git a/Formula/r/railway.rb b/Formula/r/railway.rb new file mode 100644 index 0000000000000..40b8d4a3c2f15 --- /dev/null +++ b/Formula/r/railway.rb @@ -0,0 +1,32 @@ +class Railway < Formula + desc "Develop and deploy code with zero configuration" + homepage "https://railway.com/" + url "https://github.com/railwayapp/cli/archive/refs/tags/v4.11.0.tar.gz" + sha256 "ed787d09a3ec46d578013733d83d76171c8eea19d646098213d2827a7473709f" + license "MIT" + head "https://github.com/railwayapp/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9ec00bbd8eab1a83f2620dc24d9ea7c52bcac1ec4ce268d81d10cdf257314809" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b5365ceb005a652693c2275017d6f0200ee1dfbbe6e9353adcd98a9f67de29f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf5fe2091fd1440549dee7c1042d45da34178b077a0d3d6aef6aae1432e958b8" + sha256 cellar: :any_skip_relocation, sonoma: "9eaf3426d58d89f90ab2b44e521f3fe92e84eecbe0a5f8801ef89df16d81c9f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbf96e16358f8653629d2978a1a42821788083a1e284e56619281efd479926f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f713c230c8afc52a4be8bef8fa67f6f45c0ca3c80e4cf92d12c80064bc44b97" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"railway", "completion") + end + + test do + output = shell_output("#{bin}/railway init 2>&1", 1).chomp + assert_match "Unauthorized. Please login with `railway login`", output + + assert_equal "railway #{version}", shell_output("#{bin}/railway --version").strip + end +end diff --git a/Formula/r/rain.rb b/Formula/r/rain.rb new file mode 100644 index 0000000000000..bba3932d2dcf3 --- /dev/null +++ b/Formula/r/rain.rb @@ -0,0 +1,43 @@ +class Rain < Formula + desc "Command-line tool for working with AWS CloudFormation" + homepage "https://github.com/aws-cloudformation/rain" + url "https://github.com/aws-cloudformation/rain/archive/refs/tags/v1.23.1.tar.gz" + sha256 "37fb974ee0eb36ceb80f38f13141883f3779a81c79562d0ad15afcd74753485e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "318d3ec5f4f665d44bf4ed51609f17054dff1e8bea1b82a3080c2c777b7a9d2e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd4c31e085d0107c25909db36c2c4df1bbfc21bcb3260d7478dc1324ac0995ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15d05e072d423d6df23fadc7237e8607f17e749884ec656640571366f25dfdd0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1eedd4c33fdf1bffc2f1b3c8106a157174bfe7eb5bb3d5a8b32d837cededfaa1" + sha256 cellar: :any_skip_relocation, sonoma: "a9953614985f14bf21b2b3b4ab88d179cda5da27e5e36a2d85a9a0115eb7c27f" + sha256 cellar: :any_skip_relocation, ventura: "3cf376704499c3459de1d7e4f47713fe3006c0907f1bed480e1f0045dd6b2f06" + sha256 cellar: :any_skip_relocation, arm64_linux: "32eebc8816cb5e77606f4ea200b634850bfd59c74e910feb91678b4f957f30b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9cd406c6cb1bfe9e46c928b7db5a478af2c510883145028d004d938ed4c1cd8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/rain" + + bash_completion.install "docs/bash_completion.sh" => "rain" + zsh_completion.install "docs/zsh_completion.sh" => "_rain" + end + + def caveats + <<~EOS + Deploying CloudFormation stacks with rain requires the AWS CLI to be installed. + All other functionality works without the AWS CLI. + EOS + end + + test do + (testpath/"test.yaml").write <<~YAML + Resources: + Bucket: + Type: AWS::S3::Bucket + YAML + assert_equal "test.yaml: formatted OK", shell_output("#{bin}/rain fmt -v test.yaml").strip + end +end diff --git a/Formula/r/rainbarf.rb b/Formula/r/rainbarf.rb new file mode 100644 index 0000000000000..a96645edbe768 --- /dev/null +++ b/Formula/r/rainbarf.rb @@ -0,0 +1,31 @@ +class Rainbarf < Formula + desc "CPU/RAM/battery stats chart bar for tmux (and GNU screen)" + homepage "https://github.com/creaktive/rainbarf" + url "https://github.com/creaktive/rainbarf/archive/refs/tags/v1.4.tar.gz" + sha256 "066579c0805616075c49c705d1431fb4b7c94a08ef2b27dd8846bd3569a188a4" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/creaktive/rainbarf.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4787b85e42e62b921b5729449bc86ba7ac7accdb165bf20a8f2a43e190dd2173" + end + + depends_on "pod2man" => :build + + uses_from_macos "perl" + + def install + system "#{Formula["pod2man"].opt_bin}/pod2man", "rainbarf", "rainbarf.1" + man1.install "rainbarf.1" + bin.install "rainbarf" + end + + test do + # Avoid "Use of uninitialized value $battery" and sandbox violation + # Reported 5 Sep 2016 https://github.com/creaktive/rainbarf/issues/30 + assert_match version.to_s, shell_output("#{bin}/rainbarf --help", 1) + end +end diff --git a/Formula/r/rainfrog.rb b/Formula/r/rainfrog.rb new file mode 100644 index 0000000000000..514b932751588 --- /dev/null +++ b/Formula/r/rainfrog.rb @@ -0,0 +1,28 @@ +class Rainfrog < Formula + desc "Database management TUI for PostgreSQL/MySQL/SQLite" + homepage "https://github.com/achristmascarl/rainfrog" + url "https://github.com/achristmascarl/rainfrog/archive/refs/tags/v0.3.9.tar.gz" + sha256 "a2034bad6a07ddb2273aac931284d341c219d944b0088e207957831b5302b2c4" + license "MIT" + head "https://github.com/achristmascarl/rainfrog.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8bbbd875cc34c55e6074b17ddba1f777537a8d68d8133e6cafe6b1eb02cf3371" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eb05f80c4f1e6e3f4404dbea07dadafdac35b325f39d81c471d9bd4325d0437f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7056dbbd94ca055694c5706f9a71ec9012ea2c0b2995535214801dee5a8a9b7" + sha256 cellar: :any_skip_relocation, sonoma: "85d972a05316d04d604036d4277e3567b7c1b45d726edd3bf2065173db290378" + sha256 cellar: :any_skip_relocation, arm64_linux: "7333da2189db79c60abc49444384b12ecc37833ffcfe6c25a63fb341b3cb6de5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "acacbdda373a6efafcd4565489baf5ab1a152c608a1fbb8eeeab9f294719aa88" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # rainfrog is a TUI application + assert_match version.to_s, shell_output("#{bin}/rainfrog --version") + end +end diff --git a/Formula/r/rake-completion.rb b/Formula/r/rake-completion.rb new file mode 100644 index 0000000000000..fb0bc312c9da2 --- /dev/null +++ b/Formula/r/rake-completion.rb @@ -0,0 +1,27 @@ +class RakeCompletion < Formula + desc "Bash completion for Rake" + homepage "https://github.com/mernen/completion-ruby" + url "https://github.com/mernen/completion-ruby/archive/refs/tags/v1.0.3.tar.gz" + sha256 "cbcd002bba2a43730cff54f5386565917913d9dec16dcd89345fbe298fe4316b" + license "MIT" + head "https://github.com/mernen/completion-ruby.git", branch: "main" + + livecheck do + formula "ruby-completion" + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "5004cd20889962fc9ce3a921f56e27cb5a28e0f88fde57ae1428e28e0dbf89bb" + end + + def install + bash_completion.install "completion-rake" => "rake" + end + + test do + assert_match "-F __rake", + shell_output("bash -c 'source #{bash_completion}/rake && complete -p rake'") + end +end diff --git a/Formula/r/rakudo-star.rb b/Formula/r/rakudo-star.rb new file mode 100644 index 0000000000000..f1a89eaece514 --- /dev/null +++ b/Formula/r/rakudo-star.rb @@ -0,0 +1,140 @@ +class RakudoStar < Formula + desc "Rakudo compiler and commonly used packages" + homepage "https://rakudo.org/" + url "https://github.com/rakudo/star/releases/download/2025.10/rakudo-star-2025.10.tar.gz" + sha256 "9d22698c9b8186e9a7191a34c24ebf0dcb53b167ae2fe46984dd7664c6c87bb5" + license "Artistic-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "955e6251c63e1f059f9ebb61c45fd3425c2ce72256b42031c45fa36854f5ce8b" + sha256 arm64_sequoia: "297adbe00022fde2f7f209c36fc26a11ac43ffcc7857be8b081a326eef41b92f" + sha256 arm64_sonoma: "70b07d4e4e99300dc994e2e71d9ecc20d8fb7fe7413ca57abbaca863f1f3f5a7" + sha256 sonoma: "737b3d653d64b3ca5c32c53fd31cdc9e246a6f9c3f960e37bf6ef5a8e3f239c0" + sha256 arm64_linux: "43fffe25eac19346a82adf1557e6e64f91bb93ee6799cfc09e638e11f9af7405" + sha256 x86_64_linux: "480be35d3ca6ec9eb36d5833b0314ac0923b0a3669bcc11cf1345f8ccd031007" + end + + depends_on "bash" => :build + depends_on "pkgconf" => :build + depends_on "sqlite" => [:build, :test] + depends_on "libtommath" + depends_on "mimalloc" + depends_on "openssl@3" # for OpenSSL module, loaded by path + depends_on "readline" # for Readline module, loaded by path + depends_on "zstd" + + uses_from_macos "perl" => :build + uses_from_macos "libffi" + uses_from_macos "libxml2" + + on_macos do + depends_on "libuv" + end + + conflicts_with "moor", because: "both install `moar` binaries" + conflicts_with "moarvm", "nqp", because: "rakudo-star currently ships with moarvm and nqp included" + conflicts_with "parrot" + conflicts_with "rakudo" + + # Allow adding arguments via inreplace to unbundle libraries in MoarVM + patch :DATA + + def install + # Unbundle libraries in MoarVM + moarvm_3rdparty = buildpath.glob("src/moarvm-*/MoarVM-*/3rdparty").first + %w[dyncall libatomicops libtommath mimalloc].each { |dir| rm_r(moarvm_3rdparty/dir) } + moarvm_configure_args = %W[ + --c11-atomics + --has-libffi + --has-libtommath + --has-mimalloc + --pkgconfig=#{Formula["pkgconf"].opt_bin}/pkgconf + ] + # FIXME: brew `libuv` causes runtime failures on Linux, e.g. + # "Cannot find method 'made' on object of type NQPMu" + if OS.mac? + moarvm_configure_args << "--has-libuv" + rm_r(moarvm_3rdparty/"libuv") + end + inreplace "lib/actions/install.bash", "@@MOARVM_CONFIGURE_ARGS@@", moarvm_configure_args.join(" ") + + # Help Readline module find brew `readline` on Linux + inreplace "src/rakudo-star-modules/Readline/lib/Readline.pm", + %r{\((\n *)('/lib/x86_64-linux-gnu',)}, + "(\\1'#{Formula["readline"].opt_lib}',\\1\\2" + + ENV.deparallelize # An intermittent race condition causes random build failures. + + # make install runs tests that can hang on sierra + # set this variable to skip those tests + ENV["NO_NETWORK_TESTING"] = "1" + + # Help DBIish module find sqlite shared library + ENV["DBIISH_SQLITE_LIB"] = Formula["sqlite"].opt_lib/shared_library("libsqlite3") + + # openssl module's brew --prefix openssl probe fails so set value here + ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix + + rm buildpath.glob("src/rakudo-star-modules/**/*.o") + system "bin/rstar", "install", "-p", prefix.to_s + + # Installed scripts are now in share/perl/{site|vendor}/bin, so we need to symlink it too. + bin.install_symlink (share/"perl6/vendor/bin").children.select(&:executable?) + bin.install_symlink (share/"perl6/site/bin").children.select(&:executable?) + end + + def post_install + (share/"perl6/vendor/short").mkpath + end + + test do + out = shell_output("#{bin}/raku -e 'loop (my $i = 0; $i < 10; $i++) { print $i }'") + assert_equal "0123456789", out + + # Test OpenSSL module + (testpath/"openssl.raku").write <<~PERL + use OpenSSL::CryptTools; + my $ciphertext = encrypt("brew".encode, :aes256, :iv(("0" x 16).encode), :key(('x' x 32).encode)); + print decrypt($ciphertext, :aes256, :iv(("0" x 16).encode), :key(('x' x 32).encode)).decode; + PERL + assert_equal "brew", shell_output("#{bin}/raku openssl.raku") + + # Test Readline module + (testpath/"readline.raku").write <<~PERL + use Readline; + my $response = Readline.new.readline("test> "); + print "[$response]"; + PERL + assert_equal "test> brew\n[brew]", pipe_output("#{bin}/raku readline.raku", "brew\n", 0) + + # Test DBIish module + (testpath/"sqlite.raku").write <<~PERL + use DBIish; + my $dbh = DBIish.connect("SQLite", :database, :RaiseError); + $dbh.execute("create table students (name text, age integer)"); + $dbh.execute("insert into students (name, age) values ('Bob', 14)"); + $dbh.execute("insert into students (name, age) values ('Sue', 12)"); + say $dbh.execute("select name from students order by age asc").allrows(); + $dbh.dispose; + PERL + assert_equal "([Sue] [Bob])\n", shell_output("#{bin}/raku sqlite.raku") + end +end + +__END__ +--- a/lib/actions/install.bash ++++ b/lib/actions/install.bash +@@ -168,7 +168,7 @@ build_moarvm() { + fi + + { +- perl Configure.pl "$@" \ ++ perl Configure.pl @@MOARVM_CONFIGURE_ARGS@@ "$@" \ + && make \ + && make install \ + > "$logfile" \ diff --git a/Formula/r/rakudo.rb b/Formula/r/rakudo.rb new file mode 100644 index 0000000000000..e773acfacd051 --- /dev/null +++ b/Formula/r/rakudo.rb @@ -0,0 +1,51 @@ +class Rakudo < Formula + desc "Mature, production-ready implementation of the Raku language" + homepage "https://rakudo.org" + url "https://github.com/rakudo/rakudo/releases/download/2025.10/rakudo-2025.10.tar.gz" + sha256 "92201667468a9e0d5674c9a2f6a253f69fd058fe75451cd5c558b62c0c163b5d" + license "Artistic-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "1b4fc71038d5dc3bd17e4d4d919a3c7ca3365d5e1afa9c9417154e7ce663b69b" + sha256 arm64_sequoia: "c840e55f5f99530e4337af0f04bfcde180b94c07284110857c388850f5f17b20" + sha256 arm64_sonoma: "55e90f4fdb13b1cb9a608a0ad86bc8d8211c4707895fddc88758c0b0e35d0ec0" + sha256 sonoma: "90a18032814063c4630024af563229a4be33d8f5a1cf386b397db5f1939b4670" + sha256 arm64_linux: "dc1a6e632d378c31def0747e00d0d6a28c75ee40d235d8249fe413c980d766c1" + sha256 x86_64_linux: "913e8aa6b0e5b8fab758f3c061dea131fcd64e9f14e428a78294369e9ea53da4" + end + + depends_on "moarvm" + depends_on "nqp" + + uses_from_macos "perl" => :build + + conflicts_with "rakudo-star" + + def install + system "perl", "Configure.pl", + "--backends=moar", + "--prefix=#{prefix}", + "--with-nqp=#{Formula["nqp"].bin}/nqp" + + # Reduce overlinking on macOS + if OS.mac? + inreplace "Makefile" do |s| + s.change_make_var! "M_LDFLAGS", "#{s.get_make_var("M_LDFLAGS")} -Wl,-dead_strip_dylibs" + end + end + + system "make" + system "make", "install" + bin.install "tools/install-dist.raku" => "raku-install-dist" + end + + test do + out = shell_output("#{bin}/raku -e 'loop (my $i = 0; $i < 10; $i++) { print $i }'") + assert_equal "0123456789", out + end +end diff --git a/Formula/r/ramalama.rb b/Formula/r/ramalama.rb new file mode 100644 index 0000000000000..9428793056241 --- /dev/null +++ b/Formula/r/ramalama.rb @@ -0,0 +1,80 @@ +class Ramalama < Formula + include Language::Python::Virtualenv + + desc "Goal of RamaLama is to make working with AI boring" + homepage "https://github.com/containers/ramalama" + url "https://files.pythonhosted.org/packages/47/c5/606c7449202f8f949a75fd2d5cc76906f039a0d25b0bf9433da5e3137bad/ramalama-0.14.0.tar.gz" + sha256 "0564bada1cc6fac2d45143024fd9b29219b7a7508f1d591cbe14d8e6db363b2c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1f823f748dd95561f7bbf22472abe5c4e5c18d3afe85a4fa873791a32031209c" + sha256 cellar: :any, arm64_sequoia: "7f7ffdd26f9138a42109bd6e8f05fd458b416c88923830c5111a55ca222b9caa" + sha256 cellar: :any, arm64_sonoma: "6fb38f1217da000ef4ac818e1d9de2c8a4bf021ef28e0361055a3f2191004f57" + sha256 cellar: :any, sonoma: "805667170d9d898bc99dac2a70a02684da632a23a60be909312047e3afb9064b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad71b672cf750e91a5c5b192c93db4998b1fa5a18d3df640d2742100c96261a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c166d5c1c4746a4fcace908459d89f83d0ff65ffa94e629b0fa8aff26a9582e6" + end + + depends_on "libyaml" + depends_on "llama.cpp" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: "rpds-py" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"ramalama", "pull", "tinyllama" + list_output = shell_output("#{bin}/ramalama list") + assert_match "TinyLlama", list_output + + inspect_output = shell_output("#{bin}/ramalama inspect tinyllama") + assert_match "Format: GGUF", inspect_output + + assert_match version.to_s, shell_output("#{bin}/ramalama version") + end +end diff --git a/Formula/r/rancher-cli.rb b/Formula/r/rancher-cli.rb new file mode 100644 index 0000000000000..d1b0756c18635 --- /dev/null +++ b/Formula/r/rancher-cli.rb @@ -0,0 +1,36 @@ +class RancherCli < Formula + desc "Unified tool to manage your Rancher server" + homepage "https://github.com/rancher/cli" + url "https://github.com/rancher/cli/archive/refs/tags/v2.12.3.tar.gz" + sha256 "50d808e7990b8f026795c1f8fc7227ca357c1c447becb77869348e3ec3ad2512" + license "Apache-2.0" + head "https://github.com/rancher/cli.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9246b2c7e4905ac97f0c90deca02fcca7b7d500d2bcbb033bee1e2cddda4dc1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac501066a058031fecdf5e2c5c2764fef50ddc0f8d05b6d71137849578e9e871" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be6df7b1c41e8f7a4dffd8cd708500ef3bed57c03d9072a79517acd8554b8bd6" + sha256 cellar: :any_skip_relocation, sonoma: "ef234b5728ae5d2b92e8b371c1c261360e01227885648f03b56de79eed7c1cb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee6fd046006bb1b66f1b67278c2771597a8e3498d2259b26e4a1d65f71b42576" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2430b4569284d402fd0faa6a0516fddadee1f6f35399d4040809cb6a3145615b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.VERSION=#{version}", output: bin/"rancher") + end + + test do + assert_match "Failed to parse SERVERURL", shell_output("#{bin}/rancher login localhost -t foo 2>&1", 1) + assert_match "invalid token", shell_output("#{bin}/rancher login https://127.0.0.1 -t foo 2>&1", 1) + end +end diff --git a/Formula/r/rancid.rb b/Formula/r/rancid.rb new file mode 100644 index 0000000000000..36c4fb896cb7a --- /dev/null +++ b/Formula/r/rancid.rb @@ -0,0 +1,51 @@ +class Rancid < Formula + desc "Really Awesome New Cisco confIg Differ" + homepage "https://www.shrubbery.net/rancid/" + url "https://www.shrubbery.net/pub/rancid/rancid-3.14.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/r/rancid/rancid_3.14.orig.tar.gz" + sha256 "cbf608d8508b55dffb6b30c7a1c45c16ea53af7611a466e0cc47a863252f6e49" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?rancid[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5978661df2baf3b746206d0b2498d27ca0adfcc840b296abe9eabfd9e9a587a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc4630246c5362304dd3550870b72f634cac5b614bb06c3a78e5b023e34397c7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71bb9a547c9a465e7debae0023ea19c86247c364d4f2ac740e4ef55839f5488a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "250fd72c6d55b0cd2d34922fa16de7fc240dfdb4654679e09add571c274c269a" + sha256 cellar: :any_skip_relocation, sonoma: "df7cec970be7ccbed73e5b3a0a117707d1da7b884d0ce400b01cd7415acf59fd" + sha256 cellar: :any_skip_relocation, ventura: "972e80a0776fb3ae603f16eee01bca52199b5426737b846c5192c8529dd93168" + sha256 cellar: :any_skip_relocation, arm64_linux: "59d2743a72a538248c97c3112a9509b55296143b1142715f90c66a0360404ddd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b4b6267a47aef7344f8e3502be5b50d7ee70010b2a452062cd976daea23c61c" + end + + uses_from_macos "expect" + uses_from_macos "perl" + + on_linux do + depends_on "iputils" + end + + conflicts_with "par", because: "both install `par` binaries" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"rancid.conf").write <<~EOS + BASEDIR=#{testpath}; export BASEDIR + CVSROOT=$BASEDIR/CVS; export CVSROOT + LOGDIR=$BASEDIR/logs; export LOGDIR + RCSSYS=git; export RCSSYS + LIST_OF_GROUPS="backbone aggregation switches" + EOS + system bin/"rancid-cvs", "-f", testpath/"rancid.conf" + end +end diff --git a/Formula/r/randomize-lines.rb b/Formula/r/randomize-lines.rb new file mode 100644 index 0000000000000..501920d9787cf --- /dev/null +++ b/Formula/r/randomize-lines.rb @@ -0,0 +1,46 @@ +class RandomizeLines < Formula + desc "Reads and randomize lines from a file (or STDIN)" + homepage "https://arthurdejong.org/rl/" + url "https://arthurdejong.org/rl/rl-0.2.7.tar.gz" + sha256 "1cfca23d6a14acd190c5a6261923757d20cb94861c9b2066991ec7a7cae33bc8" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?rl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "54390ca4a64d2cc044e4a562f868476d9821274a86758db0fd035079fe9e5db2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8ec08636ac3e5aa68060b1f43a1bd6a5cad418f489a4bbc9b9554053aa06188e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "194a2a869a8ecdeab95baf1f6b5f9d5d13c12eba7b6acd1378817da3e01a9740" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c351e68f794607d01893bca67180a80b721b597260304eb258f3108227950f8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6aa2233b5cb7b9dd6ca98f51a6afee212967af3a1dd5b5d27f4ef0a7359c7bd0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c107eea0fba80096a370db46e622320bdb9ea825b837280e46ad236b3a37bbd4" + sha256 cellar: :any_skip_relocation, sonoma: "10e538eab3c969a0253e4febea9ce1d45b015e7b388c31a818438f850cbb5144" + sha256 cellar: :any_skip_relocation, ventura: "489084bd61495369766199746c6a3f011fe598d5b17eb809c10e99c9cfec7526" + sha256 cellar: :any_skip_relocation, monterey: "7dd7d179e5ac4567f69860ca54a379be5424a0c5e6fd8f0088ce6c158a77c47f" + sha256 cellar: :any_skip_relocation, big_sur: "05b5f772ee8d86ef341e30e91194b0a4b0cdbe5d3e16c8e319ed5e74a901e806" + sha256 cellar: :any_skip_relocation, catalina: "ff6262e5a351158ca8a2b25b577a892fc4cf2b7f9a2330e9fec595970c81674d" + sha256 cellar: :any_skip_relocation, arm64_linux: "764e49f56b35776d575f1c96474373185c667956751c0c3b829680038a32e9d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d3ca6029fbd900632e5f09b68c583b1f441cf1bb711041ab00d519ee8fd323a" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.txt").write <<~EOS + 1 + 2 + 4 + EOS + + system bin/"rl", "-c", "1", testpath/"test.txt" + end +end diff --git a/Formula/r/range-v3.rb b/Formula/r/range-v3.rb new file mode 100644 index 0000000000000..34539e2b36852 --- /dev/null +++ b/Formula/r/range-v3.rb @@ -0,0 +1,48 @@ +class RangeV3 < Formula + desc "Experimental range library for C++14/17/20" + homepage "https://ericniebler.github.io/range-v3/" + url "https://github.com/ericniebler/range-v3/archive/refs/tags/0.12.0.tar.gz" + sha256 "015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb" + license "BSL-1.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "2fdd480cc63593645c0cc98d62a3607bd22600df59de39e7425bd3f89bd69c82" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DRANGE_V3_TESTS=OFF + -DRANGE_V3_HEADER_CHECKS=OFF + -DRANGE_V3_EXAMPLES=OFF + -DRANGE_V3_PERF=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() { + std::string s{ "hello" }; + ranges::for_each( s, [](char c){ std::cout << c << " "; }); + std::cout << std::endl; + } + CPP + stdlib_ldflag = OS.mac? ? "-lc++" : "-lstdc++" + flags = [stdlib_ldflag] + flags << "-stdlib=libc++" if OS.mac? + system ENV.cc, "test.cpp", "-std=c++14", *flags, "-o", "test" + assert_equal "h e l l o \n", shell_output("./test") + end +end diff --git a/Formula/r/range2cidr.rb b/Formula/r/range2cidr.rb new file mode 100644 index 0000000000000..f14b6f2595754 --- /dev/null +++ b/Formula/r/range2cidr.rb @@ -0,0 +1,43 @@ +class Range2cidr < Formula + desc "Converts IP ranges to CIDRs" + homepage "https://ipinfo.io" + url "https://github.com/ipinfo/cli/archive/refs/tags/range2cidr-1.3.0.tar.gz" + sha256 "562f130483c8c7b2d376f8b0325392136f53e74912c879fae0677ffe46299738" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^range2cidr[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "222dc28cb19073d0c6d8a68b9a6d26085c247600eb7d99ae4140a46fe78172a7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8ce7fa7b06bdbc333fb6b71d512de6d2c6f040df3123fe3b77662e1562606be4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b538cd77fd79f1edbf41c0c74ba289c62ae51d8870712f2b56f5be2f7a1031e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "719332735abc456c90e585fc8f802e418bb9a1d56c6871f5c27247f077577894" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cb9471b5f9b4ea6abefb2a8a3b0ee68125098c66565efb77385e5a5e1a46bbbd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5514b7e035bfdde163594f595f5e776ac8dd998dbdf548d892be91abf06a0ddd" + sha256 cellar: :any_skip_relocation, sonoma: "281b35fa3d1b4294e263c6624e5938051f7fd69de1c418572ea466eaba9c56fd" + sha256 cellar: :any_skip_relocation, ventura: "f40f62f155e78760e2471d49cc545afefdbc3943f69b07c6decaef2174c8bd3b" + sha256 cellar: :any_skip_relocation, monterey: "7559ea0525e6feaecdc50a741185765d4991dbc34c4c57d4a7b0121a4c9f9647" + sha256 cellar: :any_skip_relocation, big_sur: "2103581c5d4bdbac9d5c4e046f2f4344afa65ec6320151a2af2606d4a7a3e617" + sha256 cellar: :any_skip_relocation, catalina: "41ed80ac028658ced43c8973c7c29c81fe159347ce885c24384df915157d91e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "73c474acb521c2a4ed1a79ec3e94851b9d7c25049c92bef5a0f85d2849c82196" + sha256 cellar: :any_skip_relocation, x86_64_linux: "738f9617ee60fef2ec1f30930b45dfc633d4f65ccdb97659d9d311aa52eb9c2a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args, "./range2cidr" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/range2cidr --version").chomp + assert_equal "1.1.1.0/30", shell_output("#{bin}/range2cidr 1.1.1.0-1.1.1.3").chomp + assert_equal "0.0.0.0/0", shell_output("#{bin}/range2cidr 0.0.0.0-255.255.255.255").chomp + assert_equal "1.1.1.0/31\n1.1.1.2/32", shell_output("#{bin}/range2cidr 1.1.1.0-1.1.1.2").chomp + end +end diff --git a/Formula/r/ranger.rb b/Formula/r/ranger.rb new file mode 100644 index 0000000000000..2832d603d2487 --- /dev/null +++ b/Formula/r/ranger.rb @@ -0,0 +1,32 @@ +class Ranger < Formula + include Language::Python::Virtualenv + + desc "File browser" + homepage "https://ranger.github.io" + url "https://files.pythonhosted.org/packages/b6/57/c53a45928a3d6ac6a4b3d7a5d54af58a74592d4d405973d249268fc85157/ranger_fm-1.9.4.tar.gz" + sha256 "bee308b636137b9135111fc795a57cdbb95257f2670101042ac3d7747dec32c8" + license "GPL-3.0-or-later" + head "https://github.com/ranger/ranger.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "cf9392090a9110d00d4c95026536ef2a5988dd9375db3139c20c23f1e79eb74f" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/ranger --version") + + code = "print('Hello World!')\n" + (testpath/"test.py").write code + assert_equal code, shell_output("#{bin}/rifle -w cat test.py") + + ENV.prepend_path "PATH", Formula["python@3.14"].opt_libexec/"bin" + assert_equal "Hello World!\n", shell_output("#{bin}/rifle -p 2 test.py") + end +end diff --git a/Formula/r/rapidfuzz-cpp.rb b/Formula/r/rapidfuzz-cpp.rb new file mode 100644 index 0000000000000..014d84799eb96 --- /dev/null +++ b/Formula/r/rapidfuzz-cpp.rb @@ -0,0 +1,37 @@ +class RapidfuzzCpp < Formula + desc "Rapid fuzzy string matching in C++ using the Levenshtein Distance" + homepage "https://rapidfuzz.github.io/rapidfuzz-cpp/" + url "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.3.3.tar.gz" + sha256 "fa0fbd40110df8134cf05bddbaa4e237dbc4fd915ab9a3029ff481a8d3e8b757" + license "MIT" + head "https://github.com/rapidfuzz/rapidfuzz-cpp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "54a85141d45ff381701842443506a4cb6e385f0c07a03fdfb9ba926add8c2e60" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() + { + std::string a = "aaaa"; + std::string b = "abab"; + std::cout << rapidfuzz::fuzz::ratio(a, b) << std::endl; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-o", "test" + assert_equal "50", shell_output("./test").strip + end +end diff --git a/Formula/r/rapidjson.rb b/Formula/r/rapidjson.rb new file mode 100644 index 0000000000000..8b01020d1d2de --- /dev/null +++ b/Formula/r/rapidjson.rb @@ -0,0 +1,40 @@ +class Rapidjson < Formula + desc "JSON parser/generator for C++ with SAX and DOM style APIs" + homepage "https://rapidjson.org/" + license "MIT" + head "https://github.com/Tencent/rapidjson.git", branch: "master" + + stable do + url "https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.tar.gz" + sha256 "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e" + + # Backport fix for usage with recent GCC and Clang + patch do + url "https://github.com/Tencent/rapidjson/commit/9bd618f545ab647e2c3bcbf2f1d87423d6edf800.patch?full_index=1" + sha256 "ce341a69d6c17852fddd5469b6aabe995fd5e3830379c12746a18c3ae858e0e1" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "ba505c9a587b3c26539eae5dd732ae36bca53b67daf94579fee177d88094fa52" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DRAPIDJSON_BUILD_DOC=OFF", + "-DRAPIDJSON_BUILD_EXAMPLES=OFF", + "-DRAPIDJSON_BUILD_TESTS=OFF", + *std_cmake_args + system "cmake", "--install", "build" + end + + test do + system ENV.cxx, "#{share}/doc/RapidJSON/examples/capitalize/capitalize.cpp", "-o", "capitalize" + assert_equal '{"A":"B"}', pipe_output("./capitalize", '{"a":"b"}') + end +end diff --git a/Formula/r/rapidyaml.rb b/Formula/r/rapidyaml.rb new file mode 100644 index 0000000000000..aafc79907c80c --- /dev/null +++ b/Formula/r/rapidyaml.rb @@ -0,0 +1,38 @@ +class Rapidyaml < Formula + desc "Library to parse and emit YAML, and do it fast" + homepage "https://github.com/biojppm/rapidyaml" + url "https://github.com/biojppm/rapidyaml/releases/download/v0.10.0/rapidyaml-0.10.0-src.tgz" + sha256 "54eb1050789809a26c780f80857b7668a5b3123405d6514a65d733e4292c690b" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a3acb1236b76e9252ecbf4d280e7f5637872fae07ce2bb422fd6e611b7234569" + sha256 cellar: :any, arm64_sequoia: "39b6980bb79c269799dcbedad2067c9656293de5ee439d09779dd75a58cc1885" + sha256 cellar: :any, arm64_sonoma: "6b93cfe8b8ecffbb0efb0f90abb39b754d35a4ecec0e28840a0c8e77cab1b29d" + sha256 cellar: :any, sonoma: "f19b2606c78fe3f717e803758451d8e741503dab0edcd835a98c502c264f926c" + sha256 cellar: :any_skip_relocation, arm64_linux: "795add5af602f536a77fc2def8e10a83c5d62f4d90037a10a4536c76f1090981" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe0da4e573557946d6960fc602f29d4ae3c26ae6b53d96abe618e9a6ca9ae8cf" + end + + depends_on "cmake" => :build + + conflicts_with "c4core", because: "both install `c4core` files `include/c4`" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + char yml_buf[] = "{foo: 1, bar: [2, 3], john: doe}"; + ryml::Tree tree = ryml::parse_in_place(yml_buf); + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-L#{lib}", "-lryml", "-o", "test" + system "./test" + end +end diff --git a/Formula/r/raptor.rb b/Formula/r/raptor.rb new file mode 100644 index 0000000000000..ff8ffa45d420c --- /dev/null +++ b/Formula/r/raptor.rb @@ -0,0 +1,48 @@ +class Raptor < Formula + desc "RDF parser toolkit" + homepage "https://librdf.org/raptor/" + url "https://download.librdf.org/source/raptor2-2.0.16.tar.gz" + sha256 "089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680" + license any_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later", "Apache-2.0"] + + livecheck do + url :homepage + regex(/href=.*?raptor2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b433e57b5554eb19738ca971d4d453ba207bc1402006d627e063bb13ae722882" + sha256 cellar: :any, arm64_sequoia: "26276eb455188d1b46f33144e3f71c7fb3bbcb0eeeecf990402b095fb90662d0" + sha256 cellar: :any, arm64_sonoma: "40dcde53bea22c1f9f190517ffb52d13fc1bd8cb2ee91cf7f9439718cf491ef4" + sha256 cellar: :any, arm64_ventura: "04bcb31c9be96a4763e3ea34843a0be60d5b4051fb89d65f0a8e63880d2256f7" + sha256 cellar: :any, arm64_monterey: "1d0120b0dbca92597a7fe305a13ae1f3532fc5521ba7c61f26748d387240aab4" + sha256 cellar: :any, arm64_big_sur: "9cdd4d2a5c7cc9888072bbd8e6062ee1645b9b7e4ca371391fdbdd95a0a20f9d" + sha256 cellar: :any, sonoma: "7f1de091c7c497a3206f19766aae47a892668bfd4c551a3ccb10c936fcc193dd" + sha256 cellar: :any, ventura: "6e1542f6b1550034210dec5ce87896ef4be236e60ac6b4a21136b7029b7c2dc5" + sha256 cellar: :any, monterey: "d91142c6c8c5057b57a334ad8c8a856e620303cf4fefc4e9bc95a9715f9d338f" + sha256 cellar: :any, big_sur: "ba5e405a3c7b6f8f89e91474e1ebe98370a592ba3a2c8b506577c8e7197cd859" + sha256 cellar: :any_skip_relocation, arm64_linux: "8dbff84e7fe63b4dbb4e65820e2a053e02213acd4b71a026542321b07b5c9dbc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15e86d1b093c1984b4d6296466470f879edd31763d16b75130389046ca2cb4ec" + end + + uses_from_macos "curl" + uses_from_macos "libxml2" + + # Fix compilation with libxml2 2.11.0 or later. Patch is already applied upstream, remove on next release. + # https://github.com/dajobe/raptor/pull/58 + patch do + url "https://github.com/dajobe/raptor/commit/ac914399b9013c54572833d4818e6ce008136dc9.patch?full_index=1" + sha256 "d527fb9ad94f22acafcec9f3b626fb876b7fb1b722e6999cf46a158172bb0992" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"rapper", "--output", "ntriples", "https://planetrdf.com/guide/rss.rdf" + end +end diff --git a/Formula/r/rargs.rb b/Formula/r/rargs.rb new file mode 100644 index 0000000000000..7cd161f054dca --- /dev/null +++ b/Formula/r/rargs.rb @@ -0,0 +1,36 @@ +class Rargs < Formula + desc "Util like xargs + awk with pattern matching support" + homepage "https://github.com/lotabout/rargs" + url "https://github.com/lotabout/rargs/archive/refs/tags/v0.3.0.tar.gz" + sha256 "22d9aa4368a0f9d1fd82391439d3aabf4ddfb24ad674a680d6407c9e22969da3" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c1b481bcf7de6ad4a0abe5f77d33d8d2ab0f3bd6a6c36de248cf4fda715d89bc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07e463046394e64c0366a57c336e0a1e5cb5524f18f278e697d921ae923695c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c1b5594ef8bdb6f4bf04393a93e8081804b8918b79d8218bddcdb4b3b4b38e0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db39ea8042e8c099c423325bf28e62fddcd985312dc39f2f9f7f4cee307b23f6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "63a38fdbffaba3ef942b5f7d29c093cf995f4ea1c3bef35f5194ad0a32b9d306" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4513c4e3dd9b6623322227d52001579b10bfb651a645ce143bd3927903d94e1e" + sha256 cellar: :any_skip_relocation, sonoma: "325fe5d7ae7f301efe4d61142813d4659c982e5b70a90810b475d787118bbd16" + sha256 cellar: :any_skip_relocation, ventura: "a1030b51564a181c68ce37cc615ae774b53f72e24c9f0949a0fd5024f21996cc" + sha256 cellar: :any_skip_relocation, monterey: "ec12b996841e633e647a60d753e7a52b6d654f4d13755fd0ab509d7b75666c2c" + sha256 cellar: :any_skip_relocation, big_sur: "5b385f4ac72270f54bf30989cbe1a12dc5a2ad4c78f67445f386b774b30456c9" + sha256 cellar: :any_skip_relocation, catalina: "32591f33510d8ead309401f8da9c91690830919c717d84b913a7ec7dbd764624" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa2cf424c90cd39a337bff0a8694b10b91b432b2311aa2710cc9bbba62aec33e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5986e0f6b1f35cf2cb8b2113965c30895942c065dfe24d61a17c5497de6f9f02" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal "abc", pipe_output("#{bin}/rargs -d, echo {1}", "abc,def").chomp + end +end diff --git a/Formula/r/rarian.rb b/Formula/r/rarian.rb new file mode 100644 index 0000000000000..baa2a65105845 --- /dev/null +++ b/Formula/r/rarian.rb @@ -0,0 +1,48 @@ +class Rarian < Formula + desc "Documentation metadata library" + homepage "https://rarian.freedesktop.org/" + url "https://gitlab.freedesktop.org/rarian/rarian/-/releases/0.8.6/downloads/assets/rarian-0.8.6.tar.bz2" + sha256 "9d4f7873009d2e31b8b1ec762606b12bee5526e1fe75de48e9495382bfef2bea" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?rarian[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "9902862041d1a77fada33e8ebaabedf67f77b3bc8050ea988f78f8650c2c4ce3" + sha256 arm64_sequoia: "0c5d1dc2a38bdba34aee85a1704dd7fe8c4a5d8165888fd96d6844bbd9b6dfc9" + sha256 arm64_sonoma: "8050a6ad473152290f964a8a51eb661d41595c75f0e0286d01a38764c77283e5" + sha256 arm64_ventura: "385dbc09752299c2b0cfcb4da0bf18e6a799d891c3cc4939748bbd57e8cce98f" + sha256 sonoma: "ed569b70aaf6ecb11c8e6c77306b9514c27ca2013c3ec6583e735935ad593962" + sha256 ventura: "a6707c1941c3e76d099eb2d1a780bfd01ce45980f2446b81f16204d781e37bfa" + sha256 arm64_linux: "71527d1afc769fb36f87f00e635acdf53f7b74f74cbe3448c00108ca368ad18e" + sha256 x86_64_linux: "289b7f0d276337b070e632d435f8f85f96462c8982d2597cd90f552aac4d14cf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "tinyxml2" + + def install + # Regenerate `configure` to fix `-flat_namespace` bug. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + seriesid1 = shell_output(bin/"rarian-sk-gen-uuid").strip + sleep 5 + seriesid2 = shell_output(bin/"rarian-sk-gen-uuid").strip + assert_match(/^\h+(?:-\h+)+$/, seriesid1) + assert_match(/^\h+(?:-\h+)+$/, seriesid2) + refute_equal seriesid1, seriesid2 + end +end diff --git a/Formula/r/rasqal.rb b/Formula/r/rasqal.rb new file mode 100644 index 0000000000000..834b66ec9d88b --- /dev/null +++ b/Formula/r/rasqal.rb @@ -0,0 +1,44 @@ +class Rasqal < Formula + desc "RDF query library" + homepage "https://librdf.org/rasqal/" + url "https://download.librdf.org/source/rasqal-0.9.33.tar.gz" + sha256 "6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c" + license any_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later", "Apache-2.0"] + + livecheck do + url :homepage + regex(/href=.*?rasqal[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2ab423879b5e055a6e0895821440d428dd3d9c03becafe542a15b76072593e88" + sha256 cellar: :any, arm64_sequoia: "de698e3a83cb5fb348934c69dc81af3013e0cb60a4a8a94a53963554eaf8b2b7" + sha256 cellar: :any, arm64_sonoma: "f1a8b465f57865a1b0fa9ea84f1388f14f778eedb6cd4b4a651a7d2d0bed18af" + sha256 cellar: :any, arm64_ventura: "92f1cc01dd0623dedfb4b823b7b483e53158436fd1f19f31c743429cf63e9028" + sha256 cellar: :any, arm64_monterey: "df52f08c6ed78c573f5230851d5faf543be79ebdbf6d308f9911739c9c898f53" + sha256 cellar: :any, arm64_big_sur: "36d9d4a210921573c1cad68bc17bf0d0fced251de091855ce1b61cefc64a37c8" + sha256 cellar: :any, sonoma: "97c29aa6b456f813e036331227ea231fd361def3bb5c85feebbab6c0dc4dd3cd" + sha256 cellar: :any, ventura: "b3c70287723dc5ba946ee2ec128b443652a1ae3b30c82e1205547e3840a7b374" + sha256 cellar: :any, monterey: "8f0d23af21ab8a802e58d7f6b31234411ccb492884d9a87eba8205be79ce6899" + sha256 cellar: :any, big_sur: "14c26a4f0d108107281be78dbca4948b52a3ff157fb2dd33bdc123b2a467c492" + sha256 cellar: :any, catalina: "c815139d0154570fcab0e42ce7244682d13c47c4d4102b61260ffd1d0694d218" + sha256 cellar: :any_skip_relocation, arm64_linux: "d767881b0338446f5c5d2256e184167071d10cacc05bea13a78dc009ec891fd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2267d3f39fc7d088095d64bb6cf86f5fcad6c2a72fdd72dde8237cc910b123d1" + end + + depends_on "pkgconf" => :build + depends_on "raptor" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--with-html-dir=#{share}/doc", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/r/rasterio.rb b/Formula/r/rasterio.rb new file mode 100644 index 0000000000000..54c9d7ae48eb5 --- /dev/null +++ b/Formula/r/rasterio.rb @@ -0,0 +1,87 @@ +class Rasterio < Formula + include Language::Python::Virtualenv + + desc "Reads and writes geospatial raster datasets" + homepage "https://rasterio.readthedocs.io/en/stable/" + url "https://files.pythonhosted.org/packages/de/19/ab4326e419b543da623ce4191f68e3f36a4d9adc64f3df5c78f044d8d9ca/rasterio-1.4.3.tar.gz" + sha256 "201f05dbc7c4739dacb2c78a1cf4e09c0b7265b0a4d16ccbd1753ce4f2af350a" + license "BSD-3-Clause" + revision 1 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "8fc3368b85302efa77eba17e15d3a9b0596a2b004f2cf49881ce5544fb5d27cd" + sha256 cellar: :any, arm64_sequoia: "c2be2b0d16e15a752288c5d2e6b4708f83710d224a612c1003b948b976d66942" + sha256 cellar: :any, arm64_sonoma: "59dc1c5ca8d022755fdb04b4979b5aa6d8104df4c191fe4d707562e903bc64ab" + sha256 cellar: :any, sonoma: "c506c25016070e0d44451544f9f107f3df67c2cdda9c6751bce3fd731671383f" + sha256 cellar: :any_skip_relocation, arm64_linux: "752a43ce7bf5eb39296c359fe2c89beceb9d98953777d11e3dce3d162017da35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7ae02002f7b8ff4b9caebf3935d87c2719828b0a8bae3006facdf973a467338" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "certifi" => :no_linkage + depends_on "gdal" + depends_on "numpy" + depends_on "python@3.14" + + on_linux do + depends_on "patchelf" => :build + end + + conflicts_with "rio-terminal", because: "both install `rio` binaries" + conflicts_with cask: "rio", because: "both install `rio` binaries" + + pypi_packages exclude_packages: %w[certifi numpy] + + resource "affine" do + url "https://files.pythonhosted.org/packages/69/98/d2f0bb06385069e799fc7d2870d9e078cfa0fa396dc8a2b81227d0da08b9/affine-2.4.0.tar.gz" + sha256 "a24d818d6a836c131976d22f8c27b8d3ca32d0af64c1d8d29deb7bafa4da1eea" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "cligj" do + url "https://files.pythonhosted.org/packages/ea/0d/837dbd5d8430fd0f01ed72c4cfb2f548180f4c68c635df84ce87956cff32/cligj-0.7.2.tar.gz" + sha256 "a4bc13d623356b373c2c27c53dbd9c68cae5d526270bfa71f6c6fa69669c6b27" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"rio", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/rio --version") + + resource "test_file" do + url "https://github.com/rasterio/rasterio/raw/refs/heads/main/tests/data/red.tif" + sha256 "faff88a7935f2993ad2a24f572bb73c4d1fa4c5159377f4d9742583ae7c4c52b" + end + + testpath.install resource("test_file") + + output = shell_output("#{bin}/rio info red.tif") + assert_equal 16, JSON.parse(output)["blockxsize"] + end +end diff --git a/Formula/r/rasusa.rb b/Formula/r/rasusa.rb new file mode 100644 index 0000000000000..eb039b0e10046 --- /dev/null +++ b/Formula/r/rasusa.rb @@ -0,0 +1,34 @@ +class Rasusa < Formula + desc "Randomly subsample sequencing reads or alignments" + homepage "https://doi.org/10.21105/joss.03941" + url "https://github.com/mbhall88/rasusa/archive/refs/tags/2.2.2.tar.gz" + sha256 "f764d257fcdedcf08b8cb18bd4e93ffab8a788785e7161feb16ea1f2d4f30361" + license "MIT" + head "https://github.com/mbhall88/rasusa.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e8a82381026f260b8e9fbd877895e6b98014d0ee57dd02408bd361448e6f9f9a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d85950d24d6d39fdbe673927b499994c505bdf6bb1cec55a7f76bbe1e23ad46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d635745b1cde72db516a3603ebcc47ffb7f05c9019d81f044ff6cd4377c3905" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff0b1250b016282ba37d89b1799cbc24cb6e957a19f8ed2d4be90f4d9f439f45" + sha256 cellar: :any_skip_relocation, sonoma: "83e3c75c6178c30ca0c85a637eea94af66492574d2c77c311d470e0e9b870892" + sha256 cellar: :any_skip_relocation, ventura: "40ad9eecb61d0e9fcab53e2211b2e45c50050005eeeb755882988643b5fc77e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "17dee28a35d9afd606bbe9516aa79b4cf764a4a4c0501d3a46804c42dee7a448" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fa6cb47cd34bde6a923d4b454dde2be0d30b1bd02a8aa8b12040a413f963089" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" => :build # for libclang + + def install + system "cargo", "install", *std_cargo_args + pkgshare.install "tests/cases" + end + + test do + cp_r pkgshare/"cases/.", testpath + system bin/"rasusa", "reads", "-n", "5m", "-o", "out.fq", "file1.fq.gz" + assert_path_exists "out.fq" + end +end diff --git a/Formula/r/ratarmount.rb b/Formula/r/ratarmount.rb new file mode 100644 index 0000000000000..c36f30d4f43b8 --- /dev/null +++ b/Formula/r/ratarmount.rb @@ -0,0 +1,135 @@ +class Ratarmount < Formula + include Language::Python::Virtualenv + + desc "Mount and efficiently access archives as filesystems" + homepage "https://github.com/mxmlnkn/ratarmount" + url "https://files.pythonhosted.org/packages/e0/5c/ffddb34553d65cb9bf1a0baa59bb61fcf3beebab0e0a944347a501b2e258/ratarmount-1.2.0.tar.gz" + sha256 "acca4e5803c75f50f94d4c75ead5f44aa4c4661c9e77d50eb25d1876e6f4dec9" + license "MIT" + head "https://github.com/mxmlnkn/ratarmount.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "1c25823a0ca2e34e63314b6d3eff2ed37db1f673d1e1189baa19a6fcd976e1a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d09acf3fe19c919725361c484598ce6334a61f1ad1c5fdd9e2ca09d42e22615d" + end + + depends_on "libffi" + depends_on "libfuse" + depends_on "libgit2" + depends_on :linux + depends_on "python@3.14" + depends_on "zlib" + depends_on "zstd" + + resource "brotli" do + url "https://files.pythonhosted.org/packages/2f/c2/f9e977608bdf958650638c3f1e28f85a1b075f075ebbe77db8555463787b/Brotli-1.1.0.tar.gz" + sha256 "81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724" + end + + resource "fast-zip-decryption" do + url "https://files.pythonhosted.org/packages/47/c8/0fbde8b9c8314e4fde35f4841015a6143967d5fd4d141e84a6cf14e62178/fast_zip_decryption-3.0.0.tar.gz" + sha256 "5267e45aab72161b035ddc4dda4ffa2490b6da1ca752e4ff7eaedd4dd18aa85d" + end + + resource "indexed-gzip" do + url "https://files.pythonhosted.org/packages/d4/22/e9e94407bae83444adf598535b684d28cfbbcbe19f58eeba46f4db7bc0f3/indexed_gzip-1.10.1.tar.gz" + sha256 "3993fd72570b254045d2361d937a984350719f2205066f4e4c16435a1df361e3" + end + + resource "indexed-zstd" do + url "https://files.pythonhosted.org/packages/52/22/5b908d5e987043ce8390b0d9101c93fae0c0de0c9c8417c562976eeb8be6/indexed_zstd-1.6.1.tar.gz" + sha256 "8b74378f9461fceab175215b65e1c489864ddb34bd816058936a627f0cca3a8b" + end + + resource "inflate64" do + url "https://files.pythonhosted.org/packages/dd/8c/3a7ac7e1931bd1bca5f8e3687f7611083f6a79aae02b9cd6b7ce1fb4a8d0/inflate64-1.0.1.tar.gz" + sha256 "3b1c83c22651b5942b35829df526e89602e494192bf021e0d7d0b600e76c429d" + end + + resource "libarchive-c" do + url "https://files.pythonhosted.org/packages/26/23/e72434d5457c24113e0c22605cbf7dd806a2561294a335047f5aa8ddc1ca/libarchive_c-5.3.tar.gz" + sha256 "5ddb42f1a245c927e7686545da77159859d5d4c6d00163c59daff4df314dae82" + end + + resource "mfusepy" do + url "https://files.pythonhosted.org/packages/1c/94/c9d5dcba4a6a2b32ba23e22fd13ca08e6f5408420b2dfe42984af22277b6/mfusepy-3.0.0.tar.gz" + sha256 "eddade33e427bac9c455464cd0a7d12d63c033255ec6b1e0d6ada143a945c6f2" + end + + resource "multivolumefile" do + url "https://files.pythonhosted.org/packages/50/f0/a7786212b5a4cb9ba05ae84a2bbd11d1d0279523aea0424b6d981d652a14/multivolumefile-0.2.3.tar.gz" + sha256 "a0648d0aafbc96e59198d5c17e9acad7eb531abea51035d08ce8060dcad709d6" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "py7zr" do + url "https://files.pythonhosted.org/packages/97/62/d6f18967875aa60182198a0dd287d3a50d8aea1d844239ea00c016f7be88/py7zr-1.0.0.tar.gz" + sha256 "f6bfee81637c9032f6a9f0eb045a4bfc7a7ff4138becfc42d7cb89b54ffbfef1" + end + + resource "pybcj" do + url "https://files.pythonhosted.org/packages/ce/75/bbcf098abf68081fa27c09d642790daa99d9156132c8b0893e3fecd946ab/pybcj-1.0.6.tar.gz" + sha256 "70bbe2dc185993351955bfe8f61395038f96f5de92bb3a436acb01505781f8f2" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pyppmd" do + url "https://files.pythonhosted.org/packages/f6/d7/b3084ff1ac6451ef7dd93d4f7627eeb121a3bed4f8a573a81978a43ddb06/pyppmd-1.2.0.tar.gz" + sha256 "cc04af92f1d26831ec96963439dfb27c96467b5452b94436a6af696649a121fd" + end + + resource "python-xz" do + url "https://files.pythonhosted.org/packages/fe/2f/7ed0c25005eba0efb1cea3cdf4a325852d63167cc77f96b0a0534d19e712/python-xz-0.4.0.tar.gz" + sha256 "398746593b706fa9fac59b8c988eab8603e1fe2ba9195111c0b45227a3a77db3" + end + + resource "pyzstd" do + url "https://files.pythonhosted.org/packages/47/82/7bcafbf06ee83a66990ce5badbb8f4dc32184346bab20de7e468b1a2f6ec/pyzstd-0.18.0.tar.gz" + sha256 "81b6851ab1ca2e5f2c709e896a1362e3065a64f271f43db77fb7d5e4a78e9861" + end + + resource "rapidgzip" do + url "https://files.pythonhosted.org/packages/d6/50/b9bb77eaf841f2fbd8123d9677815d4ef53b53c4c189c5f789c78ef2d05e/rapidgzip-0.15.2.tar.gz" + sha256 "fa3f90f17ce185a99514df54b5316bdfa593e98f3eebbb12da301eb25d6dedcd" + end + + resource "rarfile" do + url "https://files.pythonhosted.org/packages/26/3f/3118a797444e7e30e784921c4bfafb6500fb288a0c84cb8c32ed15853c16/rarfile-4.2.tar.gz" + sha256 "8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef" + end + + resource "ratarmountcore" do + url "https://files.pythonhosted.org/packages/3d/41/7a01b717d2500594c207183347aad668e77b71b56a91c8bc8df277db745c/ratarmountcore-0.10.1.tar.gz" + sha256 "8eac900be94c30d3720d2e7a532113d3121036e7879575320183131354c59dcc" + end + + resource "texttable" do + url "https://files.pythonhosted.org/packages/1c/dc/0aff23d6036a4d3bf4f1d8c8204c5c79c4437e25e0ae94ffe4bbb55ee3c2/texttable-1.7.0.tar.gz" + sha256 "2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638" + end + + def install + venv = virtualenv_install_with_resources without: "pyzstd" + # We need to build separately to link to our `zstd`. + resource("pyzstd").stage do + system_zstd = "--config-settings=--build-option=--dynamic-link-zstd" + system venv.root/"bin/python", "-m", "pip", "install", system_zstd, + *std_pip_args(prefix: false, build_isolation: true), "." + end + end + + test do + assert_match "ratarmount #{version}", shell_output("#{bin}/ratarmount --version 2>&1") + tarball = test_fixtures("tarballs/testball2-0.1.tbz") + assert_match "FUSE mountpoint could not be created", shell_output("#{bin}/ratarmount #{tarball} 2>&1", 1) + end +end diff --git a/Formula/r/ratchet.rb b/Formula/r/ratchet.rb new file mode 100644 index 0000000000000..a4f084054aa76 --- /dev/null +++ b/Formula/r/ratchet.rb @@ -0,0 +1,42 @@ +class Ratchet < Formula + desc "Tool for securing CI/CD workflows with version pinning" + homepage "https://github.com/sethvargo/ratchet" + url "https://github.com/sethvargo/ratchet/archive/refs/tags/v0.11.4.tar.gz" + sha256 "0f1a540f388d2b8633b8203670d6ec8722d47af40055ce79cd1743a731823b2e" + license "Apache-2.0" + head "https://github.com/sethvargo/ratchet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "054e4744b0fac5342afb2e622206d80fdbb1b96e9b21cae1f7a0f8c133ba91f5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87e9d4f5ece669b81b693c4e13c8d0e66a879fcbc40f99337a0f0e5c3065716d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87e9d4f5ece669b81b693c4e13c8d0e66a879fcbc40f99337a0f0e5c3065716d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "87e9d4f5ece669b81b693c4e13c8d0e66a879fcbc40f99337a0f0e5c3065716d" + sha256 cellar: :any_skip_relocation, sonoma: "0afec9e6ec42dffa7e6c9d5c4119bd21e326f38eeb73dfe212dcbd4deca9f5a4" + sha256 cellar: :any_skip_relocation, ventura: "0afec9e6ec42dffa7e6c9d5c4119bd21e326f38eeb73dfe212dcbd4deca9f5a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "735721ebf63318e966738056cba7806b62a7b2029eb6c8c8c2b512ae6c090723" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d2b32f00ee26be2f4e60855b7f0a71d122df2b94c55509360052d15d7001c167" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s + -w + -X=github.com/sethvargo/ratchet/internal/version.version=#{version} + -X=github.com/sethvargo/ratchet/internal/version.commit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + pkgshare.install "testdata" + end + + test do + cp_r pkgshare/"testdata", testpath + output = shell_output("#{bin}/ratchet check testdata/github.yml 2>&1", 1) + assert_match "found 5 unpinned refs", output + + output = shell_output("#{bin}/ratchet -v 2>&1") + assert_match "ratchet #{version}", output + end +end diff --git a/Formula/r/ratfor.rb b/Formula/r/ratfor.rb new file mode 100644 index 0000000000000..4c00761a79b48 --- /dev/null +++ b/Formula/r/ratfor.rb @@ -0,0 +1,65 @@ +class Ratfor < Formula + desc "Rational Fortran" + homepage "http://www.dgate.org/ratfor/" + url "http://www.dgate.org/ratfor/tars/ratfor-1.07.tar.gz" + sha256 "943b5de328d7b890cb444b17fb7dab656ffaa0d388c7d40b649d34b736b137ff" + license :public_domain + + livecheck do + url :homepage + regex(/href=.*?ratfor[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "033c1daa599d6e77dd8072fd53541f5772114d152a028599bd64cc8212217bf7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aed7f3e144962eab6d49fdae060b421362c76899d45716d8e6099488e853f6ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b680bdc4a42beaa254be409281e3ac948edde6feef824945895b44fc5d0ec827" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f96ec748ab19e92ad157a25a6b8a45683d236a090ba19932ca7d653a80c39747" + sha256 cellar: :any_skip_relocation, sonoma: "5b700039e4301b9b7e6ae3c9d4e377f0486673c450e63badb8d7c8fd953e5257" + sha256 cellar: :any_skip_relocation, ventura: "1bb410b5c28cb156882880dd1fd0c561c303017220a47d5e22183d608419ba19" + sha256 cellar: :any_skip_relocation, arm64_linux: "1015c4ffcb3dc28fb45c5fc2700334b15fa67e1c6dbe133d172401b5d806ea42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8f68d0f668b609b9f5aaca3b14983db4f4c3b149eb6d3506a09cabf038b0446" + end + + depends_on "gcc" # for gfortran + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.r").write <<~EOS + integer x,y + x=1; y=2 + if(x == y) + write(6,600) + else if(x > y) + write(6,601) + else + write(6,602) + x=1 + while(x < 10){ + if(y != 2) break + if(y != 2) next + write(6,603)x + x=x+1 + } + repeat + x=x-1 + until(x == 0) + for(x=0; x < 10; x=x+1) + write(6,604)x + 600 format('Wrong, x != y') + 601 format('Also wrong, x < y') + 602 format('Ok!') + 603 format('x = ',i2) + 604 format('x = ',i2) + end + EOS + + system bin/"ratfor", "-o", "test.f", testpath/"test.r" + system "gfortran", "test.f", "-o", "test" + system "./test" + end +end diff --git a/Formula/r/rathole.rb b/Formula/r/rathole.rb new file mode 100644 index 0000000000000..4cd8e0918d4c5 --- /dev/null +++ b/Formula/r/rathole.rb @@ -0,0 +1,72 @@ +class Rathole < Formula + desc "Reverse proxy for NAT traversal" + homepage "https://github.com/rathole-org/rathole" + url "https://github.com/rathole-org/rathole/archive/refs/tags/v0.5.0.tar.gz" + sha256 "c8698dc507c4c2f7e0032be24cac42dd6656ac1c52269875d17957001aa2de41" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3629eb8ca9900924fa60ca4732cb944f93362ac86259944539ca10beeffb867d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d668cd71d085b210e33c711837fc58c97fcfebf3417f0c3c7d722df711d45ae9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcb8141198492a1cafa8833e4b5b1f872a292b0b4a583de7f71aeeb6f3376b86" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e9dff11d616e36a7e3fb42bf83f8a0ba908382562fd5ab26abd4ab08a99f6c0b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bff2c4cd4cbfd16cd46672656d6388613c4b2481d29c3774e7468a218378488e" + sha256 cellar: :any_skip_relocation, sonoma: "616f267223b7bc2142ec93df13af511a672fa8dd85ae1e114eb036a901a8623e" + sha256 cellar: :any_skip_relocation, ventura: "da508621aa73060eee88b3b1771c80aae6d593210575e15b4ed101b6dd60bd73" + sha256 cellar: :any_skip_relocation, monterey: "db9a05658116a968398b3f184a1e6bd63dc90ec3f7b56487d79d3210b6006846" + sha256 cellar: :any_skip_relocation, arm64_linux: "104d1709ddbd8886b31e576ab1dcdc27b6c3a4705d203051da98257ba0fee777" + sha256 cellar: :any_skip_relocation, x86_64_linux: "418e67c95c4f95329a0564f4fe78c4c8ff23bda1be98eed056a9ef45fc558b39" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + # rust 1.80 build patch, upstream bug report, https://github.com/rathole-org/rathole/issues/380 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/rathole/rust-1.80.patch" + sha256 "deca6178df16517f752c309f6290678cbddb24cd3839057f746d0817405965f9" + end + + def install + system "cargo", "install", *std_cargo_args + end + + service do + run [opt_bin/"rathole", "#{etc}/rathole/rathole.toml"] + keep_alive true + log_path var/"log/rathole.log" + error_log_path var/"log/rathole.log" + end + + test do + bind_port = free_port + service_port = free_port + + (testpath/"rathole.toml").write <<~TOML + [server] + bind_addr = "127.0.0.1:#{bind_port}"#{" "} + default_token = "1234"#{" "} + + [server.services.foo] + bind_addr = "127.0.0.1:#{service_port}" + TOML + + read, write = IO.pipe + fork do + exec bin/"rathole", "-s", "#{testpath}/rathole.toml", out: write + end + sleep 5 + + output = read.gets + assert_match(/Listening at 127.0.0.1:#{bind_port}/i, output) + + assert_match(/Build Version:\s*#{version}/, shell_output("#{bin}/rathole --version")) + end +end diff --git a/Formula/r/ratify.rb b/Formula/r/ratify.rb new file mode 100644 index 0000000000000..c44e61e543308 --- /dev/null +++ b/Formula/r/ratify.rb @@ -0,0 +1,67 @@ +class Ratify < Formula + desc "Artifact Ratification Framework" + homepage "https://ratify.dev" + url "https://github.com/notaryproject/ratify/archive/refs/tags/v1.4.0.tar.gz" + sha256 "36b18d2070d76a6e85aa86bf94e4e68350c6c277985d6bc8e87a28c78ebb08b8" + license "Apache-2.0" + head "https://github.com/notaryproject/ratify.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a1cda0ae27107972d8a38ab2920ea3a8aaeada5389a9025c4499bc761a5bab8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "76678d359f1e6ab18b91b1703a44b6171e3a03d200a41db6a7d3568a9727b334" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76678d359f1e6ab18b91b1703a44b6171e3a03d200a41db6a7d3568a9727b334" + sha256 cellar: :any_skip_relocation, arm64_ventura: "76678d359f1e6ab18b91b1703a44b6171e3a03d200a41db6a7d3568a9727b334" + sha256 cellar: :any_skip_relocation, sonoma: "4f8913f574364f7b1f4269e539bfe4b1ff128bf4ef3266c2c46c5121fc9132e9" + sha256 cellar: :any_skip_relocation, ventura: "d446ade57aad5022820d43cff3e52206a2521189ea30fe1f39ba198d4789977d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec3bab691e984cc0fc73aae4bd8143a39affc203ef6baa5ecdb242d943465235" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e76330b293fc305772b44b705cc2d7700100276bb27981382984fa474824c851" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/ratify-project/ratify/internal/version.GitTag=#{version} + -X github.com/ratify-project/ratify/internal/version.GitCommitHash=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/ratify" + + generate_completions_from_executable(bin/"ratify", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ratify version") + + test_config = testpath/"ratify.json" + test_config.write <<~JSON + { + "store": { + "stores": [ + { + "name": "example-artifact", + "type": "oras", + "settings": {} + } + ] + }, + "policy": { + "policies": [] + }, + "verifier": { + "verifiers": [] + }, + "executor": {}, + "logger": { + "level": "info" + } + } + JSON + + example_subject = "example.com/artifact:latest" + output = shell_output("#{bin}/ratify verify --config #{test_config} --subject #{example_subject} 2>&1", 1) + assert_match "referrer store config should have at least one store", output + end +end diff --git a/Formula/r/rats.rb b/Formula/r/rats.rb new file mode 100644 index 0000000000000..10cfd0c68c8db --- /dev/null +++ b/Formula/r/rats.rb @@ -0,0 +1,38 @@ +class Rats < Formula + desc "Rough auditing tool for security" + homepage "https://security.web.cern.ch/security/recommendations/en/codetools/rats.shtml" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rough-auditing-tool-for-security/rats-2.4.tgz" + sha256 "2163ad111070542d941c23b98d3da231f13cf065f50f2e4ca40673996570776a" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "b310ca257b3697a46004e64f9c06bce6ae79bb75c86d832bc74c28cbd1f99a7d" + sha256 arm64_sequoia: "0957ff0fe765a50f6ec8a12edc3119741fe39133b438ee114ace6d05288fb06c" + sha256 arm64_sonoma: "67a98f4d5385f43dadf88b69c4ea04a4b42a318f9be2820d5c52cb859b69c6e4" + sha256 arm64_ventura: "9a47934dabb7a37c3d8a2a0a68a2e25961bfd8fa56be202d4bc604c4850d1cbf" + sha256 arm64_monterey: "a210be283710fa3c506e9fae4dd915bcd737904272df4c985c5f54d666b3a745" + sha256 arm64_big_sur: "bfe1ae23fc4335ffdc160f80613e519c810b259b48ddef7de9d0d227625a3407" + sha256 sonoma: "56dea2a14cfbf6893fae49f0913ff57b0468f0a1b8a2bce90fe4aa9ef519b9ab" + sha256 ventura: "1599be8be509e96e1310209d4334a0f09ecc2fad0f5f99920af18a4459a67e66" + sha256 monterey: "5798bdf316715050aee914343db4155c7ef89fa274908b85def50a84729c0845" + sha256 big_sur: "d71b401eb933729bd6d4b8f6cfdae7bbeb7f81de55b91f8d0aadcbb619c1fcce" + sha256 catalina: "bf5da3e9088abba09350b4a812691a3f76b00bfce1c74947fb7c016d88eb89f9" + sha256 arm64_linux: "9b7cfe5e23808f04987f9f412cfa58d3b86a9223de5801ad9f47415f0c8c783f" + sha256 x86_64_linux: "225ac8dd692f21f8f13e072dba7bc2904cb11e08273d9917bde0ef1f42133b03" + end + + uses_from_macos "expat" + + def install + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--infodir=#{info}" + system "make", "install" + end + + test do + system bin/"rats" + end +end diff --git a/Formula/r/rattler-build.rb b/Formula/r/rattler-build.rb new file mode 100644 index 0000000000000..79d06315909a7 --- /dev/null +++ b/Formula/r/rattler-build.rb @@ -0,0 +1,68 @@ +class RattlerBuild < Formula + desc "Universal conda package builder" + homepage "https://rattler.build" + url "https://github.com/prefix-dev/rattler-build/archive/refs/tags/v0.49.0.tar.gz" + sha256 "a766e8c198e99affca0b352cdba81302d9d729ec17ec1cc93756d565006e4276" + license "BSD-3-Clause" + head "https://github.com/prefix-dev/rattler-build.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ec40205f7fc174260e52d77eebae043c08f72a09c9cbbd8a2d3183a26614079b" + sha256 cellar: :any, arm64_sequoia: "99ac0493c9246445449c99e449d47ddd865439b134ab1c0f118d3851137f72e6" + sha256 cellar: :any, arm64_sonoma: "9458eb4afde213ab6db98dfee9f28c0394fe10e4231f689b9e3c44a93dfe90cd" + sha256 cellar: :any, sonoma: "7b117ed218c1320f2c8628464027c23d85dc97c32bac98d156342d34e487f691" + sha256 cellar: :any_skip_relocation, arm64_linux: "9eebce848f12894a3f43b73bb29d8a6661043fcae331c82d11ec4fe28fdd0fc7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7060e33ab03659a6032fe631852665f47f785046d62b0c6a529dee0cf94b942b" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "cargo", "install", "--features", "tui", *std_cargo_args + + generate_completions_from_executable(bin/"rattler-build", "completion", "--shell") + end + + test do + (testpath/"recipe"/"recipe.yaml").write <<~YAML + package: + name: test-package + version: '0.1.0' + + build: + noarch: generic + string: buildstring + script: + - mkdir -p "$PREFIX/bin" + - echo "echo Hello World!" >> "$PREFIX/bin/hello" + - chmod +x "$PREFIX/bin/hello" + + requirements: + run: + - python + + tests: + - script: + - test -f "$PREFIX/bin/hello" + - hello | grep "Hello World!" + YAML + system bin/"rattler-build", "build", "--recipe", "recipe/recipe.yaml" + assert_path_exists testpath/"output/noarch/test-package-0.1.0-buildstring.conda" + + assert_match version.to_s, shell_output("#{bin}/rattler-build --version") + end +end diff --git a/Formula/r/rattler-index.rb b/Formula/r/rattler-index.rb new file mode 100644 index 0000000000000..6a5f0445f81d9 --- /dev/null +++ b/Formula/r/rattler-index.rb @@ -0,0 +1,41 @@ +class RattlerIndex < Formula + desc "Index conda channels using rattler" + homepage "https://github.com/conda/rattler" + url "https://github.com/conda/rattler/archive/refs/tags/rattler_index-v0.27.0.tar.gz" + sha256 "a03744c2e8098d8a0ae9e6ae1636e4f27d7aba24a652b09e494a41eb82c64873" + license "BSD-3-Clause" + head "https://github.com/conda/rattler.git", branch: "main" + + livecheck do + url :stable + regex(/^rattler_index-v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "86057f2e62434f0fc54207cc1f2c187059a55476b97d2b0d7db4e328d77bb3aa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5a1a1abfbd81fdde6ec5fd728092cc12ddb33f06e6015b77ae06c39ace03de90" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f2617c6a3a8a5eca6af5603c8610c133f79c7ece1500a1fecee9017ad94d7b0" + sha256 cellar: :any_skip_relocation, sonoma: "90f3d6cb672be92eb4397b766b1694f9ea62a686b2696ff2bcfea4bdddbb7ac3" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b0efee713b683148c985efb4b9f9ab1d315a2146732faca353d311cca0e25b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70471878702707d2bc53e0ccc44ab3244a8afe0112a94f9ce356c3e883af1c24" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", "--features", "native-tls,rattler_config", "--no-default-features", + *std_cargo_args(path: "crates/rattler_index") + end + + test do + assert_equal "rattler-index #{version}", shell_output("#{bin}/rattler-index --version").strip + + system bin/"rattler-index", "fs", "." + assert_path_exists testpath/"noarch/repodata.json" + end +end diff --git a/Formula/r/rav1e.rb b/Formula/r/rav1e.rb new file mode 100644 index 0000000000000..074ae64742b41 --- /dev/null +++ b/Formula/r/rav1e.rb @@ -0,0 +1,46 @@ +class Rav1e < Formula + desc "Fastest and safest AV1 video encoder" + homepage "https://github.com/xiph/rav1e" + url "https://github.com/xiph/rav1e/archive/refs/tags/v0.8.1.tar.gz" + sha256 "06d1523955fb6ed9cf9992eace772121067cca7e8926988a1ee16492febbe01e" + license "BSD-2-Clause" + head "https://github.com/xiph/rav1e.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "66ef57034787b9e1328abec79bb85ca9fd65c5f4a2bb800be9b5a58ecab849a5" + sha256 cellar: :any, arm64_sequoia: "61118a13d9f434197f16808350136c7aafc898526937e3ce2917566e77c2672b" + sha256 cellar: :any, arm64_sonoma: "d7f57daaf463e8a261e3f2eee9190c2580b3f29c2ab4ea1b6fbab085bc6c167c" + sha256 cellar: :any, arm64_ventura: "9b2e4642fa874e1963150309940c638affaac512d2b02594f27b320d89244465" + sha256 cellar: :any, sonoma: "9257e1d8cfbeceb7c20c8605281fb69781e6897b7e226a7b93d60c0ea57ad508" + sha256 cellar: :any, ventura: "5903af836d3c0b3101af86df8463a51616f9a891a9b382838249408f9e7eea3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "3876806872747aa7ef41b4091ea601992793169ab3c6eb74fd4b1af05c4b46ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1ba1d0927e415f2b24fda342ac7f3ef25f99a060e6c68bd929d147da8ea6a92" + end + + depends_on "cargo-c" => :build + depends_on "rust" => :build + + on_intel do + depends_on "nasm" => :build + end + + def install + system "cargo", "install", *std_cargo_args + system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--release", "--prefix", prefix, "--libdir", lib + end + + test do + resource "homebrew-bus_qcif_7.5fps.y4m" do + url "https://media.xiph.org/video/derf/y4m/bus_qcif_7.5fps.y4m" + sha256 "1f5bfcce0c881567ea31c1eb9ecb1da9f9583fdb7d6bb1c80a8c9acfc6b66f6b" + end + + testpath.install resource("homebrew-bus_qcif_7.5fps.y4m") + system bin/"rav1e", "--tile-rows=2", "bus_qcif_7.5fps.y4m", "--output=bus_qcif_15fps.ivf" + end +end diff --git a/Formula/r/raven.rb b/Formula/r/raven.rb new file mode 100644 index 0000000000000..7c1c7c1412d65 --- /dev/null +++ b/Formula/r/raven.rb @@ -0,0 +1,146 @@ +class Raven < Formula + include Language::Python::Virtualenv + + desc "Risk Analysis and Vulnerability Enumeration for CI/CD" + homepage "https://github.com/CycodeLabs/raven" + url "https://files.pythonhosted.org/packages/d8/b6/4bc5aecae28382720fca4e9492a623e3d821d96e8f4d06e4335c77779ebd/raven_cycode-1.0.9.tar.gz" + sha256 "a7cb02102b43dbaad3b50970f92090b86a3b3bb65aae9976a3887f4c8c935238" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "d3e905633eb1f0d3d7e5fc048e8fe2fa6a5790243c0181db8e2c190705fe8a80" + sha256 cellar: :any, arm64_sequoia: "01217a819e571872f899fa5d9c6ceb79618c31e6a837936457c241a1ea555b2b" + sha256 cellar: :any, arm64_sonoma: "7aa0a40d4446df2aad0c7d8db6e29701607ab32335e4a70101b77d9c1ea99ce2" + sha256 cellar: :any, sonoma: "ce38a5aedcd289f909feea97abe3d5b0c7e1226832d7035561aafac30ba8b688" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b2a4dc459ba3a8920aabae6e35d660a72c5db180028a16234e9f9cada84be28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bfe3e68919eef6de9f572601c59174431425ba393bc5a9b7b8a84a59a757123" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + # `pyyaml` is manually updated to support Python 3.14 + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz" + sha256 "f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/21/ed/f86a79a07470cb07819390452f178b3bef1d375f2ec021ecfc709fc7cf07/idna-3.7.tar.gz" + sha256 "028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz" + sha256 "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3" + end + + resource "interchange" do + url "https://files.pythonhosted.org/packages/ca/10/055c9f411105acd277465a356f4d8c1c2a8d266b87ce68148c47ad54eebf/interchange-2021.0.4.tar.gz" + sha256 "6791d1b34621e990035fe75d808523172340d80ade1b50412226820184199550" + end + + resource "loguru" do + url "https://files.pythonhosted.org/packages/9e/30/d87a423766b24db416a46e9335b9602b054a72b96a88a241f2b09b560fa8/loguru-0.7.2.tar.gz" + sha256 "e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac" + end + + resource "monotonic" do + url "https://files.pythonhosted.org/packages/ea/ca/8e91948b782ddfbd194f323e7e7d9ba12e5877addf04fb2bf8fca38e86ac/monotonic-1.6.tar.gz" + sha256 "3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/ee/b5/b43a27ac7472e1818c4bafd44430e69605baefe1f34440593e0332ec8b4d/packaging-24.0.tar.gz" + sha256 "eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9" + end + + resource "pansi" do + url "https://files.pythonhosted.org/packages/22/0d/2c19187e820cbad87e73619fe2450d2698eb003eb0a0137551bd687a9676/pansi-2020.7.3.tar.gz" + sha256 "bd182d504528f870601acb0282aded411ad00a0148427b0e53a12162f4e74dcf" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/54/c6/43f9d44d92aed815e781ca25ba8c174257e27253a94630d21be8725a2b59/pluggy-1.4.0.tar.gz" + sha256 "8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be" + end + + resource "py2neo" do + url "https://files.pythonhosted.org/packages/96/bb/fd298b06181fc4aace4838d91e6b511184ad1f3e5fe9cffee7878c66f14a/py2neo-2021.2.4.tar.gz" + sha256 "4b2737fcd9fd8d82b57e856de4eda005281c9cf0741c989e5252678f0503f77e" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/55/59/8bccf4157baf25e4aa5a0bb7fa3ba8600907de105ebc22b0c78cfbf6f565/pygments-2.17.2.tar.gz" + sha256 "da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/30/b7/7d44bbc04c531dcc753056920e0988032e5871ac674b5a84cb979de6e7af/pytest-8.1.1.tar.gz" + sha256 "ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/69/4f/7bf883f12ad496ecc9514cd9e267b29a68b3e9629661a2bbc24f80eff168/pytz-2023.3.post1.tar.gz" + sha256 "7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "redis" do + url "https://files.pythonhosted.org/packages/eb/fc/8e822fd1e0a023c5ff80ca8c469b1d854c905ebb526ba38a90e7487c9897/redis-5.0.3.tar.gz" + sha256 "4973bae7444c0fbed64a06b87446f79361cb7e4ec1538c022d696ed7a5015580" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/9d/be/10918a2eac4ae9f02f6cfe6414b7a155ccd8f7f9d4380d62fd5b955065c3/requests-2.31.0.tar.gz" + sha256 "942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "slack-sdk" do + url "https://files.pythonhosted.org/packages/f8/77/e567bfc892a352ea2c6bc7e29830bed763b4a14681e7fefaf82974a9f775/slack_sdk-3.27.1.tar.gz" + sha256 "85d86b34d807c26c8bb33c1569ec0985876f06ae4a2692afba765b7a5490d28c" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/ea/85/3ce0f9f7d3f596e7ea57f4e5ce8c18cb44e4a9daa58ddb46ee0d13d6bff8/tqdm-4.66.2.tar.gz" + sha256 "6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/7a/50/7fd50a27caa0652cd4caf224aa87741ea41d3265ad13f010886167cfcc79/urllib3-2.2.1.tar.gz" + sha256 "d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + end + + def install + virtualenv_install_with_resources + end + + test do + mkdir "brewtest" do + output = shell_output("#{bin}/raven report 2>&1", 1) + assert_match "[Errno 2] No such file or directory: 'library'", output + + output = shell_output("#{bin}/raven report slack 2>&1", 2) + assert_match "the following arguments are required: --slack-token/-st, --channel-id/-ci", output + end + end +end diff --git a/Formula/r/rawdog.rb b/Formula/r/rawdog.rb new file mode 100644 index 0000000000000..08457e6c9f4ca --- /dev/null +++ b/Formula/r/rawdog.rb @@ -0,0 +1,270 @@ +class Rawdog < Formula + include Language::Python::Virtualenv + + desc "CLI tool to generate and run code with llms" + homepage "https://mentat.ai" + url "https://files.pythonhosted.org/packages/3c/ab/eaae3e0f2fac4a717d632990795fd6a560efaf9e54a1741e842234dec1cb/rawdog_ai-0.1.6.tar.gz" + sha256 "1fc37d0e3336e87568ae9ee5dde5e7c68c1af652efd0956ee0c62281ddf14b41" + license "Apache-2.0" + revision 15 + head "https://github.com/AbanteAI/rawdog.git", branch: "main" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "167eda95176cf5ccf3af330058bd53786a37f8c0d8b81638ac8a85f271851d62" + sha256 cellar: :any, arm64_sequoia: "4a2640caa2eb1e7ba0cc3d16016dcdda221c56cb346fcd6ec043a72c725126ac" + sha256 cellar: :any, arm64_sonoma: "c08d2bd0e0e41faf4a149b4ba56d14877f73b64a7bf503cf4964db1585ced12f" + sha256 cellar: :any, sonoma: "766b67a8aa372c99428558512edd34c185093c02296dce86fd398acb53e04d82" + sha256 cellar: :any_skip_relocation, arm64_linux: "227807903b568161f4d45f4f4ec3de4aed1667287f6be40c25d1a1ec109838f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a77c85f04c017cbe796fec0027b1fe0c1164c2dee3b530255ff6fd485ba9433" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build # for jitter + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "pydantic-core", "rpds-py"] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/ba/fa/3ae643cd525cf6844d3dc810481e5748107368eb49563c15a5fb9f680750/aiohttp-3.13.1.tar.gz" + sha256 "4b7ee9c355015813a6aa085170b96ec22315dabc3d866fd77d147927000e9464" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "fastuuid" do + url "https://files.pythonhosted.org/packages/c3/7d/d9daedf0f2ebcacd20d599928f8913e9d2aea1d56d2d355a93bfa2b611d7/fastuuid-0.14.0.tar.gz" + sha256 "178947fc2f995b38497a74172adee64fdeb8b7ec18f2a5934d037641ba265d26" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/de/e0/bab50af11c2d75c9c4a2a26a5254573c0bd97cea152254401510950486fa/fsspec-2025.9.0.tar.gz" + sha256 "19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hf-xet" do + url "https://files.pythonhosted.org/packages/5e/6e/0f11bacf08a67f7fb5ee09740f2ca54163863b07b70d579356e9222ce5d8/hf_xet-1.2.0.tar.gz" + sha256 "a8c27070ca547293b6890c4bf389f713f80e8c478631432962bb7f4bc0bd7d7f" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "huggingface-hub" do + url "https://files.pythonhosted.org/packages/98/63/4910c5fa9128fdadf6a9c5ac138e8b1b6cee4ca44bf7915bbfbce4e355ee/huggingface_hub-0.36.0.tar.gz" + sha256 "47b3f0e2539c39bf5cde015d63b72ec49baff67b6931c3d97f3f84532e2b8d25" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/a3/68/0357982493a7b20925aece061f7fb7a2678e3b232f8d73a6edb7e5304443/jiter-0.11.1.tar.gz" + sha256 "849dcfc76481c0ea0099391235b7ca97d7279e0fa4c86005457ac7c88e8b76dc" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "litellm" do + url "https://files.pythonhosted.org/packages/16/d5/339b60011b49d7a7976ca9dd33b20842de59e7ec202d17a1d6736ef1e0a9/litellm-1.78.7.tar.gz" + sha256 "6b10f5c7dc217bde3481fa4f70b5c37edbfa617bec7149276833d311f76a6783" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/c4/44/303deb97be7c1c9b53118b52825cbd1557aeeff510f3a52566b1fa66f6a2/openai-2.6.1.tar.gz" + sha256 "27ae704d190615fca0c0fc2b796a38f8b5879645a3a52c9c453b23f97141bb49" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz" + sha256 "a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tiktoken" do + url "https://files.pythonhosted.org/packages/7d/ab/4d017d0f76ec3171d469d80fc03dfbb4e48a4bcaddaa831b31d526f05edc/tiktoken-0.12.0.tar.gz" + sha256 "b18ba7ee2b093863978fcb14f74b3707cdc8d4d4d3836853ce7ec60772139931" + end + + resource "tokenizers" do + url "https://files.pythonhosted.org/packages/1c/46/fb6854cec3278fbfa4a75b50232c77622bc517ac886156e6afbfa4d8fc6e/tokenizers-0.22.1.tar.gz" + sha256 "61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + venv = virtualenv_install_with_resources(without: "hf-xet") + + resource("hf-xet").stage do + if ENV.effective_arch == :armv8 + # Disable sha2-asm which requires a minimum of -march=armv8-a+crypto + inreplace "data/Cargo.toml", + 'sha2 = { workspace = true, features = ["asm"] }', + "sha2 = { workspace = true }" + end + venv.pip_install Pathname.pwd + end + end + + test do + output = shell_output("#{bin}/rawdog test prompt 2>&1", 1) + assert_match "The api_key client option must be set", output + end +end diff --git a/Formula/r/raxml-ng.rb b/Formula/r/raxml-ng.rb new file mode 100644 index 0000000000000..db4bf8514c33c --- /dev/null +++ b/Formula/r/raxml-ng.rb @@ -0,0 +1,61 @@ +class RaxmlNg < Formula + desc "RAxML Next Generation: faster, easier-to-use and more flexible" + homepage "https://cme.h-its.org/exelixis/web/software/raxml/" + url "https://github.com/amkozlov/raxml-ng.git", + tag: "1.2.2", + revision: "805318cef87bd5d67064efa299b5d1cf948367fd" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c74c9931e040c4511002c51f6828473eb44842300ce6f4aab7052279d156b0ca" + sha256 cellar: :any, arm64_sequoia: "4f7e500c5a3615a4c814bf38bd8720a745c4155827910f4cd5638113e129d2c6" + sha256 cellar: :any, arm64_sonoma: "bd6bd94ccee20b21d5c9146a8bc4a484c261a11586224ec4303a2d269590b32f" + sha256 cellar: :any, arm64_ventura: "6fcf4ec42def10fd485108f16f3d9c03f59f06ff72b663e469d7985332b99222" + sha256 cellar: :any, arm64_monterey: "a2e435fabdb95292270d576aa6fd6dceda14ad722cd12ccb916371b8aa01e0a4" + sha256 cellar: :any, sonoma: "63100f2fe0b660b831fcb16cc08b299bf62a978d4c97949d87d5e09716b4670d" + sha256 cellar: :any, ventura: "456c5f39dacdc8ce957c17d67f53410977c8217bc98ca45ba97c1df187442aa9" + sha256 cellar: :any, monterey: "7bbd86f8a89f92287d21cab56e055333a5c5ec90e955b76f78d3c8a36cb9dda4" + sha256 cellar: :any_skip_relocation, arm64_linux: "9aa9f1417b9bf4ed64b5e690d2a6901d5c181cc9fd8e641589301b8118d2ab1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53e258a6db4cb2d05aa6013741ac3c2345a9d92da103a23d34dda647b8e8d532" + end + + depends_on "bison" => :build # fix syntax error with `parse_utree.y` + depends_on "cmake" => :build + depends_on "gmp" + + uses_from_macos "flex" => :build + + on_linux do + depends_on "open-mpi" + end + + def install + args = %w[-DUSE_GMP=ON] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Upstream doesn't support building MPI variant on macOS. + # The build ignores USE_MPI=ON and forces ENABLE_MPI=OFF. + # This causes necessary flags like -D_RAXML_MPI to not get set. + return if OS.mac? + + args << "-DUSE_MPI=ON" + system "cmake", "-S", ".", "-B", "build_mpi", *args, *std_cmake_args + system "cmake", "--build", "build_mpi" + system "cmake", "--install", "build_mpi" + end + + test do + resource "homebrew-example" do + url "https://cme.h-its.org/exelixis/resource/download/hands-on/dna.phy" + sha256 "c2adc42823313831b97af76b3b1503b84573f10d9d0d563be5815cde0effe0c2" + end + + testpath.install resource("homebrew-example") + system bin/"raxml-ng", "--msa", "dna.phy", "--start", "--model", "GTR" + end +end diff --git a/Formula/r/raylib.rb b/Formula/r/raylib.rb new file mode 100644 index 0000000000000..b385b0f6a8a44 --- /dev/null +++ b/Formula/r/raylib.rb @@ -0,0 +1,78 @@ +class Raylib < Formula + desc "Simple and easy-to-use library to learn videogames programming" + homepage "https://www.raylib.com/" + url "https://github.com/raysan5/raylib/archive/refs/tags/5.5.tar.gz" + sha256 "aea98ecf5bc5c5e0b789a76de0083a21a70457050ea4cc2aec7566935f5e258e" + license "Zlib" + head "https://github.com/raysan5/raylib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5df67caba9995df0a73dd5759e3fc3236c5ae2cadd6f2bba89e9447ca922a2c" + sha256 cellar: :any, arm64_sequoia: "b2040d26e8f4ff8b35da7e9a6f68186fab5497979d67475314900de05b90f031" + sha256 cellar: :any, arm64_sonoma: "16b1195332aee21f29004fce9e281fc1a97a8ac678265f15a4735ee9a9e1f554" + sha256 cellar: :any, arm64_ventura: "b7dd5d1afd3c21145c7ca8e850f9acffb773a86ab05fa8b271d70fdc877874c0" + sha256 cellar: :any, sonoma: "27792cb3dacfecbebac27d0f131352dd83a8cfef788dc0c22eb981805a65bfda" + sha256 cellar: :any, ventura: "3e2398dfe727607adcb84c4f45144570235cdb97dba82eb0e01df188bf7776d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a59c2b0c8f2860a6373111e355eccca9170fb2aba77f9acd2aa5589c5de5b62f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "401315b8abc27b4351ec647fc8add4bdd8213012fe6d3200f1981afd357f7d7e" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DMACOS_FATLIB=OFF", + "-DBUILD_EXAMPLES=OFF", + "-DBUILD_GAMES=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "build-static", + "-DBUILD_SHARED_LIBS=OFF", + "-DMACOS_FATLIB=OFF", + "-DBUILD_EXAMPLES=OFF", + "-DBUILD_GAMES=OFF", + *std_cmake_args + system "cmake", "--build", "build-static" + lib.install "build-static/raylib/libraylib.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main(void) + { + int num = GetRandomValue(42, 1337); + return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE; + } + C + flags = if OS.mac? + %w[ + -framework Cocoa + -framework IOKit + -framework OpenGL + ] + else + %w[ + -lm + -ldl + -lGL + -lpthread + ] + end + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lraylib", *flags + system "./test" + end +end diff --git a/Formula/r/rbenv-aliases.rb b/Formula/r/rbenv-aliases.rb new file mode 100644 index 0000000000000..0ae94a1925f93 --- /dev/null +++ b/Formula/r/rbenv-aliases.rb @@ -0,0 +1,26 @@ +class RbenvAliases < Formula + desc "Make aliases for Ruby versions" + homepage "https://github.com/tpope/rbenv-aliases" + url "https://github.com/tpope/rbenv-aliases/archive/refs/tags/v1.1.0.tar.gz" + sha256 "12e89bc4499e85d8babac2b02bc8b66ceb0aa3f8047b26728a3eca8a6030273d" + license "MIT" + revision 1 + head "https://github.com/tpope/rbenv-aliases.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1478142388cffd4c60833cdc2b6e7f3bcac3f6e8b15e095167718ceb0cd7c237" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "autoalias.bash", shell_output("rbenv hooks install") + end +end diff --git a/Formula/r/rbenv-binstubs.rb b/Formula/r/rbenv-binstubs.rb new file mode 100644 index 0000000000000..67eeb842390bb --- /dev/null +++ b/Formula/r/rbenv-binstubs.rb @@ -0,0 +1,26 @@ +class RbenvBinstubs < Formula + desc "Make rbenv aware of bundler binstubs" + homepage "https://github.com/Purple-Devs/rbenv-binstubs" + url "https://github.com/Purple-Devs/rbenv-binstubs/archive/refs/tags/v1.5.tar.gz" + sha256 "305000b8ba5b829df1a98fc834b7868b9e817815c661f429b0e28c1f613f4d0c" + license "MIT" + revision 1 + head "https://github.com/Purple-Devs/rbenv-binstubs.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cf92d2a4a872f49ddf33d4e4132ab0d1de390bf0c027a0f0e27925110bb01fe5" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "rbenv-binstubs.bash", shell_output("rbenv hooks exec") + end +end diff --git a/Formula/r/rbenv-bundle-exec.rb b/Formula/r/rbenv-bundle-exec.rb new file mode 100644 index 0000000000000..8bfdbe330af28 --- /dev/null +++ b/Formula/r/rbenv-bundle-exec.rb @@ -0,0 +1,26 @@ +class RbenvBundleExec < Formula + desc "Integrate rbenv and bundler" + homepage "https://github.com/maljub01/rbenv-bundle-exec" + url "https://github.com/maljub01/rbenv-bundle-exec/archive/refs/tags/v1.0.0.tar.gz" + sha256 "2da08cbb1d8edecd1bcf68005d30e853f6f948c54ddb07bada67762032445cf3" + license "MIT" + revision 1 + head "https://github.com/maljub01/rbenv-bundle-exec.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8c0d3d96110c571151ccc1500854047f47bd9f2b372bc65b70b0bde9f7a4465f" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "bundle-exec.bash", shell_output("rbenv hooks exec") + end +end diff --git a/Formula/r/rbenv-bundler-ruby-version.rb b/Formula/r/rbenv-bundler-ruby-version.rb new file mode 100644 index 0000000000000..625d19fbacd19 --- /dev/null +++ b/Formula/r/rbenv-bundler-ruby-version.rb @@ -0,0 +1,27 @@ +class RbenvBundlerRubyVersion < Formula + desc "Pick a ruby version from bundler's Gemfile" + homepage "https://github.com/aripollak/rbenv-bundler-ruby-version" + url "https://github.com/aripollak/rbenv-bundler-ruby-version/archive/refs/tags/v1.0.0.tar.gz" + sha256 "96c6b7eb191d436142fef0bb8c28071d54aca3e1a10ca01a525d1066699b03f2" + license "Unlicense" + revision 1 + head "https://github.com/aripollak/rbenv-bundler-ruby-version.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a8b7118dff025b078c5ad1206cc616e5bf436faf1516dbaad4c38a18e31bb0b6" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + (testpath/"Gemfile").write("ruby \"2.1.5\"") + system "rbenv", "bundler-ruby-version" + end +end diff --git a/Formula/r/rbenv-bundler.rb b/Formula/r/rbenv-bundler.rb new file mode 100644 index 0000000000000..e80a0f8cb502c --- /dev/null +++ b/Formula/r/rbenv-bundler.rb @@ -0,0 +1,25 @@ +class RbenvBundler < Formula + desc "Makes shims aware of bundle install paths" + homepage "https://github.com/carsomyr/rbenv-bundler" + url "https://github.com/carsomyr/rbenv-bundler/archive/refs/tags/1.0.1.tar.gz" + sha256 "6840d4165242da4606cd246ee77d484a91ee926331c5a6f840847ce189f54d74" + license "Apache-2.0" + head "https://github.com/carsomyr/rbenv-bundler.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "726653ee51529beb50ed43932c59c357198c1c61d252c644a88cc05b0fd1e0af" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "bundler.bash", shell_output("rbenv hooks exec") + end +end diff --git a/Formula/r/rbenv-chefdk.rb b/Formula/r/rbenv-chefdk.rb new file mode 100644 index 0000000000000..283f45b9b6210 --- /dev/null +++ b/Formula/r/rbenv-chefdk.rb @@ -0,0 +1,28 @@ +class RbenvChefdk < Formula + desc "Treat ChefDK as another version in rbenv" + homepage "https://github.com/docwhat/rbenv-chefdk" + url "https://github.com/docwhat/rbenv-chefdk/archive/refs/tags/v1.0.0.tar.gz" + sha256 "79b48257f1a24085a680da18803ba6a94a1dd0cb25bd390629006a5fb67f3b69" + license "MIT" + revision 1 + head "https://github.com/docwhat/rbenv-chefdk.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "dcdf8e0ad350e940be7783e378bf8c146bda6e446a13109511a9d4ed705170c0" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "rbenv-chefdk.bash", shell_output("rbenv hooks exec") + assert_match "rbenv-chefdk.bash", shell_output("rbenv hooks rehash") + assert_match "rbenv-chefdk.bash", shell_output("rbenv hooks which") + end +end diff --git a/Formula/r/rbenv-communal-gems.rb b/Formula/r/rbenv-communal-gems.rb new file mode 100644 index 0000000000000..12ef3e1a5b919 --- /dev/null +++ b/Formula/r/rbenv-communal-gems.rb @@ -0,0 +1,26 @@ +class RbenvCommunalGems < Formula + desc "Share gems across multiple rbenv Ruby installs" + homepage "https://github.com/tpope/rbenv-communal-gems" + url "https://github.com/tpope/rbenv-communal-gems/archive/refs/tags/v1.0.1.tar.gz" + sha256 "99f1c0be6721e25037f964015cbd2622d70603ceeeaef58f040410ac3697d766" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a189879cf1fb24dfd135aaf5c9fafe5c4fc1251236da0476be32e7a3a9edb5ce" + end + + deprecate! date: "2024-03-14", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "communal-gems.bash", shell_output("rbenv hooks install") + end +end diff --git a/Formula/r/rbenv-ctags.rb b/Formula/r/rbenv-ctags.rb new file mode 100644 index 0000000000000..69633f5abcbba --- /dev/null +++ b/Formula/r/rbenv-ctags.rb @@ -0,0 +1,27 @@ +class RbenvCtags < Formula + desc "Automatically generate ctags for rbenv Ruby stdlibs" + homepage "https://github.com/tpope/rbenv-ctags" + url "https://github.com/tpope/rbenv-ctags/archive/refs/tags/v1.0.2.tar.gz" + sha256 "94b38c277a5de3f53aac0e7f4ffacf30fb6ddeb31c0597c1bcd78b0175c86cbe" + license "MIT" + revision 1 + head "https://github.com/tpope/rbenv-ctags.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "93ff69e4515aae2a296578472b395c3bc8721fc711327c6f2a9126111910700e" + end + + depends_on "ctags" + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "ctags.bash", shell_output("rbenv hooks install") + end +end diff --git a/Formula/r/rbenv-default-gems.rb b/Formula/r/rbenv-default-gems.rb new file mode 100644 index 0000000000000..ebc29a969048b --- /dev/null +++ b/Formula/r/rbenv-default-gems.rb @@ -0,0 +1,32 @@ +class RbenvDefaultGems < Formula + desc "Auto-installs gems for Ruby installs" + homepage "https://github.com/rbenv/rbenv-default-gems" + url "https://github.com/rbenv/rbenv-default-gems/archive/refs/tags/v1.0.0.tar.gz" + sha256 "8271d58168ab10f0ace285dc4c394e2de8f2d1ccc24032e6ed5924f38dc24822" + license "MIT" + revision 1 + head "https://github.com/rbenv/rbenv-default-gems.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "ec2121dbae6293c76ef8493c2a22b95f44e2ba23442525daba4757bd9cc3b535" + end + + depends_on "rbenv" + + # Upstream patch: https://github.com/rbenv/rbenv-default-gems/pull/3 + patch do + url "https://github.com/rbenv/rbenv-default-gems/commit/ead67889c91c53ad967f85f5a89d986fdb98f6fb.patch?full_index=1" + sha256 "ac6a5654c11d3ef74a97029ed86b8a7b6ae75f4ca7ff4d56df3fb35e7ae0acb8" + end + + def install + prefix.install Dir["*"] + end + + test do + assert_match "default-gems.bash", shell_output("rbenv hooks install") + end +end diff --git a/Formula/r/rbenv-gemset.rb b/Formula/r/rbenv-gemset.rb new file mode 100644 index 0000000000000..06dd269057ab9 --- /dev/null +++ b/Formula/r/rbenv-gemset.rb @@ -0,0 +1,22 @@ +class RbenvGemset < Formula + desc "Adds basic gemset support to rbenv" + homepage "https://github.com/jf/rbenv-gemset" + url "https://github.com/jf/rbenv-gemset/archive/refs/tags/v0.5.100.tar.gz" + sha256 "371fc84e35e40c7c25339cb67599a0a768bc7d3d4daafb05e02ab960bde64ce4" + license :public_domain + head "https://github.com/jf/rbenv-gemset.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3ae346537f0186825a566e2da02b193821794883757f26eaf5cbb150e7600a1b" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "gemset.bash", shell_output("rbenv hooks exec") + end +end diff --git a/Formula/r/rbenv-vars.rb b/Formula/r/rbenv-vars.rb new file mode 100644 index 0000000000000..376f7f1af68b6 --- /dev/null +++ b/Formula/r/rbenv-vars.rb @@ -0,0 +1,26 @@ +class RbenvVars < Formula + desc "Safely sets global and per-project environment variables" + homepage "https://github.com/rbenv/rbenv-vars" + url "https://github.com/rbenv/rbenv-vars/archive/refs/tags/v1.2.0.tar.gz" + sha256 "9e6a5726aad13d739456d887a43c220ba9198e672b32536d41e884c0a54b4ddb" + license "MIT" + revision 1 + head "https://github.com/rbenv/rbenv-vars.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "571e19044f1c058d68271c7a8296cccee968ba6e1e0bca75fe8b5167f5888b96" + end + + depends_on "rbenv" + + def install + prefix.install Dir["*"] + end + + test do + assert_match "rbenv-vars.bash", shell_output("rbenv hooks exec") + end +end diff --git a/Formula/r/rbenv.rb b/Formula/r/rbenv.rb new file mode 100644 index 0000000000000..32b7418b1e66a --- /dev/null +++ b/Formula/r/rbenv.rb @@ -0,0 +1,54 @@ +class Rbenv < Formula + desc "Ruby version manager" + homepage "https://rbenv.org" + url "https://github.com/rbenv/rbenv/archive/refs/tags/v1.3.2.tar.gz" + sha256 "e2104f6472d7a8477409c46d4de39562b4d01899148a3dbed73c1d99a0b4bb2a" + license "MIT" + head "https://github.com/rbenv/rbenv.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8158fb1f059c1316523b2cc9074c5c041b3944828dc3b76cb032f893e754f013" + end + + depends_on "ruby-build" + + uses_from_macos "ruby" => :test + + def install + # Build an `:all` bottle. + inreplace "libexec/rbenv", "/usr/local", HOMEBREW_PREFIX + + if build.head? + # Record exact git revision for `rbenv --version` output + git_revision = Utils.git_short_head + inreplace "libexec/rbenv---version", /^(version=)"([^"]+)"/, + %Q(\\1"\\2-g#{git_revision}") + end + + # bash completion handled by rbenv-init + zsh_completion.install "completions/_rbenv" => "_rbenv" + prefix.install ["bin", "completions", "libexec", "rbenv.d"] + man1.install "share/man/man1/rbenv.1" + end + + test do + # Create a fake ruby version and executable. + rbenv_root = Pathname(shell_output("#{bin}/rbenv root").strip) + ruby_bin = rbenv_root/"versions/1.2.3/bin" + foo_script = ruby_bin/"foo" + foo_script.write "echo hello" + chmod "+x", foo_script + + # Test versions. The second `rbenv` call is a shell function; do not add a `bin` prefix. + versions = shell_output("eval \"$(#{bin}/rbenv init -)\" && rbenv versions").split("\n") + assert_equal 2, versions.length + assert_match(/\* system/, versions[0]) + assert_equal(" 1.2.3", versions[1]) + + # Test rehash. + system bin/"rbenv", "rehash" + refute_match "Cellar", (rbenv_root/"shims/foo").read + # The second `rbenv` call is a shell function; do not add a `bin` prefix. + assert_equal "hello", shell_output("eval \"$(#{bin}/rbenv init -)\" && rbenv shell 1.2.3 && foo").chomp + end +end diff --git a/Formula/r/rbspy.rb b/Formula/r/rbspy.rb new file mode 100644 index 0000000000000..33e7480d66688 --- /dev/null +++ b/Formula/r/rbspy.rb @@ -0,0 +1,47 @@ +class Rbspy < Formula + desc "Sampling profiler for Ruby" + homepage "https://rbspy.github.io/" + url "https://github.com/rbspy/rbspy/archive/refs/tags/v0.39.0.tar.gz" + sha256 "772476d59f047287e20c2cc362937b518664621e100fa24430c3012a148088fd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9b2f0b0b92679fdafa5a6e51ee24c215cd6924df304d4474874237a026f3a4bc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6f7dc7640bbcb16d1fe7759114cbf5523623edf992d38a8cf4d8d02ca299377" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51ee8d251c3dd4ac162a76c5f268de80c4a53e002d4997d40f23ce08e957d530" + sha256 cellar: :any_skip_relocation, sonoma: "50a2d10f41e922088eb0acb2e54169b64e93ac796b835c168d24355ff571b629" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6fcf3ee4878adba5757e51ec48fd2c50763777f0dfd6fa2789711c988cae41a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "146f90c744ddddf36132d9b0eaaa3bc66c7d3dfba083b3ca3d48c33cb67e949b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + recording = <<~EOS + H4sICDJNbmAAA3JlcG9ydAC9ks1OwzAQhO88RbUnkKzGqfPTRIi34FRV1to11MKxLdtphaq8O + w5QVEEPnHrd2ZlPu5ogon+nq7sTRBy8UTxgUtCXlBIIs8YPKkTtLPRAl9WSAYGYMCSe9JAXs0 + /JyKO2UnHlndxnc1O2bcfWrCJg0bpfct2UrOsopdOUsSmgzDmbU16dAyEapfxiIxcvo5Upk7c + ZGZTBpA+Ke0w5Au5H+2bd0T5kDUV0ZkxnzY7GEDDaKuugpxP5SUbEK1Hfd/vgXgMOyyD+RkLx + HPMXChHUsfj8SnHNdWayC6YQ4ibM9oIppbwJsywvoI8Davt0Gy6btgS83uWzq1XTEkj7oHDH5 + 0lVreuqrlmTC/yPitZXK1rSlrbNV0U/ACePNHUiAwAA + EOS + + (testpath/"recording.gz").write Base64.decode64(recording.delete("\n")) + system bin/"rbspy", "report", "-f", "summary", "-i", "recording.gz", + "-o", "result" + + expected_result = <<~EOS + % self % total name + 100.00 100.00 sleep [c function] - (unknown):0 + 0.00 100.00 ccc - sample_program.rb:11 + 0.00 100.00 bbb - sample_program.rb:7 + 0.00 100.00 aaa - sample_program.rb:3 + 0.00 100.00
- sample_program.rb:13 + EOS + assert_equal File.read("result"), expected_result + end +end diff --git a/Formula/r/rbtools.rb b/Formula/r/rbtools.rb new file mode 100644 index 0000000000000..5fc8b8fdd3c43 --- /dev/null +++ b/Formula/r/rbtools.rb @@ -0,0 +1,120 @@ +class Rbtools < Formula + include Language::Python::Virtualenv + + desc "CLI and API for working with code and document reviews on Review Board" + homepage "https://www.reviewboard.org/downloads/rbtools/" + url "https://files.pythonhosted.org/packages/26/76/8e5ff9d9f83c5e53fa32dadf139916d40b0bcf4e5cfa0dc1f150a2775050/rbtools-5.3.tar.gz" + sha256 "092f9c573448a22432b2aafab20e94dea1c37ff833d23a44f0daee55b9a88e1d" + license "MIT" + head "https://github.com/reviewboard/rbtools.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "f6a0487b407bae3c316c0342ac52c6912e8dac8ec3c8ed37bd345fc3747dbdb6" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "housekeeping" do + url "https://files.pythonhosted.org/packages/a7/56/2e66e26b44f3970d9d6aed1ab1b5dce8a741bc7f0c2918f222831e130c5a/housekeeping-1.1.tar.gz" + sha256 "75e71f1cc501885406f6be81410c9b05361871a3ecccde3891336da1e92426b5" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "importlib-resources" do + url "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz" + sha256 "185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "puremagic" do + url "https://files.pythonhosted.org/packages/dd/7f/9998706bc516bdd664ccf929a1da6c6e5ee06e48f723ce45aae7cf3ff36e/puremagic-1.30.tar.gz" + sha256 "f9ff7ac157d54e9cf3bff1addfd97233548e75e685282d84ae11e7ffee1614c9" + end + + resource "pydiffx" do + url "https://files.pythonhosted.org/packages/d3/76/ad0677d82b7c75deb4da63151d463a9f90e97f3817b83f4e3f74034eb384/pydiffx-1.1.tar.gz" + sha256 "0986dbb0a87cbf79e244e2f1c0e2b696d8e86b3861ea2955757a61d38e139228" + + # Workaround needing six pre-installed: https://github.com/beanbaginc/diffx/pull/2 + patch :DATA + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "texttable" do + url "https://files.pythonhosted.org/packages/1c/dc/0aff23d6036a4d3bf4f1d8c8204c5c79c4437e25e0ae94ffe4bbb55ee3c2/texttable-1.7.0.tar.gz" + sha256 "2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + virtualenv_install_with_resources + + bash_completion.install "rbtools/commands/conf/completions/bash" => "rbt" + zsh_completion.install "rbtools/commands/conf/completions/zsh" => "_rbt" + end + + test do + system "git", "init" + system bin/"rbt", "setup-repo", "--server", "https://demo.reviewboard.org" + out = shell_output("#{bin}/rbt clear-cache") + assert_match "Cleared cache in", out + end +end + +__END__ +diff --git a/setup.py b/setup.py +index ed91128..87edbc2 100755 +--- a/setup.py ++++ b/setup.py +@@ -8,7 +8,6 @@ import sys + + from setuptools import setup, find_packages + +-from pydiffx import get_package_version + + + PACKAGE_NAME = 'pydiffx' +@@ -36,7 +35,7 @@ with open('README.rst', 'r') as fp: + + + setup(name=PACKAGE_NAME, +- version=get_package_version(), ++ version='1.1', + license='MIT', + description='Python module for reading and writing DiffX files.', + long_description=long_description, diff --git a/Formula/r/rbw.rb b/Formula/r/rbw.rb new file mode 100644 index 0000000000000..6c4dc6e3249a5 --- /dev/null +++ b/Formula/r/rbw.rb @@ -0,0 +1,34 @@ +class Rbw < Formula + desc "Unofficial Bitwarden CLI client" + homepage "https://github.com/doy/rbw" + url "https://github.com/doy/rbw/archive/refs/tags/1.14.1.tar.gz" + sha256 "c551ec4665d26f6282ba6a5f46c71df79304f8c618a836c653f0289ff3ebb94e" + license "MIT" + head "https://github.com/doy/rbw.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e7e1cd33573f54c217afd705b15c390b4a283813ef8dd93e9d04113723e459d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b997b5495689cd78f982d0ae7de1742826d9325559109835762596fdfb291ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7cc2b2e7c89148fabea1ff21ac0d3ebeec513566fc96695549deb3f884257069" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b093d1587b76d59d6ca4176509d67385e01d8b0236a3f778750a087b83f096ca" + sha256 cellar: :any_skip_relocation, sonoma: "271d357165a4213e02d8677b9800d204e840227367e0d40b9754ddf49516588b" + sha256 cellar: :any_skip_relocation, ventura: "094fa49181670ec1cccec404ac7ca6aa67a53751f22190e77c34a40126df7b8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f1dd4dda0101fe2140eff61d68852fafe55d0e5f38d6e9e8096ae9f9d774f9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f7c4573d8a2dc56302c8ceef98b969dd2cb844ad4ba053b83e681a36d087233" + end + + depends_on "rust" => :build + depends_on "pinentry" + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"rbw", "gen-completions") + end + + test do + expected = "ERROR: Before using rbw" + output = shell_output("#{bin}/rbw ls 2>&1 > /dev/null", 1).each_line.first.strip + assert_match expected, output + end +end diff --git a/Formula/r/rc.rb b/Formula/r/rc.rb new file mode 100644 index 0000000000000..7ecd3181738d8 --- /dev/null +++ b/Formula/r/rc.rb @@ -0,0 +1,40 @@ +class Rc < Formula + desc "Implementation of the AT&T Plan 9 shell" + homepage "https://doc.cat-v.org/plan_9/4th_edition/papers/rc" + url "https://web.archive.org/web/20200227085442/static.tobold.org/rc/rc-1.7.4.tar.gz" + mirror "https://src.fedoraproject.org/repo/extras/rc/rc-1.7.4.tar.gz/f99732d7a8be3f15f81e99c3af46dc95/rc-1.7.4.tar.gz" + sha256 "5ed26334dd0c1a616248b15ad7c90ca678ae3066fa02c5ddd0e6936f9af9bfd8" + license "Zlib" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f1229b46bbcd4ea15a8cf6ed36601dc7e2a6e1a0436f4c6f946bc8611c236c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "64e670569da0f8330abe43a6f0cbb96266ae145b5324add5e71c658d44266745" + sha256 cellar: :any_skip_relocation, arm64_ventura: "384e3f48c4d39fc6b6eae5638514b345684dd3d8af6a14b73de894927083dcd5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4ac5175270dab427e207bc53ab5d47f6e3f28e8618b471df5a59dc2fd29719cb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "18c672af9e2e5d2e88ca29d57aec584aaa57daac97b9ac330d9f8164beb9ecce" + sha256 cellar: :any_skip_relocation, sonoma: "ea0953b18bf78f8e7801c5f10fd7d0db032808ad1a167383edf769e5445008b4" + sha256 cellar: :any_skip_relocation, ventura: "95698c3547fa93a6e7ca971e63059e199faa741c86311ed8c5f929ea737a7a53" + sha256 cellar: :any_skip_relocation, monterey: "02d867de600bc9787231892ab7de1dcd48caff4328cfd7d7c44e0a15eca6a677" + sha256 cellar: :any_skip_relocation, big_sur: "0e2ce85a1d122543d504138da5f09b88890ea175311572024b4e627bda9b3c65" + sha256 cellar: :any_skip_relocation, catalina: "ab871610d857058773a87f70ad995a5e02fdeb1e6fe3d699e2051892ce60af84" + sha256 cellar: :any_skip_relocation, arm64_linux: "a123be0cf463cf4550ba7d1c147d081006df55c7ac7e42d0840bca5c93828a76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6623be4e09b3e283101e33938ec83f0c47d07ad164a30c5854a66d8e64e31447" + end + + deprecate! date: "2024-06-10", because: :repo_removed + disable! date: "2025-06-21", because: :repo_removed + + uses_from_macos "libedit" + + def install + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-edit=edit" + system "make" + system "make", "install" + end + + test do + assert_equal "Hello!", shell_output("#{bin}/rc -c 'echo Hello!'").chomp + end +end diff --git a/Formula/r/rclone.rb b/Formula/r/rclone.rb new file mode 100644 index 0000000000000..71547c17a7fb0 --- /dev/null +++ b/Formula/r/rclone.rb @@ -0,0 +1,47 @@ +class Rclone < Formula + desc "Rsync for cloud storage" + homepage "https://rclone.org/" + url "https://github.com/rclone/rclone/archive/refs/tags/v1.71.2.tar.gz" + sha256 "54c619a2f6921981f276f01a12209bf2f2b5d94f580cd8699e93aa7c3e9ee9ba" + license "MIT" + head "https://github.com/rclone/rclone.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1289bd9a45b4ca1694098faefa19b596fca0324975ce1cdbe89f06780c6efcf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cec19f7c376ff64f51cc015a8e0c0f1ead389867e5f809165ee8879a19dd2425" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7ea1deaca67fed388d5d3a4f0e3427d12ba42d8d0410e3ed8b98471fc8b1259" + sha256 cellar: :any_skip_relocation, sonoma: "5fb7b55f5ea8f658fb23a205b99c4c2c29ce65ba62ee2e84d7dd14bf753d5dd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a18e5e2fd08cddb6a3b2db179a197ad5ea4c50862ff4227c15190362dcd8d57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a926f2d8f33a7369adbc7a4d051881855cde027c098fc4a8d54e224ab55fdd94" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/rclone/rclone/fs.Version=v#{version} + ] + tags = "brew" if OS.mac? + system "go", "build", *std_go_args(ldflags:, tags:) + man1.install "rclone.1" + system bin/"rclone", "genautocomplete", "bash", "rclone.bash" + system bin/"rclone", "genautocomplete", "zsh", "_rclone" + system bin/"rclone", "genautocomplete", "fish", "rclone.fish" + bash_completion.install "rclone.bash" => "rclone" + zsh_completion.install "_rclone" + fish_completion.install "rclone.fish" + end + + def caveats + <<~EOS + Homebrew's installation does not include the `mount` subcommand on macOS which depends on FUSE, use `nfsmount` instead. + EOS + end + + test do + (testpath/"file1.txt").write "Test!" + system bin/"rclone", "copy", testpath/"file1.txt", testpath/"dist" + assert_match File.read(testpath/"file1.txt"), File.read(testpath/"dist/file1.txt") + end +end diff --git a/Formula/r/rcm.rb b/Formula/r/rcm.rb new file mode 100644 index 0000000000000..79f82c7002d63 --- /dev/null +++ b/Formula/r/rcm.rb @@ -0,0 +1,37 @@ +class Rcm < Formula + desc "RC file (dotfile) management" + homepage "https://thoughtbot.github.io/rcm/rcm.7.html" + url "https://thoughtbot.github.io/rcm/dist/rcm-1.3.6.tar.gz" + sha256 "f4fdfbc451d1fb5764531290a202a0a871f6b81ba3c01a6b76c49435c85080a5" + license "BSD-3-Clause" + + # The first-party website doesn't appear to provide links to archive files, so + # we check the Git repository tags instead. + livecheck do + url "https://github.com/thoughtbot/rcm.git" + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "bc964820b4e236614e4a76ea1a6913b25abbe68cfa00a106aae40944b3af8d3f" + end + + def install + ENV["CONFIG_SHELL"] = "/bin/bash" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/".dotfiles").mkdir + (testpath/".gitconfig").write <<~EOS + [user] + name = Test User + email = test@test.com + EOS + assert_match(/(Moving|Linking)\.\.\./x, shell_output("#{bin}/mkrc -v ~/.gitconfig")) + end +end diff --git a/Formula/r/rcs.rb b/Formula/r/rcs.rb new file mode 100644 index 0000000000000..425e1fad72819 --- /dev/null +++ b/Formula/r/rcs.rb @@ -0,0 +1,40 @@ +class Rcs < Formula + desc "GNU revision control system" + homepage "https://www.gnu.org/software/rcs/" + url "https://ftpmirror.gnu.org/gnu/rcs/rcs-5.10.1.tar.lz" + mirror "https://ftp.gnu.org/gnu/rcs/rcs-5.10.1.tar.lz" + sha256 "43ddfe10724a8b85e2468f6403b6000737186f01e60e0bd62fde69d842234cc5" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "300e27fe13d2279ed6fa2fd5d06fdf4369311b86818229df6285086e8a46cb52" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec09df25d02575ef0506a90cc81def4001a17eb02fce6adf9933b6e359541282" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "538f4c9f1747041c737c8c57f49ca2becc2cca7cd0c31f88cf14142d5d00c873" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f9cf6ea9614d1286230615b81443f0941b32cd7768769378039df8463d71fbf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "579a458898062f0b99c455e69e93cbf4c2b5637ae72806d4ee74f4063f2a25ff" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b241d433eecdd7d01df54bafa597df65a42ad75866ece0a16d865a205c0660b1" + sha256 cellar: :any_skip_relocation, sonoma: "0bf006b8c2137100fd45092c3465ff9a3938e5f864a3c4e8186ca70d922f1d6a" + sha256 cellar: :any_skip_relocation, ventura: "92020e945f2e80c82762fc8153a95223d040ed5024a4a93f396fc26195787d65" + sha256 cellar: :any_skip_relocation, monterey: "816051fa12300cd95e60babba5d4613e47f4c0c6fb426d520edf1f04914b91c6" + sha256 cellar: :any_skip_relocation, big_sur: "cf4c810451ae3f5d2fe9ee983bce3c3d21573125bf55375a27e0dd7a7ff461f6" + sha256 cellar: :any_skip_relocation, catalina: "46b57c5880786bbebf8e776acf35f6b95adb29cdda2198bf2abf6258a4367c97" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef51614aa19bd0fb8b3cd13203c4281f15ded280b2072023dbb7d2e003f6ef4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bd4d79803732fe588d5cacf620d6e9216002d5d93acf6f0798a225174e2db28" + end + + uses_from_macos "ed" => :build + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"merge", "--version" + end +end diff --git a/Formula/r/rdap.rb b/Formula/r/rdap.rb new file mode 100644 index 0000000000000..e25eb5407ea51 --- /dev/null +++ b/Formula/r/rdap.rb @@ -0,0 +1,43 @@ +class Rdap < Formula + desc "Command-line client for the Registration Data Access Protocol" + homepage "https://www.openrdap.org" + url "https://github.com/openrdap/rdap/archive/refs/tags/v0.9.1.tar.gz" + sha256 "06a330a9e7d87d89274a0bcedc5852b9f6a4df81baec438fdb6156f49068996d" + license "MIT" + head "https://github.com/openrdap/rdap.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "82be0fc5e32749b77743087bf6b5b6a62a61454b1891316e419242bcfaf9e6dc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a73abdb1f73b15293ec718621dc35982af08454db08a899d6ddcf2f279eac55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a73abdb1f73b15293ec718621dc35982af08454db08a899d6ddcf2f279eac55" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a73abdb1f73b15293ec718621dc35982af08454db08a899d6ddcf2f279eac55" + sha256 cellar: :any_skip_relocation, sonoma: "6941798ba46a5391886ce266bfb1c4b5bfeb9db8eb9cf11c33741256f0405784" + sha256 cellar: :any_skip_relocation, ventura: "6941798ba46a5391886ce266bfb1c4b5bfeb9db8eb9cf11c33741256f0405784" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b7d525df05bcaa24b18f462587052208ff5456170bc1d45f405f0b0667649a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d791f01848f4e8c654a1174e55a1118d8f0ac743962bba87ec7350c81e027f58" + end + + depends_on "go" => :build + + conflicts_with "icann-rdap", because: "icann-rdap also ships a rdap binary" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/rdap" + end + + test do + # check version + assert_match "OpenRDAP v#{version}", shell_output("#{bin}/rdap --help 2>&1", 1) + + # no localhost rdap server + assert_match "No RDAP servers found for", shell_output("#{bin}/rdap -t ip 127.0.0.1 2>&1", 1) + + # check github.com domain on rdap + output = shell_output("#{bin}/rdap github.com") + assert_match "Domain Name: GITHUB.COM", output + assert_match "Nameserver:", output + end +end diff --git a/Formula/r/rdate.rb b/Formula/r/rdate.rb new file mode 100644 index 0000000000000..a0d22437fcaa3 --- /dev/null +++ b/Formula/r/rdate.rb @@ -0,0 +1,44 @@ +class Rdate < Formula + desc "Set the system's date from a remote host" + homepage "https://www.aelius.com/njh/rdate/" + url "https://www.aelius.com/njh/rdate/rdate-1.5.tar.gz" + sha256 "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?rdate[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a83472ff648a0aab17ffdf054be07f4d486506c3b17391d656527b492a6d26d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bbf44b1f5bca7ad76c78766af7c76e1897e391a40841c1f373d4172e0fa88dea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "896cdf111b9e81a2c1fb3d1c17bce92ac51a4a8af14d0b02979543013353acc7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0bd69ad7d1cf67af981ff2b0ea4d6bda4f7860a8568de2dca05f5b2bb96e222" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0de4bc85f7374d04a639fb682bdb6108a4b2a2bd2d97c4a7f2d79ce897e5350e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b3606f3683c8c1465c87a5c3fe427c4e067420f7de3ff4abdabb61871105e190" + sha256 cellar: :any_skip_relocation, sonoma: "3f5d287e87f00c9a07425fdcfc63d9277faaba095fe9111737ada0eba7c7f5de" + sha256 cellar: :any_skip_relocation, ventura: "47d99c2597971f7a34e1fda26735afe5c728c64973513f1aa03ab4761110268c" + sha256 cellar: :any_skip_relocation, monterey: "5a12e0fcd7da29e05eaff27265ee4e6ccb6579d691bea8ff46859bd645ad82f2" + sha256 cellar: :any_skip_relocation, big_sur: "afe7b66e5e3a57f51a7a87567026c8b9688f4b7f0c8fd03314d400164c4ac532" + sha256 cellar: :any_skip_relocation, catalina: "68597f7989ddba1ff853f54c0cf3adf36b3567268b69ca43d7b0795d290304b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "92c6174db1497fb979606efb3ef9ce126eb725d6b9266ba25d7414fee49f5b46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec0afe4b9ddec866160a04e76ce20f253c90a716c6a90c66c8185db9a32f5070" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + # NOTE: The server must support RFC 868 + system bin/"rdate", "-p", "-t", "10", "time-b-b.nist.gov" + end +end diff --git a/Formula/r/rdb.rb b/Formula/r/rdb.rb new file mode 100644 index 0000000000000..6bb9629f008a1 --- /dev/null +++ b/Formula/r/rdb.rb @@ -0,0 +1,31 @@ +class Rdb < Formula + desc "Redis RDB parser" + homepage "https://github.com/HDT3213/rdb/" + url "https://github.com/HDT3213/rdb/archive/refs/tags/v1.3.0.tar.gz" + sha256 "40fe9b89f76266939abe6e8565fecdb2dde0dba30f84173c65ed6cb0afbe32a9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "92ffd958ccff8cb23a292b05020f608a5bc9f92d746f830d2861b902b6585914" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93b8a40b410523d20c0315336297499df1c6de1d6eee460910d20f4f6057a5ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93b8a40b410523d20c0315336297499df1c6de1d6eee460910d20f4f6057a5ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93b8a40b410523d20c0315336297499df1c6de1d6eee460910d20f4f6057a5ff" + sha256 cellar: :any_skip_relocation, sonoma: "33648612c014fb58c57c303cbaf1068486c5af7d7f2476b54e8c3379032143e3" + sha256 cellar: :any_skip_relocation, ventura: "33648612c014fb58c57c303cbaf1068486c5af7d7f2476b54e8c3379032143e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e3e2ef9e581dbd9eea5c5c29e4ecd555e725abb1713f1df0bb7d008ddf80966" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5062866080f8ed9b34b681f19bea995f9d629c048d7304a7026e20cc0ba5dcaf" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + pkgshare.install "cases" + end + + test do + cp_r pkgshare/"cases", testpath + system bin/"rdb", "-c", "memory", "-o", testpath/"mem1.csv", testpath/"cases/memory.rdb" + assert_match "0,hash,hash,131,131B,2,ziplist,", (testpath/"mem1.csv").read + end +end diff --git a/Formula/r/rdfind.rb b/Formula/r/rdfind.rb new file mode 100644 index 0000000000000..a58be960c0847 --- /dev/null +++ b/Formula/r/rdfind.rb @@ -0,0 +1,43 @@ +class Rdfind < Formula + desc "Find duplicate files based on content (NOT file names)" + homepage "https://rdfind.pauldreik.se/" + url "https://rdfind.pauldreik.se/rdfind-1.7.0.tar.gz" + sha256 "78c463152e1d9e4fd1bfeb83b9c92df5e7fc4c5f93c7d426fb1f7efa2be4df29" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?rdfind[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "140d7e72ac236159bb1912547d8c1981be0e3726d83d1c3497d56d2b7d68ea58" + sha256 cellar: :any, arm64_sequoia: "3784a5af50fc5823d7f72461b520a54698c68c93ebdaec59189592f9fc23ebd7" + sha256 cellar: :any, arm64_sonoma: "f0afe789cfeaf5d4cf9eff52e075ae575de24cd6c2f16aec588a30bd6a3725ef" + sha256 cellar: :any, arm64_ventura: "cc9fb51dc12b296700a3d4b2f91d0f913c16e9b187184458c2eb6847134f71eb" + sha256 cellar: :any, sonoma: "f53c9d56247f3c928409c3356c6028a30da6dc3438daa2b87664d748f28e2347" + sha256 cellar: :any, ventura: "4beb231157b8cd5f653402304d0060cc169587333d65afd1a7a8c164aa69c1a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c925d7eaab171bbc4c5e0e84df68bcfa9be1ffb00a6d1e2144340ab588a8896a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ba451fc698fa746924d67f4966af5c02c6f354f8641d2ef1a24320d3f6a40b4" + end + + depends_on "nettle" + + def install + ENV.append "CXXFLAGS", "-std=c++17" + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + mkdir "folder" + (testpath/"folder/file1").write("foo") + (testpath/"folder/file2").write("bar") + (testpath/"folder/file3").write("foo") + system bin/"rdfind", "-deleteduplicates", "true", "folder" + assert_path_exists testpath/"folder/file1" + assert_path_exists testpath/"folder/file2" + refute_path_exists testpath/"folder/file3" + end +end diff --git a/Formula/r/rdiff-backup.rb b/Formula/r/rdiff-backup.rb new file mode 100644 index 0000000000000..664f15b4ae4f9 --- /dev/null +++ b/Formula/r/rdiff-backup.rb @@ -0,0 +1,44 @@ +class RdiffBackup < Formula + include Language::Python::Virtualenv + + desc "Reverse differential backup tool, over a network or locally" + homepage "https://rdiff-backup.net/" + url "https://files.pythonhosted.org/packages/e9/9b/487229306904a54c33f485161105bb3f0a6c87951c90a54efdc0fc04a1c9/rdiff-backup-2.2.6.tar.gz" + sha256 "d0778357266bc6513bb7f75a4570b29b24b2760348bbf607babfc3a6f09458cf" + license "GPL-2.0-or-later" + revision 2 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "ebea57ecc6915c0b154d732cc9694f360c77815e98d8b81948e6e52b3bb881b9" + sha256 cellar: :any, arm64_sequoia: "2f5ac3490d900871fae7157a93425498112962b41824c0b725dc3a0acd466673" + sha256 cellar: :any, arm64_sonoma: "bccc1b81a71c6c37e91412f2083c8922045b07f5a5cf1c11a37924a480f58871" + sha256 cellar: :any, sonoma: "9136e68895a67828a273cd4930fcbc2dbf8dbf4598c5ba938d4c2825d1f25c2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "baba91a650c1813d89435bfe1bcc41463e9fa64ff81d79592c70a7219147216b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "384758ed7f5ab60a60993d6c73f2a835a878c00cd6066ede4e054334aafc7731" + end + + depends_on "librsync" + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages extra_packages: "pyxattr" + + resource "pyxattr" do + url "https://files.pythonhosted.org/packages/97/d1/7b85f2712168dfa26df6471082403013f3f815f3239aee3def17b6fd69ee/pyxattr-0.8.1.tar.gz" + sha256 "48c578ecf8ea0bd4351b1752470e301a90a3761c7c21f00f953dcf6d6fa6ee5a" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"rdiff-backup", "--version" + end +end diff --git a/Formula/r/rdkit.rb b/Formula/r/rdkit.rb new file mode 100644 index 0000000000000..7e5482f2555f4 --- /dev/null +++ b/Formula/r/rdkit.rb @@ -0,0 +1,157 @@ +class Rdkit < Formula + desc "Open-source chemoinformatics library" + homepage "https://rdkit.org/" + # NOTE: Make sure to update RPATHs if any "@rpath-referenced libraries" show up in `brew linkage` + url "https://github.com/rdkit/rdkit/archive/refs/tags/Release_2025_09_1.tar.gz" + sha256 "7fb3510b69af358009e2d0763c1d9665ac34f4c2cd3314cf5210ee3d5a33d501" + license "BSD-3-Clause" + revision 1 + head "https://github.com/rdkit/rdkit.git", branch: "master" + + livecheck do + url :stable + regex(/^Release[._-](\d+(?:[._]\d+)+)$/i) + strategy :git do |tags| + tags.filter_map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + bottle do + sha256 arm64_tahoe: "196b3bd7410b0dc65624d6d525cc51ca48c69f961f48c4b5d07c2d4b39729a87" + sha256 arm64_sequoia: "fd165ec6200aaa8f8f9989942188fc9f296c3f462e8bdfd47fa002413c17e6a8" + sha256 arm64_sonoma: "709b6b9976a723b632f865c3d8b9798b977de85ab6e311f9b72b237d137fde2b" + sha256 cellar: :any, sonoma: "cf228316aef4978ed51a650420ace449ddddf11b9606924ab5b47b4492f1582d" + sha256 cellar: :any_skip_relocation, arm64_linux: "442e8e1ab3ca1fbc1b0bd206db18309dbc53f6143ce86ccb11d753dbb2fb9626" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4da31b2d2ad9545c3021cbf4803ed237b9e23ccbf07cd081df32429b34941fa9" + end + + depends_on "catch2" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + depends_on "boost" + depends_on "boost-python3" + depends_on "cairo" + depends_on "coordgen" + depends_on "eigen" + depends_on "freetype" + depends_on "inchi" + depends_on "maeparser" + depends_on "numpy" + depends_on "py3cairo" + depends_on "python@3.14" + + resource "better_enums" do + url "https://github.com/aantron/better-enums/archive/refs/tags/0.11.3.tar.gz" + sha256 "1b1597f0aa5452b971a94ab13d8de3b59cce17d9c43c8081aa62f42b3376df96" + end + + def python3 + "python3.14" + end + + def postgresqls + deps.filter_map { |f| f.to_formula if f.name.start_with?("postgresql@") } + .sort_by(&:version) + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + (buildpath/"better_enums").install resource("better_enums") + + python_rpath = rpath(source: lib/Language::Python.site_packages(python3)) + python_rpaths = [python_rpath, "#{python_rpath}/..", "#{python_rpath}/../.."] + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_MODULE_LINKER_FLAGS=#{python_rpaths.map { |path| "-Wl,-rpath,#{path}" }.join(" ")} + -DCMAKE_PREFIX_PATH='#{Formula["maeparser"].opt_lib};#{Formula["coordgen"].opt_lib}' + -DCMAKE_REQUIRE_FIND_PACKAGE_coordgen=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_maeparser=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_Inchi=ON + -DFETCHCONTENT_SOURCE_DIR_BETTER_ENUMS=#{buildpath}/better_enums + -DINCHI_INCLUDE_DIR=#{Formula["inchi"].opt_include}/inchi + -DRDK_INSTALL_INTREE=OFF + -DRDK_BUILD_SWIG_WRAPPERS=OFF + -DRDK_BUILD_AVALON_SUPPORT=ON + -DRDK_PGSQL_STATIC=OFF + -DRDK_BUILD_INCHI_SUPPORT=ON + -DRDK_BUILD_CPP_TESTS=OFF + -DRDK_INSTALL_STATIC_LIBS=OFF + -DRDK_BUILD_CAIRO_SUPPORT=ON + -DRDK_BUILD_YAEHMOP_SUPPORT=ON + -DRDK_BUILD_FREESASA_SUPPORT=ON + -DPython3_EXECUTABLE=#{which(python3)} + ] + if build.bottle? && Hardware::CPU.intel? && (!OS.mac? || !MacOS.version.requires_sse42?) + args << "-DRDK_OPTIMIZE_POPCNT=OFF" + end + system "cmake", "-S", ".", "-B", "build", "-DRDK_BUILD_PGSQL=OFF", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + inreplace "Code/PgSQL/rdkit/CMakeLists.txt" do |s| + # Prevent trying to install into pg_config-defined dirs + s.sub! "set(PG_PKGLIBDIR \"${PG_PKGLIBDIR}", "set(PG_PKGLIBDIR \"$ENV{PG_PKGLIBDIR}" + s.sub! "set(PG_EXTENSIONDIR \"${PG_SHAREDIR}", "set(PG_EXTENSIONDIR \"$ENV{PG_SHAREDIR}" + # Re-use installed libraries when building modules for other PostgreSQL versions + s.sub!(/^find_package\(PostgreSQL/, "find_package(Cairo REQUIRED)\nfind_package(rdkit REQUIRED)\n\\0") + s.sub! 'set(pgRDKitLibs "${pgRDKitLibs}${pgRDKitLib}', 'set(pgRDKitLibs "${pgRDKitLibs}RDKit::${pgRDKitLib}' + s.sub! ";${INCHI_LIBRARIES};", ";" + # Add RPATH for PostgreSQL cartridge + s.sub! '"-Wl,-dead_strip_dylibs ', "\\0-Wl,-rpath,#{loader_path}/.. " + end + ENV["DESTDIR"] = "/" # to force creation of non-standard PostgreSQL directories + + postgresqls.each do |postgresql| + ENV["PG_PKGLIBDIR"] = lib/postgresql.name + ENV["PG_SHAREDIR"] = share/postgresql.name + builddir = "build_pg#{postgresql.version.major}" + + system "cmake", "-S", ".", "-B", builddir, + "-DRDK_BUILD_PGSQL=ON", + "-DPostgreSQL_ROOT=#{postgresql.opt_prefix}", + "-DPostgreSQL_ADDITIONAL_VERSIONS=#{postgresql.version.major}", + *args, *std_cmake_args + system "cmake", "--build", "#{builddir}/Code/PgSQL/rdkit" + system "cmake", "--install", builddir, "--component", "pgsql" + end + end + + def caveats + <<~EOS + You may need to add RDBASE to your environment variables, e.g. + #{Utils::Shell.export_value("RDBASE", "#{opt_share}/RDKit")} + EOS + end + + test do + # Test Python module + (testpath/"test.py").write <<~PYTHON + from rdkit import Chem + print(Chem.MolToSmiles(Chem.MolFromSmiles('C1=CC=CN=C1'))) + PYTHON + assert_equal "c1ccncc1", shell_output("#{python3} test.py 2>&1").chomp + + # Test PostgreSQL extension + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"rdkit\";", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/r/re-flex.rb b/Formula/r/re-flex.rb new file mode 100644 index 0000000000000..d5c875662f086 --- /dev/null +++ b/Formula/r/re-flex.rb @@ -0,0 +1,43 @@ +class ReFlex < Formula + desc "Regex-centric, fast and flexible scanner generator for C++" + homepage "https://www.genivia.com/doc/reflex/html" + url "https://github.com/Genivia/RE-flex/archive/refs/tags/v6.0.0.tar.gz" + sha256 "488a778577429408a3390b6aeac796eccaaa1297bb7573feccf3b608b9ae9d95" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e91a3cfbf67eec33ca4a48f04c0cfeec98d90276006918049d4078f7d432c710" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fd73a376e5f349bc84f937515f67e019575c7faff08d44d83d9f1025640344fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c735181cd7b4c1e01cd69ecbbf7726fec1fa0810f954b0dadc736a375e0e6806" + sha256 cellar: :any_skip_relocation, arm64_ventura: "42ed5e3f6a0687fcc791620a482173ff7851c47f5b8f7e322aa4a3232c89f0bb" + sha256 cellar: :any_skip_relocation, sonoma: "3f7f277cb2b2e7a9c39d803d22e0adc07c2b917abac74ef3ceb4f86980373440" + sha256 cellar: :any_skip_relocation, ventura: "e8012a5ccafe1183da6036ea631c56de478bb2f49b07b7e91b16afb21e638838" + sha256 cellar: :any_skip_relocation, arm64_linux: "439ee2accbe09eb7469cdaed53a10605c0c78dfa77804ad03a84af9e4066010e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1149cb16ee52afef10cc2c5ef4397480d0dab377381a1d9ebc1399cb4c7d872f" + end + + depends_on "pcre2" + + conflicts_with "reflex", because: "both install `reflex` binaries" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"echo.l").write <<~EOS + %{ + #include + %} + %option noyywrap main + %% + .+ ECHO; + %% + EOS + system bin/"reflex", "--flex", "echo.l" + assert_path_exists testpath/"lex.yy.cpp" + end +end diff --git a/Formula/r/re2.rb b/Formula/r/re2.rb new file mode 100644 index 0000000000000..8fc06fd8d8024 --- /dev/null +++ b/Formula/r/re2.rb @@ -0,0 +1,69 @@ +class Re2 < Formula + desc "Alternative to backtracking PCRE-style regular expression engines" + homepage "https://github.com/google/re2" + url "https://github.com/google/re2/archive/refs/tags/2025-08-12.tar.gz" + version "20250812" + sha256 "2f3bec634c3e51ea1faf0d441e0a8718b73ef758d7020175ed7e352df3f6ae12" + license "BSD-3-Clause" + revision 1 + head "https://github.com/google/re2.git", branch: "main" + + # The `strategy` block below is used to massage upstream tags into the + # YYYYMMDD format used in the `version`. This is necessary for livecheck + # to be able to do proper `Version` comparison. + livecheck do + url :stable + regex(/^(\d{2,4}-\d{2}-\d{2})$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.gsub(/\D/, "") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "ff728da4d5c417e3412d0713846b06c4aadfac16130be2731f5826173aa684f5" + sha256 cellar: :any, arm64_sequoia: "55dd029d2e6c7a466bced9d25336943ce0f2cee303417ede765d188e3b110cf7" + sha256 cellar: :any, arm64_sonoma: "e8855b22823e960f98d6f0d43947fb7a4ad1b9ed9cee487bbb59e57cdcb7e5af" + sha256 cellar: :any, arm64_ventura: "8e907a1fe489e9d5d07635364d1639aa670d15d149d4a3a1ffc141d28c2c6a6d" + sha256 cellar: :any, sonoma: "1b4225bec7a3a0d486e8935894b425c4919d48b38f9df43fe3ad0d346cab9246" + sha256 cellar: :any, ventura: "a33952db79252f40d49541050612303ebe3ad5efdc41e57fae2a5f7289ec7f84" + sha256 cellar: :any_skip_relocation, arm64_linux: "2eab07e068468b3efa6beb394d8f97dce0f86186e3a44a20d70c701f7d23dcf7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be87e985f9cbfd6152865d81d7fbed47609f3b9129fa4282326b32389f18a1b1" + end + + depends_on "cmake" => :build + depends_on "abseil" + + def install + # Build and install static library + system "cmake", "-S", ".", "-B", "build-static", + "-DRE2_BUILD_TESTING=OFF", + *std_cmake_args + system "cmake", "--build", "build-static" + system "cmake", "--install", "build-static" + + # Build and install shared library + system "cmake", "-S", ".", "-B", "build-shared", + "-DBUILD_SHARED_LIBS=ON", + "-DRE2_BUILD_TESTING=OFF", + *std_cmake_args + system "cmake", "--build", "build-shared" + system "cmake", "--install", "build-shared" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + assert(!RE2::FullMatch("hello", "e")); + assert(RE2::PartialMatch("hello", "e")); + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", + "-I#{include}", "-L#{lib}", "-lre2" + system "./test" + end +end diff --git a/Formula/r/re2c.rb b/Formula/r/re2c.rb new file mode 100644 index 0000000000000..9121a175cbd2f --- /dev/null +++ b/Formula/r/re2c.rb @@ -0,0 +1,48 @@ +class Re2c < Formula + desc "Generate C-based recognizers from regular expressions" + homepage "https://re2c.org/" + url "https://github.com/skvadrik/re2c/releases/download/4.3/re2c-4.3.tar.xz" + sha256 "51e88d6d6b6ab03eb7970276aca7e0db4f8e29c958b84b561d2fdcb8351c7150" + license :public_domain + + bottle do + sha256 arm64_tahoe: "71ef43c036e5c63887d5e8bcea1c9bb34f633f8ab53158f28ca0b94af81a2830" + sha256 arm64_sequoia: "8af3d368bb97ad1fca52b58385bd33523a8587ed79036b0fdc233a6df0bdb865" + sha256 arm64_sonoma: "4fdcab1947266afe8f2ecac94bf80060c75103d370588f61e7f1c85a12d40d30" + sha256 arm64_ventura: "d45992c2f3023ff4a762e448e3dcd5f2baa66b34868012e3fb77884c28c5cc1c" + sha256 sonoma: "dc97c9542c9def4083ca1e4c62f62c10ec407e4706075c05c2e732e1c0deb8c8" + sha256 ventura: "06ff78768145b697c5c6d0cee283ac49405df8114bbc74ec05d78ba1e955c208" + sha256 arm64_linux: "d8f608d8de18762b59b5f5405d86fc714f08167055e073b766322a748c850c19" + sha256 x86_64_linux: "9b743cf994ab2fdc44ef29d35a142f0a4115a045a4e5e6ba07abce9b8cfbba77" + end + + uses_from_macos "python" => :build + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + unsigned int stou (const char * s) + { + # define YYCTYPE char + const YYCTYPE * YYCURSOR = s; + unsigned int result = 0; + + for (;;) + { + /*!re2c + re2c:yyfill:enable = 0; + + "\x00" { return result; } + [0-9] { result = result * 10 + c; continue; } + */ + } + } + C + system bin/"re2c", "-is", testpath/"test.c" + end +end diff --git a/Formula/r/react-native-cli.rb b/Formula/r/react-native-cli.rb new file mode 100644 index 0000000000000..663d9e045b225 --- /dev/null +++ b/Formula/r/react-native-cli.rb @@ -0,0 +1,26 @@ +class ReactNativeCli < Formula + desc "Tools for creating native apps for Android and iOS" + homepage "https://facebook.github.io/react-native/" + url "https://registry.npmjs.org/react-native-cli/-/react-native-cli-2.0.1.tgz" + sha256 "f1039232c86c29fa0b0c85ad2bfe0ff455c3d3cd9af9d9ddb8e9c560231a8322" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "405acef03b37460580b26bc0184b0891653cb58f130b25bcf1f454c0968a8e70" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/react-native init test --version=react-native@0.59.x") + assert_match "Run instructions for Android", output + end +end diff --git a/Formula/r/readerwriterqueue.rb b/Formula/r/readerwriterqueue.rb new file mode 100644 index 0000000000000..2531248b758aa --- /dev/null +++ b/Formula/r/readerwriterqueue.rb @@ -0,0 +1,54 @@ +class Readerwriterqueue < Formula + desc "Fast single-producer, single-consumer lock-free queue for C++" + homepage "https://github.com/cameron314/readerwriterqueue" + url "https://github.com/cameron314/readerwriterqueue/archive/refs/tags/v1.0.7.tar.gz" + sha256 "532224ed052bcd5f4c6be0ed9bb2b8c88dfe7e26e3eb4dd9335303b059df6691" + license all_of: ["BSD-2-Clause", "Zlib"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "907ae19ab677f362e0f4e54395b94da1703ef246bcc6083787fd4de3f0fb33a2" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~EOS + #include + #include + #include + + using namespace moodycamel; + + int main() { + ReaderWriterQueue q(100); + q.enqueue(17); + bool succeeded = q.try_enqueue(18); + assert(succeeded); + + int number; + succeeded = q.try_dequeue(number); + assert(succeeded && number == 17); + + int* front = q.peek(); + assert(*front == 18); + succeeded = q.try_dequeue(number); + assert(succeeded && number == 18); + front = q.peek(); + assert(front == nullptr); + + std::cout << "OK" << std::endl; + } + EOS + + system ENV.cxx, "-I#{include}", "test.cpp", "-o", "test" + assert_equal "OK\n", shell_output(testpath/"test") + end +end diff --git a/Formula/r/readline.rb b/Formula/r/readline.rb new file mode 100644 index 0000000000000..d7601cccefe07 --- /dev/null +++ b/Formula/r/readline.rb @@ -0,0 +1,112 @@ +class Readline < Formula + desc "Library for command-line editing" + homepage "https://tiswww.case.edu/php/chet/readline/rltop.html" + url "https://ftpmirror.gnu.org/gnu/readline/readline-8.3.tar.gz" + mirror "https://ftp.gnu.org/gnu/readline/readline-8.3.tar.gz" + version "8.3.1" + sha256 "fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" + license "GPL-3.0-or-later" + + # Add new patches using this format: + # + # patch_checksum_pairs = %w[ + # 001 ..1> + # 002 ..2> + # ... + # ] + + patch_checksum_pairs = %w[ + 001 21f0a03106dbe697337cd25c70eb0edbaa2bdb6d595b45f83285cdd35bac84de + ] + + patch_checksum_pairs.each_slice(2) do |p, checksum| + patch :p0 do + url "https://ftpmirror.gnu.org/gnu/readline/readline-8.3-patches/readline83-#{p}" + mirror "https://ftp.gnu.org/gnu/readline/readline-8.3-patches/readline83-#{p}" + sha256 checksum + end + end + + # We're not using `url :stable` here because we need `url` to be a string + # when we use it in the `strategy` block. + livecheck do + url :stable + regex(/href=.*?readline[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :gnu do |page, regex| + # Match versions from files + versions = page.scan(regex) + .flatten + .uniq + .map { |v| Version.new(v) } + .sort + next versions if versions.blank? + + # Assume the last-sorted version is newest + newest_version = versions.last + + # Simply return the found versions if there isn't a patches directory + # for the "newest" version + patches_directory = page.match(%r{href=.*?(readline[._-]v?#{newest_version.major_minor}[._-]patches/?)["' >]}i) + next versions if patches_directory.blank? + + # Fetch the page for the patches directory + patches_page = Homebrew::Livecheck::Strategy.page_content( + "https://ftpmirror.gnu.org/gnu/readline/#{patches_directory[1]}", + ) + next versions if patches_page[:content].blank? + + # Generate additional major.minor.patch versions from the patch files in + # the directory and add those to the versions array + patches_page[:content].scan(/href=.*?readline[._-]?v?\d+(?:\.\d+)*[._-]0*(\d+)["' >]/i).each do |match| + versions << "#{newest_version.major_minor}.#{match[0]}" + end + + versions + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "faa8450e4edc3b34ed521de8e46b48ab12d29f16ae58648178a769287da573cc" + sha256 cellar: :any, arm64_sequoia: "3afa0c228ce704810d09d40ce7d1265777df8b9034a7bfc18f0f4c19094710a8" + sha256 cellar: :any, arm64_sonoma: "51a9a7122a89fd2464fc631f8c31721afc700b3b220ed8b0c23655514b04db73" + sha256 cellar: :any, arm64_ventura: "5788e1e5f713d5253edfc4b9d137d384b692fee6de1c79af3dba18fa7efd31c3" + sha256 cellar: :any, tahoe: "539e73fcb36921fdc276f60fe7b9c2eb9ea81876468e44457e3566f04650190f" + sha256 cellar: :any, sequoia: "85d56c6896ac184bf38b1b0867d050235fb0a4873c152b52a46748aa1b458ec9" + sha256 cellar: :any, sonoma: "1ca59c2fba1ae707b3c893bc237c6638c5140fd73795e76fb186b1176b5931ff" + sha256 cellar: :any, ventura: "722187db867ece23e06d6e1ce4b67190d602e2b456e113a9b3c5e3930de923d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "64ab04c378cb3546baef10c3804ce5c1f3ec70a293df98b8e48b674e123c28b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "148c40946804e22da82f0864b458d1eb01f23b9cf30c7b9f10501853b92ad33a" + end + + keg_only :shadowed_by_macos, "macOS provides BSD libedit" + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", "--with-curses" + # FIXME: Setting `SHLIB_LIBS` should not be needed, but, on Linux, + # many dependents expect readline to link with ncurses and + # are broken without it. Readline should be agnostic about + # the terminfo library on Linux. + system "make", "install", "SHLIB_LIBS=-lcurses" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() + { + printf("%s\\n", readline("test> ")); + return 0; + } + C + + system ENV.cc, "-L", lib, "test.c", "-L#{lib}", "-lreadline", "-o", "test" + assert_equal "test> Hello, World!\nHello, World!", pipe_output("./test", "Hello, World!\n").strip + end +end diff --git a/Formula/r/readosm.rb b/Formula/r/readosm.rb new file mode 100644 index 0000000000000..6f24f68273349 --- /dev/null +++ b/Formula/r/readosm.rb @@ -0,0 +1,54 @@ +class Readosm < Formula + desc "Extract valid data from an Open Street Map input file" + homepage "https://www.gaia-gis.it/fossil/readosm/index" + url "https://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-1.1.0a.tar.gz" + sha256 "db7c051d256cec7ecd4c3775ab9bc820da5a4bf72ffd4e9f40b911d79770f145" + license any_of: ["MPL-1.1", "GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url :homepage + regex(/href=.*?readosm[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a497589a49224223074fbcec14b159fa14e3b1d9c5312035ca21026e6963e4c" + sha256 cellar: :any, arm64_sequoia: "08bbbc1a2839abc8e05b2e77ca2ccf248dc1ff4525ce893329d41306dfc33736" + sha256 cellar: :any, arm64_sonoma: "ec95a91f77c40f87229dab3be2be87e40354ac76c9517752524cccb44ae20219" + sha256 cellar: :any, arm64_ventura: "159a85b13ee27c3aec192f7cdfb26f58677890ca98768a1f9ab4a6843eefc791" + sha256 cellar: :any, arm64_monterey: "938d6d422d3eb547b702f3bbeb547b1a6879f37782d72c705475a61fede5c780" + sha256 cellar: :any, arm64_big_sur: "bd41553e655ddd0efb25350087b8247102f308e40e20de46274a703beee4a1de" + sha256 cellar: :any, sonoma: "0db75c5f56cc0358622ea46bebd793fdc1417b318dd92fc377562aee2fe6070b" + sha256 cellar: :any, ventura: "9e6e4ee8ebb6ee681d5280fcf8e61e5ffbd0acb2bc2e6b97c6bf1bce32b37023" + sha256 cellar: :any, monterey: "37ac4df09be8730582ff8b11bf3480145eabdd697bf3335f80e7c6629b7bc74e" + sha256 cellar: :any, big_sur: "6f0a6b5f33f57429ed7d4608cf6819d85b829468abd7c954c381a599c8c73647" + sha256 cellar: :any, catalina: "2ea6c35bdfab9c28d9a5bc8a87e5306cbec6be17c26b1ad6f63ca70207a332a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc269327efe3b1d43e2ef9040b17cd094fa6334f128ee9a18af4e5f58a23a4d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ba3380d75fdc00590269ff90d2f0b6d4daab79b63ded61df883cadb0f5d96c0" + end + + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + + # Install examples but don't include Makefiles or objects + doc.install "examples" + rm doc.glob("examples/Makefile*") + rm doc.glob("examples/*.o") + end + + test do + system ENV.cc, doc/"examples/test_osm1.c", "-o", testpath/"test", + "-I#{include}", "-L#{lib}", "-lreadosm" + assert_equal "usage: test_osm1 path-to-OSM-file", + shell_output("./test 2>&1", 255).chomp + end +end diff --git a/Formula/r/readpe.rb b/Formula/r/readpe.rb new file mode 100644 index 0000000000000..dfe1144361860 --- /dev/null +++ b/Formula/r/readpe.rb @@ -0,0 +1,39 @@ +class Readpe < Formula + desc "PE analysis toolkit" + homepage "https://github.com/mentebinaria/readpe" + url "https://github.com/mentebinaria/readpe/archive/refs/tags/v0.85.1.tar.gz" + sha256 "3218099d94c81488a4b042d86f64a4076835e1f2f2aff8ed4d58f01c20567507" + license "GPL-2.0-or-later" + head "https://github.com/mentebinaria/readpe.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "c4c0d71502a8cbcd7c90f1da7409e316bb15d84c2e003541bd63da2362451ebe" + sha256 arm64_sequoia: "39059d97cdfec3a8b1bb7eca3a7acd3c0f1e8c4e1e322ec14db9bb38c15424ca" + sha256 arm64_sonoma: "d32bd36d656dc44a83bb6dfadf5ec738c4fe11804b804a916b1cb53400434a6c" + sha256 arm64_ventura: "c5c6fb0c7ff57141804b2982fcb3f59611df7f3a85ce73c2b665b04f548ca633" + sha256 sonoma: "045c12282c8a90c85934c9f5ca06471ce865c64647c4be3a49606ae6ae09403a" + sha256 ventura: "73c192ae123766a4233942303830ab98f3c4c959ad62897a229f161fd77ea8db" + sha256 arm64_linux: "d493e303872e675b270d1c178913925c24de9124e9cabe0adc5d1b4bc845f918" + sha256 x86_64_linux: "50faef2834685643cdf64ddd6a6f3e87e3f70fdb7f813de2a0c88aaddb84a253" + end + + depends_on "openssl@3" + + def install + ENV.deparallelize + inreplace "lib/libpe/Makefile", "-flat_namespace", "" + system "make", "prefix=#{prefix}", "CC=#{ENV.cc}" + system "make", "prefix=#{prefix}", "install" + end + + test do + resource "homebrew-testfile" do + url "https://the.earth.li/~sgtatham/putty/0.78/w64/putty.exe" + sha256 "fc6f9dbdf4b9f8dd1f5f3a74cb6e55119d3fe2c9db52436e10ba07842e6c3d7c" + end + + resource("homebrew-testfile").stage do + assert_match(/Bytes in last page:\s+120/, shell_output("#{bin}/readpe ./putty.exe")) + end + end +end diff --git a/Formula/r/readsb.rb b/Formula/r/readsb.rb new file mode 100644 index 0000000000000..a4e0f3aea0d89 --- /dev/null +++ b/Formula/r/readsb.rb @@ -0,0 +1,61 @@ +class Readsb < Formula + desc "ADS-B decoder swiss knife" + homepage "https://github.com/wiedehopf/readsb" + url "https://github.com/wiedehopf/readsb/archive/refs/tags/v3.16.5.tar.gz" + sha256 "0457b158d99619903fd37e24566c1c540356d49279d3781efb4d2058a09fdf5a" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ca88420c6ac63712b0406e7f8eaba28227f847f459648b4a1ea68bc721571129" + sha256 cellar: :any, arm64_sequoia: "5e3b2a2037706e06fb737421241952c658572858e3cab38430a0c60b3677ad27" + sha256 cellar: :any, arm64_sonoma: "186496bfa3181e97d7770d387aa363d6a2ef1b990e3a561be91d7096a192d9c7" + sha256 cellar: :any, sonoma: "b82cb166086e5925454d4a49829189ce5bb9c74b893c7423ca5274b8b547ecc7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5c5f32c276928352201438e59b9e5127db587c05d6224e18ed2a27fa31e8da3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3019a4f2b539a7d1b1d07183030742179df2d9d0f1cba1e9ce66403042ba1689" + end + + depends_on "pkgconf" => :build + depends_on "librtlsdr" + depends_on "zstd" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "libusb" + end + + def install + ENV["RTLSDR"] = "yes" + system "make" + bin.install "readsb" + end + + test do + require "base64" + + enc = <<~EOS + goB/en99g4B9gH6Eg35/fICVhJl/gXx9f4F+f36Af4B/f3+AgH9+f39/gH+Af4CBf4F/f3 + 9/f3+AgIGAgH9/f4F/gX9/gH+Bf4B/f3+Af4F+f359gX5/f36BgYB9fIeGm46Ig3p+mIGYfX19f + oGFf4B/gIGAf3+AgoR8dHVle3iBhH98fn6AgIB+gIB/gIF/f4F+gYCAf3+AfoB/fX6CgICAen6K + i5WQhIF6foOBgYB9g454lW6CfH2Cg36AgYCBgX6Af4CAf4B/gICAf39/gICAf39/gICAf35/f4B + /f35+fn6Af4B/f4B/gIB+f35+gX+BfoF/f39/fYF/fIGDgYF/aHttfISAgIB9gYGBfn6AgIF8fn + 6DlIaXgYF+fn+Df3+AgH+Cf4CAgH+Af4CAf4B+f4CAgH9+f39/foGCgH9xbG1wf4KDgHl/hIGCf + mSIc4mYfJB9jHSUb4N+e36CgYCCfmp/a3p1cmh3dYGHf39+foCAfX9+gIF9cIddm2ybhIV/e3qZ + gqyBkYiJjZSHipOJlYp9fIN+pn+ncol3eoGJd5lgjVt+eoCEe2V3aHt5Z2RfY3R8bntjen6BgYB + hiFmZc46FeXuMd5x/iX+Siq2PmH17hoWUk42GkoGVgpF7k3yOd49wjnSGbIdrhHB8Z3xwfHBsWG + Vlf4N/gGR4bXlwg2eIdoJpkFyfd417jHWdg4h+eYSal6qNkIyFk42PhZaAkYOOeplyhnl3fpBvm + FeEYn6Ff3x4ZHlydnNjYmNwfIN/gGN9UYVli4CBfH1mk2OmeZmDfnuFhqaQpIaIjoyWkYF+f32d + h6t7knV7got4lGmEd4hsi1CAaXx5dGR4dYOGcXFncn2CgoF7gH+Cf4F+f4CAf4GAgYF/gH+AgIB + /f39/gIF+gH1/f3+Af4CAfoB+f39/gYB/fn5+gIB+fX5+gIJ+e4CCf4F+XYpcjnmGcJBxk4N9fI + R7qIiphox+fIWLm52kkoh/fIGXgJd7iH2dbKBkhXaHb4tkfn1+gX1fa1VzcoeFdnhlc3R8bXxQh + mOMg395hmySdo97knuTgI6CkYWTiZKKkJCKkYiPh5iBkn+Pfqhvn2t9gYB9jGaHcIBwfGZ/dHNp + ZFpzc3N5Y3N3gYOAY39TkGuSgoB8f22ecqp8joKOhp5+hYF8kJOPjZKAlIeQg5d5kX6PeKJnlmy + Bc4hshW18a4BrfXBwaXVzhIVxdVJvY311gGSGb4WFfHOMbZd7iXiYfa6Dk354hYqNloyKkIiRiJ + J/k4CRfpVyj3mNdplbj2aAd4Njgm19hnlwdWdxd21zbnRufWw= + EOS + + (testpath/"input.bin").write Base64.decode64(enc) + assert_match "ICAO Address:", shell_output("#{bin}/readsb --device-type ifile --ifile input.bin 2>/dev/null") + end +end diff --git a/Formula/r/reattach-to-user-namespace.rb b/Formula/r/reattach-to-user-namespace.rb new file mode 100644 index 0000000000000..b690808be65a7 --- /dev/null +++ b/Formula/r/reattach-to-user-namespace.rb @@ -0,0 +1,35 @@ +class ReattachToUserNamespace < Formula + desc "Reattach process (e.g., tmux) to background" + homepage "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard" + url "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/archive/refs/tags/v2.9.tar.gz" + sha256 "e4df00ead6b267a027a4ea35032bcfa114d91e709b1986ec0cbaee6825cec436" + license "BSD-2-Clause" + head "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "33e476a85796e31103b568becc52eacb83185bc9cd763cde17d4cf1cc8ef7198" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd39282391ec191e5421c47cf7dbc9c7c4a58ac1cf271d09b453d49e0068b3fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c946e781c18777b2156251b59a44f1db80cd39d59c18dce460011a0176566b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff12e77b3cfc11ea931010a16a2c1a1ffb4bd893b6644f29966507fcdbe02b8c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ea86d8655e6e86620d1502bdf84edfb6950e4f36b2f6919541fcfe45817a4233" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ebbf92257744971b555e6f1abb0205b5ee09986b47168d94f235b302974536b9" + sha256 cellar: :any_skip_relocation, sonoma: "3cb86ce647f290fcc0752a0bc7d26776768a2fff11a9ec95c0bac3f82a137492" + sha256 cellar: :any_skip_relocation, ventura: "c84b1082f8e2b8b6b5d43b1fff674f6c32add385b7267a01b80fc74f154ed9bc" + sha256 cellar: :any_skip_relocation, monterey: "5ef00eb2cd133afffbb67caef646fe99e8a8fb53ede9b8ddb6de1f20206760c6" + sha256 cellar: :any_skip_relocation, big_sur: "8b715171e1c8ce8f86cddc241340a7a6f4f263e770d912894cf580790f8d8aa4" + sha256 cellar: :any_skip_relocation, catalina: "8ab11a5fa7512f5d7ef8fe62a5275325f3721e13fde2b0831d1f615e8820c341" + end + + depends_on :macos + + def install + system "make" + bin.install "reattach-to-user-namespace" + end + + test do + system bin/"reattach-to-user-namespace", "-l", "bash", "-c", "echo Hello World!" + end +end diff --git a/Formula/r/reaver.rb b/Formula/r/reaver.rb new file mode 100644 index 0000000000000..ad61bc60c8c9d --- /dev/null +++ b/Formula/r/reaver.rb @@ -0,0 +1,41 @@ +class Reaver < Formula + desc "Implements brute force attack to recover WPA/WPA2 passkeys" + homepage "https://github.com/t6x/reaver-wps-fork-t6x" + url "https://github.com/t6x/reaver-wps-fork-t6x/releases/download/v1.6.6/reaver-1.6.6.tar.xz" + sha256 "e329a0da0b6dd888916046535ff86a6aa144644561937954e560bb1810ab6702" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1a2342c639b7515a7f1870db8baf31ac8d6aec8d7dbf28006b4a98263fdfc142" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67906250f6cd74d13aa313315e80b46b0998e898a1c0589dcb67a3652b02081f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "700af545d75c81c4edaecf553e15ca681dca5d5c99beb69c54eac5698e75ccc6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5905b2c9cb255997aafa2a96c694b88b75dd39eabddcd1801d05971b4331c24" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3e4fe541cec1d31a1e6836829dcf050586e385cd030664c8971f9aac369e2313" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fa4d8cefff1f3c59bcb4cad2a696bc5e16c1f82d201afe7bc78b22f28f182493" + sha256 cellar: :any_skip_relocation, sonoma: "bb11e575c8196d0ac3d917c1a7782799237814f3956b9b592b43bdaec542ff61" + sha256 cellar: :any_skip_relocation, ventura: "be139f6efa3077d3c328684afe33401c2ca6e09e716bf8842d6acc7c71972c9d" + sha256 cellar: :any_skip_relocation, monterey: "69e3fcd6c69e7e71bfdbf84a780f466097163cc8a34f8928350d02b4fb57a1ce" + sha256 cellar: :any_skip_relocation, big_sur: "ec036d6b49bce14bfdee5ff3f7f03468148d60b48c06ee75bfd156a9c387baf1" + sha256 cellar: :any_skip_relocation, catalina: "e4f10cca5698e3ae3d03841e67d84d277d8e05a06c181567a2a1de5ad74f40a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "372d02db04ebd4e99b333c155eeddedb257fa4eb0340feaed66507713c0553fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5301d082e3bd0a833d6b352e994d3b39edced488a46ef597b17aaa1e25669989" + end + + depends_on "pixiewps" + + uses_from_macos "libpcap" + uses_from_macos "sqlite" + + def install + # reported upstream in https://github.com/t6x/reaver-wps-fork-t6x/issues/195 + man1.install "docs/reaver.1" + prefix.install_metafiles "docs" + cd "src" + system "./configure", "--prefix=#{prefix}" + system "make" + bin.mkpath + system "make", "install" + end +end diff --git a/Formula/r/rebar3.rb b/Formula/r/rebar3.rb new file mode 100644 index 0000000000000..e56b7c4e96c8e --- /dev/null +++ b/Formula/r/rebar3.rb @@ -0,0 +1,61 @@ +class Rebar3 < Formula + desc "Erlang build tool" + homepage "https://rebar3.org" + url "https://github.com/erlang/rebar3/archive/refs/tags/3.25.1.tar.gz" + sha256 "458d6ceaf7822dd7682288354ab3ba74e14b3ed11cc5b551af9eb312de894106" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aebec9fe1982491daae78a116accfed673ab509c7b91168c048264b7516a03d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ddc64334491a6041c62359f0071023f05c70165aa57d221a1924f378f932541" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b730f3c3eb084553b25e1fa3335188c31f6a41289057bab6715478c6f8ce799" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e0349d3cde36fc0aa4e93a1ba35ab9a6ea44d8e526bb88f9cd4bd8aff7865896" + sha256 cellar: :any_skip_relocation, sonoma: "00743ddb3ff230137c07049b4e837ca34065ec65156ab654e05f69107115e973" + sha256 cellar: :any_skip_relocation, ventura: "d9e245b9abc51ba4ec06e7d9b803bbaf638cec0e9a087482261d38d4f418cd18" + sha256 cellar: :any_skip_relocation, arm64_linux: "d230caab68a05bab0f6b2ad7635e3f0c20f87cb5458791d9c584a0bb4e07c03a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b391ea3eceb1883cb2ec84a9b94b2803f9991cf2344d4672fdd7cd5bdaafa41" + end + + depends_on "erlang@26" => [:build, :test] + depends_on "erlang" + + def install + erlang_build_dep = deps.find { |dep| dep.build? && dep.name.match?(/^erlang@\d+$/) }&.to_formula + odie "Could not find build-time erlang!" if erlang_build_dep.blank? + + # To guarantee compatibility with various erlang versions, build with an older erlang. + # We want to use `erlang@#{x-2}` where x is the major version of the `erlang` formula. + build_erlang_version = erlang_build_dep.version.major.to_i + wanted_erlang_version = Formula["erlang"].version.major.to_i - 2 + if wanted_erlang_version != build_erlang_version + odie "This formula should be built with `erlang@#{wanted_erlang_version}`" + end + + # Ensure we're building with versioned `erlang` + ENV.remove "PATH", "#{Formula["erlang"].opt_bin}:" + system "./bootstrap" + bin.install "rebar3" + + bash_completion.install "apps/rebar/priv/shell-completion/bash/rebar3" + zsh_completion.install "apps/rebar/priv/shell-completion/zsh/_rebar3" + fish_completion.install "apps/rebar/priv/shell-completion/fish/rebar3.fish" + end + + test do + deps.each do |dep| + next unless dep.name.match?(/^erlang(@\d+)?$/) + + erlang = dep.to_formula + erlang_bin = erlang.opt_bin + erlang_version = erlang.version.major + with_env(PATH: "#{erlang_bin}:#{ENV["PATH"]}") do + assert_match "OTP #{erlang_version}", shell_output("#{bin}/rebar3 --version") + end + end + end +end diff --git a/Formula/r/recc.rb b/Formula/r/recc.rb new file mode 100644 index 0000000000000..4ffa6becd0316 --- /dev/null +++ b/Formula/r/recc.rb @@ -0,0 +1,131 @@ +class Recc < Formula + desc "Remote Execution Caching Compiler" + homepage "https://buildgrid.gitlab.io/recc" + url "https://gitlab.com/BuildGrid/buildbox/buildbox/-/archive/1.3.42/buildbox-1.3.42.tar.gz" + sha256 "23eb5041bea63a86143c7ec8c8a48b45533f2553973303e270d24fc9adb49539" + license "Apache-2.0" + head "https://gitlab.com/BuildGrid/buildbox/buildbox.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "9aced8abe7251c571161bdea86170f81e8171c5299fa38084146e614238f87a5" + sha256 arm64_sequoia: "fee199181abc335feddeecb62f3e88c16bc0cde1dd522a50a89ee70c6e4610d6" + sha256 arm64_sonoma: "e523b16993eaf3bf7eeb112e4c34fbc5d0fa6618f60208d6b79c1e4486e0c2a3" + sha256 sonoma: "3f0954712c40d4da944bfeffaf729f020d3c7793eb69b8f59b8f053f86c6df80" + sha256 arm64_linux: "655e800c733ead70eaabf50b8f1f8df109bd6f0b98da7d3dc03b29c79444c337" + sha256 x86_64_linux: "7f832ae3b44da7d254a65100afac65ff47cfdd6dda8ec7276396f5a3ec5d5180" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build # for envsubst + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + depends_on "tomlplusplus" => :build + depends_on "abseil" + depends_on "c-ares" + depends_on "glog" + depends_on "grpc" + depends_on macos: :sonoma # Needs C++20 features not in Ventura + depends_on "openssl@3" + depends_on "protobuf" + depends_on "re2" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "gflags" + end + + on_linux do + depends_on "pkgconf" => :build + depends_on "util-linux" + end + + def install + buildbox_cmake_args = %W[ + -DCASD=ON + -DCASD_BUILD_BENCHMARK=OFF + -DCASDOWNLOAD=OFF + -DCASUPLOAD=OFF + -DFUSE=OFF + -DLOGSTREAMRECEIVER=OFF + -DLOGSTREAMTAIL=OFF + -DOUTPUTSTREAMER=OFF + -DRECC=ON + -DREXPLORER=OFF + -DRUMBA=OFF + -DRUN_BUBBLEWRAP=OFF + -DRUN_HOSTTOOLS=ON + -DRUN_OCI=OFF + -DRUN_USERCHROOT=OFF + -DTREXE=OFF + -DWORKER=OFF + -DRECC_CONFIG_PREFIX_DIR=#{etc} + ] + system "cmake", "-S", ".", "-B", "build", *buildbox_cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + makefile_args = %W[ + RECC=#{opt_bin}/recc + RECC_CONFIG_PREFIX=#{etc} + RECC_SERVER=unix://#{var}/recc/casd/casd.sock + RECC_INSTANCE=recc-server + RECC_REMOTE_PLATFORM_ISA=#{Hardware::CPU.arch} + RECC_REMOTE_PLATFORM_OSFamily=#{OS.kernel_name.downcase} + RECC_REMOTE_PLATFORM_OSRelease=#{OS.kernel_version} + ] + system "make", "-f", "scripts/wrapper-templates/Makefile", *makefile_args + etc.install "recc.conf" + bin.install "recc-cc" + bin.install "recc-c++" + + bin.install "scripts/wrapper-templates/casd-helper" => "recc-server" + end + + service do + run [opt_bin/"recc-server", "--local-server-instance", "recc-server", "#{var}/recc/casd"] + keep_alive true + working_dir var/"recc" + log_path var/"log/recc-server.log" + error_log_path var/"log/recc-server-error.log" + environment_variables PATH: std_service_path_env + end + + def caveats + <<~EOS + To launch a compiler with recc, set the following variables: + CC=#{opt_bin}/recc-cc + CXX=#{opt_bin}/recc-c++ + EOS + end + + test do + # Start recc server + recc_cache_dir = testpath/"recc_cache" + recc_cache_dir.mkdir + recc_casd_pid = spawn bin/"recc-server", "--local-server-instance", "recc-server", recc_cache_dir + + # Create a source file to test caching + test_file = testpath/"test.c" + test_file.write <<~C + int main() {} + C + + # Wait for the server to start + sleep 2 unless (recc_cache_dir/"casd.sock").exist? + + # Override default values of server and log_level + ENV["RECC_SERVER"] = "unix://#{recc_cache_dir}/casd.sock" + ENV["RECC_LOG_LEVEL"] = "info" + recc_test=[bin/"recc-cc", "-c", test_file] + + # Compile the test file twice. The second run should get a cache hit + system(*recc_test) + output = shell_output("#{recc_test.join(" ")} 2>&1") + assert_match "Action Cache hit", output + + # Stop the server + Process.kill("TERM", recc_casd_pid) + end +end diff --git a/Formula/r/reckoner.rb b/Formula/r/reckoner.rb new file mode 100644 index 0000000000000..eb5c04df0b28c --- /dev/null +++ b/Formula/r/reckoner.rb @@ -0,0 +1,51 @@ +class Reckoner < Formula + desc "Declaratively install and manage multiple Helm chart releases" + homepage "https://github.com/FairwindsOps/reckoner" + url "https://github.com/FairwindsOps/reckoner/archive/refs/tags/v6.2.0.tar.gz" + sha256 "7d43511db233739f1584c2d0875333c97a9470b4689dd2d65a36d1d591096d7a" + license "Apache-2.0" + head "https://github.com/FairwindsOps/reckoner.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03aea7e1ff644a4073e2434ff7ae3c883bbc6bd394b83a2aaecf2eec4a586381" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e819d54160c7f34ccc327200798bee113bdfa2cac49ce7c73b7b80dd1dbb6512" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e819d54160c7f34ccc327200798bee113bdfa2cac49ce7c73b7b80dd1dbb6512" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e819d54160c7f34ccc327200798bee113bdfa2cac49ce7c73b7b80dd1dbb6512" + sha256 cellar: :any_skip_relocation, sonoma: "562a31411a4351cedcc0bb15a92147836bcf3444f36b44086e2bb4be34e8a808" + sha256 cellar: :any_skip_relocation, ventura: "562a31411a4351cedcc0bb15a92147836bcf3444f36b44086e2bb4be34e8a808" + sha256 cellar: :any_skip_relocation, arm64_linux: "f840ec2114c6a8ac13d7c81e0562b1bf14b20c58407f644abdec811b623d6b35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a04b4b6ff5871fcc12e09cbfe65a9b8b06be2a9a3fd90d2e8b8337100b0087fb" + end + + depends_on "go" => :build + depends_on "helm" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version} -X main.commit=#{tap.user}") + + generate_completions_from_executable(bin/"reckoner", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/reckoner version") + + # Basic Reckoner course file + (testpath/"course.yaml").write <<~YAML + schema: v2 + namespace: test + repositories: + stable: + url: https://charts.helm.sh/stable + releases: + - name: nginx + namespace: test + chart: stable/nginx-ingress + version: 1.41.3 + values: + replicaCount: 1 + YAML + + output = shell_output("#{bin}/reckoner lint #{testpath}/course.yaml 2>&1") + assert_match "No schema validation errors found", output + end +end diff --git a/Formula/r/recode.rb b/Formula/r/recode.rb new file mode 100644 index 0000000000000..2fc5b81f5db2f --- /dev/null +++ b/Formula/r/recode.rb @@ -0,0 +1,33 @@ +class Recode < Formula + desc "Convert character set (charsets)" + homepage "https://github.com/rrthomas/recode" + url "https://github.com/rrthomas/recode/releases/download/v3.7.15/recode-3.7.15.tar.gz" + sha256 "f590407fc51badb351973fc1333ee33111f05ec83a8f954fd8cf0c5e30439806" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "405e897606d94d94722132d288750bf0c609f9a545b88dbeee6a80882dfec1cb" + sha256 cellar: :any, arm64_sequoia: "ae73bc0697143ac801aa1e31b27be127877d06fa6a366d8fb899a3261bb8de5e" + sha256 cellar: :any, arm64_sonoma: "8f613a6ea840f5097d52b38a046db4d0fda412b906a98e215375104e9fdbeb05" + sha256 cellar: :any, arm64_ventura: "18e154be855e36d7352b192f4a886cb461bd9580496b90100b2c3d8eb2b14297" + sha256 cellar: :any, sonoma: "99fce903fbcf4b521eef4e7f9017f4cd11b772b5ae6eda8b85841a83b4d47436" + sha256 cellar: :any, ventura: "ee4a5b927e4e1de464895aadc1a9b6d51bad94ac2617ef91fc49678fee7f6685" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae507a89cd038723bbc75c818979f9519917eb3ad718ed0debb023130eedc571" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0863f449422de1753db9eec031492961cbbdb64e76b75211ed354b320cb96a0b" + end + + uses_from_macos "python" => :build + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/recode --version") + end +end diff --git a/Formula/r/recon-ng.rb b/Formula/r/recon-ng.rb new file mode 100644 index 0000000000000..7fd2b61d3d8bc --- /dev/null +++ b/Formula/r/recon-ng.rb @@ -0,0 +1,247 @@ +class ReconNg < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Web Reconnaissance Framework" + homepage "https://github.com/lanmaster53/recon-ng" + # See the REQUIREMENTS file in the archive for the top level of dependencies. + # Please check for changes that may have been made since the last update. + # Update `pypi_packages` if necessary and run `brew update-python-resources recon-ng`. + url "https://github.com/lanmaster53/recon-ng/archive/refs/tags/v5.1.2.tar.gz" + sha256 "18d05030b994c9b37f624628251d3376d590f3d1eec155f67aca88fa5f3490cc" + license "GPL-3.0-only" + revision 2 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "624c5eeb28aa689db420ded883a707a545c292eeeb54f17eac5e2d18a65c9514" + sha256 cellar: :any, arm64_sequoia: "617bda432f768eaf5168a93ec58b5c8eceddeca49b22980e21b3d6f4e4c6c741" + sha256 cellar: :any, arm64_sonoma: "10b38a28d92ce036e3a69d96d04efec61e63a99c80b60cad42ba54a17cd55191" + sha256 cellar: :any, sonoma: "7790200ba77568d8695235433a5b833dfe76b29484c4cd9f68d58f3970c7e229" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2bca243e4f8d7216b1c93808f5d7d611604951a8a4c932df82d3224b2779634" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8aaf3b13b3f6b68dfe5bac610c9cb849824e8cc2509b9be4ef27b6f9aea816f" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages package_name: "", + exclude_packages: ["certifi", "rpds-py"], + extra_packages: %w[pyyaml dnspython lxml mechanize requests + flask flask-restful flasgger dicttoxml + xlsxwriter unicodecsv rq] + + resource "aniso8601" do + url "https://files.pythonhosted.org/packages/8b/8d/52179c4e3f1978d3d9a285f98c706642522750ef343e9738286130423730/aniso8601-10.0.1.tar.gz" + sha256 "25488f8663dd1528ae1f54f94ac1ea51ae25b4d531539b8bc707fed184d16845" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "croniter" do + url "https://files.pythonhosted.org/packages/ad/2f/44d1ae153a0e27be56be43465e5cb39b9650c781e001e7864389deb25090/croniter-6.0.0.tar.gz" + sha256 "37c504b313956114a983ece2c2b07790b1f1094fe9d81cc94739214748255577" + end + + resource "dicttoxml" do + url "https://files.pythonhosted.org/packages/ee/c9/3132427f9e64d572688e6a1cbe3d542d1a03f676b81fb600f3d1fd7d2ec5/dicttoxml-1.7.16.tar.gz" + sha256 "6f36ce644881db5cd8940bee9b7cb3f3f6b7b327ba8a67d83d3e2caa0538bf9d" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "flasgger" do + url "https://files.pythonhosted.org/packages/8a/e4/05e80adeadc39f171b51bd29b24a6d9838127f3aaa1b07c1501e662a8cee/flasgger-0.9.7.1.tar.gz" + sha256 "ca098e10bfbb12f047acc6299cc70a33851943a746e550d86e65e60d4df245fb" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz" + sha256 "bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87" + end + + resource "flask-restful" do + url "https://files.pythonhosted.org/packages/c0/ce/a0a133db616ea47f78a41e15c4c68b9f08cab3df31eb960f61899200a119/Flask-RESTful-0.3.10.tar.gz" + sha256 "fe4af2ef0027df8f9b4f797aba20c5566801b6ade995ac63b588abf1a59cec37" + end + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + + # Fix to build with Python 3.14 + # PR ref: https://github.com/html5lib/html5lib-python/pull/589 + patch do + url "https://github.com/html5lib/html5lib-python/commit/b90dafff1bf342d34d539098013d0b9f318c7641.patch?full_index=1" + sha256 "779f8bab52308792b7ac2f01c3cd61335587640f98812c88cb074dce9fe8162d" + end + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mechanize" do + url "https://files.pythonhosted.org/packages/f5/ce/35d356959be6d8cdd5a3c8b6ea74548281ea9ae71c4d4538c076c4c986a2/mechanize-0.4.10.tar.gz" + sha256 "1dea947f9be7ea0ab610f7bbc4a4e36b45d6bfdfceea29ad3d389a88a1957ddf" + end + + resource "mistune" do + url "https://files.pythonhosted.org/packages/d7/02/a7fb8b21d4d55ac93cdcde9d3638da5dd0ebdd3a4fed76c7725e10b81cbe/mistune-3.1.4.tar.gz" + sha256 "b5a7f801d389f724ec702840c11d8fc48f2b33519102fc7ee739e8177b672164" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "redis" do + url "https://files.pythonhosted.org/packages/d2/0e/80de0c7d9b04360331906b6b713a967e6523d155a92090983eba2e99302e/redis-7.0.0.tar.gz" + sha256 "6546ada54354248a53a47342d36abe6172bb156f23d24f018fda2e3c06b9c97a" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rq" do + url "https://files.pythonhosted.org/packages/8e/f5/46e39abc46ff6ff4f3151ee4fd2c1bf7601a8d26bd30fd951c5496b1e6c6/rq-2.6.0.tar.gz" + sha256 "92ad55676cda14512c4eea5782f398a102dc3af108bea197c868c4c50c5d3e81" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "unicodecsv" do + url "https://files.pythonhosted.org/packages/6f/a4/691ab63b17505a26096608cc309960b5a6bdf39e4ba1a793d5f9b1a53270/unicodecsv-0.14.1.tar.gz" + sha256 "018c08037d48649a0412063ff4eda26eaa81eff1546dbffa51fa5293276ff7fc" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/46/2c/c06ef49dc36e7954e55b802a8b231770d286a9758b3d936bd1e04ce5ba88/xlsxwriter-3.2.9.tar.gz" + sha256 "254b1c37a368c444eac6e2f867405cc9e461b0ed97a3233b2ac1e574efb4140c" + end + + # Replace `imp` for python 3.12: https://github.com/lanmaster53/recon-ng/pull/204 + patch do + url "https://github.com/lanmaster53/recon-ng/commit/745fe3580e9a974348622163c44eba6bdb531f63.patch?full_index=1" + sha256 "10eec6be1c49a1fe3bce2b8a8145d98df92ea4d7a94e115f7735b6e53d461a94" + end + + def install + libexec.install Dir["*"] + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + + # Replace shebang with virtualenv python + rw_info = python_shebang_rewrite_info(libexec/"bin/python") + %w[recon-cli recon-ng recon-web].each do |cmd| + rewrite_shebang rw_info, libexec/cmd + bin.install_symlink libexec/cmd + end + end + + test do + (testpath/"resource").write <<~EOS + options list + exit + EOS + system bin/"recon-ng", "-r", testpath/"resource" + end +end diff --git a/Formula/r/recoverjpeg.rb b/Formula/r/recoverjpeg.rb new file mode 100644 index 0000000000000..098ee11db7df0 --- /dev/null +++ b/Formula/r/recoverjpeg.rb @@ -0,0 +1,41 @@ +class Recoverjpeg < Formula + desc "Tool to recover JPEG images from a file system image" + homepage "https://rfc1149.net/devel/recoverjpeg.html" + url "https://rfc1149.net/download/recoverjpeg/recoverjpeg-2.6.3.tar.gz" + sha256 "db996231e3680bfaf8ed77b60e4027c665ec4b271648c71b00b76d8a627f3201" + license "GPL-2.0-only" + + livecheck do + url "https://rfc1149.net/download/recoverjpeg/" + regex(/href=.*?recoverjpeg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0cf49dc7323f9987a3d847fed81edc56edd45ff8e14846c7bf9de6cc4cb360cc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5246787a0e2678f90c0df0da8f43a4eb2de1ec4ab3fcc6398f66854db6571ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8acee12074e5c4e6990042383385e5c4056e35ec43f1ee39a779768f5720a0c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f34e1452d02fd2e51fb1235a43821519c7811eaf0dea534429901ef2f948921" + sha256 cellar: :any_skip_relocation, arm64_monterey: "09b65d282127e64583e422741ae3d2980cfbd7dbc8a471fa05e3a39dea3d7efd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "68e1a85a85e46ac4b90b093c36f9e461e6566351518b76891ebd3283b95fa8c2" + sha256 cellar: :any_skip_relocation, sonoma: "1f425281c6489f684ab9ba7926410b5e7e5acad81218c3115883ef0d6a4d4efa" + sha256 cellar: :any_skip_relocation, ventura: "e0a2345c5293d9afb7e754028ed2707c443f78bdea6c43f34ea1a46ca0d24a52" + sha256 cellar: :any_skip_relocation, monterey: "a9043bcada2749bee2dd525f6aa3919cff2f45f2290234ec6302f7985acf3399" + sha256 cellar: :any_skip_relocation, big_sur: "bd56d3048f05834faf5181f4372fe49a8ef3895c291fe0ca2a434a416e305495" + sha256 cellar: :any_skip_relocation, catalina: "87b3d9adf8b59d91350b7e655a78b68525caaaad0a614c5b7e1b6097d29cf6d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6b4d36e75677621fc7e3f1749d0fc475aa660c5057d1cbb8c5e83eea8cda0d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a89fb65c4850f34a1885cd95da2fbd669f1af300fbbf940b5271c97551c9ce7" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/recoverjpeg -V") + end +end diff --git a/Formula/r/recoverpy.rb b/Formula/r/recoverpy.rb new file mode 100644 index 0000000000000..281530e49f675 --- /dev/null +++ b/Formula/r/recoverpy.rb @@ -0,0 +1,79 @@ +class Recoverpy < Formula + include Language::Python::Virtualenv + + desc "TUI to recover overwritten or deleted data" + homepage "https://github.com/PabloLec/recoverpy" + url "https://files.pythonhosted.org/packages/81/fe/ddc0694fc530839f8f854c88725d434fd4adcc05352a580906a2a73223d8/recoverpy-2.2.1.tar.gz" + sha256 "3b0db026bcb8df6178162558b3fcb2f91b70a35a34fbf36290f5543ecef612db" + license "GPL-3.0-or-later" + head "https://github.com/PabloLec/recoverpy.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9a1c7eb0190968f0df4c177633683f61fb8c28d0b7343df97ffa5bcbd1be3eca" + end + + depends_on :linux + depends_on "python@3.14" + + resource "linkify-it-py" do + url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz" + sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/b2/fd/a756d36c0bfba5f6e39a1cdbdbfdd448dc02692467d83816dff4592a1ebc/mdit_py_plugins-0.5.0.tar.gz" + sha256 "f4918cb50119f50446560513a8e311d574ff6aaed72606ddae6d35716fe809c6" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/8a/87/eda3ef12ac40b46a6d2930b89f19ffb1b8cde1ead8b24b0a31521eb8d2e6/textual-3.0.1.tar.gz" + sha256 "a5bfc924d63ceb16a4c63ce4ff4b424e5c554c4dfd71336450885c85dfc6247e" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "uc-micro-py" do + url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz" + sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a" + end + + def install + virtualenv_install_with_resources + end + + test do + pid = spawn bin/"recoverpy" + sleep 2 + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/r/recur.rb b/Formula/r/recur.rb new file mode 100644 index 0000000000000..ac10d35e40d64 --- /dev/null +++ b/Formula/r/recur.rb @@ -0,0 +1,29 @@ +class Recur < Formula + desc "Retry a command with exponential backoff and jitter" + homepage "https://github.com/dbohdan/recur" + url "https://github.com/dbohdan/recur/archive/refs/tags/v2.5.0.tar.gz" + sha256 "cf776be19cf0e55c7e8a29b546d813e1dc562c05b220cba291cb4812917bd6a7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "149117659c69734078b7f8fc1b04dbd5e2656460b033bff06669ca1f48e9bd94" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "149117659c69734078b7f8fc1b04dbd5e2656460b033bff06669ca1f48e9bd94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "149117659c69734078b7f8fc1b04dbd5e2656460b033bff06669ca1f48e9bd94" + sha256 cellar: :any_skip_relocation, arm64_ventura: "149117659c69734078b7f8fc1b04dbd5e2656460b033bff06669ca1f48e9bd94" + sha256 cellar: :any_skip_relocation, sonoma: "23ef406ebd94bc895b9af4c80947ebeecdcf8a5a559949c0fabc9df4cf00a161" + sha256 cellar: :any_skip_relocation, ventura: "23ef406ebd94bc895b9af4c80947ebeecdcf8a5a559949c0fabc9df4cf00a161" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ea2a8a6fb31399baff2bbeb66117a8e7196b509bd88f5f5be7bcd1ff48c3adc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afadb0c61c3dffaa2203399824a6debcd7cc82ef28b1f50f18a226a25d2869ca" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/recur -c 'attempt == 3' sh -c 'echo $RECUR_ATTEMPT'") + assert_equal "1\n2\n3\n", output + end +end diff --git a/Formula/r/recutils.rb b/Formula/r/recutils.rb new file mode 100644 index 0000000000000..569d6f638ffc4 --- /dev/null +++ b/Formula/r/recutils.rb @@ -0,0 +1,63 @@ +class Recutils < Formula + desc "Tools to work with human-editable, plain text data files" + homepage "https://www.gnu.org/software/recutils/" + url "https://ftpmirror.gnu.org/gnu/recutils/recutils-1.9.tar.gz" + mirror "https://ftp.gnu.org/gnu/recutils/recutils-1.9.tar.gz" + sha256 "6301592b0020c14b456757ef5d434d49f6027b8e5f3a499d13362f205c486e0e" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1195eef57e411f91d204f23655150667170fdc64242f0503b7e376deb112768a" + sha256 cellar: :any, arm64_sequoia: "f1c4d50014f990bf82b005678e5e50d0437c4832db83e80094e0fcfbad824078" + sha256 cellar: :any, arm64_sonoma: "229e25a458f74f9b9e1229b08dd839a18f7e06cede1aaecc890b645f645c80e1" + sha256 cellar: :any, arm64_ventura: "6556b10f353cbae8cc5d69cc48cb0662eaf85060794e0d29ae25950dbe02749e" + sha256 cellar: :any, arm64_monterey: "09a875626acf4c73036fc8048bf3e0e5bb7beff7fd60e1e96faa1b1d92888638" + sha256 cellar: :any, arm64_big_sur: "c2da94eb14db7fdd4f6376cd3d6546ff8cebddd64f4290fe265161f21d3fdff8" + sha256 cellar: :any, sonoma: "06f73515dcef0f167c03853cfaf8e08966cb677ce575b03484f63c69adb182e0" + sha256 cellar: :any, ventura: "50252c2587e2e32f0513c9cc71fd49c5786400f6c0d6e95891da4b43a0f873fa" + sha256 cellar: :any, monterey: "feac0920394addceefb8a23fc38a7406fed04b71bde433d14dfa703b852c5089" + sha256 cellar: :any, big_sur: "8bd10813a8870b76fdac43c99062d3449bd4275ae54af0410c85c69ba3f9ab08" + sha256 cellar: :any, catalina: "d92195d721c086a0f14fa0dcdd8014869af600d43e31749a8b8af580f49fafba" + sha256 arm64_linux: "57f094907d4b5a4075731cb05a68fb1dd726dc245c914cc695bab138c1362596" + sha256 x86_64_linux: "09224d89dd80efca59a618cb2b966ad1a2a1847d992bc27c014fe997db0148af" + end + + on_linux do + depends_on "libgcrypt" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + # Fix compile with newer Clang. Remove in the next release. + # Ref: http://git.savannah.gnu.org/cgit/recutils.git/commit/?id=e154822aeec19cb790f8618ee740875c048859e4 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--datarootdir=#{elisp}", + "--disable-silent-rules", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.csv").write <<~CSV + a,b,c + 1,2,3 + CSV + system bin/"csv2rec", "test.csv" + + (testpath/"test.rec").write <<~EOS + %rec: Book + %mandatory: Title + + Title: GNU Emacs Manual + EOS + system bin/"recsel", "test.rec" + end +end diff --git a/Formula/r/red-tldr.rb b/Formula/r/red-tldr.rb new file mode 100644 index 0000000000000..f33fa5ced2ed4 --- /dev/null +++ b/Formula/r/red-tldr.rb @@ -0,0 +1,36 @@ +class RedTldr < Formula + desc "Used to help red team staff quickly find the commands and key points" + homepage "https://payloads.online/red-tldr/" + url "https://github.com/Rvn0xsy/red-tldr/archive/refs/tags/v0.4.3.tar.gz" + sha256 "3f32a438226287d80ae86509964d7767c2002952c95da03501beb882cae22d2d" + license "MIT" + head "https://github.com/Rvn0xsy/red-tldr.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "248c7544b70a54f7fcbaf049709606c20d7619b20c165b950c0fae6022944f1b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a4763cc47c39163940cd6921068b6eabf24269fbc648f0f91c352ca46470eac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f17f3eaa4917886c572dca60179e11abd40391fbf92863ebeaef7a239d3297db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2fc1ecafec88eae6a750b9813084c58cedffbf15cfa8a5c1c4d8223783f9b410" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2f63431f0038bac796d94604322236db7f31b15759ccf3b1874597dc215a74ad" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bd91dc84b16cc8c51e243b6808f428e94ff4ba2b63165e7adf5563b5b1f9171c" + sha256 cellar: :any_skip_relocation, sonoma: "efe6fcdf5feccbd146d0f89f3b6fbbb003432e7317a6787724ce650b3394e71e" + sha256 cellar: :any_skip_relocation, ventura: "ba21a9519a354aa85fc24bfcb6bed7233ce46d2194e28d9bf49062ded1e0057d" + sha256 cellar: :any_skip_relocation, monterey: "a93d3617f3167e69b45961b876ea5ea4dfbc60b080d143e2ca95870089cb24ab" + sha256 cellar: :any_skip_relocation, big_sur: "7052eff293193940046fd1dc13c439fa81fcca5e1d7b71d9ea81e060f31284bd" + sha256 cellar: :any_skip_relocation, catalina: "b55c620a9eae179704c06f4cbb6421b6a4dc8fe4ffe6771f1e15d538ec0eaf92" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d74d6d17577a9399660266ebbec687c39657241c2252757cb66502636cde922" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b20f8338fedd79014c80a96c9e3ec990454be276fe98dcb112c169b13a7f0cf2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "privilege", shell_output("#{bin}/red-tldr mimikatz") + end +end diff --git a/Formula/r/redex.rb b/Formula/r/redex.rb new file mode 100644 index 0000000000000..ba4c6d8b1f8c3 --- /dev/null +++ b/Formula/r/redex.rb @@ -0,0 +1,144 @@ +class Redex < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Bytecode optimizer for Android apps" + homepage "https://fbredex.com/" + license "MIT" + revision 20 + head "https://github.com/facebook/redex.git", branch: "main" + + stable do + url "https://github.com/facebook/redex/archive/refs/tags/v2017.10.31.tar.gz" + sha256 "18a840e4db0fc51f79e17dfd749b2ffcce65a28e7ef9c2b3c255c5ad89f6fd6f" + + # Fix for automake 1.16.5 + patch do + url "https://github.com/facebook/redex/commit/4696e1882cf88707bf7560a2994a4207a8b7c7a3.patch?full_index=1" + sha256 "dccc41146688448ea2d99dd04d4d41fdaf7e174ae1888d3abb10eb2dfa6ed1da" + end + + # Apply upstream fixes for GCC 11 + patch do + url "https://github.com/facebook/redex/commit/70a82b873da269e7dd46611c73cfcdf7f84efa1a.patch?full_index=1" + sha256 "44ce35ca93922f59fb4d0fd1885d24cce8a08d73b509e1fd2675557948464f1d" + end + patch do + url "https://github.com/facebook/redex/commit/e81dda3f26144a9c94816c12237698ef2addf864.patch?full_index=1" + sha256 "523ad3d7841a6716ac973b467be3ea8b6b7e332089f23e4788e1f679fd6f53f5" + end + patch do + url "https://github.com/facebook/redex/commit/253b77159d6783786c8814168d1ff2b783d3a531.patch?full_index=1" + sha256 "ed69a6230506704ca4cc7a52418b3af70a6182bd96abdb5874fab02f6b1a7c99" + end + + # Fix compilation on High Sierra + # Fix boost issue (https://github.com/facebook/redex/pull/564) + # Remove for next release + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ccd598d35c980d9c5220de5fa1a9bdcf3ff6c9cdd74e20f20143f7dc3dee5694" + sha256 cellar: :any, arm64_sequoia: "acd97e017326b3c2a1cff2eef31078a79ea1f5a0129531c31c1b2566e70648d4" + sha256 cellar: :any, arm64_sonoma: "cd443c5e4f40643b584184041c3c6d4809bc6c7127bb64a67c169d89269029d2" + sha256 cellar: :any, sonoma: "b499a2a789dd133952eb96a2c0a3c591daa178248a352db5bf1c62cc687f492e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bfe2a1cdb1329411574b37c837686859e283dbcf22175a1a5bd9486b35b082e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f1ccda8d1eb737e03a2a3e01b34b171bde12f49a896b48224e63e95af76c12f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libevent" => :build + depends_on "libtool" => :build + depends_on "boost" + depends_on "jsoncpp" + depends_on "python@3.14" + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/4d/5b/dc575711b6b8f2f866131a40d053e30e962e633b332acf7cd2c24843d83d/setuptools-69.2.0.tar.gz" + sha256 "0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e" + end + + def install + if build.stable? + # https://github.com/facebook/redex/issues/457 + inreplace "Makefile.am", "/usr/include/jsoncpp", Formula["jsoncpp"].opt_include + # Work around missing include. Fixed upstream but code has been refactored + # Ref: https://github.com/facebook/redex/commit/3f4cde379da4657068a0dbe85c03df558854c31c + ENV.append "CXXFLAGS", "-include set" + # Help detect Boost::Filesystem and Boost::System during ./configure. + # TODO: Remove in the next release. + ENV.cxx11 + end + + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + + python_scripts = %w[ + apkutil + redex.py + tools/python/dex.py + tools/python/dict_utils.py + tools/python/file_extract.py + tools/python/reach_graph.py + tools/redex-tool/DexSqlQuery.py + tools/redexdump-apk + ] + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *python_scripts + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + "--with-boost=#{Formula["boost"].opt_prefix}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + resource "homebrew-test_apk" do + url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" + sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" + end + + testpath.install resource("homebrew-test_apk") + system bin/"redex", "--ignore-zipalign", "redex-test.apk", "-o", "redex-test-out.apk" + assert_path_exists testpath/"redex-test-out.apk" + end +end + +__END__ +diff --git a/libresource/RedexResources.cpp b/libresource/RedexResources.cpp +index 525601ec..a359f49f 100644 +--- a/libresource/RedexResources.cpp ++++ b/libresource/RedexResources.cpp +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/libredex/Show.cpp b/libredex/Show.cpp +index b042070f..5e492e3f 100644 +--- a/libredex/Show.cpp ++++ b/libredex/Show.cpp +@@ -9,7 +9,14 @@ + + #include "Show.h" + ++#include ++// Quoted was accepted into public components as of 1.73. The `detail` ++// header was removed in 1.74. ++#if BOOST_VERSION < 107400 + #include ++#else ++#include ++#endif + #include + + #include "ControlFlow.h" diff --git a/Formula/r/redict.rb b/Formula/r/redict.rb new file mode 100644 index 0000000000000..85ba48b811a65 --- /dev/null +++ b/Formula/r/redict.rb @@ -0,0 +1,48 @@ +class Redict < Formula + desc "Distributed key/value database" + homepage "https://redict.io/" + url "https://codeberg.org/redict/redict/archive/7.3.6.tar.gz" + sha256 "3d6aedad01f8137beeb2aabc74c128b4eec9a2d0d4433892b855fb2f4e6f39f2" + license "LGPL-3.0-only" + head "https://codeberg.org/redict/redict.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cbfd75594013a1049c135b3d0175339033ae49b805707876505700b0d2fd0244" + sha256 cellar: :any, arm64_sequoia: "f4bb5f1a67a1255171d99aeb8f4257e95cbe32f256f59f830ad3439a0692f981" + sha256 cellar: :any, arm64_sonoma: "0b854006776e9bd8aec252b1363075dac7e41a3d5886f0b203d94aea2238705b" + sha256 cellar: :any, sonoma: "4b983424da0a10236d0afc57a2a76aa009a883760f80a482880b6060cd77c7bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "0599c6e40122c402656b72c5762babea440c71e4c32a89d593704c3be2ce07a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "708796b8af5a02da1959552fb065bd81218b0f2ebfb649d345e0ae86b3db363f" + end + + depends_on "openssl@3" + + def install + system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes" + + %w[run db/redict log].each { |p| (var/p).mkpath } + + # Fix up default conf file to match our paths + inreplace "redict.conf" do |s| + s.gsub! "/var/run/redict_6379.pid", var/"run/redict.pid" + s.gsub! "dir ./", "dir #{var}/db/redict/" + s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1") + end + + etc.install "redict.conf" + etc.install "sentinel.conf" => "redict-sentinel.conf" + end + + service do + run [opt_bin/"redict-server", etc/"redict.conf"] + keep_alive true + error_log_path var/"log/redict.log" + log_path var/"log/redict.log" + working_dir var + end + + test do + system bin/"redict-server", "--test-memory", "2" + %w[run db/redict log].each { |p| assert_path_exists var/p, "#{var/p} doesn't exist!" } + end +end diff --git a/Formula/r/redir.rb b/Formula/r/redir.rb new file mode 100644 index 0000000000000..21f9677e26d2d --- /dev/null +++ b/Formula/r/redir.rb @@ -0,0 +1,56 @@ +class Redir < Formula + desc "TCP port redirector for UNIX" + homepage "https://github.com/troglobit/redir" + url "https://github.com/troglobit/redir/releases/download/v3.3/redir-3.3.tar.xz" + sha256 "7ce53ac52a24c1b3279b994bfffbd429c44df2db10a4b1a0f54e108604fdae6e" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "adeb67ec9908e136f48f9ef8cadf98ea0cb8a54d8250c4b444821dc156e1918e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e85d33d0d3a7fb6b68dbb5d94ad15d7aa150931c9d0761b1dfa9e2e1ab39bf24" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c61f424df5b1d03951e0d7bce56a1df8e743fc23adfb6701e327ba9f5cf5b33" + sha256 cellar: :any_skip_relocation, arm64_ventura: "958f14440ec0301e5e9cb0ae82f3f5080be3fd7336cbb9ca17211ecf84c88bd6" + sha256 cellar: :any_skip_relocation, sonoma: "ed393b34639f9ff4309c3b1ebb718578ad79fded885c244a691eb943c6a4e27f" + sha256 cellar: :any_skip_relocation, ventura: "9b6198a40516760f5aab31627aa111237ee5cac90cfb72243cfd91d6bbfb9bce" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f22d53958864744b669b59a139ee9c5de94755b0291f9524edbdf193668a764" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42d0afabc5b8a627139420184283cd83e9c277f5aabcf8f3c3192f0508116ec8" + end + + def install + system "./configure", "--disable-silent-rules", "--enable-compat", *std_configure_args + system "make", "install" + end + + test do + cport = free_port + lport = free_port + redir_pid = spawn bin/"redir", "--cport=#{cport}", "--lport=#{lport}" + Process.detach(redir_pid) + + server = TCPServer.new(cport) + server_pid = fork do + session = server.accept + session.puts "Hello world!" + session.close + end + + # Give time to processes start + sleep(1) + + begin + # Check if the process is running + system "kill", "-0", redir_pid + + # Check if the port redirect works + TCPSocket.open("localhost", lport) do |sock| + assert_equal "Hello world!", sock.gets.chomp + end + ensure + Process.kill("TERM", redir_pid) + Process.kill("TERM", server_pid) + Process.wait(server_pid) + end + end +end diff --git a/Formula/r/redis-leveldb.rb b/Formula/r/redis-leveldb.rb new file mode 100644 index 0000000000000..d85e6721db5b5 --- /dev/null +++ b/Formula/r/redis-leveldb.rb @@ -0,0 +1,40 @@ +class RedisLeveldb < Formula + desc "Redis-protocol compatible frontend to leveldb" + homepage "https://github.com/KDr2/redis-leveldb" + url "https://github.com/KDr2/redis-leveldb/archive/refs/tags/v1.4.tar.gz" + sha256 "b34365ca5b788c47b116ea8f86a7a409b765440361b6c21a46161a66f631797c" + license "MIT" + revision 4 + head "https://github.com/KDr2/redis-leveldb.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c271d1f63c3d093c40dfe5b388ff1fb8a16189fd3856af03a03de7b997ceacc6" + sha256 cellar: :any, arm64_sequoia: "18a394308e77b5655a37776c66a468aaa71b5bb152b59c666ef1017f88f77257" + sha256 cellar: :any, arm64_sonoma: "2c4f724a8e484fe6949b3733a7c1d4201370dabbbbd3b5e4a7e4b4312a06bba7" + sha256 cellar: :any, arm64_ventura: "8ed6a3bbc7dcfb695d7d133bb5f87eb564288e0f1ab221099449b1dd4f8bbabe" + sha256 cellar: :any, arm64_monterey: "6ae884a362ca96df3f67994461b0732d305e7dba323598dba029338a11d10cf3" + sha256 cellar: :any, sonoma: "edac4282df53a53882efe10586ee1d39c06b3f03f150d128f6acfa115c039cf8" + sha256 cellar: :any, ventura: "8eec3d30dde80b6f32de4c1167cad93bc2c6b95e9c7c65b017320e487b19975d" + sha256 cellar: :any, monterey: "385b411fac0e4374c3b61f952e09f0266a9a13a23bb12c91cb1209ff99547012" + sha256 cellar: :any_skip_relocation, arm64_linux: "13d9141ccb43a5ee14216ff11730d74b63b1ad72ed0e5ecaea73389fd967f442" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6323dd8c468b9cc40d9310fdeb776de380e1c32c622e682713dd98a9cf42e659" + end + + depends_on "gmp" + depends_on "leveldb" + depends_on "libev" + depends_on "snappy" + + def install + inreplace "src/Makefile", "../vendor/libleveldb.a", Formula["leveldb"].opt_lib/"libleveldb.a" + ENV.prepend "LDFLAGS", "-lsnappy" + system "make" + bin.install "redis-leveldb" + end + + test do + system bin/"redis-leveldb", "-h" + end +end diff --git a/Formula/r/redis.rb b/Formula/r/redis.rb new file mode 100644 index 0000000000000..1192f053548b6 --- /dev/null +++ b/Formula/r/redis.rb @@ -0,0 +1,61 @@ +class Redis < Formula + desc "Persistent key-value database, with built-in net interface" + homepage "https://redis.io/" + url "https://download.redis.io/releases/redis-8.2.3.tar.gz" + sha256 "d88f2361fdf3a3a8668fe5753e29915566109dca07b4cb036427ea6dc7783671" + license all_of: [ + "AGPL-3.0-only", + "BSD-2-Clause", # deps/jemalloc, deps/linenoise, src/lzf* + "BSL-1.0", # deps/fpconv + "MIT", # deps/lua + any_of: ["CC0-1.0", "BSD-2-Clause"], # deps/hdr_histogram + ] + head "https://github.com/redis/redis.git", branch: "unstable" + + livecheck do + url "https://download.redis.io/releases/" + regex(/href=.*?redis[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8b454b70a1a3581d8ea5518c293f57251a2c51d783729166547d48f9cb7cbca5" + sha256 cellar: :any, arm64_sequoia: "91f25248c9f275ef00867f7aae626d2e777c3a48ed1db5616794922922ee7c3c" + sha256 cellar: :any, arm64_sonoma: "2ff55d93725a84033ded160bf42c8bae793d8c5ee460542f4311b814adf2f3ac" + sha256 cellar: :any, sonoma: "b49f9175649a0c72786d614f655f9fd6c34d4af86f3cbaf206eeda91c6fe0d5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "a40c9bbbbd903f6d63de4a89cc3e101366aad5a2c24c75f335e10ce512ef2268" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bafdd2640eb41d4039ce83a7f1a0f67d89c13700a95d643c4061250741302736" + end + + depends_on "openssl@3" + + conflicts_with "valkey", because: "both install `redis-*` binaries" + + def install + system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes" + + %w[run db/redis log].each { |p| (var/p).mkpath } + + # Fix up default conf file to match our paths + inreplace "redis.conf" do |s| + s.gsub! "/var/run/redis_6379.pid", var/"run/redis.pid" + s.gsub! "dir ./", "dir #{var}/db/redis/" + s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1") + end + + etc.install "redis.conf" + etc.install "sentinel.conf" => "redis-sentinel.conf" + end + + service do + run [opt_bin/"redis-server", etc/"redis.conf"] + keep_alive true + error_log_path var/"log/redis.log" + log_path var/"log/redis.log" + working_dir var + end + + test do + system bin/"redis-server", "--test-memory", "2" + %w[run db/redis log].each { |p| assert_path_exists var/p, "#{var/p} doesn't exist!" } + end +end diff --git a/Formula/r/redis@6.2.rb b/Formula/r/redis@6.2.rb new file mode 100644 index 0000000000000..5585997ca51cf --- /dev/null +++ b/Formula/r/redis@6.2.rb @@ -0,0 +1,60 @@ +class RedisAT62 < Formula + desc "Persistent key-value database, with built-in net interface" + homepage "https://redis.io/" + url "https://download.redis.io/releases/redis-6.2.18.tar.gz" + sha256 "470c75bac73d7390be4dd66479c6f29e86371c5d380ce0c7efb4ba2bbda3612d" + license all_of: [ + "BSD-3-Clause", + "BSD-2-Clause", # deps/jemalloc, deps/linenoise, src/lzf* + "BSL-1.0", # deps/fpconv + "MIT", # deps/lua + any_of: ["CC0-1.0", "BSD-2-Clause"], # deps/hdr_histogram + ] + + bottle do + sha256 cellar: :any, arm64_tahoe: "67957e45281bea703053e491f7529026d8492bd81e1bc241e6005b526764c064" + sha256 cellar: :any, arm64_sequoia: "bd4e8b149de304f96ca737de9dbbfa4a3055dd93df5a0bf42d25dec056bc81d3" + sha256 cellar: :any, arm64_sonoma: "097a41d0f9e5c0a68981de1230d7d7d9cda8454aed0ac9ff038e8f48e2a5214e" + sha256 cellar: :any, arm64_ventura: "d7b8f49e152b41dddd01e44015424e734611fe425d701addfa7e11104382a1e5" + sha256 cellar: :any, sonoma: "c6ce47934e8471c0cdc128cc75006801bf33d06c81671c4d1c0a4bf5d75b83dc" + sha256 cellar: :any, ventura: "8dcf0d2129f3c31221f1e23f794c0f5fc0947916487ae7618e84855125353200" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1ed6c23281c8f3761df36bd4612aa05aeeee9f8850ad243cf85ca163acf6b5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9527caad1fa914cd32ccd99b917c5b98860613dbc37ff7ea36c8d10d0371b769" + end + + keg_only :versioned_formula + + # See EOL, https://redis.io/docs/latest/operate/rs/installing-upgrading/product-lifecycle/ + deprecate! date: "2025-04-24", because: :unsupported + + depends_on "openssl@3" + + def install + system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes" + + %w[run db/redis log].each { |p| (var/p).mkpath } + + # Fix up default conf file to match our paths + inreplace "redis.conf" do |s| + s.gsub! "/var/run/redis.pid", var/"run/redis.pid" + s.gsub! "dir ./", "dir #{var}/db/redis/" + s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1") + end + + etc.install "redis.conf" + etc.install "sentinel.conf" => "redis-sentinel.conf" + end + + service do + run [opt_bin/"redis-server", etc/"redis.conf"] + keep_alive true + error_log_path var/"log/redis.log" + log_path var/"log/redis.log" + working_dir var + end + + test do + system bin/"redis-server", "--test-memory", "2" + %w[run db/redis log].each { |p| assert_path_exists var/p, "#{var/p} doesn't exist!" } + end +end diff --git a/Formula/r/redka.rb b/Formula/r/redka.rb new file mode 100644 index 0000000000000..7167a66564ade --- /dev/null +++ b/Formula/r/redka.rb @@ -0,0 +1,47 @@ +class Redka < Formula + desc "Redis re-implemented with SQLite" + homepage "https://github.com/nalgeon/redka" + url "https://github.com/nalgeon/redka/archive/refs/tags/v0.6.0.tar.gz" + sha256 "cfccbfc5b4887211146352426efe0c3fcc2adbcfe71ef6b58da3d29cba867bde" + license "BSD-3-Clause" + head "https://github.com/nalgeon/redka.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9b9c4ebbe474efe9850a4139102c097b1fccfd91dd577f0df06cd8f9d0b3b400" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7369c85e3dd72b92099608984ea0fbab5d2e54bfdca89184f6f843c5e46c6d45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e477b72b5298b8a1f198c27b470567ebeb117c1f5bf5e5c0c3144c9cc827c085" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ad393f56c26de9ef969ad9ccec620c369447267b55c8e5ab1967c15ed52d9dd" + sha256 cellar: :any_skip_relocation, sonoma: "a8609f1f2f966c9340054ff03d194f2ba8c2093d3ff02030f582433574fdb0e6" + sha256 cellar: :any_skip_relocation, ventura: "3bf7ad1ccb15e6ab17d46509a843db68f4a27fc327982e0622f808158841f693" + sha256 cellar: :any_skip_relocation, arm64_linux: "a684c766952001e2853f8b343d8873e583c7d9ca92fbbe669b0ad06690059e86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb41ebb4b8424561c5666d214b33d25e9a02a2837e708fb2d78c1b0c9873bb24" + end + + depends_on "go" => :build + # use valkey for server startup test as redka-cli can just inspect db dump + depends_on "valkey" => :test + uses_from_macos "sqlite" + + def install + ldflags = "-s -w -X main.version=v#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"redka"), "./cmd/redka" + end + + test do + port = free_port + test_db = testpath/"test.db" + + pid = fork do + exec bin/"redka", "-h", "127.0.0.1", "-p", port.to_s, test_db + end + sleep 2 + + begin + output = shell_output("#{Formula["valkey"].opt_bin}/valkey-cli -h 127.0.0.1 -p #{port} ping") + assert_equal "PONG", output.strip + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/r/redland.rb b/Formula/r/redland.rb new file mode 100644 index 0000000000000..2387ef27780fe --- /dev/null +++ b/Formula/r/redland.rb @@ -0,0 +1,128 @@ +class Redland < Formula + desc "RDF Library" + homepage "https://librdf.org/" + url "https://download.librdf.org/source/redland-1.0.17.tar.gz" + sha256 "de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681" + license any_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later", "Apache-2.0"] + revision 1 + + livecheck do + url :homepage + regex(/href=.*?redland[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "7c7aab000c18d388d284b94060060bdc54990d6aaa29475f702b8c85d9031ecb" + sha256 arm64_sequoia: "16526f739bc4c35eb3524005689e270dd9ce0828e0934d9d57f9693338b7fcda" + sha256 arm64_sonoma: "4671a0bffac8906190119990c40dd6642a6f432ec02ce96c56456c5cb48c91ab" + sha256 arm64_ventura: "16c721b39acf16e65892930227303d74673ce56ddaf252ca867da9391de7bad3" + sha256 arm64_monterey: "25dd020d5d83642dd83c56583dd742dc549fcc32efbec67958faeebed4e1a849" + sha256 arm64_big_sur: "f54c731eecd682be899b7b8b5ab3424db134a1a48fe7076f0113deedb9a7f057" + sha256 sonoma: "2c0269bd53d0f3dbd166a44ffb32ccdfb39c2a4408fe68b751e9b9e28b504810" + sha256 ventura: "2c9931ba94fa4e8c4cd3b1983fdf55afa01838c3e6556664126733a7743c1575" + sha256 monterey: "f0b6b4b55556c730bb0eb720bcca0d4efd9ede0b13e15f39758fe2a193ce4933" + sha256 big_sur: "60ddb8775dfdff43901aac1138929c688b07e744304e24e1cd3d6183000620bf" + sha256 catalina: "f30068d691ac2748619a288912235236e905f672b1f80a974e95425c5f102a10" + sha256 arm64_linux: "40dd4a3c37bd52eb17f97912ab8baaefd3164c84f57ec8d8be6200677af307c8" + sha256 x86_64_linux: "5439aed60715d12f7bce18e9292ce3301fc93b89cdb2eae2bd072a0a59a5fc6b" + end + + depends_on "pkgconf" => :build + depends_on "libtool" + depends_on "raptor" + depends_on "rasqal" + depends_on "sqlite" + depends_on "unixodbc" + + resource "bindings" do + url "https://download.librdf.org/source/redland-bindings-1.0.17.1.tar.gz" + sha256 "ff72b587ab55f09daf81799cb3f9d263708fad5df7a5458f0c28566a2563b7f5" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--with-bdb=no", + "--with-mysql=no", + "--with-sqlite=yes", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + librdf_world* world; + librdf_storage* storage; + librdf_model* model; + librdf_statement *statement; + + world = librdf_new_world(); + librdf_world_open(world); + storage = librdf_new_storage(world, "file", "file.rdf", NULL); + model = librdf_new_model(world, storage, NULL); + statement = librdf_new_statement_from_nodes( + world, + librdf_new_node_from_uri_string(world, (const unsigned char*) "https://example.org/"), + librdf_new_node_from_uri_string(world, (const unsigned char*) "http://purl.org/dc/elements/1.1/title"), + librdf_new_node_from_literal(world, (const unsigned char*) "Homebrew was here", NULL, 0) + ); + + librdf_model_add_statement(model, statement); + librdf_free_statement(statement); + librdf_free_model(model); + librdf_free_storage(storage); + librdf_free_world(world); + + return 0; + } + C + + (testpath/"file.rdf").write <<~EOS + + + + Example Site + Internet Assigned Numbers Authority + + This domain is for use in illustrative examples in documents. + You may use this domain in literature without prior coordination or asking for permission. + + + + EOS + + includes = %W[ + -I#{include} + -I#{Formula["raptor"].opt_include}/raptor2 + -I#{Formula["rasqal"].opt_include}/rasqal + ] + + libs = %W[ + -L#{lib} + -L#{Formula["raptor"].opt_lib} + -L#{Formula["rasqal"].opt_lib} + -lrdf -lraptor2 -lrasqal + ] + + system ENV.cc, *includes, "test.c", *libs, "-o", "test" + system testpath/"test" + + expected = <<~EOS + #{" " * 2} + #{" " * 4}Homebrew was here + #{" " * 2} + EOS + assert_match expected, (testpath/"file.rdf").read + end +end diff --git a/Formula/r/redo.rb b/Formula/r/redo.rb new file mode 100644 index 0000000000000..2535b697c17f4 --- /dev/null +++ b/Formula/r/redo.rb @@ -0,0 +1,87 @@ +class Redo < Formula + include Language::Python::Virtualenv + + desc "Implements djb's redo: an alternative to make" + homepage "https://redo.rtfd.io/" + url "https://github.com/apenwarr/redo/archive/refs/tags/redo-0.42d.tar.gz" + sha256 "47056b429ff5f85f593dcba21bae7bc6a16208a56b189424eae3de5f2e79abc1" + license "Apache-2.0" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 7 + sha256 cellar: :any_skip_relocation, all: "fb1815e2abd0a29b23eb4fe2111213fa1942ec1e48bb53d40601a5a06e7ccb26" + end + + depends_on "python@3.14" + + conflicts_with "goredo", because: "both install `redo` and `redo-*` binaries" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/11/28/c5441a6642681d92de56063fa7984df56f783d3f1eba518dc3e7a253b606/Markdown-3.5.2.tar.gz" + sha256 "e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/ce/21/952a240de1c196c7e3fbcd4e559681f0419b1280c617db21157a0390717b/soupsieve-2.5.tar.gz" + sha256 "5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690" + end + + def install + python3 = "python3.14" + # Prevent system Python 2 from being detected + inreplace "redo/whichpython.do", " python python3 python2 python2.7;", " #{python3};" + + # Prepare build-only virtualenv for generating manpages. + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + + # Set PYTHONPATH rather than prepending PATH with venv as shebangs are set to detected python. + ENV.prepend_path "PYTHONPATH", buildpath/"venv"/Language::Python.site_packages(python3) + + ENV["DESTDIR"] = "" + ENV["PREFIX"] = prefix + system "./do", "install" + + # Ensure this symlink is the same across all our bottles, + # otherwise the Linux bottle points to `/usr/bin/dash`. + ln_sf "/bin/dash", lib/"redo/sh" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/redo --version").strip + # Make sure man pages were generated and installed + assert_path_exists man1/"redo.1" + + # Test is based on https://redo.readthedocs.io/en/latest/cookbook/hello/ + (testpath/"hello.c").write <<~C + #include + + int main() { + printf("Hello, world!\\n"); + return 0; + } + C + (testpath/"hello.do").write <<~EOS + redo-ifchange hello.c + cc -o $3 hello.c -Wall + EOS + assert_match "redo hello", shell_output("#{bin}/redo hello 2>&1").strip + assert_path_exists testpath/"hello" + assert_equal "Hello, world!\n", shell_output("./hello") + assert_match "redo hello", shell_output("#{bin}/redo hello 2>&1").strip + refute_match "redo", shell_output("#{bin}/redo-ifchange hello 2>&1").strip + touch "hello.c" + assert_match "redo hello", shell_output("#{bin}/redo-ifchange hello 2>&1").strip + (testpath/"all.do").write("redo-ifchange hello") + (testpath/"hello").unlink + assert_match "redo all\nredo hello", shell_output("#{bin}/redo 2>&1").strip + end +end diff --git a/Formula/r/redocly-cli.rb b/Formula/r/redocly-cli.rb new file mode 100644 index 0000000000000..bb7e0d834d432 --- /dev/null +++ b/Formula/r/redocly-cli.rb @@ -0,0 +1,85 @@ +class RedoclyCli < Formula + desc "Your all-in-one OpenAPI utility" + homepage "https://redocly.com/docs/cli" + url "https://registry.npmjs.org/@redocly/cli/-/cli-2.10.0.tgz" + sha256 "a9a0859f4c6ea8c18b554d786f9bb90b12e419814d2ffbf711925ec7d026dc71" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d44765c242901d56a5042c4747dd1d59c5f7b445dc030eda318181c815395f61" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + assert_match version.to_s, shell_output("#{bin}/redocly --version") + + test_file = testpath/"openapi.yaml" + test_file.write <<~YML + openapi: '3.0.0' + info: + version: 1.0.0 + title: Swagger Petstore + description: test + license: + name: MIT + url: https://opensource.org/licenses/MIT + servers: #ServerList + - url: http://petstore.swagger.io:{Port}/v1 + variables: + Port: + enum: + - '8443' + - '443' + default: '8443' + security: [] # SecurityRequirementList + tags: # TagList + - name: pets + description: Test description + - name: store + description: Access to Petstore orders + paths: + /pets: + get: + summary: List all pets + operationId: list_pets + tags: + - pets + parameters: + - name: Accept-Language + in: header + description: 'The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US' + example: en-US + required: false + schema: + type: string + default: en-AU + responses: + '200': + description: An paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + encoding: + historyMetadata: + contentType: application/json; charset=utf-8 + links: + address: + operationId: getUserAddress + parameters: + userId: $request.path.id + YML + + assert_match "Woohoo! Your API description is valid. 🎉", + shell_output("#{bin}/redocly lint --extends=minimal #{test_file} 2>&1") + end +end diff --git a/Formula/r/redpen.rb b/Formula/r/redpen.rb new file mode 100644 index 0000000000000..12c56d8864088 --- /dev/null +++ b/Formula/r/redpen.rb @@ -0,0 +1,41 @@ +class Redpen < Formula + desc "Proofreading tool to help writers of technical documentation" + homepage "https://redpen.cc/" + url "https://github.com/redpen-cc/redpen/releases/download/redpen-1.10.4/redpen-1.10.4.tar.gz" + sha256 "6c3dc4a6a45828f9cc833ca7253fdb036179036631248288251cb9ac4520c39d" + license "Apache-2.0" + revision 2 + + livecheck do + url :stable + regex(/(?:redpen[._-])?v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "06d9d1562bd8c00de7be8ad87e1bb69494deb932496dcd2d2b9dc2aebb87ddd1" + end + + depends_on "openjdk@11" + + def install + # Don't need Windows files. + rm(Dir["bin/*.bat"]) + libexec.install %w[conf lib sample-doc js] + + prefix.install "bin" + env = Language::Java.java_home_env("11") + env["PATH"] = "$JAVA_HOME/bin:$PATH" + bin.env_script_all_files libexec/"bin", env + end + + test do + path = "#{libexec}/sample-doc/en/sampledoc-en.txt" + output = "#{bin}/redpen -l 20 -c #{libexec}/conf/redpen-conf-en.xml #{path}" + match = "sampledoc-en.txt:1: ValidationError[SentenceLength]" + assert_match match, shell_output(output).split("\n").find { |line| line.include?("sampledoc-en.txt") } + end +end diff --git a/Formula/r/redress.rb b/Formula/r/redress.rb new file mode 100644 index 0000000000000..06b581edfafb2 --- /dev/null +++ b/Formula/r/redress.rb @@ -0,0 +1,48 @@ +class Redress < Formula + desc "Tool for analyzing stripped Go binaries compiled with the Go compiler" + homepage "https://github.com/goretk/redress" + url "https://github.com/goretk/redress/archive/refs/tags/v1.2.44.tar.gz" + sha256 "26c60c539136e2f2a72ac1f28000e7139a8aa1536484b887fa2f7d1fb3a5de2b" + license "AGPL-3.0-only" + head "https://github.com/goretk/redress.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f80c59da129fbf375706ae12f0d65ed80b3401bd424cc8325d2ceacc7c3788a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7bfa3f06c627240bde3361d0ddfe9eb5afa9bed49207600e71c378fab1035f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ca5439892fb8b3c8d171c589064a28ebd5cecc2c17abb48b851fa12b504c9d2" + sha256 cellar: :any_skip_relocation, sonoma: "d4192215a1ff09343179587184e48062d6e8a7be0e32c58c08cedf10fed9edb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "566dfb9a8b88d06d3b45d1147ec689c182b57cd215a2ee83e779c7e2a4b562f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "631e26919fdd7fe07def25a2e1d267d732dbadb8039e6c797eee6805628559a5" + end + + depends_on "go" => :build + + def install + # https://github.com/goretk/redress/blob/develop/Makefile#L11-L14 + gore_version = File.read(buildpath/"go.mod").scan(%r{goretk/gore v(\S+)}).flatten.first + + ldflags = %W[ + -s -w + -X main.redressVersion=#{version} + -X main.goreVersion=#{gore_version} + -X main.compilerVersion=#{Formula["go"].version} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"redress", "completion") + end + + test do + assert_match "Version: #{version}", shell_output("#{bin}/redress version") + + test_bin_path = bin/"redress" + output = shell_output("#{bin}/redress info '#{test_bin_path}'") + assert_match "Build ID", output + end +end diff --git a/Formula/r/redshift.rb b/Formula/r/redshift.rb new file mode 100644 index 0000000000000..80631056b5829 --- /dev/null +++ b/Formula/r/redshift.rb @@ -0,0 +1,80 @@ +class Redshift < Formula + desc "Adjust color temperature of your screen according to your surroundings" + homepage "https://github.com/jonls/redshift" + url "https://github.com/jonls/redshift/releases/download/v1.12/redshift-1.12.tar.xz" + sha256 "d2f8c5300e3ce2a84fe6584d2f1483aa9eadc668ab1951b2c2b8a03ece3a22ba" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "b3f728c06b42f585bdf50685e7613ee66f639d43f85030942edf712b6ad928ab" + sha256 arm64_sequoia: "82b1df8db7796fa1af92a7b3ef4ea428e4d94a65850a5e2cdb90f354605cf065" + sha256 arm64_sonoma: "b2ad69df7721d0d5c8777741384c3de6e24d370c394a4f39f6432239cdb2b158" + sha256 arm64_ventura: "a14f34f6fee41eb43734e14fc6b18965bc5438aa7a4acbf3a5b881e31bef5663" + sha256 arm64_monterey: "639cdf26164ff6a637c3adb96d4e5b92f6712199c8d49276638965836ac142c9" + sha256 arm64_big_sur: "043dc8ec9eff54763ea0fdf2c3ca325a9906d8fd1098568255ced2a497841315" + sha256 sonoma: "ecccd726383b2a9fda6f1ce365744e74bd8d1e76b2031fd0f58caeb9daecee15" + sha256 ventura: "4bfe11cbe2b92cf2775376c681c96593bb2ff33a98766cd18d0a261bf8005179" + sha256 monterey: "442b3c30b0cd25d42a4c5e03ed166a264c59bb67b4eb51bbccef29c819e6aa39" + sha256 big_sur: "8be47c6b6015ca4ccd2c706dd58541c49c4177a1d69144452a7aa483c977f805" + sha256 catalina: "344ea69571839ab32210854f990474239fde828b10a019ec5e88695eb4c7ffcb" + sha256 arm64_linux: "c21e3b0726216ea136e4f022da78243fd5572e69f9a3fc7507c07831d95551d4" + sha256 x86_64_linux: "12372cb33e04989848070b332096420b45539cd69e31026545543207d7d0cc9a" + end + + head do + url "https://github.com/jonls/redshift.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "intltool" => :build + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "glib" + + def install + args = %w[ + --disable-silent-rules + --disable-geoclue + --disable-geoclue2 + --with-systemduserunitdir=no + --disable-gui + ] + + if OS.mac? + args << "--enable-corelocation" + args << "--enable-quartz" + end + + system "./bootstrap" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + pkgshare.install "redshift.conf.sample" + end + + def caveats + <<~EOS + A sample .conf file has been installed to #{opt_pkgshare}. + + Please note redshift expects to read its configuration file from + #{Dir.home}/.config/redshift/redshift.conf + EOS + end + + service do + run opt_bin/"redshift" + keep_alive true + log_path File::NULL + error_log_path File::NULL + end + + test do + system bin/"redshift", "-V" + end +end diff --git a/Formula/r/redstore.rb b/Formula/r/redstore.rb new file mode 100644 index 0000000000000..b80f672188903 --- /dev/null +++ b/Formula/r/redstore.rb @@ -0,0 +1,54 @@ +class Redstore < Formula + desc "Lightweight RDF triplestore powered by Redland" + homepage "https://www.aelius.com/njh/redstore/" + url "https://www.aelius.com/njh/redstore/redstore-0.5.4.tar.gz" + sha256 "58bd65fda388ab401e6adc3672d7a9c511e439d94774fcc5a1ef6db79c748141" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?redstore[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b4f7cfae26c26edf74952a959d8e56b8058ee755bd4384a18089257af330623a" + sha256 cellar: :any, arm64_sequoia: "722eb9bb530ade0f251ce260bc4f0dc3b519b164e86d2c3792d6559edfd1f01e" + sha256 cellar: :any, arm64_sonoma: "17d341618995c10bb92327af09bc2af0fb295fc798fb229b5813db72e912f639" + sha256 cellar: :any, arm64_ventura: "55306289261abde9b677d1906bb58420dc0bd3a52b775c3257ccb80c5ba04cdb" + sha256 cellar: :any, arm64_monterey: "6043b778fa8d393eb0505eca982e0f2dcba99354aa3c6bba9d1042de6425bac7" + sha256 cellar: :any, arm64_big_sur: "03952d80ba4b35e0a1a7a85a9ae9fe56e9e31bd6e2797729c28ffee377ee2fcf" + sha256 cellar: :any, sonoma: "12fca2f939d2fe399dcff87f87ac6a2d0dc4448d4d2d2577faa5182681dd0e4d" + sha256 cellar: :any, ventura: "840637ec24ca832cad462cfbe3fa6f8693ccf86c5e74edeeccab5e12a3573633" + sha256 cellar: :any, monterey: "1ae97b18f1cb08f3872712accb48942d7c992a76f4dddae0b7a6566d22f40ec5" + sha256 cellar: :any, big_sur: "fa44b96b71ff73060973893222eb264f18c54f8c64ebb73c903eef2e544868ee" + sha256 cellar: :any, catalina: "f473645a1903ac48caf0bea886c13636ca093c4ca6f57f83ce9ffc4864f88ee5" + sha256 cellar: :any_skip_relocation, arm64_linux: "67a498c2f25e82a164b7d5191d8824ca398c2ad7f774eb6971de1855a7712122" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f459a58381dd6067d033bb20eb4101af9136f5260796bd2daee07cf6365c3bde" + end + + depends_on "pkgconf" => :build + depends_on "raptor" + depends_on "rasqal" + depends_on "redland" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV.append "CFLAGS", "-D_GNU_SOURCE" unless OS.mac? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/redstore --help 2>&1", 1) + assert_match "RedStore version #{version}", output + end +end diff --git a/Formula/r/redwax-tool.rb b/Formula/r/redwax-tool.rb new file mode 100644 index 0000000000000..af7f0d1b5d334 --- /dev/null +++ b/Formula/r/redwax-tool.rb @@ -0,0 +1,98 @@ +class RedwaxTool < Formula + desc "Universal certificate conversion tool" + homepage "https://redwax.eu/rt/" + url "https://redwax.eu/dist/rt/redwax-tool-1.0.0.tar.bz2" + sha256 "dd2d7e6ce1ee9b78bc3a2d076f4c1b282b61e9a3a20456566d3e62d32dc12d5e" + license "Apache-2.0" + + livecheck do + url "https://redwax.eu/dist/rt/" + regex(/href=.*?redwax-tool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "df4ddf01024dfde7043791c8c816cee438fbd91d6ce6bd4c952e32932f139466" + sha256 arm64_sequoia: "18943e0545f824c95a02107eb5e2d3113921a4dec7f70e38b0a9c99360838b30" + sha256 arm64_sonoma: "4f7ba708291d0a8d55dc60dafaccf9e25c30ed7f69460175937769edee510cbf" + sha256 arm64_ventura: "636f7fb81a83351e5663edd8a9f55bfcf6da9468e99c294ba718c1682183ffe0" + sha256 sonoma: "aeace3d70b6856d3b41435e67e8841db8932ecc98f77dcef6171a8d414abe356" + sha256 ventura: "a1b39030dca8dc36b515a668d391b9ca661e0308163fe722069714553ba5dc98" + sha256 arm64_linux: "68957ca0352be57c3439fbd84d584a080729c17472e5193e8fd836c261d5a65e" + sha256 x86_64_linux: "10ad5632233a8a26fa7561d2cc0d7059c2cfee757c20d8b934b761ce242fde9d" + end + + depends_on "pkgconf" => :build + depends_on "apr" + depends_on "apr-util" + depends_on "ldns" + depends_on "libical" + depends_on "nspr" + depends_on "nss" + depends_on "openssl@3" + depends_on "p11-kit" + depends_on "unbound" + + uses_from_macos "expat" + + def install + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + if OS.mac? && MacOS.version < :sequoia + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + + args = %w[ + --disable-silent-rules + --with-openssl + --with-nss + --with-p11-kit + --with-libical + --with-ldns + --with-unbound + ] + args << "--with-keychain" if OS.mac? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + x509_args = { + "C" => "US", + "ST" => "Massachusetts", + "L" => "Boston", + "O" => "Homebrew", + "OU" => "Example", + "CN" => "User", + "emailAddress" => "hello@example.com", + } + + system "openssl", "req", "-x509", "-newkey", "rsa:4096", "-days", "1", "-nodes", + "-keyout", "key.pem", "-out", "cert.pem", "-sha256", + "-subj", "/#{x509_args.map { |key, value| "#{key}=#{value}" }.join("/")}" + + args = %w[ + --pem-in key.pem + --pem-in cert.pem + --filter passthrough + --pem-out combined.pem + ] + + expected_outputs = [ + "pem-in: private key: OpenSSL RSA implementation", + "pem-out: private key: OpenSSL RSA implementation", + "pem-in: intermediate: #{x509_args.map { |key, value| "#{key}=#{value}" }.reverse.join(",")}", + "pem-out: intermediate: #{x509_args.map { |key, value| "#{key}=#{value}" }.reverse.join(",")}", + ] + + output = shell_output("#{bin}/redwax-tool #{args.join(" ")} 2>&1") + + expected_outputs.each do |s| + assert_match s, output + end + + assert_path_exists testpath/"combined.pem" + end +end diff --git a/Formula/r/reflex.rb b/Formula/r/reflex.rb new file mode 100644 index 0000000000000..e4d41e3d69bf9 --- /dev/null +++ b/Formula/r/reflex.rb @@ -0,0 +1,36 @@ +class Reflex < Formula + desc "Run a command when files change" + homepage "https://github.com/cespare/reflex" + url "https://github.com/cespare/reflex/archive/refs/tags/v0.3.1.tar.gz" + sha256 "efe3dc7bc64b5a978c6e7f790e3d210aed16bd7e43c7fbc2713fe4b16a7a183e" + license "MIT" + head "https://github.com/cespare/reflex.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "730de36adf7fd1ad324ecaa1e85df9b1f064cb0491ecbc336a92001153c3265c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "188a2f2056610511ae1b9b7bbbc373091f88600c5cc28ee13eb57eaee4e21d3e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7203be2c2bcb77f967584006bb447f041897f78748cb3a6f8e84fd770c66016e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "22412d6611b71577c603b8ce941a814c5fdf83fa8f83fd17835f2387a2fe0c79" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d79c8f233b6802b5b96867ce1bee7d1b933e73d2b8b3208ea680697261da62c1" + sha256 cellar: :any_skip_relocation, sonoma: "4a8fe936c5517d03286b32d973ad16f3786bc1dd733b92fde096a6e8ada31579" + sha256 cellar: :any_skip_relocation, ventura: "aad285d2fecca78427be231f332fa6cf6786f422a5be10bfb1bfb9f9f3e2f174" + sha256 cellar: :any_skip_relocation, monterey: "8b16ba2cf36a17407a6753d3ad261cabe78f4fc32b6c2a648206279cc69285f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "88c02456efa9988132da46ce3f2aa7064add4a973603b1dcf7d78006028a9265" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6016c96f2e24a11b3b75b983c0d92d5739d18e1308c52440286034255cc2c709" + end + + depends_on "go" => :build + + conflicts_with "re-flex", because: "both install `reflex` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/reflex 2>&1", 1) + assert_match "Could not make reflex for config: must give command to execute", output + end +end diff --git a/Formula/r/reg.rb b/Formula/r/reg.rb new file mode 100644 index 0000000000000..6d30aeb03b9cf --- /dev/null +++ b/Formula/r/reg.rb @@ -0,0 +1,35 @@ +class Reg < Formula + desc "Docker registry v2 command-line client" + homepage "https://r.j3ss.co" + url "https://github.com/genuinetools/reg/archive/refs/tags/v0.16.1.tar.gz" + sha256 "b65787bff71bff21f21adc933799e70aa9b868d19b1e64f8fd24ebdc19058430" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "84e42284b946dc3f88d65243680eeb75761c66ad88125bcfd0f95545c42371d9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3467572641a49a95d3337e16c68fe76dd65377026f02478d955512679303cf42" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb3907d256779b4df3e1c499bc389b56135e9cb22f7414bad350f74a0ff90a12" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c6f6d7cef992aec32bb6742dd36c85c0ad46fc3b2d47450e31f983964725681" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cf9938a3488e5e4ceb2534f2a032c4d9427787a92e6550f90eea0ff70cdb77da" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6bf430c32dbb66c850bf8c6acbe2fc2953a8ada29e12c0e7b474317fe537fffb" + sha256 cellar: :any_skip_relocation, sonoma: "0baa7f427b863fba20abfeb72d188c8b4052e6e218f37d231263b2fbee648327" + sha256 cellar: :any_skip_relocation, ventura: "702ff0454b5ab6cb3dc19c8fc2a18587a510a93a81069b8701bffdbcf25e350f" + sha256 cellar: :any_skip_relocation, monterey: "9dad4aea34600bf11782f4c4e9867439369a4b59e1eae7ad05a7640fe39c1917" + sha256 cellar: :any_skip_relocation, big_sur: "ca9db7f72804b3701ea833c24802b5c81f4297d556482596cc755f67a1061dbb" + sha256 cellar: :any_skip_relocation, catalina: "566141035e7c94c92a4422addea68ea86431916055d14bfe5e20de79c3a6451c" + sha256 cellar: :any_skip_relocation, arm64_linux: "293883fc2cf4c4380eac853819e833eeac21f8d184814aca4c0cb53d8ca80a57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e1f1396a2eec2571aed2861955e94d41c841e2e57d85202084f263e95ecb1ca" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + assert_match "buster", shell_output("#{bin}/reg tags debian") + end +end diff --git a/Formula/r/regal.rb b/Formula/r/regal.rb new file mode 100644 index 0000000000000..711385e63583f --- /dev/null +++ b/Formula/r/regal.rb @@ -0,0 +1,51 @@ +class Regal < Formula + desc "Linter and language server for Rego" + homepage "https://www.openpolicyagent.org/projects/regal" + url "https://github.com/open-policy-agent/regal/archive/refs/tags/v0.36.1.tar.gz" + sha256 "34bc0edcb3d23da88ed644a351112450b0016e110e6ef0349abfee103a2fda07" + license "Apache-2.0" + head "https://github.com/open-policy-agent/regal.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a989393a22fed5c425914d468543632356c789aec52a5e40cdeb9f9eac199a48" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9773d0e14bf3218a5cdf2de2c485e6eceeaf9368433947ec3ec825de836dc479" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3427efbe1f74c52823b2648888add58a7071eb33ad5d2eaf49ba7f4bacd72ac0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6c18b66cf3ca43dfb39d2fff174fcd021ec33743fd3d9afad9286d3927b3b479" + sha256 cellar: :any_skip_relocation, sonoma: "bc976f8bc62ffb78fe0c86225581dfbec797e8fb57437203216d29810df6843b" + sha256 cellar: :any_skip_relocation, ventura: "857facb91526047c761196da0410ab7fffee6e43dab670542641b43b393d1ef5" + sha256 cellar: :any_skip_relocation, arm64_linux: "02006b7abb82dc21842b482b147f2988a03c64afc448eb75d20fec1e2383a069" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1534d32b616e3e0a99163402425b8f4bdb7ff33f40a40f1d2d9d7de39ed2fc16" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/open-policy-agent/regal/pkg/version.Version=#{version} + -X github.com/open-policy-agent/regal/pkg/version.Commit=#{tap.user} + -X github.com/open-policy-agent/regal/pkg/version.Timestamp=#{time.iso8601} + -X github.com/open-policy-agent/regal/pkg/version.Hostname=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"regal", "completion") + end + + test do + (testpath/"test").mkdir + + (testpath/"test/example.rego").write <<~REGO + package test + + import rego.v1 + + default allow := false + REGO + + output = shell_output("#{bin}/regal lint test/example.rego 2>&1") + assert_equal "1 file linted. No violations found.", output.chomp + + assert_match version.to_s, shell_output("#{bin}/regal version") + end +end diff --git a/Formula/r/regclient.rb b/Formula/r/regclient.rb new file mode 100644 index 0000000000000..3f494c1f7e13f --- /dev/null +++ b/Formula/r/regclient.rb @@ -0,0 +1,39 @@ +class Regclient < Formula + desc "Docker and OCI Registry Client in Go and tooling using those libraries" + homepage "https://regclient.org/" + url "https://github.com/regclient/regclient/archive/refs/tags/v0.9.2.tar.gz" + sha256 "ce53e082dd289c5f5b4cf0972bc8ff41d02b48114a010784f0f3261cc1c721ad" + license "Apache-2.0" + head "https://github.com/regclient/regclient.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9c3b1d71e34f16abc8af12295d0c6d6f49b9c35d200a530bed69ef6854a8124" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ee086607d20229b30ebbf7cec5d8ea366138f4500acb5ac1885299d2e6bdf49" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1ee086607d20229b30ebbf7cec5d8ea366138f4500acb5ac1885299d2e6bdf49" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ee086607d20229b30ebbf7cec5d8ea366138f4500acb5ac1885299d2e6bdf49" + sha256 cellar: :any_skip_relocation, sonoma: "715745cdec3c559a0beee810c5d25dec5d9d02077de5e5763dfa4f51b7a3563f" + sha256 cellar: :any_skip_relocation, ventura: "715745cdec3c559a0beee810c5d25dec5d9d02077de5e5763dfa4f51b7a3563f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3d4b38afd6181cde707b721e688187459e89291af6707eac5e6c11e160c76f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d55e4b69373d1d3720c91b8d0ed0ebd30961ef5a90bebbd414e2d5cf40162e6" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/regclient/regclient/internal/version.vcsTag=#{version}" + ["regbot", "regctl", "regsync"].each do |f| + system "go", "build", *std_go_args(ldflags:, output: bin/f), "./cmd/#{f}" + + generate_completions_from_executable(bin/f, "completion") + end + end + + test do + output = shell_output("#{bin}/regctl image manifest docker.io/library/alpine:latest") + assert_match "docker.io/library/alpine:latest", output + + assert_match version.to_s, shell_output("#{bin}/regbot version") + assert_match version.to_s, shell_output("#{bin}/regctl version") + assert_match version.to_s, shell_output("#{bin}/regsync version") + end +end diff --git a/Formula/r/regex-opt.rb b/Formula/r/regex-opt.rb new file mode 100644 index 0000000000000..ee24edc66fb1d --- /dev/null +++ b/Formula/r/regex-opt.rb @@ -0,0 +1,41 @@ +class RegexOpt < Formula + desc "Perl-compatible regular expression optimizer" + homepage "https://bisqwit.iki.fi/source/regexopt.html" + url "https://bisqwit.iki.fi/src/arch/regex-opt-1.2.4.tar.gz" + sha256 "128c8ba9570b1fd8a6a660233de2f5a4022740bc5ee300300709c3894413883f" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?regex-opt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fb8c9167137fd3a65707f40904f20a3e137082af231aeffffb3b2c85da9faa6f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8f6966781bb65e96887151f04d99914b4a4401e4888c2d88d5e82a15aa41937" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "13e3835588ba832622b5955f506b695016e1812c0fcaa903becb714442cf3a21" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d4874247088ba62cdcf1304c0dfd6910812b0a6e6a915a3d160dd43f0e3202e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0ce44869b68dab6e2d6bc5480c8c998b39aab0fc8dd56c915d9c8386fdea9778" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0d8b19c7d0c896626944d9affc850e42f0073ecbfe82b6380f0ed494c13bc759" + sha256 cellar: :any_skip_relocation, sonoma: "c9916801c59c641417a206eaf39ffa0c9ac1d86e40116923f78355f3a66be8d9" + sha256 cellar: :any_skip_relocation, ventura: "086aadac89bc6873dea864407ea634b84bc2b092ae6625a28ccb731ca9ac8fe0" + sha256 cellar: :any_skip_relocation, monterey: "1e232a280f15762a4de83d47a3bce3ae4ac726e9ad6ef8627ab47c425465b81d" + sha256 cellar: :any_skip_relocation, big_sur: "6c06ca3033c1a2d174368b4ca2194f732411c24911945cbad73b47a50ed1393b" + sha256 cellar: :any_skip_relocation, catalina: "8a561d7a4dfadf25fd39bd5b19d6a8161a2f0d1be2c459cbe691be17aef85bc0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ab2654a2088ac3ce8203f064d695612f9233dbbf2de6dbf892e589a1f1168e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cf554c9bf9c98356aef52dc0d2eeeb514020d2505ed41764458f937e662b95e" + end + + def install + system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" + bin.install "regex-opt" + end + + test do + output = shell_output("#{bin}/regex-opt foo...*..*bar") + assert_equal "foo.{3,}bar", output + end +end diff --git a/Formula/r/regina-rexx.rb b/Formula/r/regina-rexx.rb new file mode 100644 index 0000000000000..285d8c6fc2917 --- /dev/null +++ b/Formula/r/regina-rexx.rb @@ -0,0 +1,40 @@ +class ReginaRexx < Formula + desc "Interpreter for Rexx" + homepage "https://regina-rexx.sourceforge.io/" + url "https://downloads.sourceforge.net/project/regina-rexx/regina-rexx/3.9.7/regina-rexx-3.9.7.tar.gz" + sha256 "f13701ebd542e74d0fc83b2a7876a812b07d21e43400275ed65b1ac860204bd4" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "d76bfed5b0028c56cafecba2170f782ed8931dd6407df7d000bd96d0efdf8e40" + sha256 arm64_sequoia: "d46186cbae2e186143060856047562350893ed578530dc613bf6937d6256fd03" + sha256 arm64_sonoma: "bab4ff512b66e827e7da2dcf394cdf82aba419cc239080d869f57d99a2cfa2d5" + sha256 sonoma: "8145e5d4412439e1e009aa1f4ed9c38f3a09f98a52d95c2ec1a12f3d44615a06" + sha256 arm64_linux: "7af7c2860e82d3491fd3c16780357d93cf5e079faa31818422788639409ef536" + sha256 x86_64_linux: "bfd12c2f8bcc5e7a606df315404dd46fe556613c395bb87f0971c7bf7f85e868" + end + + uses_from_macos "libxcrypt" + + def install + ENV.deparallelize # No core usage for you, otherwise race condition = missing files. + system "./configure", *std_configure_args, + "--with-addon-dir=#{HOMEBREW_PREFIX}/lib/regina-rexx/addons", + "--with-brew-addon-dir=#{lib}/regina-rexx/addons" + system "make" + + install_targets = OS.mac? ? ["installbase", "installbrewlib"] : ["install"] + system "make", *install_targets + end + + test do + (testpath/"test").write <<~EOS + #!#{bin}/regina + Parse Version ver + Say ver + EOS + chmod 0755, testpath/"test" + assert_match version.to_s, shell_output(testpath/"test") + end +end diff --git a/Formula/r/regipy.rb b/Formula/r/regipy.rb new file mode 100644 index 0000000000000..5809f9401eba3 --- /dev/null +++ b/Formula/r/regipy.rb @@ -0,0 +1,67 @@ +class Regipy < Formula + include Language::Python::Virtualenv + + desc "Offline registry hive parsing tool" + homepage "https://github.com/mkorman90/regipy" + url "https://files.pythonhosted.org/packages/9a/15/27bdafd21f4cb822ac0520487bea7b822a0f299a0f2a3083c855d00653e7/regipy-5.2.0.tar.gz" + sha256 "cf1e977625e9dcf6fe4facb0cffa21ce6300bf585dee6d451e5f03b26fc61336" + license "MIT" + head "https://github.com/mkorman90/regipy.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b6591127d16324553044e990c10e49207fc76cc0ef6eb43a155f940ab9f69e7d" + end + + depends_on "python@3.14" + + pypi_packages package_name: "regipy[cli]" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "construct" do + url "https://files.pythonhosted.org/packages/02/77/8c84b98eca70d245a2a956452f21d57930d22ab88cbeed9290ca630cf03f/construct-2.10.70.tar.gz" + sha256 "4d2472f9684731e58cc9c56c463be63baa1447d674e0d66aeb5627b22f512c29" + end + + resource "inflection" do + url "https://files.pythonhosted.org/packages/e1/7e/691d061b7329bc8d54edbf0ec22fbfb2afe61facb681f9aaa9bff7a27d04/inflection-0.5.1.tar.gz" + sha256 "1a29730d366e996aaacffb2f1f1cb9593dc38e2ddd30c91250c6dde09ea9b417" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + def install + virtualenv_install_with_resources + end + + test do + resource "homebrew-test_hive" do + url "https://raw.githubusercontent.com/mkorman90/regipy/71acd6a65bdee11ff776dbd44870adad4632404c/regipy_tests/data/SYSTEM.xz" + sha256 "b1582ab413f089e746da0528c2394f077d6f53dd4e68b877ffb2667bd027b0b0" + end + + testpath.install resource("homebrew-test_hive") + + system bin/"regipy-plugins-run", "-p", "computer_name", "-o", "out.json", "SYSTEM" + h = JSON.parse(File.read("out.json")) + assert_equal h["computer_name"][0]["name"], "WKS-WIN732BITA" + assert_equal h["computer_name"][1]["name"], "WIN-V5T3CSP8U4H" + end +end diff --git a/Formula/r/regldg.rb b/Formula/r/regldg.rb new file mode 100644 index 0000000000000..d6bb7efb8432d --- /dev/null +++ b/Formula/r/regldg.rb @@ -0,0 +1,55 @@ +class Regldg < Formula + desc "Regular expression grammar language dictionary generator" + homepage "https://regldg.com/" + url "https://github.com/PatrickCronin/regldg/releases/download/v1.0.1/regldg-1.0.1.tar.gz" + sha256 "f5f401c645a94d4c737cefa2bbcb62f23407d25868327902b9c93b501335dc99" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5000f3d0e8bce79454c084a21166ce9603c839e1a535f7777dbc2d39bd1125d3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "95d8adc13413bbb6abd01895354b0e47b03ab86dff6c33de659516dc9b301d95" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91af1452780b526334c5393e27c0a833d91175120733a19db43ce1c37b05544d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11ec4d993c71645c53d5eda04bc1fd8b54c3427b552331ff09b1dec8042cf244" + sha256 cellar: :any_skip_relocation, arm64_monterey: "98548aa0c1df33ee57ed002fa10dcc0abbe4d7c6cbd4ac5e03eca3cab08f6dec" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2c395a7406c24b3b1f4138a48f97f39fe48200e5f41f7b42a8d577e76c72150f" + sha256 cellar: :any_skip_relocation, sonoma: "cbceacdbc18163269e2bee8ec2ad1605cf33319355f287b458e9042100d2510a" + sha256 cellar: :any_skip_relocation, ventura: "424f7bad0d29a37bdd656970ef4042e473a63fd67111cd935611860d1902c41a" + sha256 cellar: :any_skip_relocation, monterey: "61e9dbff3e2066040078bec8de5d0d5ea9204fe51f77c37b584fc6b514930051" + sha256 cellar: :any_skip_relocation, big_sur: "1380e8c5743f9f4e4b42ea800a51081bb9c64046c045ea13d024f5cb57285561" + sha256 cellar: :any_skip_relocation, catalina: "da76db370a17393f11d51e58c6a859fbfa9cc1d4a79bd225757c2f130ed016c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a72e3237dba2e31958acdee06ea43b1b6cf91e8cbca1e17de0a3ae3f1ce9d32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10b3273bf707f57edf849eb44f1eb7d86e61082cc899cdffe80aa04c550177fb" + end + + # Workaround for newer Clang + patch :DATA + + def install + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "Makefile", "-o regldg", "-o regldg -lm" unless OS.mac? + system "make" + bin.install "regldg" + end + + test do + system bin/"regldg", "test" + end +end + +__END__ +diff --git a/Makefile b/Makefile +index 5e18193..6dee9ae 100755 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + # Makefile + # Project building instructions. + +-COMPILE=cc -O3 -Wall -g -c ++COMPILE=cc -O3 -Wall -Wno-int-conversion -g -c + LINK=gcc -O3 -Wall -g -lm + + all: alt.o altlist.o build_structs.o char_set.o data.o debug.o \ diff --git a/Formula/r/regula.rb b/Formula/r/regula.rb new file mode 100644 index 0000000000000..4e2d1b5328089 --- /dev/null +++ b/Formula/r/regula.rb @@ -0,0 +1,59 @@ +class Regula < Formula + desc "Checks infrastructure as code templates using Open Policy Agent/Rego" + homepage "https://regula.dev/" + url "https://github.com/fugue/regula.git", + tag: "v3.2.1", + revision: "fed1e441b187504a5928e2999a6210b88279139c" + license "Apache-2.0" + head "https://github.com/fugue/regula.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2eee136b955f3ded92c7f2146866b89b17fcf0dfc5528222efb87b4ce388c481" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78f8f0c903978728c4f426cad57acba7b83a41f40430fb0476efe43cb32f4697" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40388fa42fc5f575c9fb2a660dfa64ea996ae9626d38befc13a6a68ef65d3d0e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "32955fbf11b6316c1d6af6bb53227567d76ec5d2c2afa72893eece0c861d7be8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c00dfdde9f6e15f5adcbff029615ef21121b0a08c3c05c722287806472b8488a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "45925ecaa81eebd2a4cc53d0547a0d02172b3196a281ec08d643efe9d62f0c32" + sha256 cellar: :any_skip_relocation, sonoma: "9b1e8326bbe8e1d629435f96ba38a1f1ea260fda074401aa8ed7639a8ae0ab76" + sha256 cellar: :any_skip_relocation, ventura: "6ad82b75e4b823e3335d3c1d2174a95b57b747d17da1fc69fba2a091dae4e98e" + sha256 cellar: :any_skip_relocation, monterey: "308470d3a43ce5fe69448da81d00e51c09b9d42ed299c9bf5a08619eedc305aa" + sha256 cellar: :any_skip_relocation, big_sur: "29c286e8ac38c7f7b2bcc912a406b40ad480e778ee25f7d5422f35e11deacb77" + sha256 cellar: :any_skip_relocation, arm64_linux: "93b155a16f91769d12e28f9fe3b0a7ccb6af00828a91fc7899e243d5f8f004db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "abbb2a4a62e5c18d4a2ecfb9c34fa98ff7d93b5275d0b288482fa65379978cd7" + end + + deprecate! date: "2025-04-27", because: :repo_archived, replacement_formula: "policy-engine" + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/fugue/regula/v3/pkg/version.Version=#{version} + -X github.com/fugue/regula/v3/pkg/version.GitCommit=#{Utils.git_short_head} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"regula", "completion") + end + + test do + (testpath/"infra/test.tf").write <<~HCL + resource "aws_s3_bucket" "foo-bucket" { + region = "us-east-1" + bucket = "test" + acl = "public-read" + force_destroy = true + + versioning { + enabled = true + } + } + HCL + + assert_match "Found 10 problems", shell_output("#{bin}/regula run infra", 1) + + assert_match version.to_s, shell_output("#{bin}/regula version") + end +end diff --git a/Formula/r/rekor-cli.rb b/Formula/r/rekor-cli.rb new file mode 100644 index 0000000000000..e39025ce9abd2 --- /dev/null +++ b/Formula/r/rekor-cli.rb @@ -0,0 +1,44 @@ +class RekorCli < Formula + desc "CLI for interacting with Rekor" + homepage "https://docs.sigstore.dev/logging/overview/" + url "https://github.com/sigstore/rekor/archive/refs/tags/v1.4.2.tar.gz" + sha256 "c3e8eaa5ee8b61467da9c69d083dda767ba563d54e237ba3f40970494ee9be87" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "90535810c485ddb249857d6f492c1e3ec4b1edb978dda966cd36e7eb0bd714b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90535810c485ddb249857d6f492c1e3ec4b1edb978dda966cd36e7eb0bd714b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "90535810c485ddb249857d6f492c1e3ec4b1edb978dda966cd36e7eb0bd714b9" + sha256 cellar: :any_skip_relocation, sonoma: "a8dbbf57b1e5946ac57f6076c4dfcb9183182423aa6b3fc163dcd5e60a7dcec7" + sha256 cellar: :any_skip_relocation, arm64_linux: "24a2720fc8ac04f0c408708b59289729d451ad18c09aae2d712766b0308fd729" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6a65a455a7f3dbe54c8fc43fb8a0160711783564008dc682abdf851475d4470" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/release-utils/version.gitVersion=#{version} + -X sigs.k8s.io/release-utils/version.gitCommit=#{tap.user} + -X sigs.k8s.io/release-utils/version.gitTreeState=#{tap.user} + -X sigs.k8s.io/release-utils/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/rekor-cli" + + generate_completions_from_executable(bin/"rekor-cli", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/rekor-cli version") + + url = "https://github.com/sigstore/rekor/releases/download/v#{version}/rekor-cli-darwin-arm64" + output = shell_output("#{bin}/rekor-cli search --artifact #{url} 2>&1") + assert_match "Found matching entries (listed by UUID):", output + end +end diff --git a/Formula/r/release-it.rb b/Formula/r/release-it.rb new file mode 100644 index 0000000000000..48d0219f0cd4f --- /dev/null +++ b/Formula/r/release-it.rb @@ -0,0 +1,32 @@ +class ReleaseIt < Formula + desc "Generic CLI tool to automate versioning and package publishing related tasks" + homepage "https://github.com/release-it/release-it" + url "https://registry.npmjs.org/release-it/-/release-it-19.0.5.tgz" + sha256 "9a292b185d437a717a25acce919ab704a32ed29dfd4db1937809f7ae6d3043aa" + license "MIT" + + livecheck do + url :homepage + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "f232d7039e2c2a7276df7aade449867f3066853729ba9fbb4f22f3f0b15d1928" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/release-it -v") + (testpath/".release-it.json").write("{\"foo\": \"bar\"}") + (testpath/"package.json").write("{\"name\":\"test-pkg\",\"version\":\"1.0.0\"}") + assert_match(/Let's release test-pkg.+\(1\.0\.0\.\.\.1\.0\.1\).+Empty changelog.+Done \(in \d+s\.\)/m, + shell_output("#{bin}/release-it --npm.skipChecks --no-npm.publish --ci")) + assert_match "1.0.1", (testpath/"package.json").read + end +end diff --git a/Formula/r/rem.rb b/Formula/r/rem.rb new file mode 100644 index 0000000000000..36878d58befe1 --- /dev/null +++ b/Formula/r/rem.rb @@ -0,0 +1,39 @@ +class Rem < Formula + desc "Command-line tool to access OSX Reminders.app database" + homepage "https://github.com/kykim/rem" + url "https://github.com/kykim/rem/archive/refs/tags/20150618.tar.gz" + sha256 "e57173a26d2071692d72f3374e36444ad0b294c1284e3b28706ff3dbe38ce8af" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f0f26a3c93f78baac169c18c7fa119e351fdb10d8cce429fae0f45942676775" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18d24b6a8f332bb30a204b078ae06569a7fc851895aea755e5c3771a24b60ddd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bda72308d8fd433628ebefa28e3821f2a6be7544ae2e358d09be602b8bf8f9da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83fa3cbc561ea006d86be97f4e6b4d23dd3368a027e5caabd0966da44f545100" + sha256 cellar: :any_skip_relocation, arm64_monterey: "95518f0764af3fbec9cede76e6431255c13360bf5d78c1f7447c16f6ff79ab81" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f0f72e190a73fd43f3528c08049aca2f52ce7a8cfa25b779383c3692ee7aab18" + sha256 cellar: :any_skip_relocation, sonoma: "03e3eae7390b3b17b2bc20c3f13c9bb2f5bd5f5efca57d7d63009b1c9d05900c" + sha256 cellar: :any_skip_relocation, ventura: "fefae56adda2dc6449fa9739305bb1915fa3bb4dc08c530cb0ce98aa0cb3e306" + sha256 cellar: :any_skip_relocation, monterey: "f3d0ceb432ecfde1ef59ac1bedc77b072b02a64b6013fb2606d278ec2d3ee4df" + sha256 cellar: :any_skip_relocation, big_sur: "e0af2d48a7809890f04480b0b4d28f6354130754609627ed76ce6d76a5135898" + sha256 cellar: :any_skip_relocation, catalina: "bfab3fd2fd8da4e4620d80a632d774b4742c6c34c5b73d89fafd3d246369fce6" + end + + depends_on xcode: :build + depends_on :macos + + conflicts_with "remind", because: "both install `rem` binaries" + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", + "SYMROOT=build" + bin.install "build/Release/rem" + end + + test do + system bin/"rem", "version" + end +end diff --git a/Formula/r/remake.rb b/Formula/r/remake.rb new file mode 100644 index 0000000000000..d78c87b348167 --- /dev/null +++ b/Formula/r/remake.rb @@ -0,0 +1,54 @@ +class Remake < Formula + desc "GNU Make with improved error handling, tracing, and a debugger" + homepage "https://bashdb.sourceforge.net/remake/" + url "https://downloads.sourceforge.net/project/bashdb/remake/4.3%2Bdbg-1.6/remake-4.3%2Bdbg-1.6.tar.gz" + version "4.3-1.6" + sha256 "f6a0c6179cd92524ad5dd04787477c0cd45afb5822d977be93d083b810647b87" + license "GPL-3.0-only" + + # We check the "remake" directory page because the bashdb project contains + # various software and remake releases may be pushed out of the SourceForge + # RSS feed. + livecheck do + url "https://sourceforge.net/projects/bashdb/files/remake/" + regex(%r{href=.*?remake/v?(\d+(?:\.\d+)+(?:(?:%2Bdbg)?[._-]\d+(?:\.\d+)+)?)/?["' >]}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match&.first&.sub(/%2Bdbg/i, "") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "f3e10b032f0c417f08105fa2c15a5717151f8da9f094e5244cee0572b38d7d37" + sha256 arm64_sequoia: "e653146f267c162714ce0110f5cc892c9a2cbf2e0555922a31f26e65139385ab" + sha256 arm64_sonoma: "a4f68de1ce00c29c883c1c43b36b256ae2d5d7575673036467cdac1dd565a84b" + sha256 arm64_ventura: "5a7316d4730a456b7a84576294cf3ecc43bb0d66198a56c006b8b6fcd7ee34a8" + sha256 arm64_monterey: "fe58f73701268996a6f273fd59cc85694152ed4a2e1f2268b22c532c5797a91d" + sha256 arm64_big_sur: "95b6ece00e5597ef7277055fbd63584d87255bc1f23168b496cc81bbed99c7ef" + sha256 sonoma: "b5cf395e923ae2dd635151eb563064ba9cdfc0521a0109d2a73bec3555289192" + sha256 ventura: "cb1b7c4b4f65b0ee7bdc44243f69d45ef825c876f3349d8ed33c892998a2540f" + sha256 monterey: "692455854a3099491ec14ab4f1c45cbf9c92002a1ecc4c472e0418b73604901c" + sha256 big_sur: "523411a133faf8c381ca3d6ab6b057d42b4a14eaf21b249dc5a0213f5cfe974e" + sha256 arm64_linux: "492ff0695438a46997ed2012687feacdb6f30a1a93e47c9be3cad34b76ac8ea1" + sha256 x86_64_linux: "caad81ec9c391c8a52c027ee7a7580d324c5743ad8fa1223c9ad11e41772d5b0" + end + + depends_on "readline" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + # Remove texinfo files for make to avoid conflict + rm info.glob("make.info*") + end + + test do + (testpath/"Makefile").write <<~MAKE + all: + echo "Nothing here, move along" + MAKE + system bin/"remake", "-x" + end +end diff --git a/Formula/r/remarshal.rb b/Formula/r/remarshal.rb new file mode 100644 index 0000000000000..ef38ca1fb0f82 --- /dev/null +++ b/Formula/r/remarshal.rb @@ -0,0 +1,108 @@ +class Remarshal < Formula + include Language::Python::Virtualenv + + desc "Convert between TOML, YAML and JSON" + homepage "https://github.com/remarshal-project/remarshal" + url "https://files.pythonhosted.org/packages/c8/04/12595c827f1a3dfeadbb9c1b112e9b86c229e69f56b1696f0d4b5df40957/remarshal-1.2.0.tar.gz" + sha256 "f50950a1cca59efddaf54cd86b70377f12a4120970f3bc8a694b6c5c23ef7898" + license "MIT" + head "https://github.com/remarshal-project/remarshal.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9cd2da8a2078ef3247621e850eb1e148ec5ee79330eee02e0e4b739093ad44a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6842a3fedb2cb14aabaa5efef8d36f92edd5ed98020ae918026e1ff17cfb063b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d8e129b8e8902e72b9d44e2f8578e1b30548d7f2fc7da4708ca6dd7ff1ed87f" + sha256 cellar: :any_skip_relocation, sonoma: "8ebe6422c42ef9f1d396d34c13ada34ad3b7bb35bc929d1c1dc194a567840a01" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b4bf66764531c341cf21b78b5413e818574350655beba390c389068ac65392b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6df8a6b09dd4258057e39b612809a021173b907fd42353f2a5d579d730b70c0a" + end + + depends_on "python@3.14" + + conflicts_with "msgpack-tools", because: "both install 'json2msgpack' binary" + conflicts_with "toml2json", because: "both install `toml2json` binaries" + conflicts_with "yaml2json", because: "both install `yaml2json` binaries" + + resource "cbor2" do + url "https://files.pythonhosted.org/packages/3a/89/01df16cdc9c60c07956756c90fe92c684021003079e358a78e213bce45a2/cbor2-5.7.0.tar.gz" + sha256 "3f6d843f4db4d0ec501c46453c22a4fbebb1abfb5b740e1bcab34c615cd7406b" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/71/a6/34460d81e5534f6d2fc8e8d91ff99a5835fdca53578eac89e4f37b3a7c6d/rich_argparse-1.7.1.tar.gz" + sha256 "d7a493cde94043e41ea68fb43a74405fa178de981bf7b800f7a3bd02ac5c27be" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "u-msgpack-python" do + url "https://files.pythonhosted.org/packages/36/9d/a40411a475e7d4838994b7f6bcc6bfca9acc5b119ce3a7503608c4428b49/u-msgpack-python-2.8.0.tar.gz" + sha256 "b801a83d6ed75e6df41e44518b4f2a9c221dc2da4bcd5380e3a0feda520bc61a" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + json = <<~JSON + {"foo.bar":"baz","qux":1} + JSON + yaml = <<~YAML + foo.bar: baz + qux: 1 + YAML + toml = <<~TOML + "foo.bar" = "baz" + qux = 1 + TOML + assert_equal yaml, pipe_output("#{bin}/remarshal -if=json -of=yaml", json, 0) + assert_equal yaml, pipe_output("#{bin}/json2yaml", json, 0) + assert_equal toml, pipe_output("#{bin}/remarshal -if=yaml -of=toml", yaml, 0) + assert_equal toml, pipe_output("#{bin}/yaml2toml", yaml, 0) + assert_equal json, pipe_output("#{bin}/remarshal -if=toml -of=json", toml, 0) + assert_equal json, pipe_output("#{bin}/toml2json", toml, 0) + assert_equal pipe_output("#{bin}/remarshal -if=yaml -of=msgpack", yaml, 0), + pipe_output("#{bin}/remarshal -if=json -of=msgpack", json, 0) + + assert_match version.to_s, shell_output("#{bin}/remarshal --version") + end +end diff --git a/Formula/r/remctl.rb b/Formula/r/remctl.rb new file mode 100644 index 0000000000000..07125860ce719 --- /dev/null +++ b/Formula/r/remctl.rb @@ -0,0 +1,46 @@ +class Remctl < Formula + desc "Client/server application for remote execution of tasks" + homepage "https://www.eyrie.org/~eagle/software/remctl/" + url "https://archives.eyrie.org/software/kerberos/remctl-3.18.tar.xz" + sha256 "69980a0058c848f4d1117121cc9153f2daace5561d37bfdb061473f035fc35ef" + license "MIT" + + livecheck do + url "https://archives.eyrie.org/software/kerberos/" + regex(/href=.*?remctl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "65ed94e43fc5b48a50c38a417453622fda2f57d2845db6555cda4b1366f7da8e" + sha256 cellar: :any, arm64_sequoia: "a22e6463332dd82c82e286ebfdcb40577f163967c473d012c468c8b215e905e8" + sha256 cellar: :any, arm64_sonoma: "02f8ce6be131029af0d88382303757c5ac9a149bf0c66156b9093873af61f53d" + sha256 cellar: :any, arm64_ventura: "a7d183ea3da3af640ed517baa9623a207098627c651d1028819c1e8c7536f2e1" + sha256 cellar: :any, arm64_monterey: "49d5e57e353ff5342a2a915daadb5adf29d632cbf764278b3925e34480f1a0d4" + sha256 cellar: :any, arm64_big_sur: "67ab815bbb6094595b818fdd38d2c697a4ac6dd0a5e9ab6e9a17013cd42683fd" + sha256 cellar: :any, sonoma: "af23ebd8bd1f313d7c7457158f8bf1f16caecede018e8bbfda8581b079646fe0" + sha256 cellar: :any, ventura: "4474c52f63e68fa6cd369b00d41ee5963ab84f4f3156b94b09e3e3328c4c3037" + sha256 cellar: :any, monterey: "c071e9621162fd5e00e2735f1eb10e3eba302f2f5430740b4122c0ab2800e7d2" + sha256 cellar: :any, big_sur: "c98f0e9729545d32cf87de9eeb6cb5d9d889b26978903823cb78fadd10b03713" + sha256 cellar: :any_skip_relocation, arm64_linux: "325fd3e1bfce192eb6ea17639265b1f619ef95db046fbbf87efa92e8b1e0baa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "def6439b11bef8a6ee81d387991e0995b9fe76928e9dbd69bd65ea09b6931d1b" + end + + depends_on "libevent" + depends_on "pcre2" + + uses_from_macos "krb5" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-pcre2=#{Formula["pcre2"].opt_prefix}" + system "make", "install" + end + + test do + system bin/"remctl", "-v" + end +end diff --git a/Formula/r/remind.rb b/Formula/r/remind.rb new file mode 100644 index 0000000000000..758454ceb1c43 --- /dev/null +++ b/Formula/r/remind.rb @@ -0,0 +1,41 @@ +class Remind < Formula + desc "Sophisticated calendar and alarm" + homepage "https://dianne.skoll.ca/projects/remind/" + url "https://dianne.skoll.ca/projects/remind/download/remind-06.02.00.tar.gz" + sha256 "1033b292dea080fbc162ac31c1750ead18e645d3dc5357bbb2e7dbb603b85a8d" + license "GPL-2.0-only" + head "https://git.skoll.ca/Skollsoft-Public/Remind.git", branch: "master" + + livecheck do + url :homepage + regex(%r{href=.*?/download/remind-(\d+(?:[._]\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "4f2b3d5d328a4e799c56c5191dff1924898e2e66915ee697ce7b32de7e79fb0f" + sha256 arm64_sequoia: "8bddecb74226a01d0cac136b7bca6e800cf599e69d30c12b517fe7208215ebb2" + sha256 arm64_sonoma: "89bd9674a4d0af9f9154c99a9d3811e6d2a2f5617f95e61dac6f9c9af219edab" + sha256 sonoma: "0e123ff15d2ea3b8b6900dc9376a22288d50395fdc1bd803fb874a5207ca7918" + sha256 arm64_linux: "ec5beaa38a6b74594d15bd8cd82db61eb91cc3004af2eca4736a0040cc452d86" + sha256 x86_64_linux: "25560b44018e5eb019628b4802fff2d126062385a59443a493978725c6e6fd12" + end + + conflicts_with "rem", because: "both install `rem` binaries" + + def install + # Fix to error: unsupported option '-ffat-lto-objects' for target 'arm64-apple-darwin24.4.0' + inreplace "configure", "-ffat-lto-objects", "" if DevelopmentTools.clang_build_version >= 1700 + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"reminders.rem").write <<~REM + SET $OnceFile "./once.timestamp" + REM ONCE 2015-01-01 MSG Homebrew Test + REM + assert_equal "Reminders for Thursday, 1st January, 2015:\n\nHomebrew Test\n\n", + shell_output("#{bin}/remind reminders.rem 2015-01-01") + end +end diff --git a/Formula/r/ren.rb b/Formula/r/ren.rb new file mode 100644 index 0000000000000..2608221208c72 --- /dev/null +++ b/Formula/r/ren.rb @@ -0,0 +1,48 @@ +class Ren < Formula + desc "Rename multiple files in a directory" + homepage "https://pdb.finkproject.org/pdb/package.php/ren" + url "https://www.ibiblio.org/pub/Linux/utils/file/ren-1.0.tar.gz" + sha256 "6ccf51b473f07b2f463430015f2e956b63b1d9e1d8493a51f4ebd70f8a8136c9" + license :public_domain + + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9f780992d99547f095b09b50acb32ffe22ac0b9e973965931cbb2ce796ba2d1f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a3c1d2e3849aad71fa4b7f54cfbae86184153159a8019839ac7fb69747cebc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e228ed14477809a0b2e182d476e09213ac70ffa87469e637e3c8d0f446be2a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9277aaf4732d7c2ab0b9590bf81a1dfe82a1e8e40dd4d5c2e4369d839bd781c5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f6b10a80274e2cd7b78b8bbf90e8132511c321ec104bd9418b89814fa6dd2a4e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9ac0c757ec1ce881161a4f5cf29377fc60070b97a5578802e35edf4d271ee60d" + sha256 cellar: :any_skip_relocation, sonoma: "2d06caa4062b59b1cddb36e26d3e69dada887ed756a53d3da5cf33583851e01e" + sha256 cellar: :any_skip_relocation, ventura: "985da9224010992dd43987ae41b0a216ea37233d726918aab196326513f1c3a8" + sha256 cellar: :any_skip_relocation, monterey: "4c6fb1c77c59fd33c98809ae637e443959d671ad4ae66a5b03ee384714f8521f" + sha256 cellar: :any_skip_relocation, big_sur: "1b693ca6331acfcd0df015f3dd19c57ac97aed62f02013f3df2cc62d72387533" + sha256 cellar: :any_skip_relocation, catalina: "29c6fe9c0e66e571fd15e9593e94d4a27feb3dd4bb5f0091e8fc6d5dc32d3727" + sha256 cellar: :any_skip_relocation, arm64_linux: "64e739899aad37892c2f55907c142bacc1fe090cf2363aa8256e1d8564e4a845" + sha256 cellar: :any_skip_relocation, x86_64_linux: "355528c07f8022b72a8f20419d97004040f5348e60596f84ab9f3ab461cbb13f" + end + + def install + # Fix compile with newer Clang + if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-implicit-int -Wno-implicit-function-declaration" + end + + system "make" + bin.install "ren" + man1.install "ren.1" + end + + test do + touch "test1.foo" + touch "test2.foo" + system bin/"ren", "*.foo", "#1.bar" + assert_path_exists testpath/"test1.bar" + assert_path_exists testpath/"test2.bar" + refute_path_exists testpath/"test1.foo" + refute_path_exists testpath/"test2.foo" + end +end diff --git a/Formula/r/rename.rb b/Formula/r/rename.rb new file mode 100644 index 0000000000000..8d048d429beb0 --- /dev/null +++ b/Formula/r/rename.rb @@ -0,0 +1,36 @@ +class Rename < Formula + desc "Perl-powered file rename script with many helpful built-ins" + homepage "http://plasmasturm.org/code/rename" + url "https://github.com/ap/rename/archive/refs/tags/v1.601.tar.gz" + sha256 "e8fd67b662b9deddfb6a19853652306f8694d7959dfac15538a9b67339c87af4" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/ap/rename.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "ef28d01adefde7f83ad97aeb21b4af98f66b5594ac7d69bb76f01b3f2ac80145" + end + + depends_on "pod2man" => :build + + uses_from_macos "perl" + + on_linux do + conflicts_with "util-linux", because: "both install `rename` binaries" + end + + def install + system "#{Formula["pod2man"].opt_bin}/pod2man", "rename", "rename.1" + bin.install "rename" + man1.install "rename.1" + end + + test do + touch "foo.doc" + system bin/"rename -s .doc .txt *.d*" + refute_path_exists testpath/"foo.doc" + assert_path_exists testpath/"foo.txt" + end +end diff --git a/Formula/r/renameutils.rb b/Formula/r/renameutils.rb new file mode 100644 index 0000000000000..0b7097aea47d9 --- /dev/null +++ b/Formula/r/renameutils.rb @@ -0,0 +1,68 @@ +class Renameutils < Formula + desc "Tools for file renaming" + homepage "https://www.nongnu.org/renameutils/" + url "https://download.savannah.gnu.org/releases/renameutils/renameutils-0.12.0.tar.gz" + sha256 "cbd2f002027ccf5a923135c3f529c6d17fabbca7d85506a394ca37694a9eb4a3" + license "GPL-3.0-or-later" + revision 3 + + livecheck do + url "https://download.savannah.gnu.org/releases/renameutils/" + regex(/href=.*?renameutils[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0fdd550dfb8a3ec4c7b30c22a6be8bf88104207328b51b7a3806b9f254e4eb85" + sha256 cellar: :any, arm64_sequoia: "93b6c0287a2a5222cc55484b0baa724174ac826afffc016f75165fdc0d37e6ea" + sha256 cellar: :any, arm64_sonoma: "9f28d9eb889603714cc5473541918196f60aab1e053791993ae53afd14c27926" + sha256 cellar: :any, arm64_ventura: "38109c05cfb9f8fcca3aeff270ad845937c1dd8677a74ea7fec3d717a3c722c9" + sha256 cellar: :any, arm64_monterey: "a6570746ef47eed43cbde686b8ebf162559a9ada031bab821064c5e0754135a8" + sha256 cellar: :any, arm64_big_sur: "0ea05fad50a7a43df09d3bbb652140e5037e91320ff9e549a9ad0cf41dfaa958" + sha256 cellar: :any, sonoma: "48bec726e452ee15d1d8e15ee14afb00ad95bf023fb94f38726fff6a1a7302fa" + sha256 cellar: :any, ventura: "75072c6cbce5f3a83176da9790df986e4d4dea99c6fc7c52f4b8d942c31c1026" + sha256 cellar: :any, monterey: "93a4fb65fd3bba13cd797f0c374981b8dde01ee25a0b0637f6e4448b655457e4" + sha256 cellar: :any, big_sur: "503b84eed8791b4a924e61fdfb0ea53cb6d349fe8a55c43ab7582c1e2a0985ba" + sha256 cellar: :any, catalina: "2ec48c66fea9f53acf2b2ba3b726e6f7a9ff35778a3fb574fc59e7c6d01f681a" + sha256 arm64_linux: "7e705d1e479f9c7c96ffe78fb84bb17f90897b130bb5e9b18699381fbd3de9f4" + sha256 x86_64_linux: "1a7ddae9fa3352ec89e73c91eaabedc5e941e3e752fdf5afda5b5098fb65cd7c" + end + + depends_on "coreutils" + depends_on "readline" # Use instead of system libedit + + conflicts_with "ipmiutil", because: "both install `icmd` binaries" + + # Use the GNU versions of certain system utilities. See: + # https://trac.macports.org/ticket/24525 + # Patches rewritten at version 0.12.0 to handle file changes. + # The fourth patch is new and fixes a Makefile syntax error that causes + # make install to fail. Reported upstream via email and fixed in HEAD. + # Remove patch #4 at version > 0.12.0. The first three should persist. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/renameutils/0.12.0.patch" + sha256 "ed964edbaf388db40a787ffd5ca34d525b24c23d3589c68dc9aedd8b45160cd9" + end + + def install + # Work around build failure on Apple Silicon due to trying to use deprecated stat64. + # io-utils.c:93:19: error: variable has incomplete type 'struct stat64' + ENV["ac_cv_func_lstat64"] = "no" if Hardware::CPU.arm? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--with-packager=Homebrew", *args, *std_configure_args + system "make" + ENV.deparallelize # parallel install fails + system "make", "install" + end + + test do + (testpath/"test.txt").write "Hello World!" + pipe_output("#{bin}/icp test.txt", ".2\n") + assert_equal File.read("test.txt"), File.read("test.txt.2") + end +end diff --git a/Formula/r/render.rb b/Formula/r/render.rb new file mode 100644 index 0000000000000..35542e7d05cc2 --- /dev/null +++ b/Formula/r/render.rb @@ -0,0 +1,34 @@ +class Render < Formula + desc "Command-line interface for Render" + homepage "https://render.com/docs/cli" + url "https://github.com/render-oss/cli/archive/refs/tags/v2.5.0.tar.gz" + sha256 "91518d1dab2360af844009426fab8542a79c50b80995ac447295a4e709a03fe6" + license "Apache-2.0" + head "https://github.com/render-oss/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b4583e25e780961c1512fbcdd2c16718b3f8dad386c957102d7ca18d6bad00b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4583e25e780961c1512fbcdd2c16718b3f8dad386c957102d7ca18d6bad00b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4583e25e780961c1512fbcdd2c16718b3f8dad386c957102d7ca18d6bad00b6" + sha256 cellar: :any_skip_relocation, sonoma: "31f115ab6e939ff0823429204b0e34627749574ba8ccfacef72690009443f63d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f11b3a924e3a97d23cb7b5a60602d66a69ccec801069184eaf78f7df9f8e67a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "279482de97d750d3b955ce6a8a452dda2e61a2e5cfc80c188addceecedf96299" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/render-oss/cli/pkg/cfg.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/render --version") + + output = shell_output("#{bin}/render services -o json 2>&1", 1) + assert_match "Error: no workspace set. Use `render workspace set` to set a workspace", output + end +end diff --git a/Formula/r/renovate.rb b/Formula/r/renovate.rb new file mode 100644 index 0000000000000..d6736d58e632f --- /dev/null +++ b/Formula/r/renovate.rb @@ -0,0 +1,40 @@ +class Renovate < Formula + desc "Automated dependency updates. Flexible so you don't need to be" + homepage "https://github.com/renovatebot/renovate" + url "https://registry.npmjs.org/renovate/-/renovate-41.169.0.tgz" + sha256 "ada1666a9e0111185331b998659025e206ee129c51e10e53df2225f74adec882" + license "AGPL-3.0-only" + + # There are thousands of renovate releases on npm and the page the `Npm` + # strategy checks is several MB in size and can time out before the request + # resolves. This checks the first page of tags on GitHub (to minimize data + # transfer). + livecheck do + url "https://github.com/renovatebot/renovate/tags" + regex(%r{href=["']?[^"' >]*?/tag/v?(\d+(?:\.\d+)+)["' >]}i) + strategy :page_match + throttle 10 + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b5c887fb8d2ed0e3104d24c29487f864f9a0bed5fcf4e6a5f63ff666e93af86b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "adf3c32bebddb8743be970f0faf04fae622efd0cec46c6f1f2d8ed34e50c0c3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99c1916c963c72796c4ad5443299443697ebdbbb1407fe513dd83438db9a253b" + sha256 cellar: :any_skip_relocation, sonoma: "bbd5baa6f6a9793deb65b1917d2134445044b016db6c488988373c5704ce7742" + sha256 cellar: :any_skip_relocation, arm64_linux: "98cc1a11ef37b027e9ee9c46fcf3d389c8ba3c4b7d8c1b83d85cd275a362c142" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21fbbd991eec20cf6a8c8dafa9e59fa83535074c2f56dadb6f074c6cd81ad912" + end + + depends_on "node@22" + + uses_from_macos "git", since: :monterey + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"renovate", "--platform=local", "--enabled=false" + end +end diff --git a/Formula/r/reop.rb b/Formula/r/reop.rb new file mode 100644 index 0000000000000..78b96d985473d --- /dev/null +++ b/Formula/r/reop.rb @@ -0,0 +1,62 @@ +class Reop < Formula + desc "Encrypted keypair management" + homepage "https://flak.tedunangst.com/post/reop" + url "https://flak.tedunangst.com/files/reop-2.1.1.tgz" + mirror "https://bo.mirror.garr.it/OpenBSD/distfiles/reop-2.1.1.tgz" + sha256 "fa8ae058c51efec5bde39fab15b4275e6394d9ab1dd2190ffdba3cf9983fdcac" + license "ISC" + revision 1 + + livecheck do + skip "No longer developed" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "95b75472fc27e78edb5a78cfce5ee11eab88c09ba2b3344d50f55189c055c038" + sha256 cellar: :any, arm64_sequoia: "b1329c9bb7f9a9adb0ccf90c4c045cfa032215406f48c4fbe5d5f010019091a9" + sha256 cellar: :any, arm64_sonoma: "0a34d7d7270cd31264c8064b44f2fd1475a6edec8d159f2455ba6d5f6a5dce80" + sha256 cellar: :any, arm64_ventura: "8068e06ca891b71c1a18097fff6be93b18f56bade43aa6855d1490dfef7ad4c4" + sha256 cellar: :any, arm64_monterey: "55cc0d36de154d5a561c5f02c64ea5498283cf83eba356433712e17f9be81a15" + sha256 cellar: :any, sonoma: "743de0a38cb6ec3d1f7988376bccd80f9a5b8501b72d4bd0812118e17b63644b" + sha256 cellar: :any, ventura: "c89f4b388723c96fc8152e3d95d5817ca8dc66f1b23fe62c37bf0d26b33ceb8d" + sha256 cellar: :any, monterey: "04fa8b5abe8bf9c8064a70c32393933339a60f66e3306d95e44b5748b1a960b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "566db99533e99f809e5fe5dac5f9f671c2612139c0e51099c0b328cbdb7f2f9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39a6b6aaa92dc34131e9ecf9c22a8ef890b8d662960a5dba258bb58f87d71516" + end + + depends_on "libsodium" + + def install + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "GNUmakefile", "${LDFLAGS} ${OBJS}", "${OBJS} ${LDFLAGS}" + + system "make", "-f", "GNUmakefile" + bin.install "reop" + man1.install "reop.1" + end + + test do + (testpath/"pubkey").write <<~EOS + -----BEGIN REOP PUBLIC KEY----- + ident:root + RWRDUxZNDeX4wcynGeCr9Bro6Ic7s1iqi1XHYacEaHoy+7jOP+ZE0yxR+2sfaph2MW15e8eUZvvI + +lxZaqFZR6Kc4uVJnvirIK97IQ== + -----END REOP PUBLIC KEY----- + EOS + + (testpath/"msg").write <<~EOS + testing one two three four + EOS + + (testpath/"sig").write <<~EOS + -----BEGIN REOP SIGNATURE----- + ident:root + RWQWTQ3l+MHMpx8RO/+BX/xxHn0PiSneiJ1Au2GurAmx4L942nZFBRDOVw2xLzvp/RggTVTZ46k+ + GLVjoS6fSuLneCfaoRlYHgk= + -----END REOP SIGNATURE----- + EOS + + system bin/"reop", "-V", "-x", "sig", "-p", "pubkey", "-m", "msg" + end +end diff --git a/Formula/r/reorder-python-imports.rb b/Formula/r/reorder-python-imports.rb new file mode 100644 index 0000000000000..e4e70bdf65220 --- /dev/null +++ b/Formula/r/reorder-python-imports.rb @@ -0,0 +1,35 @@ +class ReorderPythonImports < Formula + include Language::Python::Virtualenv + + desc "Rewrites source to reorder python imports" + homepage "https://github.com/asottile/reorder-python-imports" + url "https://files.pythonhosted.org/packages/99/4e/718d3f6cedb7062fff086e0571cf9f14c3ca9c9947d0245321091126fffb/reorder_python_imports-3.16.0.tar.gz" + sha256 "bcc4e5e467a8833ec187e35f84f1a3e442881b3c62c265ece87677100473db43" + license "MIT" + head "https://github.com/asottile/reorder-python-imports.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b28e6bd4d9505b58ecfac7c217340dc308db444a53440e9453c52db9b018418f" + end + + depends_on "python@3.14" + + resource "classify-imports" do + url "https://files.pythonhosted.org/packages/7e/b6/6cdc486fced92110a8166aa190b7d60435165119990fc2e187a56d15144b/classify_imports-4.2.0.tar.gz" + sha256 "7abfb7ea92149b29d046bd34573d247ba6e68cc28100c801eba4af17964fc40e" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.py").write <<~PYTHON + from os import path + import sys + PYTHON + system bin/"reorder-python-imports", "--exit-zero-even-if-changed", "#{testpath}/test.py" + assert_equal("import sys\nfrom os import path\n", File.read(testpath/"test.py")) + end +end diff --git a/Formula/r/repl.rb b/Formula/r/repl.rb new file mode 100644 index 0000000000000..b0a0f519ebd8f --- /dev/null +++ b/Formula/r/repl.rb @@ -0,0 +1,24 @@ +class Repl < Formula + desc "Wrap non-interactive programs with a REPL" + homepage "http://defunkt.io/repl/" + url "https://github.com/defunkt/repl/archive/refs/tags/v1.0.0.tar.gz" + sha256 "d0542404f03159b0d6eb22a1aa4a509714c87c8594fca5121c578d50d950307d" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "497a5e7b673fbd288181f823e1b1a7ba71770b6d3da82bd66ac100c60b0295b3" + end + + conflicts_with "nmh", because: "both install `repl` binaries" + + def install + bin.install "bin/repl" + man1.install "man/repl.1" + end + + test do + pipe_output("#{bin}/repl git", "init", 0) + end +end diff --git a/Formula/r/replxx.rb b/Formula/r/replxx.rb new file mode 100644 index 0000000000000..c8d0605f1951a --- /dev/null +++ b/Formula/r/replxx.rb @@ -0,0 +1,51 @@ +class Replxx < Formula + desc "Readline and libedit replacement" + homepage "https://github.com/AmokHuginnsson/replxx" + url "https://github.com/AmokHuginnsson/replxx/archive/refs/tags/release-0.0.4.tar.gz" + sha256 "a22988b2184e1d256e2d111b5749e16ffb1accbf757c7b248226d73c426844c4" + license all_of: ["BSD-3-Clause", "Unicode-TOU"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "6f9776e783d8c4f8a9b2d570e3d713fab96a4d971e9299c433ce5f13693201a0" + sha256 cellar: :any, arm64_sequoia: "e2ef892ce63fb20afa7af121db7e7291850badb448c4b0350ebfc6c5d7340051" + sha256 cellar: :any, arm64_sonoma: "ff95dde6a1e561d0d0389138643ba04db15fcddeb72c5770052ec05f196adeca" + sha256 cellar: :any, arm64_ventura: "3ce57d5f033cec54cce82b5db47a5a4f8e17b28cd3ad4533c5b7686ccfb6c4b0" + sha256 cellar: :any, sonoma: "0fdd6b76bc801980b0ffe7f0d6d2054d9c29ce0a65fe6765cab150414b0ae7d4" + sha256 cellar: :any, ventura: "23f9392ae9330ecedd2ce2c816c40a56a4a159b751a679772a16ee8259f455f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "44f5f6e6baf5168f5a86c4a2966114935de9e4c71b1d5a13676d1157b5fea3d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3dda3e653e8248fcef21065c08ee18ca0e693544d48e733502ca8f594c2bfe0" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples" + end + + test do + cp_r pkgshare/"examples", testpath + cd "examples" do + system ENV.cc, "-c", "util.c", "-o", "util.o" + system ENV.cc, "c-api.c", "util.o", "-L#{lib}", "-I#{include}", "-lreplxx", "-lm", "-o", "test" + + # `test` executable is an interactive program so we use Open3 to interact with it + Open3.popen3("./test") do |stdin, stdout, stderr, _| + sleep 2 + assert_match "starting...", stdout.gets + + stdin.puts "hello" + sleep 2 + + assert_match "thanks for the input: hello", stdout.gets + + stdin.close # simulate Ctrl+D by closing stdin + + assert_empty stderr.read + end + end + end +end diff --git a/Formula/r/repo.rb b/Formula/r/repo.rb new file mode 100644 index 0000000000000..b16d1318b20f3 --- /dev/null +++ b/Formula/r/repo.rb @@ -0,0 +1,28 @@ +class Repo < Formula + include Language::Python::Shebang + + desc "Repository tool for Android development" + homepage "https://source.android.com/source/developing.html" + url "https://gerrit.googlesource.com/git-repo.git", + tag: "v2.59", + revision: "1afe96a7e997ce7748f066b206a85ac648f7a87c" + license "Apache-2.0" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "fc992727509d5f22cf184abd9320ad596edf61b63a18f9c607e947aafd0cd95b" + end + + uses_from_macos "python" + + def install + bin.install "repo" + doc.install (buildpath/"docs").children + + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"repo" + end + + test do + assert_match "usage:", shell_output("#{bin}/repo help 2>&1") + end +end diff --git a/Formula/r/repomix.rb b/Formula/r/repomix.rb new file mode 100644 index 0000000000000..4f75a9ba93f56 --- /dev/null +++ b/Formula/r/repomix.rb @@ -0,0 +1,47 @@ +class Repomix < Formula + desc "Pack repository contents into a single AI-friendly file" + homepage "https://github.com/yamadashy/repomix" + url "https://registry.npmjs.org/repomix/-/repomix-1.8.0.tgz" + sha256 "82b8cc0e1ba5d249544de5e1b12be43dcf782128f1d1c6ff9bc10560595f01c2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d3d00ee6340fcfa795c0ed81477e34afe1710d8843499900e6581b2fe5419b08" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3d00ee6340fcfa795c0ed81477e34afe1710d8843499900e6581b2fe5419b08" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3d00ee6340fcfa795c0ed81477e34afe1710d8843499900e6581b2fe5419b08" + sha256 cellar: :any_skip_relocation, sonoma: "d3d00ee6340fcfa795c0ed81477e34afe1710d8843499900e6581b2fe5419b08" + sha256 cellar: :any_skip_relocation, arm64_linux: "780839c423b17b9f94775633803984970d1976dd299405baa05696b26c8b26c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "780839c423b17b9f94775633803984970d1976dd299405baa05696b26c8b26c6" + end + + depends_on "node" + + on_linux do + depends_on "xsel" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + clipboardy_fallbacks_dir = libexec/"lib/node_modules/#{name}/node_modules/clipboardy/fallbacks" + rm_r(clipboardy_fallbacks_dir) # remove pre-built binaries + if OS.linux? + linux_dir = clipboardy_fallbacks_dir/"linux" + linux_dir.mkpath + # Replace the vendored pre-built xsel with one we build ourselves + ln_sf (Formula["xsel"].opt_bin/"xsel").relative_path_from(linux_dir), linux_dir + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/repomix --version") + + (testpath/"test_repo").mkdir + (testpath/"test_repo/test_file.txt").write("Test content") + + output = shell_output("#{bin}/repomix --style plain --compress #{testpath}/test_repo") + assert_match "Packing completed successfully!", output + assert_match "This file is a merged representation of the entire codebase", (testpath/"repomix-output.txt").read + end +end diff --git a/Formula/r/reposurgeon.rb b/Formula/r/reposurgeon.rb new file mode 100644 index 0000000000000..abc8cd93e1c3e --- /dev/null +++ b/Formula/r/reposurgeon.rb @@ -0,0 +1,50 @@ +class Reposurgeon < Formula + desc "Edit version-control repository history" + homepage "http://www.catb.org/esr/reposurgeon/" + url "https://gitlab.com/esr/reposurgeon/-/archive/5.3/reposurgeon-5.3.tar.gz" + sha256 "a13e758e6bba5f4d17cdfa0ad8956bb864f336ba248b175353f741c3e5d3b089" + license "BSD-2-Clause" + head "https://gitlab.com/esr/reposurgeon.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "889508d576ab7da93911aaa8975968101cb229b79f80f3d7ad1a9602d7759568" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "102e0f3f46f350bfd96d6568ad92250a6779ec45cb0608c5b96eeee7acb113e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5050fc7b8b308327099fc78cfffeff27c0e41f63db65eb8b5d94648c51f88983" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f6045878a2a1f779ed09291a9c6d21eff4698be4377a7b6f958ef17faf3017c6" + sha256 cellar: :any_skip_relocation, sonoma: "479f8b063e2fb806b3b2585bb65fb65308b0209b3c7687d5d3bb44ff641d131f" + sha256 cellar: :any_skip_relocation, ventura: "97eba5c7136a5397bdf4ed46af8a7068edf5710e1d0c893081078cc64eaf5fc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "52b7350eaacb2a1a4203d7927265fad7e1f48f3abee399db014f357e7ef12b8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d79f22e49216e32de6b2e6e1575dae5a1d3c7dc140bd672ecbe203862fa30b08" + end + + depends_on "asciidoctor" => :build + depends_on "go" => :build + depends_on "git" # requires >= 2.19.2 + + uses_from_macos "ruby" + + on_system :linux, macos: :catalina_or_older do + depends_on "gawk" => :build + end + + def install + ENV.append_path "GEM_PATH", Formula["asciidoctor"].opt_libexec + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + system "make" + system "make", "install", "prefix=#{prefix}" + elisp.install "reposurgeon-mode.el" + end + + test do + (testpath/".gitconfig").write <<~EOS + [user] + name = Real Person + email = notacat@hotmail.cat + EOS + system "git", "init" + system "git", "commit", "--allow-empty", "--message", "brewing" + + assert_match "brewing", + shell_output("#{bin}/reposurgeon read list") + end +end diff --git a/Formula/r/repren.rb b/Formula/r/repren.rb new file mode 100644 index 0000000000000..41c09c2a5f172 --- /dev/null +++ b/Formula/r/repren.rb @@ -0,0 +1,32 @@ +class Repren < Formula + include Language::Python::Virtualenv + + desc "Rename anything using powerful regex search and replace" + homepage "https://github.com/jlevy/repren" + url "https://files.pythonhosted.org/packages/7b/9e/1d5ca018f98d82e2ec958564affca79f9477f03fd11f2f9d0deca834dd6c/repren-1.0.2.tar.gz" + sha256 "dad04db4427ca8999f7c228e9a5f3a5c26b919c7d1b26af402e0f9febdf09d93" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ec965ab02e6040b8fb71cf135d1d66547a96c9b28fbcdd8263ae01d589d7b60f" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/repren --version") + + (testpath/"test.txt").write <<~EOS + Hello World! + Replace Me + EOS + + system bin/"repren", "--from", "Replace", "--to", "Modify", testpath/"test.txt" + assert_match "Modify Me", (testpath/"test.txt").read + end +end diff --git a/Formula/r/reprepro.rb b/Formula/r/reprepro.rb new file mode 100644 index 0000000000000..b36fe9ecc60a0 --- /dev/null +++ b/Formula/r/reprepro.rb @@ -0,0 +1,66 @@ +class Reprepro < Formula + desc "Debian package repository manager" + homepage "https://salsa.debian.org/debian/reprepro" + url "https://deb.debian.org/debian/pool/main/r/reprepro/reprepro_5.3.1.orig.tar.xz" + sha256 "5a6d48bf1f60cfd3c32eae05b535b334972c1e9d4e62ed886dd54e040e9c1cda" + license "GPL-2.0-only" + revision 1 + + livecheck do + url "https://deb.debian.org/debian/pool/main/r/reprepro/" + regex(/href=.*?reprepro[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1b5855ee25ccd87bcbc2a4625fa0277603efd7009c52c318f3f8ca12a29470da" + sha256 cellar: :any, arm64_sequoia: "8eaef64ed0c0e9f094a22ac31fe47363d49231963ee63dc9f0378f78e4090da6" + sha256 cellar: :any, arm64_sonoma: "80efe269819b4ec7ff59218ea83c67374ad62869cd523fd3bcbc23a68a382195" + sha256 cellar: :any, arm64_ventura: "679cf41e7adc1e217f128f1b327afe9c36ff157b5f3bcfbb311f5303a0884b88" + sha256 cellar: :any, sonoma: "fbb7034959d348763e3eb3c08e64075d36c9fafd5ce59bdfb8d97649935f6b5f" + sha256 cellar: :any, ventura: "d4ebe5c1ab2c0bccf82f799081b90d85f11ef1691c74118722865bafbbad7f51" + sha256 cellar: :any_skip_relocation, arm64_linux: "564f8477e018c4640f5d62bd266440d63d13d0d9a3972000e3094d0f85f0749a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47d8665481d35d31fec110327e4c2d9c23629d3e18debee80d91c907a371dacf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "berkeley-db@5" + depends_on "gpgme" + depends_on "libarchive" + depends_on "libgpg-error" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "gcc" + end + + fails_with :clang do + cause "No support for GNU C nested functions" + end + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--with-gpgme=#{Formula["gpgme"].opt_lib}", + "--with-libarchive=#{Formula["libarchive"].opt_lib}", + "--with-libbz2=yes", + "--with-liblzma=#{Formula["xz"].opt_lib}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"conf"/"distributions").write <<~EOF + Codename: test_codename + Architectures: source + Components: main + EOF + system bin/"reprepro", "-b", testpath, "list", "test_codename" + end +end diff --git a/Formula/r/reproc.rb b/Formula/r/reproc.rb new file mode 100644 index 0000000000000..dc1505e0fb73e --- /dev/null +++ b/Formula/r/reproc.rb @@ -0,0 +1,67 @@ +class Reproc < Formula + desc "Cross-platform (C99/C++11) process library" + homepage "https://github.com/DaanDeMeyer/reproc" + url "https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v14.2.5.tar.gz" + sha256 "69467be0cfc80734b821c54ada263c8f1439f964314063f76b7cf256c3dc7ee8" + license "MIT" + head "https://github.com/DaanDeMeyer/reproc.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a9dc4b5152435ee4d4d0a3507837b170a60b74bc69c62942d790a475a799e20e" + sha256 cellar: :any, arm64_sequoia: "d0c6ae20f545beb6bcdf1cef7492705e3ee5985c17799f43d4877d5d4c69db2c" + sha256 cellar: :any, arm64_sonoma: "4d56ba8e140f0ec062188d880a89853361a324a276042f87dfd7534879a8c1f1" + sha256 cellar: :any, arm64_ventura: "95bc077fda0d3238e9a6d7bee628adcc5cf3fd90268b8e4ee96c97e075d97f74" + sha256 cellar: :any, arm64_monterey: "55aebee60bafdc235d68c900974ae1f27eb06e359fd760c2e90772d8bb783b2f" + sha256 cellar: :any, sonoma: "d3c2d756ae1b3b10b4c5d4d4f820612a7d47b5c0a028b19da44bc730dbe3f862" + sha256 cellar: :any, ventura: "12c715872d3f5471d6290cd8e9500caca92f5cd366d66c27a5a97deb5d7621eb" + sha256 cellar: :any, monterey: "7da06d575b4806cf58d434e9a86194173dd19eb30e7c34d08850da3124d61123" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbfbe1cfa82ec3ccb364ab971a8d7dcfaacd98c708a57f1c3b4031381e745896" + sha256 cellar: :any_skip_relocation, x86_64_linux: "693fb2c4503373a230ecae82f0b78cf91c2c83da3d7e16bb88c4d7efc86b7fae" + end + + depends_on "cmake" => :build + + def install + args = *std_cmake_args << "-DREPROC++=ON" + system "cmake", "-S", ".", "-B", "build", *args, "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + rm_r("build") + system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "--build", "build" + lib.install "build/reproc/lib/libreproc.a", "build/reproc++/lib/libreproc++.a" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) { + const char *args[] = { "echo", "Hello, world!", NULL }; + return reproc_run(args, (reproc_options) { 0 }); + } + C + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(void) { + int status = -1; + std::error_code ec; + + const char *args[] = { "echo", "Hello, world!", NULL }; + reproc::options options; + + std::tie(status, ec) = reproc::run(args, options); + return ec ? ec.value() : status; + } + CPP + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lreproc", "-o", "test-c" + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-lreproc++", "-o", "test-cpp" + + assert_equal "Hello, world!", shell_output("./test-c").chomp + assert_equal "Hello, world!", shell_output("./test-cpp").chomp + end +end diff --git a/Formula/r/req.rb b/Formula/r/req.rb new file mode 100644 index 0000000000000..a7f38efde5f99 --- /dev/null +++ b/Formula/r/req.rb @@ -0,0 +1,50 @@ +class Req < Formula + desc "Simple and opinionated HTTP scripting language" + homepage "https://github.com/andrewpillar/req" + url "https://github.com/andrewpillar/req/archive/refs/tags/v1.1.0.tar.gz" + sha256 "4b628556876a5d16e05bdcca8b9a0e9147d48d801e49b0acc624adf6cb4e5350" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "16f15db092a3128344c2731a6294b92c13ac3f1a9a2578333127c40862c24169" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "80b342c2fd081a819943fe63fd72a9c3b2e53ffa78ca8d34b45b841f9120910e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af8452502e589a8191f0c752198d5e9167188cee8314310ecaa24adcb12f7445" + sha256 cellar: :any_skip_relocation, arm64_ventura: "761e455eaec2c41951b0aef7e6ccea876443742d59c630ad922b0a0a6eac7204" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c2b469cb7417b2afa5e405cea18a5d0d2772b9e59cd986ed69b1e1ae1e1fb66f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "279b79fce25a2ffa89d62d35116f3a9bd0e4a0f842d67ba805549881b18ae084" + sha256 cellar: :any_skip_relocation, sonoma: "8896fd67fc6bd2d72c653bcd2611d1cb561c6fbf46a8a80e0439c50d6a512da1" + sha256 cellar: :any_skip_relocation, ventura: "f456775fc061aa0e0f3d864a014aae9c43c68a7eda55f5b73915a5daa788abf7" + sha256 cellar: :any_skip_relocation, monterey: "dbc6285c19cd5b0564bf5f2fb3a06023b96793ed139984aeadfaa8aa1c1f4181" + sha256 cellar: :any_skip_relocation, big_sur: "dc965d02788d551a28e21aff831c60c7cc9ac17197399651fd6a210bd1f0b3b4" + sha256 cellar: :any_skip_relocation, catalina: "e4d3f87b52397cf896e418a57719c8cebdd81c97a54eab5559c3606e0f91bbe2" + sha256 cellar: :any_skip_relocation, arm64_linux: "4459ae7f23e6236b6505f02322ba53e9a78a6c0a87b02b98236de6a32fff83d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "235b2a9a3aa0e458c04d7c4d77fc8bfbb7951c98bedbe5e4d1f7263609e964a2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"test.req").write <<~EOS + Stderr = open "/dev/stderr"; + Endpoint = "https://api.github.com/users"; + Resp = GET "$(Endpoint)/defunkt" -> send; + match $Resp.StatusCode { + 200 -> { + User = decode json $Resp.Body; + writeln _ "Got user: $(User["login"])"; + } + _ -> { + writeln $Stderr "Unexpected response: $(Resp.Status)"; + exit 1; + } + } + EOS + assert_match "Got user: defunkt", shell_output("#{bin}/req test.req") + end +end diff --git a/Formula/r/reshape.rb b/Formula/r/reshape.rb new file mode 100644 index 0000000000000..29b07f1668350 --- /dev/null +++ b/Formula/r/reshape.rb @@ -0,0 +1,53 @@ +class Reshape < Formula + desc "Easy-to-use, zero-downtime schema migration tool for Postgres" + homepage "https://github.com/fabianlindfors/reshape" + url "https://github.com/fabianlindfors/reshape/archive/refs/tags/v0.7.0.tar.gz" + sha256 "f348a21547cb2bfdc294ecc8a846eacec1708c29458db9afb6f8a1239f68d6cb" + license "MIT" + head "https://github.com/fabianlindfors/reshape.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4cfaa10f4b329f49d24d50df97f84fc1457d655f27b74da5849a72190e052473" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44a403226dcc034a328658eef19b96d0abf441c2042d4777fdad22b74dc4cc41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b29676af2bbf22ea192ead306a354827084c97c13eec0bac3f51a05117a598d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f233439c22ef1cff6dfda8ee24fb2ddf5e4a95c30ac5381b8d7163f9ed2d0619" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e7c394f7f2fcbbb5c77df28da0a1e7a19a33e65352ade54c1a7ed2ae962efa63" + sha256 cellar: :any_skip_relocation, sonoma: "0dfcd8ebd783f1dd0dc53e59c54e513240d690eee50cecfb9ef7e305871b70cd" + sha256 cellar: :any_skip_relocation, ventura: "67a29159ee666c5b6f0df160456cdbe810458da743942096972f7afb14d4a652" + sha256 cellar: :any_skip_relocation, monterey: "7dfc950175556a422af65fe3385113aced74343cf5d472d8b07542f59dea1e5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f81a7c24e3998e367e975ee46da03f2fe8c368253e93942c3735787d9d8cab16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38e9d423508ef37fa5359093653cf9dd6766419b3480159d7b9dd4fdb65a7677" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"migrations/test.toml").write <<~TOML + [[actions]] + type = "create_table" + name = "users" + primary_key = ["id"] + + [[actions.columns]] + name = "id" + type = "INTEGER" + generated = "ALWAYS AS IDENTITY" + + [[actions.columns]] + name = "name" + type = "TEXT" + TOML + + assert_match "SET search_path TO migration_test", + shell_output("#{bin}/reshape generate-schema-query") + + assert_match "Error: error connecting to server:", + shell_output("#{bin}/reshape migrate 2>&1", 1) + end +end diff --git a/Formula/r/restic.rb b/Formula/r/restic.rb new file mode 100644 index 0000000000000..06c992d932873 --- /dev/null +++ b/Formula/r/restic.rb @@ -0,0 +1,51 @@ +class Restic < Formula + desc "Fast, efficient and secure backup program" + homepage "https://restic.net/" + url "https://github.com/restic/restic/archive/refs/tags/v0.18.1.tar.gz" + sha256 "4b8e2b6cb20e9707e14b9b9d92ddb6f2e913523754e1f123e2e6f3321e67f7ca" + license "BSD-2-Clause" + head "https://github.com/restic/restic.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6fd5d1ca0cacb7629f7bc480c81dfa36c551bb610e5559e9a86a0712b4bc2a9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6fd5d1ca0cacb7629f7bc480c81dfa36c551bb610e5559e9a86a0712b4bc2a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6fd5d1ca0cacb7629f7bc480c81dfa36c551bb610e5559e9a86a0712b4bc2a9" + sha256 cellar: :any_skip_relocation, sonoma: "7d6d0d3486f2a8c77bef02e15e860c3ee9ecb2a78c217dffda26c125d4f0b3ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf1e673d725c5d20dd4829062da1a18710f0ce9780eb8a0f41613d913bd0397e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f787724e226c9f3ee6a6e1a94feb01262102ce1053d1a09ed18f5f8d835a6f96" + end + + depends_on "go" => :build + + def install + system "go", "run", "build.go" + + mkdir "completions" + system "./restic", "generate", "--bash-completion", "completions/restic" + system "./restic", "generate", "--zsh-completion", "completions/_restic" + system "./restic", "generate", "--fish-completion", "completions/restic.fish" + + mkdir "man" + system "./restic", "generate", "--man", "man" + + bin.install "restic" + bash_completion.install "completions/restic" + zsh_completion.install "completions/_restic" + fish_completion.install "completions/restic.fish" + man1.install Dir["man/*.1"] + end + + test do + mkdir testpath/"restic_repo" + ENV["RESTIC_REPOSITORY"] = testpath/"restic_repo" + ENV["RESTIC_PASSWORD"] = "foo" + + (testpath/"testfile").write("This is a testfile") + + system bin/"restic", "init" + system bin/"restic", "backup", "testfile" + + system bin/"restic", "restore", "latest", "-t", "#{testpath}/restore" + assert compare_file "testfile", "#{testpath}/restore/testfile" + end +end diff --git a/Formula/r/restish.rb b/Formula/r/restish.rb new file mode 100644 index 0000000000000..0ed9ac92e777c --- /dev/null +++ b/Formula/r/restish.rb @@ -0,0 +1,44 @@ +class Restish < Formula + desc "CLI tool for interacting with REST-ish HTTP APIs" + homepage "https://rest.sh/" + url "https://github.com/rest-sh/restish/archive/refs/tags/v0.21.0.tar.gz" + sha256 "9a73e743a78d6a28e2ff0dba53499b23c945c45f78b4a0ab3aa4b6283491de5d" + license "MIT" + head "https://github.com/rest-sh/restish.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "33614081c80256bdf3acb116d3f257c6489cd787e2ff9df3c74885894096c37b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8aa4ddbae64dffa735470d8981074ea73c0d12c1f2029fcfc9e734a9f348ea7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c3d2dca304c360b00dbb8e93605b7655fbaa2dc3654e9ff1f069ed63bd1f08e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b22e5d04d229446fd76949b5683c18185ee979aa8285db31e2de5693e8a9d8fb" + sha256 cellar: :any_skip_relocation, sonoma: "d34179ef97dd275569cac439f24bbfaedfbbf8e087b6cfc7e9d76caf7a3cf75b" + sha256 cellar: :any_skip_relocation, ventura: "1eadc3f54a712bdd3eaef9d6c3b709dcd6e3952e115a7014cef918fc15b192fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "da1c6f1f5713e62b76b0c15cbeb0a694dd61be0a2a79c5d5a94d2ffe39fdf18c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "677209c2e2a6883004bfbb59a807e2206dd4bf5997715fbd7ae98decf24dcd72" + end + + depends_on "go" => :build + + def install + # Workaround to avoid patchelf corruption when cgo is required (for crypto11) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + + generate_completions_from_executable(bin/"restish", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/restish --version") + + output = shell_output("#{bin}/restish https://httpbin.org/json") + assert_match "slideshow", output + + output = shell_output("#{bin}/restish https://httpbin.org/get?foo=bar") + assert_match "\"foo\": \"bar\"", output + end +end diff --git a/Formula/r/restview.rb b/Formula/r/restview.rb new file mode 100644 index 0000000000000..17404565ef7d0 --- /dev/null +++ b/Formula/r/restview.rb @@ -0,0 +1,70 @@ +class Restview < Formula + include Language::Python::Virtualenv + + desc "Viewer for ReStructuredText documents that renders them on the fly" + homepage "https://mg.pov.lt/restview/" + url "https://files.pythonhosted.org/packages/3d/d4/36ed06051e9702d3dae5f7bb0296b79b18621ff5a1bf43247509cbfeff8d/restview-3.0.2.tar.gz" + sha256 "8b4d75a0bed76b67b456ef7011f4eb6c98a556c9f837642df2202c7312fccc1a" + license "GPL-3.0-or-later" + head "https://github.com/mgedmin/restview.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f2254c6aeaa7538ce7a7885a2054fbeee886748c1b28aa98af5d73217281389a" + end + + depends_on "python@3.14" + + resource "bleach" do + url "https://files.pythonhosted.org/packages/76/9a/0e33f5054c54d349ea62c277191c020c2d6ef1d65ab2cb1993f91ec846d1/bleach-6.2.0.tar.gz" + sha256 "123e894118b8a599fd80d3ec1a6d4cc7ce4e5882b1317a7e1ba69b56e95f991f" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "readme-renderer" do + url "https://files.pythonhosted.org/packages/15/4e/0ffa80eb3e0d0fcc0c6b901b36d4faa11c47d10b9a066fdd42f24c7e646a/readme_renderer-36.0.tar.gz" + sha256 "f71aeef9a588fcbed1f4cc001ba611370e94a0cd27c75b1140537618ec78f0a2" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"sample.rst").write <<~EOS + Lists + ----- + + Here we have a numbered list + + 1. Four + 2. Five + 3. Six + EOS + + port = free_port + begin + pid = spawn bin/"restview", "--listen=#{port}", "--no-browser", "sample.rst" + sleep 15 + output = shell_output("curl -s 127.0.0.1:#{port}") + assert_match "

Here we have a numbered list

", output + assert_match "
  • Four
  • ", output + ensure + Process.kill("TERM", pid) + end + end +end diff --git a/Formula/r/resty.rb b/Formula/r/resty.rb new file mode 100644 index 0000000000000..da7a47722d009 --- /dev/null +++ b/Formula/r/resty.rb @@ -0,0 +1,84 @@ +class Resty < Formula + include Language::Python::Shebang + + desc "Command-line REST client that can be used in pipelines" + homepage "https://github.com/micha/resty" + url "https://github.com/micha/resty/archive/refs/tags/v3.0.tar.gz" + sha256 "9ed8f50dcf70a765b3438840024b557470d7faae2f0c1957a011ebb6c94b9dd1" + license "MIT" + revision 1 + head "https://github.com/micha/resty.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "822ecff7134608cd2f8b77f018ed5cdfe080ff2246ae16676b878d80e37dfee3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec5b20a27d1c9548291ebe45f91976563e04c018f9c1f8550fd616b715fa6791" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4eb2264c09b0b2578c1bfa8a834bc5d51093f49cb753e2dc192f2ca22a8b3d2a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a3f52cd17e22f2d66c3577cc4f097624db50b8412a7c346568b120367284518" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a3f52cd17e22f2d66c3577cc4f097624db50b8412a7c346568b120367284518" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e5c7150a045b16d9a42e1a15882d3877aae7022500db56222b8ee065ac37a2b7" + sha256 cellar: :any_skip_relocation, sonoma: "bc5f8426043e865dfb78710f4df699da3eaadee702b1c0665a0c95630bdc318a" + sha256 cellar: :any_skip_relocation, ventura: "71ee80ce7ac984d228659e5411b95f8e28331b623421a78aa7e5cd70548189ad" + sha256 cellar: :any_skip_relocation, monterey: "71ee80ce7ac984d228659e5411b95f8e28331b623421a78aa7e5cd70548189ad" + sha256 cellar: :any_skip_relocation, big_sur: "0bd9a42083f75c4766e0f880fae27b5a62bdc54c5ce017793f731da663571449" + sha256 cellar: :any_skip_relocation, arm64_linux: "6adf9e604e373a8dcb502b444e938daa08a8eee573a1e9b757eb3af4fb2848f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "664f2cbfde2529e7749b5f9b078cf1382fd0cf8f00a984b646d0b6c710a4a3b5" + end + + uses_from_macos "perl" + uses_from_macos "python" + + conflicts_with "nss", because: "both install `pp` binaries" + + resource "JSON" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-2.94.tar.gz" + sha256 "12271b5cee49943bbdde430eef58f1fe64ba6561980b22c69585e08fc977dc6d" + end + + def install + pkgshare.install "resty" + + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resource("JSON").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + + bin.install "pp" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + + bin.install "pypp" + if !OS.mac? || MacOS.version >= :monterey + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"pypp" + end + end + + def caveats + <<~EOS + To activate the resty, add the following to your shell profile e.g. ~/.profile + or ~/.zshrc: + source #{opt_pkgshare}/resty + EOS + end + + test do + cmd = "bash -c '. #{pkgshare}/resty && resty https://api.github.com' 2>&1" + assert_equal "https://api.github.com*", shell_output(cmd).chomp + json_pretty_pypp=<<~EOS + { + "a": 1 + } + EOS + json_pretty_pp=<<~EOS + { + "a" : 1 + } + EOS + assert_equal json_pretty_pypp, pipe_output("#{bin}/pypp", '{"a":1}', 0) + assert_equal json_pretty_pp, pipe_output("#{bin}/pp", '{"a":1}', 0).chomp + end +end diff --git a/Formula/r/resvg.rb b/Formula/r/resvg.rb new file mode 100644 index 0000000000000..9137d4bb88cec --- /dev/null +++ b/Formula/r/resvg.rb @@ -0,0 +1,78 @@ +class Resvg < Formula + desc "SVG rendering tool and library" + homepage "https://github.com/linebender/resvg" + url "https://github.com/linebender/resvg/archive/refs/tags/v0.45.1.tar.gz" + sha256 "02915519b7409f43110f3cbdc5f87724efd58da1d8516914bdabf060c8a9a178" + license "MPL-2.0" + head "https://github.com/linebender/resvg.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b394b8ad855982ab291e3aca3018d7d41325d9ade7bae391733163655c7bfd36" + sha256 cellar: :any, arm64_sequoia: "034dd22dbb4bf616d68ca85e3b2bdd929f780fcad78ba5b961daba8644f897da" + sha256 cellar: :any, arm64_sonoma: "08fe0cffbd93de9a3e9a264c3df96614db26d18eb7afc77f14a30a2a6d5779da" + sha256 cellar: :any, arm64_ventura: "cde09970ac7839b75906d8c3e7937eb66cefe1c6d3e931e4632a00bf7877aa21" + sha256 cellar: :any, sonoma: "3551c00ad4ce2fae49386e1a1fb5a6c63c33ca00c602aa04d9aa988a50a1afb3" + sha256 cellar: :any, ventura: "544d2b12b296cfc510382c6ed8ff519224c0cb3d9e9ba127023d18c67535bc41" + sha256 cellar: :any_skip_relocation, arm64_linux: "91f4bf60e4faa8f86d61d65d2cc7f51589643721cd565b48cee80492cba5150a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b219d496cf0be62b4172762515ccf8039ec43e9864b2d80b641fff9e5a8ea7f9" + end + + depends_on "cargo-c" => :build + depends_on "rust" => :build + depends_on "pkgconf" => :test + + def install + system "cargo", "install", *std_cargo_args(path: "crates/usvg") + system "cargo", "install", *std_cargo_args(path: "crates/resvg") + + system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--release", "--locked", + "--manifest-path", "crates/c-api/Cargo.toml", + "--prefix", prefix, "--libdir", lib + end + + test do + (testpath/"circle.svg").write <<~EOS + + + + EOS + + system bin/"resvg", testpath/"circle.svg", testpath/"test.png" + assert_path_exists testpath/"test.png" + + system bin/"usvg", testpath/"circle.svg", testpath/"test.svg" + assert_path_exists testpath/"test.svg" + + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char **argv) { + resvg_init_log(); + resvg_options *opt = resvg_options_create(); + resvg_options_load_system_fonts(opt); + + resvg_render_tree *tree; + int err = resvg_parse_tree_from_file(argv[1], opt, &tree); + resvg_options_destroy(opt); + if (err != RESVG_OK) { + printf("Error id: %i\\n", err); + abort(); + } + + resvg_size size = resvg_get_image_size(tree); + int width = (int)size.width; + int height = (int)size.height; + + printf("%d %d\\n", width, height); + resvg_tree_destroy(tree); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs resvg").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_equal "160 35", shell_output("./test #{test_fixtures("test.svg")}").chomp + end +end diff --git a/Formula/r/retdec.rb b/Formula/r/retdec.rb new file mode 100644 index 0000000000000..7125f59652a80 --- /dev/null +++ b/Formula/r/retdec.rb @@ -0,0 +1,48 @@ +class Retdec < Formula + desc "Retargetable machine-code decompiler based on LLVM" + homepage "https://github.com/avast/retdec" + url "https://github.com/avast/retdec.git", + tag: "v5.0", + revision: "53e55b4b26e9b843787f0e06d867441e32b1604e" + license all_of: ["MIT", "Zlib"] + revision 1 + head "https://github.com/avast/retdec.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "abd1c53dcf15cfa96c614e40e46e5287d9c2c4d8e225de4c171eb2bd91d9c7fd" + sha256 cellar: :any, arm64_sequoia: "216414b394e83210cce369da37d371ac44b4e3b6f6008fa16191efacc4ea9eaa" + sha256 cellar: :any, arm64_sonoma: "8b9441e8c153d05e91cbeef5688f58584b709eec12b38a9c5f0fcf7dd80b258f" + sha256 cellar: :any, arm64_ventura: "666d104c2c81ebf92f83b239aa716bf7e798362558b3855f83de08df4120b260" + sha256 cellar: :any, sonoma: "12f78f71818e8477a1966f273a737e879246f72856e6a3d5cb3ddf134bbfe0fe" + sha256 cellar: :any, ventura: "a6b2b8f1befd6b68df9dd0dc1786ac4204c4106c9fe2d8d2d2bf2973ed6bb6e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d18898575fd9cfdcdbef7fae747b2dccd25ef42383c30a52f7616e95552d282" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e46385c01a262b114048e4af0eea56b6ea7cffab2a39569faa28fd6e76f4fe4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "python@3.13" + + uses_from_macos "zlib" + + def install + # Workaround for CMake 4 compatibility with multiple vendored deps + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "Running phase: cleanup", + shell_output("#{bin}/retdec-decompiler -o #{testpath}/a.c #{test_fixtures("mach/a.out")} 2>/dev/null") + end +end diff --git a/Formula/r/rethinkdb.rb b/Formula/r/rethinkdb.rb new file mode 100644 index 0000000000000..f9c57d275e047 --- /dev/null +++ b/Formula/r/rethinkdb.rb @@ -0,0 +1,77 @@ +class Rethinkdb < Formula + desc "Open-source database for the realtime web" + homepage "https://rethinkdb.com/" + # TODO: Check if we can use unversioned `protobuf` at version bump + # upstream issue report, https://github.com/rethinkdb/rethinkdb/issues/7142 + url "https://download.rethinkdb.com/repository/raw/dist/rethinkdb-2.4.4.tgz" + sha256 "5091237602b62830db2cb3daaca6ab34632323741e6710c2f0de4d84f442711f" + license "Apache-2.0" + head "https://github.com/rethinkdb/rethinkdb.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f4ea31512e65f35f70f6a33c617507bd806de6bd446c20bf7a32d5b69eff2aa0" + sha256 cellar: :any, arm64_sequoia: "08cd5f3a221e9ade6d2e9ccad0cb73f10094855e2f362dbebb274c7dba1fbc3c" + sha256 cellar: :any, arm64_sonoma: "12c05ba1583bb06660d8630fab1a5d3335bc43fddd5827c2b34ff01660dfbbd2" + sha256 cellar: :any, arm64_ventura: "799cd7b1efe7da9dd0933b42e5bebd71dbd354be745ae898cdb1f3f5504885e8" + sha256 cellar: :any, arm64_monterey: "a59635dab2420df9cbd170c6e6d09f2a3f7b3de354546aa474cd43362ea037c8" + sha256 cellar: :any, sonoma: "6762f17cd6a78747bf7c944fe6ccd37957c34f783ac1dae8ce7b1381776de3b9" + sha256 cellar: :any, ventura: "4eb3cb16e0f103c3aaf761c948d7743ad142c6f08071b3663c7bb6336cd41708" + sha256 cellar: :any, monterey: "931ed3a24d911f5548561327055106ef6a65434632d7b0c57bbb6a25c27ef975" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6ec7609f0a0332ddde0b3242f116f60e76358fcd5eb80925a24da187be71766" + sha256 cellar: :any_skip_relocation, x86_64_linux: "728c63d067ecd2ef2f0df719c1334e74a5f97486526af5ad947ea552b0e9492a" + end + + # There has been no response to Protobuf 25+ issue[^1] opened on 2023-12-13. + # Upstream appears to be in low maintenance state after parent company shut down[^2]. + # Recently seeing download server issues[^3][^4] which makes source tarball unstable. + # + # [^1]: https://github.com/rethinkdb/rethinkdb/issues/7142 + # [^2]: https://github.com/rethinkdb/rethinkdb/issues/6981 + # [^3]: https://github.com/rethinkdb/rethinkdb/issues/7155 + # [^4]: https://github.com/rethinkdb/rethinkdb/issues/7157 + deprecate! date: "2024-11-12", because: "uses unmaintained `protobuf@21`" + + depends_on "boost" => :build + depends_on "openssl@3" + depends_on "protobuf@21" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + ENV.cxx11 + ENV["PYTHON"] = which("python3") + + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --localstatedir=#{var} + ] + args << "--allow-fetch" if build.head? + + system "./configure", *args + system "make" + system "make", "install-binaries" + + (var/"log/rethinkdb").mkpath + + inreplace "packaging/assets/config/default.conf.sample", + /^# directory=.*/, "directory=#{var}/rethinkdb" + etc.install "packaging/assets/config/default.conf.sample" => "rethinkdb.conf" + end + + service do + run [opt_bin/"rethinkdb", "--config-file", etc/"rethinkdb.conf"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/rethinkdb/rethinkdb.log" + error_log_path var/"log/rethinkdb/rethinkdb.log" + end + + test do + shell_output("#{bin}/rethinkdb create -d test") + assert File.read("test/metadata").start_with?("RethinkDB") + end +end diff --git a/Formula/r/retire.rb b/Formula/r/retire.rb new file mode 100644 index 0000000000000..ef724e2721b85 --- /dev/null +++ b/Formula/r/retire.rb @@ -0,0 +1,26 @@ +class Retire < Formula + desc "Scanner detecting the use of JavaScript libraries with known vulnerabilities" + homepage "https://retirejs.github.io/retire.js/" + url "https://registry.npmjs.org/retire/-/retire-5.3.0.tgz" + sha256 "e7b322111bec8b80b45b94d3276f4fe2e5ec986b835ee9c46d05d2a2de06a9b3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6f06986094a2890fe3bfa46cef5c6692a6a26c212106f3383522d5ed502ae3a8" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/retire --version") + + system "git", "clone", "https://github.com/appsecco/dvna.git" + output = shell_output("#{bin}/retire --path dvna 2>&1", 13) + assert_match(/jquery (\d+(?:\.\d+)+) has known vulnerabilities/, output) + end +end diff --git a/Formula/r/retry.rb b/Formula/r/retry.rb new file mode 100644 index 0000000000000..8d4931cbd0cc2 --- /dev/null +++ b/Formula/r/retry.rb @@ -0,0 +1,41 @@ +class Retry < Formula + desc "Repeat a command until the command succeeds" + homepage "https://github.com/minfrin/retry" + url "https://github.com/minfrin/retry/releases/download/retry-1.0.6/retry-1.0.6.tar.bz2" + sha256 "b5bbdaee16436fabae608fbc58f47df9726b87b945c9eca1524648500b9afdf3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "77c76b42cc0cf87c1df0336f794ed29b0daf828d3c43dc2465df8936260f2040" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b67d9e7e3b419a6369f651a9eea7c56342004e9aecfea372c8551fd024a45b97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91d9191c2224348d123ab4b8e5763ec2337c4846f3d8d391aba99bbe3a6c9898" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e7ef82f7765062f44a5ff5b4ba8bee756c3e55d380bc0b0b99622f78b7740ce3" + sha256 cellar: :any_skip_relocation, sonoma: "3c3f927459a0efd10619ecf2b412a1380c148dcc796e9f9e7e174eb0499fdc12" + sha256 cellar: :any_skip_relocation, ventura: "7f24158fe4cccb03dca7bc286df3744f4fbabf78cf2af266d3269a31e06466a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e11ae4779ffb1e810dea7f628d0820ed8ee798b268441bdcc3f12baee7deec1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "259bb647677bf0520f8341216056f6e6f1be2cddacc822b729932f38f9449d74" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + require "socket" + port = free_port + args = %W[--delay 1 --until 0,28 -- curl --max-time 1 telnet://localhost:#{port}] + Open3.popen2e(bin/"retry", *args) do |_, stdout_and_stderr| + sleep 3 + assert_match "curl returned 7", stdout_and_stderr.read_nonblock(1024) + + TCPServer.open(port) do |server| + session = server.accept + session.puts "Hello world!" + session.close + end + + assert_match "Hello world!", stdout_and_stderr.read + end + end +end diff --git a/Formula/r/reuse.rb b/Formula/r/reuse.rb new file mode 100644 index 0000000000000..c8b3ff66b1d18 --- /dev/null +++ b/Formula/r/reuse.rb @@ -0,0 +1,104 @@ +class Reuse < Formula + include Language::Python::Virtualenv + + desc "Tool for copyright and license recommendations" + homepage "https://reuse.software" + url "https://files.pythonhosted.org/packages/05/35/298d9410b3635107ce586725cdfbca4c219c08d77a3511551f5e479a78db/reuse-6.2.0.tar.gz" + sha256 "4feae057a2334c9a513e6933cdb9be819d8b822f3b5b435a36138bd218897d23" + license all_of: [ + "GPL-3.0-or-later", + "CC-BY-SA-4.0", + "CC0-1.0", + "Apache-2.0", + ] + head "https://github.com/fsfe/reuse-tool.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b0c54095d67e082855143d97b642e9912f59182e89d082f6a69cd649afca0d82" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9648e3d0ae7497eb247f4a461602f1f7f6a876bc18f724eea8d314cc0fc75e1b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "327e52d1a950d585a5cd0a3def3ddc7f8f5ef87857bc681ac9777dddcc8c260e" + sha256 cellar: :any_skip_relocation, tahoe: "38fdf43c2bb803c2a4ebadada4e3af205d2119f3e17e0c68ff0fbd998586ddc4" + sha256 cellar: :any_skip_relocation, sequoia: "27707a68325827425ec1cdd5f1d48bec63f7a84d2d5f66252b962b72c87b1824" + sha256 cellar: :any_skip_relocation, sonoma: "389a80a6fbc3cfc0c2b610a125af1752cf3e9daf6b4a398c6f46a57b5d03c95c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1eb816b024f2264daffcf5e2cd000c5087ebc15254fa4016538d7a563c9d8d94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e41b6ec378751332431d99ae9947c34451c4b82768d7105710f0acce38c0602" + end + + depends_on "python@3.14" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "python-debian" do + url "https://files.pythonhosted.org/packages/bf/4b/3c4cf635311b6203f17c2d693dc15e898969983dd3f729bee3c428aa60d4/python-debian-1.0.1.tar.gz" + sha256 "3ada9b83a3d671b58081782c0969cffa0102f6ce433fbbc7cf21275b8b5cc771" + end + + resource "python-magic" do + url "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz" + sha256 "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"reuse", shell_parameter_format: :click) + end + + test do + (testpath/"testfile.rb").write "" + system bin/"reuse", "annotate", "--copyright=Homebrew Maintainers", + "--exclude-year", + "--license=BSD-2-Clause", + testpath/"testfile.rb" + header = <<~RUBY + # SPDX-FileCopyrightText: Homebrew Maintainers + # + # SPDX-License-Identifier: BSD-2-Clause + RUBY + assert_equal header, (testpath/"testfile.rb").read + system bin/"reuse", "download", "BSD-2-Clause" + assert_path_exists testpath/"LICENSES/BSD-2-Clause.txt" + end +end diff --git a/Formula/r/reveal-md.rb b/Formula/r/reveal-md.rb new file mode 100644 index 0000000000000..2cac35f58ed19 --- /dev/null +++ b/Formula/r/reveal-md.rb @@ -0,0 +1,47 @@ +class RevealMd < Formula + desc "Get beautiful reveal.js presentations from your Markdown files" + homepage "https://github.com/webpro/reveal-md" + url "https://registry.npmjs.org/reveal-md/-/reveal-md-6.1.4.tgz" + sha256 "699d44c19f8437f294464ca457d35ad779e6f605299a38ea293b7aa75363d6f9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "dc9effab791d9a047feab7dd5dbb0a788b4353f649863623e550f12778af400e" + sha256 cellar: :any, arm64_sequoia: "e45cc89fa82e2c457d6882e2a8c960c23733207a6af5cf19cd5dd9adb22f3f70" + sha256 cellar: :any, arm64_sonoma: "e45cc89fa82e2c457d6882e2a8c960c23733207a6af5cf19cd5dd9adb22f3f70" + sha256 cellar: :any, arm64_ventura: "e45cc89fa82e2c457d6882e2a8c960c23733207a6af5cf19cd5dd9adb22f3f70" + sha256 cellar: :any, sonoma: "f986662f9ae9064474e4725339175621ec6cee8b57a45d65e1c05c75cfdd1dae" + sha256 cellar: :any, ventura: "f986662f9ae9064474e4725339175621ec6cee8b57a45d65e1c05c75cfdd1dae" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd807b2193a54a49e0a09ef3dcb2edbe68734bd2aaa9f4e9bcbc22f7daded733" + sha256 cellar: :any_skip_relocation, x86_64_linux: "615e2c3e56083005d3c26f52b444f663a75e9222f92c59df41266506b0d65d2d" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built `bare-fs`/`bare-os`/`bare-url` binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/reveal-md/node_modules" + node_modules.glob("{bare-fs,bare-os,bare-url}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + (testpath/"test.md").write("# Hello, Reveal-md!") + + output_log = testpath/"output.log" + pid = spawn bin/"reveal-md", testpath/"test.md", [:out, :err] => output_log.to_s + sleep 8 + sleep 8 if OS.mac? && Hardware::CPU.intel? + assert_match "Serving reveal.js", output_log.read + + assert_match version.to_s, shell_output("#{bin}/reveal-md --version") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/r/revive.rb b/Formula/r/revive.rb new file mode 100644 index 0000000000000..b1d305037498c --- /dev/null +++ b/Formula/r/revive.rb @@ -0,0 +1,53 @@ +class Revive < Formula + desc "Fast, configurable, extensible, flexible, and beautiful linter for Go" + homepage "https://revive.run" + url "https://github.com/mgechev/revive.git", + tag: "v1.12.0", + revision: "e1d05f7a0e941fe7377279012e22b631e6e3df26" + license "MIT" + head "https://github.com/mgechev/revive.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "685691a300458c59b449d1ff6340bebea67bb54c0f099ac82de939b1d216896e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd3bb4a10d8dcb63213bd79d4a320a8e57cfe4ef45281ea533a7b25b7f98d88f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd3bb4a10d8dcb63213bd79d4a320a8e57cfe4ef45281ea533a7b25b7f98d88f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd3bb4a10d8dcb63213bd79d4a320a8e57cfe4ef45281ea533a7b25b7f98d88f" + sha256 cellar: :any_skip_relocation, sonoma: "d8931abba6f356b772bfbc2901b6fb4a2798170e9d09c3fe457dcfa3062b0b70" + sha256 cellar: :any_skip_relocation, ventura: "d8931abba6f356b772bfbc2901b6fb4a2798170e9d09c3fe457dcfa3062b0b70" + sha256 cellar: :any_skip_relocation, arm64_linux: "5792ba3c8f17970c9b59b0131776557f35e2685ed36f07b27111da91b636ac19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7385ad9d8ca802d6ccafb1563132461295a9aaa0c2d0f6f5661bba419045b08" + end + + depends_on "go" => [:build, :test] + + def install + ldflags = %W[ + -s -w + -X github.com/mgechev/revive/cli.commit=#{Utils.git_head} + -X github.com/mgechev/revive/cli.date=#{time.iso8601} + -X github.com/mgechev/revive/cli.builtBy=#{tap.user} + ] + ldflags << "-X github.com/mgechev/revive/cli.version=#{version}" if build.stable? + + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/revive -version") + + (testpath/"main.go").write <<~GO + package main + + import "fmt" + + func main() { + my_string := "Hello from Homebrew" + fmt.Println(my_string) + } + GO + + system "go", "mod", "init", "brewtest" + output = shell_output("#{bin}/revive main.go") + assert_match "don't use underscores in Go names", output + end +end diff --git a/Formula/r/rex.rb b/Formula/r/rex.rb new file mode 100644 index 0000000000000..347342a1d253d --- /dev/null +++ b/Formula/r/rex.rb @@ -0,0 +1,290 @@ +class Rex < Formula + desc "Command-line tool which executes commands on remote servers" + homepage "https://www.rexify.org" + url "https://cpan.metacpan.org/authors/id/F/FE/FERKI/Rex-1.16.1.tar.gz" + sha256 "b66ff756db8c8479ab99d2c9ec9827bf624b8bca2e96ef9ccf2395e279731662" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f0c9642847deaa4d8bf040a6d54def45ce7aa3f658109a7eabc731fb073901cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0c9642847deaa4d8bf040a6d54def45ce7aa3f658109a7eabc731fb073901cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0c9642847deaa4d8bf040a6d54def45ce7aa3f658109a7eabc731fb073901cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "903b511e474d98b27fd8324272b7925ee37afc311c1a18ebef0eb3abcd196029" + sha256 cellar: :any_skip_relocation, sonoma: "3088c8f5ad9aed2584b405494fdbb10928c7c833ce9da45444e2b1e105d4fde7" + sha256 cellar: :any_skip_relocation, ventura: "ded62b5eeb9a01e7a2ea466a8e162d0c102bc5c1f13ef306694fe563f4d515ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb6348230177ed3b004e9f8ef6bd3cb79a208ae983ed1ba6efa79b9617f73329" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f05c3c843367e1ee2ea8d40c6797dc332b3a1ea5f739381a330a83c279e3eca" + end + + uses_from_macos "expat" + uses_from_macos "perl" + + on_system :linux, macos: :catalina_or_older do + resource "Module::Build" do + # AWS::Signature4 requires Module::Build v0.4205 and above, while standard + # MacOS Perl installation has 0.4003 + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + end + + resource "Clone" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Clone-0.47.tar.gz" + sha256 "4c2c0cb9a483efbf970cb1a75b2ca75b0e18cb84bcb5c09624f86e26b09c211d" + end + + resource "Clone::Choose" do + url "https://cpan.metacpan.org/authors/id/H/HE/HERMES/Clone-Choose-0.010.tar.gz" + sha256 "5623481f58cee8edb96cd202aad0df5622d427e5f748b253851dfd62e5123632" + end + + resource "Exporter::Tiny" do + url "https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-1.006002.tar.gz" + sha256 "6f295e2cbffb1dbc15bdb9dadc341671c1e0cd2bdf2d312b17526273c322638d" + end + + resource "JSON::MaybeXS" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/JSON-MaybeXS-1.004008.tar.gz" + sha256 "cd3937afa78831f80a2ad5abab6c51b9e82fca4c31e5856ea208d598db5dc867" + end + + resource "Scalar::Util" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.69.tar.gz" + sha256 "49108037dc31ba4953aa8be57c1c72f3e922dde1fa328f1eb39a329f1e6314fc" + end + + resource "YAML" do + url "https://cpan.metacpan.org/authors/id/I/IN/INGY/YAML-1.31.tar.gz" + sha256 "a0ce30381657dce8e694df9a09e95d818d13beb03698fd2cf79d0c8d564a9b8e" + end + + resource "File::ShareDir::Install" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-0.14.tar.gz" + sha256 "8f9533b198f2d4a9a5288cbc7d224f7679ad05a7a8573745599789428bc5aea0" + end + + resource "Devel::Caller" do + url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Devel-Caller-2.07.tar.gz" + sha256 "b679a2b18034b0b720de82c3708724c364b10a6ca164cbc67cdc3af283f3503f" + end + + resource "Digest::HMAC" do + url "https://cpan.metacpan.org/authors/id/A/AR/ARODLAND/Digest-HMAC-1.05.tar.gz" + sha256 "215cb59cba610745cfb2d4b3f8ef756d590e57e3ad7986a992e87c4969fcdc7a" + end + + resource "Encode::Locale" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz" + sha256 "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1" + end + + resource "File::Listing" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.16.tar.gz" + sha256 "189b3a13fc0a1ba412b9d9ec5901e9e5e444cc746b9f0156d4399370d33655c6" + end + + resource "File::ShareDir" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-1.118.tar.gz" + sha256 "3bb2a20ba35df958dc0a4f2306fc05d903d8b8c4de3c8beefce17739d281c958" + end + + resource "HTML::Parser" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.83.tar.gz" + sha256 "7278ce9791256132b26a71a5719451844704bb9674b58302c3486df43584f8c0" + end + + resource "HTML::Tagset" do + url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz" + sha256 "eb89e145a608ed1f8f141a57472ee5f69e67592a432dcd2e8b1dbb445f2b230b" + end + + resource "HTTP::Cookies" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz" + sha256 "8c9a541a4a39f6c0c7e3d0b700b05dfdb830bd490a1b1942a7dedd1b50d9a8c8" + end + + resource "ExtUtils::Config" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.010.tar.gz" + sha256 "82e7e4e90cbe380e152f5de6e3e403746982d502dd30197a123652e46610c66d" + end + + resource "ExtUtils::Helpers" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.028.tar.gz" + sha256 "c8574875cce073e7dc5345a7b06d502e52044d68894f9160203fcaab379514fe" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.014.tar.gz" + sha256 "ae65d20cc3c7e14b3cd790915c84510f82dfb37a4c9b88aa74b2e843af417d01" + end + + resource "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.052.tar.gz" + sha256 "bd10452c9f24d4b4fe594126e3ad231bab6cebf16acda40a4e8dc784907eb87f" + end + + resource "HTTP::Daemon" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-6.16.tar.gz" + sha256 "b38d092725e6fa4e0c4dc2a47e157070491bafa0dbe16c78a358e806aa7e173d" + end + + resource "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.06.tar.gz" + sha256 "7b685191c6acc3e773d1fc02c95ee1f9fae94f77783175f5e78c181cc92d2b52" + end + + resource "HTTP::Message" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-7.00.tar.gz" + sha256 "5afa95eb6ed1c632e81656201a2738e2c1bc6cbfae2f6d82728e2bb0b519c1dc" + end + + resource "HTTP::Negotiate" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz" + sha256 "1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016" + end + + resource "IO::HTML" do + url "https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-1.004.tar.gz" + sha256 "c87b2df59463bbf2c39596773dfb5c03bde0f7e1051af339f963f58c1cbd8bf5" + end + + resource "IO::String" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/IO-String-1.08.tar.gz" + sha256 "2a3f4ad8442d9070780e58ef43722d19d1ee21a803bf7c8206877a10482de5a0" + end + + resource "LWP::UserAgent" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.79.tar.gz" + sha256 "f2526e9a33ac96715cc47fbf5b4bec1a8c51720330b24e3974c2c5ae07a9c5e7" + end + + resource "LWP::MediaTypes" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz" + sha256 "8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9" + end + + resource "Net::HTTP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.23.tar.gz" + sha256 "0d65c09dd6c8589b2ae1118174d3c1a61703b6ecfc14a3442a8c74af65e0c94e" + end + + resource "NetAddr::IP" do + url "https://cpan.metacpan.org/authors/id/M/MI/MIKER/NetAddr-IP-4.079.tar.gz" + sha256 "ec5a82dfb7028bcd28bb3d569f95d87dd4166cc19867f2184ed3a59f6d6ca0e7" + end + + resource "PadWalker" do + url "https://cpan.metacpan.org/authors/id/R/RO/ROBIN/PadWalker-2.5.tar.gz" + sha256 "07b26abb841146af32072a8d68cb90176ffb176fd9268e6f2f7d106f817a0cd0" + end + + resource "Term::ReadKey" do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" + sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" + end + + resource "Text::Glob" do + url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Text-Glob-0.11.tar.gz" + sha256 "069ccd49d3f0a2dedb115f4bdc9fbac07a83592840953d1fcdfc39eb9d305287" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.32.tar.gz" + sha256 "ef2d6cab0bad18e3ab1c4e6125cc5f695c7e459899f512451c8fa3ef83fa7fc0" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.32.tar.gz" + sha256 "9632067d34e14e0dae2da94631c4f25a387fcc48d06fa29330e8b3c04c4e913d" + end + + resource "WWW::RobotRules" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz" + sha256 "46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e" + end + + resource "XML::NamespaceSupport" do + url "https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.12.tar.gz" + sha256 "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef" + end + + resource "XML::Parser" do + url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz" + sha256 "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8" + end + + resource "XML::Simple" do + url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-Simple-2.25.tar.gz" + sha256 "531fddaebea2416743eb5c4fdfab028f502123d9a220405a4100e68fc480dbf8" + end + end + + resource "AWS::Signature4" do + url "https://cpan.metacpan.org/authors/id/L/LD/LDS/AWS-Signature4-1.02.tar.gz" + sha256 "20bbc16cb3454fe5e8cf34fe61f1a91fe26c3f17e449ff665fcbbb92ab443ebd" + end + + resource "Data::Validate::IP" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Data-Validate-IP-0.31.tar.gz" + sha256 "734aff86b6f9cad40e1c4da81f28faf18e0802c76a566d95e5613d4318182fc1" + end + + resource "Hash::Merge" do + url "https://cpan.metacpan.org/authors/id/H/HE/HERMES/Hash-Merge-0.302.tar.gz" + sha256 "ae0522f76539608b61dde14670e79677e0f391036832f70a21f31adde2538644" + end + + resource "Net::OpenSSH" do + url "https://cpan.metacpan.org/authors/id/S/SA/SALVA/Net-OpenSSH-0.84.tar.gz" + sha256 "8780e62f01b1cf0db43c9cb705c94ff4949b032233be4be91fc91abc791539f8" + end + + resource "Sort::Naturally" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Sort-Naturally-1.03.tar.gz" + sha256 "eaab1c5c87575a7826089304ab1f8ffa7f18e6cd8b3937623e998e865ec1e746" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + ENV["PERL_MM_USE_DEFAULT"] = "1" + + resources.each do |res| + res.stage do + perl_build + end + end + + perl_build + (libexec/"lib").install "blib/lib/Rex", "blib/lib/Rex.pm" + + %w[rex rexify].each do |cmd| + libexec.install "bin/#{cmd}" + chmod 0755, libexec/cmd + (bin/cmd).write_env_script(libexec/cmd, PERL5LIB: ENV["PERL5LIB"]) + man1.install "blib/man1/#{cmd}.1" + end + end + + test do + assert_match "(R)?ex #{version}", shell_output("#{bin}/rex -v"), "rex -v is expected to print out Rex version" + system bin/"rexify", "brewtest" + assert_path_exists testpath/"brewtest/Rexfile", +"rexify is expected to create a new Rex project and pre-populate its Rexfile" + end + + private + + def perl_build + if File.exist? "Build.PL" + system "perl", "Build.PL", "--install_base", libexec + system "./Build", "PERL5LIB=#{ENV["PERL5LIB"]}" + system "./Build", "install" + elsif File.exist? "Makefile.PL" + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}" + system "make", "install" + else + raise "Unknown build system for #{res.name}" + end + end +end diff --git a/Formula/r/rfcstrip.rb b/Formula/r/rfcstrip.rb new file mode 100644 index 0000000000000..01983700e0886 --- /dev/null +++ b/Formula/r/rfcstrip.rb @@ -0,0 +1,31 @@ +class Rfcstrip < Formula + desc "Strips headers and footers from RFCs and Internet-Drafts" + homepage "https://github.com/mbj4668/rfcstrip" + url "https://github.com/mbj4668/rfcstrip/archive/refs/tags/1.3.tar.gz" + sha256 "bba42a64535f55bfd1eae0cf0b85f781dacf5f3ce323b16515f32cefff920c6b" + # License is similar to TCL license but omits the government use clause + license :cannot_represent + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "19d81dc32428b71ea0c78047c6036eba4381ab7e6305051f3790d2dfc34ce2be" + end + + resource "rfc1149" do + url "https://www.ietf.org/rfc/rfc1149.txt" + sha256 "a8660fa4f47bd5e3db1cd5d5baad983d8b6f3f1e8a1a04b8552f3c2ce8f33c18" + end + + def install + bin.install "rfcstrip" + end + + test do + resource("rfc1149").stage testpath + stripped = shell_output("#{bin}/rfcstrip rfc1149.txt") + refute_match(/\[Page \d+\]/, stripped) # RFC page numbering + refute_match "\f", stripped # form feed a.k.a. Control-L + end +end diff --git a/Formula/r/rgbds.rb b/Formula/r/rgbds.rb new file mode 100644 index 0000000000000..a9aeb6c7b19ab --- /dev/null +++ b/Formula/r/rgbds.rb @@ -0,0 +1,59 @@ +class Rgbds < Formula + desc "Rednex GameBoy Development System" + homepage "https://rgbds.gbdev.io" + url "https://github.com/gbdev/rgbds/archive/refs/tags/v1.0.0.tar.gz" + sha256 "e2cc698faab1526770e4080763efd95713f20a8459977ba0bc402d2c2f986c5e" + license "MIT" + head "https://github.com/gbdev/rgbds.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "932807ce8cafe868439e1e0191dd3f578f637a404a772046c888f14a778d389f" + sha256 cellar: :any, arm64_sequoia: "0d294dca021c83b86a8d64ba863b2dff314b584a2b3175afe1d055e560c9d49b" + sha256 cellar: :any, arm64_sonoma: "84b5bd7baf7c9e1366468a2d072f67e00718d7fc5b8c3ae7cdeb3691535dd81f" + sha256 cellar: :any, sonoma: "50976526eb7e75a1365b2218eb7262b4280c056b2c6b4cc4bb9c257ee861910f" + sha256 cellar: :any_skip_relocation, arm64_linux: "a80312f79d9c3020079d1f1cadd81be1c1f2e67a4c368a7e6832f94cf7ca1498" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d176a4f6cb13352755f441453c19c3fae5ab1b46b46090d12b9be9a907871a0f" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libpng" + + resource "rgbobj" do + url "https://github.com/gbdev/rgbobj/archive/refs/tags/v1.0.0.tar.gz" + sha256 "9078bfff174b112efa55fa628cbbddaa2aea740f6b2f75a1debe2f35534f424e" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + resource("rgbobj").stage do + system "cargo", "install", *std_cargo_args + man1.install "rgbobj.1" + end + zsh_completion.install Dir["contrib/zsh_compl/_*"] + bash_completion.install Dir["contrib/bash_compl/_*"] + end + + test do + # Based on https://github.com/gbdev/rgbds/blob/HEAD/test/asm/assert-const.asm + (testpath/"source.asm").write <<~ASM + SECTION "rgbasm passing asserts", ROM0[0] + Label: + db 0 + assert @ + ASM + system bin/"rgbasm", "-o", "output.o", "source.asm" + system bin/"rgbobj", "-A", "-s", "data", "-p", "data", "output.o" + system bin/"rgbgfx", test_fixtures("test.png"), "-o", testpath/"test.2bpp" + assert_path_exists testpath/"test.2bpp" + end +end diff --git a/Formula/r/rgf.rb b/Formula/r/rgf.rb new file mode 100644 index 0000000000000..3b1bf2f5e59ec --- /dev/null +++ b/Formula/r/rgf.rb @@ -0,0 +1,57 @@ +class Rgf < Formula + desc "Regularized Greedy Forest library" + homepage "https://github.com/RGF-team/rgf" + url "https://github.com/RGF-team/rgf/archive/refs/tags/3.12.0.tar.gz" + sha256 "c197977b8709c41aa61d342a01497d26f1ad704191a2a6b699074fe7ee57dc86" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3cd71826a688d71fb47d733cc05bd43da4f3febe58031901476a7053a5e9e2fd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b562241e4a197e502fe1483c9a613bb9c32c272a94583a6f8ef26a1844ed644e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a6b81f03b0a52638c91d73ed4681476019f1d1ca9be5f61a2e044e48af2b6fe7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4c1f942c801c42fb03224c8b844b9a93c2c4b10c03f2473b0b8023336bcabdd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b0af19017e4f72fab3f3d8d0d76b8b3071bc2b2788c4db4dea67d2e8f5b1abe1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1cf3bea65341e90b931287b0171dcb3cf56368ee38d290fc8e42c58527bea22a" + sha256 cellar: :any_skip_relocation, sonoma: "9a9d0ca96ef4ad9c7acc3099ed638d6a88839a8fdc67751adfd38486f4eaafaf" + sha256 cellar: :any_skip_relocation, ventura: "3bdd9e308cab9ee5cf6f32082cad81c72de1dbdbca272650e9792b04996fb832" + sha256 cellar: :any_skip_relocation, monterey: "38590bb69ccb839d3e426f41c8ab17027f22e6de79fcee7eab17836f94c73728" + sha256 cellar: :any_skip_relocation, big_sur: "e487b14cb36a718bdf90e2b5d8fecc8850664045bdd0a54437704f98a3abcc12" + sha256 cellar: :any_skip_relocation, catalina: "e7865fed340b07b2bdf21c3e70fe2ec82019a58e5758e66314d0a48ba7982d4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f11ae925171c29d72b392dde35ae3b131801a15c744d29c0abb82026b5cb2f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4cd5ac79b7dd6fb913e3ca16bdb1ca96e596f3aecd293a6059d70b1ea7d5abdd" + end + + depends_on "cmake" => :build + + def install + cd "RGF" do + mkdir "build" do + system "cmake", *std_cmake_args, ".." + system "cmake", "--build", "." + end + bin.install "bin/rgf" + pkgshare.install "examples" + end + end + + test do + cp_r (pkgshare/"examples/sample/."), testpath + parameters = %w[ + algorithm=RGF + train_x_fn=train.data.x + train_y_fn=train.data.y + test_x_fn=test.data.x + reg_L2=1 + model_fn_prefix=rgf.model + ] + output = shell_output("#{bin}/rgf train_predict #{parameters.join(",")}") + assert_match "Generated 20 model file(s)", output + end +end diff --git a/Formula/r/rggen.rb b/Formula/r/rggen.rb new file mode 100644 index 0000000000000..bd1f6027254b4 --- /dev/null +++ b/Formula/r/rggen.rb @@ -0,0 +1,104 @@ +class Rggen < Formula + desc "Code generation tool for control and status registers" + homepage "https://github.com/rggen/rggen" + license "MIT" + + stable do + url "https://github.com/rggen/rggen.git", + tag: "v0.35.2", + revision: "7c90c80913e39efa838ecdf05d95214dbb1f2d94" + + resource "rggen-verilog" do + url "https://github.com/rggen/rggen-verilog.git", + tag: "v0.13.2", + revision: "07128f7c93bf0ac273b6e5eaa516544fd95ab87a" + end + + resource "rggen-veryl" do + url "https://github.com/rggen/rggen-veryl.git", + tag: "v0.5.2", + revision: "766447aa7d23211644c15064329f0f8f60d210f4" + end + + resource "rggen-vhdl" do + url "https://github.com/rggen/rggen-vhdl.git", + tag: "v0.12.2", + revision: "b65b5cd6db9926b6d2e589bcdd208b0ad5fce9e2" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1832dc7d93150b2370c91bff81402c5e0381fe46e7a2330c6723c7005c0157b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88986dd86533e818c10e69f7b2d8122bedc26ec4d6b7ee8a960138d814f62e78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "88986dd86533e818c10e69f7b2d8122bedc26ec4d6b7ee8a960138d814f62e78" + sha256 cellar: :any_skip_relocation, arm64_ventura: "88986dd86533e818c10e69f7b2d8122bedc26ec4d6b7ee8a960138d814f62e78" + sha256 cellar: :any_skip_relocation, sonoma: "25af42103656b6b6282d64836fb625c7ceba42f947e5f63b1c5557ae1c879f79" + sha256 cellar: :any_skip_relocation, ventura: "25af42103656b6b6282d64836fb625c7ceba42f947e5f63b1c5557ae1c879f79" + sha256 cellar: :any_skip_relocation, arm64_linux: "20f55dc1c1b14357296de31c1da3f3e74427430afe0496e2b813c2ddaae7b0b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c91a2c2cf06d99dfe6684abe7d49179bd4ff30cc246d2151077e5a72db468601" + end + + head do + url "https://github.com/rggen/rggen.git", + branch: "master" + + resource "rggen-verilog" do + url "https://github.com/rggen/rggen-verilog.git", + branch: "master" + end + + resource "rggen-veryl" do + url "https://github.com/rggen/rggen-veryl.git", + branch: "master" + end + + resource "rggen-vhdl" do + url "https://github.com/rggen/rggen-vhdl.git", + branch: "master" + end + end + + # Requires Ruby >= 3.1 + depends_on "ruby" + + def install + ENV["GEM_HOME"] = libexec + + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + %w[rggen-verilog rggen-veryl rggen-vhdl].each do |plugin| + resource(plugin).stage do + system "gem", "build", "#{plugin}.gemspec" + system "gem", "install", "#{plugin}-#{resource(plugin).version}.gem" + end + end + + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + test_file = testpath/"test.toml" + test_file.write <<~EOF + [[register_blocks]] + name = 'test' + byte_size = 1 + bus_width = 8 + [[register_blocks.registers]] + name = 'test_register' + [[register_blocks.registers.bit_fields]] + name = 'test_rw_field' + bit_assignment = { width = 6 } + type = 'rw' + initial_value = 0 + [[register_blocks.registers.bit_fields]] + name = 'test_res_fieldres' + bit_assignment = { width = 2 } + type = 'reserved' + EOF + + command = "#{bin}/rggen --plugin rggen-vhdl --plugin rggen-verilog --plugin rggen-veryl --load-only #{test_file}" + assert_empty shell_output(command).strip + end +end diff --git a/Formula/r/rgxg.rb b/Formula/r/rgxg.rb new file mode 100644 index 0000000000000..4b0a3841e7b10 --- /dev/null +++ b/Formula/r/rgxg.rb @@ -0,0 +1,34 @@ +class Rgxg < Formula + desc "C library and command-line tool to generate (extended) regular expressions" + homepage "https://rgxg.github.io" + url "https://github.com/rgxg/rgxg/releases/download/v0.1.2/rgxg-0.1.2.tar.gz" + sha256 "554741f95dcc320459875c248e2cc347b99f809d9555c957d763d3d844e917c6" + license "Zlib" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f0cc6fe2faf8619f981684d24e751f270a9bd1b5d04282165135296e73dbe8d0" + sha256 cellar: :any, arm64_sequoia: "80c6d906b67ef65832f1724146eef85c50e01d73f3808c87c7b4dd1eadc39102" + sha256 cellar: :any, arm64_sonoma: "6b1d2f700c3ca6fc03930409bb4ec68cbdbcbb2931facef03d2422369c29f81a" + sha256 cellar: :any, arm64_ventura: "56fc8fea2ebbbe0a03cddb55f18d6a744b7ab028980276b8e17a2fdada7f6cce" + sha256 cellar: :any, arm64_monterey: "7c78f7917c24d61418d48dbdb2b61eea9f098cfdc999532542044372fbea04af" + sha256 cellar: :any, arm64_big_sur: "42b3f11c2a0fe78d84df3ae4ef3bcf9d3dd4cb04a5f8ac9a2c2196c7ef7b904b" + sha256 cellar: :any, sonoma: "4d80dd551bd529ec03c15e5be306ce958def4720a51598e335d5ed5e5a2da8db" + sha256 cellar: :any, ventura: "ed2bfec2c314aad06476ce78a33f9c6cc4d1c1f18e254dba53f71bfcbcf66596" + sha256 cellar: :any, monterey: "5c575a40c8ac2b3b133bf004af5562380d452d279f0c7d1819a394c686503089" + sha256 cellar: :any, big_sur: "37ed8cafce126a6ab77b1e367dbe2a72a68c6556569694366e16844b18071dce" + sha256 cellar: :any, catalina: "4a07550d93bedfa3b2ac3cb77a8484951321697ca9384d2c2a0301ea261aa954" + sha256 cellar: :any_skip_relocation, arm64_linux: "28194f32ee9974ae3367a4cc1fe604bd91534171a52a7d7bd0401379591d078f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2295a106e3ff336aef5f2fccd382d123351ca6e29f863bbf62afaa90072bb16" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"rgxg", "range", "1", "10" + end +end diff --git a/Formula/r/rhai.rb b/Formula/r/rhai.rb new file mode 100644 index 0000000000000..93ff26f567ce9 --- /dev/null +++ b/Formula/r/rhai.rb @@ -0,0 +1,58 @@ +class Rhai < Formula + desc "Embedded scripting language for Rust" + homepage "https://rhai.rs/" + url "https://github.com/rhaiscript/rhai/archive/refs/tags/v1.23.0.tar.gz" + sha256 "11220505d2cd1882da22a40496f2d0f92d7a1842495b20e2750f2a4cfec1d9a5" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rhaiscript/rhai.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e96ea3c25d9d2c9c6e400c012645a5b06152d8656e0bd972dc0a2231908ca13d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a80852186b6b3fc7bb631db5b5fe814c3b1345a91e13020181e75daf53fc835b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d0906bc975a61a568067cb4b95a3a736752e5e8144ddb458cdcfd34d83ba491" + sha256 cellar: :any_skip_relocation, sonoma: "1fcd1a23c0a8af5c95092cb9b19e62a4758f6acdb580a4fbea860be2bc8800d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "33f7370d40895a83377bc3e4ad4bda93f8eb551f25f774ea24beb8abd294695a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adc9cc7a047b97ceea9558251fee84426ead680198600d6213ae07debd510e51" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"hello.rhai").write <<~RHAI + print("Hello world!"); + RHAI + + (testpath/"fib.rhai").write <<~RHAI + const TARGET = 28; + const REPEAT = 5; + const ANSWER = 317_811; + + fn fib(n) { + if n < 2 { + n + } else { + fib(n-1) + fib(n-2) + } + } + + let result; + + for n in 0..REPEAT { + result = fib(TARGET); + } + + print(`Fibonacci number #${TARGET} = ${result}`); + + if result != ANSWER { + print(`The answer is WRONG! Should be ${ANSWER}!`); + } + RHAI + + assert_match "Hello world!", shell_output("#{bin}/rhai-run hello.rhai").chomp + assert_match "Fibonacci number #28 = 317811", shell_output("#{bin}/rhai-run fib.rhai").chomp + end +end diff --git a/Formula/r/rhash.rb b/Formula/r/rhash.rb new file mode 100644 index 0000000000000..d3d92a5c69bbe --- /dev/null +++ b/Formula/r/rhash.rb @@ -0,0 +1,41 @@ +class Rhash < Formula + desc "Utility for computing and verifying hash sums of files" + homepage "https://sourceforge.net/projects/rhash/" + url "https://downloads.sourceforge.net/project/rhash/rhash/1.4.6/rhash-1.4.6-src.tar.gz" + sha256 "9f6019cfeeae8ace7067ad22da4e4f857bb2cfa6c2deaa2258f55b2227ec937a" + license "0BSD" + head "https://github.com/rhash/RHash.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "8381d2e7c93d8e50d3c1f6e70af34ee844a3bd07c6cf7a5882ed07cf073f5600" + sha256 arm64_sequoia: "7cfeaa013d6bc5fc89cad3d34349ebfbc38f65da844f6eda92e55f91d42144ec" + sha256 arm64_sonoma: "10388639684b13fe90f7ac889e1023a7823e01087d04d4725068aca25207387e" + sha256 arm64_ventura: "757848383261b7e991ba04ecd5a3310bc263c8d259ee6ee98a8c82822b1f8ae3" + sha256 sonoma: "d0ebe3819cd610352c788258e8b6e9d1e04941a598cc9e4e141b24e25caf6eab" + sha256 ventura: "39760c4816095b7abc836fb065c2e5d7ae0e540d6dff9720e675c476a212851e" + sha256 arm64_linux: "de58dca8a85542060574b3263b18556bc90adcacfb41710083ebd342a33ff5ba" + sha256 x86_64_linux: "924accaa51ffbf427905f37750a5aae05bb8fd7b22190653560b90d8e3388108" + end + + def install + # Exclude unrecognized options + args = std_configure_args.reject { |s| s["--disable-dependency-tracking"] } + %W[ + --disable-lib-static + --disable-gettext + --sysconfdir=#{etc} + ] + + system "./configure", *args + system "make" + # Avoid race during installation. + ENV.deparallelize { system "make", "install" } + system "make", "install-lib-headers", "install-pkg-config" + lib.install_symlink (lib/shared_library("librhash", version.major.to_s).to_s) => shared_library("librhash") + end + + test do + (testpath/"test").write("test") + (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test") + system bin/"rhash", "-c", "test.sha1" + end +end diff --git a/Formula/r/rhino.rb b/Formula/r/rhino.rb new file mode 100644 index 0000000000000..d09cef11da305 --- /dev/null +++ b/Formula/r/rhino.rb @@ -0,0 +1,29 @@ +class Rhino < Formula + desc "JavaScript engine" + homepage "https://mozilla.github.io/rhino/" + url "https://repo.maven.apache.org/maven2/org/mozilla/rhino-all/1.8.0/rhino-all-1.8.0.jar" + sha256 "a67bc8555c36236fc7eac7042f4083d7cb9eba239a2ed06f68d07af885ada33c" + license "MPL-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/mozilla/rhino/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "88bec579e89f74a217422bbaeffa61ad5e85125583cb9722f51e42509ccdad12" + end + + depends_on "openjdk@21" + + conflicts_with "nut", because: "both install `rhino` binaries" + + def install + libexec.install "rhino-all-#{version}.jar" => "rhino.jar" + bin.write_jar_script libexec/"rhino.jar", "rhino", java_version: "21" + end + + test do + assert_equal "42", shell_output("#{bin}/rhino -e \"print(6*7)\"").chomp + end +end diff --git a/Formula/r/rhit.rb b/Formula/r/rhit.rb new file mode 100644 index 0000000000000..fabe405e298a5 --- /dev/null +++ b/Formula/r/rhit.rb @@ -0,0 +1,64 @@ +class Rhit < Formula + desc "Nginx log explorer" + homepage "https://dystroy.org/rhit/" + url "https://github.com/Canop/rhit/archive/refs/tags/v2.0.3.tar.gz" + sha256 "a3f45fcc2c07c9a7251ee6e8dd631cf12d4b506e63cebe05b38cc549f58937d6" + license "MIT" + head "https://github.com/Canop/rhit.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0eefe72eba81f5df0c61a9bd1882dc2bff2af473a591bd8c35eab0ea00bff40d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d35ab9a4feb045988b0a4674d5eff78cb9391d6f13e401e3a572335d9ac8a2e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3ece0f944acf5198d2a8558a8eb2f4fb9808835e5d0db37e5c2532a168d0ddc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4764df4672c1d9f7f329beed7ab7891c150a8a93e003df43c2f3275ebcbc7d3" + sha256 cellar: :any_skip_relocation, sonoma: "7f1a862f4e55cff0d2b4ca8c77e53e0f064d2fcf78a9e1f07296a0cd3b1374ca" + sha256 cellar: :any_skip_relocation, ventura: "77022fe12a1bb7e2a6c035218f55d4bd6930871fb60e72d94d4f109d460643c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfd5b75ef16987d7ce67a99e59375b55024d739871ca5b4dd900fd0e966d1cf4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39a1dd27646aebe1267cee8eb08ff5fdae2038912685c0bf670005335a24b054" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/Canop/rhit/c78d63b/test-data/access.log" + sha256 "e9ec07d6c7267ec326aa3f28a02a8140215c2c769ac2fe51b6294152644165eb" + end + + require "pty" + require "io/console" + + resource("homebrew-testdata").stage do + output = "" + PTY.spawn("#{bin}/rhit --silent-load --length 0 --color no access.log") do |r, _w, _pid| + r.winsize = [80, 130] + begin + r.each_line { |line| output += line.gsub(/\r?\n/, "\n") } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + assert_match <<~EOS, output + 33,468 hits and 405M from 2021/01/22 to 2021/01/22 + ┌──────────┬──────┬─────┬────────────────────┐ + │ date │ hits │bytes│0 33K│ + ├──────────┼──────┼─────┼────────────────────┤ + │2021/01/22│33,468│ 405M│████████████████████│ + └──────────┴──────┴─────┴────────────────────┘ + EOS + assert_match <<~EOS, output + HTTP status codes: + ┌─────┬─────┬────┬────┐ + │ 2xx │ 3xx │4xx │5xx │ + ├─────┼─────┼────┼────┤ + │79.1%│14.9%│1.2%│4.8%│ + └─────┴─────┴────┴────┘ + EOS + end + end +end diff --git a/Formula/r/rich-cli.rb b/Formula/r/rich-cli.rb new file mode 100644 index 0000000000000..f5d0e1ecd2138 --- /dev/null +++ b/Formula/r/rich-cli.rb @@ -0,0 +1,89 @@ +class RichCli < Formula + include Language::Python::Virtualenv + + desc "Command-line toolbox for fancy output in the terminal" + homepage "https://github.com/textualize/rich-cli" + url "https://files.pythonhosted.org/packages/57/7b/70878722e04b8eb8dba4d00429bce31cd012a6a4caf09dbf012bbf007104/rich_cli-1.8.1.tar.gz" + sha256 "16992bcbd454974dc53671ba1a12e189148566164aaa7370bdf6648c8b1438c3" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "60c3d881c9c423dc3479c6ef1f6d1e090975a5e14a76ee683616a99293c3e734" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "commonmark" do + url "https://files.pythonhosted.org/packages/60/48/a60f593447e8f0894ebb7f6e6c1f25dafc5e89c5879fdc9360ae93ff83f0/commonmark-0.9.1.tar.gz" + sha256 "452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/11/23/814edf09ec6470d52022b9e95c23c1bef77f0bc451761e1504ebd09606d3/rich-12.6.0.tar.gz" + sha256 "ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0" + end + + resource "rich-rst" do + url "https://files.pythonhosted.org/packages/b0/69/5514c3a87b5f10f09a34bb011bc0927bc12c596c8dae5915604e71abc386/rich_rst-1.3.1.tar.gz" + sha256 "fad46e3ba42785ea8c1785e2ceaa56e0ffa32dbe5410dec432f37e4107c4f383" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/8c/d1/c228993e8a21e24bb43a0376b2901b6f3f2033dae13e7f76d1103bb9b8a3/textual-0.1.18.tar.gz" + sha256 "b2883f8ed291de58b9aa73de6d24bbaae0174687487458a4eb2a7c188a2acf23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"rich", shell_parameter_format: :click) + end + + test do + (testpath/"foo.md").write("- Hello, World") + assert_equal "• Hello, World", shell_output("#{bin}/rich foo.md").strip + end +end diff --git a/Formula/r/richgo.rb b/Formula/r/richgo.rb new file mode 100644 index 0000000000000..15ec06cffeadb --- /dev/null +++ b/Formula/r/richgo.rb @@ -0,0 +1,73 @@ +class Richgo < Formula + desc "Enrich `go test` outputs with text decorations" + homepage "https://github.com/kyoh86/richgo" + url "https://github.com/kyoh86/richgo/archive/refs/tags/v0.3.12.tar.gz" + sha256 "811db92c36818be053fa3950d40f8cca13912b8a4a9f54b82a63e2f112d2c4fe" + license "MIT" + head "https://github.com/kyoh86/richgo.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f1b78098f87488a5c1b495ff94ce40d6734d11a6db077b03356fe7d281cccbb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "967353f6b2bfa1c35a96f76eb85b98d3e6ea91d8b424a2655e80ab957884591b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "967353f6b2bfa1c35a96f76eb85b98d3e6ea91d8b424a2655e80ab957884591b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "967353f6b2bfa1c35a96f76eb85b98d3e6ea91d8b424a2655e80ab957884591b" + sha256 cellar: :any_skip_relocation, sonoma: "31d3f488ac0adb8874295408a1ea9c56acfbf9a90484d90b3e34d76ffcf20927" + sha256 cellar: :any_skip_relocation, ventura: "31d3f488ac0adb8874295408a1ea9c56acfbf9a90484d90b3e34d76ffcf20927" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1fc560cd4dc811280afea8b811f126da120bb2546af32f601131837feb41e9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da63b93248cf2292a4c287cc5973c39eded1d3c349ebfba315b3913883045d3c" + end + + depends_on "go" => [:build, :test] + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"go.mod").write <<~GOMOD + module github.com/Homebrew/brew-test + + go 1.21 + GOMOD + + (testpath/"main.go").write <<~GO + package main + + import "fmt" + + func Hello() string { + return "Hello, gotestsum." + } + + func main() { + fmt.Println(Hello()) + } + GO + + (testpath/"main_test.go").write <<~GO + package main + + import "testing" + + func TestHello(t *testing.T) { + got := Hello() + want := "Hello, gotestsum." + if got != want { + t.Errorf("got %q, want %q", got, want) + } + } + GO + + output = shell_output("#{bin}/richgo test ./...") + + expected = if OS.mac? + "PASS | github.com/Homebrew/brew-test" + else + "ok \tgithub.amrom.workers.dev/Homebrew/brew-test" + end + assert_match expected, output + end +end diff --git a/Formula/r/riemann-client.rb b/Formula/r/riemann-client.rb new file mode 100644 index 0000000000000..aee39b6d977ec --- /dev/null +++ b/Formula/r/riemann-client.rb @@ -0,0 +1,42 @@ +class RiemannClient < Formula + desc "C client library for the Riemann monitoring system" + homepage "https://git.madhouse-project.org/algernon/riemann-c-client" + url "https://git.madhouse-project.org/algernon/riemann-c-client/archive/riemann-c-client-2.2.2.tar.gz" + sha256 "468c2d6cb4095e581927005a1dab13656f5a9355e4c68a3a25fceb5c6798a72f" + license "EUPL-1.2" + head "https://git.madhouse-project.org/algernon/riemann-c-client.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c90018c4763d88af535cdb0bdc4ac02c6f40ed9a26b41105c48bb75714f5cf8e" + sha256 cellar: :any, arm64_sequoia: "7c56837d9a12fad1b4c18ad219db98ff49775244355c29a797e40e8124d1ce78" + sha256 cellar: :any, arm64_sonoma: "4116feb76d22357c68e8c5a08ffef422c0e01c3b60aabeef4e3b4f05839a62a6" + sha256 cellar: :any, arm64_ventura: "b3507667a57c0d40ae48bab7c5e9dcf08cb0e17030a20b3f3d746973bbb8193e" + sha256 cellar: :any, arm64_monterey: "a8afc4ddc4a4081a00908f94189611a642eb9cbf6419b41bef7db291960ad250" + sha256 cellar: :any, sonoma: "426da29c687af12a8f693ad486f02a4fb7a1f6cca60416bb6715a536c5d62ffb" + sha256 cellar: :any, ventura: "8bd9e8528e663ba4aab929be622df0830433aa554c0c133e131350d507c3f539" + sha256 cellar: :any, monterey: "6dac6669b4d4b2fd9af0bde77fcd4ae7e5187ec8801eb0e26b7fa8796f8b3e1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "c15ce11aff7a4925e518713074b6fc53c8746eef3efc5540dc975ca83a026147" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc7736635610401fa99e4911155329f537c997b57d218821538f0e6b8b212111" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "json-c" + depends_on "openssl@3" + depends_on "protobuf-c" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-tls=openssl", *std_configure_args + system "make" + system "make", "check" + system "make", "install" + end + + test do + system bin/"riemann-client", "send", "-h" + end +end diff --git a/Formula/r/riemann.rb b/Formula/r/riemann.rb new file mode 100644 index 0000000000000..04c900ea48dce --- /dev/null +++ b/Formula/r/riemann.rb @@ -0,0 +1,43 @@ +class Riemann < Formula + desc "Event stream processor" + homepage "https://riemann.io/" + url "https://github.com/riemann/riemann/releases/download/0.3.12/riemann-0.3.12.tar.bz2" + sha256 "82c24c7cba3bce96957f25661f39c6162a262ba76aef24e986e73dbf2a79b7a6" + license "EPL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "23e04604313424736f08c1643acb79a66e80665193f341f18e3b4221037b1c7e" + end + + depends_on "openjdk" + + def install + inreplace "bin/riemann", "$top/etc", etc + etc.install "etc/riemann.config" => "riemann.config.guide" + + # Install jars in libexec to avoid conflicts + libexec.install Dir["*"] + + (bin/"riemann").write_env_script libexec/"bin/riemann", Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + You may also wish to install these Ruby gems: + riemann-client + riemann-tools + riemann-dash + EOS + end + + service do + run [opt_bin/"riemann", etc/"riemann.config"] + keep_alive true + log_path var/"log/riemann.log" + error_log_path var/"log/riemann.log" + end + + test do + system bin/"riemann", "-help", "0" + end +end diff --git a/Formula/r/riff.rb b/Formula/r/riff.rb new file mode 100644 index 0000000000000..8b903d87d101b --- /dev/null +++ b/Formula/r/riff.rb @@ -0,0 +1,29 @@ +class Riff < Formula + desc "Diff filter highlighting which line parts have changed" + homepage "https://github.com/walles/riff" + url "https://github.com/walles/riff/archive/refs/tags/3.5.1.tar.gz" + sha256 "0f7a023e3fc0fad8822aa94e52d0c70ece5f0bf1ed4b4fa56d5f12d739bd82d4" + license "MIT" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a5951197a99fe39e9c4ff8630c9d1bf5d9261a8dd7565fa944e1e07c627e6349" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6dbd7b5e33208aa49fba8f138ff4a599e79608aff5b42fa71dc0cb274f699a4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51f63a6fbee6d6e9173a08176c3823c7047400170d3bc59d82af97249bfca163" + sha256 cellar: :any_skip_relocation, sonoma: "66fc24637d6af8b832d47b0b80cfac74be194e7b447efa2e77b247833eb476ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "d97dfe32c622a793cb8d2e4aa2fdc653d6300a5ecd907877caafae1763a84ee6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5e64e5b46495ca011e961a048acfa68f1f13c21de10f3d9d75456866ec976c0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_empty shell_output("#{bin}/riff /etc/passwd /etc/passwd") + assert_match version.to_s, shell_output("#{bin}/riff --version") + end +end diff --git a/Formula/r/rig.rb b/Formula/r/rig.rb new file mode 100644 index 0000000000000..92b91122bfcce --- /dev/null +++ b/Formula/r/rig.rb @@ -0,0 +1,53 @@ +class Rig < Formula + desc "Provides fake name and address data" + homepage "https://rig.sourceforge.net/" + url "https://downloads.sourceforge.net/project/rig/rig/1.11/rig-1.11.tar.gz" + sha256 "00bfc970d5c038c1e68bc356c6aa6f9a12995914b7d4fda69897622cb5b77ab8" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "5ac9d502e26fd90e8e7c695fd294e68e40feed89d8c3cf887ea0435c8f1fdb71" + sha256 arm64_sequoia: "794a9e6df14ced7ebcdfdd890a1a51145882325ff6f196b0775f4503289ef38a" + sha256 arm64_sonoma: "c49772908fab4d132435015e225760d30f00d742f5e09123c71cdf90a453d3ea" + sha256 arm64_ventura: "1ffffb584e30f49d7b8c4b5dcc99141fff24697dc0512a6cfd8deba04720ef54" + sha256 arm64_monterey: "beffb2a7922b42831deb088af7d1f9ae0aefd703f676a1bafffa420ea96bf23c" + sha256 arm64_big_sur: "b9736b9b35547ab9af2afc1e84698f5001e7f0ba9208ee171a58f554d9780c25" + sha256 sonoma: "643e207aeaaeefde3364f9d95eb743afd98973cce9220c374bb4b23cbc0740dc" + sha256 ventura: "605e1c4428ce942389573258015a36bc3a20c8e5dc7464ff3fd57240a816f72f" + sha256 cellar: :any_skip_relocation, monterey: "5b3a4522d3f584f5239b2e993517d20f5d37fcfa474c8ba0fad8be7aa91372d5" + sha256 cellar: :any_skip_relocation, big_sur: "e763b581f6a9410df5cca2384f0f9108c06a1c2e90ad3ebfccf7bf2297b7b641" + sha256 cellar: :any_skip_relocation, catalina: "e75fa428f9833207c6fa53e005e32c8d3af48206e08ded637d9633c2af1e0643" + sha256 arm64_linux: "59facd287d0415f45ad5b63fcd7fceb389fa27f955ae79570bc03af560c0bccf" + sha256 x86_64_linux: "ea660b88d2d27477728bd628b496e6a6588c7dff8d4a46051e2b9fd0504e726b" + end + + # Fix build failure because of missing #include on Linux. + # Patch submitted to author by email. + patch :DATA + + def install + system "make", "PREFIX=#{prefix}" + bin.install "rig" + pkgshare.install Dir["data/*"] + end + + test do + system bin/"rig" + end +end + +__END__ +diff --git a/rig.cc b/rig.cc +index 1f9a2e4..3a23ea8 100644 +--- a/rig.cc ++++ b/rig.cc +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/Formula/r/rinetd.rb b/Formula/r/rinetd.rb new file mode 100644 index 0000000000000..c39a88cd662e9 --- /dev/null +++ b/Formula/r/rinetd.rb @@ -0,0 +1,61 @@ +class Rinetd < Formula + desc "Internet TCP redirection server" + homepage "https://github.com/samhocevar/rinetd" + url "https://github.com/samhocevar/rinetd/releases/download/v0.73/rinetd-0.73.tar.bz2" + sha256 "39180d31b15f059b2e876496286356e40183d1567c2e2aec41aacad8721ecc44" + license "GPL-2.0-or-later" + revision 1 + # NOTE: Original (unversioned) tool is at https://github.com/boutell/rinetd + # Debian tracks the "samhocevar" fork so we follow suit + head "https://github.com/samhocevar/rinetd.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "229ed2e7f795bf1c9a0e3a77dfdfddfea277b160dee72157ae498bb2e12d5bdc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1aa4fa0021a1509710ef1b13f7e76d7ec8b1f819f941835040807ce8255599d2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b64c37c93190bdea6d086f34832b7db19ee69cd22ce7046e6c371a0c6b292a22" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8de3030cc0499320d112d4d07a4379a4068efab0c5b7e027d7f4a45be33d1d6a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "35efe356153b47c973f2548d1b02c27c503dbc6cc360bec5eaa60a94049b5dbd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3be0837da2a86dc6453bbb3ca1169d3ba321cf04190128215f3b6ce6aba4cb21" + sha256 cellar: :any_skip_relocation, sonoma: "2c97ad9b664fc28f0da87ef9e5bad45f8f667f952886f4b441be9144b1ec4401" + sha256 cellar: :any_skip_relocation, ventura: "a3ab75f17f3d2d80dc139d9ed8a380cef57fe6c759520ec31056d0d60a84054d" + sha256 cellar: :any_skip_relocation, monterey: "28ee184db1c28e98eecca90ae1e2df0bf8af20c1810675a4298d31d803f6053c" + sha256 cellar: :any_skip_relocation, big_sur: "90b5e423280f7ed15989bcea13980ec6bbc5ba2071958236f2b5a52ee55d24c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "3836623c7c45410071cda84c136d8455fe6c0d3efc171baedd20eebf18606b29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c938efa3c89e08edc1063d301e41ec8fb026e28da8b956f7e9fde90efa4ff835" + end + + def install + # The daemon() function does exist but its deprecated so keep configure + # away: + system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{share}", "ac_cv_func_daemon=no" + + # Point hardcoded runtime paths inside of our prefix + inreplace "src/rinetd.h" do |s| + s.gsub! "/etc/rinetd.conf", "#{etc}/rinetd.conf" + s.gsub! "/var/run/rinetd.pid", "#{var}/run/rinetd.pid" + end + inreplace "rinetd.conf", "/var/log", "#{var}/log" + + # Install conf file only as example and have post_install put it into place + mv "rinetd.conf", "rinetd.conf.example" + inreplace "Makefile", "rinetd.conf", "rinetd.conf.example" + + system "make", "install" + end + + def post_install + conf = etc/"rinetd.conf" + cp "#{share}/rinetd.conf.example", conf unless conf.exist? + end + + test do + system "#{sbin}/rinetd", "-h" + end +end diff --git a/Formula/r/ringojs.rb b/Formula/r/ringojs.rb new file mode 100644 index 0000000000000..7846fa016d1dd --- /dev/null +++ b/Formula/r/ringojs.rb @@ -0,0 +1,42 @@ +class Ringojs < Formula + desc "CommonJS-based JavaScript runtime" + homepage "https://ringojs.org" + url "https://github.com/ringo/ringojs/releases/download/v4.0.0/ringojs-4.0.0.tar.gz" + sha256 "9aea219fc6b4929a7949a34521cb96207073d29aa88f89f9a8833e31e84b14d5" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "3ab47d6d66c7528f9cc7b67be71d428bdab468c46724952615112e03cc50a544" + end + + depends_on "openjdk" + + def install + rm Dir["bin/*.cmd"] + rm_r "docker" + + # Ensure bottles are uniform. The `/usr/local` references are all in comments. + inreplace %w[modules/fs.js modules/globals.js], "/usr/local", HOMEBREW_PREFIX + + bin.install Dir["bin/*"] + libexec.install Dir["*"] + java_env = Language::Java.overridable_java_home_env.merge(RINGO_HOME: libexec) + bin.env_script_all_files libexec/"bin", java_env + end + + test do + (testpath/"test.js").write <<~JS + var x = 40 + 2; + console.assert(x === 42); + JS + system bin/"ringo", "test.js" + end +end diff --git a/Formula/r/rink.rb b/Formula/r/rink.rb new file mode 100644 index 0000000000000..b091bcf6052bf --- /dev/null +++ b/Formula/r/rink.rb @@ -0,0 +1,48 @@ +class Rink < Formula + desc "Unit conversion tool and library written in rust" + homepage "https://rinkcalc.app/about" + url "https://github.com/tiffany352/rink-rs/archive/refs/tags/v0.8.0.tar.gz" + sha256 "40048e84c2b606e50bf05dec2813acedeb48066cd48537d0dea453a72d000d60" + license all_of: ["MPL-2.0", "GPL-3.0-or-later"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eb6d58f1c8800dc3c366f4b4593b1d4af864d63fdee448aaa9bd60b72ff69ff0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9e9d83c728a0232035908223bf1d4b0823c6c96eefb95d72c08a060f9e8c1fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "886a2268e178971f189a726cd76757c20110bcd2fad8cb68ff6bb911a93519e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "31c09a811a1d779c6e9f1edbe8d03cbabc5ebdd2b2f8a0117429eb93f3bafd55" + sha256 cellar: :any_skip_relocation, sonoma: "f28777dd190d29ef41985875425eeff527e18b6a7db4976b103323784d36f678" + sha256 cellar: :any_skip_relocation, ventura: "78257335a434a84394810b5f47526553c58d1e57a906f1fc1619526e978c1d1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca578f08ba68e204d37c59d253d50715e7ce4d450d73af1604c66867423eeeea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a541a87a97cb62583bceced14bbac8c03d8f0119e6702c1d773c3fc08a3e8e3e" + end + + depends_on "asciidoctor" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + depends_on "zlib" + end + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + + system "make", "man" + man1.install "build/rink.1" + man5.install "build/rink-dates.5" + man5.install "build/rink-defs.5" + man5.install "build/rink.5" + man7.install "build/rink.7" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rink --version") + + output = shell_output("#{bin}/rink '1 inch to centi meter'") + assert_match "> 1 inch to centi meter", output + assert_match "2.54 centi meter (length)", output + end +end diff --git a/Formula/r/rio-terminal.rb b/Formula/r/rio-terminal.rb new file mode 100644 index 0000000000000..e9465a1cc7960 --- /dev/null +++ b/Formula/r/rio-terminal.rb @@ -0,0 +1,39 @@ +class RioTerminal < Formula + desc "Hardware-accelerated GPU terminal emulator powered by WebGPU" + homepage "https://rioterm.com/" + url "https://github.com/raphamorim/rio/archive/refs/tags/v0.2.35.tar.gz" + sha256 "118e169e4a328544a3958da70ae6a8a804edb63294834312ac33faac6130d40f" + license "MIT" + head "https://github.com/raphamorim/rio.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d42fc71450727de17eae620ec318dbb355386c99852eff8eb9839ef085f324b5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7515922e369f58e7eabafea3965dd7939d3ecc410df455f9eaa00f7ed9ad9d4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29d7f60aa68edaccc29edd9716be3fbb87829b82138fc4f38060febcc90b044d" + sha256 cellar: :any_skip_relocation, sonoma: "3b3b82c3ca623eb80a5614612cdd37f632aeae6b92dd5dcff4eef9f893cb1ba7" + end + + depends_on "rust" => :build + # Rio does work for Linux although it requires a specification of which + # window manager will be used (x11 or wayland) otherwise will not work. + depends_on :macos + + conflicts_with "rasterio", because: "both install `rio` binaries" + conflicts_with cask: "rio", because: "both install `rio` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "frontends/rioterm") + end + + test do + assert_match version.to_s, shell_output("#{bin}/rio --version") + + system bin/"rio", "--write-config", testpath/"rio.toml" + assert_match "enable-log-file = false", (testpath/"rio.toml").read + end +end diff --git a/Formula/r/rip2.rb b/Formula/r/rip2.rb new file mode 100644 index 0000000000000..07711c6c892e9 --- /dev/null +++ b/Formula/r/rip2.rb @@ -0,0 +1,41 @@ +class Rip2 < Formula + desc "Safe and ergonomic alternative to rm" + homepage "https://github.com/MilesCranmer/rip2" + url "https://github.com/MilesCranmer/rip2/archive/refs/tags/v0.9.5.tar.gz" + sha256 "491bcf55246b0da4f03e1848c6532d85eaf680640db7f014454cb2092411c980" + license "GPL-3.0-or-later" + head "https://github.com/MilesCranmer/rip2.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "32cbd95f32c0d1df71b9c325f47597e77f55d7e0bdd8298f678e3429122d3365" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9a788f7f8cdc9e5810214fc8caa8890ee1802e14fe9bef40914022acb1daaa2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af09c957a7fb215c1ac9f49c61d411649750f81cf1acaf7692013799ccf6f503" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5ea06a6d273713bad688f3437d469881c60f0fff0548a04e08816cf8088e6ad" + sha256 cellar: :any_skip_relocation, sonoma: "5623f6d35f35b801aca200e251fdbb8ed15737bce63d9e8522b58c1f04186c11" + sha256 cellar: :any_skip_relocation, ventura: "e5cf15ac04a340648e7279126aaec65535acaeafa7b29e24219ed4e4e27fbfb1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7033f640b903b2e46f988f9f7fd968c11e18c7f6f34a9ffbab629a1d639e0436" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9611cdaa697a6f46cda987142a90d485bb7d2feb266c08ed38503c84d6c5205" + end + + depends_on "rust" => :build + + conflicts_with "rm-improved", because: "both install `rip` binaries" + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"rip", "completions") + (share/"elvish/lib/rip.elv").write Utils.safe_popen_read(bin/"rip", "completions", "elvish") + (share/"powershell/completions/_rip.ps1").write Utils.safe_popen_read(bin/"rip", "completions", "powershell") + (share/"nu/completions/rip.nu").write Utils.safe_popen_read(bin/"rip", "completions", "nushell") + end + + test do + # Create a test file and verify rip can delete it + test_file = testpath/"test.txt" + touch test_file + system bin/"rip", "--graveyard", testpath/"graveyard", test_file.to_s + assert_path_exists testpath/"graveyard" + refute_path_exists test_file + end +end diff --git a/Formula/r/ripgrep-all.rb b/Formula/r/ripgrep-all.rb new file mode 100644 index 0000000000000..4a45a50248b0d --- /dev/null +++ b/Formula/r/ripgrep-all.rb @@ -0,0 +1,36 @@ +class RipgrepAll < Formula + desc "Wrapper around ripgrep that adds multiple rich file types" + homepage "https://github.com/phiresky/ripgrep-all" + url "https://github.com/phiresky/ripgrep-all/archive/refs/tags/v0.10.9.tar.gz" + sha256 "a5b3150940dcddd35a26e9de398f11a563d0466a335e5450ceb7ff369e9fef45" + license "AGPL-3.0-or-later" + head "https://github.com/phiresky/ripgrep-all.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10c955fbbab02b13c8a14cdeccc51cdd0a9f80821053afef7212250ad34981ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a1935b715dabb6d04c7650f07092ed20883a28d3230c82a189eaf4be8e6ca46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b5ecb4c9267c51f42fb2917f6531bdfeb178ad790e7ef2674b968a40d2944a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "30359e9de5c05c815de5df2ac83cc35fbaad2ecbdbe7494f59cc58f204e098c5" + sha256 cellar: :any_skip_relocation, sonoma: "a5d4ca5f5398c6f3bfb53a77bb71aeed0545e50da5bca533f22786d350404fed" + sha256 cellar: :any_skip_relocation, ventura: "5071868007570a23d9fdd76e6a48f27cce497b5180d49d9ba3f0ff926d39ac71" + sha256 cellar: :any_skip_relocation, arm64_linux: "dcecce222556591cdb97455f0cc481591db30b115aa9d8725e971ce598b50b81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33d24a8354f0cf5c79af8490ed2436537437f20c321c4f1b88e1b6c6f30430d6" + end + + depends_on "rust" => :build + depends_on "ripgrep" + + uses_from_macos "zip" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"file.txt").write("Hello World") + system "zip", "archive.zip", "file.txt" + + output = shell_output("#{bin}/rga 'Hello World' #{testpath}") + assert_match "Hello World", output + end +end diff --git a/Formula/r/ripgrep.rb b/Formula/r/ripgrep.rb new file mode 100644 index 0000000000000..a5e9b6edeaa30 --- /dev/null +++ b/Formula/r/ripgrep.rb @@ -0,0 +1,39 @@ +class Ripgrep < Formula + desc "Search tool like grep and The Silver Searcher" + homepage "https://github.com/BurntSushi/ripgrep" + url "https://github.com/BurntSushi/ripgrep/archive/refs/tags/15.1.0.tar.gz" + sha256 "046fa01a216793b8bd2750f9d68d4ad43986eb9c0d6122600f993906012972e8" + license "Unlicense" + head "https://github.com/BurntSushi/ripgrep.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f4dc761b07edb8e6438b618d22f7e57252903e2f2b973e2c7aa0da518fc374b9" + sha256 cellar: :any, arm64_sequoia: "0153b06af62b4b8c6ed3f2756dcc4859f74a6128a286f976740468229265cfbe" + sha256 cellar: :any, arm64_sonoma: "d9c83b35f30d48925b8c573afa83ec32b10aaca8f247bc938650a838d188c5df" + sha256 cellar: :any, sonoma: "ab382b4ae86aba1b7e6acab3bc50eb64be7bb08cf33a37a32987edb8bc6affe4" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbdef955d5752e53473be06b698c45ce31682cd47d75e7c706365450bd08ff44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "349bc55db5ad4b4e8935b889d44c745ae23605c1d57d6eb639dbd5c86d573a88" + end + + depends_on "asciidoctor" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "pcre2" + + def install + system "cargo", "install", "--features", "pcre2", *std_cargo_args + + generate_completions_from_executable(bin/"rg", "--generate", shell_parameter_format: "complete-") + (man1/"rg.1").write Utils.safe_popen_read(bin/"rg", "--generate", "man") + end + + test do + (testpath/"Hello.txt").write("Hello World!") + system bin/"rg", "Hello World!", testpath + end +end diff --git a/Formula/r/ripmime.rb b/Formula/r/ripmime.rb new file mode 100644 index 0000000000000..9f14989402f75 --- /dev/null +++ b/Formula/r/ripmime.rb @@ -0,0 +1,54 @@ +class Ripmime < Formula + desc "Extract attachments out of MIME encoded email packages" + homepage "https://pldaniels.com/ripmime/" + url "https://github.com/inflex/ripMIME/archive/refs/tags/1.4.1.0.tar.gz" + sha256 "6d551d6b65b4da6c6b8dfd05be8141026cc760ca1fb8a707b7bf96c199c9f52d" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5736f080200de4ac8a01866619a98584ddb207bc38d62c41654c620bb4a8528e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d5c2db89d1a44f0e239ce29344d3c0fd8cf1bcb87323604a35637c216f74a2f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dda645f1d8cc8b55fcb8fba6747ac3162330de3b50a6e42bb50859ce0d5bb383" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3cdf7a81580930011a430850659749515bf9f58eff2fa0c3589a47178c6f69e2" + sha256 cellar: :any_skip_relocation, sonoma: "a3342a8eae88a0e8f24d5e87cda7d85b8dd4520161df950ada402e6ef7cc37b7" + sha256 cellar: :any_skip_relocation, ventura: "fb4d73a8f03ad7dcbc8cc4b72f41f8f81d918490e4bc94a712b47497adef35aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "b083ab553fbe5c9106133acdd28ee36820df2352481e4188f1069e77d492d6ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f64dee6f786e2e7a99a7fa792cce03ea36ba3b6604493f7e90e02a80670e5749" + end + + def install + args = %W[ + CFLAGS=#{ENV.cflags} + ] + args << "LIBS=-liconv" if OS.mac? + system "make", *args + bin.install "ripmime" + man1.install "ripmime.1" + end + + test do + (testpath/"message.eml").write <<~EOS + MIME-Version: 1.0 + Subject: Test email + To: example@example.org + Content-Type: multipart/mixed; + boundary="XXXXboundary text" + + --XXXXboundary text + Content-Type: text/plain; + name="attachment.txt" + Content-Disposition: attachment; + filename="attachment.txt" + Content-Transfer-Encoding: base64 + + SGVsbG8gZnJvbSBIb21lYnJldyEK + + --XXXXboundary text-- + EOS + + system bin/"ripmime", "-i", "message.eml" + assert_equal "Hello from Homebrew!\n", (testpath/"attachment.txt").read + end +end diff --git a/Formula/r/ripsecrets.rb b/Formula/r/ripsecrets.rb new file mode 100644 index 0000000000000..4518af885ac0e --- /dev/null +++ b/Formula/r/ripsecrets.rb @@ -0,0 +1,41 @@ +class Ripsecrets < Formula + desc "Prevent committing secret keys into your source code" + homepage "https://github.com/sirwart/ripsecrets" + url "https://github.com/sirwart/ripsecrets/archive/refs/tags/v0.1.11.tar.gz" + sha256 "786c1b7555c1f9562d7eb3994d932445ab869791be65bc77b8bd1fbbae3890b8" + license "MIT" + head "https://github.com/sirwart/ripsecrets.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9ca11d40867606927111bf7d1f076284b38be676431935508fca57bfe9c961f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2be229f02f517c7c9f809999ab00daee0b4650f7bf6eab3e31132c4dacc7c1db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da96cf200c77669126e46472b94098c5e14cad9d75eb648a6fc05feafb754946" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b7c30db103b32ff7a4b8ed285a9aa61dd648cd0fb8d2fd30b165930ffa193b6" + sha256 cellar: :any_skip_relocation, sonoma: "58ce1e4409a7648607e32cfb9a1a43b5b25656f83d9570dc66137bd97a7971ef" + sha256 cellar: :any_skip_relocation, ventura: "5d8a3bf678aa0016c6c28511bd19b7689248dca8291169bc2e2fbe97cfe486ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b5fcd9d6cb13c93553bdca9e23f0b1b2c0d5de7dbcbe082ab1537edf610bd78" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fb68c8ad22e92b64ce40f6380978572e9857d8e13fdba1e9efbbb0c8a0e004a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + out_dir = Dir["target/release/build/ripsecrets-*/out"].first + bash_completion.install "#{out_dir}/ripsecrets.bash" => "ripsecrets" + fish_completion.install "#{out_dir}/ripsecrets.fish" + zsh_completion.install "#{out_dir}/_ripsecrets" + man1.install "#{out_dir}/ripsecrets.1" + end + + test do + # Generate a real-looking key + keyspace = "A".upto("Z").to_a + "a".upto("z").to_a + "0".upto("9").to_a + ["_"] + fake_key = Array.new(36).map { keyspace.sample } + # but mark it as allowed to test more of the program + (testpath/"test.txt").write("ghp_#{fake_key.join} # pragma: allowlist secret") + + system bin/"ripsecrets", (testpath/"test.txt") + end +end diff --git a/Formula/r/riscv64-elf-binutils.rb b/Formula/r/riscv64-elf-binutils.rb new file mode 100644 index 0000000000000..33da3816c93ec --- /dev/null +++ b/Formula/r/riscv64-elf-binutils.rb @@ -0,0 +1,61 @@ +class Riscv64ElfBinutils < Formula + desc "GNU Binutils for riscv64-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_tahoe: "da7fae36915c1ac01f02e691f9a287527aa5ce3e2db9f7cef473eba677de13f2" + sha256 arm64_sequoia: "ac4ff8f1f9f3b05440919bb1cbfff9c1025013663e11dccc1d1eed0a7d6a6e4c" + sha256 arm64_sonoma: "47a482f6bea910cfda833737f5aa218534532efb513d7d22a79ae63e4fd62033" + sha256 arm64_ventura: "86e3e5b2804c55afcbc1f1a09f5e5ff336ca6b79b7765c3366179964a594a96a" + sha256 sonoma: "f1fbfd5cd6528ea5f007e5beb3400e020ea1f3b4df13626e041e189634a5c88e" + sha256 ventura: "c0b867a28be94bc2b9d946d3be7418e0d4e45535a69a14081a99639e5e36ac1d" + sha256 arm64_linux: "2bb7cbef82cb462e8f9a906f32488891e82e5364faff358711ba6a88dee87eed" + sha256 x86_64_linux: "400f96cdf61503cc9dc3bb3dc9e7951889941312cea67ce62a8650343bb6d52a" + end + + depends_on "pkgconf" => :build + depends_on "zstd" + + uses_from_macos "zlib" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "riscv64-elf" + system "./configure", "--target=#{target}", + "--prefix=#{prefix}", + "--libdir=#{lib}/#{target}", + "--infodir=#{info}/#{target}", + "--with-system-zlib", + "--with-zstd", + "--disable-nls" + system "make" + system "make", "install" + end + + test do + (testpath/"test-s.s").write <<~ASM + .section .text + .globl _start + _start: + li a7, 93 + li a0, 0 + ecall + ASM + + system bin/"riscv64-elf-as", "-o", "test-s.o", "test-s.s" + assert_match "file format elf64-littleriscv", + shell_output("#{bin}/riscv64-elf-objdump -a test-s.o") + assert_match "f()", shell_output("#{bin}/riscv64-elf-c++filt _Z1fv") + end +end diff --git a/Formula/r/riscv64-elf-gcc.rb b/Formula/r/riscv64-elf-gcc.rb new file mode 100644 index 0000000000000..ea3a7e45e5d09 --- /dev/null +++ b/Formula/r/riscv64-elf-gcc.rb @@ -0,0 +1,68 @@ +class Riscv64ElfGcc < Formula + desc "GNU compiler collection for riscv64-elf" + homepage "https://gcc.gnu.org" + url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + mirror "https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_tahoe: "6cba35afe40fc91c061f682552d6d54555cdc0b2542355378e0386eb45e9bfdb" + sha256 arm64_sequoia: "ceca8ec306dc54b68c0074b74aad473b2057f94cc4cfcbc27dabba604e0a4955" + sha256 arm64_sonoma: "5a8fc8f663db03cd1ab061339fd16f32b684aabe0ec579176e074a6824d74167" + sha256 arm64_ventura: "f4a69d072e2a835e9dd00d6eca8a555107f0f8145d282d2614d2d633b6de972f" + sha256 sonoma: "2cf316a08babf8a9d47de5a189077ede89c7cf0f44c0af5e5541f5bd6ff4213c" + sha256 ventura: "c733c2ddcd91e90353d7387dd01f2e4cf8b793212befd1c39bbd9ef5862d3873" + sha256 arm64_linux: "3cc5509b449398991d5668270aa1b87558739984c5c2cdef5787cd2742448b8b" + sha256 x86_64_linux: "6df2988c8f83337254c05e04754c7720d39720d6440afec158a82b5bd161f6ac" + end + + depends_on "gmp" + depends_on "libmpc" + depends_on "mpfr" + depends_on "riscv64-elf-binutils" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + target = "riscv64-elf" + mkdir "riscv64-elf-gcc-build" do + system "../configure", "--target=#{target}", + "--prefix=#{prefix}", + "--infodir=#{info}/#{target}", + "--disable-nls", + "--without-isl", + "--without-headers", + "--with-as=#{Formula["riscv64-elf-binutils"].bin}/riscv64-elf-as", + "--with-ld=#{Formula["riscv64-elf-binutils"].bin}/riscv64-elf-ld", + "--with-system-zlib", + "--enable-languages=c,c++" + system "make", "all-gcc" + system "make", "install-gcc" + system "make", "all-target-libgcc" + system "make", "install-target-libgcc" + + # FSF-related man pages may conflict with native gcc + rm_r(share/"man/man7") + end + end + + test do + (testpath/"test-c.c").write <<~C + int main(void) + { + int i=0; + while(i<10) i++; + return i; + } + C + system bin/"riscv64-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" + assert_match "file format elf64-littleriscv", + shell_output("#{Formula["riscv64-elf-binutils"].bin}/riscv64-elf-objdump -a test-c.o") + end +end diff --git a/Formula/r/riscv64-elf-gdb.rb b/Formula/r/riscv64-elf-gdb.rb new file mode 100644 index 0000000000000..ed4720a1a0aaf --- /dev/null +++ b/Formula/r/riscv64-elf-gdb.rb @@ -0,0 +1,86 @@ +class Riscv64ElfGdb < Formula + desc "GNU debugger for riscv64-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + sha256 "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5" + license "GPL-3.0-or-later" + head "https://sourceware.org/git/binutils-gdb.git", branch: "master" + + livecheck do + formula "gdb" + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "c788ada41cb0e6213ac907a95756fe63436130131ab6554fc2d8fddbf026eda8" + sha256 arm64_sequoia: "0e878207779037ca4b615e8d64d637da0f9efed821cb6dd4d946223cf174b570" + sha256 arm64_sonoma: "60f459e55f4aa9651af064d412e83a93f7e0b3fdad25e9577b2136c0bb58973b" + sha256 sonoma: "468da07210653b4c513bee8fff02cc3a3cf87a7feee2490b6fcbd122cdefcae7" + sha256 arm64_linux: "d567f5e4606d581636c0cbca53e611dccde46f57928a184dd539c661defafd0d" + sha256 x86_64_linux: "65c1cd2803244e087d76ae9204568565e0539c11c4938c00be02a7e891416049" + end + + depends_on "pkgconf" => :build + depends_on "riscv64-elf-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "ncurses" # https://github.com/Homebrew/homebrew-core/issues/224294 + depends_on "python@3.14" + depends_on "readline" + depends_on "xz" # required for lzma support + depends_on "zstd" + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "zlib" + + # Workaround for https://github.com/Homebrew/brew/issues/19315 + on_sequoia :or_newer do + on_intel do + depends_on "expat" + end + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "riscv64-elf" + args = %W[ + --target=#{target} + --datarootdir=#{share}/#{target} + --includedir=#{include}/#{target} + --infodir=#{info}/#{target} + --mandir=#{man} + --disable-binutils + --disable-nls + --enable-tui + --with-curses + --with-expat + --with-lzma + --with-python=#{which("python3.14")} + --with-system-readline + --with-system-zlib + --with-zstd + ] + + mkdir "build" do + system "../configure", *args, *std_configure_args + ENV.deparallelize # Error: common/version.c-stamp.tmp: No such file or directory + system "make" + + # Don't install bfd or opcodes, as they are provided by binutils + system "make", "install-gdb" + end + end + + test do + (testpath/"test.c").write "void _start(void) {}" + system Formula["riscv64-elf-gcc"].bin/"riscv64-elf-gcc", "-g", "-nostdlib", "test.c" + assert_match "Symbol \"_start\" is a function at address 0x", + shell_output("#{bin}/riscv64-elf-gdb -batch -ex 'info address _start' a.out") + end +end diff --git a/Formula/r/risor.rb b/Formula/r/risor.rb new file mode 100644 index 0000000000000..f529b6457acc5 --- /dev/null +++ b/Formula/r/risor.rb @@ -0,0 +1,44 @@ +class Risor < Formula + desc "Fast and flexible scripting for Go developers and DevOps" + homepage "https://risor.io/" + url "https://github.com/risor-io/risor/archive/refs/tags/v1.8.1.tar.gz" + sha256 "3253a3e6e6f2916f0fe5f415e170c84e7bfede59e66d45d036d1018c259cba91" + license "Apache-2.0" + head "https://github.com/risor-io/risor.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "66ea463bd6018165919353b3752f6bef780688668e3ca484c3ee1c80dc7b0cd0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cd9613e60e81ef3a223de3f23973e81ec64497138622707242a75ffce3a252c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd3e27a942ab5fe9bc9dfbe75003d44490bd33691278ba5f55658efe021215f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "019a5b1e925b0c126057e4a519afcfe7ca7dd0964aa915244afd6a32c2631e7d" + sha256 cellar: :any_skip_relocation, sonoma: "d83df8d83687d2361145b2608a074a55d369bfddae62bbf05552795f405ba5a7" + sha256 cellar: :any_skip_relocation, ventura: "09810c4db8f5ebf475b26af73e69532771b3971574e41a7ed141ba548bfdd069" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e62a036bd5fa35ac431d7db4e6be14b36eeae142a9fafdb7c822f2bf5727400" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5310ed4dda566a15d859667fe317f44c9242d2d7f12abbd2edde2178d4fbe3ba" + end + + depends_on "go" => :build + + def install + chdir "cmd/risor" do + ldflags = "-s -w -X 'main.version=#{version}' -X 'main.date=#{time.iso8601}'" + tags = "aws,k8s,vault" + system "go", "build", *std_go_args(ldflags:, tags:) + generate_completions_from_executable(bin/"risor", "completion") + end + end + + test do + output = shell_output("#{bin}/risor -c \"time.now()\"") + assert_match(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, output) + assert_match version.to_s, shell_output("#{bin}/risor version") + assert_match "module(aws)", shell_output("#{bin}/risor -c aws") + assert_match "module(k8s)", shell_output("#{bin}/risor -c k8s") + assert_match "module(vault)", shell_output("#{bin}/risor -c vault") + end +end diff --git a/Formula/r/river.rb b/Formula/r/river.rb new file mode 100644 index 0000000000000..a15949b4cd511 --- /dev/null +++ b/Formula/r/river.rb @@ -0,0 +1,55 @@ +class River < Formula + desc "Reverse proxy application, based on the pingora library from Cloudflare" + homepage "https://github.com/memorysafety/river" + url "https://github.com/memorysafety/river/archive/refs/tags/v0.5.0.tar.gz" + sha256 "fe96d3693d60be06d0d1810954835f79139495b890b597f42c2b0bfa2bd8c7a6" + license "Apache-2.0" + head "https://github.com/memorysafety/river.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6aa053883945074b92163f95377836cd8dac14606d0406d83bcfef4238f6a2a5" + sha256 cellar: :any, arm64_sequoia: "07ebac88781c5ead2935d4fcdcf750f10791ac135986c7917e5fcfcf8cad0a97" + sha256 cellar: :any, arm64_sonoma: "d214bd3778baa4798b1842f4d4a6049d48f02cbe6862418d35e1acc8fe8d319a" + sha256 cellar: :any, arm64_ventura: "2f254be15ed6c188188fa007bcb48e7124808c8449c95da2bc463b1539852b23" + sha256 cellar: :any, arm64_monterey: "6bb3878f623d205400f5906e4104b7545c1054169766720fc2acb8ddf403a8c1" + sha256 cellar: :any, sonoma: "32bf41e3c0baccfccc9aa73af1e00178cda928638dab11a67651342a54a9ce67" + sha256 cellar: :any, ventura: "92a0e801a55f3d122801ce1394b665e4d9ffeff6a6fc3f3aebb14e27ea1335ce" + sha256 cellar: :any, monterey: "c99da45b6218bbc2254e0f9deefd84aeedb74f44cc7049babfe93e1d9dbbbd35" + sha256 cellar: :any_skip_relocation, arm64_linux: "73562d84d8fb211d03d3c07c22145034298bb5bf601b3ff811b07c49569190de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ffd4142bf28d324a32169a8e5cd31640c89af81ae66e3f7f4b2fc548322dec0" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "source/river") + end + + test do + require "utils/linkage" + + (testpath/"example-config.toml").write <<~TOML + [system] + [[basic-proxy]] + name = "Example Config" + [basic-proxy.connector] + proxy_addr = "127.0.0.1:80" + TOML + system bin/"river", "--validate-configs", "--config-toml", testpath/"example-config.toml" + + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"river", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/r/rizin.rb b/Formula/r/rizin.rb new file mode 100644 index 0000000000000..e31e1e16b32d9 --- /dev/null +++ b/Formula/r/rizin.rb @@ -0,0 +1,84 @@ +class Rizin < Formula + desc "UNIX-like reverse engineering framework and command-line toolset" + homepage "https://rizin.re" + url "https://github.com/rizinorg/rizin/releases/download/v0.8.1/rizin-src-v0.8.1.tar.xz" + sha256 "ef2b1e6525d7dc36ac43525b956749c1cca07bf17c1fed8b66402d82010a4ec2" + license "LGPL-3.0-only" + head "https://github.com/rizinorg/rizin.git", branch: "dev" + + bottle do + sha256 arm64_tahoe: "f25462fa15671a16f9981b68ec46e4d5acd36456fe11074e55ab5cb5442a58af" + sha256 arm64_sequoia: "7c1365dc16e0421bca82d1b045973bbada8191297992744fa8311b9b271645fa" + sha256 arm64_sonoma: "328c1528f26638dd2ea942c0c2bbc4dfa7745c56cde1252b9638712003d317c0" + sha256 arm64_ventura: "085d109b54887985cd8b0a6fa0871992f7019b87ba95f81d1d9fbf11d2448f0c" + sha256 sonoma: "9a9270d14cd3a2aa28b06f20b7197277e3964e6c168df012ca803c1c913b8bf8" + sha256 ventura: "f274b57f7f40220103f294b245487cc149030390ff1e114082de554b08b10d5b" + sha256 arm64_linux: "450223987c11d8a126f9167278b987c77d113c94092857e8568b71d50e4aa268" + sha256 x86_64_linux: "05ec7e5950237bb3d0640c5dae2061b878e30da76306f5272bae0466c1bb2f21" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "capstone" + depends_on "libmagic" + depends_on "libzip" + depends_on "lz4" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "tree-sitter" + depends_on "xxhash" + depends_on "xz" # for lzma + depends_on "zstd" + + uses_from_macos "zlib" + + def install + args = %W[ + -Dpackager=#{tap.user} + -Dpackager_version=#{pkg_version} + -Duse_sys_capstone=enabled + -Duse_sys_libzip_openssl=true + -Duse_sys_libzip=enabled + -Duse_sys_libzstd=enabled + -Duse_sys_lz4=enabled + -Duse_sys_lzma=enabled + -Duse_sys_magic=enabled + -Duse_sys_openssl=enabled + -Duse_sys_pcre2=enabled + -Duse_sys_xxhash=enabled + -Duse_sys_zlib=enabled + -Duse_sys_tree_sitter=enabled + -Dextra_prefix=#{HOMEBREW_PREFIX} + -Denable_tests=false + -Denable_rz_test=false + --wrap-mode=nodownload + ] + + fallback = %w[rzgdb rzwinkd rzar rzqnx tree-sitter-c rzspp rizin-shell-parser rzheap] + fallback << "ptrace-wrap" unless OS.mac? + args << "--force-fallback-for=#{fallback.join(",")}" + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + (HOMEBREW_PREFIX/"lib/rizin/plugins").mkpath + end + + def caveats + <<~EOS + Plugins, extras and bindings will installed at: + #{HOMEBREW_PREFIX}/lib/rizin + EOS + end + + test do + assert_match "rizin #{version}", shell_output("#{bin}/rizin -v") + assert_match "2a00a0e3", shell_output("#{bin}/rz-asm -a arm -b 32 'mov r0, 42'") + assert_match "push rax", shell_output("#{bin}/rz-asm -a x86 -b 64 -d 0x50") + end +end diff --git a/Formula/r/rke.rb b/Formula/r/rke.rb new file mode 100644 index 0000000000000..bcb79daa10010 --- /dev/null +++ b/Formula/r/rke.rb @@ -0,0 +1,38 @@ +class Rke < Formula + desc "Rancher Kubernetes Engine, a Kubernetes installer that works everywhere" + homepage "https://rke.docs.rancher.com/" + url "https://github.com/rancher/rke/archive/refs/tags/v1.8.8.tar.gz" + sha256 "77f1f5533c2cf1cd4b51da59b8bbae4e95352c036dfadd0a79b6f33e0be48a3e" + license "Apache-2.0" + + # It's necessary to check releases instead of tags here (to avoid upstream + # tag issues) but we can't use the `GithubLatest` strategy because upstream + # creates releases for more than one minor version (i.e., the "latest" release + # isn't the newest version at times). + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f1f641e6b05ec34f534c4935fa3304964b7871285ff0b1fdda21182775bd362" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "003438f6e667eec6ddb5393fbe17e30d9427ef8b88afcf6ba717cc69390d1c2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc9ba16c19f28bcf784cba0247e2ee673fc56bc9129799e35553cf4b15a52c61" + sha256 cellar: :any_skip_relocation, sonoma: "69fed3bb06965645bdc13e5806cc872229f634916513d761e49371f5fe441d65" + sha256 cellar: :any_skip_relocation, arm64_linux: "3759ef887c34616b7e5de4eaae940b4f345837461ce3c4e1c74b4ef304edcf30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfa53216d5950e9fafee13e6d02de65e8532019ef48abdb67eae8cd337da2e65" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.VERSION=v#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + system bin/"rke", "config", "-e" + assert_path_exists testpath/"cluster.yml" + end +end diff --git a/Formula/r/rkflashtool.rb b/Formula/r/rkflashtool.rb new file mode 100644 index 0000000000000..27b85a04174a9 --- /dev/null +++ b/Formula/r/rkflashtool.rb @@ -0,0 +1,41 @@ +class Rkflashtool < Formula + desc "Tools for flashing Rockchip devices" + homepage "https://sourceforge.net/projects/rkflashtool/" + url "https://downloads.sourceforge.net/project/rkflashtool/rkflashtool-6.1/rkflashtool-6.1-src.tar.bz2" + sha256 "2bc0ec580caa790b0aee634388a9110a429baf4b93ff2c4fce3d9ab583f51339" + license "BSD-2-Clause" + head "https://git.code.sf.net/p/rkflashtool/Git.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f28fa9f142735da8b1dd19222e6ac5c696072e792a8e71fe9aeab969148fb5fd" + sha256 cellar: :any, arm64_sequoia: "5b977024f0938d2c9cf116821d05dfa00585f65d06b2158daadd6fdd99db991d" + sha256 cellar: :any, arm64_sonoma: "5ce2c505c683a80dc90ee03c57e100121f0cbec5e2805e0e85c74f916f1a5fbf" + sha256 cellar: :any, arm64_ventura: "5743c6c5935567e3988de6d16bc6f8cd80591ab5e0982f8594d97d48e63d8475" + sha256 cellar: :any, arm64_monterey: "82f0530f1f49db73cdba8463cd10c870a33cb3f527a0d4441557caf8e112b2d6" + sha256 cellar: :any, arm64_big_sur: "385d2324a9740b034fa99eabe5325cde073cf301dcfb343dee7cf44bda109cbd" + sha256 cellar: :any, sonoma: "08198a36dd0408c2bc10a4ddeb5913a3282e2eed1f3ca0e10019a3765652926a" + sha256 cellar: :any, ventura: "5d00a439fe6a9c9f4b09ed9612e5b4536c1497e5baf33c0b95c06279b734fa6f" + sha256 cellar: :any, monterey: "7a80ef4c1271eb9bec9209bde3c1a0292e08bbeed130d290024e0877e3b9df9f" + sha256 cellar: :any, big_sur: "f3e27586cacbbe32859c4e29b681913204e1a52bd5a5761697edc37d1cc2d88c" + sha256 cellar: :any, catalina: "19915af37cac5f04cea6d0aa71a533ce6fd2a9aa549820286736b526e4be80cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "740d373e5d0bb55ce6cda1a391bda5cc95f75f61537f91f5de2b24b7d09cc722" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c38a8b6e2f2f2b8dd7b437c07916c5624076f472392a2899fbb3c397c07bb4a3" + end + + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"input.file").write "ABCD" + system bin/"rkcrc", "input.file", "output.file" + result = shell_output("cat output.file") + result.force_encoding("UTF-8") if result.respond_to?(:force_encoding) + assert_equal "ABCD\264\366\a\t", result + end +end diff --git a/Formula/r/rkhunter.rb b/Formula/r/rkhunter.rb new file mode 100644 index 0000000000000..afb1dd71247c9 --- /dev/null +++ b/Formula/r/rkhunter.rb @@ -0,0 +1,33 @@ +class Rkhunter < Formula + desc "Rootkit hunter" + homepage "https://rkhunter.sourceforge.net/" + url "https://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz" + sha256 "f750aa3e22f839b637a073647510d7aa3adf7496e21f3c875b7a368c71d37487" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6b58dd966408841d1c6bb19fa135f3eec96744806fba465a04b294c28c906839" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5635d3ac60704bc062b8336a912daa80d97cf9fd8d847572c55d82b8e87bbd60" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b2a4538360218a1f44f63eb61a24e6b9ecc36dfc613dfb2c404f10f8cb75a7f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0352661692f5a34e6febf6822eb3e1eb212e5aefd2189ee403def6acf247a38a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1c3872b26c375898fbc61439a6605f42c59e1ad11a339e551d6788c29794cc88" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7d560c35e3fef71d00f5ea9ee54e3f175f39e0c3fabdd1e141cc247c2a886d91" + sha256 cellar: :any_skip_relocation, sonoma: "f0e854c86f509718bc7c3acc2da1d7228405179dbef528c449bd091ce104e189" + sha256 cellar: :any_skip_relocation, ventura: "3db88c3dd06a9a6b84773472428a17fb1b8133dd7fec11781a32b185a89ad65b" + sha256 cellar: :any_skip_relocation, monterey: "6e7b220d8e9f61934488d2858254db636b1dddbe96512ed01a1b3a81d03f4e3f" + sha256 cellar: :any_skip_relocation, big_sur: "398958bdafc37011a76efa6e6d2fefc8c34964eb6ba29a0f6823fb8c1058e9c5" + sha256 cellar: :any_skip_relocation, catalina: "e9bfbf9e122295e1fd4ac70dea7502856b3415e0eec187512f196d51a718ab92" + sha256 cellar: :any_skip_relocation, arm64_linux: "6484f6217389b50e66ad8f992e532cb19e9fd27330510d2303060c2f7de70bbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85138f7ce8fcb3790c94d0322d64315e3d683e50a6a690700b7600cd4ce1fda1" + end + + def install + system "./installer.sh", "--layout", "custom", prefix, "--install" + end + + test do + system bin/"rkhunter", "--version" + end +end diff --git a/Formula/r/rlog.rb b/Formula/r/rlog.rb new file mode 100644 index 0000000000000..8f97f2806c0a0 --- /dev/null +++ b/Formula/r/rlog.rb @@ -0,0 +1,92 @@ +class Rlog < Formula + desc "Flexible message logging facility for C++" + homepage "https://github.com/vgough/rlog" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rlog/rlog-1.4.tar.gz" + sha256 "a938eeedeb4d56f1343dc5561bc09ae70b24e8f70d07a6f8d4b6eed32e783f79" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "abe2bf8a021e632b0e828b667b5e2e09be2cb2bf5356b40adc7787248c16b12e" + sha256 cellar: :any, arm64_sequoia: "17aeadbbb0c7138389b80f0cecf0c59b6a329176eda02d38a9566502110f72f4" + sha256 cellar: :any, arm64_sonoma: "408100778814811a72a063dd53302248c2d291baa55534a3a58daf16a14a1ffe" + sha256 cellar: :any, arm64_ventura: "d33c09168d248f72b7c81e8a61f3d8f69a1d13127f8f75d7526a28220e5d7f4c" + sha256 cellar: :any, arm64_monterey: "cd251b465737a2c5d9cd4aaeff4a625d1c48d50778bc8c93ad4e683b04ca82c5" + sha256 cellar: :any, arm64_big_sur: "543009caf7c0dede6026949c6ccd5569183cabd78414542efcc3a43ae1a25cfa" + sha256 cellar: :any, sonoma: "d1e8d4a9e1765d6d916b4c5882bc88ef3eaeb277d5de3384a922c4d680003521" + sha256 cellar: :any, ventura: "d9647143281d40fc2b06eedacdea150af04bc014a9d0e9a912bbb45ad4b40179" + sha256 cellar: :any, monterey: "239d339429358a6e685e6793eee4c528008eeeb40731b4c6cfa44f2ca571adf4" + sha256 cellar: :any, big_sur: "4d6953945346cc4b3548510ebad0bd441246101be7c7a8c633b98c6e94c9fdaa" + sha256 cellar: :any, catalina: "42b1e5a687f78df9121a75bc0b1194a534f31b8476521592879ea5fe381d634f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bde76b56501c03e8394ffb8302a2e80523b25b64a664ab6155a49a71a7ef88c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a272cb9d709fffe4c798d278a49455a5a05a0e4c408e158609b168718b9c5e1b" + end + + patch :DATA + + def install + # Fix flat namespace usage + inreplace "configure", "${wl}-flat_namespace ${wl}-undefined ${wl}suppress", "${wl}-undefined ${wl}dynamic_lookup" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + int main(int argc, char **argv) + { + rlog::RLogInit(argc, argv); + rlog::StdioNode stdLog(STDOUT_FILENO); + stdLog.subscribeTo(rlog::GetGlobalChannel("")); + const char *name = "Dave"; + rDebug("num = %i", 299792458); + int ans = 6 * 9; + if (ans != 42) rWarning("ans = %i, expecting 42", ans); + rError("I'm sorry %s, I can't do that.", name); + } + CPP + + expected_outputs = [ + "(test.cpp:13) num = 299792458", + "(test.cpp:15) ans = 54, expecting 42", + "(test.cpp:16) I'm sorry Dave, I can't do that.", + ] + + system ENV.cxx, "-I#{include}", "-L#{lib}", "test.cpp", "-lrlog", "-o", "test" + output = shell_output("./test") + expected_outputs.each do |expected| + assert_match expected, output + end + end +end + +# This patch solves an OSX build issue, should not be necessary for the next release according to +# https://code.google.com/p/rlog/issues/detail?id=7 +__END__ +--- orig/rlog/common.h.in 2008-06-14 20:10:13.000000000 -0700 ++++ new/rlog/common.h.in 2009-05-18 16:05:04.000000000 -0700 +@@ -52,7 +52,12 @@ + + # define PRINTF(FMT,X) __attribute__ (( __format__ ( __printf__, FMT, X))) + # define HAVE_PRINTF_ATTR 1 ++ ++#ifdef __APPLE__ ++# define RLOG_SECTION __attribute__ (( section("__DATA, RLOG_DATA") )) ++#else + # define RLOG_SECTION __attribute__ (( section("RLOG_DATA") )) ++#endif + + #if __GNUC__ >= 3 + # define expect(foo, bar) __builtin_expect((foo),bar) diff --git a/Formula/r/rlwrap.rb b/Formula/r/rlwrap.rb new file mode 100644 index 0000000000000..ef34b3b78c292 --- /dev/null +++ b/Formula/r/rlwrap.rb @@ -0,0 +1,38 @@ +class Rlwrap < Formula + desc "Readline wrapper: adds readline support to tools that lack it" + homepage "https://github.com/hanslub42/rlwrap" + url "https://github.com/hanslub42/rlwrap/archive/refs/tags/v0.47.1.tar.gz" + sha256 "944bc0e4812e61b2b7c4cd17b1b37b41325deffa0b84192aff8c0eace1a5da4c" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/hanslub42/rlwrap.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "eb09e4aefabca75272dab10c2c5bec2328143eaf0f64079a521a07f96e6e9d9d" + sha256 arm64_sequoia: "4531f405efca8347511d5202d49ceb050a84a746b79d5ca8eb7ea1812b7c247e" + sha256 arm64_sonoma: "76f2e2a11cf4e3e808cceaa10de99b81080d8b01f73e3a138cefbe34d3bcfee3" + sha256 sonoma: "07017b0f2997ee3366f699446870544d6cbb0e5480761ab0c5952f88ffd16c80" + sha256 arm64_linux: "bbad3c2af39b1a2bef447a61dd934f3d1924f9bc361cebbac97ef866695b38b7" + sha256 x86_64_linux: "eb12a645ba61447c3ab939a989805565007fcfbb2975e04818b3a59c373dbe0d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libptytty" + depends_on "readline" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"rlwrap", "--version" + end +end diff --git a/Formula/r/rm-improved.rb b/Formula/r/rm-improved.rb new file mode 100644 index 0000000000000..ad0007844206d --- /dev/null +++ b/Formula/r/rm-improved.rb @@ -0,0 +1,56 @@ +class RmImproved < Formula + desc "Command-line deletion tool focused on safety, ergonomics, and performance" + homepage "https://github.com/nivekuil/rip" + url "https://github.com/nivekuil/rip/archive/refs/tags/0.13.1.tar.gz" + sha256 "73acdc72386242dced117afae43429b6870aa176e8cc81e11350e0aaa95e6421" + license "GPL-3.0-or-later" + head "https://github.com/nivekuil/rip.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "359402f5080c82f120e5acc163d030297d937245584604c5f0a8b4a7c55b6f33" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45fb60809e7c4e6c71f683aa81087c2985f92347819adbadad6d736a65efd62c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6083f4ee2469cd0f33a01815804822cf30f3b0184e62b4c3d256040aec36b51d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2294e77a9e860f573daf64e25bc53b6e2b32b6a565e0c727aa26321bb883c924" + sha256 cellar: :any_skip_relocation, arm64_monterey: "afd393bdf6a0c370043d56d35787e4cc3f1d022bf4108a9f0684ba170586bebb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cb348c7717ce6f299ca8b051eb425f9f2f07d9b436b81403e6098d61c3cb1549" + sha256 cellar: :any_skip_relocation, sonoma: "2ae91f3e94a1df8dce11ff17712d83c086cac214944586e60cf072e4c2162400" + sha256 cellar: :any_skip_relocation, ventura: "072828a5ca46aaf0a0d8bc69ad769f9b9c6b89e4bfcd2a8ef83e0f48577f3847" + sha256 cellar: :any_skip_relocation, monterey: "a7f0bf8bd18d8408cf671da609422a5a8fa683f876ab641082b07933f7770756" + sha256 cellar: :any_skip_relocation, big_sur: "3a80043be18665c37508e3f028ceeb0ec68cfba556ce5461d4f6575ec6b50076" + sha256 cellar: :any_skip_relocation, catalina: "91894b6d16374218d42457f7aa30a9a95572206e71328b52eaed159a51df0d15" + sha256 cellar: :any_skip_relocation, arm64_linux: "e56ee338ef4aa487f6faccb3d08025df5ed64f60e25fc0137aeb2eb1d4b852cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "944efe35afd78abf0184654d4fbcc84b081d38c704021b5e964292016c917593" + end + + depends_on "rust" => :build + + conflicts_with "rip2", because: "both install `rip` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + trash = testpath/"trash" + ENV["GRAVEYARD"] = trash + + source_file = testpath/"testfile" + deleted_file = Pathname.new File.join(trash, source_file) + touch source_file + + system bin/"rip", source_file + assert_match deleted_file.to_s, shell_output("#{bin}/rip -s") + assert_path_exists deleted_file + + system bin/"rip", "-u", deleted_file + assert_path_exists source_file + end +end diff --git a/Formula/r/rmate.rb b/Formula/r/rmate.rb new file mode 100644 index 0000000000000..4dfca243a4b27 --- /dev/null +++ b/Formula/r/rmate.rb @@ -0,0 +1,25 @@ +class Rmate < Formula + desc "Edit files from an SSH session in TextMate" + homepage "https://github.com/textmate/rmate" + url "https://github.com/textmate/rmate/archive/refs/tags/v1.5.8.tar.gz" + sha256 "40be07ae251bfa47b408eb56395dd2385d8e9ea220a19efd5145593cd8cbd89c" + license "MIT" + head "https://github.com/textmate/rmate.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fb6dd771050399730a0a7592fe0a135705a294b10fd02263bd6cfcbc284cee2a" + end + + uses_from_macos "ruby" + + def install + bin.install "bin/rmate" + end + + test do + system bin/"rmate", "--version" + end +end diff --git a/Formula/r/rmcast.rb b/Formula/r/rmcast.rb new file mode 100644 index 0000000000000..07e32c8994a55 --- /dev/null +++ b/Formula/r/rmcast.rb @@ -0,0 +1,41 @@ +class Rmcast < Formula + desc "IP Multicast library" + homepage "https://web.archive.org/web/20250722003825/https://www.land.ufrj.br/tools/rmcast/rmcast.html" + url "https://web.archive.org/web/20250621130503/https://www.land.ufrj.br/tools/rmcast/download/rmcast-2.0.0.tar.gz" + sha256 "79ccbdbe4a299fd122521574eaf9b3e2d524dd5e074d9bc3eb521f1d934a59b1" + license "QPL-1.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "de8e1fc85f602d20604c3e0a44e08c3dfc3e424f6faee2e65a0fed714646da3e" + sha256 cellar: :any, arm64_sequoia: "2550872c1731058ae467f82b6258659ace4cc86e091fa54f827daa61cd5677fc" + sha256 cellar: :any, arm64_sonoma: "d82904f97cda3eb5874bfca8ac452568a04efeadd88524fc2b1e03cb594ecca9" + sha256 cellar: :any, arm64_ventura: "07939c86d1018aeb45c483ea2e96514f24cc92fcca30f5ffe3ebdaa8f1a53b9d" + sha256 cellar: :any, arm64_monterey: "bb3d3a129e3ac532f960335c23adb657e333751efee7243577c772f92abf31a6" + sha256 cellar: :any, arm64_big_sur: "7edab23a8770a245b0f06197b2d46c4777b8fdac0f39842ce619c56d74f1eef4" + sha256 cellar: :any, sonoma: "ba0051628bcd72a98bd0c0a4f9b055d106f5b8eba226b9b0c279013cfae729c6" + sha256 cellar: :any, ventura: "cecc9ec050585780015df098cbea1522dacdca625a2e9ae621b47bb975e5f559" + sha256 cellar: :any, monterey: "5f88f10530ed8ad07b13c512fba7310bee880f8bd138eac08d7fd37bb3be35e4" + sha256 cellar: :any, big_sur: "b2cc007eec98b5e422a7948e9e680f3a0d7c622eb4703f9b2bae6c867635107f" + sha256 cellar: :any, catalina: "e2054828627f6afdd376cfd276536c770b8dd77b082a44c5b63212e8dff84351" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9f0ff68c1fcb1dabf6fad88d8987d71bea9d26634fdb94b2611149af01fa967" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecbaa8a68d7cb766021fb1f1bff97c911a5e16720508cf71648c6e96a2b93c4f" + end + + # 503 error for https://www.land.ufrj.br + deprecate! date: "2025-09-15", because: :repo_removed + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + # Run autoreconf to regenerate the configure script and update outdated macros. + # This ensures that the build system is properly configured on both macOS + # (avoiding issues like flat namespace conflicts) and Linux (where outdated + # config scripts may fail to detect the correct build type). + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/r/rmlint.rb b/Formula/r/rmlint.rb new file mode 100644 index 0000000000000..e68e696368cda --- /dev/null +++ b/Formula/r/rmlint.rb @@ -0,0 +1,56 @@ +class Rmlint < Formula + desc "Extremely fast tool to remove dupes and other lint from your filesystem" + homepage "https://rmlint.readthedocs.io/en/master/" + url "https://github.com/sahib/rmlint/archive/refs/tags/v2.10.3.tar.gz" + sha256 "8ffdbd5d09d15c8717ae55497e90d6fa46f085b45ac1056f2727076da180c33e" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0d90cd13c8a94f6fc34bbdbf82ae92ce390a501cb7719eed1c3e5ba7e5a17311" + sha256 cellar: :any, arm64_sequoia: "271ea48a158868357536e3dfff58e0707e33f2ce3a14a8040b25ac08b6434474" + sha256 cellar: :any, arm64_sonoma: "b2d780f8713b5f8e9979f38f4fa9cfa831cbd65b2e1a206d8e760606335b2e78" + sha256 cellar: :any, arm64_ventura: "ade2340e57e28b4693f73a4eb919f17bf1a18d39ab268f0ae51d984bf0cfeced" + sha256 cellar: :any, sonoma: "bfc2a7bbbd018d9fa63b6dc5fcdc312e6811bd713a465da66b9a81f1ae03f72e" + sha256 cellar: :any, ventura: "c6a8d12e5c6c75922cb42ebcacfc59b9d659328cd05b566a9ea3b262aed5b79b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7bbe7f7dd26aa3ca9a053570ab919cf162b723ae2f92fd1e90e98e22a54afdd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e9369f955ae09325e3c66a511024ea6dd65cb6c5bcca1cba03b7ad3fecc8cfb" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "scons" => :build + depends_on "sphinx-doc" => :build + depends_on "glib" + depends_on "json-glib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "elfutils" + depends_on "util-linux" + end + + def install + if OS.linux? + ENV.append_to_cflags "-I#{Formula["util-linux"].opt_include}" + ENV.append_to_cflags "-I#{Formula["elfutils"].opt_include}" + ENV.append "LDFLAGS", "-Wl,-rpath=#{Formula["elfutils"].opt_lib}" + ENV.append "LDFLAGS", "-Wl,-rpath=#{Formula["glib"].opt_lib}" + ENV.append "LDFLAGS", "-Wl,-rpath=#{Formula["json-glib"].opt_lib}" + ENV.append "LDFLAGS", "-Wl,-rpath=#{Formula["util-linux"].opt_lib}" + end + + system "scons", "config" + system "scons" + bin.install "rmlint" + man1.install "docs/_build/man/rmlint.1" + end + + test do + (testpath/"1.txt").write("1") + (testpath/"2.txt").write("1") + assert_match "# Duplicate(s):", shell_output(bin/"rmlint") + end +end diff --git a/Formula/r/rmpc.rb b/Formula/r/rmpc.rb new file mode 100644 index 0000000000000..b38b1eafecf75 --- /dev/null +++ b/Formula/r/rmpc.rb @@ -0,0 +1,28 @@ +class Rmpc < Formula + desc "Terminal based Media Player Client with album art support" + homepage "https://mierak.github.io/rmpc/" + url "https://github.com/mierak/rmpc/archive/refs/tags/v0.9.0.tar.gz" + sha256 "c0dca5f4be1222591a69b82e77d6fe42df259e6130ea7ea7dd6372515b5f4357" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dff50b373be90373b9e3b18d0ec63c0be8a58b0e813ad685b97e664d56115d1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "628e740ddb130cc457f3aa22c222c6a86fb7bdcea61b54e5d1b93e50d03f0c4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f309a228aa4affad8f4581942f7201b45000891db2a6411e67e8c5bab93f60fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44b890cbdb18fa990bd3ad3ec2eb2250f7600b9dcab0c1870c96023e77a25acf" + sha256 cellar: :any_skip_relocation, sonoma: "b96a2bbf4cc69d44711769f593f98339e71115b406f31482724b24d8fb2c3c20" + sha256 cellar: :any_skip_relocation, ventura: "3545dd59252302959d7f43ca65fdc00b059691172680f27914d99ede9c77d821" + sha256 cellar: :any_skip_relocation, arm64_linux: "f020ec622900283a52792838aa3429d6c3cc83c857b0a99e9da04e041873ac32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b0f1327ee81b5074ecb363855443f745260cccb09c1fb2e6b1dfa18d4c95f48" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match(/#!\[enable/, shell_output("#{bin}/rmpc config")) + end +end diff --git a/Formula/r/rmtrash.rb b/Formula/r/rmtrash.rb new file mode 100644 index 0000000000000..bb9b6a06ba381 --- /dev/null +++ b/Formula/r/rmtrash.rb @@ -0,0 +1,33 @@ +class Rmtrash < Formula + desc "Move files and directories to the trash" + homepage "https://github.com/TBXark/rmtrash" + url "https://github.com/TBXark/rmtrash/archive/refs/tags/0.6.8.tar.gz" + sha256 "9055a538b7e282aebd61f74241d5e2009455b1ae7e7029eba87bc41bbd684d4a" + license "MIT" + head "https://github.com/TBXark/rmtrash.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1bfc33733f840b1f82a47a4da7c49ba55dfb8b1baed8c4df96d2a1d6fb7f217f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a30a53dd25ff977ad17267908d9d93d95f246e2d947aba78d181b5670a6ebcb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d28190fb40efa3936483dd2f550e15911e86d1d533278f2bcdbb9b85aa3741f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "485892442e561173e63328f83f8f1c24d0623a0584eadf13ac7d279518820678" + sha256 cellar: :any_skip_relocation, sonoma: "2dab2f231c1d82859b8c2e43fd3e95a2e214c21020a67a58e91fd0805c10e52b" + sha256 cellar: :any_skip_relocation, ventura: "ea999346b7c78ea4678cc4ecf3712d25a3780a8686137d00faa34cc0b1565abb" + end + + depends_on xcode: ["12.0", :build] + depends_on :macos + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/rmtrash" + man1.install "Manual/rmtrash.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rmtrash --version") + system bin/"rmtrash", "--force", "non_existent_file" + end +end diff --git a/Formula/r/rmw.rb b/Formula/r/rmw.rb new file mode 100644 index 0000000000000..37dff3b56d728 --- /dev/null +++ b/Formula/r/rmw.rb @@ -0,0 +1,50 @@ +class Rmw < Formula + desc "Trashcan/recycle bin utility for the command-line" + homepage "https://theimpossibleastronaut.github.io/rmw-website/" + url "https://github.com/theimpossibleastronaut/rmw/releases/download/v0.9.3/rmw-0.9.3.tar.xz" + sha256 "a7215af12694d50282e4cfb9b9062fb7806bde8770d61a2a0cd8260e28db2749" + license "GPL-3.0-or-later" + head "https://github.com/theimpossibleastronaut/rmw.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "dc88c29bcda2b1d7440105704b98021d510f22a00c16f398187448e9cbeaec26" + sha256 arm64_sequoia: "8d58a58079f53b8aaff4b93444acdf5b3d2684544797cc752c96b83da178c4d9" + sha256 arm64_sonoma: "8239ccf6bb375fb50584507ab082b82ae08886dba6844ef1e62d3c559145a279" + sha256 arm64_ventura: "fb4a64fbe3d059aa12d2e70613c6425c31defa93b84cfa03234ac9216c091e3f" + sha256 sonoma: "f039fa85ec2de59391e8ba0b15a161f8dbb3ce4bd1c320b481c467917ff754b7" + sha256 ventura: "0b8bf09348b50d5781c5fdd00ad6a1aaa764d2a42e3a75899948244489a55f57" + sha256 arm64_linux: "3a3d183199b379a095cf196becd893c7c9e701172bc7964d3a525238f40c015a" + sha256 x86_64_linux: "90583fca0c8ce43359664635076f3251a3ceaac0d382c9c1879a74156c8f97c0" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "canfigger" + depends_on "gettext" + # Slightly buggy with system ncurses + # https://github.com/theimpossibleastronaut/rmw/issues/205 + depends_on "ncurses" + + def install + system "meson", "setup", "build", "-Db_sanitize=none", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + file = testpath/"foo" + touch file + assert_match "removed", shell_output("#{bin}/rmw #{file}") + refute_path_exists file + system bin/"rmw", "-u" + assert_path_exists file + assert_match "/.local/share/Waste", shell_output("#{bin}/rmw -l") + assert_match "purging is disabled", shell_output("#{bin}/rmw -vvg") + end +end diff --git a/Formula/r/rna-star.rb b/Formula/r/rna-star.rb new file mode 100644 index 0000000000000..e180a449d1fac --- /dev/null +++ b/Formula/r/rna-star.rb @@ -0,0 +1,47 @@ +class RnaStar < Formula + desc "RNA-seq aligner" + homepage "https://github.com/alexdobin/STAR" + url "https://github.com/alexdobin/STAR/archive/refs/tags/2.7.11b.tar.gz" + version "2.7.11b" + sha256 "3f65305e4112bd154c7e22b333dcdaafc681f4a895048fa30fa7ae56cac408e7" + license all_of: ["MIT", "BSD-2-Clause"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ce54c8718ce2f01777c22e6f7b6295570c7e4785716bfebb04a9551eb453bdb2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df53db303004a937634a3eaa227119f92eac00286bc80df0558dd1db1e5bb314" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c12dcd41638c9578c39ee0ecb0ec33996ee390690eb95d68b49f56f0f129c608" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eef8d5c492f1e608a796350bd6a1fd0acfd46487c18ce901aeaf7aae8d570607" + sha256 cellar: :any_skip_relocation, sonoma: "b53c13aeff5e16110831413444b3bea8e6bdecbf068950a7431d8e8744f8583b" + sha256 cellar: :any_skip_relocation, ventura: "bf2216ad5cce311a52543ea4e1921a203ca6c1f03ed99057f977d804ed8326c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "13e7fc7429c847374ed68269193f64d78c78359d1fd97bab32ab47d1f3f0719c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8766e41ed4f092c6fc9715603a34309012200a8db2cb2cd0bdea1c40534f64d6" + end + + uses_from_macos "vim" => :build # needed for xxd + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + def install + args = ["CXXFLAGS_SIMD="] + args << "CXXFLAGSextra=-D'COMPILE_FOR_MAC'" if OS.mac? + + cd "source" do + system "make", "STAR", *args + bin.install "STAR" + end + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + out = shell_output("#{bin}/STAR --runMode genomeGenerate --genomeFastaFiles test.fasta --genomeSAindexNbases 2") + assert_match "finished successfully", out + end +end diff --git a/Formula/r/rnp.rb b/Formula/r/rnp.rb new file mode 100644 index 0000000000000..1619b606ab9ec --- /dev/null +++ b/Formula/r/rnp.rb @@ -0,0 +1,48 @@ +class Rnp < Formula + desc "High performance C++ OpenPGP library used by Mozilla Thunderbird" + homepage "https://github.com/rnpgp/rnp" + url "https://github.com/rnpgp/rnp/releases/download/v0.18.0/rnp-v0.18.0.tar.gz" + sha256 "a90e3ac5b185a149665147f9284c0201a78431e81924883899244522fd3f9240" + license all_of: ["MIT", "BSD-2-Clause", "BSD-3-Clause"] + revision 1 + head "https://github.com/rnpgp/rnp.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5bc131fa488e241c842a559ef99f1af00a02860c0c50cf578aa6ae63a9e39c62" + sha256 cellar: :any, arm64_sequoia: "c0863e62cfd19c4ed109c9332159b17f7ae23217045b501d61d6ccf76f6992d0" + sha256 cellar: :any, arm64_sonoma: "50710472292623c87a9b3be1ff88f51c2b95f466854461e3a6b297eb1bc1ce27" + sha256 cellar: :any, arm64_ventura: "d63ed87e2cd63d7bb147a563508a3e7538ef9bc9a0257a500b133d67deef2aea" + sha256 cellar: :any, sonoma: "af41bf6b0e21af8d9c40258447518aa2f8aa1ab6c7cd338961441c2c605b6cb3" + sha256 cellar: :any, ventura: "531575b35f6da98ff16ebf4482c3f5e6ebcedd7a81a1df7881db49c85da2e204" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e4c0c648c3e7a1c427fef882e2458f6615e19c64f796886d7dacd29194550be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7eac4eb4fd83b477a733f074a0e7b1ad605a67d0957e8d186e70fbb296d2bd3" + end + depends_on "cmake" => :build + depends_on "botan" + depends_on "json-c" + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"message.txt").write "hello" + encr = testpath/"enc.rnp" + decr = testpath/"dec.rnp" + + system bin/"rnpkeys", "--generate-key", "--password=PASSWORD" + system bin/"rnp", "-c", "--password", "DUMMY", "--output", encr, "message.txt" + system bin/"rnp", "--decrypt", "--password", "DUMMY", "--output", decr, encr + + assert_equal "hello", decr.read + end +end diff --git a/Formula/r/rnr.rb b/Formula/r/rnr.rb new file mode 100644 index 0000000000000..773d8e633ac25 --- /dev/null +++ b/Formula/r/rnr.rb @@ -0,0 +1,42 @@ +class Rnr < Formula + desc "Command-line tool to batch rename files and directories" + homepage "https://github.com/ismaelgv/rnr" + url "https://github.com/ismaelgv/rnr/archive/refs/tags/v0.5.0.tar.gz" + sha256 "b8edab04e1129b8caeb0c8634dd3bbc9986528c5ec479f7e7f072dbe7bf9ba20" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0e7f49c4f4a728a511cbd504a7aab0740aa80ce9f28572d402788659ad37dbc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8fb09c89cda8bafe101e6c2de4d9afd0efd149b21bd37ce9b00653a7fbef1d21" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fdfb6fee01547e1e695afbcac85ec3cd59655d270615aae6269e84bab4697b71" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d7170e9081556544c8b27af2d92e01ad44cbf4efb5e3cf03f9577a50a7e96a92" + sha256 cellar: :any_skip_relocation, sonoma: "353575eefa7409b139607ee46d2d10149759a221687295c6fde7cd13e3c29c91" + sha256 cellar: :any_skip_relocation, ventura: "aeea1bdde84bb59dffaedfc516b70ed439cb66b8ee280c3fe4f269bdc4505577" + sha256 cellar: :any_skip_relocation, arm64_linux: "1da83c3ac01b10ffd1b878c65157b6a7aa34f4a63c5a08d945d695c98a9eac27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c855c741dbb39266333bb2ceac02eaf1cfab99be891bfa88cebe0bbed52c6df" + end + + depends_on "rust" => :build + + def install + ENV["SHELL_COMPLETIONS_DIR"] = buildpath + system "cargo", "install", *std_cargo_args + + deploy_dir = Dir["target/release/build/rnr-*/out"].first + zsh_completion.install "#{deploy_dir}/_rnr" => "_rnr" + bash_completion.install "#{deploy_dir}/rnr.bash" => "rnr" + fish_completion.install "#{deploy_dir}/rnr.fish" + end + + test do + touch "foo.doc" + mkdir "one" + touch "one/foo.doc" + + system bin/"rnr", "regex", "-f", "doc", "txt", "foo.doc", "one/foo.doc" + refute_path_exists testpath/"foo.doc" + assert_path_exists testpath/"foo.txt" + + assert_match version.to_s, shell_output("#{bin}/rnr --version") + end +end diff --git a/Formula/r/rnv.rb b/Formula/r/rnv.rb new file mode 100644 index 0000000000000..3a0a9c6c26e1d --- /dev/null +++ b/Formula/r/rnv.rb @@ -0,0 +1,75 @@ +class Rnv < Formula + desc "Implementation of Relax NG Compact Syntax validator" + homepage "https://sourceforge.net/projects/rnv/" + # TODO: If new release/rebottle, then remove `, since: :tahoe` from dependency + url "https://downloads.sourceforge.net/project/rnv/Sources/1.7.11/rnv-1.7.11.tar.bz2" + sha256 "b2a1578773edd29ef7a828b3a392bbea61b4ca8013ce4efc3b5fbc18662c162e" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "294d562f37f9fcbdfebca1f0ac3a304e5c749022dd1287a35b847b2223ad9a07" + sha256 cellar: :any, arm64_sequoia: "c2d6586422e5ac938d5f27b00ba89881fb64e07b84250b44ac5905bd7189bd92" + sha256 cellar: :any, arm64_sonoma: "150d0eecdd925b7dd54064578d8e204e0cfbb1575ea100ba13168e2b4e22f4eb" + sha256 cellar: :any, arm64_ventura: "86e6bfd85e0678347eaace39bb3ad203e08f8006c84939fa9a41e693ee6c1326" + sha256 cellar: :any, arm64_monterey: "bf6a467df397afc6d6ffe8e54dabb5f41eb47f71b75fba32e19e6b6d0e297029" + sha256 cellar: :any, arm64_big_sur: "8901e5d1b3915babeec29f4485afa741d41b2b48946515c1d871f525512ae1b6" + sha256 cellar: :any, sonoma: "3ccd0c89d06e4b941388b087171a7fda820d4bab2243a173ff4854bf161eebb8" + sha256 cellar: :any, ventura: "6648abdfb9856bb6aadfe9f24e54ba9dd64ee636bbf817b19e5386014c1336a6" + sha256 cellar: :any, monterey: "6e53766114e84c2d465873f78f4d8e9989186297140dae5966927b966d821d8e" + sha256 cellar: :any, big_sur: "c262efcf45b880c131f5e466d1b672ce5120dff6302b9b7504f6c1e1ee87cb22" + sha256 cellar: :any, catalina: "9a780a7b9ed3b264a7d0471aba7aac503b60640af76156028ecf118a0c35665e" + sha256 cellar: :any_skip_relocation, arm64_linux: "607237d06383c7a8da2bfa731d52f960d9a9a35ccd465dfee6fcddc485e42d92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3368e22e32650a6594df96320a449717d447a25d69a8485c907f1e0d10a1c49d" + end + + uses_from_macos "expat", since: :tahoe # to preserve old bottles + + conflicts_with "arx-libertatis", because: "both install `arx` binaries" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.rnc").write <<~RNC + namespace core = "http://www.bbc.co.uk/ontologies/coreconcepts/" + start = response + response = element response { results } + results = element results { thing* } + + thing = element thing { + attribute id { xsd:string } & + element core:preferredLabel { xsd:string } & + element core:label { xsd:string & attribute xml:lang { xsd:language }}* & + element core:disambiguationHint { xsd:string }? & + element core:slug { xsd:string }? + } + RNC + (testpath/"test.xml").write <<~XML + + + + + Technology + Technology + Tecnología + ٹیکنالوجی + News about computers, the internet, electronics etc. + + + Science + Science + Ciencia + سائنس + Systematic enterprise + + + + XML + + system bin/"rnv", "test.rnc", "test.xml" + end +end diff --git a/Formula/r/roadrunner.rb b/Formula/r/roadrunner.rb new file mode 100644 index 0000000000000..9bdde37df6899 --- /dev/null +++ b/Formula/r/roadrunner.rb @@ -0,0 +1,45 @@ +class Roadrunner < Formula + desc "High-performance PHP application server, load-balancer and process manager" + homepage "https://docs.roadrunner.dev/docs" + url "https://github.com/roadrunner-server/roadrunner/archive/refs/tags/v2025.1.4.tar.gz" + sha256 "02e9585c6bc5557440ca92ba1fcd7910660dcbffc76d0c8f13e75497ac4134a1" + license "MIT" + head "https://github.com/roadrunner-server/roadrunner.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "183ae2a8b57c751d44c1a8c058f0a9d796e6c054657416472c1c7c06694520ae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5936e8b972a6b37100ecf72da3937eba7fa050791b1a8db3e6dbfa427f9d2270" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e410178ecc56d69b8a33146c49810a2cad8b9527ba504849dedd3f7033e72f3" + sha256 cellar: :any_skip_relocation, sonoma: "9e6f496d4752d3f91fce14d547526bc63a787bc42e309e5d2fdbadec5393ef0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a27016fb1a24e063426eef504e79fa9c96ab0e60f67386242e57536b0da55f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c021a1bc77b1b25f5ebfe1d38f0fe8819e49c79c52dbc930c338cf19ecccdf6d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/roadrunner-server/roadrunner/v#{version.major}/internal/meta.version=#{version} + -X github.com/roadrunner-server/roadrunner/v#{version.major}/internal/meta.buildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, tags: "aws", output: bin/"rr"), "./cmd/rr" + + generate_completions_from_executable(bin/"rr", "completion") + end + + test do + port = free_port + (testpath/".rr.yaml").write <<~YAML + # RR configuration version + version: '3' + rpc: + listen: tcp://127.0.0.1:#{port} + YAML + + output = shell_output("#{bin}/rr jobs list 2>&1", 1) + assert_match "connect: connection refused", output + + assert_match version.to_s, shell_output("#{bin}/rr --version") + end +end diff --git a/Formula/r/roapi.rb b/Formula/r/roapi.rb new file mode 100644 index 0000000000000..0c3e8f1746e37 --- /dev/null +++ b/Formula/r/roapi.rb @@ -0,0 +1,60 @@ +class Roapi < Formula + desc "Full-fledged APIs for static datasets without writing a single line of code" + homepage "https://roapi.github.io/docs" + url "https://github.com/roapi/roapi/archive/refs/tags/roapi-v0.12.6.tar.gz" + sha256 "15b4f7c7b16b1fa87a487569d42e76355acbce9ecdaaa34bf1203326d77e7b57" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6116ecb02c112d2f990024d034ba242894e9e4a023f6756f883e0ec58b3408e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3bf66401f133a7d2e9234280571eed8cf06b9f1b98802762b5995b456414077" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1d1d6423d420c65fe3f2b414fdd0c33a67226d5afae78c5ddebf6e4dea35931" + sha256 cellar: :any_skip_relocation, sonoma: "1f2e0e0df5b406870033b3284ad136e6566c4f1fefb32c8d7c36f75c42f3e931" + sha256 cellar: :any_skip_relocation, arm64_linux: "528ea8f1d1cb5818ac4259bddd081f9e03069e78cb254f8f74c3de15f0720eb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8b39ad8324ea2d41fa80ff81a6c623453ab504752e02c915eed48d11b212616" + end + + depends_on "rust" => :build + + # Fix to error: hiding a lifetime that's elided elsewhere is confusing + # Should remove on next release + patch do + url "https://github.com/roapi/roapi/commit/f01f6b4d9e08638052afbde907316052bb241856.patch?full_index=1" + sha256 "ad02d21a2327d18b0d60b59a56c8d2019b76627be793ed3ab330be95a4e1b79b" + end + patch do + url "https://github.com/roapi/roapi/commit/162dbfe5ad1b6815691b33fc9cc096e37773d767.patch?full_index=1" + sha256 "00786352042683d2c7951d41a72fe69bd67f04bab1420016f758f0ddae8bb88b" + end + + def install + # skip default features like snmalloc which errs on ubuntu 16.04 + system "cargo", "install", "--no-default-features", + "--features", "rustls", + *std_cargo_args(path: "roapi") + end + + test do + # test that versioning works + assert_equal "roapi #{version}", shell_output("#{bin}/roapi -V").strip + + # test CSV reading + JSON response + port = free_port + (testpath/"data.csv").write "name,age\nsam,27\n" + expected_output = '[{"name":"sam"}]' + + begin + pid = fork do + exec bin/"roapi", "-a", "localhost:#{port}", "-t", "#{testpath}/data.csv" + end + query = "SELECT name from data" + header = "ACCEPT: application/json" + url = "localhost:#{port}/api/sql" + assert_match expected_output, shell_output("curl -s -X POST -H '#{header}' -d '#{query}' #{url}") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/r/robin-map.rb b/Formula/r/robin-map.rb new file mode 100644 index 0000000000000..d078e9168299d --- /dev/null +++ b/Formula/r/robin-map.rb @@ -0,0 +1,58 @@ +class RobinMap < Formula + desc "C++ implementation of a fast hash map and hash set" + homepage "https://github.com/Tessil/robin-map" + url "https://github.com/Tessil/robin-map/archive/refs/tags/v1.4.1.tar.gz" + sha256 "0e3f53a377fdcdc5f9fed7a4c0d4f99e82bbb64175233bd13427fef9a771f4a1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "672e92ee26dbed640ed6617e5c386f91753e9b9b7a3856fe16aa7f3798435df0" + end + + depends_on "cmake" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.12) + project(robinmap_test) + + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED True) + + find_package(tsl-robin-map REQUIRED) + + add_executable(robinmap_test main.cpp) + + target_link_libraries(robinmap_test PRIVATE tsl::robin_map) + CMAKE + (testpath/"main.cpp").write <<~CPP + #include + #include + + int main() { + tsl::robin_map map; + map[1] = "one"; + map[2] = "two"; + + for(const auto& pair : map) { + std::cout << pair.first << ": " << pair.second << std::endl; + } + + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build", "--target", "robinmap_test" + assert_match <<~EOS, shell_output("build/robinmap_test") + 1: one + 2: two + EOS + end +end diff --git a/Formula/r/roblox-ts.rb b/Formula/r/roblox-ts.rb new file mode 100644 index 0000000000000..25ad52d733bcd --- /dev/null +++ b/Formula/r/roblox-ts.rb @@ -0,0 +1,25 @@ +class RobloxTs < Formula + desc "TypeScript-to-Luau Compiler for Roblox" + homepage "https://roblox-ts.com/" + url "https://registry.npmjs.org/roblox-ts/-/roblox-ts-3.0.0.tgz" + sha256 "94e7ee8db40d0fab605601312838ca8d6d72242e78a8f01e02467f53c4232757" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6d98816e699214c5748777941e369d721923661bf31c8ba67e71050aebda82cb" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/rbxtsc 2>&1", 1) + assert_match "Unable to find tsconfig.json", output + + assert_match version.to_s, shell_output("#{bin}/rbxtsc --version") + end +end diff --git a/Formula/r/robodoc.rb b/Formula/r/robodoc.rb new file mode 100644 index 0000000000000..b74d0e2cbdc4d --- /dev/null +++ b/Formula/r/robodoc.rb @@ -0,0 +1,53 @@ +class Robodoc < Formula + desc "Source code documentation tool" + homepage "https://rfsber.home.xs4all.nl/Robo/index.html" + url "https://rfsber.home.xs4all.nl/Robo/archives/robodoc-4.99.44.tar.bz2" + sha256 "3721c3be9668a1503454618ed807ae0fba5068b15bc0ea63846787d7e9e78c0f" + license "GPL-3.0-or-later" + + livecheck do + url "https://rfsber.home.xs4all.nl/Robo/archives/" + regex(/href=.*?robodoc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "66e865a5ed9bcff4857a56a4e3377c3f7d08150ebd477d3ea585c2607f3f159d" + sha256 arm64_sequoia: "20487c94420045784329d4f876f1292f4ddf54e015153bda4999ef5365b0e770" + sha256 arm64_sonoma: "becedbbed4480801e9f68683d8b4d360699e4538b435a6f2da766b6142d02a31" + sha256 arm64_ventura: "daac2544b28bf80b15e7e55dc680058443e3c34b8c0405e3e8bc14b2bc1da871" + sha256 arm64_monterey: "2b8577eec80c48eab7323c77dadb33617b8fde3ac834abbd8df2923cd4bc7748" + sha256 sonoma: "be14e9b85a7065d98b327d0b20d8515f7dcf05a6a1d6fed73a56443e669cbd8d" + sha256 ventura: "0043d16b63613205e223c9fe4128261d01204d961fd50a1b0945d69ccc763014" + sha256 monterey: "4b153cb1a62f10633593b400965dc3bec1350c4aeda23c2f0f6174dc8c3ff2da" + sha256 arm64_linux: "6108c0143856a92b0385d2d5281e9117d3a8673e32726762dd87434fe2d66500" + sha256 x86_64_linux: "960614e0d6ecfe4051cfe544814b4d4008222e2817a0d3146191a5ec7602d570" + end + + head do + url "https://github.com/gumpu/ROBODoc.git", branch: "release" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # Fixes https://github.com/gumpu/ROBODoc/issues/22 + patch do + url "https://github.com/lutzmad/ROBODoc/commit/0f8b35c42523810415bec70bb2200d2ecb41c82f.patch?full_index=1" + sha256 "5fa0e63deaf9eb0eb82e53047a684159d572c116b96fcf4aa61777b663eb156d" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + cp_r Dir["#{doc}/Examples/PerlExample/*"], testpath + system bin/"robodoc" + end +end diff --git a/Formula/r/robot-framework.rb b/Formula/r/robot-framework.rb new file mode 100644 index 0000000000000..c7ec81b7fe5a1 --- /dev/null +++ b/Formula/r/robot-framework.rb @@ -0,0 +1,180 @@ +class RobotFramework < Formula + include Language::Python::Virtualenv + + desc "Open source test framework for acceptance testing" + homepage "https://robotframework.org/" + url "https://files.pythonhosted.org/packages/d9/bb/b8309699b0c6aaf492df11085635e7afa00fd9a3f5dd54b04b804056cc31/robotframework-7.3.2.tar.gz" + sha256 "3bb3e299831ecb1664f3d5082f6ff9f08ba82d61a745bef2227328ef3049e93a" + license "Apache-2.0" + revision 1 + head "https://github.com/robotframework/robotframework.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "d4d3fa4429d2a4134e70fea873b823f303c9f85d59826020fad5e6da9e80d664" + sha256 cellar: :any, arm64_sequoia: "0b60d12a295be2bd3593b1940f2b3dd94c94527a6b13e6fd98489259b158a2a7" + sha256 cellar: :any, arm64_sonoma: "e789ed8bb3e729e636a776d815b57d9b69875da852d4b08f580387ab8ec6f7ea" + sha256 cellar: :any, sonoma: "20db06c96b0b26cd6e278c7c8f8eaa175c5c56a0f8589be8c67ac738df3315dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ab45993f051778c0b5949348571f5e4e744be0211c1850efb6d6ecec8a1eac7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f68ba25e2df8e4a021fd4bd5a5d2bc95fda68b733815bf620b33a074bc33e1a" + end + + depends_on "rust" => :build # for bcrypt + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libsodium" # for pynacl + depends_on "python@3.14" + + uses_from_macos "zlib" + + pypi_packages extra_packages: %w[robotframework-archivelibrary + robotframework-selenium2library + robotframework-sshlibrary], + exclude_packages: ["certifi", "cryptography"] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/de/bd/b461d3424a24c80490313fd77feeb666ca4f6a28c7e72713e3d9095719b4/invoke-2.2.1.tar.gz" + sha256 "515bf49b4a48932b79b024590348da22f39c4942dff991ad1fb8b8baea1be707" + end + + resource "outcome" do + url "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz" + sha256 "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/1f/e7/81fdcbc7f190cdb058cffc9431587eb289833bdd633e2002455ca9bb13d4/paramiko-4.0.0.tar.gz" + sha256 "6a25f07b380cc9c9a88d2b920ad37167ac4667f8d9886ccebd8f90f654b5d69f" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "robotframework-archivelibrary" do + url "https://files.pythonhosted.org/packages/ef/59/82904e6a51bce72a1812b05da613577c5615a1c72022ba12abd688994d19/robotframework-archivelibrary-0.4.3.tar.gz" + sha256 "d5c94e52c01fb0faf8b2ff3e0bbd41951e81980a94bc406d1b9d6fa695ff1744" + end + + resource "robotframework-pythonlibcore" do + url "https://files.pythonhosted.org/packages/71/89/5dc8c8186c897ee4b7d0b2631ebc90e679e8c8f04ea85505f96ad38aad64/robotframework-pythonlibcore-4.4.1.tar.gz" + sha256 "2d695b2ea906f5815179643e29182466675e682d82c5fa9d1009edfae2f84b16" + end + + resource "robotframework-selenium2library" do + url "https://files.pythonhosted.org/packages/c4/7d/3c07081e7f0f1844aa21fd239a0139db4da5a8dc219d1e81cb004ba1f4e2/robotframework-selenium2library-3.0.0.tar.gz" + sha256 "2a8e942b0788b16ded253039008b34d2b46199283461b294f0f41a579c70fda7" + end + + resource "robotframework-seleniumlibrary" do + url "https://files.pythonhosted.org/packages/2d/d5/aa063b493a14cdb2771c23e6d5fdaa90c3d4712f8a086077bc5595aae9b9/robotframework_seleniumlibrary-6.8.0.tar.gz" + sha256 "60fb0584b11eabc687e8433134093b764ec011e0e8a9ec417bfdeeab59d748bb" + end + + resource "robotframework-sshlibrary" do + url "https://files.pythonhosted.org/packages/23/e9/74f3345024645a1e874c53064787a324eaecfb0c594c189699474370a147/robotframework-sshlibrary-3.8.0.tar.gz" + sha256 "aedf8a02bcb7344404cf8575d0ada25d6c7dc2fcb65de2113c4e07c63d2446c2" + end + + resource "scp" do + url "https://files.pythonhosted.org/packages/d6/1c/d213e1c6651d0bd37636b21b1ba9b895f276e8057f882c9f944931e4f002/scp-0.15.0.tar.gz" + sha256 "f1b22e9932123ccf17eebf19e0953c6e9148f589f93d91b872941a696305c83f" + end + + resource "selenium" do + url "https://files.pythonhosted.org/packages/10/35/33d3d84e3399c9d00b489aeccfdc78115e149e45816fb8fe84274329e8a2/selenium-4.36.0.tar.gz" + sha256 "0eced83038736c3a013b824116df0b6dbb83e93721545f51b680451013416723" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/76/8f/c6e36dd11201e2a565977d8b13f0b027ba4593c1a80bed5185489178e257/trio-0.31.0.tar.gz" + sha256 "f71d551ccaa79d0cb73017a33ef3264fde8335728eb4c6391451fe5d253a9d5b" + end + + resource "trio-websocket" do + url "https://files.pythonhosted.org/packages/d1/3c/8b4358e81f2f2cfe71b66a267f023a91db20a817b9425dd964873796980a/trio_websocket-0.12.2.tar.gz" + sha256 "22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"HelloWorld.robot").write <<~ROBOT + *** Settings *** + Library HelloWorld.py + + *** Test Cases *** + HelloWorld + Hello World + ROBOT + + (testpath/"HelloWorld.py").write <<~PYTHON + def hello_world(): + print("HELLO WORLD!") + PYTHON + system bin/"robot", testpath/"HelloWorld.robot" + end +end diff --git a/Formula/r/robotfindskitten.rb b/Formula/r/robotfindskitten.rb new file mode 100644 index 0000000000000..3d8c44b6ed0ba --- /dev/null +++ b/Formula/r/robotfindskitten.rb @@ -0,0 +1,44 @@ +class Robotfindskitten < Formula + desc "Zen Simulation of robot finding kitten" + homepage "http://robotfindskitten.org/" + url "https://downloads.sourceforge.net/project/rfk/robotfindskitten-POSIX/ship_it_anyway/robotfindskitten-2.8284271.702.tar.gz" + sha256 "020172e4f4630f7c4f62c03b6ffe2eeeba5637b60374d3e6952ae5816a9f99af" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/robotfindskitten/robotfindskitten.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "f70167f4ada3ff8ec73fe948560bc08e582be51e57806612ed9d269ce0a1ed7e" + sha256 arm64_sequoia: "ea748b3acc46a3b17408ae1f7989c8d37389eb92e9d0d325e66b134136b51904" + sha256 arm64_sonoma: "94751d896df7daed821dfd5ba1a5c89c05b9e014f9e44c3d9f5e0f09a9f512be" + sha256 arm64_ventura: "594de510a65fdc1d5e49721661badf9d65c66ffcd6948de794e3aa1ad7de0f90" + sha256 arm64_monterey: "4b05b5753ba51c24aa690eb643d8abd4b471a4a417e061f3197e9f5ac9fe9b9a" + sha256 arm64_big_sur: "be80f51d5ff011ef17235dbd64bca5f1a857e30aca478421555b21a613b73b3b" + sha256 sonoma: "9b2f45fa85903a46134701d4131609ea2db758843d3f36f93f476cd8713ea003" + sha256 ventura: "dcba79e1df56fb0c9dddcdb6d8e361508367f9199fbc37b1ff7a823648beafda" + sha256 monterey: "eccc3189c1083ea09ac7a52b2cac91fc2f5a7251523c4a07ddf4bcf9653572e3" + sha256 big_sur: "6e95713a4c9a5ace4ece0bcf430b08caaa09876a002964f9ef01ee6fc982d302" + sha256 catalina: "fa1f963cf39fb320c4b8e0867a05c9e96944d59d6c18222a9d6b33acb4384622" + sha256 arm64_linux: "0d65f446d480696e567673ca1261f700413841a6196dac6bef7535f95727b167" + sha256 x86_64_linux: "7d44526e0b657e25b0bec3f36112f6bc9196f8a9a0b74ae2dec9e7b86801abe4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "ncurses" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install", "execgamesdir=#{bin}" + end + + test do + assert_equal "robotfindskitten: #{version}", + shell_output("#{bin}/robotfindskitten -V").chomp + end +end diff --git a/Formula/r/rocksdb.rb b/Formula/r/rocksdb.rb new file mode 100644 index 0000000000000..f76278d5bff0e --- /dev/null +++ b/Formula/r/rocksdb.rb @@ -0,0 +1,112 @@ +class Rocksdb < Formula + desc "Embeddable, persistent key-value store for fast storage" + homepage "https://rocksdb.org/" + url "https://github.com/facebook/rocksdb/archive/refs/tags/v10.7.5.tar.gz" + sha256 "a9948bf5f00dd1e656fc40c4b0bf39001c3773ad22c56959bdb1c940d10e3d8d" + license any_of: ["GPL-2.0-only", "Apache-2.0"] + head "https://github.com/facebook/rocksdb.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7b22eda881c19c8eaa3e229835d51c30be442bdf403f7cb146b33ecd5c3ca53f" + sha256 cellar: :any, arm64_sequoia: "ae9b516676748f4b768cd4a7f09f9748de871865695916de9c5af8b46a0d705f" + sha256 cellar: :any, arm64_sonoma: "142b675212b5d44025de16af223bc7a79cd0a1ac11b0ca0c66788945acdab7e6" + sha256 cellar: :any, sonoma: "1b31b2a0387fab54e10646110b41c9a199fef18ba7cff970c1e02aa0eb7a6632" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bce6eab3b2493e18a825212ba64afaee1109da8a0639b303d89bb931cead046" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04c1758a0c5dbac41877099de5eeb85164e338f74687b935cff3f8078d4423dc" + end + + depends_on "cmake" => :build + depends_on "gflags" + depends_on "lz4" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # Fix to error ld: library 'atomic' not found + # PR ref: https://github.com/facebook/rocksdb/pull/14048 + patch do + url "https://github.com/facebook/rocksdb/commit/1d18c4ed0177f184f228a7cdfb78eb85d0dab540.patch?full_index=1" + sha256 "7c76c3aaf970cd38129f42b6b76da3f37c59048507681c6953211d233e8cbdff" + end + + def install + args = %W[ + -DPORTABLE=ON + -DUSE_RTTI=ON + -DWITH_BENCHMARK_TOOLS=OFF + -DWITH_BZ2=ON + -DWITH_LZ4=ON + -DWITH_SNAPPY=ON + -DWITH_ZLIB=ON + -DWITH_ZSTD=ON + -DROCKSDB_BUILD_SHARED=ON + -DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath} + -DZSTD_INCLUDE_DIRS=#{Formula["zstd"].include} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd "build/tools" do + bin.install "sst_dump" => "rocksdb_sst_dump" + bin.install "db_sanity_test" => "rocksdb_sanity_test" + bin.install "write_stress" => "rocksdb_write_stress" + bin.install "ldb" => "rocksdb_ldb" + bin.install "db_repl_stress" => "rocksdb_repl_stress" + bin.install "rocksdb_dump" + bin.install "rocksdb_undump" + end + bin.install "build/db_stress_tool/db_stress" => "rocksdb_stress" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + using namespace rocksdb; + int main() { + Options options; + return 0; + } + CPP + + extra_args = [] + if OS.mac? + extra_args << "-stdlib=libc++" + extra_args << "-lstdc++" + end + system ENV.cxx, "test.cpp", "-o", "db_test", "-v", + "-std=c++20", + *extra_args, + "-lz", "-lbz2", + "-L#{lib}", "-lrocksdb", + "-L#{Formula["snappy"].opt_lib}", "-lsnappy", + "-L#{Formula["lz4"].opt_lib}", "-llz4", + "-L#{Formula["zstd"].opt_lib}", "-lzstd" + system "./db_test" + + assert_match "sst_dump ", shell_output("#{bin}/rocksdb_sst_dump --help 2>&1") + assert_match "rocksdb_sanity_test ", shell_output("#{bin}/rocksdb_sanity_test --help 2>&1", 1) + assert_match "rocksdb_stress [OPTIONS]...", shell_output("#{bin}/rocksdb_stress --help 2>&1", 1) + assert_match "rocksdb_write_stress [OPTIONS]...", shell_output("#{bin}/rocksdb_write_stress --help 2>&1", 1) + assert_match "ldb - RocksDB Tool", shell_output("#{bin}/rocksdb_ldb --help 2>&1") + assert_match "rocksdb_repl_stress:", shell_output("#{bin}/rocksdb_repl_stress --help 2>&1", 1) + assert_match "rocksdb_dump:", shell_output("#{bin}/rocksdb_dump --help 2>&1", 1) + assert_match "rocksdb_undump:", shell_output("#{bin}/rocksdb_undump --help 2>&1", 1) + + db = testpath/"db" + %w[no snappy zlib bzip2 lz4 zstd].each_with_index do |comp, idx| + key = "key-#{idx}" + value = "value-#{idx}" + + put_cmd = "#{bin}/rocksdb_ldb put --db=#{db} --create_if_missing --compression_type=#{comp} #{key} #{value}" + assert_equal "OK", shell_output(put_cmd).chomp + + get_cmd = "#{bin}/rocksdb_ldb get --db=#{db} #{key}" + assert_equal value, shell_output(get_cmd).chomp + end + end +end diff --git a/Formula/r/rocq-elpi.rb b/Formula/r/rocq-elpi.rb new file mode 100644 index 0000000000000..45cd9eb4c049f --- /dev/null +++ b/Formula/r/rocq-elpi.rb @@ -0,0 +1,95 @@ +class RocqElpi < Formula + desc "Elpi extension language for Rocq" + homepage "https://github.com/LPCIC/coq-elpi" + # Update resources based on https://github.com/LPCIC/coq-elpi/blob/v#{version}/rocq-elpi.opam#L18-L26 + url "https://github.com/LPCIC/coq-elpi/releases/download/v3.2.0/rocq-elpi-3.2.0.tar.gz" + sha256 "46e2e9baa79c7376cf1afb132a6aa9edc256e9c386d0a5f7ddef5fa136e98759" + license "LGPL-2.1-or-later" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "2da325e513a39adb79ecb5e8cf05a79312ef1d1dd61153418e31710a0d892e8d" + sha256 arm64_sequoia: "92c552c672119f646308d2d44c912d9d615a3c23878489d3a0f12f7c8cd3aec8" + sha256 arm64_sonoma: "d251297888afd3d1991a0c2d2cd0c5efb1d5655edb4ad267999ec0a5eb288361" + sha256 sonoma: "61059ec4126dfde0143cd76d3cd31f2b2618edf1f47afb3654f91bf8d69072b3" + sha256 arm64_linux: "2404e71feb1d66bb5ec3df4045600f92aac10da7a077087c34ce452e5bc6db9f" + sha256 x86_64_linux: "c312095185bdfffa85a5d821e1685103c520d674c450211c4cf21306937e4e48" + end + + depends_on "dune" => :build + depends_on "ocaml" => :build + depends_on "opam" => :build + depends_on "ocaml-findlib" + depends_on "rocq" + + # NOTE: Resources are just used to provide version numbers for `opam install` + # since we hit a build error when trying to install from tarball directly. + # The result is similar to using `--deps-only` in other formulae. We can't + # run that here as it installs a duplicate copy of `rocq`. + resource "elpi" do + url "https://raw.githubusercontent.com/LPCIC/elpi/refs/tags/v3.3.1/elpi.opam" + sha256 "aca7918b921d7cd029e3d484d27ebcf2ba4eb5fea691deada7da2d8f7632e381" + end + + resource "ppx_optcomp" do + url "https://raw.githubusercontent.com/janestreet/ppx_optcomp/refs/tags/v0.17.1/ppx_optcomp.opam" + sha256 "59af9cf06bdc1d2682de3eb95bd179e48659d4dc76bd60e15feb5fbe07d42400" + end + + def install + # Use libexec as root to avoid risk of moving non-relocatable binaries + with_env(OPAMROOT: libexec, OPAMYES: "1", OPAMNODEPEXTS: "1", OPAMNOSELFUPGRADE: "1") do + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + system "opam", "install", "elpi.#{resource("elpi").version}", "ppx_optcomp.v#{resource("ppx_optcomp").version}" + end + + # Only keep packages needed at runtime but leave them in libexec to avoid + # incompatible versions causing issues with other OCaml-based formulae + rm_r(libexec.children - [libexec/"ocaml-system"]) + rm_r(libexec/"ocaml-system/.opam-switch") + + # Add symlinks to reduce subdirectories in path needed to use rocq-elpi + libexec.install_symlink libexec.glob("ocaml-system/*") + + ENV["OCAMLFIND_CONF"] = libexec/"lib/findlib.conf" + system "make", "dune-files" + system "dune", "build", "-p", name, "@install" + system "dune", "install", name, "--prefix=#{prefix}", + "--libdir=#{lib}/ocaml", + "--mandir=#{man}", + "--docdir=#{doc.parent}" + pkgshare.install "examples/example_data_base.v" + end + + def caveats + <<~CAVEATS + Rocq needs help finding ML files installed inside `#{opt_libexec}/lib`. + This can be done by passing `-I #{opt_libexec}/lib` as an argument. + Alternatively, you can add the directory to OCAMLPATH, e.g. + export OCAMLPATH="#{opt_libexec}/lib:$OCAMLPATH" + or use the included findlib configuration file, e.g. + export OCAMLFIND_CONF="#{opt_libexec}/lib/findlib.conf" + CAVEATS + end + + test do + ENV["OCAMLFIND_CONF"] = libexec/"lib/findlib.conf" + cp pkgshare/"example_data_base.v", testpath + space = " " + assert_equal <<~TEXT, shell_output("#{Formula["rocq"].bin}/rocq compile example_data_base.v") + The Db contains [phone_prefix USA 1] + Phone prefix for USA is 1 + The Db contains#{space} + [phone_prefix USA 1, phone_prefix France 33, phone_prefix Italy 39] + Phone prefix for France is 33 + sweet! + brr + yummy! + TEXT + end +end diff --git a/Formula/r/rocq.rb b/Formula/r/rocq.rb new file mode 100644 index 0000000000000..42372a38e6bd3 --- /dev/null +++ b/Formula/r/rocq.rb @@ -0,0 +1,112 @@ +class Rocq < Formula + desc "Proof assistant for higher-order logic" + homepage "https://rocq-prover.org/" + license "LGPL-2.1-only" + + stable do + url "https://github.com/rocq-prover/rocq/releases/download/V9.1.0/rocq-9.1.0.tar.gz" + sha256 "b236dc44f92e1eeca6877c7ee188a90c2303497fe7beb99df711ed5a7ce0d824" + + resource "stdlib" do + url "https://github.com/rocq-prover/stdlib/releases/download/V9.0.0/stdlib-9.0.0.tar.gz" + sha256 "1ab6adc42dfc651ddc909604bae1a54ff5623cda837f93677a8b12aab9eec711" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "df231dd84d387ce8914fb260fd24685af7d6da6bb998c9d52efbf13b9718d9fa" + sha256 arm64_sequoia: "31e208459941d45b5c5e41278f79d6c40cd1abcb0b873c3ffc0df54f6cac6501" + sha256 arm64_sonoma: "3aa44bda57467bfb3c27d928ef415e829f5c832ed59dbd4352b7e5ade3614c7c" + sha256 sonoma: "5dc6e0ae4cc0764971fce661a642e28120742518254c3ca69c01cafd8e4619ea" + sha256 arm64_linux: "b8ba5bae249958b1537e0edc72b0a29f78d0e1a840dadddd3f196ce19546abe4" + sha256 x86_64_linux: "8069baf9a8804ce6945b8a808eaa88fa25e1b22b9334053e5570a3b3d7e14b78" + end + + head do + url "https://github.com/rocq-prover/rocq.git", branch: "master" + + resource "stdlib" do + url "https://github.com/rocq-prover/stdlib.git", branch: "master" + end + end + + depends_on "dune" => :build + depends_on "gmp" + depends_on "ocaml" + depends_on "ocaml-findlib" + depends_on "ocaml-zarith" + + uses_from_macos "m4" => :build + uses_from_macos "unzip" => :build + + def install + # Work around for https://github.com/Homebrew/homebrew-test-bot/issues/805 + if ENV["HOMEBREW_GITHUB_ACTIONS"] && !(Formula["ocaml-findlib"].etc/"findlib.conf").exist? + ENV["OCAMLFIND_CONF"] = Formula["ocaml-findlib"].opt_libexec/"findlib.conf" + end + ENV.prepend_path "OCAMLPATH", Formula["ocaml-zarith"].opt_lib/"ocaml" + ENV.prepend_path "OCAMLPATH", Formula["ocaml-findlib"].opt_lib/"ocaml" + + packages = %w[rocq-runtime coq-core rocq-core coqide-server] + + system "./configure", "-prefix", prefix, + "-mandir", man, + "-libdir", HOMEBREW_PREFIX/"lib/ocaml/coq", + "-docdir", pkgshare/"latex" + system "make", "dunestrap" + system "dune", "build", "-p", packages.join(",") + system "dune", "install", "--prefix=#{prefix}", + "--mandir=#{man}", + "--libdir=#{lib}/ocaml", + "--docdir=#{doc.parent}", + *packages + + resource("stdlib").stage do + ENV.prepend_path "PATH", bin + ENV["ROCQLIB"] = lib/"ocaml/coq" + system "make" + system "make", "install" + end + end + + test do + # Work around for https://github.com/Homebrew/homebrew-test-bot/issues/805 + if ENV["HOMEBREW_GITHUB_ACTIONS"] && !(Formula["ocaml-findlib"].etc/"findlib.conf").exist? + ENV["OCAMLFIND_CONF"] = Formula["ocaml-findlib"].opt_libexec/"findlib.conf" + end + (testpath/"testing.v").write <<~ROCQ + Require Stdlib.micromega.Lia. + Require Stdlib.ZArith.ZArith. + + Inductive nat : Set := + | O : nat + | S : nat -> nat. + Fixpoint add (n m: nat) : nat := + match n with + | O => m + | S n' => S (add n' m) + end. + Lemma add_O_r : forall (n: nat), add n O = n. + Proof. + intros n; induction n; simpl; auto; rewrite IHn; auto. + Qed. + + Import Stdlib.micromega.Lia. + Import Stdlib.ZArith.ZArith. + Open Scope Z. + Lemma add_O_r_Z : forall (n: Z), n + 0 = n. + Proof. + intros; lia. + Qed. + ROCQ + system bin/"rocq", "compile", testpath/"testing.v" + # test ability to find plugin files + output = shell_output("#{Formula["ocaml-findlib"].bin}/ocamlfind query rocq-runtime.plugins.ltac") + assert_equal "#{HOMEBREW_PREFIX}/lib/ocaml/rocq-runtime/plugins/ltac", output.chomp + end +end diff --git a/Formula/r/rofi.rb b/Formula/r/rofi.rb new file mode 100644 index 0000000000000..eb1915567341c --- /dev/null +++ b/Formula/r/rofi.rb @@ -0,0 +1,57 @@ +class Rofi < Formula + desc "Window switcher, application launcher and dmenu replacement" + homepage "https://davatorium.github.io/rofi/" + url "https://github.com/davatorium/rofi/releases/download/2.0.0/rofi-2.0.0.tar.gz" + sha256 "f81659b175306ff487e35d88d6b36128e85a793bfb56b64fa22c62eb54c4abd0" + license "MIT" + head "https://github.com/davatorium/rofi.git", branch: "next" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "56cf0ce09c7e1c24b44a42074ce27963461dc6f1494a231d67878607cc4445da" + sha256 arm64_sequoia: "d0b9f23ea3e63509aaa2dd9bf00c033973ead42dc9e3a4f25c3d62726195ec66" + sha256 arm64_sonoma: "0fd77e4788c2add3bc3b4b9ff0ccd525c18ee084da1aa236ed788e0ba4c89e33" + sha256 arm64_ventura: "d428713688ec3c0966f0ad16c465bb683db9fa66690ff1b906694b63963d5fbd" + sha256 sonoma: "9b93ea8da34ccd6ba683b62e20d354377704b272e5f288fc09e786d549a027f2" + sha256 ventura: "4fece57aedd09cdb2b7c65ddcd55f42eecb446570ba26d58d46416ed39b99c05" + sha256 arm64_linux: "481b5771288fe8bdda79947b5662d8660b3db1d497259bcf251954d3a9ec000d" + sha256 x86_64_linux: "fcfbd2f40d45b02ada2b790949354a4b17382edd6fb84a16815f57045e1e6793" + end + + depends_on "bison" => :build + depends_on "check" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "glib" + depends_on "harfbuzz" + depends_on "libxcb" + depends_on "libxkbcommon" + depends_on "pango" + depends_on "startup-notification" + depends_on "xcb-util" + depends_on "xcb-util-cursor" + depends_on "xcb-util-wm" + depends_on "xorg-server" + + uses_from_macos "flex" => :build + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # rofi is a GUI application + assert_match "Version: #{version}", shell_output("#{bin}/rofi -v") + end +end diff --git a/Formula/r/rofs-filtered.rb b/Formula/r/rofs-filtered.rb new file mode 100644 index 0000000000000..169845d551fd9 --- /dev/null +++ b/Formula/r/rofs-filtered.rb @@ -0,0 +1,29 @@ +class RofsFiltered < Formula + desc "Filtered read-only filesystem for FUSE" + homepage "https://github.com/gburca/rofs-filtered/" + url "https://github.com/gburca/rofs-filtered/archive/refs/tags/rel-1.7.tar.gz" + sha256 "d66066dfd0274a2fb7b71dd929445377dd23100b9fa43e3888dbe3fc7e8228e8" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_linux: "01d57c6c071aacd6dc92a36f807b1e718f6178b8078f1d871d59941a7228670c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae07e1e4a0daa79c067329aeafc4078dd7f74c793ccb1a2ade7c3dedf0f05ade" + end + + depends_on "cmake" => :build + depends_on "libfuse@2" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rofs-filtered --version 2>&1") + end +end diff --git a/Formula/r/rogcat.rb b/Formula/r/rogcat.rb new file mode 100644 index 0000000000000..c4e9824d4661d --- /dev/null +++ b/Formula/r/rogcat.rb @@ -0,0 +1,49 @@ +class Rogcat < Formula + desc "Adb logcat wrapper" + homepage "https://github.com/flxo/rogcat" + url "https://github.com/flxo/rogcat/archive/refs/tags/v0.5.0.tar.gz" + sha256 "8b4d90dd1254ff82bc01cadcb8a157dc4d66d2e987471ae3c3eaa99f03e34ba3" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1dd3b52bb78be0697f011c4b822049cbb3458c442bfaede275a8f2bf601edf35" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "03ed4acdf899875651f2b7a66e3ed51b0864cea322411ceb19288dec67b2226d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eed5b19de42f726126da7bc2cb2b7bc8b1850e0fbfcb9acbfa69335ebbf5926f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9740ffa33292f023d3f022ef9163fa2229edc22c70f2f15fa3895c88e3fbcd97" + sha256 cellar: :any_skip_relocation, sonoma: "e379f5d4de1e946270892f79a61530443c059f96e58aa4de9efbc012b909f511" + sha256 cellar: :any_skip_relocation, ventura: "d4f5fb5c2f78c91a879c848a8806662e58c791b5b71f1ced85bec4636e059ee0" + sha256 cellar: :any_skip_relocation, arm64_linux: "804c7881f8a8cde87ff51033907d9169c8c1b2769900ee1b7aa003dbcbfce62a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bbec1da8e32cf17191a67928887276c14b89863ca3cfa8654741166a19ee5da" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "systemd" # for libudev + end + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"rogcat", "completions") + end + + def caveats + <<~EOS + At runtime, adb must be accessible from your PATH. + + You can install adb from Homebrew Cask: + brew install --cask android-platform-tools + EOS + end + + test do + output = shell_output("#{bin}/rogcat devices 2>&1", 101) + assert_match "Failed to find adb", output + + assert_match version.to_s, shell_output("#{bin}/rogcat --version") + end +end diff --git a/Formula/r/rogue.rb b/Formula/r/rogue.rb new file mode 100644 index 0000000000000..32cfb54335820 --- /dev/null +++ b/Formula/r/rogue.rb @@ -0,0 +1,68 @@ +class Rogue < Formula + desc "Dungeon crawling video game" + # Historical homepage: https://web.archive.org/web/20160604020207/rogue.rogueforge.net/ + homepage "https://sourceforge.net/projects/roguelike/" + url "https://src.fedoraproject.org/repo/pkgs/rogue/rogue5.4.4-src.tar.gz/033288f46444b06814c81ea69d96e075/rogue5.4.4-src.tar.gz" + sha256 "7d37a61fc098bda0e6fac30799da347294067e8e079e4b40d6c781468e08e8a1" + license "BSD-3-Clause" + + livecheck do + url "https://src.fedoraproject.org/repo/pkgs/rogue/" + regex(/href=.*?rogue-?v?(\d+(?:\.\d+)+)(?:-src)?\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b327fe2a04af7f0560f1bbfc71cb580398b772fa3078151e7e11aacc629a15c4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78ece502084d54a61267fe5b312cc9a85161bc428fc6f8785f7e5e738bcaa237" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "596bea046705fe93367152155bd753a89a490728692838f3d281e66af803d23a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eb41a1bc17c2894736afe57978b32b796793b405a238685b04c5bb4b0e8ff466" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6c73ef712b35b6ba4c3339828add299a2ce8d53dd35a455d439f9639b484e99d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1cfeb02e30c14d89cf9d831c553a06eb17a6d6d27734c215e3ee7e72ab0c7c76" + sha256 cellar: :any_skip_relocation, sonoma: "2e0cbcc68239387495a09dd1786e0691f725b9812472fcc13563021d1fcb44cc" + sha256 cellar: :any_skip_relocation, ventura: "cbb8530b652299bddc7a997cbb51205f58a89f88ed43a06dac27e784886deb11" + sha256 cellar: :any_skip_relocation, monterey: "0c169854e9edcfdf99c7c52e5fbfb39dbf883c74f076097aaf3027daf9f2064b" + sha256 cellar: :any_skip_relocation, big_sur: "c6e8bb630a966cd8885e378242f9175ffd8327e26ec1ed679016302b437a5156" + sha256 cellar: :any_skip_relocation, catalina: "c576555f6857ff3ec7f0b2e39625d3c1f86989315b735a5e27d9416c095e5efc" + sha256 cellar: :any_skip_relocation, arm64_linux: "6010fd6661da3ce1ab2a3115fa4776827e91a7da713a6c13ec5db192edcfd3c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2edb3e1d6fb4af2f87d065012e68d09abda6035c5f4394d685336d0763f31869" + end + + uses_from_macos "ncurses" + + def install + # Fix main.c:241:11: error: incomplete definition of type 'struct _win_st' + ENV.append "CPPFLAGS", "-DNCURSES_OPAQUE=0 -DNCURSES_INTERNALS" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + + inreplace "config.h", "rogue.scr", "#{var}/rogue/rogue.scr" + + inreplace "Makefile" do |s| + # Take out weird man install script and DIY below + s.gsub! "-if test -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi", "" + s.gsub! "-if test ! -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi", "" + end + + if OS.linux? + inreplace "mdport.c", "#ifdef NCURSES_VERSION", + "#ifdef NCURSES_VERSION\nTERMTYPE *tp = (TERMTYPE *) (cur_term);" + inreplace "mdport.c", "cur_term->type.Strings", "tp->Strings" + end + + system "make", "install" + man6.install Utils::Gzip.compress("rogue.6") + libexec.mkpath + (var/"rogue").mkpath + end + + test do + system bin/"rogue", "-s" + end +end diff --git a/Formula/r/rojo.rb b/Formula/r/rojo.rb new file mode 100644 index 0000000000000..8bf0a155a706e --- /dev/null +++ b/Formula/r/rojo.rb @@ -0,0 +1,38 @@ +class Rojo < Formula + desc "Professional grade Roblox development tools" + homepage "https://rojo.space/" + # pull from git tag to get submodules + url "https://github.com/rojo-rbx/rojo.git", + tag: "v7.6.0", + revision: "441c469966ded2c7b4a5f7b9aa18a4c8a27499b3" + license "MPL-2.0" + head "https://github.com/rojo-rbx/rojo.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "528d16663ddaa354fcf3d0c71f220196a2e5b5b0bb3c0f600dc30792b7486716" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a83beda14e57c30a2449b9b89451b9397c3853e5bc85123c25a02ccd99005982" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1831b8ddcf74822f78eb2c755904299e80c7d815d8dfc585ae2f93688733794" + sha256 cellar: :any_skip_relocation, sonoma: "338553ac49050cb9a4478f14f8f47a26cae3c8b7f180e68e46f6c09cc15e7003" + sha256 cellar: :any_skip_relocation, arm64_linux: "aee4003490b49e7676b9142db3c9a52b29f77860c09e0f98f47a21167d8c3346" + sha256 cellar: :any_skip_relocation, x86_64_linux: "366d55c2b92a3dbbabb07dccca2fd051ea4c43e7be16e8b63dcd293d2c610993" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"rojo", "init" + assert_path_exists testpath/"default.project.json" + + assert_match version.to_s, shell_output("#{bin}/rojo --version") + end +end diff --git a/Formula/r/rolesanywhere-credential-helper.rb b/Formula/r/rolesanywhere-credential-helper.rb new file mode 100644 index 0000000000000..e95b24c5495f2 --- /dev/null +++ b/Formula/r/rolesanywhere-credential-helper.rb @@ -0,0 +1,67 @@ +class RolesanywhereCredentialHelper < Formula + desc "Manages getting temporary security credentials from IAM Roles Anywhere" + homepage "https://github.com/aws/rolesanywhere-credential-helper" + url "https://github.com/aws/rolesanywhere-credential-helper/archive/refs/tags/v1.7.1.tar.gz" + sha256 "80baa67fd94c347779419b2adb72aabcd5af8952267b5c63a3a97b1718f45f75" + license "Apache-2.0" + head "https://github.com/aws/rolesanywhere-credential-helper.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c697318f62b446aaba0a20290ea036c71cef2ee5b424d20006dcb703458e5f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f2fe7c610c146037ec31114e3535cefb4efc67e25847e67339b79113c5bccad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ba22e6393778c286860036cb314594f4932ec1ca3d8688fa71b9b42757cc2d6" + sha256 cellar: :any_skip_relocation, sonoma: "c1d04d97222d42b71ba4d6f79aee94fa24531d6d1f65a54b01e6bff170ae6592" + sha256 cellar: :any_skip_relocation, arm64_linux: "e26b09ce41bb85b2e189e0755403890255c2e846192598bdab4a7f3e5d99392a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d331365e22b91e363c2c2978de9484349aa61b466e5ef68e62ed3b65d918dc0d" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/aws/rolesanywhere-credential-helper/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"aws_signing_helper") + + generate_completions_from_executable(bin/"aws_signing_helper", "completion") + end + + test do + # Testing real functionality requires a complete setup of AWS account and much + # more configuration. + (testpath/"cert.pem").write <<~CERT + -----BEGIN CERTIFICATE----- + MIIE/zCCAuegAwIBAgIUWnMzjNagfF7z9opuIl6h4wCv4GIwDQYJKoZIhvcNAQEL + BQAwDzENMAsGA1UEAwwEVEVTVDAeFw0yNTEwMDcxNTM2MzJaFw0zNTEwMDUxNTM2 + MzJaMA8xDTALBgNVBAMMBFRFU1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK + AoICAQCtaWxvgFyT0SfhEAy6K/yJOSitfGci89XphbuTFnCIoqRo/qD8K+ZbaFM6 + zRL7zCL0UMlJingi7MVERox/yufTH0najVhKBM30736N6wzWzUuA4vQmaExOwbLe + ExgOeoSufS+h5WeUZAm03z3RRzmQwIpaxx7aZwkP40o5v+I795RaQle145jNdzAD + pzFwn1iBCemVOMfBqRn73mH77n/ujQghol03Hroy3Va4P6qoV35+hUr89zUMyBYS + r4Hrpp0YHVh3cJ+uUrCoTrpNYZ5ykCdPLw8LT1ZF5eruhIVDnlRM4n+zdR11+qb8 + 1o7aUr0UIiKe9O6FULnN6GBcWwp8JrCQtllw8tiG2XFfNTkU8ASg2jL0Laauu/Vq + lsHuTIKwGI4mVbFYW7REWdB7aoVLhn1nT66hko6YV02XugW3KCRomDaqtZXIDTPA + cFShtRNpjxmDrSuysm3U8jtrIGJoWc1jl93mawAoZaIn+c12+nuXvPyuI4CEP5mp + Xuj5WhAtkX7GqqKaBmJKsgbAeicRB5MHyMHlS3AVAUYzClxFzlvmk6pdhDlb8eQw + Ul++rCFliCtzAPJfarZ9iqhjXMVIqIukMQmBpvSpk0IUOswkhyWS7gFQOzSDDDfc + 1KmNrpOhyhYfFM+mVqv4GOpNw0epctuN2XleIFbuHdocKenwLwIDAQABo1MwUTAd + BgNVHQ4EFgQUP/1BBPiRUBA2gTbKqqm8sMVAR2EwHwYDVR0jBBgwFoAUP/1BBPiR + UBA2gTbKqqm8sMVAR2EwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC + AgEASQf6WaIGnR+Tlx4Vq7woxGUS5oZggqeRait8R9bk5Y6zR6WeuuVV7Wa8DiaN + ix+wSZbSYj78oFmJIIFq08syWGorWrffMQ/KegRFaYIjY6v0DZk4eJS9Eyy32m2o + Gh8LhfICXDV3JbP+6UcjNiROrfvAfirT3s57TVDiK+zEItYA4WHITmezUy5l4RMB + WMCYp3ie4FjSCgVk1Q0yqIS6dCHR1bj1WnMuSv+V6rRA6chcavxar7jEcnBy6uu5 + NJRWjS/FOZdbyxfNWKMauctUBg2E3z0oDPcJBMDl0il54J6E1rU0pnKDAqcs6BxJ + qMDFLYsexcglk9ISmEzf3YHaV39ukb+eX0LogTYXi9Mh/FUj30Pd4Z398Ihogm4t + FNR+ur24BoT5wl79Js3oN8fekT4ULwfGg+lcAOi1IiRH9yJqHlGOpgu+kBeg43qe + svK9bpMddqY6Q6ryHPQAc+P6bLKs5yfx3cItjqhHhVq8cVqEOoZhhtQ38anklLct + ePEWPXvZFeufOEoOkQwySYiUQhXlcCveJmNHBkvNIotYH5h6fuX2HvJfBfnvqkkM + dIpUtT+Di4Gjzk8GNAmISGmlayogyMyHOQR03xRPu2DU6gMpOiLo0isIQvpHdhdq + g0HKj0SpvXaT/uTqr+B4tG1KDO76d/okqxtYzPGvlUhEysA= + -----END CERTIFICATE----- + CERT + + read_cert_output = shell_output("#{bin}/aws_signing_helper read-certificate-data --certificate cert.pem 2>&1") + assert_match '"serialNumber":"516378245723378548683302024520857503286885867618"', read_cert_output + + assert_match version.to_s, shell_output("#{bin}/aws_signing_helper version 2>&1") + end +end diff --git a/Formula/r/roll.rb b/Formula/r/roll.rb new file mode 100644 index 0000000000000..d859bab394d24 --- /dev/null +++ b/Formula/r/roll.rb @@ -0,0 +1,42 @@ +class Roll < Formula + desc "CLI program for rolling a dice sequence" + homepage "https://matteocorti.github.io/roll/" + url "https://github.com/matteocorti/roll/releases/download/v2.6.1/roll-2.6.1.tar.gz" + sha256 "399bd4958d92f82fb75ff308decb2d482c9a8db80234014f6d42f6513b144179" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e60f90ae43698201f51529d50768ba5cd57326e62953c81a91280c6e760f5829" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb1ee4685b24f925ca41abe63c8e7703a9656b96088c4fba6b483cfcdeea9e76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a4fb62e0cf82c19e312fa67b94af3ffecae251323a0a327fd7b99aec74a85e6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ffc7291577ef075aa3c1369419b6d92389b19ad6cd0d841bc613f3eae48c016" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3a8e1ac1b898c674f5a752ca03e7952d011f7b115529d3ab1f92f745392ecfe4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "14b4457a32902e96d331fca1fd85fbbf3d5f515914091da2c61dec741bf3d73b" + sha256 cellar: :any_skip_relocation, sonoma: "588feb890e23a61032f2bc5b394e7ba6c3e134d91be3c49cfe6c131efc139280" + sha256 cellar: :any_skip_relocation, ventura: "88ea735366f98e1790c9fe70e9de10138bfbc064a255820d8d8dc684a5bbf912" + sha256 cellar: :any_skip_relocation, monterey: "6f3f061734bc251d233b72aa805dc1cc3d7865e276c3e3c6c75854686ac06fdb" + sha256 cellar: :any_skip_relocation, big_sur: "123c5c66e945afdfac73b0cf5b553df895c8b03ac22c32124ab6ff98e52e3478" + sha256 cellar: :any_skip_relocation, catalina: "c62fd4ce38c97e3f2a41203420feda3601359815a4cf20a6d68e3a9aa37bdcf2" + sha256 cellar: :any_skip_relocation, arm64_linux: "904914c6aeae44b64aa7fe97d2567ec15ee48c0b1dc8700381a8608b20259174" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e98554d4358ec561afd285196543baf10606cfcb0a6b842ba4949cf7b477894d" + end + + head do + url "https://github.com/matteocorti/roll.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + system "./regen.sh" if build.head? + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"roll", "1d6" + end +end diff --git a/Formula/r/rolldice.rb b/Formula/r/rolldice.rb new file mode 100644 index 0000000000000..128c825bac5b5 --- /dev/null +++ b/Formula/r/rolldice.rb @@ -0,0 +1,43 @@ +class Rolldice < Formula + desc "Rolls an amount of virtual dice" + homepage "https://github.com/sstrickl/rolldice" + url "https://github.com/sstrickl/rolldice/archive/refs/tags/v1.16.tar.gz" + sha256 "8bc82b26c418453ef0fe79b43a094641e7a76dae406032423a2f0fb270930775" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "09a28787c7477eadf288aa7a5ae71453ad26dd4625bb10f16fc018268a30d3ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "031af343a052cfcf699f759e5437a87deb519e69a4a5e6eefb321b9e2e1076bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d08c666a00ef58322bc11b9082b063330b818186a6f6fb06ef65e92b599ed96" + sha256 cellar: :any_skip_relocation, sonoma: "9d31227c05f614fa803c1de1beba50ad7eafa06ac6f32afd8cf84af2798e778c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebac82e928ab9231e039a3081c30662038cb584b9f3fb8bbca4c6eaa380440c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92a41852d00239f7c3874e32f8cf7da6f8053a9ae0ddd906dd6e1f2c5da4176f" + end + + uses_from_macos "libedit" # readline's license is incompatible with GPL-2.0-only + + # Submitted upstream at https://github.com/sstrickl/rolldice/pull/25 + # Remove if merged and included in a tagged release + patch do + url "https://github.com/sstrickl/rolldice/commit/5e53bade81d0fc972857889c1b690dcd830b439b.patch?full_index=1" + sha256 "133214dcc8c8d8e4620205273c6c932cc0674e11717bf4b2fa432a205e825cc5" + end + + def install + unless OS.mac? + ENV.append_to_cflags "-I#{Formula["libedit"].opt_libexec}/include" + ENV.append "LDFLAGS", "-L#{Formula["libedit"].opt_libexec}/lib" + end + + system "make", "CC=#{ENV.cc}" + bin.install "rolldice" + man6.install Utils::Gzip.compress("rolldice.6") + end + + test do + assert_match "Roll #1", shell_output("#{bin}/rolldice -s 1x2d6") + end +end diff --git a/Formula/r/rollup.rb b/Formula/r/rollup.rb new file mode 100644 index 0000000000000..4675902b776ec --- /dev/null +++ b/Formula/r/rollup.rb @@ -0,0 +1,50 @@ +class Rollup < Formula + desc "Next-generation ES module bundler" + homepage "https://rollupjs.org/" + url "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz" + sha256 "d49906ca8f1488dc73fb20e692523cbd1f778caaecefeb368166e0fb6d9d78ef" + license all_of: ["ISC", "MIT"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "70fcd470396f0853df5a545cec1d01a452ff9dbe456ff2b3e1fb6d6a50dfd703" + sha256 cellar: :any, arm64_sequoia: "5b697dda7b703de6e33e70007ed3a88e1e90fe5e72ba1c28a8b266811229e842" + sha256 cellar: :any, arm64_sonoma: "5b697dda7b703de6e33e70007ed3a88e1e90fe5e72ba1c28a8b266811229e842" + sha256 cellar: :any, sonoma: "879ba11e4cae1bb396e5c478426bde542c28f3bab3d292362e1adeded9f483ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa3b597e4bd6c83c4b8dbbc8a1dcf2c7b85d9304ce9a466fcc5391a8e0a3b42f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c227a8513798fb8bb73644323fb66d775145f17f581b0730b7bd096be7fecf2" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test/main.js").write <<~JS + import foo from './foo.js'; + export default function () { + console.log(foo); + } + JS + + (testpath/"test/foo.js").write <<~JS + export default 'hello world!'; + JS + + expected = <<~JS + 'use strict'; + + var foo = 'hello world!'; + + function main () { + console.log(foo); + } + + module.exports = main; + JS + + assert_equal expected, shell_output("#{bin}/rollup #{testpath}/test/main.js -f cjs") + end +end diff --git a/Formula/r/rom-tools.rb b/Formula/r/rom-tools.rb new file mode 100644 index 0000000000000..e22f965f96d92 --- /dev/null +++ b/Formula/r/rom-tools.rb @@ -0,0 +1,97 @@ +class RomTools < Formula + desc "Tools for Multiple Arcade Machine Emulator" + homepage "https://www.mamedev.org/" + url "https://github.com/mamedev/mame/archive/refs/tags/mame0282.tar.gz" + version "0.282" + sha256 "730d6264f0851de521ca03b71f8556f2b31b8f06d415b52d1ba31aafff9f6c3f" + license "GPL-2.0-or-later" + head "https://github.com/mamedev/mame.git", branch: "master" + + livecheck do + formula "mame" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab730186c3eb23fcd1d52fefe129313f243d2c18e733c382ecc47f4fe4a96edb" + sha256 cellar: :any, arm64_sequoia: "c8955c9ea029a70327b8457aed2e97c4d5986acc049b9a19d0ed4608434e72f1" + sha256 cellar: :any, arm64_sonoma: "22100bd93d888d561a19084b67d4fff1e5a29351a07ed29b1e8731b7b6a81b54" + sha256 cellar: :any, sonoma: "d2e968b42f427a40bbfabb70f93426d78853c4bf2258198e9a873fd7228c1c1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "257adf3b455535c4c9abdbfd1c1fc7822dc2b3cbb8b7f18141826ff1180640ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77a1d83070a25ce353ddd046672bc7e8e8795648179098121358099424e544d8" + end + + depends_on "asio" => :build + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "sdl2" + depends_on "utf8proc" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "expat" + uses_from_macos "zlib" + + on_linux do + depends_on "portaudio" => :build + depends_on "portmidi" => :build + depends_on "pulseaudio" => :build + depends_on "qtbase" => :build + depends_on "sdl2_ttf" => :build + end + + def install + ENV["QT_HOME"] = Formula["qtbase"].opt_prefix if OS.linux? + + # Cut sdl2-config's invalid option. + inreplace "scripts/src/osd/sdl.lua", "--static", "" + + args = %W[ + PYTHON_EXECUTABLE=#{which("python3")} + TOOLS=1 + EMULATOR=0 + USE_LIBSDL=1 + USE_SYSTEM_LIB_EXPAT=1 + USE_SYSTEM_LIB_ZLIB=1 + USE_SYSTEM_LIB_ASIO=1 + USE_SYSTEM_LIB_FLAC=1 + USE_SYSTEM_LIB_UTF8PROC=1 + USE_SYSTEM_LIB_ZSTD=1 + VERBOSE=1 + ] + if OS.linux? + args << "USE_SYSTEM_LIB_PORTAUDIO=1" + args << "USE_SYSTEM_LIB_PORTMIDI=1" + end + system "make", *args + + bin.install %w[ + castool chdman floptool imgtool jedutil ldresample ldverify + nltool nlwav pngcmp regrep romcmp srcclean testkeys unidasm + ] + bin.install "split" => "rom-split" + bin.install "aueffectutil" if OS.mac? + man1.install Dir["docs/man/*.1"] + end + + # Needs more comprehensive tests + test do + # system "#{bin}/aueffectutil" # segmentation fault + system bin/"castool" + assert_match "chdman info", shell_output("#{bin}/chdman help info", 1) + system bin/"floptool" + system bin/"imgtool", "listformats" + system bin/"jedutil", "-viewlist" + assert_match "linear equation", shell_output("#{bin}/ldresample 2>&1", 1) + assert_match "avifile.avi", shell_output("#{bin}/ldverify 2>&1", 1) + system bin/"nltool", "--help" + system bin/"nlwav", "--help" + assert_match "image1", shell_output("#{bin}/pngcmp 2>&1", 10) + assert_match "summary", shell_output("#{bin}/regrep 2>&1", 1) + system bin/"romcmp" + system bin/"rom-split" + system bin/"srcclean" + assert_match "architecture", shell_output("#{bin}/unidasm", 1) + end +end diff --git a/Formula/r/ronn-ng.rb b/Formula/r/ronn-ng.rb new file mode 100644 index 0000000000000..b229c2848b0a6 --- /dev/null +++ b/Formula/r/ronn-ng.rb @@ -0,0 +1,48 @@ +class RonnNg < Formula + desc "Build man pages from Markdown" + homepage "https://github.com/apjanke/ronn-ng" + url "https://github.com/apjanke/ronn-ng/archive/refs/tags/v0.10.1.tar.gz" + sha256 "180f18015ce01be1d10c24e13414134363d56f9efb741fda460358bb67d96684" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "95544c3a98367e90154643f7ba9a8f1294be476483e7f2faa32a65344ed23cb0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d39afaff29b90a17336c9033eb12d405f5b8c29c7e804872a87281c889d84d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d39afaff29b90a17336c9033eb12d405f5b8c29c7e804872a87281c889d84d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d39afaff29b90a17336c9033eb12d405f5b8c29c7e804872a87281c889d84d9" + sha256 cellar: :any_skip_relocation, sonoma: "f0d1bcdca16b8ce2b8641e8224a374ebe25cb744721c84047cd101e505e07f72" + sha256 cellar: :any_skip_relocation, ventura: "f0d1bcdca16b8ce2b8641e8224a374ebe25cb744721c84047cd101e505e07f72" + sha256 cellar: :any_skip_relocation, arm64_linux: "d588a927ed953cb8901d41ab8af46b413fefc011d12e1e9c8aeabc23d582e35f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b303b18ed67bc5b328597d421c4a2c0449a5e65372706b04ed58f0f9319d10e" + end + + # Nokogiri 1.9 requires a newer Ruby + depends_on "ruby" + + conflicts_with "ronn", because: "both install `ronn` binaries" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "ronn-ng.gemspec" + system "gem", "install", "ronn-ng-#{version}.gem" + bin.install libexec/"bin/ronn" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + + bash_completion.install "completion/bash/ronn" + zsh_completion.install "completion/zsh/_ronn" + man1.install Dir["man/*.1"] + man7.install Dir["man/*.7"] + end + + test do + (testpath/"test.ronn").write <<~MARKDOWN + helloworld + ========== + + Hello, world! + MARKDOWN + + assert_match "Hello, world", shell_output("#{bin}/ronn --roff --pipe test.ronn") + end +end diff --git a/Formula/r/ronn.rb b/Formula/r/ronn.rb new file mode 100644 index 0000000000000..41b5541f1c787 --- /dev/null +++ b/Formula/r/ronn.rb @@ -0,0 +1,66 @@ +class Ronn < Formula + desc "Builds manuals - the opposite of roff" + homepage "https://rtomayko.github.io/ronn/" + url "https://github.com/rtomayko/ronn/archive/refs/tags/0.7.3.tar.gz" + sha256 "808aa6668f636ce03abba99c53c2005cef559a5099f6b40bf2c7aad8e273acb4" + license "MIT" + revision 4 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "d0a7ef5679c656bfa534874696403b31250acb374aafe0c6f6c7a4f18d6e6904" + sha256 arm64_sequoia: "ae47bcebfb7b492d6a6aa8f9dedcb248c79f657f37dd851b8148299120750253" + sha256 arm64_sonoma: "2aa277c67249e543b65df95bd8ae64e88276b8be25497c27edf923aa20933049" + sha256 arm64_ventura: "4a5a015611099aa8618e53d517cbb481528383ca8a7bcaa9a9684d403378308a" + sha256 sonoma: "2bdef28fa1cc074a01fe71f08be92eb459e5c6ff481af10cba987a69857cf89c" + sha256 ventura: "ae254f18931f756ddbbdbff72edeafe83c69be33b59b8dd809e8ccd5dabf4a96" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc1d853f9d17df76b12ef43bc6e54afb4804170372ee3ca5375b1070757e6a72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7039deef414574510a014b1ee4f0b676b0535b1af20fad6c46af736425608795" + end + + depends_on "groff" => :test + + uses_from_macos "ruby" + + on_linux do + depends_on "util-linux" => :test # for `col` + end + + conflicts_with "ronn-ng", because: "both install `ronn` binaries" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "ronn.gemspec" + system "gem", "install", "ronn-#{version}.gem" + bin.install libexec/"bin/ronn" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + man1.install "man/ronn.1" + man7.install "man/ronn-format.7" + end + + test do + (testpath/"test.ronn").write <<~MARKDOWN + simple(7) -- a simple ronn example + ================================== + + This document is created by ronn. + MARKDOWN + system bin/"ronn", "--date", "1970-01-01", "test.ronn" + assert_equal <<~EOS, pipe_output("col -bx", shell_output("groff -t -man -Tascii -P -c test.7")) + SIMPLE(7) SIMPLE(7) + + NAME + simple - a simple ronn example + + This document is created by ronn. + + January 1970 SIMPLE(7) + EOS + end +end diff --git a/Formula/r/root.rb b/Formula/r/root.rb new file mode 100644 index 0000000000000..1af94a983b5a0 --- /dev/null +++ b/Formula/r/root.rb @@ -0,0 +1,288 @@ +class Root < Formula + desc "Analyzing petabytes of data, scientifically" + homepage "https://root.cern" + license "LGPL-2.1-or-later" + head "https://github.com/root-project/root.git", branch: "master" + + stable do + url "https://root.cern/download/root_v6.36.04.source.tar.gz" + sha256 "cc6367d8f563c6d49ca34c09d0b53cb0f41a528db6f86af111fd76744cda4596" + + # Backport part of https://github.com/root-project/root/commit/b2acf687d6b5f887b8f97f35d9b3b011adad5be4 + patch :DATA + end + + livecheck do + url "https://root.cern/install/all_releases/" + regex(%r{Release\s+v?(\d+(?:[./]\d*[02468])+)[ >]}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match[0].tr("/", ".") } + end + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "ed9d4282ded3457e3139056751988bfd2d90271cdf6de66e2afdd4b8b6f44edb" + sha256 arm64_sequoia: "b68c5ff50c110d60676a6b626d560ced387556e5af886c1ec1dad171c83e812e" + sha256 arm64_sonoma: "e04e980da5708dc1ae328f915c137342bad17a6077225bc7e004e18b2f67df78" + sha256 sonoma: "5ad919d084f7f9169bbb8a43083cc9ef001b188b4e9b59683daf67cb55fda070" + sha256 arm64_linux: "b284374086f6ba4dfe34e87328e406a37fd5d45533fc8e5fdd53c70d14a43c94" + sha256 x86_64_linux: "59499409a173c58534a22361a91ed8baebc7bf07dc43c74128ecf4b06aaf5748" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "cfitsio" + depends_on "davix" + depends_on "fftw" + depends_on "freetype" + depends_on "ftgl" + depends_on "gcc" # for gfortran + depends_on "giflib" + depends_on "gl2ps" + depends_on "glew" + depends_on "graphviz" + depends_on "gsl" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "lz4" + depends_on "mariadb-connector-c" + depends_on "nlohmann-json" + depends_on "numpy" # for tmva + depends_on "openblas" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "python@3.14" + depends_on "sqlite" + depends_on "tbb" + depends_on "xrootd" + depends_on "xxhash" + depends_on "xz" # for LZMA + depends_on "zstd" + + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_ventura :or_older do + depends_on :xcode + end + + on_linux do + depends_on "libx11" + depends_on "libxext" + depends_on "libxft" + depends_on "libxpm" + depends_on "mesa" + depends_on "mesa-glu" + end + + skip_clean "bin" + + def python3 + "python3.14" + end + + def install + # Workaround for CMake 4 due to VDT, https://github.com/dpiparo/vdt/blob/master/CMakeLists.txt + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + # Skip modification of CLING_OSX_SYSROOT to the unversioned SDK path + # Related: https://github.com/Homebrew/homebrew-core/issues/135714 + # Related: https://github.com/root-project/cling/issues/457 + if OS.mac? && MacOS.version > :ventura + inreplace "interpreter/cling/lib/Interpreter/CMakeLists.txt", '"MacOSX[.0-9]+\.sdk"', '"SKIP"' + end + + inreplace "cmake/modules/SearchInstalledSoftware.cmake" do |s| + # Enforce secure downloads of vendored dependencies. These are + # checksummed in the cmake file with sha256. + s.gsub! "http://lcgpackages", "https://lcgpackages" + # Patch out check that skips using brewed glew. + s.gsub! "CMAKE_VERSION VERSION_GREATER 3.15", "CMAKE_VERSION VERSION_GREATER 99.99" + end + + args = %W[ + -DCLING_CXX_PATH=clang++ + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_INSTALL_ELISPDIR=#{elisp} + -DPYTHON_EXECUTABLE=#{which(python3)} + -DXROOTD_ROOT_DIR=#{Formula["xrootd"].opt_prefix} + -Dbuiltin_cfitsio=OFF + -Dbuiltin_clang=ON + -Dbuiltin_cling=ON + -Dbuiltin_cppzmq=OFF + -Dbuiltin_davix=OFF + -Dbuiltin_fftw3=OFF + -Dbuiltin_freetype=OFF + -Dbuiltin_ftgl=OFF + -Dbuiltin_gl2ps=OFF + -Dbuiltin_glew=OFF + -Dbuiltin_gsl=OFF + -Dbuiltin_llvm=ON + -Dbuiltin_lz4=OFF + -Dbuiltin_lzma=OFF + -Dbuiltin_nlohmannjson=OFF + -Dbuiltin_openssl=OFF + -Dbuiltin_openui5=ON + -Dbuiltin_pcre=OFF + -Dbuiltin_tbb=OFF + -Dbuiltin_unuran=OFF + -Dbuiltin_vc=OFF + -Dbuiltin_vdt=ON + -Dbuiltin_veccore=OFF + -Dbuiltin_xrootd=OFF + -Dbuiltin_xxhash=OFF + -Dbuiltin_zeromq=OFF + -Dbuiltin_zlib=OFF + -Dbuiltin_zstd=OFF + -Dcfitsio=ON + -Ddavix=ON + -Ddev=OFF + -Dfail-on-missing=ON + -Dfftw3=ON + -Dfitsio=ON + -Dfortran=ON + -Dfreetype=ON + -Dgdml=ON + -Dgfal=OFF + -Dgnuinstall=ON + -Dimt=ON + -Dmathmore=ON + -Dmysql=ON + -Docaml=OFF + -Doracle=OFF + -Dpgsql=OFF + -Dpyroot=ON + -Dpythia6=OFF + -Dpythia8=OFF + -Droofit=ON + -Dssl=ON + -Dtmva=ON + -Dvdt=ON + -Dxrootd=ON + -GNinja + ] + + # Workaround the shim directory being embedded into the output + inreplace "cmake/unix/compiledata.sh", "`type -path $CXX`", ENV.cxx + + # Homebrew now sets CMAKE_INSTALL_LIBDIR to /lib, which is incorrect + # for ROOT with gnuinstall, so we set it back here. + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args(install_libdir: "lib/root") + system "cmake", "--build", "builddir" + system "ctest", "-R", "tutorial-tree", "--verbose", "--parallel", ENV.make_jobs, "--test-dir", "builddir" + system "cmake", "--install", "builddir" + + chmod 0755, bin.glob("*.*sh") + + pth_contents = "import site; site.addsitedir('#{lib}/root')\n" + (prefix/Language::Python.site_packages(python3)/"homebrew-root.pth").write pth_contents + end + + def caveats + <<~TEXT + As of ROOT 6.22, you should not need the thisroot scripts; but if you + depend on the custom variables set by them, you can still run them: + + For bash users: + . #{HOMEBREW_PREFIX}/bin/thisroot.sh + For zsh users: + pushd #{HOMEBREW_PREFIX} >/dev/null; . bin/thisroot.sh; popd >/dev/null + For csh/tcsh users: + source #{HOMEBREW_PREFIX}/bin/thisroot.csh + For fish users: + . #{HOMEBREW_PREFIX}/bin/thisroot.fish + TEXT + end + + test do + (testpath/"test.C").write <<~CPP + #include + void test() { + std::cout << "Hello, world!" << std::endl; + } + CPP + + # Test ROOT command line mode + system bin/"root", "-b", "-l", "-q", "-e", "gSystem->LoadAllLibraries(); 0" + + # Test ROOT executable + assert_equal "\nProcessing test.C...\nHello, world!\n", + shell_output("#{bin}/root -l -b -n -q test.C") + + # Test ACLiC + assert_equal "\nProcessing test.C+...\nHello, world!\n", + shell_output("#{bin}/root -l -b -n -q test.C+") + + # Test linking + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + std::cout << TString("Hello, world!") << std::endl; + return 0; + } + CPP + flags = %w[cflags libs ldflags].map { |f| "$(#{bin}/root-config --#{f})" } + flags << "-Wl,-rpath,#{lib}/root" + shell_output("$(#{bin}/root-config --cxx) test.cpp #{flags.join(" ")}") + assert_equal "Hello, world!\n", shell_output("./a.out") + + # Test Python module + system python3, "-c", "import ROOT; ROOT.gSystem.LoadAllLibraries()" + end +end + +__END__ +diff --git a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt +index 911517294b..03406a9663 100644 +--- a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt ++++ b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt +@@ -104,6 +104,11 @@ target_include_directories(${libname} + + set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${libname}) + ++if(NOT MSVC) ++ # Make sure that relative RUNPATH to main ROOT libraries is always correct. ++ ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_PYTHONDIR}) ++endif() ++ + # Install library + install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries +diff --git a/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt b/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt +index f296f3886d..25862bfa44 100644 +--- a/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt ++++ b/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt +@@ -38,6 +38,11 @@ add_dependencies(${libname} move_headers) + + set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${libname}) + ++if(NOT MSVC) ++ # Make sure that relative RUNPATH to main ROOT libraries is always correct. ++ ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_PYTHONDIR}) ++endif() ++ + # Install library + install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries +diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt +index e222e04c0e..30ef38edd9 100644 +--- a/bindings/pyroot/pythonizations/CMakeLists.txt ++++ b/bindings/pyroot/pythonizations/CMakeLists.txt +@@ -210,6 +210,11 @@ endforeach() + add_library(PyROOT INTERFACE) + target_link_libraries(PyROOT INTERFACE cppyy_backend cppyy ROOTPythonizations) + ++if(NOT MSVC) ++ # Make sure that relative RUNPATH to main ROOT libraries is always correct. ++ ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_PYTHONDIR}) ++endif() ++ + # Install library + install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries diff --git a/Formula/r/ropebwt3.rb b/Formula/r/ropebwt3.rb new file mode 100644 index 0000000000000..4010e9d7cf35b --- /dev/null +++ b/Formula/r/ropebwt3.rb @@ -0,0 +1,42 @@ +class Ropebwt3 < Formula + desc "BWT construction and search" + homepage "https://github.com/lh3/ropebwt3" + url "https://github.com/lh3/ropebwt3/archive/refs/tags/v3.9.tar.gz" + sha256 "0c04879f97c92607017c00e0afc5a4e0428a8467573336300ebf3c1a6bcc4d75" + license all_of: ["MIT", "Apache-2.0"] + head "https://github.com/lh3/ropebwt3.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1fd8c8dd77a58cf32286767fa19cdeb1336b68b1355cae82fd65307cc4ea3562" + sha256 cellar: :any, arm64_sequoia: "bd66115bce6f069c5b16a3c87fba2a4e3e0a158965a4062ebba86e2f2598d0a5" + sha256 cellar: :any, arm64_sonoma: "9f099ff6a4f3cff8d08cda4f651550cc8a8767f264133aba3e1052381619da6e" + sha256 cellar: :any, arm64_ventura: "4a8827a9eeb1208e28f6b81e6c075863d3db3851ebeab0ff606f34bbb32cbc93" + sha256 cellar: :any, sonoma: "8b5139751d4261dc40d196fcd21065c987cf1c41c53466b70cdb488c07dedff7" + sha256 cellar: :any, ventura: "e3626c7ebb2560e191e053f1ad58e4fdf00fac77607e5ac4ed135a311a8a059c" + sha256 cellar: :any_skip_relocation, arm64_linux: "79e746f565e4e6ad4e0eeba31edf33a40dc74bb964e87f86895f5f549c094b1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd94cda69d5a156c7c72a9dae14176f3dc38f2c2855dcad7f64753b1832a4c80" + end + + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + def install + args = [] + args << "LIBS=-L#{Formula["libomp"].opt_lib} -lomp -lpthread -lz -lm" if OS.mac? + system "make", *args + bin.install "ropebwt3" + end + + test do + (testpath/"test.txt").write <<~EOS + TGAACTCTACACAACATATTTTGTCACCAAG + EOS + system bin/"ropebwt3", "build", "test.txt", "-Ldo", "idx.fmd" + assert_path_exists "idx.fmd" + end +end diff --git a/Formula/r/rosa-cli.rb b/Formula/r/rosa-cli.rb new file mode 100644 index 0000000000000..9614c427059a1 --- /dev/null +++ b/Formula/r/rosa-cli.rb @@ -0,0 +1,38 @@ +class RosaCli < Formula + desc "RedHat OpenShift Service on AWS (ROSA) command-line interface" + homepage "https://www.openshift.com/products/amazon-openshift" + url "https://github.com/openshift/rosa/archive/refs/tags/v1.2.57.tar.gz" + sha256 "f02757e4936958e35f84d785bdd99aadd02b14599527f722a5742d4bac59add4" + license "Apache-2.0" + head "https://github.com/openshift/rosa.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "76fa2933976bf13c81823b87f8c5dc4d47f3bb78b1ded5cedca43580ec2715bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "372ef5c6b6abd6a0e8ba6e87f5bc771e5b256ca9fb3ee662737d5e370a13ea7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d164b3a7dac7c63fdb4d26b68296583a3e9a25aa75fbe4cf3dc93ab5b75acaf2" + sha256 cellar: :any_skip_relocation, sonoma: "4bba0a0bdb02328ea274b0f6a80ed1e5242027f720091c39c83c3ccc38113e65" + sha256 cellar: :any_skip_relocation, arm64_linux: "93c7ca49b46c5aa1f2320cadce69feda61ba97bb101245efccf174d492bece9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8cf08b8f74c2b2afd7ec9aa2dbe0f444caf3f5eb51acc2e5c89abd0146b68f8" + end + + depends_on "go" => :build + depends_on "awscli" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"rosa"), "./cmd/rosa" + + generate_completions_from_executable(bin/"rosa", "completion") + end + + test do + output = shell_output("#{bin}/rosa create cluster 2<&1", 1) + assert_match "Failed to create OCM connection: Not logged in", output + + assert_match version.to_s, shell_output("#{bin}/rosa version") + end +end diff --git a/Formula/r/rospo.rb b/Formula/r/rospo.rb new file mode 100644 index 0000000000000..af417ef150707 --- /dev/null +++ b/Formula/r/rospo.rb @@ -0,0 +1,31 @@ +class Rospo < Formula + desc "Simple, reliable, persistent ssh tunnels with embedded ssh server" + homepage "https://github.com/ferama/rospo" + url "https://github.com/ferama/rospo/archive/refs/tags/v0.15.1.tar.gz" + sha256 "338157a7a34abf35f7fdb84a1667c49e07d95cd3ef33e8e5f9ce2cb0e55d4647" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "098ce38c1855fffde3d35d6ac17f8f83ae154014725a8a6e88200c5eb19c7135" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "098ce38c1855fffde3d35d6ac17f8f83ae154014725a8a6e88200c5eb19c7135" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "098ce38c1855fffde3d35d6ac17f8f83ae154014725a8a6e88200c5eb19c7135" + sha256 cellar: :any_skip_relocation, sonoma: "04c2a346275bf6ad2b999c55f3e47531dbaa5c63be2db2e30ea43210f72ab6da" + sha256 cellar: :any_skip_relocation, arm64_linux: "a09ced40fcb5678474430ece4175e646fa6ef02e87d87d32b8fe6650a388dba0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6448928c03fe0e27d84213e2ac02508ffdf652df73c6eefcc008df82c641c5a0" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X 'github.com/ferama/rospo/cmd.Version=#{version}'") + + generate_completions_from_executable(bin/"rospo", "completion") + end + + test do + system bin/"rospo", "-v" + system bin/"rospo", "keygen", "-s" + assert_path_exists testpath/"identity" + assert_path_exists testpath/"identity.pub" + end +end diff --git a/Formula/r/roswell.rb b/Formula/r/roswell.rb new file mode 100644 index 0000000000000..764576e5295d4 --- /dev/null +++ b/Formula/r/roswell.rb @@ -0,0 +1,38 @@ +class Roswell < Formula + desc "Lisp installer and launcher for major environments" + homepage "https://github.com/roswell/roswell" + url "https://github.com/roswell/roswell/archive/refs/tags/v24.10.115.tar.gz" + sha256 "9c23cb263d4645caaae21cda8f1f5793b0f08ee5c5338aab5974cb4f473d1c4b" + license "MIT" + head "https://github.com/roswell/roswell.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "609cf8897c3fc361cd9d09404b20ecf46f426625f17f0549c1b6db755fde9129" + sha256 arm64_sequoia: "aba14ed969bb0a51b5a0e6d2e88e38e7fab528d5f97cc2e5eef13685287f7a35" + sha256 arm64_sonoma: "6fe9684d8976b196444abb760c8c2efcdf270be7a8049a85eec0783c6d306b14" + sha256 arm64_ventura: "2d4fea24b4c5de40377044a3291b4e9c52726471429ccfa7e1d5cb947c469e9a" + sha256 sonoma: "3a5d20abf0c25e826d79e3b8aa6590e7a3bc4357b382d60bd989cdfa2ec32768" + sha256 ventura: "ed5e9df8bb6046e88d6a2dd3cfa3d21cdbbdda109a36b6f29c8cf08f56a5d0c6" + sha256 arm64_linux: "53775b6576486eb4ed0a7fa0145f85795791ceeb2ebe7182006068d8039f4039" + sha256 x86_64_linux: "86f21b721166645b445f0419c8a8c5b91ee22202e6ec3b9cf620266a93d588d7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "curl" + + def install + system "./bootstrap" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + ENV["ROSWELL_HOME"] = testpath + system bin/"ros", "init" + assert_path_exists testpath/"config" + end +end diff --git a/Formula/r/roundup.rb b/Formula/r/roundup.rb new file mode 100644 index 0000000000000..5504ca50068df --- /dev/null +++ b/Formula/r/roundup.rb @@ -0,0 +1,25 @@ +class Roundup < Formula + desc "Unit testing tool" + homepage "https://bmizerany.github.io/roundup" + url "https://github.com/bmizerany/roundup/archive/refs/tags/v0.0.6.tar.gz" + sha256 "20741043ed5be7cbc54b1e9a7c7de122a0dacced77052e90e4ff08e41736f01c" + license "MIT" + head "https://github.com/bmizerany/roundup.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8e7150a458867eba0d53eae749b908b7bb9f8f2d8838471025e4570aee54e846" + end + + def install + system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" + system "make", "SHELL=/bin/bash" + system "make", "install" + end + + test do + system bin/"roundup", "-v" + end +end diff --git a/Formula/r/rover.rb b/Formula/r/rover.rb new file mode 100644 index 0000000000000..2a8690dfde5c9 --- /dev/null +++ b/Formula/r/rover.rb @@ -0,0 +1,42 @@ +class Rover < Formula + desc "CLI for managing and maintaining data graphs with Apollo Studio" + homepage "https://www.apollographql.com/docs/rover/" + url "https://github.com/apollographql/rover/archive/refs/tags/v0.36.2.tar.gz" + sha256 "b176e9d137dec3a80495efecf3c1227bc38ce1c44f7a018748858f491bb4a010" + license "MIT" + head "https://github.com/apollographql/rover.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26582b2959e3d939ba2d0e18ec07c7e2e0f6fa34d78c862e9586c549933713e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "890bb39f17f71dfab2f4034584734cd691fdac644c271bc41e3c38f2a0576d43" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c640298c5372e67ea1e135a25887d2344ecda6dd9fc9d41c0eb5755d1ef3182" + sha256 cellar: :any_skip_relocation, sonoma: "e9cb87cc4876d886638e0d30466d5024918b73e4b85583441c8016bcc8d723a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "173b8c9f0e7d2122f78136a5cf118a3bf782211f09dd021637eb7ebf369bcc55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e9126b2ee4ec3d7a3b86845714165e553c20c94950403b22ae6b97cbb8a6e25" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/rover graph introspect https://graphqlzero.almansi.me/api") + assert_match "directive @specifiedBy", output + + assert_match version.to_s, shell_output("#{bin}/rover --version") + end +end diff --git a/Formula/r/roxctl.rb b/Formula/r/roxctl.rb new file mode 100644 index 0000000000000..42e92850ac5b3 --- /dev/null +++ b/Formula/r/roxctl.rb @@ -0,0 +1,39 @@ +class Roxctl < Formula + desc "CLI for Stackrox" + homepage "https://www.stackrox.io/" + url "https://github.com/stackrox/stackrox/archive/refs/tags/4.9.0.tar.gz" + sha256 "6095572514a536986b6531104d3db578896c8d427c090c54bf596881b593b9dc" + license "Apache-2.0" + head "https://github.com/stackrox/stackrox.git", branch: "master" + + # Upstream maintains multiple major/minor versions and the "latest" release + # may be for a lower version, so we have to check multiple releases to + # identify the highest version. + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dbc3584f207143d35f4b0993116f94209c4c7acfff225f1f0e49857a67c07e95" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9cfdcb483a2f31260fc01b712d2d2d078bf715a671c1b7e8314cd1292c35551" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23f4f751735c5ad9f29c3899523e6a19721d5a142eeaf7dbc22fbc250668d99d" + sha256 cellar: :any_skip_relocation, sonoma: "7dbe34c8552865dd27b90f275dc167e68b957bb900cd183ef90a942c9c33c2cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "3dc71d11f2fc0af5b580fe1241fca1e02499f6e9cd444dd77fdbe837c60c20a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b948eaaff62e0384ec0da59f25dcd35240ac4d8eb42e785208c3c50f654c6423" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./roxctl" + + generate_completions_from_executable(bin/"roxctl", "completion") + end + + test do + output = shell_output("#{bin}/roxctl central whoami 2<&1", 1) + + assert_match "please run \"roxctl central login\" to obtain credentials", output + end +end diff --git a/Formula/r/rp.rb b/Formula/r/rp.rb new file mode 100644 index 0000000000000..6fe369787f457 --- /dev/null +++ b/Formula/r/rp.rb @@ -0,0 +1,35 @@ +class Rp < Formula + desc "Tool to find ROP sequences in PE/Elf/Mach-O x86/x64 binaries" + homepage "https://github.com/0vercl0k/rp" + url "https://github.com/0vercl0k/rp/archive/refs/tags/v2.1.5.tar.gz" + sha256 "045b0d4a7d955e281e35b2f52fa8f23e4abad55256c3732d22469af8112f5f63" + license "MIT" + head "https://github.com/0vercl0k/rp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6e7d0e301739ea8b86bf88427a9795ae43af3acb7828e979872cece18961092" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4b0079ef8a1dd420686a4e7f4b9842c32993ef42112604bedbb34064715f739" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "313292a48d7096f7ff4f15e48a8849aba3e33c3ce468fcf2994c68114e1cb69b" + sha256 cellar: :any_skip_relocation, sonoma: "f1398c2e1b74b7e0f2902d9bcdec0197469d9e6bcb1f32aff45562cce3f7b4a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f36ceb5d5cb7b6f944bbb4be0d4e74012ee0d36a8cb0a13cd5f4bdc1e8e41750" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fc42c86ae8f60d97ae8a3eae5c738d4c49cde9ee31d2bf705d68def1d62adbd" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", "src", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + + os = OS.mac? ? "osx" : "lin" + bin.install "build/rp-#{os}" + end + + test do + os = OS.mac? ? "osx" : "lin" + rp = bin/"rp-#{os}" + output = shell_output("#{rp} --file #{rp} --rop=1 --unique") + assert_match "FileFormat: #{OS.mac? ? "Mach-o" : "Elf"}", output + assert_match(/\d+ unique gadgets found/, output) + end +end diff --git a/Formula/r/rpcsvc-proto.rb b/Formula/r/rpcsvc-proto.rb new file mode 100644 index 0000000000000..9f7052f2d98c3 --- /dev/null +++ b/Formula/r/rpcsvc-proto.rb @@ -0,0 +1,47 @@ +class RpcsvcProto < Formula + desc "Rpcsvc protocol definitions from glibc" + homepage "https://github.com/thkukuk/rpcsvc-proto" + url "https://github.com/thkukuk/rpcsvc-proto/releases/download/v1.4.4/rpcsvc-proto-1.4.4.tar.xz" + sha256 "81c3aa27edb5d8a18ef027081ebb984234d5b5860c65bd99d4ac8f03145a558b" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4bbc594d97b03ddb65f8a7caaf4521cd12c5a7bc463f3e4c051d5ff08dd010b1" + sha256 cellar: :any, arm64_sequoia: "076bec1fd5bdddb95185b92aa72a11b94e72cece029eb771edabe98cf805b91d" + sha256 cellar: :any, arm64_sonoma: "af9f762a02610698572a23013b726055104c910c96d1d9f0dd5173261f0989a1" + sha256 cellar: :any, arm64_ventura: "af81bdfc3e4e2ba5e41993f84e71ad26054d91a92bb9e65532e6fd6e553c53ea" + sha256 cellar: :any, arm64_monterey: "65f7f9272dd8f9ad6bf4de8a8c31c2dfc80ab7f02ad44e8321e5cd1472f710f3" + sha256 cellar: :any, sonoma: "f140baf7a5cf933905991ed2e683dd0ec0aac61538e58c03e614300d5d399f9a" + sha256 cellar: :any, ventura: "07342449582194d02bf19968decfba8f15443bd9d104d681ed1fb00c218619d7" + sha256 cellar: :any, monterey: "4553fc6e7525cb0d22c9ee9959eac99d6f00ae22529097d8800c31f30e6c6475" + sha256 cellar: :any_skip_relocation, arm64_linux: "466aa9b9b6c1df9be8a1dd57f8c71aeee487d6a2d0eb8d54d593d1074e35fcb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f595f1a5c182488fe70c250ae8b6c37064231380b521498390bf6964ad0c0d0" + end + + keg_only :shadowed_by_macos + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match "nettype", shell_output("#{bin}/rpcgen 2>&1", 1) + + (testpath/"msg.x").write <<~EOS + program MESSAGEPROG { + version PRINTMESSAGEVERS { + int PRINTMESSAGE(string) = 1; + } = 1; + } = 0x20000001; + EOS + system bin/"rpcgen", "msg.x" + assert_path_exists "msg_svc.c" + end +end diff --git a/Formula/r/rpds-py.rb b/Formula/r/rpds-py.rb new file mode 100644 index 0000000000000..66b111d4dd600 --- /dev/null +++ b/Formula/r/rpds-py.rb @@ -0,0 +1,57 @@ +class RpdsPy < Formula + include Language::Python::Virtualenv + + desc "Python bindings to Rust's persistent data structures" + homepage "https://rpds.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/48/dc/95f074d43452b3ef5d06276696ece4b3b5d696e7c9ad7173c54b1390cd70/rpds_py-0.28.0.tar.gz" + sha256 "abd4df20485a0983e2ca334a216249b6186d6e3c1627e106651943dbdb791aea" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3ab4d5cce2974a42c5c8b30ef551a329b2f3da83193a1acf78e1f7a1888509fb" + sha256 cellar: :any, arm64_sequoia: "217e63e10f4e098b4879dd16653fb182b34e1e7968f0fd2d245f2c088eae2798" + sha256 cellar: :any, arm64_sonoma: "4e6026531d9aa4d1e168bbf7c2f4be2f201282bc013922fbba6c467373ca5494" + sha256 cellar: :any, sonoma: "ce8ec3940c3ae977a2f81c79b0341366aa03ea02be270c6b2b6c96b016cbb139" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cca18b616a53b259104db0d5e06f07a1a27703d586767ed7a10bd23c6a7e34d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbcf1d6e432b3a771a1309a49550fe12230d2ae15821ddc5dbc27c4e765e5a89" + end + + depends_on "maturin" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "rust" => :build + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python3| + system python3, "-m", "pip", "install", *std_pip_args, "." + end + end + + test do + (testpath/"test.py").write <<~EOS + from rpds import HashTrieMap, HashTrieSet, List + + m = HashTrieMap({"foo": "bar", "baz": "quux"}) + assert m.insert("spam", 37) == HashTrieMap({"foo": "bar", "baz": "quux", "spam": 37}) + assert m.remove("foo") == HashTrieMap({"baz": "quux"}) + + s = HashTrieSet({"foo", "bar", "baz", "quux"}) + assert s.insert("spam") == HashTrieSet({"foo", "bar", "baz", "quux", "spam"}) + assert s.remove("foo") == HashTrieSet({"bar", "baz", "quux"}) + + L = List([1, 3, 5]) + assert L.push_front(-1) == List([-1, 1, 3, 5]) + assert L.rest == List([3, 5]) + EOS + + pythons.each do |python3| + system python3, "test.py" + end + end +end diff --git a/Formula/r/rpg-cli.rb b/Formula/r/rpg-cli.rb new file mode 100644 index 0000000000000..609fb30ad2615 --- /dev/null +++ b/Formula/r/rpg-cli.rb @@ -0,0 +1,31 @@ +class RpgCli < Formula + desc "Your filesystem as a dungeon!" + homepage "https://github.com/facundoolano/rpg-cli" + url "https://github.com/facundoolano/rpg-cli/archive/refs/tags/1.2.0.tar.gz" + sha256 "f3993abe7b73666bc3707760dcc650aa9190cd3e7f06be846a0b6adcbbc46663" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "edd64ad86609935c99c399b86b814c9a7a610ab4cb5c4f18f11e5af5ff740d3b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8df05e6cd29026836157d0d4e353c0bedc5f6e2277bce65c6fff92a05de4325" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed6c2539e1e7b9d1079bdd4f44657f0e9cbbf080b26b10914740e1c4e1c66c5d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b3aa7bb85909465f6294355b202e8fdea963e623597df22577379e5188a79fff" + sha256 cellar: :any_skip_relocation, sonoma: "9b8763db1563256899273d21fb28c19886c4d0f65ec4d65cfe2ad3399d538c48" + sha256 cellar: :any_skip_relocation, ventura: "9b44a22701315fd658b98b3709c98ce4217076c1b4e37b717d4e687a15500d94" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c17280c6a4287274a9ea54c9986a47fc3ddb053bc21748ce0ca91d68a5c20d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "558c7cd2a9865a8f476b81da9c4f75dddad70a0f07ea4aab349ba9260ae822c6" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output(bin/"rpg-cli").strip + assert_match "hp", output + assert_match "equip", output + assert_match "item", output + end +end diff --git a/Formula/r/rpki-client.rb b/Formula/r/rpki-client.rb new file mode 100644 index 0000000000000..1f9cf4cbde486 --- /dev/null +++ b/Formula/r/rpki-client.rb @@ -0,0 +1,49 @@ +class RpkiClient < Formula + desc "OpenBSD portable rpki-client" + homepage "https://www.rpki-client.org/" + url "https://ftp.openbsd.org/pub/OpenBSD/rpki-client/rpki-client-9.6.tar.gz" + sha256 "07cbd27af99f1b6096769e697e38631519c69cb642bee3af39a763fa1590d947" + license "ISC" + + livecheck do + url "https://ftp.openbsd.org/pub/OpenBSD/rpki-client/" + regex(/href=.*?rpki-client[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "386aed54aea55578ce811e6142d56de455e5ffcb741dd1ef7c7742d6093df26c" + sha256 arm64_sequoia: "22c0ecfc8181ea41b2b1820a36efeb70eb72ded706502cf2e750806680904728" + sha256 arm64_sonoma: "99c30f0e4caf53f5487c9760e0a5eb3b6b693a90800d00531131dacfb52a7087" + sha256 sonoma: "b99f81eb26b79235ef46dcb35b709b0a2aadebe44107e25e2f64b742415ed5ce" + sha256 arm64_linux: "f80741224cd761de78a16c2b085e34098d13e2ee92499f17cccfe92d61d75d0a" + sha256 x86_64_linux: "14dd3402ccdebb577ec400dfd337371266503e190021934669474999906d3468" + end + + depends_on "pkgconf" => :build + depends_on "libretls" + depends_on "openssl@3" + depends_on "rsync" + + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + system "./configure", "--with-rsync=#{Formula["rsync"].opt_bin}/rsync", + "--disable-silent-rules", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + *std_configure_args + system "make", "install" + end + + def post_install + # make the var/db,cache/rpki-client dirs + (var/"db/rpki-client").mkpath + (var/"cache/rpki-client").mkpath + end + + test do + assert_match "VRP Entries: 0 (0 unique)", shell_output("#{sbin}/rpki-client -n -d . -R . 2>&1") + assert_match "rpki-client-portable #{version}", shell_output("#{sbin}/rpki-client -V 2>&1") + end +end diff --git a/Formula/r/rpl.rb b/Formula/r/rpl.rb new file mode 100644 index 0000000000000..7bff8f8ad58a8 --- /dev/null +++ b/Formula/r/rpl.rb @@ -0,0 +1,47 @@ +class Rpl < Formula + include Language::Python::Virtualenv + + desc "Text replacement utility" + homepage "https://github.com/rrthomas/rpl" + url "https://files.pythonhosted.org/packages/f0/85/81cd913d43251f923a56b44586c717f41e8ff5e4ea35d2ced60e9de00bbd/rpl-1.18.tar.gz" + sha256 "378d38de283f6682f85e93695396f3461d719778e17a8013f64bd87d7f671d7e" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f30ceeb460bc67d3594e702e9de5c42ba913a5388515b754d6225542e6d18fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "db734192128a7e60d98bf9d06faa0086d0abfa483201e93db0e877c20566b91f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6f80cd4cfbaebbd99d7d4f99c4484d88335707ed458253fde37653e1928cf904" + sha256 cellar: :any_skip_relocation, sonoma: "47fab5f6519ffeea8846065f66842a6b13b2e825c2542f93065ea0e3aa42bb8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a50d816a8cbc804290630c63e1a7a4fae2fdfc702ff3424db8d6dd1ce8a875ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0bb1e34afdd4f02172a30480efb626a835b70e988fe37b020aa4312d0453f02" + end + + depends_on "python@3.14" + + resource "chainstream" do + url "https://files.pythonhosted.org/packages/a5/cc/93357fd1f53c61fdc6111a6d9ea2cc565b2c1be9227c15bb036a0db0396b/chainstream-1.0.2.tar.gz" + sha256 "b32975d3b3d1c030a507ac298044c28fa3ca30d527abdfae281edd53276617b3" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test").write "I like water." + + system bin/"rpl", "-v", "water", "beer", "test" + assert_equal "I like beer.", (testpath/"test").read + end +end diff --git a/Formula/r/rpm.rb b/Formula/r/rpm.rb new file mode 100644 index 0000000000000..e70d58770ba4b --- /dev/null +++ b/Formula/r/rpm.rb @@ -0,0 +1,207 @@ +class Rpm < Formula + desc "Standard unix software packaging tool" + homepage "https://rpm.org/" + license all_of: [ + "GPL-2.0-only", + "LGPL-2.0-or-later", # rpm-sequoia + ] + version_scheme 1 + head "https://github.com/rpm-software-management/rpm.git", branch: "master" + + stable do + url "https://ftp.osuosl.org/pub/rpm/releases/rpm-4.20.x/rpm-4.20.1.tar.bz2" + sha256 "52647e12638364533ab671cbc8e485c96f9f08889d93fe0ed104a6632661124f" + + # Backport commit needed to fix handling of -fhardened + patch do + url "https://github.com/rpm-software-management/rpm/commit/e1d7046ba6662eac9e5e7638e484eb792afa36cc.patch?full_index=1" + sha256 "ae5358bb8d2b4f1d1a80463adf6b4fa3f28872efad3f9157e822f9318876ad9c" + end + end + + # Upstream uses a 90+ patch to indicate prerelease versions (e.g., the + # tarball for "RPM 4.19 ALPHA" is `rpm-4.18.90.tar.bz2`). + livecheck do + url "https://rpm.org/download.html" + regex(/href=.*?rpm[._-]v?(\d+\.\d+(?:\.(?:\d|[1-8]\d+)(?:\.\d+)*))\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "817cfbba4fe88dd1ca4446d936bb6c4cae68f70af1895e72b2d9af20186fc6ea" + sha256 arm64_sequoia: "2ceece493065a153759bd8a81b001e1ae817b0315bd322aaf0190cd84b063910" + sha256 arm64_sonoma: "4bf279262ec127bb86a4b685f6a7e8ea3b854d865c71a173d2b3e4a1401db64b" + sha256 sonoma: "11d285a8bf603a8d7ae76af2d102c6c34ecf272cc5378335a3b6e5684605560d" + sha256 arm64_linux: "eda731a1351179e9a65f885cdf588db00f9e417b670328366bce636c13143916" + sha256 x86_64_linux: "70eaf4ff4ead4d9aa599087e5be5998ab22827cfef4f54d1ed5e682b61f7c05b" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "rust" => :build # for rpm-sequoia + + depends_on "gmp" + depends_on "libarchive" + depends_on "libmagic" + depends_on "lua" + # See https://github.com/rpm-software-management/rpm/issues/2222 for details. + depends_on macos: :ventura + depends_on "nettle" # for rpm-sequoia + depends_on "pkgconf" + depends_on "popt" + depends_on "readline" + depends_on "sqlite" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "llvm" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "libomp" + end + + on_linux do + depends_on "elfutils" + end + + conflicts_with "rpm2cpio", because: "both install `rpm2cpio` binaries" + + resource "rpm-sequoia" do + url "https://github.com/rpm-software-management/rpm-sequoia/archive/refs/tags/v1.8.0.tar.gz" + sha256 "a34de2923f07b2610de82baa42f664850a4caedc23c35b39df315d94cb5dc751" + end + + # Apply nixpkgs patch to work around build failure on macOS + # Issue ref: https://github.com/rpm-software-management/rpm/issues/3688 + patch do + on_macos do + url "https://raw.githubusercontent.com/NixOS/nixpkgs/3d52077f5a6331c12eeb7b6a0723b49bea10d6fe/pkgs/tools/package-management/rpm/sighandler_t-macos.patch" + sha256 "701ffe03d546484aac57789f3489c86842945ad7fb6f2cd854b099c4efa0f4e5" + end + end + + def python3 + "python3.14" + end + + def install + resource("rpm-sequoia").stage do |r| + with_env(PREFIX: prefix) do + build_args = ["build", "--release"] # there is no `cargo install`-able components + system "cargo", *build_args, *std_cargo_args.reject { |arg| arg["--root"] || arg["--path"] } + end + # Rename the library to match versioned soname + versioned_lib = shared_library("librpm_sequoia", OS.mac? ? r.version.to_s : r.version.major.to_s) + lib.install "target/release/#{shared_library("librpm_sequoia")}" => versioned_lib + lib.install_symlink versioned_lib => shared_library("librpm_sequoia") + (lib/"pkgconfig").install "target/release/rpm-sequoia.pc" + ENV.append_path "PKG_CONFIG_PATH", lib/"pkgconfig" + end + + ENV.append "LDFLAGS", "-lomp" if OS.mac? + + # only rpm should go into HOMEBREW_CELLAR, not rpms built + inreplace ["macros.in", "platform.in"], "@prefix@", HOMEBREW_PREFIX + + # ensure that pkg-config binary is found for dep generators + inreplace "scripts/pkgconfigdeps.sh", + "/usr/bin/pkg-config", Formula["pkgconf"].opt_bin/"pkg-config" + + # work around Homebrew's prefix scheme which sets Python3_SITEARCH outside of prefix + site_packages = prefix/Language::Python.site_packages(python3) + inreplace "python/CMakeLists.txt", "${Python3_SITEARCH}", site_packages + + rpaths = [rpath, rpath(source: lib/"rpm"), rpath(source: site_packages/"rpm")] + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpaths.join(";")} + -DCMAKE_INSTALL_SYSCONFDIR=#{etc} + -DCMAKE_INSTALL_SHAREDSTATEDIR=#{var}/lib + -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} + -DENABLE_NLS=ON + -DENABLE_PLUGINS=OFF + -DWITH_AUDIT=OFF + -DWITH_SELINUX=OFF + -DRPM_VENDOR=#{tap.user} + -DENABLE_TESTSUITE=OFF + -DWITH_ACL=OFF + -DWITH_CAP=OFF + ] + args += %w[-DWITH_LIBELF=OFF -DWITH_LIBDW=OFF] if OS.mac? + + system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + def post_install + (var/"lib/rpm").mkpath + safe_system bin/"rpmdb", "--initdb" unless (var/"lib/rpm/rpmdb.sqlite").exist? + end + + test do + ENV["HOST"] = "test" + (testpath/".rpmmacros").write <<~EOS + %_topdir %(echo $HOME)/rpmbuild + %_tmppath %_topdir/tmp + EOS + + system bin/"rpmdb", "--initdb", "--root=#{testpath}" + system bin/"rpm", "-vv", "-qa", "--root=#{testpath}" + assert_path_exists testpath/var/"lib/rpm/rpmdb.sqlite", "Failed to create 'rpmdb.sqlite' file" + + %w[SPECS BUILD BUILDROOT].each do |dir| + (testpath/"rpmbuild/#{dir}").mkpath + end + specfile = testpath/"rpmbuild/SPECS/test.spec" + specfile.write <<~EOS + Summary: Test package + Name: test + Version: 1.0 + Release: 1 + License: Public Domain + Group: Development/Tools + BuildArch: noarch + + %description + Trivial test package + + %prep + %build + echo "hello brew" > test + + %install + install -d $RPM_BUILD_ROOT/%_docdir + cp test $RPM_BUILD_ROOT/%_docdir/test + + %files + %_docdir/test + + %changelog + + EOS + system bin/"rpmbuild", "-ba", specfile + assert_path_exists testpath/"rpmbuild/SRPMS/test-1.0-1.src.rpm" + assert_path_exists testpath/"rpmbuild/RPMS/noarch/test-1.0-1.noarch.rpm" + + info = shell_output("#{bin}/rpm --query --package -i #{testpath}/rpmbuild/RPMS/noarch/test-1.0-1.noarch.rpm") + assert_match "Name : test", info + assert_match "Version : 1.0", info + assert_match "Release : 1", info + assert_match "Architecture: noarch", info + assert_match "Group : Development/Tools", info + assert_match "License : Public Domain", info + assert_match "Source RPM : test-1.0-1.src.rpm", info + assert_match "Trivial test package", info + + files = shell_output("#{bin}/rpm --query --list --package #{testpath}/rpmbuild/RPMS/noarch/test-1.0-1.noarch.rpm") + assert_match (HOMEBREW_PREFIX/"share/doc/test").to_s, files + + system python3, "-c", "import rpm" + end +end diff --git a/Formula/r/rpm2cpio.rb b/Formula/r/rpm2cpio.rb new file mode 100644 index 0000000000000..0dd6359d86095 --- /dev/null +++ b/Formula/r/rpm2cpio.rb @@ -0,0 +1,50 @@ +class Rpm2cpio < Formula + desc "Tool to convert RPM package to CPIO archive" + homepage "https://svnweb.freebsd.org/ports/head/archivers/rpm2cpio/" + url "https://svnweb.freebsd.org/ports/head/archivers/rpm2cpio/files/rpm2cpio?revision=408590&view=co" + version "1.4" + sha256 "2841bacdadde2a9225ca387c52259d6007762815468f621253ebb537d6636a00" + license "BSD-2-Clause" + + livecheck do + url "https://svnweb.freebsd.org/ports/head/archivers/rpm2cpio/Makefile?view=co" + regex(/^PORTVERSION=\s*?v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b5ac7e3d1f3d9db020bcf348931d3cb37930be23799168ec15b84fce0a8b9ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57971030692fdb6757848c6febbfa2ee6b331287482019e45760328de8e03720" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfb382b55ce5155b2313bade20f110e59d9617e0d3ecedacb8d32e587800595d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25a31e16c6737137ab53e8c0768be89309f77d78e8ebb2a4ecf2a3bc9e1ee8fb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8bec9fc7497aea14f5ed7e57d4d56e0899b9fee2fc8d0773f6df1186e6b07327" + sha256 cellar: :any_skip_relocation, sonoma: "fc05b2691766343ce66af5f1b1ab8e439c0370d4b8bb7d00ad7111a102f89659" + sha256 cellar: :any_skip_relocation, ventura: "0b59b750cefaa5e3e10b411be76ce61e6842ac5a33ae8fe2f9d5882748350db9" + sha256 cellar: :any_skip_relocation, monterey: "01c30bbc719f13559f1d351beeeca74b6e74a874ec79fdc2e461feec12bd199d" + sha256 cellar: :any_skip_relocation, arm64_linux: "122ec324ec52bf16746aa0aeb44cf01e0598ca3d7568e0abd54b8ba4cf33807f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a6ed93e8d9f082a0fda4538dcb4d94a75423e73d21ec86d5f1e0040a3e1b3c7" + end + + depends_on "libarchive" + depends_on "xz" + + conflicts_with "rpm", because: "both install `rpm2cpio` binaries" + + def install + tar = OS.mac? ? "tar" : "bsdtar" + inreplace "rpm2cpio", "tar", Formula["libarchive"].bin/tar + bin.install "rpm2cpio" + end + + test do + resource "homebrew-testdata" do + url "https://github.com/github/gh-ost/releases/download/v1.1.7/gh-ost-1.1.7-1.x86_64.rpm" + sha256 "9e7c91d07ccae51c653252b8c58c148032f3785223bfa8e531eba81aa912b71a" + end + + testpath.install resource "homebrew-testdata" + system bin/"rpm2cpio", "gh-ost-1.1.7-1.x86_64.rpm" + end +end diff --git a/Formula/r/rpmspectool.rb b/Formula/r/rpmspectool.rb new file mode 100644 index 0000000000000..a8623249db083 --- /dev/null +++ b/Formula/r/rpmspectool.rb @@ -0,0 +1,79 @@ +class Rpmspectool < Formula + include Language::Python::Virtualenv + + desc "Utility for handling RPM spec files" + homepage "https://github.com/nphilipp/rpmspectool" + url "https://files.pythonhosted.org/packages/d0/f3/0e45796d8dbacfaf9aa01b914196cf749eff05a7b8cb6ebc6cce57bd0d47/rpmspectool-1.100.0.tar.gz" + sha256 "4a9eae6169a6ae8a56c6de0985935dad05d3cb087fc5b92f06d9739e215b0327" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "d721a0708e8a4d3fcb3a67d305aa59c25ff2ec6093b295a31cfa728d11bda85c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3017685ab9100fff47e6ce63a457325320d4e1e34576ba33a35a390ebfebe32" + end + + depends_on "curl" + depends_on :linux + depends_on "openssl@3" + depends_on "python@3.14" + depends_on "rpm" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "pycurl" do + url "https://files.pythonhosted.org/packages/e3/3d/01255f1cde24401f54bb3727d0e5d3396b67fc04964f287d5d473155f176/pycurl-7.45.7.tar.gz" + sha256 "9d43013002eab2fd6d0dcc671cd1e9149e2fc1c56d5e796fad94d076d6cb69ef" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "rpmspectool", + shell_parameter_format: :arg) + end + + test do + (testpath/".rpmmacros").write <<~EOS + %_topdir %(echo $HOME)/rpmbuild + %_tmppath %_topdir/tmp + EOS + + (testpath/"hello.spec").write <<~EOS + Name: hello + Version: 2.12.1 + Release: 1 + Summary: Prints a familiar, friendly greeting + License: GPL-3.0-or-later AND GFDL-1.3-or-later + URL: https://www.gnu.org/software/hello/ + Source0: https://ftp.gnu.org/gnu/hello/hello-2.12.1.tar.gz + + %description + The GNU Hello program produces a familiar, friendly greeting. + Yes, this is another implementation of the classic program that + prints “Hello, world!” when you run it. + + %prep + %setup -q + + %build + %configure + %make_build + + %install + %make_install + rm -f $RPM_BUILD_ROOT/%_infodir/dir + %find_lang hello + + %files -f hello.lang + %license COPYING + %_mandir/man1/hello.1* + %_bindir/hello + %_infodir/hello.info* + EOS + system bin/"rpmspectool", "get", testpath/"hello.spec" + assert_path_exists testpath/"hello-2.12.1.tar.gz" + end +end diff --git a/Formula/r/rqbit.rb b/Formula/r/rqbit.rb new file mode 100644 index 0000000000000..d7e8b1348258e --- /dev/null +++ b/Formula/r/rqbit.rb @@ -0,0 +1,65 @@ +class Rqbit < Formula + desc "Fast command-line bittorrent client and server" + homepage "https://github.com/ikatson/rqbit" + url "https://github.com/ikatson/rqbit/archive/refs/tags/v8.1.1.tar.gz" + sha256 "452b8260fabba938567e1819a9edfcf6b69579ecd5f8b87fee4ca1666fa8fede" + license "Apache-2.0" + head "https://github.com/ikatson/rqbit.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e67ea2e32ddb0dfa94f7f369f5067e4b87d4ba989942e5a1eabc150fe6992d63" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92e638e63d0887e92e07f9269a0780efc424b129c2c6c77defeeb475815733b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abde32ab711dfb6e35b4820298f253cde4f4a3d7f1004b269dccff61869754ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "535aff6ec35570430fd0c2cf2032a1beffc33b381855e5ebb4a4946e343cab43" + sha256 cellar: :any_skip_relocation, sonoma: "0738b342798a9e02ce8e754e5bec29167e05bffe04c3877e4ab90111ef58488a" + sha256 cellar: :any_skip_relocation, ventura: "5e46d0d0d6ddec3d97d0ff3aee5ce554439edc45f009e9f3646c6df2633a3de1" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fc58d1f39c3788a5b19b90a18a8735ffaa1cc8b0478c43c39a4ed5f07dcc68d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6392ea3522c23a0c05d5fffb972545fbbd38a32eee31883f64a4e59d87970580" + end + + depends_on "node" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + # Ensure the declared `openssl@3` dependency will be picked up. + # https://docs.rs/openssl/latest/openssl/#manual + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "crates/rqbit") + + generate_completions_from_executable(bin/"rqbit", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/rqbit --version") + + # NOTE: rqbit uses the `native-tls` crate which uses the system Secure + # Transport on macOS so it will only link to libssl and libcrypto on Linux + if OS.linux? + require "utils/linkage" + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"rqbit", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end + + magnet_uri = <<~EOS.gsub(/\s+/, "").strip + magnet:?xt=urn:btih:9eae210fe47a073f991c83561e75d439887be3f3 + &dn=archlinux-2017.02.01-x86_64.iso + &tr=udp://tracker.archlinux.org:6969 + &tr=https://tracker.archlinux.org:443/announce + EOS + + output = shell_output("#{bin}/rqbit download --list --output-folder #{testpath} '#{magnet_uri}'") + assert_match " File \"archlinux-2017.02.01-dual.iso\", size 870.0Mi", output + end +end diff --git a/Formula/r/rqlite.rb b/Formula/r/rqlite.rb new file mode 100644 index 0000000000000..c0142a42ddeed --- /dev/null +++ b/Formula/r/rqlite.rb @@ -0,0 +1,63 @@ +class Rqlite < Formula + desc "Lightweight, distributed relational database built on SQLite" + homepage "https://www.rqlite.io/" + url "https://github.com/rqlite/rqlite/archive/refs/tags/v9.2.1.tar.gz" + sha256 "f0149e30792b3a2b8307e20e3e4dd9739be6dc22e0228c56ed989829d8d5245d" + license "MIT" + head "https://github.com/rqlite/rqlite.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9c2589c6ad4ea1dbe3701301440ea7d4c31844e5ef75ffc4fe2f90d169007a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0c2e70816e61f171b3f038d9e3d1eccb2f4ea5f8dca793f1959392095624577" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "638789b524e177a49e2bece28155e72fae9e92ec98894346f05f4647cda21cb1" + sha256 cellar: :any_skip_relocation, sonoma: "fca0ed3421eebb32930159290d883e8b0d84c722d4f28dbe434743d8d9bcd64c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1d8ecfee665c4a36339db2934c421ba664cdd00f91cb4b0ac58f075d0d74833" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfd644becb01a8cf8dc5ae2c8cc25e3af91b3cc18fcec2bd00d522e09462d9fa" + end + + depends_on "go" => :build + + def install + # Workaround to avoid patchelf corruption when cgo is required (for go-sqlite3) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + version_ldflag_prefix = "-X github.com/rqlite/rqlite/v#{version.major}" + ldflags = %W[ + -s -w + #{version_ldflag_prefix}/cmd.Commit=unknown + #{version_ldflag_prefix}/cmd.Branch=master + #{version_ldflag_prefix}/cmd.Buildtime=#{time.iso8601} + #{version_ldflag_prefix}/cmd.Version=v#{version} + ] + %w[rqbench rqlite rqlited].each do |cmd| + system "go", "build", *std_go_args(ldflags:), "-o", bin/cmd, "./cmd/#{cmd}" + end + end + + test do + port = free_port + fork do + exec bin/"rqlited", "-http-addr", "localhost:#{port}", + "-raft-addr", "localhost:#{free_port}", + testpath + end + sleep 5 + + (testpath/"test.sql").write <<~SQL + CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT) + .schema + quit + SQL + output = shell_output("#{bin}/rqlite -p #{port} < test.sql") + assert_match "foo", output + + output = shell_output("#{bin}/rqbench -a localhost:#{port} 'SELECT 1'") + assert_match "Statements/sec", output + + assert_match "Version v#{version}", shell_output("#{bin}/rqlite -v") + end +end diff --git a/Formula/r/rrdtool.rb b/Formula/r/rrdtool.rb new file mode 100644 index 0000000000000..034bb0101dd26 --- /dev/null +++ b/Formula/r/rrdtool.rb @@ -0,0 +1,84 @@ +class Rrdtool < Formula + desc "Round Robin Database" + homepage "https://oss.oetiker.ch/rrdtool/" + license "GPL-2.0-only" + + stable do + url "https://github.com/oetiker/rrdtool-1.x/releases/download/v1.9.0/rrdtool-1.9.0.tar.gz" + sha256 "5e65385e51f4a7c4b42aa09566396c20e7e1a0a30c272d569ed029a81656e56b" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # fix HAVE_DECL checks, upstream pr ref, https://github.com/oetiker/rrdtool-1.x/pull/1262 + patch do + url "https://github.com/oetiker/rrdtool-1.x/commit/98b2944d3b41f6e19b6a378d7959f569fdbaa9cd.patch?full_index=1" + sha256 "86b2257fcd71072b712e7079b3fed87635538770a7619539eaa474cbeaa8b7f5" + end + end + + bottle do + sha256 arm64_tahoe: "371259cfcac21c94b0538181fb89e5c21f367442eb20dfd7730c924647a6b2f3" + sha256 arm64_sequoia: "204e4e8ca3d88f6808d1e370f4bf2614a2da964ae4b8b55b97edf837e4447cd4" + sha256 arm64_sonoma: "5068094067bf7166f46f60a410d8ec25f550b8bb4ec667c2d581efcfcf2b1526" + sha256 arm64_ventura: "d40dea08387b84b848a9142c1b48e0247312e80e29010e8c068b051ffc64b9a4" + sha256 arm64_monterey: "37a3790cf1419f1d8b39baa4ff8e995b9e72f80ace0a289bdb3b5379e1764dc6" + sha256 sonoma: "e135bffca7c601ab3f539fa6c0a7d9756a20a20654b6e70acc01ac1238414f52" + sha256 ventura: "8b2a72bdffacc374a613ed17c3fa9966521b09f968e18799fca9c28ce350cc59" + sha256 monterey: "979b3fd513e67da16268a66997d3442a58c8716979fd8fa43996f51a05ab5de0" + sha256 arm64_linux: "d066d8d5baf620f46cca98fe2b422227af8432ea2b4574051a72146103b981ad" + sha256 x86_64_linux: "a7e81bcff828d14ddf9ca6759a9784a6d23c26ba667d52c967482848f563f4dc" + end + + head do + url "https://github.com/oetiker/rrdtool-1.x.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "glib" + depends_on "libpng" + depends_on "pango" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "groff" => :build + end + + def install + args = %w[ + --disable-silent-rules + --disable-lua + --disable-perl + --disable-python + --disable-ruby + --disable-tcl + ] + + system "./bootstrap" if build.head? + inreplace "configure", /^sleep 1$/, "#sleep 1" + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"rrdtool", "create", "temperature.rrd", "--step", "300", + "DS:temp:GAUGE:600:-273:5000", "RRA:AVERAGE:0.5:1:1200", + "RRA:MIN:0.5:12:2400", "RRA:MAX:0.5:12:2400", "RRA:AVERAGE:0.5:12:2400" + + system bin/"rrdtool", "dump", "temperature.rrd" + end +end diff --git a/Formula/r/rsc_2fa.rb b/Formula/r/rsc_2fa.rb new file mode 100644 index 0000000000000..c0b135975554d --- /dev/null +++ b/Formula/r/rsc_2fa.rb @@ -0,0 +1,42 @@ +class Rsc2fa < Formula + desc "Two-factor authentication on the command-line" + homepage "https://pkg.go.dev/rsc.io/2fa" + url "https://github.com/rsc/2fa/archive/refs/tags/v1.2.0.tar.gz" + sha256 "d8db6b9a714c9146a4b82fd65b54f9bdda3e58380bce393f45e1ef49e4e9bee5" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c32203c0d299aacfd3587e37f7bced92c8e19361b6f8665ccc47518f49949ecd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "075220c900e04b25fb10ce49bfe0b762de933b9b235084c7bf1457460f9f0a10" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d16796c1727ca9ef2310ec669216fc6ec64053e28781431aaf4cc4186828dad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c88d62abe74ed6cc04cc70f5c4b86a9fce044672beda3e026aff13cbe68a28ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f832afe87766e2847eadb453848ebf881c0c60bb608a71640b6c237ec44b9069" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6db5849c61249766bb9ac2168f2570c87b0893e19c7600e9749f375c6934ffa5" + sha256 cellar: :any_skip_relocation, sonoma: "9fe85bab87545f8cae9c24f71f5a14020032d169a0172e9509352eaf6aa16dc3" + sha256 cellar: :any_skip_relocation, ventura: "ec0046a6c98d1fe4ac25ba97d805234e68b79158fa09019ee6a3ccf9ca0fcc98" + sha256 cellar: :any_skip_relocation, monterey: "aaf3afec742c3a53fd5a78e6677750b90120bc7803ac93c004d4f337d285a605" + sha256 cellar: :any_skip_relocation, big_sur: "7c0d499b3ee3fa0a1d2934e05fd36cdcf75f10710ec3fdc9192d07f74074262b" + sha256 cellar: :any_skip_relocation, catalina: "7c0d499b3ee3fa0a1d2934e05fd36cdcf75f10710ec3fdc9192d07f74074262b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bd79a650b944690c714fbcb94ccdd70424082eccab025081d98eb52dfc6ff2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71c943ce568138c782321aaa436adf79d194707bd140f82b50046aff80851e3c" + end + + depends_on "go" => :build + + def install + system "go", "build", "-mod=mod", *std_go_args(ldflags: "-s -w", output: bin/"2fa") + end + + test do + out = shell_output("#{bin}/2fa -help 2>&1", 2) + assert_match(/^usage:/, out) + + out = shell_output("echo AAAAAAAAAAAAAAAA | #{bin}/2fa -add example 2>&1") + assert_match(/^2fa key for example:/, out) + + out = shell_output("#{bin}/2fa example") + assert_match(/^[0-9]{6}\n$/, out) + end +end diff --git a/Formula/r/rsgain.rb b/Formula/r/rsgain.rb new file mode 100644 index 0000000000000..372f13262ee99 --- /dev/null +++ b/Formula/r/rsgain.rb @@ -0,0 +1,39 @@ +class Rsgain < Formula + desc "ReplayGain 2.0 tagging utility" + homepage "https://github.com/complexlogic/rsgain" + url "https://github.com/complexlogic/rsgain/archive/refs/tags/v3.6.tar.gz" + sha256 "26f7acd1ba0851929dc756c93b3b1a6d66d7f2f36b31f744c8181f14d7b5c8a7" + license "BSD-2-Clause" + revision 3 + head "https://github.com/complexlogic/rsgain.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "ed5fac0db7cf76fcf45a96c7368f88f4a27b3e4ecbe46245b59d423fef69e9f2" + sha256 arm64_sequoia: "53f904faca8eed3f3cf3d18f724d949b95d9510ef4c1f3eefbc05fa5a4ff336a" + sha256 arm64_sonoma: "11c395ff3d50fe450ee3ad723f2be10292b3527c6e46fb3c9a69bc8caf87448b" + sha256 sonoma: "1822242ef3ea81df8679f2d74fd427a1b2bc26ffc44f77f11bab0f9aab9eb635" + sha256 arm64_linux: "50093b0e7182001fba4ad902780316eaf9571320121a7d2a70af6934a5511786" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8dcff63acd3a4e02941fc4194f7008131d71e01364087e4f6f07979a8222624" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "fmt" + depends_on "inih" + depends_on "libebur128" + depends_on "taglib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rsgain -v") + + assert_match "No files were scanned", + shell_output("#{bin}/rsgain easy -S #{testpath}") + end +end diff --git a/Formula/r/rshijack.rb b/Formula/r/rshijack.rb new file mode 100644 index 0000000000000..73fa1627d9943 --- /dev/null +++ b/Formula/r/rshijack.rb @@ -0,0 +1,35 @@ +class Rshijack < Formula + desc "TCP connection hijacker" + homepage "https://github.com/kpcyrd/rshijack" + url "https://github.com/kpcyrd/rshijack/archive/refs/tags/v0.5.2.tar.gz" + sha256 "c13cc07825d72f09887ec0f098aa40d335f73a0bc0b31c4d1e7431271e1cb53e" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0ba456228f8c73b28433e29409a5949bb8e154794a30abf0058d4fb0db4febc6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ca2a8d042e51c65e54aab501b5c669008cda7783bed088b3ae59732a8aed823" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d85aa98cf1be3462acd931d1cb235f07adf3bafb9cc2d887c0abbba93a0401fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0a30c41da9c8e60505b84d5eb97c0db143d5a5d9c8cf1366bc10911505622fa1" + sha256 cellar: :any_skip_relocation, sonoma: "cb638e32c2280602c4a9c2df3b7d44d2a13f18804cb2aebb841425c6b3e50f59" + sha256 cellar: :any_skip_relocation, ventura: "2ed78b00078532542588e9945636f4d386c09caf8e4f9f433604e3eb85eea21e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0e4f5ac8ccd08299467e16abb5c3d6d198905ecd7c9ddaa58fc351aea744c4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7ac803fc3ef23e503bb4604c2c1322cdac87945b8337b5d30a19ee4917f3a84" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + interface = OS.mac? ? "lo0" : "lo" + src = "192.0.2.1:12345" + dst = "192.0.2.2:54321" + + output = shell_output("#{bin}/rshijack #{interface} #{src} #{dst} 2>&1", 1) + assert_match "Waiting for SEQ/ACK to arrive", output + + assert_match version.to_s, shell_output("#{bin}/rshijack --version") + end +end diff --git a/Formula/r/rslint.rb b/Formula/r/rslint.rb new file mode 100644 index 0000000000000..8f87bd021073c --- /dev/null +++ b/Formula/r/rslint.rb @@ -0,0 +1,41 @@ +class Rslint < Formula + desc "Extremely fast JavaScript and TypeScript linter" + homepage "https://rslint.org/" + url "https://github.com/rslint/rslint/archive/refs/tags/v0.3.2.tar.gz" + sha256 "1f3388c0bedb5bfb4c83f49ab773de91652144cb08327038272ad715cb161a83" + license "MIT" + head "https://github.com/rslint/rslint.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a889ed0f08b3102adb969159e71ba2d28aa7c40b1809c5fa10d7d57350e9731f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "063ceea1423e7a6c428f7d9c517c64a773eb5a0ffac97c55a45558081aa93d9b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5bba58ac05e2c259b3d2e135e5ec12afbea7d67b0b48a892d48554883c65e66" + sha256 cellar: :any_skip_relocation, sonoma: "a5c91e6d84fd85d4d8914caea6d4d261a514ce5c4bfa722d423f2bb78615c402" + sha256 cellar: :any_skip_relocation, arm64_linux: "464a3bdc1181ddc042da940b4ed478ab546c5f62975a767f4494bea2b80407c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e037bb0d096c7f58a2f36fa404af706c0a0d5814eb6cf659b30690604b15e9b8" + end + + depends_on "rust" => :build + + # Fix to error: implicit autoref creates a reference to the dereference of a raw pointer + # PR ref: https://github.com/rslint/rslint/pull/165 + patch do + url "https://github.com/rslint/rslint/commit/1ceaa3a78d591599a5fe30f702bdb3dae1004f70.patch?full_index=1" + sha256 "31186aec32f3a587f6401e2610ffa0dec2b37adc1bc4d9a88f816d87f57aa5a4" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/rslint_cli") + end + + test do + # https://rslint.org/rules/errors/no-empty.html#invalid-code-examples + (testpath/"no-empty.js").write("{}") + output = shell_output("#{bin}/rslint no-empty.js 2>&1", 1) + assert_match "1 fail, 0 warn, 0 success", output + assert_match "empty block statements are not allowed", output + end +end diff --git a/Formula/r/rsnapshot.rb b/Formula/r/rsnapshot.rb new file mode 100644 index 0000000000000..57fc00e7b49df --- /dev/null +++ b/Formula/r/rsnapshot.rb @@ -0,0 +1,30 @@ +class Rsnapshot < Formula + desc "File system snapshot utility (based on rsync)" + homepage "https://www.rsnapshot.org/" + url "https://github.com/rsnapshot/rsnapshot/releases/download/1.5.1/rsnapshot-1.5.1.tar.gz" + sha256 "8f6af8046ee6b0293b26389d08cb6950c7f7ddfffc1f74eefcb087bd49d44f62" + license "GPL-2.0-or-later" + head "https://github.com/rsnapshot/rsnapshot.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6404aabe4e16911cc94cc72f61b06e05cb1837c21ab04294d0916c109b068de" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39b58196928c11b7de3c7dd9672da95b53d5df2c03191b9a7d6aafb869b02a95" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39b58196928c11b7de3c7dd9672da95b53d5df2c03191b9a7d6aafb869b02a95" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a674cc867fa495164b1d4d9c09b3f88f0e02d918c593f3a5a63969612bdd0a0" + sha256 cellar: :any_skip_relocation, sonoma: "e46b5d9473dd7afd78d62ce1113a3b7b165e3e15ee43ee2993b06bd1dd89956c" + sha256 cellar: :any_skip_relocation, ventura: "681fd3a9e4c2276dcbecc2a22e721cf31efadd6ed786beae3efc127f8b488ec0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c3384d109f947065a499e2980c0d982a38a94bae93072bdd04540133ea774b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a02d7163670d6f9a5086e0c50c3ba6b5442639d961a630773a9f1d001a211cbc" + end + + uses_from_macos "rsync" => :build + + def install + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"rsnapshot", "--version" + end +end diff --git a/Formula/r/rsql.rb b/Formula/r/rsql.rb new file mode 100644 index 0000000000000..14691a2e8a1b4 --- /dev/null +++ b/Formula/r/rsql.rb @@ -0,0 +1,45 @@ +class Rsql < Formula + desc "CLI for relational databases and common data file formats" + homepage "https://github.com/theseus-rs/rsql" + url "https://github.com/theseus-rs/rsql/archive/refs/tags/v0.19.2.tar.gz" + sha256 "a6bf445998062dbb1a840895d42783ed947e42265422aba2bbdb8a669d2177d6" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/theseus-rs/rsql.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a936612adb0d6ea4764621131bf0604a23549355bc64f8f578344dd475505693" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b31ac7cc12a1f3a71885c4d0c53b023ea7d7d2a9709128e2ae712253937b6ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84a95550759893530a734322482d93f9e6456494e56706d9f93d23bfdcf6715a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c44f42187d6962c11a4a30194753555258ef609fb23dd972adef96354b0ecbc9" + sha256 cellar: :any_skip_relocation, sonoma: "3f1ac82644cfa85718929241a5061bfc4f58232102a689b8a526cafb7a7e71fc" + sha256 cellar: :any_skip_relocation, ventura: "d6e10c5392373900a7bb9635cb5bddb140908d4d8937cb0a5ff01c7af36a89bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfa5d0128b0e49f2eb21e60348fd68cb7946b5e036d6802a03cbb62ff09ad3e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e8fe12b46214d9dea30d9cfb74696447421c3907759862628d83035eb5e7599" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "rsql_cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/rsql --version") + + # Create a sample CSV file + (testpath/"data.csv").write <<~CSV + name,age + Alice,30 + Bob,25 + Charlie,35 + CSV + + query = "SELECT * FROM data WHERE age > 30" + assert_match "Charlie", shell_output("#{bin}/rsql --url 'csv://#{testpath}/data.csv' -- '#{query}'") + end +end diff --git a/Formula/r/rst-lint.rb b/Formula/r/rst-lint.rb new file mode 100644 index 0000000000000..a4abc74ddabe7 --- /dev/null +++ b/Formula/r/rst-lint.rb @@ -0,0 +1,42 @@ +class RstLint < Formula + include Language::Python::Virtualenv + + desc "ReStructuredText linter" + homepage "https://github.com/twolfson/restructuredtext-lint" + url "https://files.pythonhosted.org/packages/48/9c/6d8035cafa2d2d314f34e6cd9313a299de095b26e96f1c7312878f988eec/restructuredtext_lint-1.4.0.tar.gz" + sha256 "1b235c0c922341ab6c530390892eb9e92f90b9b75046063e047cacfb0f050c45" + license "Unlicense" + + bottle do + rebuild 9 + sha256 cellar: :any_skip_relocation, all: "305cb3643973922a58e38ebde0325f8fc16f21ccd96da238f973ee3f9f12ad87" + end + + depends_on "python@3.14" + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + def install + virtualenv_install_with_resources + end + + test do + # test invocation on a file with no issues + (testpath/"pass.rst").write <<~EOS + Hello World + =========== + EOS + assert_empty shell_output("#{bin}/rst-lint pass.rst") + + # test invocation on a file with a whitespace style issue + (testpath/"fail.rst").write <<~EOS + Hello World + ========== + EOS + output = shell_output("#{bin}/rst-lint fail.rst", 2) + assert_match "WARNING fail.rst:2 Title underline too short.", output + end +end diff --git a/Formula/r/rswift.rb b/Formula/r/rswift.rb new file mode 100644 index 0000000000000..453e108b23916 --- /dev/null +++ b/Formula/r/rswift.rb @@ -0,0 +1,31 @@ +class Rswift < Formula + desc "Get strong typed, autocompleted resources like images, fonts and segues" + homepage "https://github.com/mac-cain13/R.swift" + url "https://github.com/mac-cain13/R.swift/releases/download/7.8.0/rswift-7.8.0-source.tar.gz" + sha256 "6288a8e12aa6de24d8689c3483400bb0cde85f932c130459405f0c3be4886794" + license "MIT" + head "https://github.com/mac-cain13/R.swift.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03c1c4c066560ead4096db89baa3667cb8c4c346f7ccdb590316b78402e7fa2a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88a2e680ddf7ee98e93c7f65b45cf5cb57d75a98bfda53da1532a93d75593091" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "978a3efc5b0687c959f30ba02cd634413d93ef0a175e042e8d8cb308fa6b3382" + sha256 cellar: :any_skip_relocation, arm64_ventura: "55e047c896dd29af0770cc078e0de6535a54b3794d98bb3ef8218b496c7f1bc9" + sha256 cellar: :any_skip_relocation, sonoma: "dff1efc08234604ae33b0fb75e0b70f3df7b694caced22ae33366a1fec3db047" + sha256 cellar: :any_skip_relocation, ventura: "953d9d6d661625561249978b25d215afa4198af17a6e7ea866981be0fa5cbdbd" + end + + depends_on :macos # needs CoreGraphics, a macOS-only library + depends_on xcode: "13.3" + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/rswift" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rswift --version") + expected_output="Error: Missing argument PROJECT_FILE_PATH" + assert_match expected_output, shell_output("#{bin}/rswift generate #{testpath} 2>&1", 64) + end +end diff --git a/Formula/r/rsync-time-backup.rb b/Formula/r/rsync-time-backup.rb new file mode 100644 index 0000000000000..aebe1bdd3b71d --- /dev/null +++ b/Formula/r/rsync-time-backup.rb @@ -0,0 +1,24 @@ +class RsyncTimeBackup < Formula + desc "Time Machine-style backup for the terminal using rsync" + homepage "https://github.com/laurent22/rsync-time-backup" + url "https://github.com/laurent22/rsync-time-backup/archive/refs/tags/v1.1.5.tar.gz" + sha256 "567f42ddf2c365273252f15580bb64aa3b3a8abb4a375269aea9cf0278510657" + license "MIT" + head "https://github.com/laurent22/rsync-time-backup.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f5fc0d52255efff1f05d7820ae5c155fc59214934687e00e805911fea20ca6c6" + end + + def install + bin.install "rsync_tmbackup.sh" + end + + test do + output = shell_output("#{bin}/rsync_tmbackup.sh --rsync-get-flags") + assert_match "--times --recursive", output + end +end diff --git a/Formula/r/rsync.rb b/Formula/r/rsync.rb new file mode 100644 index 0000000000000..68200a47c7739 --- /dev/null +++ b/Formula/r/rsync.rb @@ -0,0 +1,72 @@ +class Rsync < Formula + desc "Utility that provides fast incremental file transfer" + homepage "https://rsync.samba.org/" + url "https://rsync.samba.org/ftp/rsync/rsync-3.4.1.tar.gz" + mirror "https://mirrors.kernel.org/gentoo/distfiles/rsync-3.4.1.tar.gz" + mirror "https://www.mirrorservice.org/sites/rsync.samba.org/rsync-3.4.1.tar.gz" + sha256 "2924bcb3a1ed8b551fc101f740b9f0fe0a202b115027647cf69850d65fd88c52" + license "GPL-3.0-or-later" + + livecheck do + url "https://rsync.samba.org/ftp/rsync/?C=M&O=D" + regex(/href=.*?rsync[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c4718ba8eae84dd515309bd6d802dd14e9940c3ec92fe582ee1ff44dc1ace223" + sha256 cellar: :any, arm64_sequoia: "fecb8e00e23e675273e3e5fa9c9f545caab740dba09fb4af59169e18b0b1cc67" + sha256 cellar: :any, arm64_sonoma: "7eba5b3c101d16dfbebc11bbddbc646a1afe2c1aacb24611542cd8e07d99a416" + sha256 cellar: :any, arm64_ventura: "3afce8ca8f96b8bb1e78e01975e0c9e5f47326f62d1d868555de1fbc92fe1744" + sha256 cellar: :any, sonoma: "f165d31173c7f7c1905fa9b8df834c8d11bb52b4fe004f39205b162ccbd75b50" + sha256 cellar: :any, ventura: "fb11a1420c2f4e77dfffa8b9459ddc240a92d6e9aeee9e3738c4a2cfe54ca50f" + sha256 cellar: :any_skip_relocation, arm64_linux: "35f275c63b686ecad743f43adcd6dcd31480cb741dfa53a52dedf63eb1553536" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f3d0ea8a719d88f7c99670a295d7007c445ed3084c994a921773553a356f645" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "lz4" + depends_on "openssl@3" + depends_on "popt" + depends_on "xxhash" + depends_on "zstd" + + uses_from_macos "zlib" + + # hfs-compression.diff has been marked by upstream as broken since 3.1.3 + # and has not been reported fixed as of 3.2.7 + patch do + url "https://download.samba.org/pub/rsync/src/rsync-patches-3.4.1.tar.gz" + mirror "https://www.mirrorservice.org/sites/rsync.samba.org/rsync-patches-3.4.1.tar.gz" + sha256 "f56566e74cfa0f68337f7957d8681929f9ac4c55d3fb92aec0d743db590c9a88" + apply "patches/fileflags.diff" + end + + def install + args = %W[ + --with-rsyncd-conf=#{etc}/rsyncd.conf + --with-included-popt=no + --with-included-zlib=no + --enable-ipv6 + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + mkdir "a" + mkdir "b" + + ["foo\n", "bar\n", "baz\n"].map.with_index do |s, i| + (testpath/"a/#{i + 1}.txt").write s + end + + system bin/"rsync", "-artv", testpath/"a/", testpath/"b/" + + (1..3).each do |i| + assert_equal (testpath/"a/#{i}.txt").read, (testpath/"b/#{i}.txt").read + end + end +end diff --git a/Formula/r/rsyncy.rb b/Formula/r/rsyncy.rb new file mode 100644 index 0000000000000..1dc16a869ac9f --- /dev/null +++ b/Formula/r/rsyncy.rb @@ -0,0 +1,43 @@ +class Rsyncy < Formula + desc "Status/progress bar for rsync" + homepage "https://github.com/laktak/rsyncy" + url "https://github.com/laktak/rsyncy/archive/refs/tags/v2.1.0.tar.gz" + sha256 "d2b88602cd911d66a21750bec32a40fdfb3769a63b529bc0805d22c7a3b87ba2" + license "MIT" + head "https://github.com/laktak/rsyncy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ff4c5f58b875bc3e1312d06f42b4db829752a019b74826f8e5d7aaa9930bd617" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d497726367711d8d1a895ead4a6fa888e797a523c027cbc4f4934173803c8c7e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d497726367711d8d1a895ead4a6fa888e797a523c027cbc4f4934173803c8c7e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d497726367711d8d1a895ead4a6fa888e797a523c027cbc4f4934173803c8c7e" + sha256 cellar: :any_skip_relocation, sonoma: "f55977e00c3f3332fff7a5c1e1496772a029495d444f864e0d2eb4f9e21119ff" + sha256 cellar: :any_skip_relocation, ventura: "f55977e00c3f3332fff7a5c1e1496772a029495d444f864e0d2eb4f9e21119ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ad178b303f9cb24ff78049c95d4bca214027d5261fe87b4d7bc35cccfed52a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b7ff0ec6c2c7e4564370e7ede4c760136fae508f3a9312b9ebacb4f0a0f1ef3" + end + + depends_on "go" => :build + depends_on "rsync" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # rsyncy is a wrapper, rsyncy --version will invoke it and show rsync output + assert_match(/.*rsync.+version.*/, shell_output("#{bin}/rsyncy --version")) + + # test copy operation + mkdir testpath/"a" do + mkdir "foo" + (testpath/"a/foo/one.txt").write <<~EOS + testing + testing + testing + EOS + system bin/"rsyncy", "-r", testpath/"a/foo/", testpath/"a/bar/" + assert_path_exists testpath/"a/bar/one.txt" + end + end +end diff --git a/Formula/r/rsyslog.rb b/Formula/r/rsyslog.rb new file mode 100644 index 0000000000000..d1fa76494659c --- /dev/null +++ b/Formula/r/rsyslog.rb @@ -0,0 +1,65 @@ +class Rsyslog < Formula + desc "Enhanced, multi-threaded syslogd" + homepage "https://www.rsyslog.com/" + url "https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.2510.0.tar.gz" + sha256 "a70a9834186859539a6a4d1c7b3f68c23897e805829b764a45e92cb0cc95e66a" + license all_of: ["Apache-2.0", "GPL-3.0-or-later", "LGPL-3.0-or-later"] + + livecheck do + url "https://www.rsyslog.com/downloads/download-v8-stable/" + regex(/href=.*?rsyslog[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "52b056838647afd16db626576e9b224738b9ef3031edfee90446a36c97503501" + sha256 arm64_sequoia: "d8c7bfbaf7c2c384773cec928525e9b19b1ca0aa7b026271420d209eb07a29c5" + sha256 arm64_sonoma: "aca061f730511b05e2e00a49239fdc2edc2a6f10bfed2faf09411e9b3a9dd90d" + sha256 sonoma: "6e92f72b192788e7f4e0d65b2628b8ef8ee2dff0a2692f71464f0ed42dc87920" + sha256 arm64_linux: "26ee6cabef387da7870b9570cf85220a146af9114ca58107a35751b7164d50f4" + sha256 x86_64_linux: "c71f794e6984ae53eeb1cd0d7ef77a4a58a68a10b313454b35c6f330e6efd06e" + end + + depends_on "pkgconf" => :build + depends_on "gnutls" + depends_on "libestr" + depends_on "libfastjson" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + system "./configure", "--enable-imfile", + "--enable-usertools", + "--enable-diagtools", + "--disable-uuid", + "--disable-libgcrypt", + "--enable-gnutls", + *std_configure_args + system "make" + system "make", "install" + + (buildpath/"rsyslog.conf").write <<~EOS + # minimal config file for receiving logs over UDP port 10514 + $ModLoad imudp + $UDPServerRun 10514 + *.* /usr/local/var/log/rsyslog-remote.log + EOS + etc.install buildpath/"rsyslog.conf" + end + + def post_install + mkdir_p var/"run" + end + + service do + run [opt_sbin/"rsyslogd", "-n", "-f", etc/"rsyslog.conf", "-i", var/"run/rsyslogd.pid"] + keep_alive true + error_log_path var/"log/rsyslogd.log" + log_path var/"log/rsyslogd.log" + end + + test do + result = shell_output("#{opt_sbin}/rsyslogd -f #{etc}/rsyslog.conf -N 1 2>&1") + assert_match "End of config validation run", result + end +end diff --git a/Formula/r/rtabmap.rb b/Formula/r/rtabmap.rb new file mode 100644 index 0000000000000..bea7d57fcbd1b --- /dev/null +++ b/Formula/r/rtabmap.rb @@ -0,0 +1,115 @@ +class Rtabmap < Formula + desc "Visual and LiDAR SLAM library and standalone application" + homepage "https://introlab.github.io/rtabmap" + url "https://github.com/introlab/rtabmap/archive/refs/tags/0.23.1.tar.gz" + sha256 "8f0463d0b46418921da0503d5f991c7d0b8308b4926a069d9fe4ec811113502f" + license "BSD-3-Clause" + head "https://github.com/introlab/rtabmap.git", branch: "master" + + # Upstream doesn't create releases for all tagged versions, so we use the + # `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "81e20419d91aa49abe0110ed0b9a7fd6600fcdcc78eeb3c5b26441c5f9483f81" + sha256 arm64_sequoia: "26b1ec353d09b5f07717114806494290158094b61d4d0ae64e517c16f49a98e2" + sha256 arm64_sonoma: "b58fb769e26ddefacbc4e397b90529d13f3d5a75e64f9c8d61e3ab4e1bc7a145" + sha256 sonoma: "081b61df3664b95ebb4ac54f306b12970f74f1c7c155a08fd14d530f29d9b1db" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce39a0e12d31f3a8fa5fe63276634fd450f0e1dccc5ae14380596b7f6123dad0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e78e24f6acfe614db37a2a94611f11c7b3d0a8b74861bd00861040cbdbee1f1" + end + + depends_on "cmake" => [:build, :test] + depends_on "g2o" + depends_on "librealsense" + depends_on "octomap" + depends_on "opencv" + depends_on "pcl" + depends_on "pdal" + depends_on "qtbase" + depends_on "qtsvg" + depends_on "sqlite" + depends_on "vtk" + + uses_from_macos "zlib" + + on_macos do + depends_on "boost" + depends_on "flann" + depends_on "freetype" + depends_on "glew" + depends_on "libfreenect" + depends_on "libomp" + depends_on "libpcap" + depends_on "libpng" + depends_on "lz4" + depends_on "qhull" + end + + def install + # Use eigen's cmake configuration to support eigen 5.0.0 + rm "cmake_modules/FindEigen3.cmake" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Replace reference to OpenCV's Cellar path + opencv = Formula["opencv"] + inreplace lib.glob("rtabmap-*/RTABMap_coreTargets.cmake"), opencv.prefix.realpath, opencv.opt_prefix + + return unless OS.mac? + + # Remove SDK include paths from CMake config files to avoid requiring specific SDK version + sdk_include_regex = Regexp.escape("#{MacOS.sdk_for_formula(self).path}/usr/include") + inreplace lib.glob("rtabmap-*/RTABMap_{core,utilite}Targets.cmake"), /;#{sdk_include_regex}([;"])/, "\\1" + end + + test do + # Check all references to SDK path were removed from CMake config files + prefix.glob("**/*.cmake") { |cmake| refute_match %r{/MacOSX[\d.]*\.sdk/}, cmake.read } if OS.mac? + + output = if OS.linux? + # Linux CI cannot start windowed applications due to Qt plugin failures + shell_output("#{bin}/rtabmap-console --version") + else + shell_output("#{bin}/rtabmap --version") + end + assert_match "RTAB-Map: #{version}", output + + # Required to avoid missing Xcode headers + # https://github.com/Homebrew/homebrew-core/pull/162576/files#r1489824628 + ENV.delete "CPATH" if OS.mac? && MacOS::CLT.installed? + + rtabmap_dir = lib/"rtabmap-#{version.major_minor}" + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(test) + find_package(RTABMap REQUIRED COMPONENTS core) + add_executable(test test.cpp) + target_link_libraries(test rtabmap::core) + CMAKE + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() + { + rtabmap::Rtabmap rtabmap; + printf(RTABMAP_VERSION); + return 0; + } + CPP + + args = std_cmake_args + args << "-DCMAKE_BUILD_RPATH=#{lib}" if OS.linux? + + system "cmake", "-S", ".", "-B", "build", *args, "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DRTABMap_DIR=#{rtabmap_dir}" + system "cmake", "--build", "build" + assert_equal version.to_s, shell_output("./build/test").strip + end +end diff --git a/Formula/r/rtags.rb b/Formula/r/rtags.rb new file mode 100644 index 0000000000000..eee567b741abe --- /dev/null +++ b/Formula/r/rtags.rb @@ -0,0 +1,100 @@ +class Rtags < Formula + desc "Source code cross-referencer like ctags with a clang frontend" + homepage "https://github.com/Andersbakken/rtags" + license "GPL-3.0-or-later" + head "https://github.com/Andersbakken/rtags.git", branch: "master" + + stable do + url "https://github.com/Andersbakken/rtags.git", + tag: "v2.41", + revision: "39339388256df662d0084b4a094d03e52748f9e8" + + # fix lisp files, remove on release 2.42 + patch do + url "https://github.com/Andersbakken/rtags/commit/63f18acb21e664fd92fbc19465f0b5df085b5e93.patch?full_index=1" + sha256 "3229b2598211b2014a93a2d1e906cccf05b6a8a708234cc54f21803e6e31ef2a" + end + end + + # The `strategy` code below can be removed if/when this software exceeds + # version 3.23. Until then, it's used to omit a malformed tag that would + # always be treated as newest. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :git do |tags, regex| + malformed_tags = ["v3.23"].freeze + tags.map do |tag| + next if malformed_tags.include?(tag) + + tag[regex, 1] + end + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "48ad2bdaf1a5da69b0043dd8c7d4b9aa472c4a61556e16460cd973e2bf16a300" + sha256 cellar: :any, arm64_sequoia: "8fd30b2507239fc7ff15cca941e00f105e8a6724b032a591b1b0d3812699d3cf" + sha256 cellar: :any, arm64_sonoma: "4bd18ea58c0d2161ea6b22209ae085719b21e4db751ab60f4a46911e770affd0" + sha256 cellar: :any, arm64_ventura: "8a8fca81684ec7d9ddb05633c1f99b00f99f9222a6584bb494c52fa0ac0abe53" + sha256 cellar: :any, sonoma: "fce14066a6e4c0345b2a7e5ddf8e03be8f6d577b558d1c887a82afcfcb3a64e8" + sha256 cellar: :any, ventura: "719ad5a7d65ec34fbe8b28e3fe3c83c06a9a4e4d164da471f6658927d1a45b7c" + sha256 arm64_linux: "a044de5d959c2c7e6e1976922eb3488ab2d5a04069f2400c89b739fad39aad7c" + sha256 x86_64_linux: "606bea1ce1da5dfbddc609b1f5d80fb36b4edc7e5aa26351504b0bebb4edde74" + end + + depends_on "cmake" => :build + depends_on "emacs" + depends_on "llvm" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # Fix to add backward compatibility for CMake version 4 + # `master` and `v2.41` are differ too much and so patch is not working + # PR ref: https://github.com/Andersbakken/rtags/pull/1443 + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + service do + run [opt_bin/"rdm", "--verbose", "--inactivity-timeout=300"] + keep_alive true + log_path var/"log/rtags.log" + error_log_path var/"log/rtags.log" + end + + test do + mkpath testpath/"src" + (testpath/"src/foo.c").write <<~C + void zaphod() { + } + + void beeblebrox() { + zaphod(); + } + C + (testpath/"src/README").write <<~EOS + 42 + EOS + + rdm = fork do + $stdout.reopen(File::NULL) + $stderr.reopen(File::NULL) + exec "#{bin}/rdm", "--exclude-filter=\"\"", "-L", "log" + end + + begin + sleep 5 + pipe_output("#{bin}/rc -c", "clang -c #{testpath}/src/foo.c", 0) + sleep 5 + assert_match "foo.c:1:6", shell_output("#{bin}/rc -f #{testpath}/src/foo.c:5:3") + system bin/"rc", "-q" + ensure + Process.kill 9, rdm + Process.wait rdm + end + end +end diff --git a/Formula/r/rtaudio.rb b/Formula/r/rtaudio.rb new file mode 100644 index 0000000000000..94f720bdafcc4 --- /dev/null +++ b/Formula/r/rtaudio.rb @@ -0,0 +1,40 @@ +class Rtaudio < Formula + desc "API for realtime audio input/output" + homepage "https://github.com/thestk/rtaudio" + url "https://github.com/thestk/rtaudio/archive/refs/tags/6.0.1.tar.gz" + sha256 "7206c8b6cee43b474f43d64988fefaadfdcfc4264ed38d8de5f5d0e6ddb0a123" + license "MIT" + head "https://github.com/thestk/rtaudio.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "636ce2d8b737d54f783dc197c20333d6476aa1c3f6a4999c43667d8b34caf7d3" + sha256 cellar: :any, arm64_sequoia: "b68191b6cb2a95518f1287e8edc1a0a8891797be09d9bded1505e867e42c5864" + sha256 cellar: :any, arm64_sonoma: "09c7f13747d8cea17f268baf52de92bf1663a177dd891f86ea9641100903fef2" + sha256 cellar: :any, sonoma: "86d1af2e2535c239c7f101e9e6f9b7eb6e0843fca2564a37a63c3165800da785" + sha256 cellar: :any_skip_relocation, arm64_linux: "490c370e0ad9885447cc173c281ddc593c0d3be86536fcc293fd874758f61382" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04dbca1518d5695c5c3f0123b05362787ab22f090c2a5fde271f52906fec5c4e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_linux do + depends_on "alsa-lib" + end + + def install + ENV.cxx11 + system "./autogen.sh", "--no-configure" + system "./configure", *std_configure_args + system "make", "install" + (pkgshare/"tests").install "tests/testall.cpp" + end + + test do + system ENV.cxx, pkgshare/"tests/testall.cpp", "-o", "test", "-std=c++11", + "-I#{include}/rtaudio", "-L#{lib}", "-lrtaudio" + system "./test" + end +end diff --git a/Formula/r/rtf2latex2e.rb b/Formula/r/rtf2latex2e.rb new file mode 100644 index 0000000000000..ee1fbb38f62dc --- /dev/null +++ b/Formula/r/rtf2latex2e.rb @@ -0,0 +1,62 @@ +class Rtf2latex2e < Formula + desc "RTF-to-LaTeX translation" + homepage "https://rtf2latex2e.sourceforge.net/" + url "https://downloads.sourceforge.net/project/rtf2latex2e/rtf2latex2e-unix/2-2/rtf2latex2e-2-2-3.tar.gz" + version "2.2.3" + sha256 "7ef86edea11d5513cd86789257a91265fc82d978541d38ab2c08d3e9d6fcd3c3" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/rtf2latex2e[._-]v?(\d+(?:[.-]\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "7b023787b6ca5b67c6aed5da197e586269857f3d0ca369d7bcb1f8104876def6" + sha256 arm64_sequoia: "831e4f4beb242fc95b2fa79b14e9cd22cedf31675de00c15e39a63445a2f59cc" + sha256 arm64_sonoma: "20d8b8da32f9ff8602f0cbe64dec244a89825507fdfd805bb1d2d6cfc75a85d2" + sha256 arm64_ventura: "12f88e9bf99968693672ded4a3784e42558e15895be581c13df04a7c99e978d4" + sha256 arm64_monterey: "dad0a2da5ef80b23fc0dfef461a75c8df8aea2d8c1fbe2714c0c1bc9cbf8f2fc" + sha256 arm64_big_sur: "35639bec913a1d60de52ac3d15d633bc17878c06829a1e5338272bae0f2399cd" + sha256 sonoma: "8ed26391c02189f76bd07fa5fb453ac44dcba86f7991884fd9f8c43555e81709" + sha256 ventura: "6c9d8dd73ea187545b5b6400918c8f2f493e32584c4ac01e9b035738c658fe66" + sha256 monterey: "3a88828b56f1fa396ee82d9b8e40f15631512a587b57489d9513a773bea157ac" + sha256 big_sur: "c0348eb7e801057a74bedb8665b51ab62d9239ee7d6fff51d2c094ce092b6e6e" + sha256 catalina: "c7c3d46cf3f0b3a18dcb01aa9e1f2be4573f236e52f466d78eda4d659084e5bf" + sha256 arm64_linux: "2616c236d487e2a2ee9da2d9a858433363de29e8c4f15d8d29785a68ebde0244" + sha256 x86_64_linux: "be77a066d018ead2d07e0bdb5e535f597e2ccea5659a505a271efe017a16fd94" + end + + def install + # Workaround for arm64 linux. Upstream isn't actively maintained + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + # Workaround for newer Clang + ENV.append "CC", "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `eqn_start_inline'; src/eqn.o:(.bss+0x18): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "make", "install", "prefix=#{prefix}", "CC=#{ENV.cc}" + end + + def caveats + <<~EOS + Configuration files have been installed to: + #{opt_pkgshare} + EOS + end + + test do + (testpath/"test.rtf").write <<~'EOS' + {\rtf1\ansi + {\b hello} world + } + EOS + system bin/"rtf2latex2e", "-n", "test.rtf" + assert_match "textbf{hello} world", File.read("test.tex") + end +end diff --git a/Formula/r/rtl_433.rb b/Formula/r/rtl_433.rb new file mode 100644 index 0000000000000..e19cdfafc5833 --- /dev/null +++ b/Formula/r/rtl_433.rb @@ -0,0 +1,61 @@ +class Rtl433 < Formula + desc "Program to decode radio transmissions from devices" + homepage "https://github.com/merbanan/rtl_433" + license "GPL-2.0-or-later" + head "https://github.com/merbanan/rtl_433.git", branch: "master" + + stable do + url "https://github.com/merbanan/rtl_433/archive/refs/tags/25.02.tar.gz" + sha256 "5a409ea10e6d3d7d4aa5ea91d2d6cc92ebb2d730eb229c7b37ade65458223432" + + # Fix build with CMake 4.0+. + # Remove with `stable` block on next release. + patch do + url "https://github.com/merbanan/rtl_433/commit/42ac641452aa56afa04f7bad5a55f790ee639852.patch?full_index=1" + sha256 "7e93f6021b80a8e21e637f1be1f7239ca608887b69685781a2e5afcf38bb342d" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9393179910f0f9f4fef924aadd7862b5ed72850d44dff3c4867b6da289fdd333" + sha256 cellar: :any, arm64_sequoia: "cadc9ac43692b5342a8d9fd305bf36598ce8e8f9cbcf088f3b87e7117f569f4c" + sha256 cellar: :any, arm64_sonoma: "6e8b6406520ac6b02a6d5292ed085c377edc6214dd817e27850a91d1216883b0" + sha256 cellar: :any, arm64_ventura: "ed54be9e72784603e4e6b1b7b1ae679f15ab03cf1ee92efa7c36151b40b81274" + sha256 cellar: :any, sonoma: "9ba535a042f8ea9bb058ae0b78ed860f4a3157ff228b68c2b5dbe7bd9eea8d2e" + sha256 cellar: :any, ventura: "e5165eebfca6801f1c588fac131f5b054d37974adc912fc6aead1286e60629f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "9381d5020fae59f1a79333b3e52429ed1486b105fa8f7fea786c464724006bea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2bb83d5f1303cc5aa8dd4d79d7609f0fc9c2ec1d530584a7c7e6648fdd4d0a42" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "librtlsdr" + depends_on "libusb" + depends_on "openssl@3" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test_cu8" do + url "https://raw.githubusercontent.com/merbanan/rtl_433_tests/master/tests/oregon_scientific/uvr128/g001_433.92M_250k.cu8" + sha256 "7aa07b72cec9926f463410cda6056eb2411ac9e76006ba4917a0527492c5f65d" + end + + resource "homebrew-expected_json" do + url "https://raw.githubusercontent.com/merbanan/rtl_433_tests/master/tests/oregon_scientific/uvr128/g001_433.92M_250k.json" + sha256 "5054c0f322030dd1ee3ca78261b64e691da832900a2c6e4d13cc22f0fbbfbbfa" + end + + testpath.install resource("homebrew-test_cu8") + testpath.install resource("homebrew-expected_json") + + expected_output = (testpath/"g001_433.92M_250k.json").read + rtl_433_output = shell_output("#{bin}/rtl_433 -c 0 -F json -r #{testpath}/g001_433.92M_250k.cu8") + + assert_equal rtl_433_output, expected_output + end +end diff --git a/Formula/r/rtmidi.rb b/Formula/r/rtmidi.rb new file mode 100644 index 0000000000000..ed54088391f06 --- /dev/null +++ b/Formula/r/rtmidi.rb @@ -0,0 +1,50 @@ +class Rtmidi < Formula + desc "API for realtime MIDI input/output" + homepage "https://github.com/thestk/rtmidi" + url "https://github.com/thestk/rtmidi/archive/refs/tags/6.0.0.tar.gz" + sha256 "ef7bcda27fee6936b651c29ebe9544c74959d0b1583b716ce80a1c6fea7617f0" + license "MIT" + head "https://github.com/thestk/rtmidi.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "8907d310bd719956d2142eafa69ff82047aa7b682b9e6bf46def31cb245a527f" + sha256 cellar: :any, arm64_sequoia: "16b58f421f5acc419193e3e5703910d7984ba6424f2353ad95d7d1d1b4b962aa" + sha256 cellar: :any, arm64_sonoma: "496714f725960c2a0675ebbdeb419366b882228ce0c0b025b26ebe7b203b6927" + sha256 cellar: :any, sonoma: "02ee430421083f82fc9614fcfb3143c23d501ec4e85903a16adbab4a1735af9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccdb2162e771404f89f0019084bf7b62abdade723c7ba3b479d4de2db0e5be6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1eee4ca1fa59c90126083c01a574ef14c0e5b86f61a473a6bc1109c619f6d14f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "jack" + end + + def install + ENV.cxx11 + system "./autogen.sh", "--no-configure" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "RtMidi.h" + int main(int argc, char **argv, char **env) { + RtMidiIn midiin; + RtMidiOut midiout; + std::cout << "Input ports: " << midiin.getPortCount() << "\\n" + << "Output ports: " << midiout.getPortCount() << "\\n"; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", "-I#{include}/rtmidi", "-L#{lib}", "-lrtmidi" + # Only run the test on macOS since ALSA initialization errors on Linux CI. + # ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory + system "./test" if OS.mac? + end +end diff --git a/Formula/r/rtmpdump.rb b/Formula/r/rtmpdump.rb new file mode 100644 index 0000000000000..24b205ddda8da --- /dev/null +++ b/Formula/r/rtmpdump.rb @@ -0,0 +1,69 @@ +class Rtmpdump < Formula + desc "Tool for downloading RTMP streaming media" + homepage "https://rtmpdump.mplayerhq.hu/" + url "https://deb.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4+20151223.gitfa8646d.1.orig.tar.gz" + mirror "http://deb.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4+20151223.gitfa8646d.1.orig.tar.gz" + version "2.4-20151223" + sha256 "5c032f5c8cc2937eb55a81a94effdfed3b0a0304b6376147b86f951e225e3ab5" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 3 + head "https://git.ffmpeg.org/rtmpdump.git", branch: "master" + + livecheck do + url "https://cdn-aws.deb.debian.org/debian/pool/main/r/rtmpdump/" + regex(/href=.*?rtmpdump[._-]v?(\d+(?:[.+]\d+)+)[^"' >]*?\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b227da74ef1d3c1338e803ac514d9576cb5892680460d24f35074d6243d0038" + sha256 cellar: :any, arm64_sequoia: "4d88c286ea074e6dc9612679d33f1e25910dce5cd4c4a3f9f2dcdec8ad950516" + sha256 cellar: :any, arm64_sonoma: "fc5748b95d47c39bb4d633090cc0a7b5fe90bda5ef163fa5b8809272c9bf4618" + sha256 cellar: :any, arm64_ventura: "1dec5a57d0173f54cb1f38efb6bfbd0bc416bdb298289ebaac1dce3a41bdd6fb" + sha256 cellar: :any, arm64_monterey: "5151b4682fa17d931e6383dd06b584d822df647fd454b22ddf498525606cff39" + sha256 cellar: :any, arm64_big_sur: "b548e2d6b53bc0d03bdc73fb01a175c8ef2338f80a3ca0c1963af625f0baa523" + sha256 cellar: :any, sonoma: "5d019561203c8b1c1c1e69c48b3987d531c55fa806bd83f0a462b6b7da732f48" + sha256 cellar: :any, ventura: "b27c24194ded10a47b93a379efae8ead4b04a6d3e8e34bc3a70942380b1ed68b" + sha256 cellar: :any, monterey: "b942d0dee2c95a00b3fd080c50d1f0d715448ae3147bbb18cf5adb758cb63798" + sha256 cellar: :any, big_sur: "794073edbf7402af7750b21fbcb44c5df038d6d3606450bd6a453dc92b6b3b09" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3f2a6eb1d6c8409c69a89db67cb545acf7c6c568f0a57f6df7d7108cce87df8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ab7f054fd0b01975be1893437235c61e2761ed9fb54e7880a854ca37809d57e" + end + + depends_on "openssl@3" + + uses_from_macos "zlib" + + conflicts_with "flvstreamer", because: "both install 'rtmpsrv', 'rtmpsuck' and 'streams' binary" + + # Patch for OpenSSL 1.1 compatibility + # Taken from https://github.com/DJ-Huntress/RTMPDump-OpenSSL-1.1 + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/rtmpdump/openssl-1.1.diff" + sha256 "3c9167e642faa9a72c1789e7e0fb1ff66adb11d721da4bd92e648cb206c4a2bd" + end + + def install + ENV.deparallelize + + os = if OS.mac? + "darwin" + else + "posix" + end + + system "make", "CC=#{ENV.cc}", + "XCFLAGS=#{ENV.cflags}", + "XLDFLAGS=#{ENV.ldflags}", + "MANDIR=#{man}", + "SYS=#{os}", + "prefix=#{prefix}", + "sbindir=#{bin}", + "install" + end + + test do + system bin/"rtmpdump", "-h" + end +end diff --git a/Formula/r/rtorrent.rb b/Formula/r/rtorrent.rb new file mode 100644 index 0000000000000..c5e54740430ee --- /dev/null +++ b/Formula/r/rtorrent.rb @@ -0,0 +1,43 @@ +class Rtorrent < Formula + desc "Ncurses BitTorrent client based on libtorrent-rakshasa" + homepage "https://github.com/rakshasa/rtorrent" + url "https://github.com/rakshasa/rtorrent/releases/download/v0.16.1/rtorrent-0.16.1.tar.gz" + sha256 "b2cdf8898b62f3763b29df94e4ad47d52cea2aa33b76581097a18894dd116073" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "175b33916379b6d049b2f8766bf4685312c437ad56be97d5995788fa2d900190" + sha256 cellar: :any, arm64_sequoia: "98aa7b8bb25f3564a392c8be39d0ef8beb3a8248e62af969078371fb361658dc" + sha256 cellar: :any, arm64_sonoma: "e20270dea9d0c81f4e64c1abdcd9194aeff4abaf17900e3c0381f96bc086ef0f" + sha256 cellar: :any, sonoma: "86df3ef3254c6914f1835dfff81190703d5142ea908a5740d9e6a51109e60eaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "18b850eeaf3e98485e6137cb6584a2065d70a948c35cd66e9f1f46ffd3ec220b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0c1bae67240a21a39353280e465ac986851702d583c335a2b6f3923c6eefc77" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "libtorrent-rakshasa" + depends_on "xmlrpc-c" + + uses_from_macos "curl" + uses_from_macos "ncurses" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-xmlrpc-c", *std_configure_args + system "make" + system "make", "install" + end + + test do + pid = spawn bin/"rtorrent", "-n", "-s", testpath + sleep 10 + assert_path_exists testpath/"rtorrent.lock" + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/r/rtptools.rb b/Formula/r/rtptools.rb new file mode 100644 index 0000000000000..ce9df2bca5b96 --- /dev/null +++ b/Formula/r/rtptools.rb @@ -0,0 +1,64 @@ +class Rtptools < Formula + desc "Set of tools for processing RTP data" + homepage "https://github.com/irtlab/rtptools" + url "https://github.com/irtlab/rtptools/archive/refs/tags/1.22.tar.gz" + sha256 "ac6641558200f5689234989e28ed3c44ead23757ccf2381c8878933f9c2523e0" + license "BSD-3-Clause" + head "https://github.com/irtlab/rtptools.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b354b4bf3ba46bfdf295e0822a5e71faec5fc5c086e03471475c5270d8ce268" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06e5ec34e865108c33c8e34cc136a7d12758ace00639494adeafeabccea7d1e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f7a817f96226b0cc4a1bd1dd656fcbd37b9a2bb4c0a562fdc5c8f40db60530b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d06d42bddd550eb32476e7412d204a11795fa1295c9c68e0b608e652b5092df" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3b656aa50230fbf083a0acd2bb82b6c9911b0c1e450280f2beba636aea4dd444" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a760c9b142e55aba7732406eeb2603c49b9b7514e02bd01bc245d0661772bf20" + sha256 cellar: :any_skip_relocation, sonoma: "691da9365bc23c711cefb7628f72e910113437022a5d8c820058b0912fdbc2df" + sha256 cellar: :any_skip_relocation, ventura: "d9f2ab7acb5516a14a0da93a58364e92cd396275a687947d4c1fa6e66419f2d5" + sha256 cellar: :any_skip_relocation, monterey: "cc4355761bc5d55ef0bf7ed1b81946cecb40db52832d63dca2ba4a01c5655168" + sha256 cellar: :any_skip_relocation, big_sur: "a9f1e8f18d40ba8b435f619de132a5fbc00e0ef84d5a1e10378700e0f3ce417b" + sha256 cellar: :any_skip_relocation, catalina: "59fa4c8c53c3430c6bb47b82c752eef710f692ad3fb1bd3ab82c108524aabe00" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbc5b735cb15f7d17b43615778d6306ed204c56abbf58bccaffe1df79b08f637" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e72d5483db8933643fcdf7793ac236d09f2f28bf2fa8f9db169fe59d90728e3" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + on_linux do + depends_on "libnsl" + end + + def install + system "autoreconf", "--verbose", "--install", "--force" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + packet = [ + 0x5a, 0xb1, 0x49, 0x21, 0x00, 0x0d, 0x21, 0xce, 0x7f, 0x00, 0x00, 0x01, + 0x11, 0xd9, 0x00, 0x00, 0x00, 0x18, 0x00, 0x10, 0x00, 0x00, 0x06, 0x8a, + 0x80, 0x00, 0xdd, 0x51, 0x32, 0xf1, 0xab, 0xb4, 0xdb, 0x24, 0x9b, 0x07, + 0x64, 0x4f, 0xda, 0x56 + ] + + (testpath/"test.rtp").open("wb") do |f| + f.puts "#!rtpplay1.0 127.0.0.1/55568" + f.write packet.pack("c*") + end + + output = shell_output("#{bin}/rtpdump -F ascii -f #{testpath}/test.rtp") + assert_match "seq=56657 ts=854698932 ssrc=0xdb249b07", output + end +end diff --git a/Formula/r/rttr.rb b/Formula/r/rttr.rb new file mode 100644 index 0000000000000..5f6c0b6b2e342 --- /dev/null +++ b/Formula/r/rttr.rb @@ -0,0 +1,66 @@ +class Rttr < Formula + desc "C++ Reflection Library" + homepage "https://www.rttr.org" + url "https://github.com/rttrorg/rttr/archive/refs/tags/v0.9.6.tar.gz" + sha256 "058554f8644450185fd881a6598f9dee7ef85785cbc2bb5a5526a43225aa313f" + license "MIT" + head "https://github.com/rttrorg/rttr.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b7fbefc620c98f69bcb1b28040e8e12b972b59a462d6e0155eab4f9d962fe156" + sha256 cellar: :any, arm64_sequoia: "fb6ba7f707377b4817a16a4e9afa427d8e4117d8ea02b82d8af5e198c04cd6f6" + sha256 cellar: :any, arm64_sonoma: "e82299210a49d335b1563afe4dc0abaa3bcf1b6aeab8876f1904e9015b6cc101" + sha256 cellar: :any, arm64_ventura: "fa3316e83f1ef591accfaf47c509009633178b817e6a6d064c293faa53445bf0" + sha256 cellar: :any, arm64_monterey: "4aeeb410f8918197af10c1f52ed56d98c7d150b6c08ea3da94b1ef176abfc75b" + sha256 cellar: :any, arm64_big_sur: "8064ec9a745621fcd2e913f48e188fbbdb01a870fe76ba3c66ebb88e20295556" + sha256 cellar: :any, sonoma: "79a60c3feaa552808753851ac7a5ee7c48d62160b17e3133d9ceea36a0288769" + sha256 cellar: :any, ventura: "8572bb48a52460b98f4292e253b0f441fe6036d766b1e6272fd891bdc7da159f" + sha256 cellar: :any, monterey: "276fea35306e5bb1f9d56520a4cb1ebdc6cb99183abe7f40338c9eccf3c9f357" + sha256 cellar: :any, big_sur: "b1e8b3136ef06805c2e2f7638747e18f03fec35fd71ce2d0f12bb67a340ec635" + sha256 cellar: :any, catalina: "84e56a259db377594ffd19dbbcd8740f901a59a5c1e4dd112aba54600448d919" + sha256 cellar: :any_skip_relocation, arm64_linux: "c467dad3aa2b7d571f87ce82afa6e62afcfb128b4fefeb8a1a4e0914b0def40d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2773d72369cd12e7ab3c26af035f13a68e908fbd69a0faad42e54d3185d25097" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + + def install + args = %w[ + -DBUILD_UNIT_TESTS=OFF + -DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations + ] + + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + hello_world = "Hello World" + (testpath/"test.cpp").write <<~CPP + #include + #include + + static void f() { std::cout << "#{hello_world}" << std::endl; } + using namespace rttr; + RTTR_REGISTRATION + { + using namespace rttr; + registration::method("f", &f); + } + int main() + { + type::invoke("f", {}); + } + // outputs: "Hello World" + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lrttr_core", "-o", "test" + assert_match hello_world, shell_output("./test") + end +end diff --git a/Formula/r/rubberband.rb b/Formula/r/rubberband.rb new file mode 100644 index 0000000000000..2c905e694c744 --- /dev/null +++ b/Formula/r/rubberband.rb @@ -0,0 +1,50 @@ +class Rubberband < Formula + desc "Audio time stretcher tool and library" + homepage "https://breakfastquay.com/rubberband/" + url "https://breakfastquay.com/files/releases/rubberband-4.0.0.tar.bz2" + sha256 "af050313ee63bc18b35b2e064e5dce05b276aaf6d1aa2b8a82ced1fe2f8028e9" + license "GPL-2.0-or-later" + head "https://hg.sr.ht/~breakfastquay/rubberband", using: :hg + + livecheck do + url :homepage + regex(/href=.*?rubberband[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "65ba1e050a7368f043369932bfc493de4f33f9dda9f6863250960559b5bdf1d8" + sha256 cellar: :any, arm64_sequoia: "5ac29718f68b181de61e81dd42bc85cc74cb1fc4ed5fdca541a94224bc43feaa" + sha256 cellar: :any, arm64_sonoma: "d510bad14f78b8a3e7be16f5c49a78fb3638f686ec1c04c2cb28310b49e4ead7" + sha256 cellar: :any, arm64_ventura: "066c9310bb2eb10817aa44bc17eb1a3ce20f47b4c66e4381b097c8625caef7ff" + sha256 cellar: :any, sonoma: "3bcd1310c98256b7a382f3b5bbdf1e22a060bb41989fab028122e0b5cd87e6af" + sha256 cellar: :any, ventura: "d2b9fac38088ef6014be7d725f07b5d16aa92e22b1dc56046aa2390005379194" + sha256 arm64_linux: "a39402bd21e74bcd13aace129f59aa365409a63b26112d4bc782bef838d11aa8" + sha256 x86_64_linux: "982c2036c3528e0ae338680ba6baff4e8a0cd5ee16a2bafe4673e9cdea4d9e05" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libsamplerate" + depends_on "libsndfile" + + on_linux do + depends_on "fftw" + depends_on "ladspa-sdk" + depends_on "vamp-plugin-sdk" + end + + def install + args = ["-Dresampler=libsamplerate"] + args << "-Dfft=fftw" if OS.linux? + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + output = shell_output("#{bin}/rubberband -t2 #{test_fixtures("test.wav")} out.wav 2>&1") + assert_match "Pass 2: Processing...", output + end +end diff --git a/Formula/r/ruby-build.rb b/Formula/r/ruby-build.rb new file mode 100644 index 0000000000000..fb9afb87050c4 --- /dev/null +++ b/Formula/r/ruby-build.rb @@ -0,0 +1,28 @@ +class RubyBuild < Formula + desc "Install various Ruby versions and implementations" + homepage "https://rbenv.org/man/ruby-build.1" + url "https://github.com/rbenv/ruby-build/archive/refs/tags/v20251023.tar.gz" + sha256 "0d48195ec61a6479b110f78d830643a24b5e5014b9f563096265566d7d404d9c" + license "MIT" + head "https://github.com/rbenv/ruby-build.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "b0ede4034681e253b2256f582343f070eeb27b4f549d88ac4ea3f23a72aa7424" + end + + depends_on "autoconf" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pkgconf" + depends_on "readline" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match "2.0.0", shell_output("#{bin}/ruby-build --definitions") + end +end diff --git a/Formula/r/ruby-completion.rb b/Formula/r/ruby-completion.rb new file mode 100644 index 0000000000000..f8a60a1f934ac --- /dev/null +++ b/Formula/r/ruby-completion.rb @@ -0,0 +1,24 @@ +class RubyCompletion < Formula + desc "Bash completion for Ruby" + homepage "https://github.com/mernen/completion-ruby" + url "https://github.com/mernen/completion-ruby/archive/refs/tags/v1.0.3.tar.gz" + sha256 "cbcd002bba2a43730cff54f5386565917913d9dec16dcd89345fbe298fe4316b" + license "MIT" + version_scheme 1 + head "https://github.com/mernen/completion-ruby.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "d42c9cca43af3e04b6f0f6afc91b09543147e9e0af69495cafc8f0d1f60dcc14" + end + + def install + bash_completion.install "completion-ruby" => "ruby" + end + + test do + assert_match "-F __ruby", + shell_output("bash -c 'source #{bash_completion}/ruby && complete -p ruby'") + end +end diff --git a/Formula/r/ruby-install.rb b/Formula/r/ruby-install.rb new file mode 100644 index 0000000000000..4f19a0c289633 --- /dev/null +++ b/Formula/r/ruby-install.rb @@ -0,0 +1,29 @@ +class RubyInstall < Formula + desc "Install Ruby, JRuby, Rubinius, TruffleRuby, or mruby" + homepage "https://github.com/postmodern/ruby-install" + url "https://github.com/postmodern/ruby-install/releases/download/v0.10.1/ruby-install-0.10.1.tar.gz" + sha256 "7f563af2bae257c006a5dba0b1976e0885d3814332cc4391eeaa88d702753289" + license "MIT" + head "https://github.com/postmodern/ruby-install.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "830bb609eb27783b5bb8de44341d16bffd24f18fdc6f453d6f21ea136ef7b4e3" + end + + depends_on "xz" + + def install + system "make", "install", "PREFIX=#{prefix}" + + # Ensure uniform bottles across prefixes + inreplace [ + pkgshare/"ruby-install.sh", + pkgshare/"truffleruby/functions.sh", + pkgshare/"truffleruby-graalvm/functions.sh", + ], "/usr/local", HOMEBREW_PREFIX + end + + test do + system bin/"ruby-install" + end +end diff --git a/Formula/r/ruby-lsp.rb b/Formula/r/ruby-lsp.rb new file mode 100644 index 0000000000000..2c808c07fd658 --- /dev/null +++ b/Formula/r/ruby-lsp.rb @@ -0,0 +1,51 @@ +class RubyLsp < Formula + desc "Opinionated language server for Ruby" + homepage "https://shopify.github.io/ruby-lsp" + url "https://github.com/Shopify/ruby-lsp/archive/refs/tags/v0.26.2.tar.gz" + sha256 "358cd9a377ee9849a27a8f68d3fb3d1977e55ca84a374852971af4b344757efc" + license "MIT" + head "https://github.com/Shopify/ruby-lsp.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "826a143cfae84facbc47fab86674f1d612f8e6c5a1390b84e43938f0d08c3e07" + sha256 cellar: :any, arm64_sequoia: "718652589f3e800b0b983896ec69ed31cdce239aeb49b421fb092d8122471bc9" + sha256 cellar: :any, arm64_sonoma: "98bacffb55e86b4d64b17ca643fb7080f55d56d535d790868645cf719bd23c2c" + sha256 cellar: :any, sonoma: "f49fe294fddad367ae1bab6714ea7414eacdcffdd7faae167ec7d0fc1df6042c" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c8a5804b3a1fa48ae7de04a3e1b161d619d90a0d920a209c679aa25e7ac7696" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d89d9728ff283f10f9ce1c6f2afd6c4602853ca97d64a00531746709a5bf891a" + end + + depends_on "ruby" + + def install + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg + ENV["GEM_HOME"] = libexec + + system "bundle", "config", "set", "without", "development", "test" + system "bundle", "install" + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + bin.install libexec/"bin/#{name}" + bin.env_script_all_files libexec/"bin", + PATH: "#{Formula["ruby"].opt_bin}:$PATH", + GEM_HOME: ENV["GEM_HOME"] + end + + test do + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output("#{bin}/ruby-lsp 2>&1", input, 0) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/r/ruby.rb b/Formula/r/ruby.rb new file mode 100644 index 0000000000000..141bdc0a4c7fb --- /dev/null +++ b/Formula/r/ruby.rb @@ -0,0 +1,302 @@ +class Ruby < Formula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + license "Ruby" + head "https://github.com/ruby/ruby.git", branch: "master" + + stable do + # Consider changing the default of `Gem.default_user_install` to true with Ruby 3.5. + # This may depend on https://github.com/rubygems/rubygems/issues/5682. + url "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.7.tar.gz" + sha256 "23815a6d095696f7919090fdc3e2f9459b2c83d57224b2e446ce1f5f7333ef36" + + # Should be updated only when Ruby is updated (if an update is available). + # The exception is Rubygem security fixes, which mandate updating this + # formula & the versioned equivalents and bumping the revisions. + resource "rubygems" do + url "https://rubygems.org/rubygems/rubygems-3.7.2.tgz" + sha256 "efece01225a532f4b52cf8764d20a00e0d29ed6f85b33d9302df4896a90fa5ab" + + livecheck do + url "https://rubygems.org/pages/download" + regex(/href=.*?rubygems[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + # Update the bundled openssl gem for compatibility with OpenSSL 3.6+ + resource "openssl" do + url "https://github.com/ruby/openssl/archive/refs/tags/v3.3.1.tar.gz" + sha256 "ca9b8f5940153e67b0d5e7e075ecd64b9d28b9f9b2f2c9f0748c1538734dfe10" + end + end + + livecheck do + url "https://www.ruby-lang.org/en/downloads/releases/" + regex(/href=.*?ruby[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "fd5bd616bde3e6620a727de2ac4846af1a844de3fc4bd2be0be8da5ea37c8cea" + sha256 arm64_sequoia: "c2e6a5b6e46e28ff6fb34295146ee09cb2f4d461cbb3d43b9e3f38faac6ce2bc" + sha256 arm64_sonoma: "f7a70bf109409b25cc7078f63eeb30bda4b79cdb6f65a04a6eaaa119382d0719" + sha256 sonoma: "39a1a9c6b5027fa1c9d2ccd8ef43bce3691af2092df7ffc5dcab2eff8f91dc76" + sha256 arm64_linux: "8effd59d391a4fa6b5f2a14b8c3250b8d306da641278788a3cc64d15d6876b30" + sha256 x86_64_linux: "cb6a3b60667918b8615997e17583b00c9bf62dacd9e3a747738c91b11953929a" + end + + keg_only :provided_by_macos + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libyaml" + depends_on "openssl@3" + + uses_from_macos "gperf" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def determine_api_version + Utils.safe_popen_read(bin/"ruby", "-e", "print Gem.ruby_api_version") + end + + def api_version + if head? + if latest_head_prefix + determine_api_version + else + # Best effort guess + "#{stable.version.major.to_i}.#{stable.version.minor.to_i + 1}.0+0" + end + else + "#{version.major.to_i}.#{version.minor.to_i}.0" + end + end + + def rubygems_bindir + HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" + end + + def install + if build.stable? + openssl_gem_version = File.read("ext/openssl/openssl.gemspec")[/spec\.version\s*=\s*"(\d+(?:\.\d+)+)/, 1] + odie "Remove openssl resource!" if Version.new(openssl_gem_version) >= "3.3.1" + rm_r(%w[ext/openssl test/openssl]) + resource("openssl").stage do + (buildpath/"ext").install "ext/openssl" + (buildpath/"ext/openssl").install "lib", "History.md", "openssl.gemspec" + (buildpath/"test").install "test/openssl" + end + end + + # otherwise `gem` command breaks + ENV.delete("SDKROOT") + + # Prevent `make` from trying to install headers into the SDK + # TODO: Remove this workaround when the following PR is merged/resolved: + # https://github.com/Homebrew/brew/pull/12508 + inreplace "tool/mkconfig.rb", /^(\s+val = )'"\$\(SDKROOT\)"'\+/, "\\1" + + system "./autogen.sh" if build.head? + + paths = %w[libyaml openssl@3].map { |f| Formula[f].opt_prefix } + args = %W[ + --prefix=#{prefix} + --enable-shared + --disable-silent-rules + --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby + --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby + --with-opt-dir=#{paths.join(":")} + --without-gmp + ] + args << "--with-baseruby=#{RbConfig.ruby}" if build.head? + args << "--disable-dtrace" if OS.mac? && !MacOS::CLT.installed? + + # Correct MJIT_CC to not use superenv shim + args << "MJIT_CC=/usr/bin/#{DevelopmentTools.default_compiler}" + + # Avoid stdckdint.h on macOS 15 as it's not available in Xcode 16.0-16.2, + # and if the build system picks it up it'll use it for runtime builds too. + args << "ac_cv_header_stdckdint_h=no" if OS.mac? && MacOS.version == :sequoia + + system "./configure", *args + + # Ruby has been configured to look in the HOMEBREW_PREFIX for the + # sitedir and vendordir directories; however we don't actually want to create + # them during the install. + # + # These directories are empty on install; sitedir is used for non-rubygems + # third party libraries, and vendordir is used for packager-provided libraries. + inreplace "tool/rbinstall.rb" do |s| + s.gsub! 'prepare "extension scripts", sitelibdir', "" + s.gsub! 'prepare "extension scripts", vendorlibdir', "" + s.gsub! 'prepare "extension objects", sitearchlibdir', "" + s.gsub! 'prepare "extension objects", vendorarchlibdir', "" + end + + system "make" + system "make", "install" + + # A newer version of ruby-mode.el is shipped with Emacs + elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } + + if OS.linux? + arch = Utils.safe_popen_read( + bin/"ruby", "-rrbconfig", "-e", 'print RbConfig::CONFIG["arch"]' + ).chomp + # Don't restrict to a specific GCC compiler binary we used (e.g. gcc-5). + inreplace lib/"ruby/#{api_version}/#{arch}/rbconfig.rb" do |s| + s.gsub! ENV.cxx, "c++" + s.gsub! ENV.cc, "cc" + # Change e.g. `CONFIG["AR"] = "gcc-ar-11"` to `CONFIG["AR"] = "ar"` + s.gsub!(/(CONFIG\[".+"\] = )"(?:gcc|g\+\+)-(.*)-\d+"/, '\\1"\\2"') + end + end + + if build.stable? # Use bundled RubyGems for --HEAD (will be newer) + # This is easier than trying to keep both current & versioned Ruby + # formulae repeatedly updated with Rubygem patches. + resource("rubygems").stage do + ENV.prepend_path "PATH", bin + + system bin/"ruby", "setup.rb", "--prefix=#{buildpath}/vendor_gem" + rg_in = lib/"ruby/#{api_version}" + rg_gems_in = lib/"ruby/gems/#{api_version}" + + # Remove bundled Rubygem and Bundler + rm_r rg_in/"bundler" + rm rg_in/"bundler.rb" + rm_r Dir[rg_gems_in/"gems/bundler-*"] + rm Dir[rg_gems_in/"specifications/default/bundler-*.gemspec"] + rm_r rg_in/"rubygems" + rm rg_in/"rubygems.rb" + rm bin/"gem" + + # Drop in the new version. + rg_in.install Dir[buildpath/"vendor_gem/lib/*"] + (rg_gems_in/"gems").install Dir[buildpath/"vendor_gem/gems/*"] + (rg_gems_in/"specifications/default").install Dir[buildpath/"vendor_gem/specifications/default/*"] + bin.install buildpath/"vendor_gem/bin/gem" => "gem" + bin.install buildpath/"vendor_gem/bin/bundle" => "bundle" + bin.install buildpath/"vendor_gem/bin/bundler" => "bundler" + end + end + + # Customize rubygems to look/install in the global gem directory + # instead of in the Cellar, making gems last across reinstalls + config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" + config_file.write rubygems_config + end + + def post_install + # Since Gem ships Bundle we want to provide that full/expected installation + # but to do so we need to handle the case where someone has previously + # installed bundle manually via `gem install`. + rm(%W[ + #{rubygems_bindir}/bundle + #{rubygems_bindir}/bundler + ].select { |file| File.exist?(file) }) + rm_r(Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"]) + end + + def rubygems_config + <<~RUBY + module Gem + class << self + alias :old_default_dir :default_dir + alias :old_default_path :default_path + alias :old_default_bindir :default_bindir + alias :old_ruby :ruby + alias :old_default_specifications_dir :default_specifications_dir + end + + def self.default_dir + path = [ + "#{HOMEBREW_PREFIX}", + "lib", + "ruby", + "gems", + RbConfig::CONFIG['ruby_version'] + ] + + @homebrew_path ||= File.join(*path) + end + + def self.private_dir + path = if defined? RUBY_FRAMEWORK_VERSION then + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', + RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + end + + @private_dir ||= File.join(*path) + end + + def self.default_path + if Gem.user_home && File.exist?(Gem.user_home) + [user_dir, default_dir, old_default_dir, private_dir] + else + [default_dir, old_default_dir, private_dir] + end + end + + def self.default_bindir + "#{rubygems_bindir}" + end + + def self.ruby + "#{opt_bin}/ruby" + end + + # https://github.com/Homebrew/homebrew-core/issues/40872#issuecomment-542092547 + # https://github.com/Homebrew/homebrew-core/pull/48329#issuecomment-584418161 + def self.default_specifications_dir + File.join(Gem.old_default_dir, "specifications", "default") + end + end + RUBY + end + + def caveats + <<~EOS + By default, binaries installed by gem will be placed into: + #{rubygems_bindir} + + You may want to add this to your PATH. + EOS + end + + test do + hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") + assert_equal "hello\n", hello_text + + assert_equal api_version, determine_api_version + + ENV["GEM_HOME"] = testpath + system bin/"gem", "install", "json" + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org' + gem 'github-markup' + EOS + system bin/"bundle", "exec", "ls" # https://github.com/Homebrew/homebrew-core/issues/53247 + system bin/"bundle", "install", "--binstubs=#{testpath}/bin" + assert_path_exists testpath/"bin/github-markup", "github-markup is not installed in #{testpath}/bin" + end +end diff --git a/Formula/r/ruby@3.0.rb b/Formula/r/ruby@3.0.rb new file mode 100644 index 0000000000000..135ef6a34292a --- /dev/null +++ b/Formula/r/ruby@3.0.rb @@ -0,0 +1,249 @@ +class RubyAT30 < Formula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + url "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.7.tar.xz" + sha256 "1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab" + license "Ruby" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "d6c0c2d1eef8d174fb0f72a27d861860da9630b07d7d9adc3d762e7048769b02" + sha256 arm64_sonoma: "5c0e954edf5b76597d96a69550fffd3ab6b4d8d71d0d3bce7a728238c0aa1310" + sha256 arm64_ventura: "bb53ca40e06196dd45c889716af020211ee1477da8fbbe1afa2700a891f543c3" + sha256 sonoma: "c62170dac9be26f52fb87691a143c7eba3cf42f6ceef370cc0a817b006f47448" + sha256 ventura: "a8e4b31bebfa062b93199aae9920e4b6e08b6b03f9a469098948a20f72ec3a04" + sha256 arm64_linux: "9498dca4eb73b1f7490207852edd22e18cb8087624ba92585f880840fe185c43" + sha256 x86_64_linux: "82fa93efac645b47c3aea2062908182d521aecc5c6f71521a5077ae238e384d2" + end + + keg_only :versioned_formula + + disable! date: "2025-04-23", because: :unmaintained + + depends_on "pkgconf" => :build + depends_on "libyaml" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + # Should be updated only when Ruby is updated (if an update is available). + # The exception is Rubygem security fixes, which mandate updating this + # formula & the versioned equivalents and bumping the revisions. + resource "rubygems" do + url "https://rubygems.org/rubygems/rubygems-3.5.9.tgz" + sha256 "2b203642191e6bb9ece19075f62275a88526319b124684c46667415dca4363f1" + end + + # Update the bundled openssl gem for compatibility with OpenSSL 3. + resource "openssl" do + url "https://github.com/ruby/openssl/archive/refs/tags/v3.2.0.tar.gz" + sha256 "993534b105f5405c2db482ca26bb424d9e47f0ffe7e4b3259a15d95739ff92f9" + end + + # Fix compile error in newer compilers. + patch do + url "https://github.com/ruby/bigdecimal/commit/6d510e47bce2ba4dbff4c48c26ee8d5cd8de1758.patch?full_index=1" + sha256 "8ad16dd450031adea22f433c84a61ea4780c99bec6f0f40b1a88e50a597bf54f" + end + + def api_version + "3.0.0" + end + + def rubygems_bindir + HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" + end + + def install + # otherwise `gem` command breaks + ENV.delete("SDKROOT") + + resource("openssl").stage do + %w[ext/openssl test/openssl].map { |path| rm_r(buildpath/path) } + (buildpath/"ext").install "ext/openssl" + (buildpath/"ext/openssl").install "lib", "History.md", "openssl.gemspec" + (buildpath/"test").install "test/openssl" + end + + paths = %w[libyaml openssl@3 readline].map { |f| Formula[f].opt_prefix } + args = %W[ + --prefix=#{prefix} + --enable-shared + --disable-silent-rules + --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby + --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby + --with-opt-dir=#{paths.join(":")} + --without-gmp + ] + args << "--disable-dtrace" if OS.mac? && !MacOS::CLT.installed? + + # Correct MJIT_CC to not use superenv shim + args << "MJIT_CC=/usr/bin/#{DevelopmentTools.default_compiler}" + + system "./configure", *args + + # Ruby has been configured to look in the HOMEBREW_PREFIX for the + # sitedir and vendordir directories; however we don't actually want to create + # them during the install. + # + # These directories are empty on install; sitedir is used for non-rubygems + # third party libraries, and vendordir is used for packager-provided libraries. + inreplace "tool/rbinstall.rb" do |s| + s.gsub! 'prepare "extension scripts", sitelibdir', "" + s.gsub! 'prepare "extension scripts", vendorlibdir', "" + s.gsub! 'prepare "extension objects", sitearchlibdir', "" + s.gsub! 'prepare "extension objects", vendorarchlibdir', "" + end + + system "make" + system "make", "install" + + # A newer version of ruby-mode.el is shipped with Emacs + elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } + + # This is easier than trying to keep both current & versioned Ruby + # formulae repeatedly updated with Rubygem patches. + resource("rubygems").stage do + ENV.prepend_path "PATH", bin + + system bin/"ruby", "setup.rb", "--prefix=#{buildpath}/vendor_gem" + rg_in = lib/"ruby/#{api_version}" + rg_gems_in = lib/"ruby/gems/#{api_version}" + + # Remove bundled Rubygem and Bundler + rm_r rg_in/"bundler" + rm rg_in/"bundler.rb" + rm_r Dir[rg_gems_in/"gems/bundler-*"] + rm Dir[rg_gems_in/"specifications/default/bundler-*.gemspec"] + rm_r rg_in/"rubygems" + rm rg_in/"rubygems.rb" + rm bin/"gem" + + # Drop in the new version. + rg_in.install Dir[buildpath/"vendor_gem/lib/*"] + (rg_gems_in/"gems").install Dir[buildpath/"vendor_gem/gems/*"] + (rg_gems_in/"specifications/default").install Dir[buildpath/"vendor_gem/specifications/default/*"] + bin.install buildpath/"vendor_gem/bin/gem" => "gem" + bin.install buildpath/"vendor_gem/bin/bundle" => "bundle" + bin.install buildpath/"vendor_gem/bin/bundler" => "bundler" + end + + # Customize rubygems to look/install in the global gem directory + # instead of in the Cellar, making gems last across reinstalls + config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" + config_file.write rubygems_config + end + + def post_install + # Since Gem ships Bundle we want to provide that full/expected installation + # but to do so we need to handle the case where someone has previously + # installed bundle manually via `gem install`. + rm(%W[ + #{rubygems_bindir}/bundle + #{rubygems_bindir}/bundler + ].select { |file| File.exist?(file) }) + rm_r(Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"]) + end + + def rubygems_config + <<~EOS + module Gem + class << self + alias :old_default_dir :default_dir + alias :old_default_path :default_path + alias :old_default_bindir :default_bindir + alias :old_ruby :ruby + alias :old_default_specifications_dir :default_specifications_dir + end + + def self.default_dir + path = [ + "#{HOMEBREW_PREFIX}", + "lib", + "ruby", + "gems", + RbConfig::CONFIG['ruby_version'] + ] + + @homebrew_path ||= File.join(*path) + end + + def self.private_dir + path = if defined? RUBY_FRAMEWORK_VERSION then + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', + RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + end + + @private_dir ||= File.join(*path) + end + + def self.default_path + if Gem.user_home && File.exist?(Gem.user_home) + [user_dir, default_dir, old_default_dir, private_dir] + else + [default_dir, old_default_dir, private_dir] + end + end + + def self.default_bindir + "#{rubygems_bindir}" + end + + def self.ruby + "#{opt_bin}/ruby" + end + + # https://github.com/Homebrew/homebrew-core/issues/40872#issuecomment-542092547 + # https://github.com/Homebrew/homebrew-core/pull/48329#issuecomment-584418161 + def self.default_specifications_dir + File.join(Gem.old_default_dir, "specifications", "default") + end + end + EOS + end + + def caveats + <<~EOS + By default, binaries installed by gem will be placed into: + #{rubygems_bindir} + + You may want to add this to your PATH. + EOS + end + + test do + hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") + assert_equal "hello\n", hello_text + + assert_equal api_version, shell_output("#{bin}/ruby -e 'print Gem.ruby_api_version'") + + ENV["GEM_HOME"] = testpath + system bin/"gem", "install", "json" + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org' + gem 'github-markup' + EOS + system bin/"bundle", "exec", "ls" # https://github.com/Homebrew/homebrew-core/issues/53247 + system bin/"bundle", "install", "--binstubs=#{testpath}/bin" + assert_path_exists testpath/"bin/github-markup", "github-markup is not installed in #{testpath}/bin" + end +end diff --git a/Formula/r/ruby@3.1.rb b/Formula/r/ruby@3.1.rb new file mode 100644 index 0000000000000..81cd7abf501ff --- /dev/null +++ b/Formula/r/ruby@3.1.rb @@ -0,0 +1,263 @@ +class RubyAT31 < Formula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + url "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz" + sha256 "0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b" + license "Ruby" + revision 1 + + bottle do + sha256 arm64_tahoe: "2cc59176253bc1c01a3edd0b95755b5c3b3ae4aabe429c73f4a0258133b180e7" + sha256 arm64_sequoia: "92903704cc5d9d37f66230174ff388340eafc43f7066383d900699df9e5fffcc" + sha256 arm64_sonoma: "510daa18857bbdfca6cd36aa19adca0ef969f422e0447be9747a38120f27aeec" + sha256 sonoma: "1e58691327c76cb8e297e80738ebfac66888b4b1bfacbcf670fa7ba964d74650" + sha256 arm64_linux: "ee69b92c9720d2f814ef0482746e7879ee8299d3717b8756113c2a5b4ffa68ff" + sha256 x86_64_linux: "1254c0da70acc105ffc4e77233428ac5018495a4a7b03e87c62f2d326e565e9a" + end + + keg_only :versioned_formula + + # EOL: 2025-03-26 + deprecate! date: "2025-04-08", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "libyaml" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + # Should be updated only when Ruby is updated (if an update is available). + # The exception is Rubygem security fixes, which mandate updating this + # formula & the versioned equivalents and bumping the revisions. + resource "rubygems" do + url "https://rubygems.org/rubygems/rubygems-3.5.11.tgz" + sha256 "4521b52f843620a9fc5ca7414526b7463b0989564c3ae80b26b68fbd1304c818" + end + + # Update the bundled openssl gem for compatibility with OpenSSL 3.6+ + # Using 3.1.x series to minimize chances of breakage from upgrading bundled 3.0.x + resource "openssl" do + url "https://github.com/ruby/openssl/archive/refs/tags/v3.1.2.tar.gz" + sha256 "0abb96cdeaef1c0a2bfc8e0a4557467d7f2e93cabdd00d0d387afb1d0e1569a9" + end + + def api_version + "3.1.0" + end + + def rubygems_bindir + HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" + end + + def install + rm_r(%w[ext/openssl test/openssl]) + resource("openssl").stage do + (buildpath/"ext").install "ext/openssl" + (buildpath/"ext/openssl").install "lib", "History.md", "openssl.gemspec" + (buildpath/"test").install "test/openssl" + end + + # otherwise `gem` command breaks + ENV.delete("SDKROOT") + + # Prevent `make` from trying to install headers into the SDK + # TODO: Remove this workaround when the following PR is merged/resolved: + # https://github.com/Homebrew/brew/pull/12508 + inreplace "tool/mkconfig.rb", /^(\s+val = )'"\$\(SDKROOT\)"'\+/, "\\1" + + paths = %w[libyaml openssl@3 readline].map { |f| Formula[f].opt_prefix } + args = %W[ + --prefix=#{prefix} + --enable-shared + --disable-silent-rules + --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby + --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby + --with-opt-dir=#{paths.join(":")} + --without-gmp + ] + args << "--disable-dtrace" if OS.mac? && !MacOS::CLT.installed? + + # Correct MJIT_CC to not use superenv shim + args << "MJIT_CC=/usr/bin/#{DevelopmentTools.default_compiler}" + + system "./configure", *args + + # Ruby has been configured to look in the HOMEBREW_PREFIX for the + # sitedir and vendordir directories; however we don't actually want to create + # them during the install. + # + # These directories are empty on install; sitedir is used for non-rubygems + # third party libraries, and vendordir is used for packager-provided libraries. + inreplace "tool/rbinstall.rb" do |s| + s.gsub! 'prepare "extension scripts", sitelibdir', "" + s.gsub! 'prepare "extension scripts", vendorlibdir', "" + s.gsub! 'prepare "extension objects", sitearchlibdir', "" + s.gsub! 'prepare "extension objects", vendorarchlibdir', "" + end + + system "make" + system "make", "install" + + # A newer version of ruby-mode.el is shipped with Emacs + elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } + + if OS.linux? + arch = Utils.safe_popen_read( + bin/"ruby", "-rrbconfig", "-e", 'print RbConfig::CONFIG["arch"]' + ).chomp + # Don't restrict to a specific GCC compiler binary we used (e.g. gcc-5). + inreplace lib/"ruby/#{api_version}/#{arch}/rbconfig.rb" do |s| + s.gsub! ENV.cxx, "c++" + s.gsub! ENV.cc, "cc" + # Change e.g. `CONFIG["AR"] = "gcc-ar-11"` to `CONFIG["AR"] = "ar"` + s.gsub!(/(CONFIG\[".+"\] = )"(?:gcc|g\+\+)-(.*)-\d+"/, '\\1"\\2"') + end + end + + # This is easier than trying to keep both current & versioned Ruby + # formulae repeatedly updated with Rubygem patches. + resource("rubygems").stage do + ENV.prepend_path "PATH", bin + + system bin/"ruby", "setup.rb", "--prefix=#{buildpath}/vendor_gem" + rg_in = lib/"ruby/#{api_version}" + rg_gems_in = lib/"ruby/gems/#{api_version}" + + # Remove bundled Rubygem and Bundler + rm_r rg_in/"bundler" + rm rg_in/"bundler.rb" + rm_r Dir[rg_gems_in/"gems/bundler-*"] + rm Dir[rg_gems_in/"specifications/default/bundler-*.gemspec"] + rm_r rg_in/"rubygems" + rm rg_in/"rubygems.rb" + rm bin/"gem" + + # Drop in the new version. + rg_in.install Dir[buildpath/"vendor_gem/lib/*"] + (rg_gems_in/"gems").install Dir[buildpath/"vendor_gem/gems/*"] + (rg_gems_in/"specifications/default").install Dir[buildpath/"vendor_gem/specifications/default/*"] + bin.install buildpath/"vendor_gem/bin/gem" => "gem" + bin.install buildpath/"vendor_gem/bin/bundle" => "bundle" + bin.install buildpath/"vendor_gem/bin/bundler" => "bundler" + end + + # Customize rubygems to look/install in the global gem directory + # instead of in the Cellar, making gems last across reinstalls + config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" + config_file.write rubygems_config + end + + def post_install + # Since Gem ships Bundle we want to provide that full/expected installation + # but to do so we need to handle the case where someone has previously + # installed bundle manually via `gem install`. + rm(%W[ + #{rubygems_bindir}/bundle + #{rubygems_bindir}/bundler + ].select { |file| File.exist?(file) }) + rm_r(Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"]) + end + + def rubygems_config + <<~RUBY + module Gem + class << self + alias :old_default_dir :default_dir + alias :old_default_path :default_path + alias :old_default_bindir :default_bindir + alias :old_ruby :ruby + alias :old_default_specifications_dir :default_specifications_dir + end + + def self.default_dir + path = [ + "#{HOMEBREW_PREFIX}", + "lib", + "ruby", + "gems", + RbConfig::CONFIG['ruby_version'] + ] + + @homebrew_path ||= File.join(*path) + end + + def self.private_dir + path = if defined? RUBY_FRAMEWORK_VERSION then + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', + RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + end + + @private_dir ||= File.join(*path) + end + + def self.default_path + if Gem.user_home && File.exist?(Gem.user_home) + [user_dir, default_dir, old_default_dir, private_dir] + else + [default_dir, old_default_dir, private_dir] + end + end + + def self.default_bindir + "#{rubygems_bindir}" + end + + def self.ruby + "#{opt_bin}/ruby" + end + + # https://github.com/Homebrew/homebrew-core/issues/40872#issuecomment-542092547 + # https://github.com/Homebrew/homebrew-core/pull/48329#issuecomment-584418161 + def self.default_specifications_dir + File.join(Gem.old_default_dir, "specifications", "default") + end + end + RUBY + end + + def caveats + <<~EOS + By default, binaries installed by gem will be placed into: + #{rubygems_bindir} + + You may want to add this to your PATH. + EOS + end + + test do + hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") + assert_equal "hello\n", hello_text + + assert_equal api_version, shell_output("#{bin}/ruby -e 'print Gem.ruby_api_version'") + + ENV["GEM_HOME"] = testpath + system bin/"gem", "install", "json" + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org' + gem 'github-markup' + EOS + system bin/"bundle", "exec", "ls" # https://github.com/Homebrew/homebrew-core/issues/53247 + system bin/"bundle", "install", "--binstubs=#{testpath}/bin" + assert_path_exists testpath/"bin/github-markup", "github-markup is not installed in #{testpath}/bin" + end +end diff --git a/Formula/r/ruby@3.2.rb b/Formula/r/ruby@3.2.rb new file mode 100644 index 0000000000000..90e2bd9747b2b --- /dev/null +++ b/Formula/r/ruby@3.2.rb @@ -0,0 +1,277 @@ +class RubyAT32 < Formula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + url "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.9.tar.gz" + sha256 "abbad98db9aeb152773b0d35868e50003b8c467f3d06152577c4dfed9d88ed2a" + license "Ruby" + revision 1 + + livecheck do + url "https://www.ruby-lang.org/en/downloads/" + regex(/href=.*?ruby[._-]v?(3\.2(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "850eb4a323d765ee686a0ef2cba9a79a2ad4b581b3c22c5c9a263a38c019c68d" + sha256 arm64_sequoia: "c0333a8d58a19c18dd1dfd2fc4d794e0b56683a6263dbfb7b6e7d8c31ee8916e" + sha256 arm64_sonoma: "a1c5d10b027435c318c39a0f35592f5b5329a68a0d928ba6081f3337ae39af74" + sha256 sonoma: "12d8ff67cd5fd2dc4b1ca2b5a0fca0c85ff8ef287fa0cac6932e4a1ada24c999" + sha256 arm64_linux: "d7399b88bbc194a82cc7d89c4aca3988b978c065ee6f5020e12fbce4bcaee37a" + sha256 x86_64_linux: "a5990cbc9859fad46e2d5ed3d255bb306d67b6061460e89aa76a31cc11faf793" + end + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "bison" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libyaml" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "gperf" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + # Should be updated only when Ruby is updated (if an update is available). + # The exception is Rubygem security fixes, which mandate updating this + # formula & the versioned equivalents and bumping the revisions. + resource "rubygems" do + url "https://rubygems.org/rubygems/rubygems-3.7.1.tgz" + sha256 "750c8c771180d41ed2358344e5461edee83158c0a81b779969a1339961bc1163" + + livecheck do + url "https://rubygems.org/pages/download" + regex(/href=.*?rubygems[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + # Update the bundled openssl gem for compatibility with OpenSSL 3.6+ + # Using 3.1.x series to match major/minor version of bundled gem + resource "openssl" do + url "https://github.com/ruby/openssl/archive/refs/tags/v3.1.2.tar.gz" + sha256 "0abb96cdeaef1c0a2bfc8e0a4557467d7f2e93cabdd00d0d387afb1d0e1569a9" + end + + def api_version + "3.2.0" + end + + def rubygems_bindir + HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" + end + + def install + openssl_gem_version = File.read("ext/openssl/openssl.gemspec")[/spec\.version\s*=\s*"(\d+(?:\.\d+)+)/, 1] + odie "Remove openssl resource!" if Version.new(openssl_gem_version) >= "3.1.2" + rm_r(%w[ext/openssl test/openssl]) + resource("openssl").stage do + (buildpath/"ext").install "ext/openssl" + (buildpath/"ext/openssl").install "lib", "History.md", "openssl.gemspec" + (buildpath/"test").install "test/openssl" + end + + # otherwise `gem` command breaks + ENV.delete("SDKROOT") + + # Prevent `make` from trying to install headers into the SDK + # TODO: Remove this workaround when the following PR is merged/resolved: + # https://github.com/Homebrew/brew/pull/12508 + inreplace "tool/mkconfig.rb", /^(\s+val = )'"\$\(SDKROOT\)"'\+/, "\\1" + + paths = %w[libyaml openssl@3 readline].map { |f| Formula[f].opt_prefix } + args = %W[ + --prefix=#{prefix} + --enable-shared + --disable-silent-rules + --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby + --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby + --with-opt-dir=#{paths.join(":")} + --without-gmp + ] + args << "--disable-dtrace" if OS.mac? && !MacOS::CLT.installed? + + # Correct MJIT_CC to not use superenv shim + args << "MJIT_CC=/usr/bin/#{DevelopmentTools.default_compiler}" + + system "./configure", *args + + # Ruby has been configured to look in the HOMEBREW_PREFIX for the + # sitedir and vendordir directories; however we don't actually want to create + # them during the install. + # + # These directories are empty on install; sitedir is used for non-rubygems + # third party libraries, and vendordir is used for packager-provided libraries. + inreplace "tool/rbinstall.rb" do |s| + s.gsub! 'prepare "extension scripts", sitelibdir', "" + s.gsub! 'prepare "extension scripts", vendorlibdir', "" + s.gsub! 'prepare "extension objects", sitearchlibdir', "" + s.gsub! 'prepare "extension objects", vendorarchlibdir', "" + end + + system "make" + system "make", "install" + + # A newer version of ruby-mode.el is shipped with Emacs + elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } + + if OS.linux? + arch = Utils.safe_popen_read( + bin/"ruby", "-rrbconfig", "-e", 'print RbConfig::CONFIG["arch"]' + ).chomp + # Don't restrict to a specific GCC compiler binary we used (e.g. gcc-5). + inreplace lib/"ruby/#{api_version}/#{arch}/rbconfig.rb" do |s| + s.gsub! ENV.cxx, "c++" + s.gsub! ENV.cc, "cc" + # Change e.g. `CONFIG["AR"] = "gcc-ar-11"` to `CONFIG["AR"] = "ar"` + s.gsub!(/(CONFIG\[".+"\] = )"(?:gcc|g\+\+)-(.*)-\d+"/, '\\1"\\2"') + end + end + + # This is easier than trying to keep both current & versioned Ruby + # formulae repeatedly updated with Rubygem patches. + resource("rubygems").stage do + ENV.prepend_path "PATH", bin + + system bin/"ruby", "setup.rb", "--prefix=#{buildpath}/vendor_gem" + rg_in = lib/"ruby/#{api_version}" + rg_gems_in = lib/"ruby/gems/#{api_version}" + + # Remove bundled Rubygem and Bundler + rm_r rg_in/"bundler" + rm rg_in/"bundler.rb" + rm_r Dir[rg_gems_in/"gems/bundler-*"] + rm Dir[rg_gems_in/"specifications/default/bundler-*.gemspec"] + rm_r rg_in/"rubygems" + rm rg_in/"rubygems.rb" + rm bin/"gem" + + # Drop in the new version. + rg_in.install Dir[buildpath/"vendor_gem/lib/*"] + (rg_gems_in/"gems").install Dir[buildpath/"vendor_gem/gems/*"] + (rg_gems_in/"specifications/default").install Dir[buildpath/"vendor_gem/specifications/default/*"] + bin.install buildpath/"vendor_gem/bin/gem" => "gem" + bin.install buildpath/"vendor_gem/bin/bundle" => "bundle" + bin.install buildpath/"vendor_gem/bin/bundler" => "bundler" + end + + # Customize rubygems to look/install in the global gem directory + # instead of in the Cellar, making gems last across reinstalls + config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" + config_file.write rubygems_config + end + + def post_install + # Since Gem ships Bundle we want to provide that full/expected installation + # but to do so we need to handle the case where someone has previously + # installed bundle manually via `gem install`. + rm(%W[ + #{rubygems_bindir}/bundle + #{rubygems_bindir}/bundler + ].select { |file| File.exist?(file) }) + rm_r(Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"]) + end + + def rubygems_config + <<~RUBY + module Gem + class << self + alias :old_default_dir :default_dir + alias :old_default_path :default_path + alias :old_default_bindir :default_bindir + alias :old_ruby :ruby + alias :old_default_specifications_dir :default_specifications_dir + end + + def self.default_dir + path = [ + "#{HOMEBREW_PREFIX}", + "lib", + "ruby", + "gems", + RbConfig::CONFIG['ruby_version'] + ] + + @homebrew_path ||= File.join(*path) + end + + def self.private_dir + path = if defined? RUBY_FRAMEWORK_VERSION then + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', + RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + end + + @private_dir ||= File.join(*path) + end + + def self.default_path + if Gem.user_home && File.exist?(Gem.user_home) + [user_dir, default_dir, old_default_dir, private_dir] + else + [default_dir, old_default_dir, private_dir] + end + end + + def self.default_bindir + "#{rubygems_bindir}" + end + + def self.ruby + "#{opt_bin}/ruby" + end + + # https://github.com/Homebrew/homebrew-core/issues/40872#issuecomment-542092547 + # https://github.com/Homebrew/homebrew-core/pull/48329#issuecomment-584418161 + def self.default_specifications_dir + File.join(Gem.old_default_dir, "specifications", "default") + end + end + RUBY + end + + def caveats + <<~EOS + By default, binaries installed by gem will be placed into: + #{rubygems_bindir} + + You may want to add this to your PATH. + EOS + end + + test do + hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") + assert_equal "hello\n", hello_text + + assert_equal api_version, shell_output("#{bin}/ruby -e 'print Gem.ruby_api_version'") + + ENV["GEM_HOME"] = testpath + system bin/"gem", "install", "json" + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org' + gem 'github-markup' + EOS + system bin/"bundle", "exec", "ls" # https://github.com/Homebrew/homebrew-core/issues/53247 + system bin/"bundle", "install", "--binstubs=#{testpath}/bin" + assert_path_exists testpath/"bin/github-markup", "github-markup is not installed in #{testpath}/bin" + end +end diff --git a/Formula/r/ruby@3.3.rb b/Formula/r/ruby@3.3.rb new file mode 100644 index 0000000000000..c713c9fda037a --- /dev/null +++ b/Formula/r/ruby@3.3.rb @@ -0,0 +1,257 @@ +class RubyAT33 < Formula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + url "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.10.tar.gz" + sha256 "b555baa467a306cfc8e6c6ed24d0d27b27e9a1bed1d91d95509859eac6b0e928" + license "Ruby" + + livecheck do + url "https://www.ruby-lang.org/en/downloads/" + regex(/href=.*?ruby[._-]v?(3\.3(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "6f41194c88735cb81c72d6301323368155ec9665f224472ddf956cfdb22a33b5" + sha256 arm64_sequoia: "b44bebad549dc020442e93ed7262eacefa137759be237386e8410517832f8741" + sha256 arm64_sonoma: "a9de9fb07280c48a8b191ee962b0156637f054813a1850d51666088faf1ecfac" + sha256 sonoma: "758df550907d8706c3fdf645874cc1875934dc69c07105f937a3baca6894d5c2" + sha256 arm64_linux: "3dc3f64264a6492e7fc9a1c503c0601d15129f31c284d496633b1bb7e54eaae7" + sha256 x86_64_linux: "c682d4cc8056c47ddfbdb88123749fcde63a644f61536eae79d83ec7c5823479" + end + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libyaml" + depends_on "openssl@3" + + uses_from_macos "gperf" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + # Should be updated only when Ruby is updated (if an update is available). + # The exception is Rubygem security fixes, which mandate updating this + # formula & the versioned equivalents and bumping the revisions. + resource "rubygems" do + url "https://rubygems.org/rubygems/rubygems-3.7.1.tgz" + sha256 "750c8c771180d41ed2358344e5461edee83158c0a81b779969a1339961bc1163" + + livecheck do + url "https://rubygems.org/pages/download" + regex(/href=.*?rubygems[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + def api_version + "3.3.0" + end + + def rubygems_bindir + HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" + end + + def install + # otherwise `gem` command breaks + ENV.delete("SDKROOT") + + # Prevent `make` from trying to install headers into the SDK + # TODO: Remove this workaround when the following PR is merged/resolved: + # https://github.com/Homebrew/brew/pull/12508 + inreplace "tool/mkconfig.rb", /^(\s+val = )'"\$\(SDKROOT\)"'\+/, "\\1" + + paths = %w[libyaml openssl@3].map { |f| Formula[f].opt_prefix } + args = %W[ + --prefix=#{prefix} + --enable-shared + --disable-silent-rules + --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby + --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby + --with-opt-dir=#{paths.join(":")} + --without-gmp + ] + args << "--disable-dtrace" if OS.mac? && !MacOS::CLT.installed? + + # Correct MJIT_CC to not use superenv shim + args << "MJIT_CC=/usr/bin/#{DevelopmentTools.default_compiler}" + + system "./configure", *args + + # Ruby has been configured to look in the HOMEBREW_PREFIX for the + # sitedir and vendordir directories; however we don't actually want to create + # them during the install. + # + # These directories are empty on install; sitedir is used for non-rubygems + # third party libraries, and vendordir is used for packager-provided libraries. + inreplace "tool/rbinstall.rb" do |s| + s.gsub! 'prepare "extension scripts", sitelibdir', "" + s.gsub! 'prepare "extension scripts", vendorlibdir', "" + s.gsub! 'prepare "extension objects", sitearchlibdir', "" + s.gsub! 'prepare "extension objects", vendorarchlibdir', "" + end + + system "make" + system "make", "install" + + # A newer version of ruby-mode.el is shipped with Emacs + elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } + + if OS.linux? + arch = Utils.safe_popen_read( + bin/"ruby", "-rrbconfig", "-e", 'print RbConfig::CONFIG["arch"]' + ).chomp + # Don't restrict to a specific GCC compiler binary we used (e.g. gcc-5). + inreplace lib/"ruby/#{api_version}/#{arch}/rbconfig.rb" do |s| + s.gsub! ENV.cxx, "c++" + s.gsub! ENV.cc, "cc" + # Change e.g. `CONFIG["AR"] = "gcc-ar-11"` to `CONFIG["AR"] = "ar"` + s.gsub!(/(CONFIG\[".+"\] = )"(?:gcc|g\+\+)-(.*)-\d+"/, '\\1"\\2"') + end + end + + # This is easier than trying to keep both current & versioned Ruby + # formulae repeatedly updated with Rubygem patches. + resource("rubygems").stage do + ENV.prepend_path "PATH", bin + + system bin/"ruby", "setup.rb", "--prefix=#{buildpath}/vendor_gem" + rg_in = lib/"ruby/#{api_version}" + rg_gems_in = lib/"ruby/gems/#{api_version}" + + # Remove bundled Rubygem and Bundler + rm_r rg_in/"bundler" + rm rg_in/"bundler.rb" + rm_r Dir[rg_gems_in/"gems/bundler-*"] + rm Dir[rg_gems_in/"specifications/default/bundler-*.gemspec"] + rm_r rg_in/"rubygems" + rm rg_in/"rubygems.rb" + rm bin/"gem" + + # Drop in the new version. + rg_in.install Dir[buildpath/"vendor_gem/lib/*"] + (rg_gems_in/"gems").install Dir[buildpath/"vendor_gem/gems/*"] + (rg_gems_in/"specifications/default").install Dir[buildpath/"vendor_gem/specifications/default/*"] + bin.install buildpath/"vendor_gem/bin/gem" => "gem" + bin.install buildpath/"vendor_gem/bin/bundle" => "bundle" + bin.install buildpath/"vendor_gem/bin/bundler" => "bundler" + end + + # Customize rubygems to look/install in the global gem directory + # instead of in the Cellar, making gems last across reinstalls + config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" + config_file.write rubygems_config + end + + def post_install + # Since Gem ships Bundle we want to provide that full/expected installation + # but to do so we need to handle the case where someone has previously + # installed bundle manually via `gem install`. + rm(%W[ + #{rubygems_bindir}/bundle + #{rubygems_bindir}/bundler + ].select { |file| File.exist?(file) }) + rm_r(Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"]) + end + + def rubygems_config + <<~RUBY + module Gem + class << self + alias :old_default_dir :default_dir + alias :old_default_path :default_path + alias :old_default_bindir :default_bindir + alias :old_ruby :ruby + alias :old_default_specifications_dir :default_specifications_dir + end + + def self.default_dir + path = [ + "#{HOMEBREW_PREFIX}", + "lib", + "ruby", + "gems", + RbConfig::CONFIG['ruby_version'] + ] + + @homebrew_path ||= File.join(*path) + end + + def self.private_dir + path = if defined? RUBY_FRAMEWORK_VERSION then + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', + RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', + RbConfig::CONFIG['ruby_version'] + ] + end + + @private_dir ||= File.join(*path) + end + + def self.default_path + if Gem.user_home && File.exist?(Gem.user_home) + [user_dir, default_dir, old_default_dir, private_dir] + else + [default_dir, old_default_dir, private_dir] + end + end + + def self.default_bindir + "#{rubygems_bindir}" + end + + def self.ruby + "#{opt_bin}/ruby" + end + + # https://github.com/Homebrew/homebrew-core/issues/40872#issuecomment-542092547 + # https://github.com/Homebrew/homebrew-core/pull/48329#issuecomment-584418161 + def self.default_specifications_dir + File.join(Gem.old_default_dir, "specifications", "default") + end + end + RUBY + end + + def caveats + <<~EOS + By default, binaries installed by gem will be placed into: + #{rubygems_bindir} + + You may want to add this to your PATH. + EOS + end + + test do + hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") + assert_equal "hello\n", hello_text + + assert_equal api_version, shell_output("#{bin}/ruby -e 'print Gem.ruby_api_version'") + + ENV["GEM_HOME"] = testpath + system bin/"gem", "install", "json" + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org' + gem 'github-markup' + EOS + system bin/"bundle", "exec", "ls" # https://github.com/Homebrew/homebrew-core/issues/53247 + system bin/"bundle", "install", "--binstubs=#{testpath}/bin" + assert_path_exists testpath/"bin/github-markup", "github-markup is not installed in #{testpath}/bin" + end +end diff --git a/Formula/r/rubyfmt.rb b/Formula/r/rubyfmt.rb new file mode 100644 index 0000000000000..81e6996251870 --- /dev/null +++ b/Formula/r/rubyfmt.rb @@ -0,0 +1,62 @@ +class Rubyfmt < Formula + desc "Ruby autoformatter" + homepage "https://github.com/fables-tales/rubyfmt" + url "https://github.com/fables-tales/rubyfmt.git", + tag: "v0.11.0", + revision: "55f41919cf5779fb9e2c410c04e2f613f7d79f2b" + license "MIT" + head "https://github.com/fables-tales/rubyfmt.git", branch: "trunk" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "add7264b0c1f0f824a4cacb9207a09fd1b64af9fb800f9ac3caafa0a34ee4568" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3ea996577f2010a2fcc3a4244398c2cdc8988de9efedeed1646f358798b33ab4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "20e428828937e70b6c4e9dc9d742ecc1a8f331dc65369488c1fd576cb6abfe1e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5ba71656cdf87c3c1b5a2f9664f2deb21f59a949173a9a639340617a8bc8707" + sha256 cellar: :any_skip_relocation, sonoma: "57a01d03aee9e206fc51d64079ab95b0974f6b0e39dc5a464e58f975a45bea0c" + sha256 cellar: :any_skip_relocation, ventura: "b831dd07102b2eabadfaf38c84cfe0d24a5ed7d6c7ca3b58702eb7dfe5f7dd5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d5ab407a571c5ce85baf2a784dde2b0a523614d749df8aed8c0d4b03af472b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7268052db591d14ad85711a47d0ce9b9578a0c9a0d353e63b870231d358478e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "rust" => :build + # https://bugs.ruby-lang.org/issues/18616 + # error: '__declspec' attributes are not enabled; + # use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes + depends_on macos: :monterey + uses_from_macos "ruby" + + def install + # Work around build failure with recent Rust + # Issue ref: https://github.com/fables-tales/rubyfmt/issues/467 + ENV.append_to_rustflags "--allow dead_code" + + system "cargo", "install", *std_cargo_args + bin.install "target/release/rubyfmt-main" => "rubyfmt" + end + + test do + (testpath/"test.rb").write <<~RUBY + def foo; 42; end + RUBY + expected = <<~RUBY + def foo + 42 + end + RUBY + assert_equal expected, shell_output("#{bin}/rubyfmt -- #{testpath}/test.rb") + end +end diff --git a/Formula/r/ruff-lsp.rb b/Formula/r/ruff-lsp.rb new file mode 100644 index 0000000000000..18a5c6999bee8 --- /dev/null +++ b/Formula/r/ruff-lsp.rb @@ -0,0 +1,78 @@ +class RuffLsp < Formula + include Language::Python::Virtualenv + + desc "Language Server Protocol implementation for Ruff" + homepage "https://github.com/astral-sh/ruff-lsp" + url "https://files.pythonhosted.org/packages/18/11/8e445dc55753efd45e09882ad0468f4a5650f33aecdbd15c7a52e8e0c3c4/ruff_lsp-0.0.62.tar.gz" + sha256 "6db2a39375973ecb16c64d3c8dc37e23e1e191dcb7aebcf525b1f85ebd338c0d" + license "MIT" + + # This minimal `livecheck` block enables us to continue identifying new + # versions as long as upstream continues publishing them. + livecheck do + url :stable + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c88a2f5b966aadd8114418e1e38eac7504373c4d7bddc3ecfd37944fa7976e85" + end + + deprecate! date: "2025-02-06", because: :deprecated_upstream, replacement_formula: "ruff" + + depends_on "python@3.14" + depends_on "ruff" + + pypi_packages exclude_packages: "ruff" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "cattrs" do + url "https://files.pythonhosted.org/packages/6e/00/2432bb2d445b39b5407f0a90e01b9a271475eea7caf913d7a86bcb956385/cattrs-25.3.0.tar.gz" + sha256 "1ac88d9e5eda10436c4517e390a4142d88638fe682c436c93db7ce4a277b884a" + end + + resource "lsprotocol" do + url "https://files.pythonhosted.org/packages/9d/f6/6e80484ec078d0b50699ceb1833597b792a6c695f90c645fbaf54b947e6f/lsprotocol-2023.0.1.tar.gz" + sha256 "cc5c15130d2403c18b734304339e51242d3018a05c4f7d0f198ad6e0cd21861d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pygls" do + url "https://files.pythonhosted.org/packages/86/b9/41d173dad9eaa9db9c785a85671fc3d68961f08d67706dc2e79011e10b5c/pygls-1.3.1.tar.gz" + sha256 "140edceefa0da0e9b3c533547c892a42a7d2fd9217ae848c330c53d266a55018" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + virtualenv_install_with_resources + end + + test do + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output(bin/"ruff-lsp", input) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/r/ruff.rb b/Formula/r/ruff.rb new file mode 100644 index 0000000000000..b678494a69013 --- /dev/null +++ b/Formula/r/ruff.rb @@ -0,0 +1,32 @@ +class Ruff < Formula + desc "Extremely fast Python linter, written in Rust" + homepage "https://docs.astral.sh/ruff/" + url "https://github.com/astral-sh/ruff/archive/refs/tags/0.14.3.tar.gz" + sha256 "e44ce7ab8c6c0894ae4afcaad086624ee1279b7c3e1e2a7dfc5face14800d80d" + license "MIT" + head "https://github.com/astral-sh/ruff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "871bc9930b313eb8d56fe96d09cede7ed6487fc710b8af41a5459b88e10c2efc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49627ee7bcc7fd6be1f5f20b527a697ee114b87386f953f4cbab16a6494cd705" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e00b9b5c66782545c53adfe60a764435fcacb679382813ad43a4015d20b1b76" + sha256 cellar: :any_skip_relocation, sonoma: "fe218522d7df712e9ae1e811e136692c4bff81ea7251aeea145302859067e0bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "63c89fcf19f3f4ecd309b3e46bfc74dbf02a8ce7e41ab4a1a8f3e1b0b927a1b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c19646abc49a1ad5c5bab23fcc4c382573612ec3c31b02d12b1335008d32e0a9" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--no-default-features", *std_cargo_args(path: "crates/ruff") + generate_completions_from_executable(bin/"ruff", "generate-shell-completion") + end + + test do + (testpath/"test.py").write <<~PYTHON + import os + PYTHON + + assert_match "`os` imported but unused", shell_output("#{bin}/ruff check #{testpath}/test.py", 1) + end +end diff --git a/Formula/r/rulesync.rb b/Formula/r/rulesync.rb new file mode 100644 index 0000000000000..c1b5a84357414 --- /dev/null +++ b/Formula/r/rulesync.rb @@ -0,0 +1,26 @@ +class Rulesync < Formula + desc "Unified AI rules management CLI tool" + homepage "https://github.com/dyoshikawa/rulesync" + url "https://registry.npmjs.org/rulesync/-/rulesync-3.12.6.tgz" + sha256 "732fa74560fe21a5ee4209a51315afe5a20fe98556f43fce369e376ad15dab23" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c84efec40fac78249a56b2f15c6870a7bad5380625770a7b9feae71c11657acd" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/rulesync --version") + + output = shell_output("#{bin}/rulesync init") + assert_match "rulesync initialized successfully", output + assert_match "Project overview and general development guidelines", (testpath/".rulesync/rules/overview.md").read + end +end diff --git a/Formula/r/run.rb b/Formula/r/run.rb new file mode 100644 index 0000000000000..f8f2cd8f2176f --- /dev/null +++ b/Formula/r/run.rb @@ -0,0 +1,40 @@ +class Run < Formula + desc "Easily manage and invoke small scripts and wrappers" + homepage "https://github.com/TekWizely/run" + url "https://github.com/TekWizely/run/archive/refs/tags/v0.11.2.tar.gz" + sha256 "942427701caa99a9a3a6458a121b5c80b424752ea8701b26083841de5ae43ff6" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c7170ed0911890c685fc627f44c00b89796c210945166670760d50d6f30de156" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "559da124641b371439fa38a4c23ec8c3f4edeb32bc2e7003d560b32808219004" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac7325643156aa96a729b67c7331bf0567ad3a37681093e79d9b090644de3469" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9047620f1da5c223c4c7aa7ea33861ca346fd33335515a553fb11aa12f9505f2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9047620f1da5c223c4c7aa7ea33861ca346fd33335515a553fb11aa12f9505f2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9047620f1da5c223c4c7aa7ea33861ca346fd33335515a553fb11aa12f9505f2" + sha256 cellar: :any_skip_relocation, sonoma: "c81056e1cf59a6c42ea6e393dc4e146a19a042bb7c0c488bcd6f26dd3f9c9194" + sha256 cellar: :any_skip_relocation, ventura: "7b9ad23183cb19b835add35b5e65768ea6bd5295181c03d9ab1372996ff75fcb" + sha256 cellar: :any_skip_relocation, monterey: "7b9ad23183cb19b835add35b5e65768ea6bd5295181c03d9ab1372996ff75fcb" + sha256 cellar: :any_skip_relocation, big_sur: "7b9ad23183cb19b835add35b5e65768ea6bd5295181c03d9ab1372996ff75fcb" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2634ba0c62d494f9f77983a80f8e0248c2bfdbb729c49915a52e4f3676b48a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab579ac93d7c9474a761d9b51e1fb347119b8f990af87d0bcd03043aa388dbe8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + text = "Hello Homebrew!" + task = "hello" + (testpath/"Runfile").write <<~EOS + #{task}: + echo #{text} + EOS + assert_equal text, shell_output("#{bin}/#{name} #{task}").chomp + end +end diff --git a/Formula/r/rune.rb b/Formula/r/rune.rb new file mode 100644 index 0000000000000..a9d41b6d2dc3e --- /dev/null +++ b/Formula/r/rune.rb @@ -0,0 +1,45 @@ +class Rune < Formula + desc "Embeddable dynamic programming language for Rust" + homepage "https://rune-rs.github.io" + url "https://github.com/rune-rs/rune/archive/refs/tags/0.14.0.tar.gz" + sha256 "96d6d488f57215afbeb12b7b77f89b4463ab209cbfabf03e83e56908ff7ed233" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rune-rs/rune.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "98e5d320cbbbb7e69af88b3336419fef1300f6533d3cf0681446bd4dc5fc115b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ebcb56c53e49fea08a2ec6af57dae05a0a619238ee74d81d232c3cc154ffdae2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9f234fd924889af3d16deeb4db3531f0fe978f82c971ba6d0e9f995f0e800a5c" + sha256 cellar: :any_skip_relocation, sonoma: "3d746cfbab04df2582234d67eca27d2a6be15b5a9c31c391a6a775448193844e" + sha256 cellar: :any_skip_relocation, arm64_linux: "75b2583e54c1bd7da75aabea5b82e2247ae45648a4256621852f22dbbee5d81e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e28dcbc87969e792495a32fdd21f244ec98eaf4f145ffa9b315143c98161a843" + end + + depends_on "rust" => :build + + # Fix build with Rust 1.89 + patch do + url "https://github.com/rune-rs/rune/commit/6594f08038c3474de6e6e3b215a15c3940f71473.patch?full_index=1" + sha256 "8fcd1f04856df66883975fcbcf7aa8e36607d258049fd2e57991c27e2542cf9c" + end + patch do + url "https://github.com/rune-rs/rune/commit/f49ba15e62589025eba7fa3e01cccd9842c7acee.patch?full_index=1" + sha256 "e8d34a1c4c476c5cc56ecf0f925db23f2c29a9a48fb6fd1b039dd28057ca9fe6" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/rune-cli") + system "cargo", "install", *std_cargo_args(path: "crates/rune-languageserver") + end + + test do + (testpath/"main.rn").write <<~EOS + pub fn main() { + println!("Hello, world!"); + } + EOS + + assert_equal "Hello, world!", shell_output("#{bin/"rune"} run").strip + end +end diff --git a/Formula/r/runit.rb b/Formula/r/runit.rb new file mode 100644 index 0000000000000..5ee99393df45d --- /dev/null +++ b/Formula/r/runit.rb @@ -0,0 +1,73 @@ +class Runit < Formula + desc "Collection of tools for managing UNIX services" + homepage "https://smarden.org/runit/" + url "https://smarden.org/runit/runit-2.2.0.tar.gz" + sha256 "95ef4d2868b978c7179fe47901e5c578e11cf273d292bd6208bd3a7ccb029290" + license "BSD-3-Clause" + + livecheck do + url "https://smarden.org/runit/install" + regex(/href=.*?runit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fdb2bf4c7a68bd7cea4a30069c4eaae6698925537a137e098b824742359ba8e0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c6d9fe18b8ab5e4f85de166d9300367cbdb8c4157ae7ba26d6f891376bb248d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e48a87a97472f98638753b03e3a9fd5aa6b622cbd59c114c1ab3b4b2dca4158f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a02febc253e32ca872f45183b70298c703b86a69d756850170b10454f921efcb" + sha256 cellar: :any_skip_relocation, sonoma: "f820d9806a8247bd514c135b926100b205fa13aaded0f77ef73c22156ebd8309" + sha256 cellar: :any_skip_relocation, ventura: "2fb88364202380b041df206331f369cd8b90cb7b38407e83195ab5c5cecb4d6f" + sha256 arm64_linux: "86e7afab38bcc1a78ed0652367ca988d2c3fa33fc3a2b9456d689ece9cd067da" + sha256 x86_64_linux: "84004a0ce4e354a57c901166bfd58276a281c22f56fccae2690b3c7c158f055d" + end + + def install + # Runit untars to 'admin/runit-VERSION' + cd "runit-#{version}" do + # Per the installation doc on macOS, we need to make a couple changes. + system "echo 'cc -Xlinker -x' >src/conf-ld" + inreplace "src/Makefile", / -static/, "" + + inreplace "src/sv.c", "char *varservice =\"/service/\";", "char *varservice =\"#{var}/service/\";" + system "package/compile" + + # The commands are compiled and copied into the 'command' directory and + # names added to package/commands. Read the file for the commands and + # install them in homebrew. + rcmds = File.read("package/commands") + + rcmds.split("\n").each do |r| + bin.install("command/#{r.chomp}") + man8.install("man/#{r.chomp}.8") + end + + (var + "service").mkpath + end + end + + def caveats + <<~EOS + This formula does not install runit as a replacement for init. + The service directory is #{var}/service instead of /service. + + A system service that runs runsvdir with the default service directory is + provided. Alternatively you can run runsvdir manually: + + runsvdir -P #{var}/service + + Depending on the services managed by runit, this may need to start as root. + EOS + end + + service do + run [opt_bin/"runsvdir", "-P", var/"service"] + keep_alive true + log_path var/"log/runit.log" + error_log_path var/"log/runit.log" + environment_variables PATH: "/usr/bin:/bin:/usr/sbin:/sbin:#{opt_bin}" + end + + test do + assert_match "usage: #{bin}/runsvdir [-P] dir", shell_output("#{bin}/runsvdir 2>&1", 1) + end +end diff --git a/Formula/r/runitor.rb b/Formula/r/runitor.rb new file mode 100644 index 0000000000000..75bb0cfbb3db9 --- /dev/null +++ b/Formula/r/runitor.rb @@ -0,0 +1,36 @@ +class Runitor < Formula + desc "Command runner with healthchecks.io integration" + homepage "https://github.com/bdd/runitor" + url "https://github.com/bdd/runitor/archive/refs/tags/v1.4.1.tar.gz" + sha256 "192665c623bc96ed77f122510510c017197e1673ab92bb84546d652afe4416c0" + license "0BSD" + head "https://github.com/bdd/runitor.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "16b11e9362646966797e2658e3cb248bf62a4fb18993bd77cb221ceca82a7770" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5126ca445a8d5515158165a2de556eba26e2371ea5bcf18d4c6b6cd382781f1c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5126ca445a8d5515158165a2de556eba26e2371ea5bcf18d4c6b6cd382781f1c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5126ca445a8d5515158165a2de556eba26e2371ea5bcf18d4c6b6cd382781f1c" + sha256 cellar: :any_skip_relocation, sonoma: "0effd12000e9ee680cabca8c05a25dc33df6dd0816d6c5337f22eb7e4b2c4e89" + sha256 cellar: :any_skip_relocation, ventura: "0effd12000e9ee680cabca8c05a25dc33df6dd0816d6c5337f22eb7e4b2c4e89" + sha256 cellar: :any_skip_relocation, arm64_linux: "07e21132d3392dee21baf84f985077d200e6c68004a44f342a94ec9c15bff883" + sha256 cellar: :any_skip_relocation, x86_64_linux: "385c34c59826cd643af53842d7517eab4a8315aa21705a7e7ce58cba0782eaf1" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/runitor" + end + + test do + output = shell_output("#{bin}/runitor -uuid 00000000-0000-0000-0000-000000000000 true 2>&1") + assert_match "error response: 400 Bad Request", output + assert_equal "runitor #{version}", shell_output("#{bin}/runitor -version").strip + end +end diff --git a/Formula/r/runme.rb b/Formula/r/runme.rb new file mode 100644 index 0000000000000..4d74f2482bbe4 --- /dev/null +++ b/Formula/r/runme.rb @@ -0,0 +1,49 @@ +class Runme < Formula + desc "Execute commands inside your runbooks, docs, and READMEs" + homepage "https://runme.dev/" + url "https://github.com/runmedev/runme/archive/refs/tags/v3.15.4.tar.gz" + sha256 "6f47a80c73aeb97464884e91fef24168317585d2c7a05077567128d0533591e1" + license "Apache-2.0" + head "https://github.com/runmedev/runme.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9dafe12cffc71e22ff3120889ea0061f6a96768a43f7857abcbd155530a154bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f377dcd850751174258a1b239c94e8f118d35193d099799240558efb8b53ed51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6bfdd50520a6e1991c94155ea4b578d86fd9148bb47d23419362daa3329c421" + sha256 cellar: :any_skip_relocation, sonoma: "95ebdf84b6cd207242e269f5f6c8438a5774da5741713719600866e9bdfa3661" + sha256 cellar: :any_skip_relocation, arm64_linux: "c91048e83532c626a68bed5b6f9440d9e0abed5830d3986e7c666bbc3b75949a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99d5a9197e647d5922a3dc8c16804bf07620fc231b59c28ae5e480b839470c30" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/runmedev/runme/v3/internal/version.BuildDate=#{time.iso8601} + -X github.com/runmedev/runme/v3/internal/version.BuildVersion=#{version} + -X github.com/runmedev/runme/v3/internal/version.Commit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"runme", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/runme --version") + markdown = (testpath/"README.md") + markdown.write <<~MARKDOWN + # Some Markdown + + Has some text. + + ```sh { name=foobar } + echo "Hello World" + ``` + MARKDOWN + assert_match "Hello World", shell_output("#{bin}/runme run --git-ignore=false foobar") + assert_match "foobar", shell_output("#{bin}/runme list --git-ignore=false") + end +end diff --git a/Formula/r/rure.rb b/Formula/r/rure.rb new file mode 100644 index 0000000000000..fe36c1c32c362 --- /dev/null +++ b/Formula/r/rure.rb @@ -0,0 +1,41 @@ +class Rure < Formula + desc "C API for RUst's REgex engine" + homepage "https://github.com/rust-lang/regex/tree/HEAD/regex-capi" + url "https://github.com/rust-lang/regex/archive/refs/tags/1.12.2.tar.gz" + sha256 "36b5e4c56045a83ad34557a93c2a158efc302101741479e5568403b21b74cf2f" + license all_of: [ + "Unicode-TOU", + any_of: ["Apache-2.0", "MIT"], + ] + + bottle do + sha256 cellar: :any, arm64_tahoe: "2b547a58eeaee0300651c51732926185ac7980a3db0f96f8bb9293c9b4814ab9" + sha256 cellar: :any, arm64_sequoia: "c18fe191416b5476dd21fcb82e692f1b9500ee81b1137faa77f5d17127960ea2" + sha256 cellar: :any, arm64_sonoma: "7c62227e56370461779551cc709eef19a0d32722e934eb790838e0d08d9e23db" + sha256 cellar: :any, sonoma: "7e13a0d626d1dd0f67766bc44d13a0def8adcdf60ef4653f57a1757df5d7bea9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9886fefaea72497fd7ab3b94c8ed90d804b59456541df6f2270bda8025c21c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "062c9130b42d3fcc9db37c902413dd13effefcfb828c540b3001d050d8bf47d9" + end + + depends_on "rust" => :build + + def install + system "cargo", "build", "--jobs", ENV.make_jobs, "--lib", "--manifest-path", "regex-capi/Cargo.toml", "--release" + include.install "regex-capi/include/rure.h" + lib.install "target/release/#{shared_library("librure")}" + lib.install "target/release/librure.a" + prefix.install "regex-capi/README.md" => "README-capi.md" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(int argc, char **argv) { + rure *re = rure_compile_must("a"); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lrure", "-o", "test" + system "./test" + end +end diff --git a/Formula/r/rush-parallel.rb b/Formula/r/rush-parallel.rb new file mode 100644 index 0000000000000..2db05a1728663 --- /dev/null +++ b/Formula/r/rush-parallel.rb @@ -0,0 +1,35 @@ +class RushParallel < Formula + desc "Cross-platform command-line tool for executing jobs in parallel" + homepage "https://github.com/shenwei356/rush" + url "https://github.com/shenwei356/rush/archive/refs/tags/v0.7.0.tar.gz" + sha256 "82d8496874631b1b27618e3a5c1d95d3f5610ab5a415341a2115688b12bca4dc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00796ccf7f1aa70942a049864482a86b7d9915d0410751ff47ba6834e6857e9d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f50a578f2c64137137d1a004e8535c6ea74cdc43b971bade54b01142f289e6d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3894ff541972e4f7294f7d8fc5ab23061437f2004541419165a99d6d4c709959" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4eeac0ea0161b5da75e833e99988060a35e6230d1956cc885022deecbe069714" + sha256 cellar: :any_skip_relocation, sonoma: "35f05c81215d36bd242affb3cd4e2f07654b2e5b7b114470acf99adcd147e062" + sha256 cellar: :any_skip_relocation, ventura: "e696d0e4b1418f63075cd93842c973361960097fa153594191e67374e4208a96" + sha256 cellar: :any_skip_relocation, arm64_linux: "773d308ffad34b476fd539d714b2a381ec32b0e24cd2f13bcb4618b2eab8b309" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0a8e3441f54cfe73b04d086413644cca6081a6a7b06273a292d4c3116682b36" + end + + depends_on "go" => :build + + conflicts_with "rush", because: "both install `rush` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"rush") + end + + test do + assert_equal <<~EOS, pipe_output("#{bin}/rush -k 'echo 0{}'", (1..4).to_a.join("\n")) + 01 + 02 + 03 + 04 + EOS + end +end diff --git a/Formula/r/rush.rb b/Formula/r/rush.rb new file mode 100644 index 0000000000000..26b67f55b81d7 --- /dev/null +++ b/Formula/r/rush.rb @@ -0,0 +1,34 @@ +class Rush < Formula + desc "GNU's Restricted User SHell" + homepage "https://www.gnu.org.ua/software/rush/" + url "https://ftpmirror.gnu.org/gnu/rush/rush-2.4.tar.xz" + mirror "https://ftp.gnu.org/gnu/rush/rush-2.4.tar.xz" + sha256 "fa95af9d2c7b635581841cc27a1d27af611f60dd962113a93d23a8874aa060f4" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "949f479b1e1d414b24cff1c6fe3b9b487308b0099b26e4b0268858c6bb403c6d" + sha256 arm64_sequoia: "8b4382d4d29a8b19f80b688720739341a2c50327fdac6f779110133a15df8137" + sha256 arm64_sonoma: "ec78d74a408de6970e3118681a3e98cae4814bfddc72d4bb3007beb96b14ea41" + sha256 arm64_ventura: "b0f7e7ad946f985563b45dca5fefbd157debead3b3c3464e8c845e31486e89eb" + sha256 arm64_monterey: "ce2e49831215279a9e0a8dd96d019d4d208ffe623757c7b05a2fe5ac535aff2a" + sha256 sonoma: "47ccedc93f002ed994d2652677684e49c0ff84c6d416f70aa8e044a90cfb85e5" + sha256 ventura: "26c5ec15c485d6354de3eb4c340fe696ee30acd720049df938eeda46485bfd3b" + sha256 monterey: "daae369d6a80b9c625ba8decada43cfa076ca95db9dedc8d2ffb97694cc76b14" + sha256 arm64_linux: "b72e4b69ed5653be379a5a3d06f14b504c3d256835381a080805187facd76e61" + sha256 x86_64_linux: "2baf1eb74c5f83444259df516ed8983cc827e15a1c70827690ff0349bb5f7cbd" + end + + conflicts_with "rush-parallel", because: "both install `rush` binaries" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system "#{sbin}/rush", "-h" + end +end diff --git a/Formula/r/rust-analyzer.rb b/Formula/r/rust-analyzer.rb new file mode 100644 index 0000000000000..d74058198e730 --- /dev/null +++ b/Formula/r/rust-analyzer.rb @@ -0,0 +1,74 @@ +class RustAnalyzer < Formula + desc "Experimental Rust compiler front-end for IDEs" + homepage "https://rust-analyzer.github.io/" + url "https://github.com/rust-lang/rust-analyzer.git", + tag: "2025-11-03", + revision: "bacc5bbd3020b8265e472ff98000ef477ff86e4a" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4746f4abf678294e16f13806237491848e5a231b5272880ee6da1fbbaceaeb8b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b69ac43290d04a52a27033267ec8e165952bf25812df0836773c6b8cb47bbfd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "526fa171b0c69ed0eab8cc46131d408c7167a9763873306a802ec613899d7ed8" + sha256 cellar: :any_skip_relocation, sonoma: "fe96f6a30ab28bb481614ae15dc23eb51982f53212d7325743fa222771ccb750" + sha256 cellar: :any_skip_relocation, arm64_linux: "fac50762ee5c0cbea7e4ea61309d1b5cbe7615f2127c3d894cadea5c2bc28584" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89bea640e2b416c6155ac3c4c3667468b96aa8f259cc8148c314d65e5b095225" + end + + depends_on "rust" => :build + + def install + cd "crates/rust-analyzer" do + system "cargo", "install", "--bin", "rust-analyzer", *std_cargo_args + end + end + + def rpc(json) + "Content-Length: #{json.size}\r\n" \ + "\r\n" \ + "#{json}" + end + + test do + input = rpc <<~JSON + { + "jsonrpc":"2.0", + "id":1, + "method":"initialize", + "params": { + "rootUri": "file:/dev/null", + "capabilities": {} + } + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "method":"initialized", + "params": {} + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "id": 1, + "method":"shutdown", + "params": null + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "method":"exit", + "params": {} + } + JSON + + output = /Content-Length: \d+\r\n\r\n/ + + assert_match output, pipe_output(bin/"rust-analyzer", input, 0) + end +end diff --git a/Formula/r/rust-parallel.rb b/Formula/r/rust-parallel.rb new file mode 100644 index 0000000000000..3344c7081caa1 --- /dev/null +++ b/Formula/r/rust-parallel.rb @@ -0,0 +1,34 @@ +class RustParallel < Formula + desc "Run commands in parallel with Rust's Tokio framework" + homepage "https://github.com/aaronriekenberg/rust-parallel" + url "https://github.com/aaronriekenberg/rust-parallel/archive/refs/tags/v1.18.1.tar.gz" + sha256 "5230a9fec7bee668f5c069bb4ab7401844d16426d8954cd95d138e2c1331c22e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40a853d5eeb4b5061c8997d32f1054f4431d774cb0ee2fafcfa8a9add9b7f530" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29117d2a2c1b7b34bc3c29851d1cca1cda40b19af17c1d289080698728d8d8de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "feafbea73109a1318a247f7156d3ef30df30a622b1d41903b0fe96aa8c20457d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "80bc4041a159932504d276de3f647c07cf86c060dc05d03c2eb7e1a14380ff29" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a66c827258c777803d3f7d5df5a4ba50f52b00b022c37f2438f1fae15b29790c" + sha256 cellar: :any_skip_relocation, sonoma: "9cb678905f2c6a026e1b7512e196d1478334c4b1129c949e4fb98762f1d1a87f" + sha256 cellar: :any_skip_relocation, ventura: "850de5319efc8a954315d5125c5c2682bd13f41a5f8cfa36b9f6d05a52c14d39" + sha256 cellar: :any_skip_relocation, monterey: "0134ac63beb54873d3c01da1b58e408e994145718fdb0f7cdb1e52f4241ef60a" + sha256 cellar: :any_skip_relocation, arm64_linux: "24abc351a65f9b658a7a81496bb134e75a2237b1d7d45a95424ec6d6a569d93c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9f64a6b6b8620e2cdb18b0d5db059748d21df1af61989f0a1ac226170cda753" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + testdata = testpath/"seq" + testdata.write(1.upto(3).to_a.join("\n")) + testcmd = "rust-parallel -i #{testdata} echo" + testset = Array.new(10) { pipe_output(testcmd) } + refute_equal testset.size, testset.uniq.size + end +end diff --git a/Formula/r/rust-script.rb b/Formula/r/rust-script.rb new file mode 100644 index 0000000000000..93d8a6f7c1f4a --- /dev/null +++ b/Formula/r/rust-script.rb @@ -0,0 +1,28 @@ +class RustScript < Formula + desc "Run Rust files and expressions as scripts without any setup or compilation step" + homepage "https://rust-script.org" + url "https://github.com/fornwall/rust-script/archive/refs/tags/0.36.0.tar.gz" + sha256 "9b6d04ad4dd34838c1b55a8ec4b69e8d7f3008a67d85ef1c35b49502c359b6d8" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "48cb1216ddc8cd608e0c77e1c02c26bd97011c332f4eb7cc98c9d2249db73133" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "62c6d7194f24ae539710d71a0d704f59d0b269e72ee975b089387562846ca9d6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f9f6e9c736740c28e4122afb9b7fb20bd5377ac23385961e15b40327f8442ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "69adfb1fb154780d073e987287b51623cb7b00f6d0a15b9ce11814788c914685" + sha256 cellar: :any_skip_relocation, sonoma: "4ed6eadc0ae46bbc151c3a4ba63727c66b8d69f71b75639487891a97cfee9431" + sha256 cellar: :any_skip_relocation, ventura: "dcffce4689635b8171651084f751de12468ec162853205dca598e86bc427f33f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cd8b102839fff6efe6d8dfb8353de1f008edc51f0f7eca5907b4589c64b3140" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a621299898caf1365fe29b39303f41b4becbce8e6450db1a787b07e6de258307" + end + + depends_on "rust" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal "Hello, world!", shell_output("#{bin}/rust-script -e 'println!(\"Hello, world!\")'").strip + end +end diff --git a/Formula/r/rust.rb b/Formula/r/rust.rb new file mode 100644 index 0000000000000..7cc9a67a3155d --- /dev/null +++ b/Formula/r/rust.rb @@ -0,0 +1,277 @@ +class Rust < Formula + desc "Safe, concurrent, practical language" + homepage "https://www.rust-lang.org/" + license any_of: ["Apache-2.0", "MIT"] + + stable do + url "https://static.rust-lang.org/dist/rustc-1.91.0-src.tar.gz" + sha256 "327f528151753013f0a2b2c7f48955a033d718f269a4bc586314d675d0d43e8a" + + # From https://github.com/rust-lang/rust/tree/#{version}/src/tools + resource "cargo" do + url "https://github.com/rust-lang/cargo/archive/refs/tags/0.92.0.tar.gz" + sha256 "58048da121cf8707ae536e44220a5620d8102cfa6c7a3e32c404d357f0c5a286" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "35bf14822f43783a817094094471f9f17d771c50c5984fdf5d8b9ab5a8ed012e" + sha256 cellar: :any, arm64_sequoia: "4c12fb122054248194ede04d5ddf412725913a197c687caa07412c4aabf95f37" + sha256 cellar: :any, arm64_sonoma: "c0804578a58425e72506d142cc7907843bf3faf8f78bb0c451a0f894f667a502" + sha256 cellar: :any, sonoma: "6f91311336487aaca33f554708a5b39b6d5a300510006a544e8821e6478e8feb" + sha256 cellar: :any_skip_relocation, arm64_linux: "d468b532d14a5d805668ca13f9fa32bdd0d3f9c974519dddecb779fa7893bc07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7139e70bbae795fb5e29f06b36bca01847013a113c2ecd7ca034af1acbd2b630" + end + + head do + url "https://github.com/rust-lang/rust.git", branch: "master" + + resource "cargo" do + url "https://github.com/rust-lang/cargo.git", branch: "master" + end + end + + depends_on "libgit2" + depends_on "libssh2" + depends_on "llvm" + depends_on "openssl@3" + depends_on "pkgconf" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "curl" + + link_overwrite "etc/bash_completion.d/cargo" + # These used to belong in `rustfmt`. + link_overwrite "bin/cargo-fmt", "bin/git-rustfmt", "bin/rustfmt", "bin/rustfmt-*" + + # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0 + resource "rustc-bootstrap" do + on_macos do + on_arm do + url "https://static.rust-lang.org/dist/2025-09-18/rustc-1.90.0-aarch64-apple-darwin.tar.xz", using: :nounzip + sha256 "89551c0ba1cc6d0312aebc4a6cafe4497223217ea8e87c81f6afbe127dfaeeb6" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-09-18/rustc-1.90.0-x86_64-apple-darwin.tar.xz", using: :nounzip + sha256 "594687a61b671445ea9fff0e6b6c6eef81cba30b005d22710217b4da8d2d2ecc" + end + end + + on_linux do + on_arm do + url "https://static.rust-lang.org/dist/2025-09-18/rustc-1.90.0-aarch64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "4e1a9987a11d7d91f0d5afbf5333feb62f44172e4a31f33ce7246549003217f2" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-09-18/rustc-1.90.0-x86_64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "48c2a42de9e92fcae8c24568f5fe40d5734696a6f80e83cc6d46eef1a78f13c9" + end + end + end + + # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0 + resource "cargo-bootstrap" do + on_macos do + on_arm do + url "https://static.rust-lang.org/dist/2025-09-18/cargo-1.90.0-aarch64-apple-darwin.tar.xz", using: :nounzip + sha256 "17a4410a27bf7dad4765f3809265c225f25f8b009da3d4b76cd0927acdae04b5" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-09-18/cargo-1.90.0-x86_64-apple-darwin.tar.xz", using: :nounzip + sha256 "b2fa21c8fed854775e379bb4617145abd047d1be729e8383148139ba1d05c88f" + end + end + + on_linux do + on_arm do + url "https://static.rust-lang.org/dist/2025-09-18/cargo-1.90.0-aarch64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "bd8d1da6fe88ea7e29338f24277c22156267447adbfc47d690467ad32d02c2a7" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-09-18/cargo-1.90.0-x86_64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "9853db03d68578a30972e2755c89c66aec035fec641cf8f3a7117c81eec2578d" + end + end + end + + # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0 + resource "rust-std-bootstrap" do + on_macos do + on_arm do + url "https://static.rust-lang.org/dist/2025-09-18/rust-std-1.90.0-aarch64-apple-darwin.tar.xz", using: :nounzip + sha256 "c36777aec17d617f85f94b7cb87bdd4270eeca30ef38c6f686809d163c881609" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-09-18/rust-std-1.90.0-x86_64-apple-darwin.tar.xz", using: :nounzip + sha256 "dd731e6f9f30cb9b2928b92b084d2f12a3abf06a481ecbd8c3553c3e6f742139" + end + end + + on_linux do + on_arm do + url "https://static.rust-lang.org/dist/2025-09-18/rust-std-1.90.0-aarch64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "4952abb7d9d3ed7cea4f7ea44dcb23dc67631fae4ac44a5f059b90a4b5e9223f" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-09-18/rust-std-1.90.0-x86_64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "663f4ab7945b392d5e5294dec1b050a66820a20e86f084ec37eeb0f2f7ff5569" + end + end + end + + def llvm + Formula["llvm"] + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + # https://docs.rs/openssl/latest/openssl/#manual + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + + if OS.mac? + # Requires the CLT to be the active developer directory if Xcode is installed + ENV["SDKROOT"] = MacOS.sdk_path + # Fix build failure for compiler_builtins "error: invalid deployment target + # for -stdlib=libc++ (requires OS X 10.7 or later)" + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version + end + + cargo_src_path = buildpath/"src/tools/cargo" + rm_r(cargo_src_path) + resource("cargo").stage cargo_src_path + if OS.mac? + inreplace cargo_src_path/"Cargo.toml", + /^curl\s*=\s*"(.+)"$/, + 'curl = { version = "\\1", features = ["force-system-lib-on-osx"] }' + end + + cache_date = File.basename(File.dirname(resource("rustc-bootstrap").url)) + build_cache_directory = buildpath/"build/cache"/cache_date + + resource("rustc-bootstrap").stage build_cache_directory + resource("cargo-bootstrap").stage build_cache_directory + resource("rust-std-bootstrap").stage build_cache_directory + + # rust-analyzer is available in its own formula. + tools = %w[ + analysis + cargo + clippy + rustdoc + rustfmt + rust-analyzer-proc-macro-srv + rust-demangler + src + ] + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --tools=#{tools.join(",")} + --llvm-root=#{llvm.opt_prefix} + --enable-llvm-link-shared + --enable-profiler + --enable-vendor + --disable-cargo-native-static + --disable-docs + --disable-lld + --set=rust.jemalloc + --release-description=#{tap.user} + ] + if build.head? + args << "--disable-rpath" + args << "--release-channel=nightly" + else + args << "--release-channel=stable" + end + + system "./configure", *args + system "make" + system "make", "install" + + bash_completion.install etc/"bash_completion.d/cargo" + (lib/"rustlib/src/rust").install "library" + rm([ + bin.glob("*.old"), + lib/"rustlib/install.log", + lib/"rustlib/uninstall.sh", + (lib/"rustlib").glob("manifest-*"), + ]) + end + + def post_install + lib.glob("rustlib/**/*.dylib") do |dylib| + chmod 0664, dylib + MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}") + MachO.codesign!(dylib) if Hardware::CPU.arm? + chmod 0444, dylib + end + return unless OS.mac? + + # Symlink our LLVM here to make sure the adjacent bin/rust-* tools can find it. + # Needs to be done in `postinstall` to avoid having `change_dylib_id` done on it. + lib.glob("rustlib/*/lib") do |dir| + # Use `ln_sf` instead of `install_symlink` to avoid resolving this into a Cellar path. + ln_sf llvm.opt_lib/shared_library("libLLVM"), dir + end + end + + def caveats + <<~EOS + Link this toolchain with `rustup` under the name `system` with: + rustup toolchain link system "$(brew --prefix rust)" + + If you use rustup, avoid PATH conflicts by following instructions in: + brew info rustup + EOS + end + + test do + require "utils/linkage" + + system bin/"rustdoc", "-h" + (testpath/"hello.rs").write <<~RUST + fn main() { + println!("Hello World!"); + } + RUST + system bin/"rustc", "hello.rs" + assert_equal "Hello World!\n", shell_output("./hello") + system bin/"cargo", "new", "hello_world", "--bin" + assert_equal "Hello, world!", cd("hello_world") { shell_output("#{bin}/cargo run").split("\n").last } + + assert_match <<~EOS, shell_output("#{bin}/rustfmt --check hello.rs", 1) + fn main() { + - println!("Hello World!"); + + println!("Hello World!"); + } + EOS + + # We only check the tools' linkage here. No need to check rustc. + expected_linkage = { + bin/"cargo" => [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + ], + } + unless OS.mac? + expected_linkage[bin/"cargo"] += [ + Formula["curl"].opt_lib/shared_library("libcurl"), + ] + end + missing_linkage = [] + expected_linkage.each do |binary, dylibs| + dylibs.each do |dylib| + next if Utils.binary_linked_to_library?(binary, dylib) + + missing_linkage << "#{binary} => #{dylib}" + end + end + assert missing_linkage.empty?, "Missing linkage: #{missing_linkage.join(", ")}" + end +end diff --git a/Formula/r/rustc-completion.rb b/Formula/r/rustc-completion.rb new file mode 100644 index 0000000000000..8003075153d33 --- /dev/null +++ b/Formula/r/rustc-completion.rb @@ -0,0 +1,33 @@ +class RustcCompletion < Formula + desc "Bash completion for rustc" + homepage "https://github.com/roshan/rust-bash-completion" + license "MIT" + head "https://github.com/roshan/rust-bash-completion.git", branch: "master" + + stable do + url "https://github.com/roshan/rust-bash-completion/archive/refs/tags/0.12.1.tar.gz" + sha256 "562f84ccab40f2b3e7ef47e2e6d9b6615070a0e7330d64ea5368b6ad75455012" + + # upstream commit to fix an undefined command when sourcing the file directly + patch do + url "https://github.com/roshan/rust-bash-completion/commit/932e9bb4e9f28c2785de2b8db6f0e8c050f4f9be.patch?full_index=1" + sha256 "3da76d5469e7fa4579937d107a2661f740d704ac100442f37310aa6430f171a2" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "25c56cce81d2dbed3850ae8bcfc984a605ce5e734bacb82aefece825e896b9db" + end + + def install + bash_completion.install "etc/bash_completion.d/rustc" + end + + test do + assert_match "-F _rustc", + shell_output("bash -c 'source #{bash_completion}/rustc && complete -p rustc'") + end +end diff --git a/Formula/r/rustcat.rb b/Formula/r/rustcat.rb new file mode 100644 index 0000000000000..378f5a1809593 --- /dev/null +++ b/Formula/r/rustcat.rb @@ -0,0 +1,38 @@ +class Rustcat < Formula + desc "Modern Port listener and Reverse shell" + homepage "https://github.com/robiot/rustcat" + url "https://github.com/robiot/rustcat/archive/refs/tags/v3.0.0.tar.gz" + sha256 "59648e51ab41e4aeb825174dfbb53710207257feb3757521be98ed28c4249922" + license "GPL-3.0-only" + head "https://github.com/robiot/rustcat.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0f256a32dd3e5c5ad46cc6c79b7374846ecb650c452fd78fcdac210c73cff878" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36254916f109ade147614d6b7e97c2794453474999dfcc54c26677ab546568e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb05ce140c61ce7bb73d8918f5527f754fa894105c266cd8e1026796d236163b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04ab951ad077f89bc6636a7f9fd30eec76caee2b81e58608690b9b6b04c761f0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "82ee2abc1d590fc2f6e978be9cc87895a7c942ae693d513c2c1bd608afd588c8" + sha256 cellar: :any_skip_relocation, sonoma: "dc1e37c738ec53c2dcaff6280fd34f7232e75223a04663b6ca6bca9517c1b86d" + sha256 cellar: :any_skip_relocation, ventura: "7df0fa8da7aba156aabbeccaba819e066d2a8f9a24ae7f542c0de428f659bf51" + sha256 cellar: :any_skip_relocation, monterey: "4bcba001f9e2c61676c29ee11fc1d5c10cb47210ea9434f26ab7781dc5334af8" + sha256 cellar: :any_skip_relocation, arm64_linux: "0cc1463d3f149a41f142729ccb167e002fd31f95d07ed6df6a4bd9963a14cf7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4acfb8c1ed49a339a21f694b8763f939d8e84968573bb3a397efd6d8975b4fb3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + port = free_port + + r, _, pid = PTY.spawn("#{bin}/rcat listen #{port}") + output = r.readline.gsub(/\e\[[0-9;]*m/, "") + assert_match "info: Listening on 0.0.0.0:#{port}", output + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/r/rustic.rb b/Formula/r/rustic.rb new file mode 100644 index 0000000000000..96486fdaf85d1 --- /dev/null +++ b/Formula/r/rustic.rb @@ -0,0 +1,38 @@ +class Rustic < Formula + desc "Fast, encrypted, and deduplicated backups powered by Rust" + homepage "https://rustic.cli.rs" + url "https://github.com/rustic-rs/rustic/archive/refs/tags/v0.10.0.tar.gz" + sha256 "d67cc86a0e589788c74bee8ab86fd9637b64253751c03fb35a16455457a4684b" + license "Apache-2.0" + head "https://github.com/rustic-rs/rustic.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eacad6676220fc6be58d16b8a38e3faed8020c9d8637dd567b512e688da07c64" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "415c626d9d39383435902dbc801722c27dffc93ac94cea99c840ec19552b6309" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e043c148db5232a4211b368ad57cf4ab4318fa157f476d77f7a1008575f26581" + sha256 cellar: :any_skip_relocation, sonoma: "5e5ad0c701e26123efdc66b833416b6f1f67347b806f08eeaa79955c68cf31d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7f2bb0d7a5583ee865d167051b8fb90c77043f6ab8a30d3cb184ce55959fece" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e9571d4cf09ff19fc538db9b88a6c1218b44168f87e834d56d40424fa595336" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"rustic", "completions") + end + + test do + mkdir testpath/"rustic_repo" + ENV["RUSTIC_REPOSITORY"] = testpath/"rustic_repo" + ENV["RUSTIC_PASSWORD"] = "test" + + (testpath/"testfile").write("test test test") + + system bin/"rustic", "init" + system bin/"rustic", "backup", "testfile" + + system bin/"rustic", "restore", "latest:testfile", testpath/"testfile_restore" + assert compare_file testpath/"testfile", testpath/"testfile_restore" + end +end diff --git a/Formula/r/rustls-ffi.rb b/Formula/r/rustls-ffi.rb new file mode 100644 index 0000000000000..873baccfe21c8 --- /dev/null +++ b/Formula/r/rustls-ffi.rb @@ -0,0 +1,46 @@ +class RustlsFfi < Formula + desc "FFI bindings for the rustls TLS library" + homepage "https://github.com/rustls/rustls-ffi" + url "https://github.com/rustls/rustls-ffi/archive/refs/tags/v0.15.0.tar.gz" + sha256 "db3939a58677e52f03603b332e00347b29aa57aa4012b5f8a7e779ba2934b18b" + license any_of: ["Apache-2.0", "MIT", "ISC"] + head "https://github.com/rustls/rustls-ffi.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "219d4960fb3124a191b5b35029d8d16bd776ff53da6de34f4a2ed99593b111f4" + sha256 cellar: :any, arm64_sequoia: "9dc82894121ecb234a72a281ad45a1f6c5f1640c38371f282f039ce9354cc08b" + sha256 cellar: :any, arm64_sonoma: "6fc16fefdf0d16506468c26dcd82b6483ce80f1248786d0c3737c511fd862cf7" + sha256 cellar: :any, arm64_ventura: "5ae6641e5f808a9bc0bab0b64d0334bb62982986854337295c8842e6a20b7079" + sha256 cellar: :any, sonoma: "40b6f9e829ba02d8d9b6873c95fc06d82f5a3baf05a11f950f32ef9c5a168a55" + sha256 cellar: :any, ventura: "349b1818df27680dd698c0fd2477bb42082b478e5100b244a70251a5b9a31b8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "beaa4376c2ffd27d3f86539496d84ba116335808e28a33c7a9b0ca677a13f155" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c686a5049eb5fc651ee74589a6ba72f05341a0389c539d6d80cc20000c152b1f" + end + + depends_on "cargo-c" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + def install + system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--release", "--prefix", prefix, "--libdir", lib + end + + test do + (testpath/"test-rustls.c").write <<~C + #include "rustls.h" + #include + int main(void) { + struct rustls_str version = rustls_version(); + printf("%s", version.data); + return 0; + } + C + + ENV.append_to_cflags "-I#{include}" + ENV.append "LDFLAGS", "-L#{lib}" + ENV.append "LDLIBS", "-lrustls" + + system "make", "test-rustls" + assert_match version.to_s, shell_output("./test-rustls") + end +end diff --git a/Formula/r/rustscan.rb b/Formula/r/rustscan.rb new file mode 100644 index 0000000000000..9d524d159d881 --- /dev/null +++ b/Formula/r/rustscan.rb @@ -0,0 +1,35 @@ +class Rustscan < Formula + desc "Modern Day Portscanner" + homepage "https://github.com/bee-san/RustScan" + url "https://github.com/bee-san/RustScan/archive/refs/tags/2.4.1.tar.gz" + sha256 "fa99c18a12d4c0939ab69ddb84ef7b85a1ea01d8fc86df227449d89473531765" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "920f4b2a297025ca7b330f4366ef530a2ce9b23de84e9a901de47e7cfd59969e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "50ebbe3662730650662c6f4438c06b70c8bf4c635975ecf3bcf9e081a7862af4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "374f2c989048d26672eb6316f1808fa77a10dfdf11bc9cc84e34a3c790b70b19" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ad0ca15324e8701793117ae68b6846a0b9551acacece068a1525c4ff997112ea" + sha256 cellar: :any_skip_relocation, sonoma: "86a8d2a183f5bec85dc8c40acb58fc9931bb4fcf9e63d3f7fc271d490e5a7f34" + sha256 cellar: :any_skip_relocation, ventura: "e2e7f59265f5f1acfbdd4dceea11a4b13cd01fec43ede709efe986640674436a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e51bf6ded5a5d7091c433bc5e6532ed8bc08a1792e7fbc3cf2f9cf7b23ede3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "045f1455224bee1648c5024d83de72ca209ef19e4784adb2bd5d479bef875bf0" + end + + depends_on "rust" => :build + depends_on "nmap" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + refute_match("panic", shell_output("#{bin}/rustscan --greppable -a 127.0.0.1")) + refute_match("panic", shell_output("#{bin}/rustscan --greppable -a 0.0.0.0")) + end +end diff --git a/Formula/r/rustup.rb b/Formula/r/rustup.rb new file mode 100644 index 0000000000000..87983fee78ee9 --- /dev/null +++ b/Formula/r/rustup.rb @@ -0,0 +1,78 @@ +class Rustup < Formula + desc "Rust toolchain installer" + homepage "https://rust-lang.github.io/rustup/" + url "https://github.com/rust-lang/rustup/archive/refs/tags/1.28.2.tar.gz" + sha256 "5987dcb828068a4a5e29ba99ab26f2983ac0c6e2e4dc3e5b3a3c0fafb69abbc0" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rust-lang/rustup.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "64f4ef0c6a93f3f1261e7a83e5e1de535af07109777de50e699d7bc76c5e8e7c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0dc5a8b36e61ac52cd3c1f2cd8d47fbd31a53ff398b7c1db7b74aa964328e10" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71920ea5fdebe6673e965ec021c7dc11c5f60f55cb21a308972ea9d339b23109" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bbd23bbce4c67a64fa453e13e033c282b38e2cc3c6d69de9bebc09463ce31617" + sha256 cellar: :any_skip_relocation, sonoma: "03a586bc26e67104067448d73c503074699639aa04eed6504651cfede0efeeef" + sha256 cellar: :any_skip_relocation, ventura: "8ebebf2b6d8d8968456fc43b0bab11861d676bdb936efd907791e9f48de9b3bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "02949aabdf891fe17a36471e9758775efff183255719d33496b89b48a171542e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36d2915f62a55bffc816e6ffdb7032d6488b8672d1bb556836082eed53943cae" + end + + keg_only "it conflicts with rust" + + depends_on "rust" => :build + + uses_from_macos "curl" + uses_from_macos "xz" + + on_linux do + depends_on "pkgconf" => :build + depends_on "openssl@3" + end + + def install + system "cargo", "install", "--features=no-self-update", *std_cargo_args + + %w[cargo cargo-clippy cargo-fmt cargo-miri clippy-driver rls rust-analyzer + rust-gdb rust-gdbgui rust-lldb rustc rustdoc rustfmt rustup].each do |name| + bin.install_symlink bin/"rustup-init" => name + end + generate_completions_from_executable(bin/"rustup", "completions") + end + + def post_install + (HOMEBREW_PREFIX/"bin").install_symlink bin/"rustup", bin/"rustup-init" + end + + def caveats + <<~EOS + To initialize `rustup`, set a default toolchain: + rustup default stable + + If you have `rust` installed, ensure you have "$(brew --prefix rustup)/bin" + before "$(brew --prefix)/bin" in your $PATH: + #{Formatter.url("https://rust-lang.github.io/rustup/installation/already-installed-rust.html")} + EOS + end + + test do + ENV["CARGO_HOME"] = testpath/".cargo" + ENV["RUSTUP_HOME"] = testpath/".rustup" + ENV.prepend_path "PATH", bin + + assert_match "no default is configured", shell_output("#{bin}/rustc --version 2>&1", 1) + system bin/"rustup", "default", "stable" + + system bin/"cargo", "init", "--bin" + system bin/"cargo", "fmt" + system bin/"rustc", "src/main.rs" + assert_equal "Hello, world!", shell_output("./main").chomp + assert_empty shell_output("#{bin}/cargo clippy") + + # Check for stale symlinks + system bin/"rustup-init", "-y" + bins = bin.glob("*").to_set(&:basename).delete(Pathname("rustup-init")) + expected = testpath.glob(".cargo/bin/*").to_set(&:basename) + assert (extra = bins - expected).empty?, "Symlinks need to be removed: #{extra.join(",")}" + assert (missing = expected - bins).empty?, "Symlinks need to be added: #{missing.join(",")}" + end +end diff --git a/Formula/r/rustywind.rb b/Formula/r/rustywind.rb new file mode 100644 index 0000000000000..c640698d66687 --- /dev/null +++ b/Formula/r/rustywind.rb @@ -0,0 +1,45 @@ +class Rustywind < Formula + desc "CLI for organizing Tailwind CSS classes" + homepage "https://github.com/avencera/rustywind" + url "https://github.com/avencera/rustywind/archive/refs/tags/v0.24.3.tar.gz" + sha256 "50706558f411722631db2449f5f05463703ebeffdea41f6e5f28f383992d06cb" + license "Apache-2.0" + head "https://github.com/avencera/rustywind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8f6e9a477a66a134a75d813ce06471c85f5bbc114d56bd8a554a9ac13fe11544" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc0916337b8700bf4b9d26f8e9f8ddc03f1de5cdcfa532f412886aed8cf64303" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "78e164d7166d1f303792912c049a135b139e07a3a3559b603d0244c99eeaa1cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eb0bb9e45a527f1789dbc9181642955d60b2d2d48a930f318b7cf1e9bb1df47d" + sha256 cellar: :any_skip_relocation, sonoma: "a7d1cce25f5053ab0f069c4cebf50f590eb4664be89545ffab5a9c72660240c6" + sha256 cellar: :any_skip_relocation, ventura: "072bd55cac02cc31f978923b7d9c90a63b5a9d4ddd314dcbbaa495319825411c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7b5399f8ded336f4fa1756c9a0d17a26bb52ee8b5da16bc06fcabdcb2e8f838" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2421d6c93d562c17fd6f1704b3775b26e34e6b7f9aa98c21a20b138efdb63870" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "rustywind-cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/rustywind --version") + + (testpath/"test.html").write <<~HTML +
    +

    Hello, World!

    +
    + HTML + + system bin/"rustywind", "--write", "test.html" + + expected_content = <<~HTML +
    +

    Hello, World!

    +
    + HTML + + assert_equal expected_content, (testpath/"test.html").read + end +end diff --git a/Formula/r/rv.rb b/Formula/r/rv.rb new file mode 100644 index 0000000000000..b9c1d023c2b0c --- /dev/null +++ b/Formula/r/rv.rb @@ -0,0 +1,44 @@ +class Rv < Formula + desc "Ruby version manager" + homepage "https://github.com/spinel-coop/rv" + url "https://github.com/spinel-coop/rv/archive/refs/tags/v0.2.0.tar.gz" + sha256 "828048689c60ed0d5e4d9a27fcd643821f5f2acf4b782f447f5b0b17904adee1" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/spinel-coop/rv.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b332d8602c328d36bfc6a691ef3b40cc9b3649dc0ecc416c8a4a5be72a62a78a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a6de91c9d133f4987d6bb33ac3bf67303bc84ddca8fecb380fa68ada810469e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97d1d1b3b61d6806e25ab3ae3fa4bbd76a69e43a1d2525522a082fc0d2e88bd2" + sha256 cellar: :any_skip_relocation, sonoma: "f9a7d72c62483279230c8cdd8fdc78b5f0f36740bb4f482388f4b3686401c4a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9a4349ecdbcd10f47260655d02bb2f7a2aa1aa47bc3f138f2ef4dfde6b99334" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f30dba4bbe6ec7b4dd8f0058b3f42b572e4298b8e6019dc5fd30cfff82c115ce" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on macos: :sonoma + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/rv") + generate_completions_from_executable(bin/"rv", "shell", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/rv --version") + + assert_match "No Ruby installations found.", shell_output("#{bin}/rv ruby list --installed-only 2>&1") + + system bin/"rv", "ruby", "install", "3.4.5" + assert_match "Homebrew", shell_output("#{bin}/rv ruby run 3.4.5 -- -e 'puts \"Homebrew\"'") + end +end diff --git a/Formula/r/rxvt-unicode.rb b/Formula/r/rxvt-unicode.rb new file mode 100644 index 0000000000000..f93b45755b760 --- /dev/null +++ b/Formula/r/rxvt-unicode.rb @@ -0,0 +1,88 @@ +class RxvtUnicode < Formula + desc "Rxvt fork with Unicode support" + homepage "http://software.schmorp.de/pkg/rxvt-unicode.html" + url "http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.31.tar.bz2" + sha256 "aaa13fcbc149fe0f3f391f933279580f74a96fd312d6ed06b8ff03c2d46672e8" + license "GPL-3.0-only" + revision 2 + + livecheck do + url "http://dist.schmorp.de/rxvt-unicode/" + regex(/href=.*?rxvt-unicode[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a71bfc4668e4e340ed591757fec08351dcfd734c86ad295d17c08eea98729ba3" + sha256 arm64_sequoia: "1d23f1a4c263ebe7df9a0ee2163d6a93c9d4df1cc4263687da4de3851441a4f3" + sha256 arm64_sonoma: "9a582a19640cd577067cd9aec10962f9f744853653b514899707d7f1b6264c42" + sha256 arm64_ventura: "1365ab0e69449f484abd3d5e36015b9c0fd0ea56719b6c31c8aaee2b9224bc3f" + sha256 sonoma: "f31d79c1ebbec748afd99a199a574d290db3ec2a41786b541bb84c9379c2855c" + sha256 ventura: "cb951ccd032eeda8764b273d19fbf39910b396196ec529f2bd878e5cb1e5100e" + sha256 arm64_linux: "6b14c45ce4f277c329389b0f719c5337dfeb5ed6d72e6771d104cbc37481c4de" + sha256 x86_64_linux: "f353a397eeca72af4958ccea670c84c4daf6c426c8f9e415c4b32bc4e2c1a545" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "libx11" + depends_on "libxext" + depends_on "libxft" + depends_on "libxmu" + depends_on "libxrender" + + uses_from_macos "perl" + + on_macos do + depends_on "libxt" + end + + resource "libptytty" do + url "http://dist.schmorp.de/libptytty/libptytty-2.0.tar.gz" + sha256 "8033ed3aadf28759660d4f11f2d7b030acf2a6890cb0f7926fb0cfa6739d31f7" + end + + # Patches 1 and 2 remove -arch flags for compiling perl support + # Patch 3 fixes `make install` target on case-insensitive filesystems + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/rxvt-unicode/9.22.patch" + sha256 "a266a5776b67420eb24c707674f866cf80a6146aaef6d309721b6ab1edb8c9bb" + end + + def install + ENV.cxx11 + + resource("libptytty").stage do + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args(install_prefix: buildpath) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + ENV.prepend_path "PKG_CONFIG_PATH", buildpath/"lib/pkgconfig" + ENV.append "LDFLAGS", "-L#{buildpath}/lib" + + args = %W[ + --prefix=#{prefix} + --enable-256-color + --with-term=rxvt-unicode-256color + --with-terminfo=/usr/share/terminfo + --enable-smart-resize + --enable-unicode3 + ] + + system "./configure", *args + system "make", "install" + end + + test do + daemon = spawn bin/"urxvtd" + sleep 5 + sleep 10 if OS.mac? && Hardware::CPU.intel? + system bin/"urxvtc", "-k" + Process.wait daemon + end +end diff --git a/Formula/r/ry.rb b/Formula/r/ry.rb new file mode 100644 index 0000000000000..4c5b341893de8 --- /dev/null +++ b/Formula/r/ry.rb @@ -0,0 +1,41 @@ +class Ry < Formula + desc "Ruby virtual env tool" + homepage "https://github.com/jneen/ry" + url "https://github.com/jneen/ry/archive/refs/tags/v0.5.2.tar.gz" + sha256 "b53b51569dfa31233654b282d091b76af9f6b8af266e889b832bb374beeb1f59" + license "MIT" + head "https://github.com/jneen/ry.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "8b92938f20452bf4ad49ef46d0788aac93d5b7f5846cfd3fbaa387da67a2e56e" + end + + depends_on "bash-completion" + depends_on "ruby-build" + + def install + ENV["BASH_COMPLETIONS_DIR"] = prefix/"etc/bash_completion.d" + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + Please add to your profile: + which ry &>/dev/null && eval "$(ry setup)" + + If you want your Rubies to persist across updates you + should set the `RY_RUBIES` variable in your profile, i.e. + export RY_RUBIES="#{HOMEBREW_PREFIX}/var/ry/rubies" + EOS + end + + test do + ENV["RY_RUBIES"] = testpath/"rubies" + + system bin/"ry", "ls" + assert_path_exists testpath/"rubies" + end +end diff --git a/Formula/r/rye.rb b/Formula/r/rye.rb new file mode 100644 index 0000000000000..1608b5ef7490c --- /dev/null +++ b/Formula/r/rye.rb @@ -0,0 +1,63 @@ +class Rye < Formula + desc "Package Management Solution for Python" + homepage "https://rye.astral.sh/" + url "https://github.com/astral-sh/rye/archive/refs/tags/0.44.0.tar.gz" + sha256 "6ef86ccba82b59edfc4f6deba39be6394e7866fe2250596b96124c20327f0581" + license "MIT" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a36d38e6a1aadb4256e49e51c210fd551bcfbb42654c40f0968441f6c588934f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f26f53e090a3f1c42b880b7df2593f597e4294abe311fd1cd0ca1173cc49e5b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e502b9c99df1d69e7caef8e63e23aed06816b90557fa487d18f6610901b13944" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6b74baa377f0ba45f330e370166b5666e1420ec0d6c753b7a375c4fc2d8ef40" + sha256 cellar: :any_skip_relocation, sonoma: "5ac877425fa7885188dcda9743f46146bcd57d835a721f7958a8a46281357f7e" + sha256 cellar: :any_skip_relocation, ventura: "31699f1f7848d15e13d80139514bcc479dca399d2dbf6129884b1e0f2a372047" + sha256 cellar: :any_skip_relocation, arm64_linux: "800c9ebff0b4a200313646ad3b2db6909121a2ea8377e7d33254d09bcbddedb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b58b4ad1741833bb23f3d4411ea72a4e17ec013961dfa3ac152db8bd73fe1b30" + end + + # https://github.com/astral-sh/rye/commit/62ec9edbe471958a05a70418b19f3acd54f0484d + deprecate! date: "2025-08-18", because: :unmaintained, replacement_formula: "uv" + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + conflicts_with "ryelang", because: "both install `rye` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "rye") + generate_completions_from_executable(bin/"rye", "self", "completion", "-s") + end + + test do + (testpath/"pyproject.toml").write <<~TOML + [project] + name = "testproj" + requires-python = ">=3.9" + version = "1.0" + license = {text = "MIT"} + + TOML + system bin/"rye", "add", "requests==2.24.0" + system bin/"rye", "sync" + assert_match "requests==2.24.0", (testpath/"pyproject.toml").read + output = shell_output("#{bin}/rye run python -c 'import requests;print(requests.__version__)'") + assert_equal "2.24.0", output.strip + end +end diff --git a/Formula/r/ryelang.rb b/Formula/r/ryelang.rb new file mode 100644 index 0000000000000..edfc95019ee6c --- /dev/null +++ b/Formula/r/ryelang.rb @@ -0,0 +1,50 @@ +class Ryelang < Formula + desc "Rye is a homoiconic programming language focused on fluid expressions" + homepage "https://ryelang.org/" + url "https://github.com/refaktor/rye/archive/refs/tags/v0.0.87.tar.gz" + sha256 "646d9d77eaab86b76b606e2638d0a41e2056fc8e500f04e1a29c0c0ef2ceb479" + license "BSD-3-Clause" + head "https://github.com/refaktor/rye.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3be783ccfb3319bf70597ebb0c1a7da4b11350250471309f84148f428da049bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb8f9bcb6e92c6da715d14a64bc4975d9e4a6e3f382377b3af845e0dd68c1755" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "042cd5cc4eb87e0b2e6ab72aa05de0210f8e581ec30e09e877cc133439a1afec" + sha256 cellar: :any_skip_relocation, sonoma: "0f3d9ff048a372a6a2aa72bc255ad1c4074f605b44fc0b9783a4a75c8679a9fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "0529623995aa040a3042dcdf3d8ca834d7b7fa0edb8cfa6a130075c8111b132e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d34bb96d64e0f4af15080c3ecbd7f3fe348b0df1b091cc805ec5b86297f950c" + end + + depends_on "go" => :build + + conflicts_with "rye", because: "both install `rye` binaries" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + + ldflags = %W[ + -s -w + -X github.com/refaktor/rye/runner.Version=#{version} + ] + + system "go", "build", *std_go_args(ldflags:, output: bin/"rye") + bin.install_symlink "rye" => "ryelang" # for backward compatibility + end + + test do + assert_match version.to_s, shell_output("#{bin}/rye --version") + + (testpath/"hello.rye").write <<~EOS + "Hello World" .replace "World" "Mars" |print + "12 8 12 16 8 6" .load .unique .sum |print + EOS + assert_path_exists testpath/"hello.rye" + output = shell_output("#{bin}/rye hello.rye 2>&1") + assert_equal "Hello Mars\n42", output.strip + end +end diff --git a/Formula/r/rzip.rb b/Formula/r/rzip.rb new file mode 100644 index 0000000000000..cbcdb8ee42f13 --- /dev/null +++ b/Formula/r/rzip.rb @@ -0,0 +1,60 @@ +class Rzip < Formula + desc "File compression tool (like gzip or bzip2)" + homepage "https://rzip.samba.org/" + url "https://rzip.samba.org/ftp/rzip/rzip-2.1.tar.gz" + sha256 "4bb96f4d58ccf16749ed3f836957ce97dbcff3e3ee5fd50266229a48f89815b7" + license "GPL-2.0-or-later" + + livecheck do + url "https://rzip.samba.org/ftp/rzip/" + regex(/href=.*?rzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "122e356a47499a7c1b8e7d4b4b86fe1f8ff2f32223165464ba2a1c9c68cdf1a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e831e4f90ea7d39b9e846ab0d18048bca802d65a6ecd3b61bfe1e55bbe831345" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2632e94c5b807679406f19003c336b49ff755acd982d507ab3c2098e1fe91afb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "419e465f3f605dff8d3eda647491f8d3651ed51a8b14eb5c524b507517c6c422" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9a049590a86adc0c8c02acf6a869a37a45a47e4e455bf2b2ee2c0bd15128ab43" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "16c1e072a6f596e4bda1fb3bd99a743cdb1ef6c0ec552f1ea33224f24fb28047" + sha256 cellar: :any_skip_relocation, sonoma: "2ebf6bc4b628a0e1908346d0c30198aca1dccfbb2edbaf7e645e60d0a3d508a0" + sha256 cellar: :any_skip_relocation, ventura: "2fb5e7883c1aaf26f31da1deba72b7067dbc7e2c55da34b7803f9c33c5b1e327" + sha256 cellar: :any_skip_relocation, monterey: "b705bc4228ad82a8eca44fcbe8d0b7d30cb562b32de113de647ee33f30df9470" + sha256 cellar: :any_skip_relocation, big_sur: "544443eda6593899f3358c6e7f5bce878ff590f357151b587b3c83785745492e" + sha256 cellar: :any_skip_relocation, catalina: "0d08b087dcaf10a5604aba687c8b59c116d4374bb4a9ded7aec3108d3f005b1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d1d3a724cf5d7d9246b696aabea665b928fae0d01600cf63710678c207990e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b409c08d9581b3013a05dc62ebe68c3d6bab99b342e8bc1f2911e9a342b18f0" + end + + uses_from_macos "bzip2" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + + system "make", "install", "INSTALL_MAN=#{man}" + + bin.install_symlink "rzip" => "runzip" + man1.install_symlink "rzip.1" => "runzip.1" + end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.rz + system bin/"rzip", path + refute_path_exists path + + # decompress: data.txt.rz -> data.txt + system bin/"rzip", "-d", "#{path}.rz" + assert_equal original_contents, path.read + end +end diff --git a/Formula/r3.rb b/Formula/r3.rb deleted file mode 100644 index 872dc356a8c67..0000000000000 --- a/Formula/r3.rb +++ /dev/null @@ -1,48 +0,0 @@ -class R3 < Formula - desc "High-performance URL router library" - homepage "https://github.com/c9s/r3" - url "https://github.com/c9s/r3/archive/1.3.4.tar.gz" - sha256 "db1fb91e51646e523e78b458643c0250231a2640488d5781109f95bd77c5eb82" - head "https://github.com/c9s/r3.git" - - bottle do - cellar :any - sha256 "f136221b1d7a0a4ee057ea0551a2b742d1a49cb50011e5651e8fa5c96327b0b0" => :mojave - sha256 "5239e5302b1952367f6cdc066e43483de6b0d30fa70f1dcf2e9f03b10983890f" => :high_sierra - sha256 "d39c22ae9e69454cc7c205ff0cecc3dd6084a38a1e1742091f55df389e5a8f4a" => :sierra - sha256 "6122bbc3566581f130e54cd563ed69f169598f5ce62d6319e7b5a95b10b802ef" => :el_capitan - sha256 "56a37f8cab8af3833eb52c6fc739027ffd755fb0e60530bd96dc643bdb8e18ed" => :yosemite - sha256 "26bd4bc4114b54d57d9f39bd00f15914f03eea7407fbcc50df4c1925b412a879" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "jemalloc" - depends_on "pcre" - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-malloc=jemalloc" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "r3.h" - int main() { - node * n = r3_tree_create(1); - r3_tree_free(n); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-o", "test", - "-L#{lib}", "-lr3", "-I#{include}/r3" - system "./test" - end -end diff --git a/Formula/rabbitmq-c.rb b/Formula/rabbitmq-c.rb deleted file mode 100644 index 3b0c057261ea1..0000000000000 --- a/Formula/rabbitmq-c.rb +++ /dev/null @@ -1,31 +0,0 @@ -class RabbitmqC < Formula - desc "RabbitMQ C client" - homepage "https://github.com/alanxz/rabbitmq-c" - url "https://github.com/alanxz/rabbitmq-c/archive/v0.9.0.tar.gz" - sha256 "316c0d156452b488124806911a62e0c2aa8a546d38fc8324719cd29aaa493024" - head "https://github.com/alanxz/rabbitmq-c.git" - - bottle do - cellar :any - sha256 "2d3955f945f55d8627d0e7107cd5e0d64e6f67f1385f56be7c5c65e9fc15e0dc" => :mojave - sha256 "d95c6f2c892a815ac20fe9a57fac961c73390182abb748d95d5901a3cb45d7ab" => :high_sierra - sha256 "b2c77dd791f014dfd33983394a369f97e23e0c4519d451b552322df9dced4081" => :sierra - sha256 "892c266e4c6086c65b3e4cee8cf5116f59d682b178540ee3f78efeff1e9d912a" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "popt" - - def install - system "cmake", ".", *std_cmake_args, "-DBUILD_EXAMPLES=OFF", - "-DBUILD_TESTS=OFF", "-DBUILD_API_DOCS=OFF", - "-DBUILD_TOOLS=ON" - system "make", "install" - end - - test do - system bin/"amqp-get", "--help" - end -end diff --git a/Formula/rabbitmq.rb b/Formula/rabbitmq.rb deleted file mode 100644 index 44215412c9571..0000000000000 --- a/Formula/rabbitmq.rb +++ /dev/null @@ -1,103 +0,0 @@ -class Rabbitmq < Formula - desc "Messaging broker" - homepage "https://www.rabbitmq.com" - url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.10/rabbitmq-server-generic-unix-3.7.10.tar.xz" - sha256 "56724f6e7e2b31c886eab43724004af2caa5bd6412f53dd28d2b903adee009d7" - - bottle :unneeded - - depends_on "erlang" - - def install - # Install the base files - prefix.install Dir["*"] - - # Setup the lib files - (var/"lib/rabbitmq").mkpath - (var/"log/rabbitmq").mkpath - - # Correct SYS_PREFIX for things like rabbitmq-plugins - erlang = Formula["erlang"] - inreplace sbin/"rabbitmq-defaults" do |s| - s.gsub! "SYS_PREFIX=${RABBITMQ_HOME}", "SYS_PREFIX=#{HOMEBREW_PREFIX}" - s.gsub! /^ERL_DIR=$/, "ERL_DIR=#{erlang.opt_bin}/" - s.gsub! "CLEAN_BOOT_FILE=start_clean", "CLEAN_BOOT_FILE=#{erlang.opt_lib/"erlang/bin/start_clean"}" - s.gsub! "SASL_BOOT_FILE=start_sasl", "SASL_BOOT_FILE=#{erlang.opt_lib/"erlang/bin/start_clean"}" - end - - # Set RABBITMQ_HOME in rabbitmq-env - inreplace sbin/"rabbitmq-env", - 'RABBITMQ_HOME="$(rmq_realpath "${RABBITMQ_SCRIPTS_DIR}/..")"', - "RABBITMQ_HOME=#{prefix}" - - # Create the rabbitmq-env.conf file - rabbitmq_env_conf = etc/"rabbitmq/rabbitmq-env.conf" - rabbitmq_env_conf.write rabbitmq_env unless rabbitmq_env_conf.exist? - - # Enable plugins - management web UI; STOMP, MQTT, AMQP 1.0 protocols - enabled_plugins_path = etc/"rabbitmq/enabled_plugins" - enabled_plugins_path.write "[rabbitmq_management,rabbitmq_stomp,rabbitmq_amqp1_0,rabbitmq_mqtt]." unless enabled_plugins_path.exist? - - # Extract rabbitmqadmin and install to sbin - # use it to generate, then install the bash completion file - system "/usr/bin/unzip", "-qq", "-j", - "#{prefix}/plugins/rabbitmq_management-#{version}.ez", - "rabbitmq_management-#{version}/priv/www/cli/rabbitmqadmin" - - sbin.install "rabbitmqadmin" - (sbin/"rabbitmqadmin").chmod 0755 - (bash_completion/"rabbitmqadmin.bash").write Utils.popen_read("#{sbin}/rabbitmqadmin --bash-completion") - end - - def caveats; <<~EOS - Management Plugin enabled by default at http://localhost:15672 - EOS - end - - def rabbitmq_env; <<~EOS - CONFIG_FILE=#{etc}/rabbitmq/rabbitmq - NODE_IP_ADDRESS=127.0.0.1 - NODENAME=rabbit@localhost - RABBITMQ_LOG_BASE=#{var}/log/rabbitmq - EOS - end - - plist_options :manual => "rabbitmq-server" - - def plist; <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_sbin}/rabbitmq-server - RunAtLoad - - EnvironmentVariables - - - PATH - #{HOMEBREW_PREFIX}/sbin:/usr/sbin:/usr/bin:/bin:#{HOMEBREW_PREFIX}/bin - - CONF_ENV_FILE - #{etc}/rabbitmq/rabbitmq-env.conf - - StandardErrorPath - #{var}/log/rabbitmq/std_error.log - StandardOutPath - #{var}/log/rabbitmq/std_out.log - - - EOS - end - - test do - ENV["RABBITMQ_MNESIA_BASE"] = testpath/"var/lib/rabbitmq/mnesia" - system sbin/"rabbitmq-server", "-detached" - system sbin/"rabbitmqctl", "status" - system sbin/"rabbitmqctl", "stop" - end -end diff --git a/Formula/rack.rb b/Formula/rack.rb deleted file mode 100644 index 36f0e798f89bc..0000000000000 --- a/Formula/rack.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Rack < Formula - desc "CLI for Rackspace" - homepage "https://github.com/rackspace/rack" - url "https://github.com/rackspace/rack.git", - :tag => "1.2", - :revision => "09c14b061f4a115c8f1ff07ae6be96d9b11e08df" - head "https://github.com/rackspace/rack.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "61fb0f5cb11684e5fd0723d823fce0948fcafa862e031c3253c4ff36bb8830d6" => :mojave - sha256 "f5b447e509b01c080e73d8a275a60591e0a9b91d09d9aeff9aafe91b67538486" => :high_sierra - sha256 "9e77b25dce5ebddece476a84fa04b32d3c904f4a825db343b128a8b3b4a4f4fd" => :sierra - sha256 "7a17ae415465e10b0b5674218d5fb127c03782b5f49e741d8a84f94cde7c658a" => :el_capitan - sha256 "d49a8f87439a1584e1662a570c7a40611d6cf13064e37f3a66cb7e1feaaa5719" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["TRAVIS_TAG"] = version - - rackpath = buildpath/"src/github.com/rackspace/rack" - rackpath.install Dir["{*,.??*}"] - - cd rackpath do - # This is a slightly grim hack to handle the weird logic around - # deciding whether to add a = or not on the ldflags, as mandated - # by Go 1.7+. - # https://github.com/rackspace/rack/issues/446 - inreplace "script/build", "go1.5", Utils.popen_read("go version")[/go1\.\d/] - - ln_s "internal", "vendor" - system "script/build", "rack" - bin.install "rack" - prefix.install_metafiles - end - end - - test do - system "#{bin}/rack" - end -end diff --git a/Formula/radamsa.rb b/Formula/radamsa.rb deleted file mode 100644 index f208467480fc2..0000000000000 --- a/Formula/radamsa.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Radamsa < Formula - desc "Test case generator for robustness testing (a.k.a. a \"fuzzer\")" - homepage "https://github.com/aoh/radamsa" - url "https://github.com/aoh/radamsa/releases/download/v0.5/radamsa-0.5.tar.gz" - sha256 "e21a86aa6dca7e4619085fc60fb664d0a1bd067ca6ebfbcb16ab2d57c8854cb4" - - bottle do - cellar :any_skip_relocation - sha256 "0d267d4e20c85e8da62cc4efadb2cf22386ecd9e87c23a0d1c46ff06a483bf4f" => :mojave - sha256 "a971e3bf09f3854d724549a31b98854458b8c49cdfd88593fb14c380066d7bc1" => :high_sierra - sha256 "d13369632654e12471ff029aa6c08f57e9572df60b9d5b18040ce341ca8b4b09" => :sierra - sha256 "3b09d787e73444964136ab042bc458610eb4cf08f4ba015cbe7e1d13ab8509f5" => :el_capitan - end - - def install - system "make" - man1.install "doc/radamsa.1" - prefix.install Dir["*"] - end - - def caveats; <<~EOS - The Radamsa binary has been installed. - The Lisp source code has been copied to: - #{prefix}/rad - - To be able to recompile the source to C, you will need run: - $ make get-owl - - Tests can be run with: - $ make .seal-of-quality - - EOS - end - - test do - system bin/"radamsa", "-V" - end -end diff --git a/Formula/radare2.rb b/Formula/radare2.rb deleted file mode 100644 index 044663f7f6e77..0000000000000 --- a/Formula/radare2.rb +++ /dev/null @@ -1,146 +0,0 @@ -class Radare2 < Formula - desc "Reverse engineering framework" - homepage "https://radare.org" - revision 1 - - stable do - url "https://radare.mikelloc.com/get/2.8.0/radare2-2.8.0.tar.gz" - sha256 "015c0b54cbeab2f055ca45ea57675ac5fcddb9be788249143e20bb64554a769e" - - resource "bindings" do - url "https://radare.mikelloc.com/get/2.8.0/radare2-bindings-2.8.0.tar.gz" - sha256 "4a3b6e8101093033342e862b6834c92072bc6d902583dbca36b45a4684a4d40f" - end - - resource "extras" do - url "https://radare.mikelloc.com/get/2.8.0/radare2-extras-2.8.0.tar.gz" - sha256 "f11f16faec355eddc509e3615e42b5c9de565858d68790a5c7591b6525488f75" - end - end - - bottle do - sha256 "2e54078d5cff62cd5593ba2390a0f230e334b94024954e5b6329d52c0401aafc" => :mojave - sha256 "18dad4749aba2e1d3b5ecb55a1b3c55656bf0e604fc6e739b45a249809053a98" => :high_sierra - sha256 "67705968143b7235843ad4a494ffca8bbfb886168656a4171bb730dec615a0d2" => :sierra - end - - head do - url "https://github.com/radare/radare2.git" - - resource "bindings" do - url "https://github.com/radare/radare2-bindings.git" - end - - resource "extras" do - url "https://github.com/radare/radare2-extras.git" - end - end - - option "with-code-signing", "Codesign executables to provide unprivileged process attachment" - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "valabind" => :build - - if build.with? "code-signing" - depends_on :codesign => [{ - :identity => "org.radare.radare2", - :url => "https://github.com/radare/radare2/blob/master/doc/macos.md", - }] - end - - depends_on "gmp" - depends_on "jansson" - depends_on "libewf" - depends_on "libmagic" - depends_on "lua" - depends_on "openssl" - depends_on "yara" - - def install - # Build Radare2 before bindings, otherwise compile = nope. - system "./configure", "--prefix=#{prefix}", "--with-openssl" - system "make", "CS_PATCHES=0" - if build.with? "code-signing" - # Brew changes the HOME directory which breaks codesign - home = `eval printf "~$USER"` - system "make", "HOME=#{home}", "-C", "binr/radare2", "macossign" - system "make", "HOME=#{home}", "-C", "binr/radare2", "macos-sign-libs" - end - ENV.deparallelize { system "make", "install" } - - # remove leftover symlinks - # https://github.com/radare/radare2/issues/8688 - rm_f bin/"r2-docker" - rm_f bin/"r2-indent" - - resource("extras").stage do - ENV.append_path "PATH", bin - ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" - (lib/"radare2/#{version}").mkpath - - system "./configure", "--prefix=#{prefix}" - system "make", "R2PM_PLUGDIR=#{lib}/radare2/#{version}", "all" - system "make", "R2PM_PLUGDIR=#{lib}/radare2/#{version}", "install" - end - - resource("bindings").stage do - ENV.append_path "PATH", bin - ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" - - # Language versions. - perl_version = `/usr/bin/perl -e 'printf "%vd", $^V;'` - lua_version = Formula["lua"].version.to_s.match(/\d\.\d/) - - # Lazily bind to Python. - inreplace "do-swig.sh", "VALABINDFLAGS=\"\"", "VALABINDFLAGS=\"--nolibpython\"" - make_binding_args = ["CFLAGS=-undefined dynamic_lookup"] - - # Ensure that plugins and bindings are installed in the Cellar. - inreplace "libr/lang/p/Makefile" do |s| - s.gsub! "R2_PLUGIN_PATH=", "#R2_PLUGIN_PATH=" - s.gsub! "~/.config/radare2/plugins", "#{lib}/radare2/#{version}" - end - - # We don't want to place json.lua in lib/lua/#{lua_version} because - # the name is very generic, which introduces a strong possibility of - # clashes with other formulae or in general usage. - inreplace "libr/lang/p/lua.c", - 'os.getenv(\"HOME\")..\"/.config/radare2/plugins/lua/?.lua;', - "\\\"#{libexec}/lua/#{lua_version}/?.lua;" - - # Really the Lua libraries should be dumped in libexec too but - # since they're named fairly specifically it's semi-acceptable. - inreplace "Makefile" do |s| - s.gsub! "LUAPKG=", "#LUAPKG=" - s.gsub! "${DESTDIR}$$_LUADIR", "#{lib}/lua/#{lua_version}" - s.gsub! "ls lua/*so*$$_LUAVER", "ls lua/*so" - end - - make_install_args = %W[ - R2_PLUGIN_PATH=#{lib}/radare2/#{version} - LUAPKG=lua-#{lua_version} - PERLPATH=#{lib}/perl5/site_perl/#{perl_version} - PYTHON_PKGDIR=#{lib}/python2.7/site-packages - RUBYPATH=#{lib}/ruby/#{RUBY_VERSION} - ] - - system "./configure", "--prefix=#{prefix}" - ["lua", "perl", "python"].each do |binding| - system "make", "-C", binding, *make_binding_args - end - system "make" - system "make", "install", *make_install_args - - # This should be being handled by the Makefile but for some reason - # it doesn't want to work. If this ever breaks it's likely because - # the Makefile has started functioning as expected & placing it in lib. - (libexec/"lua/#{lua_version}").install Dir["libr/lang/p/lua/*.lua"] - end - end - - test do - assert_match "radare2 #{version}", shell_output("#{bin}/r2 -version") - end -end diff --git a/Formula/ragel.rb b/Formula/ragel.rb deleted file mode 100644 index 846c5d3655e81..0000000000000 --- a/Formula/ragel.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Ragel < Formula - desc "State machine compiler" - homepage "https://www.colm.net/open-source/ragel/" - url "https://www.colm.net/files/ragel/ragel-6.10.tar.gz" - sha256 "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f" - - bottle do - cellar :any_skip_relocation - sha256 "b9b1428abb19b6e6d8de2bccc58a059b75d7c08b38b73956bb40e764a9d0390f" => :mojave - sha256 "8dc6d7e1a3617cd31d9738c5ae595fd57ddb157266c1970646a7d5fbba85a6ae" => :high_sierra - sha256 "69d6d65c2ef3da7b829e3391fd17b1ef088b92c2baf64979707033e2a7dd8c01" => :sierra - sha256 "f4ea3a8c0476fd82000223fae69170ac9f266cd36334bd60d9d6cf4fab3273c1" => :el_capitan - sha256 "dd8469ac3e08d5d8a257ce7fc7de05de398e8521abff83eceea0741099685b38" => :yosemite - end - - resource "pdf" do - url "https://www.colm.net/files/ragel/ragel-guide-6.10.pdf" - sha256 "efa9cf3163640e1340157c497db03feb4bc67d918fc34bc5b28b32e57e5d3a4e" - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - doc.install resource("pdf") - end - - test do - testfile = testpath/"rubytest.rl" - testfile.write <<~EOS - %%{ - machine homebrew_test; - main := ( 'h' @ { puts "homebrew" } - | 't' @ { puts "test" } - )*; - }%% - data = 'ht' - %% write data; - %% write init; - %% write exec; - EOS - system bin/"ragel", "-Rs", testfile - end -end diff --git a/Formula/rails-completion.rb b/Formula/rails-completion.rb deleted file mode 100644 index aa415114b691d..0000000000000 --- a/Formula/rails-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class RailsCompletion < Formula - desc "Bash completion for Rails" - homepage "https://github.com/mernen/completion-ruby" - url "https://github.com/mernen/completion-ruby.git", - :revision => "f3e4345042b0cc48317e45b673dfd3d23904b9a7" - version "2" - head "https://github.com/mernen/completion-ruby.git" - - bottle :unneeded - - def install - bash_completion.install "completion-rails" => "rails" - end - - test do - assert_match "-F __rails", - shell_output("source #{bash_completion}/rails && complete -p rails") - end -end diff --git a/Formula/rainbarf.rb b/Formula/rainbarf.rb deleted file mode 100644 index 45e24051031b0..0000000000000 --- a/Formula/rainbarf.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Rainbarf < Formula - desc "CPU/RAM/battery stats chart bar for tmux (and GNU screen)" - homepage "https://github.com/creaktive/rainbarf" - url "https://github.com/creaktive/rainbarf/archive/v1.4.tar.gz" - sha256 "066579c0805616075c49c705d1431fb4b7c94a08ef2b27dd8846bd3569a188a4" - head "https://github.com/creaktive/rainbarf.git" - - bottle :unneeded - - def install - system "pod2man", "rainbarf", "rainbarf.1" - man1.install "rainbarf.1" - bin.install "rainbarf" - end - - test do - # Avoid "Use of uninitialized value $battery" and sandbox violation - # Reported 5 Sep 2016 https://github.com/creaktive/rainbarf/issues/30 - assert_match version.to_s, shell_output("#{bin}/rainbarf --help", 1) - end -end diff --git a/Formula/raine.rb b/Formula/raine.rb deleted file mode 100644 index 40d82b7181701..0000000000000 --- a/Formula/raine.rb +++ /dev/null @@ -1,183 +0,0 @@ -class Raine < Formula - desc "680x0 arcade emulator" - homepage "https://raine.1emulation.com/" - url "https://github.com/zelurker/raine/archive/0.64.15.tar.gz" - sha256 "7aabe3138bd41e95b586a48a29c4d8bf68ff44aeb44d54dae0899c2f4aba6542" - head "https://github.com/zelurker/raine.git" - - bottle do - cellar :any_skip_relocation - sha256 "a770cb82fd789143fa7b6ebcb3250acc54e1fe838b35481cb344cccc95deabe7" => :high_sierra - sha256 "e9cc1e4e5b2412e75ae7b6b8356fdc444854fcf972c8ff75070962b8a8c69d6f" => :sierra - sha256 "f1211de870679484ecd9dca7e572a5cc0228f1f6a7ce3879f06b25f3c1816e4a" => :el_capitan - end - - def configure_args(package) - { - "flac" => %w[--disable-dependency-tracking - --disable-debug - --enable-static - --disable-asm-optimizations], - "freetype" => %w[--without-harfbuzz], - "gettext" => %w[--disable-dependency-tracking - --disable-silent-rules - --disable-debug - --with-included-gettext - --with-included-glib - --with-included-libcroco - --with-included-libunistring - --without-emacs - --disable-java - --disable-csharp - --without-git - --without-cvs - --without-xz], - "muparser" => %w[--disable-debug - --disable-dependency-tracking - --disable-shared - --disable-samples], - "sdl" => %w[--without-x], - "sdl_image" => %w[--disable-dependency-tracking - --disable-imageio - --disable-sdltest], - "sdl_sound" => %w[--disable-dependency-tracking - --disable-sdltest - --disable-mikmod - --disable-modplug - --disable-physfs - --disable-speex], - "sdl_ttf" => %W[--disable-debug - --disable-dependency-tracking - --disable-sdltest - --with-freetype-prefix=#{buildpath}], - }.fetch(package, %w[--disable-debug - --disable-dependency-tracking - --disable-shared]).dup - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "nasm" => :build - depends_on "pkg-config" => :build - - resource "gettext" do - url "https://ftp.gnu.org/gnu/gettext/gettext-0.19.8.1.tar.xz" - mirror "https://ftpmirror.gnu.org/gettext/gettext-0.19.8.1.tar.xz" - sha256 "105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4" - end - - resource "libpng" do - url "https://downloads.sourceforge.net/project/libpng/libpng16/older-releases/1.6.31/libpng-1.6.31.tar.xz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/libpng/libpng-1.6.31.tar.xz" - sha256 "232a602de04916b2b5ce6f901829caf419519e6a16cc9cd7c1c91187d3ee8b41" - end - - resource "sdl" do - url "https://www.libsdl.org/release/SDL-1.2.15.tar.gz" - sha256 "d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00" - end - - resource "sdl_image" do - url "https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz" - sha256 "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699" - end - - resource "libogg" do - url "https://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz" - sha256 "e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" - end - - resource "libvorbis" do - url "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz" - sha256 "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1" - end - - resource "flac" do - url "https://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz" - mirror "https://downloads.sourceforge.net/project/flac/flac-src/flac-1.3.2.tar.xz" - sha256 "91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f" - end - - resource "sdl_sound" do - url "https://icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/s/sdl-sound1.2/sdl-sound1.2_1.0.3.orig.tar.gz" - sha256 "3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df" - end - - resource "freetype" do - url "https://downloads.sourceforge.net/project/freetype/freetype2/2.8/freetype-2.8.tar.bz2" - mirror "https://download.savannah.gnu.org/releases/freetype/freetype-2.8.tar.bz2" - sha256 "a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b" - end - - resource "sdl_ttf" do - url "https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz" - sha256 "724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7" - end - - resource "muparser" do - url "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz" - sha256 "0666ef55da72c3e356ca85b6a0084d56b05dd740c3c21d26d372085aa2c6e708" - end - - def install - ENV.m32 - - ENV.prepend_create_path "PATH", buildpath/"bin" - ENV.append_to_cflags "-I#{buildpath}/include" - ENV.append "LDFLAGS", "-L#{buildpath}/lib" - ENV.prepend_path "PKG_CONFIG_PATH", buildpath/"lib/pkgconfig" - - # Install private copies of all dependencies in buildpath - resources.each do |r| - r.stage do - # this sucks; we can't apply real patches since this is a resource - if r.name == "sdl" - inreplace "src/video/quartz/SDL_QuartzVideo.h", - /(CGDirectPaletteRef.+)$/, - "#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070)\n\\1\n#endif" - elsif r.name == "sdl_ttf" - inreplace "SDL_ttf.c", - "for ( row = 0; row < glyph->bitmap.rows; ++row ) {", - "for ( row = 0; row < glyph->pixmap.rows; ++row ) {" - elsif r.name == "sdl_sound" - # Works around a broken libtool which breaks dynamic linkage - touch ["AUTHORS", "NEWS"] - File.rename "CHANGELOG", "ChangeLog" - system "autoreconf", "-ivf" - end - - args = configure_args(r.name) - args << "--prefix=#{buildpath}" - - system "./configure", *args - system "make" - system "make", "install" - end - end - - inreplace "makefile" do |s| - s.gsub! /-lSDL_ttf/, "-lSDL_ttf -lfreetype -lbz2" - s.gsub! /-lSDL_sound/, "-lSDL_sound -lFLAC -logg" - s.gsub! /-l(SDL\w*|intl|muparser|freetype|png|FLAC|ogg)/, "#{buildpath}/lib/lib\\1.a" - s.gsub! %r{/usr/local/lib/libpng.a}, "#{buildpath}/lib/libpng.a" - s.gsub! %r{/usr/local/include/SDL/}, "#{buildpath}/include/SDL/" - s.gsub! %r{-I/usr/local/include}, ENV.cflags - end - - # We need to manually pass the system frameworks that the SDL libraries - # normally link against, since they're still used when linked statically. - frameworks = %w[ApplicationServices AppKit AudioToolbox AudioUnit Carbon - CoreFoundation CoreGraphics CoreServices Foundation IOKit] - - system "make", "LD=#{ENV.cxx} #{ENV.ldflags} #{frameworks.map { |f| "-framework #{f}" }.join(" ")}" - system "make", "install" - prefix.install "Raine.app" - bin.write_exec_script "#{prefix}/Raine.app/Contents/MacOS/raine" - end - - test do - assert_match /RAINE \(680x0 Arcade Emulation\) #{version} /, shell_output("#{bin}/raine -n") - end -end diff --git a/Formula/rake-completion.rb b/Formula/rake-completion.rb deleted file mode 100644 index e709eab16a5b9..0000000000000 --- a/Formula/rake-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class RakeCompletion < Formula - desc "Bash completion for Rake" - homepage "https://github.com/JoeNyland/rake-completion" - url "https://github.com/JoeNyland/rake-completion/archive/v1.0.0.tar.gz" - sha256 "2d619d0d1d8052994011209c62f926b9e41d45e9268da4b9858fa45911b04cd1" - - bottle :unneeded - - def install - bash_completion.install "rake.sh" => "rake" - end - - test do - assert_match "-F _rakecomplete", - shell_output("source #{bash_completion}/rake && complete -p rake") - end -end diff --git a/Formula/rakudo-star.rb b/Formula/rakudo-star.rb deleted file mode 100644 index ed34f1ac22799..0000000000000 --- a/Formula/rakudo-star.rb +++ /dev/null @@ -1,49 +0,0 @@ -class RakudoStar < Formula - desc "Perl 6 compiler" - homepage "https://rakudo.org/" - url "https://rakudo.perl6.org/downloads/star/rakudo-star-2018.10.tar.gz" - sha256 "a4914220b58de6b3298adfc80d740a1fb69dbb1fed6155e563eb0a9d4b63a346" - - bottle do - sha256 "04b613aac2b3458114675aa632a9bd0d0ef533b12492d2bdf88c3f329a0f1229" => :mojave - sha256 "161857fada5e6f84449ef8c4c1c1094ea69539c3319ca40245f96cce79298332" => :high_sierra - sha256 "b6842c2ae742ea34d15ba4f14cfaded5ee982f7f830469ea1e81e5dd84e44f08" => :sierra - end - - depends_on "gmp" - depends_on "icu4c" - depends_on "libffi" - depends_on "pcre" - - conflicts_with "parrot" - - def install - libffi = Formula["libffi"] - ENV.remove "CPPFLAGS", "-I#{libffi.include}" - ENV.prepend "CPPFLAGS", "-I#{libffi.lib}/libffi-#{libffi.version}/include" - - ENV.deparallelize # An intermittent race condition causes random build failures. - - system "perl", "Configure.pl", "--prefix=#{prefix}", - "--backends=moar", "--gen-moar" - system "make" - # make install runs tests that can hang on sierra - # set this variable to skip those tests - ENV["NO_NETWORK_TESTING"] = "1" - system "make", "install" - - # Panda is now in share/perl6/site/bin, so we need to symlink it too. - bin.install_symlink Dir[share/"perl6/site/bin/*"] - - # Move the man pages out of the top level into share. - # Not all backends seem to generate man pages at this point (moar does not, parrot does), - # so we need to check if the directory exists first. - mv "#{prefix}/man", share if File.directory?("#{prefix}/man") - end - - test do - out = `#{bin}/perl6 -e 'loop (my $i = 0; $i < 10; $i++) { print $i }'` - assert_equal "0123456789", out - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/rakudo.rb b/Formula/rakudo.rb deleted file mode 100644 index 09b981bf94a07..0000000000000 --- a/Formula/rakudo.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Rakudo < Formula - desc "Perl 6 compiler targeting MoarVM" - homepage "https://rakudo.org" - url "https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.12.tar.gz" - sha256 "67bb02b9afd4f2a2a8542e25ce2691bc2d77864668f0fc82e1d39dea31a584fa" - - bottle do - sha256 "ff76c570e4ee24d0fe5f3cee06994e9acaeb6b6398bca06efab140e7135aeb1a" => :mojave - sha256 "17a8570054d279c922068afe4772062f4b47977203b101ee180c3b6908b9115c" => :high_sierra - sha256 "fd71fce5030a6b05098d1918306f8cf40f286fe5e98b4f57b2e0f22585bf2ee2" => :sierra - end - - depends_on "nqp" - - def install - system "perl", "Configure.pl", - "--backends=moar", - "--prefix=#{prefix}", - "--with-nqp=#{Formula["nqp"].bin}/nqp" - system "make" - system "make", "install" - bin.install "tools/install-dist.p6" => "perl6-install-dist" - end - - test do - out = shell_output("#{bin}/perl6 -e 'loop (my $i = 0; $i < 10; $i++) { print $i }'") - assert_equal "0123456789", out - end -end diff --git a/Formula/rancher-cli.rb b/Formula/rancher-cli.rb deleted file mode 100644 index e0b326408d309..0000000000000 --- a/Formula/rancher-cli.rb +++ /dev/null @@ -1,28 +0,0 @@ -class RancherCli < Formula - desc "The Rancher CLI is a unified tool to manage your Rancher server" - homepage "https://github.com/rancher/cli" - url "https://github.com/rancher/cli/archive/v2.0.6.tar.gz" - sha256 "09539d73f2c5d57702fd5ac6cdafde964d4e0e15508bf035fb471b0104a7db27" - - bottle do - cellar :any_skip_relocation - sha256 "50dda64816a91156537fa70b83f1a5a0ac123af011f11979d91c8f02bd61682a" => :mojave - sha256 "f235a8d468ec0a5e718fcc3deadde6020d1671cf4f07e9a1f4332552cb5496db" => :high_sierra - sha256 "5b7a3cabb637aebc1b35c7645cc17e99517cefafe43380939e15fde49cedeb10" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/rancher/cli/").install Dir["*"] - system "go", "build", "-ldflags", - "-w -X github.com/rancher/cli/version.VERSION=#{version}", - "-o", "#{bin}/rancher", - "-v", "github.com/rancher/cli/" - end - - test do - system bin/"rancher", "help" - end -end diff --git a/Formula/rancher-compose.rb b/Formula/rancher-compose.rb deleted file mode 100644 index 5e497a0c914b4..0000000000000 --- a/Formula/rancher-compose.rb +++ /dev/null @@ -1,31 +0,0 @@ -class RancherCompose < Formula - desc "Docker Compose compatible client to deploy to Rancher" - homepage "https://github.com/rancher/rancher-compose" - url "https://github.com/rancher/rancher-compose/archive/v0.12.5.tar.gz" - sha256 "cdff53b2c3401b990ad33e229c7ef429504419e49e18a814101e2fa3c84859ea" - - bottle do - cellar :any_skip_relocation - sha256 "bf318932b401481ee6e3a94c82c617b21e558406ebef9739c1c7bb42441e9eda" => :mojave - sha256 "63f6da5eb59cb86c8f84975b3d3ee41f0bfc1456b239d1a6cc06a648d57e1967" => :high_sierra - sha256 "08f3fad4e6c1df545dd908b61afe47ed489e682ad2cadab384066237498a2a04" => :sierra - sha256 "8503ea7d7ca208ca7fe8d0c0b81f9ab9b69d926c58f856ac9de4f9f3600cde17" => :el_capitan - sha256 "23291133a0a775210ae1244ae594931ce04fab8e7c0a37ba90431d61d869317b" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/rancher/rancher-compose").install Dir["*"] - system "go", "build", "-ldflags", - "-w -X github.com/rancher/rancher-compose/version.VERSION=#{version}", - "-o", "#{bin}/rancher-compose", - "-v", "github.com/rancher/rancher-compose" - prefix.install_metafiles "src/github.com/rancher/rancher-compose" - end - - test do - system bin/"rancher-compose", "help" - end -end diff --git a/Formula/rancid.rb b/Formula/rancid.rb deleted file mode 100644 index 983ea7a42f419..0000000000000 --- a/Formula/rancid.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Rancid < Formula - desc "Really Awesome New Cisco confIg Differ" - homepage "https://www.shrubbery.net/rancid/" - url "ftp://ftp.shrubbery.net/pub/rancid/rancid-3.7.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/r/rancid/rancid_3.8.orig.tar.gz" - sha256 "9c6befff78d49d8d0757a2b57b6cfdfef55cadcbc1fa6fbe1ab9424335d51f7b" - - bottle do - cellar :any_skip_relocation - sha256 "655227c25c42858169f2de9f5578b045d7199220091d084d34da1acdfc019837" => :mojave - sha256 "d35aeb470a1d217d32279f2a45d513c0a8b50191022d48a7c25da7e7f830db2f" => :high_sierra - sha256 "9bb1c1edb5c94a70de4ea3634146d45be62bc67b82fb967448b2a645946ffd1f" => :sierra - sha256 "d6429e2f77b8d616449ee4af91adda8b24a94b2f73d314070cc2300c695f6a43" => :el_capitan - end - - conflicts_with "par", :because => "both install `par` binaries" - - def install - system "./configure", "--prefix=#{prefix}", "--exec-prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"rancid.conf").write <<~EOS - BASEDIR=#{testpath}; export BASEDIR - CVSROOT=$BASEDIR/CVS; export CVSROOT - LOGDIR=$BASEDIR/logs; export LOGDIR - RCSSYS=git; export RCSSYS - LIST_OF_GROUPS="backbone aggregation switches" - EOS - system "#{bin}/rancid-cvs", "-f", testpath/"rancid.conf" - end -end diff --git a/Formula/randomize-lines.rb b/Formula/randomize-lines.rb deleted file mode 100644 index 1e025c4ac7832..0000000000000 --- a/Formula/randomize-lines.rb +++ /dev/null @@ -1,26 +0,0 @@ -class RandomizeLines < Formula - desc "Reads and randomize lines from a file (or STDIN)" - homepage "https://arthurdejong.org/rl/" - url "https://arthurdejong.org/rl/rl-0.2.7.tar.gz" - sha256 "1cfca23d6a14acd190c5a6261923757d20cb94861c9b2066991ec7a7cae33bc8" - - bottle do - cellar :any_skip_relocation - sha256 "58709789bd3fae27aaa79f0c5149fc613128bb01e50e3a5b5dbdc61fe2f1b8bf" => :mojave - sha256 "2d539a346c5a41f2b20773d8373e61f91a5d7e5b72b6d6dde7bd7c99dae64b6e" => :high_sierra - sha256 "19f42b1930e7a523778b18834c9615eb3c891ee490a1cb41a73f61bc47c336f6" => :sierra - sha256 "e61c986a537a9f0c77b1382add72096e72f7447ef50ac8acc01320014681e691" => :el_capitan - sha256 "fbffa3106ec600894f313f9770f1336227e2bf149f10c487344f26b4bf8f1093" => :yosemite - sha256 "ec4fc7a2361d75b1b76d0b4edfdb39aae104a9c054eaae07f0b0ee55762fe485" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system system "echo", "-e", "\" ""1\n2\n4\" | \"#{bin}/rl\" -c 1" - end -end diff --git a/Formula/range-v3.rb b/Formula/range-v3.rb deleted file mode 100644 index 9e2372cde5cff..0000000000000 --- a/Formula/range-v3.rb +++ /dev/null @@ -1,42 +0,0 @@ -class RangeV3 < Formula - desc "Experimental range library for C++11/14/17" - homepage "https://ericniebler.github.io/range-v3/" - url "https://github.com/ericniebler/range-v3/archive/0.4.0.tar.gz" - sha256 "5dbc878b7dfc500fb04b6b9f99d63993a2731ea34b0a4b8d5f670a5a71a18e39" - - bottle do - cellar :any_skip_relocation - sha256 "e9f7e57576943c1786a6d5776d31dfe594a6d88de7dd5cefe0bb48f7481863b1" => :mojave - sha256 "8d44dcaec99ccbf6fcae8c2ecff860481a6b43900a96f8a24e9a1392e7d46fd7" => :high_sierra - sha256 "8d44dcaec99ccbf6fcae8c2ecff860481a6b43900a96f8a24e9a1392e7d46fd7" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", - "-DRANGE_V3_TESTS=OFF", - "-DRANGE_V3_HEADER_CHECKS=OFF", - "-DRANGE_V3_EXAMPLES=OFF", - "-DRANGE_V3_PERF=OFF", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - int main() { - std::string s{ "hello" }; - ranges::for_each( s, [](char c){ std::cout << c << " "; }); - std::cout << std::endl; - } - EOS - system ENV.cc, "-std=c++11", "-stdlib=libc++", "-lc++", - "-o", "test", "test.cpp" - assert_equal "h e l l o \n", shell_output("./test") - end -end diff --git a/Formula/ranger.rb b/Formula/ranger.rb deleted file mode 100644 index 04d1d68e54251..0000000000000 --- a/Formula/ranger.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Ranger < Formula - desc "File browser" - homepage "https://ranger.github.io" - url "https://ranger.github.io/ranger-1.9.2.tar.gz" - sha256 "0e1d1b1d3f78c227a6cfa783822e98591ca76a35c643d4814f40f73515d66b8a" - head "https://github.com/ranger/ranger.git" - - bottle :unneeded - - def install - man1.install "doc/ranger.1" - libexec.install "ranger.py", "ranger" - bin.install_symlink libexec+"ranger.py" => "ranger" - doc.install "examples" - end - - test do - assert_match version.to_s, shell_output("script -q /dev/null #{bin}/ranger --version") - end -end diff --git a/Formula/rapidjson.rb b/Formula/rapidjson.rb deleted file mode 100644 index c8d353219368e..0000000000000 --- a/Formula/rapidjson.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Rapidjson < Formula - desc "JSON parser/generator for C++ with SAX and DOM style APIs" - homepage "https://miloyip.github.io/rapidjson/" - url "https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz" - sha256 "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e" - head "https://github.com/miloyip/rapidjson.git" - - bottle do - cellar :any_skip_relocation - sha256 "9871eeed683c9cb7198c00c87225dd44fc4b40dfa20be2301a63c034ecc221e2" => :mojave - sha256 "4f40efdbe80e8060d03cfcffdcb2e51d3e4d3924272c96825c6966e00a1ee2e2" => :high_sierra - sha256 "9fbe96e76e21457931a5e2fff343833b84941e2387ab02212946ad71665c3f6f" => :sierra - sha256 "d0b949a9bd043535e2ff3e032b45b26de0083d319bc094db7ccc1edfea6cbdb3" => :el_capitan - sha256 "252ec61e7d5cba129a888bb566d4f2b61bd1bd2886de637f48afa638e6764007" => :yosemite - sha256 "806e4c788a675bbb0cff3cc9af68f8cdf46ac3d5bf49a47a94b331cc67ca0f4d" => :mavericks - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system ENV.cxx, "#{share}/doc/RapidJSON/examples/capitalize/capitalize.cpp", "-o", "capitalize" - assert_equal '{"A":"B"}', pipe_output("./capitalize", '{"a":"b"}') - end -end diff --git a/Formula/raptor.rb b/Formula/raptor.rb deleted file mode 100644 index 1716b56666603..0000000000000 --- a/Formula/raptor.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Raptor < Formula - desc "RDF parser toolkit" - homepage "http://librdf.org/raptor/" - url "http://download.librdf.org/source/raptor2-2.0.15.tar.gz" - sha256 "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed" - - bottle do - cellar :any - sha256 "cbfcd2b8ce9fa8701a15eba572e766e3a9b3b19eba8438d41618e6ee3ab4501d" => :mojave - sha256 "194f9a66e1aeccb23185abd6f1f1408422594dfd54cad5460c5a5ac3f5e0c48c" => :high_sierra - sha256 "dba42ee8efa54c0b5722f0e12a7a585c2a9fe07a22aea6aec9124aaf09860f1d" => :sierra - sha256 "cc2feb9cd1d6f9eb0f511853f19c43bc96d143de6a73edfd3cdb854647d1d14a" => :el_capitan - sha256 "c23392012fb5edffbe800771eaee6ae81d288e62c477c27332474f2ed342d1b3" => :yosemite - sha256 "5e640e01d5cdd6899ca00704ba581358d254f7cfb9b81d62c901c825bb347681" => :mavericks - sha256 "940e3bdae54c820097a92bf9fded4761c9d0b070c2caae1bfbd051d33494e0f3" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/rargs.rb b/Formula/rargs.rb deleted file mode 100644 index 076821a8473f7..0000000000000 --- a/Formula/rargs.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Rargs < Formula - desc "Util like xargs + awk with pattern matching support" - homepage "https://github.com/lotabout/rargs" - url "https://github.com/lotabout/rargs/archive/v0.2.2.tar.gz" - sha256 "ac6cf3a31ff5b55f86487fa3d3266edf8f562cc6b548d6e636daf373534388ad" - - bottle do - sha256 "a0dbb61d5792ecd452df10508bd5f77deaa3d4f9657323410e93bd8a51b869bd" => :mojave - sha256 "bb71f94543dbd9859c33cc5e83cbec86894ca8239dd44339774e2efd0f121268" => :high_sierra - sha256 "c935e7e27e93f058e1bfe01f199bce5329670e33a4771e06b0fa059144a07f3b" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - assert_equal "abc", shell_output("echo abc,def | #{bin}/rargs -d, echo {1}").chomp - end -end diff --git a/Formula/rarian.rb b/Formula/rarian.rb deleted file mode 100644 index 3ecd3686bdda2..0000000000000 --- a/Formula/rarian.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Rarian < Formula - desc "Documentation metadata library" - homepage "https://rarian.freedesktop.org/" - url "https://rarian.freedesktop.org/Releases/rarian-0.8.1.tar.bz2" - sha256 "aafe886d46e467eb3414e91fa9e42955bd4b618c3e19c42c773026b205a84577" - - bottle do - sha256 "e727630f28efcdcb1a577f67525992f00a00c25ee1582277e1e91e2fa060187d" => :mojave - sha256 "815aafc0d05198cd4e3880715a6ad5de21b3bf47ccf25ef4b91aa918848a67ee" => :high_sierra - sha256 "9266addbd38ed67b7394d05702d2be69d44ccafeb8132ef75470a816614a9f8e" => :sierra - sha256 "7784dc13b95c0c2f5818bc3657da52f0365bbe9c6ddf8871d81b8638cb89390c" => :el_capitan - sha256 "069ff9e17c252271d058e72f38eedb2e1196cee49598e1537c64bd45b7f356e6" => :yosemite - sha256 "1a81d2fe1bb961b9b479da410046f24fa65df8db7cac5ee0853cc09f380f6bc4" => :mavericks - sha256 "a8ee74028d7921184683bb480d5ce823d834e9e0d36ede4c18c1d795ba138a2d" => :mountain_lion - end - - conflicts_with "scrollkeeper", - :because => "rarian and scrollkeeper install the same binaries." - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/rasqal.rb b/Formula/rasqal.rb deleted file mode 100644 index 1ae50c55c6e87..0000000000000 --- a/Formula/rasqal.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Rasqal < Formula - desc "RDF query library" - homepage "http://librdf.org/rasqal/" - url "http://download.librdf.org/source/rasqal-0.9.33.tar.gz" - sha256 "6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c" - - bottle do - cellar :any - sha256 "61669830b056a2d79757a38bdaa53ea52c6bb84e58dfcff75804252fa12c752e" => :mojave - sha256 "c9a39d850c71f2ffcc6d0368cb9f575df1a0bd727992dfb553baccc8ecec97ce" => :high_sierra - sha256 "8d57d6803a7323f9e13c45d56b3cea41f71f7dc7cab493ddf9b34d0a2a6b68f5" => :sierra - sha256 "fa7368eb30256eb80ead76f7b551bc5980ed15ae8aa655d332a200edb073c2a3" => :el_capitan - sha256 "c84ec1a4c837b4a30fe597c9cc728f5075764b87978c5977757e2836db3eca0b" => :yosemite - sha256 "8bef11d9b2763b72cb5576926bd251175c2b0c4c7dec6ffc666f98720341ba27" => :mavericks - sha256 "a7c5108c07f038e9fab347dea4c3f68f733d6115b852637a60192d06cf7c7eb2" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "raptor" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-html-dir=#{share}/doc", - "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/ratfor.rb b/Formula/ratfor.rb deleted file mode 100644 index bac0c42f082db..0000000000000 --- a/Formula/ratfor.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Ratfor < Formula - desc "Rational Fortran" - homepage "http://www.dgate.org/ratfor/" - url "http://www.dgate.org/ratfor/tars/ratfor-1.03.tar.gz" - sha256 "d77497cd0856aad43e0d122f04aef4965994b744f1af9ab1237d7cd6849d139c" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "1778a37f2498200cef410a1b208d1f21f591f909f13b566b139bb66f70734f88" => :mojave - sha256 "4a9b3b69f2eadb0023747734a5b1145717d3d776742eb555c35ae20edd0e5d59" => :high_sierra - sha256 "ab06a92daf0033b37df76b0a8f8b0191718017d1b7c629c1af82eca0117c8da2" => :sierra - sha256 "f6556cca206a70a3dca1ac897078cdbbe61be5c3b2c5e70e540b11998f8f0f5e" => :el_capitan - end - - depends_on "gcc" # for gfortran - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.r").write <<~EOS - integer x,y - x=1; y=2 - if(x == y) - write(6,600) - else if(x > y) - write(6,601) - else - write(6,602) - x=1 - while(x < 10){ - if(y != 2) break - if(y != 2) next - write(6,603)x - x=x+1 - } - repeat - x=x-1 - until(x == 0) - for(x=0; x < 10; x=x+1) - write(6,604)x - 600 format('Wrong, x != y') - 601 format('Also wrong, x < y') - 602 format('Ok!') - 603 format('x = ',i2) - 604 format('x = ',i2) - end - EOS - - system "#{bin}/ratfor", "-o", "test.f", testpath/"test.r" - system "gfortran", "test.f", "-o", "test" - system "./test" - end -end diff --git a/Formula/rats.rb b/Formula/rats.rb deleted file mode 100644 index 01a6fc2abdb98..0000000000000 --- a/Formula/rats.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rats < Formula - desc "Rough auditing tool for security" - homepage "https://security.web.cern.ch/security/recommendations/en/codetools/rats.shtml" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rough-auditing-tool-for-security/rats-2.4.tgz" - sha256 "2163ad111070542d941c23b98d3da231f13cf065f50f2e4ca40673996570776a" - - bottle do - sha256 "77244d885c0f203d64bd4054105310a797a9b44333bf4ef1f7b7cec63b0a163f" => :mojave - sha256 "6ae19bc72cfea62b56b83931f95a70f27ce9a13617026292861a272e22269135" => :high_sierra - sha256 "5f2a74a60c30a825ad036f390e3830346be4fe3299a28a81e25630d54defd119" => :sierra - sha256 "224ae02df998c8fc296bf3905fbc369a787fc55f5ef295d63f1b3c44bfee7a5d" => :el_capitan - sha256 "7c26f10919e103d7e57c232e0e07840ad309fd04878831c04829d70506767157" => :yosemite - sha256 "ab9d3469ecf24da07c80691cea41aa0266e85061ad3ddfec6cf65a0bd7c85acf" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}" - system "make", "install" - end - - test do - system "#{bin}/rats" - end -end diff --git a/Formula/rawgl.rb b/Formula/rawgl.rb deleted file mode 100644 index 9e4076beda8b7..0000000000000 --- a/Formula/rawgl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Rawgl < Formula - desc "Rewritten engine for Another World" - homepage "https://github.com/cyxx/rawgl" - url "https://github.com/cyxx/rawgl/archive/rawgl-0.2.1.tar.gz" - sha256 "da00d4abbc266e94c3755c2fd214953c48698826011b1d4afbebb99396240073" - head "https://github.com/cyxx/rawgl.git" - - bottle do - cellar :any - sha256 "97ce691b12b91ba6f948168e993fa04ec6ea18aad89d60dd40754d2554649ef0" => :high_sierra - sha256 "73791cd66afb8da8c36bfcec4ffda39fbd4db8bf94e5112dff8bda46462c3365" => :sierra - sha256 "83711f3b4e919fbe21d02221356ad3e0108ee00739c699eb1acf79f2be8b6b18" => :el_capitan - sha256 "b453fd2cf86a0299e372222942500f0b816165218ce0dec1726e0be493cf77c9" => :yosemite - end - - depends_on "sdl2" - depends_on "sdl2_mixer" - - def install - system "make" - bin.install "rawgl" - end - - test do - system bin/"rawgl", "--help" - end -end diff --git a/Formula/rawtoaces.rb b/Formula/rawtoaces.rb deleted file mode 100644 index cda73ca4991b7..0000000000000 --- a/Formula/rawtoaces.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rawtoaces < Formula - desc "RAW to ACES Utility" - homepage "https://github.com/ampas/rawtoaces" - url "https://github.com/ampas/rawtoaces/archive/v1.0.tar.gz" - sha256 "9d15e7e30c4fe97baedfdafb5fddf95534eee26392002b23e81649bbe6e501e9" - revision 3 - - bottle do - sha256 "35b1c3038fc3ac5f2afa237a02b0de3215fd0b5fd6ddc98e4efda984e2f8cf31" => :mojave - sha256 "2dc85c4d307896a2db9e4ed9458f4f9c002d75d1799969c9b81f1d6ccfb8eb99" => :high_sierra - sha256 "59cc3b6b51f62226c3de9329a336789401ab060126d5bc7d11aebc666acdeb1d" => :sierra - sha256 "a6f274bcb805bca7ba760d7c194d82bca3b900f4b4196e317f240737ce59f015" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "aces_container" - depends_on "boost" - depends_on "ceres-solver" - depends_on "ilmbase" - depends_on "libraw" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - assert_match "Day-light (e.g., D60, D6025)", shell_output("#{bin}/rawtoaces --valid-illums").strip - end -end diff --git a/Formula/raylib.rb b/Formula/raylib.rb deleted file mode 100644 index df15116538d2b..0000000000000 --- a/Formula/raylib.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Raylib < Formula - desc "Simple and easy-to-use library to learn videogames programming" - homepage "https://www.raylib.com/" - url "https://github.com/raysan5/raylib/archive/2.0.0.tar.gz" - sha256 "d3b476b55cedcbcff49ecf96d262748e0bf17fd7c2d2f375ee781d409c2535f4" - head "https://github.com/raysan5/raylib.git", :branch => "master" - - bottle do - cellar :any - sha256 "c451ee1f669fe0b652cf86c47a584f26c5cb7bc7094de8e7cedc2992a126891f" => :mojave - sha256 "f2720058881ff3ea1c53feaf9b2a954c13bd5d7697f5cb324898c1803d88c69c" => :high_sierra - sha256 "ba91ed78b312bd752e8e38277d541a1a986e698c2f4db1c47b821c33a7fd35c3" => :sierra - sha256 "d8bf72a0f03c6582159646b17b10033a7d5256f391320d0491766479bade250e" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DSTATIC_RAYLIB=ON", - "-DSHARED_RAYLIB=ON", - "-DMACOS_FATLIB=OFF", - "-DBUILD_EXAMPLES=OFF", - "-DBUILD_GAMES=OFF", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main(void) - { - int num = GetRandomValue(42, 1337); - return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lraylib", "-o", "test" - system "./test" - end -end diff --git a/Formula/rbenv-aliases.rb b/Formula/rbenv-aliases.rb deleted file mode 100644 index fa86c618cf0f5..0000000000000 --- a/Formula/rbenv-aliases.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvAliases < Formula - desc "Make aliases for Ruby versions" - homepage "https://github.com/tpope/rbenv-aliases" - url "https://github.com/tpope/rbenv-aliases/archive/v1.1.0.tar.gz" - sha256 "12e89bc4499e85d8babac2b02bc8b66ceb0aa3f8047b26728a3eca8a6030273d" - revision 1 - head "https://github.com/tpope/rbenv-aliases.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "autoalias.bash", shell_output("rbenv hooks install") - end -end diff --git a/Formula/rbenv-binstubs.rb b/Formula/rbenv-binstubs.rb deleted file mode 100644 index 45d3e92cd2f9e..0000000000000 --- a/Formula/rbenv-binstubs.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvBinstubs < Formula - desc "Make rbenv aware of bundler binstubs" - homepage "https://github.com/ianheggie/rbenv-binstubs" - url "https://github.com/ianheggie/rbenv-binstubs/archive/v1.5.tar.gz" - sha256 "305000b8ba5b829df1a98fc834b7868b9e817815c661f429b0e28c1f613f4d0c" - revision 1 - head "https://github.com/ianheggie/rbenv-binstubs.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "rbenv-binstubs.bash", shell_output("rbenv hooks exec") - end -end diff --git a/Formula/rbenv-bundle-exec.rb b/Formula/rbenv-bundle-exec.rb deleted file mode 100644 index 057b6cf9d3093..0000000000000 --- a/Formula/rbenv-bundle-exec.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvBundleExec < Formula - desc "Integrate rbenv and bundler" - homepage "https://github.com/maljub01/rbenv-bundle-exec" - url "https://github.com/maljub01/rbenv-bundle-exec/archive/v1.0.0.tar.gz" - sha256 "2da08cbb1d8edecd1bcf68005d30e853f6f948c54ddb07bada67762032445cf3" - revision 1 - head "https://github.com/maljub01/rbenv-bundle-exec.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "bundle-exec.bash", shell_output("rbenv hooks exec") - end -end diff --git a/Formula/rbenv-bundler-ruby-version.rb b/Formula/rbenv-bundler-ruby-version.rb deleted file mode 100644 index 22a2ef2508297..0000000000000 --- a/Formula/rbenv-bundler-ruby-version.rb +++ /dev/null @@ -1,21 +0,0 @@ -class RbenvBundlerRubyVersion < Formula - desc "Pick a ruby version from bundler's Gemfile" - homepage "https://github.com/aripollak/rbenv-bundler-ruby-version" - url "https://github.com/aripollak/rbenv-bundler-ruby-version/archive/v1.0.0.tar.gz" - sha256 "96c6b7eb191d436142fef0bb8c28071d54aca3e1a10ca01a525d1066699b03f2" - revision 1 - head "https://github.com/aripollak/rbenv-bundler-ruby-version.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - (testpath/"Gemfile").write("ruby \"2.1.5\"") - system "rbenv", "bundler-ruby-version" - end -end diff --git a/Formula/rbenv-bundler.rb b/Formula/rbenv-bundler.rb deleted file mode 100644 index c871bbff9bbf2..0000000000000 --- a/Formula/rbenv-bundler.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvBundler < Formula - desc "Makes shims aware of bundle install paths" - homepage "https://github.com/carsomyr/rbenv-bundler" - url "https://github.com/carsomyr/rbenv-bundler/archive/1.00.tar.gz" - sha256 "84f5456b1ac8ea4554db8fa17c99b5f5d2eafcd647f85088a5d36e805c092ba7" - revision 1 - head "https://github.com/carsomyr/rbenv-bundler.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "bundler.bash", shell_output("rbenv hooks exec") - end -end diff --git a/Formula/rbenv-chefdk.rb b/Formula/rbenv-chefdk.rb deleted file mode 100644 index a5c9d6fdb4077..0000000000000 --- a/Formula/rbenv-chefdk.rb +++ /dev/null @@ -1,22 +0,0 @@ -class RbenvChefdk < Formula - desc "Treat ChefDK as another version in rbenv" - homepage "https://github.com/docwhat/rbenv-chefdk" - url "https://github.com/docwhat/rbenv-chefdk/archive/v1.0.0.tar.gz" - sha256 "79b48257f1a24085a680da18803ba6a94a1dd0cb25bd390629006a5fb67f3b69" - revision 1 - head "https://github.com/docwhat/rbenv-chefdk.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "rbenv-chefdk.bash", shell_output("rbenv hooks exec") - assert_match "rbenv-chefdk.bash", shell_output("rbenv hooks rehash") - assert_match "rbenv-chefdk.bash", shell_output("rbenv hooks which") - end -end diff --git a/Formula/rbenv-communal-gems.rb b/Formula/rbenv-communal-gems.rb deleted file mode 100644 index 86b9d9f663bec..0000000000000 --- a/Formula/rbenv-communal-gems.rb +++ /dev/null @@ -1,19 +0,0 @@ -class RbenvCommunalGems < Formula - desc "Share gems across multiple rbenv Ruby installs" - homepage "https://github.com/tpope/rbenv-communal-gems" - url "https://github.com/tpope/rbenv-communal-gems/archive/v1.0.1.tar.gz" - sha256 "99f1c0be6721e25037f964015cbd2622d70603ceeeaef58f040410ac3697d766" - revision 1 - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "communal-gems.bash", shell_output("rbenv hooks install") - end -end diff --git a/Formula/rbenv-ctags.rb b/Formula/rbenv-ctags.rb deleted file mode 100644 index d242d5e4ab92b..0000000000000 --- a/Formula/rbenv-ctags.rb +++ /dev/null @@ -1,21 +0,0 @@ -class RbenvCtags < Formula - desc "Automatically generate ctags for rbenv Ruby stdlibs" - homepage "https://github.com/tpope/rbenv-ctags" - url "https://github.com/tpope/rbenv-ctags/archive/v1.0.2.tar.gz" - sha256 "94b38c277a5de3f53aac0e7f4ffacf30fb6ddeb31c0597c1bcd78b0175c86cbe" - revision 1 - head "https://github.com/tpope/rbenv-ctags.git" - - bottle :unneeded - - depends_on "ctags" - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "ctags.bash", shell_output("rbenv hooks install") - end -end diff --git a/Formula/rbenv-default-gems.rb b/Formula/rbenv-default-gems.rb deleted file mode 100644 index 6a597a3c63fe6..0000000000000 --- a/Formula/rbenv-default-gems.rb +++ /dev/null @@ -1,26 +0,0 @@ -class RbenvDefaultGems < Formula - desc "Auto-installs gems for Ruby installs" - homepage "https://github.com/sstephenson/rbenv-default-gems" - url "https://github.com/sstephenson/rbenv-default-gems/archive/v1.0.0.tar.gz" - sha256 "8271d58168ab10f0ace285dc4c394e2de8f2d1ccc24032e6ed5924f38dc24822" - revision 1 - head "https://github.com/sstephenson/rbenv-default-gems.git" - - bottle :unneeded - - depends_on "rbenv" - - # Upstream patch: https://github.com/sstephenson/rbenv-default-gems/pull/3 - patch do - url "https://github.com/sstephenson/rbenv-default-gems/commit/ead67889c91c53ad967f85f5a89d986fdb98f6fb.diff?full_index=1" - sha256 "eb334375bf0adbeaacdce58ba8b5fd3021258ff7dfdde3dd6683ccd731603ba0" - end - - def install - prefix.install Dir["*"] - end - - test do - assert_match "default-gems.bash", shell_output("rbenv hooks install") - end -end diff --git a/Formula/rbenv-gemset.rb b/Formula/rbenv-gemset.rb deleted file mode 100644 index 093b0422057ae..0000000000000 --- a/Formula/rbenv-gemset.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvGemset < Formula - desc "Adds basic gemset support to rbenv" - homepage "https://github.com/jf/rbenv-gemset" - url "https://github.com/jf/rbenv-gemset/archive/v0.5.9.tar.gz" - sha256 "856aa45ce1e9ac56d476667e2ca58f5f312600879fec4243073edc88a41954da" - revision 1 - head "https://github.com/jf/rbenv-gemset.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "gemset.bash", shell_output("rbenv hooks exec") - end -end diff --git a/Formula/rbenv-use.rb b/Formula/rbenv-use.rb deleted file mode 100644 index 53c7de2d55a25..0000000000000 --- a/Formula/rbenv-use.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvUse < Formula - desc "Switch between rubies without reference to patch levels" - homepage "https://github.com/rkh/rbenv-use" - url "https://github.com/rkh/rbenv-use/archive/v1.0.0.tar.gz" - sha256 "f831dc9b8a43e30499e62928d13f5d354bf4c505b3f6b7fc1a1a9956ed9e538c" - revision 1 - - bottle :unneeded - - depends_on "rbenv" - depends_on "rbenv-whatis" - - def install - prefix.install Dir["*"] - end - - test do - shell_output("eval \"$(rbenv init -)\" && rbenv use system") - end -end diff --git a/Formula/rbenv-vars.rb b/Formula/rbenv-vars.rb deleted file mode 100644 index b0ee93b94be96..0000000000000 --- a/Formula/rbenv-vars.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RbenvVars < Formula - desc "Safely sets global and per-project environment variables" - homepage "https://github.com/sstephenson/rbenv-vars" - url "https://github.com/sstephenson/rbenv-vars/archive/v1.2.0.tar.gz" - sha256 "9e6a5726aad13d739456d887a43c220ba9198e672b32536d41e884c0a54b4ddb" - revision 1 - head "https://github.com/sstephenson/rbenv-vars.git" - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - assert_match "rbenv-vars.bash", shell_output("rbenv hooks exec") - end -end diff --git a/Formula/rbenv-whatis.rb b/Formula/rbenv-whatis.rb deleted file mode 100644 index 324fe6e4e41e6..0000000000000 --- a/Formula/rbenv-whatis.rb +++ /dev/null @@ -1,19 +0,0 @@ -class RbenvWhatis < Formula - desc "Resolves abbreviations and aliases to Ruby versions" - homepage "https://github.com/rkh/rbenv-whatis" - url "https://github.com/rkh/rbenv-whatis/archive/v1.0.0.tar.gz" - sha256 "1a09f824d1dcbca360565930fa66e93a9a2840c1bb45935e2ee989ce57d1f6e6" - revision 1 - - bottle :unneeded - - depends_on "rbenv" - - def install - prefix.install Dir["*"] - end - - test do - system "rbenv", "whatis", "2.0" - end -end diff --git a/Formula/rbenv.rb b/Formula/rbenv.rb deleted file mode 100644 index ac3291dd2f50f..0000000000000 --- a/Formula/rbenv.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Rbenv < Formula - desc "Ruby version manager" - homepage "https://github.com/rbenv/rbenv#readme" - url "https://github.com/rbenv/rbenv/archive/v1.1.1.tar.gz" - sha256 "41f1a60714c55eceb21d692a469aee1ec4f46bba351d0dfcb0c660ff9cf1a1c9" - head "https://github.com/rbenv/rbenv.git" - - bottle do - cellar :any - rebuild 2 - sha256 "67f0becc3ef010f3b4f489d9ff852ff28988b18b968281c73a84892c7e26ec8f" => :mojave - sha256 "faaede99c2b74417be708883586777c4b0747cdfc691aec10776682e31585083" => :high_sierra - sha256 "39825fd08255d27551e9154d16691477cfecb3be52acf627d29986b4c8c0b87f" => :sierra - end - - depends_on "ruby-build" - - def install - inreplace "libexec/rbenv" do |s| - s.gsub! '"${BASH_SOURCE%/*}"/../libexec', libexec - if HOMEBREW_PREFIX.to_s != "/usr/local" - s.gsub! ":/usr/local/etc/rbenv.d", ":#{HOMEBREW_PREFIX}/etc/rbenv.d\\0" - end - end - - # Compile optional bash extension. - system "src/configure" - system "make", "-C", "src" - - if build.head? - # Record exact git revision for `rbenv --version` output - git_revision = `git rev-parse --short HEAD`.chomp - inreplace "libexec/rbenv---version", /^(version=)"([^"]+)"/, - %Q(\\1"\\2-g#{git_revision}") - end - - prefix.install ["bin", "completions", "libexec", "rbenv.d"] - end - - test do - shell_output("eval \"$(#{bin}/rbenv init -)\" && rbenv versions") - end -end diff --git a/Formula/rbspy.rb b/Formula/rbspy.rb deleted file mode 100644 index ab3f692ad7395..0000000000000 --- a/Formula/rbspy.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Rbspy < Formula - desc "Sampling profiler for Ruby" - homepage "https://rbspy.github.io/" - url "https://github.com/rbspy/rbspy/archive/v0.3.3.tar.gz" - sha256 "15b8c43f3071e5ae5dad4920cbd6a743b8d6c64e0bc90e1ebe86db2fd79fb3e5" - - bottle do - sha256 "a1e2f114f1143a82dacccaf2e072bfd5b50d43db1420f04e3e38f9f617e07234" => :mojave - sha256 "0fd3bc691b0cfaa3633b4ea64394baccfe44f106de184a4547d520acf66dcd01" => :high_sierra - sha256 "5a474af2c4275cb7acfde17647cfc21ceb713ebe5b49f5d586e9c4d02bf3c39c" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - recording = <<~EOS - H4sICCOlhlsAA2JyZXdfdGVzdF9yZXN1bHQAvdHBCsIwDAbgu08hOQ/nHKgM8S08iYy0Vlds0 - 5J2Dhl7d3eZTNxN8Rb4yf9BwiL4xzKbtRAZpYLi2AKh7QfYyfmlJhm1oz0kwMpg1HdVeoxVH9 - d0I9dQn6AIztRxSKg2JgGjSZGDYtklr0ZEnCgKleNYenZXRrtg8dkI6SEoDmnlrEoFqyYNaL1 - R70uDuBqJQogpcWL7K3I9IqWU/yCz8WF3FvXkk37P5t0pAa/PUOTbfLvpZk/I+tcWQgIAAA== - EOS - - (testpath/"recording.gz").write Base64.decode64(recording.delete("\n")) - system "#{bin}/rbspy", "report", "-f", "summary", "-i", "recording.gz", - "-o", "result" - - expected_result = "100.00 100.00 aaa - short_program.rb" - assert_includes File.read("result"), expected_result - end -end diff --git a/Formula/rc.rb b/Formula/rc.rb deleted file mode 100644 index d105d196b6e78..0000000000000 --- a/Formula/rc.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Rc < Formula - desc "Implementation of the AT&T Plan 9 shell" - homepage "http://doc.cat-v.org/plan_9/4th_edition/papers/rc" - url "ftp://rc.quanstro.net/pub/rc-1.7.2.tgz" - mirror "https://dl.bintray.com/homebrew/mirror/rc-1.7.2.tgz" - sha256 "89487c6c9f5ad0fdae658bf9564f6e920935bbdeabf63abdbf69b7c46f7ee40c" - - bottle do - cellar :any_skip_relocation - sha256 "e87e512d2d6b4e3619cd16c644ced658611799e123b82c39106ea97c29412a90" => :mojave - sha256 "0ad08319f2f791cbb7fe5a15bc13cea4fe3a30871f682a6562e0e38c499443dd" => :high_sierra - sha256 "0dd69cd7b8cf4e9c7f0baaeeaa7d64393e192a2e38d798de7869b6f8efcca446" => :sierra - sha256 "34b3426f92ff6b50490a479cb55473e227b67351a853e8627c8e487b4fe21989" => :el_capitan - sha256 "1628bbad2fa8417318ee488a748a1ae769606baf950300c895e4592cbe013edf" => :yosemite - sha256 "6cd2807091b6e1e8359ebedab8d211f00d0ac84825f16d116bd4500c6dd5b3f4" => :mavericks - sha256 "c09ab4ed5d45ef028bb235e246e32b7e5d0603952a7c9e068ba64faf78e16cf1" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-editline" - system "make" - system "make", "install" - end - - test do - system "#{bin}/rc", "-c", "echo Hello!" - end -end diff --git a/Formula/rclone.rb b/Formula/rclone.rb deleted file mode 100644 index 607baf5676720..0000000000000 --- a/Formula/rclone.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Rclone < Formula - desc "Rsync for cloud storage" - homepage "https://rclone.org/" - url "https://github.com/ncw/rclone/archive/v1.45.tar.gz" - sha256 "7cfe20990fa88be5a3883e2d8059e67244032a7db46414370643eecb86fe1b58" - head "https://github.com/ncw/rclone.git" - - bottle do - cellar :any_skip_relocation - sha256 "2d688040236552dfb6ac3196b38b1e254d6450b2f966fe740e748285fde77729" => :mojave - sha256 "51df98d326f54620041e89f2a4fec369d6d4c7688911336a49132debb1794905" => :high_sierra - sha256 "d9109f2ed0a5a013f002db9b066a46fea1e117a01037f52277d9ba4250f1f237" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - mkdir_p buildpath/"src/github.com/ncw/" - ln_s buildpath, buildpath/"src/github.com/ncw/rclone" - system "go", "build", "-o", bin/"rclone" - man1.install "rclone.1" - system bin/"rclone", "genautocomplete", "bash", "rclone.bash" - system bin/"rclone", "genautocomplete", "zsh", "_rclone" - bash_completion.install "rclone.bash" => "rclone" - zsh_completion.install "_rclone" - end - - test do - (testpath/"file1.txt").write "Test!" - system "#{bin}/rclone", "copy", testpath/"file1.txt", testpath/"dist" - assert_match File.read(testpath/"file1.txt"), File.read(testpath/"dist/file1.txt") - end -end diff --git a/Formula/rcs.rb b/Formula/rcs.rb deleted file mode 100644 index 92ae8feb59585..0000000000000 --- a/Formula/rcs.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Rcs < Formula - desc "GNU revision control system" - homepage "https://www.gnu.org/software/rcs/" - url "https://ftp.gnu.org/gnu/rcs/rcs-5.9.4.tar.xz" - mirror "https://ftpmirror.gnu.org/rcs/rcs-5.9.4.tar.xz" - sha256 "063d5a0d7da1821754b80c639cdae2c82b535c8ff4131f75dc7bbf0cd63a5dff" - revision 1 - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f24fb3b2f14d19bf02bc5b4c325f7735ec4657b43fac8e6a8a7e6a2e5551851c" => :mojave - sha256 "f43c9160cbc605578af4473892f71f733dc05a9ab836d280400acece9cb75708" => :high_sierra - sha256 "f082af49e1b1570892fa76b91bed0246e9ad63e59f953e0388b20dbf55edc485" => :sierra - sha256 "4681c5fae05b4f4b267a9bccc9032de2b216437105d591ec5de7a10ca31e0441" => :el_capitan - end - - # Fixes use of _Noreturn attribute - # This patch is a commit from the upstream git repo; will be in the next release. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3fff7c990b8df4174045834b9c1210e7736ff5a4/rcs/noreturn.patch" - sha256 "ac2f5ad1df932361e19c6184d2dfddfbe7664184ac4c24a3224c85707cd4da9f" - end - - if MacOS.version >= :high_sierra - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/b76d1e48dac/editors/nano/files/secure_snprintf.patch" - sha256 "57f972940a10d448efbd3d5ba46e65979ae4eea93681a85e1d998060b356e0d2" - end - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"merge", "--version" - end -end diff --git a/Formula/rdate.rb b/Formula/rdate.rb deleted file mode 100644 index 397e2df95684b..0000000000000 --- a/Formula/rdate.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Rdate < Formula - desc "Set the system's date from a remote host" - homepage "https://www.aelius.com/njh/rdate/" - url "https://www.aelius.com/njh/rdate/rdate-1.5.tar.gz" - sha256 "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2d4c93b21caa56d3228d8ff2ff790f4142421ad6316cd74d77c568e84602a996" => :mojave - sha256 "02e41a79e9aca3bad86802e1bc32c7148e8a2ea2f410c57765f9e9d8b2686fd1" => :high_sierra - sha256 "9f4a6300d6d3ebc9034abeb5388fd40face1f286a7b97610b6a40a1dcdf166b5" => :sierra - sha256 "acb2ae5951a0f32cbdce39e02d86c63cdb85b41fd02aff74aac6ea4939d71d8d" => :el_capitan - sha256 "553782017635be9c8d80bbf6fd033f294cddcb427a2d83fe82af8c069c60867f" => :yosemite - sha256 "3a36b6feccd119c90db3373a3de1b67f4aa03fc72aacdf7b11165b538206ae14" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - # note that the server must support RFC 868 - system "#{bin}/rdate", "-p", "-t", "10", "ptbtime1.ptb.de" - end -end diff --git a/Formula/rdesktop.rb b/Formula/rdesktop.rb deleted file mode 100644 index 8c3c52a50b0c8..0000000000000 --- a/Formula/rdesktop.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Rdesktop < Formula - desc "UNIX client for connecting to Windows Remote Desktop Services" - homepage "https://www.rdesktop.org/" - url "https://downloads.sourceforge.net/project/rdesktop/rdesktop/1.8.3/rdesktop-1.8.3.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/r/rdesktop/rdesktop_1.8.3.orig.tar.gz" - sha256 "88b20156b34eff5f1b453f7c724e0a3ff9370a599e69c01dc2bf0b5e650eece4" - revision 1 - - bottle do - sha256 "9a0d85e617805161eb6f06359a8c72af0d6b45d6316986307ad036022d8ff8d8" => :mojave - sha256 "d43503deba0816e2290a9ef69a0e618015c003421f0ba60af24e83e1a62b5316" => :high_sierra - sha256 "9a8e06ed924645367b0dbb7e1668ce0925746c6e88a7bc0bc0fb184c0b955461" => :sierra - end - - depends_on "openssl" - depends_on :x11 - - # Note: The patch below is meant to remove the reference to the - # undefined symbol SCARD_CTL_CODE. - # upstream bug report: https://sourceforge.net/p/rdesktop/bugs/352/ - patch :DATA - - def install - args = %W[ - --prefix=#{prefix} - --disable-credssp - --enable-smartcard - --with-openssl=#{Formula["openssl"].opt_prefix} - --x-includes=#{MacOS::X11.include} - --x-libraries=#{MacOS::X11.lib} - ] - - system "./configure", *args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/rdesktop -help 2>&1", 64) - end -end - -__END__ -diff --git a/scard.c b/scard.c -index caa0745..5521ee9 100644 ---- a/scard.c -+++ b/scard.c -@@ -2152,7 +2152,6 @@ TS_SCardControl(STREAM in, STREAM out) - { - /* Translate to local encoding */ - dwControlCode = (dwControlCode & 0x3ffc) >> 2; -- dwControlCode = SCARD_CTL_CODE(dwControlCode); - } - else - { -@@ -2198,7 +2197,7 @@ TS_SCardControl(STREAM in, STREAM out) - } - - #ifdef PCSCLITE_VERSION_NUMBER -- if (dwControlCode == SCARD_CTL_CODE(3400)) -+ if (0) - { - int i; - SERVER_DWORD cc; diff --git a/Formula/rdfind.rb b/Formula/rdfind.rb deleted file mode 100644 index 6b71cdc510f04..0000000000000 --- a/Formula/rdfind.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rdfind < Formula - desc "Find duplicate files based on content (NOT file names)" - homepage "https://rdfind.pauldreik.se/" - url "https://rdfind.pauldreik.se/rdfind-1.3.5.tar.gz" - sha256 "c36e0a1ea35b06ddf1d3d499de4c2e4287984ae47c44a8512d384ecea970c344" - - bottle do - cellar :any - sha256 "ca83f17309001b90efbfbf1680d01632def8b5c6827b81f60f1bd64941af37d4" => :mojave - sha256 "f9cf95ddb7039e4e1a9afcf84e92cb3abdcdcd8e95d9db1862a363b4399f5ea2" => :high_sierra - sha256 "6e47f48f21af1db473c225fa8bb48682b865fd150fcc4794b0cc5e463cbbd73a" => :sierra - sha256 "bd9e2a6f1c907f7032df5929b2d5b8ac8394cd3f54c6f0b0d72b753c212b519d" => :el_capitan - end - - depends_on "nettle" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - mkdir "folder" - touch "folder/file1" - touch "folder/file2" - system "#{bin}/rdfind", "-deleteduplicates", "true", "-ignoreempty", "false", "folder" - assert_predicate testpath/"folder/file1", :exist? - refute_predicate testpath/"folder/file2", :exist? - end -end diff --git a/Formula/rdiff-backup.rb b/Formula/rdiff-backup.rb deleted file mode 100644 index 450296b310042..0000000000000 --- a/Formula/rdiff-backup.rb +++ /dev/null @@ -1,44 +0,0 @@ -class RdiffBackup < Formula - desc "Backs up one directory to another--also works over networks" - homepage "https://www.nongnu.org/rdiff-backup/" - url "https://savannah.nongnu.org/download/rdiff-backup/rdiff-backup-1.2.8.tar.gz" - sha256 "0d91a85b40949116fa8aaf15da165c34a2d15449b3cbe01c8026391310ac95db" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "76ac2c10776a2dcb230f07b95704c65522cae20865a9bf4e4772c86b94673bda" => :mojave - sha256 "899687c88770af610d76f66f02da736a2a62ac4676f0f80796dbbae1d92bc47f" => :high_sierra - sha256 "7dcf4c878ccafc113e5742c83214f946dd3a55b472e086a944e918bcee1cf2bd" => :sierra - sha256 "f06f79bc1536dbaa990e6005565f18de05e9dc12deb09701a504ab6bfc8b8f11" => :el_capitan - sha256 "35f6a0f726a680d639f7a1c83af8e27d046d5a68a334bf19d47eaa363748767c" => :yosemite - sha256 "5b0eab2335afe2d298cd51737c744d052536cb0bdbee780819496e1000a3b179" => :mavericks - end - - depends_on "librsync" - - # librsync 1.x support - patch do - url "https://git.archlinux.org/svntogit/community.git/plain/trunk/rdiff-backup-1.2.8-librsync-1.0.0.patch?h=packages/rdiff-backup" - mirror "https://src.fedoraproject.org/cgit/rpms/rdiff-backup.git/plain/rdiff-backup-1.2.8-librsync-1.0.0.patch" - sha256 "a00d993d5ffea32d58a73078fa20c90c1c1c6daa0587690cec0e3da43877bf12" - end - - def install - # Find the arch for the Python we are building against. - # We remove 'ppc' support, so we can pass Intel-optimized CFLAGS. - archs = archs_for_command("python") - archs.remove_ppc! - ENV["ARCHFLAGS"] = archs.as_arch_flags - system "python", "setup.py", "--librsync-dir=#{prefix}", "build" - libexec.install Dir["build/lib.macosx*/rdiff_backup"] - libexec.install Dir["build/scripts-*/*"] - man1.install Dir["*.1"] - bin.install_symlink Dir["#{libexec}/rdiff-backup*"] - end - - test do - system "#{bin}/rdiff-backup", "--version" - end -end diff --git a/Formula/rds-command-line-tools.rb b/Formula/rds-command-line-tools.rb deleted file mode 100644 index a359cf67a27f8..0000000000000 --- a/Formula/rds-command-line-tools.rb +++ /dev/null @@ -1,39 +0,0 @@ -class RdsCommandLineTools < Formula - desc "Amazon RDS command-line toolkit" - homepage "https://aws.amazon.com/developertools/2928" - url "https://s3.amazonaws.com/rds-downloads/RDSCli-1.19.004.zip" - sha256 "298c15ccd04bd91f1be457645d233455364992e7dd27e09c48230fbc20b5950c" - - bottle :unneeded - - depends_on :java - - def install - env = Language::Java.java_home_env.merge(:AWS_RDS_HOME => libexec) - rm Dir["bin/*.cmd"] # Remove Windows versions - etc.install "credential-file-path.template" - libexec.install Dir["*"] - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - basename = file.basename - next if basename.to_s == "service" - (bin/basename).write_env_script file, env - end - end - - def caveats - <<~EOS - Before you can use these tools you must export a variable to your $SHELL. - export AWS_CREDENTIAL_FILE="" - - To check that your setup works properly, run the following command: - rds-describe-db-instances --headers - You should see a header line. If you have database instances already configured, - you will see a description line for each database instance. - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/rds-version") - end -end diff --git a/Formula/rdup.rb b/Formula/rdup.rb deleted file mode 100644 index 27862b09b7e0d..0000000000000 --- a/Formula/rdup.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Rdup < Formula - desc "Utility to create a file list suitable for making backups" - homepage "https://github.com/miekg/rdup" - url "https://github.com/miekg/rdup/archive/1.1.15.tar.gz" - sha256 "787b8c37e88be810a710210a9d9f6966b544b1389a738aadba3903c71e0c29cb" - head "https://github.com/miekg/rdup.git" - - bottle do - cellar :any - sha256 "c198ebca564d97de07f9571c296c93239a58dbc195648e9c6eb25e5ba8c363e5" => :mojave - sha256 "9a5c191bea14d721e49d5622567104e6fc1b6e6c3326e528ba8a08498fb66c46" => :high_sierra - sha256 "43582c3cc5fb02bb50a73d71963045fa27cc38d03eed2e1e57d915a7f5c162cc" => :sierra - sha256 "c9afd06e3d3cfb9628c9618723d1913916f2563d2b18159cffe2b2586ce0c508" => :el_capitan - sha256 "0b83116666ac22439d46a6d92f6d75eb3dd7f231021dbc441c2388b4bd076e00" => :yosemite - sha256 "ddfd0b0a7116c618739caffb054a0b149e17c7bf517c512ccb1543c3e7784275" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libarchive" - depends_on "mcrypt" - depends_on "nettle" - depends_on "pcre" - - def install - system "autoreconf", "-fiv" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - # tell rdup to archive itself, then let rdup-tr make a tar archive of it, - # and test with tar and grep whether the resulting tar archive actually - # contains rdup - system "#{bin}/rdup /dev/null #{bin}/rdup | #{bin}/rdup-tr -O tar | tar tvf - | grep #{bin}/rdup" - end -end diff --git a/Formula/re2.rb b/Formula/re2.rb deleted file mode 100644 index 767d63f286d3d..0000000000000 --- a/Formula/re2.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Re2 < Formula - desc "Alternative to backtracking PCRE-style regular expression engines" - homepage "https://github.com/google/re2" - url "https://github.com/google/re2/archive/2019-01-01.tar.gz" - version "20190101" - sha256 "bee07121ce72ce10ccacb84e49b29d091ca18d5d14d950ab7c4657a0903655db" - head "https://github.com/google/re2.git" - - bottle do - cellar :any - sha256 "ef1c527710b87745d31df96a05671748c1a377f7936e94304b64fa7b7e7cd9e6" => :mojave - sha256 "9d20a6689393ac73019a22b67c8b1fae6c40affeab7ce90d0db631e0f2a88fbb" => :high_sierra - sha256 "06a90d1d8bfcab9a86323fc00034057cef39c66077f06664009f6eeb57cef44c" => :sierra - end - - needs :cxx11 - - def install - ENV.cxx11 - - system "make", "install", "prefix=#{prefix}" - MachO::Tools.change_dylib_id("#{lib}/libre2.0.0.0.dylib", "#{lib}/libre2.0.dylib") - lib.install_symlink "libre2.0.0.0.dylib" => "libre2.0.dylib" - lib.install_symlink "libre2.0.0.0.dylib" => "libre2.dylib" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - assert(!RE2::FullMatch("hello", "e")); - assert(RE2::PartialMatch("hello", "e")); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "-I#{include}", "-L#{lib}", "-lre2", - "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/re2c.rb b/Formula/re2c.rb deleted file mode 100644 index 131ccd9bdeeca..0000000000000 --- a/Formula/re2c.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Re2c < Formula - desc "Generate C-based recognizers from regular expressions" - homepage "http://re2c.org" - url "https://github.com/skvadrik/re2c/releases/download/1.1.1/re2c-1.1.1.tar.gz" - sha256 "856597337ea00b24ce91f549f79e6eece1b92ba5f8b63292cad66c14ac7451cf" - - bottle do - cellar :any_skip_relocation - sha256 "51b7b472896a0469a279710ba252ad175ae0879a1a2df5b01af3483d27b2b2ab" => :mojave - sha256 "acb0d0eebcc5bdc18571a551c9e8bb9bf01a60e0fa97b6ca29773059e9bcceec" => :high_sierra - sha256 "e1809196ec0d125c664e46404a7aae0ec8a2c778e1e1db7036f75a772d62edee" => :sierra - sha256 "3c419cef2ce49afffa70662ce865bbde4f58844cf9752ccb1390c10c9e47a2d1" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - unsigned int stou (const char * s) - { - # define YYCTYPE char - const YYCTYPE * YYCURSOR = s; - unsigned int result = 0; - - for (;;) - { - /*!re2c - re2c:yyfill:enable = 0; - - "\x00" { return result; } - [0-9] { result = result * 10 + c; continue; } - */ - } - } - EOS - system bin/"re2c", "-is", testpath/"test.c" - end -end diff --git a/Formula/react-native-cli.rb b/Formula/react-native-cli.rb deleted file mode 100644 index 5b758696f9aed..0000000000000 --- a/Formula/react-native-cli.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class ReactNativeCli < Formula - desc "The React Native CLI tools" - homepage "https://facebook.github.io/react-native/" - url "https://registry.npmjs.org/react-native-cli/-/react-native-cli-2.0.1.tgz" - sha256 "f1039232c86c29fa0b0c85ad2bfe0ff455c3d3cd9af9d9ddb8e9c560231a8322" - - bottle do - cellar :any_skip_relocation - sha256 "8e6e253c7801cc276f89f2988245866080c1409602c5903dbb2984b1a645746b" => :mojave - sha256 "387e6f8c0e9f20b4ae2007185d394ff73cc3392085a6a05045b669512780c55e" => :high_sierra - sha256 "81ef6bdc246a412022d070b5020b567864b177a53fcfeb15c44f7be38e6130ab" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - output = shell_output("#{bin}/react-native init test") - assert_match "To run your app on Android", output - end -end diff --git a/Formula/readline.rb b/Formula/readline.rb deleted file mode 100644 index 2e423995832a3..0000000000000 --- a/Formula/readline.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Readline < Formula - desc "Library for command-line editing" - homepage "https://tiswww.case.edu/php/chet/readline/rltop.html" - url "https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz" - mirror "https://ftpmirror.gnu.org/readline/readline-7.0.tar.gz" - version "7.0.5" - sha256 "750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334" - - bottle do - cellar :any - sha256 "5976a79f0dbd5ccb2a261f692763319d612309caa2b8cf703f209270764c657c" => :mojave - sha256 "0cc8fcf8ee733e41c40b859a09eb00f723222a40398fdd15d32891df1eca2eef" => :high_sierra - sha256 "962ae47be894e6d3a354b24953fc6b456c42dc054bcd44092cabf65e734a152b" => :sierra - sha256 "a7f92cf74dfd299b0c368a983c6f83fc50395b0392b8465316133c625744bcc5" => :el_capitan - end - - keg_only :shadowed_by_macos, <<~EOS - macOS provides the BSD libedit library, which shadows libreadline. - In order to prevent conflicts when programs look for libreadline we are - defaulting this GNU Readline installation to keg-only - EOS - - %w[ - 001 9ac1b3ac2ec7b1bf0709af047f2d7d2a34ccde353684e57c6b47ebca77d7a376 - 002 8747c92c35d5db32eae99af66f17b384abaca961653e185677f9c9a571ed2d58 - 003 9e43aa93378c7e9f7001d8174b1beb948deefa6799b6f581673f465b7d9d4780 - 004 f925683429f20973c552bff6702c74c58c2a38ff6e5cf305a8e847119c5a6b64 - 005 ca159c83706541c6bbe39129a33d63bbd76ac594303f67e4d35678711c51b753 - ].each_slice(2) do |p, checksum| - patch :p0 do - url "https://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70-#{p}" - mirror "https://ftpmirror.gnu.org/readline/readline-7.0-patches/readline70-#{p}" - sha256 checksum - end - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main() - { - printf("%s\\n", readline("test> ")); - return 0; - } - EOS - system ENV.cc, "-L", lib, "test.c", "-L#{lib}", "-lreadline", "-o", "test" - assert_equal "test> Hello, World!\nHello, World!", - pipe_output("./test", "Hello, World!\n").strip - end -end diff --git a/Formula/readosm.rb b/Formula/readosm.rb deleted file mode 100644 index ae0dbbc95f3ce..0000000000000 --- a/Formula/readosm.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Readosm < Formula - desc "Extract valid data from an Open Street Map input file" - homepage "https://www.gaia-gis.it/fossil/readosm/index" - url "https://www.gaia-gis.it/gaia-sins/readosm-1.1.0.tar.gz" - sha256 "c508cde9c49b955613d9a30dcf622fa264a5c0e01f58074e93351ea39abd40ec" - - bottle do - cellar :any - sha256 "9267299755eb50ddd6330cafba8d81d8a0ee48821414162ef767bb4a7a2d4195" => :mojave - sha256 "953aeb6917d8ad465d11d2832ac4ba20fd673c694562fdca9ccf7cef0346d280" => :high_sierra - sha256 "98fc0238ad218a95df4bea4a3520f84fc66f9dc8bba3e0b6ad7fa774813f16e8" => :sierra - sha256 "3637140ac264e9fc4e7cd8e78e1754d5b6861ef98d7ae38ba7e70c9825241069" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - doc.install "examples" - end - - test do - system ENV.cc, "-I#{include}", "-L#{lib}", "-lreadosm", - doc/"examples/test_osm1.c", "-o", testpath/"test" - assert_equal "usage: test_osm1 path-to-OSM-file", - shell_output("./test 2>&1", 255).chomp - end -end diff --git a/Formula/reattach-to-user-namespace.rb b/Formula/reattach-to-user-namespace.rb deleted file mode 100644 index df23806196320..0000000000000 --- a/Formula/reattach-to-user-namespace.rb +++ /dev/null @@ -1,24 +0,0 @@ -class ReattachToUserNamespace < Formula - desc "Reattach process (e.g., tmux) to background" - homepage "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard" - url "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/archive/v2.7.tar.gz" - sha256 "7b49536afee3823065cd0772d5110d6814fafa9e8b66432ab537b3e891f4b202" - head "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git" - - bottle do - cellar :any_skip_relocation - sha256 "1d5a844cd7ceac7d63563aa7359b5a9fc39ce91814d6dbd18d587b383ee549be" => :mojave - sha256 "4771dbfd48578df075bcdc4d421826ffa648774bbf13362be723bbfdeb863668" => :high_sierra - sha256 "e2002466693116bf3913fca2e4bc7977fe3d2be30af34d9bcbe2576105beef0b" => :sierra - sha256 "da2f4dcaddf0d1035a9dfb93b6332749bad3378e7eac151f89378b4f7115802c" => :el_capitan - end - - def install - system "make" - bin.install "reattach-to-user-namespace" - end - - test do - system bin/"reattach-to-user-namespace", "-l", "bash", "-c", "echo Hello World!" - end -end diff --git a/Formula/reaver.rb b/Formula/reaver.rb deleted file mode 100644 index 2fbd25bb78130..0000000000000 --- a/Formula/reaver.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Reaver < Formula - desc "Implements brute force attack to recover WPA/WPA2 passkeys" - homepage "https://code.google.com/archive/p/reaver-wps/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/reaver-wps/reaver-1.4.tar.gz" - sha256 "add3050a4a05fe0ab6bfb291ee2de8e9b8a85f1e64ced93ee27a75744954b22d" - - bottle do - sha256 "386ed8ae2562ae032f0d622d52d7302be2e99bbe671f1ca5ba3acb88b86f6417" => :mojave - sha256 "c2c6d45abc45f5639b74da0bdb294a5ee83548f548642f6b61d764d05801352e" => :high_sierra - sha256 "e7fc0f43b7a306d5fe2baaf4b41e9ce445db12e2e74d41904b3de5d2c372741d" => :sierra - sha256 "d9adddf27928b284492cc87b565d2748490c1017b0b463bc15223c935f63bb6c" => :el_capitan - sha256 "4fbf7b0225730d7a37bfb71bec7b99f78f0b0946df7bcb3e5f274795692e1b3f" => :yosemite - sha256 "036092600e415ebba4bc372cff4b7645783e9285c1af56990b0f064db61a0ca4" => :mavericks - end - - # Adds general support for macOS in reaver: - # https://code.google.com/archive/p/reaver-wps/issues/detail?id=245 - patch do - url "https://gist.githubusercontent.com/syndicut/6134996/raw/16f1b4336c104375ff93a88858809eced53c1171/reaver-osx.diff" - sha256 "2a8f791df1f59747724e2645f060f49742a625686427877d9f0f21dc62f811a7" - end - - def install - man1.install "docs/reaver.1.gz" - prefix.install_metafiles "docs" - cd "src" - system "./configure", "--prefix=#{prefix}" - system "make" - bin.mkpath - system "make", "install" - end -end diff --git a/Formula/rebar.rb b/Formula/rebar.rb deleted file mode 100644 index 9aa179eab79f9..0000000000000 --- a/Formula/rebar.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rebar < Formula - desc "Erlang build tool" - homepage "https://github.com/rebar/rebar" - url "https://github.com/rebar/rebar/archive/2.6.4.tar.gz" - sha256 "577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07" - head "https://github.com/rebar/rebar.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6c6b5ff9c5b90070a6dcd9bc8d6a6b96807ed74eee4229389f30e3716b347bb8" => :mojave - sha256 "d5a5ed085e413f898c5a2f36f0696343b08e592d901bcb01ddc9c41098a8aadf" => :high_sierra - sha256 "9deae896b5a7656fdbbbcdb134f17f776b9ba3b320a007a9ea84c97f1242ea76" => :sierra - sha256 "dc9934c431b8435022a1b47400d04357ef1da4bc579e523c14d9e6ddf9d44715" => :el_capitan - sha256 "30b03e9b4d9405d3131cbc4d4303797496d264fafed8f708a7a862e73e2e99ea" => :yosemite - end - - depends_on "erlang" - - def install - system "./bootstrap" - bin.install "rebar" - - bash_completion.install "priv/shell-completion/bash/rebar" - zsh_completion.install "priv/shell-completion/zsh/_rebar" => "_rebar" - fish_completion.install "priv/shell-completion/fish/rebar.fish" - end - - test do - system bin/"rebar", "--version" - end -end diff --git a/Formula/rebar3.rb b/Formula/rebar3.rb deleted file mode 100644 index f60eeb6a63044..0000000000000 --- a/Formula/rebar3.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Rebar3 < Formula - desc "Erlang build tool" - homepage "https://github.com/erlang/rebar3" - url "https://github.com/erlang/rebar3/archive/3.8.0.tar.gz" - sha256 "fc4d08037d39bcc651a4a749f8a5b1a10b2205527df834c2aee8f60725c3f431" - - bottle do - cellar :any_skip_relocation - sha256 "542fcbd0cbd88f776c01fb78ada4ef6444b58a3607e48acc27c6c2a7c99352ad" => :mojave - sha256 "abca552b00a655e68a5aaa833d9e9fddc002a8c2fe720346b9edacd58e4617dd" => :high_sierra - sha256 "76fc5c46356cd2824bca3599dfef8b8edfb2351d2a466c9e8ea5527d69620fa2" => :sierra - end - - depends_on "erlang" - - def install - system "./bootstrap" - bin.install "rebar3" - - bash_completion.install "priv/shell-completion/bash/rebar3" - zsh_completion.install "priv/shell-completion/zsh/_rebar3" - fish_completion.install "priv/shell-completion/fish/rebar3.fish" - end - - test do - system bin/"rebar3", "--version" - end -end diff --git a/Formula/recode.rb b/Formula/recode.rb deleted file mode 100644 index bfad2209c8465..0000000000000 --- a/Formula/recode.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Recode < Formula - desc "Convert character set (charsets)" - homepage "https://github.com/pinard/Recode" - url "https://github.com/pinard/Recode/archive/v3.7-beta2.tar.gz" - sha256 "72c3c0abcfe2887b83a8f27853a9df75d7e94a9ebacb152892cc4f25108e2144" - - bottle do - rebuild 1 - sha256 "4deb2f8480290e89de9b611eb139b7bd93d4279b776ca53ef32f31017d023d61" => :mojave - sha256 "ca77219ffb6960de21caf333f31faa43de430a0e9f784624324a7c0581ce567d" => :high_sierra - sha256 "15572a6826a49109bd64fd9b50eace8259a7563f9e6ffdbf5112ed742a256c79" => :sierra - sha256 "1aaa7262ed6614a56e2bc17ac4b518903b62eb582d6aeab45f7845b38dee224e" => :el_capitan - sha256 "8518f350264f5cdadfb26c49487f82f9c159307f26d10230daf415d1495607f4" => :yosemite - sha256 "81fb3b36d647c6dd83f9fb65bf657b73b65d551a16dcd7e9552ff70f5a1394dc" => :mavericks - end - - depends_on "libtool" => :build - depends_on "gettext" - - def install - # Missing symbol errors without these. - ENV.append "LDFLAGS", "-liconv" - ENV.append "LDFLAGS", "-lintl" - - # Fixed upstream in 2008 but no releases since. Patched by Debian also. - # https://github.com/pinard/Recode/commit/a34dfd2257f412dff59f2ad7f714. - inreplace "src/recodext.h", "bool ignore : 2;", "bool ignore : 1;" - - cp Dir["#{Formula["libtool"].opt_pkgshare}/*/config.{guess,sub}"], buildpath - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--without-included-gettext", - "--prefix=#{prefix}", - "--infodir=#{info}", - "--mandir=#{man}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/recode --version") - end -end diff --git a/Formula/recon-ng.rb b/Formula/recon-ng.rb deleted file mode 100644 index ac7c96c3b6246..0000000000000 --- a/Formula/recon-ng.rb +++ /dev/null @@ -1,97 +0,0 @@ -class ReconNg < Formula - include Language::Python::Virtualenv - - desc "Web Reconnaissance Framework" - homepage "https://bitbucket.org/LaNMaSteR53/recon-ng" - url "https://bitbucket.org/LaNMaSteR53/recon-ng/get/v4.9.4.tar.gz" - sha256 "f443616351fb9dd119a870b637bdf7be0fb3a9fac6eb5a640b9d5414a63d2160" - - bottle do - cellar :any_skip_relocation - sha256 "18b3feb82b8eea90e49856c098ca66ea10f957eaaeae1ff7813eccbeb1265996" => :mojave - sha256 "d23885588e18d5b47d7175f37d03de1aaef5818fb548d42c00e922339602b182" => :high_sierra - sha256 "9cc593ac5d73a9b995a419bf37632ff375f206aab63a6415409f18ce151c36b9" => :sierra - end - - # Dependency "mechanize" only support Python 2 - depends_on "python@2" # does not support Python 3 - - ### setup_requires dependencies - resource "dicttoxml" do - url "https://files.pythonhosted.org/packages/74/36/534db111db9e7610a41641a1f6669a964aacaf51858f466de264cc8dcdd9/dicttoxml-1.7.4.tar.gz" - sha256 "ea44cc4ec6c0f85098c57a431a1ee891b3549347b07b7414c8a24611ecf37e45" - end - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/e4/96/a598fa35f8a625bc39fed50cdbe3fd8a52ef215ef8475c17cabade6656cb/dnspython-1.15.0.zip" - sha256 "40f563e1f7a7b80dc5a4e76ad75c23da53d62f1e15e6e517293b04e1f84ead7c" - end - - resource "Flask" do - url "https://files.pythonhosted.org/packages/4b/12/c1fbf4971fda0e4de05565694c9f0c92646223cff53f15b6eb248a310a62/Flask-1.0.2.tar.gz" - sha256 "2271c0070dbcb5275fad4a82e29f23ab92682dc45f9dfbc22c02ba9b9322ce48" - end - - resource "jsonrpclib" do - url "https://files.pythonhosted.org/packages/a9/0a/69b6b794d7b086793683743df2f6d0a4fcf97613a95a39cfc74b78f2adb7/jsonrpclib-0.1.7.tar.gz" - sha256 "7f50239d53b5e95b94455d5e1adae70592b5b71f0e960d3bbbfbb125788e6f0b" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/4b/20/ddf5eb3bd5c57582d2b4652b4bbcf8da301bdfe5d805cb94e805f4d7464d/lxml-4.2.5.tar.gz" - sha256 "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f" - end - - resource "mechanize" do - url "https://files.pythonhosted.org/packages/ef/be/4c433dfa7703c0fa81ca3a88afe74b2b9e2b23e664479a4913ecefe7f8ca/mechanize-0.3.7.tar.gz" - sha256 "ee66e1a6af790898894dd0318914ced413d94f46a54f881eb337081ff9702cd2" - end - - resource "olefile" do - url "https://files.pythonhosted.org/packages/34/81/e1ac43c6b45b4c5f8d9352396a14144bba52c8fec72a80f425f6a4d653ad/olefile-0.46.zip" - sha256 "133b031eaf8fd2c9399b78b8bc5b8fcbe4c31e85295749bb17a87cba8f3c3964" - end - - resource "PyPDF2" do - url "https://files.pythonhosted.org/packages/b4/01/68fcc0d43daf4c6bdbc6b33cc3f77bda531c86b174cac56ef0ffdb96faab/PyPDF2-1.26.0.tar.gz" - sha256 "e28f902f2f0a1603ea95ebe21dff311ef09be3d0f0ef29a3e44a932729564385" - end - - resource "slowaes" do - url "https://files.pythonhosted.org/packages/79/a4/c7dcbe89ec22a6985790bc0effb12bb8caef494fbac3c2bab86ae51a53ef/slowaes-0.1a1.tar.gz" - sha256 "83658ae54cc116b96f7fdb12fdd0efac3a4e8c7c7064e3fac3f4a881aa54bf09" - end - - resource "unicodecsv" do - url "https://files.pythonhosted.org/packages/6f/a4/691ab63b17505a26096608cc309960b5a6bdf39e4ba1a793d5f9b1a53270/unicodecsv-0.14.1.tar.gz" - sha256 "018c08037d48649a0412063ff4eda26eaa81eff1546dbffa51fa5293276ff7fc" - end - - resource "XlsxWriter" do - url "https://files.pythonhosted.org/packages/0c/08/69581af3c4807d2b8bac47251c80343161b9f315a7f91fb703aa865302d9/XlsxWriter-1.1.2.tar.gz" - sha256 "ae22658a0fc5b9e875fa97c213d1ffd617d86dc49bf08be99ebdac814db7bf36" - end - - def install - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - libexec.install Dir["*"] - venv = virtualenv_create(libexec) - venv.pip_install resources - - # Replace shebang with virtualenv python - inreplace libexec/"recon-ng", "#!/usr/bin/env python", "#!#{libexec}/bin/python" - - bin.install_symlink libexec/"recon-ng" - end - - test do - (testpath/"resource").write <<~EOS - load brute_hosts - show info - exit - EOS - system "#{bin}/recon-ng", "-r", testpath/"resource" - end -end diff --git a/Formula/recoverjpeg.rb b/Formula/recoverjpeg.rb deleted file mode 100644 index a89abd75204b2..0000000000000 --- a/Formula/recoverjpeg.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Recoverjpeg < Formula - desc "Tool to recover JPEG images from a file system image" - homepage "https://www.rfc1149.net/devel/recoverjpeg.html" - url "https://www.rfc1149.net/download/recoverjpeg/recoverjpeg-2.6.2.tar.gz" - sha256 "d7f178f24099807d80483e970de76e728da4c81c52a8293ef615d7b184f56a07" - - bottle do - cellar :any_skip_relocation - sha256 "bd8deca4aaf50c470dd3ec7d385e17d99ffd28153c0ce0eeafcbc2d35da3ece6" => :mojave - sha256 "d0e5e0183223335fee7744343ccb9287f6ddca80991f098172e0f89f5d28f10f" => :high_sierra - sha256 "1c71c690a3d3646739ae74bdcb45d3de0845ef7874bcaf3c499499017b5f5eaf" => :sierra - sha256 "5ecb45697e2d032031af1549df4896f42598af4aae9802b866c5c9314946a5b0" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/recoverjpeg -V") - end -end diff --git a/Formula/recutils.rb b/Formula/recutils.rb deleted file mode 100644 index 5e1d4b7d16679..0000000000000 --- a/Formula/recutils.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Recutils < Formula - desc "Tools to work with human-editable, plain text data files" - homepage "https://www.gnu.org/software/recutils/" - url "https://ftp.gnu.org/gnu/recutils/recutils-1.8.tar.gz" - mirror "https://ftpmirror.gnu.org/gnu/recutils/recutils-1.8.tar.gz" - sha256 "df8eae69593fdba53e264cbf4b2307dfb82120c09b6fab23e2dad51a89a5b193" - - bottle do - cellar :any - sha256 "1503a69c0ed988355b959c47b2c8a5e5a4f451d41027f5a06cdf5de19f7d171f" => :mojave - sha256 "c2ca0221b7e7091c11840a000f02b130325a188aeb03b100947562aa8d9ce3ef" => :high_sierra - sha256 "694cfda88a56f30c66d71080b8a1a4763a17789e0ea54b37c778ba84107f6430" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--datarootdir=#{elisp}" - system "make", "install" - end - - test do - (testpath/"test.csv").write <<~EOS - a,b,c - 1,2,3 - EOS - system "#{bin}/csv2rec", "test.csv" - - (testpath/"test.rec").write <<~EOS - %rec: Book - %mandatory: Title - - Title: GNU Emacs Manual - EOS - system "#{bin}/recsel", "test.rec" - end -end diff --git a/Formula/redex.rb b/Formula/redex.rb deleted file mode 100644 index 99e85856159fd..0000000000000 --- a/Formula/redex.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Redex < Formula - desc "Bytecode optimizer for Android apps" - homepage "https://fbredex.com" - url "https://github.com/facebook/redex/archive/v2017.10.31.tar.gz" - sha256 "18a840e4db0fc51f79e17dfd749b2ffcce65a28e7ef9c2b3c255c5ad89f6fd6f" - revision 1 - head "https://github.com/facebook/redex.git" - - bottle do - cellar :any - sha256 "1238aba94a455c15ab04cbe425c6b42afb8b0c31e117d9146686a1986386c6e4" => :mojave - sha256 "3af2c80e3680ee759285ebb1939530b8f5e15315c6a98d64e2334ac6f1abb907" => :high_sierra - sha256 "eeca9a5992edfc721cf08ea9c86d59c4110998af603e447213da01cc84d6216c" => :sierra - sha256 "6bf545087ea1d01922b9cc5a157b941785b3e1abe339d45a50745ddfdf21d8fd" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libevent" => :build - depends_on "libtool" => :build - depends_on "boost" - depends_on "jsoncpp" - depends_on "python" - - resource "test_apk" do - url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" - sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" - end - - def install - system "autoreconf", "-ivf" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - resource("test_apk").stage do - system "#{bin}/redex", "redex-test.apk", "-o", "redex-test-out.apk" - end - end -end diff --git a/Formula/redir.rb b/Formula/redir.rb deleted file mode 100644 index 16212546116df..0000000000000 --- a/Formula/redir.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Redir < Formula - desc "Port redirector" - homepage "http://sammy.net/~sammy/hacks/" - url "https://github.com/TracyWebTech/redir/archive/2.2.1-9.tar.gz" - version "2.2.1-9" - sha256 "7e6612a0eee1626a0e7d9888de49b9c0fa4b7f75c5c4caca7804bf73d73f01fe" - - bottle do - cellar :any_skip_relocation - sha256 "5681e33f5a5cb66759b5781989bef550558752c7cd3c1b3e4b590c5441a47082" => :mojave - sha256 "8a94df616b4af201fe512de86ab7310bed38136397ee53b37d6f0a4a2729282e" => :high_sierra - sha256 "cb7132731ff0121978a4e72208203d30d4fd91a10731fda2ac474619ab4472cb" => :sierra - sha256 "6109cd43a30457b4306b701f12088b6b7c1b40dddfb592b805e5ba4eb6b56158" => :el_capitan - sha256 "76c6d218033c27de7a5030e8d9fe1356e0a152e3a31e4210b589314643b9fd0d" => :yosemite - sha256 "19b1d25bc23f38eeecd22c9ed2eac4640e63e97d7a192e7bc71b822d5d29afe0" => :mavericks - sha256 "7b363f804ba92db19815e67697fa28247fe346be4733c48b9b306e2797a3344b" => :mountain_lion - end - - def install - system "make" - bin.install "redir" - man1.install "redir.man" - end - - test do - redir_pid = fork do - exec "#{bin}/redir", "--cport=12345", "--lport=54321" - end - Process.detach(redir_pid) - - nc_pid = fork do - exec "nc -l 12345" - end - - # Give time to processes start - sleep(1) - - begin - # Check if the process is running - system "kill", "-0", redir_pid - - # Check if the port redirect works - system "nc", "-z", "localhost", "54321" - ensure - Process.kill("TERM", redir_pid) - Process.kill("TERM", nc_pid) - Process.wait(nc_pid) - end - end -end diff --git a/Formula/redis-leveldb.rb b/Formula/redis-leveldb.rb deleted file mode 100644 index 2223fa22acdbb..0000000000000 --- a/Formula/redis-leveldb.rb +++ /dev/null @@ -1,33 +0,0 @@ -class RedisLeveldb < Formula - desc "Redis-protocol compatible frontend to leveldb" - homepage "https://github.com/KDr2/redis-leveldb" - url "https://github.com/KDr2/redis-leveldb/archive/v1.4.tar.gz" - sha256 "b34365ca5b788c47b116ea8f86a7a409b765440361b6c21a46161a66f631797c" - revision 3 - head "https://github.com/KDr2/redis-leveldb.git" - - bottle do - cellar :any - sha256 "f2345f0e55d37343c3c7e2fb4c43e517d429db2bb284430d3db1222675b8b520" => :mojave - sha256 "9efe9023206565f3d5557202465fa99440262aef2298894c1f738dba0a39ad10" => :high_sierra - sha256 "c8cdcf2f80de6eda4f86e9a7c6726ef1a2e046378a28b72b52deb180a15d1916" => :sierra - sha256 "5373414613caf193828f782883f835858a8c999943a542e9ec3ff735a918bb63" => :el_capitan - sha256 "4cf802ff434be42c86043c45f539cfdb0f137cfd37df4815560e3495da5f9d1b" => :yosemite - end - - depends_on "gmp" - depends_on "leveldb" - depends_on "libev" - depends_on "snappy" - - def install - inreplace "src/Makefile", "../vendor/libleveldb.a", Formula["leveldb"].opt_lib+"libleveldb.a" - ENV.prepend "LDFLAGS", "-lsnappy" - system "make" - bin.install "redis-leveldb" - end - - test do - system "#{bin}/redis-leveldb", "-h" - end -end diff --git a/Formula/redis.rb b/Formula/redis.rb deleted file mode 100644 index 07f9b4626cf44..0000000000000 --- a/Formula/redis.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Redis < Formula - desc "Persistent key-value database, with built-in net interface" - homepage "https://redis.io/" - url "http://download.redis.io/releases/redis-5.0.3.tar.gz" - sha256 "e290b4ddf817b26254a74d5d564095b11f9cd20d8f165459efa53eb63cd93e02" - head "https://github.com/antirez/redis.git", :branch => "unstable" - - bottle do - cellar :any_skip_relocation - sha256 "c1e69b93ce41aa87a6da21b3f22cea5df8ab6b49ccd7e5d6678ab84b9aecc0ab" => :mojave - sha256 "0a90d97c6006a0ecfd654644d221caef024c7796f42a3897e4ae2b5d687fa3d1" => :high_sierra - sha256 "c23f0aa21d6c15d60f5395d99c6e6d67f069ac7b3a3d9894b1b48ede6b5c121e" => :sierra - end - - def install - # Architecture isn't detected correctly on 32bit Snow Leopard without help - ENV["OBJARCH"] = "-arch #{MacOS.preferred_arch}" - - system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}" - - %w[run db/redis log].each { |p| (var/p).mkpath } - - # Fix up default conf file to match our paths - inreplace "redis.conf" do |s| - s.gsub! "/var/run/redis.pid", var/"run/redis.pid" - s.gsub! "dir ./", "dir #{var}/db/redis/" - s.sub! /^bind .*$/, "bind 127.0.0.1 ::1" - end - - etc.install "redis.conf" - etc.install "sentinel.conf" => "redis-sentinel.conf" - end - - plist_options :manual => "redis-server #{HOMEBREW_PREFIX}/etc/redis.conf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/redis-server - #{etc}/redis.conf - --daemonize no - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/redis.log - StandardOutPath - #{var}/log/redis.log - - - EOS - end - - test do - system bin/"redis-server", "--test-memory", "2" - %w[run db/redis log].each { |p| assert_predicate var/p, :exist?, "#{var/p} doesn't exist!" } - end -end diff --git a/Formula/redis@3.2.rb b/Formula/redis@3.2.rb deleted file mode 100644 index 2f31b450fe4cd..0000000000000 --- a/Formula/redis@3.2.rb +++ /dev/null @@ -1,73 +0,0 @@ -class RedisAT32 < Formula - desc "Persistent key-value database, with built-in net interface" - homepage "https://redis.io/" - url "http://download.redis.io/releases/redis-3.2.12.tar.gz" - sha256 "98c4254ae1be4e452aa7884245471501c9aa657993e0318d88f048093e7f88fd" - - bottle do - cellar :any_skip_relocation - sha256 "538ba1f4afbfe24a38b7fedb6aa07709cd151ad5aff0573e2a8f30b2bcd1a4e7" => :mojave - sha256 "2d1881b6367b5618b99d31cd3a9af00206b37fce9d36bfd787ebb892ea501707" => :high_sierra - sha256 "b4bf9c768ec911cf13d0a6479b4c8a2a100b322ed861c9fc763912f185cc5aa7" => :sierra - sha256 "ae4570363ca61057cffee4db90808574c71eb89d97c20250ca5da214d24fbd91" => :el_capitan - end - - keg_only :versioned_formula - - def install - # Architecture isn't detected correctly on 32bit Snow Leopard without help - ENV["OBJARCH"] = "-arch #{MacOS.preferred_arch}" - - system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}" - - %w[run db/redis log].each { |p| (var/p).mkpath } - - # Fix up default conf file to match our paths - inreplace "redis.conf" do |s| - s.gsub! "/var/run/redis.pid", var/"run/redis.pid" - s.gsub! "dir ./", "dir #{var}/db/redis/" - s.gsub! "\# bind 127.0.0.1", "bind 127.0.0.1" - end - - etc.install "redis.conf" - etc.install "sentinel.conf" => "redis-sentinel.conf" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/redis@3.2/bin/redis-server #{HOMEBREW_PREFIX}/etc/redis.conf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/redis-server - #{etc}/redis.conf - --daemonize no - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/redis.log - StandardOutPath - #{var}/log/redis.log - - - EOS - end - - test do - system bin/"redis-server", "--test-memory", "2" - %w[run db/redis log].each { |p| assert_predicate var/p, :exist?, "#{var/p} doesn't exist!" } - end -end diff --git a/Formula/redis@4.0.rb b/Formula/redis@4.0.rb deleted file mode 100644 index d59d14405c8d5..0000000000000 --- a/Formula/redis@4.0.rb +++ /dev/null @@ -1,72 +0,0 @@ -class RedisAT40 < Formula - desc "Persistent key-value database, with built-in net interface" - homepage "https://redis.io/" - url "https://github.com/antirez/redis/archive/4.0.12.tar.gz" - sha256 "d11767986ba90b7bad6cc8bc67419a3900d86c047a453fab1deedb71875ff65c" - - bottle do - cellar :any_skip_relocation - sha256 "2e21e362c8d97338ed0b95bbbf80f81322601411424d32b4ab5023e93cfc9969" => :mojave - sha256 "a735ef4d8cf8f865bf9ab0d538e1eaedc37d18669b99381a7aa3be0e642c72d8" => :high_sierra - sha256 "9453b63fd6dd0230181d047cd3ec6cfa295c739a7176cfd63f510ead98abecc0" => :sierra - end - - keg_only :versioned_formula - - def install - # Architecture isn't detected correctly on 32bit Snow Leopard without help - ENV["OBJARCH"] = "-arch #{MacOS.preferred_arch}" - - system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}" - - %w[run db/redis log].each { |p| (var/p).mkpath } - - # Fix up default conf file to match our paths - inreplace "redis.conf" do |s| - s.gsub! "/var/run/redis.pid", var/"run/redis.pid" - s.gsub! "dir ./", "dir #{var}/db/redis/" - s.sub! /^bind .*$/, "bind 127.0.0.1 ::1" - end - - etc.install "redis.conf" - etc.install "sentinel.conf" => "redis-sentinel.conf" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/redis@4.0/bin/redis-server #{HOMEBREW_PREFIX}/etc/redis.conf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/redis-server - #{etc}/redis.conf - --daemonize no - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/redis.log - StandardOutPath - #{var}/log/redis.log - - - EOS - end - - test do - system bin/"redis-server", "--test-memory", "2" - %w[run db/redis log].each { |p| assert_predicate var/p, :exist?, "#{var/p} doesn't exist!" } - end -end diff --git a/Formula/redland.rb b/Formula/redland.rb deleted file mode 100644 index a9a08a322e4cb..0000000000000 --- a/Formula/redland.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Redland < Formula - desc "RDF Library" - homepage "http://librdf.org/" - url "http://download.librdf.org/source/redland-1.0.17.tar.gz" - sha256 "de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681" - revision 1 - - bottle do - sha256 "711bdaeff62854f878f02e8fab9782337ee87ebf7398757d7780eb3c8971310b" => :mojave - sha256 "407f9f1bd2a8682684660826fce445077c33fe3e7f1bfb05e7c0e265e2edacfe" => :high_sierra - sha256 "0ed03c897836946cbadf2e390bd25c79eeb6ad34ea1144ef69d8bf1dfbfaf2eb" => :sierra - sha256 "38eac3bae25aa65cbb7b688ecfaae91ab79c0c292e7505596ffc3b409bc8ca3b" => :el_capitan - sha256 "6047842b51137c968df4787bbfcf2080b4f32b73bb9d3412fa117ee9c1ff22d2" => :yosemite - sha256 "06d1c7c81a9803ad37cd40303987b90456fb565f4305965388bc8faff54c6db7" => :mavericks - sha256 "bbe8f82451695648adb66ab2766413e938f8f4ffdc318ba946e210d23e637dd2" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "raptor" - depends_on "rasqal" - depends_on "sqlite" - depends_on "unixodbc" - - resource "bindings" do - url "http://download.librdf.org/source/redland-bindings-1.0.17.1.tar.gz" - sha256 "ff72b587ab55f09daf81799cb3f9d263708fad5df7a5458f0c28566a2563b7f5" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-bdb=no", - "--with-mysql=no", - "--with-sqlite=yes" - system "make", "install" - end -end diff --git a/Formula/redo.rb b/Formula/redo.rb deleted file mode 100644 index 47066429b7039..0000000000000 --- a/Formula/redo.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Redo < Formula - desc "Implements djb's redo: an alternative to make(1)" - homepage "https://github.com/apenwarr/redo" - url "https://github.com/apenwarr/redo/archive/redo-0.21.tar.gz" - sha256 "79a077092bd8085d6bd98226960590e0fe04ada5a4e1ee6adee3856cf0167b25" - - bottle do - cellar :any_skip_relocation - sha256 "5471cdd4085c91f930069c8a8a315a3847739a79703758c104013ffe97a7618a" => :mojave - sha256 "b205f9ef95a30c922d62e0deba1be29a0bbbd95d160341261711edaf49e92b82" => :high_sierra - sha256 "630ac52a05e6b4586f1f78219bc9bce9d17cd67ab1b4acccb3d62256c2839bce" => :sierra - end - - resource "docs" do - url "https://github.com/apenwarr/redo.git", :branch => "man" - end - - def install - ENV["PREFIX"] = prefix - system "./redo", "install" - rm share/"doc/redo/README.md" # lets not have two copies - man1.install resource("docs") - end - - test do - system "#{bin}/redo", "--version" - end -end diff --git a/Formula/redpen.rb b/Formula/redpen.rb deleted file mode 100644 index 01895cd8fb325..0000000000000 --- a/Formula/redpen.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Redpen < Formula - desc "Proofreading tool to help writers of technical documentation" - homepage "http://redpen.cc/" - url "https://github.com/redpen-cc/redpen/releases/download/redpen-1.10.1/redpen-1.10.1.tar.gz" - sha256 "39a148d3d89efef0e58ee7250e1bab7e26bf1edf83616934265c603623351fa0" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - # Don't need Windows files. - rm_f Dir["bin/*.bat"] - libexec.install %w[conf lib sample-doc js] - - prefix.install "bin" - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8+")) - end - - test do - path = "#{libexec}/sample-doc/en/sampledoc-en.txt" - output = "#{bin}/redpen -l 20 -c #{libexec}/conf/redpen-conf-en.xml #{path}" - match = /^sampledoc-en.txt:1: ValidationError[SymbolWithSpace]*/ - assert_match match, shell_output(output).split("\n").select { |line| line.start_with?("sampledoc-en.txt") }[0] - end -end diff --git a/Formula/redshift.rb b/Formula/redshift.rb deleted file mode 100644 index 69ac50e5d1c64..0000000000000 --- a/Formula/redshift.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Redshift < Formula - desc "Adjust color temperature of your screen according to your surroundings" - homepage "http://jonls.dk/redshift/" - url "https://github.com/jonls/redshift/releases/download/v1.12/redshift-1.12.tar.xz" - sha256 "d2f8c5300e3ce2a84fe6584d2f1483aa9eadc668ab1951b2c2b8a03ece3a22ba" - - bottle do - sha256 "d1f71d1f7dc5d5f22c220087a9fde5d159928540b54c02803e37cbc3bfc37e5d" => :mojave - sha256 "39794fc0af4bae10ccfa98921acb933c414dbb858e25515dfbff38659d7b8b77" => :high_sierra - sha256 "30ff6fd3a0bb4d73bd9c3855467fe9b0cf78c8f084083e103ef702587fba98cc" => :sierra - sha256 "365aba46b3ea942d56749f405633093fc7e774bc4b27acefdc5ed0a87bdd4d67" => :el_capitan - end - - head do - url "https://github.com/jonls/redshift.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - args = %W[ - --prefix=#{prefix} - --enable-corelocation - --disable-silent-rules - --disable-dependency-tracking - --disable-geoclue - --disable-geoclue2 - --enable-quartz - --with-systemduserunitdir=no - --disable-gui - ] - - system "./bootstrap" if build.head? - system "./configure", *args - system "make", "install" - pkgshare.install "redshift.conf.sample" - end - - def caveats; <<~EOS - A sample .conf file has been installed to #{opt_pkgshare}. - - Please note redshift expects to read its configuration file from - #{ENV["HOME"]}/.config/redshift/redshift.conf - EOS - end - - plist_options :manual => "redshift" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/redshift - - KeepAlive - - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - system "#{bin}/redshift", "-V" - end -end diff --git a/Formula/redsocks.rb b/Formula/redsocks.rb deleted file mode 100644 index 748043eddc3e9..0000000000000 --- a/Formula/redsocks.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Redsocks < Formula - desc "Transparent socks redirector" - homepage "https://darkk.net.ru/redsocks/" - url "https://github.com/darkk/redsocks/archive/release-0.4.tar.gz" - sha256 "618cf9e8cd98082db31f4fde6450eace656fba8cd6b87aa4565512640d341045" - revision 1 - - bottle do - cellar :any - sha256 "1b67d9a87cd77d247cb92ed210394d0fbdb91ac38b4c149f9c165e7c35030114" => :mojave - sha256 "d0e52f2f1ceb50e6edb7f524a7bb62c7df2eaec870dffa7626dada91f25a5f9f" => :high_sierra - sha256 "ccfba64129d3e3a01b1bba7d18564e7b1ac174ce4b7a1c41424e2985d7a97523" => :sierra - sha256 "5d9e3f0dcc812146c27c7916052605be3f08b4be45682ccda27a9ab0dc97f574" => :el_capitan - sha256 "5d017a684dd4810da302823e4122ac8f43808a87c618fd24667b5b89d6b812b3" => :yosemite - end - - depends_on "libevent" - - def install - system "make" - bin.install "redsocks" - end - - test do - system "#{bin}/redsocks", "--version" - end -end diff --git a/Formula/redstore.rb b/Formula/redstore.rb deleted file mode 100644 index 68ef47f9df80e..0000000000000 --- a/Formula/redstore.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Redstore < Formula - desc "Lightweight RDF triplestore powered by Redland" - homepage "https://www.aelius.com/njh/redstore/" - url "https://www.aelius.com/njh/redstore/redstore-0.5.4.tar.gz" - sha256 "58bd65fda388ab401e6adc3672d7a9c511e439d94774fcc5a1ef6db79c748141" - - bottle do - cellar :any - sha256 "a17c99ed5d7162eb742eef7b8764c64082fff26895baa81cb26cb75ced03db5e" => :mojave - sha256 "fbd9814ed5e35fb1c964d6f581edebfc35e7d35cba0b89ea735247131c5559ac" => :high_sierra - sha256 "e507eab072e33f0cee1ca08efb51ab06d65cee3a64248ec6badbd4f601f5c674" => :sierra - sha256 "5ae64e4a536011ef3f68d2e8b4253624f60995025064de38f3a38308dd005421" => :el_capitan - sha256 "1c891f4297c26269136c5caa5be3ab721cbb8e5b53c83daf3440082df4edf6a2" => :yosemite - sha256 "55e35fe682d2bfd5b4e13d7e66302d79033766056e55b0031ce649ad582b30e3" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "redland" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/regex-opt.rb b/Formula/regex-opt.rb deleted file mode 100644 index bc12523176edc..0000000000000 --- a/Formula/regex-opt.rb +++ /dev/null @@ -1,24 +0,0 @@ -class RegexOpt < Formula - desc "Perl-compatible regular expression optimizer" - homepage "https://bisqwit.iki.fi/source/regexopt.html" - url "https://bisqwit.iki.fi/src/arch/regex-opt-1.2.4.tar.gz" - sha256 "128c8ba9570b1fd8a6a660233de2f5a4022740bc5ee300300709c3894413883f" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "76b26dc9e766e7a8b0806660e966e3a49c593591b94d90439f89b7cbc797d019" => :mojave - sha256 "0e46dec5d46b145e32ca597c00c75fea2e7097e57c5d3131be141e5bea2b96db" => :high_sierra - sha256 "68b5f75c9fdb645334ae8a48a5b7e01620e19d5f103811579cb8bf96101c6ac7" => :sierra - end - - def install - system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" - bin.install "regex-opt" - end - - test do - output = shell_output("#{bin}/regex-opt foo...*..*bar") - assert_equal "foo.{3,}bar", output - end -end diff --git a/Formula/regina-rexx.rb b/Formula/regina-rexx.rb deleted file mode 100644 index 8cc48eaa3f765..0000000000000 --- a/Formula/regina-rexx.rb +++ /dev/null @@ -1,33 +0,0 @@ -class ReginaRexx < Formula - desc "Regina REXX interpreter" - homepage "https://regina-rexx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/regina-rexx/regina-rexx/3.9.1/Regina-REXX-3.9.1.tar.gz" - sha256 "5d13df26987e27f25e7779a2efa87a5775213beeda449a9efac59b57a5d5f3ee" - - bottle do - sha256 "6b7b8db55ec8b3491edb68232d4537b3080a55953d39e05bc90e1037080656d7" => :mojave - sha256 "26829912ce6476406e696694d27d1f758bcf3c43841969bc4f4ba4587e1fc2f4" => :high_sierra - sha256 "9380b7c431fc2bc4cee9f3dc4997c9f7e568bc7884f3dc9aade5c2c73d805dbe" => :sierra - sha256 "99ea4d0288bda8704830d1c1730d63e27d68a5d4e5c0c2fe2b078ba4c8e39b63" => :el_capitan - sha256 "4be2121b50a9d988ad30b592c3123ea913a26082a2b1be7ca3ee83ae75b944d3" => :yosemite - sha256 "6f42da795be18742801fcbf740714cf9131bcb53ce44aac50a2416b3ec7607d2" => :mavericks - sha256 "d19717c2d929a7e0d4253e62e4d85751e0d57216d369f965b94c9ce89ff34eb5" => :mountain_lion - end - - def install - ENV.deparallelize # No core usage for you, otherwise race condition = missing files. - system "./configure", "--disable-debug", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test").write <<~EOS - #!#{bin}/regina - Parse Version ver - Say ver - EOS - chmod 0755, testpath/"test" - assert_match version.to_s, shell_output(testpath/"test") - end -end diff --git a/Formula/regldg.rb b/Formula/regldg.rb deleted file mode 100644 index 3286e74a85cf2..0000000000000 --- a/Formula/regldg.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Regldg < Formula - desc "Regular expression grammar language dictionary generator" - homepage "https://regldg.com/" - url "https://regldg.com/regldg-1.0.0.tar.gz" - sha256 "cd550592cc7a2f29f5882dcd9cf892875dd4e84840d8fe87133df9814c8003f1" - - bottle do - cellar :any_skip_relocation - sha256 "15f7e95f3d84d091a942e836ab9a27b3df2594e3f378da26f10371e7ba01be5c" => :mojave - sha256 "45950c0b432b227711570e3b9ea79fe9bf96b3239a062c5a736f9a3fdf294fb5" => :high_sierra - sha256 "26f12ca7e41b36a167d94f403b97557490fd1ad0ed1a2d4d0b30c86164ae9d39" => :sierra - sha256 "52c64d6766b68a1ed602d3878368109d3ac3e5e60d6fc14a4606518d14f6e678" => :el_capitan - sha256 "c4157a77e2620b868b2dbbb3ebf126193b238c6a69d2a895420950d4203d7a17" => :yosemite - sha256 "4b3d32f6aef97ad10f581d455f4e2d97babb42e5abe749a2f746a91f10051cc6" => :mavericks - end - - def install - system "make" - bin.install "regldg" - end - - test do - system "#{bin}/regldg", "test" - end -end diff --git a/Formula/rem.rb b/Formula/rem.rb deleted file mode 100644 index 64e9d744e1999..0000000000000 --- a/Formula/rem.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Rem < Formula - desc "Command-line tool to access OSX Reminders.app database" - homepage "https://github.com/kykim/rem" - url "https://github.com/kykim/rem/archive/20150618.tar.gz" - sha256 "e57173a26d2071692d72f3374e36444ad0b294c1284e3b28706ff3dbe38ce8af" - - bottle do - cellar :any_skip_relocation - sha256 "4226be6dc999a4467a061055cb36a68babe84a835f40f32a5a23f6137ddd59b4" => :mojave - sha256 "0a3365c8653023f2b4de8c5b6243aec2de7c180d1be982adcdbe58afc159800e" => :high_sierra - sha256 "326f7a21f696b7614a55a5edeb57e08482ff7b4c72506bcecff5deaa0552828e" => :sierra - sha256 "c9892df4f6aa5d58097e4cc4d62388ccbb1e0c02604b1139cfe829d47d992442" => :el_capitan - sha256 "d9a6303ff3935923ba53d093e95387caaf24460a4cd7fb7d330fa5c3988b551c" => :yosemite - sha256 "bf65e89ec4ca486b95f04c1c737627b2e0091af8a5c137795e521b96664d75e2" => :mavericks - sha256 "3c858e09bce1941b84ca3e5d77163cac4e3b7efcd6a1afcc72354a450c8ee495" => :mountain_lion - end - - depends_on :xcode => :build - - conflicts_with "remind", :because => "both install `rem` binaries" - - def install - xcodebuild "SYMROOT=build" - bin.install "build/Release/rem" - end - - test do - system "#{bin}/rem", "version" - end -end diff --git a/Formula/remake.rb b/Formula/remake.rb deleted file mode 100644 index 1ad7a9d412f1f..0000000000000 --- a/Formula/remake.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Remake < Formula - desc "GNU Make with improved error handling, tracing, and a debugger" - homepage "https://bashdb.sourceforge.io/remake" - url "https://downloads.sourceforge.net/project/bashdb/remake/4.2%2Bdbg-1.4/remake-4.2.1%2Bdbg-1.4.tar.bz2" - version "4.2.1-1.4" - sha256 "55df3b2586ab90ac0983a049f1911c4a1d9b68f7715c69768fbb0405e96a0e7b" - - bottle do - sha256 "7eca51d8dbc43ec7f6bf9466f25cbe8b25f6a267def2125c0b1a4c686f85368a" => :mojave - sha256 "3d3ab44424002f01faba037c83e6d0bf19f9477c71ebd63191f565f87574238e" => :high_sierra - sha256 "6b8bcf13f7d7b879c005fa90e2d0afeade5ebf04887330aa5905bde2923e7186" => :sierra - sha256 "ea8af9ddc7a22e0708ea44345c78fd0c900cef791096cc1091157580de152297" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"Makefile").write <<~EOS - all: - \techo "Nothing here, move along" - EOS - system bin/"remake", "-x" - end -end diff --git a/Formula/remarshal.rb b/Formula/remarshal.rb deleted file mode 100644 index 2e1d4d036bd17..0000000000000 --- a/Formula/remarshal.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Remarshal < Formula - include Language::Python::Virtualenv - - desc "Convert between TOML, YAML and JSON" - homepage "https://github.com/dbohdan/remarshal" - url "https://github.com/dbohdan/remarshal/archive/v0.9.0.tar.gz" - sha256 "e763cd57f4418a537c9a4e219e43bc5153303a2041af673fda682a3767fc0d5d" - head "https://github.com/dbohdan/remarshal.git" - - bottle do - cellar :any_skip_relocation - sha256 "66e3bccb7bc75ecc2487ca466f841759df7682a8fcc7bcd9f69dc6874ad522cd" => :mojave - sha256 "892eefe20149da6bdf0a6309f98158706eb882081d51976d5c62fa9d4d3f1bc9" => :high_sierra - sha256 "e44e9f1f7ef7fc6ccbf46899ee1757198c45618c629a9c5e189eb1c3f1c81678" => :sierra - end - - depends_on "python" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "pytoml" do - url "https://files.pythonhosted.org/packages/35/35/da1123673c54b6d701453fcd20f751d6a1fae43339b3993ae458875576e4/pytoml-0.1.20.tar.gz" - sha256 "ca2d0cb127c938b8b76a9a0d0f855cf930c1d50cc3a0af6d3595b566519a1013" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/0e/01/68747933e8d12263d41ce08119620d9a7e5eb72c876a3442257f74490da0/python-dateutil-2.7.5.tar.gz" - sha256 "88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - - ["toml", "yaml", "json"].permutation(2).each do |informat, outformat| - bin.install_symlink "remarshal" => "#{informat}2#{outformat}" - end - end - - test do - json = <<~EOS.chomp - {"foo.bar":"baz","qux":1} - EOS - yaml = <<~EOS.chomp - foo.bar: baz - qux: 1 - - EOS - toml = <<~EOS.chomp - "foo.bar" = "baz" - qux = 1 - - EOS - assert_equal yaml, pipe_output("#{bin}/remarshal -if=json -of=yaml", json) - assert_equal yaml, pipe_output("#{bin}/json2yaml", json) - assert_equal toml, pipe_output("#{bin}/remarshal -if=yaml -of=toml", yaml) - assert_equal toml, pipe_output("#{bin}/yaml2toml", yaml) - assert_equal json, pipe_output("#{bin}/remarshal -if=toml -of=json", toml).chomp - assert_equal json, pipe_output("#{bin}/toml2json", toml).chomp - end -end diff --git a/Formula/remctl.rb b/Formula/remctl.rb deleted file mode 100644 index e4127cba59d17..0000000000000 --- a/Formula/remctl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Remctl < Formula - desc "Client/server application for remote execution of tasks" - homepage "https://www.eyrie.org/~eagle/software/remctl/" - url "https://archives.eyrie.org/software/kerberos/remctl-3.15.tar.xz" - sha256 "873c9fbba51ff721acb666e927f58f4407f08eb79f53b5a058801f5f404f4db2" - - bottle do - sha256 "f2497816a9b4f36e804de521937b994292369f2c28099430cbc81e00ecfd8f45" => :mojave - sha256 "699be918b80d41c46ec8aabb4e04219123fec8beb60f1169c33b8a14ef7e24c1" => :high_sierra - sha256 "3dfefe916442dcae4f049f56673ce735ee84b931423b184f4d7fab770d7a5f39" => :sierra - sha256 "301065db3a4020b2237268eee8709a639d33dac24b21a3294641f7d9beef0ab0" => :el_capitan - end - - depends_on "libevent" - depends_on "pcre" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-pcre=#{HOMEBREW_PREFIX}" - system "make", "install" - end - - test do - system "#{bin}/remctl", "-v" - end -end diff --git a/Formula/remind.rb b/Formula/remind.rb deleted file mode 100644 index fb8078f8b1411..0000000000000 --- a/Formula/remind.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Remind < Formula - desc "Sophisticated calendar and alarm" - homepage "https://www.roaringpenguin.com/products/remind" - url "https://www.roaringpenguin.com/files/download/remind-03.01.15.tar.gz" - sha256 "8adab4c0b30a556c34223094c5c74779164d5f3b8be66b8039f44b577e678ec1" - - bottle do - cellar :any_skip_relocation - sha256 "eec9be8332d946fd16913b846d163b74a1547b44682852e943c9d4af7597c726" => :mojave - sha256 "c0d65b1c0428721038f25d11e4ad00de344b34bca29e23afa5354e4efcfbd955" => :high_sierra - sha256 "b89632422362efd9660eb98e53dfe3ca62006003c34a03d3b57bb8698b3a53a1" => :sierra - sha256 "c720948c84996b651176968c096492da2242cb6b57226e04e25f9251c782491a" => :el_capitan - sha256 "b72ffda6998a1c203686b82b8e07c3132bc380fb9126a2ca22254608d3c418c8" => :yosemite - sha256 "958eafdd458799e788457837d01ef387c5368ffee6f9a6b1ce363678a9cbc8a5" => :mavericks - sha256 "fb78fa7e3df893822473b56d79d64d48ff5827c7df3ce6d518985262c99d3056" => :mountain_lion - end - - conflicts_with "rem", :because => "both install `rem` binaries" - - def install - # Remove unnecessary sleeps when running on Apple - inreplace "configure", "sleep 1", "true" - inreplace "src/init.c" do |s| - s.gsub! "sleep(5);", "" - s.gsub! /rkrphgvba\(.\);/, "" - end - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - reminders = "reminders" - (testpath/reminders).write "ONCE 2015-01-01 Homebrew Test" - assert_equal "Reminders for Thursday, 1st January, 2015:\n\nHomebrew Test\n\n", shell_output("#{bin}/remind #{reminders} 2015-01-01") - end -end diff --git a/Formula/reminiscence.rb b/Formula/reminiscence.rb deleted file mode 100644 index 5b46ad06b3ad8..0000000000000 --- a/Formula/reminiscence.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Reminiscence < Formula - desc "Flashback engine reimplementation" - homepage "http://cyxdown.free.fr/reminiscence/" - url "http://cyxdown.free.fr/reminiscence/REminiscence-0.3.7.tar.bz2" - sha256 "3e1b9d8e260e5aca086c4a95a833abb2918a2a81047df706770b8f7dcda1934f" - - bottle do - cellar :any - sha256 "cc5296f5f2da8c789307dc8416e87359f3436297aab27ccf708b9f49fafcc363" => :mojave - sha256 "ac5c1018c11c7050e248722bf6956dc6cd82a68eb7eb9db9917743815ffe027d" => :high_sierra - sha256 "5c82408dca2c80f1f11e433a94f91b9689adf701d597c0c7e8a729c54373ce41" => :sierra - sha256 "f8f3f8688125d6b24fc99df7f4d8acf29140b0fdf637dcb2d540b02600105355" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libmodplug" - depends_on "libogg" - depends_on "sdl2" - - resource "tremor" do - url "https://git.xiph.org/tremor.git", - :revision => "b56ffce0c0773ec5ca04c466bc00b1bbcaf65aef" - end - - def install - resource("tremor").stage do - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}", - "--disable-static" - system "make", "install" - end - - ENV.prepend "CPPFLAGS", "-I#{libexec}/include" - ENV.prepend "LDFLAGS", "-L#{libexec}/lib" - - system "make" - bin.install "rs" => "reminiscence" - end - - test do - system bin/"reminiscence", "--help" - end -end diff --git a/Formula/ren.rb b/Formula/ren.rb deleted file mode 100644 index 797b0ba08f000..0000000000000 --- a/Formula/ren.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ren < Formula - desc "Rename multiple files in a directory" - homepage "http://pdb.finkproject.org/pdb/package.php/ren" - url "https://www.ibiblio.org/pub/Linux/utils/file/ren-1.0.tar.gz" - sha256 "6ccf51b473f07b2f463430015f2e956b63b1d9e1d8493a51f4ebd70f8a8136c9" - - bottle do - cellar :any_skip_relocation - sha256 "dd045987a704bd9690e5466337f7a55105c25c98807e430c74ad4b8702f4b292" => :mojave - sha256 "7cf1fe07fb7a4cd0e6171f65a8fda8187973c879b8853e416c39282527f1c0ef" => :high_sierra - sha256 "bf3e11211d6884d8969fc99ccf8a42b3132dc48bd3100492a442eb5a41fdbd88" => :sierra - sha256 "966876dfcc9f36c4bc3d1358a9a8500c79d9324ebd8697033571146f1e482685" => :el_capitan - sha256 "e8ca6bb656f8daca43c6ce446dfff66625fabdedda81604745f0960b419e422a" => :yosemite - sha256 "c7be0857bfd182f310a700521b5989c36e98ea579a2cf14417d42aa4036448dd" => :mavericks - sha256 "bb6418eeee84c36043dd035db66687f558821225ed41151bb7008a33090418bf" => :mountain_lion - end - - def install - system "make" - bin.install "ren" - man1.install "ren.1" - end - - test do - touch "test1.foo" - touch "test2.foo" - system bin/"ren", "*.foo", "#1.bar" - assert_predicate testpath/"test1.bar", :exist? - assert_predicate testpath/"test2.bar", :exist? - refute_predicate testpath/"test1.foo", :exist? - refute_predicate testpath/"test2.foo", :exist? - end -end diff --git a/Formula/rename.rb b/Formula/rename.rb deleted file mode 100644 index 66916f115822d..0000000000000 --- a/Formula/rename.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rename < Formula - desc "Perl-powered file rename script with many helpful built-ins" - homepage "http://plasmasturm.org/code/rename" - url "https://github.com/ap/rename/archive/v1.600.tar.gz" - sha256 "538fa908c9c2c4e7a08899edb6ddb47f7cbeb9b1a1d04e003d3c19b56fcc7f88" - revision 1 - - head "https://github.com/ap/rename.git" - - bottle do - cellar :any_skip_relocation - sha256 "5955aab33b5eb7ac76fb48870451f110caf8057cf76550bebf095f10fff38080" => :mojave - sha256 "b40d758f416765733e0071705fae180c62c63058b350c379b9f36da9da98fad1" => :high_sierra - sha256 "b40d758f416765733e0071705fae180c62c63058b350c379b9f36da9da98fad1" => :sierra - sha256 "b40d758f416765733e0071705fae180c62c63058b350c379b9f36da9da98fad1" => :el_capitan - end - - conflicts_with "util-linux", :because => "both install `rename` binaries" - - def install - system "pod2man", "rename", "rename.1" - bin.install "rename" - man1.install "rename.1" - end - - test do - touch "foo.doc" - system "#{bin}/rename -s .doc .txt *.d*" - refute_predicate testpath/"foo.doc", :exist? - assert_predicate testpath/"foo.txt", :exist? - end -end diff --git a/Formula/renameutils.rb b/Formula/renameutils.rb deleted file mode 100644 index ed8f7e80e6eb4..0000000000000 --- a/Formula/renameutils.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Renameutils < Formula - desc "Tools for file renaming" - homepage "https://www.nongnu.org/renameutils/" - url "https://download.savannah.gnu.org/releases/renameutils/renameutils-0.12.0.tar.gz" - sha256 "cbd2f002027ccf5a923135c3f529c6d17fabbca7d85506a394ca37694a9eb4a3" - revision 1 - - bottle do - cellar :any - sha256 "51ad6b4a1f1af47401ac72df0acb00eacbdbcbf9dc02b0dfe41dcae76e253bf3" => :mojave - sha256 "231874956b8d016cf8c8e9c70b889d61f849b718b5ed291231d8d3b1d425b071" => :high_sierra - sha256 "56f37984343df2fc7a632a447c8c008dbd1d775c71a1b190b9c2bd2296862b77" => :sierra - sha256 "69c7381af949af84d3e7cd61cbec789e3d790c154fb3cb9916b1e74730a5fbce" => :el_capitan - sha256 "3854a97491ab39937687fd00623e4786205163f87522e901bbd7cca6e054b574" => :yosemite - end - - depends_on "coreutils" - depends_on "readline" # Use instead of system libedit - - conflicts_with "ipmiutil", :because => "both install `icmd` binaries" - conflicts_with "irods", :because => "both install `icp` and `imv` binaries" - - # Use the GNU versions of certain system utilities. See: - # https://trac.macports.org/ticket/24525 - # Patches rewritten at version 0.12.0 to handle file changes. - # The fourth patch is new and fixes a Makefile syntax error that causes - # make install to fail. Reported upstream via email and fixed in HEAD. - # Remove patch #4 at version > 0.12.0. The first three should persist. - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-packager=Homebrew" - system "make" - ENV.deparallelize # parallel install fails - system "make", "install" - end - - test do - (testpath/"test.txt").write "Hello World!" - pipe_output("#{bin}/icp test.txt", ".2\n") - assert_equal File.read("test.txt"), File.read("test.txt.2") - end -end - -__END__ ---- a/src/apply.c -+++ b/src/apply.c -@@ -72,9 +72,9 @@ perform_command(FileSpec *spec) - if (force_command != NULL) - command = force_command; - else if (strcmp(program, "qmv") == 0) -- command = "mv"; -+ command = "gmv"; - else -- command = "cp"; -+ command = "gcp"; - - child = fork(); - if (child < 0) { ---- a/src/icmd.c -+++ b/src/icmd.c -@@ -45,8 +45,8 @@ - #include "common/string-utils.h" - #include "common/common.h" - --#define MV_COMMAND "mv" --#define CP_COMMAND "cp" -+#define MV_COMMAND "gmv" -+#define CP_COMMAND "gcp" - /* This list should be up to date with mv and cp! - * It was last updated on 2007-11-30 for - * Debian coreutils 5.97-5.4 in unstable. ---- a/src/qcmd.c 2011-08-21 10:15:51.000000000 -0700 -+++ b/src/qcmd.c 2012-06-28 15:51:48.000000000 -0700 -@@ -239,7 +239,7 @@ - editor_program = xstrdup(editor_program); - - if (ls_program == NULL) -- ls_program = xstrdup("ls"); -+ ls_program = xstrdup("gls"); - - /* Parse format options */ - if (format_options != NULL && !format->parse_options(format_options)) ---- a/src/Makefile.in 2012-04-23 04:24:10.000000000 -0700 -+++ b/src/Makefile.in 2012-06-29 00:42:45.000000000 -0700 -@@ -1577,7 +1577,7 @@ - @[ -f icp ] || (echo $(LN_S) icmd icp ; $(LN_S) icmd icp) - - install-exec-local: -- $(mkdir_p) $(DESTDIR)($bindir) -+ $(mkdir_p) $(DESTDIR)$(bindir) - @[ -f $(DESTDIR)$(bindir)/qmv ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv) - @[ -f $(DESTDIR)$(bindir)/qcp ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp) - @[ -f $(DESTDIR)$(bindir)/imv ] || (echo $(LN_S) icmd $(DESTDIR)$(bindir)/imv ; $(LN_S) icmd $(DESTDIR)$(bindir)/imv) diff --git a/Formula/reop.rb b/Formula/reop.rb deleted file mode 100644 index 76c861768bc98..0000000000000 --- a/Formula/reop.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Reop < Formula - desc "Encrypted keypair management" - homepage "https://web.archive.org/web/20170706070539/www.tedunangst.com/flak/post/reop" - url "https://web.archive.org/web/20170706070539/www.tedunangst.com/flak/files/reop-2.1.0.tgz" - mirror "https://bo.mirror.garr.it/OpenBSD/distfiles/reop-2.1.0.tgz" - sha256 "e429c7ff47f130bd465eaa0c23a1783b476bc484d32793592b54a568b55e49af" - revision 3 - - bottle do - cellar :any - sha256 "bde75b5da1a958623875e6b05c1d208ea22b712549164a37c7e68f9ee2d5aadf" => :mojave - sha256 "e83e45b44f322b38e9476623d7a2e595b593a8499e06c94dd1124a10d59c0d49" => :high_sierra - sha256 "8c0d3dd8ebe6732ec4d7820da74e12d7dc6b57ab79548063b1619213dbe79c19" => :sierra - sha256 "a0d7ad0c9059426b6400b9294d27a7672789da0cabe051faf11b46b1121684d0" => :el_capitan - end - - depends_on "libsodium" - - def install - system "make", "-f", "GNUmakefile" - bin.install "reop" - man1.install "reop.1" - end - - test do - (testpath/"pubkey").write <<~EOS - -----BEGIN REOP PUBLIC KEY----- - ident:root - RWRDUxZNDeX4wcynGeCr9Bro6Ic7s1iqi1XHYacEaHoy+7jOP+ZE0yxR+2sfaph2MW15e8eUZvvI - +lxZaqFZR6Kc4uVJnvirIK97IQ== - -----END REOP PUBLIC KEY----- - EOS - - (testpath/"msg").write <<~EOS - testing one two three four - EOS - - (testpath/"sig").write <<~EOS - -----BEGIN REOP SIGNATURE----- - ident:root - RWQWTQ3l+MHMpx8RO/+BX/xxHn0PiSneiJ1Au2GurAmx4L942nZFBRDOVw2xLzvp/RggTVTZ46k+ - GLVjoS6fSuLneCfaoRlYHgk= - -----END REOP SIGNATURE----- - EOS - - system "#{bin}/reop", "-V", "-x", "sig", "-p", "pubkey", "-m", "msg" - end -end diff --git a/Formula/repl.rb b/Formula/repl.rb deleted file mode 100644 index 336664dd52d3c..0000000000000 --- a/Formula/repl.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Repl < Formula - desc "Wrap non-interactive programs with a REPL" - homepage "https://github.com/defunkt/repl" - url "https://github.com/defunkt/repl/archive/v1.0.0.tar.gz" - sha256 "d0542404f03159b0d6eb22a1aa4a509714c87c8594fca5121c578d50d950307d" - - bottle :unneeded - - def install - bin.install "bin/repl" - man1.install "man/repl.1" - end - - test do - pipe_output("#{bin}/repl git", "init", 0) - end -end diff --git a/Formula/repo.rb b/Formula/repo.rb deleted file mode 100644 index 05878ae0984b8..0000000000000 --- a/Formula/repo.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Repo < Formula - desc "Repository tool for Android development" - homepage "https://source.android.com/source/developing.html" - url "https://gerrit.googlesource.com/git-repo.git", - :tag => "v1.13.1", - :revision => "12ee5446e9eb8b9d0ae5425fb1e00bf05f93facd" - version_scheme 1 - - bottle :unneeded - - def install - bin.install "repo" - doc.install (buildpath/"docs").children - end - - test do - assert_match "usage:", shell_output("#{bin}/repo help 2>&1", 1) - end -end diff --git a/Formula/reposurgeon.rb b/Formula/reposurgeon.rb deleted file mode 100644 index 1a6e90e96ae23..0000000000000 --- a/Formula/reposurgeon.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Reposurgeon < Formula - desc "Edit version-control repository history" - homepage "http://www.catb.org/esr/reposurgeon/" - url "https://gitlab.com/esr/reposurgeon.git", - :tag => "3.44", - :revision => "f37fa1aa8e3235bb4c64cbcd9e85a6907b4dea50" - head "https://gitlab.com/esr/reposurgeon.git" - - bottle do - cellar :any_skip_relocation - sha256 "9666a908f723015481c74de2aa895ff09f55a8a66cda57317c681593d0cf87f2" => :mojave - sha256 "8dae663f9138b383b4fdbe1f8a66b87cbb05f518ae929441ff46707b5bade762" => :high_sierra - sha256 "2dc5be9011fa4d7aad8f5ecc6ff125876a61769341d15661f93513e5603a8733" => :sierra - sha256 "d0ff9f9c06bd124bc9e8dc31bf59eaae1a28b124234d4b359ad719144cdff9ab" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "pypy" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "make", "install", "prefix=#{prefix}" - elisp.install "reposurgeon-mode.el" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - system "git", "commit", "--allow-empty", "--message", "brewing" - - assert_match "brewing", - shell_output("script -q /dev/null #{bin}/reposurgeon read list") - end -end diff --git a/Formula/residualvm.rb b/Formula/residualvm.rb deleted file mode 100644 index 411fb123d2dac..0000000000000 --- a/Formula/residualvm.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Residualvm < Formula - desc "3D graphic adventure game interpreter" - homepage "http://residualvm.org" - url "https://downloads.sourceforge.net/project/residualvm/residualvm/0.2.1/residualvm-0.2.1-sources.tar.bz2" - sha256 "cd2748a665f80b8c527c6dd35f8435e718d2e10440dca10e7765574c7402d924" - revision 1 - head "https://github.com/residualvm/residualvm.git" - - bottle do - sha256 "0b47a9b302d06c18d28d89703a99e2e66bac92a49430c10f48832e0300a5858f" => :mojave - sha256 "783c6c9e017d19eb2e41d95887a5af3fdeb74a649e9369a641bfc750d2552cb0" => :high_sierra - sha256 "8281bb6898adfa48808f9d0217b6365918f3dc499dd026723be595644545a43b" => :sierra - sha256 "35d2a278927c3f38e099581c5b8ef684c75adc84f2e8bfbc3eaa422738e195ea" => :el_capitan - sha256 "1d8666ce740532b37383960334000dd2f935398dfcee9484885e5f5022612f10" => :yosemite - end - - depends_on "faad2" - depends_on "flac" - depends_on "fluid-synth" - depends_on "freetype" - depends_on "jpeg" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mad" - depends_on "sdl" - depends_on "theora" - - def install - system "./configure", "--prefix=#{prefix}", "--enable-release" - system "make" - system "make", "install" - (share+"icons").rmtree - (share+"pixmaps").rmtree - end - - test do - system "#{bin}/residualvm", "-v" - end -end diff --git a/Formula/resin-cli.rb b/Formula/resin-cli.rb deleted file mode 100644 index 1d62468a81495..0000000000000 --- a/Formula/resin-cli.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class ResinCli < Formula - desc "The official resin.io CLI tool" - homepage "https://docs.resin.io/reference/cli/" - # Frequent upstream releases, do not update more than once a week - url "https://registry.npmjs.org/resin-cli/-/resin-cli-8.0.2.tgz" - sha256 "4e1696d6b7f7724672ca11ee6d3d38d583869cc1ea3718fd1694bebc8d62aa3a" - - bottle do - sha256 "1e11dca0cab1b9760c80c23f160477df9fe3b86b75928fd4d4d33d03dabdadf8" => :mojave - sha256 "b92c9b701edf03e4ea22b525c41c972b1c8f3d8ab077bc9c2b6b22e317e992de" => :high_sierra - sha256 "71801af30f21f8d4bd6b2e8fb1b4508aca379080a7126a8359bbdfa8b79495a8" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - output = shell_output("#{bin}/resin login --credentials --email johndoe@gmail.com --password secret", 1) - assert_match "Logging in to resin.io", output - end -end diff --git a/Formula/rest-shell.rb b/Formula/rest-shell.rb deleted file mode 100644 index c5a9994d4c099..0000000000000 --- a/Formula/rest-shell.rb +++ /dev/null @@ -1,18 +0,0 @@ -class RestShell < Formula - desc "Shell to work with Spring HATEOAS-compliant REST resources" - homepage "https://github.com/spring-projects/rest-shell" - url "http://download.gopivotal.com/rest-shell/1.2.1/rest-shell-1.2.1.RELEASE.tar.gz" - version "1.2.1.RELEASE" - sha256 "0ecfa67d005cc0d51e7a3a26c4dacc53aa12012f0e757332a2fa40c5e780c2d6" - - bottle :unneeded - - def install - libexec.install Dir["*"] - bin.write_exec_script libexec/"bin/rest-shell" - end - - test do - system "#{bin}/rest-shell" - end -end diff --git a/Formula/restic.rb b/Formula/restic.rb deleted file mode 100644 index cc45b211a003a..0000000000000 --- a/Formula/restic.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Restic < Formula - desc "Fast, efficient and secure backup program" - homepage "https://restic.github.io/" - url "https://github.com/restic/restic/archive/v0.9.4.tar.gz" - sha256 "c7dca90fb6fd83cee8b9f6a2776f5839794341af1953d251bf06a91870be7a8e" - head "https://github.com/restic/restic.git" - - bottle do - cellar :any_skip_relocation - sha256 "a5280c51d22c55696e877a16f932f25ff4d71b85063f2932eadc542bf043e516" => :mojave - sha256 "6d86bf805fe4e102adda32d856a35d5fd3008f6a8803a42f92b7f3ab740e2223" => :high_sierra - sha256 "815f61f1f227974a9185de81f851b07e2d2d95ea297780e3a41a7f5b5aef3754" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - - system "go", "run", "build.go" - - mkdir "completions" - system "./restic", "generate", "--bash-completion", "completions/restic" - system "./restic", "generate", "--zsh-completion", "completions/_restic" - - mkdir "man" - system "./restic", "generate", "--man", "man" - - bin.install "restic" - bash_completion.install "completions/restic" - zsh_completion.install "completions/_restic" - man1.install Dir["man/*.1"] - end - - test do - mkdir testpath/"restic_repo" - ENV["RESTIC_REPOSITORY"] = testpath/"restic_repo" - ENV["RESTIC_PASSWORD"] = "foo" - - (testpath/"testfile").write("This is a testfile") - - system "#{bin}/restic", "init" - system "#{bin}/restic", "backup", "testfile" - - system "#{bin}/restic", "restore", "latest", "-t", "#{testpath}/restore" - assert compare_file "testfile", "#{testpath}/restore/testfile" - end -end diff --git a/Formula/restund.rb b/Formula/restund.rb deleted file mode 100644 index 7a11536ded5f2..0000000000000 --- a/Formula/restund.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Restund < Formula - desc "Modular STUN/TURN server" - homepage "http://www.creytiv.com" - url "http://www.creytiv.com/pub/restund-0.4.12.tar.gz" - sha256 "3170441dc882352ab0275556b6fc889b38b14203d936071b5fa12f39a5c86d47" - - bottle do - cellar :any - sha256 "489f651680461d466ab162ecbbc9f4e7acc554e3701b13828a5998de3e8accc4" => :mojave - sha256 "05a527dfb0207ebd9b8a94ce4307ec0f106fa3c085851476eb36c27515d9b9fb" => :high_sierra - sha256 "b54c91bb6457a8af37e55064d9f5093212ae7dc7c53863f4344f0862a0e6706e" => :sierra - sha256 "520b20cfdfb1cb5da1ee3a147a707802f6cc77a289c80e2b04a4299446e67408" => :el_capitan - end - - depends_on "libre" - - def install - libre = Formula["libre"] - system "make", "install", "PREFIX=#{prefix}", - "LIBRE_MK=#{libre.opt_share}/re/re.mk", - "LIBRE_INC=#{libre.opt_include}/re", - "LIBRE_SO=#{libre.opt_lib}" - system "make", "config", "DESTDIR=#{prefix}", - "PREFIX=#{prefix}", - "LIBRE_MK=#{libre.opt_share}/re/re.mk", - "LIBRE_INC=#{libre.opt_include}/re", - "LIBRE_SO=#{libre.opt_lib}" - end - - test do - system "#{sbin}/restund", "-h" - end -end diff --git a/Formula/restview.rb b/Formula/restview.rb deleted file mode 100644 index dc428eca7ef4d..0000000000000 --- a/Formula/restview.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Restview < Formula - desc "Viewer for ReStructuredText documents that renders them on the fly" - homepage "https://mg.pov.lt/restview/" - url "https://github.com/mgedmin/restview/archive/2.9.1.tar.gz" - sha256 "a229119f7730c85ec75e4372c4cf69f9d846381ac4bdbc8ed672302a80c116d2" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f921ce885b343dae99d1e76b7d26fb1c4aaf6561040533b36389c79cf7e4c982" => :mojave - sha256 "f8133cfdbcbf588cf0625ab3bedcd760e27da652913139b4c163d18a002730a7" => :high_sierra - sha256 "de0d55f13c376469abd7f21dfdaa29d3c794673091324dc446b9334e0be884d1" => :sierra - end - - depends_on "python" - - resource "bleach" do - url "https://files.pythonhosted.org/packages/eb/ea/58428609442130dc31d3a59010bf6cbd263a16c589d01d23b7c1e6997e3b/bleach-2.1.3.tar.gz" - sha256 "eb7386f632349d10d9ce9d4a838b134d4731571851149f9cc2c05a9a837a9a44" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cmarkgfm" do - url "https://files.pythonhosted.org/packages/e2/a3/4021fbc17c5afe7f307d14eba0d6899a8e66b351ab65649b1c89c50a836d/cmarkgfm-0.4.2.tar.gz" - sha256 "f20900f16377f2109783ae9348d34bc80530808439591c3d3df73d5c7ef1a00c" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "html5lib" do - url "https://files.pythonhosted.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz" - sha256 "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - resource "readme_renderer" do - url "https://files.pythonhosted.org/packages/c8/aa/4b98370d8a5af38d2f9b75660e1240fa6f686fac4daae22a4172467d5574/readme_renderer-20.0.tar.gz" - sha256 "bde909eaa84d65b7942f7e6998c8b427b90b568b2630ff0306f4ca75f6d2a909" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - resource "sample" do - url "https://raw.githubusercontent.com/mgedmin/restview/140e23ad6604d52604bc11978fd13d3199150862/sample.rst" - sha256 "5a15b5f11adfdd5f895aa2e1da377c8d8d0b73565fe68f51e01399af05612ea3" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - res = resources.reject { |r| r.name == "sample" } - - res.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - testpath.install resource("sample") - - begin - pid = fork do - exec bin/"restview", "--listen=#{port}", "--no-browser", "sample.rst" - end - sleep 1 - output = shell_output("curl -s 127.0.0.1:#{port}") - assert_match "

    Here we have a numbered list

    ", output - ensure - Process.kill("TERM", pid) - end - end -end diff --git a/Formula/resty.rb b/Formula/resty.rb deleted file mode 100644 index fc7bef1e3a2e4..0000000000000 --- a/Formula/resty.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Resty < Formula - desc "Command-line REST client that can be used in pipelines" - homepage "https://github.com/micha/resty" - url "https://github.com/micha/resty/archive/v3.0.tar.gz" - sha256 "9ed8f50dcf70a765b3438840024b557470d7faae2f0c1957a011ebb6c94b9dd1" - head "https://github.com/micha/resty.git" - - bottle do - cellar :any_skip_relocation - sha256 "beee774062f1c32a72f203d0c8c5b0900ce85589c32b385ade712b74e5e1c73b" => :mojave - sha256 "e65c38b826157c35f2e3acd50846be691b6b1a6231a23c62567c24a052d0dc7e" => :high_sierra - sha256 "fb754eb95b4cb573eef1807f5dcddab59e021a4326022a9fb8126fb8e80ff247" => :sierra - sha256 "435854dd9bc54f09e46f3f895fc0801ce90a30b23b8d9f109f361f89666fcfe1" => :el_capitan - end - - resource "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-2.94.tar.gz" - sha256 "12271b5cee49943bbdde430eef58f1fe64ba6561980b22c69585e08fc977dc6d" - end - - def install - pkgshare.install "resty" - - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resource("JSON").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - bin.install "pp" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - - bin.install "pypp" - end - - def caveats; <<~EOS - To activate the resty, add the following at the end of your #{shell_profile}: - source #{opt_pkgshare}/resty - EOS - end - - test do - cmd = "zsh -c '. #{pkgshare}/resty && resty https://api.github.com' 2>&1" - assert_equal "https://api.github.com*", shell_output(cmd).chomp - json_pretty_pypp=<<~EOS - { - "a": 1 - } - EOS - json_pretty_pp=<<~EOS - { - "a" : 1 - } - EOS - assert_equal json_pretty_pypp, pipe_output("#{bin}/pypp", '{"a":1}', 0) - assert_equal json_pretty_pp, pipe_output("#{bin}/pp", '{"a":1}', 0).chomp - end -end diff --git a/Formula/rethinkdb.rb b/Formula/rethinkdb.rb deleted file mode 100644 index 353964805907a..0000000000000 --- a/Formula/rethinkdb.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Rethinkdb < Formula - desc "The open-source database for the realtime web" - homepage "https://www.rethinkdb.com/" - url "https://download.rethinkdb.com/dist/rethinkdb-2.3.6.tgz" - sha256 "c42159666910ad01be295a57caf8839ec3a89227d8919be5418e3aa1f0a3dc28" - - bottle do - cellar :any - sha256 "ba85df2995a353785371e679d208e711c4b34bf8fdff2007dd4f366fe9dfde51" => :mojave - sha256 "eaa4700adc14905f388602c44008cbefcd2ac5c22a4a23e6871058a5f1a2a7ca" => :high_sierra - sha256 "1f936e43b0cb7b321d9a14a2f2de994154162ca5bb656c8583506ca253eadf6b" => :sierra - sha256 "d090123ea89626f60caa5517b1416b669d3cacfd51fcedfdcd6f58020e941190" => :el_capitan - sha256 "a17c6864cef6dfc7f1e8ab7da2fcd640d85a504991c0d61175e2f6c78e1ba6ee" => :yosemite - end - - depends_on "boost" => :build - depends_on :macos => :lion - depends_on "openssl" - - fails_with :gcc do - build 5666 # GCC 4.2.1 - cause "RethinkDB uses C++0x" - end - - # Fix error with Xcode 9, patch merged upstream: - # https://github.com/rethinkdb/rethinkdb/pull/6450 - if DevelopmentTools.clang_build_version >= 900 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/fb00ee376a/rethinkdb/xcode9.patch" - sha256 "abd50d91a247ee7de988020dd9d405a3d4cd93edb2875b7d5822ba0f513f85a0" - end - end - - def install - args = ["--prefix=#{prefix}"] - - # rethinkdb requires that protobuf be linked against libc++ - # but brew's protobuf is sometimes linked against libstdc++ - args += ["--fetch", "protobuf"] - - system "./configure", *args - system "make" - system "make", "install-osx" - - (var/"log/rethinkdb").mkpath - - inreplace "packaging/assets/config/default.conf.sample", - /^# directory=.*/, "directory=#{var}/rethinkdb" - etc.install "packaging/assets/config/default.conf.sample" => "rethinkdb.conf" - end - - plist_options :manual => "rethinkdb" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/rethinkdb - --config-file - #{etc}/rethinkdb.conf - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/log/rethinkdb/rethinkdb.log - StandardErrorPath - #{var}/log/rethinkdb/rethinkdb.log - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - shell_output("#{bin}/rethinkdb create -d test") - assert File.read("test/metadata").start_with?("RethinkDB") - end -end diff --git a/Formula/rex.rb b/Formula/rex.rb deleted file mode 100644 index a17bfc256d740..0000000000000 --- a/Formula/rex.rb +++ /dev/null @@ -1,282 +0,0 @@ -class Rex < Formula - desc "Command-line tool which executes commands on remote servers" - homepage "https://www.rexify.org" - url "https://cpan.metacpan.org/authors/id/J/JF/JFRIED/Rex-1.5.0.tar.gz" - sha256 "c042a0ed4920070d4508b6e7d2c36d28b3a5691938f2e0a0d7717977b44b82d0" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "1157e558598fb20ff11203c9e0d2aa0109631d1e7e5942cab09c1547303f16c9" => :mojave - sha256 "887d7eef9979e6b9933ea009fc1c97f922d73ca1d4317fb4636b51b5cf58b5cb" => :high_sierra - sha256 "f3ff192a1f3b7bdb43434af70d0f7a603d7e7790634b5b479735fbc049014ab8" => :sierra - sha256 "abb8c9c4549b4c73bfa84de1d5472ee89fb4203ff2abbdba7b98208b349b3bab" => :el_capitan - end - - depends_on "perl" if MacOS.version <= :mountain_lion - - resource "Module::Build" do - # AWS::Signature4 requires Module::Build v0.4205 and above, while standard - # MacOS Perl installation has 0.4003 - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4222.tar.gz" - sha256 "e74b45d9a74736472b74830599cec0d1123f992760f9cd97104f94bee800b160" - end - - resource "AWS::Signature4" do - url "https://cpan.metacpan.org/authors/id/L/LD/LDS/AWS-Signature4-1.02.tar.gz" - sha256 "20bbc16cb3454fe5e8cf34fe61f1a91fe26c3f17e449ff665fcbbb92ab443ebd" - end - - resource "Clone" do - url "https://cpan.metacpan.org/authors/id/G/GA/GARU/Clone-0.38.tar.gz" - sha256 "9fb0534bb7ef6ca1f6cc1dc3f29750d6d424394d14c40efdc77832fad3cebde8" - end - - resource "Date::Parse" do - url "https://cpan.metacpan.org/authors/id/G/GB/GBARR/TimeDate-2.30.tar.gz" - sha256 "75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86" - end - - resource "Devel::Caller" do - url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Devel-Caller-2.06.tar.gz" - sha256 "6a73ae6a292834255b90da9409205425305fcfe994b148dcb6d2d6ef628db7df" - end - - resource "Encode::Locale" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz" - sha256 "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1" - end - - resource "Exporter::Tiny" do - url "https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-0.042.tar.gz" - sha256 "8f1622c5ebbfbcd519ead81df7917e48cb16cc527b1c46737b0459c3908a023f" - end - - resource "File::Listing" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/File-Listing-6.04.tar.gz" - sha256 "1e0050fcd6789a2179ec0db282bf1e90fb92be35d1171588bd9c47d52d959cf5" - end - - resource "File::Remove" do - url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/File-Remove-1.57.tar.gz" - sha256 "b3becd60165c38786d18285f770b8b06ebffe91797d8c00cc4730614382501ad" - end - - resource "HTML::Parser" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTML-Parser-3.72.tar.gz" - sha256 "ec28c7e1d9e67c45eca197077f7cdc41ead1bb4c538c7f02a3296a4bb92f608b" - end - - resource "HTML::Tagset" do - url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz" - sha256 "adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2" - end - - resource "HTTP::Cookies" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Cookies-6.01.tar.gz" - sha256 "f5d3ade383ce6389d80cb0d0356b643af80435bb036afd8edce335215ec5eb20" - end - - resource "HTTP::Daemon" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Daemon-6.01.tar.gz" - sha256 "43fd867742701a3f9fcc7bd59838ab72c6490c0ebaf66901068ec6997514adc2" - end - - resource "HTTP::Date" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Date-6.02.tar.gz" - sha256 "e8b9941da0f9f0c9c01068401a5e81341f0e3707d1c754f8e11f42a7e629e333" - end - - resource "HTTP::Message" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/HTTP-Message-6.11.tar.gz" - sha256 "e7b368077ae6a188d99920411d8f52a8e5acfb39574d4f5c24f46fd22533d81b" - end - - resource "HTTP::Negotiate" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz" - sha256 "1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016" - end - - resource "Hash::Merge" do - url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Hash-Merge-0.200.tar.gz" - sha256 "47f9f03330b7595c94e73bdd17dc6682ba59d1cc89e63f4e319617f4bb122a64" - end - - resource "IO::HTML" do - url "https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-1.001.tar.gz" - sha256 "ea78d2d743794adc028bc9589538eb867174b4e165d7d8b5f63486e6b828e7e0" - end - - resource "IO::String" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/IO-String-1.08.tar.gz" - sha256 "2a3f4ad8442d9070780e58ef43722d19d1ee21a803bf7c8206877a10482de5a0" - end - - resource "Canary::Stability" do - url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Canary-Stability-2012.tar.gz" - sha256 "fd240b111d834dbae9630c59b42fae2145ca35addc1965ea311edf0d07817107" - end - - resource "JSON::XS" do - url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/JSON-XS-3.02.tar.gz" - sha256 "5f6a5944887d75f1d34440a2d9e69ef12e23f434af23acb143fb0241f40b02be" - end - - resource "LWP" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/libwww-perl-6.15.tar.gz" - sha256 "6f349d45c21b1ec0501c4437dfcb70570940e6c3d5bff783bd91d4cddead8322" - end - - resource "LWP::MediaTypes" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/LWP-MediaTypes-6.02.tar.gz" - sha256 "18790b0cc5f0a51468495c3847b16738f785a2d460403595001e0b932e5db676" - end - - resource "List::MoreUtils" do - url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0.419.tar.gz" - sha256 "5f8e65608f5dc583faa6a703d19d277ad46dfc1816e51f8ff34fb8322ed48615" - end - - resource "Module::ScanDeps" do - url "https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.23.tar.gz" - sha256 "162b6f771197ad4662ac60c427d473b4c0a41cac476fa96b48556cce7fca040e" - end - - resource "YAML::Tiny" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.70.tar.gz" - sha256 "bbce4b52b5eafdb04e3043975a08dbf394d00b7d2c958adb9d03d9f7e9291255" - end - - resource "Module::Install" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Module-Install-1.18.tar.gz" - sha256 "29068ac33502cec959844c206516c09cc4a847cb57327d41015f605153ca645e" - end - - resource "Net::HTTP" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Net-HTTP-6.09.tar.gz" - sha256 "52762b939d84806908ba544581c5708375f7938c3c0e496c128ca3fbc425e58d" - end - - resource "Net::OpenSSH" do - url "https://cpan.metacpan.org/authors/id/S/SA/SALVA/Net-OpenSSH-0.74.tar.gz" - sha256 "bd06e66cef82b5a07585deeddc91a093b32f4d080ae6b5e8033231030a1c27b6" - end - - resource "PadWalker" do - url "https://cpan.metacpan.org/authors/id/R/RO/ROBIN/PadWalker-2.2.tar.gz" - sha256 "fc1df2084522e29e892da393f3719d2c1be0da022fdd89cff4b814167aecfea3" - end - - resource "Sort::Naturally" do - url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Sort-Naturally-1.03.tar.gz" - sha256 "eaab1c5c87575a7826089304ab1f8ffa7f18e6cd8b3937623e998e865ec1e746" - end - - resource "Term::ReadKey" do - url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz" - sha256 "4a9383cf2e0e0194668fe2bd546e894ffad41d556b41d2f2f577c8db682db241" - end - - resource "Text::Glob" do - url "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Text-Glob-0.10.tar.gz" - sha256 "d0af0549a9dd1c70edcd3b1429ccc3702b79b873375b79cd2bdfe8870e337449" - end - - resource "Types::Serialiser" do - url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Types-Serialiser-1.0.tar.gz" - sha256 "7ad3347849d8a3da6470135018d6af5fd8e58b4057cd568c3813695f2a04730d" - end - - resource "URI" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/URI-1.71.tar.gz" - sha256 "9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115" - end - - resource "WWW::RobotRules" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz" - sha256 "46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e" - end - - resource "XML::NamespaceSupport" do - url "https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz" - sha256 "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea" - end - - resource "XML::Parser" do - url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz" - sha256 "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216" - end - - resource "XML::Simple" do - url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-Simple-2.22.tar.gz" - sha256 "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49" - end - - resource "XSLoader" do - url "https://cpan.metacpan.org/authors/id/S/SA/SAPER/XSLoader-0.24.tar.gz" - sha256 "e819a35a6b8e55cb61b290159861f0dc00fe9d8c4f54578eb24f612d45c8d85f" - end - - resource "YAML" do - url "https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-1.18.tar.gz" - sha256 "c8c4ebf538b5c9b4f53bf3c80a436229b2f28ecd4dbde54e22b470791d04fd39" - end - - resource "common::sense" do - url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/common-sense-3.74.tar.gz" - sha256 "771f7d02abd1ded94d9e37d3f66e795c8d2026d04defbeb5b679ca058116bbf3" - end - - resource "inc::latest" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/inc-latest-0.500.tar.gz" - sha256 "daa905f363c6a748deb7c408473870563fcac79b9e3e95b26e130a4a8dc3c611" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV.prepend_path "PERL5LIB", libexec/"lib" - - # Spare Perl v5.23+ users a long-winded gripe from JSON::XS module's author. - # See https://github.com/RexOps/Rex/issues/1153 - ENV["PERL_CANARY_STABILITY_NOPROMPT"] = "1" - - resources.each do |res| - res.stage do - perl_build - end - end - - perl_build - (libexec/"lib").install "blib/lib/Rex", "blib/lib/Rex.pm" - inreplace "bin/rexify", "#!perl", "#!/usr/bin/env perl" - - %w[rex rexify].each do |cmd| - libexec.install "bin/#{cmd}" - chmod 0755, libexec/cmd - (bin/cmd).write_env_script(libexec/cmd, :PERL5LIB => ENV["PERL5LIB"]) - man1.install "blib/man1/#{cmd}.1" - end - end - - test do - assert_match "\(R\)\?ex #{version}", shell_output("#{bin}/rex -v"), "rex -v is expected to print out Rex version" - system bin/"rexify", "brewtest" - assert_predicate testpath/"brewtest/Rexfile", :exist?, "rexify is expected to create a new Rex project and pre-populate its Rexfile" - end - - private - - def perl_build - if File.exist? "Makefile.PL" - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "PERL5LIB=#{ENV["PERL5LIB"]}" - system "make", "install" - elsif File.exist? "Build.PL" - system "perl", "Build.PL", "--install_base", libexec - system "./Build", "PERL5LIB=#{ENV["PERL5LIB"]}" - system "./Build", "install" - else - raise "Unknown build system for #{res.name}" - end - end -end diff --git a/Formula/rfcmarkup.rb b/Formula/rfcmarkup.rb deleted file mode 100644 index 7927da9be568f..0000000000000 --- a/Formula/rfcmarkup.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Rfcmarkup < Formula - desc "Add HTML markup and links to internet-drafts and RFCs" - homepage "https://tools.ietf.org/tools/rfcmarkup/" - url "https://tools.ietf.org/tools/rfcmarkup/rfcmarkup-1.119.tgz" - sha256 "46c5522f3cba0d430019a60de0e995adbc12f055970b6b341f45181cf8deed8e" - - bottle do - cellar :any_skip_relocation - sha256 "5b39b970ed7615eda4fda38cc597f45b605491e12be8196b2cbe9dacec5e7520" => :mojave - sha256 "2b9456d420623b967415fdbaf84c9499c852b65a901aed0c4a8e74d286c3af57" => :high_sierra - sha256 "ceabc26299da811359ca9e1a410e06e9fd3a676249d0501c2436976af1e95462" => :sierra - sha256 "a15f3c6be0c5eb4b38c4801c6151d4a12b2f206ab6e9c7f11dd0cd94ba7f9e9d" => :el_capitan - sha256 "5eaeed274aca3e64cbc2407a6b9b531efed736fec325d15109b308bdbea971b4" => :yosemite - sha256 "5eaeed274aca3e64cbc2407a6b9b531efed736fec325d15109b308bdbea971b4" => :mavericks - end - - def install - bin.install "rfcmarkup" - end - - test do - system bin/"rfcmarkup", "--help" - end -end diff --git a/Formula/rfcstrip.rb b/Formula/rfcstrip.rb deleted file mode 100644 index b57f78b74382c..0000000000000 --- a/Formula/rfcstrip.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rfcstrip < Formula - desc "Strips headers and footers from RFCs and Internet-Drafts" - homepage "https://trac.tools.ietf.org/tools/rfcstrip/" - url "https://trac.tools.ietf.org/tools/rfcstrip/rfcstrip-1.03.tgz" - sha256 "db5cccb14b2dfdb5e0e3b4ac98d5af29d1f2f647787bcd470a866e02173d4e5b" - - bottle :unneeded - - resource "rfc1149" do - url "https://www.ietf.org/rfc/rfc1149.txt" - sha256 "a8660fa4f47bd5e3db1cd5d5baad983d8b6f3f1e8a1a04b8552f3c2ce8f33c18" - end - - def install - bin.install "rfcstrip" - doc.install %w[about todo] - end - - test do - resource("rfc1149").stage do - stripped = shell_output("#{bin}/rfcstrip rfc1149.txt") - assert !stripped.match(/\[Page \d+\]/) # RFC page numbering - assert !stripped.match(/\f/) # form feed a.k.a. Control-L - end - end -end diff --git a/Formula/rgbds.rb b/Formula/rgbds.rb deleted file mode 100644 index cfc3441e8c7aa..0000000000000 --- a/Formula/rgbds.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Rgbds < Formula - desc "Rednex GameBoy Development System" - homepage "https://github.com/rednex/rgbds" - url "https://github.com/rednex/rgbds/archive/v0.3.7.tar.gz" - sha256 "5ddd8b9d57e91c798f464e83fa723cdbab45376958a56a554fbfb3c417844bfc" - head "https://github.com/rednex/rgbds.git" - - bottle do - cellar :any - sha256 "b450ab98422628d5f2aef362abffce54907bff681d6ecb29bfce3cf94fea6f73" => :mojave - sha256 "814d8937cc9e989f7a69eb4df68a1b26e1863287ef45eaab40f4fb99717392f8" => :high_sierra - sha256 "f526669d5a58a35c04ee3eff2ddea03ab1af7b58ed1f035319ce0385280ab08b" => :sierra - sha256 "d7440703be2002305b713672f4bd5dacfdbcdc84ed5d7a06b9d579b9195055eb" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libpng" - - def install - system "make", "install", "PREFIX=#{prefix}", "mandir=#{man}" - end - - test do - (testpath/"source.asm").write <<~EOS - SECTION "Org $100",HOME[$100] - nop - jp begin - begin: - ld sp, $ffff - ld a, $1 - ld b, a - add a, b - EOS - system "#{bin}/rgbasm", "source.asm" - end -end diff --git a/Formula/rgxg.rb b/Formula/rgxg.rb deleted file mode 100644 index e9b3789595414..0000000000000 --- a/Formula/rgxg.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Rgxg < Formula - desc "C library and command-line tool to generate (extended) regular expressions" - homepage "https://rgxg.github.io" - url "https://github.com/rgxg/rgxg/releases/download/v0.1.1/rgxg-0.1.1.tar.gz" - sha256 "6566cd05d116475e98ceb57a5fdb25d8743f7381799aeb8e218433ff4fbb139f" - - bottle do - cellar :any - sha256 "6104ec3b5902403a86044b75d4f97f522450f42021dead1445c5a08d0b09c35a" => :mojave - sha256 "5a3dcbe7906757077109d8a6b2c6cce5389de96175392ee38daeb657da2e5e5a" => :high_sierra - sha256 "3b15445df62f8f57c4447a85cd719251f8820596548913e76d9738124d08f763" => :sierra - sha256 "e84c6dfcb4195ef84bd4c5373bfa6029ea4d8600f94b58bc97fbee7334bf3f74" => :el_capitan - sha256 "68a4566c40db42aa298862e8b2cc02dc16dfcb9f373454e48be31e0899dc6a64" => :yosemite - sha256 "6fc96e2fbf981e67c6374928430dbfd20691d59f6b5dd7b1e255284edeeb6fc5" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"rgxg", "range", "1", "10" - end -end diff --git a/Formula/rhash.rb b/Formula/rhash.rb deleted file mode 100644 index d649c33d62e33..0000000000000 --- a/Formula/rhash.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Rhash < Formula - desc "Utility for computing and verifying hash sums of files" - homepage "https://sourceforge.net/projects/rhash/" - url "https://downloads.sourceforge.net/project/rhash/rhash/1.3.6/rhash-1.3.6-src.tar.gz" - sha256 "964df972b60569b5cb35ec989ced195ab8ea514fc46a74eab98e86569ffbcf92" - revision 1 - head "https://github.com/rhash/RHash.git" - - bottle do - cellar :any - sha256 "86e6f52d5fa950c37dde8e013bd4db53eced7cd131c8049a808e173af3e1f357" => :mojave - sha256 "6a21dd55fb1b4db6566edbadb12b7d3cb72e3be1bfdf549e926d02d9dfef502a" => :high_sierra - sha256 "3025df8e67a5eaf485b38ffa48b26c91c53b56ecec4e66ae9b72fddaaa277d83" => :sierra - sha256 "1fd156f264a72fee9a6d17361db1c30513d09e90f4db04ab8c3d65d051f8d447" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - lib.install "librhash/librhash.dylib" - system "make", "-C", "librhash", "install-headers" - end - - test do - (testpath/"test").write("test") - (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test") - system "#{bin}/rhash", "-c", "test.sha1" - end -end diff --git a/Formula/rhino.rb b/Formula/rhino.rb deleted file mode 100644 index 19000fd4e3b66..0000000000000 --- a/Formula/rhino.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Rhino < Formula - desc "JavaScript engine" - homepage "https://www.mozilla.org/rhino/" - url "https://github.com/mozilla/rhino/releases/download/Rhino1_7_9_Release/rhino-1.7.9.zip" - sha256 "6fb72a1e92e99c96b34a7b2c860dd3a6e7ef7f3492f4d9678eb5339d67ad7f32" - - bottle :unneeded - - conflicts_with "nut", :because => "both install `rhino` binaries" - - def install - rhino_jar = "rhino-#{version}.jar" - libexec.install "lib/#{rhino_jar}" - bin.write_jar_script libexec/rhino_jar, "rhino" - doc.install Dir["docs/*"] - end - - test do - assert_equal "42", shell_output("#{bin}/rhino -e \"print(6*7)\"").chomp - end -end diff --git a/Formula/riak.rb b/Formula/riak.rb deleted file mode 100644 index a500a15bbde42..0000000000000 --- a/Formula/riak.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Riak < Formula - desc "Distributed database" - homepage "http://basho.com/products/riak-kv/" - url "https://github.com/basho/riak.git", - :tag => "riak-2.2.3", - :revision => "d96b67eeb5f934c673ee8e5c75c00a3861f388aa" - - bottle do - sha256 "163efe4af2492bd3885aebeafb894c2ec5f6c3cbc08cdfaf78de07deaf645336" => :high_sierra - sha256 "07304227841afc17ee201ccaed0fc8607f55c05c2f7920d5785cfda3c0979cf1" => :sierra - sha256 "98169ac6af3d395dac47522d17759ac165af24158dbc403ccc88603921f6528c" => :el_capitan - sha256 "803da1ba13fca2ff1c5ed1d341c064218a03697d8114e40c325553a430920653" => :yosemite - end - - depends_on :arch => :x86_64 - depends_on "erlang@17" - depends_on :macos => :mountain_lion - - # rebar tries to fetch fuse using git over ssh - resource "fuse" do - url "https://github.com/jlouis/fuse.git", - :revision => "21c6e52ced3af294f2fe636039106068da12eeeb" - end - - resource "hyper" do - url "https://github.com/basho/hyper.git", - :revision => "f6ed834cd8799623ec00faaedc9ef2a55876d5d8" - - # Avoid build failure "type gb_tree/0 is deprecated and will be removed in OTP - # 18.0; use use gb_trees:tree/0 or preferably gb_trees:tree/2" - # Upstream PR from 4 Oct 2016 "namespaced types for erlang 17+" - patch do - url "https://github.com/basho/hyper/pull/6.patch?full_index=1" - sha256 "e70b9b281a8b75387b7213be8df066b89f3fdfa37f7a4786df1b572024072591" - end - end - - resource "solr" do - url "https://files-source.tiot.jp/riak/solr/solr-4.10.4-yz-2.tgz", - :using => :nounzip - mirror "https://dl.bintray.com/homebrew/mirror/riak-solr-4.10.4-yz-2.tgz" - version "4.10.4-yz-2" - sha256 "4aa81ef3c67c30263b90e6dfe3a68f005e034cf7344e91eb43c2d8462dd5c53b" - end - - resource "yokozuna" do - url "https://github.com/basho/yokozuna.git", - :revision => "b53d999529626301c36fa3efa22b2b0165217556" - end - - def install - ENV.deparallelize - - ["fuse", "hyper", "yokozuna"].each do |r| - (buildpath/"deps/#{r}").install resource(r) - end - - buildpath.install resource("solr") - - # So that rebar uses the solr resource rather than trying to redownload it - inreplace "deps/yokozuna/tools/grab-solr.sh", - "TMP_FILE=$TMP_DIR/$FILENAME", - "TMP_FILE=#{buildpath}/$FILENAME" - - system "git", "-C", "deps/hyper", "commit", "-am", "hyper-patch" - hyper_revision = Utils.popen_read("git", "-C", "deps/hyper", "rev-parse", - "HEAD").chomp - - system "git", "-C", "deps/yokozuna", "commit", "-am", "solr-location" - yokozuna_revision = Utils.popen_read("git", "-C", "deps/yokozuna", - "rev-parse", "HEAD").chomp - - # So that rebar doesn't revert the modifications - inreplace "rebar.config.lock" do |s| - s.gsub! resource("hyper").specs[:revision], hyper_revision - s.gsub! resource("yokozuna").specs[:revision], yokozuna_revision - end - - # So that rebar doesn't try to refetch the dependencies modified above - inreplace "Makefile", "git checkout $(REPO_TAG) &&", - "git checkout $(REPO_TAG) && mv ../../deps . &&" - - system "make", "package" # don't use "make rel" as it breaks `riak version` - - logdir = var/"log/riak" - datadir = var/"lib/riak" - libexec.install Dir["distdir/osxbuild/riak-2.2.3/*"] - logdir.mkpath - datadir.mkpath - (datadir/"ring").mkpath - inreplace "#{libexec}/lib/env.sh" do |s| - s.change_make_var! "RUNNER_BASE_DIR", libexec - s.change_make_var! "RUNNER_LOG_DIR", logdir - end - inreplace "#{libexec}/etc/riak.conf" do |c| - c.gsub! /(platform_data_dir *=).*$/, "\\1 #{datadir}" - c.gsub! /(platform_log_dir *=).*$/, "\\1 #{logdir}" - end - bin.write_exec_script libexec/"bin/riak" - bin.write_exec_script libexec/"bin/riak-admin" - bin.write_exec_script libexec/"bin/riak-debug" - bin.write_exec_script libexec/"bin/search-cmd" - end - - test do - assert_match version.to_s, shell_output("#{bin}/riak version") - end -end diff --git a/Formula/riemann-client.rb b/Formula/riemann-client.rb deleted file mode 100644 index eda9e417b321b..0000000000000 --- a/Formula/riemann-client.rb +++ /dev/null @@ -1,34 +0,0 @@ -class RiemannClient < Formula - desc "C client library for the Riemann monitoring system" - homepage "https://github.com/algernon/riemann-c-client" - url "https://github.com/algernon/riemann-c-client/archive/riemann-c-client-1.10.4.tar.gz" - sha256 "334874f0b9a507a8abbc7138df719cba4f28f12c02c39d5e55090b8edb86f9d2" - head "https://github.com/algernon/riemann-c-client.git" - - bottle do - cellar :any - sha256 "692dbcd6a5dbbbeb509d6022a18fcb7f20dd638722463e892359129bd55f10bf" => :mojave - sha256 "be90a238e4e68d45b658c25ca96de21f9fab54e19832ae6dea06ec9c6fc5aa33" => :high_sierra - sha256 "2052ba57754d3049747245a30caf32c81e5e7ec1b8f8de1790dde9c54f71548a" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "json-c" - depends_on "protobuf-c" - - def install - system "autoreconf", "-i" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/riemann-client", "send", "-h" - end -end diff --git a/Formula/riemann.rb b/Formula/riemann.rb deleted file mode 100644 index 65b15c4d5160c..0000000000000 --- a/Formula/riemann.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Riemann < Formula - desc "Event stream processor" - homepage "http://riemann.io" - url "https://github.com/riemann/riemann/releases/download/0.3.1/riemann-0.3.1.tar.bz2" - sha256 "54f9799922c8cbad75bbbe36c7e5ad32cf932fb61149629ee0528eb178c58351" - - bottle :unneeded - - def shim_script - <<~EOS - #!/bin/bash - if [ -z "$1" ] - then - config="#{etc}/riemann.config" - else - config=$@ - fi - exec "#{libexec}/bin/riemann" $config - EOS - end - - def install - etc.install "etc/riemann.config" => "riemann.config.guide" - - # Install jars in libexec to avoid conflicts - libexec.install Dir["*"] - - (bin+"riemann").write shim_script - end - - def caveats; <<~EOS - You may also wish to install these Ruby gems: - riemann-client - riemann-tools - riemann-dash - EOS - end - - plist_options :manual => "riemann" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/riemann - #{etc}/riemann.config - - RunAtLoad - - StandardErrorPath - #{var}/log/riemann.log - StandardOutPath - #{var}/log/riemann.log - - - EOS - end - - test do - system "#{bin}/riemann", "-help", "0" - end -end diff --git a/Formula/rig.rb b/Formula/rig.rb deleted file mode 100644 index 3158ed4c5b9e0..0000000000000 --- a/Formula/rig.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rig < Formula - desc "Provides fake name and address data" - homepage "https://rig.sourceforge.io/" - url "https://downloads.sourceforge.net/project/rig/rig/1.11/rig-1.11.tar.gz" - sha256 "00bfc970d5c038c1e68bc356c6aa6f9a12995914b7d4fda69897622cb5b77ab8" - - bottle do - cellar :any_skip_relocation - sha256 "8f311170956140550544c6a9e9b31068b61c5db52fefa2c92dd0ad565c0fc145" => :mojave - sha256 "770e85dcfaeec7cf4e4799572b102bf436afc9f3d28eb828ef838b5a1e1a8152" => :high_sierra - sha256 "fcc18ba335af01c00a5a7e7e41f6431192393d13eb374513ebe9b0b2a75ab0a0" => :sierra - sha256 "d82301a0557554e57252ea0d020f32e1d13485077c54f4d68cce01ee9d1b34a3" => :el_capitan - sha256 "785921276b725db4d309ed0833c7f9fece46b6c73d33caa8e74fec614d8afa68" => :yosemite - sha256 "5d728db39baacad5daac24db21d3711d3d9558b752f7f4c265d0dfd1acaa3a53" => :mavericks - end - - def install - system "make" - bin.install "rig" - pkgshare.install Dir["data/*"] - end - - test do - system "#{bin}/rig" - end -end diff --git a/Formula/rinetd.rb b/Formula/rinetd.rb deleted file mode 100644 index 7aaff2401fe53..0000000000000 --- a/Formula/rinetd.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Rinetd < Formula - desc "Internet TCP redirection server" - homepage "https://www.boutell.com/rinetd/" - url "https://www.boutell.com/rinetd/http/rinetd.tar.gz" - version "0.62" - sha256 "0c68d27c5bd4b16ce4f58a6db514dd6ff37b2604a88b02c1dfcdc00fc1059898" - - bottle do - rebuild 1 - sha256 "fe8636ee77c709a3a2df599058c59d7cdbaaa6505fa42e9bac143af95c0c835c" => :mojave - sha256 "44750b361b999c09a17a2bc8c576585a790c42bee66abe4df191b7b0cafe304c" => :high_sierra - sha256 "7a52fc5d01d83fd186626a6cff981e65da8943186973a4314efa2c561480325e" => :sierra - sha256 "30c72c1a5764aa20e7d8e232bcfe979f138e5029966c43468a886481304c39cb" => :el_capitan - end - - def install - inreplace "rinetd.c" do |s| - s.gsub! "/etc/rinetd.conf", "#{etc}/rinetd.conf" - s.gsub! "/var/run/rinetd.pid", "#{var}/rinetd.pid" - end - - inreplace "Makefile" do |s| - s.gsub! "/usr/sbin", sbin - s.gsub! "/usr/man", man - end - - sbin.mkpath - man8.mkpath - - system "make", "install" - - conf = etc/"rinetd.conf" - unless conf.exist? - conf.write <<~EOS - # forwarding rules go here - # - # you may specify allow and deny rules after a specific forwarding rule - # to apply to only that forwarding rule - # - # bindadress bindport connectaddress connectport - EOS - end - end - - test do - system "#{sbin}/rinetd", "-h" - end -end diff --git a/Formula/ringojs.rb b/Formula/ringojs.rb deleted file mode 100644 index 95b08cae3d6c7..0000000000000 --- a/Formula/ringojs.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ringojs < Formula - desc "CommonJS-based JavaScript runtime" - homepage "https://ringojs.org" - url "https://github.com/ringo/ringojs/releases/download/v1.2.1/ringojs-1.2.1.tar.gz" - sha256 "a04ba090e2a2835a196e4748b699e6f6842ff68919e73dea8f6193af73fdd841" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm Dir["bin/*.cmd"] - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - (testpath/"test.js").write <<~EOS - var x = 40 + 2; - console.assert(x === 42); - EOS - system "#{bin}/ringo", "test.js" - end -end diff --git a/Formula/ripgrep.rb b/Formula/ripgrep.rb deleted file mode 100644 index c08b6befd9ed8..0000000000000 --- a/Formula/ripgrep.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Ripgrep < Formula - desc "Search tool like grep and The Silver Searcher" - homepage "https://github.com/BurntSushi/ripgrep" - url "https://github.com/BurntSushi/ripgrep/archive/0.10.0.tar.gz" - sha256 "a2a6eb7d33d75e64613c158e1ae450899b437e37f1bfbd54f713b011cd8cc31e" - head "https://github.com/BurntSushi/ripgrep.git" - - bottle do - sha256 "58dbade0b798fdddb8991e5dde455f33344a94908ed2ec4f58849d4bbc0e5dc2" => :mojave - sha256 "230255cce6e94ea67cf16dbbc088bcaf8bcdc2b281fbee67e6c2c24ba86a2c17" => :high_sierra - sha256 "f13a92e0c9172e7534a4335f78a1a3c757490fe7c8792565a3bf546a2ad06cc7" => :sierra - sha256 "6835a77967b13fbeabdf8d7e43023bcd11c6b7360d88ab18694d4650f9002339" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "docbook-xsl" => :build - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "pcre2" - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - system "cargo", "install", "--root", prefix, - "--path", ".", - "--features", "pcre2" - - # Completion scripts and manpage are generated in the crate's build - # directory, which includes a fingerprint hash. Try to locate it first - out_dir = Dir["target/release/build/ripgrep-*/out"].first - man1.install "#{out_dir}/rg.1" - bash_completion.install "#{out_dir}/rg.bash" - fish_completion.install "#{out_dir}/rg.fish" - zsh_completion.install "complete/_rg" - end - - test do - (testpath/"Hello.txt").write("Hello World!") - system "#{bin}/rg", "Hello World!", testpath - end -end diff --git a/Formula/ripmime.rb b/Formula/ripmime.rb deleted file mode 100644 index 22b1963ed9857..0000000000000 --- a/Formula/ripmime.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Ripmime < Formula - desc "Extract attachments out of MIME encoded email packages" - homepage "https://pldaniels.com/ripmime/" - url "https://pldaniels.com/ripmime/ripmime-1.4.0.10.tar.gz" - sha256 "896115488a7b7cad3b80f2718695b0c7b7c89fc0d456b09125c37f5a5734406a" - - bottle do - cellar :any_skip_relocation - sha256 "976c8c7c1374fce9c9b4493f7c144c0e78db68223e1e7b53adaabc0978795ef1" => :mojave - sha256 "915cd6326fe857e0608d25c9b6e2f4fab06734df23d0ad938184c1b791981345" => :high_sierra - sha256 "09a2b60d927bbc236998e29ea50969ce95ab4470d74cd7a40a54f9f4ec24252b" => :sierra - sha256 "1151fa0bb8a10779979cec95c7039832eb81b7126f808ba9c89ccb73cf658814" => :el_capitan - sha256 "6ef2fdabe468bc42be725020ef23cc924d1572c7446648e38dbd6de3f1399a38" => :yosemite - sha256 "741b45ca155022fb6b540dd1cc0882f5f29330b6909e37fd5115e84705d9d6bb" => :mavericks - end - - def install - system "make", "LIBS=-liconv", "CFLAGS=#{ENV.cflags}" - bin.install "ripmime" - man1.install "ripmime.1" - end -end diff --git a/Formula/rke.rb b/Formula/rke.rb deleted file mode 100644 index e3bd470c0cee5..0000000000000 --- a/Formula/rke.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Rke < Formula - desc "Rancher Kubernetes Engine, a Kubernetes installer that works everywhere" - homepage "https://rancher.com/docs/rke/v0.1.x/en/" - url "https://github.com/rancher/rke.git", - :tag => "v0.1.15", - :revision => "88926e57647ddd89ea6ff92a25c4c77ad0e95c7b" - - bottle do - cellar :any_skip_relocation - sha256 "04dbd0cebe16c85d7457d0a769646bbec078090f843aef22a0889936e657fa0a" => :mojave - sha256 "ab15387a57cd67fa81729d43abcd7d9cdf890cc3b3a4166fce3a54c02a10d505" => :high_sierra - sha256 "30e818a89aa45417674fccc7e815f248aa1efe46a6a91538dbd60298926436b2" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/rancher/rke").install buildpath.children - - cd "src/github.com/rancher/rke" do - system "go", "build", "-ldflags", - "-w -X main.VERSION=v#{version}", - "-o", bin/"rke" - prefix.install_metafiles - end - end - - test do - system bin/"rke", "config", "-e" - assert_predicate testpath/"cluster.yml", :exist? - end -end diff --git a/Formula/rkflashtool.rb b/Formula/rkflashtool.rb deleted file mode 100644 index 947bd35fc86d9..0000000000000 --- a/Formula/rkflashtool.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Rkflashtool < Formula - desc "Tools for flashing Rockchip devices" - homepage "https://sourceforge.net/projects/rkflashtool/" - url "https://downloads.sourceforge.net/project/rkflashtool/rkflashtool-6.1/rkflashtool-6.1-src.tar.bz2" - sha256 "2bc0ec580caa790b0aee634388a9110a429baf4b93ff2c4fce3d9ab583f51339" - head "https://git.code.sf.net/p/rkflashtool/Git.git" - - bottle do - cellar :any - sha256 "192628d1c348870f6ea1bc381aeb87023cc0bd19b2c198ea3c14b63e954db88e" => :mojave - sha256 "72e99558b94cd4e26a5aeb62209c99e03f8e91059fbfbe83bdfbd755fc83f54f" => :high_sierra - sha256 "cbeb2509bcd210026250c915a9909e8f056e9e2da1f599d7a611695c334f4966" => :sierra - sha256 "7a8b5c66395b179ce38845c36369b1a65c6eacc73fd29227809597257669af6d" => :el_capitan - sha256 "cf5c51c7aa18c9304ade585c82d9083421eafde114ef6ab22736a24f45530226" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"input.file").write "ABCD" - system bin/"rkcrc", "input.file", "output.file" - result = shell_output("cat output.file") - result.force_encoding("UTF-8") if result.respond_to?(:force_encoding) - assert_equal "ABCD\264\366\a\t", result - end -end diff --git a/Formula/rkhunter.rb b/Formula/rkhunter.rb deleted file mode 100644 index f7b924ce87e59..0000000000000 --- a/Formula/rkhunter.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Rkhunter < Formula - desc "Rootkit hunter" - homepage "https://rkhunter.sourceforge.io/" - url "https://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz" - sha256 "f750aa3e22f839b637a073647510d7aa3adf7496e21f3c875b7a368c71d37487" - - bottle do - cellar :any_skip_relocation - sha256 "a174d252c029e7336a559e44e5ea7139c943addee52cf11fd1fd4c03d564cf52" => :mojave - sha256 "35df7b4e420968fc71fc0fc0217716393c624594ff51245c80a969a5bb1569eb" => :high_sierra - sha256 "8d00f31cf5150d841b22dd3c1cdda33dc8705075529f000d41678d05cb733e0f" => :sierra - sha256 "1aca76cf8e890112cad63d353ca8369e301e0e990e5380bb5fc4236ded810147" => :el_capitan - end - - def install - system "./installer.sh", "--layout", "custom", prefix, "--install" - end - - test do - system "#{bin}/rkhunter", "--version" - end -end diff --git a/Formula/rlog.rb b/Formula/rlog.rb deleted file mode 100644 index 98e3026fb559f..0000000000000 --- a/Formula/rlog.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Rlog < Formula - desc "Flexible message logging facility for C++" - homepage "https://www.arg0.net/rlog" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rlog/rlog-1.4.tar.gz" - sha256 "a938eeedeb4d56f1343dc5561bc09ae70b24e8f70d07a6f8d4b6eed32e783f79" - - bottle do - cellar :any - sha256 "4ceb686581d1dad40fbbd4dec3d26205f56d9c25179ca4880158a06c2895f197" => :mojave - sha256 "5d85e13db4c6dd2892d136a96af4ac46d72254a39b842559ac9a4f9f3841af3e" => :high_sierra - sha256 "51f6586bcfa2235a19b311189ca63431c596c689c7b014850e4a0cef2275074e" => :sierra - sha256 "c95d8998639fd75131f923191eaa857bc3ff8f33ee64ca3b5d459ac1979e6fa2" => :el_capitan - sha256 "44f3b8ee89802fb13674e3b60e873045a459bf13513b84f3f7b94c8a4444b2eb" => :yosemite - sha256 "70c1faaac613087604231c7e30ba5dd458183c1dec4cfccb73b25a32fee6c603" => :mavericks - end - - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end - -# This patch solves an OSX build issue, should not be necessary for the next release according to -# https://code.google.com/p/rlog/issues/detail?id=7 -__END__ ---- orig/rlog/common.h.in 2008-06-14 20:10:13.000000000 -0700 -+++ new/rlog/common.h.in 2009-05-18 16:05:04.000000000 -0700 -@@ -52,7 +52,12 @@ - - # define PRINTF(FMT,X) __attribute__ (( __format__ ( __printf__, FMT, X))) - # define HAVE_PRINTF_ATTR 1 -+ -+#ifdef __APPLE__ -+# define RLOG_SECTION __attribute__ (( section("__DATA, RLOG_DATA") )) -+#else - # define RLOG_SECTION __attribute__ (( section("RLOG_DATA") )) -+#endif - - #if __GNUC__ >= 3 - # define expect(foo, bar) __builtin_expect((foo),bar) diff --git a/Formula/rlvm.rb b/Formula/rlvm.rb deleted file mode 100644 index bd9dee6e44e3d..0000000000000 --- a/Formula/rlvm.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Rlvm < Formula - desc "RealLive interpreter for VisualArts games" - homepage "http://www.rlvm.net/" - url "https://github.com/eglaysher/rlvm/archive/release-0.14.tar.gz" - sha256 "6d1717540b8db8aca1480ebafae3354b24e3122a77dd2ee81f4b964c7b10dcc0" - revision 3 - head "https://github.com/eglaysher/rlvm.git" - - bottle do - cellar :any - rebuild 2 - sha256 "b24e490e6c84a78799ebf623ceef5905180a614ec87ad2a4ced072021a366d25" => :mojave - sha256 "ffbe5c1893759c495572d8338f4b7d18bb37a8fb8a88e4d0ef11e1f552e591e8" => :high_sierra - sha256 "bf5a864796942f72edf91b4ca86696050e694edd718418b01c23227f23c5fe33" => :sierra - sha256 "d6d62997e9ca3378380e96fc7f1f633b755b88956d009195b3e91832b8466c64" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on "boost" - depends_on "freetype" - depends_on "gettext" - depends_on "glew" - depends_on "jpeg" - depends_on "libogg" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mad" - depends_on "sdl" - depends_on "sdl_image" - depends_on "sdl_mixer" - depends_on "sdl_ttf" - - # Fix missing system header after boost update - # https://github.com/eglaysher/rlvm/issues/76 - patch do - url "https://github.com/eglaysher/rlvm/commit/668863d2222b962ee8e7d9829e972ef05c990302.diff?full_index=1" - sha256 "4837f691a31d927cd2d6547d3c04c86de30cec0daacc38e3f6940bbdad954e98" - end - - def install - inreplace "SConstruct" do |s| - s.gsub! /("z")/, '\1, "bz2"' - s.gsub! /(CheckForSystemLibrary\(config, library_dict), subcomponents/, '\1, []' - s.gsub! "jpeglib.h", "jconfig.h" - s.gsub! /(msgfmt)/, "#{Formula["gettext"].bin}/\\1" - end - inreplace "SConscript.cocoa" do |s| - s.gsub! /(static_env\.ParseConfig)\("sdl-config --static-libs", MergeEverythingButSDLMain\)/, - '\1("pkg-config --libs sdl SDL_image SDL_mixer SDL_ttf freetype2").Append(FRAMEWORKS=["OpenGL"])' - s.gsub! /(full_static_build) = True/, '\1 = False' - end - system "scons", "--release" - prefix.install "build/rlvm.app" - bin.write_exec_script "#{prefix}/rlvm.app/Contents/MacOS/rlvm" - end -end diff --git a/Formula/rlwrap.rb b/Formula/rlwrap.rb deleted file mode 100644 index 8b0e562c0ecd8..0000000000000 --- a/Formula/rlwrap.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rlwrap < Formula - desc "Readline wrapper: adds readline support to tools that lack it" - homepage "https://github.com/hanslub42/rlwrap" - url "https://github.com/hanslub42/rlwrap/archive/v0.43.tar.gz" - sha256 "29e5a850fbe4753f353b0734e46ec0da043621bdcf7b52a89b77517f3941aade" - head "https://github.com/hanslub42/rlwrap.git" - - bottle do - sha256 "eb96e68e1ec7e76dc4e64dd638662d3248487bdbc84d4f96690babaa22ac9a2c" => :mojave - sha256 "a756fa3e95c418932e6791d3d6f4feaa88b4ac3e0da66c38285ce2bc54882063" => :high_sierra - sha256 "689b716c824586bdd0399f0acce9271417222436b387862567dc9d48aba2ece7" => :sierra - sha256 "b0548979bc62fadccf1d3f6f13f0df1c851e30e4d282d7ac20f9936f3e4b975f" => :el_capitan - sha256 "7b8a163bb614b481b88a627ad9a579e5b0acb24deb736ccea02da2606b6dc8a0" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "readline" - - def install - system "autoreconf", "-v", "-i" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/rlwrap", "--version" - end -end diff --git a/Formula/rmate.rb b/Formula/rmate.rb deleted file mode 100644 index 47b7081813e3f..0000000000000 --- a/Formula/rmate.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Rmate < Formula - desc "Edit files from an SSH session in TextMate" - homepage "https://github.com/textmate/rmate" - url "https://github.com/textmate/rmate/archive/v1.5.8.tar.gz" - sha256 "40be07ae251bfa47b408eb56395dd2385d8e9ea220a19efd5145593cd8cbd89c" - head "https://github.com/textmate/rmate.git" - - bottle :unneeded - - def install - bin.install "bin/rmate" - end - - test do - system "#{bin}/rmate", "--version" - end -end diff --git a/Formula/rmcast.rb b/Formula/rmcast.rb deleted file mode 100644 index c94758034b6f2..0000000000000 --- a/Formula/rmcast.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Rmcast < Formula - desc "IP Multicast library" - homepage "http://www.land.ufrj.br/tools/rmcast/rmcast.html" - url "http://www.land.ufrj.br/tools/rmcast/download/rmcast-2.0.0.tar.gz" - sha256 "79ccbdbe4a299fd122521574eaf9b3e2d524dd5e074d9bc3eb521f1d934a59b1" - - bottle do - cellar :any - sha256 "37226d25db0ae3fe7491c530e1f382b869d134d7e38a851acfbe13cb308f7c1d" => :mojave - sha256 "d30e495d583d02a5ea74cd7ec82d1bd67b62981248d853ce7138a7997f6b6ed2" => :high_sierra - sha256 "9ef73c5d52886029cd89d829cdceccca0d03bce0dc72647d8cce6704d492f080" => :sierra - sha256 "4fe0a1745659bb99748972c2fa0640e6b864e92739ba192a89ed12c0614b1372" => :el_capitan - sha256 "502e09994a9b455d9040f8e346419a2a3ef0156a73b0249bc161446448729292" => :yosemite - sha256 "1afd20258226dc16873b567b1b5ab920b9e414f4733bfa99fa917074685f2b8a" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/rmlint.rb b/Formula/rmlint.rb deleted file mode 100644 index bb92e854e39e0..0000000000000 --- a/Formula/rmlint.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Rmlint < Formula - desc "Extremely fast tool to remove dupes and other lint from your filesystem" - homepage "https://github.com/sahib/rmlint" - url "https://github.com/sahib/rmlint/archive/v2.8.0.tar.gz" - sha256 "196bb595ac4d3d1a76ed62542b7895bda1cea47f0f77483286b2dfc8fc797253" - - bottle do - cellar :any - sha256 "868fb80acb784a7634e5c7fe6e75cee86d4c93615213156f0d97a22c3e27d0e6" => :mojave - sha256 "fa8f2ebb9224446dcf5dfbaca94f97bfe983a10888dd0d514345643c0394fd70" => :high_sierra - sha256 "a0987dfb0b23a5e3f5a93bb93480834cdf2e54c046784af3ba2c191336905e88" => :sierra - end - - depends_on "gettext" => :build - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on "sphinx-doc" => :build - depends_on "glib" - depends_on "json-glib" - depends_on "libelf" - - def install - system "scons", "config" - scons - bin.install "rmlint" - man1.install "docs/rmlint.1.gz" - end - - test do - (testpath/"1.txt").write("1") - (testpath/"2.txt").write("1") - assert_match "# Duplicate(s):", shell_output("#{bin}/rmlint") - end -end diff --git a/Formula/rmtrash.rb b/Formula/rmtrash.rb deleted file mode 100644 index d1e415bb927f7..0000000000000 --- a/Formula/rmtrash.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Rmtrash < Formula - desc "Move files to macOS's Trash" - homepage "http://www.nightproductions.net/cli.htm" - url "http://www.nightproductions.net/downloads/rmtrash_source.tar.gz" - version "0.3.3" - sha256 "9b30561454529e5923ffb62327d3fe009d23495263efc958534ac6b637e361d6" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c2da781e4931d89a398983d0ac065a0647298417ce4f9fa1e0d6aacb8109f6f3" => :mojave - sha256 "1acafe5b7c1d492c6f3aa685c37a56c51972fdd62b6653ee6efb2f2f0b9a7715" => :high_sierra - sha256 "e9770d2d1fef053ba9743548537fb70ca491755c10c0a6b6d106e919d86c4b54" => :sierra - sha256 "a8b6815f555377a91e800085db9680cc9234b27a4b114ea13e6664a2b1b663d3" => :el_capitan - sha256 "adab3849ec805b7c2679e9b278e4d101249193dbd7210f078224e69fc3bb2f1f" => :yosemite - sha256 "102f54f713574d7009e3b4fd33738b6b631608a0c38f6ad0945ca1af5a8d6ef5" => :mavericks - end - - def install - # don't install as root - inreplace "Makefile", "-o root -g wheel", "" - # install manpages under share/man/ - inreplace "Makefile", "${DESTDIR}/man", "${DESTDIR}/share/man" - - bin.mkpath - man1.mkpath - - system "make", "CC=#{ENV.cc}", "LDFLAGS=-framework Foundation -prebind" - system "make", "install", "DESTDIR=#{prefix}" - end - - test do - system "#{bin}/rmtrash", "-h" - end -end diff --git a/Formula/rnv.rb b/Formula/rnv.rb deleted file mode 100644 index f09d8114b27f1..0000000000000 --- a/Formula/rnv.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rnv < Formula - desc "Implementation of Relax NG Compact Syntax validator" - homepage "https://sourceforge.net/projects/rnv/" - url "https://downloads.sourceforge.net/project/rnv/Sources/1.7.11/rnv-1.7.11.tar.bz2" - sha256 "b2a1578773edd29ef7a828b3a392bbea61b4ca8013ce4efc3b5fbc18662c162e" - - bottle do - cellar :any - sha256 "06a2cb705d679da7de638434f45e28764dcd448863d31f6b39ab090dfde4c04f" => :mojave - sha256 "9bf4571824c6d8e837cfcad7ac5e16c6bfc120d4638f0428cdfb8f14203b8c41" => :high_sierra - sha256 "8dd3263bb656dcca22605b12faf4c6f54d65e5040e58a7a464c85b69ca19dc99" => :sierra - sha256 "1c1aa519b786f842b39720e33900e92a2f2f8deef403755e79e2d3b518897ff1" => :el_capitan - sha256 "6d46cb2e6476e22b8bb04d00f599884aa8e44ba7e199ad860e4f15795b04e83b" => :yosemite - sha256 "f9c4575d7384100b1cc97d9f421b5906ea5068f612c346ffa0238db6c8e855be" => :mavericks - end - - depends_on "expat" - - conflicts_with "arx-libertatis", :because => "both install `arx` binaries" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/robodoc.rb b/Formula/robodoc.rb deleted file mode 100644 index 8425d592241a2..0000000000000 --- a/Formula/robodoc.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Robodoc < Formula - desc "Source code documentation tool" - homepage "https://www.xs4all.nl/~rfsber/Robo/index.html" - url "https://rfsber.home.xs4all.nl/Robo/archives/robodoc-4.99.43.tar.bz2" - sha256 "3d826424a3957502caacf39951f7805f1d72bb374c0533de7ca1036f306afdc7" - - bottle do - rebuild 1 - sha256 "338eaad16a1962befefcac8adff0f501409fdaee709b42b93a19221a4bc79728" => :mojave - sha256 "0fa779e5f937f0e7a4c17a2bbe86ea84178bd5d0739ba3f8429ced46f3c10435" => :high_sierra - sha256 "230f593f9fadd10d98868593e273ad40dfee6ad877b396073042a187f19c60b8" => :sierra - sha256 "54532e8e7629f4eeedbdef400f40997c25558b692755b816f6facc37a4975d4d" => :el_capitan - sha256 "a5c2794eb7e02c27707aad1bbea593ddc0d21fbf197f6b4313f8d0ba84fb34a5" => :yosemite - sha256 "cea580dd90f87075879dc722262668deac629673ed22dc1e2e5a6cb52e2439ca" => :mavericks - end - - head do - url "https://github.com/gumpu/ROBODoc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-f", "-i" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules" - system "make", "install" - end - - test do - cp_r Dir["#{doc}/Examples/PerlExample/*"], testpath - system bin/"robodoc" - end -end diff --git a/Formula/robot-framework.rb b/Formula/robot-framework.rb deleted file mode 100644 index 3660319dfdb59..0000000000000 --- a/Formula/robot-framework.rb +++ /dev/null @@ -1,122 +0,0 @@ -class RobotFramework < Formula - include Language::Python::Virtualenv - - desc "Open source test framework for acceptance testing" - homepage "https://robotframework.org/" - url "https://github.com/robotframework/robotframework/archive/v3.0.4.tar.gz" - sha256 "1557c83f456ae90645f9c88f1e3366571cc3fe0843bea20330601b9d00c47ece" - revision 1 - head "https://github.com/robotframework/robotframework.git" - - bottle do - cellar :any - sha256 "65f6401c6e602e5bddd6a6c92e5c2fc152ed207eb1b86aae4e8c99064f3df2d6" => :mojave - sha256 "d502e8678b01dd6e947fe1260ecc36e1e9edb9f9b7f5c6c1296b93ac9b7bd9d1" => :high_sierra - sha256 "ba925cb302cbe1de3a6ad12c270a433c3de3e4cc81083a384337135c91e629fb" => :sierra - end - - depends_on "openssl" - depends_on "python" - depends_on :x11 - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz" - sha256 "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/29/65/83181630befb17cd1370a6abb9a87957947a43c2332216e5975353f61d64/paramiko-2.4.1.tar.gz" - sha256 "33e36775a6c71790ba7692a73f948b329cf9295a72b0102144b031114bd2a4f3" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/eb/3d/b7d0fdf4a882e26674c68c20f40682491377c4db1439870f5b6f862f76ed/pyasn1-0.4.2.tar.gz" - sha256 "d258b0a71994f7770599835249cece1caef3c70def868c4915e6e5ca49b67d15" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b261f/PyNaCl-1.2.1.tar.gz" - sha256 "e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9" - end - - resource "robotframework-archivelibrary" do - url "https://files.pythonhosted.org/packages/29/b6/bf5bd38d5764f6afaf17b0debef580aee9bfbd63ad77a0e215389691fdfb/robotframework-archivelibrary-0.4.0.tar.gz" - sha256 "d18dd05a9d43decef1352a9a7601522639e4e6f02a084692b6392603c5f6c063" - end - - resource "robotframework-selenium2library" do - url "https://files.pythonhosted.org/packages/c4/7d/3c07081e7f0f1844aa21fd239a0139db4da5a8dc219d1e81cb004ba1f4e2/robotframework-selenium2library-3.0.0.tar.gz" - sha256 "2a8e942b0788b16ded253039008b34d2b46199283461b294f0f41a579c70fda7" - end - - resource "robotframework-seleniumlibrary" do - url "https://files.pythonhosted.org/packages/66/ac/eead7e76d9bd70da601442809268f984cd03f9cb708fed9e087fbc7c7412/robotframework-seleniumlibrary-3.1.1.tar.gz" - sha256 "d29213ff38a22352cf983f36c581be76428d899e5e390890acafe13ac278824c" - end - - resource "robotframework-sshlibrary" do - url "https://files.pythonhosted.org/packages/33/fb/e7d9ff0f773a01480f015be49f0b22f92b54b5beabec7ac61bf075d50bae/robotframework-sshlibrary-3.2.1.tar.gz" - sha256 "55b9c5a13e803f6fa2cb316ce9c33c503690556a88fb991eb70ae1d2d554ca33" - end - - resource "selenium" do - url "https://files.pythonhosted.org/packages/d4/28/8124d32415bd3d67fabea52480395427576b582771283e89ce10a56d9e5b/selenium-3.11.0.tar.gz" - sha256 "5841fb30c3965866220c34d16de8e3d091e2833fcac385160a63db0c3522a297" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"HelloWorld.txt").write <<~EOS - *** Settings *** - Library HelloWorld.py - - *** Test Cases *** - HelloWorld - Hello World - EOS - - (testpath/"HelloWorld.py").write <<~EOS - def hello_world(): - print("HELLO WORLD!") - EOS - system bin/"pybot", testpath/"HelloWorld.txt" - end -end diff --git a/Formula/robotfindskitten.rb b/Formula/robotfindskitten.rb deleted file mode 100644 index ba5aa8cc262a4..0000000000000 --- a/Formula/robotfindskitten.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Robotfindskitten < Formula - desc "Zen Simulation of robot finding kitten" - homepage "http://robotfindskitten.org/" - url "https://downloads.sourceforge.net/project/rfk/robotfindskitten-POSIX/mayan_apocalypse_edition/robotfindskitten-2.7182818.701.tar.gz" - sha256 "7749a370796fd23e3b306b00de5f7fb7997a35fef30e3910ff159448c932d719" - - bottle do - sha256 "b127f7e5d3e40a3873b6e3070ec1a0b318837ed2fc74d589d917c7c810d62f1b" => :mojave - sha256 "0a8be5a0e0cbfd167bc18d9f2224610040102e65332dbd5cf3635487345a93d2" => :high_sierra - sha256 "710b88a647ab9dfcbca6464deff11424fd854cd21e5fe8ae366389c909d8b2ea" => :sierra - sha256 "ccbdb2706ad962c50eb417530835e651ec00469bef4467033bd1eab3b301adc3" => :el_capitan - sha256 "c2e72aea983c21ca8a2559d61b9401047d16cead69ee52e75c36aa073b8f583f" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install", "execgamesdir=#{bin}" - end - - test do - assert_equal "robotfindskitten: #{version}", - shell_output("#{bin}/robotfindskitten -V").chomp - end -end diff --git a/Formula/rocksdb.rb b/Formula/rocksdb.rb deleted file mode 100644 index cfd42e269b73b..0000000000000 --- a/Formula/rocksdb.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Rocksdb < Formula - desc "Embeddable, persistent key-value store for fast storage" - homepage "https://rocksdb.org/" - url "https://github.com/facebook/rocksdb/archive/rocksdb-5.14.3.tar.gz" - sha256 "ef3cbbb764344e5778db8f3f54d080f02783c3c94deff42d5822dfeb9b014c65" - - bottle do - cellar :any - sha256 "df69fa36b2b025f62cc0d30da46e072512d424cc66c242834fcfba7a60cb913c" => :mojave - sha256 "b4dd4f1c3324876dcf7a9524d6440a0891f162db3c19b97284100aa4b13cabbe" => :high_sierra - sha256 "8d3515c91f5eecb1828af7825ddadb0169720b47b2cd76411ad7ca3792699e20" => :sierra - sha256 "e07d5748ec17ea316d7b669bf22e69db5b5c12c488030abbc164d17f004ace44" => :el_capitan - end - - depends_on "gflags" - depends_on "lz4" - depends_on "snappy" - - needs :cxx11 - - def install - ENV.cxx11 - ENV["PORTABLE"] = "1" if build.bottle? - ENV["DEBUG_LEVEL"] = "0" - ENV["USE_RTTI"] = "1" - ENV["DISABLE_JEMALLOC"] = "1" # prevent opportunistic linkage - - # build regular rocksdb - system "make", "clean" - system "make", "static_lib" - system "make", "shared_lib" - system "make", "tools" - system "make", "install", "INSTALL_PATH=#{prefix}" - - bin.install "sst_dump" => "rocksdb_sst_dump" - bin.install "db_sanity_test" => "rocksdb_sanity_test" - bin.install "db_stress" => "rocksdb_stress" - bin.install "write_stress" => "rocksdb_write_stress" - bin.install "ldb" => "rocksdb_ldb" - bin.install "db_repl_stress" => "rocksdb_repl_stress" - bin.install "rocksdb_dump" - bin.install "rocksdb_undump" - - # build rocksdb_lite - ENV.append_to_cflags "-DROCKSDB_LITE=1" - ENV["LIBNAME"] = "librocksdb_lite" - system "make", "clean" - system "make", "static_lib" - system "make", "shared_lib" - system "make", "install", "INSTALL_PATH=#{prefix}" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - using namespace rocksdb; - int main() { - Options options; - return 0; - } - EOS - - system ENV.cxx, "test.cpp", "-o", "db_test", "-v", - "-std=c++11", "-stdlib=libc++", "-lstdc++", - "-lz", "-lbz2", - "-L#{lib}", "-lrocksdb_lite", - "-L#{Formula["snappy"].opt_lib}", "-lsnappy", - "-L#{Formula["lz4"].opt_lib}", "-llz4" - system "./db_test" - - assert_match "sst_dump --file=", shell_output("#{bin}/rocksdb_sst_dump --help 2>&1", 1) - assert_match "rocksdb_sanity_test ", shell_output("#{bin}/rocksdb_sanity_test --help 2>&1", 1) - assert_match "rocksdb_stress [OPTIONS]...", shell_output("#{bin}/rocksdb_stress --help 2>&1", 1) - assert_match "rocksdb_write_stress [OPTIONS]...", shell_output("#{bin}/rocksdb_write_stress --help 2>&1", 1) - assert_match "ldb - RocksDB Tool", shell_output("#{bin}/rocksdb_ldb --help 2>&1", 1) - assert_match "rocksdb_repl_stress:", shell_output("#{bin}/rocksdb_repl_stress --help 2>&1", 1) - assert_match "rocksdb_dump:", shell_output("#{bin}/rocksdb_dump --help 2>&1", 1) - assert_match "rocksdb_undump:", shell_output("#{bin}/rocksdb_undump --help 2>&1", 1) - end -end diff --git a/Formula/rofs-filtered.rb b/Formula/rofs-filtered.rb deleted file mode 100644 index 985e8cab49456..0000000000000 --- a/Formula/rofs-filtered.rb +++ /dev/null @@ -1,25 +0,0 @@ -class RofsFiltered < Formula - desc "Filtered read-only filesystem for FUSE" - homepage "https://github.com/gburca/rofs-filtered/" - url "https://github.com/gburca/rofs-filtered/archive/rel-1.7.tar.gz" - sha256 "d66066dfd0274a2fb7b71dd929445377dd23100b9fa43e3888dbe3fc7e8228e8" - - bottle do - sha256 "74a12ef9a8b0767ca7803f274c78b004a3b5b1006bc8e30e1f3ea195a02cabfa" => :mojave - sha256 "2662076d6c938fd260ee304e80999db5e22a1c516fdc5139c7e477892a5cc927" => :high_sierra - sha256 "c6f0661d382c415db63caf4512b18b526e5e75c25a5fa54de792d4365db4dfa1" => :sierra - sha256 "5c29bf0f477b23c3e3291549cffe632d3222899a34483cd8c23fe25f4d9b30ca" => :el_capitan - sha256 "194e5e00804165b7df68037bce7d6bd6b3f64a244b1f48c04b16e346bd70832c" => :yosemite - end - - depends_on "cmake" => :build - depends_on :macos => :yosemite - depends_on :osxfuse - - def install - mkdir "build" do - system "cmake", "..", "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", *std_cmake_args - system "make", "install" - end - end -end diff --git a/Formula/rogue.rb b/Formula/rogue.rb deleted file mode 100644 index f8d0684e18bd3..0000000000000 --- a/Formula/rogue.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Rogue < Formula - desc "Dungeon crawling video game" - # Historical homepage: https://web.archive.org/web/20160604020207/rogue.rogueforge.net/ - homepage "https://sourceforge.net/projects/roguelike/" - url "https://src.fedoraproject.org/repo/pkgs/rogue/rogue5.4.4-src.tar.gz/033288f46444b06814c81ea69d96e075/rogue5.4.4-src.tar.gz" - version "5.4.4" - sha256 "7d37a61fc098bda0e6fac30799da347294067e8e079e4b40d6c781468e08e8a1" - - bottle do - sha256 "9430b23cc0c9123d38e8ce01dc269e3a88c8b0ed686a0bb06a72587b857c7b95" => :mojave - sha256 "004f3700d269910925bdbdd3edbdb6737deaf3edbf8b4d891810e38b71e3f7b6" => :high_sierra - sha256 "0caa3e02fb718c2c282f98eaaff70ef3b9e78f9f52897e18f17b09a1d0e0ce2b" => :sierra - sha256 "5a751dbc338983c191661bae45dd34337b25feaa37c090e239f10b263b0d8674" => :el_capitan - sha256 "2bbbf8931223f690edf2ae41308dc4a332a00072609480e54c3b96eada07d1f5" => :yosemite - end - - def install - ENV.ncurses_define - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - inreplace "config.h", "rogue.scr", "#{var}/rogue/rogue.scr" - - inreplace "Makefile" do |s| - # Take out weird man install script and DIY below - s.gsub! "-if test -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi", "" - s.gsub! "-if test ! -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi", "" - end - - system "make", "install" - man6.install gzip("rogue.6") - libexec.mkpath - (var/"rogue").mkpath - end - - test do - system "#{bin}/rogue", "-s" - end -end diff --git a/Formula/roll.rb b/Formula/roll.rb deleted file mode 100644 index 7bb73c3fdc88c..0000000000000 --- a/Formula/roll.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Roll < Formula - desc "CLI program for rolling a dice sequence" - homepage "https://matteocorti.github.io/roll/" - url "https://github.com/matteocorti/roll/releases/download/v2.4.0/roll-2.4.0.tar.gz" - sha256 "1c927908bce0b83477edca60d1da983b9d39646b5ece7574d33d8063422e7d5b" - - bottle do - cellar :any_skip_relocation - sha256 "e4c65a73fa2d093bd663b2c8b538c3895ec563c161ee22e889b0f22d2a4d5902" => :mojave - sha256 "707bf8f9b18c5d70172a5a820b4f1e94e74f53b677075974f3669d869ae2c003" => :high_sierra - sha256 "982db93f320c57367a5b1284ef8b0167207fc4374bfc081bed80faf292a84ebb" => :sierra - sha256 "23af32d0a51b8cd87637b83c401987f8896a3d7b0640458dd4fe15b1be0e67ee" => :el_capitan - end - - head do - url "https://github.com/matteocorti/roll.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./regen.sh" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/roll", "1d6" - end -end diff --git a/Formula/rolldice.rb b/Formula/rolldice.rb deleted file mode 100644 index db1ce0308e5cd..0000000000000 --- a/Formula/rolldice.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Rolldice < Formula - desc "Rolls an amount of virtual dice" - homepage "https://github.com/sstrickl/rolldice" - url "https://github.com/sstrickl/rolldice/archive/v1.16.tar.gz" - sha256 "8bc82b26c418453ef0fe79b43a094641e7a76dae406032423a2f0fb270930775" - - bottle do - cellar :any_skip_relocation - sha256 "eb32f285b1ba6a4ce42e22d4c636aac91f9f899e0a5e6355200f14d7f0ccc990" => :mojave - sha256 "74364058c7f8859e71b5b43b80b40c01dd99ce6b80724ef4e97f9a9ea0587775" => :high_sierra - sha256 "a7019dfc0a37c4cb814f8d116140b9fac999d6d97e6650e0806c02cb633087fb" => :sierra - sha256 "3ee6afe89723d119075feffe735f4b4d4552d51bab5d79df6b8e100f90d21109" => :el_capitan - sha256 "9525132a3c9a1b1ac679102a2a2f39e51dcd1f2ae299a1038701bdf4f945bd4c" => :yosemite - end - - def install - system "make", "CC=#{ENV.cc}" - bin.install "rolldice" - man6.install gzip("rolldice.6") - end - - test do - assert_match "Roll #1", shell_output("#{bin}/rolldice -s 1x2d6") - end -end diff --git a/Formula/rom-tools.rb b/Formula/rom-tools.rb deleted file mode 100644 index 267982fc22b0b..0000000000000 --- a/Formula/rom-tools.rb +++ /dev/null @@ -1,60 +0,0 @@ -class RomTools < Formula - desc "Tools for Multiple Arcade Machine Emulator" - homepage "https://mamedev.org/" - url "https://github.com/mamedev/mame/archive/mame0205.tar.gz" - version "0.205" - sha256 "80b7f9feb3a4da34c5c452de13d4f7db12381b8a17a90f41884ea2ca797d92ff" - head "https://github.com/mamedev/mame.git" - - bottle do - cellar :any - sha256 "b412aefbd02105cef14f0876d5fafa30bd9aa3a8c75a043f51df21edb0396dc9" => :mojave - sha256 "3fd869b31b5a3bae1a1f37cb2254f6165a5fb83695a5d668355d945d43703750" => :high_sierra - sha256 "70ed992d8a38ce194ba2137c80e0d8981adbf33732ca8326458848b5588e61e4" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "portmidi" - depends_on "sdl2" - depends_on "utf8proc" - - def install - inreplace "scripts/src/osd/sdl.lua", "--static", "" - system "make", "TOOLS=1", - "PTR64=#{MacOS.prefer_64_bit? ? 1 : 0}", # for old Macs - "USE_LIBSDL=1", - "USE_SYSTEM_LIB_EXPAT=1", - "USE_SYSTEM_LIB_ZLIB=1", - "USE_SYSTEM_LIB_FLAC=1", - "USE_SYSTEM_LIB_PORTMIDI=1", - "USE_SYSTEM_LIB_UTF8PROC=1" - bin.install %w[ - aueffectutil castool chdman floptool imgtool jedutil ldresample - ldverify nltool nlwav pngcmp regrep romcmp src2html srcclean unidasm - ] - bin.install "split" => "rom-split" - man1.install Dir["docs/man/*.1"] - end - - # Needs more comprehensive tests - test do - # system "#{bin}/aueffectutil" # segmentation fault - system "#{bin}/castool" - assert_match "chdman info", shell_output("#{bin}/chdman help info", 1) - system "#{bin}/floptool" - system "#{bin}/imgtool", "listformats" - system "#{bin}/jedutil", "-viewlist" - assert_match "linear equation", shell_output("#{bin}/ldresample 2>&1", 1) - assert_match "avifile.avi", shell_output("#{bin}/ldverify 2>&1", 1) - system "#{bin}/nltool", "--help" - system "#{bin}/nlwav", "--help" - assert_match "image1", shell_output("#{bin}/pngcmp 2>&1", 10) - assert_match "summary", shell_output("#{bin}/regrep 2>&1", 1) - system "#{bin}/romcmp" - system "#{bin}/rom-split" - assert_match "template", shell_output("#{bin}/src2html 2>&1", 1) - system "#{bin}/srcclean" - assert_match "architecture", shell_output("#{bin}/unidasm", 1) - end -end diff --git a/Formula/root.rb b/Formula/root.rb deleted file mode 100644 index b4f9e00a77034..0000000000000 --- a/Formula/root.rb +++ /dev/null @@ -1,141 +0,0 @@ -class Root < Formula - desc "Object oriented framework for large scale data analysis" - homepage "https://root.cern.ch/" - url "https://root.cern.ch/download/root_v6.14.06.source.tar.gz" - version "6.14.06" - sha256 "0fb943b61396f282b289e35c455a9ab60126229be1bd3f04a8f00b37c13ab432" - head "https://github.com/root-project/root.git" - - bottle do - rebuild 1 - sha256 "cbfda6bd45040e1136700a795fd2e515d66ab2d2f50781da35c0891e05c7e381" => :mojave - sha256 "0b96e958a4cde5d0f09b3b967f0af0932c0e09589fc2ef85d1d898241728ee38" => :high_sierra - sha256 "62868ac73e1a8b8be1d8261ef5133ca0dc67e008381c7ee28291aed542579ef3" => :sierra - end - - # https://github.com/Homebrew/homebrew-core/issues/30726 - # strings libCling.so | grep Xcode: - # /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 - # /Applications/Xcode.app/Contents/Developer - pour_bottle? do - reason "The bottle hardcodes locations inside Xcode.app" - satisfy do - MacOS::Xcode.installed? && - MacOS::Xcode.prefix.to_s.include?("/Applications/Xcode.app/") - end - end - - depends_on "cmake" => :build - depends_on "davix" - depends_on "fftw" - depends_on "gcc" # for gfortran - depends_on "graphviz" - depends_on "gsl" - # Temporarily depend on Homebrew libxml2 to work around a brew issue: - # https://github.com/Homebrew/brew/issues/5068 - depends_on "libxml2" if MacOS.version >= :mojave - depends_on "lz4" - depends_on "openssl" - depends_on "pcre" - depends_on "python" - depends_on "tbb" - depends_on "xrootd" - depends_on "xz" # for LZMA - - skip_clean "bin" - - needs :cxx11 - - def install - # Work around "error: no member named 'signbit' in the global namespace" - ENV.delete("SDKROOT") if DevelopmentTools.clang_build_version >= 900 - - # Freetype/afterimage/gl2ps/lz4 are vendored in the tarball, so are fine. - # However, this is still permitting the build process to make remote - # connections. As a hack, since upstream support it, we inreplace - # this file to "encourage" the connection over HTTPS rather than HTTP. - inreplace "cmake/modules/SearchInstalledSoftware.cmake", - "http://lcgpackages", - "https://lcgpackages" - - py_exe = Utils.popen_read("which python3").strip - py_prefix = Utils.popen_read("python3 -c 'import sys;print(sys.prefix)'").chomp - py_inc = Utils.popen_read("python3 -c 'from distutils import sysconfig;print(sysconfig.get_python_inc(True))'").chomp - - args = std_cmake_args + %W[ - -DCLING_CXX_PATH=clang++ - -DCMAKE_INSTALL_ELISPDIR=#{elisp} - -DPYTHON_EXECUTABLE=#{py_exe} - -DPYTHON_INCLUDE_DIR=#{py_inc} - -DPYTHON_LIBRARY=#{py_prefix}/Python - -Dbuiltin_cfitsio=OFF - -Dbuiltin_freetype=ON - -Ddavix=ON - -Dfftw3=ON - -Dfitsio=OFF - -Dfortran=ON - -Dgdml=ON - -Dgnuinstall=ON - -Dimt=ON - -Dmathmore=ON - -Dminuit2=ON - -Dmysql=OFF - -Dpgsql=OFF - -Dpython=ON - -Droofit=ON - -Dssl=ON - -Dtmva=ON - -Dxrootd=ON - ] - - mkdir "builddir" do - system "cmake", "..", *args - - # Work around superenv stripping out isysroot leading to errors with - # libsystem_symptoms.dylib (only available on >= 10.12) and - # libsystem_darwin.dylib (only available on >= 10.13) - if MacOS.version < :high_sierra - system "xcrun", "make", "install" - else - system "make", "install" - end - - chmod 0755, Dir[bin/"*.*sh"] - end - end - - def caveats; <<~EOS - Because ROOT depends on several installation-dependent - environment variables to function properly, you should - add the following commands to your shell initialization - script (.bashrc/.profile/etc.), or call them directly - before using ROOT. - - For bash users: - . #{HOMEBREW_PREFIX}/bin/thisroot.sh - For zsh users: - pushd #{HOMEBREW_PREFIX} >/dev/null; . bin/thisroot.sh; popd >/dev/null - For csh/tcsh users: - source #{HOMEBREW_PREFIX}/bin/thisroot.csh - EOS - end - - test do - (testpath/"test.C").write <<~EOS - #include - void test() { - std::cout << "Hello, world!" << std::endl; - } - EOS - (testpath/"test.bash").write <<~EOS - . #{bin}/thisroot.sh - root -l -b -n -q test.C - EOS - assert_equal "\nProcessing test.C...\nHello, world!\n", - shell_output("/bin/bash test.bash") - - # Test Python module - ENV["PYTHONPATH"] = lib/"root" - system "python3", "-c", "import ROOT" - end -end diff --git a/Formula/roswell.rb b/Formula/roswell.rb deleted file mode 100644 index 29aad9eb3bce3..0000000000000 --- a/Formula/roswell.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Roswell < Formula - desc "Lisp installer and launcher for major environments" - homepage "https://github.com/roswell/roswell" - url "https://github.com/roswell/roswell/archive/v19.1.10.96.tar.gz" - sha256 "e295f63f37c1d479af97d711fef925e2177066c2491be51c1fe0ab098cab9dee" - head "https://github.com/roswell/roswell.git" - - bottle do - sha256 "f26aa80640ed3b95153667017089ea52ba9be8a9e43c648ef90f7706701c17e1" => :mojave - sha256 "df2487a5d7805bd506db021b6a5d0ed9cd4a49b5d8a09f2156e554163a178961" => :high_sierra - sha256 "d12cd33d8fa47367503f25c88c1ead0fdaa4778886f92e455492b4dde26056ce" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./bootstrap" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV["ROSWELL_HOME"] = testpath - system bin/"ros", "init" - assert_predicate testpath/"config", :exist? - end -end diff --git a/Formula/roundup.rb b/Formula/roundup.rb deleted file mode 100644 index 8465b1fff0c55..0000000000000 --- a/Formula/roundup.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Roundup < Formula - desc "Unit testing tool" - homepage "https://bmizerany.github.io/roundup" - url "https://github.com/bmizerany/roundup/archive/v0.0.6.tar.gz" - sha256 "20741043ed5be7cbc54b1e9a7c7de122a0dacced77052e90e4ff08e41736f01c" - head "https://github.com/bmizerany/roundup.git" - - bottle do - cellar :any_skip_relocation - sha256 "5366c26e618d11f06bc85895b400a82fab81362e51dfa7dcf123fdb31aaafe75" => :mojave - sha256 "5b8f8ba32ea5e4cf6d52e11f6b121f6ec0da11b1a0a281bf2de46431a1682f68" => :high_sierra - sha256 "255515246130477d53aa39d0289b2840af33a937d7169a1dba297380d1eb02da" => :sierra - sha256 "77ff95001e3a2de6eedd4d5702e5e418b7c4ecfa6855af7b479e1e978249882f" => :el_capitan - sha256 "5dd0f6d1e64f54b3bb389411f95cd823b75e31f073e739d78793fca4b21e8e59" => :yosemite - sha256 "42a3781280553b56fdd9330f2ef1f930b489c932ac0191313eb1cf6482e9728f" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--bindir=#{bin}", - "--mandir=#{man}", - "--sysconfdir=#{etc}", - "--datarootdir=#{share}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/roundup", "-v" - end -end diff --git a/Formula/rp.rb b/Formula/rp.rb deleted file mode 100644 index cccae76dc2be4..0000000000000 --- a/Formula/rp.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Rp < Formula - desc "Tool to find ROP sequences in PE/Elf/Mach-O x86/x64 binaries" - homepage "https://0vercl0k.github.io/rp/" - url "https://github.com/0vercl0k/rp/archive/v1.tar.gz" - version "1.0" - sha256 "3bf69aee23421ffdc5c7fc3ce6c30eb7510640d384ce58f4a820bae02effebe3" - head "https://github.com/0vercl0k/rp.git" - - bottle do - cellar :any_skip_relocation - sha256 "9e7dee319426b8db92302fdd19ee37f3ea5b0b3b8ebb1865e29127aa340ec7b5" => :mojave - sha256 "40042ba7ad3506a62f79ed836480bf2d33a3ea171a19905a51db60c3a037cb0b" => :high_sierra - sha256 "93aea19e1b6c6511e309f87003f173485a36e2b870734b6162e0bc43ae5f2a70" => :sierra - sha256 "1ed1c49f3495c6da683908c34d17f345c5f3bde2a5112674bbd41f6a92da1ab2" => :el_capitan - sha256 "e85fa182a3b46f8a3cd5a6d3a27359d4981fb1cab0ca5c2d3a1a9c471af1a77c" => :yosemite - sha256 "398c2c7776b0da352930a13a9339cd66b4e74c773313eb347740cfd2ea8ccf24" => :mavericks - end - - depends_on "cmake" => :build - depends_on :macos => :lion - - # In order to have the same binary name in 32 and 64 bits. - patch :DATA - - def install - mkdir "build" do - system "cmake", ".." - system "make" - end - bin.install "bin/rp-osx" - end -end - -__END__ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 79d576b..34c2afa 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -36,12 +36,10 @@ set(RP_NAME "${RP_NAME}-${RP_PLAT}") - - if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT(optX86BUILD)) - set(FLAG_CXX "-m64") -- set(RP_NAME "${RP_NAME}-x64") - set(BEA_LIBRARY "BeaEngine.x64.${RP_PLAT}.${EXTENSION_LIBRARY}") - set(ARGTABLE_LIBRARY "argtable2.x64.${RP_PLAT}.${EXTENSION_LIBRARY}") - else() - set(FLAG_CXX "-m32") -- set(RP_NAME "${RP_NAME}-x86") - set(BEA_LIBRARY "BeaEngine.x86.${RP_PLAT}.${EXTENSION_LIBRARY}") - set(ARGTABLE_LIBRARY "argtable2.x86.${RP_PLAT}.${EXTENSION_LIBRARY}") - endif(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT(optX86BUILD)) diff --git a/Formula/rpcgen.rb b/Formula/rpcgen.rb deleted file mode 100644 index 202dc4a9d606b..0000000000000 --- a/Formula/rpcgen.rb +++ /dev/null @@ -1,105 +0,0 @@ -class Rpcgen < Formula - desc "Protocol Compiler" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/developer_cmds/developer_cmds-63.tar.gz" - sha256 "d4bc4a4b1045377f814da08fba8b7bfcd515ef1faec12bbb694de7defe9a5c0d" - - bottle do - cellar :any_skip_relocation - sha256 "e4c588689133af91de553a2a586cdaaebe27fc49c274ae1e2c7c889dc836a327" => :mojave - sha256 "53ca92eda3bb7eb7f81aa70794ca1b5c16deaba84fe7ad41aaca11f32ebb8988" => :high_sierra - sha256 "0d3a08d255ccbb538b0e818155e079ff74c65965d6effd67fd74775b837bdddb" => :sierra - sha256 "75acb2995dda96d42faf6a3f83b1b30c9d0a6502ac1b031f92567282a1c67f69" => :el_capitan - end - - keg_only :provided_by_macos - - depends_on :xcode => ["7.3", :build] - - # Add support for parsing 'hyper' and 'quad' types, as per RFC4506. - # https://github.com/openbsd/src/commit/26f19e833517620fd866d2ef3b1ea76ece6924c5 - # https://github.com/freebsd/freebsd/commit/15a1e09c3d41cb01afc70a2ea4d20c5a0d09348a - # Reported to Apple 13 Dec 2016 rdar://29644450 - patch :DATA - - def install - xcodebuild "-project", "developer_cmds.xcodeproj", - "-target", "rpcgen", - "-configuration", "Release", - "SYMROOT=build" - bin.install "build/Release/rpcgen" - man1.install "rpcgen/rpcgen.1" - end - - test do - assert_match "nettype", shell_output("#{bin}/rpcgen 2>&1", 1) - end -end - -__END__ -diff --git a/rpcgen/rpc_parse.c b/rpcgen/rpc_parse.c -index 52edc9f..db0c1f1 100644 ---- a/rpcgen/rpc_parse.c -+++ b/rpcgen/rpc_parse.c -@@ -580,6 +580,10 @@ get_type(prefixp, typep, dkind) - *typep = "long"; - (void) peekscan(TOK_INT, &tok); - break; -+ case TOK_HYPER: -+ *typep = "int64_t"; -+ (void) peekscan(TOK_INT, &tok); -+ break; - case TOK_VOID: - if (dkind != DEF_UNION && dkind != DEF_PROGRAM) { - error("voids allowed only inside union and program definitions with one argument"); -@@ -592,6 +596,7 @@ get_type(prefixp, typep, dkind) - case TOK_INT: - case TOK_FLOAT: - case TOK_DOUBLE: -+ case TOK_QUAD: - case TOK_BOOL: - *typep = tok.str; - break; -@@ -622,6 +627,11 @@ unsigned_dec(typep) - *typep = "u_long"; - (void) peekscan(TOK_INT, &tok); - break; -+ case TOK_HYPER: -+ get_token(&tok); -+ *typep = "u_int64_t"; -+ (void) peekscan(TOK_INT, &tok); -+ break; - case TOK_INT: - get_token(&tok); - *typep = "u_int"; -diff --git a/rpcgen/rpc_scan.c b/rpcgen/rpc_scan.c -index a8df441..4130107 100644 ---- a/rpcgen/rpc_scan.c -+++ b/rpcgen/rpc_scan.c -@@ -419,8 +419,10 @@ static token symbols[] = { - {TOK_UNSIGNED, "unsigned"}, - {TOK_SHORT, "short"}, - {TOK_LONG, "long"}, -+ {TOK_HYPER, "hyper"}, - {TOK_FLOAT, "float"}, - {TOK_DOUBLE, "double"}, -+ {TOK_QUAD, "quadruple"}, - {TOK_STRING, "string"}, - {TOK_PROGRAM, "program"}, - {TOK_VERSION, "version"}, -diff --git a/rpcgen/rpc_scan.h b/rpcgen/rpc_scan.h -index bac2be4..e4c57c8 100644 ---- a/rpcgen/rpc_scan.h -+++ b/rpcgen/rpc_scan.h -@@ -66,9 +66,11 @@ enum tok_kind { - TOK_INT, - TOK_SHORT, - TOK_LONG, -+ TOK_HYPER, - TOK_UNSIGNED, - TOK_FLOAT, - TOK_DOUBLE, -+ TOK_QUAD, - TOK_OPAQUE, - TOK_CHAR, - TOK_STRING, diff --git a/Formula/rpg.rb b/Formula/rpg.rb deleted file mode 100644 index 8952f04caecab..0000000000000 --- a/Formula/rpg.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Rpg < Formula - desc "Ruby package management for UNIX" - homepage "https://github.com/rtomayko/rpg" - url "https://github.com/downloads/rtomayko/rpg/rpg-0.3.0.tar.gz" - sha256 "c350f64744fb602956a91a57c8920e69058ea42e4e36b0e74368e96954d9d0c7" - head "https://github.com/rtomayko/rpg.git" - - bottle do - cellar :any_skip_relocation - sha256 "995850411f4a47126309c849e2da32c76abaddf40317515d7af5b8d2e2d6d680" => :mojave - sha256 "27b65a242fd862d805460bc06c91d7f164935dd14f8ded5cfa62924a1b973a42" => :high_sierra - sha256 "ddb4f887b798101d95300f0b0c22a0760d06158c09796e9bfb65869f28b69434" => :sierra - sha256 "be6550c915e361dcc0e020048f9a5f4ea37f1c5890a526282a3d70c610594981" => :el_capitan - sha256 "5c1af29955697dcd46ff58fd70f9aca986b977f3cc17f638822c81289f180df2" => :yosemite - sha256 "2ebf1a744c3c072c107883f565c04154b3e530c93868bb438bb90a1be35a4cb7" => :mavericks - sha256 "d32135e52bef3d16d6538dd8050cef4e1081474cc1156462a900ab2afa28b448" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/rpg", "config" - end -end diff --git a/Formula/rpl.rb b/Formula/rpl.rb deleted file mode 100644 index 6ccb18a1f9dd8..0000000000000 --- a/Formula/rpl.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rpl < Formula - desc "Text replacement utility" - homepage "http://www.laffeycomputer.com/rpl.html" - url "https://web.archive.org/web/20170106105512/downloads.laffeycomputer.com/current_builds/rpl-1.4.1.tar.gz" - sha256 "291055dc8763c855bab76142b5f7e9625392bcefa524b796bc4ddbcf941a1310" - - bottle do - cellar :any_skip_relocation - sha256 "79ed79d50ceaed30cc0fedaeeead5742208c72b04858863ceaf7951c7cbf8e00" => :mojave - sha256 "70b23d5ce18f2dfe58e8c782a00e4ab56d88c1e43b135c9e9ba0c8c387bef470" => :high_sierra - sha256 "2c9e55b51762d835db949c20f9eba36e83213082db82c69602658e2f28003b80" => :sierra - sha256 "175e1f127c8c707b0d90c3c7e4399cc5c1e18410bf8b7f6ec9340dbca4c16e4b" => :el_capitan - sha256 "d718355e56dd13c690f1d5a0541b5f051518f65b953aade9c525853a19266a61" => :yosemite - sha256 "b0c4dbf06500053703ee4a8c8e751d43c435f0e3b0e25d2d328d310dcf490c23" => :mavericks - sha256 "c59b98ff51670e96114daa8aa2c8984e35bd2bc1c2c01db9206bef9728a13624" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test").write "I like water." - - system "#{bin}/rpl", "-v", "water", "beer", "test" - assert_equal "I like beer.", (testpath/"test").read - end -end diff --git a/Formula/rpm.rb b/Formula/rpm.rb deleted file mode 100644 index 8f622b4ea4718..0000000000000 --- a/Formula/rpm.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Rpm < Formula - desc "Standard unix software packaging tool" - homepage "http://www.rpm.org/" - url "http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.1.tar.bz2" - sha256 "1139c24b7372f89c0a697096bf9809be70ba55e006c23ff47305c1849d98acda" - version_scheme 1 - - bottle do - sha256 "b1e3f6fbb8babb6105789236727be4e0e08c25a77f87f458a032235d72986675" => :mojave - sha256 "c8b3cf5d5c0de09cf18617c8c096f07354a7a6ac5db6c17a887e09272d5ec08f" => :high_sierra - sha256 "8d023b2d929fafbf627ebc906fb68e88a494b67887063cacb7fa30cddf6bbc5d" => :sierra - end - - depends_on "berkeley-db" - depends_on "gettext" - depends_on "libarchive" - depends_on "libmagic" - depends_on "lua@5.1" - depends_on "openssl" - depends_on "pkg-config" - depends_on "popt" - depends_on "xz" - depends_on "zstd" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["lua@5.1"].opt_libexec/"lib/pkgconfig" - - # only rpm should go into HOMEBREW_CELLAR, not rpms built - inreplace ["macros.in", "platform.in"], "@prefix@", HOMEBREW_PREFIX - - # ensure that pkg-config binary is found for dep generators - inreplace "scripts/pkgconfigdeps.sh", - "/usr/bin/pkg-config", Formula["pkg-config"].opt_bin/"pkg-config" - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sharedstatedir=#{var}/lib", - "--sysconfdir=#{etc}", - "--with-path-magic=#{HOMEBREW_PREFIX}/share/misc/magic", - "--enable-nls", - "--disable-plugins", - "--with-external-db", - "--with-crypto=openssl", - "--without-apidocs", - "--with-vendor=homebrew" - system "make", "install" - end - - def post_install - (var/"lib/rpm").mkpath - - # Attempt to fix expected location of GPG to a sane default. - inreplace lib/"rpm/macros", "/usr/bin/gpg2", HOMEBREW_PREFIX/"bin/gpg" - end - - def test_spec - <<~EOS - Summary: Test package - Name: test - Version: 1.0 - Release: 1 - License: Public Domain - Group: Development/Tools - BuildArch: noarch - - %description - Trivial test package - - %prep - %build - %install - mkdir -p $RPM_BUILD_ROOT/tmp - touch $RPM_BUILD_ROOT/tmp/test - - %files - /tmp/test - - %changelog - - EOS - end - - def rpmdir(macro) - Pathname.new(`#{bin}/rpm --eval #{macro}`.chomp) - end - - test do - (testpath/"rpmbuild").mkpath - (testpath/".rpmmacros").write <<~EOS - %_topdir #{testpath}/rpmbuild - %_tmppath %{_topdir}/tmp - EOS - - system "#{bin}/rpm", "-vv", "-qa", "--dbpath=#{testpath}/var/lib/rpm" - assert_predicate testpath/"var/lib/rpm/Packages", :exist?, - "Failed to create 'Packages' file!" - rpmdir("%_builddir").mkpath - specfile = rpmdir("%_specdir")+"test.spec" - specfile.write(test_spec) - system "#{bin}/rpmbuild", "-ba", specfile - assert_predicate rpmdir("%_srcrpmdir")/"test-1.0-1.src.rpm", :exist? - assert_predicate rpmdir("%_rpmdir")/"noarch/test-1.0-1.noarch.rpm", :exist? - system "#{bin}/rpm", "-qpi", "--dbpath=#{testpath}/var/lib/rpm", - rpmdir("%_rpmdir")/"noarch/test-1.0-1.noarch.rpm" - end -end diff --git a/Formula/rpm2cpio.rb b/Formula/rpm2cpio.rb deleted file mode 100644 index 77d85511251bb..0000000000000 --- a/Formula/rpm2cpio.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Rpm2cpio < Formula - desc "Tool to convert RPM package to CPIO archive" - homepage "https://svnweb.freebsd.org/ports/head/archivers/rpm2cpio/" - url "https://svnweb.freebsd.org/ports/head/archivers/rpm2cpio/files/rpm2cpio?revision=259745&view=co" - version "1.3" - sha256 "09651201a34771774fc4feaf5b409717e4bc052b82a89f3fc17c0cf578f8e608" - - bottle do - cellar :any_skip_relocation - sha256 "ab485e451668ede8eea2b1a9f8ac1781aae218399604d72e28587ece7674f0b0" => :mojave - sha256 "82c3021a2e882829d635ff45fc9780e72d0199777aa5dbbeb6f07b1a17944369" => :high_sierra - sha256 "864c4e9533aaf62e67a119006017df772a961bb0c407a0184fb0c9d8e1202509" => :sierra - sha256 "d26a07db8b6c1293171dc4937d81b2dc9936da0d52718d5f94ddd83524d5974e" => :el_capitan - sha256 "623651ab4e150e1f05ba3a42aa6a18a1e7cb2c023cc3327cd3388f178e65d80a" => :yosemite - sha256 "fcb6787ea96ae09d99bb6a7e28f653966277543b7a832661bb6da1a2903567cf" => :mavericks - end - - depends_on "xz" - - def install - bin.install "rpm2cpio" => "rpm2cpio.pl" - end -end diff --git a/Formula/rrdtool.rb b/Formula/rrdtool.rb deleted file mode 100644 index 0d3da27a4f32c..0000000000000 --- a/Formula/rrdtool.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Rrdtool < Formula - desc "Round Robin Database" - homepage "https://oss.oetiker.ch/rrdtool/index.en.html" - url "https://github.com/oetiker/rrdtool-1.x/releases/download/v1.7.0/rrdtool-1.7.0.tar.gz" - sha256 "f97d348935b91780f2cd80399719e20c0b91f0a23537c0a85f9ff306d4c5526b" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "1059ba04ca08cf52d7eb4d4327e0d531d751ab8e43f78daa9a4141f78f7264ae" => :mojave - sha256 "5ef3f96dffc6ff002feea4d89eadf80a16f9d39f86ec2096600fbbeb229f9c0d" => :high_sierra - sha256 "d83b25d91e82350f92041e001fa0652c05198df9490323f6c9582028fde4ea5b" => :sierra - end - - head do - url "https://github.com/oetiker/rrdtool-1.x.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "pango" - - # Ha-ha, but sleeping is annoying when running configure a lot - patch :DATA - - def install - # fatal error: 'ruby/config.h' file not found - ENV.delete("SDKROOT") - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-tcl - --with-tcllib=/usr/lib - --disable-perl-site-install - --disable-ruby-site-install - ] - - system "./bootstrap" if build.head? - system "./configure", *args - - # Needed to build proper Ruby bundle - ENV["ARCHFLAGS"] = "-arch #{MacOS.preferred_arch}" - - system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}", "install" - prefix.install "bindings/ruby/test.rb" - end - - test do - system "#{bin}/rrdtool", "create", "temperature.rrd", "--step", "300", - "DS:temp:GAUGE:600:-273:5000", "RRA:AVERAGE:0.5:1:1200", - "RRA:MIN:0.5:12:2400", "RRA:MAX:0.5:12:2400", "RRA:AVERAGE:0.5:12:2400" - system "#{bin}/rrdtool", "dump", "temperature.rrd" - end -end - -__END__ -diff --git a/configure b/configure -index 266754d..d21ab33 100755 ---- a/configure -+++ b/configure -@@ -23868,18 +23868,6 @@ $as_echo_n "checking in... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: and out again" >&5 - $as_echo "and out again" >&6; } - --echo $ECHO_N "ordering CD from http://tobi.oetiker.ch/wish $ECHO_C" 1>&6 --sleep 1 --echo $ECHO_N ".$ECHO_C" 1>&6 --sleep 1 --echo $ECHO_N ".$ECHO_C" 1>&6 --sleep 1 --echo $ECHO_N ".$ECHO_C" 1>&6 --sleep 1 --echo $ECHO_N ".$ECHO_C" 1>&6 --sleep 1 --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: just kidding ;-)" >&5 --$as_echo " just kidding ;-)" >&6; } - echo - echo "----------------------------------------------------------------" - echo "Config is DONE!" diff --git a/Formula/rsnapshot.rb b/Formula/rsnapshot.rb deleted file mode 100644 index 383a0d8220702..0000000000000 --- a/Formula/rsnapshot.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rsnapshot < Formula - desc "File system snapshot utility (based on rsync)" - homepage "https://www.rsnapshot.org/" - url "https://github.com/rsnapshot/rsnapshot/releases/download/1.4.2/rsnapshot-1.4.2.tar.gz" - sha256 "042a81c45b325296b21c363f417985d857f083f87c5c27f5a64677a052f24e16" - head "https://github.com/DrHyde/rsnapshot.git" - - bottle do - cellar :any_skip_relocation - sha256 "58aaff911593d284a63426d0ec4f1328910b9a6cb5a6ecb64f4853d0300a3184" => :mojave - sha256 "27e99660b73118874b5ba4ba355a0bf9b5db71933138a6b719869da01164a12a" => :high_sierra - sha256 "998faa778dcfdef5b362b10aeaffadc97e40f63ec6df72d9bd25029ab82f2550" => :sierra - sha256 "21823489c045150e8d8e51addba52b6cd75eedaec93357732db859ba738f59d5" => :el_capitan - sha256 "d6374fba65d24f7067197c9a7732f6f629dcb537f0687ab91f4f15d5c55d6cc6" => :yosemite - sha256 "66cc127c640855b029881b2cd029197b093d92b8d77c3bb9a61167cbaedfedd8" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/rsnapshot", "--version" - end -end diff --git a/Formula/rssh.rb b/Formula/rssh.rb deleted file mode 100644 index dfeb3245fb2a5..0000000000000 --- a/Formula/rssh.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Rssh < Formula - desc "Restricted shell for use with OpenSSH" - homepage "http://www.pizzashack.org/rssh" - url "https://downloads.sourceforge.net/project/rssh/rssh/2.3.4/rssh-2.3.4.tar.gz" - sha256 "f30c6a760918a0ed39cf9e49a49a76cb309d7ef1c25a66e77a41e2b1d0b40cd9" - - bottle do - sha256 "d31053458aa5853114ce8f1b7adf2aa8f6faee7cba5e7270be783f55d8311791" => :mojave - sha256 "05dd4375824810caf77f7b40d2b1ff0a229e6743f46c755427c428d5ca31f173" => :high_sierra - sha256 "aebe589ee047200b1fd0486d3a1fb08c4a601366391e80bcd1e7dcb87ca456e0" => :sierra - sha256 "23891b0317ef29a36b0b8ee9f140193d17ae616983c13f2179d5b317b33e1eee" => :el_capitan - sha256 "a63ead463b79c5375e0b919976173db13a236fcea06c4fa038a719375a550ca9" => :yosemite - sha256 "8b36773d40fb20e51fc0f277fe7930540dfc6e1cec0f6c5d19d20242ce1de3b9" => :mavericks - end - - # Submitted upstream: - # https://sourceforge.net/p/rssh/mailman/message/32251335/ - patch do - url "https://gist.githubusercontent.com/arminsch/9230011/raw/f0c5ed95bbba0be28ce2b5f0d1080de84ec317ab/rsshconf-log-rename.diff" - sha256 "abd625a8dc24f3089b177fd0318ffc1cf4fcb08d0c149191bb45943ad55f6934" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - # test to check if everything is linked correctly - system "#{bin}/rssh", "-v" - # the following test checks if rssh, if invoked without commands and options, fails - system "sh", "-c", "! #{bin}/rssh" - end -end diff --git a/Formula/rsstail.rb b/Formula/rsstail.rb deleted file mode 100644 index 61a3945ac2e89..0000000000000 --- a/Formula/rsstail.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Rsstail < Formula - desc "Monitors an RSS feed and emits new entries when detected" - homepage "https://www.vanheusden.com/rsstail/" - url "https://www.vanheusden.com/rsstail/rsstail-2.1.tgz" - sha256 "42cb452178b21c15c470bafbe5b8b5339a7fb5b980bf8d93d36af89864776e71" - head "https://github.com/flok99/rsstail.git" - - bottle do - cellar :any - sha256 "043bb4c59d45bf3d10e8a80c16dd684267c7ee905fd3384d6f197dff9d9ca686" => :mojave - sha256 "972ee73523d6f2f90ad8cefea3be3d800ed56ef86f5ab0aa27a9868959e8c4f6" => :high_sierra - sha256 "288a7d9668a50fc1db8525be5c1ef3a932e134b095bb6d0b5a785353ca8b6d59" => :sierra - sha256 "671b60685eabd26014203b5cd2eff8a94ee940e139c77793b379e1114c23a912" => :el_capitan - end - - depends_on "libmrss" - - resource "libiconv_hook" do - url "https://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/universe/liba/libapache-mod-encoding/libapache-mod-encoding_0.0.20021209.orig.tar.gz" - sha256 "1319b3cffd60982f0c739be18f816be77e3af46cd9039ac54417c1219518cf89" - end - - def install - (buildpath/"libiconv_hook").install resource("libiconv_hook") - cd "libiconv_hook/lib" do - system "./configure", "--disable-shared" - system "make" - end - - system "make", "LDFLAGS=-liconv -liconv_hook -lmrss -L#{buildpath}/libiconv_hook/lib/.libs" - man1.install "rsstail.1" - bin.install "rsstail" - end - - test do - assert_match(/^Title: /, - shell_output("#{bin}/rsstail -1u https://developer.apple.com/news/rss/news.rss")) - end -end diff --git a/Formula/rst-lint.rb b/Formula/rst-lint.rb deleted file mode 100644 index 5c027d0a926e1..0000000000000 --- a/Formula/rst-lint.rb +++ /dev/null @@ -1,43 +0,0 @@ -class RstLint < Formula - include Language::Python::Virtualenv - - desc "ReStructuredText linter" - homepage "https://github.com/twolfson/restructuredtext-lint" - url "https://github.com/twolfson/restructuredtext-lint/archive/1.2.1.tar.gz" - sha256 "a6a37cc1f06a7347d53ec39e41e101d9d26e8118e4ac2f602985990960a51b25" - - bottle do - cellar :any_skip_relocation - sha256 "fda6b9e208ae80012c883a159e9bc9322b6d12b8c9b3a5f54f8a2cb37a137a1d" => :mojave - sha256 "ce1b1d7179d16f81917d85a72dd84488dc32c8323f1ecbb5029cc6f4095bbc2e" => :high_sierra - sha256 "36e4a419033b0dedb26121fed365cea8f882d93645d95f433cc879188f00570f" => :sierra - end - - depends_on "python" - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - def install - virtualenv_install_with_resources - end - - test do - # test invocation on a file with no issues - (testpath/"pass.rst").write <<~EOS - Hello World - =========== - EOS - assert_equal "", shell_output("#{bin}/rst-lint pass.rst") - - # test invocation on a file with a whitespace style issue - (testpath/"fail.rst").write <<~EOS - Hello World - ========== - EOS - output = shell_output("#{bin}/rst-lint fail.rst", 2) - assert_match "WARNING fail.rst:2 Title underline too short.", output - end -end diff --git a/Formula/rswift.rb b/Formula/rswift.rb deleted file mode 100644 index 0f502b3943dd3..0000000000000 --- a/Formula/rswift.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rswift < Formula - desc "Get strong typed, autocompleted resources like images, fonts and segues" - homepage "https://github.com/mac-cain13/R.swift" - url "https://github.com/mac-cain13/R.swift.git", - :tag => "v5.0.0", - :revision => "a5822fdea505b76e8defb78878fde17afac52e38" - head "https://github.com/mac-cain13/R.swift.git" - - bottle do - cellar :any_skip_relocation - sha256 "438e662d49b9624d95baff913a2213ebca2b34aaa3380bbf194b06309f0a0cf4" => :mojave - sha256 "5c6d4b4d92f96d77a6bb5d816a9661901f3f61be696ea3bfc3aff7507b318c34" => :high_sierra - end - - depends_on :xcode => "10.0" - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", - "-static-stdlib" - bin.install ".build/release/rswift" - end - - test do - assert_match version.to_s, shell_output("#{bin}/rswift --version") - end -end diff --git a/Formula/rsync-time-backup.rb b/Formula/rsync-time-backup.rb deleted file mode 100644 index 5b1844d1c2934..0000000000000 --- a/Formula/rsync-time-backup.rb +++ /dev/null @@ -1,17 +0,0 @@ -class RsyncTimeBackup < Formula - desc "Time Machine-style backup for the terminal using rsync" - homepage "https://github.com/laurent22/rsync-time-backup" - url "https://github.com/laurent22/rsync-time-backup/archive/v1.1.5.tar.gz" - sha256 "567f42ddf2c365273252f15580bb64aa3b3a8abb4a375269aea9cf0278510657" - - bottle :unneeded - - def install - bin.install "rsync_tmbackup.sh" - end - - test do - output = shell_output("#{bin}/rsync_tmbackup.sh --rsync-get-flags") - assert_match "--times --recursive", output - end -end diff --git a/Formula/rsync.rb b/Formula/rsync.rb deleted file mode 100644 index 65e2e6ca76b21..0000000000000 --- a/Formula/rsync.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Rsync < Formula - desc "Utility that provides fast incremental file transfer" - homepage "https://rsync.samba.org/" - url "https://rsync.samba.org/ftp/rsync/rsync-3.1.3.tar.gz" - mirror "https://mirrors.kernel.org/gentoo/distfiles/rsync-3.1.3.tar.gz" - mirror "https://www.mirrorservice.org/sites/rsync.samba.org/rsync-3.1.3.tar.gz" - sha256 "55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0" - revision 1 - - bottle do - sha256 "412f196040106b9147ffe98698a5b3f91df1ddde6a21560b8da0f4a440ebc9e3" => :mojave - sha256 "c79e5b808b6f3925cfb27d38f46b19b6c771646dad1ab8a1a3e905b42c7327e2" => :high_sierra - sha256 "c7dc08f7c2c06bebb0947a2f8182dbbc4dde562fa3ab054555cee2564f355395" => :sierra - sha256 "2a41527121c88e9c616346a866d587d2365d6f9cda8cb9018c4fb8209646f444" => :el_capitan - end - - depends_on "autoconf" => :build - - # hfs-compression.diff is marked by upstream as broken as of 3.1.3 - patch do - url "https://download.samba.org/pub/rsync/src/rsync-patches-3.1.3.tar.gz" - mirror "https://www.mirrorservice.org/sites/rsync.samba.org/rsync-patches-3.1.3.tar.gz" - mirror "https://launchpad.net/rsync/main/3.1.2/+download/rsync-patches-3.1.3.tar.gz" - sha256 "0dc2848f20ca75c07a30c3237ccf8d61b61082ae7de94758a27dac350c99fb98" - apply "patches/fileflags.diff", - "patches/crtimes.diff" - end - - # Fix "error: too few arguments to function call, expected 4, have 2" - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/344bf3b/rsync/fix-crtimes-patch-3.1.3.diff" - sha256 "1a3c9043e19b55290bd6a6bc480544fe79a155c2c7ed003de185521f7516ecc3" - end - - def install - system "./prepare-source" - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--with-rsyncd-conf=#{etc}/rsyncd.conf", - "--enable-ipv6" - system "make" - system "make", "install" - end - - test do - system bin/"rsync", "--version" - end -end diff --git a/Formula/rsyslog.rb b/Formula/rsyslog.rb deleted file mode 100644 index 7613f6d2233b1..0000000000000 --- a/Formula/rsyslog.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Rsyslog < Formula - desc "Enhanced, multi-threaded syslogd" - homepage "https://www.rsyslog.com/" - url "https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.37.0.tar.gz" - sha256 "295c289b4c8abd8f8f3fe35a83249b739cedabe82721702b910255f9faf147e7" - - bottle do - sha256 "86ca9ebf3b35b31e61464b02603532d29c2bbb4f74690c004cbe2e599d102d49" => :mojave - sha256 "a7830278d2bddc26ab55d32cf4b424f9ef46fe4e14d3a152594560b65e8cccc4" => :high_sierra - sha256 "162a2cff81e34d67cca2696f5b0b09a511b13c56236828eb2014f05f2e6416ff" => :sierra - sha256 "a46359fabb1218e33e0fbdddf71ebe7361504d1c40b5473a8484b2f5f4ed2784" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libestr" - - resource "libfastjson" do - url "http://download.rsyslog.com/libfastjson/libfastjson-0.99.8.tar.gz" - sha256 "3544c757668b4a257825b3cbc26f800f59ef3c1ff2a260f40f96b48ab1d59e07" - end - - def install - resource("libfastjson").stage do - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --enable-imfile - --enable-usertools - --enable-diagtools - --disable-uuid - --disable-libgcrypt - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - plist_options :manual => "rsyslogd -f #{HOMEBREW_PREFIX}/etc/rsyslog.conf -i #{HOMEBREW_PREFIX}/var/run/rsyslogd.pid" - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - ProgramArguments - - #{opt_sbin}/rsyslogd - -n - -f - #{etc}/rsyslog.conf - -i - #{var}/run/rsyslogd.pid - - StandardErrorPath - #{var}/log/rsyslogd.log - StandardOutPath - #{var}/log/rsyslogd.log - - - EOS - end -end diff --git a/Formula/rt-audio.rb b/Formula/rt-audio.rb deleted file mode 100644 index 620ba0dce2cd0..0000000000000 --- a/Formula/rt-audio.rb +++ /dev/null @@ -1,35 +0,0 @@ -class RtAudio < Formula - desc "API for realtime audio input/output" - homepage "https://www.music.mcgill.ca/~gary/rtaudio/" - url "https://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-5.0.0.tar.gz" - sha256 "799deae1192da52cc2c15a078ed3b42449580be7d096fe9bc841c5bba0289c57" - head "https://github.com/thestk/rtaudio.git" - - bottle do - cellar :any - sha256 "c3ad32ecc289ff770964ca2d89511eba3d184787797324219a8b68a78ed3f3dd" => :mojave - sha256 "497769e931f08d51367dae46ad3f7c3ac52f7d87ed79698c4e564aed74433d4d" => :high_sierra - sha256 "d573b5a8e5e832e4b10445a05fe7502e62d42b5f8ae74796944ef3b30af7c3eb" => :sierra - sha256 "b47e9e56e72e2e7969f811e8cb11db6a4436e4f5b5363db917043083b8dda612" => :el_capitan - sha256 "bd1920ca3ad3c0f67e7824b430fa32a4f48085a9bb7233e9157bf292d73bd099" => :yosemite - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - lib.install "librtaudio_static.a", "librtaudio.dylib" - end - include.install "RtAudio.h", Dir["include/*"] - prefix.install "contrib", "tests" - doc.install Dir["doc/*"] - end - - test do - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lrtaudio", - prefix/"tests/testall.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/rtags.rb b/Formula/rtags.rb deleted file mode 100644 index 3ebf0be30cd86..0000000000000 --- a/Formula/rtags.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Rtags < Formula - desc "Source code cross-referencer like ctags with a clang frontend" - homepage "https://github.com/Andersbakken/rtags" - url "https://github.com/Andersbakken/rtags.git", - :tag => "v2.21", - :revision => "1249950963e494fbd66a4138cef639ffe6e05cd2" - head "https://github.com/Andersbakken/rtags.git" - - bottle do - sha256 "f909a10f9d06d2043ce2bd26ae65e337377143902ab49d0f4b000b6285f11b3b" => :mojave - sha256 "6920e417d70b0344dffa96f3c715bf26dd72b3e0bc365d8b030e9bf51f9544c3" => :high_sierra - sha256 "16da2bd02482eed66132a7eed1db4408a1bcf31107efe1fbd2919b6814628efd" => :sierra - end - - depends_on "cmake" => :build - depends_on "emacs" - depends_on "llvm" - depends_on "openssl" - - def install - # Homebrew llvm libc++.dylib doesn't correctly reexport libc++abi - ENV.append("LDFLAGS", "-lc++abi") - - args = std_cmake_args << "-DRTAGS_NO_BUILD_CLANG=ON" - - if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - args << "-DHAVE_CLOCK_MONOTONIC_RAW:INTERNAL=0" - args << "-DHAVE_CLOCK_MONOTONIC:INTERNAL=0" - end - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/bin/rdm --verbose --inactivity-timeout=300 --log-file=#{HOMEBREW_PREFIX}/var/log/rtags.log" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{bin}/rdm - --verbose - --launchd - --inactivity-timeout=300 - --log-file=#{var}/log/rtags.log - - Sockets - - Listener - - SockPathName - #{ENV["HOME"]}/.rdm - - - - - EOS - end - - test do - mkpath testpath/"src" - (testpath/"src/foo.c").write <<~EOS - void zaphod() { - } - - void beeblebrox() { - zaphod(); - } - EOS - (testpath/"src/README").write <<~EOS - 42 - EOS - - rdm = fork do - $stdout.reopen("/dev/null") - $stderr.reopen("/dev/null") - exec "#{bin}/rdm", "--exclude-filter=\"\"", "-L", "log" - end - - begin - sleep 1 - pipe_output("#{bin}/rc -c", "clang -c #{testpath}/src/foo.c", 0) - sleep 1 - assert_match "foo.c:1:6", shell_output("#{bin}/rc -f #{testpath}/src/foo.c:5:3") - system "#{bin}/rc", "-q" - ensure - Process.kill 9, rdm - Process.wait rdm - end - end -end diff --git a/Formula/rtf2latex2e.rb b/Formula/rtf2latex2e.rb deleted file mode 100644 index fdda223467c2d..0000000000000 --- a/Formula/rtf2latex2e.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Rtf2latex2e < Formula - desc "RTF-to-LaTeX translation" - homepage "https://rtf2latex2e.sourceforge.io/" - url "https://downloads.sourceforge.net/project/rtf2latex2e/rtf2latex2e-unix/2-2/rtf2latex2e-2-2-3.tar.gz" - version "2.2.3" - sha256 "7ef86edea11d5513cd86789257a91265fc82d978541d38ab2c08d3e9d6fcd3c3" - - bottle do - sha256 "bed54dc624378c20df3c352618645058a3ae3956d9cb5811af63836ffaa2dd10" => :mojave - sha256 "b31c9387003920d4c27cb846da71203d69711638ed284825861a12247eeabca9" => :high_sierra - sha256 "bbab54edbb07cbc3e16da33bdb0bd68258a330a3d1e2fceb175d1b753e6b81de" => :sierra - sha256 "0aa7144c74e8af3a935a87c2b9c822581c38566e24351a50ae601bbedca4aec3" => :el_capitan - end - - def install - system "make", "install", "prefix=#{prefix}", "CC=#{ENV.cc}" - end - - def caveats; <<~EOS - Configuration files have been installed to: - #{opt_pkgshare} - EOS - end - - test do - (testpath/"test.rtf").write <<~'EOS' - {\rtf1\ansi - {\b hello} world - } - EOS - system bin/"rtf2latex2e", "-n", "test.rtf" - assert_match "textbf{hello} world", File.read("test.tex") - end -end diff --git a/Formula/rtmidi.rb b/Formula/rtmidi.rb deleted file mode 100644 index b13dffb3984d6..0000000000000 --- a/Formula/rtmidi.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Rtmidi < Formula - desc "C++ classes that provide a common API for realtime MIDI input/output" - homepage "https://www.music.mcgill.ca/~gary/rtmidi/" - url "https://github.com/thestk/rtmidi/archive/v3.0.0.tar.gz" - sha256 "55cd0fba60321aadcd847481d207bf2b70e783b5bfa1a01037bf916554a7d5c4" - - bottle do - cellar :any - sha256 "8a2a9782decb8dc5cf871ed408ab3d924438df2feab9506ca53cba1d74bb1cb8" => :mojave - sha256 "f4a74942bb3c18351c0ff2d77a27703d70aa3311f3a39228a7615c424e9fac79" => :high_sierra - sha256 "27e811c4d1ad96adbc31f2f432543b85907a065a91cc0a4e515e980a2f45b253" => :sierra - sha256 "387b587f77423ee2ecfd716fa5235aa235ba5d33632b2765292ec318e0d67af3" => :el_capitan - sha256 "6e2f97819b113f8c95618377030170ddba66e79085f4f1553306b77e99683c6c" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./autogen.sh", "--no-configure" - system "./configure", "--prefix=#{prefix}" - system "make" - lib.install Dir[".libs/*.a", ".libs/*.dylib"] - include.install Dir["*.h"] - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "RtMidi.h" - int main(int argc, char **argv, char **env) { - RtMidiIn midiin; - RtMidiOut midiout; - std::cout << "Input ports: " << midiin.getPortCount() << "\\n" - << "Output ports: " << midiout.getPortCount() << "\\n"; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lrtmidi", "-o", "test" - system "./test" - end -end diff --git a/Formula/rtmpdump.rb b/Formula/rtmpdump.rb deleted file mode 100644 index e4a29f1c3a12d..0000000000000 --- a/Formula/rtmpdump.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Rtmpdump < Formula - desc "Tool for downloading RTMP streaming media" - homepage "https://rtmpdump.mplayerhq.hu/" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/r/rtmpdump/rtmpdump_2.4+20151223.gitfa8646d.1.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1.orig.tar.gz" - version "2.4+20151223" - sha256 "5c032f5c8cc2937eb55a81a94effdfed3b0a0304b6376147b86f951e225e3ab5" - head "https://git.ffmpeg.org/rtmpdump", :shallow => false - - bottle do - cellar :any - sha256 "e7c562912842233146c49e8510cf5a6024d098ee41202cabe1e25805c32c1ed1" => :mojave - sha256 "29e7fd835f6a5bc724d953bab6d06fa6e22f860ebc7b74f9b14a948fb0081c77" => :high_sierra - sha256 "2d3310f9a53bdf34ca144e9c58febe74f80253ac518a4c350471ca65591b7f1c" => :sierra - sha256 "f05e64f75ae79fcfe021be7b39112ea3aac53d8d1ca22bfaa658bbf161c84675" => :el_capitan - sha256 "c7a1bb0f9b2f7c194533a42ade11086fcb03a8bfaf76d479ae22ca4b0d107f20" => :yosemite - sha256 "f4c8dbdf3f8a04626a7975abf96eccd5e494a3f6a795b2035c6d418bfbe8079d" => :mavericks - end - - depends_on "openssl" - - conflicts_with "flvstreamer", :because => "both install 'rtmpsrv', 'rtmpsuck' and 'streams' binary" - - def install - ENV.deparallelize - system "make", "CC=#{ENV.cc}", - "XCFLAGS=#{ENV.cflags}", - "XLDFLAGS=#{ENV.ldflags}", - "MANDIR=#{man}", - "SYS=darwin", - "prefix=#{prefix}", - "sbindir=#{bin}", - "install" - end - - test do - system "#{bin}/rtmpdump", "-h" - end -end diff --git a/Formula/rtptools.rb b/Formula/rtptools.rb deleted file mode 100644 index 56c11e273e6f9..0000000000000 --- a/Formula/rtptools.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Rtptools < Formula - desc "Set of tools for processing RTP data" - homepage "https://www.cs.columbia.edu/irt/software/rtptools/" - url "https://www.cs.columbia.edu/irt/software/rtptools/download/rtptools-1.22.tar.gz" - sha256 "2c76b2a423fb943820c91194372133a44cbdc456ebf69c51616ec50eeb068c28" - - bottle do - cellar :any_skip_relocation - sha256 "ae6814e85782983d6e657331902fd792f78a2571b74887aafbe71e07b1bf4a97" => :mojave - sha256 "246c3120540b65eb6da10b3ea57d194e3014a4ab4e653a241676f6540c128607" => :high_sierra - sha256 "923a5b4263afc7903843268745313b854ade82c5c4faa36521fb30209e01e047" => :sierra - sha256 "3e50750a9e8589b351f0b5d61c2828bd928b053fbcef917b3cd805eeaee349ca" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - packet = [ - 0x5a, 0xb1, 0x49, 0x21, 0x00, 0x0d, 0x21, 0xce, 0x7f, 0x00, 0x00, 0x01, - 0x11, 0xd9, 0x00, 0x00, 0x00, 0x18, 0x00, 0x10, 0x00, 0x00, 0x06, 0x8a, - 0x80, 0x00, 0xdd, 0x51, 0x32, 0xf1, 0xab, 0xb4, 0xdb, 0x24, 0x9b, 0x07, - 0x64, 0x4f, 0xda, 0x56 - ] - - (testpath/"test.rtp").open("wb") do |f| - f.puts "#!rtpplay1.0 127.0.0.1/55568" - f.write packet.pack("c*") - end - - output = shell_output("#{bin}/rtpdump -F ascii -f #{testpath}/test.rtp") - assert_match "seq=56657 ts=854698932 ssrc=0xdb249b07", output - end -end diff --git a/Formula/rtv.rb b/Formula/rtv.rb deleted file mode 100644 index 5967a67523e21..0000000000000 --- a/Formula/rtv.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Rtv < Formula - include Language::Python::Virtualenv - - desc "Command-line Reddit client" - homepage "https://github.com/michael-lazar/rtv" - url "https://github.com/michael-lazar/rtv/archive/v1.24.0.tar.gz" - sha256 "8a792c6112e27876a48db09c18fe3032734066193d6c79614d7df1b83f48e744" - head "https://github.com/michael-lazar/rtv.git" - - bottle do - cellar :any_skip_relocation - sha256 "3395c998fd2fc8e47ad4b61844e705b31d2df9bb10a3ac5d5c1b7737b040c0a9" => :mojave - sha256 "43547bbcb11ace05aa7d017528321da7ae2221be9dfc5cae7e75e5a2c6d27147" => :high_sierra - sha256 "9794fc2530b06c1f4bb4c4f437ed1c94c12ff1848c40cefc62faa628e2cd0bca" => :sierra - sha256 "fde14e71bc242873257fce9f81c4f73f3c6536a439813df0dfe52339166f0472" => :el_capitan - end - - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", name - venv.pip_install_and_link buildpath - end - - test do - system "#{bin}/rtv", "--version" - end -end diff --git a/Formula/rubberband.rb b/Formula/rubberband.rb deleted file mode 100644 index e41df969c5a39..0000000000000 --- a/Formula/rubberband.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Rubberband < Formula - desc "Audio time stretcher tool and library" - homepage "https://breakfastquay.com/rubberband/" - url "https://breakfastquay.com/files/releases/rubberband-1.8.2.tar.bz2" - sha256 "86bed06b7115b64441d32ae53634fcc0539a50b9b648ef87443f936782f6c3ca" - revision 1 - head "https://bitbucket.org/breakfastquay/rubberband/", :using => :hg - - bottle do - cellar :any - sha256 "e100d79a7c55a6ba5642d0ce9e005971bdab26e8b7a0cdec011e21db19ccd767" => :mojave - sha256 "7dd91b6d0baee3f08704fb8dae4ced59725ef23a921dbf00c4db3a39f2119c63" => :high_sierra - sha256 "3fead448ab4b7e72a624cf85e82b0d1965ea8be224b95f43a24f56c248b9ec1e" => :sierra - sha256 "965110230f35d93876ec006522145b35a2e8168bb0202e7666d786f1e8262ce1" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libsamplerate" - depends_on "libsndfile" - - def install - system "make", "-f", "Makefile.osx" - # HACK: Manual install because "make install" is broken - # https://github.com/Homebrew/homebrew-core/issues/28660 - bin.install "bin/rubberband" - lib.install "lib/librubberband.dylib" => "librubberband.2.1.1.dylib" - lib.install_symlink lib/"librubberband.2.1.1.dylib" => "librubberband.2.dylib" - lib.install_symlink lib/"librubberband.2.1.1.dylib" => "librubberband.dylib" - include.install "rubberband" - - cp "rubberband.pc.in", "rubberband.pc" - inreplace "rubberband.pc", "%PREFIX%", opt_prefix - (lib/"pkgconfig").install "rubberband.pc" - end - - test do - output = shell_output("#{bin}/rubberband -t2 #{test_fixtures("test.wav")} out.wav 2>&1") - assert_match "Pass 2: Processing...", output - end -end diff --git a/Formula/ruby-build.rb b/Formula/ruby-build.rb deleted file mode 100644 index d7d4d08ed1d3a..0000000000000 --- a/Formula/ruby-build.rb +++ /dev/null @@ -1,22 +0,0 @@ -class RubyBuild < Formula - desc "Install various Ruby versions and implementations" - homepage "https://github.com/rbenv/ruby-build" - url "https://github.com/rbenv/ruby-build/archive/v20181225.tar.gz" - sha256 "5ace4787ace47384dc419b20f5eb5a59f1174e00bfabcfed74a175033cd0b18a" - head "https://github.com/rbenv/ruby-build.git" - - bottle :unneeded - - depends_on "autoconf" - depends_on "openssl" - depends_on "pkg-config" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - test do - assert_match "2.0.0", shell_output("#{bin}/ruby-build --definitions") - end -end diff --git a/Formula/ruby-completion.rb b/Formula/ruby-completion.rb deleted file mode 100644 index f3396a44c38a0..0000000000000 --- a/Formula/ruby-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class RubyCompletion < Formula - desc "Bash completion for Ruby" - homepage "https://github.com/mernen/completion-ruby" - url "https://github.com/mernen/completion-ruby.git", - :revision => "f3e4345042b0cc48317e45b673dfd3d23904b9a7" - version "2" - head "https://github.com/mernen/completion-ruby.git" - - bottle :unneeded - - def install - bash_completion.install "completion-ruby" => "ruby" - end - - test do - assert_match "-F __ruby", - shell_output("source #{bash_completion}/ruby && complete -p ruby") - end -end diff --git a/Formula/ruby-install.rb b/Formula/ruby-install.rb deleted file mode 100644 index 92003f225cb24..0000000000000 --- a/Formula/ruby-install.rb +++ /dev/null @@ -1,23 +0,0 @@ -class RubyInstall < Formula - desc "Install Ruby, JRuby, Rubinius, TruffleRuby, or mruby" - homepage "https://github.com/postmodern/ruby-install#readme" - url "https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz" - sha256 "500a8ac84b8f65455958a02bcefd1ed4bfcaeaa2bb97b8f31e61ded5cd0fd70b" - head "https://github.com/postmodern/ruby-install.git" - - bottle do - cellar :any_skip_relocation - sha256 "df0319ebf05c4b0700f16b0bd3150f53d3034a4b664d8d10c3f190af266cdbe4" => :mojave - sha256 "0e88bbe463d29a1e1cc0a91816023346a860a8a08c3daff660c24b313d2b4511" => :high_sierra - sha256 "0e88bbe463d29a1e1cc0a91816023346a860a8a08c3daff660c24b313d2b4511" => :sierra - sha256 "0e88bbe463d29a1e1cc0a91816023346a860a8a08c3daff660c24b313d2b4511" => :el_capitan - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/ruby-install" - end -end diff --git a/Formula/ruby.rb b/Formula/ruby.rb deleted file mode 100644 index b57c85f2fe276..0000000000000 --- a/Formula/ruby.rb +++ /dev/null @@ -1,210 +0,0 @@ -class Ruby < Formula - desc "Powerful, clean, object-oriented scripting language" - homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.0.tar.xz" - sha256 "acb00f04374899ba8ee74bbbcb9b35c5c6b1fd229f1876554ee76f0f1710ff5f" - - bottle do - sha256 "0b4a40fd6a1f64c997680f2867273c1011dff95dea30fa7caa36705e2f09a8d7" => :mojave - sha256 "ecb0c8837aeaded7a19caa279cfe97303caabc1374c42445a30fcb8030285991" => :high_sierra - sha256 "b7bd3b9250929028d41ef7c8d4fe291ce02d28165ec5094056c6e86102d48741" => :sierra - end - - head do - url "https://github.com/ruby/ruby.git", :branch => "trunk" - depends_on "autoconf" => :build - end - - keg_only :provided_by_macos - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "readline" - - # Should be updated only when Ruby is updated (if an update is available). - # The exception is Rubygem security fixes, which mandate updating this - # formula & the versioned equivalents and bumping the revisions. - resource "rubygems" do - url "https://rubygems.org/rubygems/rubygems-3.0.1.tgz" - sha256 "cade41c23eb8949e6d6f44c4c56f93801c326087e0cafd7301578b2b538a618e" - end - - def api_version - Utils.popen_read("#{bin}/ruby -e 'print Gem.ruby_api_version'") - end - - def rubygems_bindir - HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" - end - - def install - # otherwise `gem` command breaks - ENV.delete("SDKROOT") - - system "autoconf" if build.head? - - paths = %w[libyaml openssl readline].map { |f| Formula[f].opt_prefix } - args = %W[ - --prefix=#{prefix} - --enable-shared - --disable-silent-rules - --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby - --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby - --with-opt-dir=#{paths.join(":")} - ] - args << "--disable-dtrace" unless MacOS::CLT.installed? - - system "./configure", *args - - # Ruby has been configured to look in the HOMEBREW_PREFIX for the - # sitedir and vendordir directories; however we don't actually want to create - # them during the install. - # - # These directories are empty on install; sitedir is used for non-rubygems - # third party libraries, and vendordir is used for packager-provided libraries. - inreplace "tool/rbinstall.rb" do |s| - s.gsub! 'prepare "extension scripts", sitelibdir', "" - s.gsub! 'prepare "extension scripts", vendorlibdir', "" - s.gsub! 'prepare "extension objects", sitearchlibdir', "" - s.gsub! 'prepare "extension objects", vendorarchlibdir', "" - end - - system "make" - system "make", "install" - - # A newer version of ruby-mode.el is shipped with Emacs - elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } - - # This is easier than trying to keep both current & versioned Ruby - # formulae repeatedly updated with Rubygem patches. - resource("rubygems").stage do - ENV.prepend_path "PATH", bin - - system "#{bin}/ruby", "setup.rb", "--prefix=#{buildpath}/vendor_gem" - rg_in = lib/"ruby/#{api_version}" - - # Remove bundled Rubygem version. - rm_rf rg_in/"rubygems" - rm_f rg_in/"rubygems.rb" - rm_f rg_in/"ubygems.rb" - rm_f bin/"gem" - - # Drop in the new version. - rg_in.install Dir[buildpath/"vendor_gem/lib/*"] - bin.install buildpath/"vendor_gem/bin/gem" => "gem" - (libexec/"gembin").install buildpath/"vendor_gem/bin/bundle" => "bundle" - (libexec/"gembin").install_symlink "bundle" => "bundler" - end - end - - def post_install - # Since Gem ships Bundle we want to provide that full/expected installation - # but to do so we need to handle the case where someone has previously - # installed bundle manually via `gem install`. - rm_f %W[ - #{rubygems_bindir}/bundle - #{rubygems_bindir}/bundler - ] - rm_rf Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"] - rubygems_bindir.install_symlink Dir[libexec/"gembin/*"] - - # Customize rubygems to look/install in the global gem directory - # instead of in the Cellar, making gems last across reinstalls - config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" - config_file.unlink if config_file.exist? - config_file.write rubygems_config(api_version) - - # Create the sitedir and vendordir that were skipped during install - %w[sitearchdir vendorarchdir].each do |dir| - mkdir_p `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["#{dir}"]'` - end - end - - def rubygems_config(api_version); <<~EOS - module Gem - class << self - alias :old_default_dir :default_dir - alias :old_default_path :default_path - alias :old_default_bindir :default_bindir - alias :old_ruby :ruby - end - - def self.default_dir - path = [ - "#{HOMEBREW_PREFIX}", - "lib", - "ruby", - "gems", - "#{api_version}" - ] - - @default_dir ||= File.join(*path) - end - - def self.private_dir - path = if defined? RUBY_FRAMEWORK_VERSION then - [ - File.dirname(RbConfig::CONFIG['sitedir']), - 'Gems', - RbConfig::CONFIG['ruby_version'] - ] - elsif RbConfig::CONFIG['rubylibprefix'] then - [ - RbConfig::CONFIG['rubylibprefix'], - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - end - - @private_dir ||= File.join(*path) - end - - def self.default_path - if Gem.user_home && File.exist?(Gem.user_home) - [user_dir, default_dir, private_dir] - else - [default_dir, private_dir] - end - end - - def self.default_bindir - "#{rubygems_bindir}" - end - - def self.ruby - "#{opt_bin}/ruby" - end - end - EOS - end - - def caveats; <<~EOS - By default, binaries installed by gem will be placed into: - #{rubygems_bindir} - - You may want to add this to your PATH. - EOS - end - - test do - hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") - assert_equal "hello\n", hello_text - ENV["GEM_HOME"] = testpath - system "#{bin}/gem", "install", "json" - - (testpath/"Gemfile").write <<~EOS - source 'https://rubygems.org' - gem 'gemoji' - EOS - system rubygems_bindir/"bundle", "install", "--binstubs=#{testpath}/bin" - assert_predicate testpath/"bin/gemoji", :exist?, "gemoji is not installed in #{testpath}/bin" - end -end diff --git a/Formula/ruby@1.8.rb b/Formula/ruby@1.8.rb deleted file mode 100644 index cb3bc55c7ae73..0000000000000 --- a/Formula/ruby@1.8.rb +++ /dev/null @@ -1,61 +0,0 @@ -# This formula should never be deleted even when it is in violation of -# https://docs.brew.sh/Versions. This is because it is useful to test things -# with Ruby 1.8 for reproducing Ruby issues with older versions of macOS that -# used this version (e.g. on <=10.9 the system Ruby is 1.8 and we build our -# portable Ruby on 10.5). - -class RubyAT18 < Formula - desc "Powerful, clean, object-oriented scripting language" - homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2" - sha256 "b4e34703137f7bfb8761c4ea474f7438d6ccf440b3d35f39cc5e4d4e239c07e3" - revision 4 - - bottle do - sha256 "34ac66b428a1fd4da537d73c9b05217e9bcddd61f1a9f2de313c737eca86d49c" => :mojave - sha256 "028a474aad330d68cb05970f5587e30d98a6442dc847d30371c9dc4dfac3a9f8" => :high_sierra - sha256 "cde0dd03d2eeaa2d9e98f7b0ca88c1f362049f3de5b631ff9ca87d64360fe641" => :sierra - sha256 "d8993792dd522fe5977604d704337bf9845447db9d0274a173b16b7290d24ebf" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "readline" - - def install - # Compilation with `superenv` breaks because the Ruby build system sets - # `RUBYLIB` and `RUBYOPT` and this disturbs the wrappers for `cc` and - # `clang` that are provided by Homebrew and are implemented in Ruby. We - # prefix those invocations with `env` to clean the environment for us. - scrub_env = "/usr/bin/env RUBYLIB= RUBYOPT=" - inreplace "mkconfig.rb", " if /^prefix$/ =~ name\n", - <<~EOS.gsub(/^/, " ") - # `env` removes stuff that will break `superenv`. - if %w[CC CPP LDSHARED LIBRUBY_LDSHARED].include?(name) - val = val.sub("\\"", "\\"#{scrub_env} ") - end - if /^prefix$/ =~ name - EOS - - rm_r "ext/tk" - - args = %W[ - --prefix=#{prefix} - --enable-shared - --enable-install-doc - ] - - system "./configure", *args - system "make" - system "make", "install" - system "make", "install-doc" - end - - test do - hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") - assert_equal "hello\n", hello_text - system "#{bin}/ruby", "-e", "require 'zlib'" - end -end diff --git a/Formula/ruby@2.0.rb b/Formula/ruby@2.0.rb deleted file mode 100644 index 72828d55169ad..0000000000000 --- a/Formula/ruby@2.0.rb +++ /dev/null @@ -1,168 +0,0 @@ -# This formula should never be deleted even when it is in violation of -# https://docs.brew.sh/Versions. This is because it is useful to test things -# with Ruby 2.0 for reproducing Ruby issues with older versions of macOS that -# used this version (e.g. on 10.10 - 10.12 the system Ruby is 2.0). - -class RubyAT20 < Formula - desc "Powerful, clean, object-oriented scripting language" - homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p648.tar.bz2" - sha256 "087ad4dec748cfe665c856dbfbabdee5520268e94bb81a1d8565d76c3cc62166" - revision 6 - - bottle do - sha256 "19eeccaaff442801eb475401ba7b5260a67934b06ccd3c974e0a7343061067ca" => :mojave - sha256 "654d5bcfe7e6de9d11b56e2e2f74856524b3a1e64dc3b2ab6e6d6435beb5c347" => :high_sierra - sha256 "904af6d6af1c1244c16baad5705a23afd1d9909413697bc06ff68de0e0b6b82d" => :sierra - sha256 "80e640febc6fc4a40ff2abcf1e665a644bbed97b8ff0d157de32f48c0fefea72" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "readline" - - def api_version - "2.0.0" - end - - def rubygems_bindir - HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" - end - - def install - paths = %w[libyaml openssl readline].map { |f| Formula[f].opt_prefix } - args = %W[ - --prefix=#{prefix} - --enable-shared - --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby - --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby - --with-opt-dir=#{paths.join(":")} - --with-out-ext=tk - ] - args << "--disable-dtrace" unless MacOS::CLT.installed? - - system "./configure", *args - - # Ruby has been configured to look in the HOMEBREW_PREFIX for the - # sitedir and vendordir directories; however we don't actually want to create - # them during the install. - # - # These directories are empty on install; sitedir is used for non-rubygems - # third party libraries, and vendordir is used for packager-provided libraries. - inreplace "tool/rbinstall.rb" do |s| - s.gsub! 'prepare "extension scripts", sitelibdir', "" - s.gsub! 'prepare "extension scripts", vendorlibdir', "" - s.gsub! 'prepare "extension objects", sitearchlibdir', "" - s.gsub! 'prepare "extension objects", vendorarchlibdir', "" - end - - system "make" - system "make", "install" - end - - def post_install - # Since Gem ships Bundle we want to provide that full/expected installation - # but to do so we need to handle the case where someone has previously - # installed bundle manually via `gem install`. - rm_f %W[ - #{rubygems_bindir}/bundle - #{rubygems_bindir}/bundler - ] - rm_rf Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"] - rubygems_bindir.install_symlink Dir[libexec/"gembin/*"] - - # Customize rubygems to look/install in the global gem directory - # instead of in the Cellar, making gems last across reinstalls - config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" - config_file.unlink if config_file.exist? - config_file.write rubygems_config - - # Create the sitedir and vendordir that were skipped during install - %w[sitearchdir vendorarchdir].each do |dir| - mkdir_p `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["#{dir}"]'` - end - end - - def rubygems_config; <<~EOS - module Gem - class << self - alias :old_default_dir :default_dir - alias :old_default_path :default_path - alias :old_default_bindir :default_bindir - alias :old_ruby :ruby - end - - def self.default_dir - path = [ - "#{HOMEBREW_PREFIX}", - "lib", - "ruby", - "gems", - "#{api_version}" - ] - - @default_dir ||= File.join(*path) - end - - def self.private_dir - path = if defined? RUBY_FRAMEWORK_VERSION then - [ - File.dirname(RbConfig::CONFIG['sitedir']), - 'Gems', - RbConfig::CONFIG['ruby_version'] - ] - elsif RbConfig::CONFIG['rubylibprefix'] then - [ - RbConfig::CONFIG['rubylibprefix'], - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - end - - @private_dir ||= File.join(*path) - end - - def self.default_path - if Gem.user_home && File.exist?(Gem.user_home) - [user_dir, default_dir, private_dir] - else - [default_dir, private_dir] - end - end - - def self.default_bindir - "#{rubygems_bindir}" - end - - def self.ruby - "#{opt_bin}/ruby" - end - end - EOS - end - - def caveats; <<~EOS - By default, binaries installed by gem will be placed into: - #{rubygems_bindir} - - You may want to add this to your PATH. - EOS - end - - test do - hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") - assert_equal "hello\n", hello_text - ENV["GEM_HOME"] = testpath - system "#{bin}/gem", "install", "json" - end -end diff --git a/Formula/ruby@2.3.rb b/Formula/ruby@2.3.rb deleted file mode 100644 index e57203a14f7e9..0000000000000 --- a/Formula/ruby@2.3.rb +++ /dev/null @@ -1,172 +0,0 @@ -# This formula should never be deleted even when it is in violation of -# https://docs.brew.sh/Versions. This is because it is useful to test things -# with Ruby 2.3 for reproducing Ruby issues with older versions of macOS that -# used this version (e.g. on >=10.13 the system Ruby is 2.3). - -class RubyAT23 < Formula - desc "Powerful, clean, object-oriented scripting language" - homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.xz" - sha256 "910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe" - - bottle do - sha256 "5564363575b3a728513de1b7aab928c9335c367c07919ebdeaf1390ea56e47d5" => :mojave - sha256 "23e02434ffe95aa75e30d9ea584d2c2df430e8a921548d10a2164a95b979602d" => :high_sierra - sha256 "59567a42ca1c5ce4c6366ad8283e63784ce1321aced6187e7f7c351be4aa6fe3" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "readline" - - def api_version - "2.3.0" - end - - def rubygems_bindir - HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" - end - - def install - # otherwise `gem` command breaks - ENV.delete("SDKROOT") - - paths = %w[libyaml openssl readline].map { |f| Formula[f].opt_prefix } - args = %W[ - --prefix=#{prefix} - --enable-shared - --disable-silent-rules - --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby - --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby - --with-opt-dir=#{paths.join(":")} - ] - args << "--disable-dtrace" unless MacOS::CLT.installed? - - system "./configure", *args - - # Ruby has been configured to look in the HOMEBREW_PREFIX for the - # sitedir and vendordir directories; however we don't actually want to create - # them during the install. - # - # These directories are empty on install; sitedir is used for non-rubygems - # third party libraries, and vendordir is used for packager-provided libraries. - inreplace "tool/rbinstall.rb" do |s| - s.gsub! 'prepare "extension scripts", sitelibdir', "" - s.gsub! 'prepare "extension scripts", vendorlibdir', "" - s.gsub! 'prepare "extension objects", sitearchlibdir', "" - s.gsub! 'prepare "extension objects", vendorarchlibdir', "" - end - - system "make" - system "make", "install" - - # A newer version of ruby-mode.el is shipped with Emacs - elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } - end - - def post_install - # Since Gem ships Bundle we want to provide that full/expected installation - # but to do so we need to handle the case where someone has previously - # installed bundle manually via `gem install`. - rm_f %W[ - #{rubygems_bindir}/bundle - #{rubygems_bindir}/bundler - ] - rm_rf Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"] - rubygems_bindir.install_symlink Dir[libexec/"gembin/*"] - - # Customize rubygems to look/install in the global gem directory - # instead of in the Cellar, making gems last across reinstalls - config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" - config_file.unlink if config_file.exist? - config_file.write rubygems_config - - # Create the sitedir and vendordir that were skipped during install - %w[sitearchdir vendorarchdir].each do |dir| - mkdir_p `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["#{dir}"]'` - end - end - - def rubygems_config; <<~EOS - module Gem - class << self - alias :old_default_dir :default_dir - alias :old_default_path :default_path - alias :old_default_bindir :default_bindir - alias :old_ruby :ruby - end - - def self.default_dir - path = [ - "#{HOMEBREW_PREFIX}", - "lib", - "ruby", - "gems", - "#{api_version}" - ] - - @default_dir ||= File.join(*path) - end - - def self.private_dir - path = if defined? RUBY_FRAMEWORK_VERSION then - [ - File.dirname(RbConfig::CONFIG['sitedir']), - 'Gems', - RbConfig::CONFIG['ruby_version'] - ] - elsif RbConfig::CONFIG['rubylibprefix'] then - [ - RbConfig::CONFIG['rubylibprefix'], - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - end - - @private_dir ||= File.join(*path) - end - - def self.default_path - if Gem.user_home && File.exist?(Gem.user_home) - [user_dir, default_dir, private_dir] - else - [default_dir, private_dir] - end - end - - def self.default_bindir - "#{rubygems_bindir}" - end - - def self.ruby - "#{opt_bin}/ruby" - end - end - EOS - end - - def caveats; <<~EOS - By default, binaries installed by gem will be placed into: - #{rubygems_bindir} - - You may want to add this to your PATH. - EOS - end - - test do - hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") - assert_equal "hello\n", hello_text - ENV["GEM_HOME"] = testpath - system "#{bin}/gem", "install", "json" - end -end diff --git a/Formula/ruby@2.4.rb b/Formula/ruby@2.4.rb deleted file mode 100644 index e96d4dd1f7ac0..0000000000000 --- a/Formula/ruby@2.4.rb +++ /dev/null @@ -1,167 +0,0 @@ -class RubyAT24 < Formula - desc "Powerful, clean, object-oriented scripting language" - homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.xz" - sha256 "2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb" - - bottle do - sha256 "58264f323a4110f6ec4ffa0b49f499e3900e05888b5613f216ec196c995cd2b7" => :mojave - sha256 "adad9be6d47e0ccf36c7a6459ea5a65d0db7d3bacfbab7653226b606e681a344" => :high_sierra - sha256 "a505403cb86002722914ef0b3ce14a9bf00cdb9b9be0769caab6965688f9406e" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "readline" - - def api_version - "2.4.0" - end - - def rubygems_bindir - HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" - end - - def install - # otherwise `gem` command breaks - ENV.delete("SDKROOT") - - paths = %w[libyaml openssl readline].map { |f| Formula[f].opt_prefix } - args = %W[ - --prefix=#{prefix} - --enable-shared - --disable-silent-rules - --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby - --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby - --with-opt-dir=#{paths.join(":")} - ] - args << "--disable-dtrace" unless MacOS::CLT.installed? - - system "./configure", *args - - # Ruby has been configured to look in the HOMEBREW_PREFIX for the - # sitedir and vendordir directories; however we don't actually want to create - # them during the install. - # - # These directories are empty on install; sitedir is used for non-rubygems - # third party libraries, and vendordir is used for packager-provided libraries. - inreplace "tool/rbinstall.rb" do |s| - s.gsub! 'prepare "extension scripts", sitelibdir', "" - s.gsub! 'prepare "extension scripts", vendorlibdir', "" - s.gsub! 'prepare "extension objects", sitearchlibdir', "" - s.gsub! 'prepare "extension objects", vendorarchlibdir', "" - end - - system "make" - system "make", "install" - - # A newer version of ruby-mode.el is shipped with Emacs - elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } - end - - def post_install - # Since Gem ships Bundle we want to provide that full/expected installation - # but to do so we need to handle the case where someone has previously - # installed bundle manually via `gem install`. - rm_f %W[ - #{rubygems_bindir}/bundle - #{rubygems_bindir}/bundler - ] - rm_rf Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"] - rubygems_bindir.install_symlink Dir[libexec/"gembin/*"] - - # Customize rubygems to look/install in the global gem directory - # instead of in the Cellar, making gems last across reinstalls - config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" - config_file.unlink if config_file.exist? - config_file.write rubygems_config - - # Create the sitedir and vendordir that were skipped during install - %w[sitearchdir vendorarchdir].each do |dir| - mkdir_p `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["#{dir}"]'` - end - end - - def rubygems_config; <<~EOS - module Gem - class << self - alias :old_default_dir :default_dir - alias :old_default_path :default_path - alias :old_default_bindir :default_bindir - alias :old_ruby :ruby - end - - def self.default_dir - path = [ - "#{HOMEBREW_PREFIX}", - "lib", - "ruby", - "gems", - "#{api_version}" - ] - - @default_dir ||= File.join(*path) - end - - def self.private_dir - path = if defined? RUBY_FRAMEWORK_VERSION then - [ - File.dirname(RbConfig::CONFIG['sitedir']), - 'Gems', - RbConfig::CONFIG['ruby_version'] - ] - elsif RbConfig::CONFIG['rubylibprefix'] then - [ - RbConfig::CONFIG['rubylibprefix'], - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - end - - @private_dir ||= File.join(*path) - end - - def self.default_path - if Gem.user_home && File.exist?(Gem.user_home) - [user_dir, default_dir, private_dir] - else - [default_dir, private_dir] - end - end - - def self.default_bindir - "#{rubygems_bindir}" - end - - def self.ruby - "#{opt_bin}/ruby" - end - end - EOS - end - - def caveats; <<~EOS - By default, binaries installed by gem will be placed into: - #{rubygems_bindir} - - You may want to add this to your PATH. - EOS - end - - test do - hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") - assert_equal "hello\n", hello_text - ENV["GEM_HOME"] = testpath - system "#{bin}/gem", "install", "json" - end -end diff --git a/Formula/ruby@2.5.rb b/Formula/ruby@2.5.rb deleted file mode 100644 index 26a8405f29fe8..0000000000000 --- a/Formula/ruby@2.5.rb +++ /dev/null @@ -1,167 +0,0 @@ -class RubyAT25 < Formula - desc "Powerful, clean, object-oriented scripting language" - homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz" - sha256 "1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f" - - bottle do - sha256 "eda6486437a20a37dd86bda4589e3ef0010b4f131ea3d81f906a0a7321bb99c6" => :mojave - sha256 "e6fe89e349196eceb179cbe60a26f2da4848dcbc63ba30097a411a4f342f39c1" => :high_sierra - sha256 "8005a0e0bdf193b7b781091e995cc503d5802382916d0fb7b440fdada9f6ed10" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl" - depends_on "readline" - - def api_version - "2.5.0" - end - - def rubygems_bindir - HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" - end - - def install - # otherwise `gem` command breaks - ENV.delete("SDKROOT") - - paths = %w[libyaml openssl readline].map { |f| Formula[f].opt_prefix } - args = %W[ - --prefix=#{prefix} - --enable-shared - --disable-silent-rules - --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby - --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby - --with-opt-dir=#{paths.join(":")} - ] - args << "--disable-dtrace" unless MacOS::CLT.installed? - - system "./configure", *args - - # Ruby has been configured to look in the HOMEBREW_PREFIX for the - # sitedir and vendordir directories; however we don't actually want to create - # them during the install. - # - # These directories are empty on install; sitedir is used for non-rubygems - # third party libraries, and vendordir is used for packager-provided libraries. - inreplace "tool/rbinstall.rb" do |s| - s.gsub! 'prepare "extension scripts", sitelibdir', "" - s.gsub! 'prepare "extension scripts", vendorlibdir', "" - s.gsub! 'prepare "extension objects", sitearchlibdir', "" - s.gsub! 'prepare "extension objects", vendorarchlibdir', "" - end - - system "make" - system "make", "install" - - # A newer version of ruby-mode.el is shipped with Emacs - elisp.install Dir["misc/*.el"].reject { |f| f == "misc/ruby-mode.el" } - end - - def post_install - # Since Gem ships Bundle we want to provide that full/expected installation - # but to do so we need to handle the case where someone has previously - # installed bundle manually via `gem install`. - rm_f %W[ - #{rubygems_bindir}/bundle - #{rubygems_bindir}/bundler - ] - rm_rf Dir[HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/gems/bundler-*"] - rubygems_bindir.install_symlink Dir[libexec/"gembin/*"] - - # Customize rubygems to look/install in the global gem directory - # instead of in the Cellar, making gems last across reinstalls - config_file = lib/"ruby/#{api_version}/rubygems/defaults/operating_system.rb" - config_file.unlink if config_file.exist? - config_file.write rubygems_config - - # Create the sitedir and vendordir that were skipped during install - %w[sitearchdir vendorarchdir].each do |dir| - mkdir_p `#{bin}/ruby -rrbconfig -e 'print RbConfig::CONFIG["#{dir}"]'` - end - end - - def rubygems_config; <<~EOS - module Gem - class << self - alias :old_default_dir :default_dir - alias :old_default_path :default_path - alias :old_default_bindir :default_bindir - alias :old_ruby :ruby - end - - def self.default_dir - path = [ - "#{HOMEBREW_PREFIX}", - "lib", - "ruby", - "gems", - "#{api_version}" - ] - - @default_dir ||= File.join(*path) - end - - def self.private_dir - path = if defined? RUBY_FRAMEWORK_VERSION then - [ - File.dirname(RbConfig::CONFIG['sitedir']), - 'Gems', - RbConfig::CONFIG['ruby_version'] - ] - elsif RbConfig::CONFIG['rubylibprefix'] then - [ - RbConfig::CONFIG['rubylibprefix'], - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', - RbConfig::CONFIG['ruby_version'] - ] - end - - @private_dir ||= File.join(*path) - end - - def self.default_path - if Gem.user_home && File.exist?(Gem.user_home) - [user_dir, default_dir, private_dir] - else - [default_dir, private_dir] - end - end - - def self.default_bindir - "#{rubygems_bindir}" - end - - def self.ruby - "#{opt_bin}/ruby" - end - end - EOS - end - - def caveats; <<~EOS - By default, binaries installed by gem will be placed into: - #{rubygems_bindir} - - You may want to add this to your PATH. - EOS - end - - test do - hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") - assert_equal "hello\n", hello_text - ENV["GEM_HOME"] = testpath - system "#{bin}/gem", "install", "json" - end -end diff --git a/Formula/runcocoa.rb b/Formula/runcocoa.rb deleted file mode 100644 index 8fef5ba0e8bf1..0000000000000 --- a/Formula/runcocoa.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Runcocoa < Formula - desc "Tools to run Cocoa/Objective-C and C code from the command-line" - homepage "https://github.com/michaeltyson/Commandline-Cocoa" - url "https://github.com/michaeltyson/Commandline-Cocoa/archive/834f73b4b5d0d2be0d336c9869973f5f0db55949.tar.gz" - version "20120108" - sha256 "d90079efb92c8eef3c8e2c142683eb0c632ca61120c9e4a617bf9dac5362bf86" - - bottle :unneeded - - def install - bin.install "runcocoa.sh" => "runcocoa" - bin.install "runc.sh" => "runc" - end - - test do - string = "Hello world!" - - objc_code = "[[NSFileHandle fileHandleWithStandardOutput] writeData:[@\"#{string}\" dataUsingEncoding:NSNEXTSTEPStringEncoding]]" - objc_output = pipe_output("#{bin}/runcocoa", objc_code, 0) - assert_match string, objc_output - - c_code = "printf(\"#{string}\");" - c_output = pipe_output("#{bin}/runc", c_code, 0) - assert_match string, c_output - end -end diff --git a/Formula/runit.rb b/Formula/runit.rb deleted file mode 100644 index c8fd8a759f3e7..0000000000000 --- a/Formula/runit.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Runit < Formula - desc "Collection of tools for managing UNIX services" - homepage "http://smarden.org/runit" - url "http://smarden.org/runit/runit-2.1.2.tar.gz" - sha256 "6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18" - - bottle do - sha256 "e70c75527e992d70255d13631b56e7f1629cb1dc3583881967c6f4468fd296ef" => :mojave - sha256 "6f5e25b4f9d7d9128726aa72f97fda3b480cd36a5002041210e11303811f2369" => :high_sierra - sha256 "4eefe737db7b327dd6c595f57f34a8b564e170427ffc24ab35c4cd5ee79a6ec1" => :sierra - sha256 "3dbc4f1ba3d86e5f3d6900a19ff90b32d2aff91ffb68914be8740d916f3622da" => :el_capitan - sha256 "c268f70014699ba6be9a198686547ddd150f0b779aa0a1e623df60068d8cd4be" => :yosemite - end - - def install - # Runit untars to 'admin/runit-VERSION' - cd "runit-#{version}" do - # Per the installation doc on macOS, we need to make a couple changes. - system "echo 'cc -Xlinker -x' >src/conf-ld" - inreplace "src/Makefile", / -static/, "" - - inreplace "src/sv.c", "char *varservice =\"/service/\";", "char *varservice =\"#{var}/service/\";" - system "package/compile" - - # The commands are compiled and copied into the 'command' directory and - # names added to package/commands. Read the file for the commands and - # install them in homebrew. - rcmds = File.read("package/commands") - - rcmds.split("\n").each do |r| - bin.install("command/#{r.chomp}") - man8.install("man/#{r.chomp}.8") - end - - (var + "service").mkpath - end - end - - def caveats; <<~EOS - This formula does not install runit as a replacement for init. - The service directory is #{var}/service instead of /service. - - To have runit ready to run services, start runsvdir: - runsvdir -P #{var}/service - - Depending on the services managed by runit, this may need to start as root. - EOS - end -end diff --git a/Formula/rush.rb b/Formula/rush.rb deleted file mode 100644 index d62050f682c43..0000000000000 --- a/Formula/rush.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Rush < Formula - desc "GNU's Restricted User SHell" - homepage "https://www.gnu.org/software/rush/" - url "https://ftp.gnu.org/gnu/rush/rush-1.8.tar.gz" - mirror "https://ftpmirror.gnu.org/rush/rush-1.8.tar.gz" - sha256 "7f321e5556435b12638982c8d94c587982122f28c220f8bc679d7817035aadef" - - bottle do - sha256 "07ea3d94a8d34880b65ef978c5619e7bee5c67568d14a2afa7b3818541fe955d" => :mojave - sha256 "421c4ff7a56f4d434ce69551fcdbfc9ec39bec8e472b4d64923be0a93adc6405" => :high_sierra - sha256 "6147781c7c30c744d3e3aa69b55e72bb27a320aec6bf6e8d4a8360d5982aad20" => :sierra - sha256 "a33fca1d7ccc86d125771c7f4e983244abe182d3a3731faa86fa12f21f7ab18d" => :el_capitan - sha256 "5fcd6654497adb320a87fcf9b2b67361f157449f029a918148d90f60089920a1" => :yosemite - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{sbin}/rush", "-h" - end -end diff --git a/Formula/rust.rb b/Formula/rust.rb deleted file mode 100644 index c6ab225596b25..0000000000000 --- a/Formula/rust.rb +++ /dev/null @@ -1,134 +0,0 @@ -class Rust < Formula - desc "Safe, concurrent, practical language" - homepage "https://www.rust-lang.org/" - - stable do - url "https://static.rust-lang.org/dist/rustc-1.31.1-src.tar.gz" - sha256 "91d2fc22f08d986adab7a54eb3a6a9b99e490f677d2d092e5b9e4e069c23686a" - - resource "cargo" do - url "https://github.com/rust-lang/cargo.git", - :tag => "0.32.0", - :revision => "339d9f9c8f400010df3282ae5582bf3a0f739004" - end - - resource "racer" do - # Racer should stay < 2.1 for now as 2.1 needs the nightly build of rust - # See https://github.com/racer-rust/racer/tree/v2.1.2#installation - url "https://github.com/racer-rust/racer/archive/2.0.14.tar.gz" - sha256 "0442721c01ae4465843cb73b24f6caa0127c3308d72b944ad75736164756e522" - end - end - - bottle do - cellar :any - sha256 "e2df920e2a1089e0e36d591fa8289ebbd28ddb28912705ecc64de6f387ef4fcf" => :mojave - sha256 "7dc3455ea59cb83d6963cf92272ee752c0f2ab667f78add87f16aa4255dc0cb7" => :high_sierra - sha256 "2eeece7a9368c1814a86ef3814340b1da7f2fedf0a7c9d0e2508309f5683f896" => :sierra - end - - head do - url "https://github.com/rust-lang/rust.git" - - resource "cargo" do - url "https://github.com/rust-lang/cargo.git" - end - - resource "racer" do - url "https://github.com/racer-rust/racer.git" - end - end - - depends_on "cmake" => :build - depends_on "libssh2" - depends_on "openssl" - depends_on "pkg-config" - - # According to the official readme, GCC 4.7+ is required - fails_with :gcc_4_2 - ("4.3".."4.6").each do |n| - fails_with :gcc => n - end - - resource "cargobootstrap" do - # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0.txt - url "https://static.rust-lang.org/dist/2018-10-25/cargo-0.31.0-x86_64-apple-darwin.tar.gz" - sha256 "2b8fd336db9f98b778e4ed44186066952f02670cc1e49ade4e00fd55cef5e9f9" - end - - def install - # Fix build failure for compiler_builtins "error: invalid deployment target - # for -stdlib=libc++ (requires OS X 10.7 or later)" - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix - - # Fix build failure for cmake v0.1.24 "error: internal compiler error: - # src/librustc/ty/subst.rs:127: impossible case reached" on 10.11, and for - # libgit2-sys-0.6.12 "fatal error: 'os/availability.h' file not found - # #include " on 10.11 and "SecTrust.h:170:67: error: - # expected ';' after top level declarator" among other errors on 10.12 - ENV["SDKROOT"] = MacOS.sdk_path - - args = ["--prefix=#{prefix}"] - args << "--disable-rpath" if build.head? - if build.head? - args << "--release-channel=nightly" - else - args << "--release-channel=stable" - end - system "./configure", *args - system "make" - system "make", "install" - - resource("cargobootstrap").stage do - system "./install.sh", "--prefix=#{buildpath}/cargobootstrap" - end - ENV.prepend_path "PATH", buildpath/"cargobootstrap/bin" - - resource("cargo").stage do - ENV["RUSTC"] = bin/"rustc" - system "cargo", "install", "--root", prefix, "--path", ".", "--features", "curl-sys/force-system-lib-on-osx" - end - - resource("racer").stage do - ENV.prepend_path "PATH", bin - cargo_home = buildpath/"cargo_home" - cargo_home.mkpath - ENV["CARGO_HOME"] = cargo_home - system "cargo", "install", "--root", libexec, "--path", "." - (bin/"racer").write_env_script(libexec/"bin/racer", :RUST_SRC_PATH => pkgshare/"rust_src") - end - - # Remove any binary files; as Homebrew will run ranlib on them and barf. - rm_rf Dir["src/{llvm,llvm-emscripten,test,librustdoc,etc/snapshot.pyc}"] - (pkgshare/"rust_src").install Dir["src/*"] - - rm_rf prefix/"lib/rustlib/uninstall.sh" - rm_rf prefix/"lib/rustlib/install.log" - end - - def post_install - Dir["#{lib}/rustlib/**/*.dylib"].each do |dylib| - chmod 0664, dylib - MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}") - chmod 0444, dylib - end - end - - test do - system "#{bin}/rustdoc", "-h" - (testpath/"hello.rs").write <<~EOS - fn main() { - println!("Hello World!"); - } - EOS - system "#{bin}/rustc", "hello.rs" - assert_equal "Hello World!\n", `./hello` - system "#{bin}/cargo", "new", "hello_world", "--bin" - assert_equal "Hello, world!", - (testpath/"hello_world").cd { `#{bin}/cargo run`.split("\n").last } - end -end diff --git a/Formula/rustc-completion.rb b/Formula/rustc-completion.rb deleted file mode 100644 index 450e0abc2f467..0000000000000 --- a/Formula/rustc-completion.rb +++ /dev/null @@ -1,27 +0,0 @@ -class RustcCompletion < Formula - desc "Bash completion for rustc" - homepage "https://github.com/roshan/rust-bash-completion" - head "https://github.com/roshan/rust-bash-completion.git" - - stable do - url "https://github.com/roshan/rust-bash-completion/archive/0.12.1.tar.gz" - sha256 "562f84ccab40f2b3e7ef47e2e6d9b6615070a0e7330d64ea5368b6ad75455012" - - # upstream commit to fix an undefined command when sourcing the file directly - patch do - url "https://github.com/roshan/rust-bash-completion/commit/932e9bb4e9f28c2785de2b8db6f0e8c050f4f9be.diff?full_index=1" - sha256 "2e1606d329f6229e7b57d8c733bc7352ed811d6295c0331eafc2210652d548ca" - end - end - - bottle :unneeded - - def install - bash_completion.install "etc/bash_completion.d/rustc" - end - - test do - assert_match "-F _rustc", - shell_output("source #{bash_completion}/rustc && complete -p rustc") - end -end diff --git a/Formula/rustup-init.rb b/Formula/rustup-init.rb deleted file mode 100644 index a865bf0bebf94..0000000000000 --- a/Formula/rustup-init.rb +++ /dev/null @@ -1,46 +0,0 @@ -class RustupInit < Formula - desc "The Rust toolchain installer" - homepage "https://github.com/rust-lang/rustup.rs" - url "https://github.com/rust-lang/rustup.rs/archive/1.16.0.tar.gz" - sha256 "8c4ffeda2088dbdd5ea2eac8acef5ddd57dfcfe1f06a503e3da790f93161e1a6" - - bottle do - cellar :any_skip_relocation - sha256 "f31fea6610b20aeace8c1462c838a1edff41bb5fb4442b0259a8fc68cd8bafbc" => :mojave - sha256 "f8f40d63b06b58e8f8a138e957e3e1c9e567518278e53c9fa03bea3f428b79ac" => :high_sierra - sha256 "f7bb37881a60eab7b7f001db2fc82784b43ce9fb5d061b9465b5b1d502fb67b4" => :sierra - end - - depends_on "rust" => :build - - # Fixes `rustup-init` not working when it is relative symlink. - # https://github.com/rust-lang/rustup.rs/issues/1512 - # https://github.com/rust-lang/rustup.rs/pull/1521 - patch do - url "https://github.com/rust-lang/rustup.rs/pull/1521/commits/ebbfced7ee4aeb5be4c775f8f85e351093d5818f.diff?full_index=1" - sha256 "34dc006d75d747b99dd9fe49bdde396a8bf5443d1e3df1a47c4776c06ec3f3c7" - end - - def install - cargo_home = buildpath/"cargo_home" - cargo_home.mkpath - ENV["CARGO_HOME"] = cargo_home - - system "cargo", "install", "--root", prefix, "--path", ".", - "--features", "no-self-update" - end - - test do - ENV["CARGO_HOME"] = testpath/".cargo" - ENV["RUSTUP_HOME"] = testpath/".multirust" - - system bin/"rustup-init", "-y" - (testpath/"hello.rs").write <<~EOS - fn main() { - println!("Hello World!"); - } - EOS - system testpath/".cargo/bin/rustc", "hello.rs" - assert_equal "Hello World!", shell_output("./hello").chomp - end -end diff --git a/Formula/rxvt-unicode.rb b/Formula/rxvt-unicode.rb deleted file mode 100644 index b3943fec6446e..0000000000000 --- a/Formula/rxvt-unicode.rb +++ /dev/null @@ -1,85 +0,0 @@ -class RxvtUnicode < Formula - desc "Rxvt fork with Unicode support" - homepage "http://software.schmorp.de/pkg/rxvt-unicode.html" - url "http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.22.tar.bz2" - sha256 "e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd" - revision 3 - - bottle do - sha256 "126bda5982eb1d785cdaf84ab108024d85c3904cc3039514f13e12ebb80652a9" => :mojave - sha256 "01a97a5842a1507ae1e9c99d973811e300d0aac95b3fb744e8181918b6ac11eb" => :high_sierra - sha256 "2946f3abe2481ad6e4f52be7a9e51259bcd0846f38602e74384343946479eb4a" => :sierra - sha256 "5d6060cc30061763809d7255b8654309be0a709fccdcda1b799f0fac16fd085d" => :el_capitan - sha256 "9b674dd3738ab25fa6145680f92ca036df470ced089448abcb6647439320e075" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on :x11 - - # Patches 1 and 2 remove -arch flags for compiling perl support - # Patch 3 fixes `make install` target on case-insensitive filesystems - patch :DATA - - def install - args = %W[ - --prefix=#{prefix} - --enable-256-color - --with-term=rxvt-unicode-256color - --with-terminfo=/usr/share/terminfo - --enable-smart-resize - --enable-unicode3 - ] - - system "./configure", *args - system "make", "install" - end - - test do - daemon = fork do - system bin/"urxvtd" - end - sleep 2 - system bin/"urxvtc", "-k" - Process.wait daemon - end -end - -__END__ -diff --git a/configure b/configure -index c756724..5e94907 100755 ---- a/configure -+++ b/configure -@@ -7847,8 +7847,8 @@ $as_echo_n "checking for $PERL suitability... " >&6; } - - save_CXXFLAGS="$CXXFLAGS" - save_LIBS="$LIBS" -- CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" -- LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" -+ CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts|sed -E 's/ -arch [^ ]+//g'`" -+ LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts|sed -E 's/ -arch [^ ]+//g'`" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -7884,8 +7884,8 @@ $as_echo "#define ENABLE_PERL 1" >>confdefs.h - - IF_PERL= - PERL_O=rxvtperl.o -- PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" -- PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" -+ PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts|sed -E 's/ -arch [^ ]+//g'`" -+ PERLLIB="`$PERL -MExtUtils::Embed -e ldopts|sed -E 's/ -arch [^ ]+//g'`" - PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" - else - as_fn_error $? "no, unable to link" "$LINENO" 5 -diff --git a/Makefile.in b/Makefile.in -index eee5969..c230930 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -31,6 +31,7 @@ subdirs = src doc - - RECURSIVE_TARGETS = all allbin alldoc tags clean distclean realclean install - -+.PHONY: install - #------------------------------------------------------------------------- - - $(RECURSIVE_TARGETS): diff --git a/Formula/ry.rb b/Formula/ry.rb deleted file mode 100644 index e2523e1522b7b..0000000000000 --- a/Formula/ry.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Ry < Formula - desc "Ruby virtual env tool" - homepage "https://github.com/jayferd/ry" - url "https://github.com/jayferd/ry/archive/v0.5.2.tar.gz" - sha256 "b53b51569dfa31233654b282d091b76af9f6b8af266e889b832bb374beeb1f59" - head "https://github.com/jayferd/ry.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "022769e51adb7393c5b418aef50911e96bb6bc43dfc7d81850b6e71cea7c3a2d" => :mojave - sha256 "7d9631e41ff87b979c1d94ce1bfe1a710dd031e923b447332186678e68a0f523" => :high_sierra - sha256 "2703cd68ac926b7bd8dac25c93054993706d32a4c9857b450eb19f88bdf81530" => :sierra - sha256 "5b324970a3a3c806029241e1c5c453c900f16b3aec8e32bedc5d1a6abb5670c7" => :el_capitan - sha256 "7b8c7549875ff9a303735ffae235f520fd85af5796953ab92949d2ec7d69ecc6" => :yosemite - sha256 "c94e0176f99aaefcdc84ef95c081aa348177662e1b7f20d429a5c56a5b98ef40" => :mavericks - end - - depends_on "bash-completion" - depends_on "ruby-build" - - def install - ENV["PREFIX"] = prefix - ENV["BASH_COMPLETIONS_DIR"] = etc/"bash_completion.d" - ENV["ZSH_COMPLETIONS_DIR"] = share/"zsh/site-functions" - system "make", "install" - end - - def caveats; <<~EOS - Please add to your profile: - which ry &>/dev/null && eval "$(ry setup)" - - If you want your Rubies to persist across updates you - should set the `RY_RUBIES` variable in your profile, i.e. - export RY_RUBIES="#{HOMEBREW_PREFIX}/var/ry/rubies" - EOS - end - - test do - ENV["RY_RUBIES"] = testpath/"rubies" - - system bin/"ry", "ls" - assert_predicate testpath/"rubies", :exist? - end -end diff --git a/Formula/rzip.rb b/Formula/rzip.rb deleted file mode 100644 index 1f63ab8d2945d..0000000000000 --- a/Formula/rzip.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Rzip < Formula - desc "File compression tool (like gzip or bzip2)" - homepage "https://rzip.samba.org/" - url "https://rzip.samba.org/ftp/rzip/rzip-2.1.tar.gz" - sha256 "4bb96f4d58ccf16749ed3f836957ce97dbcff3e3ee5fd50266229a48f89815b7" - - bottle do - cellar :any_skip_relocation - sha256 "aa81be3378f5e5410013d08bddf9c4f9c605d639b7a1e53f37bc7cf7264aae82" => :mojave - sha256 "fec6b24d1b5d0555a7cdd732846cfc6357d4fca1b3ff59a3c5fa27e3bc2f4d9e" => :high_sierra - sha256 "89a5e7ab518070df7c3f5091a18a412b72910b58a191222e915b1ed9db6ba570" => :sierra - sha256 "4eedb0ca975a72a4591d1e386d1ae01a546fb8401ea4f0b05c0fa71809e159db" => :el_capitan - sha256 "170150a7704b270df0a1cce7f1cfde689e245f9a9f628b5f0415df5ceae89e19" => :yosemite - sha256 "f86aa1c100b7144b04c43a06b475e11f18d88982ed0d5ea90b1da0c3cc813720" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "install", "INSTALL_MAN=#{man}" - - bin.install_symlink "rzip" => "runzip" - man1.install_symlink "rzip.1" => "runzip.1" - end - - test do - path = testpath/"data.txt" - original_contents = "." * 1000 - path.write original_contents - - # compress: data.txt -> data.txt.rz - system bin/"rzip", path - refute_predicate path, :exist? - - # decompress: data.txt.rz -> data.txt - system bin/"rzip", "-d", "#{path}.rz" - assert_equal original_contents, path.read - end -end diff --git a/Formula/s-lang.rb b/Formula/s-lang.rb deleted file mode 100644 index b1ac80847f3e2..0000000000000 --- a/Formula/s-lang.rb +++ /dev/null @@ -1,31 +0,0 @@ -class SLang < Formula - desc "Library for creating multi-platform software" - homepage "https://www.jedsoft.org/slang/" - url "https://www.jedsoft.org/releases/slang/slang-2.3.1a.tar.bz2" - mirror "https://src.fedoraproject.org/repo/pkgs/slang/slang-2.3.1a.tar.bz2/sha512/e7236a189081ebcbaf4e7f0506671226a4d46aede8826e1a558f1a2f57bcbe3ad58eadeabe2df99cd3d8bacb4c93749996bcbce4f51d338fc9396e0f945933e7/slang-2.3.1a.tar.bz2" - sha256 "54f0c3007fde918039c058965dffdfd6c5aec0bad0f4227192cc486021f08c36" - - bottle do - rebuild 1 - sha256 "862f29d0ec2a550cfe2fcb3b636de4b6251be184ce468f4a42bbce03f5dfcd05" => :mojave - sha256 "d1e3b31d585951f3b7eddd49242573ddd17b7fb15e295e3c987497fc02fbf9c2" => :high_sierra - sha256 "587a25f8189a6579e730b9cf5bed62feb55381a66aae4d5fddfb59dfc6868802" => :sierra - sha256 "a57f80593cc9b57b7c7eef8252a81b0240b9c421fac756010e01c5292f51bff1" => :el_capitan - end - - depends_on "libpng" - - def install - png = Formula["libpng"] - system "./configure", "--prefix=#{prefix}", - "--with-pnglib=#{png.lib}", - "--with-pnginc=#{png.include}" - ENV.deparallelize - system "make" - system "make", "install" - end - - test do - assert_equal "Hello World!", shell_output("#{bin}/slsh -e 'message(\"Hello World!\");'").strip - end -end diff --git a/Formula/s-nail.rb b/Formula/s-nail.rb deleted file mode 100644 index 51d3579d4fcf1..0000000000000 --- a/Formula/s-nail.rb +++ /dev/null @@ -1,49 +0,0 @@ -class SNail < Formula - desc "Fork of Heirloom mailx" - homepage "https://www.sdaoden.eu/code.html" - url "https://www.sdaoden.eu/downloads/s-nail-14.9.11.tar.gz" - sha256 "279202687409b8e7b4f267e178aed1bd4c68b79c01c10b80f07197f2f73d6695" - - bottle do - sha256 "50017a1a58e325f6cf2bf442e69279334f97a3167160d09ce14803d115fb74ff" => :mojave - sha256 "39c79b2b08e58b4784fb16bdf8ff6133d8eb3b435bbc8e97e493001a16fd5f4c" => :high_sierra - sha256 "c1942ec66157c586e6648051d2461ccbd8aaa0b99ec7f4f757c982683c9c08aa" => :sierra - sha256 "4d137ea6f6ff75f6bd792584aa4d86ead5445f0e5df9c9ed7074d84df3b7fb0f" => :el_capitan - end - - depends_on "libidn" - depends_on "openssl" - - def install - system "make", "OPT_AUTOCC=no", - "CC=#{ENV.cc}", - "cc_maxtopt=1", - "OPT_NOMEMBDBG=1", - "C_INCLUDE_PATH=#{Formula["openssl"].opt_include}", - "LDFLAGS=-L#{Formula["openssl"].opt_lib}", - "VAL_PREFIX=#{prefix}", - "OPT_DOTLOCK=no", - "config" - system "make", "build" - system "make", "install" - end - - test do - ENV["SOURCE_DATE_EPOCH"] = "844221007" - - date1 = Utils.popen_read("date", "-r", "844221007", "+%a %b %e %T %Y") - date2 = Utils.popen_read("date", "-r", "844221007", "+%a, %d %b %Y %T %z") - - expected = <<~EOS - From reproducible_build #{date1.chomp} - Date: #{date2.chomp} - User-Agent: s-nail reproducible_build - - Hello oh you Hammer2! - EOS - - input = "Hello oh you Hammer2!\n" - output = pipe_output("#{bin}/s-nail -#:/ -Sexpandaddr -", input, 0) - assert_equal expected, output.chomp - end -end diff --git a/Formula/s-search.rb b/Formula/s-search.rb deleted file mode 100644 index 3859e63add4b0..0000000000000 --- a/Formula/s-search.rb +++ /dev/null @@ -1,38 +0,0 @@ -require "language/go" - -class SSearch < Formula - desc "Web search from the terminal" - homepage "https://github.com/zquestz/s" - url "https://github.com/zquestz/s/archive/v0.5.13.tar.gz" - sha256 "aac903c372324b1e57b0c61ba28d2c631ed81cb0e04f085661f2b6c0763ec818" - head "https://github.com/zquestz/s.git" - - bottle do - cellar :any_skip_relocation - sha256 "9ce3221c790404942e5f5777ecc454e6f2bd97d8e4af50ed408a803ffc797c62" => :mojave - sha256 "43540301fcb089e70db3731d4788289b1078c0d03223d797fe9b9e90bf3631e3" => :high_sierra - sha256 "734bd178c5b32134ed870e8f5fae9684139f48408ab16389a1ffcd81923707a6" => :sierra - end - - depends_on "go" => :build - - go_resource "github.com/FiloSottile/gvt" do - url "https://github.com/FiloSottile/gvt.git", - :revision => "50d83ea21cb0405e81efd284951e111b3a68d701" - end - - def install - ENV["GOPATH"] = buildpath - Language::Go.stage_deps resources, buildpath/"src" - cd("src/github.com/FiloSottile/gvt") { system "go", "install" } - (buildpath/"src/github.com/zquestz").mkpath - ln_s buildpath, "src/github.com/zquestz/s" - system buildpath/"bin/gvt", "restore" - system "go", "build", "-o", bin/"s" - end - - test do - output = shell_output("#{bin}/s -p bing -b echo homebrew") - assert_equal "https://www.bing.com/search?q=homebrew", output.chomp - end -end diff --git a/Formula/s/s-lang.rb b/Formula/s/s-lang.rb new file mode 100644 index 0000000000000..e80df6dcf9e44 --- /dev/null +++ b/Formula/s/s-lang.rb @@ -0,0 +1,51 @@ +class SLang < Formula + desc "Library for creating multi-platform software" + homepage "https://www.jedsoft.org/slang/" + url "https://www.jedsoft.org/releases/slang/slang-2.3.3.tar.bz2" + mirror "https://src.fedoraproject.org/repo/pkgs/slang/slang-2.3.3.tar.bz2/sha512/35cdfe8af66dac62ee89cca60fa87ddbd02cae63b30d5c0e3786e77b1893c45697ace4ac7e82d9832b8a9ac342560bc35997674846c5022341481013e76f74b5/slang-2.3.3.tar.bz2" + sha256 "f9145054ae131973c61208ea82486d5dd10e3c5cdad23b7c4a0617743c8f5a18" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.jedsoft.org/releases/slang/" + regex(/href=.*?slang[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "01cd4cc9e90651603d409a7ee189fb646c080ec0f337317450b0efd91970b269" + sha256 arm64_sequoia: "cbde9efbeeec2fdc059f3527e88ff6e3e9f84c9c59060b5d7a90851cf41c7999" + sha256 arm64_sonoma: "8f5f2ce496f0103eb571b4762b956193adf5819a4800192c62be5e8b0beae99b" + sha256 arm64_ventura: "efee4508d1dca5519b52de6bea66a589bcb203c62b826101fe599e4f3862f149" + sha256 arm64_monterey: "5378418e6b6e974287ded1bc8f6ecbcffe4dfab01ac35c92a1f83336d0d49270" + sha256 arm64_big_sur: "c79914984d5c401d8fed000d07ca34b914ae585461c86be3672e3172d5035f9a" + sha256 sonoma: "72b3198c9149036ea0924f9ab8a7d3254969edf4a6a28c6ece19e7592969bdbb" + sha256 ventura: "cbb5b0a2f1b1821be50e9c3ca7c01811ad60ddfe49c2c022cf486399f664e994" + sha256 monterey: "66e107f60db823f566bf6d2101fca2b2aff3b572312cd34a9a86b0cdba47adcd" + sha256 big_sur: "71450b5ff5941e3b2f6a8ca4864affbf8fa5c50b4753860ca86e596834618638" + sha256 catalina: "658b0b6498b5c7f7c65c8d5ca99ee601dcfd4c9978bb7961613a1a9513f78609" + sha256 arm64_linux: "8543716549f8be356cdcd9e25c7348ab8e6deac9770dadb301717bc3d169b896" + sha256 x86_64_linux: "6e07e31addec7d56674c850019014a1b529cf4f869f47f3c247a9d490982a13c" + end + + depends_on "libpng" + + on_linux do + depends_on "pcre" + end + + def install + png = Formula["libpng"] + system "./configure", "--prefix=#{prefix}", + "--with-pnglib=#{png.lib}", + "--with-pnginc=#{png.include}" + ENV.deparallelize + system "make" + system "make", "install" + end + + test do + assert_equal "Hello World!", shell_output("#{bin}/slsh -e 'message(\"Hello World!\");'").strip + end +end diff --git a/Formula/s/s-nail.rb b/Formula/s/s-nail.rb new file mode 100644 index 0000000000000..504a49dead8f5 --- /dev/null +++ b/Formula/s/s-nail.rb @@ -0,0 +1,68 @@ +class SNail < Formula + desc "Fork of Heirloom mailx" + homepage "https://www.sdaoden.eu/code.html" + url "https://www.sdaoden.eu/downloads/s-nail-14.9.25.tar.xz" + sha256 "20ff055be9829b69d46ebc400dfe516a40d287d7ce810c74355d6bdc1a28d8a9" + license all_of: [ + "BSD-2-Clause", # file-dotlock.h + "BSD-3-Clause", + "BSD-4-Clause", + "ISC", + "HPND-sell-variant", # GSSAPI code + "RSA-MD", # MD5 code + ] + + livecheck do + url :homepage + regex(/href=.*?s-nail[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "694010922da95400d2613164c134a3820f1db8aec0f23267915c490110e5cc6b" + sha256 arm64_sequoia: "38bef1a5706829568846930febb7f0544d2ae65bf05bc099e3d0d0cec63ab89e" + sha256 arm64_sonoma: "84aaf90c9666df6a015cacc2e9f7598bebe010904e7c67432a7cd647ceaf22f3" + sha256 arm64_ventura: "d12aaf7bef7b6b6df01c85628df68acee52d95a6581c6f10c1f4cf3e8e88ec86" + sha256 arm64_monterey: "64a71a850ff155293b889b74aaf448cafd3a7cb0e4dbf5e907374cf3be97073d" + sha256 sonoma: "1233acc467105675251c16c62d77185f9fa1adcc39ac8020498ed34865b6669d" + sha256 ventura: "0f32c32dabfb374441e1d57a3e3cba11f98657a800cfc188f788599c120c9c20" + sha256 monterey: "251e79282a3a1bca628513e03693484386a8efd3df7693390a41bec94ce9c995" + sha256 arm64_linux: "9ee474cf7423192b3351e52cf64a77c20caa55465c3b7720e0cd66c37ada9705" + sha256 x86_64_linux: "803cfa3485cc7bb7f528290ad09612233cb79e68ecb66f75477ac6d015d24636" + end + + depends_on "libidn2" + depends_on "openssl@3" + + uses_from_macos "ncurses" + + def install + system "make", "CC=#{ENV.cc}", + "C_INCLUDE_PATH=#{Formula["openssl@3"].opt_include}", + "LDFLAGS=-L#{Formula["openssl@3"].opt_lib}", + "VAL_PREFIX=#{prefix}", + "OPT_DOTLOCK=no", + "config" + system "make", "build" + system "make", "install" + end + + test do + timestamp = 844_221_007 + ENV["SOURCE_DATE_EPOCH"] = timestamp.to_s + + date1 = Time.at(timestamp).strftime("%a %b %e %T %Y") + date2 = Time.at(timestamp).strftime("%a, %d %b %Y %T %z") + + expected = <<~EOS + From reproducible_build #{date1.chomp} + Date: #{date2.chomp} + User-Agent: s-nail reproducible_build + + Hello oh you Hammer2! + EOS + + input = "Hello oh you Hammer2!\n" + output = pipe_output("#{bin}/s-nail -#:/ -Sexpandaddr -", input, 0) + assert_equal expected, output.chomp + end +end diff --git a/Formula/s/s-search.rb b/Formula/s/s-search.rb new file mode 100644 index 0000000000000..0791aeeb898b9 --- /dev/null +++ b/Formula/s/s-search.rb @@ -0,0 +1,32 @@ +class SSearch < Formula + desc "Web search from the terminal" + homepage "https://github.com/zquestz/s" + url "https://github.com/zquestz/s/archive/refs/tags/v0.7.4.tar.gz" + sha256 "c491ddb6306382bba7ab2665b6fddbb60aef3de32704c04549a5e0b0174dfa6d" + license "MIT" + head "https://github.com/zquestz/s.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "763f136162738c6f4d9ae054b1413f9a6102f07ad7e03d51df0321d2eb9bddca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a96038a526b7e96243e6ecc888797e4a251808d743e8ddb45f2d5681c30317de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a96038a526b7e96243e6ecc888797e4a251808d743e8ddb45f2d5681c30317de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a96038a526b7e96243e6ecc888797e4a251808d743e8ddb45f2d5681c30317de" + sha256 cellar: :any_skip_relocation, sonoma: "8bf4deb4ed35aa297709f7a4b11b8cb906d2092de15b1f19472978d901607894" + sha256 cellar: :any_skip_relocation, ventura: "8bf4deb4ed35aa297709f7a4b11b8cb906d2092de15b1f19472978d901607894" + sha256 cellar: :any_skip_relocation, arm64_linux: "33ab9d9046453f31145cf049ca2f93a46601dd835a8aafa518867f931067d413" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf9a65a9868df6359142ed3c53e24d7471935c96948d3251ff660b8d4599d7ea" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"s") + + generate_completions_from_executable(bin/"s", "--completion") + end + + test do + output = shell_output("#{bin}/s -p bing -b echo homebrew") + assert_equal "https://www.bing.com/search?q=homebrew", output.chomp + end +end diff --git a/Formula/s/s2geometry.rb b/Formula/s/s2geometry.rb new file mode 100644 index 0000000000000..2630173ec10dc --- /dev/null +++ b/Formula/s/s2geometry.rb @@ -0,0 +1,163 @@ +class S2geometry < Formula + desc "Computational geometry and spatial indexing on the sphere" + homepage "https://github.com/google/s2geometry" + url "https://github.com/google/s2geometry/archive/refs/tags/v0.12.0.tar.gz" + sha256 "c09ec751c3043965a0d441e046a73c456c995e6063439a72290f661c1054d611" + license "Apache-2.0" + revision 3 + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d3afb04ad4124a7211dcbb60f652c05df77890ee82843ba1c73912a911c5fdd5" + sha256 cellar: :any, arm64_sequoia: "bda10e17366dda59e3a246f452b055fa0c2d1bfd768bb416812c06444a0d2129" + sha256 cellar: :any, arm64_sonoma: "c8cf0a0a38864127e72cac71adefa4ab9e7cc9cb1fa4a2b7513c75a23a6e0f56" + sha256 cellar: :any, arm64_ventura: "9f0ee847a51923a12b403b60f957a1abb06dfb3eeda55d72a56d0977f3bdb26e" + sha256 cellar: :any, sonoma: "b75a7923b114c655686a613d5e130b9ad2f18255b2ee82530d611790d342937f" + sha256 cellar: :any, ventura: "fedf506c32f5acd95dd44ade41722d5de8f8c6072f190d9c9a58501f6e2d8d96" + sha256 cellar: :any_skip_relocation, arm64_linux: "55c4afb3fbd50cf72c3bbc09610de2777cc209f51961f8b6dd905310055c33b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b90df62d0206fa6c4e90df95b4e7e07549818de81a4fd8979ba441fd528d5a02" + end + + depends_on "cmake" => [:build, :test] + depends_on "abseil" + depends_on "glog" + depends_on "openssl@3" + + # Backport support for Abseil >= 20250814.0 from + # https://github.com/google/s2geometry/commit/9bdfdc0db978fb9d6753a880042a65ed5e83eabe + patch :DATA + + def install + args = %W[ + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DBUILD_TESTS=OFF + -DWITH_GFLAGS=1 + -DWITH_GLOG=1 + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_CXX_STANDARD_REQUIRED=TRUE + ] + + system "cmake", "-S", ".", "-B", "build/shared", *args, *std_cmake_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", ".", "-B", "build/static", *args, + "-DBUILD_SHARED_LIBS=OFF", + "-DOPENSSL_USE_STATIC_LIBS=TRUE", + *std_cmake_args + system "cmake", "--build", "build/static" + lib.install "build/static/libs2.a" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "s2/s2loop.h" + #include "s2/s2polygon.h" + #include "s2/s2latlng.h" + + #include + #include + + int main() { + // Define the vertices of a polygon around a block near the Googleplex. + std::vector lat_lngs = { + S2LatLng::FromDegrees(37.422076, -122.084518), + S2LatLng::FromDegrees(37.422003, -122.083984), + S2LatLng::FromDegrees(37.421964, -122.084028), + S2LatLng::FromDegrees(37.421847, -122.083171), + S2LatLng::FromDegrees(37.422140, -122.083167), + S2LatLng::FromDegrees(37.422076, -122.084518) // Last point equals the first one + }; + + std::vector points; + for (const auto& ll : lat_lngs) { + points.push_back(ll.ToPoint()); + } + std::unique_ptr loop = std::make_unique(points); + + S2Polygon polygon(std::move(loop)); + + S2LatLng test_point = S2LatLng::FromDegrees(37.422, -122.084); + if (polygon.Contains(test_point.ToPoint())) { + std::cout << "The point is inside the polygon." << std::endl; + } else { + std::cout << "The point is outside the polygon." << std::endl; + } + + return 0; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", + "-L#{lib}", "-ls2", "-L#{Formula["abseil"].lib}", "-labsl_log_internal_message" + system "./test" + end +end + +__END__ +diff --git a/src/s2/s2density_tree.cc b/src/s2/s2density_tree.cc +index b1892be380d15c55866630619405fd3b619a8ac5..c40964740cc49a72e613c1f0023c4a6400f66a8a 100644 +--- a/src/s2/s2density_tree.cc ++++ b/src/s2/s2density_tree.cc +@@ -911,7 +911,7 @@ const S2DensityTree::Cell* S2DensityTree::DecodedPath::LoadCell( + return cell; + } + +-S2DensityTree S2DensityTree::Normalize(absl::Nonnull error) const { ++S2DensityTree S2DensityTree::Normalize(S2Error* absl_nonnull error) const { + *error = S2Error::Ok(); + + DecodedPath path(this); +@@ -950,7 +950,7 @@ S2DensityTree S2DensityTree::Normalize(absl::Nonnull error) const { + return tree; + } + +-S2CellUnion S2DensityTree::Leaves(absl::Nonnull error) const { ++S2CellUnion S2DensityTree::Leaves(S2Error* absl_nonnull error) const { + std::vector leaves; + + VisitCells( +diff --git a/src/s2/s2density_tree.h b/src/s2/s2density_tree.h +index a6b7a48d8a1b549d16e7d2597ccb207b2e1038bf..249438e00fc6edae01d103885cf8f0068cb03649 100644 +--- a/src/s2/s2density_tree.h ++++ b/src/s2/s2density_tree.h +@@ -272,11 +273,11 @@ class S2DensityTree { + // weight is scaled by (its parent's weight / the sum of weights of the node + // and its siblings). This makes the weight of a parent equal to the sum of + // its children. +- S2DensityTree Normalize(absl::Nonnull error) const; ++ S2DensityTree Normalize(S2Error* absl_nonnull error) const; + + // Returns an S2CellUnion containing the leaves of this tree. The cell union + // is not necessarily normalized. +- S2CellUnion Leaves(absl::Nonnull error) const; ++ S2CellUnion Leaves(S2Error* absl_nonnull error) const; + + // The decoded weight and offsets of encoded cells. + class Cell { +diff --git a/src/s2/s2edge_tessellator.h b/src/s2/s2edge_tessellator.h +index 513afbdc52eb621aa42d8d30b8383950da455dd4..b55d1028c1fff298816e4af94f68590eed2e4a46 100644 +--- a/src/s2/s2edge_tessellator.h ++++ b/src/s2/s2edge_tessellator.h +@@ -44,7 +45,7 @@ class S2EdgeTessellator { + // ------------------|------------------------|----------------------- + // AppendProjected | S2 geodesics | Planar projected edges + // AppendUnprojected | Planar projected edges | S2 geodesics +- S2EdgeTessellator(absl::Nonnull projection, ++ S2EdgeTessellator(const S2::Projection* absl_nonnull projection, + S1Angle tolerance); + + // Converts the spherical geodesic edge AB to a chain of planar edges in the +@@ -95,7 +96,7 @@ class S2EdgeTessellator { + const R2Point& pb, const S2Point& b, + std::vector* vertices) const; + +- absl::Nonnull proj_; ++ const S2::Projection* absl_nonnull proj_; + + // The given tolerance scaled by a constant fraction so that it can be + // compared against the result returned by EstimateMaxError(). diff --git a/Formula/s/s2n.rb b/Formula/s/s2n.rb new file mode 100644 index 0000000000000..e42220657b0c3 --- /dev/null +++ b/Formula/s/s2n.rb @@ -0,0 +1,49 @@ +class S2n < Formula + desc "Implementation of the TLS/SSL protocols" + homepage "https://github.com/aws/s2n-tls" + url "https://github.com/aws/s2n-tls/archive/refs/tags/v1.6.0.tar.gz" + sha256 "25f1f14092438d0919d60c4357990e1d2b734e3ffa9d8ecd86590abfd9407b00" + license "Apache-2.0" + head "https://github.com/aws/s2n-tls.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "78968d71bd146ac09b55ebfe01597dbc0070d7ef3ea2a26ca8b897c5a48bf5ef" + sha256 cellar: :any, arm64_sequoia: "6a95188a822a722aaa7d46d92505820e7275f121c839e0e1e04b0e398292a32e" + sha256 cellar: :any, arm64_sonoma: "91e3612dfb658de0c114f50437942392fd4da537fcf72a25da64758c7191e2c0" + sha256 cellar: :any, sonoma: "63e1060d9bd4723a29a98096c558780371fc27912ee7215263e3c07fca41d529" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d15607afa71bda3614aa6c98776707812ac761aa92848daa5f12f4eed57c68f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "170804d3f51000d1e6fd4b7817734b1fc0120af3efb95966f1efb69c19bb5650" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + def install + system "cmake", "-S", ".", "-B", "build_static", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args + system "cmake", "--build", "build_static" + system "cmake", "--install", "build_static" + + system "cmake", "-S", ".", "-B", "build_shared", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + assert(s2n_init() == 0); + return 0; + } + C + system ENV.cc, "test.c", "-L#{opt_lib}", "-ls2n", "-o", "test" + ENV["S2N_DONT_MLOCK"] = "1" if OS.linux? + system "./test" + end +end diff --git a/Formula/s/s3-backer.rb b/Formula/s/s3-backer.rb new file mode 100644 index 0000000000000..40ccdd3bcb7ac --- /dev/null +++ b/Formula/s/s3-backer.rb @@ -0,0 +1,34 @@ +class S3Backer < Formula + desc "FUSE-based single file backing store via Amazon S3" + homepage "https://github.com/archiecobbs/s3backer" + # Release distributions listed at https://github.com/archiecobbs/s3backer/wiki/Downloads + url "https://s3.amazonaws.com/archie-public/s3backer/s3backer-2.1.6.tar.gz" + sha256 "55ff3123ab08d45822e6b349d9e305ca2ca13339474314cfc31a074d5308acf6" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "c51051aaf9df0f18656f3a18e18be9fcd8b52387df778040b4c68d5802c33bc0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7949743c2405f21633a2c533b27a1cf3561c652f4714e147b9965a086b0f5861" + end + + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "expat" + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "openssl@3" + depends_on "zlib" + depends_on "zstd" + + def install + system "./configure", "--disable-silent-rules", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/s3backer --version 2>&1") + + assert_match "no S3 bucket specified", shell_output("#{bin}/s3backer 2>&1", 1) + end +end diff --git a/Formula/s/s3cmd.rb b/Formula/s/s3cmd.rb new file mode 100644 index 0000000000000..4fa33b6a8f1d3 --- /dev/null +++ b/Formula/s/s3cmd.rb @@ -0,0 +1,55 @@ +class S3cmd < Formula + include Language::Python::Virtualenv + + desc "Command-line tool for the Amazon S3 service" + homepage "https://s3tools.org/s3cmd" + url "https://files.pythonhosted.org/packages/b3/9c/ad4cd51328bd7a058bfda6739bc061c63ee3531ad2fbc6e672518a1eed01/s3cmd-2.4.0.tar.gz" + sha256 "6b567521be1c151323f2059c8feec85ded96b6f184ff80535837fea33798b40b" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/s3tools/s3cmd.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6aeb3a68ea12a0f0a2f8027d4f91d99e6552fa148533c440133a1d1f48c45028" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6aeb3a68ea12a0f0a2f8027d4f91d99e6552fa148533c440133a1d1f48c45028" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6aeb3a68ea12a0f0a2f8027d4f91d99e6552fa148533c440133a1d1f48c45028" + sha256 cellar: :any_skip_relocation, sonoma: "e75a71a49e2e70e1fa9028dc92bae05d58d14d808f5dbd23b7c46ed439002992" + sha256 cellar: :any_skip_relocation, arm64_linux: "c56660a7bd7d5cb3d0dba4eed501a788dc3931f4693e03517bf5755e9aa53a8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c56660a7bd7d5cb3d0dba4eed501a788dc3931f4693e03517bf5755e9aa53a8c" + end + + depends_on "libmagic" => :no_linkage # for python-magic + depends_on "python@3.14" + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-magic" do + url "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz" + sha256 "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/".s3cfg").write <<~INI + [default] + access_key = FAKE_KEY + secret_key = FAKE_SECRET + INI + output = shell_output("#{bin}/s3cmd ls s3://brewtest 2>&1", 77) + assert_match "ERROR: S3 error: 403 (InvalidAccessKeyId)", output + + assert_match "s3cmd version #{version}", shell_output("#{bin}/s3cmd --version") + end +end diff --git a/Formula/s/s3fs.rb b/Formula/s/s3fs.rb new file mode 100644 index 0000000000000..91e8398159dd4 --- /dev/null +++ b/Formula/s/s3fs.rb @@ -0,0 +1,34 @@ +class S3fs < Formula + desc "FUSE-based file system backed by Amazon S3" + homepage "https://github.com/s3fs-fuse/s3fs-fuse/wiki" + url "https://github.com/s3fs-fuse/s3fs-fuse/archive/refs/tags/v1.95.tar.gz" + sha256 "0c97b8922f005500d36f72aee29a1345c94191f61d795e2a7b79fb7e3e6f5517" + license "GPL-2.0-or-later" + head "https://github.com/s3fs-fuse/s3fs-fuse.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "37a6b872d83d9be7de04fd738888573c9b7e44caf5b1744c37597283efe37ef6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b48ab8ae069a3d0fd449d9f69167064635ef5c6945f299dc7385a06812309473" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "gnutls" + depends_on "libfuse@2" # FUSE 3 issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1159 + depends_on "libgcrypt" + depends_on "libxml2" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "nettle" + + def install + system "./autogen.sh" + system "./configure", "--with-gnutls", *std_configure_args + system "make", "install" + end + + test do + system bin/"s3fs", "--version" + end +end diff --git a/Formula/s/s3ql.rb b/Formula/s/s3ql.rb new file mode 100644 index 0000000000000..b74a6195d0ea9 --- /dev/null +++ b/Formula/s/s3ql.rb @@ -0,0 +1,131 @@ +class S3ql < Formula + include Language::Python::Virtualenv + + desc "POSIX-compliant FUSE filesystem using object store as block storage" + homepage "https://github.com/s3ql/s3ql" + url "https://github.com/s3ql/s3ql/releases/download/s3ql-5.4.1/s3ql-5.4.1.tar.gz" + sha256 "6d3bbce3796ae0c08d33d1d3366de059cc70ded38eef22860765d03f88a0ac6b" + license "GPL-3.0-only" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "f9a99acf69a389b0e54fc0e3e295d511f30b554cc7cd53ea9c26dbd64be1c8f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cf0775e59d9f605a0cc070107680fe59d81fdbc2d6b096794761b41ab7f1fb2" + end + + depends_on "pkgconf" => :build + + depends_on "cryptography" => :no_linkage + depends_on "libffi" + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "python@3.14" + + resource "apsw" do + url "https://files.pythonhosted.org/packages/02/ea/7469e89d75a07972255aac4c1b98675bfbc74df32a19dd5dc8ba87aa552b/apsw-3.50.4.0.tar.gz" + sha256 "a817c387ce2f4030ab7c3064cf21e9957911155f24f226c3ad4938df3a155e11" + end + + resource "async-generator" do + url "https://files.pythonhosted.org/packages/ce/b6/6fa6b3b598a03cba5e80f829e0dadbb49d7645f523d209b2fb7ea0bbb02a/async_generator-1.10.tar.gz" + sha256 "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "dugong" do + url "https://files.pythonhosted.org/packages/10/90/2110a0201f34bd12ac75e67ddffb67b14f3de2732474e89cbb04123c4b16/dugong-3.8.2.tar.gz" + sha256 "f46ab34d74207445f268e3d9537a72e648c2c81a74e40d5d0e32306d24ff81bb" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/9e/9b/e92ef23b84fa10a64ce4831390b7a4c2e53c0132568d99d4ae61d04c8855/google_auth-2.40.3.tar.gz" + sha256 "500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77" + end + + resource "google-auth-oauthlib" do + url "https://files.pythonhosted.org/packages/fb/87/e10bf24f7bcffc1421b84d6f9c3377c30ec305d082cd737ddaa6d8f77f7c/google_auth_oauthlib-1.2.2.tar.gz" + sha256 "11046fb8d3348b296302dd939ace8af0a724042e8029c1b872d87fabc9f41684" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "outcome" do + url "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz" + sha256 "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" + end + + resource "pyfuse3" do + url "https://files.pythonhosted.org/packages/67/1e/0f8f285a65e2e64f2f0c4accce4ee67d9ac66ee9684492a4327e48d68d87/pyfuse3-3.4.0.tar.gz" + sha256 "793493f4d5e2b3bc10e13b3421d426a6e2e3365264c24376a50b8cbc69762d39" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/76/8f/c6e36dd11201e2a565977d8b13f0b027ba4593c1a80bed5185489178e257/trio-0.31.0.tar.gz" + sha256 "f71d551ccaa79d0cb73017a33ef3264fde8335728eb4c6391451fe5d253a9d5b" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + def install + # The inreplace changes the name of the (fsck|mkfs|mount|umount).s3ql + # utilities to use underscore (_) as a separator, which is consistent + # with other tools on macOS. + # Final names: fsck_s3ql, mkfs_s3ql, mount_s3ql, umount_s3ql + inreplace "pyproject.toml", /"(?:(mkfs|fsck|mount|umount)\.)s3ql" =/, '"\\1_s3ql" =' + + virtualenv_install_with_resources + end + + test do + assert_match "S3QL ", shell_output("#{bin}/mount_s3ql --version") + + # create a local filesystem, and run an fsck on it + assert_match "Creating metadata", shell_output("#{bin}/mkfs_s3ql --plain local://#{testpath} 2>&1") + assert_match "s3ql_params", shell_output("ls s3ql_params") + system bin/"fsck_s3ql", "local://#{testpath}" + end +end diff --git a/Formula/s/s3scanner.rb b/Formula/s/s3scanner.rb new file mode 100644 index 0000000000000..7d151d87f81d6 --- /dev/null +++ b/Formula/s/s3scanner.rb @@ -0,0 +1,37 @@ +class S3scanner < Formula + desc "Scan for misconfigured S3 buckets across S3-compatible APIs!" + homepage "https://github.com/sa7mon/S3Scanner" + url "https://github.com/sa7mon/S3Scanner/archive/refs/tags/v3.1.1.tar.gz" + sha256 "2d333c31909baa21e024d11db1b03647fff3d210d73fa7fa47f598d3d459a20c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0510af529926557aa5c049cf576240df2a44f0d48b2d978cbd4dbe8bd3ed84f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e8d161cfdd4356026c4625343354a2c58c59cc07542cb5b29b7117acffd19b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e8d161cfdd4356026c4625343354a2c58c59cc07542cb5b29b7117acffd19b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2e8d161cfdd4356026c4625343354a2c58c59cc07542cb5b29b7117acffd19b3" + sha256 cellar: :any_skip_relocation, sonoma: "aa0fdf4a17911994cb55fb32bb65a3f1eff54436f860fc87e4acd6207c06e048" + sha256 cellar: :any_skip_relocation, ventura: "aa0fdf4a17911994cb55fb32bb65a3f1eff54436f860fc87e4acd6207c06e048" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ae7c856c4e60dd64627acb45500048bb41fe1f4f49bc3a563969f794af7f062" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e76a8131cd2e58061e5bcfdfd351034b0222016877e349f58431b8b2d3400fb" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + version_output = shell_output("#{bin}/s3scanner --version") + assert_match version.to_s, version_output + + # test that scanning our private bucket returns: + # - bucket exists + # - bucket does not allow anonymous user access + private_output = shell_output("#{bin}/s3scanner -bucket s3scanner-private") + assert_includes private_output, "exists" + assert_includes private_output, "AuthUsers: [] | AllUsers: []" + end +end diff --git a/Formula/s/s4cmd.rb b/Formula/s/s4cmd.rb new file mode 100644 index 0000000000000..d895e35a2faf6 --- /dev/null +++ b/Formula/s/s4cmd.rb @@ -0,0 +1,67 @@ +class S4cmd < Formula + include Language::Python::Virtualenv + + desc "Super S3 command-line tool" + homepage "https://github.com/bloomreach/s4cmd" + url "https://files.pythonhosted.org/packages/42/b4/0061f4930958cd790098738659c1c39f8feaf688e698142435eedaa4ae34/s4cmd-2.1.0.tar.gz" + sha256 "42566058a74d3e1e553351966efaaffa08e4b6ac28a19e72a51be21151ea9534" + license "Apache-2.0" + revision 4 + head "https://github.com/bloomreach/s4cmd.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "da054f91cd392bc846238787bc5dc6bb06864eee27cab7755f5f11dcf616162b" + end + + depends_on "python@3.14" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Unable to locate credentials", shell_output("#{bin}/s4cmd ls s3://brew-test 2>&1", 1) + assert_match version.to_s, shell_output("#{bin}/s4cmd --version") + end +end diff --git a/Formula/s/s5cmd.rb b/Formula/s/s5cmd.rb new file mode 100644 index 0000000000000..9aadc959b9a8b --- /dev/null +++ b/Formula/s/s5cmd.rb @@ -0,0 +1,38 @@ +class S5cmd < Formula + desc "Parallel S3 and local filesystem execution tool" + homepage "https://github.com/peak/s5cmd/" + url "https://github.com/peak/s5cmd/archive/refs/tags/v2.3.0.tar.gz" + sha256 "6910763a7320010aa75fe9ef26f622e440c2bd6de41afdbfd64e78c158ca19d4" + license "MIT" + head "https://github.com/peak/s5cmd.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "61627603298bb1a3eb5eaea5f87ccadd359fcce806e7d117e793dde778a2b70e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "916e4d04783629cfd49481c1f6aa50ea3cde6f77a3083ff0f297e55c73e5bb79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "916e4d04783629cfd49481c1f6aa50ea3cde6f77a3083ff0f297e55c73e5bb79" + sha256 cellar: :any_skip_relocation, arm64_ventura: "916e4d04783629cfd49481c1f6aa50ea3cde6f77a3083ff0f297e55c73e5bb79" + sha256 cellar: :any_skip_relocation, sonoma: "9c2d0641ad6fcef280e6120b699cd5118d123b797ab6c8106921573146d72070" + sha256 cellar: :any_skip_relocation, ventura: "9c2d0641ad6fcef280e6120b699cd5118d123b797ab6c8106921573146d72070" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c432ef257a603688321325afb9306286106c6e9fa55cd1d104a743e267ce17e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fb0bbbf11a900fb389b607b57acbc203a50bff71b0913a66b6308e658913dee" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X=github.com/peak/s5cmd/v2/version.Version=#{version} + -X=github.com/peak/s5cmd/v2/version.GitCommit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"s5cmd", "--install-completion") + end + + test do + assert_match "no valid providers in chain", shell_output("#{bin}/s5cmd --retry-count 0 ls s3://brewtest 2>&1", 1) + assert_match version.to_s, shell_output("#{bin}/s5cmd version") + end +end diff --git a/Formula/s/s6-rc.rb b/Formula/s/s6-rc.rb new file mode 100644 index 0000000000000..418da3129dda6 --- /dev/null +++ b/Formula/s/s6-rc.rb @@ -0,0 +1,51 @@ +class S6Rc < Formula + desc "Process supervision suite" + homepage "https://skarnet.org/software/s6-rc/" + url "https://skarnet.org/software/s6-rc/s6-rc-0.5.6.0.tar.gz" + sha256 "81277f6805e8d999ad295bf9140a909943b687ffcfb5aa3c4efd84b1a574586e" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "352840f345c351dc4bc9e2d29f18bd95dfe5b7669b71afe2f16cf1f85975ca0f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ffb8c25c6c698f13c255d694dfc6218116857cf633b6764a6ee4c026de314e20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "120ab3b0a9ca7cf2db5f0b27ee6dffcebb3560e718956f5cab8693655d9aac14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "06402eee4fafa9c0bcdbcce7dcd88054b9f142263a8ce6019ee1ec54b534beb3" + sha256 cellar: :any_skip_relocation, sonoma: "66888c1bab3552b773e18e694b52ce22bc525d343cdaf3622fded2921832c642" + sha256 cellar: :any_skip_relocation, ventura: "486096d10e4ce41f00e27aa5d62d30c9acab44c539542db7ac34afc36ac25571" + sha256 cellar: :any_skip_relocation, arm64_linux: "e84a61c37b4988f98170ca737ea6b2fc95720619bb07253ea1e1a4d45233e36a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26be7908d0ae2d584614d6aefe7b4bc4ffc1b45dce5743b801f416fdf5310282" + end + + depends_on "pkgconf" => :build + depends_on "execline" + depends_on "s6" + depends_on "skalibs" + + def install + # Shared libraries are linux targets and not supported on macOS. + args = %W[ + --disable-silent-rules + --disable-shared + --enable-pkgconfig + --with-pkgconfig=#{Formula["pkgconf"].opt_bin}/pkg-config + --with-sysdeps=#{Formula["skalibs"].opt_lib}/skalibs/sysdeps + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"services/test").mkpath + (testpath/"services/test/up").write <<~SHELL + #!/bin/sh + echo "test" + SHELL + (testpath/"services/test/type").write "oneshot" + (testpath/"services/bundle/contents.d").mkpath + (testpath/"services/bundle/type").write "bundle" + touch testpath/"services/bundle/contents.d/test" + system bin/"s6-rc-compile", testpath/"compiled", testpath/"services" + end +end diff --git a/Formula/s/s6.rb b/Formula/s/s6.rb new file mode 100644 index 0000000000000..f1f84bcbd59f1 --- /dev/null +++ b/Formula/s/s6.rb @@ -0,0 +1,47 @@ +class S6 < Formula + desc "Small & secure supervision software suite" + homepage "https://skarnet.org/software/s6/" + url "https://skarnet.org/software/s6/s6-2.13.2.0.tar.gz" + sha256 "c5114b8042716bb70691406931acb0e2796d83b41cbfb5c8068dce7a02f99a45" + license "ISC" + + livecheck do + url :homepage + regex(/href=.*?s6[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "92ca9064a5fa950d6f77bd56dd55024b381f4458d4df539d859f384a60e3b28c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88fb583281e696ad18a4dab7b34ec8794d1c58dfa48c40a4b6a020138f26b0d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "105a08c0079ab7fb9fd049443a888ec673c2f3e4e241d4a7cd52065403881b8a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "de13a9f0b0d00175ce1365152621f160759d3de1d8344f520d19ff29418d5c38" + sha256 cellar: :any_skip_relocation, sonoma: "ecc8dab8a302e3f58a67b5e48269eb272018d9cc8d22ba6d2bfaebb5ade0835e" + sha256 cellar: :any_skip_relocation, ventura: "1ae26881433c5dfaa3b514e161423d44f8bf22431c75a39d54a0c6507ff4d9d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "267d6e94207cb929ba43e44a4bd589e7628fde0cbf42d242069e1c5af2f82f5f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f710b9295a5a5101c380603ed1741a4df17e5af0f5b21b7ea953c6a46065d12f" + end + + depends_on "pkgconf" => :build + depends_on "execline" + depends_on "skalibs" + + def install + # Shared libraries are linux targets and not supported on macOS. + args = %W[ + --disable-silent-rules + --disable-shared + --enable-pkgconfig + --with-pkgconfig=#{Formula["pkgconf"].opt_bin}/pkg-config + --with-sysdeps=#{Formula["skalibs"].opt_lib}/skalibs/sysdeps + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"log").mkpath + pipe_output("#{bin}/s6-log #{testpath}/log", "Test input\n", 0) + assert_equal "Test input\n", File.read(testpath/"log/current") + end +end diff --git a/Formula/s/sacad.rb b/Formula/s/sacad.rb new file mode 100644 index 0000000000000..2c610edcecc47 --- /dev/null +++ b/Formula/s/sacad.rb @@ -0,0 +1,121 @@ +class Sacad < Formula + include Language::Python::Virtualenv + + desc "Automatic cover art downloader" + homepage "https://github.com/desbma/sacad" + url "https://files.pythonhosted.org/packages/df/39/3ec259100446937a0c36c14e1bc0794e990259100e90f5b83463b23c740d/sacad-2.8.3.tar.gz" + sha256 "e9b2b114e3f884f6d4e5dd49ff0ae8d4133f061f56fff433719e186df69aa986" + license "MPL-2.0" + head "https://github.com/desbma/sacad.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5edb627d7d02ad768c580fc15a801b91e916bd9697b7d7a4050a012fc04417c9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac46be4b12402986b29f2c6e7a8e1caf45599e3f1a63b4bf5224e5ac064cac63" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0e27eea2724c254641ffa443834f16592eebae7010928d049aec0818dde527e" + sha256 cellar: :any_skip_relocation, sonoma: "ce04631b97d2fef39a735cd749737d4a8c7774d1afe4885c1089518aea56112a" + sha256 cellar: :any_skip_relocation, arm64_linux: "38d4ac647b1f5596ca142185bb19e2b91d9acaab8b6608fcf11044cbd2f9e64f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac5b49fe187971a92bb0eae6f3234e8901e85a63f4d0b161ecc8366d29cd1c0a" + end + + depends_on "pillow" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "pillow" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/ba/fa/3ae643cd525cf6844d3dc810481e5748107368eb49563c15a5fb9f680750/aiohttp-3.13.1.tar.gz" + sha256 "4b7ee9c355015813a6aa085170b96ec22315dabc3d866fd77d147927000e9464" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "bitarray" do + url "https://files.pythonhosted.org/packages/e8/c1/644ea86b6f1a0864f656a3b3ee5bf8c29daa895cb3233942315fe065ea3a/bitarray-3.7.2.tar.gz" + sha256 "27a59bb7c64c0d094057a3536e15fdd693f8520771ee75d9344b82d0a5ade2d0" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/72/0a/c3ea9573b1dc2e151abfe88c7fe0c26d1892fe6ed02d0cdb30f0d57029d5/cssselect-1.3.0.tar.gz" + sha256 "57f8a99424cfab289a1b6a816a43075a4b00948c86b4dcf3ef4ee7e15f7ab0c7" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "web-cache" do + url "https://files.pythonhosted.org/packages/1b/67/9970fa9705c2e4234923a1ae0ca96bd5f29571d21b70c5457528347f1eaf/web_cache-1.1.0.tar.gz" + sha256 "d5a10a34c87beffc794b8e1dec77bf6b419886b9cc60b9b10c706810870e0eb5" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/sacad -h") + system bin/"sacad", "metallica", "master of puppets", "600", "AlbumArt.jpg" + end +end diff --git a/Formula/s/sad.rb b/Formula/s/sad.rb new file mode 100644 index 0000000000000..e0338a0486ab6 --- /dev/null +++ b/Formula/s/sad.rb @@ -0,0 +1,36 @@ +class Sad < Formula + desc "CLI search and replace | Space Age seD" + homepage "https://github.com/ms-jpq/sad" + url "https://github.com/ms-jpq/sad/archive/refs/tags/v0.4.32.tar.gz" + sha256 "a67902b9edb287861668ee3e39482c17b41c60e244ece62b3f8016250286294f" + license "MIT" + head "https://github.com/ms-jpq/sad.git", branch: "senpai" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6a86363c4e34a7ef28f442c18631477562f6b2e53b528dca842d89a61f72aafb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc792df17bca12c265808a20efcbf4444fddf598e1b0671938f624d60a02f930" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "013696e18b0fd86010f790c555f8aa37c1f7058990fa4a4b2ceff65d17daaadc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49df2026de6f61f870fc3c23d286214842af83b0bb92ea8e7f9a2e005e8b0d88" + sha256 cellar: :any_skip_relocation, sonoma: "ac5f622402e313226339eb22f389fe826994ee8771b23cc28c2188ff81096f80" + sha256 cellar: :any_skip_relocation, ventura: "5afe1a5fac8625f958c34c4b7b030c4d4d6d3c3b7c7212988f19a8e7f6928f39" + sha256 cellar: :any_skip_relocation, arm64_linux: "db2a7e7543515e39ad52ebe32ebd9821e3eec5e0cd1a3b0096342682de0a1536" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5eb56b7ce0c1cd515a1e2492614a4cbe2b3ea8e3652f0a9ad2a2ed43d9eec43b" + end + + depends_on "rust" => :build + + uses_from_macos "python" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + test_file = testpath/"test.txt" + test_file.write "a,b,c,d,e\n1,2,3,4,5\n" + system "find #{testpath} -name 'test.txt' | #{bin}/sad -k 'a' 'test' > /dev/null" + assert_equal "test,b,c,d,e\n1,2,3,4,5\n", test_file.read + + assert_match "sad #{version}", shell_output("#{bin}/sad --version") + end +end diff --git a/Formula/s/saf-cli.rb b/Formula/s/saf-cli.rb new file mode 100644 index 0000000000000..e05c31a59f85b --- /dev/null +++ b/Formula/s/saf-cli.rb @@ -0,0 +1,25 @@ +class SafCli < Formula + desc "CLI for the MITRE Security Automation Framework (SAF)" + homepage "https://saf-cli.mitre.org" + url "https://registry.npmjs.org/@mitre/saf/-/saf-1.5.1.tgz" + sha256 "16709afef3d3cbc49260938f224f2e9dcae203c818b74215890d863557b278fb" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "33d7d79ea6eb14571e99e8126e2a174a228b1b402a9be8a2f16ad96916fd0c21" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/saf --version") + + output = shell_output("#{bin}/saf scan") + assert_match "Visit https://saf.mitre.org/#/validate to explore and run inspec profiles", output + end +end diff --git a/Formula/s/safe-rm.rb b/Formula/s/safe-rm.rb new file mode 100644 index 0000000000000..8f9a0952aa678 --- /dev/null +++ b/Formula/s/safe-rm.rb @@ -0,0 +1,51 @@ +class SafeRm < Formula + desc "Wraps rm to prevent dangerous deletion of files" + homepage "https://launchpad.net/safe-rm" + url "https://launchpad.net/safe-rm/trunk/1.1.0/+download/safe-rm-1.1.0.tar.gz" + sha256 "a1c916894c5b70e02a6ec6c33abbb2c3b3827464cffd4baffd47ffb69a56a1e0" + license "GPL-3.0-or-later" + head "https://git.launchpad.net/safe-rm", using: :git, branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f1bb7edb463f2986370ba1b913007cb4a3f75d6928bcb4600ceae3945c7e0aba" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "553b3046d666998b51823efecce49ce2309b01fe8367dcb95d7b44a4ee16b899" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e5f502c7203280d38bcec44159d657ad2d58becbb35d35bdbc86de58eab6194" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0934761b2d4741420d698f2ef02e25fd76040a2500d749a1c6d80a7f9e0a09cd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6a5b094b23fbfca81cae6a07b707f3ca0dca9ddaf742568e425323d37a69995b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9ff1f149a5e8968fd7ac345231c38250aa3f980ed26f37c375b5f700d2206464" + sha256 cellar: :any_skip_relocation, sonoma: "bbb5656291635d514c83f1c2a9cdf197d25fe608f5bc1ec50bd08afde77adc85" + sha256 cellar: :any_skip_relocation, ventura: "f74882c3fa9424387c06d431f2b05eaa69f160955a7bffe441957fbd30017b10" + sha256 cellar: :any_skip_relocation, monterey: "cb53a3912e9e93ae9286a694466e97f3e38834034c2fafe06866a1a5b04d0532" + sha256 cellar: :any_skip_relocation, big_sur: "e13cda860afbd1897715240f11f06dbd0c2ca6c6834a5ff1a505b31c66ca63fa" + sha256 cellar: :any_skip_relocation, catalina: "e9f3f483c1cd132ac44afd0890d93296507f8438d2c7921ff73e4cb7d4cc54c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "64314d265408ed5be7deb792f7710cffa50f64a442af0f1a138c2edf29719db2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e91dab1f67e634f6c93fe3461d2839d46c73b6e7fcf7c6f4091dc09b863a3f65" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + foo = testpath/"foo" + bar = testpath/"bar" + (testpath/".config").mkdir + (testpath/".config/safe-rm").write bar + touch foo + touch bar + system bin/"safe-rm", foo + refute_path_exists foo + if OS.linux? + shell_output("#{bin}/safe-rm #{bar} 2>&1", 1) + else + shell_output("#{bin}/safe-rm #{bar} 2>&1", 64) + end + + assert_path_exists bar + end +end diff --git a/Formula/s/safeint.rb b/Formula/s/safeint.rb new file mode 100644 index 0000000000000..cda9ba145124d --- /dev/null +++ b/Formula/s/safeint.rb @@ -0,0 +1,62 @@ +class Safeint < Formula + desc "Class library for C++ that manages integer overflows" + homepage "https://github.com/dcleblanc/SafeInt" + url "https://github.com/dcleblanc/SafeInt/archive/refs/tags/3.0.28a.tar.gz" + version "3.0.28a" + sha256 "9e652d065a3cef80623287d5dc61edcf6a95ddab38a9dfeb34f155261fc9cef7" + license "MIT" + head "https://github.com/dcleblanc/SafeInt.git", branch: "master" + + # The `GithubLatest` strategy is used here because upstream changed their + # version numbering so that 3.0.26 follows 3.24. + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+[a-z]?)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ffba215daf83f5a8a3beffae5f56f6e58288ff1f7c9f35d52edf19db5e935663" + end + + def install + include.install %w[ + SafeInt.hpp + safe_math.h + safe_math_impl.h + ] + end + + test do + # Modified from: + # https://learn.microsoft.com/en-us/cpp/safeint/safeint-class?view=msvc-170#example + (testpath/"test.cc").write <<~CPP + #ifdef NDEBUG + #undef NDEBUG + #endif + #include + + #include + + int main() { + int divisor = 3; + int dividend = 6; + int result; + + bool success = SafeDivide(dividend, divisor, result); // result = 2 + assert(result == 2); + assert(success); + + success = SafeDivide(dividend, 0, result); // expect fail. result isn't modified. + assert(result == 2); + assert(!success); + } + CPP + + system ENV.cxx, "-std=c++17", "-I#{include}", "-o", "test", "test.cc" + system "./test" + end +end diff --git a/Formula/s/safety.rb b/Formula/s/safety.rb new file mode 100644 index 0000000000000..fd9248494206a --- /dev/null +++ b/Formula/s/safety.rb @@ -0,0 +1,220 @@ +class Safety < Formula + include Language::Python::Virtualenv + + desc "Checks Python dependencies for known vulnerabilities and suggests remediations" + homepage "https://safetycli.com/product/safety-cli" + url "https://files.pythonhosted.org/packages/4c/5a/dc84e854574cc5c24a53e04180e18bf3590c8283b80a1b1b3d3ca4390031/safety-3.6.2.tar.gz" + sha256 "2e148cd9a4ad2e387d2c142878b7b5a3a9cb9e6538167043faa1ba7023a032be" + license "MIT" + revision 1 + head "https://github.com/pyupio/safety.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "04c72cfa36092d3339b804c85111d679e8f57d3d41c36f113e9268a5b3c60182" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fcb7a22540790507638eb5d7221cd3a471fcdd39a0d4ca795aeadca0befd0c36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "11a809996245c99b3dd852fce3a997e85048c2778c2da96f7892812cef593de5" + sha256 cellar: :any_skip_relocation, sonoma: "be14bf4aac7dc2b141768adbd112498105e23798fccb6f2512e3cf1f5a9eb290" + sha256 cellar: :any_skip_relocation, arm64_linux: "4212506a8f718cf54ff464db15622c1a95e5a0a6c09b28d06a8ee6c12c9497ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2d94744f2b9b4cf7c3d24b1fc697f7f6afb100af872a1a6d544c1ad9607c9be" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/cd/3f/1d3bbd0bf23bdd99276d4def22f29c27a914067b4cf66f753ff9b8bbd0f3/authlib-1.6.5.tar.gz" + sha256 "6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "dparse" do + url "https://files.pythonhosted.org/packages/29/ee/96c65e17222b973f0d3d0aa9bad6a59104ca1b0eb5b659c25c2900fccd85/dparse-0.6.4.tar.gz" + sha256 "90b29c39e3edc36c6284c82c4132648eaf28a01863eb3c231c2512196132201a" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "joblib" do + url "https://files.pythonhosted.org/packages/e8/5d/447af5ea094b9e4c4054f82e223ada074c552335b9b4b2d14bd9b35a67c4/joblib-1.5.2.tar.gz" + sha256 "3faa5c39054b2f03ca547da9b2f52fde67c06240c31853f306aea97f13647b55" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "marshmallow" do + url "https://files.pythonhosted.org/packages/cc/ff/8f092fe402ef12aa71b7f4ceba0c557ce4d5876a9cf421e01a67b7210560/marshmallow-4.0.1.tar.gz" + sha256 "e1d860bd262737cb2d34e1541b84cb52c32c72c9474e3fe6f30f137ef8b0d97f" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "nltk" do + url "https://files.pythonhosted.org/packages/f9/76/3a5e4312c19a028770f86fd7c058cf9f4ec4321c6cf7526bab998a5b683c/nltk-3.9.2.tar.gz" + sha256 "0f409e9b069ca4177c1903c3e843eef90c7e92992fa4931ae607da6de49e1419" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "safety-schemas" do + url "https://files.pythonhosted.org/packages/c2/ef/0e07dfdb4104c4e42ae9fc6e8a0da7be2d72ac2ee198b32f7500796de8f3/safety_schemas-0.0.16.tar.gz" + sha256 "3bb04d11bd4b5cc79f9fa183c658a6a8cf827a9ceec443a5ffa6eed38a50a24e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tenacity" do + url "https://files.pythonhosted.org/packages/0a/d4/2b0cd0fe285e14b36db076e78c93766ff1d529d70408bd1d2a5a84f1d929/tenacity-9.1.2.tar.gz" + sha256 "1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/safety --version") + + assert_match "Safety is not authenticated, please first authenticate and try again.", + shell_output("#{bin}/safety check-updates", 1) + end +end diff --git a/Formula/s/sagittarius-scheme.rb b/Formula/s/sagittarius-scheme.rb new file mode 100644 index 0000000000000..2334a3f7f7d27 --- /dev/null +++ b/Formula/s/sagittarius-scheme.rb @@ -0,0 +1,41 @@ +class SagittariusScheme < Formula + desc "Free Scheme implementation supporting R6RS and R7RS" + homepage "https://github.com/ktakashi/sagittarius-scheme" + url "https://github.com/ktakashi/sagittarius-scheme/releases/download/v0.9.13/sagittarius-0.9.13.tar.gz" + sha256 "8cf812190c43738a9d6021e677c928a80c05cad1a03047c1868c865ccfd65773" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f2233759c744b4306a29c889f1353eb79d3ef63eb28ca67b04b5236adb4b108b" + sha256 cellar: :any, arm64_sequoia: "1a2a574e1ab887938910ae732c2361f97dd66a8781c0844f1272b48ad5c75ded" + sha256 cellar: :any, arm64_sonoma: "b126aaf308f762b129314b25859c99a8c9cfd3fc8ba0bb66e136da369e98003e" + sha256 cellar: :any, arm64_ventura: "20f8fcc41f81fd346abc1a3e1aab0965e9ee575566acc9f61878188c3006b2a2" + sha256 cellar: :any, sonoma: "70e046b1c40141507915325710175d48ce28c80eb6ed7ab0cdb478c0962d78b0" + sha256 cellar: :any, ventura: "a6b58821c02c1f395ca5002a0c8c55c6cb531de4682a6166ef4c2963dfe8212a" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a90dbb17deb8e950e169ff7c53b64e6258bcd890051946d61afe06d5f78edce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f0455c78b4d9b9df71d6863aa5bdbff00c3869878b3b0a80f1fcd76509b020d" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "openssl@3" + depends_on "unixodbc" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + # Work around build error on Apple Silicon by forcing little endian. + # src/sagittarius/private/sagittariusdefs.h:200:3: error: Failed to detect endian + ENV.append_to_cflags "-D_LITTLE_ENDIAN" if OS.mac? && Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "build", "-DODBC_LIBRARIES=odbc", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_equal "4", shell_output("#{bin}/sagittarius -e '(display (+ 1 3))(exit)'") + end +end diff --git a/Formula/s/sail.rb b/Formula/s/sail.rb new file mode 100644 index 0000000000000..afc5afb39c2b4 --- /dev/null +++ b/Formula/s/sail.rb @@ -0,0 +1,152 @@ +class Sail < Formula + include Language::Python::Virtualenv + + desc "CLI toolkit to provision and deploy WordPress applications to DigitalOcean" + homepage "https://sailed.io" + url "https://files.pythonhosted.org/packages/1c/64/2af3a1a9dfa005dc91a22535a29071e9255efeacf7e61dbefee920d01571/sailed_io-0.10.9.tar.gz" + sha256 "cae38b97fada34a7681872661342c82b317d877eab882830c59610734eb53bdf" + license "GPL-3.0-only" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "3ce4a9f241e10ccf52e2d1efffa1d7795d043ce22f1f84f283444fe2a220dd6a" + sha256 cellar: :any, arm64_sequoia: "5a0508d9c5bcf27a98e49231ed97a6d61989872c778773c074c11a2eb196fab1" + sha256 cellar: :any, arm64_sonoma: "8c7be99b7e7d1d1ad98ec570cf6022c951447c4c133e81f8b7b8b86464fa8dfa" + sha256 cellar: :any, sonoma: "692b3f1dff9d29816a262b8b84afe165e566f28ba2b0c01b9ac77820b9a7b5c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e1f9c2b44e8dbae252c14b7e7c5dc09600674295c08066a231a811a89e1f352" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76183cba24d5b6143d5aef4a19154211f19429fada46db3f0ce77e23b8768d21" + end + + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography] + + # `pyyaml` package is manually updated to support Python 3.14 + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "fabric" do + url "https://files.pythonhosted.org/packages/0d/3f/337f278b70ba339c618a490f6b8033b7006c583bd197a897f12fbc468c51/fabric-3.2.2.tar.gz" + sha256 "8783ca42e3b0076f08b26901aac6b9d9b1f19c410074e7accfab902c184ff4a3" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "invoke" do + url "https://files.pythonhosted.org/packages/f9/42/127e6d792884ab860defc3f4d80a8f9812e48ace584ffc5a346de58cdc6c/invoke-2.2.0.tar.gz" + sha256 "ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + end + + resource "jsonpickle" do + url "https://files.pythonhosted.org/packages/e4/a6/d07afcfdef402900229bcca795f80506b207af13a838d4d99ad45abf530c/jsonpickle-4.1.1.tar.gz" + sha256 "f86e18f13e2b96c1c1eede0b7b90095bbb61d99fedc14813c44dc2f361dbbae1" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/cc/af/11996c4df4f9caff87997ad2d3fd8825078c277d6a928446d2b6cf249889/paramiko-3.4.0.tar.gz" + sha256 "aac08f26a31dc4dffd92821527d1682d99d52f9ef6851968114a8728f3c274d3" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "python-digitalocean" do + url "https://files.pythonhosted.org/packages/f8/f7/43cb73fb393c4c0da36294b6040c7424bc904042d55c1b37c73ecc9e7714/python-digitalocean-1.17.0.tar.gz" + sha256 "107854fde1aafa21774e8053cf253b04173613c94531f75d5a039ad770562b24" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/72/97/bf44e6c6bd8ddbb99943baf7ba8b1a8485bcd2fe0e55e5708d7fee4ff1ae/requests_file-2.1.0.tar.gz" + sha256 "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/db/ed/c92a5d6edaafec52f388c2d2946b4664294299cebf52bb1ef9cbc44ae739/tldextract-5.1.2.tar.gz" + sha256 "c9e17f756f05afb5abac04fe8f766e7e70f9fe387adb1859f0f52408ee060200" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sail", shell_parameter_format: :click) + end + + test do + assert_match(version.to_s, shell_output("#{bin}/sail --version")) + assert_match("Could not parse .sail/config.json", shell_output("#{bin}/sail deploy 2>&1", 1)) + end +end diff --git a/Formula/s/saldl.rb b/Formula/s/saldl.rb new file mode 100644 index 0000000000000..2efd826925005 --- /dev/null +++ b/Formula/s/saldl.rb @@ -0,0 +1,65 @@ +class Saldl < Formula + desc "CLI downloader optimized for speed and early preview" + homepage "https://saldl.github.io/" + url "https://github.com/saldl/saldl/archive/refs/tags/v41.tar.gz" + sha256 "fc9980922f1556fd54a8c04fd671933fdc5b1e6847c1493a5fec89e164722d8e" + license "AGPL-3.0-or-later" + head "https://github.com/saldl/saldl.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "09d9a038aebe18f9b9b14b96303429a56caddda7425949c0cd5b6feb14de20c4" + sha256 cellar: :any, arm64_sequoia: "f6ca14c2df72bbec447ff0fbcbfe0b1b76070808210ec18c6822fc0579bb9053" + sha256 cellar: :any, arm64_sonoma: "b5473268647d0fb55defbd170569644c7545fedc20487531717db503ec43e2ab" + sha256 cellar: :any, arm64_ventura: "45ec76ad15d5c9c04d96bb467fa4d06605afa85675c7f4979f15e8c10d2231e9" + sha256 cellar: :any, arm64_monterey: "1251f81d7ec7ef2faf2368564aa094363b9f2b16bc9a2f14637a62b73b1bfe93" + sha256 cellar: :any, arm64_big_sur: "a2fb9b1d61667447ddca0988edf3e059f008250ce7c132329b58a9d506619b91" + sha256 cellar: :any, sonoma: "d36fd42240ec138eff96597c4b4c7c26ab880a3bf9d71f094b7baba9c6662a8b" + sha256 cellar: :any, ventura: "4f0e1d940e661c286b891acf10e3ee073f43fc513431e238169a3d8363e384f3" + sha256 cellar: :any, monterey: "ac5cd4b2cf2c98914450f59547ee2e2ef995be33e0a23e81d0fe90c73d6e8353" + sha256 cellar: :any, big_sur: "a65269f2669815cf1590d9aeacff4639593edaf4f34be5964c793d01ad104eac" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd1865579a7047c885722dcc0ab7a6352e4c038665ec309dc5fcd4fbb7228076" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34ed09e4b4f2663075c8d514390cad8aade4b66b8cf2a40e4c46ee1bd23b199e" + end + + depends_on "asciidoc" => :build + depends_on "docbook-xsl" => :build + depends_on "pkgconf" => :build + depends_on "curl" # curl >= 7.55 is required + depends_on "libevent" + + uses_from_macos "python" => :build + uses_from_macos "libxslt" + + # Update waf for python 3.11 + # Use resource instead of patch since applying corrupts waf + # https://github.com/saldl/saldl/pull/15 + resource "waf" do + url "https://raw.githubusercontent.com/saldl/saldl/360c29d6c8cee5f7e608af42237928be429c3407/waf" + sha256 "93909bca823a675f9f40af7c65b24887c3a3c0efdf411ff1978ba827194bdeb0" + end + + def install + ENV.refurbish_args + + # a2x/asciidoc needs this to build the man page successfully + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + args = ["--prefix=#{prefix}"] + + # head uses git describe to acquire a version + args << "--saldl-version=v#{version}" if build.stable? + + buildpath.install resource("waf") + system "python3", "./waf", "configure", *args + system "python3", "./waf", "build" + system "python3", "./waf", "install" + end + + test do + system bin/"saldl", "https://brew.sh/index.html" + assert_path_exists testpath/"index.html" + end +end diff --git a/Formula/s/salesforce-mcp.rb b/Formula/s/salesforce-mcp.rb new file mode 100644 index 0000000000000..862b1f2598126 --- /dev/null +++ b/Formula/s/salesforce-mcp.rb @@ -0,0 +1,30 @@ +class SalesforceMcp < Formula + desc "MCP Server for interacting with Salesforce instances" + homepage "https://github.com/salesforcecli/mcp" + url "https://registry.npmjs.org/@salesforce/mcp/-/mcp-0.23.4.tgz" + sha256 "bddf80587e9b490db0cfa04474f68f3fcd47ef1da433461632763e41fe2238c3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e9003ac7caa15c5057202f8058b2789d5114e9cc8f3a9a795b7a9c71899efb56" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/sf-mcp-server --version 2>&1") + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output("#{bin}/sf-mcp-server --orgs DEFAULT_TARGET_ORG --toolsets all 2>&1", json, 0) + assert_match "The username or alias for the Salesforce org to run this tool against", output + end +end diff --git a/Formula/s/salt-lint.rb b/Formula/s/salt-lint.rb new file mode 100644 index 0000000000000..e1e1f9a8d4efb --- /dev/null +++ b/Formula/s/salt-lint.rb @@ -0,0 +1,46 @@ +class SaltLint < Formula + include Language::Python::Virtualenv + + desc "Check for best practices in SaltStack" + homepage "https://github.com/warpnet/salt-lint" + url "https://files.pythonhosted.org/packages/e5/e9/4df64ca147c084ca1cdbea9210549758d07f4ed94ac37d1cd1c99288ef5c/salt-lint-0.9.2.tar.gz" + sha256 "7f74e682e7fd78722a6d391ea8edc9fc795113ecfd40657d68057d404ee7be8e" + license "MIT" + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_tahoe: "b606364c1a88093ebede5792fbd635b2341e88be4445bcdd3df4e5a86311bf72" + sha256 cellar: :any, arm64_sequoia: "66e97e657e2f63d010ae22eca72be97f2852ff05c766875d979bed46d6c3a97a" + sha256 cellar: :any, arm64_sonoma: "8a714043bf26e236545a4c7b14a80618eb192757176b632678e8c3077040798f" + sha256 cellar: :any, sonoma: "c9f93105dae3ecb41c3536a5e462027915159283114ee79ce154e52eb6e491bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "cce0ed5262eb581bff74a9aadd2c4bb5f83f172d4c1a68d2c9685893aca0785e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3406be26bba9f19eeda9236f526a0eba97654495365e78dc2226ce5910f8bcb3" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.sls").write <<~YAML + /tmp/testfile: + file.managed: + - source: salt://{{unspaced_var}}/example + YAML + out = shell_output("#{bin}/salt-lint #{testpath}/test.sls", 2) + assert_match "[206] Jinja variables should have spaces before and after: '{{ var_name }}'", out + end +end diff --git a/Formula/s/samba.rb b/Formula/s/samba.rb new file mode 100644 index 0000000000000..939b9888849e7 --- /dev/null +++ b/Formula/s/samba.rb @@ -0,0 +1,191 @@ +class Samba < Formula + # Samba can be used to share directories with the guest in QEMU user-mode + # (SLIRP) networking with the `-net nic -net user,smb=/share/this/with/guest` + # option. The shared folder appears in the guest as "\\10.0.2.4\qemu". + desc "SMB/CIFS file, print, and login server for UNIX" + homepage "https://www.samba.org/" + url "https://download.samba.org/pub/samba/stable/samba-4.23.2.tar.gz" + sha256 "2de330647e1486683597e261285d04a9b7514ab5c7da27711736e22c7f2b9c2e" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.samba.org/samba/download/" + regex(/href=.*?samba[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "9ec67a969c788b8da3b104fe5ed4daf79f7894acad44316796edb62efce0dd59" + sha256 arm64_sequoia: "dffb40e4725ebcf64995eb1d907f16e9be77ab23db55a65e712014d33ec48aa0" + sha256 arm64_sonoma: "d4abb4e5291673890d96487b2db82c09b42c463f09c06e5a5cb3b59a130e370e" + sha256 sonoma: "2c0063330bb2bf78848e7a6c704a8feda62ac42ac9c91fdbd6baca7703b6812e" + sha256 arm64_linux: "23ac8fca43f157daa55d076e3d7315ae618d887652814d49d14ec69275405786" + sha256 x86_64_linux: "79cfebcbf209d4a647ed7dd579cba475bb9296647d7f558ea7cec113881ed0e0" + end + + depends_on "bison" => :build + depends_on "cmocka" => :build + depends_on "pkgconf" => :build + depends_on "gnutls" + # icu4c can get linked if detected by pkg-config and there isn't a way to force disable + # without disabling spotlight support. So we just enable the feature for all systems. + depends_on "icu4c@77" + depends_on "krb5" + depends_on "libtasn1" + depends_on "libxcrypt" + depends_on "lmdb" + depends_on "popt" + depends_on "readline" + depends_on "talloc" + depends_on "tdb" + depends_on "tevent" + + uses_from_macos "flex" => :build + uses_from_macos "perl" => :build + uses_from_macos "python" => :build # configure requires python3 binary + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "openssl@3" + end + + on_linux do + depends_on "libtirpc" + end + + conflicts_with "jena", because: "both install `tdbbackup` binaries" + conflicts_with "puzzles", because: "both install `net` binaries" + + resource "Parse::Yapp" do + url "https://cpan.metacpan.org/authors/id/W/WB/WBRASWELL/Parse-Yapp-1.21.tar.gz" + sha256 "3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5" + end + + # upstream bug report, https://bugzilla.samba.org/show_bug.cgi?id=10791 + # https://bugzilla.samba.org/show_bug.cgi?id=10626 + # https://bugzilla.samba.org/show_bug.cgi?id=9665 + # upstream pr ref, https://gitlab.com/samba-team/samba/-/merge_requests/3902 + patch do + url "https://gitlab.com/samba-team/samba/-/commit/a2736fe78a4e75e71b9bc53dc24c36d71b911d2a.diff" + sha256 "7d1bf9eb26211e2ab9e3e67ae32308a3704ff9904ab2369e5d863e079ea8a03f" + end + + def install + # Skip building test that fails on ARM with error: initializer element is not a compile-time constant + inreplace "lib/ldb/wscript", /\('test_ldb_comparison_fold',$/, "\\0 enabled=False," if Hardware::CPU.arm? + + # avoid `perl module "Parse::Yapp::Driver" not found` error on macOS 10.xx (not required on 11) + if !OS.mac? || MacOS.version < :big_sur + ENV.prepend_create_path "PERL5LIB", buildpath/"lib/perl5" + ENV.prepend_path "PATH", buildpath/"bin" + resource("Parse::Yapp").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}" + system "make" + system "make", "install" + end + end + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}/private" if OS.linux? + + bundled_libs_list = [] + # Upstream (https://github.com/lxin/quic) has no tagged releases, so we would have to add an arbitrary + # commit as a resource. That's not really better than just using the vendored copy. Consider breaking + # it out into a resource or formula once tagged releases become available. + bundled_libs_list << "libquic" if OS.linux? + bundled_libs = bundled_libs_list.empty? ? "NONE" : bundled_libs_list.join(",") + + system "./configure", + "--bundled-libraries=#{bundled_libs}", + "--private-libraries=!ldb", + "--disable-cephfs", + "--disable-cups", + "--disable-iprint", + "--disable-glusterfs", + "--disable-python", + "--without-acl-support", + "--without-ad-dc", + "--without-ads", + "--without-ldap", + "--without-libarchive", + "--without-json", + "--without-pam", + "--without-regedit", + "--without-syslog", + "--without-utmp", + "--without-winbind", + "--with-shared-modules=!vfs_snapper", + "--with-system-mitkrb5", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}" + system "make" + system "make", "install" + return unless OS.mac? + + # macOS has its own SMB daemon as /usr/sbin/smbd, so rename our smbd to samba-dot-org-smbd to avoid conflict. + # samba-dot-org-smbd is used by qemu.rb . + # Rename profiles as well to avoid conflicting with /usr/bin/profiles + mv sbin/"smbd", sbin/"samba-dot-org-smbd" + mv bin/"profiles", bin/"samba-dot-org-profiles" + end + + def caveats + on_macos do + <<~EOS + To avoid conflicting with macOS system binaries, some files were installed with non-standard name: + - smbd: #{HOMEBREW_PREFIX}/sbin/samba-dot-org-smbd + - profiles: #{HOMEBREW_PREFIX}/bin/samba-dot-org-profiles + EOS + end + end + + test do + smbd = if OS.mac? + "#{sbin}/samba-dot-org-smbd" + else + "#{sbin}/smbd" + end + + system smbd, "--build-options", "--configfile=/dev/null" + system smbd, "--version" + + mkdir_p "samba/state" + mkdir_p "samba/data" + (testpath/"samba/data/hello").write "hello" + + # mimic smb.conf generated by qemu + # https://github.com/qemu/qemu/blob/v6.0.0/net/slirp.c#L862 + (testpath/"smb.conf").write <<~EOS + [global] + private dir=#{testpath}/samba/state + interfaces=127.0.0.1 + bind interfaces only=yes + pid directory=#{testpath}/samba/state + lock directory=#{testpath}/samba/state + state directory=#{testpath}/samba/state + cache directory=#{testpath}/samba/state + ncalrpc dir=#{testpath}/samba/state/ncalrpc + log file=#{testpath}/samba/state/log.smbd + smb passwd file=#{testpath}/samba/state/smbpasswd + security = user + map to guest = Bad User + load printers = no + printing = bsd + disable spoolss = yes + usershare max shares = 0 + [test] + path=#{testpath}/samba/data + read only=no + guest ok=yes + force user=#{ENV["USER"]} + EOS + + port = free_port + spawn smbd, "--debug-stdout", "-F", "--configfile=smb.conf", "--port=#{port}", "--debuglevel=4", in: "/dev/null" + + sleep 5 + mkdir_p "got" + system bin/"smbclient", "-p", port.to_s, "-N", "//127.0.0.1/test", "-c", "get hello #{testpath}/got/hello" + assert_equal "hello", (testpath/"got/hello").read + end +end diff --git a/Formula/s/sambamba.rb b/Formula/s/sambamba.rb new file mode 100644 index 0000000000000..92e0dc05e159e --- /dev/null +++ b/Formula/s/sambamba.rb @@ -0,0 +1,70 @@ +class Sambamba < Formula + desc "Tools for working with SAM/BAM data" + homepage "https://lomereiter.github.io/sambamba/" + url "https://github.com/biod/sambamba/archive/refs/tags/v1.0.1.tar.gz" + sha256 "955a51a00be9122aa9b0c27796874bfdda85de58aa0181148ef63548ea5192b0" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a0977e58642b6de8b967a4e01b7b2edf218a6c7b911a98d7e362d4fda1d1fa24" + sha256 cellar: :any, arm64_sequoia: "920be291227ca05e361411dc0199507c0c341b492b47db42248b52b27ed99ccc" + sha256 cellar: :any, arm64_sonoma: "ddb87f1e11e5f6c241ba9165e9902311d40216ce3a5a7fac3b0d020e24ff17cc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ec988d75fd0cb7ceb2c2ba1ce9e4081e70004caca8ac99793f1d0452a2afe32" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ad59fcbbff179f5b753d40baf1c9e1e1b9e24feef3275d38e409d3199e3e9d55" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fc71f03090dc0b8a09e1309f436ac38bd4eb6963e6a057e37bf8503323864cce" + sha256 cellar: :any, sonoma: "12d22d28d83f10dc8d26d12de9b7b826ea88623b432068cbe2f470cc07c24fe4" + sha256 cellar: :any_skip_relocation, ventura: "40d87797c5a61358da3981c7a1e798fe72b6c1047407b4d8a0f37c21d7b056f2" + sha256 cellar: :any_skip_relocation, monterey: "4ba6feddd3eeafa845c0f66dc6aea389f554c09a8a0c3609644fa44d028e5563" + sha256 cellar: :any_skip_relocation, big_sur: "da17c4589ffb5d927025ce617fafa051c6690665643f5c5544b319882b3bf298" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bf2af3910f3a4bdb5e3c20c1755f0eb345cabe44861dca0b2c2799d02a68f03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1981702ab5c074bebeb8054d69f81b4d6df4daea2907026efae832baa8d362ae" + end + + depends_on "ldc" => :build + depends_on "lz4" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + # remove `-flto=full` flag + patch :DATA + + # Fix to add missing break for case statement, should remove in next release + patch do + url "https://github.com/biod/sambamba/commit/5fdcf6f3015cb17b805514397223f7513bc92613.patch?full_index=1" + sha256 "f51a32a00102478aa8c9a0c36975a33438fd474992127a757d9a4732b10e6695" + end + + def install + system "make", "release" + bin.install "bin/sambamba-#{version}" => "sambamba" + end + + test do + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/biod/sambamba/f898046c5b9c1a97156ef041e61ac3c42955a716/test/ex1_header.sam" + sha256 "63c39c2e31718237a980c178b404b6b9a634a66e83230b8584e30454a315cc5e" + end + + resource("homebrew-testdata").stage testpath + system bin/"sambamba", "view", "-S", "ex1_header.sam", "-f", "bam", "-o", "ex1_header.bam" + system bin/"sambamba", "sort", "-t2", "-n", "ex1_header.bam", "-o", "ex1_header.sorted.bam", "-m", "200K" + assert_path_exists testpath/"ex1_header.sorted.bam" + end +end + +__END__ +diff --git a/Makefile b/Makefile +index 57bbc55..1faa80d 100644 +--- a/Makefile ++++ b/Makefile +@@ -41,7 +41,6 @@ endif + + BIOD_PATH=./BioD:./BioD/contrib/msgpack-d/src + DFLAGS = -wi -I. -I$(BIOD_PATH) -g -J. +-LDFLAGS = -L=-flto=full + + # DLIBS = $(LIBRARY_PATH)/libphobos2-ldc.a $(LIBRARY_PATH)/libdruntime-ldc.a + # DLIBS_DEBUG = $(LIBRARY_PATH)/libphobos2-ldc-debug.a $(LIBRARY_PATH)/libdruntime-ldc-debug.a diff --git a/Formula/s/saml2aws.rb b/Formula/s/saml2aws.rb new file mode 100644 index 0000000000000..fea9e8d0bc48f --- /dev/null +++ b/Formula/s/saml2aws.rb @@ -0,0 +1,35 @@ +class Saml2aws < Formula + desc "Login and retrieve AWS temporary credentials using a SAML IDP" + homepage "https://github.com/Versent/saml2aws" + url "https://github.com/Versent/saml2aws/archive/refs/tags/v2.36.19.tar.gz" + sha256 "208ec9e1f2e8c7e1770990825bc5e56c65cd86e8362e1a3e6fa1ef5ecc7bbc91" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69e6077ecc29098c8898cb893541b71f13623162e33c8d2f2c8fdcba2b5d67f3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a654e7f6931b60cb7a97c06b259a18b85d726500c2628cd032224084f6e4f085" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1891facfc93e5503e4d43f944a8b997fae5a36096c7f3830f7d2d497e0f799d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "23483664f18cf600ecb5005cf41156f729cbb835303a08bdbb213b2af804cd64" + sha256 cellar: :any_skip_relocation, sonoma: "6aa3ed09c1047c5c9815cd2a3c5efac7de53695e20a4bad7e7350f6a87483683" + sha256 cellar: :any_skip_relocation, ventura: "442e6638949edd3ef4ab43cc6e75915145b33f1313e285dcec56a22ba58d3d88" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d094d781c37e372b4281139da3bf06920af2c78a483852e69ea9c325bcd8635" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29e62a8821f75bfab2b35ebdc176976725aac06f4f3e57813d6e8e49c8e2890b" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/saml2aws" + + generate_completions_from_executable(bin/"saml2aws", shell_parameter_format: "--completion-script-", + shells: [:bash, :zsh]) + end + + test do + assert_match "error building login details: Failed to validate account.: URL empty in idp account", + shell_output("#{bin}/saml2aws script 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/saml2aws --version 2>&1") + end +end diff --git a/Formula/s/sampler.rb b/Formula/s/sampler.rb new file mode 100644 index 0000000000000..5581d3ce48a76 --- /dev/null +++ b/Formula/s/sampler.rb @@ -0,0 +1,39 @@ +class Sampler < Formula + desc "Tool for shell commands execution, visualization and alerting" + homepage "https://sampler.dev" + url "https://github.com/sqshq/sampler/archive/refs/tags/v1.1.0.tar.gz" + sha256 "8b60bc5c0f94ddd4291abc2b89c1792da424fa590733932871f7b5e07e7587f9" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aca2f9375a5efc43bcd98549ac7d7ba6becd88a86ba41b5791b9d751260d0616" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e9165271f6debe06db6e23f46c13a13b603924e65597f85bb428a1b27780ee1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0122ac71d3af643458faa2633740d3fd8256bd943ae7d212a6397ce9ff6f39a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae4392df3f779677167dde63083627a60da11e80c1afac173f5ae67bd4e1f495" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7ba9d52f3a2030da4c3c5464e5286907ff9f614d50f11555aa780f2087121f93" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "330a2e3de5d8352c9d11fa8d7f850b8fe41f869b2ec6f953944a500d0ba2143b" + sha256 cellar: :any_skip_relocation, sonoma: "d85ed3f3b130be8bf7141e9c7b236668c1f758f0a1ed86e7cb0d6d98d1457ae8" + sha256 cellar: :any_skip_relocation, ventura: "6fd6a327e70bc18043da635cb29864cd21e85edf1268a47fb577babceb336c01" + sha256 cellar: :any_skip_relocation, monterey: "56b5b7b0cd61ff5557cbf5c58bb25b793de0a17303292f2c28b2d73584650a5d" + sha256 cellar: :any_skip_relocation, big_sur: "3dd48615b2dd049e17d2635df81cd8f312e004d2e9c50a0d68d7f4f40516e61c" + sha256 cellar: :any_skip_relocation, catalina: "1b4a4c841691d8a6ca9ea4649092684511bff1f60d7d80e364db13115f2e6399" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bb024eb1121fcbdb7591fc43d76192122a98b1e0f8805151fac95108e8ea20a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71d294afc5ecad041132801fa2d6848f8e4fa1ca1756b2d17b440f23ccaa11ec" + end + + depends_on "go" => :build + + on_linux do + depends_on "alsa-lib" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_includes "specify config file", shell_output(bin/"sampler") + end +end diff --git a/Formula/s/samply.rb b/Formula/s/samply.rb new file mode 100644 index 0000000000000..607a6e4f683da --- /dev/null +++ b/Formula/s/samply.rb @@ -0,0 +1,40 @@ +class Samply < Formula + desc "CLI sampling profiler" + homepage "https://github.com/mstange/samply" + url "https://github.com/mstange/samply/archive/refs/tags/samply-v0.13.1.tar.gz" + sha256 "7002789471f8ef3a36f4d4db7be98f2847724e2b81a53c5e23d5cae022fb704b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/mstange/samply.git", branch: "main" + + livecheck do + url :stable + regex(/^samply[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7c85be94ac3ab2741c5674f88393e4a40cebededb1bded0fa745a7014befb3e8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "74b84ca23e39806e347daaa2f0643e67dbdd9d9524ffefd5e33d3209e7d657de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8730482276dce18547b0d01db36665ac3520a360007525e4e8e2e4efa04c02bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a64f2cb47e7a97c363081d9a4bd532601bd08683cc32e3d60106396e20835d6b" + sha256 cellar: :any_skip_relocation, sonoma: "21667380c1fd74f7b166beb990228af8d6344ccfa33139c8abbc4601afbce857" + sha256 cellar: :any_skip_relocation, ventura: "f7759fa82b95fedd7b9007a4d78d7650bb6f3fb128d142245d73a240e8cbf017" + sha256 cellar: :any_skip_relocation, arm64_linux: "919b8b8f007bc8f801f81dbc4ccdd51fb8ab4c3570bbfffa2c7436ac5409e4a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a6eef40b7f6a26e0013ddb66b430bb2bb2c252f568aca126398b31e0e32467e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "samply") + end + + test do + assert_match version.to_s, shell_output("#{bin}/samply --version") + + test_perf_json = testpath/"test_perf.json" + test_perf_json.write "" + + output = shell_output("#{bin}/samply import --no-open #{test_perf_json} 2>&1", 1) + assert_match "Error importing perf.data file", output + end +end diff --git a/Formula/s/samtools.rb b/Formula/s/samtools.rb new file mode 100644 index 0000000000000..951c92f4acd26 --- /dev/null +++ b/Formula/s/samtools.rb @@ -0,0 +1,38 @@ +class Samtools < Formula + desc "Tools for manipulating next-generation sequencing data" + homepage "https://www.htslib.org/" + url "https://github.com/samtools/samtools/releases/download/1.22.1/samtools-1.22.1.tar.bz2" + sha256 "02aa5cd0ba52e06c2080054e059d7d77a885dfe9717c31cd89dfe7a4047eda0e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3cdcec6325a6e395a92451d4cf46c7adfd75567fb791da1b8f080baf876955d4" + sha256 cellar: :any, arm64_sequoia: "4e6374d7b2e82285cd2d94cf69d9456ba1ebacded9b7c54b7b13cfe6d7571dfc" + sha256 cellar: :any, arm64_sonoma: "5d9c3ff32e78ccff22c04160384cf9f561f8e09e14b5cae07a23c10e030e2e8c" + sha256 cellar: :any, arm64_ventura: "8e75a8f5bb0225069dac4603e771b10849e68b4932240a6870ff0ce9391e4e5e" + sha256 cellar: :any, sonoma: "1bc8878384afbe3ce9db394963cbc922d1ce5852a81fcaf9331b90acfb4b870d" + sha256 cellar: :any, ventura: "ee42796a160346080707d18a9c1b92d4b3056faac0f8234fdba437f546d2ab6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd5d5e0c5c2f4eae65695b0944643bf15a65e293897885bd97d74348099e7d5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3008247e5b85f0fc9529d0fdcaaeeb01109b819ad9236e747f1eeb7c3378ac09" + end + + depends_on "htslib" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}", + "--with-htslib=#{Formula["htslib"].opt_prefix}" + system "make", "install" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + system bin/"samtools", "faidx", "test.fasta" + assert_equal "U00096.2:1-70\t70\t15\t70\t71\n", (testpath/"test.fasta.fai").read + end +end diff --git a/Formula/s/samurai.rb b/Formula/s/samurai.rb new file mode 100644 index 0000000000000..d440311ee0ad6 --- /dev/null +++ b/Formula/s/samurai.rb @@ -0,0 +1,47 @@ +class Samurai < Formula + desc "Ninja-compatible build tool written in C" + homepage "https://github.com/michaelforney/samurai" + url "https://github.com/michaelforney/samurai/releases/download/1.2/samurai-1.2.tar.gz" + sha256 "3b8cf51548dfc49b7efe035e191ff5e1963ebc4fe8f6064a5eefc5343eaf78a5" + license "Apache-2.0" + head "https://github.com/michaelforney/samurai.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3cbfa0ba7e77472c117829bb5cd8dba6022f219beb688070730e10958908c85a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5dbf52962ed4a4191d77edd3b9970621f5f543ed42eb64d85673f7bc572f0a01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e254250616b85e30cde7a66f55af5bde58657622a82fab525e92ed2a6f8220cc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef30fe2e4abb74c2d10c8465629b2f53238bad713d5f9f11a29edbeef4a3906f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "98bc9f540b7344a3aa23402b3537a2a45842032026108de92f38ca2d1cda757e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "04ca3c9aada344360216791324e673db86948a3eaa2e82a541cb1fd28647b1bf" + sha256 cellar: :any_skip_relocation, sonoma: "d7b44a04b819915508167e1c0f3c928d31d329c87e76001e771db6009131fbe5" + sha256 cellar: :any_skip_relocation, ventura: "2dec5e545d8ad68b6a52ceda2195f50f6a717b390c83ac5cd052d431855fb666" + sha256 cellar: :any_skip_relocation, monterey: "34f2a7b813c145cf6deb49c67a476e22dbb2704329eb0a404a8c2c6821d41e20" + sha256 cellar: :any_skip_relocation, big_sur: "5e3819fa6eb240e781c236528297422575c6c2ae9aa4e38e6ddc7dbac0e25339" + sha256 cellar: :any_skip_relocation, catalina: "35e183246e80cfe5a6f9b11b12cd2e0c3a754da15b8fb7550b5716de9e219e8d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a544e5af4acbc661a25ff6f15fd2e0fce9164055734a033e0347c55daa760d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e89f00f8f16b67e01a287801b7c442e5dafe0923304fa649612610e26f4c4540" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + (testpath/"build.ninja").write <<~EOS + rule cc + command = #{ENV.cc} $in -o $out + build hello: cc hello.c + EOS + (testpath/"hello.c").write <<~C + #include + int main() { + puts("Hello, world!"); + return 0; + } + C + system bin/"samu" + assert_match "Hello, world!", shell_output("./hello") + end +end diff --git a/Formula/s/sane-backends.rb b/Formula/s/sane-backends.rb new file mode 100644 index 0000000000000..a7e73acd86c66 --- /dev/null +++ b/Formula/s/sane-backends.rb @@ -0,0 +1,68 @@ +class SaneBackends < Formula + desc "Backends for scanner access" + homepage "http://www.sane-project.org/" + url "https://gitlab.com/-/project/429008/uploads/843c156420e211859e974f78f64c3ea3/sane-backends-1.4.0.tar.gz" + sha256 "f99205c903dfe2fb8990f0c531232c9a00ec9c2c66ac7cb0ce50b4af9f407a72" + license "GPL-2.0-or-later" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "660c47f3e2ef991dd65db76d209c5fa64fb60287dcabab73c33d14f493d2aca9" + sha256 arm64_sequoia: "0216c81f23f34c4ed8528ac75f3bb668b217619569b16ebfc9b38483c6ab4770" + sha256 arm64_sonoma: "90ff1226986965d15ab21286260ee3323140be3fe91c299bffae18c215cc2b47" + sha256 arm64_ventura: "aa5d8003afa1bedfe0ce827f717afac8f8f372ebffd92d01661240eaf1fb2ce7" + sha256 sonoma: "7e5c5a8c11e1ec6fb70648e1413e736b5d814fe8dc89fc92634a18c08df524b4" + sha256 ventura: "f74beb185bd7120dd63fd6bc37e5bcad2465957dc6f22fb88565e5dababd62cd" + sha256 arm64_linux: "c3852b66436ad775efb69b9909252d993f49fc03f6cb632b518c4d8d4f675531" + sha256 x86_64_linux: "d9ef1834b9b578e87a81e1b2050eb939de23cc9febff41af035a2a2dbc0f1923" + end + + head do + url "https://gitlab.com/sane-project/backends.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "libusb" + depends_on "net-snmp" + + uses_from_macos "python" => :build + uses_from_macos "libxml2" + + on_linux do + depends_on "systemd" + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--enable-local-backends", + "--localstatedir=#{var}", + "--without-gphoto2", + "--with-usb=yes", + *std_configure_args + system "make", "install" + end + + def post_install + # Some drivers require a lockfile + (var/"lock/sane").mkpath + end + + test do + assert_match prefix.to_s, shell_output("#{bin}/sane-config --prefix") + end +end diff --git a/Formula/s/sapling.rb b/Formula/s/sapling.rb new file mode 100644 index 0000000000000..1a064eae1775a --- /dev/null +++ b/Formula/s/sapling.rb @@ -0,0 +1,137 @@ +class Sapling < Formula + desc "Source control client" + homepage "https://sapling-scm.com" + url "https://github.com/facebook/sapling/archive/refs/tags/0.2.20250521-115337+25ed6ac4.tar.gz" + version "0.2.20250521-115337-25ed6ac4" + sha256 "53c48bb807a7c65965a9f9f154f955ec4ccbce6696f721db73d0873e4bf03244" + license "GPL-2.0-or-later" + head "https://github.com/facebook/sapling.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:[.-]\d+)+[+-]\h+)$/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "80cad9a3bf004ddf9ca69b5b8f5734b7457cdc6afb56f90b36b4b1f39f29a742" + sha256 cellar: :any, arm64_sequoia: "68b681bdf583a8244cc12d20040bbc2bf72b483003e5f72718a02bf1eb1a4b6b" + sha256 cellar: :any, arm64_sonoma: "ba622027c69cacce85eceb38fb55ec67a3567cc443e2cf171856be99140c8659" + sha256 cellar: :any, arm64_ventura: "d627d3b0eac2220c1babc65f6edd21e22f8d52c49da837be04adbad790af7294" + sha256 cellar: :any, sonoma: "7ddc287232eac9b2999e0f1a6e4cbf85492c229afee18aa563e8625414b09149" + sha256 cellar: :any, ventura: "53b00042db69f2fda7927ec5f4bcaf81b80b91d364f63539c1b5da4268bf0e8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d992b99c149985d77dbddfa0a5bc25f8b556b13bec5d6b24f8d9c3647a7de96f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b90ffdd93cb0040aac0e050c9004bdcc9d7e9e2c23bb654166786eaf14efd1d" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "rust" => :build + depends_on "yarn" => :build + depends_on "gh" + depends_on "libssh2" + depends_on "node" + depends_on "openssl@3" + depends_on "python@3.12" # Python 3.13 issue: https://github.com/facebook/sapling/issues/980 + + uses_from_macos "llvm" => :build # for libclang + uses_from_macos "bzip2" + # curl-config on ventura builds do not report http2 feature, + # this is a workaround to allow to build against system curl + # see discussions in https://github.com/Homebrew/homebrew-core/pull/197727 + uses_from_macos "curl", since: :sonoma + uses_from_macos "zlib" + + conflicts_with "sl", because: "both install `sl` binaries" + + def watchman_rev + watchman_repo = "https://github.com/facebook/watchman.git" + max_date = version.patch.to_s.match(/^(\d{4})(\d{2})(\d{2})\b/).captures.join(".") + tags = Utils.safe_popen_read("git", "ls-remote", "--sort=-version:refname", "--tags", watchman_repo) + tags.scan(%r{^(\S+)\trefs/tags/v(\d{4}\.\d{2}\.\d{2})(?:\.\d+)+$}) do |rev, date| + return rev if date <= max_date + end + odie "Unable to pick watchman tag based on sapling patch version #{version.patch}!" + end + + def install + # Workaround to improve reproducibility as Cargo.toml uses branch for some dependencies. + # Actual reproducible builds won't be possible without a Cargo.lock. + # + # Related issue: https://github.com/facebook/sapling/issues/547 + if build.stable? + github_hashes = buildpath.glob("build/deps/github_hashes/*/*-rev.txt").to_h do |revfile| + commit = revfile.read[/commit ([0-9a-f]+)$/i, 1] + odie "Unable to parse commit from #{revfile}!" if commit.nil? + ["#{revfile.dirname.basename}/#{revfile.basename("-rev.txt")}", commit] + end + odie "Unable to find any revision files in build/deps/github_hashes!" if github_hashes.empty? + + # Watchman doesn't have a revision file. To avoid using HEAD, scan through tags + # and use revision from tag created on or before date in Sapling patch version + odie "Remove workaround for handling facebook/watchman!" if github_hashes.key?("facebook/watchman") + github_hashes["facebook/watchman"] = watchman_rev + + no_modification = true + Dir.glob("**/Cargo.toml") do |manifest| + inreplace manifest do |s| + github_hashes.each do |repo, rev| + result = s.gsub! %r{(git = "https://github.com/#{repo}(?:\.git)?",) branch = "[^"]*"}, + "\\1 rev = \"#{rev}\"", + audit_result: false + no_modification &&= result.nil? + end + end + if (git_branch = File.read(manifest)[/git = "[^"]*", branch = "[^"]*"/]) + odie "#{manifest} tracks a branch for #{git_branch}!" + end + end + odie "Inreplace did not modify any branch usage in Cargo.toml manifests!" if no_modification + end + + python3 = "python3.12" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["PYTHON_SYS_EXECUTABLE"] = which(python3) + ENV["SAPLING_VERSION"] = if build.stable? + version + else + Utils.safe_popen_read("ci/tag-name.sh").chomp + ".dev" + end + + # Don't allow the build to break our shim configuration. + inreplace "eden/scm/distutils_rust/__init__.py", '"HOMEBREW_CCCFG"', '"NONEXISTENT"' + system "make", "-C", "eden/scm", "install-oss", "PREFIX=#{prefix}", "PYTHON=#{python3}", "PYTHON3=#{python3}" + end + + test do + require "utils/linkage" + + assert_equal "Sapling #{version}", shell_output("#{bin}/sl --version").chomp + + system bin/"sl", "config", "--user", "ui.username", "Sapling " + system bin/"sl", "init", "--git", "foobarbaz" + + cd "foobarbaz" do + touch "a" + system bin/"sl", "add" + system bin/"sl", "commit", "-m", "first" + assert_equal "first", shell_output("#{bin}/sl log -l 1 -T {desc}").chomp + end + + dylibs = [ + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ] + dylibs << (Formula["curl"].opt_lib/shared_library("libcurl")) if OS.linux? + + dylibs.each do |library| + assert Utils.binary_linked_to_library?(bin/"sl", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/s/sarif-tools.rb b/Formula/s/sarif-tools.rb new file mode 100644 index 0000000000000..5245e7a0886ca --- /dev/null +++ b/Formula/s/sarif-tools.rb @@ -0,0 +1,154 @@ +class SarifTools < Formula + include Language::Python::Virtualenv + + desc "Set of command-line tools and Python library for working with SARIF files" + homepage "https://github.com/microsoft/sarif-tools" + url "https://files.pythonhosted.org/packages/16/3c/68e41db88aa15124175936017928e99182b3df8e6913c5e194c67d641996/sarif_tools-3.0.5.tar.gz" + sha256 "52d09c101121231fb3489ad8c7af56896b8a95415cef726a6db5e7d74c6834d2" + license "MIT" + head "https://github.com/microsoft/sarif-tools.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0badaa5fd42ce204c094473fcc594e2be83a2a4ad3a9fba6220b904de199c6d7" + sha256 cellar: :any, arm64_sequoia: "b164b65c77db6227b49049cf9bc5f31f210a86cf5c6818f2f960800f654a65c1" + sha256 cellar: :any, arm64_sonoma: "69a29ae285c15581de5cab7267bcf714ded4ccf9a0ea33921eaa2b24f6caf16c" + sha256 cellar: :any, sonoma: "8e01a41454080367688c3d3cf4e9bd8458abea7c83aee8232de8e21845b2a1bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a264f07e7a15c97ddff3dbace59197ff36b9da86679a61b4c023e4303c163ae5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81855fc8c9f4f9b3a704d2f7283c438fdbf2d079b662fb4a167dba5886f08ffe" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libraqm" + depends_on "libtiff" + depends_on "libyaml" + depends_on "little-cms2" + depends_on "numpy" + depends_on "pillow" => :no_linkage + depends_on "python@3.14" + depends_on "webp" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[numpy pillow] + + resource "contourpy" do + url "https://files.pythonhosted.org/packages/58/01/1253e6698a07380cd31a736d248a3f2a50a7c88779a1813da27503cadc2a/contourpy-1.3.3.tar.gz" + sha256 "083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880" + end + + resource "cycler" do + url "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz" + sha256 "88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c" + end + + resource "fonttools" do + url "https://files.pythonhosted.org/packages/4b/42/97a13e47a1e51a5a7142475bbcf5107fe3a68fc34aef331c897d5fb98ad0/fonttools-4.60.1.tar.gz" + sha256 "ef00af0439ebfee806b25f24c8f92109157ff3fac5731dc7867957812e87b8d9" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonpath-ng" do + url "https://files.pythonhosted.org/packages/6d/86/08646239a313f895186ff0a4573452038eed8c86f54380b3ebac34d32fb2/jsonpath-ng-1.7.0.tar.gz" + sha256 "f6f5f7fd4e5ff79c785f1573b394043b39849fb2bb47bcead935d12b00beab3c" + end + + resource "kiwisolver" do + url "https://files.pythonhosted.org/packages/5c/3c/85844f1b0feb11ee581ac23fe5fce65cd049a200c1446708cc1b7f922875/kiwisolver-1.4.9.tar.gz" + sha256 "c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "matplotlib" do + url "https://files.pythonhosted.org/packages/ae/e2/d2d5295be2f44c678ebaf3544ba32d20c1f9ef08c49fe47f496180e1db15/matplotlib-3.10.7.tar.gz" + sha256 "a06ba7e2a2ef9131c79c49e63dad355d2d878413a0376c1727c8b9335ff731c7" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-docx" do + url "https://files.pythonhosted.org/packages/a9/f7/eddfe33871520adab45aaa1a71f0402a2252050c14c7e3009446c8f4701c/python_docx-1.2.0.tar.gz" + sha256 "7bc9d7b7d8a69c9c02ca09216118c86552704edc23bac179283f2e38f86220ce" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/sarif --version") + + (testpath/"test.sarif").write <<~EOS + { + "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", + "version": "2.1.0", + "runs": [] + } + EOS + + output = shell_output("#{bin}/sarif summary test.sarif") + assert_match "error: 0\n\nwarning: 0\n\nnote: 0", output + end +end diff --git a/Formula/s/sassc.rb b/Formula/s/sassc.rb new file mode 100644 index 0000000000000..c12b00f42a1aa --- /dev/null +++ b/Formula/s/sassc.rb @@ -0,0 +1,52 @@ +class Sassc < Formula + desc "Wrapper around libsass that helps to create command-line apps" + homepage "https://github.com/sass/sassc" + url "https://github.com/sass/sassc.git", + tag: "3.6.2", + revision: "66f0ef37e7f0ad3a65d2f481eff09d09408f42d0" + license "MIT" + head "https://github.com/sass/sassc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "331445fe56f4536be8c84306ed15216102d9653ad84c90b3ea2dd93d54cfb4e8" + sha256 cellar: :any, arm64_sequoia: "76372bcf1accae3510d1f2cd03f6a10f9a9016221e541e3b356021eaa5af18be" + sha256 cellar: :any, arm64_sonoma: "5f840fc12c44dabbade2ec934710c03adbcfa33f1b62903542dd03f169171f52" + sha256 cellar: :any, arm64_ventura: "9302f8cb296175ea2f685b1b688753f4a0e66243c53f2249586ede9576bf86b6" + sha256 cellar: :any, arm64_monterey: "f1814e87c905c18e7a39512e02a10ed93b68c81493f5d23e61884d0b3262d529" + sha256 cellar: :any, arm64_big_sur: "ae86a3868be7edf32aadf47abd949d3806789f5edf319c4d86120a05fee9053d" + sha256 cellar: :any, sonoma: "4e667e662081a4741edb5ce0ae92cb909143ca3d3ef817925babe73af3821039" + sha256 cellar: :any, ventura: "1bd79d455cd4dac5f3e335088f760b4971297834d7a5c733c77de5cf747dea5c" + sha256 cellar: :any, monterey: "1dc3c04d8527c5b13983c6e5fa405f6e0af6315bd72e06047e53c6a2c7f1c32c" + sha256 cellar: :any, big_sur: "fe3a719ec1b2b01385924b8cb3bbb758d006ff3dbd75b1c3691ce09a43d1ebcd" + sha256 cellar: :any, catalina: "0826a1c50657da448806febb03694bce523e60ac56e7dd0de7362fe4b41f2277" + sha256 cellar: :any_skip_relocation, arm64_linux: "074f6ea2972c1b7d50f9e3bbbfde7d8ca06d1c2e96474115bc33aca3b64a4cda" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4575b459543c822d40a074f73591b1865790aa8977e7dc12148c10c858d55203" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libsass" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"input.scss").write <<~EOS + div { + img { + border: 0px; + } + } + EOS + + assert_equal "div img{border:0px}", + shell_output("#{bin}/sassc --style compressed input.scss").strip + end +end diff --git a/Formula/s/savana.rb b/Formula/s/savana.rb new file mode 100644 index 0000000000000..57cc7c4992102 --- /dev/null +++ b/Formula/s/savana.rb @@ -0,0 +1,34 @@ +class Savana < Formula + desc "Transactional workspaces for SVN" + homepage "https://github.com/codehaus/savana" + url "https://search.maven.org/remotecontent?filepath=org/codehaus/savana/1.2/savana-1.2-install.tar.gz" + sha256 "608242a0399be44f41ff324d40e82104b3c62908bc35177f433dcfc5b0c9bf55" + license "LGPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "def842802d985d741c12f61a00788780ada018db5837b585f2c58540109339e2" + end + + depends_on "openjdk" + + def install + # Remove Windows files + rm_r(Dir["bin/*.{bat,cmd}"]) + + prefix.install %w[COPYING COPYING.LESSER licenses svn-hooks] + + # lib/* and logging.properties are loaded relative to bin + prefix.install "bin" + libexec.install %w[lib logging.properties] + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + + bash_completion.install "etc/bash_completion" => "sav" + end + + test do + system bin/"sav", "help" + end +end diff --git a/Formula/s/saxon-b.rb b/Formula/s/saxon-b.rb new file mode 100644 index 0000000000000..35308c7b01a53 --- /dev/null +++ b/Formula/s/saxon-b.rb @@ -0,0 +1,30 @@ +class SaxonB < Formula + desc "XSLT and XQuery processor" + homepage "https://saxon.sourceforge.net/" + url "https://downloads.sourceforge.net/project/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip" + version "9.1.0.8" + sha256 "92bcdc4a0680c7866fe5828adb92c714cfe88dcf3fa0caf5bf638fcc6d9369b4" + # The `cannot_represent` is for an older (2007) variation of Unicode-DFS-2015 (see notices/UNICODE.txt for details) + license all_of: ["MPL-1.0", "MPL-1.1", "Apache-2.0", "BSD-3-Clause", "HPND-sell-variant", "X11", :cannot_represent] + + # Saxon-B was replaced by Saxon-HE (`saxon` formula) in version 9.2. + # New maintenance releases are no longer available on SourceForge. + # + # Ref: https://www.saxonica.com/html/documentation12/changes/v9.2/installation.html + # Ref: https://www.saxonica.com/download/information.xml#earlier + # Ref: https://github.com/Saxonica/Saxon-Archive + # Ref: https://github.com/Homebrew/legacy-homebrew/pull/10634 + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "689001c5df91d0cf80e9ea2d72a5a8ae88abb45142dd47bf9797728d215d2139" + end + + def install + (buildpath/"saxon-b").install Dir["*.jar", "doc", "notices"] + share.install Dir["*"] + end +end diff --git a/Formula/s/saxon.rb b/Formula/s/saxon.rb new file mode 100644 index 0000000000000..6d401d0109f65 --- /dev/null +++ b/Formula/s/saxon.rb @@ -0,0 +1,72 @@ +class Saxon < Formula + desc "XSLT and XQuery processor" + homepage "https://github.com/Saxonica/Saxon-HE" + url "https://github.com/Saxonica/Saxon-HE/releases/download/SaxonHE12-9/SaxonHE12-9J.zip" + version "12.9" + sha256 "f2895bef3794112c650a158be27c39a86e88c1717ebb8e0e88067d1f07635d12" + license all_of: ["BSD-3-Clause", "MIT", "MPL-2.0"] + + livecheck do + url :stable + regex(/^SaxonHE[._-]?v?(\d+(?:[.-]\d+)+)$/i) + strategy :github_latest do |json, regex| + match = json["tag_name"]&.match(regex) + next if match.blank? + + match[1]&.tr("-", ".") + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, all: "694718b25706ab34c48a5b3916841c3f45c391f4202e6b4c15d30ed486e46974" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*.jar", "doc", "lib", "notices"] + bin.write_jar_script libexec/"saxon-he-#{version.major_minor}.jar", "saxon" + (bin/"gizmo").write <<~EOS + #!/bin/bash + export JAVA_HOME="#{Language::Java.overridable_java_home_env("11+")[:JAVA_HOME]}" + exec "${JAVA_HOME}/bin/java" -cp "#{libexec}/saxon-he-#{version.major_minor}.jar" net.sf.saxon.Gizmo "$@" + EOS + end + + test do + (testpath/"test.xml").write <<~XML + It works! + XML + (testpath/"test.xsl").write <<~XSL + + + + +

    + + +
    +
    + XSL + assert_equal <<~HTML.chop, shell_output("#{bin}/saxon test.xml test.xsl") + + + +

    It works!

    + + + HTML + + (testpath/"test-gizmo.txt").write "show\n" + + # Run the command and capture output + output = shell_output("#{bin}/gizmo -s:test.xml -q:test-gizmo.txt") + + # Split output into lines + lines = output.lines.map(&:chomp) + + assert_equal "It works!", lines[1] + end +end diff --git a/Formula/s/sbcl.rb b/Formula/s/sbcl.rb new file mode 100644 index 0000000000000..6557bcbaad30c --- /dev/null +++ b/Formula/s/sbcl.rb @@ -0,0 +1,69 @@ +class Sbcl < Formula + desc "Steel Bank Common Lisp system" + homepage "https://www.sbcl.org/" + url "https://downloads.sourceforge.net/project/sbcl/sbcl/2.5.10/sbcl-2.5.10-source.tar.bz2" + sha256 "bf5fb49f2a42f36b3e003d2e4d234386addf07d9dd8ca8634656927cc96ce125" + license all_of: [:public_domain, "MIT", "Xerox", "BSD-3-Clause"] + head "https://git.code.sf.net/p/sbcl/sbcl.git", branch: "master" + + livecheck do + url "https://sourceforge.net/projects/sbcl/rss?path=/sbcl" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a9de51314cd86b9bb3bf7d8339971d9f5f1387c9264c5c94f4d1ecadb2cc05b" + sha256 cellar: :any, arm64_sequoia: "fb6b4706b4360c37f7cf0df0d34e3fa3cea2fc93a96a555f9e6b03a16fd5f4a4" + sha256 cellar: :any, arm64_sonoma: "b6d861931d1e49a9621300433929d684a058c142e0dbb869d95b3d99c698a2bd" + sha256 cellar: :any, sonoma: "8ee5350afc079097b99f6babf0e938473e05dff86b436908d13da58747ed3df6" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf3b08b71887bc25597f013c234b817881b4fc426d3e502d0611f3f4aff7159f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d41cd0af071fbdead42078df064c5e33505b3a2bd4cd481bffeb3b4a8edeb64" + end + + depends_on "ecl" => :build + depends_on "zstd" + + def install + # Remove non-ASCII values from environment as they cause build failures + # More information: https://bugs.gentoo.org/show_bug.cgi?id=174702 + ENV.delete_if do |_, value| + ascii_val = value.dup + ascii_val.force_encoding("ASCII-8BIT") if ascii_val.respond_to? :force_encoding + ascii_val =~ /[\x80-\xff]/n + end + + xc_cmdline = "ecl --norc" + + args = [ + "--prefix=#{prefix}", + "--xc-host=#{xc_cmdline}", + "--with-sb-core-compression", + "--with-sb-ldb", + "--with-sb-thread", + ] + + ENV["SBCL_MACOSX_VERSION_MIN"] = MacOS.version.to_s if OS.mac? + system "./make.sh", *args + + ENV["INSTALL_ROOT"] = prefix + system "sh", "install.sh" + + # Install sources + bin.env_script_all_files libexec/"bin", + SBCL_SOURCE_ROOT: pkgshare/"src", + SBCL_HOME: lib/"sbcl" + pkgshare.install %w[contrib src] + (lib/"sbcl/sbclrc").write <<~LISP + (setf (logical-pathname-translations "SYS") + '(("SYS:SRC;**;*.*.*" #p"#{pkgshare}/src/**/*.*") + ("SYS:CONTRIB;**;*.*.*" #p"#{pkgshare}/contrib/**/*.*"))) + LISP + end + + test do + (testpath/"simple.sbcl").write <<~LISP + (write-line (write-to-string (+ 2 2))) + LISP + output = shell_output("#{bin}/sbcl --script #{testpath}/simple.sbcl") + assert_equal "4", output.strip + end +end diff --git a/Formula/s/sbjson.rb b/Formula/s/sbjson.rb new file mode 100644 index 0000000000000..d02b2220ea5b6 --- /dev/null +++ b/Formula/s/sbjson.rb @@ -0,0 +1,57 @@ +class Sbjson < Formula + desc "JSON CLI parser & reformatter based on SBJson v5" + homepage "https://github.com/SBJson/SBJson" + url "https://github.com/SBJson/SBJson/archive/refs/tags/v5.0.3.tar.gz" + sha256 "9a03f6643b42a82300f4aefcfb6baf46cc2c519f1bb7db3028f338d6d1c56f1b" + license "BSD-3-Clause" + head "https://github.com/SBJson/SBJson.git", branch: "trunk" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "454bec6b83f7734cc9b882e1270baedd9f23d798dde872de9ac6ec7c938bafb5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "217c356def1ddd0b9d9bc1d6bc12966315a41e7a10a029b39460b5becfd1521b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a4df626840987db1cc6e63599b28909887644147ecb2c76cff994a9cc2d26cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9198287e6912393936ae4881bc483e6afcce1f9ae9665b561ae4edcbf7ef72e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3fbf857117011107c8e7d3c8e82ab89468abddaa74d29b4696cba6338e89b454" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d3cb04de93bf5460c41623c296b5cd81884379d277afc874a64b0ff1cc34ac6a" + sha256 cellar: :any_skip_relocation, sonoma: "ef69d2867ef68302e06051ba2cb3d9d883a719f60dec7db49ebbfc36d18ef38a" + sha256 cellar: :any_skip_relocation, ventura: "7bd3ad976f084a295edade17403886612453e3b0da624c22a4e1d45496fad5b7" + sha256 cellar: :any_skip_relocation, monterey: "b75a6403eff1226c4e348d9766c20694d43388c9ee9afa00fe4f637ab3dd7a9c" + sha256 cellar: :any_skip_relocation, big_sur: "695ced76533bfe9a4e893ffe22ea58402dbd93bd180e2ca4b4a96004d5c60581" + sha256 cellar: :any_skip_relocation, catalina: "e703b87ff205bfec1cfc09e9c200ebca6be643df15ec99b85c590110a4885fb2" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-project", "SBJson5.xcodeproj", + "-arch", Hardware::CPU.arch, + "-target", "sbjson", + "-configuration", "Release", + "clean", + "build", + "SYMROOT=build" + + bin.install "build/Release/sbjson" + end + + test do + (testpath/"in.json").write <<~JSON + [true,false,"string",42.001e3,[],{}] + JSON + + (testpath/"unwrapped.json").write <<~JSON + true + false + "string" + 42001 + [] + {} + JSON + + assert_equal shell_output("cat unwrapped.json"), + shell_output("#{bin}/sbjson --unwrap-root in.json") + end +end diff --git a/Formula/s/sblim-sfcc.rb b/Formula/s/sblim-sfcc.rb new file mode 100644 index 0000000000000..81b7747119606 --- /dev/null +++ b/Formula/s/sblim-sfcc.rb @@ -0,0 +1,74 @@ +class SblimSfcc < Formula + desc "Project to enhance the manageability of GNU/Linux system" + homepage "https://sourceforge.net/projects/sblim/" + url "https://downloads.sourceforge.net/project/sblim/sblim-sfcc/sblim-sfcc-2.2.8.tar.bz2" + sha256 "1b8f187583bc6c6b0a63aae0165ca37892a2a3bd4bb0682cd76b56268b42c3d6" + license "EPL-1.0" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/sblim-sfcc[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "91850d84d41509e73588a88dcc741a3ab9367c6e84c366689340cd9b66d00bf6" + sha256 cellar: :any, arm64_sequoia: "6f074cbf8dda6d4bcf92790a16addbdb0ee1d0d965574113544580e559515a5b" + sha256 cellar: :any, arm64_sonoma: "d16153e6113f4157639b35994c6c49b302a6583e6c092b252aafa3a3255289a5" + sha256 cellar: :any, arm64_ventura: "c8b172932d29f6725a2b1a87945ae3d5f904fd04ae045b3599e86eeb8bd103b3" + sha256 cellar: :any, arm64_monterey: "0cc8c1e52119cd38c9c9e6f2b08f0083693ae35ab2d40aa8c6352ec21c60909e" + sha256 cellar: :any, arm64_big_sur: "eb4bb2cbbb7ef660b04d031f3634a29f2c4c9b4a4c0259bffe4cbdf87a8efbf5" + sha256 cellar: :any, sonoma: "03982c814ee052c41459385167fb7e112c021f01d73cf9e8b370e650ecc946a5" + sha256 cellar: :any, ventura: "35d98d6f07a235f4aa7e8b2dbbde54370bbb11143bf1bb4c06f326b624b74ccc" + sha256 cellar: :any, monterey: "368b654d4d5deee68646887d8946c78a5e3d7f7dc9022669cc8395f64361a8f0" + sha256 cellar: :any, big_sur: "ab534857fa92d53f614c51b5a23f51986936c7d4156774f6f137c1ecabde2818" + sha256 cellar: :any, catalina: "65ac52dfd7703bc7bb36d61a8458deb2b3efcbbcd9ebac2298d31bae8203ed2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fd23513981b7f2f47c9f8ce8b0d0fd352cb954045f49d060ffd6f581dc715ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c029309cfad2b173fe5b26e004b07b94fd295076a88244f3dbc2030c38a47e0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + if DevelopmentTools.clang_build_version >= 1500 + # Work around "backend/cimxml/grammar.c:305:9: error: call to undeclared function 'guessType'" + # Ref: https://sourceforge.net/p/sblim/bugs/2767/ + ENV.append_to_cflags "-Wno-implicit-function-declaration" + # Work around "ld: unknown file type in '.../cimc/libcimcclient.Versions'" + ENV.append "LDFLAGS", "-Wl,-ld_classic" + end + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lcimcclient", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sbom-tool.rb b/Formula/s/sbom-tool.rb new file mode 100644 index 0000000000000..f725ccaafc7bd --- /dev/null +++ b/Formula/s/sbom-tool.rb @@ -0,0 +1,67 @@ +class SbomTool < Formula + desc "Scalable and enterprise ready tool to create SBOMs for any variety of artifacts" + homepage "https://github.com/microsoft/sbom-tool" + url "https://github.com/microsoft/sbom-tool/archive/refs/tags/v4.1.2.tar.gz" + sha256 "a7ae3295985137b77b13c319bcefad2f750e463d1cde923de0b5df2836eb1176" + license "MIT" + head "https://github.com/microsoft/sbom-tool.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "83dcd5a909957731cd9bde9ba8f788981c4e43191ef54f03bde77ffdfbed52b0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e412a968ace9952722dfd95967747ac7c6340d805281640531ca983630004436" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97392a4bf201f45079ff8432f95c39dd9adfc8ab6a73e5628ea50fa1462ae96d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f14c529659725982742b81df22864588b73dec8850eda55a8979ec4a23f7d62f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbc9d96dc0e6b289dbf36865178bb4895a455a95885efd7b784bb7688935d755" + end + + depends_on "dotnet@8" + + uses_from_macos "zlib" + + def install + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "true" + + dotnet = Formula["dotnet@8"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --no-self-contained + --output #{libexec} + --use-current-runtime + -p:OFFICIAL_BUILD=true + -p:MinVerVersionOverride=#{version} + -p:PublishSingleFile=true + -p:IncludeNativeLibrariesForSelfExtract=true + -p:IncludeAllContentForSelfExtract=true + -p:DebugType=None + -p:DebugSymbols=false + ] + + system "dotnet", "publish", "src/Microsoft.Sbom.Tool/Microsoft.Sbom.Tool.csproj", *args + (bin/"sbom-tool").write_env_script libexec/"Microsoft.Sbom.Tool", DOTNET_ROOT: dotnet.opt_libexec + end + + test do + args = %W[ + -b #{testpath} + -bc #{testpath} + -pn TestProject + -pv 1.2.3 + -ps Homebrew + -nsb https://formulae.brew.sh + ] + + system bin/"sbom-tool", "generate", *args + + json = JSON.parse((testpath/"_manifest/spdx_2.2/manifest.spdx.json").read) + assert_equal json["name"], "TestProject 1.2.3" + end +end diff --git a/Formula/s/sbt.rb b/Formula/s/sbt.rb new file mode 100644 index 0000000000000..c618e22d21350 --- /dev/null +++ b/Formula/s/sbt.rb @@ -0,0 +1,54 @@ +class Sbt < Formula + desc "Build tool for Scala projects" + homepage "https://www.scala-sbt.org/" + url "https://github.com/sbt/sbt/releases/download/v1.11.7/sbt-1.11.7.tgz" + mirror "https://sbt-downloads.cdnedge.bluemix.net/releases/v1.11.7/sbt-1.11.7.tgz" + sha256 "1232818f91c39639a93bbe1108e12d94c7044a646a7847f1a3977b9e46716cd6" + license "Apache-2.0" + + # Upstream sometimes creates releases that use a stable tag (e.g., `v1.2.3`) + # but are labeled as "pre-release" on GitHub. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "d8f87dd142aac9e1c3f6c68750fff489fab4d436ac00d5e09c8569fc5f88bca1" + end + + depends_on "openjdk" + + def install + inreplace "bin/sbt" do |s| + s.gsub! 'etc_sbt_opts_file="/etc/sbt/sbtopts"', "etc_sbt_opts_file=\"#{etc}/sbtopts\"" + s.gsub! "/etc/sbt/sbtopts", "#{etc}/sbtopts" + end + + libexec.install "bin" + etc.install "conf/sbtopts" + + # Removes: + # 1. `sbt.bat` (Windows-only) + # 2. `sbtn` (pre-compiled native binary) + # 3. `sbtn-universal-apple-darwin` (universal binary) + (libexec/"bin").glob("sbt{.bat,n-x86_64*,n-aarch64*,n-universal-apple-darwin}").map(&:unlink) + (bin/"sbt").write_env_script libexec/"bin/sbt", Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + You can use $SBT_OPTS to pass additional JVM options to sbt. + Project specific options should be placed in .sbtopts in the root of your project. + Global settings should be placed in #{etc}/sbtopts + + The installation does not include `sbtn`. + EOS + end + + test do + ENV.append "_JAVA_OPTIONS", "-Dsbt.log.noformat=true" + system bin/"sbt", "--sbt-create", "about" + assert_match version.to_s, shell_output("#{bin}/sbt sbtVersion --allow-empty") + end +end diff --git a/Formula/s/sbtenv.rb b/Formula/s/sbtenv.rb new file mode 100644 index 0000000000000..569dfc4c27688 --- /dev/null +++ b/Formula/s/sbtenv.rb @@ -0,0 +1,40 @@ +class Sbtenv < Formula + desc "Command-line tool for managing sbt environments" + homepage "https://github.com/sbtenv/sbtenv" + url "https://github.com/sbtenv/sbtenv/archive/refs/tags/version/0.0.24.tar.gz" + sha256 "f483769e5467c718c9de72baa4eb3c679315e4f4a9ac02bb636996a63c28e3d5" + license "MIT" + head "https://github.com/sbtenv/sbtenv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "6e5520ead3c64eb3f68e1bbc7e54ee271aaf36b1bc2b442b9514269df90a7047" + end + + def install + inreplace "libexec/sbtenv", "/usr/local", HOMEBREW_PREFIX + prefix.install "bin", "completions", "libexec" + prefix.install "plugins" => "default-plugins" + + %w[sbtenv-install].each do |cmd| + bin.install_symlink "#{prefix}/default-plugins/sbt-install/bin/#{cmd}" + end + end + + def post_install + var_lib = HOMEBREW_PREFIX/"var/lib/sbtenv" + %w[plugins versions].each do |dir| + var_dir = "#{var_lib}/#{dir}" + mkdir_p var_dir + ln_sf var_dir, "#{prefix}/#{dir}" + end + + (var_lib/"plugins").install_symlink "#{prefix}/default-plugins/sbt-install" + end + + test do + shell_output("eval \"$(#{bin}/sbtenv init -)\" && sbtenv versions") + end +end diff --git a/Formula/s/sbuild.rb b/Formula/s/sbuild.rb new file mode 100644 index 0000000000000..64949b5ac24b7 --- /dev/null +++ b/Formula/s/sbuild.rb @@ -0,0 +1,54 @@ +class Sbuild < Formula + desc "Scala-based build system" + homepage "http://sbuild.org/" + url "http://sbuild.org/uploads/sbuild/0.7.7/sbuild-0.7.7-dist.zip" + mirror "https://github.com/SBuild-org/SBuild-org.github.io/raw/master/uploads/sbuild/0.7.7/sbuild-0.7.7-dist.zip" + sha256 "606bc09603707f31d9ca5bc306ba01b171f8400e643261acd28da7a1a24dfb23" + license "Apache-2.0" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?sbuild[._-]v?(\d+(?:\.\d+)+)(?:[._-]dist)?\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "0a8af36def5cab55a8a4ed2a793572ec0f0f9f5afe15681f3b6bef38d571a389" + end + + depends_on "openjdk" + + def install + # Delete unsupported VM option 'MaxPermSize', which is unrecognized in Java 17 + # Remove this line once upstream removes it from bin/sbuild + inreplace "bin/sbuild", /-XX:MaxPermSize=[^ ]*/, "" + + libexec.install Dir["*"] + chmod 0755, libexec/"bin/sbuild" + (bin/"sbuild").write_env_script libexec/"bin/sbuild", Language::Java.overridable_java_home_env + end + + test do + expected = <<~SCALA + import de.tototec.sbuild._ + + @version("#{version}") + class SBuild(implicit _project: Project) { + + Target("phony:clean") exec { + Path("target").deleteRecursive + } + + Target("phony:hello") help "Greet me" exec { + println("Hello you") + } + + } + SCALA + system bin/"sbuild", "--create-stub" + assert_equal expected, (testpath/"SBuild.scala").read + end +end diff --git a/Formula/s/sby.rb b/Formula/s/sby.rb new file mode 100644 index 0000000000000..2cdfadbc50e69 --- /dev/null +++ b/Formula/s/sby.rb @@ -0,0 +1,73 @@ +class Sby < Formula + include Language::Python::Virtualenv + include Language::Python::Shebang + + desc "Front-end for Yosys-based formal verification flows" + homepage "https://symbiyosys.readthedocs.io/en/latest/" + url "https://github.com/YosysHQ/sby/archive/refs/tags/v0.58.tar.gz" + sha256 "c3436712b2922a0698aa735f94fd0ea6dc4df3a3f31fcc2003eea15d68c55475" + license "ISC" + head "https://github.com/YosysHQ/sby.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8dd5d6bd0ab2d9c3ac030dca982a6243b42aa27a5098ac3c0dd16edbd88889f2" + end + + depends_on "yices2" => :test + depends_on "python@3.14" + depends_on "yosys" + + def install + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install "click" + + system "make", "install", "PREFIX=#{prefix}" + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), bin/"sby" + + # Build an `:all` bottle + return unless OS.mac? + + inreplace bin/"sby", + "release_version = 'SBY '", + "release_version = 'SBY v#{version}'" + end + + test do + (testpath/"cover.sby").write <<~EOF + [options] + mode cover + + [engines] + smtbmc + + [script] + read -formal cover.sv + prep -top top + + [files] + cover.sv + EOF + (testpath/"cover.sv").write <<~EOF + module top ( + input clk, + input [7:0] din + ); + + reg [31:0] state = 0; + + always @(posedge clk) begin + state <= ((state << 5) + state) ^ din; + end + + `ifdef FORMAL + always @(posedge clk) begin + cover (state == 'd 12345678); + cover (state == 'h 12345678); + end + `endif + endmodule + EOF + assert_match "DONE (PASS, rc=0)", shell_output("#{bin}/sby -f #{testpath}/cover.sby") + end +end diff --git a/Formula/s/sc-im.rb b/Formula/s/sc-im.rb new file mode 100644 index 0000000000000..d6e0bc380ccb1 --- /dev/null +++ b/Formula/s/sc-im.rb @@ -0,0 +1,65 @@ +class ScIm < Formula + desc "Spreadsheet program for the terminal, using ncurses" + homepage "https://github.com/andmarti1424/sc-im" + url "https://github.com/andmarti1424/sc-im/archive/refs/tags/v0.8.5.tar.gz" + sha256 "49adb76fc55bc3e6ea8ee414f41428db4aef947e247718d9210be8d14a6524bd" + license "BSD-4-Clause" + revision 1 + head "https://github.com/andmarti1424/sc-im.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "a2b5b38335d0f462386b21ffad6957d9ce33ccde9ad6121b05b0a3537a007cde" + sha256 arm64_sequoia: "7aba3a846b8467a016703a76d89d74adbc8dff5bf280bf2efdb74b606a3e9af3" + sha256 arm64_sonoma: "ae3adeb54d88c80a5145201b65ecf2636275d50eabb26e7e0ef6ef1549b71deb" + sha256 arm64_ventura: "0c6b9e49eda65b7a772058a20a4db0706ee234f322f75b07eb8ca83d739c85a2" + sha256 sonoma: "3aba21c49aa83ab69c8357bfdb4c9d9e789bbbb0bc3a2cf019518f3ab5f37ebb" + sha256 ventura: "04b84b09e7caaff2ff0d41e673d1f061e465a9f2487e40819022d8975b9a160c" + sha256 arm64_linux: "2591a8c40e0ca1f1e2e44ceed406531af4a641fc05d8d4950f21481e874b51c0" + sha256 x86_64_linux: "a4d52f559c04305dcaeea5b9183df4a3dfd3b7175fc86e3222428693d704c72e" + end + + depends_on "pkgconf" => :build + depends_on "libxls" + depends_on "libxlsxwriter" + depends_on "libxml2" + depends_on "libzip" + depends_on "lua" + depends_on "ncurses" + + uses_from_macos "bison" => :build + + def install + # Workaround for Xcode 14.3 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Enable plotting with `gnuplot` if available. + ENV.append_to_cflags "-DGNUPLOT" + + cd "src" do + inreplace "Makefile" do |s| + # Increase `MAXROWS` to the maximum possible value. + # This is the same limit that Microsoft Excel has. + s.gsub! "MAXROWS=65536", "MAXROWS=1048576" + if OS.mac? + # Use `pbcopy` and `pbpaste` as the default clipboard commands. + s.gsub!(/^CFLAGS.*(xclip|tmux).*/, "#\\0") + s.gsub!(/^#(CFLAGS.*pb(copy|paste).*)$/, "\\1") + end + end + system "make", "prefix=#{prefix}" + system "make", "prefix=#{prefix}", "install" + end + end + + test do + input = <<~EOS + let A1=1+1 + recalc + getnum A1 + EOS + output = pipe_output( + "#{bin}/sc-im --nocurses --quit_afterload 2>/dev/null", input + ) + assert_equal "2", output.lines.last.chomp + end +end diff --git a/Formula/s/sc68.rb b/Formula/s/sc68.rb new file mode 100644 index 0000000000000..c22486b8f83ac --- /dev/null +++ b/Formula/s/sc68.rb @@ -0,0 +1,68 @@ +class Sc68 < Formula + desc "Play music originally designed for Atari ST and Amiga computers" + homepage "https://sc68.atari.org/project.html" + url "https://downloads.sourceforge.net/project/sc68/sc68/2.2.1/sc68-2.2.1.tar.gz" + sha256 "d7371f0f406dc925debf50f64df1f0700e1d29a8502bb170883fc41cc733265f" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/sc68[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4bd1deeac4b3f633c76cc844a611217c4bd96ed9a9e1ae2376cd280f0a11842c" + sha256 arm64_sequoia: "530da22ced84ec1181ddf6887028d6a4e9fa955446a492c039e5c807d6f2ec82" + sha256 arm64_sonoma: "f6c0c19ce245cb76ed53a1e9d017eb6b598ac1834f5c7ff215978147498be18e" + sha256 arm64_ventura: "f30cf9999c9d98d9e0c2ecee6b0af0f5f550391ecfbfa51d8f5139dce0aaa0c6" + sha256 arm64_monterey: "f0f1ad019d6ae62b500fe9395c6e2cc9fe902532c13a2ffef0001763da251433" + sha256 arm64_big_sur: "88997849149a628f35a9e44e3abe898c7db9458a796cc61275abfd26923de1bd" + sha256 sonoma: "62a7348263be1d268e4682a2690354bf954d5ae71c3d702c6f50b7740ad502f1" + sha256 ventura: "f167bb16c498a40a89d35c12447acd1e25ea7a5581b8de6acd483a7384ac41c1" + sha256 monterey: "958f47e1b57574ba4ea608fa26a50af67feef92bba51d7e9b598ef0567fb4feb" + sha256 big_sur: "d5ac6383a3b1f82707b9a981ca02ce6dee57cdc096adb16dbf044ef5c5a051c9" + sha256 catalina: "1d06595617862cdb67d49f8bc8389e7e6cb4bd6f6ac81adf20969c68bbe80434" + sha256 arm64_linux: "ce25e34fecfd668e1f6fa0ef0d924b96df389c43c5428e386b54a5411c7f0d24" + sha256 x86_64_linux: "1876d7c98fac9c5a36824c13141354e0cbce33508f155741d8430182d7fd6104" + end + + head do + url "https://svn.code.sf.net/p/sc68/code/" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + end + + uses_from_macos "zlib" + + on_linux do + depends_on "readline" + end + + def install + if build.head? + system "tools/svn-bootstrap.sh" + else + inreplace "configure", "-flat_namespace -undefined suppress", "-undefined dynamic_lookup" + # Workaround for newer Clang + odie "Try to remove workaround for Xcode 16 Clang!" if version > "2.2.1" + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + end + + args = ["--mandir=#{man}", "--infodir=#{info}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # SC68 ships with a sample module; test attempts to print its metadata + system bin/"info68", pkgshare/"Sample/About-Intro.sc68", "-C", ": ", "-N", "-L" + end +end diff --git a/Formula/s/scala.rb b/Formula/s/scala.rb new file mode 100644 index 0000000000000..6b259a7c2b48f --- /dev/null +++ b/Formula/s/scala.rb @@ -0,0 +1,55 @@ +class Scala < Formula + desc "JVM-based programming language" + homepage "https://dotty.epfl.ch/" + url "https://github.com/scala/scala3/releases/download/3.7.3/scala3-3.7.3.tar.gz" + sha256 "2a62200ce5f84ed8a81af703274fac1b1abe7c5aa528cfe164d05bd10fbb67c0" + license "Apache-2.0" + + livecheck do + url "https://www.scala-lang.org/download/" + regex(%r{href=.*?download/v?(\d+(?:\.\d+)+)\.html}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "803af22fb6fc46d5a97ec5a7dc64f72a8eb46b70c7e8f2a482f0a4f9dcf3d01e" + end + + # JDK Compatibility: https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html + depends_on "openjdk" + + conflicts_with "pwntools", because: "both install `common` binaries" + + def install + rm Dir["bin/*.bat"] + + libexec.install "lib", "maven2", "VERSION", "libexec" + prefix.install "bin" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + + # Set up an IntelliJ compatible symlink farm in 'idea' + idea = prefix/"idea" + idea.install_symlink libexec/"lib" + end + + def caveats + <<~EOS + To use with IntelliJ, set the Scala home to: + #{opt_prefix}/idea + EOS + end + + test do + file = testpath/"Test.scala" + file.write <<~SCALA + object Test { + def main(args: Array[String]): Unit = { + println(s"${2 + 2}") + } + } + SCALA + + out = shell_output("#{bin}/scala #{file}").strip + + assert_equal "4", out + end +end diff --git a/Formula/s/scala@2.12.rb b/Formula/s/scala@2.12.rb new file mode 100644 index 0000000000000..e59387296dd9f --- /dev/null +++ b/Formula/s/scala@2.12.rb @@ -0,0 +1,60 @@ +class ScalaAT212 < Formula + desc "JVM-based programming language" + homepage "https://www.scala-lang.org/" + url "https://downloads.lightbend.com/scala/2.12.20/scala-2.12.20.tgz" + mirror "https://www.scala-lang.org/files/archive/scala-2.12.20.tgz" + mirror "https://downloads.typesafe.com/scala/2.12.20/scala-2.12.20.tgz" + sha256 "cc29d91ad390dc8e9a68d1e2ec6892711b64116f549fecd67a928361d33a39c0" + license "Apache-2.0" + + livecheck do + url "https://www.scala-lang.org/files/archive/" + regex(/href=.*?scala[._-]v?(2\.12(?:\.\d+)+)(?:[._-]final)?\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c21bd2462426fdcdea41f7f960376c275dc101b2b32e7534647a2c3141081125" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + inreplace Dir["man/man1/scala{,c}.1"], "/usr/local", HOMEBREW_PREFIX + + rm(Dir["bin/*.bat"]) + doc.install Dir["doc/*"] + share.install "man" + libexec.install "bin", "lib" + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + + # Set up an IntelliJ compatible symlink farm in 'idea' + idea = prefix/"idea" + idea.install_symlink libexec/"src", libexec/"lib" + idea.install_symlink doc => "doc" + end + + def caveats + <<~EOS + To use with IntelliJ, set the Scala home to: + #{opt_prefix}/idea + EOS + end + + test do + file = testpath/"Test.scala" + file.write <<~SCALA + object Test { + def main(args: Array[String]) { + println(s"${2 + 2}") + } + } + SCALA + + out = shell_output("#{bin}/scala -nc #{file}").strip + + assert_equal "4", out + end +end diff --git a/Formula/s/scala@2.13.rb b/Formula/s/scala@2.13.rb new file mode 100644 index 0000000000000..d2c832a48d3ea --- /dev/null +++ b/Formula/s/scala@2.13.rb @@ -0,0 +1,57 @@ +class ScalaAT213 < Formula + desc "JVM-based programming language" + homepage "https://www.scala-lang.org/" + url "https://github.com/scala/scala/releases/download/v2.13.17/scala-2.13.17.tgz" + mirror "https://www.scala-lang.org/files/archive/scala-2.13.17.tgz" + sha256 "ada6b8deb341875838cced8d32070c63f96f77a833033f4ca5e30fe2ee6a171b" + license "Apache-2.0" + + livecheck do + url "https://www.scala-lang.org/download/" + regex(%r{href=.*?download/v?(2\.13(?:\.\d+)+)\.html}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "5136f0cc95709dfc93618b1dd2e64b91a7054c8dc8c12d8a1c4414877fc66ff5" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + rm Dir["bin/*.bat"] + doc.install (buildpath/"doc").children + share.install "man" + libexec.install "lib" + prefix.install "bin" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + + # Set up an IntelliJ compatible symlink farm in 'idea' + idea = prefix/"idea" + idea.install_symlink libexec/"lib" + idea.install_symlink doc => "doc" + end + + def caveats + <<~EOS + To use with IntelliJ, set the Scala home to: + #{opt_prefix}/idea + EOS + end + + test do + file = testpath/"Test.scala" + file.write <<~SCALA + object Test { + def main(args: Array[String]): Unit = { + println(s"${2 + 2}") + } + } + SCALA + + out = shell_output("#{bin}/scala #{file}").strip + + assert_equal "4", out + end +end diff --git a/Formula/s/scala@3.3.rb b/Formula/s/scala@3.3.rb new file mode 100644 index 0000000000000..f8ed105278567 --- /dev/null +++ b/Formula/s/scala@3.3.rb @@ -0,0 +1,53 @@ +class ScalaAT33 < Formula + desc "JVM-based programming language" + homepage "https://www.scala-lang.org/" + url "https://github.com/scala/scala3/releases/download/3.3.6/scala3-3.3.6.tar.gz" + sha256 "7267524240ee289976fed1b8bc08c0045d5d290d3faee07c6b7137a4252b5b97" + license "Apache-2.0" + + livecheck do + url "https://www.scala-lang.org/download/" + regex(%r{href=.*?download/v?(3\.3(?:\.\d+)+)\.html}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c6ef17066454d96317b625b45b1dd2c61423f9a9f598469e157261f77e3f6c26" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + rm Dir["bin/*.bat"] + libexec.install "lib" + prefix.install "bin" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + + # Set up an IntelliJ compatible symlink farm in 'idea' + idea = prefix/"idea" + idea.install_symlink libexec/"lib" + end + + def caveats + <<~EOS + To use with IntelliJ, set the Scala home to: + #{opt_prefix}/idea + EOS + end + + test do + file = testpath/"Test.scala" + file.write <<~SCALA + object Test { + def main(args: Array[String]): Unit = { + println(s"${2 + 2}") + } + } + SCALA + + out = shell_output("#{bin}/scala #{file}").strip + + assert_equal "4", out + end +end diff --git a/Formula/s/scalaenv.rb b/Formula/s/scalaenv.rb new file mode 100644 index 0000000000000..5ee47bc2a1b85 --- /dev/null +++ b/Formula/s/scalaenv.rb @@ -0,0 +1,40 @@ +class Scalaenv < Formula + desc "Command-line tool to manage Scala environments" + homepage "https://github.com/scalaenv/scalaenv" + url "https://github.com/scalaenv/scalaenv/archive/refs/tags/version/0.1.14.tar.gz" + sha256 "82adc5edd81f1914fae321deea36123bc4d3a255e47afa857cbd8b093903530c" + license "MIT" + head "https://github.com/scalaenv/scalaenv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9587d95fe717240f70b2d0b7b1b90e17084bb635196e38e6bfc35be17a7cc7e3" + end + + def install + inreplace "libexec/scalaenv", "/usr/local", HOMEBREW_PREFIX + prefix.install "bin", "completions", "libexec" + prefix.install "plugins" => "default-plugins" + + %w[scalaenv-install scalaenv-uninstall scala-build].each do |cmd| + bin.install_symlink "#{prefix}/default-plugins/scala-install/bin/#{cmd}" + end + end + + def post_install + var_lib = HOMEBREW_PREFIX/"var/lib/scalaenv" + %w[plugins versions].each do |dir| + var_dir = "#{var_lib}/#{dir}" + mkdir_p var_dir + ln_sf var_dir, "#{prefix}/#{dir}" + end + + (var_lib/"plugins").install_symlink "#{prefix}/default-plugins/scala-install" + end + + test do + shell_output("eval \"$(#{bin}/scalaenv init -)\" && scalaenv versions") + end +end diff --git a/Formula/s/scalapack.rb b/Formula/s/scalapack.rb new file mode 100644 index 0000000000000..9eb64c50961b6 --- /dev/null +++ b/Formula/s/scalapack.rb @@ -0,0 +1,64 @@ +class Scalapack < Formula + desc "High-performance linear algebra for distributed memory machines" + homepage "https://netlib.org/scalapack/" + license "BSD-3-Clause" + head "https://github.com/Reference-ScaLAPACK/scalapack.git", branch: "master" + + stable do + url "https://github.com/Reference-ScaLAPACK/scalapack/archive/refs/tags/v2.2.2.tar.gz" + sha256 "a2f0c9180a210bf7ffe126c9cb81099cf337da1a7120ddb4cbe4894eb7b7d022" + + # Backport commit for correct version number + patch do + url "https://github.com/Reference-ScaLAPACK/scalapack/commit/a23c2cdc6586c427686f6097ae66bb54ef693571.patch?full_index=1" + sha256 "1a2c187595234c4c15007c4b1b847337a94c0a55bd807165743404942e6c5634" + end + + # Backport support for CMake 4 + patch do + url "https://github.com/Reference-ScaLAPACK/scalapack/commit/41ac62c28fab33cd9ccc1b010c9c215b5f05201b.patch?full_index=1" + sha256 "930429e8fb118e58955a56f5f6bb82e797927cb31a83a8bb0190b7324f2d26f5" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "95c2d6bfcad2cde73d0fab3e497efca73490469397f2c4e7961e7e2a34c76168" + sha256 cellar: :any, arm64_sequoia: "dc18849ba919f1b668d9367aa6b3c33de0c5da835880a6cff52a0cec5e959480" + sha256 cellar: :any, arm64_sonoma: "04781e79d6a399a6b78be71b07b4f1ff77c52763637607b3784d9eed0a9d5871" + sha256 cellar: :any, arm64_ventura: "cab596587baa484ed8304b5075f192dbbb867ea1794583937812d2e8b08f43e9" + sha256 cellar: :any, sonoma: "08ed075c53763c8c8bab09b40dcf7e20eb4931e4191d67d295587f7caacacbb5" + sha256 cellar: :any, ventura: "fed1f3d1a4eeca5c906e7c1bd84859631518e3901943fc5abce91823b8efdf91" + sha256 cellar: :any_skip_relocation, arm64_linux: "72cefa05bf73039be8175869dd4d87edfd0fdd5b1c88d83e11b8e03fb77affdf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ce59c95648217335fa463f14c0e3d2f87581f66ad82bdc5c0c60bda88b00048" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "open-mpi" + depends_on "openblas" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + blas = "-L#{Formula["openblas"].opt_lib} -lopenblas" + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DBLAS_LIBRARIES=#{blas}", + "-DLAPACK_LIBRARIES=#{blas}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "EXAMPLE" + end + + test do + cp_r (pkgshare/"EXAMPLE").children, testpath + + %w[psscaex pdscaex pcscaex pzscaex].each do |name| + system "mpif90", "#{name}.f", "pdscaexinfo.f", "-L#{opt_lib}", "-lscalapack", "-o", name + assert_match(/INFO code returned by .* 0/, shell_output("mpirun --map-by :OVERSUBSCRIBE -np 4 ./#{name}")) + end + end +end diff --git a/Formula/s/scalariform.rb b/Formula/s/scalariform.rb new file mode 100644 index 0000000000000..98563763db12d --- /dev/null +++ b/Formula/s/scalariform.rb @@ -0,0 +1,55 @@ +class Scalariform < Formula + desc "Scala source code formatter" + homepage "https://github.com/scala-ide/scalariform" + url "https://github.com/scala-ide/scalariform/releases/download/0.2.10/scalariform.jar" + sha256 "59d7c26f26c13bdbc27e3011da244f01001d55741058062f49e4626862b7991e" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "57e890f720dfb6cb481d8ea3898b8d4706a33bfe02a6f71a8db118b7cb918e16" + end + + head do + url "https://github.com/scala-ide/scalariform.git", branch: "master" + depends_on "sbt" => :build + end + + depends_on "openjdk" + + def install + if build.head? + system "sbt", "project cli", "assembly" + libexec.install Dir["cli/target/scala-*/cli-assembly-*.jar"] + bin.write_jar_script Dir[libexec/"cli-assembly-*.jar"][0], "scalariform" + else + libexec.install "scalariform.jar" + bin.write_jar_script libexec/"scalariform.jar", "scalariform" + end + end + + test do + before_data = <<~SCALA + def foo() { + println("Hello World") + } + SCALA + + after_data = <<~SCALA + def foo() { + println("Hello World") + } + SCALA + + (testpath/"foo.scala").write before_data + system bin/"scalariform", "-indentSpaces=3", testpath/"foo.scala" + assert_equal after_data, (testpath/"foo.scala").read + end +end diff --git a/Formula/s/scalastyle.rb b/Formula/s/scalastyle.rb new file mode 100644 index 0000000000000..0114c25bf2468 --- /dev/null +++ b/Formula/s/scalastyle.rb @@ -0,0 +1,45 @@ +class Scalastyle < Formula + desc "Run scalastyle from the command-line" + homepage "http://www.scalastyle.org/command-line.html" + url "https://oss.sonatype.org/content/repositories/releases/org/scalastyle/scalastyle_2.12/1.0.0/scalastyle_2.12-1.0.0-batch.jar" + sha256 "e9dafd97be0d00f28c1e8bfcab951d0e5172b262a1d41da31d1fd65d615aedcb" + license "Apache-2.0" + + # In a filename like `scalastyle_2.12-1.0.0-batch.jar`, the first version is + # the Scala version (2.12) and the second is the Scalastyle version (1.0.0). + livecheck do + url :homepage + regex(/href=.*?scalastyle[._-]v?\d+(?:\.\d+)+-(\d+(?:\.\d+)+)-batch\.jar/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "1d29d487fbdb5211082bce9fd7b84028b56d4445ab0b0c9c7b8d3bb4d081cdf8" + end + + depends_on "openjdk" + + resource "default_config" do + url "https://raw.githubusercontent.com/scalastyle/scalastyle/v1.0.0/lib/scalastyle_config.xml" + sha256 "6ce156449609a375d973cc8384a17524e4538114f1747efc2295cf4ca473d04e" + end + + def install + libexec.install "scalastyle_2.12-#{version}-batch.jar" + bin.write_jar_script("#{libexec}/scalastyle_2.12-#{version}-batch.jar", "scalastyle") + end + + test do + (testpath/"test.scala").write <<~SCALA + object HelloWorld { + def main(args: Array[String]) { + println("Hello") + } + } + SCALA + testpath.install resource("default_config") + system bin/"scalastyle", "--config", "scalastyle_config.xml", testpath/"test.scala" + end +end diff --git a/Formula/s/scale2x.rb b/Formula/s/scale2x.rb new file mode 100644 index 0000000000000..5a06d721ac132 --- /dev/null +++ b/Formula/s/scale2x.rb @@ -0,0 +1,32 @@ +class Scale2x < Formula + desc "Real-time graphics effect" + homepage "https://www.scale2x.it/" + url "https://github.com/amadvance/scale2x/releases/download/v4.0/scale2x-4.0.tar.gz" + sha256 "996f2673206c73fb57f0f5d0e094d3774f595f7e7e80fcca8cc045e8b4ba6d32" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fa827e146d2d3caae2e059081469d5a6e95c275692c515fe591e7a1c8ad3bb01" + sha256 cellar: :any, arm64_sequoia: "15f0e0d3d8c68339cfd69eacf4c0fe5ae65ddb27e69ce289df33875c730b4559" + sha256 cellar: :any, arm64_sonoma: "74863678d188209041dd4746830686ec7a93f2acf7dc492d647ca8f3d23802fd" + sha256 cellar: :any, arm64_ventura: "bff379927979a35d8106edb039f4654afee5c4d973fd26a2b1f6d6a6979540ed" + sha256 cellar: :any, arm64_monterey: "fdc15180cc28f6677f0a14647292744970707eb9e0302bbc95ec65f902f935ce" + sha256 cellar: :any, arm64_big_sur: "f7d4ecfe86027e9aec4928c84ba6262e7f8633796ed3317da93a2d8b2e1a5b58" + sha256 cellar: :any, sonoma: "4624fcd2273c59bcd3fd3fe1f7de3daa02e5ff3a5b6bc43b0de3362e5519c429" + sha256 cellar: :any, ventura: "ec4ecdb490fb74e96b3192a475d2c0069d075af72cd24a8ae7dd93dd6546d168" + sha256 cellar: :any, monterey: "8a91f909eb5e0d332c7718e47a59fd45dc74625d3828049a2819a55f24226f6d" + sha256 cellar: :any, big_sur: "9ba9679c817187ca44e3074c102572781ad4e90abb1aa8a41d452e5d6814d046" + sha256 cellar: :any, catalina: "83ab737ffb44b1b2913244a82c63d754057e79034bcf455d75b9150b630f85c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8b10c78d54037bfcf02fbfd70f5c32767c22005efdd14b6f19d9d08cd817ed1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8c30b93ecb6bf66a18c8004a6b56ca9ab4fc074fe4e433439f3bd49ba944005" + end + + depends_on "libpng" + + def install + system "./configure", "--prefix=#{prefix}", "CPPFLAGS=-I/usr/include/malloc/" + system "make", "install" + end +end diff --git a/Formula/s/scalingo.rb b/Formula/s/scalingo.rb new file mode 100644 index 0000000000000..91c504f0685bc --- /dev/null +++ b/Formula/s/scalingo.rb @@ -0,0 +1,36 @@ +class Scalingo < Formula + desc "CLI for working with Scalingo's PaaS" + homepage "https://doc.scalingo.com/cli" + url "https://github.com/Scalingo/cli/archive/refs/tags/1.40.0.tar.gz" + sha256 "19daf2484601ad2049592c467440a107e6ac6eb7ce1e3599d095455c795bfe1c" + license "BSD-4-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f83f9383a8a16d227934e70082857beaa30a95f91b065b2d76dbcbd93cc27d01" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f83f9383a8a16d227934e70082857beaa30a95f91b065b2d76dbcbd93cc27d01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f83f9383a8a16d227934e70082857beaa30a95f91b065b2d76dbcbd93cc27d01" + sha256 cellar: :any_skip_relocation, sonoma: "5f15ad77581726dad0eb88360cf25c8157128817237e846180279f65e94ff93f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fee294df1110702d950c640f4d031b456167c7418905e143867ca8e210142fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e41b2ba8b4b37ba56784b7be58d9798c6f721a204c4c7c3b7bb7ec84b5118fe" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "scalingo/main.go" + + bash_completion.install "cmd/autocomplete/scripts/scalingo_complete.bash" => "scalingo" + zsh_completion.install "cmd/autocomplete/scripts/scalingo_complete.zsh" => "_scalingo" + end + + test do + expected = <<~END + ┌───────────────────┬───────┐ + │ CONFIGURATION KEY │ VALUE │ + ├───────────────────┼───────┤ + │ region │ │ + └───────────────────┴───────┘ + END + assert_equal expected, shell_output("#{bin}/scalingo config") + end +end diff --git a/Formula/s/scamper.rb b/Formula/s/scamper.rb new file mode 100644 index 0000000000000..9e5729f2c35a0 --- /dev/null +++ b/Formula/s/scamper.rb @@ -0,0 +1,42 @@ +class Scamper < Formula + desc "Advanced traceroute and network measurement utility" + homepage "https://www.caida.org/catalog/software/scamper/" + url "https://www.caida.org/catalog/software/scamper/code/scamper-cvs-20251020.tar.gz" + sha256 "6ef4d8d22c8cb3a4cc0391955d1a6c5f2c8e16f510c434f5cb9e9395676fcccd" + license "GPL-2.0-only" + + livecheck do + url "https://www.caida.org/catalog/software/scamper/code/?C=M&O=D" + regex(/href=.*?scamper(?:-cvs)?[._-]v?(\d{6,8}[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a772e111410c65dc300c615c7bad5c498e7e39ef4991df88c40b1c74bcc24cd2" + sha256 cellar: :any, arm64_sequoia: "22d81a414f7f209fec07f3139737050e7b8b42725882ce7c32dae88e314877e6" + sha256 cellar: :any, arm64_sonoma: "5ed587879553f48deb7ae75733309bd64dbc32c6f795b6286f233cfc88a62616" + sha256 cellar: :any, sonoma: "abe420ed8e127f3e02a1d73f817887cf35f499c3951dccf5e0040ecd6f820c3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a14124b7f88578229b42151cb7aee1b076442d7084826018c1ffa1e7f13760a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba1477cedb416fce90dfec8d150c8562a4dff5ad3588365d2b7c28e28f1d3cc5" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "xz" # for LZMA + + uses_from_macos "zlib" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + expected = if OS.mac? + "dl_bpf_open_dev" + else + "scamper_privsep_init" + end + assert_match expected, shell_output("#{bin}/scamper -i 127.0.0.1 2>&1", 255) + assert_match version.to_s, shell_output("#{bin}/scamper -v") + end +end diff --git a/Formula/s/scarb.rb b/Formula/s/scarb.rb new file mode 100644 index 0000000000000..d061db6a1ec5c --- /dev/null +++ b/Formula/s/scarb.rb @@ -0,0 +1,50 @@ +class Scarb < Formula + desc "Cairo package manager" + homepage "https://docs.swmansion.com/scarb/" + url "https://github.com/software-mansion/scarb/archive/refs/tags/v2.13.1.tar.gz" + sha256 "110bcab81bbe587a0d12146abd7918c69c6b4b7a5237a2174514ea3740a2671d" + license "MIT" + head "https://github.com/software-mansion/scarb.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "86965ab12b89a74f1cdd18a795ba9ee16805baa5ddc9d0da236837eb8f3e4d41" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eed00734c65ccfb20c22c376ad00ab9b88797c7a7c04b24608cd74c388cff35e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4492ec6bc7732b00af7554e4fe1c47662e2a605dd2923ffa2b7e0b42ccbda2a2" + sha256 cellar: :any_skip_relocation, sonoma: "c1afe644860df329508102e62452327b4d38f9b8f55ae643873bd8c50344c22f" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfa1f4aaad1f0e9b859c013d6d92082a650973a33bd7bd4d9a512700f890f3d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "082cdf97736fb93eec95cbb361759071614e8509c10a6ede8aa0b5c935b0b891" + end + + depends_on "rust" => :build + uses_from_macos "zlib" + + def install + %w[ + scarb + extensions/scarb-cairo-language-server + extensions/scarb-cairo-test + extensions/scarb-doc + ].each do |f| + system "cargo", "install", *std_cargo_args(path: f) + end + end + + test do + ENV["SCARB_INIT_TEST_RUNNER"] = "none" + + assert_match "#{testpath}/Scarb.toml", shell_output("#{bin}/scarb manifest-path") + + system bin/"scarb", "init", "--name", "brewtest", "--no-vcs" + assert_path_exists testpath/"src/lib.cairo" + assert_match "brewtest", (testpath/"Scarb.toml").read + + assert_match version.to_s, shell_output("#{bin}/scarb --version") + assert_match version.to_s, shell_output("#{bin}/scarb cairo-test --version") + assert_match version.to_s, shell_output("#{bin}/scarb doc --version") + end +end diff --git a/Formula/s/scc.rb b/Formula/s/scc.rb new file mode 100644 index 0000000000000..6bf4820574d16 --- /dev/null +++ b/Formula/s/scc.rb @@ -0,0 +1,45 @@ +class Scc < Formula + desc "Fast and accurate code counter with complexity and COCOMO estimates" + homepage "https://github.com/boyter/scc/" + url "https://github.com/boyter/scc/archive/refs/tags/v3.6.0.tar.gz" + sha256 "15e09f446ee44f3ebdb59f55933128256588d0343988692f1064b9bfb4f96dd7" + license any_of: ["MIT", "Unlicense"] + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "38026b19d85ac58395d2f860175c87189b78cfadc9edad78056d73af87fb728c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "38026b19d85ac58395d2f860175c87189b78cfadc9edad78056d73af87fb728c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38026b19d85ac58395d2f860175c87189b78cfadc9edad78056d73af87fb728c" + sha256 cellar: :any_skip_relocation, sonoma: "859f6d6025ca99da9ea268bb1e31a6391e565e689fbeafb0bbbbdbe3b91fd5e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff61384425a01701818b616f52dab8c565367e48d27dffb6c83b1b4a59e0d15a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa1c92076f15efbc15253b0934ad74c5f7dce9d83ea3e800bba55ac97f238764" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/scc --version") + + (testpath/"test.c").write <<~C + #include + int main(void) { + return 0; + } + C + + expected_output = <<~EOS + Language,Lines,Code,Comments,Blanks,Complexity,Bytes,Files,ULOC + C,4,4,0,0,0,50,1,0 + EOS + + assert_match expected_output, shell_output("#{bin}/scc -fcsv test.c") + end +end diff --git a/Formula/s/sccache.rb b/Formula/s/sccache.rb new file mode 100644 index 0000000000000..fca9b96f0e303 --- /dev/null +++ b/Formula/s/sccache.rb @@ -0,0 +1,45 @@ +class Sccache < Formula + desc "Used as a compiler wrapper and avoids compilation when possible" + homepage "https://github.com/mozilla/sccache" + url "https://github.com/mozilla/sccache/archive/refs/tags/v0.12.0.tar.gz" + sha256 "309edaf43f44088e55e99ce14eb9cfdee8f85acad290171ebfd29eb9e368def3" + license "Apache-2.0" + head "https://github.com/mozilla/sccache.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7c05828146c2b4d0b5e97851faf0528392ad38db1370678be4ee782d212a373d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a56fad33d0363b873422aa48afcd1d206b59d5888b96638fd3aa6fc9f3cf126" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "04737c5e48e81a0e164aebd0aa7af6749b63bb8ef23fadf01fd2bc2462f3b877" + sha256 cellar: :any_skip_relocation, sonoma: "42ab23741213e6031678d7622e72e623d5503d1d5c75ed02cce0761115b44a03" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0f8b613f29c5a27438dd40967f50992ad9d99b3a422bd50d6020ff12dc76812" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddb5ab9d593a391fab2ef0df44db64eafa22836c17cbc9a38c64aafeb6d679bc" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + def install + system "cargo", "install", "--features", "all", *std_cargo_args + end + + test do + (testpath/"hello.c").write <<~C + #include + int main() { + puts("Hello, world!"); + return 0; + } + C + system bin/"sccache", "cc", "hello.c", "-o", "hello-c" + assert_equal "Hello, world!", shell_output("./hello-c").chomp + end +end diff --git a/Formula/s/scdl.rb b/Formula/s/scdl.rb new file mode 100644 index 0000000000000..90f815fa86629 --- /dev/null +++ b/Formula/s/scdl.rb @@ -0,0 +1,88 @@ +class Scdl < Formula + include Language::Python::Virtualenv + + desc "Command-line tool to download music from SoundCloud" + homepage "https://github.com/scdl-org/scdl" + url "https://files.pythonhosted.org/packages/28/c0/ba64efcd76edf786b1fcc0b15bb32936363213b116ce90c30bc93d56794d/scdl-3.0.0.tar.gz" + sha256 "efc34697df19ee9ced0e4d8425ba1aa93846d035821137a6ef3b3ebb4bed1232" + license "GPL-2.0-only" + head "https://github.com/scdl-org/scdl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cc872de3e2d6c02f77b7ac273d5640a64e26bb44200200c30e02d65b66563ba2" + end + + depends_on "certifi" => :no_linkage + depends_on "ffmpeg" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "dacite" do + url "https://files.pythonhosted.org/packages/55/a0/7ca79796e799a3e782045d29bf052b5cde7439a2bbb17f15ff44f7aacc63/dacite-1.9.2.tar.gz" + sha256 "6ccc3b299727c7aa17582f0021f6ae14d5de47c7227932c47fec4cdfefd26f09" + end + + resource "docopt-ng" do + url "https://files.pythonhosted.org/packages/e4/50/8d6806cf13138127692ae6ff79ddeb4e25eb3b0bcc3c1bd033e7e04531a9/docopt_ng-0.9.0.tar.gz" + sha256 "91c6da10b5bb6f2e9e25345829fb8278c78af019f6fc40887ad49b060483b1d7" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soundcloud-v2" do + url "https://files.pythonhosted.org/packages/3b/bb/ba779b3cb9597ddf88bb7b31bd6d2a984f972ee3a8f198d32935540058a7/soundcloud-v2-1.6.0.tar.gz" + sha256 "462513146c0ffc9ec729c1c616f4f72b0dcd33f81478c64207f265f072e78243" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yt-dlp" do + url "https://files.pythonhosted.org/packages/58/8f/0daea0feec1ab85e7df85b98ec7cc8c85d706362e80efc5375c7007dc3dc/yt_dlp-2025.9.26.tar.gz" + sha256 "c148ae8233ac4ce6c5fbf6f70fcc390f13a00f59da3776d373cf88c5370bda86" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/scdl --version").chomp + + output = shell_output("#{bin}/scdl -l https://soundcloud.com/forss/city-ports 2>&1") + assert_match "[download] Destination: #{testpath}/[290] Forss - City Ports.m4a", output + assert_match "[download] 100%", output + end +end diff --git a/Formula/s/scdoc.rb b/Formula/s/scdoc.rb new file mode 100644 index 0000000000000..77c3520f957e4 --- /dev/null +++ b/Formula/s/scdoc.rb @@ -0,0 +1,41 @@ +class Scdoc < Formula + desc "Small man page generator" + homepage "https://sr.ht/~sircmpwn/scdoc/" + url "https://git.sr.ht/~sircmpwn/scdoc/archive/1.11.3.tar.gz" + sha256 "4c5c6136540384e5455b250f768e7ca11b03fdba1a8efc2341ee0f1111e57612" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "302458b7a30126590298d20f73b027e7b32663d4ec79e7d5d8f40fc455889afa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8800df45f7cd670d5638e4acd2fad0905fdae6f5216b71bd6d897fcda12c4cd7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6eeed5394fb071aa14153ebe3cb3eb2edb4458c1b25d91adf6a32116fe1eb16b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb0a27fea684b0a8caa7aa98c64df84c9db68c7003fffd827055449bbff373e5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3206d11b5d62c3cee98c1cb2f0da0e6674261f4dccd22f7e8f833685c6c53112" + sha256 cellar: :any_skip_relocation, sonoma: "4546aace4ad6725de9e7e788533896a8600cc99495de6c86cca71b8fc8038dda" + sha256 cellar: :any_skip_relocation, ventura: "01fcd247b749191d4d6154498b0d324d856a8da745f3571b643ddebe18919bc6" + sha256 cellar: :any_skip_relocation, monterey: "f5c4019c594ac3e10d08e1a7f44a560d16e661a33051e0bca823521937b2e691" + sha256 cellar: :any_skip_relocation, arm64_linux: "998b1d189ac54d1f50be511cc66479fb7cecb219870200ce3d9f5a17db47b48b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e73b822f530807cec33251c40cf375923318cbb1b889f8f494afc33ae34cc932" + end + + def install + # scdoc sets by default LDFLAGS=-static which doesn't work on macos(x) + system "make", "LDFLAGS=#{ENV.ldflags}", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + preamble = <<~EOF + .\\" Generated by scdoc #{version} + .\\" Complete documentation for this program is not available as a GNU info page + .ie \\n(.g .ds Aq \\(aq + .el .ds Aq ' + .nh + .ad l + .\\" Begin generated content: + EOF + assert_equal preamble, pipe_output(bin/"scdoc", "") + end +end diff --git a/Formula/s/sceptre.rb b/Formula/s/sceptre.rb new file mode 100644 index 0000000000000..f5125d27c242f --- /dev/null +++ b/Formula/s/sceptre.rb @@ -0,0 +1,176 @@ +class Sceptre < Formula + include Language::Python::Virtualenv + + desc "Build better AWS infrastructure" + homepage "https://docs.sceptre-project.org/" + url "https://files.pythonhosted.org/packages/32/0b/e3249a42ab6cab8cf9e2c5261a95740daa0b74edf1aaecf5c17293e67784/sceptre-4.5.3.tar.gz" + sha256 "84ebc52b59e980b5d25926bbe7116edfbe428dd34ef47014e7f3b200136dc7a0" + license "Apache-2.0" + revision 4 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2de30fc917776f98f98466920e9439d30c0f58e0744c843a66e5af71ad11cc31" + sha256 cellar: :any, arm64_sequoia: "319c379a23b7b8a3da53051214d498477512d072a9fb69850d3bfc63e69fe930" + sha256 cellar: :any, arm64_sonoma: "f68ec021e33eedf371fd6d958d553a295983666b994fe7145e30ca2dedae196e" + sha256 cellar: :any, sonoma: "6392f8c93c0d92cf0b1ef5348f0f43c924230a7068891505ac682c4914baaf3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "61d117f38fd40274062e90efe8526803f8218705cb48ef68c9ff6344f2cd4202" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19ed2af4425d30c7024a10b88a8853e7f20ca70376b0497bfe35e7d8c238c2c6" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi"] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "cfn-flip" do + url "https://files.pythonhosted.org/packages/ca/75/8eba0bb52a6c58e347bc4c839b249d9f42380de93ed12a14eba4355387b4/cfn_flip-1.3.0.tar.gz" + sha256 "003e02a089c35e1230ffd0e1bcfbbc4b12cc7d2deb2fcc6c4228ac9819307362" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" + sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" + end + + resource "deepdiff" do + url "https://files.pythonhosted.org/packages/19/76/36c9aab3d5c19a94091f7c6c6e784efca50d87b124bf026c36e94719f33c/deepdiff-8.6.1.tar.gz" + sha256 "ec56d7a769ca80891b5200ec7bd41eec300ced91ebcc7797b41eb2b3f3ff643a" + end + + resource "deprecation" do + url "https://files.pythonhosted.org/packages/5a/d3/8ae2869247df154b64c1884d7346d412fed0c49df84db635aab2d1c40e62/deprecation-2.1.0.tar.gz" + sha256 "72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" + sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/97/ae/7497bc5e1c84af95e585e3f98585c9f06c627fac6340984c4243053e8f44/networkx-2.6.3.tar.gz" + sha256 "c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51" + end + + resource "orderly-set" do + url "https://files.pythonhosted.org/packages/4a/88/39c83c35d5e97cc203e9e77a4f93bf87ec89cf6a22ac4818fdcc65d66584/orderly_set-5.5.0.tar.gz" + sha256 "e87185c8e4d8afa64e7f8160ee2c542a475b738bc891dc3f58102e654125e6ce" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pyrsistent" do + url "https://files.pythonhosted.org/packages/ce/3a/5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca/pyrsistent-0.20.0.tar.gz" + sha256 "4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "sceptre-cmd-resolver" do + url "https://files.pythonhosted.org/packages/65/80/acb986323af0b3e5e3eb59bb293e6671cdc43ded91620a24a1a58b2e28f7/sceptre-cmd-resolver-2.0.0.tar.gz" + sha256 "155c47e2f4f55c7b6eb64bfe8760174701442ecaddba1a6f5cb7715a1c95be99" + end + + resource "sceptre-file-resolver" do + url "https://files.pythonhosted.org/packages/36/20/c8162b958668c741bef1d7d247a78f796b705ed0eec72501ef308110923b/sceptre-file-resolver-1.0.6.tar.gz" + sha256 "d47cfe32d141fb46467fcd319bf4386f0178cf0c2211c6f1d2dffbc80d785a6d" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + # Avoid issue if `numpy` is installed, https://github.com/Sceptre/sceptre/issues/1541 + virtualenv_install_with_resources(system_site_packages: false) + + generate_completions_from_executable(bin/"sceptre", shell_parameter_format: :click) + end + + test do + system bin/"sceptre", "--help" + end +end diff --git a/Formula/s/schema-evolution-manager.rb b/Formula/s/schema-evolution-manager.rb new file mode 100644 index 0000000000000..391c5491080b7 --- /dev/null +++ b/Formula/s/schema-evolution-manager.rb @@ -0,0 +1,25 @@ +class SchemaEvolutionManager < Formula + desc "Manage postgresql database schema migrations" + homepage "https://github.com/mbryzek/schema-evolution-manager" + url "https://github.com/mbryzek/schema-evolution-manager/archive/refs/tags/0.9.56.tar.gz" + sha256 "f13870ead84d3f55488d30fb751f17983df0c436dc1aa483ea5dec934fbac5a4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4a1918862dfa68167c32ddc7dd929fd9aadb870b7d785c90c3c35967b5b0e633" + end + + uses_from_macos "ruby" + + def install + system "./install.sh", prefix + end + + test do + (testpath/"new.sql").write <<~SQL + CREATE TABLE IF NOT EXISTS test (id text); + SQL + system "git", "init", "." + assert_match "File staged in git", shell_output("#{bin}/sem-add ./new.sql") + end +end diff --git a/Formula/s/schemathesis.rb b/Formula/s/schemathesis.rb new file mode 100644 index 0000000000000..d9c28234c8ec1 --- /dev/null +++ b/Formula/s/schemathesis.rb @@ -0,0 +1,291 @@ +class Schemathesis < Formula + include Language::Python::Virtualenv + + desc "Testing tool for web applications with specs" + homepage "https://schemathesis.readthedocs.io/" + url "https://files.pythonhosted.org/packages/34/6d/b73d85d08b61d9040aa12579b6cd0bd99917a4dbcc8585f3a2a728bce8d1/schemathesis-4.3.18.tar.gz" + sha256 "e463e0fec5579f314f36bfd6ed6ce11cdd89eacedb62eba26d689334fb7034c5" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d8d54719d020091b9400e6d04ba6fc139341828c241de23d9761c0e41214dcc1" + sha256 cellar: :any, arm64_sequoia: "9bdcb2e17589c233e41ead619453c8b0b95a634dffb32b0aa4a479eaace9b651" + sha256 cellar: :any, arm64_sonoma: "ddbd7cdb466d3c865d12bcc3e257a7d9d0dd3c59c2f575cab4c24425f7703d46" + sha256 cellar: :any, sonoma: "7b77e6cf0e9caa59f86ad1d44172a29504ecbb091d11a7ef872b79abe34923f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e36191f7c57a1eb5e7e608fd7c28b1df11ad90600c2816439130c7246d69d715" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de5218d018a1815a474b13a20833a5aea9bd0c79e7696e2f15fe3d61c6995fa5" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + conflicts_with "st", because: "both install `st` binaries" + + pypi_packages exclude_packages: %w[certifi rpds-py] + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "arrow" do + url "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" + sha256 "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "backoff" do + url "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz" + sha256 "03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "graphql-core" do + url "https://files.pythonhosted.org/packages/ac/9b/037a640a2983b09aed4a823f9cf1729e6d780b0671f854efa4727a7affbe/graphql_core-3.2.7.tar.gz" + sha256 "27b6904bdd3b43f2a0556dad5d579bdfdeab1f38e8e8788e555bdcb586a6f62c" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "harfile" do + url "https://files.pythonhosted.org/packages/88/56/06ebfce8ee11b906db9984d7442edfb05e8eb495ed2f553857c1c793dbd5/harfile-0.4.0.tar.gz" + sha256 "34e2d9ef34101d769566bffab3c420e147776174308bed1a036ed8db600cabde" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "hypothesis" do + url "https://files.pythonhosted.org/packages/d2/d5/622284cecf35fc1a702d415a0d6c988202a205a1ff2d9452855081d80411/hypothesis-6.144.0.tar.gz" + sha256 "38e81c34e5091ad6435efec85e82b956bb8c5bdfdaebd4930853dfc7a2783ae6" + end + + resource "hypothesis-graphql" do + url "https://files.pythonhosted.org/packages/14/65/edad164cc4d359bff8c36a2294ab7c60c95a528b600bc22a8f7d9928f9e1/hypothesis_graphql-0.11.1.tar.gz" + sha256 "bd49ab6804a3f488ecab2e39c20dba6dfc2101525c6742f5831cfa9eff95285a" + end + + resource "hypothesis-jsonschema" do + url "https://files.pythonhosted.org/packages/4f/ad/2073dd29d8463a92c243d0c298370e50e0d4082bc67f156dc613634d0ec4/hypothesis-jsonschema-0.23.1.tar.gz" + sha256 "f4ac032024342a4149a10253984f5a5736b82b3fe2afb0888f3834a31153f215" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz" + sha256 "c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730" + end + + resource "isoduration" do + url "https://files.pythonhosted.org/packages/7c/1a/3c8edc664e06e6bd06cce40c6b22da5f1429aa4224d0c590f3be21c91ead/isoduration-20.11.0.tar.gz" + sha256 "ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9" + end + + resource "jsonpointer" do + url "https://files.pythonhosted.org/packages/6a/0a/eebeb1fa92507ea94016a2a790b93c2ae41a7e18778f85471dc54475ed25/jsonpointer-3.0.0.tar.gz" + sha256 "2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "junit-xml" do + url "https://files.pythonhosted.org/packages/98/af/bc988c914dd1ea2bc7540ecc6a0265c2b6faccc6d9cdb82f20e2094a8229/junit-xml-1.9.tar.gz" + sha256 "de16a051990d4e25a3982b2dd9e89d671067548718866416faec14d9de56db9f" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyrate-limiter" do + url "https://files.pythonhosted.org/packages/ec/da/f682c5c5f9f0a5414363eb4397e6b07d84a02cde69c4ceadcbf32c85537c/pyrate_limiter-3.9.0.tar.gz" + sha256 "6b882e2c77cda07a241d3730975daea4258344b39c878f1dd8849df73f70b0ce" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "pytest-subtests" do + url "https://files.pythonhosted.org/packages/59/30/6ec8dfc678ddfd1c294212bbd7088c52d3f7fbf3f05e6d8a440c13b9741a/pytest_subtests-0.14.2.tar.gz" + sha256 "7154a8665fd528ee70a76d00216a44d139dc3c9c83521a0f779f7b0ad4f800de" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rfc3339-validator" do + url "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" + sha256 "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + end + + resource "rfc3987" do + url "https://files.pythonhosted.org/packages/14/bb/f1395c4b62f251a1cb503ff884500ebd248eed593f41b469f89caa3547bd/rfc3987-1.3.8.tar.gz" + sha256 "d3c4d257a560d544e9826b38bc81db676890c79ab9d7ac92b39c7a253d5ca733" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ba/b8/73a0e6a6e079a9d9cfa64113d771e421640b6f679a52eeb9b32f72d871a1/starlette-0.50.0.tar.gz" + sha256 "a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca" + end + + resource "starlette-testclient" do + url "https://files.pythonhosted.org/packages/cd/64/6debec8fc6e9abde0c7042145dc27a562bd1cd79350a55b80bf612a10ccb/starlette_testclient-0.4.1.tar.gz" + sha256 "9e993ffe12fab45606116257813986612262fe15c1bb6dc9e39cc68693ac1fc5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "uri-template" do + url "https://files.pythonhosted.org/packages/31/c7/0336f2bd0bcbada6ccef7aaa25e443c118a704f828a0620c6fa0207c1b64/uri-template-1.3.0.tar.gz" + sha256 "0e00f8eb65e18c7de20d595a14336e9f337ead580c70934141624b6d1ffdacc7" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "webcolors" do + url "https://files.pythonhosted.org/packages/1d/7a/eb316761ec35664ea5174709a68bbd3389de60d4a1ebab8808bfc264ed67/webcolors-25.10.0.tar.gz" + sha256 "62abae86504f66d0f6364c2a8520de4a0c47b80c03fc3a5f1815fedbef7c19bf" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"st", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/st --version") + openapi_url = "https://httpbin.dmuth.org/openapi.json" + output = shell_output("#{bin}/st run #{openapi_url} --phases examples --include-path /ip") + assert_match "Specification: Open API 3.1.0", output + assert_match "No test cases were generated", output + end +end diff --git a/Formula/s/scheme48.rb b/Formula/s/scheme48.rb new file mode 100644 index 0000000000000..c08560346954d --- /dev/null +++ b/Formula/s/scheme48.rb @@ -0,0 +1,70 @@ +class Scheme48 < Formula + desc "Scheme byte-code interpreter" + homepage "https://www.s48.org/" + url "https://s48.org/1.9.3/scheme48-1.9.3.tgz" + sha256 "6ef5a9f3fca14110b0f831b45801d11f9bdfb6799d976aa12e4f8809daf3904c" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/download\.html}i) + end + + bottle do + sha256 arm64_tahoe: "dd9573e777e45950f016f490b3d37b0e5fd1257d3869dbde62a834ed11aed64a" + sha256 arm64_sequoia: "e60e8422a87777d6f55e02a4a33e510d30d86b593b2f67dade9df8836d8cdac8" + sha256 arm64_sonoma: "a832d0cbc2b30a00712198511bc4ca9408e1523bf6ca93bf741780976a307047" + sha256 arm64_ventura: "28ed573df3796dd14ca4380097dc117173104e860b44c414c065c047cefce4a1" + sha256 sonoma: "6fe0332fee2ab61f724c9494c00e2519721e4d0cf482c74b5d70d2a68caa044f" + sha256 ventura: "8ba60cefaf8708f4c554e1a1e1b619d6330e28f6aabdb2b7fd623e902cc9d853" + sha256 arm64_linux: "5f34e3f7fb0b982a57c1bc67fb6d5f18d608716833d1a0dc3a4617e8186fbf24" + sha256 x86_64_linux: "cb14bb2342582715834a1ea6dcf22b5c70292396b42b946182c0af189ad989ff" + end + + conflicts_with "gambit-scheme", because: "both install `scheme-r5rs` binaries" + + # remove doc installation step + patch :DATA + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--enable-gc=bibop", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"hello.scm").write <<~SCHEME + (display "Hello, World!") (newline) + SCHEME + + expected = <<~EOS + Hello, World!\#{Unspecific} + + \#{Unspecific} + + EOS + + assert_equal expected, shell_output("#{bin}/scheme48 -a batch < hello.scm") + end +end + +__END__ +diff --git a/Makefile.in b/Makefile.in +index 5fce20d..1647047 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -468,7 +468,7 @@ doc/manual.ps: $(MANUAL_SRC) + doc/html/manual.html: doc/manual.pdf + cd $(srcdir)/doc/src && tex2page manual && tex2page manual && tex2page manual + +-doc: doc/manual.pdf doc/manual.ps doc/html/manual.html ++doc: # doc/manual.pdf doc/manual.ps doc/html/manual.html + + install: install-no-doc install-doc diff --git a/Formula/s/schroedinger.rb b/Formula/s/schroedinger.rb new file mode 100644 index 0000000000000..070d1cc38d899 --- /dev/null +++ b/Formula/s/schroedinger.rb @@ -0,0 +1,48 @@ +class Schroedinger < Formula + desc "High-speed implementation of the Dirac codec" + homepage "https://launchpad.net/schroedinger" + url "https://launchpad.net/schroedinger/trunk/1.0.11/+download/schroedinger-1.0.11.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/s/schroedinger/schroedinger_1.0.11.orig.tar.gz" + sha256 "1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912" + license any_of: ["MPL-1.1", "LGPL-2.0-only", "GPL-2.0-only", "MIT"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "802187a5994506ae665bb01bb4457ec3a3f7f41241f6d1734f59d28c02c0485d" + sha256 cellar: :any, arm64_sequoia: "a9b3bb16d608978a3bfae464380e4110745808274d336d2e1a31834378b2a487" + sha256 cellar: :any, arm64_sonoma: "cf37204722b07d4b2918e55aa2f71f4321e8b0b340579dd4e1dbcbcc272040fa" + sha256 cellar: :any, arm64_ventura: "ada44d9f9a740f64fb2d3f66e55f7fc9f523aef0c160866ee301f54a9a9c084b" + sha256 cellar: :any, arm64_monterey: "7723de84138cae533fd4304aad54edcbb22d9815e8eebd23f8617ae6523a0a18" + sha256 cellar: :any, arm64_big_sur: "eed0918ea3c7ff3e75968249865c6743b5dd6a444b1022f15926c9e0b3496cfb" + sha256 cellar: :any, sonoma: "a4eeeabcf00b3a73ae1efd28b5f00b3a92d447dce55d92ffc2d6a88d15e330ce" + sha256 cellar: :any, ventura: "713177f50bfbaa6d29d889da79eab19ff45b94e2d967514b64650707afa261b7" + sha256 cellar: :any, monterey: "eb3f714b77e5562bad12a8071a07cb45690ece3b0b8b544b56fc06501e83fb0e" + sha256 cellar: :any, big_sur: "81ea2f319f7e300c222b2788fdb03bfc3b3177f5a8166caa88afc1b4538b291d" + sha256 cellar: :any, catalina: "904f8940085832802e511565d1bcea91262a0ca871612509c1e521db37da4227" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f2674c5ae2910ea63da7347b73cbb12f45f1531babac60af4ef50d82a1f79cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32c7db0617f2a2d01b89d446860529fc3520f377e601a460fadc5e3ce2bc0baa" + end + + depends_on "pkgconf" => :build + depends_on "orc" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + + # The test suite is known not to build against Orc >0.4.16 in Schroedinger 1.0.11. + # A fix is in upstream, so test when pulling 1.0.12 if this is still needed. See: + # https://www.mail-archive.com/schrodinger-devel@lists.sourceforge.net/msg00415.html + inreplace "Makefile" do |s| + s.change_make_var! "SUBDIRS", "schroedinger doc tools" + s.change_make_var! "DIST_SUBDIRS", "schroedinger doc tools" + end + + system "make", "install" + end +end diff --git a/Formula/s/scikit-image.rb b/Formula/s/scikit-image.rb new file mode 100644 index 0000000000000..ab0c1b79a7787 --- /dev/null +++ b/Formula/s/scikit-image.rb @@ -0,0 +1,79 @@ +class ScikitImage < Formula + include Language::Python::Virtualenv + + desc "Image processing in Python" + homepage "https://scikit-image.org" + url "https://files.pythonhosted.org/packages/c7/a8/3c0f256012b93dd2cb6fda9245e9f4bff7dc0486880b248005f15ea2255e/scikit_image-0.25.2.tar.gz" + sha256 "e5a37e6cd4d0c018a7a55b9d601357e3382826d3888c10d0213fc63bff977dde" + license "BSD-3-Clause" + revision 1 + head "https://github.com/scikit-image/scikit-image.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f27da6cc33d77c6a785a9c8ea4df0d2f7edfa03dc24085a1608edcef43b13044" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ddce8132980d3b4e3f94babf269f076f136b309401de1877c3b3689a1b016557" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f357f344cc9bcf5d1a75190aca51d004e003a2a70f320cdb4d7f1147db7201f6" + sha256 cellar: :any_skip_relocation, sonoma: "654d5b525c02f6b0f6bcfa442b3f58125e2cac12875a9335aee531b6e108a710" + sha256 arm64_linux: "0b04fcd70cba257b24cbf944e8e95013c5744e4367547e8eac93e040b18484ae" + sha256 x86_64_linux: "24372313c3590ffa120fa37bbc6b8f9da8cec269511c25f57fdf99635988f2b4" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.14" + depends_on "scipy" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[numpy pillow scipy] + + resource "imageio" do + url "https://files.pythonhosted.org/packages/0c/47/57e897fb7094afb2d26e8b2e4af9a45c7cf1a405acdeeca001fdf2c98501/imageio-2.37.0.tar.gz" + sha256 "71b57b3669666272c818497aebba2b4c5f20d5b37c81720e5e1a56d59c492996" + end + + resource "lazy-loader" do + url "https://files.pythonhosted.org/packages/6f/6b/c875b30a1ba490860c93da4cabf479e03f584eba06fe5963f6f6644653d8/lazy_loader-0.4.tar.gz" + sha256 "47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "tifffile" do + url "https://files.pythonhosted.org/packages/2d/b5/0d8f3d395f07d25ec4cafcdfc8cab234b2cc6bf2465e9d7660633983fe8f/tifffile-2025.10.16.tar.gz" + sha256 "425179ec7837ac0e07bc95d2ea5bea9b179ce854967c12ba07fc3f093e58efc1" + end + + def install + virtualenv_install_with_resources + end + + def post_install + HOMEBREW_PREFIX.glob("lib/python*.*/site-packages/skimage/**/*.pyc").map(&:unlink) + end + + test do + (testpath/"test.py").write <<~PYTHON + import skimage as ski + import numpy + + cat = ski.data.chelsea() + assert isinstance(cat, numpy.ndarray) + assert cat.shape == (300, 451, 3) + PYTHON + shell_output("#{libexec}/bin/python test.py") + end +end diff --git a/Formula/s/scilla.rb b/Formula/s/scilla.rb new file mode 100644 index 0000000000000..7e06be3156618 --- /dev/null +++ b/Formula/s/scilla.rb @@ -0,0 +1,36 @@ +class Scilla < Formula + desc "DNS, subdomain, port, directory enumeration tool" + homepage "https://github.com/edoardottt/scilla" + url "https://github.com/edoardottt/scilla/archive/refs/tags/v1.3.1.tar.gz" + sha256 "244a15a966a9be849ac7f514d0b69137220d920a92a37126fbcf320e642e7e4f" + license "GPL-3.0-or-later" + head "https://github.com/edoardottt/scilla.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3b6651d35468758abd4e3705929076950a01f8bde061a27e8bf2e6133f51fb69" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e579131e2c41b493e3df24190c43ba8ca77214825c5dc3dca653b6c9a795ec3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e579131e2c41b493e3df24190c43ba8ca77214825c5dc3dca653b6c9a795ec3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e579131e2c41b493e3df24190c43ba8ca77214825c5dc3dca653b6c9a795ec3" + sha256 cellar: :any_skip_relocation, sonoma: "3fbe9853916a2c00f9b47249d7a96ec65401d85363d148b1462ee85c7e445a8b" + sha256 cellar: :any_skip_relocation, ventura: "3fbe9853916a2c00f9b47249d7a96ec65401d85363d148b1462ee85c7e445a8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b06c4575cabb0d84000fb7224481cd7cf0c4b2328ee12e59bb50ea5efd36870b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c97bdc1e96d5caca0a9b9e7dff9b28ec3d497d58d751d524bda25b89e9194d4a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/scilla" + end + + test do + output = shell_output("#{bin}/scilla dns -target brew.sh") + assert_match <<~EOS, output + ===================================================== + target: brew.sh + ================ SCANNING DNS ======================= + EOS + + assert_match version.to_s, shell_output("#{bin}/scilla --help 2>&1", 1) + end +end diff --git a/Formula/s/scip.rb b/Formula/s/scip.rb new file mode 100644 index 0000000000000..3c9bb0ecf5b6f --- /dev/null +++ b/Formula/s/scip.rb @@ -0,0 +1,52 @@ +class Scip < Formula + desc "Solver for mixed integer programming and mixed integer nonlinear programming" + homepage "https://scipopt.org" + url "https://scipopt.org/download/release/scip-9.2.4.tgz" + sha256 "d88217393a6f86c18f2957c6d36d90d28287a01473fb7378417ab49ad72a50ea" + license "Apache-2.0" + + livecheck do + url "https://scipopt.org/scipdata.js" + regex(/["']name["']:\s*?["']scip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e345527c5788204b410c15d3f9ad6ef3a30d626641c49c80429b96f93d8a28a" + sha256 cellar: :any, arm64_sequoia: "8cfd22fa1f1a525de6a8fe28acf3b5c8ed7e3aaf0fff4bed1f323a56b29c6e00" + sha256 cellar: :any, arm64_sonoma: "a6d778cea731f914cb00cd4a8a8cc9465c4dfc28793c51025e078d087e27c011" + sha256 cellar: :any, sonoma: "fc8a392321d3640bd79af687a026e83ec83090ae1a78453474f1f1432a481803" + sha256 cellar: :any_skip_relocation, arm64_linux: "87ead7c33e3744da5cc7d6a79955e7fcfc013338a8f49024eee7f82647ee46ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "beee5ba170ef0b8e55436ca899e694759c286d005c94277203a36b7cf6d74a45" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "cppad" + depends_on "gmp" + depends_on "ipopt" + depends_on "openblas" + depends_on "papilo" + depends_on "readline" + depends_on "soplex" + depends_on "tbb" + + uses_from_macos "zlib" + + on_macos do + depends_on "gcc" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DZIMPL=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "check/instances/MIP/enigma.mps" + pkgshare.install "check/instances/MINLP/gastrans.nl" + end + + test do + assert_match "problem is solved [optimal solution found]", shell_output("#{bin}/scip -f #{pkgshare}/enigma.mps") + assert_match "problem is solved [optimal solution found]", shell_output("#{bin}/scip -f #{pkgshare}/gastrans.nl") + end +end diff --git a/Formula/s/scipy.rb b/Formula/s/scipy.rb new file mode 100644 index 0000000000000..b8cee09c7015e --- /dev/null +++ b/Formula/s/scipy.rb @@ -0,0 +1,59 @@ +class Scipy < Formula + desc "Software for mathematics, science, and engineering" + homepage "https://www.scipy.org" + url "https://files.pythonhosted.org/packages/0a/ca/d8ace4f98322d01abcd52d381134344bf7b431eba7ed8b42bdea5a3c2ac9/scipy-1.16.3.tar.gz" + sha256 "01e87659402762f43bd2fee13370553a17ada367d42e7487800bf2916535aecb" + license "BSD-3-Clause" + head "https://github.com/scipy/scipy.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "15f20a5c8c7b898c7aef6f9661757a50bde0240b9895f58f7ad7b10389385257" + sha256 cellar: :any, arm64_sequoia: "ae4cdbadf3a897bd5f764392f544c1b89f2ba422bacc41aaff20dbbc3547b76c" + sha256 cellar: :any, arm64_sonoma: "df5260adee8f5e6dc4aaa511b3a3422f0889ba72b736d01931bbc35c5d535684" + sha256 cellar: :any, sonoma: "e03b0fbd145f6930ce815dc6886a43087d539b7a0c1158e5d65468bd28f7f0f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb4e76466670c3dd1215899c5d76903df16596d6d22b9a8a7fe28f1f61e977fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aaa8ea2b5d8886eb4a1ee66ff5f971bd21abb2bf0c8138bf2ccdac46528487c1" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + depends_on "gcc" # for gfortran + depends_on "numpy" + depends_on "openblas" + depends_on "xsimd" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: "numpy" + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + pythons.each do |python3| + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + end + + def post_install + HOMEBREW_PREFIX.glob("lib/python*.*/site-packages/scipy/**/*.pyc").map(&:unlink) + end + + test do + (testpath/"test.py").write <<~PYTHON + from scipy import special + print(special.exp10(3)) + PYTHON + pythons.each do |python3| + assert_equal "1000.0", shell_output("#{python3} test.py").chomp + end + end +end diff --git a/Formula/s/scm-manager.rb b/Formula/s/scm-manager.rb new file mode 100644 index 0000000000000..3785737fcabe9 --- /dev/null +++ b/Formula/s/scm-manager.rb @@ -0,0 +1,51 @@ +class ScmManager < Formula + desc "Manage Git, Mercurial, and Subversion repos over HTTP" + homepage "https://www.scm-manager.org" + url "https://packages.scm-manager.org/repository/releases/sonia/scm/packaging/unix/3.11.0/unix-3.11.0.tar.gz" + sha256 "1efac0ed4f39e0ba016b38cf72427d4b6e5a054e9217607788bc1510f0abcf86" + license all_of: ["Apache-2.0", "MIT"] + + livecheck do + url "https://scm-manager.org/download/" + regex(/href=.*?unix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b8a0a9a97bce358944c9c648f483ddc02ec3526b4b3017d63229d40db898198d" + end + + depends_on "jsvc" + depends_on "openjdk@21" + + def install + # Replace pre-built `jsvc` with formula to add Apple Silicon support + inreplace "bin/scm-server", %r{ \$BASEDIR/libexec/jsvc-.*"}, " #{Formula["jsvc"].opt_bin}/jsvc\"" + rm Dir["libexec/jsvc-*"] + libexec.install Dir["*"] + + env = Language::Java.overridable_java_home_env("21") + env["BASEDIR"] = libexec + env["REPO"] = libexec/"lib" + (bin/"scm-server").write_env_script libexec/"bin/scm-server", env + end + + service do + run [opt_bin/"scm-server"] + end + + test do + port = free_port + + cp libexec/"conf/config.yml", testpath + inreplace testpath/"config.yml" do |s| + s.gsub! "./work", testpath/"work" + s.gsub! "port: 8080", "port: #{port}" + end + ENV["JETTY_BASE"] = testpath + pid = fork { exec bin/"scm-server" } + sleep 15 + assert_match "SCM-Manager", shell_output("curl http://localhost:#{port}/scm/") + ensure + Process.kill "TERM", pid + end +end diff --git a/Formula/s/scmpuff.rb b/Formula/s/scmpuff.rb new file mode 100644 index 0000000000000..c234f106dba2e --- /dev/null +++ b/Formula/s/scmpuff.rb @@ -0,0 +1,33 @@ +class Scmpuff < Formula + desc "Adds numbered shortcuts for common git commands" + homepage "https://mroth.github.io/scmpuff/" + url "https://github.com/mroth/scmpuff/archive/refs/tags/v0.6.0.tar.gz" + sha256 "4478a53ff16d70ca433d21a66f7e3532631f43ecd64a1fbaf0a933aa7cbd2df4" + license "MIT" + head "https://github.com/mroth/scmpuff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d9335d31cb6a4eaf7629c3d66e7af096efa7a255ce07ca45980b8c6ead74ac3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cb1859e64a1c7d5ed9865ef08504813424a0d372720f165f22eb8cdcf9d28c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cb1859e64a1c7d5ed9865ef08504813424a0d372720f165f22eb8cdcf9d28c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5cb1859e64a1c7d5ed9865ef08504813424a0d372720f165f22eb8cdcf9d28c0" + sha256 cellar: :any_skip_relocation, sonoma: "0cb10c56e24bf596383ce3c2221b14cd37f70d886563b873073a0b7e49300f97" + sha256 cellar: :any_skip_relocation, ventura: "0cb10c56e24bf596383ce3c2221b14cd37f70d886563b873073a0b7e49300f97" + sha256 cellar: :any_skip_relocation, arm64_linux: "b259cbbf0237281e162eb941a0457b9fa17cceb5bc8ab5d8459fce85fbe77d25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23567d3e31ff884250b533cbf175f24cdb22265d3b42bde108fe3722aa99a302" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.builtBy=#{tap.user}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/scmpuff --version 2>&1") + + ENV["e1"] = "abc" + assert_equal "abc", shell_output("#{bin}/scmpuff expand 1").strip + end +end diff --git a/Formula/s/scnlib.rb b/Formula/s/scnlib.rb new file mode 100644 index 0000000000000..034bc5dbf2a7e --- /dev/null +++ b/Formula/s/scnlib.rb @@ -0,0 +1,57 @@ +class Scnlib < Formula + desc "Scanf for modern C++" + homepage "https://www.scnlib.dev/" + url "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v4.0.1.tar.gz" + sha256 "ece17b26840894cc57a7127138fe4540929adcb297524dec02c490c233ff46a7" + license "Apache-2.0" + head "https://github.com/eliaskosunen/scnlib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "92037af6bae9aaf495afce7b464fa50a116720c847f0790d6fa51f619faf7131" + sha256 cellar: :any, arm64_sequoia: "c3531b7c92229eddcac3eff07698a8206621fda6af597998a6baea043373879f" + sha256 cellar: :any, arm64_sonoma: "f55a2dc6aceffc4955d9bdde6d9a85cc6d9fd4062f94760b4fae036a5ba0d812" + sha256 cellar: :any, arm64_ventura: "1ce46536fa0d02263892e00a103d4302d2aad33beb1d9396e3956c7a894e34a8" + sha256 cellar: :any, sonoma: "466d7641baa693ed0a7d395a7b9742049f4fa62f978f8614c28806b7116a5a4c" + sha256 cellar: :any, ventura: "a98aae0486d5e6e67bc9a9245fe8ad6366ecbba04ccc0b600458de630bc8fb02" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f8713c8d5b0ccc2d5403b82f3db637b62161d0c17381d7d09aaf3311751da65" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99e865cc3d9de153eb4a1cfd708d22dfd60ebcb584369f782e01646d0abce372" + end + + depends_on "cmake" => :build + depends_on "simdutf" + + def install + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DSCN_TESTS=OFF + -DSCN_DOCS=OFF + -DSCN_EXAMPLES=OFF + -DSCN_BENCHMARKS=OFF + -DSCN_BENCHMARKS_BUILDTIME=OFF + -DSCN_BENCHMARKS_BINARYSIZE=OFF + -DSCN_USE_EXTERNAL_SIMDUTF=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main() + { + constexpr int expected = 123456; + auto [result] = scn::scan(std::to_string(expected), "{}")->values(); + return result == expected ? EXIT_SUCCESS : EXIT_FAILURE; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lscn" + system "./test" + end +end diff --git a/Formula/s/scons.rb b/Formula/s/scons.rb new file mode 100644 index 0000000000000..1b0d09c66c234 --- /dev/null +++ b/Formula/s/scons.rb @@ -0,0 +1,34 @@ +class Scons < Formula + include Language::Python::Virtualenv + + desc "Substitute for classic 'make' tool with autoconf/automake functionality" + homepage "https://www.scons.org/" + url "https://files.pythonhosted.org/packages/91/ff/2c0bab6e1fcd837c52afd99a37e0cc16f2e1c970d313c3d4bc10b5c047f2/scons-4.10.0.tar.gz" + sha256 "61e2fc42e0e2c750105d61f26cc1dfebcae9f4103d3dc0e9aeb373016b0d208c" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ce4428d0535f64ccd0715610f5be0d4bd0628027a67c5bf1608b2f7ad60ad910" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Homebrew"); + return 0; + } + C + (testpath/"SConstruct").write "Program('test.c')" + system bin/"scons" + assert_equal "Homebrew", shell_output("#{testpath}/test") + end +end diff --git a/Formula/s/scooter.rb b/Formula/s/scooter.rb new file mode 100644 index 0000000000000..d434e63c4172d --- /dev/null +++ b/Formula/s/scooter.rb @@ -0,0 +1,27 @@ +class Scooter < Formula + desc "Interactive find and replace in the terminal" + homepage "https://github.com/thomasschafer/scooter" + url "https://github.com/thomasschafer/scooter/archive/refs/tags/v0.8.2.tar.gz" + sha256 "4c70e0cf3a450b509c773b113bf21bc62ed228873bd45030b3359d391e3b188a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10b632d61cf600afe40726ab3fc6b9cbef070dd39363ddbd1e4235072bfd7563" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ebc8812c6c8695dd7a7506ba895562649717ec50e8d4f4db73034bfdfb8712e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d465d494109ae528a34758bfc44d0f4989215abfec3b54c6ec1795269884f008" + sha256 cellar: :any_skip_relocation, sonoma: "121ac5306d296c22ac21cf75d1aee4a8599c560b1c7c0fe112f7a8f4d6c16677" + sha256 cellar: :any_skip_relocation, arm64_linux: "298472651f6f36cce3abe6a522854e30a950bc1c1b27f793932dbbe76ffcee76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1c919f6e7bc92fc84aa9a98c356b625711ecf1e707e1929cbe3212b7f2b5cb8" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "scooter") + end + + test do + # scooter is a TUI application + assert_match "Interactive find and replace TUI.", shell_output("#{bin}/scooter -h") + end +end diff --git a/Formula/s/scorecard.rb b/Formula/s/scorecard.rb new file mode 100644 index 0000000000000..6f591532add1e --- /dev/null +++ b/Formula/s/scorecard.rb @@ -0,0 +1,53 @@ +class Scorecard < Formula + desc "Security health metrics for Open Source" + homepage "https://github.com/ossf/scorecard" + url "https://github.com/ossf/scorecard.git", + tag: "v5.3.0", + revision: "c22063e786c11f9dd714d777a687ff7c4599b600" + license "Apache-2.0" + head "https://github.com/ossf/scorecard.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "351c496a03c888ef7ff69146b9264e8f40a583dc16f23e105c3a0f17b685467e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "351c496a03c888ef7ff69146b9264e8f40a583dc16f23e105c3a0f17b685467e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "351c496a03c888ef7ff69146b9264e8f40a583dc16f23e105c3a0f17b685467e" + sha256 cellar: :any_skip_relocation, sonoma: "33bc563cc092decdd46e997eb9232535cb306efbac542a29509ade0aaa75ab9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "68fa162e879005c3a7eb35e63222a3925c4a28ebf8d347f149bb9f740f26cf25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48c59c9037ece6a45bf092e71ab9e75646f2e93df8f7bcc05a9e417be2e1e910" + end + + depends_on "go" => :build + + def install + pkg = "sigs.k8s.io/release-utils/version" + ldflags = %W[ + -s -w + -X #{pkg}.gitVersion=#{version} + -X #{pkg}.gitCommit=#{Utils.git_head} + -X #{pkg}.gitTreeState=clean + -X #{pkg}.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + system "make", "generate-docs" + doc.install "docs/checks.md" + + generate_completions_from_executable(bin/"scorecard", "completion") + end + + test do + ENV["GITHUB_AUTH_TOKEN"] = "test" + output = shell_output("#{bin}/scorecard --repo=github.com/kubernetes/kubernetes --checks=Maintained 2>&1", 1) + expected_output = "Error: scorecard.Run: repo unreachable: GET https://api.github.com/repos/kubernetes/kubernetes" + assert_match expected_output, output + + assert_match version.to_s, shell_output("#{bin}/scorecard version 2>&1") + end +end diff --git a/Formula/s/scotch.rb b/Formula/s/scotch.rb new file mode 100644 index 0000000000000..df68c8a2d51fe --- /dev/null +++ b/Formula/s/scotch.rb @@ -0,0 +1,78 @@ +class Scotch < Formula + desc "Package for graph partitioning, graph clustering, and sparse matrix ordering" + homepage "https://gitlab.inria.fr/scotch/scotch" + url "https://gitlab.inria.fr/scotch/scotch/-/archive/v7.0.10/scotch-v7.0.10.tar.bz2" + sha256 "75137f33ed28a12f433d4ab6e92794b2d4cfdd4377d35fe4361bc8e9808ffff4" + license "CECILL-C" + head "https://gitlab.inria.fr/scotch/scotch.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4fde16dc755bef5d54d0e878155746e17cdebab4677c4a9a855a59eb47748139" + sha256 cellar: :any, arm64_sequoia: "5d27f3a0fa57ef65aaf1b11989c16f59f39f71381b87ba39b92bc40cf0ff92d8" + sha256 cellar: :any, arm64_sonoma: "41fbeef3d5a921cc12dd2d85b633a89a3e0c0881349d8eeb2c7ac4a4b3357a3f" + sha256 cellar: :any, sonoma: "34fd2b83da463390a4742b223a012590a3b48afc5f0fc03fb899483dabcec2e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "74b03d23501be289965b5ba5973068d5bf728119d6874392129eaab7cfd00542" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae39e826fff736c58d24437ec1ff2b472c72d3228ff7ae0db3321ffb049641c8" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "open-mpi" + depends_on "xz" + + uses_from_macos "flex" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DENABLE_TESTS=OFF + -DINSTALL_METIS_HEADERS=OFF + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"check").install "src/check/test_strat_seq.c" + (pkgshare/"check").install "src/check/test_strat_par.c" + (pkgshare/"libscotch").install "src/libscotch/common.h" + (pkgshare/"libscotch").install "src/libscotch/module.h" + + # License file has a non-standard filename + prefix.install buildpath.glob("LICEN[CS]E_*.txt") + doc.install (buildpath/"doc").children + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + int main(void) { + int major, minor, patch; + SCOTCH_version(&major, &minor, &patch); + printf("%d.%d.%d", major, minor, patch); + return 0; + } + C + + args = %W[-I#{include} -L#{lib} -lscotch -lscotcherr -pthread -lz -lm] + + system ENV.cc, "test.c", *args + assert_match version.to_s, shell_output("./a.out") + + system ENV.cc, pkgshare/"check/test_strat_seq.c", "-o", "test_strat_seq", *args + assert_match "Sequential mapping strategy, SCOTCH_STRATDEFAULT", shell_output("./test_strat_seq") + + system "mpicc", pkgshare/"check/test_strat_par.c", "-o", "test_strat_par", + "-lptscotch", "-Wl,-rpath,#{lib}", *args + assert_match "Parallel mapping strategy, SCOTCH_STRATDEFAULT", shell_output("./test_strat_par") + end +end diff --git a/Formula/s/scour.rb b/Formula/s/scour.rb new file mode 100644 index 0000000000000..f7cbcb3c583ae --- /dev/null +++ b/Formula/s/scour.rb @@ -0,0 +1,33 @@ +class Scour < Formula + include Language::Python::Virtualenv + + desc "SVG file scrubber" + homepage "https://www.codedread.com/scour/" + url "https://files.pythonhosted.org/packages/75/19/f519ef8aa2f379935a44212c5744e2b3a46173bf04e0110fb7f4af4028c9/scour-0.38.2.tar.gz" + sha256 "6881ec26660c130c5ecd996ac6f6b03939dd574198f50773f2508b81a68e0daf" + license "Apache-2.0" + revision 1 + version_scheme 1 + head "https://github.com/scour-project/scour.git", branch: "master" + + bottle do + rebuild 7 + sha256 cellar: :any_skip_relocation, all: "e08d200e5c6c2e52a3b6037e4ef13e9aa8438effa9cabb4e99d4078dca0c9769" + end + + depends_on "python@3.14" + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"scour", "-i", test_fixtures("test.svg"), "-o", "scrubbed.svg" + assert_path_exists testpath/"scrubbed.svg" + end +end diff --git a/Formula/s/scoutsuite.rb b/Formula/s/scoutsuite.rb new file mode 100644 index 0000000000000..c7a1af5c87ea8 --- /dev/null +++ b/Formula/s/scoutsuite.rb @@ -0,0 +1,603 @@ +class Scoutsuite < Formula + include Language::Python::Virtualenv + + desc "Open source multi-cloud security-auditing tool" + homepage "https://github.com/nccgroup/ScoutSuite" + url "https://files.pythonhosted.org/packages/a9/41/4f375fac81c66e1475c3ae18753a86191f253cdf24c29f28c8861d6bb984/scoutsuite-5.14.0.tar.gz" + sha256 "b021ad340196865093fb5d6e247f2596ec856e24cb39eb6e3e886923befd1208" + license "GPL-2.0-only" + revision 4 + head "https://github.com/nccgroup/ScoutSuite.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b37abcb8548c027d87a10bd8a762524c942230bb0b86c142296b2dbdf12053de" + sha256 cellar: :any, arm64_sequoia: "1d0e3f7dabffe4d65f32a9d65839dfd94c7618deb62ebd9fd21d9ada263a80ac" + sha256 cellar: :any, arm64_sonoma: "84e183c0045633644a505a1c36169b50fa7d1efa0aeee5db5438b577459de545" + sha256 cellar: :any, sonoma: "9e7d32ccb40a307baade224db7fa87c41705c8baff780d9579b05e7344c9725c" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d1d682b10f2f3c1eefb1cd103d9f08efe3d62d156728ea49833515489f33427" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c95f550a5c33e7513a1bb3d0f14b65d5e03522b934b3c3d8e10404b1adb3d427" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core] + + resource "aliyun-python-sdk-actiontrail" do + url "https://files.pythonhosted.org/packages/69/ec/76d2733699ffb003dffa0da0f0b1cbc34ea48e535f7639deb079b73bd5ed/aliyun-python-sdk-actiontrail-2.2.0.tar.gz" + sha256 "572e3049529fd6c21974fd2e4fc98b057d2c85ca1d90ca23425c22288d265a37" + end + + resource "aliyun-python-sdk-core" do + url "https://files.pythonhosted.org/packages/3e/09/da9f58eb38b4fdb97ba6523274fbf445ef6a06be64b433693da8307b4bec/aliyun-python-sdk-core-2.16.0.tar.gz" + sha256 "651caad597eb39d4fad6cf85133dffe92837d53bdf62db9d8f37dab6508bb8f9" + end + + resource "aliyun-python-sdk-ecs" do + url "https://files.pythonhosted.org/packages/be/3b/2ccc93b89f28b6d394ee3cdeddaf58d404b47fd9bfd44d10d584c7e2db85/aliyun-python-sdk-ecs-4.24.82.tar.gz" + sha256 "66de143670432aa87b2519b2280101832bd56cd84c21c0d6578a69e8304567e3" + end + + resource "aliyun-python-sdk-kms" do + url "https://files.pythonhosted.org/packages/a8/2c/9877d0e6b18ecf246df671ac65a5d1d9fecbf85bdcb5d43efbde0d4662eb/aliyun-python-sdk-kms-2.16.5.tar.gz" + sha256 "f328a8a19d83ecbb965ffce0ec1e9930755216d104638cd95ecd362753b813b3" + end + + resource "aliyun-python-sdk-ocs" do + url "https://files.pythonhosted.org/packages/71/1b/33792adaea4a1dfaf8a1224fe28ab07f99faddd9ab1c86d6613647897d92/aliyun-python-sdk-ocs-0.0.4.tar.gz" + sha256 "361a3c2db0245894de80678366307def76141324d6ce32eb7f119aa981d3ec01" + end + + resource "aliyun-python-sdk-ram" do + url "https://files.pythonhosted.org/packages/27/9c/8248e66c6b81ede261ad6b96fbe2752c62d4fb73cf8a4e6b2afe62e82a81/aliyun-python-sdk-ram-3.3.1.tar.gz" + sha256 "0fd482d57767862cd9dbd6c992ba3c442b8e199d43bdf2b336b5d41a4edc7957" + end + + resource "aliyun-python-sdk-rds" do + url "https://files.pythonhosted.org/packages/9c/7e/3da459ddb990d15cd42a0097ff5d6cd979e738eac1cb0ee708bae5d588b5/aliyun-python-sdk-rds-2.7.53.tar.gz" + sha256 "057b4da4e3b645477e5702dfe010a5aa9ef21b96b4d0df8be395db39e0a4de0e" + end + + resource "aliyun-python-sdk-sts" do + url "https://files.pythonhosted.org/packages/0c/64/65ad5261c2d65aac910c41a7aeee80643a6393024f838e28f52d48cddf4c/aliyun-python-sdk-sts-3.1.3.tar.gz" + sha256 "22fedb8bad13f966e711a1f4662eed7b9db33441bc05aa4b0f918aa01e09b967" + end + + resource "aliyun-python-sdk-vpc" do + url "https://files.pythonhosted.org/packages/cc/c8/a8e82462e756e44ffe513bdce3d6b495f3af1afc65b9fa4ffa90aa8bfa17/aliyun-python-sdk-vpc-3.0.47.tar.gz" + sha256 "ca31a5e278615279eb2f1bcd1f8b5abde032181e7d2d6ae3a84915646e2b4a31" + end + + resource "asyncio-throttle" do + url "https://files.pythonhosted.org/packages/c2/b4/0b6bd59151d979c3d9902d9b35c992aa1e55ab0f60d8b0b7fbbf61dd3138/asyncio_throttle-0.1.1-py3-none-any.whl" + sha256 "a01a56f3671e961253cf262918f3e0741e222fc50d57d981ba5c801f284eccfe" + end + + resource "autocommand" do + url "https://files.pythonhosted.org/packages/5b/18/774bddb96bc0dc0a2b8ac2d2a0e686639744378883da0fc3b96a54192d7a/autocommand-2.2.2.tar.gz" + sha256 "878de9423c5596491167225c2a455043c3130fb5b7286ac83443d45e74955f34" + end + + resource "azure-common" do + url "https://files.pythonhosted.org/packages/3e/71/f6f71a276e2e69264a97ad39ef850dca0a04fce67b12570730cb38d0ccac/azure-common-1.1.28.zip" + sha256 "4ac0cd3214e36b6a1b6a442686722a5d8cc449603aa833f3f0f40bda836704a3" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/0a/c4/d4ff3bc3ddf155156460bff340bbe9533f99fac54ddea165f35a8619f162/azure_core-1.36.0.tar.gz" + sha256 "22e5605e6d0bf1d229726af56d9e92bc37b6e726b141a18be0b4d424131741b7" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/09/73/a71e7bcd7e79afecf8cf5ec1a330804bc5e11f649436729d748df156d89d/azure-identity-1.5.0.zip" + sha256 "872adfa760b2efdd62595659b283deba92d47b7a67557eb9ff48f0b5d04ee396" + end + + resource "azure-mgmt-authorization" do + url "https://files.pythonhosted.org/packages/7b/39/46adcbabc61a6d91f8514b46a2b64cfba365170325a6c38c31e2c1567090/azure-mgmt-authorization-3.0.0.zip" + sha256 "0a5d7f683bf3372236b841cdbd4677f6b08ed7ce41b999c3e644d4286252057d" + end + + resource "azure-mgmt-compute" do + url "https://files.pythonhosted.org/packages/0d/0e/e4a61d8b73fe8afdeb115d577d8417dc599a1b4d5447067b0eb02c1cb8c8/azure-mgmt-compute-18.2.0.zip" + sha256 "599b829f189f2ed2338dad60b823818943bb236cf6e22128d988a8c787c56ebd" + end + + resource "azure-mgmt-core" do + url "https://files.pythonhosted.org/packages/3e/99/fa9e7551313d8c7099c89ebf3b03cd31beb12e1b498d575aa19bb59a5d04/azure_mgmt_core-1.6.0.tar.gz" + sha256 "b26232af857b021e61d813d9f4ae530465255cb10b3dde945ad3743f7a58e79c" + end + + resource "azure-mgmt-keyvault" do + url "https://files.pythonhosted.org/packages/69/56/678b158efbd4b4d70151a0d688e11a529a42eac3ff426813878f253f76c4/azure-mgmt-keyvault-8.0.0.zip" + sha256 "2c974c6114d8d27152642c82a975812790a5e86ccf609bf370a476d9ea0d2e7d" + end + + resource "azure-mgmt-monitor" do + url "https://files.pythonhosted.org/packages/d1/07/6109120151e9bb768a581fccea4adfc1016bcf3cfe7a167431d400b277ac/azure-mgmt-monitor-2.0.0.zip" + sha256 "e7f7943fe8f0efe98b3b1996cdec47c709765257a6e09e7940f7838a0f829e82" + end + + resource "azure-mgmt-network" do + url "https://files.pythonhosted.org/packages/53/58/d8d097b24d8a73a48ad6691197ba787c6e9809f44debaab90d55a5b52663/azure-mgmt-network-17.1.0.zip" + sha256 "f47852836a5960447ab534784a9285696969f007744ba030828da2eab92621ab" + end + + resource "azure-mgmt-rdbms" do + url "https://files.pythonhosted.org/packages/40/b0/024e21f57fea50338ea799d36f21c124ac0a83cb63b2e7cff2b1a51ceedc/azure-mgmt-rdbms-8.0.0.zip" + sha256 "8b018543048fc4fddb4155d9f22246ad0c4be2fb582a29dbb21ec4022724a119" + end + + resource "azure-mgmt-redis" do + url "https://files.pythonhosted.org/packages/38/0c/1fae863867ab615c23fc62c1f1895aef20af432c79f9adf69b9a26139158/azure-mgmt-redis-12.0.0.zip" + sha256 "8ae563e3df82a2f206d0483ae6f05d93d0d1835111c0bbca7236932521eed356" + end + + resource "azure-mgmt-resource" do + url "https://files.pythonhosted.org/packages/9b/a9/4430d728c8b1db0ff2eac5b7a2b210c5ba70a7590613664e4c8e8fb10c11/azure-mgmt-resource-15.0.0.zip" + sha256 "80ecb69aa21152b924edf481e4b26c641f11aa264120bc322a14284811df9c14" + end + + resource "azure-mgmt-security" do + url "https://files.pythonhosted.org/packages/ad/42/24fd912d55213fd8d54da309137a1484d41b3dea48f49d22190cbe4bcde8/azure-mgmt-security-1.0.0.zip" + sha256 "ae1cff598dfe80e93406e524c55c3f2cbffced9f9b7a5577e3375008a4c3bcad" + end + + resource "azure-mgmt-sql" do + url "https://files.pythonhosted.org/packages/c4/1f/40af724de7a0b00f9a8986ec3554adf1c1cbc5f65c6401d3b0d7b86fc169/azure-mgmt-sql-1.0.0.zip" + sha256 "c7904f8798fbb285a2160c41c8bd7a416c6bd987f5d36a9b98c16f41e24e9f47" + end + + resource "azure-mgmt-storage" do + url "https://files.pythonhosted.org/packages/f5/a3/c1877ded12ea772db0e8ddb374c9252ae958e38ae85301731e927cb8253b/azure-mgmt-storage-17.0.0.zip" + sha256 "c0e3fd99028d98c80dddabe1c22dfeb3d694e5c1393c6de80766eb240739e4bc" + end + + resource "azure-mgmt-web" do + url "https://files.pythonhosted.org/packages/c1/8d/1f785a405bbeea818020a83dedbee6075b25c7354e7bb9f45010d4357468/azure-mgmt-web-1.0.0.zip" + sha256 "c4b218a5d1353cd7c55b39c9b2bd1b13bfbe3b8a71bc735122b171eab81670d1" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/9c/8d/70929dde76e24f252d6cf1fb3224ff5694ca96451d9e7023a43555fab760/boto3-1.40.56.tar.gz" + sha256 "c1afdb04dd27418fc58400434ab8e05998bb452b69c428168d9ada344fe6b93e" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/03/e48e32cd73a7f82bae267320f435526bb6c7ec8d3d72d69febd4ec5b8ee9/botocore-1.40.56.tar.gz" + sha256 "b29df3418a299609632cab240ee79275463b176ebeb3adc841ba367a3fa0c4db" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cheroot" do + url "https://files.pythonhosted.org/packages/f4/01/5ef06df932a974d016ab9d7f93e78740b572c4020016794fd4799cdc09c6/cheroot-11.0.0.tar.gz" + sha256 "dd414eda6bdb15140e864bc1d1c9625030375d14cbe0b290092867368924a52f" + end + + resource "cherrypy" do + url "https://files.pythonhosted.org/packages/93/e8/2f7ef142d1962d08a8885c4c9942212abecad6a80ccdd1620fd1f5c993fd/cherrypy-18.10.0.tar.gz" + sha256 "6c70e78ee11300e8b21c0767c542ae6b102a49cac5cfd4e3e313d7bb907c5891" + end + + resource "cherrypy-cors" do + url "https://files.pythonhosted.org/packages/e0/c3/d62ce781e2e2be9c2d4c5670f0bff518dc1b00396e2ce135dbfdcd4f1b9d/cherrypy-cors-1.7.0.tar.gz" + sha256 "83384cd664a7ab8b9ab7d4926fe9713acfe0bce3665ee28189a0fa04b9f212d6" + end + + resource "circuitbreaker" do + url "https://files.pythonhosted.org/packages/df/ac/de7a92c4ed39cba31fe5ad9203b76a25ca67c530797f6bb420fff5f65ccb/circuitbreaker-2.1.3.tar.gz" + sha256 "1a4baee510f7bea3c91b194dcce7c07805fe96c4423ed5594b75af438531d084" + end + + resource "coloredlogs" do + url "https://files.pythonhosted.org/packages/63/09/1da37a51b232eaf9707919123b2413662e95edd50bace5353a548910eb9d/coloredlogs-10.0.tar.gz" + sha256 "b869a2dda3fa88154b9dd850e27828d8755bfab5a838a1c97fbc850c6e377c36" + end + + resource "crcmod" do + url "https://files.pythonhosted.org/packages/6b/b0/e595ce2a2527e169c3bcd6c33d2473c1918e0b7f6826a043ca1245dd4e5b/crcmod-1.7.tar.gz" + sha256 "dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/9d/a4/e44218c2b394e31a6dd0d6b095c4e1f32d0be54c2a4b250032d717647bab/durationpy-0.10.tar.gz" + sha256 "1fa6893409a6e739c9c72334fc65cca1f355dbdd93405d30f726deb5bde42fba" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/c8/b0/7c8d4a03960da803a4c471545fd7b3404d2819f1585ba3f3d97e887aa91d/google-api-core-1.34.1.tar.gz" + sha256 "3399c92887a97d33038baa4bfd3bf07acc05d474b0171f333e1f641c1364e552" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/8e/5a/6f9b49d67ea91376305fdb8bbf2877c746d756e45fd8fb7d2e32d6dad19b/google_api_python_client-2.185.0.tar.gz" + sha256 "aa1b338e4bb0f141c2df26743f6b46b11f38705aacd775b61971cbc51da089c3" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/a8/af/5129ce5b2f9688d2fa49b463e544972a7c82b0fdb50980dafee92e121d9f/google_auth-2.41.1.tar.gz" + sha256 "b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2" + end + + resource "google-auth-httplib2" do + url "https://files.pythonhosted.org/packages/56/be/217a598a818567b28e859ff087f347475c807a5649296fb5a817c58dacef/google-auth-httplib2-0.2.0.tar.gz" + sha256 "38aa7badf48f974f1eb9861794e9c0cb2a0511a4ec0679b1f886d108f5640e05" + end + + resource "google-cloud-appengine-logging" do + url "https://files.pythonhosted.org/packages/9a/6e/260266e5fa7283b721bbef012f3223d514e2569446f56786fe0c80aa0fd4/google_cloud_appengine_logging-1.7.0.tar.gz" + sha256 "ea9ce73430cfc99f8957fd7df97733f9a759d4caab65e19d63a7474f012ffd94" + end + + resource "google-cloud-audit-log" do + url "https://files.pythonhosted.org/packages/c7/d2/ad96950410f8a05e921a6da2e1a6ba4aeca674bbb5dda8200c3c7296d7ad/google_cloud_audit_log-0.4.0.tar.gz" + sha256 "8467d4dcca9f3e6160520c24d71592e49e874838f174762272ec10e7950b6feb" + end + + resource "google-cloud-container" do + url "https://files.pythonhosted.org/packages/39/a5/f85a9b3320b4dd6e46482b213dedacac37f279d6baa157b6f17ddf55a0ca/google_cloud_container-2.60.0.tar.gz" + sha256 "98a5df609c3ea17b10768ef7dff16b40fd6f4db5f9f29b85054d9fee859c11ad" + end + + resource "google-cloud-core" do + url "https://files.pythonhosted.org/packages/d6/b8/2b53838d2acd6ec6168fd284a990c76695e84c65deee79c9f3a4276f6b4f/google_cloud_core-2.4.3.tar.gz" + sha256 "1fab62d7102844b278fe6dead3af32408b1df3eb06f5c7e8634cbd40edc4da53" + end + + resource "google-cloud-iam" do + url "https://files.pythonhosted.org/packages/f0/53/e73091b5f012e669d1ec501b70c99e8e8e86f6fa09cf56f47ae3fb0395a5/google_cloud_iam-2.20.0.tar.gz" + sha256 "06568ed8313f59fac46d21a5aae4c54eb1dda9f6bcecf2736c58ab1065dc9173" + end + + resource "google-cloud-kms" do + url "https://files.pythonhosted.org/packages/65/d9/67638b16326a689e5fc6d3e99d77500f008b6d830e912e67e984470de3f7/google-cloud-kms-1.3.0.tar.gz" + sha256 "ef62aba9f91d590755815e3e701aa5b09f507ee9b7a0acce087f5c427fe1649e" + end + + resource "google-cloud-logging" do + url "https://files.pythonhosted.org/packages/14/9c/d42ecc94f795a6545930e5f846a7ae59ff685ded8bc086648dd2bee31a1a/google_cloud_logging-3.12.1.tar.gz" + sha256 "36efc823985055b203904e83e1c8f9f999b3c64270bcda39d57386ca4effd678" + end + + resource "google-cloud-monitoring" do + url "https://files.pythonhosted.org/packages/0a/d8/2cb15aa01ace523422fed8bc4aa4fbfac81a31fa0591f01cbb0b72a194e0/google-cloud-monitoring-1.1.0.tar.gz" + sha256 "30632fa7aad044a3b4e2b662e6ba99f29f60064c1cfc88bbf4d175c1a12ced66" + end + + resource "google-cloud-resource-manager" do + url "https://files.pythonhosted.org/packages/cd/74/db14f34283b325b775b3287cd72ce8c43688bdea26801d02017a2ccded08/google_cloud_resource_manager-1.14.0.tar.gz" + sha256 "daa70a3a4704759d31f812ed221e3b6f7b660af30c7862e4a0060ea91291db30" + end + + resource "google-cloud-storage" do + url "https://files.pythonhosted.org/packages/16/88/fc34f8c177ad56408d42f4b54c10402366d309737fae206d59fa16a4a27a/google-cloud-storage-2.14.0.tar.gz" + sha256 "2d23fcf59b55e7b45336729c148bb1c464468c69d5efbaee30f7201dd90eb97e" + end + + resource "google-crc32c" do + url "https://files.pythonhosted.org/packages/19/ae/87802e6d9f9d69adfaedfcfd599266bf386a54d0be058b532d04c794f76d/google_crc32c-1.7.1.tar.gz" + sha256 "2bff2305f98846f3e825dbeec9ee406f89da7962accdb29356e4eadc251bd472" + end + + resource "google-resumable-media" do + url "https://files.pythonhosted.org/packages/58/5a/0efdc02665dca14e0837b62c8a1a93132c264bd02054a15abb2218afe0ae/google_resumable_media-2.7.2.tar.gz" + sha256 "5280aed4629f2b60b847b0d42f9857fd4935c11af266744df33d8074cae92fe0" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "grpc-google-iam-v1" do + url "https://files.pythonhosted.org/packages/05/6b/13dfa4e7e0551377b6ec234ab70f4e5d26779573a2b3bf41b3a8c86255a4/grpc-google-iam-v1-0.12.7.tar.gz" + sha256 "009197a7f1eaaa22149c96e5e054ac5934ba7241974e92663d8d3528a21203d1" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz" + sha256 "7be78388d6da1a25c0d5ec506523db58b18be22d9c37d8d3a32c08be4987bd73" + end + + resource "grpcio-status" do + url "https://files.pythonhosted.org/packages/62/5e/7b4c5c6e0adeeb981f1e7e1a39da3d75ff8f45bc24a74171f5eb1557d2e7/grpcio-status-1.49.0rc1.tar.gz" + sha256 "9a9253d863dba4c573a1734055c5f63fe5b9fc49feff55099fe79866ae64c877" + end + + resource "httpagentparser" do + url "https://files.pythonhosted.org/packages/bc/4d/1fc46c8a2c9a0ceb9e9580d7ce92bf764c373deb7af61fde2fd7b5516495/httpagentparser-1.9.5.tar.gz" + sha256 "53cefd9d65990f6fe59c0378cad8ea1b9df8f770d2e8bd9d8762edae033be80a" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httplib2shim" do + url "https://files.pythonhosted.org/packages/5e/bf/d2762b70dd184959ac03f1ccbb61bff5b8bbfa9c0b7cc8ed522b963cd198/httplib2shim-0.0.3.tar.gz" + sha256 "7c61daebd93ed7930df9ded4dbf47f87d35a8f29363d6e399fbf9fec930f8d17" + end + + resource "humanfriendly" do + url "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz" + sha256 "6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "jaraco-collections" do + url "https://files.pythonhosted.org/packages/fa/d2/751000cf702676dbb78f97728f4d52b029e817e2b3c94088dfe5c70ff46d/jaraco_collections-5.2.1.tar.gz" + sha256 "dab81970bad6f0ab53b20745f1b01da37926e4c0fcd425046aa45e0d8efa18ed" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jaraco-text" do + url "https://files.pythonhosted.org/packages/4f/00/1b4dbbc5c6dcb87a4278cc229b2b560484bf231bba7922686c5139e5f934/jaraco_text-4.0.0.tar.gz" + sha256 "5b71fecea69ab6f939d4c906c04fee1eda76500d1641117df6ec45b865f10db0" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" + sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/ef/55/3f880ef65f559cbed44a9aa20d3bdbc219a2c3a3bac4a30a513029b03ee9/kubernetes-34.1.0.tar.gz" + sha256 "8fe8edb0b5d290a2f3ac06596b23f87c658977d46b5f8df9d0f4ea83d0003912" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/cf/0e/c857c46d653e104019a84f22d4494f2119b4fe9f896c92b4b864b3b045cc/msal-1.34.0.tar.gz" + sha256 "76ba83b716ea5a6d75b0279c0ac353a0e05b820ca1f6682c0eb7f45190c43c2f" + end + + resource "msal-extensions" do + url "https://files.pythonhosted.org/packages/a4/9c/57f1a1023b6f6560180163a92fdb307672ed50e74e2e8328b69954ccc5e9/msal-extensions-0.3.1.tar.gz" + sha256 "d9029af70f2cbdc5ad7ecfed61cb432ebe900484843ccf72825445dbfe62d311" + end + + resource "msgraph-core" do + url "https://files.pythonhosted.org/packages/35/94/e2a15b577044b6b0e4b610a26fcd4439863d8d21bda419e0fd24580316cd/msgraph-core-0.2.2.tar.gz" + sha256 "147324246788abe8ed7e05534cd9e4e0ec98b33b30e011693b8d014cebf97f63" + end + + resource "msrest" do + url "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip" + sha256 "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "oauth2client" do + url "https://files.pythonhosted.org/packages/a6/7b/17244b1083e8e604bf154cf9b716aecd6388acd656dd01893d0d244c94d9/oauth2client-4.1.3.tar.gz" + sha256 "d486741e451287f69568a4d26d70d9acd73a2bbfa275746c535b4209891cccc6" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "oci" do + url "https://files.pythonhosted.org/packages/81/71/43169e5f9b1a63a355ec31281466688bf24d717eecc5fed234c1fba2a51d/oci-2.161.1.tar.gz" + sha256 "e040ef83ad9497351fe9f49a22f22fe8ffcae18abb7685f080a7444a98f6e680" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/08/d8/0f354c375628e048bd0570645b310797299754730079853095bf000fba69/opentelemetry_api-1.38.0.tar.gz" + sha256 "f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12" + end + + resource "oss2" do + url "https://files.pythonhosted.org/packages/df/b5/f2cb1950dda46ac2284d6c950489fdacd0e743c2d79a347924d3cc44b86f/oss2-2.19.1.tar.gz" + sha256 "a8ab9ee7eb99e88a7e1382edc6ea641d219d585a7e074e3776e9dec9473e59c1" + end + + resource "policyuniverse" do + url "https://files.pythonhosted.org/packages/03/a2/6cf14186b746fbcab73e507968e0b1927ad2e91dcb67af967f65d6cbe6c1/policyuniverse-1.5.1.20231109.tar.gz" + sha256 "74e56d410560915c2c5132e361b0130e4bffe312a2f45230eac50d7c094bc40a" + end + + resource "portalocker" do + url "https://files.pythonhosted.org/packages/ed/d3/c6c64067759e87af98cc668c1cc75171347d0f1577fab7ca3749134e3cd4/portalocker-2.10.1.tar.gz" + sha256 "ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f" + end + + resource "portend" do + url "https://files.pythonhosted.org/packages/b7/57/be90f42996fc4f57d5742ef2c95f7f7bb8e9183af2cc11bff8e7df338888/portend-3.2.1.tar.gz" + sha256 "aa9d40ab1f9e14bdb7d401f42210df35d017c9b97991baeb18568cedfb8c6489" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/f4/ac/87285f15f7cce6d4a008f33f1757fb5a13611ea8914eb58c3d0d26243468/proto_plus-1.26.1.tar.gz" + sha256 "21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/55/5b/e3d951e34f8356e5feecacd12a8e3b258a1da6d9a03ad1770f28925f29bc/protobuf-3.20.3.tar.gz" + sha256 "2e3427429c9cffebf259491be0af70189607f365c2f41c7c3764af6f337105f2" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pydo" do + url "https://files.pythonhosted.org/packages/2a/4f/cd5f53bbabdd2df81c368907d7f5c9fc9f8545c8097834c7d211377f0f5d/pydo-0.18.0.tar.gz" + sha256 "4bc0ec4ac01539dae9cbb357d6a3b69c0f5befdb17b0b4e85582e42d4c3e074e" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/ad/99/5b2e99737edeb28c71bcbec5b5dda19d0d9ef3ca3e92e3e925e7c0bb364c/python-dateutil-2.8.0.tar.gz" + sha256 "c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sqlitedict" do + url "https://files.pythonhosted.org/packages/12/9a/7620d1e9dcb02839ed6d4b14064e609cdd7a8ae1e47289aa0456796dd9ca/sqlitedict-2.1.0.tar.gz" + sha256 "03d9cfb96d602996f1d4c2db2856f1224b96a9c431bdd16e78032a72940f9e8c" + end + + resource "tempora" do + url "https://files.pythonhosted.org/packages/24/64/a255efe5edd367d12b770b3514194efdc1c97e5ed6ce6e8105d834750dfc/tempora-5.8.1.tar.gz" + sha256 "abb5d9ec790cc5e4f9431778029ba3e3d9ba9bd50cb306dad824824b2b362dcd" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/98/60/f174043244c5306c9988380d2cb10009f91563fc4b31293d27e17201af56/uritemplate-4.2.0.tar.gz" + sha256 "480c2ed180878955863323eea31b0ede668795de182617fef9c6ca09e6ec9d0e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "zc-lockfile" do + url "https://files.pythonhosted.org/packages/10/9a/2fef89272d98b799e4daa50201c5582ec76bdd4e92a1a7e3deb74c52b7fa/zc_lockfile-4.0.tar.gz" + sha256 "d3ab0f53974296a806db3219b9191ba0e6d5cbbd1daa2e0d17208cb9b29d2102" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + # Fix to support Python 3.14 + # PR ref: https://github.com/nccgroup/ScoutSuite/pull/1718 + patch do + url "https://github.com/nccgroup/ScoutSuite/commit/e1ae94ea0ccb5fafd27645baff5570fd0bac4030.patch?full_index=1" + sha256 "8bae83f393c06c5927567504d5d4d9c361e48b6115154f583be187f022e65ed9" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/scout --version").chomp + aws_output = "Authentication failure: Unable to locate credentials" + assert_match aws_output, shell_output("#{bin}/scout aws 2>&1", 101) + aliyun_output = "scout aliyun: error: one of the arguments --access-keys is required" + assert_match aliyun_output, shell_output("#{bin}/scout aliyun 2>&1", 2) + end +end diff --git a/Formula/s/scrapy.rb b/Formula/s/scrapy.rb new file mode 100644 index 0000000000000..fba71c0ce4662 --- /dev/null +++ b/Formula/s/scrapy.rb @@ -0,0 +1,214 @@ +class Scrapy < Formula + include Language::Python::Virtualenv + + desc "Web crawling & scraping framework" + homepage "https://scrapy.org" + url "https://files.pythonhosted.org/packages/be/6c/bab0c01c5c50842548f0b5e936dfd2520a1ce84c171472c2cfe4d0599841/scrapy-2.13.3.tar.gz" + sha256 "bf17588c10e46a9d70c49a05380b749e3c7fba58204a367a5747ce6da2bd204d" + license "BSD-3-Clause" + head "https://github.com/scrapy/scrapy.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0e6ad00e1e92b18d769be87dcd6c9987b9585f2ffb44806af8654316395d20a1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4cca4260ed48e5e17c6bc42ee51117c600e8a6dcfb6470d0fbc3829439addcd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fc12b6a66f8d955c27d37d7a58c7dc6e9138774815d576594873839db364e89" + sha256 cellar: :any_skip_relocation, sonoma: "0ec79422d86b905572c54163b6296313452bc684ae7a0999a08ac1f5182e5d31" + sha256 cellar: :any_skip_relocation, arm64_linux: "9bd8b58fba97b7307efdfaa03af3925dd0c1d3238d8b8f0c7ef484669ec532c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "270fc2714a373cdbc178c0a88a1ffa7cae49021cb99f940070456657471606d9" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "automat" do + url "https://files.pythonhosted.org/packages/e3/0f/d40bbe294bbf004d436a8bcbcfaadca8b5140d39ad0ad3d73d1a8ba15f14/automat-25.4.16.tar.gz" + sha256 "0017591a5477066e90d26b0e696ddc143baafd87b588cfac8100bc6be9634de0" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "constantly" do + url "https://files.pythonhosted.org/packages/4d/6f/cb2a94494ff74aa9528a36c5b1422756330a75a8367bf20bd63171fc324d/constantly-23.10.4.tar.gz" + sha256 "aa92b70a33e2ac0bb33cd745eb61776594dc48764b06c35e0efd050b7f1c7cbd" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/72/0a/c3ea9573b1dc2e151abfe88c7fe0c26d1892fe6ed02d0cdb30f0d57029d5/cssselect-1.3.0.tar.gz" + sha256 "57f8a99424cfab289a1b6a816a43075a4b00948c86b4dcf3ef4ee7e15f7ab0c7" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "hyperlink" do + url "https://files.pythonhosted.org/packages/3a/51/1947bd81d75af87e3bb9e34593a4cf118115a8feb451ce7a69044ef1412e/hyperlink-21.0.0.tar.gz" + sha256 "427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "incremental" do + url "https://files.pythonhosted.org/packages/27/87/156b374ff6578062965afe30cc57627d35234369b3336cf244b240c8d8e6/incremental-24.7.2.tar.gz" + sha256 "fb4f1d47ee60efe87d4f6f0ebb5f70b9760db2b2574c59c8e8912be4ebd464c9" + end + + resource "itemadapter" do + url "https://files.pythonhosted.org/packages/e9/50/2fd91416acfbd316b58de909cfc2a5c2daaa4ced67fb76cb0dedcbd13197/itemadapter-0.12.2.tar.gz" + sha256 "8e05c07cea966a7a8c4f096150ee2c91d9b4104a76f9afd029b235e1b564a61f" + end + + resource "itemloaders" do + url "https://files.pythonhosted.org/packages/b6/3e/c549370e95c9dc7ec5e155c075e2700fa75abe5625608a4ce5009eabe0bf/itemloaders-1.3.2.tar.gz" + sha256 "4faf5b3abe83bf014476e3fd9ccf66867282971d9f1d4e96d9a61b60c3786770" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "parsel" do + url "https://files.pythonhosted.org/packages/f6/df/acd504c154c0b9028b0d8491a77fdd5f86e9c06ee04f986abf85e36d9a5f/parsel-1.10.0.tar.gz" + sha256 "14f17db9559f51b43357b9dfe43cec870a8efb5ea4857abb624ec6ff80d8a080" + end + + resource "protego" do + url "https://files.pythonhosted.org/packages/19/9b/9c3a649167c7e43a0818df515d515e66d95a261fdfdf2a6afd45be9db696/protego-0.5.0.tar.gz" + sha256 "225dee0acfcc71de8c6f7cef9c618e5a9d3e7baa7ae1470b8d076a064033c463" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pyasn1-modules" do + url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" + sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" + end + + resource "pydispatcher" do + url "https://files.pythonhosted.org/packages/21/db/030d0700ae90d2f9d52c2f3c1f864881e19cef8cba3b0a08759c8494c19c/PyDispatcher-2.0.7.tar.gz" + sha256 "b777c6ad080dc1bad74a4c29d6a46914fa6701ac70f94b0d66fbcfde62f5be31" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "queuelib" do + url "https://files.pythonhosted.org/packages/4c/78/9ace6888cf6d390c9aec3ba93020838b08934959b544a7f10b15db815d29/queuelib-1.8.0.tar.gz" + sha256 "582bc65514481100b0539bd671da6b355b878869cfc77d92c63b75fcc9cf8e27" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/72/97/bf44e6c6bd8ddbb99943baf7ba8b1a8485bcd2fe0e55e5708d7fee4ff1ae/requests_file-2.1.0.tar.gz" + sha256 "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658" + end + + resource "service-identity" do + url "https://files.pythonhosted.org/packages/07/a5/dfc752b979067947261dbbf2543470c58efe735c3c1301dd870ef27830ee/service_identity-24.2.0.tar.gz" + sha256 "b8683ba13f0d39c6cd5d625d2c5f65421d6d707b013b375c355751557cbe8e09" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "twisted" do + url "https://files.pythonhosted.org/packages/13/0f/82716ed849bf7ea4984c21385597c949944f0f9b428b5710f79d0afc084d/twisted-25.5.0.tar.gz" + sha256 "1deb272358cb6be1e3e8fc6f9c8b36f78eb0fa7c2233d2dbe11ec6fee04ea316" + + # Fix asyncio error with Python 3.14, remove in next release + # PR ref: https://github.com/twisted/twisted/pull/12508 + patch do + url "https://github.com/twisted/twisted/commit/c8a4c700a71c283bd65faee69820f88ec97966cb.patch?full_index=1" + sha256 "04b849f18e6ef01e7ee2903dba13ffa8bcb04c6d9c182d25410605320d819bd2" + end + patch do + url "https://github.com/twisted/twisted/commit/69b81f9038eea5ef60c30a3460abb4cc26986f72.patch?full_index=1" + sha256 "f999fc976327e955fbe82348dfd8c336925bc1f87cfaf4bd4c95deeb0570116d" + end + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "w3lib" do + url "https://files.pythonhosted.org/packages/bf/7d/1172cfaa1e29beb9bf938e484c122b3bdc82e8e37b17a4f753ba6d6e009f/w3lib-2.3.1.tar.gz" + sha256 "5c8ac02a3027576174c2b61eb9a2170ba1b197cae767080771b6f1febda249a4" + end + + resource "zope-interface" do + url "https://files.pythonhosted.org/packages/88/3a/7fcf02178b8fad0a51e67e32765cd039ae505d054d744d76b8c2bbcba5ba/zope_interface-8.0.1.tar.gz" + sha256 "eba5610d042c3704a48222f7f7c6ab5b243ed26f917e2bc69379456b115e02d1" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/scrapy version") + + system bin/"scrapy", "startproject", "brewproject" + cd testpath/"brewproject" do + system bin/"scrapy", "genspider", "-t", "basic", "brewspider", "brew.sh" + assert_match "INFO: Spider closed (finished)", shell_output("#{bin}/scrapy crawl brewspider 2>&1") + end + end +end diff --git a/Formula/s/scrcpy.rb b/Formula/s/scrcpy.rb new file mode 100644 index 0000000000000..8d47d7982005e --- /dev/null +++ b/Formula/s/scrcpy.rb @@ -0,0 +1,101 @@ +class Scrcpy < Formula + desc "Display and control your Android device" + homepage "https://github.com/Genymobile/scrcpy" + url "https://github.com/Genymobile/scrcpy/archive/refs/tags/v3.3.3.tar.gz" + sha256 "87fcd360a6bb6ca070ffd217bd33b33fb808b0a1572b464da51dde3fd3f6f60e" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "74785c1f6ebb9cef76e0c0dcbeafcbeaeb8aa0d61dbafcb3dd38ceba88ab6ff6" + sha256 arm64_sequoia: "38616ad4c6e968333bbcf8982ba6bcb6357de28890f1cc4cf2694615f7344dc7" + sha256 arm64_sonoma: "d85c4bc680bd75a5ee86ed0e6e0362b6313b1368db04ffe2d2fb097fca966ab5" + sha256 sonoma: "e3423fdcf3d39e11d0009e33b4e46361192542fa2f1bb67ad39f15599270a40e" + sha256 arm64_linux: "64876167d31a5d5037e693eca7c101aa9a5b6926b11010996e1aabccd89ad908" + sha256 x86_64_linux: "166b16f1e80dcbab06047b063f47beeb8e8c0bda23e33469507599cdc8474ff6" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "libusb" + depends_on "sdl2" + + resource "prebuilt-server" do + url "https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-server-v3.3.3", using: :nounzip + sha256 "7e70323ba7f259649dd4acce97ac4fefbae8102b2c6d91e2e7be613fd5354be0" + + livecheck do + formula :parent + end + end + + def install + odie "prebuilt-server resource needs to be updated" if version != resource("prebuilt-server").version + + buildpath.install resource("prebuilt-server") + cp "scrcpy-server-v#{version}", "prebuilt-server.jar" + + system "meson", "setup", "build", "-Dprebuilt_server=#{buildpath}/prebuilt-server.jar", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def caveats + <<~EOS + At runtime, adb must be accessible from your PATH. + + You can install adb from Homebrew Cask: + brew install --cask android-platform-tools + EOS + end + + test do + fakeadb = (testpath/"fakeadb.sh") + + # When running, scrcpy calls adb five times: + # - adb start-server + # - adb devices -l + # - adb -s SERIAL push ... (to push scrcpy-server.jar) + # - adb -s SERIAL reverse ... tcp:PORT ... + # - adb -s SERIAL shell ... + # However, exiting on $3 = shell didn't work properly, so instead + # fakeadb exits on $3 = reverse + + fakeadb.write <<~SH + #!/bin/sh + echo "$@" >> #{testpath/"fakeadb.log"} + + if [ "$1" = "devices" ]; then + echo "List of devices attached" + echo "emulator-1337 device product:sdk_gphone64_x86_64 model:sdk_gphone64_x86_64 device:emulator64_x86_64_arm64 transport_id:1" + fi + + if [ "$3" = "reverse" ]; then + exit 42 + fi + SH + + fakeadb.chmod 0755 + ENV["ADB"] = fakeadb + + # It's expected to fail after adb reverse step because fakeadb exits + # with code 42 + out = shell_output("#{bin}/scrcpy --no-window --record=file.mp4 -p 1337 2>&1", 1) + assert_match(/ 42/, out) + + log_content = File.read(testpath/"fakeadb.log") + + # Check that it used port we've specified + assert_match(/tcp:1337/, log_content) + + # Check that it tried to push something from its prefix + assert_match(/push #{prefix}/, log_content) + end +end diff --git a/Formula/s/screen.rb b/Formula/s/screen.rb new file mode 100644 index 0000000000000..a86ec8c0a2fe8 --- /dev/null +++ b/Formula/s/screen.rb @@ -0,0 +1,49 @@ +class Screen < Formula + desc "Terminal multiplexer with VT100/ANSI terminal emulation" + homepage "https://www.gnu.org/software/screen/" + url "https://ftpmirror.gnu.org/gnu/screen/screen-5.0.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/screen/screen-5.0.1.tar.gz" + sha256 "2dae36f4db379ffcd14b691596ba6ec18ac3a9e22bc47ac239789ab58409869d" + license "GPL-3.0-or-later" + head "https://git.savannah.gnu.org/git/screen.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "7257e441151c134ddfaa36a4ebdddf11256d8eeca39f89a3f573970e95857dda" + sha256 arm64_sequoia: "9430cdd222c4561bdfeee141fa6e334dc0a10d5fe7c4489ec287c9d44cfc6b6e" + sha256 arm64_sonoma: "2e75496e4bed33bafec7fbc33ac0b9ecfedd5afb0c283dbca100dfc5efc57f43" + sha256 arm64_ventura: "cfe661d88372ca2f8df595ed7c46a859bf4871c435c3a499b4e2cd4754732dfa" + sha256 sonoma: "5306e70837deb34094054f1264e76455b7484718ee4536b0343351a852a895d1" + sha256 ventura: "d5c01fece1e58f947c7839f9ae8a0d6482925c3e36202ef66fb90d5d039287c1" + sha256 arm64_linux: "a2eaa7bce2a69592916bb6a278142910411a81ed2f091a38fcb6425b6b7ff765" + sha256 x86_64_linux: "a2319a7727c30f53ed3ef157ad24ee761fc542e65ef1ed8c985ed6abcbf4a29c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + + on_linux do + depends_on "linux-pam" + end + + def install + args = %W[ + --mandir=#{man} + --infodir=#{info} + --enable-pam + ] + + system "./autogen.sh" + + # Exclude unrecognized options + std_args = std_configure_args.reject { |s| s["--disable-debug"] || s["--disable-dependency-tracking"] } + system "./configure", *args, *std_args + system "make", "install" + end + + test do + system bin/"screen", "-h" + end +end diff --git a/Formula/s/screenfetch.rb b/Formula/s/screenfetch.rb new file mode 100644 index 0000000000000..2df116a667634 --- /dev/null +++ b/Formula/s/screenfetch.rb @@ -0,0 +1,32 @@ +class Screenfetch < Formula + desc "Generate ASCII art with terminal, shell, and OS info" + homepage "https://github.com/KittyKatt/screenFetch" + url "https://github.com/KittyKatt/screenFetch/archive/refs/tags/v3.9.9.tar.gz" + sha256 "65ba578442a5b65c963417e18a78023a30c2c13a524e6e548809256798b9fb84" + license "GPL-3.0-or-later" + head "https://github.com/KittyKatt/screenFetch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c72a4b90d0fb8ffa29a46c886c26d93470d5a46a447edbe880e736c4223a4e14" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c72a4b90d0fb8ffa29a46c886c26d93470d5a46a447edbe880e736c4223a4e14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c72a4b90d0fb8ffa29a46c886c26d93470d5a46a447edbe880e736c4223a4e14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c72a4b90d0fb8ffa29a46c886c26d93470d5a46a447edbe880e736c4223a4e14" + sha256 cellar: :any_skip_relocation, sonoma: "b68576c5aa125ad2165db21d10aab8d618bf1b39f984d7aba6f9b5ea49024e42" + sha256 cellar: :any_skip_relocation, ventura: "b68576c5aa125ad2165db21d10aab8d618bf1b39f984d7aba6f9b5ea49024e42" + sha256 cellar: :any_skip_relocation, arm64_linux: "a427038281e7efce1130d08f039d557bf1338d3f12a4ab3d316454496bde26b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a427038281e7efce1130d08f039d557bf1338d3f12a4ab3d316454496bde26b4" + end + + # `screenfetch` contains references to `/usr/local` that + # are erroneously relocated in non-default prefixes. + pour_bottle? only_if: :default_prefix + + def install + bin.install "screenfetch-dev" => "screenfetch" + man1.install "screenfetch.1" + end + + test do + system bin/"screenfetch" + end +end diff --git a/Formula/s/screenpipe.rb b/Formula/s/screenpipe.rb new file mode 100644 index 0000000000000..a0e6c35ba8ad9 --- /dev/null +++ b/Formula/s/screenpipe.rb @@ -0,0 +1,57 @@ +class Screenpipe < Formula + desc "Library to build personalized AI powered by what you've seen, said, or heard" + homepage "https://github.com/mediar-ai/screenpipe" + url "https://github.com/mediar-ai/screenpipe/archive/refs/tags/v0.2.13.tar.gz" + sha256 "eb3599daabc1312b5c1a7799c1ec8ab715aa02d9216a6aa42d930039c84a70c9" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_sequoia: "e19fe81711f2b581441d5ef4e4894229ff0b40bcb7ec97620649b41ccfac3784" + sha256 cellar: :any, arm64_sonoma: "b029a73f249a978552cc4d6e7fcd35655bfc466f0f343a8dc7ef3e47feeb6f07" + sha256 cellar: :any, sonoma: "fedcdd0173129e061e5dec07b3ee9f178cabb5af29e775038a29de39eec50a63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c05236a8906e59fcb9a3dd1a8fbe3d0962717af731b1d8894f70235b5b6b6cc6" + end + + # Unable to update as newer versions need Bun. + # Older version used by formula doesn't build with newer Rust. + deprecate! date: "2025-08-25", because: :does_not_build + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "ffmpeg" + depends_on macos: :sonoma + + uses_from_macos "llvm" # for libclang + + on_linux do + depends_on "alsa-lib" + depends_on "dbus" + depends_on "libxcb" + depends_on "openssl@3" + depends_on "tesseract" + depends_on "xz" + end + + def install + features = ["--features", "metal,pipes"] if OS.mac? && Hardware::CPU.arm? + system "cargo", "install", *features, *std_cargo_args(path: "screenpipe-server") + lib.install "screenpipe-vision/lib/libscreenpipe_#{Hardware::CPU.arch}.dylib" if OS.mac? + end + + test do + assert_match version.to_s, shell_output("#{bin}/screenpipe -V") + + log_file = testpath/".screenpipe/screenpipe.#{time.strftime("%Y-%m-%d")}.log" + pid = spawn bin/"screenpipe", "--disable-vision", "--disable-audio", "--disable-telemetry" + sleep 200 + + assert_path_exists log_file + assert_match(/INFO.*screenpipe/, File.read(log_file)) + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/screenresolution.rb b/Formula/s/screenresolution.rb new file mode 100644 index 0000000000000..daabda3249bb1 --- /dev/null +++ b/Formula/s/screenresolution.rb @@ -0,0 +1,35 @@ +class Screenresolution < Formula + desc "Get, set, and list display resolution" + homepage "https://github.com/jhford/screenresolution" + url "https://github.com/jhford/screenresolution/archive/refs/tags/v1.6.tar.gz" + sha256 "d3761663eaf585b014391a30a77c9494a6404e78e8a4863383e12c59b0f539eb" + license "GPL-2.0-only" + head "https://github.com/jhford/screenresolution.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d432fd66f354ab0bd134e8062d7777d0b2cee92b84cf8331b140e307b6c65e0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b35c70febc8d234c5a664507d682eeb80ff1541bde35128f42836559088e9290" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e80216f98204a4f06ad9cfdcfd8fbab00c6ddfbc26773aa0920dcaf4fd86d686" + sha256 cellar: :any_skip_relocation, arm64_ventura: "115831028fe4da37486b48aabc70fc13fde8a297aa2e3d5eee9ea822a2727053" + sha256 cellar: :any_skip_relocation, arm64_monterey: "305ef97e31c6a2cdafb1a9de02787e2861b3c9de0165d45dde1c56185b8e1e64" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "65567f2a43d8744ca821b29e001d92b18f25750267714f4b42df0b2c24cfd3a9" + sha256 cellar: :any_skip_relocation, sonoma: "578fc2c2d79a13353fdc46c1e8f0a00c2c9c7d2a4f79e80bc0942f8b649e2b31" + sha256 cellar: :any_skip_relocation, ventura: "25f283268c93a7d6be4fa71f4eb08c0f618206a3beaf365338d52a11af0513e9" + sha256 cellar: :any_skip_relocation, monterey: "961b7f2ee25f6df43ac16338dc3e7b3fc23f76985a672084c37e193e1570ad0b" + sha256 cellar: :any_skip_relocation, big_sur: "234674351827f392bc7de0eb7ddb9855e6254c83a5bade7fa93b9e09ac71218b" + sha256 cellar: :any_skip_relocation, catalina: "53636977689925be4ef97933dc0f1b411f0cd82f71a268cfe7c6f90d5a294f97" + end + + depends_on :macos + + def install + system "make", "CC=#{ENV.cc}" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"screenresolution", "get" + end +end diff --git a/Formula/s/scriptisto.rb b/Formula/s/scriptisto.rb new file mode 100644 index 0000000000000..6170d680ac56f --- /dev/null +++ b/Formula/s/scriptisto.rb @@ -0,0 +1,46 @@ +class Scriptisto < Formula + desc "Language-agnostic \"shebang interpreter\" to write scripts in compiled languages" + homepage "https://github.com/igor-petruk/scriptisto" + url "https://github.com/igor-petruk/scriptisto/archive/refs/tags/v2.2.0.tar.gz" + sha256 "192d20885b563eeaf66766695314ab3e2711dc10c44f938aeeee6271e9720397" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d2bf35c77bc8003d0139ced824741d362edf5d789af0ae162228fcd95c33b478" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b817e471743b6cc577956edf5f23e94c9f3187e7acd2836c1536d61555bb70ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "962438fd18d9f434b593e0b4f3e5ae907993a6538c225f8a7c92adae3ded797c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "02658b3baaeb3fba08067cb154742902c83e0cc5365428fecea581d59075f9b1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "019c58e7262b36e0c58dfe2b691c240ed95a61fbf1e632628794856b28262f3f" + sha256 cellar: :any_skip_relocation, sonoma: "4c586e045919918edbd2db012047eb30954a21c7f7c1758e0d1c1aeb90aca9a2" + sha256 cellar: :any_skip_relocation, ventura: "7cc46782245c45d92f7729c387d01fb8aafab7412db46841cbc050f6f8868402" + sha256 cellar: :any_skip_relocation, monterey: "71f480bb22ef0b004d8659d50226118ef2236178d9e4a884777a2b76bcfc40d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fa6858d7267ea5b8447b5a841dea92c4a3951fdc62d5e347ccff232b1893e41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aeb6d0436c7092c1056e3e1baca883a891a3dfb700517d28b6f07e4665151f3a" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"hello-c.c").write <<~C + #!/usr/bin/env scriptisto + + // scriptisto-begin + // script_src: main.c + // build_cmd: cc -O2 main.c -o ./script + // scriptisto-end + + #include + int main() + { + puts("Hello, world!"); + return 0; + } + C + assert_equal "Hello, world!\n", shell_output("#{bin}/scriptisto ./hello-c.c") + end +end diff --git a/Formula/s/scrub.rb b/Formula/s/scrub.rb new file mode 100644 index 0000000000000..46d1861a54206 --- /dev/null +++ b/Formula/s/scrub.rb @@ -0,0 +1,56 @@ +class Scrub < Formula + desc "Writes patterns on magnetic media to thwart data recovery" + homepage "https://github.com/chaos/scrub" + url "https://github.com/chaos/scrub/releases/download/2.6.1/scrub-2.6.1.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/s/scrub/scrub_2.6.1.orig.tar.gz" + sha256 "43d98d3795bc2de7920efe81ef2c5de4e9ed1f903c35c939a7d65adc416d6cb8" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "88a91308307502a58e67619fac1f906ec12cc8f8199f0a409312a82ce4fe0c3e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b5104b893d57f47767bfd57cd943551d95cd9b322645a56fdb18ba325904b02" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aeddb0ac73a407335391aa2aceb2c1fbb2a2219269fd2a5637b3fa967d93f216" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8c0a89beb38195422043a647edf9873853d2683b974a0ef09759dbb9bc2eaec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e5884d933276054cc834373533861549b84313fac6acc9d9557897791d2ec85e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5ae1b98ef6a66707490f04eb3d5a14c7536b9509c90213fb3bb397a993ca79cc" + sha256 cellar: :any_skip_relocation, sonoma: "5cda5cf5824fd030c5b1c20d9fe864ec824e095a4e3948d7a35ef48b0327b016" + sha256 cellar: :any_skip_relocation, ventura: "73b9e1b20123abeb6c60b24965757c0b16eafd75fbc269e1c10a895c1f62fc1c" + sha256 cellar: :any_skip_relocation, monterey: "5a3fb4dfca2c4eb938f5c6a5d51071af0b0cc1dee2043a4af5eb970a6ae14c71" + sha256 cellar: :any_skip_relocation, big_sur: "ebb6d9f6cab14e6a4d7cab7336aa033c7e02b8ec50b4c0af6f8734ce92766e58" + sha256 cellar: :any_skip_relocation, catalina: "01146146976c9be7bf2b74b018e7b98a158407f7318ffe604bee4603270e6f4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "13552750a7d0fe72a0aba49be8fa09171ef38c2601a0ea859ae279795f076255" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a70d052c1010c990d18bf17558ef04b4c9949ce65e42c25fddc9f8fcff2f371" + end + + head do + url "https://github.com/chaos/scrub.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + args = [] + if build.head? + system "./autogen.sh" + elsif OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + path = testpath/"foo.txt" + path.write "foo" + + output = shell_output("#{bin}/scrub -r -p dod #{path}") + assert_match "scrubbing #{path}", output + refute_path_exists path + end +end diff --git a/Formula/s/scryer-prolog.rb b/Formula/s/scryer-prolog.rb new file mode 100644 index 0000000000000..5d5d29c5d888e --- /dev/null +++ b/Formula/s/scryer-prolog.rb @@ -0,0 +1,37 @@ +class ScryerProlog < Formula + desc "Modern ISO Prolog implementation written mostly in Rust" + homepage "https://www.scryer.pl" + url "https://github.com/mthom/scryer-prolog/archive/refs/tags/v0.10.0.tar.gz" + sha256 "353eca4eea539e0a0eedb1572736bfcc64c5fb6fd2da3b8737c513ad62f60f3b" + license "BSD-3-Clause" + head "https://github.com/mthom/scryer-prolog.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d48c0a73df9bf67c54bc855ed865155ad79f41a4561591ed3f7359c3e9d2022d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "da512766a1a27fe22eb01c1ae6a7c89dd934425d2388d1d482512689fedebd6e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b08c3101dbe3c77c75ab5025e9a4d2fc49c2ed1f17a9839d7357d6972db614db" + sha256 cellar: :any_skip_relocation, sonoma: "ff71107fc21ebf2fad8c3be28b9801f65fba480207d8300af56b8df3975f5c1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e3d6f8f168ef2b0bdd2c27755d68f1d6a8133fe9740e52d4914c509fca6e5fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "549989dbd09c1d6885e73357b5f2ba49e762bcbd3eaa0d35110832b0719db02e" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.pl").write <<~EOS + test :- + write('Hello from Scryer Prolog'). + EOS + + assert_equal "Hello from Scryer Prolog", shell_output("#{bin}/scryer-prolog -g 'test,halt' #{testpath}/test.pl") + end +end diff --git a/Formula/s/scrypt.rb b/Formula/s/scrypt.rb new file mode 100644 index 0000000000000..1e22f0e2a30a7 --- /dev/null +++ b/Formula/s/scrypt.rb @@ -0,0 +1,51 @@ +class Scrypt < Formula + desc "Encrypt and decrypt files using memory-hard password function" + homepage "https://www.tarsnap.com/scrypt.html" + url "https://www.tarsnap.com/scrypt/scrypt-1.3.3.tgz" + sha256 "1c2710517e998eaac2e97db11f092e37139e69886b21a1b2661f64e130215ae9" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ec74c8180728b4cf18c563e9e517833fe690d44d06fdd0b00440dcd9c911d5c6" + sha256 cellar: :any, arm64_sequoia: "086c6480fd2730ac530d61e01beafeb057e0ba787ecd7461015d2eebe2faf127" + sha256 cellar: :any, arm64_sonoma: "d3c54c7d270128101ecce159c9d199637da3e5d84b282c92e0a6cbc65d3962a1" + sha256 cellar: :any, arm64_ventura: "ca2d00727c2c9341fc476d525d5317cc04fdf8972ca73500b2b39d0e388306f7" + sha256 cellar: :any, sonoma: "a229f4170e58803a154fc60d7354497f0cb8ccb21f65b00cc1945ed81a9e7e6e" + sha256 cellar: :any, ventura: "cdd6ae43fbebe770617c06ad1a1ecdde3672f7d206503b169b073da5fd646987" + sha256 cellar: :any_skip_relocation, arm64_linux: "94cc29fdc84753347d35adcc2f4a58618979fcb4c6132caf3a9a0600738223d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7ea3f7f130c909269e84c6a6d70697f38589de63f248e6ffbb8d118dfac00d1" + end + + head do + url "https://github.com/Tarsnap/scrypt.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "openssl@3" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + require "expect" + require "pty" + + touch "homebrew.txt" + PTY.spawn(bin/"scrypt", "enc", "homebrew.txt", "homebrew.txt.enc") do |r, w, _pid| + r.expect "Please enter passphrase: " + w.write "Testing\n" + r.expect "Please confirm passphrase: " + w.write "Testing\n" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + + assert_path_exists testpath/"homebrew.txt.enc" + end +end diff --git a/Formula/s/scs.rb b/Formula/s/scs.rb new file mode 100644 index 0000000000000..8009c72e2cdfb --- /dev/null +++ b/Formula/s/scs.rb @@ -0,0 +1,51 @@ +class Scs < Formula + desc "Conic optimization via operator splitting" + homepage "https://web.stanford.edu/~boyd/papers/scs.html" + url "https://github.com/cvxgrp/scs/archive/refs/tags/3.2.9.tar.gz" + sha256 "f3d9095fb01fd634d12ccbe6f79ed2acbb7101ad57b723157d44a49cbe187669" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c13642cfe0453436d0f43eb39566f75e4f04c5849d4b973e317f7899a1672fc7" + sha256 cellar: :any, arm64_sequoia: "461fe0b74cc5dd41fd8a031ac729c6237314ede47f6d428496ef6074cc6e6bab" + sha256 cellar: :any, arm64_sonoma: "d2314d0694a4d2229a6db429a356a6440905b57c103614ee9727ec40a16a4c5a" + sha256 cellar: :any, sonoma: "4f24992de230bab0d597b13150db3b449efeaf277a2c0de28f3b02b9a2c2a45b" + sha256 cellar: :any_skip_relocation, arm64_linux: "915268f6799f763232f4e5ec19fc7fe515d01e3d6b1be601999a88592c575c5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4f323c865ab69e6d5235aeecf07387a9db01849082f82caeb1abb624eec1557" + end + + on_linux do + depends_on "openblas" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install "test/problems/random_prob" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + int main() { + ScsData *d; ScsCone *k; ScsSettings *stgs; + ScsSolution *sol = scs_calloc(1, sizeof(ScsSolution)); + ScsInfo info; + scs_int result; + + _scs_read_data("#{pkgshare}/random_prob", &d, &k, &stgs); + result = scs(d, k, stgs, sol, &info); + + _scs_free_data(d); _scs_free_data(k); _scs_free_sol(sol); + return result - SCS_SOLVED; + } + C + system ENV.cc, "test.c", "-I#{include}/scs", "-L#{lib}", "-lscsindir", + "-o", "testscsindir" + system "./testscsindir" + system ENV.cc, "test.c", "-I#{include}/scs", "-L#{lib}", "-lscsdir", + "-o", "testscsdir" + system "./testscsdir" + end +end diff --git a/Formula/s/scummvm-tools.rb b/Formula/s/scummvm-tools.rb new file mode 100644 index 0000000000000..53d371c7e5753 --- /dev/null +++ b/Formula/s/scummvm-tools.rb @@ -0,0 +1,63 @@ +class ScummvmTools < Formula + desc "Collection of tools for ScummVM" + homepage "https://www.scummvm.org/" + url "https://downloads.scummvm.org/frs/scummvm-tools/2.9.0/scummvm-tools-2.9.0.tar.xz" + sha256 "1b4bbd7a7ccf4584bfc2c0142b7c1b4e5db97c39d8d214757c72d50e0905b71d" + license "GPL-3.0-or-later" + revision 5 + head "https://github.com/scummvm/scummvm-tools.git", branch: "master" + + livecheck do + url "https://www.scummvm.org/downloads/" + regex(/href=.*?scummvm-tools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f127057fdb6f7cf205adaf488d4bd1ac333e5594b1744e3a2781c54f0e23b444" + sha256 cellar: :any, arm64_sequoia: "ef18a6418ce11c2673af53dcc1b2a21b9040545afe110d2d99e0c88170a2c398" + sha256 cellar: :any, arm64_sonoma: "8180c9d89327d44d353e8f0684b75a72156fee9d245a12f8f3620b41096a25be" + sha256 cellar: :any, arm64_ventura: "f90ccd5ce750fecac29157dfaada5171a890c5dc8b6ae194adc2f829b3894526" + sha256 cellar: :any, sonoma: "0eaca449b6111e14fc1e564137c67445d7d96fe241499f70e7b75d57e8933db2" + sha256 cellar: :any, ventura: "6b5c2b0112b3dc1e0fecbbcdd11bb67bec5dca0c39f12d364925d0e6a0b6fabd" + sha256 cellar: :any_skip_relocation, arm64_linux: "0174937d75ac25ec4a7566e423cbc8486393a6a2fcb24e264ce803c0541e8a4a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b267aef34dc479086f9f0cf9e1ed1188a9dcb42fdb0320c826dc4d658bf16e7" + end + + depends_on "boost" + depends_on "flac" + depends_on "freetype" + depends_on "libogg" + depends_on "libpng" + depends_on "libvorbis" + depends_on "mad" + depends_on "wxwidgets" + + uses_from_macos "zlib" + + def install + # configure will happily carry on even if it can't find wxwidgets, + # so let's make sure the install method keeps working even when + # the wxwidgets dependency version changes + wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)?)?$/) } + .to_formula + + # The configure script needs a little help finding our wx-config + wxconfig = "wx-config-#{wxwidgets.version.major_minor}" + inreplace "configure", /^_wxconfig=wx-config$/, "_wxconfig=#{wxconfig}" + + system "./configure", "--enable-verbose-build", *std_configure_args + system "make", "install" + end + + test do + assert_match <<~EOS, shell_output("#{bin}/scummvm-tools-cli --list") + All available tools: + \tcompress_agos: Compresses Simon the Sorcerer and Feeble Files data files. + \tcompress_gob: Compresses Gobliiins! data files. + \tcompress_kyra: Used to compress Legend of Kyrandia games. + \tcompress_queen: Used to compress Flight of the Amazon Queen data files. + EOS + + assert_match version.to_s, shell_output("#{bin}/scummvm-tools-cli --version") + end +end diff --git a/Formula/s/scummvm.rb b/Formula/s/scummvm.rb new file mode 100644 index 0000000000000..ffb3750c9d886 --- /dev/null +++ b/Formula/s/scummvm.rb @@ -0,0 +1,68 @@ +class Scummvm < Formula + desc "Graphic adventure game interpreter" + homepage "https://www.scummvm.org/" + url "https://downloads.scummvm.org/frs/scummvm/2.9.1/scummvm-2.9.1.tar.xz" + sha256 "6a82f36afa9de758ab1dd377101a26a53f12417cbfd350bb8e5d7fd5b8c257e3" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/scummvm/scummvm.git", branch: "master" + + livecheck do + url "https://www.scummvm.org/downloads/" + regex(/href=.*?scummvm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "1e1518b840350265526bab90fbd3469a669052a3598ade2dbfa2907c8806b978" + sha256 arm64_sequoia: "af1a4656f89211d7be7b493ac7ad5db142b318058121c48f73f592272f019a22" + sha256 arm64_sonoma: "e5314b9eec38aaa5556d5481530573080028ad62a2bb54cd2a9e033fe290b876" + sha256 arm64_ventura: "2c09fab2039ad292c9d2f1e2dd0f21c02fcfa7df5340037057d43a7814aeda56" + sha256 sonoma: "1bac1262b8f2dad18d22f2d2a0d08f7090e6f4579c989bb104a636d8d6b6b0c0" + sha256 ventura: "2d10a2dfb6d2482ed25a3e2ffdc8d20ac59dcf7cf6bd0d1ca977b61a71169c6f" + sha256 arm64_linux: "9e66e94115cd793f5cce20420a2223fa7c38e82400bedb31f1c7b50787c7dc15" + sha256 x86_64_linux: "3d608c81d285a7b766260af1e646749bbf98ad8a977e140dbda9de012aaf5d6b" + end + + depends_on "a52dec" + depends_on "faad2" + depends_on "flac" + depends_on "fluid-synth" + depends_on "freetype" + depends_on "fribidi" + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libmpeg2" + depends_on "libogg" + depends_on "libopenmpt" + depends_on "libpng" + depends_on "libvorbis" + depends_on "libvpx" + depends_on "mad" + depends_on "sdl2" + depends_on "theora" + + uses_from_macos "zlib" + + on_macos do + depends_on "musepack" + end + + on_linux do + depends_on "alsa-lib" + end + + def install + system "./configure", "--enable-release", "--with-sdl-prefix=#{Formula["sdl2"].opt_prefix}", *std_configure_args + system "make", "install" + + rm_r(share/"pixmaps") + rm_r(share/"icons") + end + + test do + # Use dummy driver to avoid issues with headless CI + ENV["SDL_VIDEODRIVER"] = "dummy" + ENV["SDL_AUDIODRIVER"] = "dummy" + system bin/"scummvm", "-v" + end +end diff --git a/Formula/s/scw.rb b/Formula/s/scw.rb new file mode 100644 index 0000000000000..dac027b11db74 --- /dev/null +++ b/Formula/s/scw.rb @@ -0,0 +1,36 @@ +class Scw < Formula + desc "Command-line Interface for Scaleway" + homepage "https://www.scaleway.com/en/cli/" + url "https://github.com/scaleway/scaleway-cli/archive/refs/tags/v2.45.0.tar.gz" + sha256 "8c9d56d752d06e35abccb0f626e7df2418a17a22b27cb1a49a2638370f0f2c83" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b3054814254594e5aab105799dc85dac4228a5cc858a91b55ad79209996d4be9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b353927d8d7d5180070e48d41806c3a298907dcff412cf5315ac9616a6511e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23d0216cfc5eb9f83e67d35332f288fb866beae50f5379ab3ed0c807f01d8913" + sha256 cellar: :any_skip_relocation, sonoma: "2f6ff88bebbae4a0c7930ae3840d9aa8af45a436d19eeae7f865ffd1577c91b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "372d442ec10bbb3403b0186183daf09fea71b3db3b8ef883def60a24795b2629" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95482ec1a41ace1af329f242dcec428d0a112b22a5eb43fad5783818c0d9c788" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/scw" + + generate_completions_from_executable(bin/"scw", "autocomplete", "script", shell_parameter_format: :none) + end + + test do + (testpath/"config.yaml").write "" + output = shell_output("#{bin}/scw -c config.yaml config set access-key=SCWXXXXXXXXXXXXXXXXX") + assert_match "✅ Successfully update config.", output + assert_match "access_key: SCWXXXXXXXXXXXXXXXXX", File.read(testpath/"config.yaml") + end +end diff --git a/Formula/s/scws.rb b/Formula/s/scws.rb new file mode 100644 index 0000000000000..9b90d9907ce19 --- /dev/null +++ b/Formula/s/scws.rb @@ -0,0 +1,38 @@ +class Scws < Formula + desc "Simple Chinese Word Segmentation" + homepage "https://github.com/hightman/scws" + url "http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2" + sha256 "60d50ac3dc42cff3c0b16cb1cfee47d8cb8c8baa142a58bc62854477b81f1af5" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bb7b68fb9fcbf51ad8170b10e1e25c4674c99bc1e99870446659c5dcc2f0b5ba" + sha256 cellar: :any, arm64_sequoia: "294a02ffae27e71589019a49e8031b89e2af74a54603e3caa1a60ffd5fa91e17" + sha256 cellar: :any, arm64_sonoma: "97322bf31231434433412e95b1561a5aa7ed1bc0887f5178a46533063295ff51" + sha256 cellar: :any, arm64_ventura: "6cdacaab4cd3ed03a55566db445ac6dc331bb653a15fa5c1927e829e91a3a8c4" + sha256 cellar: :any, arm64_monterey: "fe10618f55a2c8275a3e072f9bce64662007c4cb3f5785bf704c92f7f2b43845" + sha256 cellar: :any, arm64_big_sur: "ac7b0ac31fb12e9c1e4611e00dc70e5a5a4eedec4cc3d700826937eb4f67f5a6" + sha256 cellar: :any, sonoma: "2544902ff66d5a1f98ffed9720d2fee60ed89a06399fbc9108b5b9862600dcab" + sha256 cellar: :any, ventura: "c03c054ab769c6deb805ca79b72620f73aa4d364b2c549f6d390b89128951e11" + sha256 cellar: :any, monterey: "27a90e1636343c3ba08280f7717cca86405e82efca0e0b6660ea5c850de8b38e" + sha256 cellar: :any, big_sur: "6d87c6c7431b97511b7ce3ec42493bff7685c6ee2682d9733428a71826a8b300" + sha256 cellar: :any, catalina: "4dedb954c6d17b1cc42d41a978e41a897110e042bbd6099f82bdbd0ff86b7aad" + sha256 cellar: :any_skip_relocation, arm64_linux: "760697469c3bd5b9d57792dafe9b130f751f56a727f743700070b0cc95fac108" + sha256 cellar: :any_skip_relocation, x86_64_linux: "146dd8b73ef91bcb9118130d13e30803b4213eddeda7d80b5f2a5d75e83f7c64" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + output = shell_output("#{bin}/scws -c utf8 -i 人之初") + assert_match "人 之 初", output + end +end diff --git a/Formula/s/sd.rb b/Formula/s/sd.rb new file mode 100644 index 0000000000000..c80f1f9bef5aa --- /dev/null +++ b/Formula/s/sd.rb @@ -0,0 +1,37 @@ +class Sd < Formula + desc "Intuitive find & replace CLI" + homepage "https://github.com/chmln/sd" + url "https://github.com/chmln/sd/archive/refs/tags/v1.0.0.tar.gz" + sha256 "2adc1dec0d2c63cbffa94204b212926f2735a59753494fca72c3cfe4001d472f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1538e29545abba000fbd4f6f00092a4e5343e280ffaf5a97aa37b316bb4519f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3cf7ab4495f622a4f245bb1c7c30225ef881dc390ee5edc59a1d3c4381cecca1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6bc773a70934364157591cd888e617601a42ed1f615fda8f77364fa45631d08d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "946a44f567e3528d380fbbee742c3abeed9952f53f7de172a846b63d2e21d5b1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "60f079d38aa238a1e7109c6a0f988fe7033449d20f05db3b87219cbfd945fe58" + sha256 cellar: :any_skip_relocation, sonoma: "f83ebe2505106e8c94c4b92d15c0ac3390dc637039043dbafad3e382fa8c61b0" + sha256 cellar: :any_skip_relocation, ventura: "0200b81c386198d39ed7b03e85c771e141d9604075d82aa4caed5d5a775486c8" + sha256 cellar: :any_skip_relocation, monterey: "a8fee9e7b0202a27d8dcc599ebd391637107134f139dbe88d6b22c880e63d8a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d554d755178dcf4c8c77dc3ce4fe14e3467379df1a45881457124c5a248a9852" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c098bdfaff013f7a6b6b96a65b9cfef86926e1cd901b363e1bdb84734ee6e3f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + man1.install "gen/sd.1" + bash_completion.install "gen/completions/sd.bash" => "sd" + fish_completion.install "gen/completions/sd.fish" + zsh_completion.install "gen/completions/_sd" + end + + test do + assert_equal "after", pipe_output("#{bin}/sd before after", "before") + end +end diff --git a/Formula/s/sdb.rb b/Formula/s/sdb.rb new file mode 100644 index 0000000000000..e11065462ebd9 --- /dev/null +++ b/Formula/s/sdb.rb @@ -0,0 +1,38 @@ +class Sdb < Formula + desc "Ondisk/memory hashtable based on CDB" + homepage "https://www.radare.org/" + url "https://github.com/radareorg/sdb/archive/refs/tags/2.2.0.tar.gz" + sha256 "05b6fda41727e2d634bc0cdea0bccdc186b48cc9136b2367ab2a7358145fa8b4" + license "MIT" + head "https://github.com/radareorg/sdb.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0e5ea5126ab9314436e85c93b9280c5498950b499cc18a7c25e509081905988c" + sha256 cellar: :any, arm64_sequoia: "41695d0cc3526175b99ce5850cd4246af15e374e32b30bb20d5fee4a534fe1de" + sha256 cellar: :any, arm64_sonoma: "6391d94f5571c5c19fd0865bb3bc6793bb9596fc2a49a5af39e1910712899858" + sha256 cellar: :any, arm64_ventura: "63004949cd084e74ced59cb3ce84fe63bc7095da5602f01e58a5d1b0026b2b84" + sha256 cellar: :any, sonoma: "3b8395df7ab426e250cc8e26a1b06e8699d78724f8becacdad1f14881336c784" + sha256 cellar: :any, ventura: "77e283d412b4183d9d842562b617e7598113e9e2a9f3f40acc4ca2876355776a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f729bde1f426097c7d2cea72103b12bf8ef0874f4b62ae0f2ed3ee04431a366d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47575b7d7a3b8e9e40369e40f783370d8ce9f91394b5f6ead66d1bab140b0fbc" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build + depends_on "glib" + + conflicts_with "snobol4", because: "both install `sdb` binaries" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"sdb", testpath/"d", "hello=world" + assert_equal "world", shell_output("#{bin}/sdb #{testpath}/d hello").strip + end +end diff --git a/Formula/s/sdcc.rb b/Formula/s/sdcc.rb new file mode 100644 index 0000000000000..404abe491bdef --- /dev/null +++ b/Formula/s/sdcc.rb @@ -0,0 +1,58 @@ +class Sdcc < Formula + desc "ANSI C compiler for Intel 8051, Maxim 80DS390, and Zilog Z80" + homepage "https://sdcc.sourceforge.net/" + url "https://downloads.sourceforge.net/project/sdcc/sdcc/4.5.0/sdcc-src-4.5.0.tar.bz2" + sha256 "d5030437fb436bb1d93a8dbdbfb46baaa60613318f4fb3f5871d72815d1eed80" + license all_of: ["GPL-2.0-only", "GPL-3.0-only", :public_domain, "Zlib"] + head "https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" + + livecheck do + url :stable + regex(%r{url=.*?/sdcc-src[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "7ff34d8aaf315983a7f5da110b4851625964d4886f04d1f3aff780bb0cf99c15" + sha256 arm64_sequoia: "8a5ba597acf12b5d1035666984b1ee68bbe732957ef7d4db046e3259298519c2" + sha256 arm64_sonoma: "730449a156f828dabdb32497504d9e014207648c93064516648af3bb3c19f59f" + sha256 arm64_ventura: "3c7396176a31c4ed07f70ee1bf32b7cff2e27de40f382cd5208dbb2dd6a5134f" + sha256 sonoma: "1f1004c896b885aa65e33c71530906f085f81241a5ca3f42737a252dcff22200" + sha256 ventura: "babe449f182d8d1a8ee922b2ca74d7a7bcfe55d2c85133d356ed80c03c4ae49a" + sha256 arm64_linux: "c8462d05395dfcd9c0b18ba670cbf28a19bd771af37352b55fa49e56ee297832" + sha256 x86_64_linux: "93079cad266875209f9c852f8f06da7b4c5e1975b4cf0719f33925af508d9f0e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "boost" => :build + depends_on "gputils" + depends_on "readline" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "zlib" + + on_macos do + depends_on "zstd" + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./configure", "--disable-non-free", "--without-ccache", *std_configure_args + system "make", "install" + elisp.install bin.glob("*.el") + end + + test do + (testpath/"test.c").write <<~C + int main() { + return 0; + } + C + system bin/"sdcc", "-mz80", "#{testpath}/test.c" + assert_path_exists testpath/"test.ihx" + end +end diff --git a/Formula/s/sdcv.rb b/Formula/s/sdcv.rb new file mode 100644 index 0000000000000..223b7686d9e14 --- /dev/null +++ b/Formula/s/sdcv.rb @@ -0,0 +1,57 @@ +class Sdcv < Formula + desc "StarDict Console Version" + homepage "https://dushistov.github.io/sdcv/" + url "https://github.com/Dushistov/sdcv/archive/refs/tags/v0.5.5.tar.gz" + sha256 "4d2519e8f8479b9301dc91e9cda3e1eefef19970ece0e8c05f0c7b7ade5dc94b" + license "GPL-2.0-or-later" + version_scheme 1 + head "https://github.com/Dushistov/sdcv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a0086f2d9a94f6adb1ab39c04e4f038438c9899a8bf82b2c7b14d99ccd341bda" + sha256 arm64_sequoia: "b53341800d7aad1fae6fd3b105de15a7b1f81e4192d350b50cc4f389e21298da" + sha256 arm64_sonoma: "7c16b9b5e5b3ae014c182f84df89c800bd60cf9da4a0b1c0fda724dfb42d991c" + sha256 arm64_ventura: "f04de637dc02721d831e83b089b85bfc985556faaac0070fefe22a3cc7092170" + sha256 arm64_monterey: "2f225971eef6a6f8b7b38132e08849c973126533a6e9089f9362674136d178c6" + sha256 arm64_big_sur: "2ec8a144f854c615c2e461205ab7ee9ac323ebed46ab7c00067aaf021bea0c88" + sha256 sonoma: "642c8bf7dddb3cda5cc973a74bec82fcddd7ea887e29204147f9337bd70901ab" + sha256 ventura: "1f634180a15ceeb5f96805722e3e885dd7e55abfb8a60cedc5628aac51b9d026" + sha256 monterey: "6b6f6f0cc8a7b79c11c540dd09ab258f67f8effb4c3b9222eb24c6fe7422de23" + sha256 big_sur: "b9500af174861ad2fabb36db77642ff700c2b04c74f0008abb157deac4f4598e" + sha256 arm64_linux: "6506b6d3a7602edd66c068de46f433710a9487ed13e8bc9d93581111e4d09e6a" + sha256 x86_64_linux: "1d48958b5768fd52938d5358be25d96911066e0b738b0bc75497aae904c98d96" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "readline" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + # fix type mismatch and memory deallocation build errors + # upstream PR ref, https://github.com/Dushistov/sdcv/pull/103 + patch do + url "https://github.com/Dushistov/sdcv/commit/c2bb4e3fe51f9b9940440ea81d5d97b56d5582e7.patch?full_index=1" + sha256 "70c4c826c2dcd4c0aad5fa8f27b7e079f4461cfbbb380b4726aa4dfd8fb75a1c" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build", "--target", "lang" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"sdcv", "-h" + end +end diff --git a/Formula/s/sdedit.rb b/Formula/s/sdedit.rb new file mode 100644 index 0000000000000..aee13c2257463 --- /dev/null +++ b/Formula/s/sdedit.rb @@ -0,0 +1,37 @@ +class Sdedit < Formula + desc "Tool for generating sequence diagrams very quickly" + homepage "https://sdedit.sourceforge.net/" + url "https://downloads.sourceforge.net/project/sdedit/sdedit/4.2/sdedit-4.2.1.jar" + sha256 "270af857e6d2823ce0c18dee47e1e78ef7bc90c7e8afeda36114d364e0f4441c" + license "BSD-2-Clause" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/sdedit[._-]v?(\d+(?:\.\d+)+)\.jar}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "b53e1a2647aa46c3b1955e0aa26329c42d4bb5defd34d3dab8d4a6b2897bdaeb" + end + + depends_on "openjdk" + + def install + libexec.install "sdedit-#{version}.jar" + bin.write_jar_script libexec/"sdedit-#{version}.jar", "sdedit" + end + + test do + (testpath/"test.sd").write <<~EOS + #![SD ticket order] + ext:External[pe] + user:Actor + EOS + system bin/"sdedit", "-t", "pdf", "-o", testpath/"test.pdf", testpath/"test.sd" + assert_path_exists testpath/"test.pdf" + end +end diff --git a/Formula/s/sdl12-compat.rb b/Formula/s/sdl12-compat.rb new file mode 100644 index 0000000000000..ba8a7f93b608b --- /dev/null +++ b/Formula/s/sdl12-compat.rb @@ -0,0 +1,63 @@ +class Sdl12Compat < Formula + desc "SDL 1.2 compatibility layer that uses SDL 2.0 behind the scenes" + homepage "https://github.com/libsdl-org/sdl12-compat" + url "https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-1.2.70.tar.gz" + sha256 "b8350cc400b9605dd5e319f451f09d5d6e70bb1dfc22cd67f718b3ffc16ebb7c" + license all_of: ["Zlib", "MIT-0"] + head "https://github.com/libsdl-org/sdl12-compat.git", branch: "main" + + livecheck do + url :stable + regex(/^release[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "38d6c9f697f5da1acfb78654789c8d479155edccb2453f8f73582f7681957351" + sha256 cellar: :any, arm64_sequoia: "ab2a011e0cfcd8a7a8492ad825f234faf220131017f384e657a41fa96f03d4b1" + sha256 cellar: :any, arm64_sonoma: "662af03fff83b2f69646306df4ef414bfb1bfa10f62cc262fb720eaacee9a3b3" + sha256 cellar: :any, sonoma: "f94f75238561b2dc71492cbc54180cfdc5168ff4925fabf7f9cb1f62548dc572" + sha256 cellar: :any_skip_relocation, arm64_linux: "26db3e5b098f923113bc5e214457fab0113eaacc4b623250e9844a244262dca6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4422b6bd772c36cacb6486cd40c31b566ee02f2f00d50d7c1566be87cc437593" + end + + depends_on "cmake" => :build + depends_on "sdl2" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DSDL2_PATH=#{Formula["sdl2"].opt_prefix}", + "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,#{Formula["sdl2"].opt_lib}", + "-DSDL12DEVEL=ON", + "-DSDL12TESTS=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (lib/"pkgconfig").install_symlink "sdl12_compat.pc" => "sdl.pc" + + # we have to do this because most build scripts assume that all sdl modules + # are installed to the same prefix. Consequently SDL stuff cannot be keg-only + inreplace [bin/"sdl-config", lib/"pkgconfig/sdl12_compat.pc"], prefix, HOMEBREW_PREFIX + end + + test do + assert_path_exists lib/shared_library("libSDL") + versioned_libsdl = "libSDL-1.2" + versioned_libsdl << ".0" if OS.mac? + assert_path_exists lib/shared_library(versioned_libsdl) + assert_path_exists lib/"libSDLmain.a" + assert_equal version.to_s, shell_output("#{bin}/sdl-config --version").strip + + (testpath/"test.c").write <<~C + #include + + int main(int argc, char* argv[]) { + SDL_Init(SDL_INIT_EVERYTHING); + SDL_Quit(); + return 0; + } + C + flags = Utils.safe_popen_read(bin/"sdl-config", "--cflags", "--libs").split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/s/sdl2.rb b/Formula/s/sdl2.rb new file mode 100644 index 0000000000000..653fd4f11df09 --- /dev/null +++ b/Formula/s/sdl2.rb @@ -0,0 +1,82 @@ +class Sdl2 < Formula + desc "Low-level access to audio, keyboard, mouse, joystick, and graphics" + homepage "https://www.libsdl.org/" + url "https://github.com/libsdl-org/SDL/releases/download/release-2.32.10/SDL2-2.32.10.tar.gz" + sha256 "5f5993c530f084535c65a6879e9b26ad441169b3e25d789d83287040a9ca5165" + license "Zlib" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d023e694d63e6d5adc1acb6110fc57e31fcd1cbcec974f51f4993e108ddc4f80" + sha256 cellar: :any, arm64_sequoia: "702b9e09ac8a7cc8a99ab4e9298803bbfcd3179d7b029883fe760ceecf98e526" + sha256 cellar: :any, arm64_sonoma: "5dc1f9fda53f4189beea57bfeffb205012c72e223cef488f6c3fa6c7dd0ba40e" + sha256 cellar: :any, arm64_ventura: "865d7b096886d5d80425a1cfd7a3386056db8b8d4d7191ffc06f140b2785aa5e" + sha256 cellar: :any, sonoma: "df04d6460b7ab3baefc14201d886a0e27e694a5ba11b075c5725402d8b143c15" + sha256 cellar: :any, ventura: "5bb2ddf9a2403f7b76f9db786c017f9e38325ce1b6203b4b917afb23525ee04e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e050a5f8c665edb6a5afef282d9508355095a579484e92ea5dc69b26c5acc16c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e98bc16de311c00276a48d4424b86ddc32fa9f65438edfa0fe048cff9e15d2db" + end + + head do + url "https://github.com/libsdl-org/SDL.git", branch: "SDL2" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + on_linux do + depends_on "mesa" => :build + depends_on "pkgconf" => :build + depends_on "alsa-lib" + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxscrnsaver" + depends_on "pulseaudio" + end + + def install + # We have to do this because most build scripts assume that all SDL modules + # are installed to the same prefix. Consequently SDL stuff cannot be + # keg-only but I doubt that will be needed. + inreplace "sdl2.pc.in", "@prefix@", HOMEBREW_PREFIX + + system "./autogen.sh" if build.head? + + args = %W[--prefix=#{prefix} --enable-hidapi] + args += if OS.mac? + %w[--without-x] + else + %w[ + --disable-rpath + --enable-pulseaudio + --enable-pulseaudio-shared + --enable-video-dummy + --enable-video-opengl + --enable-video-opengles + --enable-video-x11 + --enable-video-x11-scrnsaver + --enable-video-x11-xcursor + --enable-video-x11-xinput + --enable-video-x11-xrandr + --enable-video-x11-xshape + --enable-x11-shared + --with-x + ] + end + system "./configure", *args + system "make", "install" + end + + test do + system bin/"sdl2-config", "--version" + end +end diff --git a/Formula/s/sdl2_gfx.rb b/Formula/s/sdl2_gfx.rb new file mode 100644 index 0000000000000..3ad050134186e --- /dev/null +++ b/Formula/s/sdl2_gfx.rb @@ -0,0 +1,58 @@ +class Sdl2Gfx < Formula + desc "SDL2 graphics drawing primitives and other support functions" + homepage "https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/" + url "https://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz" + mirror "https://sources.voidlinux.org/SDL2_gfx-1.0.4/SDL2_gfx-1.0.4.tar.gz" + sha256 "63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262" + license "Zlib" + + livecheck do + url :homepage + regex(/href=.*?SDL2_gfx[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e47f4d00e05f9f9f5329cf59d7b850c6825def067848db1bf34d2aa06727972e" + sha256 cellar: :any, arm64_sequoia: "0edb8d3b267ce8edd5135b4ab15a2e050204ba10a38b4340e83fe468b78bc8fd" + sha256 cellar: :any, arm64_sonoma: "ce7aacaf54e17f764780e7480ea8c6ea032f9736565974537bbf3a09645cbc01" + sha256 cellar: :any, arm64_ventura: "9c294fad8fbad927f3041868451946dc56c35f1d90f9aeef625e803113e65d09" + sha256 cellar: :any, arm64_monterey: "7c17dcf54036d30d7bbc8d76bfcd51b8c966cc1653c886a7b188a897a483da94" + sha256 cellar: :any, arm64_big_sur: "7c632415953aecce33ea6b66b0d0b75461db7987bf560802e408d308bcd9b653" + sha256 cellar: :any, sonoma: "3678d4052241eb8785cca53190d302d8ccb69d05a4f12f28eb1d09af05070de6" + sha256 cellar: :any, ventura: "07ced752aa459a1242b44edb51e3ad95146ac3a0920a904ce85d00ff22389906" + sha256 cellar: :any, monterey: "befe6548ad09bcdb75ce8363af39231065da928283ed7628daf7a5776725462c" + sha256 cellar: :any, big_sur: "9466b3ad0c9a29ca01a8c804b529ad7c89bd42c4d8b79b37bc079419464cc9f2" + sha256 cellar: :any, catalina: "9db41c0f2fd4897456594769a4a549b5261c3027dde8fc6da7160faf7db0a539" + sha256 cellar: :any_skip_relocation, arm64_linux: "4774eb2e827ddefb293a54c297cd292530b2aad4ffffafae52385fed9eda3497" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a779702029d05cd1923b70eff455385362d0069fcf31e0e0c1211279893ae5a" + end + + depends_on "sdl2" + + def install + args = [] + args << "--disable-mmx" if Hardware::CPU.arm? + + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--disable-sdltest", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + int mmx = SDL_imageFilterMMXdetect(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lSDL2_gfx", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl2_image.rb b/Formula/s/sdl2_image.rb new file mode 100644 index 0000000000000..4d8f84fae51c9 --- /dev/null +++ b/Formula/s/sdl2_image.rb @@ -0,0 +1,69 @@ +class Sdl2Image < Formula + desc "Library for loading images as SDL surfaces and textures" + homepage "https://github.com/libsdl-org/SDL_image" + url "https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.8/SDL2_image-2.8.8.tar.gz" + sha256 "2213b56fdaff2220d0e38c8e420cbe1a83c87374190cba8c70af2156097ce30a" + license "Zlib" + head "https://github.com/libsdl-org/SDL_image.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "24eb58621bff82467e5bc9331d8eb6d31fff6765612aea5c143861f5e3e472ba" + sha256 cellar: :any, arm64_sequoia: "ce895628c0e84843740799c0001d8097cc5bb424edb45f150ee10d33d9031288" + sha256 cellar: :any, arm64_sonoma: "1655c170513f87b2bddc7cf740ff876d8dce6db804ca961ea94a5805aee6b495" + sha256 cellar: :any, arm64_ventura: "57d15c79fb8f64048038e6dfc079805751275bdfc83baa9d14cedd10ea9034b5" + sha256 cellar: :any, sonoma: "5ced16f1eb8d4c522a1ad4e9fd3021f8441b517be78f9ccb5433815b069220c2" + sha256 cellar: :any, ventura: "25a9eec92d2e56b6edcd10ddefd0bfba6cb2fab1c6ed775886e5c91092e8c8dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fc8b292bc57169a20c3128cd1f583efc51215df9912f42636fb8ca5aa3c2505" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57196690a97f3513f2a57897c5ecd6972b3d162ec42a68960768dab89d76fbf0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libavif" + depends_on "libpng" + depends_on "libtiff" + depends_on "sdl2" + depends_on "webp" + + def install + inreplace "SDL2_image.pc.in", "@prefix@", HOMEBREW_PREFIX + + # upstream bug report, https://github.com/libsdl-org/SDL_image/issues/490 + system "./autogen.sh" + system "./configure", "--disable-imageio", + "--disable-avif-shared", + "--disable-jpg-shared", + "--disable-jxl-shared", + "--disable-png-shared", + "--disable-stb-image", + "--disable-tif-shared", + "--disable-webp-shared", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + int INIT_FLAGS = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_TIF | IMG_INIT_WEBP | IMG_INIT_JXL | IMG_INIT_AVIF; + int result = IMG_Init(INIT_FLAGS); + IMG_Quit(); + return result == INIT_FLAGS ? EXIT_SUCCESS : EXIT_FAILURE; + } + C + system ENV.cc, "test.c", "-I#{Formula["sdl2"].opt_include}/SDL2", "-L#{lib}", "-lSDL2_image", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl2_mixer.rb b/Formula/s/sdl2_mixer.rb new file mode 100644 index 0000000000000..a3c946948ed31 --- /dev/null +++ b/Formula/s/sdl2_mixer.rb @@ -0,0 +1,104 @@ +class Sdl2Mixer < Formula + desc "Sample multi-channel audio mixer library" + homepage "https://github.com/libsdl-org/SDL_mixer" + url "https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.1/SDL2_mixer-2.8.1.tar.gz" + sha256 "cb760211b056bfe44f4a1e180cc7cb201137e4d1572f2002cc1be728efd22660" + license "Zlib" + revision 1 + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "29131b712fd63e8085fd10d1e158e8c4eff11ee363b0b3768ab8f0ab9d26c5cc" + sha256 cellar: :any, arm64_sequoia: "1c7c1592895fc8bc86a246445698cd3258f835e319a4017d596ae8d67966d605" + sha256 cellar: :any, arm64_sonoma: "2203b3fe60c59ca2f77fed180fb25598c083bfc25baff79bd84ffea16fa12623" + sha256 cellar: :any, arm64_ventura: "bc6a8a9f8e3b8f145873f2f18d428549286923304887c75eae9e0c6153b9f8cd" + sha256 cellar: :any, sonoma: "2a0833b4e5b3d6b5e650e6260ea32fe5f07a9fa4ed66a8f4343d5d9c65c26f9e" + sha256 cellar: :any, ventura: "721f0f56d5b954e4e5cc484fa4046712b2099aafa4849091772aae71afb19145" + sha256 cellar: :any_skip_relocation, arm64_linux: "1179824f595c247ae0bd213a9af93d973f17b068fdcac3017ec2431196eba023" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7022d2cdf02890e277cf56cfa6e15e5940a000886b92991027b8efbf8332927" + end + + head do + url "https://github.com/libsdl-org/SDL_mixer.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "fluid-synth" + depends_on "game-music-emu" + depends_on "libvorbis" + depends_on "libxmp" + depends_on "mpg123" + depends_on "opusfile" + depends_on "sdl2" + depends_on "wavpack" + + def install + inreplace "SDL2_mixer.pc.in", "@prefix@", HOMEBREW_PREFIX + + if build.head? + mkdir "build" + system "./autogen.sh" + end + + system "./configure", "--enable-music-wave", + "--enable-music-mod", + "--enable-music-mod-xmp", + "--disable-music-mod-xmp-shared", + "--disable-music-mod-modplug", + "--enable-music-midi", + "--enable-music-midi-fluidsynth", + "--disable-music-midi-fluidsynth-shared", + "--disable-music-midi-native", + "--disable-music-midi-timidity", + "--enable-music-ogg", + "--enable-music-ogg-vorbis", + "--disable-music-ogg-vorbis-shared", + "--disable-music-ogg-stb", + "--disable-music-ogg-tremor", + "--enable-music-flac", + "--enable-music-flac-libflac", + "--disable-music-flac-libflac-shared", + "--disable-music-flac-drflac", + "--enable-music-mp3", + "--enable-music-mp3-mpg123", + "--disable-music-mp3-mpg123-shared", + "--disable-music-mp3-minimp3", + "--enable-music-opus", + "--disable-music-opus-shared", + "--enable-music-gme", + "--disable-music-gme-shared", + "--enable-music-wavpack", + "--enable-music-wavpack-dsd", + "--disable-music-wavpack-shared", + *std_configure_args + + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + const int INIT_FLAGS = MIX_INIT_FLAC | MIX_INIT_MOD | MIX_INIT_MP3 | MIX_INIT_OGG | MIX_INIT_MID | MIX_INIT_OPUS | MIX_INIT_WAVPACK; + int success = Mix_Init(INIT_FLAGS); + Mix_Quit(); + return success == INIT_FLAGS ? EXIT_SUCCESS : EXIT_FAILURE; + } + C + system ENV.cc, "-I#{Formula["sdl2"].opt_include}/SDL2", + "test.c", "-L#{lib}", "-lSDL2_mixer", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl2_net.rb b/Formula/s/sdl2_net.rb new file mode 100644 index 0000000000000..81d5a74bea9ab --- /dev/null +++ b/Formula/s/sdl2_net.rb @@ -0,0 +1,66 @@ +class Sdl2Net < Formula + desc "Small sample cross-platform networking library" + homepage "https://github.com/libsdl-org/SDL_net" + url "https://github.com/libsdl-org/SDL_net/releases/download/release-2.2.0/SDL2_net-2.2.0.tar.gz" + sha256 "4e4a891988316271974ff4e9585ed1ef729a123d22c08bd473129179dc857feb" + license "Zlib" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fe6ac7f5d82fd91ba2ec6f8969327bc15ede3f548172cd990dfa820795640a8b" + sha256 cellar: :any, arm64_sequoia: "3d7c644db9335046fa38cb4ab1f0396572a1cbb1aa748c6458f9a8ac37ac820d" + sha256 cellar: :any, arm64_sonoma: "370799a594bbe1c431dac68cf7c6c19a048c15923a659bcb3db36ab7b5d9bf5e" + sha256 cellar: :any, arm64_ventura: "9e154cc5085e0f5f8d6c21e3656c1ff871497b1d79136105535f6fefc189aafc" + sha256 cellar: :any, arm64_monterey: "293d3240dd1ac9c5aa76317ff632fb216c5a2768632a84400479ba6befcdd6c0" + sha256 cellar: :any, arm64_big_sur: "218ace24a3d1840ff6b4fd0ae41314a0b69eda326509b2bbf06113c099717d8e" + sha256 cellar: :any, sonoma: "f433beb9819e47f6f85360f57cb5d925b4bb97e00f24637ab1847549b4d0c6ae" + sha256 cellar: :any, ventura: "7eafd7b1497736d3609709191a7c693c61e0c2e7761bf1901502dca09a585f41" + sha256 cellar: :any, monterey: "abc2a0c0a0098fbf6eff04d1a7ac5270de3f96762e0eb068d84bf8f9c484af7d" + sha256 cellar: :any, big_sur: "a08a23acdd6f6733e64f26bd796bc454d6c8bb8edd91657ffb4175957b5b8b56" + sha256 cellar: :any, catalina: "d653a5933d4df46a2a4cdf743499821e61e61305cc3eb45d7fa88a8452a0dae1" + sha256 cellar: :any_skip_relocation, arm64_linux: "ecd7a11a898ae2a291af9042b510a7e73537e11bac88c0655513450d378e1d3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa5783e335578a64d84051b2fc247b91585a8950f0406fc8b34ad06ea879872f" + end + + head do + url "https://github.com/libsdl-org/SDL_net.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "sdl2" + + def install + inreplace "SDL2_net.pc.in", "@prefix@", HOMEBREW_PREFIX + + system "./autogen.sh" if build.head? + + system "./configure", "--disable-sdltest", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + int success = SDLNet_Init(); + SDLNet_Quit(); + return success; + } + C + + system ENV.cc, "test.c", "-I#{Formula["sdl2"].opt_include}/SDL2", "-L#{lib}", "-lSDL2_net", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl2_sound.rb b/Formula/s/sdl2_sound.rb new file mode 100644 index 0000000000000..1cd3a831a20bc --- /dev/null +++ b/Formula/s/sdl2_sound.rb @@ -0,0 +1,170 @@ +class Sdl2Sound < Formula + desc "Abstract soundfile decoder for SDL" + homepage "https://icculus.org/SDL_sound/" + url "https://github.com/icculus/SDL_sound/releases/download/v2.0.4/SDL2_sound-2.0.4.tar.gz" + sha256 "f73f6720dba2e677c0bf70d0c76ca3c96d865d04025e49a8b161711685961931" + license all_of: [ + "Zlib", + any_of: ["Artistic-1.0-Perl", "LGPL-2.1-or-later"], # timidity + ] + head "https://github.com/icculus/SDL_sound.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e926f2202a49bfb323a9e603e308e44f5eae6d76a5f60dd867e00b03cd0cf6dd" + sha256 cellar: :any, arm64_sequoia: "ebf816ab8b81d1c57a8fa8464015be9e6e7c1bb59e6756cb1ab955193468933d" + sha256 cellar: :any, arm64_sonoma: "1a336df9cbf4dbecdf17c4bd11f1d4fa86a8f8d7b4e31f90e2cd61f80d12b211" + sha256 cellar: :any, arm64_ventura: "92094e5c2c9ec2fd6962e76d3c61be76c1f87789052a30dfed282ebf268163d5" + sha256 cellar: :any, sonoma: "91a1de8932cf5e4dc446e771044d807f000101c18dcbd5f421d5ac0b3d78160d" + sha256 cellar: :any, ventura: "fa892b1c33146ebd0a36d74065f18100a787cd4d59d76db28e907ccf8b53a543" + sha256 cellar: :any_skip_relocation, arm64_linux: "05781d5093994a57c5634764fda5a783aabb96b4a81bf39c4e1ce91d455eb450" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2e558d66a31ac41604bab87abc6c42b41c8a7624bcc4c64ecb75c614b4916d3" + end + + depends_on "cmake" => :build + depends_on "sdl2" + + def install + args = [ + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath}", + "-DSDLSOUND_DECODER_MIDI=TRUE", + ] + args << "-DSDLSOUND_DECODER_COREAUDIO=TRUE" if OS.mac? + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + prefix.install Dir["src/timidity/COPYING*"] + end + + test do + expected = <<~EOS + Supported sound formats: + * Play modules through ModPlug + File extension "669" + File extension "AMF" + File extension "AMS" + File extension "DBM" + File extension "DMF" + File extension "DSM" + File extension "FAR" + File extension "GDM" + File extension "IT" + File extension "MDL" + File extension "MED" + File extension "MOD" + File extension "MT2" + File extension "MTM" + File extension "OKT" + File extension "PTM" + File extension "PSM" + File extension "S3M" + File extension "STM" + File extension "ULT" + File extension "UMX" + File extension "XM" + Written by Torbjörn Andersson . + https://modplug-xmms.sourceforge.net/ + + * MPEG-1 Audio Layer I-III + File extension "MP3" + File extension "MP2" + File extension "MP1" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + + * Microsoft WAVE audio format + File extension "WAV" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + + * Audio Interchange File Format + File extension "AIFF" + File extension "AIF" + Written by Torbjörn Andersson . + https://icculus.org/SDL_sound/ + + * Sun/NeXT audio file format + File extension "AU" + Written by Mattias EngdegÃ¥rd . + https://icculus.org/SDL_sound/ + + * Ogg Vorbis audio + File extension "OGG" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + + * Creative Labs Voice format + File extension "VOC" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + + * Raw audio + File extension "RAW" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + + * Shorten-compressed audio data + File extension "SHN" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + + * Free Lossless Audio Codec + File extension "FLAC" + File extension "FLA" + Written by Ryan C. Gordon . + https://icculus.org/SDL_sound/ + EOS + if OS.mac? + expected += <<~EOS + + \s* Decode audio through Core Audio through + File extension "aif" + File extension "aiff" + File extension "aifc" + File extension "wav" + File extension "wave" + File extension "mp3" + File extension "mp4" + File extension "m4a" + File extension "aac" + File extension "caf" + File extension "Sd2f" + File extension "Sd2" + File extension "au" + File extension "next" + File extension "mp2" + File extension "mp1" + File extension "ac3" + File extension "3gpp" + File extension "3gp2" + File extension "amrf" + File extension "amr" + File extension "ima4" + File extension "ima" + Written by Eric Wing . + https://playcontrol.net + EOS + end + assert_equal expected.strip, shell_output("#{bin}/playsound --decoders").strip + + flags = %W[ + -I#{include}/SDL2 + -I#{Formula["sdl2"].include}/SDL2 + -L#{lib} + -L#{Formula["sdl2"].lib} + -lSDL2_sound + -lSDL2 + ] + flags << "-DHAVE_SIGNAL_H=1" if OS.linux? + cp pkgshare/"examples/playsound.c", testpath + + system ENV.cc, "playsound.c", "-o", "playsound", *flags + assert_match "help", shell_output("./playsound --help 2>&1", 42) + end +end diff --git a/Formula/s/sdl2_ttf.rb b/Formula/s/sdl2_ttf.rb new file mode 100644 index 0000000000000..95b5e3c5ccdce --- /dev/null +++ b/Formula/s/sdl2_ttf.rb @@ -0,0 +1,65 @@ +class Sdl2Ttf < Formula + desc "Library for using TrueType fonts in SDL applications" + homepage "https://github.com/libsdl-org/SDL_ttf" + url "https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.24.0/SDL2_ttf-2.24.0.tar.gz" + sha256 "0b2bf1e7b6568adbdbc9bb924643f79d9dedafe061fa1ed687d1d9ac4e453bfd" + license "Zlib" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7464ed639413ddbf1b581564c07bab5d3a45325ab44619ac810af3361f3f7ab8" + sha256 cellar: :any, arm64_sequoia: "15e7d2771f3011e7acc050c32642eb312e96b51596300562a9f6395669608779" + sha256 cellar: :any, arm64_sonoma: "63163b41f4746695229e47cdf721975c8d03ea0809f924c8434389e38912e186" + sha256 cellar: :any, arm64_ventura: "50e4a60835bd4eb6437e7612f39e40f9377f555ef8046c8a465b622adfbcedaa" + sha256 cellar: :any, sonoma: "601eca4a716530bd0758865775581bb82f581c5a728df398231a0e4ba9b3071f" + sha256 cellar: :any, ventura: "effa9785cf42d097925fc27008e432f279aa519c11f48cfd98ee942301d15a47" + sha256 cellar: :any_skip_relocation, arm64_linux: "548921f9bab6e4907a934102c2b31492a8fd488aac72ad7b35c2010c64978c8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "482786481f8a3f5a8f6f147156f5af9cd192e43e2d5b6adf3a5914bcc53bc1cc" + end + + head do + url "https://github.com/libsdl-org/SDL_ttf.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "harfbuzz" + depends_on "sdl2" + + def install + inreplace "SDL2_ttf.pc.in", "@prefix@", HOMEBREW_PREFIX + + system "./autogen.sh" if build.head? + + # `--enable-harfbuzz` is the default, but we pass it + # explicitly to generate an error when it isn't found. + system "./configure", "--disable-freetype-builtin", + "--disable-harfbuzz-builtin", + "--enable-harfbuzz", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + int success = TTF_Init(); + TTF_Quit(); + return success; + } + C + system ENV.cc, "test.c", "-I#{Formula["sdl2"].opt_include}/SDL2", "-L#{lib}", "-lSDL2_ttf", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl3.rb b/Formula/s/sdl3.rb new file mode 100644 index 0000000000000..92fcae22030c4 --- /dev/null +++ b/Formula/s/sdl3.rb @@ -0,0 +1,70 @@ +class Sdl3 < Formula + desc "Low-level access to audio, keyboard, mouse, joystick, and graphics" + homepage "https://libsdl.org/" + url "https://github.com/libsdl-org/SDL/releases/download/release-3.2.26/SDL3-3.2.26.tar.gz" + sha256 "dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2" + license "Zlib" + head "https://github.com/libsdl-org/SDL.git", branch: "main" + + livecheck do + url :stable + regex(/release[._-](\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "db62e8019c8c59a99fd5098dbdec327966b8c05e092bbd47a1a280885f44f4c2" + sha256 cellar: :any, arm64_sequoia: "f1b9e86f673222818d1fa6dcc712d2b0a43e20b53cc15b73d9f3283cd9c14290" + sha256 cellar: :any, arm64_sonoma: "0272ee284d41de8d2455d30352c0e5ddfb43c2f78e976764763efb66dfa8fc1f" + sha256 cellar: :any, sonoma: "8b8437f11d44c7069e184f42acaf9d2c39572ae48679d42ee8669d86c1b0d0a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e5a2cef18ffa3003503b88cded5a9c210660fc3209610d7c121ba5208dfc239" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48e78955e0a3f763ae67913d9c49d80e75620bdb12fb81500950a837b86e2b09" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "libice" + depends_on "libxcursor" + depends_on "libxscrnsaver" + depends_on "libxxf86vm" + depends_on "pulseaudio" + depends_on "xinput" + end + + def install + inreplace "cmake/sdl3.pc.in", "@SDL_PKGCONFIG_PREFIX@", HOMEBREW_PREFIX + + args = [ + "-DSDL_HIDAPI=ON", + "-DSDL_WAYLAND=OFF", + ] + + args += if OS.mac? + ["-DSDL_X11=OFF"] + else + ["-DSDL_X11=ON", "-DSDL_PULSEAUDIO=ON"] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~CPP + #include + int main() { + if (SDL_Init(SDL_INIT_VIDEO) != 1) { + return 1; + } + SDL_Quit(); + return 0; + } + CPP + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lSDL3", "-o", "test" + ENV["SDL_VIDEODRIVER"] = "dummy" + system "./test" + end +end diff --git a/Formula/s/sdl3_image.rb b/Formula/s/sdl3_image.rb new file mode 100644 index 0000000000000..e24435bf4325c --- /dev/null +++ b/Formula/s/sdl3_image.rb @@ -0,0 +1,60 @@ +class Sdl3Image < Formula + desc "Library for loading images as SDL surfaces and textures" + homepage "https://github.com/libsdl-org/SDL_image" + url "https://github.com/libsdl-org/SDL_image/releases/download/release-3.2.4/SDL3_image-3.2.4.tar.gz" + sha256 "a725bd6d04261fdda0dd8d950659e1dc15a8065d025275ef460d32ae7dcfc182" + license "Zlib" + head "https://github.com/libsdl-org/SDL_image.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e05b526d9b2985d155391c14c123e2a744357539340c7dcf930c73790637e255" + sha256 cellar: :any, arm64_sequoia: "784b36fb3b932e3001d88f6bef9922b70ed8f39a24262dbce396224d15bab222" + sha256 cellar: :any, arm64_sonoma: "40e186a16a24afb506bce144f202e557360eac08062f03af5f5b1ebcb68ddac0" + sha256 cellar: :any, arm64_ventura: "e573dabef0b0281c03906bdca0dad06fbfeed385562e9b77b0d89e1dc0152f66" + sha256 cellar: :any, sonoma: "36d6f234b606db2282c7ed6cb1f747a48f20f12478895f802054a9ff26f5fc5d" + sha256 cellar: :any, ventura: "4dbafe776dd24e700747ff4d1cae8211d4ad35d7ca0eca0438e73b523d2d1030" + sha256 cellar: :any_skip_relocation, arm64_linux: "87a8097636da45ac5c760b9a733f6b02a5e1ad10cd0f6f2130c9f0e1be5ce9af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36d6a7393c7b4da3cc884be73b8652e8d0bc93e337f246203c0daec81c293d1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libavif" + depends_on "libpng" + depends_on "libtiff" + depends_on "sdl3" + depends_on "webp" + + uses_from_macos "perl" => :build + + def install + system "cmake", "-S", ".", + "-B", "build", + "-DSDLIMAGE_BACKEND_IMAGEIO=OFF", + "-DSDLIMAGE_BACKEND_STB=OFF", + "-DSDLIMAGE_DEPS_SHARED=OFF", + "-DSDLIMAGE_INSTALL_MAN=ON", + "-DSDLIMAGE_JXL=ON", + "-DSDLIMAGE_STRICT=ON", + "-DSDLIMAGE_SAMPLES=OFF", + "-DSDLIMAGE_TESTS=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + return IMG_Version() == SDL_IMAGE_VERSION ? EXIT_SUCCESS : EXIT_FAILURE; + } + C + system ENV.cc, "test.c", "-I#{Formula["sdl3"].opt_include}", "-L#{lib}", "-lSDL3_image", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl3_ttf.rb b/Formula/s/sdl3_ttf.rb new file mode 100644 index 0000000000000..86691b2d29d1c --- /dev/null +++ b/Formula/s/sdl3_ttf.rb @@ -0,0 +1,52 @@ +class Sdl3Ttf < Formula + desc "Library for using TrueType fonts in SDL applications" + homepage "https://github.com/libsdl-org/SDL_ttf" + url "https://github.com/libsdl-org/SDL_ttf/releases/download/release-3.2.2/SDL3_ttf-3.2.2.tar.gz" + sha256 "63547d58d0185c833213885b635a2c0548201cc8f301e6587c0be1a67e1e045d" + license "Zlib" + head "https://github.com/libsdl-org/SDL_ttf.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ec74409d1b465395c8729c489d256b309154222a3e68d371077038fccb19d793" + sha256 cellar: :any, arm64_sequoia: "472dbc6423662615b135349d3a51e7e71f8bcc143b8ce53e8cfff168680bdebe" + sha256 cellar: :any, arm64_sonoma: "761daa6864eee45de9e75ead2633c10a5087ab441b16c41b1fcf5feb7678442d" + sha256 cellar: :any, arm64_ventura: "202985317ea2e7476b167c5eca26fed1c0558ebe2ef224b83baa43660c725400" + sha256 cellar: :any, sonoma: "20d9df460677a3f2dd6c8d64597b67f490bfff11d3adc9aa371d84ab30c4557b" + sha256 cellar: :any, ventura: "8bdf3baad110c9378c3300dc5ca527dd8bb749bddb43176a28a657eb7ce51825" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea76401d8c8edf3b8ca544b28566e68b6a168d42f6a313129ada522d1b0c2f65" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3b74cf99210527d2a98f1a1c3321f9c933ca969df0b01667630deebbde43183" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "harfbuzz" + depends_on "sdl3" + + uses_from_macos "perl" => :build + + def install + system "cmake", "-S", ".", + "-B", "build", + "-DSDLTTF_PLUTOSVG=OFF", + "-DSDLTTF_INSTALL_MAN=ON", + "-DSDLTTF_STRICT=ON", + "-DSDLTFF_VENDORED=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + return TTF_Version() == SDL_TTF_VERSION ? EXIT_SUCCESS : EXIT_FAILURE; + } + C + system ENV.cc, "test.c", "-I#{Formula["sdl3"].opt_include}", "-L#{lib}", "-lSDL3_ttf", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sdl_gfx.rb b/Formula/s/sdl_gfx.rb new file mode 100644 index 0000000000000..220615dbcf709 --- /dev/null +++ b/Formula/s/sdl_gfx.rb @@ -0,0 +1,40 @@ +class SdlGfx < Formula + desc "Graphics drawing primitives and other support functions" + homepage "https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/" + url "https://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.27.tar.gz" + sha256 "dfb15ac5f8ce7a4952dc12d2aed9747518c5e6b335c0e31636d23f93c630f419" + license "Zlib" + + livecheck do + url :homepage + regex(/href=.*?SDL_gfx[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "381ea9b6f234c356584b80d741e6109ebf16d11ed6bafd418e47f90937ce5cd5" + sha256 cellar: :any, arm64_sequoia: "975c8ba619e76b078e5cab50d4b8b0185e4b238f9dd06c7330c56d7a0a062f0f" + sha256 cellar: :any, arm64_sonoma: "df95d076e726afc8058f9071a82279c82e27d8b997b2afefb59081a6d4ec7bb6" + sha256 cellar: :any, arm64_ventura: "becf09fc1b01e3e6a7ebfd8b9410ffc02f81bff17bca272b2141a425f5a363ea" + sha256 cellar: :any, arm64_monterey: "aff5d8b5fedee006203c3e615b94c5be69ed55b1c91c771d7c7bf238bce3670d" + sha256 cellar: :any, sonoma: "a474c0441ce725279640921c2fe1f7fce7dbdba78798b83b5e6d1088f257a0b8" + sha256 cellar: :any, ventura: "3a33a66abb0aab1556d4ad0aaea1dd87e51f5370a3c160cf571f960035139a89" + sha256 cellar: :any, monterey: "248ed5e56d43d6d8a72bb814f5cab225df686331af62b471f048dd43116a43b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fbeee1c1d7079897509eca368e50b98e1069231605033f775fed43199a99da7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0d9c2a0a9a19755c096b6e3718be733b85336f11aee29d6d7ce6ee04305cf42" + end + + depends_on "sdl12-compat" + + def install + extra_args = [] + extra_args << "--disable-mmx" if Hardware::CPU.arm? + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--disable-sdltest", + *extra_args + system "make", "install" + end +end diff --git a/Formula/s/sdlpop.rb b/Formula/s/sdlpop.rb new file mode 100644 index 0000000000000..581282c63e000 --- /dev/null +++ b/Formula/s/sdlpop.rb @@ -0,0 +1,58 @@ +class Sdlpop < Formula + desc "Open-source port of Prince of Persia" + homepage "https://github.com/NagyD/SDLPoP" + url "https://github.com/NagyD/SDLPoP/archive/refs/tags/v1.23.tar.gz" + sha256 "41a9aa64b4e8d0a9d7a84ffced48f74f9528d81adbffc08593ecf84776c5d77a" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6e3cea82ac70bf426add75f5a387ca949deda5662ba1dbf3a5e0d22ac4f88270" + sha256 cellar: :any, arm64_sequoia: "b71553517e9b05d247c8d440606ece9cb18ed9362e2dacdda29ff653158777fb" + sha256 cellar: :any, arm64_sonoma: "1100bae067cd7cee5b4846be8718e0ecb2a9ada163c97b681cf767be47fc6c8a" + sha256 cellar: :any, arm64_ventura: "07ea2286bb9e2e5aefd579d7125882d5d744f3e3f7f5bbe1d67ce23242d8463f" + sha256 cellar: :any, arm64_monterey: "5678d9cd2ecb1de029c137d281034b891215f98ee9a2cc47c4597dd7d3467c92" + sha256 cellar: :any, arm64_big_sur: "985ca9d07147b53562d0402685ab3e7db04803b18fbcaab180d8edacd64f40b8" + sha256 cellar: :any, sonoma: "305326724cf1be0e0c633a0412110b71c7d06b88c5094ad7c669be8f5c32d510" + sha256 cellar: :any, ventura: "21793456afcbac882492103a1f0f3b5d2a4b88c26df8df93be46c7ace3d96251" + sha256 cellar: :any, monterey: "30ac230fb6c1f6fdd28d539c779428b5249e98f3984f4a8aba4ea4eba1038b61" + sha256 cellar: :any, big_sur: "82fc8922689771f58c21f1fd08f1fc2b39c4cd32aee875c21152178ce5ef448a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9daa7ef72865e7a540bdf684c5e58c59aa510ba5719c361abceac75f401006e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ef6448ced32c9d812689e9103bce4cf3df4eba04d34325898b205438fd73bc8" + end + + depends_on "pkgconf" => :build + depends_on "sdl2" + depends_on "sdl2_image" + + def install + system "make", "-C", "src" + doc.install Dir["doc/*"] + libexec.install "data" + libexec.install "prince" + + # Use var directory to keep save and replay files + pkgvar = var/"sdlpop" + pkgvar.install "SDLPoP.ini" unless (pkgvar/"SDLPoP.ini").exist? + + (bin/"prince").write <<~EOS + #!/bin/bash + cd "#{pkgvar}" && exec "#{libexec}/prince" $@ + EOS + end + + def caveats + <<~EOS + Save and replay files are stored in the following directory: + #{var}/sdlpop + EOS + end + + test do + assert_equal "See README.md", shell_output("#{bin}/prince --help").chomp + end +end diff --git a/Formula/s/sdns.rb b/Formula/s/sdns.rb new file mode 100644 index 0000000000000..56800910b840f --- /dev/null +++ b/Formula/s/sdns.rb @@ -0,0 +1,41 @@ +class Sdns < Formula + desc "Privacy important, fast, recursive dns resolver server with dnssec support" + homepage "https://sdns.dev/" + url "https://github.com/semihalev/sdns/archive/refs/tags/v1.6.0.tar.gz" + sha256 "1df9b0f18d2cca65dc1997159d1c529c8a4a1b19762d4e07017f5bc7ae901811" + license "MIT" + head "https://github.com/semihalev/sdns.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6e8c50abf9f5ff1f31441b9ae70564e651637bc91ea441a297e539334f83c99" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4c16d068891027f263d505b3f9cac7b6d0330d9829861bab63386e7a9b9d59c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dde946dba2f7a1c0f31d436e09eac8d3a02c91e568ef4d341a6f565c66ecb441" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c940f9ccd89eb8dba9f2fbe63c237cf32c734be1d7132dcfa9f9c4ba8e3a60c7" + sha256 cellar: :any_skip_relocation, sonoma: "d5d0859f7c9852069869233f9847e7c2f0a5534897dc1f475bcc3b99549dee57" + sha256 cellar: :any_skip_relocation, ventura: "f237a979c49b0f4e602a96f1236ceef3401f065f451fa4f8dd36f300ee664e33" + sha256 cellar: :any_skip_relocation, arm64_linux: "506ca34cb4fc9f2c653dea2a0dbb42cbddb48357d84b71f8ac866a740e1e6feb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "080dc545bbe7a8305c55a0cbf21c4db8f521dd163ae039afb410d0b78156a0fb" + end + + depends_on "go" => :build + + def install + system "make", "build" + bin.install "sdns" + end + + service do + run [opt_bin/"sdns", "--config", etc/"sdns.conf"] + keep_alive true + require_root true + error_log_path var/"log/sdns.log" + log_path var/"log/sdns.log" + working_dir opt_prefix + end + + test do + spawn bin/"sdns", "--config", testpath/"sdns.conf" + sleep 2 + assert_path_exists testpath/"sdns.conf" + end +end diff --git a/Formula/s/seal.rb b/Formula/s/seal.rb new file mode 100644 index 0000000000000..daff5f0afff4b --- /dev/null +++ b/Formula/s/seal.rb @@ -0,0 +1,113 @@ +class Seal < Formula + desc "Easy-to-use homomorphic encryption library" + homepage "https://github.com/microsoft/SEAL" + url "https://github.com/microsoft/SEAL/archive/refs/tags/v4.1.2.tar.gz" + sha256 "acc2a1a127a85d1e1ffcca3ffd148f736e665df6d6b072df0e42fff64795a13c" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7981b6b9066d8b486abb11f448350618516f5fa05328e712889a0a27789fb050" + sha256 cellar: :any, arm64_sequoia: "d722e8423730c3ec9aee70ed7c8655f674d11214b3f223be032b1c1eaa75059e" + sha256 cellar: :any, arm64_sonoma: "ebfbfe9d6480f7f9d2ed977467595aec941ba25a97755507340710020adc4425" + sha256 cellar: :any, arm64_ventura: "86478b9f5e642a9c5a151053a4f1eb6b85a760e7e9e627cc4bbc2fb9f4b25e58" + sha256 cellar: :any, sonoma: "e38a08c1096eb328fbc578e337330e437f73284fe02b46eb794bcbbd14f5e6d9" + sha256 cellar: :any, ventura: "f7bb995a9e3436465ae5147f8348bc72781829765f37c6eeba3666f2b37b6181" + sha256 cellar: :any_skip_relocation, arm64_linux: "906f743d9dc3cdb936bffcbcc29a34cd758d9ebf419a3d261f3af0f1141bc324" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d36a437367854b03cfa9802ee07ca8c22377be28ea20de45b8e23f70d6906ea7" + end + + depends_on "cmake" => [:build, :test] + depends_on "cpp-gsl" + depends_on "zstd" + + uses_from_macos "zlib" + + resource "hexl" do + url "https://github.com/IntelLabs/hexl/archive/refs/tags/v1.2.5.tar.gz" + sha256 "3692e6e6183dbc49253e51e86c3e52e7affcac925f57db0949dbb4d34b558a9a" + end + + # patch cmake configs, remove in next release + patch do + url "https://github.com/microsoft/SEAL/commit/13e94ef0e01aa9874885bbfdbca1258ab380ddeb.patch?full_index=1" + sha256 "19e3dde5aeb78c01dbe5ee73624cf4621060d071ab1a437515eedc00b47310a1" + end + + def install + if Hardware::CPU.intel? + resource("hexl").stage do + hexl_args = %w[ + -DHEXL_BENCHMARK=OFF + -DHEXL_TESTING=OFF + -DHEXL_EXPORT=ON + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + system "cmake", "-S", ".", "-B", "build", *hexl_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + ENV.append "LDFLAGS", "-L#{lib}" + end + + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DSEAL_BUILD_DEPS=OFF + -DSEAL_USE_ALIGNED_ALLOC=#{OS.mac? ? "ON" : "OFF"} + -DSEAL_USE_INTEL_HEXL=#{Hardware::CPU.intel? ? "ON" : "OFF"} + -DHEXL_DIR=#{lib}/cmake + -DCMAKE_CXX_FLAGS=-I#{include} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "native/examples" + end + + test do + cp_r (pkgshare/"examples"), testpath + + # remove the partial CMakeLists + File.delete testpath/"examples/CMakeLists.txt" + + # Chip in a new "CMakeLists.txt" for example code tests + (testpath/"examples/CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.12) + project(SEALExamples VERSION #{version} LANGUAGES CXX) + # Executable will be in ../bin + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SEALExamples_SOURCE_DIR}/../bin) + + add_executable(sealexamples examples.cpp) + target_sources(sealexamples + PRIVATE + 1_bfv_basics.cpp + 2_encoders.cpp + 3_levels.cpp + 4_bgv_basics.cpp + 5_ckks_basics.cpp + 6_rotation.cpp + 7_serialization.cpp + 8_performance.cpp + ) + + # Import Microsoft SEAL + find_package(SEAL #{version} EXACT REQUIRED + # Providing a path so this can be built without installing Microsoft SEAL + PATHS ${SEALExamples_SOURCE_DIR}/../src/cmake + ) + + # Link Microsoft SEAL + target_link_libraries(sealexamples SEAL::seal_shared) + CMAKE + + system "cmake", "-S", "examples", "-B", "build", "-DHEXL_DIR=#{lib}/cmake" + system "cmake", "--build", "build", "--target", "sealexamples" + + # test examples 1-5 and exit + input = "1\n2\n3\n4\n5\n0\n" + assert_match "Parameter validation (success): valid", pipe_output("bin/sealexamples", input) + end +end diff --git a/Formula/s/seam.rb b/Formula/s/seam.rb new file mode 100644 index 0000000000000..52e548d02ebfc --- /dev/null +++ b/Formula/s/seam.rb @@ -0,0 +1,29 @@ +class Seam < Formula + desc "This utility lets you control Seam resources" + homepage "https://github.com/seamapi/seam-cli" + url "https://registry.npmjs.org/seam-cli/-/seam-cli-0.0.61.tgz" + sha256 "64135eb8de1ddbc5190379088a34f87927b2e803a9bb71ce47cf1d873b1d94a0" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e78f5c486295d6805811e6a48f3f0a1443706bc5d98430f3f860fc3ae84d8c99" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Build an `:all` bottle by removing workflow files + node_modules = libexec/"lib/node_modules" + rm_r node_modules/"seam-cli/ldid/.github" + end + + test do + system bin/"seam", "config", "set", "fake-server" + output = shell_output("#{bin}/seam health get_health") + assert_match "I’m one with the Force. The Force is with me.", output + end +end diff --git a/Formula/s/search-that-hash.rb b/Formula/s/search-that-hash.rb new file mode 100644 index 0000000000000..098c689cdcbd5 --- /dev/null +++ b/Formula/s/search-that-hash.rb @@ -0,0 +1,132 @@ +class SearchThatHash < Formula + include Language::Python::Virtualenv + + desc "Searches Hash APIs to crack your hash quickly" + homepage "https://github.com/bee-san/Search-That-Hash" + url "https://files.pythonhosted.org/packages/5e/b9/a304a92ba77a9e18b3023b66634e71cded5285cef7e3b56d3c1874e9d84e/search-that-hash-0.2.8.tar.gz" + sha256 "384498abbb9a611aa173b20d06b135e013674670fecc01b34d456bfe536e0bca" + license "GPL-3.0-or-later" + revision 11 + head "https://github.com/bee-san/Search-That-Hash.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "aad5c9a231d56217b7408cab6b9001e76fd87c4911fd33160197792a33650d26" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" + sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" + end + + resource "cloudscraper" do + url "https://files.pythonhosted.org/packages/ac/25/6d0481860583f44953bd791de0b7c4f6d7ead7223f8a17e776247b34a5b4/cloudscraper-1.2.71.tar.gz" + sha256 "429c6e8aa6916d5bad5c8a5eac50f3ea53c9ac22616f6cb21b18dcc71517d0d3" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "coloredlogs" do + url "https://files.pythonhosted.org/packages/cc/c7/eed8f27100517e8c0e6b923d5f0845d0cb99763da6fdee00478f91db7325/coloredlogs-15.0.1.tar.gz" + sha256 "7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0" + end + + resource "commonmark" do + url "https://files.pythonhosted.org/packages/60/48/a60f593447e8f0894ebb7f6e6c1f25dafc5e89c5879fdc9360ae93ff83f0/commonmark-0.9.1.tar.gz" + sha256 "452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60" + end + + resource "humanfriendly" do + url "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz" + sha256 "6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "loguru" do + url "https://files.pythonhosted.org/packages/6d/25/0d65383fc7b4f4ce9505d16773b2b2a9f0f465ef00ab337d66afff47594a/loguru-0.5.3.tar.gz" + sha256 "b28e72ac7a98be3d28ad28570299a393dfcd32e5e3f6a353dec94675767b6319" + end + + resource "name-that-hash" do + url "https://files.pythonhosted.org/packages/32/58/1f4052bd4999c5aceb51c813cc8ef32838561c8fb18f90cf4b86df6bd818/name-that-hash-1.10.0.tar.gz" + sha256 "aabe1a3e23f5f8ca1ef6522eb1adcd5c69b5fed3961371ed84a22fc86ee648a2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ae/f6/6ffb46f6cf0bb584e44279accd3321cb838b78b324031feb8fd9adf63ed2/rich-9.13.0.tar.gz" + sha256 "d59e94a0e3e686f0d268fe5c7060baa1bd6744abca71b45351f5850a3aaa6764" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/ed/12/c5079a15cf5c01d7f4252b473b00f7e68ee711be605b9f001528f0298b98/typing_extensions-3.10.0.2.tar.gz" + sha256 "49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # Switch build-system to poetry-core to avoid rust dependency on Linux. + # Remove when merged/released: https://github.com/bee-san/Search-That-Hash/pull/184 + inreplace "pyproject.toml", 'requires = ["poetry>=0.12"]', 'requires = ["poetry-core>=1.0"]' + inreplace "pyproject.toml", 'build-backend = "poetry.masonry.api"', 'build-backend = "poetry.core.masonry.api"' + + virtualenv_install_with_resources + end + + test do + hash = "5f4dcc3b5aa765d61d8327deb882cf99" + output = shell_output("#{bin}/sth --text #{hash}") + assert_match "#{hash}\n", output + assert_match "Text : password\nType : MD5\n", output + end +end diff --git a/Formula/s/seaweedfs.rb b/Formula/s/seaweedfs.rb new file mode 100644 index 0000000000000..35363173f0567 --- /dev/null +++ b/Formula/s/seaweedfs.rb @@ -0,0 +1,69 @@ +class Seaweedfs < Formula + desc "Fast distributed storage system" + homepage "https://github.com/seaweedfs/seaweedfs" + url "https://github.com/seaweedfs/seaweedfs.git", + tag: "4.00", + revision: "20a2e672d2847c4a2a53ff9676d08ce91600536c" + license "Apache-2.0" + head "https://github.com/seaweedfs/seaweedfs.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a9ad92e8a1101404cd13396ba179de66d34a203fbca1ef9e83b35e3a6adfec1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f1851fe52094b5d049c7f492ed4a1e6d76ac91e1fec61c0d866999af77aca52" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f52d09f328b1085672b9419c8b39f95a81293efa4cd05e8e6ca200949f78d171" + sha256 cellar: :any_skip_relocation, sonoma: "0dd0e28d7a8161470b6e2b316ed3815ceabc840cb2458bc2cd7996b84124af94" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0d31e1a5ee5983069fb6b1a8c2bbe8cfc95ea6f1bdd78e0775202c24b934b22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5abe9df4ce15e71d5fe592cee55c120c09700704d4d3962d2bf5b83fb4115edf" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=#{Utils.git_head} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"weed"), "./weed" + end + + def post_install + (var/"seaweedfs").mkpath + end + + service do + run [opt_bin/"weed", "server", "-dir=#{var}/seaweedfs", "-s3"] + keep_alive true + error_log_path var/"log/seaweedfs.log" + log_path var/"log/seaweedfs.log" + working_dir var + end + + test do + # Start SeaweedFS master server/volume server + master_port = free_port + volume_port = free_port + master_grpc_port = free_port + volume_grpc_port = free_port + + fork do + exec bin/"weed", "server", "-dir=#{testpath}", "-ip.bind=0.0.0.0", + "-master.port=#{master_port}", "-volume.port=#{volume_port}", + "-master.port.grpc=#{master_grpc_port}", "-volume.port.grpc=#{volume_grpc_port}" + end + sleep 30 + + # Upload a test file + fid = JSON.parse(shell_output("curl http://localhost:#{master_port}/dir/assign"))["fid"] + system "curl", "-F", "file=@#{test_fixtures("test.png")}", "http://localhost:#{volume_port}/#{fid}" + + # Download and validate uploaded test file against the original + expected_sum = Digest::SHA256.hexdigest(File.read(test_fixtures("test.png"))) + actual_sum = Digest::SHA256.hexdigest(shell_output("curl http://localhost:#{volume_port}/#{fid}")) + assert_equal expected_sum, actual_sum + end +end diff --git a/Formula/s/sec.rb b/Formula/s/sec.rb new file mode 100644 index 0000000000000..2dcd678c0f9ad --- /dev/null +++ b/Formula/s/sec.rb @@ -0,0 +1,21 @@ +class Sec < Formula + desc "Event correlation tool for event processing of various kinds" + homepage "https://simple-evcorr.sourceforge.net/" + url "https://github.com/simple-evcorr/sec/releases/download/2.9.3/sec-2.9.3.tar.gz" + sha256 "280f5b94eebbf7efbf5a7d7e417beae75415a7dc5103a2d0fdb3008568fb9f30" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8a177a1143fb753c0e6657473880f30f8d31cccff86b15ac6fac8274375f9d6c" + end + + def install + bin.install "sec" + man1.install "sec.man" => "sec.1" + end + + test do + system bin/"sec", "--version" + end +end diff --git a/Formula/s/secp256k1.rb b/Formula/s/secp256k1.rb new file mode 100644 index 0000000000000..fe933bffb4651 --- /dev/null +++ b/Formula/s/secp256k1.rb @@ -0,0 +1,51 @@ +class Secp256k1 < Formula + desc "Optimized C library for EC operations on curve secp256k1" + homepage "https://github.com/bitcoin-core/secp256k1" + url "https://github.com/bitcoin-core/secp256k1/archive/refs/tags/v0.7.0.tar.gz" + sha256 "073d19064f3600014750d6949b31a0c957aa7b98920fb4aaa495be07e8e7cd00" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "befb6fbd1a71854d37fd02f7762968151bb6ce4d6a0246aea586d539a26b845a" + sha256 cellar: :any, arm64_sequoia: "64b1307ae159f1e9506b976f0c8bb9c2864493da921c26a380f5630524e6687f" + sha256 cellar: :any, arm64_sonoma: "7b1a6a372671699586fb30bae9ebc3bf41fbcf68ba650667bbd68d119d767f7a" + sha256 cellar: :any, arm64_ventura: "bf0148f53d69073acc33bd0ceee9c526bb91897a950f0541ec163d9a88a447b4" + sha256 cellar: :any, sonoma: "84bf45089a776dcf80f8721a6c64abacc1a10c591835cf53f2c9e485b395d8ed" + sha256 cellar: :any, ventura: "b4d7173aca17c79711e91884464731996d123d515cb616ac47802bc100e0d184" + sha256 cellar: :any_skip_relocation, arm64_linux: "211ac9db07ad07a3b656541f2cfa496cc7101f6c87089d586150adea62406e6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5d0a7f12a90195c27beb544bf7856920744af124389d96ae177c507284e5aa7" + end + + depends_on "autoconf" => [:build] + depends_on "automake" => [:build] + depends_on "libtool" => [:build] + + def install + system "./autogen.sh" + args = %w[ + --disable-silent-rules + --enable-module-recovery + --enable-module-ecdh + --enable-module-schnorrsig + --enable-module-extrakeys + ] + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + secp256k1_context* ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE); + secp256k1_context_destroy(ctx); + return 0; + } + C + system ENV.cc, "test.c", + "-L#{lib}", "-lsecp256k1", + "-o", "test" + system "./test" + end +end diff --git a/Formula/s/secretspec.rb b/Formula/s/secretspec.rb new file mode 100644 index 0000000000000..8ea17d1e6797e --- /dev/null +++ b/Formula/s/secretspec.rb @@ -0,0 +1,36 @@ +class Secretspec < Formula + desc "Declarative secrets management tool" + homepage "https://secretspec.dev" + url "https://github.com/cachix/secretspec/archive/refs/tags/v0.3.3.tar.gz" + sha256 "03b61a39b834a459e97540bbf935a57af31fe9d8024b40ad135823fbded61c5d" + license "Apache-2.0" + head "https://github.com/cachix/secretspec.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "308b775c028405ece38ad1b91591ae6517d77b0f2ddb6f3bceafbb3941472d1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d7d9ea7fc927d112fa79296ca97cfab7e6b21abb2efb3686723f180de492e4a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24dc84cb790765cbef406f35995ed5c180627ef52bce1c55a14927fdd04d2f2a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f426d5af0e170d890c12dec15c98e0e2840639df0a9ea7f58fc19da933a5d81b" + sha256 cellar: :any_skip_relocation, sonoma: "d972936414ffa1269c4570fa25cef3cd22f0a6b0aa5a4a8e2ff8858ba75276c9" + sha256 cellar: :any_skip_relocation, ventura: "049391fb7eaa008ccfa4ca68c6f026347ef2499694609b796a0e230134ab9449" + sha256 cellar: :any_skip_relocation, arm64_linux: "715e84f13e1dd31a3f44cd4e2c6f3defbf0a263134c2e9a0e65a8b9eda80a534" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d30247a95b61fc15f93106e3afca1e71db1c31542d088ecaab579cd1bf7c6d1c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "dbus" + end + + def install + system "cargo", "install", *std_cargo_args(path: "secretspec") + end + + test do + assert_match version.to_s, shell_output("#{bin}/secretspec --version") + system bin/"secretspec", "init" + assert_path_exists testpath/"secretspec.toml" + end +end diff --git a/Formula/s/securefs.rb b/Formula/s/securefs.rb new file mode 100644 index 0000000000000..64fb7d4d14cf5 --- /dev/null +++ b/Formula/s/securefs.rb @@ -0,0 +1,49 @@ +class Securefs < Formula + desc "Filesystem with transparent authenticated encryption" + homepage "https://github.com/netheril96/securefs" + url "https://github.com/netheril96/securefs/archive/refs/tags/v2.0.0.tar.gz" + sha256 "d7fac7adc70c09473173aeadee5b7041d7e63fbf392ef40bdd77888590bb12a2" + license "MIT" + revision 1 + head "https://github.com/netheril96/securefs.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_linux: "bd090ea6c88ee49ea828fb2fe4756ddd0a3d15975a911abd42ada53338f39d2c" + sha256 x86_64_linux: "2a160b2c4720a6be867f6f072993dc7f708b6b44908821710fa58c63078deb9d" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "tclap" => :build + depends_on "abseil" + depends_on "argon2" + depends_on "cryptopp" + depends_on "fruit" + depends_on "jsoncpp" + depends_on "libfuse@2" # FUSE 3 issue: https://github.com/netheril96/securefs/issues/181 + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "protobuf" + depends_on "sqlite" + depends_on "uni-algo" + depends_on "utf8proc" + + def install + args = %w[ + -DSECUREFS_ENABLE_INTEGRATION_TEST=OFF + -DSECUREFS_ENABLE_UNIT_TEST=OFF + -DSECUREFS_USE_VCPKG=OFF + ] + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"securefs", "version" # The sandbox prevents a more thorough test + end +end diff --git a/Formula/s/seexpr.rb b/Formula/s/seexpr.rb new file mode 100644 index 0000000000000..a3fb7114d25ca --- /dev/null +++ b/Formula/s/seexpr.rb @@ -0,0 +1,95 @@ +class Seexpr < Formula + desc "Embeddable expression evaluation engine" + homepage "https://wdas.github.io/SeExpr/" + url "https://github.com/wdas/SeExpr/archive/refs/tags/v3.0.1.tar.gz" + sha256 "1e4cd35e6d63bd3443e1bffe723dbae91334c2c94a84cc590ea8f1886f96f84e" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "0fd5628f6fdb5836a1dac4449b9d676a31ef446d1e7f7f991a62c09e56029d2c" + sha256 cellar: :any, arm64_sequoia: "bb4a0dda70f5ddd52570aa14998475ca6a14a02e57c0703084d32b25fee3b69d" + sha256 cellar: :any, arm64_sonoma: "1b5ce1a0a308b584bd43837a5cc06fa4d1c88276bec2b1a510088a96d947033f" + sha256 cellar: :any, arm64_ventura: "48d883728af997e5d3805c2b162973aa5d883b38db75ce2caeb5174406276713" + sha256 cellar: :any, sonoma: "e4c95048b7bef18faee54008b94f674863f18b42fd1fa6bc978c6c96a0167791" + sha256 cellar: :any, ventura: "1634179b0990f9b55997ea81ff5a9b8702cb4d8fdaaa3f3ef64d34b5ccb45bfb" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc21c3bcac5847ffdfab83c45e85312726b9bc0bc4f6af7b3a1457b85e2baa97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb306407c4c3dceac93d89e8505a81bde4b4a20798f2e856bf7189ae41dc77ea" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "libpng" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + sse4 = Hardware::CPU.intel? && ((OS.mac? && MacOS.version.requires_sse4?) || + (!build.bottle? && Hardware::CPU.sse4?)) + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DUSE_PYTHON=FALSE + -DENABLE_LLVM_BACKEND=FALSE + -DENABLE_QT5=FALSE + -DENABLE_SSE4=#{sse4 ? "ON" : "OFF"} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "doc" + system "cmake", "--install", "build" + end + + test do + actual_output = shell_output("#{bin}/asciiGraph2 'x^3-8*x'").lines.map(&:rstrip).join("\n") + roundoff = "#" if Hardware::CPU.arm? && (!OS.mac? || MacOS.version >= :ventura) + expected_output = <<~EOS + | # + ## | # + ### | + # # | # + # ## | # + # # | # + ## # | # + # ## | # + # # | # + # # | # + # # | # + # #| # + # #| # + # #| # + ---------------------#-------##-------#--------------------- + # # # + # # # + # # # + # ## # + # |# # + # |# # + # |# # + # |## # + # | # # + # | # # + # | ## # + # | # # + | ####{roundoff} + # | ## + # | + EOS + + assert_equal expected_output.rstrip, actual_output + end +end diff --git a/Formula/s/selecta.rb b/Formula/s/selecta.rb new file mode 100644 index 0000000000000..3e3bef103a36a --- /dev/null +++ b/Formula/s/selecta.rb @@ -0,0 +1,24 @@ +class Selecta < Formula + desc "Fuzzy text selector for files and anything else you need to select" + homepage "https://github.com/garybernhardt/selecta" + url "https://github.com/garybernhardt/selecta/archive/refs/tags/v0.0.7.tar.gz" + sha256 "00d1bdabb44b93f90018438f8ffc0780f96893b809b52956abb9485f509d03d2" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ec55655e3c404bba347f242a7b24e7504b181fd2f364a85dad9e4c770231a79d" + end + + uses_from_macos "ruby" + + def install + bin.install "selecta" + end + + test do + system bin/"selecta", "--version" + end +end diff --git a/Formula/s/selene.rb b/Formula/s/selene.rb new file mode 100644 index 0000000000000..feba268ac6504 --- /dev/null +++ b/Formula/s/selene.rb @@ -0,0 +1,34 @@ +class Selene < Formula + desc "Blazing-fast modern Lua linter" + homepage "https://kampfkarren.github.io/selene" + url "https://github.com/Kampfkarren/selene/archive/refs/tags/0.29.0.tar.gz" + sha256 "9882007e7b2d16023cd2c69d64d72afbee65dce7c3ab44a1527f5318667ed2a1" + license "MPL-2.0" + head "https://github.com/Kampfkarren/selene.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1de3f2619b86314cd483dc5c61f38109721f5dad2ae982f8348875a1ce1369a4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "48baf71e9c514a0a2d66cf02d5ec9eaab7e95e294f118f6dbf9f56c7cbece091" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14fbcf98dcb3ad687d2cadefc30044dca0fbee5ce948d3d7540e2a20264d6383" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e0966eaf9bcfeccbbb73139300b199d593d47c46e6780d2c52258361cd49adb5" + sha256 cellar: :any_skip_relocation, sonoma: "7534a8fd3e38bc06b66066215b1614b4f7ab2955fa60a481cc9e74a2c984df1f" + sha256 cellar: :any_skip_relocation, ventura: "fd710434b95e8a7e81dd173454b5dffcda8d47d704f7f65d1562cbff8ede84f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8d7ef905a27b634762d82a45ff2bb070dca969729650d306d4431b3a0ebe2d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0593ac6106f4b65f587c97faef649524f83b14e2d336ce624e5f086d8e14b886" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + def install + cd "selene" do + system "cargo", "install", "--bin", "selene", *std_cargo_args + end + end + + test do + (testpath/"selene.toml").write("std = \"lua52\"") + (testpath/"test.lua").write("print(1 / 0)") + assert_match "warning[divide_by_zero]", shell_output("#{bin}/selene #{testpath}/test.lua", 1) + end +end diff --git a/Formula/s/selenium-server.rb b/Formula/s/selenium-server.rb new file mode 100644 index 0000000000000..1591390bfbff6 --- /dev/null +++ b/Formula/s/selenium-server.rb @@ -0,0 +1,61 @@ +class SeleniumServer < Formula + desc "Browser automation for testing purposes" + homepage "https://www.selenium.dev/" + url "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.38.0/selenium-server-4.38.0.jar" + sha256 "d7fa69f86f18d08908aa1dfc54bbbd4c834ec5112740ba7744ac8abcfc640ae8" + license "Apache-2.0" + + livecheck do + url "https://www.selenium.dev/downloads/" + regex(/href=.*?selenium-server[._-]v?(\d+(?:\.\d+)+)\.jar/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "fcc40625206dd221e72a95dde46acee5a940bc8f580671ba2df3b88ea13220c7" + end + + depends_on "openjdk" + + on_linux do + depends_on arch: :x86_64 # org.openqa.selenium.grid.config.ConfigException: No drivers for arm64 Linux + end + + def install + libexec.install "selenium-server-#{version}.jar" + bin.write_jar_script libexec/"selenium-server-#{version}.jar", "selenium-server" + end + + service do + run [opt_bin/"selenium-server", "standalone", "--port", "4444"] + keep_alive false + log_path var/"log/selenium-output.log" + error_log_path var/"log/selenium-error.log" + end + + test do + port = free_port + spawn "#{bin}/selenium-server standalone --selenium-manager true --port #{port}" + + parsed_output = nil + + max_attempts = 100 + attempt = 0 + + loop do + attempt += 1 + break if attempt > max_attempts + + sleep 3 + + output = Utils.popen_read("curl", "--silent", "localhost:#{port}/status") + next unless $CHILD_STATUS.exitstatus.zero? + + parsed_output = JSON.parse(output) + break if parsed_output["value"]["ready"] + end + + refute_nil parsed_output + assert parsed_output["value"]["ready"] + assert_match version.to_s, parsed_output["value"]["nodes"].first["version"] + end +end diff --git a/Formula/s/semgrep.rb b/Formula/s/semgrep.rb new file mode 100644 index 0000000000000..785911c89ed82 --- /dev/null +++ b/Formula/s/semgrep.rb @@ -0,0 +1,441 @@ +class Semgrep < Formula + include Language::Python::Virtualenv + + desc "Easily detect and prevent bugs and anti-patterns in your codebase" + homepage "https://semgrep.dev" + # pull from git tag to get submodules + url "https://github.com/semgrep/semgrep.git", + tag: "v1.142.0", + revision: "4111b9ccdef768302c97de7a6e8f9f6d36a4ecdf" + license "LGPL-2.1-only" + head "https://github.com/semgrep/semgrep.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "22a5095ddbf4f396387a3dbc8eadb75e65521bc14b34c806fcf4ac45942902a8" + sha256 cellar: :any, arm64_sequoia: "544ca80bffe56c8288e052ecd2aa608ae30aa53c73e1f9939c300f541fa1fed1" + sha256 cellar: :any, arm64_sonoma: "5246a6044482bebae02affc941201bb7ea6ed138480513fe2182120ca4a024c4" + sha256 cellar: :any, sonoma: "053e9cf52f466780a955b024a2c60d145ccf1b990a4bb3d6419827035155b4c7" + sha256 arm64_linux: "cc146905dc2a069f036096f70dc7f1a54d351e8d112507bbd3202ac72cb63b7e" + sha256 x86_64_linux: "6b1d0ddff0c2226e26585d2ec6516e09433bc772469b7cec0bb30f1c9fd947c7" + end + + depends_on "autoconf" => :build + depends_on "cmake" => :build + depends_on "coreutils"=> :build + depends_on "dune" => :build + depends_on "ocaml" => :build + depends_on "opam" => :build + depends_on "pipenv" => :build + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "dwarfutils" + depends_on "gmp" + depends_on "libev" + depends_on "pcre" + depends_on "pcre2" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + depends_on "sqlite" + depends_on "tree-sitter" + depends_on "zstd" + + uses_from_macos "rsync" => :build + uses_from_macos "curl" + + on_linux do + depends_on "elfutils" + depends_on "libunwind" + end + + pypi_packages package_name: "semgrep", + exclude_packages: %w[certifi pydantic-core rpds-py] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boltons" do + url "https://files.pythonhosted.org/packages/ad/1f/6c0608d86e0fc77c982a2923ece80eef85f091f2332fc13cbce41d70d502/boltons-21.0.0.tar.gz" + sha256 "65e70a79a731a7fe6e98592ecfb5ccf2115873d01dbc576079874629e5c90f13" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz" + sha256 "98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "click-option-group" do + url "https://files.pythonhosted.org/packages/ef/ff/d291d66595b30b83d1cb9e314b2c9be7cfc7327d4a0d40a15da2416ea97b/click_option_group-0.5.9.tar.gz" + sha256 "f94ed2bc4cf69052e0f29592bd1e771a1789bd7bfc482dd0bc482134aff95823" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "exceptiongroup" do + url "https://files.pythonhosted.org/packages/09/35/2495c4ac46b980e4ca1f6ad6db102322ef3ad2410b79fdde159a4b0f3b92/exceptiongroup-1.2.2.tar.gz" + sha256 "47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc" + end + + resource "face" do + url "https://files.pythonhosted.org/packages/ac/79/2484075a8549cd64beae697a8f664dee69a5ccf3a7439ee40c8f93c1978a/face-24.0.0.tar.gz" + sha256 "611e29a01ac5970f0077f9c577e746d48c082588b411b33a0dd55c4d872949f6" + end + + resource "glom" do + url "https://files.pythonhosted.org/packages/3f/d1/69432deefa6f5283ec75b246d0540097ae26f618b915519ee3824c4c5dd6/glom-22.1.0.tar.gz" + sha256 "1510c6587a8f9c64a246641b70033cbc5ebde99f02ad245693678038e821aeb5" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/30/43/b25abe02db2911397819003029bef768f68a974f2ece483e6084d1a5f754/googleapis_common_protos-1.71.0.tar.gz" + sha256 "1aec01e574e29da63c80ba9f7bbf1ccfaacf1da877f23609fe236ca7c72a2e2e" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/3d/a1/b1f328da3b153683d2ec34f849b4b6eac2790fb240e3aef06ff2fab3df9d/mcp-1.16.0.tar.gz" + sha256 "39b8ca25460c578ee2cdad33feeea122694cfdf73eef58bee76c42f6ef0589df" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/63/04/05040d7ce33a907a2a02257e601992f0cdf11c73b33f13c4492bf6c3d6d5/opentelemetry_api-1.37.0.tar.gz" + sha256 "540735b120355bd5112738ea53621f8d5edb35ebcd6fe21ada3ab1c61d1cd9a7" + end + + resource "opentelemetry-exporter-otlp-proto-common" do + url "https://files.pythonhosted.org/packages/dc/6c/10018cbcc1e6fff23aac67d7fd977c3d692dbe5f9ef9bb4db5c1268726cc/opentelemetry_exporter_otlp_proto_common-1.37.0.tar.gz" + sha256 "c87a1bdd9f41fdc408d9cc9367bb53f8d2602829659f2b90be9f9d79d0bfe62c" + end + + resource "opentelemetry-exporter-otlp-proto-http" do + url "https://files.pythonhosted.org/packages/5d/e3/6e320aeb24f951449e73867e53c55542bebbaf24faeee7623ef677d66736/opentelemetry_exporter_otlp_proto_http-1.37.0.tar.gz" + sha256 "e52e8600f1720d6de298419a802108a8f5afa63c96809ff83becb03f874e44ac" + end + + resource "opentelemetry-instrumentation" do + url "https://files.pythonhosted.org/packages/f6/36/7c307d9be8ce4ee7beb86d7f1d31027f2a6a89228240405a858d6e4d64f9/opentelemetry_instrumentation-0.58b0.tar.gz" + sha256 "df640f3ac715a3e05af145c18f527f4422c6ab6c467e40bd24d2ad75a00cb705" + end + + resource "opentelemetry-instrumentation-requests" do + url "https://files.pythonhosted.org/packages/36/42/83ee32de763b919779aaa595b60c5a7b9c0a4b33952bbe432c5f6a783085/opentelemetry_instrumentation_requests-0.58b0.tar.gz" + sha256 "ae9495e6ff64e27bdb839fce91dbb4be56e325139828e8005f875baf41951a2e" + end + + resource "opentelemetry-proto" do + url "https://files.pythonhosted.org/packages/dd/ea/a75f36b463a36f3c5a10c0b5292c58b31dbdde74f6f905d3d0ab2313987b/opentelemetry_proto-1.37.0.tar.gz" + sha256 "30f5c494faf66f77faeaefa35ed4443c5edb3b0aa46dad073ed7210e1a789538" + end + + resource "opentelemetry-sdk" do + url "https://files.pythonhosted.org/packages/f4/62/2e0ca80d7fe94f0b193135375da92c640d15fe81f636658d2acf373086bc/opentelemetry_sdk-1.37.0.tar.gz" + sha256 "cc8e089c10953ded765b5ab5669b198bbe0af1b3f89f1007d19acd32dc46dda5" + end + + resource "opentelemetry-semantic-conventions" do + url "https://files.pythonhosted.org/packages/aa/1b/90701d91e6300d9f2fb352153fb1721ed99ed1f6ea14fa992c756016e63a/opentelemetry_semantic_conventions-0.58b0.tar.gz" + sha256 "6bd46f51264279c433755767bb44ad00f1c9e2367e1b42af563372c5a6fa0c25" + end + + resource "opentelemetry-util-http" do + url "https://files.pythonhosted.org/packages/c6/5f/02f31530faf50ef8a41ab34901c05cbbf8e9d76963ba2fb852b0b4065f4e/opentelemetry_util_http-0.58b0.tar.gz" + sha256 "de0154896c3472c6599311c83e0ecee856c4da1b17808d39fdc5cce5312e4d89" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "peewee" do + url "https://files.pythonhosted.org/packages/04/89/76f6f1b744c8608e0d416b588b9d63c2a500ff800065ae610f7c80f532d6/peewee-3.18.2.tar.gz" + sha256 "77a54263eb61aff2ea72f63d2eeb91b140c25c1884148e28e4c0f7c4f64996a0" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/1d/d6/9773d48804d085962c4f522db96f6a9ea9bd2e0480b3959a929176d92f01/rich-13.5.3.tar.gz" + sha256 "87b43e0543149efa1253f485cd845bb7ee54df16c9617b8a893650ab84b4acb6" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "ruamel-yaml-clib" do + url "https://files.pythonhosted.org/packages/d8/e9/39ec4d4b3f91188fad1842748f67d4e749c77c37e353c4e545052ee8e893/ruamel.yaml.clib-0.2.14.tar.gz" + sha256 "803f5044b13602d58ea378576dd75aa759f52116a0232608e8fdada4da33752e" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/db/3c/fa6517610dc641262b77cc7bf994ecd17465812c1b0585fe33e11be758ab/sse_starlette-3.0.3.tar.gz" + sha256 "88cfb08747e16200ea990c8ca876b03910a23b547ab3bd764c0d8eb81019b971" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/dd/31/fd3576f6b0d7ee3b7968daf4473bb0bb4fa8c98777803b9e8fdb8b1817ca/starlette-0.49.2.tar.gz" + sha256 "24b6ab2d95311eedfd713a08b4cb82f6d9c69de9e2cac15866e72c36d90c0528" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/35/b9/de2a5c0144d7d75a57ff355c0c24054f965b2dc3036456ae03a51ea6264b/tomli-2.0.2.tar.gz" + sha256 "d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/ea/c4/55e0d36da61d7b8b2a49fd273e6b296fd5e8471c72ebbe438635d1af3968/wcmatch-8.5.2.tar.gz" + sha256 "a70222b86dea82fb382dd87b73278c10756c138bd6f8f714e2183128887b9eb2" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + def install + # Ensure dynamic linkage to our libraries + inreplace "src/main/flags.sh" do |s| + s.gsub!("$(brew --prefix libev)/lib/libev.a", Formula["libev"].opt_lib/shared_library("libev")) + s.gsub!("$(brew --prefix zstd)/lib/libzstd.a", Formula["zstd"].opt_lib/shared_library("libzstd")) + s.gsub!("$(pkg-config gmp --variable libdir)/libgmp.a", Formula["gmp"].opt_lib/shared_library("libgmp")) + s.gsub!( + "$(pkg-config tree-sitter --variable libdir)/libtree-sitter.a", + Formula["tree-sitter"].opt_lib/shared_library("libtree-sitter"), + ) + s.gsub!( + "$(pkg-config libpcre --variable libdir)/libpcre.a", + Formula["pcre"].opt_lib/shared_library("libpcre"), + ) + s.gsub!( + "$(pkg-config libpcre2-8 --variable libdir)/libpcre2-8.a", + Formula["pcre2"].opt_lib/shared_library("libpcre2-8"), + ) + s.gsub!( + '"$(brew --prefix dwarfutils)/lib/libdwarf.a"', + Formula["dwarfutils"].opt_lib/shared_library("libdwarf"), + ) + end + + ENV.deparallelize + Dir.mktmpdir("opamroot") do |opamroot| + ENV["OPAMROOT"] = opamroot + # `--no-depexts` prevents opam from attempting to automatically search for + # and install system dependencies using the os-native package manager. + # On Linux, this leads to confusing and inaccurate `Missing dependency` + # errors due to querying `apt`. See: + # https://github.com/Homebrew/homebrew-core/pull/82693 + # https://github.com/Homebrew/homebrew-core/pull/176636 + # https://github.com/ocaml/opam/pull/4548 + ENV["OPAMNODEPEXTS"] = ENV["OPAMYES"] = "1" + # Set library path so opam + lwt can find libev + ENV["LIBRARY_PATH"] = "#{HOMEBREW_PREFIX}/lib" + # Opam's solver times out when it is set to the default of 60.0 + # See: https://github.com/Homebrew/homebrew-core/pull/191306 + ENV["OPAMSOLVERTIMEOUT"] = "1200" + + system "opam", "init", "--no-setup", "--disable-sandboxing" + ENV.deparallelize { system "opam", "switch", "create", "ocaml-base-compiler.5.3.0" } + + # Manually run steps from `opam exec -- make setup` to link Homebrew's tree-sitter + system "opam", "update", "-y" + system "opam", "install", "-y", "--deps-only", "./libs/ocaml-tree-sitter-core" + system "opam", "install", "-y", "--deps-only", "./" + cd "./libs/ocaml-tree-sitter-core" do + system "./configure" + end + + # Install semgrep-core and spacegrep + system "opam", "exec", "--", "make", "core" + system "opam", "exec", "--", "make", "copy-core-for-cli" + + bin.install "_build/install/default/bin/semgrep-core" => "semgrep-core" + end + + ENV["SEMGREP_SKIP_BIN"] = "1" + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources.reject { |r| r.name == "glom" } + + # Replace `imp` usage: https://github.com/mahmoud/glom/commit/1f883f0db898d6b15fcc0f293225dcccc16b2a57 + # TODO: remove with glom>=23.4.0 + resource("glom").stage do |r| + inreplace "setup.py", "import imp", "" + inreplace "setup.py", "_version_mod = imp.load_source('_version', _version_mod_path)", "" + inreplace "setup.py", "_version_mod.__version__", "'#{r.version}'" + venv.pip_install Pathname.pwd + end + + venv.pip_install_and_link buildpath/"cli" + + generate_completions_from_executable(bin/"semgrep", "--legacy", shell_parameter_format: :click) + end + + test do + system bin/"semgrep", "--help" + (testpath/"script.py").write <<~PYTHON + def silly_eq(a, b): + return a + b == a + b + PYTHON + + output = shell_output("#{bin}/semgrep script.py -l python -e '$X == $X'") + assert_match "a + b == a + b", output + + (testpath/"script.ts").write <<~TYPESCRIPT + function test_equal() { + a = 1; + b = 2; + //ERROR: match + if (a + b == a + b) + return 1; + return 0; + } + TYPESCRIPT + + output = shell_output("#{bin}/semgrep script.ts -l ts -e '$X == $X'") + assert_match "a + b == a + b", output + end +end diff --git a/Formula/s/semtag.rb b/Formula/s/semtag.rb new file mode 100644 index 0000000000000..75c30838400e6 --- /dev/null +++ b/Formula/s/semtag.rb @@ -0,0 +1,27 @@ +class Semtag < Formula + desc "Semantic tagging script for git" + homepage "https://github.com/nico2sh/semtag" + url "https://github.com/nico2sh/semtag/archive/refs/tags/v0.2.0.tar.gz" + sha256 "37890fc5bbdeba923b51ff615c4e99b002c95d922925ed1efefd117ad7934548" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "604f7f8fae481b73da08c4c4465852d2b955954df5401961bd4a2c16ad7918af" + end + + depends_on "bash" # Needs Bash 4.x> + + def install + bin.install "semtag" + end + + test do + touch "file.txt" + system "git", "init" + system "git", "add", "file.txt" + system "git", "commit", "-m'test'" + system bin/"semtag", "final" + output = shell_output("git tag --list") + assert_match "v0.0.1", output + end +end diff --git a/Formula/s/semver.rb b/Formula/s/semver.rb new file mode 100644 index 0000000000000..fc916ea437b7c --- /dev/null +++ b/Formula/s/semver.rb @@ -0,0 +1,22 @@ +class Semver < Formula + desc "Semantic version parser for node (the one npm uses)" + homepage "https://github.com/npm/node-semver" + url "https://github.com/npm/node-semver/archive/refs/tags/v7.7.3.tar.gz" + sha256 "227a8c2bfeb87a3e51db6ee7efffb12915ed4318c25d215edebdc23863482a21" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f020cebec97e076cc18178823c6c8011f0f40d28e8e49e086ebb4782ca9379f6" + end + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/semver --help") + assert_match "1.2.3", shell_output("#{bin}/semver 1.2.3-beta.1 -i release") + end +end diff --git a/Formula/s/sendemail.rb b/Formula/s/sendemail.rb new file mode 100644 index 0000000000000..175d26e095d89 --- /dev/null +++ b/Formula/s/sendemail.rb @@ -0,0 +1,30 @@ +class Sendemail < Formula + desc "Email program for sending SMTP mail" + homepage "http://caspian.dotconf.net/menu/Software/SendEmail/" + url "http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz" + sha256 "6dd7ef60338e3a26a5e5246f45aa001054e8fc984e48202e4b0698e571451ac0" + license "GPL-2.0-or-later" + + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "113001c5e97ed667b4f8401c335b3a337a7354b1562ca8b40b6499e6cdb68278" + end + + # Reported upstream: https://web.archive.org/web/20191013154932/caspian.dotconf.net/menu/Software/SendEmail/#comment-1119965648 + patch do + url "https://raw.githubusercontent.com/mogaal/sendemail/e785a6d284884688322c9b39c0f64e20a43ea825/debian/patches/fix_ssl_version.patch" + sha256 "0b212ade1808ff51d2c6ded5dc33b571f951bd38c1348387546c0cdf6190c0c3" + end + + def install + bin.install "sendEmail" + end + + test do + assert_match "sendEmail-#{version}", shell_output("#{bin}/sendEmail", 1).strip + end +end diff --git a/Formula/s/sendme.rb b/Formula/s/sendme.rb new file mode 100644 index 0000000000000..aa7cec5f4e83e --- /dev/null +++ b/Formula/s/sendme.rb @@ -0,0 +1,38 @@ +class Sendme < Formula + desc "Tool to send files and directories, based on iroh" + homepage "https://iroh.computer/sendme" + url "https://github.com/n0-computer/sendme/archive/refs/tags/v0.30.0.tar.gz" + sha256 "8f1e7588d922904c4375e479a243c09c2fcbf8be3f01b9c67466f5569951b056" + license "MIT" + head "https://github.com/n0-computer/sendme.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "afad3aa3eef6ca3d7aa6015ebd551181437f718f0bd39553f7712d74ef36c4c7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dfda80a25eb6704c626b982a8eae6d88a787b456f6d5cfcfba6b08c03edcb08d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "432026a5a5c31f823c3d3e117ebf6669e96ff664dc48c3a98f65b82581cafcd7" + sha256 cellar: :any_skip_relocation, sonoma: "7f49cf5e46e3baad29e26e187acabc52e3b69066d17f279b64c2db3f2fc3498e" + sha256 cellar: :any_skip_relocation, arm64_linux: "739b2481cdf04966a4c023c844c2edadeb13e535128e92ac90dcfa1d20b9388b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b769b8d47e066e3375aa46c1016b847498704e588579b9374cf5024439b7f14" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/sendme --version") + + begin + output_log = testpath/"output.log" + pid = spawn bin/"sendme", "send", bin/"sendme", [:out, :err] => output_log.to_s + sleep 4 + assert_match "imported file #{bin}/sendme", output_log.read + assert_match "to get this data, use\nsendme receive", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/s/senpai.rb b/Formula/s/senpai.rb new file mode 100644 index 0000000000000..ca4b2930885f1 --- /dev/null +++ b/Formula/s/senpai.rb @@ -0,0 +1,34 @@ +class Senpai < Formula + desc "Modern terminal IRC client" + homepage "https://sr.ht/~delthas/senpai/" + url "https://git.sr.ht/~delthas/senpai/archive/v0.4.1.tar.gz" + sha256 "ab786b7b3cffce69d080c3b58061e14792d9065ba8831f745838c850acfeab24" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3babf5b4950b6fe98db4af1331a97661168b54b4d1c9a6648b8ef0da5bafbf90" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25e62cb0dbef74b43914cfe94dc91d975c97ed53d9042d9be3fc422ef4a37dcb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4cbb49d7aa9a8343dead0ad9638e7fc738a723b5ce652d041b52364a3cba7f7a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6828b6aa784aebd607c3d536d946f764385a0b80d67edfff5978e6026ca56c99" + sha256 cellar: :any_skip_relocation, sonoma: "6fdd32340fc297f5d1eef67bfd938089a2c0d07ce57d49bde8d7447adff97c32" + sha256 cellar: :any_skip_relocation, ventura: "817074dd4e63738680fb92c3746221928a4c95312d4c70b8c42e5d97ff16d123" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f9b02ed34a5b67f8641080d8df39172a50382982dd08f8663f9c7ce8678d469" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e40211b47b193298d47b6aed526b5ac662f6e5ff3fe39dc71c7e6f7dbf187c8" + end + + depends_on "go" => :build + depends_on "scdoc" => :build + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + require "pty" + + stdout, _stdin, _pid = PTY.spawn bin/"senpai" + _ = stdout.readline + assert_equal "Configuration assistant: senpai will create a configuration file for you.\r\n", stdout.readline + end +end diff --git a/Formula/s/sentencepiece.rb b/Formula/s/sentencepiece.rb new file mode 100644 index 0000000000000..48f7f19e94555 --- /dev/null +++ b/Formula/s/sentencepiece.rb @@ -0,0 +1,39 @@ +class Sentencepiece < Formula + desc "Unsupervised text tokenizer and detokenizer" + homepage "https://github.com/google/sentencepiece" + url "https://github.com/google/sentencepiece/archive/refs/tags/v0.2.1.tar.gz" + sha256 "c1a59e9259c9653ad0ade653dadff074cd31f0a6ff2a11316f67bee4189a8f1b" + license "Apache-2.0" + head "https://github.com/google/sentencepiece.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "6f944bb3a143e212d042b1e0236b6482499e34009b9b5b5db5c3cd8d9975b7df" + sha256 arm64_sequoia: "fa43d4d4ae2951ed39dde039503b0ff519c87d17d22c3f5476e3628d320cd9a1" + sha256 arm64_sonoma: "090b18e649177086cfb34cd0957691ff0f9ac81763575fdc404f832e8add283a" + sha256 arm64_ventura: "1817affe1f40c11b0780f425e0a7211e392a3ebf4aef954d3c9e84eea38a089f" + sha256 sonoma: "def07b0ac6928c502047e5acc59adbc31380324b1b4df2d5bce7a4b4e7e8fde1" + sha256 ventura: "75b11c26c25b5bc00d9ea30446ed37c46dac6caa66b941d6c2785feccecdd5aa" + sha256 arm64_linux: "238a7f7677d07561253da9728aa1d72c2b9f922f6fd6e2d8d0756e396f754d25" + sha256 x86_64_linux: "ebe9a9c2450f19edf2ac38a7d732a7c6143d9f186e5977d2b9affca6b354e84b" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "data" + end + + test do + cp (pkgshare/"data/botchan.txt"), testpath + system bin/"spm_train", "--input=botchan.txt", "--model_prefix=m", "--vocab_size=1000" + end +end diff --git a/Formula/s/sentry-cli.rb b/Formula/s/sentry-cli.rb new file mode 100644 index 0000000000000..8bc78ab6e0e36 --- /dev/null +++ b/Formula/s/sentry-cli.rb @@ -0,0 +1,43 @@ +class SentryCli < Formula + desc "Command-line utility to interact with Sentry" + homepage "https://docs.sentry.io/cli/" + url "https://github.com/getsentry/sentry-cli/archive/refs/tags/2.57.0.tar.gz" + sha256 "7bf2adcaf9b808dbdab209d2115bad13f3c29cd1d4a1fa3427059a76d4d61618" + license "BSD-3-Clause" + head "https://github.com/getsentry/sentry-cli.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a1f30ac4418807d43a4881ce2adf218ce73f1cb4fef304582033f2c3d5feb8eb" + sha256 cellar: :any, arm64_sequoia: "66ad13cd98587da41c4d2b1f56de5c16089565e47586fe12f66aaeefbb411188" + sha256 cellar: :any, arm64_sonoma: "dfb0504cfb3a6f487174883dee56e3b27ad57327fe65f2be6988a9479fcc1c58" + sha256 cellar: :any, sonoma: "9696629965412be92f491fdf83dc28f73ab90b4162cb7b0be437149e87432dbb" + sha256 cellar: :any_skip_relocation, arm64_linux: "3066dbe60d2be3e516561299d81848da2057a058194843a0d70e2107560d21e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8980490a91be31edb750dcf85eea1125fc16eccffe5a7e7a19d0950e2b18c376" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_ventura :or_older do + depends_on "swift" => :build + end + + def install + ENV["SWIFT_DISABLE_SANDBOX"] = "1" + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"sentry-cli", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sentry-cli --version") + + output = shell_output("#{bin}/sentry-cli info 2>&1", 1) + assert_match "Sentry Server: https://sentry.io", output + assert_match "Auth token is required for this request.", output + end +end diff --git a/Formula/s/sentry-native.rb b/Formula/s/sentry-native.rb new file mode 100644 index 0000000000000..f68a5c267eb29 --- /dev/null +++ b/Formula/s/sentry-native.rb @@ -0,0 +1,67 @@ +class SentryNative < Formula + desc "Sentry SDK for C, C++ and native applications" + homepage "https://docs.sentry.io/platforms/native/" + url "https://github.com/getsentry/sentry-native/archive/refs/tags/0.12.1.tar.gz" + sha256 "2bf5c810b9a8f0a58e0ce489704750c6c49d252338388f7e78ef0698d2b2613b" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c37fab17d682e4c532156132c29edd852d893d46a3ed97fd7be62423b98a78ff" + sha256 cellar: :any, arm64_sequoia: "c48150389636213308ebb2e59dbc2575047b14215439a46c88712a3f8b998fb4" + sha256 cellar: :any, arm64_sonoma: "7cc1e23e7a24d32112cd655224e385bf2b4730728e7022294601b1175224bb4e" + sha256 cellar: :any, sonoma: "a9cfb86925a1f325f7eb842fb137db8b40a911a86ba2b3c8565763a06f35630c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ecdfcbf2c153372012d5cd2594317773d8aae39d9112fba1bc9b6ad2029acbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a15c2bbc8d94995ccafbabedd4dcea61698895736acc3aab793cd2e9c59300ba" + end + + depends_on "cmake" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + # No recent tagged releases, use the latest commit + resource "breakpad" do + url "https://github.com/getsentry/breakpad.git", + revision: "25b6b727af49fa383161e7dba4a82ab0661b69b8" + end + + # No recent tagged releases, use the latest commit + resource "crashpad" do + url "https://github.com/getsentry/crashpad.git", + revision: "d8990d2f686b8827a21532748c6c42add21c21ea" + end + + # No recent tagged releases, use the latest commit + resource "libunwindstack-ndk" do + url "https://github.com/getsentry/libunwindstack-ndk.git", + revision: "284202fb1e42dbeba6598e26ced2e1ec404eecd1" + end + + resource "third-party/lss" do + url "https://chromium.googlesource.com/linux-syscall-support.git", + tag: "v2024.02.01", + revision: "ed31caa60f20a4f6569883b2d752ef7522de51e0" + end + + def install + resources.each { |r| r.stage buildpath/"external"/r.name } + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + sentry_options_t *options = sentry_options_new(); + sentry_options_set_dsn(options, "https://ABC.ingest.us.sentry.io/123"); + sentry_init(options); + sentry_close(); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{HOMEBREW_PREFIX}/include", "-L#{HOMEBREW_PREFIX}/lib", "-lsentry", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/seqan3.rb b/Formula/s/seqan3.rb new file mode 100644 index 0000000000000..597bb9bc1aa35 --- /dev/null +++ b/Formula/s/seqan3.rb @@ -0,0 +1,58 @@ +class Seqan3 < Formula + desc "Modern C++ library for sequence analysis" + homepage "https://www.seqan.de" + url "https://github.com/seqan/seqan3/archive/refs/tags/3.4.0.tar.gz" + sha256 "8e000e6788f1e2ada071b36f64231d56f18e2d687ab4122d86cd3aefc6c87743" + license all_of: ["BSD-3-Clause", "CC-BY-4.0", "CC0-1.0", "MIT", "Zlib"] + + bottle do + sha256 cellar: :any_skip_relocation, all: "a635a8d9cfb3c75f5e2372778210d4e955fb600679f52303c325a2124a624bb5" + end + + depends_on "cereal" => :build + depends_on "cmake" => :build + + # https://github.com/seqan/seqan3?tab=readme-ov-file#dependencies + fails_with :clang do + build 1699 + cause "needs Clang 17 or newer" + end + + # https://github.com/seqan/seqan3?tab=readme-ov-file#dependencies + fails_with :gcc do + version "11" + cause "needs GCC 12 or newer" + end + + resource "cmake-scripts" do + url "https://github.com/seqan/cmake-scripts.git", + revision: "d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37" + end + + def install + resource("cmake-scripts").stage buildpath/"cmake-scripts" + + args = %W[ + -DCPM_USE_LOCAL_PACKAGES=ON + -DFETCHCONTENT_SOURCE_DIR_USE_CCACHE=#{buildpath}/cmake-scripts + -DUSE_CCACHE=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + seqan3::debug_stream << "Hello World!\\n"; + return 0; + } + CPP + system ENV.cxx, "-std=c++23", "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/seqkit.rb b/Formula/s/seqkit.rb new file mode 100644 index 0000000000000..b2c66e08d2f55 --- /dev/null +++ b/Formula/s/seqkit.rb @@ -0,0 +1,49 @@ +class Seqkit < Formula + desc "Cross-platform and ultrafast toolkit for FASTA/Q file manipulation in Golang" + homepage "https://bioinf.shenwei.me/seqkit" + url "https://github.com/shenwei356/seqkit/archive/refs/tags/v2.10.1.tar.gz" + sha256 "e3897f9ccd9503d10c1a8d67d9790ee3e4c91da369e14b716ea7c4e8adba55ee" + license "MIT" + head "https://github.com/shenwei356/seqkit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "75b5b76e09b39ecebe4e91a8b4e4bdae84fabd95675effa184148047212118ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8cfb637b8f41b6c5bce9c7c91308d8ad1288a71cdfda62e0e134741ced3cc5c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8cfb637b8f41b6c5bce9c7c91308d8ad1288a71cdfda62e0e134741ced3cc5c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8cfb637b8f41b6c5bce9c7c91308d8ad1288a71cdfda62e0e134741ced3cc5c" + sha256 cellar: :any_skip_relocation, sonoma: "0f22207684037c12254d0be88a2a1f0d0a372fe2d8bd9d8c1e66509e150d5dc3" + sha256 cellar: :any_skip_relocation, ventura: "0f22207684037c12254d0be88a2a1f0d0a372fe2d8bd9d8c1e66509e150d5dc3" + sha256 cellar: :any_skip_relocation, arm64_linux: "695c1189897529b219fd3c4370a0f638264f771c31caab7fd4080b9a34f593d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffc8a498f2d0bc0e44a36cc1f791d4b9ae542347e3eeeb77d222c775f6045644" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./seqkit" + + # generate_completions_from_executable(bin/"seqkit", "genautocomplete", "--shell") + # We do this because the command to generate completions doesn't print them + # to stdout and only writes them to a file + system bin/"seqkit", "genautocomplete", "--shell", "bash", "--file", "seqkit.bash" + system bin/"seqkit", "genautocomplete", "--shell", "zsh", "--file", "_seqkit" + system bin/"seqkit", "genautocomplete", "--shell", "fish", "--file", "seqkit.fish" + bash_completion.install "seqkit.bash" => "seqkit" + zsh_completion.install "_seqkit" + fish_completion.install "seqkit.fish" + end + + test do + assert_match version.to_s, shell_output("#{bin}/seqkit version") + + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/shenwei356/seqkit/e37d70a7e0ca0e53d6dbd576bd70decac32aba64/tests/seqs4amplicon.fa" + sha256 "b0f09da63e3c677cc698d5cdff60e2d246368263c22385937169a9a4c321178a" + end + + resource("homebrew-testdata").stage do + assert_equal ">seq1\nCCCACTGAAA", + shell_output("#{bin}/seqkit amplicon --quiet -F CCC -R TTT seqs4amplicon.fa").strip + end + end +end diff --git a/Formula/s/seqtk.rb b/Formula/s/seqtk.rb new file mode 100644 index 0000000000000..abca0a31e512d --- /dev/null +++ b/Formula/s/seqtk.rb @@ -0,0 +1,36 @@ +class Seqtk < Formula + desc "Toolkit for processing sequences in FASTA/Q formats" + homepage "https://github.com/lh3/seqtk" + url "https://github.com/lh3/seqtk/archive/refs/tags/v1.5.tar.gz" + sha256 "384aa1e3cecf4f70403839d586cbb29d469b7c6f773a64bc5af48a6e4b8220a6" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cef0b305702d591dba9d4cdf9d56354a0a0899adcef89a6ce21f58cb04d8c586" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "792b2f9c97b31099358e00f85d5f087d56c6d7b10dcd1d1a6de5c3c28fa90576" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1cc03676c5257015029aaa5d4db31a473574c14e9c6dc1d451a27a91d6700bd0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "edf244951a989be8cd04da63e9d3a4089b933cdd826ab15c903749ddea2b23ba" + sha256 cellar: :any_skip_relocation, sonoma: "9ae2d0b91c70d30f81651c6572c867e109ba6b628b58932377b99f9c3c46b062" + sha256 cellar: :any_skip_relocation, ventura: "4d79bd6387346078f950c2a849f5857c0e3cc43cd1ff01fc278ea1a16a8474d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "30fb0030644e299f3f71ea7ec61be7c9cf72a7dcd70331efe7299dfae6296a02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4eea62b0b0acfeb50dd08cd385e8b486f223b255430ff57d1c3242a7fd564e5" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "seqtk" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT + CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + assert_match "TCTCTG", shell_output("#{bin}/seqtk seq test.fasta") + end +end diff --git a/Formula/s/sequin.rb b/Formula/s/sequin.rb new file mode 100644 index 0000000000000..b89b4ff982ac9 --- /dev/null +++ b/Formula/s/sequin.rb @@ -0,0 +1,31 @@ +class Sequin < Formula + desc "Human-readable ANSI sequences" + homepage "https://github.com/charmbracelet/sequin" + url "https://github.com/charmbracelet/sequin/archive/refs/tags/v0.3.1.tar.gz" + sha256 "52f4d704a6e019df05dfc0ee3808fdf6c7d3245dcaa6262db8ca33c9de303da9" + license "MIT" + head "https://github.com/charmbracelet/sequin.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0336aba7862907b4a7e88aaa601bd17d0231cf1eeb7eeec7e089668602a9eef0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32652611883fd7d3c9a2cab5202df945420db404bb0058c07faab677c9276086" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32652611883fd7d3c9a2cab5202df945420db404bb0058c07faab677c9276086" + sha256 cellar: :any_skip_relocation, arm64_ventura: "32652611883fd7d3c9a2cab5202df945420db404bb0058c07faab677c9276086" + sha256 cellar: :any_skip_relocation, sonoma: "a91c3cf6c460ef367bbb99f11fcda31a8087d385a0e1ff44a4ad535e1d37e53e" + sha256 cellar: :any_skip_relocation, ventura: "a91c3cf6c460ef367bbb99f11fcda31a8087d385a0e1ff44a4ad535e1d37e53e" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c063422095a5fc609fd1d3ea2ac9ee60b5ba2a3503c6ec57cbfd92f0e946d21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f60d1afbcead268f9a378e723c2472fadd0e1f481c06c8630914796f42d1ef89" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sequin -v") + + assert_match "CSI m: Reset style", pipe_output(bin/"sequin", "\x1b[m") + end +end diff --git a/Formula/s/sequoia-chameleon-gnupg.rb b/Formula/s/sequoia-chameleon-gnupg.rb new file mode 100644 index 0000000000000..190a1f00716f6 --- /dev/null +++ b/Formula/s/sequoia-chameleon-gnupg.rb @@ -0,0 +1,53 @@ +class SequoiaChameleonGnupg < Formula + desc "Reimplementatilon of gpg and gpgv using Sequoia" + homepage "https://sequoia-pgp.org" + url "https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/archive/v0.13.1/sequoia-chameleon-gnupg-v0.13.1.tar.bz2" + sha256 "8e204784c83b2f17cdd591bd9e2e3df01f9f68527bb5c97aa181c8bec5c6f857" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "28f73d4c9fe42708b00a6cc31b1944d40ef9ab28f19f555262580ffd02c7af8c" + sha256 cellar: :any, arm64_sequoia: "5b91310a0e9767914f4e236560e5ca9e010e5251386ee843a36bddd67d44b8fa" + sha256 cellar: :any, arm64_sonoma: "27b24b86636d9645d07a03f3b317208a030ebf65c4c1d5720ce71b4b6da329ce" + sha256 cellar: :any, arm64_ventura: "63e79260f1665bd08b3c837dc89484e652494dd77d91ebdecc523bc48ce6e3f1" + sha256 cellar: :any, sonoma: "0c04398a6a5a0ec0b24d8c9e17c8d32b60cd6506c3e123478372765d2c110e6e" + sha256 cellar: :any, ventura: "b040e893c7a651cf2487981dfa5ddf7efde8d5f7df18e2900757f6c761131709" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3f4855b69df13a6c051453ae00e4434063777d1f26e9d07cf1ef21d2f5e06c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3319626d5c818b6482bf2ba1c9cfd267447639975483dde222f430a33ba1dc82" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "gmp" + depends_on "nettle" + depends_on "openssl@3" + + uses_from_macos "llvm" => :build + uses_from_macos "bzip2" + uses_from_macos "sqlite" + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["ASSET_OUT_DIR"] = buildpath + + system "cargo", "install", *std_cargo_args + man1.install Dir["man-pages/*.1"] + + zsh_completion.install "shell-completions/_gpg-sq" + zsh_completion.install "shell-completions/_gpgv-sq" + bash_completion.install "shell-completions/gpg-sq.bash" => "gpg-sq" + bash_completion.install "shell-completions/gpgv-sq.bash" => "gpgv-sq" + fish_completion.install "shell-completions/gpg-sq.fish" + fish_completion.install "shell-completions/gpgv-sq.fish" + end + + test do + assert_match "Chameleon #{version}", shell_output("#{bin}/gpg-sq --version") + + output = pipe_output("#{bin}/gpg-sq --enarmor", test_fixtures("test.gif").read, 0) + assert_match "R0lGODdhAQABAPAAAAAAAAAAACwAAAAAAQABAAACAkQBADs=", output + end +end diff --git a/Formula/s/sequoia-sq.rb b/Formula/s/sequoia-sq.rb new file mode 100644 index 0000000000000..c1f1358491465 --- /dev/null +++ b/Formula/s/sequoia-sq.rb @@ -0,0 +1,50 @@ +class SequoiaSq < Formula + desc "Sequoia-PGP command-line tool" + homepage "https://sequoia-pgp.org" + url "https://gitlab.com/sequoia-pgp/sequoia-sq/-/archive/v1.3.1/sequoia-sq-v1.3.1.tar.gz" + sha256 "9f112096f413e195ec737c81abb5649604f16e1f6dbe64a8accc5bb3ad39e239" + license "LGPL-2.0-or-later" + head "https://gitlab.com/sequoia-pgp/sequoia-sq.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "af93f1cb2fa3295751c7789f2e19cb799036aa31f6574399cd4335452b92e8a0" + sha256 cellar: :any, arm64_sequoia: "748da0543b832cadfa5607c47bd93938bb09a31447ba6470bed0eecd9eed5abe" + sha256 cellar: :any, arm64_sonoma: "3de29e0d109f761a2354bb4b2ca540c430f11f402616453c6e01d6f936a1df41" + sha256 cellar: :any, arm64_ventura: "c5877c6019980cb390b99241687b16e6ab4b41dc8eb1472d3a7654c6cac966c2" + sha256 cellar: :any, sonoma: "6b3a8b05eca43acd239476880e5515cc75b283173a0226c7568e5ba84fcc7e14" + sha256 cellar: :any, ventura: "f45c40f7187c727f4ab15f925d02125cedb72cc50227f2c30a1bb540adf1ca28" + sha256 cellar: :any_skip_relocation, arm64_linux: "6cc134524aab57fd7d7e15586e4410b1081998bf03a2dd7b7393044b8729a30a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bdca043f7be55ffe5682aacbc18863cf02eb7fbb698f176e7a880de304cc1da" + end + + depends_on "capnp" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "gmp" + depends_on "nettle" + depends_on "openssl@3" + + uses_from_macos "llvm" => :build + uses_from_macos "bzip2" + uses_from_macos "sqlite" + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["ASSET_OUT_DIR"] = buildpath + + system "cargo", "install", *std_cargo_args + man1.install Dir["man-pages/*.1"] + + bash_completion.install "shell-completions/sq.bash" => "sq" + zsh_completion.install "shell-completions/_sq" + fish_completion.install "shell-completions/sq.fish" + end + + test do + assert_match version.to_s, shell_output("#{bin}/sq version 2>&1") + + output = pipe_output("#{bin}/sq packet armor", test_fixtures("test.gif").read, 0) + assert_match "R0lGODdhAQABAPAAAAAAAAAAACwAAAAAAQABAAACAkQBADs=", output + end +end diff --git a/Formula/s/sequoia-sqv.rb b/Formula/s/sequoia-sqv.rb new file mode 100644 index 0000000000000..242a910a6cc2c --- /dev/null +++ b/Formula/s/sequoia-sqv.rb @@ -0,0 +1,51 @@ +class SequoiaSqv < Formula + desc "Simple OpenPGP signature verification program" + homepage "https://sequoia-pgp.org/" + url "https://gitlab.com/sequoia-pgp/sequoia-sqv/-/archive/v1.3.0/sequoia-sqv-v1.3.0.tar.bz2" + sha256 "cfa9159cbeda4e4d0e3c2778374b24004037bb21d5ea6441f0fb80c68cedfce0" + license "LGPL-2.0-or-later" + head "https://gitlab.com/sequoia-pgp/sequoia-sqv.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "568055ffe201b99282b0109f992799923d0b7ddb91d07a8b4f316ebeb22f4fc0" + sha256 cellar: :any, arm64_sequoia: "5e55783ed124a3414dabd9e6621462b146b6056f195c89295ae63fbda89e6cd5" + sha256 cellar: :any, arm64_sonoma: "a9b453a25fbeddfc5705d07fba41b082709c3b26727f72c9db0960ec6ec2bb54" + sha256 cellar: :any, arm64_ventura: "fb6f4007a7cc381ee7fc39150cc08000b3c4b0d6c61ab5f771840d15522f5abb" + sha256 cellar: :any, sonoma: "cac0ede5fd6bd2543a994cf67d8a48dfb76de9c1a0ae922655decdd47db2b924" + sha256 cellar: :any, ventura: "bca9e265980a5e1d492157f174a32c7c0264799ccc7dd121456924eebc6850b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "436baddd5f72daf501ea4c966dac93f4ef811a0af1c6a933fcbab808afd34711" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6929e0826397eb7eb9ac89cbb5c431a7b0fb561d968ac9402fe4385831be52b0" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "gmp" + depends_on "nettle" + + uses_from_macos "llvm" => :build + + def install + ENV["ASSET_OUT_DIR"] = buildpath + system "cargo", "install", *std_cargo_args + + man1.install Dir["man-pages/*.1"] + bash_completion.install "shell-completions/sqv.bash" => "sqv" + zsh_completion.install "shell-completions/_sqv" + fish_completion.install "shell-completions/sqv.fish" + end + + test do + # https://gitlab.com/sequoia-pgp/sequoia-sqv/-/blob/main/tests/not-before-after.rs + keyring = "emmelie-dorothea-dina-samantha-awina-ed25519.pgp" + sigfile = "a-cypherpunks-manifesto.txt.ed25519.sig" + testfile = "a-cypherpunks-manifesto.txt" + stable.stage { testpath.install Dir["tests/data/{#{keyring},#{sigfile},#{testfile}}"] } + + output = shell_output("#{bin}/sqv --keyring #{keyring} #{sigfile} #{testfile}") + assert_equal "8E8C33FA4626337976D97978069C0C348DD82C19\n", output + + output = shell_output("#{bin}/sqv --keyring #{keyring} --not-before 2018-08-15 #{sigfile} #{testfile} 2>&1", 1) + assert_match "created before the --not-before date", output + end +end diff --git a/Formula/s/ser2net.rb b/Formula/s/ser2net.rb new file mode 100644 index 0000000000000..53373d7a710a4 --- /dev/null +++ b/Formula/s/ser2net.rb @@ -0,0 +1,55 @@ +class Ser2net < Formula + desc "Allow network connections to serial ports" + homepage "https://ser2net.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ser2net/ser2net/ser2net-4.6.5.tar.gz" + sha256 "96dfc3fd06b1bf4d7c1f46d7e8cc1eff555de64f419d76f57bd0346e000f9781" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/ser2net[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "b3a9ce35452297c1f503474f1e7836cd8f2fe6fa5ab00972bde8fd0410095af1" + sha256 arm64_sequoia: "406e3255e7945d3fd302aecbc4660feac2b4bd16521ca1e861c01fd8faf078ff" + sha256 arm64_sonoma: "a132540ee75e1bf2f91680574936ef142af9cfed8ae125b33184826ed7013afe" + sha256 cellar: :any, sonoma: "6fb76370199f728ee945e89f3efb26ffb7c8c6ea4eba3db8341162832096fbda" + sha256 arm64_linux: "50a7347bef5d23ee70c69449d5be2037191e31d88233c8276449aea05583d43b" + sha256 x86_64_linux: "aa68040612fde0237813596558ee9c5d5a94ad5be4cdb5a0b820905931d7d39c" + end + + depends_on "gensio" + depends_on "libyaml" + + on_linux do + depends_on "linux-pam" + end + + def install + system "./configure", "--sysconfdir=#{etc}", + "--datarootdir=#{HOMEBREW_PREFIX}/share", + "--mandir=#{man}", + *std_configure_args + system "make", "install" + + (etc/"ser2net").install "ser2net.yaml" + end + + def caveats + <<~EOS + To configure ser2net, edit the example configuration in #{etc}/ser2net/ser2net.yaml + EOS + end + + service do + run [opt_sbin/"ser2net", "-n"] + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + assert_match version.to_s, shell_output("#{sbin}/ser2net -v") + end +end diff --git a/Formula/s/serd.rb b/Formula/s/serd.rb new file mode 100644 index 0000000000000..a4f4cf7611eb5 --- /dev/null +++ b/Formula/s/serd.rb @@ -0,0 +1,38 @@ +class Serd < Formula + desc "C library for RDF syntax" + homepage "https://drobilla.net/software/serd.html" + url "https://download.drobilla.net/serd-0.32.4.tar.xz" + sha256 "cbefb569e8db686be8c69cb3866a9538c7cb055e8f24217dd6a4471effa7d349" + license "ISC" + + livecheck do + url "https://download.drobilla.net/" + regex(/href=.*?serd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1a4549a18a1b24c345c3cd87970aad0b21aa511326ad8b12bfcf37508efe4325" + sha256 cellar: :any, arm64_sequoia: "cb7d131a4e36b9af03afd71b9a52977b7f8c03855cf59fe2c1425a82d266efa9" + sha256 cellar: :any, arm64_sonoma: "bd0c2273b21fd4823f8ae84a0b927af0e9d20d93f221e8eba269ac2a5f19490d" + sha256 cellar: :any, arm64_ventura: "42b9a161e5f2b1b4a28183d16ecd0bff483519b292aeb982792f74201c2ff41f" + sha256 cellar: :any, sonoma: "a645922619955963c2d58856a30d91cbb0a74e63afd97027127a6c1ec684d7ed" + sha256 cellar: :any, ventura: "1206b5fd96a17388d8fa194ba4a1a5c9c59b9e2cefbf9bffa674bf8f71fd874f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a9563320d822db1023d6054f54cfc18c3a4a89266d4bb5a283c75159f05b3ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52f9da3eed3f941a1c97f3a35764afcc8a5974b19a6ebf0952c28c8b239c6d3e" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", "-Dtests=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + rdf_syntax_ns = "http://www.w3.org/1999/02/22-rdf-syntax-ns" + re = %r{(<#{Regexp.quote(rdf_syntax_ns)}#.*>\s+)?\s+\.} + assert_match re, pipe_output("#{bin}/serdi -", "() a .") + end +end diff --git a/Formula/s/serf.rb b/Formula/s/serf.rb new file mode 100644 index 0000000000000..29e6e333cc1ee --- /dev/null +++ b/Formula/s/serf.rb @@ -0,0 +1,44 @@ +class Serf < Formula + desc "Service orchestration and management tool" + homepage "https://serfdom.io/" + url "https://github.com/hashicorp/serf/archive/refs/tags/v0.10.2.tar.gz" + sha256 "bcccbf847024af099e164faf6d6d111345edf166eb24e53e3ccc7f37d6e281a1" + license "MPL-2.0" + head "https://github.com/hashicorp/serf.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2901eb9d2de6b46caefd9bf736b479a4fdbde4f83856c4c57bc114411a332134" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13e3b04200c7af32b917a447452939a6dbf82ebc40e7937465e4150c2fa2418d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "13e3b04200c7af32b917a447452939a6dbf82ebc40e7937465e4150c2fa2418d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "13e3b04200c7af32b917a447452939a6dbf82ebc40e7937465e4150c2fa2418d" + sha256 cellar: :any_skip_relocation, sonoma: "d6d6ae5c6519299a5066731b9a37a7503453400849633423839d85cdf80e7d98" + sha256 cellar: :any_skip_relocation, ventura: "d6d6ae5c6519299a5066731b9a37a7503453400849633423839d85cdf80e7d98" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a687881da8ed7915ff023c57afcbece681a54dd3c9a267df6d3c849db209de2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd73aa1d5303d52c424bb871db029524e8f64619c0aa0dfd1bccde4f9d023211" + end + + depends_on "go" => :build + + uses_from_macos "zip" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/hashicorp/serf/version.Version=#{version} + -X github.com/hashicorp/serf/version.VersionPrerelease= + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/serf" + end + + test do + pid = spawn bin/"serf", "agent" + sleep 1 + assert_match(/:7946.*alive$/, shell_output("#{bin}/serf members")) + ensure + system bin/"serf", "leave" + Process.kill "SIGINT", pid + Process.wait pid + end +end diff --git a/Formula/s/serialosc.rb b/Formula/s/serialosc.rb new file mode 100644 index 0000000000000..b8dec5c3fef0f --- /dev/null +++ b/Formula/s/serialosc.rb @@ -0,0 +1,50 @@ +class Serialosc < Formula + desc "Opensound control server for monome devices" + homepage "https://github.com/monome/docs/blob/gh-pages/serialosc/osc.md" + # pull from git tag to get submodules + url "https://github.com/monome/serialosc.git", + tag: "v1.4.6", + revision: "82982437ba197b93793e89eee1cbb12c1f73e928" + license "ISC" + head "https://github.com/monome/serialosc.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "88048b5ee792c6b2b31ad617c6e5289ae2238b6ae9370b9b7a4774291c4cd015" + sha256 cellar: :any, arm64_sequoia: "6bf7e4ce2c236c488e3d5f5779f97d888f19c471aaf0d08e9fdefea7afea20c2" + sha256 cellar: :any, arm64_sonoma: "498514d0881e192dd36837716da1df5a7256179f515dc8b1dace4f480348b724" + sha256 cellar: :any, arm64_ventura: "9e549647a50621a2bafce9aad05daef120e36767af5e57a3df117d6afc5c580e" + sha256 cellar: :any, sonoma: "4bda1903d28760b7b340db427ebf78566a93171f494ea082cd63d6eef79b0e23" + sha256 cellar: :any, ventura: "d2cf788f4bf6dd3805af4f729e9dc7ed7a1ecde36a93468014a20052dddb87fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd3d5d496535917f6e503b7b4041e23ea50b33a99c695f0ab68abcdbe576ace2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4eee0e4d13807fb31e5ccb13536357177f2285f546af6ee9bc167a778797323" + end + + depends_on "confuse" + depends_on "liblo" + depends_on "libmonome" + depends_on "libuv" + + uses_from_macos "python" => :build + + on_linux do + depends_on "avahi" + depends_on "systemd" # for libudev + end + + def install + system "python3", "./waf", "configure", "--prefix=#{prefix}" + system "python3", "./waf", "build" + system "python3", "./waf", "install" + end + + service do + run [opt_bin/"serialoscd"] + keep_alive true + log_path var/"log/serialoscd.log" + error_log_path var/"log/serialoscd.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/serialoscd -v") + end +end diff --git a/Formula/s/serie.rb b/Formula/s/serie.rb new file mode 100644 index 0000000000000..cb5d19755147c --- /dev/null +++ b/Formula/s/serie.rb @@ -0,0 +1,43 @@ +class Serie < Formula + desc "Rich git commit graph in your terminal" + homepage "https://github.com/lusingander/serie" + url "https://github.com/lusingander/serie/archive/refs/tags/v0.5.3.tar.gz" + sha256 "74e07c0fd3163e5510347e13d8242f66777a02d7125c58ebc7a83bd2b5814018" + license "MIT" + head "https://github.com/lusingander/serie.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "81e7677022ade5c1e2ddbcb1b56928887e7a8d464fc3d6e88fba83350c2f7ed5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8409c00dd2c69a3bdd1d9d927246d3dc4ee52c56f9b69c705f28d87ee8f68e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "480461ce2b61c16007fd91266dd27295c6d5690bcfa6331a7bebc1610ea32cf6" + sha256 cellar: :any_skip_relocation, sonoma: "da6c613db7b4b5e6f4ea09c6895976b0a3641d455832127247419a17113b272d" + sha256 cellar: :any_skip_relocation, arm64_linux: "6252371c9f60c1590dd53453e750afec5231f467e91d6588e208ef53b56669f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "895b9c5771baf209cab08266ab5457ee443f07555330b555a3934f2f1e4a0447" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/serie --version") + + # Fails in Linux CI with "failed to initialize terminal: ... message: \"No such device or address\" }" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "git", "init" + system "git", "commit", "--allow-empty", "-m", "Initial commit" + + begin + output_log = testpath/"output.log" + pid = spawn bin/"serie", [:out, :err] => output_log.to_s + sleep 1 + assert_match "Initial commit", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/s/serpl.rb b/Formula/s/serpl.rb new file mode 100644 index 0000000000000..c684c65273f02 --- /dev/null +++ b/Formula/s/serpl.rb @@ -0,0 +1,32 @@ +class Serpl < Formula + desc "Simple terminal UI for search and replace" + homepage "https://github.com/yassinebridi/serpl" + url "https://github.com/yassinebridi/serpl/archive/refs/tags/0.3.4.tar.gz" + sha256 "d3765e273f54bf2e268f9696eef5e5459ffe46310af8ae48eb6ebe4c279deb62" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "17d66f0a6070402ad1ca996de2076bcaff6ef5f4c474bfab7fcc0952de0978d9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7170f6c039d004e719e86934352f1fc0a30929749c853e71f8ad6db97689511f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a78316d3e051f3eaeeb2b26263c24135382dd8038222eb5ca14253e80fe96790" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a87b7d3d19d97b7aa33dd296a4ba5f0b98057c3b0f4ecf345d2495148f3dec7f" + sha256 cellar: :any_skip_relocation, sonoma: "90dd2fc2f33f9ba2d8122097e8b9f891f084f9038a4a2e5e26bf65fbb1c62335" + sha256 cellar: :any_skip_relocation, ventura: "7128ef970ad0e5c428037dbeae24bf722dc57c19706ef05cb626d72bbdb619f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "bfc0a698cbce4d7894689a991e6f8e72645cf22ffb5e03a10444b721cd8b20ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "823f676ecea17d9ff2f20448c5a42963fcdc7378e89a6eff3a250e161d17ddd0" + end + + depends_on "rust" => :build + depends_on "ripgrep" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/serpl --version") + + assert_match "a value is required for '--project-root ' but none was supplied", + shell_output("#{bin}/serpl --project-root 2>&1", 2) + end +end diff --git a/Formula/s/sersniff.rb b/Formula/s/sersniff.rb new file mode 100644 index 0000000000000..db23c24e4e7ee --- /dev/null +++ b/Formula/s/sersniff.rb @@ -0,0 +1,42 @@ +class Sersniff < Formula + desc "Program to tunnel/sniff between 2 serial ports" + homepage "https://www.earth.li/projectpurple/progs/sersniff.html" + url "https://www.earth.li/projectpurple/files/sersniff-0.0.5.tar.gz" + sha256 "8aa93f3b81030bcc6ff3935a48c1fd58baab8f964b1d5e24f0aaecbd78347209" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?sersniff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a497adbb93a2bfefadc8e54b0d25dca7829014ae9dc1bab68ba32d6308fb8dc3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0b6380a7ceb537b939e10a5cd9a128e95dd0eaf249c80889ba0e5b81173258dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea7c22e807346b57a650e6f9c69caffd3f3e228b5af9426df80049ad85082c64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6f2692fa29a421c6b719dd5c51d71c9f5d5d3e4cbf058727ca652ba89ae4d74" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2af9b8fe84f5c4f7e25d4f52eb158c998ae99d680710bd6fe893d80819f3dd16" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "19301da40a05c325351a5515259fb4f08c4418eeb0609080434d9cf5dead776a" + sha256 cellar: :any_skip_relocation, sonoma: "756ba4cb630261cad8a7da71c63e826d586b1d73b35dfbf19564d634d7a8a791" + sha256 cellar: :any_skip_relocation, ventura: "a6cb50955a0fa7ff6976ceccc2337d6e3c9695b9790462abab79b7870224c3f5" + sha256 cellar: :any_skip_relocation, monterey: "2015d27fc77825cf49802b4c72b5a217cdbecbe923f2a5dd916d305297360cac" + sha256 cellar: :any_skip_relocation, big_sur: "8b4c1c881a01c7bbcd7a21883723d91328ed82697d0e944e01f566c43afeafd5" + sha256 cellar: :any_skip_relocation, catalina: "96f5d56b1d6c9acb8b465a1912fbd03f6837e0ffabf643200b40528ec7984358" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6cc2f34cc92c711ec8c23b221fa6653e049d603b5f62396cc7045b6f193046e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f846011946336bff588b904e16d8c0857b4b196467ca98604cd001c0c361f34c" + end + + def install + system "make" + bin.install "sersniff" + man8.install "sersniff.8" + end + + test do + assert_match(/sersniff v#{version}/, + shell_output("#{bin}/sersniff -h 2>&1", 1)) + end +end diff --git a/Formula/s/serve.rb b/Formula/s/serve.rb new file mode 100644 index 0000000000000..0d2c4f76529c3 --- /dev/null +++ b/Formula/s/serve.rb @@ -0,0 +1,44 @@ +class Serve < Formula + desc "Static http server anywhere you need one" + homepage "https://github.com/syntaqx/serve" + url "https://github.com/syntaqx/serve/archive/refs/tags/v0.6.0.tar.gz" + sha256 "7797a24564d95038d9e0a44f0dafd1dacb7853ee94d21bc0587bdfba6faaa6cb" + license "MIT" + head "https://github.com/syntaqx/serve.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3b8e2d2b16567d27a72182b7c4238ecffc186c23f78478534d0594f1bc88da94" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "341258202fb50eeaf467342669a26e492800683fc5dca43dd91f84c585ef336a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5f617c56cc80d5658b19d32dbc6002f5de4061af0da97a4ec7c2d420b8285a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2bf7effe016ef9a0cef9f6325983d0071b6f7ab8097b99c6b79c926efd2519a1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2bf7effe016ef9a0cef9f6325983d0071b6f7ab8097b99c6b79c926efd2519a1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2bf7effe016ef9a0cef9f6325983d0071b6f7ab8097b99c6b79c926efd2519a1" + sha256 cellar: :any_skip_relocation, sonoma: "d713b0211cbdcb91ff28e1a0cc481e7870a9956f51f63412730c060841e02c5c" + sha256 cellar: :any_skip_relocation, ventura: "205cfdc9a632e8c90d415bea94ab53e9a029afffb7d870fac8018bb937e43b98" + sha256 cellar: :any_skip_relocation, monterey: "205cfdc9a632e8c90d415bea94ab53e9a029afffb7d870fac8018bb937e43b98" + sha256 cellar: :any_skip_relocation, big_sur: "205cfdc9a632e8c90d415bea94ab53e9a029afffb7d870fac8018bb937e43b98" + sha256 cellar: :any_skip_relocation, arm64_linux: "380da6ada7f3ea7498102ad7ffcc2345be1d340bd1434cc3529f7efb264db128" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40325f69042fb626e7100fb49097752721fa1cc376bcf3cf2f53f5e49b215efc" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/serve" + end + + test do + port = free_port + pid = fork do + exec "#{bin}/serve -port #{port}" + end + sleep 1 + output = shell_output("curl -sI http://localhost:#{port}") + assert_match(/200 OK/m, output) + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/s/serveit.rb b/Formula/s/serveit.rb new file mode 100644 index 0000000000000..bb0181cb832d2 --- /dev/null +++ b/Formula/s/serveit.rb @@ -0,0 +1,61 @@ +class Serveit < Formula + desc "Synchronous server and rebuilder of static content" + homepage "https://github.com/garybernhardt/serveit" + url "https://github.com/garybernhardt/serveit/archive/refs/tags/v0.0.3.tar.gz" + sha256 "5bbefdca878aab4a8c8a0c874c02a0a033cf4321121c9e006cb333d9bd7b6d52" + license "MIT" + revision 1 + head "https://github.com/garybernhardt/serveit.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5f667f37bc21e896dc225f76ca5755aa0c47d994928cc2a09ed06534fa3acc6a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, sonoma: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, ventura: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, monterey: "9f9a8523f4f530ab0bd0fad9a27c710efa442b2c964aafa32c4a747819c515b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "00ccf2f05dfd700cf0f862c6b9c1c250327d9d303fb6062f83133ff307c95197" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e33ce3c0dbb5df24170e177bf1f0246d923e061304e201b54ed3f78051687a2d" + end + + uses_from_macos "ruby" + + # webrick is needed for ruby 3.0+ (as it is not part of the default gems) + # upstream report, https://github.com/garybernhardt/serveit/issues/13 + resource "webrick" do + on_linux do + url "https://rubygems.org/downloads/webrick-1.8.1.gem" + sha256 "19411ec6912911fd3df13559110127ea2badd0c035f7762873f58afc803e158f" + end + end + + def install + bin.install "serveit" + + if OS.linux? + ENV["GEM_HOME"] = libexec + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--no-document", + "--install-dir", libexec + end + + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + end + + test do + port = free_port + pid = fork { exec bin/"serveit", "-p", port.to_s } + sleep 2 + assert_match(/Listing for/, shell_output("curl localhost:#{port}")) + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/serverless.rb b/Formula/s/serverless.rb new file mode 100644 index 0000000000000..1a0a1ee441197 --- /dev/null +++ b/Formula/s/serverless.rb @@ -0,0 +1,52 @@ +class Serverless < Formula + desc "Build applications with serverless architectures" + homepage "https://www.serverless.com/" + url "https://github.com/serverless/serverless/archive/refs/tags/v3.40.0.tar.gz" + sha256 "c8058ec43e1e5de67a4a1ee95f0bcec24a4b0ffd4e953b4214961ef7ff2b385d" + license "MIT" + head "https://github.com/serverless/serverless.git", branch: "v3" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3ecd4d78b6e7743528665c880f1c56d27fe259c4d543bd263e00c38cd785eacf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06a1d77422f266cc1d32de082fd88653ff2acba640e4369391749f8308232abf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e5580e7acdb2b5a7c4c941d321aac21ccc370b40b8432ff0372b83a33227ef1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "06a1d77422f266cc1d32de082fd88653ff2acba640e4369391749f8308232abf" + sha256 cellar: :any_skip_relocation, sonoma: "b64fa8af7e98666d443ca3e0df89433fc4613e1c6c4a1e677139f4e9091f8a2d" + sha256 cellar: :any_skip_relocation, ventura: "b64fa8af7e98666d443ca3e0df89433fc4613e1c6c4a1e677139f4e9091f8a2d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd7982f62c055d7fe2ac3a8251d9f18a60a37b7211fb42708242fcb7615d6da1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06a1d77422f266cc1d32de082fd88653ff2acba640e4369391749f8308232abf" + end + + # v3 will be maintained through 2024 + # Ref: https://www.serverless.com/framework/docs/guides/upgrading-v4#license-changes + deprecate! date: "2024-12-31", because: "uses proprietary licensed software in v4" + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Delete incompatible Linux CPython shared library included in dependency package. + # Raise an error if no longer found so that the unused logic can be removed. + (libexec/"lib/node_modules/serverless/node_modules/@serverless/dashboard-plugin") + .glob("sdk-py/serverless_sdk/vendor/wrapt/_wrappers.cpython-*-linux-gnu.so") + .map(&:unlink) + .empty? && raise("Unable to find wrapt shared library to delete.") + end + + test do + (testpath/"serverless.yml").write <<~YAML + service: homebrew-test + provider: + name: aws + runtime: python3.6 + stage: dev + region: eu-west-1 + YAML + + system bin/"serverless", "config", "credentials", "--provider", "aws", "--key", "aa", "--secret", "xx" + output = shell_output("#{bin}/serverless package 2>&1") + assert_match "Packaging homebrew-test for stage dev", output + end +end diff --git a/Formula/s/service-weaver.rb b/Formula/s/service-weaver.rb new file mode 100644 index 0000000000000..32432b959e0b0 --- /dev/null +++ b/Formula/s/service-weaver.rb @@ -0,0 +1,78 @@ +class ServiceWeaver < Formula + desc "Programming framework for writing and deploying cloud applications" + homepage "https://serviceweaver.dev/" + license "Apache-2.0" + + stable do + url "https://github.com/ServiceWeaver/weaver/archive/refs/tags/v0.24.6.tar.gz" + sha256 "15b34f1539b6a84f8783009a2e8ce98bb12c9a0c0ba70b4ff055e4a8a3406e10" + + resource "weaver-gke" do + url "https://github.com/ServiceWeaver/weaver-gke/archive/refs/tags/v0.24.4.tar.gz" + sha256 "97e2bd35b997bc65f824fb1b2eb6500f8ba97d444cc7565be80e61005c462848" + end + end + + # Upstream only creates releases for x.x.0 but said that we should use the + # latest tagged version, regardless of whether there is a GitHub release. + # With that in mind, we check the Git tags and ignore whether the version is + # the "latest" release on GitHub. + # See: https://github.com/ServiceWeaver/weaver/issues/603#issuecomment-1722048623 + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cc49ca39bcb55555be333c8ab54c3649cb989e82d04e3d743b1fcc690f26c867" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "76c861065b7ebf0afb19189eda629198c7f2626911edc540aae08660f06a1345" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4bf175089ed43e869e3553de0ae5a3b498e9cc796745ce14fa9e2b919273413" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d58a390f9b42bc7dcd1444399ed11b9a23a2b78c29e62caaf0a0a5963a45d858" + sha256 cellar: :any_skip_relocation, sonoma: "29cb9c8dca107487aaa3edd171d34dce80b9f0e71ac04dd060c2d7b82677e292" + sha256 cellar: :any_skip_relocation, ventura: "258db33d6cf2b2cf520150d3ece5dfffb0a77c325e5248bf0a1886f6627e0719" + sha256 cellar: :any_skip_relocation, arm64_linux: "1211e7bf0e83aa596d397fe4e152b7ecf289248ef27bb82b27b7f06c9bbd3f9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "385c13a006f40c24d42c8b2f33d1035143f9625b0b08349284a92e71df6972d0" + end + + head do + url "https://github.com/ServiceWeaver/weaver.git", branch: "main" + + resource "weaver-gke" do + url "https://github.com/ServiceWeaver/weaver-gke.git", branch: "main" + end + end + + # upstream announcement, https://github.com/ServiceWeaver/weaver/pull/804 + deprecate! date: "2025-06-14", because: :unmaintained + + depends_on "go@1.23" => :build + + conflicts_with "weaver", because: "both install a `weaver` binary" + + def install + # Workaround to avoid patchelf corruption when cgo is required (for go-sqlite3) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"weaver"), "./cmd/weaver" + resource("weaver-gke").stage do + ["weaver-gke", "weaver-gke-local"].each do |f| + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/f), "./cmd/#{f}" + end + end + end + + test do + output = shell_output("#{bin}/weaver single status") + assert_match "DEPLOYMENTS", output + + gke_output = shell_output("#{bin}/weaver gke status 2>&1", 1) + assert_match "gcloud not installed", gke_output + + gke_local_output = shell_output("#{bin}/weaver gke-local status 2>&1", 1) + assert_match "connect: connection refused", gke_local_output + end +end diff --git a/Formula/s/servus.rb b/Formula/s/servus.rb new file mode 100644 index 0000000000000..3e65c3af2a1cd --- /dev/null +++ b/Formula/s/servus.rb @@ -0,0 +1,141 @@ +class Servus < Formula + desc "Library and Utilities for zeroconf networking" + homepage "https://github.com/HBPVIS/Servus" + url "https://github.com/HBPVIS/Servus.git", + tag: "1.5.2", + revision: "170bd93dbdd6c0dd80cf4dfc5926590cc5cef5ab" + license "LGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab13ed2c0b20bf5161935890b6ee47ecf74f0a05c68e9beba5bbc3c77727fd6b" + sha256 cellar: :any, arm64_sequoia: "e4e1dc29b490f71552d5037b7eec4b049884e7ab5942f543fc65392f856f6ce0" + sha256 cellar: :any, arm64_sonoma: "1ca10abd68ab48408bc5d5db44e2512345ceab9ba48765c61f6ac2079268dcb5" + sha256 cellar: :any, arm64_ventura: "1efa83c497c61c33ffaa0217aebd141898bd6b1ae4302116d8a9e7deb1737f53" + sha256 cellar: :any, arm64_monterey: "ed3be1f83df1a364a0eb5161853e369777ee882950c8a7237ee5dd10fa6cf6b4" + sha256 cellar: :any, arm64_big_sur: "5a2c8cbe46fc1a9e8d2aa14036c2cc775f438cae77adaa8918d5a6cb9378c2e7" + sha256 cellar: :any, sonoma: "6390c856e889366263cbf852a8c256f35c6cda4f1bf493e010192486c3169682" + sha256 cellar: :any, ventura: "6d2eb5d2a67e639b97ca51cde1ee0530638b723c6b631ea349662cb02dd92211" + sha256 cellar: :any, monterey: "af895ca95876fe36403308b673b0d7a1fdf0b5579e3f651f0dbb9449ace86e65" + sha256 cellar: :any, big_sur: "4e2b2042868af63bf0d39f10821afdd04d37da37ad8ba4da41dff0a73fae7787" + sha256 cellar: :any, catalina: "e0629cca8bee46595c540c2240ed1cc599c5f676527a21f951bfc89a0335c54e" + sha256 cellar: :any_skip_relocation, arm64_linux: "eeb97d385641030178dc69f111e80af9c20ed5900aa48083006426755c1fed67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36a572c2f9e4f6bb483e11b286ce99c37c4e45a3028a196478d6e9ccaedcb99" + end + + depends_on "cmake" => :build + depends_on "boost" => :test + + # Backport missing header + patch do + url "https://github.com/HBPVIS/Servus/commit/53bf825cd995a7d2f569157f20431daf0cc860f8.patch?full_index=1" + sha256 "bb5d44dd39b63a091c9cc89fcdfc25e914f184eac5af9256b54975cf300575a5" + end + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Embed "serializeable" test from the servus 1.5.0 source + (testpath/"test.cpp").write <<~CPP + #define BOOST_TEST_MODULE servus_serializable + #include + + #include + #include + + void dummyFunction(){} + + class SerializableObject : public servus::Serializable + { + public: + std::string getTypeName() const final { return "test::serializable"; } + + servus::uint128_t getTypeIdentifier() const final + { + return servus::make_uint128( getTypeName( )); + } + + private: + bool _fromBinary( const void*, const size_t ) { return true; } + bool _fromJSON( const std::string& ) { return true; } + }; + + + BOOST_AUTO_TEST_CASE(serializable_types) + { + SerializableObject obj; + BOOST_CHECK_EQUAL( obj.getTypeName(), "test::serializable" ); + BOOST_CHECK_EQUAL( servus::make_uint128( obj.getTypeName( )), + obj.getTypeIdentifier( )); + BOOST_CHECK_EQUAL( obj.getSchema(), std::string( )); + } + + BOOST_AUTO_TEST_CASE(serializable_registerSerialize) + { + SerializableObject obj; + servus::Serializable::SerializeCallback callback( dummyFunction ); + + obj.registerSerializeCallback( callback ); + BOOST_CHECK_THROW( obj.registerSerializeCallback( callback ), + std::runtime_error ); // callback already registered + + BOOST_CHECK_NO_THROW( obj.registerSerializeCallback( + servus::Serializable::SerializeCallback( ))); + BOOST_CHECK_NO_THROW( obj.registerSerializeCallback( callback )); + + BOOST_CHECK_THROW( obj.registerSerializeCallback( callback ), + std::runtime_error ); // callback already registered + } + + BOOST_AUTO_TEST_CASE(serializable_registerDeserialized) + { + SerializableObject obj; + servus::Serializable::DeserializedCallback callback( dummyFunction ); + + obj.registerDeserializedCallback( callback ); + BOOST_CHECK_THROW( obj.registerDeserializedCallback( callback ), + std::runtime_error ); // callback already registered + + BOOST_CHECK_NO_THROW( obj.registerDeserializedCallback( + servus::Serializable::DeserializedCallback( ))); + BOOST_CHECK_NO_THROW( obj.registerDeserializedCallback( callback )); + + BOOST_CHECK_THROW( obj.registerDeserializedCallback( callback ), + std::runtime_error ); // callback already registered + } + + BOOST_AUTO_TEST_CASE(serializable_binary) + { + SerializableObject obj; + + // fromBinary implemented + BOOST_CHECK_NO_THROW( obj.fromBinary( new float[3], 3 )); + + // default toBinary (unimplemented) + BOOST_CHECK_THROW( obj.toBinary(), std::runtime_error ); + } + + BOOST_AUTO_TEST_CASE(serializable_json) + { + SerializableObject obj; + + // fromJson implemented + BOOST_CHECK_NO_THROW( obj.fromJSON( std::string( "testing..." ))); + + // default toJson (unimplemented) + BOOST_CHECK_THROW( obj.toJSON(), std::runtime_error ); + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lServus", "-DBOOST_TEST_DYN_LINK", + "-L#{Formula["boost"].opt_lib}", "-lboost_unit_test_framework", + "-std=gnu++11", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sesh.rb b/Formula/s/sesh.rb new file mode 100644 index 0000000000000..749c48f2dee1e --- /dev/null +++ b/Formula/s/sesh.rb @@ -0,0 +1,31 @@ +class Sesh < Formula + desc "Smart session manager for the terminal" + homepage "https://github.com/joshmedeski/sesh" + url "https://github.com/joshmedeski/sesh/archive/refs/tags/v2.18.2.tar.gz" + sha256 "c24caf4ba2842dd6dfb349f8f2facb248571ecd371f75b38a62b278786e87729" + license "MIT" + head "https://github.com/joshmedeski/sesh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "947ec9adf0f0a9659dfd318be348ffd3eb3930d219e118694006d79835d5de20" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "947ec9adf0f0a9659dfd318be348ffd3eb3930d219e118694006d79835d5de20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "947ec9adf0f0a9659dfd318be348ffd3eb3930d219e118694006d79835d5de20" + sha256 cellar: :any_skip_relocation, sonoma: "243c213cf6e688d72f828f58346b22d5c35e6b8805d2bdabe86be9130da274a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "86aef3668409a7a678bb55fb1a8611b35257121753bf2b4737ec2003f371ba97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98b0132b861cbeb49e57b3b3ffc8bc41a660c7d5d3ab866abe7808e2aae03b39" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + output = shell_output("#{bin}/sesh root 2>&1", 1) + assert_match "No root found for session", output + + assert_match version.to_s, shell_output("#{bin}/sesh --version") + end +end diff --git a/Formula/s/setconf.rb b/Formula/s/setconf.rb new file mode 100644 index 0000000000000..af2193ac5cbe4 --- /dev/null +++ b/Formula/s/setconf.rb @@ -0,0 +1,29 @@ +class Setconf < Formula + include Language::Python::Shebang + + desc "Utility for easily changing settings in configuration files" + homepage "https://setconf.roboticoverlords.org/" + url "https://setconf.roboticoverlords.org/setconf-0.7.7.tar.xz" + sha256 "19315574540b3181fec31a4059b9e058381e0192317f153d181e7e7e2aa84d86" + license "GPL-2.0-or-later" + head "https://github.com/xyproto/setconf.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "4595c95b544f85bef09766354418d146364657157ba5f7dc614487bf50f85535" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "setconf.py" + bin.install "setconf.py" => "setconf" + man1.install "setconf.1.gz" + end + + test do + assert_match version.to_s, shell_output("#{bin}/setconf --version") + system bin/"setconf", "--test" + end +end diff --git a/Formula/s/setweblocthumb.rb b/Formula/s/setweblocthumb.rb new file mode 100644 index 0000000000000..bc363267174a2 --- /dev/null +++ b/Formula/s/setweblocthumb.rb @@ -0,0 +1,38 @@ +class Setweblocthumb < Formula + desc "Assigns custom icons to webloc files" + homepage "https://hasseg.org/setWeblocThumb/" + url "https://github.com/ali-rantakari/setWeblocThumb/archive/refs/tags/v1.0.0.tar.gz" + sha256 "0258fdabbd24eed2ad3ff425b7832c4cd9bc706254861a6339f886efc28e35be" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "88745a2bd0a9404e73e38596e27004f33a562aa98a58d47772c70892eb22b026" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7765cc1aed9b92ae0460dfeace83a4c9fee7c63598953caf6e2bbdb581c5395c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb99da3db71d9602d3c6ddf5b615a8b9b90ee253fc7561fe02116791050a2376" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6eb231e7fa24dcebe8d1d863bc1bbbcec86943522f4391dce30c0d0a14a99e7e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6f306986d59d8d148fe8619ef3a14b12fc89235e199ab18cfd691885009cc47f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "849e242cc0d75408abb95ed3afead495868ae730132fd4a648f032ea3b873774" + sha256 cellar: :any_skip_relocation, sonoma: "248f41330bafe2862826339ebce3630bb0873f8c69a64fa57d865801fabafab5" + sha256 cellar: :any_skip_relocation, ventura: "7731be759ebec8e9e06e70056f4ddc19498872cc8daafa4079baa7610a0662d0" + sha256 cellar: :any_skip_relocation, monterey: "20e1fe63be72e27183b5e0a5885f5456882b1a72487e72c446ae48723f793920" + sha256 cellar: :any_skip_relocation, big_sur: "565f0fb62158115fcd9e1618282b989bd50007f5c8c0260df5f47f85660adb87" + sha256 cellar: :any_skip_relocation, catalina: "6849eb0b22ee09260daa9432881f66dbb97ef44b26e1d469ca11d316658ee4f2" + end + + depends_on :macos + + def install + # https://github.com/ali-rantakari/setWeblocThumb/issues/3 + inreplace "Makefile", "-force_cpusubtype_ALL -mmacosx-version-min=10.5 -arch i386", "" + + system "make" + bin.install "setWeblocThumb" + end + + test do + Pathname.new("google.webloc").write('{URL = "https://google.com";}') + system bin/"setWeblocThumb", "google.webloc" + end +end diff --git a/Formula/s/seven-kingdoms.rb b/Formula/s/seven-kingdoms.rb new file mode 100644 index 0000000000000..a34d0db10085e --- /dev/null +++ b/Formula/s/seven-kingdoms.rb @@ -0,0 +1,67 @@ +class SevenKingdoms < Formula + desc "Real-time strategy game developed by Trevor Chan of Enlight Software" + homepage "https://7kfans.com" + url "https://downloads.sourceforge.net/project/skfans/7KAA%202.15.7/7kaa-2.15.7.tar.gz" + sha256 "2a9833ffe5fa7558857d4f8ba39cad1dccefadb01d298350ed8f954c75b6a6ae" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/7kaa[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "ff7bdbd3a2e4e637a6f90dd9d95051baece154f4abb30ddbb88e4a4a8b84cb24" + sha256 arm64_sequoia: "8e23d82f2fa267b2489c5be9f53f9423de28209db8c691a8e55ec97bba8e4879" + sha256 arm64_sonoma: "5f12722cd8c266303787d1d39e58de4703b009c17b082589aaf15414e5a163a4" + sha256 sonoma: "cd1588f31d2e72b42fb11b76f1ed6b10dc0340fe0021c3e26359fbd22c66e3d2" + sha256 arm64_linux: "5ec481c6ff98179854ef137c1593f24225766e8670b50af3a2922cb9af683be5" + sha256 x86_64_linux: "0219b6986caccfd218784b94b28717301b9c3a1bb278093b12d8934f843c881a" + end + + depends_on "pkgconf" => :build + depends_on "sdl2" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "openal-soft" + end + + # Multiplayer support requires -mfpmath=387. Otherwise it is automatically + # disabled, which also disables `enet` and `curl` usage. + on_intel do + depends_on "enet" + + on_macos do + depends_on "gcc" + end + + # FIXME: `uses_from_macos` is not allowed in `on_intel` block + on_linux do + depends_on "curl" + end + + fails_with :clang do + cause "needs support for -mfpmath=387" + end + end + + def install + args = ["--disable-silent-rules"] + args += ["--disable-curl", "--disable-enet", "--disable-multiplayer"] unless Hardware::CPU.intel? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + pid = spawn bin/"7kaa", "-win", "-demo" + sleep 5 + system "kill", "-9", pid + end +end diff --git a/Formula/s/sevenzip.rb b/Formula/s/sevenzip.rb new file mode 100644 index 0000000000000..1cf7037d976ae --- /dev/null +++ b/Formula/s/sevenzip.rb @@ -0,0 +1,115 @@ +class Sevenzip < Formula + desc "7-Zip is a file archiver with a high compression ratio" + homepage "https://7-zip.org" + url "https://7-zip.org/a/7z2501-src.tar.xz" + version "25.01" + sha256 "ed087f83ee789c1ea5f39c464c55a5c9d4008deb0efe900814f2df262b82c36e" + license all_of: ["LGPL-2.1-or-later", "BSD-3-Clause"] + head "https://github.com/ip7z/7zip.git", branch: "main" + + livecheck do + url "https://7-zip.org/download.html" + regex(/>\s*Download\s+7-Zip\s+v?(\d+(?:\.\d+)+)\s+\([^)]+?\)/im) + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b2510dbf7cf321890d1f7434195ab966b4e24fb6439b149b5bd4c53cb0fd830a" + sha256 cellar: :any, arm64_sequoia: "164df59691f0b22b908312d7352a048c348fbc5ca0f4cb01e90a0d588436af26" + sha256 cellar: :any, arm64_sonoma: "061da1460500f02df5cd42a12f5301f76b7b4684fb75a76e590278b84445396c" + sha256 cellar: :any, arm64_ventura: "640b7a4fe0208c77a79dd47d960f52b3f2e75d618615e16708b644220b6943df" + sha256 cellar: :any, sonoma: "eb1f49451241d795505ed4c2d42d67a6f994cda22f151cf3acc51db6c52100a3" + sha256 cellar: :any, ventura: "0764395d3853ff416c9b5b1d94578cd0a2c6a29b7ba7875066ecc36d70d156b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "38ddcf4c4583824aa90ee0efaee9a5a9c3b51f30fc11f5406afcd8b59ce1983f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdacdbbc0f28b2915b38c8e27d3a59ce64d7b5a23db36ad29f8f8fb5fc3dbdaa" + end + + def install + mac_suffix = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch + mk_suffix, directory = if OS.mac? + ["mac_#{mac_suffix}", "m_#{mac_suffix}"] + else + ["gcc", "g"] + end + cd "CPP/7zip/Bundles/Alone2" do + system "make", "-f", "../../cmpl_#{mk_suffix}.mak", "DISABLE_RAR_COMPRESS=1" + + # Cherry pick the binary manually. This should be changed to something + # like `make install' if the upstream adds an install target. + # See: https://sourceforge.net/p/sevenzip/discussion/45797/thread/1d5b04f2f1/ + bin.install "b/#{directory}/7zz" + end + cd "CPP/7zip/Bundles/Format7zF" do + system "make", "-f", "../../cmpl_#{mk_suffix}.mak", "DISABLE_RAR_COMPRESS=1" + lib.install "b/#{directory}/7z.so" + lib.install_symlink "7z.so" => shared_library("lib7z") + end + end + + test do + (testpath/"foo.txt").write("hello world!\n") + system bin/"7zz", "a", "-t7z", "foo.7z", "foo.txt" + system bin/"7zz", "e", "foo.7z", "-oout" + assert_equal "hello world!\n", (testpath/"out/foo.txt").read + + (testpath/"test7z.c").write <<~C + #include + #include + #include + + typedef int32_t HRESULT; + #define S_OK ((HRESULT)0L) + #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) + + typedef uint16_t VARTYPE; + #define VT_UI4 19 + + typedef struct tagPROPVARIANT { + VARTYPE vt; + uint16_t wReserved1; + uint16_t wReserved2; + uint16_t wReserved3; + union { + uint32_t ulVal; + int32_t lVal; + uint64_t uhVal; + int64_t hVal; + int16_t iVal; + uint16_t uiVal; + char cVal; + unsigned char bVal; + int intVal; + unsigned int uintVal; + }; + } PROPVARIANT; + + typedef int PROPID; + + HRESULT GetModuleProp(PROPID propID, PROPVARIANT *value); + + int main(void) { + PROPVARIANT val; + memset(&val, 0, sizeof(val)); + + HRESULT hr = GetModuleProp(1, &val); // 1 = kVersion + + if (!SUCCEEDED(hr) || val.vt != VT_UI4) { + printf("GetModuleProp failed\\n"); + return 1; + } + + unsigned major = val.ulVal >> 16; + unsigned minor = val.ulVal & 0xFFFF; + + printf("%02u.%02u", major, minor); + return 0; + } + C + + system ENV.cc, "test7z.c", "-L#{lib}", "-l7z", "-o", "test7z" + output = shell_output("./test7z").strip + assert_equal version.to_s, output + end +end diff --git a/Formula/s/sexpect.rb b/Formula/s/sexpect.rb new file mode 100644 index 0000000000000..ab76c7b9bc6ae --- /dev/null +++ b/Formula/s/sexpect.rb @@ -0,0 +1,50 @@ +class Sexpect < Formula + desc "Expect for shells" + homepage "https://github.com/clarkwang/sexpect" + url "https://github.com/clarkwang/sexpect/archive/refs/tags/v2.3.15.tar.gz" + sha256 "44f5711aa99f3ccf9c4b0edfcd9a7d25fa64b442574624ce451713d1532c1a7e" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "445597fc095ce9f21e20e79f2d242e487649d56eed1b27f362250aa74111b227" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8647d681a0db2c3a76b9b22182564a560f630709d1bf9313740968ad9090ffb2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dfb2baed2c6a89e7bb6c7c7d3e3fde11b3638e3a2c9e015d9fe0fc4f8d32589f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7858fbb1d10b1879cf855315dd723a2273c31e2aa8c95150860f25c5f4d71989" + sha256 cellar: :any_skip_relocation, sonoma: "c9a3b88e131cb425f9e061af99304e882540035f88e595cf7d5791a03af6860f" + sha256 cellar: :any_skip_relocation, ventura: "46426d997a36dcd97a5b39ad3710b5aa14302fa95c8d223eebf126f3a5d212c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0702807c75c5500cc19564fdc28623f5f5118d61462e22bf423e470e1691879" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d83044609dd02ec1d1ae82b2bf3af77038ed6868792d1e79adb3599c52ad4e31" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/sexpect --version") + + (testpath/"test.sh").write <<~SHELL + #!/bin/sh + + export SEXPECT_SOCKFILE="#{testpath}/s.sock" + + sexpect sp -t 10 sleep 60 + sexpect c + sexpect c + sexpect c + sexpect c + sexpect ex -t 1 -eof + sexpect w + + [ $? -eq 129 ] + SHELL + + system "sh", "#{testpath}/test.sh" + end +end diff --git a/Formula/s/sextractor.rb b/Formula/s/sextractor.rb new file mode 100644 index 0000000000000..7213a0c5b60d8 --- /dev/null +++ b/Formula/s/sextractor.rb @@ -0,0 +1,49 @@ +class Sextractor < Formula + desc "Extract catalogs of sources from astronomical images" + homepage "https://www.astromatic.net/software/sextractor/" + url "https://github.com/astromatic/sextractor/archive/refs/tags/2.28.2.tar.gz" + sha256 "d92c5214ea75b8a70214d7d7f6824207fc53861ec923ceb2cc574f2ec9effa94" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "06bd29cd706f67f6b684f6cf2e4393e2977e0db250a242254c70ea95712358d4" + sha256 arm64_sequoia: "114c7e6368360d1c5ef66850b1a2090bd84f759e323d320e0dd74549baed4714" + sha256 arm64_sonoma: "2138d679b5172a8f2b76d0fbacde1a67de054ccd9db6d3f5bcf5a163107f9098" + sha256 arm64_ventura: "ca726287370efe2c960b98a02c8bcbe3b9a8491a584864d6333fd89a020a477d" + sha256 sonoma: "3a7f9a4b0880e0de0dca905679bea7e8747f3a299755f10a8437bd5432f65a30" + sha256 ventura: "9d53959e43245ab7d3ebac8bf8696d42c56a512bcc89672670c9f358fbbb6586" + sha256 arm64_linux: "eabbbb4573111bd7b50bf6fb15b0fa73a03146276d22d752c6a338f506a2f412" + sha256 x86_64_linux: "6b0fd897f186d16e044a010354109fbf0fd4b7ba4afddc4b7715cca6e741186e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "cfitsio" + depends_on "fftw" + depends_on "openblas" + + def install + openblas = Formula["openblas"] + # Allow OpenBLAS header migration to subdirectory. Can remove once done + openblas_incdir = openblas.include/"openblas" + openblas_incdir = openblas.include unless openblas_incdir.exist? + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--enable-openblas", + "--with-openblas-libdir=#{openblas.lib}", + "--with-openblas-incdir=#{openblas_incdir}", + *std_configure_args + system "make", "install" + # Remove references to Homebrew shims + rm Dir["tests/Makefile*"] + pkgshare.install "tests" + end + + test do + cp_r Dir[pkgshare/"tests/*"], testpath + system bin/"sex", "galaxies.fits", "-WEIGHT_IMAGE", "galaxies.weight.fits", "-CATALOG_NAME", "galaxies.cat" + assert_path_exists testpath/"galaxies.cat", "Failed to create galaxies.cat" + end +end diff --git a/Formula/s/sf-pwgen.rb b/Formula/s/sf-pwgen.rb new file mode 100644 index 0000000000000..d1fba787e3358 --- /dev/null +++ b/Formula/s/sf-pwgen.rb @@ -0,0 +1,35 @@ +class SfPwgen < Formula + desc "Generate passwords using SecurityFoundation framework" + homepage "https://github.com/anders/pwgen/" + url "https://github.com/anders/pwgen/archive/refs/tags/1.5.tar.gz" + sha256 "e1f1d575638f216c82c2d1e9b52181d1d43fd05e7169db1d6f9f5d8a2247b475" + license "Zlib" + head "https://github.com/anders/pwgen.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "02488155f0876824620ee9745fb8bd4d6b89fae828bfc0926aebc7f422647a93" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b97cc880e036c31a7f53592df3eeecd8965645fafff19d1957bfdbfc2b35a45a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38d7fb2634658ff623e2a50d1b8b180ca70f05438d3f4a239ed7fd365b789158" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83a40b37e9b699a826dbce9aa41bba8139766d5020d85b2db736e14106a7fcd8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "18c119ad50fcbce8f68e38f4ed3726c03b34b1df46e9b9ecfd510650cec5d62c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0f425de9f8e3e82e24a4c10143e54006c96e6063a19fb64643ec0b3ce279cdaa" + sha256 cellar: :any_skip_relocation, sonoma: "76ee29b2b3a28c90a818780c4eadc30c054aead4485a718283e93112bea42c61" + sha256 cellar: :any_skip_relocation, ventura: "bb798ef11bc8e1332a175ba210829ed204521942c7269286ed2abb8ab1451f35" + sha256 cellar: :any_skip_relocation, monterey: "e2b26cb28d13762f2160eafa1efcec67aa058bfaffc52265b6c546987cf371dd" + sha256 cellar: :any_skip_relocation, big_sur: "bcf403285094f1c803d9f8884aff19225ea5d7ab45329d6efc232f468e43b4c2" + sha256 cellar: :any_skip_relocation, catalina: "0fc934513e71330c48333b6e0698b39013d1b2aee57f93124c0c1bff2236475e" + end + + depends_on :macos + + def install + system "make" + bin.install "sf-pwgen" + end + + test do + assert_equal 20, shell_output("#{bin}/sf-pwgen -a memorable -c 1 -l 20").chomp.length + end +end diff --git a/Formula/s/sf.rb b/Formula/s/sf.rb new file mode 100644 index 0000000000000..619af61bbace2 --- /dev/null +++ b/Formula/s/sf.rb @@ -0,0 +1,34 @@ +class Sf < Formula + desc "Command-line toolkit for Salesforce development" + homepage "https://developer.salesforce.com/tools/salesforcecli" + url "https://registry.npmjs.org/@salesforce/cli/-/cli-2.110.22.tgz" + sha256 "19e67269166ab9ff607ba613809a8ba8e472e489a2971d869b8154a20a93bc26" + license "BSD-3-Clause" + + livecheck do + url "https://registry.npmjs.org/@salesforce/cli/latest" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "740e1c5ea3f261aedc52118914559c0b8dc131404e25c3c9d4ae66ea24cea380" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"sf", "project", "generate", "-n", "projectname", "-t", "empty" + assert_path_exists testpath/"projectname" + assert_path_exists testpath/"projectname/config/project-scratch-def.json" + assert_path_exists testpath/"projectname/README.md" + assert_path_exists testpath/"projectname/sfdx-project.json" + assert_path_exists testpath/"projectname/.forceignore" + end +end diff --git a/Formula/s/sfcgal.rb b/Formula/s/sfcgal.rb new file mode 100644 index 0000000000000..723b513fdae1a --- /dev/null +++ b/Formula/s/sfcgal.rb @@ -0,0 +1,39 @@ +class Sfcgal < Formula + desc "C++ wrapper library around CGAL" + homepage "https://sfcgal.gitlab.io/SFCGAL/" + url "https://gitlab.com/sfcgal/SFCGAL/-/archive/v2.2.0/SFCGAL-v2.2.0.tar.gz" + sha256 "bb6bb77ddb58523d8c229764de23699f99c1a7011d873419afd2a67df85602a2" + license "LGPL-2.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "96e20b32b551e70b2ada85525d29c9eacf71c7bd9801a596a9fc69aed2a11ccf" + sha256 cellar: :any, arm64_sequoia: "edf3e6bb7675d6b66c5aa4dd86b38689aed0b7d66575b1e5d9adce8ee59115ca" + sha256 cellar: :any, arm64_sonoma: "18747f7e52f38575052dfe8f343dd806e44cb814529a38fe81d76d184afe53f4" + sha256 cellar: :any, arm64_ventura: "fce83f644f244c62668e5d6e0369249058896ab3bc585853389169b9f8c2a8e5" + sha256 cellar: :any, sonoma: "5d01307845b1f4644b1d4a9b9042bfc759253a18e95ece43e5e7c1327b04b9cb" + sha256 cellar: :any, ventura: "a439a761239ed06d5895960dee7f6cc782687f5cc7f1c8990aa13e64e1305231" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ca1c0b6a601215658c7b1728b052181e77ab82784c0d5877798b91f9d4ab236" + sha256 cellar: :any_skip_relocation, x86_64_linux: "961bba19ab5213f947a89814d80823c5ef2bea78eab1551957e56b390ba7854e" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "cgal" + depends_on "gmp" + depends_on "mpfr" + + def install + # Workaround for Boost 1.89.0 until fixed upstream + # Issue ref: https://gitlab.com/sfcgal/SFCGAL/-/issues/306 + inreplace "CMakeLists.txt", " SFCGAL_Boost_COMPONENTS thread system ", " SFCGAL_Boost_COMPONENTS thread " + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_equal prefix.to_s, shell_output("#{bin}/sfcgal-config --prefix").strip + end +end diff --git a/Formula/s/sfk.rb b/Formula/s/sfk.rb new file mode 100644 index 0000000000000..73b62262596dc --- /dev/null +++ b/Formula/s/sfk.rb @@ -0,0 +1,34 @@ +class Sfk < Formula + desc "Command-line tools collection" + homepage "http://stahlworks.com/dev/swiss-file-knife.html" + url "https://downloads.sourceforge.net/project/swissfileknife/1-swissfileknife/2.0.0.3/sfk-2.0.0.tar.gz" + version "2.0.0.3" + sha256 "b7e2e3848e3126dcee916056bff5f8340acae9158f3610049de2cde999ccca63" + license "BSD-2-Clause" + + livecheck do + url :stable + regex(%r{url.*?swissfileknife/v?(\d+(?:\.\d+)+)/}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ec3b6117f51420212e6d8d7731790f6f993609d8c254888c2141bdf707b69460" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "573b78680c4804e1fe8e8937087659d321737e865616f47939593f0f78dbc19e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4bb8c90c12c6644180c9b0426525284e0e8de58d5d10fcdd807ab7b53e58c9b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "886b7876e56e345dc272b73a935567c19845b01e2804cd7cb02104c5540d0dfb" + sha256 cellar: :any_skip_relocation, sonoma: "456e00f73c8dee5195cd6ef368ae9d904d4ed977dd944421c81f806356910747" + sha256 cellar: :any_skip_relocation, ventura: "76e519990b5a6a5eb48fc6b5c659c94d6fded8a9368ad059235836950aa6023c" + sha256 cellar: :any_skip_relocation, arm64_linux: "27e7c02deb14c7fbac1e8c0a4a55872117a37a6ae6772556f3df1bbd193342a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfdc12016754b27340f7e11d07912c36471a2645f4ac0c39e9eaddce5b599d6f" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system bin/"sfk", "ip" + end +end diff --git a/Formula/s/sfml.rb b/Formula/s/sfml.rb new file mode 100644 index 0000000000000..9478b2b3d8a19 --- /dev/null +++ b/Formula/s/sfml.rb @@ -0,0 +1,78 @@ +class Sfml < Formula + # Don't update SFML until there's a corresponding CSFML release + desc "Multi-media library with bindings for multiple languages" + homepage "https://www.sfml-dev.org/" + url "https://github.com/SFML/SFML/archive/refs/tags/3.0.2.tar.gz" + sha256 "0034e05f95509e5d3fb81b1625713e06da7b068f210288ce3fd67106f8f46995" + license "Zlib" + head "https://github.com/SFML/SFML.git", branch: "master" + + # Exclude release candidates + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+)/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f90a54b2514303d50f3e7ce23554246b9a4bd6765db89158da55eef3b780ce98" + sha256 cellar: :any, arm64_sequoia: "ca368852e45e73f7740343b736e20ddae613f326cbc24bc3779421c3c093c026" + sha256 cellar: :any, arm64_sonoma: "533db007d52c7b1ac24fe6699958baca1d989363f288d673b8c55b266efeedf4" + sha256 cellar: :any, sonoma: "01fb208923654ba730e48e3fbb5ca3bf78c09838f5a9e15bd389045732e65baa" + sha256 cellar: :any_skip_relocation, arm64_linux: "0cd68b13bddd404db5daa8a3a8a8ae8fd9236f59896374fb50514dea41628ecf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4c2c78c094ed8eb9b9ec3a5c2d45b0cf0975edcf165ed97d58762b371fb7fe9" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "freetype" + depends_on "libogg" + depends_on "libvorbis" + + on_linux do + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxi" + depends_on "libxrandr" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "openal-soft" + depends_on "systemd" + end + + def install + # Always remove the "extlibs" to avoid install_name_tool failure + # (https://github.com/Homebrew/homebrew/pull/35279) but leave the + # headers that were moved there in https://github.com/SFML/SFML/pull/795 + rm_r(Dir["extlibs/*"] - ["extlibs/headers"]) + + args = [ + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE", + "-DSFML_PKGCONFIG_INSTALL_DIR=#{lib}/pkgconfig", + "-DSFML_BUILD_DOC=TRUE", + "-DSFML_USE_SYSTEM_DEPS=ON", + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target=doc" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "Time.hpp" + int main() { + sf::Time t1 = sf::milliseconds(10); + return 0; + } + CPP + system ENV.cxx, "-I#{include}/SFML/System", "-std=c++17", testpath/"test.cpp", + "-L#{lib}", "-lsfml-system", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sfml@2.rb b/Formula/s/sfml@2.rb new file mode 100644 index 0000000000000..24cd7e3bfedd9 --- /dev/null +++ b/Formula/s/sfml@2.rb @@ -0,0 +1,72 @@ +class SfmlAT2 < Formula + desc "Multi-media library with bindings for multiple languages" + homepage "https://www.sfml-dev.org/" + url "https://www.sfml-dev.org/files/SFML-2.6.2-sources.zip" + sha256 "19d6dbd9c901c74441d9888c13cb1399f614fe8993d59062a72cfbceb00fed04" + license "Zlib" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3b56c69d70b30eca4493fcd6ab9063a5f281cc3c82def8c43d55a63312372971" + sha256 cellar: :any, arm64_sequoia: "7cb3afc70bc71a9a3c45edd4bf9ca54dc9514bc576a894f5f01d58c3b04e0b44" + sha256 cellar: :any, arm64_sonoma: "529996e0afcd2b27ad6c7f5e124067fb940d2c6c4b3dface4d21db5694c16b2e" + sha256 cellar: :any, arm64_ventura: "8d76a3051365d997d2fcbe5b24c3042bb217df18f3f64d25bb0708875cdcbc91" + sha256 cellar: :any, sonoma: "96b5e8246f95125ed017da1a3b0ebf37ec9006c644efb2587d8e7e6d3fb4a5ec" + sha256 cellar: :any, ventura: "d7f41e0d4c78d3c6ecd487c9d8ba1f094ec42bf7dbddc3678bccc13e13091ed0" + sha256 cellar: :any_skip_relocation, arm64_linux: "de95401fa9357605881a1ff217dffa3c0fc7703968ce9f99ee25db3fb16fd2f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83c161b5438b103ca014927de4b1ccba2782c9e6a654cce77e6041e02c91d1f3" + end + + keg_only :versioned_formula + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "flac" + depends_on "freetype" + depends_on "libogg" + depends_on "libvorbis" + + on_linux do + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxrandr" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "openal-soft" + depends_on "systemd" + end + + def install + # Always remove the "extlibs" to avoid install_name_tool failure + # (https://github.com/Homebrew/homebrew/pull/35279) but leave the + # headers that were moved there in https://github.com/SFML/SFML/pull/795 + rm_r(Dir["extlibs/*"] - ["extlibs/headers"]) + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{lib} + -DSFML_MISC_INSTALL_PREFIX=#{share}/SFML + -DSFML_INSTALL_PKGCONFIG_FILES=TRUE + -DSFML_BUILD_DOC=TRUE + ] + args << "-DSFML_USE_SYSTEM_DEPS=ON" if OS.linux? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "SFML/System/Time.hpp" + int main() { + sf::Time t1 = sf::milliseconds(10); + return 0; + } + CPP + + system ENV.cxx, testpath/"test.cpp", "-I#{include}", "-L#{lib}", "-lsfml-system", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sfsexp.rb b/Formula/s/sfsexp.rb new file mode 100644 index 0000000000000..cb4f0fc879e9b --- /dev/null +++ b/Formula/s/sfsexp.rb @@ -0,0 +1,65 @@ +class Sfsexp < Formula + desc "Small Fast S-Expression Library" + homepage "https://github.com/mjsottile/sfsexp" + url "https://github.com/mjsottile/sfsexp/releases/download/v1.4.1/sfsexp-1.4.1.tar.gz" + sha256 "15e9a18bb0d5c3c5093444a9003471c2d25ab611b4219ef1064f598668723681" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "309d53aff505ea3cca51ada4c8820ec0aae2f41666c750131f7d4c6ec60f80d4" + sha256 cellar: :any, arm64_sequoia: "f03b944967fd032f7538cafe2d1207790c47445922ecc8720b176ed8c1f747e9" + sha256 cellar: :any, arm64_sonoma: "5fff80561a38b1e7f175a8eb61f556abc10e9c3c9db5c1eff1babd21208a41ee" + sha256 cellar: :any, arm64_ventura: "77e62444ee703cec04f5954922c54aa32d65a02294c3a154448d8e944c004229" + sha256 cellar: :any, sonoma: "4e312aea24c7d1274a99753d578e75cfdf1a35054082e2f2524977cbdf770969" + sha256 cellar: :any, ventura: "ab57777f8d6f986c0cd673e9ee487dd7703f12f7b2b31c0747d920c78040c2e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ff705f2b247288b7ae07ea297499af24c7d7b599359c0a4eb7f3996017e2bc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38e4511f902951c709a20aab4f8c56209c45c86ddf83efe86185242a0f6adadf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + uses_from_macos "m4" => :build + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~'EOS' + #include + #include + #include + #include + + int main() { + const char *test_expr = "(test 123 (nested 456))"; + size_t len = strlen(test_expr); + + sexp_t *sx = parse_sexp((char *)test_expr, len); + + if (sx == NULL) { + fprintf(stderr, "Failed to parse S-expression\n"); + return 1; + } + + if (sx->ty != SEXP_LIST) { + fprintf(stderr, "Expected list type\n"); + destroy_sexp(sx); + return 1; + } + + // Success if we got here + destroy_sexp(sx); + printf("S-expression test passed\n"); + return 0; + } + EOS + system ENV.cc, "-I#{include}/sfsexp", "-L#{lib}", "-o", "test", "test.c", "-lsexp" + system "./test" + end +end diff --git a/Formula/s/sfst.rb b/Formula/s/sfst.rb new file mode 100644 index 0000000000000..944f6ee2aa9c6 --- /dev/null +++ b/Formula/s/sfst.rb @@ -0,0 +1,64 @@ +class Sfst < Formula + desc "Toolbox for morphological analysers and other FST-based tools" + homepage "https://www.cis.uni-muenchen.de/~schmid/tools/SFST/" + url "https://www.cis.uni-muenchen.de/~schmid/tools/SFST/data/SFST-1.4.7g.zip" + sha256 "5f3ab2d8190dc931813b5ba3cf94c72013cce7bf03e16d7fb2eda86bd99ce944" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(%r{href=.*?data/SFST[._-]v?(\d+(?:\.\d+)+[a-z]*)\.[tz]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7913420b0fd31f8a5a18276ea10f09781ad69727558f05ab053bd2a83ac1d11c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb6e8457e5e8fabb6149537221ed7e08cbba522464b29b41fe26c59b730ed34c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd33725d7517fc287408916639bafd47f925e58e979464ac214f6eb66d9a927d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "106a7c45224fb209f3f3edffe1a31e82076469489a757ee2dd5cda9c3a8923c7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0926f2435695386b9c21b31c1d4c3feaea5468095c6138e73761e8f350a3226a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "27d6b2f85647df82d36dc6f15bfe23a11430d7b1904b8d76326b069f968b5529" + sha256 cellar: :any_skip_relocation, sonoma: "9cf8a874a84091b23b6d3ac6afadbc4ec3c7f82dc1baf71f0c0470ddc4b6d317" + sha256 cellar: :any_skip_relocation, ventura: "421805971042457553e42fd13f7d635a5b0cce6ef1de9cd5cf4fd73689394e9a" + sha256 cellar: :any_skip_relocation, monterey: "68080e57fb6a26f0ce7d9bf5bde2e5d4eee3a14c311d93b9b78061e3694c7777" + sha256 cellar: :any_skip_relocation, big_sur: "9a14fa009ece100cb685321c3c253c9f41c9ce18104babbba7eeeca18f6b28df" + sha256 cellar: :any_skip_relocation, catalina: "5f9fe1fcd1a100397fa12bb046f5e7384862c168956a4a0d415bc81c58bad68a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc3eccf5f7d5e8d6c4898f86915cc6424f40dd64c41905dafbf24bb667f71b0d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "990e2d47e4f9b5b5cefcf2fb08f30f32906895f147d2d82100e46ba354df36c4" + end + + uses_from_macos "flex" => :build + + on_linux do + depends_on "readline" + end + + def install + cd "src" do + system "make" + system "make", "DESTDIR=#{prefix}/", "install" + system "make", "DESTDIR=#{share}/", "maninstall" + end + end + + test do + require "open3" + + (testpath/"foo.fst").write "Hello" + system bin/"fst-compiler", "foo.fst", "foo.a" + assert_path_exists testpath/"foo.a", "Foo.a should exist but does not!" + + Open3.popen3("#{bin}/fst-mor", "foo.a") do |stdin, stdout, _| + stdin.write("Hello") + stdin.close + expected_output = "Hello\n" + + # On Linux, the prompts are also captured in the output + expected_output = "analyze> Hello\n" + expected_output + "analyze> " if OS.linux? + + actual_output = stdout.read + assert_equal expected_output, actual_output + end + end +end diff --git a/Formula/s/sftpgo.rb b/Formula/s/sftpgo.rb new file mode 100644 index 0000000000000..4f00cebd2d791 --- /dev/null +++ b/Formula/s/sftpgo.rb @@ -0,0 +1,91 @@ +class Sftpgo < Formula + desc "Fully featured SFTP server with optional HTTP/S, FTP/S and WebDAV support" + homepage "https://sftpgo.com/" + url "https://github.com/drakkan/sftpgo/releases/download/v2.7.0/sftpgo_v2.7.0_src_with_deps.tar.xz" + sha256 "7d70361aa52857816d2c14ff8b306429476f0864a10d99d9139b6ef1a8aaa45e" + license "AGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a2c5a58f6786fa00d6088cf3aa6d4a18633f86b7c1af5111a7c720ea6982f741" + sha256 arm64_sequoia: "cfb4dfe0a2167c8a17d3639dc4075af9cab077201207bf4da95ae961b6d25205" + sha256 arm64_sonoma: "c8a8b19dadf5f89d7ad6ad1a8fcdd21e2846dc3de1cfa5791c4872dd8b5019ba" + sha256 sonoma: "2ad06c7ac8a561cc2a7db80ba4bc7854519e5dd29d06ca48b77e1dd288b9e1ff" + sha256 arm64_linux: "a2055c3947c346d8dfa56a4908da3abfdb635b12883c0ebb7439c1fa9b09a215" + sha256 x86_64_linux: "58b43409163f36ca08dfda3966147fb3b9adc9b0c2e5ca9e11bffb651a7f02ae" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + git_sha = (buildpath/"VERSION.txt").read.lines.second.strip + ldflags = %W[ + -s -w + -X github.com/drakkan/sftpgo/v2/internal/util.additionalSharedDataSearchPath=#{opt_pkgshare} + -X github.com/drakkan/sftpgo/v2/internal/version.commit=#{git_sha} + -X github.com/drakkan/sftpgo/v2/internal/version.date=#{time.iso8601} + ] + tags = %w[ + nopgxregisterdefaulttypes + disable_grpc_modules + ] + system "go", "build", *std_go_args(ldflags:, tags:) + system bin/"sftpgo", "gen", "man", "-d", man1 + + generate_completions_from_executable(bin/"sftpgo", "gen", "completion") + + inreplace "sftpgo.json" do |s| + s.gsub! "\"users_base_dir\": \"\"", "\"users_base_dir\": \"#{var}/sftpgo/data\"" + end + + pkgetc.install "sftpgo.json" + pkgshare.install "static", "templates", "openapi" + (var/"sftpgo").mkpath + (var/"sftpgo/env.d").mkpath + end + + def caveats + <<~EOS + Default data location: + + #{var}/sftpgo + + Configuration file location: + + #{pkgetc}/sftpgo.json + EOS + end + + service do + run [opt_bin/"sftpgo", "serve", "--config-file", etc/"sftpgo/sftpgo.json", "--log-file-path", + var/"sftpgo/log/sftpgo.log"] + keep_alive true + require_root true + working_dir var/"sftpgo" + end + + test do + expected_output = "ok" + http_port = free_port + sftp_port = free_port + ENV["SFTPGO_HTTPD__BINDINGS__0__PORT"] = http_port.to_s + ENV["SFTPGO_HTTPD__BINDINGS__0__ADDRESS"] = "127.0.0.1" + ENV["SFTPGO_SFTPD__BINDINGS__0__PORT"] = sftp_port.to_s + ENV["SFTPGO_SFTPD__BINDINGS__0__ADDRESS"] = "127.0.0.1" + ENV["SFTPGO_SFTPD__HOST_KEYS"] = "#{testpath}/id_ecdsa,#{testpath}/id_ed25519" + ENV["SFTPGO_LOG_FILE_PATH"] = "" + pid = fork do + exec bin/"sftpgo", "serve", "--config-file", "#{pkgetc}/sftpgo.json" + end + + sleep 5 + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{http_port}/healthz") + system "ssh-keyscan", "-p", sftp_port.to_s, "127.0.0.1" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/sgn.rb b/Formula/s/sgn.rb new file mode 100644 index 0000000000000..21d0b7ef4f360 --- /dev/null +++ b/Formula/s/sgn.rb @@ -0,0 +1,34 @@ +class Sgn < Formula + desc "Shikata ga nai (仕方がない) encoder ported into go with several improvements" + homepage "https://github.com/EgeBalci/sgn" + url "https://github.com/EgeBalci/sgn/archive/refs/tags/v2.0.1.tar.gz" + sha256 "a4ae48aa14dcf27ac8ed6850fb87fa97049062aa3152065c50a20effc0b98234" + license "MIT" + head "https://github.com/EgeBalci/sgn.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d25705bb70e377ddb7415dcbff3d61567a70f21df885d80d8ffed77253ef555d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "225b80b3fc0c69f76b2476b4ac4348d98f2fc09d6130cf9eb16bcd7057187ff5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21c4e093b393168c2c38825c5c7e5bd567fe883895bc7de5dd201a553a77ab09" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0da9903de5c67fa1ab04304476c4d87312e50ec8cecf4f63ca45adac527112e6" + sha256 cellar: :any_skip_relocation, sonoma: "4cd2918b3875487f6e2d9927e2bad5d39b09c77a7406716ac98bbc8266a60a9f" + sha256 cellar: :any_skip_relocation, ventura: "b5b2795c30c949a7772859cb74da2d499600069bd65bdd1c8c1a9137a6e9c8ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "16fb106569f1bd6fa3893f57fd84751c4f0d6df486bfefe4ede5388845b9eb06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21bd9b282190025a691793764bf3212e1f26990ece0991fbb201d2ef03043ffc" + end + + depends_on "go" => :build + depends_on "keystone" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/sgn -i #{test_fixtures("mach/a.out")} -o #{testpath}/sgn.out") + assert_match "All done \(^O^)/", output + end +end diff --git a/Formula/s/sgr.rb b/Formula/s/sgr.rb new file mode 100644 index 0000000000000..2dd47f1ef260a --- /dev/null +++ b/Formula/s/sgr.rb @@ -0,0 +1,221 @@ +class Sgr < Formula + include Language::Python::Virtualenv + + desc "Command-line client for Splitgraph, a version control system for data" + homepage "https://www.splitgraph.com/docs/sgr-advanced/getting-started/introduction" + url "https://files.pythonhosted.org/packages/dd/61/7d6cf822edb39d2426f6f185c7fc4de0ad4b80e0da3e5f50d94952795c11/splitgraph-0.3.12.tar.gz" + sha256 "76a4476002b5ac5a2b9fba36b6fcffd85b878bcc25f5aae411387e04a5532459" + license "Apache-2.0" + revision 15 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_tahoe: "6feb861ec91823ffd348ece37306331ce0e77d2e48693d09ccfa73bee0755690" + sha256 cellar: :any, arm64_sequoia: "a953b261de45aee3eb159e82e6f858a2ad51dd365ec0942e718a97cb3875968d" + sha256 cellar: :any, arm64_sonoma: "7477c83eb0a2f9d16bf2a5a716db61ccfa64ba22aa48cfb05f233da450e1e3f9" + sha256 cellar: :any, sonoma: "c17d376459bc63c361d343e4c3fac98f6f8088fa65f08a2a775344adf8adfb24" + sha256 cellar: :any_skip_relocation, arm64_linux: "1354bd840ba92237d2d9cac8d027b0482998f6f313fcb68e6fb14ffc7426ec12" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aaa9b1f0c9f2c3afe966f547ec7f72c452aa44572744999352d107106daa02f7" + end + + deprecate! date: "2025-06-21", because: :unmaintained + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libpq" # for psycopg2-binary + depends_on "openssl@3" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core rpds-py] + + # Manually update `pglast` and `ruamel-yaml` to the latest version + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "argon2-cffi" do + url "https://files.pythonhosted.org/packages/0e/89/ce5af8a7d472a67cc819d5d998aa8c82c5d860608c4db9f46f1162d7dab9/argon2_cffi-25.1.0.tar.gz" + sha256 "694ae5cc8a42f4c4e2bf2ca0e64e51e23a040c6a517a85074683d3959e1346c1" + end + + resource "argon2-cffi-bindings" do + url "https://files.pythonhosted.org/packages/b9/e9/184b8ccce6683b0aa2fbb7ba5683ea4b9c5763f1356347f1312c32e3c66e/argon2-cffi-bindings-21.2.0.tar.gz" + sha256 "bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3" + end + + resource "asciitree" do + url "https://files.pythonhosted.org/packages/2d/6a/885bc91484e1aa8f618f6f0228d76d0e67000b0fdd6090673b777e311913/asciitree-0.3.3.tar.gz" + sha256 "4aa4b9b649f85e3fcb343363d97564aa1fb62e249677f2e18a96765145cc0f6e" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/ee/2d/9cdc2b527e127b4c9db64b86647d567985940ac3698eeabc7ffaccb4ea61/chardet-4.0.0.tar.gz" + sha256 "0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" + sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" + end + + resource "click-log" do + url "https://files.pythonhosted.org/packages/32/32/228be4f971e4bd556c33d52a22682bfe318ffe57a1ddb7a546f347a90260/click-log-0.4.0.tar.gz" + sha256 "3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "inflection" do + url "https://files.pythonhosted.org/packages/e1/7e/691d061b7329bc8d54edbf0ec22fbfb2afe61facb681f9aaa9bff7a27d04/inflection-0.5.1.tar.gz" + sha256 "1a29730d366e996aaacffb2f1f1cb9593dc38e2ddd30c91250c6dde09ea9b417" + end + + resource "joblib" do + url "https://files.pythonhosted.org/packages/e8/5d/447af5ea094b9e4c4054f82e223ada074c552335b9b4b2d14bd9b35a67c4/joblib-1.5.2.tar.gz" + sha256 "3faa5c39054b2f03ca547da9b2f52fde67c06240c31853f306aea97f13647b55" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "minio" do + url "https://files.pythonhosted.org/packages/71/99/1ad8733fa3f2fa82726e470f8c321e17f9321083b234ab45ad6b59d80d9f/minio-7.2.18.tar.gz" + sha256 "173402a5716099159c5659f9de75be204ebe248557b9f1cc9cf45aa70e9d3024" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "parsimonious" do + url "https://files.pythonhosted.org/packages/02/fc/067a3f89869a41009e1a7cdfb14725f8ddd246f30f63c645e8ef8a1c56f4/parsimonious-0.8.1.tar.gz" + sha256 "3add338892d580e0cb3b1a39e4a1b427ff9f687858fdd61097053742391a9f6b" + end + + resource "pglast" do + url "https://files.pythonhosted.org/packages/cd/09/12807f704dfc3afc2bab151ead20edb6cb34a673416042f2ba5f0d6f6606/pglast-7.7.tar.gz" + sha256 "5dfbfc1fa39819643a3b915a13668e43bbd6c0b014aadf5d0b4309e860bacbb0" + end + + resource "psycopg2-binary" do + url "https://files.pythonhosted.org/packages/ac/6c/8767aaa597ba424643dc87348c6f1754dd9f48e80fdc1b9f7ca5c3a7c213/psycopg2-binary-2.9.11.tar.gz" + sha256 "b6aed9e096bf63f9e75edf2581aa9a7e7186d97ab5c177aa6c87797cd591236c" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sodapy" do + url "https://files.pythonhosted.org/packages/ad/1e/d01ef2bc1b6199edfb0d00302fe3642d61a09175dd3e78832c78301b2ab6/sodapy-2.2.0.tar.gz" + sha256 "58af376d3bb0dc3a1edc7c8cf9938f5de8f558b35e240438dd83647ac3621981" + end + + resource "splitgraph-pipelinewise-target-postgres" do + url "https://files.pythonhosted.org/packages/59/54/de6a8a2b6bdb24de8d8fd4a2465532f3523abc750af4dd9d6e5c17ce6a53/splitgraph-pipelinewise-target-postgres-2.1.0.tar.gz" + sha256 "9d100ac65288ce24a90da159bbbb06f0fdc0871c2815c63bb6417fea7df4894f" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + # Switch build-system to poetry-core to avoid rust dependency on Linux. + # Remove when merged/released: https://github.com/splitgraph/sgr/pull/813 + patch do + url "https://github.com/splitgraph/sgr/commit/234bcc12d21860852a40e78a22976ae33d2f2f57.patch?full_index=1" + sha256 "1308f9172de2268cadc7ae7521a0f109df3cdc40d60f4908d69934acb777a2d5" + end + + def install + # Fix to allow newer `pglast` + # PR ref: https://github.com/splitgraph/sgr/pull/814 + inreplace "pyproject.toml", 'version = "==3.4"', 'version = ">=3.4"' + + virtualenv_install_with_resources start_with: "setuptools" + generate_completions_from_executable(bin/"sgr", shell_parameter_format: :click) + end + + test do + sgr_status = shell_output("#{bin}/sgr cloud login --username homebrewtest --password correcthorsebattery 2>&1", 2) + assert_match "error: splitgraph.exceptions.AuthAPIError", sgr_status + assert_match version.to_s, shell_output("#{bin}/sgr --version") + end +end diff --git a/Formula/s/sh4d0wup.rb b/Formula/s/sh4d0wup.rb new file mode 100644 index 0000000000000..97dda0d10428a --- /dev/null +++ b/Formula/s/sh4d0wup.rb @@ -0,0 +1,62 @@ +class Sh4d0wup < Formula + desc "Signing-key abuse and update exploitation framework" + homepage "https://github.com/kpcyrd/sh4d0wup" + url "https://github.com/kpcyrd/sh4d0wup/archive/refs/tags/v0.11.0.tar.gz" + sha256 "cfc1c38f89d35de6a1822469679a73e5bcb7d5b9f6f8519bee1c3f2948c227f3" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "099af7350fa6b8abe3e0cdede86d930f195e06484082345a511ca64eea219b40" + sha256 cellar: :any, arm64_sequoia: "61e657e991b147d09961e7a31cb8519a0a7d5da5c7549381cc093e6c0f09b865" + sha256 cellar: :any, arm64_sonoma: "c6a718415c847755a24e462bdbfcbbfbad1c0c4c5d5346917121bb7b2b817192" + sha256 cellar: :any, arm64_ventura: "4ad860189d7456e964cb5bf9ca83d58fa42826749fe687f3b7a188df76a84cec" + sha256 cellar: :any, sonoma: "5f916dd0b4809e160f6d44f5536d4eec43f75d4dade3b3023dc0667062b73254" + sha256 cellar: :any, ventura: "88c8352a703fe178771071b45781127a76a84476104afc1ef1f7042dd0ce9ac4" + sha256 cellar: :any_skip_relocation, arm64_linux: "37e09448fc27e25b451c296e0849affe15ee491ebbbaf080756818da61bb6085" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12ed1c91190821ba799e038cb7723ce0af1ef207b45b74fcc732e8adb233d017" + end + + depends_on "llvm" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "pgpdump" => :test + + depends_on "openssl@3" + depends_on "pcsc-lite" + depends_on "xz" + depends_on "zstd" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"sh4d0wup", "completions") + end + + test do + require "utils/linkage" + + output = shell_output("#{bin}/sh4d0wup keygen tls example.com | openssl x509 -text -noout") + assert_match("DNS:example.com", output) + + output = shell_output("#{bin}/sh4d0wup keygen pgp | pgpdump") + assert_match("New: Public Key Packet", output) + + output = shell_output("#{bin}/sh4d0wup keygen ssh --type=ed25519 --bits=256 | ssh-keygen -lf -") + assert_match("no comment (ED25519)", output) + + output = shell_output("#{bin}/sh4d0wup keygen openssl --secp256k1 | openssl ec -text -noout") + assert_match("ASN1 OID: secp256k1", output) + + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"sh4d0wup", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/s/sha1dc.rb b/Formula/s/sha1dc.rb new file mode 100644 index 0000000000000..f0b5153533711 --- /dev/null +++ b/Formula/s/sha1dc.rb @@ -0,0 +1,43 @@ +class Sha1dc < Formula + desc "Tool to detect SHA-1 collisions in files, including SHAttered" + homepage "https://github.com/cr-marcstevens/sha1collisiondetection" + url "https://github.com/cr-marcstevens/sha1collisiondetection/archive/refs/tags/stable-v1.0.3.tar.gz" + sha256 "77a1c2b2a4fbe4f78de288fa4831ca63938c3cb84a73a92c79f436238bd9ac07" + license "MIT" + + # The "master" branch is unusably broken and behind the + # "simplified_c90" branch that's the basis for release. + head "https://github.com/cr-marcstevens/sha1collisiondetection.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1c950f58012467621593e85886219563b034c7967bc8fb6d5af0b3f2be4bd2ca" + sha256 cellar: :any, arm64_sequoia: "5fe1a0a2661073a77af41918596aef1fda94c415dbed1a3e7b5a4ee7332aff1b" + sha256 cellar: :any, arm64_sonoma: "9a4352024715c628f177c0585164b8fabda1c4c266e16735f406353c8c2068ce" + sha256 cellar: :any, arm64_ventura: "dbfe38e4ad0344a2fe7df59871c2193c5000fa7d013ca6d7ac101d2ade9611f7" + sha256 cellar: :any, arm64_monterey: "5b325daffed30000496e7377b980768998ec15ac1b4c481838b0eccdcfd44354" + sha256 cellar: :any, arm64_big_sur: "392a2173a9bf9a53f40edb2ef6c77a9d34ee567c9d18f405288b7b83e7fdc87b" + sha256 cellar: :any, sonoma: "278844956e65f88d768cc841e8c39059738bc406683b96ca92b9ba2871075f5f" + sha256 cellar: :any, ventura: "320528612c69085d4e283dba52d84dd5101fb2348ff15955a480c08cfe4f06d0" + sha256 cellar: :any, monterey: "8034c9dce92fc85c8f79c22f01becabacb0efed4cf40bf19ba750e8539ebed55" + sha256 cellar: :any, big_sur: "9f927c95f5b3838ba7c269a3376f52d5bc9ddea216f6cbf6d07e667fa6c1a829" + sha256 cellar: :any, catalina: "ed78939b30e385c3adeac725b9f2865d60b8c0e15e1ec75d1b6c90855dc14206" + sha256 cellar: :any_skip_relocation, arm64_linux: "e70a02cce5e9c673cd751665e913a54e3db1e67530aa702b86c3452e5d45db90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "981db3d0b2fcf5e914e1506a746dfb2bd14d83a191f268d8cdf5cb57401c0475" + end + + depends_on "coreutils" => :build # GNU install + depends_on "libtool" => :build + + def install + system "make", "INSTALL=ginstall", "PREFIX=#{prefix}", "install" + (pkgshare/"test").install Dir["test/*"] + end + + test do + assert_match "*coll*", shell_output("#{bin}/sha1dcsum #{pkgshare}/test/shattered-1.pdf") + assert_match "*coll*", shell_output("#{bin}/sha1dcsum #{pkgshare}/test/shattered-2.pdf") + assert_match "*coll*", shell_output("#{bin}/sha1dcsum_partialcoll #{pkgshare}/test/sha1_reducedsha_coll.bin") + end +end diff --git a/Formula/s/sha2.rb b/Formula/s/sha2.rb new file mode 100644 index 0000000000000..63a158b5cac91 --- /dev/null +++ b/Formula/s/sha2.rb @@ -0,0 +1,45 @@ +class Sha2 < Formula + desc "Implementation of SHA-256, SHA-384, and SHA-512 hash algorithms" + homepage "https://aarongifford.com/computers/sha.html" + url "https://aarongifford.com/computers/sha2-1.0.1.tgz" + sha256 "67bc662955c6ca2fa6a0ce372c4794ec3d0cd2c1e50b124e7a75af7e23dd1d0c" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?sha2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55b0e8d020c0e19723dac33bf78a7766ad2a9bc1fbf0ae532909fed61f9c5685" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f07e3e5d745947e51cedb4f9f9b76c8b23ad190f19f938845fecc2374e80a9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e46a846584099eb7a7db235edacf0d2c5527f19bf61f31ff21da8d76d32b79f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c81bda3e2841de58a9765ce09d13e28674da2ad2fbb746d89a5d17d08cbfa60" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7178bff489d57934b0a2cce761b9712ba24d24bb10e7f117ffa5e9c15b87e6d4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "972453a919bb7c951a9e6bb2c8d27d27db09c85ba2f3c649c29e049f19930012" + sha256 cellar: :any_skip_relocation, sonoma: "c8e46685fb2f536fe1076a0c33a86594027136fe58b9d3f98c39ecf1d4263525" + sha256 cellar: :any_skip_relocation, ventura: "91f4212fa2ed1f101b06614c3bcc52433b1f92f2e4a2bca0092e98e3c1b5f1b7" + sha256 cellar: :any_skip_relocation, monterey: "3617838db639dd063638f0ad0de96e5ecdd8bfbf087337efb7665cf55913a8e0" + sha256 cellar: :any_skip_relocation, big_sur: "b7710c8b0af7a9c0c319b2e417a63d59e7978a6a7be560e172719a8e4a9b56dc" + sha256 cellar: :any_skip_relocation, catalina: "dbcf9483f299affb674b45e9a5d6e3dbb13cc5e18d22b7fbdc6a80c22b6e4c9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "82d260e0a84cc48d8442d041c3da6305a586be869936e999a80abb4f58548849" + sha256 cellar: :any_skip_relocation, x86_64_linux: "027526015a81f4aec75269a3c104a0fab290359471f228d87f0922a788eedee0" + end + + def install + # Xcode 12 made -Wimplicit-function-declaration an error by default so we need to + # disable that warning to successfully compile: + system ENV.cc, "-o", "sha2", "-Wno-implicit-function-declaration", "sha2prog.c", "sha2.c" + system "perl", "sha2test.pl" + bin.install "sha2" + end + + test do + (testpath/"checkme.txt").write "homebrew" + output = "12c87370d1b5472793e67682596b60efe2c6038d63d04134a1a88544509737b4" + assert_match output, pipe_output("#{bin}/sha2 -q -256 #{testpath}/checkme.txt") + end +end diff --git a/Formula/s/sha3sum.rb b/Formula/s/sha3sum.rb new file mode 100644 index 0000000000000..06ab1da95aec1 --- /dev/null +++ b/Formula/s/sha3sum.rb @@ -0,0 +1,38 @@ +class Sha3sum < Formula + desc "Keccak, SHA-3, SHAKE, and RawSHAKE checksum utilities" + homepage "https://codeberg.org/maandree/sha3sum" + url "https://codeberg.org/maandree/sha3sum/archive/1.2.3.1.tar.gz" + sha256 "82c0808b11f4ba039531b22877dd68e4d870f53cae0c23b7c5d22d40312129f7" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7a4fb57d1ba121089050fc79e69725343ef7aaa39f9d5d9f4c86a6071bc81e42" + sha256 cellar: :any, arm64_sequoia: "123cc2c228d8770644c184f6e1a0da0b2e4398bbdf4aff9cc2465a5bc59ac41d" + sha256 cellar: :any, arm64_sonoma: "8d980021fa368d031ffecc790b2651fe9a8e12514527a88e5c53d58dda8d25ff" + sha256 cellar: :any, arm64_ventura: "23e518f210d7ef6d97b36328e3014fbf9c10f06b455c9f606793230ad4ce50ca" + sha256 cellar: :any, arm64_monterey: "c46d9a5c481fccbfe4b5320de6819cab08f8e645c7ce12e38297cfb62d89591c" + sha256 cellar: :any, sonoma: "ffb035e4498574c19d6532dc55150177ed9b2392d1b02f1da845dfea33f81090" + sha256 cellar: :any, ventura: "5ced828831e4a51f393fb43405c0ea20545c60499454263e1ad44daa0ccea1c9" + sha256 cellar: :any, monterey: "8c723139a1467bde4d19a713fbf48ac04b92578acc4f10a61598f3c8b1676d1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed7328e39c51349010f88510de20b85c2d85760c5c2fdaa2d03a095743317c51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b39669c216c9754961a9c54d0ffc1e96c425948823bc159da40a700a277e1404" + end + + depends_on "libkeccak" + + def install + # GNU make builtin rules specify link flags in the wrong order + # See https://codeberg.org/maandree/sha3sum/issues/2 + system "make", "--no-builtin-rules", "install", "PREFIX=#{prefix}" + inreplace "test", "./", "#{bin}/" + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test", testpath + system "./test" + end +end diff --git a/Formula/s/shaderc.rb b/Formula/s/shaderc.rb new file mode 100644 index 0000000000000..e0db47f1c6373 --- /dev/null +++ b/Formula/s/shaderc.rb @@ -0,0 +1,108 @@ +class Shaderc < Formula + desc "Collection of tools, libraries, and tests for Vulkan shader compilation" + homepage "https://github.com/google/shaderc" + license "Apache-2.0" + + stable do + url "https://github.com/google/shaderc/archive/refs/tags/v2025.4.tar.gz" + sha256 "8a89fb6612ace8954470aae004623374a8fc8b7a34a4277bee5527173b064faf" + + resource "glslang" do + # https://github.com/google/shaderc/blob/DEPS + url "https://github.com/KhronosGroup/glslang.git", + revision: "d213562e35573012b6348b2d584457c3704ac09b" + end + + resource "spirv-headers" do + # https://github.com/google/shaderc/blob/DEPS + url "https://github.com/KhronosGroup/SPIRV-Headers.git", + revision: "01e0577914a75a2569c846778c2f93aa8e6feddd" + end + + resource "spirv-tools" do + # https://github.com/google/shaderc/blob/DEPS + url "https://github.com/KhronosGroup/SPIRV-Tools.git", + revision: "19042c8921f35f7bec56b9e5c96c5f5691588ca8" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f13a92f1904a7217831b416a3e7272cf08e7c8c1599fc1cdf21538b5a49b8f06" + sha256 cellar: :any, arm64_sequoia: "a063f7f50db8978dcb52f36dae50459daa6990e5b8fa7838543301486273405b" + sha256 cellar: :any, arm64_sonoma: "d52d1ddaca69c31d353f0d023944e47d94a3563d9c17e38b110f4bfded8699d7" + sha256 cellar: :any, sonoma: "376c3d44b2ad8a48d0921004782644cd28a5d2e0a245a6da4ce63f823829829a" + sha256 cellar: :any_skip_relocation, arm64_linux: "569a4cc1839f7f218feaee7e28bce9816d5e613002959d872986e4d53c18d7a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3e1488c44b3557dad4fb152414a2a4e175e1a8a232fb7be87ffffff770213e5" + end + + head do + url "https://github.com/google/shaderc.git", branch: "main" + + resource "glslang" do + url "https://github.com/KhronosGroup/glslang.git", branch: "main" + end + + resource "spirv-tools" do + url "https://github.com/KhronosGroup/SPIRV-Tools.git", branch: "main" + end + + resource "spirv-headers" do + url "https://github.com/KhronosGroup/SPIRV-Headers.git", branch: "main" + end + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + + # patch to fix `target "SPIRV-Tools-opt" that is not in any export set` + # upstream bug report, https://github.com/google/shaderc/issues/1413 + patch :DATA + + def install + resources.each do |res| + res.stage(buildpath/"third_party"/res.name) + end + + # Avoid installing packages that conflict with other formulae. + inreplace "third_party/CMakeLists.txt", "${SHADERC_SKIP_INSTALL}", "ON" + system "cmake", "-S", ".", "-B", "build", + "-DSHADERC_SKIP_TESTS=ON", + "-DSKIP_GLSLANG_INSTALL=ON", + "-DSKIP_SPIRV_TOOLS_INSTALL=ON", + "-DSKIP_GOOGLETEST_INSTALL=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + int version; + shaderc_profile profile; + if (!shaderc_parse_version_profile("450core", &version, &profile)) + return 1; + return (profile == shaderc_profile_core) ? 0 : 1; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{include}", + "-L#{lib}", "-lshaderc_shared" + system "./test" + end +end + +__END__ +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index d44f62a..dffac6a 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -87,7 +87,6 @@ if (NOT TARGET glslang) + # Glslang tests are off by default. Turn them on if testing Shaderc. + set(GLSLANG_TESTS ON) + endif() +- set(GLSLANG_ENABLE_INSTALL $) + add_subdirectory(${SHADERC_GLSLANG_DIR} glslang) + endif() + if (NOT TARGET glslang) diff --git a/Formula/s/shadowenv.rb b/Formula/s/shadowenv.rb new file mode 100644 index 0000000000000..fe1048fbcc355 --- /dev/null +++ b/Formula/s/shadowenv.rb @@ -0,0 +1,67 @@ +class Shadowenv < Formula + desc "Reversible directory-local environment variable manipulations" + homepage "https://shopify.github.io/shadowenv/" + url "https://github.com/Shopify/shadowenv/archive/refs/tags/3.4.0.tar.gz" + sha256 "86313a5022a8e897ceb52a51479fa7a921e44cd520cf04d111ba711684791e44" + license "MIT" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1ce2a7c3bad03bb0798f59c7782b7fa6fe6c38f5d991dfb9d907f773a69c961a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d2aeaff45d8dd8a42113407ce00768bd7925e0214cdac6562c1a1f1e5af1616" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c96fa5cb66fc2db8280097794a11ef34351bba72ad5284b552493879ff6356aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae5065cfb3bb80e396751f4f0903ab6fbea194f2d0eee8dcd1a557bd52b7faec" + sha256 cellar: :any_skip_relocation, sonoma: "19445eb6965c036e799b4e1a0e399cd91068ea9a3a85855f7c35ab219f4a3f15" + sha256 cellar: :any_skip_relocation, ventura: "bfa5569c762df9706807c63795c6e6910beb8cbf84dd08df97755355346ee6ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "52b23d1a232c2a1cf69554ea10cb6081430df4d13b7e28b64dd99ba0d306cb49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec2f689ad3587af4989c921782c112a7f222816d4b6e258c4f72232c0479b54a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + man1.install "#{buildpath}/man/man1/shadowenv.1" + man5.install "#{buildpath}/man/man5/shadowlisp.5" + end + + test do + expected_output = <<~EOM + EXAMPLE: + EXAMPLE2:b + EXAMPLE3:b + EXAMPLE_PATH:a:b:d + --- + EXAMPLE:a + EXAMPLE2: + EXAMPLE3:a + EXAMPLE_PATH:c:d + EOM + environment = "export EXAMPLE2=b EXAMPLE3=b EXAMPLE_PATH=a:b:d;" + hash = "1256a7c3de15e864" + data = { + "scalars" => [ + { "name" => "EXAMPLE2", "original" => nil, "current" => "b" }, + { "name" => "EXAMPLE", "original" => "a", "current" => nil }, + { "name" => "EXAMPLE3", "original" => "a", "current" => "b" }, + ], + "lists" => [ + { "name" => "EXAMPLE_PATH", "additions" => ["b", "a"], "deletions" => ["c"] }, + ], + } + # Read ...'\"'\"'... on the next line as a ruby `...' + "'" + '...` but for bash + shadowenv_cmd = "export __shadowenv_data='\"'\"'#{hash}:#{data.to_json}'\"'\"'; #{bin}/shadowenv hook" + print_vars = + "echo EXAMPLE:$EXAMPLE; echo EXAMPLE2:$EXAMPLE2; echo EXAMPLE3:$EXAMPLE3; echo EXAMPLE_PATH:$EXAMPLE_PATH;" + + assert_equal expected_output, + shell_output("bash -c '#{environment} #{print_vars} echo ---; eval \"$(#{shadowenv_cmd})\"; #{print_vars}'") + end +end diff --git a/Formula/s/shadowsocks-libev.rb b/Formula/s/shadowsocks-libev.rb new file mode 100644 index 0000000000000..8d921760c6d7f --- /dev/null +++ b/Formula/s/shadowsocks-libev.rb @@ -0,0 +1,100 @@ +class ShadowsocksLibev < Formula + desc "Libev port of shadowsocks" + homepage "https://github.com/shadowsocks/shadowsocks-libev" + url "https://github.com/shadowsocks/shadowsocks-libev/releases/download/v3.3.5/shadowsocks-libev-3.3.5.tar.gz" + sha256 "cfc8eded35360f4b67e18dc447b0c00cddb29cc57a3cec48b135e5fb87433488" + license "GPL-3.0-or-later" + revision 5 + + bottle do + sha256 cellar: :any, arm64_tahoe: "613c265dfbdb7f3686e9b5d533aa4993ec78fd5772c44a8872ed76094b5a8a03" + sha256 cellar: :any, arm64_sequoia: "1634eda3b34216de2f4208756ef79a7a3cf9dd92aed1efe90657f069ad25f95c" + sha256 cellar: :any, arm64_sonoma: "36afad86fca33908c9f81c18511aa4d59f6114e4dc85b66735eb1450bfec79bf" + sha256 cellar: :any, arm64_ventura: "c56ecc0ed12edf94c2f375ce6cbb0b878501dbf7696cd223211a095f84b362d7" + sha256 cellar: :any, arm64_monterey: "5baa9ccd2a55ca92f1951b7c25839b6dd4b0fc9a1cf9a3f7238a1f7f7b6ed5b5" + sha256 cellar: :any, sonoma: "089044be226fa8913cea75aa91e488c9b0a4a20bdab101c53bcf73629b912a39" + sha256 cellar: :any, ventura: "64e0226723e4b01a528bd151671bf72cd53cb620821f7db372a1776eea430cf3" + sha256 cellar: :any, monterey: "3f8d3f710752c395800db2d8805d126c67a4ea63665ce24eb8f4d562d3f139ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "b81d13f1ecbfacb40446d83b12acf298aaeaa326d06c15aaab11606848c87d9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "707c0ff929995f51fd54807d4a569a754173288596df027fd49290021a25a1a0" + end + + head do + url "https://github.com/shadowsocks/shadowsocks-libev.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # From GitHub page: + # Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust + # + # Unmerged dependency update PRs: + # * MbedTLS 3: https://github.com/shadowsocks/shadowsocks-libev/pull/2999 + # * PCRE2: https://github.com/shadowsocks/shadowsocks-libev/pull/1792 + deprecate! date: "2024-12-31", because: "uses deprecated `mbedtls@2`" + + depends_on "asciidoc" => :build + depends_on "xmlto" => :build + depends_on "c-ares" + depends_on "libev" + depends_on "libsodium" + depends_on "mbedtls@2" + depends_on "pcre" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "./autogen.sh" if build.head? + + system "./configure", "--prefix=#{prefix}" + system "make" + + (buildpath/"shadowsocks-libev.json").write <<~JSON + { + "server":"localhost", + "server_port":8388, + "local_port":1080, + "password":"barfoo!", + "timeout":600, + "method":null + } + JSON + etc.install "shadowsocks-libev.json" + + system "make", "install" + end + + service do + run [opt_bin/"ss-local", "-c", etc/"shadowsocks-libev.json"] + keep_alive true + end + + test do + server_port = free_port + local_port = free_port + + (testpath/"shadowsocks-libev.json").write <<~JSON + { + "server":"127.0.0.1", + "server_port":#{server_port}, + "local":"127.0.0.1", + "local_port":#{local_port}, + "password":"test", + "timeout":600, + "method":null + } + JSON + server = fork { exec bin/"ss-server", "-c", testpath/"shadowsocks-libev.json" } + client = fork { exec bin/"ss-local", "-c", testpath/"shadowsocks-libev.json" } + sleep 3 + begin + system "curl", "--socks5", "127.0.0.1:#{local_port}", "github.com" + ensure + Process.kill 9, server + Process.wait server + Process.kill 9, client + Process.wait client + end + end +end diff --git a/Formula/s/shadowsocks-rust.rb b/Formula/s/shadowsocks-rust.rb new file mode 100644 index 0000000000000..e0e35f997de9b --- /dev/null +++ b/Formula/s/shadowsocks-rust.rb @@ -0,0 +1,56 @@ +class ShadowsocksRust < Formula + desc "Rust port of Shadowsocks" + homepage "https://shadowsocks.org/" + url "https://github.com/shadowsocks/shadowsocks-rust/archive/refs/tags/v1.23.5.tar.gz" + sha256 "edeef2408ae54108fa176b4e59cb04b4ef4dbe62da96d2459d9821b238ad94e8" + license "MIT" + head "https://github.com/shadowsocks/shadowsocks-rust.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ee428e1d6ec993e276efe22aec56553241c4bc9a7ab6071a7e0d4a7ba71e420b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a7a3a6ca29c4afa2f45aedb6f8a8f9983a925aaf103838c15af1dc770c2d3c0a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa9a9ed4b756fabd04e3f9fe269d6fe7ee9ce6f6ae4a3a42bc1d2b158a4d7186" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4db66def22361a5f568000c15674dbc1bd00304a3e9b27ce67db33411f9f8e9" + sha256 cellar: :any_skip_relocation, sonoma: "184744a4da16f787ad1a3335474b3ed2b517172739caad30dee17ae049ac287c" + sha256 cellar: :any_skip_relocation, ventura: "4942ab0d7e494eb5b455fdaea942c5d06f8e8280c5e3664723b37b6870dc5240" + sha256 cellar: :any_skip_relocation, arm64_linux: "a367e4bbecf5fd29c4af66d5162dad2e4887623f57a70dac256b7f890b7174b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "565f715f503e3ff45ead18a44bf9a8ce518e90d18452d6f893da2cd761c60be7" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + server_port = free_port + local_port = free_port + + (testpath/"server.json").write <<~JSON + { + "server":"127.0.0.1", + "server_port":#{server_port}, + "password":"mypassword", + "method":"aes-256-gcm" + } + JSON + (testpath/"local.json").write <<~JSON + { + "server":"127.0.0.1", + "server_port":#{server_port}, + "password":"mypassword", + "method":"aes-256-gcm", + "local_address":"127.0.0.1", + "local_port":#{local_port} + } + JSON + fork { exec bin/"ssserver", "-c", testpath/"server.json" } + fork { exec bin/"sslocal", "-c", testpath/"local.json" } + sleep 3 + sleep 3 if OS.mac? && Hardware::CPU.intel? + + output = shell_output "curl --socks5 127.0.0.1:#{local_port} https://example.com" + assert_match "Example Domain", output + end +end diff --git a/Formula/s/shairport-sync.rb b/Formula/s/shairport-sync.rb new file mode 100644 index 0000000000000..266fde105a782 --- /dev/null +++ b/Formula/s/shairport-sync.rb @@ -0,0 +1,78 @@ +class ShairportSync < Formula + desc "AirTunes emulator that adds multi-room capability" + homepage "https://github.com/mikebrady/shairport-sync" + url "https://github.com/mikebrady/shairport-sync/archive/refs/tags/4.3.7.tar.gz" + sha256 "a1242d100b61fe1fffbbf706e919ed51d6a341c9fb8293fb42046e32ae2b3338" + license "MIT" + revision 1 + head "https://github.com/mikebrady/shairport-sync.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "4acb51abb40b8bb8bdc9d0b73c9aa010965617fa30ec60e760d4a0c91bfbe318" + sha256 arm64_sequoia: "7545247fdb0c6f1d073bb20d3bc89304637ee0d57cee66e725e1ee32549dd1ae" + sha256 arm64_sonoma: "21a738ff972c71852726ef8073116fb6e77db042d92a4846b9aee123af0f5ff8" + sha256 arm64_ventura: "1cb4522df509d78bc574c27a8d668b6bf639dcb0e6a68d015b8e93205c1c0ac3" + sha256 sonoma: "a61879e3ed9398bd9683ad8851d54db9c49a0bdf701cf5b58b6bc79f101ed553" + sha256 ventura: "eea7570e9fcc832b79f410bb906dac1fadb920deca94edb3d81f74544e48acb4" + sha256 arm64_linux: "69d9c8f3540f793214bbc3e9bbf61b39b5b4caa3bcd7c5c17a958ab7eb599164" + sha256 x86_64_linux: "5098428e618dec3360e3cb5ede3eaec09611ff3cc27596fc9a9fc2a737917bf5" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libao" + depends_on "libconfig" + depends_on "libdaemon" + depends_on "libsoxr" + depends_on "openssl@3" + depends_on "popt" + depends_on "pulseaudio" + + def install + system "autoreconf", "--force", "--install", "--verbose" + args = %W[ + --with-libdaemon + --with-ssl=openssl + --with-ao + --with-stdout + --with-pa + --with-pipe + --with-soxr + --with-metadata + --with-piddir=#{var}/run + --sysconfdir=#{etc}/shairport-sync + ] + if OS.mac? + args << "--with-dns_sd" # Enable bonjour + args << "--with-os=darwin" + end + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def post_install + (var/"run").mkpath + end + + service do + run [opt_bin/"shairport-sync", "--use-stderr", "--verbose"] + keep_alive true + log_path var/"log/shairport-sync.log" + error_log_path var/"log/shairport-sync.log" + end + + test do + output = shell_output("#{bin}/shairport-sync -V") + if OS.mac? + assert_match "libdaemon-OpenSSL-dns_sd-ao-pa-stdout-pipe-soxr-metadata", output + else + assert_match "OpenSSL-ao-pa-stdout-pipe-soxr-metadata-sysconfdir", output + end + end +end diff --git a/Formula/s/shallow-backup.rb b/Formula/s/shallow-backup.rb new file mode 100644 index 0000000000000..b31f4cd097370 --- /dev/null +++ b/Formula/s/shallow-backup.rb @@ -0,0 +1,94 @@ +class ShallowBackup < Formula + include Language::Python::Virtualenv + + desc "Git-integrated backup tool for macOS and Linux devs" + homepage "https://github.com/alichtman/shallow-backup" + url "https://files.pythonhosted.org/packages/d0/56/427960ea933c35b43b561d8f1379d4f7794b67f785ec3137adaf6ce5073e/shallow_backup-6.4.tar.gz" + sha256 "b933d19d7238d04eb1bf3943078ee74933dbe6faf2d5b503a865242d0d6bd2e6" + license "MIT" + head "https://github.com/alichtman/shallow-backup.git", branch: "main" + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "797ae0a4c0401a17cf0f0c11c4d709361fbe99b5c3c08fda31000fda397c9eed" + end + + depends_on "python@3.14" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/7c/51/a72df7730aa34a94bc43cebecb7b63ffa42f019868637dbeb45e0620d26e/blessed-1.22.0.tar.gz" + sha256 "1818efb7c10015478286f21a412fcdd31a3d8b94a18f6d926e733827da7a844b" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "editor" do + url "https://files.pythonhosted.org/packages/2a/92/734a4ab345914259cb6146fd36512608ea42be16195375c379046f33283d/editor-1.6.6.tar.gz" + sha256 "bb6989e872638cd119db9a4fce284cd8e13c553886a1c044c6b8d8a160c871f8" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "inquirer" do + url "https://files.pythonhosted.org/packages/c1/79/165579fdcd3c2439503732ae76394bf77f5542f3dd18135b60e808e4813c/inquirer-3.4.1.tar.gz" + sha256 "60d169fddffe297e2f8ad54ab33698249ccfc3fc377dafb1e5cf01a0efb9cbe5" + end + + resource "readchar" do + url "https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz" + sha256 "91ce3faf07688de14d800592951e5575e9c7a3213738ed01d394dcc949b79adb" + end + + resource "runs" do + url "https://files.pythonhosted.org/packages/26/6d/b9aace390f62db5d7d2c77eafce3d42774f27f1829d24fa9b6f598b3ef71/runs-1.2.2.tar.gz" + sha256 "9dc1815e2895cfb3a48317b173b9f1eac9ba5549b36a847b5cc60c3bf82ecef1" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "xmod" do + url "https://files.pythonhosted.org/packages/72/b2/e3edc608823348e628a919e1d7129e641997afadd946febdd704aecc5881/xmod-1.8.1.tar.gz" + sha256 "38c76486b9d672c546d57d8035df0beb7f4a9b088bc3fb2de5431ae821444377" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"shallow-backup", shell_parameter_format: :click) + end + + test do + # Creates a config file and adds a test file to it + # There is colour in stdout, hence there are ANSI escape codes + test_config = testpath/".config/shallow-backup.json" + assert_equal "\e[34m\e[1mCreating config file at: \e[22m#{test_config}\e[0m\n" \ + "\e[34m\e[1mAdded: \e[22m#{test_fixtures("test.svg")}\e[0m", + shell_output("#{bin}/shallow-backup --add-dot #{test_fixtures("test.svg")}").strip + + assert_match version.to_s, shell_output("#{bin}/shallow-backup --version") + end +end diff --git a/Formula/s/shamrock.rb b/Formula/s/shamrock.rb new file mode 100644 index 0000000000000..e1ff784d5db47 --- /dev/null +++ b/Formula/s/shamrock.rb @@ -0,0 +1,83 @@ +class Shamrock < Formula + desc "Astrophysical hydrodynamics using SYCL" + homepage "https://github.com/Shamrock-code/Shamrock" + url "https://github.com/Shamrock-code/Shamrock/releases/download/v2025.10.0/shamrock-2025.10.0.tar" + sha256 "72683352d862d7b3d39568151a17ea78633bd4976a40eacb77098d3ef0ca3c55" + license "CECILL-2.1" + head "https://github.com/Shamrock-code/Shamrock.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "7c1186e99fc8c0f9a7a3d24ad1a567af9d51ea1d21ef1388061176c1835c3846" + sha256 arm64_sequoia: "7d9a8431163d090cb87f372c902668d6ad63c10b59007649c08bab964537927e" + sha256 arm64_sonoma: "7cb215b578f001046d215348af3e62be75c4c54e934cb4e1f77d0297fe0384e7" + sha256 sonoma: "aa62daa6853bf1198dc5798050c244f3e46fff90263191c6a7711f3b90d2f366" + sha256 arm64_linux: "beac32843e9741cdb0b49c9eeff5596e839529bd72d41e15a9d2590120346437" + sha256 x86_64_linux: "147df51883fc38480ad75d1c4ae774a6d65b4fcaf301c4cbae61ca2b65fc2af9" + end + + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "nlohmann-json" => :build + depends_on "pybind11" => :build + depends_on "adaptivecpp" + depends_on "boost" + depends_on "open-mpi" + depends_on "python@3.14" + + on_macos do + depends_on "libomp" + end + + def python + which("python3.14") + end + + def site_packages(python) + prefix/Language::Python.site_packages(python) + end + + def install + rm_r(%w[ + external/fmt + external/nlohmann_json + external/pybind11 + ]) + + args = %W[ + -DSHAMROCK_ENABLE_BACKEND=SYCL + -DPYTHON_EXECUTABLE=#{python} + -DSYCL_IMPLEMENTATION=ACPPDirect + -DCMAKE_CXX_COMPILER=acpp + -DACPP_PATH=#{Formula["adaptivecpp"].opt_prefix} + -DSHAMROCK_EXTERNAL_FMTLIB=ON + -DSHAMROCK_EXTERNAL_JSON=ON + -DSHAMROCK_EXTERNAL_PYBIND11=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + py_package = site_packages(python).join("shamrock") + + mkdir_p py_package + cp_r Dir["build/*.so"], py_package + + (py_package/"__init__.py").write <<~PY + from .shamrock import * + PY + end + + test do + system bin/"shamrock", "--help" + system bin/"shamrock", "--smi" + system "mpirun", "-n", "1", bin/"shamrock", "--smi", "--sycl-cfg", "auto:OpenMP" + (testpath/"test.py").write <<~PY + import shamrock + shamrock.change_loglevel(125) + shamrock.sys.init('0:0') + shamrock.sys.close() + PY + system python, testpath/"test.py" + end +end diff --git a/Formula/s/shapelib.rb b/Formula/s/shapelib.rb new file mode 100644 index 0000000000000..afb62f4da580d --- /dev/null +++ b/Formula/s/shapelib.rb @@ -0,0 +1,35 @@ +class Shapelib < Formula + desc "Library for reading and writing ArcView Shapefiles" + homepage "http://shapelib.maptools.org/" + url "https://download.osgeo.org/shapelib/shapelib-1.6.2.tar.gz" + sha256 "4b74a36ced94e9a7bea401157e664addcc5be251e7df7f88d4674361da012c21" + license any_of: ["LGPL-2.0-or-later", "MIT"] + + livecheck do + url "https://download.osgeo.org/shapelib/" + regex(/href=.*?shapelib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "43e91ffabf78719346ced0f39b03e619806a4df62f1c872cadfbc95c84effd45" + sha256 cellar: :any, arm64_sequoia: "0489e4dc040f5fef2420fef08f1e016227edcda188b77097cf547275694a8cdc" + sha256 cellar: :any, arm64_sonoma: "a42ed3ca35bcacb6ec172188e5c48864b024dd0a9f4d190e1a4398626d2d3b8b" + sha256 cellar: :any, sonoma: "e7902a25697c5b22aeaa03c3719d00b420c7c91ee7fae2be217f9a33e9b9c0bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2897817454fdedab4d9c78ce7b521265aa16af4c89d2c614dacdf429a1eb143" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77c2e0458eafac06eae035aa3b82151a84c6a00bd3e1cdab4fc77d08ce7a47ab" + end + + depends_on "cmake" => :build + + def install + # shapelib's CMake scripts interpret `CMAKE_INSTALL_LIBDIR=lib` as relative + # to the current directory, i.e. `CMAKE_INSTALL_LIBDIR:PATH=$(pwd)/lib` + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args(install_libdir: lib) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "shp_file", shell_output("#{bin}/shptreedump", 1) + end +end diff --git a/Formula/s/shared-mime-info.rb b/Formula/s/shared-mime-info.rb new file mode 100644 index 0000000000000..98e1628b56ba1 --- /dev/null +++ b/Formula/s/shared-mime-info.rb @@ -0,0 +1,74 @@ +class SharedMimeInfo < Formula + desc "Database of common MIME types" + homepage "https://wiki.freedesktop.org/www/Software/shared-mime-info" + url "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/2.4/shared-mime-info-2.4.tar.bz2" + sha256 "32dc32ae39ff1c1bf8434dd3b36770b48538a1772bc0298509d034f057005992" + license "GPL-2.0-only" + head "https://gitlab.freedesktop.org/xdg/shared-mime-info.git", branch: "master" + + livecheck do + url "https://gitlab.freedesktop.org/api/v4/projects/1205/releases" + regex(/^(?:Release[._-])?v?(\d+(?:[.-]\d+)+)$/i) + strategy :json do |json, regex| + json.map { |item| item["tag_name"]&.[](regex, 1)&.tr("-", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "634a2d63c5004f785c5186faab2930fed9ab42ab3bf7668c57f66c9d8f4d059d" + sha256 cellar: :any, arm64_sequoia: "7feb34ce6afb650a39b05fd0dfd75225b659123ae42ce571076eaf2d640c8232" + sha256 cellar: :any, arm64_sonoma: "a8235d09d748ebe4c84a0aebdb57c33cd030334050bc9bf4efd57a5f732780d8" + sha256 cellar: :any, arm64_ventura: "887f26165f0917b9ff0e72f0fe15facb37402df8209d98433358d631a482e7ec" + sha256 cellar: :any, sonoma: "6ac3353108a294266ac4769c90c06f28f73ad1bee527869fbb5a96414ffe136f" + sha256 cellar: :any, ventura: "a58ae3ada921d8b224fd9c0c0ca992ea6c71cfadb99c1d87dd21a94aa26580c7" + sha256 arm64_linux: "8785de2e5e75756fba7ad4d6c686ed6cdc43047124f7f63c373cdd5a131853c4" + sha256 x86_64_linux: "d657dadf099a3aea5f7fbdb74310d7f973f551ac62555a8f5699cd6a02642ce7" + end + + depends_on "gettext" => :build + depends_on "itstool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + depends_on "glib" + + uses_from_macos "libxml2" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + # Disable the post-install update-mimedb due to crash + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install share/"mime/packages" + rm_r(share/"mime") if (share/"mime").exist? + end + + def post_install + global_mime = HOMEBREW_PREFIX/"share/mime" + cellar_mime = share/"mime" + + # Remove bad links created by old libheif postinstall + rm_r(global_mime) if global_mime.symlink? + + rm_r(cellar_mime) if cellar_mime.exist? && !cellar_mime.symlink? + ln_sf(global_mime, cellar_mime) + + (global_mime/"packages").mkpath + cp (pkgshare/"packages").children, global_mime/"packages" + + system bin/"update-mime-database", global_mime + end + + test do + ENV["XDG_DATA_HOME"] = testpath + + cp_r share/"mime", testpath + system bin/"update-mime-database", testpath/"mime" + end +end diff --git a/Formula/s/shc.rb b/Formula/s/shc.rb new file mode 100644 index 0000000000000..218d2b45be30c --- /dev/null +++ b/Formula/s/shc.rb @@ -0,0 +1,42 @@ +class Shc < Formula + desc "Shell Script Compiler" + homepage "https://neurobin.github.io/shc" + url "https://github.com/neurobin/shc/archive/refs/tags/4.0.3.tar.gz" + sha256 "7d7fa6a9f5f53d607ab851d739ae3d3b99ca86e2cb1425a6cab9299f673aee16" + license "GPL-3.0-or-later" + head "https://github.com/neurobin/shc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6761e8e367e12be8e6c775517cf9799ea7633944000c130ed26e32df8ebbc6f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "280ac078e9ec3e7fd245942e1b6d141288fec51877aa5d032e57ce8403d24a8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0e1db3eca184dfad518ba0f0ab5a1d4c66f34aca3097f44610a5471882ca311" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d30b347144b581af9b318135d285030075c9e00df94728b8e1430b7fa69606f1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e84ca021ebfbeaa652c74a9e07b3eddfc390c4193f64effdd93d835958d7e90c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fd153e413029832fb17b013fb15d43aab1e1e22b618d58c768a049ac31e0759c" + sha256 cellar: :any_skip_relocation, sonoma: "986e78b01d80d0b0299147bc07ae137cfae98ccf26468cac072e60d1aab25460" + sha256 cellar: :any_skip_relocation, ventura: "b08711bc5713b2cafa6ae423220b9f6f7046d2c2a4aa3d0c9d88104b6f64a8b6" + sha256 cellar: :any_skip_relocation, monterey: "8896b46bb8b312f24f98ae842c8edb5c7ba1321c21f9441c32c8218a15c596c9" + sha256 cellar: :any_skip_relocation, big_sur: "3866195be89821e424dca28e390d36060ad52be9030677498a300e39b7ece548" + sha256 cellar: :any_skip_relocation, catalina: "cdfc62c7d9bd39ed7e956066f8d55a189c58b185b6abf7e45b5d8c63a6abe2d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f215d4f82dede86a688d3924fb39a447b87159ab534b336971f2741b7989cfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a659b8f040806dcf7303f42a3cc50eb61acf894c9d2066acefd897dc71f1452" + end + + def install + system "./configure", *std_configure_args + system "make", "install", "prefix=#{prefix}" + pkgshare.install "test" + end + + test do + (testpath/"test.sh").write <<~SH + #!/bin/sh + echo hello + exit 0 + SH + system bin/"shc", "-f", "test.sh", "-o", "test" + assert_equal "hello", shell_output("./test").chomp + end +end diff --git a/Formula/s/sheldon.rb b/Formula/s/sheldon.rb new file mode 100644 index 0000000000000..1ca60372b29f0 --- /dev/null +++ b/Formula/s/sheldon.rb @@ -0,0 +1,64 @@ +class Sheldon < Formula + desc "Fast, configurable, shell plugin manager" + homepage "https://sheldon.cli.rs" + url "https://github.com/rossmacarthur/sheldon/archive/refs/tags/0.8.5.tar.gz" + sha256 "a32e181667ec8bf235f0c50f2671d3c0d78fbdd7502a61e2f88c7deacb534b20" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rossmacarthur/sheldon.git", branch: "trunk" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4c847c1f57dab67c08f0b2bc28b2682ec8e82944693c08c9456a61faee416790" + sha256 cellar: :any, arm64_sequoia: "f414fb4134ef81cfa8b07da7a4071cd74cedfd6201f6c9ca39cefb77bba18c73" + sha256 cellar: :any, arm64_sonoma: "7a2039f892bde698a45c4b4ddd4e4b01a68a800a78a25b6d264473114fb93953" + sha256 cellar: :any, arm64_ventura: "db70e3bf9291543f442ef03f071c5e7f3a321022f74315a7ae2947f1d474239c" + sha256 cellar: :any, sonoma: "28e543aab665bd00bb249abdcc40b062f96a8305046136720772ec2d22afc55d" + sha256 cellar: :any, ventura: "e90fbe293693000084e563baf7af705d5fe82398340d90a7cf5079cc2d5a3f66" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bb36c6d20e44524167470f658d6bf79dff452c6f2ca3470900d56c545f86724" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f589b7843646d3253cfc607b0169a416a0017125e5b602b5daa82dab7fc8796" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + depends_on "libssh2" + depends_on "openssl@3" + + # curl-config on ventura builds do not report http2 feature, + # see discussions in https://github.com/Homebrew/homebrew-core/pull/197727 + # FIXME: We should be able to use macOS curl on Ventura, but `curl-config` is broken. + uses_from_macos "curl", since: :sonoma + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + # Ensure the correct `openssl` will be picked up. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", "--no-default-features", *std_cargo_args + + bash_completion.install "completions/sheldon.bash" => "sheldon" + zsh_completion.install "completions/sheldon.zsh" => "_sheldon" + end + + test do + require "utils/linkage" + + touch testpath/"plugins.toml" + system bin/"sheldon", "--config-dir", testpath, "--data-dir", testpath, "lock" + assert_path_exists testpath/"plugins.lock" + + libraries = [ + Formula["libgit2"].opt_lib/shared_library("libgit2"), + Formula["libssh2"].opt_lib/shared_library("libssh2"), + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ] + libraries << (Formula["curl"].opt_lib/shared_library("libcurl")) if OS.linux? + + libraries.each do |library| + assert Utils.binary_linked_to_library?(bin/"sheldon", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/s/shell2http.rb b/Formula/s/shell2http.rb new file mode 100644 index 0000000000000..d8f10e37489c7 --- /dev/null +++ b/Formula/s/shell2http.rb @@ -0,0 +1,46 @@ +class Shell2http < Formula + desc "Executing shell commands via HTTP server" + homepage "https://github.com/msoap/shell2http" + url "https://github.com/msoap/shell2http/archive/refs/tags/v1.17.0.tar.gz" + sha256 "17fab67e34e767accfbc59ab504971c704f54d79b57a023e6b5efa5556994624" + license "MIT" + head "https://github.com/msoap/shell2http.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b7d891d7aad7d3bb6410d9445a870e44ecc7c72e4cb0c121ce4151342b5f9431" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ee45c057aa5fb32f6c703e739af6a0bc6008541877f6a22cd6ee5d99b820e510" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5aa3b3d987491267e475439e28ed32236b3a5983ac224f037ba5252b0857406" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7cebeaf54ec1a81eccdaa79a135b6fa47402af330ef4011785fa813ddb4ceb12" + sha256 cellar: :any_skip_relocation, arm64_monterey: "14b86f0bd62e111c795277d5b02a09960759be90f5a6aaa745e2546ac8270a4b" + sha256 cellar: :any_skip_relocation, sonoma: "22c0f297ed31f96042fbd408d4fc53deb7e4a257fc9e00d5c24892419e10eb0f" + sha256 cellar: :any_skip_relocation, ventura: "b2664cf38188a0fab8f22804a6b82e9058e88b75d7ce2b4226c912885bfdf435" + sha256 cellar: :any_skip_relocation, monterey: "9ec711d670e18409cff61b8d40c06031c1990f13ef845d41fbedcdb22619a219" + sha256 cellar: :any_skip_relocation, arm64_linux: "32a34cd43f452b6b9f97694d7de6374f86e0cc729e1eeaabbd503677a05a4065" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2924860684928b8e326d3298c72c447dbae5f7a7ab259e71bcf45e7906568ef4" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + man1.install "shell2http.1" + end + + test do + port = free_port + pid = fork do + exec bin/"shell2http", "-port", port.to_s, "/echo", "echo brewtest" + end + sleep 1 + output = shell_output("curl -s http://localhost:#{port}") + assert_match "Served by shell2http/#{version}", output + + output = shell_output("curl -s http://localhost:#{port}/echo") + assert_match "brewtest", output + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/shellcheck.rb b/Formula/s/shellcheck.rb new file mode 100644 index 0000000000000..0f15ac4c307d3 --- /dev/null +++ b/Formula/s/shellcheck.rb @@ -0,0 +1,44 @@ +class Shellcheck < Formula + desc "Static analysis and lint tool, for (ba)sh scripts" + homepage "https://www.shellcheck.net/" + url "https://github.com/koalaman/shellcheck/archive/refs/tags/v0.11.0.tar.gz" + sha256 "8b07554f92e4fbfc33f1539a1f475f21c6503ceae8f806efcc518b1f529f7102" + license "GPL-3.0-or-later" + head "https://github.com/koalaman/shellcheck.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a8c12e69512ed369ded8a58cfb81c8d42eea53d8ac51119fe3f83e050e6a6f4d" + sha256 cellar: :any, arm64_sequoia: "8cba28650eef6739b81380743c58c323a8846c6ff1cf6fd730e434b945244e5c" + sha256 cellar: :any, arm64_sonoma: "606603b04a41787ecbafc31c4e769e190719e9a24fdd3fc181e7f10ac92cbd17" + sha256 cellar: :any, arm64_ventura: "55dc4f40dd13d13d1075910cf0791344f3d9018d04d6fe5c1686710829354d10" + sha256 cellar: :any, sonoma: "3608bc5b421ad7cd939f3a8e3268a3c8f6369948ed555afb9d269134a0bfabe6" + sha256 cellar: :any, ventura: "31533a851f7dbc8a808a0787dccd80ce0a22e30c099b49e5d588ec555b3d0d93" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b6289eca1e028a336e6090a7ab42efb47993c51194941c43fbe7d156f9f4270" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e84559495ee8f9719be30a9d8139a3016d2f448d31fc79ac4d135ab86a228404" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "pandoc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + system "./manpage" + man1.install "shellcheck.1" + end + + test do + sh = testpath/"test.sh" + sh.write <<~SH + for f in $(ls *.wav) + do + echo "$f" + done + SH + assert_match "[SC2045]", shell_output("#{bin}/shellcheck -f gcc #{sh}", 1) + end +end diff --git a/Formula/s/shellharden.rb b/Formula/s/shellharden.rb new file mode 100644 index 0000000000000..3986f2198b6ef --- /dev/null +++ b/Formula/s/shellharden.rb @@ -0,0 +1,35 @@ +class Shellharden < Formula + desc "Bash syntax highlighter that encourages/fixes variables quoting" + homepage "https://github.com/anordal/shellharden" + url "https://github.com/anordal/shellharden/archive/refs/tags/v4.3.1.tar.gz" + sha256 "3c16a98502df01a2fa2b81467d5232cc1aa4c80427e2ecf9f7e74591d692e22c" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "10e48028dfbd67212a7e171016423b63d885db6e8db6ada26930768b695e73fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "35779a784fd4b700c9adbfa9749a3fd7f9c8a6a41c58c05ce66e6eaf6b0b6961" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d622dcbef74e1646b456d8c6c0d67244b8c402ef0546684257b768556f5d4ba4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91e03fe42cd8587d1bc955d26921cc08da0f954a84209c98157fba3bc08028e8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "47253968d98051492b6323daeac35981df7ebe4ab1f604b8261c2e3847dc415d" + sha256 cellar: :any_skip_relocation, sonoma: "a338286ab8c93d9cd4e4aec92a8212d6110cf23cd5a017587fa4bf62cbf9bbad" + sha256 cellar: :any_skip_relocation, ventura: "ec1ad4ad2ac6ad351e1bd9713838959b8346c9c3d07efb70cd3de002d5ddbb44" + sha256 cellar: :any_skip_relocation, monterey: "e33b74610ecaae0df74599a3ef689fa89ede02befc72a7f655c68b95ed540c7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "c204c007a8f608b5f7d08262be092318bd371d444c72f60a6f9772ebbc762cab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e728c3f307c0729bb68b56c7e6f9abfee8a4192b830b554974effeecf0bda41f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"script.sh").write <<~SH + dog="poodle" + echo $dog + SH + system bin/"shellharden", "--replace", "script.sh" + assert_match "echo \"$dog\"", (testpath/"script.sh").read + end +end diff --git a/Formula/s/shellinabox.rb b/Formula/s/shellinabox.rb new file mode 100644 index 0000000000000..8cd82906be3a3 --- /dev/null +++ b/Formula/s/shellinabox.rb @@ -0,0 +1,53 @@ +class Shellinabox < Formula + desc "Export command-line tools to web based terminal emulator" + homepage "https://github.com/shellinabox/shellinabox" + url "https://github.com/shellinabox/shellinabox/archive/refs/tags/v2.21.tar.gz" + sha256 "2a8f94beb286d0851bb146f7a7c480a8740f59b959cbd274e21a8fcbf0a7f307" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9af5148d556c49c10cd2d8202f4172237928ce9c225a459eba11d4e2a6ab5945" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc3dcfc6ccd491c7a24fca6e89f3ee3c5547a379bc257904e323413dbe21619f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e5286ea7ca63bbada9f3f775f2f2d8c1006fb1f51c9640925ccceba4e0e37c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "99818243818b0086763a7ceef6b417e5dd13b381cb9fd48e956566a26f74b3e4" + sha256 cellar: :any_skip_relocation, sonoma: "e4511e725a582f0c03023a72a8178aadb64e6d8b05c359db2959fe606ab6bc4c" + sha256 cellar: :any_skip_relocation, ventura: "40f88ccd430e1264efea4852697d509ce3c8fa13a2c4a0d16c6415da020a82fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "15393ab741f33679642c18979f8b84e8f0d164cdd014cc1579a446dbd6d40125" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95159f182fd5741459af55763c3f1b3cc2e15d2339ecf59a54b23c8d83a0877b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + # Upstream (Debian) patch for OpenSSL 1.1 compatibility + # Original patch cluster: https://github.com/shellinabox/shellinabox/pull/467 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/shellinabox/2.20.patch" + sha256 "86c2567f8f4d6c3eb6c39577ad9025dbc0d797565d6e642786e284ac8b66bd39" + end + + def install + # Workaround for Xcode 14.3 + # https://github.com/shellinabox/shellinabox/issues/518 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "autoreconf", "-fiv" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + port = free_port + pid = fork do + system bin/"shellinaboxd", "--port=#{port}", "--disable-ssl", "--localhost-only" + end + sleep 1 + assert_match "ShellInABox - Make command line applications available as AJAX web applications", + shell_output("curl -s http://localhost:#{port}") + Process.kill "TERM", pid + end +end diff --git a/Formula/s/shellshare.rb b/Formula/s/shellshare.rb new file mode 100644 index 0000000000000..94fc1ad63e6f0 --- /dev/null +++ b/Formula/s/shellshare.rb @@ -0,0 +1,27 @@ +class Shellshare < Formula + include Language::Python::Shebang + + desc "Live Terminal Broadcast" + homepage "https://github.com/vitorbaptista/shellshare" + url "https://github.com/vitorbaptista/shellshare/archive/refs/tags/v1.1.0.tar.gz" + sha256 "0a102c863f60402ab48908563edde38450add0ae02454360fa94065824a61907" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "74bd14d6127d61de20dc99c0936450669eb5bbe22788f0ef64abdcacf2c1f7a0" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "public/bin/shellshare" + bin.install "public/bin/shellshare" + end + + test do + system bin/"shellshare", "-v" + end +end diff --git a/Formula/s/shellspec.rb b/Formula/s/shellspec.rb new file mode 100644 index 0000000000000..e445006139f5d --- /dev/null +++ b/Formula/s/shellspec.rb @@ -0,0 +1,46 @@ +class Shellspec < Formula + desc "BDD unit testing framework for dash, bash, ksh, zsh and all POSIX shells" + homepage "https://shellspec.info/" + url "https://github.com/shellspec/shellspec/archive/refs/tags/0.28.1.tar.gz" + sha256 "400d835466429a5fe6c77a62775a9173729d61dd43e05dfa893e8cf6cb511783" + license "MIT" + head "https://github.com/shellspec/shellspec.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c39e6acfcb13b4e82fdaf4e2a2788c5b43eacd7be9d2f98d5d786d0e741befad" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"shellspec", "--init" + assert_match "--require spec_helper", (testpath/".shellspec").read + assert_path_exists testpath/"spec/spec_helper.sh" + + (testpath/"spec/example_spec.sh").write <<~SPEC + Describe 'hello.sh' + Include lib/hello.sh + It 'says hello' + When call hello ShellSpec + The output should equal 'Hello ShellSpec!' + End + End + SPEC + + (testpath/"lib/hello.sh").write <<~SHELL + hello() { + echo "Hello ${1}!" + } + SHELL + + output = shell_output("#{bin}/shellspec --shell sh 2>&1", 102) + assert_match "1 example, 0 failures", output + + assert_match version.to_s, shell_output("#{bin}/shellspec --version") + end +end diff --git a/Formula/s/shelltestrunner.rb b/Formula/s/shelltestrunner.rb new file mode 100644 index 0000000000000..1fac651cb745d --- /dev/null +++ b/Formula/s/shelltestrunner.rb @@ -0,0 +1,41 @@ +class Shelltestrunner < Formula + desc "Portable command-line tool for testing command-line programs" + homepage "https://github.com/simonmichael/shelltestrunner" + url "https://hackage.haskell.org/package/shelltestrunner-1.10/shelltestrunner-1.10.tar.gz" + sha256 "07bd3365fbbde9b4c80a3139792c30c1b1929736175fc207b4af1285bb97cbb0" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f1b8d8c242e9220cb7614ac47d110975539cfc97b3d8b2857e9dde0685bce584" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b7efdd51d33de7f1a6d0faf5b7cba05a2d6958ab6f2b953cf24dbd1f452dc2d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14e0822f1871ee0db643fdffff2dd6a9caae2093f9b14035c2303a1666917263" + sha256 cellar: :any_skip_relocation, arm64_ventura: "582cff21d33d8c6b12327c308028ab04c6bdf522e9dabc44768bce82f044034d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "70426f971815a9fc20296d6cc1cf37e4ec61eb474022c6adb36c4689ac352ea9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "56a6a6ae7b4be0f2c3f44ff4e7890e56b2f361aff31952f507c65b115f10c421" + sha256 cellar: :any_skip_relocation, sonoma: "d1c8e59712ca832d1f567b8efe61ba73237281c196a904a70950a1d2cae2cd0e" + sha256 cellar: :any_skip_relocation, ventura: "68c4638e21a18a585339ec9bcdced418388d7763f003d430e77a4307643b7e3d" + sha256 cellar: :any_skip_relocation, monterey: "ed90af2f8aeba0417ae92c8aa1021b73f5ceaabe2b10f3161a0821439a00eead" + sha256 cellar: :any_skip_relocation, big_sur: "6f5766183b65e74e68caf0e5c2f507537458cfc1df434495c26828dcc1486dee" + sha256 cellar: :any_skip_relocation, arm64_linux: "de2f4ffd77b89aa5ecbb7497a5ec9f03109aa934f8ce118b3344fb71c542f3cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "681f54b3d05958b695d5d9551d339c864f84a18639f8497a6923550df3bda337" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + (testpath/"test").write "$$$ {exe} {in}\n>>> /{out}/\n>>>= 0" + args = "-D{exe}=echo -D{in}=message -D{out}=message -D{doNotExist}=null" + assert_match "Passed", shell_output("#{bin}/shelltest #{args} test") + end +end diff --git a/Formula/s/shellz.rb b/Formula/s/shellz.rb new file mode 100644 index 0000000000000..9c78681b61349 --- /dev/null +++ b/Formula/s/shellz.rb @@ -0,0 +1,35 @@ +class Shellz < Formula + desc "Small utility to track and control custom shellz" + homepage "https://github.com/evilsocket/shellz" + url "https://github.com/evilsocket/shellz/archive/refs/tags/v1.6.0.tar.gz" + sha256 "3a89e3d573563a0c2ccb1831ff41fc0204c8b4efb011c10108ab98451a309b1c" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "253878a341fdac25066ac6e51bbd4dc9c265a4fbaa51b796750582de0f9910a5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7da7409e05430d93aa136b8dbd83e40aa4ee2c8abb708606b27f5d42867096e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c129b18cdafdaa6f3cff5fef8bf0f4f76ef7d7b07a491e6cf7e3053a3169f06" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f988ca6178c77343dfea20c9b4adf2eb0742605f4e0402dac2e2ad963ab5881c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ac21c3ae7ea28b170bf5b3eb29b70ea61c512060807833de7ef1723a66316f6b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e4ea721956ec5e9a51e8774000f17eca688fdf50c1d41496b23f2be90bec65c8" + sha256 cellar: :any_skip_relocation, sonoma: "a54f8666f33b198599a417db0c241cd7176c4a95661fca1a643899863b3897b3" + sha256 cellar: :any_skip_relocation, ventura: "3145d8638bc906488ffff093a2d53829df20b80a48403d10c71e30d9ed3f4b89" + sha256 cellar: :any_skip_relocation, monterey: "fee1186791c0b7af5f978cd5170e0c1b1820cff57828e05d7b2274f93ff8f5f4" + sha256 cellar: :any_skip_relocation, big_sur: "cc03abb302fea67ca26f25d3d5835ef5480865a77838ef84c02e652f89809d9a" + sha256 cellar: :any_skip_relocation, catalina: "5909f7cc0f0bfce0ad949965618ebf4a8cbdd022571bb89cfa44645d28dd72b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce95685184ad214c28f877aaa8bed43b66616a3441f4c8afbefe3365067d7e57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "562f9886f5574cec74ea7419dfb9e7ffc88cddf253da7971744781c115f0a0f7" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/shellz" + end + + test do + output = shell_output("#{bin}/shellz -no-banner -no-effects -path #{testpath}", 1) + assert_match "creating", output + assert_path_exists testpath/"shells" + end +end diff --git a/Formula/s/shepherd.rb b/Formula/s/shepherd.rb new file mode 100644 index 0000000000000..b7658b9cdc19f --- /dev/null +++ b/Formula/s/shepherd.rb @@ -0,0 +1,66 @@ +class Shepherd < Formula + desc "Service manager that looks after the herd of system services" + homepage "https://www.gnu.org/software/shepherd/" + url "https://ftpmirror.gnu.org/gnu/shepherd/shepherd-1.0.8.tar.gz" + mirror "https://ftp.gnu.org/gnu/shepherd/shepherd-1.0.8.tar.gz" + sha256 "3beb005370bf0339c567d068a7ad9fb69f0e8850894db01c34635955f7717ff5" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "ab697e56b7681791843ef13b65fe83e6ce99097b8aee641b54c5725a5103ac9f" + sha256 arm64_sequoia: "ab697e56b7681791843ef13b65fe83e6ce99097b8aee641b54c5725a5103ac9f" + sha256 arm64_sonoma: "ab697e56b7681791843ef13b65fe83e6ce99097b8aee641b54c5725a5103ac9f" + sha256 sonoma: "f186f200570abd84794dd574570953e546ebd572e09e9fec5a02601bb56388c4" + sha256 arm64_linux: "d563a768de514ed5d4fc4c897a89193224ea3b82222040dbda2e2dd9f2abf212" + sha256 x86_64_linux: "8b287ccf5c5cf69aa12dc4eee2f979979ef13f2a317804954d7ff419abf77598" + end + + depends_on "pkgconf" => :build + depends_on "guile" + depends_on "guile-fibers" + + on_macos do + depends_on "gnu-sed" => :build + end + + def install + ENV["GUILE_LOAD_PATH"] = Formula["guile-fibers"].opt_share/"guile/site/3.0" + ENV["GUILE_LOAD_COMPILED_PATH"] = Formula["guile-fibers"].opt_lib/"guile/3.0/site-ccache" + + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"dummy-service.scm").write <<~SCHEME + (use-modules (shepherd service)) + + (define dummy-service + (service + (provision '(dummy)) + (start (lambda () + (format #t "Dummy service started~%") + (values))) + (stop (lambda () + (format #t "Dummy service stopped~%") + (values))))) + + (register-services dummy-service) + SCHEME + + begin + pid = spawn bin/"shepherd", "-c", "dummy-service.scm" + sleep 2 + + output = shell_output("#{bin}/herd status 2>&1", 1) + assert_match "socket: No such file or directory", output + + assert_match version.to_s, shell_output("#{bin}/herd --version") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/s/sherif.rb b/Formula/s/sherif.rb new file mode 100644 index 0000000000000..f1dcb6bee59e2 --- /dev/null +++ b/Formula/s/sherif.rb @@ -0,0 +1,39 @@ +class Sherif < Formula + desc "Opinionated, zero-config linter for JavaScript monorepos" + homepage "https://github.com/QuiiBz/sherif" + url "https://registry.npmjs.org/sherif/-/sherif-1.8.0.tgz" + sha256 "863904967ce5241124d056ac5f5ff982e22539036e929fe5949b0d80ef991f65" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0bc8d472573b48a50680ca65cb9ba9a0d8dfff8494b202ae1230ae898582111d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0bc8d472573b48a50680ca65cb9ba9a0d8dfff8494b202ae1230ae898582111d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0bc8d472573b48a50680ca65cb9ba9a0d8dfff8494b202ae1230ae898582111d" + sha256 cellar: :any_skip_relocation, sonoma: "52b6c31f4ed6fdc607d5db4d88686c7e454ad68e21827b0b88059305f40defe6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d6ece4f73de6e3395e55ec77bec54e75141867a2156869c580e6543d3ba31b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9dbf7ed408b1e2479422e9b4e33f29fcb4861ccc54d7a78f4c20f40698ec719" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"package.json").write <<~JSON + { + "name": "test", + "version": "1.0.0", + "private": true, + "packageManager": "npm", + "workspaces": [ "." ] + } + JSON + (testpath/"test.js").write <<~JS + console.log('Hello, world!'); + JS + assert_match "No issues found", shell_output("#{bin}/sherif --no-install .") + end +end diff --git a/Formula/s/sherlock.rb b/Formula/s/sherlock.rb new file mode 100644 index 0000000000000..6353c04d82de7 --- /dev/null +++ b/Formula/s/sherlock.rb @@ -0,0 +1,120 @@ +class Sherlock < Formula + include Language::Python::Virtualenv + + desc "Hunt down social media accounts by username" + homepage "https://sherlockproject.xyz/" + url "https://files.pythonhosted.org/packages/76/17/d29f35df6ec6424ec15f273a31ad54ad314d1f9056321fb824bed4eda128/sherlock_project-0.16.0.tar.gz" + sha256 "fcc8f05fb6f55de30938cce5727249f70917b226918a71f6ed3f50d8a6467610" + license "MIT" + head "https://github.com/sherlock-project/sherlock.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "546ab96e57d0eef4dc2b99ec4a9126ba08b9faca69e55e015de53e14efc17337" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46b8b01169dd4a487fb00b7ca808ff49ef819af7220f3e3893895c6c33c4e9fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1fdae1e28ea3628384765aa80a1867d311042d0205d0bb8b1ba4720f4cb9cfad" + sha256 cellar: :any_skip_relocation, sonoma: "b497b27e94d81c4bb959d3fa45dbf78626f97a59706f0e7929668262f2a2eaab" + sha256 arm64_linux: "f8f5d3eaed92e75faa70746e9331ed24d8c026f8969965be78e2447786b5dc1b" + sha256 x86_64_linux: "a8d16c92f125af39e85fed332bcc0749f144c8962be49e312b18939f081fd7f2" + end + + depends_on "cmake" => :build + depends_on "certifi" => :no_linkage + depends_on "numpy" + depends_on "python@3.14" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[certifi numpy] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "et-xmlfile" do + url "https://files.pythonhosted.org/packages/d3/38/af70d7ab1ae9d4da450eeec1fa3918940a5fafb9055e934af8d6eb0c2313/et_xmlfile-2.0.0.tar.gz" + sha256 "dab3f4764309081ce75662649be815c4c9081e88f0837825f90fd28317d4da54" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "openpyxl" do + url "https://files.pythonhosted.org/packages/3d/f9/88d94a75de065ea32619465d2f77b29a0469500e99012523b91cc4141cd1/openpyxl-3.1.5.tar.gz" + sha256 "cf0e3cf56142039133628b5acffe8ef0c12bc902d2aadd3e0fe5878dc08d1050" + end + + resource "pandas" do + url "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz" + sha256 "e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-futures" do + url "https://files.pythonhosted.org/packages/88/f8/175b823241536ba09da033850d66194c372c65c38804847ac9cef0239542/requests_futures-1.0.2.tar.gz" + sha256 "6b7eb57940336e800faebc3dab506360edec9478f7b22dc570858ad3aa7458da" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "stem" do + url "https://files.pythonhosted.org/packages/94/c6/b2258155546f966744e78b9862f62bd2b8671b422bb9951a1330e4c8fd73/stem-1.8.2.tar.gz" + sha256 "83fb19ffd4c9f82207c006051480389f80af221a7e4783000aedec4e384eb582" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/sherlock --version") + + assert_match "Search completed with 1 results", shell_output("#{bin}/sherlock --site github homebrew") + end +end diff --git a/Formula/s/shfmt.rb b/Formula/s/shfmt.rb new file mode 100644 index 0000000000000..459747d67413a --- /dev/null +++ b/Formula/s/shfmt.rb @@ -0,0 +1,41 @@ +class Shfmt < Formula + desc "Autoformat shell script source code" + homepage "https://github.com/mvdan/sh" + url "https://github.com/mvdan/sh/archive/refs/tags/v3.12.0.tar.gz" + sha256 "ac15f42feeba55af29bd07698a881deebed1cd07e937effe140d9300e79d5ceb" + license "BSD-3-Clause" + head "https://github.com/mvdan/sh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f1b1d608e46c6a7ac98efd1bf44b821393f479809ee357f04762b34ee2614b2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a4cdf35bd37ddeac3608da2adfc45c2d1b276b9419154d925cfe63b8973035c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a4cdf35bd37ddeac3608da2adfc45c2d1b276b9419154d925cfe63b8973035c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a4cdf35bd37ddeac3608da2adfc45c2d1b276b9419154d925cfe63b8973035c" + sha256 cellar: :any_skip_relocation, sonoma: "2a7f654ebd0ad605b8f47f4d182e1106050ad6f34cb1b68967d979c54e72e86c" + sha256 cellar: :any_skip_relocation, ventura: "2a7f654ebd0ad605b8f47f4d182e1106050ad6f34cb1b68967d979c54e72e86c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a322ef4b30bc6f54f645988c0cb5b4a02887bff693af18f75dbf42bb022adb8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38a4a4aef3735b47289c4d985c8f922b1b96ef9e36232a90d4aa88c80eeb997c" + end + + depends_on "go" => :build + depends_on "scdoc" => :build + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = %W[ + -s -w + -extldflags=-static + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/shfmt" + man1.mkpath + system "scdoc < ./cmd/shfmt/shfmt.1.scd > #{man1}/shfmt.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/shfmt --version") + + (testpath/"test").write "\t\techo foo" + system bin/"shfmt", testpath/"test" + end +end diff --git a/Formula/s/shibboleth-sp.rb b/Formula/s/shibboleth-sp.rb new file mode 100644 index 0000000000000..0c02bf82cb10f --- /dev/null +++ b/Formula/s/shibboleth-sp.rb @@ -0,0 +1,75 @@ +class ShibbolethSp < Formula + desc "Shibboleth 2 Service Provider daemon" + homepage "https://wiki.shibboleth.net/confluence/display/SHIB2" + url "https://shibboleth.net/downloads/service-provider/3.5.0/shibboleth-sp-3.5.0.tar.bz2" + sha256 "f301604bd17ee4d94a66e6dd7ad1c3f0917949a4a12176d55614483d78fefe58" + license "Apache-2.0" + revision 2 + + livecheck do + url "https://shibboleth.net/downloads/service-provider/latest/" + regex(/href=.*?shibboleth-sp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "57a346ae8c1835ec19245b711131bb8878b1b49b5c09030646f07103c91058ca" + sha256 arm64_sequoia: "0569ff4651fd7d6700c65c25790574f19066174c768959ae2064aea20ad5a99b" + sha256 arm64_sonoma: "0a46e994d409ba22543dc7bc7736238bcce908efc32d987ce0c043ceced97a70" + sha256 arm64_ventura: "e5d6b7a4b089ab17ec32cd0808c1d5f0c7de2190df46a0a02bb00c1561d1cfca" + sha256 sonoma: "3266a747920724d2be0e306610ebfc6348cab7d02331702d398dc6fa671c7dfc" + sha256 ventura: "05d2cc8a93f269863e7dee8ce5806dd840b8d8ba6bf0619cb425b8635a1a6dc3" + sha256 arm64_linux: "8543a12970a4d9909660f736f4a4a4fe10b0b26ead2c011d32aa39614fa068d2" + sha256 x86_64_linux: "5d6bdcc1ac27a3cadcc7e5b0d38d8718ec1e20ee599f2eb2c373af7d24b34d7e" + end + + depends_on "pkgconf" => :build + + depends_on "apr" + depends_on "apr-util" + depends_on "boost" + depends_on "httpd" + depends_on "log4shib" + depends_on "opensaml" + depends_on "openssl@3" + depends_on "unixodbc" + depends_on "xerces-c" + depends_on "xml-security-c" + depends_on "xml-tooling-c" + + uses_from_macos "krb5" + + def install + ENV.cxx11 + + args = %W[ + --disable-silent-rules + --localstatedir=#{var} + --sysconfdir=#{etc} + --with-xmltooling=#{Formula["xml-tooling-c"].opt_prefix} + --with-saml=#{Formula["opensaml"].opt_prefix} + --enable-apache-24 + --with-apxs24=#{Formula["httpd"].opt_bin}/apxs + DYLD_LIBRARY_PATH=#{lib} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def post_install + (var/"run/shibboleth/").mkpath + (var/"cache/shibboleth").mkpath + end + + service do + run [opt_sbin/"shibd", "-F", "-f", "-p", var/"run/shibboleth/shibd.pid"] + keep_alive true + require_root true + end + + test do + system sbin/"shibd", "-t" + end +end diff --git a/Formula/s/shimmy.rb b/Formula/s/shimmy.rb new file mode 100644 index 0000000000000..b28d14735aa9e --- /dev/null +++ b/Formula/s/shimmy.rb @@ -0,0 +1,44 @@ +class Shimmy < Formula + desc "Small local inference server with OpenAI-compatible GGUF endpoints" + homepage "https://github.com/Michael-A-Kuykendall/shimmy" + url "https://github.com/Michael-A-Kuykendall/shimmy/archive/refs/tags/v1.7.4.tar.gz" + sha256 "227fe3708502745fa7dfde6234efe66752b8e1d2bfa6f8ba4f30095dcf73a23a" + license "MIT" + head "https://github.com/Michael-A-Kuykendall/shimmy.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7bf66dd6124256be6ad78ccd6203ce25b12d0d29a99b5bb131c06653afc929a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d5c3cbc8095122f5e22b8ed3f62500a8acc88f8ff2ec7b6779f1b2ac3a937d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8889f2539085581723daa90e59d775de53957aebbf0e3d835f96f597cbe2fafa" + sha256 cellar: :any_skip_relocation, sonoma: "15d8116445f9f6337475915e0d8fb98d8b1bd61326c085e90d90d7eb90015578" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9a798d1875d03bc8acc68aa2b9635a5e8ddbf5f326ae995c79cd421daef27e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78f7c0be3ac47f5e99db726d947dd8327eaf20aaf982f1e100be50e87f986b82" + end + + depends_on "cmake" => :build # for llama-cpp-sys-2 + depends_on "rust" => :build + + uses_from_macos "llvm" => :build # for libclang + + def install + system "cargo", "install", *std_cargo_args + end + + service do + run [opt_bin/"shimmy", "serve", "--bind", "127.0.0.1:11435"] + keep_alive true + log_path var/"log/shimmy.log" + error_log_path var/"log/shimmy.error.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/shimmy --version") + output = shell_output("#{bin}/shimmy list") + assert_match "Total available models: 1", output + end +end diff --git a/Formula/s/shivavg.rb b/Formula/s/shivavg.rb new file mode 100644 index 0000000000000..42c2524b0a5db --- /dev/null +++ b/Formula/s/shivavg.rb @@ -0,0 +1,52 @@ +class Shivavg < Formula + desc "OpenGL based ANSI C implementation of the OpenVG standard" + homepage "https://sourceforge.net/projects/shivavg/" + url "https://downloads.sourceforge.net/project/shivavg/ShivaVG/0.2.1/ShivaVG-0.2.1.zip" + sha256 "9735079392829f7aaf79e02ed84dd74f5c443c39c02ff461cfdd19cfc4ae89c4" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0aaf1bb18c79c32a37185bca6b61d84f088d434be24e051128d48f6c8d4e779f" + sha256 cellar: :any, arm64_sequoia: "65aec8af6d55bd324b1590d4e29d30cc3a3da50c4492bb6f5dd0c8906bb0fd58" + sha256 cellar: :any, arm64_sonoma: "b6ef4461bec2d6b8a9e7e0cf2aaf02b7fc871bddcbf631318a4f7d7e5b1fa530" + sha256 cellar: :any, arm64_ventura: "b662c161700f2148a68a780888457dce0567614772e8aa441bde37a1f40ebc4c" + sha256 cellar: :any, arm64_monterey: "ba0da5a73889923ba7031099a70d0e69d683fbb90583b6c65d4335deb88323b0" + sha256 cellar: :any, arm64_big_sur: "8d928dc2b52759bad7394d50cc55b1b6d512fbbbba9fe902cb5e3296bd0e915a" + sha256 cellar: :any, sonoma: "1c8c3d89d312804881bb803c2e8d372af69035f4a4a66ee1a69dde8e531be29c" + sha256 cellar: :any, ventura: "0f6298f4a9c2aa7bb11d2b9d6a16a8c14a5699e333e41a167f356e7ae140b77c" + sha256 cellar: :any, monterey: "9c8b1b85cf294a3cbf74955d7b1f526069d8ddfaf239ecf1b62c21aaa4190675" + sha256 cellar: :any, big_sur: "2d89164bed390c7556dbf88d65bb25775ea17bc04e1e4bfb026792ef64fba6ed" + sha256 cellar: :any, catalina: "b7c8f247b6db49cd1cabd2efd39d034c25d727f27bce09a329d9cc3c8e36a621" + sha256 cellar: :any_skip_relocation, arm64_linux: "c0b735943a8d9d52d9089d252a1b7fb0d9aa4cb6630e24a284d082f0a29c6016" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae5c74db54f64e3a75e394cba457cd969612c741de20f12b5941af967db03470" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_linux do + depends_on "freeglut" + depends_on "mesa" + depends_on "mesa-glu" + end + + # Apply upstream commit to fix build on Linux. Remove with next release. + patch do + url "https://github.com/Ecognize/ShivaVG/commit/fe3bb03d7b03591b26ab7c399f51edcd130f0f4e.patch?full_index=1" + sha256 "f4eb595afb053eb0a093dcf50748b54e01eff729f4589f82deb8f6f2ce8f571b" + end + + def install + system "/bin/sh", "autogen.sh" + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "configure", "$LDFLAGS conftest.$ac_ext", "conftest.$ac_ext $LDFLAGS" unless OS.mac? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-example-all=no" + system "make", "install" + end +end diff --git a/Formula/s/shmcat.rb b/Formula/s/shmcat.rb new file mode 100644 index 0000000000000..32e0b76604e13 --- /dev/null +++ b/Formula/s/shmcat.rb @@ -0,0 +1,42 @@ +class Shmcat < Formula + desc "Tool that dumps shared memory segments (System V and POSIX)" + homepage "https://shmcat.sourceforge.net/" + url "https://downloads.sourceforge.net/project/shmcat/shmcat-1.9.tar.xz" + sha256 "831f1671e737bed31de3721b861f3796461ebf3b05270cf4c938749120ca8e5b" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/shmcat[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3d2215296ac7593c43a7ae9fb164cff3b11804dc7c0ec1b20af35397701a3b2d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "103cda477b51d8e4ef25053b80346b9c7e433ef5db2c3f9efc21e815faf1556b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9249f70d6b9d337e959051cc23417d12fda97e704d53ae4cd1be561f9541fb4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f501e817599e1da0c0d0edb51931113b58c43b98fca00fb207a8213fc1418d6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "37e280843c7f422bacd40e5785236613d1a82e712405b6fa68910b6dee91946b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3bdee0944414bc51a08a7707e29d16a6f08e1d583ad4cd8357587da2a6519d05" + sha256 cellar: :any_skip_relocation, sonoma: "406f35b9aa4941ea2324ae88feb143a0591442bcf0f5c66d7a85e2bfa9ca52d7" + sha256 cellar: :any_skip_relocation, ventura: "fc03e13384a073b4d96f13a7d8fb204e42cf0041d7d6a4c07e09fee21272d5e5" + sha256 cellar: :any_skip_relocation, monterey: "dc928ec60a7a9af5404195a4f82cc87d51a60f1292c1611b59401cc226fb39f1" + sha256 cellar: :any_skip_relocation, big_sur: "4a7b108892ada071d5ce75b8eb434b9c77c6cea5ed767ce31c78ac6e4b90d540" + sha256 cellar: :any_skip_relocation, catalina: "f86090c36d839092913667dcfc924f76c71d318a03434a1e608b3960b1df7807" + sha256 cellar: :any_skip_relocation, arm64_linux: "08d6b2ad911eb82d4426537e8958ea7e8e8fe408fa3c9041dde2a14f710b9dfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccb601cd0dfebcb5b7633bf1e8610ba8b1a3858b67feb9848020a3ad1152e780" + end + + def install + system "./configure", "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--disable-ftok", + "--disable-nls" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/shmcat --version") + end +end diff --git a/Formula/s/shml.rb b/Formula/s/shml.rb new file mode 100644 index 0000000000000..43177e64f8f02 --- /dev/null +++ b/Formula/s/shml.rb @@ -0,0 +1,27 @@ +class Shml < Formula + desc "Style Framework for The Terminal" + homepage "https://odb.github.io/shml/" + url "https://github.com/odb/shml/archive/refs/tags/1.1.0.tar.gz" + sha256 "0f0634fe5dd043f5ff52946151584a59b5826acbb268c9d884a166c3196b8f4f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "54617898e5fd7439756e61a1ccb2489d41ef4c5183b8b248156e4ecad3bf245e" + end + + def install + bin.install "shml.sh" + bin.install_symlink bin/"shml.sh" => "shml" + end + + test do + ["shml", "shml.sh"].each do |cmd| + result = shell_output("#{bin}/#{cmd} -v") + result.force_encoding("UTF-8") if result.respond_to?(:force_encoding) + assert_match version.to_s, result + end + end +end diff --git a/Formula/s/shmux.rb b/Formula/s/shmux.rb new file mode 100644 index 0000000000000..a1cd29768e1d4 --- /dev/null +++ b/Formula/s/shmux.rb @@ -0,0 +1,36 @@ +class Shmux < Formula + desc "Execute the same command on many hosts in parallel" + homepage "https://github.com/shmux/shmux" + url "https://github.com/shmux/shmux/archive/refs/tags/v1.0.3.tar.gz" + sha256 "c9f8863e2550e23e633cf5fc7a9c4c52d287059f424ef78aba6ecd98390fb9ab" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "41cc598c5c1b6b397128af5342ad323ee355c48d782af7f574d0f9f73a5caf14" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1c6c5f0ff3534ed4ad1c56180b80e0c1963b25c803789492c130ab0620eccb64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b5156cf3563aa2cca9be5a0de4e8bdd23fbd78854910a8fd25e0cf83b0d0172" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4629c31e6233a8e7d7c4caf6491c3e585f8b7eaa5964f426ceab66562cb4fb7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e32cab0e2063d5b3d43f9e796e5b00b89f7ac2bae966efe236b1e69d8ae6e8bc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "341ede51de6b3dbb5b0f6acc554a2dfc7c9543cb3800e06a992f8b40a58b3657" + sha256 cellar: :any_skip_relocation, sonoma: "902fe0e6668abbd51c33c4c6cd85a0933b5e94650b319ea57d9b0581440a8d95" + sha256 cellar: :any_skip_relocation, ventura: "252d01294232eadb06c95e9fcd0dd73438a2871dfab43210481df95ad30df586" + sha256 cellar: :any_skip_relocation, monterey: "2ddc25900fb3603227d9ede578fffc8c96c414b8487f6a0d710ac0e39f6a52de" + sha256 cellar: :any_skip_relocation, big_sur: "6f8ae1c07788268ee86531da66940e7648dce1dc63a6ed118a2bacc0899beac9" + sha256 cellar: :any_skip_relocation, catalina: "6781e9876911d4d44080b069dd3295c86520699ae24b3385980d51a53bc4d2f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "31b4fe74dd2467977c7653c9b58e27fed41ff1238daf825c193678986797521e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1e347248987cfaeb250cff852feeab54fe709da0f69d9c560170f46c05feaf4" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"shmux", "-h" + end +end diff --git a/Formula/s/shntool.rb b/Formula/s/shntool.rb new file mode 100644 index 0000000000000..91867095e6627 --- /dev/null +++ b/Formula/s/shntool.rb @@ -0,0 +1,45 @@ +class Shntool < Formula + desc "Multi-purpose tool for manipulating and analyzing WAV files" + homepage "http://shnutils.freeshell.org/shntool/" + url "http://shnutils.freeshell.org/shntool/dist/src/shntool-3.0.10.tar.gz" + mirror "https://www.mirrorservice.org/sites/download.salixos.org/x86_64/extra-14.2/source/audio/shntool/shntool-3.0.10.tar.gz" + sha256 "74302eac477ca08fb2b42b9f154cc870593aec8beab308676e4373a5e4ca2102" + license "GPL-2.0-or-later" + + livecheck do + url "http://shnutils.freeshell.org/shntool/dist/src/" + regex(/href=.*?shntool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dac7c49e9256da92adfb0d881f723ad8869043632b6e81b03b0dfb1efa184822" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5d116fc457d0cb26ccaea1e50b59a4edae2af2e89064c473aa420717dc0a9c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9147bd0667159d62ea4493ae1524f8779f4fb19eb34ac4fc109695e09cdcd7ef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec3c0feb069099563b7359c7e3f926ac1840aaf0364bf40be1a2cf1462865764" + sha256 cellar: :any_skip_relocation, arm64_monterey: "02dd5226afa9d564374ab0e56a1edd08d7b61ac8c9c7fb09ec2dc011d47cb955" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1dfa65178720559cebc5500eb9f32d4ca2606a4f1b6a94b9d175ceded8fae2f0" + sha256 cellar: :any_skip_relocation, sonoma: "15ecde34bad9a23f28114d8703059e33e330244f56150997bda24abf77a9a13f" + sha256 cellar: :any_skip_relocation, ventura: "f8a5ea952382da86b8ebc29ccc1ab8c4d818a69a408c7e2adbd9cec2139fb5e6" + sha256 cellar: :any_skip_relocation, monterey: "858a65a08549e69ecc02979700c5155426f0a8202da7e6ec48bc0018a6ed9038" + sha256 cellar: :any_skip_relocation, big_sur: "c265916725e367c0b187924177b6e5d9ed12d434f242e6bc7b59596a02f08c71" + sha256 cellar: :any_skip_relocation, catalina: "e140337ce89f886c0044ac6eaf75dda3711622f9da418932e8a02337213785ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "c719e4057a5cd6801dc734c26f3643e241bd0b547e91663a993ae62bbcb65de5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca983c20f607f60e0bd5f2ea6bc5d138606351fada22c01b315d388e8620c3c1" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"shninfo", test_fixtures("test.wav") + end +end diff --git a/Formula/s/shodan.rb b/Formula/s/shodan.rb new file mode 100644 index 0000000000000..59ccfd18c6744 --- /dev/null +++ b/Formula/s/shodan.rb @@ -0,0 +1,96 @@ +class Shodan < Formula + include Language::Python::Virtualenv + + desc "Python library and command-line utility for Shodan" + homepage "https://cli.shodan.io" + url "https://files.pythonhosted.org/packages/c5/06/c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28/shodan-1.31.0.tar.gz" + sha256 "c73275386ea02390e196c35c660706a28dd4d537c5a21eb387ab6236fac251f6" + license "MIT" + revision 5 + head "https://github.com/achillean/shodan-python.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "30b58fa71489ce93a8873b2b94871ddabc8017e1e3a940e93ef662108eaaa374" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/72/97/bf44e6c6bd8ddbb99943baf7ba8b1a8485bcd2fe0e55e5708d7fee4ff1ae/requests_file-2.1.0.tar.gz" + sha256 "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/46/2c/c06ef49dc36e7954e55b802a8b231770d286a9758b3d936bd1e04ce5ba88/xlsxwriter-3.2.9.tar.gz" + sha256 "254b1c37a368c444eac6e2f867405cc9e461b0ed97a3233b2ac1e574efb4140c" + end + + # Drop setuptools dep + # https://github.com/achillean/shodan-python/pull/209 + patch do + url "https://github.com/achillean/shodan-python/commit/a99fbf53139bad62fe5ba8f41ac130d5212cbf71.patch?full_index=1" + sha256 "3f674707548497ea79c760697e4cd44afe0e0df4433b3b49af8ea3637903acd7" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"shodan", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/shodan version") + + output = shell_output("#{bin}/shodan init 2>&1", 2) + assert_match "Error: Missing argument ''.", output + end +end diff --git a/Formula/s/shortest.rb b/Formula/s/shortest.rb new file mode 100644 index 0000000000000..0ffb773f370af --- /dev/null +++ b/Formula/s/shortest.rb @@ -0,0 +1,32 @@ +class Shortest < Formula + desc "AI-powered natural language end-to-end testing framework" + homepage "https://github.com/antiwork/shortest" + url "https://registry.npmjs.org/@antiwork/shortest/-/shortest-0.4.9.tgz" + sha256 "0e239bceeda97a65178b7e4b6be16cc88c67e047eeb71bfd2da04441156180f8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb3317b16f32964930b0dc0800926f935f8b4b8e43587b6c307218000ff8bdb0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb3317b16f32964930b0dc0800926f935f8b4b8e43587b6c307218000ff8bdb0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb3317b16f32964930b0dc0800926f935f8b4b8e43587b6c307218000ff8bdb0" + sha256 cellar: :any_skip_relocation, sonoma: "6b1d99746d550614d0d529edf8a185e30f5af518e1c1013d1f89e50dce1a2ccf" + sha256 cellar: :any_skip_relocation, arm64_linux: "91ca37e8ada7364de9a79f531762d0ef3abbfca5117c5de66efa702816c18bde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dab31d829a0e0de264d83636e041d73e5c8e01c9f7e6081921a26905509a75f0" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + ENV["GITHUB_TOTP_SECRET"] = "test" + + assert_match version.to_s, shell_output("#{bin}/shortest --version") + + output = shell_output("#{bin}/shortest github-code") + assert_match "GitHub 2FA Code", output + end +end diff --git a/Formula/s/showcert.rb b/Formula/s/showcert.rb new file mode 100644 index 0000000000000..1f81da4afc84c --- /dev/null +++ b/Formula/s/showcert.rb @@ -0,0 +1,58 @@ +class Showcert < Formula + include Language::Python::Virtualenv + + desc "X.509 TLS certificate reader and creator" + homepage "https://github.com/yaroslaff/showcert" + url "https://files.pythonhosted.org/packages/3e/4e/848aeb332a64ff400210e80f6e7cb86340aa88142300885b3d8f58b9da8f/showcert-0.4.7.tar.gz" + sha256 "42e2ccb1349c81dcb6f6c67e16cc37c58ffe6af6ff18f72df9414277e3f8ba4b" + license "MIT" + head "https://github.com/yaroslaff/showcert.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e24000cf619635b4af6d7d095368311ce2cbb2598e6a5550b8e657e10b50ff0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e24000cf619635b4af6d7d095368311ce2cbb2598e6a5550b8e657e10b50ff0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e24000cf619635b4af6d7d095368311ce2cbb2598e6a5550b8e657e10b50ff0" + sha256 cellar: :any_skip_relocation, sonoma: "46634e159c5f912a853c9b687de60856fe0007904e0ec3fcc817ab0f3f46d2f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8324bf217fde187a53feceebec72fc573bd09d4a5b98b7cf9cc2a67b2719d22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8324bf217fde187a53feceebec72fc573bd09d4a5b98b7cf9cc2a67b2719d22" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libmagic" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "pem" do + url "https://files.pythonhosted.org/packages/05/86/16c0b6789816f8d53f2f208b5a090c9197da8a6dae4d490554bb1bedbb09/pem-23.1.0.tar.gz" + sha256 "06503ff2441a111f853ce4e8b9eb9d5fedb488ebdbf560115d3dd53a1b4afc73" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "python-magic" do + url "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz" + sha256 "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/showcert -h") + + assert_match "O=Let's Encrypt", shell_output("#{bin}/showcert brew.sh") + + assert_match version.to_s, shell_output("#{bin}/gencert -h") + + system bin/"gencert", "--ca", "Homebrew" + assert_path_exists testpath/"Homebrew.key" + assert_path_exists testpath/"Homebrew.pem" + end +end diff --git a/Formula/s/showkey.rb b/Formula/s/showkey.rb new file mode 100644 index 0000000000000..a01e2df2a4f9c --- /dev/null +++ b/Formula/s/showkey.rb @@ -0,0 +1,59 @@ +class Showkey < Formula + desc "Simple keystroke visualizer" + homepage "http://www.catb.org/~esr/showkey/" + url "http://www.catb.org/~esr/showkey/showkey-1.9.tar.gz" + sha256 "7230aed91f9a510ae5d234a32ba88402eb6c39431ad8175e78035f9d9b6a8f6e" + license "MIT" + head "https://gitlab.com/esr/showkey.git", branch: "master" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("-", ".") } + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1c630fa31441f7dd28d2031d45523f39ea47e8fa55c8c9f8b2b35966690b7955" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6d6a1358818a0884df47d8720be947074ba1e261f22856c546161ed620dafbb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40f2d4aa914a8823995425bbae6f33e4e8a8a3c2c0bc406e7bf4e0299b52cbca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff8fa9772d85597f5c8caaf9642f3ad0e8f622de71080cb6a29089bb47445b66" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a86590d6ec04487c561c424ea8d870dbda92fc2981ea31627a79193abf76f097" + sha256 cellar: :any_skip_relocation, sonoma: "4af765defe4fb3b6c3dd2a5ef15d3f1a4d5b3521ccd5dbaa35fd0b04e29a7e55" + sha256 cellar: :any_skip_relocation, ventura: "5e49308c5c35d9d773e7a523faec8d355f05f313f0df6daed0175166dca58d3c" + sha256 cellar: :any_skip_relocation, monterey: "1347c7b79e61d9b55735600a10f9bed5ea95a258723c11859f5125fe0ed41dd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "05a4d7762f25e11ac1138e807470b910b4c7b370c7cb965f207f8f3ace251189" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7921d9e1728c1576d6659fb218eabc169ae70c9fbe9396609b6e862145b0ad47" + end + + depends_on "xmlto" => :build + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "make", "showkey", "showkey.1" + bin.install "showkey" + man1.install "showkey.1" + end + + test do + require "expect" + + args = if OS.linux? + ["script", "-q", "/dev/null", "-c", bin/"showkey"] + else + ["script", "-q", "/dev/null", bin/"showkey"] + end + + output = Utils.safe_popen_write(*args) do |pipe| + pipe.expect(/interrupt .*? or quit .*? character\.\r?\n$/) + pipe.write "Hello Homebrew!" + sleep 1 + pipe.write "\cC\cD" + end + + assert_match "HelloHomebrew!\r\nBye...\r\n", output + end +end diff --git a/Formula/s/shpotify.rb b/Formula/s/shpotify.rb new file mode 100644 index 0000000000000..62b1dabd75b5c --- /dev/null +++ b/Formula/s/shpotify.rb @@ -0,0 +1,23 @@ +class Shpotify < Formula + desc "Command-line interface for Spotify on a Mac" + homepage "https://harishnarayanan.org/projects/shpotify/" + url "https://github.com/hnarayanan/shpotify/archive/refs/tags/2.1.tar.gz" + sha256 "b41d8798687be250d0306ac0c5a79420fa46619c5954286711a5d63c86a6c071" + license "MIT" + head "https://github.com/hnarayanan/shpotify.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a77b8a65c1e58b6bf20d640d688e62c01332f1663c7da3b37d7e0329280b4892" + end + + def install + bin.install "spotify" + end + + test do + system bin/"spotify" + end +end diff --git a/Formula/s/shtool.rb b/Formula/s/shtool.rb new file mode 100644 index 0000000000000..efca0d17b96f3 --- /dev/null +++ b/Formula/s/shtool.rb @@ -0,0 +1,24 @@ +class Shtool < Formula + desc "GNU's portable shell tool" + homepage "https://www.gnu.org/software/shtool/" + url "https://ftpmirror.gnu.org/gnu/shtool/shtool-2.0.8.tar.gz" + mirror "https://ftp.gnu.org/gnu/shtool/shtool-2.0.8.tar.gz" + sha256 "1298a549416d12af239e9f4e787e6e6509210afb49d5cf28eb6ec4015046ae19" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3edcbc54268a95648cc37c6f08b9ccf66968d3a7b8f76966c4038a1559203a56" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_equal "Hello World!", pipe_output("#{bin}/shtool echo 'Hello World!'").chomp + end +end diff --git a/Formula/s/shtools.rb b/Formula/s/shtools.rb new file mode 100644 index 0000000000000..9b676860254e7 --- /dev/null +++ b/Formula/s/shtools.rb @@ -0,0 +1,53 @@ +class Shtools < Formula + desc "Spherical Harmonic Tools" + homepage "https://shtools.github.io/SHTOOLS/" + url "https://github.com/SHTOOLS/SHTOOLS/archive/refs/tags/v4.13.1.tar.gz" + sha256 "d5890049fb915604f25576cbbb9f18980a3fc88d28fe380809e3c3497448dacb" + license "BSD-3-Clause" + head "https://github.com/SHTOOLS/SHTOOLS.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "12ba765ca24a4050e53ad4e7f6c8bb718229f678292267b821113000aa037045" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59ee77323ec5349e2ec3220bbb5addd94e5d8c61c51ed83f542e1c5b76e1b5da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f4c42204d7918ac1ed66e651c9e44c5b3909d534be6173e9a3034cc78c6f288" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0c8d580e0e29de7926ee296d259decafb3dfcc240dbc35e66dfdad22f1cc6552" + sha256 cellar: :any_skip_relocation, arm64_monterey: "96ee5658d7de4f1f1299929773c29178033c9417f4c3976f192ba766ff2b4ce3" + sha256 cellar: :any_skip_relocation, sonoma: "5a5d2f8bd23c91d1108f19d9180df102f7ebac81faf440c4c1e6ded69b7c13f9" + sha256 cellar: :any_skip_relocation, ventura: "acebb261a0ceef034d6f243b3b146d29a4ed67de632b8f815b892fa9e276bde8" + sha256 cellar: :any_skip_relocation, monterey: "3015528ef552810ad555a4d935b19961efe058ceb057995a42e2e36b59207352" + sha256 cellar: :any_skip_relocation, arm64_linux: "8539b8bc1f073942972d36dc4488ddd549d00f2568e965be281e3183eaa74fec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d943e8846fb394abe3b7689588fa59adc91b6ed0b56cf7ce67df70d09a650aa" + end + + depends_on "fftw" + depends_on "gcc" + depends_on "openblas" + + on_linux do + depends_on "libtool" => :build + end + + def install + # Workaround for arm64 linux, https://github.com/SHTOOLS/SHTOOLS/issues/507 + inreplace "Makefile", " -m64 ", " " if OS.linux? && Hardware::CPU.arm? + + system "make", "fortran" + system "make", "fortran-mp" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + cp_r "#{share}/examples/shtools", testpath + m64 = "-m64" if Hardware::CPU.intel? + system "make", "-C", "shtools/fortran", + "run-fortran-tests-no-timing", + "F95=gfortran", + "F95FLAGS=#{m64} -fPIC -O3 -std=gnu -ffast-math", + "MODFLAG=-I#{HOMEBREW_PREFIX}/include", + "LIBPATH=#{HOMEBREW_PREFIX}/lib", + "LIBNAME=SHTOOLS", + "FFTW=-L #{HOMEBREW_PREFIX}/lib -lfftw3 -lm", + "LAPACK=-L #{Formula["openblas"].opt_lib} -lopenblas", + "BLAS=" + end +end diff --git a/Formula/s/shub.rb b/Formula/s/shub.rb new file mode 100644 index 0000000000000..8a4956aad209e --- /dev/null +++ b/Formula/s/shub.rb @@ -0,0 +1,110 @@ +class Shub < Formula + include Language::Python::Virtualenv + + desc "Scrapinghub command-line client" + homepage "https://shub.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/70/ad/b4fa99366cd3c8db8812438fb1e8b6f8a10b2935b0ee28ac238ade864a8f/shub-2.15.4.tar.gz" + sha256 "abd656f488449a6f88084cfc6f0e5bf1e015377f9777a02f35ae5dd44179434a" + license "BSD-3-Clause" + revision 6 + head "https://github.com/scrapinghub/shub.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "4781bcf903876d3e70218937f589900ede7f534a4a893d67269763f3b06fda1a" + sha256 cellar: :any, arm64_sequoia: "35143c65a8df1962740d601e836e5c7fb048062d0da643033faa27c043f74471" + sha256 cellar: :any, arm64_sonoma: "4a23c0592d955d8659b404cf6d1029d5c6757e77bad7e4dde9744b1579b50df6" + sha256 cellar: :any, sonoma: "13a95f502590f8f3bdcb7139ae48d30225ef480be2b0bd8b30be80cc8fb49c24" + sha256 cellar: :any_skip_relocation, arm64_linux: "041317ea0a08ec8982747b92db67afd59271c15de11b04c6f3841393fe87cb5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e394a7dd1d0efb9755239aeceb9c316e51e6bd83ca2701a00a7b542f03d99d71" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "retrying" do + url "https://files.pythonhosted.org/packages/c8/5a/b17e1e257d3e6f2e7758930e1256832c9ddd576f8631781e6a072914befa/retrying-1.4.2.tar.gz" + sha256 "d102e75d53d8d30b88562d45361d6c6c934da06fab31bd81c0420acb97a8ba39" + end + + resource "scrapinghub" do + url "https://files.pythonhosted.org/packages/99/63/7fb80a7ae2e21f2cadadbf442bb8b3c7025bb9b055c873803c204d19b162/scrapinghub-2.5.0.tar.gz" + sha256 "1c2324cca7c2d0d7a0d9c12e3270f4a158cc1b3a96a100e55d37c2154552a313" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/9c/97/6627aaf69c42a41d0d22a54ad2bf420290e07da82448823dcd6851de427e/tqdm-4.55.1.tar.gz" + sha256 "556c55b081bd9aa746d34125d024b73f0e2a0e62d5927ff0e400e20ee0a03b9a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"shub", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/shub version") + + assert_match "Error: Missing argument 'SPIDER'.", + shell_output("#{bin}/shub schedule 2>&1", 2) + end +end diff --git a/Formula/s/shuffledns.rb b/Formula/s/shuffledns.rb new file mode 100644 index 0000000000000..dd23c7f3226f4 --- /dev/null +++ b/Formula/s/shuffledns.rb @@ -0,0 +1,32 @@ +class Shuffledns < Formula + desc "Enumerate subdomains using active bruteforce & resolve subdomains with wildcards" + homepage "https://github.com/projectdiscovery/shuffledns" + url "https://github.com/projectdiscovery/shuffledns/archive/refs/tags/v1.1.0.tar.gz" + sha256 "32507e92a754fce3bad6c6445a4199c11be298c0994719a39711e0354bde318f" + license "GPL-3.0-or-later" + head "https://github.com/projectdiscovery/shuffledns.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b603af4991e0ab74445ec68e50e92e2908275ff1b542ecaf3e26e273d5098d57" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa3569e66c96377923452d14e75ca31cdbaa56b933e83990cbe14cff5294de31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e1612f9b88c47df30bb100d925fcca6e895af63ce28e4cab15d46690f1865cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "47bc85e79674caa717eb81f2a25477b97818c9f0474ae750f982eeb29e168d32" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1041cd41f8c3b6c33a84a3c9d1469900f9fb107006a292f4bf536aab5a162624" + sha256 cellar: :any_skip_relocation, sonoma: "21f1a219457544d652c1b6d3838083e76761ce2897f79e25733b98a08f7ec9b2" + sha256 cellar: :any_skip_relocation, ventura: "6965ff8e440d2d14b37fb9e8d06af4907996caf60f7e1e2ae112b070d81aacf5" + sha256 cellar: :any_skip_relocation, monterey: "f0a3cb15f0ed449872b08e8b200e1ce1489b7a3dcf4a75ab4863011d34d80e4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e5baacbe7dffd3ff78ab2c29b3d3ca8a747b9dbe7483d0308afded73492ebec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "324ae3f2ba05183d904a13a1c9f1d5ec796082b85c7883b264cff1f081972573" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/shuffledns" + end + + test do + assert_match "resolver file doesn't exists", shell_output("#{bin}/shuffledns 2>&1", 1) + assert_match version.to_s, shell_output("#{bin}/shuffledns -version 2>&1") + end +end diff --git a/Formula/s/shunit2.rb b/Formula/s/shunit2.rb new file mode 100644 index 0000000000000..b3f91f62e7908 --- /dev/null +++ b/Formula/s/shunit2.rb @@ -0,0 +1,22 @@ +class Shunit2 < Formula + desc "Unit testing framework for Bourne-based shell scripts" + homepage "https://github.com/kward/shunit2" + url "https://github.com/kward/shunit2/archive/refs/tags/v2.1.8.tar.gz" + sha256 "b2fed28ba7282e4878640395284e43f08a029a6c27632df73267c8043c71b60c" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b706f44b77486bdf9fc7629b0fed435e9e5592055c847f7d2bda9f4ed84d8cc2" + end + + def install + bin.install "shunit2" + end + + test do + system bin/"shunit2" + end +end diff --git a/Formula/s/shush.rb b/Formula/s/shush.rb new file mode 100644 index 0000000000000..e51e07d9a0f31 --- /dev/null +++ b/Formula/s/shush.rb @@ -0,0 +1,33 @@ +class Shush < Formula + desc "Encrypt and decrypt secrets using the AWS Key Management Service" + homepage "https://github.com/realestate-com-au/shush" + url "https://github.com/realestate-com-au/shush/archive/refs/tags/v1.5.5.tar.gz" + sha256 "b759401d94b2ebcc4a5561e28e1c533f3bd19aaa75eb0a48efc53c71f864e11b" + license "MIT" + head "https://github.com/realestate-com-au/shush.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eb7a0c98b5ea7620cc88ee17ad45fcb0897fec6752592c0ce4c177602e3f3700" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "38e8b3daac478d4f716b340df549741e7bd46d2fead43762a20e896357f73697" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38e8b3daac478d4f716b340df549741e7bd46d2fead43762a20e896357f73697" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38e8b3daac478d4f716b340df549741e7bd46d2fead43762a20e896357f73697" + sha256 cellar: :any_skip_relocation, sonoma: "2f4578b270925b1861d476ea6e55e5aed44e3d690f27c9a2118e2079f3ed1fc7" + sha256 cellar: :any_skip_relocation, ventura: "2f4578b270925b1861d476ea6e55e5aed44e3d690f27c9a2118e2079f3ed1fc7" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee89a1978ca2de39602e1e0b0bdd7b66b01a428af95621dc9b6c7b2f66297753" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5dd8b6893291ab04f6aab2a7928e694cef9601feddc6b7bf4f59b1f54df023a3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/shush encrypt brewtest 2>&1", 64) + assert_match "ERROR: please specify region (--region or $AWS_DEFAULT_REGION)", output + + assert_match version.to_s, shell_output("#{bin}/shush --version") + end +end diff --git a/Formula/s/shuttle-cli.rb b/Formula/s/shuttle-cli.rb new file mode 100644 index 0000000000000..671ba60ad03ab --- /dev/null +++ b/Formula/s/shuttle-cli.rb @@ -0,0 +1,53 @@ +class ShuttleCli < Formula + desc "CLI for handling shared build and deploy tools between many projects" + homepage "https://github.com/lunarway/shuttle" + url "https://github.com/lunarway/shuttle/archive/refs/tags/v0.24.3.tar.gz" + sha256 "4a8b93f01e9e21e543c393f59214145850895c89c2c6924a7faac6f8f12292cb" + license "Apache-2.0" + head "https://github.com/lunarway/shuttle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5e8bb4b72731ce957e8642a4dc363c0119c12298a191e3f774d130e0d947db0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6239f4fa616ca21a781595b6da437d6debcb1ad013242c33c3a54aba9764da64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6239f4fa616ca21a781595b6da437d6debcb1ad013242c33c3a54aba9764da64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6239f4fa616ca21a781595b6da437d6debcb1ad013242c33c3a54aba9764da64" + sha256 cellar: :any_skip_relocation, sonoma: "5aed20ea25a270dd87249277003e75da31e91988fb461b95596b727bb35df25c" + sha256 cellar: :any_skip_relocation, ventura: "5aed20ea25a270dd87249277003e75da31e91988fb461b95596b727bb35df25c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0b8712fd91bde4dc653e8e37e4cb0030b864707178c2ec10b358fea9b14a0ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be0bb28ca0505b75b4c6606f528eac6a2b6fdbb1e40e1ed3fb788793114daaff" + end + + depends_on "go" => :build + + conflicts_with "cargo-shuttle", because: "both install `shuttle` binaries" + + def install + ldflags = %W[ + -s -w + -X github.com/lunarway/shuttle/cmd.version=#{version} + -X github.com/lunarway/shuttle/cmd.commit=#{tap.user} + ] + system "go", "build", *std_go_args(output: bin/"shuttle", ldflags:) + + generate_completions_from_executable(bin/"shuttle", "completion", shells: [:bash, :zsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/shuttle version") + + (testpath/"shuttle.yaml").write <<~YAML + plan: 'https://github.com/lunarway/shuttle-example-go-plan.git' + vars: + docker: + baseImage: golang + baseTag: stretch + destImage: repo-project + destTag: latest + YAML + + assert_match "Plan:", shell_output("#{bin}/shuttle config") + + output = shell_output("#{bin}/shuttle telemetry upload 2>&1", 1) + assert_match "SHUTTLE_REMOTE_TRACING_URL or upload-url is not set", output + end +end diff --git a/Formula/s/shyaml.rb b/Formula/s/shyaml.rb new file mode 100644 index 0000000000000..f2ecb081e452f --- /dev/null +++ b/Formula/s/shyaml.rb @@ -0,0 +1,51 @@ +class Shyaml < Formula + include Language::Python::Virtualenv + + desc "Command-line YAML parser" + homepage "https://github.com/0k/shyaml" + url "https://files.pythonhosted.org/packages/b9/59/7e6873fa73a476de053041d26d112b65d7e1e480b88a93b4baa77197bd04/shyaml-0.6.2.tar.gz" + sha256 "696e94f1c49d496efa58e09b49c099f5ebba7e24b5abe334f15e9759740b7fd0" + license "BSD-2-Clause" + revision 2 + head "https://github.com/0k/shyaml.git", branch: "master" + + bottle do + rebuild 6 + sha256 cellar: :any, arm64_tahoe: "84f85648e8f7a9e3b6d23bc774b4035e68987ec320afa9a26681a34984f54606" + sha256 cellar: :any, arm64_sequoia: "12253411fc0733aeb8580e76eb8c498e968d5fbf26fc2c9ee0a969ed3d81f896" + sha256 cellar: :any, arm64_sonoma: "8bc9980e56a28c35bb9e73b018296a99a2d327d00886079362e13074516bcf6c" + sha256 cellar: :any, sonoma: "53720f2b4c3d835c02119ee91e3108b5aa9adda2ec3fda2964d672a8c42f11ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "06fdc63c06d8747e6865af44a5e5b93a6c69688b03957c5d2e5f8bd77f98d52d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94fa46b2c7b21233b659a07743538eca11873d6787515cf74b98b8632e014abf" + end + + # Last release in 2020, needs patch to build with modern setuptools + deprecate! date: "2025-10-26", because: :unmaintained, replacement_formula: "yq" + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + # Remove unneeded/broken d2to1: https://github.com/0k/shyaml/pull/67 + inreplace "setup.py", "setup_requires=['d2to1'],", "#setup_requires=['d2to1']," + inreplace "setup.cfg", "[entry_points]", "[options.entry_points]" + virtualenv_install_with_resources + end + + test do + yaml = <<~YAML + key: val + arr: + - 1st + - 2nd + YAML + assert_equal "val", pipe_output("#{bin}/shyaml get-value key", yaml, 0) + assert_equal "1st", pipe_output("#{bin}/shyaml get-value arr.0", yaml, 0) + assert_equal "2nd", pipe_output("#{bin}/shyaml get-value arr.-1", yaml, 0) + end +end diff --git a/Formula/s/sic.rb b/Formula/s/sic.rb new file mode 100644 index 0000000000000..52a9648223d5b --- /dev/null +++ b/Formula/s/sic.rb @@ -0,0 +1,35 @@ +class Sic < Formula + desc "Minimal multiplexing IRC client" + homepage "https://tools.suckless.org/sic/" + url "https://dl.suckless.org/tools/sic-1.3.tar.gz" + sha256 "30478fab3ebc75f2eb5d08cbb5b2fedcaf489116e75a2dd7197e3e9c733d65d2" + license "MIT" + head "https://git.suckless.org/sic/", using: :git, branch: "master" + + livecheck do + url "https://dl.suckless.org/tools/" + regex(/href=.*?sic[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7d152ce0d8b3a19197f66e697c611d405ce241c2bc5a05cd48dafbc9e358e381" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f028ab4b890ec81ff5bf82098d31f3f805d3a9efed26328bc83fc3929980af92" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "181b20a9474e97e9650248f715220259b3716ee65258beb6e511d9513fd7d752" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6c210a33d10989dd50a31cabeee9e2a560befb330f79e13a0a561a7be515cbae" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fe8b5bc082f2ee0489f175edb22dd2c8e3128f584f9f6ee7777f852d90340644" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d028cc40c4c63b26365753fbdb90d0d8880fa5114b88af26fbdb4570faacf019" + sha256 cellar: :any_skip_relocation, sonoma: "41f60a36d36c43f83fad82d79477d1d59b34ae634e503d91c855a95241a58fa5" + sha256 cellar: :any_skip_relocation, ventura: "c82a6f606d883c125acc102b457fa5e38d1475665f5c99e1715840cd6f00edd5" + sha256 cellar: :any_skip_relocation, monterey: "996dcadfff9c9eb20d7a45ef0a796ab28420d2d90aecb81a69566de271798967" + sha256 cellar: :any_skip_relocation, big_sur: "d2b8f0304692bb2bc7442affab89105413028b7ebcb0a2b7e6504518ef0bc5ed" + sha256 cellar: :any_skip_relocation, catalina: "f61b9190993e7ba1f4d4e5b98f751db0965a7bb72db8023e5f8ebf272568540a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d7904a3996132de7d25f87b6872a0d572d92612e551697b52d68b9940120b32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa93fbe3a3e4ed400bfdad52b0ba893161505e7579e5c1731a9f28a7e993f59a" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end +end diff --git a/Formula/s/sickchill.rb b/Formula/s/sickchill.rb new file mode 100644 index 0000000000000..72709719dfa38 --- /dev/null +++ b/Formula/s/sickchill.rb @@ -0,0 +1,420 @@ +class Sickchill < Formula + include Language::Python::Virtualenv + + desc "Automatic Video Library Manager for TV Shows" + homepage "https://sickchill.github.io" + url "https://files.pythonhosted.org/packages/31/fc/337b2989dc67bbb505cea34a05c029cbba3056311177586835f704ddc13a/sickchill-2024.3.1.tar.gz" + sha256 "e7079bb77b415eb6697a63d9018db1ad317d06ad285d0d77893747cbf000aa17" + license "GPL-3.0-or-later" + revision 3 + head "https://github.com/SickChill/SickChill.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b827a5bd276086d731ceb0389a40b264ebc405f88ff9a3a7f5c891c7093e929" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3af82a1bf3ea538252adc3f10a79801e1aca2d84dfb4bcc74391b67754afc765" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5c3d35af1b7bb28eb938451360999327b9c58dca8e2bc8741ca45a219716b2d" + sha256 cellar: :any_skip_relocation, sonoma: "ad13fdce74d46cea035deb76e0897e670847ecd9fa853a12290dc4616f25f17c" + sha256 cellar: :any_skip_relocation, arm64_linux: "73063208845aa7f7937028f3848d08b45133a27925f1f3f15e699b036c0310ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b0e5c976dc0e5e731322237a48d909e9bb03717a5dbd6b9654d45ea9c01b459" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: %w[certifi cryptography], + extra_packages: "setuptools" + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "babelfish" do + url "https://files.pythonhosted.org/packages/c5/8f/17ff889327f8a1c36a28418e686727dabc06c080ed49c95e3e2424a77aa6/babelfish-0.6.1.tar.gz" + sha256 "decb67a4660888d48480ab6998309837174158d0f1aa63bebb1c2e11aab97aab" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "beekeeper-alt" do + url "https://files.pythonhosted.org/packages/28/68/b1c59d68275715e5174c0ec0185d3ceca3223933a6a35cda31389438e545/beekeeper-alt-2022.9.3.tar.gz" + sha256 "18addaa163febd69a9e1ec4ec4dddc210785c94c6c1f9b2bcb2a73451b2f23e3" + end + + resource "bencode-py" do + url "https://files.pythonhosted.org/packages/e8/6f/1fc1f714edc73a9a42af816da2bda82bbcadf1d7f6e6cae854e7087f579b/bencode.py-4.0.0.tar.gz" + sha256 "2a24ccda1725a51a650893d0b63260138359eaa299bb6e7a09961350a2a6e05c" + end + + resource "cachecontrol" do + url "https://files.pythonhosted.org/packages/58/3a/0cbeb04ea57d2493f3ec5a069a117ab467f85e4a10017c6d854ddcbff104/cachecontrol-0.14.3.tar.gz" + sha256 "73e7efec4b06b20d9267b441c1f733664f989fb8688391b670ca812d70795d11" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "cinemagoer" do + url "https://files.pythonhosted.org/packages/06/de/3aa6eb738b5c5e39f1909bc080a392842841f9af866edb960de2f22af53c/cinemagoer-2023.5.1.tar.gz" + sha256 "5ce1d77ae6546701618f11e5b1556a19d18edecad1b6d7d96973ec34941b18f2" + + # Replace `pkgutil.find_loader` removed in 3.14: https://github.com/cinemagoer/cinemagoer/pull/543 + patch do + url "https://github.com/cinemagoer/cinemagoer/commit/fec0b1a0f90e2d6201f6fa5fd429f13d9b7a747d.patch?full_index=1" + sha256 "a9f225c42d011f07e0aabb9b29f19c666f8808206787d7e53f9d56df4d749edd" + end + # Backport https://github.com/cinemagoer/cinemagoer/commit/88a86cdacc7737d0fcfe299ad7a2e9b365ff379c and + # https://github.com/cinemagoer/cinemagoer/commit/cb4b61c3be3d7ed0bfc4f3cb506628c3cbb59828 + patch :DATA + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "deluge-client" do + url "https://files.pythonhosted.org/packages/f1/53/d6672ad7b44190d578ce7520822af34e7119760df9934cad4d730b0592a2/deluge-client-1.10.2.tar.gz" + sha256 "3881aee3c4e0ca9dd8a56b710047b837e1d087a83e421636a074771f92a9f1b5" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/e7/c8/301ff89746e76745b937606df4753c032787c59ecb37dd4d4250bddc8929/dogpile_cache-1.5.0.tar.gz" + sha256 "849c5573c9a38f155cd4173103c702b637ede0361c12e864876877d0cd125eec" + end + + resource "enzyme" do + url "https://files.pythonhosted.org/packages/dd/99/e4eee822d9390ebf1f63a7a67e8351c09fb7cd75262e5bb1a5256898def9/enzyme-0.4.1.tar.gz" + sha256 "f2167fa97c24d1103a94d4bf4eb20f00ca76c38a37499821049253b2059c62bb" + end + + resource "future" do + url "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz" + sha256 "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + end + + resource "gntp" do + url "https://files.pythonhosted.org/packages/c4/6c/fabf97b5260537065f32a85930eb62776e80ba8dcfed78d4247584fd9aa9/gntp-1.0.3.tar.gz" + sha256 "f4a4f2009ecb8bb41a1aaddd5fb7c03087b2a14cac2c03af029ba04b9166dae0" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/03/b8/704d753a5a45507a7aab61f18db9509302ed3d0a27ac7e0359ec2905b1a6/greenlet-3.2.4.tar.gz" + sha256 "0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d" + end + + resource "guessit" do + url "https://files.pythonhosted.org/packages/d0/07/5a88020bfe2591af2ffc75841200b2c17ff52510779510346af5477e64cd/guessit-3.8.0.tar.gz" + sha256 "6619fcbbf9a0510ec8c2c33744c4251cad0507b1d573d05c875de17edc5edbed" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "ifaddr" do + url "https://files.pythonhosted.org/packages/e8/ac/fb4c578f4a3256561548cd825646680edcadb9440f3f68add95ade1eb791/ifaddr-0.2.0.tar.gz" + sha256 "cc0cbfcaabf765d44595825fb96a99bb12c79716b73b44330ea38ee2b0c4aed4" + end + + resource "imagesize" do + url "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz" + sha256 "69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a" + end + + resource "ipaddress" do + url "https://files.pythonhosted.org/packages/b9/9a/3e9da40ea28b8210dd6504d3fe9fe7e013b62bf45902b458d1cdc3c34ed9/ipaddress-1.0.23.tar.gz" + sha256 "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2" + end + + resource "jsonrpclib-pelix" do + url "https://files.pythonhosted.org/packages/79/21/51a59adb17c2aa27ec3cef8787485df66e06c29f08e19a9d554e45b8f56d/jsonrpclib_pelix-0.4.3.4.tar.gz" + sha256 "e82d6f4da907a7d111ef93fd2361c8c20b79d248be4fe99678e08626aa8fcbef" + end + + resource "kodipydent-alt" do + url "https://files.pythonhosted.org/packages/dd/77/6695c399c31ffca5efa10eef3d07fd2b6b24176260477a909d35f0fc1a0b/kodipydent-alt-2022.9.3.tar.gz" + sha256 "61fc4e5565646a799c783bcf5ae7503223513906e3242bff2ecc8aa66dc80826" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markdown2" do + url "https://files.pythonhosted.org/packages/42/f8/b2ae8bf5f28f9b510ae097415e6e4cb63226bb28d7ee01aec03a755ba03b/markdown2-2.5.4.tar.gz" + sha256 "a09873f0b3c23dbfae589b0080587df52ad75bb09a5fa6559147554736676889" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz" + sha256 "3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e" + end + + resource "new-rtorrent-python" do + url "https://files.pythonhosted.org/packages/18/c6/67a7afff87d09baa7f43f35e94722a5affc4f0f9bd54671cf02008d9c6df/new-rtorrent-python-1.0.1a0.tar.gz" + sha256 "7a9319d6006b98bab66e68fbd79ec353c81c6e1aea2197a4e9097fd2760d3cfb" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "profilehooks" do + url "https://files.pythonhosted.org/packages/18/5a/c69fdf542b730c74b9de1cc2cc02692cd5d6a34a9d95e29217262937f91e/profilehooks-1.13.0.tar.gz" + sha256 "54a541cad49ddccee97b61a617404d7d736bf0bf79d36fbe2ac7caa3a1d9daaf" + end + + resource "putio-py" do + url "https://files.pythonhosted.org/packages/a6/2a/52bc4e441b680f3d50921e7142d54c8ff39a04cc13cfa1f2aca8301b24c6/putio_py-8.8.0.tar.gz" + sha256 "f9a40959f730d0af9c6fe5c9f1dae123a4cd6b2a82f57928a1890b05fb73b4c2" + end + + resource "pynma" do + url "https://files.pythonhosted.org/packages/6e/94/37a7ee7b0b8adec69797c3ac1b9a158f6b1ecb608bfe289d155c3b4fc816/PyNMA-1.0.tar.gz" + sha256 "f90a7f612d508b628daf022068967d2a103ba9b2355b53df12600b8e86ce855b" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + end + + resource "pysrt" do + url "https://files.pythonhosted.org/packages/31/1a/0d858da1c6622dcf16011235a2639b0a01a49cecf812f8ab03308ab4de37/pysrt-1.1.2.tar.gz" + sha256 "b4f844ba33e4e7743e9db746492f3a193dc0bc112b153914698e7c1cdeb9b0b9" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-slugify" do + url "https://files.pythonhosted.org/packages/87/c7/5e1547c44e31da50a460df93af11a535ace568ef89d7a811069ead340c4a/python-slugify-8.0.4.tar.gz" + sha256 "59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856" + end + + resource "python-twitter" do + url "https://files.pythonhosted.org/packages/59/63/5941b988f1a119953b046ae820bc443ada3c9e0538a80d67f3938f9418f1/python-twitter-3.5.tar.gz" + sha256 "45855742f1095aa0c8c57b2983eee3b6b7f527462b50a2fa8437a8b398544d90" + end + + resource "python3-fanart" do + url "https://files.pythonhosted.org/packages/2e/55/d09b26a5c3bc41e9b92cba5342f1801ea9e8c1bec0862a428401e24dfd19/python3-fanart-2.0.0.tar.gz" + sha256 "8bfb0605ced5be0123c9aa82c392e8c307e9c65bff47d545d6413bbb643a4a74" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "qbittorrent-api" do + url "https://files.pythonhosted.org/packages/d6/a9/88fce9b8c5e79bac74b0e9624ec8af2da8280dddc87f91298178aafb7759/qbittorrent_api-2024.12.71.tar.gz" + sha256 "4bb62ac075826d47529de562896bd97fe8527d2f55851ac3611d7b221c4507e2" + end + + resource "rarfile" do + url "https://files.pythonhosted.org/packages/26/3f/3118a797444e7e30e784921c4bfafb6500fb288a0c84cb8c32ed15853c16/rarfile-4.2.tar.gz" + sha256 "8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef" + end + + resource "rebulk" do + url "https://files.pythonhosted.org/packages/f2/06/24c69f8d707c9eefc1108a64e079da56b5f351e3f59ed76e8f04b9f3e296/rebulk-3.2.0.tar.gz" + sha256 "0d30bf80fca00fa9c697185ac475daac9bde5f646ce3338c9ff5d5dc1ebdfebc" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "send2trash" do + url "https://files.pythonhosted.org/packages/fd/3a/aec9b02217bb79b87bbc1a21bc6abc51e3d5dcf65c30487ac96c0908c722/Send2Trash-1.8.3.tar.gz" + sha256 "b18e7a3966d99871aefeb00cfbcfdced55ce4871194810fc71f4aa484b953abf" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "sqlalchemy" do + url "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz" + sha256 "0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "subliminal" do + url "https://files.pythonhosted.org/packages/dd/3a/ac02011988ad013f24a11cb6123a7ff9e17a75369964c7edd9f64bfea80f/subliminal-2.1.0.tar.gz" + sha256 "c6439cc733a4f37f01f8c14c096d44fd28d75d1f6f6e2d1d1003b1b82c65628b" + end + + resource "text-unidecode" do + url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" + sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + end + + resource "timeago" do + url "https://files.pythonhosted.org/packages/5f/88/8dac5496354650972434966ba570a4a824fafed43471cf190faea4b085fc/timeago-1.0.16-py3-none-any.whl" + sha256 "9b8cb2e3102b329f35a04aa4531982d867b093b19481cfbb1dac7845fa2f79b0" + end + + resource "tmdbsimple" do + url "https://files.pythonhosted.org/packages/a1/87/3309cb03df1c9f9895fccd87e9875050f19e2cfec5a50b9d72e50d420fc8/tmdbsimple-2.9.1.tar.gz" + sha256 "636eaaaec82027929e8a91c2166e01f552ec63f869bf1fcd65aa561b705c7464" + end + + resource "tornado" do + url "https://files.pythonhosted.org/packages/09/ce/1eb500eae19f4648281bb2186927bb062d2438c2e5093d1360391afd2f90/tornado-6.5.2.tar.gz" + sha256 "ab53c8f9a0fa351e2c0741284e06c7a45da86afb544133201c5cc8578eb076a0" + end + + resource "tus-py" do + url "https://files.pythonhosted.org/packages/54/3c/266c0aadca8969b8f4832e4975a86afe9c869b3ee6918a408b03619746d6/tus.py-1.3.4.tar.gz" + sha256 "b80feda87700aae629eb19dd98cec68ae520cd9b2aa24bd0bab2b777be0b4366" + end + + resource "tvdbsimple" do + url "https://files.pythonhosted.org/packages/73/7d/b8e4d5c5473d6f9a492bf30916fdbf96f06034e6d23fde31ccb86704e41c/tvdbsimple-1.0.6.tar.gz" + sha256 "a8665525fa8b7aaf1e15fc3eec18b6f181582e25468830f300ab3809dbe948fe" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "validators" do + url "https://files.pythonhosted.org/packages/9b/21/40a249498eee5a244a017582c06c0af01851179e2617928063a3d628bc8f/validators-0.22.0.tar.gz" + sha256 "77b2689b172eeeb600d9605ab86194641670cdb73b60afd577142a9397873370" + end + + resource "win-inet-pton" do + url "https://files.pythonhosted.org/packages/d9/da/0b1487b5835497dea00b00d87c2aca168bb9ca2e2096981690239e23760a/win_inet_pton-1.1.0.tar.gz" + sha256 "dd03d942c0d3e2b1cf8bab511844546dfa5f74cb61b241699fa379ad707dea4f" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/6a/aa/917ceeed4dbb80d2f04dbd0c784b7ee7bba8ae5a54837ef0e5e062cd3cfb/xmltodict-1.0.2.tar.gz" + sha256 "54306780b7c2175a3967cad1db92f218207e5bc1aba697d887807c0fb68b7649" + end + + def install + virtualenv_install_with_resources + end + + service do + run [opt_bin/"sickchill", "--datadir", var/"sickchill", "--quiet", "--nolaunch"] + keep_alive true + working_dir var/"sickchill" + end + + test do + port = free_port.to_s + pid = spawn bin/"sickchill", "--port", port, "--datadir", testpath, "--nolaunch" + sleep 30 + assert_path_exists testpath/"config.ini" + assert_path_exists testpath/"sickchill.db" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end + +__END__ +diff --git a/imdb/parser/http/piculet.py b/imdb/parser/http/piculet.py +index d0c2b7b..806c9f0 100644 +--- a/imdb/parser/http/piculet.py ++++ b/imdb/parser/http/piculet.py +@@ -32,7 +32,7 @@ from argparse import ArgumentParser + from collections import deque + from functools import partial + from operator import itemgetter +-from pkgutil import find_loader ++from importlib.util import find_spec + + __version__ = '1.2b1' + +@@ -202,7 +202,7 @@ def html_to_xhtml(document, omit_tags=None, omit_attrs=None): + # sigalias: XPathResult = Union[Sequence[str], Sequence[Element]] + + +-_USE_LXML = find_loader('lxml') is not None ++_USE_LXML = find_spec('lxml') is not None + if _USE_LXML: + from lxml import etree as ElementTree + from lxml.etree import Element diff --git a/Formula/s/sickle.rb b/Formula/s/sickle.rb new file mode 100644 index 0000000000000..e0df40148296a --- /dev/null +++ b/Formula/s/sickle.rb @@ -0,0 +1,43 @@ +class Sickle < Formula + desc "Windowed adaptive trimming for FASTQ files using quality" + homepage "https://github.com/najoshi/sickle" + url "https://github.com/najoshi/sickle/archive/refs/tags/v1.33.tar.gz" + sha256 "eab271d25dc799e2ce67c25626128f8f8ed65e3cd68e799479bba20964624734" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "96bd829e276dd51380027f17fac43fb49a54250e098079b9fc7f8e78b9f1bb27" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14f29f9f78cfd733320efeca1a531d5a22db8908185bf5340f1d806c554fe7d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c820fd16930b4e385a72a92abd1f57386b87ac03fee2ec19fb02996e22fc3ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e777fe310603467d2feaa5702bca61f2444c2b2e1e82cd2ba0bc21dfb7a2ccd7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "520c9e80b25890a25bb12baca208128352164a31aa7cb76111d9a4a918106c48" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "26c645faa585ff21ef7eee6c62ac906df4bef93dcceb3647168a7c89bcb7ed48" + sha256 cellar: :any_skip_relocation, sonoma: "3c5e65e60096e30d3b7fd852784a9c1ca888a368bc07d62a2308e2e677877c53" + sha256 cellar: :any_skip_relocation, ventura: "aa3b3a6e43a41be578a83db5967567233ae0958695485dba360ca79343b2e110" + sha256 cellar: :any_skip_relocation, monterey: "015b2cdfc919a31988a727c52852cef682f9ea2de7826f8e90b346071d32330c" + sha256 cellar: :any_skip_relocation, big_sur: "49cf432d5190d21d61d741d5d10c44e42d0fe5e40222f8af9dec1b35ff916029" + sha256 cellar: :any_skip_relocation, catalina: "f33fa7f23d66b928b117a8c3ccfd54a30dc5a798ed6444350be47ced2bebc49e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b5dd6e07778c6547aa63421d2aedbdf40c496ba3a95b89c393fde0d8211dea5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d084fefaf95e4433a64685c9c332964389911bbbdbb038aeeb87c2d16f06f2ab" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "sickle" + end + + test do + (testpath/"test.fastq").write <<~EOS + @U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + + + IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII0000000000 + EOS + cmd = "#{bin}/sickle se -f test.fastq -t sanger -o /dev/stdout" + assert_equal "GTGTC\n", shell_output(cmd).lines[1][-6..] + end +end diff --git a/Formula/s/sidekick.rb b/Formula/s/sidekick.rb new file mode 100644 index 0000000000000..20a70e05699f8 --- /dev/null +++ b/Formula/s/sidekick.rb @@ -0,0 +1,35 @@ +class Sidekick < Formula + desc "Deploy applications to your VPS" + homepage "https://github.com/MightyMoud/sidekick" + url "https://github.com/MightyMoud/sidekick/archive/refs/tags/v0.6.6.tar.gz" + sha256 "174224422622158ee78d423ac3c25bb9265914983a1f9b5b2e14543dcb0fe939" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "06a9d456f48cc6f1bd81a60abb4878924af11eaaf9a1789d1f742152933148b3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f5e190b61d1c87bb59f25cf984f5fdad673a7406eff0ccb3454bd68d0ce11ee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f5e190b61d1c87bb59f25cf984f5fdad673a7406eff0ccb3454bd68d0ce11ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1f5e190b61d1c87bb59f25cf984f5fdad673a7406eff0ccb3454bd68d0ce11ee" + sha256 cellar: :any_skip_relocation, sonoma: "d75fd55ec57420f0f8d4d769c8595427e2f93a6f826bfdbf5d96a144a90a41b6" + sha256 cellar: :any_skip_relocation, ventura: "d75fd55ec57420f0f8d4d769c8595427e2f93a6f826bfdbf5d96a144a90a41b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ca0bf33c36730419c4452ffb246562b00d594ee7e9ff677cd600dc587cb6392" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c30327aaf4244b393adc45eb87de8b24654c4ae8c7b837304f759b40df7c5045" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X 'github.com/mightymoud/sidekick/cmd.version=v#{version}'" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"sidekick", "completion") + end + + test do + assert_match "With sidekick you can deploy any number of applications to a single VPS", + shell_output(bin/"sidekick") + assert_match("Sidekick config not found - Run sidekick init", shell_output("#{bin}/sidekick deploy", 1)) + end +end diff --git a/Formula/s/siege.rb b/Formula/s/siege.rb new file mode 100644 index 0000000000000..8b77a9e0cefab --- /dev/null +++ b/Formula/s/siege.rb @@ -0,0 +1,70 @@ +class Siege < Formula + desc "HTTP regression testing and benchmarking utility" + homepage "https://www.joedog.org/siege-home/" + url "https://download.joedog.org/siege/siege-4.1.7.tar.gz" + sha256 "ec140cedd159979383d60dbe87a0151c2c12ada78791095a8fa84ae635b93026" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.joedog.org/siege/?C=M&O=D" + regex(/href=.*?siege[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "001bc8d61b3da2e018fe736581c85cb66c27d511247f835507e8b5ce193a4c2e" + sha256 arm64_sequoia: "08fabb8f6c318f991ed06f36d95d8f3734d4444bad46d886fb6fec1813b1e791" + sha256 arm64_sonoma: "2e4bd0d640a16f1b797e1d42706fa4e1eefb949f18135ce00abd1f8824b2b1a9" + sha256 arm64_ventura: "2e23a74480a04cfcba9aa6cab0d1f50cb5d6bfd048875c08f639dfce8b0f95da" + sha256 sonoma: "f76ae74125c7a43c4750a53af619149d76b80ddf3db0d49bfd0fcdaa44325796" + sha256 ventura: "2f96c850f0183940d41a32597e3eade26482d3c1e976c3655792867da71d5aef" + sha256 arm64_linux: "4d52a6c4509c34b372dfa5ed3766252be8890b517ce7041134137aa86a94c4b7" + sha256 x86_64_linux: "eebf365d3688b6e2d26a82deac2260ea8f1f7049b4fe602ade5d3c287631a341" + end + + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # workaround for newer clang + # notified upstream on the site on 2024-09-10 + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1403 + + # To avoid unnecessary warning due to hardcoded path, create the folder first + (prefix/"etc").mkdir + + args = [ + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--localstatedir=#{var}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + ] + args << "--with-zlib=#{MacOS.sdk_path_if_needed}/usr" if OS.mac? + + system "./configure", *args + system "make", "install" + end + + def caveats + <<~EOS + macOS has only 16K ports available that won't be released until socket + TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds. + Consider reducing in case of available port bottleneck. + + You can check whether this is a problem with netstat: + + # sysctl net.inet.tcp.msl + net.inet.tcp.msl: 15000 + + # sudo sysctl -w net.inet.tcp.msl=1000 + net.inet.tcp.msl: 15000 -> 1000 + + Run siege.config to create the ~/.siegerc config file. + EOS + end + + test do + system bin/"siege", "--concurrent=1", "--reps=1", "https://www.google.com/" + end +end diff --git a/Formula/s/sift.rb b/Formula/s/sift.rb new file mode 100644 index 0000000000000..c6698f9813c13 --- /dev/null +++ b/Formula/s/sift.rb @@ -0,0 +1,58 @@ +class Sift < Formula + desc "Fast and powerful open source alternative to grep" + homepage "https://sift-tool.org/" + url "https://github.com/svent/sift/archive/refs/tags/v0.9.0.tar.gz" + sha256 "bbbd5c472c36b78896cd7ae673749d3943621a6d5523d47973ed2fc6800ae4c8" + license "GPL-3.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9f002da076b35a37e62503ec58fe1ee19b6800f14467fdb6436de1dc648d9de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "677bc238dc0f303ab31800d2c3695539d2756365937c555a162b20a7c453da2e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "80ae5c278ab9dcb654474a7a2f0306dc5d96d4de01e73e96b69715aa48eeaad8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dbc851806c100acc052be58ce103f0b2b5304a79e22a1331f6541f4f37b88ef9" + sha256 cellar: :any_skip_relocation, sonoma: "f4d9aa5a4b8c3f188da9966e82d1aee1bae3c530a2180d2fa5a667ce314d00a4" + sha256 cellar: :any_skip_relocation, ventura: "676602a4f1fd5a0a903b5094ce0b5e044ca5c2bce6967d680683e7c4a641478c" + sha256 cellar: :any_skip_relocation, monterey: "2bf9fe6ef94f951254079c5e6bed757526b4b8bf68e2eeb862fa07c71302a32d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a5dc83483b444b3850237050f761c8967ce36008114dad661a1424aa6068da3" + end + + # https://github.com/svent/sift/issues/120 + deprecate! date: "2024-03-26", because: :unmaintained + disable! date: "2025-03-26", because: :unmaintained + + depends_on "go" => :build + + resource "github.com/svent/go-flags" do + url "https://github.com/svent/go-flags.git", + revision: "4bcbad344f0318adaf7aabc16929701459009aa3" + end + + resource "github.com/svent/go-nbreader" do + url "https://github.com/svent/go-nbreader.git", + revision: "7cef48da76dca6a496faa7fe63e39ed665cbd219" + end + + resource "golang.org/x/crypto" do + url "https://go.googlesource.com/crypto.git", + revision: "3c0d69f1777220f1a1d2ec373cb94a282f03eb42" + end + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + + (buildpath/"src/github.com/svent/sift").install buildpath.children + resources.each { |r| (buildpath/"src"/r.name).install r } + cd "src/github.com/svent/sift" do + system "go", "build", "-o", bin/"sift" + + bash_completion.install "sift-completion.bash" => "sift" + end + end + + test do + (testpath/"test.txt").write("where is foo\n") + assert_match "where is foo", shell_output("#{bin}/sift foo #{testpath}") + end +end diff --git a/Formula/s/sigi.rb b/Formula/s/sigi.rb new file mode 100644 index 0000000000000..164dfcafe6139 --- /dev/null +++ b/Formula/s/sigi.rb @@ -0,0 +1,33 @@ +class Sigi < Formula + desc "Organizing tool for terminal lovers that hate organizing" + homepage "https://sigi-cli.org" + url "https://github.com/sigi-cli/sigi/archive/refs/tags/v3.7.1.tar.gz" + sha256 "fff199ed3b717377af733324fd77568c5e3df8320c53bd26e8bf495d60818e38" + license "GPL-2.0-only" + head "https://github.com/sigi-cli/sigi.git", branch: "core" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6919573610314e15c997ee39d2bad28f9af840473162d61c58efd5839f7c297d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86da61c2b5d794b74bff13924cecb7f610034d1f4f9a25e7eace70b90cc57539" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e26706b19c0c5233a103c692b66c1b45dac5ebd6a735ed4e6d852861e4c3609a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e15523164561b9823dae8d7581719b486833df10ad957deea4b90420ae3baac2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "74e53c2d8ebc12f0e907082ebf6de4fabd1621f73ab8a4d47b7f7b2d4ed7155b" + sha256 cellar: :any_skip_relocation, sonoma: "b2d5f45cc3906d4191ce72b5e374846e0c5c57da3b8b61388d1b2b161691d7eb" + sha256 cellar: :any_skip_relocation, ventura: "3e61dd1fae21e604c077e1d83b6dab9add32ab5b77929bd80f7b10ba47232ce2" + sha256 cellar: :any_skip_relocation, monterey: "3473b320d33aea1cade3ba6927d4cf8cfe835a9086caba42898ff34177305397" + sha256 cellar: :any_skip_relocation, arm64_linux: "72e91818ac3c30e6f28617217c3b5eb3752fc013a7c94d42fa36686d07366846" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9956ee5542d2289d376febb6d44e752e588ddcae44a71d4d89cd2da14983f259" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + man1.install "sigi.1" + end + + test do + system bin/"sigi", "-st", "_brew_test", "push", "Hello World" + assert_equal "Hello World", shell_output("#{bin}/sigi -qt _brew_test pop").strip + end +end diff --git a/Formula/s/sigma-cli.rb b/Formula/s/sigma-cli.rb new file mode 100644 index 0000000000000..8e2a44966c0a2 --- /dev/null +++ b/Formula/s/sigma-cli.rb @@ -0,0 +1,132 @@ +class SigmaCli < Formula + include Language::Python::Virtualenv + + desc "CLI based on pySigma" + homepage "https://github.com/SigmaHQ/sigma-cli" + url "https://files.pythonhosted.org/packages/5a/69/8c7583ddca7b3bb369a497526c56131b674eeae6cf6e4ccdb2f16922188c/sigma_cli-1.0.6.tar.gz" + sha256 "5cd4471fcda44ea8e5671c81cc86bc685227107df57e128b75e125ee3d6d4123" + license "LGPL-2.1-or-later" + revision 2 + head "https://github.com/SigmaHQ/sigma-cli.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "ccde194db00a05ca3a6b270c45038315ec21f53d1d4915ba540118adc7712b40" + sha256 cellar: :any, arm64_sequoia: "77e8ccc39d5b42a86d80a9d68020dfc1a1b51ce69167a4f3c96e06b681887cfb" + sha256 cellar: :any, arm64_sonoma: "b6fe6a8243c8ae4a1d942fa5210266f490226f870ce8a7b741fc0ccb12a752ff" + sha256 cellar: :any, sonoma: "37b40a2294883b7879c63a29b7d4632186daed7f0b5bbbe9543bf400e393374e" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f6d367b7e528e29b9ba1243daea9e68fa066660ffebac8d7f5116e47ddaa399" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1726d31adcbfdf2759f6a52e550c74513b8d65ae9a5d1d8eafcc4fa12071aba0" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + conflicts_with "open-simh", because: "both install `sigma` binaries" + + pypi_packages exclude_packages: "certifi", + extra_packages: "pysigma-backend-sqlite" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pysigma" do + url "https://files.pythonhosted.org/packages/a7/b8/8eff31a60505197d2e0b99eded0e5e75fa8197b5b4f62176a0b76d76a651/pysigma-0.11.23.tar.gz" + sha256 "9556852055ba28c8df4c8e283f58136f722c4a18d31c7ac3ede6dbcfdd14871a" + end + + resource "pysigma-backend-sqlite" do + url "https://files.pythonhosted.org/packages/72/63/e618d84f770f982afa5f8e99a93c99c48bd87992d1ba4cc961aab6ba15e9/pysigma_backend_sqlite-0.2.0.tar.gz" + sha256 "0ff1bbb0165477e938e2951808ba348bd29803fd3fae5c4cbcd117532e622217" + + # poetry 2.0 build patch, upstream pr ref, https://github.com/SigmaHQ/pySigma-backend-sqlite/pull/6 + patch do + url "https://github.com/SigmaHQ/pySigma-backend-sqlite/commit/865350ce1a398acd7182f6f8429c3048db54ef1d.patch?full_index=1" + sha256 "aff54090de9eecf5e5c0d69abd3be294ca86eba6b2e58d0c574528bd6058bfc4" + end + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sigma", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/sigma version") + + output = shell_output("#{bin}/sigma plugin list") + assert_match "SQLite and Zircolite backend", output + + # Only show compatible plugins + output = shell_output("#{bin}/sigma plugin list --compatible") + refute_match "IBM QRadar backend", output + end +end diff --git a/Formula/s/signal-cli.rb b/Formula/s/signal-cli.rb new file mode 100644 index 0000000000000..abe81aeb753dc --- /dev/null +++ b/Formula/s/signal-cli.rb @@ -0,0 +1,81 @@ +class SignalCli < Formula + desc "CLI and dbus interface for WhisperSystems/libsignal-service-java" + homepage "https://github.com/AsamK/signal-cli" + url "https://github.com/AsamK/signal-cli/archive/refs/tags/v0.13.21.tar.gz" + sha256 "3b751f8989a48a0d39c87d349d311541ba3ec286f7fb8de752596c4d07788728" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eb591048816fdfd36313952cfb10a9a02f40765fd87261faf75fbd68d7b3c070" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57ffb2cba1df9792aa26133a3c7e2180f6b7ebd3f9076a405d7155c140480e7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3eba953dea665181ed5576e95f58e2f9d81fd878f2610131f742020ccc849f83" + sha256 cellar: :any_skip_relocation, sonoma: "1cd331161e9d7ffe6f3c83a10261c075c28398ad75923eb7b8a76449626898ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4981149ba16679746d5ad9e28af664c9bd8994c1fdd92f630d3aeff2ec7c8f84" + end + + depends_on "cmake" => :build # For `boring-sys` crate in `libsignal-client` + depends_on "gradle" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + + depends_on "openjdk@21" + + uses_from_macos "llvm" => :build # For `libclang`, used by `boring-sys` crate + uses_from_macos "zip" => :build + + on_linux do + depends_on arch: :x86_64 # `:libsignal-cli:test` failure, https://github.com/AsamK/signal-cli/issues/1787 + end + + # https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal#determine-the-required-libsignal-client-version + # To check the version of `libsignal-client`, run: + # url=https://github.com/AsamK/signal-cli/releases/download/v$version/signal-cli-$version.tar.gz + # curl -fsSL $url | tar -tz | grep libsignal-client + resource "libsignal-client" do + url "https://github.com/signalapp/libsignal/archive/refs/tags/v0.84.0.tar.gz" + sha256 "eb68997586ce8a0f3bfcb57a35b3bab9e45364e371dd37d0d55ab28f3a9671a2" + end + + def install + ENV["JAVA_HOME"] = Language::Java.java_home("21") + system "gradle", "build" + system "gradle", "installDist" + libexec.install (buildpath/"build/install/signal-cli").children + (libexec/"bin/signal-cli.bat").unlink + (bin/"signal-cli").write_env_script libexec/"bin/signal-cli", Language::Java.overridable_java_home_env("21") + + resource("libsignal-client").stage do |r| + # https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal#manual-build + + libsignal_client_jar = libexec.glob("lib/libsignal-client-*.jar").first + embedded_jar_version = Version.new(libsignal_client_jar.to_s[/libsignal-client-(.*)\.jar$/, 1]) + res = r.resource + odie "#{res.name} needs to be updated to #{embedded_jar_version}!" if embedded_jar_version != res.version + + system "zip", "-d", libsignal_client_jar, "libsignal_jni_*.so", "libsignal_jni_*.dylib", "signal_jni_*.dll" + + cd "java" do + inreplace "settings.gradle", "include ':android'", "" + system "./build_jni.sh", "desktop" + cd "client/src/main/resources" do + arch = Hardware::CPU.intel? ? "amd64" : "aarch64" + system "zip", "-u", libsignal_client_jar, shared_library("libsignal_jni_#{arch}") + end + end + end + end + + test do + output = shell_output("#{bin}/signal-cli --version") + assert_match "signal-cli #{version}", output + + begin + io = IO.popen("#{bin}/signal-cli link", err: [:child, :out]) + sleep 24 + ensure + Process.kill("SIGINT", io.pid) + Process.wait(io.pid) + end + assert_match "sgnl://linkdevice?uuid=", io.read + end +end diff --git a/Formula/s/signify-osx.rb b/Formula/s/signify-osx.rb new file mode 100644 index 0000000000000..70d39a6a8b010 --- /dev/null +++ b/Formula/s/signify-osx.rb @@ -0,0 +1,36 @@ +class SignifyOsx < Formula + desc "Cryptographically sign and verify files" + homepage "https://man.openbsd.org/signify.1" + url "https://github.com/jpouellet/signify-osx/archive/refs/tags/1.4.tar.gz" + sha256 "5aa954fe6c54f2fc939771779e5bb64298e46d0a4ae3d08637df44c7ed8d2897" + license "ISC" + head "https://github.com/jpouellet/signify-osx.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c842d35a800bb257d062f172d661077ece1018ed30363125aebbed7ee079611f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f645784096049b48c18e71ae3891a4430473389e52cad0c647233875bc2716b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0bfd86e88cdf725bd2e3496959793a3f4315e08f82c1de9e2c3778fc50e92c31" + sha256 cellar: :any_skip_relocation, arm64_ventura: "61d6a3ff6667bb16d42a052ed831e635048647d2d6bb0b0828d03a8c0b8da1cf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b524debbee38eb3d651123e84189121d4249051dec29bf21c02d8e094916cdd6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "04f7c99002246fb5765666759b9a5a1f7e461a6d2d0c77e360af77951ee5de97" + sha256 cellar: :any_skip_relocation, sonoma: "0ca975d083283f781a14ea2681ca894d2c17cf15b9bdb77c8a0f44070022de85" + sha256 cellar: :any_skip_relocation, ventura: "b3118edf392c51017526fab8898c14855b9e3531fdebe3a0d98b65faf279e341" + sha256 cellar: :any_skip_relocation, monterey: "f3b58c34d1a01564e16b46364359f42330e1279f2a90025ce7541c9d5f69f370" + sha256 cellar: :any_skip_relocation, big_sur: "0a60c4b4955d38a1effe307e2326373c069621c1135e28820783aedd5aba9788" + sha256 cellar: :any_skip_relocation, catalina: "74a8c2fa3d258ad59a5ab7302411a194903ea5295fbf5ecd95a43c2ac28677f4" + end + + depends_on :macos + + def install + system "make" + system "make", "test" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"signify", "-G", "-n", "-p", "test.pub", "-s", "test.sec" + end +end diff --git a/Formula/s/signmykey.rb b/Formula/s/signmykey.rb new file mode 100644 index 0000000000000..3d06c47ad9e00 --- /dev/null +++ b/Formula/s/signmykey.rb @@ -0,0 +1,38 @@ +class Signmykey < Formula + desc "Automated SSH Certificate Authority" + homepage "https://signmykey.io/" + url "https://github.com/signmykeyio/signmykey/archive/refs/tags/v0.8.9.tar.gz" + sha256 "106a3a3d07aa2841d280ab378ce382a2bfca10101080936e2b02c4cc4e7d7392" + license "MIT" + head "https://github.com/signmykeyio/signmykey.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "27f091d7952b6c13a343a1fa9977c509f2875a64becc8abdf4b33be742e4d208" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27f091d7952b6c13a343a1fa9977c509f2875a64becc8abdf4b33be742e4d208" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "27f091d7952b6c13a343a1fa9977c509f2875a64becc8abdf4b33be742e4d208" + sha256 cellar: :any_skip_relocation, sonoma: "a461a5e9e52319c9c2c250e65ac57ce72df6ae095fd8170083cf7852dc8144cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "a35476497be7495bb9b6a1897532f5f372b4f3ac8acaf7da80b50e6357d86f08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5dd151516a08ba5eb54ec55bd82b3fed379f2286b2ca5e00caf2a0e3a671bb62" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/signmykeyio/signmykey/cmd.versionString=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"signmykey", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/signmykey version") + + require "pty" + stdout, _stdin, _pid = PTY.spawn("#{bin}/signmykey server dev -u myremoteuser") + sleep 2 + assert_match "Starting signmykey server in DEV mode", stdout.readline + end +end diff --git a/Formula/s/sigrok-cli.rb b/Formula/s/sigrok-cli.rb new file mode 100644 index 0000000000000..bcff7eff4c47b --- /dev/null +++ b/Formula/s/sigrok-cli.rb @@ -0,0 +1,60 @@ +class SigrokCli < Formula + desc "Sigrok command-line interface to use logic analyzers and more" + homepage "https://sigrok.org/" + url "https://sigrok.org/download/source/sigrok-cli/sigrok-cli-0.7.2.tar.gz" + sha256 "71d0443f36897bf565732dec206830dbea0f2789b6601cf10536b286d1140ab8" + license "GPL-3.0-or-later" + + livecheck do + url "https://sigrok.org/wiki/Downloads" + regex(/href=.*?sigrok-cli[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "702bb4ee199576914bbcb83e20cfe4e4e960877ec8a9e1bc112910abc180efbb" + sha256 cellar: :any, arm64_sequoia: "fd787456a3085648cbf83f56294acc9c37579a5dba2338d8d56c74710c03ee90" + sha256 cellar: :any, arm64_sonoma: "a5e82221775d890da9132fdc4326606838e1622c0e692248e2e2efd54839893e" + sha256 cellar: :any, arm64_ventura: "c829705552edd7e001c393e73954a4f95a3b50319994943897c05858e3734998" + sha256 cellar: :any, arm64_monterey: "f097768e26c50de6aafacfb8e1e1db78837620683d42dd1cca848c0797794bd0" + sha256 cellar: :any, arm64_big_sur: "176086043c5408747b737bf7f8984b966cc23f409977ebd4d01b4f127d7fb580" + sha256 cellar: :any, sonoma: "e0ab196bf123ced48ba23364127c709e7cd3dde29842600e29983b9ecc5a7d14" + sha256 cellar: :any, ventura: "57ec56b4589b3801668bb98fd0c83298ec5958e111bec41a5294f48257db7769" + sha256 cellar: :any, monterey: "c66c8195acaf4a1865d2df389b0295f9ccf6cca5f4cf6db78b3ad686c35bc3fd" + sha256 cellar: :any, big_sur: "5a02c04e5b3148c70995ca652850eb8146ab436d102c19f5c96b39a578c5b31e" + sha256 cellar: :any, catalina: "79af0118b674614921744d9f9a29c929e95ec0a5b60613ddbd31fa27f3fa18af" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba72045f4b14e589786904ff79dd12e08890d0379ede83f2454f75333d314e4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b58556d1098376a5d2f261f7e437a18bfa72b6cf8ba63deec1595422ee63c4f" + end + + head do + url "git://sigrok.org/sigrok-cli", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libsigrok" + depends_on "libsigrokdecode" + + on_macos do + depends_on "gettext" + end + + def install + system "./autogen.sh" if build.head? + mkdir "build" do + system "../configure", *std_configure_args + system "make", "install" + end + end + + test do + # Make sure that we can capture samples from the demo device + system bin/"sigrok-cli", "-d", "demo", "--samples", "1" + end +end diff --git a/Formula/s/sigstore.rb b/Formula/s/sigstore.rb new file mode 100644 index 0000000000000..dcd26b9a5d8f9 --- /dev/null +++ b/Formula/s/sigstore.rb @@ -0,0 +1,178 @@ +class Sigstore < Formula + include Language::Python::Virtualenv + + desc "Codesigning tool for Python packages" + homepage "https://github.com/sigstore/sigstore-python" + url "https://files.pythonhosted.org/packages/64/1e/8c115a155b67254b52780730bc86edf90d108d172377e526ce91e42ba9de/sigstore-4.1.0.tar.gz" + sha256 "312f7f73fe27127784245f523b86b6334978c555fe4ba7831be5602c089807c1" + license "Apache-2.0" + head "https://github.com/sigstore/sigstore-python.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5f6a3144268a09f91e924deff1f260f4d7a8f3bf65dcce88ca86ab3af9898dd6" + sha256 cellar: :any, arm64_sequoia: "2da24f85f85d7bf802500d156d81cce3e133b0fb65070ce40025ca55b9de13a6" + sha256 cellar: :any, arm64_sonoma: "ac787d45016a6e8d6187ee08c3a89199fd295adfae749366ac14f980d62c2324" + sha256 cellar: :any, sonoma: "8305284019eb44ee024a4768085ba7538e33b1376c6bf3c6a402196b70809de4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2274224bb4a39cca47886cb2c14aa8eed37ee5f65e3a2286628ecc941aa6a5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3213e0f221d2152ebb28c80ef0fe012ed4be255767f85053765e4ec10477c53e" + end + + depends_on "pkgconf" => :build # for rfc3161-client + depends_on "rust" => :build # for rfc3161-client + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "openssl@3" # for rfc3161-client + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "email-validator" do + url "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz" + sha256 "9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426" + end + + resource "id" do + url "https://files.pythonhosted.org/packages/22/11/102da08f88412d875fa2f1a9a469ff7ad4c874b0ca6fed0048fe385bdb3d/id-1.5.0.tar.gz" + sha256 "292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyasn1" do + url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" + sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rfc3161-client" do + url "https://files.pythonhosted.org/packages/85/19/c04a07f9926943b6a6945ae6972dc2c3c79b7f02e2be6346e3010a48d5f5/rfc3161_client-1.0.5.tar.gz" + sha256 "f1a2e32e2a053455cee1ff9b325b88dbc7c66c8882dde60962add92f572df5c5" + end + + resource "rfc8785" do + url "https://files.pythonhosted.org/packages/ef/2f/fa1d2e740c490191b572d33dbca5daa180cb423c24396b856f5886371d8b/rfc8785-0.1.4.tar.gz" + sha256 "e545841329fe0eee4f6a3b44e7034343100c12b4ec566dc06ca9735681deb4da" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "securesystemslib" do + url "https://files.pythonhosted.org/packages/c2/dd/d1828dce0db18aa8d34f82aee4dbcf49b0f0303cad123a1c716bb1f3bf83/securesystemslib-1.3.1.tar.gz" + sha256 "ca915f4b88209bb5450ac05426b859d74b7cd1421cafcf73b8dd3418a0b17486" + end + + resource "sigstore-models" do + url "https://files.pythonhosted.org/packages/ac/13/f67a87e8d8c97b9a47d4971263ca6afbd5250315a55b8056358061fc07da/sigstore_models-0.0.5.tar.gz" + sha256 "8eda90fe16ef3e4e624edd029f4cbbc9832a192dc5c8f66011d94ec4253f9f3f" + end + + resource "sigstore-rekor-types" do + url "https://files.pythonhosted.org/packages/b4/54/102e772445c5e849b826fbdcd44eb9ad7b3d10fda17b08964658ec7027dc/sigstore_rekor_types-0.0.18.tar.gz" + sha256 "19aef25433218ebf9975a1e8b523cc84aaf3cd395ad39a30523b083ea7917ec5" + end + + resource "tuf" do + url "https://files.pythonhosted.org/packages/25/b5/377a566dfa8286b2ca27ddbc792ab1645de0b6c65dd5bf03027b3bf8cc8f/tuf-6.0.0.tar.gz" + sha256 "9eed0f7888c5fff45dc62164ff243a05d47fb8a3208035eb268974287e0aee8d" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/sigstore -V") + + # NOTE: This resource and below do not needed to be kept up-to-date + # with the latest sigstore-python release. + resource "homebrew-test-artifact" do + url "https://github.com/sigstore/sigstore-python/releases/download/v3.3.0/sigstore-3.3.0.tar.gz", using: :nounzip + sha256 "931e9913996ceace713d28e2431989414e711af30606f0b1e8bdc30fcbdd3fbe" + end + + resource "homebrew-test-artifact.sigstore" do + url "https://github.com/sigstore/sigstore-python/releases/download/v3.3.0/sigstore-3.3.0.tar.gz.sigstore" + sha256 "1cb946269f563b669183307b603f85169c7b1399835c66b8b4d28d913d26d5f7" + end + + resource("homebrew-test-artifact").stage testpath + resource("homebrew-test-artifact.sigstore").stage testpath + + cert_identity = "https://github.com/sigstore/sigstore-python/.github/workflows/release.yml@refs/tags/v3.3.0" + + output = shell_output("#{bin}/sigstore verify github sigstore-3.3.0.tar.gz --cert-identity #{cert_identity} 2>&1") + assert_match "OK: sigstore-3.3.0.tar.gz", output + end +end diff --git a/Formula/s/sigsum-go.rb b/Formula/s/sigsum-go.rb new file mode 100644 index 0000000000000..38410923f3736 --- /dev/null +++ b/Formula/s/sigsum-go.rb @@ -0,0 +1,37 @@ +class SigsumGo < Formula + desc "Key transparency toolkit" + homepage "https://sigsum.org" + url "https://git.glasklar.is/sigsum/core/sigsum-go/-/archive/v0.12.0/sigsum-go-v0.12.0.tar.bz2" + sha256 "027d98550f4b68ecfdb0ec83447a161ba973877359b62c444afe3b236e4951d8" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d6457d10500297a0090527b53cc3561cd1433cd525b652100415d89302a5844" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d6457d10500297a0090527b53cc3561cd1433cd525b652100415d89302a5844" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d6457d10500297a0090527b53cc3561cd1433cd525b652100415d89302a5844" + sha256 cellar: :any_skip_relocation, sonoma: "eb5dfd3e2ae08485c8e35043e5bbe1e66f21fa2cd9531deb5d2c765602fd3837" + sha256 cellar: :any_skip_relocation, arm64_linux: "25b27c632dee402d9458ee6cd7c94d4b8f8aaa68650b8944ca2ba83153dbd0d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "363246e09b45a9e49e8d01254a7c08356b3e2fbf9744e90d39ccce730bd1b6c5" + end + + depends_on "go" => :build + + def install + %w[ + sigsum-key + sigsum-monitor + sigsum-submit + sigsum-token + sigsum-verify + sigsum-witness + ].each do |cmd| + system "go", "build", *std_go_args(output: bin/cmd, ldflags: "-s -w"), "./cmd/#{cmd}" + end + end + + test do + system bin/"sigsum-key", "gen", "-o", "key-file" + pipe_output("#{bin}/sigsum-key sign -k key-file -o signature", (bin/"sigsum-key").read) + pipe_output("#{bin}/sigsum-key verify -k key-file.pub -s signature", (bin/"sigsum-key").read) + end +end diff --git a/Formula/s/sile.rb b/Formula/s/sile.rb new file mode 100644 index 0000000000000..ed90dc30c8ee1 --- /dev/null +++ b/Formula/s/sile.rb @@ -0,0 +1,223 @@ +class Sile < Formula + desc "Modern typesetting system inspired by TeX" + homepage "https://sile-typesetter.org" + url "https://github.com/sile-typesetter/sile/releases/download/v0.15.13/sile-0.15.13.tar.zst" + sha256 "5e97c19651aff710687b93292d5361cb411652094bcc8c62c811c19f7a81464b" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1ed8cdeeb01ac51c7bd776ec684b7c525c586cd5fb456675cd9d0308cf2c15bb" + sha256 cellar: :any, arm64_sequoia: "791057d65933cb50c4d8ad27484f2b6d6d838e153de29fc8f95312e7e2785a53" + sha256 cellar: :any, arm64_sonoma: "47955878faf528c2cb3c9bb91853a58c02e56e6dd00587d2e9d1dd5a3a31dbd7" + sha256 cellar: :any, arm64_ventura: "2947a239426f6aa1aa7db9e14340a18225473a00c1135f5ddead063d9448e202" + sha256 cellar: :any, sonoma: "9d5cbae91ce3fb80c09381d1236fbbfdc302b62e9a21f179f0b6f3f12f96c680" + sha256 cellar: :any, ventura: "e2322341d5537d844173bf3e002fc5a91c175e18e5f0519db2f91c28e3806850" + sha256 cellar: :any_skip_relocation, arm64_linux: "a169fa67dd41e38518571a68c655de8597e5c02fa7f2eea25d8b57876c6cfe29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58dcf197e11ada5600481377945cbd70f41cd3ed5e6ff737a355aa48b19f9215" + end + + head do + url "https://github.com/sile-typesetter/sile.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "jq" => :build + depends_on "pkgconf" => :build + depends_on "poppler" => :build + depends_on "rust" => :build + + depends_on "fontconfig" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "libpng" + depends_on "luajit" + depends_on "luarocks" + depends_on "openssl@3" + + uses_from_macos "unzip" => :build + uses_from_macos "expat" + uses_from_macos "zlib" + + on_macos do + depends_on "freetype" + end + + resource "compat53" do + url "https://luarocks.org/manifests/lunarmodules/compat53-0.14.4-1.rockspec" + sha256 "80b4929c84eae8c00b4bca49a7d049d27d7e89cf3aefeb37cd7dc5f3cc725005" + end + + resource "linenoise" do + url "https://luarocks.org/manifests/hoelzro/linenoise-0.9-1.rockspec" + sha256 "e4f942e0079092993832cf6e78a1f019dad5d8d659b9506692d718d0c0432c72" + end + + resource "lpeg" do + url "https://luarocks.org/manifests/gvvaughan/lpeg-1.1.0-2.src.rock" + sha256 "836d315b920a5cdd62e21786c6c9fad547c4faa131d5583ebca64f0b6595ee76" + end + + resource "loadkit" do + url "https://luarocks.org/manifests/leafo/loadkit-1.1.0-1.src.rock" + sha256 "6a631cb08a78324cb5f92b1cb8e2f59502d7113407d0d9b0d95045d8a4febccb" + end + + resource "lua_cliargs" do + url "https://luarocks.org/manifests/lunarmodules/lua_cliargs-3.0.2-1.src.rock" + sha256 "a2dfbd3f0236eaf4b0421dbd06a631d92b550335eb263b7283e1161a6e90d92e" + end + + resource "lua-zlib" do + url "https://luarocks.org/manifests/brimworks/lua-zlib-1.3-0.rockspec" + sha256 "8806be122f5621a657078e8038c7c4ff58720aedcb21da8fdd2b01304981b31a" + end + + # This resource cannot be updated + # Ref: https://github.com/Homebrew/homebrew-core/pull/128136#issuecomment-1505583956 + resource "luaexpat" do + url "https://luarocks.org/manifests/lunarmodules/luaexpat-1.4.1-1.src.rock" + sha256 "b2b31f62fd09252d7ec0218d083cf9b8d9fc6a20f4594559f96649beee172233" + end + + # depends on lpeg + resource "luaepnf" do + url "https://luarocks.org/manifests/siffiejoe/luaepnf-0.3-2.src.rock" + sha256 "7abbe5888abfa183878751e4010239d799e0dfca6139b717f375c26292876f07" + end + + resource "luafilesystem" do + url "https://luarocks.org/manifests/hisham/luafilesystem-1.8.0-1.src.rock" + sha256 "576270a55752894254c2cba0d49d73595d37ec4ea8a75e557fdae7aff80e19cf" + end + + resource "luarepl" do + url "https://luarocks.org/manifests/hoelzro/luarepl-0.10-1.rockspec" + sha256 "a3a16e6e5e84eb60e2a5386d3212ab37c472cfe3110d75642de571a29da4ed8b" + end + + resource "luasocket" do + url "https://luarocks.org/manifests/lunarmodules/luasocket-3.1.0-1.src.rock" + sha256 "f4a207f50a3f99ad65def8e29c54ac9aac668b216476f7fae3fae92413398ed2" + end + + # depends on luasocket + resource "luasec" do + url "https://luarocks.org/manifests/brunoos/luasec-1.3.2-1.src.rock" + sha256 "f93bf9927bd34a5d4f897f4488b285a12bee89c0e7d54b3b36dfcbf43a7ad4e5" + end + + # depends on luafilesystem + resource "penlight" do + url "https://luarocks.org/manifests/tieske/penlight-1.14.0-3.src.rock" + sha256 "84e4d23126694a57997d5499490023468190a4b14a64931da61de627ce4fe0c2" + end + + # depends on penlight + resource "cldr" do + url "https://luarocks.org/manifests/alerque/cldr-0.3.0-0.src.rock" + sha256 "2efc94c10b659ab1009dc191f1694bd332c34379f87f4dd21f827d0e6948ed6d" + end + + # depends on cldr, luaepnf, penlight + resource "fluent" do + url "https://luarocks.org/manifests/alerque/fluent-0.2.0-0.src.rock" + sha256 "ea915c689dfce2a7ef5551eb3c09d4620bae60a51c20d48d85c14b69bf3f28ba" + end + + # depends on luafilesystem, penlight + resource "cassowary" do + url "https://luarocks.org/manifests/simoncozens/cassowary-2.3.2-1.src.rock" + sha256 "2d3c3954eeb8b5da1d7b1b56c209ed3ae11d221220967c159f543341917ce726" + end + + resource "luautf8" do + url "https://luarocks.org/manifests/xavier-wang/luautf8-0.1.6-1.src.rock" + sha256 "37901bc127c4afe9f611bba58af7b12eda6599fc270e1706e2f767807dfacd82" + end + + resource "vstruct" do + url "https://luarocks.org/manifests/deepakjois/vstruct-2.1.1-1.src.rock" + sha256 "fcfa781a72b9372c37ee20a5863f98e07112a88efea08c8b15631e911bc2b441" + end + + def install + lua = Formula["luajit"] + luaversion = "5.1" + luapath = libexec/"vendor" + + paths = %W[ + #{luapath}/share/lua/#{luaversion}/?.lua + #{luapath}/share/lua/#{luaversion}/?/init.lua + #{luapath}/share/lua/#{luaversion}/lxp/?.lua + ] + + ENV["LUA_PATH"] = "#{paths.join(";")};;" + ENV["LUA_CPATH"] = "#{luapath}/lib/lua/#{luaversion}/?.so;;" + + ENV.prepend "CPPFLAGS", "-I#{lua.opt_include}/luajit-2.1" + ENV.prepend "LDFLAGS", "-L#{lua.opt_lib}" + + if OS.mac? + zlib_dir = expat_dir = "#{MacOS.sdk_path_if_needed}/usr" + else + zlib_dir = Formula["zlib"].opt_prefix + expat_dir = Formula["expat"].opt_prefix + end + + luarocks_args = %W[ + ZLIB_DIR=#{zlib_dir} + EXPAT_DIR=#{expat_dir} + OPENSSL_DIR=#{Formula["openssl@3"].opt_prefix} + --tree=#{luapath} + --lua-dir=#{lua.opt_prefix} + ] + + resources.each do |r| + r.stage do + rock = Pathname.pwd.children(false).first + unpack_dir = Utils.safe_popen_read("luarocks", "unpack", rock).split("\n")[-2] + spec = "#{r.name}-#{r.version}.rockspec" + cd(unpack_dir) { system "luarocks", "make", *luarocks_args, spec } + end + end + + configure_args = %w[ + FCMATCH=true + --disable-silent-rules + --disable-static + --disable-embeded-resources + --with-system-lua-sources + --with-system-luarocks + --with-vendored-luarocks-dir=#{luapath} + ] + + system "./bootstrap.sh" if build.head? + system "./configure", *configure_args, *std_configure_args + system "make" + system "make", "install" + end + + def caveats + <<~EOS + By default SILE uses the font Gentium Plus to render all documents that do not specifically call for something else. If this font is not available on your system you may encounter errors. Of lower priority depending on your use case, the math typesetting package defaults to using Libertinus Math and the default monospace font is Hack. + + Homebrew does not supply any of these font dependencies in default casks, but they can be added by tapping cask-fonts: + brew tap homebrew/cask-fonts + brew install --cask font-gentium-plus + brew install --cask font-libertinus + brew install --cask font-hack + + Alternatively you can download and install the fonts yourself: + https://software.sil.org/gentium/ + https://github.com/alerque/libertinus + https://sourcefoundry.org/hack/ + EOS + end + + test do + assert_match "SILE #{version.to_s.match(/\d\.\d\.\d/)}", shell_output("#{bin}/sile --version") + end +end diff --git a/Formula/s/silicon.rb b/Formula/s/silicon.rb new file mode 100644 index 0000000000000..b5b6c59863ddf --- /dev/null +++ b/Formula/s/silicon.rb @@ -0,0 +1,53 @@ +class Silicon < Formula + desc "Create beautiful image of your source code" + homepage "https://github.com/Aloxaf/silicon/" + url "https://github.com/Aloxaf/silicon/archive/refs/tags/v0.5.3.tar.gz" + sha256 "56e7f3be4118320b64e37a174cc2294484e27b019c59908c0a96680a5ae3ad58" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8c4f89277fc20079a76958b8b4f6fe533cb555ecdea671f3c852ea2bbc530627" + sha256 cellar: :any, arm64_sequoia: "3344abcb48d22efadadc415e5beff9ba197e3309e813549a3afdd459a99324f3" + sha256 cellar: :any, arm64_sonoma: "27d8515dce15d3bef3d394794192c6b8b6b33786152c6df4ef524ca6de112126" + sha256 cellar: :any, arm64_ventura: "8e64e4602354dff22bd4b5a7ca430842491c3b18ada1c63fc7f5cbb2ed9da945" + sha256 cellar: :any, sonoma: "6dddd3c3a90fcbf06dfade35bc46e276bbe6027d74326b8315fe9307a0d98146" + sha256 cellar: :any, ventura: "7fb5ed4ce9e2e6ed6ed44ad1e115090161852f129cb444a352547aca3c7b4002" + sha256 cellar: :any_skip_relocation, arm64_linux: "ace34668e40622982946b0611cb2abceae9f9c2bcf5168c1a33bb338793d2176" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afe03c08e0975b4d4b1a90fdbfdf9c82767bd7b85becc71e72b4e63ed59b3074" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "harfbuzz" + + on_linux do + depends_on "libxcb" + depends_on "xclip" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.rs").write <<~RUST + fn factorial(n: u64) -> u64 { + match n { + 0 => 1, + _ => n * factorial(n - 1), + } + } + + fn main() { + println!("10! = {}", factorial(10)); + } + RUST + + system bin/"silicon", "-o", "output.png", "test.rs" + assert_path_exists testpath/"output.png" + expected_size = [894, 630] + assert_equal expected_size, File.read("output.png")[0x10..0x18].unpack("NN") + end +end diff --git a/Formula/s/silk.rb b/Formula/s/silk.rb new file mode 100644 index 0000000000000..ec380adc033f4 --- /dev/null +++ b/Formula/s/silk.rb @@ -0,0 +1,62 @@ +class Silk < Formula + desc "Collection of traffic analysis tools" + homepage "https://tools.netsa.cert.org/silk/" + url "https://tools.netsa.cert.org/releases/silk-3.24.0.tar.gz" + sha256 "9292f6c90cd324e2dde58faa77e74cacd1398c27b5cd6bc3f194409b07c4affc" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url :homepage + regex(%r{".*?/silk[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "f5c12c20f91441e12dd6eb5acbb82bfebe2fb02a7b55439b46771671b12b679e" + sha256 arm64_sequoia: "f80f816542d3df0d4c3b0e878eec959bcc568b40c4252e84bfde847046629ff2" + sha256 arm64_sonoma: "6c0999ed8b38a973542d47d7481ae0007d3241e4ed8e219b58bb10c644428f96" + sha256 arm64_ventura: "be0e97681f03a557f16902466621eba29811467fb5e973d62a4ce5fdfcc2c4e9" + sha256 sonoma: "0c7093ddc5b13575c291fbad36c456f99a838471e72042d8646c6ec5e00722b4" + sha256 ventura: "877a85d27e621f0fa2c5065912321380699fe3d8b4c2a5f429f6d9f8bcf49239" + sha256 arm64_linux: "451b975475964804e7ae109fb016c993dcf877443830424f4bc0b3dab0568ebb" + sha256 x86_64_linux: "f60f3e2ff207a72229d680c49100a12047c4070c0e06d11dd60a60a3c3d86d20" + end + + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "libfixbuf" + depends_on "yaf" + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "openssl@3" + end + + def install + args = %W[ + --mandir=#{man} + --enable-ipv6 + --enable-data-rootdir=#{var}/silk + ] + # Work around macOS Sonoma having /usr/bin/podselect but Pod::Select was + # removed from Perl 5.34 resulting in `Can't locate Pod/Select.pm in @INC` + args << "ac_cv_prog_PODSELECT=" if OS.mac? && MacOS.version == :sonoma + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + (var/"silk").mkpath + end + + test do + input = test_fixtures("test.pcap") + yaf_output = shell_output("yaf --in #{input}") + rwipfix2silk_output = pipe_output("#{bin}/rwipfix2silk", yaf_output) + output = pipe_output("#{bin}/rwcount --no-titles --no-column", rwipfix2silk_output) + assert_equal "2014/10/02T10:29:00|2.00|1031.00|12.00|", output.strip + end +end diff --git a/Formula/s/simde.rb b/Formula/s/simde.rb new file mode 100644 index 0000000000000..d8725d08922ab --- /dev/null +++ b/Formula/s/simde.rb @@ -0,0 +1,42 @@ +class Simde < Formula + desc "Implementations of SIMD intrinsics for systems which don't natively support them" + homepage "https://github.com/simd-everywhere/simde" + url "https://github.com/simd-everywhere/simde/archive/refs/tags/v0.8.2.tar.gz" + sha256 "ed2a3268658f2f2a9b5367628a85ccd4cf9516460ed8604eed369653d49b25fb" + license "MIT" + head "https://github.com/simd-everywhere/simde.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8ffb9243611a027320542a403fbcc1d2f7f45516484d44ec5a0fae570b2f7892" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", *std_meson_args, "-Dtests=false" + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + int64_t a = 1, b = 2; + assert(simde_vaddd_s64(a, b) == 3); + simde__m128i z = simde_mm_setzero_si128(); + simde__m128i v = simde_mm_undefined_si128(); + v = simde_mm_xor_si128(v, v); + assert(simde_mm_movemask_epi8(simde_mm_cmpeq_epi8(v, z)) == 0xFFFF); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/simdjson.rb b/Formula/s/simdjson.rb new file mode 100644 index 0000000000000..d19600a7e7548 --- /dev/null +++ b/Formula/s/simdjson.rb @@ -0,0 +1,45 @@ +class Simdjson < Formula + desc "SIMD-accelerated C++ JSON parser" + homepage "https://simdjson.org" + url "https://github.com/simdjson/simdjson/archive/refs/tags/v4.2.1.tar.gz" + sha256 "72c60a0fa6871073a4a458e80947dd75894fa1ff69550c7c77f9f4e695dff7f1" + license "Apache-2.0" + head "https://github.com/simdjson/simdjson.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a5c5b7d4076b9832a49d4c046159793b9d5b1d62ae0f8dc728200b01e0cd3be5" + sha256 cellar: :any, arm64_sequoia: "156102c5972d1d22e3bc19b0b4c595eee8d1963d1f70194e2ac41f74a9c05417" + sha256 cellar: :any, arm64_sonoma: "c4186fe15156691d8acf816dd4542fffd18224efc959d1ef981bac64a8b4a23c" + sha256 cellar: :any, sonoma: "c1499dc97aaf9c88d5ee82c996e2428d440746fec327baa8a65ca11df6702127" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf7340909bbe6278f23b45704aeabb9b5cec660b30e9fecfa8a55426b9ca019b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f59fd4bf2f47474c2eb922676adc8cf24a2c940b5bc92439df4719e7a5136d9f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build" + lib.install "build/libsimdjson.a" + end + + test do + (testpath/"test.json").write "{\"name\":\"Homebrew\",\"isNull\":null}" + (testpath/"test.cpp").write <<~CPP + #include + #include + int main(void) { + simdjson::dom::parser parser; + simdjson::dom::element json = parser.load("test.json"); + std::cout << json["name"] << std::endl; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++11", + "-I#{include}", "-L#{lib}", "-lsimdjson", "-o", "test" + assert_equal "\"Homebrew\"\n", shell_output("./test") + end +end diff --git a/Formula/s/simdutf.rb b/Formula/s/simdutf.rb new file mode 100644 index 0000000000000..5825d06843bb4 --- /dev/null +++ b/Formula/s/simdutf.rb @@ -0,0 +1,58 @@ +class Simdutf < Formula + desc "Unicode conversion routines, fast" + homepage "https://simdutf.github.io/simdutf/" + url "https://github.com/simdutf/simdutf/archive/refs/tags/v7.5.0.tar.gz" + sha256 "3cad2f554912ecd77222272e5d1a7c1e5e33b4011bee823269cdc9095d2fdce2" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/simdutf/simdutf.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7972bee9a1aa832c0d81c74478f3a8b5f1339d893d9a374f3c841b938ecfdada" + sha256 cellar: :any, arm64_sequoia: "cd2a793db1fe7b4aa0534163f1533c4c5ad4f885790ddee6a3faad0fd8234e71" + sha256 cellar: :any, arm64_sonoma: "7d8b79e61cfeb8ae60d21880f3f3af6f17eceb312c31155da3f1534b8f9eeedd" + sha256 cellar: :any, sonoma: "92a303d15cf1d5c47dcb98633204e39c512ea3549e6d1ed1f16965565e1c884a" + sha256 cellar: :any_skip_relocation, arm64_linux: "4482182197f57f001dfc742e1ce4cd0ae03ad43824c090ae8b6a128b6dd3fd96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89da0b6e00efab723c78189f7cc465f4e8a13a91e8cedb36e9a1e8760a29bf64" + end + + depends_on "cmake" => :build + depends_on "icu4c@77" + + uses_from_macos "python" => :build + + resource "base64" do + url "https://github.com/aklomp/base64/archive/refs/tags/v0.5.2.tar.gz" + sha256 "723a0f9f4cf44cf79e97bcc315ec8f85e52eb104c8882942c3f2fba95acc080d" + + livecheck do + url "https://raw.githubusercontent.com/simdutf/simdutf/v#{LATEST_VERSION}/benchmarks/base64/CMakeLists.txt" + regex(/VERSION\s+(\d+(?:\.\d+)+)/) + end + end + + def install + (buildpath/"base64").install resource("base64") + + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + -DFETCHCONTENT_SOURCE_DIR_BASE64=#{buildpath}/base64 + -DPython3_EXECUTABLE=#{which("python3")} + -DSIMDUTF_BENCHMARKS=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + bin.install "build/benchmarks/benchmark" => "sutf-benchmark" + end + + test do + system bin/"sutf-benchmark", "--random-utf8", "10240", "-I", "100" + end +end diff --git a/Formula/s/simg2img.rb b/Formula/s/simg2img.rb new file mode 100644 index 0000000000000..1698598bfc312 --- /dev/null +++ b/Formula/s/simg2img.rb @@ -0,0 +1,38 @@ +class Simg2img < Formula + desc "Tool to convert Android sparse images to raw images and back" + homepage "https://github.com/anestisb/android-simg2img" + url "https://github.com/anestisb/android-simg2img/archive/refs/tags/1.1.5.tar.gz" + sha256 "d9e9ec2c372dbbb69b9f90b4da24c89b092689e45cd5f74f0e13003bc367f3fc" + license "Apache-2.0" + head "https://github.com/anestisb/android-simg2img.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "58a7ef68da47e40e6d78c4d848f6c0b27faa50b211114ff21e368fe196855269" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4379d5396841f588cdc104f78d544b13c8ffced771e3951a1f125832c254655e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c521ed91a882110a4bf62d1937e3ed7bf92953b9bf29cafe90a96f414fd8635" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7991544d5ea48f9b2ac646a907165e7196d33198213360276bed43f1fd9cd21c" + sha256 cellar: :any_skip_relocation, sonoma: "5cb6ebc371ac048e15cf499fc82b8620727669732a0cf9ae522b9a46888e2ac7" + sha256 cellar: :any_skip_relocation, ventura: "ef6aec762912ae04441813a968c07bc6463da4df22e479a6745242e811268fa2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f76f92bfcc1a1c8a0aed24f14b1ec062deead3839fa236883435aebb8d54cb83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7ee989bd69ca55912a71b8317711a5ed08d5341c7ba5d24156abcb53a9a6135" + end + + uses_from_macos "zlib" + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system "dd", "if=/dev/zero", "of=512k-zeros.img", "bs=512", "count=1024" + assert_equal 524288, (testpath/"512k-zeros.img").size?, + "Could not create 512k-zeros.img with 512KiB of zeros" + system bin/"img2simg", "512k-zeros.img", "512k-zeros.simg" + assert_equal 44, (testpath/"512k-zeros.simg").size?, + "Converting 512KiB of zeros did not result in a 44 byte simg" + system bin/"simg2img", "512k-zeros.simg", "new-512k-zeros.img" + assert_equal 524288, (testpath/"new-512k-zeros.img").size?, + "Converting a 44 byte simg did not result in 512KiB" + system "diff", "512k-zeros.img", "new-512k-zeros.img" + end +end diff --git a/Formula/s/simgrid.rb b/Formula/s/simgrid.rb new file mode 100644 index 0000000000000..9370e473500a5 --- /dev/null +++ b/Formula/s/simgrid.rb @@ -0,0 +1,68 @@ +class Simgrid < Formula + include Language::Python::Shebang + + desc "Studies behavior of large-scale distributed systems" + homepage "https://simgrid.org/" + url "https://gitlab.inria.fr/simgrid/simgrid/-/archive/v4.0/simgrid-v4.0.tar.bz2" + sha256 "37387a6b4ab230e37fb062d03af3d6bdb9cd0c76b2c3407ae1a344facc814a8f" + license "LGPL-2.1-only" + revision 4 + + livecheck do + url :homepage + regex(/href=.*?simgrid[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "57019e3a77440a444c0b607f7b0ba615813081cc50ffe5c78f357e11685a58d8" + sha256 arm64_sequoia: "311ce37f78084b84f5e3e497c74f62ac5d99c655d85a0466e848e91a2c02d37c" + sha256 arm64_sonoma: "f5fe2c61a35337000d127f4b5237d0393a8004c3fc4c4531ceff2bb57d3e3aff" + sha256 sonoma: "9d372cba7031c206dc6d2f1f4011d3f5f76553a7e1491c02eaec019328202298" + sha256 arm64_linux: "bc77c36a7fe3f309d7617ac655018bb8ecc2266e89ab401feda85fece7410601" + sha256 x86_64_linux: "833a6ae831670a92f06682b5a2be2e8992a0db3de31c3cb3f9b1ae5c7cc1a758" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "boost" + depends_on "graphviz" + + uses_from_macos "python" + + def install + # Avoid superenv shim references + inreplace "src/smpi/smpicc.in", "@CMAKE_C_COMPILER@", DevelopmentTools.locate(ENV.cc) + inreplace "src/smpi/smpicxx.in", "@CMAKE_CXX_COMPILER@", DevelopmentTools.locate(ENV.cxx) + + # Work around build error: ld: library not found for -lcgraph + ENV.append "LDFLAGS", "-L#{Formula["graphviz"].opt_lib}" + + system "cmake", "-S", ".", "-B", "build", + "-DPython3_EXECUTABLE=#{which("python3")}", + "-Denable_debug=on", + "-Denable_compile_optimizations=off", + "-Denable_fortran=off", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + rewrite_shebang detected_python_shebang(use_python_from_path: true), *bin.children + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char* argv[]) { + printf("%f", simgrid_get_clock()); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lsimgrid", + "-o", "test" + system "./test" + end +end diff --git a/Formula/s/simple-amqp-client.rb b/Formula/s/simple-amqp-client.rb new file mode 100644 index 0000000000000..5bb310366af2c --- /dev/null +++ b/Formula/s/simple-amqp-client.rb @@ -0,0 +1,63 @@ +class SimpleAmqpClient < Formula + desc "C++ interface to rabbitmq-c" + homepage "https://github.com/alanxz/SimpleAmqpClient" + url "https://github.com/alanxz/SimpleAmqpClient/archive/refs/tags/v2.5.1.tar.gz" + sha256 "057c56b29390ec7659de1527f9ccbadb602e3e73048de79594521b3141ab586d" + license "MIT" + revision 12 + head "https://github.com/alanxz/SimpleAmqpClient.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "31777723001b1b546f4650740d5f44b36e77ea2792ef44acd6988cc3911622ec" + sha256 cellar: :any, arm64_sequoia: "e1eb5c48884a83b02dbbc2a0ad3d8d356f7c3fb935f8fc54341ae756bb4424e5" + sha256 cellar: :any, arm64_sonoma: "eb19eaee74b987a22007c12f737a270bcc32913ba5cb822331c4d34b7cea09f3" + sha256 cellar: :any, arm64_ventura: "f5b70aba922a61a69ebeb2378e955fbf27bc5b15cf9e6f1ec608286b65d6410a" + sha256 cellar: :any, sonoma: "b53ed9cf4ac06bce440b6cb5b128e408d60d8a8394db5c9b09247b974ac2c0c2" + sha256 cellar: :any, ventura: "2eeb8c8ac5f48881dc6c88e402d0bb2528975e66cbe59ba8a64286d9df6b1d07" + sha256 cellar: :any_skip_relocation, arm64_linux: "dacbc3f04fe93b070000d9469fa1b192ad7567339abd577a7798d03877ee487c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dae899a11bd849dc1d61c0b9099ccc7b188392a4cbb607ac57c91b3585250f09" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "boost" + depends_on "rabbitmq-c" + + # Fix build with Boost 1.89.0, pr ref: https://github.com/alanxz/SimpleAmqpClient/pull/356 + patch do + url "https://github.com/alanxz/SimpleAmqpClient/commit/3d3c669608b0dc3ae54e9caae6244bdcc38ca054.patch?full_index=1" + sha256 "652aad326ace036498e2f990f6fecaa9d2472e04885f581d773fb1fbf3809e9c" + end + + def install + # Remove hard-coded CMAKE_CXX_STANDARD + # Else setting DCMAKE_CXX_STANDARD does not work + inreplace "CMakeLists.txt", "set(CMAKE_CXX_STANDARD 98)", "" + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_LIBDIR=lib", + "-DCMAKE_CXX_STANDARD=14", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + const std::string expected = "test body"; + AmqpClient::BasicMessage::ptr_t msg = AmqpClient::BasicMessage::Create(expected); + + if(msg->Body() != expected) return 1; + + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++14", "-L#{lib}", "-lSimpleAmqpClient", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/simple-mtpfs.rb b/Formula/s/simple-mtpfs.rb new file mode 100644 index 0000000000000..7dc525c69b403 --- /dev/null +++ b/Formula/s/simple-mtpfs.rb @@ -0,0 +1,35 @@ +class SimpleMtpfs < Formula + desc "Simple MTP fuse filesystem driver" + homepage "https://github.com/phatina/simple-mtpfs" + url "https://github.com/phatina/simple-mtpfs/archive/refs/tags/v0.4.0.tar.gz" + sha256 "1d011df3fa09ad0a5c09d48d84c03e6cddf86390af9eb4e0c178193f32f0e2fc" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_linux: "6af8a1b67540db583e256e6391410483d8480100ed0598e040bbaf59cda85de1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c194161a8dbd1095e449cceb1b21e7e64f68d6541ab32c63ff78092260df8d49" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build # required for AX_CXX_COMPILE_STDCXX_17 + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libfuse@2" + depends_on "libmtp" + depends_on "libusb" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"simple-mtpfs", "-h" + end +end diff --git a/Formula/s/simple-obfs.rb b/Formula/s/simple-obfs.rb new file mode 100644 index 0000000000000..932bb474518ad --- /dev/null +++ b/Formula/s/simple-obfs.rb @@ -0,0 +1,48 @@ +class SimpleObfs < Formula + desc "Simple obfusacting plugin of shadowsocks-libev" + homepage "https://github.com/shadowsocks/simple-obfs" + url "https://github.com/shadowsocks/simple-obfs.git", + tag: "v0.0.5", + revision: "a9c43588e4cb038e6ac02f050e4cab81f8228dff" + license "GPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8e568d3031a09ab024c3b1aa96a5030bdfa52948af522c45958cb27db6b46397" + sha256 cellar: :any, arm64_sequoia: "6e40cb731be9ffcc73a3a058968fbb776cc5be006a11fc069c123720b4449c2f" + sha256 cellar: :any, arm64_sonoma: "96318311193115a8caae00c04bd855713170ad44d48e67405b9bdab395b8e35f" + sha256 cellar: :any, arm64_ventura: "3ede7782d7c846a3f01749e297231356e89af0cd4650d9bf4b62d64fe0e513fc" + sha256 cellar: :any, arm64_monterey: "6671d16d00fb419e65ef7a686d4fa956e64882efcf22ee7ccf84207ebb7a4fe7" + sha256 cellar: :any, arm64_big_sur: "a79c2a9ba2a6473853a0907355290287b5f9faf4dcd808e1819608f0498b236f" + sha256 cellar: :any, sonoma: "771e320908bd201a58300ffa42ac29636459a76381a8ee9e67ba6d4c91e2336e" + sha256 cellar: :any, ventura: "8dd7246903c8398049305665a51c44299358f80164d8dd3264e98ff7699ee704" + sha256 cellar: :any, monterey: "83daaaeccbb621e796269d648c943871ce9ddbf85edd0d7ec66685ea71e9c286" + sha256 cellar: :any, big_sur: "6fc8b9d2aef7c813449e5298e1fcbcb7e5f1ba6da4c34b9e4b3c3a5e0005110e" + sha256 cellar: :any, catalina: "64ac7bb71b3dd0a0d087d7f981c53516abfb294f709d84cb969b192456310c51" + sha256 cellar: :any_skip_relocation, arm64_linux: "d08c2cce26db77a73b54ccf237d3b9b9fb70e5d8791835dba3ab9163b62fb45d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0032166acd2a834dce65e5cc5c1ad7b9871b33acc2661fc489d1e4204cc9e6d" + end + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "xmlto" => :build + depends_on "libev" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--enable-applecc" + system "make" + system "make", "install" + end + + test do + assert_match "simple-obfs", shell_output("#{bin}/obfs-local -h 2>&1") + end +end diff --git a/Formula/s/simple-scan.rb b/Formula/s/simple-scan.rb new file mode 100644 index 0000000000000..d295de387c82e --- /dev/null +++ b/Formula/s/simple-scan.rb @@ -0,0 +1,63 @@ +class SimpleScan < Formula + desc "GNOME document scanning application" + homepage "https://gitlab.gnome.org/GNOME/simple-scan" + url "https://download.gnome.org/sources/simple-scan/49/simple-scan-49.1.tar.xz" + sha256 "9ae8d4151ecaf95845eb9f99b436d579c838f2cf02763fba3bc03780251be334" + license "GPL-3.0-or-later" + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "5fe085c85f2967327041afa613d8016352f19156b098d67ca010148a217be3ff" + sha256 arm64_sequoia: "d89032a5bf6c0e345c6ddc07fcfdfda8418c7d5a08e9e1d98bdb7b1005442ddd" + sha256 arm64_sonoma: "2227cf61e91dce38d6fe1940f68f3ec0479e2dd4281e0e968d4667e8d45572a7" + sha256 sonoma: "32b1b1a42f0a31b9b8bf40a679405cebcbcd68b7bde435cd0a3cb04470c5fedf" + sha256 arm64_linux: "a4f06e8f35418562c92bcd97ca36a81796c147679c881dcb1bb10aa6c04fad75" + sha256 x86_64_linux: "219f864806981e8005ffe0749d53e4fd8b927da202d5892cecd093f5f52255eb" + end + + depends_on "gettext" => :build # for msgfmt + depends_on "itstool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk4" + depends_on "libadwaita" + depends_on "libgusb" + depends_on "sane-backends" + depends_on "webp" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + # Work-around for build issue with Xcode 15.3 + # upstream bug report, https://gitlab.gnome.org/GNOME/simple-scan/-/issues/386 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + ENV["DESTDIR"] = "/" + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + system "#{Formula["gtk4"].opt_bin}/gtk4-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + + test do + # Errors with `Cannot open display` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + system bin/"simple-scan", "-v" + end +end diff --git a/Formula/s/simple-tiles.rb b/Formula/s/simple-tiles.rb new file mode 100644 index 0000000000000..ca8c7edd531f2 --- /dev/null +++ b/Formula/s/simple-tiles.rb @@ -0,0 +1,70 @@ +class SimpleTiles < Formula + desc "Image generation library for spatial data" + homepage "https://github.com/propublica/simple-tiles" + url "https://github.com/propublica/simple-tiles/archive/refs/tags/v0.6.2.tar.gz" + sha256 "343ae52a0b20ee091b14bc145b7c78fed13b7272acd827626283b70f178dfa34" + license "MIT" + revision 6 + head "https://github.com/propublica/simple-tiles.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e57bed099ee96b945d232d703309eb622660b08d4847647279596db55dad79d6" + sha256 cellar: :any, arm64_sequoia: "d3aaa726bd349cc30a81762fd0a1b0601e4d9cf866023c29ff63a6e60226620c" + sha256 cellar: :any, arm64_sonoma: "abe65b73e6079f2b796164a3290cff1570ce7a2eeb1c310ebab9ec2160ac97c6" + sha256 cellar: :any, arm64_ventura: "f49d942f1152dbe63628654fb6063e621b17397ec41c46b1741acd2caaacfd3c" + sha256 cellar: :any, sonoma: "3b4ace3dfc2511c747a5dfe7a5ae9b214694d2908b3443c07284883b046df9e2" + sha256 cellar: :any, ventura: "bec15845f74bb0ea00e16a708fc4eca25e133357693dd80b3f460b189d93fa0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b811346839863479eee8eb09a6537da5b7dfcc211cd2e532ffe82989e5111df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "403a1c58f940fa9bb9bf5d4acccf8b64c88b105c37295220bcd07bc89f3d5282" + end + + depends_on "pkgconf" => [:build, :test] + + depends_on "cairo" + depends_on "gdal" + depends_on "glib" + depends_on "pango" + + uses_from_macos "python" => :build + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + # Update waf for py3.13 + resource "waf" do + url "https://raw.githubusercontent.com/propublica/simple-tiles/d4bae6b932ef84cd115cc327651b4fad49557409/waf" + sha256 "dd9dd1895f939d288823a7e23d7914c4f9fb018828da64842953e2a857a08713" + end + + # update tools/clang_compilation_database.py for py3.13 + patch do + url "https://github.com/propublica/simple-tiles/commit/a6e8b5738bb7b935d0579a5b514c49720e9eeeff.patch?full_index=1" + sha256 "b0d9226069b8c5cedd95d3150b46d123a14259a60f79d2827a5a99b9ce6e8944" + end + + def install + python3 = "python3" + buildpath.install resource("waf") + system python3, "./waf", "configure", "--prefix=#{prefix}" + system python3, "./waf", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(){ + simplet_map_t *map = simplet_map_new(); + simplet_map_free(map); + return 0; + } + C + cflags = shell_output("pkgconf --cflags simple-tiles").chomp.split + system ENV.cc, "test.c", *cflags, "-L#{lib}", "-lsimple-tiles", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/simutrans.rb b/Formula/s/simutrans.rb new file mode 100644 index 0000000000000..aa14c55e32f32 --- /dev/null +++ b/Formula/s/simutrans.rb @@ -0,0 +1,81 @@ +class Simutrans < Formula + desc "Transport simulator" + homepage "https://www.simutrans.com/" + url "svn://servers.simutrans.org/simutrans/trunk/", revision: "11671" + version "124.3.1" + license "Artistic-1.0" + revision 1 + head "https://github.com/simutrans/simutrans.git", branch: "master" + + livecheck do + url "https://sourceforge.net/projects/simutrans/files/simutrans/" + regex(%r{href=.*?/files/simutrans/(\d+(?:[.-]\d+)+)/}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match[0].tr("-", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a8349c878a8f212a11c5a387eb9d07178e5d4ea8715b02c937d5114ba2f7a900" + sha256 cellar: :any, arm64_sequoia: "7882263a911cbabe05edc77dd7184ea1b7f85c38097d7b932f1899b97bbb5966" + sha256 cellar: :any, arm64_sonoma: "58f3f1132d0dc17ddeb8528b300995b1ea2d350773d7e7b29e066f6f3a13e6be" + sha256 cellar: :any, arm64_ventura: "f40a7b52c289c9f503d2dddf1661e8283715199387345ce250262fb272f7083d" + sha256 cellar: :any, sonoma: "38a48ab9d571ff46144a5c027029d075844501836ba13630ed6fa4da8b586ca2" + sha256 cellar: :any, ventura: "d10461a9ad6bf0ecdaee60455a7aeae1caf103769bc4c4cf57a994a4055d1671" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f026f6d07f49d4b7c6e2a35b2390f9c3563d7c49f485b37a1632e356606aae2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "732b3387dd1c5962f52d12044421c4139ae6d654bd003670ec541fa6e762b484" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "fluid-synth" + depends_on "fontconfig" + depends_on "freetype" + depends_on "libpng" + depends_on "miniupnpc" + depends_on "sdl2" + depends_on "zstd" + + uses_from_macos "unzip" => :build + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "zlib" + + resource "pak64" do + url "https://downloads.sourceforge.net/project/simutrans/pak64/124-3/simupak64-124-3.zip" + sha256 "ecde0e15301320549e92a9113fcdd1ada3b7f9aa1fce3d59a5dc98d56d648756" + end + resource "soundfont" do + url "https://src.fedoraproject.org/repo/pkgs/PersonalCopy-Lite-soundfont/PCLite.sf2/629732b7552c12a8fae5b046d306273a/PCLite.sf2" + sha256 "ba3304ec0980e07f5a9de2cfad3e45763630cbc15c7e958c32ce06aa9aefd375" + end + + def install + # fixed in 9aa819, remove in next release + inreplace "cmake/MacBundle.cmake", "SOURCE_DIR}src", "SOURCE_DIR}/src" + + # These translations are dynamically generated. + system "./tools/get_lang_files.sh" + + system "cmake", "-B", "build", "-S", ".", "-DSIMUTRANS_USE_REVISION=#{stable.specs[:revision]}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "makeobj" + system "cmake", "--build", "build", "--target", "nettool" + + simutrans_path = OS.mac? ? "simutrans/simutrans.app/Contents/MacOS" : "simutrans" + libexec.install "build/#{simutrans_path}/simutrans" => "simutrans" + libexec.install Dir["simutrans/*"] + bin.write_exec_script libexec/"simutrans" + bin.install "build/src/makeobj/makeobj" + bin.install "build/src/nettool/nettool" + + libexec.install resource("pak64") + (libexec/"music").install resource("soundfont") + end + + test do + system bin/"simutrans", "--help" + end +end diff --git a/Formula/s/since.rb b/Formula/s/since.rb new file mode 100644 index 0000000000000..6287c600bcab6 --- /dev/null +++ b/Formula/s/since.rb @@ -0,0 +1,45 @@ +class Since < Formula + desc "Stateful tail: show changes to files since last check" + homepage "http://welz.org.za/projects/since" + url "http://welz.org.za/projects/since/since-1.1.tar.gz" + sha256 "739b7f161f8a045c1dff184e0fc319417c5e2deb3c7339d323d4065f7a3d0f45" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?since[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b463dd2eefbe33098ec0a7d4b1f98e186559a7d14d54e3ac5922873f871f6364" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07893929437e39dacfc617af4ec38af1153bbd8a3655992293b1ac8c415ac240" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ccf2421f8310655e3579181a2127aa8897340b05ee8c1d1a2fe5ae8d856793b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "70fe591dc225eb74e0f27c8d8f913771f6873665fd9441498ffeba1c277358ba" + sha256 cellar: :any_skip_relocation, arm64_monterey: "be177eae27c7bc16dcabf649437a4b99dc2bcba9b4771d2038844785a3150b7a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "95b9b96522d9cdb0ac317550daf1c9ee102d1a4df7736cd2072d896adf05fc04" + sha256 cellar: :any_skip_relocation, sonoma: "33908d6e9b5baf6b2d9b02fd43a46860eb89ad4e2371ed63f83dcfcd4bc50c28" + sha256 cellar: :any_skip_relocation, ventura: "75b5ed6525afee018674228668bf45b282016187f09dd42dd95fb474e0e1a232" + sha256 cellar: :any_skip_relocation, monterey: "3db05c5b4e33cc28cf9dd8352dbc6038b139cb6bf8056bc9c5a85bd0db7ee9c2" + sha256 cellar: :any_skip_relocation, big_sur: "60c3738e71c6455fa5a7445a21a79695d4644a34de06cbc05743a52c4f5b40f8" + sha256 cellar: :any_skip_relocation, catalina: "20b3f4888282ed47021562eb24efe9c37ef3a652ad64164460a5f368260e75d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0686ce3cedc670157058d0c768236fd2276290197884ab1759aeba4f60789fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db033c09d09fa627dd0d98d52a4b32231a6f696f925c77b0c91d7b8f057ea3f4" + end + + def install + bin.mkpath + man1.mkpath + system "make", "install", "prefix=#{prefix}", "INSTALL=install" + end + + test do + (testpath/"test").write <<~EOS + foo + bar + EOS + system bin/"since", "-z", "test" + assert_path_exists testpath/".since" + end +end diff --git a/Formula/s/sing-box.rb b/Formula/s/sing-box.rb new file mode 100644 index 0000000000000..c199c5a2c6ddf --- /dev/null +++ b/Formula/s/sing-box.rb @@ -0,0 +1,93 @@ +class SingBox < Formula + desc "Universal proxy platform" + homepage "https://sing-box.sagernet.org" + url "https://github.com/SagerNet/sing-box/archive/refs/tags/v1.12.12.tar.gz" + sha256 "f08add81eab7e4d6091195179bb39fa3f64dbb0326feaa022994566b702d1245" + license "GPL-3.0-or-later" + head "https://github.com/SagerNet/sing-box.git", branch: "dev-next" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0403adc6fa07654ccff11390556022b7c579ab094f7b09dd1d2c22bc47f15f79" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fbcd1cda18adc51c5a25bd914193436ed8e98553428795e4ce30ed2f8d0d82c7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a649b3461c20450bc9dda444a9e1723cbd2c7b6270a1986f329ea218e1b403ed" + sha256 cellar: :any_skip_relocation, sonoma: "1046e37866357d263951f833adcfeed461c136b3e17844ff7729e58a3a659472" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6b947a0d0038dc7eb4baebacd6eac75710c192d7f799e75b8602f652428016c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cd33f959984ee267288007faf68a373b14b74917cd2f0adda3f5ce5a9286248" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/sagernet/sing-box/constant.Version=#{version} -buildid=" + tags = %w[ + with_acme + with_clash_api + with_dhcp + with_gvisor + with_quic + with_tailscale + with_utls + with_wireguard + ] + system "go", "build", *std_go_args(ldflags:, tags: tags.join(",")), "./cmd/sing-box" + generate_completions_from_executable(bin/"sing-box", "completion") + end + + service do + run [opt_bin/"sing-box", "run", "--config", etc/"sing-box/config.json", "--directory", var/"lib/sing-box"] + run_type :immediate + keep_alive true + end + + test do + ss_port = free_port + (testpath/"shadowsocks.json").write <<~JSON + { + "inbounds": [ + { + "type": "shadowsocks", + "listen": "::", + "listen_port": #{ss_port}, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==" + } + ] + } + JSON + server = fork { exec bin/"sing-box", "run", "-D", testpath, "-c", testpath/"shadowsocks.json" } + + sing_box_port = free_port + (testpath/"config.json").write <<~JSON + { + "inbounds": [ + { + "type": "mixed", + "listen": "::", + "listen_port": #{sing_box_port} + } + ], + "outbounds": [ + { + "type": "shadowsocks", + "server": "127.0.0.1", + "server_port": #{ss_port}, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==" + } + ] + } + JSON + system bin/"sing-box", "check", "-D", testpath, "-c", "config.json" + client = fork { exec bin/"sing-box", "run", "-D", testpath, "-c", "config.json" } + + sleep 3 + begin + system "curl", "--socks5", "127.0.0.1:#{sing_box_port}", "github.com" + ensure + Process.kill 9, server + Process.wait server + Process.kill 9, client + Process.wait client + end + end +end diff --git a/Formula/s/singular.rb b/Formula/s/singular.rb new file mode 100644 index 0000000000000..1bea78e4ade16 --- /dev/null +++ b/Formula/s/singular.rb @@ -0,0 +1,82 @@ +class Singular < Formula + desc "Computer algebra system for polynomial computations" + homepage "https://www.singular.uni-kl.de/" + url "https://www.singular.uni-kl.de/ftp/pub/Math/Singular/SOURCES/4-4-1/singular-4.4.1p4.tar.gz" + version "4.4.1p4" + sha256 "454fdc7127875dd232bf15035514cb5a6043c8d9a2f7fc50320c987ba4581751" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.singular.uni-kl.de/ftp/pub/Math/Singular/SOURCES/" + regex(%r{href=["']?v?(\d+(?:[.-]\d+)+)/?["' >]}i) + strategy :page_match do |page, regex| + # Match versions from directories + versions = page.scan(regex) + .flatten + .uniq + .map { |v| Version.new(v.tr("-", ".")) } + .reject { |v| v.patch >= 90 } + .sort + next versions if versions.blank? + + # Assume the last-sorted version is newest + newest_version = versions.last + + # Fetch the page for the newest version directory + dir_page = Homebrew::Livecheck::Strategy.page_content( + URI.join(@url, "#{newest_version.to_s.tr(".", "-")}/").to_s, + ) + next versions if dir_page[:content].blank? + + # Identify versions from files in the version directory + dir_versions = dir_page[:content].scan(/href=.*?singular[._-]v?(\d+(?:\.\d+)+(?:p\d+)?)\.t/i).flatten + + dir_versions || versions + end + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "bb73332c43aa139f7b1057366896721a848f7b522bd79544d5dcc8c33b63506c" + sha256 arm64_sequoia: "f4431c9c52707091168df9e0137408844c19ccf4661d9cd81d66820e8f21de8a" + sha256 arm64_sonoma: "c084365a9bd822a8be4ec06a552f4539e6dd362962d924858fcd9473101838cd" + sha256 sonoma: "ba10b9f762b438a8195cc907fca2168eb24afbfaea4d8e8f3fbb9412a5411b7d" + sha256 arm64_linux: "03f0b04cc0b40da6777d065641868386ab0f3144ffd96aeb3b8a5de7dfc26334" + sha256 x86_64_linux: "2c1d627c411d376395cfe07c718cb16ca7708909090be8c3219051dfc8e63fd0" + end + + head do + url "https://github.com/Singular/Singular.git", branch: "spielwiese" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "flint" + depends_on "gmp" + depends_on "mpfr" + depends_on "ntl" + depends_on "python@3.14" + depends_on "readline" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--with-python=#{which("python3.14")}", + "CXXFLAGS=-std=c++11", + *std_configure_args + system "make", "install" + end + + test do + testinput = <<~EOS + ring r = 0,(x,y,z),dp; + poly p = x; + poly q = y; + poly qq = z; + p*q*qq; + EOS + assert_match "xyz", pipe_output("#{bin}/Singular", testinput, 0) + end +end diff --git a/Formula/s/sip.rb b/Formula/s/sip.rb new file mode 100644 index 0000000000000..616e8c6530228 --- /dev/null +++ b/Formula/s/sip.rb @@ -0,0 +1,85 @@ +class Sip < Formula + include Language::Python::Virtualenv + + desc "Tool to create Python bindings for C and C++ libraries" + homepage "https://python-sip.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/a7/8a/869417bc2ea45a29bc6ed4ee82757e472f0c7490cf5b7ddb82b70806bce4/sip-6.14.0.tar.gz" + sha256 "20c086aba387707b34cf47fd96d1a978d01e2b95807e86f8aaa960081f163b28" + license "BSD-2-Clause" + head "https://github.com/Python-SIP/sip.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6cf7a8de2a902dcb28039b9a9759bb255dc48a5b312d63aba075c7214e69d189" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cf7a8de2a902dcb28039b9a9759bb255dc48a5b312d63aba075c7214e69d189" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6cf7a8de2a902dcb28039b9a9759bb255dc48a5b312d63aba075c7214e69d189" + sha256 cellar: :any_skip_relocation, sonoma: "c2b704a9f45b1daad2ed8c3a0cc2e7c87e05707916dd9f635643d6c99c005809" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2b704a9f45b1daad2ed8c3a0cc2e7c87e05707916dd9f635643d6c99c005809" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2b704a9f45b1daad2ed8c3a0cc2e7c87e05707916dd9f635643d6c99c005809" + end + + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_install_with_resources + + # Modify the path sip-install writes in scripts as we install into a + # virtualenv but expect dependents to run with path to Python formula + inreplace venv.site_packages/"sipbuild/builder.py", /\bsys\.executable\b/, "\"#{which(python3)}\"" + end + + test do + (testpath/"pyproject.toml").write <<~TOML + # Specify sip v6 as the build system for the package. + [build-system] + requires = ["sip >=6, <7"] + build-backend = "sipbuild.api" + + # Specify the PEP 566 metadata for the project. + [tool.sip.metadata] + name = "fib" + TOML + + (testpath/"fib.sip").write <<~EOS + // Define the SIP wrapper to the (theoretical) fib library. + + %Module(name=fib, language="C") + + int fib_n(int n); + %MethodCode + if (a0 <= 0) + { + sipRes = 0; + } + else + { + int a = 0, b = 1, c, i; + + for (i = 2; i <= a0; i++) + { + c = a + b; + a = b; + b = c; + } + + sipRes = b; + } + %End + EOS + + system bin/"sip-install", "--target-dir", "." + end +end diff --git a/Formula/s/sipcalc.rb b/Formula/s/sipcalc.rb new file mode 100644 index 0000000000000..8ff7adf7dd314 --- /dev/null +++ b/Formula/s/sipcalc.rb @@ -0,0 +1,41 @@ +class Sipcalc < Formula + desc "Advanced console-based IP subnet calculator" + homepage "https://www.routemeister.net/projects/sipcalc/" + url "https://www.routemeister.net/projects/sipcalc/files/sipcalc-1.1.6.tar.gz" + sha256 "cfd476c667f7a119e49eb5fe8adcfb9d2339bc2e0d4d01a1d64b7c229be56357" + license "BSD-3-Clause" + + livecheck do + url "https://www.routemeister.net/projects/sipcalc/download.html" + regex(/href=.*?sipcalc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4f70922f3ffc35376cbd0deeaf75ed218c3d8b5aebe055c106924be78479dc39" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aff7a2b4ee9e42cb1137a8293b57d1e5bb8892dad88c72895fcc173c81083920" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29b5769fb8239c6028db50d8e402ef56c49eb88b6add34c61cc1ab5d367cceab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "80c8034d8d69fb6d1b28b5e04d4361f24cd54e90ed86542edeb75abc893f155f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ce581c927477b75b12e92cf656e7de4c93c304be04621a7a4a65a8f8aadeaa02" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9eb0d11f79f4a89148dcfba3ff714cad9c345276ce5ca0e8e937782cbc0d0e1d" + sha256 cellar: :any_skip_relocation, sonoma: "5f4c2014ec92fc178ee8a13ec43d528fb11eea75afbde7b4900659b7e3de12b0" + sha256 cellar: :any_skip_relocation, ventura: "83e31eb5e6862b8b43c64cc37f467514710165ddd129c9f7a79f34a28fd6d583" + sha256 cellar: :any_skip_relocation, monterey: "dc22b86797deef059d90b7bd8c07b235556acbad13e6df0575c99ea30359570a" + sha256 cellar: :any_skip_relocation, big_sur: "7ecd4de1c66d06136e36ec83e076b253212294f0407bf049e1bdf7746505c2ab" + sha256 cellar: :any_skip_relocation, catalina: "4b211b4978bd165adb71435e19f19f146ee84f905555c3bce2d4652375067d3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a08824e18de04aa9673ef0fe31bd7ea568eb4029210c58b57002f4f3110ba732" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32b27f7515668c3962b6f3e629928524026bf005b6ed247449779064bb65e1d7" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"sipcalc", "-h" + end +end diff --git a/Formula/s/sipp.rb b/Formula/s/sipp.rb new file mode 100644 index 0000000000000..40cba43fa6490 --- /dev/null +++ b/Formula/s/sipp.rb @@ -0,0 +1,40 @@ +class Sipp < Formula + desc "Traffic generator for the SIP protocol" + homepage "https://sipp.sourceforge.net/" + url "https://github.com/SIPp/sipp.git", + tag: "v3.7.5", + revision: "74b4ef48f8a233ba305ea26abf8826a9422801aa" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8c14fdd8ba2eb45885315842678991f42c734cb1b3d9963bbbe390e07aec32bf" + sha256 cellar: :any, arm64_sequoia: "a2942b53371902fd437dd9458831a0a497135a7499206e790b52e483a89ba557" + sha256 cellar: :any, arm64_sonoma: "608fcb0e1163938683a24673489d17e14d7b13a1b6767fce37dd42747964adfd" + sha256 cellar: :any, arm64_ventura: "1a11504a9913aff93e03b8b8cc1d153f364710992b51132bcdcb0402b57be35c" + sha256 cellar: :any, sonoma: "9e64cf797e33a2e8c3416e06c4e9aa2afc013d4bdf77577d10f3134603b7bace" + sha256 cellar: :any, ventura: "145387c8e8ee0545177ca3c42a496a51a43ba08b3ab74425d3a1371fcf7e2a8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a493972c8f938798453004d49e5a55c10809c57b4e391299a2b0ac22c9a50b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62d41b7f47fd3c19bbb42f819abdec06dae932d1268e1c1ff9292894a9da4de6" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + def install + args = %w[ + -DUSE_PCAP=1 + -DUSE_SSL=1 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "SIPp v#{version}", shell_output("#{bin}/sipp -v", 99) + end +end diff --git a/Formula/s/sipsak.rb b/Formula/s/sipsak.rb new file mode 100644 index 0000000000000..b8a34e2ca4934 --- /dev/null +++ b/Formula/s/sipsak.rb @@ -0,0 +1,41 @@ +class Sipsak < Formula + desc "SIP Swiss army knife" + homepage "https://github.com/nils-ohlmeier/sipsak/" + url "https://github.com/nils-ohlmeier/sipsak/releases/download/0.9.8.1/sipsak-0.9.8.1.tar.gz" + sha256 "c6faa022cd8c002165875d4aac83b7a2b59194f0491802924117fc6ac980c778" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "37a5656c10f93d897736172dcbd077d323c3c6924f28cf88c8cfd70adbe4443f" + sha256 cellar: :any, arm64_sequoia: "fc163d012b766abeb36447d0077a3711ba87868aafaee12c1ddd4a68e8e650af" + sha256 cellar: :any, arm64_sonoma: "267cd68ed07f710be35f79c815be4d80af199a7409d97f3dab329cc23ce124f9" + sha256 cellar: :any, arm64_ventura: "fdf8e854dbe1034dbf7a71760e4246bc6550a322954888fd0673284eedfcbe55" + sha256 cellar: :any, arm64_monterey: "e125f43909ca4f4a28524262a30f0e9428db17ba255c9ebe99fae92d031ee1f2" + sha256 cellar: :any, arm64_big_sur: "3ea5541c6c9e917890818c783eb555a6952ddb839ee431d4ab2fda5529e9a9d6" + sha256 cellar: :any, sonoma: "1e0913edfc8c9b359162ba1a77a93d657aca595f7f5f3afa5f55042028719570" + sha256 cellar: :any, ventura: "617c93ad77b71f6c68eb81eb2a6c8e6c084ece627be89a18b37fcf2fbad66aac" + sha256 cellar: :any, monterey: "4346791be5ee36c5436de257f75ccf2ef31ac8f99883566c8679bf8e4d13d361" + sha256 cellar: :any, big_sur: "f2f76d68fa6c9c88abcd0132201a395a54f2ad31c73ee49dcbfcb69dbfb20ede" + sha256 cellar: :any, catalina: "3a756aed37b8bd2a3ff62c517847c82732fd2f9a7b5bf85dfac83704d18d6539" + sha256 cellar: :any_skip_relocation, arm64_linux: "5613441ee9f747ab3c144eae245696f163b027884dd3fec4d7cf00b00a1168fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73f5a4948c437e0d89e33ff28f04842ef4c954fcfd9ed432da36620c20b6ca24" + end + + depends_on "openssl@3" + + def install + ENV.append "CFLAGS", "-std=gnu89" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"sipsak", "-V" + end +end diff --git a/Formula/s/siril.rb b/Formula/s/siril.rb new file mode 100644 index 0000000000000..289572bc9181c --- /dev/null +++ b/Formula/s/siril.rb @@ -0,0 +1,76 @@ +class Siril < Formula + desc "Astronomical image processing tool" + homepage "https://www.siril.org" + url "https://free-astro.org/download/siril-1.2.6.tar.bz2" + sha256 "312f82e78599f796d163a6d1c90589df1ed920b9ff2bb7ab5b808e43872817fa" + license "GPL-3.0-or-later" + revision 3 + head "https://gitlab.com/free-astro/siril.git", branch: "master" + + livecheck do + url "https://siril.org/download/" + regex(/href=.*?siril[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "08563c86ad8444f9f5bb08aa418380342448b6ff62dc37f62f2dae5ae2ca2d8f" + sha256 arm64_sequoia: "056cc668684cab712e919c26b6817f59069fc10c607f88ee7d76e0725e19604e" + sha256 arm64_sonoma: "e56ba213d399b3e1ac714a78c9d710f0cd49ea9245dd3d25f667f88db5c0dad5" + sha256 arm64_ventura: "a71c1f6a8798b1bdaf26d88d0f9e8bde62603c933859e9e8f34d5c69e1b7a452" + sha256 sonoma: "852c1a015a8472d91394191923c377832c02b5cfb30f3695d0979a3702b143b1" + sha256 ventura: "10d755c99a9eec1368ce76aac5905305dadf1666634c5c66e20b5d3676fdab9b" + sha256 arm64_linux: "9bcaacd18e1113c6ca812d872246ac81e398e1a6ce8c3e2490278b005feb7451" + sha256 x86_64_linux: "d96875e709864a5af01a2af6605ecccb944c41e567d8a9c4b7e54cc7858399b0" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "cfitsio" + depends_on "exiv2" + depends_on "ffmpeg" + depends_on "ffms2" + depends_on "fftw" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gnuplot" + depends_on "gsl" + depends_on "gtk+3" + depends_on "jpeg-turbo" + depends_on "json-glib" + depends_on "libheif" + depends_on "libpng" + depends_on "libraw" + depends_on "librsvg" + depends_on "libtiff" + depends_on "netpbm" + depends_on "opencv" + depends_on "pango" + depends_on "wcslib" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "gettext" + depends_on "gtk-mac-integration" + depends_on "libomp" + end + + def install + args = %w[ + --force-fallback-for=kplot + ] + + system "meson", "setup", "_build", *args, *std_meson_args + system "meson", "compile", "-C", "_build", "--verbose" + system "meson", "install", "-C", "_build" + end + + test do + system bin/"siril", "-v" + end +end diff --git a/Formula/s/sisc-scheme.rb b/Formula/s/sisc-scheme.rb new file mode 100644 index 0000000000000..3dd19be4b5fab --- /dev/null +++ b/Formula/s/sisc-scheme.rb @@ -0,0 +1,23 @@ +class SiscScheme < Formula + desc "Extensive Java based Scheme interpreter" + homepage "https://sisc-scheme.org/" + url "https://downloads.sourceforge.net/project/sisc/SISC%20Lite/1.16.6/sisc-lite-1.16.6.tar.gz" + sha256 "7a2f1ee46915ef885282f6df65f481b734db12cfd97c22d17b6c00df3117eea8" + license any_of: ["MPL-1.1", "GPL-2.0-or-later"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cc07c73860b9acfbad278e89277cacd790f4b5ac3de3800352d8ac6d6e833ccb" + end + + def install + libexec.install Dir["*"] + (bin/"sisc").write <<~EOS + #!/bin/sh + SISC_HOME=#{libexec} + exec #{libexec}/sisc "$@" + EOS + end +end diff --git a/Formula/s/sispmctl.rb b/Formula/s/sispmctl.rb new file mode 100644 index 0000000000000..cce6542d32869 --- /dev/null +++ b/Formula/s/sispmctl.rb @@ -0,0 +1,32 @@ +class Sispmctl < Formula + desc "Control Gembird SIS-PM programmable power outlet strips" + homepage "https://sispmctl.sourceforge.net/" + url "https://downloads.sourceforge.net/project/sispmctl/sispmctl/sispmctl-4.12/sispmctl-4.12.tar.gz" + sha256 "e757863a4838da6e1ca72a57adc5aca6fc47ffbddc72a69052d8abd743d57082" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "de0d97fb734c7e84c8cf6035079379103a41120cf72687594db4726f6185ea9a" + sha256 arm64_sequoia: "4550ae3f2066c6806e0f0805feba3128544530eec07f0a5c50bf95e24d9e2454" + sha256 arm64_sonoma: "583417f1421c804a4c9f8bfcd9b07da96206bb90f37bb9c7983b3813a5700f25" + sha256 arm64_ventura: "6f9a22d3ada050881c644cf1191f0bd3b102949428169c1ac27478ed33b343e8" + sha256 arm64_monterey: "aa41c0da8beb340c22c9eadaadddd5af20dc05fb4e6efdd2b86e10118d4fcef9" + sha256 sonoma: "5654736aa9565141c0001e8899824850dd817b5e229714282e9cdd5911ac273d" + sha256 ventura: "7320a88ebc435a780ec01e5797b39d447831492c4b342cced542c822cdb65440" + sha256 monterey: "08f320dfb6ab9d02451a687eedb317ff456144188b8a5c546d38e5335b71de47" + sha256 arm64_linux: "e4c1c91aa8aa9aca6a6faac24a61b615251a38dbc5c081381fea98797e80c41c" + sha256 x86_64_linux: "db43f15862bbace1e2af6f17b257da7d3522011d82f00fa581d78fea1faa47db" + end + + depends_on "pkgconf" => :build + depends_on "libusb-compat" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/sispmctl -v 2>&1") + end +end diff --git a/Formula/s/sitefetch.rb b/Formula/s/sitefetch.rb new file mode 100644 index 0000000000000..8f9e7e3624659 --- /dev/null +++ b/Formula/s/sitefetch.rb @@ -0,0 +1,25 @@ +class Sitefetch < Formula + desc "Fetch an entire site and save it as a text file" + homepage "https://github.com/egoist/sitefetch" + url "https://registry.npmjs.org/sitefetch/-/sitefetch-0.0.17.tgz" + sha256 "eb65e7d0179e5c06f70a3071865cf8199827428adb64da19de12afaf682c0ddd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5f514ec63a1829bd85a7cb8f5aef1f4712ab83e21480f583a05d4e231f90ac83" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sitefetch --version") + + system bin/"sitefetch", "https://example.com", "-o", "site.txt" + assert_match "Example Domain", (testpath/"site.txt").read + end +end diff --git a/Formula/s/six.rb b/Formula/s/six.rb new file mode 100644 index 0000000000000..e6796159c7ea0 --- /dev/null +++ b/Formula/s/six.rb @@ -0,0 +1,48 @@ +class Six < Formula + desc "Python 2 and 3 compatibility utilities" + homepage "https://github.com/benjaminp/six" + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c7985c480809b773f5c7b28d3eac082ad3bcc69c04e2ac100810901b0a6e410b" + end + + disable! date: "2025-10-16", because: "does not meet homebrew/core's requirements for Python library formulae" + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + + def pythons + deps.map(&:to_formula).sort_by(&:version).select { |f| f.name.start_with?("python@") } + end + + def install + pythons.each do |python| + python_exe = python.opt_libexec/"bin/python" + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + end + + def caveats + python_versions = pythons.map { |p| p.version.major_minor } + .map(&:to_s) + .join(", ") + + <<~EOS + This formula provides the `six` module for Python #{python_versions}. + If you need `six` for a different version of Python, use pip. + EOS + end + + test do + pythons.each do |python| + system python.opt_libexec/"bin/python", "-c", <<~PYTHON + import six + assert not six.PY2 + assert six.PY3 + PYTHON + end + end +end diff --git a/Formula/s/sixtunnel.rb b/Formula/s/sixtunnel.rb new file mode 100644 index 0000000000000..3bd2d2fb63d53 --- /dev/null +++ b/Formula/s/sixtunnel.rb @@ -0,0 +1,58 @@ +class Sixtunnel < Formula + desc "Tunnelling for application that don't speak IPv6" + homepage "https://github.com/wojtekka/6tunnel" + url "https://github.com/wojtekka/6tunnel/releases/download/0.14/6tunnel-0.14.tar.gz" + sha256 "6945312793079408f1ab40071cee68e70158a23560145f1d424a3eb16227f235" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "31ea36bb0c9a65137e00a01c1771740d1e716bbec5fcbd9d1395488ed8fbe9d5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4835e877672bb690cf45d67eb1abc2d818034668b0c1980927151e1ae9fb6025" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1acfbe3de474e92cd90bd4a9047f2324f5b0e2290a69dc389e418cde045d8547" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d4aebd48a551546f4cc6d56779be9fc64d7384eef2f64ce4cd5d6cef5b94a568" + sha256 cellar: :any_skip_relocation, sonoma: "9f82314d3df1855fa85b58b14ab63196645a341e9ea7803fbd5b2970844d70fc" + sha256 cellar: :any_skip_relocation, ventura: "1ed4515caffc5e22a3eecd3616d3464519d25f47be499509e9023fbb8158faa4" + sha256 cellar: :any_skip_relocation, arm64_linux: "8fbacca36b438381c95c88458edd9b7dcffc9bbbb0cad1b0dd92cbce113467d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1f95d4c2df935b35c82ee57674400ae4a62069d73d0ac4f59a785da0dba34bb" + end + + head do + url "https://github.com/wojtekka/6tunnel.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + require "socket" + dest_port = free_port + proxy_port = free_port + server = TCPServer.new dest_port + + server_pid = fork do + session = server.accept + session.puts "Hello world!" + session.close + end + sleep 1 + + tunnel_pid = spawn bin/"6tunnel", "-1", "-4", "-d", proxy_port.to_s, "localhost", dest_port.to_s + sleep 1 + + TCPSocket.open("localhost", proxy_port) do |sock| + assert_equal "Hello world!", sock.gets.chomp + end + ensure + Process.kill "TERM", tunnel_pid if tunnel_pid + Process.kill "TERM", server_pid if server_pid + end +end diff --git a/Formula/s/sjk.rb b/Formula/s/sjk.rb new file mode 100644 index 0000000000000..f5403cf0f4a07 --- /dev/null +++ b/Formula/s/sjk.rb @@ -0,0 +1,23 @@ +class Sjk < Formula + desc "Swiss Java Knife" + homepage "https://github.com/aragozin/jvm-tools" + url "https://search.maven.org/remotecontent?filepath=org/gridkit/jvmtool/sjk-plus/0.23/sjk-plus-0.23.jar" + sha256 "6aab07cdf0ecad394e225a1f47d7342cb23bfd8b7d5c65c945f81835363ec937" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "14d24741238dcbbe71fa663ce2bc230b37cdd5dc0f06086d1020250b86ef71b4" + end + + depends_on "openjdk" + + def install + libexec.install "sjk-plus-#{version}.jar" + bin.write_jar_script libexec/"sjk-plus-#{version}.jar", "sjk" + end + + test do + system bin/"sjk", "jps" + end +end diff --git a/Formula/s/sk.rb b/Formula/s/sk.rb new file mode 100644 index 0000000000000..d25f068cb55d0 --- /dev/null +++ b/Formula/s/sk.rb @@ -0,0 +1,36 @@ +class Sk < Formula + desc "Fuzzy Finder in rust!" + homepage "https://github.com/skim-rs/skim" + url "https://github.com/skim-rs/skim/archive/refs/tags/v0.20.5.tar.gz" + sha256 "c9b367bd37daa38b95a5da1e8f967279f4127168a38986b2f7d33a4b5fd413c2" + license "MIT" + head "https://github.com/skim-rs/skim.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8673c1f23e20a9046e5341e7f9bb2029966aad393adea9a92c839332e99a3807" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e64e2ab2050344a8e178d635f300acb272a27b414efcce6dc06296b6414c84c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef46fab492395a38197dd582bb66e594b968ad7368598f96ba72568ed08b36f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d93770fb5e79c73492e01038943ea22e440987d309aefe40f0b0379c68266843" + sha256 cellar: :any_skip_relocation, sonoma: "385dc10fb64e302ccbb054ae5fed0d15dbebe8f203ac215fb865978d43d2d1f7" + sha256 cellar: :any_skip_relocation, ventura: "d0eec0b3b53c89451193f3e81d44a70a2a1cd1a5895afd7c2e7523c0a5a74ca0" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2faf26cdaba0186091d6454bfb9904e5acb4a54c1c084fa3b9ba5293eb615aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2631947f06f94f9f1f0bce68d0684da6770f379ebe15d6a323b0fbcda8a492d2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "skim") + + generate_completions_from_executable(bin/"sk", "--shell") + bash_completion.install "shell/key-bindings.bash" + fish_completion.install "shell/key-bindings.fish" => "skim.fish" + zsh_completion.install "shell/key-bindings.zsh" + man1.install buildpath.glob("man/man1/*.1") + bin.install "bin/sk-tmux" + end + + test do + assert_match(/.*world/, pipe_output("#{bin}/sk -f wld", "hello\nworld")) + end +end diff --git a/Formula/s/skaffold.rb b/Formula/s/skaffold.rb new file mode 100644 index 0000000000000..64101526f60e5 --- /dev/null +++ b/Formula/s/skaffold.rb @@ -0,0 +1,34 @@ +class Skaffold < Formula + desc "Easy and Repeatable Kubernetes Development" + homepage "https://skaffold.dev/" + url "https://github.com/GoogleContainerTools/skaffold.git", + tag: "v2.16.1", + revision: "95fb592deb61a4e290edca4925bd7c9c2fa93f6c" + license "Apache-2.0" + head "https://github.com/GoogleContainerTools/skaffold.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "08b8fc12583fe7eeb917ffe9278e721817db943c7eb80130c67b5eb389107b13" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "da74805a5e0303550d1b4b9458909a0ceda5ef187e7655f349bfc6eb734a25cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4f7153ad45855c062b85cdfb448ad8b91ffc93a9b6d46186781301dd95566a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d98bd0a90396c3601e76f6e3e11765536671ffd877fe8b8bb952f42deafa9d11" + sha256 cellar: :any_skip_relocation, sonoma: "86ae70e14ccf3d0d5a56b41f1762f973b0f021cf5d0bfbd861caa2c82a030ed4" + sha256 cellar: :any_skip_relocation, ventura: "73e002987e5d6fef0f608e0d547847a31cf0f051b6c4afac21383b675f72136e" + sha256 cellar: :any_skip_relocation, arm64_linux: "17ef5e278367b76792ed55c9f8d2f85574b08f02aca17edc4cdfd1ac2b149b79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bd0ab209037e2a9b76d9a4fe8d81ff97e73c42540050a4ded4797cc663f0314" + end + + depends_on "go" => :build + + def install + system "make" + bin.install "out/skaffold" + generate_completions_from_executable(bin/"skaffold", "completion") + end + + test do + (testpath/"Dockerfile").write "FROM scratch" + output = shell_output("#{bin}/skaffold init --analyze").chomp + assert_equal '{"builders":[{"name":"Docker","payload":{"path":"Dockerfile"}}]}', output + end +end diff --git a/Formula/s/skalibs.rb b/Formula/s/skalibs.rb new file mode 100644 index 0000000000000..9de5a977cb44d --- /dev/null +++ b/Formula/s/skalibs.rb @@ -0,0 +1,42 @@ +class Skalibs < Formula + desc "Skarnet's library collection" + homepage "https://skarnet.org/software/skalibs/" + url "https://skarnet.org/software/skalibs/skalibs-2.14.4.0.tar.gz" + sha256 "0e626261848cc920738f92fd50a24c14b21e30306dfed97b8435369f4bae00a5" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b0b1cb92fd1402d94ae6077cfb98b9ced6a4a8ff78cae0928aa853b63964a139" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c668db63e78d6fc7ebe695706f1d26081db734729bdb6892f783d128b8943291" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43990849b9d5f38a0a33a6dc0f25b4ee9ff409507a88e1e6128e4667a1b3713a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "01857e93e5a8a2704431e7c6b2ace60186c31b81c43f1d6c47fd3fd52076367b" + sha256 cellar: :any_skip_relocation, sonoma: "a3fe1ab96abe85ef7adfb3171a518adcd560fcab2e9cb0b6f94bad4234f9c159" + sha256 cellar: :any_skip_relocation, ventura: "d2c4b2975ac522a649ed12b2d5274adf349b742ba2ec340b26856fd599184097" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8b80b464e01b3bee02137e71cbcdc44003ebede2c435a4ee267358044588ea9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d45e63d528bb32ffe845bcfcacf39d8e52809c0975273aa51a2dd324fea60c5d" + end + + def install + # Shared libraries are linux targets and not supported on macOS. + args = %w[ + --disable-silent-rules + --disable-shared + --enable-pkgconfig + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lskarnet", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/skani.rb b/Formula/s/skani.rb new file mode 100644 index 0000000000000..3fbf24948e0d7 --- /dev/null +++ b/Formula/s/skani.rb @@ -0,0 +1,30 @@ +class Skani < Formula + desc "Fast, robust ANI and aligned fraction for (metagenomic) genomes and contigs" + homepage "https://github.com/bluenote-1577/skani" + url "https://github.com/bluenote-1577/skani/archive/refs/tags/v0.3.1.tar.gz" + sha256 "494b64ec764be1ad485cd5d4f8c97180ff61377863d990532f6fa9541ab1b6f4" + license "MIT" + head "https://github.com/bluenote-1577/skani.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3546fc60dc5365b882e38900e4d073a448d0807017a361850b2431e14d4fa2ad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e82c68ed88fa2a1f79205d801e065f75d7e1be579110f643a233036910561db3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aac2ae00d83aa56517fce2357e1ed32acb4d479f13ae10680e004a8414ba091a" + sha256 cellar: :any_skip_relocation, sonoma: "e916617176a333e48a633f62711fd64981759db8c7ab90130ce879f925126c7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b45a01a56e17d9956fa8dcf3759eb38cc64ca85a5e8d653301b4e05452dd4a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "920c90c25b0714d398f7840d2004ca2ef26f7071f7d47a72e88784fe949bc207" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + pkgshare.install "test_files" + end + + test do + cp_r pkgshare/"test_files/.", testpath + output = shell_output("#{bin}/skani dist e.coli-EC590.fasta e.coli-K12.fasta") + assert_match "complete sequence", output + end +end diff --git a/Formula/s/skate.rb b/Formula/s/skate.rb new file mode 100644 index 0000000000000..55205f360d3ee --- /dev/null +++ b/Formula/s/skate.rb @@ -0,0 +1,40 @@ +class Skate < Formula + desc "Personal key value store" + homepage "https://github.com/charmbracelet/skate" + url "https://github.com/charmbracelet/skate/archive/refs/tags/v1.0.1.tar.gz" + sha256 "f844fd980e1337be0f1bc321e58e48680fe3855e17c6c334ed8b22b9059949d2" + license "MIT" + head "https://github.com/charmbracelet/skate.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd5a8f8f84a8edcb61c40733fbef18e4369af5ee7fd8c106d0dcdce1f5cc798b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51dffe30dad6853d764248411bd1b373e56795410d7480ffcee819a67cf5b641" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51dffe30dad6853d764248411bd1b373e56795410d7480ffcee819a67cf5b641" + sha256 cellar: :any_skip_relocation, arm64_ventura: "51dffe30dad6853d764248411bd1b373e56795410d7480ffcee819a67cf5b641" + sha256 cellar: :any_skip_relocation, sonoma: "873150989401c84050ba2180e0edc835fd0daf05481d723626457ee6a7ff40cb" + sha256 cellar: :any_skip_relocation, ventura: "873150989401c84050ba2180e0edc835fd0daf05481d723626457ee6a7ff40cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "d14356cf95cc1e3ccfbe9fc80ea1982f615afee372c2392149ee64ef5fe6fb8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "698c00996b38d34b04b8adadba65ffc338f77ac2f58889a31721f3b54d2e4fff" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"skate", "completion") + end + + test do + system bin/"skate", "set", "foo", "bar" + assert_equal "bar", shell_output("#{bin}/skate get foo").chomp + assert_match "foo", shell_output("#{bin}/skate list") + + # test unicode + system bin/"skate", "set", "猫咪", "喵" + assert_equal "喵", shell_output("#{bin}/skate get 猫咪").chomp + + assert_match version.to_s, shell_output("#{bin}/skate --version") + end +end diff --git a/Formula/s/skeema.rb b/Formula/s/skeema.rb new file mode 100644 index 0000000000000..7af968a348d50 --- /dev/null +++ b/Formula/s/skeema.rb @@ -0,0 +1,34 @@ +class Skeema < Formula + desc "Declarative pure-SQL schema management for MySQL and MariaDB" + homepage "https://www.skeema.io/" + url "https://github.com/skeema/skeema/archive/refs/tags/v1.13.1.tar.gz" + sha256 "075fdd68c42f753263990f7001b0fa24f20e1675496e4cd7c3408271a246875a" + license "Apache-2.0" + head "https://github.com/skeema/skeema.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e41e0f1aef29a2784c551c6f55558fb4c6208310ce1db1b16b7937f4ac087bbf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e41e0f1aef29a2784c551c6f55558fb4c6208310ce1db1b16b7937f4ac087bbf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e41e0f1aef29a2784c551c6f55558fb4c6208310ce1db1b16b7937f4ac087bbf" + sha256 cellar: :any_skip_relocation, sonoma: "26539db6b266b2be11bbfd355dbe554956e02849952cd7210b203f13d18909b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "49a176bd8c9c84a89025faa55f2b8b2f07382ca8baf0ef5296a7a0120ff18be2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97028b7cbf5f1d3d4776c38f9995ef5baa58a66ed6e158c9d35fc3237d6deecb" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match "Option --host must be supplied on the command-line", + shell_output("#{bin}/skeema init 2>&1", 78) + + assert_match "Unable to connect to localhost", + shell_output("#{bin}/skeema init -h localhost -u root --password=test 2>&1", 2) + + assert_match version.to_s, shell_output("#{bin}/skeema --version") + end +end diff --git a/Formula/s/ski.rb b/Formula/s/ski.rb new file mode 100644 index 0000000000000..d6514fe2052a5 --- /dev/null +++ b/Formula/s/ski.rb @@ -0,0 +1,43 @@ +class Ski < Formula + include Language::Python::Shebang + + desc "Evade the deadly Yeti on your jet-powered skis" + homepage "http://catb.org/~esr/ski/" + url "http://www.catb.org/~esr/ski/ski-6.15.tar.gz" + sha256 "aaff38e0f6a2c789f2c1281871ecc4d3f4e9b14f938a6d3bf914b4285bbdb748" + license "BSD-2-Clause" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("-", ".") } + end + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "14141d2ba391efd4932d5c119c2429abb66f8ef243bc0b22fcf9b71f717be9aa" + end + + head do + url "https://gitlab.com/esr/ski.git", branch: "master" + depends_on "xmlto" => :build + end + + uses_from_macos "python" + + def install + if build.head? + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "make" + end + bin.install "ski" + man6.install "ski.6" + end + + test do + assert_match "Bye!", pipe_output(bin/"ski", "") + end +end diff --git a/Formula/s/skinny.rb b/Formula/s/skinny.rb new file mode 100644 index 0000000000000..f72f9ccc60180 --- /dev/null +++ b/Formula/s/skinny.rb @@ -0,0 +1,30 @@ +class Skinny < Formula + desc "Full-stack web app framework in Scala" + homepage "https://skinny-framework.github.io" + url "https://github.com/skinny-framework/skinny-framework/releases/download/4.0.1/skinny-4.0.1.tar.gz" + sha256 "2382ba97f799bfc772ee79b2c084c63a1278ddd89de8dacd4ba6433f41294812" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fe3e73f7ce63036df9780b6681a13aa48da130e968bbd84843c12ac2b7940f25" + end + + depends_on "openjdk" + + def install + inreplace %w[skinny skinny-blank-app/skinny], "/usr/local", HOMEBREW_PREFIX + libexec.install Dir["*"] + + skinny_env = Language::Java.overridable_java_home_env + skinny_env[:PATH] = "#{bin}:${PATH}" + skinny_env[:PREFIX] = libexec + (bin/"skinny").write_env_script libexec/"skinny", skinny_env + end + + test do + system bin/"skinny", "new", "myapp" + end +end diff --git a/Formula/s/skktools.rb b/Formula/s/skktools.rb new file mode 100644 index 0000000000000..a31c59142652f --- /dev/null +++ b/Formula/s/skktools.rb @@ -0,0 +1,108 @@ +class Skktools < Formula + desc "SKK dictionary maintenance tools" + homepage "https://github.com/skk-dev/skktools" + url "https://github.com/skk-dev/skktools/archive/refs/tags/skktools-1_3_4.tar.gz" + sha256 "84cc5d3344362372e0dfe93a84790a193d93730178401a96248961ef161f2168" + license "GPL-2.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "20ab94e9dabb1954777337c8abb6d98e39fc9da6963e7ec852cf96b65bae7f5a" + sha256 cellar: :any, arm64_sequoia: "84de631d3930f335f030cfa8a3c8669d76c0052c26213b5321496087c4a156ec" + sha256 cellar: :any, arm64_sonoma: "e29e36abbb09213d335f3610286be258c8ee4f0f692cc30d66fa6553656c8e49" + sha256 cellar: :any, arm64_ventura: "00331db039291620e97f2dbd6b56062d00ffe4337a0fd6b041f1fb8952255be9" + sha256 cellar: :any, arm64_monterey: "efda775981959fb7379c266e566532e39413278adc47cd63edad01d1e5b6479e" + sha256 cellar: :any, arm64_big_sur: "a00ce61f36ef97371d14fcd190fd130f5e3effda89a9e9dc42f416c366cfc17f" + sha256 cellar: :any, sonoma: "d48010adc51d34eb8dd0fd09e51006b70e026ae9939dcb613236b81ee89e79ab" + sha256 cellar: :any, ventura: "34347fbfb91b8272223fc83b58b8314a8fea0b66dfeab6d169b8f76a68f52ec0" + sha256 cellar: :any, monterey: "e1183e406c1029e930284dd352e92429e12dc695af9e1f01d80d35871328c4bc" + sha256 cellar: :any, big_sur: "8fbd977dbce7602bff5b095508963570d20555cb607e8526d0fa0f7941aedc42" + sha256 cellar: :any, catalina: "3a24b4de5dd2f12b857d47a9776a979c0dc41f47525e0cf0d4e639e73fcd0df3" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fb78300abadf0685a2be3a0e51eed5581127a51c3aa56d85da8ce6e4192d419" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac8ed96d1342ecee708da56e9da672b9603b75c542bd835a83435d136e54100e" + end + + depends_on "pkgconf" => :build + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "gdbm" + end + + def install + args = ["--with-skkdic-expr2"] + if OS.linux? + args << "--with-gdbm" + # Help find Homebrew's gdbm compatibility layer header + inreplace %w[configure skkdic-expr.c], "gdbm/ndbm.h", "gdbm-ndbm.h" + end + system "./configure", *args, *std_configure_args + system "make", "CC=#{ENV.cc}" + ENV.deparallelize + system "make", "install" + end + + test do + test_dic = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } + わるs /悪/ + わるk /悪/ + わるi /悪/ + EOS + (testpath/"SKK-JISYO.TEST").write test_dic + + test_shuffle = <<~EOS.tap { |s| s.encode("euc-jis-2004") } + わるs /悪/ + わるi /悪/ + わるk /悪/ + EOS + + expect_shuffle = <<~EOS.tap { |s| s.encode("euc-jis-2004") } + ;; okuri-ari entries. + わるs /悪/ + わるk /悪/ + わるi /悪/ + EOS + + test_sp1 = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } + わるs /悪/ + わるk /悪/ + EOS + (testpath/"test.sp1").write test_sp1 + + test_sp2 = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } + わるk /悪/ + わるi /悪/ + EOS + (testpath/"test.sp2").write test_sp2 + + test_sp3 = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } + わるi /悪/ + EOS + (testpath/"test.sp3").write test_sp3 + + expect_expr = <<~EOS.tap { |s| s.encode("euc-jis-2004") } + ;; okuri-ari entries. + わるs /悪/ + わるk /悪/ + EOS + + expect_count = "SKK-JISYO.TEST: 3 candidates\n" + actual_count = shell_output("#{bin}/skkdic-count SKK-JISYO.TEST") + assert_equal expect_count, actual_count + + actual_shuffle = pipe_output("#{bin}/skkdic-sort", test_shuffle, 0) + assert_equal expect_shuffle, actual_shuffle + + ["skkdic-expr", "skkdic-expr2"].each do |cmd| + expr_cmd = "#{bin}/#{cmd} test.sp1 + test.sp2 - test.sp3" + actual_expr = shell_output(expr_cmd) + assert_equal expect_expr, pipe_output("#{bin}/skkdic-sort", actual_expr) + end + end +end diff --git a/Formula/s/skopeo.rb b/Formula/s/skopeo.rb new file mode 100644 index 0000000000000..5d776a4286e22 --- /dev/null +++ b/Formula/s/skopeo.rb @@ -0,0 +1,67 @@ +class Skopeo < Formula + desc "Work with remote images registries" + homepage "https://github.com/containers/skopeo" + url "https://github.com/containers/skopeo/archive/refs/tags/v1.20.0.tar.gz" + sha256 "0c19fe51b2cd8d1bd5e38c03b97421e318fc08153bdf5ef2f816a29889eacdef" + license "Apache-2.0" + + bottle do + sha256 arm64_tahoe: "0d0b4def1c9647842f565b8b63a71f68a4f82d650764008bbcd48994d26f2cf7" + sha256 arm64_sequoia: "48fb54d9dfc643afa30a0b494a948c6a03333aa9364003db282d9135abb914a0" + sha256 arm64_sonoma: "8d2640e13bfb86252023095c04acd31a4b1ec06a3b07d5e3a61046c5c0669bcf" + sha256 arm64_ventura: "aafd89323832b5b4f121a455f0c87e7e805e72ba85d1fa62edb3e7918ef883d1" + sha256 sonoma: "9be5e84aaea3ebfa9231ab1b5d9d0ed6eacdcaec9260d8c989484a1ee75ea5de" + sha256 ventura: "445eb2037a597f3d28d217d66509e5b4f5cd62b10de08226b0952b5c0296e5c6" + sha256 arm64_linux: "7dd90c80fe4078016c0d0add52a9874fac2c22dfa62ab08219ae9268aed6e09e" + sha256 x86_64_linux: "592cb52b502eb29da5ef94dce2afc60e804435129f2115a9b77301ca48622032" + end + + depends_on "go" => :build + depends_on "go-md2man" => :build + depends_on "pkgconf" => :build + depends_on "gpgme" + + on_linux do + depends_on "device-mapper" + end + + def install + ENV["CGO_ENABLED"] = "1" + ENV.append "CGO_FLAGS", ENV.cppflags + ENV.append "CGO_FLAGS", Utils.safe_popen_read(Formula["gpgme"].opt_bin/"gpgme-config", "--cflags") + + tags = [ + "containers_image_ostree_stub", + Utils.safe_popen_read("hack/btrfs_installed_tag.sh").chomp, + Utils.safe_popen_read("hack/libsubid_tag.sh").chomp, + ].uniq + + ldflag_prefix = "github.com/containers/image/v5" + ldflags = %W[ + -X main.gitCommit= + -X #{ldflag_prefix}/docker.systemRegistriesDirPath=#{etc}/containers/registries.d + -X #{ldflag_prefix}/internal/tmpdir.unixTempDirForBigFiles=/var/tmp + -X #{ldflag_prefix}/signature.systemDefaultPolicyPath=#{etc}/containers/policy.json + -X #{ldflag_prefix}/pkg/sysregistriesv2.systemRegistriesConfPath=#{etc}/containers/registries.conf + ] + + system "go", "build", *std_go_args(ldflags:, tags:), "./cmd/skopeo" + system "make", "PREFIX=#{prefix}", "GOMD2MAN=go-md2man", "install-docs" + + (etc/"containers").install "default-policy.json" => "policy.json" + (etc/"containers/registries.d").install "default.yaml" + + generate_completions_from_executable(bin/"skopeo", "completion") + end + + test do + cmd = "#{bin}/skopeo --override-os linux inspect --no-creds docker://busybox" + output = shell_output(cmd) + assert_match "docker.io/library/busybox", output + + # https://github.com/Homebrew/homebrew-core/pull/47766 + # https://github.com/Homebrew/homebrew-core/pull/45834 + assert_match(/Invalid destination name test: Invalid image name .+, expected colon-separated transport:reference/, + shell_output("#{bin}/skopeo copy docker://alpine test 2>&1", 1)) + end +end diff --git a/Formula/s/skylighting.rb b/Formula/s/skylighting.rb new file mode 100644 index 0000000000000..7082e42f4ea93 --- /dev/null +++ b/Formula/s/skylighting.rb @@ -0,0 +1,126 @@ +class Skylighting < Formula + desc "Flexible syntax highlighter using KDE XML syntax descriptions" + homepage "https://github.com/jgm/skylighting" + url "https://github.com/jgm/skylighting/archive/refs/tags/0.14.6.tar.gz" + sha256 "73417bbc85c1e11fb2bdaf565629e6bb78c71694d70d436bd5dcbc5b906507e7" + license "GPL-2.0-or-later" + head "https://github.com/jgm/skylighting.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7be4bf7768c7467656cccdcc5a50fc62309d752c3fa84ad732a81ab481cf5725" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94130797e5030be1f9205ccf90936b394023998fda4411a9a828ddf1c0f7f74b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5604c19fbf706cfec16847827ac7082e5411204bb4e67f929955bf72e24e1ded" + sha256 cellar: :any_skip_relocation, arm64_ventura: "349e25915741331c7f6982402dce1d6a5b5d85d1505701fe71c6f265198a4eb7" + sha256 cellar: :any_skip_relocation, sonoma: "46ace354ae631044134268037344d1b2f3d44510bcfb60ca37738b8f9d83cc26" + sha256 cellar: :any_skip_relocation, ventura: "8040d0df7ba15d49dc5aed911c5dab1014eceec887af27fea2dbca5c6a8c9d06" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff15b8cc26e8d8c88e05d5e4ed9de474c2525a59cb2c1f1c886765506282f601" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3c54aa4802ff828fd7b6dc738e429c0394a686bbf00c43705e2f559ae2ed3ff" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + + # moving this file aside during the first package's compilation avoids + # spurious errors about undeclared autogenerated modules + mv buildpath/"skylighting/skylighting.cabal", buildpath/"skylighting.cabal.temp-loc" + system "cabal", "v2-install", buildpath/"skylighting-core", "--flags=executable", *std_cabal_v2_args + mv buildpath/"skylighting.cabal.temp-loc", buildpath/"skylighting/skylighting.cabal" + + cd "skylighting" do + system bin/"skylighting-extract", buildpath/"skylighting-core/xml" + end + system "cabal", "v2-install", buildpath/"skylighting", "--flags=executable", *std_cabal_v2_args + end + + test do + (testpath/"Test.java").write <<~JAVA + import java.util.*; + + public class Test { + public static void main(String[] args) throws Exception { + final ArrayDeque argDeque = new ArrayDeque<>(Arrays.asList(args)); + for (arg in argDeque) { + System.out.println(arg); + if (arg.equals("foo")) + throw new NoSuchElementException(); + } + } + } + JAVA + expected_out = <<~'LATEX' + \documentclass{article} + \usepackage[margin=1in]{geometry} + \usepackage{color} + \usepackage{fancyvrb} + \newcommand{\VerbBar}{|} + \newcommand{\VERB}{\Verb[commandchars=\\\{\}]} + \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} + % Add ',fontsize=\small' for more characters per line + \usepackage{framed} + \definecolor{shadecolor}{RGB}{255,255,255} + \newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} + \newcommand{\AlertTok}[1]{\textcolor[rgb]{0.75,0.01,0.01}{\textbf{\colorbox[rgb]{0.97,0.90,0.90}{#1}}}} + \newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.79,0.38,0.79}{#1}} + \newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.00,0.34,0.68}{#1}} + \newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.69,0.50,0.00}{#1}} + \newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.39,0.29,0.61}{\textbf{#1}}} + \newcommand{\CharTok}[1]{\textcolor[rgb]{0.57,0.30,0.62}{#1}} + \newcommand{\CommentTok}[1]{\textcolor[rgb]{0.54,0.53,0.53}{#1}} + \newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.00,0.58,1.00}{#1}} + \newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.67,0.33,0.00}{#1}} + \newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.12,0.11,0.11}{\textbf{#1}}} + \newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.00,0.34,0.68}{#1}} + \newcommand{\DecValTok}[1]{\textcolor[rgb]{0.69,0.50,0.00}{#1}} + \newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.38,0.47,0.50}{#1}} + \newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.75,0.01,0.01}{\underline{#1}}} + \newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.58,1.00}{\textbf{#1}}} + \newcommand{\FloatTok}[1]{\textcolor[rgb]{0.69,0.50,0.00}{#1}} + \newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.39,0.29,0.61}{#1}} + \newcommand{\ImportTok}[1]{\textcolor[rgb]{1.00,0.33,0.00}{#1}} + \newcommand{\InformationTok}[1]{\textcolor[rgb]{0.69,0.50,0.00}{#1}} + \newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.12,0.11,0.11}{\textbf{#1}}} + \newcommand{\NormalTok}[1]{\textcolor[rgb]{0.12,0.11,0.11}{#1}} + \newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.12,0.11,0.11}{#1}} + \newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.43,0.16}{#1}} + \newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.00,0.43,0.16}{#1}} + \newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.34,0.68}{\colorbox[rgb]{0.88,0.91,0.97}{#1}}} + \newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.24,0.68,0.91}{#1}} + \newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{1.00,0.33,0.00}{#1}} + \newcommand{\StringTok}[1]{\textcolor[rgb]{0.75,0.01,0.01}{#1}} + \newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.34,0.68}{#1}} + \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.75,0.01,0.01}{#1}} + \newcommand{\WarningTok}[1]{\textcolor[rgb]{0.75,0.01,0.01}{#1}} + \title{Test.java} + + \begin{document} + \maketitle + \begin{Shaded} + \begin{Highlighting}[] + \KeywordTok{import} \ImportTok{java}\OperatorTok{.}\ImportTok{util}\OperatorTok{.*;} + + \KeywordTok{public} \KeywordTok{class}\NormalTok{ Test }\OperatorTok{\{} + \KeywordTok{public} \DataTypeTok{static} \DataTypeTok{void} \FunctionTok{main}\OperatorTok{(}\BuiltInTok{String}\OperatorTok{[]}\NormalTok{ args}\OperatorTok{)} \KeywordTok{throws} \BuiltInTok{Exception} \OperatorTok{\{} + \DataTypeTok{final} \BuiltInTok{ArrayDeque}\OperatorTok{\textless{}}\BuiltInTok{String}\OperatorTok{\textgreater{}}\NormalTok{ argDeque }\OperatorTok{=} \KeywordTok{new} \BuiltInTok{ArrayDeque}\OperatorTok{\textless{}\textgreater{}(}\BuiltInTok{Arrays}\OperatorTok{.}\FunctionTok{asList}\OperatorTok{(}\NormalTok{args}\OperatorTok{));} + \ControlFlowTok{for} \OperatorTok{(}\NormalTok{arg in argDeque}\OperatorTok{)} \OperatorTok{\{} + \BuiltInTok{System}\OperatorTok{.}\FunctionTok{out}\OperatorTok{.}\FunctionTok{println}\OperatorTok{(}\NormalTok{arg}\OperatorTok{);} + \ControlFlowTok{if} \OperatorTok{(}\NormalTok{arg}\OperatorTok{.}\FunctionTok{equals}\OperatorTok{(}\StringTok{"foo"}\OperatorTok{))} + \ControlFlowTok{throw} \KeywordTok{new} \BuiltInTok{NoSuchElementException}\OperatorTok{();} + \OperatorTok{\}} + \OperatorTok{\}} + \OperatorTok{\}} + \end{Highlighting} + \end{Shaded} + + \end{document} + LATEX + + assert_equal expected_out.strip, shell_output("#{bin}/skylighting -f latex Test.java").strip + end +end diff --git a/Formula/s/skymaker.rb b/Formula/s/skymaker.rb new file mode 100644 index 0000000000000..116225791637e --- /dev/null +++ b/Formula/s/skymaker.rb @@ -0,0 +1,49 @@ +class Skymaker < Formula + desc "Generates fake astronomical images" + homepage "https://www.astromatic.net/software/skymaker" + # Upstream URL is currently 404 Not Found. Can re-enable if upstream restores URL. + # url "https://www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" + url "https://web.archive.org/web/20161206053718/www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" + mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/skymaker/skymaker-3.10.5.tar.gz" + sha256 "a16f9c2bd653763b5e1629e538d49f63882c46291b479b4a4997de84d8e9fb0f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a64d0196f49aabd48d626c7b2585e61faa5812eae14a914f884733fb8a9dd754" + sha256 cellar: :any, arm64_sonoma: "3b60d5073126dc8d3d74b4c96855b082aa49fc6d5b6a56340d14f93b746c0b15" + sha256 cellar: :any, arm64_ventura: "27e46c46cf30f77353d447b24629b1d2824c70369fdcd08307be2e0984a0fb3e" + sha256 cellar: :any, arm64_monterey: "41786c90ee63b22f0d1a582dc7b42ed9aa9a749e4be35772169805c6b7804510" + sha256 cellar: :any, arm64_big_sur: "44e3eadc4f4a2984ffff332f93e9aa7a383b7a395ccd9fd6714a237a48ed72d0" + sha256 cellar: :any, sonoma: "c8c9e031c32c25775d91f93fd7f580c8bd04f63e408eafa607140fd200cad972" + sha256 cellar: :any, ventura: "b535c7f706a5139cde6cbbb0893009287cc2bf7062474f90de68a557ba3a4397" + sha256 cellar: :any, monterey: "9c6b33e5127676aaec7d1d8c0232fb78be8a0bb8a5ee4fc429e0516b45e0846c" + sha256 cellar: :any, big_sur: "2262e9a1f11f41c75fc8ccb47717f779bbb62bf86ddbabd42975fe684278efb9" + sha256 cellar: :any, catalina: "af78e7af9c84517e8f7db071ef3718a34eafc39d6eac3357d77ee183d4fe2cdf" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa9e4c7c056d4a8465d105e059ef46c1256724d5dbe879c6e26ef218390e5fb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10fd94a91d3a556bbc800e809c596451cd08893656ad8f2205759e2016411328" + end + + deprecate! date: "2024-06-10", because: :unmaintained + disable! date: "2025-06-21", because: :unmaintained + + depends_on "autoconf" => :build + depends_on "fftw" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + ENV.append_to_cflags "-fcommon" if OS.linux? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "autoconf" + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "added", shell_output("#{bin}/sky 2>&1") + end +end diff --git a/Formula/s/sl.rb b/Formula/s/sl.rb new file mode 100644 index 0000000000000..1620013c8f96d --- /dev/null +++ b/Formula/s/sl.rb @@ -0,0 +1,40 @@ +class Sl < Formula + desc "Prints a steam locomotive if you type sl instead of ls" + homepage "https://github.com/mtoyoda/sl" + url "https://github.com/mtoyoda/sl/archive/refs/tags/5.02.tar.gz" + sha256 "1e5996757f879c81f202a18ad8e982195cf51c41727d3fea4af01fdcbbb5563a" + license "MIT" + head "https://github.com/mtoyoda/sl.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "99c2620dc9fe4058ba790fd445adf4160f5201ef2ad2abae5b9d90b707684f26" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "154511be7a41ffedfc392b2be2134fc6e5a0a7de8a34c27cc00b41dce1f6cd38" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c867d7c636940322cd83ce8edc47d04be3b67293194fecc6ffafcba71a464bc3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d6689964bcfe1c68de131e77999ea19ceadcb28e304d453f6136db063a9ece0f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6d4212674cc9cc1628689d014efd992a03ab913f44b0a0411c6eb65f8e25bf95" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d8ab2f34483a0a595350f949b1a0a4386b3836ce624245365c7bce6664bb283a" + sha256 cellar: :any_skip_relocation, sonoma: "7370b30c455573e2e8183282ee3c65c98fc1d211cec020bec193484144344788" + sha256 cellar: :any_skip_relocation, ventura: "8b15e6fced6896f40152c7fa8950be193da18999f32cd487293bd0db339b5088" + sha256 cellar: :any_skip_relocation, monterey: "128d4b542acd951da4edebc83f18d51c2ee3a9ef941e3e369648b977ee2d0771" + sha256 cellar: :any_skip_relocation, big_sur: "0300afadf35bb67efe622add3f7a928bf123dd855e37376e278052b4787e65d4" + sha256 cellar: :any_skip_relocation, catalina: "31b8e67d984635b74aec3a5b47b6145789ed9c09d065751cac862eec1386502d" + sha256 cellar: :any_skip_relocation, arm64_linux: "036507954ad40e929a63e30e6feb092a7bf142a6d08c15bdb9d43ac34feeb0cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2afd20ebfe0276c9b39a77ef22611e8815eb936c3c21abb31cfd8f097f161476" + end + + uses_from_macos "ncurses" + + conflicts_with "sapling", because: "both install `sl` binaries" + + def install + system "make", "-e" + bin.install "sl" + man1.install "sl.1" + end + + test do + system bin/"sl", "-c" + end +end diff --git a/Formula/s/slack-mcp-server.rb b/Formula/s/slack-mcp-server.rb new file mode 100644 index 0000000000000..72c8a62a27371 --- /dev/null +++ b/Formula/s/slack-mcp-server.rb @@ -0,0 +1,29 @@ +class SlackMcpServer < Formula + desc "Powerful MCP Slack Server with multiple transports and smart history fetch logic" + homepage "https://github.com/korotovsky/slack-mcp-server" + url "https://github.com/korotovsky/slack-mcp-server/archive/refs/tags/v1.1.26.tar.gz" + sha256 "68ce43e9edbdb8df87aead39abfda1d068e21559b2bbd341531fb7715e1e7425" + license "MIT" + head "https://github.com/korotovsky/slack-mcp-server.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2439f83defc3ac28c6c9ba104bfd44a4fd6b48dcdedd83e17bc750a5e582ebdc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2439f83defc3ac28c6c9ba104bfd44a4fd6b48dcdedd83e17bc750a5e582ebdc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2439f83defc3ac28c6c9ba104bfd44a4fd6b48dcdedd83e17bc750a5e582ebdc" + sha256 cellar: :any_skip_relocation, sonoma: "c108eb0fa0be8507791a776424b3ed7721fb895ad1c5495594675e20951c7061" + sha256 cellar: :any_skip_relocation, arm64_linux: "80eafafc6331e4a0cbfb3be27957b14f091073e7621acbd40b50b4684ff2ad2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e99e6668d73c9caa0089f0a999e53a7eac869b13c0ee8054ca0e614428746c0a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/slack-mcp-server" + end + + test do + # User OAuth token + ENV["SLACK_MCP_XOXP_TOKEN"] = "xoxp-test-token" + assert_match "Failed to create MCP Slack client", shell_output("#{bin}/slack-mcp-server 2>&1", 1) + end +end diff --git a/Formula/s/slackcat.rb b/Formula/s/slackcat.rb new file mode 100644 index 0000000000000..b470364580eef --- /dev/null +++ b/Formula/s/slackcat.rb @@ -0,0 +1,33 @@ +class Slackcat < Formula + desc "Command-line utility for posting snippets to Slack" + homepage "https://github.com/bcicen/slackcat" + url "https://github.com/bcicen/slackcat/archive/refs/tags/1.7.3.tar.gz" + sha256 "2e3ed7ad5ab3075a8e80a6a0b08a8c52bb8e6e39f6ab03597f456278bfa7768b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eaeb71583cd7fbfa42657beffce55a819085a9a4e371e890404403e2e579b8e6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7b6ecee653c1b0cf06e619a0ce9a3bc753774fbfac2a695a2ad18d77d15eb17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4066c904442557a6e928e96374693212809796558ca8fd35df519620b70cdf8e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3056663a7ab0abf18ce63db1cf7dc853be37fcd8aa88e0935bc2c6eef2094437" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f485580b0cf05cf5d7dc4efd6e6dc9aa29545d119ebc843b06d53c84b87f2f29" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f765a9df06043f889342eb317e72648bc4904bea55d5339b69399b3a8b4ec3ff" + sha256 cellar: :any_skip_relocation, sonoma: "99108f7bcd890e678f082795c4ae5ba4435b945f2fe8341b3160b3ae97133308" + sha256 cellar: :any_skip_relocation, ventura: "6f909ddf90a97c5a2503f056677d2c8c802c6386ebd63cef1b8d4b3385ba6c93" + sha256 cellar: :any_skip_relocation, monterey: "e9441a1cadead32172fd7eb5ea6b4416ab09b7dffe04584394bad221ba0c0533" + sha256 cellar: :any_skip_relocation, big_sur: "176aa3f2c1f088a0dce065034c8a6d381830679db2425c4b4d690823e0b1e022" + sha256 cellar: :any_skip_relocation, catalina: "344233ded56abb6b28a5b4cde44cc58713a63e7a2b49a84b8c47c0ebc9d2d3f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dbd0c522ab28f8a9f4abcd681ab28a43a1a46e4db8e8f03c3a00d9f25ca2f3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96518aa5c2d2ddc1c62a1ee163748bc0909be294eebc290156a6ca1908d6216a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/slackcat -v") + end +end diff --git a/Formula/s/slackdump.rb b/Formula/s/slackdump.rb new file mode 100644 index 0000000000000..cc4e9592ffe33 --- /dev/null +++ b/Formula/s/slackdump.rb @@ -0,0 +1,31 @@ +class Slackdump < Formula + desc "Export Slack data without admin privileges" + homepage "https://github.com/rusq/slackdump" + url "https://github.com/rusq/slackdump/archive/refs/tags/v3.1.8.tar.gz" + sha256 "27f89d4073a6b48e25197e128cafc202229d7a9d0205ff02de9f642a151f5f5e" + license "GPL-3.0-only" + head "https://github.com/rusq/slackdump.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "277731e59a8ba000c231465e49c7f44bd6baa701763e8cfef685c3cb8375c937" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "277731e59a8ba000c231465e49c7f44bd6baa701763e8cfef685c3cb8375c937" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "277731e59a8ba000c231465e49c7f44bd6baa701763e8cfef685c3cb8375c937" + sha256 cellar: :any_skip_relocation, sonoma: "84ab27b41939188e70664625a1c92067d98a85042e0e898f367e774c937d097c" + sha256 cellar: :any_skip_relocation, arm64_linux: "95552d84ec2741b7477fe2322d1230ab3d9a0e037335515f74614c9181350eb7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c7676bbac9a435922e3e7c5e4512b8e3c7ed238da92c47a0fb3293ccc43c5ff" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:), "./cmd/slackdump" + end + + test do + assert_match version.to_s, shell_output("#{bin}/slackdump version") + + output = shell_output("#{bin}/slackdump workspace list 2>&1", 9) + assert_match "(User Error): no authenticated workspaces", output + end +end diff --git a/Formula/s/slacknimate.rb b/Formula/s/slacknimate.rb new file mode 100644 index 0000000000000..eef522fa00da3 --- /dev/null +++ b/Formula/s/slacknimate.rb @@ -0,0 +1,38 @@ +class Slacknimate < Formula + desc "Text animation for Slack messages" + homepage "https://github.com/mroth/slacknimate" + url "https://github.com/mroth/slacknimate/archive/refs/tags/v1.1.0.tar.gz" + sha256 "71c7a65192c8bbb790201787fabbb757de87f8412e0d41fe386c6b4343cb845c" + license "MPL-2.0" + head "https://github.com/mroth/slacknimate.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2d16153371e5e8375e39cdfb1733d6cfaf21490305b53c1792484f91ce5b1f20" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9ac5eee6054981abdbaf4e761840dbc63ec20dfdf7c5e36abbc2f7537fd9804" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1932450215802048e308af408e1255649dadb49e440a4dd1e172d1497d890e70" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e1dcbf1a976b1addb776b43655464f1139969ade15c765d1fbad335529227c1a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "438d35da4f542723602cbaa0cb136069389c6216632d0145295b744eb473cfc8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "35f24a47ca03293bec53b2b622cc1c6f0a012b5c674c0fea83a79795474caefb" + sha256 cellar: :any_skip_relocation, sonoma: "237383328fe4307d81c19f79f5f8522d98997d1807095ffd7ced04a6bd4990cf" + sha256 cellar: :any_skip_relocation, ventura: "15d0a3c26c46a946fd57fc49a92761ab1102df426d6b68bdbf7586d3cb436d90" + sha256 cellar: :any_skip_relocation, monterey: "c52156ca14ce584ef223869a98553a7411098452ad8af38999ac90076d4a8895" + sha256 cellar: :any_skip_relocation, big_sur: "d8120fd0cedd32b5be89ff29f2eed08d060a810820cfc23f6f74e1c7201ff5ad" + sha256 cellar: :any_skip_relocation, catalina: "52bd6b01115cb8e84d3479ff6dea669a98b17b60cc6090b3384ac44fdcbdd93a" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c7190147489c731c8266d014b7919c8ef489cef1d86fa4a2ebf8206bd2ba7d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "198c82b7bdd71a589e1e9e811f10a8f619bf0fe1de0accb3b1c8aaeb5621049b" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/slacknimate" + end + + test do + system bin/"slacknimate", "--version" + system bin/"slacknimate", "--help" + end +end diff --git a/Formula/s/slashem.rb b/Formula/s/slashem.rb new file mode 100644 index 0000000000000..4741d30dc8cad --- /dev/null +++ b/Formula/s/slashem.rb @@ -0,0 +1,104 @@ +require "etc" + +class Slashem < Formula + desc "Fork/variant of Nethack" + homepage "https://slashem.sourceforge.net/" + url "https://downloads.sourceforge.net/project/slashem/slashem-source/0.0.8E0F1/se008e0f1.tar.gz" + version "0.0.8E0F1" + sha256 "e9bd3672c866acc5a0d75e245c190c689956319f192cb5d23ea924dd77e426c3" + license "NGPL" + + livecheck do + url :stable + regex(%r{url=.*?/slashem-source/([^/]+)/[^.]+\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f262c46f0f04c67c9996b01e8d89ea837d34c1086279ad1d480b63a11f74dd8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3489647fb5f38f4016ef73e262df24407525bb01f076463c21f5b8340e47c27" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3cc225b937c53aa8a9121eb03ffcfd067a338a050df4b348cac6e8ea36c1cf19" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fbc49014eb4afffa42419df08cb98337389fb1d87b76c2c900553e0c3739f069" + sha256 cellar: :any_skip_relocation, arm64_monterey: "07334e0d163f5aef7e77cd2047374806fccca1071f0e8e6057e3f740746cc139" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a7fcb3b60e93f0119b791410997a9552c4dd409061eeb06d7b5461a4ab75a52b" + sha256 cellar: :any_skip_relocation, sonoma: "49cf816225af63b9cf625d938878571821849e7b1cd2ce28dd68ccaea9664e03" + sha256 cellar: :any_skip_relocation, ventura: "1094c0410fe6414fe94e7d583d31a483fa2cb5a432876da3d533b5beb853fc83" + sha256 cellar: :any_skip_relocation, monterey: "b7f005ad0ee38c512e4ec7f89c50ff88b86439b66d8c0fae05db62f933290ea8" + sha256 cellar: :any_skip_relocation, big_sur: "580468c6703c09d86a0904bb838e3bf8f98a1a21d7a694147b8bb61ea3428f88" + sha256 cellar: :any_skip_relocation, catalina: "96fc5b1abd0e8deff9573c43656e7f3caa25b51d28eb8f426cec7c28131ab4b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e539a21570dc7e8141bdf68fcaf8dbce515fc6839e55e24a62a82b0362a8caa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03e6ce8d29f4ebd5eba336525f8d314b1f26c032d935389c704698f5881396f0" + end + + depends_on "pkgconf" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + skip_clean "slashemdir/save" + + # Fixes compilation error in OS X: https://sourceforge.net/p/slashem/bugs/896/ + patch :DATA + + # https://sourceforge.net/p/slashem/bugs/964/ for C99 compatibility + patch do + url "https://sourceforge.net/p/slashem/bugs/964/attachment/slashem-c99.patch" + sha256 "ef21a6e3c64a5cf5cfe83305df7611aa024384ae52ef6be4242b86d3d38da200" + end + + # Fixes user check on older versions of OS X: https://sourceforge.net/p/slashem/bugs/895/ + # Fixed upstream: https://slashem.cvs.sourceforge.net/viewvc/slashem/slashem/configure?r1=1.13&r2=1.14&view=patch + patch :p0 do + url "https://gist.githubusercontent.com/mistydemeo/76dd291c77a509216418/raw/65a41804b7d7e1ae6ab6030bde88f7d969c955c3/slashem-configure.patch" + sha256 "c91ac045f942d2ee1ac6af381f91327e03ee0650a547bbe913a3bf35fbd18665" + end + + def install + ENV.deparallelize + # Fix issue where ioctl is not declared and fails on Sonoma + inreplace "sys/share/ioctl.c", "#include \"hack.h\"", "#include \"hack.h\"\n#include " + + args = %W[ + --with-mandir=#{man} + --with-group=#{Etc.getpwuid.gid} + --with-owner=#{Etc.getpwuid.name} + --enable-wizmode=#{Etc.getpwuid.name} + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + + man6.install "doc/slashem.6", "doc/recover.6" + end + + test do + cp_r "#{prefix}/slashemdir", testpath/"slashemdir" + + require "expect" + require "pty" + ENV["TERM"] = "xterm" + PTY.spawn(prefix/"slashemdir/slashem", "-d", testpath/"slashemdir") do |r, w, pid| + r.expect "Shall" + w.write "q" + Process.wait pid + end + end +end + +__END__ +diff --git a/win/tty/termcap.c b/win/tty/termcap.c +index c3bdf26..8d00b11 100644 +--- a/win/tty/termcap.c ++++ b/win/tty/termcap.c +@@ -960,7 +960,7 @@ cl_eos() /* free after Robert Viduya */ + + #include + +-#if !defined(LINUX) && !defined(__FreeBSD__) ++#if !defined(LINUX) && !defined(__FreeBSD__) && !defined(__APPLE__) + extern char *tparm(); + #endif diff --git a/Formula/s/sleef.rb b/Formula/s/sleef.rb new file mode 100644 index 0000000000000..d37bf00d01d88 --- /dev/null +++ b/Formula/s/sleef.rb @@ -0,0 +1,47 @@ +class Sleef < Formula + desc "SIMD library for evaluating elementary functions" + homepage "https://sleef.org" + url "https://github.com/shibatch/sleef/archive/refs/tags/3.9.0.tar.gz" + sha256 "af60856abac08a3b5e72a8d156dd71fec1f7ac23de8ee67793f45f9edcdf0908" + license "BSL-1.0" + head "https://github.com/shibatch/sleef.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6fe0e3a672461f15dd47162c7ba32505c6b81c41886524687a59c7690c16f0ea" + sha256 cellar: :any, arm64_sequoia: "10bd5e568d4abc431b8a8b604c5c3745106ba980dc71e1d22b607587e336bbf9" + sha256 cellar: :any, arm64_sonoma: "ae22110074bfadf5d5d11ccebb7b211ddfed87724d79fe232c1ba551702747e8" + sha256 cellar: :any, arm64_ventura: "1dde65a699a3ec906047a473eab08828adac8f3592f91d87be5d6acab66f626c" + sha256 cellar: :any, sonoma: "a26d81be375d9034c487372812dcd426c2573843173b610142214415cd635be7" + sha256 cellar: :any, ventura: "aa5605545499143c1c1724ecb336205418686bcbed39080bca464794c8a0d924" + sha256 cellar: :any_skip_relocation, arm64_linux: "ffe74cf398e3979d201cba4686213e9719d71b2a0c24d9bdb1046d130b87e3be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c160ff9688e9d6f8c98f84d380c667e351f9ea9d0726d121f7b423e9a70ccf02" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DSLEEF_BUILD_INLINE_HEADERS=TRUE", + "-DSLEEF_BUILD_SHARED_LIBS=ON", + "-DSLEEF_BUILD_TESTS=OFF", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + double a = M_PI / 6; + printf("%.3f\\n", Sleef_sin_u10(a)); + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lsleef" + assert_equal "0.500\n", shell_output("./test") + end +end diff --git a/Formula/s/sleek.rb b/Formula/s/sleek.rb new file mode 100644 index 0000000000000..38e9e9103dc78 --- /dev/null +++ b/Formula/s/sleek.rb @@ -0,0 +1,33 @@ +class Sleek < Formula + desc "CLI tool for formatting SQL" + homepage "https://github.com/nrempel/sleek" + url "https://github.com/nrempel/sleek/archive/refs/tags/v0.5.0.tar.gz" + sha256 "fcb589fdc5ece8c050883ff0b56aec6bd25e2e4d6e77a1d52e870535d66fdf67" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "92c4d088b2e718baf4797d96f1c47730de545422b7549728198bf7a18eb04ce9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7da065a9d2a8bc8f87ea6d2eb19cee0c60a358349761d9ea559ffb4c566f984" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "777c706a4f2d429718d04629533688315ff6156d1689984d1e10702eb36bdaae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "92fd6bdce1efc958d4df0bfb47b7d3b31fabb6cfe175bbb5b11f7e20e62d368a" + sha256 cellar: :any_skip_relocation, sonoma: "e4e2ac88f2fdb8c1418d82f19ba13ad142f7c111fa5e9e143212167a9c80b99f" + sha256 cellar: :any_skip_relocation, ventura: "38411eb332d28f569c81c6907a0df972efbd0e9abea5d1a86bb6c1bb3ab76834" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0787c89db269a455792647f92c31b3dd0a8222ae400ce37ac22a8c11c694742" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a9e38b97cbd5cdcd3b1f8a2d77472dc4911e65ed205932606d1f56b752c21c8" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/sleek --version") + + (testpath/"test.sql").write <<~SQL + SELECT * from foo WHERE bar = 'quux'; + SQL + system bin/"sleek", testpath/"test.sql" + end +end diff --git a/Formula/s/sleepwatcher.rb b/Formula/s/sleepwatcher.rb new file mode 100644 index 0000000000000..881fdcf6c6ca0 --- /dev/null +++ b/Formula/s/sleepwatcher.rb @@ -0,0 +1,67 @@ +class Sleepwatcher < Formula + desc "Monitors sleep, wakeup, and idleness of a Mac" + homepage "https://www.bernhard-baehr.de/" + url "https://www.bernhard-baehr.de/sleepwatcher_2.2.1.tgz" + sha256 "4bf1656702167871141fbc119a844d1363d89994e1a67027f0e773023ae9643e" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?sleepwatcher[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "77ad0daae582536562d912657a5a3deeffa9f16ad0f3dc9b7b69e5d345f1f26d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8ae2f2e3e784b696e707f95007573cfd1e7d64dbaca674c3b13caa05571f99a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44e9a135ca035bf756a113115f71737d5a90162c9beda447624ced1efc77f62e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "009536d9992206c912bd778ca8a596cd56915d900ea30f5db94c5ff48cec6c92" + sha256 cellar: :any_skip_relocation, arm64_monterey: "84f1c692fe19acb2929dd41746c3a184efb36146039b3b9c4554a4ca7a3e0d55" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "01c66d5808a4c8defb52bb8c9acf2584dbe542940bf758a53cae0c4d68229c3e" + sha256 cellar: :any_skip_relocation, sonoma: "9d9a7af43f8aae5c7f0082b80939c4c362ccad1cbd4427fb27a1f77d1df23f31" + sha256 cellar: :any_skip_relocation, ventura: "b85e0d84e33f248cfd9315efbfe6789886b4e65eafb82eed4f727aea18c49a84" + sha256 cellar: :any_skip_relocation, monterey: "5a6a9cf80d062199423619e15c9c32be29b1822cb49669ea89f107b6a58cd973" + sha256 cellar: :any_skip_relocation, big_sur: "ad8d8729a86763e64a3f555c4197ad6048ee5b8c6589ce4f2763d60b9826bb13" + sha256 cellar: :any_skip_relocation, catalina: "6752791ceaab316af2e61c45a6ee5e1a7c05f326be64f31e4bfad412a216b413" + end + + depends_on :macos + + def install + # Adjust Makefile to build native binary only + inreplace "sources/Makefile" do |s| + s.gsub!(/^(CFLAGS)_PPC.*$/, "\\1 = #{ENV.cflags} -prebind") + s.gsub!(/^(CFLAGS_I386|CFLAGS_X86_64)/, "#\\1") + s.change_make_var! "BINDIR", "$(PREFIX)/sbin" + s.change_make_var! "MANDIR", "$(PREFIX)/share/man" + s.gsub!(/^(.*?)CFLAGS_I386(.*?)[.]i386/, "\\1CFLAGS\\2") + s.gsub!(/^(.*?CFLAGS_X86_64.*?[.]x86_64)/, "#\\1") + s.gsub!(/^(\t(lipo|rm).*?[.](i386|x86_64))/, "#\\1") + s.gsub! "-o root -g wheel", "" + end + + # Build and install binary + cd "sources" do + mv "../sleepwatcher.8", "." + system "make", "install", "PREFIX=#{prefix}" + end + end + + service do + run [opt_sbin/"sleepwatcher", "-V", "-s", "#{Dir.home}/.sleep", "-w", "#{Dir.home}/.wakeup"] + run_type :immediate + keep_alive true + end + + def caveats + <<~EOS + For SleepWatcher to work, you will need to write sleep and + wakeup scripts, located here when using brew services: + + ~/.sleep + ~/.wakeup + EOS + end +end diff --git a/Formula/s/slepc-complex.rb b/Formula/s/slepc-complex.rb new file mode 100644 index 0000000000000..daf2d2a2a80b0 --- /dev/null +++ b/Formula/s/slepc-complex.rb @@ -0,0 +1,59 @@ +class SlepcComplex < Formula + desc "Scalable Library for Eigenvalue Problem Computations (complex)" + homepage "https://slepc.upv.es" + url "https://slepc.upv.es/download/distrib/slepc-3.24.0.tar.gz" + sha256 "6e2d14c98aa9138ac698a2a04a7c6a9f9569988f570b2cfbe4935d32364cb4e9" + license "BSD-2-Clause" + revision 1 + + livecheck do + formula "slepc" + end + + bottle do + sha256 arm64_tahoe: "a72cb49002a91474913dd18219c9deda39f5ce136a07507f9605d21f0aeed000" + sha256 arm64_sequoia: "fe4d40ceaa36e35b0e467e75092028f9462f0e4aa8ec70463f80c6c75365f36d" + sha256 arm64_sonoma: "954bd154dd2d29e620e048eb5b6e755e2249d80d878de008d0d679c8ff1781ad" + sha256 sonoma: "e3fe442a0d73fe8b153d68c26ace44304835fc8b33aac0f6c85b1d1199506a33" + sha256 arm64_linux: "cd10203cc0b50030327827b102d4609e6d499d98003405d5213fdc44da4ef3e7" + sha256 x86_64_linux: "5bebcdbff4f3fcd26e5c049fa0906a907a41715efa3676c65004fea734f98d9e" + end + + depends_on "open-mpi" + depends_on "openblas" + depends_on "petsc-complex" + depends_on "scalapack" + + uses_from_macos "python" => :build + + on_macos do + depends_on "fftw" + depends_on "gcc" + depends_on "hdf5-mpi" + depends_on "metis" + end + + conflicts_with "slepc", because: "slepc must be installed with either real or complex support, not both" + + def install + ENV["PETSC_DIR"] = Formula["petsc-complex"].prefix.realpath + ENV["SLEPC_DIR"] = buildpath + + # This is not an autoconf script so cannot use `std_configure_args` + system "./configure", "--prefix=#{prefix}" + system "make", "all" + system "make", "install", "PYTHON=#{which("python3")}" + end + + test do + pform = "petsc-complex" + flags = %W[-I#{include} -L#{lib} -lslepc -I#{Formula[pform].include} -L#{Formula[pform].lib} -lpetsc] + flags << "-Wl,-rpath,#{lib},-rpath,#{Formula[pform].lib}" if OS.linux? + system "mpicc", pkgshare/"../slepc/examples/src/eps/tutorials/ex2.c", "-o", "test", *flags + output = shell_output("./test -terse") + # This SLEPc example prints several lines of output. The 7th line contains + # a specific message if everything went well + line = output.lines.at(-3) + assert_match "All requested eigenvalues computed up to the required tolerance:", line + end +end diff --git a/Formula/s/slepc.rb b/Formula/s/slepc.rb new file mode 100644 index 0000000000000..b7f7a9a9c6002 --- /dev/null +++ b/Formula/s/slepc.rb @@ -0,0 +1,60 @@ +class Slepc < Formula + desc "Scalable Library for Eigenvalue Problem Computations (real)" + homepage "https://slepc.upv.es" + url "https://slepc.upv.es/download/distrib/slepc-3.24.0.tar.gz" + sha256 "6e2d14c98aa9138ac698a2a04a7c6a9f9569988f570b2cfbe4935d32364cb4e9" + license "BSD-2-Clause" + revision 1 + + livecheck do + url "https://slepc.upv.es/download/distrib/" + regex(/href=.*?slepc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "45a00f99761ad2213e76bdb00f5bf406c29c06ea25ff1b164632b755e4ccf6da" + sha256 arm64_sequoia: "3f589a3256bf3ea36bd477d171d9cb70f588567519adcbf505a454ee4a13ab90" + sha256 arm64_sonoma: "ef18bb14a4e329cf87f65ffccd815c0ac04b1b449e5566050d6b8b0ab38dec13" + sha256 sonoma: "6c77df4e29f993c281ce5017a9aac46132b05af52a63ab5dbf2c2a9d30e49378" + sha256 arm64_linux: "a393e0706312135ee3c3144f6f063fafc341c151066dc3a985f69e5afe9324ee" + sha256 x86_64_linux: "4f62bad47ad40e31bba1801bf525b2f04746905e1bb72a084270e79cd3cb82e3" + end + + depends_on "open-mpi" + depends_on "openblas" + depends_on "petsc" + depends_on "scalapack" + + uses_from_macos "python" => :build + + on_macos do + depends_on "fftw" + depends_on "gcc" + depends_on "hdf5-mpi" + depends_on "metis" + end + + conflicts_with "slepc-complex", because: "slepc must be installed with either real or complex support, not both" + + def install + ENV["PETSC_DIR"] = Formula["petsc"].prefix.realpath + ENV["SLEPC_DIR"] = buildpath + + # This is not an autoconf script so cannot use `std_configure_args` + system "./configure", "--prefix=#{prefix}" + system "make", "all" + system "make", "install", "PYTHON=#{which("python3")}" + end + + test do + pform = "petsc" + flags = %W[-I#{include} -L#{lib} -lslepc -I#{Formula[pform].include} -L#{Formula[pform].lib} -lpetsc] + flags << "-Wl,-rpath,#{lib},-rpath,#{Formula[pform].lib}" if OS.linux? + system "mpicc", pkgshare/"examples/src/eps/tutorials/ex2.c", "-o", "test", *flags + output = shell_output("./test -terse") + # This SLEPc example prints several lines of output. The 7th line contains + # a specific message if everything went well + line = output.lines.at(-3) + assert_match "All requested eigenvalues computed up to the required tolerance:", line + end +end diff --git a/Formula/s/sleuthkit.rb b/Formula/s/sleuthkit.rb new file mode 100644 index 0000000000000..09fcf4c08c05f --- /dev/null +++ b/Formula/s/sleuthkit.rb @@ -0,0 +1,52 @@ +class Sleuthkit < Formula + desc "Forensic toolkit" + homepage "https://www.sleuthkit.org/" + url "https://github.com/sleuthkit/sleuthkit/releases/download/sleuthkit-4.14.0/sleuthkit-4.14.0.tar.gz" + sha256 "fb6ea1801bcfc4c7d3a283d7592c6bd65add655411749513b5c429b86541e9a9" + license all_of: ["IPL-1.0", "CPL-1.0", "GPL-2.0-or-later"] + + livecheck do + url :stable + regex(/sleuthkit[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "2f05503ba819fabf434097defa4e8968471199abd9fc9ce1ade416c8f548c0ba" + sha256 cellar: :any, arm64_sequoia: "4618433aefde7d203834d43f15b6a100f233c3e4173ef2fd1fe708d0fed22988" + sha256 cellar: :any, arm64_sonoma: "73615ba817ae871688f19a26e23d1751019862f4df4543af2f7d5b9006907c1b" + sha256 cellar: :any, arm64_ventura: "ccb252574fbfa02e92dd5c708392d05ee5c4603e40162e03ea2129acb1ef4a86" + sha256 cellar: :any, sonoma: "bca1bf151256fcddcd5a8c0597e42bd2df0bca96f6a440c6dbe1f70de9326a52" + sha256 cellar: :any, ventura: "3e478aa0baea538d7343c5786f6b15358a114e3ca81a3d36d3ed44e7d63525d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e73d02460dc9c1eafee2ad805c562db85fcd4519c04d1c5845d50eb36a9ac288" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c24edf33851639af78901322c231f25100791200e4f8ad644078bc54cb3f425a" + end + + depends_on "ant" => :build + + depends_on "afflib" + depends_on "libewf" + depends_on "libpq" + depends_on "openjdk" + depends_on "openssl@3" + depends_on "sqlite" + + uses_from_macos "zlib" + + conflicts_with "ffind", because: "both install a `ffind` executable" + + def install + ENV["JAVA_HOME"] = java_home = Language::Java.java_home + # https://github.com/sleuthkit/sleuthkit/blob/develop/docs/README_Java.md#macos + ENV["JNI_CPPFLAGS"] = "-I#{java_home}/include -I#{java_home}/include/darwin" if OS.mac? + # https://github.com/sleuthkit/sleuthkit/issues/3216 + ENV.deparallelize + + system "./configure", "--disable-silent-rules", "--enable-java", *std_configure_args + system "make", "install" + end + + test do + system bin/"tsk_loaddb", "-V" + end +end diff --git a/Formula/s/slides.rb b/Formula/s/slides.rb new file mode 100644 index 0000000000000..82b8a8e12b5fc --- /dev/null +++ b/Formula/s/slides.rb @@ -0,0 +1,53 @@ +class Slides < Formula + desc "Terminal based presentation tool" + homepage "https://maaslalani.com/slides/" + url "https://github.com/maaslalani/slides/archive/refs/tags/v0.9.0.tar.gz" + sha256 "fcce0dbbe767e0b1f0800e4ea934ee9babbfb18ab2ec4b343e3cd6359cd48330" + license "MIT" + head "https://github.com/maaslalani/slides.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3abb6c16fba8fcf299fba222be2ec0cb00cd3eec6f76feb45e13b13e6d79d68f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "755ccfe47079714863054effd6f18d4da28b579895c56d69ba4abd506c2c65d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d474822334c4c065d42e7c81de42e4924afca758106f358cdd755e454c13be84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "335ffbac50cfea46abb4afa92116f16c1d351d77deb103a19e6434b11d2a540d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a17e1f07ab13a27bca222b103799a247e15d2bb6f3b239d5f973029886e4e1d8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e0faa8a0d8f1d87a0a16a294b35e5d98528be06dd4069aca905d5fdc7464ab73" + sha256 cellar: :any_skip_relocation, sonoma: "e098599b758587a78384c17188389d9cd963e61de285d9010001777ab7d12342" + sha256 cellar: :any_skip_relocation, ventura: "59795376dc3819201011a4f97014d5510b29f5b2056760f21cb78b92e2e1ec4e" + sha256 cellar: :any_skip_relocation, monterey: "3ffaaae9819ccd022e0e2a7091b09389ec26bdd1eac7e3ff9c97b494a887b9d6" + sha256 cellar: :any_skip_relocation, big_sur: "47e7d151b73e9132506410808df33d3ee8516d4739d53fda0d8cd759d7ede76f" + sha256 cellar: :any_skip_relocation, catalina: "142e0dba029f7c87501f7a0460cc9e909819ed60f81e3da4255000a553275346" + sha256 cellar: :any_skip_relocation, arm64_linux: "160d6346dd5d2bdfb54046afe29bd912fb1a481f11f063ddbf6a01380af15b48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bcfad497512ded3dbe7ed81e2683a3c67f211c0a811c7265d171e79212eebfe" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + (testpath/"test.md").write <<~MARKDOWN + # Slide 1 + Content + + --- + + # Slide 2 + More Content + MARKDOWN + + # Bubbletea-based apps are hard to test even under PTY.spawn (or via + # expect) because they rely on vt100-like answerback support, such as + # "[6n" to report the cursor position. For now we just run the command + # for a second and see that it tried to send some ANSI out of it. + require "pty" + PTY.spawn(bin/"slides", "test.md") do |r, _, pid| + sleep 1 + Process.kill("TERM", pid) + assert_match(/\e\[/, r.read_nonblock(1024)) + end + end +end diff --git a/Formula/s/slimerjs.rb b/Formula/s/slimerjs.rb new file mode 100644 index 0000000000000..376d7c4d3e739 --- /dev/null +++ b/Formula/s/slimerjs.rb @@ -0,0 +1,49 @@ +class Slimerjs < Formula + desc "Scriptable browser for Web developers" + homepage "https://slimerjs.org/" + url "https://github.com/laurentj/slimerjs/archive/refs/tags/1.0.0.tar.gz" + sha256 "6fd07fa6953e4e497516dd0a7bc5eb2f21c68f9e60bdab080ac2c86e8ab8dfb2" + license "MPL-2.0" + head "https://github.com/laurentj/slimerjs.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9e5d50e6a167227e13f88b3d46bc768854aa70b897597d3ab5f9389bff389cd8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28448d431b342918fa343fd2fc2d89663927395d35e0f5c20d16f8038c2f298e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67d28bb3031d3480c7d871cc10299334f80046ddb665db2445faedd82c43f26a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67d28bb3031d3480c7d871cc10299334f80046ddb665db2445faedd82c43f26a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "67d28bb3031d3480c7d871cc10299334f80046ddb665db2445faedd82c43f26a" + sha256 cellar: :any_skip_relocation, sonoma: "67d28bb3031d3480c7d871cc10299334f80046ddb665db2445faedd82c43f26a" + sha256 cellar: :any_skip_relocation, ventura: "67d28bb3031d3480c7d871cc10299334f80046ddb665db2445faedd82c43f26a" + sha256 cellar: :any_skip_relocation, monterey: "67d28bb3031d3480c7d871cc10299334f80046ddb665db2445faedd82c43f26a" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc310525c420056205fcf75a9398dbc1a67016af07bb8a032767da518d6e185f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d942f6e440cc015898a1d2c114714fe133ec4aff583043f2e35c9c404a9e621c" + end + + uses_from_macos "zip" => :build + + def install + ENV["TZ"] = "UTC" + + cd "src" do + system "zip", "-o", "-X", "-r", "omni.ja", "chrome/", "components/", + "modules/", "defaults/", "chrome.manifest", "-x@package_exclude.lst" + libexec.install %w[application.ini omni.ja slimerjs slimerjs.py] + end + bin.install_symlink libexec/"slimerjs" + end + + def caveats + <<~EOS + The configuration file was installed in: + #{libexec}/application.ini + EOS + end + + test do + ENV["SLIMERJSLAUNCHER"] = "/nonexistent" + assert_match "Set it with the path to Firefox", shell_output("#{bin}/slimerjs test.js", 1) + end +end diff --git a/Formula/s/slirp4netns.rb b/Formula/s/slirp4netns.rb new file mode 100644 index 0000000000000..7068cae788ff4 --- /dev/null +++ b/Formula/s/slirp4netns.rb @@ -0,0 +1,55 @@ +class Slirp4netns < Formula + desc "User-mode networking for unprivileged network namespaces" + homepage "https://github.com/rootless-containers/slirp4netns" + url "https://github.com/rootless-containers/slirp4netns/archive/refs/tags/v1.3.3.tar.gz" + sha256 "8d24539967850bada944d56459eb9e9167357d57b39e864d95ed7d6c0dd0298d" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "dd912bc0ce8018c676baf2ea656ede9e286b4a8022674681f577aaf31ccaf0c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1499a0137461b131c1f64210a5a2d732b260917d9a1c713342eb52d12bbbf18" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + depends_on "bash" => :test + depends_on "jq" => :test + + depends_on "glib" + depends_on "libcap" + depends_on "libseccomp" + depends_on "libslirp" + depends_on :linux + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + resource "homebrew-test-common" do + url "https://raw.githubusercontent.com/rootless-containers/slirp4netns/v1.2.1/tests/common.sh" + sha256 "756149863c2397c09fabbc0a3234858ad4a5b2fd1480fb4646c8fa9d294c001a" + end + + resource "homebrew-test-api-socket" do + url "https://raw.githubusercontent.com/rootless-containers/slirp4netns/v1.2.1/tests/test-slirp4netns-api-socket.sh" + sha256 "075f43c98d9a848ab5966d515174b3c996deec8c290873d92e200dc6ceae1500" + end + + resource("homebrew-test-common").stage (testpath/"test") + resource("homebrew-test-api-socket").stage (testpath/"test") + + # Reduce output to avoid interleaving of commands and stdout + inreplace "test/test-slirp4netns-api-socket.sh", /^set -xe/, "set -e" + + # The test secript requires network namespace to run, which is not available on Homebrew CI. + # So here we check the error messages. + output = shell_output("bash ./test/test-slirp4netns-api-socket.sh 2>&1", 1) + assert_match "unshare: unshare failed: Operation not permitted", output + end +end diff --git a/Formula/s/slither-analyzer.rb b/Formula/s/slither-analyzer.rb new file mode 100644 index 0000000000000..b6c99e87b5f0b --- /dev/null +++ b/Formula/s/slither-analyzer.rb @@ -0,0 +1,255 @@ +class SlitherAnalyzer < Formula + include Language::Python::Virtualenv + + desc "Solidity static analysis framework written in Python 3" + homepage "https://github.com/crytic/slither" + url "https://files.pythonhosted.org/packages/f9/d7/327729240d0ab0291cf3e9b36f05e135676ffea796e4a74ec6b7ef7ad2dd/slither_analyzer-0.11.3.tar.gz" + sha256 "09953ddb89d9ab182aa5826bda6fa3da482c82b5ffa371e34b35ba766044616e" + license "AGPL-3.0-only" + revision 3 + head "https://github.com/crytic/slither.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a604b0d55991c0a1c68d4077e7fa07b75abdf1b2d1adf37d88a8bdc6d79eed7d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93ea3ed0768bcbac5d7f6b011c95f2bc80a406a6c7305bdd797762033e8ffe51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d86244f2ea64820da270ee5037de93d44704967af90259f3e53433f0480268c0" + sha256 cellar: :any_skip_relocation, sonoma: "c308c481788cdc828a5fcff6c6fa766b6941367607f7474a8d342926bb8da5a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "399528d89fe21138e19d4f88e937253bb21ef3d88f5daf23480d72f5470c5125" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb55a19322f47407859278cd7cfc89ca4d69bccab29e196c25b631381323dbaa" + end + + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" + sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "bitarray" do + url "https://files.pythonhosted.org/packages/e8/c1/644ea86b6f1a0864f656a3b3ee5bf8c29daa895cb3233942315fe065ea3a/bitarray-3.7.2.tar.gz" + sha256 "27a59bb7c64c0d094057a3536e15fdd693f8520771ee75d9344b82d0a5ade2d0" + end + + resource "cbor2" do + url "https://files.pythonhosted.org/packages/a2/b8/c0f6a7d46f816cb18b1fda61a2fe648abe16039f1ff93ea720a6e9fb3cee/cbor2-5.7.1.tar.gz" + sha256 "7a405a1d7c8230ee9acf240aad48ae947ef584e8af05f169f3c1bde8f01f8b71" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "ckzg" do + url "https://files.pythonhosted.org/packages/b1/e8/b262fff67d6bcaecd19c71d19ebea9184a1204e00368664e1544a2511bd8/ckzg-2.1.5.tar.gz" + sha256 "e48e092f9b89ebb6aaa195de2e2bb72ad2d4b35c87d3a15e4545f13c51fbbe30" + end + + resource "crytic-compile" do + url "https://files.pythonhosted.org/packages/78/9b/6834afa2cc6fb3d958027e4c9c24c09735f9c6caeef4e205c22838f772bf/crytic_compile-0.3.10.tar.gz" + sha256 "0d7e03b4109709dd175a4550345369548f99fc1c96183c34ccc4dd21a7c41601" + end + + resource "cytoolz" do + url "https://files.pythonhosted.org/packages/bd/d4/16916f3dc20a3f5455b63c35dcb260b3716f59ce27a93586804e70e431d5/cytoolz-1.1.0.tar.gz" + sha256 "13a7bf254c3c0d28b12e2290b82aed0f0977a4c2a2bf84854fcdc7796a29f3b0" + end + + resource "eth-abi" do + url "https://files.pythonhosted.org/packages/00/71/d9e1380bd77fd22f98b534699af564f189b56d539cc2b9dab908d4e4c242/eth_abi-5.2.0.tar.gz" + sha256 "178703fa98c07d8eecd5ae569e7e8d159e493ebb6eeb534a8fe973fbc4e40ef0" + end + + resource "eth-account" do + url "https://files.pythonhosted.org/packages/74/cf/20f76a29be97339c969fd765f1237154286a565a1d61be98e76bb7af946a/eth_account-0.13.7.tar.gz" + sha256 "5853ecbcbb22e65411176f121f5f24b8afeeaf13492359d254b16d8b18c77a46" + end + + resource "eth-hash" do + url "https://files.pythonhosted.org/packages/ee/38/577b7bc9380ef9dff0f1dffefe0c9a1ded2385e7a06c306fd95afb6f9451/eth_hash-0.7.1.tar.gz" + sha256 "d2411a403a0b0a62e8247b4117932d900ffb4c8c64b15f92620547ca5ce46be5" + end + + resource "eth-keyfile" do + url "https://files.pythonhosted.org/packages/35/66/dd823b1537befefbbff602e2ada88f1477c5b40ec3731e3d9bc676c5f716/eth_keyfile-0.8.1.tar.gz" + sha256 "9708bc31f386b52cca0969238ff35b1ac72bd7a7186f2a84b86110d3c973bec1" + end + + resource "eth-keys" do + url "https://files.pythonhosted.org/packages/58/11/1ed831c50bd74f57829aa06e58bd82a809c37e070ee501c953b9ac1f1552/eth_keys-0.7.0.tar.gz" + sha256 "79d24fd876201df67741de3e3fefb3f4dbcbb6ace66e47e6fe662851a4547814" + end + + resource "eth-rlp" do + url "https://files.pythonhosted.org/packages/7f/ea/ad39d001fa9fed07fad66edb00af701e29b48be0ed44a3bcf58cb3adf130/eth_rlp-2.2.0.tar.gz" + sha256 "5e4b2eb1b8213e303d6a232dfe35ab8c29e2d3051b86e8d359def80cd21db83d" + end + + resource "eth-typing" do + url "https://files.pythonhosted.org/packages/60/54/62aa24b9cc708f06316167ee71c362779c8ed21fc8234a5cd94a8f53b623/eth_typing-5.2.1.tar.gz" + sha256 "7557300dbf02a93c70fa44af352b5c4a58f94e997a0fd6797fb7d1c29d9538ee" + end + + resource "eth-utils" do + url "https://files.pythonhosted.org/packages/e6/e1/ee3a8728227c3558853e63ff35bd4c449abdf5022a19601369400deacd39/eth_utils-5.3.1.tar.gz" + sha256 "c94e2d2abd024a9a42023b4ddc1c645814ff3d6a737b33d5cfd890ebf159c2d1" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "hexbytes" do + url "https://files.pythonhosted.org/packages/7f/87/adf4635b4b8c050283d74e6db9a81496063229c9263e6acc1903ab79fbec/hexbytes-1.3.1.tar.gz" + sha256 "a657eebebdfe27254336f98d8af6e2236f3f83aed164b87466b6cf6c5f5a4765" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "parsimonious" do + url "https://files.pythonhosted.org/packages/7b/91/abdc50c4ef06fdf8d047f60ee777ca9b2a7885e1a9cea81343fbecda52d7/parsimonious-0.10.0.tar.gz" + sha256 "8281600da180ec8ae35427a4ab4f7b82bfec1e3d1e52f80cb60ea82b9512501c" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyunormalize" do + url "https://files.pythonhosted.org/packages/25/ab/b912c484cfb96ba4834efe050bbf10c9e157bd8189eb859aefba8712b136/pyunormalize-17.0.0.tar.gz" + sha256 "0949a3e56817e287febcaf1b0cc4b5adf0bb107628d379335938040947eec792" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f8/c8/1d2160d36b11fbe0a61acb7c3c81ab032d9ec8ad888ac9e0a61b85ab99dd/regex-2025.10.23.tar.gz" + sha256 "8cbaf8ceb88f96ae2356d01b9adf5e6306fa42fa6f7eab6b97794e37c959ac26" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rlp" do + url "https://files.pythonhosted.org/packages/1b/2d/439b0728a92964a04d9c88ea1ca9ebb128893fbbd5834faa31f987f2fd4c/rlp-4.1.0.tar.gz" + sha256 "be07564270a96f3e225e2c107db263de96b5bc1f27722d2855bd3459a08e95a9" + end + + resource "solc-select" do + url "https://files.pythonhosted.org/packages/e0/55/55b19b5f6625e7f1a8398e9f19e61843e4c651164cac10673edd412c0678/solc_select-1.1.0.tar.gz" + sha256 "94fb6f976ab50ffccc5757d5beaf76417b27cbe15436cfe2b30cdb838f5c7516" + end + + resource "toolz" do + url "https://files.pythonhosted.org/packages/11/d6/114b492226588d6ff54579d95847662fc69196bdeec318eb45393b24c192/toolz-1.1.0.tar.gz" + sha256 "27a5c770d068c110d9ed9323f24f1543e83b2f300a687b7891c1a6d56b697b5b" + end + + resource "types-requests" do + url "https://files.pythonhosted.org/packages/36/27/489922f4505975b11de2b5ad07b4fe1dca0bca9be81a703f26c5f3acfce5/types_requests-2.32.4.20250913.tar.gz" + sha256 "abd6d4f9ce3a9383f269775a9835a4c24e5cd6b9f647d64f88aa4613c33def5d" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "web3" do + url "https://files.pythonhosted.org/packages/4c/85/1515644dc1b0170e43e8c26531a3cec8ebc916185fbe2db0020e450b7114/web3-7.14.0.tar.gz" + sha256 "d82c78007c280e478b3920cd56658df17f2f76af584ee3318df6b60d4944b8a2" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + virtualenv_install_with_resources + end + + test do + resource "testdata" do + url "https://github.com/crytic/slither/raw/d0a4f5595d7177b3b7d4bd35e1384bf35ebc22d4/tests/ast-parsing/compile/variable-0.8.0.sol-0.8.15-compact.zip", using: :nounzip + sha256 "2f165f629882d0250d03a56cb67a84e9741375349195915a04385b0666394478" + end + + resource("testdata").stage do + # slither exits with code 255 if high severity findings are found + assert_match("5 result(s) found", + shell_output("#{bin}/slither --detect uninitialized-state --fail-high " \ + "variable-0.8.0.sol-0.8.15-compact.zip 2>&1", 255)) + end + end +end diff --git a/Formula/s/sloc.rb b/Formula/s/sloc.rb new file mode 100644 index 0000000000000..ef3101b4ae964 --- /dev/null +++ b/Formula/s/sloc.rb @@ -0,0 +1,35 @@ +class Sloc < Formula + desc "Simple tool to count source lines of code" + homepage "https://github.com/flosse/sloc" + url "https://registry.npmjs.org/sloc/-/sloc-0.3.2.tgz" + sha256 "25ac2a41e015a8ee0d0a890221d064ad0288be8ef742c4ec903c84a07e62b347" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "24e858bb8b1a883aa3bff9443299ab2be4b978dbede386c35047ede3958584c5" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + return 0; + } + C + + std_output = <<~EOS + Path,Physical,Source,Comment,Single-line comment,Block comment,Mixed,Empty block comment,Empty,To Do + Total,4,4,0,0,0,0,0,0,0 + EOS + + assert_match std_output, shell_output("#{bin}/sloc --format=csv .") + end +end diff --git a/Formula/s/sloccount.rb b/Formula/s/sloccount.rb new file mode 100644 index 0000000000000..5f028e4b427a9 --- /dev/null +++ b/Formula/s/sloccount.rb @@ -0,0 +1,63 @@ +class Sloccount < Formula + desc "Count lines of code in many languages" + homepage "https://dwheeler.com/sloccount/" + url "https://dwheeler.com/sloccount/sloccount-2.26.tar.gz" + sha256 "fa7fa2bbf2f627dd2d0fdb958bd8ec4527231254c120a8b4322405d8a4e3d12b" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?sloccount[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b637cc4c664a6f49d295336432a25513999484bb63893a9cc027c34cc7905935" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3243d86a2a6a558e56911fe743461644ff484b699d962c7afcb17ffed89b7706" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "771db84b98f13ab52ae1a7e8aecef3d193b317b916923562d6a44e36a460dffc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0a3aa39555a21889bb78e1826ba3842915234a4728497877ecf83a7520bd7c1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "766075d5d849b025e286d211468d3f8bb3c92e2d1b53ad268db579dcf0049c90" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "73dc2aea90c8e3e1b98e8577e1e4a65758c814d200e3ec49bc4d0fcdc52fc49f" + sha256 cellar: :any_skip_relocation, sonoma: "9ce138f5619361b9854cf3b87afd74a2197905bd32f83f72a397f00b33f96363" + sha256 cellar: :any_skip_relocation, ventura: "91c5b078ea11fefc9773d823f09438797d676239a78d9a3560c817835e69e86e" + sha256 cellar: :any_skip_relocation, monterey: "37029946a07912e8589dafd840596aa9af72b6d77b9d7cf377b4d540411eefa1" + sha256 cellar: :any_skip_relocation, big_sur: "edbc1a2e53d527f8230fedce1dafb95d2be651ef0817ea0c9c3c0abc417a0317" + sha256 cellar: :any_skip_relocation, catalina: "11a3ecc7f2a5bbc0f2bb4836e03c799049b3bada8438220dcd827ca37fd2a200" + sha256 cellar: :any_skip_relocation, arm64_linux: "67092a284463dddf38fd1df78c07816f179261af83cdfae8efa3144c41f9225a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4d3a2cf9fd5c3dcdc5de48fab3ee4c799f825c2f727c4e090964f398e3084a8" + end + + uses_from_macos "flex" => :build + + patch do + url "https://sourceforge.net/p/sloccount/patches/21/attachment/sloccount-suppress-exec-warnings.patch" + sha256 "4e68a7d9c61d62d4b045d1e5d099c6853456d15f874d659f3ab473e7fc40d565" + end + + patch :DATA + + def install + rm "makefile.orig" # Delete makefile.orig or patch falls over + bin.mkpath # Create the install dir or install falls over + system "make", "install", "PREFIX=#{prefix}" + (bin/"erlang_count").write "#!/bin/sh\ngeneric_count '%' $@" + end + + test do + system bin/"sloccount", "--version" + end +end + +__END__ +diff --git a/break_filelist b/break_filelist +index ad2de47..ff854e0 100755 +--- a/break_filelist ++++ b/break_filelist +@@ -205,6 +205,7 @@ $noisy = 0; # Set to 1 if you want noisy reports. + "hs" => "haskell", "lhs" => "haskell", + # ???: .pco is Oracle Cobol + "jsp" => "jsp", # Java server pages ++ "erl" => "erlang", + ); diff --git a/Formula/s/sloth-cli.rb b/Formula/s/sloth-cli.rb new file mode 100644 index 0000000000000..57c8773e23fe4 --- /dev/null +++ b/Formula/s/sloth-cli.rb @@ -0,0 +1,43 @@ +class SlothCli < Formula + desc "Prometheus SLO generator" + homepage "https://sloth.dev/" + url "https://github.com/slok/sloth/archive/refs/tags/v0.15.0.tar.gz" + sha256 "85c3369845fb44db90603422dddc2ac4f21f28f1bac4994f6e1e91707cd98cba" + license "Apache-2.0" + head "https://github.com/slok/sloth.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d48912e0ff06aaecac777e863ae79a8f5e3a4927cb39f0b68df832645da76abe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8a11f2892f80a1c88aed87d98a156db15ac20294dc37a3c1710b5907c2a1bc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51e8262235ea010b346e539c28815d5652459c040ec3880c8c0cec9c84579b53" + sha256 cellar: :any_skip_relocation, sonoma: "8011382bc46786eba1e82918d9bae201f759d64e94ffbacedcc8fd2c635cab03" + sha256 cellar: :any_skip_relocation, arm64_linux: "e2a7b92a6d7fce7d77419ea056044ff1faaaa14ca24ce574657fb8df9b30d677" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d06d3529fc05ca63b8c4c15fa8d7eeb1c48bb9787df738f0f9251fdc1529b380" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/slok/sloth/internal/info.Version=#{version}" + system "go", "build", *std_go_args(output: bin/"sloth", ldflags:), "./cmd/sloth" + + pkgshare.install "examples" + end + + test do + test_file = pkgshare/"examples/getting-started.yml" + + output = shell_output("#{bin}/sloth validate -i #{test_file} 2>&1") + assert_match "Validation succeeded", output + + output = shell_output("#{bin}/sloth generate -i #{test_file} 2>&1") + assert_match "Plugins loaded", output + + assert_match version.to_s, shell_output("#{bin}/sloth version") + end +end diff --git a/Formula/s/slowhttptest.rb b/Formula/s/slowhttptest.rb new file mode 100644 index 0000000000000..36e621719b9e2 --- /dev/null +++ b/Formula/s/slowhttptest.rb @@ -0,0 +1,41 @@ +class Slowhttptest < Formula + desc "Simulates application layer denial of service attacks" + homepage "https://github.com/shekyan/slowhttptest" + url "https://github.com/shekyan/slowhttptest/archive/refs/tags/v1.9.0.tar.gz" + sha256 "a3910b9b844e05ee55838aa17beddc6aa9d6c5c0012eab647a21cc9ccd6c8749" + license "Apache-2.0" + head "https://github.com/shekyan/slowhttptest.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a3f7cc9030661fa31e4cf6db7862dcd47a586303bd71df203b6be39c3fbebb19" + sha256 cellar: :any, arm64_sequoia: "2708483fcbd6bb9badf73319ba021792a02638eae74315f9b7489cfa1b1ed526" + sha256 cellar: :any, arm64_sonoma: "69e91887b20b8954627ba289b3eb711567f93a75582cc9df504d11036cf97a10" + sha256 cellar: :any, arm64_ventura: "68f9552d0393f75f8530f7e2100e7325178dff70197e0db2df7037f4396bc55f" + sha256 cellar: :any, arm64_monterey: "f44686a2cd459960a69bba155aadf7d83e1bd550d894b349dc6f457a7232c13d" + sha256 cellar: :any, arm64_big_sur: "d7ac9431e1ae5708175dcd3f8cfbb96189a78621eed8ac99bd06b9b8b6ba22b7" + sha256 cellar: :any, sonoma: "4ff751d6c6b99c9d2d6786468bfd53e524883d21b6bdb0a1add1ed8c89690176" + sha256 cellar: :any, ventura: "a4a82aed233b8a3e14f2e6870a5460edd7f5645f6b8c60033355b1ef6fe4e800" + sha256 cellar: :any, monterey: "85676dfbf81eddac78cb31816f86f8667e6726398ef68be3d2b490f3e78028bc" + sha256 cellar: :any, big_sur: "1818300aa4c7c76e0eb05f100009faf97a07fe43133a7f66e09abefb61a5c229" + sha256 cellar: :any, catalina: "bce898dc331e6dbbd7af3c39c8b385eb6deb67eedb1e0ca7344d2a45f7f98442" + sha256 cellar: :any_skip_relocation, arm64_linux: "46166ade359384ffdf6af2bc9e5dba58cfa680ad8ee9e8bfe3c380e71c1ec853" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3c40357c9bd384b991dc20163d7a1575f2ab2df0f53dfde971a044fd2304e50" + end + + depends_on "openssl@3" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + system bin/"slowhttptest", "-u", "https://google.com", + "-p", "1", "-r", "1", "-l", "1", "-i", "1" + + assert_match version.to_s, shell_output("#{bin}/slowhttptest -h", 1) + end +end diff --git a/Formula/s/slrn.rb b/Formula/s/slrn.rb new file mode 100644 index 0000000000000..b96d37844bcf6 --- /dev/null +++ b/Formula/s/slrn.rb @@ -0,0 +1,57 @@ +class Slrn < Formula + desc "Powerful console-based newsreader" + homepage "https://slrn.info/" + url "https://jedsoft.org/releases/slrn/slrn-1.0.3a.tar.bz2" + sha256 "3ba8a4d549201640f2b82d53fb1bec1250f908052a7983f0061c983c634c2dac" + license "GPL-2.0-or-later" + revision 1 + head "git://git.jedsoft.org/git/slrn.git", branch: "master" + + livecheck do + url "https://jedsoft.org/releases/slrn/" + regex(/href=.*?slrn[._-]v?(\d+(?:\.\d+)+(?:[a-z]?\d*)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "56945818d9c3961dc59b94440485c9c80baf04f29d791efa2803192b9ede727c" + sha256 arm64_sequoia: "439ad507d119a98349f0cc8422d9ef91125faa53a802a55078f11f1e7bb53fc4" + sha256 arm64_sonoma: "0b85878ca8073bc06e77875e5d106aebc10ff664d85e23e77c1b7a944d8fc565" + sha256 arm64_ventura: "f802b3c9ffb6f3974d353225cf25e52605d6c25fa85dbfd9b9710a33d075218b" + sha256 arm64_monterey: "03933542674c0ea7206e58e91879b25b068609a954231a7fe1bf64b9636a7ca3" + sha256 arm64_big_sur: "deb43212975b4d77acb6d79eb556990588a71d47a94029f24736bc1661bb18eb" + sha256 sonoma: "eb1b5847ca10bebffed3fb3fc5fadc37340d845780e536c020670fb6d6f01eb8" + sha256 ventura: "409721aae6f317e0e3e0b471c7488dd634585a193957c4feb7916a6a645768a1" + sha256 monterey: "8018c76bf03539804c59b85442cb2c8b578208f0a8b0ea325b559b810cc4a8cf" + sha256 big_sur: "e29042ebfccfb58c2ce1883f763173da76c5a38d190e98255abebf6dc632e343" + sha256 arm64_linux: "068f15a993a5007e14a1f8f1daf439682aedc5a098b58b271496f7996d011b5d" + sha256 x86_64_linux: "5bf9ff614629b46445541310dd089e4893dbfa2e463944aff5596cb14476f812" + end + + depends_on "openssl@3" + depends_on "s-lang" + + def install + bin.mkpath + man1.mkpath + mkdir_p "#{var}/spool/news/slrnpull" + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + system "./configure", *std_configure_args, + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + "--with-slrnpull=#{var}/spool/news/slrnpull", + "--with-slang=#{HOMEBREW_PREFIX}" + ENV.deparallelize + system "make", "all", "slrnpull" + system "make", "install" + end + + test do + ENV["TERM"] = "xterm" + assert_match version.to_s, shell_output("#{bin}/slrn --show-config") + end +end diff --git a/Formula/s/slsa-verifier.rb b/Formula/s/slsa-verifier.rb new file mode 100644 index 0000000000000..1c762dd6a7356 --- /dev/null +++ b/Formula/s/slsa-verifier.rb @@ -0,0 +1,52 @@ +class SlsaVerifier < Formula + desc "Verify provenance from SLSA compliant builders" + homepage "https://github.com/slsa-framework/slsa-verifier" + url "https://github.com/slsa-framework/slsa-verifier/archive/refs/tags/v2.7.1.tar.gz" + sha256 "19af322eb0ae0cb738f8e2395b3dcff756537277d62688fc9d2b4fc5ad6b16e4" + license "Apache-2.0" + head "https://github.com/slsa-framework/slsa-verifier.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1894c97875cdd077017dc18d069ddf767793ef292b5244d0362f0026f16ae0f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bcf61ec25f8d27700570040901164ae290b194cd0da63fa2e6468d45964d2774" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcf61ec25f8d27700570040901164ae290b194cd0da63fa2e6468d45964d2774" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bcf61ec25f8d27700570040901164ae290b194cd0da63fa2e6468d45964d2774" + sha256 cellar: :any_skip_relocation, sonoma: "61d1c99d4454cf0ef9ea24751e1eae302d84f59f4c094f326b0d2a6e2e225c2e" + sha256 cellar: :any_skip_relocation, ventura: "8f635db74b4536deb743eda7c09aa6cf9982efdae9cc4faa48d8ddd5f6c59d99" + sha256 cellar: :any_skip_relocation, arm64_linux: "837a199f4e09837c9153a0bb98598cab4b79b0774221308b7e9f0399997b6727" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c83f420ac94e1c93f8ab68a0f831011f204bbe1b12774304dc01cca516bb1a1c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/release-utils/version.gitVersion=#{version} + -X sigs.k8s.io/release-utils/version.gitCommit=brew + -X sigs.k8s.io/release-utils/version.gitTreeState=clean + -X sigs.k8s.io/release-utils/version.buildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cli/slsa-verifier" + + generate_completions_from_executable(bin/"slsa-verifier", "completion") + end + + test do + uri = "github.com/alpinelinux/docker-alpine" + output = shell_output("#{bin}/slsa-verifier verify-image docker://alpine --source-uri=#{uri} 2>&1", 1) + expected_output = "FAILED: SLSA verification failed: the image is mutable: 'docker://alpine'" + assert_match expected_output, output + + assert_match version.to_s, shell_output("#{bin}/slsa-verifier version 2>&1") + end +end diff --git a/Formula/s/slugify.rb b/Formula/s/slugify.rb new file mode 100644 index 0000000000000..11b92468add7b --- /dev/null +++ b/Formula/s/slugify.rb @@ -0,0 +1,24 @@ +class Slugify < Formula + desc "Convert filenames and directories to a web friendly format" + homepage "https://github.com/benlinton/slugify" + url "https://github.com/benlinton/slugify/archive/refs/tags/v1.0.1.tar.gz" + sha256 "f6873b062119d3eaa7d89254fc6e241debf074da02e3189f12e08b372af096e5" + license "MIT" + head "https://github.com/benlinton/slugify.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3b484ae7b5d87f4f148f8c9395960213ed62b4cd1b82567c7bcceede23259942" + end + + def install + bin.install "slugify" + man1.install "slugify.1" + end + + test do + system bin/"slugify", "-n", "dry_run.txt" + end +end diff --git a/Formula/s/slumber.rb b/Formula/s/slumber.rb new file mode 100644 index 0000000000000..56383bac19b60 --- /dev/null +++ b/Formula/s/slumber.rb @@ -0,0 +1,36 @@ +class Slumber < Formula + desc "Terminal-based HTTP/REST client" + homepage "https://slumber.lucaspickering.me/" + url "https://github.com/LucasPickering/slumber/archive/refs/tags/v4.2.0.tar.gz" + sha256 "358935e0b4d1a1d2f9b019fdbbee7826309abacb95c6ded3c2122c1a1a85251f" + license "MIT" + head "https://github.com/LucasPickering/slumber.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bbf5661cdabe0b0cc21e3268cf2a692c39f174c0d5417cbc907fc5f90c5b8bc0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "74adeb3d1cc9c6fb4aea356978f322e9d96c427a3608eba030d034b0472a9d30" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ffb2bfaf815dc6d70ce50d1f5dd4da7e98b62231d3bc68e4273297ef655baf7b" + sha256 cellar: :any_skip_relocation, sonoma: "b86d2d14143d3a86d8e2ad83defbbea1e846849c82ad6c0777d337fe06bd00e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f731b9eb0bb16593a8433c36e6ae8e93095877b7f697e5e6b190c734758c1d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5105fa5b187eeae8ca93ab0a3c2f12a49bc1887b2190fcecef63f3f642b22c9d" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/slumber --version") + + system bin/"slumber", "new" + assert_match <<~YAML, (testpath/"slumber.yml").read + profiles: + example: + name: Example Profile + data: + host: https://my-host + YAML + end +end diff --git a/Formula/s/slurm.rb b/Formula/s/slurm.rb new file mode 100644 index 0000000000000..e4dbd68c9626a --- /dev/null +++ b/Formula/s/slurm.rb @@ -0,0 +1,46 @@ +class Slurm < Formula + desc "Yet another network load monitor" + homepage "https://github.com/mattthias/slurm/wiki/" + url "https://github.com/mattthias/slurm/archive/refs/tags/upstream/0.4.4.tar.gz" + sha256 "2f846c9aa16f86cc0d3832c5cd1122b9d322a189f9e6acf8e9646dee12f9ac02" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{^upstream/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b4f4153c52ba78d3ad62fa6ff84a348993f2b8a032a41c0dcf5565ddd013be08" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "776f1360da9dd1fa05c2095b37974a193b18eaedaf5a94792e2945242a9bd1f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45e31ecee4bc3065e733dc130884346f4eabae06012ba29d75da76e5584e6481" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a2e8b79fac19c1d029e8d8f2dc61b39d74abf242f509e0507c1761d0dbd8f0af" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7ede14c56489fae8439d7913dc2a173b9ffed43a3ac1c344749a5486ddda29ff" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "39ec3975b8d5228214dfed9601b1122e34808d6461353e2e7f76c5b0f569e4b4" + sha256 cellar: :any_skip_relocation, sonoma: "e9c134c7ba9d8a1081bcea00b637f7441fb70f9fcbac5187d587a016338afa7a" + sha256 cellar: :any_skip_relocation, ventura: "29ded8a4e4b487e71ac6c8c21b2ad05fb7a52c6138d6c4f11f3406ca35cb225f" + sha256 cellar: :any_skip_relocation, monterey: "4db77bcd6316bb4e9d8b2070cad506e18dc46c0fbfc326252efb09d86bae8ec7" + sha256 cellar: :any_skip_relocation, big_sur: "f887511a3fc673569f504330987bae7100213e4c2ed12bee70db0f94c5465ef9" + sha256 cellar: :any_skip_relocation, catalina: "deb0b5005b323d47913ee26328ae1bc17321fb3f09a76f90f74c108b5f23c6fb" + sha256 arm64_linux: "01552c3c4c6ab5bbcce1eb3716ff2ba49e2bb66a683f0d17b7d8c75da30980f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c06bff9e858ad8f9c8583f4149a8a297b099c3d77754a7497978897c89427362" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + uses_from_macos "ncurses" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + net_if = OS.mac? ? "en0" : "eth0" + output = pipe_output("#{bin}/slurm -i #{net_if}", "q") + assert_match "slurm", output + end +end diff --git a/Formula/s/smake.rb b/Formula/s/smake.rb new file mode 100644 index 0000000000000..dd5dda0dd1537 --- /dev/null +++ b/Formula/s/smake.rb @@ -0,0 +1,46 @@ +class Smake < Formula + desc "Portable make program with automake features" + homepage "https://codeberg.org/schilytools/schilytools" + url "https://codeberg.org/schilytools/schilytools/archive/2024-03-21.tar.gz" + sha256 "4d66bf35a5bc2927248fac82266b56514fde07c1acda66f25b9c42ccff560a02" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "935c37ae0dc9258ccd97c8cf55851d91dd4c0ac1399fd138f61edec5dabf4306" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2c9095c632a8c91be31c300a3a21234bc06c0cfec1772d9ca0af21a4230c69c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "54d5687fe82a141e445b3e6bf8404dda343c41e57b0c67bc3292241b5af28d1a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1f63df56d0dd8903164a3fa57dbf30b9d71904ddf051ef907e616e8b535da79" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a88dc2fafc2b3f3745e1ad3a79e82c0c252faf403ff54a2f67e66298114e9ff4" + sha256 cellar: :any_skip_relocation, sonoma: "f46933438ba16e6944354e43afc1ed55572ded080b4267af8cb2e6fb7744107c" + sha256 cellar: :any_skip_relocation, ventura: "76c0564c658f45e7d92c1ffaaedf2b5394ace1f29a124867288a47575f40a339" + sha256 cellar: :any_skip_relocation, monterey: "8cf227992ec09344d3a74e81e4aa24b5c3b6747896bba6fdf8bc5b8ca55f57cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f79e77a426444a0a251b6f839ea29f95a29552b912e660ccd21cf08c5a3a851" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b51d8b0c121455fff0ae8f7b5329566f202885e5d4ca0a8720e9a42c489435f" + end + + def install + cd "psmake" do + system "./MAKE-all" + end + + cd "libschily" do + system "../psmake/smake" + end + + cd "smake" do + system "../psmake/smake" + end + + cd "man" do + system "../psmake/smake" + end + + bin.install Dir.glob("smake/OBJ/*/smake") + man1.install Dir.glob("smake/OBJ/*/*/*.1") + man5.install Dir.glob("man/man5/OBJ/*/*/*.5") + end + + test do + system bin/"smake", "-version" + end +end diff --git a/Formula/s/smap.rb b/Formula/s/smap.rb new file mode 100644 index 0000000000000..74903aea9a398 --- /dev/null +++ b/Formula/s/smap.rb @@ -0,0 +1,43 @@ +class Smap < Formula + desc "Drop-in replacement for Nmap powered by shodan.io" + homepage "https://github.com/s0md3v/Smap" + url "https://github.com/s0md3v/Smap/archive/refs/tags/0.1.12.tar.gz" + sha256 "870838dc01cbf2a018db8bbdee2ac439e4666e131d1f014843fc5b6994c33049" + license "AGPL-3.0-or-later" + head "https://github.com/s0md3v/Smap.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fcac3c34ff7362e78d5674837d531780a9b3b0bd54b54b0172f5dd47ba523f9a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "76fbb860e3293a917a8c0ea81e911cda57c0af6cb4e8cd89afb5c5063e45676f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "162d821d45208c377855150781facff0c083300805aff8b02303def6c0f107f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bd92aa17be58afaa0bc14baaabe80da512f7e636ed061be0bd7fb52600ce6d6b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "57729ea50b7670d200da18b69699d0d2c220d37b70e36a56a63347e226883df9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8cd6b9fa7d42798c226cea37ded2518da2056cb809964fd3cd202f83f68b70a6" + sha256 cellar: :any_skip_relocation, sonoma: "234f22ca3979ed3d55dcce4b355d23e428799b341d851699bae284cb5ab71aa8" + sha256 cellar: :any_skip_relocation, ventura: "6e731e48708f38b78db86630f22e16963b992a26dc2263eb53605cd880692f29" + sha256 cellar: :any_skip_relocation, monterey: "86e023078f8974a87f8173e0f6c7698d864f1461b606726c8a04e6d6102cfdc3" + sha256 cellar: :any_skip_relocation, big_sur: "78f76525efa1961a7d73524596f9b1d1b6c561dd4878394db3ea256c396e4bf0" + sha256 cellar: :any_skip_relocation, catalina: "3105b203330cc0b6f54b8e7b000d82afb253bf6e924cdc6155874aeaa7394896" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5e586b583ee24c689e583cc8cdc55f442f48e80e3a21d0a2fbc5ee09a2a0206" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dce4831163ced243814deed0371518cf969ebb55aedd74bdba4933dd30aef60b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/smap" + end + + test do + assert_match "scan report for google.com", shell_output("#{bin}/smap google.com p80,443") + system bin/"smap", "google.com", "-oX", "output.xml" + assert_path_exists testpath/"output.xml" + end +end diff --git a/Formula/s/smartdns.rb b/Formula/s/smartdns.rb new file mode 100644 index 0000000000000..edba45efb849a --- /dev/null +++ b/Formula/s/smartdns.rb @@ -0,0 +1,56 @@ +class Smartdns < Formula + desc "Rule-based DNS server for fast IP resolution, DoT/DoQ/DoH/DoH3 supported" + homepage "https://github.com/mokeyish/smartdns-rs" + url "https://github.com/mokeyish/smartdns-rs/archive/refs/tags/v0.12.2.tar.gz" + sha256 "79f1692d5ee588fb3bfdb7d4af51e4fa3a65f115d1102493e9aa788b3225ca97" + license "GPL-3.0-only" + head "https://github.com/mokeyish/smartdns-rs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26ec9fe654358fb04809a4a11b8912b9b4f6b9e791391abee1496737ca3b00d1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45d7493797a71e04c7e08ea549f9727cb61830e4dda87545e24d25f049127bbc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32da3a1bc6da7621d1e63da5f3cb4c62d6da0e85d25dbec8f51f9155717c3d66" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4793307c69ff0a43d277c2f952c536699ce1bba6479b9bdecfb49a4ed4814943" + sha256 cellar: :any_skip_relocation, sonoma: "6f1fb508390347136f31bcf86698f41d3f17ace1c8de346961638ed2e3908e03" + sha256 cellar: :any_skip_relocation, ventura: "a553a10ab6698defdf5d8dce0c9817f381cae11ced8c95dff2bc7b9422e7f944" + sha256 cellar: :any_skip_relocation, arm64_linux: "7672b026043c6876eab7addd25a323139e15b007421286618482e48501138f49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80392e5f5fc08199e1ec8fc51ba619ed0f62ceb4d9f764851af6c4e868a5dc29" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" # for libclang + + on_linux do + depends_on "openssl@3" => :build # cargo patch + depends_on "pkgconf" => :build # cargo patch + depends_on "bind" => :test # for `dig` + end + + def install + system "cargo", "install", "--no-default-features", "--features", "homebrew", *std_cargo_args + sbin.install bin/"smartdns" + pkgetc.install "etc/smartdns/smartdns.conf" + end + + service do + run [opt_sbin/"smartdns", "run", "-c", etc/"smartdns/smartdns.conf"] + keep_alive true + require_root true + end + + test do + port = free_port + + (testpath/"smartdns.conf").write <<~EOS + bind 127.0.0.1:#{port} + server 8.8.8.8 + local-ttl 3 + address /example.com/1.2.3.4 + EOS + spawn sbin/"smartdns", "run", "-c", testpath/"smartdns.conf" + sleep 2 + output = shell_output("dig @127.0.0.1 -p #{port} example.com.") + assert_match("example.com.\t\t3\tIN\tA\t1.2.3.4", output) + end +end diff --git a/Formula/s/smartmontools.rb b/Formula/s/smartmontools.rb new file mode 100644 index 0000000000000..c2636cd7f2032 --- /dev/null +++ b/Formula/s/smartmontools.rb @@ -0,0 +1,40 @@ +class Smartmontools < Formula + desc "SMART hard drive monitoring" + homepage "https://www.smartmontools.org/" + url "https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.5/smartmontools-7.5.tar.gz" + sha256 "690b83ca331378da9ea0d9d61008c4b22dde391387b9bbad7f29387f2595f76e" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "1059107fe65fbaa54f25cba7f2d9160cba2ca90cb0b9ba3d3635f78639c46a29" + sha256 arm64_sequoia: "40ae2e7c1fe5a99587149ea92c170bd8a89f97b44cb0b1d616635c45dfac2074" + sha256 arm64_sonoma: "55f5004cb84ed1a3ca63ad5d312dfad8eb85d5fe5adeefb317187729b37af0f6" + sha256 arm64_ventura: "43f66ca1752c078cf5a4f9bb7943bcb27e3ddef33ca0479c69c4491c7f567978" + sha256 sonoma: "bcff6e0f0d53730dd07c8847cb83bf28a5164b63d31e88a54ef9d70351548688" + sha256 ventura: "6efc9fd70ae3cc6dfbfb30ef3ab20bd5ca81516d6beaafde3d3b8e3ccd9691a3" + sha256 arm64_linux: "242eb99f15e071df38712e5b55a3b4b7bac49def0e6f08263bfcecb9b3257a99" + sha256 x86_64_linux: "61712e27dc30e3b492fe259a6dbf69f637018f8348abd5dd1be752526abdd811" + end + + def install + (var/"run").mkpath + (var/"lib/smartmontools").mkpath + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--sbindir=#{bin}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "--with-savestates", + "--with-attributelog", + "--with-nvme-devicescan" + system "make", "install" + end + + test do + system bin/"smartctl", "--version" + system bin/"smartd", "--version" + end +end diff --git a/Formula/s/smartypants.rb b/Formula/s/smartypants.rb new file mode 100644 index 0000000000000..df17cf25e8943 --- /dev/null +++ b/Formula/s/smartypants.rb @@ -0,0 +1,29 @@ +class Smartypants < Formula + desc "Typography prettifier" + homepage "https://daringfireball.net/projects/smartypants/" + url "https://daringfireball.net/projects/downloads/SmartyPants_1.5.1.zip" + sha256 "2813a12d8dd23f091399195edd7965e130103e439e2a14f298b75b253616d531" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?SmartyPants[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3de13f7bf233a663c066ff5a8b1a27ba3ceb278ac9c1e750f7f70d1723572dc4" + end + + def install + bin.install "SmartyPants.pl" => "smartypants" + end + + test do + assert_equal "“Give me a beer”, said Mike O’Connor", + pipe_output(bin/"smartypants", + %q("Give me a beer", said Mike O'Connor), 0) + end +end diff --git a/Formula/s/smenu.rb b/Formula/s/smenu.rb new file mode 100644 index 0000000000000..e8cebf464a9ac --- /dev/null +++ b/Formula/s/smenu.rb @@ -0,0 +1,45 @@ +class Smenu < Formula + desc "Powerful and versatile CLI selection tool for interactive or scripting use" + homepage "https://github.com/p-gen/smenu" + url "https://github.com/p-gen/smenu/releases/download/v1.5.0/smenu-1.5.0.tar.bz2" + sha256 "2de2217d322a5e28cb20f9128e60df6c00b4e8e8879381ac8ed8bdcdccc4c5ca" + license "MPL-2.0" + + # Exclude release candidate tags + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "78a219ab9e9b09653e73a48168c5acf40cf2f2cbe40d4cb3280baab5fbd6bd60" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "680882f063d437bba1303cea04f8f9124f0b968c842c2604684146716631eade" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b8d5074b8284658922ef4cd3590cfa37c26d9decfe9a83b79d807d1031849b6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "06eec1603896abc1d532b34543758e15560c5146bc1a6c54ce49254c25c794ad" + sha256 cellar: :any_skip_relocation, sonoma: "491e32cc6c966d6edbeedae5c8b76968b28a7f07e522ff22bbcab1a040424795" + sha256 cellar: :any_skip_relocation, ventura: "680bc214f78a5a4dbb8668244a4c700fbe1d54fe41547fb73bf694c4d7048057" + sha256 cellar: :any_skip_relocation, arm64_linux: "e85de8deb4fd6158ba1d6d22dc58c1364ece296b58dcb87027ded530e24d7e76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb922f2d14b6ee961ce7f50015069b2877a539fe14e9661b63d2a195df3b83fa" + end + + uses_from_macos "ncurses" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + require "pty" + + PTY.spawn(bin/"smenu", "--version") do |r, _w, _pid| + r.winsize = [80, 60] + + begin + assert_match version.to_s, r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + end +end diff --git a/Formula/s/smimesign.rb b/Formula/s/smimesign.rb new file mode 100644 index 0000000000000..ee2e4e1f12757 --- /dev/null +++ b/Formula/s/smimesign.rb @@ -0,0 +1,36 @@ +class Smimesign < Formula + desc "S/MIME signing utility for use with Git" + homepage "https://github.com/github/smimesign" + url "https://github.com/github/smimesign/archive/refs/tags/v0.2.0.tar.gz" + sha256 "b5921dc3f3b446743e130d1ee39ab9ed2e256b001bd52cf410d30a0eb087f54e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b10ee2fac2f1d8b6e518b4442ee3b59d3f42579c83ec1e8c2fd363ad196d4681" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9e2064fefc808679e20024cbb97402c88921c56c9638b04cc76a6c816a13f21" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5979116c40aaefd0b504137d670d0cd8e649cca54709a8cb41dfbe390d26762" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8709e59254d883223d8aa3f565054cacce97135da8d7c1b7c941596a75898f4a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d103d54144838e83f98e76260c5f3f546729cfa59b52002889ba6716951ba529" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2adc095ef7135d81dde128352c105f36affe27882900960e5ea658b1acd2427f" + sha256 cellar: :any_skip_relocation, sonoma: "60fb8d6029bb98ff839b6aeeec56c30f94c09da641a593145bf5e9fb6cec9d91" + sha256 cellar: :any_skip_relocation, ventura: "bdff73f08ec9eda212fbf271a5d7c131e38e1d9c2263e153db5229dba92c211a" + sha256 cellar: :any_skip_relocation, monterey: "b94e7e56d2920ae7038bc1ad9a33adf1ad6cced39c896e9a15515abbc63a423f" + sha256 cellar: :any_skip_relocation, big_sur: "9781b5ecad25be5a9ef95fb714caedae7512af4d6a31be300b30c57fd17d1fb9" + sha256 cellar: :any_skip_relocation, catalina: "4a8f0b0a87417c22175a7cfa7c25583a3c71170b220d3cbc56b05786baa3227d" + end + + depends_on "go" => :build + depends_on :macos + + def install + ldflags = "-s -w -X main.versionString=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/smimesign --version") + system bin/"smimesign", "--list-keys" + assert_match "could not find identity matching specified user-id: bad@identity", + shell_output("#{bin}/smimesign -su bad@identity 2>&1", 1) + end +end diff --git a/Formula/s/smlfmt.rb b/Formula/s/smlfmt.rb new file mode 100644 index 0000000000000..24fb800ae3752 --- /dev/null +++ b/Formula/s/smlfmt.rb @@ -0,0 +1,43 @@ +class Smlfmt < Formula + desc "Custom parser and code formatter for Standard ML" + homepage "https://github.com/shwestrick/smlfmt" + url "https://github.com/shwestrick/smlfmt/archive/refs/tags/v1.2.0.tar.gz" + sha256 "6517b0186518308d26f388d882af3b6106103a3ca3f00a4974e54fb526225df5" + license "MIT" + head "https://github.com/shwestrick/smlfmt.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "90962a33b9f4c6ced5fe20c3f9d44e4a0757d028ed454cae1e47e6d9833830ad" + sha256 cellar: :any, arm64_sequoia: "ca671852fb33a6c846046fc88e6ba48b80f18a2b41844bbb6f711c9ca6600e2b" + sha256 cellar: :any, arm64_sonoma: "4a4d72dd8bc6a5eb4cc96f5b8029163371f7a8d8bc8ca005a6a01f874f8b24d7" + sha256 cellar: :any, arm64_ventura: "a69daa52e744e9fad8803348b5f29487de9d07fd1f4d7146402371e765c55da2" + sha256 cellar: :any, sonoma: "76372f8a0e174f68b5dadaaa5cc621fb5cc71ea212284333c9b26dfc3d3a3a36" + sha256 cellar: :any, ventura: "d64483f4b661c239a66377251e21db3c9194f9e5146e1bf0150994fd93c4f4d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "215c5fe4dc87bb774faa139d50d6e794398d09f96e1f20da68d1ba58208de60b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24cd0363e581e4721ee4717895fcd05cbe4cfeab264515bdcbb7d6bd905ee2f9" + end + + depends_on "mlton" => :build + depends_on "gmp" + + def install + system "make" + bin.install "smlfmt" + end + + test do + (testpath/"source.sml").write <<~EOS + fun foo x = 10 + val x = 5 val y = 6 + EOS + expected_output = <<~EOS + fun foo x = 10 + val x = 5 + val y = 6 + EOS + system bin/"smlfmt", "--force", "source.sml" + assert_equal expected_output, (testpath/"source.sml").read + end +end diff --git a/Formula/s/smlpkg.rb b/Formula/s/smlpkg.rb new file mode 100644 index 0000000000000..93f3515569d96 --- /dev/null +++ b/Formula/s/smlpkg.rb @@ -0,0 +1,42 @@ +class Smlpkg < Formula + desc "Package manager for Standard ML libraries and programs" + homepage "https://github.com/diku-dk/smlpkg" + url "https://github.com/diku-dk/smlpkg/archive/refs/tags/v0.1.5.tar.gz" + sha256 "53440d8b0166dd689330fc686738076225ac883a00b283e65394cf9312575c33" + license "MIT" + head "https://github.com/diku-dk/smlpkg.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "28c00c67af3693cac8219c8cbb574b81d24bc772a01861379ad51e8dea23d608" + sha256 cellar: :any, arm64_sequoia: "a6d8ea56df569f46bf0a674cbdd5506fe90fa9a9377d5a2bb626eb51e7c2659d" + sha256 cellar: :any, arm64_sonoma: "bf39a2cb3d8362fe82da4e15466587cb521403386f0cc5d187d8bf542ab6facc" + sha256 cellar: :any, sonoma: "bc992113b06930535a168b765c1e9f0274e642d8bc1a886ecebf07ef574a05ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8fda41d263626cf760a549e000900a2b8810667aea5816dc9157ac207406f2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c781ec2d9590a65aaa91ccb66462d4527d5dbf5254ec3aacd939b73e5d322bf7" + end + + depends_on "mlton" => :build + depends_on "gmp" + + def install + ENV["MLCOMP"] = "mlton" + system "make", "-C", "src", "smlpkg" + system "make", "install", "prefix=#{prefix}" + end + + test do + expected_pkg = <<~EOS + package github.com/diku-dk/testpkg + + require { + github.com/diku-dk/sml-random 0.1.0 #8b329d10b0df570da087f9e15f3c829c9a1d74c2 + } + EOS + system bin/"smlpkg", "init", "github.com/diku-dk/testpkg" + system bin/"smlpkg", "add", "github.com/diku-dk/sml-random", "0.1.0" + assert_equal expected_pkg, (testpath/"sml.pkg").read + end +end diff --git a/Formula/s/smpeg.rb b/Formula/s/smpeg.rb new file mode 100644 index 0000000000000..490011cfa5da6 --- /dev/null +++ b/Formula/s/smpeg.rb @@ -0,0 +1,106 @@ +class Smpeg < Formula + desc "SDL MPEG Player Library" + homepage "https://icculus.org/smpeg/" + url "https://github.com/icculus/smpeg/archive/refs/tags/release_0_4_5.tar.gz" + sha256 "e2e53bfd2e6401e2c29e5eb3929be0e8698bc9e4c9d731751f67e77b408f1f74" + # license change was done in 2021 Aug, which is 8 years after 0.4.5 release + # commit ref, https://github.com/icculus/smpeg/commit/ffa0d54 + license "LGPL-2.0-or-later" + revision 1 + + livecheck do + url :stable + regex(/^release[._-]v?([01](?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "8b74893276266d73531cf99e6cb182bf238868d2d06c8a0051262ae15dd8a574" + sha256 cellar: :any, arm64_sequoia: "e7a1451326b54dd9107b43762c877fc91a8d9cb7fcae37aad8f4a354c98c56bf" + sha256 cellar: :any, arm64_sonoma: "d489427a87ed930d4d72e1536180d1781eb4f1f68992e5a2934c71df0dfbd7ed" + sha256 cellar: :any, arm64_ventura: "8023f2a680920c2c2184d38422b4111359ee56dad5a3fa5abcf66e06ebbc3242" + sha256 cellar: :any, arm64_monterey: "f6bec866d75df98036cdf109c1f98fd0fa2be764e4f82a8d7382e4e5b4affa08" + sha256 cellar: :any, arm64_big_sur: "75662ff4a7c2f2c1202fddcc301872696aa5123718028541cff67db96acad8d2" + sha256 cellar: :any, sonoma: "457f91decc06341f70afa9a2812ac4398a3ed28f353bdb0d6616fd8dec8059d7" + sha256 cellar: :any, ventura: "03c1eb05860e58ea080834b7fc760a10dc28aec402fb684c9a263b716693ec8f" + sha256 cellar: :any, monterey: "27336fb6005e4d498db6eb1f68deee86cad53c86ac10843984f833e2bf5bcb7d" + sha256 cellar: :any, big_sur: "7c97d1fb7a8df3df8cca2eb794a7898d9dc4c93ae3f201dc582ed8982c74e725" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4b46134434032d24f664aac17650a6641c70f589fce7dda983fb5b78a2db25b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b98076e9055fbe29549fd5c340deb22c733c24f3ab754a638dd24c425ba076d3" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "sdl12-compat" + + # Fix -flat_namespace being used on Big Sur and later. + patch :DATA + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-c++11-narrowing" if DevelopmentTools.clang_build_version >= 1400 + + args = %W[ + --with-sdl-prefix=#{Formula["sdl12-compat"].opt_prefix} + --disable-gtk-player + --disable-gtktest + --disable-opengl-player + --disable-sdltest + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./autogen.sh" + system "./configure", *args, *std_configure_args + system "make" + # Install script is not +x by default for some reason + chmod 0755, "./install-sh" + system "make", "install" + + # Not present since we do not build with gtk+ + rm(man1/"gtv.1") + end + + test do + system bin/"plaympeg", "--version" + end +end + +__END__ +diff --git a/acinclude/libtool.m4 b/acinclude/libtool.m4 +index 6894db8..1aea405 100644 +--- a/acinclude/libtool.m4 ++++ b/acinclude/libtool.m4 +@@ -947,18 +947,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- 10.[[012]]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ darwin*) ++ case ${MACOSX_DEPLOYMENT_TARGET},$host in ++ 10.[[012]],*|,*powerpc*) ++ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; ++ *) ++ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then diff --git a/Formula/s/smpeg2.rb b/Formula/s/smpeg2.rb new file mode 100644 index 0000000000000..6b3b82e4f17e4 --- /dev/null +++ b/Formula/s/smpeg2.rb @@ -0,0 +1,124 @@ +class Smpeg2 < Formula + desc "SDL MPEG Player Library" + homepage "https://icculus.org/smpeg/" + # license change was done in 2021 Aug, which is 8 years after 2.0.0 release + # commit ref, https://github.com/icculus/smpeg/commit/ffa0d54 + url "https://github.com/icculus/smpeg/archive/refs/tags/release_2_0_0.tar.gz" + sha256 "fdd431bd607efcf0f35789fb3105d7535d4f0e8b46e673e9c0051726e8d1e701" + license "LGPL-2.0-or-later" + head "https://github.com/icculus/smpeg.git", branch: "main" + + livecheck do + url :stable + regex(/^release[._-]v?(2(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f577393854025f6e32304032a00a3f29a27af3e71a52502025315f86b44ae9fb" + sha256 cellar: :any, arm64_sequoia: "dbbac559473f137fb4f16051e47fdab335581c72076ddab6535a9fba87c21749" + sha256 cellar: :any, arm64_sonoma: "d5228a92c9648cecb15aedbf8620e684f5b6b21d55b5e577f0c0564865211e46" + sha256 cellar: :any, arm64_ventura: "1287239a0f8877f88abba30316694f2e453be55143ab33748e850ea35ccdacce" + sha256 cellar: :any, arm64_monterey: "f37c33bf42b5cbb9b849e4f2eba7484a3197a003d72d65e06ce663d803ed4ec2" + sha256 cellar: :any, arm64_big_sur: "57d207a4e472f427f2aed7052e14988b67cd1d310ae49070b77913f49a3f984f" + sha256 cellar: :any, sonoma: "8bd2271e2cea9d9f2ea56130e77612a9dcdc248f881d6cc548e9f09cfc640413" + sha256 cellar: :any, ventura: "94333f1da48b4cf080d29f3c87bd51df3c637d657f41d83eec7aa92ff4f503ee" + sha256 cellar: :any, monterey: "5d90c31b398b3d1bdf2ebcc1a10b4879804733f8335dc4a77998d38f8e976b79" + sha256 cellar: :any, big_sur: "4bec13f2819af5a5f3472481df37b7c6afdaa884fce40023057484936caad58c" + sha256 cellar: :any_skip_relocation, arm64_linux: "21fa4f02887307bf5eb069733e06cb3931cad92ffefd27a8d2ebd49d6b9afb23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57ef23a33dcadc1871ad7e12fe7dfddaa7e6773704691af46616b03f8c9f83b7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "sdl2" + + # Fix -flat_namespace being used on Big Sur and later. + # We patch `libtool.m4` because we need to generate the `configure` script. + patch :DATA + + def install + args = ["--with-sdl-prefix=#{Formula["sdl2"].opt_prefix}", "--disable-sdltest"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./autogen.sh" + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + + # To avoid a possible conflict with smpeg 0.x + mv bin/"plaympeg", bin/"plaympeg2" + mv man1/"plaympeg.1", man1/"plaympeg2.1" + end + + test do + system bin/"plaympeg2", "--version" + end +end + +__END__ +diff --git a/acinclude/libtool.m4 b/acinclude/libtool.m4 +index 7dfd109..f8b1ac0 100644 +--- a/acinclude/libtool.m4 ++++ b/acinclude/libtool.m4 +@@ -947,18 +947,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- 10.[[012]]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ darwin*) ++ case ${MACOSX_DEPLOYMENT_TARGET},$host in ++ 10.[[012]],*|,*powerpc*) ++ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; ++ *) ++ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then +diff --git a/audio/hufftable.cpp b/audio/hufftable.cpp +index 6bc8e86..1ef2d7e 100644 +--- a/audio/hufftable.cpp ++++ b/audio/hufftable.cpp +@@ -550,11 +550,11 @@ htd33[ 31][2]={{ 16, 1},{ 8, 1},{ 4, 1},{ 2, 1},{ 0, 0},{ 0, 1}, + + const HUFFMANCODETABLE MPEGaudio::ht[HTN]= + { +- { 0, 0-1, 0-1, 0, 0, htd33}, ++ { 0, 0u-1, 0u-1, 0, 0, htd33}, + { 1, 2-1, 2-1, 0, 7,htd01}, + { 2, 3-1, 3-1, 0, 17,htd02}, + { 3, 3-1, 3-1, 0, 17,htd03}, +- { 4, 0-1, 0-1, 0, 0, htd33}, ++ { 4, 0u-1, 0u-1, 0, 0, htd33}, + { 5, 4-1, 4-1, 0, 31,htd05}, + { 6, 4-1, 4-1, 0, 31,htd06}, + { 7, 6-1, 6-1, 0, 71,htd07}, +@@ -564,7 +564,7 @@ const HUFFMANCODETABLE MPEGaudio::ht[HTN]= + {11, 8-1, 8-1, 0,127,htd11}, + {12, 8-1, 8-1, 0,127,htd12}, + {13,16-1,16-1, 0,511,htd13}, +- {14, 0-1, 0-1, 0, 0, htd33}, ++ {14, 0u-1, 0u-1, 0, 0, htd33}, + {15,16-1,16-1, 0,511,htd15}, + {16,16-1,16-1, 1,511,htd16}, + {17,16-1,16-1, 2,511,htd16}, diff --git a/Formula/s/smu.rb b/Formula/s/smu.rb new file mode 100644 index 0000000000000..91dc527fd8af8 --- /dev/null +++ b/Formula/s/smu.rb @@ -0,0 +1,35 @@ +class Smu < Formula + desc "Simple markup with markdown-like syntax" + homepage "https://github.com/Gottox/smu" + url "https://github.com/Gottox/smu/archive/refs/tags/v1.5.tar.gz" + sha256 "f3bb18f958962679a7fb48d7f8dcab8b59154d66f23c9aba02e78103106093a4" + license "MIT" + head "https://github.com/Gottox/smu.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae16b75d47384735db2d4c2814049a0eee4b654e58a834b38bf6434c2a0baa91" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bda27a644876f6c81baefb5ef848d760a559208664d4460eba40c95c25cb06df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9804e8317f1c9197f8cf08bd00561c1164e3d3f753820adcdca0df820caa7cae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "928be47f1fe335ea6dd656be82e8d11147b7815a4aeb7a30cdefe9bfe3911732" + sha256 cellar: :any_skip_relocation, arm64_monterey: "15a809e130f63ff833b9abb6c920c62978412ae5828719963d46290fe2920365" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "35080edb3d9aebd3207eaf70a786cd1edd5676a1d6ad579ce79c8bbd355c2bb9" + sha256 cellar: :any_skip_relocation, sonoma: "aaf8b5e63303e44a1f52e79349a985cc02c9df26c4141015bdd29de2062a5fd8" + sha256 cellar: :any_skip_relocation, ventura: "9aeed8b31c72a808136bc1c332eb476fecd858d454688818b09079731b7da0fe" + sha256 cellar: :any_skip_relocation, monterey: "77c730ecad9e261ea34baefabeffa1a90085a7b3e819c270e184dd04d9237976" + sha256 cellar: :any_skip_relocation, big_sur: "a6e6dd62afe5ec17b79c60a9c4e2b7a1336c3557419c1e154d61496290c46dc2" + sha256 cellar: :any_skip_relocation, catalina: "3b5b9f0dbb95b72dc55a17a7966db232bf0b54d9b7b6fbf85a8fef44054ffc6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7b6ba57e030a1e95c092e8270d8945c5f1d4fadb1f09747416f528edeb29209" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc53db21e266cc248c242aeb60a653aa21a2f4fbbbd864baec3374e20aaba1e7" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.md").write "[Homebrew](https://brew.sh)" + assert_equal "

    Homebrew

    \n", shell_output("#{bin}/smu test.md") + end +end diff --git a/Formula/s/smug.rb b/Formula/s/smug.rb new file mode 100644 index 0000000000000..55b79b46d63fc --- /dev/null +++ b/Formula/s/smug.rb @@ -0,0 +1,46 @@ +class Smug < Formula + desc "Automate your tmux workflow" + homepage "https://github.com/ivaaaan/smug" + url "https://github.com/ivaaaan/smug/archive/refs/tags/v0.3.11.tar.gz" + sha256 "3b0746ff38324b77be91f494970d515b506587198c2a21b3f1f91afe0d3afe8a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f805da61a45ab1efed33c794b14fe6afc1708afa6c855674b6da142b4af351ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f805da61a45ab1efed33c794b14fe6afc1708afa6c855674b6da142b4af351ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f805da61a45ab1efed33c794b14fe6afc1708afa6c855674b6da142b4af351ac" + sha256 cellar: :any_skip_relocation, sonoma: "b49641f43fe67fb0cb70bac44d272cbb6635613a3375c9efb00da058c5c8f9a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "47d33a306f226437b30a1be5f6cfbc2ea30607204f46aa8851da2c1105f7e3e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8508141f76d402d07f5713e4e149ab5002fbab1d7f11ed571db060f6a31c68bf" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + + bash_completion.install "completion/smug.bash" => "smug" + fish_completion.install "completion/smug.fish" + end + + test do + (testpath/".config/smug/test.yml").write <<~YAML + session: homebrew-test-session + root: . + windows: + - name: test + YAML + + assert_equal(version, shell_output(bin/"smug").lines.first.split("Version").last.chomp) + + begin + output_log = testpath/"output.log" + pid = spawn bin/"smug", "start", "--file", testpath/".config/smug/test.yml", [:out, :err] => output_log.to_s + sleep 2 + assert_match "Starting a new session", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/s/sn0int.rb b/Formula/s/sn0int.rb new file mode 100644 index 0000000000000..656b04659d364 --- /dev/null +++ b/Formula/s/sn0int.rb @@ -0,0 +1,51 @@ +class Sn0int < Formula + desc "Semi-automatic OSINT framework and package manager" + homepage "https://sn0int.readthedocs.io/en/stable/" + url "https://github.com/kpcyrd/sn0int/archive/refs/tags/v0.26.1.tar.gz" + sha256 "cf10bff93098586ba7dd885bf56af489ce0177bd1889a13b004fc38f026e71ea" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1118ce08023c035b3b612fb228f0cd9054f47e29e96ed42a4253e5ea6ab92060" + sha256 cellar: :any, arm64_sequoia: "a547abaa3d17a2f4cae9faddc776c31076e73d6444d8e44eed29db9a7b702d51" + sha256 cellar: :any, arm64_sonoma: "3e152a8c520739277a569718374479eab1623e54b7df52a73ac173c11a187830" + sha256 cellar: :any, arm64_ventura: "367b3eb6203589309734ce6419f41f318287dcbf395fd8410e5e61b5b722557f" + sha256 cellar: :any, sonoma: "b00f3aa80e595baeb07464d03118671e43731845dd141209566869e44bce384a" + sha256 cellar: :any, ventura: "dafedcdf4f30705f40d806d7725994bdf8fe012caa80591c197049e254e657c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "3add946dfd2e12c6ee97bc9c766c82f2b18b7468eb4e72620c380c7441518efd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "799345e368ecb3b46e5ce18b62976a75707f78a3e717d33b5524d6af3b3a9819" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "sphinx-doc" => :build + depends_on "libsodium" + + uses_from_macos "sqlite" + + on_linux do + depends_on "libseccomp" + end + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"sn0int", "completions") + + system "make", "-C", "docs", "man" + man1.install "docs/_build/man/sn0int.1" + end + + test do + (testpath/"true.lua").write <<~LUA + -- Description: basic selftest + -- Version: 0.1.0 + -- License: GPL-3.0 + + function run() + -- nothing to do here + end + LUA + system bin/"sn0int", "run", "-vvxf", testpath/"true.lua" + end +end diff --git a/Formula/s/snag.rb b/Formula/s/snag.rb new file mode 100644 index 0000000000000..50ea816385952 --- /dev/null +++ b/Formula/s/snag.rb @@ -0,0 +1,56 @@ +class Snag < Formula + desc "Automatic build tool for all your needs" + homepage "https://github.com/Tonkpils/snag" + url "https://github.com/Tonkpils/snag/archive/refs/tags/v1.2.0.tar.gz" + sha256 "37bf661436edf4526adf5428ac5ff948871c613ff4f9b61fbbdfe1fb95f58b37" + license "MIT" + head "https://github.com/Tonkpils/snag.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d78b5afc3692d32a42500fff33a42c68783140d27318051052fc0bba9cf8bd15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e3047af31785c147bfb9cf1fb8d3621de36339c95e49393f0fed5c0d60b933c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa9946a8925f1aa3881c48e93893a412938c9681f0bd2427a4d652e366c0aedc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1714f0e948566336c34fcf45dce8f7a5d76cfdcad20545af460dd271daf8bdde" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "687d1c28e0f911d8343db56f993e4ab0088ec34e40b9a99c1139ec4f8db558c3" + sha256 cellar: :any_skip_relocation, sonoma: "c06aa3205e4da50e8123ef2926b08de62ffa8129e8dfe3c39cae4d7acc5ccfb4" + sha256 cellar: :any_skip_relocation, ventura: "e9512e6adfaa81d36ec98c2b95e2cd5dcd2bc9bda8fa441fb9c37f01d565106d" + sha256 cellar: :any_skip_relocation, monterey: "f3a6ed5e8543f7b4c6eda761a849680ffd869a6fe1d0b51eee3ecc6761d4fe9d" + sha256 cellar: :any_skip_relocation, big_sur: "5b7076d11282b0ec9d25cf2f03e529dfc1d6d417dda5b80d44332a12767e68d1" + sha256 cellar: :any_skip_relocation, catalina: "008cc64d1a65693bf1773affb86ed185d5c91382f80f252877a5a6334986527a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7096008e3aab8b00c45a600edab938bd16918a92543423662f3a6015e5a14edb" + end + + # https://github.com/Tonkpils/snag/issues/66 + deprecate! date: "2024-02-24", because: :unmaintained + disable! date: "2025-02-24", because: :unmaintained + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + + (buildpath/"src/github.com/Tonkpils/").mkpath + ln_s buildpath, buildpath/"src/github.com/Tonkpils/snag" + + system "go", "build", "-o", bin/"snag", "./src/github.com/Tonkpils/snag" + end + + test do + (testpath/".snag.yml").write <<~YAML + build: + - touch #{testpath}/snagged + verbose: true + YAML + begin + pid = fork do + exec bin/"snag" + end + sleep 0.5 + ensure + Process.kill "TERM", pid + Process.wait pid + end + assert_path_exists testpath/"snagged" + end +end diff --git a/Formula/s/snakefmt.rb b/Formula/s/snakefmt.rb new file mode 100644 index 0000000000000..0b7d817fdbccf --- /dev/null +++ b/Formula/s/snakefmt.rb @@ -0,0 +1,73 @@ +class Snakefmt < Formula + include Language::Python::Virtualenv + + desc "Snakemake code formatter" + homepage "https://github.com/snakemake/snakefmt/" + url "https://files.pythonhosted.org/packages/90/93/5cfa69ca18e6a73fe2816dfef52969e770d6e90fe9bf978c9d85232dc755/snakefmt-0.11.2.tar.gz" + sha256 "e9ad3758401e0291f7a45360075c5738386b58a1b160d38827b40630d9f735e1" + license "MIT" + head "https://github.com/snakemake/snakefmt.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a466b06eda132b18216f3f7daf9e390dac8488fb293d304691c1a0eac099989a" + end + + depends_on "python@3.14" + + resource "black" do + url "https://files.pythonhosted.org/packages/d8/0d/cc2fb42b8c50d80143221515dd7e4766995bd07c56c9a3ed30baf080b6dc/black-24.10.0.tar.gz" + sha256 "846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"snakefmt", shell_parameter_format: :click) + end + + test do + test_file = testpath/"Snakefile" + test_file.write <<~EOS + rule testme: + output: + "test.out" + shell: + "touch {output}" + EOS + test_output = shell_output("#{bin}/snakefmt --check #{test_file} 2>&1", 1) + assert_match "[INFO] 1 file(s) would be changed 😬", test_output + + assert_match "snakefmt, version #{version}", + shell_output("#{bin}/snakefmt --version") + end +end diff --git a/Formula/s/snakemake.rb b/Formula/s/snakemake.rb new file mode 100644 index 0000000000000..72612961cc59e --- /dev/null +++ b/Formula/s/snakemake.rb @@ -0,0 +1,262 @@ +class Snakemake < Formula + include Language::Python::Virtualenv + + desc "Pythonic workflow system" + homepage "https://snakemake.readthedocs.io/" + url "https://files.pythonhosted.org/packages/3c/d1/4e9a69a0607131dc724b3666ed7724f329c8ed2e2395da42691e0c2c3a31/snakemake-9.13.4.tar.gz" + sha256 "5e88682f3e55670950483bc76cfb1bedff32e368177a0a02891efd00da9af923" + license "MIT" + head "https://github.com/snakemake/snakemake.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a8290779559a8dfa2aa6401f2cb3d5f92473e275686246fad274121b0691ff1b" + sha256 cellar: :any, arm64_sequoia: "93a3c70d44650801f78c277edf1c590f42b6d788379c12dd5e32b95ef5895a61" + sha256 cellar: :any, arm64_sonoma: "2a373e78e21a5f2a31fe0247c13cf9bafa6cbac2321c72eb6dd6f67aa29d65b8" + sha256 cellar: :any, sonoma: "cfd471806f7fca2585e55a1bddd5acb40300215a036dd5bba316d09f09c63282" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b95f8d37f967b1afd3adbcf8506d81d98891ea3c6c9d08928eb11bac4a73395" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd0ddd4bb38208afe3ee768e9fa5ffbb6bb9f6b544e4b397ec13a3d28743c13b" + end + + depends_on "rust" => :build # for appdirs + depends_on "cbc" + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: %w[certifi rpds-py] + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "argparse-dataclass" do + url "https://files.pythonhosted.org/packages/1a/ff/a2e4e328075ddef2ac3c9431eb12247e4ba707a70324894f1e6b4f43c286/argparse_dataclass-2.0.0.tar.gz" + sha256 "09ab641c914a2f12882337b9c3e5086196dbf2ee6bf0ef67895c74002cc9297f" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "conda-inject" do + url "https://files.pythonhosted.org/packages/b1/a8/8dc86113c65c949cc72d651461d6e4c544b3302a85ed14a5298829e6a419/conda_inject-1.3.2.tar.gz" + sha256 "0b8cde8c47998c118d8ff285a04977a3abcf734caf579c520fca469df1cd0aac" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "connection-pool" do + url "https://files.pythonhosted.org/packages/bd/df/c9b4e25dce00f6349fd28aadba7b6c3f7431cc8bd4308a158fbe57b6a22e/connection_pool-0.0.3.tar.gz" + sha256 "bf429e7aef65921c69b4ed48f3d48d3eac1383b05d2df91884705842d974d0dc" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "dpath" do + url "https://files.pythonhosted.org/packages/b5/ce/e1fd64d36e4a5717bd5e6b2ad188f5eaa2e902fde871ea73a79875793fc9/dpath-2.2.0.tar.gz" + sha256 "34f7e630dc55ea3f219e555726f5da4b4b25f2200319c8e6902c394258dd6a3e" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/20/b5/23b216d9d985a956623b6bd12d4086b60f0059b27799f23016af04a74ea1/fastjsonschema-2.21.2.tar.gz" + sha256 "b1eb43748041c880796cd077f1a07c3d94e93ae84bba5ed36800a33554ae05de" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "humanfriendly" do + url "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz" + sha256 "6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "immutables" do + url "https://files.pythonhosted.org/packages/69/41/0ccaa6ef9943c0609ec5aa663a3b3e681c1712c1007147b84590cec706a0/immutables-0.21.tar.gz" + sha256 "b55ffaf0449790242feb4c56ab799ea7af92801a0a43f9e2f4f8af2ab24dfc4a" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "jupyter-core" do + url "https://files.pythonhosted.org/packages/02/49/9d1284d0dc65e2c757b74c6687b6d319b02f822ad039e5c512df9194d9dd/jupyter_core-5.9.1.tar.gz" + sha256 "4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "nbformat" do + url "https://files.pythonhosted.org/packages/6d/fd/91545e604bc3dad7dca9ed03284086039b294c6b3d75c0d2fa45f9e9caf3/nbformat-5.10.4.tar.gz" + sha256 "322168b14f937a5d11362988ecac2a4952d3d8e3a2cbeb2319584631226d5b3a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/89/fc/889242351a932d6183eec5df1fc6539b6f36b6a88444f1e63f18668253aa/psutil-7.1.1.tar.gz" + sha256 "092b6350145007389c1cfe5716050f02030a05219d90057ea867d18fe8d372fc" + end + + resource "pulp" do + url "https://files.pythonhosted.org/packages/16/1c/d880b739b841a8aa81143091c9bdda5e72e226a660aa13178cb312d4b27f/pulp-3.3.0.tar.gz" + sha256 "7eb99b9ce7beeb8bbb7ea9d1c919f02f003ab7867e0d1e322f2f2c26dd31c8ba" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "reretry" do + url "https://files.pythonhosted.org/packages/40/1d/25d562a62b7471616bccd7c15a7533062eb383927e68667bf331db990415/reretry-0.11.8.tar.gz" + sha256 "f2791fcebe512ea2f1d153a2874778523a8064860b591cd90afc21a8bed432e3" + end + + resource "smart-open" do + url "https://files.pythonhosted.org/packages/ed/1a/8de851644371c2c88ee5ff006d58355979247a02370494d63d091ef0cd01/smart_open-7.4.1.tar.gz" + sha256 "5c20f09026875e6dec708e9610e0cd13d24d91f0a2c12e6511b9e478a566b4a0" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "snakemake-interface-common" do + url "https://files.pythonhosted.org/packages/fd/be/cbd3f30c24eecb0e7d48f7025c770b7dc664124a01c8d9df6da73eb4fbd1/snakemake_interface_common-1.22.0.tar.gz" + sha256 "ef1fa710a15629be4cc352b938596ab5235ecf0b615c5845f086d6c5da10cb88" + end + + resource "snakemake-interface-executor-plugins" do + url "https://files.pythonhosted.org/packages/18/51/e62e14090393d6688e7d4026a574f0a9de14ffb678bc4c6993306fc3e62a/snakemake_interface_executor_plugins-9.3.9.tar.gz" + sha256 "988ab388d48522fac84107867ae3f3398312b93b55df6ed7b99afc225468ca26" + end + + resource "snakemake-interface-logger-plugins" do + url "https://files.pythonhosted.org/packages/c0/92/2fe4fa879a5d4408cad6db5330cd4ebd352e47529cb0fdfdf8ebf73f2920/snakemake_interface_logger_plugins-2.0.0.tar.gz" + sha256 "0e8ff2af4c55ca140d6ea1c1540e733a4b3944abae48fe0eaf6a707e5797cd17" + end + + resource "snakemake-interface-report-plugins" do + url "https://files.pythonhosted.org/packages/f1/0f/b0986bacc1087d549e2ce5f5987de73980dc7041b7c518286f5035160d89/snakemake_interface_report_plugins-1.2.0.tar.gz" + sha256 "36cff4d50e7763ae0def0a7cf36d85e6c575d7bad1a3ade26b66c9b2b8831c02" + end + + resource "snakemake-interface-scheduler-plugins" do + url "https://files.pythonhosted.org/packages/88/d9/d480807d2cfc2d132bc760d877d45ec8fbe620a24200ec4d2697c4a26031/snakemake_interface_scheduler_plugins-2.0.2.tar.gz" + sha256 "2797e8fa9019d983132c2b403f14d6fcd3c5ad4c8d8a66b984b4740a71cacc46" + end + + resource "snakemake-interface-storage-plugins" do + url "https://files.pythonhosted.org/packages/dd/b3/cd5256e56cfe6fc51319a7d9df1a3a2a7584499fadd3c3fc5619ff39f74f/snakemake_interface_storage_plugins-4.2.3.tar.gz" + sha256 "95be93d1aa1c56c189d9ff661930a6475e847a79a74013822c9570c0ef691755" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "throttler" do + url "https://files.pythonhosted.org/packages/b4/22/638451122136d5280bc477c8075ea448b9ebdfbd319f0f120edaecea2038/throttler-1.2.2.tar.gz" + sha256 "d54db406d98e1b54d18a9ba2b31ab9f093ac64a0a59d730c1cf7bb1cdfc94a58" + end + + resource "traitlets" do + url "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz" + sha256 "9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/49/19/5e5bcd855d808892fe02d49219f97a50f64cd6d8313d75df3494ee97b1a3/wrapt-2.0.0.tar.gz" + sha256 "35a542cc7a962331d0279735c30995b024e852cf40481e384fd63caaa391cbb9" + end + + resource "yte" do + url "https://files.pythonhosted.org/packages/d2/ac/eb7ef47a0d307737812f9d8734d288a429849d430049049370814ab814d9/yte-1.9.0.tar.gz" + sha256 "d259548aa46c5d5ff318f3ecb1732918d1ac3c6708798767ce3823192ce1ba21" + end + + def install + venv = virtualenv_install_with_resources + rm_r(venv.site_packages/"pulp/solverdir/cbc") + end + + test do + (testpath/"Snakefile").write <<~EOS + rule testme: + output: + "test.out" + shell: + "touch {output}" + EOS + test_output = shell_output("#{bin}/snakemake --cores 1 -s #{testpath}/Snakefile 2>&1") + assert_path_exists testpath/"test.out" + assert_match "Building DAG of jobs...", test_output + end +end diff --git a/Formula/s/snakeviz.rb b/Formula/s/snakeviz.rb new file mode 100644 index 0000000000000..985fdf98e8159 --- /dev/null +++ b/Formula/s/snakeviz.rb @@ -0,0 +1,50 @@ +class Snakeviz < Formula + include Language::Python::Virtualenv + + desc "Web-based viewer for Python profiler output" + homepage "https://jiffyclub.github.io/snakeviz/" + url "https://files.pythonhosted.org/packages/04/06/82f56563b16d33c2586ac2615a3034a83a4ff1969b84c8d79339e5d07d73/snakeviz-2.2.2.tar.gz" + sha256 "08028c6f8e34a032ff14757a38424770abb8662fb2818985aeea0d9bc13a7d83" + license "BSD-3-Clause" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eefaa7c2dadc370f5ccca63450201f68b10163e61d6dc50ae3c26c16bd686c57" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "318c17f514d98735d7577c6df4229ac07e50f83ee24149412c096c62dd4d6235" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc79d16f3d26870ab474010e32658e3f042a12726ea82e3899adf75541d25f4b" + sha256 cellar: :any_skip_relocation, sonoma: "f619789876c65dd82de1630d89ed6fc4cb9521d67c15d9955edca63f00079dff" + sha256 cellar: :any_skip_relocation, arm64_linux: "333d060ac20fa6c1ff54c80a5bb1243187f658fb60356bc56c47c2c074450bae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7db4646f3bcfb62c5e601aa8e14ea8bbae28b1eefab03156f80764acc2778cc1" + end + + depends_on "python@3.14" + + resource "tornado" do + url "https://files.pythonhosted.org/packages/09/ce/1eb500eae19f4648281bb2186927bb062d2438c2e5093d1360391afd2f90/tornado-6.5.2.tar.gz" + sha256 "ab53c8f9a0fa351e2c0741284e06c7a45da86afb544133201c5cc8578eb076a0" + end + + def install + virtualenv_install_with_resources + end + + test do + require "cgi" + system bin/"snakeviz", "--version" + system "python3.14", "-m", "cProfile", "-o", "output.prof", "-m", "cProfile" + + port = free_port + + output_file = testpath/"output.prof" + + pid = fork do + exec bin/"snakeviz", "--port", port.to_s, "--server", output_file + end + sleep 3 + output = shell_output("curl -s http://localhost:#{port}/snakeviz/#{ERB::Util.url_encode output_file}") + assert_match "cProfile", output + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/s/snap.rb b/Formula/s/snap.rb new file mode 100644 index 0000000000000..35eceda43613a --- /dev/null +++ b/Formula/s/snap.rb @@ -0,0 +1,48 @@ +class Snap < Formula + desc "Tool to work with .snap files" + homepage "https://snapcraft.io/" + url "https://github.com/canonical/snapd/releases/download/2.72/snapd_2.72.vendor.tar.xz" + version "2.72" + sha256 "53d74e663527bae667a254da8a029aa4b0b8f559ca515d214da8dbb29dc6ccc7" + license "GPL-3.0-only" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "86dc875741ee770bd69ab163a4136a2c5473583bdf0aacf3a2b499a8333d67b9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86dc875741ee770bd69ab163a4136a2c5473583bdf0aacf3a2b499a8333d67b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "86dc875741ee770bd69ab163a4136a2c5473583bdf0aacf3a2b499a8333d67b9" + sha256 cellar: :any_skip_relocation, sonoma: "570b5ae1a3b9cce1573b40577579b3e9152432f3db910ed9f9a360dacf17d87e" + sha256 cellar: :any_skip_relocation, arm64_linux: "afb2682fd94c0b3a524f772a6ffd0f5e4226a05a95e3a694e2c51ffd788a6cb9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "041b2f5e10b2d2bf8b4717c9ec8a1ad4db373fe66924b9c74ab88ef579eb8320" + end + + depends_on "go" => :build + depends_on "squashfs" + + def install + system "./mkversion.sh", version.to_s + tags = OS.mac? ? "nosecboot" : "" + system "go", "build", *std_go_args(ldflags: "-s -w", tags:), "./cmd/snap" + + bash_completion.install "data/completion/bash/snap" + zsh_completion.install "data/completion/zsh/_snap" + + (man8/"snap.8").write Utils.safe_popen_read(bin/"snap", "help", "--man") + end + + test do + (testpath/"pkg/meta").mkpath + (testpath/"pkg/meta/snap.yaml").write <<~YAML + name: test-snap + version: 1.0.0 + summary: simple summary + description: short description + YAML + system bin/"snap", "pack", "pkg" + system bin/"snap", "version" + end +end diff --git a/Formula/s/snap7.rb b/Formula/s/snap7.rb new file mode 100644 index 0000000000000..ca18797237687 --- /dev/null +++ b/Formula/s/snap7.rb @@ -0,0 +1,51 @@ +class Snap7 < Formula + desc "Ethernet communication suite that works natively with Siemens S7 PLCs" + homepage "https://snap7.sourceforge.net/" + url "https://downloads.sourceforge.net/project/snap7/1.4.2/snap7-full-1.4.2.7z" + sha256 "1f4270cde8684957770a10a1d311c226e670d9589c69841a9012e818f7b9f80e" + license "LGPL-3.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "abb76d2d02504c5bbc694f446a88b35f5d6c5e44c06cdf9f2ddef874eada0a8b" + sha256 cellar: :any, arm64_sequoia: "0251dac8097c7643fbbf1003e422e44773bc86d6c356a8497b2a07bfa163fbdf" + sha256 cellar: :any, arm64_sonoma: "62a3c97124e8c82bd49a94b9c1273eb8745ccf6e1a9e179bfed9bbc6e117e43a" + sha256 cellar: :any, arm64_ventura: "e3169f10899c5bbc65ca3982e7ad9ddb27ebaff7577f9f9c8c0c74be8fb0f271" + sha256 cellar: :any, arm64_monterey: "3ec8ebc46f5b20dafc71b4a2f3c55e0323df337d7fd01e959e2f98c439fe0afa" + sha256 cellar: :any, arm64_big_sur: "7d60b716e639ad9c24153b94a474dab5d11ad5889e492846ea87235d7abd9e18" + sha256 cellar: :any, sonoma: "7e71f373d8a05c5d5da25b25873add858ea0231d83fd0981d2f86ebe5171be8d" + sha256 cellar: :any, ventura: "839e29976a348f6196df376d1f4c13ee808a8aacd3ff9d64369c6b7a3c390385" + sha256 cellar: :any, monterey: "0e80fc31c025dc39b1b551adb4328023a0b9f99643d8e246ab644529b9b7e3e1" + sha256 cellar: :any, big_sur: "52d04e1646b47ba15e5877e8c24b8f2d0267a51d8b7b07ee47330ecd2c44d95a" + sha256 cellar: :any, catalina: "015a23b1cb6728a86716811511e51fba427c69febabd1af5507af31d77523802" + sha256 cellar: :any_skip_relocation, arm64_linux: "55a95fc3a66a84a3cd2a26e57635613ef236d855cf21f42991b7bfc36cd7c58c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fbbcef4c1de91267df9cfad2d3be40570c3be564c5793d874c11452780dc315" + end + + def install + lib.mkpath + os_dir = OS.mac? ? "osx" : "unix" + os = OS.mac? ? "osx" : OS.kernel_name.downcase + system "make", "-C", "build/#{os_dir}", + "-f", "x86_64_#{os}.mk", + "install", "LibInstall=#{lib}" + include.install "release/Wrappers/c-cpp/snap7.h" + end + + test do + (testpath/"test.c").write <<~C + #include "snap7.h" + int main() + { + S7Object Client = Cli_Create(); + Cli_Destroy(&Client); + return 0; + } + C + system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lsnap7" + system "./test" + end +end diff --git a/Formula/s/snapcast.rb b/Formula/s/snapcast.rb new file mode 100644 index 0000000000000..d69aaaab667c5 --- /dev/null +++ b/Formula/s/snapcast.rb @@ -0,0 +1,65 @@ +class Snapcast < Formula + desc "Synchronous multiroom audio player" + homepage "https://github.com/badaix/snapcast" + url "https://github.com/badaix/snapcast/archive/refs/tags/v0.34.0.tar.gz" + sha256 "a2918ea4d1f9b2df9c4247fd71bd452ea03a5d20ac44f60a736df90488858944" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "645caa8ed11fc578ac65e91f85fafdba5b0d39f1f127e8232e94e94c1924fb48" + sha256 cellar: :any, arm64_sequoia: "98bd7f18a7fe9d9e3ca15b574a5fbd7035df6ae35432772da37ee0da7e8fcd86" + sha256 cellar: :any, arm64_sonoma: "bf2d72adf4a6869b4e13a7cca9b3768c865ae03a097297c78a092319a75c7972" + sha256 cellar: :any, sonoma: "a365b2cd656103c268e2c88b742e5ba3a311d313b28213b10e86cc7c1346ab6f" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc0c0174d7aeed8002be34138d445a2cebdbcc48e9898cc39857fc698b3b0b82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ac5b3447b3d7e1fd765fda683dde042994960aaaf190bf9a9dd5eb593f5304c" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "flac" + depends_on "libogg" + depends_on "libsoxr" + depends_on "libvorbis" + depends_on "openssl@3" + depends_on "opus" + + uses_from_macos "expat" + + on_linux do + depends_on "alsa-lib" + depends_on "avahi" + depends_on "pulseaudio" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + # FIXME: if permissions aren't changed, the install fails with: + # Error: Failed to read Mach-O binary: share/snapserver/plug-ins/meta_mpd.py + chmod 0555, share/"snapserver/plug-ins/meta_mpd.py" + end + + test do + server_pid = spawn bin/"snapserver" + sleep 2 + + begin + output_log = testpath/"output.log" + client_pid = spawn bin/"snapclient", [:out, :err] => output_log.to_s + sleep 10 + if OS.mac? + assert_match version.to_s, output_log.read + else + # Needs Avahi (which also needs D-Bus system bus) which requires root + assert_match "BrowseAvahi - Failed to create client", output_log.read + end + ensure + Process.kill("SIGTERM", client_pid) + end + ensure + Process.kill("SIGTERM", server_pid) + end +end diff --git a/Formula/s/snapcraft.rb b/Formula/s/snapcraft.rb new file mode 100644 index 0000000000000..41fd742addf3f --- /dev/null +++ b/Formula/s/snapcraft.rb @@ -0,0 +1,477 @@ +class Snapcraft < Formula + include Language::Python::Virtualenv + + desc "Package any app for every Linux desktop, server, cloud or device" + homepage "https://snapcraft.io/" + # Use git checkout so setuptools-scm and update-python-resources works + url "https://github.com/canonical/snapcraft.git", + tag: "8.12.0", + revision: "17ec09c928ce22e606dc0bc6be83483f6c2e52c3" + license "GPL-3.0-only" + head "https://github.com/canonical/snapcraft.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "ee6abb55783b90f45bd1f900c3277f1a1d4d46ba00fc10b3eb203abe24ff6e0c" + sha256 cellar: :any, arm64_sequoia: "5e598c797436655589fd35aba36751ce6aaca894decfd77cbc45b8b9ddab2b16" + sha256 cellar: :any, arm64_sonoma: "06eb933755eadbcefb8fb4404d78993ed7c49dcc640e365234a38f451d0d2be4" + sha256 cellar: :any, sonoma: "c6e2ecadea9d7422c2a8ec1877ccbf030db35e0cca41c7c921dc1b8645896b94" + sha256 cellar: :any_skip_relocation, arm64_linux: "d89a4a457db0ad49bcd30e4dc6c1e8d44d71a78121f6b280404af5ac89de8923" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3eb88afa4c03dc6c2b262c99d2d16b727e24100902a5c1ba1b940a3d0d06b98" + end + + depends_on "certifi" => :no_linkage + depends_on "libsodium" + depends_on "libyaml" + depends_on "lxc" + depends_on "pydantic-core" => :no_linkage + depends_on "pygit2" => :no_linkage + depends_on "python@3.14" + depends_on "snap" + depends_on "xdelta" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_linux do + depends_on "intltool" => :build # for python-distutils-extra + depends_on "apt" + depends_on "cryptography" + end + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core pygit2], + extra_packages: %w[catkin-pkg jeepney pylxd secretstorage] + + # We hit a build failure with requested 2.4.0ubuntu1 tarball so just using latest Debian + resource "python-apt" do + on_linux do + url "https://deb.debian.org/debian/pool/main/p/python-apt/python-apt_3.0.0.tar.xz" + sha256 "1963720a75b6916bf59c71e75ac4577b9dd51666030f11990f2f56cb31af115f" + end + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "catkin-pkg" do + url "https://files.pythonhosted.org/packages/1c/7a/dcd7ba56dc82d88b3059a6770828388fc2e136ca4c5d79003f9febf33087/catkin_pkg-1.1.0.tar.gz" + sha256 "df1cb6879a3a772e770a100a6613ce8fc508b4855e5b2790106ddad4a8beb43c" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "craft-application" do + url "https://files.pythonhosted.org/packages/ca/a3/6e487bb73f3b74eee8a38691510796b7326211d4981547c0ed45d0325aee/craft_application-5.8.0.tar.gz" + sha256 "0d01b9792535b3dad51f3501f0f476daa3936b8b3c68ba8274f20cf5c25fd184" + end + + resource "craft-archives" do + url "https://files.pythonhosted.org/packages/41/4c/63ce5d6c91b4b269f862460392bd70fd0594f7902641b5d0bc82aa3f1c41/craft_archives-2.2.0.tar.gz" + sha256 "0bfd6dc3c2710605b97292df952032af24bf94ebf2f284f355d70f1bb2e3fe20" + end + + resource "craft-cli" do + url "https://files.pythonhosted.org/packages/35/0a/f1612fe57295b6a69ff256dbd0826b90f70b27dda90988f972fa6f8968cc/craft_cli-3.2.0.tar.gz" + sha256 "557345bf1d82e93d6525f35837ddd2b216de4152f5572306ec59d805231d348b" + end + + resource "craft-grammar" do + url "https://files.pythonhosted.org/packages/c7/35/584fc928bffd1346c4b9c55170cbe4c09f89ec185d0d9d7e2626f876e80d/craft_grammar-2.3.0.tar.gz" + sha256 "0b7ae3aa595f0f3d1f82ed2e696c99b35283c18a60c7a68840bc185bd123e4d8" + end + + resource "craft-parts" do + url "https://files.pythonhosted.org/packages/ff/0e/32408579efd9061321c8df73754f47347e0eb26c04621b61bf173b9e2fc3/craft_parts-2.26.0.tar.gz" + sha256 "53d73015ec55ca5ad5dfc84113db26b06191928bc82ac1e18e8582381390b6d6" + end + + resource "craft-platforms" do + url "https://files.pythonhosted.org/packages/44/78/f2c3ef342c9e9fee0127516aee113a28c487a999d35ce4aa944a58bd5939/craft_platforms-0.10.0.tar.gz" + sha256 "85b8630c0f7436b0832466c1dba8deb040502fdadc1d225fbed15d1e1e38f729" + end + + # Temporarily downgrade from 3.1.0 to fix the error: No module named 'pylxd' + # It should only required on linux, but the dependency is pulled on macOS + # Issue ref: https://github.com/canonical/snapcraft/issues/5781 + resource "craft-providers" do + url "https://files.pythonhosted.org/packages/99/2f/3b1a7062c2d9b94f926d96356b63678d50aa44a2657a313adf2df4150bf6/craft_providers-3.0.0.tar.gz" + sha256 "07f669abd7b16d8bd983851ea173e932a1a2244cc81a457370c0979f71612f9c" + end + + resource "craft-store" do + url "https://files.pythonhosted.org/packages/c4/64/af2af291aef5ea2b5fc56d9be151324eabb55c4ed89bc4f11343faa377b5/craft_store-3.3.0.tar.gz" + sha256 "02304296d7d5b896bb8d07660c3a29eaff461fc12d40fd2a21a39230f53c288b" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "distro-support" do + url "https://files.pythonhosted.org/packages/90/c8/40cf2bdb5647c0ccad40a02edde6966d03a3258c550d92a2030427867029/distro_support-2025.8.13.tar.gz" + sha256 "12a73039db0a04e4b987789598f05c554adb3b2ec8e97bc28f40a125dc82d982" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "gnupg" do + url "https://files.pythonhosted.org/packages/96/6c/21f99b450d2f0821ff35343b9a7843b71e98de35192454606435c72991a8/gnupg-2.3.1.tar.gz" + sha256 "8db5a05c369dbc231dab4c98515ce828f2dffdc14f1534441a6c59b71c6d2031" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/52/77/6653db69c1f7ecfe5e3f9726fdadc981794656fcd7d98c4209fecfea9993/httplib2-0.31.0.tar.gz" + sha256 "ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz" + sha256 "6ff5f3180870836cae40f06fa10419f557208175f13ad7bc26caa77beb1f6e02" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "launchpadlib" do + url "https://files.pythonhosted.org/packages/30/ec/e659321733decaafe95d4cf964ce360b153de48c5725d5f27cefe97bf5f8/launchpadlib-2.1.0.tar.gz" + sha256 "b4c25890bb75050d54c08123d2733156b78a59a2555f5461f69b0e44cd91242f" + end + + resource "lazr-restfulclient" do + url "https://files.pythonhosted.org/packages/ea/a3/45d80620a048c6f5d1acecbc244f00e65989914bca370a9179e3612aeec8/lazr.restfulclient-0.14.6.tar.gz" + sha256 "43f12a1d3948463b1462038c47b429dcb5e42e0ba7f2e16511b02ba5d2adffdb" + end + + resource "lazr-uri" do + url "https://files.pythonhosted.org/packages/58/53/de9135d731a077b1b4a30672720870abdb62577f18b1f323c87e6e61b96c/lazr_uri-1.0.7.tar.gz" + sha256 "ed0cf6f333e450114752afb1ce0c299c36ac4b109063eb50354c4f87f825a3ee" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "macaroonbakery" do + url "https://files.pythonhosted.org/packages/4b/ae/59f5ab870640bd43673b708e5f24aed592dc2673cc72caa49b0053b4af37/macaroonbakery-1.3.4.tar.gz" + sha256 "41ca993a23e4f8ef2fe7723b5cd4a30c759735f1d5021e990770c8a0e0f33970" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz" + sha256 "52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "overrides" do + url "https://files.pythonhosted.org/packages/36/86/b585f53236dec60aba864e050778b25045f857e17f6e5ea0ae95fe80edd2/overrides-7.7.0.tar.gz" + sha256 "55158fa3d93b98cc75299b1e67078ad9003ca27945c76162c1c0766d6f91820a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "progressbar" do + url "https://files.pythonhosted.org/packages/a3/a6/b8e451f6cff1c99b4747a2f7235aa904d2d49e8e1464e0b798272aa84358/progressbar-2.5.tar.gz" + sha256 "5d81cb529da2e223b53962afd6c8ca0f05c6670e40309a7219eacc36af9b6c63" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/cd/ec/7b8e6b9b1d22708138630ef34c53ab2b61032c04f16adfdbb96791c8c70c/psutil-7.1.2.tar.gz" + sha256 "aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/b9/ab/33968940b2deb3d92f5b146bc6d4009a5f95d1d06c148ea2f9ee965071af/pyelftools-0.32.tar.gz" + sha256 "6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5" + end + + resource "pylxd" do + url "https://files.pythonhosted.org/packages/d3/45/8a7b71aeac58e7c42f296a8878c7275728cfb579a4116ea676e8c55f4333/pylxd-2.3.6.tar.gz" + sha256 "1c6e064e264a5a215826b5d1ecba981a7fe09771e1b83eff0809e0643a390a14" + end + + resource "pymacaroons" do + url "https://files.pythonhosted.org/packages/37/b4/52ff00b59e91c4817ca60210c33caf11e85a7f68f7b361748ca2eb50923e/pymacaroons-0.13.0.tar.gz" + sha256 "1e6bba42a5f66c245adf38a5a4006a99dcc06a0703786ea636098667d42903b8" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyrfc3339" do + url "https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.1.tar.gz" + sha256 "81b8cbe1519cdb79bed04910dd6fa4e181faf8c88dff1e1b987b5f7ab23a5b1a" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-debian" do + url "https://files.pythonhosted.org/packages/bf/4b/3c4cf635311b6203f17c2d693dc15e898969983dd3f729bee3c428aa60d4/python-debian-1.0.1.tar.gz" + sha256 "3ada9b83a3d671b58081782c0969cffa0102f6ce433fbbc7cf21275b8b5cc771" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "raven" do + url "https://files.pythonhosted.org/packages/79/57/b74a86d74f96b224a477316d418389af9738ba7a63c829477e7a86dd6f47/raven-6.10.0.tar.gz" + sha256 "3fa6de6efa2493a7c827472e984ce9b020797d0da16f1db67197bcc23c8fae54" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "requests-unixsocket2" do + url "https://files.pythonhosted.org/packages/12/04/e5c07a329a0087f8a342231b6e054d83279c17ccc81da5aa18071c8ea75e/requests_unixsocket2-1.0.1.tar.gz" + sha256 "87953038ae42befb6efbdf504d6dda2554a0b0d13b65e42f7319793b5527a303" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/8d/d2/ec1acaaff45caed5c2dedb33b67055ba9d4e96b091094df90762e60135fe/setuptools-80.8.0.tar.gz" + sha256 "49f7af965996f26d43c8ae34539c8d99c5042fbff34302ea151eaa9c207cd257" + end + + resource "simplejson" do + url "https://files.pythonhosted.org/packages/41/f4/a1ac5ed32f7ed9a088d62a59d410d4c204b3b3815722e2ccfb491fa8251b/simplejson-3.20.2.tar.gz" + sha256 "5fe7a6ce14d1c300d80d08695b7f7e633de6cd72c80644021874d985b3393649" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "snap-helpers" do + url "https://files.pythonhosted.org/packages/50/2a/221ab0a9c0200065bdd8a5d2b131997e3e19ce81832fdf8138a7f5247216/snap-helpers-0.4.2.tar.gz" + sha256 "ef3b8621e331bb71afe27e54ef742a7dd2edd9e8026afac285beb42109c8b9a9" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "tinydb" do + url "https://files.pythonhosted.org/packages/a0/79/4af51e2bb214b6ea58f857c51183d92beba85b23f7ba61c983ab3de56c33/tinydb-4.8.2.tar.gz" + sha256 "f7dfc39b8d7fda7a1ca62a8dbb449ffd340a117c1206b68c50b1a481fb95181d" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "validators" do + url "https://files.pythonhosted.org/packages/53/66/a435d9ae49850b2f071f7ebd8119dd4e84872b01630d6736761e6e7fd847/validators-0.35.0.tar.gz" + sha256 "992d6c48a4e77c81f1b4daba10d16c3a9bb0dbb79b3a19ea847ff0928e70497a" + end + + resource "wadllib" do + url "https://files.pythonhosted.org/packages/da/54/82866d8c2bf602ed9df52c8f8b7a45e94f8c2441b3d1e9e46d34f0e3270f/wadllib-2.0.0.tar.gz" + sha256 "1edbaf23e4fa34fea70c9b380baa2a139b1086ae489ebcccc4b3b65fc9737427" + end + + resource "ws4py" do + url "https://files.pythonhosted.org/packages/cb/55/dd8a5e1f975d1549494fe8692fc272602f17e475fe70de910cdd53aec902/ws4py-0.6.0.tar.gz" + sha256 "9f87b19b773f0a0744a38f3afa36a803286dd3197f0bb35d9b75293ec7002d19" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + without = %w[gnupg] + without += %w[jeepney secretstorage pylxd ws4py] if OS.mac? + venv = virtualenv_install_with_resources(without:) + + # Workaround for runtime SyntaxWarning: invalid escape sequence '\d' + resource("gnupg").stage do + inreplace "gnupg/_util.py", "re.compile('", "re.compile(r'" + inreplace "gnupg/_parsers.py", "re.findall('", "re.findall(r'" + venv.pip_install_and_link Pathname.pwd + end + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + assert_match version.to_s, shell_output("#{bin}/snapcraft --version") + + assert_match "Package, distribute, and update snaps", shell_output("#{bin}/snapcraft --help 2>&1") + + system bin/"snapcraft", "init" + assert_path_exists testpath/"snap/snapcraft.yaml" + end +end diff --git a/Formula/s/snappy.rb b/Formula/s/snappy.rb new file mode 100644 index 0000000000000..b673aea6ecfa3 --- /dev/null +++ b/Formula/s/snappy.rb @@ -0,0 +1,109 @@ +class Snappy < Formula + desc "Compression/decompression library aiming for high speed" + homepage "https://google.github.io/snappy/" + url "https://github.com/google/snappy/archive/refs/tags/1.2.2.tar.gz" + sha256 "90f74bc1fbf78a6c56b3c4a082a05103b3a56bb17bca1a27e052ea11723292dc" + license "BSD-3-Clause" + head "https://github.com/google/snappy.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e735754860a1b086bf31814117dff6eaee6a1d9f26e8de33ee9d75f1decc770b" + sha256 cellar: :any, arm64_sequoia: "326d8c9a73e0990a43fefe96d2e29355fcd6f42906710017bd1a3baf4401bb33" + sha256 cellar: :any, arm64_sonoma: "28b0702ed678a35c6d03cb4d91f975e17b3b5af7480418f3c82f46365e55533d" + sha256 cellar: :any, arm64_ventura: "9e4594baee5654ab46bf4542d4e1867c6a6700cc11948ee7f496a7a681a1fd28" + sha256 cellar: :any, sonoma: "47444cd920b4f3232d1d77f51ead8a18e0a77fb5b154bff7c024bf17d700d273" + sha256 cellar: :any, ventura: "026d656d0beaf42781437e7fe70012b18eb73f16db024f7e46f35891e2e8a1b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2d7ecfa6475c2ad07a45025ad99940c75bf03c7b3772850d830a3dd571ff09c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "462767a5fd6f73305aa7fd232bc5119e96491ad17222092d8b532fe2616ca24e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + # Fix issue where Mojave clang fails due to entering a __GNUC__ block + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100 + end + + fails_with :clang do + build 1100 + cause "error: invalid output constraint '=@ccz' in asm" + end + + # Fix issue where `snappy` setting -fno-rtti causes build issues on `folly` + # `folly` issue ref: https://github.com/facebook/folly/issues/1583 + patch :DATA + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + args = %w[ + -DSNAPPY_BUILD_TESTS=OFF + -DSNAPPY_BUILD_BENCHMARKS=OFF + ] + + system "cmake", "-S", ".", "-B", "build/static", *args, *std_cmake_args + system "cmake", "--build", "build/static" + system "cmake", "--install", "build/static" + + system "cmake", "-S", ".", "-B", "build/shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + end + + test do + # Force use of Clang on Mojave + ENV.clang if OS.mac? + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + using namespace std; + using namespace snappy; + + int main() + { + string source = "Hello World!"; + string compressed, decompressed; + Compress(source.data(), source.size(), &compressed); + Uncompress(compressed.data(), compressed.size(), &decompressed); + assert(source == decompressed); + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lsnappy", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cd71a47..ef040d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,10 +51,6 @@ if(MSVC) + string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-") + add_definitions(-D_HAS_EXCEPTIONS=0) +- +- # Disable RTTI. +- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") + else(MSVC) + # Use -Wall for clang and gcc. + if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") +@@ -81,10 +77,6 @@ else(MSVC) + # Disable C++ exceptions. + string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") +- +- # Disable RTTI. +- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif(MSVC) + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make diff --git a/Formula/s/snappystream.rb b/Formula/s/snappystream.rb new file mode 100644 index 0000000000000..11c66311039b8 --- /dev/null +++ b/Formula/s/snappystream.rb @@ -0,0 +1,67 @@ +class Snappystream < Formula + desc "C++ snappy stream realization (compatible with snappy)" + homepage "https://github.com/hoxnox/snappystream" + url "https://github.com/hoxnox/snappystream/archive/refs/tags/1.0.0.tar.gz" + sha256 "a50a1765eac1999bf42d0afd46d8704e8c4040b6e6c05dcfdffae6dcd5c6c6b8" + license "Apache-2.0" + revision 1 + head "https://github.com/hoxnox/snappystream.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b9bfaec4d6e7207937aa78282ec7fd13860da55f88a518ad7c0804a4b6004fd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8bfb07955fdb8b0896bbb1084651c320a78d2e5e4ae5d26242b86469ae8d39aa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4647e986c27d16e41d5636d0d14b096f09a69e446e6cebf2715e2de88c579527" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b3e452bf6ee2fb64d89388ac99d1786218bad625c6fc71f0cb4284f57bf150c7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9c92c2f15283870584d9fe49062734d66b6c1db1f10bf018249c3a7cd0f9110f" + sha256 cellar: :any_skip_relocation, sonoma: "6e0352aaa68c6373355d22f3aa92fb056077439b26869bd317076176aea7bcab" + sha256 cellar: :any_skip_relocation, ventura: "87329a4191cefc04c19ae16543101a5d94336812ede1047c34e52db7ff2a4006" + sha256 cellar: :any_skip_relocation, monterey: "0d58d7dd0573099e572969f5d38c821317171db8de851d0c5d7eb56d46ac54ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c192dcba364b122bbf8428185f24a1ee4e47f7a0dbdac8b3b4cf0edd467823f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5689e64e2ccf991d92a2adff2eef8b2ac32490467ce64bc09e93cee407b60d8a" + end + + depends_on "cmake" => :build + depends_on "snappy" + + def install + args = %w[ + -DBUILD_TESTS=ON + -DCMAKE_CXX_STANDARD=11 + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cxx").write <<~CPP + #include + #include + #include + #include + #include + + int main() + { + { std::ofstream ofile("snappy-file.dat"); + snappy::oSnappyStream osnstrm(ofile); + std::cin >> std::noskipws; + std::copy(std::istream_iterator(std::cin), std::istream_iterator(), std::ostream_iterator(osnstrm)); + } + { std::ifstream ifile("snappy-file.dat"); + snappy::iSnappyStream isnstrm(ifile); + isnstrm >> std::noskipws; + std::copy(std::istream_iterator(isnstrm), std::istream_iterator(), std::ostream_iterator(std::cout)); + } + } + CPP + system ENV.cxx, "test.cxx", "-o", "test", + "-L#{lib}", "-lsnappystream", + "-L#{Formula["snappy"].opt_lib}", "-lsnappy" + system "./test < #{__FILE__} > out.dat && diff #{__FILE__} out.dat" + end +end diff --git a/Formula/s/snapraid.rb b/Formula/s/snapraid.rb new file mode 100644 index 0000000000000..4acec30558613 --- /dev/null +++ b/Formula/s/snapraid.rb @@ -0,0 +1,33 @@ +class Snapraid < Formula + desc "Backup program for disk arrays" + homepage "https://www.snapraid.it/" + url "https://github.com/amadvance/snapraid/releases/download/v13.0/snapraid-13.0.tar.gz" + sha256 "0282a9eec3301cd608dc45d9182b6d207f9fd4d25828c9deb329a015c77cb4e2" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "19b050454ae04096be0285ebe515c2cc97ed39d46404e03d128d37b28726b471" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a38aa13933093f4bf281a8e0ad7079cd5b7ffaa85cdb55b9b70b456dc7d1fd36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "85b8ca325f1d873b8ebc0bf1c06b170ae3ae106ec677906d96ed77adf9499359" + sha256 cellar: :any_skip_relocation, sonoma: "955f3d5943b70e6798a18f339a9fae20c5a8404c67ed7447dd2f796623149fe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a63c13b9c5ac924ef2f87bb2e7f44cc1e05810b3e58dd2b338039c7614ecf1a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4277c65597f58d2f996bd106b71249dd1c7ed7e39b990e2f9cb887d39993b8cf" + end + + head do + url "https://github.com/amadvance/snapraid.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + system "./autogen.sh" if build.head? + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/snapraid --version") + end +end diff --git a/Formula/s/sng.rb b/Formula/s/sng.rb new file mode 100644 index 0000000000000..46578c28229e8 --- /dev/null +++ b/Formula/s/sng.rb @@ -0,0 +1,36 @@ +class Sng < Formula + desc "Enable lossless editing of PNGs via a textual representation" + homepage "https://sng.sourceforge.net/" + url "https://downloads.sourceforge.net/project/sng/sng-1.1.1.tar.xz" + sha256 "c9bdfb80f5a17db1aab9337baed64a8ebea5c0ddf82915c6887b8cfb87ece61e" + license "Zlib" + + bottle do + sha256 arm64_tahoe: "21a7abd0b2c11b995a816141ba9fd6681090a3bcea817ecd3d9947be6d36e02d" + sha256 cellar: :any, arm64_sequoia: "3fa5a7aa3bd864bc8f01ca6bd266e145565bef2edd9de53ae77acc866814ec83" + sha256 cellar: :any, arm64_sonoma: "da333412a3df6fc42a56de17352007250eed4c7240fe3fd245dc195c450fc711" + sha256 cellar: :any, arm64_ventura: "f6519f1b91d2139e045d7d0b116033d25c7630ff33c852074eeed4ad12b2a633" + sha256 cellar: :any, arm64_monterey: "fb8a1cd97e77f84a4eddbd2c474bec4a442cd228fee2dacbd8d2f6de0f068c5e" + sha256 cellar: :any, sonoma: "168b65eff4e5fbca14f90676b704bbd0d114ca78fe82cf23ab5f03328af62fa4" + sha256 cellar: :any, ventura: "c3851e3ff4ae5a5dfe206f10604cb9406731d612fb55a7940b7e1e1b92492115" + sha256 cellar: :any, monterey: "596299bbce0f5c721dda34ec3e542291009850dfbc9b765ca8d33e4483926265" + sha256 arm64_linux: "d3698cd1399af9fe64ce9f4cc8f68350b12383166dd7c528da05a1570e081324" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d22fe6d563b5cbc5b8addbe26239cae3ba3fda6c0f1799fac4587af971a8a41b" + end + + depends_on "libpng" + depends_on "xorgrgb" + + def install + # Fix RGBTXT ref to use Homebrew share path + inreplace "Makefile", "/usr/share/X11/rgb.txt", "#{HOMEBREW_PREFIX}/share/X11/rgb.txt" + + system "make", "install", "DESTDIR=#{prefix}", "prefix=/", "CC=#{ENV.cc}" + end + + test do + cp test_fixtures("test.png"), "test.png" + system bin/"sng", "test.png" + assert_includes File.read("test.sng"), "width: 8; height: 8; bitdepth: 8;" + end +end diff --git a/Formula/s/sngrep.rb b/Formula/s/sngrep.rb new file mode 100644 index 0000000000000..d3b5bd73c0a43 --- /dev/null +++ b/Formula/s/sngrep.rb @@ -0,0 +1,46 @@ +class Sngrep < Formula + desc "Command-line tool for displaying SIP calls message flows" + homepage "https://github.com/irontec/sngrep" + url "https://github.com/irontec/sngrep/releases/download/v1.8.3/sngrep-1.8.3.tar.gz" + sha256 "794224f4cd08978a6115a767e9945f756fdf7cbc7c1a34eabca293e0293b21b8" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + + bottle do + sha256 cellar: :any, arm64_tahoe: "061db6e59e8b46db369feba26f33ad4d50082baf87580affeff0bdfbcb42f566" + sha256 cellar: :any, arm64_sequoia: "7cff7081ff7899992673f68269bfafa11e62a143b39c9de3ad9731136ae72123" + sha256 cellar: :any, arm64_sonoma: "d128fa1a31902c76abfb557e18552670b54087cec17a9a32d7599ba93ad251f8" + sha256 sonoma: "dd3ceac2f13d770f905b245f456f553fc6d0aa3335cb1513f28efa21068fff91" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5a86128da8d87abf69575b2dbd298c2e2a75e3ccbe88b14624df356e723bbe6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ab8d1e61cb58f5ab80ee2e230da31057941225c29cf867d176ca70ef3123da2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + + depends_on "ncurses" + depends_on "openssl@3" + + uses_from_macos "libpcap" + + on_linux do + depends_on "libgcrypt" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV.append_to_cflags "-I#{Formula["ncurses"].opt_include}/ncursesw" if OS.linux? + + system "./bootstrap.sh" + system "./configure", "--disable-silent-rules", + "--with-openssl", + *std_configure_args + system "make", "install" + end + + test do + system bin/"sngrep", "-NI", test_fixtures("test.pcap") + end +end diff --git a/Formula/s/sniffer.rb b/Formula/s/sniffer.rb new file mode 100644 index 0000000000000..69157ee996653 --- /dev/null +++ b/Formula/s/sniffer.rb @@ -0,0 +1,30 @@ +class Sniffer < Formula + desc "Modern alternative network traffic sniffer" + homepage "https://github.com/chenjiandongx/sniffer" + url "https://github.com/chenjiandongx/sniffer/archive/refs/tags/v0.6.3.tar.gz" + sha256 "c8eee0fb34422a014811306b9b2d2d149c469b3a0c515f79bfa516bbd2f56979" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1913f84c2049d323c1a00351af8c08f8e37583e014fbb4e83f30f95be7cdecc4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "02cf38bfcafd1048f1be0a5fdfa884f604985f365a520a766a59b4ce5e6ba09c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f1625ba44c2921e587efb6fa71bf456f5e41c93f830c4c0a01211d43ed10ddd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aec4de8c491266d76a362e7f5f5851d339514b261d80cd305dda0260c8a36a7e" + sha256 cellar: :any_skip_relocation, sonoma: "336a7007da692ead0a69480e2086f7a16e275a1e0d2241edf9ca386d055e9e94" + sha256 cellar: :any_skip_relocation, ventura: "1c672efa51414608c7bb0e4e05414f826747dc0d48901e83189ca443a148112f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5165aedae90cd16a953bb9ce088139f2bf355d53db4567fe0b5b66c360754bab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "355872769c22b29aab4af16277847c47cb00fe4965ab90675cd523c55b504e66" + end + + depends_on "go" => :build + + uses_from_macos "libpcap" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "lo", shell_output("#{bin}/sniffer -l") + end +end diff --git a/Formula/s/sniffglue.rb b/Formula/s/sniffglue.rb new file mode 100644 index 0000000000000..ebd9014fe8ed6 --- /dev/null +++ b/Formula/s/sniffglue.rb @@ -0,0 +1,48 @@ +class Sniffglue < Formula + desc "Secure multithreaded packet sniffer" + homepage "https://github.com/kpcyrd/sniffglue" + url "https://github.com/kpcyrd/sniffglue/archive/refs/tags/v0.16.1.tar.gz" + sha256 "f30b31861b07160b4efe23eda996491aaf885037d6907227d2230cd0e7db3265" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b45c1ef8b0dd3da8de07cb373db7d60a8963466af4fe2c1998301aa121c1c3b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d817e24ad305538cbcca6238e2107669e9491537211b9ecf57c85056d93a6755" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e1a2a6038c16babfddc8abffe98bab38620bb7f94a1cb156992d4ab667a16313" + sha256 cellar: :any_skip_relocation, arm64_ventura: "56da20d0f884e5d65f47710f07b161811f899e914a02444f25013de4318280dc" + sha256 cellar: :any_skip_relocation, sonoma: "3e384b4c3f1cec37f8bfc05895374176b0653d23da223e32fe8911c896509736" + sha256 cellar: :any_skip_relocation, ventura: "c02d4c036be412e02824d1fd6dececfab12e47b70e0030aca18a26ebac05d31d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2c11e8addb595af6b63ed633911aaeaddf6f373bb4ad43870fc0c1739858d34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "975e2e1aa4e743d501b15ab83d7af6360d5d0ec2335051d2719ad817c56c6ac6" + end + + depends_on "rust" => :build + depends_on "scdoc" => :build + + uses_from_macos "libpcap" + + on_linux do + depends_on "libseccomp" + end + + def install + system "cargo", "install", *std_cargo_args + system "make", "docs" + + etc.install "sniffglue.conf" + man1.install "docs/sniffglue.1" + + generate_completions_from_executable(bin/"sniffglue", "--gen-completions") + end + + test do + resource "homebrew-testdata" do + url "https://github.com/kpcyrd/sniffglue/raw/163ca299bab711fb0082de216d07d7089c176de6/pcaps/SkypeIRC.pcap" + sha256 "bac79a9c3413637f871193589d848697af895b7f2700d949022224d59aa6830f" + end + + testpath.install resource("homebrew-testdata") + system bin/"sniffglue", "-r", "SkypeIRC.pcap" + end +end diff --git a/Formula/s/sniffnet.rb b/Formula/s/sniffnet.rb new file mode 100644 index 0000000000000..2799f9a707085 --- /dev/null +++ b/Formula/s/sniffnet.rb @@ -0,0 +1,41 @@ +class Sniffnet < Formula + desc "Cross-platform application to monitor your network traffic" + homepage "https://sniffnet.net/" + url "https://github.com/GyulyVGC/sniffnet/archive/refs/tags/v1.4.1.tar.gz" + sha256 "920ad7aae75af8bdeed501eb726e9b97d0c07b077d29c2a4033b7ad7c45d9b4d" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/GyulyVGC/sniffnet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "df100e7607ff41c624db7d931183a9e9ad9acd19a478beb34d61de1dc988f630" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0659849312b257c8ca607aac43a8e660c9b313e2d363d5e74a7361b0333a3284" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcce0cc31651fddc6cd043d11ae3ae6003c69ed3890afd0a1671bf561bbeca2d" + sha256 cellar: :any_skip_relocation, sonoma: "9954528f8e520f8958b4122da7d45ae4a9670f734699d04e37368040553d0ee2" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a9226366e1f55a03c8a6a7b950aa275909412a7f639198e64e77ad8adecef1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7662a1c343ccacf72b5a3d78db8d8cfcb194dfda8403eafb96b188f0ae415a6a" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "libpcap" + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # sniffet is a GUI application + pid = spawn bin/"sniffnet" + sleep 1 + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/snobol4.rb b/Formula/s/snobol4.rb new file mode 100644 index 0000000000000..80dbddeb5a404 --- /dev/null +++ b/Formula/s/snobol4.rb @@ -0,0 +1,84 @@ +class Snobol4 < Formula + desc "String oriented and symbolic programming language" + homepage "https://www.regressive.org/snobol4/" + url "https://ftp.regressive.org/snobol/snobol4-2.3.3.tar.gz" + sha256 "bfd53071d69283776f5b2764f7865d354b89d372569854a18878e59f57388ed2" + license "BSD-2-Clause" + + livecheck do + url "https://ftp.regressive.org/snobol/" + regex(/href=.*?snobol4[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "76b3222469613ba6e90653854907660b1b13724b1a2920efe6893cbfb1f7e968" + sha256 arm64_sequoia: "d628d4ea0897d407f1b244dc75fb8168b93d77b1de0c862200acfba011096009" + sha256 arm64_sonoma: "b3f7a50e01ebddadfe570f4e13a630898a86e388e65ac4e2cad8e88b268b3d1e" + sha256 arm64_ventura: "a382d391551c2bf3462b47c2214c0d4bd7f79fbc90b46494a6bfa13fc60ea825" + sha256 sonoma: "b6eb99a66c91dee6b0de92822663111e954207148a3ff26f7e5c7460d17ddc09" + sha256 ventura: "677075a50ad434850c41aa511e5382a8306acc3ad8a65a386e5105463f96fff7" + sha256 arm64_linux: "94b2fcd9d8c0e566448129cd582b82bbe03bab0f1c2e3e15fa60e6c6540739a9" + sha256 x86_64_linux: "0cf89fdce929dfabbed1e366a5d85e7206adc6b520bbecec8950259b505b1c04" + end + + depends_on "openssl@3" + + uses_from_macos "m4" => :build + uses_from_macos "libffi" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "readline" + end + + conflicts_with "sdb", because: "both install `sdb` binaries" + + def install + ENV.append_to_cflags "-I#{MacOS.sdk_path_if_needed}/usr/include/ffi" if OS.mac? + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + ENV.deparallelize + # avoid running benchmark: + system "make", "install_notiming" + end + + test do + # Verify modules build, test DBM. + # NOTE! 1960's language! -include, comment, and labels (fail, end) + # must all be in first column + testfile = testpath/"test.sno" + dbmfile = testpath/"test.dbm" + (testpath/"test.sno").write <<~EOS + -include 'digest.sno' + -include 'dirs.sno' + -include 'ezio.sno' + -include 'ffi.sno' + -include 'fork.sno' + -include 'ndbm.sno' + -include 'logic.sno' + -include 'random.sno' + -include 'sprintf.sno' + -include 'sqlite3.sno' + -include 'stat.sno' + -include 'zlib.sno' + * DBM test + t = 'dbm' + k = '🍺' + v = '🙂' + fn = '#{dbmfile}' + h1 = dbm_open(fn, 'cw') :f(fail) + dbm_store(h1, k, v) :f(fail) + dbm_close(h1) :f(fail) + h2 = dbm_open(fn, 'r') :f(fail) + v2 = dbm_fetch(h2, k) :f(fail) + ident(v, v2) :f(fail) + * more tests here? (set t to test name before each test) + output = 'OK' + :(end) + fail output = t ' test failed at ' &LASTLINE + &code = 1 + end + EOS + assert_match "OK", shell_output("#{bin}/snobol4 #{testfile}") + end +end diff --git a/Formula/s/snooze.rb b/Formula/s/snooze.rb new file mode 100644 index 0000000000000..e4d71fc0dd31b --- /dev/null +++ b/Formula/s/snooze.rb @@ -0,0 +1,24 @@ +class Snooze < Formula + desc "Run a command at a particular time" + homepage "https://github.com/leahneukirchen/snooze" + url "https://github.com/leahneukirchen/snooze/archive/refs/tags/v0.5.1.tar.gz" + sha256 "abb0df288e8fe03ae25453d5f0b723b03a03bcc7afa41b9bec540a7a11a9f93e" + license :public_domain + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b939563950d008b7b55c180cfbca14a881ec02bea69c305d52b6ae9beaa572a2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a242f88d5027b13edbaf3aa5bada7121f8bbe239dcb2aa4200fbb277d017fcd9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "574501024e100924970d083d8e18c99ac857a491513e5c5a3a2ac7328e29b626" + sha256 cellar: :any_skip_relocation, sonoma: "fbeda0b945fd00cd421ff125ad342fde3d205a00251a263ffca5acbc332fe4e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "71a32859378d3d23ceed3b0174af3fbbcbffc727acb2dc191507e2229dc864bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1a636a409a86b9d904cf1d8a5e8aa9fc7ee94fc2015308daf907413200e8f63" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match "T00:00:00", shell_output("#{bin}/snooze -n") + end +end diff --git a/Formula/s/snort.rb b/Formula/s/snort.rb new file mode 100644 index 0000000000000..2e1f978db703e --- /dev/null +++ b/Formula/s/snort.rb @@ -0,0 +1,72 @@ +class Snort < Formula + desc "Flexible Network Intrusion Detection System" + homepage "https://www.snort.org" + url "https://github.com/snort3/snort3/archive/refs/tags/3.9.6.0.tar.gz" + mirror "https://fossies.org/linux/misc/snort3-3.9.6.0.tar.gz" + sha256 "2335678bc5ff4f876dcdb6985407a5312b0f3bb470da29e2926f57f942ce3b94" + license "GPL-2.0-only" + head "https://github.com/snort3/snort3.git", branch: "master" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "65fd8262f1ac3eae7cdf85a9e24a755860adde675c59e963505373895fd45946" + sha256 cellar: :any, arm64_sequoia: "13d6e20c6614326df0bf59cba4b88b7f79f520885ef9c78eb0dd0eba30f47bde" + sha256 cellar: :any, arm64_sonoma: "591b16a150fdd9946b65e9486c209e3d5c80721e6ce256b813a48e36d2c8796c" + sha256 cellar: :any, sonoma: "e63c2d35db9be41c6b5365db62521f7a94ef6e019082a761efa0700af0446b98" + sha256 cellar: :any_skip_relocation, arm64_linux: "85637efaa47f2d6d16e7bc2262df25a7e09930b5287f2ebd85b675f68e9bc86c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc965f0ff111644a489558d03eebc1227e58f94f647da8409239cfa0b991f1f0" + end + + depends_on "cmake" => :build + depends_on "flex" => :build # need flex>=2.6.0 + depends_on "pkgconf" => :build + depends_on "daq" + depends_on "hwloc" + depends_on "jemalloc" + depends_on "libdnet" + depends_on "libpcap" # macOS version segfaults + depends_on "luajit" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "vectorscan" + depends_on "xz" # for lzma.h + + uses_from_macos "zlib" + + on_linux do + depends_on "libunwind" + end + + def install + # These flags are not needed for LuaJIT 2.1 (Ref: https://luajit.org/install.html). + # On Apple ARM, building with flags results in broken binaries and they need to be removed. + inreplace "cmake/FindLuaJIT.cmake", " -pagezero_size 10000 -image_base 100000000\"", "\"" + + # https://github.com/snort3/snort3/pull/370 + inreplace "src/actions/actions_module.h", "#include ", "#include \n#include " + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DENABLE_JEMALLOC=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + For snort to be functional, you need to update the permissions for /dev/bpf* + so that they can be read by non-root users. This can be done manually using: + sudo chmod o+r /dev/bpf* + or you could create a startup item to do this for you. + EOS + end + + test do + assert_match "Version #{version}", shell_output("#{bin}/snort -V") + end +end diff --git a/Formula/s/snow.rb b/Formula/s/snow.rb new file mode 100644 index 0000000000000..e593afaa1e3ab --- /dev/null +++ b/Formula/s/snow.rb @@ -0,0 +1,52 @@ +class Snow < Formula + desc "Whitespace steganography: coded messages using whitespace" + homepage "https://darkside.com.au/snow/" + url "https://darkside.com.au/snow/snow-20130616.tar.gz" + mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/snow-20130616.tar.gz" + sha256 "c0b71aa74ed628d121f81b1cd4ae07c2842c41cfbdf639b50291fc527c213865" + license "Apache-2.0" + + livecheck do + url :homepage + regex(/href=.*?snow[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "53d8451eea7082ead9453a403e836a5287637df3195e25391373df828dda5673" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a2fc6f30db002d270ad215e53e38a9178038ea9b05a19121dbc4ddd8975282f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc3cd801f7bd8ab8d936d3ce543de987c9d4536bebfb2c8d67900c6cb866eb47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b680baf95d8ce110d6afae56c1c693da05a42aa63fd37231a2219ba8b46dc842" + sha256 cellar: :any_skip_relocation, arm64_monterey: "58be06402675c829fee62b121da1963c980729658fe428deae9cdb2c8b77b6d6" + sha256 cellar: :any_skip_relocation, sonoma: "ccadf2612c1c8b435711525c30c9d38442f88b4311fa37208d418ff7b10d2fc5" + sha256 cellar: :any_skip_relocation, ventura: "281a2edf75fccb88629a899903bfed0a22262d730edbfe96b9a5dc43a6c7acf5" + sha256 cellar: :any_skip_relocation, monterey: "ea7e0358dfeecbd209924fc07a7e28493282771f7a6f93b994942d5c911465dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "633bc51f68c437938555787c7c8303298a1faa6811c166bfeda7c7046ccfb614" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a378fd9d38675c5924d6fa4a91283e8bb0fcc4e92695c3b222dd55d186ba8ba9" + end + + conflicts_with "snowflake-cli", because: "both install `snow` binaries" + + def install + # main.c:180:10: error: call to undeclared library function 'strcmp' with type 'int (const char *, const char *)' + # main.c:180:10: note: include the header or explicitly provide a declaration for 'strcmp' + inreplace "main.c", + "#include \"snow.h\"\n", + "#include \"snow.h\"\n#include \n" + + system "make" + bin.install "snow" + man1.install "snow.1" + end + + test do + touch "in.txt" + touch "out.txt" + system bin/"snow", "-C", "-m", "'Secrets Abound Here'", "-p", + "'hello world'", "in.txt", "out.txt" + # The below should get the response 'Secrets Abound Here' when testing. + system bin/"snow", "-C", "-p", "'hello world'", "out.txt" + end +end diff --git a/Formula/s/snowball.rb b/Formula/s/snowball.rb new file mode 100644 index 0000000000000..cf625c559a8b9 --- /dev/null +++ b/Formula/s/snowball.rb @@ -0,0 +1,35 @@ +class Snowball < Formula + desc "Stemming algorithms" + homepage "https://snowballstem.org" + url "https://github.com/snowballstem/snowball/archive/refs/tags/v3.0.1.tar.gz" + sha256 "80ac10ce40dc4fcfbfed8d085c457b5613da0e86a73611a3d5527d044a142d60" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ab44ad284224fc7948a61026b26c2909ca0c95132c0476a82d86b3d7d0a64ab2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00c79db6c8ba404a5ad086c5e50a7102d0df266ee3fb3b5deafe4ed8e7184c71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d7f77bad2cee9519cbe39492c5234455b01f1de41381279e8d63d6762f4c2f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "42cd2f37f93d279ad348fb7933739db82bdbb2602d1f7e1f40b6b0113dd4dc3a" + sha256 cellar: :any_skip_relocation, sonoma: "58eadab9b1887a26cb95506a264f0e53bf9a23d9d1cf6fe589533c8f20daa7c2" + sha256 cellar: :any_skip_relocation, ventura: "cd975136128f07351d331ec0c05bcc7bae659059e9f7a42c1c19d3d03d88a751" + sha256 cellar: :any_skip_relocation, arm64_linux: "a90617188624e914be73ec75078cebac9e2ee7458f0006225dba41da4fd2e431" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b8fd0e7fee01a520f36dfd8631171bb7fcfab8ddccb8ed9c37b069f338b6ca9" + end + + def install + system "make" + + lib.install "libstemmer.a" + include.install Dir["include/*"] + pkgshare.install "examples" + end + + test do + (testpath/"test.txt").write("connection") + cp pkgshare/"examples/stemwords.c", testpath + system ENV.cc, "stemwords.c", "-L#{lib}", "-lstemmer", "-o", "test" + assert_equal "connect\n", shell_output("./test -i test.txt") + end +end diff --git a/Formula/s/snowflake-cli.rb b/Formula/s/snowflake-cli.rb new file mode 100644 index 0000000000000..8b08e0a467462 --- /dev/null +++ b/Formula/s/snowflake-cli.rb @@ -0,0 +1,302 @@ +class SnowflakeCli < Formula + include Language::Python::Virtualenv + + desc "CLI for snowflake" + homepage "https://docs.snowflake.com/developer-guide/snowflake-cli/index" + url "https://files.pythonhosted.org/packages/a6/83/84a7372e08b8bd058b463646bad343313ec839828e9bf47e44d2fe5a4b1f/snowflake_cli-3.13.0.tar.gz" + sha256 "602be637aa34bcaa38bdce8c4676590c7ffba61f09f3e78c7c3e01d7c8e37a55" + license "Apache-2.0" + head "https://github.com/snowflakedb/snowflake-cli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "727dbc165311e030d1d1f42a2e7fb116406ff0a6cca267a81a1e98b29a0b5884" + sha256 cellar: :any, arm64_sequoia: "c158c087df069c10904210f3a31b2587d10b3ec2cbc16521cc216bd20020d91b" + sha256 cellar: :any, arm64_sonoma: "b703581557c6f00917a7845429df7e6f2e55ff1e33f77b9435fd43be3f278ead" + sha256 cellar: :any, sonoma: "26fb0405f3bd160ec22ff8244cf356253e9f89755576daf14c937e3150a429aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "5063bed4c0a07b93b4b711f7752030600d0e0395fa7eb99a4dc2f92c9ba842f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aac642a0681116eaaf284a72e663c8dc5165c686491e1347a43a9e3e6eba6319" + end + + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "libyaml" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + conflicts_with "snow", because: "both install `snow` binaries" + + pypi_packages exclude_packages: %w[certifi cryptography pydantic-core], + extra_packages: "snowflake-core" + + # `pydantic` is manually updated to support Python 3.14 + # Issue ref: https://github.com/snowflakedb/snowflake-cli/issues/2669 + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "asn1crypto" do + url "https://files.pythonhosted.org/packages/de/cf/d547feed25b5244fcb9392e288ff9fdc3280b10260362fc45d37a798a6ee/asn1crypto-1.5.1.tar.gz" + sha256 "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/08/d2/e508e5f42dc1c8a7412f5170751e626a18ed32c6e95c5df30bde6c5addf1/boto3-1.40.64.tar.gz" + sha256 "b92d6961c352f2bb8710c9892557d4b0e11258b70967d4e740e1c97375bcd779" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/c1/15/109cb31c156a64bfaf4c809d2638fd95d8ba39b6deb7f1d0526c05257fd7/botocore-1.40.64.tar.gz" + sha256 "a13af4009f6912eafe32108f6fa584fb26e24375149836c2bcaaaaec9a7a9e58" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/c0/89/37df0b71473153574a5cdef8f242de422a0f5d26d7a9e231e6f169b4ad14/gitpython-3.1.44.tar.gz" + sha256 "c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269" + end + + resource "id" do + url "https://files.pythonhosted.org/packages/22/11/102da08f88412d875fa2f1a9a469ff7ad4c874b0ca6fed0048fe385bdb3d/id-1.5.0.tar.gz" + sha256 "292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz" + sha256 "3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz" + sha256 "c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "requirements-parser" do + url "https://files.pythonhosted.org/packages/95/96/fb6dbfebb524d5601d359a47c78fe7ba1eef90fc4096404aa60c9a906fbb/requirements_parser-0.13.0.tar.gz" + sha256 "0843119ca2cb2331de4eb31b10d70462e39ace698fd660a915c247d2301a4418" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/8d/d2/ec1acaaff45caed5c2dedb33b67055ba9d4e96b091094df90762e60135fe/setuptools-80.8.0.tar.gz" + sha256 "49f7af965996f26d43c8ae34539c8d99c5042fbff34302ea151eaa9c207cd257" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "snowflake-connector-python" do + url "https://files.pythonhosted.org/packages/25/df/41fe26b68801e3d59653a5dc7ce87a92e9d967dcad7b59b035b8c9804815/snowflake_connector_python-3.18.0.tar.gz" + sha256 "41a46eb9824574c5f8068e3ed5c02a2dc0a733ed08ee81fa1fb3dd0ebe921728" + end + + resource "snowflake-core" do + url "https://files.pythonhosted.org/packages/a1/72/3daea26f941512e2a2d18eda62eb2fc67ffc1be33027b1e74f4c4430a2e2/snowflake_core-1.7.0.tar.gz" + sha256 "8655a94c211ae04d1d803dbc876249de6d3f8021cc5738d689aea842d1b66a7f" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/dd/82/f4bfed3bc18c6ebd6f828320811bbe4098f92a31adf4040bee59c4ae02ea/typer-0.17.3.tar.gz" + sha256 "0c600503d472bcf98d29914d4dcd67f80c24cc245395e2e00ba3603c9332e8ba" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "jeepney" do + on_linux do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + end + + resource "secretstorage" do + on_linux do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + end + + def install + virtualenv_install_with_resources + # `shellingham` auto-detection doesn't work in Homebrew CI build environment so + # disable it to allow `typer` to use argument as shell for completions + # Ref: https://typer.tiangolo.com/features/#user-friendly-cli-apps + ENV["_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION"] = "1" + generate_completions_from_executable(bin/"snow", "--show-completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/snow --version") + assert_match '"key": "SNOWFLAKE_HOME"', shell_output("#{bin}/snow --info") + assert_match "No data", shell_output("#{bin}/snow connection list") + end +end diff --git a/Formula/s/snowflake.rb b/Formula/s/snowflake.rb new file mode 100644 index 0000000000000..02d1d9768ba11 --- /dev/null +++ b/Formula/s/snowflake.rb @@ -0,0 +1,38 @@ +class Snowflake < Formula + desc "Pluggable Transport using WebRTC, inspired by Flashproxy" + homepage "https://www.torproject.org" + url "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v2.11.0/snowflake-v2.11.0.tar.gz" + sha256 "1362a8d7e848beea63bf4d7e6b5541df92f2859b83daaf4260afef131556ac57" + license "BSD-3-Clause" + head "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5920f2c958a7b2b3ffa409a3edd139fba2a8e7e6290846918e447ca5e725124e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bbfe22d4e22f7e8bc1f433a6d9ec4e1026c8ae55eb891c2ba2257ffd98f11bea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "710d7b91f534072122a147135f59e3e8f8af0acebda38a920d94511c9c4566ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5bbd8ea59d3c04b72fd131bad9da3a15ce47c007cf20b4994f201fb85f4be8ea" + sha256 cellar: :any_skip_relocation, sonoma: "664910374fec0499630a0c149725965d955385fc9f31f024d9b916d474b41d29" + sha256 cellar: :any_skip_relocation, ventura: "1cbfef989c97ae01dc78d09692cb3157f8c7fa780bd576e9b23de4c159e0b5a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "997eec71835cafd9b1f1c1abd0448ad5e817b5315c26fd8b3d41c5d0fe93a2d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cacc65f14ee6603e2ebcc0a107b814648554a2d14657ba69127116f22999e784" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:, output: bin/"snowflake-broker"), "./broker" + system "go", "build", *std_go_args(ldflags:, output: bin/"snowflake-client"), "./client" + system "go", "build", *std_go_args(ldflags:, output: bin/"snowflake-proxy"), "./proxy" + system "go", "build", *std_go_args(ldflags:, output: bin/"snowflake-server"), "./server" + + man1.install "doc/snowflake-client.1" + man1.install "doc/snowflake-proxy.1" + end + + test do + assert_match "open /usr/share/tor/geoip: no such file", shell_output("#{bin}/snowflake-broker 2>&1", 1) + assert_match "ENV-ERROR no TOR_PT_MANAGED_TRANSPORT_VER", shell_output("#{bin}/snowflake-client 2>&1", 1) + assert_match "the --acme-hostnames option is required", shell_output("#{bin}/snowflake-server 2>&1", 1) + end +end diff --git a/Formula/s/snownews.rb b/Formula/s/snownews.rb new file mode 100644 index 0000000000000..e98bfb16903cf --- /dev/null +++ b/Formula/s/snownews.rb @@ -0,0 +1,46 @@ +class Snownews < Formula + desc "Text mode RSS newsreader" + homepage "https://sourceforge.net/projects/snownews/" + url "https://downloads.sourceforge.net/project/snownews/snownews-1.11.tar.gz" + sha256 "afd4db7c770f461a49e78bc36e97711f3066097b485319227e313ba253902467" + license "GPL-3.0-only" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "13ac8a1e7efb23d95253194a128db8a74d0fdc0b50c4a38d96e525cc09ebe3d2" + sha256 arm64_sequoia: "0a953106b529951a0e5900c9819c2df6ef3b26822fa3ce924c333546f9264734" + sha256 arm64_sonoma: "aeeabd29b3c85814440dad193c88e96de8bbdc802e38f5b6fc998425d90dfc1d" + sha256 arm64_ventura: "ab994b373b5e6a36f4c05d128dd2b4aff607a093d4bedbda6e0c3a38e63de933" + sha256 arm64_monterey: "5e86f2dcc050b2bcb052eb43a4d8e146ff2f226d5c62476e356720c3b38484ff" + sha256 arm64_big_sur: "62bf089ff62731aff7786cbc262f644d8c1e6f9027e30c3d23e515281c2343c7" + sha256 sonoma: "0c0a56409995bb878cb4b50aa2b99f5415adba2e96899bc910cbfa0a64a68efc" + sha256 ventura: "35c17b0d8809918731e6f942a4ffabacf6f765bc0c28f0349cfde4fdccc76e01" + sha256 monterey: "84d7beb8653c713161180127550d58c277ccdc9253941fd1bce3bbb2d86419a2" + sha256 big_sur: "36c1b6a9f496f530d31eb71cb50c74f57075f73e4a5a101e2c81be5bb9698940" + sha256 arm64_linux: "dcd9bbda7584163d13f96f37ae60f89995110a90828c3864e02969da1f82b139" + sha256 x86_64_linux: "dfd5d4c92583abd0e7b299f6ac41eb728e814f6aba8a7ebf9fca9e8392d80f9e" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "ncurses" + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install", "CC=#{ENV.cc}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/snownews --help") + end +end diff --git a/Formula/s/sntop.rb b/Formula/s/sntop.rb new file mode 100644 index 0000000000000..5281b38c18848 --- /dev/null +++ b/Formula/s/sntop.rb @@ -0,0 +1,60 @@ +class Sntop < Formula + desc "Curses-based utility that polls hosts to determine connectivity" + homepage "https://sntop.sourceforge.net/" + url "https://downloads.sourceforge.net/project/sntop/sntop/1.4.3/sntop-1.4.3.tar.gz" + sha256 "943a5af1905c3ae7ead064e531cde6e9b3dc82598bbda26ed4a43788d81d6d89" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/sntop[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "e40298eeb9619591443c8ba0e977cc63a5d61a2508e4d3695dd0dc8292eb9f34" + sha256 arm64_sequoia: "f815f00571ebdc127b745bd5e895cc486b35b3a38380c3be316ec453c47c0e62" + sha256 arm64_sonoma: "40fa74f055bb892c9e7b31a1269ab2d0cda8f13fd214132a79fc2c04944e29dc" + sha256 arm64_ventura: "b482ea74af9def4d942033c23ddacc43c16935bcd7e9094506e0008e8c69eed0" + sha256 arm64_monterey: "88c1bf529d00acd5093a911407aae68da341df753371f81d319862e9bafe2407" + sha256 arm64_big_sur: "0674ad1a5387fadc27e9132d36bef2178e3ea821e9e05fadcc3a4d97b90a5758" + sha256 sonoma: "f671d2b759a74c2cb3957d15df12b117c0c8823cb8414375c8c54c55ebdd887b" + sha256 ventura: "20498a6ce6ef87de7400188bcbc095b7ea0fb1e2c90e02c35042b324835110ab" + sha256 monterey: "339487a2777504f99d3a3d9b9ae4f9d10de35d4e694a1708784e55ca2c586e09" + sha256 big_sur: "ea8df8c0dbf95ed5686009df6bd7742d6f4a4a2e4c6132a02e6273ccfd21cc67" + sha256 catalina: "886a981f2c95a8a17d4bfb44c27d99cde66faeb4f2942d1c43757e8d702509c6" + sha256 arm64_linux: "11c8dd26262b37cddb345a83ffa42e900d813158ed2bbca49586ad042f2bcb29" + sha256 x86_64_linux: "15e6f3f42a8d6afa68d48744f2673142104a0cfb84daff23c6706db8adbe6536" + end + + depends_on "fping" + + uses_from_macos "ncurses" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--mandir=#{man}", + "--sysconfdir=#{etc}", + *std_configure_args + etc.mkpath + bin.mkpath + man1.mkpath + system "make", "install" + end + + def caveats + <<~EOS + sntop uses fping by default and fping can only be run by root by default. + You can run `sudo sntop` (or `sntop -p` which uses standard ping). + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + system bin/"sntop", "--version" + end +end diff --git a/Formula/s/snyk-cli.rb b/Formula/s/snyk-cli.rb new file mode 100644 index 0000000000000..9098337361e51 --- /dev/null +++ b/Formula/s/snyk-cli.rb @@ -0,0 +1,34 @@ +class SnykCli < Formula + desc "Scans and monitors projects for security vulnerabilities" + homepage "https://snyk.io" + url "https://registry.npmjs.org/snyk/-/snyk-1.1300.2.tgz" + sha256 "494da90471f6951ccaaaf0f9167b6396518f065e84127aeb3302195b1df44665" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8043ef8a0155e82d2491ab025fce49eef006068096c61a1c09f67c1dda5024ce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8043ef8a0155e82d2491ab025fce49eef006068096c61a1c09f67c1dda5024ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8043ef8a0155e82d2491ab025fce49eef006068096c61a1c09f67c1dda5024ce" + sha256 cellar: :any_skip_relocation, sonoma: "4501b29b90ead3765d9f4d05b952fd93e41f17866bdc83853a6c2a3ced3e3d14" + sha256 cellar: :any_skip_relocation, arm64_linux: "fabe1797a63a3a26525f539cbe909ed0a084c970189a76a4035b2c7fc7fea4e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ecd85d0e054683e4f8a7bbd4df3ea8a2732de0e64536dc2115a1fc5e12d0e0a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove x86-64 ELF binaries on incompatible platforms + # TODO: Check if these should be built from source + rm(libexec.glob("lib/node_modules/snyk/dist/cli/*.node")) if !OS.linux? || !Hardware::CPU.intel? + end + + test do + assert_match version.to_s, shell_output("#{bin}/snyk version") + + output = shell_output("#{bin}/snyk auth homebrew", 2) + assert_match "authentication failed (timeout)", output + end +end diff --git a/Formula/s/snzip.rb b/Formula/s/snzip.rb new file mode 100644 index 0000000000000..9129b5b6e5c72 --- /dev/null +++ b/Formula/s/snzip.rb @@ -0,0 +1,38 @@ +class Snzip < Formula + desc "Compression/decompression tool based on snappy" + homepage "https://github.com/kubo/snzip" + url "https://github.com/kubo/snzip/releases/download/v1.0.5/snzip-1.0.5.tar.gz" + sha256 "fbb6b816619628f385b62f44a00a1603be157fba6ed2d30de490b0c5e645bff8" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "20fc236af1233f21612b61f558645aee313eecd552817ac67866852ce8cf7a87" + sha256 cellar: :any, arm64_sequoia: "2a7ea25f4be20815a6390501b5988ed110cde832197ec37c45287ea4420b43cf" + sha256 cellar: :any, arm64_sonoma: "f2a437e1ee2269927d61f695d0a8bfcb859433c77487dc3beb0f9ec56b50d989" + sha256 cellar: :any, arm64_ventura: "661bdc7469cf8ec9c6311512507b930896e62e5b86c97ee12b2ba5ef57c34dd4" + sha256 cellar: :any, arm64_monterey: "f6e7e23067b3b7a345478140297d5eb874f3ab0d674fd1327e331ad44704c9c1" + sha256 cellar: :any, arm64_big_sur: "23f40e27a4ad634c07f15e736c6ed868ad78c780de0076c9c9d0206295f0d39f" + sha256 cellar: :any, sonoma: "1227301218adc7fbea53d8dd245fe7243b285340833fefaef0b5a5938b0c076f" + sha256 cellar: :any, ventura: "a6adec1343968056e505aea67415c4a8cd147fa82088dbc940ab1d69f9675d30" + sha256 cellar: :any, monterey: "fc6766844ef54540722dac85eb882b946db05d9db9d69fec810d77333c502224" + sha256 cellar: :any, big_sur: "60e584c91dcbc5f21a74cdeddd239a432911f99785350499873e04a7a91fcb7e" + sha256 cellar: :any, catalina: "41e8c6ce6c722fb30c57c820e2fee38d080b19332884284866b22b5584945c09" + sha256 cellar: :any_skip_relocation, arm64_linux: "1547af744396837b876bf93b86e470d1f66d8d2a2212dbc5ecc3273541e12db5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba8de3ad67c0529384b55511515d68e132f76b8b7a6da0772c62c2fde0a5a8f5" + end + + depends_on "snappy" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.out").write "test" + system bin/"snzip", "test.out" + system bin/"snzip", "-d", "test.out.sz" + end +end diff --git a/Formula/s/so.rb b/Formula/s/so.rb new file mode 100644 index 0000000000000..bb2849037067d --- /dev/null +++ b/Formula/s/so.rb @@ -0,0 +1,54 @@ +class So < Formula + desc "Terminal interface for StackOverflow" + homepage "https://github.com/samtay/so" + url "https://github.com/samtay/so/archive/refs/tags/v0.4.10.tar.gz" + sha256 "36d8bc53b9c05e242fd4c9ba8ae447fae6c4a35d8c7e071f8994a7c0f07c225d" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d106bc00111838ead6bb1875827882b2b38271384a2b5d486163f8ec355be0a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82b3ba2bd29430167b84cbc7116ca22c70679e0c6a59b340c3349ead364c0e16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4c26864040cdb083f702827d253cc9128d018f12eeeff0d4477908385c38eda3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e83c51f58acc449889bb035f202e9f0e9a4fe5b498c480c2a58e0982b93a820" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ade232aa606461f6c6a8fd543f6d9048d52f8931d4ecb952d323ea5cfcc63bd0" + sha256 cellar: :any_skip_relocation, sonoma: "ffb713476e09d5bc6930cc1b550efd65d9556103f6641e2f2ca8bd9a8d9c374f" + sha256 cellar: :any_skip_relocation, ventura: "e80a401d20434c2716eb29d1a3b80ff9647ea7b00e6797a8d35b260e4f7cf6c8" + sha256 cellar: :any_skip_relocation, monterey: "72daa345f044b21902150324f5b8240d5625c96ae25a46f4696374da30965567" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1477dceb51ed2cb6ba94b4f5755376fdaebcfe22b7301273120dede98403ce7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dff017b24e8061f4c5ea8b37e9f675d636449f6206735d130dcde4db047729b5" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # try a query + opts = "--search-engine stackexchange --limit 1 --lucky" + query = "how do I exit Vim" + env_vars = "LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 TERM=xterm" + input, _, wait_thr = Open3.popen2 "script -q /dev/null" + input.puts "stty rows 80 cols 130" + input.puts "env #{env_vars} #{bin}/so #{opts} #{query} 2>&1 > output" + sleep 3 + + # quit + input.puts "q" + sleep 2 + input.close + + # make sure it's the correct answer + assert_match ":wq", File.read("output") + ensure + Process.kill("TERM", wait_thr.pid) + end +end diff --git a/Formula/s/soapyhackrf.rb b/Formula/s/soapyhackrf.rb new file mode 100644 index 0000000000000..c4344cafa7564 --- /dev/null +++ b/Formula/s/soapyhackrf.rb @@ -0,0 +1,39 @@ +class Soapyhackrf < Formula + desc "SoapySDR HackRF module" + homepage "https://github.com/pothosware/SoapyHackRF/wiki" + url "https://github.com/pothosware/SoapyHackRF/archive/refs/tags/soapy-hackrf-0.3.4.tar.gz" + sha256 "c7a1b8aee7af9d9e11e42aa436eae8508f19775cdc8bc52e565a5d7f2e2e43ed" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9c90ca14cff4f27d529309b308ab277e65d808dc90500641162c395784efbb9e" + sha256 cellar: :any, arm64_sequoia: "8be1e7bcc5b9e130dab78d35843ae04e015dd65417fa15fc61206303605aaed4" + sha256 cellar: :any, arm64_sonoma: "d4adb509c27bb07ce14004434db28bb1061139cc012b7e7eb02a696807057204" + sha256 cellar: :any, arm64_ventura: "c05011b63cf35c0c0b4ab594809e4445f89850573ca8c47137078972c995ac2d" + sha256 cellar: :any, arm64_monterey: "3506a45c3e3d8efaf558f72dd8d2f748f1e386878cb451ae4d2fd39ddc4873f9" + sha256 cellar: :any, sonoma: "0e13b5a64f3a5038879c929a4108ac9d5d9c2804b7e949816a4645d9edfbcdef" + sha256 cellar: :any, ventura: "04e3a1b7d8dd0b7c27dd2c4f20846c88783922e8cdbdcd4da12768ade7af6373" + sha256 cellar: :any, monterey: "8d1e0b4696c0af821c08789a1dc354628c8a9afdf4752842fb99fd364c6778e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "aac2cfd5a931da22b6fa5bff2e99982da69875261ff6f2b5106f45b233294dbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8112b3fa519d4f5c319c0dfc36fff70131a54e39616bdf9378ed4625f142374" + end + + depends_on "cmake" => :build + depends_on "hackrf" + depends_on "soapysdr" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{Formula["soapysdr"].bin}/SoapySDRUtil --check=hackrf") + assert_match "Checking driver 'hackrf'... PRESENT", output + end +end diff --git a/Formula/s/soapyremote.rb b/Formula/s/soapyremote.rb new file mode 100644 index 0000000000000..518e30aed624b --- /dev/null +++ b/Formula/s/soapyremote.rb @@ -0,0 +1,36 @@ +class Soapyremote < Formula + desc "Use any Soapy SDR remotely" + homepage "https://github.com/pothosware/SoapyRemote/wiki" + url "https://github.com/pothosware/SoapyRemote/archive/refs/tags/soapy-remote-0.5.2.tar.gz" + sha256 "66a372d85c984e7279b4fdc0a7f5b0d7ba340e390bc4b8bd626a6523cd3c3c76" + license "BSL-1.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b245e94aaf094ec9511e1f0f47fcd40499db9d62d28d710e6c26d6753536e852" + sha256 cellar: :any, arm64_sequoia: "45db2916465bc4c352d69c0089f03f2fc39f1fe7c0dd193f657dd21f44b5be43" + sha256 cellar: :any, arm64_sonoma: "ffe12b4564bf9090e8d20a8befd7f1ae66783c90395052fe016f44bd0ada6343" + sha256 cellar: :any, arm64_ventura: "2bfd849620a751a566c7eea4101c31ee70b685bd220275171f5d3fa5ab615fee" + sha256 cellar: :any, arm64_monterey: "abbd8323df9212a717d9d6dbf19fdb24fd55665548bdb5bd27111c7dbd523e6f" + sha256 cellar: :any, sonoma: "2a9951c5c2f6b01200efc94ffd6f19dc8001b3051759c3a793a4e606c4f7c9d8" + sha256 cellar: :any, ventura: "812dc85d3f0eab0fbdd201c4f7520250ee8997827b0cfa721306b1170e31ff27" + sha256 cellar: :any, monterey: "668170d64a27d4de6aae24d8a9965b788e2b956eb8db5c3d3adf6807c31478ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "83938e8783f67851865ee4aaad50da21c0e6d7b33ed3cd9db8da0b786185e5be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afb465a0deb07570685ee8ce05b960f6b4159310db9403f49ef4d37d0eae0f09" + end + + depends_on "cmake" => :build + depends_on "soapysdr" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{Formula["soapysdr"].bin}/SoapySDRUtil --check=remote") + assert_match "Checking driver 'remote'... PRESENT", output + end +end diff --git a/Formula/s/soapyrtlsdr.rb b/Formula/s/soapyrtlsdr.rb new file mode 100644 index 0000000000000..75526e773ff4e --- /dev/null +++ b/Formula/s/soapyrtlsdr.rb @@ -0,0 +1,41 @@ +class Soapyrtlsdr < Formula + desc "SoapySDR RTL-SDR Support Module" + homepage "https://github.com/pothosware/SoapyRTLSDR/wiki" + url "https://github.com/pothosware/SoapyRTLSDR/archive/refs/tags/soapy-rtl-sdr-0.3.3.tar.gz" + sha256 "757c3c3bd17c5a12c7168db2f2f0fd274457e65f35e23c5ec9aec34e3ef54ece" + license "MIT" + revision 2 + head "https://github.com/pothosware/SoapyRTLSDR.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "48f1464d0739465385b31f436ae6f9ea01ce68132730976767238c830f13c318" + sha256 cellar: :any, arm64_sequoia: "76b22eaf2c71839e2f26068ed671fd7652ed7aac92b582cbc267159d0fb851ca" + sha256 cellar: :any, arm64_sonoma: "3b758a501acd8918eddee8cd29669fdbfecb4bfb1c0a1363290ff2534dce9ffe" + sha256 cellar: :any, arm64_ventura: "a2deb76bc7882fd8cdc38c11408c0228a99ae91e8e2165ccd27c4fc1aaa908ff" + sha256 cellar: :any, arm64_monterey: "2968a2967fc49780b5c5a7f0278bb38f7f13f424413389e05a42e807682e27db" + sha256 cellar: :any, sonoma: "984fedf5e1b8712bacc86a3e2fcb225233dbd751955e17f61896cdd8cb811cb5" + sha256 cellar: :any, ventura: "24c80a7bae5a8ff939c51914fd86ec146b9f8f03f274cf5c4d428ff6273d4f18" + sha256 cellar: :any, monterey: "3ab1e0c54d417347e2439daf45f6859f2669fcfbd8fa061cc18741614fc7cb2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "17be80002546fb45015241d6c2e4de81d93067637128c4137a2e21035236d6be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4169428867a8b2d9fa11b6f601c735b8c2d5ffa0f46d3289cd1d1f58dfea6dc" + end + + depends_on "cmake" => :build + depends_on "librtlsdr" + depends_on "soapysdr" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{Formula["soapysdr"].bin}/SoapySDRUtil --check=rtlsdr") + assert_match "Checking driver 'rtlsdr'... PRESENT", output + end +end diff --git a/Formula/s/soapysdr.rb b/Formula/s/soapysdr.rb new file mode 100644 index 0000000000000..e9e6251e8108a --- /dev/null +++ b/Formula/s/soapysdr.rb @@ -0,0 +1,114 @@ +class Soapysdr < Formula + desc "Vendor and platform neutral SDR support library" + homepage "https://github.com/pothosware/SoapySDR/wiki" + license "BSL-1.0" + revision 1 + head "https://github.com/pothosware/SoapySDR.git", branch: "master" + + stable do + url "https://github.com/pothosware/SoapySDR/archive/refs/tags/soapy-sdr-0.8.1.tar.gz" + sha256 "a508083875ed75d1090c24f88abef9895ad65f0f1b54e96d74094478f0c400e6" + + # Replace distutils for python 3.12+ + # https://github.com/pothosware/SoapySDR/commit/1ee5670803f89b21d84a6a84acbb578da051c119 + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 arm64_tahoe: "52ad613af98da0b017164de38b0029ec486d8c3b602735ac13dee37bd06b9ef1" + sha256 arm64_sequoia: "b370df36657b7a9948cfe87614c270397370abaa1ae524aed812378c45a01a2c" + sha256 arm64_sonoma: "813a78fda8de094ad4fc55f3639ccb2613093c3417d63f1365fbbbde2143f878" + sha256 cellar: :any, sonoma: "be69465ae0ab16f994a8fa2333a6af39dda156f57502dbdc3e1f0f4556c2f975" + sha256 arm64_linux: "fd95f81a9f8ae0308000a40b1a7bf0316b86aebeec1cf94283ccefbb0a48ec7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06d821fe8e03e9746d93d7667bbb9655d3c05ee8fa1f7764447b0c8ce36592fd" + end + + depends_on "cmake" => :build + depends_on "swig" => :build + depends_on "python@3.14" + + def python3 + "python3.14" + end + + def install + args = %W[ + -DPYTHON_EXECUTABLE=#{which(python3)} + -DSOAPY_SDR_ROOT=#{HOMEBREW_PREFIX} + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + args << "-DSOAPY_SDR_EXTVER=release" if build.stable? + + # Workaround until next release to avoid backporting multiple commits + if build.stable? + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + odie "Remove `-DCMAKE_POLICY_VERSION_MINIMUM=3.5`" if version > "0.8.1" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "Loading modules... done", shell_output("#{bin}/SoapySDRUtil --check=null") + system python3, "-c", "import SoapySDR" + end +end + +__END__ +diff --git a/python/get_python_lib.py b/python/get_python_lib.py +index 0c71652..307ab51 100644 +--- a/python/get_python_lib.py ++++ b/python/get_python_lib.py +@@ -1,19 +1,35 @@ + import os ++import pathlib + import sys +-import site +-from distutils.sysconfig import get_python_lib ++import sysconfig + +-if __name__ == '__main__': +- prefix = sys.argv[1] ++if __name__ == "__main__": ++ prefix = pathlib.Path(sys.argv[1]).resolve() + +- #ask distutils where to install the python module +- install_dir = get_python_lib(plat_specific=True, prefix=prefix) ++ # default install dir for the running Python interpreter ++ default_install_dir = pathlib.Path(sysconfig.get_path("platlib")).resolve() + +- #use sites when the prefix is already recognized ++ # if default falls under the desired prefix, we're done + try: +- paths = [p for p in site.getsitepackages() if p.startswith(prefix)] +- if len(paths) == 1: install_dir = paths[0] +- except AttributeError: pass ++ relative_install_dir = default_install_dir.relative_to(prefix) ++ except ValueError: ++ # get install dir for the specified prefix ++ # can't use the default scheme because distributions modify it ++ # newer Python versions have 'venv' scheme, use for all OSs. ++ if "venv" in sysconfig.get_scheme_names(): ++ scheme = "venv" ++ elif os.name == "nt": ++ scheme = "nt" ++ else: ++ scheme = "posix_prefix" ++ prefix_install_dir = pathlib.Path( ++ sysconfig.get_path( ++ "platlib", ++ scheme=scheme, ++ vars={"base": prefix, "platbase": prefix}, ++ ) ++ ).resolve() ++ relative_install_dir = prefix_install_dir.relative_to(prefix) + +- #strip the prefix to return a relative path +- print(os.path.relpath(install_dir, prefix)) ++ # want a relative path for use in the build system ++ print(relative_install_dir) diff --git a/Formula/s/socat.rb b/Formula/s/socat.rb new file mode 100644 index 0000000000000..d3b2649beee99 --- /dev/null +++ b/Formula/s/socat.rb @@ -0,0 +1,36 @@ +class Socat < Formula + desc "SOcket CAT: netcat on steroids" + homepage "http://www.dest-unreach.org/socat/" + url "http://www.dest-unreach.org/socat/download/socat-1.8.0.3.tar.gz" + sha256 "a9f9eb6cfb9aa6b1b4b8fe260edbac3f2c743f294db1e362b932eb3feca37ba4" + license "GPL-2.0-only" + + livecheck do + url "http://www.dest-unreach.org/socat/download/" + regex(/href=.*?socat[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f7e7d5260c272cbd1e7fa756d05a754fc4622d0e7186b10cd9f1844752c098e0" + sha256 cellar: :any, arm64_sequoia: "4d18220d65718e33cfb0df17d6355363e631a92743de11b62e8f35c031229a45" + sha256 cellar: :any, arm64_sonoma: "590558b903c048f2b1470448332db9e614dfb957bc88792a2d6997cd6b25bbe3" + sha256 cellar: :any, sonoma: "9a11d44ff176f147b77ad3cdbc61288572f59439b522424d498a7f189cf90fbd" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b1267cd58832bc2baf9411126edd297f26ce63d87e6190e431e7908e7f6c08d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e5509b742cabf4d42fdb8af7777a32eb6ec2771e1af5b7087a34e7b5937c7f5" + end + + depends_on "openssl@3" + + def install + # NOTE: readline must be disabled as the license is incompatible with GPL-2.0-only, + # https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility + system "./configure", "--disable-readline", *std_configure_args + system "make", "install" + end + + test do + output = pipe_output("#{bin}/socat - tcp:www.google.com:80", "GET / HTTP/1.0\r\n\r\n") + assert_match "HTTP/1.0", output.lines.first + end +end diff --git a/Formula/s/soci.rb b/Formula/s/soci.rb new file mode 100644 index 0000000000000..a872b2e3c32d0 --- /dev/null +++ b/Formula/s/soci.rb @@ -0,0 +1,63 @@ +class Soci < Formula + desc "Database access library for C++" + homepage "https://soci.sourceforge.net/" + url "https://downloads.sourceforge.net/project/soci/soci/soci-4.1.2/soci-4.1.2.zip" + sha256 "ac51bf6accbfae17066c8f9535cdd7827589381117254bc9c92ea2483abfa153" + license "BSL-1.0" + + livecheck do + url :stable + regex(%r{url=.*?/soci[._-]v?(\d+(?:\.\d+)+)\.zip}i) + end + + bottle do + sha256 arm64_tahoe: "d31676b530369e902ca7ef093254b8651d457d608d5fc3f043af44f399cfac1d" + sha256 arm64_sequoia: "d743ca216502631c357219d8e9062147831f2f5de3d20e18e8707e0fda86b9fc" + sha256 arm64_sonoma: "b54a46e8519d45c7cdaf573d0744206603c4858aeaeeba7edfd982af15ae8eed" + sha256 arm64_ventura: "2816ca114d5b253b1a2910275280335e342ceaa9b5fc37b029c7b3c794e7789a" + sha256 sonoma: "b470aff1683dacca56bd59826456c815feba82c68876f937dfe5a36b4c63a10e" + sha256 ventura: "bf622c8bb7659153f4414864eb3243274c6e96ee892132ad67e918c68a4eeb63" + sha256 arm64_linux: "7bdaa9f509b7eda5c845454d1a64cd0620f400fa0bceab65273433da986a6551" + sha256 x86_64_linux: "bd1e51bb043843736d53493af5b7c84f5937a9a2bcd79b19336a69aecddb3061" + end + + depends_on "cmake" => :build + depends_on "sqlite" + + def install + args = %W[ + -DCMAKE_CXX_STANDARD=14 + -DSOCI_TESTS=OFF + -DWITH_SQLITE3=ON + -DWITH_BOOST=OFF + -DWITH_MYSQL=OFF + -DWITH_ODBC=OFF + -DWITH_ORACLE=OFF + -DWITH_POSTGRESQL=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cxx").write <<~CPP + #include "soci/soci.h" + #include "soci/empty/soci-empty.h" + #include + + using namespace soci; + std::string connectString = ""; + backend_factory const &backEnd = *soci::factory_empty(); + + int main(int argc, char* argv[]) + { + soci::session sql(backEnd, connectString); + } + CPP + system ENV.cxx, "-o", "test", "test.cxx", "-std=c++14", "-L#{lib}", "-lsoci_core", "-lsoci_empty" + system "./test" + end +end diff --git a/Formula/s/socket_vmnet.rb b/Formula/s/socket_vmnet.rb new file mode 100644 index 0000000000000..ecae0d85b2d9d --- /dev/null +++ b/Formula/s/socket_vmnet.rb @@ -0,0 +1,51 @@ +class SocketVmnet < Formula + desc "Daemon to provide vmnet.framework support for rootless QEMU" + homepage "https://github.com/lima-vm/socket_vmnet" + url "https://github.com/lima-vm/socket_vmnet/archive/refs/tags/v1.2.1.tar.gz" + sha256 "c44600fb9d4a44d533cfb5fa530264576952e887b065fd0b04aeb2500c812055" + license "Apache-2.0" + head "https://github.com/lima-vm/socket_vmnet.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e06a5733741b6d7fb8253856b306c376168fdf5a12edb95c9b349064fcae923c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abf253d7f02054144c432149d1b2804ef3253fffecbdfe0e0942803b794765fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48da13f47e4a044477b9915228d2ed3e8224acfd904ae3bca815c6e394b2863b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "276fe910d33ed629f084b717d44d32bae1d3fc3aa13216be47bb1f2798ce5d73" + sha256 cellar: :any_skip_relocation, sonoma: "effb03fcd56b6762a2031edf337c8f3261da6b16b45b081635ffe891090e184b" + sha256 cellar: :any_skip_relocation, ventura: "72fb6bd3a1d7aa852e052529697f675b216d1b718db94281fcd5062bae9afbc5" + end + + keg_only "it should not be in Homebrew's bin directory, which is often writable by a non-admin user" + + depends_on :macos + + def install + # make: skip "install.launchd" + system "make", "install.bin", "install.doc", "VERSION=#{version}", "PREFIX=#{prefix}" + end + + def post_install + (var/"run").mkpath + (var/"log/socket_vmnet").mkpath + end + + def caveats + <<~EOS + socket_vmnet requires root privileges so you will need to run + `sudo #{opt_prefix}/socket_vmnet` or `sudo brew services start socket_vmnet`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + service do + run [opt_bin/"socket_vmnet", "--vmnet-gateway=192.168.105.1", var/"run/socket_vmnet"] + run_type :immediate + error_log_path var/"log/socket_vmnet/stderr" + log_path var/"log/socket_vmnet/stdout" + require_root true + end + + test do + assert_match "bind: Address already in use", shell_output("#{opt_bin}/socket_vmnet /dev/null 2>&1", 1) + end +end diff --git a/Formula/s/sofia-sip.rb b/Formula/s/sofia-sip.rb new file mode 100644 index 0000000000000..0210cdee5581d --- /dev/null +++ b/Formula/s/sofia-sip.rb @@ -0,0 +1,47 @@ +class SofiaSip < Formula + desc "SIP User-Agent library" + homepage "https://sofia-sip.sourceforge.net/" + url "https://github.com/freeswitch/sofia-sip/archive/refs/tags/v1.13.17.tar.gz" + sha256 "daca3d961b6aa2974ad5d3be69ed011726c3e4d511b2a0d4cb6d878821a2de7a" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8df042b71a3fd4b2e8e98166acd4d8d79a59a9af94d268fdb4937d366b5d2207" + sha256 cellar: :any, arm64_sequoia: "c3097f4dedd66c5da27cea5bb43070acd0c131ffa1906cedcaed0c655600e808" + sha256 cellar: :any, arm64_sonoma: "18e0ab1bfa33dbb06af1169f0a7bdadd1e74513761079879a53eb2d23efb81df" + sha256 cellar: :any, arm64_ventura: "18af91a0199247226e541153739aafa4ba42b925f86b6519791ebed6a7c1bef5" + sha256 cellar: :any, arm64_monterey: "26956b6d518f9e505bd877f40ec86d6c15f7a5731dc73bd42ea36e6e010da833" + sha256 cellar: :any, sonoma: "7ffb64cc2545893647c8ad56787b54ab291d062905531d3464c1c6b44178ca42" + sha256 cellar: :any, ventura: "2bcd26ac1b5a44ac629ae500e8663293ab5f83057c8962c5658c5dd9e844e9b0" + sha256 cellar: :any, monterey: "97692b921a654bc7844dbd80703b57cc93635b386514f73540cc03404381692e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e89732c82a0b6672d3e7a6be83c42ccfc3544f6011b13265ff4f25ceb8fa0670" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5efd568019ef76ba684ed725b29f16e0a70f1fd08396b8dfd8660c7fd0367f8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + system "./bootstrap.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"localinfo" + system bin/"sip-date" + end +end diff --git a/Formula/s/soft-serve.rb b/Formula/s/soft-serve.rb new file mode 100644 index 0000000000000..b3a500ed017f0 --- /dev/null +++ b/Formula/s/soft-serve.rb @@ -0,0 +1,36 @@ +class SoftServe < Formula + desc "Mighty, self-hostable Git server for the command-line" + homepage "https://github.com/charmbracelet/soft-serve" + url "https://github.com/charmbracelet/soft-serve/archive/refs/tags/v0.10.0.tar.gz" + sha256 "9d679296f46840f535aa934c4c03f332507b704d7dbe165b4920e012caf20ef3" + license "MIT" + head "https://github.com/charmbracelet/soft-serve.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "29a82e5fea3132e8e8372157008e6fbf4f25bb15339110a52102a21b934dfa37" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d644e5ddd272a9e8951324a4d27465dc8762eb44e06537ae2b5bc8eea9ce2eb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2fe6013df08f946f18e3acd3cc675f69065e5d33333c19343e807f9e12a139c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5548ba229f68f6102cde4dfb0947403776305ffb6455663e5fdf3241de7bfa00" + sha256 cellar: :any_skip_relocation, sonoma: "8c30ebdc67af3d0941502b1eb8470811d8991f0ae90ca748da78bf64197b5865" + sha256 cellar: :any_skip_relocation, ventura: "9360c312cac09e4bf97fd8b043a86c41cba44c7669b2dc97e555d21e7abd9865" + sha256 cellar: :any_skip_relocation, arm64_linux: "e37a04bc1f6445844d74ccb200332eb4c870b953be561858e529fbf9873f824c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1caef12c9b0601292400cb72639377935301747602e1804cedb6ad5dd4dba1d4" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.CommitSHA=#{tap.user} -X main.CommitDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:, output: bin/"soft"), "./cmd/soft" + end + + test do + assert_match version.to_s, shell_output("#{bin}/soft --version") + + pid = spawn bin/"soft", "serve" + sleep 1 + Process.kill("TERM", pid) + assert_path_exists testpath/"data/soft-serve.db" + assert_path_exists testpath/"data/hooks/update.sample" + end +end diff --git a/Formula/s/softhsm.rb b/Formula/s/softhsm.rb new file mode 100644 index 0000000000000..a33c103205d38 --- /dev/null +++ b/Formula/s/softhsm.rb @@ -0,0 +1,70 @@ +class Softhsm < Formula + desc "Cryptographic store accessible through a PKCS#11 interface" + homepage "https://www.opendnssec.org/en/latest/softhsm/" + url "https://github.com/opendnssec/opendnssec/releases/download/2.1.14/softhsm-2.6.1.tar.gz" + sha256 "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614df475f2" + license "BSD-2-Clause" + + # We check the GitHub repo tags instead of https://dist.opendnssec.org/source/ + # since the aforementioned first-party URL has a tendency to lead to an + # `execution expired` error. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "9c4aca33b706be2a52f19a5b8b7f0c57f72508a97173574b431699d69192221e" + sha256 arm64_sequoia: "469b96859edc8a37e5e3dd99aab7c7f615dad572d7ca71576fe7efa5059244a2" + sha256 arm64_sonoma: "1b90ff62e89b9461223d118fa261551030e232218110b9366d7d097553d2e64e" + sha256 arm64_ventura: "d41a143c3d5e8ea1b7f932c41cea27dbb64341d7e28bfb4c61af68aa68499b77" + sha256 arm64_monterey: "c4912791b41e00485fc4b07abf4a9f5ffd0e75d613dd3e316b15f837e4fcc95d" + sha256 arm64_big_sur: "42a2031bb207ba74def4b64a1594c3827c6f2329995b52b7d84a16495c8d18df" + sha256 sonoma: "2883177ca802dcf95f7fe8eaf5118399eaab1c6cf1e1d3f2d8b4a6771708f2d7" + sha256 ventura: "6afda1d652a97fd5fbbe602d31d9efc675ffcc171c1978a447c864af97b8d883" + sha256 monterey: "320f44fb1c860b9953b29260ca75fa947c728db78fea1a72c6796d5ea537624d" + sha256 big_sur: "ceaa2a468dd99798cb775406dbeaf169565b35517d36b06fdd2abba6ed9d754a" + sha256 catalina: "f18b5f1c33b98f07f14233e90e412900a22d79f4b04946bdd1fdd28a04dbda01" + sha256 arm64_linux: "9fc20743d5a7ce1147876d8811fb186a22d37f7c8e55c1dbb8c07a64c08c0a0a" + sha256 x86_64_linux: "87b3b85891df32b03e9b362ed76ed435095c6c72d40d460df18986869d701ee5" + end + + head do + url "https://github.com/opendnssec/SoftHSMv2.git", branch: "develop" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + end + + depends_on "openssl@3" + + def install + system "sh", "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--sysconfdir=#{etc}/softhsm", + "--localstatedir=#{var}", + "--with-crypto-backend=openssl", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--disable-gost", + *std_configure_args + system "make", "install" + end + + def post_install + (var/"lib/softhsm/tokens").mkpath + end + + test do + (testpath/"softhsm2.conf").write("directories.tokendir = #{testpath}") + ENV["SOFTHSM2_CONF"] = "#{testpath}/softhsm2.conf" + system bin/"softhsm2-util", "--init-token", "--slot", "0", + "--label", "testing", "--so-pin", "1234", + "--pin", "1234" + system bin/"softhsm2-util", "--show-slots" + end +end diff --git a/Formula/s/solana.rb b/Formula/s/solana.rb new file mode 100644 index 0000000000000..474bbc7dff47e --- /dev/null +++ b/Formula/s/solana.rb @@ -0,0 +1,63 @@ +class Solana < Formula + desc "Web-Scale Blockchain for decentralized apps and marketplaces" + homepage "https://solanalabs.com/" + url "https://github.com/solana-labs/solana/archive/refs/tags/v1.18.20.tar.gz" + sha256 "909000aab630d73c566f1573436e6a656e80528bd57a067e79e80fbe58afcd07" + license "Apache-2.0" + version_scheme 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "587663fffc9f10da1338bd74511ee9997dab9283353b6f1cc57dc52e5dedca0f" + sha256 cellar: :any, arm64_sonoma: "dc737b2805e44862c7d71a09646f65646744ae2e720767a3b8b864f8789c1b21" + sha256 cellar: :any, arm64_ventura: "f168f86719af5f2eda08655be0ca639aa8ffa24d666af60f3c350296de8ac7a0" + sha256 cellar: :any, sonoma: "bf2095088594fdf9c04698c0b274dc4933afecfec472570a09fc05d560048ef1" + sha256 cellar: :any, ventura: "98ecdf1700ab37071fffef07518908e80168a1b77cda03a66d18880fccb66cfc" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd0f91388df10d9e4f452fa7a13070d2d8cbf0212474ad5074df19fe732bdc01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e327904665e09bb0beb049379e085cdf2c7ecfec1af44fdfd8eb60c664777a5a" + end + + deprecate! date: "2025-04-27", because: :does_not_build # and :repo_archived + disable! date: "2026-04-27", because: :does_not_build + + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + + depends_on "openssl@3" + + uses_from_macos "llvm" => :build # for libclang + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "systemd" + end + + def install + %w[ + cli + bench-streamer + faucet + keygen + log-analyzer + net-shaper + stake-accounts + tokens + watchtower + ].each do |bin| + system "cargo", "install", "--no-default-features", *std_cargo_args(path: bin) + end + + # Note; the solana-test-validator is installed as bin of the validator cargo project, rather than + # it's own dedicate project, hence why it's installed outside of the loop above + system "cargo", "install", "--no-default-features", + "--bin", "solana-test-validator", *std_cargo_args(path: "validator") + end + + test do + assert_match "Generating a new keypair", + shell_output("#{bin}/solana-keygen new --no-bip39-passphrase --no-outfile") + assert_match version.to_s, shell_output("#{bin}/solana-keygen --version") + end +end diff --git a/Formula/s/solargraph.rb b/Formula/s/solargraph.rb new file mode 100644 index 0000000000000..672e84c5c136e --- /dev/null +++ b/Formula/s/solargraph.rb @@ -0,0 +1,52 @@ +class Solargraph < Formula + desc "Ruby language server" + homepage "https://solargraph.org" + # Must be git, because solargraph.gemspec uses git ls-files + url "https://github.com/castwide/solargraph.git", + tag: "v0.57.0", + revision: "9c707a291291ef6b86a030bca80b92b4cc3de7d0" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "da52af7a6bfc1dbead71eca2fde7908c2faa2b388151aec229d40ac1a6a091bd" + sha256 cellar: :any, arm64_sequoia: "b5206d19e035110287f74c4cef7e113c70b23bf0d12087c0d74eea355d61364e" + sha256 cellar: :any, arm64_sonoma: "7a05aa840993a08073ba901e7977f285aae32d90162a3e10bf80612475c5cb18" + sha256 cellar: :any, sonoma: "50fc5d9a0676cbca78cab5c86b8028c6200adf9c92e950c00472d810b9a8fa8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d806c1ebe2389b5067f09558153aed3453abfc6fd45233f7d81b191c2a8a1149" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8c9f63702530f99129b29adcb133824d55f02d491315fe04c68ae0240a08fdd" + end + + depends_on "ruby" # Requires >= Ruby 2.7 + + depends_on "xz" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + bin.install libexec/"bin/#{name}" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"solargraph", "stdio") do |stdin, stdout, _, _| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/s/solarus.rb b/Formula/s/solarus.rb new file mode 100644 index 0000000000000..5698e32f2b0af --- /dev/null +++ b/Formula/s/solarus.rb @@ -0,0 +1,61 @@ +class Solarus < Formula + desc "Action-RPG game engine" + homepage "https://www.solarus-games.org/" + url "https://gitlab.com/solarus-games/solarus.git", + tag: "v2.0.0", + revision: "1c69f3d7ec133eaff28c22d756170eba69a520b0" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "83cae14ca7357689da1572d95b375c5f1bb1dea3c8fa65b8ebdf105e3e354ca5" + sha256 arm64_sequoia: "85a7c6dfc13c8c421fa74d19b342a233cd44033cbf77cbb68ad09eaedc718dad" + sha256 arm64_sonoma: "05499edb58e7a13a8967b7a6fbf809f51794cc5f53ce1495ee6bfe048a1bd2c1" + sha256 arm64_ventura: "010d2aa833ddfaa4bed2f231858589d37cf667b75e85bae1dbfed9e00cba7209" + sha256 sonoma: "ef4bed02bcff7a4c5ef11bf7c2b8975a96e125b937f5326e3c45f52132563cb8" + sha256 ventura: "83234601f53be7a2a3137671d73e94000b47316e77547332f066e70770469e20" + sha256 arm64_linux: "c4bc34e892827477f7dc3c599df51d44e2b9f714bfda46c54e238e0d46e22923" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04d4e184b09908722468e977d425e4a1e441eb8dfe576d662445de67b659f73a" + end + + depends_on "cmake" => :build + depends_on "glm" + depends_on "libmodplug" + depends_on "libogg" + depends_on "libvorbis" + depends_on "luajit" + # Upstream only supports OpenAL Soft and not macOS OpenAL.framework + # https://gitlab.com/solarus-games/solarus/-/blob/dev/cmake/modules/FindOpenAL.cmake?ref_type=heads#L38 + depends_on "openal-soft" + depends_on "physfs" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_ttf" + + on_linux do + depends_on "mesa" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DSOLARUS_ARCH=#{Hardware::CPU.arch}", + "-DSOLARUS_GUI=OFF", + "-DSOLARUS_TESTS=OFF", + "-DVORBISFILE_INCLUDE_DIR=#{Formula["libvorbis"].opt_include}", + "-DOGG_INCLUDE_DIR=#{Formula["libogg"].opt_include}", + "-DGLM_INCLUDE_DIR=#{Formula["glm"].opt_include}", + "-DPHYSFS_INCLUDE_DIR=#{Formula["physfs"].opt_include}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"solarus-run", "-help" + end +end diff --git a/Formula/s/solc-select.rb b/Formula/s/solc-select.rb new file mode 100644 index 0000000000000..e1826cb097571 --- /dev/null +++ b/Formula/s/solc-select.rb @@ -0,0 +1,54 @@ +class SolcSelect < Formula + include Language::Python::Virtualenv + + desc "Manage multiple Solidity compiler versions" + homepage "https://github.com/crytic/solc-select" + url "https://files.pythonhosted.org/packages/e0/55/55b19b5f6625e7f1a8398e9f19e61843e4c651164cac10673edd412c0678/solc_select-1.1.0.tar.gz" + sha256 "94fb6f976ab50ffccc5757d5beaf76417b27cbe15436cfe2b30cdb838f5c7516" + license "AGPL-3.0-only" + head "https://github.com/crytic/solc-select.git", branch: "dev" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "caf2f6be75f5d5796e2c42581153686e3a4b72d7b87a96e1a0eb5ca50b9baeee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10d842a9ebe4e794cf8ccbee0682247f5e2da73a020c36299ddab1dc7a8a7747" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "104b8f03d5680d6b544698d3bab2bbfeed2770ff47f72ae3a5452da3c1c47cb7" + sha256 cellar: :any_skip_relocation, sonoma: "b901cd7ab4d132307657a069e2ae276d2fb2e3b47b061e60efc10568eccfdcc1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3848794703a208f7af56f96d4028ac3e208cf8dcf4cf7d6312dfa64c6ea19a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "303414ce44b6df5584610fbf09cdb1033f87fd48ad43ff2b0cf324e6a1531c4a" + end + + depends_on "python@3.14" + + conflicts_with "solidity", because: "both install `solc` binaries" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"solc-select", "install", "0.5.7" + system bin/"solc-select", "install", "0.8.0" + system bin/"solc-select", "use", "0.5.7" + + assert_match(/0\.5\.7.*current/, shell_output("#{bin}/solc-select versions")) + + # running solc itself requires an Intel system or Rosetta + return if Hardware::CPU.arm? + + assert_match("0.5.7", shell_output("#{bin}/solc --version")) + with_env(SOLC_VERSION: "0.8.0") do + assert_match("0.8.0", shell_output("#{bin}/solc --version")) + end + end +end diff --git a/Formula/s/solhint.rb b/Formula/s/solhint.rb new file mode 100644 index 0000000000000..b1b6a50c2a293 --- /dev/null +++ b/Formula/s/solhint.rb @@ -0,0 +1,39 @@ +class Solhint < Formula + desc "Linter for Solidity code" + homepage "https://protofire.github.io/solhint/" + url "https://registry.npmjs.org/solhint/-/solhint-6.0.1.tgz" + sha256 "535cd2b4bfb07ce33e9b293ba74c5c05f96daab2e155ad327caf8f3c64ee59bf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3ed6a10d8cceb6a4ccbd5ab607670233a468f7c10830335ca4343e8cbf04437e" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + test_config = testpath/".solhint.json" + test_config.write <<~JSON + { + "rules": { + "no-empty-blocks": "error" + } + } + JSON + + (testpath/"test.sol").write <<~SOLIDITY + pragma solidity ^0.4.0; + contract Test { + function test() { + } + } + SOLIDITY + assert_match "error Code contains empty blocks no-empty-blocks", + shell_output("#{bin}/solhint --config #{test_config} test.sol 2>&1", 1) + end +end diff --git a/Formula/s/solid.rb b/Formula/s/solid.rb new file mode 100644 index 0000000000000..9ab4d331fb78c --- /dev/null +++ b/Formula/s/solid.rb @@ -0,0 +1,65 @@ +class Solid < Formula + desc "Collision detection library for geometric objects in 3D space" + homepage "https://github.com/dtecta/solid3/" + url "https://github.com/dtecta/solid3/archive/ec3e218616749949487f81165f8b478b16bc7932.tar.gz" + version "3.5.8" + sha256 "e3a23751ebbad5e35f50e685061f1ab9e1bd3777317efc6912567f55259d0f15" + license any_of: ["GPL-2.0-only", "QPL-1.0"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d60b8794f39a07abe48ee17d5d5d71de75ee92f8d39dc81fe32bb31b12020558" + sha256 cellar: :any, arm64_sequoia: "a120341c8125672e287c5273d0aa022bc1751270b12b94d24aaad75efb8e86f8" + sha256 cellar: :any, arm64_sonoma: "275a045468641fdf508d008c04970a996245aeaf7339f00a6c6c8ebbfbd4f800" + sha256 cellar: :any, arm64_ventura: "abc0a05c054df066acb09a0303e2af828758236acf0da8ddaa29c18e0d0f670f" + sha256 cellar: :any, arm64_monterey: "e670e041979d6f3f95ded01c38b053a701d55dee074e016197ba1b1613128d67" + sha256 cellar: :any, arm64_big_sur: "ec2f44a3fe6993dd89a03fc6c79bb15ea9d0e03eff14c5fee248a8d6ef2dc84b" + sha256 cellar: :any, sonoma: "e53aa3117c1e597cb122e90029527b58a5e5aed4d0d19efe743fe75052662043" + sha256 cellar: :any, ventura: "b8cd0d00412c2bdc847bae1471f35cefa9542c8ee380ec8ef0d5c736c85b1ed4" + sha256 cellar: :any, monterey: "5f6332325f0e43bd790343ac713ffde38b6933284f56ccf2300ed1f6a0d846c1" + sha256 cellar: :any, big_sur: "53fa124eaf6eec06348f0fd19db0cf189066560f44ed22f6fffb9bdbc58beae7" + sha256 cellar: :any, catalina: "9d1231c8c37bb4a40ae017d0f8a546bf8f58a2c8f4898d9c226a8aec1708d633" + sha256 cellar: :any_skip_relocation, arm64_linux: "4834bad27ab6bcb57d0fdd0bec5983e526a8cb1d340b2f9cb6ba6df8bd163764" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf61db5178e9b3286d47dee7ec43fbb18da035dd2bfad28d269e74aa01ff7d1e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + # This patch fixes a broken build on clang-600.0.56. + # Was reported to bugs@dtecta.com (since it also applies to solid-3.5.6) + patch :DATA + + def install + # Avoid `required file not found` errors + touch ["AUTHORS", "ChangeLog", "NEWS"] + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--infodir=#{info}", *std_configure_args + + # Don't make examples, as they do not compile because the include + # statements for the GLUT library are not platform independent + inreplace "Makefile", /^(SUBDIRS *=.*) examples( .+)?/, '\1\2' + + system "make", "install" + end +end + +__END__ +diff --git a/src/complex/DT_CBox.h b/src/complex/DT_CBox.h +index 7fc7c5d..16ce972 100644 +--- a/src/complex/DT_CBox.h ++++ b/src/complex/DT_CBox.h +@@ -131,4 +131,6 @@ inline DT_CBox operator-(const DT_CBox& b1, const DT_CBox& b2) + b1.getExtent() + b2.getExtent()); + } + ++inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform); ++ + #endif diff --git a/Formula/s/solidity.rb b/Formula/s/solidity.rb new file mode 100644 index 0000000000000..7579e5c321274 --- /dev/null +++ b/Formula/s/solidity.rb @@ -0,0 +1,70 @@ +class Solidity < Formula + desc "Contract-oriented programming language" + homepage "https://soliditylang.org" + url "https://github.com/ethereum/solidity/releases/download/v0.8.30/solidity_0.8.30.tar.gz" + sha256 "5e8d58dff551a18205e325c22f1a3b194058efbdc128853afd75d31b0568216d" + license all_of: ["GPL-3.0-or-later", "MIT", "BSD-3-Clause", "Apache-2.0", "CC0-1.0"] + revision 1 + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c942e9514c42b1b9e7c11f688bdfc3743996349d1560e898f5fff39019179280" + sha256 cellar: :any, arm64_sequoia: "64d6eda62ef156a0101b7db05f46fced2dbb782642b92e3972689d87fa3ded70" + sha256 cellar: :any, arm64_sonoma: "d22c39245433eb7ce91fb21ea5d7587b5c2f0be56f5ea926d9d14274c7238536" + sha256 cellar: :any, arm64_ventura: "5122f5b427213dbeecdbdc1f5e16d478d5577bfec406cb834d09dc0bfe5faa7c" + sha256 cellar: :any, sonoma: "1e776c872721c83f27fc64cf6ecee4a9a1c57660b7ca71be25b71e69c0d26e8c" + sha256 cellar: :any, ventura: "461812120f0c82b5e6ed4bda4c2e66c87e608762bda9e6a902f75b324874f72c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff393f0e988c7d12e0c26eaf7852a79382568fff3c2a911f17e14df692458b69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "700199170a432f1e4a6608aa7e75c3def553578b0dbf8730ebb589a5e4a4f4e3" + end + + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "nlohmann-json" => :build + depends_on "range-v3" => :build + depends_on "boost" + depends_on "z3" + + conflicts_with "solc-select", because: "both install `solc` binaries" + + # Fix build with Boost 1.89.0, pr ref: https://github.com/ethereum/solidity/pull/16163 + patch do + url "https://github.com/ethereum/solidity/commit/1c6000917619c69feaa9fd14fe69c0445cc05f20.patch?full_index=1" + sha256 "bf839570085ccd9baa227f30f91456f3ff72e9754d63019d33b34449bbb4c34e" + end + + def install + rm_r("deps") + + system "cmake", "-S", ".", "-B", "build", + "-DBoost_USE_STATIC_LIBS=OFF", + "-DSTRICT_Z3_VERSION=OFF", + "-DTESTS=OFF", + "-DIGNORE_VENDORED_DEPENDENCIES=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"hello.sol").write <<~SOLIDITY + // SPDX-License-Identifier: GPL-3.0 + pragma solidity ^0.8.0; + contract HelloWorld { + function helloWorld() external pure returns (string memory) { + return "Hello, World!"; + } + } + SOLIDITY + + output = shell_output("#{bin}/solc --bin hello.sol") + assert_match "hello.sol:HelloWorld", output + assert_match "Binary:", output + end +end diff --git a/Formula/s/sollya.rb b/Formula/s/sollya.rb new file mode 100644 index 0000000000000..222c414229d1c --- /dev/null +++ b/Formula/s/sollya.rb @@ -0,0 +1,64 @@ +class Sollya < Formula + desc "Library for safe floating-point code development" + homepage "https://www.sollya.org/" + url "https://www.sollya.org/releases/sollya-8.0/sollya-8.0.tar.gz" + sha256 "58d734f9a2fc8e6733c11f96d2df9ab25bef24d71c401230e29f0a1339a81192" + license "CECILL-C" + revision 2 + + livecheck do + url "https://www.sollya.org/download.php" + regex(/href=.*?sollya[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1f8f9680bdd353bb6532f481446eceab77e5fb59b9449359cfa18e70fa0dc1c1" + sha256 cellar: :any, arm64_sequoia: "c65c8b258fe962a56c94a4e36af2bb30541289140b81a4d9503278cc8aeac144" + sha256 cellar: :any, arm64_sonoma: "e04b5831f6e8ead9121935f1e6ddf55821d68da7ae5370347063c2e832ec7c21" + sha256 cellar: :any, arm64_ventura: "7fe203ca548328e6cffb2e6d963d00cba80e9842b4c1b71f43ae9b1fcb4b27e6" + sha256 cellar: :any, sonoma: "2c83c3d2bb45f3b7e16c96530a6a72b114db18a81c7b4c71db50e47c385e6815" + sha256 cellar: :any, ventura: "ba802f6fe9e582b5fb012aba5c14b69e8ab8586ac5c2d3e02d8f290ebedc64fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "34dce0bd22536f4136ca5a874480f1ffe4228f86ba584b292af23c64cbc80ce4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57e1b7f081dcf28664b497a41800a3eb455cb3ce7a4676ff651e06d67cbe6142" + end + + depends_on "automake" => :build + depends_on "pkgconf" => :test + depends_on "fplll" + depends_on "gmp" + depends_on "mpfi" + depends_on "mpfr" + + uses_from_macos "libxml2" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"cos.sollya").write <<~EOF + write(taylor(2*cos(x),1,0)) > "two.txt"; + quit; + EOF + system bin/"sollya", "cos.sollya" + assert_equal "2", (testpath/"two.txt").read + + (testpath/"test.c").write <<~C + #include + + int main(void) { + sollya_obj_t f; + sollya_lib_init(); + f = sollya_lib_pi(); + sollya_lib_printf("%b", f); + sollya_lib_clear_obj(f); + sollya_lib_close(); + return 0; + } + C + pkgconf_flags = shell_output("pkgconf --cflags --libs gmp mpfr fplll").chomp.split + system ENV.cc, "test.c", *pkgconf_flags, "-I#{include}", "-L#{lib}", "-lsollya", "-o", "test" + assert_equal "pi", shell_output("./test") + end +end diff --git a/Formula/s/solo2-cli.rb b/Formula/s/solo2-cli.rb new file mode 100644 index 0000000000000..0a8931724047e --- /dev/null +++ b/Formula/s/solo2-cli.rb @@ -0,0 +1,50 @@ +class Solo2Cli < Formula + desc "CLI to update and use Solo 2 security keys" + homepage "https://solokeys.com/" + url "https://github.com/solokeys/solo2-cli/archive/refs/tags/v0.2.2.tar.gz" + sha256 "49a30c5ee6f38be968a520089741f8b936099611e98e6bf2b25d05e5e9335fb4" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/solokeys/solo2-cli.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dad9f3c2ecd0fa082e66d3013262b487a46c9d5000dd93af6ecb092d1c1b9298" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0eeda3ebb79864789018e56cdd4bf347b798478c754f9f3be29e26ce788cc604" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac06ba094da706b68c527fa6904187aa9c2d21fd26246bf9a343a4a14a4d8dd9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c876fcb91927f6c382994c92cbd8fcf3041d12ee2e43f6239c325bd852d4d3b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "30c6fd9a7c4eaa8345fc68740a10232ffe26755d9c19b3bd4f7f86e650471d3e" + sha256 cellar: :any_skip_relocation, sonoma: "4b0ce4ae4cc661cb11b6746b536e736256c6a3b978af3508ea36997bd667d0c9" + sha256 cellar: :any_skip_relocation, ventura: "9529d0379455886612d51ade076b55ff1bffe3395b09fe80edba6ebb571d119c" + sha256 cellar: :any_skip_relocation, monterey: "ffb93967fd1171798157e502212337d93d644f6e31f8e1457f17c0c62f088a01" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a38668bcd74a109b726bc666553352c1688ee7c9b51061e2f0767cd3bb7d06a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00c7bd01f05ac244c1b50fbfc559a9dcc641c23d71a2f9664e8d88d22a522316" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "pcsc-lite" + depends_on "systemd" + end + + # rust 1.79.0 build patch, upstream pr ref, https://github.com/solokeys/solo2-cli/pull/122 + patch do + url "https://github.com/solokeys/solo2-cli/commit/c4b3f28062860c914f3922ad58604f0bc36ead93.patch?full_index=1" + sha256 "1f3e08c4c6f17022e8762852ef8e2de94e1c0161d4409d60e5b04f23d72b632d" + end + + def install + system "cargo", "install", "--all-features", *std_cargo_args + + bash_completion.install "target/release/solo2.bash" => "solo2" + fish_completion.install "target/release/solo2.fish" + zsh_completion.install "target/release/_solo2" + end + + test do + assert_empty shell_output("#{bin}/solo2 ls") + assert_match version.to_s, shell_output("#{bin}/solo2 --version") + end +end diff --git a/Formula/s/solr.rb b/Formula/s/solr.rb new file mode 100644 index 0000000000000..5123ac0c36891 --- /dev/null +++ b/Formula/s/solr.rb @@ -0,0 +1,59 @@ +class Solr < Formula + desc "Enterprise search platform from the Apache Lucene project" + homepage "https://solr.apache.org/" + url "https://dlcdn.apache.org/solr/solr/9.9.0/solr-9.9.0.tgz" + mirror "https://archive.apache.org/dist/solr/solr/9.9.0/solr-9.9.0.tgz" + sha256 "eb4a888593a58c8415ed959148dd70ae7379a14199195f9bb3743a5bb10a9169" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8b84655f53aa8dde2b606f93d4a70ad64e86c40abe7d4ac8f2be1c90b218d986" + end + + # Can be updated after https://github.com/apache/solr/pull/3153 + depends_on "openjdk@21" + + def install + pkgshare.install "bin/solr.in.sh" + (var/"lib/solr").install "server/solr/README.md", "server/solr/solr.xml", "server/solr/zoo.cfg" + prefix.install "licenses", "modules", "server" + bin.install "bin/solr", "bin/post" + + env = Language::Java.overridable_java_home_env + env["SOLR_HOME"] = "${SOLR_HOME:-#{var}/lib/solr}" + env["SOLR_LOGS_DIR"] = "${SOLR_LOGS_DIR:-#{var}/log/solr}" + env["SOLR_PID_DIR"] = "${SOLR_PID_DIR:-#{var}/run/solr}" + bin.env_script_all_files libexec, env + + inreplace libexec/"solr", "/usr/local/share/solr", pkgshare + end + + def post_install + (var/"run/solr").mkpath + (var/"log/solr").mkpath + end + + service do + run [opt_bin/"solr", "start", "-f", "-s", HOMEBREW_PREFIX/"var/lib/solr"] + working_dir HOMEBREW_PREFIX + end + + test do + ENV["SOLR_PID_DIR"] = testpath + port = free_port + + assert_match "No Solr nodes are running", shell_output("#{bin}/solr status") + + # Start a Solr node => exit code 0 + shell_output("#{bin}/solr start -p #{port} -Djava.io.tmpdir=/tmp") + assert_match(/Solr process \d+ running on port #{port}/, shell_output("#{bin}/solr status")) + + # Impossible to start a second Solr node on the same port => exit code 1 + shell_output("#{bin}/solr start -p #{port}", 1) + # Stop a Solr node => exit code 0 + # Exit code is 1 without init process in a docker container + shell_output("#{bin}/solr stop -p #{port}", (OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]) ? 1 : 0) + # No Solr node left to stop => exit code 1 + shell_output("#{bin}/solr stop -p #{port}", 1) + end +end diff --git a/Formula/s/solr@8.11.rb b/Formula/s/solr@8.11.rb new file mode 100644 index 0000000000000..460d704dec7f9 --- /dev/null +++ b/Formula/s/solr@8.11.rb @@ -0,0 +1,58 @@ +class SolrAT811 < Formula + desc "Enterprise search platform from the Apache Lucene project" + homepage "https://solr.apache.org/" + url "https://dlcdn.apache.org/lucene/solr/8.11.4/solr-8.11.4.tgz" + mirror "https://archive.apache.org/dist/lucene/solr/8.11.4/solr-8.11.4.tgz" + sha256 "163fbdf246bbd78910bc36c3257ad50cdf31ccc3329a5ef885c23c9ef69e0ebe" + license "Apache-2.0" + + livecheck do + url "https://solr.apache.org/downloads.html" + regex(/href=.*?solr[._-]v?(8\.11(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "65d79494d324de0e00931020fc1e1624c7929566a4d66cee0b33052111f6e523" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + pkgshare.install "bin/solr.in.sh" + (var/"lib/solr").install "server/solr/README.txt", "server/solr/solr.xml", "server/solr/zoo.cfg" + prefix.install "contrib", "dist", "licenses", "server" + bin.install "bin/solr", "bin/post", "bin/oom_solr.sh" + + env = Language::Java.overridable_java_home_env + env["SOLR_HOME"] = "${SOLR_HOME:-#{var}/lib/solr}" + env["SOLR_LOGS_DIR"] = "${SOLR_LOGS_DIR:-#{var}/log/solr}" + env["SOLR_PID_DIR"] = "${SOLR_PID_DIR:-#{var}/run/solr}" + bin.env_script_all_files libexec, env + + inreplace libexec/"solr", "/usr/local/share/solr", pkgshare + end + + def post_install + (var/"run/solr").mkpath + (var/"log/solr").mkpath + end + + service do + run [opt_bin/"solr", "start", "-f", "-s", HOMEBREW_PREFIX/"var/lib/solr"] + working_dir HOMEBREW_PREFIX + end + + test do + # Test fails in docker, see https://github.com/apache/solr/pull/250 + # Newset solr version has been fixed, this legacy version will not be patched, + # so just ignore the test. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + ENV["SOLR_PID_DIR"] = testpath + + # Info detects no Solr node => exit code 3 + assert_match "No Solr nodes are running", shell_output("#{bin}/solr status", 3) + end +end diff --git a/Formula/s/somagic-tools.rb b/Formula/s/somagic-tools.rb new file mode 100644 index 0000000000000..d137ac13ae83b --- /dev/null +++ b/Formula/s/somagic-tools.rb @@ -0,0 +1,33 @@ +class SomagicTools < Formula + desc "Tools to extract firmware from EasyCAP" + homepage "https://code.google.com/archive/p/easycap-somagic-linux/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/easycap-somagic-linux/somagic-easycap-tools_1.1.tar.gz" + sha256 "b091723c55e6910cbf36c88f8d37a8d69856868691899683ec70c83b122a0715" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6efbacaa2b232898e3149d4392e6a6575cc34835b34cbf268bf73ddce6aef79f" + sha256 cellar: :any, arm64_sequoia: "6df28d78f161dc5a7e4a53d329db5c191848fe0c50abf3d7b0d71019d0ccbdae" + sha256 cellar: :any, arm64_sonoma: "1c378cda0ff89daa67d23c9747b812fc59ada83f8c7126cf894858a3f6846b8a" + sha256 cellar: :any, arm64_ventura: "adf9589e1d98e6eb49dc00765508d920b9f2acd79a91d92da79033f1a9aa8957" + sha256 cellar: :any, arm64_monterey: "37c12048bc0e6e020317c308bf89b4b7725b483c8b4dde598b83beda176839f7" + sha256 cellar: :any, arm64_big_sur: "072982afa9d598410ddab9dd2ef09298a4f5b080b11eb982e1b6c5ba23a441b4" + sha256 cellar: :any, sonoma: "ffe90e516c24b562929fc989c09a2e29b8836ef3d3f1aa3687b9142876507900" + sha256 cellar: :any, ventura: "14d78478d89843bf095cc9bfe37d1df550b9344f7d5453d7a54ae61a55febb7a" + sha256 cellar: :any, monterey: "6307d97300f3ba6bdd7b8d63c3fcf01dba6329713e5fefb1c81c042f07fb0041" + sha256 cellar: :any, big_sur: "e96911a936eb3ed42923f4cba1f29dcc96f624ea5f6209b153b0922ee529d20e" + sha256 cellar: :any, catalina: "59d88127409e26497afa4bb7d3afa04820dd1ccb56542096e01c85c733e53045" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa90bfa3a829c6d5073ffd2f7552173c4b33174aec52a32a75702a7bb55e61d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6a63036040014c766c494998f69b3be27f0ff5dccee6deba1a0f8ac7c6a05e3" + end + + depends_on "libgcrypt" + depends_on "libusb" + + def install + system "make" + system "make", "PREFIX=#{prefix}", "install" + end +end diff --git a/Formula/s/somagic.rb b/Formula/s/somagic.rb new file mode 100644 index 0000000000000..b9daa09f86d41 --- /dev/null +++ b/Formula/s/somagic.rb @@ -0,0 +1,41 @@ +class Somagic < Formula + desc "Linux capture program for the Somagic variants of EasyCAP" + homepage "https://code.google.com/archive/p/easycap-somagic-linux/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/easycap-somagic-linux/somagic-easycap_1.1.tar.gz" + sha256 "3a9dd78a47335a6d041cd5465d28124612dad97939c56d7c10e000484d78a320" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f077c27f36c94d14196836cb4f397c6d720cf39a399d64da000c62d2d0faac16" + sha256 cellar: :any, arm64_sequoia: "f2c83c2ff15da271002454ee3f3b73863d3143954a5d761bcabd7a1412824fb9" + sha256 cellar: :any, arm64_sonoma: "d9d2e64b2ef72922c9602c0c17890455654ecae4ffd3b9b359d93d66bb8ad0cd" + sha256 cellar: :any, arm64_ventura: "2d42167b5e235d77834fe886a10590e23b8e91aaec16eb1ce7406ba68efb8653" + sha256 cellar: :any, arm64_monterey: "cc20451f949f3dd25732f6090526d638d9d368a3dacfcd923440501788a39c3f" + sha256 cellar: :any, arm64_big_sur: "5a8bb98812f68221bf3db7667aa281e9c18b111837bf1b5167adf30e498b53ff" + sha256 cellar: :any, sonoma: "a42ebfd9151b089a6f92ab2ab34f1dfb944a08fdd9d33d9c65971e1c795de35e" + sha256 cellar: :any, ventura: "47fc6d3831206271dc2090e561f41cf6befb1245f4b935401e4cd76f08087316" + sha256 cellar: :any, monterey: "375696b4885e66a0c87c4cbefa8702bfa2c47ac9d75e7f7027f06839b0fd2b1b" + sha256 cellar: :any, big_sur: "5451a0d35aa0aedcb43d1aeb6e080804333f8f7abaa090ceab62b1d02482389f" + sha256 cellar: :any, catalina: "41d2479b3d2a267bbcd8c5db4ea7a8fe04c120d260d2ac9f087bd386012a3971" + sha256 cellar: :any_skip_relocation, arm64_linux: "c355af02d26d71d5f7e858ae952f8c726cf37f240ee43bfec917bd47003427fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d574fbe24e39eaf6e35a4d8317c689ae890983a801e8abf8e5dc0a2941a1104b" + end + + depends_on "libgcrypt" + depends_on "libusb" + depends_on "somagic-tools" + + def install + system "make" + system "make", "PREFIX=#{prefix}", "install" + end + + def caveats + <<~EOS + Before running somagic-capture you must extract the official firmware from the CD. + See https://code.google.com/archive/p/easycap-somagic-linux/wikis/GettingStarted.wiki for details. + EOS + end +end diff --git a/Formula/s/somo.rb b/Formula/s/somo.rb new file mode 100644 index 0000000000000..e6d5e6efb97ff --- /dev/null +++ b/Formula/s/somo.rb @@ -0,0 +1,32 @@ +class Somo < Formula + desc "Human-friendly alternative to netstat for socket and port monitoring" + homepage "https://github.com/theopfr/somo" + url "https://github.com/theopfr/somo/archive/refs/tags/v1.3.0.tar.gz" + sha256 "6996b37cef43a62bfd2c99e7b93ec465a3d086ca5e7a0be35ce32ecf5685e5e0" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d1e4a32220ea96d4283cffda348749c885d43f2b3834f9e306691e5fc6ac763c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ecb8e0c668adb150edd002fa4bc9b224f86cd141ee9421e00a107f00b2629eda" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87af655d47845d6eacc5d7a217a0efc09a4088d7bdfdbe1ef9af898411010595" + sha256 cellar: :any_skip_relocation, sonoma: "eb59ce4399c33c94add85e8b5861196cfea87fc045dd2ef4b69bfcb71722df96" + sha256 cellar: :any_skip_relocation, arm64_linux: "e43ff516d2765ad335067b0545c272fd1a329b60d0b21ccb505f729687379d3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e59b3ca9e13adf08d2d0ea12ca81311e61ed092a2e059239abd9db73b2a79fce" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"somo", "generate-completions") + end + + test do + port = free_port + TCPServer.open("localhost", port) do |_server| + output = JSON.parse(shell_output("#{bin}/somo --json --port #{port}")) + assert_equal port.to_s, output.first["local_port"] + end + end +end diff --git a/Formula/s/sonar-completion.rb b/Formula/s/sonar-completion.rb new file mode 100644 index 0000000000000..d6b041d16f6a1 --- /dev/null +++ b/Formula/s/sonar-completion.rb @@ -0,0 +1,24 @@ +class SonarCompletion < Formula + desc "Bash completion for Sonar" + homepage "https://github.com/a1dutch/sonarqube-bash-completion" + url "https://github.com/a1dutch/sonarqube-bash-completion/archive/refs/tags/1.1.tar.gz" + sha256 "506a592b166cff88786ae9e6215f922b8ed3617c65a4a88169211a80ef1c6b66" + license "Apache-2.0" + head "https://github.com/a1dutch/sonarqube-bash-completion.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "26ce38d7913a1a421b3ea7dc99d32b9f3bab8e2bf95c50a1e2fbfca0419dd376" + end + + def install + bash_completion.install "etc/bash_completion.d/sonar" + end + + test do + assert_match "-F _sonar", + shell_output("bash -c 'source #{bash_completion}/sonar && complete -p sonar'") + end +end diff --git a/Formula/s/sonar-scanner.rb b/Formula/s/sonar-scanner.rb new file mode 100644 index 0000000000000..0d60cefad6eab --- /dev/null +++ b/Formula/s/sonar-scanner.rb @@ -0,0 +1,29 @@ +class SonarScanner < Formula + desc "Launcher to analyze a project with SonarQube" + homepage "https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/" + url "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-7.3.0.5189.zip" + sha256 "a251d0793cb6bd889e4fd30299bb5dc4e07433e57133b16fc227aca98f8d2c2d" + license "LGPL-3.0-or-later" + head "https://github.com/SonarSource/sonar-scanner-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e6413293bda6b5cede7be37c8a86087c7bf4ca90d57fc045d1f16c441c6f939e" + end + + depends_on "openjdk" + + def install + rm_r(Dir["bin/*.bat"]) + libexec.install Dir["*"] + bin.install libexec/"bin/sonar-scanner" + etc.install libexec/"conf/sonar-scanner.properties" + ln_s etc/"sonar-scanner.properties", libexec/"conf/sonar-scanner.properties" + bin.env_script_all_files libexec/"bin/", + SONAR_SCANNER_HOME: libexec, + JAVA_HOME: Language::Java.overridable_java_home_env[:JAVA_HOME] + end + + test do + assert_match version.to_s, shell_output("#{bin}/sonar-scanner --version") + end +end diff --git a/Formula/s/sonic.rb b/Formula/s/sonic.rb new file mode 100644 index 0000000000000..7b7c9294ca379 --- /dev/null +++ b/Formula/s/sonic.rb @@ -0,0 +1,61 @@ +class Sonic < Formula + desc "Fast, lightweight & schema-less search backend" + homepage "https://github.com/valeriansaliou/sonic" + url "https://github.com/valeriansaliou/sonic/archive/refs/tags/v1.4.9.tar.gz" + sha256 "68f9336cd63e8f4171073be89e37ed6688812281207c3f70567b28fbe37be63b" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d426d6e74b06d8dd5b8fa28861740bb68d4f4141a1b950b1cf91817d6cfefcb2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2963b66aad27cd0805154f10287f226de7c3845c3c032b3a86f42bd0aa34c26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9eeac83f672962725f3217370f12b06582da32f38ac31198fff2dc0c3358f572" + sha256 cellar: :any_skip_relocation, arm64_ventura: "51c1a32ae3da2966e4f943baf0b7553e2802f1354eae2029d6c840424531a697" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0e35da6261442351069d3195082219065dc61e269cab9265cebfca2c57d94e97" + sha256 cellar: :any_skip_relocation, sonoma: "dd0f9672179042b93dc1df50bdb4833f92a0fefe1085c37794748385fea62410" + sha256 cellar: :any_skip_relocation, ventura: "70c609372b8a30d3d6cbcd96dad191f60dd412dc9d787bcf64e0ce956b6cecb0" + sha256 cellar: :any_skip_relocation, monterey: "16e5f7de38eb2a531e7b844330dfcae8579f8602f71daec7050f9e9d1be5deb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "7579cfbac1bc541ac4333adbb22a10395bb2fe2f6b687751ad4dc5e39bd109e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "686d7ff993a9ee79e10de1fbf250c0a9eeb67048efaaff042bbc8b579e497524" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + + def install + system "cargo", "install", *std_cargo_args + inreplace "config.cfg", "./", var/"sonic/" + etc.install "config.cfg" => "sonic.cfg" + end + + service do + run [opt_bin/"sonic", "-c", etc/"sonic.cfg"] + keep_alive true + working_dir var + log_path var/"log/sonic.log" + error_log_path var/"log/sonic.log" + end + + test do + port = free_port + + cp etc/"sonic.cfg", testpath/"config.cfg" + inreplace "config.cfg", "[::1]:1491", "0.0.0.0:#{port}" + inreplace "config.cfg", "#{var}/sonic", "." + + pid = spawn bin/"sonic" + sleep 10 + TCPSocket.open("localhost", port) do |sock| + assert_match "CONNECTED", sock.gets + sock.puts "START ingest SecretPassword" + assert_match "STARTED ingest protocol(1)", sock.gets + sock.puts 'PUSH messages user:0dcde3a6 conversation:71f3d63b "Hello world!"' + assert_match "OK", sock.gets + sock.puts "QUIT" + assert_match "ENDED", sock.gets + end + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/s/sonobuoy.rb b/Formula/s/sonobuoy.rb new file mode 100644 index 0000000000000..f8c2cd592b093 --- /dev/null +++ b/Formula/s/sonobuoy.rb @@ -0,0 +1,36 @@ +class Sonobuoy < Formula + desc "Kubernetes component that generates reports on cluster conformance" + homepage "https://sonobuoy.io/" + url "https://github.com/vmware-tanzu/sonobuoy/archive/refs/tags/v0.57.3.tar.gz" + sha256 "d581032898c17f1df6db90e85aae8dae6429e8cd2a1b54e1728ddeaa7d9a989c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bddd68d3727f2d51968ee096e74b8b64f845a9d43b02e69eece7b285d1a21faa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c32da42e3e5b57b9ced6921ad5c275ac8ff076ce9dbabafb30ba0d57d520a251" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c32da42e3e5b57b9ced6921ad5c275ac8ff076ce9dbabafb30ba0d57d520a251" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c32da42e3e5b57b9ced6921ad5c275ac8ff076ce9dbabafb30ba0d57d520a251" + sha256 cellar: :any_skip_relocation, sonoma: "a63e81012251bc72c4dee7f3c82fcded580417bfb68774d772980e5489560902" + sha256 cellar: :any_skip_relocation, ventura: "a63e81012251bc72c4dee7f3c82fcded580417bfb68774d772980e5489560902" + sha256 cellar: :any_skip_relocation, arm64_linux: "98caa359df349d733f373ed5228ead0d7dfffe8defcb40254cdd8c219557f590" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11b4dd588a290681b0a297cdbee378b83cfcccb2bb8cb4c40033531e30b38d76" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"sonobuoy", "completion") + end + + test do + assert_match "Sonobuoy is a Kubernetes component that generates reports on cluster conformance", + shell_output("#{bin}/sonobuoy 2>&1") + assert_match version.to_s, + shell_output("#{bin}/sonobuoy version 2>&1") + assert_match "name: sonobuoy", + shell_output("#{bin}/sonobuoy gen --kubernetes-version=v1.21 2>&1") + end +end diff --git a/Formula/s/sophus.rb b/Formula/s/sophus.rb new file mode 100644 index 0000000000000..043c79945f1e9 --- /dev/null +++ b/Formula/s/sophus.rb @@ -0,0 +1,53 @@ +class Sophus < Formula + desc "C++ implementation of Lie Groups using Eigen" + homepage "https://github.com/strasdat/Sophus" + url "https://github.com/strasdat/Sophus/archive/refs/tags/1.24.6.tar.gz" + sha256 "3f3098bdac2c74d42a921dbfb0e5e4b23601739e35a1c1236c2807c399da960c" + license "MIT" + revision 1 + version_scheme 1 + head "https://github.com/strasdat/Sophus.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "61f605f047032f7eadba09b95b8b76005c827b15fff2f484db5dd5322cc4499a" + end + + depends_on "cmake" => [:build, :test] + depends_on "ceres-solver" + depends_on "eigen" + depends_on "fmt" + + # Apply open PR to support eigen 5.0.0 + # PR ref: https://github.com/strasdat/Sophus/pull/558 + patch do + url "https://github.com/strasdat/Sophus/commit/fd3fcfa116f078d731d062d1d74f2b31aaf8854f.patch?full_index=1" + sha256 "0f91d6051c9b66051916a1c52fb223b63575a43ec941f5091a68848195aa2429" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DBUILD_SOPHUS_EXAMPLES=OFF" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (pkgshare/"examples").install "examples/hello_so3.cpp" + end + + test do + cp pkgshare/"examples/hello_so3.cpp", testpath + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION #{Formula["cmake"].version}) + project(HelloSO3) + + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + + find_package(Sophus REQUIRED) + add_executable(HelloSO3 hello_so3.cpp) + target_link_libraries(HelloSO3 Sophus::Sophus) + CMAKE + + system "cmake", "-S", ".", "-B", "build", "-DSophus_DIR=#{share}/Sophus" + system "cmake", "--build", "build" + assert_match "The rotation matrices are", shell_output("./build/HelloSO3") + end +end diff --git a/Formula/s/soplex.rb b/Formula/s/soplex.rb new file mode 100644 index 0000000000000..c641b390d3ea4 --- /dev/null +++ b/Formula/s/soplex.rb @@ -0,0 +1,56 @@ +class Soplex < Formula + desc "Optimization package for solving linear programming problems (LPs)" + homepage "https://soplex.zib.de/" + url "https://soplex.zib.de/download/release/soplex-7.1.6.0.tgz" + sha256 "4fbae2d1f06ed2204c9e37b5775f04dc05796f7ac900977e19bcbdbfeae9bf56" + license "Apache-2.0" + + livecheck do + url "https://soplex.zib.de/soplexdata.js" + regex(/["']name["']:\s*?["']soplex[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1550aa55004abebea063bef5299a9aa415f2a6e6b675f52ae0f3e8bc924fb3fc" + sha256 cellar: :any, arm64_sequoia: "66f9a48f8ab8c3148af4ab89df677159fa55b5e982bdb9485b09a97f37998096" + sha256 cellar: :any, arm64_sonoma: "3818410f86d164251f21e54798e36a59bd65e0bb8ea6f6f409a4e9ea13df031d" + sha256 cellar: :any, sonoma: "e2932f376cf82fa64f47e7062ee7d3de492c6621a61d99d7f6f110506a958a00" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e53bc419de2813f3badde9e245d01026c8f37570263fba9ea759a7514bb385e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dd747f830bfd203330a6f440512213c4f5c866054c1c74bd457302f1f91fe09" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "gmp" + depends_on "tbb" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "src/example.cpp" + end + + test do + (testpath/"test.lp").write <<~EOS + Maximize + obj: x1 + 2 x2 + 3 x3 + x4 + Subject To + c1: - x1 + x2 + x3 + 10 x4 <= 20 + c2: x1 - 3 x2 + x3 <= 30 + c3: x2 - 3.5 x4 = 0 + Bounds + 0 <= x1 <= 40 + 2 <= x4 <= 3 + General + x4 + End + EOS + assert_match "problem is solved [optimal]", shell_output("#{bin}/soplex test.lp") + + system ENV.cxx, pkgshare/"example.cpp", "-std=c++14", "-L#{lib}", "-I#{include}", + "-L#{Formula["gmp"].opt_lib}", "-lsoplex", "-lz", "-lgmp", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sops.rb b/Formula/s/sops.rb new file mode 100644 index 0000000000000..f3d68847dc9cf --- /dev/null +++ b/Formula/s/sops.rb @@ -0,0 +1,32 @@ +class Sops < Formula + desc "Editor of encrypted files" + homepage "https://getsops.io/" + url "https://github.com/getsops/sops/archive/refs/tags/v3.11.0.tar.gz" + sha256 "0182659099cd6a2fbcb41b507f8cd363667a0d6eb442098f6cebdf4ca8ecd2ac" + license "MPL-2.0" + head "https://github.com/getsops/sops.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "52994ee8ae4c40be548d83f52e47549788fe07bb4cb04a9700c605d26b773d7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52994ee8ae4c40be548d83f52e47549788fe07bb4cb04a9700c605d26b773d7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "52994ee8ae4c40be548d83f52e47549788fe07bb4cb04a9700c605d26b773d7f" + sha256 cellar: :any_skip_relocation, sonoma: "fb2334538fae10f195960465f656619f7a123dbe5a7bb21c447715909b14dae5" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fe0236b892c9bb0a7bb74d2d69cfd14303bb46bc992da2577ab380462055303" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9557d761c6abc996ce3e66b6411956fcd7c5dd984ee27eb2fe4ad6f0f34f19a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/getsops/sops/v3/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/sops" + pkgshare.install "example.yaml" + end + + test do + assert_match version.to_s, shell_output("#{bin}/sops --version") + + assert_match "Recovery failed because no master key was able to decrypt the file.", + shell_output("#{bin}/sops #{pkgshare}/example.yaml 2>&1", 128) + end +end diff --git a/Formula/s/sord.rb b/Formula/s/sord.rb new file mode 100644 index 0000000000000..5ca46ad1d7289 --- /dev/null +++ b/Formula/s/sord.rb @@ -0,0 +1,47 @@ +class Sord < Formula + desc "C library for storing RDF data in memory" + homepage "https://drobilla.net/software/sord.html" + url "https://download.drobilla.net/sord-0.16.18.tar.xz" + sha256 "4f398b635894491a4774b1498959805a08e11734c324f13d572dea695b13d3b3" + license "ISC" + + livecheck do + url "https://download.drobilla.net" + regex(/href=.*?sord[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c4b91e9f7caaaa348dac3238de2d0827f0ad120f162dd6e9450bac6e0a5ae27a" + sha256 cellar: :any, arm64_sequoia: "9482cf28bd5e2d77ed057903e53157a57e09355e8a6c69eb935fdefc67c79505" + sha256 cellar: :any, arm64_sonoma: "bd8611d53bf08d025037edaa7ef83e635dbe853c3783ed94909a1edfc93d7457" + sha256 cellar: :any, arm64_ventura: "41fcd2ff39ea5a50392a5a3b31c523ca5c7e087e1d0124c1b8101da518e40bf8" + sha256 cellar: :any, sonoma: "d1230019e29331722881ff6ecaa0533dd452b350792394a7c8f701f8ffde46dc" + sha256 cellar: :any, ventura: "70e0cf3dced39cd9b5b0a069a0261fed4e758412f625e4803449d27e6fa07f72" + sha256 arm64_linux: "cb55e96bc9ead5b118ced1ace42f11a2641e7475c6db29e24facfe9bbb743146" + sha256 x86_64_linux: "eee6fa6352554b778e2a51f04791a165d4bf3ca78379ff205481ae157bb2dc35" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "pcre2" + depends_on "serd" + depends_on "zix" + + def install + system "meson", "setup", "build", "-Dtests=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + path = testpath/"input.ttl" + path.write <<~EOS + @prefix : . + :a :b :c . + EOS + + output = " .\n" + assert_equal output, shell_output("#{bin}/sordi input.ttl") + end +end diff --git a/Formula/s/souffle.rb b/Formula/s/souffle.rb new file mode 100644 index 0000000000000..4ec4d2c49e31b --- /dev/null +++ b/Formula/s/souffle.rb @@ -0,0 +1,66 @@ +class Souffle < Formula + desc "Logic Defined Static Analysis" + homepage "https://souffle-lang.github.io" + url "https://github.com/souffle-lang/souffle/archive/refs/tags/2.5.tar.gz" + sha256 "5d009ad6c74ccec10207d865c059716afac625759bff7c8070e529bd80385067" + license "UPL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e5811b6c5a6bf21ff0491e577590568243072a1431adc517a7880106785e9ebd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2bc7684a7337a00f830ce5d496f15b06e3870a2416737cbd791cb50e399d9c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1df31eac00a747cd74fd31aff745ab4164362cbc737d53264d2b40178a3c2cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "29f023e79b7d2fe1310378dcad026608895475880f80bc050131ea48842a93da" + sha256 cellar: :any_skip_relocation, sonoma: "732925d732bd977ad72315894d0f2deadb35a2ac092b4dcc615b699ed3e0e243" + sha256 cellar: :any_skip_relocation, ventura: "4287f9391ad73a50eb0c6e578955529a2b36d517f43e60d2e1553114d7ef56b2" + sha256 arm64_linux: "4189ff925d166433ce98ab437c26c913bd62c81e706fa3e82a2858f9ff0ce60f" + sha256 x86_64_linux: "5fd9b1a03f7400bbe208d30058cf4850a03e2c768918f5918a549f277966e9ba" + end + + depends_on "bison" => :build # Bison included in macOS is out of date. + depends_on "cmake" => :build + depends_on "mcpp" => :build + depends_on "pkgconf" => :build + uses_from_macos "flex" => :build + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + def install + cmake_args = [ + "-DSOUFFLE_DOMAIN_64BIT=ON", + "-DSOUFFLE_GIT=OFF", + "-DSOUFFLE_BASH_COMPLETION=ON", + "-DBASH_COMPLETION_COMPLETIONSDIR=#{bash_completion}", + "-DSOUFFLE_VERSION=#{version}", + "-DPACKAGE_VERSION=#{version}", + ] + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + inreplace "#{buildpath}/build/src/souffle-compile.py" do |s| + s.gsub!(/"compiler": ".*?"/, "\"compiler\": \"/usr/bin/c++\"") + s.gsub!(%r{-I.*?/src/include }, "") + s.gsub!(%r{"source_include_dir": ".*?/src/include"}, "\"source_include_dir\": \"#{include}\"") + end + system "cmake", "--build", "build", "--target", "install" + include.install Dir["src/include/*"] + man1.install Dir["man/*"] + end + + test do + (testpath/"example.dl").write <<~EOS + .decl edge(x:number, y:number) + .input edge(delimiter=",") + + .decl path(x:number, y:number) + .output path(delimiter=",") + + path(x, y) :- edge(x, y). + EOS + (testpath/"edge.facts").write <<~EOS + 1,2 + EOS + system bin/"souffle", "-F", "#{testpath}/.", "-D", "#{testpath}/.", "#{testpath}/example.dl" + assert_path_exists testpath/"path.csv" + assert_equal "1,2\n", shell_output("cat #{testpath}/path.csv") + end +end diff --git a/Formula/s/sound-touch.rb b/Formula/s/sound-touch.rb new file mode 100644 index 0000000000000..04054ef70679f --- /dev/null +++ b/Formula/s/sound-touch.rb @@ -0,0 +1,40 @@ +class SoundTouch < Formula + desc "Audio processing library" + homepage "https://www.surina.net/soundtouch/" + url "https://codeberg.org/soundtouch/soundtouch/archive/2.4.0.tar.gz" + sha256 "3dda3c9ab1e287f15028c010a66ab7145fa855dfa62763538f341e70b4d10abd" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "023d3c93b87887210efbaea61e5fb4f8d1ad156ac99f69675605df0a053d1d62" + sha256 cellar: :any, arm64_sequoia: "73661d9ef5c0d165ac98a00a189973b287b38609523d2807ca89edffcfafaa73" + sha256 cellar: :any, arm64_sonoma: "b262bd9eaeee94084f75336d6e9d3e3beaa631dd8168a004ced337f36e433828" + sha256 cellar: :any, arm64_ventura: "c0e31eee1801826eb30ca5a753f35c11ec679b19b802554d00cfb096b494af0f" + sha256 cellar: :any, sonoma: "15882d0b1444f3373fbe8440de6fa9b9d561de20a1c2cfad22c40894c3c182d4" + sha256 cellar: :any, ventura: "f7b88e434c4ee3c9ac2e9d5676f205fa40da9ddb7d32e89ad2e618aac70b6556" + sha256 cellar: :any_skip_relocation, arm64_linux: "351f5272b57863806eae41298ba7658c74fc3974de8b8baf8677203701535b7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ded546915e0db8508a66b0883f0385e89a5b5ae88f5c4607d27545c3a5c1697" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + ENV.append "CXXFLAGS", "-std=c++14" + + system "/bin/sh", "bootstrap" + args = %W[ + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + ] + + system "./configure", *args + system "make", "install" + end + + test do + assert_match "SoundStretch v#{version} -", shell_output("#{bin}/soundstretch 2>&1", 255) + end +end diff --git a/Formula/s/source-highlight.rb b/Formula/s/source-highlight.rb new file mode 100644 index 0000000000000..c0ccceb328c0c --- /dev/null +++ b/Formula/s/source-highlight.rb @@ -0,0 +1,49 @@ +class SourceHighlight < Formula + desc "Source-code syntax highlighter" + homepage "https://www.gnu.org/software/src-highlite/" + url "https://ftpmirror.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz" + mirror "https://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz" + sha256 "3a7fd28378cb5416f8de2c9e77196ec915145d44e30ff4e0ee8beb3fe6211c91" + license "GPL-3.0-or-later" + revision 6 + + livecheck do + url :stable + regex(/href=.*?source-highlight[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "e05f56b94a75e09f12a5653c3b48a960a72efba4f4c449e8f00967208f271e93" + sha256 arm64_sequoia: "8cc450abef52155d24d50527365267af448fa9ebc15d8843e779fb46f0be96a9" + sha256 arm64_sonoma: "e44e2d57c3193035e2e2a81bb5b1a4a58e9d390679679e200ed8226967d20b81" + sha256 arm64_ventura: "7dcd24af23b31fc601b91e87309186ec0bbfdd6de9df721f25c6d3bf1589ba99" + sha256 sonoma: "72290398f59884c5ccfb7960219c3e15199bbacecad195f464c8750f7e448863" + sha256 ventura: "b004e32044ef67916ca8ef70324df7dcc5c01e777d76d17fcdb86e11a57595ee" + sha256 arm64_linux: "05ca474d2414b0531fc722d5ee5977c5f0d61f32785f47761d0a8056cbc712bc" + sha256 x86_64_linux: "09c0f664ede1dd50549c8cae4dd1a57b587c81da49a3f03b5d0b78e33f15a935" + end + + depends_on "boost" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + ENV.cxx11 + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-boost=#{Formula["boost"].opt_prefix}" + system "make", "install" + + bash_completion.install "completion/source-highlight" + end + + test do + assert_match "GNU Source-highlight #{version}", shell_output("#{bin}/source-highlight -V") + end +end diff --git a/Formula/s/source-to-image.rb b/Formula/s/source-to-image.rb new file mode 100644 index 0000000000000..60934b3e60919 --- /dev/null +++ b/Formula/s/source-to-image.rb @@ -0,0 +1,35 @@ +class SourceToImage < Formula + desc "Tool for building source and injecting into docker images" + homepage "https://github.com/openshift/source-to-image" + url "https://github.com/openshift/source-to-image.git", + tag: "v1.5.1", + revision: "c301811d969b777bfe058016bf97a8b0441b581a" + license "Apache-2.0" + head "https://github.com/openshift/source-to-image.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7735582f91687e77f5e48c13fa4c8a53ce5fccb4432e68799ed548c869801ef5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7778f7eed763ebd1813a981473c5dc3420e4f1e537b385ddfb04d732c248c19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5859f81f7f4b2e3c99b9e404a4b31d8f8bb819a6cc353a12d682298541420f29" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3f76254dcc783550de56245b53142ca82df53ee5df5708eab4614a201ac3843" + sha256 cellar: :any_skip_relocation, sonoma: "140175f74190d78aa15506c88c60e4b0edf3f0a610631331cf5c89be2c07d499" + sha256 cellar: :any_skip_relocation, ventura: "4306563c8c5eac66011ea690f7c334334f5769b9b72986483201f7c8a3eed88d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b56f0ebfe195a88d684881f6240c4c2a2ea906a9e62c9b4b8ac667831b2f11ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "274fd87a87e799afb59ec2e03b3ac12bf555f491bf0395ff1921c353d87375ad" + end + + depends_on "go" => :build + + def install + system "hack/build-go.sh" + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + bin.install "_output/local/bin/#{OS.kernel_name.downcase}/#{arch}/s2i" + + generate_completions_from_executable(bin/"s2i", "completion", shells: [:bash, :zsh]) + end + + test do + system bin/"s2i", "create", "testimage", testpath + assert_path_exists testpath/"Dockerfile", "s2i did not create the files." + end +end diff --git a/Formula/s/sourcedocs.rb b/Formula/s/sourcedocs.rb new file mode 100644 index 0000000000000..5c31ae6956bc9 --- /dev/null +++ b/Formula/s/sourcedocs.rb @@ -0,0 +1,98 @@ +class Sourcedocs < Formula + desc "Generate Markdown files from inline source code documentation" + homepage "https://github.com/SourceDocs/SourceDocs" + url "https://github.com/SourceDocs/SourceDocs/archive/refs/tags/2.0.1.tar.gz" + sha256 "07547c929071124264ec9cc601331f21dc67a104ffc76fbc1801c1ecb4c35bbf" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c4ece7ed5a98c8df2e5e4589c10559f8ed042a413da225b2ca7eb051fe0da7ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "469c4069a84bcc4e8ed58db567eeca9bb8d13311b0c3b5d289bd61a9d1a09aba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7cb1a6469f057e769fd3ea2e22e2a288b16d42a7b44a3688e1f0787288e6fa2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "54139f452dcce5a6bb3d42f6483a1ddab9a97705b1b07d89f70333e9a0a770dc" + sha256 cellar: :any_skip_relocation, sonoma: "55d0026d803e708bd167e4817a0f278f0bc0b393103711c0fdc1db59f2ce5063" + sha256 cellar: :any_skip_relocation, ventura: "4b08ada0cacbbfde31cdf88bfc10aba963442a03363844c888c39d9cd6d8862c" + sha256 arm64_linux: "7698fc8b57805896688c2e9058fb25e4aa7f6189f4252e8d253a02662e98321b" + sha256 x86_64_linux: "2c97cd8daa81d7c7e546e71cdfdf17db555dee5260d434287266f20edb3a25a6" + end + + depends_on xcode: ["12.0", :build, :test] + uses_from_macos "swift" + + # Workaround until SourceKitten dependency is updated + # Ref: https://github.com/SourceDocs/SourceDocs/pull/83 + resource "SourceKitten" do + if DevelopmentTools.clang_build_version >= 1600 + # https://github.com/SourceDocs/SourceDocs/blob/2.0.1/Package.resolved#L32-L38 + url "https://github.com/jpsim/SourceKitten.git", + tag: "0.32.0", + revision: "817dfa6f2e09b0476f3a6c9dbc035991f02f0241" + + # Backport of import from HEAD + patch :DATA + end + end + + def install + args = ["--disable-sandbox", "--configuration", "release"] + if DevelopmentTools.clang_build_version >= 1600 + res = resource("SourceKitten") + (buildpath/"SourceKitten").install res + + pin_version = JSON.parse(File.read("Package.resolved")) + .dig("object", "pins") + .find { |pin| pin["package"] == "SourceKitten" } + .dig("state", "version") + odie "Check if SourceKitten patch is still needed!" if pin_version != res.version + + system "swift", "package", *args, "edit", "SourceKitten", "--path", buildpath/"SourceKitten" + end + + system "swift", "build", *args + bin.install ".build/release/sourcedocs" + generate_completions_from_executable(bin/"sourcedocs", "--generate-completion-script") + end + + test do + assert_match "SourceDocs v#{version}", shell_output("#{bin}/sourcedocs version") + + # There are some issues with SourceKitten running in sandbox mode in Mojave + # The following test has been disabled on Mojave until that issue is resolved + # - https://github.com/Homebrew/homebrew/pull/50211 + # - https://github.com/Homebrew/homebrew-core/pull/32548 + if OS.mac? && MacOS.version < "10.14" + mkdir "foo" do + system "swift", "package", "init" + system "swift", "build", "--disable-sandbox" + system bin/"sourcedocs", "generate", + "--spm-module", "foo", + "--output-folder", testpath/"Documentation/Reference" + assert_path_exists testpath/"Documentation/Reference/README.md" + end + end + end +end + +__END__ +diff --git a/Source/SourceKittenFramework/SwiftDocs.swift b/Source/SourceKittenFramework/SwiftDocs.swift +index 1d2473c..70de287 100644 +--- a/Source/SourceKittenFramework/SwiftDocs.swift ++++ b/Source/SourceKittenFramework/SwiftDocs.swift +@@ -10,6 +10,14 @@ + import SourceKit + #endif + ++#if os(Linux) ++import Glibc ++#elseif os(Windows) ++import CRT ++#else ++import Darwin ++#endif ++ + /// Represents docs for a Swift file. + public struct SwiftDocs { + /// Documented File. diff --git a/Formula/s/sourcekitten.rb b/Formula/s/sourcekitten.rb new file mode 100644 index 0000000000000..340ccb5bfc6e2 --- /dev/null +++ b/Formula/s/sourcekitten.rb @@ -0,0 +1,37 @@ +class Sourcekitten < Formula + desc "Framework and command-line tool for interacting with SourceKit" + homepage "https://github.com/jpsim/SourceKitten" + url "https://github.com/jpsim/SourceKitten.git", + tag: "0.37.2", + revision: "731ffe6a35344a19bab00cdca1c952d5b4fee4d8" + license "MIT" + revision 1 + head "https://github.com/jpsim/SourceKitten.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a7b279f3603cae2b43cfc554cfe772cc6a1abda9e6c58bedf624e44981ff789" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2796fe674c035f08a61ff4794a3d5aa2c2572384f31afe4360e24cc6c8c606fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "02deae6e801c0334b8b7e919a22b53887dfa52c4a2c46fc1b5c5488d3c537a4f" + sha256 cellar: :any_skip_relocation, sonoma: "d96d22c0dd1561f4739a4ae689d0e6f17144901986525ae2aa047900db9cee26" + sha256 arm64_linux: "67774c0efaa24dbbf3167ff1b2c44e5d08169e67aee37b85c7034528d55d68c0" + sha256 x86_64_linux: "55c8b56cd5c2ca875f3d2cc4498fed128fae7b0ee0e5305ae02e390b2ed89814" + end + + depends_on xcode: ["14.0", :build] + depends_on xcode: "6.0" + + uses_from_macos "swift" + + def install + system "make", "prefix_install", "PREFIX=#{prefix}", "TEMPORARY_FOLDER=#{buildpath}/SourceKitten.dst" + generate_completions_from_executable(bin/"sourcekitten", "--generate-completion-script") + end + + test do + system bin/"sourcekitten", "version" + return if OS.mac? && MacOS::Xcode.version < 14 + + ENV["IN_PROCESS_SOURCEKIT"] = "YES" + system bin/"sourcekitten", "syntax", "--text", "import Foundation // Hello World" + end +end diff --git a/Formula/s/sourcery.rb b/Formula/s/sourcery.rb new file mode 100644 index 0000000000000..e738394a48262 --- /dev/null +++ b/Formula/s/sourcery.rb @@ -0,0 +1,43 @@ +class Sourcery < Formula + desc "Meta-programming for Swift, stop writing boilerplate code" + homepage "https://github.com/krzysztofzablocki/Sourcery" + url "https://github.com/krzysztofzablocki/Sourcery/archive/refs/tags/2.3.0.tar.gz" + sha256 "097aa2628cfbba2f8c2d412c57f7179c96082ab034fc6b2a2e905a0d344269e6" + license "MIT" + version_scheme 1 + head "https://github.com/krzysztofzablocki/Sourcery.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d293720e393e8f1cdb9934480c57c2988197b8687866647d852007cd306bb532" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9b00239a0776854f00ea97b0f39f7427a0d1918b262a1e9870c0609e8ad3704" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bebaf580a1245a2252b45bfe47f2379fbf1b45a6d9d719519e34c3f5082f1396" + sha256 cellar: :any_skip_relocation, sonoma: "3195f7b0b2da7dc65223012c8780d00967bf4e77eaef7c65b883b1d63d7a2be0" + sha256 arm64_linux: "6db97b372c4ec3fb2d91b02d84a63344cd812abc10a7f59064204ca30121f977" + sha256 x86_64_linux: "521ecc8ae4d51e5a43935abaed048f64b7738b0e88291606d0bc38a4eaee0ade" + end + + depends_on xcode: "14.3" + + uses_from_macos "ruby" => :build + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "sqlite" + uses_from_macos "swift" + + def install + # Build script is unfortunately not customisable. + # We want static stdlib on Linux as the stdlib is not ABI stable there. + inreplace "Rakefile", "--disable-sandbox", "--static-swift-stdlib" if OS.linux? + + system "rake", "build" + bin.install "cli/bin/sourcery" + lib.install Dir["cli/lib/*.dylib"] + end + + test do + # Regular functionality requires a non-sandboxed environment, so we can only test version/help here. + assert_match version.to_s, shell_output("#{bin}/sourcery --version").chomp + end +end diff --git a/Formula/s/sox.rb b/Formula/s/sox.rb new file mode 100644 index 0000000000000..a49f5966a8d76 --- /dev/null +++ b/Formula/s/sox.rb @@ -0,0 +1,72 @@ +class Sox < Formula + desc "SOund eXchange: universal sound sample translator" + homepage "https://sox.sourceforge.net/" + url "https://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.gz" + sha256 "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c" + license all_of: ["LGPL-2.0-only", "GPL-2.0-only"] + revision 6 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "efd1927beadef2b84a6a9840549240134d77eff31208e118f37463f8042874ae" + sha256 cellar: :any, arm64_sequoia: "dd3179a8e7d8399ef404e8e19e199d7cb2d43bc7472cc6e5932777dd204ea20f" + sha256 cellar: :any, arm64_sonoma: "ec5c73d125f2ac73ddde98d2264a298611f2dd819a873e115178f083216064bd" + sha256 cellar: :any, arm64_ventura: "719011d445046c330686ae5fef7df2561b14c9f966025263bb948b176b528552" + sha256 cellar: :any, sonoma: "b9caf7383de463f53526e60b33f07792bcbd89a99d358ed76ed91df4ac580b58" + sha256 cellar: :any, ventura: "a582da3eaee0febd63765341ba7e70fabc57895f7595641fe1565dff40929231" + sha256 cellar: :any_skip_relocation, arm64_linux: "526bdf965df84741c4e639c24931f3f03e9b19d438caa735192214e1831d809f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c44da47de6f97f6e1542c5757a01e7aa1dad4ba631d2ae3eb0c24c1bca09a5d" + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "lame" + depends_on "libogg" + depends_on "libpng" + depends_on "libsndfile" + depends_on "libvorbis" + depends_on "mad" + depends_on "opusfile" + + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + end + + conflicts_with "sox_ng", because: "both install `play`, `rec`, `sox`, `soxi` binaries" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + # Applies Eric Wong's patch to fix device name length in MacOS. + # This patch has been in a "potential updates" branch since 2016. + # There is nothing to indicate when, if ever, it will or will not make it + # into the main branch, unfortunately. + patch do + url "https://80x24.org/sox.git/patch?id=bf2afa54a7dec" + sha256 "0cebb3d4c926a2cf0a506d2cd62576c29308baa307df36fddf7c6ae4b48df8e7" + end + + def install + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + args = [] + args << "--with-alsa" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + input = testpath/"test.wav" + output = testpath/"concatenated.wav" + cp test_fixtures("test.wav"), input + system bin/"sox", input, input, output + assert_path_exists output + end +end diff --git a/Formula/s/sox_ng.rb b/Formula/s/sox_ng.rb new file mode 100644 index 0000000000000..a37dedc8d66a9 --- /dev/null +++ b/Formula/s/sox_ng.rb @@ -0,0 +1,57 @@ +class SoxNg < Formula + desc "Sound eXchange NG" + homepage "https://codeberg.org/sox_ng/sox_ng" + url "https://codeberg.org/sox_ng/sox_ng/releases/download/sox_ng-14.6.1/sox_ng-14.6.1.tar.gz" + sha256 "bb03126de6b3ce0049801466f067097eb73f8a2fc11e9239ed00744f42691145" + license "GPL-2.0-only" + head "https://codeberg.org/sox_ng/sox_ng.git", branch: "main" + + livecheck do + url :stable + regex(/^sox_ng[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5437c62fed1f2d9b342a9cbb250fa0a8a3f99ebeafa211deb3a7802d0b26364d" + sha256 cellar: :any, arm64_sequoia: "6ad2694a01ee6a95257f3c3cc507a49338e1623a3da61fd290799d836aa90c5d" + sha256 cellar: :any, arm64_sonoma: "a3103e7db24d520e2a99b62b5c6858b4d90d3b328493d164f59beb04364f8318" + sha256 cellar: :any, sonoma: "c5b9ed609d9e0d20c0c439ec1e48840e39031539940083120ae7a2969be83a76" + sha256 cellar: :any_skip_relocation, arm64_linux: "920751d9eccb44e953ec1a7aa4df663175968dd0c2649e1c1a5e3df76efb5905" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3c9c700e5f99fd5d80bd163dfa38126b2d11f25dddc9ebf96709623d7561b25" + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "lame" + depends_on "libogg" + depends_on "libpng" + depends_on "libsndfile" + depends_on "libvorbis" + depends_on "mad" + depends_on "opusfile" + depends_on "wavpack" + + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + end + + conflicts_with "sox", because: "both install `play`, `rec`, `sox`, `soxi` binaries" + + def install + args = %w[--enable-replace] + args << "--with-alsa" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + input = testpath/"test.wav" + output = testpath/"concatenated.wav" + cp test_fixtures("test.wav"), input + system bin/"sox", input, input, output + assert_path_exists output + end +end diff --git a/Formula/s/spaceinvaders-go.rb b/Formula/s/spaceinvaders-go.rb new file mode 100644 index 0000000000000..dc80c47fe87ed --- /dev/null +++ b/Formula/s/spaceinvaders-go.rb @@ -0,0 +1,39 @@ +class SpaceinvadersGo < Formula + desc "Space Invaders in your terminal written in Go" + homepage "https://github.com/asib/spaceinvaders" + url "https://github.com/asib/spaceinvaders/archive/refs/tags/v1.2.1.tar.gz" + sha256 "3fef982b94784d34ac2ae68c1d5dec12e260974907bce83528fe3c4132bed377" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b15177ecf88a2b31fa74e3abd9a792f2762cc58b50d201f2f6423d3c53a45dc7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3be01a0f665ce0362b3fa26c19548b9952b107d427f4c381e809ccc4a0760cba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4aa933312ef52bc92b44dcc77e5da754fe2a702832e33d2839f587eb9b3261f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7965be321dbd3d56b85a22bb178ce8723fe65b20391ae215ecf594ee3f45ffa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "57c34b53c55580602720eda4556939f1faf1a0822e021ae6f90568ab2d204994" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6843984a81fcb723c3b1487a77c44f2a186a8cb17f00b0531bc8c8259afa303c" + sha256 cellar: :any_skip_relocation, sonoma: "c1079b76c7447a6cdcc7bc6cb67527602725828a8eb690582f07da939435d88e" + sha256 cellar: :any_skip_relocation, ventura: "2f88ced1590ef728581255dab2de51ea7374d864bc2c4333c0a845fce83b1812" + sha256 cellar: :any_skip_relocation, monterey: "c23c5bfc361fe30fb1407a346a3c215629a2423c2123c3d99609cc7b820333d9" + sha256 cellar: :any_skip_relocation, big_sur: "c0ed01fe110f5d7d681d12883f58962ae5c0ea721b032e8d3ef0adee41956841" + sha256 cellar: :any_skip_relocation, catalina: "1c4712409711d84aa1a7ce64214bb620e13660991f2afacd41681278ae0c3ba1" + sha256 cellar: :any_skip_relocation, arm64_linux: "758693fc598848fccb124fed344f21e01a2f686e4883b312f26b83b809fa0fcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d2e59d2248dd8e1ce86416197eb5109f7c3c51d98b686517ce3d9fde948d572" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"spaceinvaders") + end + + test do + IO.popen("#{bin}/spaceinvaders", "r+") do |pipe| + pipe.puts "q" + pipe.close_write + pipe.close + end + end +end diff --git a/Formula/s/spaceman-diff.rb b/Formula/s/spaceman-diff.rb new file mode 100644 index 0000000000000..2338259342eac --- /dev/null +++ b/Formula/s/spaceman-diff.rb @@ -0,0 +1,28 @@ +class SpacemanDiff < Formula + desc "Diff images from the command-line" + homepage "https://github.com/holman/spaceman-diff" + url "https://github.com/holman/spaceman-diff/archive/refs/tags/v1.0.3.tar.gz" + sha256 "347bf7d32d6c2905f865b90c5e6f4ee2cd043159b61020381f49639ed5750fdf" + license "MIT" + head "https://github.com/holman/spaceman-diff.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "36d9e7a82debbc9f11c998ed776c67172a8ee7dfc08ced8c840dc430c906fba1" + end + + depends_on "imagemagick" + depends_on "jp2a" + + def install + bin.install "spaceman-diff" + end + + test do + # need to configure to use with git-diff + output = shell_output(bin/"spaceman-diff") + assert_match "spaceman-diff fileA shaA modeA fileB shaB modeB", output + end +end diff --git a/Formula/s/spacer.rb b/Formula/s/spacer.rb new file mode 100644 index 0000000000000..3c96c993b0fed --- /dev/null +++ b/Formula/s/spacer.rb @@ -0,0 +1,37 @@ +class Spacer < Formula + desc "Small command-line utility for adding spacers to command output" + homepage "https://github.com/samwho/spacer" + url "https://github.com/samwho/spacer/archive/refs/tags/v0.5.0.tar.gz" + sha256 "310b08c538c04bae779a1c4786430e974801e8880a4c5256dc0877bc82b61af0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c9ad1d7ef330ecff134c5087b76e6b5855a09e09dd39948a3de6c89f9db7bdc4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b44c96456fb68e660e0904708225cdec6910607192d425dc5b3e1ccfda3eb1e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8588858045ca5046703dc2a0ad1973f47baeee8ab1f22559cd4bdc30aa4905e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b23b6de05f16c8231f4bfddf0a21fe48b76d6b894f5eb4f11caff5e9d68d3b09" + sha256 cellar: :any_skip_relocation, sonoma: "c33bc9a0c463d9864f5aad7319f9f751a817376cb492f8d2887377be1a512dbc" + sha256 cellar: :any_skip_relocation, ventura: "1aea63a3358c379050d554e6897d1500a3fb10731ed56bf433bf607336fb61dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "772ffb42357d2155e5e8fbbb3aee2c49e117f5b20c896a0ef2e7f3629e8ce176" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea85a47a83223e6907e372483ba50eca0b34643c9f8fec558fe2f605692f2e9c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/spacer --version").chomp + date = shell_output("date +'%Y-%m-%d'").chomp + spacer_in = shell_output( + "i=0 + while [ $i -le 2 ]; + do echo $i; sleep 1 + i=$(( i + 1 )) + done | #{bin}/spacer --after 0.5", + ).chomp + assert_includes spacer_in, date + end +end diff --git a/Formula/s/spaceship.rb b/Formula/s/spaceship.rb new file mode 100644 index 0000000000000..ff089a22a10ab --- /dev/null +++ b/Formula/s/spaceship.rb @@ -0,0 +1,40 @@ +class Spaceship < Formula + desc "Zsh prompt for Astronauts" + homepage "https://spaceship-prompt.sh/" + url "https://github.com/spaceship-prompt/spaceship-prompt/archive/refs/tags/v4.19.1.tar.gz" + sha256 "c74c24b899df46656dfce56e330e5a70801bd54dcf3ebac877f99c1ce7b07c63" + license "MIT" + head "https://github.com/spaceship-prompt/spaceship-prompt.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5d7ebf8c4287d2e7dc9f067d9be745a5ee11fe6fefdad12a2e53cb575bca0db7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "260a6bd913f5af19058338f46a169999e32d25787fb2dddc8f4dd5e510e5ff87" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d74fa6ef80e222ed800d3dc0d56e6f76dc6e260a80fdc5e2d5b0174a2a56514a" + sha256 cellar: :any_skip_relocation, sonoma: "86e6e526c2741c544d3748e06915face82bdcfc5f6f658912c430f12a8010d88" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4ce2b91005163820f34eda2704476acb27352b46079b5fc78adc19894a2235b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "783bf9c28e2bf2535d8a3b9ea2c1530dd3444e1db13df3f4b8bc97e398283abc" + end + + depends_on "zsh-async" + uses_from_macos "zsh" => :test + + def install + system "make", "compile" + prefix.install Dir["*"] + end + + def caveats + <<~EOS + To activate Spaceship, add the following line to ~/.zshrc: + source "#{opt_prefix}/spaceship.zsh" + If your .zshrc sets ZSH_THEME, remove that line. + EOS + end + + test do + assert_match "SUCCESS", + shell_output("zsh -fic '. #{opt_prefix}/spaceship.zsh && (( ${+SPACESHIP_VERSION} )) && echo SUCCESS'") + end +end diff --git a/Formula/s/spack.rb b/Formula/s/spack.rb new file mode 100644 index 0000000000000..d2bc5d2243cdb --- /dev/null +++ b/Formula/s/spack.rb @@ -0,0 +1,45 @@ +class Spack < Formula + desc "Package manager that builds multiple versions and configurations of software" + homepage "https://spack.io" + url "https://github.com/spack/spack/archive/refs/tags/v1.0.2.tar.gz" + sha256 "c0d4f142ba45160b7cb3fa0c6bb23633734cef689a4a193eb91d08c233ba1f1b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/spack/spack.git", branch: "develop" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "99cb7e77f82f67d76e50ef5b5c4cd1806cfc85d2c31083a5861ac134c944b8c2" + end + + uses_from_macos "python" + + skip_clean "var/spack/junit-report" + + def install + # Remove Windows files + rm Dir["bin/*.bat", "bin/*.ps1", "bin/haspywin.py"] + # Build an `:all` bottle by removing test files + rm_r "lib/spack/spack/test" + + prefix.install Dir["*"] + (prefix/"var/spack/junit-report").mkpath + end + + test do + ENV["SPACK_USER_CONFIG_PATH"] = testpath + (testpath/"config.yaml").write <<~YAML + config: + install_tree: #{testpath}/opt/spack + YAML + + system bin/"spack", "--version" + assert_match "zlib", shell_output("#{bin}/spack info zlib") + system bin/"spack", "compiler", "find" + expected = OS.mac? ? "clang" : "gcc" + assert_match expected, shell_output("#{bin}/spack compiler list") + end +end diff --git a/Formula/s/spades.rb b/Formula/s/spades.rb new file mode 100644 index 0000000000000..c083453928ee8 --- /dev/null +++ b/Formula/s/spades.rb @@ -0,0 +1,50 @@ +class Spades < Formula + include Language::Python::Shebang + + desc "De novo genome sequence assembly" + homepage "https://ablab.github.io/spades/" + url "https://github.com/ablab/spades/releases/download/v4.2.0/SPAdes-4.2.0.tar.gz" + sha256 "043322129f8536411f1172b7d1c9adfcb6d49d152c10066ccc03e86b6f615a6b" + license "GPL-2.0-only" + head "https://github.com/ablab/spades.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "dfb1b8e8a099823127b97e10c3cf6951b71fa135cbab935f82ebf4beb5fc4bd7" + sha256 cellar: :any, arm64_sequoia: "4434b0f70adbcc1995b80975edf1d35b0e171524f89e2de496e66cd664090407" + sha256 cellar: :any, arm64_sonoma: "787fc89b652698b3610ecfde765de7dfb947a0517e5cd4ff35345303561fad21" + sha256 cellar: :any, sonoma: "5c7ce0aa451474c9cb40dfaf9ea5d7d4331dafb3304eb3586e2fea88d3330a61" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c9ee246e19db295757ed9cbf2b4f3b75d2476620778e28411feae289bc7ed34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56929dd62ca2109f9194096c04452dbe7f572a9858cdc54d1fbeeb7743af4563" + end + + depends_on "cmake" => :build + depends_on "python@3.14" + + uses_from_macos "bzip2" => :build + + on_macos do + depends_on "libomp" + end + + def install + system "cmake", "-S", "src", "-B", "build", *std_cmake_args + # Build bundled zlib-ng with runtime detection + with_env(HOMEBREW_CCCFG: ENV["HOMEBREW_CCCFG"]) do + ENV.runtime_cpu_detection + system "cmake", "--build", "build", "--target", "zlibstatic" + end + system "cmake", "--build", "build" + system "cmake", "--install", "build" + rewrite_shebang detected_python_shebang, *bin.children + end + + test do + assert_match "TEST PASSED CORRECTLY", shell_output("#{bin}/spades.py --test") + end +end diff --git a/Formula/s/spago.rb b/Formula/s/spago.rb new file mode 100644 index 0000000000000..36ebe2f682290 --- /dev/null +++ b/Formula/s/spago.rb @@ -0,0 +1,76 @@ +class Spago < Formula + desc "PureScript package manager and build tool" + homepage "https://github.com/purescript/spago" + url "https://github.com/purescript/spago/archive/refs/tags/0.21.0.tar.gz" + sha256 "0ae1b042010c4d1ffb3865ba0cf67beea741a40c724065dc4056367964b6f4ab" + license "BSD-3-Clause" + head "https://github.com/purescript/spago.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9d5eab4b1fb90ac9d885b97b5babd968405a5d5de9e868646f9a999eda30ea46" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a1c516a357d01efcef8d2dc263ca4785c24b3e48559974925e8dfd985a672bf3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9ff1f1056aefbd2ea4e1ebc0a4415aefab0a21f09e0c90e6ddc0b5e732d75c79" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f0765e9b2ba05a82406efa85966071307b4021c95f6c5ad824a73f2911063856" + sha256 cellar: :any_skip_relocation, sonoma: "8ae60344eaff53522d7e77d7962acccbfece42817364786718412edc50d2cadf" + sha256 cellar: :any_skip_relocation, ventura: "68fa6a6d91f5feee9201731301dbc041654266314ec842dfc4a8998db2d7f38e" + sha256 cellar: :any_skip_relocation, monterey: "cc9358258247e523961b0ebe1647c5559249ef65693ebff3c23fb0bf176f5edc" + sha256 cellar: :any_skip_relocation, big_sur: "1f29c49a689127cf34f05f415d5c980eeea7e6b3c6e7b9df2214b5430f913f03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa71b6e0cbd41ac5c0bb966030f1fe4ca2d1dbc11c19162a9407cd0d0d5d82ab" + end + + # Current release is for deprecated `spago-legacy` that does not build with GHC 9.4+ + # due to `spago -> bower-json -> aeson-better-errors -> aeson<2.1 -> ghc-prim<0.9`. + # Can be un-deprecated/restored if PureScript rewrite has a stable release. + deprecate! date: "2024-08-15", because: "depends on GHC 9.2 to build" + disable! date: "2025-08-16", because: "depends on GHC 9.2 to build" + + depends_on "ghc@9.2" => :build + depends_on "haskell-stack" => :build + depends_on "purescript" + + # Check the `scripts/fetch-templates` file for appropriate resource versions. + resource "docs-search-app-0.0.10.js" do + url "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/docs-search-app.js" + sha256 "45dd227a2139e965bedc33417a895ec7cb267ae4a2c314e6071924d19380aa54" + end + + resource "docs-search-app-0.0.11.js" do + url "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.11/docs-search-app.js" + sha256 "0254c9bd09924352f1571642bf0da588aa9bdb1f343f16d464263dd79b7e169f" + end + + resource "purescript-docs-search-0.0.10" do + url "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/purescript-docs-search" + sha256 "437ac8b15cf12c4f584736a07560ffd13f4440cd0c44c3a6f7a29248a1ff8171" + end + + resource "purescript-docs-search-0.0.11" do + url "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.11/purescript-docs-search" + sha256 "06dfcb9b84408527a2980802108fae6a5260a522013f67d0ef7e83946abe4dc2" + end + + def install + # Equivalent to make fetch-templates: + resources.each do |r| + r.stage do + template = Pathname.pwd.children.first + (buildpath/"templates").install template.to_s => "#{template.basename(".js")}-#{r.version}#{template.extname}" + end + end + + system "stack", "install", "--system-ghc", "--no-install-ghc", "--skip-ghc-check", "--local-bin-path=#{bin}" + generate_completions_from_executable(bin/"spago", "--bash-completion-script", bin/"spago", + shells: [:bash], shell_parameter_format: :none) + generate_completions_from_executable(bin/"spago", "--zsh-completion-script", bin/"spago", + shells: [:zsh], shell_parameter_format: :none) + end + + test do + system bin/"spago", "init" + assert_path_exists testpath/"packages.dhall" + assert_path_exists testpath/"spago.dhall" + assert_path_exists testpath/"src"/"Main.purs" + system bin/"spago", "build" + assert_path_exists testpath/"output"/"Main"/"index.js" + end +end diff --git a/Formula/s/span-lite.rb b/Formula/s/span-lite.rb new file mode 100644 index 0000000000000..2a20dbc38e2ab --- /dev/null +++ b/Formula/s/span-lite.rb @@ -0,0 +1,48 @@ +class SpanLite < Formula + desc "C++20-like span for C++98, C++11 and later in a single-file header-only library" + homepage "https://github.com/martinmoene/span-lite" + url "https://github.com/martinmoene/span-lite/archive/refs/tags/v0.11.0.tar.gz" + sha256 "ef4e028e18ff21044da4b4641ca1bc8a2e2d656e2028322876c0e1b9b6904f9d" + license "BSL-1.0" + head "https://github.com/martinmoene/span-lite.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "389279742b198d8b61719e3ade77c246d03e44e0b7635a77b5fc6f569162199f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DSPAN_LITE_OPT_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--install", "build" + end + + test do + (testpath/"basic.cpp").write <<~CPP + #include "nonstd/span.hpp" + #include + #include + #include + + std::ptrdiff_t size( nonstd::span spn ) + { + return spn.size(); + } + + int main() + { + int arr[] = { 1, }; + + std::cout << + "C-array:" << size( arr ) << + " array:" << size( std::array { 1, 2, } ) << + " vector:" << size( std::vector{ 1, 2, 3, } ); + } + CPP + + system ENV.cxx, "-std=c++11", "-I#{include}", "basic.cpp", "-o", "basic" + system "./basic" + end +end diff --git a/Formula/s/spandsp.rb b/Formula/s/spandsp.rb new file mode 100644 index 0000000000000..53552395ac521 --- /dev/null +++ b/Formula/s/spandsp.rb @@ -0,0 +1,65 @@ +class Spandsp < Formula + desc "DSP functions library for telephony" + homepage "https://www.soft-switch.org/" + url "https://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz" + sha256 "cc053ac67e8ac4bb992f258fd94f275a7872df959f6a87763965feabfdcc9465" + license "LGPL-2.1-only" + revision 3 + + livecheck do + url "https://www.soft-switch.org/downloads/spandsp/" + regex(/href=.*?spandsp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7eb7c7c0692b996402f9debbb20b3d87f5a0e9c17c2c3c73c5ce0589175c104a" + sha256 cellar: :any, arm64_sequoia: "fb9acce46b687e18c6e016cf9db9be77645778722eccc71589bc06b7fa7c6344" + sha256 cellar: :any, arm64_sonoma: "c0031a76da7569594a6e541f5373a81fd8fd67fe51d8ded0bc317c22b7c9d61b" + sha256 cellar: :any, arm64_ventura: "1de79b77a71edef3e67c18da0b22400821a06190cd2c6e1363ed8bdf92fb6379" + sha256 cellar: :any, arm64_monterey: "1dfce0ba8ff13c46c285baa0de02f0d2e82fae7b86ca5e81fdcd5b520924511b" + sha256 cellar: :any, arm64_big_sur: "de22c2ec1fe6dad211a9593851195445774f0e9d49768bfa663b50d8f26c12d0" + sha256 cellar: :any, sonoma: "97da2e382c38c039845f20c0299bee1568ed0d45cec38662427a531fc9091202" + sha256 cellar: :any, ventura: "c950d3121cfcf2033617bac7b3c440ac07b5cba8166102f6fab8aeaa1eec20bb" + sha256 cellar: :any, monterey: "5a2514fe428dbc60642c6d787a0d7e2f9c337ee11c8e0cd10b8e67630919ab82" + sha256 cellar: :any, big_sur: "89a015496e6aedb1a07ae9186b799dfe96ae673213c27a9da9937d3d09ceb577" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca858d2c651cb3176d0e89acb9350b584f884238fc4e285cf7d3fa69d45ff23b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e56ef470947c1215482b5155d62c0c5a6c72485bbea7ce74bf6e8f1d629ab1e1" + end + + depends_on "libtiff" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + ENV.deparallelize + args = ["--disable-silent-rules"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #define SPANDSP_EXPOSE_INTERNAL_STRUCTURES + #include + + int main() + { + t38_terminal_state_t t38; + memset(&t38, 0, sizeof(t38)); + return (t38_terminal_init(&t38, 0, NULL, NULL) == NULL) ? 0 : 1; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lspandsp", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/spark.rb b/Formula/s/spark.rb new file mode 100644 index 0000000000000..83e4b4135c1d6 --- /dev/null +++ b/Formula/s/spark.rb @@ -0,0 +1,22 @@ +class Spark < Formula + desc "Sparklines for the shell" + homepage "https://zachholman.com/spark/" + url "https://github.com/holman/spark/archive/refs/tags/v1.0.1.tar.gz" + sha256 "a81c1bc538ce8e011f62264fe6f33d28042ff431b510a6359040dc77403ebab6" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "538b171dbbf8740d4bd1ead547ed1928f3fc03d6846fd9ab1cc4a6c37707d09c" + end + + def install + bin.install "spark" + end + + test do + system bin/"spark" + end +end diff --git a/Formula/s/sparkey.rb b/Formula/s/sparkey.rb new file mode 100644 index 0000000000000..ad7fbc84cd20b --- /dev/null +++ b/Formula/s/sparkey.rb @@ -0,0 +1,46 @@ +class Sparkey < Formula + desc "Constant key-value store, best for frequent read/infrequent write uses" + homepage "https://github.com/spotify/sparkey/" + url "https://github.com/spotify/sparkey/archive/refs/tags/sparkey-1.0.0.tar.gz" + sha256 "d607fb816d71d97badce6301dd56e2538ef2badb6530c0a564b1092788f8f774" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ff757da573f4fb8d73347565dec379edfd8b4310f03a563c98996b262c6a1226" + sha256 cellar: :any, arm64_sequoia: "452230974e3670cd4241c74f20a71fdeee5ce9f89ab939a5356745e5207bb43e" + sha256 cellar: :any, arm64_sonoma: "a7fc1a935b2c374f931ba2cef61f4c2a5fab149398dd95524d382423afca230b" + sha256 cellar: :any, arm64_ventura: "b5b1dd6314393471c6d94f5cd9417add5c2fb18cae43a8aadb55bc27782ff521" + sha256 cellar: :any, arm64_monterey: "17187c82468ffb126744c6ac8f4bc318a11234923dd70759ed0b2204d949516f" + sha256 cellar: :any, arm64_big_sur: "1b2b1cc05fd4af9994aa34e57bc8767bdb567455e27458e1a9ac38e340603c68" + sha256 cellar: :any, sonoma: "8971cd97310bdd3351b32d80958eec379b95d8a3c18e31310a7453993ef5400d" + sha256 cellar: :any, ventura: "9f5be963c7067cdad5e22789cde8ca2eb21e9d587b538e57c228ab9b9bc90e1e" + sha256 cellar: :any, monterey: "8df24a5323536f451f373746c1a1643ce31967502c3d8cb99807ffca49e53413" + sha256 cellar: :any, big_sur: "6f469c28584124f46a7fa9835dee3311ef02d5a48f2d8fb8c8eb29f2c6688986" + sha256 cellar: :any, catalina: "b7e64101995d257df010edb67bafcd60745f09c7b0ebb9650c817eb7343f1899" + sha256 cellar: :any_skip_relocation, arm64_linux: "a745bf0f972c860c306af016c89015bc1d39e1b5a90a1b553ff9fe65ca48e93b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b9dcde71d3afafa413ad52116f880796bd49f1a715159a794275fb4bd366de1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "snappy" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + mv bin/"bench", bin/"sparkey_bench" + end + + test do + system bin/"sparkey", "createlog", "-c", "snappy", "test.spl" + assert_empty pipe_output("#{bin}/sparkey appendlog -d . test.spl 2>&1", "foo.bar") + + system bin/"sparkey", "writehash", "test.spl" + assert_empty shell_output("#{bin}/sparkey get test.spi foo", 2) + end +end diff --git a/Formula/s/sparse.rb b/Formula/s/sparse.rb new file mode 100644 index 0000000000000..9442a5715aa98 --- /dev/null +++ b/Formula/s/sparse.rb @@ -0,0 +1,46 @@ +class Sparse < Formula + desc "Static C code analysis tool" + homepage "https://sparse.wiki.kernel.org/" + url "https://mirrors.edge.kernel.org/pub/software/devel/sparse/dist/sparse-0.6.4.tar.xz" + sha256 "6ab28b4991bc6aedbd73550291360aa6ab3df41f59206a9bde9690208a6e387c" + license "MIT" + head "https://git.kernel.org/pub/scm/devel/sparse/sparse.git", branch: "master" + + livecheck do + url "https://mirrors.edge.kernel.org/pub/software/devel/sparse/dist/" + regex(/href=.*?sparse[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1812b2141b6a73fa59159ad4600fad73eced788c86121bada4c764f33c0d279f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "56f5a3f7e3acbbd57f46ef1bf435a2a5130d719dd9f28e3578eabe79097aef3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4bf9baccb8ffe407b9f59f8933d72d4676e08adbeffcd4f3dcea9c3b0db9ca5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1c53b9ca28fe2ce54ff72f0f9642289704ccae97868a2a90e2cb02095e8d7df" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3afb8b9256e015fcb1fc49608cea9fe6c02e6a93fa1df0a7720a30c5e8057699" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "57f40e26e5b3c4239c2f247705d3b6b27256482ef67c239cb34bc82ec5cea891" + sha256 cellar: :any_skip_relocation, sonoma: "06d1f2a6ccf48df9c8d8dcc96d38cc9007adccf537fbd1517fdb2d7ff8681bb1" + sha256 cellar: :any_skip_relocation, ventura: "0f5139fcf069d80d6ac94c12904b9f46dd5066b24619dacef6ca3c34442730fe" + sha256 cellar: :any_skip_relocation, monterey: "7c86940a523d15f63966df796fdea74176c02be7adc8c4071d2f60a194bd30af" + sha256 cellar: :any_skip_relocation, big_sur: "c858bb88d9f4d2d00da1d7498ee130a6d134b77a07d786d9b3906b74fedc90b0" + sha256 cellar: :any_skip_relocation, catalina: "a1517973190e2b8fdf21136344334ad757a0bd4fe24ab65c0846a4e5e64b26df" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c108dfd45b36b234fc6962ccf1b3f027185e34a904abcc162575d4e7e480b41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c282a77e53c828abe22a69af0b1dd9cb124b333344f9be1b0f0f3d0a55a3fb0" + end + + def install + # BSD "install" does not understand the GNU -D flag. + # Create the parent directories ourselves. + inreplace "Makefile", "install -D", "install" + bin.mkpath + man1.mkpath + + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.C").write("int main(int a) {return a;}\n") + system bin/"sparse", testpath/"test.C" + end +end diff --git a/Formula/s/spatialindex.rb b/Formula/s/spatialindex.rb new file mode 100644 index 0000000000000..1e81a3764cd97 --- /dev/null +++ b/Formula/s/spatialindex.rb @@ -0,0 +1,87 @@ +class Spatialindex < Formula + desc "General framework for developing spatial indices" + homepage "https://libspatialindex.org/en/latest/" + url "https://github.com/libspatialindex/libspatialindex/releases/download/2.1.0/spatialindex-src-2.1.0.tar.bz2" + sha256 "c59932395e98896038d59199f2e2453595df6d730ffbe09d69df2a661bcb619b" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b53e1ab281e72ef97d3cedf3e2fccc27d21d8e821b608e6a7e5de0f296153b4" + sha256 cellar: :any, arm64_sequoia: "2a84ec0d1a739824971183632c46cd8e1a6e0c8584e00d4ad1d9460d712ee481" + sha256 cellar: :any, arm64_sonoma: "071b7e50fbe7ac47aa578e69edc53c87de74808c8287aa937bdaa50de0e3fa97" + sha256 cellar: :any, arm64_ventura: "ccdbb7d96b49d3a30ad83530034142629350a725e64e1cba2e260b41c7ef15d0" + sha256 cellar: :any, sonoma: "ffd3cfa50eb1ed66c896081d61ce335c968c1f432a95770ffc80233f41ab0571" + sha256 cellar: :any, ventura: "117276faf402a1afed33a420fc9e59f66434612f4f735e307cc13e3d45669f7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d53c0ec9bb0548fba0c58da85496b6da22089392f2c4a3517db8890664c1f52f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "359128f10b75e3ef834f3fbc988856b763caddb96bc006302cf2e6d2a9fb2a99" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # write out a small program which inserts a fixed box into an rtree + # and verifies that it can query it + (testpath/"test.cpp").write <<~CPP + #include + + using namespace std; + using namespace SpatialIndex; + + class MyVisitor : public IVisitor { + public: + vector matches; + + void visitNode(const INode& n) {} + void visitData(const IData& d) { + matches.push_back(d.getIdentifier()); + } + void visitData(std::vector& v) {} + }; + + int main(int argc, char** argv) { + IStorageManager* memory = StorageManager::createNewMemoryStorageManager(); + id_type indexIdentifier; + RTree::RTreeVariant variant = RTree::RV_RSTAR; + ISpatialIndex* tree = RTree::createNewRTree( + *memory, 0.5, 100, 10, 2, + variant, indexIdentifier + ); + /* insert a box from (0, 5) to (0, 10) */ + double plow[2] = { 0.0, 0.0 }; + double phigh[2] = { 5.0, 10.0 }; + Region r = Region(plow, phigh, 2); + + std::string data = "a value"; + + id_type id = 1; + + tree->insertData(data.size() + 1, reinterpret_cast(data.c_str()), r, id); + + /* ensure that (2, 2) is in that box */ + double qplow[2] = { 2.0, 2.0 }; + double qphigh[2] = { 2.0, 2.0 }; + Region qr = Region(qplow, qphigh, 2); + MyVisitor q_vis; + + tree->intersectsWithQuery(qr, q_vis); + + return (q_vis.matches.size() == 1) ? 0 : 1; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lspatialindex", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/spatialite-gui.rb b/Formula/s/spatialite-gui.rb new file mode 100644 index 0000000000000..b7341886de7a7 --- /dev/null +++ b/Formula/s/spatialite-gui.rb @@ -0,0 +1,68 @@ +class SpatialiteGui < Formula + desc "GUI tool supporting SpatiaLite" + homepage "https://www.gaia-gis.it/fossil/spatialite_gui/index" + url "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/spatialite_gui-2.1.0-beta1.tar.gz" + sha256 "ba48d96df18cebc3ff23f69797207ae1582cce62f4596b69bae300ca3c23db33" + license "GPL-3.0-or-later" + revision 12 + + livecheck do + url "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/" + regex(/href=.*?spatialite[._-]gui[._-]v?(\d+(?:\.\d+)+(?:[._-]\w+\d*)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6905028f8a5725ce128325dbe01e1d2b2a0e46de526a1d3409e5162e95a09133" + sha256 cellar: :any, arm64_sequoia: "0729ab0ef78b34d21105dfa31efdb84466c3f1299a11cea3c039ff91725fa941" + sha256 cellar: :any, arm64_sonoma: "024efe736240e668fb049f06eb744ed03223ca08edbb59e00e67dc67d9db1a1e" + sha256 cellar: :any, arm64_ventura: "9e2d9c4d64a8e60daa2420254efbf2495442d957ca58231ae474b4f927e396f0" + sha256 cellar: :any, sonoma: "fe1ceda3cf1e7cde15a38279c2c78c73366bcf44f7f764aaa16d4ddece1c90fa" + sha256 cellar: :any, ventura: "a384ed8c6464d25bdc0e308dec8e3fcafbe3a0ab3d2e051a393f827470a74452" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a6e1e70058432026f675c50dbdba7a5237357de31655d9fb0ba71d4cb86051e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2470cea3a02d2b41424b39e453d047412ecffda08a2aa73d8d10c68ccd9ff90f" + end + + depends_on "pkgconf" => :build + depends_on "freexl" + depends_on "geos" + depends_on "libpq" + depends_on "librasterlite2" + depends_on "librttopo" + depends_on "libspatialite" + depends_on "libtiff" + depends_on "libxlsxwriter" + depends_on "libxml2" + depends_on "lz4" + depends_on "minizip" + depends_on "openjpeg" + depends_on "proj" + depends_on "sqlite" + depends_on "virtualpg" + depends_on "webp" + depends_on "wxwidgets@3.2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + # Link flags for sqlite don't seem to get passed to make, which + # causes builds to fatally error out on linking. + # https://github.com/Homebrew/homebrew/issues/44003 + sqlite = Formula["sqlite"] + ENV.prepend "LDFLAGS", "-L#{sqlite.opt_lib} -lsqlite3" + ENV.prepend "CFLAGS", "-I#{sqlite.opt_include}" + + wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)*)?$/) }.to_formula + wx_config = wxwidgets.opt_bin/"wx-config-#{wxwidgets.version.major_minor}" + args = ["--with-wxconfig=#{wx_config}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/s/spatialite-tools.rb b/Formula/s/spatialite-tools.rb new file mode 100644 index 0000000000000..7e46092d7f302 --- /dev/null +++ b/Formula/s/spatialite-tools.rb @@ -0,0 +1,63 @@ +class SpatialiteTools < Formula + desc "CLI tools supporting SpatiaLite" + homepage "https://www.gaia-gis.it/fossil/spatialite-tools/index" + url "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-5.1.0a.tar.gz" + sha256 "119e34758e8088cdbb43ed81b4a6eaea88c764b0b7da19001a5514b2545501ce" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/" + regex(/href=.*?spatialite-tools[._-]v?(\d+(?:\.\d+)+[a-z]?)\.(?:t|zip)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4fe285baee899201bdbeea2a8e461972a690ed5ed741bccf6cfeaf2277b0bf21" + sha256 cellar: :any, arm64_sequoia: "3a2225e7ff88a5434b9935dc47f265e045644d5efa22e4a942d32c71869833cc" + sha256 cellar: :any, arm64_sonoma: "04ec75c512a3d0c0e9aef46df243130f9c1c9e217c9605af148554a321946642" + sha256 cellar: :any, arm64_ventura: "d7fbe72eae1741ce20b5fe2dcd06b257af9cb642cf706f2012a0c42e007d8b73" + sha256 cellar: :any, sonoma: "fe5c356ae405535cfb7bb9f1ac262b7e6d7178ca84396c4b34a7eb1b8778606b" + sha256 cellar: :any, ventura: "c6ac73412b33855140008c7a03d8216532f3cb91455c779d653d8c6926ea19a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f102739c6d45f16910fa2e1e31cef488345424601fdd0bd31cf42851adb48eba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "670d92603126025a4964546cc86588142cb7211dbbfb9cd43a6c09e1d83fd411" + end + + depends_on "pkgconf" => :build + + depends_on "libspatialite" + depends_on "libxml2" + depends_on "proj" + depends_on "readline" + depends_on "readosm" + depends_on "sqlite" + + uses_from_macos "expat" + + on_macos do + depends_on "freexl" + depends_on "geos" + depends_on "librttopo" + depends_on "minizip" + end + + def install + # See: https://github.com/Homebrew/homebrew/issues/3328 + ENV.append "LDFLAGS", "-liconv" if OS.mac? + # Ensure Homebrew SQLite is found before system SQLite. + sqlite = Formula["sqlite"] + ENV.prepend "LDFLAGS", "-L#{sqlite.opt_lib} -lsqlite3" + ENV.prepend "CFLAGS", "-I#{sqlite.opt_include}" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"spatialite", "--version" + end +end diff --git a/Formula/s/spawn-fcgi.rb b/Formula/s/spawn-fcgi.rb new file mode 100644 index 0000000000000..f4f33ae7f693f --- /dev/null +++ b/Formula/s/spawn-fcgi.rb @@ -0,0 +1,40 @@ +class SpawnFcgi < Formula + desc "Spawn FastCGI processes" + homepage "https://redmine.lighttpd.net/projects/spawn-fcgi" + url "https://www.lighttpd.net/download/spawn-fcgi-1.6.6.tar.gz" + sha256 "4ffe2e9763cf71ca52c3d642a7bfe20d6be292ba0f2ec07a5900c3110d0e5a85" + license "BSD-3-Clause" + head "https://git.lighttpd.net/lighttpd/spawn-fcgi.git", branch: "master" + + livecheck do + url :head + regex(/^(?:spawn-fcgi-)?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5bbb07b33b933e1e9ebd6f2599c7aa1be3baae04fd639e8ec9cc52ba266bd20" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b540af48ba02659346767032b75465695a1fb5b3dafcab07cd36d030853dd2ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e8c306a84a1948d46f1b1ebbd1b687c7af8ca096858d1094669b3458ecb916f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0049c20c4199fa06b3a1c4e6afcdf2a304dca80ecaf1cfbaed01a0c44caaf607" + sha256 cellar: :any_skip_relocation, sonoma: "d17dc03209b37cf23672a7da324f71b08834bd6c3fe93cc208f6479493c3da0a" + sha256 cellar: :any_skip_relocation, ventura: "90b6d07b1720306dcbc1239fcdf9f6f1c84728ae5f6378fd4bf9ca8bb8d00c34" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e628bf7b388f27fe1cf51a0417c5bbf53f2ea29e1d9bb164eeecb649bbfe6fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24d25240823bc460d243bb2c92c1773f9cc650d65361ad4ceaf189390a644227" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"spawn-fcgi", "--version" + end +end diff --git a/Formula/s/spdlog.rb b/Formula/s/spdlog.rb new file mode 100644 index 0000000000000..3f47f7a69e3da --- /dev/null +++ b/Formula/s/spdlog.rb @@ -0,0 +1,70 @@ +class Spdlog < Formula + desc "Super fast C++ logging library" + homepage "https://github.com/gabime/spdlog" + url "https://github.com/gabime/spdlog/archive/refs/tags/v1.16.0.tar.gz" + sha256 "8741753e488a78dd0d0024c980e1fb5b5c85888447e309d9cb9d949bdb52aa3e" + license "MIT" + revision 1 + head "https://github.com/gabime/spdlog.git", branch: "v1.x" + + bottle do + sha256 cellar: :any, arm64_tahoe: "48f60f6f26b8fcbaeba93f5e7f6ce09f4e2caabe401493e8704178e7cf900dd6" + sha256 cellar: :any, arm64_sequoia: "4189a5a09f6df33310f087fc2f05b6efda61ce83bfa65d8f32c61b9eee3a27d7" + sha256 cellar: :any, arm64_sonoma: "722a5865c0eb6229a053dac16b1b656d571153362217f31ae927360a379a3220" + sha256 cellar: :any, sonoma: "bafe8b9c234a4c3794fd802f534e775ca5974315e7e0f0f65815300800d1ebe9" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fd0c9e79d3a2a6d1209fb05980640198f755689fd03fea8fb05b4eb00ff1938" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bc677e2642c10f480a0a1506a8737a27c72dc23ae45e806d5408156192ad411" + end + + depends_on "cmake" => :build + depends_on "fmt" + + def install + ENV.cxx11 + + inreplace "include/spdlog/tweakme.h", "// #define SPDLOG_FMT_EXTERNAL", <<~C + #ifndef SPDLOG_FMT_EXTERNAL + #define SPDLOG_FMT_EXTERNAL + #endif + C + + args = std_cmake_args + %W[ + -Dpkg_config_libdir=#{lib} + -DSPDLOG_BUILD_BENCH=OFF + -DSPDLOG_BUILD_EXAMPLE=OFF + -DSPDLOG_BUILD_TESTS=OFF + -DSPDLOG_FMT_EXTERNAL=ON + ] + system "cmake", "-S", ".", "-B", "build", "-DSPDLOG_BUILD_SHARED=ON", *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "build", "-DSPDLOG_BUILD_SHARED=OFF", *args + system "cmake", "--build", "build" + lib.install "build/libspdlog.a" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "spdlog/sinks/basic_file_sink.h" + #include + #include + int main() + { + try { + auto console = spdlog::basic_logger_mt("basic_logger", "#{testpath}/basic-log.txt"); + console->info("Test"); + } + catch (const spdlog::spdlog_ex &ex) + { + std::cout << "Log init failed: " << ex.what() << std::endl; + return 1; + } + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}", "-L#{Formula["fmt"].opt_lib}", "-lfmt", "-o", "test" + system "./test" + assert_path_exists testpath/"basic-log.txt" + assert_match "Test", (testpath/"basic-log.txt").read + end +end diff --git a/Formula/s/spdx-sbom-generator.rb b/Formula/s/spdx-sbom-generator.rb new file mode 100644 index 0000000000000..0595c8432a5ca --- /dev/null +++ b/Formula/s/spdx-sbom-generator.rb @@ -0,0 +1,49 @@ +class SpdxSbomGenerator < Formula + desc "Support CI generation of SBOMs via golang tooling" + homepage "https://github.com/opensbom-generator/spdx-sbom-generator" + url "https://github.com/opensbom-generator/spdx-sbom-generator/archive/refs/tags/v0.0.15.tar.gz" + sha256 "3811d652de0f27d3bfa7c025aa6815805ef347a35b46f9e2a5093cc6b26f7b08" + license any_of: ["Apache-2.0", "CC-BY-4.0"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3d5f579302dcda06b94f698a0cab5ecf485d399b4e9da91a33433a992c2684c0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca95017f73479fc8907cb24a392bab8d15c69789c565d0f2129502e00d520742" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "489910223a1ba3e54e06461065428738c88018a25f2d82f7fe4e87bb8e8eb552" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1905f9d0dd236c453fe5579857110071680d4241ad4eedb1150bcd5163208fdb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "75f26e3e6fef82389087371f38b3a90081f74a6ad7f0d8dfc2d25f5908600ba9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f56b5a0cc9581b2f7347a23264cd70dcb76e1fa170ababf583fa1d4fad6b36e6" + sha256 cellar: :any_skip_relocation, sonoma: "7fe1dd10d9e54db236333d077866b2ccf958d28b70d6961df38d51e900e517bf" + sha256 cellar: :any_skip_relocation, ventura: "4090620fb4c0f354d773f76323a89052c356d46fd45f311204cc6c3e15644036" + sha256 cellar: :any_skip_relocation, monterey: "af8c523abaa929f3616245751392b6fe9ba998e0f88e798e831d66def859fd88" + sha256 cellar: :any_skip_relocation, big_sur: "3f116d9eb974cd064162a5c55c0143b8b2bf2cb2534b76a27eaedfcef6031da6" + sha256 cellar: :any_skip_relocation, catalina: "f733c9630d8ad36f7ded3b2f9a10267251052625fb63e21fb3acc00f7863f919" + sha256 cellar: :any_skip_relocation, arm64_linux: "d00ff724f5f72911dd7c49600f95a556d18c4654588d6ae4a0a79278431ce29d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd798a009fd918ecc7ebc002b181fc87aa382722f07d6ffdc5b2ab0481ea3951" + end + + deprecate! date: "2025-02-13", because: :repo_archived + + depends_on "go" => [:build, :test] + + def install + target = if OS.linux? + inreplace "Makefile", "GOARCH=amd64", "GOARCH=arm64" if Hardware::CPU.arm? + "build" + elsif Hardware::CPU.arm? + "build-mac-arm64" + else + "build-mac" + end + + system "make", target + + prefix.install "bin" + end + + test do + system "go", "mod", "init", "example.com/tester" + + assert_equal "panic: runtime error: index out of range [0] with length 0", + shell_output("#{bin}/spdx-sbom-generator 2>&1", 2).split("\n")[4] + end +end diff --git a/Formula/s/specify.rb b/Formula/s/specify.rb new file mode 100644 index 0000000000000..e8c6d1cd65786 --- /dev/null +++ b/Formula/s/specify.rb @@ -0,0 +1,125 @@ +class Specify < Formula + include Language::Python::Virtualenv + + desc "Toolkit to help you get started with Spec-Driven Development" + homepage "https://github.com/github/spec-kit" + url "https://github.com/github/spec-kit/archive/refs/tags/v0.0.79.tar.gz" + sha256 "a1284806420629a3b663d689f02019eee3d6e35f0dae223467155eeadcc69491" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1d4d095112b7e9c0664df0565c2dba473a695213fb35469671daac40f14f5f9f" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "readchar" do + url "https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz" + sha256 "91ce3faf07688de14d800592951e5575e9c7a3213738ed01d394dcc949b79adb" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "socksio" do + url "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz" + sha256 "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac" + + # Unpin flit-core<3 to support 3.14+ + patch do + url "https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1.patch?full_index=1" + sha256 "7aefa906b62e2c9a8df255ea742ca97e155ac2e1238e49ce11e3e56e37ee1f8b" + end + end + + resource "truststore" do + url "https://files.pythonhosted.org/packages/53/a3/1585216310e344e8102c22482f6060c7a6ea0322b63e026372e6dcefcfd6/truststore-0.10.4.tar.gz" + sha256 "9d91bd436463ad5e4ee4aba766628dd6cd7010cf3e2461756b3303710eebc301" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"specify", "init", "test-project", "--ai", "copilot", "--script", "sh", "--ignore-agent-tools" + assert_path_exists testpath/"test-project/.specify/memory/constitution.md" + + assert_match "Specify CLI is ready to use", shell_output("#{bin}/specify check") + end +end diff --git a/Formula/s/spectra.rb b/Formula/s/spectra.rb new file mode 100644 index 0000000000000..69052d1b7b4cd --- /dev/null +++ b/Formula/s/spectra.rb @@ -0,0 +1,53 @@ +class Spectra < Formula + desc "Header-only C++ library for large scale eigenvalue problems" + homepage "https://spectralib.org" + url "https://github.com/yixuan/spectra/archive/refs/tags/v1.2.0.tar.gz" + sha256 "fdfccacba1c77d9b4ffefae7258c760c99e3c8a2823ca87ea5b11a50d297a73b" + license "MPL-2.0" + head "https://github.com/yixuan/spectra.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "edd1c8fc5c4b6ea0ba64a9b48a0b86f986b0b24c4f6b624b45908b84ea3963f1" + end + + depends_on "cmake" => :build + depends_on "eigen" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples/DavidsonSymEigs_example.cpp" => "test.cpp" + end + + test do + system ENV.cxx, pkgshare/"test.cpp", "-std=c++14", + "-I#{Formula["eigen"].opt_include/"eigen3"}", "-I#{include}", "-o", "test" + + macos_expected = <<~EOS + 5 Eigenvalues found: + 999.971 + 999.04 + 997.993 + 997.009 + 996.023 + EOS + + linux_expected = <<~EOS + 5 Eigenvalues found: + 999.996 + 998.952 + 997.96 + 996.972 + 995.967 + EOS + + if OS.mac? + assert_equal macos_expected, shell_output(testpath/"test") + else + assert_equal linux_expected, shell_output(testpath/"test") + end + end +end diff --git a/Formula/s/spectral-cli.rb b/Formula/s/spectral-cli.rb new file mode 100644 index 0000000000000..db5e080e6bdb4 --- /dev/null +++ b/Formula/s/spectral-cli.rb @@ -0,0 +1,44 @@ +class SpectralCli < Formula + desc "JSON/YAML linter and support OpenAPI v3.1/v3.0/v2.0, and AsyncAPI v2.x" + homepage "https://stoplight.io/open-source/spectral" + url "https://registry.npmjs.org/@stoplight/spectral-cli/-/spectral-cli-6.15.0.tgz" + sha256 "d4e7bd215586ba1619bb495b6d7ecc336431eab9ab0214f0b16ab56a9c145072" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8d483aa6a52f0b33cd3ee23697fa23e00eb7db9668b500ee04ac6c0ed2d88eec" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + resource "homebrew-petstore.yaml" do + url "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/b12acf0c/examples/v3.0/petstore.yaml" + sha256 "7dc119919441597e2b24335d8c8f6d01f1f0b895637f79b35e3863a3c2df9ddf" + end + + resource "homebrew-streetlights-mqtt.yml" do + url "https://raw.githubusercontent.com/asyncapi/spec/1824379b/examples/streetlights-mqtt.yml" + sha256 "7e17c9b465437a5a12decd93be49e37ca7ecfc48ff6f10e830d8290e9865d3af" + end + + test_config = testpath/".spectral.yaml" + test_config.write "extends: [\"spectral:oas\", \"spectral:asyncapi\"]" + + testpath.install resource("homebrew-petstore.yaml") + output = shell_output("#{bin}/spectral lint -r #{test_config} #{testpath}/petstore.yaml") + assert_match "8 problems (0 errors, 8 warnings, 0 infos, 0 hints)", output + + testpath.install resource("homebrew-streetlights-mqtt.yml") + output = shell_output("#{bin}/spectral lint -r #{test_config} #{testpath}/streetlights-mqtt.yml") + assert_match "7 problems (0 errors, 6 warnings, 1 info, 0 hints)", output + + assert_match version.to_s, shell_output("#{bin}/spectral --version") + end +end diff --git a/Formula/s/speech-tools.rb b/Formula/s/speech-tools.rb new file mode 100644 index 0000000000000..c4dfff5d45c90 --- /dev/null +++ b/Formula/s/speech-tools.rb @@ -0,0 +1,108 @@ +class SpeechTools < Formula + desc "C++ speech software library from the University of Edinburgh" + homepage "http://festvox.org/docs/speech_tools-2.4.0/" + license "MIT-Festival" + revision 2 + head "https://github.com/festvox/speech_tools.git", branch: "master" + + stable do + url "http://festvox.org/packed/festival/2.5/speech_tools-2.5.0-release.tar.gz" + sha256 "e4fd97ed78f14464358d09f36dfe91bc1721b7c0fa6503e04364fb5847805dcc" + + # Fix build on Apple Silicon. Remove in the next release. + patch do + url "https://github.com/festvox/speech_tools/commit/06141f69d21bf507a9becb5405265dc362edb0df.patch?full_index=1" + sha256 "a42493982af11a914d2cf8b97edd287a54b5cabffe6c8fe0e4a9076c211e85ef" + end + + # Backport fix for building with -fno-common + patch do + url "https://github.com/festvox/speech_tools/commit/55bdddcca80906d63090872309c0a7838bf44f44.patch?full_index=1" + sha256 "0d0b97ea85550a55d09627d388345b16d467f5cbcbb4ab35aa51479950557048" + end + end + + livecheck do + url "http://festvox.org/packed/festival/?C=M&O=D" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "676603f0e048211c64eef17bb9b6992b7fec2825469d4dae53a0a265e5b84dc4" + sha256 cellar: :any, arm64_sequoia: "711ab1173ba030660d1d8ee4e33da992aedcea17abf46073d9cc61600393cf7a" + sha256 cellar: :any, arm64_sonoma: "661e6c51d679c86f3f8a3e0bf98f11d2bf70e94dfffa01b15ae8cfce3a25a32b" + sha256 cellar: :any, arm64_ventura: "904d6e001b1e6ba3dc80e9ff46f45e858e1551e4194779ecf29babdee3925d29" + sha256 cellar: :any, arm64_monterey: "b6fc76b6258dbd5956b9ee1fc3c2b6bdd3bff70c3e5963d0909d063d7d58469e" + sha256 cellar: :any, arm64_big_sur: "f87cf4b034c413c123d7a6c443492a836ce28c23407f522cad259a7832fd7e33" + sha256 cellar: :any, sonoma: "c24eb60d09a9aab6fa296b7a54a147b709e6f408b5f0c45270e0c1a338b1a909" + sha256 cellar: :any, ventura: "080832342a24ad7998e25b5efea6d9bcdf0f815c7b0cafd7ed3ce0745e2dd57a" + sha256 cellar: :any, monterey: "ff2891dc045fd7e6a9044dab515a213eb8cfacbdf94cee6191b4d14c32cdcff5" + sha256 cellar: :any, big_sur: "6752fe1558b7d5c824d6b8f534caf8a2ee2547cc8346e6802ba7138992af4ea3" + sha256 cellar: :any, catalina: "e88b78b7a2391634494dc70406f42667d8d152e41d8b85958afd38ec16d8b4e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e482ece1583a25e8e5b78f5089af87629eee73d505c8013fad0fe33e085157f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05b33f6bd508503c40c67baaa4d8766e3d3b58853b18c9f356d0e650a2ecad13" + end + + uses_from_macos "ncurses" + + on_macos do + depends_on "libomp" + end + + conflicts_with "align", because: "both install `align` binaries" + + def install + ENV.deparallelize + # Xcode doesn't include OpenMP directly any more, but with these + # flags we can force the compiler to use the libomp we provided + # as a dependency. Normally you can force this on autoconf by + # setting "ac_cv_prog_cxx_openmp" and "LIBS", but this configure + # script does OpenMP its own way so we need to actually edit the script: + inreplace "configure", "-fopenmp", "-Xpreprocessor -fopenmp -lomp" if OS.mac? + system "./configure", "--prefix=#{prefix}" + system "make" + # install all executable files in "main" directory + bin.install Dir["main/*"].select { |f| File.file?(f) && File.executable?(f) } + end + + test do + rate_hz = 16000 + frequency_hz = 100 + duration_secs = 5 + basename = "sine" + txtfile = "#{basename}.txt" + wavfile = "#{basename}.wav" + ptcfile = "#{basename}.ptc" + + File.open(txtfile, "w") do |f| + scale = (2 ** 15) - 1 + samples = Array.new(duration_secs * rate_hz) do |i| + (scale * Math.sin(frequency_hz * 2 * Math::PI * i / rate_hz)).to_i + end + f.puts samples + end + + # convert to wav format using ch_wave + system bin/"ch_wave", txtfile, + "-itype", "raw", + "-istype", "ascii", + "-f", rate_hz.to_s, + "-o", wavfile, + "-otype", "riff" + + # pitch tracking to est format using pda + system bin/"pda", wavfile, + "-shift", (1 / frequency_hz.to_f).to_s, + "-o", ptcfile, + "-otype", "est" + + # extract one frame from the middle using ch_track, capturing stdout + value = frequency_hz * duration_secs / 2 + pitch = shell_output("#{bin}/ch_track #{ptcfile} -from #{value} -to #{value}") + + # should be 100 (Hz) + assert_equal frequency_hz, pitch.to_i + end +end diff --git a/Formula/s/speedbump.rb b/Formula/s/speedbump.rb new file mode 100644 index 0000000000000..e497072509ce8 --- /dev/null +++ b/Formula/s/speedbump.rb @@ -0,0 +1,43 @@ +class Speedbump < Formula + desc "TCP proxy for simulating variable, yet predictable network latency" + homepage "https://github.com/kffl/speedbump" + url "https://github.com/kffl/speedbump/archive/refs/tags/v1.1.0.tar.gz" + sha256 "ab685094e2e78818921adc8705ab01c8d26719d11313e99b9638b84ebae38194" + license "Apache-2.0" + head "https://github.com/kffl/speedbump.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f991bd2a54623cf73881d495c86a2d7b4bba3c5af8fae3a74d85a1bec5bb41cc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a52604fc55f69494bce2c79dfe29d9b85ad5b8828242a10358aad3d5f82dd161" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6373e8ea1a8d06a0cd3f82bac417065b98e658a47d51a0f3316909a87ce3e041" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7359cd3407540f98642026e890d0e5ab47d0eb4b6134449b24c5c8829c48b5a0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c7fa5b179cf1cd3f09217a2d8c09a87fba935a4c207c329fab42b45b7e6dc586" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "aa3e65981fbc84cf24bb5d2724f863842366d33d1a489c8386487bc866900d54" + sha256 cellar: :any_skip_relocation, sonoma: "1c9913bedf3327c303880d65524548a33401ba639e09b1b08d7657ea6d6b6e4c" + sha256 cellar: :any_skip_relocation, ventura: "3c9b18929d4d11b231b45f1f6bef8eef9dcf2564ce7baab83f688817577b481c" + sha256 cellar: :any_skip_relocation, monterey: "c6ec49903634a0db12e85374e71e1f11239726916218e1eae07950bd5a2484c3" + sha256 cellar: :any_skip_relocation, big_sur: "93ec6fcd2dd65b2203d786ae5ebe5301b421b041460e5f4e88fec54026ead594" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae045cae2fd336d9da73e4b33eebd244a35d804c61b2a08e8742ab2f0ead585e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "653ea4f77ffba07e1cd95c4d3805709c6c15f860641faf264a38d66bcc98ed78" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + require "pty" + port = free_port + + r, _, pid = PTY.spawn("#{bin}/speedbump --latency=100ms --port=#{port} localhost:80") + assert_match "[INFO] Started speedbump: port=#{port} dest=127.0.0.1:80", r.readline + + assert_match version.to_s, shell_output("#{bin}/speedbump --version 2>&1") + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/s/speedread.rb b/Formula/s/speedread.rb new file mode 100644 index 0000000000000..38e43861db073 --- /dev/null +++ b/Formula/s/speedread.rb @@ -0,0 +1,33 @@ +class Speedread < Formula + desc "Simple terminal-based rapid serial visual presentation (RSVP) reader" + homepage "https://github.com/pasky/speedread" + license "MIT" + head "https://github.com/pasky/speedread.git", branch: "master" + + stable do + url "https://github.com/pasky/speedread/archive/refs/tags/v1.0.tar.gz" + sha256 "a65f5bec427e66893663bcfc49a22e43169dd35976302eaed467eec2a5aafc1b" + + # Fix error with macOS 11 Perl: "The encoding pragma is no longer supported" + # Remove this in next release + patch do + url "https://github.com/pasky/speedread/commit/24c3946d14f7f310a7012be1f9d3cbccf0b16765.patch?full_index=1" + sha256 "df8d576ad920f32c6dc3e934f4883f7b2d43fb7d2453bb007620513100df076a" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "84a404d8c1cbdb6d69501b347a9e50f87a34cce2136ebb12f97d4ab9b117443a" + end + + def install + bin.install "speedread" + end + + test do + system bin/"speedread", "-w 1000", "<(echo This is a test)" + end +end diff --git a/Formula/s/speedtest-cli.rb b/Formula/s/speedtest-cli.rb new file mode 100644 index 0000000000000..ea5567ac80171 --- /dev/null +++ b/Formula/s/speedtest-cli.rb @@ -0,0 +1,49 @@ +class SpeedtestCli < Formula + include Language::Python::Shebang + + desc "Command-line interface for https://speedtest.net bandwidth tests" + homepage "https://github.com/sivel/speedtest-cli" + url "https://github.com/sivel/speedtest-cli/archive/refs/tags/v2.1.3.tar.gz" + sha256 "45e3ca21c3ce3c339646100de18db8a26a27d240c29f1c9e07b6c13995a969be" + license "Apache-2.0" + revision 2 + head "https://github.com/sivel/speedtest-cli.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "93487be757c9b3763deeb1b1415ee8ad10c5a80fcc9ebaeacbb8fbac3e9b9474" + end + + depends_on "python@3.14" + + # Support Python 3.10, remove on next release + patch do + url "https://github.com/sivel/speedtest-cli/commit/22210ca35228f0bbcef75a7c14587c4ecb875ab4.patch?full_index=1" + sha256 "d0456eb9fded20fb1580dbc6e3bc451a10c3fbcd3441efea66035aa848440c09" + end + + # Replace deprecated `datetime.datetime.utcnow()` function with supported + # `datetime.datetime.now(datetime.UTC)` + # + # https://github.com/sivel/speedtest-cli/pull/808 + patch do + url "https://github.com/sivel/speedtest-cli/commit/305dce9bd28e797d32b6b7e4a9239a669ab35322.patch?full_index=1" + sha256 "468f7205cedcef51eb95eb565db56d08743c5663b1641be62d9d1247d0845f3b" + end + + def install + rewrite_shebang detected_python_shebang, "speedtest.py" + bin.install "speedtest.py" => "speedtest" + bin.install_symlink "speedtest" => "speedtest-cli" + man1.install "speedtest-cli.1" + end + + test do + assert_match "speedtest-cli", + shell_output("#{bin}/speedtest --version") + assert_match "Command line interface for testing internet bandwidth using speedtest.net", + shell_output("#{bin}/speedtest --help") + end +end diff --git a/Formula/s/speex.rb b/Formula/s/speex.rb new file mode 100644 index 0000000000000..6ded3065f3759 --- /dev/null +++ b/Formula/s/speex.rb @@ -0,0 +1,70 @@ +class Speex < Formula + desc "Audio codec designed for speech" + homepage "https://speex.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/speex/speex-1.2.1.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/speex/speex-1.2.1.tar.gz" + sha256 "4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/speex/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)speex[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a7608ef62c92fd11d5eed0e3643e769087e4f0eb6de3a321fa602d6dd041387d" + sha256 cellar: :any, arm64_sequoia: "885ccb79dee4ad080d2c5ee20ab55569b0dfee064535a537568dd78adff88dcb" + sha256 cellar: :any, arm64_sonoma: "8dcf1981467ac7b19763ef294c2ef1cbb5fdbe98100043c95f4617a89a930a22" + sha256 cellar: :any, arm64_ventura: "e8e8cbefa65f7819b2feb27b9067248d97f2e5607253c0a5c8a49a495d7fc824" + sha256 cellar: :any, arm64_monterey: "b0cba69db1b66944a019f312fa128d6c6460f971fdd5cfddc0725051b76a4dd0" + sha256 cellar: :any, arm64_big_sur: "3cb6ffa6920e1ea4e904bb0e2a8d6e62c329c39c6f7d80d8c66f691b5ad1f427" + sha256 cellar: :any, sonoma: "7dec70341e9b992efda633567a11bd75ce9bc9a21ab3490a2a37800cf0a0fc55" + sha256 cellar: :any, ventura: "ec27dfb9443b9de3ca68ca3239ab655aa33078f7345bd33a07aa1ba05987538c" + sha256 cellar: :any, monterey: "46d02ec9d80e46fbf260fe650abaa3f4620743ca34a59d53d55d382894231a41" + sha256 cellar: :any, big_sur: "45e58f000c17211a9624b247cf58d85ea6a191f8c5bfe0efaf6ba72b49a63fc1" + sha256 cellar: :any, catalina: "21a5518f517dabbb9eb1d80d14e0e7716fd36f7db01e779b875b733db4c5fa14" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2e8649afd3a104cc1e685c4047bf6e44d9229f226981c86cb558bb512818da6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ea2ee48a402525421cb3ef8b83173d4bc57741c10e84fe6fae66691905293ec" + end + + head do + url "https://gitlab.xiph.org/xiph/speex.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libogg" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + SpeexBits bits; + void *enc_state; + + speex_bits_init(&bits); + enc_state = speex_encoder_init(&speex_nb_mode); + + speex_bits_destroy(&bits); + speex_encoder_destroy(enc_state); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lspeex", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/speexdsp.rb b/Formula/s/speexdsp.rb new file mode 100644 index 0000000000000..f74d961077f77 --- /dev/null +++ b/Formula/s/speexdsp.rb @@ -0,0 +1,66 @@ +class Speexdsp < Formula + desc "Speex audio processing library" + homepage "https://speex.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/speex/speexdsp-1.2.1.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/speex/speexdsp-1.2.1.tar.gz" + sha256 "8c777343e4a6399569c72abc38a95b24db56882c83dbdb6c6424a5f4aeb54d3d" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/speex/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)speexdsp[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e7647620836f6c58957deb0c5994b29b087c0574b5feca71fbaa9dd67d15a092" + sha256 cellar: :any, arm64_sequoia: "c19e5962197be02c5124dc4c2cef39ef6a6b00bddb5f3cb7dca9c3e31929d086" + sha256 cellar: :any, arm64_sonoma: "ff689f3f675047fd194a585d0a08a204f0bbd0026b0d67694be5b1b2fe08980d" + sha256 cellar: :any, arm64_ventura: "c794738735292d75e590ba371e29ac57fdfc465f712dd20823634a310759e824" + sha256 cellar: :any, arm64_monterey: "f43bb5f238f0c3b74a4b08c09d4cc98c8935e77024f3c2e109b2683e5197f18c" + sha256 cellar: :any, arm64_big_sur: "78f624d4cb561115ca94e9caa71dc45f2b4227eb443245b7ae07674fb54bd81b" + sha256 cellar: :any, sonoma: "d36e29b66b65a4d81e246d825187877ef05f47325bf032948c8bc4cddb826613" + sha256 cellar: :any, ventura: "f4dfeb2d0eaf57c871269de74f64df8ca82acfb72a1a81fd24698ab0309f3321" + sha256 cellar: :any, monterey: "b4d9cbbd5ad3e85630759fe8183c61fa94d772888c62f9a819b11b32ed1b7664" + sha256 cellar: :any, big_sur: "58d8bf8055672d3d7192c74a6381109c03507ea2ac11c0b1e40fd6b29c288415" + sha256 cellar: :any, catalina: "3499528f9bfb7c9a1bdff9d1da7f3de4c3dc5d54d25693e156592e76dec5f1d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4f60d49f781e99446057cfcee58ac1ebc00f3d003d377a8615b662b56a5b9b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c417e96a3739f41fb59aca0ceba32fd45b07f79175d8eda837dd125159098453" + end + + head do + url "https://gitlab.xiph.org/xiph/speexdsp.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + SpeexResamplerState *st = speex_resampler_init(1, 8000, 12000, 10, NULL); + speex_resampler_set_rate(st, 96000, 44100); + speex_resampler_skip_zeros(st); + speex_resampler_destroy(st); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lspeexdsp", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/spek.rb b/Formula/s/spek.rb new file mode 100644 index 0000000000000..ad6d5f2dc6f8f --- /dev/null +++ b/Formula/s/spek.rb @@ -0,0 +1,41 @@ +class Spek < Formula + desc "Acoustic spectrum analyser" + homepage "https://www.spek.cc" + url "https://github.com/alexkay/spek/releases/download/v0.8.5/spek-0.8.5.tar.xz" + sha256 "1bccf85a14a01af8f2f30476cbad004e8bf6031f500e562bbe5bbd1e5eb16c59" + license "GPL-3.0-or-later" + revision 5 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5a7906a3f0fb330c1e1646fdda11d561f67868b95144e2524e2a5563ba17c310" + sha256 cellar: :any, arm64_sequoia: "5d4388acbd2adc2e46f4efd39bfc028aa3235d3bc97aed3fb025e7b8387ca036" + sha256 cellar: :any, arm64_sonoma: "f41ddbde93ab3cdbce6c949b3607a2d77068a7fff377d6902752636347a9c3f6" + sha256 cellar: :any, arm64_ventura: "228c5ca814faaef7d3d2182ecb10fda16e8d33bd4ff4194b61d8732f86687e81" + sha256 cellar: :any, sonoma: "76e769f535f5e3a4139447ac9ac7348f660ee4bfb016cc2ed9bdc9d356fc2b8b" + sha256 cellar: :any, ventura: "cf266c54c4e3b363c902715216e61a4ef90837b5ae36631e0700068d7eb20d4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "be666699556a55ff1a7e9aea8b6615c7c4c26390d9dba1d54fef65c81afbf919" + sha256 cellar: :any_skip_relocation, x86_64_linux: "361440ed42bfd45dc6c00d23839b5170e7be9e00231a131a882f645e712b7729" + end + + depends_on "pkgconf" => :build + depends_on "ffmpeg@7" + depends_on "wxwidgets" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + + # https://github.com/alexkay/spek/issues/235 + cp "data/spek.desktop.in", "data/spek.desktop" if OS.linux? + + system "make", "install" + end + + test do + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + assert_match "Spek version #{version}", shell_output("#{bin}/spek --version") + end +end diff --git a/Formula/s/spglib.rb b/Formula/s/spglib.rb new file mode 100644 index 0000000000000..66a2e9644c568 --- /dev/null +++ b/Formula/s/spglib.rb @@ -0,0 +1,74 @@ +class Spglib < Formula + desc "C library for finding and handling crystal symmetries" + homepage "https://spglib.readthedocs.io/en/latest/" + url "https://github.com/spglib/spglib/archive/refs/tags/v2.6.0.tar.gz" + sha256 "c65af71136c915352eb82444b165ec83289877eb8e46593033f199801b43dbf7" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d1f0145c7fce622faa3b2663a0e5f3dc807d71d5d325a0284959a89db1512ed1" + sha256 cellar: :any, arm64_sequoia: "1f70bfc567f1349913975ebe3a2173dfb68dd234dab1a6fd199f62b494a75919" + sha256 cellar: :any, arm64_sonoma: "f4b1b449ad705a09d66de2d0b3868f7ed6d4cec38aea989e4639529e3bbf4f46" + sha256 cellar: :any, arm64_ventura: "ab9d0638a60bc897b4d3ce4f2f37e451df8470f15af4eb7e638253673b636622" + sha256 cellar: :any, sonoma: "0c8d96842c11f26dcde4627aaec4d0a89739e65e7315f8b933162e88483ac2e6" + sha256 cellar: :any, ventura: "d1cef9ba99ecafd8b47b46a1f1e00f4203f371a08943cd986e2469a07534e737" + sha256 cellar: :any_skip_relocation, arm64_linux: "23b327e09f38b1b1a3b1e66a78502dd0f48019876b43f657bf5303f7d3db046f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0e14500cec9a4a450740bd534d71ac558d58faf86b3ae893aa4b3ba33c09d44" + end + + depends_on "cmake" => [:build, :test] + + def install + # TODO: Fortran packaging is disabled for now because packaging does not pick it up properly + # https://github.com/spglib/spglib/issues/352#issuecomment-1784943807 + common_args = %w[ + -DSPGLIB_WITH_Fortran=OFF + -DSPGLIB_WITH_TESTS=OFF + ] + system "cmake", "-S", ".", "-B", "build_shared", + "-DSPGLIB_SHARED_LIBS=ON", + *common_args, *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", + "-DSPGLIB_SHARED_LIBS=OFF", + *common_args, *std_cmake_args + system "cmake", "--build", "build_static" + system "cmake", "--install", "build_static" + end + + test do + (testpath / "test.c").write <<~C + #include + #include + int main() + { + printf("%d.%d.%d", spg_get_major_version(), spg_get_minor_version(), spg_get_micro_version()); + } + C + + (testpath / "CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(test_spglib LANGUAGES C) + find_package(Spglib CONFIG REQUIRED COMPONENTS shared) + add_executable(test_c test.c) + target_link_libraries(test_c PRIVATE Spglib::symspg) + CMAKE + system "cmake", "-B", "build_shared" + system "cmake", "--build", "build_shared" + system "./build_shared/test_c" + + (testpath / "CMakeLists.txt").delete + (testpath / "CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(test_spglib LANGUAGES C) + find_package(Spglib CONFIG REQUIRED COMPONENTS static) + add_executable(test_c test.c) + target_link_libraries(test_c PRIVATE Spglib::symspg) + CMAKE + system "cmake", "-B", "build_static" + system "cmake", "--build", "build_static" + system "./build_static/test_c" + end +end diff --git a/Formula/s/sphinx-doc.rb b/Formula/s/sphinx-doc.rb new file mode 100644 index 0000000000000..51910d2146682 --- /dev/null +++ b/Formula/s/sphinx-doc.rb @@ -0,0 +1,141 @@ +class SphinxDoc < Formula + include Language::Python::Virtualenv + + desc "Tool to create intelligent and beautiful documentation" + homepage "https://www.sphinx-doc.org/" + url "https://files.pythonhosted.org/packages/38/ad/4360e50ed56cb483667b8e6dadf2d3fda62359593faabbe749a27c4eaca6/sphinx-8.2.3.tar.gz" + sha256 "398ad29dee7f63a75888314e9424d40f52ce5a6a87ae88e7071e80af296ec348" + license "BSD-2-Clause" + revision 3 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4524efce03eab7048486ee1b3593ec0bb9d2f13a4c60ab7e502ea6fa70be12da" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "176bb0d81624eb2442006571f5725b44726a78d7b3441cf242cfb2d42ec9dcbd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "104cf1bbfb9b6faa7e6ca209086daf3fd6ba4531f3a1d9ed2dc5a5af56cc698e" + sha256 cellar: :any_skip_relocation, sonoma: "4e4525cae3d7223204f9dde2a2c92a063c5bd47ca775f0081a073157a6a03d7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "685e7018008efa394609b9e59b51056a3c6055420e4e39f8a0d0544c88330e96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9674f74c1b2c831f5d2ddaa2544eb4c1fd5867d010ee0a7e614101e399ab578f" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi", + extra_packages: "numpydoc" + + resource "alabaster" do + url "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz" + sha256 "c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e" + end + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "imagesize" do + url "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz" + sha256 "69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "numpydoc" do + url "https://files.pythonhosted.org/packages/2f/19/7721093e25804cc82c7c1cdab0cce6b9343451828fc2ce249cee10646db5/numpydoc-1.9.0.tar.gz" + sha256 "5fec64908fe041acc4b3afc2a32c49aab1540cf581876f5563d68bb129e27c5b" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "roman-numerals-py" do + url "https://files.pythonhosted.org/packages/30/76/48fd56d17c5bdbdf65609abbc67288728a98ed4c02919428d4f52d23b24b/roman_numerals_py-3.1.0.tar.gz" + sha256 "be4bf804f083a4ce001b5eb7e3c0862479d10f94c936f6c4e5f250aa5ff5bd2d" + end + + resource "snowballstemmer" do + url "https://files.pythonhosted.org/packages/75/a7/9810d872919697c9d01295633f5d574fb416d47e535f258272ca1f01f447/snowballstemmer-3.0.1.tar.gz" + sha256 "6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895" + end + + resource "sphinxcontrib-applehelp" do + url "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz" + sha256 "2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1" + end + + resource "sphinxcontrib-devhelp" do + url "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz" + sha256 "411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad" + end + + resource "sphinxcontrib-htmlhelp" do + url "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz" + sha256 "c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9" + end + + resource "sphinxcontrib-jsmath" do + url "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz" + sha256 "a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8" + end + + resource "sphinxcontrib-qthelp" do + url "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz" + sha256 "4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab" + end + + resource "sphinxcontrib-serializinghtml" do + url "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz" + sha256 "e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"sphinx-quickstart", "-pProject", "-aAuthor", "-v1.0", "-q", testpath + system bin/"sphinx-build", testpath, testpath/"build" + assert_path_exists testpath/"build/index.html" + end +end diff --git a/Formula/s/spice-gtk.rb b/Formula/s/spice-gtk.rb new file mode 100644 index 0000000000000..d109b77fc9e75 --- /dev/null +++ b/Formula/s/spice-gtk.rb @@ -0,0 +1,126 @@ +class SpiceGtk < Formula + include Language::Python::Virtualenv + + desc "GTK client/libraries for SPICE" + homepage "https://www.spice-space.org" + url "https://www.spice-space.org/download/gtk/spice-gtk-0.42.tar.xz" + sha256 "9380117f1811ad1faa1812cb6602479b6290d4a0d8cc442d44427f7f6c0e7a58" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later", "BSD-3-Clause"] + revision 3 + + livecheck do + url "https://www.spice-space.org/download/gtk/" + regex(/href=.*?spice-gtk[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "71bee35673de1e8a8025679ea029a208ffc091a5a288a452ee290b6c919cf14b" + sha256 arm64_sequoia: "2dd197fba5cb101927055736fe8cf58d926b9a6935b874993c73d5795dff464e" + sha256 arm64_sonoma: "3b95e14628762b0ef7967d239741aaabfcc9a22a32d14979af37969531703bc7" + sha256 sonoma: "8eb8bfcf89f624432c2fe2255d2d15524c97381ffdcc21e4ab580f609bca9ed3" + sha256 arm64_linux: "6dad0e797da0b6177b2186408a79fd20c9b5fa48836be158553d0324de554e45" + sha256 x86_64_linux: "ae75bbd8abc31001852903eb5d0e79afcf5a61255d6fabd13db7dfe7387341cc" + end + + depends_on "gobject-introspection" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => :build + depends_on "vala" => :build + + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "glib" + depends_on "gstreamer" + depends_on "gtk+3" + depends_on "jpeg-turbo" + depends_on "json-glib" + depends_on "libepoxy" + depends_on "libsoup" + depends_on "libusb" + depends_on "libx11" + depends_on "lz4" + depends_on "openssl@3" + depends_on "opus" + depends_on "pango" + depends_on "phodav" + depends_on "pixman" + depends_on "spice-protocol" + depends_on "usbredir" + + uses_from_macos "zlib" + + on_macos do + depends_on "gobject-introspection" + depends_on "harfbuzz" + end + + on_linux do + depends_on "libva" + depends_on "wayland" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + # Backport fix for "ld: unknown file type in '.../spice-gtk-0.42/src/spice-glib-sym-file'" + patch do + url "https://gitlab.freedesktop.org/spice/spice-gtk/-/commit/1511f0ad5ea67b4657540c631e3a8c959bb8d578.diff" + sha256 "67c2b1d9c689dbb8eb3ed7c92996cf8c9d083d51050883593ee488957ad2a083" + end + + # https://gitlab.com/keycodemap/keycodemapdb/-/merge_requests/18 + patch :DATA + + def install + venv = virtualenv_create(buildpath/"venv", "python3.14") + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + return spice_session_new() ? 0 : 1; + } + CPP + ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["icu4c"].lib}/pkgconfig" + system ENV.cc, "test.cpp", + *shell_output("pkgconf --cflags --libs spice-client-gtk-3.0").chomp.split, + "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/subprojects/keycodemapdb/tools/keymap-gen b/subprojects/keycodemapdb/tools/keymap-gen +index b6cc95b..d05e945 100755 +--- a/subprojects/keycodemapdb/tools/keymap-gen ++++ b/subprojects/keycodemapdb/tools/keymap-gen +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!/usr/bin/env python3 + # -*- python -*- + # + # Keycode Map Generator diff --git a/Formula/s/spice-protocol.rb b/Formula/s/spice-protocol.rb new file mode 100644 index 0000000000000..a726a81f91a83 --- /dev/null +++ b/Formula/s/spice-protocol.rb @@ -0,0 +1,39 @@ +class SpiceProtocol < Formula + desc "Headers for SPICE protocol" + homepage "https://www.spice-space.org/" + url "https://www.spice-space.org/download/releases/spice-protocol-0.14.5.tar.xz" + sha256 "baf58449f6e89d19f475899ad5fb9196fdc46c03cc53233f4e39cf2978f9cff7" + license "BSD-3-Clause" + + livecheck do + url "https://www.spice-space.org/download/releases/" + regex(/href=.*?spice-protocol[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "b2fc7486dfc635ac1e89eb2f38d7eebeddf5f51d3fcd5e8f52c35c6ecd70ebea" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + return (SPICE_LINK_ERR_OK == 0) ? 0 : 1; + } + CPP + + system ENV.cc, "test.cpp", "-I#{include}/spice-1", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/spice-server.rb b/Formula/s/spice-server.rb new file mode 100644 index 0000000000000..b0bb8b80cd667 --- /dev/null +++ b/Formula/s/spice-server.rb @@ -0,0 +1,69 @@ +class SpiceServer < Formula + desc "Implements the server side of the SPICE protocol" + homepage "https://www.spice-space.org/" + url "https://gitlab.freedesktop.org/-/project/62/uploads/54a0f9f5d1840e1ad8060cb560f3dde6/spice-0.16.0.tar.bz2" + sha256 "0a6ec9528f05371261bbb2d46ff35e7b5c45ff89bb975a99af95a5f20ff4717d" + license "LGPL-2.1-or-later" + head "https://gitlab.freedesktop.org/spice/spice.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3d4a9ac58d3fefbd7d4ff3b286623cabb0573dbee26ecc258c63ac2c4857c623" + sha256 cellar: :any, arm64_sequoia: "600da87f0215eb7a409047dafcda30bf99509ed4f52c1adc463e5f5169c29d87" + sha256 cellar: :any, arm64_sonoma: "c25f2bb724d33169028e41b409c230030aa2efc7ea95af9ddd52f5c3bbdf4b4b" + sha256 cellar: :any, arm64_ventura: "027a196515564119dae4fcc9ce048890ce71f1f947904cc1b3a96f6ba82b4086" + sha256 cellar: :any, sonoma: "1f1413376cdd65d268fd79dbc130f24b8a6fca760a98734bc7c2bb016e0c64a8" + sha256 cellar: :any, ventura: "959df8679b8553cc1b5d700f374e5f3be12ac4b7928cb977aff4f65f8fc4a768" + sha256 cellar: :any_skip_relocation, arm64_linux: "18e8ad43cb6cb02a62beffeef8010f0187733862ef9ed53edb6a18affa06ce71" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8689579c9750ad3907b15c94f46b758b6eac7dcc38384e5606585036e0ef6172" + end + + depends_on "spice-protocol" => [:build, :test] + depends_on "pkgconf" => :test + + depends_on "glib" + depends_on "gstreamer" + depends_on "jpeg" + depends_on "lz4" + depends_on "openssl@3" + depends_on "opus" + depends_on "orc" + depends_on "pixman" + + uses_from_macos "cyrus-sasl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "systemd" + end + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "spice.h" + int main() { + spice_compat_version_t current_compat_version = spice_get_current_compat_version(); + printf("Current compat version: %d\\n", current_compat_version); + return 0; + } + C + flags = shell_output("pkg-config --cflags --libs spice-server").chomp.split + system ENV.cc, "test.c", *flags, "-o", "test" + + assert_match "Current compat version: 1", shell_output("./test") + end +end diff --git a/Formula/s/spicetify-cli.rb b/Formula/s/spicetify-cli.rb new file mode 100644 index 0000000000000..eb6033ac12a6c --- /dev/null +++ b/Formula/s/spicetify-cli.rb @@ -0,0 +1,58 @@ +class SpicetifyCli < Formula + desc "Command-line tool to customize Spotify client" + homepage "https://spicetify.app/" + url "https://github.com/spicetify/cli/archive/refs/tags/v2.42.0/v2.42.0.tar.gz" + sha256 "ff5a3f5146a3e316178487154efe0bdc7ef5abbd95274d3fc59ec21d03df4fc4" + license "LGPL-2.1-only" + head "https://github.com/spicetify/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8b358274e47af11a5d99cd5cb08a2fc3c0744aad14915b659dbdaadeed98d41" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8b358274e47af11a5d99cd5cb08a2fc3c0744aad14915b659dbdaadeed98d41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8b358274e47af11a5d99cd5cb08a2fc3c0744aad14915b659dbdaadeed98d41" + sha256 cellar: :any_skip_relocation, sonoma: "cf2642739b56ab4fc4a73421a59f586e42f968db4b2e6a9b82cbbae65f0a469f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e25c75f973eae5c3e81f3951fa3430909fc855698d7d285a2a845c0d4d4a39c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8020cfdabc4bf1b4967250944815e03cb8f8b5856ac4b19b71210c1ba67a7f7" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:, output: libexec/"spicetify") + cd buildpath do + libexec.install [ + "css-map.json", + "CustomApps", + "Extensions", + "globals.d.ts", + "jsHelper", + "Themes", + ] + bin.install_symlink libexec/"spicetify" + end + end + + test do + spotify_folder = testpath/"com.spotify.Client" + pref_file = spotify_folder/"com.spotify.client.plist" + mkdir_p spotify_folder + touch pref_file + path = testpath/".config/spicetify/config-xpui.ini" + path.write <<~INI + [Setting] + spotify_path = #{spotify_folder} + current_theme = SpicetifyDefault + prefs_path = #{pref_file} + INI + + quiet_system bin/"spicetify", "config" + assert_match version.to_s, shell_output("#{bin}/spicetify -v") + + output = shell_output("#{bin}/spicetify config current_theme 2>&1", 1) + assert_match "com.spotify.Client is not a valid path", output + end +end diff --git a/Formula/s/spidermonkey.rb b/Formula/s/spidermonkey.rb new file mode 100644 index 0000000000000..f122ff68bdff0 --- /dev/null +++ b/Formula/s/spidermonkey.rb @@ -0,0 +1,124 @@ +class Spidermonkey < Formula + desc "JavaScript-C Engine" + homepage "https://spidermonkey.dev" + url "https://archive.mozilla.org/pub/firefox/releases/140.4.0esr/source/firefox-140.4.0esr.source.tar.xz" + version "140.4.0" + sha256 "49f20673171046bc7b64f4caa340c46e1e105b9107f0ef68b7a94f379bcea4f7" + license "MPL-2.0" + head "https://hg.mozilla.org/mozilla-central", using: :hg + + # Spidermonkey versions use the same versions as Firefox, so we simply check + # Firefox ESR release versions. + livecheck do + url "https://download.mozilla.org/?product=firefox-esr-latest-ssl" + strategy :header_match + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3a28ebb02b5888065b10c8e4ba82b614752a673f3b434ed478269344dcc800f7" + sha256 cellar: :any, arm64_sequoia: "c71064580630d107b12f705f915fb529fc8e27fdd3a544ba4e6f76754a3d7db9" + sha256 cellar: :any, arm64_sonoma: "959c4f7351049c19009c8b5cd9f51c123a081a048d14bf5770507e31fd7bccde" + sha256 cellar: :any, sonoma: "d635c355122e1b8ceff75cb0e1701897bdf05a0b9f746a10645f7f4a150d277c" + sha256 arm64_linux: "7eada99808c5eea9d60084c33e5afd74b46de7f883264904f2bb44709279daf2" + sha256 x86_64_linux: "d812961c2752629cbb6803f83d3b0de4c646448c3636ee14f1e9469ff41f772b" + end + + depends_on "cbindgen" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "rust" => :build + depends_on "icu4c@77" + depends_on "nspr" + depends_on "readline" + + uses_from_macos "llvm" => :build # for llvm-objdump + uses_from_macos "m4" => :build + uses_from_macos "zlib" + + # From python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py + fails_with :gcc do + version "7" + cause "Only GCC 8.1 or newer is supported" + end + + # Apply patch used by `gjs` to bypass build error. + # ERROR: *** The pkg-config script could not be found. Make sure it is + # *** in your path, or set the PKG_CONFIG environment variable + # *** to the full path to pkg-config. + # Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1783570 + # Ref: https://discourse.gnome.org/t/gnome-45-to-depend-on-spidermonkey-115/16653 + patch do + on_macos do + url "https://github.com/ptomato/mozjs/commit/c82346c4e19a73ed4c7f65a6b274fc2138815ae9.patch?full_index=1" + sha256 "0f1cd5f80b4ae46e614efa74a409133e8a69fff38220314f881383ba0adb0f87" + end + end + + # Apply patch used by `gjs` to work around https://bugzilla.mozilla.org/show_bug.cgi?id=1973994 + patch do + url "https://github.com/ptomato/mozjs/commit/9aa8b4b051dd539e0fbd5e08040870b3c712a846.patch?full_index=1" + sha256 "5c2a8c804322ccacbc37f152a4a3d48a5fc2becffb1720a41e32c03899af0be6" + end + + # Backport support for Python 3.14 + patch do + url "https://github.com/mozilla-firefox/firefox/commit/d497aa4f770ca02f6083e93b94996a8fe32c2ff4.patch?full_index=1" + sha256 "026f91a56cd60907a87c62dd4143eac8300d6fc7433b94888229c632a43c34bf" + end + + def install + ENV.runtime_cpu_detection + + if OS.mac? + inreplace "build/moz.configure/toolchain.configure" do |s| + # Help the build script detect ld64 as it expects logs from LD_PRINT_OPTIONS=1 with -Wl,-version + # Issue ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1844694 + s.sub! '"-Wl,--version"', '"-Wl,-ld_classic,-v"' if DevelopmentTools.clang_build_version >= 1500 + # Allow using brew libraries on macOS (not officially supported) + s.sub!(/^(\s*def no_system_lib_in_sysroot\(.*\n\s*if )bootstrapped and value:/, "\\1False:") + # Work around upstream only allowing build on limited macOS SDK (14.4 as of Spidermonkey 128) + s.sub!(/^(\s*def mac_sdk_min_version\(.*\n\s*return )"\d+(\.\d+)*"$/, "\\1\"#{MacOS.version}\"") + end + end + + mkdir "brew-build" do + args = %W[ + --prefix=#{prefix} + --enable-hardening + --enable-optimize + --enable-readline + --enable-release + --enable-rust-simd + --enable-shared-js + --disable-bootstrap + --disable-debug + --disable-jemalloc + --with-intl-api + --with-system-icu + --with-system-nspr + --with-system-zlib + ] + + system "../js/src/configure", *args + ENV.deparallelize { system "make" } + system "make", "install" + end + + rm(lib/"libjs_static.ajs") + + # Add an unversioned `js` to be used by dependents like `jsawk` & `plowshare` + bin.install_symlink "js#{version.major}" => "js" + + # Avoid writing nspr's versioned Cellar path in js*-config + inreplace bin/"js#{version.major}-config", + Formula["nspr"].prefix.realpath, + Formula["nspr"].opt_prefix + end + + test do + path = testpath/"test.js" + path.write "print('hello');" + assert_equal "hello", shell_output("#{bin}/js#{version.major} #{path}").strip + assert_equal "hello", shell_output("#{bin}/js #{path}").strip + end +end diff --git a/Formula/s/spidermonkey@115.rb b/Formula/s/spidermonkey@115.rb new file mode 100644 index 0000000000000..809001e2d7936 --- /dev/null +++ b/Formula/s/spidermonkey@115.rb @@ -0,0 +1,112 @@ +class SpidermonkeyAT115 < Formula + desc "JavaScript-C Engine" + homepage "https://spidermonkey.dev" + url "https://archive.mozilla.org/pub/firefox/releases/115.22.0esr/source/firefox-115.22.0esr.source.tar.xz" + version "115.22.0" + sha256 "f57b6507ab1db52183df2aadb1fd81d9f0108b185226d1bac6205b7d7d3005b3" + license "MPL-2.0" + + # Spidermonkey versions use the same versions as Firefox, so we simply check + # Firefox ESR release versions. + livecheck do + url "https://www.mozilla.org/en-US/firefox/releases/" + regex(%r{href=.*?/v?(115(?:\.\d+)+)/releasenotes}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "238c04ed2a99a38f7dde51657f76753a8a1d40758e3e5e524c42303864209cd8" + sha256 cellar: :any, arm64_sonoma: "581420592aa67ce63b02579d99f81130399d086db22b2fcfbee8e6a99c3e4c3a" + sha256 cellar: :any, arm64_ventura: "73cb87c91e9d059a71218c36ffd194a99fb2a512990a681ffef45dfc406a3c4e" + sha256 cellar: :any, sonoma: "5eb778c67f6b734bc05be0c503ad021c50ed0bead89f730a533db7d7cf9e9386" + sha256 cellar: :any, ventura: "5c89548fbbb33f39c2359aacc83f828ccc0189fc3ca7b567068bf3c9a826ed75" + sha256 arm64_linux: "9c13d740d2344c2bc8dfaef636d59f74012cf0dc94b48f177fcb9472bfff0fd3" + sha256 x86_64_linux: "cd710f663cfcf8b8c834d5b856db4b56e799145ba9e9138d3ffebe9f7bda5332" + end + + disable! date: "2025-07-01", because: :versioned_formula + + depends_on "pkgconf" => :build + depends_on "python@3.11" => :build # https://bugzilla.mozilla.org/show_bug.cgi?id=1857515 + depends_on "rust" => :build + depends_on "icu4c@77" + depends_on "nspr" + depends_on "readline" + + uses_from_macos "llvm" => :build # for llvm-objdump + uses_from_macos "m4" => :build + uses_from_macos "zlib" + + # From python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py + fails_with :gcc do + version "7" + cause "Only GCC 8.1 or newer is supported" + end + + # Apply patch used by `gjs` to bypass build error. + # ERROR: *** The pkg-config script could not be found. Make sure it is + # *** in your path, or set the PKG_CONFIG environment variable + # *** to the full path to pkg-config. + # Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1783570 + # Ref: https://discourse.gnome.org/t/gnome-45-to-depend-on-spidermonkey-115/16653 + patch do + on_macos do + url "https://github.com/ptomato/mozjs/commit/9f778cec201f87fd68dc98380ac1097b2ff371e4.patch?full_index=1" + sha256 "a772f39e5370d263fd7e182effb1b2b990cae8c63783f5a6673f16737ff91573" + end + end + + def install + # Workaround for ICU 76+ + # Issue ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1927380 + inreplace "js/moz.configure", '"icu-i18n >= 73.1"', '"icu-i18n >= 73.1 icu-uc"' + + if OS.mac? + inreplace "build/moz.configure/toolchain.configure" do |s| + # Help the build script detect ld64 as it expects logs from LD_PRINT_OPTIONS=1 with -Wl,-version + s.sub! '"-Wl,--version"', '"-Wl,-ld_classic,--version"' if DevelopmentTools.clang_build_version >= 1500 + # Allow using brew libraries on macOS (not officially supported) + s.sub!(/^(\s*def no_system_lib_in_sysroot\(.*\n\s*if )bootstrapped and value:/, "\\1False:") + # Work around upstream only allowing build on limited macOS SDK (14.4 as of Spidermonkey 128) + s.sub!(/^(\s*def sdk_min_version\(.*\n\s*return )"\d+(\.\d+)*"$/, "\\1\"#{MacOS.version}\"") + end + + # Force build script to use Xcode install_name_tool + ENV["INSTALL_NAME_TOOL"] = DevelopmentTools.locate("install_name_tool") + end + + mkdir "brew-build" do + args = %W[ + --prefix=#{prefix} + --enable-hardening + --enable-optimize + --enable-readline + --enable-release + --enable-shared-js + --disable-bootstrap + --disable-debug + --disable-jemalloc + --with-intl-api + --with-system-icu + --with-system-nspr + --with-system-zlib + ] + + system "../js/src/configure", *args + system "make" + system "make", "install" + end + + rm(lib/"libjs_static.ajs") + + # Avoid writing nspr's versioned Cellar path in js*-config + inreplace bin/"js#{version.major}-config", + Formula["nspr"].prefix.realpath, + Formula["nspr"].opt_prefix + end + + test do + path = testpath/"test.js" + path.write "print('hello');" + assert_equal "hello", shell_output("#{bin}/js#{version.major} #{path}").strip + end +end diff --git a/Formula/s/spigot.rb b/Formula/s/spigot.rb new file mode 100644 index 0000000000000..72a04d0490f71 --- /dev/null +++ b/Formula/s/spigot.rb @@ -0,0 +1,75 @@ +class Spigot < Formula + desc "Command-line streaming exact real calculator" + homepage "https://www.chiark.greenend.org.uk/~sgtatham/spigot/" + url "https://www.chiark.greenend.org.uk/~sgtatham/spigot/spigot-20240909.f158e08.tar.gz" + version "20240909" + sha256 "f2b7b8b9b0e0b138dcfd6ac4eb46fa79706b1842522894c45ddfd731d27bf673" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?spigot[._-]v?(\d+(?:\.\d+)*)(?:[._-][\da-z]+)?\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "101f725aafee893f70ecd25457844a6c3a4d1d432d7c2dc82f285ad02a51389e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2820ca0f23f9516c1e27c3ea1488558a4912f0eb75dd361917705e02b2096ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb86f3da309c5adb78f3dd822284df1a561e77056ae252dcfa79e787c8601c3b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9101dda021b8f6fdfdb377750cfc9aeae90a2f050126223201c98a0d5be09732" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a9002983a479f2f2d328b8dc3ae4f41e9d4ed5813493d77ab5caa3725c77d6c" + sha256 cellar: :any_skip_relocation, sonoma: "65911180b9cca1a6b1febd6e2f35bf68563ef2dfa6095c5b079cec693a82d5b5" + sha256 cellar: :any_skip_relocation, ventura: "7e70ba708f6667e2733026ec5b277f6c585e1ed325632aa3bd0ab091910c142b" + sha256 cellar: :any_skip_relocation, monterey: "2c82b6ea337b197745e2416acb4b2e8e0b236972c1a1ae5f7eaa0f78e67493f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bfd33b820e4011431439c66813914c647cbbea77c0e17e185c990775345aa24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29e623ea321b9038b416675b0646e872c34c230ced67a62a527cd0e08470a8b4" + end + + depends_on "cmake" => :build + + uses_from_macos "ncurses" + + on_linux do + depends_on "gmp" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Get Ramanujan's number of decimal places of Tau in base10 + expected = <<~EOS + 6.28318530717958647692528676655900576839433879875021164194988918461563281 + 2572417997256069650684234135964296173026564613294187689219101164463450718 + 8162569622349005682054038770422111192892458979098607639288576219513318668 + 9225695129646757356633054240381829129713384692069722090865329642678721452 + 0498282547449174013212631176349763041841925658508183430728735785180720022 + 6610610976409330427682939038830232188661145407315191839061843722347638652 + 2358621023709614892475992549913470377150544978245587636602389825966734672 + 4881313286172042789892790449474381404359721887405541078434352586353504769 + 3496369353388102640011362542905271216555715426855155792183472743574429368 + 8180244990686029309917074210158455937851784708403991222425804392172806883 + 6319627259549542619921037414422699999996745956099902119463465632192637190 + 0489189106938166052850446165066893700705238623763420200062756775057731750 + 6641676284123435533829460719650698085751093746231912572776470757518750391 + 5563715561064342453613226003855753222391818432840397876190514402130971726 + 5577318723067636559364606039040706037059379915472451988277824994435505669 + 5826303114971448490830139190165906623372345571177815019676350927492987863 + 8510120801855403342278019697648025716723207127415320209420363885911192397 + 8935356748988965107595494536942080950692924160933685181389825866273540579 + 7830420950432411393204811607630038702250676486007117528049499294652782839 + 8545208539845593564709563272018683443282439849172630060572365949111413499 + 6770109891771738539913818544215950186059106423306899744055119204729613309 + 9823976366959550713273961485308505572510363683514934578195554558760016329 + 4120032290498384346434429544700282883947137096322722314705104266951483698 + 9368770466478147882866690955248337250379671389711241 + EOS + + output = shell_output("#{bin}/spigot -d1729 tau").strip + assert_equal expected.delete!("\n"), output + end +end diff --git a/Formula/s/spim.rb b/Formula/s/spim.rb new file mode 100644 index 0000000000000..8d859f4ab05f1 --- /dev/null +++ b/Formula/s/spim.rb @@ -0,0 +1,42 @@ +class Spim < Formula + desc "MIPS32 simulator" + homepage "https://spimsimulator.sourceforge.net/" + # No source code tarball exists + url "https://svn.code.sf.net/p/spimsimulator/code", revision: "764" + version "9.1.24" + license "BSD-3-Clause" + head "https://svn.code.sf.net/p/spimsimulator/code/" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "6ce31175ac12463b4fedd31724fe17aeef8119826168717c3aaf57fa049ace15" + sha256 arm64_sequoia: "0bbfdf9f722ade3b41dba3007110f92b87f5cdae144349b030399253fc7cf29c" + sha256 arm64_sonoma: "a6a8458888bdc561d8f80f70c1010496864b7c9a1bdda22b784aff1a68c6e9a6" + sha256 arm64_ventura: "815ba1c52cb4d6f1f216b10ed22f2c6e44802a774a5c3f8c0f5929deee570c31" + sha256 arm64_monterey: "b3d11635140aed3325a3de85e70524b8016ee2a0851d1d1d5c319596b14c9d64" + sha256 sonoma: "df97a10541f2bb5940ae426aaeaac7e973a5ce5c02f00f57cc9ac057f5853f27" + sha256 ventura: "a362f8d46914498632a89be198c999311152adcc5a785529f1e73b666a681100" + sha256 monterey: "b58327df67b8e42369981b471a6e2e1e0be51546bcd9ad30469bc1e88f862f57" + sha256 arm64_linux: "c4ad7c44cf7df0e7624ff25309bf64cd966d352db59cbdeb8598c6a7ea1caf37" + sha256 x86_64_linux: "3152719ea751f8e21e5febb3053cc7e8d9c171644b519ebd61e18a753b00225c" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + bin.mkpath + cd "spim" do + system "make", "EXCEPTION_DIR=#{share}" + system "make", "install", "BIN_DIR=#{bin}", + "EXCEPTION_DIR=#{share}" + system "make", "install-man", "MAN_DIR=#{man1}" + end + end + + test do + assert_match "__start", pipe_output(bin/"spim", "print_symbols") + end +end diff --git a/Formula/s/spin.rb b/Formula/s/spin.rb new file mode 100644 index 0000000000000..96a930d941614 --- /dev/null +++ b/Formula/s/spin.rb @@ -0,0 +1,56 @@ +class Spin < Formula + desc "Efficient verification tool of multi-threaded software" + homepage "https://spinroot.com/spin/whatispin.html" + url "https://github.com/nimble-code/Spin/archive/refs/tags/version-6.5.2.tar.gz" + sha256 "e46a3bd308c4cd213cc466a8aaecfd5cedc02241190f3cb9a1d1b87e5f37080a" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "64d6db348e89f72bd9104ea58648f9de630ebbe1f97dbbba7bde5f72d127639b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8eae14c8c6dce13b7a40a21f94b481c5f0a589aacc993e21433ed498c6e44165" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df76fb2fe8fb0027ea684c8c6ef026bf44a320d5739f629d088a316c6e75343c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff5eeb131b28f8551564e91d24e55f5da594a84535162e51ceeb579a5e8b0010" + sha256 cellar: :any_skip_relocation, arm64_monterey: "67ce597f95a1d2ae0b428f11b95c962bdddace66cb2cc4127ad619ce5b9bea47" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4f8951592f6d019eafb6466a4e991c7437d13a699af047bbbbfd0bc4fdcb82bf" + sha256 cellar: :any_skip_relocation, sonoma: "7788481a6c382dbeb0f5a472baefed77b4287500915b7ecb460ca86ff2d120ae" + sha256 cellar: :any_skip_relocation, ventura: "6c6c7714cfa19cf39458ddccdd8323e7a08a21b99d59a02cb27d85f08a30f1dd" + sha256 cellar: :any_skip_relocation, monterey: "0d4b7b1254d58ccfb87f57dcedb3d86504c488bf7ca6ce8b44fd9d00523ec13c" + sha256 cellar: :any_skip_relocation, big_sur: "d49e61e18c0c65108a64d3e0c91addbd011b3fff90434509958ebfe33b14c6cd" + sha256 cellar: :any_skip_relocation, catalina: "6432ab186b64f64851fa0f60dae53c13b6c9bfbc6195c41abc08f1ddfd824bf6" + sha256 cellar: :any_skip_relocation, arm64_linux: "96bd5d61619965fa00551f10e67d3ffc694bce73b34256a20f734b72abaa1442" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6bc2cf070b8095de0b23f7ac8cd201c30c5e089c7635570b71ea7b9235753e1" + end + + uses_from_macos "bison" => :build + + def install + cd "Src" do + system "make" + bin.install "spin" + end + + man1.install "Man/spin.1" + end + + test do + (testpath/"test.pml").write <<~EOS + mtype = { ruby, python }; + mtype = { golang, rust }; + mtype language = ruby; + + active proctype P() { + do + :: if + :: language == ruby -> language = golang + :: language == python -> language = rust + fi; + printf("language is %e", language) + od + } + EOS + output = shell_output("#{bin}/spin #{testpath}/test.pml") + assert_match "language is golang", output + end +end diff --git a/Formula/s/spiped.rb b/Formula/s/spiped.rb new file mode 100644 index 0000000000000..57cf68f156b61 --- /dev/null +++ b/Formula/s/spiped.rb @@ -0,0 +1,33 @@ +class Spiped < Formula + desc "Secure pipe daemon" + homepage "https://www.tarsnap.com/spiped.html" + url "https://www.tarsnap.com/spiped/spiped-1.6.4.tgz" + sha256 "424fb4d3769d912b04de43d21cc32748cdfd3121c4f1d26d549992a54678e06a" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?spiped[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e564e671fddf59bd3bc9b9aa6607f87dca58ae3fc70930c7abcf31352fa2edc4" + sha256 cellar: :any, arm64_sequoia: "469c7104799be35f718cab24e9370e0acd2b77a15141d75efd2e7e552bf74fa5" + sha256 cellar: :any, arm64_sonoma: "87c3d7eda651e267a339e0655d05cac5678f71a4658e8d9bd985e32f0555e0bc" + sha256 cellar: :any, arm64_ventura: "f547c50d187df541feb087d3e1534e5537e39dcb73fbbfeea606c3659626b7c3" + sha256 cellar: :any, sonoma: "3e77a24d828c58a06b59df85b986b43ebcc14c762920f2999c9cbed7fc729761" + sha256 cellar: :any, ventura: "8d286f9e2a3568683b839d0e64aa80ec588d547dbb83ee2ad21a41c7a28c4f4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "06712747809b962a2faedfc00759e579b9212514dcf17d11afbf08e73aff0626" + sha256 cellar: :any_skip_relocation, x86_64_linux: "667cc6e283e75c64c91638c8b2c667b4239ae12bcb1957cdb0e14c4dd45a1ed9" + end + + depends_on "openssl@3" + + def install + system "make", "BINDIR_DEFAULT=#{bin}", "MAN1DIR=#{man1}", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/spipe -v 2>&1") + end +end diff --git a/Formula/s/spirv-cross.rb b/Formula/s/spirv-cross.rb new file mode 100644 index 0000000000000..cfc8131faf710 --- /dev/null +++ b/Formula/s/spirv-cross.rb @@ -0,0 +1,72 @@ +class SpirvCross < Formula + desc "Performing reflection and disassembling SPIR-V" + homepage "https://github.com/KhronosGroup/SPIRV-Cross" + url "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "5b1149927e40a67396b440711543a3b1f9d004c844ca7293582a72c01cb69756" + license all_of: [ + "Apache-2.0", + "MIT", + "CC-BY-4.0", + "MIT-Khronos-old", + ] + version_scheme 1 + head "https://github.com/KhronosGroup/SPIRV-Cross.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:vulkan[._-])?sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "05c4f8949044e5ffd935c30bf725e77abcabca2ce80bf820aab19f74ca7ce410" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5f82c0c5396ca4af47814944e3edbdc3e85ee444e711d93778156aa317aa708" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1124f7140927ff1eea880f0894b3064361629f92e7d4bd548dcd1582d3188fc9" + sha256 cellar: :any_skip_relocation, sonoma: "c558f530f5ec6c20a352e134a13d180933273e5a87e44de05d791c1f8805ca82" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bf8aba874568cb4336c50e145aaec4341e4f9e9373b6d55d17bc3c4acf63bf9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e33c0bf6232d7e14f6691bf5da762e59eee76119388f2fafe11357c5b77a057" + end + + depends_on "cmake" => :build + depends_on "glm" => :test + depends_on "glslang" => :test + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # required for tests + prefix.install "samples" + (include/"spirv_cross").install Dir["include/spirv_cross/*"] + end + + test do + cp_r Dir[prefix/"samples/cpp/*"], testpath + + inreplace "Makefile", "-I../../include", "-I#{include}" + inreplace "Makefile", "../../spirv-cross", bin/"spirv-cross" + inreplace "Makefile", "glslangValidator", Formula["glslang"].bin/"glslangValidator" + + # fix technically invalid shader code (#version should be first) + # allows test to pass with newer glslangValidator + before = <<~EOS + // Copyright 2016-2021 The Khronos Group Inc. + // SPDX-License-Identifier: Apache-2.0 + + #version 310 es + EOS + + after = <<~EOS + #version 310 es + // Copyright 2016-2021 The Khronos Group Inc. + // SPDX-License-Identifier: Apache-2.0 + + EOS + + Dir["*.comp"].each do |shader_file| + inreplace shader_file, before, after + end + + system "make", "all" + end +end diff --git a/Formula/s/spirv-headers.rb b/Formula/s/spirv-headers.rb new file mode 100644 index 0000000000000..1acea417c449a --- /dev/null +++ b/Formula/s/spirv-headers.rb @@ -0,0 +1,43 @@ +class SpirvHeaders < Formula + desc "Headers for SPIR-V" + homepage "https://github.com/KhronosGroup/SPIRV-Headers" + url "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "602364ab7bf404a7f352df7da5c645f1c4558a9c92616f8ee33422b04d5e35b7" + license "MIT" + head "https://github.com/KhronosGroup/SPIRV-Headers.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:vulkan[._-])?sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "531c9e9d17a3e4dcaf870a9de694d68ba3098c7c6643ba5ba6f56c57b8868e0d" + end + + depends_on "cmake" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "tests" + end + + test do + cp pkgshare/"tests/example.cpp", testpath + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.14) + + add_library(SPIRV-Headers-example + ${CMAKE_CURRENT_SOURCE_DIR}/example.cpp) + target_include_directories(SPIRV-Headers-example + PRIVATE ${SPIRV-Headers_SOURCE_DIR}/include) + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + end +end diff --git a/Formula/s/spirv-llvm-translator.rb b/Formula/s/spirv-llvm-translator.rb new file mode 100644 index 0000000000000..4d5883422bd09 --- /dev/null +++ b/Formula/s/spirv-llvm-translator.rb @@ -0,0 +1,51 @@ +class SpirvLlvmTranslator < Formula + desc "Tool and a library for bi-directional translation between SPIR-V and LLVM IR" + homepage "https://github.com/KhronosGroup/SPIRV-LLVM-Translator" + url "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v21.1.2.tar.gz" + sha256 "8c91542b579a3b27b7aeae1db12004eb412c9ed9bdff0a29ee862c3551cadfe3" + license "Apache-2.0" => { with: "LLVM-exception" } + + bottle do + sha256 cellar: :any, arm64_tahoe: "b433cf150af8c0d5d3aefc23befeebdc8e6b14f3cf9040f68527abfdc28e5258" + sha256 cellar: :any, arm64_sequoia: "6dd67b03ad4d82575fc85d2f5b339a653078bcd22d0f22f2f957804471166792" + sha256 cellar: :any, arm64_sonoma: "01bea0a098167e495b468347b7a6bddfa64f1aa7957b1a7edf04c7cebad9c294" + sha256 cellar: :any, sonoma: "6f1da4ec580ca6db8e102caa88d5d4ea4c36542d82e091e6d2518920097904ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "93c2ce103fb4548da20d7a089641e3879dc10ad83dc12ad7da8c06098cc21a5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "957ad4f6b409706f8171f1b7a95bc58d8d13b0e40b0d15b053d2bb2e5ea6c958" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "spirv-headers" => :build + depends_on "llvm" + + def llvm + deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+)?$/) } + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: llvm.opt_lib)}" if OS.linux? + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DLLVM_BUILD_TOOLS=ON", + "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=#{Formula["spirv-headers"].opt_prefix}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.ll").write <<~EOS + target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024" + target triple = "spir64-unknown-unknown" + + define spir_kernel void @foo() { + ret void + } + EOS + system llvm.opt_bin/"llvm-as", "test.ll" + system bin/"llvm-spirv", "test.bc" + assert_path_exists testpath/"test.spv" + end +end diff --git a/Formula/s/spirv-tools.rb b/Formula/s/spirv-tools.rb new file mode 100644 index 0000000000000..52c047044030a --- /dev/null +++ b/Formula/s/spirv-tools.rb @@ -0,0 +1,59 @@ +class SpirvTools < Formula + desc "API and commands for processing SPIR-V modules" + homepage "https://github.com/KhronosGroup/SPIRV-Tools" + url "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "d00dc47df7163c2bacd70f090441e8fad96234f0e3b96c54ee9091a49e627adb" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/KhronosGroup/SPIRV-Tools.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:vulkan[._-])?sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1543302ea068c0a2c81aa893fa96e827c06b2ed436ece69b92282e35ea7907d0" + sha256 cellar: :any, arm64_sequoia: "6df12b8a8057058470fdf155133b3a021ab096d2d0def41d547fe11199e7eca3" + sha256 cellar: :any, arm64_sonoma: "2a6d58b98055e63541c81c4c9f830cbabb6fa09ff0d248fe3ce0580ff133540a" + sha256 cellar: :any, tahoe: "a56b0aeaad4870083f19dc17376f165b35c6f5111433b12e67cd1b20c785b41f" + sha256 cellar: :any, sequoia: "c443448c8edf65b6a6dcb88f03be28865a310c2845bbf7d59a1d4a1f3f1ae4a9" + sha256 cellar: :any, sonoma: "dcfafdee5d630e07555c642f28bf7d4ae2ad70692a9615eda4128baeb315567c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e9bef63025272a7ee09eb6fc9af9a58ad3fb622ac01d47366fe734c366a8b44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "721d3f4c30d2ac9b6c27d369f41c066c5434feae2ad7bc42d49c348d17cd4804" + end + + depends_on "cmake" => :build + depends_on "spirv-headers" => :build + + uses_from_macos "python" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DBUILD_SHARED_LIBS=ON", + "-DPython3_EXECUTABLE=#{which("python3")}", + "-DSPIRV-Headers_SOURCE_DIR=#{Formula["spirv-headers"].opt_prefix}", + "-DSPIRV_SKIP_TESTS=ON", + "-DSPIRV_TOOLS_BUILD_STATIC=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (libexec/"examples").install "examples/cpp-interface/main.cpp" + end + + test do + cp libexec/"examples"/"main.cpp", "test.cpp" + + args = if OS.mac? + ["-lc++"] + else + ["-lstdc++", "-lm"] + end + + system ENV.cc, "-o", "test", "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", + "-lSPIRV-Tools", "-lSPIRV-Tools-link", "-lSPIRV-Tools-opt", *args + system "./test" + end +end diff --git a/Formula/s/splint.rb b/Formula/s/splint.rb new file mode 100644 index 0000000000000..5d2adf679d0cc --- /dev/null +++ b/Formula/s/splint.rb @@ -0,0 +1,89 @@ +class Splint < Formula + desc "Secure Programming Lint" + homepage "https://github.com/splintchecker/splint" + url "https://mirrorservice.org/sites/distfiles.macports.org/splint/splint-3.1.2.src.tgz" + mirror "https://src.fedoraproject.org/repo/pkgs/splint/splint-3.1.2.src.tgz/25f47d70bd9c8bdddf6b03de5949c4fd/splint-3.1.2.src.tgz" + sha256 "c78db643df663313e3fa9d565118391825dd937617819c6efc7966cdf444fb0a" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/^(?:splint[._-])?v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "3d26b806b15af6dde29829bdca6d9c0cc44ac7ef96d5522dee1cbd3f24a9924e" + sha256 arm64_sequoia: "71b5c97c68f8d10d646955b1111d8556dc2f0ab90136dafd78f5beb673533fb3" + sha256 arm64_sonoma: "b7570a4d7dbb53a9da6cc06e69bb7fd2a850829fe93ea39ffc14f494c4b1c58b" + sha256 arm64_ventura: "6aae55c464e14dde1a9aa9f49da8e30d8184fcf12fbe06a9e913e1fc313455fa" + sha256 arm64_monterey: "f47715d1e6f0f201c2486f0d788fd138e89b86cd0c11477b3e5576fa49cffc83" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "229d18ade0e3dfc1c9ed796732a57bb385de5dfd8c15d3b265c4ef42cfd5f765" + sha256 sonoma: "a0123a9c0adb426819b56a79a095066f4aa2fa13c6bf501c212eb58e3cbe08b8" + sha256 ventura: "2b3eaa69bb97239d281a12e678c4a5314413d3cc6543742fd67a6ec1e7d987a6" + sha256 monterey: "fa3307d22e30d030cc844b92c91891cfe0581226726a7ad54e1cec82dec07189" + sha256 cellar: :any_skip_relocation, big_sur: "bbe9dd0df4449df4259f44c16dc1505e6cdde38c0e7b7cc275d17ae974c8a3b2" + sha256 cellar: :any_skip_relocation, catalina: "98cc2bfccef60b21ec014ff35e71cc91a85e77435b4e429090e2767d0696bef8" + sha256 arm64_linux: "6003db1cf73e332befaff1d85a5a3c547a094594e014b775cfe55914158dff58" + sha256 x86_64_linux: "fded0340d91cfcbd99ddf5a89b505fd59895e980d86366654196192d6358a97c" + end + + uses_from_macos "flex" + + # fix compiling error of osd.c + patch :DATA + + def install + ENV.deparallelize # build is not parallel-safe + + args = ["--disable-debug", + "--prefix=#{prefix}", + "--infodir=#{info}", + "--mandir=#{man}"] + + args << "LEXLIB=#{Formula["flex"].opt_lib}/libfl.so" if OS.linux? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args + system "make" + system "make", "install" + end + + test do + path = testpath/"test.c" + path.write <<~C + #include + int main() + { + char c; + printf("%c", c); + return 0; + } + C + + output = shell_output("#{bin}/splint #{path} 2>&1", 1) + assert_match(/5:18:\s+Variable c used before definition/, output) + end +end + + +__END__ +diff --git a/src/osd.c b/src/osd.c +index ebe214a..4ba81d5 100644 +--- a/src/osd.c ++++ b/src/osd.c +@@ -516,7 +516,7 @@ osd_getPid () + # if defined (WIN32) || defined (OS2) && defined (__IBMC__) + int pid = _getpid (); + # else +- __pid_t pid = getpid (); ++ pid_t pid = getpid (); + # endif + + return (int) pid; diff --git a/Formula/s/sponge.rb b/Formula/s/sponge.rb new file mode 100644 index 0000000000000..799e39e0fd115 --- /dev/null +++ b/Formula/s/sponge.rb @@ -0,0 +1,37 @@ +class Sponge < Formula + desc "Soak up standard input and write to a file" + homepage "https://joeyh.name/code/moreutils/" + url "https://git.joeyh.name/index.cgi/moreutils.git/snapshot/moreutils-0.70.tar.gz" + sha256 "f2bf46d410ba567cc8d01507e94916994e48742722e690dc498fab59f5250132" + license "GPL-2.0-only" + head "https://git.joeyh.name/git/moreutils.git", branch: "master" + + livecheck do + formula "moreutils" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "71b1f42aa7b050750fe4887dd349ac22ec8050fd092b2d491dcedd73725cee90" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "695617b8c9e56e08a5bda5a83859bd8b15db0075eaad8f9f94f980d9cbdfddbf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32624015555fbcfe609e8bf7d203c43413dcf0d8568c27d3cbbc8612c40df98d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f4e10bb9eea15e17aa64b895b04fa9422091065ba67588d5f915a718d59f8e6" + sha256 cellar: :any_skip_relocation, sonoma: "a3725ce0dca9b5bc8666199d9a44b142be0eda23b9f9f66086f06298e24a36da" + sha256 cellar: :any_skip_relocation, ventura: "49f2c6da0632f13e6dc655fe1ec9f1c261f2fafb5f0f692bc27e79c43658b9ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a3387e07bc7db6d8e0aea84ddc12a7870c42bd5b47ac404079f94341e2332e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12987019e4ea708b67334ec946a8cc5e7e052e87db10107cd7bbea862268dcbf" + end + + conflicts_with "moreutils", because: "both install a `sponge` executable" + + def install + system "make", "sponge" + bin.install "sponge" + end + + test do + file = testpath/"sponge-test.txt" + file.write("c\nb\na\n") + system "sort #{file} | #{bin/"sponge"} #{file}" + assert_equal "a\nb\nc\n", File.read(file) + end +end diff --git a/Formula/s/spoof-mac.rb b/Formula/s/spoof-mac.rb new file mode 100644 index 0000000000000..e75ed67c68b40 --- /dev/null +++ b/Formula/s/spoof-mac.rb @@ -0,0 +1,57 @@ +class SpoofMac < Formula + include Language::Python::Virtualenv + + desc "Spoof your MAC address in macOS" + homepage "https://github.com/feross/SpoofMAC" + url "https://files.pythonhosted.org/packages/9c/59/cc52a4c5d97b01fac7ff048353f8dc96f217eadc79022f78455e85144028/SpoofMAC-2.1.1.tar.gz" + sha256 "48426efe033a148534e1d4dc224c4f1b1d22299c286df963c0b56ade4c7dc297" + license "MIT" + revision 5 + head "https://github.com/feross/SpoofMAC.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "5e718f8027feceaf1fa8499fafc6e5638107ef2ed128b41d4c7467d3a824b65c" + end + + depends_on "python@3.14" + + on_linux do + depends_on "net-tools" + end + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + Although spoof-mac can run without root, you must be root to change the MAC. + + The launchdaemon is set to randomize en0. + You can find the interfaces available by running: + "spoof-mac list" + + If you wish to change interface randomized at startup change the plist line: + en0 + to e.g.: + en1 + EOS + end + + service do + run [opt_bin/"spoof-mac", "randomize", "en0"] + require_root true + log_path File::NULL + error_log_path File::NULL + end + + test do + system bin/"spoof-mac", "list", "--wifi" + end +end diff --git a/Formula/s/spoofdpi.rb b/Formula/s/spoofdpi.rb new file mode 100644 index 0000000000000..54701daa00813 --- /dev/null +++ b/Formula/s/spoofdpi.rb @@ -0,0 +1,56 @@ +class Spoofdpi < Formula + desc "Simple and fast anti-censorship tool written in Go" + homepage "https://github.com/xvzc/SpoofDPI" + url "https://github.com/xvzc/SpoofDPI/archive/refs/tags/v0.12.0.tar.gz" + sha256 "8350cacb0a5cc7b3c1d9aa7cbd2e519dfb61e7d59d49475de11387f8229a01c0" + license "Apache-2.0" + head "https://github.com/xvzc/SpoofDPI.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "74c3fa1d4240b0176ed16963416a15661ea3bc5167c0ad62058152c56dd695aa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6cb2bc9d9a3bff09bf9e2a32b174654ce7379fc141918f512fb6f32bc54d359" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6cb2bc9d9a3bff09bf9e2a32b174654ce7379fc141918f512fb6f32bc54d359" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6cb2bc9d9a3bff09bf9e2a32b174654ce7379fc141918f512fb6f32bc54d359" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e6cb2bc9d9a3bff09bf9e2a32b174654ce7379fc141918f512fb6f32bc54d359" + sha256 cellar: :any_skip_relocation, sonoma: "28532b6f63c37431c6159c59707c6763f6788a3f8eded481a7ccf79f8b976683" + sha256 cellar: :any_skip_relocation, ventura: "28532b6f63c37431c6159c59707c6763f6788a3f8eded481a7ccf79f8b976683" + sha256 cellar: :any_skip_relocation, monterey: "28532b6f63c37431c6159c59707c6763f6788a3f8eded481a7ccf79f8b976683" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f833b978c6f9f15ade32ce16641b752a1fc98d81b8df57e80d5be44588c2a5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16de959e4dd509269fb41e71a1fd3948581c3844b2ae035506d478313b09d615" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/spoofdpi" + end + + service do + run opt_bin/"spoofdpi" + keep_alive successful_exit: false + log_path var/"log/spoofdpi/output.log" + error_log_path var/"log/spoofdpi/error.log" + end + + test do + port = free_port + pid = spawn bin/"spoofdpi", "-system-proxy=false", "-port", port.to_s + begin + sleep 3 + # "nothing" is an invalid option, but curl will process it + # only after it succeeds at establishing a connection, + # then it will close it, due to the option, and return exit code 49. + shell_output("curl -s --connect-timeout 1 --telnet-option nothing 'telnet://127.0.0.1:#{port}'", 49) + ensure + Process.kill("SIGTERM", pid) + end + end +end diff --git a/Formula/s/spot.rb b/Formula/s/spot.rb new file mode 100644 index 0000000000000..25bf9f7f7b80a --- /dev/null +++ b/Formula/s/spot.rb @@ -0,0 +1,38 @@ +class Spot < Formula + desc "Platform for LTL and ω-automata manipulation" + homepage "https://spot.lre.epita.fr" + url "https://www.lrde.epita.fr/dload/spot/spot-2.14.2.tar.gz" + sha256 "a5142aa9b13b3623cd9c1f09b485542f8cdea3e0a2fc6116eea36eb0fc19af19" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.lrde.epita.fr/dload/spot/" + regex(/href=.*?spot[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5ebf9188289b7edc8558dd316e429a07723a4fa592872c1c5f3b4fb0c79e2c4a" + sha256 cellar: :any, arm64_sequoia: "89d678e29946e21be3799d22cb1a4b20b02a1d02d8be3f257b7d0ec4766a236f" + sha256 cellar: :any, arm64_sonoma: "376c92cbec2cd6fedf96112acceb8c75b62d1b6a56438c5c7be10158c0dd408b" + sha256 cellar: :any, sonoma: "ff17fef6f1a6f44da93594979fc2562b01fe8ce3aa8619b4b459931643b17f45" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dcd58f0db3d6df6688c4151e193f82d1df6833053bde2754c1e33647d682957" + sha256 cellar: :any_skip_relocation, x86_64_linux: "515225f54b9e59ed573016bf29650ce5cda88d0dfcc83be0a978e08b32edd374" + end + + depends_on "python@3.14" => :build + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + randltl_output = pipe_output("#{bin}/randltl -n20 a b c d", "") + assert_match "Xb R ((Gb R c) W d)", randltl_output + + ltlcross_output = pipe_output("#{bin}/ltlcross '#{bin}/ltl2tgba -H -D %f >%O' " \ + "'#{bin}/ltl2tgba -s %f >%O' '#{bin}/ltl2tgba -DP %f >%O' 2>&1", randltl_output) + assert_match "No problem detected", ltlcross_output + end +end diff --git a/Formula/s/spotbugs.rb b/Formula/s/spotbugs.rb new file mode 100644 index 0000000000000..07bc186b996b6 --- /dev/null +++ b/Formula/s/spotbugs.rb @@ -0,0 +1,57 @@ +class Spotbugs < Formula + desc "Tool for Java static analysis (FindBugs's successor)" + homepage "https://spotbugs.github.io/" + url "https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.9.8/spotbugs-4.9.8.tgz" + sha256 "2eb8e0f2b223c22ffa2ce0c1cf1be4127dde19d240b8f7ce69a5fd3ad5c36ff3" + license "LGPL-2.1-or-later" + + livecheck do + url "https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "34e866a9f0f8cdad01631157a6c33ec24dcc14b8cf4dc046dac6a41acf697c8d" + end + + head do + url "https://github.com/spotbugs/spotbugs.git", branch: "master" + + depends_on "gradle" => :build + end + + depends_on "openjdk" + + conflicts_with "fb-client", because: "both install a `fb` binary" + + def install + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + if build.head? + system "gradle", "build" + system "gradle", "installDist" + libexec.install Dir["spotbugs/build/install/spotbugs/*"] + else + libexec.install Dir["*"] + chmod 0755, "#{libexec}/bin/spotbugs" + end + (bin/"spotbugs").write_env_script "#{libexec}/bin/spotbugs", Language::Java.overridable_java_home_env + end + + test do + (testpath/"HelloWorld.java").write <<~JAVA + public class HelloWorld { + private double[] myList; + public static void main(String[] args) { + System.out.println("Hello World"); + } + public double[] getList() { + return myList; + } + } + JAVA + system Formula["openjdk"].bin/"javac", "HelloWorld.java" + system Formula["openjdk"].bin/"jar", "cvfe", "HelloWorld.jar", "HelloWorld", "HelloWorld.class" + output = shell_output("#{bin}/spotbugs -textui HelloWorld.jar") + assert_match(/M V EI.*\nM C UwF.*\n/, output) + end +end diff --git a/Formula/s/spotify_player.rb b/Formula/s/spotify_player.rb new file mode 100644 index 0000000000000..5ed5e7b6cb0ca --- /dev/null +++ b/Formula/s/spotify_player.rb @@ -0,0 +1,42 @@ +class SpotifyPlayer < Formula + desc "Command driven spotify player" + homepage "https://github.com/aome510/spotify-player" + url "https://github.com/aome510/spotify-player/archive/refs/tags/v0.21.1.tar.gz" + sha256 "f4679325c06967ce28a697f05d7ca181dbbd832b0aa2a1ca1ec41512157347b1" + license "MIT" + head "https://github.com/aome510/spotify-player.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9ee4dac23df79effc4643848479de4bdc8288f284a0a28df6f2a78a8530e2070" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cc3e78272b743f0751490b54592f6d82ec7f963893f34fc802cb85aa4c4fafe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "faeebf52e479194410086e92ca6b43a090f9c20a0ae26475edeb67ebf0ba23a5" + sha256 cellar: :any_skip_relocation, sonoma: "3127caed60e67f56412aea0520df2b09ec2323e464cf366c6d66d78af23a308b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f8b11b75b6d2e44273d8850b37d9a1cde42933f60f92b052435138fd9cd7df9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0e1319859690dacd175a27f275812da8364c2887ef54b0e658ef5f78d28b7c0" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "dbus" + depends_on "openssl@3" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", "--features", "image,notify", *std_cargo_args(path: "spotify_player") + bin.install "target/release/spotify_player" + end + + test do + cmd = "#{bin}/spotify_player -C #{testpath}/cache -c #{testpath}/config 2>&1" + _, stdout, = Open3.popen2(cmd) + assert_match "No cached credentials found", stdout.gets("\n") + assert_match version.to_s, shell_output("#{bin}/spotify_player --version") + end +end diff --git a/Formula/s/spotifyd.rb b/Formula/s/spotifyd.rb new file mode 100644 index 0000000000000..9c980076f4701 --- /dev/null +++ b/Formula/s/spotifyd.rb @@ -0,0 +1,53 @@ +class Spotifyd < Formula + desc "Spotify daemon" + homepage "https://spotifyd.rs/" + url "https://github.com/Spotifyd/spotifyd/archive/refs/tags/v0.4.1.tar.gz" + sha256 "fdbf93c51232d85a0ef29813a02f3c23aacf733444eacf898729593e8837bcfc" + license "GPL-3.0-only" + head "https://github.com/Spotifyd/spotifyd.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6fc17017e144c8fb2b05c87ca3114b23b80873d87388b7c43794c6a6f3f719fe" + sha256 cellar: :any, arm64_sequoia: "a20d1e237ffc6f0fbe07af9641538c6059dff78030d3cdb537de1cc3a98c9abb" + sha256 cellar: :any, arm64_sonoma: "be5c9b8b6af3ef7eb0df00b4a1f0a46ba1016765eb97c32acf6f4881a9b1f72b" + sha256 cellar: :any, arm64_ventura: "73e2515bec6b526ba93e57f45f90f856e3e32995748d7a31cfdda5b7046df583" + sha256 cellar: :any, sonoma: "853d77550839adae8fc9eb82bb0ec83e0fe423236b07a55fa7bca1d7e21de49a" + sha256 cellar: :any, ventura: "a4d68c08d9ab1e2206ccfe702f4074f70da3fbf5f0c52c69dd5e97595d91e7ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "5286bb74874e724b27e03a9d23a618d644ed799bf10d930b2ed5a0298f4ad9ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e667512a473240c05c0dc7f66bcde0258f511324a7b9fc07864089ab6ce3d399" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "dbus" + depends_on "portaudio" + + def install + ENV["COREAUDIO_SDK_PATH"] = MacOS.sdk_path_if_needed if OS.mac? + + system "cargo", "install", "--no-default-features", + "--features", "portaudio_backend", + *std_cargo_args + end + + service do + run [opt_bin/"spotifyd", "--no-daemon", "--backend", "portaudio"] + keep_alive true + end + + test do + args = ["--no-daemon", "--verbose"] + Open3.popen2e(bin/"spotifyd", *args) do |_, stdout_and_stderr, wait_thread| + sleep 5 + Process.kill "TERM", wait_thread.pid + output = stdout_and_stderr.read + assert_match "Starting zeroconf server to advertise on local network", output + refute_match "ERROR", output + end + end +end diff --git a/Formula/s/spr.rb b/Formula/s/spr.rb new file mode 100644 index 0000000000000..605bcf71b2fb3 --- /dev/null +++ b/Formula/s/spr.rb @@ -0,0 +1,72 @@ +class Spr < Formula + desc "Submit pull requests for individual, amendable, rebaseable commits to GitHub" + homepage "https://spacedentist.github.io/spr/" + url "https://github.com/spacedentist/spr/archive/refs/tags/v1.3.7.tar.gz" + sha256 "6b48524abfecea16e0e7a131f0c44027375a80577cde43355f54928c4921ed6c" + license "MIT" + head "https://github.com/spacedentist/spr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "45b808f91f099a130b9e5d835600cc61a995590525ced37b59abeee7aa0fc58b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8679f71d4efb65c1784f2b20c2339ca5032ada6a676e9a082f3720d51b9973ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93212861ef027cc18853c3e18c81f1b68640deb9af7955912fc84549d91e93ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0622a60bd0c8162d2e28d2c85cf6ece553f2e9851913bfcbc64ec3f3376dc429" + sha256 cellar: :any_skip_relocation, sonoma: "5e8a7f79f2e9518b1516c8ec695067a3abe5e579428964719f941390176da2f8" + sha256 cellar: :any_skip_relocation, ventura: "30a12a3e0c4d6db8deb8c30aab2d12380cd9cf1fe867cb59620a98355d008312" + sha256 cellar: :any_skip_relocation, arm64_linux: "1004ec8ee05fae9e9b5f59ce37a11006c0433f4738fbeffc192b158d1dbe498f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93414490bf24e6c0a341225a106c4051182c553f5eb7419ea2ebd5cd959198fe" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + spr = bin/"spr" + assert_match "spr #{version}", shell_output("#{spr} --version") + + system "git", "config", "--global", "user.email", "nobody@example.com" + system "git", "config", "--global", "user.name", "Nobody" + system "git", "config", "--global", "init.defaultBranch", "trunk" + system "git", "init", testpath/"test-repo" + cd "test-repo" do + system "git", "config", "spr.githubMasterBranch", "trunk" + + # Some bogus config + system "git", "config", "spr.githubRepository", "a/b" + system "git", "config", "spr.branchPrefix", "spr/" + + # Create an empty commit, which is set to be upstream + system "git", "commit", "--allow-empty", "--message", "Empty commit" + mkdir ".git/refs/remotes/origin" + (testpath/"test-repo/.git/refs/remotes/origin/trunk").atomic_write Utils.git_head + system "git", "commit", "--allow-empty", "--message", <<~EOS + Hello world + + Foo bar baz + test plan: eyes + EOS + + system spr, "format" + + expected = <<~EOS + Hello world + + Foo bar baz + + Test Plan: eyes + EOS + + assert_match expected, shell_output("git log -n 1 --format=format:%B") + end + end +end diff --git a/Formula/s/spring-completion.rb b/Formula/s/spring-completion.rb new file mode 100644 index 0000000000000..80d72c6ae2070 --- /dev/null +++ b/Formula/s/spring-completion.rb @@ -0,0 +1,35 @@ +class SpringCompletion < Formula + desc "Bash completion for Spring" + homepage "https://github.com/jacaetevha/spring_bash_completion" + url "https://github.com/jacaetevha/spring_bash_completion/archive/refs/tags/v0.0.1.tar.gz" + sha256 "a97b256dbdaca894dfa22bd96a6705ebf4f94fa8206d05f41927f062c3dd60bf" + license "Unlicense" + head "https://github.com/jacaetevha/spring_bash_completion.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eac8da3385353b9251490a72d56cc074fac00bcbb3537a6b8545c78699cbfda8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b3ae7469be600ebd63ca8f9bb7f59677dc2d766c05b75becf477923dade4cca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b31b990436b19546a9fe8d392496e6d8b14c1bd0f1e622d1ad01baee4fd4383e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cff62b143ba4126ebde03eca3822b4e1b3af6977a3a26b798d94286fd423cf47" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bd4aeec3cfd7ef58699e3db575729670c459ed5476a65b717c8ffae6ac8850c3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5c188dbaccd58b79b5596c7d0c34cd3a1a997cea7f6131393b11205a77964c2a" + sha256 cellar: :any_skip_relocation, sonoma: "25f160eca87479c8fe9c3923d5b489c160a4000cc7698c542151a29e6e65e1c0" + sha256 cellar: :any_skip_relocation, ventura: "b1f3a43b9632e6fcfd30bdfa4d4287867af9370989ee297caafcd3051a6faccd" + sha256 cellar: :any_skip_relocation, monterey: "c7c179b4ccf46a0ab7fcd3a300f0b3c1d630e6b450ba4b367c65abd4a9b4d25b" + sha256 cellar: :any_skip_relocation, big_sur: "1110b2611a3d8dc08fe1731e46692b9d77234e60aba14602f0ad1f9380933eeb" + sha256 cellar: :any_skip_relocation, catalina: "1110b2611a3d8dc08fe1731e46692b9d77234e60aba14602f0ad1f9380933eeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "83ca996727d9416ccf051913ab7a8861cc2c6b23b3d738e1445461aaa36a08dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cff62b143ba4126ebde03eca3822b4e1b3af6977a3a26b798d94286fd423cf47" + end + + def install + bash_completion.install "spring.bash" => "spring" + end + + test do + assert_match "-F _spring", + shell_output("bash -c 'source #{bash_completion}/spring && complete -p spring'") + end +end diff --git a/Formula/s/spring-loaded.rb b/Formula/s/spring-loaded.rb new file mode 100644 index 0000000000000..e9cd7e1c72f92 --- /dev/null +++ b/Formula/s/spring-loaded.rb @@ -0,0 +1,25 @@ +class SpringLoaded < Formula + desc "Java agent to enable class reloading in a running JVM" + homepage "https://github.com/spring-projects/spring-loaded" + url "https://search.maven.org/remotecontent?filepath=org/springframework/springloaded/1.2.6.RELEASE/springloaded-1.2.6.RELEASE.jar" + version "1.2.6" + sha256 "6edd6ffb3fd82c3eee95f5588465f1ab3a94fc5fff65b6e3a262f6de5323d203" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "56e262bc88aebe0ac04e149b8ae57d346e60d2c04e4306a53ba57b69947acb01" + end + + depends_on "openjdk" => :test + + def install + (share/"java").install "springloaded-#{version}.RELEASE.jar" => "springloaded.jar" + end + + test do + system "#{Formula["openjdk"].bin}/java", "-javaagent:#{share}/java/springloaded.jar", "-version" + end +end diff --git a/Formula/s/sprocket.rb b/Formula/s/sprocket.rb new file mode 100644 index 0000000000000..ac1cabcdf5d91 --- /dev/null +++ b/Formula/s/sprocket.rb @@ -0,0 +1,69 @@ +class Sprocket < Formula + desc "Bioinformatics workflow engine built on the Workflow Description Language (WDL)" + homepage "https://sprocket.bio" + # pull from git tag to get submodules + url "https://github.com/stjude-rust-labs/sprocket.git", + tag: "v0.18.0", + revision: "3f19960e232ac96af539ab8aeda7a8101832d213" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/stjude-rust-labs/sprocket.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "a918c88d1763c710a25b4f8c5f1948d8e3ef2a691fc0648d34bdb2985aa62f6f" + sha256 cellar: :any, arm64_sequoia: "c5e4197d5538054f53c52d913b76279418b17f4fb9d21eaa3df0f2a5f2185208" + sha256 cellar: :any, arm64_sonoma: "c54e8c7d944f5bdc3629e9570514683671f643e03c56c0278b1f9a091a4ff6d0" + sha256 cellar: :any, sonoma: "716ad267bcb384d7426b5400da2aeff12248d2f14058a33acf607641104262da" + sha256 cellar: :any_skip_relocation, arm64_linux: "5cd2e170f6047a11b389b3fad33d2678b35909e6bb9271221bb1440f5cc62d3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5f9aa2bb7563e48898cb0562e5b03909dceb53d0dbec30419af68ce81603cb4" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/sprocket --version") + (testpath/"hello.wdl").write <<~WDL + version 1.2 + + task say_hello { + input { + String greeting + String name + } + + command <<< + echo "~{greeting}, ~{name}!" + >>> + + output { + String message = read_string(stdout()) + } + + runtime { + container: "ubuntu:latest" + } + } + WDL + + expected = <<~JSON.strip + { + "say_hello.greeting": "String ", + "say_hello.name": "String " + } + JSON + + assert_match expected, shell_output("#{bin}/sprocket inputs --name say_hello #{testpath}/hello.wdl") + end +end diff --git a/Formula/s/sproxy.rb b/Formula/s/sproxy.rb new file mode 100644 index 0000000000000..82db37399102d --- /dev/null +++ b/Formula/s/sproxy.rb @@ -0,0 +1,149 @@ +class Sproxy < Formula + desc "HTTP proxy server collecting URLs in a 'siege-friendly' manner" + homepage "https://www.joedog.org/sproxy-home/" + url "https://download.joedog.org/sproxy/sproxy-1.02.tar.gz" + sha256 "29b84ba66112382c948dc8c498a441e5e6d07d2cd5ed3077e388da3525526b72" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://download.joedog.org/sproxy/" + regex(/href=.*?sproxy[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e720f9fc39225fa4b382c6a54d510035893fe1cf0dcb44f28a73bb2f8237c85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ae603617df32ac15e8cf5548ff5f230fcc33e0abc52af64a31bb00810f0aedd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd501fbd874421fd288cc4af5c4589f9eb842027c5938d84c598d0bec8a6c1f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf109934bc851cb45e6d6a9c24caff018e3ad0d1ebf45fa45d3c27291f7bcddd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bf109934bc851cb45e6d6a9c24caff018e3ad0d1ebf45fa45d3c27291f7bcddd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b8c092d79cd0096d0d626cb9df9712e213e6fb6a814969c408feb2714e04917a" + sha256 cellar: :any_skip_relocation, sonoma: "19d8287f1648316caee4f7888c57fa805c4c790c477557a11622f22aedb91905" + sha256 cellar: :any_skip_relocation, ventura: "ba5b54502dcbb781c47640129208bfbd794770262afbcc2909773f01f2938687" + sha256 cellar: :any_skip_relocation, monterey: "ba5b54502dcbb781c47640129208bfbd794770262afbcc2909773f01f2938687" + sha256 cellar: :any_skip_relocation, big_sur: "a0bbfcf15c625d3fc022b0d1960f05a05bbd2e0a7f21458f92dbd537cd0a614a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8924c72b741d24b2ea9f0c59ce12725ef3ca551fd526ab48c77051c943afddce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4eefc2816eb2f502c05a7713f2d34efc56f81016e9fdef5c86299c04f69bd734" + end + + # Only needed due to the change to "Makefile.am" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + + resource "File::Remove" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/File-Remove-1.60.tar.gz" + sha256 "e86e2a40ffedc6d5697d071503fd6ba14a5f9b8220af3af022110d8e724f8ca6" + end + + resource "YAML::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.73.tar.gz" + sha256 "bc315fa12e8f1e3ee5e2f430d90b708a5dc7e47c867dba8dce3a6b8fbe257744" + end + + resource "Module::Install" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Module-Install-1.19.tar.gz" + sha256 "1a53a78ddf3ab9e3c03fc5e354b436319a944cba4281baf0b904fa932a13011b" + end + + resource "Net::SSLeay" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.92.tar.gz" + sha256 "47c2f2b300f2e7162d71d699f633dd6a35b0625a00cbda8c50ac01144a9396a9" + end + + resource "HTML::Parser" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.76.tar.gz" + sha256 "64d9e2eb2b420f1492da01ec0e6976363245b4be9290f03f10b7d2cb63fa2f61" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.09.tar.gz" + sha256 "03e63ada499d2645c435a57551f041f3943970492baa3b3338246dab6f1fae0a" + end + + resource "LWP::UserAgent" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.64.tar.gz" + sha256 "48335e0992b4875bd73c6661439f3506c2c6d92b5dd601582b8dc22e767d3dae" + end + + resource "HTTP::Request" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.36.tar.gz" + sha256 "576a53b486af87db56261a36099776370c06f0087d179fc8c7bb803b48cddd76" + end + + resource "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.05.tar.gz" + sha256 "365d6294dfbd37ebc51def8b65b81eb79b3934ecbc95a2ec2d4d827efe6a922b" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + end + + resource "HTTP::Daemon" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-6.14.tar.gz" + sha256 "f0767e7f3cbb80b21313c761f07ad8ed253bce9fa2d0ba806b3fb72d309b2e1d" + end + + resource "LWP::MediaTypes" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz" + sha256 "8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9" + end + end + + def install + unless OS.mac? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_create_path "PERL5LIB", lib/"sproxy" + ENV["PERL_MM_USE_DEFAULT"] = "1" + ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + end + + # Prevents "ERROR: Can't create '/usr/local/share/man/man3'"; also fixes an + # audit violation triggered if the man page is installed in #{prefix}/man. + # After making the change below and running autoreconf, the default ends up + # being the same as #{man}, so there's no need for us to pass --mandir to + # configure, though, as a result of this change, that flag would be honored. + # Reported 10th May 2016 to https://www.joedog.org/support/ + inreplace "doc/Makefile.am", "$(prefix)/man", "$(mandir)" + inreplace "lib/Makefile.am", + "Makefile.PL", + "Makefile.PL PREFIX=$(prefix) INSTALLSITEMAN3DIR=$(mandir)/man3" + + # Only needed due to the change to "Makefile.am" + system "autoreconf", "-fiv" + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make" + system "make", "install" + + # sproxy must be wrapped in an ENV script on Linux so it can find + # the additional Perl dependencies + unless OS.mac? + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + chmod 0755, libexec/"bin/sproxy" + end + end + + test do + assert_match "SPROXY v#{version}-", shell_output("#{bin}/sproxy -V") + end +end diff --git a/Formula/s/spytrap-adb.rb b/Formula/s/spytrap-adb.rb new file mode 100644 index 0000000000000..3f27883ecb3ef --- /dev/null +++ b/Formula/s/spytrap-adb.rb @@ -0,0 +1,39 @@ +class SpytrapAdb < Formula + desc "Test a phone for stalkerware and suspicious configuration using usb debugging" + homepage "https://github.com/spytrap-org/spytrap-adb" + url "https://github.com/spytrap-org/spytrap-adb/releases/download/v0.3.5/spytrap-adb-0.3.5.tar.gz" + sha256 "e33a342aa461b56a8d857c2c29b743658bd87b4ade7bed20399dea2cea01b0f8" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8428084b606a2e3833254e703fbe4008de6dfaaf89ca1f8ff87e6fe2f70425cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4309532f2c887a32ef4a0f85176b3b767c4205a5b23b2df774f44372f41c8ced" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9405e4ed5fbe1ca731a3680a79c5ade64b34b1f7400564e547aa61b4865170d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "43d5058fc2de380c055716f508f140ba0eff5a282841be511a538aabde113834" + sha256 cellar: :any_skip_relocation, sonoma: "135532f2cab5daf44e7317ef497934ed9bebfa524143bb9b7634af8be0a682f7" + sha256 cellar: :any_skip_relocation, ventura: "8720d4e3019e969e56bca91c765a19a89fc1f7ece8aee8afd951493fe62fd9a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8eb6db8813e8a10e0b5df9d66beab230cc98e19a3282969f3607f986bfbcf3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d2341a2950197714739dc5f7f7be663e31429d7fa187abe2086006171c96367" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"spytrap-adb", "completions") + end + + def caveats + <<~EOS + At runtime, adb must be accessible from your PATH. + + You can install adb from Homebrew Cask: + brew install --cask android-platform-tools + EOS + end + + test do + system bin/"spytrap-adb", "download-ioc" + end +end diff --git a/Formula/s/sq.rb b/Formula/s/sq.rb new file mode 100644 index 0000000000000..191c628550a45 --- /dev/null +++ b/Formula/s/sq.rb @@ -0,0 +1,54 @@ +class Sq < Formula + desc "Data wrangler with jq-like query language" + homepage "https://sq.io" + url "https://github.com/neilotoole/sq/archive/refs/tags/v0.48.5.tar.gz" + sha256 "4ed9cef836e66174b6e01c8d410cd393aeae7f7069a428a7ab2adcd1e282cf68" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4e7e26f4d83f7829d91c329688d051d834e8a8af95b2c020d67793a5eb87e236" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f7d17fcc389a770e377f4c1decb25b033b40ed0f3054982f4fcb73ffaa32f32" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ab356e5d43c53e4afbd823d3ed7205b148273fc79ed08e36428bc8b42a50de9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d2d2280b04a8a8b9cdd5ed35dd5686301c9708e580001948012b68ca5377cba7" + sha256 cellar: :any_skip_relocation, sonoma: "66320e44d65e85d579904c7f4dd8823a8fe9ec18a59e7e24b38fae78565656ad" + sha256 cellar: :any_skip_relocation, ventura: "5b7ab78293193479047eafccfce81247ea02d73905bff3ee35a637ac76f241c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e5e69f47d93f1c7eabd2d38fae687102066278536e9f12dc130e437a7158294" + sha256 cellar: :any_skip_relocation, x86_64_linux: "436b94f41c3c115501602d3a4bacae43e6b0697dba66e4801527ad5d0b867b42" + end + + depends_on "go" => :build + + uses_from_macos "sqlite" => :test + + conflicts_with "squirrel-lang", because: "both install `sq` binaries" + + def install + pkg = "github.com/neilotoole/sq/cli/buildinfo" + ldflags = %W[ + -s -w + -X #{pkg}.Version=v#{version} + -X #{pkg}.Commit=RELEASE + -X #{pkg}.Timestamp=#{Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")} + ] + tags = %w[ + netgo sqlite_vtable sqlite_stat4 sqlite_fts5 sqlite_introspect + sqlite_json sqlite_math_functions + ] + system "go", "build", *std_go_args(ldflags:, tags:) + generate_completions_from_executable(bin/"sq", "completion") + (man1/"sq.1").write Utils.safe_popen_read(bin/"sq", "man") + end + + test do + (testpath/"test.sql").write <<~SQL + create table t(a text, b integer); + insert into t values ('hello',1),('there',42); + SQL + system "sqlite3 test.db < test.sql" + out1 = shell_output("#{bin}/sq add --active --handle @tst test.db") + assert_equal %w[@tst sqlite3 test.db], out1.strip.split(/\s+/) + out2 = shell_output("#{bin}/sq '@tst.t | .b' &1") + assert_equal %w[b 1 42], out2.strip.split("\n") + end +end diff --git a/Formula/s/sql-formatter.rb b/Formula/s/sql-formatter.rb new file mode 100644 index 0000000000000..ba8cf00387275 --- /dev/null +++ b/Formula/s/sql-formatter.rb @@ -0,0 +1,38 @@ +class SqlFormatter < Formula + desc "Whitespace formatter for different query languages" + homepage "https://sql-formatter-org.github.io/sql-formatter/" + url "https://registry.npmjs.org/sql-formatter/-/sql-formatter-15.6.10.tgz" + sha256 "3b070a5bb281e40c0e78e22aa1651407781dd847e09ac913eafcb2963d9fab0d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0519d62277b7da2544a1d0d6e3e6eccde59fa89a807f3f694df7b753d34d36aa" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sql-formatter --version") + + (testpath/"test.sql").write <<~SQL + SELECT * FROM users WHERE id = 1; + SQL + + system bin/"sql-formatter", "--fix", "test.sql" + expected_output = <<~SQL + SELECT + * + FROM + users + WHERE + id = 1; + SQL + + assert_equal expected_output, (testpath/"test.sql").read + end +end diff --git a/Formula/s/sql-language-server.rb b/Formula/s/sql-language-server.rb new file mode 100644 index 0000000000000..652bb200c0258 --- /dev/null +++ b/Formula/s/sql-language-server.rb @@ -0,0 +1,68 @@ +class SqlLanguageServer < Formula + desc "Language Server for SQL" + homepage "https://github.com/joe-re/sql-language-server" + url "https://registry.npmjs.org/sql-language-server/-/sql-language-server-1.7.1.tgz" + sha256 "c92fe8ae8756f86bc893ec3dff6d85653de242eb671af0430807064db79d9cd6" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cf25118bc997d51a285ac4cbad9ceb6ca1e45ded96ef52c11834a30bf935d5e0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1250a7af843e78b2398cdbb217e9625b1f77ecdb695cdc74a173ee377c3f6f25" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8191b922c90af4dbe2e3fce69ddf818643bd12c8ced97e454a7c0bd28e6458ea" + sha256 cellar: :any_skip_relocation, sonoma: "c24bb22b07a5ba4ce0a6ee838fc5976c7bc50a7d51880f9694ad421fe5faaeb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "00eeaa0a119c6512fea47329da49f21c6c04f6d7832eac78d46e0f74f3339d7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07b1cdb55cc9429d8f2d34f30bfe5103c93efce6752d4f76cf35053616af74c0" + end + + depends_on "node" + + on_macos do + depends_on "terminal-notifier" + end + + on_linux do + # Workaround for old `node-gyp` that needs distutils. + # TODO: Remove when `node-gyp` is v10+ + depends_on "python-setuptools" => :build + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Remove vendored pre-built binary `terminal-notifier` + node_notifier_vendor_dir = libexec/"lib/node_modules/sql-language-server/node_modules/node-notifier/vendor" + rm_r(node_notifier_vendor_dir) # remove vendored pre-built binaries + + if OS.mac? + terminal_notifier_dir = node_notifier_vendor_dir/"mac.noindex" + terminal_notifier_dir.mkpath + + # replace vendored `terminal-notifier` with our own + terminal_notifier_app = Formula["terminal-notifier"].opt_prefix/"terminal-notifier.app" + ln_sf terminal_notifier_app.relative_path_from(terminal_notifier_dir), terminal_notifier_dir + end + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"sql-language-server", "up", "--method", "stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/s/sql-lint.rb b/Formula/s/sql-lint.rb new file mode 100644 index 0000000000000..70ee8c16d4281 --- /dev/null +++ b/Formula/s/sql-lint.rb @@ -0,0 +1,31 @@ +class SqlLint < Formula + desc "SQL linter to do sanity checks on your queries and bring errors back from the DB" + homepage "https://github.com/joereynolds/sql-lint" + url "https://registry.npmjs.org/sql-lint/-/sql-lint-1.0.2.tgz" + sha256 "17575266273fe3f762595fe404f49ff5fbd4c360f605cda0718cb62d65ad82b8" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5003c2e4717f5ae3f32a0bc1656a9fdec5a130cb54cec5dceeef497367a277b6" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"pg-enum.sql").write <<~SQL + CREATE TYPE status AS ENUM ('to-do', 'in-progress', 'done'); + SQL + assert_empty shell_output("#{bin}/sql-lint -d postgres pg-enum.sql") + + (testpath/"invalid-delete.sql").write <<~SQL + DELETE FROM table-epbdlrsrkx; + SQL + assert_match "missing-where", shell_output("#{bin}/sql-lint invalid-delete.sql", 1) + end +end diff --git a/Formula/s/sql-migrate.rb b/Formula/s/sql-migrate.rb new file mode 100644 index 0000000000000..0f567bc01b540 --- /dev/null +++ b/Formula/s/sql-migrate.rb @@ -0,0 +1,54 @@ +class SqlMigrate < Formula + desc "SQL schema migration tool for Go" + homepage "https://github.com/rubenv/sql-migrate" + url "https://github.com/rubenv/sql-migrate/archive/refs/tags/v1.8.0.tar.gz" + sha256 "692eabfc9d92f1c128381e5c637caa2f3777d16566104af67ad814db54ffddba" + license "MIT" + head "https://github.com/rubenv/sql-migrate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "070d30eb5531f020af84987bbe55e5cbc3ff1c1ef4866244dd51ff927a4ca2e3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5ff914e6568f81993bc2a6e53f0b775235d23726b34d40106fca5f04633ad1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a4b42f987fcf69593ea7a791317f1db869b830b0f1ef5ba548904ace4cff7ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f06914985b294e74c9e6400646f1c333e9a3f367956d24fe2c64d177c61981ac" + sha256 cellar: :any_skip_relocation, sonoma: "b3aa4ee541144bef58833310233f640ccd26ac0354ebc9db12ac5fb561683b85" + sha256 cellar: :any_skip_relocation, ventura: "e3e5031ddeec22e1503488166941965ef948f5f995b7eea0a20aebb6532a8080" + sha256 cellar: :any_skip_relocation, arm64_linux: "69670d3bfdc371986d396651fa787facbbe2f89c7618aabd061e6ebd4fb4e2d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71ca31cf42b91bca6b1a920588e2cefbeb3b939f4a34c3791894ee3781affd0d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X Main.Version=#{version}"), "./sql-migrate" + end + + test do + ENV["TZ"] = "UTC" + + test_config = testpath/"dbconfig.yml" + test_config.write <<~YAML + development: + dialect: sqlite3 + datasource: test.db + dir: migrations/sqlite3 + YAML + + mkdir testpath/"migrations/sqlite3" + system bin/"sql-migrate", "new", "brewtest" + + timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S") + test_sql = testpath/"migrations/sqlite3/#{timestamp}-brewtest.sql" + assert_path_exists test_sql, "failed to create test.sql" + + output = shell_output("#{bin}/sql-migrate status") + expected = <<~EOS + +-----------------------------+---------+ + | MIGRATION | APPLIED | + +-----------------------------+---------+ + | #{timestamp}-brewtest.sql | no | + +-----------------------------+---------+ + EOS + assert_equal expected, output + end +end diff --git a/Formula/s/sql-translator.rb b/Formula/s/sql-translator.rb new file mode 100644 index 0000000000000..54cfc4a10bb57 --- /dev/null +++ b/Formula/s/sql-translator.rb @@ -0,0 +1,123 @@ +class SqlTranslator < Formula + desc "Manipulate structured data definitions (SQL and more)" + homepage "https://github.com/dbsrgits/sql-translator/" + url "https://cpan.metacpan.org/authors/id/I/IL/ILMARI/SQL-Translator-1.62.tar.gz" + sha256 "0acd4ff9ac3a2f8d5d67199aac02cdc127e03888e479c51c7bbdc21b85c1ce24" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6bbb52e04b20e6002435e7cc40a448471c20c3ef977093731eca192d38de065c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6dd6884ab19aeeb5423ef3df3fa1cd27f1168385cc20e6698b29de481e38ed4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6dd6884ab19aeeb5423ef3df3fa1cd27f1168385cc20e6698b29de481e38ed4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71f7b2c9530c2e5aa5485d59994e1c02496e4089f259a3a2b7fda64d77609749" + sha256 cellar: :any_skip_relocation, sonoma: "1b1a1fecd8bbbf18e8b569021cf91917b4bd0e9247798433bbde8e7a1d43285c" + sha256 cellar: :any_skip_relocation, ventura: "8cfcf2ebb680afcd5e2c0ebd8bba4e5e11b70c3e9aa77463822b489c256494cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "4294a929fd355f853e0d4f11892902b6e9b38f0891849f85e02a22a0cb4c6c77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aad013b468ccc8eb007b96d2fd66ca07c3cb67448bf4134d954174945f3be5af" + end + + uses_from_macos "perl" + + on_linux do + resource "Moo" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-2.003006.tar.gz" + sha256 "bcb2092ab18a45005b5e2e84465ebf3a4999d8e82a43a09f5a94d859ae7f2472" + end + + resource "Module::Runtime" do + url "https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz" + sha256 "68302ec646833547d410be28e09676db75006f4aa58a11f3bdb44ffe99f0f024" + end + + resource "Sub::Quote" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Sub-Quote-2.006006.tar.gz" + sha256 "6e4e2af42388fa6d2609e0e82417de7cc6be47223f576592c656c73c7524d89d" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.30.tar.gz" + sha256 "da5bd0d5c903519bbf10bb9ba0cb7bcac0563882bcfe4503aee3fb143eddef6b" + end + + resource "Import::Into" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Import-Into-1.002005.tar.gz" + sha256 "bd9e77a3fb662b40b43b18d3280cd352edf9fad8d94283e518181cc1ce9f0567" + end + + resource "Role::Tiny" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.001004.tar.gz" + sha256 "92ba5712850a74102c93c942eb6e7f62f7a4f8f483734ed289d08b324c281687" + end + + resource "Class::Method::Modifiers" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-Method-Modifiers-2.13.tar.gz" + sha256 "ab5807f71018a842de6b7a4826d6c1f24b8d5b09fcce5005a3309cf6ea40fd63" + end + + resource "DBI" do + url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.643.tar.gz" + sha256 "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa" + end + + resource "Carp::Clan" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Carp-Clan-6.08.tar.gz" + sha256 "c75f92e34422cc5a65ab05d155842b701452434e9aefb649d6e2289c47ef6708" + end + + resource "Parse::RecDescent" do + url "https://cpan.metacpan.org/authors/id/J/JT/JTBRAUN/Parse-RecDescent-1.967015.tar.gz" + sha256 "1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37" + end + end + + resource "File::ShareDir::Install" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-0.13.tar.gz" + sha256 "45befdf0d95cbefe7c25a1daf293d85f780d6d2576146546e6828aad26e580f9" + end + + resource "Package::Variant" do + url "https://cpan.metacpan.org/authors/id/M/MS/MSTROUT/Package-Variant-1.003002.tar.gz" + sha256 "b2ed849d2f4cdd66467512daa3f143266d6df810c5fae9175b252c57bc1536dc" + end + + resource "strictures" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/strictures-2.000006.tar.gz" + sha256 "09d57974a6d1b2380c802870fed471108f51170da81458e2751859f2714f8d57" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + + system "perl", "Makefile.PL", "--defaultdeps", + "INSTALL_BASE=#{libexec}", + "INSTALLSITESCRIPT=#{bin}", + "INSTALLSITEMAN1DIR=#{man1}", + "INSTALLSITEMAN3DIR=#{man3}" + system "make", "install" + + bin.env_script_all_files libexec/"bin", PERL5LIB: ENV["PERL5LIB"] + end + + test do + command = "#{bin}/sqlt -f MySQL -t PostgreSQL --no-comments -" + sql_input = "create table sqlt ( id int AUTO_INCREMENT );" + sql_output = <<~SQL + CREATE TABLE "sqlt" ( + "id" serial + ); + + SQL + assert_equal sql_output, pipe_output(command, sql_input) + end +end diff --git a/Formula/s/sqlancer.rb b/Formula/s/sqlancer.rb new file mode 100644 index 0000000000000..dc10ec8012512 --- /dev/null +++ b/Formula/s/sqlancer.rb @@ -0,0 +1,57 @@ +class Sqlancer < Formula + desc "Detecting Logic Bugs in DBMS" + homepage "https://github.com/sqlancer/sqlancer" + url "https://github.com/sqlancer/sqlancer/archive/refs/tags/v2.0.0.tar.gz" + sha256 "4811fea3d08d668cd2a41086be049bdcf74c46a6bb714eb73cdf6ed19a013f41" + license "MIT" + head "https://github.com/sqlancer/sqlancer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "434aa776b8e6f535368a67b42df3b0a17dcea382c06c17aaf6ea8961aa7f5aac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0ca4462cee4dbd7d47d818928b112489fe63c4dd0d2489bd305f9e5f172e3697" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "351350797f563ba03179e8c47f8556b5950f8ba52fa6d9eed411384405c11230" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a8f6995c0eaf3002eead99ad6ca75a3922c7e6d4f1206a1f573fc55b2445140" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3e7fba8aa71ddb6e684ec75b414f4920a4e7f9d6cd50cbadd9952a5ae18366e8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3c92f7d690ed61405369d71a0ae3ce6cb0f5f102d3e330d20f9c2dd20831d434" + sha256 cellar: :any_skip_relocation, sonoma: "d53935c68d2add8d86432c2a0671cc9200105bb85a0cb39dc5949a7b1bbd0611" + sha256 cellar: :any_skip_relocation, ventura: "94d63909d9e75194f791872f30e80496c16ecf119f36f69f9c39c259efc9b787" + sha256 cellar: :any_skip_relocation, monterey: "132c2d5e369de21ea6e7e7860ca95f44d2a36c5f50325896cf170bb3e49a8d8d" + sha256 cellar: :any_skip_relocation, big_sur: "c355a181b18f9c30e07f98dc66b3075a56baeb775646a7b7a0417231110f49a6" + sha256 cellar: :any_skip_relocation, catalina: "0bd64f69b4f7f052c5c6b43ef8f5835e41aca4a2e8cd991cdcc21bd27da91e4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0eaaca38cb007dc15618d07372f00fcbfe4f794b6f8fcc6114d92c03a3053a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afe59e6d912d3a7b055f7cc05ad72ae6f7af06b0cd208241cf0aa4a0e0506d5d" + end + + depends_on "maven" => :build + depends_on "openjdk" + + uses_from_macos "sqlite" => :test + + def install + if build.head? + inreplace "pom.xml", %r{sqlancer\n\s*#{stable.version}}, + "sqlancer\n #{version}" + end + system "mvn", "package", "-DskipTests=true", + "-Dmaven.javadoc.skip=true", + "-Djacoco.skip=true" + libexec.install "target" + bin.write_jar_script libexec/"target/sqlancer-#{version}.jar", "sqlancer" + end + + test do + cmd = %w[ + sqlancer + --print-progress-summary true + --num-threads 1 + --timeout-seconds 5 + --random-seed 1 + sqlite3 + ].join(" ") + output = shell_output(cmd) + + assert_match(/Overall execution statistics/, output) + assert_match(/\d+k? successfully-executed statements/, output) + assert_match(/\d+k? unsuccessfuly-executed statements/, output) + end +end diff --git a/Formula/s/sqlbench.rb b/Formula/s/sqlbench.rb new file mode 100644 index 0000000000000..5c88477a186ea --- /dev/null +++ b/Formula/s/sqlbench.rb @@ -0,0 +1,39 @@ +class Sqlbench < Formula + desc "Measures and compares the execution time of one or more SQL queries" + homepage "https://github.com/felixge/sqlbench" + url "https://github.com/felixge/sqlbench/archive/refs/tags/v1.1.0.tar.gz" + sha256 "deaf4c299891ce75abff00429343eded76e8ddc8295d488938aa9ee418a7c9b3" + license "MIT" + head "https://github.com/felixge/sqlbench.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8c496486c81f8ef1e302ef65bdb290f2d6374e1b1840a7e970991a2ea76bd219" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb5fc33b6e66c2132a7369001b56bced611e9f7b7f7d2488cf11c57f7f7c77ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ede04ad826d75e794b7fe73102638e05fa6d800fd9621d9060817afe5b1c398f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0598ce5d9b3c1aed37b1690a3e8357300b3ef8906ea2275fe1ee997375c09e98" + sha256 cellar: :any_skip_relocation, arm64_monterey: "14d3a0b3a26e3291ae1039e67c72970b4a1b0388387b919f2c71e01e24e6a429" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8373986acd8ee9e32df964c5bff6b365f29afa06fa256789017112d9b07ffcf2" + sha256 cellar: :any_skip_relocation, sonoma: "f8238453f1e6614c8f14910cfcc53d465cc15cce3d4c8b11b6042be4b36ad319" + sha256 cellar: :any_skip_relocation, ventura: "fafa90b195b10fa34a841acec103788f7e83277ca5b58c8a5763868857409dd1" + sha256 cellar: :any_skip_relocation, monterey: "a59e25067b830b0062a0d3c7fa98da5c31ef16c0763303f5acf16238aead26a6" + sha256 cellar: :any_skip_relocation, big_sur: "9a74a774e1c5c5512b9230713af78f3694d38f237241817740c8f244febe8e09" + sha256 cellar: :any_skip_relocation, catalina: "a138dbb8bf3fa6293e51b49e91e35078c8c2d7dc399c70a61705f047b519a8f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "8865da934790a89133f570b9e8501d9648fbaeb33f49ec8a21867625f5b8da41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0e961ada32e3e6588b0a328d3030f39e7bcc1457b63573608347e28cd5960cf" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + pkgshare.install "examples" + end + + test do + cp_r pkgshare/"examples", testpath + assert_match "failed to connect to", + shell_output("#{bin}/sqlbench #{testpath}/examples/sum/*.sql 2>&1", 1) + end +end diff --git a/Formula/s/sqlboiler.rb b/Formula/s/sqlboiler.rb new file mode 100644 index 0000000000000..0db1d7e4128ad --- /dev/null +++ b/Formula/s/sqlboiler.rb @@ -0,0 +1,37 @@ +class Sqlboiler < Formula + desc "Generate a Go ORM tailored to your database schema" + homepage "https://github.com/volatiletech/sqlboiler" + url "https://github.com/volatiletech/sqlboiler/archive/refs/tags/v4.19.5.tar.gz" + sha256 "fae160e36637c5d0c57db53bafc11439cf61b02dc30656277d7e90c546b04a4d" + license "BSD-3-Clause" + head "https://github.com/volatiletech/sqlboiler.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ca1a271ac90407aecfc61bcc31c43f5943985c5785817f916279634570b3670a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "24bf4847e512fc0c4987ffb7aa9731270eb83642f874cceac6e3163be7ac7da5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24bf4847e512fc0c4987ffb7aa9731270eb83642f874cceac6e3163be7ac7da5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "24bf4847e512fc0c4987ffb7aa9731270eb83642f874cceac6e3163be7ac7da5" + sha256 cellar: :any_skip_relocation, sonoma: "cd3b13555a393652a4f08d29c23239f57677db9f1ee7d451107ee660ce4c1aa7" + sha256 cellar: :any_skip_relocation, ventura: "cd3b13555a393652a4f08d29c23239f57677db9f1ee7d451107ee660ce4c1aa7" + sha256 cellar: :any_skip_relocation, arm64_linux: "15045ea97a8c55564a5ec41422248e32ebfcd7b7144b1201106135f408dc1890" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0d778d654efc38ee84e8f54d3a75a2286993a13c0ea8a5b28d160defa6367cb" + end + + depends_on "go" => :build + + def install + %w[mssql mysql psql sqlite3].each do |driver| + f = "sqlboiler-#{driver}" + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/f), "./drivers/#{f}" + end + + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/sqlboiler psql 2>&1", 1) + assert_match "failed to find key user in config", output + + assert_match version.to_s, shell_output("#{bin}/sqlboiler --version") + end +end diff --git a/Formula/s/sqlc.rb b/Formula/s/sqlc.rb new file mode 100644 index 0000000000000..ece49b385fddb --- /dev/null +++ b/Formula/s/sqlc.rb @@ -0,0 +1,56 @@ +class Sqlc < Formula + desc "Generate type safe Go from SQL" + homepage "https://sqlc.dev/" + url "https://github.com/sqlc-dev/sqlc/archive/refs/tags/v1.30.0.tar.gz" + sha256 "32a8ff2acd852c4a004383b441e6614b6c57ce1a294c0e455ab7431f017aa895" + license "MIT" + head "https://github.com/sqlc-dev/sqlc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6fca7e95ad97972c257cd88e4ffd75cbc4fd466b0ee9fe9a7db21a9eb19b4d35" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "804df54f6aa327864d260e50070f44a1aa0d70e9983c069b3b08dac10a4b21d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "72cf4daabe29f5ac51fe24d7fb511de87d672fe9e007f6e0de3191754376a649" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a3400a7b98a53ab5b969fc4d7e30f4d7b1cd7e93da93cebc9aff9664690c465" + sha256 cellar: :any_skip_relocation, sonoma: "c88678492a2045628c286c57c17a2a29b213b5323fff965aabb6b3f0f47f976f" + sha256 cellar: :any_skip_relocation, ventura: "331997dac9ac8cd9bb2f6fecab3d867ec9c2b8aa9511fa768eff24dc44fb4834" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee893ead14417e5cdfdeb738b797ac06d54624f278e98f31760ba1aeb603feeb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e823133161b575d2923432eb9bc5d52ef4143b20facdb7a3dd3aee2e067f1829" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/sqlc" + + generate_completions_from_executable(bin/"sqlc", "completion") + end + + test do + (testpath/"sqlc.json").write <<~JSON + { + "version": "1", + "packages": [ + { + "name": "db", + "path": ".", + "queries": "query.sql", + "schema": "query.sql", + "engine": "postgresql" + } + ] + } + JSON + + (testpath/"query.sql").write <<~SQL + CREATE TABLE foo (bar text); + + -- name: SelectFoo :many + SELECT * FROM foo; + SQL + + system bin/"sqlc", "generate" + assert_path_exists testpath/"db.go" + assert_path_exists testpath/"models.go" + assert_match "// Code generated by sqlc. DO NOT EDIT.", File.read(testpath/"query.sql.go") + end +end diff --git a/Formula/s/sqlcipher.rb b/Formula/s/sqlcipher.rb new file mode 100644 index 0000000000000..4b8617b2a9b50 --- /dev/null +++ b/Formula/s/sqlcipher.rb @@ -0,0 +1,69 @@ +class Sqlcipher < Formula + desc "SQLite extension providing 256-bit AES encryption" + homepage "https://www.zetetic.net/sqlcipher/" + url "https://github.com/sqlcipher/sqlcipher/archive/refs/tags/v4.6.1.tar.gz" + sha256 "d8f9afcbc2f4b55e316ca4ada4425daf3d0b4aab25f45e11a802ae422b9f53a3" + license "BSD-3-Clause" + head "https://github.com/sqlcipher/sqlcipher.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "07939e4e3872fb2105ee37426c0f79b195c61bc27ab28cff562d696fa5487094" + sha256 cellar: :any, arm64_sequoia: "2bce86a48eb9ce4e89f10638971fe3e3d338e410c41432f4480866dccc8b8a25" + sha256 cellar: :any, arm64_sonoma: "ce9815c45580388609c3c3523f8cca865a4a38b809f08a31a786fdefd8829e63" + sha256 cellar: :any, arm64_ventura: "f52dbcc2f74a793f58fadd7309c2ebe5619aa47ebaedc9285331f5f3c9afd7df" + sha256 cellar: :any, arm64_monterey: "99ceb412afb90b295aa64a1d9ba6bf25bbfb7887b50825154fc8baba3e879874" + sha256 cellar: :any, sonoma: "14842c50c9074b36748f2d8f8c3e3ba51b6b8dafa4d6c939462ec5d96c0ef5d1" + sha256 cellar: :any, ventura: "69bdd462ec7b165dfc656e05b206c43b0115754e9a49b3f5a2b3d3e2fa6718d9" + sha256 cellar: :any, monterey: "69a4c545f99bdd3dee89090c3a264f33d333d4b41be5a368c6a078ea1234fe1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "736d4a62c71de3eeda25366f71092586634a4b0b3febc4b8732b9b4f7e8276bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b698c95084d0ec890fc103429bb615a8c13c87bd13b6a29b246579feb5a0763" + end + + depends_on "openssl@3" + + # Build scripts require tclsh. `--disable-tcl` only skips building extension + uses_from_macos "tcl-tk" => :build + uses_from_macos "sqlite" + uses_from_macos "zlib" + + def install + args = %W[ + --prefix=#{prefix} + --enable-tempstore=yes + --with-crypto-lib=#{Formula["openssl@3"].opt_prefix} + --enable-load-extension + --disable-tcl + ] + + # Build with full-text search enabled + cflags = %w[ + -DSQLITE_HAS_CODEC + -DSQLITE_ENABLE_JSON1 + -DSQLITE_ENABLE_FTS3 + -DSQLITE_ENABLE_FTS3_PARENTHESIS + -DSQLITE_ENABLE_FTS5 + -DSQLITE_ENABLE_COLUMN_METADATA + ].join(" ") + args << "CFLAGS=#{cflags}" + + args << "LIBS=-lm" if OS.linux? + + system "./configure", *args + system "make" + system "make", "install" + end + + test do + path = testpath/"school.sql" + path.write <<~SQL + create table students (name text, age integer); + insert into students (name, age) values ('Bob', 14); + insert into students (name, age) values ('Sue', 12); + insert into students (name, age) values ('Tim', json_extract('{"age": 13}', '$.age')); + select name from students order by age asc; + SQL + + names = shell_output("#{bin}/sqlcipher < #{path}").strip.split("\n") + assert_equal %w[Sue Tim Bob], names + end +end diff --git a/Formula/s/sqlcmd.rb b/Formula/s/sqlcmd.rb new file mode 100644 index 0000000000000..2b70e55bc6a18 --- /dev/null +++ b/Formula/s/sqlcmd.rb @@ -0,0 +1,39 @@ +class Sqlcmd < Formula + desc "Microsoft SQL Server command-line interface" + homepage "https://github.com/microsoft/go-sqlcmd" + url "https://github.com/microsoft/go-sqlcmd/archive/refs/tags/v1.8.2.tar.gz" + sha256 "ee600e4a147fd1e3c5e6cea834f14465fbccbd96f6b32bd3b4c9e104e094b9b2" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "162dda8233d7acbe1363b842287173b62080403c35d32ee33f253c06099e5970" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45e392b83c68e7c458be9191b188528a44e0355490d202a0b4eff439265d3447" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45e392b83c68e7c458be9191b188528a44e0355490d202a0b4eff439265d3447" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45e392b83c68e7c458be9191b188528a44e0355490d202a0b4eff439265d3447" + sha256 cellar: :any_skip_relocation, sonoma: "4a58834b43e3a4664d9bdf1a1769423a77baf80cf291a1eb4f03e34e873a10f7" + sha256 cellar: :any_skip_relocation, ventura: "4a58834b43e3a4664d9bdf1a1769423a77baf80cf291a1eb4f03e34e873a10f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "def54d99dd25245cdc78f18cb0ed03a2061d7f62929e61b4c28c9bb36f5d641a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ef548bfb7826d3a14f44d314943c4e25df4b16b57897906f4a12e7690194a31" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/modern" + + generate_completions_from_executable(bin/"sqlcmd", "completion") + end + + test do + out = shell_output("#{bin}/sqlcmd -S 127.0.0.1 -E -Q 'SELECT @@version'", 1) + assert_match "connection refused", out + + assert_match version.to_s, shell_output("#{bin}/sqlcmd --version") + end +end diff --git a/Formula/s/sqldiff.rb b/Formula/s/sqldiff.rb new file mode 100644 index 0000000000000..f53fbc4b8f480 --- /dev/null +++ b/Formula/s/sqldiff.rb @@ -0,0 +1,45 @@ +class Sqldiff < Formula + desc "Displays the differences between SQLite databases" + homepage "https://www.sqlite.org/sqldiff.html" + url "https://www.sqlite.org/2025/sqlite-src-3500400.zip" + version "3.50.4" + sha256 "b7b4dc060f36053902fb65b344bbbed592e64b2291a26ac06fe77eec097850e9" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "2295908a8ff92190d9438df8c2b27560d2b87530a27a3fe7ef46e856e6b6d65d" + sha256 cellar: :any, arm64_sequoia: "9d34055313224190d6bcd801ec9a3564dfa4d6c4ae45eb15a406afc3b3dd566e" + sha256 cellar: :any, arm64_sonoma: "51f603907c351e69382526e83c95de0e8323d587bc6282dfdd52f37edb807ad5" + sha256 cellar: :any, arm64_ventura: "1837dc7e8dc18eda684b620c169945938fe5cc31816eb4012a456477b9e742ed" + sha256 cellar: :any, tahoe: "be35e774ae7d36f51987bdd57a3888d9d74673a59d067dfb1dd9dae5c9845271" + sha256 cellar: :any, sequoia: "54ca0752540e90e40b415937d6761e705c0d08da162ba4724e7d78d9caba3361" + sha256 cellar: :any, sonoma: "b9022ff42dacdce5624ff5cc5167a225eb3c1951257b7562d528160cdcdb0b80" + sha256 cellar: :any, ventura: "d2032c0717e50f88bec21193dbfe0abc62a94001a856974b16005697b5c24028" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f3590968b02e558d4e1d174418155a74b1454ac5e253d23541129ee31cc1eff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14dfcadd7b015800d7b565b57c0068104d3fe73f2d7732d577c7a860976338a1" + end + + uses_from_macos "tcl-tk" => :build + uses_from_macos "sqlite" => :test + + def install + system "./configure", "--disable-debug", "--prefix=#{prefix}" + system "make", "sqldiff" + bin.install "sqldiff" + end + + test do + dbpath = testpath/"test.sqlite" + sqlpath = testpath/"test.sql" + sqlpath.write "create table test (name text);" + system "sqlite3 #{dbpath} < #{sqlpath}" + assert_equal "test: 0 changes, 0 inserts, 0 deletes, 0 unchanged", + shell_output("#{bin}/sqldiff --summary #{dbpath} #{dbpath}").strip + end +end diff --git a/Formula/s/sqlfluff.rb b/Formula/s/sqlfluff.rb new file mode 100644 index 0000000000000..a6c99c75def73 --- /dev/null +++ b/Formula/s/sqlfluff.rb @@ -0,0 +1,120 @@ +class Sqlfluff < Formula + include Language::Python::Virtualenv + + desc "SQL linter and auto-formatter for Humans" + homepage "https://docs.sqlfluff.com/" + url "https://files.pythonhosted.org/packages/4c/a8/d3dc6c510cc3bba9abbf7a3052a96d5ce6771b71dda141846003fa37277a/sqlfluff-3.5.0.tar.gz" + sha256 "2d0a546078ffb021de7021b9a6c2a50e5eef590daa820d5f1b082d24a1d5e1d4" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "38bf39a3bf4642507f39d79d03214961a9d59a1662b287c4cfa0fc34b321fe10" + sha256 cellar: :any, arm64_sequoia: "934f38345ceb15b6301f40fb4229a8a0e4ff6524c451d6ec6e706f0f89338055" + sha256 cellar: :any, arm64_sonoma: "5e9c08b38cbde8fbcaa4109148f79418b336a09bb148528d42c37df33daa26fe" + sha256 cellar: :any, sonoma: "1bd28e80102b1fc075b50577c43d176d36080e6251a5ccb2a26eff477d53bbd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e11e3ef5e6e001a807a4917db91e71b77467b9a3b8c78a5a5a5232df7fe2167" + sha256 cellar: :any_skip_relocation, x86_64_linux: "016e8c48030aba31dc4b30ec87214ba69603fa9cf333dd6022a0f692fd443234" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "diff-cover" do + url "https://files.pythonhosted.org/packages/eb/b7/3124f2038eb9d2842665c109d4516110e3e5570615243ee1065fdc65ac7d/diff_cover-9.7.1.tar.gz" + sha256 "a03b78bc64b7dc27dda7f11c46bc6d44f4e121c8fb9a5068d41f20a05d463548" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/8e/11/2f7713979d561602e14b8fdd99a0e2e8ff2d901de1041c42a23a4c33f2c3/iniconfig-2.2.0.tar.gz" + sha256 "1807d2bc2eb4231a5e40e2ecee093fc25fc0eb0e2840f01ea50a1d15380adbff" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "tblib" do + url "https://files.pythonhosted.org/packages/54/95/4b3044ec4bf248186769629bbfb495a458deb6e4c1f9eff7f298ae1e336e/tblib-3.1.0.tar.gz" + sha256 "06404c2c9f07f66fee2d7d6ad43accc46f9c3361714d9b8426e7f47e595cd652" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sqlfluff", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/sqlfluff --version") + (testpath/"test.sql").write <<~SQL + SELECT 1; + SQL + assert_match "All Finished!", shell_output("#{bin}/sqlfluff lint --dialect sqlite --nocolor #{testpath}/test.sql") + end +end diff --git a/Formula/s/sqlfmt.rb b/Formula/s/sqlfmt.rb new file mode 100644 index 0000000000000..eefc3906462a0 --- /dev/null +++ b/Formula/s/sqlfmt.rb @@ -0,0 +1,44 @@ +class Sqlfmt < Formula + desc "SQL formatter with width-aware output" + homepage "https://sqlfum.pt/" + url "https://github.com/maddyblue/sqlfmt/archive/refs/tags/v0.5.0.tar.gz" + sha256 "0776e9505048fd88220c0ee9b481ca258b6abe7e7bb27204a4873f11e1d7c95b" + license "Apache-2.0" + head "https://github.com/maddyblue/sqlfmt.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c84039488c47b3d05d7453f65bbf8eded5b1229d9b06c398741dd99e1ee2b303" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a38467e3035c2cd803a7d6eeb898500e8be48918cc2689202ca0affeed82ea53" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05c503eec0cd5a79c9cc3e1027166051acbf6f2a44d2924cadb9898b4600ceb3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d6d1bff83aa71623e857ddf1f53ae033646e5bdf71ec1d283fc1d344364d3ae" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ae54cf2b56248564f43b4ce61add06377a564115314d8c524892572abbc1c3bd" + sha256 cellar: :any_skip_relocation, sonoma: "cf05930ebc73ec4e027c7463a3e8ceb327492d32d2e32ad7c571f381fa9e9bc6" + sha256 cellar: :any_skip_relocation, ventura: "f6b9b8a8849278f597ef6b98f8cc6868b0dbda0122207dfb127600aa36a4e60c" + sha256 cellar: :any_skip_relocation, monterey: "18c12379256a1d5d2e659824951ed74e49c73417fea49b58a5c0814cb74c78c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d7b6e3172634e1e59220fc0d57360ad2e99fac2073ffa45552736a7cff9eb21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3d79be793a67b641b58cee79ed6da1320b6d4ed2cd007d500e5e9ad26e70378" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./backend" + end + + test do + test_sql = "\"SELECT count(ID) AS count, foo FROM brewtest GROUP BY foo;\"" + assert_equal <<~EOS, shell_output("#{bin}/sqlfmt --print-width 40 --stmt #{test_sql}") + SELECT + \tcount(id) AS count, foo + FROM + \tbrewtest + GROUP BY + \tfoo; + EOS + + assert_match version.to_s, shell_output("#{bin}/sqlfmt --version") + end +end diff --git a/Formula/s/sqlite-analyzer.rb b/Formula/s/sqlite-analyzer.rb new file mode 100644 index 0000000000000..2951ff5ceae72 --- /dev/null +++ b/Formula/s/sqlite-analyzer.rb @@ -0,0 +1,52 @@ +class SqliteAnalyzer < Formula + desc "Analyze how space is allocated inside an SQLite file" + homepage "https://www.sqlite.org/" + url "https://www.sqlite.org/2025/sqlite-src-3500400.zip" + version "3.50.4" + sha256 "b7b4dc060f36053902fb65b344bbbed592e64b2291a26ac06fe77eec097850e9" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "119aab9d8965e2bc6a42f0f688d18fc84f884256176a8ad6308096f36e07cadd" + sha256 cellar: :any, arm64_sequoia: "983c929529debfa69afd99dc23a7025dbe681a100fafa0f20c08ef3b144310cb" + sha256 cellar: :any, arm64_sonoma: "8c6c0770b134f712086b1fc259c469428b2cb214a11737d1ed7b46acec77bbf7" + sha256 cellar: :any, arm64_ventura: "2a4457aa0b6bd51662221422b09993d9a9adf6d8d5d6a8ca8d066820b6734ae1" + sha256 cellar: :any, sonoma: "9ea7789c685af83f51e33619c920b963605cb39dbbb8f872b135fad0b32122ec" + sha256 cellar: :any, ventura: "b76902ea0ea66727d276c099b81003714783bf48fa4535cf12bd2200dcca0b5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec05b4e264b7c5477bf2daa0f9b860d04548699383f231eef61816472cc937b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69276f619b21ed65f21da3db17842b02c0355b0e05a3db2bc8119001cb673122" + end + + depends_on "tcl-tk" + uses_from_macos "sqlite" => :test + + on_macos do + depends_on "libtommath" + end + + def install + system "./configure", "--with-tcl=#{Formula["tcl-tk"].opt_lib}", *std_configure_args + system "make", "sqlite3_analyzer" + bin.install "sqlite3_analyzer" + end + + test do + dbpath = testpath/"school.sqlite" + sqlpath = testpath/"school.sql" + sqlpath.write <<~SQL + create table students (name text, age integer); + insert into students (name, age) values ('Bob', 14); + insert into students (name, age) values ('Sue', 12); + insert into students (name, age) values ('Tim', 13); + SQL + system "sqlite3 #{dbpath} < #{sqlpath}" + system bin/"sqlite3_analyzer", dbpath + end +end diff --git a/Formula/s/sqlite-rsync.rb b/Formula/s/sqlite-rsync.rb new file mode 100644 index 0000000000000..b800ad585b8d9 --- /dev/null +++ b/Formula/s/sqlite-rsync.rb @@ -0,0 +1,67 @@ +class SqliteRsync < Formula + desc "SQLite remote copy tool" + homepage "https://www.sqlite.org/" + url "https://www.sqlite.org/2025/sqlite-src-3500400.zip" + version "3.50.4" + sha256 "b7b4dc060f36053902fb65b344bbbed592e64b2291a26ac06fe77eec097850e9" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "07601d7947f50e9dec6a307708fd738c92cf87ffbc58e5dc9c1a4049c52ed5a8" + sha256 arm64_sequoia: "c982eb92c75c960d4768e1dd031d5f2dd8411cff373370f79af4d581b07d0b29" + sha256 arm64_sonoma: "f8c12b60d263d80fcc8fc75c3e04ca858ac76b4364b7ec9cf92e12dafa08f02c" + sha256 arm64_ventura: "cb8a1fb0ecd2eb2bfdf3510e5f46f45dd0ae1ce9e9c3dc6260f89ee777d7a5a5" + sha256 cellar: :any, tahoe: "18b262c2eaf268513f7088d232f2d885f7dec150aeb6f54da299b417afdadd66" + sha256 cellar: :any, sequoia: "26e635dac9985870308ec1e0229f71b269bccb5e85d457918297213bc8aa31b2" + sha256 cellar: :any, sonoma: "7716d51a21c356552441ee4bd60cc4adb6c607edb3031c97a944599343dd1e8b" + sha256 cellar: :any, ventura: "c0a24205f5a2d676fc5fa4d01f5bf3129d6b8261ca41aefc3d50a63f640dabc9" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1ddaae16429ab92346b2bb9083411d58e2bf1559c79ae896f323d6f4091f5fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d87f7fb27d20982e09c67065f174545d5b3b67be9bd0ad5984f4250a037fdf2" + end + + uses_from_macos "tcl-tk" => :build + uses_from_macos "sqlite" => :test + + def install + tcl = if OS.mac? + MacOS.sdk_path/"System/Library/Frameworks/Tcl.framework" + else + Formula["tcl-tk"].opt_lib + end + + system "./configure", "--disable-debug", + "--with-tcl=#{tcl}", + "--prefix=#{prefix}" + system "make", "sqlite3_rsync" + bin.install "sqlite3_rsync" + end + + test do + dbpath = testpath/"school.sqlite" + copypath = testpath/"school.copy" + sqlpath = testpath/"school.sql" + sqlpath.write <<~SQL + create table students (name text, age integer); + insert into students (name, age) values ('Bob', 14); + insert into students (name, age) values ('Sue', 12); + insert into students (name, age) values ('Tim', 13); + SQL + system "sqlite3 #{dbpath} < #{sqlpath}" + cp dbpath, copypath + + addpath = testpath/"add.sql" + addpath.write <<~SQL + insert into students (name, age) values ('Frank', 15); + insert into students (name, age) values ('Clare', 11); + SQL + system "sqlite3 #{dbpath} < #{addpath}" + system bin/"sqlite3_rsync", dbpath, copypath + assert_match "Clare", pipe_output("sqlite3 #{copypath}", "select name from students where age = 11") + end +end diff --git a/Formula/s/sqlite-utils.rb b/Formula/s/sqlite-utils.rb new file mode 100644 index 0000000000000..c22e31751858e --- /dev/null +++ b/Formula/s/sqlite-utils.rb @@ -0,0 +1,66 @@ +class SqliteUtils < Formula + include Language::Python::Virtualenv + + desc "CLI utility for manipulating SQLite databases" + homepage "https://sqlite-utils.datasette.io/" + url "https://files.pythonhosted.org/packages/51/43/ce9183a21911e0b73248c8fb83f8b8038515cb80053912c2a009e9765564/sqlite_utils-3.38.tar.gz" + sha256 "1ae77b931384052205a15478d429464f6c67a3ac3b4eafd3c674ac900f623aab" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "143905b7ed6a8f14901a426dff00dc50c3595c292bd18308bf09341711749f84" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "143905b7ed6a8f14901a426dff00dc50c3595c292bd18308bf09341711749f84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "143905b7ed6a8f14901a426dff00dc50c3595c292bd18308bf09341711749f84" + sha256 cellar: :any_skip_relocation, sonoma: "19ab058d0e946b1c89d13dc42825879c7b711ff74f32acb332f27f8525248c5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "19ab058d0e946b1c89d13dc42825879c7b711ff74f32acb332f27f8525248c5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19ab058d0e946b1c89d13dc42825879c7b711ff74f32acb332f27f8525248c5b" + end + + depends_on "python@3.14" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sqlite-fts4" do + url "https://files.pythonhosted.org/packages/c2/6d/9dad6c3b433ab8912ace969c66abd595f8e0a2ccccdb73602b1291dbda29/sqlite-fts4-1.0.3.tar.gz" + sha256 "78b05eeaf6680e9dbed8986bde011e9c086a06cb0c931b3cf7da94c214e8930c" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sqlite-utils", shell_parameter_format: :click) + end + + test do + assert_match "15", shell_output("#{bin}/sqlite-utils :memory: 'select 3 * 5'") + end +end diff --git a/Formula/s/sqlite.rb b/Formula/s/sqlite.rb new file mode 100644 index 0000000000000..675de4676412b --- /dev/null +++ b/Formula/s/sqlite.rb @@ -0,0 +1,86 @@ +class Sqlite < Formula + desc "Command-line interface for SQLite" + homepage "https://sqlite.org/index.html" + url "https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz" + version "3.50.4" + sha256 "a3db587a1b92ee5ddac2f66b3edb41b26f9c867275782d46c3a088977d6a5b18" + license "blessing" + + livecheck do + url :homepage + regex(%r{href=.*?releaselog/v?(\d+(?:[._]\d+)+)\.html}i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match&.first&.tr("_", ".") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "31e1f0e39f81417f6c13a81881077df7368fbb3c53b8af5ff5f6bae9e0f7c44d" + sha256 cellar: :any, arm64_sequoia: "ac752e123cff9ffd69bfd3477fb151b8df8363c94b9f6a14ba1a6443b62964e2" + sha256 cellar: :any, arm64_sonoma: "99c818a03cf2392120ba9a9375f4d42e95bacd5e498c72a4679a0158e5d09598" + sha256 cellar: :any, tahoe: "2a2bb78a7a499c34c5dbce0ac8d97c11de25c6cbf69354e7b0e5bbd53a1ea16f" + sha256 cellar: :any, sequoia: "6c3265b83d4f30bde5b89f3b0138b0eb8c4c1db12a08f61071c87fecd7bc2474" + sha256 cellar: :any, sonoma: "7fb7b19471eb64e746e4c554a8c6b7ad6a42a098cbcae4593cda256e6d17595d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d50fbc199067fb17f4746ccca988d30e66e873e7846ba60f23055263eefd2fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d501561e75552df13a16be24d28edf34bb85215ffae73b87d75b9c58308dd360" + end + + keg_only :provided_by_macos + + depends_on "readline" + + uses_from_macos "zlib" + + def install + # Default value of MAX_VARIABLE_NUMBER is 999 which is too low for many + # applications. Set to 250000 (Same value used in Debian and Ubuntu). + ENV.append "CPPFLAGS", %w[ + -DSQLITE_ENABLE_API_ARMOR=1 + -DSQLITE_ENABLE_COLUMN_METADATA=1 + -DSQLITE_ENABLE_DBSTAT_VTAB=1 + -DSQLITE_ENABLE_FTS3=1 + -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 + -DSQLITE_ENABLE_FTS5=1 + -DSQLITE_ENABLE_GEOPOLY=1 + -DSQLITE_ENABLE_JSON1=1 + -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 + -DSQLITE_ENABLE_RTREE=1 + -DSQLITE_ENABLE_STAT4=1 + -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 + -DSQLITE_MAX_VARIABLE_NUMBER=250000 + -DSQLITE_USE_URI=1 + ].join(" ") + + args = [ + "--enable-readline", + "--disable-editline", + "--enable-session", + "--with-readline-cflags=-I#{Formula["readline"].opt_include}", + "--with-readline-ldflags=-L#{Formula["readline"].opt_lib} -lreadline", + ] + args << "--soname=legacy" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make", "install" + + # Avoid rebuilds of dependants that hardcode this path. + inreplace lib/"pkgconfig/sqlite3.pc", prefix, opt_prefix + end + + test do + path = testpath/"school.sql" + path.write <<~SQL + create table students (name text, age integer); + insert into students (name, age) values ('Bob', 14); + insert into students (name, age) values ('Sue', 12); + insert into students (name, age) values ('Tim', 13); + select name from students order by age asc; + SQL + + names = shell_output("#{bin}/sqlite3 < #{path}").strip.split("\n") + assert_equal %w[Sue Tim Bob], names + end +end diff --git a/Formula/s/sqlitecpp.rb b/Formula/s/sqlitecpp.rb new file mode 100644 index 0000000000000..69a85d314b332 --- /dev/null +++ b/Formula/s/sqlitecpp.rb @@ -0,0 +1,38 @@ +class Sqlitecpp < Formula + desc "Smart and easy to use C++ SQLite3 wrapper" + homepage "https://srombauts.github.io/SQLiteCpp/" + url "https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/3.3.3.tar.gz" + sha256 "33bd4372d83bc43117928ee842be64d05e7807f511b5195f85d30015cad9cac6" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "38a875f10418420ffb6575efe36900bbb6b538b7cdc04d5b9627f3cee23f9a4a" + sha256 cellar: :any, arm64_sequoia: "616fb66c49424941f10f030687dee31c3e8b695a9189ac305815fcaac6c0d4b3" + sha256 cellar: :any, arm64_sonoma: "076151d30d6963eddd94d888291aa48dcd85014fe88617589a14327a047b25d0" + sha256 cellar: :any, arm64_ventura: "7057a2bc42ad8e9589b026321820b80b74484e81a132fc0a5735a3a859d2e279" + sha256 cellar: :any, sonoma: "5dd5d668c1c3db5110762193fffb6dfdce72347fc36a04f59ef69e7cd62307b7" + sha256 cellar: :any, ventura: "c61fef2285650f0f382d594e23fc5c325cdcc7a49cdcab6f562be643454f905b" + sha256 arm64_linux: "e317fdf972b53582cc2596eefe496652b1477cca94b16c83fa9baa51c5ae4bb6" + sha256 x86_64_linux: "9f74866fb8f4c43679d0bc7992e2f4276a10afcf294ae72a13f2f5d6d97e8db6" + end + + depends_on "cmake" => :build + depends_on "sqlite" # needs sqlite3_load_extension + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DSQLITECPP_INTERNAL_SQLITE=OFF", + "-DSQLITECPP_RUN_CPPLINT=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"example").install "examples/example2/src/main.cpp" + end + + test do + system ENV.cxx, "-std=c++11", pkgshare/"example/main.cpp", "-o", "test", "-L#{lib}", "-lSQLiteCpp" + system "./test" + end +end diff --git a/Formula/s/sqliteodbc.rb b/Formula/s/sqliteodbc.rb new file mode 100644 index 0000000000000..f220d62c1c305 --- /dev/null +++ b/Formula/s/sqliteodbc.rb @@ -0,0 +1,68 @@ +class Sqliteodbc < Formula + desc "ODBC driver for SQLite" + homepage "https://ch-werner.hier-im-netz.de/sqliteodbc/" + url "https://ch-werner.hier-im-netz.de/sqliteodbc/sqliteodbc-0.99991.tar.gz" + sha256 "4d94adb8d3cde1fa94a28aeb0dfcc7be73145bcdfcdf3d5e225434db31dc8a5c" + license "TCL" + + livecheck do + url :homepage + regex(/href=.*?sqliteodbc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "80cc2b8469f6718e6228b4465bdec52fa66d37731c6e80db40f2bfad339ccc70" + sha256 cellar: :any, arm64_sequoia: "61de52252306e865b3c14e8ef775b1c4ccd22da7c7e5ea2b0f91c54c7877e08c" + sha256 cellar: :any, arm64_sonoma: "015eee63671fc01c778e6e663529ace8d63a7d71f2654be9b9556ccd9e29154f" + sha256 cellar: :any, arm64_ventura: "dd59b3db3e696d538dea72e84c5602c17f24fe119104a705a0662adee36547e0" + sha256 cellar: :any, arm64_monterey: "8ed399c5e2eb6497973a1f8576febd0a60c4470fbb16e29b2b919aa875bf3565" + sha256 cellar: :any, sonoma: "8512cd23bae8277c72c3b432749364595234724a8b20f201a98f61497edb2f3c" + sha256 cellar: :any, ventura: "3aae3791f2bceb04e3d9261ebbcb2c639491c530628ac2632c2a9cf64c2c7b1a" + sha256 cellar: :any, monterey: "1d3e62b967aa75bb3ea2f4db75e350dd920d2210edc4c268600313311d255476" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3105e72f81fb1c85b2cd028b0063e6e413549706f4a7e4286f48fb9fa420144" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a61acd439d7530e91d25824689b621be04831e3f28aa00f28cb0d7d810a5afb" + end + + depends_on "sqlite" + depends_on "unixodbc" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + if Hardware::CPU.arm? + # Workaround for ancient config files not recognizing aarch64 macos. + %w[config.guess config.sub].each do |fn| + cp Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}"/fn, fn + end + end + + lib.mkdir + args = ["--with-odbc=#{Formula["unixodbc"].opt_prefix}", + "--with-sqlite3=#{Formula["sqlite"].opt_prefix}"] + args << "--with-libxml2=#{Formula["libxml2"].opt_prefix}" if OS.linux? + + system "./configure", "--prefix=#{prefix}", *args + system "make" + system "make", "install" + lib.install_symlink lib/"libsqlite3odbc.dylib" => "libsqlite3odbc.so" if OS.mac? + end + + test do + output = shell_output("#{Formula["unixodbc"].opt_bin}/dltest #{lib}/libsqlite3odbc.so") + assert_equal "SUCCESS: Loaded #{lib}/libsqlite3odbc.so\n", output + end +end diff --git a/Formula/s/sqlmap.rb b/Formula/s/sqlmap.rb new file mode 100644 index 0000000000000..ae08537cda5a1 --- /dev/null +++ b/Formula/s/sqlmap.rb @@ -0,0 +1,45 @@ +class Sqlmap < Formula + include Language::Python::Shebang + + desc "Penetration testing for SQL injection and database servers" + homepage "https://sqlmap.org" + url "https://github.com/sqlmapproject/sqlmap/archive/refs/tags/1.9.10.tar.gz" + sha256 "27634d67e1793b692ac7420b56ce0105c481ecbf451bed7d0b470ce389334a91" + license "GPL-2.0-or-later" + head "https://github.com/sqlmapproject/sqlmap.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "588ce4edafb08ddf39340edfa86842de5fafb001eb27e3a78571e05282dfa415" + end + + depends_on "python@3.14" + + uses_from_macos "sqlite" => :test + + def install + libexec.install Dir["*"] + + %w[sqlmap sqlmapapi].each do |cmd| + rewrite_shebang detected_python_shebang, libexec/"#{cmd}.py" + bin.install_symlink libexec/"#{cmd}.py" + bin.install_symlink bin/"#{cmd}.py" => cmd + end + + # Build an `:all` bottle + inreplace libexec/"thirdparty/magic/magic.py", "/usr/local/Cellar", "#{HOMEBREW_PREFIX}/Cellar" + end + + test do + data = %w[Bob 14 Sue 12 Tim 13] + create = "create table students (name text, age integer);\n" + data.each_slice(2) do |n, a| + create << "insert into students (name, age) values ('#{n}', '#{a}');\n" + end + pipe_output("sqlite3 school.sqlite", create, 0) + select = "select name, age from students order by age asc;" + args = %W[--batch -d sqlite://school.sqlite --sql-query "#{select}"] + output = shell_output("#{bin}/sqlmap #{args.join(" ")}") + data.each_slice(2) { |n, a| assert_match "#{n},#{a}", output } + end +end diff --git a/Formula/s/sqlpage.rb b/Formula/s/sqlpage.rb new file mode 100644 index 0000000000000..6c98fd69c3b9d --- /dev/null +++ b/Formula/s/sqlpage.rb @@ -0,0 +1,35 @@ +class Sqlpage < Formula + desc "Web app builder using SQL queries to create dynamic webapps quickly" + homepage "https://sql-page.com/" + url "https://github.com/sqlpage/SQLpage/archive/refs/tags/v0.39.0.tar.gz" + sha256 "284e798324c6ef613b1792f24ba0c3bb1a589bb5534671fe863ec625667ec09e" + license "MIT" + head "https://github.com/sqlpage/SQLpage.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3df5bd2e0281e18a626cfd0e312a8e988923d1de827e5ac86bfcb93029211051" + sha256 cellar: :any, arm64_sequoia: "d0f3bff9655f1ec34527e4c32ef58861fec08ca8453328c75da10ffdb270d734" + sha256 cellar: :any, arm64_sonoma: "e6b4471c262f287be8c85a8e7b428066755d92cba3e8cc238de013ba67eabb26" + sha256 cellar: :any, sonoma: "1f57aea84ab0bd9f9475480c894cef1e4062acc81c50697d7f296ba38b4a5091" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ddd923c8f8c49472197499a2f06ec0471126a85fcbf10fc202dfc04af0a4bad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec05575975fe9cf29820e9953e44f0cdf1638c1434fbf862c6a0816938faa0ed" + end + + depends_on "rust" => :build + depends_on "unixodbc" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + port = free_port + pid = fork do + ENV["PORT"] = port.to_s + exec "sqlpage" + end + sleep(2) + assert_match "It works", shell_output("curl -s http://localhost:#{port}") + Process.kill(9, pid) + end +end diff --git a/Formula/s/sqlparse.rb b/Formula/s/sqlparse.rb new file mode 100644 index 0000000000000..68b7031a950d3 --- /dev/null +++ b/Formula/s/sqlparse.rb @@ -0,0 +1,30 @@ +class Sqlparse < Formula + include Language::Python::Virtualenv + + desc "Non-validating SQL parser" + homepage "https://github.com/andialbrecht/sqlparse" + url "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz" + sha256 "09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "10bb73391e09b17909e2457a68df674393a8215cc4df6114f4bb26019a490b57" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + man1.install "docs/sqlformat.1" + end + + test do + expected = <<~EOS.chomp + select * + from foo + EOS + output = pipe_output("#{bin}/sqlformat - -a", "select * from foo", 0) + assert_equal expected, output + end +end diff --git a/Formula/s/sqlsmith.rb b/Formula/s/sqlsmith.rb new file mode 100644 index 0000000000000..c8f6e6a78da37 --- /dev/null +++ b/Formula/s/sqlsmith.rb @@ -0,0 +1,66 @@ +class Sqlsmith < Formula + desc "Random SQL query generator" + homepage "https://github.com/anse1/sqlsmith" + url "https://github.com/anse1/sqlsmith/releases/download/v1.4/sqlsmith-1.4.tar.gz" + sha256 "b0821acbe82782f6037315549f475368be3592cefe2c3c540f9cf52aa70d2f55" + license "GPL-3.0-only" + revision 4 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d2eeed7e3a0447e19564eeca544e3fc0fc2331c5165f53b3145b865a76855745" + sha256 cellar: :any, arm64_sequoia: "3d3b4d8a61c5b1012c165f83da60cad4a1de62653d24c378b42aa5505a986551" + sha256 cellar: :any, arm64_sonoma: "9f8a63bc4257b008ecc16ba3913c1e1b2b263f34f00e3385d45bc002f9221a11" + sha256 cellar: :any, arm64_ventura: "d04086ed41c23bdeb8f3a2530e3ab40dfc49b48ee25ebfb0e7e98678ff6ed366" + sha256 cellar: :any, sonoma: "15bf710fd3748acb8aedb46336e91ee7646a2ba566f920ad71d6bcc36887228c" + sha256 cellar: :any, ventura: "4ba417966b98ed9413a2bc5770f33d2d185678c3662cc6783d4db3e9cc03221a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d6801038b4cff8cec72c060386fd5fba691188e4dfbe784de0085237dbfc9b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0097bee5057fa4d814dfa431ff700cfc87253c243bf1b806f6515b08c05b3b1b" + end + + head do + url "https://github.com/anse1/sqlsmith.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build # required for AX_CXX_COMPILE_STDCXX_17 + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libpq" + depends_on "libpqxx" + + uses_from_macos "sqlite" + + def install + ENV.append_to_cflags "-DNDEBUG" + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + cmd = %W[ + #{bin}/sqlsmith + --sqlite + --max-queries=100 + --verbose + --seed=1 + 2>&1 + ].join(" ") + output = shell_output(cmd) + + assert_match "Loading tables...done.", output + assert_match "Loading columns and constraints...done.", output + assert_match "Generating indexes...done.", output + assert_match "queries: 100", output + assert_match "impedance report:", output + end +end diff --git a/Formula/s/sqlx-cli.rb b/Formula/s/sqlx-cli.rb new file mode 100644 index 0000000000000..e10cc5eb4c150 --- /dev/null +++ b/Formula/s/sqlx-cli.rb @@ -0,0 +1,39 @@ +class SqlxCli < Formula + desc "Command-line utility for SQLx, the Rust SQL toolkit" + homepage "https://github.com/launchbadge/sqlx" + url "https://github.com/launchbadge/sqlx/archive/refs/tags/v0.8.6.tar.gz" + sha256 "75d0b4d1f3081a877c7b75936f069f9327bb2ceb4dc206f5a7fc89e0cd9bc31e" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5864ad0460e6160909392fdcf5b606b06c3edde717f24d7188eccc09e6036bee" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "54230ed1ed41400afdd696fb0883096bdce65b91d9e7fe015177b5ba44ac22ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "afb223fc9e104c0bfc99b6661ff4e458b9514eb1b1ce029cb0e1d9483ec64da8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "12cbddb5d45554d8d553ac0d7082d992bd9bb71208e9dece395991d81a4a92e4" + sha256 cellar: :any_skip_relocation, sonoma: "bdbfce8c38a02084c3cb88267371c470aa8154df798ab046a61a491fb616cbbd" + sha256 cellar: :any_skip_relocation, ventura: "63cf0e3541f8472296dfb4664cb62ecd5b0beb131f268f8b971f444a63bf3056" + sha256 cellar: :any_skip_relocation, arm64_linux: "920ad5c889e0bd02b9dcf7aa520297c37fff4b14f6a04314b51f16ddcbda9ec4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92a8ccbb9b00c9e1fc1e2fb632ab628a46cbf84011d82e78c0564c7f88b20290" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "sqlx-cli") + + generate_completions_from_executable(bin/"sqlx", "completions") + end + + test do + ENV["DATABASE_URL"] = "postgres://postgres@localhost/my_database" + output = shell_output("#{bin}/sqlx migrate info 2>&1", 1) + assert_match "error: while resolving migrations: No such file or directory", output + + assert_match version.to_s, shell_output("#{bin}/sqlx --version") + end +end diff --git a/Formula/s/sqruff.rb b/Formula/s/sqruff.rb new file mode 100644 index 0000000000000..7dd82de3f0cb3 --- /dev/null +++ b/Formula/s/sqruff.rb @@ -0,0 +1,38 @@ +class Sqruff < Formula + desc "Fast SQL formatter/linter" + homepage "https://github.com/quarylabs/sqruff" + url "https://github.com/quarylabs/sqruff/archive/refs/tags/v0.29.3.tar.gz" + sha256 "34421357447ede968a6875d38858c252e987a94aaa5f56ad6e14a17e51ee15b5" + license "Apache-2.0" + head "https://github.com/quarylabs/sqruff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cd06050877b0ea91b5793cfe869e9f1dc4272658fa168133432bc36335a0c560" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb5ef33491450375cc1904be3f3f4e5d7e38417d6542ce2daad19ba1d1cea90c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "415089521b878ca2839c3d3a567241ea0bac985a2e97e48a6fea430c6ba4f611" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6bb99c142e24f1834e99a45777395dbb414005ec208e298ad706b7aa9da283e8" + sha256 cellar: :any_skip_relocation, sonoma: "70584e191d36fbfbad968a5fe7f042dc43ed910049eb3f29a8c362ecce9a8730" + sha256 cellar: :any_skip_relocation, ventura: "8943927f1d88712457f46887e8d3b045d45def37b824b11c03d992d555340d80" + sha256 cellar: :any_skip_relocation, arm64_linux: "97828b7090733d2e9cc43a61f61571daaf4e2d96d38d0af4a0faf9195ea5fdbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bdcb8334c6f968f3bc3ecf8dc17c3c58456403daab5c9fb8e67ab2f35957451" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--bin", "sqruff", *std_cargo_args(path: "crates/cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sqruff --version") + + assert_match "AL01: [aliasing.table]", shell_output("#{bin}/sqruff rules") + + (testpath/"test.sql").write <<~EOS + SELECT * FROM user JOIN order ON user.id = order.user_id; + EOS + + output = shell_output("#{bin}/sqruff lint --format human #{testpath}/test.sql 2>&1") + assert_match "All Finished", output + end +end diff --git a/Formula/s/sqsmover.rb b/Formula/s/sqsmover.rb new file mode 100644 index 0000000000000..55b443be7a7c0 --- /dev/null +++ b/Formula/s/sqsmover.rb @@ -0,0 +1,54 @@ +class Sqsmover < Formula + desc "AWS SQS Message mover" + homepage "https://github.com/mercury2269/sqsmover" + url "https://github.com/mercury2269/sqsmover/archive/refs/tags/v0.4.0.tar.gz" + sha256 "217203f626399c67649f99af52eff6d6cdd9280ec5e2631e1de057e1bd0cdd0d" + license "Apache-2.0" + head "https://github.com/mercury2269/sqsmover.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "faceaa44808fd35b7d1131f1bda53f0390a814864185b8a16cb76d0531fd54af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "71138465799d2eef41934e3c9af64946ba7568d99b33c26b4f139bcba0957342" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc16a425c148319663c2ed049384633fb3402c86cb919f7274eeb01850416056" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed7f54467803a8b532f6980792beda2deed1943b905377386086b99b4343951a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa8e6b9cc7c8df5f3bd6221092a8b90337e70afb21418b1ac386cbe6c1846dea" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "070d45a4448af507da69445d83084a38a8ba1d7ecad6d1d7596b2a5cba2d8b14" + sha256 cellar: :any_skip_relocation, sonoma: "062f576571aefdfd34b9e5eb773b537b0f8b129c165814a3fc4d3ca74d2217c9" + sha256 cellar: :any_skip_relocation, ventura: "8b8bde4ded805588395c80ab7ad1b9f99c722297c1c74fbede24739548216e3b" + sha256 cellar: :any_skip_relocation, monterey: "17d1bb2288e963f9f5e25bf91829c9ad24e72ae4630169002496255ab9514281" + sha256 cellar: :any_skip_relocation, big_sur: "e92a20b5b57e04747e869551f42d86bba14acb26c0ef88acf1a73f12429f43c3" + sha256 cellar: :any_skip_relocation, catalina: "964183c1530b7ec057849d57a9c63b188c2b5aab4f1bf3fe0db6073d4063c086" + sha256 cellar: :any_skip_relocation, arm64_linux: "2df5ac12c16115813738e4e198d711f296561be672730d6bb9802e8863d91b3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d101d0f696e787fae56b2bf5ae24f85a64411b332fabc938fdd399377436b9e" + end + + depends_on "go" => :build + + # Fix build with Go 1.18. + # Remove with the next release. + patch do + url "https://github.com/mercury2269/sqsmover/commit/2791c1912e4e262dca981dcf2219305b3d0e784a.patch?full_index=1" + sha256 "effd7cc9422b64944abada78cbd163c8900b3dd1254427cbdee76e106e8e540b" + end + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.date=#{time.iso8601} + -X main.builtBy=#{tap.user} + ].join(" ") + + system "go", "build", *std_go_args(ldflags:) + end + + test do + ENV["AWS_REGION"] = "us-east-1" + assert_match "Failed to resolve source queue.", + shell_output("#{bin}/sqsmover --source test-dlq --destination test --profile test 2>&1") + + assert_match version.to_s, shell_output("#{bin}/sqsmover --version 2>&1") + end +end diff --git a/Formula/s/sqtop.rb b/Formula/s/sqtop.rb new file mode 100644 index 0000000000000..b8a16267a9679 --- /dev/null +++ b/Formula/s/sqtop.rb @@ -0,0 +1,36 @@ +class Sqtop < Formula + desc "Display information about active connections for a Squid proxy" + homepage "https://github.com/paleg/sqtop" + url "https://github.com/paleg/sqtop/archive/refs/tags/v2015-02-08.tar.gz" + sha256 "eae4c8bc16dbfe70c776d990ecf14328acab0ed736f0bf3bd1647a3ac2f5e8bf" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8850e7822e47d6a8371e31210542a776644252960fe3cfdbc3a348563d047d4d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86fa975d403a9957261b33b293324908d327eff19831b705463866a7a4ccad2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "beff07169db5be764d18cb3bee9a18371d130c6cb3d2e8890e41b460c6e0f55e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "31df54161ef5a2bca073d0aa08c9954763fb41721ece41ded2c7c630788c67c2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f1c485dad29e5a373c5d6a973a7c36cf2de7bbecc44e07bb715b126e9fe0ea1a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e4d9ab76457599f2fe20875e9900c1d1f330ba7b35d4383e99042b66b264de3e" + sha256 cellar: :any_skip_relocation, sonoma: "b0eaaf8009ba705393183cfe4a2d4bb0a0eab311fe5cf5e20e72058c88f4665f" + sha256 cellar: :any_skip_relocation, ventura: "7ada919a0dfa2421cdb0a0234a4a16db5530b56c56869e6dde7e5a0c0ccecbb9" + sha256 cellar: :any_skip_relocation, monterey: "783650fd010e84cba76c1d747d7948fa1ccf0ae17032e797d76920b291ff36a0" + sha256 cellar: :any_skip_relocation, big_sur: "236b80d46f0cbc8aedc14b6771b4b58cff6e445eb2e8a115ae14917b307fbab2" + sha256 cellar: :any_skip_relocation, catalina: "653be227eb16e647b90f0f034543a490476e3ceaa0e9c165b1963b916b4a9703" + sha256 cellar: :any_skip_relocation, arm64_linux: "02d8d356631939d3201e72c24a96353e5032ddd6abfe1613cd7ac07de0720dd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f7bd15bf5407710e19ab7c3bd414c18b163b251274d14e058208a526353a7e0" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/sqtop --help") + end +end diff --git a/Formula/s/squashfs.rb b/Formula/s/squashfs.rb new file mode 100644 index 0000000000000..5405ae01b574e --- /dev/null +++ b/Formula/s/squashfs.rb @@ -0,0 +1,92 @@ +class Squashfs < Formula + desc "Compressed read-only file system for Linux" + homepage "https://github.com/plougher/squashfs-tools" + url "https://github.com/plougher/squashfs-tools/archive/refs/tags/4.7.2.tar.gz" + sha256 "4672b5c47d9418d3a5ae5b243defc6d9eae8275b9771022247c6a6082c815914" + license "GPL-2.0-or-later" + head "https://github.com/plougher/squashfs-tools.git", branch: "master" + + # Tags like `4.4-git.1` are not release versions and the regex omits these + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b084216ccb224844823d4f8547052f62e3e03a8550dc07509a84e98f7a4e406" + sha256 cellar: :any, arm64_sequoia: "e14ece392f8839650c3c27cfdc8b225d63f6fa84eef0783dc9a4c59ba06f7cc6" + sha256 cellar: :any, arm64_sonoma: "dc48cced5cf0810b4fdc220a6b967296057dd02365453d2e2eface15938e962d" + sha256 cellar: :any, arm64_ventura: "77773e74b3052034873568c8c9e14541eac01fe4a5a3815919561a8cae72ed24" + sha256 cellar: :any, sonoma: "a40660ed6e73724773716f7e823daa9feaf10f453a0ed4e4829bc6ae9519b173" + sha256 cellar: :any, ventura: "33a23dafbf737cb4c48eb987ec92af8a029a2547c45a1b78f4e588a6ef9d61d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "c06087b02d6708073d7a5cfa6de460c4bc31d0f6355cb178d92d7702cf8077f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a268a6b8f83b8f16ddfdffae4c9e30cfaf827ad4d36e84aaaf6311bedc37f914" + end + + depends_on "gnu-sed" => :build + depends_on "help2man" => :build + + depends_on "lz4" + depends_on "lzo" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + args = %W[ + EXTRA_CFLAGS=-std=gnu99 + LZ4_DIR=#{Formula["lz4"].opt_prefix} + LZ4_SUPPORT=1 + LZO_DIR=#{Formula["lzo"].opt_prefix} + LZO_SUPPORT=1 + XZ_DIR=#{Formula["xz"].opt_prefix} + XZ_SUPPORT=1 + LZMA_XZ_SUPPORT=1 + ZSTD_DIR=#{Formula["zstd"].opt_prefix} + ZSTD_SUPPORT=1 + XATTR_SUPPORT=1 + ] + + commands = %w[mksquashfs unsquashfs sqfscat sqfstar] + + cd "squashfs-tools" do + system "make", *args + bin.install commands + end + + ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" + mkdir_p man1 + cd "squashfs-tools/generate-manpages" do + commands.each do |command| + system "./#{command}-manpage.sh", bin, man1/"#{command}.1" + end + end + + doc.install Dir["Documentation/#{version.major_minor}/*"] + end + + test do + # Check binaries execute + assert_match version.to_s, shell_output("#{bin}/mksquashfs -version") + assert_match version.to_s, shell_output("#{bin}/unsquashfs -v", 1) + + (testpath/"in/test1").write "G'day!" + (testpath/"in/test2").write "Bonjour!" + (testpath/"in/test3").write "Moien!" + + # Test mksquashfs can make a valid squashimg. + # (Also tests that `xz` support is properly linked.) + system bin/"mksquashfs", "in/test1", "in/test2", "in/test3", "test.xz.sqsh", "-quiet", "-comp", "xz" + assert_path_exists testpath/"test.xz.sqsh" + assert_match "Found a valid SQUASHFS 4:0 superblock on test.xz.sqsh.", + shell_output("#{bin}/unsquashfs -s test.xz.sqsh") + + # Test unsquashfs can extract files verbatim. + system bin/"unsquashfs", "-d", "out", "test.xz.sqsh" + assert_path_exists testpath/"out/test1" + assert_path_exists testpath/"out/test2" + assert_path_exists testpath/"out/test3" + assert shell_output("diff -r in/ out/") + end +end diff --git a/Formula/s/squashfuse.rb b/Formula/s/squashfuse.rb new file mode 100644 index 0000000000000..5eeda1748eee7 --- /dev/null +++ b/Formula/s/squashfuse.rb @@ -0,0 +1,38 @@ +class Squashfuse < Formula + desc "FUSE filesystem to mount squashfs archives" + homepage "https://github.com/vasi/squashfuse" + url "https://github.com/vasi/squashfuse/releases/download/0.6.1/squashfuse-0.6.1.tar.gz" + sha256 "7b18a58c40a3161b5c329ae925b72336b5316941f906b446b8ed6c5a90989f8c" + license "BSD-2-Clause" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "2ac81c35fe8e2339d2da50ba09484eff8f69552fb3f501f33d8df133d358173a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8f4cd10ca2e0d20f7407ba2d8fa8240d3786dd4c65b40f1e24a7878e0f828e4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "lz4" + depends_on "lzo" + depends_on "squashfs" + depends_on "xz" + depends_on "zlib" + depends_on "zstd" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + # Unfortunately, making/testing a squash mount requires sudo privileges, so + # just test that squashfuse execs for now. + output = shell_output("#{bin}/squashfuse --version 2>&1", 254) + assert_match version.to_s, output + end +end diff --git a/Formula/s/squealer.rb b/Formula/s/squealer.rb new file mode 100644 index 0000000000000..c6f4349fb6a92 --- /dev/null +++ b/Formula/s/squealer.rb @@ -0,0 +1,35 @@ +class Squealer < Formula + desc "Scans Git repositories or filesystems for secrets in commit histories" + homepage "https://github.com/owenrumney/squealer" + url "https://github.com/owenrumney/squealer/archive/refs/tags/v1.2.11.tar.gz" + sha256 "c4be3f6a6dfa926cc50e6f8d780d3af9abbe1ac24ab528dbf9848bc89b63b697" + license "Unlicense" + head "https://github.com/owenrumney/squealer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bbbca0998a02f9934bf8dde6839cd83d40fcf0e1b1a6fae1ced092f43f06cbfd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba32cfb4a7e85c23c6f8662837dd12a8ed2b2b36b62600243f45c18df7ba84f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ba32cfb4a7e85c23c6f8662837dd12a8ed2b2b36b62600243f45c18df7ba84f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba32cfb4a7e85c23c6f8662837dd12a8ed2b2b36b62600243f45c18df7ba84f8" + sha256 cellar: :any_skip_relocation, sonoma: "0abbec834255a9bff97cb798916053c892f986147faaf7d5ac465becb2e328db" + sha256 cellar: :any_skip_relocation, ventura: "0abbec834255a9bff97cb798916053c892f986147faaf7d5ac465becb2e328db" + sha256 cellar: :any_skip_relocation, arm64_linux: "a07b215b0de89a8f913fc7ed7660c623d9a94a3a741b46ba54fd3180fa02b03b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dda2adeb9318b7b5c786b084221ade08a917ef2760c5cbd362b8107c0584985" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/owenrumney/squealer/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/squealer" + end + + test do + system "git", "clone", "https://github.com/owenrumney/woopsie.git" + output = shell_output("#{bin}/squealer woopsie", 1) + assert_match "-----BEGIN OPENSSH PRIVATE KEY-----", output + end +end diff --git a/Formula/s/squid.rb b/Formula/s/squid.rb new file mode 100644 index 0000000000000..34081eacab7b3 --- /dev/null +++ b/Formula/s/squid.rb @@ -0,0 +1,90 @@ +class Squid < Formula + desc "Advanced proxy caching server for HTTP, HTTPS, FTP, and Gopher" + homepage "https://www.squid-cache.org/" + url "https://github.com/squid-cache/squid/releases/download/SQUID_7_3/squid-7.3.tar.bz2" + sha256 "af7d61cfe8e65a814491e974d3011e5349a208603f406ec069e70be977948437" + license "GPL-2.0-or-later" + + # The Git repository contains tags for a higher major version that isn't the + # current release series yet, so we check the latest GitHub release instead. + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 arm64_tahoe: "9bbca04a45b49503c0f9b936aab993fd17a00213a4e76649ec5ddc2316042922" + sha256 arm64_sequoia: "49501db2c4b7921131f37025d26513dec1ba817407184a61a077dff8c8310143" + sha256 arm64_sonoma: "1faee147f4720de4c88fec34f73fb4e1468c8f24794ef893eada83c0d33ae090" + sha256 sonoma: "b57c7f8e1a09663f5b560c9e41b797107932bf9918a850cfd6280ce7a260f8fa" + sha256 arm64_linux: "2e61d953c90f9093df8db0a5f1f3289955ea9212194948cbc081d4a8a6fb2670" + sha256 x86_64_linux: "ce7f04ed768aaf3696bba47d0062e1a828ae4ebe550b5f88487c0e70aa0d1687" + end + + head do + url "https://github.com/squid-cache/squid.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + + def install + # https://stackoverflow.com/questions/20910109/building-squid-cache-on-os-x-mavericks + ENV.append "LDFLAGS", "-lresolv" + + # For --disable-eui, see: + # https://www.squid-cache.org/mail-archive/squid-users/201304/0040.html + args = %W[ + --localstatedir=#{var} + --sysconfdir=#{etc} + --enable-ssl + --enable-ssl-crtd + --disable-eui + --with-included-ltdl + --with-gnutls=no + --with-nettle=no + --with-openssl + --enable-delay-pools + --enable-disk-io=yes + --enable-removal-policies=yes + --enable-storeio=yes + ] + + args << "--enable-pf-transparent" if OS.mac? + + system "./bootstrap.sh" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + service do + run [opt_sbin/"squid", "-N", "-d 1"] + keep_alive true + working_dir var + log_path var/"log/squid.log" + error_log_path var/"log/squid.log" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/squid -v") + + pid = fork do + exec "#{sbin}/squid" + end + sleep 2 + + begin + system "#{sbin}/squid", "-k", "check" + ensure + exec "#{sbin}/squid -k interrupt" + Process.wait(pid) + end + end +end diff --git a/Formula/s/squiid.rb b/Formula/s/squiid.rb new file mode 100644 index 0000000000000..ad2a4294cd46a --- /dev/null +++ b/Formula/s/squiid.rb @@ -0,0 +1,29 @@ +class Squiid < Formula + desc "Do advanced algebraic and RPN calculations" + homepage "https://imaginaryinfinity.net/projects/squiid/" + url "https://gitlab.com/ImaginaryInfinity/squiid-calculator/squiid/-/archive/1.3.0/squiid-1.3.0.tar.gz" + sha256 "bcf83dcc8bb1374866ee4fb8b31b96203476bb8cdde80cb0d24edfdbebd11469" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7fafefb958aa0ca0e0f13a3dbc8b7f320ccba065c07b2648074edff7bb022cdc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91d532cf3d6df4d588888343fa5ce18f7c2f3dc3b95c435aec001afc51404f58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2afc1d225a574be54952dc9d99b4287e825c3e7236baded5bb86d12640f8bdd4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d439fec1f96a0b4ca61a92fc31d73a0588a735bef8fb035d24907dc05b17727" + sha256 cellar: :any_skip_relocation, sonoma: "99fbaf75468bd39f33fac158ba621e21cd057a4fcf8b0aa7da5a88858f69128c" + sha256 cellar: :any_skip_relocation, ventura: "3bccfe7343fa9c5b740f1c3bd29f5364313a8643ac4d2d5ec57dbec64fb09352" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9271c4fe7fce39db2b4500368e46dc1443d82583c456204d4c9c8838d03a307" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42a8e97c67a0436e66467376c4c913e0025fec990b1ba314b03ecdc0f4f67e06" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # squiid is a TUI app + assert_match version.to_s, shell_output("#{bin}/squiid --version") + end +end diff --git a/Formula/s/squirrel-lang.rb b/Formula/s/squirrel-lang.rb new file mode 100644 index 0000000000000..03944c2d212fd --- /dev/null +++ b/Formula/s/squirrel-lang.rb @@ -0,0 +1,75 @@ +class SquirrelLang < Formula + desc "High level, imperative, object-oriented programming language" + homepage "http://www.squirrel-lang.org" + url "https://downloads.sourceforge.net/project/squirrel/squirrel3/squirrel%203.2%20stable/squirrel_3_2_stable.tar.gz" + sha256 "211f1452f00b24b94f60ba44b50abe327fd2735600a7bacabc5b774b327c81db" + license "MIT" + head "https://github.com/albertodemichelis/squirrel.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/squirrel[._-]v?(\d+(?:[_-]\d+)+)[._-]stable\.t}i) + strategy :sourceforge do |page, regex| + page.scan(regex).map { |match| match.first.tr("_", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a6f3d550f92933219ee049367a983388c573214b498782f3b53b78b1d0b4aaa4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c69026132fadde7bb41e0e27e9b59a697bf8cd34890b2533decb9a5bf577f08c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc0172703a066072344effffa54a83bfa9cb9ed019e1dce5f95d555479d32d66" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c7e75c2f1186ed55390936d42640165a9d14e7545850d8a0e36429b385f75611" + sha256 cellar: :any_skip_relocation, sonoma: "a6cbfceef8cc3dd290df3502851c6825d556e1de243577a77e1d5ec791d53e2c" + sha256 cellar: :any_skip_relocation, ventura: "84b89afca8ac2aebb170f9465f60338bde3bea89f6fa5ef94b0d59c3e16147ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a93f8baacd46111ca23a759b1982217b9f17b9191f638c6cd8773d377f1d6b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9107cb3585f85f4bed3a63a5f0ab579c559b805b316e955c4e1ee6e8fa23685" + end + + conflicts_with "sq", because: "both install `sq` binaries" + + def install + # The tarball files are in a subdirectory, unlike the upstream repository. + # Moving tarball files out of the subdirectory allows us to use the same + # build steps for stable and HEAD builds. + squirrel_subdir = "squirrel#{version.major}" + if Dir.exist?(squirrel_subdir) + mv Dir["squirrel#{version.major}/*"], "." + rmdir squirrel_subdir + end + + system "make" + prefix.install %w[bin include lib] + doc.install Dir["doc/*.pdf"] + doc.install %w[etc samples] + # See: https://github.com/Homebrew/homebrew/pull/9977 + (lib/"pkgconfig/libsquirrel.pc").write pc_file + end + + def pc_file + <<~EOS + prefix=#{opt_prefix} + exec_prefix=${prefix} + libdir=/${exec_prefix}/lib + includedir=/${prefix}/include + bindir=/${prefix}/bin + ldflags= -L/${prefix}/lib + + Name: libsquirrel + Description: squirrel library + Version: #{version} + + Requires: + Libs: -L${libdir} -lsquirrel -lsqstdlib + Cflags: -I${includedir} + EOS + end + + test do + (testpath/"hello.nut").write <<~EOS + print("hello"); + EOS + assert_equal "hello", shell_output("#{bin}/sq #{testpath}/hello.nut").chomp + end +end diff --git a/Formula/s/sratom.rb b/Formula/s/sratom.rb new file mode 100644 index 0000000000000..4e5bb085ea0b7 --- /dev/null +++ b/Formula/s/sratom.rb @@ -0,0 +1,51 @@ +class Sratom < Formula + desc "Library for serializing LV2 atoms to/from RDF" + homepage "https://drobilla.net/software/sratom.html" + url "https://download.drobilla.net/sratom-0.6.18.tar.xz" + sha256 "4c6a6d9e0b4d6c01cc06a8849910feceb92e666cb38779c614dd2404a9931e92" + license "ISC" + + livecheck do + url "https://download.drobilla.net" + regex(/href=.*?sratom[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fc240e94436dabb8602bfb08f6510fc2a25cc00430e44e0fd77d78c6bfc2e46a" + sha256 cellar: :any, arm64_sequoia: "06905bb6f394ffed730cf2b4e18f80d0bf8829ab1b68bbab7ef98f77e330eaee" + sha256 cellar: :any, arm64_sonoma: "dc753964055fb9efd570db02e1b9489d0b5454f543e4ca1c1ee5d89eb0ce0af3" + sha256 cellar: :any, arm64_ventura: "a16df9f144f66a5f40bcfa25e3b4474b55bbe5d076f00e9a4da01d49588af268" + sha256 cellar: :any, sonoma: "d534631148d36ab131d17128cbbf3cbf54b0d101f97eaf377ce5d92332f58cf2" + sha256 cellar: :any, ventura: "2628c0564c30338296d91bb61b737fc3c7c8d38ccc25f7bad06d4b94d51a3021" + sha256 arm64_linux: "9408b999aa14b1be28373764701877a1936724d00999725f83dbe629f00e2ca0" + sha256 x86_64_linux: "cb03a03254d0fe571376523b49d7363ed984ee238240c67f3e4c627b47f75c43" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "lv2" + depends_on "serd" + depends_on "sord" + + def install + system "meson", "setup", "build", "-Dtests=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + return 0; + } + C + + pkg_config_cflags = shell_output("pkg-config --cflags --libs sratom-0").chomp.split + system ENV.cc, "test.c", *pkg_config_cflags, "-o", "test" + system "./test" + end +end diff --git a/Formula/s/sratoolkit.rb b/Formula/s/sratoolkit.rb new file mode 100644 index 0000000000000..b2c339cf79d9f --- /dev/null +++ b/Formula/s/sratoolkit.rb @@ -0,0 +1,95 @@ +class Sratoolkit < Formula + desc "Data tools for INSDC Sequence Read Archive" + homepage "https://github.com/ncbi/sra-tools" + license all_of: [:public_domain, "GPL-3.0-or-later", "MIT"] + + stable do + url "https://github.com/ncbi/sra-tools/archive/refs/tags/3.2.1.tar.gz" + sha256 "2558683c217ad2318833ab7731939617ed91dc79a6b1dee92bf88b56a1dc142a" + + resource "ncbi-vdb" do + url "https://github.com/ncbi/ncbi-vdb/archive/refs/tags/3.2.1.tar.gz" + sha256 "535511984928ec5bac02a61fc6b4d1ca72a5b69c742f4882eabd32ed3a97621c" + + livecheck do + formula :parent + end + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3915f52ef559a82d3b6947c64ea62793ce0089a29ba79ad032c87c602abc4ceb" + sha256 cellar: :any, arm64_sequoia: "3f638492e68e21c284a4aeee221d5e169b1984a75adf1648fa33d8481dd354f9" + sha256 cellar: :any, arm64_sonoma: "5eb9c8506a1ad99e5f5b929314e807018e7e0ad2562cee2bfe55f6fe3a9f49f7" + sha256 cellar: :any, arm64_ventura: "111636d770e9da3b1b0cd652f0cb46b7fb48e283e553859fb04aebc6078d7b3f" + sha256 cellar: :any, sonoma: "f6b0a3c7e7ea88755d2cb2f33a58c8b93565f8ed8024f9b3a3709425775cbe8b" + sha256 cellar: :any, ventura: "4d6f5a48ea2ce178703d4ec93bbaa589a3e3c86751a9a8eaf95dd6faac75590a" + sha256 cellar: :any_skip_relocation, arm64_linux: "244c56dd90cfa2a51e4c55065a58dfee0f39a82a06f5547815d412a339111965" + sha256 cellar: :any_skip_relocation, x86_64_linux: "580d70086da44a3bab3152314fe4af79a710f04dc140bb032c13ee26b5323211" + end + + head do + url "https://github.com/ncbi/sra-tools.git", branch: "master" + + resource "ncbi-vdb" do + url "https://github.com/ncbi/ncbi-vdb.git", branch: "master" + end + end + + depends_on "cmake" => :build + depends_on "hdf5" + + uses_from_macos "libxml2" + + def install + odie "ncbi-vdb resource needs to be updated" if build.stable? && version != resource("ncbi-vdb").version + + (buildpath/"ncbi-vdb-source").install resource("ncbi-vdb") + + # Issue ref: https://github.com/ncbi/sra-tools/issues/1096 + if OS.mac? && DevelopmentTools.clang_build_version >= 1700 + # Fix to error: static declaration of 'strchrnul' follows non-static declaration + inreplace "ncbi-vdb-source/interfaces/os/mac/os-native.h", + /^(\s*#\s*include\s*<.*>\s*)+/, + "\\0\n#include \n#define strchrnul sratk_strchrnul\n" + # Fix to avoid fdopen() redefinition for vendored `zlib` + inreplace "ncbi-vdb-source/libs/ext/zlib/zutil.h", + "# define fdopen(fd,mode) NULL /* No fdopen() */", + "" + end + + # Need to use HDF 1.10 API: error: too few arguments to function call, expected 5, have 4 + # herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5P_DEFAULT ); + ENV.append_to_cflags "-DH5_USE_110_API" + + system "cmake", "-S", "ncbi-vdb-source", "-B", "ncbi-vdb-build", *std_cmake_args, + "-DNGS_INCDIR=#{buildpath}/ngs/ngs-sdk" + system "cmake", "--build", "ncbi-vdb-build" + + system "cmake", "-S", ".", "-B", "sra-tools-build", *std_cmake_args, + "-DVDB_BINDIR=#{buildpath}/ncbi-vdb-build", + "-DVDB_LIBDIR=#{buildpath}/ncbi-vdb-build/lib", + "-DVDB_INCDIR=#{buildpath}/ncbi-vdb-source/interfaces" + system "cmake", "--build", "sra-tools-build" + system "cmake", "--install", "sra-tools-build" + + # Remove non-executable files. + rm_r(bin/"ncbi") + end + + test do + # For testing purposes, generate a sample config noninteractively in lieu of running vdb-config --interactive + # See upstream issue: https://github.com/ncbi/sra-tools/issues/291 + require "securerandom" + mkdir ".ncbi" + (testpath/".ncbi/user-settings.mkfg").write "/LIBS/GUID = \"#{SecureRandom.uuid}\"\n" + + assert_match "Read 1 spots for SRR000001", shell_output("#{bin}/fastq-dump -N 1 -X 1 SRR000001") + assert_match "@SRR000001.1 EM7LVYS02FOYNU length=284", File.read("SRR000001.fastq") + end +end diff --git a/Formula/s/src.rb b/Formula/s/src.rb new file mode 100644 index 0000000000000..be7a4b8a4da83 --- /dev/null +++ b/Formula/s/src.rb @@ -0,0 +1,47 @@ +class Src < Formula + desc "Simple revision control: RCS reloaded with a modern UI" + homepage "http://www.catb.org/~esr/src/" + url "http://www.catb.org/~esr/src/src-1.41.tar.gz" + sha256 "5dc9302b161582149dbc191a0eeee43142b96386a542c870d56ac9fddb995d25" + license "BSD-2-Clause" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "56096c026d4c1de4b67f49b8cff61aa96ba2e29265b548b2f31561624b363c22" + end + + head do + url "https://gitlab.com/esr/src.git", branch: "master" + depends_on "asciidoc" => :build + end + + depends_on "rcs" + + uses_from_macos "python" + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" if build.head? + + system "make", "install", "prefix=#{prefix}" + end + + test do + require "pty" + (testpath/"test.txt").write "foo" + PTY.spawn("sh", "-c", "#{bin}/src commit -m hello test.txt; #{bin}/src status test.txt") do |r, _w, _pid| + output = "" + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + assert_match(/^=\s*test.txt/, output) + end + end +end diff --git a/Formula/s/srecord.rb b/Formula/s/srecord.rb new file mode 100644 index 0000000000000..e6f6d876fe2e6 --- /dev/null +++ b/Formula/s/srecord.rb @@ -0,0 +1,79 @@ +class Srecord < Formula + desc "Tools for manipulating EPROM load files" + homepage "https://srecord.sourceforge.net/" + url "https://downloads.sourceforge.net/project/srecord/srecord/1.65/srecord-1.65.0-Source.tar.gz" + sha256 "81c3d07cf15ce50441f43a82cefd0ac32767c535b5291bcc41bd2311d1337644" + license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "054d26597b7a4c444cf94c279055aeac127939f40ca58928ccc5a0295c6312d5" + sha256 cellar: :any, arm64_sequoia: "fe9526b920ca097bcc3662d2647c08cfc54a4625a87b2f3a453a4e5f8ad7d23e" + sha256 cellar: :any, arm64_sonoma: "c84c3f38127465b4d953e34c18f4b3a5b5a54d0f7432473da85a3ca12656530b" + sha256 cellar: :any, arm64_ventura: "8f5734f732be90260ca85621e38461ceb88968f318e5c2fc82c7234c2ea2bc99" + sha256 cellar: :any, sonoma: "9ccbe261cc839da5b1a89ab3b3bf6db279882ef890c1ad21d2b07b7e2fefafd1" + sha256 cellar: :any, ventura: "a2bb8ac18cfe099403652f3615826e1166f4f162039f566badd4ff4f93668495" + sha256 cellar: :any_skip_relocation, arm64_linux: "d56e983fa5e6f74619ff7bd022480f75a8d01d01b560590a01a254fa62b1621f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "930fcefc508d48b013cb7ca445f470176eb0c88f8786a961a4218ca325c1e9ed" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "ghostscript" => :build # for ps2pdf + depends_on "graphviz" => :build + depends_on "libpaper" => :build # for paper + depends_on "netpbm" => :build # for pnmcrop + depends_on "psutils" => :build # for psselect + + depends_on "libgcrypt" + + on_macos do + depends_on "coreutils" => :build # for ptx + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "groff" => :build + end + + # Apply Fedora patch to build shared library and avoid installing a duplicate libgcrypt + # Issue ref: https://github.com/sierrafoxtrot/srecord/issues/29 + patch do + url "https://src.fedoraproject.org/rpms/srecord/raw/4d2b7a885e73398fe1caf7fa3d514b522a1bca2f/f/srecord-1.65-fedora.patch" + sha256 "8e6f0b3f71b99700d598b461272a6926ec5b5445b6758df455aaba02f596c8e9" + end + + def install + # Issue ref: https://github.com/sierrafoxtrot/srecord/issues/65 + inreplace "CMakeLists.txt", 'set(CMAKE_INSTALL_PREFIX "/usr")', "" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Remove over 40MB of documentation bringing install to 3MB + rm_r(doc/"htdocs") + end + + test do + (testpath/"test.srec").write <<~EOS + S012000068656C6C6F5F737265632E73726563F2 + S1130000303132333435363738396162636465668A + S11300104142434445464748494A4B4C4D4E4F5054 + S10C002041414141424242420ABD + S9030000FC + EOS + + expected = <<~EOS + Format: Motorola S-Record + Header: "hello_srec.srec" + Execution Start Address: 00000000 + Data: 0000 - 0028 + EOS + + output = shell_output("#{bin}/srec_info #{testpath}/test.srec") + assert_equal expected, output + + assert_match version.major_minor.to_s, shell_output("#{bin}/srec_info --version") + end +end diff --git a/Formula/s/srgn.rb b/Formula/s/srgn.rb new file mode 100644 index 0000000000000..8b315c676d086 --- /dev/null +++ b/Formula/s/srgn.rb @@ -0,0 +1,36 @@ +class Srgn < Formula + desc "Code surgeon for precise text and code transplantation" + homepage "https://github.com/alexpovel/srgn" + url "https://github.com/alexpovel/srgn/archive/refs/tags/srgn-v0.14.0.tar.gz" + sha256 "b6219c19214ad932b5df67c8ee00f32755014bf5ea2a1b6b57c6913c3124d202" + license "MIT" + head "https://github.com/alexpovel/srgn.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03655fc026919dd1b28849112e876ae5fe7ff5cef1edb43e5b544d57377ad07e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "89afca697ec0afb55afbe31f14c294cc901d17c9abba1cb5f2d72f8e8b4f03b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0733ebd9f017acbd960e332e97d155e2f07a3b9d8ec262bc07d5cbeb7b8dfba9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62dc6bf77bf3db36d74ca388ece0329272152ddf3518b7b7dce8dfa505a4e245" + sha256 cellar: :any_skip_relocation, sonoma: "c6117f3f6574d78d26834664f9cba9ad4ce8a74329dd8605010faf92ef8a8963" + sha256 cellar: :any_skip_relocation, ventura: "958ca75e594858d8a4a2eacee9cf226d42555314de543b5f9f31008725aab742" + sha256 cellar: :any_skip_relocation, arm64_linux: "e35a1375edadf7c3db18100f0b369f90d55d863b1fabaaaa731df1f148290fa2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d47e9c81e12337fb3c886452a2c226348c711eb480a4d69f03fc3e11c24a99c3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"srgn", "--completions") + end + + test do + assert_match "H____", pipe_output("#{bin}/srgn '[a-z]' -- '_'", "Hello") + + test_string = "Hide ghp_th15 and ghp_th4t" + assert_match "Hide * and *", pipe_output("#{bin}/srgn '(ghp_[[:alnum:]]+)' -- '*'", test_string) + + assert_match version.to_s, shell_output("#{bin}/srgn --version") + end +end diff --git a/Formula/s/srt.rb b/Formula/s/srt.rb new file mode 100644 index 0000000000000..891167abfcd01 --- /dev/null +++ b/Formula/s/srt.rb @@ -0,0 +1,51 @@ +class Srt < Formula + desc "Secure Reliable Transport" + homepage "https://www.srtalliance.org/" + url "https://github.com/Haivision/srt/archive/refs/tags/v1.5.4.tar.gz" + sha256 "d0a8b600fe1b4eaaf6277530e3cfc8f15b8ce4035f16af4a5eb5d4b123640cdd" + license "MPL-2.0" + head "https://github.com/Haivision/srt.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "023760d7f2e532bf14d215764aa8d64c2d4e52d6fd116d51f50252269813d5ba" + sha256 cellar: :any, arm64_sequoia: "2c7b2c84e165de83ce32e46bb6263158c2c9e680b816032d5b6771ccc6f32d7d" + sha256 cellar: :any, arm64_sonoma: "8e8f3ee4f8fdeb10602feb2fac3d140e236df5024e212fb6b6f1455bf2061532" + sha256 cellar: :any, arm64_ventura: "806fa132d70ecfff69e3cecb0f4c70d8e994293e748ca21b7c30290c09e7db05" + sha256 cellar: :any, sonoma: "a32f1c565c530f10c2a9e1d943d0eacac64b129ba745a2eb6da520d574bd798b" + sha256 cellar: :any, ventura: "0d2f45e1447a367914e64e12d4039f7488a6c9675a2d8206abe65d741e553f7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "58d61f9d71831b4739cfc90208ccb2bc051e417e30f88ff91b131cd3a679be21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6e779a8068e881ea3977fd8ede3863b108f621589ee1f87a28360fd6d6ee257" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + # Fix to cmake 4 compatibility + # PR ref: https://github.com/Haivision/srt/pull/3167 + patch do + url "https://github.com/Haivision/srt/commit/7962936829e016295e5c570539eb2520b326da4c.patch?full_index=1" + sha256 "e4489630886bf8b26f63a23c8b1aec549f7280f07713ded07fce281e542725f7" + end + + def install + openssl = Formula["openssl@3"] + + args = %W[ + -DWITH_OPENSSL_INCLUDEDIR=#{openssl.opt_include} + -DWITH_OPENSSL_LIBDIR=#{openssl.opt_lib} + -DCMAKE_INSTALL_BINDIR=bin + -DCMAKE_INSTALL_LIBDIR=lib + -DCMAKE_INSTALL_INCLUDEDIR=include + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + cmd = "#{bin}/srt-live-transmit file:///dev/null file://con/ 2>&1" + assert_match "Unsupported source type", shell_output(cmd, 1) + end +end diff --git a/Formula/s/srtp.rb b/Formula/s/srtp.rb new file mode 100644 index 0000000000000..0929f8c7d7455 --- /dev/null +++ b/Formula/s/srtp.rb @@ -0,0 +1,39 @@ +class Srtp < Formula + desc "Implementation of the Secure Real-time Transport Protocol" + homepage "https://github.com/cisco/libsrtp" + url "https://github.com/cisco/libsrtp/archive/refs/tags/v2.7.0.tar.gz" + sha256 "54facb1727a557c2a76b91194dcb2d0a453aaf8e2d0cbbf1e3c2848c323e28ad" + license "BSD-3-Clause" + head "https://github.com/cisco/libsrtp.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "57899ec6d17890c82b81cdf7a80eee3a621a23e2e513d7c64fd972ae1301a311" + sha256 cellar: :any, arm64_sequoia: "bfae1fd49d88223c76e1181f78b81bbe5f4cdfb02a4aec7fbeaf071e49725796" + sha256 cellar: :any, arm64_sonoma: "473e73636853af42e2173d6fe231380473d0bf5e7ff804ba53a2fc4a7b9b20f7" + sha256 cellar: :any, arm64_ventura: "ffda680f84d2f5cb9cf8ea9d078b8386cf2f0cf223d2dfe5147bb739f8631c9f" + sha256 cellar: :any, sonoma: "7ac6524572afcc2962a2a22562f8253d0ef1f1bc80a78488c9a4a8fe5bdc7f3d" + sha256 cellar: :any, ventura: "57406d7cd6cada27a6c8717c32550234e716f9ae7989e28959f53204dc5a20a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccb20fac89e4f213d8802f02a061735b5a55ba134d9e2c3bb4b581044c45ef51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0dcfb6ace5a4cec086e56117194b86fe25292173d200abe1b6530b5cb7a9fd6d" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + def install + system "./configure", "--enable-openssl", *std_configure_args + system "make", "test" + system "make", "shared_library" + system "make", "install" # Can't go in parallel of building the dylib + libexec.install "test/rtpw" + end + + test do + system libexec/"rtpw", "-l" + end +end diff --git a/Formula/s/ssdb.rb b/Formula/s/ssdb.rb new file mode 100644 index 0000000000000..3389c932df1c8 --- /dev/null +++ b/Formula/s/ssdb.rb @@ -0,0 +1,86 @@ +class Ssdb < Formula + desc "NoSQL database supporting many data structures: Redis alternative" + homepage "https://ssdb.io/" + url "https://github.com/ideawu/ssdb/archive/refs/tags/1.9.9.tar.gz" + sha256 "a32009950114984d6e468e10d964b0ef1e846077b69d7c7615715fdfa01aaf6e" + license "BSD-3-Clause" + head "https://github.com/ideawu/ssdb.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3fe78871af08371b8d2f7fecbea63b1ff415f7071febdbd4a5ec06d7b08c2c47" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b781dfcd8a19c986f0595815cb3e9bcc8c6a98fc818e90b6d3c4b505b6379e45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc7bc37501d29396dd766ca625925eef5175823250c3dac87f1b36d814ed783f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "79bb5aad0a9002af14f96810f62717cd0249479368fecaa7e9481a7ab2b7a05e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fd19fa3f456c5dd8b460280a7dac3953032564b280484346376b3f3f217e1592" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fd8b6237b70f674f8bc59c1ce2e6d57e6476915c6b01657358a451ecab5e405a" + sha256 cellar: :any_skip_relocation, sonoma: "6864bae902aaf95a7a55aa31e79c79a2491de19f6084e1005b02492a89b17109" + sha256 cellar: :any_skip_relocation, ventura: "1a620a33fde41616aa7f05016f3699b239e76a49a3740096551d64933acf9435" + sha256 cellar: :any_skip_relocation, monterey: "5251016f1ba03a184424fc041e61501398577ca0c1aceac23748e22bc8883f5f" + sha256 cellar: :any_skip_relocation, big_sur: "f92e221d20ca1a85c7ae555acd1417bba60b208a56091eb3a25d98fc788f25a3" + sha256 cellar: :any_skip_relocation, catalina: "4253e51c8e447b5d4e0ec5f064ee2fcc3ef57b30734df70f3b24d6399abb9363" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b979956e4a3d08fa70ad494d69fc7883116d7f08ddcddea15a058f7836891d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9db77a02bd8c3ed9569919f579d4e3a3d434bfba9f4679aafbc3c2de87993478" + end + + depends_on "autoconf" => :build + + def install + # Avoid building the bundled leveldb with `-msse4.2 -DLEVELDB_PLATFORM_POSIX_SSE` + # in order to work around an Apple Silicon build error on SSE code: + # port/port_posix_sse.cc:58:3: error: use of undeclared identifier '__get_cpuid' + # TODO: Remove when bundled leveldb is updated or build allows linking system library + if Hardware::CPU.arm? + inreplace "deps/leveldb-1.20/build_detect_platform", /(PLATFORM_SSEFLAGS=)"-msse4\.2"$/, "\\1" + end + + inreplace "tools/ssdb-cli", /^DIR=.*$/, "DIR=#{prefix}" + + system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" + system "make", "install", "PREFIX=#{prefix}" + + %w[bench cli dump repair server].each do |suffix| + bin.install "#{prefix}/ssdb-#{suffix}" + end + + ["run", "db/ssdb", "db/ssdb_slave", "log"].each do |dir| + (var/dir).mkpath + end + + inreplace "ssdb.conf" do |s| + s.gsub! "work_dir = ./var", "work_dir = #{var}/db/ssdb/" + s.gsub! "pidfile = ./var/ssdb.pid", "pidfile = #{var}/run/ssdb.pid" + s.gsub! "\toutput: log.txt", "\toutput: #{var}/log/ssdb.log" + end + + inreplace "ssdb_slave.conf" do |s| + s.gsub! "work_dir = ./var_slave", "work_dir = #{var}/db/ssdb_slave/" + s.gsub! "pidfile = ./var_slave/ssdb.pid", "pidfile = #{var}/run/ssdb_slave.pid" + s.gsub! "\toutput: log_slave.txt", "\toutput: #{var}/log/ssdb_slave.log" + end + + etc.install "ssdb.conf" + etc.install "ssdb_slave.conf" + end + + service do + run [opt_bin/"ssdb-server", etc/"ssdb.conf"] + keep_alive successful_exit: false + error_log_path var/"log/ssdb.log" + log_path var/"log/ssdb.log" + working_dir var + end + + test do + pid = fork do + Signal.trap("TERM") do + system(bin/"ssdb-server", "-d", "#{HOMEBREW_PREFIX}/etc/ssdb.conf") + exit + end + end + sleep(3) + Process.kill("TERM", pid) + end +end diff --git a/Formula/s/ssdeep.rb b/Formula/s/ssdeep.rb new file mode 100644 index 0000000000000..3dddeec4392f0 --- /dev/null +++ b/Formula/s/ssdeep.rb @@ -0,0 +1,36 @@ +class Ssdeep < Formula + desc "Recursive piecewise hashing tool" + homepage "https://ssdeep-project.github.io/ssdeep/" + url "https://github.com/ssdeep-project/ssdeep/releases/download/release-2.14.1/ssdeep-2.14.1.tar.gz" + sha256 "ff2eabc78106f009b4fb2def2d76fb0ca9e12acf624cbbfad9b3eb390d931313" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e9bde3f8a96c900db97df6ad5bbfdc7c3b846229b78882cb6413fd58f0dc00e9" + sha256 cellar: :any, arm64_sequoia: "e15c23668877e2528d0ef6a446904c5c9802095b19bcbaf037ce382376c50fb2" + sha256 cellar: :any, arm64_sonoma: "b3e4cc557c4481853959fe15a61314d395df95e655e6809c89dae20db8eb8429" + sha256 cellar: :any, arm64_ventura: "4c852376c9936badb32f51835c1c71622b5ef3c6c9ca9206ae43dd99a23e7d73" + sha256 cellar: :any, arm64_monterey: "90d04d23cbaa964e22b512fc048d6b7c07c268ea1560ec8e9a9e62f7e8f32182" + sha256 cellar: :any, sonoma: "0b284332d1db2589577a0714f875ff8149146ada15d3cb443190977024145e46" + sha256 cellar: :any, ventura: "1fd2896aaeb79fde178e73b814ff02d91f92f0c6a80331adf4c7970c7fce40ac" + sha256 cellar: :any, monterey: "2addd0f558292956dd191891a0187dffdb979e8cbe387280fd2920dc1429be06" + sha256 cellar: :any_skip_relocation, arm64_linux: "0efcfc1a319de30ee921f93ee4296d34d801a59381b47169accce5630181b93d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d62ce2005fd901e4a363b3f6592dee0388e9114d323a058499d16e8dba9c4d38" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + expected = <<~EOS + ssdeep,1.1--blocksize:hash:hash,filename + 192:1xJsxlk/aMhud9Eqfpm0sfQ+CfQoDfpw3RtU:1xJsPMIdOqBCYLYYB7,"#{include}/fuzzy.h" + EOS + assert_equal expected, shell_output("#{bin}/ssdeep #{include}/fuzzy.h") + end +end diff --git a/Formula/s/sse2neon.rb b/Formula/s/sse2neon.rb new file mode 100644 index 0000000000000..828e8b823e189 --- /dev/null +++ b/Formula/s/sse2neon.rb @@ -0,0 +1,42 @@ +class Sse2neon < Formula + desc "Translator from Intel SSE intrinsics to Arm/Aarch64 NEON implementation" + homepage "https://github.com/DLTcollab/sse2neon" + url "https://github.com/DLTcollab/sse2neon/archive/refs/tags/v1.8.0.tar.gz" + sha256 "e251746e3b761f3f0de1ad462b1efe53532341b6b0498d394765fceb85ce8a46" + license "MIT" + head "https://github.com/DLTcollab/sse2neon.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "06fb48d181d2cad0a1bab7bcf214f80c33c42a7c37599cb58015e3223dfb1543" + end + + depends_on arch: :arm64 + + def install + (include/"sse2neon").install "sse2neon.h" + include.install_symlink "sse2neon/sse2neon.h" + end + + test do + %w[sse2neon sse2neon/sse2neon].each do |include_path| + test_name = include_path.tr("/", "-") + (testpath/"#{test_name}.c").write <<~C + #include + #include <#{include_path}.h> + + int main() { + int64_t a = 1, b = 2; + assert(vaddd_s64(a, b) == 3); + __m128i z = _mm_setzero_si128(); + __m128i v = _mm_undefined_si128(); + v = _mm_xor_si128(v, v); + assert(_mm_movemask_epi8(_mm_cmpeq_epi8(v, z)) == 0xFFFF); + return 0; + } + C + + system ENV.cc, "#{test_name}.c", "-o", test_name + system testpath/test_name + end + end +end diff --git a/Formula/s/ssed.rb b/Formula/s/ssed.rb new file mode 100644 index 0000000000000..d6aa6a6c07930 --- /dev/null +++ b/Formula/s/ssed.rb @@ -0,0 +1,50 @@ +class Ssed < Formula + desc "Super sed stream editor" + # Original website is down: https://sed.sourceforge.io/grabbag/ssed/ + homepage "https://packages.debian.org/sid/ssed" + url "http://deb.debian.org/debian/pool/main/s/ssed/ssed_3.62.orig.tar.gz" + mirror "https://sed.sourceforge.io/grabbag/ssed/sed-3.62.tar.gz" + sha256 "af7ff67e052efabf3fd07d967161c39db0480adc7c01f5100a1996fec60b8ec4" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?sed[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7f320800bb3b956cc9b1c04587ac2c93bf44dfea273107a9930a767bfa970f44" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92006e68fb2c4e57950c340c9ccef34132c2577f7341b79c168ca906bd400018" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c90bd4517877eb2e72ed8ddfd9ebd830d781d10f3e1e21f81013ea76fc75816d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "145cb1b805276d6a61df5d706fac9e96cd1dd98f0e1e4f2a9bafe1af52fcef47" + sha256 cellar: :any_skip_relocation, sonoma: "fd6689f0fb272be1bf808fc7989f2c8d1223d684a76882e6f889f84f20642303" + sha256 cellar: :any_skip_relocation, ventura: "5bbc6dfa3c280d9cc26fe8d0516d0ce558cf1e81bdd546dc3ce897eb66f3c4f7" + sha256 arm64_linux: "c8fc6e6bc3c579dfafeeaf205989db9d1048b345c30db3ef691593503ebcce17" + sha256 x86_64_linux: "3c4df17253d6bc34e6b2d0df8fc7bc9034185a67701b9bf29bf4d5dafd3fe266" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + args = %W[ + --mandir=#{man} + --infodir=#{info} + --program-prefix=s + ] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + info.install info/"sed.info" => "ssed.info" + end + + test do + assert_equal "homebrew", + pipe_output("#{bin}/ssed s/neyd/mebr/", "honeydew", 0).chomp + end +end diff --git a/Formula/s/ssh-audit.rb b/Formula/s/ssh-audit.rb new file mode 100644 index 0000000000000..a165641086a63 --- /dev/null +++ b/Formula/s/ssh-audit.rb @@ -0,0 +1,28 @@ +class SshAudit < Formula + include Language::Python::Virtualenv + + desc "SSH server & client auditing" + homepage "https://github.com/jtesta/ssh-audit" + url "https://files.pythonhosted.org/packages/3b/ec/e89fdfaaa6f08813e1a5cf926bc0dc155761144ebcac57191b4c8001aae3/ssh_audit-3.3.0.tar.gz" + sha256 "b76e36ac9844f45d64986c9f293a4b46766a10412dc29fb43bd52d0f6661a5b0" + license "MIT" + head "https://github.com/jtesta/ssh-audit.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1ac5df2410976a103b41d73e25db9056a6b50c71a266a32047a6cefd253f04e6" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/ssh-audit -nt 0 ssh.github.com", 1) + assert_match "[exception] cannot connect to ssh.github.com port 22", output + + assert_match "ssh-audit v#{version}", shell_output("#{bin}/ssh-audit -h") + end +end diff --git a/Formula/s/ssh-copy-id.rb b/Formula/s/ssh-copy-id.rb new file mode 100644 index 0000000000000..a42567c3817d4 --- /dev/null +++ b/Formula/s/ssh-copy-id.rb @@ -0,0 +1,30 @@ +class SshCopyId < Formula + desc "Add a public key to a remote machine's authorized_keys file" + homepage "https://www.openssh.com/" + url "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.2p1.tar.gz" + mirror "https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.2p1.tar.gz" + version "10.2p1" + sha256 "ccc42c0419937959263fa1dbd16dafc18c56b984c03562d2937ce56a60f798b2" + license "SSH-OpenSSH" + head "https://github.com/openssh/openssh-portable.git", branch: "master" + + livecheck do + formula "openssh" + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e95c19490255698794857da6850531b407efb81d78176b740d193fdcecc75b3d" + end + + keg_only :provided_by_macos + + def install + bin.install "contrib/ssh-copy-id" + man1.install "contrib/ssh-copy-id.1" + end + + test do + output = shell_output("#{bin}/ssh-copy-id -h 2>&1", 1) + assert_match "identity_file", output + end +end diff --git a/Formula/s/ssh-mitm.rb b/Formula/s/ssh-mitm.rb new file mode 100644 index 0000000000000..d0e39e324f6d2 --- /dev/null +++ b/Formula/s/ssh-mitm.rb @@ -0,0 +1,138 @@ +class SshMitm < Formula + include Language::Python::Virtualenv + + desc "SSH server for security audits and malware analysis" + homepage "https://docs.ssh-mitm.at" + url "https://files.pythonhosted.org/packages/f0/4e/c804d08c336bcff29fd665fdc3ff9d3698d529b1d75462b89bc53527862a/ssh_mitm-5.0.1.tar.gz" + sha256 "221dafeed602c4cca7a3c7fb2eee55eb9725ea11d19a75fd13c9bc3a1cf274ed" + license "GPL-3.0-only" + revision 1 + head "https://github.com/ssh-mitm/ssh-mitm.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "bb328e391efdd20338ccb0d52286001bd7addda4abe125fade1044bd4ff46ef9" + sha256 cellar: :any, arm64_sequoia: "32525be3e1ff98532e355ea6165aecd326e15da73c418819101c7a9a2c4aaf5a" + sha256 cellar: :any, arm64_sonoma: "85c9b351a0a1b4e61c5441a9ad0c71e5349cdb37874f760925179b449e00f7b2" + sha256 cellar: :any, sonoma: "262b76263d007f25b580cd4e1dfd5dfecd60a55e88e43072e9e71578affeaef1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f720197fc87dc632fecc63e61dab27f375eda6edcf958fda852181ae200e1fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8463b187525bc4b838a9cacc3794d0e55b4dbda6702051711053316b6b36ee1" + end + + depends_on "rust" => :build # for bcrypt + depends_on "cryptography" => :no_linkage + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "cryptography" + + resource "appimage" do + url "https://files.pythonhosted.org/packages/58/30/625bf3d9cbb7b8736ea053b725bf72e55415cbe5ce4bf4c8971537fb5720/appimage-1.0.0.tar.gz" + sha256 "75933b9df5cd77dcdc8187fda3142dd84ea63ffc40712369ecc19652ea1ef3ac" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz" + sha256 "f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd" + end + + resource "colored" do + url "https://files.pythonhosted.org/packages/4a/32/b772def12071faf780dd14e8a95ec8eba4bf5934f302de3a3780b919859a/colored-2.3.1.tar.gz" + sha256 "fe6e888e12dc16643daa0b108f785df6d0b48420084b5d0a567de27bb09a14d8" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/c0/1f/924e3caae75f471eae4b26bd13b698f6af2c44279f67af317439c2f4c46a/ecdsa-0.19.1.tar.gz" + sha256 "478cba7b62555866fcb3bb3fe985e06decbdb68ef55713c4e5ab98c57d508e61" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "paramiko" do + url "https://files.pythonhosted.org/packages/0b/6a/1d85cc9f5eaf49a769c7128039074bbb8127aba70756f05dfcf4326e72a1/paramiko-3.4.1.tar.gz" + sha256 "8b15302870af7f6652f2e038975c1d2973f06046cb5d7d65355668b3ecbece0c" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "python-json-logger" do + url "https://files.pythonhosted.org/packages/29/bf/eca6a3d43db1dae7070f70e160ab20b807627ba953663ba07928cdd3dc58/python_json_logger-4.0.0.tar.gz" + sha256 "f58e68eb46e1faed27e0f574a55a0455eecd7b8a5b88b85a784519ba3cff047f" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sshpubkeys" do + url "https://files.pythonhosted.org/packages/a3/b9/e5b76b4089007dcbe9a7e71b1976d3c0f27e7110a95a13daf9620856c220/sshpubkeys-3.3.1.tar.gz" + sha256 "3020ed4f8c846849299370fbe98ff4157b0ccc1accec105e07cfa9ae4bb55064" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "ssh-mitm", + shell_parameter_format: :arg) + end + + test do + # supress CryptographyDeprecationWarning warning, + # upstream bug report https://github.com/ssh-mitm/ssh-mitm/issues/177 + ENV["PYTHONWARNINGS"] = "ignore" + + require "pty" + port = free_port + + stdout, _stdin, _pid = PTY.spawn("#{bin}/ssh-mitm server --listen-port #{port}") + assert_match "SSH-MITM - ssh audits made simple", stdout.readline + end +end diff --git a/Formula/s/ssh-vault.rb b/Formula/s/ssh-vault.rb new file mode 100644 index 0000000000000..40736c8f05064 --- /dev/null +++ b/Formula/s/ssh-vault.rb @@ -0,0 +1,53 @@ +class SshVault < Formula + desc "Encrypt/decrypt using SSH keys" + homepage "https://ssh-vault.com/" + url "https://github.com/ssh-vault/ssh-vault/archive/refs/tags/1.1.3.tar.gz" + sha256 "84ddf474cac5e0befc7bd9766352a5e24b817160eee29fcd99e5b54ec270ead3" + license "BSD-3-Clause" + head "https://github.com/ssh-vault/ssh-vault.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6e01e4aae13328801ace2354ca4ed1eef9a08bdad919d2fd37d549808e335d21" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c74326e7945b8357416f4a029603d904a218a74dd5e3718d3b594c2a372726c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "701002f736ae175471d99f1f4db419f3f01603059eea61c06f13cec19b9b1b3c" + sha256 cellar: :any_skip_relocation, sonoma: "1696b64659d268f72187da4712ee1ec3264805589eec9ee05770f58f65e43f84" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8607490c051e2dfa98037e6384c29da2be820593215f729636e2fa6bf66a9b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed8d674a160aa518bd6ccaf0a002a6cac710fa16079547674f8c5f293655c0ae" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + require "utils/linkage" + + test_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINixf2m2nj8TDeazbWuemUY8ZHNg7znA7hVPN8TJLr2W" + (testpath/"public_key").write test_key + cmd = "#{bin}/ssh-vault f -k #{testpath}/public_key" + assert_match "SHA256:hgIL5fEHz5zuOWY1CDlUuotdaUl4MvYG7vAgE4q4TzM", shell_output(cmd) + + if OS.linux? + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"ssh-vault", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end + end +end diff --git a/Formula/s/ssh3.rb b/Formula/s/ssh3.rb new file mode 100644 index 0000000000000..5678f1f3b18ee --- /dev/null +++ b/Formula/s/ssh3.rb @@ -0,0 +1,41 @@ +class Ssh3 < Formula + desc "Faster and richer secure shell using HTTP/3" + homepage "https://github.com/francoismichel/ssh3" + url "https://github.com/francoismichel/ssh3/archive/refs/tags/v0.1.7.tar.gz" + sha256 "23a88d0d7f54f80d752c22ee5f879fa1daf8c320ece364287209c58b3e98b6b5" + license "Apache-2.0" + head "https://github.com/francoismichel/ssh3.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f4c9c05fd2c4cbaa2a0d9bfafbc7e0a8b7b2bd4e40cca873bf8d6154d1502520" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f4b007d021b93cfb0c17d853b9ad0f8e8d9112402a7acbbb466f90517e20a12" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1738b1f0a7e8d6b101de0c28c854a885cff32e44a3cf1296fcdb3a411950879" + sha256 cellar: :any_skip_relocation, arm64_ventura: "356b85de8658e16ee74a1c86abd3be1491c61b09cb4634ae39fd49c9ec008d76" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9cba01524ab567c3e2c65463a10e87841b917ce6bb16a90256235453890bebbc" + sha256 cellar: :any_skip_relocation, sonoma: "b59edc9f47796dcbf9009dd3e862e5558e21cfe78b8260cb0a6e5d519632e865" + sha256 cellar: :any_skip_relocation, ventura: "fd05c0f9fc69ee952285dbdd8becacfc88fc69fb06aeb705035906fc166dad5e" + sha256 cellar: :any_skip_relocation, monterey: "994b1e63734368f14718507f653b797d99cc472c22482f8cb68a86165ffeab21" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5d55521952438ac8b31391476252c88f70bb6d59e3d978c86c2287a9bf46825" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89a55c20f0e83d74d05032b6e832bcd761d6377a226183e99d4102c1ad66935a" + end + + depends_on "go" => :build + uses_from_macos "libxcrypt" + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:, output: bin/"ssh3"), "./cmd/ssh3" + system "go", "build", *std_go_args(ldflags:, output: bin/"ssh3-server"), "./cmd/ssh3-server" + end + + test do + system bin/"ssh3-server", + "-generate-selfsigned-cert", + "-key", "test.key", + "-cert", "test.pem" + assert_path_exists testpath/"test.key" + assert_path_exists testpath/"test.pem" + end +end diff --git a/Formula/s/sshfs.rb b/Formula/s/sshfs.rb new file mode 100644 index 0000000000000..a2386767fe9b5 --- /dev/null +++ b/Formula/s/sshfs.rb @@ -0,0 +1,32 @@ +class Sshfs < Formula + desc "File system client based on SSH File Transfer Protocol" + homepage "https://github.com/libfuse/sshfs" + url "https://github.com/libfuse/sshfs/archive/refs/tags/sshfs-3.7.3.tar.gz" + sha256 "52a1a1e017859dfe72a550e6fef8ad4f8703ce312ae165f74b579fd7344e3a26" + license any_of: ["LGPL-2.1-only", "GPL-2.0-only"] + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_linux: "bbd7c81450476893e5574f06a4d3fa7975156b71d5dbf1ab28ccd3f103e1dfef" + sha256 x86_64_linux: "07adb364aaf4520dca920a1b0c2ba1af740e222e6026766aaec88ee9715812df" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"sshfs", "--version" + end +end diff --git a/Formula/s/sshguard.rb b/Formula/s/sshguard.rb new file mode 100644 index 0000000000000..f6a8cd3ca5abc --- /dev/null +++ b/Formula/s/sshguard.rb @@ -0,0 +1,75 @@ +class Sshguard < Formula + desc "Protect from brute force attacks against SSH" + homepage "https://www.sshguard.net/" + url "https://downloads.sourceforge.net/project/sshguard/sshguard/2.5.1/sshguard-2.5.1.tar.gz" + sha256 "997a1e0ec2b2165b4757c42f8948162eb534183946af52efc406885d97cb89fc" + license "ISC" + version_scheme 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e9518ae9f10154dcc84c9f1348b436a49ebb0b59d07982c468d0edad7cc38cdd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0f56a4e44504c78bf201cbb62b0d01d1ab2fcf1149e6dcc6e7562fb41c0ac99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "11ef33ea3f5e54e448b493db07993839407bd6e62fd50ed3b7feaae74f0419f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d3904d7dfa3b416126cd6f3088fd21eea79ac94af8cf5c6c787af6a27f8ba1e" + sha256 cellar: :any_skip_relocation, sonoma: "8c22c01d6e11c18443e9d3a12b5e858f5468c8da4f0aba9f716b054267a631de" + sha256 cellar: :any_skip_relocation, ventura: "8c7e0ca50223efc082c428aad1e0d62fda73f55d9cf280f7255f7228093917a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "28355a7f475cfaa5092312e781333f17718098181707052e90fc97f2dea8deff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22338d5f5ba21e11cbccca5dc0e2bc860d39d5f7822c5e1e3e43835e722456a2" + end + + head do + url "https://bitbucket.org/sshguard/sshguard.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docutils" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", "--sysconfdir=#{etc}", *std_configure_args + system "make", "install" + inreplace man8/"sshguard.8", "%PREFIX%/etc/", "#{etc}/" + cp "examples/sshguard.conf.sample", "examples/sshguard.conf" + inreplace "examples/sshguard.conf" do |s| + s.gsub!(/^#BACKEND=.*$/, "BACKEND=\"#{opt_libexec}/sshg-fw-pf\"") + if OS.mac? + s.gsub! %r{^#LOGREADER="/usr/bin/log}, "LOGREADER=\"/usr/bin/log" + else + s.gsub!(/^#FILES.*$/, "FILES=/var/log/system.log") + end + end + etc.install "examples/sshguard.conf" + end + + def caveats + <<~EOS + Add the following lines to /etc/pf.conf to block entries in the sshguard + table (replace $ext_if with your WAN interface): + + table persist + block in quick on $ext_if proto tcp from to any port 22 label "ssh bruteforce" + + Then run sudo pfctl -f /etc/pf.conf to reload the rules. + EOS + end + + service do + run [opt_sbin/"sshguard"] + keep_alive true + require_root true + end + + test do + require "pty" + PTY.spawn(sbin/"sshguard", "-v") do |r, _w, pid| + assert_equal "SSHGuard #{version}", r.read.strip + rescue Errno::EIO + nil + ensure + Process.wait pid + end + end +end diff --git a/Formula/s/sshpass.rb b/Formula/s/sshpass.rb new file mode 100644 index 0000000000000..39194b02072d3 --- /dev/null +++ b/Formula/s/sshpass.rb @@ -0,0 +1,42 @@ +class Sshpass < Formula + desc "Non-interactive SSH password auth" + homepage "https://sourceforge.net/projects/sshpass/" + url "https://master.dl.sourceforge.net/project/sshpass/sshpass/1.10/sshpass-1.10.tar.gz" + sha256 "ad1106c203cbb56185ca3bad8c6ccafca3b4064696194da879f81c8d7bdfeeda" + license "GPL-2.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "963f3ed3cfe2211b809ffa9a0275c2672e375a8ffc06c1df7acf7b69141815d1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "38020f688c751708ec42752d847ffb0dcaa9987a9cb362f7b20adc80a2c60b9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5971bfb9484ec0c541e8a49f444e9ab6dda42375deb472607502dd6cef5e8589" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68bdbd395f0468e15c2de3fafa5ce0ecf70b8411e8ea8f770615e7a2e9eea661" + sha256 cellar: :any_skip_relocation, arm64_monterey: "16d33a316e38f7f4005352ea7e3a19fab9e1d29bc1da3cdb645ee490082646a9" + sha256 cellar: :any_skip_relocation, sonoma: "aaae8efa23cf70f1149c669245ed78a75a0228a65bcc5457176ee6d232b0eac7" + sha256 cellar: :any_skip_relocation, ventura: "5f2c50426dc465a5dd28bc1901b3b4cf0b2c20d3e32c2c44870a891c165a23f4" + sha256 cellar: :any_skip_relocation, monterey: "c291394d903ecea28d08974c70f8692349f0a08295d09f06750911cf8d244d40" + sha256 cellar: :any_skip_relocation, arm64_linux: "053be70fcc130a45fd5ac4d131ca5bab40ee4a3d543ffab73ed8f455defd486c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29700081d945fb21d977430b0fabefb7e38a53da955ffb2a9b1d28e14203c877" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + Sshpass is a tool for non-interactively performing password authentication + with SSH's so called "interactive keyboard password authentication". + Most users should use SSH's more secure public key authentication instead. + + See `man sshpass` for more information. + EOS + end + + test do + output = shell_output("#{bin}/sshpass -P password ssh foo@bar ls 2>&1", 255) + assert_match(/ssh: Could not resolve hostname bar/, output) + end +end diff --git a/Formula/s/sshportal.rb b/Formula/s/sshportal.rb new file mode 100644 index 0000000000000..91f63c7d13bfb --- /dev/null +++ b/Formula/s/sshportal.rb @@ -0,0 +1,42 @@ +class Sshportal < Formula + desc "SSH & Telnet bastion server" + homepage "https://v1.manfred.life/sshportal/" + url "https://github.com/moul/sshportal/archive/refs/tags/v1.19.5.tar.gz" + sha256 "713be8542c93d91811f9643a8a2954ebc15130099e300fedb5ea4785b5337b52" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "abcd2ec2450e2535d5cb8536a5098fc61acdcc34b75c02ce84be5ea958689bfb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e41e72b749adc2be38fd48aa7bc7414b1e06cefe22e2ee83cd1e62108403d583" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d2011f8a00406373f0f08fe0d6ae9bc24319328644de51f42cb67047bf26005" + sha256 cellar: :any_skip_relocation, arm64_ventura: "924cfb73822486729a932a912d17d4fe202dbe081c8cbc552634c16e9586bb20" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cf5a4040d0111c3ad348506ef5e454cf106626950e024fd270065bb13e56f96c" + sha256 cellar: :any_skip_relocation, sonoma: "d4a1076a63578d51bb79f4d6f7c35432771c479d6baf00d2d96556436da6dfd8" + sha256 cellar: :any_skip_relocation, ventura: "67da5adbff8a32e081440bb5f2ec8992448dcf7839faa2c8ea236ef596f00f17" + sha256 cellar: :any_skip_relocation, monterey: "83612694df61dc4caee75ad516e29c65a1ad024a6008b21188e34bac4d98d985" + sha256 cellar: :any_skip_relocation, arm64_linux: "dcaa3b282c7d701cc33799bb3d7c754b545d1278367a08421e366e8e330ba374" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5184e0795bf5e6e3c1d785919a77d4473c9edbb12bc1e3fc4714c48887b2d178" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.GitSha=#{tap.user} + -X main.GitTag=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/sshportal --version") + + require "pty" + stdout, _stdin, _pid = PTY.spawn("#{bin}/sshportal server 2>&1") + sleep 2 + assert_match "info: system migrated", stdout.readline + end +end diff --git a/Formula/s/sshs.rb b/Formula/s/sshs.rb new file mode 100644 index 0000000000000..92c85854cae07 --- /dev/null +++ b/Formula/s/sshs.rb @@ -0,0 +1,58 @@ +class Sshs < Formula + desc "Graphical command-line client for SSH" + homepage "https://github.com/quantumsheep/sshs" + url "https://github.com/quantumsheep/sshs/archive/refs/tags/4.7.2.tar.gz" + sha256 "cb14fd50599bfb8de3f04b00cffb8eac9207f67e0ebbdd9380c311d141882f3b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2443c66fec7f7bfb754004d9a1770583c4ecd3788e267733a5f1d179aef82fc6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c8691620baa73fad3c9d41b66bb555b49018b5a4026f78b8ebfc24b726b3a8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "438e736bbae8e0aeeac0f5b1e9833fe59601e8f94aad84093a2bf6ad7b4f3e8d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dee907cd51f13ea86e5ff1905ab59f896f6896a06fe8ce5da239719638bc0061" + sha256 cellar: :any_skip_relocation, sonoma: "f1fa7aba391712fb5797c09cb9f77e41662e722402754aad4acde490dc0d2429" + sha256 cellar: :any_skip_relocation, ventura: "7e8fa97a5a345fecb049ee6b602009dfdd7a85102e80ab31691422d82fe83d59" + sha256 cellar: :any_skip_relocation, arm64_linux: "78da6be289b347c12f3c4d25788707e582fcb499be6a9e548d54add0c0254a75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4fdb3557d5009b2c521a74fc93c456b1bc3b2772da8002fb072cfbd445d14be" + end + + depends_on "rust" => :build + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal "sshs #{version}", shell_output("#{bin}/sshs --version").strip + + (testpath/".ssh/config").write <<~EOS + Host "Test" + HostName example.com + User root + Port 22 + EOS + + require "pty" + require "io/console" + + ENV["TERM"] = "xterm" + + PTY.spawn(bin/"sshs") do |r, w, _pid| + r.winsize = [80, 40] + sleep 1 + + # Search for Test host + w.write "Test" + sleep 1 + + # Quit + w.write "\003" + sleep 1 + + begin + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + end +end diff --git a/Formula/s/sshtrix.rb b/Formula/s/sshtrix.rb new file mode 100644 index 0000000000000..952978de09acd --- /dev/null +++ b/Formula/s/sshtrix.rb @@ -0,0 +1,43 @@ +class Sshtrix < Formula + desc "SSH login cracker" + homepage "https://nullsecurity.net/tools/cracker.html" + url "https://github.com/nullsecuritynet/tools/raw/main/cracker/sshtrix/release/sshtrix-0.0.3.tar.gz" + sha256 "30d1d69c1cac92836e74b8f7d0dc9d839665b4994201306c72e9929bee32e2e0" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?sshtrix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2bbdb14a7d6048a400de9bdc3a39ca12d50c462cc524158305ad93fc9bcd2192" + sha256 cellar: :any, arm64_sequoia: "a605f08172c039a927c317f64789c3168e610ed42ba321974e587db76906d546" + sha256 cellar: :any, arm64_sonoma: "6a48bc01574c09df7ade28b2cd6da48ab5df9966e670cdce99061a5231a832a8" + sha256 cellar: :any, arm64_ventura: "edd4114cab1117d380eb8614882bfd85fb00dd2c6a7b9ae2106a69774070147d" + sha256 cellar: :any, arm64_monterey: "4ba3dc97f884fc7b76408c2f1686dfe6700dd7ccd742fb0dc7212aa8248a557b" + sha256 cellar: :any, arm64_big_sur: "bb7eefcc513933225daa50cac41e6216d890910f5bec5f0003c20e9205082608" + sha256 cellar: :any, sonoma: "6dab7f1e1122938f363c4f707acdd06bbc030e15ebd6c46fbaebd5beb1ae52c6" + sha256 cellar: :any, ventura: "aa50c681c419c3d327a58150f23b165e153a02a91a298a4439d0569313b99837" + sha256 cellar: :any, monterey: "e7ec4cd1d49778f4b708093a7e7b44879cd7b63426f7f917d4445400712e44f6" + sha256 cellar: :any, big_sur: "b3962b5211858eb4f6e1478665bfbb578c1f9d1c393237b841f9261aab4cdbf9" + sha256 cellar: :any, catalina: "e115c5a6f3378af5a0ab4297673bb7b659dd20054ab91d818b083ce13951e7da" + sha256 cellar: :any_skip_relocation, arm64_linux: "c4f3ba3dfdc9ed9b9b5d0453cb4110923890b27d038fa9c906f992a9d2bb8c5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dfdb5cd8d621a41c636565b8e775d48e418feaf2f5a07dc773902d41cd13dd5" + end + + depends_on "libssh" + + def install + bin.mkpath + system "make", "sshtrix", "CC=#{ENV.cc}" + system "make", "DISTDIR=#{prefix}", "install" + end + + test do + system bin/"sshtrix", "-V" + system bin/"sshtrix", "-O" + end +end diff --git a/Formula/s/sshuttle.rb b/Formula/s/sshuttle.rb new file mode 100644 index 0000000000000..f71869f9bdaa3 --- /dev/null +++ b/Formula/s/sshuttle.rb @@ -0,0 +1,28 @@ +class Sshuttle < Formula + include Language::Python::Virtualenv + + desc "Proxy server that works as a poor man's VPN" + homepage "https://github.com/sshuttle/sshuttle" + url "https://files.pythonhosted.org/packages/f3/fd/18f958bb11d6ae59c8a1388bf03152499270eb9e2ac5ed544b551a693f4f/sshuttle-1.3.2.tar.gz" + sha256 "eeb2eee300a7de16117a86bbb9adb7b0647158edccfb8076f260e0535a439448" + license "LGPL-2.1-or-later" + head "https://github.com/sshuttle/sshuttle.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d2e5883c37f914d2101e5e1bca23c33181d1950c8ac727c520f17b3e059b61f7" + end + + depends_on "python@3.14" + + def install + # Building the docs requires installing + # markdown & BeautifulSoup Python modules + # so we don't. + virtualenv_install_with_resources + end + + test do + system bin/"sshuttle", "-h" + end +end diff --git a/Formula/s/sshx.rb b/Formula/s/sshx.rb new file mode 100644 index 0000000000000..001bd27007bf5 --- /dev/null +++ b/Formula/s/sshx.rb @@ -0,0 +1,38 @@ +class Sshx < Formula + desc "Fast, collaborative live terminal sharing over the web" + homepage "https://sshx.io" + url "https://github.com/ekzhang/sshx/archive/refs/tags/v0.4.1.tar.gz" + sha256 "ab6de41546b849726faa3b964466c1f8bb558bd27ee2452a9758405ff013108f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9d50ad7a068ac3520358e2219172c137bddd2b1c6b415d7dff20c21a10896d5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ebd4783508a0db2af33c4d72a8b31d340f822c9d2624061301545f312e05075d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e3598a6c4352b930499296f07e1bae871eed59cd974a24e31301706c2f6c70ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b6e4d71103322becc0361d2940862a5f7289d8677076aa230ceb77c12c9fd3e" + sha256 cellar: :any_skip_relocation, sonoma: "acb77c27444b26c774e81104783ae34f10773a454f43116ae97d368ddf26fc5a" + sha256 cellar: :any_skip_relocation, ventura: "a42df234bc853d19f5c67d6b980fa9c6947063fa37e64471d5be0f194444ab21" + sha256 cellar: :any_skip_relocation, arm64_linux: "9055d91e23321fa85ab586a83204ad383caaeec4b1af12bf13bd5b901fc03461" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71d9f3653dbfd7c5b4699821fa328d4681686bea5a21a6dea4f832f4efa45333" + end + + depends_on "protobuf" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/sshx") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sshx --version") + + begin + process = IO.popen "#{bin}/sshx --quiet" + sleep 1 + Process.kill "TERM", process.pid + assert_match "https://sshx.io/s/", process.read + ensure + Process.wait process.pid + end + end +end diff --git a/Formula/s/ssldump.rb b/Formula/s/ssldump.rb new file mode 100644 index 0000000000000..50d560c467274 --- /dev/null +++ b/Formula/s/ssldump.rb @@ -0,0 +1,34 @@ +class Ssldump < Formula + desc "SSLv3/TLS network protocol analyzer" + homepage "https://adulau.github.io/ssldump/" + url "https://github.com/adulau/ssldump/archive/refs/tags/v1.9.tar.gz" + sha256 "c81ce58d79b6e6edb8d89822a85471ef51cfa7d63ad812df6f470b5d14ff6e48" + license "BSD-4-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d482537a888c36ff5f8a17debd299219daf35f1495717fb343b78b76ff8cabd6" + sha256 cellar: :any, arm64_sequoia: "4108e474738b3c274d3124a2325e910109556d45568f6f3e299882d9a7b3697c" + sha256 cellar: :any, arm64_sonoma: "bef8ddb0f055225bd2f77fc6ad5270c52b7db46f9797a3d5e23b9c9872bd0791" + sha256 cellar: :any, arm64_ventura: "b0c5a32df2ef8e072f50f5302ef2b1813de8d0b4fcd13660847b193ba1449260" + sha256 cellar: :any, sonoma: "d0e771ebfc5cac4998d58d7b84a188fb94e26ccdae77ecb8625fc0a9b5bfdf09" + sha256 cellar: :any, ventura: "9b11e1e942fddc5ff4d2189a69e9acc4bef77fa5ea0a7e6bce789804f9512c6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "c413c7e9e7272a34bc3086c37c98b1ac30b291486cdf025cf0b5ed288d9c749e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a258e929e9b40617be052eb2026e693d39ec47ad006c231e2e542668ffe322d" + end + + depends_on "cmake" => :build + depends_on "json-c" + depends_on "libnet" + depends_on "libpcap" + depends_on "openssl@3" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"ssldump", "-v" + end +end diff --git a/Formula/s/sslh.rb b/Formula/s/sslh.rb new file mode 100644 index 0000000000000..64ae3a5fd9334 --- /dev/null +++ b/Formula/s/sslh.rb @@ -0,0 +1,49 @@ +class Sslh < Formula + desc "Forward connections based on first data packet sent by client" + homepage "https://www.rutschle.net/tech/sslh.shtml" + url "https://www.rutschle.net/tech/sslh/sslh-v2.3.0.tar.gz" + sha256 "09e9b572ca1e7fe2ccfb0de2bcfbc316638a8d82b86fedd253ddf81392e8fd38" + license all_of: ["GPL-2.0-or-later", "BSD-2-Clause"] + head "https://github.com/yrutschle/sslh.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7df8cb7c01a4de44f8ee62c9d092b3e3c3835a3b810b8ed717ba8d68a2882783" + sha256 cellar: :any, arm64_sequoia: "31f58a5a03884b485c70d3a4bdf8c4fe9dd1f8ca0cebe84c9450607cfc7b2359" + sha256 cellar: :any, arm64_sonoma: "4b88089a1a7b6f21ec8b414696095c5d292e2e8b87e57dfbc9f97f1c934aa0a4" + sha256 cellar: :any, arm64_ventura: "cef60eec5b2e23041a5bb9fbcf9c547939f961ca58d35c26e3d4efbd4655b67b" + sha256 cellar: :any, sonoma: "8139dd460e96d6ea0debe37bcfe1f705919f8af3b33b117f6b4aed0f7254444c" + sha256 cellar: :any, ventura: "b0245947ad24d37ca320e6a78c994762f40d3e24a9c7f9a3fc0ff84a4cdaa4a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "580ee6f15217675399f09811c3d88aedb764707e96d1b2f7ae6d14eaa5cb9b5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "329b63887f6a1fcd2c9f35bdbde9e3e4c77dcc38d57d6e0b3d916c47da400070" + end + + depends_on "libconfig" + depends_on "libev" + depends_on "pcre2" + + def install + system "./configure", *std_configure_args + system "make", "install", "PREFIX=#{prefix}" + end + + test do + listen_port = free_port + target_port = free_port + pid = spawn sbin/"sslh", "--http=localhost:#{target_port}", "--listen=localhost:#{listen_port}", "--foreground" + + fork do + TCPServer.open(target_port) do |server| + session = server.accept + session.write "HTTP/1.1 200 OK\r\n\r\nHello world!" + session.close + end + end + + sleep 1 + sleep 5 if OS.mac? && Hardware::CPU.intel? + assert_equal "Hello world!", shell_output("curl -s http://localhost:#{listen_port}") + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/s/ssllabs-scan.rb b/Formula/s/ssllabs-scan.rb new file mode 100644 index 0000000000000..b8d2832ab2f15 --- /dev/null +++ b/Formula/s/ssllabs-scan.rb @@ -0,0 +1,46 @@ +class SsllabsScan < Formula + desc "This tool is a command-line client for the SSL Labs APIs" + homepage "https://www.ssllabs.com/projects/ssllabs-apis/" + url "https://github.com/ssllabs/ssllabs-scan/archive/refs/tags/v1.5.0.tar.gz" + sha256 "51c52e958d5da739910e9271a3abf4902892b91acb840ea74f5c052a71e3a008" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0f8a61fd15b012c3792bdbcdc8229833e8d9d4f9e8b009e3f88d7e8a477ac111" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d639a0a8a695a23b9554d15893132fac16c35675d8e84651696f9b2f1a7ab1a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bdd94308ce1a118aefc4cc9d6e9c4a349d5b85c256747732dbf1d1af91930428" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d77c5c9f38fe3c137fd3b3da69c56a0b5a1015f94eb5526a6b4a685d72fb4c4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "21c59e50196234b6cabed14cd45c4e905dd8bf38f77491431c2da7427c3ede5e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "445a6d45341a1e6bf831f04eb00e87ca5e39df27685af0da5504e64e3fbb1efb" + sha256 cellar: :any_skip_relocation, sonoma: "1448551689011cb673df66494349bc792bd5654596bd83e8ff2938912e60a157" + sha256 cellar: :any_skip_relocation, ventura: "dfda1df2744e990f78acec1d005f5c214b569c9a2fdcfcb223e515c5c1954858" + sha256 cellar: :any_skip_relocation, monterey: "9cd0b9e4f6980fb49897f09adb167a5a7be7f7d4405f261829b713cb262e713a" + sha256 cellar: :any_skip_relocation, big_sur: "bedc2ae76ea62f469af8ca941f894016b053edd0c598e4845bcbe95e73c344a3" + sha256 cellar: :any_skip_relocation, catalina: "01c7e2503e8793f79149a3115dffff286ab0db876ccbfe6d8bb11ed54f27ba38" + sha256 cellar: :any_skip_relocation, arm64_linux: "edd29f50b8ff77077f310d961a60a6e58cd157e80925e58f586a020f90a56e67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9298cfa3c9eb7b7effb0f924f9998e63406d3bfacd4b4df9785a0371138699e2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "ssllabs-scan-v3.go" + end + + def caveats + <<~EOS + By installing this package you agree to the Terms and Conditions defined by Qualys. + You can find the terms and conditions at this link: + https://www.ssllabs.com/about/terms.html + + If you do not agree with those you should uninstall the formula. + EOS + end + + test do + system bin/"ssllabs-scan", "-grade", "-quiet", "-usecache", "ssllabs.com" + end +end diff --git a/Formula/s/sslmate.rb b/Formula/s/sslmate.rb new file mode 100644 index 0000000000000..99ea9345146e4 --- /dev/null +++ b/Formula/s/sslmate.rb @@ -0,0 +1,67 @@ +class Sslmate < Formula + desc "Buy SSL certs from the command-line" + homepage "https://sslmate.com" + url "https://packages.sslmate.com/other/sslmate-1.9.1.tar.gz" + sha256 "179b331a7d5c6f0ed1de51cca1c33b6acd514bfb9a06a282b2f3b103ead70ce7" + license "MIT" + revision 2 + + livecheck do + url "https://packages.sslmate.com/other/" + regex(/href=.*?sslmate[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0a1b305211c239b3c0476b01d55bd397da45a59013ab35a1b939b1e7c43c0b32" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "565aa3ae6e99d734fa430a664c3d08b6ff2301127da6b4f408009fd96a6fa384" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "565aa3ae6e99d734fa430a664c3d08b6ff2301127da6b4f408009fd96a6fa384" + sha256 cellar: :any_skip_relocation, arm64_ventura: "565aa3ae6e99d734fa430a664c3d08b6ff2301127da6b4f408009fd96a6fa384" + sha256 cellar: :any_skip_relocation, sonoma: "351e49ea1faf2c054b781097608e26a6e13e7af5259be2471993fa69d91102a2" + sha256 cellar: :any_skip_relocation, ventura: "351e49ea1faf2c054b781097608e26a6e13e7af5259be2471993fa69d91102a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "766551303f82f9d0d67eb302c7e9d3f40cc72d5b3a3d6ab242c61e0f60688277" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb4a80e5c90b0d869a6c6734e7c768ae81ec3112890c72034cd74071cc08b20a" + end + + uses_from_macos "perl" + + on_linux do + resource "URI::Escape" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.21.tar.gz" + sha256 "96265860cd61bde16e8415dcfbf108056de162caa0ac37f81eb695c9d2e0ab77" + end + + resource "Term::ReadKey" do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" + sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" + end + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"vendor/lib/perl5" + + resources.each do |r| + r.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}/vendor" + system "make" + system "make", "install" + end + end + end + + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) if OS.linux? + end + + test do + system bin/"sslmate", "req", "www.example.com" + # Make sure well-formed files were generated: + system "openssl", "rsa", "-in", "www.example.com.key", "-noout" + system "openssl", "req", "-in", "www.example.com.csr", "-noout" + # The version command tests the HTTP client: + system bin/"sslmate", "version" + end +end diff --git a/Formula/s/sslscan.rb b/Formula/s/sslscan.rb new file mode 100644 index 0000000000000..3793d83aaac18 --- /dev/null +++ b/Formula/s/sslscan.rb @@ -0,0 +1,31 @@ +class Sslscan < Formula + desc "Test SSL/TLS enabled services to discover supported cipher suites" + homepage "https://github.com/rbsec/sslscan" + url "https://github.com/rbsec/sslscan/archive/refs/tags/2.2.0.tar.gz" + sha256 "17c6fe4a7822e1949bc8975feea59fcf042c4a46d62d9f5acffe59afc466cc1c" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + head "https://github.com/rbsec/sslscan.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ee523de1bd57419001afc07024c90df09d97a0bef98507502154235034b498c2" + sha256 cellar: :any, arm64_sequoia: "2c68b958da874522adc15b570cb2c86c48361cf1412aacb9284dcfae698514ef" + sha256 cellar: :any, arm64_sonoma: "d82171a037a8b9cf84384979a08a06165e3c2955991095b57e7e53a904883467" + sha256 cellar: :any, arm64_ventura: "933d1d3963d0371010c608bb04e2da357b894f1761292d0f99b6433310f081b9" + sha256 cellar: :any, sonoma: "fe6af6b83a3a9d59f3b0e2bf0d8048af1f17604bfe01a712618d0b0dac07cf89" + sha256 cellar: :any, ventura: "27fabd4a39bc12b99ffdc9a29fae4ceb318c65f7219c9a503e090534bb49a92e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f28ac870735144a4ed0462f58b6cd9dd6701390493fb84500309448d87f47fee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f11cc61588af0da636c52e62a7e620d179e9e4f6779bc2f8da38fa1d0bec223" + end + + depends_on "openssl@3" + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/sslscan --version") + system bin/"sslscan", "google.com" + end +end diff --git a/Formula/s/sslsplit.rb b/Formula/s/sslsplit.rb new file mode 100644 index 0000000000000..0f4ee9b46dbf9 --- /dev/null +++ b/Formula/s/sslsplit.rb @@ -0,0 +1,58 @@ +class Sslsplit < Formula + desc "Man-in-the-middle attacks against SSL encrypted network connections" + homepage "https://www.roe.ch/SSLsplit" + license "BSD-2-Clause" + revision 2 + head "https://github.com/droe/sslsplit.git", branch: "develop" + + stable do + url "https://github.com/droe/sslsplit/archive/refs/tags/0.5.5.tar.gz" + sha256 "3a6b9caa3552c9139ea5c9841d4bf24d47764f14b1b04b7aae7fa2697641080b" + + # Patch to add `openssl@3` support + patch do + url "https://github.com/droe/sslsplit/commit/e17de8454a65d2b9ba432856971405dfcf1e7522.patch?full_index=1" + sha256 "88d558dcb21b1a23fe0b97f41251e7a321b11c37afd70dd07ac1a2d6a4788629" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "53f72ff40afcabe474f6e713fb6dac04bd7c87fcb1bf6ec91638645b7b62237e" + sha256 cellar: :any, arm64_sequoia: "5696431080e31e8d974ee9b41e2380690b0ce415deefeee3d71350d1d614706d" + sha256 cellar: :any, arm64_sonoma: "a78baab2eb804a8825d8e32e7b196ba855c020f95e82b2f3d97791f57ed6f6f8" + sha256 cellar: :any, arm64_ventura: "ad6eef71652050dd7586ca130538d612f71d6e0486a5c1b2b9eb98e5d0675e0c" + sha256 cellar: :any, arm64_monterey: "dba0a5403a541ff22b1e63577de39af59c2bdfa4ea43536664526efd4c10b479" + sha256 cellar: :any, arm64_big_sur: "9a6bc8259feb162971310ab7cbb802a6d792c9a13684d756c74f2e4c12f91527" + sha256 cellar: :any, sonoma: "5ecbf858d101619382213826f91a12b0585d6fcf8aa5be655cbc1e2952565436" + sha256 cellar: :any, ventura: "6b5c5082caa1b33a2ec68d438965ef1c405404b8808ca1fd9cda7397ac366165" + sha256 cellar: :any, monterey: "5f23f06acb83de8e1730a267b0e543e5a2b46af6ca0021922fa2e427c8eb3cdb" + sha256 cellar: :any, big_sur: "5609fe01116b26aeae02e483354ab84a4b9cb223095618640c32af5bd7341cca" + sha256 cellar: :any_skip_relocation, arm64_linux: "69b100b3bc4a6279bbef5d49cbf4f44a2085ef1ec03a5872f85a7606f5e667d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e62ef71e9d154f54fac451123377ad0c59d103b544386b4100ecb34da2ad2cc" + end + + depends_on "check" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libnet" + depends_on "libpcap" + depends_on "openssl@3" + + def install + ENV["LIBNET_BASE"] = Formula["libnet"].opt_prefix + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + Open3.popen2e(bin/"sslsplit", "-D", "http", "0.0.0.0", free_port.to_s, "www.roe.ch", "80") do |_, stdout, w| + sleep 5 + sleep 10 if OS.mac? && Hardware::CPU.intel? + assert_match "Starting main event loop", stdout.read_nonblock(4096) + ensure + Process.kill "TERM", w.pid + end + end +end diff --git a/Formula/s/ssocr.rb b/Formula/s/ssocr.rb new file mode 100644 index 0000000000000..9dcdefb1e6649 --- /dev/null +++ b/Formula/s/ssocr.rb @@ -0,0 +1,39 @@ +class Ssocr < Formula + desc "Seven Segment Optical Character Recognition" + homepage "https://www.unix-ag.uni-kl.de/~auerswal/ssocr/" + url "https://www.unix-ag.uni-kl.de/~auerswal/ssocr/ssocr-2.25.1.tar.bz2" + sha256 "e7588bb9ec56b568362ca0b68c216b0af37b42bb3f63602ee21628aa731b84be" + license "GPL-3.0-or-later" + head "https://github.com/auerswal/ssocr.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?ssocr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e0f42e28996a17b2e29066ce478aca92a85073aeb25ab328ff67df768c825dd4" + sha256 cellar: :any, arm64_sequoia: "1f276c84ac527ad48c93f5f7a9976d65b0a25e8a06f942966f9dde044d20a279" + sha256 cellar: :any, arm64_sonoma: "ab621788f03af63c93a917b233bc96ac1059cab8f64d5befb01bd58efd05b597" + sha256 cellar: :any, sonoma: "a839b147d3dfe88937947728b7bb457ae0eac4e43d1bbbafcbd90f7b3e43b6b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "c868a5ce5a5b44248c6c7868b504d0b0243ed1b9b39b4a0a4ba929bfe56f1aef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b91a1ea88a60fa5037e2533228a0c489fb40cf4ca1d55a67b4fd03bd8c7b580" + end + + depends_on "pkgconf" => :build + depends_on "imlib2" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + resource "homebrew-test-image" do + url "https://www.unix-ag.uni-kl.de/~auerswal/ssocr/six_digits.png" + sha256 "72b416cca7e98f97be56221e7d1a1129fc08d8ab15ec95884a5db6f00b2184f5" + end + + resource("homebrew-test-image").stage testpath + assert_equal "431432", shell_output("#{bin}/ssocr -T #{testpath}/six_digits.png").chomp + end +end diff --git a/Formula/s/ssss.rb b/Formula/s/ssss.rb new file mode 100644 index 0000000000000..51c676d9f71b5 --- /dev/null +++ b/Formula/s/ssss.rb @@ -0,0 +1,48 @@ +class Ssss < Formula + desc "Shamir's secret sharing scheme implementation" + homepage "http://point-at-infinity.org/ssss/" + url "http://point-at-infinity.org/ssss/ssss-0.5.tar.gz" + sha256 "5d165555105606b8b08383e697fc48cf849f51d775f1d9a74817f5709db0f995" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?ssss[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "55d52ba91f9417c0fac93458bad42528c79b31f96c718f8d0ffeb614196344a7" + sha256 cellar: :any, arm64_sequoia: "0baf04283135acc3f522af4d516f783c646cab07e6bc3ff9be9cd7c8f09d0059" + sha256 cellar: :any, arm64_sonoma: "56687b50265df26e2c4c08e7a3c397c3e39f66dd29c0c0bf1cfe4976c1eeac0d" + sha256 cellar: :any, arm64_ventura: "272b364205342419e458630610daf257d70f82c10308e87c5295cdaf047938b1" + sha256 cellar: :any, arm64_monterey: "c9ff1f49c619f70ff87833f7060f33543099cb520aa1f1ea15dd034dc0db53b3" + sha256 cellar: :any, arm64_big_sur: "c1656cbcd114f1e8269d54fa5b525ceababe178d0fddec508fdb568d747035f0" + sha256 cellar: :any, sonoma: "afb9b9b92d41a40b64177bff47515842936549fe3309e4798a68435df813f322" + sha256 cellar: :any, ventura: "dc86cac011a3eaf6195850aeda5241784c51f7298e95ceccc622f6d1e62b4654" + sha256 cellar: :any, monterey: "9dc2e5f7a756608b8d979bc325ab16a466aaa650b836231d1cea1c4d816b8ca5" + sha256 cellar: :any, big_sur: "5ff50aef8004346c9cf21eb9aecae18ce2b7d4032c7460284b6c1903dc244d6f" + sha256 cellar: :any, catalina: "ba1cd924e9aa97d91ff125c082ff9d1b2eb7ce3bea642edc1ae9c4f94340d19d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b17a59f64cafbf6650d62aa354f65ff5971353ac0aa105652be34b091dca140" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74cef70f4478596824e7ecdb1356b650c6d03e1bd4bcf8202822622c16faf6b2" + end + + depends_on "gmp" + depends_on "xmltoman" + + def install + inreplace "Makefile" do |s| + # Compile with -DNOMLOCK to avoid warning on every run on macOS. + s.gsub! "-W ", "-W -DNOMLOCK $(CFLAGS) $(LDFLAGS)" + end + + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "Makefile", "-lgmp -o ssss-split ssss.c", "ssss.c -lgmp -o ssss-split" + + system "make" + man1.install "ssss.1" + bin.install %w[ssss-combine ssss-split] + end +end diff --git a/Formula/s/sstp-client.rb b/Formula/s/sstp-client.rb new file mode 100644 index 0000000000000..ec05e9b4240cd --- /dev/null +++ b/Formula/s/sstp-client.rb @@ -0,0 +1,52 @@ +class SstpClient < Formula + desc "SSTP (Microsoft's Remote Access Solution for PPP over SSL) client" + homepage "https://gitlab.com/sstp-project/sstp-client" + url "https://gitlab.com/sstp-project/sstp-client/-/releases/1.0.20/downloads/dist-gzip/sstp-client-1.0.20.tar.gz" + sha256 "6c84b6cdcc21ebea6daeb8c5356dcdfd8681f4981a734f8485ed0b31fc30aadd" + license "GPL-2.0-or-later" + version_scheme 1 + head "https://gitlab.com/sstp-project/sstp-client.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "71109b298ce186a8e26fde8fc8b7ca10e0a4608452b3065cb43aded5d1927fcc" + sha256 arm64_sequoia: "ff9e147017fa32a2f65c2ec46fdca292e7e92f3bb7cd6bdfa5d8ef77b34acf82" + sha256 arm64_sonoma: "4c4f9aa5820641e408e0106b9db844be89615c289b52ca07c5e421b157a1a4c6" + sha256 arm64_ventura: "26446c059cd275fc49d4f4475757f2a700ecef734fef50e99d55e352f4c04c93" + sha256 arm64_monterey: "c6d91a90c2988a96b4be0ea9ce0120944471c0164ea8052fb45356710fbbf8bd" + sha256 sonoma: "184766c884ccf2bd80dd683a219ceb022038474b7a620e2c3ce496625c1302ed" + sha256 ventura: "d1cf3956def117437343e10197b14bcbc03fd6a2dc96278b5036f2153085dc09" + sha256 monterey: "015cfdcec2002f2c9ec54e06d070e86c28222f776ef651625f255ff5238e0a5c" + sha256 arm64_linux: "d6025e73684a9bc136b059d9339b385c0d57ea8f9e3dbb311b468b90c051878f" + sha256 x86_64_linux: "30078ed4805a4e3b52753c60ad87590d21a8a5289b31fde3d27be0116f179b2b" + end + + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "openssl@3" + + def install + system "./configure", "--disable-silent-rules", + "--disable-ppp-plugin", + "--with-runtime-dir=#{var}/run/sstpc", + *std_configure_args + system "make", "install" + + # Create a directory needed by sstpc for privilege separation + (var/"run/sstpc").mkpath + end + + def caveats + <<~EOS + sstpc reads PPP configuration options from /etc/ppp/options. If this file + does not exist yet, type the following command to create it: + + sudo touch /etc/ppp/options + EOS + end + + test do + system "#{sbin}/sstpc", "--version" + end +end diff --git a/Formula/s/st.rb b/Formula/s/st.rb new file mode 100644 index 0000000000000..f69498a81ff40 --- /dev/null +++ b/Formula/s/st.rb @@ -0,0 +1,46 @@ +class St < Formula + desc "Statistics from the command-line" + homepage "https://github.com/nferraz/st" + url "https://github.com/nferraz/st/archive/refs/tags/v1.1.4.tar.gz" + sha256 "c02a16f67e4c357690a5438319843149fd700c223128f9ffebecab2849c58bb8" + license "MIT" + revision 1 + head "https://github.com/nferraz/st.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "dea11b6d608a0978854f5f19a0d6941086f6b970c5919dd268a003c8ef4d2181" + end + + conflicts_with "schemathesis", because: "both install `st` binaries" + + def install + ENV.prepend_create_path "PERL5LIB", lib/"perl5/" + + args = %W[ + INSTALL_BASE=#{prefix} + INSTALLSITEMAN1DIR=#{man1} + INSTALLSITEMAN3DIR=#{man3} + MAN1EXT=1 + ] + system "perl", "Makefile.PL", *args + system "make", "install" + + bin.env_script_all_files libexec/"bin", PERL5LIB: ENV["PERL5LIB"] + + # Build an `:all` bottle + chmod 0755, [bin, lib/"perl5/App", share, share/"man", man1, man3] # permissions match + end + + test do + (testpath/"test.txt").write((1..100).map(&:to_s).join("\n")) + assert_equal "5050", pipe_output("#{bin}/st --sum test.txt").chomp + end +end diff --git a/Formula/s/stackql.rb b/Formula/s/stackql.rb new file mode 100644 index 0000000000000..106689a4a0283 --- /dev/null +++ b/Formula/s/stackql.rb @@ -0,0 +1,46 @@ +class Stackql < Formula + desc "SQL interface for arbitrary resources with full CRUD support" + homepage "https://stackql.io/" + url "https://github.com/stackql/stackql/archive/refs/tags/v0.9.250.tar.gz" + sha256 "06f0de42c6cc95fff1fdf0ead087528ee0d139c10afa6e655a9fda0917559bdb" + license "MIT" + head "https://github.com/stackql/stackql.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "efae8ee0fc3dc851e29fe45f0209a7963fa3c3f3154c352d9be82d50bfe3b69a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b8c6e29214c3f073922bc6f8b582537ec808ed47544c73142de958e7e6caa55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "226e99281710e1b4356b17ea3c03e2fcfb06b62147a3a1d1f0538c951af4608d" + sha256 cellar: :any_skip_relocation, sonoma: "1a0c6fac2b98aeb00c9480f1a74541fec69a9dce772aaa122712dd77f427c8b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2d72ecf0d12f5cea0bfd8fcf9ae945082b4c12e5e8303dff4c1a59e646ec0f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1abd46263690665bee87e695eb23abbeec08fd1eac453c81e231ed3cdeda533" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" + ldflags = %W[ + -s -w + -X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion=#{version.major} + -X github.com/stackql/stackql/internal/stackql/cmd.BuildMinorVersion=#{version.minor} + -X github.com/stackql/stackql/internal/stackql/cmd.BuildPatchVersion=#{version.patch} + -X github.com/stackql/stackql/internal/stackql/cmd.BuildCommitSHA=#{tap.user} + -X github.com/stackql/stackql/internal/stackql/cmd.BuildShortCommitSHA=#{tap.user} + -X github.com/stackql/stackql/internal/stackql/cmd.BuildDate=#{time.iso8601} + -X stackql/internal/stackql/planbuilder.PlanCacheEnabled=true + ] + tags = %w[json1 sqleanall] + + system "go", "build", *std_go_args(ldflags:, tags:), "./stackql" + end + + test do + assert_match "stackql v#{version}", shell_output("#{bin}/stackql --version") + assert_includes shell_output("#{bin}/stackql exec 'show providers;'"), "name" + end +end diff --git a/Formula/s/stanc3.rb b/Formula/s/stanc3.rb new file mode 100644 index 0000000000000..509f9de43a2d2 --- /dev/null +++ b/Formula/s/stanc3.rb @@ -0,0 +1,72 @@ +class Stanc3 < Formula + desc "Stan transpiler" + homepage "https://github.com/stan-dev/stanc3" + url "https://github.com/stan-dev/stanc3.git", + tag: "v2.37.0", + revision: "31d2a6e3a7a84e97a3bd8cabc205c76a063fb91f" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a506ef69a644c723648740b9cf97b7c9f4c816cbba534afff9b6537d9ba8c418" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b75f859506655cb2629cee53326a56d2adf8990f5465b4b043d10a67723059f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6429a0f13f93478838dc9524af1246a844e2e3922ead3c8b0fadd9abc66124d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "966e95130f8a0695eab22f16796d4383f5e5aafbc35811008c3c848acdb077a5" + sha256 cellar: :any_skip_relocation, sonoma: "8a4ee8620a6a19639f9e004d6e024464f8b95e86959d50c17165d027c1284f90" + sha256 cellar: :any_skip_relocation, ventura: "3b5e9cda6c9f7701747cca00dcc29c2f209b92c530e5f82ff0404e29481940f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "7762a898b7afcb8f32cdf7b3fdcc2c02d991765067ff0c2942711cb557e602d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb5ab07bb40e6941e98d579dfc196f1294f0ae3f55a45a092aed2182a40e0e0d" + end + + depends_on "ocaml@4" => :build # FIXME: pinned ppx_deriving.5.2.1 not compatible with OCaml >= 5.3 + depends_on "opam" => :build + + uses_from_macos "unzip" => :build + + # Workaround for error due to `-mpopcnt` on arm64 macOS with Xcode 16.3+. + # TODO: Remove once base >= 0.17.3 or if fix is backported to 0.14 and released + on_sequoia :or_newer do + on_arm do + resource "base" do + url "https://github.com/janestreet/base/archive/refs/tags/v0.16.4.tar.gz" + sha256 "200c053b69c04dd5cdc5bcb3ae27d098a88a311fb48c28d6382abe76e2a588f5" + + patch do + url "https://github.com/janestreet/base/commit/68f18ed6a5e94dda1ed423c3435d1515259dcc7d.patch?full_index=1" + sha256 "054fc30c7e748b2ad8ba8e2b8eead1309b8d7229821b57478cb604d5da5b69c6" + end + end + end + end + + def install + ENV["OPAMROOT"] = buildpath/".opam" + ENV["OPAMYES"] = "1" + ENV["OPAMVERBOSE"] = "1" + + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + # Workaround for https://github.com/janestreet/base/issues/164 + if OS.mac? && MacOS.version >= :sequoia + resource("base").stage do + system "opam", "install", ".", "--yes", "--no-depexts", "--working-dir" + end + end + system "bash", "-x", "scripts/install_build_deps.sh" + system "opam", "exec", "dune", "subst" + system "opam", "exec", "dune", "build", "@install" + + bin.install "_build/default/src/stanc/stanc.exe" => "stanc" + end + + test do + resource "homebrew-testfile" do + url "https://raw.githubusercontent.com/stan-dev/stanc3/2e833ac746a36cdde11b7041fe3a1771dec92ba6/test/integration/good/algebra_solver_good.stan" + sha256 "44e66f05cc7be4d0e0a942b3de03aed1a2c2abd93dbd5607542051d9d6ae2a0b" + end + testpath.install resource("homebrew-testfile") + + system bin/"stanc", "algebra_solver_good.stan" + assert_path_exists testpath/"algebra_solver_good.hpp" + + assert_match "stanc3 v#{version}", shell_output("#{bin}/stanc --version") + end +end diff --git a/Formula/s/standard.rb b/Formula/s/standard.rb new file mode 100644 index 0000000000000..e3f819486dbea --- /dev/null +++ b/Formula/s/standard.rb @@ -0,0 +1,35 @@ +class Standard < Formula + desc "JavaScript Style Guide, with linter & automatic code fixer" + homepage "https://standardjs.com/" + url "https://registry.npmjs.org/standard/-/standard-17.1.2.tgz" + sha256 "fb2aaf22460bb3e77e090c727c694a56dd9a9486eec30a0152290a5c6d83757c" + license "MIT" + head "https://github.com/standard/standard.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7a14e2bf791bc2e08a00dad45552c4fdac41dd10d576c034257475139e6e9e3f" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + (testpath/"foo.js").write <<~JS + console.log("hello there") + if (name != 'John') { } + JS + output = shell_output("#{bin}/standard foo.js 2>&1", 1) + assert_match "Strings must use singlequote. (quotes)", output + assert_match "Expected '!==' and instead saw '!='. (eqeqeq)", output + assert_match "Empty block statement. (no-empty)", output + + assert_match version.to_s, shell_output("#{bin}/standard --version") + end +end diff --git a/Formula/s/standardebooks.rb b/Formula/s/standardebooks.rb new file mode 100644 index 0000000000000..9578cc6a8e23c --- /dev/null +++ b/Formula/s/standardebooks.rb @@ -0,0 +1,328 @@ +class Standardebooks < Formula + include Language::Python::Virtualenv + + desc "Tools for producing ebook files" + homepage "https://github.com/standardebooks/tools" + url "https://github.com/standardebooks/tools/archive/refs/tags/2.10.0.tar.gz" + sha256 "817948c4d7c0d25db2c8a05c09449f9d6a39e75343ca31571430f2c3fba0a8e9" + license "GPL-3.0-or-later" + head "https://github.com/standardebooks/tools.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9a0c112f37e7c54184ad96ff914f5803783dd6647487bf0205b346f3704ecb0b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb177324157ca726312a2f6659a155dbe199611be83ac3f44edddd50c8e88a14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3cc49fd60f698ed080b59df31d0a67fb92df79e33df8120d431b758b5e1a0c08" + sha256 cellar: :any_skip_relocation, sonoma: "a4074fad261ff6ee5fddd0803ad3006465f2e91b016987de2109ec627026fd52" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a7b35ede28bc61e1767b1606b61eef53a9d3ac29df5b70243dc2d7ec2ab7201" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84e237acbb1cfae83b5efeffba83ae3713c06f979aaa04fcb2b5325d8079a501" + end + + depends_on "rust" => :build # for selenium + depends_on "certifi" => :no_linkage + depends_on "cffi" => :no_linkage + depends_on "openjdk" + depends_on "pillow" => :no_linkage + depends_on "py3cairo" => :no_linkage + depends_on "pycparser" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + pypi_packages exclude_packages: %w[certifi cffi pillow pycairo] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "cairocffi" do + url "https://files.pythonhosted.org/packages/70/c5/1a4dc131459e68a173cbdab5fad6b524f53f9c1ef7861b7698e998b837cc/cairocffi-1.7.1.tar.gz" + sha256 "2e48ee864884ec4a3a34bfa8c9ab9999f688286eb714a15a43ec9d068c36557b" + end + + resource "cairosvg" do + url "https://files.pythonhosted.org/packages/d5/e6/ec5900b724e3c44af7f6f51f719919137284e5da4aabe96508baec8a1b40/CairoSVG-2.7.1.tar.gz" + sha256 "432531d72347291b9a9ebfb6777026b607563fd8719c46ee742db0aef7271ba0" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/72/0a/c3ea9573b1dc2e151abfe88c7fe0c26d1892fe6ed02d0cdb30f0d57029d5/cssselect-1.3.0.tar.gz" + sha256 "57f8a99424cfab289a1b6a816a43075a4b00948c86b4dcf3ef4ee7e15f7ab0c7" + end + + resource "cssselect2" do + url "https://files.pythonhosted.org/packages/9f/86/fd7f58fc498b3166f3a7e8e0cddb6e620fe1da35b02248b1bd59e95dbaaa/cssselect2-0.8.0.tar.gz" + sha256 "7674ffb954a3b46162392aee2a3a0aedb2e14ecf99fcc28644900f4e6e3e9d3a" + end + + resource "cssutils" do + url "https://files.pythonhosted.org/packages/33/9f/329d26121fe165be44b1dfff21aa0dc348f04633931f1d20ed6cf448a236/cssutils-2.11.1.tar.gz" + sha256 "0563a76513b6af6eebbe788c3bf3d01c920e46b3f90c8416738c5cfc773ff8e2" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "ftfy" do + url "https://files.pythonhosted.org/packages/a5/d3/8650919bc3c7c6e90ee3fa7fd618bf373cbbe55dff043bd67353dbb20cd8/ftfy-6.3.1.tar.gz" + sha256 "9b3c3d90f84fb267fe64d375a07b7f8912d817cf86009ae134aa03e1819506ec" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/c0/89/37df0b71473153574a5cdef8f242de422a0f5d26d7a9e231e6f169b4ad14/gitpython-3.1.44.tar.gz" + sha256 "c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "importlib-resources" do + url "https://files.pythonhosted.org/packages/83/a4/ce09af12e1a91b5b77cefc893ef5054619553734c5b42f143d93ed581744/importlib_resources-1.0.2.tar.gz" + sha256 "d3279fd0f6f847cced9f7acc19bd3e5df54d34f93a2e7bb5f238f81545787078" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/80/61/d3dc048cd6c7be6fe45b80cedcbdd4326ba4d550375f266d9f4246d0f4bc/lxml-5.3.2.tar.gz" + sha256 "773947d0ed809ddad824b7b14467e1a481b8976e87278ac4a730c2f7c7fcddc1" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "natsort" do + url "https://files.pythonhosted.org/packages/e2/a9/a0c57aee75f77794adaf35322f8b6404cbd0f89ad45c87197a937764b7d0/natsort-8.4.0.tar.gz" + sha256 "45312c4a0e5507593da193dedd04abb1469253b601ecaf63445ad80f0a1ea581" + end + + resource "outcome" do + url "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz" + sha256 "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyphen" do + url "https://files.pythonhosted.org/packages/69/56/e4d7e1bd70d997713649c5ce530b2d15a5fc2245a74ca820fc2d51d89d4d/pyphen-0.17.2.tar.gz" + sha256 "f60647a9c9b30ec6c59910097af82bc5dd2d36576b918e44148d8b07ef3b4aa3" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "repro-zipfile" do + url "https://files.pythonhosted.org/packages/ed/86/a680b85796b667a060bc673294e8adc3201a28381b23a61702ac0f51f732/repro_zipfile-0.4.0.tar.gz" + sha256 "fde4cf1300e740f2fd1745708ba8f1366a70853a39af6266e1e04ae81c1231c1" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "roman" do + url "https://files.pythonhosted.org/packages/85/49/b01cf3c88006005613234cfc78b2e371adc3b55fe125641679bca46963f9/roman-5.0.tar.gz" + sha256 "cb35293c1c4046105fd899194f4f2985f78c955a8b05937f7ab93f3be1660697" + end + + resource "selenium" do + url "https://files.pythonhosted.org/packages/e0/bf/642cce8b5a9edad8e4880fdefbeb24f69bec2086b1121c63f883c412b797/selenium-4.31.0.tar.gz" + sha256 "441cffc436a2e6659fe3cfb012692435652efd38b0d368d16f661a5db47825f5" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/81/9c/42314ee079a3e9c24b27515f9fbc7a3c1d29992c33451779011c74488375/setuptools-78.1.1.tar.gz" + sha256 "fcc17fd9cd898242f6b4adfaca46137a9edef687f43e6f78469692a5e70d851d" + end + + resource "smartypants" do + url "https://files.pythonhosted.org/packages/6c/8f/a033f78196d9467b402d100ec40b95166d43fa2642693f23f771473d8195/smartypants-2.0.2.tar.gz" + sha256 "39d64ce1d7cc6964b698297bdf391bc12c3251b7f608e6e55d857cd7c5f800c6" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "tinycss2" do + url "https://files.pythonhosted.org/packages/7a/fd/7a5ee21fd08ff70d3d33a5781c255cbe779659bd03278feb98b19ee550f4/tinycss2-1.4.0.tar.gz" + sha256 "10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7" + end + + resource "titlecase" do + url "https://files.pythonhosted.org/packages/63/17/04d2d3e30e2bc5a3eefa1060b08e3fb628510440f938eaecabbe08976a26/titlecase-2.4.1.tar.gz" + sha256 "7d83a277ccbbda11a2944e78a63e5ccaf3d32f828c594312e4862f9a07f635f5" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/76/8f/c6e36dd11201e2a565977d8b13f0b027ba4593c1a80bed5185489178e257/trio-0.31.0.tar.gz" + sha256 "f71d551ccaa79d0cb73017a33ef3264fde8335728eb4c6391451fe5d253a9d5b" + end + + resource "trio-websocket" do + url "https://files.pythonhosted.org/packages/d1/3c/8b4358e81f2f2cfe71b66a267f023a91db20a817b9425dd964873796980a/trio_websocket-0.12.2.tar.gz" + sha256 "22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz" + sha256 "cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + def install + virtualenv_install_with_resources + + bash_completion.install "se/completions/bash/se" + fish_completion.install "se/completions/fish/se.fish" + zsh_completion.install "se/completions/zsh/_se" + end + + test do + system bin/"se", "extract-ebook", test_fixtures("test.epub") + extracted_index = testpath/"test.epub.extracted/index.html" + assert_match("0667c70e8ab1b6a6cfca6abd397ee2c6", extracted_index.read) + + system bin/"se", "create-draft", "--title", "Homebrew & the Haunted House", "--author", "Max Howell" + testbook = testpath/"max-howell_homebrew-the-haunted-house" + assert_path_exists(testbook) + + bodytext = testbook/"src/epub/text/body.xhtml" + bodytext.write <<~XML + + + + I + + + + +
    +

    I

    +

    We can assume that any 'instance' of a point can be construed--maybe--as a themeless "formula".

    +
    + + + XML + + # Test word-count subcommand + wc_out = shell_output("#{bin}/se -p word-count #{testbook}/src/epub/text").strip + assert_match(/\d+/, wc_out) + + # Test typogrify subcommand + system bin/"se", "typogrify", (testbook/"src/epub/text").to_s + content = bodytext.read + assert_includes content, "“" + assert_includes content, "”" + assert_includes content, "—" + refute_includes content, "construed--maybe--as" + + # Test hyphenate subcommand + system bin/"se", "hyphenate", (testbook/"src/epub/text").to_s + content = bodytext.read + assert_match(/\u00AD/, content) + + # Test build subcommand, which uses java + system bin/"se", "build", (testbook/"src").to_s + assert_path_exists("max-howell_homebrew-the-haunted-house.epub") + assert_path_exists("max-howell_homebrew-the-haunted-house_advanced.epub") + end +end diff --git a/Formula/s/standardese.rb b/Formula/s/standardese.rb new file mode 100644 index 0000000000000..28b44c037bb86 --- /dev/null +++ b/Formula/s/standardese.rb @@ -0,0 +1,121 @@ +class Standardese < Formula + desc "Next-gen documentation generator for C++" + homepage "https://standardese.github.io" + # TODO: use resource blocks for vendored deps + license "MIT" + revision 22 + head "https://github.com/standardese/standardese.git", branch: "master" + + # Remove stable block when patch is no longer needed. + stable do + url "https://github.com/standardese/standardese.git", + tag: "0.5.2", + revision: "0b23537e235690e01ba7f8362a22d45125e7b675" + + # Fix build with new GCC. + # https://github.com/standardese/standardese/pull/233 + patch do + url "https://github.com/standardese/standardese/commit/15e05be2301fe43d1e209b2f749c99a95c356e04.patch?full_index=1" + sha256 "e5f03ea321572dd52b9241c2a01838dfe7e6df7e363a8d19bfeac5861baf5d3f" + end + + # Fix build with `boost` 1.85.0. Remove in the next release. + # PR ref: https://github.com/standardese/standardese/pull/247 + patch do + url "https://github.com/standardese/standardese/commit/0593c8fbaee48ffac022e2ea95865d808cc149ce.patch?full_index=1" + sha256 "4b204256b97a4058b88c7b2350941d2c59a6c38aeb91e4112e1d267fdd092d03" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "af802f66466bcebe181168d4f4bc9f6fac04dc1a71092b81234875a47236b304" + sha256 arm64_sequoia: "7aac10f0c51eba02e38e87122b0adf550cd56e7092b7f226188b914c3e687967" + sha256 arm64_sonoma: "10cf6e4ea596448dac927b90a4fe4011d1541417c6d30f9720f74e1c8c706772" + sha256 arm64_ventura: "1a3a96186e91ca2bf4111324abebf42fcce98b306301f98f4e5a21386def1569" + sha256 sonoma: "931b39b7b6e03abeae83852591f05d85ef475037c72e5c76491eb1a2f8590319" + sha256 ventura: "3821d85d58e252bf2b9dd27bb4263b7d690eeed8756aa276f8ed7f715517daf2" + sha256 arm64_linux: "4dbe69e5a22029c55c323b40d44fd50056136b8ed5bcf2060b7d969a0f3089c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "740d8cecff73da5d7c6d482eaa669a30c55726ff9c7439b10de8c45363de9236" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "cmark-gfm" + depends_on "llvm" # must be Homebrew LLVM, not system, because of `llvm-config` + + # https://github.com/standardese/cppast/blob/main/external/external.cmake#L12 + resource "type_safe" do + url "https://github.com/foonathan/type_safe/archive/refs/tags/v0.2.4.tar.gz" + sha256 "a631d03c18c65726b3d1b7d41ac5806e9121367afe10dd2f408a2d75e144b734" + + # Backport fix for newer Clang + patch do + url "https://github.com/foonathan/type_safe/commit/cdf334cd8e5fcb5e21ab470decdfcbd190ef7347.patch?full_index=1" + sha256 "f9ab60828058f133c726f77ce8358714c6aa994c9cce29b703cf7a5fbdb2ae00" + end + end + + # Fix build with Boost 1.89.0, pr ref: https://github.com/standardese/standardese/pull/249 + patch do + url "https://github.com/standardese/standardese/commit/d0c2073f9f13d26abd1be872b809e089ed20c9f6.patch?full_index=1" + sha256 "506c3cd1d2654aee37e200c57b9095c9bbad09de1d7a27efc545ea7c092cd4f0" + end + + def install + (buildpath/"type_safe").install resource("type_safe") + + # Don't build shared libraries to avoid having to manually install and relocate + # libstandardese, libtiny-process-library, and libcppast. These libraries belong + # to no install targets and are not used elsewhere. + # Disable building test objects because they use an outdated vendored version of catch2. + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=OFF", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DCMARK_LIBRARY=#{Formula["cmark-gfm"].opt_lib/shared_library("libcmark-gfm")}", + "-DCMARK_INCLUDE_DIR=#{Formula["cmark-gfm"].opt_include}", + "-DFETCHCONTENT_SOURCE_DIR_TYPE_SAFE=#{buildpath}/type_safe", + "-DSTANDARDESE_BUILD_TEST=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + include.install "include/standardese" + (lib/"cmake/standardese").install "standardese-config.cmake" + end + + test do + (testpath/"test.hpp").write <<~CPP + #pragma once + + #include + using namespace std; + + /// \\brief A namespace. + /// + /// Namespaces are cool! + namespace test { + //! A class. + /// \\effects Lots! + class Test { + public: + int foo; //< Something to do with an index into [bar](<> "test::Test::bar"). + wstring bar; //< A [wide string](<> "std::wstring"). + + /// \\requires The parameter must be properly constructed. + explicit Test(const Test &) noexcept; + + ~Test() noexcept; + }; + + /// \\notes Some stuff at the end. + using Baz = Test; + }; + CPP + system bin/"standardese", "--compilation.standard", "c++17", + "--output.format", "xml", + testpath/"test.hpp" + assert_includes (testpath/"doc_test.xml").read, "" + end +end diff --git a/Formula/s/stanford-corenlp.rb b/Formula/s/stanford-corenlp.rb new file mode 100644 index 0000000000000..b72938ba99486 --- /dev/null +++ b/Formula/s/stanford-corenlp.rb @@ -0,0 +1,34 @@ +class StanfordCorenlp < Formula + desc "Java suite of core NLP tools" + homepage "https://stanfordnlp.github.io/CoreNLP/" + url "https://nlp.stanford.edu/software/stanford-corenlp-4.4.0.zip" + sha256 "c04b07e8b539a00c0816f183ed1f55b79041641f5422fe943829fdabbee67e47" + license "GPL-2.0-or-later" + + # The first-party website only links to an unversioned archive file from + # nlp.stanford.edu (stanford-corenlp-latest.zip), so we match the version + # in the Maven link instead. + livecheck do + url :homepage + regex(%r{href=.*?/stanford-corenlp/v?(\d+(?:\.\d+)+)/jar}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8965174f2f1eec79bd63df245a2b37fe04ed0c73fdef0703317520439f2bfe1f" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + bin.install Dir["#{libexec}/*.sh"] + bin.env_script_all_files libexec, JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + (testpath/"test.txt").write("Stanford is a university, founded in 1891.") + system bin/"corenlp.sh", "-annotators tokenize,ssplit,pos", "-file test.txt", "-outputFormat json" + assert_path_exists (testpath/"test.txt.json") + end +end diff --git a/Formula/s/stanford-ner.rb b/Formula/s/stanford-ner.rb new file mode 100644 index 0000000000000..e83d7c7629ce2 --- /dev/null +++ b/Formula/s/stanford-ner.rb @@ -0,0 +1,31 @@ +class StanfordNer < Formula + desc "Stanford NLP Group's implementation of a Named Entity Recognizer" + homepage "https://nlp.stanford.edu/software/CRF-NER.shtml" + url "https://nlp.stanford.edu/software/stanford-ner-4.2.0.zip" + sha256 "06dd9f827106359bad90049c6952137502bc59ed40b9c88b448831b32cf55b2a" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?stanford-ner[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "caf1491537a74417f2d4070335d5c281ce60387d984726f77458b329b0fbe9c8" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + bin.install Dir["#{libexec}/*.sh"] + bin.env_script_all_files libexec, JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + system bin/"ner.sh", libexec/"sample.txt" + end +end diff --git a/Formula/s/stanford-parser.rb b/Formula/s/stanford-parser.rb new file mode 100644 index 0000000000000..677db324cc8cd --- /dev/null +++ b/Formula/s/stanford-parser.rb @@ -0,0 +1,31 @@ +class StanfordParser < Formula + desc "Statistical NLP parser" + homepage "https://nlp.stanford.edu/software/lex-parser.shtml" + url "https://nlp.stanford.edu/software/stanford-parser-4.2.0.zip" + sha256 "8c2110c78f7f82b66bcf91089a18e415669eda4346bbd9a6e3bc2bde63e5fed1" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?stanford-parser[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "699a16febb7fd2e483deaa44dee2fafbbe29d00343efe37d31d01d3b0fa14fe1" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + bin.install Dir["#{libexec}/*.sh"] + bin.env_script_all_files libexec, JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + system bin/"lexparser.sh", libexec/"data/english-onesent.txt" + end +end diff --git a/Formula/s/staq.rb b/Formula/s/staq.rb new file mode 100644 index 0000000000000..12ea405b2ec4f --- /dev/null +++ b/Formula/s/staq.rb @@ -0,0 +1,66 @@ +class Staq < Formula + desc "Full-stack quantum processing toolkit" + homepage "https://github.com/softwareQinc/staq" + url "https://github.com/softwareQinc/staq/archive/refs/tags/v3.5.tar.gz" + sha256 "838402b6ca541200740cc3ab989b3026f3b001ebf3e1ce7d89ae7f09a0e33195" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "1518fdd5369e20863afefa4158c78b87fc4f01cf09967623a2b1af8225499790" + sha256 cellar: :any, arm64_sequoia: "8081f841203e64e3423fb6305558c1a538b86fdcbbd2e13d02944ea36dfa9ae9" + sha256 cellar: :any, arm64_sonoma: "716a1214491fac80364ace9c88950c123f669912fd76dd950504c60780ddeac5" + sha256 cellar: :any, sonoma: "6b589aefacd45146637ecf6f4b39d69fd1e32aec9f2f60c0da80776cac60dc28" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c0ea0b4548a55c3c72c3f33761cc9bf58e460b84db244b951eb586b0c2b77d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c16a8a25583b15bc7384c346ea277598642e637f19b36ebbab73dcd48e3dfb1b" + end + + depends_on "cmake" => :build + depends_on "gmp" + + # Backport fix to error: no member named 'row' in 'col_vec2_t' + # Issue ref: https://github.com/softwareQinc/staq/issues/85 + patch do + url "https://github.com/softwareQinc/staq/commit/4ac5dcd13ae46dd629ee938602452a5c8ec0b7c0.patch?full_index=1" + sha256 "c71447c1fd065e8818894965219e0fad652c3a8649be645296d4bc9ca5a9d656" + end + + # Backport newer bundled fmt + patch do + url "https://github.com/softwareQinc/staq/commit/6847ebed2d167a0f1aa476cfb1d2b62b54fde6f9.patch?full_index=1" + sha256 "acdcdd7afd9650425f1659b0b3b0e601c27e368d3722385416dcc5ee145528f1" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DINSTALL_SOURCES=ON", + "-DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=/dev/null", # skip unused FetchContent + "-DPython3_EXECUTABLE=/dev/null", # skip macOS /usr/bin/python3 + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"input.qasm").write <<~QASM + OPENQASM 2.0; + include "qelib1.inc"; + + qreg q[1]; + creg c[1]; + h q[0]; + h q[0]; + measure q->c; + QASM + assert_equal <<~QASM, shell_output("#{bin}/staq -O3 ./input.qasm").chomp + OPENQASM 2.0; + include "qelib1.inc"; + + qreg q[1]; + creg c[1]; + measure q[0] -> c[0]; + QASM + end +end diff --git a/Formula/s/star.rb b/Formula/s/star.rb new file mode 100644 index 0000000000000..ccc77372a6fbc --- /dev/null +++ b/Formula/s/star.rb @@ -0,0 +1,44 @@ +class Star < Formula + desc "Standard tap archiver" + homepage "https://codeberg.org/schilytools/schilytools" + url "https://codeberg.org/schilytools/schilytools/archive/2024-03-21.tar.gz" + sha256 "4d66bf35a5bc2927248fac82266b56514fde07c1acda66f25b9c42ccff560a02" + license "CDDL-1.0" + + bottle do + sha256 arm64_tahoe: "68e80e10e9424184f4c94cdfff0adc5f3ef236fb89487142f228654ca44c5bd0" + sha256 arm64_sequoia: "e6a35a48d1b10d83a521fba9d7351be44be87017b0b7a1c16d6db72aa3874ee2" + sha256 arm64_sonoma: "4f7d3a2831a685b8ff9881ff5b56fc2402b04c410d6a8b3640d4cb794154165d" + sha256 arm64_ventura: "800616aa187156f940ce52ad810e23b6fe385a633948f3d666372cba6fea9727" + sha256 arm64_monterey: "066533943950ef805516fdd1e22b845c02ad7764b924f2922689a27549260cbb" + sha256 sonoma: "e30e6506794c00b9eb288edf39bd4910e8e0a9742793319b96c48dea5f24d81d" + sha256 ventura: "697228bef43eb329599da53d6156a374c008fa508473ebcd79d0dccaec003b82" + sha256 monterey: "3898a6a463bdad06cbbce3792f8ef73909e98ef9f9db4483317e43a846d4175a" + sha256 arm64_linux: "e5bab1fe56ec1b2294719de3bf9e6576f439478e076a7df062693d9efc22ace8" + sha256 x86_64_linux: "a132ee6b490220cb5c060736aa796fb70b04227d53f115e605d30bf5d2784f9c" + end + + depends_on "smake" => :build + + def install + deps = %w[libdeflt librmt libfind libschily] + deps.each { |dep| system "smake", "-C", dep } + + system "smake", "-C", "star", "INS_BASE=#{prefix}", "INS_RBASE=#{prefix}", "install" + + # Remove symlinks that override built-in utilities + (bin/"gnutar").unlink + (bin/"tar").unlink + (man1/"gnutar.1").unlink + end + + test do + system bin/"star", "--version" + + (testpath/"test").write("Hello Homebrew!") + system bin/"star", "-c", "-z", "-v", "file=test.tar.gz", "test" + rm "test" + system bin/"star", "-x", "-z", "file=test.tar.gz" + assert_equal "Hello Homebrew!", (testpath/"test").read + end +end diff --git a/Formula/s/starlark-rust.rb b/Formula/s/starlark-rust.rb new file mode 100644 index 0000000000000..e5942177e6475 --- /dev/null +++ b/Formula/s/starlark-rust.rb @@ -0,0 +1,38 @@ +class StarlarkRust < Formula + desc "Rust implementation of the Starlark language" + homepage "https://github.com/facebook/starlark-rust" + url "https://github.com/facebook/starlark-rust/archive/refs/tags/v0.13.0.tar.gz" + sha256 "c27d974dd242f133184a5fc53a145374f193464e163fa6fbd4cade566e3cfab6" + license "Apache-2.0" + head "https://github.com/facebook/starlark-rust.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d25035b0a2ca0a499dc940cd416dba460eb7b3d22871b17a67553c9d67fb0817" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9c7d216f76e62d7afb443c1149081a879e2e640809951608bb306f6b7e3c75b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2be2257f4dc600df454dacfbcea964d0b03fd3b90cc8d9a92dba570f0cbbffb7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18151d79509ac6e9c1d7741945ebae060bd7ab048cc28eaf2f3b31de2259e430" + sha256 cellar: :any_skip_relocation, sonoma: "9bf96fdd0735366f05e37edc5abbc585196aeebb1b697c37a9c3518981564dfb" + sha256 cellar: :any_skip_relocation, ventura: "ccf2d7a29bbc2a0566a42ada228674c763355bf3cfa7da07641bdbeab8090f3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb6c2c092d1cda4e6535a19d73f00d925a0ad2aaf07741ec66fd85b099617e17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da66eb0fccc9b12bd61613f0027e869baeeb98d771ab5537ec61c30a488aa72e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "starlark_bin") + end + + test do + assert_match version.to_s, shell_output("#{bin}/starlark --version") + + (testpath/"test.bzl").write <<~BAZEL + def hello_world(): + print("Hello, world!") + hello_world() + BAZEL + + output = shell_output("#{bin}/starlark --check test.bzl") + assert_equal "1 files, 0 errors, 0 warnings, 0 advices, 0 disabled", output.chomp + end +end diff --git a/Formula/s/starship.rb b/Formula/s/starship.rb new file mode 100644 index 0000000000000..ea884babc7a72 --- /dev/null +++ b/Formula/s/starship.rb @@ -0,0 +1,38 @@ +class Starship < Formula + desc "Cross-shell prompt for astronauts" + homepage "https://starship.rs/" + url "https://github.com/starship/starship/archive/refs/tags/v1.24.0.tar.gz" + sha256 "3d98e2c57dcfea36c6035e2ad812f91cfe33099e4b67f6ea7728e2294f02ca61" + license "ISC" + head "https://github.com/starship/starship.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67470b986c8aacf4c51507a4e0569e798ecd65f4e388b156e19137fbad731984" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b22a3a0bf85b03ce4ea3d0dfb0b5092207030961de953c6ceb7c3c602bf4a6b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1ce39c6c77f8e0534ff10c3d9a9277c7f3baf1dbb30212ca28d6321c8fcce023" + sha256 cellar: :any_skip_relocation, sonoma: "d793b8be85ab1f7525c4be58ea6780f189fde43e7d01fa15d5cc64d0cef75b10" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f21f8d57cb70137646ef6b60ea8196fd65af633ce4627d735bd36b945016e44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db3e2a5b9d2048c2abd360480af478b619a7e85a43200fd04572b2a58053418b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "dbus" + end + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"starship", "completions") + end + + test do + ENV["STARSHIP_CONFIG"] = "" + assert_equal "❯ ", shell_output("#{bin}/starship module character") + end +end diff --git a/Formula/s/startup-notification.rb b/Formula/s/startup-notification.rb new file mode 100644 index 0000000000000..c44b0aa4e1fb0 --- /dev/null +++ b/Formula/s/startup-notification.rb @@ -0,0 +1,44 @@ +class StartupNotification < Formula + desc "Reference implementation of startup notification protocol" + homepage "https://www.freedesktop.org/wiki/Software/startup-notification/" + url "https://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.12.tar.gz" + sha256 "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a" + license "LGPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b1edc25aff59c8a62cd1a6c9ffa21e63d6a0fd21fe6fdd108ae17d6207b357e" + sha256 cellar: :any, arm64_sequoia: "a8443bdbe68a6ad0d3cfb6e762cf01b88eb719d243691b8070b024ad5c8ab70e" + sha256 cellar: :any, arm64_sonoma: "688da3d5c9f204ab402e2d419b2925bdf6087a1d6fc8d604e0e11be639904be8" + sha256 cellar: :any, arm64_ventura: "10d94fd081a6867bae73ef9bf9a47b7abb32d92aa50ed920c423cf1f35163265" + sha256 cellar: :any, arm64_monterey: "9272c92348ee82fc166a46ad129d860019f9dbacbd1effc8f612cbd1dff3f049" + sha256 cellar: :any, arm64_big_sur: "d5cb6d07fb21b5bf6c2276de876642a3b8579c4d4f4b962532b3c1c831ba4f93" + sha256 cellar: :any, sonoma: "adcbdcb253f346f127783d48c27ad9a2de9b080df6f9177daaf08bfc6ef8ab32" + sha256 cellar: :any, ventura: "c7482a5c88b46b7750fa230fafea803b65666b824dff3e9c2d3364dea929410e" + sha256 cellar: :any, monterey: "7f062ed1316540ed9d9cd75f190954b57fc8eba9ee5394eb624a6748e9c4289d" + sha256 cellar: :any, big_sur: "17601558b8e72930f3917e9c7373d620a37e6cbf987172e3134f87a2ccc60af0" + sha256 cellar: :any, catalina: "bdb8f9123099562853461f5299108f7cbfac9be39ea3ab9ad6b3853c288ba5c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bf37bfbd3313320fd91577f056930b461e927b689eaeba4080ad67311d0f0ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45873a4a273a11b66436459b7130de94bcb32470a3a4376ef74b2803e2494462" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libx11" + depends_on "libxcb" + depends_on "xcb-util" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkgconf --cflags libstartup-notification-1.0").chomp + end +end diff --git a/Formula/s/statesmith.rb b/Formula/s/statesmith.rb new file mode 100644 index 0000000000000..47026c3737a71 --- /dev/null +++ b/Formula/s/statesmith.rb @@ -0,0 +1,58 @@ +class Statesmith < Formula + desc "State machine code generation tool suitable for bare metal, embedded and more" + homepage "https://github.com/StateSmith/StateSmith" + url "https://github.com/StateSmith/StateSmith/archive/refs/tags/cli-v0.19.0.tar.gz" + sha256 "62eb44d15a978c82f1ad8a54506f750b76c3dd30ebd1087384366a939a118749" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9c19f657fbff70ad690d5b0910ab9b55559514f24f76661f078799f823f1a07" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d69698d4830609f132f6f2bf03c6e13edce217ba58635c41d3f52c895c5c47a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "adfb4d4c32dda160755d4b1fe8f1e8d88398bd62e3de1242d4dcd78e6f89da27" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1398645c8a9cbbeb2208b4e01c0dfb168ff730360db333d4036eb2f9940d744" + sha256 cellar: :any_skip_relocation, ventura: "a346a06beaaafeaf662489a7a43be53d31b27c2c15912c7ed8fb9308eb0f363b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4232fb5b9e94609e742f695ff84d017cda14765b89448d87c4a8e62fbc04696" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a80deb05098101d193abbaa92c8113e7a7cb150dcbaecaccd58c4bc2f3836912" + end + + depends_on "dotnet" + depends_on "icu4c@77" + uses_from_macos "zlib" + + def install + dotnet = Formula["dotnet"] + args = %W[ + -c Release + --framework net#{dotnet.version.major_minor} + --output #{libexec} + --no-self-contained + --use-current-runtime + -p:Version=#{version} + ] + + system "dotnet", "publish", "src/StateSmith.Cli", *args + (bin/"ss.cli").write_env_script libexec/"StateSmith.Cli", DOTNET_ROOT: "${DOTNET_ROOT:-#{dotnet.opt_libexec}}" + end + + test do + if OS.mac? + # We have to do a different test on mac due to https://github.com/orgs/Homebrew/discussions/5966 + # Confirming that it fails as expected per the formula cookbook + output = pipe_output("#{bin}/ss.cli --version 2>&1") + assert_match "UnauthorizedAccessException", output + else + assert_match version.to_s, shell_output("#{bin}/ss.cli --version") + + File.write("lightbulb.puml", <<~HERE) + @startuml lightbulb + [*] -> Off + Off -> On : Switch + On -> Off : Switch + @enduml + HERE + + shell_output("#{bin}/ss.cli run --lang=JavaScript --no-ask --no-csx -h -b") + assert_match version.to_s, File.read(testpath/"lightbulb.js") + end + end +end diff --git a/Formula/s/static-web-server.rb b/Formula/s/static-web-server.rb new file mode 100644 index 0000000000000..9911e02f15d3b --- /dev/null +++ b/Formula/s/static-web-server.rb @@ -0,0 +1,52 @@ +class StaticWebServer < Formula + desc "High-performance and asynchronous web server for static files-serving" + homepage "https://static-web-server.net" + url "https://github.com/static-web-server/static-web-server/archive/refs/tags/v2.39.0.tar.gz" + sha256 "da5906ed28eb47ebe6fae782b20a2f99f69c094e7885c66612e2c03d7911631a" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/static-web-server/static-web-server.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf6bed7e706fac5e570fdab10efb0e351861a58aae3be19dfcbea3184d98f25b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ded2ecd01afcd191042d1bd40742d33fcc2964ecce684ab68188cb635ff09c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "782f319b925843cb28fccd1a06719e9a06307c4b6c0a95517de69d1ae6363c79" + sha256 cellar: :any_skip_relocation, sonoma: "e7e32b59db5ab2196cee9d5c39705278a87f6a32d20230048655d606ea88e9ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e3a75140b7ae63370f0ae9012427dcaa863b1098d6594933634546e4668d9d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d731a512ee6e17c8fce78ee9227037fea91e6746d29c97294c48b24b52cbc797" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + system bin/"static-web-server", "generate", buildpath + bash_completion.install "completions/static-web-server.bash" => "static-web-server" + fish_completion.install "completions/static-web-server.fish" + zsh_completion.install "completions/_static-web-server" + man1.install "man/static-web-server-generate.1", "man/static-web-server.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/static-web-server --version") + + (testpath/"index.html").write <<~HTML + + Test +

    Hello, Homebrew!

    + + HTML + + port = free_port + pid = spawn bin/"static-web-server", "--port", port.to_s, "--root", testpath.to_s + sleep 2 + + begin + response = shell_output("curl -s http://127.0.0.1:#{port}") + assert_match "Hello, Homebrew!", response + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/s/staticcheck.rb b/Formula/s/staticcheck.rb new file mode 100644 index 0000000000000..4d54e45f89f50 --- /dev/null +++ b/Formula/s/staticcheck.rb @@ -0,0 +1,42 @@ +class Staticcheck < Formula + desc "State of the art linter for the Go programming language" + homepage "https://staticcheck.dev/" + url "https://github.com/dominikh/go-tools/archive/refs/tags/2025.1.1.tar.gz" + sha256 "259aaf528e4d98e7d3652e283e8551cfdb98cd033a7c01003cd377c2444dd6de" + license "MIT" + revision 9 + head "https://github.com/dominikh/go-tools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "203a8630e3547cab39fc9421feb6b5b4f08005db00b722065716b4b457b3d2fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "203a8630e3547cab39fc9421feb6b5b4f08005db00b722065716b4b457b3d2fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "203a8630e3547cab39fc9421feb6b5b4f08005db00b722065716b4b457b3d2fc" + sha256 cellar: :any_skip_relocation, sonoma: "ca57806d987a488ef930a2e4992dfd8686e20e09bce4916ed147af2f55ff6cc4" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe7c30f1137820a68b20013c99aca181a8d747d9176861f842369b9b81ee6782" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c5f55ac26ded348d7b192dc77e9257151ef9b94547a18be076f7df58714aca8" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/staticcheck" + end + + test do + system "go", "mod", "init", "brewtest" + (testpath/"test.go").write <<~GO + package main + + import "fmt" + + func main() { + var x uint + x = 1 + fmt.Println(x) + } + GO + json_output = JSON.parse(shell_output("#{bin}/staticcheck -f json .", 1)) + refute_match "but Staticcheck was built with", json_output["message"] + assert_equal "S1021", json_output["code"] + end +end diff --git a/Formula/s/statix.rb b/Formula/s/statix.rb new file mode 100644 index 0000000000000..58a640d5c0ceb --- /dev/null +++ b/Formula/s/statix.rb @@ -0,0 +1,41 @@ +class Statix < Formula + desc "Lints and suggestions for the nix programming language" + homepage "https://github.com/oppiliappan/statix" + url "https://github.com/oppiliappan/statix/archive/refs/tags/v0.5.8.tar.gz" + sha256 "547ee83df5814c18f8577b5ca25a1f12a416900b6eaa95821386a28090e8a89d" + license "MIT" + head "https://github.com/oppiliappan/statix.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8fa52bb92332387d05946edc0f239ee829806fb2df9db218b9a1fdc93fb71f3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b21020e92407c357003a7aa16dffc9449c53323f717ef2696ca9d07ad3535aa7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "967a8079ab2a27a7896ef2ecfa52f12025dda7ffb533df5948382b5f1136c68e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ccd7f535c266592bf940e0e9f53d85730aa2a4723650d4a3e51836cd35f364b7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e73739173a85eef1d38fed56088cc45c3b806713a5971579ee65ff738de18c16" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5e0f89654f7ce6ed5a63fa94fc69074d948a1319a453e43d7772285c3bced903" + sha256 cellar: :any_skip_relocation, sonoma: "2cf629faab1aad35a3ebff2293ea09ed19a2a3e2fd661f339a37f8f8c936cf80" + sha256 cellar: :any_skip_relocation, ventura: "b6d45ddc687143cf2ed81ca01603697d6f40ce1bee9bf7d215822cdb22b85e9f" + sha256 cellar: :any_skip_relocation, monterey: "dc66f2510259058f7ac84859143302d1e68b762963cddc5e8bf29a8ccffbdc5c" + sha256 cellar: :any_skip_relocation, big_sur: "c878dbb9c817cf27c5cd766bc55f660b0790286e2c3c771971f191377ddeee58" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d738f4455a81197f21c8fe2b73d4b35948e7d98ee89e66b0d8c5ee87abfce7d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "519e16e4209eb0dc05b5bf311dee7d24d7c37a7bc375d60efe4e2ea52ef31fc6" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "bin") + end + + test do + (testpath/"test.nix").write <<~NIX + github:oppiliappan/statix + NIX + assert_match "Found unquoted URI expression", shell_output("#{bin}/statix check test.nix", 1) + + system bin/"statix", "fix", "test.nix" + system bin/"statix", "check", "test.nix" + + assert_match version.to_s, shell_output("#{bin}/statix --version") + end +end diff --git a/Formula/s/stdman.rb b/Formula/s/stdman.rb new file mode 100644 index 0000000000000..213a2f9298d1c --- /dev/null +++ b/Formula/s/stdman.rb @@ -0,0 +1,27 @@ +class Stdman < Formula + desc "Formatted C++ stdlib man pages from cppreference.com" + homepage "https://github.com/jeaye/stdman" + url "https://github.com/jeaye/stdman/archive/refs/tags/2024.07.05.tar.gz" + sha256 "3cd652cb76c4fc7604c2b961a726788550c01065032bcff0a706b44f2eb0f75a" + license "MIT" + version_scheme 1 + head "https://github.com/jeaye/stdman.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f963ae3a734ab713133b59a52853c12fc92aee8d2c572c8eeaba96db2ebcd249" + end + + on_linux do + depends_on "man-db" => :test + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + man = OS.mac? ? "man" : "gman" + system man, "-w", "std::string" + end +end diff --git a/Formula/s/steamguard-cli.rb b/Formula/s/steamguard-cli.rb new file mode 100644 index 0000000000000..9e2cbb02ee518 --- /dev/null +++ b/Formula/s/steamguard-cli.rb @@ -0,0 +1,36 @@ +class SteamguardCli < Formula + desc "CLI for steamguard" + homepage "https://github.com/dyc3/steamguard-cli" + url "https://github.com/dyc3/steamguard-cli/archive/refs/tags/v0.17.1.tar.gz" + sha256 "dc02e2a40c5bfc8f28195c99a9575ef10c1fe67f3075d402091e81f53440626d" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "81a075cea4c7595936f22b9454c239a1c915657653242032faa8cdd5afaa1712" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1adfdef80cdbf5fb66f54c66d02fe223d80377fca70da7de5485e8021e43c8c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49e799bf9b06cc6316798ab1f1c2102f8d1ef32f327e10afcad9a0b59f940c7c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "392352450743b4b7defe304c7601448bbae63dc81cdbdd614ab40c29b3fb2732" + sha256 cellar: :any_skip_relocation, sonoma: "f4b364956ebc494e435ab63d2a16885f71d35fa7d99f6a94a299598e24a73c3a" + sha256 cellar: :any_skip_relocation, ventura: "1f92c1c691f2f3dad3f3cb596dbc281878c021c9b905aa1d20c10a4e2f0d3c5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "29f056815ab5b0055bb09e8b813d2799e3e3a90e0dd0720764ebe65797155d78" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aab0d522a9b69debbfc758612a4649a00e221567065b311b745bc7f9342d9d50" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"steamguard", "completion", shell_parameter_format: :arg) + end + + test do + require "pty" + PTY.spawn(bin/"steamguard") do |stdout, stdin, _pid| + stdin.puts "n\n" + assert_match "Would you like to create a manifest in", stdout.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end +end diff --git a/Formula/s/steampipe.rb b/Formula/s/steampipe.rb new file mode 100644 index 0000000000000..4a32cd43953ff --- /dev/null +++ b/Formula/s/steampipe.rb @@ -0,0 +1,40 @@ +class Steampipe < Formula + desc "Use SQL to instantly query your cloud services" + homepage "https://steampipe.io/" + url "https://github.com/turbot/steampipe/archive/refs/tags/v2.3.2.tar.gz" + sha256 "abe43a3dd5400fbb23373314cad1bda2f6da0ae5132f261e5260f4dee4eb8970" + license "AGPL-3.0-only" + head "https://github.com/turbot/steampipe.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3df71626e45a9be247a46fcb6ae0eda085df20184f09889b5ce0c250969e3c05" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e7f0406a063959185f8d823402f980ed9e962f39823832c4c588bb7adf410e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af5e58e6265202531f381e2c23ce830374a1b628a669fa9fe09ea590e1721125" + sha256 cellar: :any_skip_relocation, sonoma: "c2868353995fd291efcd8a25ab5f05ed25d4fa13c57d830d3a6ab2b803a9654a" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf98250de7905bec91e2bc79f88a78232c2f961637b5a11d8dade102f78f2784" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93a8c39b13210dc906897a430f97ffec8310e40c1b277582813deb545718bade" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"steampipe", "completion") + end + + test do + ENV["STEAMPIPE_INSTALL_DIR"] = testpath + + output = shell_output("#{bin}/steampipe service status") + assert_match "Steampipe service is not installed", output + + assert_match "Steampipe v#{version}", shell_output("#{bin}/steampipe --version") + end +end diff --git a/Formula/s/stella.rb b/Formula/s/stella.rb new file mode 100644 index 0000000000000..b9bc8a998fc63 --- /dev/null +++ b/Formula/s/stella.rb @@ -0,0 +1,73 @@ +class Stella < Formula + desc "Atari 2600 VCS emulator" + homepage "https://stella-emu.github.io/" + url "https://github.com/stella-emu/stella/archive/refs/tags/7.0c.tar.gz" + version "7.0c" + sha256 "b9309198aa5746cd568e91caaea10bbeab4ca8155493d0243694b41bdb39d7ca" + license "GPL-2.0-or-later" + head "https://github.com/stella-emu/stella.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5dd257952715ad8364652c9cdb0ef7e8cfab72f2f868273e7da13928ce8dc065" + sha256 cellar: :any, arm64_sequoia: "470bf4006df3634a8ee8d49e9424569f0a9bafb600a2e6c72c4a66f424013c5b" + sha256 cellar: :any, arm64_sonoma: "0bb05c3c49f855456ae66086076ba5c51eaa4c146fbd34b688d98475dc8410dc" + sha256 cellar: :any, sonoma: "4e137c751a90176b2ae74f8bf4b5d41d4bdc2250b5dd225ce3746483abb8a202" + sha256 cellar: :any_skip_relocation, arm64_linux: "307f9ee104dcde3fe968406b3991cb49a0ea10f732c46ae9509a9dd96246ced8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b316ebff91f8c1c19294ba17cda529c4a929b16f5c38a9c2ffd815f5ae91e032" + end + + depends_on "pkgconf" => :build + depends_on xcode: :build # for xcodebuild + depends_on "libpng" + depends_on "sdl2" + + uses_from_macos "sqlite" + uses_from_macos "zlib" + + # ventura build patch, upstream pr ref, https://github.com/stella-emu/stella/pull/1064 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/stella/7.0c-ventura.patch" + sha256 "6295953eced4509376f4deb7b1ab511df5fed10cff4fab40feaa4ca8c53922ad" + end + + def install + sdl2 = Formula["sdl2"] + libpng = Formula["libpng"] + if OS.mac? + cd "src/os/macos" do + inreplace "stella.xcodeproj/project.pbxproj" do |s| + s.gsub! %r{(\w{24} /\* SDL2\.framework)}, '//\1' + s.gsub! %r{(\w{24} /\* png)}, '//\1' + s.gsub!(/(HEADER_SEARCH_PATHS) = \(/, + "\\1 = (#{sdl2.opt_include}/SDL2, #{libpng.opt_include},") + s.gsub!(/(LIBRARY_SEARCH_PATHS) = ("\$\(LIBRARY_SEARCH_PATHS\)");/, + "\\1 = (#{sdl2.opt_lib}, #{libpng.opt_lib}, \\2);") + s.gsub!(/(OTHER_LDFLAGS) = "((-\w+)*)"/, '\1 = "-lSDL2 -lpng \2"') + end + xcodebuild "-arch", Hardware::CPU.arch, "SYMROOT=build", "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + prefix.install "build/Release/Stella.app" + bin.write_exec_script "#{prefix}/Stella.app/Contents/MacOS/Stella" + end + else + system "./configure", "--prefix=#{prefix}", + "--bindir=#{bin}", + "--enable-release", + "--with-sdl-prefix=#{sdl2.prefix}", + "--with-libpng-prefix=#{libpng.prefix}", + "--with-zlib-prefix=#{Formula["zlib"].prefix}" + system "make", "install" + end + end + + test do + if OS.mac? + assert_match "E.T. - The Extra-Terrestrial", shell_output("#{bin}/Stella -listrominfo").strip + else + assert_match "failed to initialize: unable to open database file", + shell_output("#{bin}/stella -listrominfo").strip + end + end +end diff --git a/Formula/s/stellar-cli.rb b/Formula/s/stellar-cli.rb new file mode 100644 index 0000000000000..901c0fa373f44 --- /dev/null +++ b/Formula/s/stellar-cli.rb @@ -0,0 +1,35 @@ +class StellarCli < Formula + desc "Stellar command-line tool for interacting with the Stellar network" + homepage "https://developers.stellar.org" + url "https://github.com/stellar/stellar-cli/archive/refs/tags/v23.1.4.tar.gz" + sha256 "37ebab203e11aee47e9d0de206667b294cf20309e6c547d6905fa3907f2728f3" + license "Apache-2.0" + head "https://github.com/stellar/stellar-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b64329e1c30089c71d7c7bb5e4070ed99c4439c821662e85c980f2e77f77b155" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e0b82f9fb0b74469c42610118dad622c6f56cf0508c1fd6b1d03c059ca61eef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1c25aed977f39ab39bff6e0bfef7a179376ce574a21066d2e48ea16e0034da8" + sha256 cellar: :any_skip_relocation, sonoma: "4a3922fdd383daa768f08fa1560dc1ad92a9dedae3e830384d3f5b2004d81c6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0a6c6faff3416304d9fe6be6478b6dd2d9f689b26574e504254ed0bf765b0d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90d4abe29b610bb41a8d0f0d2540c837055b1150dce56a0a02c23144ef6b2b00" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + on_linux do + depends_on "dbus" + depends_on "systemd" # for libudev + end + + def install + system "cargo", "install", "--bin=stellar", *std_cargo_args(path: "cmd/stellar-cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/stellar version") + assert_match "TransactionEnvelope", shell_output("#{bin}/stellar xdr types list") + end +end diff --git a/Formula/s/stellar-core.rb b/Formula/s/stellar-core.rb new file mode 100644 index 0000000000000..af3951071247f --- /dev/null +++ b/Formula/s/stellar-core.rb @@ -0,0 +1,75 @@ +class StellarCore < Formula + desc "Backbone of the Stellar (XLM) network" + homepage "https://www.stellar.org/" + url "https://github.com/stellar/stellar-core.git", + tag: "v24.0.0", + revision: "0d7b4345de396ad4e8d7dcc4460ddc6feeb27b11" + license "Apache-2.0" + head "https://github.com/stellar/stellar-core.git", branch: "master" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "dce29e72a0bb57c1466bdda27a882d740540ef4bc1305b948de6ffe42e052103" + sha256 cellar: :any, arm64_sequoia: "d555c79aa226165b30b9bd9b3e0052896b705dbf416b1a6e8051ae02e10b2868" + sha256 cellar: :any, arm64_sonoma: "d419da10be9b8a0ca9179c7c3ef65feb92347312dd0af9e7d2d234b5c7343774" + sha256 cellar: :any, sonoma: "d67b7009fa8d4665707aa9f295fb6fe31af5bbae0bdd8c023d75431940fbf5dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "1786a6277e0fad9d2cd0d60ef15176054062e40d87c9b0e116222758d667a585" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65d8d44b89881aacef5d46f70a767a958f35986a0dcd2a550be14bf5bb9c8d4b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build # Bison 3.0.4+ + depends_on "libtool" => :build + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libpq" + depends_on "libpqxx" + depends_on "libsodium" + + uses_from_macos "flex" => :build + + on_sonoma :or_older do + depends_on "coreutils" => :build # for sha256sum + end + + on_linux do + depends_on "libunwind" + end + + # https://github.com/stellar/stellar-core/blob/master/INSTALL.md#build-dependencies + fails_with :gcc do + version "7" + cause "Requires C++17 filesystem" + end + + def install + # remove toolchain selection + inreplace "src/Makefile.am", "cargo +$(RUST_TOOLCHAIN_CHANNEL)", "cargo" + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--enable-postgres", + *std_configure_args + system "make", "install" + end + + test do + test_categories = %w[ + accountsubentriescount + bucketlistconsistent + ] + # Reduce tests on Intel macOS as runner is too slow and times out + test_categories << "topology" if !OS.mac? || !Hardware::CPU.intel? + + system bin/"stellar-core", "test", test_categories.map { |category| "[#{category}]" }.join(",") + end +end diff --git a/Formula/s/stencil.rb b/Formula/s/stencil.rb new file mode 100644 index 0000000000000..5b84c13bf4f78 --- /dev/null +++ b/Formula/s/stencil.rb @@ -0,0 +1,35 @@ +class Stencil < Formula + desc "Modern living-template engine for evolving repositories" + homepage "https://stencil.rgst.io" + url "https://github.com/rgst-io/stencil/archive/refs/tags/v2.11.0.tar.gz" + sha256 "7c239849bf083c49b8884d81cd5067a7343eda8cd048c3dba553057c3547bf5a" + license "Apache-2.0" + head "https://github.com/rgst-io/stencil.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2f17a3914093f49adaf3cef024e652a3e8ff9e59475fa9c34cea9cb1f847a1f1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d69a302755610ceda07a33a1e20a57963940266d2b82b4e68e8658df2c12c967" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "017db97fab7d2ff2c18b8c9129661a972a21d9920af25bd25133b503eb16651f" + sha256 cellar: :any_skip_relocation, sonoma: "ddd825dd240eadad401bb9b3325d520496bf6479650ccd147f01b5126aded6ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "119af48162f6eae754e87312ad27ca13a47dcd3763627742ea65257228be4bbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9821168e5eaf83f5e2a805a0ba029669126130e458835e52759b81833d95407f" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X go.rgst.io/stencil/v2/internal/version.version=#{version} + -X go.rgst.io/stencil/v2/internal/version.builtBy=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/stencil" + end + + test do + (testpath/"service.yaml").write "name: test" + system bin/"stencil" + assert_path_exists testpath/"stencil.lock" + end +end diff --git a/Formula/s/step.rb b/Formula/s/step.rb new file mode 100644 index 0000000000000..290ba08b1c29a --- /dev/null +++ b/Formula/s/step.rb @@ -0,0 +1,122 @@ +class Step < Formula + desc "Crypto and x509 Swiss-Army-Knife" + homepage "https://smallstep.com" + url "https://github.com/smallstep/cli/releases/download/v0.28.7/step_0.28.7.tar.gz" + sha256 "64996b54975707ef0f3a9d0b8e8c32db8e3c954b7ad0d2f4ca82b050a37eaa8f" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "123883b473b0c45b43ef68a24e23540729d87e3d763228ce83f3080c48d6435d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a77c13dd1082b59f25a69f5809c678ceef54472ca25873d3356dceea6c0c7cd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89b19beedb94544d19a8f33af15063befe6860613edec4f2fde1c88ae21a59af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "57b8ec705af6c68e25acd09f8a4720a0e628a64de20d74a37468a9ec7e0a0730" + sha256 cellar: :any_skip_relocation, sonoma: "bdc7a9abb89069d0ccaeca7874bce8cf4ca08af087f4706f45e453f8436ecb70" + sha256 cellar: :any_skip_relocation, ventura: "070bede6372d8e470f06eb40258b4d99b1191baf46b81ac18a905c8cfeb24507" + sha256 cellar: :any_skip_relocation, arm64_linux: "100eef27aab06162ed2745b3e6849ee1b3efc0f6fd071e2a401db550477df09a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d92b064d4aca479bc4241a00247c416e1e02faa4f8a0dd4b6c8d2523ab7f4170" + end + + depends_on "go" => :build + + # certificates is not always in sync with step, see discussions in https://github.com/smallstep/certificates/issues/1925 + resource "certificates" do + url "https://github.com/smallstep/certificates/releases/download/v0.28.2/step-ca_0.28.2.tar.gz" + sha256 "9627f89ac96da1254d3f260c857a4544921ab59c52affc62034391f496a23876" + end + + def install + ENV["CGO_ENABLED"] = "0" if OS.linux? + ldflags = %W[-s -w -X main.Version=#{version} -X main.BuildTime=#{time.iso8601}] + system "go", "build", *std_go_args(ldflags:), "./cmd/step" + generate_completions_from_executable(bin/"step", "completion") + + resource("certificates").stage do |r| + ldflags = %W[-s -w -X main.Version=#{r.version} -X main.BuildTime=#{time.iso8601}] + system "go", "build", *std_go_args(ldflags:, output: bin/"step-ca"), "./cmd/step-ca" + end + end + + test do + # Generate a public / private key pair. Creates foo.pub and foo.priv. + system bin/"step", "crypto", "keypair", "foo.pub", "foo.priv", "--no-password", "--insecure" + assert_path_exists testpath/"foo.pub" + assert_path_exists testpath/"foo.priv" + + # Generate a root certificate and private key with subject baz written to baz.crt and baz.key. + system bin/"step", "certificate", "create", "--profile", "root-ca", + "--no-password", "--insecure", "baz", "baz.crt", "baz.key" + assert_path_exists testpath/"baz.crt" + assert_path_exists testpath/"baz.key" + baz_crt = File.read(testpath/"baz.crt") + assert_match(/^-----BEGIN CERTIFICATE-----.*/, baz_crt) + assert_match(/.*-----END CERTIFICATE-----$/, baz_crt) + baz_key = File.read(testpath/"baz.key") + assert_match(/^-----BEGIN EC PRIVATE KEY-----.*/, baz_key) + assert_match(/.*-----END EC PRIVATE KEY-----$/, baz_key) + shell_output("#{bin}/step certificate inspect --format json baz.crt > baz_crt.json") + baz_crt_json = JSON.parse(File.read(testpath/"baz_crt.json")) + assert_equal "CN=baz", baz_crt_json["subject_dn"] + assert_equal "CN=baz", baz_crt_json["issuer_dn"] + + # Generate a leaf certificate signed by the previously created root. + system bin/"step", "certificate", "create", "--profile", "intermediate-ca", + "--no-password", "--insecure", "--ca", "baz.crt", "--ca-key", "baz.key", + "zap", "zap.crt", "zap.key" + assert_path_exists testpath/"zap.crt" + assert_path_exists testpath/"zap.key" + zap_crt = File.read(testpath/"zap.crt") + assert_match(/^-----BEGIN CERTIFICATE-----.*/, zap_crt) + assert_match(/.*-----END CERTIFICATE-----$/, zap_crt) + zap_key = File.read(testpath/"zap.key") + assert_match(/^-----BEGIN EC PRIVATE KEY-----.*/, zap_key) + assert_match(/.*-----END EC PRIVATE KEY-----$/, zap_key) + shell_output("#{bin}/step certificate inspect --format json zap.crt > zap_crt.json") + zap_crt_json = JSON.parse(File.read(testpath/"zap_crt.json")) + assert_equal "CN=zap", zap_crt_json["subject_dn"] + assert_equal "CN=baz", zap_crt_json["issuer_dn"] + + # Initialize a PKI and step-ca configuration, boot the CA, and create a + # certificate using the API. + (testpath/"password.txt").write("password") + steppath = "#{testpath}/.step" + mkdir_p(steppath) + ENV["STEPPATH"] = steppath + system bin/"step", "ca", "init", "--address", "127.0.0.1:8081", + "--dns", "127.0.0.1", "--password-file", "#{testpath}/password.txt", + "--provisioner-password-file", "#{testpath}/password.txt", "--name", + "homebrew-smallstep-test", "--provisioner", "brew" + + begin + pid = fork do + exec bin/"step-ca", "--password-file", "#{testpath}/password.txt", + "#{steppath}/config/ca.json" + end + + sleep 6 + shell_output("#{bin}/step ca health > health_response.txt") + assert_match(/^ok$/, File.read(testpath/"health_response.txt")) + + shell_output("#{bin}/step ca token --password-file #{testpath}/password.txt " \ + "homebrew-smallstep-leaf > token.txt") + token = File.read(testpath/"token.txt") + system bin/"step", "ca", "certificate", "--token", token, + "homebrew-smallstep-leaf", "brew.crt", "brew.key" + + assert_path_exists testpath/"brew.crt" + assert_path_exists testpath/"brew.key" + brew_crt = File.read(testpath/"brew.crt") + assert_match(/^-----BEGIN CERTIFICATE-----.*/, brew_crt) + assert_match(/.*-----END CERTIFICATE-----$/, brew_crt) + brew_key = File.read(testpath/"brew.key") + assert_match(/^-----BEGIN EC PRIVATE KEY-----.*/, brew_key) + assert_match(/.*-----END EC PRIVATE KEY-----$/, brew_key) + shell_output("#{bin}/step certificate inspect --format json brew.crt > brew_crt.json") + brew_crt_json = JSON.parse(File.read(testpath/"brew_crt.json")) + assert_equal "CN=homebrew-smallstep-leaf", brew_crt_json["subject_dn"] + assert_equal "O=homebrew-smallstep-test, CN=homebrew-smallstep-test Intermediate CA", brew_crt_json["issuer_dn"] + ensure + Process.kill(9, pid) + Process.wait(pid) + end + end +end diff --git a/Formula/s/stepci.rb b/Formula/s/stepci.rb new file mode 100644 index 0000000000000..7477a0779e662 --- /dev/null +++ b/Formula/s/stepci.rb @@ -0,0 +1,48 @@ +class Stepci < Formula + desc "API Testing and Monitoring made simple" + homepage "https://stepci.com" + url "https://registry.npmjs.org/stepci/-/stepci-2.8.2.tgz" + sha256 "0ba4ed74a5f51414b0ed86651e37a1b5e6af4e027187bedfc94dbd2176793178" + license "MPL-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "98104a3592dd43f41522aae67073e1eed4344638c7501aa6617af89ee207d163" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + # https://docs.stepci.com/legal/privacy.html + ENV["STEPCI_DISABLE_ANALYTICS"] = "1" + + (testpath/"workflow.yml").write <<~YAML + version: "1.1" + name: Status Check + env: + host: example.com + tests: + example: + steps: + - name: GET request + http: + url: https://${{env.host}} + method: GET + check: + status: /^20/ + YAML + + expected = <<~EOS + Tests: 0 failed, 1 passed, 1 total + Steps: 0 failed, 0 skipped, 1 passed, 1 total + EOS + assert_match expected, shell_output("#{bin}/stepci run workflow.yml") + + assert_match version.to_s, shell_output("#{bin}/stepci --version") + end +end diff --git a/Formula/s/stern.rb b/Formula/s/stern.rb new file mode 100644 index 0000000000000..0989943d5318d --- /dev/null +++ b/Formula/s/stern.rb @@ -0,0 +1,30 @@ +class Stern < Formula + desc "Tail multiple Kubernetes pods & their containers" + homepage "https://github.com/stern/stern" + url "https://github.com/stern/stern/archive/refs/tags/v1.33.1.tar.gz" + sha256 "24101b69a65e5fcfa459806c9628540c8085e8427fb44a28b6daf8c865215878" + license "Apache-2.0" + head "https://github.com/stern/stern.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "af35aecefbd4c2b1be1e461142d3564e5b99560c4d219e3341298d2c7f0c33cf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b6dc5128e378f0c30fb217ca3942ac5a417500ab44f3afcb0d866b8312abf55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c9400bab425c16eb532dfe42f78d7b031a83585a5b0e581266776a1f30593339" + sha256 cellar: :any_skip_relocation, sonoma: "e4f18fd2df16ec8934441ca211882cbb6a0786df1382f2bf19aa60ce7698d14f" + sha256 cellar: :any_skip_relocation, arm64_linux: "09a7ad11ceae2bd689efa18a06031b9256cc2cce00906f12d97d3aafc71fb3dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ae5e78ab281417f4028b95007dac56edcd8ad20b630a9086529de253ab81671" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/stern/stern/cmd.version=#{version}") + + # Install shell completion + generate_completions_from_executable(bin/"stern", "--completion") + end + + test do + assert_match "version: #{version}", shell_output("#{bin}/stern --version") + end +end diff --git a/Formula/s/stgit.rb b/Formula/s/stgit.rb new file mode 100644 index 0000000000000..da1be16c715a1 --- /dev/null +++ b/Formula/s/stgit.rb @@ -0,0 +1,51 @@ +class Stgit < Formula + desc "Manage Git commits as a stack of patches" + homepage "https://stacked-git.github.io" + url "https://github.com/stacked-git/stgit/releases/download/v2.5.4/stgit-2.5.4.tar.gz" + sha256 "ccd8435177228f6a84a6b706e04c6d50bd5b3f5636b30270a6408e7b5b3254fc" + license "GPL-2.0-only" + head "https://github.com/stacked-git/stgit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68706dbfcc157701b6a546cba0a69f7cd5cd5f6dde1890e0381a9947aa98b9fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c96f21fe97582311cdc5abee743363ead3328f20a77184d94ddd6bcbd334cba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "489238c99e6439cdc34aab55027149540a5971ccafd700c2ffda734453688c93" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e61c0afc7c47bc38cb4d9ea60046cfac6bf5138d0107f45f66081830113d05c" + sha256 cellar: :any_skip_relocation, sonoma: "df156e1a803551b56953427f95d98d689686e98ad1a6243d47ab968c6eaaf80f" + sha256 cellar: :any_skip_relocation, ventura: "feed72e3869b2a795a8e40163844a1d4b5f689a46f9f6e8886e77696a94a24aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "fca60d8be3921d049e75dba241a9e06f3438db3a036aa1c64c1bc4e30759f53a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e98c643ace9a0f0c55e307c714b9a7686e90a01abfeac3f532ad35015880d1a2" + end + + depends_on "asciidoc" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "xmlto" => :build + depends_on "git" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "make", "prefix=#{prefix}", "install-bin", "install-man" + system "make", "prefix=#{prefix}", "-C", "contrib/vim", "install" + generate_completions_from_executable(bin/"stg", "completion") + end + + test do + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "brew@test.bot" + (testpath/"test").write "test" + system "git", "add", "test" + system "git", "commit", "--message", "Initial commit", "test" + system bin/"stg", "--version" + system bin/"stg", "init" + system bin/"stg", "new", "-m", "patch0" + (testpath/"test").append_lines "a change" + system bin/"stg", "refresh" + system bin/"stg", "log" + system "man", man/"man1/stg.1" + end +end diff --git a/Formula/s/stk.rb b/Formula/s/stk.rb new file mode 100644 index 0000000000000..05b620a4915e6 --- /dev/null +++ b/Formula/s/stk.rb @@ -0,0 +1,63 @@ +class Stk < Formula + desc "Sound Synthesis Toolkit" + homepage "https://ccrma.stanford.edu/software/stk/" + url "https://ccrma.stanford.edu/software/stk/release/stk-5.0.1.tar.gz" + sha256 "afc35faea3bb8baacacb8d9db3fa745e4f7d8dd46f36aac5436ca377d565a184" + license "MIT" + + livecheck do + url "https://ccrma.stanford.edu/software/stk/download.html" + regex(/href=.*?stk[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "33c29e2a776f2b13912844ce37fd744fc1b4f0866f134b2a3ec62bd7d5333fc3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "140113c25ddb581acbd291f3671b2657562ff8237c62abe8db42ba2e3e3297f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b50969de86e485eb0ea91411ecfa5ef8c531fa5da68a0d8f1df49c196339aed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8cf614b99101345ec67c8bf4d63bee7b765ce0025cff30b9e61487b112768437" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d55edfca37504873b9b03ee40c0b369a804c6623b33e0e46937f4c97f9513efe" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5755ac96f6b41e1cb2b94c4e112fad6ce671ce4bdb146fa1324e923f9e092bf0" + sha256 cellar: :any_skip_relocation, sonoma: "68cf2df4d1e9ba32def2c769a1a82933b4b4a93c609b42531a2fcb4874cbd577" + sha256 cellar: :any_skip_relocation, ventura: "18f8a96c836e1e8f9431e9940314f18774492625bc1c51813ebc029b57cd8eca" + sha256 cellar: :any_skip_relocation, monterey: "9f175bb0213ef53e309396354a64c1cc400728a4023cd7d153d67124cfbddeb0" + sha256 cellar: :any_skip_relocation, big_sur: "d2dc36b8b8616a0f43bff5137e924c63606ab52509329f1e2df8d4b75aea28f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "d940bdd5baa984fa5773f4e3a88fbadc294cbbad08cb13cd802fcfae2c93fba4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64cfa5d539dc990021c45a9848fc8d34252138791ffb7f3a1bba0dd13d76489c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + on_linux do + depends_on "alsa-lib" + end + + def install + system "./configure", *std_configure_args.reject { |s| s["--disable-dependency-tracking"] } + system "make" + + lib.install "src/libstk.a" + bin.install "bin/treesed" + + (include/"stk").install Dir["include/*"] + doc.install Dir["doc/*"] + pkgshare.install "src", "projects", "rawwaves" + end + + def caveats + <<~EOS + The header files have been put in a standard search path, it is possible to use an include statement in programs as follows: + + #include "stk/FileLoop.h" + #include "stk/FileWvOut.h" + + src/ projects/ and rawwaves/ have all been copied to #{opt_pkgshare} + EOS + end + + test do + assert_equal "xx No input files", shell_output("#{bin}/treesed", 1).chomp + end +end diff --git a/Formula/s/stlink.rb b/Formula/s/stlink.rb new file mode 100644 index 0000000000000..c46ea94672646 --- /dev/null +++ b/Formula/s/stlink.rb @@ -0,0 +1,58 @@ +class Stlink < Formula + desc "STM32 discovery line Linux programmer" + homepage "https://github.com/stlink-org/stlink" + url "https://github.com/stlink-org/stlink/archive/refs/tags/v1.8.0.tar.gz" + sha256 "cff760b5c212c2cc480f705b9ca7f3828d6b9c267950c6a547002cd0a1f5f6ac" + license "BSD-3-Clause" + head "https://github.com/stlink-org/stlink.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "7cc317395306550102803a7cd3ee1416ab2d7bcc0993d8641a5d1a879df58cce" + sha256 arm64_sequoia: "234d04d230556d8342bc80d9d8564e7c643f86ebd39c8e3d9cd10667076c4459" + sha256 arm64_sonoma: "182146c51940a4851235c5a1e66e0a1455d5833a112537c366b68314f4280d62" + sha256 arm64_ventura: "11f6ede1d7a55e0ceb814ea59df7e88560f317fd9ed9d1bf47c9905bb1b28b68" + sha256 arm64_monterey: "5aec98fdb4a07aa5abfd1292ec15bf9c385869845fc107c905f35baf2c21bb75" + sha256 sonoma: "123d84cd6f2bdeeabce247febb96aed963876789e3e23bec7312098b2590483c" + sha256 ventura: "96b6ee1f313c0b377a3882eb33191164b751f171dd1ba2c6c9e8ef525b663798" + sha256 monterey: "5c33e3d172d272295fa0d27e08d80fd86e0429156e44b72b934898c11d08ab11" + sha256 arm64_linux: "4b0deecf90ccc793307fb68a4b72e13a7cd8eebf05012ad6d26fd4f2adfa80e7" + sha256 x86_64_linux: "7872c14d351e27c5953bc0565d4eb64312d3e54abc898b05197af8a631abab2c" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + # upstream PR ref, https://github.com/stlink-org/stlink/pull/1373 + patch do + url "https://github.com/stlink-org/stlink/commit/4eafbb29d106b32221c8d3b375b31d78f07de182.patch?full_index=1" + sha256 "a745b3f10eb9c831838afc53e94038f61b29cdbe70970d3417d15f0db5301791" + end + patch do + url "https://github.com/stlink-org/stlink/commit/d742e752d896c0f8d4a61b282457401f7a681b16.patch?full_index=1" + sha256 "1f86ccdcb6bbf2d8cf53d6c96e76c1f11aef83c9de0e8dbe9b8d5cafab02c28d" + end + + def install + libusb = Formula["libusb"] + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DLIBUSB_INCLUDE_DIR=#{libusb.opt_include}/libusb-#{libusb.version.major_minor} + -DLIBUSB_LIBRARY=#{libusb.opt_lib/shared_library("libusb-#{libusb.version.major_minor}")} + ] + if OS.linux? + args << "-DSTLINK_MODPROBED_DIR=#{lib}/modprobe.d" + args << "-DSTLINK_UDEV_RULES_DIR=#{lib}/udev/rules.d" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "st-flash #{version}", shell_output("#{bin}/st-flash --debug reset 2>&1", 255) + end +end diff --git a/Formula/s/stm32flash.rb b/Formula/s/stm32flash.rb new file mode 100644 index 0000000000000..3b7a0558b0142 --- /dev/null +++ b/Formula/s/stm32flash.rb @@ -0,0 +1,39 @@ +class Stm32flash < Formula + desc "Open source flash program for STM32 using the ST serial bootloader" + homepage "https://sourceforge.net/projects/stm32flash/" + url "https://downloads.sourceforge.net/project/stm32flash/stm32flash-0.7.tar.gz" + sha256 "c4c9cd8bec79da63b111d15713ef5cc2cd947deca411d35d6e3065e227dc414a" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/stm32flash[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8e474cef1409121473bd9d5faaee88d9a164949b2b6f3bba17dff7a20875383" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b888c0246ff2ed980cc2ca7e08e8890641bec73f22a47dea03dad402dfaff6e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b07e1d419f8b53f22dbd8479b61446e99cf2f9fcad620af12ab8cbcce21d27f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "069b91e908bd359fa0e012376d4eb6718c4ac734319ba06d6dd4e74359528a96" + sha256 cellar: :any_skip_relocation, arm64_monterey: "38b8fa0ed69728d5241842266710e1a788e50bd1ceab7fa2a01606dbb62cf887" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e8d0be7957abf2048e99a1fea198a207be5edbd7ccdb402b8bfe650575ac64ef" + sha256 cellar: :any_skip_relocation, sonoma: "953034cea97ccfa773a277c96d39f008ab73849a7d709feb453b6fc990955407" + sha256 cellar: :any_skip_relocation, ventura: "10f5d11bf70e2d5f4b7bcc15468c698d90bf3fef80f7a9242aa0590d69fead89" + sha256 cellar: :any_skip_relocation, monterey: "eb2bcf9748b22a6d1809d675ad765345f0f539d0dbf49449d0977618e4e7f019" + sha256 cellar: :any_skip_relocation, big_sur: "b3a9d072fce40d5fd3af1f86019966abf4d4a711b26ad8539ec382aa6dfc5848" + sha256 cellar: :any_skip_relocation, catalina: "8e76969a80aef9a483e6ad09064f1b7d08e2d5e02829c12d2dc0e9a31256f9a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c3d8911cbf5af6047635b5c494c369f587fe8b8a904a88e3b8fd9e0a2e897d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b63e10544099db4a148fefe54fe036746f96ab2e1d637e73702ae458cb442f93" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + output = shell_output("#{bin}/stm32flash -k /dev/tty.XYZ 2>&1", 1) + assert_match "Failed to open port: /dev/tty.XYZ", output + end +end diff --git a/Formula/s/stockfish.rb b/Formula/s/stockfish.rb new file mode 100644 index 0000000000000..08246b451de0a --- /dev/null +++ b/Formula/s/stockfish.rb @@ -0,0 +1,45 @@ +class Stockfish < Formula + desc "Strong open-source chess engine" + homepage "https://stockfishchess.org/" + url "https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_17.1.tar.gz" + sha256 "0cfd9396438798cc68f5c0d5fa0bb458bb8ffff7de06add841aaeace86bec1f1" + license "GPL-3.0-only" + head "https://github.com/official-stockfish/Stockfish.git", branch: "master" + + livecheck do + url :stable + regex(/^sf[._-]v?(\d+(?:\.\d+)*)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c99cb199ddc359a18b48b75a93e5f1367b402e249ae9a86c9ca2d28608ece13" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f29f5e67075aa8ce69609853e6e9fd44bf6a51104b38fa2b63b265ed9295eef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ae4b4a92ca51af55b0533ee78f1571fb3e3116bb1c8a66e0efb0d2c7697159b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "817c688cfc9d4222e1d8b7b825eaef6050deeb047023454fbc0c883d946e3be3" + sha256 cellar: :any_skip_relocation, sonoma: "0747984f92b6ad9f16502e626b04f9acc22f5db93b15b23361f6afe430d719c3" + sha256 cellar: :any_skip_relocation, ventura: "5bdbb215c398e2eff9da2a249e81765b0ed403ff6ee75be84274aaf79b8728e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "927330b6c83490eec6fbce9767fb3a48c9f18d9f2851084c8abe0d32940931c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a9d4a3b90c9997b46ca4d7c70fbb0511c2922a51e8f6e9648cc876d0c296a3f" + end + + def install + arch = if !build.bottle? + "native" + elsif Hardware::CPU.arm? && OS.mac? + "apple-silicon" + elsif Hardware::CPU.arm? + "armv8" + elsif OS.mac? && MacOS.version.requires_sse41? + "x86-64-sse41-popcnt" + else + "x86-64-ssse3" + end + + system "make", "-C", "src", "build", "ARCH=#{arch}" + bin.install "src/stockfish" + end + + test do + system bin/"stockfish", "go", "depth", "20" + end +end diff --git a/Formula/s/stoken.rb b/Formula/s/stoken.rb new file mode 100644 index 0000000000000..9aacdfcfeaa27 --- /dev/null +++ b/Formula/s/stoken.rb @@ -0,0 +1,44 @@ +class Stoken < Formula + desc "Tokencode generator compatible with RSA SecurID 128-bit (AES)" + homepage "https://github.com/stoken-dev/stoken" + url "https://github.com/stoken-dev/stoken/archive/refs/tags/v0.93.tar.gz" + sha256 "102e2d112b275efcdc20ef438670e4f24f08870b9072a81fda316efcc38aef9c" + license "LGPL-2.1-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "50574ec281fdb4bdce8082f2c97aa52b786cb608efae7fea65338023542b6ee1" + sha256 cellar: :any, arm64_sequoia: "07719ef72ddd93085d5cea66cf89371b128668f37532f9996d595f7280f46ef7" + sha256 cellar: :any, arm64_sonoma: "ef8f9c9c4a3edbf707c41392dc366204f0a65ed60420b192108cf20f5a84c18e" + sha256 cellar: :any, arm64_ventura: "d8f2d8b3a88c1361a7f82da8aeccc3272f568d9ec9fb031dd547f76bc865d76e" + sha256 cellar: :any, arm64_monterey: "bd715ff4141234ceacd14910254d1b372b98fca4e490286017055b9345a66b69" + sha256 cellar: :any, arm64_big_sur: "b14841f8656142a47ad851e2e524642dd71c4ee7c568abfbbe626bf2570d4336" + sha256 cellar: :any, sonoma: "8b6a3bb0bc8d471162e70570a9effdc056f007d43eeb6974b452518fe6c4162f" + sha256 cellar: :any, ventura: "205dca5a696dfd3a9e7ccd43300325209397b32793ea336d2d80b8d93a45369b" + sha256 cellar: :any, monterey: "14c75a261aa3357a8bbc8da63403727e3dc975df604973235d35da28f58c25da" + sha256 cellar: :any, big_sur: "59e08afd001c42067ef8502638958742426da6bbdae56ac5b731a5aa4bcbbe51" + sha256 cellar: :any_skip_relocation, arm64_linux: "0db93a098ac78ca584ee522259e255cdbf0d9e2d567aee98173a7e546c53e18e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bc692874b7298e95206d14dfbafa4fe4344f1b1fa07ad394ec318215f09220a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "nettle" + + uses_from_macos "libxml2" + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "check" + system "make", "install" + end + + test do + system bin/"stoken", "show", "--random" + end +end diff --git a/Formula/s/stolon.rb b/Formula/s/stolon.rb new file mode 100644 index 0000000000000..b7d2482be32d5 --- /dev/null +++ b/Formula/s/stolon.rb @@ -0,0 +1,65 @@ +class Stolon < Formula + desc "Cloud native PostgreSQL manager for high availability" + homepage "https://github.com/sorintlab/stolon" + url "https://github.com/sorintlab/stolon/archive/refs/tags/v0.17.0.tar.gz" + sha256 "dad967378e7d0c5ee1df53a543e4f377af2c4fea37e59f3d518d67274cff5b34" + license "Apache-2.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b989bb383b1ce5523628d9b310afe7a911ab92f8e9797aaa8ea655ec576ebd05" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5a9cff2775f8b7655d68bd8899ae8090a23c1d38add3f842fd850ea5fdd3b258" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5051a16e7d948aac0ba138307c7a1a3a5f53e1ca0683bef81823bdb752037002" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e2ff141e91b71942f67871741dabcd110310a06c72d68ce361391e2a1ce233ee" + sha256 cellar: :any_skip_relocation, arm64_monterey: "17af62bc7751903d4f85e447907825f3bf4df255263487c47b44e299a9b196be" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "767212e3c8d9dc59a030aa96083a48f42be86fa4c43b1df2158c6d3d9fa50f54" + sha256 cellar: :any_skip_relocation, sonoma: "9c7dcb4122593003e6ced2dc77fada593f90c897a0ff6f23b607d530d554cdcd" + sha256 cellar: :any_skip_relocation, ventura: "ca9b4d2758cdb30d4d68573285228d3ee30f007b0a10f2b1981fca2b5f3ed300" + sha256 cellar: :any_skip_relocation, monterey: "6e82da7f0cd74193592f16415ba7386c7483bf9006814177df8086cc96e7b57a" + sha256 cellar: :any_skip_relocation, big_sur: "2955ce82d16c3601d928d8f7125bda27dde894fd9e8b8c8e2025a178c38cb640" + sha256 cellar: :any_skip_relocation, catalina: "6f8469a79e442788d8a8c774c7097ee45d1deeebb17968c79e4efbd37965e69f" + sha256 cellar: :any_skip_relocation, arm64_linux: "67caae9099da0e3af8994b0eac951f6148883b71cfdee78cd15a911bcf4b7d15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30ca55abf39725e1760d6610e38ea05f089fd382724da55c170f2cf914ee1050" + end + + depends_on "go" => :build + depends_on "etcd" => :test + depends_on "libpq" + + def install + ldflags = "-s -w -X github.com/sorintlab/stolon/cmd.Version=#{version}" + + %w[ + stolonctl ./cmd/stolonctl + stolon-keeper ./cmd/keeper + stolon-sentinel ./cmd/sentinel + stolon-proxy ./cmd/proxy + ].each_slice(2) do |bin_name, src_path| + system "go", "build", *std_go_args(ldflags:, output: bin/bin_name), src_path + end + end + + test do + endpoint = "http://127.0.0.1:2379" + pid = spawn "etcd", "--advertise-client-urls", endpoint, "--listen-client-urls", endpoint + + sleep 5 + + assert_match "stolonctl version #{version}", + shell_output("#{bin}/stolonctl version 2>&1") + output = shell_output("#{bin}/stolonctl status --cluster-name test " \ + "--store-backend etcdv3 --store-endpoints #{endpoint} 2>&1", 1) + assert_match "nil cluster data: ", output + assert_match "stolon-keeper version #{version}", + shell_output("#{bin}/stolon-keeper --version 2>&1") + assert_match "stolon-sentinel version #{version}", + shell_output("#{bin}/stolon-sentinel --version 2>&1") + assert_match "stolon-proxy version #{version}", + shell_output("#{bin}/stolon-proxy --version 2>&1") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/stone.rb b/Formula/s/stone.rb new file mode 100644 index 0000000000000..437e9c790e3dd --- /dev/null +++ b/Formula/s/stone.rb @@ -0,0 +1,40 @@ +class Stone < Formula + desc "TCP/IP packet repeater in the application layer" + homepage "https://www.gcd.org/sengoku/stone/" + url "https://www.gcd.org/sengoku/stone/stone-2.4.tar.gz" + sha256 "d5dc1af6ec5da503f2a40b3df3fe19a8fbf9d3ce696b8f46f4d53d2ac8d8eb6f" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?stone[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6fb8cbc29b5fe932beb7b3af3f5d6c2d19bb2498bbbbba15ea02c75c16a8a684" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea5e1f4e87879d1281b96a0ee7950c74e639429d622fe4e4ecfa2c2155ddc051" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8db3b91a892716e56362887cdc17006d43abdb00f9897be80c1a06953cbed0ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd7a8b20854a50d343960a965e340d0178fd82728e7c74025146b2ac053b24a0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a4274010ee7d7f736080d17b23ee12250fc7f68a530c9149a0a625922a9db1bc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "47a2008041ad4e5e76fe87a4218d4c21e5b1a2cea828aa97b9e9e5b6c6ecc882" + sha256 cellar: :any_skip_relocation, sonoma: "10a43ae132027d4493cde68c07c224bf59869c626b3f9d2f1f5583a16486acdf" + sha256 cellar: :any_skip_relocation, ventura: "f6a0ba71f94f62594fe4e859a9be7b4616f8984410f7de532112f8c7f5566c97" + sha256 cellar: :any_skip_relocation, monterey: "dc89da0846364ce236eed2a2cfe0eb39abd9dc71f42f3b357d6a5709efb025d5" + sha256 cellar: :any_skip_relocation, big_sur: "f943cab7f931ae2b7c124a83b63150b9c3b75090eb63353fbe0732792b97a0bf" + sha256 cellar: :any_skip_relocation, catalina: "cadf40dd1d8aa5de47b9d3d3baa5bbc22fc5a8a50abe688e77520b035369f492" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7847a7917f3d83398ed86e5889bc83306bb80e73734bd1157aa72856b498f9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1986132ca2eabd91ea5b1193fefabc4f5af2253df1b4e720df4ddf4cddf433a0" + end + + def install + os = OS.mac? ? "macosx" : OS.kernel_name.downcase + system "make", os + bin.install "stone" + end + + test do + assert_match version.to_s, shell_output("#{bin}/stone -h 2>&1", 1) + end +end diff --git a/Formula/s/storj-uplink.rb b/Formula/s/storj-uplink.rb new file mode 100644 index 0000000000000..971a6305e68d0 --- /dev/null +++ b/Formula/s/storj-uplink.rb @@ -0,0 +1,44 @@ +class StorjUplink < Formula + desc "Uplink CLI for the Storj network" + homepage "https://storj.io" + url "https://github.com/storj/storj/archive/refs/tags/v1.141.2.tar.gz" + sha256 "7a939f34485cbeb04fdfbeb84e68e005637a88f08b0f3c75c5b69a36c144b5c0" + license "AGPL-3.0-only" + + # Upstream creates stable releases and marks them as "pre-release" before + # release (though some versions have permanently remained as "pre-release"), + # so it's necessary to check releases. However, upstream has not marked + # recent releases as "latest", so it's necessary to check all releases. + # NOTE: We should return to using the `GithubLatest` strategy if/when + # upstream reliably marks stable releases as "latest" again. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3624adbd0963382eb09c6b5cb8fa1215b547dba56b9824840f65ffa995742bbe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3624adbd0963382eb09c6b5cb8fa1215b547dba56b9824840f65ffa995742bbe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3624adbd0963382eb09c6b5cb8fa1215b547dba56b9824840f65ffa995742bbe" + sha256 cellar: :any_skip_relocation, sonoma: "f8efb0aebe88ad10602d8df3ea90d751016311ea5f0c9e1a8d577bb0e81f23e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce0fc4f7d3f1b8115dea5253f244dfe54aa9a318022b8a8bcbc54b3ff1b13dce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73a1472737580d5e7c9570a0fa31fed52ff32168331d06b6f7ec5531c43c6336" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"uplink"), "./cmd/uplink" + end + + test do + (testpath/"config.ini").write <<~INI + [metrics] + addr= + INI + ENV["UPLINK_CONFIG_DIR"] = testpath.to_s + ENV["UPLINK_INTERACTIVE"] = "false" + assert_match "No accesses configured", shell_output("#{bin}/uplink ls 2>&1", 1) + end +end diff --git a/Formula/s/storm.rb b/Formula/s/storm.rb new file mode 100644 index 0000000000000..ed96063163ba6 --- /dev/null +++ b/Formula/s/storm.rb @@ -0,0 +1,27 @@ +class Storm < Formula + include Language::Python::Shebang + + desc "Distributed realtime computation system to process data streams" + homepage "https://storm.apache.org" + url "https://dlcdn.apache.org/storm/apache-storm-2.8.3/apache-storm-2.8.3.tar.gz" + sha256 "5bb6bfe2f2601a1880c64d25fb58d8fb7f0ca73f1638ba1d8655ba97a9d01c47" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "18c64ba42280e7533e27aa5c7ba404c39d244805bf0dd5eb9a5b2eae9bf1f83c" + end + + depends_on "openjdk" + + uses_from_macos "python" + + def install + libexec.install Dir["*"] + (bin/"storm").write_env_script libexec/"bin/storm", Language::Java.overridable_java_home_env + rewrite_shebang detected_python_shebang(use_python_from_path: true), libexec/"bin/storm.py" + end + + test do + system bin/"storm", "version" + end +end diff --git a/Formula/s/stormlib.rb b/Formula/s/stormlib.rb new file mode 100644 index 0000000000000..f225060cac06c --- /dev/null +++ b/Formula/s/stormlib.rb @@ -0,0 +1,65 @@ +class Stormlib < Formula + desc "Library for handling Blizzard MPQ archives" + homepage "http://www.zezula.net/en/mpq/stormlib.html" + url "https://github.com/ladislav-zezula/StormLib/archive/refs/tags/v9.30.tar.gz" + sha256 "a709a6b034d206404f5297d85e474371203ff5483639955195d99b737bbf7dfe" + license "MIT" + head "https://github.com/ladislav-zezula/StormLib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "55a00376dd07d9b9f252c70f9ade35fe2a786951fe35316a0a27c05035f7b2bf" + sha256 cellar: :any, arm64_sequoia: "8b6795782ad6b2795e25bdc5a551043daaa07350632a4832bb6cc1405f4fedf2" + sha256 cellar: :any, arm64_sonoma: "bb576754765e94f0857c3c2185433e40049c6e27defe7ad2527a72d4c4371db2" + sha256 cellar: :any, arm64_ventura: "b7f557770e52c0f9174dcc39378f37e271039449a9c0440ca1e1ad29bcbdef0f" + sha256 cellar: :any, sonoma: "18bae47580410061160fd52e508b6fc253ef4a07b8ec47049d29a3ec03706615" + sha256 cellar: :any, ventura: "7aa4237edb1220fb6bd6176e6d7783b003089d991adb5e321c231871db752088" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3893cc39b6b522946b66c160f243d917c951a26f6f65f2b8a883c1648d653b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61ecc0f8d4f072d3009874a20c7cc3419e8e7857a3be60865908880a9f949825" + end + + depends_on "cmake" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # prevents cmake from trying to write to /Library/Frameworks/ + patch :DATA + + def install + system "cmake", "-S", ".", "-B", "build/static", *std_cmake_args + system "cmake", "--build", "build/static" + system "cmake", "--install", "build/static" + + system "cmake", "-S", ".", "-B", "build/shared", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + printf("%s", STORMLIB_VERSION_STRING); + return 0; + } + C + system ENV.cc, "-o", "test", "test.c" + assert_equal version.to_s, shell_output("./test") + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9cf1050..b33e544 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -340,7 +340,6 @@ if(BUILD_SHARED_LIBS) + message(STATUS "Linking against dependent libraries dynamically") + + if(APPLE) +- set_target_properties(${LIBRARY_NAME} PROPERTIES FRAMEWORK true) + set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-framework Carbon") + endif() + if(UNIX) diff --git a/Formula/s/stormy.rb b/Formula/s/stormy.rb new file mode 100644 index 0000000000000..01af59e56d594 --- /dev/null +++ b/Formula/s/stormy.rb @@ -0,0 +1,31 @@ +class Stormy < Formula + desc "Minimal, customizable and neofetch-like weather CLI based on rainy" + homepage "https://github.com/ashish0kumar/stormy" + url "https://github.com/ashish0kumar/stormy/archive/refs/tags/v0.3.3.tar.gz" + sha256 "b53d479643599c733090ebf54eebd582eb3fe5faf5148015770f0ab594dc6464" + license "MIT" + head "https://github.com/ashish0kumar/stormy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "67985bd5741387e48074e5ea65d239509ea4474a1a5d81c613772eac32d5df34" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f5afa7f01c4edb5cc517ce4526a3a406b68137f228168d2210f035844d0858b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9f5afa7f01c4edb5cc517ce4526a3a406b68137f228168d2210f035844d0858b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f5afa7f01c4edb5cc517ce4526a3a406b68137f228168d2210f035844d0858b" + sha256 cellar: :any_skip_relocation, sonoma: "736f0c364525cc53e357beede4b8c7688664fd0f89044e8b05b9d248376ebdd3" + sha256 cellar: :any_skip_relocation, ventura: "736f0c364525cc53e357beede4b8c7688664fd0f89044e8b05b9d248376ebdd3" + sha256 cellar: :any_skip_relocation, arm64_linux: "62c64a85488c29dd54fac3f317313479a551254db1771a0133dca1f007904323" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42244149b73dcd15de4070a2e282295a93fa36766da806e1d3e7e138eede3800" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "Weather", shell_output("#{bin}/stormy --city London") + assert_match "Error: City must be set in the config file or via command line flags", + shell_output("#{bin}/stormy 2>&1", 1) + end +end diff --git a/Formula/s/stow.rb b/Formula/s/stow.rb new file mode 100644 index 0000000000000..c8b2ce647d415 --- /dev/null +++ b/Formula/s/stow.rb @@ -0,0 +1,33 @@ +class Stow < Formula + desc "Organize software neatly under a single directory tree (e.g. /usr/local)" + homepage "https://www.gnu.org/software/stow/" + url "https://ftpmirror.gnu.org/gnu/stow/stow-2.4.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/stow/stow-2.4.1.tar.gz" + sha256 "2a671e75fc207303bfe86a9a7223169c7669df0a8108ebdf1a7fe8cd2b88780b" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "74d7b0d6d849528a320c63802f21390c65a700a28295f546be29d5b87d78b25f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4c48d441c3aec3763807b9937c6f8e0aa118fd3e8726f4419ffe3928a4f4ae0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4c48d441c3aec3763807b9937c6f8e0aa118fd3e8726f4419ffe3928a4f4ae0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "22e553b127f24001900605515df147dff27f5eb0b99805d63de1bcffb1c5a0d3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "22e553b127f24001900605515df147dff27f5eb0b99805d63de1bcffb1c5a0d3" + sha256 cellar: :any_skip_relocation, sonoma: "4829b15c46ae06aebd28e6ca0148f7b743de698041f4f8dd1c88b8e1e2fb7f1b" + sha256 cellar: :any_skip_relocation, ventura: "50ca7991910a8b752ee6d5504f8cab1e2012de4759d517c68e1389f42c952242" + sha256 cellar: :any_skip_relocation, monterey: "50ca7991910a8b752ee6d5504f8cab1e2012de4759d517c68e1389f42c952242" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0c8d1eb137984030db04350a3efc522c26a486be22f6e940dbcd0f30927edf9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99e225c98e4bbc9dfaa3a6dfbeea16b9e2f91bacc18801212902fbb81962f73a" + end + + uses_from_macos "perl" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test").mkpath + system bin/"stow", "-nvS", "test" + end +end diff --git a/Formula/s/stp.rb b/Formula/s/stp.rb new file mode 100644 index 0000000000000..024f5692095a5 --- /dev/null +++ b/Formula/s/stp.rb @@ -0,0 +1,116 @@ +class Stp < Formula + desc "Simple Theorem Prover, an efficient SMT solver for bitvectors" + homepage "https://stp.github.io/" + license "MIT" + revision 6 + head "https://github.com/stp/stp.git", branch: "master" + + stable do + url "https://github.com/stp/stp/archive/refs/tags/2.3.4.tar.gz" + sha256 "dc197e337c058dc048451b712169a610f7040b31d0078b6602b831fbdcbec990" + + # Replace distutils for python 3.12+ + patch do + url "https://github.com/stp/stp/commit/fb185479e760b6ff163512cb6c30ac9561aadc0e.patch?full_index=1" + sha256 "7e50f26901e31de4f84ceddc1a1d389ab86066a8dcbc5d88e9ec1f0809fa0909" + end + end + + livecheck do + url :stable + regex(/^(?:stp[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1b28ac9825ba0a6908354c4b8959bf7cb34317639b8c288a7b309886960a4088" + sha256 cellar: :any, arm64_sequoia: "91f0848cba55dcbfbdbbef7220828ff7c1a23a332e3327b46257e763c8fde991" + sha256 cellar: :any, arm64_sonoma: "f20320e0a370b7cff73244f7f078ca3a3b709a38a22c0e2a08c5b2d91592fd9b" + sha256 cellar: :any, sonoma: "bbb526b8193afe56890171c943f6b9181cf6c29cad87fb39ce2835bf65d5efa0" + sha256 cellar: :any_skip_relocation, arm64_linux: "6baee7b408a2d1d6d18d0f4a2cac1e22831d7b0233d4f22901013ffcef5e8051" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a7ca336edc0743c191c4be54bbca7afb134845f04e05b247f142d6d43f8f7e8" + end + + # stp refuses to build with system bison and flex + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "flex" => :build + depends_on "boost" + depends_on "cryptominisat" + depends_on "gmp" + depends_on "minisat" + depends_on "python@3.14" + + uses_from_macos "perl" + + # Use relative import for library_path + patch do + url "https://github.com/stp/stp/commit/f81d16c4f15863dd742d220d31db646b5d1c824d.patch?full_index=1" + sha256 "c0c38f39371cfc9959df522957f45677f423a6b2d861f4ad87097c9201e00ff4" + end + + def install + python = "python3.14" + site_packages = prefix/Language::Python.site_packages(python) + site_packages.mkpath + inreplace "lib/Util/GitSHA1.cpp.in", "@CMAKE_CXX_COMPILER@", ENV.cxx + + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which(python)}", + "-DPYTHON_LIB_INSTALL_DIR=#{site_packages}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"prob.smt").write <<~EOS + (set-logic QF_BV) + (assert (= (bvsdiv (_ bv3 2) (_ bv2 2)) (_ bv0 2))) + (check-sat) + (exit) + EOS + assert_equal "sat", shell_output("#{bin}/stp --SMTLIB2 prob.smt").chomp + + (testpath/"test.c").write <<~C + #include "stp/c_interface.h" + #include + int main() { + VC vc = vc_createValidityChecker(); + Expr c = vc_varExpr(vc, "c", vc_bvType(vc, 32)); + Expr a = vc_bvConstExprFromInt(vc, 32, 5); + Expr b = vc_bvConstExprFromInt(vc, 32, 6); + Expr xp1 = vc_bvPlusExpr(vc, 32, a, b); + Expr eq = vc_eqExpr(vc, xp1, c); + Expr eq2 = vc_notExpr(vc, eq); + int ret = vc_query(vc, eq2); + assert(ret == false); + vc_printCounterExample(vc); + vc_Destroy(vc); + return 0; + } + C + + expected_output = <<~EOS + COUNTEREXAMPLE BEGIN:\s + ASSERT( c = 0x0000000B ); + COUNTEREXAMPLE END:\s + EOS + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lstp", "-o", "test" + assert_equal expected_output.chomp, shell_output("./test").chomp + + (testpath/"test.py").write <<~PYTHON + import stp + s = stp.Solver() + a = s.bitvec('a', 32) + b = s.bitvec('b', 32) + c = s.bitvec('c', 32) + s.add(a == 5) + s.add(b == 6) + s.add(a + b == c) + print(s.check()) + PYTHON + + assert_equal "True\n", shell_output("python3.14 test.py") + end +end diff --git a/Formula/s/strace.rb b/Formula/s/strace.rb new file mode 100644 index 0000000000000..7a738431ae055 --- /dev/null +++ b/Formula/s/strace.rb @@ -0,0 +1,34 @@ +class Strace < Formula + desc "Diagnostic, instructional, and debugging tool for the Linux kernel" + homepage "https://strace.io/" + url "https://github.com/strace/strace/releases/download/v6.17/strace-6.17.tar.xz" + sha256 "0a7c7bedc7efc076f3242a0310af2ae63c292a36dd4236f079e88a93e98cb9c0" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "2605dc7f27f7774008e3cd7cdf12a67e986de00d103bff1acc2d008c55c5f3af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc9dd34f25bbd09b7608053eccb787add86d50049218f9c2c4120735339cc549" + end + + head do + url "https://github.com/strace/strace.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on :linux + + def install + system "./bootstrap" if build.head? + system "./configure", "--disable-silent-rules", + "--enable-mpers=no", # FIX: configure: error: Cannot enable m32 personality support + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + out = `"strace" "true" 2>&1` # strace the true command, redirect stderr to output + assert_match "execve(", out + assert_match "+++ exited with 0 +++", out + end +end diff --git a/Formula/s/streamlink.rb b/Formula/s/streamlink.rb new file mode 100644 index 0000000000000..9825e5c9d74a9 --- /dev/null +++ b/Formula/s/streamlink.rb @@ -0,0 +1,134 @@ +class Streamlink < Formula + include Language::Python::Virtualenv + + desc "CLI for extracting streams from various websites to a video player" + homepage "https://streamlink.github.io/" + url "https://files.pythonhosted.org/packages/51/8c/6c3d281451dd46751b03a16b297bdf16b3145e5051c1c3c7335a59576c2f/streamlink-7.6.0.tar.gz" + sha256 "a1df953fab7dab55c61f563b533ce237159a1b48f6159bec95e907857fc09266" + license "BSD-2-Clause" + head "https://github.com/streamlink/streamlink.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2edcd6af5d9da9284e198dcf60268c7c4ddb994c372757a5ab3a233ad0a93a57" + sha256 cellar: :any, arm64_sequoia: "c5b729c2dbe81dfbb6b52951257e064273fbe469100e8ad4a510b803944be20f" + sha256 cellar: :any, arm64_sonoma: "7a7ec732c85252af37e9ebf518c76871e578ceb9e96ebce241966a573f893f65" + sha256 cellar: :any, sonoma: "c7269135c446658c7cbb7156acf53e1403e34d1c0c1585c5c170a80c4fbd764c" + sha256 cellar: :any_skip_relocation, arm64_linux: "174df4b2d5f4c07ad97a97562b8f9aed88dbb956fa80c0b20b0ca4fc4b28ebab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a395f24acfaf7dc48e1d0eb085f47f3cfcfe24bf9782c718b286836b5d66365f" + end + + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "libxml2" # https://github.com/Homebrew/homebrew-core/issues/98468 + depends_on "python@3.14" + + uses_from_macos "libffi" + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "certifi" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "isodate" do + url "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz" + sha256 "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "outcome" do + url "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz" + sha256 "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" + end + + resource "pycountry" do + url "https://files.pythonhosted.org/packages/76/57/c389fa68c50590881a75b7883eeb3dc15e9e73a0fdc001cdd45c13290c92/pycountry-24.6.1.tar.gz" + sha256 "b61b3faccea67f87d10c1f2b0fc0be714409e8fcdcc1315613174f6466c10221" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/76/8f/c6e36dd11201e2a565977d8b13f0b027ba4593c1a80bed5185489178e257/trio-0.31.0.tar.gz" + sha256 "f71d551ccaa79d0cb73017a33ef3264fde8335728eb4c6391451fe5d253a9d5b" + end + + resource "trio-websocket" do + url "https://files.pythonhosted.org/packages/d1/3c/8b4358e81f2f2cfe71b66a267f023a91db20a817b9425dd964873796980a/trio_websocket-0.12.2.tar.gz" + sha256 "22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"streamlink", "https://player.vimeo.com/video/941078932", "240p", "-o", "video.mp4" + assert_match "video.mp4: data", shell_output("file video.mp4") + + output = shell_output("#{bin}/streamlink --ffmpeg-no-validation -l debug https://ok.ru/video/1643385658936") + assert_match "Available streams:", output + refute_match "error", output + refute_match "Could not find metadata", output + end +end diff --git a/Formula/s/streamrip.rb b/Formula/s/streamrip.rb new file mode 100644 index 0000000000000..c4d263f16e28b --- /dev/null +++ b/Formula/s/streamrip.rb @@ -0,0 +1,209 @@ +class Streamrip < Formula + include Language::Python::Virtualenv + + desc "Scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer" + homepage "https://github.com/nathom/streamrip" + # Test dependencies should be removed, so they are added to `pypi_packages` + # `pygments` should be added manually, it is removed with test dependencies + # PR ref: https://github.com/nathom/streamrip/pull/886 + url "https://files.pythonhosted.org/packages/b8/c9/6997772e0217f3081e4e692c7b8b104aaa564c008f2593341e81bbbd2396/streamrip-2.1.0.tar.gz" + sha256 "e59b4b406f9ac77eb59c927a1a082644e0902152ffeb6212b6b24af7fbef5540" + license "GPL-3.0-only" + revision 4 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3cb99ccc280138a02c60a02338de7102ecabd0b9c0d5e2338a7de73f656a518d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2efb45173f8115b662ced341861854541a61cb62d73b9e4b42515f397726506" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e2fc5455027b00f71e2bbe7b1964a7ddfee81db1240a0b62bb60af0d36494164" + sha256 cellar: :any_skip_relocation, sonoma: "9fb4432584e2f381914ca14447e952272f745b747017c325317338fe9e437796" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab867ddb7331039afc3ee0b32bd9bd4690f75c20fc7c9309571ec12c8496fe17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ad94cdbab906a7c82d12b4280b36e9e595a188f8c21f705b47cf27efd7c15e8" + end + + depends_on "certifi" => :no_linkage + depends_on "ffmpeg" + depends_on "pillow" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: %w[certifi pillow pytest pytest-asyncio pytest-mock] + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/17/0a/163e5260cecc12de6abc259d158d9da3b8ec062ab863107dcdb1166cdcef/aiodns-3.5.0.tar.gz" + sha256 "11264edbab51896ecf546c18eb0dd56dff0428c6aa6d2cd87e643e07300eb310" + end + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/06/f0/af90f3fb4066b0707b6a5af3ffd5fd9b3809bbb52f0153a3c7550e594de3/aiofiles-0.7.0.tar.gz" + sha256 "a1c4fc9b2ff81568c83e21392a82f344ea9d23da906e4f6a52662764545e19d4" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiolimiter" do + url "https://files.pythonhosted.org/packages/f1/23/b52debf471f7a1e42e362d959a3982bdcb4fe13a5d46e63d28868807a79c/aiolimiter-1.2.1.tar.gz" + sha256 "e02a37ea1a855d9e832252a105420ad4d15011505512a1a1d814647451b5cca9" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-help-colors" do + url "https://files.pythonhosted.org/packages/6f/50/76f51d9c7fcd72a12da466801f7c1fa3884424c947787333c74327b4fcf3/click-help-colors-0.9.4.tar.gz" + sha256 "f4cabe52cf550299b8888f4f2ee4c5f359ac27e33bcfe4d61db47785a5cc936c" + end + + resource "deezer-py" do + url "https://files.pythonhosted.org/packages/97/4e/18a8530aaed95350a34923556c68691e58440532495be9f4cd2ed684819d/deezer-py-1.3.6.tar.gz" + sha256 "a3ef151f7971d69769e7393f71373eaf896bccd22167213872ae46e04e14a2d7" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "m3u8" do + url "https://files.pythonhosted.org/packages/f4/1f/6370b6c5ba1975f5299bdda0e953e381880accbad1d2daa8fb0da3548051/m3u8-0.9.0.tar.gz" + sha256 "3ee058855c430dc364db6b8026269d2b4c1894b198bcc5c824039c551c05f497" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "pathvalidate" do + url "https://files.pythonhosted.org/packages/60/f7/ff244fdd8ed98e98d4f9acecfe74a890e5e3245ce55253ef88db51e94652/pathvalidate-2.5.2.tar.gz" + sha256 "5ff57d0fabe5ecb7a4f1e4957bfeb5ad8ab5ab4c0fa71f79c6bbc24bd9b7d14d" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pycares" do + url "https://files.pythonhosted.org/packages/8d/ad/9d1e96486d2eb5a2672c4d9a2dd372d015b8d7a332c6ac2722c4c8e6bbbf/pycares-4.11.0.tar.gz" + sha256 "c863d9003ca0ce7df26429007859afd2a621d3276ed9fef154a9123db9252557" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "simple-term-menu" do + url "https://files.pythonhosted.org/packages/d8/80/f0f10b4045628645a841d3d98b584a8699005ee03a211fc7c45f6c6f0e99/simple_term_menu-1.6.6.tar.gz" + sha256 "9813d36f5749d62d200a5599b1ec88469c71378312adc084c00c00bfbb383893" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/65/ed/7b7216101bc48627b630693b03392f33827901b81d4e1360a76515e3abc4/tomlkit-0.7.2.tar.gz" + sha256 "d7a454f319a7e9bd2e249f239168729327e4dd2d27b17dc68be264ad1ce36754" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + system bin/"rip", "url", "https://soundcloud.com/radiarc/radiarc-irrelevance-fading" + end +end diff --git a/Formula/s/streamripper.rb b/Formula/s/streamripper.rb new file mode 100644 index 0000000000000..a0d0ce309a97d --- /dev/null +++ b/Formula/s/streamripper.rb @@ -0,0 +1,61 @@ +class Streamripper < Formula + desc "Separate tracks via Shoutcasts title-streaming" + homepage "https://streamripper.sourceforge.net/" + url "https://downloads.sourceforge.net/project/streamripper/streamripper%20%28current%29/1.64.6/streamripper-1.64.6.tar.gz" + sha256 "c1d75f2e9c7b38fd4695be66eff4533395248132f3cc61f375196403c4d8de42" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :stable + regex(%r{url=.*?/streamripper[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f0f900d7d9b50f242d815eb6826684b2e6d2c76f7a3bc58f08ce6f06cd1302aa" + sha256 cellar: :any, arm64_sequoia: "6ec682174a122bdb8b6fdae00b16f25ac6a0325c9c6d0dcb930b03679986f34e" + sha256 cellar: :any, arm64_sonoma: "fa05b4cc2fe0be48ae3d3ddd929e597a17c35645e0f4609493eb200686da521d" + sha256 cellar: :any, arm64_ventura: "e00ae4c681568844df42dc75ee116a92763644a041542480b8224beda1acc35d" + sha256 cellar: :any, sonoma: "b193b872eaa4c70fa51fd38c22c378e0143a275a268ddcfcb5721045b2637235" + sha256 cellar: :any, ventura: "d5c5fcdcfc5cdb06479e7bbfc95de83614ccdfe67b50d30bfbeb89d8ee46e11b" + sha256 cellar: :any_skip_relocation, arm64_linux: "987a8725e3adbfb98f1b5916f7fe4eb5727e61bea35d5265a038473616ceae83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e98a61e5ba076e3a325d7df46e9ec8d90104f15acc1ac302d6307ba984eb053" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "mad" + + on_macos do + depends_on "gettext" + end + + def install + # the Makefile ignores CPPFLAGS from the environment, which + # breaks the build when HOMEBREW_PREFIX is not /usr/local + ENV.append_to_cflags ENV.cppflags if ENV.cppflags.present? + + # Work around error: call to undeclared library function 'strcpy'. + # Ref: https://sourceforge.net/p/streamripper/code/ci/master/tree/lib/argv.c#l33 + ENV.append_to_cflags "-DANSI_PROTOTYPES=1" if DevelopmentTools.clang_build_version >= 1403 + + # remove bundled libmad + rm_r(buildpath/"libmad-0.15.1b") + + chmod 0755, "./install-sh" # or "make install" fails + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"streamripper", "--version" + end +end diff --git a/Formula/s/streamvbyte.rb b/Formula/s/streamvbyte.rb new file mode 100644 index 0000000000000..a0694ab0b7830 --- /dev/null +++ b/Formula/s/streamvbyte.rb @@ -0,0 +1,34 @@ +class Streamvbyte < Formula + desc "Fast integer compression in C" + homepage "https://github.com/fast-pack/streamvbyte" + url "https://github.com/fast-pack/streamvbyte/archive/refs/tags/v2.0.0.tar.gz" + sha256 "51ca1c3b02648ea4b965d65b0e586891981f2e8184b056520e38ad70bcc43dd8" + license "Apache-2.0" + head "https://github.com/fast-pack/streamvbyte.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a5b3c81835da9ae317838f2d8ad1a088c99fbdb465eccd4d338c6dade886c7cd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "955cfd051b2957a90b5dcd3206023547acbc96298938bd489f7413eb2bc1721a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51d9a35f2a353d5ceb107471e0467e5689a3050715513cae8cdf2cca75c30e47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08b01a057acf0496f9e2afe325fcc1b051c812258a1026441a9b6705da57f2ba" + sha256 cellar: :any_skip_relocation, sonoma: "78259a695625fe8a4d8db9cce7fe270e9da2feb5f138af8891d553003abe6074" + sha256 cellar: :any_skip_relocation, ventura: "505180ca0088a187f5369cd4b4c9cc00069adcad065cfa04d976ef8a83da3a86" + sha256 cellar: :any_skip_relocation, arm64_linux: "333f773e6f4ccd9231d9802d1768d652c417a532fff56cfe398f0b0b2d291fef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2086e097ff025f7f27bf7c1326f2493eed90785881afae43779a37c88b45fd8" + end + + depends_on "cmake" => :build + + def install + odie "Remove `-DCMAKE_POLICY_VERSION_MINIMUM=3.5`" if build.stable? && version > "2.0.0" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples/example.c" + end + + test do + system ENV.cc, pkgshare/"example.c", "-I#{include}", "-L#{lib}", "-lstreamvbyte", "-o", "test" + system testpath/"test" + end +end diff --git a/Formula/s/stress-ng.rb b/Formula/s/stress-ng.rb new file mode 100644 index 0000000000000..2816f0d60d56d --- /dev/null +++ b/Formula/s/stress-ng.rb @@ -0,0 +1,39 @@ +class StressNg < Formula + desc "Stress test a computer system in various selectable ways" + homepage "https://wiki.ubuntu.com/Kernel/Reference/stress-ng" + url "https://github.com/ColinIanKing/stress-ng/archive/refs/tags/V0.19.05.tar.gz" + sha256 "9712c5505602c6db8017c15a2659a3185f5a4f81ddde745e9f45f9e10a9f86c4" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "51bff89fac751ad70783008d591fd943f43da41d45fc89159ad842e0820e9cf2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "545c7970c0fc5fe6deffdc534819141865f05c3795ff539b815ae537815e1f7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68a80bd7083963d0aa4b3da32abcbb61909913294271be535e9f195a3efce5ce" + sha256 cellar: :any_skip_relocation, sonoma: "794f61287f06139d75167154e0cf27a1e12ad2dce33a26bddb15195399929ae2" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b7394cba2eebf678c6494916cd69c6149c37e46cca698f3c134ed4a6d59a247" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90dd1bb48c3fe12248e4af56ab9f5b39066ebf809086fd5074862526ef6dd1f7" + end + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def install + inreplace "Makefile" do |s| + s.gsub! "/usr", prefix + s.change_make_var! "BASHDIR", prefix/"etc/bash_completion.d" + end + system "make" + system "make", "install" + bash_completion.install "bash-completion/stress-ng" + end + + test do + output = shell_output("#{bin}/stress-ng -c 1 -t 1 2>&1") + assert_match "successful run completed", output + end +end diff --git a/Formula/s/stress.rb b/Formula/s/stress.rb new file mode 100644 index 0000000000000..5081715d5f413 --- /dev/null +++ b/Formula/s/stress.rb @@ -0,0 +1,38 @@ +class Stress < Formula + desc "Tool to impose load on and stress test a computer system" + homepage "https://github.com/resurrecting-open-source-projects/stress" + url "https://github.com/resurrecting-open-source-projects/stress/archive/refs/tags/1.0.7.tar.gz" + sha256 "cdaa56671506133e2ed8e1e318d793c2a21c4a00adc53f31ffdef1ece8ace0b1" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bc133ce107c928388f3e8e1ae2ec46c12fac73f1ae01281486530180d60adba7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b3708a81bbe9930b49170bb1bbed935a7f4ef6e1c0aa5d6501ab2fa4d2598a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "70295f81088618111fc3a3c27d91de5518f63f275b161f3552b52aa8237eb433" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f744647b8c4d3d83ecedd29b802bcf4d03b8fde7ca5a659caceb3d3bf4a19df8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ecf4d28b29d30fe0d43c30d5bb8f5bb119842694a04dcefdbef78a37ce0adb77" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e8ec9b4a8cd6c22f4987344d6db9d9287a54b0e9ec45897dae46deb1c49684da" + sha256 cellar: :any_skip_relocation, sonoma: "7c8460f9a1805d20e6f36f2e4768dce9ba5ade639186fa9204439fe52a55e2c3" + sha256 cellar: :any_skip_relocation, ventura: "7c8d2136d92522af1285918a98ee6f175252ce4a575997aa34f05de62cab378a" + sha256 cellar: :any_skip_relocation, monterey: "35747dadcf335894c442ffccfc3e85f16f35f404aae3e7630015abaeea2f6890" + sha256 cellar: :any_skip_relocation, big_sur: "4c0e687b08b14497b89ff3fee89e878808c32dd73d3ea1452ec5bfd49abab88c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f11fdfe50b66032ffa18ef2b2f7a4439b379f08b6224c5c0ee9acde23ae1e6c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffa76db1094886481f76dcba90c949bd03f5d29971e943d9dce96a5f53f6da78" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"stress", "--cpu", "2", "--io", "1", "--vm", "1", "--vm-bytes", "128M", "--timeout", "1s", "--verbose" + end +end diff --git a/Formula/s/stringtie.rb b/Formula/s/stringtie.rb new file mode 100644 index 0000000000000..0c698fe021a7c --- /dev/null +++ b/Formula/s/stringtie.rb @@ -0,0 +1,40 @@ +class Stringtie < Formula + desc "Transcript assembly and quantification for RNA-Seq" + homepage "https://github.com/gpertea/stringtie" + url "https://github.com/gpertea/stringtie/archive/refs/tags/v3.0.2.tar.gz" + sha256 "8fc429eb7437cb62cd95440a3e28529719cc72133592ce8e02f5cf249ce3142e" + license "MIT" + head "https://github.com/gpertea/stringtie.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c14e68b1673b69143178f89c9f32c17466bf2b5af7a40e6a90c8f5bed61d27c5" + sha256 cellar: :any, arm64_sequoia: "1ac0cf98582d7ba1b1d00703941bf70209d9fc589c7b2b0fe87e638340543026" + sha256 cellar: :any, arm64_sonoma: "2a5c3b277611d4b6506d841a870fa39b3a607fbb07e0c6e85c79a1319cb3a79b" + sha256 cellar: :any, sonoma: "93ccbf7380a10bbb59bbef0ebd9a1d87d652009378912f6c107a913b37af7b67" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fc194a5e8f17f784e39435e940849cab87e43316c2121df72211484af6c18fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "997003f4c9ddf4bc5a6bc21e6102b890c248d5a8878e5c011aec37d5c3ed59a6" + end + + depends_on "htslib" + + def install + args = [ + "HTSLIB=#{Formula["htslib"].opt_lib}", + "LIBS=-L#{Formula["htslib"].opt_lib} -lhts -lm", + ] + system "make", "release", *args + bin.install "stringtie" + end + + test do + resource "homebrew-test" do + url "https://github.com/gpertea/stringtie/raw/test_data/tests.tar.gz" + sha256 "815a31b2664166faa59cdd25f0dc2da3d3dcb13e69ee644abb972a93d374ac10" + end + + resource("homebrew-test").stage testpath + assert_match version.to_s, shell_output("#{bin}/stringtie --version") + system bin/"stringtie", "-o", "short_reads.out.gtf", "short_reads.bam" + assert_path_exists "short_reads.out.gtf" + end +end diff --git a/Formula/s/strip-nondeterminism.rb b/Formula/s/strip-nondeterminism.rb new file mode 100644 index 0000000000000..83dfeb23f7a22 --- /dev/null +++ b/Formula/s/strip-nondeterminism.rb @@ -0,0 +1,73 @@ +class StripNondeterminism < Formula + desc "Tool for stripping bits of non-deterministic information from files" + homepage "https://salsa.debian.org/reproducible-builds/strip-nondeterminism" + url "https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/archive/1.15.0/strip-nondeterminism-1.15.0.tar.bz2" + sha256 "cde5567a8e20f3f31ee25132d38f5803efc47c05551d321d1dd1e7666a780a07" + license "GPL-3.0-or-later" + head "https://salsa.debian.org/reproducible-builds/strip-nondeterminism.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c74b1e7b349d3122995ac522942d868a2eb8d4d18914a36df9a2f2a4599e986f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c74b1e7b349d3122995ac522942d868a2eb8d4d18914a36df9a2f2a4599e986f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c74b1e7b349d3122995ac522942d868a2eb8d4d18914a36df9a2f2a4599e986f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a6bd8260e62ce02f163df584fbfd5335bf0209a2fd90d19c0abbed3a62146281" + sha256 cellar: :any_skip_relocation, sonoma: "8f010fb1fe507739c9e008422a72e7d03b9574da8f3dbf40d361bab0808c028b" + sha256 cellar: :any_skip_relocation, ventura: "ec0acf9bc2af17c5698806d4e4038817eb8b97f80baa4e3e1effe3987549c665" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ff6a548bec5370e987393aa9edf3fb3a10a41409050327af3d70ae3189375a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e32a0e8ea3c0201f2e8cc448b4b7acfc759b22f14c5315466da11c6db73e2eb3" + end + + uses_from_macos "file-formula" => :test + uses_from_macos "perl" + + # NOTE: Getopt::Long is included with Perl. Archive::Zip is included with macOS + + resource "Archive::Cpio" do + url "https://cpan.metacpan.org/authors/id/P/PI/PIXEL/Archive-Cpio-0.10.tar.gz" + sha256 "246fb31669764e78336b2191134122e07c44f2d82dc4f37d552ab28f8668bed3" + end + + resource "Archive::Zip" do + on_linux do + url "https://cpan.metacpan.org/authors/id/P/PH/PHRED/Archive-Zip-1.68.tar.gz" + sha256 "984e185d785baf6129c6e75f8eb44411745ac00bf6122fb1c8e822a3861ec650" + end + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + + resources.each do |r| + r.stage do + if File.exist?("Makefile.PL") + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "NO_MYMETA=1" + system "make", "install" + else + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + end + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + + (bin/"strip-nondeterminism").write_env_script libexec/"bin/strip-nondeterminism", PERL5LIB: ENV["PERL5LIB"] + man1.install_symlink libexec/"man/man1/strip-nondeterminism.1" + end + + test do + (testpath/"test.txt").write "Hello world" + system "gzip", "test.txt" + system bin/"strip-nondeterminism", "--timestamp", "1", "--verbose", "test.txt.gz" + assert_match(/Thu\s+Jan\s+1\s+00:00:01\s+1970/, shell_output("file test.txt.gz")) + end +end diff --git a/Formula/s/stripe-cli.rb b/Formula/s/stripe-cli.rb new file mode 100644 index 0000000000000..323fba1ecccd1 --- /dev/null +++ b/Formula/s/stripe-cli.rb @@ -0,0 +1,41 @@ +class StripeCli < Formula + desc "Command-line tool for Stripe" + homepage "https://docs.stripe.com/stripe-cli" + url "https://github.com/stripe/stripe-cli/archive/refs/tags/v1.32.0.tar.gz" + sha256 "36a5da61eaae0d09281ea60b479a6ef7f682a4e906697a4794c8317acb9fed79" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0331f3d9d1295d581a12e89a39fa6b36cff7d957e7926e5594550b717b8ce909" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77f5e566dce1d5da52a61948ec740808e2e748a1cb3611ad7f090d374887377c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e3bb04a737a8eae992c25563e6d5f91afa637df0788a6733b941e9d6e2a2afa" + sha256 cellar: :any_skip_relocation, sonoma: "5991c54383f9dd34bc6c8bc6e7b262dfeb258e9cc812c1af1f55292a34e51774" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5b6ab55602cfa833631685cf4194ee769f2beeae99298534f753a1027b7f1d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5a41e496707dd79d979338ef437357c4a2c70e843d1716c1982dc6f59040d61" + end + + depends_on "go" => :build + + # fish completion support patch, upstream pr ref, https://github.com/stripe/stripe-cli/pull/1282 + patch do + url "https://github.com/stripe/stripe-cli/commit/de62a98881671ce83973e1b696d3a7ea820b8d0e.patch?full_index=1" + sha256 "2b30ee04680e16b5648495e2fe93db3362931cf7151b1daa1f7e95023b690db8" + end + + def install + # See configuration in `.goreleaser` directory + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[-s -w -X github.com/stripe/stripe-cli/pkg/version.Version=#{version}] + system "go", "build", *std_go_args(ldflags:, output: bin/"stripe"), "cmd/stripe/main.go" + + generate_completions_from_executable(bin/"stripe", "completion", "--write-to-stdout", "--shell") + end + + test do + assert_match version.to_s, shell_output("#{bin}/stripe version") + assert_match "secret or restricted key", + shell_output("#{bin}/stripe --api-key=not_real_key get ch_1EGYgUByst5pquEtjb0EkYha", 1) + assert_match "-F __start_stripe", + shell_output("bash -c 'source #{bash_completion}/stripe && complete -p stripe'") + end +end diff --git a/Formula/s/stripe-mock.rb b/Formula/s/stripe-mock.rb new file mode 100644 index 0000000000000..08240e87ff02f --- /dev/null +++ b/Formula/s/stripe-mock.rb @@ -0,0 +1,43 @@ +class StripeMock < Formula + desc "Mock HTTP server that responds like the real Stripe API" + homepage "https://github.com/stripe/stripe-mock" + url "https://github.com/stripe/stripe-mock/archive/refs/tags/v0.197.0.tar.gz" + sha256 "66b00035b48c30711895a33adaa818b75f6a80d0ff5ffd77112da09e6ce626eb" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aaca3a9a06926c66f32aab1ad4d39b578b67c9d436bb04c0a8541d39f86d03c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aaca3a9a06926c66f32aab1ad4d39b578b67c9d436bb04c0a8541d39f86d03c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aaca3a9a06926c66f32aab1ad4d39b578b67c9d436bb04c0a8541d39f86d03c6" + sha256 cellar: :any_skip_relocation, sonoma: "634a5ec2315dec79294b0f5887b16798c011922920ef54e284efc2e646f50d45" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e286bc6b84d0ab3a2ad5772bd76b87ab2ab2a1971cd3c75dee6fcb1f1e98d6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a42869e2470049cdb4f4263eb4bd07cd4cea13505bbba645a07fe946fab2aa46" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + service do + run [opt_bin/"stripe-mock", "-http-port", "12111", "-https-port", "12112"] + keep_alive successful_exit: false + working_dir var + log_path var/"log/stripe-mock.log" + error_log_path var/"log/stripe-mock.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/stripe-mock version") + + sock = testpath/"stripe-mock.sock" + pid = spawn(bin/"stripe-mock", "-http-unix", sock) + + sleep 5 + assert_path_exists sock + assert_predicate sock, :socket? + ensure + Process.kill "TERM", pid + end +end diff --git a/Formula/s/strongswan.rb b/Formula/s/strongswan.rb new file mode 100644 index 0000000000000..7a4a9274f93c5 --- /dev/null +++ b/Formula/s/strongswan.rb @@ -0,0 +1,98 @@ +class Strongswan < Formula + desc "VPN based on IPsec" + homepage "https://www.strongswan.org" + url "https://download.strongswan.org/strongswan-6.0.3.tar.bz2" + sha256 "288f2111f5c9f6ec85fc08fa835bf39232f5c4044969bb4de7b4335163b1efa9" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.strongswan.org/" + regex(/href=.*?strongswan[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "c441d10a008ffd0d973f4845067c59d9222b219694e68668795540a9e30921dd" + sha256 arm64_sequoia: "be3628964984571bda1fb570304a7f2330967dfd03a3d72b71cff239f409f7cd" + sha256 arm64_sonoma: "e9f428124bd397b8467a3801c1b3e7c10a6448994507504e3663e3846af15d83" + sha256 sonoma: "8c0d56d754161ac24c4c28b8f426c557d387744c9c2d5c349116e901a7c15822" + sha256 arm64_linux: "603db325f5b28d8f3d4c91ff1cde5ab552f16008a0396596817147904d17c6da" + sha256 x86_64_linux: "21cf828aeb4fc58dc7d65f793a8af0f8d6376c0dbb185e9007d760026960d3b5" + end + + head do + url "https://github.com/strongswan/strongswan.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + end + + depends_on "openssl@3" + + uses_from_macos "curl" + + def install + # Work around RPATH modifications corrupting binary. Upstream patchelf fixed this issue + # https://github.com/NixOS/patchelf/issues/315 but it may be missing in patchelf.rb + ENV.append_path "HOMEBREW_RPATH_PATHS", libexec if OS.linux? + + args = %W[ + --sbindir=#{bin} + --sysconfdir=#{etc} + --disable-defaults + --enable-charon + --enable-cmd + --enable-constraints + --enable-curve25519 + --enable-eap-gtc + --enable-eap-identity + --enable-eap-md5 + --enable-eap-mschapv2 + --enable-eap-peap + --enable-ikev1 + --enable-ikev2 + --enable-kdf + --enable-kernel-pfkey + --enable-nonce + --enable-openssl + --enable-pem + --enable-pgp + --enable-pkcs1 + --enable-pkcs8 + --enable-pkcs11 + --enable-pki + --enable-pubkey + --enable-revocation + --enable-scepclient + --enable-socket-default + --enable-sshkey + --enable-stroke + --enable-swanctl + --enable-unity + --enable-updown + --enable-x509 + --enable-xauth-generic + --enable-curl + ] + + args << "--enable-kernel-pfroute" << "--enable-osx-attr" if OS.mac? + + system "./autogen.sh" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + You will have to run both "ipsec" and "charon-cmd" with "sudo". + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/ipsec --version") + assert_match version.to_s, shell_output("#{bin}/charon-cmd --version") + end +end diff --git a/Formula/s/structurizr-cli.rb b/Formula/s/structurizr-cli.rb new file mode 100644 index 0000000000000..8115141f89ed4 --- /dev/null +++ b/Formula/s/structurizr-cli.rb @@ -0,0 +1,26 @@ +class StructurizrCli < Formula + desc "Command-line utility for Structurizr" + homepage "https://docs.structurizr.com/cli" + url "https://github.com/structurizr/cli/releases/download/v2025.11.01/structurizr-cli.zip" + sha256 "2fa5dac05d2168ae61de68ba9204d3d7c879aa7e023d50703f400f99817ce432" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "938878466fa836f73be197fadfd62f7feade271af079f342d2cb162813c6642b" + end + + depends_on "openjdk" + + def install + rm(Dir["*.bat"]) + libexec.install Dir["*"] + (bin/"structurizr-cli").write_env_script libexec/"structurizr.sh", Language::Java.overridable_java_home_env + end + + test do + result = shell_output("#{bin}/structurizr-cli validate -w /dev/null", 1) + assert_match "/dev/null is not a JSON or DSL file", result + + assert_match "structurizr-cli: #{version}", shell_output("#{bin}/structurizr-cli version") + end +end diff --git a/Formula/s/sttr.rb b/Formula/s/sttr.rb new file mode 100644 index 0000000000000..668b2c6a9f72d --- /dev/null +++ b/Formula/s/sttr.rb @@ -0,0 +1,34 @@ +class Sttr < Formula + desc "CLI to perform various operations on string" + homepage "https://github.com/abhimanyu003/sttr" + url "https://github.com/abhimanyu003/sttr/archive/refs/tags/v0.2.28.tar.gz" + sha256 "c0b5d8fac3d126178f7ec197567eb54566f35faa5d6f3f6d3b67c76197a56691" + license "MIT" + head "https://github.com/abhimanyu003/sttr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8f1be1d2a7eb9477f196fcfb5ffe0c8024a39a8852ed3958bc97a3fa09e679cf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f1be1d2a7eb9477f196fcfb5ffe0c8024a39a8852ed3958bc97a3fa09e679cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f1be1d2a7eb9477f196fcfb5ffe0c8024a39a8852ed3958bc97a3fa09e679cf" + sha256 cellar: :any_skip_relocation, sonoma: "2a3fd1aa69df4461a58bdbd86ff2c8bcd4baf2e4f7e97e2eb172002c17e8408d" + sha256 cellar: :any_skip_relocation, arm64_linux: "332f5e9d7051c1a09123d7132a408d46451a63d2430ee88ce8fd81409d3cc4fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98f1e5d2d185559e9f9072fc6e11cbcf29ac4925591b5397ae274662c1d8266f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sttr version") + + assert_equal "foobar", shell_output("#{bin}/sttr reverse raboof") + + output = shell_output("#{bin}/sttr sha1 foobar") + assert_equal "8843d7f92416211de9ebb963ff4ce28125932878", output + + assert_equal "good_test", shell_output("#{bin}/sttr snake 'good test'") + end +end diff --git a/Formula/s/stu.rb b/Formula/s/stu.rb new file mode 100644 index 0000000000000..caddcac44b2b8 --- /dev/null +++ b/Formula/s/stu.rb @@ -0,0 +1,30 @@ +class Stu < Formula + desc "TUI explorer application for Amazon S3 (AWS S3)" + homepage "https://github.com/lusingander/stu" + url "https://github.com/lusingander/stu/archive/refs/tags/v0.7.5.tar.gz" + sha256 "b37e3f241f224f76a35934649ea466bde9c069fbcb7c11dfcd67f42214c070ee" + license "MIT" + head "https://github.com/lusingander/stu.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "37059ab0970c815b6e054bbd60fedabc0bf2195201e4370f792d20e36ba52439" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c919d79d03b34ea3fc6c9ab6bf4a9f34cafbfeb15004a650bd1b56ed4dbfd35b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f2ced87e55ac63fe2a6d170a1971573f2e2e153b4ecd188c3f2a8ff74c68c2d" + sha256 cellar: :any_skip_relocation, sonoma: "14fa6797e6e10dc8976102b567734abb35495a069cdce7a3291e30a79bd255e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ead74b7aa236fc2a96c9aa085ca9957743f5c10600d040c289f267e3c79e3181" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d35c96dcf427fedd0e171273dc5654f0abc41628e38f14320e93e07d9cd1a1b0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/stu --version") + + output = shell_output("#{bin}/stu s3://test-bucket 2>&1", 2) + assert_match "error: unexpected argument 's3://test-bucket' found", output + end +end diff --git a/Formula/s/stubby.rb b/Formula/s/stubby.rb new file mode 100644 index 0000000000000..2d39cf7b28c40 --- /dev/null +++ b/Formula/s/stubby.rb @@ -0,0 +1,84 @@ +class Stubby < Formula + desc "DNS privacy enabled stub resolver service based on getdns" + homepage "https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby" + url "https://github.com/getdnsapi/stubby/archive/refs/tags/v0.4.3.tar.gz" + sha256 "99291ab4f09bce3743000ed3ecbf58961648a35ca955889f1c41d36810cc4463" + license "BSD-3-Clause" + revision 1 + head "https://github.com/getdnsapi/stubby.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cf21effb238d2df0de643661b21cd67328a8cb440f7858b2fcee1ed7e7b851bf" + sha256 arm64_sequoia: "7e9b965dcf689e5c31274e2d5ebe0ecc6f5aa7d4b3fc17a4abefdd65d94a64a8" + sha256 arm64_sonoma: "eec9c56666a83664194ac6612bba1c330a54d14ead67dba1100757fc303f8edb" + sha256 arm64_ventura: "ade3c36ec956feefe503081cabbb3eefb02e4dc45cb333433866e6bb46db49ac" + sha256 arm64_monterey: "31e36e04775bf9c033db8519d2a893ee10f7a0b9fd55f394d1d6d9593a28bffa" + sha256 arm64_big_sur: "846901b552ae3f6146d058453b16094860e4cb330857b96dc5eb0d96e11ead0e" + sha256 sonoma: "3064b04c529f9ce23df5d0df80ac8aba0bbdbfaecd5dc61384de7dc38e0addac" + sha256 ventura: "9b09af1e56899b9069fa5141af931ca86086891d3dc434ea217f1ae2418f07f3" + sha256 monterey: "a215b86f3bd4cfcf9684b056db2ead9d59b76de0b9cc4ab6d08a218e4ab69f07" + sha256 big_sur: "f68065895579d27cda75d2d5b1635749502205922ff260524e5e47e62c01bab2" + sha256 arm64_linux: "74cff1a598c66d7b8bbe09bba4ac23617ae0d89d58d0c1179b8eb8fe1c5bc965" + sha256 x86_64_linux: "9be25773bc7f384a70943d6edf294174a59d901c17f497e3dc91c855cb00733e" + end + + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "getdns" + depends_on "libyaml" + + on_macos do + depends_on "libidn2" + depends_on "openssl@3" + depends_on "unbound" + end + + on_linux do + depends_on "bind" => :test + end + + def install + args = %W[ + -DCMAKE_INSTALL_RUNSTATEDIR=#{var}/run/ + -DCMAKE_INSTALL_SYSCONFDIR=#{etc} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + service do + run [opt_bin/"stubby", "-C", etc/"stubby/stubby.yml"] + keep_alive true + run_type :immediate + end + + test do + assert_path_exists etc/"stubby/stubby.yml" + (testpath/"stubby_test.yml").write <<~YAML + resolution_type: GETDNS_RESOLUTION_STUB + dns_transport_list: + - GETDNS_TRANSPORT_TLS + - GETDNS_TRANSPORT_UDP + - GETDNS_TRANSPORT_TCP + listen_addresses: + - 127.0.0.1@5553 + idle_timeout: 0 + upstream_recursive_servers: + - address_data: 8.8.8.8 + - address_data: 8.8.4.4 + - address_data: 1.1.1.1 + YAML + output = shell_output("#{bin}/stubby -i -C stubby_test.yml") + assert_match "bindata for 8.8.8.8", output + + fork do + exec bin/"stubby", "-C", testpath/"stubby_test.yml" + end + sleep 2 + + assert_match "status: NOERROR", shell_output("dig @127.0.0.1 -p 5553 getdnsapi.net") + end +end diff --git a/Formula/s/stuffbin.rb b/Formula/s/stuffbin.rb new file mode 100644 index 0000000000000..fdbd0964c9b85 --- /dev/null +++ b/Formula/s/stuffbin.rb @@ -0,0 +1,64 @@ +class Stuffbin < Formula + desc "Compress and embed static files and assets into Go binaries" + homepage "https://github.com/knadh/stuffbin" + url "https://github.com/knadh/stuffbin/archive/refs/tags/v1.3.0.tar.gz" + sha256 "10de8bdec2997299beaff857cd5a4c74b3951c9e4dab97b68f7b97af8d564ac3" + license "MIT" + head "https://github.com/knadh/stuffbin.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4a5cef2de17c168c387ecd9c6eb0bbc7d224f8514e1523e2d120f496276080f0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "402fa14f5eb2b8e670aa9253aa94c89ad8f8153b005b85a9a96060114ff91ef7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "075e2b5c0183fc8210112ffe224dfabd77f082428afa415880092398611c6ee3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a22abd7d6229a8da78e49a7b4b251f3a24bf5a56197ae49c79c467f2b1b23a6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bc6f9b8cdd0848996baf1d5487adbae3f8c88608af85c4d78f9cdc20f1a2641e" + sha256 cellar: :any_skip_relocation, sonoma: "d4702c84d4e3addd0e01a547054d07ec4e275198b01faee3f9abec4357ebc036" + sha256 cellar: :any_skip_relocation, ventura: "28b0dddef2ae15146e894ca2259e7d74f14f44c3dcb91d54521673abed67a7c7" + sha256 cellar: :any_skip_relocation, monterey: "6b3252e69344f21f6d9876c1ed5d675c7ad7416b1d2834bcdb6a3eb73beb8144" + sha256 cellar: :any_skip_relocation, arm64_linux: "642816fb11b7166f67a83ab88504281efac509bb72eeb7167244b6ee8420ec55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65cd393efa034045fa6f6fb9c3a3c376823f6349b70a187055f398d82323351d" + end + + depends_on "go" => [:build, :test] + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./stuffbin" + end + + test do + mkdir "brewtest" do + system "go", "mod", "init", "brewtest" + system "go", "get", "github.com/knadh/stuffbin" + + (testpath/"brewtest/foo.txt").write "brewfoo" + (testpath/"brewtest/main.go").write <<~GO + package main + + import ( + "log" + "os" + + "github.com/knadh/stuffbin" + ) + + func main() { + path, _ := os.Executable() + fs, _ := stuffbin.UnStuff(path) + f, _ := fs.Get("foo.txt") + log.Println("foo.txt =", string(f.ReadBytes())) + } + GO + + system "go", "build", "." + output = shell_output("#{bin}/stuffbin -a stuff -in brewtest -out brewtest2 foo.txt") + assert_match "stuffing complete.", output + assert_match "foo.txt = brewfoo", shell_output("#{testpath}/brewtest/brewtest2 2>&1") + + output = shell_output("#{bin}/stuffbin -a id -in brewtest2") + assert_match "brewtest2: stuffbin", output + assert_match "/foo.txt", output + end + end +end diff --git a/Formula/s/stunnel.rb b/Formula/s/stunnel.rb new file mode 100644 index 0000000000000..99ebdbc213558 --- /dev/null +++ b/Formula/s/stunnel.rb @@ -0,0 +1,97 @@ +class Stunnel < Formula + desc "SSL tunneling program" + homepage "https://www.stunnel.org/" + url "https://www.stunnel.org/downloads/stunnel-5.76.tar.gz" + sha256 "cda37eb4d0fb1e129718ed27ad77b5735e899394ce040bb2be28bbb937fd79e1" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.stunnel.org/downloads.html" + regex(/href=.*?stunnel[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "3059de4bf0d55781349a2070dfa8126738f2e6eac883abe43c73f27528bf2967" + sha256 cellar: :any, arm64_sequoia: "69163d8ae9a729ae91bd2cd702d080dbfd96c2a36793c01aa54afb705e9ec322" + sha256 cellar: :any, arm64_sonoma: "878d22476a78641ad84e4097885227efc548a2e961b0dc4881532bd52e2be353" + sha256 cellar: :any, sonoma: "7cfdd73bd9c66c5b79fff4273f980e7e1f7b0dd5d2830c74c392295fc7705e27" + sha256 cellar: :any_skip_relocation, arm64_linux: "474a76737abb1ebd7b28376b82d400216ee1bc96df67e9f308dd27aea1fc3e61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d119212f3a46c3069428dd7b166a51ed3221ecc12a09282e7031047927e1f9f" + end + + depends_on "openssl@3" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "--mandir=#{man}", + "--disable-libwrap", + "--disable-systemd", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}" + system "make", "install" + + # This programmatically recreates pem creation used in the tools Makefile + # which would usually require interactivity to resolve. + cd "tools" do + system "dd", "if=/dev/urandom", "of=stunnel.rnd", "bs=256", "count=1" + system "#{Formula["openssl@3"].opt_bin}/openssl", "req", + "-new", "-x509", + "-days", "365", + "-rand", "stunnel.rnd", + "-config", "openssl.cnf", + "-out", "stunnel.pem", + "-keyout", "stunnel.pem", + "-sha256", + "-subj", "/C=PL/ST=Mazovia Province/L=Warsaw/O=Stunnel Developers/OU=Provisional CA/CN=localhost/" + chmod 0600, "stunnel.pem" + (etc/"stunnel").install "stunnel.pem" + end + end + + def caveats + <<~EOS + A bogus SSL server certificate has been installed to: + #{etc}/stunnel/stunnel.pem + + This certificate will be used by default unless a config file says otherwise! + Stunnel will refuse to load the sample configuration file if left unedited. + + In your stunnel configuration, specify a SSL certificate with + the "cert =" option for each service. + + To use Stunnel with Homebrew services, make sure to set "foreground = yes" in + your Stunnel configuration. + EOS + end + + service do + run [opt_bin/"stunnel"] + end + + test do + user = if OS.mac? + "nobody" + else + ENV["USER"] + end + (testpath/"tstunnel.conf").write <<~EOS + cert = #{etc}/stunnel/stunnel.pem + + setuid = #{user} + setgid = #{user} + + [pop3s] + accept = 995 + connect = 110 + + [imaps] + accept = 993 + connect = 143 + EOS + + assert_match "successful", pipe_output("#{bin}/stunnel #{testpath}/tstunnel.conf 2>&1") + end +end diff --git a/Formula/s/stuntman.rb b/Formula/s/stuntman.rb new file mode 100644 index 0000000000000..e95e130b5037c --- /dev/null +++ b/Formula/s/stuntman.rb @@ -0,0 +1,50 @@ +class Stuntman < Formula + desc "Implementation of the STUN protocol" + homepage "https://www.stunprotocol.org" + url "https://www.stunprotocol.org/stunserver-1.2.16.tgz" + sha256 "4479e1ae070651dfc4836a998267c7ac2fba4f011abcfdca3b8ccd7736d4fd26" + license "Apache-2.0" + head "https://github.com/jselbie/stunserver.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?stunserver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "edaf5c91bca97b2753c2c91faf0c174e2310e48c98ede3b6aa28f5d679ff4369" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0fb5a56446295b44863623d302e1d87d56304f6e48d8afa3b465fd6cb191c891" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f074ff4dfa646a4ddd4bca3606f9e0b69667e79670fbc119b3c538db13fe58a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9ff0ae91033b2b01cc9f72180bc752ef48318ec70f538caf943f0baf1fd3bff" + sha256 cellar: :any_skip_relocation, arm64_monterey: "54d82da2aa9283edd6641bd761cd1c45411d4305ae648672ae3e98079d841894" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c875f14ba13aacc89c0f798cbbea161aac655bf3bcaf9284645eb43aea764b55" + sha256 cellar: :any_skip_relocation, sonoma: "f7ebbf887c71acd20349ad10d69f4f0e4fd5106bdc2c42bc1d804b84dea42782" + sha256 cellar: :any_skip_relocation, ventura: "74ddc9697def76e912a283a68da40099a7fd5195960707981d3d8b3c393b2882" + sha256 cellar: :any_skip_relocation, monterey: "9ad956118fe74ee3af2a673b6a1afc0736d39f51342cb7f4b926dc13e0d28cab" + sha256 cellar: :any_skip_relocation, big_sur: "3180e4e3c719363753cefef52e45972031815f2709760c6b63b4d4e9721e1d4a" + sha256 cellar: :any_skip_relocation, catalina: "2ac7951871edd61c9b254d5436a1b8ba1d939908a9a22ac3ef05b975d34490a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf40ac5709a4a0db7eee925acc32d0b2ca7e3a8b4dc3548314d3f2377060e1ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bddee00f936559705e2837cc56956efbc2569f98da27d7abb41640d7f87df7d0" + end + + depends_on "boost" => :build + + # on macOS, stuntman uses CommonCrypt + on_linux do + depends_on "openssl@3" + end + + def install + ENV.cxx11 + + system "make" + bin.install "stunserver", "stunclient", "stuntestcode" + end + + test do + system bin/"stuntestcode" + end +end diff --git a/Formula/s/style-check.rb b/Formula/s/style-check.rb new file mode 100644 index 0000000000000..ca14b532c9a9b --- /dev/null +++ b/Formula/s/style-check.rb @@ -0,0 +1,55 @@ +class StyleCheck < Formula + desc "Parses latex-formatted text in search of forbidden phrases" + homepage "https://www.cs.umd.edu/~nspring/software/style-check-readme.html" + url "https://www.cs.umd.edu/~nspring/software/style-check-0.14.tar.gz" + sha256 "2ae806fcce9e3b80162c64634422dc32d7f0e6f8a81ba5bc7879358744b4e119" + license "GPL-2.0-only" + revision 1 + + # The homepage links to an unversioned tarball (style-check-current.tar.gz) + # and the GitHub repository (https://github.com/nspring/style-check) has no + # tags. + livecheck do + skip "No version information available to check" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fb1e03c25875d0cf1b78f401e403452420169250d6fd6cee1be00d4d8bb51725" + end + + uses_from_macos "ruby" + + # Fix compatibility with Ruby 3.2. + # Should be deletable on next release. + patch :DATA + + def install + inreplace "style-check.rb", "/etc/style-check.d/", etc/"style-check.d/" + system "make", "PREFIX=#{prefix}", + "SYSCONFDIR=#{etc}/style-check.d", + "install" + end + + test do + (testpath/".style-censor").write "homebrew % capitalize Homebrew\n" + (testpath/"paper.tex").write "Today I worked on homebrew\n" + + system bin/"style-check.rb", "-v", "paper.tex" + end +end +__END__ +diff --git a/style-check.rb b/style-check.rb +index 893a59f..43e0e84 100755 +--- a/style-check.rb ++++ b/style-check.rb +@@ -163,7 +163,7 @@ def do_cns(line, file, linenum, phra_hash) + if(detected = phra_hash.keys.detect { |r| m = r.match(line) and (line.index("\n") == nil or m.begin(0) < line.index("\n")) } ) then + matchedlines = ( m.end(0) <= ( line.index("\n") or 0 ) ) ? line.gsub(/\n.*/,'') : line.chomp + puts "%s:%d:%s%d: %s (%s)" % [ file, linenum, Gedit_Mode ? ' ': '', m.begin(0)+1, matchedlines, m.to_s.tr("\n", ' ') ] +- $exit_status = 1 if(!phra_hash[detected] =~ /\?\s*$/) ++ $exit_status = 1 if(! /\?\s*$/.match(phra_hash[detected])) + if($VERBOSE && phra_hash[detected]) then + puts " " + phra_hash[detected] + phra_hash[detected] = nil # don't print the reason more than once + diff --git a/Formula/s/style-dictionary.rb b/Formula/s/style-dictionary.rb new file mode 100644 index 0000000000000..177dda63b88c6 --- /dev/null +++ b/Formula/s/style-dictionary.rb @@ -0,0 +1,36 @@ +class StyleDictionary < Formula + desc "Build system for creating cross-platform styles" + homepage "https://github.com/style-dictionary/style-dictionary" + url "https://registry.npmjs.org/style-dictionary/-/style-dictionary-5.1.1.tgz" + sha256 "a842bd3e12d423e1e94fc32c761e480e36bc5b2557209fbab179c86301b7c408" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7fdd23ee5810c54a986af48711be28021089d32e489060503b824ef4438a48e7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Build an `:all` bottle by removing example files + examples = libexec/"lib/node_modules/style-dictionary/examples" + rm %w[ + advanced/create-react-native-app/android/app/proguard-rules.pro + complete/android/demo/proguard-rules.pro + ].map { |file| examples/file } + end + + test do + assert_match version.to_s, shell_output("#{bin}/style-dictionary --version") + + output = shell_output("#{bin}/style-dictionary init basic") + assert_match "Source style dictionary starter files created!", output + assert_path_exists testpath/"config.json" + + output = shell_output("#{bin}/style-dictionary build") + assert_match "Token collisions detected", output + end +end diff --git a/Formula/s/stylelint.rb b/Formula/s/stylelint.rb new file mode 100644 index 0000000000000..654ca816f3313 --- /dev/null +++ b/Formula/s/stylelint.rb @@ -0,0 +1,38 @@ +class Stylelint < Formula + desc "Modern CSS linter" + homepage "https://stylelint.io/" + url "https://registry.npmjs.org/stylelint/-/stylelint-16.25.0.tgz" + sha256 "955f1ce119c1b48c444c81d07a969c50c27e59dfe483857157a976f553aa8678" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "12e574fea6001e7e95220f072e66d35d6503bc2f48ee32e40e46ffef2d5c3de1" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/".stylelintrc").write <<~JSON + { + "rules": { + "block-no-empty": true + } + } + JSON + + (testpath/"test.css").write <<~CSS + a { + } + CSS + + output = shell_output("#{bin}/stylelint test.css 2>&1", 2) + assert_match "Unexpected empty block", output + + assert_match version.to_s, shell_output("#{bin}/stylelint --version") + end +end diff --git a/Formula/s/stylish-haskell.rb b/Formula/s/stylish-haskell.rb new file mode 100644 index 0000000000000..1e988e3ff9413 --- /dev/null +++ b/Formula/s/stylish-haskell.rb @@ -0,0 +1,62 @@ +class StylishHaskell < Formula + desc "Haskell code prettifier" + homepage "https://github.com/haskell/stylish-haskell" + url "https://github.com/haskell/stylish-haskell/archive/refs/tags/v0.15.1.0.tar.gz" + sha256 "0187bb335205f6b5c9c78d3fc27deb59ce7122c7eb7429b88971d8cb25d7be51" + license "BSD-3-Clause" + head "https://github.com/haskell/stylish-haskell.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "636a0426df19f6ff5e1bf0ce1256bf57b69c9e8563653e984bce28d75a04c6c4" + sha256 cellar: :any, arm64_sequoia: "cd766c7c8c5cb06debbe9c331916280058dfa6245a8a22ff3b055859dc982909" + sha256 cellar: :any, arm64_sonoma: "7a470983136a1c6ec36b477f9dfac734781afcf907a33d85d83d1faa17bb5501" + sha256 cellar: :any, arm64_ventura: "44d4be8b570687514592eef731c60ad2f34e6e48d6ee57141ae90eaa28d89a10" + sha256 cellar: :any, sonoma: "adb984643626bd491580f169f3578f22639d4f1532a22a97c88f32a057996b33" + sha256 cellar: :any, ventura: "4bbdbc8b5a5cc050f6a6cb47297c3f9f77ab3f90da7d56758e750a3ddc499fa8" + sha256 cellar: :any_skip_relocation, arm64_linux: "3be00f8a82099f4031c5068c33f6be734a36b2a21c30941805a9238f84e12849" + sha256 cellar: :any_skip_relocation, x86_64_linux: "442f39eb248892c063cc1dc89aa2ed7b1acb33e99d8ce76fc1493b8f63d9886e" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + (testpath/"test.hs").write <<~HASKELL + {-# LANGUAGE ViewPatterns, TemplateHaskell #-} + {-# LANGUAGE GeneralizedNewtypeDeriving, + ViewPatterns, + ScopedTypeVariables #-} + + module Bad where + + import Control.Applicative ((<$>)) + import System.Directory (doesFileExist) + + import qualified Data.Map as M + import Data.Map ((!), keys, Map) + HASKELL + expected = <<~HASKELL + {-# LANGUAGE GeneralizedNewtypeDeriving #-} + {-# LANGUAGE ScopedTypeVariables #-} + {-# LANGUAGE TemplateHaskell #-} + + module Bad where + + import Control.Applicative ((<$>)) + import System.Directory (doesFileExist) + + import Data.Map (Map, keys, (!)) + import qualified Data.Map as M + HASKELL + assert_equal expected, shell_output("#{bin}/stylish-haskell test.hs") + end +end diff --git a/Formula/s/stylua.rb b/Formula/s/stylua.rb new file mode 100644 index 0000000000000..70de8ef41652d --- /dev/null +++ b/Formula/s/stylua.rb @@ -0,0 +1,30 @@ +class Stylua < Formula + desc "Opinionated Lua code formatter" + homepage "https://github.com/JohnnyMorganz/StyLua" + url "https://github.com/JohnnyMorganz/StyLua/archive/refs/tags/v2.3.1.tar.gz" + sha256 "aba628d721380290a334ae899eff1aec9d3d14302d2af336f67d8d7af72d35e3" + license "MPL-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1597ee54ad9e607752a66e3bad99ab26839ce575468a406a3bfbfde7f6fa1056" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83f44eddfe0d4986833deeec3528f303375aaccd2be80fa75432bfccee9d44f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "23e29821ccf2d1ee7f8904d2f4895dae21ede0592a750253d788f72f48bfab52" + sha256 cellar: :any_skip_relocation, sonoma: "3d61c386eedb3ff943f9ea44800f929707d8f5d1b5115b2cdd839451cd3e668d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8cf767901f53af735ec938638824b2790fda1644fba069ee92639203cb8498f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44015fc651e0c1bcc804f9b021c1d01b33c755fec4988c5c779bd03c4e51399a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--all-features", *std_cargo_args + end + + test do + (testpath/"test.lua").write("local foo = {'bar'}") + system bin/"stylua", "test.lua" + assert_equal "local foo = { \"bar\" }\n", (testpath/"test.lua").read + end +end diff --git a/Formula/s/sub2srt.rb b/Formula/s/sub2srt.rb new file mode 100644 index 0000000000000..51d909cdc4b0c --- /dev/null +++ b/Formula/s/sub2srt.rb @@ -0,0 +1,42 @@ +class Sub2srt < Formula + desc "Convert subtitles from .sub to subviewer .srt format" + homepage "https://github.com/robelix/sub2srt" + url "https://github.com/robelix/sub2srt/archive/refs/tags/0.5.5.tar.gz" + sha256 "169d94d1d0e946a5d57573b7b7b5883875996f802362341fe1a1a0220229b905" + license "GPL-2.0-or-later" + head "https://github.com/robelix/sub2srt.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "ea67deb8ff20129ec22608ac25dfa2928c935552cd1d8f480c54e2247f04b9fc" + end + + uses_from_macos "perl" + + def install + inreplace "README", "/usr/local", HOMEBREW_PREFIX + bin.install "sub2srt" + end + + test do + (testpath/"test.sub").write <<~SUB + {1100}{1300}time to...|one + {1350}{1400}homebrew|two + SUB + expected = <<~SRT + 1 + 00:00:44,000 --> 00:00:52,000 + time to... + one + + 2 + 00:00:54,000 --> 00:00:56,000 + homebrew + two + SRT + system bin/"sub2srt", "#{testpath}/test.sub" + assert_equal expected, (testpath/"test.srt").read.chomp + end +end diff --git a/Formula/s/subfinder.rb b/Formula/s/subfinder.rb new file mode 100644 index 0000000000000..f26aa022722e5 --- /dev/null +++ b/Formula/s/subfinder.rb @@ -0,0 +1,38 @@ +class Subfinder < Formula + desc "Subdomain discovery tool" + homepage "https://github.com/projectdiscovery/subfinder" + url "https://github.com/projectdiscovery/subfinder/archive/refs/tags/v2.9.0.tar.gz" + sha256 "90337a91df2924ee385ca048862643d1daab6c7d81ddda66d58e6c100df3ba2d" + license "MIT" + head "https://github.com/projectdiscovery/subfinder.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d64760336155d22c5ef72eeb907dc73969992cc9d5f86fb68f5fb9f5d3553f64" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e1ae86daad76d90829041cc7d826808def24abbbfe148dc5b0780df3a61e1b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "844e40d933ab2a261aae0deec7e20b53e52e9ed735742cbb5586cdc5e2e99690" + sha256 cellar: :any_skip_relocation, sonoma: "7e2039c4056b2893d3de6557a113c33c53f5dd34e9e89e3a8a260d7337350589" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb6b080231f2ffcfb7b94d5f1b02a544af0f3c445cfab13fc526c7748bdaa43f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f431031aea8794558f1bd04e41e399cf017ad0eb180a4d20bab4fde6fddd6284" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/subfinder" + end + + test do + assert_match "docs.brew.sh", shell_output("#{bin}/subfinder -d brew.sh") + + # upstream issue, https://github.com/projectdiscovery/subfinder/issues/1124 + if OS.mac? + assert_path_exists testpath/"Library/Application Support/subfinder/config.yaml" + assert_path_exists testpath/"Library/Application Support/subfinder/provider-config.yaml" + else + assert_path_exists testpath/".config/subfinder/config.yaml" + assert_path_exists testpath/".config/subfinder/provider-config.yaml" + end + + assert_match version.to_s, shell_output("#{bin}/subfinder -version 2>&1") + end +end diff --git a/Formula/s/subliminal.rb b/Formula/s/subliminal.rb new file mode 100644 index 0000000000000..153857fbb013c --- /dev/null +++ b/Formula/s/subliminal.rb @@ -0,0 +1,179 @@ +class Subliminal < Formula + include Language::Python::Virtualenv + + desc "Library to search and download subtitles" + homepage "https://subliminal.readthedocs.io" + url "https://files.pythonhosted.org/packages/f9/d1/f55d55bf7d585f6d749b60479b4f405de0d8805324d83c598ee3d540df79/subliminal-2.4.0.tar.gz" + sha256 "73df6d1940166ef0e2cdeb4f8d655a4afe1082d481ec090ad2a9e66b1a1621fc" + license "MIT" + head "https://github.com/Diaoul/subliminal.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ba6fc8a608c7da11cbcd3e4905b24be8bfb0fd4b2a842ba3562b176e3ba3a0a5" + sha256 cellar: :any, arm64_sequoia: "a1e8f36bb6bbe701952772e06ac8170204abb062510b5f529a429ac69601a33f" + sha256 cellar: :any, arm64_sonoma: "7be5bf0de7e000f9a9e0d0f4d3c6e4d3b836a18c9322b5526ca769116014fb2c" + sha256 cellar: :any, sonoma: "eb8030de4f1de8dcf493b31ca1816d6769cc8d5d823da98e4a8e2ce34803ff74" + sha256 cellar: :any_skip_relocation, arm64_linux: "94a26521f0eb3c6b5a4c0b262c6e009f82ad2257775760403650475807a8acfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "604e9531849d1cd9f4818ce8f09b1f6f01e326c3e02e2686e44a5e86bf050841" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "babelfish" do + url "https://files.pythonhosted.org/packages/c5/8f/17ff889327f8a1c36a28418e686727dabc06c080ed49c95e3e2424a77aa6/babelfish-0.6.1.tar.gz" + sha256 "decb67a4660888d48480ab6998309837174158d0f1aa63bebb1c2e11aab97aab" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-option-group" do + url "https://files.pythonhosted.org/packages/ef/ff/d291d66595b30b83d1cb9e314b2c9be7cfc7327d4a0d40a15da2416ea97b/click_option_group-0.5.9.tar.gz" + sha256 "f94ed2bc4cf69052e0f29592bd1e771a1789bd7bfc482dd0bc482134aff95823" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "dogpile-cache" do + url "https://files.pythonhosted.org/packages/e7/c8/301ff89746e76745b937606df4753c032787c59ecb37dd4d4250bddc8929/dogpile_cache-1.5.0.tar.gz" + sha256 "849c5573c9a38f155cd4173103c702b637ede0361c12e864876877d0cd125eec" + end + + resource "enzyme" do + url "https://files.pythonhosted.org/packages/6e/d8/a390f96ac0ccc33ca1c0e5c9cb9fc73f0623117e310594b6bc3be87005de/enzyme-0.5.2.tar.gz" + sha256 "7cf779148d9e66eb2838603eace140c53c3cefc8b8fe5d4d5a03a5fb5d57b3c1" + end + + resource "guessit" do + url "https://files.pythonhosted.org/packages/d0/07/5a88020bfe2591af2ffc75841200b2c17ff52510779510346af5477e64cd/guessit-3.8.0.tar.gz" + sha256 "6619fcbbf9a0510ec8c2c33744c4251cad0507b1d573d05c875de17edc5edbed" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "knowit" do + url "https://files.pythonhosted.org/packages/98/aa/827183a60bdea775d408240dfa20d3ff46b110f0d82157a4419c7eb1aac6/knowit-0.5.11.tar.gz" + sha256 "9045d6640b1bd00fcc49f2f7e81992cdc6c7279767db199d7f3b63e2f5007b58" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pymediainfo" do + url "https://files.pythonhosted.org/packages/4d/80/80a6fb21005b81e30f6193d45cba13857df09f5d483e0551fa6fbb3aaeed/pymediainfo-7.0.1.tar.gz" + sha256 "0d5df59ecc615e24c56f303b8f651579c6accab7265715e5d429186d7ba21514" + end + + resource "pysubs2" do + url "https://files.pythonhosted.org/packages/31/4a/becf78d9d3df56e6c4a9c50b83794e5436b6c5ab6dd8a3f934e94c89338c/pysubs2-1.8.0.tar.gz" + sha256 "3397bb58a4a15b1325ba2ae3fd4d7c214e2c0ddb9f33190d6280d783bb433b20" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rebulk" do + url "https://files.pythonhosted.org/packages/f2/06/24c69f8d707c9eefc1108a64e079da56b5f351e3f59ed76e8f04b9f3e296/rebulk-3.2.0.tar.gz" + sha256 "0d30bf80fca00fa9c697185ac475daac9bde5f646ce3338c9ff5d5dc1ebdfebc" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "srt" do + url "https://files.pythonhosted.org/packages/66/b7/4a1bc231e0681ebf339337b0cd05b91dc6a0d701fa852bb812e244b7a030/srt-3.5.3.tar.gz" + sha256 "4884315043a4f0740fd1f878ed6caa376ac06d70e135f306a6dc44632eed0cc0" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "trakit" do + url "https://files.pythonhosted.org/packages/59/0c/28f6a6f60cf58f383142c2daf73dd9b97cd8436e71f121a4bcb35e1b459e/trakit-0.2.5.tar.gz" + sha256 "d7e530ed82906eeadf7982d6a357883ae0490f34bbd18f8232b8fc5f250a4ae7" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"subliminal", shell_parameter_format: :click) + end + + test do + (testpath/".config").mkpath + system bin/"subliminal", "download", "-l", "en", + "The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4" + assert_path_exists testpath/"The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.en.srt" + end +end diff --git a/Formula/s/subnetcalc.rb b/Formula/s/subnetcalc.rb new file mode 100644 index 0000000000000..8d3630cfef467 --- /dev/null +++ b/Formula/s/subnetcalc.rb @@ -0,0 +1,51 @@ +class Subnetcalc < Formula + desc "IPv4/IPv6 subnet calculator" + homepage "https://www.nntb.no/~dreibh/subnetcalc/index.html" + url "https://github.com/dreibh/subnetcalc/archive/refs/tags/subnetcalc-2.6.5.tar.gz" + sha256 "d3ca16b75b4eced6e4196b9791f9514941eaa9bcdaa2a899fbcc0b845103f097" + license "GPL-3.0-or-later" + head "https://github.com/dreibh/subnetcalc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d7923eaa0a2d183a02618bfb1cfac211e9dac6040597d28a3f4d4c8af3fba80d" + sha256 cellar: :any, arm64_sequoia: "e0c0d392a6d5fa27cd2207b26d8b1c376359e0738b63cffa5ae2951ee0e2c03e" + sha256 cellar: :any, arm64_sonoma: "44199b26e469f3c20fd1f2de74d867e02d7ea2d2db4fec8ad9ac765b55a62035" + sha256 cellar: :any, sonoma: "60e77cc0cd0d150a3169f0706466f62a5af2af28d3394ad582ddb44307bcf723" + sha256 cellar: :any_skip_relocation, arm64_linux: "944e9791235a7515960ec89f50c2fdd837506fea80ea544a24b4cc7a1c47c51d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8051458c3e893d302194e119a105cefbefc848ede22667da8dd39d97cfefeb02" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + + on_macos do + depends_on "gettext" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + expected = <<~EOS + Address = 1.1.1.1 + \e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m1\e[0m . \e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m1\e[0m . \e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m1\e[0m . \e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m0\e[0m\e[34m1\e[0m + Network = 1.1.1.1 / 32 + Netmask = 255.255.255.255 + Broadcast = not needed on Point-to-Point links + Wildcard Mask = 0.0.0.0 + Hex. Address = 01010101 + Hosts Bits = 0 + Max. Hosts = 1 (2^0 - 0) + Host Range = { 1.1.1.1 - 1.1.1.1 } + Properties = \ + + - 1.1.1.1 is a HOST address in 1.1.1.1/32 + - Class A + Performing reverse DNS lookup ...\r\e[KDNS Hostname = one.one.one.one + EOS + assert_equal expected, shell_output("#{bin}/subnetcalc 1.1.1.1/32") + end +end diff --git a/Formula/s/subversion.rb b/Formula/s/subversion.rb new file mode 100644 index 0000000000000..67cd36f91f5b3 --- /dev/null +++ b/Formula/s/subversion.rb @@ -0,0 +1,280 @@ +class Subversion < Formula + desc "Version control system designed to be a better CVS" + homepage "https://subversion.apache.org/" + license "Apache-2.0" + revision 2 + + stable do + url "https://www.apache.org/dyn/closer.lua?path=subversion/subversion-1.14.5.tar.bz2" + mirror "https://archive.apache.org/dist/subversion/subversion-1.14.5.tar.bz2" + sha256 "e78a29e7766b8b7b354497d08f71a55641abc53675ce1875584781aae35644a1" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "561255dbd2f7abe1c06e1adaf59a510d424bde594fb57825bf10ba6d3e2d070a" + sha256 arm64_sequoia: "4cf080615ff2b17d349bf9e411989b4fe66f2203979bcb2bea73a8294b975247" + sha256 arm64_sonoma: "ca649b89082b15350c35ac1b8d0850644005d420a7315765bae17e7791d5d4a4" + sha256 sonoma: "3930de60c90fa9fe627140fd3e8edc7aa7f1429c9484dbfa94da2944aeda84ca" + sha256 arm64_linux: "db21e30a62ebb4e59115a9d9cab4742f907864d09cad278ffd1ff0139a06f3ff" + sha256 x86_64_linux: "4a3d33cf7af4310e690f3d701db5e404d9970964608264fc91c5f93fea6ed7de" + end + + head do + url "https://github.com/apache/subversion.git", branch: "trunk" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + end + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "scons" => :build # For Serf + depends_on "swig" => :build + depends_on "apr" + depends_on "apr-util" + + # build against Homebrew versions of + # gettext, lz4 and utf8proc for consistency + depends_on "gettext" + depends_on "lz4" + depends_on "openssl@3" # For Serf + depends_on "utf8proc" + + uses_from_macos "expat" + uses_from_macos "krb5" + uses_from_macos "perl" + uses_from_macos "ruby" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + # Prevent "-arch ppc" from being pulled in from Perl's $Config{ccflags} + patch :DATA + end + + on_linux do + depends_on "libtool" => :build + end + + resource "py3c" do + url "https://github.com/encukou/py3c/archive/refs/tags/v1.4.tar.gz" + sha256 "abc745079ef906148817f4472c3fb4bc41d62a9ea51a746b53e09819494ac006" + end + + resource "serf" do + url "https://www.apache.org/dyn/closer.lua?path=serf/serf-1.3.10.tar.bz2" + mirror "https://archive.apache.org/dist/serf/serf-1.3.10.tar.bz2" + sha256 "be81ef08baa2516ecda76a77adf7def7bc3227eeb578b9a33b45f7b41dc064e6" + end + + def python3 + "python3.14" + end + + def install + py3c_prefix = buildpath/"py3c" + serf_prefix = libexec/"serf" + + resource("py3c").unpack py3c_prefix + resource("serf").stage do + if OS.linux? + inreplace "SConstruct" do |s| + s.gsub! "env.Append(LIBPATH=['$OPENSSL/lib'])", + "\\1\nenv.Append(CPPPATH=['$ZLIB/include'])\nenv.Append(LIBPATH=['$ZLIB/lib'])" + end + end + + inreplace "SConstruct" do |s| + s.gsub! "variables=opts,", + "variables=opts, RPATHPREFIX = '-Wl,-rpath,'," + end + + # scons ignores our compiler and flags unless explicitly passed + krb5 = if OS.mac? + "/usr" + else + Formula["krb5"].opt_prefix + end + + args = %W[ + PREFIX=#{serf_prefix} GSSAPI=#{krb5} CC=#{ENV.cc} + CFLAGS=#{ENV.cflags} LINKFLAGS=#{ENV.ldflags} + OPENSSL=#{Formula["openssl@3"].opt_prefix} + APR=#{Formula["apr"].opt_prefix} + APU=#{Formula["apr-util"].opt_prefix} + ] + + args << "ZLIB=#{Formula["zlib"].opt_prefix}" if OS.linux? + + scons = Formula["scons"].opt_bin/"scons" + system scons, *args + system scons, "install" + end + + # Use existing system zlib and sqlite + zlib = if OS.mac? + "#{MacOS.sdk_path_if_needed}/usr" + else + Formula["zlib"].opt_prefix + end + + sqlite = if OS.mac? + "#{MacOS.sdk_path_if_needed}/usr" + else + Formula["sqlite"].opt_prefix + end + + # Use dep-provided other libraries + # Don't mess with Apache modules (since we're not sudo) + if OS.linux? + # svn can't find libserf-1.so.1 at runtime without this + ENV.append "LDFLAGS", "-Wl,-rpath=#{serf_prefix}/lib" + # Fix linkage when build-from-source as brew disables superenv when + # `scons` is a dependency. Can remove if serf is moved to a separate + # formula or when serf's cmake support is stable. + ENV.append "LDFLAGS", "-Wl,-rpath=#{HOMEBREW_PREFIX}/lib" unless build.bottle? + end + + perl = DevelopmentTools.locate("perl") + ruby = DevelopmentTools.locate("ruby") + + args = %W[ + --prefix=#{prefix} + --disable-debug + --enable-optimize + --disable-mod-activation + --disable-plaintext-password-storage + --with-apr-util=#{Formula["apr-util"].opt_prefix} + --with-apr=#{Formula["apr"].opt_prefix} + --with-apxs=no + --with-ruby-sitedir=#{lib}/ruby + --with-py3c=#{py3c_prefix} + --with-serf=#{serf_prefix} + --with-sqlite=#{sqlite} + --with-swig=#{Formula["swig"].opt_prefix} + --with-zlib=#{zlib} + --without-apache-libexecdir + --without-berkeley-db + --without-gpg-agent + --without-jikes + PERL=#{perl} + PYTHON=#{which(python3)} + RUBY=#{ruby} + ] + + # preserve compatibility with macOS 12.0–12.2 + args.unshift "--enable-sqlite-compatibility-version=3.36.0" if OS.mac? && MacOS.version == :monterey + + inreplace "Makefile.in", + "toolsdir = @bindir@/svn-tools", + "toolsdir = @libexecdir@/svn-tools" + + # regenerate configure file as we patched `build/ac-macros/swig.m4` + system "./autogen.sh" if build.head? + system "./configure", *args + system "make" + ENV.deparallelize { system "make", "install" } + bash_completion.install "tools/client-side/bash_completion" => "subversion" + + system "make", "tools" + system "make", "install-tools" + + system "make", "swig-py" + system "make", "install-swig-py" + (prefix/Language::Python.site_packages(python3)).install_symlink Dir["#{lib}/svn-python/*"] + + perl_archlib = Utils.safe_popen_read(perl.to_s, "-MConfig", "-e", "print $Config{archlib}") + perl_core = Pathname.new(perl_archlib)/"CORE" + perl_extern_h = perl_core/"EXTERN.h" + + if OS.mac? && !perl_extern_h.exist? + # No EXTERN.h, maybe it's system perl + perl_version = Utils.safe_popen_read(perl.to_s, "--version")[/v(\d+\.\d+)(?:\.\d+)?/, 1] + perl_core = MacOS.sdk_path/"System/Library/Perl"/perl_version/"darwin-thread-multi-2level/CORE" + perl_extern_h = perl_core/"EXTERN.h" + end + + onoe "'#{perl_extern_h}' does not exist" unless perl_extern_h.exist? + + if OS.mac? + inreplace "Makefile" do |s| + s.change_make_var! "SWIG_PL_INCLUDES", + "$(SWIG_INCLUDES) -arch #{Hardware::CPU.arch} -g -pipe -fno-common " \ + "-DPERL_DARWIN -fno-strict-aliasing -I#{HOMEBREW_PREFIX}/include -I#{perl_core}" + end + end + system "make", "swig-pl-lib" + system "make", "install-swig-pl-lib" + cd "subversion/bindings/swig/perl/native" do + system perl, "Makefile.PL", "PREFIX=#{prefix}", "INSTALLSITEMAN3DIR=#{man3}" + ENV.deparallelize { system "make", "install" } + end + + # This is only created when building against system Perl, but it isn't + # purged by Homebrew's post-install cleaner because that doesn't check + # "Library" directories. It is however pointless to keep around as it + # only contains the perllocal.pod installation file. + rm_r(prefix/"Library/Perl") if (prefix/"Library/Perl").exist? + end + + def caveats + <<~EOS + svntools have been installed to: + #{opt_libexec} + + The perl bindings are located in various subdirectories of: + #{opt_lib}/perl5 + EOS + end + + test do + system bin/"svnadmin", "create", "test" + system bin/"svnadmin", "verify", "test" + system bin/"svn", "checkout", "file://#{testpath}/test", "svn-test" + + platform = if OS.mac? + "darwin-thread-multi-2level" + else + arch = Hardware::CPU.arm? ? :aarch64 : Hardware::CPU.arch + "#{arch}-#{OS.kernel_name.downcase}-thread-multi" + end + + perl = DevelopmentTools.locate("perl") + + perl_version = Utils.safe_popen_read(perl.to_s, "--version")[/v(\d+\.\d+(?:\.\d+)?)/, 1] + ENV["PERL5LIB"] = "#{lib}/perl5/site_perl/#{perl_version}/#{platform}" + system perl, "-e", "use SVN::Client; new SVN::Client()" + + system python3, "-c", "import svn.client, svn.repos" + end +end + +__END__ +diff --git a/subversion/bindings/swig/perl/native/Makefile.PL.in b/subversion/bindings/swig/perl/native/Makefile.PL.in +index a60430b..bd9b017 100644 +--- a/subversion/bindings/swig/perl/native/Makefile.PL.in ++++ b/subversion/bindings/swig/perl/native/Makefile.PL.in +@@ -76,10 +76,13 @@ my $apr_ldflags = '@SVN_APR_LIBS@' + + chomp $apr_shlib_path_var; + ++my $config_ccflags = $Config{ccflags}; ++$config_ccflags =~ s/-arch\s+\S+//g; ++ + my %config = ( + ABSTRACT => 'Perl bindings for Subversion', + DEFINE => $cppflags, +- CCFLAGS => join(' ', $cflags, $Config{ccflags}), ++ CCFLAGS => join(' ', $cflags, $config_ccflags), + INC => join(' ', $includes, $cppflags, + " -I$swig_srcdir/perl/libsvn_swig_perl", + " -I$svnlib_srcdir/include", diff --git a/Formula/s/sugarjar.rb b/Formula/s/sugarjar.rb new file mode 100644 index 0000000000000..2f41aa4f37d90 --- /dev/null +++ b/Formula/s/sugarjar.rb @@ -0,0 +1,49 @@ +class Sugarjar < Formula + desc "Helper utility for a better Git/GitHub experience" + homepage "https://github.com/jaymzh/sugarjar/" + url "https://github.com/jaymzh/sugarjar/archive/refs/tags/v2.0.1.tar.gz" + sha256 "7ae427d8dff1a293f063617365e76615ea7d238aaa7def260fd2b6f2cfa5e768" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "485a7315667e784a8db3a41a9642116ed2dce02f972ca0527cc55795efcce237" + sha256 cellar: :any, arm64_sequoia: "41881bd68b9c27052bd27ebaa906c3d172a1ec42cdf46bcf1b69286a3310f18e" + sha256 cellar: :any, arm64_sonoma: "d3da82b223693faff2895223140102ecf99654bba3e683abae401c2bf033fe2e" + sha256 cellar: :any, sonoma: "e1f2c10b2ecbe8c15464eba1f50d2aab0af50c538d37b2c351e728974786b35e" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb0a1c68127928091f69bf22b6887312e77a6c27d28bb2f49bbb3529708f8920" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d7624e865ac1fe2600a77b31edb040f26b2604063d899b9700b32f786faca46" + end + + depends_on "gh" + depends_on "ruby" + + uses_from_macos "libffi" + + def install + ENV["BUNDLE_FORCE_RUBY_PLATFORM"] = "1" + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg + ENV["BUNDLE_WITHOUT"] = "development test" + ENV["GEM_HOME"] = libexec + + system "bundle", "install" + system "gem", "build", "#{name}.gemspec" + system "gem", "install", "#{name}-#{version}.gem" + + bin.install libexec/"bin/sj" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + bash_completion.install "extras/sugarjar_completion.bash" => "sj" + + # Remove mkmf.log files to avoid shims references + rm Dir["#{libexec}/extensions/*/*/*/mkmf.log"] + end + + test do + output = shell_output("#{bin}/sj lint", 1) + assert_match "sugarjar must be run from inside a git repo", output + output = shell_output("#{bin}/sj bclean", 1) + assert_match "sugarjar must be run from inside a git repo", output + end +end diff --git a/Formula/s/sui.rb b/Formula/s/sui.rb new file mode 100644 index 0000000000000..2fef7ad97d28c --- /dev/null +++ b/Formula/s/sui.rb @@ -0,0 +1,48 @@ +class Sui < Formula + desc "Next-generation smart contract platform powered by the Move programming language" + homepage "https://sui.io" + url "https://github.com/MystenLabs/sui/archive/refs/tags/testnet-v1.59.1.tar.gz" + sha256 "e500bef6fdb5071ca979b5a16812c2e9adf78dfe4ba86104ce1bc8cd9da3a691" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^testnet[._-]v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aea25d33ecc9b08473d9be7f6e887cc07f4e429692f4847a34134cdfdaedcb06" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd645846112e838a4318000e58228cbe2974208b15172f11b2d22d7b76d79c2d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5899ecc0d3bda131788782a4268a5dd98d94b4d1cf3b7e8abf0f37b056d35e6e" + sha256 cellar: :any_skip_relocation, sonoma: "2113f0c4f42b83ea698bc91727414e296ba7dc36f53949032edae3ff60341128" + sha256 cellar: :any_skip_relocation, arm64_linux: "b87ba2677fe3c26cd672d6b7b5e38d557a8aef76f6f5c4dcbedd27e3e4d5b8ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "409dff664ab11f7ec383b1209c04f5ad8bc75e41b40a7c88a710a5934bd75639" + end + + depends_on "cmake" => :build + depends_on "libpq" => :build + depends_on "rust" => :build + + on_linux do + depends_on "llvm" => :build + end + + def install + ENV["GIT_REVISION"] = "homebrew" + system "cargo", "install", "--features", "tracing", *std_cargo_args(path: "crates/sui") + end + + test do + assert_match version.to_s, shell_output("#{bin}/sui --version") + + (testpath/"testing.keystore").write <<~EOS + [ + "AOLe60VN7M+X7H3ZVEdfNt8Zzsj1mDJ7FlAhPFWSen41" + ] + EOS + keystore_output = shell_output("#{bin}/sui keytool --keystore-path testing.keystore list") + assert_match "0xd52f9cae5db1f8ab2cb0ac437cbcdda47900e92ee0a0c06906ffc84e26f999ce", keystore_output + end +end diff --git a/Formula/s/suil.rb b/Formula/s/suil.rb new file mode 100644 index 0000000000000..efb2c9b1d2953 --- /dev/null +++ b/Formula/s/suil.rb @@ -0,0 +1,64 @@ +class Suil < Formula + desc "Lightweight C library for loading and wrapping LV2 plugin UIs" + homepage "https://drobilla.net/software/suil.html" + url "https://download.drobilla.net/suil-0.10.22.tar.xz" + sha256 "d720969e0f44a99d5fba35c733a43ed63a16b0dab867970777efca4b25387eb7" + license "ISC" + head "https://gitlab.com/lv2/suil.git", branch: "main" + + livecheck do + url "https://download.drobilla.net/" + regex(/href=.*?suil[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 arm64_tahoe: "beeb7b73619489f0cee7601a170abc1290c16ee9ba097f57fcbd628fbd7d300d" + sha256 arm64_sequoia: "25a6bf27bf30c162f447f501020cd9eeb80c3cdea9c67f2cf342bf2717aa57c9" + sha256 arm64_sonoma: "ead556e804f93c966a0100d8e8e94385848c98b757c2c1cd53a5f19514512caa" + sha256 sonoma: "1c238cde79a053b3ff7799932eddb53d6128b098c21c98237c96fac207de9b1f" + sha256 arm64_linux: "65176e9df395adf5d1ee73374dd68486a87753b0186a16a440a61e7870780eb5" + sha256 x86_64_linux: "80a3d62881ba344a399c18f69ba815c74dc54efdfa0a3a27078a79cdad24f31b" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "lv2" + + on_macos do + # Can undeprecate if new release with Qt 6 support is available. + # Alternatively can just build direct X11 wrapper (libsuil_x11.dylib) + # Issue ref: https://gitlab.com/lv2/suil/-/issues/11 + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "qt@5" # cocoa still needs Qt5 + end + + on_linux do + depends_on "glib" + depends_on "gtk+3" + depends_on "qtbase" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + return suil_ui_supported("my-host", "my-ui"); + } + C + lv2 = Formula["lv2"].opt_include + system ENV.cc, "test.c", "-I#{lv2}", "-I#{include}/suil-0", "-L#{lib}", "-lsuil-0", "-o", "test" + system "./test" + end +end diff --git a/Formula/s/suite-sparse.rb b/Formula/s/suite-sparse.rb new file mode 100644 index 0000000000000..7e89ba2bf2a76 --- /dev/null +++ b/Formula/s/suite-sparse.rb @@ -0,0 +1,64 @@ +class SuiteSparse < Formula + desc "Suite of Sparse Matrix Software" + homepage "https://people.engr.tamu.edu/davis/suitesparse.html" + url "https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v7.11.0.tar.gz" + sha256 "93ed4c4e546a49fc75884c3a8b807d5af4a91e39d191fbbc60a07380b12a35d1" + license all_of: [ + "BSD-3-Clause", + "LGPL-2.1-or-later", + "GPL-2.0-or-later", + "Apache-2.0", + "GPL-3.0-only", + any_of: ["LGPL-3.0-or-later", "GPL-2.0-or-later"], + ] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "1ecf096ad33ac762eb745bc3fd2dc8dd836140827effd5603a56ef3c22a3c9c0" + sha256 arm64_sequoia: "ceeed1f94c9f421e9d6899fe7967f8789ff00018a0cd7393eda790369a270997" + sha256 arm64_sonoma: "0bee9c1624927fa5a9ae3fd4ef09d6b9f5295dde255cbe6084bf4455e1c34f20" + sha256 arm64_ventura: "d8dc9f85929925f774adcb7923c9be250465f3cf56b59f7e1f93951b2353d184" + sha256 sonoma: "d17e1f63a48010491d52b47bc65dcbd4cb2f9ca701835984cba60a9d02d09327" + sha256 ventura: "2d756bf83971989982e0345d60c1188a1542bb0bfeff88f5d1793e73c8775a06" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2fe030d75cb79c6c6428595df9ed602ec3cbc3b9956af10c58a8e92f19f8421" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0301f655844671472214972870de180f3c96384c6e91d81517a1dd5faa9c71a" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "gmp" + depends_on "mpfr" + + on_macos do + depends_on "libomp" + end + + on_linux do + depends_on "openblas" + end + + def install + # Avoid references to Homebrew shims + inreplace "GraphBLAS/cmake_modules/GraphBLAS_JIT_configure.cmake", + "C_COMPILER_BINARY \"${CMAKE_C_COMPILER}\"", "C_COMPILER_BINARY \"#{ENV.cc}\"" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "KLU/Demo/klu_simple.c" + end + + test do + system ENV.cc, "-o", "test", pkgshare/"klu_simple.c", + "-I#{include}/suitesparse", "-L#{lib}", + "-lsuitesparseconfig", "-lklu" + assert_path_exists testpath/"test" + assert_match "x [0] = 1", shell_output("./test") + end +end diff --git a/Formula/s/sundials.rb b/Formula/s/sundials.rb new file mode 100644 index 0000000000000..6e174dc2c0d99 --- /dev/null +++ b/Formula/s/sundials.rb @@ -0,0 +1,69 @@ +class Sundials < Formula + desc "Nonlinear and differential/algebraic equations solver" + homepage "https://computing.llnl.gov/projects/sundials" + url "https://github.com/LLNL/sundials/releases/download/v7.5.0/sundials-7.5.0.tar.gz" + sha256 "089ac659507def738b7a65b574ffe3a900d38569e3323d9709ebed3e445adecc" + license "BSD-3-Clause" + + livecheck do + url "https://computing.llnl.gov/projects/sundials/sundials-software" + regex(/href=.*?sundials[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bdca6a1965e3c4d23438f226a3538d52d500466e25936a0cb2c6602ce634649f" + sha256 cellar: :any, arm64_sequoia: "6d96641c4b35e673d83df8cd8a77ec055e656521b34a0913e04c9b66b79131f5" + sha256 cellar: :any, arm64_sonoma: "52797bd57e4862acd1dde93475613a8c7928c8f1bc0cbb22c06d25b1e0c9ac6c" + sha256 cellar: :any, sonoma: "cf97a4b063dd8ec56ca682bc2aa33444b5cd90e02c82e6b6eb70c3b7b344a531" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e3d8fc19a1cf7cfd31037d7f7899150cc43e19b79eab8af0f1424b6a4cfee8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d46ac702b24f49dc7ae07a1ea2514876806b64c1c1418507f1abe5a7d00d70b" + end + + depends_on "cmake" => :build + depends_on "open-mpi" + depends_on "openblas" + depends_on "suite-sparse" + + def install + blas = "-L#{Formula["openblas"].opt_lib} -lopenblas" + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DENABLE_KLU=ON + -DENABLE_LAPACK=ON + -DENABLE_MPI=ON + -DKLU_LIBRARY_DIR=#{Formula["suite-sparse"].opt_lib} + -DKLU_INCLUDE_DIR=#{Formula["suite-sparse"].opt_include}/suitesparse + -DLAPACK_LIBRARIES=#{blas};#{blas} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Only keep one example for testing purposes + (pkgshare/"examples").install Dir[ + "test/unit_tests/nvector/test_nvector.c", + "test/unit_tests/nvector/test_nvector.h", + "test/unit_tests/nvector/serial/test_nvector_serial.c", + ] + rm_r(prefix/"examples") + end + + test do + cp Dir[pkgshare/"examples/*"], testpath + args = %W[ + -I#{include} + -L#{lib} + -lsundials_core + -lsundials_nvecserial + -lmpi + -lm + ] + + args += ["-I#{Formula["open-mpi"].opt_include}", "-L#{Formula["open-mpi"].opt_lib}"] if OS.mac? + + system ENV.cc, "test_nvector.c", "test_nvector_serial.c", "-o", "test", *args + + assert_match "SUCCESS: NVector module passed all tests", shell_output("./test 42 0") + end +end diff --git a/Formula/s/supabase-mcp-server.rb b/Formula/s/supabase-mcp-server.rb new file mode 100644 index 0000000000000..8b58807a04898 --- /dev/null +++ b/Formula/s/supabase-mcp-server.rb @@ -0,0 +1,31 @@ +class SupabaseMcpServer < Formula + desc "MCP Server for Supabase" + homepage "https://supabase.com/docs/guides/getting-started/mcp" + url "https://registry.npmjs.org/@supabase/mcp-server-supabase/-/mcp-server-supabase-0.5.9.tgz" + sha256 "a8d1bfec928aee2286ff9fbe393f41576f2e8b5b74488679d6140496e3a66a18" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f78f8853d37e7df5bdc5ff86f0f3bb2e3cf763e0025f9d096581edcf6256d79b" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec/"bin/mcp-server-supabase" => "supabase-mcp-server" + end + + test do + assert_match version.to_s, shell_output("#{bin}/supabase-mcp-server --version") + + ENV["SUPABASE_ACCESS_TOKEN"] = "test-token" + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + assert_match "Lists all Supabase projects for the user", pipe_output(bin/"supabase-mcp-server", json, 0) + end +end diff --git a/Formula/s/supabase.rb b/Formula/s/supabase.rb new file mode 100644 index 0000000000000..3cc1e720a7d4c --- /dev/null +++ b/Formula/s/supabase.rb @@ -0,0 +1,42 @@ +class Supabase < Formula + desc "Open source Firebase alternative" + homepage "https://supabase.com/docs/reference/cli/about" + url "https://github.com/supabase/cli/archive/refs/tags/v2.54.11.tar.gz" + sha256 "fe92b944034bf4fe51b42d82b247cd0a6334311a81ac9c71190a433c042c2dfc" + license "MIT" + head "https://github.com/supabase/cli.git", branch: "develop" + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "91e055b5b8210f14427fdfc4963410863f06c200d6ace6eb53fda7d08853995f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "62bd8b7a78df2cfb504252a4643a0e39712d7628e28c1b50c02791dcae97a1b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f31a62e41c445244629741c7da897420c135dd14b94b986dc7784df9d61cc219" + sha256 cellar: :any_skip_relocation, sonoma: "56becb6265dcb0e7bbd8bb2170f13cf8409fb0543e0fde5fb8ba2b971be42623" + sha256 cellar: :any_skip_relocation, arm64_linux: "000d00b057fa16bb70b133983375edb6aca0b4288b03bddc7837ccaad59c16d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80ce5b8062a4293d2916436169afd0a6390f28dd38d62895c2ff438d27632c7a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/supabase/cli/internal/utils.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"supabase", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/supabase --version") + + system bin/"supabase", "init", "--yes" + assert_path_exists testpath/"supabase/config.toml" + assert_match "failed to inspect container health", shell_output("#{bin}/supabase status 2>&1", 1) + assert_match "Access token not provided", shell_output("#{bin}/supabase projects list 2>&1", 1) + end +end diff --git a/Formula/s/superfile.rb b/Formula/s/superfile.rb new file mode 100644 index 0000000000000..764135a1f4d78 --- /dev/null +++ b/Formula/s/superfile.rb @@ -0,0 +1,35 @@ +class Superfile < Formula + desc "Modern and pretty fancy file manager for the terminal" + homepage "https://superfile.netlify.app/" + url "https://github.com/yorukot/superfile/archive/refs/tags/v1.4.0.tar.gz" + sha256 "aa3ad00b3b89023c413a47f4f518f419d37ed3646eac3e9cfaf53d31e5dee82e" + license "MIT" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6a186421dbc71c7d1c870004a24af1a6a1adf70512167c79183dd64ee7162848" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "20fd7376d766f55ef9551a46512ec96c5f6e44834b3684a8d2d0d3abc0095585" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c59f76e26b950001394334dfc4852f9c3f2471f31bf52962f8731aa5c302dd8" + sha256 cellar: :any_skip_relocation, sonoma: "d427f3bee44d568f7ae0965851193bfeac24ee33490a932e4e3b47207a177a83" + sha256 cellar: :any_skip_relocation, arm64_linux: "e60b1b946d7a173b62ee3e3e2cfd8d83893e12341215d2a9fe6ed41addb54a51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ac1d6b2eb709afd8ce241449f7bf1baf1d6e73ddfe2b60ab1e3192d5ee21a19" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"spf") + end + + test do + # superfile is a GUI application + assert_match version.to_s, shell_output("#{bin}/spf -v") + end +end diff --git a/Formula/s/superhtml.rb b/Formula/s/superhtml.rb new file mode 100644 index 0000000000000..9e5c775468e4a --- /dev/null +++ b/Formula/s/superhtml.rb @@ -0,0 +1,51 @@ +class Superhtml < Formula + desc "HTML Language Server & Templating Language Library" + homepage "https://github.com/kristoff-it/superhtml" + url "https://github.com/kristoff-it/superhtml/archive/refs/tags/v0.6.2.tar.gz" + sha256 "431d7189501e1b2e8da53c3ca8d6e7f1c642b523f3715c21cb8bfd2f8eef3971" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6ecdeda20aba3c932e654ce1a7ad91174f5084cc83633c5d9cd6f1390daee912" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8012a4daf05ee0ddbb51d09172fadeb4fe23b21cadeed03a42c1663964bd52dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bae9719b4bb4567edaf1678911be594bfdc8d537996bb723f300c3fb0f2aad93" + sha256 cellar: :any_skip_relocation, sonoma: "f41742a7a7b61ce1e6bf019e897ae0b3f0076215353a8af4b7f53750533593f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "b468973d40b401cf79782c7b85cf42696046c5064797af71a24de169e5b33d58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8874ee426039b691bb1faffd504ba20c22be4501f249d0bf8f84f2f46c636f5f" + end + + depends_on "zig" => :build + + def install + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case ENV.effective_arch + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else ENV.effective_arch + end + + # upstream issue: https://github.com/kristoff-it/superhtml/issues/108 + inreplace "build.zig", '"unknown"', "\"#{version}\"" # patch fallback version + args = ["-Dcpu=#{cpu}"] if build.bottle? + + system "zig", "build", *args, *std_zig_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/superhtml version 2>&1") + + (testpath/"test.html").write <<~HTML + + + + BrewTest + + +

    test

    + + + HTML + system bin/"superhtml", "fmt", "test.html" + end +end diff --git a/Formula/s/superlu.rb b/Formula/s/superlu.rb new file mode 100644 index 0000000000000..9686a0eb2b34c --- /dev/null +++ b/Formula/s/superlu.rb @@ -0,0 +1,52 @@ +class Superlu < Formula + desc "Solve large, sparse nonsymmetric systems of equations" + homepage "https://portal.nersc.gov/project/sparse/superlu/" + url "https://github.com/xiaoyeli/superlu/archive/refs/tags/v7.0.0.tar.gz" + sha256 "d7b91d4e0bb52644ca74c1a4dd466a694ddf1244a7bbf93cb453e8ca1f6527eb" + license "BSD-3-Clause-LBNL" + + livecheck do + url :homepage + regex(/>SuperLU Version v?(\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ebe6d27572f2d442006da1de3b99fa24adbe5685e2bb82b5d644ac4b60226e61" + sha256 cellar: :any, arm64_sequoia: "4254178b07c9d3a726c6275a30e940b31f26e4ca674ec2cc5731974831a3b254" + sha256 cellar: :any, arm64_sonoma: "a2b33d13c7cfc12be7928d7de630dc45c13afc610cdfb575fa1828a7c9ec2424" + sha256 cellar: :any, arm64_ventura: "0d9bdc7fc5edac4991f85b6bcf533011bb6f399287fbe243a0ea80721cddbd84" + sha256 cellar: :any, arm64_monterey: "abf41ebe1584b1e8267de4464b1c3d9865a423709f4873e1cdd1cab5520d8f0a" + sha256 cellar: :any, sonoma: "2a8abc054e2595a4a3dd57840449adabf159c812eaf7d9d1a24c31dc0e125396" + sha256 cellar: :any, ventura: "595c90722cfb68db872db17c84ae8f85dcc6f296f4ce8a64cf5254c8c0b297d9" + sha256 cellar: :any, monterey: "40d93c338aec89af15f42e2d8a807e013daa8608f4fd6bc3f62f9581b86536f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e3a619194aea2779fb2aa83e0baec2180d0da49742042361a50492069394323" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e2bfcb8dec3fae7f0fcd94ee5515dd0d1a27327ae79a657c09b44f00299cf95" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "openblas" + + def install + args = %W[ + -Denable_internal_blaslib=NO + -DTPL_BLAS_LIBRARIES=#{Formula["openblas"].opt_lib}/#{shared_library("libopenblas")} + -DBUILD_SHARED_LIBS=YES + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Source and data for test + pkgshare.install "EXAMPLE/dlinsol.c" + pkgshare.install "EXAMPLE/g20.rua" + end + + test do + pkgconf_cflags = shell_output("pkgconf --cflags --libs superlu").chomp.split + system ENV.cc, pkgshare/"dlinsol.c", *pkgconf_cflags, "-o", "test" + assert_match "No of nonzeros in L+U = 11886", + shell_output("./test < #{pkgshare}/g20.rua") + end +end diff --git a/Formula/s/supermodel.rb b/Formula/s/supermodel.rb new file mode 100644 index 0000000000000..40cf013d03b6d --- /dev/null +++ b/Formula/s/supermodel.rb @@ -0,0 +1,105 @@ +class Supermodel < Formula + desc "Sega Model 3 arcade emulator" + homepage "https://github.com/trzy/Supermodel" + license "GPL-3.0-or-later" + revision 1 + + stable do + # Homepage is down, issue ref: https://github.com/trzy/Supermodel/issues/259 + url "https://cdn.netbsd.org/pub/pkgsrc/distfiles/Supermodel_0.2a_Src.zip" + sha256 "ecaf3e7fc466593e02cbf824b722587d295a7189654acb8206ce433dcff5497b" + + depends_on "sdl12-compat" + end + + livecheck do + url "https://www.supermodel3.com/Download.html" + regex(/href=.*?Supermodel[._-]v?(\d+(?:\.\d+)+[a-z]?)[._-]Src\.zip/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "9ebc9708a1207cf92a01649204cd4f673b63f4df3574ffacda4c29df64b3b0cd" + sha256 arm64_sequoia: "55806d70707f24311eac885aa6ec3963cc508dbd397b159a7a80611392bb9c9f" + sha256 arm64_sonoma: "7c5571842431f0b73847af493d4fe4d79ae4a834954a567f7c6732e3e83c387b" + sha256 arm64_ventura: "60d857bc4b057fdb6950645b22eb04970bca9e21e5065f44486bbf5dfd4b4754" + sha256 sonoma: "8a730dcfcf67bd5091d7b589f9111ae735ec35c939caf14e4e8469be35c2611a" + sha256 ventura: "c3d65f9c8c50660fb2f6fe7cdc3cf6e641f6acefdb396088328ec6c103258d11" + sha256 arm64_linux: "9a8fbf1e975303f9c7858caa8d2829cf0cce382971ffa6035576bf9fae7b8e71" + sha256 x86_64_linux: "9bffc6af81706a65a8355fe1618d9a4062e48ae2ae969d24888d0802434ca38d" + end + + head do + url "https://github.com/trzy/Supermodel.git", branch: "master" + + depends_on "sdl2" + end + + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + os = OS.mac? ? "OSX" : "UNIX" + makefile_dir = build.head? ? "Makefiles/Makefile.#{os}" : "Makefiles/Makefile.SDL.#{os}.GCC" + + if build.stable? + inreplace makefile_dir do |s| + if OS.mac? + # Remove deprecated AGL framework + # https://developer.apple.com/documentation/macos-release-notes/macos-26-release-notes#AGL + s.gsub! "-framework AGL", "" if DevelopmentTools.clang_build_version >= 1700 + + # Set up SDL library correctly + s.gsub! "-framework SDL", "`sdl-config --libs`" + s.gsub!(/(\$\(COMPILER_FLAGS\))/, "\\1 -I#{Formula["sdl12-compat"].opt_prefix}/include") + end + # Fix missing label issue for auto-generated code + s.gsub! %r{(\$\(OBJ_DIR\)/m68k\w+)\.o: \1.c (.*)\n(\s*\$\(CC\)) \$<}, "\\1.o: \\2\n\\3 \\1.c" + # Add -std=c++14 + s.gsub! "$(CPPFLAGS)", "$(CPPFLAGS) -std=c++14" if OS.linux? + # Fix compile with newer Clang. + if DevelopmentTools.clang_build_version >= 1403 + cxxflags = %w[ + -Wno-implicit-function-declaration + -Wno-reserved-user-defined-literal + -Wno-c++11-narrowing + ] + s.gsub!(/^COMPILER_FLAGS = /, "\\0#{cxxflags.join(" ")} ") + end + end + # Use /usr/local/var/supermodel for saving runtime files + inreplace "Src/OSD/SDL/Main.cpp" do |s| + s.gsub! %r{(Config|Saves|NVRAM)/}, "#{var}/supermodel/\\1/" + s.gsub!(/(\w+\.log)/, "#{var}/supermodel/Logs/\\1") + end + else + ENV.deparallelize + # Set up SDL2 library correctly + inreplace makefile_dir, "-framework SDL2", "`sdl2-config --libs`" if OS.mac? + end + + system "make", "-f", makefile_dir + bin.install "bin/Supermodel" => "supermodel" + (var/"supermodel/Config").install "Config/Supermodel.ini" + (var/"supermodel/Saves").mkpath + (var/"supermodel/NVRAM").mkpath + (var/"supermodel/Logs").mkpath + end + + def caveats + <<~EOS + Config, Saves, and NVRAM are located in the following directory: + #{var}/supermodel/ + EOS + end + + test do + system bin/"supermodel", "-print-games" + end +end diff --git a/Formula/s/supertux.rb b/Formula/s/supertux.rb new file mode 100644 index 0000000000000..e630703afd22d --- /dev/null +++ b/Formula/s/supertux.rb @@ -0,0 +1,104 @@ +class Supertux < Formula + desc "Classic 2D jump'n run sidescroller game" + homepage "https://www.supertux.org/" + license "GPL-3.0-or-later" + revision 12 + + stable do + url "https://github.com/SuperTux/supertux/releases/download/v0.6.3/SuperTux-v0.6.3-Source.tar.gz" + sha256 "f7940e6009c40226eb34ebab8ffb0e3a894892d891a07b35d0e5762dd41c79f6" + + depends_on "boost" + + # Workaround to build with Boost 1.89.0 until new release that drops Boost dependency + # https://github.com/SuperTux/supertux/commit/5333cebf629eb20621b284fc96b494257f3314bb + patch :DATA + end + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b3aa57f4eee7ae7c84e67e89229a9daeaeede9e93886e1611c98e9bdc5ac935d" + sha256 cellar: :any, arm64_sequoia: "9babc91234fa8859afc033a96ef11d755f4b889b7d70ca36c5e915d905b2bb97" + sha256 cellar: :any, arm64_sonoma: "c79a88e221ba8b3c4adedcb9d4b1e2122049794c86b4c7810d416c768b1722ee" + sha256 cellar: :any, arm64_ventura: "ef691781ca584343e444017931593b6088600bb907f573410273be0fcc0ae897" + sha256 cellar: :any, sonoma: "3329f1bbbe360dc57de237ad59332fca8b9ed90fb3f58ea92b56d605b6a928f7" + sha256 cellar: :any, ventura: "90f03927a7a7060b24dade4c6e78f5e44851338637d605e7f2eb57218c02ea6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb8c3e3818fde3d9770c19b648959aaba3883ce22bc7178a863db8e7de43da51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23828dd1619319db46d09505c8a368100f4614ff397c666e45b74b623498375d" + end + + head do + url "https://github.com/SuperTux/supertux.git", branch: "master" + + depends_on "fmt" + depends_on "openal-soft" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "glew" + depends_on "glm" + depends_on "libogg" + depends_on "libpng" + depends_on "libvorbis" + depends_on "physfs" + depends_on "sdl2" + depends_on "sdl2_image" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + depends_on "openal-soft" + end + + def install + # Support cmake 4 build, upstream pr ref, https://github.com/SuperTux/supertux/pull/3290 + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + args = [ + "-DINSTALL_SUBDIR_BIN=bin", + "-DINSTALL_SUBDIR_SHARE=share/supertux", + # Without the following option, Cmake intend to use the library of MONO framework. + "-DPNG_PNG_INCLUDE_DIR=#{Formula["libpng"].opt_include}", + ] + args << "-DCMAKE_INSTALL_RPATH=#{rpath}" if build.head? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Remove unnecessary files + rm_r(share/"applications") + rm_r(share/"pixmaps") + rm_r(prefix/"MacOS") if OS.mac? + end + + test do + (testpath/"config").write "(supertux-config)" + assert_equal "supertux2 v#{version}", shell_output("#{bin}/supertux2 --userdir #{testpath} --version").chomp + end +end + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b77029c0a..1842b4943 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -171,7 +171,7 @@ if(ENABLE_BOOST_STATIC_LIBS) + else(ENABLE_BOOST_STATIC_LIBS) + set(Boost_USE_STATIC_LIBS FALSE) + endif(ENABLE_BOOST_STATIC_LIBS) +-find_package(Boost REQUIRED COMPONENTS filesystem system date_time locale) ++find_package(Boost REQUIRED COMPONENTS filesystem date_time locale) + include_directories(SYSTEM ${Boost_INCLUDE_DIR}) + link_directories(${Boost_LIBRARY_DIRS}) + diff --git a/Formula/s/supervisor.rb b/Formula/s/supervisor.rb new file mode 100644 index 0000000000000..6e9babdac66bb --- /dev/null +++ b/Formula/s/supervisor.rb @@ -0,0 +1,74 @@ +class Supervisor < Formula + include Language::Python::Virtualenv + + desc "Process Control System" + homepage "http://supervisord.org/" + url "https://files.pythonhosted.org/packages/a9/b5/37e7a3706de436a8a2d75334711dad1afb4ddffab09f25e31d89e467542f/supervisor-4.3.0.tar.gz" + sha256 "4a2bf149adf42997e1bb44b70c43b613275ec9852c3edacca86a9166b27e945e" + license "BSD-3-Clause-Modification" + head "https://github.com/Supervisor/supervisor.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3ad1418d9387810ffedc4e281eb309045371119ca80cf1fbac67141079aa66c9" + end + + depends_on "python@3.14" + + def install + inreplace buildpath/"supervisor/skel/sample.conf" do |s| + s.gsub! %r{/tmp/supervisor\.sock}, var/"run/supervisor.sock" + s.gsub! %r{/tmp/supervisord\.log}, var/"log/supervisord.log" + s.gsub! %r{/tmp/supervisord\.pid}, var/"run/supervisord.pid" + s.gsub!(/^;\[include\]$/, "[include]") + s.gsub! %r{^;files = relative/directory/\*\.ini$}, "files = #{etc}/supervisor.d/*.ini" + end + + virtualenv_install_with_resources + + etc.install buildpath/"supervisor/skel/sample.conf" => "supervisord.conf" + end + + def post_install + (var/"run").mkpath + (var/"log").mkpath + conf_warn = <<~EOS + The default location for supervisor's config file is now: + #{etc}/supervisord.conf + Please move your config file to this location and restart supervisor. + EOS + old_conf = etc/"supervisord.ini" + opoo conf_warn if old_conf.exist? + end + + service do + run [opt_bin/"supervisord", "-c", etc/"supervisord.conf", "--nodaemon"] + keep_alive true + end + + test do + (testpath/"sd.ini").write <<~INI + [unix_http_server] + file=supervisor.sock + + [supervisord] + loglevel=debug + + [rpcinterface:supervisor] + supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + + [supervisorctl] + serverurl=unix://supervisor.sock + INI + + begin + pid = spawn bin/"supervisord", "--nodaemon", "-c", "sd.ini" + sleep 3 + sleep 9 if OS.mac? && Hardware::CPU.intel? + output = shell_output("#{bin}/supervisorctl -c sd.ini version") + assert_match version.to_s, output + ensure + Process.kill "TERM", pid + end + end +end diff --git a/Formula/s/surelog.rb b/Formula/s/surelog.rb new file mode 100644 index 0000000000000..e8fc79402ca94 --- /dev/null +++ b/Formula/s/surelog.rb @@ -0,0 +1,113 @@ +class Surelog < Formula + desc "SystemVerilog Pre-processor, parser, elaborator, UHDM compiler" + homepage "https://github.com/chipsalliance/Surelog" + url "https://github.com/chipsalliance/Surelog/archive/refs/tags/v1.86.tar.gz" + sha256 "5bffc61334f38b16b5dd57e5209d38bc1e07b0e0bda452e4580678aa3e9daf53" + license "Apache-2.0" + head "https://github.com/chipsalliance/Surelog.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "66093d81ba27bdec93164720b4ad7a74dff68180740febc45e38d69fdc71d9c1" + sha256 cellar: :any, arm64_sequoia: "2370a598c0bd3f175e076cc279f4e1288b97d10d37ebb9e88997e43e6930aa70" + sha256 cellar: :any, arm64_sonoma: "d6f0e16d64bd3d7bd5288c4e67acac3f1c6532547383ba57fe9f79b911bfe5d1" + sha256 cellar: :any, sonoma: "414a3876730209a6dc97e206e8f364bd37a345c12483277b30ea8a7778ac0ac8" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d759aa138eb2002443d6881c6cf3bec1e6c7f1d78089417ddc079afaf75a198" + sha256 cellar: :any_skip_relocation, x86_64_linux: "429877c5d363d0e611a33e01c5d77f88e2ac1c6253806b1c978581fa5e33cf21" + end + + depends_on "antlr" => :build + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "openjdk" => :build + depends_on "python@3.14" => :build + depends_on "pkgconf" => :test + depends_on "antlr4-cpp-runtime" + depends_on "capnp" + depends_on "uhdm" + + uses_from_macos "zlib" + + conflicts_with "open-babel", because: "both install `roundtrip` binaries" + + def install + antlr = Formula["antlr"] + system "cmake", "-S", ".", "-B", "build", + "-DANTLR_JAR_LOCATION=#{antlr.opt_prefix}/antlr-#{antlr.version}-complete.jar", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DPython3_EXECUTABLE=#{which("python3.14")}", + "-DSURELOG_BUILD_TESTS=OFF", + "-DSURELOG_USE_HOST_ALL=ON", + "-DSURELOG_WITH_ZLIB=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # ensure linking is ok + system bin/"surelog", "--version" + + # ensure library is ok + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + int main(int argc, const char** argv) { + uint32_t code = 0; + SURELOG::SymbolTable* symbolTable = new SURELOG::SymbolTable(); + SURELOG::ErrorContainer* errors = new SURELOG::ErrorContainer(symbolTable); + SURELOG::CommandLineParser* clp = + new SURELOG::CommandLineParser(errors, symbolTable, false, false); + clp->noPython(); + bool success = clp->parseCommandLine(argc, argv); + errors->printMessages(clp->muteStdout()); + SURELOG::Design* the_design = nullptr; + SURELOG::scompiler* compiler = nullptr; + if (success && (!clp->help())) { + compiler = SURELOG::start_compiler(clp); + the_design = SURELOG::get_design(compiler); + auto stats = errors->getErrorStats(); + code = (!success) | stats.nbFatal | stats.nbSyntax | stats.nbError; + } + if (the_design) { + for (auto& top : the_design->getTopLevelModuleInstances()) { + std::function inst_visit = + [&inst_visit](SURELOG::ModuleInstance* inst) { + SURELOG::FileSystem* const fileSystem = + SURELOG::FileSystem::getInstance(); + std::cout << "Inst: " << inst->getFullPathName() << std::endl; + std::cout << "File: " << fileSystem->toPath(inst->getFileId()) + << std::endl; + for (uint32_t i = 0; i < inst->getNbChildren(); i++) { + inst_visit(inst->getChildren(i)); + } + }; + inst_visit(top); + } + } + if (success && (!clp->help())) { + SURELOG::shutdown_compiler(compiler); + } + delete clp; + delete symbolTable; + delete errors; + return code; + } + CPP + + flags = shell_output("pkgconf --cflags --libs Surelog").chomp.split + system ENV.cxx, testpath/"test.cpp", "-o", "test", + "-L#{Formula["antlr4-cpp-runtime"].opt_prefix}/lib", + "-fPIC", "-std=c++17", *flags + system testpath/"test" + end +end diff --git a/Formula/s/surfer.rb b/Formula/s/surfer.rb new file mode 100644 index 0000000000000..cc4412225044f --- /dev/null +++ b/Formula/s/surfer.rb @@ -0,0 +1,66 @@ +class Surfer < Formula + desc "Waveform viewer, supporting VCD, FST, or GHW format" + homepage "https://surfer-project.org/" + url "https://gitlab.com/surfer-project/surfer.git", + tag: "v0.3.0", + revision: "1a6b34c44ea0e5089bd55d0bce1297aa1a02e6ef" + license "EUPL-1.2" + head "https://gitlab.com/surfer-project/surfer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e1c0c8cd36bd9077b3b1d33c870122153e2ccb55a5cd583bbe7ee2ee4eb5a251" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4457f78c27f1e938def02a5a0dcbbcc2e0a321c74f8537c04f509802c9f0b8ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e97543d0f251a4f4b6af33d51eee1756034d89b5b56a1635950ab1e238aacad0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03096cd206a1e35ce940edbfc933dec9223af66b13020995f74bc31e5de6e0b3" + sha256 cellar: :any_skip_relocation, sonoma: "e8deccf748154f2694fb130a855db4489f1ead1a2a373c1f5fa4fb7440718c64" + sha256 cellar: :any_skip_relocation, ventura: "c4153c7564eb8c1f70c138b984d50497d335b6f545b2bc1812b7020b558e575c" + sha256 cellar: :any_skip_relocation, arm64_linux: "03ebf3b987048837c04e1308da290bed70d14b3102bd8ff910e20dd71965f1bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85f894ea7612f3fbf2c10be6b238e4cfa42fcc694c4d0dbc4b847f6fe4010fcc" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "surfer") + end + + test do + port = free_port + (testpath/"test.vcd").write <<~EOS + $timescale 1ns $end + $scope module logic $end + $var wire 3 # x $end + $var wire 1 $ y $end + $upscope $end + $enddefinitions $end + $dumpvars + b000 # + 1$ + $end + #0 + b001 # + 0$ + #250 + b110 # + 1$ + #500 + EOS + + token = "tokentoken" + pid = spawn bin/"surfer", "server", "--file", "test.vcd", "--port", port.to_s, "--token", token + + sleep 2 + + output = shell_output("curl -S http://localhost:#{port}/#{token}") + expected = "Surfer Remote Server" + assert_includes output, expected + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/s/surfraw.rb b/Formula/s/surfraw.rb new file mode 100644 index 0000000000000..ea52825ce7ba3 --- /dev/null +++ b/Formula/s/surfraw.rb @@ -0,0 +1,48 @@ +class Surfraw < Formula + desc "Shell Users' Revolutionary Front Rage Against the Web" + homepage "https://gitlab.com/surfraw/Surfraw" + url "https://ftp.openbsd.org/pub/OpenBSD/distfiles/surfraw-2.3.0.tar.gz" + sha256 "ad0420583c8cdd84a31437e59536f8070f15ba4585598d82638b950e5c5c3625" + license :public_domain + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "41fcab9dbdb65112b701d420fee1d2411b1f8af7115bb7d5412eb822f27e30ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d04a21e14ecb8b591159c55dbc4a0af5ea0eadaa5dcb581c6c6c4a74d0b0e7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8369f05a6c7e4b5e99a6e41d94143ad66c598cdfd40aef9402302bb4a6e51c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eafd188589a5aaa870da8aa6e44a6e970dfed59dac958b3abc426414f670061d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eafd188589a5aaa870da8aa6e44a6e970dfed59dac958b3abc426414f670061d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "004471f242a93bd3cfeee2fe7ab6e06b4fecc83e0df9f2bc28a1048fea431eaa" + sha256 cellar: :any_skip_relocation, sonoma: "909a14dec923c593a50ec318616b2f94348365c4dd07f4c8d77bf7a213d52ca8" + sha256 cellar: :any_skip_relocation, ventura: "4cab376ccfaadef6faed89f0f7fcb8cb2a160dfe1219c8138a2debe3dedd0ae2" + sha256 cellar: :any_skip_relocation, monterey: "4cab376ccfaadef6faed89f0f7fcb8cb2a160dfe1219c8138a2debe3dedd0ae2" + sha256 cellar: :any_skip_relocation, big_sur: "b24dbd4f8a768ca2192578897e2285490687a9e5e6d5b92558e3f6d83e92919d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a199f462c1b1276aa99ec530c64775edc15565eccaecca23c99bbb9474db0024" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b1b358e902cb7ca1a8477e5fe4953ed7b0dcea29717e9f14328ff6fe60e922a" + end + + head do + url "https://gitlab.com/surfraw/Surfraw.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--sysconfdir=#{etc}", + "--with-graphical-browser=open", + *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + output = shell_output("#{bin}/surfraw -p duckduckgo homebrew") + assert_equal "https://duckduckgo.com/lite/?q=homebrew", output.chomp + end +end diff --git a/Formula/s/suricata.rb b/Formula/s/suricata.rb new file mode 100644 index 0000000000000..8e6e4682425f0 --- /dev/null +++ b/Formula/s/suricata.rb @@ -0,0 +1,88 @@ +class Suricata < Formula + include Language::Python::Virtualenv + + desc "Network IDS, IPS, and security monitoring engine" + homepage "https://suricata.io" + url "https://www.openinfosecfoundation.org/download/suricata-8.0.1.tar.gz" + sha256 "bd868f41717e5431cdda3a99386810257aafdbe2dbcbb58d07fb8476a03358a5" + license "GPL-2.0-only" + + livecheck do + url "https://suricata.io/download/" + regex(/href=.*?suricata[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c7614d5858c970c4bdb411b2428f7868d5d88fe9db003a3e06dbecb1d052d7c4" + sha256 arm64_sequoia: "24c6f6cd338b991aee18768e87ee7d2fa40254f430c4fafe427f7872f6bf405a" + sha256 arm64_sonoma: "716907bd5264fda67875c5a8426c3dae30e72f2e8ff0ee99f308cba93bf0f8a6" + sha256 sonoma: "5d1f384de269d59b3ddd3125772b4b85895432382a1a19576dd45f7b5049ce59" + sha256 arm64_linux: "ac27e5f2b572c671028da99106addc3b6d62a0295a741d478ce2d7857cd155eb" + sha256 x86_64_linux: "53bcbaadb56416d5b4bf6c80c99638fb942d78ade39f542d5ec506c6090e1ad9" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "jansson" + depends_on "libmagic" + depends_on "libnet" + depends_on "libyaml" + depends_on "lz4" + depends_on "pcre2" + depends_on "python@3.14" + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + + jansson = Formula["jansson"] + libmagic = Formula["libmagic"] + libnet = Formula["libnet"] + + args = %W[ + --disable-silent-rules + --sysconfdir=#{etc} + --localstatedir=#{var} + --with-libjansson-includes=#{jansson.opt_include} + --with-libjansson-libraries=#{jansson.opt_lib} + --with-libmagic-includes=#{libmagic.opt_include} + --with-libmagic-libraries=#{libmagic.opt_lib} + --with-libnet-includes=#{libnet.opt_include} + --with-libnet-libraries=#{libnet.opt_lib} + ] + + if OS.mac? + args << "--enable-ipfw" + # Workaround for dyld[98347]: symbol not found in flat namespace '_iconv' + ENV.append "LIBS", "-liconv" if MacOS.version >= :monterey + else + args << "--with-libpcap-includes=#{Formula["libpcap"].opt_include}" + args << "--with-libpcap-libraries=#{Formula["libpcap"].opt_lib}" + end + + system "./configure", *args, *std_configure_args + system "make", "install-full" + + # Leave the magic-file: prefix in otherwise it overrides a commented out line rather than intended line. + inreplace etc/"suricata/suricata.yaml", %r{magic-file: /.+/magic}, "magic-file: #{libmagic.opt_share}/misc/magic" + end + + test do + assert_match version.to_s, shell_output("#{bin}/suricata --build-info") + assert_match "Found Suricata", shell_output("#{bin}/suricata-update list-sources") + end +end diff --git a/Formula/s/sv2v.rb b/Formula/s/sv2v.rb new file mode 100644 index 0000000000000..e33ce395c31b6 --- /dev/null +++ b/Formula/s/sv2v.rb @@ -0,0 +1,45 @@ +class Sv2v < Formula + desc "SystemVerilog to Verilog conversion" + homepage "https://github.com/zachjs/sv2v" + url "https://github.com/zachjs/sv2v/archive/refs/tags/v0.0.13.tar.gz" + sha256 "4ce7df8c6fa3857da6a2b69343c29e7c627a4283090f2b07221aa9ef956a88c8" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6a3812a608aced60cafc55bd69f20194d4da1aa59a97ee7331113954cec40a80" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49224a9f8e4f1904b037465be2abcdeba583826c51cf8269cb0397413ced8a56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0767a722606d8f2395ed5af345e7c3905d8ea5a5f9c64c81245f6d161f7c4f6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "252e933952b8d680607936324cf65e335bf6287c676ec9b99b853a9a4b10ad64" + sha256 cellar: :any_skip_relocation, sonoma: "6b210f350cfb69d6df2a46f06277e59d62b0e2310ca52b89de86e57125dda49e" + sha256 cellar: :any_skip_relocation, ventura: "ffd19a1ab08b2e06e7d04ddafd34ca60231aa9c591e6c642ae0a2658af2b03b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "aff1b5dac603d45d117e5f58300311de1d2e9d2d5e2b1a7cf3718f79dfa50b25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1718ff41c4a8701aa9b5ef78f9ea0856fa2de5e739237b70e6cb64ce6f61096" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/sv2v --numeric-version") + + (testpath/"test.sv").write <<~VERILOG + module test; + initial begin + $display("Hello, world!"); + $finish; + end + endmodule + VERILOG + + system bin/"sv2v", "test.sv", "--write", "adjacent" + assert_path_exists testpath/"test.v" + end +end diff --git a/Formula/s/svg2pdf.rb b/Formula/s/svg2pdf.rb new file mode 100644 index 0000000000000..2a494cac29763 --- /dev/null +++ b/Formula/s/svg2pdf.rb @@ -0,0 +1,65 @@ +class Svg2pdf < Formula + desc "Renders SVG images to a PDF file (using Cairo)" + homepage "https://cairographics.org/" + url "https://cairographics.org/snapshots/svg2pdf-0.1.3.tar.gz" + sha256 "854a870722a9d7f6262881e304a0b5e08a1c61cecb16c23a8a2f42f2b6a9406b" + license "HPND-sell-variant" + revision 2 + + livecheck do + url "https://cairographics.org/snapshots/" + regex(/href=.*?svg2pdf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d9da1569adeb4b46ba5ffda2b7d4a70f99351d0e277ceb655d6cdbde8bd67325" + sha256 cellar: :any, arm64_sequoia: "47d73aad7aae2d18a27bb902aa155f2f0a716ae9da58468a177c324de3307cc6" + sha256 cellar: :any, arm64_sonoma: "5d2e70a72f9a8858e35dd8f3103931091f755b8f23de7163b2a684fc5d2d54da" + sha256 cellar: :any, arm64_ventura: "dd7230495881424c8a87dab9fe1e076df3cb0d714a93070ae8239314bcb5ca13" + sha256 cellar: :any, arm64_monterey: "059061cd7c6f0466c2ae93003220d0a4559659393d8c4d519511a08410dc9a09" + sha256 cellar: :any, arm64_big_sur: "74f2c15d9de7f737aedc70ff715b238fb3482ca67483e29547a0d608c2f78db6" + sha256 cellar: :any, sonoma: "09f9f27a23b92933b6f3d83db93fc8e72e597aa270c5ea9d9a5a24087eb5e86e" + sha256 cellar: :any, ventura: "2abc4498f4ee621d30d07293f7676961c3eece3a557faa0c0893e9ef7600cae1" + sha256 cellar: :any, monterey: "944236f1828f69922b87cd63b55f5cff0e20f3a565ceb977aaf0bad2f72374e6" + sha256 cellar: :any, big_sur: "b1275e6db5e5512c89394381f1e3e6649225e656df36412dc87e28cd3bd9130f" + sha256 cellar: :any, catalina: "806321a4363be84920038c530898354f98dd8e852ec14e963b7959b2a1ff28f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "57a062a1e6b804c18c3361878b078da84d86d78ea93d92e9b62f6a8c2aee8366" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da8f29a9fa362e43d754a326cf274898b7ee24dda8591b4169cfb8e31b6a51a4" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "libsvg-cairo" + + on_macos do + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libsvg" + end + + resource("svg.svg") do + url "https://raw.githubusercontent.com/mathiasbynens/small/master/svg.svg" + sha256 "900fbe934249ad120004bd24adf66aad8817d89586273c0cc50e187bddebb601" + end + + def install + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + unless OS.mac? + inreplace "src/Makefile.in", "$(svg2pdf_LDFLAGS) $(svg2pdf_OBJECTS)", + "$(svg2pdf_OBJECTS) $(svg2pdf_LDFLAGS)" + end + + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + resource("svg.svg").stage do + system bin/"svg2pdf", "svg.svg", "test.pdf" + assert_path_exists Pathname.pwd/"test.pdf" + end + end +end diff --git a/Formula/s/svg2png.rb b/Formula/s/svg2png.rb new file mode 100644 index 0000000000000..baa5895c500dc --- /dev/null +++ b/Formula/s/svg2png.rb @@ -0,0 +1,62 @@ +class Svg2png < Formula + desc "SVG to PNG converter" + homepage "https://cairographics.org/" + url "https://cairographics.org/snapshots/svg2png-0.1.3.tar.gz" + sha256 "e658fde141eb7ce981ad63d319339be5fa6d15e495d1315ee310079cbacae52b" + license "LGPL-2.1-only" + revision 2 + + livecheck do + url "https://cairographics.org/snapshots/" + regex(/href=.*?svg2png[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f2f63cdb301aee0ab366dbf9abb382d7e774ff3e2026d9b6801259d2777db247" + sha256 cellar: :any, arm64_sequoia: "35e0958cd39141bcefea89ffb6938e60c495151fff2d0c09c22cc3cb2d5a2d90" + sha256 cellar: :any, arm64_sonoma: "e12447c3d9303d05526006e0264334788b9420770964e4fa621368f38b099905" + sha256 cellar: :any, arm64_ventura: "6ea6d9de3e844679b033653d791e7b4e9d323e9851d5d69ae88e2aedcf9de01d" + sha256 cellar: :any, arm64_monterey: "d27d975e6029a87783131f8c4dc4aa41da61901f01d13a44aebf1a69b27be9f3" + sha256 cellar: :any, arm64_big_sur: "4a1dd056166d51270fa14a9957dfabecea6c9ec391c0a476b8dbba95033aaa48" + sha256 cellar: :any, sonoma: "2541b649810f8641616c66cc3fba2445721654b97c6381941f8a055572acdf4d" + sha256 cellar: :any, ventura: "c682123ac6c635638ab1021e224c55556f3f59dbdf01ca618d709d34e975f00c" + sha256 cellar: :any, monterey: "5d673b22dbf70d13fc5488e31daaaecdbe526035358b93f05c0d311270d0779c" + sha256 cellar: :any, big_sur: "2887e4be3e04f38930ca99045b751719f73632466d758370f8fb61caf41b9616" + sha256 cellar: :any, catalina: "2131b421e798b99ea017a9b1955ceb828596c54d559674af019924714de3c5ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b1c501f7e767b15e71d4dbd7179e549545da367adaecce44b78fc063cfe1a80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26430f8c9086f1f7d1e460dc8588c57a2fb696527278006c68f41641ff88bd42" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libsvg" + depends_on "libsvg-cairo" + + conflicts_with "mapnik", because: "both install `svg2png` binaries" + + def install + # svg2png.c:53:9: note: include the header or explicitly provide a declaration for 'strcmp' + inreplace("src/svg2png.c", + "#include \n", + "#include \n#include \n") + + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + unless OS.mac? + inreplace "src/Makefile.in", "$(LINK) $(svg2png_LDFLAGS) $(svg2png_OBJECTS)", + "$(LINK) $(svg2png_OBJECTS) $(svg2png_LDFLAGS)" + end + + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"svg2png", test_fixtures("test.svg"), "test.png" + assert_path_exists testpath/"test.png" + end +end diff --git a/Formula/s/svgbob.rb b/Formula/s/svgbob.rb new file mode 100644 index 0000000000000..178f6ad66a810 --- /dev/null +++ b/Formula/s/svgbob.rb @@ -0,0 +1,43 @@ +class Svgbob < Formula + desc "Convert your ascii diagram scribbles into happy little SVG" + homepage "https://ivanceras.github.io/svgbob-editor/" + url "https://github.com/ivanceras/svgbob/archive/refs/tags/0.7.6.tar.gz" + sha256 "d5b5fc4a04e9efc1cd313c84a8f843d8221718b34e8d3e135e97d44b81317bbf" + license "Apache-2.0" + head "https://github.com/ivanceras/svgbob.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "92d6dc8ffcafc044e0a67ad27ac513ced37300effd1056a7d077058cc7cc61d0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a03f39e2238bd9ef7e474b580f9bdf820e755d2a6bc4569c2e43accef6f9eb9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47b10e463d3bdf705337cfa3a8bf38bb369eb100403b5f0833ad2f53ee616a2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dff76ac4bbd579cca1d3a11e37e55f8b68285e3f45dba68d23fc289f193d129e" + sha256 cellar: :any_skip_relocation, sonoma: "e6870e719346a6f048b08186f6832c6fa96e532f2198e42bc45d2c6039785492" + sha256 cellar: :any_skip_relocation, ventura: "36dcdfa05c440af6513da77701762c7d97aee573eac47dec79cb9e72605bba10" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca0200d4df7df55439d0ec87ab584b580ffa86caa3604ce55776ac17488d059a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39ef6cc1b6c2841686f831901ce97230633658fe2f76b16958af86e49f6d7e82" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/svgbob_cli") + # The cli tool was renamed (0.6.2 -> 0.6.3) + # Create a symlink to not break compatibility + bin.install_symlink bin/"svgbob_cli" => "svgbob" + end + + test do + (testpath/"ascii.txt").write <<~EOS + +------------------+ + | | + | Hello Homebrew | + | | + +------------------+ + EOS + + system bin/"svgbob", "ascii.txt", "-o", "out.svg" + contents = (testpath/"out.svg").read + assert_match %r{Hello}, contents + assert_match %r{Homebrew}, contents + end +end diff --git a/Formula/s/svgo.rb b/Formula/s/svgo.rb new file mode 100644 index 0000000000000..bc2e3fbf27c59 --- /dev/null +++ b/Formula/s/svgo.rb @@ -0,0 +1,24 @@ +class Svgo < Formula + desc "Nodejs-based tool for optimizing SVG vector graphics files" + homepage "https://svgo.dev/" + url "https://github.com/svg/svgo/archive/refs/tags/v4.0.0.tar.gz" + sha256 "dabd71f420d29747e8a10b15c4fafff7477ff2de2846c20f8e84de3bc093adaf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ec0f78a0a81069dcd687212bb5afc0a980197b1f762d35a47ec58f4c2a416473" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + cp test_fixtures("test.svg"), testpath + system bin/"svgo", "test.svg", "-o", "test.min.svg" + assert_match(/^ :build + + def install + system "cargo", "install", *std_cargo_args + + # installation produces two binaries, `mdgen` and `svlint`, however, `mdgen` is for dev pipeline + # see https://github.com/dalance/svlint/blob/729159751f330c4c3f7adaa25b826f809f0e5f44/README.md?plain=1#L26 + rm bin/"mdgen" + + generate_completions_from_executable(bin/"svlint", "--shell-completion") + end + + test do + (testpath/"test.sv").write <<~EOS + module M; + endmodule + EOS + + assert_match(/hint\s+:\s+Begin `module` name with lowerCamelCase./, shell_output("#{bin}/svlint test.sv", 1)) + end +end diff --git a/Formula/s/svls.rb b/Formula/s/svls.rb new file mode 100644 index 0000000000000..17da4005252ce --- /dev/null +++ b/Formula/s/svls.rb @@ -0,0 +1,28 @@ +class Svls < Formula + desc "SystemVerilog language server" + homepage "https://github.com/dalance/svls" + url "https://github.com/dalance/svls/archive/refs/tags/v0.2.14.tar.gz" + sha256 "d491620c8c89d29a277625afa2e99767f00e7c61cc96e6b91fae709ee1d45ceb" + license "MIT" + head "https://github.com/dalance/svls.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "714cc8d0da2f56e477cbc2137b65d29d65bdaebbd2049ee5c36b5027b9ebf616" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5994d220bdfc0c72f60196f18cd11b8c013f67ae3ec90e528501df25cac04c7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4fa705b03a95d0abfc02e2f634113d72b93d4b2291cc75eead30d80cde6418e" + sha256 cellar: :any_skip_relocation, sonoma: "f30dd4bfe75d83eb627f413d019dc406d8fcd59f1958e39f819c824204db0b43" + sha256 cellar: :any_skip_relocation, arm64_linux: "0950de61bd59d410ca9365814db51fab82456ae8aedc33cc07fb42dc7694e45a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d74038cd3ee47ae0d5138b5a9d665e17b52476855a7d7ddf886f674b97d2b0f4" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = /^Content-Length: \d+\s*$/ + assert_match output, pipe_output(bin/"svls", "\r\n") + end +end diff --git a/Formula/s/svt-av1.rb b/Formula/s/svt-av1.rb new file mode 100644 index 0000000000000..febafa60fe3a3 --- /dev/null +++ b/Formula/s/svt-av1.rb @@ -0,0 +1,44 @@ +class SvtAv1 < Formula + desc "AV1 encoder" + homepage "https://gitlab.com/AOMediaCodec/SVT-AV1" + url "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v3.1.2/SVT-AV1-v3.1.2.tar.bz2" + sha256 "802e9bb2b14f66e8c638f54857ccb84d3536144b0ae18b9f568bbf2314d2de88" + license "BSD-3-Clause" + head "https://gitlab.com/AOMediaCodec/SVT-AV1.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b59de84414e36b3651703cdbcbe068a738fb5376639be5acb73944b826dff121" + sha256 cellar: :any, arm64_sequoia: "8c2b600f85d7ff7280fbfb1eadf0c184389851b0b45181e38ab83471b172e5d9" + sha256 cellar: :any, arm64_sonoma: "e99263f68834a04809be5b69f86f009ba5907b0fbb053c74ca30ab19ccd48090" + sha256 cellar: :any, arm64_ventura: "4b18d8c80857d654acfff1ba38f33d8571be5e26832cd6cdcfb9d0225dd56d6f" + sha256 cellar: :any, sonoma: "88ac875b64040b98495de3bc0beb26c5806e1bb7abe6d7ccc39a1cc9d60dfa59" + sha256 cellar: :any, ventura: "83c8622df46a28226294405d21ea13feaa608a5814743e1b46e5479a52ee43d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d7efc983029cd1bb5f3cbcdfa09d2f8f1e344a3853d4325c01de798374f9e9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42ae8505f47c43db4757b07adc84e684ebb5dbbd166919d7bd583ac2ff3dcf9d" + end + + depends_on "cmake" => :build + depends_on "nasm" => :build + + def install + # Features are enabled based on compiler support, and then the appropriate + # implementations are chosen at runtime. + # See https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Source/Lib/Codec/common_dsp_rtcd.c + ENV.runtime_cpu_detection + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-testvideo" do + url "https://github.com/grusell/svt-av1-homebrew-testdata/raw/main/video_64x64_yuv420p_25frames.yuv" + sha256 "0c5cc90b079d0d9c1ded1376357d23a9782a704a83e01731f50ccd162e246492" + end + + testpath.install resource("homebrew-testvideo") + system bin/"SvtAv1EncApp", "-w", "64", "-h", "64", "-i", "video_64x64_yuv420p_25frames.yuv", "-b", "output.ivf" + assert_path_exists testpath/"output.ivf" + end +end diff --git a/Formula/s/svtplay-dl.rb b/Formula/s/svtplay-dl.rb new file mode 100644 index 0000000000000..1f23c4fd3059d --- /dev/null +++ b/Formula/s/svtplay-dl.rb @@ -0,0 +1,72 @@ +class SvtplayDl < Formula + include Language::Python::Virtualenv + + desc "Download videos from https://www.svtplay.se/" + homepage "https://svtplay-dl.se/" + url "https://files.pythonhosted.org/packages/6b/52/879fac8cd8686b016eaf2771a0ab93795f0f13eafafd8c853bdb87db9f57/svtplay_dl-4.163.tar.gz" + sha256 "5db04ca95629c8280f6698a259053c8ba528a08175f638c04e3ed8bb447b6f56" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c8eeaad78576772cbdae0015864f004ea8bf85f4d68ea17ad19d0fc76ed8efb1" + sha256 cellar: :any, arm64_sequoia: "1c0c8ee8b0aa9dd666565d084215c9e5a58ac4a39fdc51f34cc0581dd0429b59" + sha256 cellar: :any, arm64_sonoma: "a5d607495ec83d9c282793b51ab925a4c9b8444300352be0cd75f2a5a13901d0" + sha256 cellar: :any, sonoma: "e9887f3a9c93469b0e1bf5baf4efe72e2a40d56be6fae0c529f6c528fc9c7dd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "86eba78ab1a551d4449506cfcc557a5d0c64f7f64b0eb826ea75c4a4830ec2d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1218aa050e8c24617be5c257755986ec728f7272f00de25cb94314e8a5883cb2" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages exclude_packages: %w[certifi cryptography] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "pysocks" do + url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" + sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + To use post-processing options: + `brew install ffmpeg` or `brew install libav`. + EOS + end + + test do + url = "https://tv.aftonbladet.se/video/357803" + match = "https://amd-ab.akamaized.net/ab/vod/2023/07/64b249d222f325d618162f76/720_3500_pkg.m3u8" + assert_match match, shell_output("#{bin}/svtplay-dl -g #{url}") + end +end diff --git a/Formula/s/swag.rb b/Formula/s/swag.rb new file mode 100644 index 0000000000000..0488c3b60f4e6 --- /dev/null +++ b/Formula/s/swag.rb @@ -0,0 +1,56 @@ +class Swag < Formula + desc "Automatically generate RESTful API documentation with Swagger 2.0 for Go" + homepage "https://github.com/swaggo/swag" + url "https://github.com/swaggo/swag/archive/refs/tags/v1.16.6.tar.gz" + sha256 "d0193f08b829e1088753ff6d66d1205e22a6e7fd07ac28df5ecb001d9eb2c43d" + license "MIT" + head "https://github.com/swaggo/swag.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d8cbf4841f7ebf8f91b1e4034211085e4671d8b9fd81ef7c0a4b774489bb6fbc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8cbf4841f7ebf8f91b1e4034211085e4671d8b9fd81ef7c0a4b774489bb6fbc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8cbf4841f7ebf8f91b1e4034211085e4671d8b9fd81ef7c0a4b774489bb6fbc" + sha256 cellar: :any_skip_relocation, sonoma: "3755ba02cc30db9445167444bb92257957cc5c132d93ddec55d9ca1c46938c89" + sha256 cellar: :any_skip_relocation, arm64_linux: "1872a5598bbfd4440343e2c2aa5fd930c3a00eb050cb2fb0afbed37d1aeb6418" + sha256 cellar: :any_skip_relocation, x86_64_linux: "138aa1dcd9425a4656fb0939957ca7ac30affcc0ce474062e25e7a8623cbd032" + end + + depends_on "go" => :build + + def install + # version patch PR, https://github.com/swaggo/swag/pull/2049 + inreplace "version.go", "1.16.4", version.to_s + + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/swag" + end + + test do + assert_match version.to_s, shell_output("#{bin}/swag --version") + + (testpath/"main.go").write <<~GO + // Package main Simple API. + // @title Simple API + // @version 1.0.0 + // @description This is a simple API server. + + // @host localhost:8080 + // @BasePath /api/v1 + + package main + + import "github.com/gin-gonic/gin" + + func main() { + r := gin.Default() + r.GET("/ping", func(c *gin.Context) { + c.JSON(200, gin.H{"message": "pong"}) + }) + r.Run() + } + GO + + system bin/"swag", "init" + assert_path_exists testpath/"docs/docs.go" + assert_path_exists testpath/"docs/swagger.json" + end +end diff --git a/Formula/s/swagger-codegen.rb b/Formula/s/swagger-codegen.rb new file mode 100644 index 0000000000000..c13c5e5024a86 --- /dev/null +++ b/Formula/s/swagger-codegen.rb @@ -0,0 +1,47 @@ +class SwaggerCodegen < Formula + desc "Generate clients, server stubs, and docs from an OpenAPI spec" + homepage "https://swagger.io/tools/swagger-codegen/" + url "https://github.com/swagger-api/swagger-codegen/archive/refs/tags/v3.0.75.tar.gz" + sha256 "cb105d1a421bc8710aacd14f82690f06b156f46745b0424f2b43e5e3ff4d0c90" + license "Apache-2.0" + head "https://github.com/swagger-api/swagger-codegen.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "99e6ed0d7c470367e85eb74c458f975470daa46a1aef6bd394ec6bf0341df5d5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed5674a17da61705a93e546687fcd924b4b5edc043f872f13775491e3612106c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b44bd5072b729a749eff9997d94bdf107487fe4db2a0d627f3ce9101c27d09a" + sha256 cellar: :any_skip_relocation, sonoma: "8e30388f19620efadcf68284f8e3c64e198ae67ac4b8ae82c80b2ad98bd2b343" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e05f248850e54cd3fb7b92beff22d4d293391f3ce6c1abff915e51de34c35a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e3083742a497dac918d1b425bb6d5089f55fdf569e6ee049c442e16b423c583" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + # Need to set JAVA_HOME manually since maven overrides 1.8 with 1.7+ + ENV["JAVA_HOME"] = Language::Java.java_home + + system "mvn", "clean", "package" + libexec.install "modules/swagger-codegen-cli/target/swagger-codegen-cli.jar" + bin.write_jar_script libexec/"swagger-codegen-cli.jar", "swagger-codegen" + end + + test do + (testpath/"minimal.yaml").write <<~YAML + --- + openapi: 3.0.0 + info: + version: 0.0.0 + title: Simple API + paths: + /: + get: + responses: + 200: + description: OK + YAML + system bin/"swagger-codegen", "generate", "-i", "minimal.yaml", "-l", "html" + assert_includes File.read(testpath/"index.html"), "

    Simple API

    " + end +end diff --git a/Formula/s/swagger-codegen@2.rb b/Formula/s/swagger-codegen@2.rb new file mode 100644 index 0000000000000..e652f3b55eb4d --- /dev/null +++ b/Formula/s/swagger-codegen@2.rb @@ -0,0 +1,55 @@ +class SwaggerCodegenAT2 < Formula + desc "Generate clients, server stubs, and docs from an OpenAPI spec" + homepage "https://swagger.io/tools/swagger-codegen/" + url "https://github.com/swagger-api/swagger-codegen/archive/refs/tags/v2.4.49.tar.gz" + sha256 "9e55b029edb09828c643f8edf2e1d0c1290f5ef2fcb809dfd3314bbdd11f4794" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5cbf1681b7e886b34c37e732228f84edc08fea203f60d099f92866210cf05920" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d3154fd353baef6bd06a988708a84238e1a450474fc773f5d4f6c5461aa4ef5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8ef0d2326c8fb0336d69f01ba5efb0e6c06888de8b2eec74d8a3266225604d8" + sha256 cellar: :any_skip_relocation, sonoma: "97af414fadff60cb679a4064bb7fbcf9fabc7beb5425fe48cfa754610874a8e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "f387d69dadaa3e19b620bb71ddec827babd37cb1a8724b94c1e6088cc6dc5519" + sha256 cellar: :any_skip_relocation, x86_64_linux: "265d6c093695251c6dcce839a2ffd311503b427859a6cc0c71c1806639941bb7" + end + + keg_only :versioned_formula + + depends_on "maven" => :build + depends_on "openjdk@21" + + def install + # Need to set JAVA_HOME manually since maven overrides 1.8 with 1.7+ + java_version = "21" + ENV["JAVA_HOME"] = Language::Java.java_home(java_version) + + system "mvn", "clean", "package" + libexec.install "modules/swagger-codegen-cli/target/swagger-codegen-cli.jar" + bin.write_jar_script(libexec/"swagger-codegen-cli.jar", "swagger-codegen", java_version:) + end + + test do + (testpath/"minimal.yaml").write <<~YAML + --- + swagger: '2.0' + info: + version: 0.0.0 + title: Simple API + paths: + /: + get: + responses: + 200: + description: OK + YAML + + system bin/"swagger-codegen", "generate", "-i", "minimal.yaml", "-l", "html2" + assert_includes (testpath/"index.html").read, "

    Simple API

    " + end +end diff --git a/Formula/s/swagger2markup-cli.rb b/Formula/s/swagger2markup-cli.rb new file mode 100644 index 0000000000000..c298e8c71d04c --- /dev/null +++ b/Formula/s/swagger2markup-cli.rb @@ -0,0 +1,44 @@ +class Swagger2markupCli < Formula + desc "Swagger to AsciiDoc or Markdown converter" + homepage "https://github.com/Swagger2Markup/swagger2markup" + url "https://search.maven.org/remotecontent?filepath=io/github/swagger2markup/swagger2markup-cli/1.3.3/swagger2markup-cli-1.3.3.jar" + sha256 "93ff10990f8279eca35b7ac30099460e557b073d48b52d16046ab1aeab248a0a" + license "Apache-2.0" + revision 3 + + livecheck do + url "https://search.maven.org/remotecontent?filepath=io/github/swagger2markup/swagger2markup-cli/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "371bbc9c30ce8cb116cc9d7ad64b97d87ef6116db53877b067878a2643c3cb95" + end + + depends_on "openjdk@11" # JDK 17+ issue: https://github.com/Swagger2Markup/swagger2markup/issues/423 + + def install + libexec.install "swagger2markup-cli-#{version}.jar" + bin.write_jar_script libexec/"swagger2markup-cli-#{version}.jar", "swagger2markup", java_version: "11" + end + + test do + (testpath/"test.yaml").write <<~YAML + swagger: "2.0" + info: + version: "1.0.0" + title: TestSpec + description: Example Swagger spec + host: localhost:3000 + paths: + /test: + get: + responses: + "200": + description: Describe the test resource + YAML + shell_output("#{bin}/swagger2markup convert -i test.yaml -f test") + assert_match "= TestSpec", shell_output("head -n 1 test.adoc") + end +end diff --git a/Formula/s/swaks.rb b/Formula/s/swaks.rb new file mode 100644 index 0000000000000..22271d46b3237 --- /dev/null +++ b/Formula/s/swaks.rb @@ -0,0 +1,27 @@ +class Swaks < Formula + desc "SMTP command-line test tool" + homepage "https://www.jetmore.org/john/code/swaks/" + url "https://www.jetmore.org/john/code/swaks/files/swaks-20240103.0.tar.gz" + sha256 "0e531b4d164058802e7266b14f4dc1897099d096f930820de2f9b5eb08dcdbe8" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.jetmore.org/john/code/swaks/versions.html" + regex(/href=.*?swaks[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c306783b36231b83d1c0935e526206911e61c3e1d58a011ea97b9132113e9f06" + end + + def install + bin.install "swaks" + end + + test do + system bin/"swaks", "--version" + end +end diff --git a/Formula/s/swc.rb b/Formula/s/swc.rb new file mode 100644 index 0000000000000..ddd4bf8315c89 --- /dev/null +++ b/Formula/s/swc.rb @@ -0,0 +1,43 @@ +class Swc < Formula + desc "Super-fast Rust-based JavaScript/TypeScript compiler" + homepage "https://swc.rs" + url "https://github.com/swc-project/swc/archive/refs/tags/v1.15.0.tar.gz" + sha256 "99b5273f83422f7e332660255ec9e583d9076ed13f7bb962339a99a785ab673f" + license "Apache-2.0" + head "https://github.com/swc-project/swc.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "da0360d3af994089e2c7e7f82342173a9ab678e94e19a4b476c0c7bc0daffd86" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86531067cda6515a3a3bd1a77d9bf6686832eeaa2d0c5413491bf46ca456b98b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9dfeaef55c7937ac7a40be413c9fcb46859a2843707ddf647d7ac7d9e61ab2f1" + sha256 cellar: :any_skip_relocation, sonoma: "a68966de88e66731fd8d6b4a13e50145731d9ea04d2a2ee6ef8524acca95ddab" + sha256 cellar: :any_skip_relocation, arm64_linux: "acd4461e335db664d3fb86bfb3c95566ce1778e297adeccbc761403206cf0186" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbc7fcf60fe84a42cd60631d56811752f82274a19846cf5b989e164c2f95a92d" + end + + depends_on "rust" => :build + + def install + # `-Zshare-generics=y` flag is only supported on nightly Rust + rm ".cargo/config.toml" + + system "cargo", "install", *std_cargo_args(path: "crates/swc_cli_impl") + end + + test do + (testpath/"test.js").write <<~JS + const x = () => 42; + JS + + system bin/"swc", "compile", "test.js", "--out-file", "test.out.js" + assert_path_exists testpath/"test.out.js" + + output = shell_output("#{bin}/swc lint 2>&1", 101) + assert_match "Lint command is not yet implemented", output + end +end diff --git a/Formula/s/swctl.rb b/Formula/s/swctl.rb new file mode 100644 index 0000000000000..e29ce05d77f2e --- /dev/null +++ b/Formula/s/swctl.rb @@ -0,0 +1,45 @@ +class Swctl < Formula + desc "Apache SkyWalking CLI (Command-line Interface)" + homepage "https://skywalking.apache.org/" + license "Apache-2.0" + head "https://github.com/apache/skywalking-cli.git", branch: "master" + + stable do + url "https://github.com/apache/skywalking-cli/archive/refs/tags/0.14.0.tar.gz" + sha256 "9b1861a659e563d2ba7284ac19f3ae72649f08ac7ff7064aee928a7df2cd2bff" + + # fish and zsh completion support patch, upstream pr ref, https://github.com/apache/skywalking-cli/pull/207 + patch do + url "https://github.com/apache/skywalking-cli/commit/3f9cf0e74a97f16d8da48ccea49155fd45f2d160.patch?full_index=1" + sha256 "dd17f332f86401ef4505ec7beb3f8863f13146718d8bdcf92d2cc2cdc712b0ec" + end + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5fa1d27d8a0f4f54259a1747dc4ce19075d0c91313a0d5d6218f3059ac9bc694" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59d564281b8144703d6f13370a3f725a6db5b342e66906ed28b860931bf71d15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59d564281b8144703d6f13370a3f725a6db5b342e66906ed28b860931bf71d15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "59d564281b8144703d6f13370a3f725a6db5b342e66906ed28b860931bf71d15" + sha256 cellar: :any_skip_relocation, sonoma: "391feee4582cf497126e59ce27dd4041b311b1da788b5c38c64cc44811d93921" + sha256 cellar: :any_skip_relocation, ventura: "391feee4582cf497126e59ce27dd4041b311b1da788b5c38c64cc44811d93921" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0244a2e3e667dbcdebf3997f1c223d1422ea02166d0b80066c33334191325ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56bdee16710d22095c1fd118f8ac5a116b25ac3c7d541cad4b365eae4c665eaa" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/swctl" + + generate_completions_from_executable(bin/"swctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/swctl --version 2>&1") + + output = shell_output("#{bin}/swctl --display yaml service ls 2>&1", 1) + assert_match "level=fatal msg=\"Post \\\"http://127.0.0.1:12800/graphql\\\"", output + end +end diff --git a/Formula/s/swfmill.rb b/Formula/s/swfmill.rb new file mode 100644 index 0000000000000..9919fe4153cdd --- /dev/null +++ b/Formula/s/swfmill.rb @@ -0,0 +1,39 @@ +class Swfmill < Formula + desc "Processor of xml2swf and swf2xml" + homepage "https://www.swfmill.org/" + url "https://www.swfmill.org/releases/swfmill-0.3.6.tar.gz" + sha256 "db24f63963957faec02bb14b8b61cdaf7096774f8cfdeb9d3573e2e19231548e" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f72fbfa8ade5ccfd50e5166466e4bcc69adda17fe49bf1b6a1f2fee1f104b0d6" + sha256 cellar: :any, arm64_sequoia: "627251dcb91c98bea4455fb35da262880aae7f2f5897162616f62135f1fe9234" + sha256 cellar: :any, arm64_sonoma: "a9e8c77577b790f0e88eec48aa1e8091c7df0708731aab2d5b61f5379c4ee0ee" + sha256 cellar: :any, arm64_ventura: "0963f879f2401a1174f2d1536a1dbbec0cfea0ca85978943f5f00e9d98c7b62e" + sha256 cellar: :any, arm64_monterey: "dde3958952f7a8f233e56a4a623f133ba07fd8f5fb06d5832d013f4e0ef59ffe" + sha256 cellar: :any, arm64_big_sur: "be6e61f096ab129607f537e0bc37fd87214f01cfbfa097ab4bfb348614ffa83c" + sha256 cellar: :any, sonoma: "487a0df7be0d3813ba9a5ab1ac4e4b6208549168b8981695498124574ca39a5d" + sha256 cellar: :any, ventura: "68a4a9c1038067e60dffeaac7b18e40ab2c623cb8dda217b7f91a9a06436b3c3" + sha256 cellar: :any, monterey: "1409bea1e846cda18e4206dc39027d195acb9fe0cae14f9a49842b945ba4befc" + sha256 cellar: :any, big_sur: "61d884a0d8fda68458267311da138851688cf5574f3d17152f7227c120653115" + sha256 cellar: :any, catalina: "be2f7f3666c78c37775bd41e2adb640f290bb3e73d8a0b4b04bae0f08e140fac" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bebc009e2e758532b33a040716f1771d0accb522465e2fa1b7275bf82d17532" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e86fcc5ea5d803ac5f8f4bfe33090c4ceec8369bd8c026db34fdfd1b6aa997b" + end + + # adobe flash player EOL 12/31/2020, https://www.adobe.com/products/flashplayer/end-of-life-alternative.html + deprecate! date: "2025-01-12", because: :unmaintained + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "libpng" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end +end diff --git a/Formula/s/swftools.rb b/Formula/s/swftools.rb new file mode 100644 index 0000000000000..f6004826321c4 --- /dev/null +++ b/Formula/s/swftools.rb @@ -0,0 +1,91 @@ +class Swftools < Formula + desc "SWF manipulation and generation tools" + homepage "https://github.com/swftools/swftools" + url "https://distfiles.macports.org/swftools/swftools-0.9.2.tar.gz" + mirror "http://www.swftools.org/swftools-0.9.2.tar.gz" + sha256 "bf6891bfc6bf535a1a99a485478f7896ebacbe3bbf545ba551298080a26f01f1" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://raw.githubusercontent.com/swftools/swftools/HEAD/ChangeLog" + regex(/^v?(\d+(?:\.\d+)+):/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "6f84ebd03efc6f1b60886a25c819fab4989b5ce8c9b872c217f04e63c5b8afc5" + sha256 arm64_sequoia: "f61324276719da51b51203bba9f88739b126e242ee458f65b98cf04492e01114" + sha256 arm64_sonoma: "748aa1b21377ed7009f151bb4e9f8beb240f52bc8b8e5cb68e88b4a5928eafdf" + sha256 arm64_ventura: "e5d604b100f9911bd2d61f4f4c2bfc5bc3121734de1cef9beedb7b5ae06b1a67" + sha256 arm64_monterey: "f580bc8117485a0a4be18f76ffa5d3c5764aa04e1d4eb6b3e17b64239d88fb4d" + sha256 arm64_big_sur: "4737739b57d119d07cca0689481151e9ed2a815d3e026d85be4354ef76200877" + sha256 sonoma: "01f967e4fe8aa9edd73611dfbbc96a43cc687f4e9aaffa97e0522246a112a510" + sha256 ventura: "4e099a2079eb825d49c09fd0214bdde20e9b0e52754d73b920de4de4aaa5a7bd" + sha256 monterey: "109f5b7057ce61a14f6eb11eb87afb90305b0dc7d830d6ce8d70872e9338b939" + sha256 big_sur: "bacf30e9986bb179127942abea49fac9ca05cf1ac3b3851cf3faf1cb970009b4" + sha256 catalina: "b0791e6725e6d07610847df7e4431e5839fcf72120cea34f1890b425f8e024c4" + sha256 arm64_linux: "7130ab9c8a0eefe2d3ff191ac2541f119bdb2b55eaff706fefdf5b57bea2f797" + sha256 x86_64_linux: "0ed51b95634f090cb753b57fdd73df90a944cc37fc2c34de45592d74c8b74139" + end + + uses_from_macos "zlib" + + # Fixes a conftest for libfftwf.dylib that mistakenly calls fftw_malloc() + # rather than fftwf_malloc(). Reported upstream to their mailing list: + # https://lists.nongnu.org/archive/html/swftools-common/2012-04/msg00014.html + # Patch is merged upstream. Remove at swftools-0.9.3. + # Also fix build on Linux by using correct flags for rm. + # Linux fix sent to swftools mailing list: + # https://lists.nongnu.org/archive/html/swftools-common/2022-06/msg00000.html + patch :DATA + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `voidclass'; ../lib/librfxswf.a(abc.o):(.bss+0x800): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"png2swf", "swftools_test.swf", test_fixtures("test.png") + end +end + +__END__ +--- a/configure 2012-04-08 10:25:35.000000000 -0700 ++++ b/configure 2012-04-09 17:42:10.000000000 -0700 +@@ -6243,7 +6243,7 @@ + + int main() + { +- char*data = fftw_malloc(sizeof(fftwf_complex)*600*800); ++ char*data = fftwf_malloc(sizeof(fftwf_complex)*600*800); + fftwf_plan plan = fftwf_plan_dft_2d(600, 800, (fftwf_complex*)data, (fftwf_complex*)data, FFTW_FORWARD, FFTW_ESTIMATE); + plan = fftwf_plan_dft_r2c_2d(600, 800, (float*)data, (fftwf_complex*)data, FFTW_ESTIMATE); + plan = fftwf_plan_dft_c2r_2d(600, 800, (fftwf_complex*)data, (float*)data, FFTW_ESTIMATE); +diff --git a/swfs/Makefile.in b/swfs/Makefile.in +index d7bc400..890b9bd 100644 +--- a/swfs/Makefile.in ++++ b/swfs/Makefile.in +@@ -41,9 +41,9 @@ install: + $(INSTALL_DATA) ./PreLoaderTemplate.swf $(pkgdatadir)/swfs/PreLoaderTemplate.swf + $(INSTALL_DATA) ./tessel_loader.swf $(pkgdatadir)/swfs/tessel_loader.swf + $(INSTALL_DATA) ./swft_loader.swf $(pkgdatadir)/swfs/swft_loader.swf +- rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf ++ rm -f $(pkgdatadir)/swfs/default_viewer.swf + $(LN_S) $(pkgdatadir)/swfs/simple_viewer.swf $(pkgdatadir)/swfs/default_viewer.swf +- rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf ++ rm -f $(pkgdatadir)/swfs/default_loader.swf + $(LN_S) $(pkgdatadir)/swfs/tessel_loader.swf $(pkgdatadir)/swfs/default_loader.swf + + uninstall: diff --git a/Formula/s/swi-prolog.rb b/Formula/s/swi-prolog.rb new file mode 100644 index 0000000000000..1c383e1eef77f --- /dev/null +++ b/Formula/s/swi-prolog.rb @@ -0,0 +1,75 @@ +class SwiProlog < Formula + desc "ISO/Edinburgh-style Prolog interpreter" + homepage "https://www.swi-prolog.org/" + license "BSD-2-Clause" + head "https://github.com/SWI-Prolog/swipl-devel.git", branch: "master" + + stable do + url "https://www.swi-prolog.org/download/stable/src/swipl-9.2.9.tar.gz" + sha256 "53f428e2d9bbdf30e53b06c9c42def9a13ff82fc36a111d410fc8b0bc889ee2d" + depends_on maximum_macos: [:sequoia, :build] # Remove in 9.4.0 + end + + livecheck do + url "https://www.swi-prolog.org/download/stable/src/" + regex(/href=.*?swipl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "40236da144dd4723d91872920d988b7f52e29688745a6be1872cfc5177c965f2" + sha256 arm64_sonoma: "318ffb0fb2d334b6f49ce3293aea1c2a6d93e9bf8cf0d103c1e401b55148f84f" + sha256 arm64_ventura: "924cd93f4e48a4026c5bc64b579e2628147aaadea3bae259d721cb8af203273b" + sha256 sonoma: "e80c89d844a75e37d381df5eddbcc6c3080d1f0f8923a6e3a1697443d8354aaf" + sha256 ventura: "002b9b8eb714101e13ebeaa3daee81536dd3ae299f8b5ad021abcbcdf3f3c12b" + sha256 arm64_linux: "cc5f0996cad11a2893cd832b5496c30ca3162e0ded4cf6423afddce74c26599c" + sha256 x86_64_linux: "f2afbf413d542dcaeaf05cec448d97385f4de763f56a3747250ce7908a43b36e" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL incompatibility + depends_on "gmp" + depends_on "libarchive" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "readline" + depends_on "unixodbc" + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + args = %W[ + -DSWIPL_PACKAGES_JAVA=OFF + -DSWIPL_PACKAGES_X=OFF + -DCMAKE_INSTALL_RPATH=#{loader_path} + -DSWIPL_CC=#{ENV.cc} + -DSWIPL_CXX=#{ENV.cxx} + ] + if OS.mac? + macosx_dependencies_from = case HOMEBREW_PREFIX.to_s + when "/usr/local" + "HomebrewLocal" + when "/opt/homebrew" + "HomebrewOpt" + else + HOMEBREW_PREFIX + end + args << "-DMACOSX_DEPENDENCIES_FROM=#{macosx_dependencies_from}" + end + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.pl").write <<~PROLOG + test :- + write('Homebrew'). + PROLOG + assert_equal "Homebrew", shell_output("#{bin}/swipl -s #{testpath}/test.pl -g test -t halt") + end +end diff --git a/Formula/s/swift-format.rb b/Formula/s/swift-format.rb new file mode 100644 index 0000000000000..fb593b548b1da --- /dev/null +++ b/Formula/s/swift-format.rb @@ -0,0 +1,49 @@ +class SwiftFormat < Formula + desc "Formatting technology for Swift source code" + homepage "https://github.com/swiftlang/swift-format" + url "https://github.com/swiftlang/swift-format.git", + tag: "602.0.0", + revision: "62eaad2822b865407b8cde56c36386c00800f7ec" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/swiftlang/swift-format.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "df0fdcc1a40fd5424122f4db14f70df46b02de3b9046943e4155b560e79ae0df" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d285bdbf31bfef50a23b070acc56af33e3f3a5534e8ef1f4a6cd6700a107359b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc2710feb43f03ca1417032da7decc1a4b5720f9cc41d74bbf075abf83c11576" + sha256 cellar: :any_skip_relocation, sonoma: "cc7b5fa4b9a56bd360dcf766b2951851f8b62baafff325827a037e394ca9dd24" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba98b0fe314e54fc94bb2b1fa298c1fcb7bc5cbd01128643ba343ddf808cd5e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bd08266274e09c11c73d0f7d8c1b730ae6b6e86d9c25b1b839ea048cf71fb1b" + end + + # The bottles are built on systems with the CLT installed, and do not work + # out of the box on Xcode-only systems due to an incorrect sysroot. + pour_bottle? only_if: :clt_installed + + depends_on xcode: ["14.0", :build] + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "--product", "swift-format" + bin.install ".build/release/swift-format" + doc.install "Documentation/Configuration.md" + generate_completions_from_executable(bin/"swift-format", "--generate-completion-script") + end + + test do + (testpath/"test.swift").write " print( \"Hello, World\" ) ;" + assert_equal "print(\"Hello, World\")\n", shell_output("#{bin}/swift-format test.swift") + end +end diff --git a/Formula/s/swift-outdated.rb b/Formula/s/swift-outdated.rb new file mode 100644 index 0000000000000..cdb61e15e1be3 --- /dev/null +++ b/Formula/s/swift-outdated.rb @@ -0,0 +1,39 @@ +class SwiftOutdated < Formula + desc "Check for outdated Swift package manager dependencies" + homepage "https://github.com/kiliankoe/swift-outdated" + url "https://github.com/kiliankoe/swift-outdated/archive/refs/tags/0.10.1.tar.gz" + sha256 "d2496a02c6261a72025d27e526cdbde25decee5fe790593f90c1661af63430ff" + license "MIT" + head "https://github.com/kiliankoe/swift-outdated.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0482349c35b684746603a83a31c53dd0b5ae228b7adc1a43e9f86410c7c5510b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4a414053cd019a301a7d60a0e0b8d86903ab05c467213d173c108c45a759e92" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be7f055410b51f4c125edf24f19415e32a9a6f507df0b52756a3fd5976a90c8d" + sha256 cellar: :any, arm64_ventura: "ac39a84605ea91bdbff7004218261f82f3ca82a2aa24cff8a56d110febb8a2dc" + sha256 cellar: :any_skip_relocation, sonoma: "9941516c564328df1f98b90037f606eac0f03a52590f373b1209edb6961eeee1" + sha256 cellar: :any, ventura: "82863caf05345ca7a98c08c0d63da43f123ec1a3d56e77a1437e6eddeb52860e" + sha256 cellar: :any_skip_relocation, arm64_linux: "98d3305c2c7d7aa6fd1f2c4f9f142f4d361c4cd9029209961309b1851642d3b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a959433bb6fc3748c13003c3aebee4be103d43e0ec4afc70ba8c9e570dd5bb5" + end + + uses_from_macos "swift" => :build, since: :sonoma # swift 6.0+ + + def install + inreplace "Sources/SwiftOutdated/SwiftOutdated.swift", "dev", version.to_s + + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release" + bin.install ".build/release/swift-outdated" + generate_completions_from_executable(bin/"swift-outdated", "--generate-completion-script") + end + + test do + assert_match "No Package.resolved found", shell_output("#{bin}/swift-outdated 2>&1", 1) + assert_match version.to_s, shell_output("#{bin}/swift-outdated --version") + end +end diff --git a/Formula/s/swift-protobuf.rb b/Formula/s/swift-protobuf.rb new file mode 100644 index 0000000000000..2a2620a4b7785 --- /dev/null +++ b/Formula/s/swift-protobuf.rb @@ -0,0 +1,57 @@ +class SwiftProtobuf < Formula + desc "Plugin and runtime library for using protobuf with Swift" + homepage "https://github.com/apple/swift-protobuf" + # We use a git checkout as swift needs to find submodule files specified + # in Package.swift even though they aren't built for `protoc-gen-swift` + url "https://github.com/apple/swift-protobuf.git", + tag: "1.33.3", + revision: "c169a5744230951031770e27e475ff6eefe51f9d" + license "Apache-2.0" + head "https://github.com/apple/swift-protobuf.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "50654e9566975d95f0c552bee7d783cd9d4108e6e5be9ec57c3fdc466b89ec9e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d723caa8a22e380d5b2a5acb7ab6d7a620228ff0b69e40594eac4bc15f2cf38" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0408c6a1c87c54d9f7514a3f3bca78cb3aa5885f21bd9f4d753e14510c8f3730" + sha256 cellar: :any_skip_relocation, sonoma: "c37a3df3293459674743b9c37f0f081711298047ad55392db0831ce6ac3c2a3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a06efea4b040d5b2de90244dac011a69064c02ea00ac217d473a8671bf639701" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15fd838a3f33a216008d578bc6176d7ba9f263e38ab0ce79d615015459227d0c" + end + + depends_on xcode: ["15.3", :build] + depends_on "protobuf" + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "--product", "protoc-gen-swift" + bin.install ".build/release/protoc-gen-swift" + doc.install "Documentation/PLUGIN.md" + end + + test do + (testpath/"test.proto").write <<~PROTO + syntax = "proto3"; + enum Flavor { + CHOCOLATE = 0; + VANILLA = 1; + } + message IceCreamCone { + int32 scoops = 1; + Flavor flavor = 2; + } + PROTO + system Formula["protobuf"].opt_bin/"protoc", "test.proto", "--swift_out=." + assert_path_exists testpath/"test.pb.swift" + end +end diff --git a/Formula/s/swift-section.rb b/Formula/s/swift-section.rb new file mode 100644 index 0000000000000..2dbe4b08b3db6 --- /dev/null +++ b/Formula/s/swift-section.rb @@ -0,0 +1,49 @@ +class SwiftSection < Formula + desc "CLI tool for parsing mach-o files to obtain Swift information" + homepage "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection" + url "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection/archive/refs/tags/0.6.0.tar.gz" + sha256 "b4dc871bf5c712ca49d22c738c481285f9e4b835f300f2a3b76e5588edfdaa8f" + license "MIT" + head "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "98fc25f87480b0c9cb1d92255eb6a4ecc53f4abde7259e6eb4d52463560f865d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "33bd0561f24b2a832733a8acf0deac577462b2ca382f2a01df72308e75ce141b" + end + + # The Package.swift file requires Swift 5.10 or later. + # But it is actually only builable with Swift 6.1+ due to the usage of trailing commma in comma-separated lists. + depends_on xcode: ["16.3", :build] + depends_on :macos + + uses_from_macos "swift" => :build + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/swift-section" + generate_completions_from_executable(bin/"swift-section", "--generate-completion-script") + end + + test do + (testpath/"test.swift").write <<~SWIFT + public struct MyTestStruct { + public let id: Int + public let name: String + public init(id: Int, name: String) { + self.id = id + self.name = name + } + } + SWIFT + + system "swiftc", "-emit-library", "-module-name", "Test", "Test.swift", "-o", "libTest.dylib" + system bin/"swift-section", "dump", "libTest.dylib", "-o", "output.txt", "-s", "types" + assert_match "MyTestStruct", (testpath/"output.txt").read + end +end diff --git a/Formula/s/swift-sh.rb b/Formula/s/swift-sh.rb new file mode 100644 index 0000000000000..96d3352603293 --- /dev/null +++ b/Formula/s/swift-sh.rb @@ -0,0 +1,41 @@ +class SwiftSh < Formula + desc "Scripting with easy zero-conf dependency imports" + homepage "https://github.com/mxcl/swift-sh" + url "https://github.com/mxcl/swift-sh/archive/refs/tags/2.5.0.tar.gz" + sha256 "07f3c2d1215b82eb56ebfeb676b5e3860c23a828c14fd482c7c1935817f3220f" + license "Unlicense" + revision 1 + head "https://github.com/mxcl/swift-sh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a0a9ff13a99469ab189deb4388cfaa4f2519367b8aee3e9016f4f31a10515f43" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "548765a57eec4a8a0ad39eb4dc096edd45c1c97a781658c52fd86e28b8c936d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96521fbeb28a32d2663b9219b95aab9c0c05853f47dd5afc6871f3626de31df1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c68d0216ef02718872c9f7947441000d6cdda72cec6dc137ca45eb8ab580430" + sha256 cellar: :any_skip_relocation, sonoma: "bcdbf8f07f26f137a6e67ff2a8e0b28b3a682d7ef72715d098ade8653a28ffff" + sha256 cellar: :any_skip_relocation, ventura: "5d1400ffcbae6faa9bb66ce62915972758d4028b19686e2e927abd42b0d1b227" + sha256 cellar: :any_skip_relocation, arm64_linux: "a267119c862d631a803769db55835b27d91a6a143bf1c9182e44922734bba16f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71745bc8b439b6b0f689f0f00a2973060c1962e7591f8bc65ccd82b61de8fd76" + end + + depends_on xcode: ["11.0", :build] + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release" + bin.install ".build/release/swift-sh" + bin.install ".build/release/swift-sh-edit" if OS.mac? + end + + test do + (testpath/"test.swift").write "#!/usr/bin/env swift sh" + system bin/"swift-sh", "eject", "test.swift" + assert_path_exists testpath/"Test"/"Package.swift" + end +end diff --git a/Formula/s/swift.rb b/Formula/s/swift.rb new file mode 100644 index 0000000000000..9f2ebc54dfa17 --- /dev/null +++ b/Formula/s/swift.rb @@ -0,0 +1,663 @@ +class Swift < Formula + include Language::Python::Shebang + + desc "High-performance system programming language" + homepage "https://www.swift.org" + # NOTE: Keep version in sync with resources below + url "https://github.com/swiftlang/swift/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "012bd56c8edd2c61df4cddad5d2fd634c045146016570a431cd1a0e0c28a16a9" + license "Apache-2.0" + + # This uses the `GithubLatest` strategy because a `-RELEASE` tag is often + # created several days before the version is officially released. + livecheck do + url :stable + regex(/swift[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ee2347d8ab854ab4335c931685c33419380aae1716feac45a954993ab0d77ba1" + sha256 cellar: :any, arm64_sequoia: "7da4ef3be641c5fea5cb70dce5aa70fd3613c83b8bd80b226c16adf1af1ab451" + sha256 cellar: :any, arm64_sonoma: "ef065340c8dd686de7e4e2810dd2cae07dba27386fff7eea6b4a10b3c002b88f" + sha256 cellar: :any, sonoma: "7df54bbe49c6146b2e0a2e89284edbc3e062f9e3738381de8a391f743fb8d822" + sha256 arm64_linux: "b69426e8e76d862877f4559e5686dfbf6f467d6f617aaa675d01ebcc950845b7" + sha256 x86_64_linux: "cdab9ba0ca3e6b0fc2ed962463f721cec156df3608891732877354bc618e3cbc" + end + + keg_only :provided_by_macos + + depends_on "cmake" => :build + depends_on "ninja" => :build + + # As a starting point, check `minimum_version` in `validate_xcode_compatibility`: + # https://github.com/swiftlang/swift/tree/swift-#{version}-RELEASE/utils/build-script + # This is community-sourced so may not be accurate. If the version in this formula + # is higher then that is likely why. + depends_on xcode: ["14.3", :build] + + depends_on "python@3.14" + + uses_from_macos "llvm" => :build + uses_from_macos "rsync" => :build + uses_from_macos "curl" + uses_from_macos "libedit" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "lld" => :build + depends_on "python-setuptools" => :build # for distutils in lldb build + depends_on "util-linux" + depends_on "zstd" # implicit via curl; not important but might as well + + # Doesn't have to be in sync but does need to be no older than X.(Y - 1).0 + resource "bootstrap" do + on_arm do + url "https://download.swift.org/swift-6.1.3-release/ubuntu2204-aarch64/swift-6.1.3-RELEASE/swift-6.1.3-RELEASE-ubuntu22.04-aarch64.tar.gz" + sha256 "52818b192d59a8d1949336895c38b75a5e35e86e88d384076e8d32398c9c68d1" + end + on_intel do + url "https://download.swift.org/swift-6.1.3-release/ubuntu2204/swift-6.1.3-RELEASE/swift-6.1.3-RELEASE-ubuntu22.04.tar.gz" + sha256 "28e4b24adf9b1b782b75919d9f2a0b0ad7e16e843aaa203e0baca780248dcdd6" + end + end + + resource "swift-corelibs-foundation" do + url "https://github.com/apple/swift-corelibs-foundation/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "871b5b034b0f42b26b9da0f50bea7f7e24f12594fa5b9536c622acb3d942dbe6" + + livecheck do + formula :parent + end + end + + resource "swift-foundation" do + url "https://github.com/apple/swift-foundation/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "94a6f5356ad2603c8bb325cafb26476af0d6007712a089d6427441357c9bfaab" + + livecheck do + formula :parent + end + end + + resource "swift-foundation-icu" do + url "https://github.com/apple/swift-foundation-icu/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "484b06da71a21730827dec01a8b3565035e4e8dee2b3e1a7b171136a1d74341a" + + livecheck do + formula :parent + end + end + + resource "swift-corelibs-libdispatch" do + url "https://github.com/apple/swift-corelibs-libdispatch/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "d4b8171d6711dabc3cb81093e954cedd521c8e4c170a688c1c369194c9eae4b3" + + livecheck do + formula :parent + end + end + + resource "swift-corelibs-xctest" do + url "https://github.com/apple/swift-corelibs-xctest/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "e511797ba3202b77f925f9cd8afa7884bc7104e1e509b00663d48dc5185bfc20" + + livecheck do + formula :parent + end + end + end + + fails_with :gcc do + cause "Currently requires Clang to build successfully." + end + + resource "llvm-project" do + url "https://github.com/swiftlang/llvm-project/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "394a5ac36216820031f5ab70d78eeb8cf466d868ce436b20e857282d6408c5bd" + + livecheck do + formula :parent + end + end + + resource "cmark" do + url "https://github.com/swiftlang/swift-cmark/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "f5cb03fa6aab841742ff10dfcd4d8422682e8528e28a4cd4e2d18aa87bf0e95c" + + livecheck do + formula :parent + end + end + + resource "llbuild" do + url "https://github.com/swiftlang/swift-llbuild/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "d03b967786d710d4206644071ad1c0b006e13ea3ab2a3866601c3feba23f5937" + + livecheck do + formula :parent + end + + # Fix build when curses can't be found in the default linker path + patch do + url "https://github.com/Bo98/swift-llbuild/commit/61810b86c1c59283edbf1cf7a27f538e1d060537.patch?full_index=1" + sha256 "e55fe1b2d1e1edd196e2a1a4183454739cfdb4a41cae67ac3cbce6ee15117323" + end + + # Workaround Homebrew sqlite3 not being found. + # https://github.com/swiftlang/swift-llbuild/issues/901 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/swift/llbuild-sqlite3.patch" + sha256 "184ce34784c532ec72d71673218fedb72dc09fdff13fd94c2331e1696d329def" + end + end + + resource "swift-build" do + url "https://github.com/swiftlang/swift-build/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "04e4306191c1ed340ac29188a563eb467a528a4f08267892a39323865099cc7c" + + livecheck do + formula :parent + end + end + + resource "swiftpm" do + url "https://github.com/swiftlang/swift-package-manager/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "ceb1e5c6fc1b4a5e0b69d2897a336c1c57be07202bfc5d8d7b486be82bd78215" + + livecheck do + formula :parent + end + + # Fix for lld to find -lsqlite3 when auto-linking is done via CMake + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/swift/swiftpm-sqlite3.patch" + sha256 "78a13abd5a301a3172c3c72ad19a5f1bcfd6c7f142ee90b9417124923dbdd6d1" + end + end + + resource "indexstore-db" do + url "https://github.com/swiftlang/indexstore-db/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "167c53c0fae33b95a215af0c899623f665911999165cbe1a231d3d161de7d0eb" + + livecheck do + formula :parent + end + end + + resource "sourcekit-lsp" do + url "https://github.com/swiftlang/sourcekit-lsp/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "d146994288c4359712a1577120a972b65fa23b543b1a172d93d03322056dc5ee" + + livecheck do + formula :parent + end + end + + resource "swift-driver" do + url "https://github.com/swiftlang/swift-driver/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "ffec2b3e20e5a9270d5328fde48ea14d11616514f89a718284c96e239f7ec49c" + + livecheck do + formula :parent + end + end + + resource "swift-tools-support-core" do + url "https://github.com/swiftlang/swift-tools-support-core/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "f8b453d6b7223e4026ae545301bc7ea637d73240fa5e2fd22030e8d209b37b6f" + + livecheck do + formula :parent + end + + # Fix "close error" when compiling SwiftPM. + # https://github.com/swiftlang/swift-tools-support-core/pull/456 + patch do + url "https://github.com/Bo98/swift-tools-support-core/commit/dca5ee70e302df065178cc8a75a2d6ea00886c40.patch?full_index=1" + sha256 "e5e2e7cec7b7bd9ef0def5cfc9b1308fe1f25f6228973031c9821b2c4475c8a1" + end + end + + resource "swift-docc" do + url "https://github.com/swiftlang/swift-docc/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "13c74815b7657dc3048c75c364401e776274eb5dbcbd24a04e92f16735b6faee" + + livecheck do + formula :parent + end + end + + resource "swift-lmdb" do + url "https://github.com/swiftlang/swift-lmdb/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "89e3d5816775f48c1b19c03fa670b09e1b7582a7df8e68b1f9e7808495f1b0cf" + + livecheck do + formula :parent + end + end + + resource "swift-docc-render-artifact" do + url "https://github.com/swiftlang/swift-docc-render-artifact/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "fb4719002f09090799558e27122e666db0259a8fc72557aa0f007e44cb1f886b" + + livecheck do + formula :parent + end + end + + resource "swift-docc-symbolkit" do + url "https://github.com/swiftlang/swift-docc-symbolkit/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "f89c1b576e67be97eaaf2973026a9907f70858a1f90198bbcf634f4d2af3af9a" + + livecheck do + formula :parent + end + end + + resource "swift-markdown" do + url "https://github.com/swiftlang/swift-markdown/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "03304f13bb60e4ba78a83d98c4843094b26271e6e88a10feab7b2d0aa44a9910" + + livecheck do + formula :parent + end + end + + resource "swift-experimental-string-processing" do + url "https://github.com/swiftlang/swift-experimental-string-processing/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "40027a11963771722a2539f538bdcc265c209cae7a9fd93d8f0a71f13e338b0d" + + livecheck do + formula :parent + end + end + + resource "swift-syntax" do + url "https://github.com/swiftlang/swift-syntax/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "482066ea299fdc05c9eb74886724a941d6ef09e84c6e75cc6ae7bb0040e768f2" + + livecheck do + formula :parent + end + end + + resource "swift-testing" do + url "https://github.com/swiftlang/swift-testing/archive/refs/tags/swift-6.2-RELEASE.tar.gz" + sha256 "0de80cc99b6938b8427ec9b4c1bef661c414db03ab29b30611cf28381705c832" + + livecheck do + formula :parent + end + end + + # To find the version to use, check the release/#{version.major_minor} entry of: + # https://github.com/swiftlang/swift/blob/swift-#{version}-RELEASE/utils/update_checkout/update-checkout-config.json + resource "swift-argument-parser" do + url "https://github.com/apple/swift-argument-parser/archive/refs/tags/1.4.0.tar.gz" + sha256 "d5bad3a1da66d9f4ceb0a347a197b8fdd243a91ff6b2d72b78efb052b9d6dd33" + end + + # As above: refer to update-checkout-config.json + resource "swift-atomics" do + url "https://github.com/apple/swift-atomics/archive/refs/tags/1.2.0.tar.gz" + sha256 "33d9f4fbaeddee4bda3af2be126791ee8acf3d3c24a2244457641a20d39aec12" + end + + # As above: refer to update-checkout-config.json + resource "swift-collections" do + url "https://github.com/apple/swift-collections/archive/refs/tags/1.1.3.tar.gz" + sha256 "7e5e48d0dc2350bed5919be5cf60c485e72a30bd1f2baf718a619317677b91db" + end + + # As above: refer to update-checkout-config.json + resource "swift-crypto" do + url "https://github.com/apple/swift-crypto/archive/refs/tags/3.0.0.tar.gz" + sha256 "5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154" + end + + # As above: refer to update-checkout-config.json + resource "swift-certificates" do + url "https://github.com/apple/swift-certificates/archive/refs/tags/1.0.1.tar.gz" + sha256 "fcaca458aab45ee69b0f678b72c2194b15664cc5f6f5e48d0e3f62bc5d1202ca" + end + + # As above: refer to update-checkout-config.json + resource "swift-asn1" do + url "https://github.com/apple/swift-asn1/archive/refs/tags/1.0.0.tar.gz" + sha256 "e0da995ae53e6fcf8251887f44d4030f6600e2f8f8451d9c92fcaf52b41b6c35" + end + + # As above: refer to update-checkout-config.json + resource "swift-numerics" do + url "https://github.com/apple/swift-numerics/archive/refs/tags/1.0.2.tar.gz" + sha256 "786291c6ff2a83567928d3d8f964c43ff59bdde215f9dedd0e9ed49eb5184e59" + end + + # As above: refer to update-checkout-config.json + resource "swift-system" do + url "https://github.com/apple/swift-system/archive/refs/tags/1.5.0.tar.gz" + sha256 "4bf5d5db04d48f484289371b63dd7bdced0db1ab1307c49127b9f894341a521d" + end + + # As above: refer to update-checkout-config.json + resource "swift-nio" do + url "https://github.com/apple/swift-nio/archive/refs/tags/2.65.0.tar.gz" + sha256 "feb16b6d0e6d010be14c6732d7b02ddbbdc15a22e3912903f08ef5d73928f90d" + end + + # As above: refer to update-checkout-config.json + resource "swift-toolchain-sqlite" do + url "https://github.com/swiftlang/swift-toolchain-sqlite/archive/refs/tags/1.0.1.tar.gz" + sha256 "c8704e70c4847a8dbd47aafb25d293fbe1e1bafade16cfa64e04f751e33db0ca" + end + + # Homebrew-specific patch to make the default resource directory use opt rather than Cellar. + # This fixes output binaries from `swiftc` having a runpath pointing to the Cellar. + # This should only be removed if an alternative solution is implemented. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/swift/homebrew-resource-dir.diff" + sha256 "5210ca0fd95b960d596c058f5ac76412a6987d2badf5394856bb9e31d3c68833" + end + + # Fix linkage test failure on Linux for missing libswiftCore.so as RPATH was not updated for + # https://github.com/swiftlang/swift/commit/7f67eb3fc57b95c023f4c7d767a0f241e0ee541a + patch :DATA + + def install + workspace = buildpath.parent + build = workspace/"build" + + install_prefix = if OS.mac? + toolchain_prefix = "/Swift-#{version.major_minor}.xctoolchain" + "#{toolchain_prefix}/usr" + else + "/libexec" + end + + ln_sf buildpath, workspace/"swift" + resources.each { |r| r.stage(workspace/r.name) } + + # Disable invoking SwiftPM in a sandbox while building some projects. + # This conflicts with Homebrew's sandbox. + helpers_using_swiftpm = [ + workspace/"indexstore-db/Utilities/build-script-helper.py", + workspace/"sourcekit-lsp/Utilities/build-script-helper.py", + workspace/"swift-docc/build-script-helper.py", + ] + inreplace helpers_using_swiftpm, /swiftpm_args(: List\[str\])? = \[/, "\\0'--disable-sandbox'," + inreplace workspace/"swift-docc/build-script-helper.py", + "[swift_exec, 'package',", + "\\0 '--disable-sandbox'," + + # Fix swift-driver somehow bypassing the shims. + inreplace workspace/"swift-driver/Utilities/build-script-helper.py", + "-DCMAKE_C_COMPILER:=clang", + "-DCMAKE_C_COMPILER:=#{which(ENV.cc)}" + inreplace workspace/"swift-driver/Utilities/build-script-helper.py", + "-DCMAKE_CXX_COMPILER:=clang++", + "-DCMAKE_CXX_COMPILER:=#{which(ENV.cxx)}" + + # Fix lldb Python module not being installed (needed for `swift repl`) + inreplace workspace/"llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake", + "repl_swift", + "lldb-python-scripts \\0" + + # Fix Linux RPATH for Swift Foundation + if OS.linux? + inreplace workspace/"swift-corelibs-foundation/CMakeLists.txt", + '"$ORIGIN"', + "\"$ORIGIN:#{ENV["HOMEBREW_RPATH_PATHS"]}\"" + end + + extra_cmake_options = if OS.mac? + %W[ + -DSQLite3_INCLUDE_DIR=#{MacOS.sdk_for_formula(self).path}/usr/include + -DSQLite3_LIBRARY=#{MacOS.sdk_for_formula(self).path}/usr/lib/libsqlite3.tbd + ] + else + [] + end + + # Inject our CMake args into the SwiftPM build + inreplace workspace/"swiftpm/Utilities/bootstrap", + '"-DCMAKE_BUILD_TYPE:=Debug",', + "\"-DCMAKE_BUILD_TYPE:=Release\", \"#{extra_cmake_options.join('", "')}\"," + + mkdir build do + # List of components to build + swift_components = %w[ + autolink-driver compiler clang-resource-dir-symlink + libexec tools editor-integration toolchain-tools + license sourcekit-inproc sourcekit-xpc-service + swift-remote-mirror swift-remote-mirror-headers stdlib + static-mirror-lib + ] + llvm_components = %w[ + llvm-ar llvm-ranlib llvm-cov llvm-profdata + llvm-symbolizer IndexStore + clang clang-resource-headers compiler-rt + clangd clang-features-file libclang lld + ] + + if OS.mac? + swift_components << "back-deployment" + llvm_components << "dsymutil" + end + swift_components << "sdk-overlay" if OS.linux? + + args = %W[ + --host-cc=#{which(ENV.cc)} + --host-cxx=#{which(ENV.cxx)} + --release --no-assertions + --no-swift-stdlib-assertions + --build-subdir=#{build} + --lldb --llbuild --swiftpm --swift-driver + --swiftdocc --indexstore-db --sourcekit-lsp + --swift-testing --swift-testing-macros + --jobs=#{ENV.make_jobs} + --verbose-build + + --workspace=#{workspace} + --install-destdir=#{prefix} + --toolchain-prefix=#{toolchain_prefix} + --install-prefix=#{install_prefix} + --swift-include-tests=0 + --llvm-include-tests=0 + --lldb-configure-tests=0 + --lldb-extra-cmake-args=-DPython3_EXECUTABLE=#{which("python3.14")} + --skip-build-benchmarks + --build-swift-private-stdlib=0 + --install-swift + --swift-install-components=#{swift_components.join(";")} + --install-llvm + --llvm-install-components=#{llvm_components.join(";")} + --install-lldb + --install-llbuild + --install-static-linux-config + --install-swiftpm + --install-swift-driver + --install-swiftsyntax + --install-swiftdocc + --install-sourcekit-lsp + --install-swift-testing + --install-swift-testing-macros + ] + + extra_cmake_options << "-DSWIFT_INCLUDE_TEST_BINARIES=OFF" + + if OS.mac? + args += %W[ + --host-target=macosx-#{Hardware::CPU.arch} + --darwin-deployment-version-osx=#{MacOS.version} + --swift-darwin-supported-archs=#{Hardware::CPU.arch} + --swift-darwin-module-archs=x86_64;arm64 + --lldb-use-system-debugserver + ] + args << "--swift-enable-backtracing=0" if MacOS.version < :sonoma + extra_cmake_options += %W[ + -DSWIFT_STANDARD_LIBRARY_SWIFT_FLAGS=-disable-sandbox + -DLLDB_FRAMEWORK_COPY_SWIFT_RESOURCES=OFF + -DSWIFT_HOST_LIBRARIES_RPATH=#{loader_path} + ] + + ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["sqlite"].opt_lib + ENV.remove "PKG_CONFIG_PATH", Formula["sqlite"].opt_lib/"pkgconfig" + end + if OS.linux? + # List of valid values in class StdlibDeploymentTarget in + # utils/swift_build_support/swift_build_support/targets.py + arch = (Hardware::CPU.arm? && Hardware::CPU.is_64_bit?) ? "aarch64" : Hardware::CPU.arch + + args += %W[ + --libcxx=0 + --foundation + --libdispatch + --xctest + + --host-target=linux-#{arch} + --stdlib-deployment-targets=linux-#{arch} + --build-swift-static-stdlib + --build-swift-static-sdk-overlay + --install-foundation + --install-libdispatch + --install-xctest + ] + + # For XCTest (https://github.com/swiftlang/swift-corelibs-xctest/issues/432) and sourcekitd-repl + rpaths = [loader_path, rpath, rpath(target: lib/"swift/linux")] + extra_cmake_options << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + ENV.prepend_path "PATH", workspace/"bootstrap/usr/bin" + + # Use lld as Ubuntu 22.04 gold failed with "undefined symbol: _swift_registerConcurrencyRuntime". + # We no longer include gold in `binutils` while bfd is less tested upstream and increases build time. + ENV.prepend_path "PATH", Formula["lld"].opt_bin + args << "--use-linker=lld" + end + + args << "--extra-cmake-options=#{extra_cmake_options.join(" ")}" + + system "#{workspace}/swift/utils/build-script", *args + end + + if OS.mac? + # Prebuild modules for faster first startup. + ENV["SWIFT_EXEC"] = "#{prefix}#{install_prefix}/bin/swiftc" + MacOS.sdk_locator.all_sdks.each do |sdk| + system "#{prefix}#{install_prefix}/bin/swift", "build-sdk-interfaces", + "-sdk", sdk.path, + "-o", "#{prefix}#{install_prefix}/lib/swift/macosx/prebuilt-modules", + "-log-path", logs/"build-sdk-interfaces", + "-v" + end + + # Remove `swift-backtrace` on macOS without system /usr/lib/swift/libswiftRuntime.dylib + rm "#{prefix}#{install_prefix}/libexec/swift/macosx/swift-backtrace" if MacOS.version < :tahoe + else + # Strip debugging info to make the bottle relocatable. + binaries_to_strip = Pathname.glob("#{prefix}#{install_prefix}/{bin,lib/swift/pm}/**/*").select do |f| + f.file? && f.elf? + end + system "strip", "--strip-debug", "--preserve-dates", *binaries_to_strip + end + + bin.install_symlink Dir["#{prefix}#{install_prefix}/bin/{swift,sil,sourcekit}*"] + man1.install_symlink "#{prefix}#{install_prefix}/share/man/man1/swift.1" + elisp.install_symlink "#{prefix}#{install_prefix}/share/emacs/site-lisp/swift-mode.el" + doc.install_symlink Dir["#{prefix}#{install_prefix}/share/doc/swift/*"] + + rewrite_shebang detected_python_shebang, *Dir["#{prefix}#{install_prefix}/bin/*.py"] + end + + def caveats + on_macos do + <<~EOS + An Xcode toolchain has been installed to: + #{opt_prefix}/Swift-#{version.major_minor}.xctoolchain + + This can be symlinked for use within Xcode: + ln -s #{opt_prefix}/Swift-#{version.major_minor}.xctoolchain ~/Library/Developer/Toolchains/Swift-#{version.major_minor}.xctoolchain + EOS + end + end + + test do + # Don't use global cache which is long-lasting and often requires clearing. + module_cache = testpath/"ModuleCache" + module_cache.mkdir + + (testpath/"test.swift").write <<~'SWIFT' + let base = 2 + let exponent_inner = 3 + let exponent_outer = 4 + var answer = 1 + + for _ in 1...exponent_outer { + for _ in 1...exponent_inner { + answer *= base + } + } + + print("(\(base)^\(exponent_inner))^\(exponent_outer) == \(answer)") + SWIFT + output = shell_output("#{bin}/swift -module-cache-path #{module_cache} -v test.swift") + assert_match "(2^3)^4 == 4096\n", output + + # Test accessing Foundation + (testpath/"foundation-test.swift").write <<~'SWIFT' + import Foundation + + let swifty = URLComponents(string: "https://www.swift.org")! + print("\(swifty.host!)") + SWIFT + output = shell_output("#{bin}/swift -module-cache-path #{module_cache} -v foundation-test.swift") + assert_match "www.swift.org\n", output + + # Test compiler + system bin/"swiftc", "-module-cache-path", module_cache, "-v", "foundation-test.swift", "-o", "foundation-test" + output = shell_output("./foundation-test 2>&1") # check stderr too for dyld errors + assert_equal "www.swift.org\n", output + + # Test Swift Package Manager + ENV["SWIFTPM_MODULECACHE_OVERRIDE"] = module_cache + mkdir "swiftpmtest" do + system bin/"swift", "package", "init", "--type=executable" + cp "../foundation-test.swift", "Sources/swiftpmtest/swiftpmtest.swift" + system bin/"swift", "build", "--verbose", "--disable-sandbox" + assert_match "www.swift.org\n", shell_output("#{bin}/swift run --disable-sandbox") + end + + # Make sure the default resource directory is not using a Cellar path + default_resource_dir = JSON.parse(shell_output("#{bin}/swift -print-target-info"))["paths"]["runtimeResourcePath"] + expected_resource_dir = if OS.mac? + opt_prefix/"Swift-#{version.major_minor}.xctoolchain/usr/lib/swift" + else + opt_libexec/"lib/swift" + end.to_s + assert_equal expected_resource_dir, default_resource_dir + end +end + +__END__ +diff --git a/lib/Tooling/libSwiftScan/CMakeLists.txt b/lib/Tooling/libSwiftScan/CMakeLists.txt +index cd68ea874a6..fff338411f4 100644 +--- a/lib/Tooling/libSwiftScan/CMakeLists.txt ++++ b/lib/Tooling/libSwiftScan/CMakeLists.txt +@@ -42,6 +42,10 @@ if(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD" AND BOOTSTRAPP + TARGET libSwiftScan + APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" + ) ++ set_property( ++ TARGET libSwiftScan ++ APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" ++ ) + endif() + + if(SWIFT_BUILD_SWIFT_SYNTAX) diff --git a/Formula/s/swiftdraw.rb b/Formula/s/swiftdraw.rb new file mode 100644 index 0000000000000..d197a1dce1d7c --- /dev/null +++ b/Formula/s/swiftdraw.rb @@ -0,0 +1,45 @@ +class Swiftdraw < Formula + desc "Convert SVG into PDF, PNG, JPEG or SF Symbol" + homepage "https://github.com/swhitty/SwiftDraw" + url "https://github.com/swhitty/SwiftDraw/archive/refs/tags/0.25.1.tar.gz" + sha256 "7016b9a8a035cd6a87d72bbfadba168948b5e1f069bb922ca1419b1122aff254" + license "Zlib" + head "https://github.com/swhitty/SwiftDraw.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aa1295db70d1e5b108046d1ac7cb801a15a6826742a970c7d190271d2e2b9e68" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4bdb212c2771659678ea1f8cd22339979a55f76561a4547c2fd5efc6e67d2f1a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fd64178cf70a769b2fa0ccf6d634a806df91914a300721f638366b1ef6a444a" + sha256 cellar: :any_skip_relocation, sonoma: "2183ae401419163d66ff0f130932055e75d2d5888deee422fe2a991afcccd497" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e2f257dddeaca7757183a77908aadee70fab1b3ab4472c7ffc762436a12f37a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "efdb31d71154865519ab8c0b65c9eab8d54fc1df13d05c50b605d982528b4c98" + end + + depends_on xcode: ["16.0", :build] + + uses_from_macos "swift" => :build + uses_from_macos "libxml2" + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "--configuration", "release" + bin.install ".build/release/swiftdrawcli" => "swiftdraw" + end + + test do + (testpath/"fish.svg").write <<~EOS + + + + + EOS + system bin/"swiftdraw", testpath/"fish.svg", "--format", "sfsymbol" + assert_path_exists testpath/"fish-symbol.svg" + end +end diff --git a/Formula/s/swiftformat.rb b/Formula/s/swiftformat.rb new file mode 100644 index 0000000000000..502112c28aa03 --- /dev/null +++ b/Formula/s/swiftformat.rb @@ -0,0 +1,40 @@ +class Swiftformat < Formula + desc "Formatting tool for reformatting Swift code" + homepage "https://github.com/nicklockwood/SwiftFormat" + url "https://github.com/nicklockwood/SwiftFormat/archive/refs/tags/0.58.5.tar.gz" + sha256 "f4220005165422a7f9134bd1ef4bb623e66c862bf4524463a9d0562b26b6f1ff" + license "MIT" + head "https://github.com/nicklockwood/SwiftFormat.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e407dd49cc6e090d9f52c81e308195d4b1990297f63d89c9260d919c61a9654" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c25acd66fc04fd7caa8704fc29d563787b56c1e58528bd55a97048302736a66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac5bb4d39e420c8744ea790953203dd3c8cb31c9c10c4dc155a3a4875080a826" + sha256 cellar: :any_skip_relocation, sonoma: "df9974a25e34a892f29d502da150fd68d1e4f223deb2fcefa5b68e9de740aa87" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0501630545a77ad2f57e9908dae6ee6150b5937618975598f073d2d3f207717" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92df6c5d376242f6bb570f3a45387104a811ab8ae38eb6c403d80ad4416dae2e" + end + + depends_on xcode: ["10.1", :build] + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "--configuration", "release" + bin.install ".build/release/swiftformat" + end + + test do + (testpath/"potato.swift").write <<~SWIFT + struct Potato { + let baked: Bool + } + SWIFT + system bin/"swiftformat", "#{testpath}/potato.swift" + end +end diff --git a/Formula/s/swiftgen.rb b/Formula/s/swiftgen.rb new file mode 100644 index 0000000000000..d44264c0669c1 --- /dev/null +++ b/Formula/s/swiftgen.rb @@ -0,0 +1,78 @@ +class Swiftgen < Formula + desc "Swift code generator for assets, storyboards, Localizable.strings, etc." + homepage "https://github.com/SwiftGen/SwiftGen" + url "https://github.com/SwiftGen/SwiftGen/archive/refs/tags/6.6.3.tar.gz" + sha256 "f529be194f0ffcc85a76a6770fe3578b49e7e56ba872ce1e3aaba75982b09d32" + license "MIT" + head "https://github.com/SwiftGen/SwiftGen.git", branch: "stable" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "001dc72c675528810114e961f7a9d743504ab3fd58c50e5be6363fcb76c91382" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49cf0b56d500cf87acc05ca32f5007b750469c865253bd6b070dffcd309d8065" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc57fa733294a7d4d27714cd3eb954f2f8de1231cc0f991e6c043e2528a25311" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ab20119231242e90668b5129c07d7114abaa9e7af647fe3f9fa511999f0b6548" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6efea7084dd6e75732483d417abf476da8f41a0513059f0133c03b1711e92ac3" + sha256 cellar: :any_skip_relocation, sonoma: "20b600909007b301f5daae7954e1587b4275a2818671ab96ae584139fb6d184f" + sha256 cellar: :any_skip_relocation, ventura: "61b7e10cb59fa9a8a84b55c7945cdcc3d854b40baaca057e658e528aac091f4b" + sha256 cellar: :any_skip_relocation, monterey: "535fd043b81c91f3c8953cfd7d13721d12d205215f19b10f6549230847cbe3f1" + end + + depends_on xcode: ["13.3", :build] + depends_on :macos + + uses_from_macos "ruby" => :build + + def install + # Install bundler (needed for our rake tasks) + ENV["GEM_HOME"] = buildpath/"gem_home" + + # we use the macOS ruby (2.6.10p210 (2022-04-12 revision 67958)) this is the last supported bundler version + system "gem", "install", "bundler", "-v 2.4.22" + + ENV.prepend_path "PATH", buildpath/"gem_home/bin" + system "bundle", "install", "--without", "development", "release" + + # Disable linting + ENV["NO_CODE_LINT"] = "1" + + # Install SwiftGen in `libexec` (because of our resource bundle) + # Then create a script to invoke it + system "bundle", "exec", "rake", "cli:install[#{libexec}]" + bin.write_exec_script "#{libexec}/swiftgen" + end + + test do + resource("testdata") do + url "https://github.com/SwiftGen/SwiftGen/archive/refs/tags/6.6.3.tar.gz" + sha256 "f529be194f0ffcc85a76a6770fe3578b49e7e56ba872ce1e3aaba75982b09d32" + end + + # prepare test data + resource("testdata").stage testpath + fixtures = testpath/"Sources/TestUtils/Fixtures" + test_command = lambda { |command, template, resource_group, generated, fixture, params = nil| + assert_equal( + (fixtures/"Generated/#{resource_group}/#{template}/#{generated}").read.strip, + shell_output("#{bin}/swiftgen run #{command} " \ + "--templateName #{template} #{params} #{fixtures}/Resources/#{resource_group}/#{fixture}").strip, + "swiftgen run #{command} failed", + ) + } + + system bin/"swiftgen", "--version" + + # command template rsrc_group generated fixture & params + test_command.call "colors", "swift5", "Colors", "defaults.swift", "colors.xml" + test_command.call "coredata", "swift5", "CoreData", "defaults.swift", "Model.xcdatamodeld" + test_command.call "files", "structured-swift5", "Files", "defaults.swift", "" + test_command.call "fonts", "swift5", "Fonts", "defaults.swift", "" + test_command.call "ib", "scenes-swift5", "IB-iOS", "all.swift", "", "--param module=SwiftGen" + test_command.call "json", "runtime-swift5", "JSON", "all.swift", "" + test_command.call "plist", "runtime-swift5", "Plist", "all.swift", "good" + test_command.call "strings", "structured-swift5", "Strings", "localizable.swift", "Localizable.strings" + test_command.call "xcassets", "swift5", "XCAssets", "all.swift", "" + test_command.call "yaml", "inline-swift5", "YAML", "all.swift", "good" + end +end diff --git a/Formula/s/swiftlint.rb b/Formula/s/swiftlint.rb new file mode 100644 index 0000000000000..db2062fd95975 --- /dev/null +++ b/Formula/s/swiftlint.rb @@ -0,0 +1,53 @@ +class Swiftlint < Formula + desc "Tool to enforce Swift style and conventions" + homepage "https://github.com/realm/SwiftLint" + url "https://github.com/realm/SwiftLint.git", + tag: "0.62.2", + revision: "da9d742874d88f6d5d0f7b315d1fcf12655f2311" + license "MIT" + head "https://github.com/realm/SwiftLint.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ed586726c1623ba93c47dc0ba61269a86ab5e1a85ff7be4612208aaa0d205fde" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6eea04003f353ad0990a495cd868b9b365614d961017d62aaf53492920515f7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "863e5f72419206216175b73077d7b81b97841a09fae2526faa6b35437fc8902a" + sha256 cellar: :any_skip_relocation, sonoma: "86393786858e99c7411d1b1a21164671e336abbbce89d6168af718b33974f8cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "276275c4ba04aeb34c2211fe533116b3ad8530ccb212ae18f4b2a678e6f5141d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a68241403223541dd3999112631bbae0a2185d8c31acbff20003ad41a1b13c19" + end + + depends_on macos: :ventura + depends_on xcode: "8.0" + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + uses_from_macos "curl" + uses_from_macos "libxml2" + + def install + if OS.mac? + args = ["--disable-sandbox"] + else + libxml2_lib = Formula["libxml2"].opt_lib + args = [ + "--static-swift-stdlib", + "-Xlinker", "-L#{Formula["curl"].opt_lib}", + "-Xlinker", "-L#{libxml2_lib}" + ] + ENV.prepend_path "LD_LIBRARY_PATH", libxml2_lib + end + system "swift", "build", *args, "--configuration", "release", "--product", "swiftlint" + bin.install ".build/release/swiftlint" + generate_completions_from_executable(bin/"swiftlint", "--generate-completion-script") + end + + test do + (testpath/"Test.swift").write "import Foundation" + assert_match "Test.swift:1:1: warning: Trailing Newline Violation: " \ + "Files should have a single trailing newline (trailing_newline)", + shell_output("SWIFTLINT_SWIFT_VERSION=5 SWIFTLINT_DISABLE_SOURCEKIT=1 #{bin}/swiftlint lint --no-cache").chomp + assert_match version.to_s, + shell_output("#{bin}/swiftlint version").chomp + end +end diff --git a/Formula/s/swiftly.rb b/Formula/s/swiftly.rb new file mode 100644 index 0000000000000..f2c33dc55faca --- /dev/null +++ b/Formula/s/swiftly.rb @@ -0,0 +1,64 @@ +class Swiftly < Formula + desc "Swift toolchain installer and manager" + homepage "https://github.com/swiftlang/swiftly" + url "https://github.com/swiftlang/swiftly.git", + tag: "1.1.0", + revision: "30684f171da505160d20f7114c2b3def37a84b85" + license "Apache-2.0" + head "https://github.com/swiftlang/swiftly.git", branch: "main" + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "907ff24bc28075aa64a7a5394465b67e5530113c10afe74bb5497534e70ab39b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa31e4a6cf9d3e74d818de7d62f61b9bfe9a6e723302ac065d706a547532d33b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68e6aaf6c455da51ce5089fc449786ad979d3e68b2cb45167b04f2f6ca10b336" + sha256 cellar: :any_skip_relocation, sonoma: "93180c8b870449e6c10fdd68d33e04330861c75c8c55791cd8ed9978a0673707" + sha256 arm64_linux: "7ccfaf3042ce39ebcedefe3768ec33b43d8c67369072e08450faa935d587e3d2" + sha256 x86_64_linux: "71736be307ef8421e3df0329e199dcca073a35904b4dbef774b4946a03015790" + end + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + uses_from_macos "zlib" + + on_sonoma :or_older do + depends_on xcode: ["15.0", :build] + end + + on_linux do + depends_on "libarchive" + end + + def install + args = %w[ + --configuration release + --disable-sandbox + --product swiftly + ] + if OS.linux? + args += %W[ + --static-swift-stdlib + -Xswiftc -I#{HOMEBREW_PREFIX}/include + -Xlinker -L#{HOMEBREW_PREFIX}/lib + ] + ENV.prepend_path "LD_LIBRARY_PATH", Formula["libarchive"].opt_lib + end + system "swift", "build", *args + bin.install ".build/release/swiftly" + generate_completions_from_executable(bin/"swiftly", "--generate-completion-script") + end + + test do + # Test swiftly with a private installation + swiftly_bin = testpath/"swiftly"/"bin" + mkdir_p swiftly_bin + ENV["SWIFTLY_HOME_DIR"] = testpath/"swiftly" + ENV["SWIFTLY_BIN_DIR"] = swiftly_bin + ENV["SWIFTLY_TOOLCHAINS_DIR"] = testpath/"swiftly"/"toolchains" + system bin/"swiftly", "init", "--assume-yes", "--no-modify-profile", "--skip-install" + end +end diff --git a/Formula/s/swiftplantuml.rb b/Formula/s/swiftplantuml.rb new file mode 100644 index 0000000000000..284a59e4bf07b --- /dev/null +++ b/Formula/s/swiftplantuml.rb @@ -0,0 +1,76 @@ +class Swiftplantuml < Formula + desc "Generate UML class diagrams from Swift sources" + homepage "https://marcoeidinger.github.io/SwiftPlantUML/" + url "https://github.com/MarcoEidinger/SwiftPlantUML/archive/refs/tags/0.8.1.tar.gz" + sha256 "1529dafcfd3e7c20902bee53100a0acee55a80e373d52a208829649dc961e2b0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03f4d60f46db5f91df82bd3581fb1c56ede43d62eddd7d1f0f0aee010644935b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ff206c13b69d39e3f86ac489e8c505cbe7095cf424521692d5b76eeb2393e07" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "494bb09eb5cc7d9dabcfdac317baf2b5939edcbbba51bcde099bea9d1068cb58" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7bdc52a8007de3f0043a220e2a26ace19bdfd906d52b5157a49a1b148466cfc0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c5e3a4d3fe71467bd150d18789322c7cc0a842d54077c6932b173ebee3ab7fd1" + sha256 cellar: :any_skip_relocation, sonoma: "cfda85ba53b6afe004e3868e38c8f22c52b397ac215bf05e29d2c68fa45f0960" + sha256 cellar: :any_skip_relocation, ventura: "811c2c81ab2d87633a8be92d5553df6aaf36ea6e573759a736a0f2561355c77f" + sha256 cellar: :any_skip_relocation, monterey: "d479af32707f10b82e2de01e879e95f6fcfbd4ace0d37c5900823f7873ccdae1" + end + + depends_on xcode: ["12.2", :build] + depends_on :macos + + # Fetch a copy of SourceKitten in order to fix build with newer Swift + resource "SourceKitten" do + if DevelopmentTools.clang_build_version >= 1600 + # https://github.com/MarcoEidinger/SwiftPlantUML/blob/0.8.1/Package.resolved#L5-L11 + url "https://github.com/jpsim/SourceKitten.git", + tag: "0.32.0", + revision: "817dfa6f2e09b0476f3a6c9dbc035991f02f0241" + + # Backport of import from HEAD + patch :DATA + end + end + + def install + if DevelopmentTools.clang_build_version >= 1600 + res = resource("SourceKitten") + (buildpath/"SourceKitten").install res + + pin_version = JSON.parse(File.read("Package.resolved")) + .dig("object", "pins") + .find { |pin| pin["package"] == "SourceKitten" } + .dig("state", "version") + odie "Check if SourceKitten patch is still needed!" if pin_version != res.version + + system "swift", "package", "--disable-sandbox", "edit", "SourceKitten", "--path", buildpath/"SourceKitten" + end + + system "make", "install", "prefix=#{prefix}" + end + + test do + system bin/"swiftplantuml", "--help" + end +end + +__END__ +diff --git a/Source/SourceKittenFramework/SwiftDocs.swift b/Source/SourceKittenFramework/SwiftDocs.swift +index 1d2473c..70de287 100644 +--- a/Source/SourceKittenFramework/SwiftDocs.swift ++++ b/Source/SourceKittenFramework/SwiftDocs.swift +@@ -10,6 +10,14 @@ + import SourceKit + #endif + ++#if os(Linux) ++import Glibc ++#elseif os(Windows) ++import CRT ++#else ++import Darwin ++#endif ++ + /// Represents docs for a Swift file. + public struct SwiftDocs { + /// Documented File. diff --git a/Formula/s/swig.rb b/Formula/s/swig.rb new file mode 100644 index 0000000000000..c259f83b1fb6b --- /dev/null +++ b/Formula/s/swig.rb @@ -0,0 +1,76 @@ +class Swig < Formula + desc "Generate scripting interfaces to C/C++ code" + homepage "https://www.swig.org/" + url "https://downloads.sourceforge.net/project/swig/swig/swig-4.4.0/swig-4.4.0.tar.gz" + sha256 "c3f8e5dcd68c18aa19847b33b0a1bb92f07e904c53ae9cf5ae4ff8727a72927e" + license "GPL-3.0-or-later" + + livecheck do + url "https://sourceforge.net/projects/swig/rss?path=/swig" + regex(%r{url=.*?/swig[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_tahoe: "3f455d50205a0b5635a06ff3efc5af23e69250260f59bee84f1b891b6935d5ce" + sha256 arm64_sequoia: "bb8a6f319d6bbcda131cae2335f5be0a5e0f10c6ebaf9ca50155ef331ceee4f8" + sha256 arm64_sonoma: "9000a532c302d784094b10a99c2e46d1ed6d573c2a9c2a5d2abcdc8019ed045b" + sha256 tahoe: "c3d6f99bc61441b2d874b3bc4d974a0a90676db312aa25df98d901a7f766a021" + sha256 sonoma: "18e951b0694676531ff6bee4dd94069b895243294a07c92f12385ed1cf7debd8" + sha256 arm64_linux: "be5f1d7766e4d162ca4be8a554b900731bc5c3a563bbfa53f8592fcf00339c96" + sha256 x86_64_linux: "4e629b02c9e53aebe297c8ff7d8353dfe2ad4649e54a1488d0ead353854e2c4b" + end + + head do + url "https://github.com/swig/swig.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pcre2" + + uses_from_macos "python" => :test + uses_from_macos "zlib" + + def install + ENV.append "CXXFLAGS", "-std=c++11" # Fix `nullptr` support detection. + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + int add(int x, int y) { + return x + y; + } + C + (testpath/"test.i").write <<~EOS + %module test + %inline %{ + extern int add(int x, int y); + %} + EOS + (testpath/"pyproject.toml").write <<~TOML + [project] + name = "test" + version = "0.1" + + [tool.setuptools] + ext-modules = [ + {name = "_test", sources = ["test_wrap.c", "test.c"]} + ] + TOML + (testpath/"run.py").write <<~PYTHON + import test + print(test.add(1, 1)) + PYTHON + + ENV.remove_from_cflags(/-march=\S*/) + system bin/"swig", "-python", "test.i" + system "python3", "-m", "venv", ".venv" + system testpath/".venv/bin/pip", "install", *std_pip_args(prefix: false, build_isolation: true), "." + assert_equal "2", shell_output("#{testpath}/.venv/bin/python3 ./run.py").strip + end +end diff --git a/Formula/s/switch-lan-play.rb b/Formula/s/switch-lan-play.rb new file mode 100644 index 0000000000000..46a9e77c39603 --- /dev/null +++ b/Formula/s/switch-lan-play.rb @@ -0,0 +1,43 @@ +class SwitchLanPlay < Formula + desc "Make you and your friends play games like in a LAN" + homepage "https://github.com/spacemeowx2/switch-lan-play" + url "https://github.com/spacemeowx2/switch-lan-play.git", + tag: "v0.2.3", + revision: "c0c663e3fdc95d6d6e8ab401caa2bfb5b5872e00" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bc7be8d18040e7c518cd4f4eb42e99c53b4b8601b9f291d2ea766d3c8dade613" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "62c1155ae43a4751ab7efaeee9e02c57e8782186aac73312eb874289f7e6aec4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8281272397493ebd6fad9f2f53d61c62bd0302c1d3e898a0002874ab6c4ffce4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4caf1d51243835a1c8816372f07bce843840f38f0a8ceaad42dbd19c15fe9c5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f119af26760223542641ba4596c31ae3b4418b6ed955a2d5198fdc15aa6d23d5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ae86854d36264397768367d7ce69466967e303b5047828a6720c6574101a24b8" + sha256 cellar: :any_skip_relocation, sonoma: "4a07c9571a9c914a4b32b9133cd9e167cf59b5828dde79458762aec6560685e8" + sha256 cellar: :any_skip_relocation, ventura: "a27b8f98ef87fb078982323e661eb8c2368cb21dac8263c9590e805a7cb84679" + sha256 cellar: :any_skip_relocation, monterey: "5913dc50feffc96b3c7a1a6e76df7f4701d6ec8051a3ce2c8cd67c73e10785a9" + sha256 cellar: :any_skip_relocation, big_sur: "520620d6ae69e98a169edda5ed47b0ebb496a843eedacda867b1eb52b14c007e" + sha256 cellar: :any_skip_relocation, catalina: "caa1992416c8eae4c281af3166238bb2bf8104c1d91d7dc37a2abd8715712ccc" + sha256 cellar: :any_skip_relocation, arm64_linux: "9aac4915530555c0f133b120d4e4535e3248462f8067934b1ac4c554d89ee49d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0575f08e99046febb1ff6e1c00f02ab5b1bfa3e4b944828d0c858339748989b" + end + + depends_on "cmake" => :build + + uses_from_macos "libpcap" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/lan-play --version") + assert_match "1.", shell_output("#{bin}/lan-play --list-if") + end +end diff --git a/Formula/s/switchaudio-osx.rb b/Formula/s/switchaudio-osx.rb new file mode 100644 index 0000000000000..7c029b01b1d75 --- /dev/null +++ b/Formula/s/switchaudio-osx.rb @@ -0,0 +1,43 @@ +class SwitchaudioOsx < Formula + desc "Change macOS audio source from the command-line" + homepage "https://github.com/deweller/switchaudio-osx/" + url "https://github.com/deweller/switchaudio-osx/archive/refs/tags/1.2.2.tar.gz" + sha256 "3d12b57cbd6063a643a12f12287af99c87894c33449c6bcac0a71fd15776b3ed" + license "MIT" + head "https://github.com/deweller/switchaudio-osx.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c957391d820920536fc088084c958dec3daad2cbc99c7c9b3e42134da4198c4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8d4c24b4029b788cdfc13bf36ddb650d220fd6fb43df0d60131c47034734f51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e6292b5cbda7b5b7dc412d6f787903cb9cdab68ad75c1a8ac0bf3e63985d782" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb34fa77825e8c7bbcceda397eea3155196039fcbafcd4e6ba419694d3f3d3b0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4ca3cb57b3850bc4a520e1751d4e1e9ae224df74c8c74aff0f0faba4b3b6a444" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e91921e9b3d31fbf9ee65fabf606c946a234d80af6abd418f0c68152a066d974" + sha256 cellar: :any_skip_relocation, sonoma: "609bfbee688f729a9451de9d76b80d403381f9448d15a5ab6f5dd3e16e05a945" + sha256 cellar: :any_skip_relocation, ventura: "795efb36156fe00438b1843dfd5c3d3463e3c6294b8ea96f89052b03795bcefb" + sha256 cellar: :any_skip_relocation, monterey: "17971fd5701812aa360ed120338fa4a9ddede0c8ec503144548614c2ebe930d0" + sha256 cellar: :any_skip_relocation, big_sur: "a5c74d8fd8754d57165d121f02ffa338a6b721432d5694f82c555d877a946d5f" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-project", "AudioSwitcher.xcodeproj", + "-target", "SwitchAudioSource", + "SYMROOT=build", + "-verbose", + "-arch", Hardware::CPU.arch, + # Default target is 10.5, which fails on Mojave + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + prefix.install Dir["build/Release/*"] + bin.write_exec_script "#{prefix}/SwitchAudioSource" + chmod 0755, bin/"SwitchAudioSource" + end + + test do + system bin/"SwitchAudioSource", "-c" + end +end diff --git a/Formula/s/sword.rb b/Formula/s/sword.rb new file mode 100644 index 0000000000000..c07f87a42b240 --- /dev/null +++ b/Formula/s/sword.rb @@ -0,0 +1,61 @@ +class Sword < Formula + desc "Cross-platform tools to write Bible software" + homepage "https://www.crosswire.org/sword/index.jsp" + url "https://www.crosswire.org/ftpmirror/pub/sword/source/v1.9/sword-1.9.0.tar.gz" + sha256 "42409cf3de2faf1108523e2c5ac0745d21f9ed2a5c78ed878ee9dcc303426b8a" + license "GPL-2.0-only" + + livecheck do + url "https://www.crosswire.org/ftpmirror/pub/sword/source/" + regex(%r{href=.*?sword[._-]v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "b6f7db99646d56fa897070a7823dc5088fb5ee13be82b3399cb490314291d2e8" + sha256 arm64_sequoia: "0bbd46a628e21ec4c2cc033e16a03dca1a2ac3fb5e0ce282a5e60abf4c0b8f97" + sha256 arm64_sonoma: "12b0bef882eb3ccc8e41d2199726435ed32286fde77a8b9b6ba6792a6210acaf" + sha256 arm64_ventura: "2439903e03cee94fe9b519c1597d9bebda08eebb38f353f775202b637748403a" + sha256 arm64_monterey: "639a1f62fdf085c51a76a685ece4432a26dddc2fe7d4ba65fce337d6adbfc500" + sha256 arm64_big_sur: "aa8af3684bf4475f2c4f193ce2eee82751525f99dfc718b49495ba58f1866662" + sha256 sonoma: "412aea75608674d511f80719b48928266515fc6968b6e72fa6c8c57827ec4baa" + sha256 ventura: "53e88cb788185e075f3d8bc1622098a2ca9f7dc506546ede4f3c29d5a3fd7105" + sha256 monterey: "47de7e7639fddd186eb0c2c806149ff7c2bbf90837d78bf3f912958f4a4afeb4" + sha256 big_sur: "85fd915531e0d5afa3ca380be523b09dd6c7ef4085ac4c7e26fc09e81c945228" + sha256 catalina: "65d2da4bfbc5517b4fba2d4da6a4b57ff2429126041c59ee83ad29886df71d70" + sha256 arm64_linux: "6edae24de2963c263914a334c7c7fee5c10b96f39af75a937df2bf8fff578a8f" + sha256 x86_64_linux: "d24c458654c45c7746615daf3627cd11c1a805ab2eac215f3d9c935575510a0b" + end + + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + args = %W[ + --prefix=#{prefix} + --disable-debug + --disable-profile + --disable-tests + --with-curl + --without-icu + --without-clucene + ] + + system "./configure", *args + system "make", "install" + end + + test do + # This will call sword's module manager to list remote sources. + # It should just demonstrate that the lib was correctly installed + # and can be used by frontends like installmgr. + system bin/"installmgr", "-s" + end +end diff --git a/Formula/s/swtpm.rb b/Formula/s/swtpm.rb new file mode 100644 index 0000000000000..cd059fac189db --- /dev/null +++ b/Formula/s/swtpm.rb @@ -0,0 +1,58 @@ +class Swtpm < Formula + desc "Software TPM Emulator based on libtpms" + homepage "https://github.com/stefanberger/swtpm" + url "https://github.com/stefanberger/swtpm/archive/refs/tags/v0.10.1.tar.gz" + sha256 "f8da11cadfed27e26d26c5f58a7b8f2d14d684e691927348906b5891f525c684" + license "BSD-3-Clause" + + bottle do + sha256 arm64_tahoe: "a461f024f4030423eaab2f9708d31ce40abed33ecacf79af52eed9c30685954f" + sha256 arm64_sequoia: "2b32d468bbe362aa59c40e0ca09cd222bff2e7ad0926f254805ff4988c0ee0a8" + sha256 arm64_sonoma: "bde6abef0af8f822719577619263e1f733d66fa8a6da8d5cc32fc08207bfcc0f" + sha256 arm64_ventura: "480984d30dc4d4dc8cb88e6c7e7c71061bc4f931a8185465e13857b25129f47b" + sha256 sonoma: "a784a5c3d7c831a4cc8715451633570f55666e9436628a8458b34bf7e2275fd2" + sha256 ventura: "8d49a8ca6833ae9af931a695bda0db32830abf0cdaf0938037efea28557c5952" + sha256 arm64_linux: "ea07d63f7e38a8724096a357f6bbc9cb2c16eb0cb8c3cba501d2bc0c77569370" + sha256 x86_64_linux: "a289daeb82cb654710fbfe43b9bd3d2f80a2eeee1c7f20d7d5481e7a3f1c1d3b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gawk" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "socat" => :build + depends_on "glib" + depends_on "gmp" + depends_on "gnutls" + depends_on "json-glib" + depends_on "libtasn1" + depends_on "libtpms" + depends_on "openssl@3" + + uses_from_macos "expect" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "libseccomp" + depends_on "net-tools" + end + + def install + system "./autogen.sh", "--with-openssl", *std_configure_args + system "make" + system "make", "install" + end + + test do + port = free_port + pid = spawn bin/"swtpm", "socket", "--ctrl", "type=tcp,port=#{port}" + sleep 10 + system bin/"swtpm_ioctl", "--tcp", "127.0.0.1:#{port}", "-s" + ensure + Process.wait pid + end +end diff --git a/Formula/s/syft.rb b/Formula/s/syft.rb new file mode 100644 index 0000000000000..bfc709e21b5ad --- /dev/null +++ b/Formula/s/syft.rb @@ -0,0 +1,45 @@ +class Syft < Formula + desc "CLI for generating a Software Bill of Materials from container images" + homepage "https://github.com/anchore/syft" + url "https://github.com/anchore/syft/archive/refs/tags/v1.37.0.tar.gz" + sha256 "1675952c61577db9c5435a8d8b830afe51a38dd35fe7360a8f5c39142908c906" + license "Apache-2.0" + head "https://github.com/anchore/syft.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0dc2769e843b98dfe46a57e7693a3e1ed17c2e995cfea467119b6522827239f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd33fd209933c9e40337b536833fb4d9ddc1ba42c1d2655b1de2e2f971a26f7e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5ccb2adbc065f73b729ac0a1979cb167e80d3ab783b4d4319045d503751d60c" + sha256 cellar: :any_skip_relocation, sonoma: "fbe33388a7df18cf37ebcbad6f29bd8b1fec6a79b1b67f2a4655a81486f2cd12" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3db0d03c72d0e57c93fcc8dfe44e033b485b38d5d3e5c45c1166722e31bcc1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f6fa00317e65d463f6a3a84360114095cf94b3d9aa1ddb19fd0be62ee99b73b" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.gitCommit=#{tap.user} + -X main.buildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/syft" + + generate_completions_from_executable(bin/"syft", "completion") + end + + test do + resource "homebrew-micronaut.cdx.json" do + url "https://raw.githubusercontent.com/anchore/syft/934644232ab115b2518acdb5d240ae31aaf55989/syft/pkg/cataloger/java/test-fixtures/graalvm-sbom/micronaut.json" + sha256 "c09171c53d83db5de5f2b9bdfada33d242ebf7ff9808ad2bd1343754406ad44e" + end + + testpath.install resource("homebrew-micronaut.cdx.json") + output = shell_output("#{bin}/syft convert #{testpath}/micronaut.json") + assert_match "netty-codec-http2 4.1.73.Final UnknownPackage", output + + assert_match version.to_s, shell_output("#{bin}/syft --version") + end +end diff --git a/Formula/s/sylph.rb b/Formula/s/sylph.rb new file mode 100644 index 0000000000000..a8a26c2645a52 --- /dev/null +++ b/Formula/s/sylph.rb @@ -0,0 +1,30 @@ +class Sylph < Formula + desc "Ultrafast taxonomic profiling and genome querying for metagenomic samples" + homepage "https://github.com/bluenote-1577/sylph" + url "https://github.com/bluenote-1577/sylph/archive/refs/tags/v0.9.0.tar.gz" + sha256 "c11fbe5720500c43e7102a359dd9ec59b09b93a15a8ce6f6a3bb917430c3059e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "65a5db917f22490e7ccfe1c708fbea9ef4e12d58e9e204f1be4cba864dfa5a9d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90e6499a3be2395901efaecb8b29f8afed13d73f43c15d2f85206975d971c98c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a96d1d8693721ee1e787c42758e4e50c30a8d63d3104e8a50709edf1ecc22ed5" + sha256 cellar: :any_skip_relocation, sonoma: "6558b4a6efc0fffea34185b1efd5930b6465b0020467815e923f436d5813b9cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "49a547053071374c6de1152c674611eaacf7ba5ca3b51eba8e0e286d20d207a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d5ab406da26adf6e3b73144a1bdce61fba7aeb84082691510fdb3254782d0d2" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + pkgshare.install "test_files" + end + + test do + cp_r pkgshare/"test_files/.", testpath + system bin/"sylph", "sketch", "o157_reads.fastq.gz" + assert_path_exists "o157_reads.fastq.gz.sylsp" + end +end diff --git a/Formula/s/sylpheed.rb b/Formula/s/sylpheed.rb new file mode 100644 index 0000000000000..b14f50ccf0155 --- /dev/null +++ b/Formula/s/sylpheed.rb @@ -0,0 +1,59 @@ +class Sylpheed < Formula + desc "Simple, lightweight email-client" + homepage "https://sylpheed.sraoss.jp/en/" + url "https://sylpheed.sraoss.jp/sylpheed/v3.7/sylpheed-3.7.0.tar.bz2" + sha256 "eb23e6bda2c02095dfb0130668cf7c75d1f256904e3a7337815b4da5cb72eb04" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later", "MIT", :public_domain] + revision 8 + + livecheck do + url "https://sylpheed.sraoss.jp/en/download.html" + regex(%r{stable.*?href=.*?/sylpheed[._-]v?(\d+(?:\.\d+)+)\.t}im) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "904952d738df66659a845da6b43e2489e4b8c65ac8c6680e999855c5f4460670" + sha256 arm64_sequoia: "486a0c588d0241a2cdbd2bdf9ffba966f207243abfde699f8353ff0c0fadd128" + sha256 arm64_sonoma: "bc084394ebc2781e0336e087aa640b7e7e750089f2ecc93a69c3f7d93b1b231c" + sha256 arm64_ventura: "46d1569258905a84d21de589cf4da12f8fe4a3b959dea2f0f368819e81fc58b9" + sha256 sonoma: "a6994106aad038ce6a2ab01a9618f7d273b0c934bc7951b41025dfc104f4fc7e" + sha256 ventura: "3536a1945677ffa298ce9811bc4d12046b767ca08e2d4420cd5b0d7de986513f" + sha256 arm64_linux: "75272179dc0352d0181a1617efa6cd7f00ee093145f43d15a327f1baab17e3c9" + sha256 x86_64_linux: "822cdb64a23e28873bc5171be5527d324ac69ab52f3c58f423df3ff90b94bc4a" + end + + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gpgme" + depends_on "gtk+" + depends_on "openssl@3" + depends_on "pango" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "libassuan" + depends_on "libgpg-error" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--disable-updatecheck", *std_configure_args + system "make", "install" + end + + test do + system bin/"sylpheed", "--version" + end +end diff --git a/Formula/s/symengine.rb b/Formula/s/symengine.rb new file mode 100644 index 0000000000000..58c4865aca486 --- /dev/null +++ b/Formula/s/symengine.rb @@ -0,0 +1,75 @@ +class Symengine < Formula + desc "Fast symbolic manipulation library written in C++" + homepage "https://www.sympy.org/en/index.html" + url "https://github.com/symengine/symengine/archive/refs/tags/v0.14.0.tar.gz" + sha256 "11c5f64e9eec998152437f288b8429ec001168277d55f3f5f1df78e3cf129707" + license "MIT" + revision 4 + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5f3a894c1f8ebf1564f60f7bea8e02011d7cf229fe2b686d2cb468246e885aa" + sha256 cellar: :any, arm64_sequoia: "a0cf67cc7e98d0210e0ad15eb15df2379d949bd235bc106e3035886e462f3c8a" + sha256 cellar: :any, arm64_sonoma: "08378ea3146241f35d24c636a298662accb539fbf4dfc8d87354f34121dc1564" + sha256 cellar: :any, arm64_ventura: "d21da6676835e70716720ce60994aaa9da2572239190d2f81cc1a2d7cc998902" + sha256 cellar: :any, sonoma: "74f49611791f1f42a6a89327abe809ec350292208998da0477079f5d0e677ce0" + sha256 cellar: :any, ventura: "bb74c79619f0b9482f97e8c413706fb0453cd07cc4133d6fe6ee2cd9a6247b32" + sha256 cellar: :any_skip_relocation, arm64_linux: "6af631f2626d92e9c222e48cd4ef7ac1a1896ca66b881f333a5caaecb42adabf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5b4460a315a637f02f4c68f666ed15684418ceaef2c575e56c68a268987849f" + end + + depends_on "cereal" => :build + depends_on "cmake" => :build + depends_on "flint" + depends_on "gmp" + depends_on "libmpc" + depends_on "llvm" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "z3" + end + + def install + llvm = deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+)?$/) } + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DWITH_GMP=ON", + "-DWITH_MPFR=ON", + "-DWITH_MPC=ON", + "-DINTEGER_CLASS=flint", + "-DWITH_LLVM=ON", + "-DWITH_COTIRE=OFF", + "-DLLVM_DIR=#{llvm.opt_lib}/cmake/llvm", + "-DWITH_SYMENGINE_THREAD_SAFE=ON", + "-DWITH_SYSTEM_CEREAL=ON", + *std_cmake_args + + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + using SymEngine::Expression; + int main() { + auto x=Expression('x'); + auto ex = x+sqrt(Expression(2))+1; + auto equality = eq(ex+1, expand(ex)); + return equality == true; + } + CPP + lib_flags = [ + "-L#{Formula["gmp"].opt_lib}", "-lgmp", + "-L#{Formula["mpfr"].opt_lib}", "-lmpfr", + "-L#{Formula["flint"].opt_lib}", "-lflint" + ] + system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-lsymengine", *lib_flags, "-o", "test" + + system "./test" + end +end diff --git a/Formula/s/symfony-cli.rb b/Formula/s/symfony-cli.rb new file mode 100644 index 0000000000000..6bdcba81cf2d5 --- /dev/null +++ b/Formula/s/symfony-cli.rb @@ -0,0 +1,31 @@ +class SymfonyCli < Formula + desc "Build, run, and manage Symfony applications" + homepage "https://github.com/symfony-cli/symfony-cli" + url "https://github.com/symfony-cli/symfony-cli/archive/refs/tags/v5.15.1.tar.gz" + sha256 "101ef843524db069d54a2b8653a4757c856c6f89e3a40f40c6be8ccd8176aef4" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "50bc76389f0a430737b4ff99113c5ac556673a6bf55b9479d80e3085465b1b73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "60cf00e9f23e0f44edbe30a563846d6b603e4b4a82af4ef905c3a463ddd8d46f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c61a25fdf65182a60801ee2c7fc104f1a923056009e6c21f24988ca1c716f939" + sha256 cellar: :any_skip_relocation, sonoma: "558004031692844577a3debc3a86d7ae49d108207a416825e39df7373f388438" + sha256 cellar: :any_skip_relocation, arm64_linux: "830600159c55497adf0a72437b8cad7db021b484e7650e160baa54a223534678" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf1f6c321b821551b6f6c053742a2a690d88026da44953afbc92786711895832" + end + + depends_on "go" => :build + depends_on "composer" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version} -X main.channel=stable", output: bin/"symfony") + end + + test do + system bin/"symfony", "new", "--no-git", testpath/"my_project" + assert_path_exists testpath/"my_project/symfony.lock" + output = shell_output("#{bin}/symfony -V") + assert_match version.to_s, output + assert_match "stable", output + end +end diff --git a/Formula/s/symlinks.rb b/Formula/s/symlinks.rb new file mode 100644 index 0000000000000..c92fa9f0c7443 --- /dev/null +++ b/Formula/s/symlinks.rb @@ -0,0 +1,34 @@ +class Symlinks < Formula + desc "Symbolic link maintenance utility" + homepage "https://github.com/brandt/symlinks" + url "https://github.com/brandt/symlinks/archive/refs/tags/v1.4.3.tar.gz" + sha256 "27105b2898f28fd53d52cb6fa77da1c1f3b38e6a0fc2a66bf8a25cd546cb30b2" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8dc7f7f7a34aca2effa06e21560ea6828e1cb4cfba15d877010545735a9ce9b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4f0d8f94815e056e274db19ee924739711eb18bc11909a6ea5faecf74826fd7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63775f3fb81a39f472e290b09fe8143ec432bbc19b800356e43b5314dc6d07a0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9565d0513b291d25891ab6192c318104007b8a450ebb8cb0e0367eee6732e17d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "be3cc7375c33600fc1bc7c4b9a4bc0987013738ae1b5986a40f12eb3ef47a31e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "12782096332429fbdcb34f1c3efa2bb1a53271498a9ae54a1ff2b2fd2ba54ed1" + sha256 cellar: :any_skip_relocation, sonoma: "1826aa18c112a7209293d848271769bb1e055ba2ed30fa344f3f25cbba79a211" + sha256 cellar: :any_skip_relocation, ventura: "0efd028e16901e24ae61617b66099a2da58b5b1b0c7f24300b2d12b7e37c922b" + sha256 cellar: :any_skip_relocation, monterey: "bbf388e44afd53159ccc8918b7cf97605d2fd002cf80ce525bc76ea37cb13aeb" + sha256 cellar: :any_skip_relocation, big_sur: "1f63fc62ca034e2d55e31d089c54dc65c4cd51a3caa0d58afe2da171482d66fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "9775f41fa313f392bd41d105655066f62d1e76865fd0979654248ec94237b802" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba93ffe41e5f1aa71ca91847cb66bbe80906efc78b8c1cf008ce312681aecb64" + end + + def install + system "make", "install" + bin.install "symlinks" + man8.install "symlinks.8" + end + + test do + assert_match "->", shell_output("#{bin}/symlinks -v #{__dir__}/../../Aliases") + end +end diff --git a/Formula/s/synchrony.rb b/Formula/s/synchrony.rb new file mode 100644 index 0000000000000..d8570e4a31355 --- /dev/null +++ b/Formula/s/synchrony.rb @@ -0,0 +1,32 @@ +class Synchrony < Formula + desc "Simple deobfuscator for mangled or obfuscated JavaScript files" + homepage "https://deobfuscate.relative.im/" + url "https://registry.npmjs.org/deobfuscator/-/deobfuscator-2.4.5.tgz" + sha256 "feca0c36e1efe029827f2cb44d206c9e32751f207dae25ca5a93a4e6fe21388d" + license "GPL-3.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "da3ca86b921e8277e72a226e53380a3baa661e6e09c9658231b4ab6a5b53569f" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + resource "test-file" do + url "https://gist.github.com/relative/79e392bced4b9bed8fd076f834e06dee/raw/obfuscated.js" + sha256 "01058a548c9beb1df0586ddb30ca88256b15dba4bd5b95ddf90541dbaceef0b0" + end + + testpath.install resource("test-file") + system bin/"synchrony", "deobfuscate", "obfuscated.js" + assert_match "console.log('test message');", (testpath/"obfuscated.cleaned.js").read + + assert_match version.to_s, shell_output("#{bin}/synchrony --version") + end +end diff --git a/Formula/s/syncthing.rb b/Formula/s/syncthing.rb new file mode 100644 index 0000000000000..599e5603d3c47 --- /dev/null +++ b/Formula/s/syncthing.rb @@ -0,0 +1,46 @@ +class Syncthing < Formula + desc "Open source continuous file synchronization application" + homepage "https://syncthing.net/" + url "https://github.com/syncthing/syncthing/archive/refs/tags/v2.0.11.tar.gz" + sha256 "d873960f3c85a9141189e76d680e02b36b6e988480aea03697bac244ec848864" + license "MPL-2.0" + head "https://github.com/syncthing/syncthing.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "73f99357feaec15c751a6eb497354e6970b2a5ffb83cc954864fbab60c2727d9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "21b3d61f3a339d61f125c3067882106f2b469fd880014403369de588dd8bb290" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1fa2ee95fbeec32096915e3cf3d6325d1aac6de4c6004bb91f9b50e93f2ae103" + sha256 cellar: :any_skip_relocation, sonoma: "1a554a5ec3ae39a901a6a9499af39e7d3ce8c351be076b43d7670a3def4d4ff8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ac466e58f9e4ea26cfcdada1685f4d52d268833843215b8c2e947dc26e92852" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c0e9971880c13f0d7fd932bfbc732dce4e58ef90a32785f92729dc7653e5a09" + end + + depends_on "go" => :build + + def install + build_version = build.head? ? "v0.0.0-#{version}" : "v#{version}" + system "go", "run", "build.go", "--version", build_version, "--no-upgrade", "tar" + bin.install "syncthing" + + man1.install Dir["man/*.1"] + man5.install Dir["man/*.5"] + man7.install Dir["man/*.7"] + end + + service do + run [opt_bin/"syncthing", "--no-browser", "--no-restart"] + keep_alive true + log_path var/"log/syncthing.log" + error_log_path var/"log/syncthing.log" + end + + test do + assert_match "syncthing v#{version} ", shell_output("#{bin}/syncthing version") + system bin/"syncthing", "generate" + end +end diff --git a/Formula/s/synergy-core.rb b/Formula/s/synergy-core.rb new file mode 100644 index 0000000000000..fc50e1bdd4d4c --- /dev/null +++ b/Formula/s/synergy-core.rb @@ -0,0 +1,200 @@ +class SynergyCore < Formula + desc "Synergy, the keyboard and mouse sharing tool" + homepage "https://symless.com/synergy" + url "https://github.com/symless/synergy/archive/refs/tags/v1.19.0.tar.gz" + sha256 "c18750b6d6b217f8439199ac90bb4633ef0611d4a962a383c6b424a984f388fa" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + head "https://github.com/symless/synergy-core.git", branch: "master" + + # This repository contains old 2.0.0 tags, one of which uses a stable tag + # format (`v2.0.0-stable`), despite being marked as "pre-release" on GitHub. + # The `GithubLatest` strategy is used to avoid these old tags without having + # to worry about missing a new 2.0.0 version in the future. + livecheck do + url :stable + regex(/[^"' >]*?v?(\d+(?:\.\d+)+)[^"' >]*?/i) + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "84cbe86fc9c9078649380899f5efe79f500b8816ad5d0f0f6a78526328959092" + sha256 cellar: :any, arm64_sequoia: "08d10a75a4b369dd67bd04159a660d6d8ebed3a3934ecd062fae29d3afd42b51" + sha256 cellar: :any, arm64_sonoma: "76bc87f5bedbb52183aca4f452a49a184a217a53a4f713dc1279c48882a1073c" + sha256 cellar: :any, sonoma: "6ba729c50b1ce75370f5340183f96167daff313757d879983a4d718456717a7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2de649fe317a78e508e01f46ecd37dd9c35b15d2706ee7f4efbb537603aa67fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aec5aca73d1ddde4e6b4c708d0a9038d2b189b078699aa946279f6a41cd1de94" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "qtbase" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1402 + end + + on_linux do + depends_on "pkgconf" => :build + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "libnotify" + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxkbfile" + depends_on "libxrandr" + depends_on "libxtst" + end + + fails_with :clang do + build 1402 + cause "needs `std::ranges::find`" + end + + resource "synergy-extra" do + url "https://github.com/symless/synergy-extra.git", + revision: "e68812d06139df5b836f361047a68f8c86efac17" + + # Version.cmake in `synergy-extra` reads .git folder of `synergy`. + # but it's submodule uses ssh protocol which will be failed in CI + # and so we use tarball of `synergy` and apply patch to ignore git process + patch :DATA + end + + def install + # Avoid statically linking OpenSSL on macOS + inreplace "cmake/Libraries.cmake", "set(OPENSSL_USE_STATIC_LIBS TRUE)", "" + + mkdir_p buildpath/"ext/synergy-extra" + (buildpath/"ext/synergy-extra").install resource("synergy-extra") + + if OS.mac? + ENV.llvm_clang if DevelopmentTools.clang_build_version <= 1402 + # Disable macdeployqt to prevent copying dylibs. + inreplace "src/gui/CMakeLists.txt", + /"execute_process\(COMMAND \${MACDEPLOYQT_CMD}.*\)"/, + '"MESSAGE (\\"Skipping macdeployqt in Homebrew\\")"' + end + + args = %w[ + -DBUILD_TESTS:BOOL=OFF + -DSYNERGY_VERSION_RELEASE=ON + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + if OS.mac? + prefix.install buildpath/"build/bundle" + bin.install_symlink prefix/"bundle/Synergy.app/Contents/MacOS/synergy" # main GUI program + bin.install_symlink prefix/"bundle/Synergy.app/Contents/MacOS/synergy-server" # server + bin.install_symlink prefix/"bundle/Synergy.app/Contents/MacOS/synergy-client" # client + end + end + + service do + run [opt_bin/"synergy"] + run_type :immediate + end + + def caveats + # Because we used `license :cannot_represent` above, tell the user how to + # read the license. + s = <<~EOS + Read the synergy-core license here: + #{opt_prefix}/LICENSE + EOS + # The binaries built by brew are not signed by a trusted certificate, so the + # user may need to revoke all permissions for 'Accessibility' and re-grant + # them when upgrading synergy-core. + on_macos do + s += "\n" + <<~EOS + Synergy requires the 'Accessibility' permission. + You can grant this permission by navigating to: + System Preferences -> Security & Privacy -> Privacy -> Accessibility + + If Synergy still doesn't work, try clearing the 'Accessibility' list: + sudo tccutil reset Accessibility + You can then grant the 'Accessibility' permission again. + You may need to clear this list each time you upgrade synergy-core. + EOS + # On ARM, macOS is even more picky when dealing with applications not signed + # by a trusted certificate, and, for whatever reason, both the app bundle and + # the actual executable binary need to be granted the permission by the user. + # (On Intel macOS, only the app bundle needs to be granted the permission.) + # + # This is particularly unfortunate because the operating system will prompt + # the user to grant the permission to the app bundle, but will *not* prompt + # the user to grant the permission to the executable binary, even though the + # application will not actually work without doing both. Hence, this caveat + # message is important. + on_arm do + s += "\n" + <<~EOS + On ARM macOS machines, the 'Accessibility' permission must be granted to + both of the following two items: + (1) #{opt_prefix}/bundle/Synergy.app + (2) #{opt_bin}/synergy + EOS + end + end + s + end + + test do + version_string = version.major_minor_patch.to_s + assert_match(/synergy-server v#{version_string}.*, protocol v/, + shell_output("#{opt_bin}/synergy-server --version")) + assert_match(/synergy-client v#{version_string}.*, protocol v/, + shell_output("#{opt_bin}/synergy-client --version")) + + assert_match "synergy-server: failed to load config", + shell_output("#{opt_bin}/synergy-server 2>&1", 4) + assert_match "synergy-client: a server address or name is required", + shell_output("#{opt_bin}/synergy-client 2>&1", 3) + end +end + +__END__ +diff --git a/cmake/Version.cmake b/cmake/Version.cmake +index 0ea44d0..392f6a0 100644 +--- a/cmake/Version.cmake ++++ b/cmake/Version.cmake +@@ -51,36 +51,6 @@ function(version_from_git_tags VERSION VERSION_MAJOR VERSION_MINOR VERSION_PATCH + set(minor_match "${CMAKE_MATCH_2}") + set(patch_match "${CMAKE_MATCH_3}") + +- set(git_path "${CMAKE_CURRENT_SOURCE_DIR}/.git") +- if(NOT EXISTS ${git_path}) +- message(FATAL_ERROR "Not a Git repository: ${git_path}") +- endif() +- +- find_package(Git) +- if(NOT GIT_FOUND) +- message(FATAL_ERROR "Git not found") +- endif() +- message(VERBOSE "Git repo: " ${CMAKE_CURRENT_SOURCE_DIR}) +- +- # Creating a release tag through the GitHub UI creates a lightweight tag, so use --tags +- # to include lightweight tags in the search. +- execute_process( +- COMMAND ${GIT_EXECUTABLE} describe origin/master --tags --long --match "v[0-9]*" +- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" +- OUTPUT_VARIABLE git_describe +- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE +- ) +- if (NOT git_describe) +- message(FATAL_ERROR "No version tags found in the Git repository") +- endif() +- message(VERBOSE "Git describe: " ${git_describe}) +- +- string(REGEX REPLACE ".*-([0-9]+)-g.*" "\\1" rev_count ${git_describe}) +- if ("${rev_count}" STREQUAL "") +- message(FATAL_ERROR "No revision count found in Git describe output") +- endif() +- message(VERBOSE "Changes since last tag: " ${rev_count}) +- + if (SYNERGY_VERSION_RELEASE) + + message(VERBOSE "Version is release") diff --git a/Formula/s/synfig.rb b/Formula/s/synfig.rb new file mode 100644 index 0000000000000..8239d6dc48f88 --- /dev/null +++ b/Formula/s/synfig.rb @@ -0,0 +1,105 @@ +class Synfig < Formula + desc "Command-line renderer" + homepage "https://www.synfig.org/" + # TODO: Update livecheck to track only stable releases when 1.6.x is available. + url "https://github.com/synfig/synfig/releases/download/v1.5.3/synfig-1.5.3.tar.gz" + sha256 "913c9cee6e5ad8fd6db3b3607c5b5ae0312f9ee6720c60619e3a97da98501ea8" + license "GPL-3.0-or-later" + revision 4 + head "https://github.com/synfig/synfig.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "2949d65a521165cb25962acc9d6e3090d6c07e2b64ab9406857a180646d8503c" + sha256 arm64_sequoia: "4469396d620f5628369b249c7c1061acf8c3440efc9ed983524ef5984d8af706" + sha256 arm64_sonoma: "ef3a37a8ab7358f2ab0f9f57a8175e1a769d33c6828545f8ebf38e5dedb427b8" + sha256 arm64_ventura: "68483a37438ba702052fa92732b2728b9be185f2568a1e67a32a8a19f407f63f" + sha256 sonoma: "c6fc59da6e3a82ea0b1ba17e8122d84b24ec9eab7fade3663925c557e40b6ac8" + sha256 ventura: "92e95f7a48ffe21f00ca3df61e3bbe048e7687420f173c6e0e52b82f5aefe66b" + sha256 arm64_linux: "7f81f123950068165ecf54cede5508aa8c5489001bac5c8676556b0acd027d15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0538580f2f6c5deb7a0b6cc1225db0403eb24df11182224ed8ab584a743263f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "cairo" + depends_on "etl" + depends_on "ffmpeg" + depends_on "fftw" + depends_on "fontconfig" + depends_on "freetype" + depends_on "fribidi" + depends_on "gettext" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "harfbuzz" + depends_on "imagemagick" + depends_on "imath" + depends_on "libmng" + depends_on "libpng" + depends_on "libsigc++@2" + depends_on "libtool" + depends_on "libxml++" + depends_on "mlt" + depends_on "openexr" + depends_on "pango" + + uses_from_macos "perl" => :build + uses_from_macos "zlib" + + on_macos do + depends_on "liblqr" + depends_on "libomp" + depends_on "little-cms2" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + ENV.cxx11 + + # Workaround to fix error: a template argument list is expected after + # a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] + # PR ref: https://github.com/synfig/synfig/pull/3559 + if DevelopmentTools.clang_build_version >= 1700 + ENV.append_to_cflags "-Wno-missing-template-arg-list-after-template-kw" + end + + # missing install-sh in the tarball, and re-generate configure script + # upstream bug report, https://github.com/synfig/synfig/issues/3398 + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", "--disable-silent-rules", + "--without-jpeg", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main(int argc, char *argv[]) + { + const char *version = synfig::get_version(); + return 0; + } + CPP + + pkgconf_flags = shell_output("pkgconf --cflags --libs libavcodec synfig").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *pkgconf_flags + system "./test" + end +end diff --git a/Formula/s/synscan.rb b/Formula/s/synscan.rb new file mode 100644 index 0000000000000..cfd0c8a1684f8 --- /dev/null +++ b/Formula/s/synscan.rb @@ -0,0 +1,50 @@ +class Synscan < Formula + desc "Asynchronous half-open TCP portscanner" + homepage "https://digit-labs.org/files/tools/synscan/" + url "https://digit-labs.org/files/tools/synscan/releases/synscan-5.02.tar.gz" + sha256 "c4e6bbcc6a7a9f1ea66f6d3540e605a79e38080530886a50186eaa848c26591e" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?synscan[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "377c4e84126ddf0320b437927b8c7274bf0429aa68862b4b46187b1572a11d6a" + sha256 cellar: :any, arm64_sequoia: "5c810311391581f8e9c6c8638d6e11c467198c36c9ebe08ee2f7a25da0d19636" + sha256 cellar: :any, arm64_sonoma: "42ea1012c638a378b12bd8966916393692e227186e424c06385cc32ed0f27680" + sha256 cellar: :any, arm64_ventura: "452098c37c8f4161baa099c7bdf5681453505c53a6b0cb08d2d84f4691fda6a4" + sha256 cellar: :any, arm64_monterey: "a396a4340087cff3494d296c0134cb4089b02b181e6757e01c2428685d12a516" + sha256 cellar: :any, arm64_big_sur: "86677760d68a0a9efc11560003b4291ff8510b55a03f76a06916c989ec1aa428" + sha256 cellar: :any, sonoma: "afd77d2ccf5cd89e3143cfe7046ff6d17d1ec67629513a773a6f8969723ecad5" + sha256 cellar: :any, ventura: "d97475a0355c1b1a01c782fccbcd46c27ec12b622e8866d0137f02e5ed4a9166" + sha256 cellar: :any, monterey: "69aeb3d3c862761b228189eeed429dc25a5786f24cebe108cdc1dead01e0aeaf" + sha256 cellar: :any, big_sur: "df49f836a6552dfba8d127e53d4a87cf50030c63ab906dd1f5c40f549d32bf86" + sha256 cellar: :any, catalina: "0e99e8f964f270377bd7dc6c0ecfae64682f3b2831776d7723f200c159623ac6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a54e6111c8971ea407b04134141a081f98f69666757a961f211b6ebcedfce707" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f3f43c87b2ace513582f4ac1b91374ca102a2ab8d0cbcad314d71cafb3f0c62" + end + + depends_on "libpcap" + + def install + # Ideally we pass the prefix into --with-libpcap, but that option only checks "flat" + # i.e. it only works if the headers and libraries are in the same directory. + ENV.append_to_cflags "-I#{Formula["libpcap"].opt_include}" + ENV.append "LIBS", "-L#{Formula["libpcap"].opt_lib} -lpcap" + system "./configure", "--prefix=#{prefix}", + "--with-libpcap=yes" + + target = OS.mac? ? "macos" : OS.kernel_name.downcase + system "make", target + system "make", "install" + end + + test do + system bin/"synscan", "-V" + end +end diff --git a/Formula/s/syntaxerl.rb b/Formula/s/syntaxerl.rb new file mode 100644 index 0000000000000..361687bc6146c --- /dev/null +++ b/Formula/s/syntaxerl.rb @@ -0,0 +1,42 @@ +class Syntaxerl < Formula + desc "Syntax checker for Erlang code and config files" + homepage "https://github.com/ten0s/syntaxerl" + url "https://github.com/ten0s/syntaxerl/archive/refs/tags/0.15.0.tar.gz" + sha256 "61d2d58e87a7a5eab1f58c5857b1a9c84a091d18cd683385258c3c0d7256eb64" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b89005e55db2bd8c5e4f17cb921180b4795622abf46dfc4b1dd11997ceac389" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "33837e94cbdb2721705f5fe69069caabf858455790d9bc7d47c2d73d8f035120" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cee18e0e209e6dba8a575cf868e38cbaf37fb17d5d6d1c4bf893b73a26e8c14e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8b0d346a0d701c3146aa9c6beedf9122be2efd84112b78b05d07e45d343cb00" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3b345b0ceabb3e230634ef5f9d8fe3bfee1500f94dc94a79b504bbf6173a6758" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ab2fde926ac270aa052a969bef6b5a41deed043b9ca49255c77f6d4ec94d9041" + sha256 cellar: :any_skip_relocation, sonoma: "655d5e3edb476b65f80b386a9ac7814b7b43442975915a6b8fffc17fba925b95" + sha256 cellar: :any_skip_relocation, ventura: "9cc0483c3b108df574160bd98eb42cbfc72567e59fdefa71dc2998b45b2b65b5" + sha256 cellar: :any_skip_relocation, monterey: "a534cfe8a626f0021cbb59bc36be178167b074b8305d4d56b7e38b6501735cc5" + sha256 cellar: :any_skip_relocation, big_sur: "ba352469157bac0b0645fc0a2cfc1ec738487e2fbf3f6e9c5842c8ce9d4e5a0c" + sha256 cellar: :any_skip_relocation, catalina: "1d83b5507f1a4f1ac6ae3a09ae41056ab6588caab3d0737ac3707384faa45770" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3792b0b05a830c36ed6a28b97f976ce2398806da5ac62f430eadc23bfd5423a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e47e3fbad8b97527b59bf69db9d9d765e04352e6a408827bd995091f6400f65" + end + + depends_on "rebar3" => :build + depends_on "erlang" + + def install + system "make", "REBAR3=#{which("rebar3")}" + bin.install "_build/default/bin/syntaxerl" + end + + test do + (testpath/"app.config").write "[{app,[{arg1,1},{arg2,2}]}]." + assert_empty shell_output("#{bin}/syntaxerl #{testpath}/app.config") + + (testpath/"invalid.config").write "][" + assert_match "invalid.config:1: syntax error before: ']'", + shell_output("#{bin}/syntaxerl #{testpath}/invalid.config", 1) + end +end diff --git a/Formula/s/sysaidmin.rb b/Formula/s/sysaidmin.rb new file mode 100644 index 0000000000000..363050cade12a --- /dev/null +++ b/Formula/s/sysaidmin.rb @@ -0,0 +1,205 @@ +class Sysaidmin < Formula + include Language::Python::Virtualenv + + desc "GPT-powered sysadmin" + homepage "https://github.com/skorokithakis/sysaidmin" + url "https://files.pythonhosted.org/packages/01/d8/f2b32cc85a544d1487bbdda7ec48d214c0e551d2d0ae6bbbb49d707fe297/sysaidmin-0.2.5.tar.gz" + sha256 "77c40710cead7bdcc6cb98b38d74dd05e1e1c24dbc450e3b983869a7c06da91f" + license "AGPL-3.0-or-later" + revision 6 + + bottle do + sha256 cellar: :any, arm64_tahoe: "0db4e0b3b5bbe3dc2fbe6788808ea4748a973166a955e3741a3f2e3804643481" + sha256 cellar: :any, arm64_sequoia: "4d32690cd4aa3a1a15b28ff5fc473c445320227ecd7bf42b887d618a4fe0f802" + sha256 cellar: :any, arm64_sonoma: "3197a79c74b96cfb0b59e1b20dfdf70013aac8f17d3e80ec6790da8d1c9d7b15" + sha256 cellar: :any, sonoma: "fe8a86aca7e8ef9b83c3e67f39e1503a3c44fe97a79a6369543d86ff0d18278c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5e87f52e54de40f42ab88cfd8e59f0cd5b88cfba0a628e24a25ebdbbc244e39" + sha256 cellar: :any_skip_relocation, x86_64_linux: "007473f1925416a41ed44c32f92a079f650b1b0cc165ee12b99b8490f8311b3d" + end + + depends_on "rust" => :build # for jiter + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "pydantic-core", "rpds-py"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "griffe" do + url "https://files.pythonhosted.org/packages/ec/d7/6c09dd7ce4c7837e4cdb11dce980cb45ae3cd87677298dc3b781b6bce7d3/griffe-1.14.0.tar.gz" + sha256 "9d2a15c1eca966d68e00517de5d69dd1bc5c9f2335ef6c1775362ba5b8651a13" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "httpx-sse" do + url "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz" + sha256 "9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/a3/68/0357982493a7b20925aece061f7fb7a2678e3b232f8d73a6edb7e5304443/jiter-0.11.1.tar.gz" + sha256 "849dcfc76481c0ea0099391235b7ca97d7279e0fa4c86005457ac7c88e8b76dc" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/69/2b/916852a5668f45d8787378461eaa1244876d77575ffef024483c94c0649c/mcp-1.19.0.tar.gz" + sha256 "213de0d3cd63f71bc08ffe9cc8d4409cc87acffd383f6195d2ce0457c021b5c1" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/c4/44/303deb97be7c1c9b53118b52825cbd1557aeeff510f3a52566b1fa66f6a2/openai-2.6.1.tar.gz" + sha256 "27ae704d190615fca0c0fc2b796a38f8b5879645a3a52c9c453b23f97141bb49" + end + + resource "openai-agents" do + url "https://files.pythonhosted.org/packages/2d/8e/71fd262046587a5b2b097aec6ce677f7bb23c81b3129da31942b7a0d0b26/openai_agents-0.4.2.tar.gz" + sha256 "281caff839b3ab2cf3bc52110abe93caca004985c41bf07de8e60d03c4a7528e" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz" + sha256 "d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "python-multipart" do + url "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz" + sha256 "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "sse-starlette" do + url "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz" + sha256 "ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/1b/3f/507c21db33b66fb027a332f2cb3abbbe924cc3a79ced12f01ed8645955c9/starlette-0.49.1.tar.gz" + sha256 "481a43b71e24ed8c43b11ea02f5353d77840e01480881b8cb5a26b8cae64a8cb" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "types-requests" do + url "https://files.pythonhosted.org/packages/36/27/489922f4505975b11de2b5ad07b4fe1dca0bca9be81a703f26c5f3acfce5/types_requests-2.32.4.20250913.tar.gz" + sha256 "abd6d4f9ce3a9383f269775a9835a4c24e5cd6b9f647d64f88aa4613c33def5d" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/sysaidmin --version") + + ENV["SYSAIDMIN_API_KEY"] = "faketest" + # $ sysaidmin "The foo process is emailing me and I don't know why." + output = shell_output("#{bin}/sysaidmin 'The foo process is emailing me and I dont know why.' 2>&1", 1) + assert_match "Incorrect API key provided", output + end +end diff --git a/Formula/s/sysbench.rb b/Formula/s/sysbench.rb new file mode 100644 index 0000000000000..878809cbe9471 --- /dev/null +++ b/Formula/s/sysbench.rb @@ -0,0 +1,42 @@ +class Sysbench < Formula + desc "System performance benchmark tool" + homepage "https://github.com/akopytov/sysbench" + url "https://github.com/akopytov/sysbench/archive/refs/tags/1.0.20.tar.gz" + sha256 "e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f" + license "GPL-2.0-or-later" + revision 7 + head "https://github.com/akopytov/sysbench.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "aa75335616225f72f89bf9b8f75175f5eafaa320ec768c1a7fddcb0fc1fd8bff" + sha256 cellar: :any, arm64_sequoia: "58353cd8988e133b4dfa59be80204cf6968ab6a733f9da7b3a53f561b74c4a20" + sha256 cellar: :any, arm64_sonoma: "88b6daa8909f7deca820c79d70651675e73bab3bf25e431ba72967ae78a932bb" + sha256 cellar: :any, arm64_ventura: "ae000c8446a05ac27b143521afa5c0cb27d6f2fd85985a6b829f2d4c5983c8ef" + sha256 cellar: :any, sonoma: "6dc4d175800e0e93778a1d90ef77640a6678f6724f0aa3760aed0fb101c80ba3" + sha256 cellar: :any, ventura: "276837830f7c80059028dc02664bed943a465041127d6c9c09faaa3a00c1f837" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a803836fb5e79e81b0b9dbd6d5104773e0b888f7e45986e03e586b2c6e4eb79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b1d4498974cb5820ef3e1d532ae7ba041a7d201583c363d98674771caeacc7f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libpq" + depends_on "luajit" + depends_on "mariadb-connector-c" + + uses_from_macos "vim" # needed for xxd + + def install + system "./autogen.sh" + system "./configure", "--with-mysql", "--with-pgsql", "--with-system-luajit", *std_configure_args + system "make", "install" + end + + test do + system bin/"sysbench", "--test=cpu", "--cpu-max-prime=1", "run" + end +end diff --git a/Formula/s/sysdig.rb b/Formula/s/sysdig.rb new file mode 100644 index 0000000000000..dca0be931c54f --- /dev/null +++ b/Formula/s/sysdig.rb @@ -0,0 +1,70 @@ +class Sysdig < Formula + desc "System-level exploration and troubleshooting tool" + homepage "https://sysdig.com/" + url "https://github.com/draios/sysdig/archive/refs/tags/0.40.1.tar.gz" + sha256 "f4d465847ba8e814958b5f5818f637595f3d78ce93dbc3b8ff3ee65a80a9b90f" + license "Apache-2.0" + head "https://github.com/draios/sysdig.git", branch: "dev" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "d1b3f22b0b9178be9d03e6c9daca0ea93839caf99c7c83f5ee9c0701dfa12397" + sha256 arm64_sequoia: "1d74a1743a589ba247d4418317ab1bf2e37841f23287196591870b64456dd905" + sha256 arm64_sonoma: "5416d6073f468637103ca9339dfeebbd4fc20dd35987081fd2cc0cd0afe39033" + sha256 arm64_ventura: "e65cd00a0b2a04345e83ef69050785bdf90387a1a0e8d0f3e959e9161319462d" + sha256 sonoma: "4d98a1b66242689aad51ad2b449963c912588d9e0ce2bf54a5e8315d4c777f88" + sha256 ventura: "ee53edd8462e80357fff2ffbd899fe170e73e641fe1b7e811e33ac3b64546705" + sha256 arm64_linux: "2247387a66aef0547cde9bdbb2175359c76630a2e1f5eb07069ed8574c481126" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ff8e6dad512d69e79be769177d8bdd78e0b506d5b622d320c6855e1d4b5cc71" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + depends_on "falcosecurity-libs" + depends_on "jsoncpp" + depends_on "luajit" + depends_on "ncurses" # for `newterm` function + depends_on "yaml-cpp" + + on_macos do + depends_on "re2" + depends_on "tbb" + end + + link_overwrite "etc/bash_completion.d/sysdig" + + def install + # Workaround to find some headers + # TODO: Fix upstream to use standard paths, e.g. sinsp.h -> libsinsp/sinsp.h + ENV.append_to_cflags "-I#{Formula["falcosecurity-libs"].opt_include}/falcosecurity/libsinsp" + ENV.append_to_cflags "-I#{Formula["falcosecurity-libs"].opt_include}/falcosecurity/driver" if OS.linux? + + # Keep C++ standard in sync with `abseil.rb`. + args = %W[ + -DSYSDIG_VERSION=#{version} + -DUSE_BUNDLED_DEPS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # More info on https://gist.github.com/juniorz/9986999 + resource "homebrew-sample_file" do + url "https://gist.githubusercontent.com/juniorz/9986999/raw/a3556d7e93fa890a157a33f4233efaf8f5e01a6f/sample.scap" + sha256 "efe287e651a3deea5e87418d39e0fe1e9dc55c6886af4e952468cd64182ee7ef" + end + + testpath.install resource("homebrew-sample_file").files("sample.scap") + output = shell_output("#{bin}/sysdig --read=#{testpath}/sample.scap") + assert_match "/tmp/sysdig/sample", output + end +end diff --git a/Formula/s/syslog-ng.rb b/Formula/s/syslog-ng.rb new file mode 100644 index 0000000000000..a607eeeeae73b --- /dev/null +++ b/Formula/s/syslog-ng.rb @@ -0,0 +1,90 @@ +class SyslogNg < Formula + include Language::Python::Virtualenv + + desc "Log daemon with advanced processing pipeline and a wide range of I/O methods" + homepage "https://www.syslog-ng.com" + url "https://github.com/syslog-ng/syslog-ng/releases/download/syslog-ng-4.10.1/syslog-ng-4.10.1.tar.gz" + sha256 "dea90cf1dc4b8674ff191e0032f9dabc24b291abfd7f110fd092ae5f21cde5d7" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + revision 2 + head "https://github.com/syslog-ng/syslog-ng.git", branch: "develop" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "db706c7197e01a1008d24b0cf828ddb44e351f3d98e74c05974c18aece99da07" + sha256 arm64_sequoia: "0cc1b38c887749ee26090ad773a58fd599ef0631908997d4230c5f78cb7c0496" + sha256 arm64_sonoma: "a500f9e6e24c1dace649fed7550ce6780675e8339c90dd409f9dda4b518e78c1" + sha256 sonoma: "36faa8f15e5ceb9cd215a0fe33ed4b5cf6b80c2733e7bc9163688872c1b65311" + sha256 arm64_linux: "2027333b99008c25501bd9c2f0db376fcec3c690c6a12baa2269ce45fae5c860" + sha256 x86_64_linux: "12d0ca4dea71fa43f57dfb12002d53fb97c63d6ae7c4470cbaaa31d7f5251e0d" + end + + depends_on "pkgconf" => :build + + depends_on "abseil" + depends_on "glib" + depends_on "grpc" + depends_on "hiredis" + depends_on "ivykis" + depends_on "json-c" + depends_on "libdbi" + depends_on "libmaxminddb" + depends_on "libnet" + depends_on "libpaho-mqtt" + depends_on "librdkafka" + depends_on "mongo-c-driver" + depends_on "net-snmp" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "protobuf" + depends_on "python@3.14" + depends_on "rabbitmq-c" + depends_on "riemann-client" + + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + end + + def install + ENV["VERSION"] = version + + # Workaround to allow Python 3.13+ + inreplace "requirements.txt", "PyYAML==6.0.1", "PyYAML==6.0.2" + + python3 = "python3.14" + venv = virtualenv_create(libexec, python3) + # FIXME: we should use resource blocks but there is no upstream pip support besides this requirements.txt + # https://github.com/syslog-ng/syslog-ng/blob/master/requirements.txt + args = std_pip_args(prefix: false, build_isolation: true).reject { |s| s["--no-deps"] } + system python3, "-m", "pip", "--python=#{venv.root}/bin/python", + "install", *args, "--requirement=#{buildpath}/requirements.txt" + + ENV.append "CXXFLAGS", "-std=c++17" + + system "./configure", "--disable-silent-rules", + "--enable-all-modules", + "--sysconfdir=#{pkgetc}", + "--localstatedir=#{var/name}", + "--with-ivykis=system", + "--with-python=#{Language::Python.major_minor_version python3}", + "--with-python-venv-dir=#{venv.root}", + "--disable-example-modules", + "--disable-java", + "--disable-java-modules", + "--disable-smtp", + *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{sbin}/syslog-ng --version") + assert_equal "syslog-ng #{version.major} (#{version})", output.lines.first.chomp + system sbin/"syslog-ng", "--cfgfile=#{pkgetc}/syslog-ng.conf", "--syntax-only" + end +end diff --git a/Formula/s/sysprof.rb b/Formula/s/sysprof.rb new file mode 100644 index 0000000000000..89aa916ad3deb --- /dev/null +++ b/Formula/s/sysprof.rb @@ -0,0 +1,70 @@ +class Sysprof < Formula + desc "Statistical, system-wide profiler" + homepage "https://gitlab.gnome.org/GNOME/sysprof" + url "https://download.gnome.org/sources/sysprof/49/sysprof-49.0.tar.xz" + sha256 "ff04139637785c841948862087a4323b981680d942296409321b574fcb282878" + # See Debian's Copyright File. https://metadata.ftp-master.debian.org/changelogs//main/s/sysprof/sysprof_47.0-2_copyright + license all_of: [ + "GPL-2.0-or-later", + "GPL-3.0-or-later", + "LGPL-2.0-or-later", + "LGPL-3.0-or-later", + "BSD-2-Clause-Patent", + "BSD-3-Clause", + :public_domain, + ] + head "https://gitlab.gnome.org/GNOME/sysprof.git", branch: "master" + + bottle do + sha256 arm64_linux: "f86b86f27faf1a06342ac5f68267ba53f0d0f2c30efd381e2d634d1cfa7429fc" + sha256 x86_64_linux: "19c001e65978cce0e22e3bb1880e986747bcb467124195ae9fd58e994c388449" + end + + depends_on "desktop-file-utils" => :build + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "elfutils" + depends_on "glib" + depends_on "graphene" + depends_on "gtk4" + depends_on "hicolor-icon-theme" + depends_on "json-glib" + depends_on "libadwaita" + depends_on "libdex" + depends_on "libpanel" + depends_on "libunwind" + depends_on :linux + depends_on "pango" + depends_on "polkit" + depends_on "systemd" + + def install + ENV.prepend_path "XDG_DATA_DIRS", HOMEBREW_PREFIX/"share" + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", + "-Dgtk=true", + "-Dhelp=false", + "-Dtools=true", + "-Dtests=false", + "-Dexamples=false", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install "examples" + end + + def post_install + system Formula["gtk4"].opt_bin/"gtk4-update-icon-cache", "-f", "-t", HOMEBREW_PREFIX/"share/icons/hicolor" + end + + test do + cp pkgshare/"examples/app.c", "." + flags = shell_output("pkgconf --cflags --libs glib-2.0 sysprof-capture-4").chomp.split + system ENV.cc, "app.c", "-o", "app", *flags + assert_equal "SYSPROF_TRACE_FD not found, exiting.", shell_output("./app 2>&1", 1).chomp + end +end diff --git a/Formula/s/sysstat.rb b/Formula/s/sysstat.rb new file mode 100644 index 0000000000000..8816564788e15 --- /dev/null +++ b/Formula/s/sysstat.rb @@ -0,0 +1,29 @@ +class Sysstat < Formula + desc "Performance monitoring tools for Linux" + homepage "https://sysstat.github.io/" + url "https://github.com/sysstat/sysstat/archive/refs/tags/v12.7.8.tar.gz" + sha256 "f06ed10ba8ed035078d2a0b9f0669c3641ccb362fc626df1f2f0dfd3be7995d8" + license "GPL-2.0-or-later" + head "https://github.com/sysstat/sysstat.git", branch: "master" + + bottle do + sha256 arm64_linux: "6f45fccdd8224cb2f832366a9a83cba933d89d61a086594f120485438361a88d" + sha256 x86_64_linux: "5a882f72e346c88bea61b53c2aeedf689e3fa0284f1b2bdea079bdec8cf653f7" + end + + depends_on :linux + + def install + system "./configure", + "--disable-file-attr", # Fix install: cannot change ownership + "--prefix=#{prefix}", + "conf_dir=#{etc}/sysconfig", + "sa_dir=#{var}/log/sa" + system "make", "install" + end + + test do + assert_match("PID", shell_output("#{bin}/pidstat")) + assert_match("avg-cpu", shell_output("#{bin}/iostat")) + end +end diff --git a/Formula/s/systemc.rb b/Formula/s/systemc.rb new file mode 100644 index 0000000000000..c848c1755a50d --- /dev/null +++ b/Formula/s/systemc.rb @@ -0,0 +1,46 @@ +class Systemc < Formula + desc "Core SystemC language and examples" + homepage "https://systemc.org/overview/systemc/" + url "https://github.com/accellera-official/systemc/archive/refs/tags/3.0.2.tar.gz" + sha256 "9b3693ed286aab958b9e5d79bb0ad3bc523bbc46931100553275352038f4a0c4" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "15b664b77b7660ce613e8219fb38b3dc192431896fe645906b97a57ce3ef03d2" + sha256 cellar: :any, arm64_sequoia: "be8e6a1922de610fda5745e21b8a2f1a8ae64db9afef613395ada807f218caf9" + sha256 cellar: :any, arm64_sonoma: "e4c83297291edc511fcef51f9a87d919b4a7bb05059cf90be30de4614dd4f360" + sha256 cellar: :any, sonoma: "6e344cab620163cae309e39ddfef2a322d4906340b75b73a5ce236939f5dbfa9" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fa78339db2c12469cd5b4af5b79be4c5b0ec1c75cee2d28a54a049f62ad4ffb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b646135f7f9d2940ab5b0c4c6eafc5fcf0c2632933664964d5747cf9e1c87ac" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "doxygen" => :build + depends_on "libtool" => :build + + def install + ENV.append "CXXFLAGS", "-std=gnu++17" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-unix-layout", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "systemc.h" + + int sc_main(int argc, char *argv[]) { + return 0; + } + CPP + system ENV.cxx, "-std=gnu++17", "-L#{lib}", "-lsystemc", "test.cpp" + system "./a.out" + end +end diff --git a/Formula/s/systemd.rb b/Formula/s/systemd.rb new file mode 100644 index 0000000000000..1a571b70286bf --- /dev/null +++ b/Formula/s/systemd.rb @@ -0,0 +1,119 @@ +class Systemd < Formula + include Language::Python::Virtualenv + + desc "System and service manager" + homepage "https://systemd.io" + url "https://github.com/systemd/systemd/archive/refs/tags/v258.1.tar.gz" + sha256 "8eb34eaf2f78330217280bd7a923578f37e28d3f3ac5168e336ebc9cad84a34d" + license all_of: [ + # Main license is LGPL-2.1-or-later while systemd-udevd is GPL-2.0-or-later + "LGPL-2.1-or-later", + "GPL-2.0-or-later", + # The remaining licenses encompass various exceptions as defined using + # file-specific SPDX-License-Identifier. Note that we exclude: + # 1. "BSD-3-Clause" - it is for an unused build script (gen_autosuspend_rules.py) + # 2. "OFL-1.1" - we do not install HTML documentation + "CC0-1.0", + "LGPL-2.0-or-later", + "MIT", + "MIT-0", + :public_domain, + { "LGPL-2.0-or-later" => { with: "Linux-syscall-note" } }, + { "GPL-1.0-or-later" => { with: "Linux-syscall-note" } }, + { "GPL-2.0-or-later" => { with: "Linux-syscall-note" } }, + { "GPL-2.0-only" => { with: "Linux-syscall-note" } }, + { any_of: ["BSD-3-Clause", "GPL-2.0-only" => { with: "Linux-syscall-note" }] }, + { any_of: ["MIT", "GPL-2.0-only" => { with: "Linux-syscall-note" }] }, + { any_of: ["MIT", "GPL-2.0-or-later" => { with: "Linux-syscall-note" }] }, + { any_of: ["GPL-2.0-only", "BSD-2-Clause"] }, + ] + head "https://github.com/systemd/systemd.git", branch: "main" + + bottle do + sha256 arm64_linux: "43f236eed0eeb620d2bdba8ed145b529aee4d2271bc7e7fe653d6e827eb8b493" + sha256 x86_64_linux: "7b830aea1a0d6a5dc229ca1fbf0fa71b829fe75f37c0292a9249cb224c52b51f" + end + + keg_only "it will shadow system systemd if linked" + + depends_on "coreutils" => :build + depends_on "docbook-xsl" => :build + depends_on "gettext" => :build + depends_on "gperf" => :build + depends_on "icu4c@77" => :build # FIXME: brew should add to PKG_CONFIG_PATH as dependency of libxml2 + depends_on "libxml2" => :build + depends_on "libxslt" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "glib" + depends_on "libcap" + depends_on "libxcrypt" + depends_on :linux + depends_on "lz4" + depends_on "openssl@3" + depends_on "util-linux" # for libmount + depends_on "xz" + depends_on "zstd" + + pypi_packages package_name: "", + extra_packages: %w[jinja2 lxml] + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + def install + venv = virtualenv_create(buildpath/"venv", "python3.14") + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}/systemd" + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + args = %W[ + --localstatedir=#{var} + --sysconfdir=#{etc} + -Dsysvinit-path=#{etc}/init.d + -Dsysvrcnd-path=#{etc}/rc.d + -Drc-local=#{etc}/rc.local + -Dpamconfdir=#{etc}/pam.d + -Dbashcompletiondir=#{bash_completion} + -Dmode=release + -Dsshconfdir=no + -Dsshdconfdir=no + -Dcreate-log-dirs=false + -Dhwdb=false + -Dtests=false + -Dlz4=enabled + -Dman=enabled + -Dacl=disabled + -Dgcrypt=disabled + -Dgnutls=disabled + -Dlibcurl=disabled + -Dmicrohttpd=disabled + -Dp11kit=disabled + -Dpam=disabled + -Dshellprofiledir=no + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + assert_match %r{temporary: (/var)?/tmp}, shell_output(bin/"systemd-path") + end +end diff --git a/Formula/s3-backer.rb b/Formula/s3-backer.rb deleted file mode 100644 index 3ae55b6bbd35a..0000000000000 --- a/Formula/s3-backer.rb +++ /dev/null @@ -1,28 +0,0 @@ -class S3Backer < Formula - desc "FUSE-based single file backing store via Amazon S3" - homepage "https://github.com/archiecobbs/s3backer" - url "https://s3.amazonaws.com/archie-public/s3backer/s3backer-1.5.0.tar.gz" - sha256 "82d93c54acb1e85828b6b80a06e69a99c7e06bf6ee025dac720e980590d220d2" - - bottle do - cellar :any - sha256 "f75e20c85f2604d4f607628a0fe166e687d2d17b120b14a417b8ad47a9523531" => :mojave - sha256 "2f3c95347ce448161e36012c2ec08c2ac3b2f4fcabb683b5018f0f8088560bdb" => :high_sierra - sha256 "aa290ecca1c6d57252b80669f112eed4386f6b679ad92de4f3b7c5a0a575f54a" => :sierra - sha256 "2c0b02a7f3d7bfd5902dafc64d54aba03dd2ab5f07441ad14089033146563793" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on :osxfuse - - def install - inreplace "configure", "-lfuse", "-losxfuse" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"s3backer", "--version" - end -end diff --git a/Formula/s3cmd.rb b/Formula/s3cmd.rb deleted file mode 100644 index 9bc8ce4e37d0a..0000000000000 --- a/Formula/s3cmd.rb +++ /dev/null @@ -1,51 +0,0 @@ -class S3cmd < Formula - desc "Command-line tool for the Amazon S3 service" - homepage "https://s3tools.org/s3cmd" - url "https://downloads.sourceforge.net/project/s3tools/s3cmd/2.0.2/s3cmd-2.0.2.tar.gz" - sha256 "9f244c0c10d58d0ccacbba3aa977463e32491bdd9d95109e27b67e4d46c5bd52" - revision 1 - head "https://github.com/s3tools/s3cmd.git" - - bottle do - cellar :any_skip_relocation - sha256 "189112abb6e81acbbbd4977a3d573cf090dd7c85fee032642c5a9164ccb03046" => :mojave - sha256 "182902e2ea25497262b58393a95b34a0961a1d83dc2702d357c5f3d06d1baecf" => :high_sierra - sha256 "182902e2ea25497262b58393a95b34a0961a1d83dc2702d357c5f3d06d1baecf" => :sierra - end - - depends_on "python" - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "python-magic" do - url "https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-0.4.15.tar.gz" - sha256 "f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage { system "python3", *Language::Python.setup_install_args(libexec/"vendor") } - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - man1.install Dir[libexec/"share/man/man1/*"] - end - - test do - system bin/"s3cmd", "--help" - end -end diff --git a/Formula/s3fs.rb b/Formula/s3fs.rb deleted file mode 100644 index d4adffa78529e..0000000000000 --- a/Formula/s3fs.rb +++ /dev/null @@ -1,43 +0,0 @@ -class S3fs < Formula - desc "FUSE-based file system backed by Amazon S3" - homepage "https://github.com/s3fs-fuse/s3fs-fuse/wiki" - url "https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.84.tar.gz" - sha256 "39b844fe94b44af48ab8d57645a0a3fd9a64486bb54413ba7f928111cb4093a3" - head "https://github.com/s3fs-fuse/s3fs-fuse.git" - - bottle do - cellar :any - sha256 "dbaec4af37a9dbfa1907b2d68f50cc4ca4fb71153f33c768a65f129ecc281185" => :mojave - sha256 "92b9e79dc1d0422f2d9b0acf78cc7a0525a65bb86e9c2420d7bb32ff3bedb589" => :high_sierra - sha256 "9e307d0ddd940c86fee609493f7b9d4539ee1949b8915eb34bc575249769df2f" => :sierra - sha256 "d375bdefb6de55ae1793ef7e05f99e52c93be2b9500c9b5bba7f55ae57091efe" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "gnutls" - depends_on "libgcrypt" - depends_on "nettle" - - depends_on :osxfuse - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", "--with-gnutls", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - Be aware that s3fs has some caveats concerning S3 "directories" - that have been created by other tools. See the following issue for - details: - - https://code.google.com/p/s3fs/issues/detail?id=73 - EOS - end - - test do - system "#{bin}/s3fs", "--version" - end -end diff --git a/Formula/s6.rb b/Formula/s6.rb deleted file mode 100644 index de8f6d96c6f92..0000000000000 --- a/Formula/s6.rb +++ /dev/null @@ -1,92 +0,0 @@ -class S6 < Formula - desc "Small & secure supervision software suite" - homepage "https://skarnet.org/software/s6/" - - stable do - url "https://skarnet.org/software/s6/s6-2.7.2.0.tar.gz" - sha256 "af54fcbae7028a90bd12c7ee71a8f3954a74c6a4de376a427cc664587fb68a09" - - resource "skalibs" do - url "https://skarnet.org/software/skalibs/skalibs-2.7.0.0.tar.gz" - sha256 "96494d76669d2f8622511d5d616b6367801a42683c0bb11a8855114e5ccbd756" - end - - resource "execline" do - url "https://skarnet.org/software/execline/execline-2.5.0.1.tar.gz" - sha256 "8d07d14e9e9abb1301e08be271313c4ffa5ddf7248fd262dda19588e78e31049" - end - end - - bottle do - sha256 "de84ce2daa762ee81c1ba5580030e912072ec3659ff3ba876c4da11c27e146ed" => :mojave - sha256 "fea087bab9413a1c548c6f9219d901e825be1cf1de5a46e1fd9ac0a3017a1b92" => :high_sierra - sha256 "764172107342cea76c6a35b37ff830f5481efaa30410d89bd2b41ed1eda291e5" => :sierra - sha256 "760b7806a4f4f9d7e78369406033fca48821933d3f7bdca70298efce5469471f" => :el_capitan - end - - head do - url "git://git.skarnet.org/s6" - - resource "skalibs" do - url "git://git.skarnet.org/skalibs" - end - - resource "execline" do - url "git://git.skarnet.org/execline" - end - end - - def install - resources.each { |r| r.stage(buildpath/r.name) } - build_dir = buildpath/"build" - - cd "skalibs" do - system "./configure", "--disable-shared", "--prefix=#{build_dir}", "--libdir=#{build_dir}/lib" - system "make", "install" - end - - cd "execline" do - system "./configure", - "--prefix=#{build_dir}", - "--bindir=#{libexec}/execline", - "--with-include=#{build_dir}/include", - "--with-lib=#{build_dir}/lib", - "--with-sysdeps=#{build_dir}/lib/skalibs/sysdeps", - "--disable-shared" - system "make", "install" - end - - system "./configure", - "--prefix=#{prefix}", - "--libdir=#{build_dir}/lib", - "--includedir=#{build_dir}/include", - "--with-include=#{build_dir}/include", - "--with-lib=#{build_dir}/lib", - "--with-lib=#{build_dir}/lib/execline", - "--with-sysdeps=#{build_dir}/lib/skalibs/sysdeps", - "--disable-static", - "--disable-shared" - system "make", "install" - - # Some S6 tools expect execline binaries to be on the path - bin.env_script_all_files(libexec/"bin", :PATH => "#{libexec}/execline:$PATH") - sbin.env_script_all_files(libexec/"sbin", :PATH => "#{libexec}/execline:$PATH") - (bin/"execlineb").write_env_script libexec/"execline/execlineb", :PATH => "#{libexec}/execline:$PATH" - end - - test do - (testpath/"test.eb").write <<~EOS - foreground - { - sleep 1 - } - "echo" - "Homebrew" - EOS - assert_match "Homebrew", shell_output("#{bin}/execlineb test.eb") - - (testpath/"log").mkpath - pipe_output("#{bin}/s6-log #{testpath}/log", "Test input\n", 0) - assert_equal "Test input\n", File.read(testpath/"log/current") - end -end diff --git a/Formula/safe-rm.rb b/Formula/safe-rm.rb deleted file mode 100644 index f4f22e067b167..0000000000000 --- a/Formula/safe-rm.rb +++ /dev/null @@ -1,26 +0,0 @@ -class SafeRm < Formula - desc "Wraps rm to prevent dangerous deletion of files" - homepage "https://launchpad.net/safe-rm" - url "https://launchpad.net/safe-rm/trunk/0.12/+download/safe-rm-0.12.tar.gz" - sha256 "1c9d3113591e249301fd00fff51152069ab71cd518b32bfcf6848a8d6c3054e2" - head "https://repo.or.cz/safe-rm.git" - - bottle :unneeded - - def install - bin.install "safe-rm" - end - - test do - foo = testpath/"foo" - bar = testpath/"bar" - (testpath/".config").mkdir - (testpath/".config/safe-rm").write bar - touch foo - touch bar - system "#{bin}/safe-rm", foo - refute_predicate foo, :exist? - shell_output("#{bin}/safe-rm #{bar} 2>&1", 64) - assert_predicate bar, :exist? - end -end diff --git a/Formula/safe.rb b/Formula/safe.rb deleted file mode 100644 index 8d385c5d88c9f..0000000000000 --- a/Formula/safe.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Safe < Formula - desc "Command-line interface for Vault" - homepage "https://github.com/starkandwayne/safe" - url "https://github.com/starkandwayne/safe/archive/v0.9.9.tar.gz" - sha256 "bd13e711b384930249ba93a5df1269019d69ccbd5add832bd538cd7bb8e545f4" - - bottle do - cellar :any_skip_relocation - sha256 "12d909578b737de009be9c5613ef50c9e4282162a5fc46a1f63bffebbfdc621f" => :mojave - sha256 "264ca7e9c4351e2c445d1baceeca6f0f8792990e845746c3a83ebe46a4e89d9d" => :high_sierra - sha256 "1e75ecfa450f8f76b87af4ae8b77acf4ad4dfc8a4f5da10fd779083d918e6e30" => :sierra - end - - depends_on "go" => :build - depends_on "vault" - - def install - ENV["GOPATH"] = buildpath - ENV["VERSION"] = version - - (buildpath/"src/github.com/starkandwayne/safe").install buildpath.children - - cd "src/github.com/starkandwayne/safe" do - system "make", "build" - bin.install "safe" - prefix.install_metafiles - end - end - - test do - require "yaml" - - pid = fork { exec "#{bin}/safe", "local", "--memory" } - sleep 1 - handshake_yaml = Utils.popen_read("#{bin}/safe", "get", "secret/handshake") - Process.kill("TERM", pid) - - parsed = YAML.safe_load(handshake_yaml) - assert_equal "knock", parsed["knock"] - end -end diff --git a/Formula/sagittarius-scheme.rb b/Formula/sagittarius-scheme.rb deleted file mode 100644 index ec72bdd06caaf..0000000000000 --- a/Formula/sagittarius-scheme.rb +++ /dev/null @@ -1,27 +0,0 @@ -class SagittariusScheme < Formula - desc "Free Scheme implementation supporting R6RS and R7RS" - homepage "https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home" - url "https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/sagittarius-0.9.4.tar.gz" - sha256 "0a8fd767c19c7d784448b68c03a241ebacba5bbcd177c0cbda0164807d9ef7f2" - - bottle do - cellar :any - sha256 "104a20fb10f9915b11ca461d5c701c69053c952b7ac095f2724dec25a17c6543" => :mojave - sha256 "c456079b9e99890b63a4d53d6d9e378df9b580f3f2a7d5b22ad40c1c8ad482a1" => :high_sierra - sha256 "8c3bd3c8fabe8b6ac581af8406d198fd5531adff2b1851c4fdb4e74feef263f1" => :sierra - end - - depends_on "cmake" => :build - depends_on "bdw-gc" - depends_on "libffi" - depends_on "openssl" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_equal "4", shell_output("#{bin}/sagittarius -e '(display (+ 1 3))(exit)'") - end -end diff --git a/Formula/saldl.rb b/Formula/saldl.rb deleted file mode 100644 index 9acac9951dada..0000000000000 --- a/Formula/saldl.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Saldl < Formula - desc "CLI downloader optimized for speed and early preview" - homepage "https://saldl.github.io/" - url "https://github.com/saldl/saldl/archive/v40.tar.gz" - sha256 "1cb7950848517fb82ec39561bf36c8cbc0a0caf8fa85355a5b76cac0281346ce" - head "https://github.com/saldl/saldl.git", :shallow => false - - bottle do - cellar :any - sha256 "1ee6fb03ae4d6f8268cbf63452d56657b3801bf98318d8d2877740401ce85707" => :mojave - sha256 "334bdb4450ab3325ad0b4d308a1b59ca452312335caee4f4a96a7258e523f266" => :high_sierra - sha256 "abfa30ca15849b2cc4a4ad592acef5123a736a0589f74a0719a0f61d4bcc9b85" => :sierra - sha256 "92835135c56b58d1902bc181e678d75e7175969894957ad67bdedcbf1b3059cc" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "docbook-xsl" => :build - depends_on "pkg-config" => :build - depends_on "curl" # curl >= 7.55 is required - depends_on "libevent" - - def install - ENV.refurbish_args - - # a2x/asciidoc needs this to build the man page successfully - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - args = ["--prefix=#{prefix}"] - - # head uses git describe to acquire a version - args << "--saldl-version=v#{version}" unless build.head? - - system "./waf", "configure", *args - system "./waf", "build" - system "./waf", "install" - end - - test do - system "#{bin}/saldl", "https://brew.sh/index.html" - assert_predicate testpath/"index.html", :exist? - end -end diff --git a/Formula/salt.rb b/Formula/salt.rb deleted file mode 100644 index 148b07b4df9c2..0000000000000 --- a/Formula/salt.rb +++ /dev/null @@ -1,144 +0,0 @@ -class Salt < Formula - include Language::Python::Virtualenv - - desc "Dynamic infrastructure communication bus" - homepage "https://s.saltstack.com/community/" - url "https://files.pythonhosted.org/packages/af/e1/ec265bbcb81e9b226beb62d24a45d73ab43346b6de147a289b567d65bdb4/salt-2018.3.3.tar.gz" - sha256 "dcf30d2e8eae105a72977c51cfc253fbc4dc28b2f71277fdce9d35de1eb63e15" - head "https://github.com/saltstack/salt.git", :branch => "develop", :shallow => false - - bottle do - cellar :any - sha256 "32462444ac39d4ad7366e5fa39aa8e0110ed3a84b7f9877c3ad9a05e6d276cd1" => :mojave - sha256 "cf3ee8ac8a87bf0aae5d25181d84e6d238be6d7c605da5916f1623d6c6eff84a" => :high_sierra - sha256 "da6489549c9afe5ac6d6e20e50013684c00880fdea6fb34764e6e2b4a9a0379a" => :sierra - end - - depends_on "swig" => :build - depends_on "libgit2" - depends_on "libyaml" - depends_on "openssl" # For M2Crypto - depends_on "python" - depends_on "zeromq" - - # Saltstack's Git filesystem backend depends on pygit2 which depends on libgit2 - # pygit2 must be the same version as libgit2 - mismatched versions are incompatible - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "M2Crypto" do - url "https://files.pythonhosted.org/packages/0a/d3/ecef6a0eaef77448deb6c9768af936fec71c0c4b42af983699cfa1499962/M2Crypto-0.31.0.tar.gz" - sha256 "fd59a9705275d609948005f4cbcaf25f28a4271308237eb166169528692ce498" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/ac/7e/1b4c2e05809a4414ebce0892fe1e32c14ace86ca7d50c70f00979ca9b3a3/MarkupSafe-1.1.0.tar.gz" - sha256 "4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "backports_abc" do - url "https://files.pythonhosted.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-0.5.tar.gz" - sha256 "033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "msgpack" do - url "https://files.pythonhosted.org/packages/3a/bb/dc3f9fc608a6c1c7a471c2bebc761d9c8dbb2f7179a4283a89b9451765b5/msgpack-0.6.0.tar.gz" - sha256 "64abc6bf3a2ac301702f5760f4e6e227d0fd4d84d9014ef9a40faa9d43365259" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "pygit2" do - url "https://files.pythonhosted.org/packages/64/49/a7a621f1c2fde3dc263c10f2b2be5b42807bfdafe8465fc8e0f4c5524016/pygit2-0.27.3.tar.gz" - sha256 "9b7613be3f6ee6ffcfdfa9c64762d4e36a31161bd561a6f7d340a8b3f486ca10" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/b9/6a/bc9277b78f5c3236e36b8c16f4d2701a7fd4fa2eb697159d3e0a3a991573/pyzmq-17.1.2.tar.gz" - sha256 "a72b82ac1910f2cf61a49139f4974f994984475f771b0faa730839607eeedddf" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "singledispatch" do - url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz" - sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/e3/7b/e29ab3d51c8df66922fea216e2bddfcb6430fb29620e5165b16a216e0d3c/tornado-4.5.3.tar.gz" - sha256 "6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/bf/9b/2bf84e841575b633d8d91ad923e198a415e3901f228715524689495b4317/typing-3.6.6.tar.gz" - sha256 "4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - def install - ENV["SWIG_FEATURES"]="-I#{Formula["openssl"].opt_include}" - - virtualenv_install_with_resources - prefix.install libexec/"share" # man pages - (etc/"saltstack").install (buildpath/"conf").children # sample config files - end - - def caveats; <<~EOS - Sample configuration files have been placed in #{etc}/saltstack. - Saltstack will not use these by default. - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/salt --version") - end -end diff --git a/Formula/samtools.rb b/Formula/samtools.rb deleted file mode 100644 index b0064d2d21794..0000000000000 --- a/Formula/samtools.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Samtools < Formula - desc "Tools for manipulating next-generation sequencing data" - homepage "https://www.htslib.org/" - url "https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2" - sha256 "083f688d7070082411c72c27372104ed472ed7a620591d06f928e653ebc23482" - - bottle do - cellar :any - sha256 "9cfd73c0434da559423241827124829a77bcdf3b7b24a86d839896e53ee49582" => :mojave - sha256 "c1c3b6b25c052cad33208dc14f1bea183cdf83aa986a66815f9a7a69a1b91d67" => :high_sierra - sha256 "e349989a4ee48ed6773017282d32d87cfb08d6ff3fab6649889cd84b08351f1b" => :sierra - sha256 "ec950e5ece42592ba47012de10d754dbfc22d29fee50170495506c88e4e1d05b" => :el_capitan - end - - depends_on "htslib" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-htslib=#{Formula["htslib"].opt_prefix}" - system "make", "install" - end - - test do - (testpath/"test.fasta").write <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - system bin/"samtools", "faidx", "test.fasta" - assert_equal "U00096.2:1-70\t70\t15\t70\t71\n", (testpath/"test.fasta.fai").read - end -end diff --git a/Formula/sane-backends.rb b/Formula/sane-backends.rb deleted file mode 100644 index 4c8afd496bac0..0000000000000 --- a/Formula/sane-backends.rb +++ /dev/null @@ -1,49 +0,0 @@ -class SaneBackends < Formula - desc "Backends for scanner access" - homepage "http://www.sane-project.org/" - url "https://mirrors.kernel.org/debian/pool/main/s/sane-backends/sane-backends_1.0.27.orig.tar.gz" - mirror "https://fossies.org/linux/misc/sane-backends-1.0.27.tar.gz" - sha256 "293747bf37275c424ebb2c833f8588601a60b2f9653945d5a3194875355e36c9" - revision 5 - head "https://salsa.debian.org/debian/sane-backends.git" - - bottle do - sha256 "19a5dd6aab043b2552e4ddb785c4f41c184019a7854e5bf28054ee809839a81f" => :mojave - sha256 "7e17e4e13a6b9d4c532c3f4f498711c016c0c23331a25e9c4fe2543c1241bebf" => :high_sierra - sha256 "c1c278d995f33f438ad6009ba4928157dd2ca74ec17a344a57b7af972c64e190" => :sierra - sha256 "6073b7b25829eb031616894fe6ea5c34408fed9b42d3b421e6eba94d6cbbf948" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "libusb" - depends_on "net-snmp" - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--without-gphoto2", - "--enable-local-backends", - "--with-usb=yes" - - # Remove for > 1.0.27 - # Workaround for bug in Makefile.am described here: - # https://lists.alioth.debian.org/pipermail/sane-devel/2017-August/035576.html - # It's already fixed in commit 519ff57. - system "make" - system "make", "install" - end - - def post_install - # Some drivers require a lockfile - (var/"lock/sane").mkpath - end - - test do - assert_match prefix.to_s, shell_output("#{bin}/sane-config --prefix") - end -end diff --git a/Formula/sassc.rb b/Formula/sassc.rb deleted file mode 100644 index 557c98ae1330d..0000000000000 --- a/Formula/sassc.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Sassc < Formula - desc "Wrapper around libsass that helps to create command-line apps" - homepage "https://github.com/sass/sassc" - url "https://github.com/sass/sassc.git", - :tag => "3.5.0", - :revision => "aa6d5c635ea8faf44d542a23aaf85d27e5777d48" - head "https://github.com/sass/sassc.git" - - bottle do - cellar :any - sha256 "0776912423914ce74e8451f0b66004cae6f2e00a8c40e4a35f77fdbe0d036b72" => :mojave - sha256 "efda15371cdf37716f508cbbbc7512bd4db103cbdd25a0a5b27ae74e6f5a4705" => :high_sierra - sha256 "8160ead69c6f3e7665cb474e719cc244412c37335013e4d98bf10bfdfcff6a32" => :sierra - sha256 "32edbfd6543029224ea742a23f0bac7f675a9aa8e7a0511cee09561518591854" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libsass" - - def install - system "autoreconf", "-fvi" - system "./configure", "--prefix=#{prefix}", "--disable-silent-rules", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - (testpath/"input.scss").write <<~EOS - div { - img { - border: 0px; - } - } - EOS - - assert_equal "div img{border:0px}", - shell_output("#{bin}/sassc --style compressed input.scss").strip - end -end diff --git a/Formula/savana.rb b/Formula/savana.rb deleted file mode 100644 index 5b9cd17319c1d..0000000000000 --- a/Formula/savana.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Savana < Formula - desc "Transactional workspaces for SVN" - homepage "https://github.com/codehaus/savana" - url "https://bintray.com/artifact/download/bintray/jcenter/org/codehaus/savana/1.2/savana-1.2-install.tar.gz" - sha256 "608242a0399be44f41ff324d40e82104b3c62908bc35177f433dcfc5b0c9bf55" - - bottle :unneeded - - def install - # Remove Windows files - rm_rf Dir["bin/*.{bat,cmd}"] - - prefix.install %w[COPYING COPYING.LESSER licenses svn-hooks] - - # lib/* and logging.properties are loaded relative to bin - libexec.install %w[bin lib logging.properties] - bin.write_exec_script libexec/"bin/sav" - - bash_completion.install "etc/bash_completion" => "savana-completion.bash" - end - - test do - system "#{bin}/sav", "help" - end -end diff --git a/Formula/saxon-b.rb b/Formula/saxon-b.rb deleted file mode 100644 index d2bc37a4d4381..0000000000000 --- a/Formula/saxon-b.rb +++ /dev/null @@ -1,14 +0,0 @@ -class SaxonB < Formula - desc "XSLT and XQuery processor" - homepage "https://saxon.sourceforge.io/" - url "https://downloads.sourceforge.net/project/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip" - version "9.1.0.8" - sha256 "92bcdc4a0680c7866fe5828adb92c714cfe88dcf3fa0caf5bf638fcc6d9369b4" - - bottle :unneeded - - def install - (buildpath/"saxon-b").install Dir["*.jar", "doc", "notices"] - share.install Dir["*"] - end -end diff --git a/Formula/saxon.rb b/Formula/saxon.rb deleted file mode 100644 index 46d45178a4f34..0000000000000 --- a/Formula/saxon.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Saxon < Formula - desc "XSLT and XQuery processor" - homepage "https://saxon.sourceforge.io" - url "https://downloads.sourceforge.net/project/saxon/Saxon-HE/9.9/SaxonHE9-9-0-1J.zip" - version "9.9.0.1" - sha256 "c068a69b701c21238c28712aba6e3467e37c964ebe219e5d7789e6a3e269ddc6" - - bottle :unneeded - - def install - libexec.install Dir["*.jar", "doc", "notices"] - bin.write_jar_script libexec/"saxon9he.jar", "saxon" - end - - test do - (testpath/"test.xml").write <<~EOS - It works! - EOS - (testpath/"test.xsl").write <<~EOS - - - - -

    - - -
    -
    - EOS - assert_equal <<~EOS.chop, shell_output("#{bin}/saxon test.xml test.xsl") - - -

    It works!

    - - - EOS - end -end diff --git a/Formula/sbcl.rb b/Formula/sbcl.rb deleted file mode 100644 index 6f6ea26b2de67..0000000000000 --- a/Formula/sbcl.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Sbcl < Formula - desc "Steel Bank Common Lisp system" - homepage "http://www.sbcl.org/" - url "https://downloads.sourceforge.net/project/sbcl/sbcl/1.4.14/sbcl-1.4.14-source.tar.bz2" - sha256 "4df26ed44d45580ceecbf9e1a6e9e4095de73c7699c6b945bbe8cc8710301c2c" - - bottle do - sha256 "46072f66a5228d68493b7fc99b9ec82fd0f8ab5780cae8c879337a8f259d23cd" => :mojave - sha256 "939d870b615ac3ccd38bd3947c3b2c8f0ef0926624b96be36ec2d1dde23367d3" => :high_sierra - sha256 "9863dd8a15e97381e071e9a5a68c78d38e8b4db7bff77d5063ffe4639a32ae30" => :sierra - end - - # Current binary versions are listed at https://sbcl.sourceforge.io/platform-table.html - resource "bootstrap64" do - url "https://downloads.sourceforge.net/project/sbcl/sbcl/1.2.11/sbcl-1.2.11-x86-64-darwin-binary.tar.bz2" - sha256 "057d3a1c033fb53deee994c0135110636a04f92d2f88919679864214f77d0452" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/c5ffdb11/sbcl/patch-make-doc.diff" - sha256 "7c21c89fd6ec022d4f17670c3253bd33a4ac2784744e4c899c32fbe27203d87e" - end - - def install - # Remove non-ASCII values from environment as they cause build failures - # More information: https://bugs.gentoo.org/show_bug.cgi?id=174702 - ENV.delete_if do |_, value| - ascii_val = value.dup - ascii_val.force_encoding("ASCII-8BIT") if ascii_val.respond_to? :force_encoding - ascii_val =~ /[\x80-\xff]/n - end - - tmpdir = Pathname.new(Dir.mktmpdir) - tmpdir.install resource("bootstrap64") - - command = "#{tmpdir}/src/runtime/sbcl" - core = "#{tmpdir}/output/sbcl.core" - xc_cmdline = "#{command} --core #{core} --disable-debugger --no-userinit --no-sysinit" - - args = [ - "--prefix=#{prefix}", - "--xc-host=#{xc_cmdline}", - "--with-sb-core-compression", - "--with-sb-ldb", - "--with-sb-thread", - ] - - ENV["SBCL_MACOSX_VERSION_MIN"] = MacOS.version - system "./make.sh", *args - - ENV["INSTALL_ROOT"] = prefix - system "sh", "install.sh" - - # Install sources - bin.env_script_all_files(libexec/"bin", :SBCL_SOURCE_ROOT => pkgshare/"src") - pkgshare.install %w[contrib src] - (lib/"sbcl/sbclrc").write <<~EOS - (setf (logical-pathname-translations "SYS") - '(("SYS:SRC;**;*.*.*" #p"#{pkgshare}/src/**/*.*") - ("SYS:CONTRIB;**;*.*.*" #p"#{pkgshare}/contrib/**/*.*"))) - EOS - end - - test do - (testpath/"simple.sbcl").write <<~EOS - (write-line (write-to-string (+ 2 2))) - EOS - output = shell_output("#{bin}/sbcl --script #{testpath}/simple.sbcl") - assert_equal "4", output.strip - end -end diff --git a/Formula/sbjson.rb b/Formula/sbjson.rb deleted file mode 100644 index 8be121409cfca..0000000000000 --- a/Formula/sbjson.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Sbjson < Formula - desc "JSON CLI parser & reformatter based on SBJson v5" - homepage "https://github.com/stig/json-framework" - url "https://github.com/stig/json-framework/archive/v5.0.0.tar.gz" - sha256 "e803753a157db475c4b89bddc0f550a5fdd0fc1980428a81ca6116feb2fd52e1" - head "https://github.com/stig/json-framework.git" - - bottle do - cellar :any_skip_relocation - sha256 "634ba12a265ba3f273d2b321dada0a1a9192f57fa9988c210d202445cc15a30c" => :mojave - sha256 "c269d25dc05df3ee48da8f91f31a00c09b33ee1dfb135cec4783df44509f9478" => :high_sierra - sha256 "aded461aca135b96288154c6fe6219d7c093a0836dafc6fdec90899256e8f8db" => :sierra - sha256 "ce91cd42fb178216f3fe2ef6c617f9ca91a9e981b85142a22a8cc715ab105fc3" => :el_capitan - sha256 "46f00ae266cdc64c839ff5ad2f8258eb42bdb7682e8e5201e9acb1f07f449611" => :yosemite - end - - depends_on :xcode => :build - - def install - xcodebuild "-project", "SBJson5.xcodeproj", - "-target", "sbjson", - "-configuration", "Release", - "clean", - "build", - "SYMROOT=build" - - bin.install "build/Release/sbjson" - end - - test do - (testpath/"in.json").write <<~EOS - [true,false,"string",42.001e3,[],{}] - EOS - - (testpath/"unwrapped.json").write <<~EOS - true - false - "string" - 42001 - [] - {} - EOS - - assert_equal shell_output("cat unwrapped.json"), - shell_output("#{bin}/sbjson --unwrap-root in.json") - end -end diff --git a/Formula/sblim-sfcc.rb b/Formula/sblim-sfcc.rb deleted file mode 100644 index a2d073e663449..0000000000000 --- a/Formula/sblim-sfcc.rb +++ /dev/null @@ -1,38 +0,0 @@ -class SblimSfcc < Formula - desc "Project to enhance the manageability of GNU/Linux system" - homepage "https://sourceforge.net/projects/sblim/" - url "https://downloads.sourceforge.net/project/sblim/sblim-sfcc/sblim-sfcc-2.2.8.tar.bz2" - sha256 "1b8f187583bc6c6b0a63aae0165ca37892a2a3bd4bb0682cd76b56268b42c3d6" - - bottle do - sha256 "e4f4705965c06672a0143381756c57445df47afb3873eafd1669b338796ba118" => :mojave - sha256 "f13c6b2ff6cd3556066cf8638332b70edb816cde52795d4461ec831d4af42a94" => :high_sierra - sha256 "38bcd42d05b8c3852bb886a40809fdec6ffd455fcc28673f85558d63d7ef89d7" => :sierra - sha256 "09bb716962c8e89312fc17448dbe600b27537cfec933e9792b2b988c91a10aed" => :el_capitan - sha256 "6d2ececce1f13c1b74ee7497f6a2319408fcf14e0c48660056fafc3216f9b23b" => :yosemite - sha256 "0a121e50395af8c870c05108a67bcc9019c754fe0ca7eb5bd5efd2638fcac416" => :mavericks - sha256 "c80645daeb763a5aaa16fa60ab02b006e26f698d5c0fce6464e07c4f59fa1a75" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lcimcClient", "-o", "test" - system "./test" - end -end diff --git a/Formula/sbt.rb b/Formula/sbt.rb deleted file mode 100644 index a05db9697f3a3..0000000000000 --- a/Formula/sbt.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Sbt < Formula - desc "Build tool for Scala projects" - homepage "https://www.scala-sbt.org/" - url "https://github.com/sbt/sbt/releases/download/v1.2.8/sbt-1.2.8.tgz" - mirror "https://sbt-downloads.cdnedge.bluemix.net/releases/v1.2.8/sbt-1.2.8.tgz" - sha256 "9bb9212541176d6fcce7bd12e4cf8a9c9649f5b63f88b3aff474e0b02c7cfe58" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - inreplace "bin/sbt" do |s| - s.gsub! 'etc_sbt_opts_file="/etc/sbt/sbtopts"', "etc_sbt_opts_file=\"#{etc}/sbtopts\"" - s.gsub! "/etc/sbt/sbtopts", "#{etc}/sbtopts" - end - - libexec.install "bin", "lib" - etc.install "conf/sbtopts" - - (bin/"sbt").write <<~EOS - #!/bin/sh - if [ -f "$HOME/.sbtconfig" ]; then - echo "Use of ~/.sbtconfig is deprecated, please migrate global settings to #{etc}/sbtopts" >&2 - . "$HOME/.sbtconfig" - fi - exec "#{libexec}/bin/sbt" "$@" - EOS - end - - def caveats; <<~EOS - You can use $SBT_OPTS to pass additional JVM options to sbt. - Project specific options should be placed in .sbtopts in the root of your project. - Global settings should be placed in #{etc}/sbtopts - EOS - end - - test do - ENV.append "_JAVA_OPTIONS", "-Dsbt.log.noformat=true" - assert_match "[info] #{version}", shell_output("#{bin}/sbt sbtVersion") - end -end diff --git a/Formula/sbt@0.13.rb b/Formula/sbt@0.13.rb deleted file mode 100644 index 0e3030cfbb976..0000000000000 --- a/Formula/sbt@0.13.rb +++ /dev/null @@ -1,47 +0,0 @@ -class SbtAT013 < Formula - desc "Build tool for Scala projects" - homepage "https://www.scala-sbt.org/" - url "https://github.com/sbt/sbt/releases/download/v0.13.18/sbt-0.13.18.tgz" - sha256 "afe82322ca8e63e6f1e10fc1eb515eb7dc6c3e5a7f543048814072a03d83b331" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.8" - - def install - inreplace "bin/sbt" do |s| - s.gsub! 'etc_sbt_opts_file="/etc/sbt/sbtopts"', "etc_sbt_opts_file=\"#{etc}/sbtopts\"" - s.gsub! "/etc/sbt/sbtopts", "#{etc}/sbtopts" - end - - libexec.install "bin", "lib" - etc.install "conf/sbtopts" - - (bin/"sbt").write <<~EOS - #!/bin/sh - export JAVA_HOME=$(#{Language::Java.java_home_cmd("1.8")}) - if [ -f "$HOME/.sbtconfig" ]; then - echo "Use of ~/.sbtconfig is deprecated, please migrate global settings to #{etc}/sbtopts" >&2 - . "$HOME/.sbtconfig" - fi - exec "#{libexec}/bin/sbt" "$@" - EOS - end - - def caveats; <<~EOS - You can use $SBT_OPTS to pass additional JVM options to SBT: - SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M" - - This formula uses the standard Lightbend sbt launcher script. - Project specific options should be placed in .sbtopts in the root of your project. - Global settings should be placed in #{etc}/sbtopts - EOS - end - - test do - ENV.append "_JAVA_OPTIONS", "-Dsbt.log.noformat=true" - assert_match "[info] #{version}", shell_output("#{bin}/sbt sbtVersion") - end -end diff --git a/Formula/sbtenv.rb b/Formula/sbtenv.rb deleted file mode 100644 index 75c8bbb4377a4..0000000000000 --- a/Formula/sbtenv.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Sbtenv < Formula - desc "Command-line tool for managing sbt environments" - homepage "https://github.com/sbtenv/sbtenv" - url "https://github.com/sbtenv/sbtenv/archive/version/0.0.15.tar.gz" - sha256 "7650e864884e38dab25302b409bf32bf83d23db03c7959f88010f82370e52263" - head "https://github.com/sbtenv/sbtenv.git" - - bottle :unneeded - - def install - inreplace "libexec/sbtenv", "/usr/local", HOMEBREW_PREFIX - prefix.install "bin", "completions", "libexec" - prefix.install "plugins" => "default-plugins" - - %w[sbtenv-install].each do |cmd| - bin.install_symlink "#{prefix}/default-plugins/sbt-install/bin/#{cmd}" - end - end - - def post_install - var_lib = HOMEBREW_PREFIX/"var/lib/sbtenv" - %w[plugins versions].each do |dir| - var_dir = "#{var_lib}/#{dir}" - mkdir_p var_dir - ln_sf var_dir, "#{prefix}/#{dir}" - end - - (var_lib/"plugins").install_symlink "#{prefix}/default-plugins/sbt-install" - end - - test do - shell_output("eval \"$(#{bin}/sbtenv init -)\" && sbtenv versions") - end -end diff --git a/Formula/sbuild.rb b/Formula/sbuild.rb deleted file mode 100644 index fb9075387a9fe..0000000000000 --- a/Formula/sbuild.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Sbuild < Formula - desc "Scala-based build system" - homepage "http://sbuild.org" - url "http://sbuild.org/uploads/sbuild/0.7.7/sbuild-0.7.7-dist.zip" - sha256 "606bc09603707f31d9ca5bc306ba01b171f8400e643261acd28da7a1a24dfb23" - - bottle :unneeded - - depends_on :java => "1.6+" - - def install - libexec.install Dir["*"] - chmod 0755, libexec/"bin/sbuild" - bin.install_symlink libexec/"bin/sbuild" - end - - test do - expected = <<~EOS - import de.tototec.sbuild._ - - @version("#{version}") - class SBuild(implicit _project: Project) { - - Target("phony:clean") exec { - Path("target").deleteRecursive - } - - Target("phony:hello") help "Greet me" exec { - println("Hello you") - } - - } - EOS - system bin/"sbuild", "--create-stub" - assert_equal expected, (testpath/"Sbuild.scala").read - end -end diff --git a/Formula/sc-im.rb b/Formula/sc-im.rb deleted file mode 100644 index 497000bff6491..0000000000000 --- a/Formula/sc-im.rb +++ /dev/null @@ -1,34 +0,0 @@ -class ScIm < Formula - desc "Spreadsheet program for the terminal, using ncurses" - homepage "https://github.com/andmarti1424/sc-im" - url "https://github.com/andmarti1424/sc-im/archive/v0.7.0.tar.gz" - sha256 "87225918cb6f52bbc068ee6b12eaf176c7c55ba9739b29ca08cb9b6699141cad" - head "https://github.com/andmarti1424/sc-im.git", :branch => "freeze" - - bottle do - sha256 "67180ab11eedd56f8eaffb0d2f12a90ca9636bbd93ff693914450be8248702ce" => :mojave - sha256 "275a0a9dbd1a1271119e36b2767a54587aae57a65ee92278e701e0e1236a192c" => :high_sierra - sha256 "f346970ef805cec01ae6485365d8fb5002533255c01e81bdd44d072058d00081" => :sierra - sha256 "50e8d50e0373ac626ad617057eb1246c779e1e3b05171f4be2aa547c5b8ddf4c" => :el_capitan - end - - depends_on "ncurses" - - def install - cd "src" do - system "make", "prefix=#{prefix}" - system "make", "prefix=#{prefix}", "install" - end - end - - test do - input = <<~EOS - let A1=1+1 - getnum A1 - EOS - output = pipe_output( - "#{bin}/scim --nocurses --quit_afterload 2>/dev/null", input - ) - assert_equal "2", output.lines.last.chomp - end -end diff --git a/Formula/sc68.rb b/Formula/sc68.rb deleted file mode 100644 index 2d3bcd0b1a2f8..0000000000000 --- a/Formula/sc68.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Sc68 < Formula - desc "Play music originally designed for Atari ST and Amiga computers" - homepage "http://sc68.atari.org/project.html" - url "https://downloads.sourceforge.net/project/sc68/sc68/2.2.1/sc68-2.2.1.tar.gz" - sha256 "d7371f0f406dc925debf50f64df1f0700e1d29a8502bb170883fc41cc733265f" - - bottle do - sha256 "45e1df25bd1394d7e1985b5fdd96a1090ff82d245f3b26bdc5055ec6c80807dd" => :mojave - sha256 "b3e4809754847ca52468463ed60293032efeecf42f24acd3026bb03d369a91d9" => :high_sierra - sha256 "0b5a0931d6f72700ca691436ed69d467cc043aea9b3454d628050886ccd12141" => :sierra - sha256 "d5ac5c810d4f3505230f2cdb9bc3f9f8c14394e1663f30f8d601fe4a559f99c8" => :el_capitan - sha256 "b6b3fb845e14cd2c35212911b261bb4a15f38c528522789fd5905e762b7d0bfc" => :yosemite - sha256 "8834ebed226bb20898b91be054fbd54491f524ea780c6559eba1c97166bf7e7d" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}" - system "make", "install" - end - - test do - # SC68 ships with a sample module; test attempts to print its metadata - system "#{bin}/info68", "#{pkgshare}/Sample/About-Intro.sc68", "-C", ": ", "-N", "-L" - end -end diff --git a/Formula/scala.rb b/Formula/scala.rb deleted file mode 100644 index ab6cc8dd5b6cb..0000000000000 --- a/Formula/scala.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Scala < Formula - desc "JVM-based programming language" - homepage "https://www.scala-lang.org/" - url "https://downloads.lightbend.com/scala/2.12.8/scala-2.12.8.tgz" - mirror "https://www.scala-lang.org/files/archive/scala-2.12.8.tgz" - mirror "https://downloads.typesafe.com/scala/2.12.8/scala-2.12.8.tgz" - sha256 "440ea00c818fd88c5261dd85889711a9d1f7e6a39caa475fcf0583ab57db80a3" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm_f Dir["bin/*.bat"] - doc.install Dir["doc/*"] - share.install "man" - libexec.install "bin", "lib" - bin.install_symlink Dir["#{libexec}/bin/*"] - - # Set up an IntelliJ compatible symlink farm in 'idea' - idea = prefix/"idea" - idea.install_symlink libexec/"src", libexec/"lib" - idea.install_symlink doc => "doc" - end - - def caveats; <<~EOS - To use with IntelliJ, set the Scala home to: - #{opt_prefix}/idea - EOS - end - - test do - file = testpath/"Test.scala" - file.write <<~EOS - object Test { - def main(args: Array[String]) { - println(s"${2 + 2}") - } - } - EOS - - out = shell_output("#{bin}/scala -nc #{file}").strip - - assert_equal "4", out - end -end diff --git a/Formula/scala@2.10.rb b/Formula/scala@2.10.rb deleted file mode 100644 index 50f2fde5a800a..0000000000000 --- a/Formula/scala@2.10.rb +++ /dev/null @@ -1,45 +0,0 @@ -class ScalaAT210 < Formula - desc "JVM-based programming language" - homepage "https://www.scala-lang.org/" - url "https://downloads.lightbend.com/scala/2.10.7/scala-2.10.7.tgz" - mirror "https://downloads.typesafe.com/scala/2.10.7/scala-2.10.7.tgz" - mirror "https://www.scala-lang.org/files/archive/scala-2.10.7.tgz" - sha256 "9283119916f6bb7714e076a2840ccf22d58819b355228ed1591ae6f76929f111" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.bat"] - doc.install Dir["doc/*"] - share.install "man" - libexec.install "bin", "lib" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - - # Set up an IntelliJ compatible symlink farm in 'idea' - idea = prefix/"idea" - idea.install_symlink libexec/"src", libexec/"lib" - idea.install_symlink doc => "doc" - end - - test do - file = testpath/"Test.scala" - file.write <<~EOS - object Test { - def main(args: Array[String]) { - println(s"${2 + 2}") - } - } - EOS - - out = shell_output("#{bin}/scala #{file}").strip - # Shut down the compile server so as not to break Travis - system bin/"fsc", "-shutdown" - - assert_equal "4", out - end -end diff --git a/Formula/scala@2.11.rb b/Formula/scala@2.11.rb deleted file mode 100644 index a7d7ce87f204b..0000000000000 --- a/Formula/scala@2.11.rb +++ /dev/null @@ -1,45 +0,0 @@ -class ScalaAT211 < Formula - desc "JVM-based programming language" - homepage "https://www.scala-lang.org/" - url "https://downloads.lightbend.com/scala/2.11.12/scala-2.11.12.tgz" - mirror "https://downloads.typesafe.com/scala/2.11.12/scala-2.11.12.tgz" - mirror "https://www.scala-lang.org/files/archive/scala-2.11.12.tgz" - sha256 "b11d7d33699ca4f60bc3b2b6858fd953e3de2b8522c943f4cda4b674316196a8" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.bat"] - doc.install Dir["doc/*"] - share.install "man" - libexec.install "bin", "lib" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - - # Set up an IntelliJ compatible symlink farm in 'idea' - idea = prefix/"idea" - idea.install_symlink libexec/"src", libexec/"lib" - idea.install_symlink doc => "doc" - end - - test do - file = testpath/"Test.scala" - file.write <<~EOS - object Test { - def main(args: Array[String]) { - println(s"${2 + 2}") - } - } - EOS - - out = shell_output("#{bin}/scala #{file}").strip - # Shut down the compile server so as not to break Travis - system bin/"fsc", "-shutdown" - - assert_equal "4", out - end -end diff --git a/Formula/scalaenv.rb b/Formula/scalaenv.rb deleted file mode 100644 index 23dcdb85210c8..0000000000000 --- a/Formula/scalaenv.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Scalaenv < Formula - desc "Command-line tool to manage Scala environments" - homepage "https://github.com/scalaenv/scalaenv" - url "https://github.com/scalaenv/scalaenv/archive/version/0.1.2.tar.gz" - sha256 "23cd273d998070a39605cf0ff3449da603e5ba1df12f0f7088fc20e689fb3804" - head "https://github.com/scalaenv/scalaenv.git" - - bottle :unneeded - - def install - inreplace "libexec/scalaenv", "/usr/local", HOMEBREW_PREFIX - prefix.install "bin", "completions", "libexec" - prefix.install "plugins" => "default-plugins" - - %w[scalaenv-install scalaenv-uninstall scala-build].each do |cmd| - bin.install_symlink "#{prefix}/default-plugins/scala-install/bin/#{cmd}" - end - end - - def post_install - var_lib = HOMEBREW_PREFIX/"var/lib/scalaenv" - %w[plugins versions].each do |dir| - var_dir = "#{var_lib}/#{dir}" - mkdir_p var_dir - ln_sf var_dir, "#{prefix}/#{dir}" - end - - (var_lib/"plugins").install_symlink "#{prefix}/default-plugins/scala-install" - end - - test do - shell_output("eval \"$(#{bin}/scalaenv init -)\" && scalaenv versions") - end -end diff --git a/Formula/scalapack.rb b/Formula/scalapack.rb deleted file mode 100644 index 00c469eb9c198..0000000000000 --- a/Formula/scalapack.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Scalapack < Formula - desc "High-performance linear algebra for distributed memory machines" - homepage "https://www.netlib.org/scalapack/" - url "https://www.netlib.org/scalapack/scalapack-2.0.2.tgz" - sha256 "0c74aeae690fe5ee4db7926f49c5d0bb69ce09eea75beb915e00bba07530395c" - revision 13 - - bottle do - cellar :any - sha256 "808ad91d5ebad9b0ef33c942dbecd99902caf6bdbf9cedecfb947d8212c22004" => :mojave - sha256 "af10eb763f1cf74164160a3f03d32409bbe84945622782e1f66197ce14eb0495" => :high_sierra - sha256 "caa0f69399167c1f684b4074a53a8338c8a896563e17326e7655536850f42f6b" => :sierra - end - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "openblas" - - def install - mkdir "build" do - blas = "-L#{Formula["openblas"].opt_lib} -lopenblas" - system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON", - "-DBLAS_LIBRARIES=#{blas}", "-DLAPACK_LIBRARIES=#{blas}" - system "make", "all" - system "make", "install" - end - - pkgshare.install "EXAMPLE" - end - - test do - cp_r pkgshare/"EXAMPLE", testpath - cd "EXAMPLE" do - system "mpif90", "-o", "xsscaex", "psscaex.f", "pdscaexinfo.f", "-L#{opt_lib}", "-lscalapack" - assert `mpirun -np 4 ./xsscaex | grep 'INFO code' | awk '{print $NF}'`.to_i.zero? - system "mpif90", "-o", "xdscaex", "pdscaex.f", "pdscaexinfo.f", "-L#{opt_lib}", "-lscalapack" - assert `mpirun -np 4 ./xdscaex | grep 'INFO code' | awk '{print $NF}'`.to_i.zero? - system "mpif90", "-o", "xcscaex", "pcscaex.f", "pdscaexinfo.f", "-L#{opt_lib}", "-lscalapack" - assert `mpirun -np 4 ./xcscaex | grep 'INFO code' | awk '{print $NF}'`.to_i.zero? - system "mpif90", "-o", "xzscaex", "pzscaex.f", "pdscaexinfo.f", "-L#{opt_lib}", "-lscalapack" - assert `mpirun -np 4 ./xzscaex | grep 'INFO code' | awk '{print $NF}'`.to_i.zero? - end - end -end diff --git a/Formula/scalariform.rb b/Formula/scalariform.rb deleted file mode 100644 index 6011769ca40ae..0000000000000 --- a/Formula/scalariform.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Scalariform < Formula - desc "Scala source code formatter" - homepage "https://github.com/scala-ide/scalariform" - url "https://github.com/scala-ide/scalariform/releases/download/0.2.6/scalariform.jar" - sha256 "0cd28ba1a8725527572f75f7b23bca8b9f55c945e01592d5968c1383113bf7a4" - - head do - url "https://github.com/scala-ide/scalariform.git" - depends_on "sbt" => :build - end - - bottle :unneeded - - def install - if build.head? - system "sbt", "project cli", "assembly" - libexec.install Dir["cli/target/scala-*/cli-assembly-*.jar"] - bin.write_jar_script Dir[libexec/"cli-assembly-*.jar"][0], "scalariform" - else - libexec.install "scalariform.jar" - bin.write_jar_script libexec/"scalariform.jar", "scalariform" - end - end - - test do - before_data = <<~EOS - def foo() { - println("Hello World") - } - EOS - - after_data = <<~EOS - def foo() { - println("Hello World") - } - EOS - - (testpath/"foo.scala").write before_data - system bin/"scalariform", "-indentSpaces=3", testpath/"foo.scala" - assert_equal after_data, (testpath/"foo.scala").read - end -end diff --git a/Formula/scalastyle.rb b/Formula/scalastyle.rb deleted file mode 100644 index 8d10cd2065479..0000000000000 --- a/Formula/scalastyle.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Scalastyle < Formula - desc "Run scalastyle from the command-line" - homepage "http://www.scalastyle.org/command-line.html" - url "https://oss.sonatype.org/content/repositories/releases/org/scalastyle/scalastyle_2.12/1.0.0/scalastyle_2.12-1.0.0-batch.jar" - sha256 "e9dafd97be0d00f28c1e8bfcab951d0e5172b262a1d41da31d1fd65d615aedcb" - - bottle :unneeded - - resource "default_config" do - url "https://raw.githubusercontent.com/scalastyle/scalastyle/v1.0.0/lib/scalastyle_config.xml" - version "1.0.0" - sha256 "6ce156449609a375d973cc8384a17524e4538114f1747efc2295cf4ca473d04e" - end - - def install - libexec.install "scalastyle_2.12-#{version}-batch.jar" - bin.write_jar_script("#{libexec}/scalastyle_2.12-#{version}-batch.jar", "scalastyle") - end - - test do - (testpath/"test.scala").write <<~EOS - object HelloWorld { - def main(args: Array[String]) { - println("Hello") - } - } - EOS - testpath.install resource("default_config") - system bin/"scalastyle", "--config", "scalastyle_config.xml", testpath/"test.scala" - end -end diff --git a/Formula/scale2x.rb b/Formula/scale2x.rb deleted file mode 100644 index f8b9754ae20b3..0000000000000 --- a/Formula/scale2x.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Scale2x < Formula - desc "Real-time graphics effect" - homepage "https://www.scale2x.it/" - url "https://github.com/amadvance/scale2x/releases/download/v4.0/scale2x-4.0.tar.gz" - sha256 "996f2673206c73fb57f0f5d0e094d3774f595f7e7e80fcca8cc045e8b4ba6d32" - - bottle do - cellar :any - sha256 "da91fa8382839f9cf1b9d58b1e38b1d2f6d3cc1fef3cd0dce1481774397ebe35" => :mojave - sha256 "2a3519bdbba8ff6caa1ca9b48d461866b8121dfd224a2c25da106087bb3cfd61" => :high_sierra - sha256 "771e1b1ea660234e8bea89e774d0d802f7f1cb12c08e100cbb5b83d0a02a61ea" => :sierra - sha256 "033e1adf0430ced99eef1b746842e9ca876b542f6fbd8f050e8f7c7e1b59f692" => :el_capitan - end - - depends_on "libpng" - - def install - system "./configure", "--prefix=#{prefix}", "CPPFLAGS=-I/usr/include/malloc/" - system "make", "install" - end -end diff --git a/Formula/scamper.rb b/Formula/scamper.rb deleted file mode 100644 index ad26563b4a29f..0000000000000 --- a/Formula/scamper.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Scamper < Formula - desc "Advanced traceroute and network measurement utility" - homepage "https://www.caida.org/tools/measurement/scamper/" - url "https://www.caida.org/tools/measurement/scamper/code/scamper-cvs-20180504.tar.gz" - sha256 "f8e192a12439ccba712870a47fb0a239715f2c43a98df3d1ae6761fa688fe189" - - bottle do - cellar :any - sha256 "cab67481dc39c238684cc768012596d086d03594c88423cc4bf027e878a6e98f" => :mojave - sha256 "8eebcd5d3451744d3020a8925c49988271e8c96f1ade51692362eb0f401fccc7" => :high_sierra - sha256 "5c0144da8cbe504095f8613d64134dabb97a1a1478ba1104519ab9f77c0fa725" => :sierra - sha256 "49389540e24b1bb0a606569a1c3cda007cc86e7a1abda920089a326f35ce5d0f" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/sccache.rb b/Formula/sccache.rb deleted file mode 100644 index 0dd43a69ee1bd..0000000000000 --- a/Formula/sccache.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Sccache < Formula - desc "Used as a compiler wrapper and avoids compilation when possible" - homepage "https://github.com/mozilla/sccache" - url "https://github.com/mozilla/sccache/archive/0.2.7.tar.gz" - sha256 "0f7e3ad60a93759a35623aa954633c94154fd00d17fe29f9413933e1c5545a52" - head "https://github.com/mozilla/sccache.git" - - bottle do - sha256 "232e1af12684c02a086f8a937caae4140488153ff3d5be6ab2e30cd6aafdc3b4" => :mojave - sha256 "5142c49377699e069a1332b4fb681fef05fff6ad406ea1e0596786fd4f192e76" => :high_sierra - sha256 "e3687eef1ca2b74c95b48c2e3df2cc4d985afaf7fd454b9eab6b4837c1e9e24e" => :sierra - sha256 "ea3758d1bfefaf31d085b8196b10d20248e5b7f2bada51457adf6efcf6411729" => :el_capitan - end - - depends_on "rust" => :build - depends_on "openssl" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix - - system "cargo", "install", "--root", prefix, "--path", ".", - "--features", "all" - end - - test do - (testpath/"hello.c").write <<~EOS - #include - int main() { - puts("Hello, world!"); - return 0; - } - EOS - system "#{bin}/sccache", "cc", "hello.c", "-o", "hello-c" - assert_equal "Hello, world!", shell_output("./hello-c").chomp - end -end diff --git a/Formula/sceptre.rb b/Formula/sceptre.rb deleted file mode 100644 index 9a74f3ac52807..0000000000000 --- a/Formula/sceptre.rb +++ /dev/null @@ -1,114 +0,0 @@ -class Sceptre < Formula - include Language::Python::Virtualenv - - desc "Build better AWS infrastructure" - homepage "https://sceptre.cloudreach.com" - url "https://github.com/cloudreach/sceptre/archive/v2.0.0.tar.gz" - sha256 "6c7376c271060089488fee0e58eb7d8714b3abb06d65bc47c22591e1351b6e3e" - - bottle do - cellar :any_skip_relocation - sha256 "6f797ad1253de1047661bb8574c1a9f72b4dcfd98054a98bf32a2667f36d7033" => :mojave - sha256 "19514193df3672678f19b7625c6f4defe61dc7b70d0142ed3c45a3acab61289b" => :high_sierra - sha256 "c4215d4fc53eca136d1ff899f3bb469d7f5797653bb887f44b138ed15d0b6fe5" => :sierra - end - - depends_on "python" - - resource "boto3" do - url "https://files.pythonhosted.org/packages/fd/50/3868735fae36e0f93216019551ca0f75b6cf9f933a55891244efefdcc3bd/boto3-1.9.62.tar.gz" - sha256 "e9e93029b0d4f91ff342ffd953048c5a64e6a1522c2362c4521864bcc88cc365" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/da/c5/8fded95d8076d0144cbe3b836277ce234cee86e1b1393f6e6e8bedbf1436/botocore-1.12.62.tar.gz" - sha256 "67ebafe2d0d6a37b62033bbc78786fdada02c38535f83d74313dc0dc281bf87d" - end - - # click version was fixed to 6.7 for sceptre 1.4.2 - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - # colorama version was fixed to 0.3.7 for sceptre 1.4.2 - resource "colorama" do - url "https://files.pythonhosted.org/packages/f0/d0/21c6449df0ca9da74859edc40208b3a57df9aca7323118c913e58d442030/colorama-0.3.7.tar.gz" - sha256 "e043c8d32527607223652021ff648fbb394d5e19cba9f1a698670b338c9d782b" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz" - sha256 "c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/ac/7e/1b4c2e05809a4414ebce0892fe1e32c14ace86ca7d50c70f00979ca9b3a3/MarkupSafe-1.1.0.tar.gz" - sha256 "4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3" - end - - # networkx was fixed to version 2.1 for sceptre 2.0.0 - resource "networkx" do - url "https://files.pythonhosted.org/packages/11/42/f951cc6838a4dff6ce57211c4d7f8444809ccbe2134179950301e5c4c83c/networkx-2.1.zip" - sha256 "64272ca418972b70a196cb15d9c85a5a6041f09a2f32e0d30c0255f25d458bb1" - end - - # packaging was fixed to version 16.8 for sceptre 1.4.2 - resource "packaging" do - url "https://files.pythonhosted.org/packages/c6/70/bb32913de251017e266c5114d0a645f262fb10ebc9bf6de894966d124e35/packaging-16.8.tar.gz" - sha256 "5d50835fdf0a7edf0b55e311b7c887786504efea1177abd7e69329a8e5ea619e" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/d0/09/3e6a5eeb6e04467b737d55f8bba15247ac0876f98fae659e58cd744430c6/pyparsing-2.3.0.tar.gz" - sha256 "f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/0e/01/68747933e8d12263d41ce08119620d9a7e5eb72c876a3442257f74490da0/python-dateutil-2.7.5.tar.gz" - sha256 "88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/9a/66/c6a5ae4dbbaf253bd662921b805e4972451a6d214d0dc9fb3300cb642320/s3transfer-0.1.13.tar.gz" - sha256 "90dc18e028989c609146e241ea153250be451e05ecc0c2832565231dacdf59c1" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"sceptre", "--help" - end -end diff --git a/Formula/schema-evolution-manager.rb b/Formula/schema-evolution-manager.rb deleted file mode 100644 index 927a4503f46ac..0000000000000 --- a/Formula/schema-evolution-manager.rb +++ /dev/null @@ -1,20 +0,0 @@ -class SchemaEvolutionManager < Formula - desc "Manage postgresql database schema migrations" - homepage "https://github.com/mbryzek/schema-evolution-manager" - url "https://github.com/mbryzek/schema-evolution-manager/archive/0.9.41.tar.gz" - sha256 "d97b6f0f97bc77dd97aeecb36a77fbe4e7840c9b71bd7c8880d8df82ab1fdf16" - - bottle :unneeded - - def install - system "./install.sh", prefix - end - - test do - (testpath/"new.sql").write <<~EOS - CREATE TABLE IF NOT EXISTS test (id text); - EOS - system "git", "init", "." - assert_match "File staged in git", shell_output("#{bin}/sem-add ./new.sql") - end -end diff --git a/Formula/scheme48.rb b/Formula/scheme48.rb deleted file mode 100644 index 4e7bb0bf59463..0000000000000 --- a/Formula/scheme48.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Scheme48 < Formula - desc "Scheme byte-code interpreter" - homepage "http://www.s48.org/" - url "http://s48.org/1.9.2/scheme48-1.9.2.tgz" - sha256 "9c4921a90e95daee067cd2e9cc0ffe09e118f4da01c0c0198e577c4f47759df4" - - bottle do - rebuild 1 - sha256 "42cacccaf71990813012cdc819702fe24a93555998ac86d54e389ea40f6f2a87" => :mojave - sha256 "590f06c7c31910eed48da06080959628982226e7b09e2aedd352fa6e4a6c2007" => :high_sierra - sha256 "e9751df2e3cfd1a007d74d541ca494a439645e3006ad354ddf65b0abfb370864" => :sierra - sha256 "af2ced8a13fdad5478f745c698b09071e71d84daca01c6e3e3c35961b06cbea4" => :el_capitan - sha256 "475d12c64562fc2498fcd8d9a8bab76d4f290444e43fcf04c40c745a7f6c6923" => :yosemite - sha256 "6ae24159bb6e2485465135ba60d60291be7681dfc9662e42f176bb9f9d4a6f00" => :mavericks - end - - def install - ENV.O0 if ENV.compiler == :clang - ENV.deparallelize - system "./configure", "--prefix=#{prefix}", "--enable-gc=bibop" - system "make" - system "make", "install" - end - - test do - (testpath/"hello.scm").write <<~EOS - (display "Hello, World!") (newline) - EOS - - expected = <<~EOS - Hello, World!\#{Unspecific} - - \#{Unspecific} - - EOS - - assert_equal expected, shell_output("#{bin}/scheme48 -a batch < hello.scm") - end -end diff --git a/Formula/schismtracker.rb b/Formula/schismtracker.rb deleted file mode 100644 index 39b9d741d8b54..0000000000000 --- a/Formula/schismtracker.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Schismtracker < Formula - desc "Portable reimplementation of Impulse Tracker" - homepage "http://schismtracker.org/" - url "https://github.com/schismtracker/schismtracker/archive/20181223.tar.gz" - sha256 "fc32930c611fdb78face87dbe8a3c62e70088fd8d4ad803140e0b9a0b2e72ad7" - head "https://github.com/schismtracker/schismtracker.git" - - bottle do - cellar :any - sha256 "c6516e30876545a812e9b554ff09297429aeec238e28ced9424811bccac5a7d2" => :mojave - sha256 "60c7b9a22c60481c3911397c6e977804d5d079d0efb88c1b200a29b108b16ecf" => :high_sierra - sha256 "28c056f38ea3d3bb68a00487ea7425f36bf67a810b1261f98b02e8d65025e48c" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "sdl" - - # CC BY-NC-ND licensed set of five mods by Keith Baylis/Vim! for testing purposes - # Mods from Mod Soul Brother: https://web.archive.org/web/20120215215707/www.mono211.com/modsoulbrother/vim.html - resource "demo_mods" do - url "https://files.scene.org/get:us-http/mirrors/modsoulbrother/vim/vim-best-of.zip" - sha256 "df8fca29ba116b10485ad4908cea518e0f688850b2117b75355ed1f1db31f580" - end - - def install - system "autoreconf", "-ivf" - - mkdir "build" do - # Makefile fails to create this directory before dropping files in it - mkdir "auto" - - system "../configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - end - - test do - testpath.install resource("demo_mods") - test_wav = testpath/"test.wav" - system "#{bin}/schismtracker", "-p", "#{testpath}/give-me-an-om.mod", - "--diskwrite=#{test_wav}" - assert_predicate test_wav, :exist? - assert_match /RIFF \(little-endian\) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz/, - shell_output("/usr/bin/file '#{test_wav}'") - end -end diff --git a/Formula/schroedinger.rb b/Formula/schroedinger.rb deleted file mode 100644 index 03455a52821fa..0000000000000 --- a/Formula/schroedinger.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Schroedinger < Formula - desc "High-speed implementation of the Dirac codec" - homepage "https://launchpad.net/schroedinger" - url "https://launchpad.net/schroedinger/trunk/1.0.11/+download/schroedinger-1.0.11.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/s/schroedinger/schroedinger_1.0.11.orig.tar.gz" - sha256 "1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912" - - bottle do - cellar :any - rebuild 1 - sha256 "ab901d9879b3bc110eeb7eadd5ab815af7d7fc446b2f5577795737c410c3bf4e" => :mojave - sha256 "1e9953cbef67e87a7ca9ebecfcc4af5f0eb2261d17f3a1195386b7512b9312be" => :high_sierra - sha256 "7d2d6d343f571e21f27ce5c13645ebe7039e4d45d2b96dba550f6383185c18f6" => :sierra - sha256 "1b990c49b7d72f3030bcee52bf70094a6cf16111867565cdb7541f670636cf05" => :el_capitan - sha256 "5b1355803b730a9727c959261f0e2afc217f77502eac88120f77941c5cf373db" => :yosemite - sha256 "64042317d9919652ab8577cec94435fb15d8eae3ad960196fc54bf9499b7c30e" => :mavericks - end - - head do - url "lp:schroedinger", :using => :bzr - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "orc" - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - # The test suite is known not to build against Orc >0.4.16 in Schroedinger 1.0.11. - # A fix is in upstream, so test when pulling 1.0.12 if this is still needed. See: - # https://www.mail-archive.com/schrodinger-devel@lists.sourceforge.net/msg00415.html - inreplace "Makefile" do |s| - s.change_make_var! "SUBDIRS", "schroedinger doc tools" - s.change_make_var! "DIST_SUBDIRS", "schroedinger doc tools" - end - - system "make", "install" - end -end diff --git a/Formula/scipy.rb b/Formula/scipy.rb deleted file mode 100644 index 091a708e724aa..0000000000000 --- a/Formula/scipy.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Scipy < Formula - desc "Software for mathematics, science, and engineering" - homepage "https://www.scipy.org" - url "https://files.pythonhosted.org/packages/ea/c8/c296904f2c852c5c129962e6ca4ba467116b08cd5b54b7180b2e77fe06b2/scipy-1.2.0.tar.gz" - sha256 "51a2424c8ed80e60bdb9a896806e7adaf24a58253b326fbad10f80a6d06f2214" - revision 1 - head "https://github.com/scipy/scipy.git" - - bottle do - cellar :any - sha256 "5da6db4ee52c220da1294131e53a03db23f35c10d9447248aa2748618b361267" => :mojave - sha256 "9bcab7ed5a3928022bf32253abfe4faf2c94da900d279a3ad949d629d432a444" => :high_sierra - sha256 "fda76c72ded4879fcf65f1402dc59675d0bdc9a769ea9c0bd681771a52101aeb" => :sierra - end - - depends_on "swig" => :build - depends_on "gcc" # for gfortran - depends_on "numpy" - depends_on "openblas" - depends_on "python" - depends_on "python@2" - - cxxstdlib_check :skip - - # https://github.com/Homebrew/homebrew-python/issues/110 - # There are ongoing problems with gcc+accelerate. - fails_with :gcc_4_2 - - def install - openblas = Formula["openblas"].opt_prefix - ENV["ATLAS"] = "None" # avoid linking against Accelerate.framework - ENV["BLAS"] = ENV["LAPACK"] = "#{openblas}/lib/libopenblas.dylib" - - config = <<~EOS - [DEFAULT] - library_dirs = #{HOMEBREW_PREFIX}/lib - include_dirs = #{HOMEBREW_PREFIX}/include - [openblas] - libraries = openblas - library_dirs = #{openblas}/lib - include_dirs = #{openblas}/include - EOS - - Pathname("site.cfg").write config - - ["python2", "python3"].each do |python| - version = Language::Python.major_minor_version python - ENV["PYTHONPATH"] = Formula["numpy"].opt_lib/"python#{version}/site-packages" - ENV.prepend_create_path "PYTHONPATH", lib/"python#{version}/site-packages" - system python, "setup.py", "build", "--fcompiler=gnu95" - system python, *Language::Python.setup_install_args(prefix) - end - end - - # cleanup leftover .pyc files from previous installs which can cause problems - # see https://github.com/Homebrew/homebrew-python/issues/185#issuecomment-67534979 - def post_install - rm_f Dir["#{HOMEBREW_PREFIX}/lib/python*.*/site-packages/scipy/**/*.pyc"] - end - - def caveats - homebrew_site_packages = Language::Python.homebrew_site_packages - user_site_packages = Language::Python.user_site_packages "python" - <<~EOS - If you use system python (that comes - depending on the OS X version - - with older versions of numpy, scipy and matplotlib), you may need to - ensure that the brewed packages come earlier in Python's sys.path with: - mkdir -p #{user_site_packages} - echo 'import sys; sys.path.insert(1, "#{homebrew_site_packages}")' >> #{user_site_packages}/homebrew.pth - EOS - end - - test do - ["python2", "python3"].each do |python| - system python, "-c", "import scipy" - end - end -end diff --git a/Formula/scm-manager.rb b/Formula/scm-manager.rb deleted file mode 100644 index 5663ac3630904..0000000000000 --- a/Formula/scm-manager.rb +++ /dev/null @@ -1,72 +0,0 @@ -class ScmManager < Formula - desc "Manage Git, Mercurial, and Subversion repos over HTTP" - homepage "https://www.scm-manager.org" - url "https://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.59/scm-server-1.59-app.tar.gz" - sha256 "8628e82f3bfd452412260dd2d82c2e76ee57013223171f2908d75cbc6258f261" - - bottle do - cellar :any_skip_relocation - sha256 "d28ad275b745fb546973c9d451df374f994eaeade2d351732ab31a7141260372" => :mojave - sha256 "42e177bd72cba3b27750308aeeaf8afa0ec8cc553b8a9acf1a02a6d5a698ce14" => :high_sierra - sha256 "42e177bd72cba3b27750308aeeaf8afa0ec8cc553b8a9acf1a02a6d5a698ce14" => :sierra - sha256 "42e177bd72cba3b27750308aeeaf8afa0ec8cc553b8a9acf1a02a6d5a698ce14" => :el_capitan - end - - depends_on :java => "1.8" - - resource "client" do - url "https://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.59/scm-cli-client-1.59-jar-with-dependencies.jar" - sha256 "ac09437ae6cf20d07224895b30b23369e142055b9d1713835d8c0e3095bf68d2" - end - - def install - rm_rf Dir["bin/*.bat"] - - libexec.install Dir["*"] - - (bin/"scm-server").write <<~EOS - #!/bin/bash - BASEDIR="#{libexec}" - REPO="#{libexec}/lib" - export JAVA_HOME=$(#{Language::Java.java_home_cmd("1.8")}) - "#{libexec}/bin/scm-server" "$@" - EOS - chmod 0755, bin/"scm-server" - - tools = libexec/"tools" - tools.install resource("client") - - scm_cli_client = bin/"scm-cli-client" - scm_cli_client.write <<~EOS - #!/bin/bash - export JAVA_HOME=$(#{Language::Java.java_home_cmd("1.8")}) - java -jar "#{tools}/scm-cli-client-#{version}-jar-with-dependencies.jar" "$@" - EOS - chmod 0755, scm_cli_client - end - - plist_options :manual => "scm-server start" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/scm-server - start - - RunAtLoad - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/scm-cli-client version") - end -end diff --git a/Formula/scmpuff.rb b/Formula/scmpuff.rb deleted file mode 100644 index ae583f6b2218e..0000000000000 --- a/Formula/scmpuff.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Scmpuff < Formula - desc "Adds numbered shortcuts for common git commands" - homepage "https://mroth.github.io/scmpuff/" - url "https://github.com/mroth/scmpuff/archive/v0.2.1.tar.gz" - sha256 "6855562be9788a0fcf69102546f3bf8ccac063086d28a9a3f1ab4947e9dd08e2" - - bottle do - cellar :any_skip_relocation - sha256 "68db211b016db1cfeab8359edc1f0643551cdefddf309ffa09d707fda1ff8a16" => :mojave - sha256 "a09454488aec6c6990f258473c1cdcd722b7f615fff662d040acee353df9a0ee" => :high_sierra - sha256 "3532b6f0d95310bede8ccb33b13ad4dbb657563744ea3accf641fa27e34a37b4" => :sierra - sha256 "3dd4f5a5a6760a6e92c57e69dda4e689eb33787ebbbad01482a3ae0fb26c4445" => :el_capitan - sha256 "fc633135611451e73386836b3d2a9bdd63b25065bcf6cae4228239af0fc05a04" => :yosemite - end - - depends_on "go" => :build - - def install - mkdir_p buildpath/"src/github.com/mroth" - ln_s buildpath, buildpath/"src/github.com/mroth/scmpuff" - ENV["GOPATH"] = buildpath - - # scmpuff's build script normally does version detection which depends on - # being checked out via git repo -- instead have homebrew specify version. - system "go", "build", "-o", "#{bin}/scmpuff", "-ldflags", "-X main.VERSION=#{version}", "./src/github.com/mroth/scmpuff" - end - - test do - ENV["e1"] = "abc" - assert_equal "abc", shell_output("#{bin}/scmpuff expand 1").strip - end -end diff --git a/Formula/scons.rb b/Formula/scons.rb deleted file mode 100644 index b16549e12e51c..0000000000000 --- a/Formula/scons.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Scons < Formula - desc "Substitute for classic 'make' tool with autoconf/automake functionality" - homepage "https://www.scons.org/" - url "https://downloads.sourceforge.net/project/scons/scons/3.0.1/scons-3.0.1.tar.gz" - sha256 "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173" - - bottle do - cellar :any_skip_relocation - sha256 "169ca2e43315449b82c660d78c9586a0662c59ea069b09bdf7f941f6a4afff9f" => :mojave - sha256 "c791b4905477a5fbc33345cef5e412807ffc90ba6ea35bfc9a263f542702aa1c" => :high_sierra - sha256 "c791b4905477a5fbc33345cef5e412807ffc90ba6ea35bfc9a263f542702aa1c" => :sierra - sha256 "c791b4905477a5fbc33345cef5e412807ffc90ba6ea35bfc9a263f542702aa1c" => :el_capitan - end - - def install - man1.install gzip("scons-time.1", "scons.1", "sconsign.1") - system "/usr/bin/python", "setup.py", "install", - "--prefix=#{prefix}", - "--standalone-lib", - # SCons gets handsy with sys.path---`scons-local` is one place it - # will look when all is said and done. - "--install-lib=#{libexec}/scons-local", - "--install-scripts=#{bin}", - "--install-data=#{libexec}", - "--no-version-script", "--no-install-man" - - # Re-root scripts to libexec so they can import SCons and symlink back into - # bin. Similar tactics are used in the duplicity formula. - bin.children.each do |p| - mv p, "#{libexec}/#{p.basename}.py" - bin.install_symlink "#{libexec}/#{p.basename}.py" => p.basename - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - printf("Homebrew"); - return 0; - } - EOS - (testpath/"SConstruct").write "Program('test.c')" - system bin/"scons" - assert_equal "Homebrew", shell_output("#{testpath}/test") - end -end diff --git a/Formula/scour.rb b/Formula/scour.rb deleted file mode 100644 index a49dc600e7e19..0000000000000 --- a/Formula/scour.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Scour < Formula - include Language::Python::Virtualenv - - desc "SVG file scrubber" - homepage "https://www.codedread.com/scour/" - url "https://github.com/scour-project/scour/archive/v0.37.tar.gz" - sha256 "4fcb961586d8a6d98ac9343ca5647421b98fdc79b51d81a1d3d18576b7908823" - revision 1 - head "https://github.com/scour-project/scour.git" - - bottle do - cellar :any_skip_relocation - sha256 "df293a2b797a034bfad0f70ceea4224c7ebf4c3bb9dc5f4c00b7e7f660dd9872" => :mojave - sha256 "2b7a9141c9bdf1f81504ef26d6f5d8a406960a80524e161ac72511c02d80053f" => :high_sierra - sha256 "034447e6f32a3c4925682911e97a89d62ca418347ad0be425a64d299db1f7f20" => :sierra - end - - depends_on "python" - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/scour", "-i", test_fixtures("test.svg"), "-o", "scrubbed.svg" - assert_predicate testpath/"scrubbed.svg", :exist? - end -end diff --git a/Formula/scrcpy.rb b/Formula/scrcpy.rb deleted file mode 100644 index f9cfa70d66310..0000000000000 --- a/Formula/scrcpy.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Scrcpy < Formula - desc "Display and control your Android device" - homepage "https://github.com/Genymobile/scrcpy" - url "https://github.com/Genymobile/scrcpy/archive/v1.5.tar.gz" - sha256 "9eef28d352d064320b8a2b9cc1000d478fb617a99807f2456a54af855b39ecf9" - - bottle do - sha256 "3f1fc3cb5964c4f94383531dca5a548e24680fc3698d33bf65a90c1edf4a9346" => :mojave - sha256 "457937e11c5eff7accd216cf8cb0b1ace90f1eec22171c1b2e90edc590d6b383" => :high_sierra - sha256 "1b2d6071d5afb0d583a8a7bcd2fd277f364e67c41766f59865764d668f4d3071" => :sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "sdl2" - - resource "prebuilt-server" do - url "https://github.com/Genymobile/scrcpy/releases/download/v1.5/scrcpy-server-v1.5.jar" - sha256 "c827f566172a5c5946e63b8378ac93d374dff9e229083e5cd9980df57536947b" - end - - def install - r = resource("prebuilt-server") - r.verify_download_integrity(r.fetch) - cp r.cached_download, buildpath/"prebuilt-server.jar" - - mkdir "build" do - system "meson", "--prefix=#{prefix}", - "--buildtype=release", - "-Dprebuilt_server=#{buildpath}/prebuilt-server.jar", - ".." - - system "ninja", "install" - end - end - - def caveats; <<~EOS - At runtime, adb must be accessible from your PATH. - - You can install adb from Homebrew Cask: - brew cask install android-platform-tools - EOS - end - - test do - fakeadb = (testpath/"fakeadb.sh") - - # When running, scrcpy calls adb three times: - # - adb push ... (to push scrcpy-server.jar) - # - adb reverse ... tcp:PORT ... - # - adb shell ... - # However, exiting on $1 = shell didn't work properly, so instead - # fakeadb exits on $1 = reverse - - fakeadb.write <<~EOS - #!/bin/sh - echo $@ >> #{testpath/"fakeadb.log"} - - if [ "$1" = "reverse" ]; then - exit 42 - fi - EOS - - fakeadb.chmod 0755 - ENV["ADB"] = fakeadb - - # It's expected to fail after adb reverse step because fakeadb exits - # with code 42 - out = shell_output("#{bin}/scrcpy -p 1337 2>&1", 1) - assert_match(/ 42/, out) - - log_content = File.read(testpath/"fakeadb.log") - - # Check that it used port we've specified - assert_match(/tcp:1337/, log_content) - - # Check that it tried to push something from its prefix - assert_match(/push #{prefix}/, log_content) - end -end diff --git a/Formula/screen.rb b/Formula/screen.rb deleted file mode 100644 index 5e5a0a2adbc4b..0000000000000 --- a/Formula/screen.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Screen < Formula - desc "Terminal multiplexer with VT100/ANSI terminal emulation" - homepage "https://www.gnu.org/software/screen" - - stable do - url "https://ftp.gnu.org/gnu/screen/screen-4.6.2.tar.gz" - mirror "https://ftpmirror.gnu.org/screen/screen-4.6.2.tar.gz" - sha256 "1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a" - - # This patch is to disable the error message - # "/var/run/utmp: No such file or directory" on launch - patch :p2 do - url "https://gist.githubusercontent.com/yujinakayama/4608863/raw/75669072f227b82777df25f99ffd9657bd113847/gistfile1.diff" - sha256 "9c53320cbe3a24c8fb5d77cf701c47918b3fabe8d6f339a00cfdb59e11af0ad5" - end - end - - bottle do - sha256 "ba5b400eb46f44507a473fb6fc749e384cb1d8f1677303135228bfb1a0d9de1b" => :mojave - sha256 "8f49501b0a53d9160060c05b46c2b120334795a19134ac80a021b298c731e864" => :high_sierra - sha256 "6c1a701f2166ccb235bbb961b0ce4e526bad87dd1d923c97fb00fc15cb1fc961" => :sierra - sha256 "f01ac1d6e94e5d5fabef9dd7c458ebe30cad4ecdde37c188e40bb4c5247cdb1d" => :el_capitan - end - - head do - url "https://git.savannah.gnu.org/git/screen.git" - - # This patch avoid a bug that prevents detached sessions to reattach - # See https://lists.gnu.org/archive/html/screen-users/2016-10/msg00007.html - patch do - url "https://gist.githubusercontent.com/sobrinho/5a7672e088868c2d036957dbe7825dd0/raw/c6fe5dc20cb7dbd0e23f9053aa3867fcbc01d983/diff.patch" - sha256 "47892633ccb137316a0532b034d0be81edc26fc72a6babca9761a1649bc67fd1" - end - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - cd "src" if build.head? - - # With parallel build, it fails - # because of trying to compile files which depend osdef.h - # before osdef.sh script generates it. - ENV.deparallelize - - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}", - "--enable-colors256", - "--enable-pam" - - system "make" - system "make", "install" - end - - test do - shell_output("#{bin}/screen -h", 1) - end -end diff --git a/Formula/screenfetch.rb b/Formula/screenfetch.rb deleted file mode 100644 index 4281be5c25988..0000000000000 --- a/Formula/screenfetch.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Screenfetch < Formula - desc "Generate ASCII art with terminal, shell, and OS info" - homepage "https://github.com/KittyKatt/screenFetch" - url "https://github.com/KittyKatt/screenFetch/archive/v3.8.0.tar.gz" - sha256 "248283ee3c24b0dbffb79ed685bdd518554073090c1c167d07ad2a729db26633" - head "https://github.com/KittyKatt/screenFetch.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "3e69c6119f9b9b4133817ce2d06de71317866c0b4aa08773aec038abef2d31ef" => :mojave - sha256 "8e0571c592a9ae4b20d7e88e12dcbde9b722856721c3227d3334800cfd8445f5" => :high_sierra - sha256 "62441999c591325de600f4cbd5d46e4157c443cfb514a3b1dfce8764c911785d" => :sierra - sha256 "62441999c591325de600f4cbd5d46e4157c443cfb514a3b1dfce8764c911785d" => :el_capitan - sha256 "62441999c591325de600f4cbd5d46e4157c443cfb514a3b1dfce8764c911785d" => :yosemite - end - - def install - bin.install "screenfetch-dev" => "screenfetch" - man1.install "screenfetch.1" - end - - test do - system "#{bin}/screenfetch" - end -end diff --git a/Formula/screenresolution.rb b/Formula/screenresolution.rb deleted file mode 100644 index d97355f0f9756..0000000000000 --- a/Formula/screenresolution.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Screenresolution < Formula - desc "Get, set, and list display resolution" - homepage "https://github.com/jhford/screenresolution" - url "https://github.com/jhford/screenresolution/archive/v1.6.tar.gz" - sha256 "d3761663eaf585b014391a30a77c9494a6404e78e8a4863383e12c59b0f539eb" - head "https://github.com/jhford/screenresolution.git" - - bottle do - cellar :any_skip_relocation - sha256 "15d61e87178dbe8ef88c9cb75251f472efc42830b1a2c5be25e4a5bd074e0c66" => :mojave - sha256 "b2f7b0933c734d5ecd8bfafae8d384f20821c45ca38fc81308035d3ca79f3535" => :high_sierra - sha256 "ef630f5af67d6bcdde3fd580917ad05d871274f0d62b2a76705ab2b9683f334f" => :sierra - sha256 "63cfb53fe13d5f5b2c72e8a644b312f8a144b12e2b3f284de5adfc5010e1570d" => :el_capitan - sha256 "3b3f5d4c414aa36ee1ce963d47a82a50e06f1ffc7a36759bf13ee12c43845c73" => :yosemite - sha256 "9e6944af938c0c9ec9e1e4a79a6849fabb222baa0d977a9425bee6a2827595d0" => :mavericks - end - - def install - system "make", "CC=#{ENV.cc}" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "#{bin}/screenresolution", "get" - end -end diff --git a/Formula/scriptcs.rb b/Formula/scriptcs.rb deleted file mode 100644 index 7c7682559bc2f..0000000000000 --- a/Formula/scriptcs.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Scriptcs < Formula - desc "Tools to write and execute C#" - homepage "https://github.com/scriptcs/scriptcs" - url "https://github.com/scriptcs/scriptcs/archive/v0.17.1.tar.gz" - sha256 "e876118d82f52cbdd9569783ec9278c4ac449055aa628cdcb2d785bf8098a434" - - bottle do - cellar :any_skip_relocation - sha256 "121137df4078b2819a16f0f3e75924b10eba51a3ca7ac0a4be3d9010d2d1f7aa" => :mojave - sha256 "263fda7addb857a9ed3c0c15856c422d3684ad069c2efc644858bb1779a92e91" => :high_sierra - sha256 "9ccece2f779060ab23e699b07d6cc6ce0b2c2e0058cc995b1541e1170f69a6eb" => :sierra - sha256 "e3b6cb117d23ccf9a745e0ac5e61fcb531d7e8a08476699d2ece6c31e564450e" => :el_capitan - sha256 "21891cea519df48979320ba74660002d270fb414181e3f7087505169af15a471" => :yosemite - end - - depends_on "mono" - - def install - script_file = "scriptcs.sh" - system "sh", "./build_brew.sh" - libexec.install Dir["src/ScriptCs/bin/Release/*"] - (libexec/script_file).write <<~EOS - #!/bin/bash - mono #{libexec}/scriptcs.exe $@ - EOS - (libexec/script_file).chmod 0755 - bin.install_symlink libexec/script_file => "scriptcs" - end - - test do - test_file = "tests.csx" - (testpath/test_file).write('Console.WriteLine("{0}, {1}!", "Hello", "world");') - assert_equal "Hello, world!", `scriptcs #{test_file}`.strip - end -end diff --git a/Formula/scrollkeeper.rb b/Formula/scrollkeeper.rb deleted file mode 100644 index c0b017642275d..0000000000000 --- a/Formula/scrollkeeper.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Scrollkeeper < Formula - desc "Transitional package for scrollkeeper" - homepage "https://scrollkeeper.sourceforge.io/" - url "https://downloads.sourceforge.net/project/scrollkeeper/scrollkeeper/0.3.14/scrollkeeper-0.3.14.tar.gz" - sha256 "4a0bd3c3a2c5eca6caf2133a504036665485d3d729a16fc60e013e1b58e7ddad" - revision 1 - - bottle do - sha256 "558b4f276e0be95dc032a6f8edc391a2910fc6d9ff82a1174de989b4392dd12d" => :mojave - sha256 "1b52ea53b42082614d8663a847db551dd0a793ea4e8b22b2c89f35c020d5c932" => :high_sierra - sha256 "d1722082c68c3a2910fafd049b8f469a91e29586798b1b7ffc6cdb5b4e1b8f2d" => :sierra - sha256 "fe0171c12bd61b59032a0914fd2279ca91132a714993d2dddd0f2641d8cb8142" => :el_capitan - sha256 "ca1090d4daf705fc9bddc18b303ed1bf511ebd1173bcb48b17f5e47daab74351" => :yosemite - sha256 "7e302cb0c50b34bf47cceefa2c79a8b565b06e7d850ea07f10992598c2058773" => :mavericks - end - - depends_on "docbook" - depends_on "gettext" - - conflicts_with "rarian", - :because => "scrollkeeper and rarian install the same binaries." - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-xml-catalog=#{etc}/xml/catalog" - system "make" - system "make", "install" - end -end diff --git a/Formula/scrub.rb b/Formula/scrub.rb deleted file mode 100644 index b7745a6aa8357..0000000000000 --- a/Formula/scrub.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Scrub < Formula - desc "Writes patterns on magnetic media to thwart data recovery" - homepage "https://code.google.com/archive/p/diskscrub/" - url "https://github.com/chaos/scrub/releases/download/2.6.1/scrub-2.6.1.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/s/scrub/scrub_2.6.1.orig.tar.gz" - sha256 "43d98d3795bc2de7920efe81ef2c5de4e9ed1f903c35c939a7d65adc416d6cb8" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9343d2cc328739d3315f319eeb6704cbd8e98e8105065ff194fcb51456114c4e" => :mojave - sha256 "c9e96dce0a6f2d7c3b32d481aae3a3aa2c0f42cd3c53b10e2fd60c6479ebf128" => :high_sierra - sha256 "703ee9b222437bf008ceaa25ab802ace51f207bcba8503f88037896aee2fde40" => :sierra - sha256 "82343d8c3b64b876f8afb208059c3a916590b45fe7998ee412d91d3df161fc92" => :el_capitan - sha256 "40363789d6def7a867c3268832449f4f2ae5b3394f84c9063af2417c024f0eca" => :yosemite - sha256 "2439531406dc59f8358b9a3fe242fd867643dd30c67a810e18ffb12dc09d9954" => :mavericks - end - - head do - url "https://github.com/chaos/scrub.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - path = testpath/"foo.txt" - path.write "foo" - - output = shell_output("#{bin}/scrub -r -p dod #{path}") - assert_match "scrubbing #{path}", output - refute_predicate path, :exist? - end -end diff --git a/Formula/scrypt.rb b/Formula/scrypt.rb deleted file mode 100644 index e86591521f086..0000000000000 --- a/Formula/scrypt.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Scrypt < Formula - desc "Encrypt and decrypt files using memory-hard password function" - homepage "https://www.tarsnap.com/scrypt.html" - url "https://www.tarsnap.com/scrypt/scrypt-1.2.1.tgz" - sha256 "4621f5e7da2f802e20850436219370092e9fcda93bd598f6d4236cce33f4c577" - - bottle do - cellar :any - sha256 "dbe434d01b09f02e1cc7fee6e163acd87d70270aecc355907fbf99dbc98fd59c" => :mojave - sha256 "fa929a235e8b07184fd77a35fb38d0ce08e4d627130057144ba40873b355702d" => :high_sierra - sha256 "d2f0f0170d78fae63833094fbdcb920489c9e04fb4579a0b82ca527ebd7bb12f" => :sierra - sha256 "2028c6a6a14d6753deae95d35d94c75cfcc64633ed69b3fea7f9da7a47d079b1" => :el_capitan - sha256 "15c52d5c143e002bd5dec4bb70020f0ff05f66a85067e187e1a08b0d04f3b9f5" => :yosemite - end - - head do - url "https://github.com/Tarsnap/scrypt.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "openssl" - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.sh").write <<~EOS - #!/usr/bin/expect -f - set timeout -1 - spawn #{bin}/scrypt enc homebrew.txt homebrew.txt.enc - expect -exact "Please enter passphrase: " - send -- "Testing\n" - expect -exact "\r - Please confirm passphrase: " - send -- "Testing\n" - expect eof - EOS - chmod 0755, testpath/"test.sh" - touch "homebrew.txt" - - system "./test.sh" - assert_predicate testpath/"homebrew.txt.enc", :exist? - end -end diff --git a/Formula/scummvm-tools.rb b/Formula/scummvm-tools.rb deleted file mode 100644 index 75e27d3b0ce6d..0000000000000 --- a/Formula/scummvm-tools.rb +++ /dev/null @@ -1,31 +0,0 @@ -class ScummvmTools < Formula - desc "Collection of tools for ScummVM" - homepage "https://www.scummvm.org/" - url "https://www.scummvm.org/frs/scummvm-tools/2.0.0/scummvm-tools-2.0.0.tar.xz" - sha256 "c2042ccdc6faaf745552bac2c00f213da382a7e382baa96343e508fced4451b3" - head "https://github.com/scummvm/scummvm-tools.git" - - bottle do - sha256 "5914f77097fe7684e1a8718cbede0d994c9d52d400e6b47eff9c70d6d683e34d" => :mojave - sha256 "84313eb5337d2f3c37f9ad5c494da4b43546422f9428f33dcf9b0c2af54473b8" => :high_sierra - sha256 "5a9144ac0d1812d401ff76df988bac6bc681903bd94aad2b3f97a2e2279e9d73" => :sierra - sha256 "c68cf67ed07a34a4db800598a64b6eb293ac714da6706ef89e58ce9a13ecde99" => :el_capitan - end - - depends_on "boost" - depends_on "flac" - depends_on "freetype" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mad" - depends_on "wxmac" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/scummvm-tools-cli", "--list" - end -end diff --git a/Formula/scummvm.rb b/Formula/scummvm.rb deleted file mode 100644 index 39ba4dc913f63..0000000000000 --- a/Formula/scummvm.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Scummvm < Formula - desc "Graphic adventure game interpreter" - homepage "https://www.scummvm.org/" - url "https://www.scummvm.org/frs/scummvm/2.0.0/scummvm-2.0.0.tar.xz" - sha256 "9784418d555ba75822d229514a05cf226b8ce1a751eec425432e6b7e128fca60" - head "https://github.com/scummvm/scummvm.git" - - bottle do - sha256 "2248018926e2f50dcb66d7162215362ced94733b4ed88bce08a9ca4310223c3c" => :mojave - sha256 "1de93783f408c2cfc634d8f13c8cb7db1e2544d021f15e0484e64a92af2ed3db" => :high_sierra - sha256 "bd2da4d91eb4e0f8fcf69ad9383a89979c73e539f1b1a5df8d7d99dc01fb67c5" => :sierra - sha256 "26dce34185c67fe8034effb99e248b9b68344063194ccb20c8c166b2f6c58dfb" => :el_capitan - end - - depends_on "faad2" - depends_on "flac" - depends_on "fluid-synth" - depends_on "freetype" - depends_on "jpeg" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mad" - depends_on "sdl2" - depends_on "theora" - - def install - system "./configure", "--prefix=#{prefix}", "--enable-release" - system "make" - system "make", "install" - (share+"pixmaps").rmtree - (share+"icons").rmtree - end - - test do - system "#{bin}/scummvm", "-v" - end -end diff --git a/Formula/scw.rb b/Formula/scw.rb deleted file mode 100644 index b1c00df2eb205..0000000000000 --- a/Formula/scw.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Scw < Formula - desc "Manage BareMetal Servers from command-line (as easily as with Docker)" - homepage "https://github.com/scaleway/scaleway-cli" - url "https://github.com/scaleway/scaleway-cli/archive/v1.17.tar.gz" - sha256 "8e9bdd72cbc5a9e6f89e61017c8f6f8b070b5dab23d926d9234ef5cd9e014eda" - head "https://github.com/scaleway/scaleway-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "aa6c21ccf356953d905c5488cb45db36c5fee6b98d7e8123fb5aa7aaac311269" => :mojave - sha256 "de6c55818edca4e83724e54cf674f31683f32467abbeff92b35809be38e04a19" => :high_sierra - sha256 "9e9652cb4c37db3d9dcb6c9ded77d2cc268c521640446baf9d473ad82a620085" => :sierra - sha256 "477f07db8b60db095eab5110d4fbd441e54ed567a540f100d293a6a384fadf94" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = buildpath - (buildpath/"src/github.com/scaleway/scaleway-cli").install Dir["*"] - - system "go", "build", "-o", "#{bin}/scw", "-v", "-ldflags", - "-X github.com/scaleway/scaleway-cli/pkg/scwversion.GITCOMMIT=homebrew", - "github.com/scaleway/scaleway-cli/cmd/scw/" - - bash_completion.install "src/github.com/scaleway/scaleway-cli/contrib/completion/bash/scw.bash" - zsh_completion.install "src/github.com/scaleway/scaleway-cli/contrib/completion/zsh/_scw" - end - - test do - output = shell_output(bin/"scw version") - assert_match "OS/Arch (client): darwin/amd64", output - end -end diff --git a/Formula/sdb.rb b/Formula/sdb.rb deleted file mode 100644 index 04cd6036e04fe..0000000000000 --- a/Formula/sdb.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Sdb < Formula - desc "Ondisk/memory hashtable based on CDB" - homepage "https://github.com/radare/sdb" - url "https://github.com/radare/sdb/archive/1.3.0.tar.gz" - sha256 "e44ee7266a9f35cf81297739f9a41de89394166cc908494a4d5b7d81d6aedbc6" - head "https://github.com/radare/sdb.git" - - bottle do - cellar :any - sha256 "863aea9679becb97cc5d9f64bbb714a226149db7f5a7b09143ad05517f9aed72" => :mojave - sha256 "c25fed7f1923890c98ed5da6adb178feff0208d55f7c51bff55a1552d61339cb" => :high_sierra - sha256 "c0be2ac314a7655b4b0b0f2928c1bacd3b568948dda7682386dee9c797d0a401" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"sdb", testpath/"d", "hello=world" - assert_equal "world", shell_output("#{bin}/sdb #{testpath}/d hello").strip - end -end diff --git a/Formula/sdcc.rb b/Formula/sdcc.rb deleted file mode 100644 index a354b97f1ebe9..0000000000000 --- a/Formula/sdcc.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sdcc < Formula - desc "ANSI C compiler for Intel 8051, Maxim 80DS390, and Zilog Z80" - homepage "https://sdcc.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sdcc/sdcc/3.8.0/sdcc-src-3.8.0.tar.bz2" - sha256 "b331668deb7bd832efd112052e5b0ed2313db641a922bd39280ba6d47adbbb21" - head "http://svn.code.sf.net/p/sdcc/code/trunk/sdcc" - - bottle do - sha256 "f4ab0af5aedcbcc75312e82ac1bf771fb4a9b1763d5b591b390a7e1dec523f32" => :mojave - sha256 "bd962ac68c84d91e7768ba664369e94608fc39fca0085a6c7c696b96f0b3d7b6" => :high_sierra - sha256 "cba250c36a04f486e966a0305420f67bf1c6005e60812d181c5894fd83991f45" => :sierra - end - - depends_on "boost" - depends_on "gputils" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "all" - system "make", "install" - rm Dir["#{bin}/*.el"] - end - - test do - system "#{bin}/sdcc", "-v" - end -end diff --git a/Formula/sdcv.rb b/Formula/sdcv.rb deleted file mode 100644 index fa3cbc44abaf6..0000000000000 --- a/Formula/sdcv.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Sdcv < Formula - desc "StarDict Console Version" - homepage "https://dushistov.github.io/sdcv/" - url "https://github.com/Dushistov/sdcv/archive/v0.5.2.tar.gz" - sha256 "ec08dc084a0748d5a89df01a20bbf294f09b0366295cd418000f15d2e043c4f7" - version_scheme 1 - head "https://github.com/Dushistov/sdcv.git" - - bottle do - sha256 "b209cbb4840c5807cfa1c10285d2fe10bcb0e232f002cc55f691f1f5a28acb71" => :mojave - sha256 "e6308c18ac35af9482344e8144a1adbfdc1acf6ca49aa590f1a8ee4d456f4694" => :high_sierra - sha256 "e095b55dc837c81a8a5cd003579ed26cdfd20b2263b0ddca3adba1bdbf89390d" => :sierra - sha256 "43faef6640e9a8a01c78ea7816828966e42fd2aa6a110d947a72e0c930b0ee50" => :el_capitan - sha256 "f50d16cbcc92cc9bdfdea0aed25e10f8403f877f7a44830de420246eb2a4dfe7" => :yosemite - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "readline" - - # see: https://github.com/Homebrew/homebrew/issues/26321 - needs :cxx11 - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "lang" - system "make", "install" - end - end - - test do - system bin/"sdcv", "-h" - end -end diff --git a/Formula/sdedit.rb b/Formula/sdedit.rb deleted file mode 100644 index 52cf76682c425..0000000000000 --- a/Formula/sdedit.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Sdedit < Formula - desc "Tool for generating sequence diagrams very quickly" - homepage "https://sdedit.sourceforge.io" - url "https://downloads.sourceforge.net/project/sdedit/sdedit/4.0/sdedit-4.01.jar" - sha256 "060576f9fe79bda0a65f2cfa0b041fceaf7846f034a7519ef939b73ae82673f1" - - bottle :unneeded - - depends_on :java => "1.5+" - - def install - libexec.install "sdedit-#{version}.jar" - bin.write_jar_script libexec/"sdedit-#{version}.jar", "sdedit" - end - - test do - (testpath/"test.sd").write <<~EOS - #![SD ticket order] - ext:External[pe] - user:Actor - EOS - system "java", "-jar", "#{libexec}/sdedit-#{version}.jar", "-t", "pdf", - "-o", testpath/"test.pdf", testpath/"test.sd" - end -end diff --git a/Formula/sdf.rb b/Formula/sdf.rb deleted file mode 100644 index 2e7cd445d1b63..0000000000000 --- a/Formula/sdf.rb +++ /dev/null @@ -1,223 +0,0 @@ -class Sdf < Formula - desc "Syntax Definition Formalism: high-level description of grammars" - homepage "https://strategoxt.org/Sdf/WebHome" - url "http://www.meta-environment.org/releases/sdf-2.6.3.tar.gz" - sha256 "181ae979118d75c6163f2acec8e455952f3033378a4518b0b829d26a96e10b3d" - - bottle do - cellar :any - rebuild 1 - sha256 "622635ef7983bccc9510e1c95e96af57da34345bbe20d85021a1145ee195be2d" => :mojave - sha256 "7bb04c7929c2a4ba22edb621f57f5d3ae9dd27713978ed7ae3efe7cfe295503d" => :high_sierra - sha256 "e30e7e02213cfabc3cf5a6499905eed7657ccaf84e4612a8b9ef1bba1b4b308b" => :sierra - sha256 "7b99bc3c67466c7bde1e59908b82f023962e14df0e0ae83bfcebcd2e11ca5f29" => :el_capitan - sha256 "abadd2d273826b42b95fd342bf3a7c8a523d0126b8d9aedfcec67b21bcbc6d6f" => :yosemite - sha256 "d29da190673806e54a235b203658a5123007511c48ca7d7a408bc4fed5c3bc51" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "aterm" - - fails_with :clang do - build 425 - cause <<~EOS - ParsedError.c:15434:611: fatal error: parser recursion - limit reached, program too complex - EOS - end - - resource "c-library" do - url "http://www.meta-environment.org/releases/c-library-1.2.tar.gz" - sha256 "08fdec0faf3c941203ff3decaf518117f49f62a42b111bac39d88e62c453b066" - end - - resource "toolbuslib" do - url "http://www.meta-environment.org/releases/toolbuslib-1.1.tar.gz" - sha256 "20f3d55b71b1e1ccf52b62e705a7dd7097ede764885d7ffd1030d27342069838" - end - - resource "error-support" do - url "http://www.meta-environment.org/releases/error-support-1.6.tar.gz" - sha256 "634c0a1b5da8ef3b277d785d5df458dd7526da79aedd7d0537678204731dbc69" - end - - resource "pt-support" do - url "http://www.meta-environment.org/releases/pt-support-2.4.tar.gz" - sha256 "85c8702cc96941f4190e01ceb6cf0ba61f8bc00cedd3776f01e6bc5c21847992" - end - - resource "sdf-support" do - url "http://www.meta-environment.org/releases/sdf-support-2.5.tar.gz" - sha256 "40b324d4a20f31cc4e2393fb8009125a2307d10a2ba1017ac30fd5ed859e5f7d" - end - - resource "asf-support" do - url "http://www.meta-environment.org/releases/asf-support-1.8.tar.gz" - sha256 "cc42fe4245b12f1ca8bcc69a36963dca4145ed6474279d89881ae0a65c7ec711" - end - - resource "tide-support" do - url "http://www.meta-environment.org/releases/tide-support-1.3.1.tar.gz" - sha256 "4bd8228fee08f84332ab6d5e2cc7dae26ddcdf92c924d477864d48066306c81a" - end - - resource "rstore-support" do - url "http://www.meta-environment.org/releases/rstore-support-1.0.tar.gz" - sha256 "86bc1fa5b83718255f5f7a40b83c62f73dbbf614cb21f05df551b57548c25039" - end - - resource "config-support" do - url "http://www.meta-environment.org/releases/config-support-1.4.tar.gz" - sha256 "b1e6e696a4a3318c6cd688291dbb9b543d68f54196df71bca6530173f661904e" - end - - resource "ptable-support" do - url "http://www.meta-environment.org/releases/ptable-support-1.2.tar.gz" - sha256 "c9d219a477392e8ee7b08c2e51195190fe5c4c195e5b2cb0c13bb91a750f1d2f" - end - - resource "sglr" do - url "http://www.meta-environment.org/releases/sglr-4.5.3.tar.gz" - sha256 "e748695bb97c7954da0279a2ec8d871bd810b403002c3307e4229a2cc64c78cc" - end - - resource "asc-support" do - url "http://www.meta-environment.org/releases/asc-support-2.6.tar.gz" - sha256 "acf5f93374d348e9aeba9590cb70392c199d2c031a6bb45d93d5f636911978eb" - end - - resource "pgen" do - url "http://www.meta-environment.org/releases/pgen-2.8.1.tar.gz" - sha256 "8140d07d7512a7e963d16325427f8acaecc1dd12a23ef67593629cab6d36bd7c" - end - - resource "pandora" do - url "http://www.meta-environment.org/releases/pandora-1.6.tar.gz" - sha256 "d62156efc4c2a921da9e1390423c72416f1d65e2ce0c97b9fbd372e51c2df28a" - end - - def install - ENV.deparallelize # build is not parallel-safe - ENV.append "CFLAGS", "-std=gnu89 -fbracket-depth=1024" if ENV.compiler == :clang - - resource("c-library").stage do - system "./configure", "--prefix=#{libexec}/c-library" - system "make", "install" - end - - resource("toolbuslib").stage do - system "./configure", "--prefix=#{libexec}/toolbuslib" - system "make", "install" - end - - resource("error-support").stage do - system "./configure", "--prefix=#{libexec}/error-support", - "--with-toolbuslib=#{libexec}/toolbuslib" - system "make", "install" - end - - resource("pt-support").stage do - system "./configure", "--prefix=#{libexec}/pt-support", - "--with-toolbuslib=#{libexec}/toolbuslib", - "--with-error-support=#{libexec}/error-support" - system "make", "install" - end - - resource("sdf-support").stage do - system "./configure", "--prefix=#{libexec}/sdf-support", - "--with-toolbuslib=#{libexec}/toolbuslib", - "--with-error-support=#{libexec}/error-support", - "--with-pt-support=#{libexec}/pt-support" - system "make", "install" - end - - resource("asf-support").stage do - system "./configure", "--prefix=#{libexec}/asf-support", - "--with-error-support=#{libexec}/error-support", - "--with-pt-support=#{libexec}/pt-support" - system "make", "install" - end - - resource("tide-support").stage do - system "./configure", "--prefix=#{libexec}/tide-support", - "--with-toolbuslib=#{libexec}/toolbuslib" - system "make", "install" - end - - resource("rstore-support").stage do - system "./configure", "--prefix=#{libexec}/rstore-support", - "--with-toolbuslib=#{libexec}/toolbuslib" - system "make", "install" - end - - resource("config-support").stage do - system "./configure", "--prefix=#{libexec}/config-support" - system "make", "install" - end - - resource("ptable-support").stage do - system "./configure", "--prefix=#{libexec}/ptable-support", - "--with-pt-support=#{libexec}/pt-support" - system "make", "install" - end - - resource("sglr").stage do - system "./configure", "--prefix=#{libexec}/sglr", - "--with-toolbuslib=#{libexec}/toolbuslib", - "--with-error-support=#{libexec}/error-support", - "--with-pt-support=#{libexec}/pt-support", - "--with-ptable-support=#{libexec}/ptable-support", - "--with-config-support=#{libexec}/config-support", - "--with-c-library=#{libexec}/c-library" - system "make", "install" - end - - resource("asc-support").stage do - system "./configure", "--prefix=#{libexec}/asc-support", - "--with-toolbuslib=#{libexec}/toolbuslib", - "--with-error-support=#{libexec}/error-support", - "--with-pt-support=#{libexec}/pt-support", - "--with-ptable-support=#{libexec}/ptable-support", - "--with-config-support=#{libexec}/config-support", - "--with-c-library=#{libexec}/c-library", - "--with-tide-support=#{libexec}/tide-support", - "--with-rstore-support=#{libexec}/rstore-support", - "--with-asf-support=#{libexec}/asf-support", - "--with-rstore-support=#{libexec}/rstore-support", - "--with-sglr=#{libexec}/sglr" - system "make", "install" - end - - resource("pgen").stage do - system "./configure", "--prefix=#{libexec}/pgen", - "--with-toolbuslib=#{libexec}/toolbuslib", - "--with-error-support=#{libexec}/error-support", - "--with-pt-support=#{libexec}/pt-support", - "--with-ptable-support=#{libexec}/ptable-support", - "--with-config-support=#{libexec}/config-support", - "--with-c-library=#{libexec}/c-library", - "--with-sglr=#{libexec}/sglr", - "--with-sdf-support=#{libexec}/sdf-support", - "--with-asc-support=#{libexec}/asc-support" - system "make", "install" - end - - resource("pandora").stage do - system "./configure", "--prefix=#{libexec}/pandora", - "--with-toolbuslib=#{libexec}/toolbuslib", - "--with-pt-support=#{libexec}/pt-support", - "--with-asc-support=#{libexec}/asc-support" - system "make", "install" - end - - system "./configure", "--prefix=#{prefix}", - "--with-sglr=#{libexec}/sglr", - "--with-pgen=#{libexec}/pgen", - "--with-pandora=#{libexec}/pandora" - system "make", "install" - end - - test do - assert_match "sdfchecker v1.0", shell_output("#{libexec}/pgen/bin/sdfchecker -V 2>&1") - end -end diff --git a/Formula/sdhash.rb b/Formula/sdhash.rb deleted file mode 100644 index 5651e00fb52c5..0000000000000 --- a/Formula/sdhash.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Sdhash < Formula - desc "Tool for correlating binary blobs of data" - homepage "http://roussev.net/sdhash/sdhash.html" - url "http://roussev.net/sdhash/releases/packages/sdhash-3.1.tar.gz" - sha256 "b991d38533d02ae56e0c7aeb230f844e45a39f2867f70fab30002cfa34ba449c" - revision 1 - - bottle do - cellar :any - sha256 "549cf5be7d1381bfbc50ec60df79e6b4c81530048b13361670e423ced30e5f51" => :mojave - sha256 "822f7023148600c0aea00998188d9c0248dfef471971639d65b2b61fa59add83" => :high_sierra - sha256 "631f73908ec240b075fb08484b0e0742759290fbf7d5ffce3db6c8e7dca2355c" => :sierra - sha256 "f42674a03668b9187d618b457240de90e676bcb311fa1946b5a236685fbf2860" => :el_capitan - sha256 "97b9d8bd401ec5976b17794da9b907433c18a839c9360fa574d51ea19de245bf" => :yosemite - sha256 "bb4951185ede8233e4dccb48fa0da53a812e1af61dac9babbdf41e781b78a1e9" => :mavericks - end - - depends_on "openssl" - - def install - inreplace "Makefile" do |s| - # Remove space between -L and the path (reported upstream) - s.change_make_var! "LDFLAGS", - "-L. -L./external/stage/lib -lboost_regex -lboost_system -lboost_filesystem " \ - "-lboost_program_options -lc -lm -lcrypto -lboost_thread -lpthread" - end - system "make", "boost" - system "make", "stream" - bin.install "sdhash" - man1.install Dir["man/*.1"] - end - - test do - system "#{bin}/sdhash" - end -end diff --git a/Formula/sdl.rb b/Formula/sdl.rb deleted file mode 100644 index 58c06a62d4260..0000000000000 --- a/Formula/sdl.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Sdl < Formula - desc "Low-level access to audio, keyboard, mouse, joystick and graphics" - homepage "https://www.libsdl.org/" - url "https://www.libsdl.org/release/SDL-1.2.15.tar.gz" - sha256 "d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00" - - bottle do - cellar :any - rebuild 3 - sha256 "af5f0c82a33afab56a02c51a734b72e68effbb508cc0e28663c7d33386656e47" => :mojave - sha256 "2c02101205a5df3ba2972573d542e891574d3169d623fa51215ec9381cd6f9c6" => :high_sierra - sha256 "ae6f7a419e0277feccf2e26bc0f711c6f63737578590599202edc85090b9c934" => :sierra - sha256 "cabb4d2ed0c7910cbf4a47fe27d36c5e61c09ea6c5d47963ba9cb56f379ba1e1" => :el_capitan - sha256 "d583cfc1e6029298076b6d49b974606ad92e90a700ace2d811b42091abe8a327" => :yosemite - end - - head do - url "https://hg.libsdl.org/SDL", :branch => "SDL-1.2", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - # Fix for a bug preventing SDL from building at all on OSX 10.9 Mavericks - # Related ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085 - patch do - url "https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1320" - sha256 "ba0bf2dd8b3f7605db761be11ee97a686c8516a809821a4bc79be738473ddbf5" - end - - # Fix compilation error on 10.6 introduced by the above patch - patch do - url "https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1324" - sha256 "ee7eccb51cefff15c6bf8313a7cc7a3f347dc8e9fdba7a3c3bd73f958070b3eb" - end - - def install - # we have to do this because most build scripts assume that all sdl modules - # are installed to the same prefix. Consequently SDL stuff cannot be - # keg-only but I doubt that will be needed. - inreplace %w[sdl.pc.in sdl-config.in], "@prefix@", HOMEBREW_PREFIX - - system "./autogen.sh" if build.head? - - args = %W[--prefix=#{prefix} --without-x] - args << "--disable-nasm" unless MacOS.version >= :mountain_lion # might work with earlier, might only work with new clang - # LLVM-based compilers choke on the assembly code packaged with SDL. - if ENV.compiler == :clang && DevelopmentTools.clang_build_version < 421 - args << "--disable-assembly" - end - - system "./configure", *args - system "make", "install" - - # Copy source files needed for Ojective-C support. - libexec.install Dir["src/main/macosx/*"] if build.stable? - end - - test do - system bin/"sdl-config", "--version" - end -end diff --git a/Formula/sdl2.rb b/Formula/sdl2.rb deleted file mode 100644 index 8d1eae75880a5..0000000000000 --- a/Formula/sdl2.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Sdl2 < Formula - desc "Low-level access to audio, keyboard, mouse, joystick, and graphics" - homepage "https://www.libsdl.org/" - url "https://libsdl.org/release/SDL2-2.0.9.tar.gz" - sha256 "255186dc676ecd0c1dbf10ec8a2cc5d6869b5079d8a38194c2aecdff54b324b1" - - bottle do - cellar :any - sha256 "4bb274c9c192aa099d4f9ce7794e25b59161aeb58b72206e2934d4bfb6ac7e32" => :mojave - sha256 "c99606f305a37478afffdc9a6f68c712d5271f07381e2dfb110e6f44fefe68ab" => :high_sierra - sha256 "3d2472c82b4a210a712178dd8f9137d2e73241a26f163248eba09cad62f2bf56" => :sierra - end - - head do - url "https://hg.libsdl.org/SDL", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - # Upstream commit to fix issue with library version numbers - # https://hg.libsdl.org/SDL/rev/d274fa9731b1 - patch do - url "https://hg.libsdl.org/SDL/raw-diff/d274fa9731b1/build-scripts/ltmain.sh" - sha256 "9845d8f947dd5b809c1dedba711c878cf2a4644a570cd21a81b574e609eb986b" - end - - # https://github.com/mistydemeo/tigerbrew/issues/361 - if MacOS.version <= :snow_leopard - patch do - url "https://gist.githubusercontent.com/miniupnp/26d6e967570e5729a757/raw/1a86f3cdfadbd9b74172716abd26114d9cb115d5/SDL2-2.0.3_OSX_104.patch" - sha256 "4d01f05f02568e565978308e42e98b4da2b62b1451f71c29d24e11202498837e" - end - end - - def install - # we have to do this because most build scripts assume that all sdl modules - # are installed to the same prefix. Consequently SDL stuff cannot be - # keg-only but I doubt that will be needed. - inreplace %w[sdl2.pc.in sdl2-config.in], "@prefix@", HOMEBREW_PREFIX - - system "./autogen.sh" if build.head? || build.devel? - - args = %W[--prefix=#{prefix} --without-x] - - # LLVM-based compilers choke on the assembly code packaged with SDL. - if ENV.compiler == :clang && DevelopmentTools.clang_build_version < 421 - args << "--disable-assembly" - end - args << "--disable-haptic" << "--disable-joystick" if MacOS.version <= :snow_leopard - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"sdl2-config", "--version" - end -end diff --git a/Formula/sdl2_gfx.rb b/Formula/sdl2_gfx.rb deleted file mode 100644 index 0beea24b23fab..0000000000000 --- a/Formula/sdl2_gfx.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Sdl2Gfx < Formula - desc "SDL2 graphics drawing primitives and other support functions" - homepage "https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/" - url "https://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz" - sha256 "63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262" - - bottle do - cellar :any - sha256 "0854ac56a8c0e0b3b5f7fe380fb0bde03dfb2da984920bcbc61ba6e4738f9ca6" => :mojave - sha256 "6563ae4bda51a996e537cfe88509da94402b52469e11b92211b5bca58800ab24" => :high_sierra - sha256 "fba875841d99a80ba39af65733a0df33adf220d29fbd5e313dfcc695b61bc8e4" => :sierra - sha256 "aaec64e6b0020e3a0b2faf6ca37e5bc4b27d7327125a58831b0cd34803935cc7" => :el_capitan - end - - depends_on "sdl2" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-sdltest" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - int mmx = SDL_imageFilterMMXdetect(); - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lsdl2_gfx", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/sdl2_image.rb b/Formula/sdl2_image.rb deleted file mode 100644 index 3700098b86ef7..0000000000000 --- a/Formula/sdl2_image.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Sdl2Image < Formula - desc "Library for loading images as SDL surfaces and textures" - homepage "https://www.libsdl.org/projects/SDL_image/" - url "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz" - sha256 "e74ec49c2402eb242fbfa16f2f43a19582a74c2eabfbfb873f00d4250038ceac" - - bottle do - cellar :any - sha256 "a8dedc44dfe77db4f76c8e722c80fdb2ad6b15be0e16686fbd7a31abf981935b" => :mojave - sha256 "54b7c0319877b7545c22ef67effb91cca9e80c159b494b5e3f22067db062beb8" => :high_sierra - sha256 "a68e9d9bf2d3192294bac33c5eca01d214faac4f17a6c3ce1bdcedda9a0e241f" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "sdl2" - depends_on "webp" - - def install - inreplace "SDL2_image.pc.in", "@prefix@", HOMEBREW_PREFIX - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-imageio", - "--disable-jpg-shared", - "--disable-png-shared", - "--disable-tif-shared", - "--disable-webp-shared" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - int success = IMG_Init(0); - IMG_Quit(); - return success; - } - EOS - system ENV.cc, "-L#{lib}", "-lsdl2_image", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/sdl2_mixer.rb b/Formula/sdl2_mixer.rb deleted file mode 100644 index de69c849bcee5..0000000000000 --- a/Formula/sdl2_mixer.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Sdl2Mixer < Formula - desc "Sample multi-channel audio mixer library" - homepage "https://www.libsdl.org/projects/SDL_mixer/" - url "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz" - sha256 "b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419" - head "https://hg.libsdl.org/SDL_mixer", :using => :hg - - bottle do - cellar :any - sha256 "411aebe8a4b960a900879efc9d871575156efc174863beb135359679f3e7a8bf" => :mojave - sha256 "af842a740632725bec40acd7418fa21aafcce0bee03d11a283c8c3509a235c78" => :high_sierra - sha256 "359d8bd99a88d06f9484eb76b87b021ce48c777ac4583a0301ae0449e693cbf9" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libmodplug" - depends_on "libvorbis" - depends_on "sdl2" - - def install - inreplace "SDL2_mixer.pc.in", "@prefix@", HOMEBREW_PREFIX - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-music-flac - --disable-music-flac-shared - --disable-music-midi-fluidsynth - --disable-music-midi-fluidsynth-shared - --disable-music-mod-mikmod-shared - --disable-music-mod-modplug-shared - --disable-music-mp3-mpg123 - --disable-music-mp3-mpg123-shared - --disable-music-mp3-smpeg - --disable-music-ogg-shared - --enable-music-mod-mikmod - --enable-music-mod-modplug - --enable-music-ogg - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - int success = Mix_Init(0); - Mix_Quit(); - return success; - } - EOS - system ENV.cc, "-L#{lib}", "-lsdl2_mixer", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/sdl2_net.rb b/Formula/sdl2_net.rb deleted file mode 100644 index e1d47272df284..0000000000000 --- a/Formula/sdl2_net.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Sdl2Net < Formula - desc "Small sample cross-platform networking library" - homepage "https://www.libsdl.org/projects/SDL_net/" - url "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz" - sha256 "15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21" - - bottle do - cellar :any - sha256 "0631754a7016b3e6e175644cc7976cc22843f7b872e8f50662d0cb50a4264901" => :mojave - sha256 "f193c7c2ae1b7f2c82cbbc9b83a16fc72d845c6396ecd33644eea19695a850ee" => :high_sierra - sha256 "dc2b96762f77dd4d42fea1da4d4c2373692dd0a531f686f00de0dd4a6eed8df9" => :sierra - sha256 "46d189ebe1f240381a9e8d99a2cb249e577cec98e6399e741e47275735a3471c" => :el_capitan - sha256 "2e2bcc1e1aac84b37ebb44398e463d9004764aa369489926cd07bb97cb9f60c4" => :yosemite - sha256 "ebabcb8f4df6fdee7855a6e19080aea42d9909205b287312015179bb9b3f472a" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "sdl2" - - def install - inreplace "SDL2_net.pc.in", "@prefix@", HOMEBREW_PREFIX - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--disable-sdltest" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - int success = SDLNet_Init(); - SDLNet_Quit(); - return success; - } - EOS - - system ENV.cc, "-L#{lib}", "-lsdl2_net", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/sdl2_ttf.rb b/Formula/sdl2_ttf.rb deleted file mode 100644 index e53dd31ebf87a..0000000000000 --- a/Formula/sdl2_ttf.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Sdl2Ttf < Formula - desc "Library for using TrueType fonts in SDL applications" - homepage "https://www.libsdl.org/projects/SDL_ttf/" - url "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz" - sha256 "34db5e20bcf64e7071fe9ae25acaa7d72bdc4f11ab3ce59acc768ab62fe39276" - - bottle do - cellar :any - sha256 "f7b460020055a498bb642c7f774f282c517f5423cc1c238e565dbeab53ec7329" => :mojave - sha256 "a132a5656ba547e19361adab1e49ed84c2d3e379496058e8b39ebc676c77e2cc" => :high_sierra - sha256 "6420d0ad3f91d4683441a23323e347fa3116a5e484d810d896ac7a484a599e82" => :sierra - sha256 "29e62db1a48f1cd9142c04d4a734298f30c8924b32eaa914a6aaef574d4a6f01" => :el_capitan - sha256 "557067e99848b4b8a61c805eeb545c6ec66184b7fc2718dc3dd50bd551b0b324" => :yosemite - sha256 "3b2dafa7edea6a2173c9ae17bb6a1cc5137a9004ffc44b6443bc885456adbb1b" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "sdl2" - - def install - inreplace "SDL2_ttf.pc.in", "@prefix@", HOMEBREW_PREFIX - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - int success = TTF_Init(); - TTF_Quit(); - return success; - } - EOS - system ENV.cc, "-L#{lib}", "-lsdl2_ttf", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/sdl_gfx.rb b/Formula/sdl_gfx.rb deleted file mode 100644 index 447145db54e86..0000000000000 --- a/Formula/sdl_gfx.rb +++ /dev/null @@ -1,23 +0,0 @@ -class SdlGfx < Formula - desc "Graphics drawing primitives and other support functions" - homepage "https://www.ferzkopp.net/joomla/content/view/19/14/" - url "https://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.26.tar.gz" - sha256 "7ceb4ffb6fc63ffba5f1290572db43d74386cd0781c123bc912da50d34945446" - - bottle do - cellar :any - sha256 "4a25e0639ae3c4e687bb8f9d6af00be3baf270565cd0402f7aa3af2a94e349d1" => :mojave - sha256 "b1040e970fe68325a37c4a6af037206c28d12ae77f49851a0d28333e7c19a5e4" => :high_sierra - sha256 "643210ccd7a2d9f2fc92d519900bbeb51c1f168729e40860c40e67629ce2ef8a" => :sierra - sha256 "072983d26bc7e50acd12ef27adab047c3e14e45dff83e98be9ea005c7c107524" => :el_capitan - end - - depends_on "sdl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-sdltest" - system "make", "install" - end -end diff --git a/Formula/sdl_image.rb b/Formula/sdl_image.rb deleted file mode 100644 index 1da22758d3753..0000000000000 --- a/Formula/sdl_image.rb +++ /dev/null @@ -1,45 +0,0 @@ -class SdlImage < Formula - desc "Image file loading library" - homepage "https://www.libsdl.org/projects/SDL_image" - url "https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz" - sha256 "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699" - revision 7 - - bottle do - cellar :any - sha256 "eb27003d54259c16f08795435e2afc34086598e7f1d1f1ae4c2fe5a70a6bf57d" => :mojave - sha256 "eeb44401862df80a1d1f77dde4164b265d82993458325e753285566b56477695" => :high_sierra - sha256 "d74d6e853e78b65a7e7f266be6733bdb5839f956bcb19061b68a46c16e080a94" => :sierra - sha256 "4304e6b83a7afa176a0462e8ba20485bc098731a16bd375261f9f449a8f8f7d3" => :el_capitan - sha256 "3403edd53a6776bad8dc4390ef8204479f3af7c485e8a7a1f81f86f43b4a7b5c" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "sdl" - depends_on "webp" - - # Fix graphical glitching - # https://github.com/Homebrew/homebrew-python/issues/281 - # https://trac.macports.org/ticket/37453 - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/41996822/sdl_image/IMG_ImageIO.m.patch" - sha256 "c43c5defe63b6f459325798e41fe3fdf0a2d32a6f4a57e76a056e752372d7b09" - end - - def install - inreplace "SDL_image.pc.in", "@prefix@", HOMEBREW_PREFIX - - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-imageio", - "--disable-jpg-shared", - "--disable-png-shared", - "--disable-sdltest", - "--disable-tif-shared", - "--disable-webp-shared" - system "make", "install" - end -end diff --git a/Formula/sdl_mixer.rb b/Formula/sdl_mixer.rb deleted file mode 100644 index 8b58f1777f779..0000000000000 --- a/Formula/sdl_mixer.rb +++ /dev/null @@ -1,53 +0,0 @@ -class SdlMixer < Formula - desc "Sample multi-channel audio mixer library" - homepage "https://www.libsdl.org/projects/SDL_mixer/" - url "https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz" - sha256 "1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a" - revision 3 - - bottle do - cellar :any - sha256 "c957ec0e2f17c89e78b2b6aff735ec7abe19bd0e10a0e2aaad227746c26dd910" => :mojave - sha256 "e08902563c6265ac480323c9f22a26ee0e51f42fb1c36efb9b66b1f6b34a032d" => :high_sierra - sha256 "69e8726e5b9bb858e069d244844411fc43930d3a7d0b78c6177bf36c76bb04c2" => :sierra - sha256 "9c9a55fe416bc37a14e9a58439093b85274bf12c2bab24660a3f7c4b0fff70c3" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libmikmod" - depends_on "libogg" - depends_on "libvorbis" - depends_on "sdl" - - # Source file for sdl_mixer example - resource "playwave" do - url "https://hg.libsdl.org/SDL_mixer/raw-file/a4e9c53d9c30/playwave.c" - sha256 "92f686d313f603f3b58431ec1a3a6bf29a36e5f792fb78417ac3d5d5a72b76c9" - end - - def install - inreplace "SDL_mixer.pc.in", "@prefix@", HOMEBREW_PREFIX - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --enable-music-ogg - --disable-music-ogg-shared - --disable-music-mod-shared - ] - - system "./configure", *args - system "make", "install" - end - - test do - testpath.install resource("playwave") - system ENV.cc, "-o", "playwave", "playwave.c", "-I#{include}/SDL", - "-I#{Formula["sdl"].opt_include}/SDL", - "-L#{lib}", "-lSDL_mixer", - "-L#{Formula["sdl"].lib}", "-lSDLmain", "-lSDL", - "-Wl,-framework,Cocoa" - system "SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk ./playwave #{test_fixtures("test.wav")}" - assert_predicate testpath/"sdlaudio.raw", :exist? - end -end diff --git a/Formula/sdl_net.rb b/Formula/sdl_net.rb deleted file mode 100644 index eb20c1a652d8f..0000000000000 --- a/Formula/sdl_net.rb +++ /dev/null @@ -1,25 +0,0 @@ -class SdlNet < Formula - desc "Sample cross-platform networking library" - homepage "https://www.libsdl.org/projects/SDL_net/release-1.2.html" - url "https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz" - sha256 "5f4a7a8bb884f793c278ac3f3713be41980c5eedccecff0260411347714facb4" - - bottle do - cellar :any - sha256 "42ba6a6ea66082574335d2db119cdeedb53865f01344a8bab255094b09223bc7" => :mojave - sha256 "6ef784ef221c9eeea648834070ec1d20bac11cdc9754f5af2fe5dd6fa04e0f10" => :high_sierra - sha256 "65cc3ae3104620de06f03ca0d9b3a545d90f2a36955dcb528f5f42af6db11bcf" => :sierra - sha256 "036938975b4060fdc944c2258a8d1d5d73f536860a9c807116e6c4fb2aa65dc8" => :el_capitan - sha256 "fe6b8eda1d640db450ed12f79feb731d49a62263c4b83601d69659498d697538" => :yosemite - sha256 "99f9035f95e548ea81eb11ac9c06ae5eab8d2797ea9ca03ac074fe30bb357748" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "sdl" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--disable-sdltest" - system "make", "install" - end -end diff --git a/Formula/sdl_rtf.rb b/Formula/sdl_rtf.rb deleted file mode 100644 index 621d0edcc4cba..0000000000000 --- a/Formula/sdl_rtf.rb +++ /dev/null @@ -1,24 +0,0 @@ -class SdlRtf < Formula - desc "Sample library to display Rich Text Format (RTF) documents" - homepage "https://www.libsdl.org/projects/SDL_rtf/" - url "https://www.libsdl.org/projects/SDL_rtf/release/SDL_rtf-0.1.0.tar.gz" - sha256 "3dc0274b666e28010908ced24844ca7d279e07b66f673c990d530d4ea94b757e" - head "https://hg.libsdl.org/SDL_rtf", :using => :hg - - bottle do - cellar :any - sha256 "310bcc2756a0ba5dd9287af9159809c2519609830e07e4ef0773edfc51c8bda5" => :mojave - sha256 "319fe65012c94d20675b0b3dc3c9e4df59838ccca7496b81a425bded94e3c9fc" => :high_sierra - sha256 "c34abb198f384916d7b2a09a88c69cb84f29674031329bb7a1733e8a5ed39255" => :sierra - sha256 "6c7e9f7459ff062fbb48ee1a383a4fd4acc2c29f5ee9b57dea93710c94ccda11" => :el_capitan - sha256 "8dd89df32c9ea02bcab36932c2f22bcb6de58d6002bd6fb9e95f9bbfe5ccf41e" => :yosemite - sha256 "9d077d10fc0102738e3c7d445cf2c8290150f98b4fb92e1b72bb3e5857dc3b3e" => :mavericks - end - - depends_on "sdl" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/sdl_sound.rb b/Formula/sdl_sound.rb deleted file mode 100644 index 2212f040d35be..0000000000000 --- a/Formula/sdl_sound.rb +++ /dev/null @@ -1,44 +0,0 @@ -class SdlSound < Formula - desc "Library to decode several popular sound file formats" - homepage "https://icculus.org/SDL_sound/" - url "https://icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/s/sdl-sound1.2/sdl-sound1.2_1.0.3.orig.tar.gz" - sha256 "3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df" - revision 1 - - bottle do - cellar :any - sha256 "3661daa8d14b8b8ab613a5fb449ad6b3f758739eb3b69700b23c0ccdc49068b6" => :mojave - sha256 "c571e007bcbb022e6fd0042e506ce6cd47a26d814de06f348b13231fc95a1581" => :high_sierra - sha256 "0e692b6c08600d6d7014fc582b5a351e8a4eea42ce95d231ef39a0c07c41c71b" => :sierra - sha256 "fd93d8be366bfe3f16839f50d11ab1149cc725c6bf6248befe90feae25c0e052" => :el_capitan - sha256 "8f06d7c6c18c8a5192aebf5672c20f9f3b27bbd3109459ef96110d935c00f87b" => :yosemite - end - - head do - url "https://hg.icculus.org/icculus/SDL_sound", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libogg" - depends_on "libvorbis" - depends_on "sdl" - - def install - if build.head? - inreplace "bootstrap", "/usr/bin/glibtoolize", "#{Formula["libtool"].opt_bin}/glibtoolize" - system "./bootstrap" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-sdltest" - system "make" - system "make", "check" - system "make", "install" - end -end diff --git a/Formula/sdl_ttf.rb b/Formula/sdl_ttf.rb deleted file mode 100644 index a2f096f23bfd2..0000000000000 --- a/Formula/sdl_ttf.rb +++ /dev/null @@ -1,37 +0,0 @@ -class SdlTtf < Formula - desc "Library for using TrueType fonts in SDL applications" - homepage "https://www.libsdl.org/projects/SDL_ttf/" - url "https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz" - sha256 "724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7" - revision 1 - - bottle do - cellar :any - sha256 "09d3328d31341d4c76fa07e42480b283ee8f7ddb6518128e871debb84410521e" => :mojave - sha256 "544d9fe4053cf2a83f9c34b91773518b8bffefeea6337f5d293f6064c3260972" => :high_sierra - sha256 "22972859bc6ab2f2a6fd8a4cf5394e647336e4b83d982b02e7015ceb7799e59a" => :sierra - sha256 "981960db1d2539b57bc42deb12ab59e163214d881612c1fffea72e4927e1c82a" => :el_capitan - sha256 "cea0e7f2cb248778bc3af4cab3f3ddd7469d4b24d72780891d2cd54dbc9d7216" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "sdl" - - # Fix broken TTF_RenderGlyph_Shaded() - # https://bugzilla.libsdl.org/show_bug.cgi?id=1433 - patch do - url "https://gist.githubusercontent.com/tomyun/a8d2193b6e18218217c4/raw/8292c48e751c6a9939db89553d01445d801420dd/sdl_ttf-fix-1433.diff" - sha256 "4c2e38bb764a23bc48ae917b3abf60afa0dc67f8700e7682901bf9b03c15be5f" - end - - def install - inreplace "SDL_ttf.pc.in", "@prefix@", HOMEBREW_PREFIX - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-sdltest" - system "make", "install" - end -end diff --git a/Formula/sdlpop.rb b/Formula/sdlpop.rb deleted file mode 100644 index d961c2bfca76f..0000000000000 --- a/Formula/sdlpop.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Sdlpop < Formula - desc "Open-source port of Prince of Persia" - homepage "https://github.com/NagyD/SDLPoP" - url "https://github.com/NagyD/SDLPoP/archive/v1.18.1.tar.gz" - sha256 "8032c47fad4b73021d636ead510bbc1ab5106cff77103e331ad0f32a49a13946" - - bottle do - cellar :any - sha256 "a10a88b0fabec9c095c13f0e870ba5e5417b24c8b9712ab04e4cc243aa30d9b3" => :mojave - sha256 "7d65b2aeda0577a96a4b24664c7b272bc91ab7ddda0e464d47a1a6ee389e4d45" => :high_sierra - sha256 "45f4786672fa1f2d4879c00887138c9fb2f778b344223b0eb4ab8a77f8a0a630" => :sierra - sha256 "32a0513366830e5082ceae4e48286a5817e391b101c64cc4f015c774feeb076e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - - def install - system "make", "-C", "src" - doc.install Dir["doc/*"] - libexec.install "data" - libexec.install "prince" - - # Use var directory to keep save and replay files - pkgvar = var/"sdlpop" - pkgvar.install "SDLPoP.ini" unless (pkgvar/"SDLPoP.ini").exist? - - (bin/"prince").write <<~EOS - #!/bin/bash - cd "#{pkgvar}" && exec "#{libexec}/prince" $@ - EOS - end - - def caveats; <<~EOS - Save and replay files are stored in the following directory: - #{var}/sdlpop - EOS - end -end diff --git a/Formula/sec.rb b/Formula/sec.rb deleted file mode 100644 index 92e62dce5a697..0000000000000 --- a/Formula/sec.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Sec < Formula - desc "Event correlation tool for event processing of various kinds" - homepage "https://simple-evcorr.sourceforge.io/" - url "https://github.com/simple-evcorr/sec/releases/download/2.8.1/sec-2.8.1.tar.gz" - sha256 "342464b2494f4c64eaac3c0f4c53486ea5464f24d8a190c27615850b9d4fe100" - - bottle :unneeded - - def install - bin.install "sec" - man1.install "sec.man" => "sec.1" - end - - test do - system "#{bin}/sec", "--version" - end -end diff --git a/Formula/securefs.rb b/Formula/securefs.rb deleted file mode 100644 index 241d2fc4e2a79..0000000000000 --- a/Formula/securefs.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Securefs < Formula - desc "Filesystem with transparent authenticated encryption" - homepage "https://github.com/netheril96/securefs" - url "https://github.com/netheril96/securefs/archive/0.8.2.tar.gz" - sha256 "831c013bb8a5b32e21dca0e2503cf770dcd3c0c4ed9264769d0ab101707829ca" - head "https://github.com/netheril96/securefs.git" - - bottle do - cellar :any - sha256 "df79931139f2fe9ad9714c4304b9c2c5d3322b53d7e187f6118fa709097f7f00" => :mojave - sha256 "d851b6a0987ac11b3ff5a6ede8b88bfa9e09251ef1fdd76237ad7e9910688242" => :high_sierra - sha256 "13d67e18b133621ddb49ddc5b34caff453aec85d95607d2ab83f03cdf0c79b76" => :sierra - sha256 "f42c0d8e15ddcd2212235b4954e8ce0896e8f3fc1f07c388cfcf49dca96888f3" => :el_capitan - end - - depends_on "cmake" => :build - depends_on :osxfuse - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/securefs", "version" # The sandbox prevents a more thorough test - end -end diff --git a/Formula/seexpr.rb b/Formula/seexpr.rb deleted file mode 100644 index ca36893f52adb..0000000000000 --- a/Formula/seexpr.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Seexpr < Formula - desc "Embeddable expression evaluation engine" - homepage "https://www.disneyanimation.com/technology/seexpr.html" - url "https://github.com/wdas/SeExpr/archive/v2.11.tar.gz" - sha256 "bf4a498f86aa3fc19aad3d7384de11d5df76f7f71587c9bd789f5e50f8090e1a" - - bottle do - cellar :any - sha256 "f240a108c552c37d6f070d5048f1f00a33055243a5a82e6f017481fd452847a0" => :mojave - sha256 "a5a7e8224eb7669dc0fea2178df7d51be1733f9fb82d4c0bb1851608f18c4722" => :high_sierra - sha256 "762881f740d763d3c2477f5ead9b2fc7c549f38721b39e999f9b6634f5215b68" => :sierra - sha256 "0a374c2f84169d0b4ab064dfdd2dee856d5f80c9b8b27eee57e3d1614abffaa9" => :el_capitan - sha256 "c023332d27c1977db807f890011688ed756eb130fa1df40aa562776192733ffd" => :yosemite - sha256 "2e55d79f1519adbf0f1fdcf566aa67bd5515a60132516e2908250831d8e40355" => :mavericks - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "libpng" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "doc" - system "make", "install" - end - end - - test do - system bin/"asciigraph" - end -end diff --git a/Formula/selecta.rb b/Formula/selecta.rb deleted file mode 100644 index 374eb0c32f1b8..0000000000000 --- a/Formula/selecta.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Selecta < Formula - desc "Fuzzy text selector for files and anything else you need to select" - homepage "https://github.com/garybernhardt/selecta" - url "https://github.com/garybernhardt/selecta/archive/v0.0.7.tar.gz" - sha256 "00d1bdabb44b93f90018438f8ffc0780f96893b809b52956abb9485f509d03d2" - - bottle :unneeded - - depends_on "ruby" if MacOS.version <= :mountain_lion - - def install - bin.install "selecta" - end - - test do - system "#{bin}/selecta", "--version" - end -end diff --git a/Formula/selenium-server-standalone.rb b/Formula/selenium-server-standalone.rb deleted file mode 100644 index 71d3093a8d1c3..0000000000000 --- a/Formula/selenium-server-standalone.rb +++ /dev/null @@ -1,50 +0,0 @@ -class SeleniumServerStandalone < Formula - desc "Browser automation for testing purposes" - homepage "https://www.seleniumhq.org/" - url "https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar" - sha256 "acf71b77d1b66b55db6fb0bed6d8bae2bbd481311bcbedfeff472c0d15e8f3cb" - - bottle :unneeded - - def install - libexec.install "selenium-server-standalone-#{version}.jar" - bin.write_jar_script libexec/"selenium-server-standalone-#{version}.jar", "selenium-server" - end - - plist_options :manual => "selenium-server -port 4444" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - /usr/bin/java - -jar - #{libexec}/selenium-server-standalone-#{version}.jar - -port - 4444 - - ServiceDescription - Selenium Server - StandardErrorPath - #{var}/log/selenium-error.log - StandardOutPath - #{var}/log/selenium-output.log - - - EOS - end - - test do - selenium_version = shell_output("unzip -p #{libexec}/selenium-server-standalone-#{version}.jar META-INF/MANIFEST.MF | sed -nEe '/Selenium-Version:/p'") - assert_equal "Selenium-Version: #{version}", selenium_version.strip - end -end diff --git a/Formula/sendemail.rb b/Formula/sendemail.rb deleted file mode 100644 index 48f062beda4b6..0000000000000 --- a/Formula/sendemail.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Sendemail < Formula - desc "Email program for sending SMTP mail" - homepage "http://caspian.dotconf.net/menu/Software/SendEmail/" - url "http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz" - sha256 "6dd7ef60338e3a26a5e5246f45aa001054e8fc984e48202e4b0698e571451ac0" - - bottle :unneeded - - # Reported upstream: http://caspian.dotconf.net/menu/Software/SendEmail/#comment-1119965648 - patch do - url "https://raw.githubusercontent.com/mogaal/sendemail/e785a6d284884688322c9b39c0f64e20a43ea825/debian/patches/fix_ssl_version.patch" - sha256 "0b212ade1808ff51d2c6ded5dc33b571f951bd38c1348387546c0cdf6190c0c3" - end - - def install - bin.install "sendEmail" - end - - test do - assert_match /sendemail-#{Regexp.escape(version)}/, `#{bin}/sendemail`.strip - end -end diff --git a/Formula/seqtk.rb b/Formula/seqtk.rb deleted file mode 100644 index 45688b505d3fd..0000000000000 --- a/Formula/seqtk.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Seqtk < Formula - desc "Toolkit for processing sequences in FASTA/Q formats" - homepage "https://github.com/lh3/seqtk" - url "https://github.com/lh3/seqtk/archive/v1.3.tar.gz" - sha256 "5a1687d65690f2f7fa3f998d47c3c5037e792f17ce119dab52fff3cfdca1e563" - - bottle do - cellar :any_skip_relocation - sha256 "b695a43103700d7d0d4a07d50d8effec280f7d7a781ff518a42dec2bef44801e" => :mojave - sha256 "4f377caf93e5d334e739375a5dcf06782f1d85516988a26df3f8f53d172b1e6f" => :high_sierra - sha256 "fd3ecced5ba8f5a9eab13f8f2184f6a69d08b58c1ef53ad6e74bb45cab9324f4" => :sierra - sha256 "55541e7e9249ef15bd4423ad9a45903918c2b4b54f632bc0472fb24aee683701" => :el_capitan - end - - def install - system "make" - bin.install "seqtk" - end - - test do - (testpath/"test.fasta").write <<~EOS - >U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT - CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - EOS - assert_match "TCTCTG", shell_output("#{bin}/seqtk seq test.fasta") - end -end diff --git a/Formula/ser2net.rb b/Formula/ser2net.rb deleted file mode 100644 index 8619897d50d86..0000000000000 --- a/Formula/ser2net.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Ser2net < Formula - desc "Allow network connections to serial ports" - homepage "https://ser2net.sourceforge.io" - url "https://downloads.sourceforge.net/project/ser2net/ser2net/ser2net-3.5.tar.gz" - sha256 "ba9e1d60a89fd7ed075553b4a2074352902203f7fbd9b65b15048c05f0e3f3be" - - bottle do - sha256 "36da05b58e05873eec72b04da6bb5e719d26814d8820927bc8684ac680f67587" => :mojave - sha256 "4533ef4f7200f9fe786332af987740b6db93e9e24b298b32909d9387eb168b3a" => :high_sierra - sha256 "e14422b545c872c363edc5618c61a2d5772838c54d521c3b2688ac88ed2596d0" => :sierra - end - - depends_on :macos => :sierra # needs clock_gettime - - def install - # values.h doesn't exist on macOS - # https://github.com/cminyard/ser2net/pull/4 - inreplace "readconfig.c", "#include ", "" - - # Fix etc location - inreplace ["ser2net.c", "ser2net.8"], "/etc/ser2net.conf", "#{etc}/ser2net.conf" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - - # LIBS is set to "-lpthread -lrt" but librt doesn't exist on macOS - # https://github.com/cminyard/ser2net/issues/3 - system "make", "install", "LIBS=-lpthread" - - etc.install "ser2net.conf" - end - - def caveats; <<~EOS - To configure ser2net, edit the example configuration in #{etc}/ser2net.conf - EOS - end - - plist_options :manual => "ser2net -p 12345" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_sbin}/ser2net - -p - 12345 - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - test do - assert_match version.to_s, shell_output("#{sbin}/ser2net -v") - end -end diff --git a/Formula/serd.rb b/Formula/serd.rb deleted file mode 100644 index 2e7a0a78c176c..0000000000000 --- a/Formula/serd.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Serd < Formula - desc "C library for RDF syntax" - homepage "https://drobilla.net/software/serd/" - url "https://download.drobilla.net/serd-0.28.0.tar.bz2" - sha256 "1df21a8874d256a9f3d51a18b8c6e2539e8092b62cc2674b110307e93f898aec" - - bottle do - cellar :any - sha256 "f93b549178bcccb52cc2cc939f25f772ad1c5d05c521ff4c277baae360ddb4a6" => :mojave - sha256 "0c55076d7655da6d7d5154e24cd3d720fd9afcd610f5e7e9ee5af23859ab85f7" => :high_sierra - sha256 "7c7c1f9317f0fd595bfcdb8214e510c10648f99cdf9be1464b272abd4fa223ea" => :sierra - sha256 "8c0c40af6e4aaa222c37cd154d2ef80c6b13a50744d97e94139250a5e1a778a0" => :el_capitan - end - - depends_on "pkg-config" => :build - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end -end diff --git a/Formula/serf.rb b/Formula/serf.rb deleted file mode 100644 index 02eadf0eeeeef..0000000000000 --- a/Formula/serf.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Serf < Formula - desc "Service orchestration and management tool" - homepage "https://serfdom.io/" - url "https://github.com/hashicorp/serf.git", - :tag => "v0.8.1", - :revision => "d6574a5bb1226678d7010325fb6c985db20ee458" - head "https://github.com/hashicorp/serf.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0d8be85c8bfefa616e5d5adedfbdad9227f5a0c11b0939ff664bdce9a5940da6" => :mojave - sha256 "fbd6c27169ceec3d52843b137d39313c59bd3495c26c7b88ff1eb29847971d31" => :high_sierra - sha256 "62f1e4030ba05b8f3fe8d40b185941cf9f0dbc1b02f043e5629281f03dbdb147" => :sierra - sha256 "45e961e406465c73fd72bcf7bd573ab3de740ab297c90287a02c5d4f6c38ebb0" => :el_capitan - end - - depends_on "go" => :build - depends_on "govendor" => :build - depends_on "gox" => :build - - def install - contents = Dir["*"] - gopath = buildpath/"gopath" - (gopath/"src/github.com/hashicorp/serf").install contents - - ENV["GOPATH"] = gopath - arch = MacOS.prefer_64_bit? ? "amd64" : "386" - ENV["XC_ARCH"] = arch - ENV["XC_OS"] = "darwin" - - (gopath/"bin").mkpath - - cd gopath/"src/github.com/hashicorp/serf" do - system "make", "bin" - bin.install "bin/serf" - prefix.install_metafiles - end - end - - test do - begin - pid = fork do - exec "#{bin}/serf", "agent" - end - sleep 1 - assert_match /:7946.*alive$/, shell_output("#{bin}/serf members") - ensure - system "#{bin}/serf", "leave" - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/serialosc.rb b/Formula/serialosc.rb deleted file mode 100644 index 82e5102c71bc3..0000000000000 --- a/Formula/serialosc.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Serialosc < Formula - desc "Opensound control server for monome devices" - homepage "https://monome.org/docs/osc/" - url "https://github.com/monome/serialosc.git", - :tag => "v1.4.1", - :revision => "4fec6f11276dd302faf9ca8e0a8e126f273cf954" - head "https://github.com/monome/serialosc.git" - - bottle do - cellar :any - sha256 "e0bf57d0c476bba84d0fd54ef092ebcc0077a163f9313a659ea3401502de43ad" => :high_sierra - sha256 "708a6230d77c734f5bb5c7f6f09d76cc02f345aa9ff82b392ed48e76236c06e1" => :sierra - sha256 "538a58e048362ab6561a3ba60a4bce9a262ec6245c2bdbf2c3b07a21c8f725cc" => :el_capitan - end - - depends_on "confuse" - depends_on "liblo" - depends_on "libmonome" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf", "build" - system "./waf", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/serialoscd -v") - end -end diff --git a/Formula/sersniff.rb b/Formula/sersniff.rb deleted file mode 100644 index be7d6b7c602c9..0000000000000 --- a/Formula/sersniff.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Sersniff < Formula - desc "Program to tunnel/sniff between 2 serial ports" - homepage "https://www.earth.li/projectpurple/progs/sersniff.html" - url "https://www.earth.li/projectpurple/files/sersniff-0.0.5.tar.gz" - sha256 "8aa93f3b81030bcc6ff3935a48c1fd58baab8f964b1d5e24f0aaecbd78347209" - head "git://the.earth.li/sersniff" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "89c553505287f0cbd3ef2d46c6b04eb328d0748db6e60511b25d24cefcab83ce" => :mojave - sha256 "eb3cf737a135049c3f7b8bacf4d71670dfc755a1b266f41f0865fb8983a53d55" => :high_sierra - sha256 "077112b0300e14f956fbe45ff650cf973e04c355707a3add63b8efc7fc047737" => :sierra - sha256 "abde8af644fecfa883abf597486fd269b379001ae29161fbd21777d0506edc86" => :el_capitan - sha256 "c0c00897dd19dc6f8dff05b57e961079c8f783ba9afc345cac9f064dd2ae6630" => :yosemite - sha256 "cd8d98e4360a068975fa25f1816e1a79533b46e5da65e455a0498d334daa1761" => :mavericks - end - - def install - system "make" - bin.install "sersniff" - man8.install "sersniff.8" - end - - test do - assert_match(/sersniff v#{version}/, - shell_output("#{bin}/sersniff -h 2>&1", 1)) - end -end diff --git a/Formula/serveit.rb b/Formula/serveit.rb deleted file mode 100644 index f4a2f48cdd029..0000000000000 --- a/Formula/serveit.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Serveit < Formula - desc "Synchronous server and rebuilder of static content" - homepage "https://github.com/garybernhardt/serveit" - url "https://github.com/garybernhardt/serveit/archive/v0.0.2.tar.gz" - sha256 "d7a04f2fbd97f90c31e1838da952cbf5fd8844abeabce0a88569e3d279488ad4" - revision 1 - head "https://github.com/garybernhardt/serveit.git" - - bottle :unneeded - - depends_on "ruby" if MacOS.version <= :mountain_lion - - def install - bin.install "serveit" - end - - test do - begin - pid = fork { exec bin/"serveit" } - sleep 2 - assert_match /Listing for/, shell_output("curl localhost:8000") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/serverless.rb b/Formula/serverless.rb deleted file mode 100644 index 48029fab09df0..0000000000000 --- a/Formula/serverless.rb +++ /dev/null @@ -1,35 +0,0 @@ -require "language/node" - -class Serverless < Formula - desc "Build applications with serverless architectures" - homepage "https://serverless.com" - url "https://registry.npmjs.org/serverless/-/serverless-1.33.1.tgz" - sha256 "bc148ae6c6bf23124df9806f56b0772cda8c19c7d8c7224868d4d5163d640f34" - - bottle do - cellar :any_skip_relocation - sha256 "d708d77b819afb2896c2cb5a59628e96df5b921356963cf640460bc0451dacc3" => :mojave - sha256 "a3456d38a0cc201a1ca7668730c2134b1b52082475bc2ebc46cd14517668ef4f" => :high_sierra - sha256 "700b5ba723cc9b5815a70424f5d3748ea6496ce09d5dca7b72c3a2bd92006a04" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"serverless.yml").write <<~EOS - service: homebrew-test - provider: - name: aws - runtime: python3.6 - stage: dev - region: eu-west-1 - EOS - output = shell_output("#{bin}/serverless package") - assert_match "Serverless: Packaging service...", output - end -end diff --git a/Formula/servus.rb b/Formula/servus.rb deleted file mode 100644 index 171a6a409333a..0000000000000 --- a/Formula/servus.rb +++ /dev/null @@ -1,123 +0,0 @@ -class Servus < Formula - desc "Library and Utilities for zeroconf networking" - homepage "https://github.com/HBPVIS/Servus" - url "https://github.com/HBPVIS/Servus.git", - :tag => "1.5.1", - :revision => "eee576548a05292179f4892d48b97108d8ed07c0" - - bottle do - cellar :any - sha256 "65daafc6c169de45d7579425522250c81e4e9f8f83aef66b58d43d4426826248" => :mojave - sha256 "fc9303986cd2dda58a7ed71e96273eef4517120b4e8b32f2956f672f3125e312" => :high_sierra - sha256 "6946b4f5b7151f94cdb6e75ae47fda08a1da867f5690e757ee9d82875836905a" => :sierra - sha256 "39e8d21f40ecf08f3bf68e565648c9b94e4eb5d1acda854d8ff58676dce9a7dc" => :el_capitan - sha256 "3f23b83c09997e5e51b0089b7d2fad4ee8d7527fe29633cb6551a239acff59d7" => :yosemite - end - - depends_on "cmake" => :build - depends_on "boost" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - # Embed "serializeable" test from the servus 1.5.0 source - (testpath/"test.cpp").write <<~EOS - #define BOOST_TEST_MODULE servus_serializable - #include - - #include - #include - - void dummyFunction(){} - - class SerializableObject : public servus::Serializable - { - public: - std::string getTypeName() const final { return "test::serializable"; } - - servus::uint128_t getTypeIdentifier() const final - { - return servus::make_uint128( getTypeName( )); - } - - private: - bool _fromBinary( const void*, const size_t ) { return true; } - bool _fromJSON( const std::string& ) { return true; } - }; - - - BOOST_AUTO_TEST_CASE(serializable_types) - { - SerializableObject obj; - BOOST_CHECK_EQUAL( obj.getTypeName(), "test::serializable" ); - BOOST_CHECK_EQUAL( servus::make_uint128( obj.getTypeName( )), - obj.getTypeIdentifier( )); - BOOST_CHECK_EQUAL( obj.getSchema(), std::string( )); - } - - BOOST_AUTO_TEST_CASE(serializable_registerSerialize) - { - SerializableObject obj; - servus::Serializable::SerializeCallback callback( dummyFunction ); - - obj.registerSerializeCallback( callback ); - BOOST_CHECK_THROW( obj.registerSerializeCallback( callback ), - std::runtime_error ); // callback already registered - - BOOST_CHECK_NO_THROW( obj.registerSerializeCallback( - servus::Serializable::SerializeCallback( ))); - BOOST_CHECK_NO_THROW( obj.registerSerializeCallback( callback )); - - BOOST_CHECK_THROW( obj.registerSerializeCallback( callback ), - std::runtime_error ); // callback already registered - } - - BOOST_AUTO_TEST_CASE(serializable_registerDeserialized) - { - SerializableObject obj; - servus::Serializable::DeserializedCallback callback( dummyFunction ); - - obj.registerDeserializedCallback( callback ); - BOOST_CHECK_THROW( obj.registerDeserializedCallback( callback ), - std::runtime_error ); // callback already registered - - BOOST_CHECK_NO_THROW( obj.registerDeserializedCallback( - servus::Serializable::DeserializedCallback( ))); - BOOST_CHECK_NO_THROW( obj.registerDeserializedCallback( callback )); - - BOOST_CHECK_THROW( obj.registerDeserializedCallback( callback ), - std::runtime_error ); // callback already registered - } - - BOOST_AUTO_TEST_CASE(serializable_binary) - { - SerializableObject obj; - - // fromBinary implemented - BOOST_CHECK_NO_THROW( obj.fromBinary( new float[3], 3 )); - - // default toBinary (unimplemented) - BOOST_CHECK_THROW( obj.toBinary(), std::runtime_error ); - } - - BOOST_AUTO_TEST_CASE(serializable_json) - { - SerializableObject obj; - - // fromJson implemented - BOOST_CHECK_NO_THROW( obj.fromJSON( std::string( "testing..." ))); - - // default toJson (unimplemented) - BOOST_CHECK_THROW( obj.toJSON(), std::runtime_error ); - } - EOS - system ENV.cxx, "-L#{lib}", "-lServus", "-DBOOST_TEST_DYN_LINK", - "-L#{Formula["boost"].opt_lib}", - "-lboost_unit_test_framework-mt", - "-std=gnu++11", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/setweblocthumb.rb b/Formula/setweblocthumb.rb deleted file mode 100644 index 7e8ed2f559180..0000000000000 --- a/Formula/setweblocthumb.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Setweblocthumb < Formula - desc "Assigns custom icons to webloc files" - homepage "https://hasseg.org/setWeblocThumb/" - url "https://github.com/ali-rantakari/setWeblocThumb/archive/v1.0.0.tar.gz" - sha256 "0258fdabbd24eed2ad3ff425b7832c4cd9bc706254861a6339f886efc28e35be" - - bottle do - cellar :any_skip_relocation - sha256 "95ec7fa6fc12d232f0ce75089ec987d91a922752578447a68e9170de743d5552" => :mojave - sha256 "8d7536c3ba30dc46c4e3a0f2e4be411d3e8b06be939a5130c67d2094da0cef4e" => :high_sierra - sha256 "563620905a209f198f30bbffc9177294b224cee3098719af6da8cfca74092157" => :sierra - sha256 "2a9c327d5d594d00d7d283d6627a5eeef160731616aec9d62bab017b52d71f1a" => :el_capitan - sha256 "f55cbbabd19c245e42249b8d75c51b4fcec05d6d08674a448bf6e7a3da70aae5" => :yosemite - sha256 "fa6ca731192b7645165ab28c148122688e5e584e2de1c8b500371d1c36cf9dda" => :mavericks - end - - def install - system "make" - bin.install "setWeblocThumb" - end - - test do - Pathname.new("google.webloc").write('{URL = "https://google.com";}') - system "#{bin}/setWeblocThumb", "google.webloc" - end -end diff --git a/Formula/sf-pwgen.rb b/Formula/sf-pwgen.rb deleted file mode 100644 index 4670a63c6ee21..0000000000000 --- a/Formula/sf-pwgen.rb +++ /dev/null @@ -1,27 +0,0 @@ -class SfPwgen < Formula - desc "Generate passwords using SecurityFoundation framework" - homepage "https://github.com/anders/pwgen/" - url "https://github.com/anders/pwgen/archive/v1.4.tar.gz" - sha256 "1f4c7f514426305be2e1b893a586310d579e500e033938800afd2c98fedb84d9" - head "https://github.com/anders/pwgen.git" - - bottle do - cellar :any_skip_relocation - sha256 "ddd6e11e839c49e2fafb3ed4c3a28b773bc1580a47a441c9ffb025b3bfa9dbd3" => :mojave - sha256 "05ac7530759e9f2cf3a0e94a5b1f4fea83a1710de8010fa9b3d9b60167018038" => :high_sierra - sha256 "ff59281df8d8c0e341233cdffafe67d0dc78101afb90a8597b0a83605ef578a3" => :sierra - sha256 "2c0e0523569aa25fe254012d3b86ae0bdc587c0f17c4a62d8d12917b7fa44fbf" => :el_capitan - sha256 "2c6d133b3c9b079dc8c81407107a3c1fb4d5cb3d654afa7acef6f23b9f9df9a6" => :yosemite - end - - depends_on :macos => :mountain_lion - - def install - system "make" - bin.install "sf-pwgen" - end - - test do - assert_equal 20, shell_output("#{bin}/sf-pwgen -a memorable -c 1 -l 20").chomp.length - end -end diff --git a/Formula/sfcgal.rb b/Formula/sfcgal.rb deleted file mode 100644 index 1a159dc184d45..0000000000000 --- a/Formula/sfcgal.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sfcgal < Formula - desc "C++ wrapper library around CGAL" - homepage "http://sfcgal.org/" - url "https://github.com/Oslandia/SFCGAL/archive/v1.3.6.tar.gz" - sha256 "5840192eb4a1a4e500f65eedfebacd4bc4b9192c696ea51d719732dc2c75530a" - - bottle do - sha256 "a93d0c08573d27ec212da50cbdc64bdfed404808f8cbe0a300719c10fec07618" => :mojave - sha256 "485b8f11ac8d17d8f82d39e1ece3cadf48c05dd8e0090cafcb30aaff93341a43" => :high_sierra - sha256 "76e96ef51af1b0d4f7dc3ef37d8a2a6032ec12c24d5743445c48a4a280d962c0" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "cgal" - depends_on "gmp" - depends_on "mpfr" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_equal prefix.to_s, shell_output("#{bin}/sfcgal-config --prefix").strip - end -end diff --git a/Formula/sfk.rb b/Formula/sfk.rb deleted file mode 100644 index 4c155d14cf242..0000000000000 --- a/Formula/sfk.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Sfk < Formula - desc "Command-line tools collection" - homepage "http://stahlworks.com/dev/swiss-file-knife.html" - url "https://downloads.sourceforge.net/project/swissfileknife/1-swissfileknife/1.9.2.0/sfk-1.9.2.tar.gz" - version "1.9.2.0" - sha256 "4537d033edfe6feb0bbafdcf157646a19951b8ef9056898718674d39a3c088d7" - - bottle do - cellar :any_skip_relocation - sha256 "31be7680a1df8fa2fb4de468fc67e8393aad87c8919cf3b9c08bac70b3c05ba1" => :high_sierra - sha256 "42cd7ac69141a671fa741ff9ca9b4dacaa4530ed9e2c969f91803b68ed6167c8" => :sierra - sha256 "151596ee2a4392118faf49ed6b56f7b4408ea800d6e212afc6c67941690b735d" => :el_capitan - end - - def install - ENV.libstdcxx - - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/sfk", "ip" - end -end diff --git a/Formula/sflowtool.rb b/Formula/sflowtool.rb deleted file mode 100644 index ce81826d0e594..0000000000000 --- a/Formula/sflowtool.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Sflowtool < Formula - desc "Utilities and scripts for analyzing sFlow data" - homepage "https://inmon.com/technology/sflowTools.php" - url "https://github.com/sflow/sflowtool/releases/download/v3.41/sflowtool-3.41.tar.gz" - sha256 "0e807f182db5ca5b37d0fb55b77e970b1d51fee0cd8cb845646211befb35ca24" - - bottle do - cellar :any_skip_relocation - sha256 "6ed1d462dbb2993bb369636d98ae7b38808c73592480fd428f259ef582e0b613" => :mojave - sha256 "b797a335bf9b9910fd4da5a8d54c5dca233527cbc9cf6f72e9c1205a0bef5a57" => :high_sierra - sha256 "359f80ea054dbb35c8878ac61aa0f18478e03e8e8c9a2a08d8f4fe8b86257469" => :sierra - sha256 "683d0468235a5d78035c4fc4b4db19d503d4042adec9c38fa1b7e9c1233354e8" => :el_capitan - sha256 "8957c4da2c6a3f9f17bd8a58b5472db7dcb4f4402467b3fba4f8beda76e4eff9" => :yosemite - end - - resource "scripts" do - url "https://inmon.com/bin/sflowutils.tar.gz" - sha256 "45f6a0f96bdb6a1780694b9a4ef9bbd2fd719b9f7f3355c6af1427631b311d56" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - (prefix/"contrib").install resource("scripts") - end - - test do - assert_match version.to_s, shell_output("#{bin}/sflowtool -h 2>&1") - end -end diff --git a/Formula/sfml.rb b/Formula/sfml.rb deleted file mode 100644 index 6122f6afc6b13..0000000000000 --- a/Formula/sfml.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Sfml < Formula - # Don't update SFML until there's a corresponding CSFML release - desc "Multi-media library with bindings for multiple languages" - homepage "https://www.sfml-dev.org/" - url "https://www.sfml-dev.org/files/SFML-2.4.2-sources.zip" - sha256 "8ba04f6fde6a7b42527d69742c49da2ac529354f71f553409f9f821d618de4b6" - revision 1 - head "https://github.com/SFML/SFML.git" - - bottle do - cellar :any - rebuild 1 - sha256 "1c5fc7fdb1a59664f2128d309c3a198fffd60cb9f930fbe8ed7f8eb52753250b" => :mojave - sha256 "ed02627dfaff55b60f9271379256d99adfb010df3f4842b0e33fd366eb62df6e" => :high_sierra - sha256 "76c3949dad4b907b87d219f10eb2dae44d43cb76963a083f70935f138832d13c" => :sierra - sha256 "976560145b126bd482696148767f333ceda470d847064a5682abcd5c329937bd" => :el_capitan - sha256 "43dbf56a522f7bce55db7e5354ee0810b7abad63b97178a1ed7a73356c52577c" => :yosemite - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "flac" - depends_on "freetype" - depends_on "jpeg" - depends_on "libogg" - depends_on "libvorbis" - - # https://github.com/Homebrew/homebrew/issues/40301 - depends_on :macos => :lion - - def install - # Install pkg-config files, adding the CMake flag below isn't enough, as - # the CMakeLists.txt file currently doesn't consider MacOS X. - # This was fixed upstream for the future 2.5.0 release on 2016-12-19 in: - # https://github.com/SFML/SFML/commit/5fe5e5d6d7792e37685a437551ffa8ed5161fcc1 - inreplace "CMakeLists.txt", - "if(SFML_OS_LINUX OR SFML_OS_FREEBSD)", - "if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX)" - - # Always remove the "extlibs" to avoid install_name_tool failure - # (https://github.com/Homebrew/homebrew/pull/35279) but leave the - # headers that were moved there in https://github.com/SFML/SFML/pull/795 - rm_rf Dir["extlibs/*"] - ["extlibs/headers"] - - system "cmake", ".", *std_cmake_args, - "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE", - "-DSFML_BUILD_DOC=TRUE" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "Time.hpp" - int main() { - sf::Time t1 = sf::milliseconds(10); - return 0; - } - EOS - system ENV.cxx, "-I#{include}/SFML/System", "-L#{lib}", "-lsfml-system", - testpath/"test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/sfst.rb b/Formula/sfst.rb deleted file mode 100644 index 01e90af812b22..0000000000000 --- a/Formula/sfst.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Sfst < Formula - desc "Toolbox for morphological analysers and other FST-based tools" - homepage "http://www.cis.uni-muenchen.de/~schmid/tools/SFST/" - url "http://www.cis.uni-muenchen.de/~schmid/tools/SFST/data/SFST-1.4.7d.tar.gz" - sha256 "5a13c6a45298197216a6299eb6cdf96595d2036572bb518b9e1c1893cb1a6d5f" - - bottle do - cellar :any_skip_relocation - sha256 "74aa99f751d850a1fcdc1cf347406e7137625cdc8010e3dacce972858a5469f7" => :mojave - sha256 "6c5e1bc0f6e6d78a565b7892767035238957ab80b838b496a039a9174475056f" => :high_sierra - sha256 "b3c2889ed84c29e3fb4a2d0f89af99631045178ea30227c8b6ffd3f8cdf308d1" => :sierra - sha256 "96b01f2f7ddfe59b2d0d924d456e5bbd3b2b1ab9b0c909da98a4773a61f63e69" => :el_capitan - end - - def install - cd "src" do - system "make" - system "make", "DESTDIR=#{prefix}/", "install" - system "make", "DESTDIR=#{share}/", "maninstall" - end - end - - test do - require "open3" - - (testpath/"foo.fst").write "Hello" - system "#{bin}/fst-compiler", "foo.fst", "foo.a" - assert_predicate testpath/"foo.a", :exist?, "Foo.a should exist but does not!" - - Open3.popen3("#{bin}/fst-mor", "foo.a") do |stdin, stdout, _| - stdin.write("Hello") - stdin.close - expected_output = "reading transducer...\nfinished.\nHello\n" - actual_output = stdout.read - assert_equal expected_output, actual_output - end - end -end diff --git a/Formula/sgrep.rb b/Formula/sgrep.rb deleted file mode 100644 index e42c06f46ebc5..0000000000000 --- a/Formula/sgrep.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sgrep < Formula - desc "Search SGML, XML, and HTML" - homepage "https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html" - # curl: (9) Server denied you to change to the given directory - # ftp://ftp.cs.helsinki.fi/pub/Software/Local/Sgrep/sgrep-1.94a.tar.gz - url "https://www.mirrorservice.org/sites/distfiles.macports.org/sgrep2/sgrep-1.94a.tar.gz" - mirror "https://fossies.org/linux/misc/old/sgrep-1.94a.tar.gz" - sha256 "d5b16478e3ab44735e24283d2d895d2c9c80139c95228df3bdb2ac446395faf9" - - bottle do - sha256 "a9035c893dcfb8a82a7e2976774645af26dc4f1ade1f2af225264a35695ebda4" => :mojave - sha256 "0e46d1884c4ad14911e32952b3f1e2df1457b455a30ed06ee67dfb5e33efd469" => :high_sierra - sha256 "c698f6a657fd7edd7bb8e7d717dc09ac73b1042e93b79555152626f71388b275" => :sierra - sha256 "089890a739b047b429b88a583f71832fbfbd3c8f7abc067531424c14e8463df4" => :el_capitan - sha256 "a4228a3f40db355cbd6b3feedd4cbdaf8c9b582b24f188982f296b17ac14590f" => :yosemite - sha256 "f582b8ae918c1f279e1e3c362d016ad91aeb4accc229cfe9f6ccac8c991ce4a6" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--datadir=#{pkgshare}" - system "make", "install" - end - - test do - input = test_fixtures("test.eps") - assert_equal "2", shell_output("#{bin}/sgrep -c '\"mark\"' #{input}").strip - end -end diff --git a/Formula/sha1dc.rb b/Formula/sha1dc.rb deleted file mode 100644 index e9d07a877daa0..0000000000000 --- a/Formula/sha1dc.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Sha1dc < Formula - desc "Tool to detect SHA-1 collisions in files, including SHAttered" - homepage "https://github.com/cr-marcstevens/sha1collisiondetection" - url "https://github.com/cr-marcstevens/sha1collisiondetection/archive/stable-v1.0.3.tar.gz" - sha256 "77a1c2b2a4fbe4f78de288fa4831ca63938c3cb84a73a92c79f436238bd9ac07" - - # The "master" branch is unusably broken and behind the - # "simplified_c90" branch that's the basis for release. - head "https://github.com/cr-marcstevens/sha1collisiondetection.git" - - bottle do - cellar :any - sha256 "1c12564c84282e1ddbac545864bd695527dca9026411725e4a4604eaed81ec8b" => :mojave - sha256 "a489f11b91a88486274717eace83368f6b072b134ddc62001157b1fae9873dab" => :high_sierra - sha256 "9eba4b19247672b715376e2086689e7418235d850a158636d2ba3deb46851933" => :sierra - sha256 "32d59c039a26d232b35f3c1877ca8c78ba0a303866adefee002c017359b03267" => :el_capitan - sha256 "939388a0fe029d8cba8080a778269322489c55f787301947c82fb30cf8433b08" => :yosemite - end - - depends_on "coreutils" => :build # GNU install - depends_on "libtool" => :build - - def install - system "make", "INSTALL=ginstall", "PREFIX=#{prefix}", "install" - (pkgshare/"test").install Dir["test/*"] - end - - test do - assert_match "*coll*", shell_output("#{bin}/sha1dcsum #{pkgshare}/test/shattered-1.pdf") - assert_match "*coll*", shell_output("#{bin}/sha1dcsum #{pkgshare}/test/shattered-2.pdf") - assert_match "*coll*", shell_output("#{bin}/sha1dcsum_partialcoll #{pkgshare}/test/sha1_reducedsha_coll.bin") - end -end diff --git a/Formula/sha2.rb b/Formula/sha2.rb deleted file mode 100644 index f9c0690988bec..0000000000000 --- a/Formula/sha2.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Sha2 < Formula - desc "Implementation of SHA-256, SHA-384, and SHA-512 hash algorithms" - homepage "https://www.aarongifford.com/computers/sha.html" - url "https://www.aarongifford.com/computers/sha2-1.0.1.tgz" - sha256 "67bc662955c6ca2fa6a0ce372c4794ec3d0cd2c1e50b124e7a75af7e23dd1d0c" - - bottle do - cellar :any_skip_relocation - rebuild 3 - sha256 "2091072f27778b0a921e7f4a937e90745f75186f7e532db1170847458275aea7" => :mojave - sha256 "ae8fb4e03f1272bd6d323669b311ddffd021a945e0beba52ae288f1fa7d4639b" => :high_sierra - sha256 "133588f831b1848abef49c88fd7587052990ad4b7133dc300a5c6aed806b1801" => :sierra - sha256 "84ce281185ba415257d8507e9b16ba8dc3189ec8b8414d21a6421d5979a025d2" => :el_capitan - sha256 "da63b7e9be95c91bcdc3290e3c6caee12016c5d59960144ea26f8c6438dfe680" => :yosemite - sha256 "34650fbb427aa57f452acc23a338696756792907bd7e127d7b495a7fd7e4573a" => :mavericks - end - - def install - system ENV.cc, "-o", "sha2", "sha2prog.c", "sha2.c" - system "perl", "sha2test.pl" - bin.install "sha2" - end - - test do - (testpath/"checkme.txt").write "homebrew" - output = "12c87370d1b5472793e67682596b60efe2c6038d63d04134a1a88544509737b4" - assert_match output, pipe_output("#{bin}/sha2 -q -256 #{testpath}/checkme.txt") - end -end diff --git a/Formula/shadowsocks-libev.rb b/Formula/shadowsocks-libev.rb deleted file mode 100644 index c1780b3487b48..0000000000000 --- a/Formula/shadowsocks-libev.rb +++ /dev/null @@ -1,94 +0,0 @@ -class ShadowsocksLibev < Formula - desc "Libev port of shadowsocks" - homepage "https://github.com/shadowsocks/shadowsocks-libev" - url "https://github.com/shadowsocks/shadowsocks-libev/releases/download/v3.2.3/shadowsocks-libev-3.2.3.tar.gz" - sha256 "2befc27b1cc62af0450702343d17e347936f0d4e3d4b04ba9246c4f9b409b742" - - bottle do - cellar :any - sha256 "a78e5a90c212f185d228f1103bb585578a773ef980132849b964e798c71ad381" => :mojave - sha256 "bdf4b6a53102d1c73c7f7dc76cec80608231351f9ea038b186e85b9b916bcf4a" => :high_sierra - sha256 "3f2d9fb7edba0b4f7e6dca0be8ba628ceea45726e76e63e3494708892622187b" => :sierra - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "c-ares" - depends_on "libev" - depends_on "libsodium" - depends_on "mbedtls" - depends_on "pcre" - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - system "./configure", "--prefix=#{prefix}" - system "make" - - (buildpath/"shadowsocks-libev.json").write <<~EOS - { - "server":"localhost", - "server_port":8388, - "local_port":1080, - "password":"barfoo!", - "timeout":600, - "method":null - } - EOS - etc.install "shadowsocks-libev.json" - - inreplace Dir["man/*"], "/etc/shadowsocks-libev/config.json", "#{etc}/shadowsocks-libev.json" - - system "make", "install" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/shadowsocks-libev/bin/ss-local -c #{HOMEBREW_PREFIX}/etc/shadowsocks-libev.json -u" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/ss-local - -c - #{etc}/shadowsocks-libev.json - -u - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - (testpath/"shadowsocks-libev.json").write <<~EOS - { - "server":"127.0.0.1", - "server_port":9998, - "local":"127.0.0.1", - "local_port":9999, - "password":"test", - "timeout":600, - "method":null - } - EOS - server = fork { exec bin/"ss-server", "-c", testpath/"shadowsocks-libev.json" } - client = fork { exec bin/"ss-local", "-c", testpath/"shadowsocks-libev.json" } - sleep 3 - begin - system "curl", "--socks5", "127.0.0.1:9999", "github.com" - ensure - Process.kill 9, server - Process.wait server - Process.kill 9, client - Process.wait client - end - end -end diff --git a/Formula/shairport-sync.rb b/Formula/shairport-sync.rb deleted file mode 100644 index bc4827e01ebdd..0000000000000 --- a/Formula/shairport-sync.rb +++ /dev/null @@ -1,51 +0,0 @@ -class ShairportSync < Formula - desc "AirTunes emulator that adds multi-room capability" - homepage "https://github.com/mikebrady/shairport-sync" - url "https://github.com/mikebrady/shairport-sync/archive/3.2.2.tar.gz" - sha256 "4f1ee142b887842727ae0c310e21c83ea2386518e841a25c7ddb015d08b54eba" - head "https://github.com/mikebrady/shairport-sync.git", :branch => "development" - - bottle do - sha256 "7dc8276b51f1ef0ef4cf38c27228d46e80678425626783efc0e71646b8a6c60f" => :mojave - sha256 "8ed5e98d394f2dc6136abbbc15ecdc27a471244ef2c67c69558fbf9c3fae77ed" => :high_sierra - sha256 "72a828bd11b9c6a28d0c4b3c90e92ded0c4ee4ba5aa095f06a22362e5c78212d" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libao" - depends_on "libconfig" - depends_on "libdaemon" - depends_on "libsoxr" - depends_on "openssl" - depends_on "popt" - - def install - system "autoreconf", "-fvi" - args = %W[ - --with-os=darwin - --with-ssl=openssl - --with-dns_sd - --with-ao - --with-stdout - --with-pipe - --with-soxr - --with-metadata - --with-piddir=#{var}/run - --sysconfdir=#{etc}/shairport-sync - --prefix=#{prefix} - ] - system "./configure", *args - system "make", "install" - end - - def post_install - (var/"run").mkpath - end - - test do - output = shell_output("#{bin}/shairport-sync -V", 1) - assert_match "OpenSSL-ao-stdout-pipe-soxr-metadata", output - end -end diff --git a/Formula/shairport.rb b/Formula/shairport.rb deleted file mode 100644 index b95e43c0b207c..0000000000000 --- a/Formula/shairport.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Shairport < Formula - desc "Airtunes emulator" - homepage "https://github.com/abrasive/shairport" - url "https://github.com/abrasive/shairport/archive/1.1.1.tar.gz" - sha256 "1b60df6d40bab874c1220d7daecd68fcff3e47bda7c6d7f91db0a5b5c43c0c72" - head "https://github.com/abrasive/shairport.git" - - bottle do - cellar :any - rebuild 1 - sha256 "75a04ae35accc05373f970e293114567b3c6459cd3a22c4e5370f1031da2c42f" => :mojave - sha256 "1fe3430874b5895dd8452ce4e688b6476ecfa3e61e2da66ee7edd7bd1c6b6df8" => :high_sierra - sha256 "813a45b8e0dbc38efa55577f752a076169d0ff24a8d24a1c29426af78a47a591" => :sierra - sha256 "506a28dff863f2a8e17058fead36c037e580f448faa68a459d2b739a756e1c13" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - system "./configure" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/shairport", "-h" - end -end diff --git a/Formula/shakespeare.rb b/Formula/shakespeare.rb deleted file mode 100644 index c10e0584dbf8b..0000000000000 --- a/Formula/shakespeare.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Shakespeare < Formula - desc "Write programs in Shakespearean English" - homepage "https://shakespearelang.sourceforge.io/" - url "https://shakespearelang.sourceforge.io/download/spl-1.2.1.tar.gz" - sha256 "1206ef0a2c853b8b40ca0c682bc9d9e0a157cc91a7bf4e28f19ccd003674b7d3" - - bottle do - cellar :any - rebuild 1 - sha256 "657bf548e23dd5564a32e1b86f983f1899e24966728e8e94dfdb981d35e60a45" => :mojave - sha256 "7320be8a139934d9a80543a8017de6500f02971374a36038592ad122d76f85cf" => :high_sierra - sha256 "6a8e746959adcbd5629bd6ec74fcc3854fa7355d098c14a640a6df23358ce335" => :sierra - sha256 "86547f1b0967f8399f00b7120a251a126e66dfe9c52a4fb9b3d17331e2381895" => :el_capitan - sha256 "1e35a35e7ca7eef401a76360320389fe23e2cea6db8bf9f2d266732c742ad8d5" => :yosemite - end - - depends_on "flex" if MacOS.version >= :mountain_lion - - def install - system "make", "install" - bin.install "spl/bin/spl2c" - include.install "spl/include/spl.h" - lib.install "spl/lib/libspl.a" - end -end diff --git a/Formula/shapelib.rb b/Formula/shapelib.rb deleted file mode 100644 index 838b81f4d7ec8..0000000000000 --- a/Formula/shapelib.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Shapelib < Formula - desc "Library for reading and writing ArcView Shapefiles" - homepage "http://shapelib.maptools.org/" - url "https://download.osgeo.org/shapelib/shapelib-1.4.1.tar.gz" - sha256 "a4c94817365761a3a4c21bb3ca1c680a6bdfd3edd61df9fdd291d3e7645923b3" - - bottle do - cellar :any - sha256 "421ca3047acf77e98015b15af2d1b22090a65e464ad2a773ccb725b7b56b1005" => :mojave - sha256 "cdc9cc715cc716357b9faa701b930117e85b13e89a940ad6dbd6413af6308384" => :high_sierra - sha256 "dd4f69f0833e460653959dee684d687bc2186031c5f7481dc5b6d3bc0f383e59" => :sierra - sha256 "5ec5a7f6ae4857b2b43bdbcc360558e4f90ca6e510b42edd3ac5961988db195e" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_match "shp_file", shell_output("#{bin}/shptreedump", 1) - end -end diff --git a/Formula/shared-mime-info.rb b/Formula/shared-mime-info.rb deleted file mode 100644 index f730379a87794..0000000000000 --- a/Formula/shared-mime-info.rb +++ /dev/null @@ -1,55 +0,0 @@ -class SharedMimeInfo < Formula - desc "Database of common MIME types" - homepage "https://wiki.freedesktop.org/www/Software/shared-mime-info" - url "https://freedesktop.org/~hadess/shared-mime-info-1.10.tar.xz" - sha256 "c625a83b4838befc8cafcd54e3619946515d9e44d63d61c4adf7f5513ddfbebf" - - bottle do - cellar :any - sha256 "0eb2f032c94d63083a2a33d3097465bc2cda368e58d92dd3ffe009446833bb9c" => :mojave - sha256 "bfa90f488784ce2b8204dedfe72b78ea5125f9d0fcd9dcabe15897dda9534b27" => :high_sierra - sha256 "befa98d6a05964524b246d0d34abe0301e58e3c13d3b8b6d9b7647e602be6f4f" => :sierra - sha256 "d9af8ef829cd4060f0185dc8a43cecdbc256c9265c40729c5b50edc1b5e6bd04" => :el_capitan - end - - head do - url "https://anongit.freedesktop.org/git/xdg/shared-mime-info.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "intltool" => :build - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - # Disable the post-install update-mimedb due to crash - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-update-mimedb - ] - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - pkgshare.install share/"mime/packages" - rmdir share/"mime" - end - - def post_install - ln_sf HOMEBREW_PREFIX/"share/mime", share/"mime" - (HOMEBREW_PREFIX/"share/mime/packages").mkpath - cp (pkgshare/"packages").children, HOMEBREW_PREFIX/"share/mime/packages" - system bin/"update-mime-database", HOMEBREW_PREFIX/"share/mime" - end - - test do - cp_r share/"mime", testpath - system bin/"update-mime-database", testpath/"mime" - end -end diff --git a/Formula/shc.rb b/Formula/shc.rb deleted file mode 100644 index 2a51292ac163d..0000000000000 --- a/Formula/shc.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Shc < Formula - desc "Shell Script Compiler" - homepage "https://neurobin.github.io/shc" - url "https://github.com/neurobin/shc/archive/4.0.1.tar.gz" - sha256 "494666df8b28069a7d73b89f79919bdc04e929a176746c98c3544a639978ba52" - head "https://github.com/neurobin/shc.git" - - bottle do - cellar :any_skip_relocation - sha256 "f1f6fb1ef4f5f3017438b6a77506c5736a6ab2db30faaa00dbdeb45e4e8d1710" => :mojave - sha256 "a6e168088060e10e7833309922139274a92e8940c6c81742a4ea9e09ea342b91" => :high_sierra - sha256 "3c56f17da02fb9462783538cf46fb52e659906004c38c2bbd5c56579b987d837" => :sierra - end - - def install - system "./configure" - system "make", "install", "prefix=#{prefix}" - pkgshare.install "test" - end - - test do - (testpath/"test.sh").write <<~EOS - #!/bin/sh - echo hello - exit 0 - EOS - system bin/"shc", "-f", "test.sh", "-o", "test" - assert_equal "hello", shell_output("./test").chomp - end -end diff --git a/Formula/shellcheck.rb b/Formula/shellcheck.rb deleted file mode 100644 index ae02acd607b16..0000000000000 --- a/Formula/shellcheck.rb +++ /dev/null @@ -1,41 +0,0 @@ -require "language/haskell" - -class Shellcheck < Formula - include Language::Haskell::Cabal - - desc "Static analysis and lint tool, for (ba)sh scripts" - homepage "https://www.shellcheck.net/" - url "https://github.com/koalaman/shellcheck/archive/v0.6.0.tar.gz" - sha256 "78f90aa8e618dc468bc1c36b6929216dc7a0c2679cd157e50919f7d8cc1899bc" - revision 1 - head "https://github.com/koalaman/shellcheck.git" - - bottle do - cellar :any_skip_relocation - sha256 "20539e9e7d74ca9f46d397e050343d1bee078c3a47f808682771b2edd9df3ff4" => :mojave - sha256 "4cf8f9e649d601ff8ff0e6aa5ec942a57ced2c2d6b1aa6abf00031bf3a047e73" => :high_sierra - sha256 "a4c362d13a746d6c3377d2970d311668626c175f8a86fe7289f9cbacbda9f59c" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "pandoc" => :build - - def install - install_cabal_package - system "pandoc", "-s", "-f", "markdown-smart", "-t", "man", - "shellcheck.1.md", "-o", "shellcheck.1" - man1.install "shellcheck.1" - end - - test do - sh = testpath/"test.sh" - sh.write <<~EOS - for f in $(ls *.wav) - do - echo "$f" - done - EOS - assert_match "[SC2045]", shell_output("#{bin}/shellcheck -f gcc #{sh}", 1) - end -end diff --git a/Formula/shellharden.rb b/Formula/shellharden.rb deleted file mode 100644 index 382187dac186c..0000000000000 --- a/Formula/shellharden.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Shellharden < Formula - desc "Bash syntax highlighter that encourages/fixes variables quoting" - homepage "https://github.com/anordal/shellharden" - url "https://github.com/anordal/shellharden/archive/v4.1.tar.gz" - sha256 "2714b827f72c336b7abf87f5a291ec182443a5479ec3eee516d6e04c81d56414" - - bottle do - sha256 "23a4338547c6cb9b3e4e8d454cb8e1420c5a38f0440b9dde0f95384656ef87ca" => :mojave - sha256 "1dc1515f934b43e17b4faeb17cda61a22a28866e625d863c7372eda6a2e111d3" => :high_sierra - sha256 "2fdb7e3d8fdeab4089143e5d11f1b5b379f25b11623af5497cd54e829ccd1b85" => :sierra - sha256 "d1b2430ab2de01134b5a0b4435fb7280bed7f140e662d7e2ccd4764a5be6e737" => :el_capitan - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - (testpath/"script.sh").write <<~EOS - dog="poodle" - echo $dog - EOS - system bin/"shellharden", "--replace", "script.sh" - assert_match "echo \"$dog\"", (testpath/"script.sh").read - end -end diff --git a/Formula/shellinabox.rb b/Formula/shellinabox.rb deleted file mode 100644 index ad3eb13089fca..0000000000000 --- a/Formula/shellinabox.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Shellinabox < Formula - desc "Export command-line tools to web based terminal emulator" - homepage "https://github.com/shellinabox/shellinabox" - url "https://github.com/shellinabox/shellinabox/archive/v2.20.tar.gz" - sha256 "27a5ec6c3439f87aee238c47cc56e7357a6249e5ca9ed0f044f0057ef389d81e" - - bottle do - cellar :any_skip_relocation - sha256 "50777e72e0f35004b980a433631bebc7904c971bf509349d80537d788167f8d9" => :mojave - sha256 "4a7624626d440f813a04b80d11d04f5529ebab4c2e2079587505abc1df01ad83" => :high_sierra - sha256 "ad56ade520d138d05387117756a57cb9cc4c4ba1b3ca1c2adc7dec5c8d8b1cb8" => :sierra - sha256 "9ea1e1799cc9496ee7e391e65b1c69e693ff95bb5479c6be28138fc0f9fb9d7c" => :el_capitan - sha256 "2cfd35e4f9b2d28d9ba72a318d7ca48f5b6bed7c7a655a6b0437254bab268186" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl" - - def install - system "autoreconf", "-fiv" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/shellinaboxd", "--version" - end -end diff --git a/Formula/shellshare.rb b/Formula/shellshare.rb deleted file mode 100644 index 4d029a488934a..0000000000000 --- a/Formula/shellshare.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Shellshare < Formula - desc "Live Terminal Broadcast" - homepage "https://shellshare.net" - url "https://github.com/vitorbaptista/shellshare/archive/v1.0.3.tar.gz" - sha256 "d984a413c3b1f785265430519e9b1eecc6e47b96d63f5b207f82872dab0a0765" - revision 1 - - bottle :unneeded - - def install - bin.install "public/bin/shellshare" - end - - test do - system "#{bin}/shellshare", "-v" - end -end diff --git a/Formula/shelltestrunner.rb b/Formula/shelltestrunner.rb deleted file mode 100644 index 961d82963d965..0000000000000 --- a/Formula/shelltestrunner.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "language/haskell" - -class Shelltestrunner < Formula - include Language::Haskell::Cabal - - desc "Portable command-line tool for testing command-line programs" - homepage "https://github.com/simonmichael/shelltestrunner" - url "https://hackage.haskell.org/package/shelltestrunner-1.9/shelltestrunner-1.9.tar.gz" - sha256 "cbc4358d447e32babe4572cda0d530c648cc4c67805f9f88002999c717feb3a8" - - bottle do - cellar :any_skip_relocation - sha256 "de0ba4e228df9e3b290ce49af7b0bbe1f3983306a2b7af418ca84a628e9e08f7" => :mojave - sha256 "e6c941fb8a8b18e51789a9523fab1d1e8ab312d6c0ce93af72f2caf495a54870" => :high_sierra - sha256 "3ddd0cf1e9baf4f31e667bb1477af3e7a7b905071041569bb1bd6031118a377b" => :sierra - sha256 "2f954da156e2d7aea6059738913124883a78797d1118ba11b8366bc4b7dd03dd" => :el_capitan - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - install_cabal_package :using => ["happy"] - end - - test do - (testpath/"test").write "$$$ {exe} {in}\n>>> /{out}/\n>>>= 0" - args = "-D{exe}=echo -D{in}=message -D{out}=message -D{doNotExist}=null" - assert_match "Passed", shell_output("#{bin}/shelltest #{args} test") - end -end diff --git a/Formula/shellz.rb b/Formula/shellz.rb deleted file mode 100644 index 9f9accfb374b3..0000000000000 --- a/Formula/shellz.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Shellz < Formula - desc "Small utility to track and control custom shellz" - homepage "https://github.com/evilsocket/shellz" - url "https://github.com/evilsocket/shellz/archive/v1.4.0.tar.gz" - sha256 "d5d2d33cf5c6898be97eb20c08ea7053cc5ee7449542afe9d1a06b14a57c0312" - - bottle do - cellar :any_skip_relocation - sha256 "494dc447302a25f84d9a5164f92138ce9ae8b366cf33dd00b71e3e6429e60dd4" => :mojave - sha256 "e346665aad2c792f1e4f95ee5c35837c86dd43d433da8b475def3174357934e9" => :high_sierra - sha256 "9dcc0ebb77ba4c79f48158f86584db1b5d00b13ee40bd1d49f3601d1a9d5c2e4" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/evilsocket/shellz").install buildpath.children - - cd "src/github.com/evilsocket/shellz" do - system "dep", "ensure", "-vendor-only" - system "make", "build" - bin.install "shellz" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/shellz -no-banner -no-effects -path #{testpath}", 1) - assert_match "creating", output - assert_predicate testpath/"shells", :exist? - end -end diff --git a/Formula/shfmt.rb b/Formula/shfmt.rb deleted file mode 100644 index e30cf3edbf1f4..0000000000000 --- a/Formula/shfmt.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Shfmt < Formula - desc "Autoformat shell script source code" - homepage "https://github.com/mvdan/sh" - url "https://github.com/mvdan/sh/archive/v2.6.2.tar.gz" - sha256 "69f5a801239299be95b26aa9342339432934eb49c41137022ef39aaf58c903da" - head "https://github.com/mvdan/sh.git" - - bottle do - cellar :any_skip_relocation - sha256 "d403eecfe666f891ebb45bd8f3c1abe0606aacb52d90fb00bb6bd52655b60744" => :mojave - sha256 "5c73f29186224ade6113238743d690e57c5fe318bac9da712116fb6ad3c5fd37" => :high_sierra - sha256 "38e606c8d8edfd994c665314735e66603f33de6f34ac6d98b7d80da308ed3a75" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/mvdan.cc").mkpath - ln_sf buildpath, buildpath/"src/mvdan.cc/sh" - system "go", "build", "-a", "-tags", "production brew", "-o", "#{bin}/shfmt", "mvdan.cc/sh/cmd/shfmt" - end - - test do - (testpath/"test").write "\t\techo foo" - system "#{bin}/shfmt", testpath/"test" - end -end diff --git a/Formula/shibboleth-sp.rb b/Formula/shibboleth-sp.rb deleted file mode 100644 index 068618f9d93ad..0000000000000 --- a/Formula/shibboleth-sp.rb +++ /dev/null @@ -1,100 +0,0 @@ -class ShibbolethSp < Formula - desc "Shibboleth 2 Service Provider daemon" - homepage "https://wiki.shibboleth.net/confluence/display/SHIB2" - url "https://shibboleth.net/downloads/service-provider/3.0.2/shibboleth-sp-3.0.2.tar.bz2" - sha256 "7aab399aeaf39145c60e1713dbc29a65f618e9eca84505f5ed03cee63e3f31a3" - revision 4 - - bottle do - sha256 "d594a58a8f28666a09dafa0fd3a9f204d069e14a8b89235d7eacc16019f7b2d3" => :mojave - sha256 "f3c5a41017aefec816c7c00f74eca77712d5e3e9e6491dc8cf5c94ef22568e4a" => :high_sierra - sha256 "c98845a91f1be9a54e2c9ee1f464c68ad2989340fd6fd934b851dda696658262" => :sierra - end - - depends_on "apr" => :build - depends_on "apr-util" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "httpd" if MacOS.version >= :high_sierra - depends_on "log4shib" - depends_on :macos => :yosemite - depends_on "opensaml" - depends_on "openssl" - depends_on "unixodbc" - depends_on "xerces-c" - depends_on "xml-security-c" - depends_on "xml-tooling-c" - - needs :cxx11 - - def install - ENV.O2 # Os breaks the build - ENV.cxx11 - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{etc} - --with-xmltooling=#{Formula["xml-tooling-c"].opt_prefix} - --with-saml=#{Formula["opensaml"].opt_prefix} - --enable-apache-24 - DYLD_LIBRARY_PATH=#{lib} - ] - - if MacOS.version >= :high_sierra - args << "--with-apxs24=#{Formula["httpd"].opt_bin}/apxs" - end - - system "./configure", *args - system "make", "install" - end - - def post_install - (var/"run/shibboleth/").mkpath - (var/"cache/shibboleth").mkpath - end - - def caveats - mod = build.with?("apache-22") ? "mod_shib_22.so" : "mod_shib_24.so" - <<~EOS - You must manually edit httpd.conf to include - LoadModule mod_shib #{opt_lib}/shibboleth/#{mod} - You must also manually configure - #{etc}/shibboleth/shibboleth2.xml - as per your own requirements. For more information please see - https://wiki.shibboleth.net/confluence/display/EDS10/3.1+Configuring+the+Service+Provider - EOS - end - - plist_options :startup => true, :manual => "shibd" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/shibd - -F - -f - -p - #{var}/run/shibboleth/shibd.pid - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - system sbin/"shibd", "-t" - end -end diff --git a/Formula/ship.rb b/Formula/ship.rb deleted file mode 100644 index 32d452041fc07..0000000000000 --- a/Formula/ship.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Ship < Formula - desc "Reducing the overhead of maintaining 3rd-party applications in Kubernetes" - homepage "https://www.replicated.com/ship" - url "https://github.com/replicatedhq/ship/archive/v0.29.0.tar.gz" - sha256 "5a82fde0ecec241f404536573937e8123a79f40aa6ca78c79b8d89f75a5e78d0" - - bottle do - cellar :any_skip_relocation - sha256 "7c782e56057733e36f5066351b7cefccf03a30113b560de8a28186385badf051" => :mojave - sha256 "440ed034dff71465c0ef8d2c7f7aad4391e2672fa00bb3736fb4a9c3734ed4a2" => :high_sierra - sha256 "8c16e2ba902ea22cff0de5c9e68856432f8fab2b2d0a1accb54b0094f66a55a2" => :sierra - end - - depends_on "go" => :build - depends_on "node" => :build - depends_on "yarn" => :build - - def install - ENV["GOPATH"] = buildpath - srcpath = buildpath/"src/github.com/replicatedhq/ship" - srcpath.install buildpath.children - srcpath.cd do - system "make", "VERSION=#{version}", "build-minimal" - bin.install "bin/ship" - end - end - - test do - assert_match(/#{version}/, shell_output("#{bin}/ship version")) - assert_match(/Usage:/, shell_output("#{bin}/ship --help")) - - test_chart = "https://github.com/replicatedhq/test-charts/tree/master/plain-k8s" - system bin/"ship", "init", "--headless", test_chart - end -end diff --git a/Formula/shivavg.rb b/Formula/shivavg.rb deleted file mode 100644 index 0455423465391..0000000000000 --- a/Formula/shivavg.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Shivavg < Formula - desc "OpenGL based ANSI C implementation of the OpenVG standard" - homepage "https://sourceforge.net/projects/shivavg/" - url "https://downloads.sourceforge.net/project/shivavg/ShivaVG/0.2.1/ShivaVG-0.2.1.zip" - sha256 "9735079392829f7aaf79e02ed84dd74f5c443c39c02ff461cfdd19cfc4ae89c4" - - bottle do - cellar :any - sha256 "6ddd7a34be8f7650a001df8b4ad627d574ac2c14e71d239a5a263d1848b12149" => :mojave - sha256 "bea07d86639a8d24f90324552ed1880fd6a162141a394338e0ad2a81a3abeb5f" => :high_sierra - sha256 "f92bdb7b86632d7bf59d25259e26eece00e502759dd52adaac7495424290da4a" => :sierra - sha256 "3e9de2887110c90051ad5b89080f62cd5990ae39f8fdef02a4c50ba11e413ca8" => :el_capitan - sha256 "f3de3b35fcfeff41c1836bc7722579d1d4b461e10d4152802bae1ab48b5a3bbb" => :yosemite - sha256 "e9bdb03d76c994311a7e38c95eb40561bcb8f7fefdc12ac80137724f39a6bb4a" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "/bin/sh", "autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-example-all=no" - system "make", "install" - end -end diff --git a/Formula/shmcat.rb b/Formula/shmcat.rb deleted file mode 100644 index 780dbbd824c6d..0000000000000 --- a/Formula/shmcat.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Shmcat < Formula - desc "Tool that dumps shared memory segments (System V and POSIX)" - homepage "https://shmcat.sourceforge.io/" - url "https://downloads.sourceforge.net/project/shmcat/shmcat-1.9.tar.xz" - sha256 "831f1671e737bed31de3721b861f3796461ebf3b05270cf4c938749120ca8e5b" - - bottle do - cellar :any_skip_relocation - sha256 "e052a4f6b21407c032c1ee5a79fe9b1c08e78b7980c1cd3d6bfbfa8ffe639a58" => :mojave - sha256 "ff73e6df8b663b4f382098ce75a9ec4634d4658c5378b3ad122de135e30d44ab" => :high_sierra - sha256 "5ee7bcafe69d653421e29b56cf2e48a55874dc1e092e817a83cb446cda4acf01" => :sierra - sha256 "1b6ddaf528253df2e2d5b93e97b6f4ade717ff8f3f6bcf829ed7cf9d9e682539" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-ftok", - "--disable-nls" - system "make", "install" - end - - test do - assert_match /#{version}/, shell_output("#{bin}/shmcat --version") - end -end diff --git a/Formula/shml.rb b/Formula/shml.rb deleted file mode 100644 index c1cf3fec1ea0e..0000000000000 --- a/Formula/shml.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Shml < Formula - desc "Style Framework for The Terminal" - homepage "https://odb.github.io/shml/" - url "https://github.com/MaxCDN/shml/archive/1.1.0.tar.gz" - sha256 "0f0634fe5dd043f5ff52946151584a59b5826acbb268c9d884a166c3196b8f4f" - - bottle :unneeded - - def install - bin.install "shml.sh" - bin.install_symlink bin/"shml.sh" => "shml" - end - - test do - ["shml", "shml.sh"].each do |cmd| - result = shell_output("#{bin}/#{cmd} -v") - result.force_encoding("UTF-8") if result.respond_to?(:force_encoding) - assert_match version.to_s, result - end - end -end diff --git a/Formula/shmux.rb b/Formula/shmux.rb deleted file mode 100644 index f6af460b1238e..0000000000000 --- a/Formula/shmux.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Shmux < Formula - desc "Execute the same command on many hosts in parallel" - homepage "https://github.com/shmux/shmux" - url "https://github.com/shmux/shmux/archive/v1.0.2.tar.gz" - sha256 "4b84dc3e0d72d054ed4730d130a509f43441fb61561c11a444d6ee65cbff9c04" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c262e721176d0dfb35311492167e49151194467ad6ee99dec14cf519141c99e1" => :mojave - sha256 "b9c8b089571c7ab0147c5f952822764e0671d9b142672fb1f59811ee8e8081e4" => :high_sierra - sha256 "29fc7ae776f44efe3b1184bf32b60145e6369d63162183bd042e1bd65bc2b853" => :sierra - sha256 "8686fcd4954ab4cd7cacbbf80306b355c0f0562d0b9917345e4e91396c891ee0" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/shmux", "-h" - end -end diff --git a/Formula/shntool.rb b/Formula/shntool.rb deleted file mode 100644 index 81b361c1e6427..0000000000000 --- a/Formula/shntool.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Shntool < Formula - desc "Multi-purpose tool for manipulating and analyzing WAV files" - homepage "https://web.archive.org/web/20180903160820/etree.org/shnutils/shntool/" - url "https://web.archive.org/web/20180903160820/etree.org/shnutils/shntool/dist/src/shntool-3.0.10.tar.gz" - mirror "https://www.mirrorservice.org/sites/download.salixos.org/x86_64/extra-14.2/source/audio/shntool/shntool-3.0.10.tar.gz" - sha256 "74302eac477ca08fb2b42b9f154cc870593aec8beab308676e4373a5e4ca2102" - - bottle do - cellar :any_skip_relocation - sha256 "3406dd2a363de42f9dab6d2e32e13b16357c6906ad552adb866c272f8dd1f5f2" => :mojave - sha256 "54203e7c0cf7a257ecc3cec107b55afd14b98edc9b8713082fbf6282eb863e38" => :high_sierra - sha256 "5548c0401df42faa7ade30e9c98656828864c3677836f72100aa80f4a92ff249" => :sierra - sha256 "910da256436f55ebf40c487ebd0e74da2979f01bf0adac83272b353c66ba99a8" => :el_capitan - sha256 "46d99776bb02d9721f30a6cb9b2c44293d3fbc6b4e3f522df869a7106b09a448" => :yosemite - sha256 "fa745e31b3c2aadb20d5c87f7175f00b3c5a39b6664ea0a9aa9d88d5767781c5" => :mavericks - sha256 "10fb74d16244a21c15676ec9fce007167ef7784b83a0d10afb3d0f87b86ab292" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/shninfo", test_fixtures("test.wav") - end -end diff --git a/Formula/shocco.rb b/Formula/shocco.rb deleted file mode 100644 index 848ee57b31794..0000000000000 --- a/Formula/shocco.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Shocco < Formula - desc "Literate documentation tool for shell scripts (a la Docco)" - homepage "https://rtomayko.github.io/shocco/" - url "https://github.com/rtomayko/shocco/archive/1.0.tar.gz" - sha256 "b3454ca818329955043b166a9808847368fd48dbe94c4b819a9f0c02cf57ce2e" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "273f7af2f859f819079d33837c72374cf8c0cddce77bc213295d780dc21e81a0" => :mojave - sha256 "035ca34f9629648cec2c1bad1acfed26142da87319c773eafc4af0a2d7ced315" => :high_sierra - sha256 "035ca34f9629648cec2c1bad1acfed26142da87319c773eafc4af0a2d7ced315" => :sierra - end - - depends_on "markdown" - depends_on "python" - - resource "pygments" do - url "https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-1.5.tar.gz" - sha256 "fe183e3886f597e41f8c88d0e53c796cefddc879bfdf45f2915a383060436740" - end - - # Upstream, but not in a release - patch :DATA - - def install - libexec.install resource("pygments").files("pygmentize", "pygments") - - system "./configure", - "PYGMENTIZE=#{libexec}/pygmentize", - "MARKDOWN=#{HOMEBREW_PREFIX}/bin/markdown", - "--prefix=#{prefix}" - - system "make" - system "make", "install" - end - - def caveats - <<~EOS - You may also want to install browser: - brew install browser - shocco `which shocco` | browser - EOS - end - - test do - system "#{bin}/shocco", "--help" - end -end - -__END__ -diff --git a/configure b/configure -index 2262477..bf0af62 100755 ---- a/configure -+++ b/configure -@@ -193,7 +193,7 @@ else stdutil xdg-open XDG_OPEN xdg-open - fi - - stdutil ronn RONN ronn --stdutil markdown MARKDOWN markdown Markdown.pl -+stdutil markdown MARKDOWN markdown Markdown.pl $MARKDOWN - stdutil perl PERL perl - stdutil pygmentize PYGMENTIZE pygmentize $PYGMENTIZE diff --git a/Formula/shogun.rb b/Formula/shogun.rb deleted file mode 100644 index 57e659c25e2e9..0000000000000 --- a/Formula/shogun.rb +++ /dev/null @@ -1,147 +0,0 @@ -class Shogun < Formula - desc "Large scale machine learning toolbox" - homepage "http://www.shogun-toolbox.org/" - url "http://shogun-toolbox.org/archives/shogun/releases/6.1/sources/shogun-6.1.3.tar.bz2" - sha256 "57169dc8c05b216771c567b2ee2988f14488dd13f7d191ebc9d0703bead4c9e6" - revision 3 - - bottle do - sha256 "7f46d34b9fb84e45da8010cd796d28860a16dfa8ec3b4e3bae234cf5c9f3db4e" => :mojave - sha256 "e432dbe32889e4dc9bc2501a61934fe6f1ed5c13b613d79cb22c34a1d8543e99" => :high_sierra - sha256 "f9c0b2fdec633139f4187c3acf571a9e56ef627d417ff385583bc1c214d64647" => :sierra - end - - depends_on "cmake" => :build - depends_on :java => ["1.7+", :build] - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "arpack" - depends_on "eigen" - depends_on "glpk" - depends_on "hdf5" - depends_on "json-c" - depends_on "lapack" if MacOS.version >= :high_sierra - depends_on "lzo" - depends_on "nlopt" - depends_on "python@2" - depends_on "snappy" - depends_on "xz" - - cxxstdlib_check :skip - - resource "jblas" do - url "https://mikiobraun.github.io/jblas/jars/jblas-1.2.3.jar" - sha256 "e9328d4e96db6b839abf50d72f63626b2309f207f35d0858724a6635742b8398" - end - - resource "numpy" do - url "https://files.pythonhosted.org/packages/ee/66/7c2690141c520db08b6a6f852fa768f421b0b50683b7bbcd88ef51f33170/numpy-1.14.0.zip" - sha256 "3de643935b212307b420248018323a44ec51987a336d1d747c1322afc3c099fb" - end - - # Fixes the linking of the python interface. - # Upstream commit from 8 Jan 2018 https://github.com/shogun-toolbox/shogun/commit/ff8840ce0e - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/7bbffa4/shogun/fix_python_linking.patch" - sha256 "2043b939c1ae8f63cdc753141488207d76ea86d79d06be7917a833cf86cd193f" - end - - # Fixes when Accelerator framework is to be used as a LAPACK backend for - # Eigen. CMake swallows some of the include header flags hence on some - # versions of macOS, hence the include of will fail. - # Upstream commit from 30 Jan 2018 https://github.com/shogun-toolbox/shogun/commit/6db834fb4ca9783b6e5adfde808d60ebfca0abc9 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/9df360c/shogun/fix_veclib.patch" - sha256 "de7ebe4c91da9f63fc322c5785f687c0005ed8df2c70cd3e9024fbac7b6d3745" - end - - # Fixes compiling with json-c 0.13.1. Shogun 6.1.3 is using the - # deprecated json-c is_error() macro which got removed in json-c 0.13.1. - patch do - url "https://github.com/shogun-toolbox/shogun/commit/365ce4c4c7.patch?full_index=1" - sha256 "0a1c3e2e16b2ce70855c1f15876bddd5e5de35ab29290afceacdf7179c4558cb" - end - - needs :cxx11 - - def install - ENV.cxx11 - - # Fix build of modular interfaces with SWIG 3.0.5 on macOS - # https://github.com/shogun-toolbox/shogun/pull/2694 - # https://github.com/shogun-toolbox/shogun/commit/fef8937d215db7 - ENV.append_to_cflags "-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0" - - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - resource("numpy").stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - - if MacOS.version >= :high_sierra - ENV["LAPACKE_PATH"] = Formula["lapack"].opt_lib - end - - libexec.install resource("jblas") - - python_executable = Formula["python@2"].opt_bin/"python2" - python_prefix = Utils.popen_read("#{python_executable} -c 'import sys; print(sys.prefix)'").chomp - python_include = Utils.popen_read("#{python_executable} -c 'from distutils import sysconfig; print(sysconfig.get_python_inc(True))'").chomp - python_library = "#{python_prefix}/Python" - - mkdir "build" do - system "cmake", "..", "-DBUILD_EXAMPLES=OFF", - "-DBUNDLE_JSON=OFF", - "-DBUNDLE_NLOPT=OFF", - "-DENABLE_TESTING=OFF", - "-DENABLE_COVERAGE=OFF", - "-DBUILD_META_EXAMPLES=OFF", - "-DINTERFACE_PYTHON=ON", - "-DINTERFACE_JAVA=ON", - "-DJBLAS=#{libexec}/jblas-#{resource("jblas").version}.jar", - "-DLIB_INSTALL_DIR=#{lib}", - "-DPYTHON_EXECUTABLE=#{python_executable}", - "-DPYTHON_INCLUDE_DIR=#{python_include}", - "-DPYTHON_LIBRARY=#{python_library}", - *std_cmake_args - system "make", "install" - end - end - - def caveats - homebrew_site_packages = Language::Python.homebrew_site_packages - user_site_packages = Language::Python.user_site_packages "python" - <<~EOS - If you use system python (that comes - depending on the macOS version - - with an old version of numpy), you may need to ensure that the brewed - packages come earlier in Python's sys.path with: - mkdir -p #{user_site_packages} - echo 'import sys; sys.path.insert(1, "#{homebrew_site_packages}")' >> #{user_site_packages}/homebrew.pth - EOS - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - #include - #include - - using namespace shogun; - - int main(int argc, char** argv) - { - init_shogun_with_defaults(); - assert (std::strcmp(MAINVERSION, "#{version}") == 0); - exit_shogun(); - - return EXIT_SUCCESS; - } - EOS - - system ENV.cxx, "-std=c++11", "-I#{include}", "test.cpp", "-o", "test", - "-L#{lib}", "-lshogun" - system "./test" - end -end diff --git a/Formula/shorten.rb b/Formula/shorten.rb deleted file mode 100644 index 8c84c9313eb21..0000000000000 --- a/Formula/shorten.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Shorten < Formula - desc "Waveform compression" - homepage "https://web.archive.org/web/20180903155129/www.etree.org/shnutils/shorten/" - url "https://web.archive.org/web/20180903155129/www.etree.org/shnutils/shorten/dist/src/shorten-3.6.1.tar.gz" - sha256 "ce22e0676c93494ee7d094aed9b27ad018eae5f2478e8862ae1e962346405b66" - - bottle do - cellar :any_skip_relocation - sha256 "ed0a7482bebdc53827e6932bdc70d8897d00b4ce87ac2cf84bee7b0cec2229a5" => :mojave - sha256 "2247094c6f41ad5ce941c84335a45aaaabe0bef43ffeb89a544793957c157ba9" => :high_sierra - sha256 "a54b8263dfbd2aab185df1888193dc0ceb602d9df82758cf5ef31b3df52ae697" => :sierra - sha256 "66cf7cabae065035e9c3c4a8c139439384fb9f26ea0ee433e336c18ba2f8383e" => :el_capitan - sha256 "5f48b61ce709915830f433dd381fe531c1354b56619bbdb441dc19f985df7467" => :yosemite - sha256 "a802da618fffa3eb292705140c882fcedbffae09017f0efdf69085004952a148" => :mavericks - sha256 "ca55e37b24202c500a03dfe36a41dd06ebaa02b19ddf65c26cc440376149c5da" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/shorten", test_fixtures("test.wav"), "test" - assert_predicate testpath/"test", :exist? - end -end diff --git a/Formula/shpotify.rb b/Formula/shpotify.rb deleted file mode 100644 index 2f8ed3a80b1f6..0000000000000 --- a/Formula/shpotify.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Shpotify < Formula - desc "Command-line interface for Spotify on a Mac" - homepage "https://harishnarayanan.org/projects/shpotify/" - url "https://github.com/hnarayanan/shpotify/archive/2.0.3.tar.gz" - sha256 "d3e51719fb039ad70a16b78994ded68eaa991b4328df0f5d8b16a6e87393cae3" - head "https://github.com/hnarayanan/shpotify.git" - - bottle :unneeded - - def install - bin.install "spotify" - end - - test do - system "#{bin}/spotify" - end -end diff --git a/Formula/shtool.rb b/Formula/shtool.rb deleted file mode 100644 index 21552ce61157f..0000000000000 --- a/Formula/shtool.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Shtool < Formula - desc "GNU's portable shell tool" - homepage "https://www.gnu.org/software/shtool/" - url "https://ftp.gnu.org/gnu/shtool/shtool-2.0.8.tar.gz" - mirror "https://ftpmirror.gnu.org/shtool/shtool-2.0.8.tar.gz" - sha256 "1298a549416d12af239e9f4e787e6e6509210afb49d5cf28eb6ec4015046ae19" - - bottle do - cellar :any_skip_relocation - sha256 "7d9087a21cd6724aa82694ceca768d3044d5ab854c5ba95ae04146b3b83c2bf5" => :mojave - sha256 "fc22505f6424dece01dcdee55907eebcb490a299763f2f217511fa14c5927711" => :high_sierra - sha256 "172a4e2c133efcc6235aa3901bbc89ea11c48cfa70833fe67801240236d1757d" => :sierra - sha256 "17dcf1289dd178b75b670d8061d54e4b2004feeb7de0d9e1ea43ffb46220e4fd" => :el_capitan - sha256 "de69e23a1e88799c78891298045bd8f79ef67ee48b7609fa065c7acdc1ddbde4" => :yosemite - sha256 "14b7ea00fce6bf6df8e684f1f4db589ad4f6bc7051a4a29f34d51fb6d287d0a9" => :mavericks - sha256 "6e46064ddebb9f3510fb8f8e3b5f48b7f931004334cffba5a3b65cc49588e3a2" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "Hello World!", pipe_output("#{bin}/shtool echo 'Hello World!'").chomp - end -end diff --git a/Formula/shunit2.rb b/Formula/shunit2.rb deleted file mode 100644 index f1a07e709e5c4..0000000000000 --- a/Formula/shunit2.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Shunit2 < Formula - desc "xUnit unit testing framework for Bourne-based shell scripts" - homepage "https://github.com/kward/shunit2" - url "https://github.com/kward/shunit2/archive/v2.1.7.tar.gz" - sha256 "41a103aa984bfdeea3fec426edb0b3dda19153a5ce448d4b4bbe52a85c4d7fee" - - bottle :unneeded - - def install - bin.install "shunit2" - end - - test do - system bin/"shunit2" - end -end diff --git a/Formula/shyaml.rb b/Formula/shyaml.rb deleted file mode 100644 index fbb67947d81f2..0000000000000 --- a/Formula/shyaml.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Shyaml < Formula - include Language::Python::Virtualenv - - desc "Command-line YAML parser" - homepage "https://github.com/0k/shyaml" - url "https://files.pythonhosted.org/packages/33/34/7ad4b645bdd5c6cd100748fc2429924b553439221aa9b9386f658e5a05f2/shyaml-0.5.2.tar.gz" - sha256 "80650ebfe6fa2e16083451d515207472d60990c1c15fc0fd607c27077790ac23" - revision 1 - head "https://github.com/0k/shyaml.git" - - bottle do - cellar :any - rebuild 1 - sha256 "1f553d4c50f311b1702c973a189e64a0bae519885d94af51b14fd09e82ade8e0" => :mojave - sha256 "ff016e9adec1fcde3aed838decd83cd643e1da3b4fdda4f3760edc706a96204e" => :high_sierra - sha256 "f56ae02770869a49ec55215d3444dfd07bdd2fb1788e4cc6f124bd63bfaf2769" => :sierra - sha256 "ff1078dcd1f6df8b14d7389704cec6ab3d60c79a926d741db4600af72ed87c55" => :el_capitan - end - - depends_on "libyaml" - depends_on "python" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - def install - virtualenv_install_with_resources - end - - test do - yaml = <<~EOS - key: val - arr: - - 1st - - 2nd - EOS - assert_equal "val", pipe_output("#{bin}/shyaml get-value key", yaml, 0) - assert_equal "1st", pipe_output("#{bin}/shyaml get-value arr.0", yaml, 0) - assert_equal "2nd", pipe_output("#{bin}/shyaml get-value arr.-1", yaml, 0) - end -end diff --git a/Formula/sic.rb b/Formula/sic.rb deleted file mode 100644 index 22a8b69d5a798..0000000000000 --- a/Formula/sic.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Sic < Formula - desc "Minimal multiplexing IRC client" - homepage "https://tools.suckless.org/sic/" - url "https://dl.suckless.org/tools/sic-1.2.tar.gz" - sha256 "ac07f905995e13ba2c43912d7a035fbbe78a628d7ba1c256f4ca1372fb565185" - head "https://git.suckless.org/sic", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "2c50dd89e57fa0764576417365933792e7599dfb8899ec75957be0fb6d46dd5a" => :mojave - sha256 "f7e19c7d87f5f13e736edcf7f8cb821b4b644f78208c87f2f6655e5b7541abcc" => :high_sierra - sha256 "8ec385f1fa892a80c51dca477f469dfe69864d0d5538b652c45ac17914aa5f89" => :sierra - sha256 "efeb0f7a31a6d4f0ac4c065a4646b5a523788b5edbddd9f99ffa04f00aa41f97" => :el_capitan - sha256 "99c98bba7ce3793f8f5431cdaee24a0bead3a1a2335bce10dc9cf6d53213c249" => :yosemite - sha256 "23bfa1932017f0c189e6e3ab1345260d8b5a98697999d6548b9046e7662112db" => :mavericks - end - - def install - system "make", "PREFIX=#{prefix}", "install" - end -end diff --git a/Formula/sickle.rb b/Formula/sickle.rb deleted file mode 100644 index 21073fb42b781..0000000000000 --- a/Formula/sickle.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sickle < Formula - desc "Windowed adaptive trimming for FASTQ files using quality" - homepage "https://github.com/najoshi/sickle" - url "https://github.com/najoshi/sickle/archive/v1.33.tar.gz" - sha256 "eab271d25dc799e2ce67c25626128f8f8ed65e3cd68e799479bba20964624734" - - bottle do - cellar :any_skip_relocation - sha256 "dc6b4eea0f8da0b1611e12197157c9985c931567d466e3a47f89250a8180b879" => :mojave - sha256 "3aeaaa4393148876cc55cc9defbe82ae0fe0dabea18e418413b2aa8cff23dd0b" => :high_sierra - sha256 "844b063d1496d2a7c7f8a12b2239ae32766a538557d44f712c584a30b9775fae" => :sierra - sha256 "138b38a20aefc55ec4005ee4c4622ec332cbb13ff4ebc39ff45d91a2c12afde8" => :el_capitan - end - - def install - system "make" - bin.install "sickle" - end - - test do - (testpath/"test.fastq").write <<~EOS - @U00096.2:1-70 - AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC - + - IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII0000000000 - EOS - cmd = "#{bin}/sickle se -f test.fastq -t sanger -o /dev/stdout" - assert_equal "GTGTC\n", shell_output(cmd).lines[1][-6..-1] - end -end diff --git a/Formula/siege.rb b/Formula/siege.rb deleted file mode 100644 index 9a887aa3b59cb..0000000000000 --- a/Formula/siege.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Siege < Formula - desc "HTTP regression testing and benchmarking utility" - homepage "https://www.joedog.org/siege-home/" - url "http://download.joedog.org/siege/siege-4.0.4.tar.gz" - sha256 "8f7dcf18bd722bb9cc92bc3ea4b59836b4a2f8d8f01d4a94c8d181f56d91ea6f" - - bottle do - sha256 "975fa6c60a27b9462d55ef7b4e9faeec0569de3b48bd10dab89c88a001350459" => :mojave - sha256 "a5e4990ab448ec37e9e5e7b392a7bf6aee03313bad6d89c6fda45decd4ddecf4" => :high_sierra - sha256 "84ad0232db938f558c2ad57b5c61382b136483c3d4f106f6fcea7e647d2b9982" => :sierra - sha256 "4ffac4100438cc7d6784a64774770ffe219bf330e96890c77eb012bab0f02ba5" => :el_capitan - end - - depends_on "openssl" - - def install - # To avoid unnecessary warning due to hardcoded path, create the folder first - (prefix/"etc").mkdir - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--localstatedir=#{var}", - "--with-ssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - def caveats; <<~EOS - macOS has only 16K ports available that won't be released until socket - TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds. - Consider reducing in case of available port bottleneck. - - You can check whether this is a problem with netstat: - - # sysctl net.inet.tcp.msl - net.inet.tcp.msl: 15000 - - # sudo sysctl -w net.inet.tcp.msl=1000 - net.inet.tcp.msl: 15000 -> 1000 - - Run siege.config to create the ~/.siegerc config file. - EOS - end - - test do - system "#{bin}/siege", "--concurrent=1", "--reps=1", "https://www.google.com/" - end -end diff --git a/Formula/sift.rb b/Formula/sift.rb deleted file mode 100644 index 3d85ca2f35dc5..0000000000000 --- a/Formula/sift.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "language/go" - -class Sift < Formula - desc "Fast and powerful open source alternative to grep" - homepage "https://sift-tool.org" - url "https://github.com/svent/sift/archive/v0.9.0.tar.gz" - sha256 "bbbd5c472c36b78896cd7ae673749d3943621a6d5523d47973ed2fc6800ae4c8" - - bottle do - cellar :any_skip_relocation - sha256 "08aae3031f30b5502bd93b26c4a2e655077f3a91c212b04898c19d14444ec0e6" => :mojave - sha256 "b0d584ae926816c4f525c9070cb67c7622e851c3cbba67e7c0b9cae5d30feb00" => :high_sierra - sha256 "42fbf76075951fd28a27b4e2763b3af58eb93b0260c3a3c82719d7a32ef7baec" => :sierra - sha256 "6ee1bdf8b60fe3c3528a4a2698f19518a7bf71838ceba58ab9a199a6624f3dba" => :el_capitan - sha256 "170f9861eb8843932556284268f1a00e3e0a0c455e35b55c11e44c5b325ced85" => :yosemite - end - - depends_on "go" => :build - - go_resource "github.com/svent/go-flags" do - url "https://github.com/svent/go-flags.git", - :revision => "4bcbad344f0318adaf7aabc16929701459009aa3" - end - - go_resource "github.com/svent/go-nbreader" do - url "https://github.com/svent/go-nbreader.git", - :revision => "7cef48da76dca6a496faa7fe63e39ed665cbd219" - end - - go_resource "golang.org/x/crypto" do - url "https://go.googlesource.com/crypto.git", - :revision => "3c0d69f1777220f1a1d2ec373cb94a282f03eb42" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/svent/sift").install buildpath.children - Language::Go.stage_deps resources, buildpath/"src" - cd "src/github.com/svent/sift" do - system "go", "build", "-o", bin/"sift" - prefix.install_metafiles - end - end - - test do - (testpath/"test.txt").write("where is foo\n") - assert_match "where is foo", shell_output("#{bin}/sift foo #{testpath}") - end -end diff --git a/Formula/signify-osx.rb b/Formula/signify-osx.rb deleted file mode 100644 index c2da6515ced2b..0000000000000 --- a/Formula/signify-osx.rb +++ /dev/null @@ -1,24 +0,0 @@ -class SignifyOsx < Formula - desc "Cryptographically sign and verify files" - homepage "https://man.openbsd.org/signify.1" - url "https://github.com/jpouellet/signify-osx/archive/1.4.tar.gz" - sha256 "5aa954fe6c54f2fc939771779e5bb64298e46d0a4ae3d08637df44c7ed8d2897" - head "https://github.com/jpouellet/signify-osx.git" - - bottle do - cellar :any_skip_relocation - sha256 "842a6fb535ce56db38ca545fd229f184850e34211c7817879f707f71fe6b31d0" => :mojave - sha256 "cdb1896e5e480edfb6ad7f179d9a2b217cda774039fcf5922bc3eba9b6d3d1bb" => :high_sierra - sha256 "fdac23b07368d6c8ebad06c2b8451f0c8228f71f5c65b48d672cfd581b222509" => :sierra - end - - def install - system "make" - system "make", "test" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/signify", "-G", "-n", "-p", "test.pub", "-s", "test.sec" - end -end diff --git a/Formula/sile.rb b/Formula/sile.rb deleted file mode 100644 index c35b719c99d8e..0000000000000 --- a/Formula/sile.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Sile < Formula - desc "Modern typesetting system inspired by TeX" - homepage "http://www.sile-typesetter.org/" - # This should return to using a release tarball when >0.9.4 is released. - url "https://github.com/simoncozens/sile.git", - :revision => "befcd813e1dd46f7af6d11ffd0b0ee525e8db1fc" - version "0.9.5-alpha" - revision 6 - head "https://github.com/simoncozens/sile.git" - - bottle do - cellar :any - sha256 "b61fe2666c3f6ee368fd65961a87b39e8a4b8933f409b1e7f702df7c41dee727" => :high_sierra - sha256 "b1af4d23ced07f8cd03ea77bffd65637fcc0f3105e1364d872cf976d05417ffa" => :sierra - end - - # These three should return to being head-only when >0.9.4 is released. - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - depends_on "luarocks" => :build - depends_on "pkg-config" => :build - depends_on "fontconfig" - depends_on "harfbuzz" - depends_on "icu4c" - depends_on "libpng" - depends_on "lua" - - resource "lpeg" do - url "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.1.tar.gz" - sha256 "62d9f7a9ea3c1f215c77e0cadd8534c6ad9af0fb711c3f89188a8891c72f026b" - end - - resource "lua-zlib" do - url "https://github.com/brimworks/lua-zlib/archive/v1.2.tar.gz" - sha256 "26b813ad39c94fc930b168c3418e2e746af3b2e80b92f94f306f6f954cc31e7d" - end - - resource "luaexpat" do - url "https://matthewwild.co.uk/projects/luaexpat/luaexpat-1.3.0.tar.gz" - sha256 "d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3" - end - - resource "luafilesystem" do - url "https://github.com/keplerproject/luafilesystem/archive/v1_7_0_2.tar.gz" - sha256 "23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59" - end - - def install - luapath = libexec/"vendor" - ENV["LUA_PATH"] = "#{luapath}/share/lua/5.3/?.lua;;#{luapath}/share/lua/5.3/lxp/?.lua" - ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so" - - resources.each do |r| - r.stage do - if r.name == "lua-zlib" - # https://github.com/brimworks/lua-zlib/commit/08d6251700965 - mv "lua-zlib-1.1-0.rockspec", "lua-zlib-1.2-0.rockspec" - system "luarocks", "make", "#{r.name}-#{r.version}-0.rockspec", "--tree=#{luapath}" - else - system "luarocks", "build", r.name, "--tree=#{luapath}" - end - end - end - - system "./bootstrap.sh" # Should be head-only when >0.9.4 is released. - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-lua=#{prefix}", - "--prefix=#{prefix}" - system "make" - system "make", "install" - - (libexec/"bin").install bin/"sile" - (bin/"sile").write <<~EOS - #!/bin/bash - export LUA_PATH="#{ENV["LUA_PATH"]}" - export LUA_CPATH="#{ENV["LUA_CPATH"]}" - "#{libexec}/bin/sile" "$@" - EOS - end - - test do - assert_match "SILE #{version.to_s.match(/\d\.\d\.\d/)}", shell_output("#{bin}/sile --version") - end -end diff --git a/Formula/silk.rb b/Formula/silk.rb deleted file mode 100644 index 090c49ffc8f07..0000000000000 --- a/Formula/silk.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Silk < Formula - desc "Collection of traffic analysis tools" - homepage "https://tools.netsa.cert.org/silk/" - url "https://tools.netsa.cert.org/releases/silk-3.17.2.tar.gz" - sha256 "70b74eceafce7b724ceccd9e801909f4bd28985406eb8c42a94c8d25e7d58194" - - bottle do - rebuild 1 - sha256 "4e308eeaef5f1be5c4be0ac6ba57616cd2dc945e2edf9f0916127e8ca6118616" => :mojave - sha256 "6465b56369992120281899c1d43bb7163958c976ad50630cbcc1c19284bca0ae" => :high_sierra - sha256 "7c50646eddfea6779a412d8a17dc2e80a258ab7fee136c5bc43f9613ec4ba213" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libfixbuf" - depends_on "yaf" - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --mandir=#{man} - --enable-ipv6 - --enable-data-rootdir=#{var}/silk - ] - - system "./configure", *args - system "make" - system "make", "install" - - (var/"silk").mkpath - end - - test do - input = test_fixtures("test.pcap") - output = shell_output("yaf --in #{input} | #{bin}/rwipfix2silk | #{bin}/rwcount --no-titles --no-column") - assert_equal "2014/10/02T10:29:00|2.00|1031.00|12.00|", output.strip - end -end diff --git a/Formula/simg2img.rb b/Formula/simg2img.rb deleted file mode 100644 index 1b4f46f0630bd..0000000000000 --- a/Formula/simg2img.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Simg2img < Formula - desc "Tool to convert Android sparse images to raw images and back" - homepage "https://github.com/anestisb/android-simg2img" - url "https://github.com/anestisb/android-simg2img/archive/1.1.3.tar.gz" - sha256 "82eb629ac0beb67cc97396e031555f0461dcb66e1b93aad53e2f604a18037c51" - head "https://github.com/anestisb/android-simg2img.git" - - bottle do - cellar :any_skip_relocation - sha256 "6eafc98ab24c0f4855a1d1e80a14f0af121d10d2d67d6d7adb4597793122aa71" => :mojave - sha256 "fdb01a50976fa5baef6f1d2b0fa96718256df5862cdc6e5a2d297f059031ae6f" => :high_sierra - sha256 "782e2bfbd0c4f74573ad00028910c80d0d1ccc3a1d8aa6275a75c16ff62078fc" => :sierra - sha256 "6895f9d52514757e07f47c9e18400330177175a1ef12e96ccf10b91577644557" => :el_capitan - end - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "dd", "if=/dev/zero", "of=512k-zeros.img", "bs=512", "count=1024" - assert_equal 524288, (testpath/"512k-zeros.img").size?, - "Could not create 512k-zeros.img with 512KiB of zeros" - system bin/"img2simg", "512k-zeros.img", "512k-zeros.simg" - assert_equal 44, (testpath/"512k-zeros.simg").size?, - "Converting 512KiB of zeros did not result in a 44 byte simg" - system bin/"simg2img", "512k-zeros.simg", "new-512k-zeros.img" - assert_equal 524288, (testpath/"new-512k-zeros.img").size?, - "Converting a 44 byte simg did not result in 512KiB" - system "diff", "512k-zeros.img", "new-512k-zeros.img" - end -end diff --git a/Formula/simgrid.rb b/Formula/simgrid.rb deleted file mode 100644 index 5a7a34c1f6ca1..0000000000000 --- a/Formula/simgrid.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Simgrid < Formula - desc "Studies behavior of large-scale distributed systems" - homepage "http://simgrid.gforge.inria.fr" - url "https://gforge.inria.fr/frs/download.php/file/37602/SimGrid-3.20.tar.gz" - sha256 "4d4757eb45d87cf18d990d589c31d223b0ea8cf6fcd8c94fca4d38162193cef6" - - bottle do - sha256 "a9c5cb5da50ab2b224e5d1882834d1e7c4428393e05bec3731823597a2da30e9" => :mojave - sha256 "75ce382a395f963425946d7f53361fa1143a2b6ca9292c63193e76139bcef91e" => :high_sierra - sha256 "58895cb0aed9235972377d2460a18c8bc03203212ae8246450c429e837a01bcf" => :sierra - sha256 "c0a6cf0fba37da1c281cac508bdde38aa4145fe7c50bcc9f466f5521cf95d722" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "boost" - depends_on "graphviz" - depends_on "pcre" - depends_on "python" - - def install - system "cmake", ".", - "-Denable_debug=on", - "-Denable_compile_optimizations=off", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main(int argc, char* argv[]) { - printf("%f", MSG_get_clock()); - return 0; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lsimgrid", - "-o", "test" - system "./test" - end -end diff --git a/Formula/simh.rb b/Formula/simh.rb deleted file mode 100644 index b50a045a6ad15..0000000000000 --- a/Formula/simh.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Simh < Formula - desc "Portable, multi-system simulator" - homepage "http://simh.trailing-edge.com/" - url "http://simh.trailing-edge.com/sources/simhv39-0.zip" - version "3.9-0" - sha256 "e49b259b66ad6311ca9066dee3d3693cd915106a6938a52ed685cdbada8eda3b" - head "https://github.com/simh/simh.git" - - bottle do - cellar :any_skip_relocation - sha256 "8f4311a11b45c96213c82f0f08fad24442b7b901145836b6eec8bce6a02e9fe2" => :mojave - sha256 "48f8dbc43fbcec170807bc4a0730ace70fd6e99c0619ecb26897e32d3bd3f03b" => :high_sierra - sha256 "5b766137d34b8728a8a2ae3357c6c14063e2aabf3fa4e1107118764f05bc7cb0" => :sierra - sha256 "38663141007d531b100b6408f27e1f8c3a43d3ec3cb5dc3b0086ac257077ea3f" => :el_capitan - sha256 "0aa3e73267250ed3e466465f78d8bc4f286a7bb825c454dae5587af2023a313b" => :yosemite - sha256 "e9043ec0dc68a5660a20fe270488dbfbf8741a77aae8dace61441fc348e74234" => :mavericks - end - - # After 3.9-0 the project moves to https://github.com/simh/simh - # It doesn't actually fail, but the makefile queries llvm-gcc -v --help a lot - # to determine what flags to throw. It is simply not designed for clang. - # Remove at the next revision that will support clang (see github site). - fails_with :clang do - build 421 - cause "The program is closely tied to gcc & llvm-gcc in this revision." - end - - def install - ENV.deparallelize unless build.head? - inreplace "makefile", "GCC = gcc", "GCC = #{ENV.cc}" - inreplace "makefile", "CFLAGS_O = -O2", "CFLAGS_O = #{ENV.cflags}" - system "make", "USE_NETWORK=1", "all" - bin.install Dir["BIN/*"] - Dir["**/*.txt"].each do |f| - (doc/File.dirname(f)).install f - end - (pkgshare/"vax").install Dir["VAX/*.{bin,exe}"] - end - - test do - assert_match(/Goodbye/, pipe_output("#{bin}/altair", "exit\n", 0)) - end -end diff --git a/Formula/simple-amqp-client.rb b/Formula/simple-amqp-client.rb deleted file mode 100644 index 110f1e84d2649..0000000000000 --- a/Formula/simple-amqp-client.rb +++ /dev/null @@ -1,42 +0,0 @@ -class SimpleAmqpClient < Formula - desc "C++ interface to rabbitmq-c" - homepage "https://github.com/alanxz/SimpleAmqpClient" - url "https://github.com/alanxz/SimpleAmqpClient/archive/v2.4.0.tar.gz" - sha256 "5735ccccd638b2e2c275ca254f2f947bdfe34511247a32822985c3c25239e06e" - revision 2 - head "https://github.com/alanxz/SimpleAmqpClient.git" - - bottle do - cellar :any - sha256 "3afc1f1345a391514200462825dcecf87bde3d25476d5f9bf87b787877c632c5" => :mojave - sha256 "fa561d92f855cf6613343e33741ac715d3fb42fce6ac2adf1fbc00fc641434df" => :high_sierra - sha256 "4f9fc0338fe628eaeb02c4cfb377a8f5e90da37896e6ec91968f30649069b129" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "boost" - depends_on "rabbitmq-c" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - const std::string expected = "test body"; - AmqpClient::BasicMessage::ptr_t msg = AmqpClient::BasicMessage::Create(expected); - - if(msg->Body() != expected) return 1; - - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lSimpleAmqpClient", "-o", "test" - system "./test" - end -end diff --git a/Formula/simple-mtpfs.rb b/Formula/simple-mtpfs.rb deleted file mode 100644 index 817f1639ddb90..0000000000000 --- a/Formula/simple-mtpfs.rb +++ /dev/null @@ -1,37 +0,0 @@ -class SimpleMtpfs < Formula - desc "Simple MTP fuse filesystem driver" - homepage "https://github.com/phatina/simple-mtpfs" - url "https://github.com/phatina/simple-mtpfs/archive/simple-mtpfs-0.3.0.tar.gz" - sha256 "5556cae4414254b071d79ce656cce866b42fd7ba40ce480abfc3ba4e357cd491" - - bottle do - cellar :any - sha256 "a393f294fa56695eb464e64898e3607415a3de01b223576cf5d9e9571b2d5a8c" => :mojave - sha256 "799625dbb36244feab3e209487c12d99467960ac14e80017552dbdd6a4f42ab9" => :high_sierra - sha256 "e73ec4a78592b0fc76d86d3027615e2e8addc8b9a30da9caad433b2d1fced262" => :sierra - sha256 "947d0e96fd262e1d493662955b3eb27e247d3fc52ed1e8dc07e58a4fb167892f" => :el_capitan - sha256 "64c1df0ab967904c00f8b61d41bd4de70ed75f01902d552594ccac990cba5b24" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libmtp" - depends_on :osxfuse - - needs :cxx11 - - def install - ENV.cxx11 - - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", "CPPFLAGS=-I/usr/local/include/osxfuse", - "LDFLAGS=-L/usr/local/include/osxfuse" - system "make" - system "make", "install" - end - - test do - system bin/"simple-mtpfs", "-h" - end -end diff --git a/Formula/simple-obfs.rb b/Formula/simple-obfs.rb deleted file mode 100644 index 0a88b5bd867ce..0000000000000 --- a/Formula/simple-obfs.rb +++ /dev/null @@ -1,37 +0,0 @@ -class SimpleObfs < Formula - desc "Simple obfusacting plugin of shadowsocks-libev" - homepage "https://github.com/shadowsocks/simple-obfs" - url "https://github.com/shadowsocks/simple-obfs.git", - :tag => "v0.0.5", - :revision => "a9c43588e4cb038e6ac02f050e4cab81f8228dff" - revision 1 - - bottle do - cellar :any - sha256 "7d00695065a2e780f6a93d98d3d2a96ebe4c02fe48e52e30cea4fefe353100e8" => :mojave - sha256 "08024887dc9fba3f56425181dd34dba1ecf185dad688b85d20a7b70ec07afbae" => :high_sierra - sha256 "831de4a180d61c801397ead63a0130d8d2eb102afb526ef81bcecb2f9d1d029b" => :sierra - sha256 "eccfcd8d4016297999d730fd185624b42e903f7dfac43bd6227c337c2b3aafea" => :el_capitan - end - - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "xmlto" => :build - depends_on "libev" - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--enable-applecc" - system "make" - system "make", "install" - end - - test do - assert_match "simple-obfs", shell_output("#{bin}/obfs-local -h 2>&1") - end -end diff --git a/Formula/simple-tiles.rb b/Formula/simple-tiles.rb deleted file mode 100644 index cd0c329b058a4..0000000000000 --- a/Formula/simple-tiles.rb +++ /dev/null @@ -1,46 +0,0 @@ -class SimpleTiles < Formula - desc "Image generation library for spatial data" - homepage "https://propublica.github.io/simple-tiles/" - url "https://github.com/propublica/simple-tiles/archive/v0.6.1.tar.gz" - sha256 "2391b2f727855de28adfea9fc95d8c7cbaca63c5b86c7286990d8cbbcd640d6f" - revision 2 - head "https://github.com/propublica/simple-tiles.git" - - bottle do - cellar :any - sha256 "25fa849815c7f5f5ea98c36e61a6a967d43377c163e78f6731c06de5f98e73d6" => :mojave - sha256 "5032c76efb7ae602dcafda7a048110ea123662b06835a077d329558c58fdddc8" => :high_sierra - sha256 "30efcc0e5fcb844511c341015f251fb81226e434d16b0c5451fc7381da2a841a" => :sierra - sha256 "101c3442589eb596e46e5df2a64f69bbb6d12909ef4fa0d0d4f86607258b3194" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "gdal" - depends_on "pango" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(){ - simplet_map_t *map = simplet_map_new(); - simplet_map_free(map); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lsimple-tiles", - "-I#{Formula["cairo"].opt_include}/cairo", - "-I#{Formula["gdal"].opt_include}", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - "-I#{Formula["pango"].opt_include}/pango-1.0", - "test.c", "-o", "test" - system testpath/"test" - end -end diff --git a/Formula/simutrans.rb b/Formula/simutrans.rb deleted file mode 100644 index 21e5979bb3f41..0000000000000 --- a/Formula/simutrans.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Simutrans < Formula - desc "Transport simulator" - homepage "https://www.simutrans.com/" - url "https://downloads.sourceforge.net/project/simutrans/simutrans/120-4/simutrans-src-120-4.zip" - version "120.4" - sha256 "cf0f364a26d178d9fbee8ec59196b308c811f1c1c69f45c05cdb554e58b61898" - head "https://github.com/aburch/simutrans.git" - - bottle do - cellar :any - sha256 "5a6c026584d0519b0b7adf626a4f7b0b7d7689615de27241232593569a906868" => :mojave - sha256 "d20fe9c5a2039bd438fd6f96e24979424acc9c1e7e442d9496ecd1a244640211" => :high_sierra - sha256 "e4ac8b4e3ece8ee265e46419db351cba744c6b66b89683d3443ab35e65b936cd" => :sierra - sha256 "0c7270b180b815014d92577de3e255d247f422ada4545e0c836bcaafa9a0b94b" => :el_capitan - end - - depends_on "libpng" - depends_on :macos => :lion - depends_on "sdl2" - - resource "pak64" do - url "https://downloads.sourceforge.net/project/simutrans/pak64/120-4/simupak64-120-4.zip" - sha256 "b1dba2876838fcda6fb1b90c9b981e2aa490c1b0a81bab7c53b8bd50f59c0ffd" - end - - resource "text" do - url "https://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip" - sha256 "44caa98599089f55d5cfef34d24f9b8ae362d0b41c784ca1b649270436cdea02" - end - - def install - args = %w[ - BACKEND=sdl2 - COLOUR_DEPTH=16 - OSTYPE=mac - ] - args << "AV_FOUNDATION=1" if MacOS.version >= :sierra - system "make", *args - libexec.install "build/default/sim" => "simutrans" - libexec.install Dir["simutrans/*"] - bin.write_exec_script libexec/"simutrans" - - libexec.install resource("pak64") - (libexec/"text").install resource("text") - - system "make", "makeobj", *args - bin.install "build/default/makeobj/makeobj" - end - - test do - system "#{bin}/simutrans", "--help" - end -end diff --git a/Formula/since.rb b/Formula/since.rb deleted file mode 100644 index 738a19dece444..0000000000000 --- a/Formula/since.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Since < Formula - desc "Stateful tail: show changes to files since last check" - homepage "http://welz.org.za/projects/since" - url "http://welz.org.za/projects/since/since-1.1.tar.gz" - sha256 "739b7f161f8a045c1dff184e0fc319417c5e2deb3c7339d323d4065f7a3d0f45" - - bottle do - cellar :any_skip_relocation - sha256 "6c0290f3500966bb4155352bf277ae127eb341796729dfcc2b9ca968df20b9c4" => :mojave - sha256 "a5b4f42858c41ad5d60850a3a01b8658fb4e58d2473fe2d36938f4ab66eb05c6" => :high_sierra - sha256 "ff4ba4b7cad5fa4211bff04d5868521bc21b60995cf40f15bd507abb7c4cbaab" => :sierra - sha256 "ec4898462899cb632329f71dc0b4dd9a13a051aafd6da7dfd22e940e9d1ce01a" => :el_capitan - sha256 "e92218f17ac1926f4651b3e70d3fe42d43b7024e1f10d0ab6f1c7c9dd6bad606" => :yosemite - sha256 "bfd7889688facdf732cf0bf2bb8c7a917df71e80615a5f367468708437c0519e" => :mavericks - sha256 "caf0a03558f329e8ae25927f2bfc5d6905c098ae73773edbbe2bec9d288d9235" => :mountain_lion - end - - def install - bin.mkpath - man1.mkpath - system "make", "install", "prefix=#{prefix}", "INSTALL=install" - end - - test do - (testpath/"test").write <<~EOS - foo - bar - EOS - system "#{bin}/since", "-z", "test" - assert_predicate testpath/".since", :exist? - end -end diff --git a/Formula/singular.rb b/Formula/singular.rb deleted file mode 100644 index 82e5495a75d5a..0000000000000 --- a/Formula/singular.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Singular < Formula - desc "Computer algebra system for polynomial computations" - homepage "https://www.singular.uni-kl.de/" - url "https://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/4-1-1/singular-4.1.1.tar.gz" - sha256 "3792c5707b60c1748298bf47e2277de20303d60563b797372cc0e1eff4bbc583" - revision 5 - - bottle do - sha256 "5066f4d8f37460e4c742448904bc0ab86f6c80a33403a8166519e2106d1269c6" => :mojave - sha256 "26d97d795cb78e7970766a0838d82cdb83bab2c6364cd0335a35ad8b818ac2c2" => :high_sierra - sha256 "d59170be2fc20723900b78e780efc5b56857eae053683b4e5d52670d5db5e1bc" => :sierra - sha256 "a31f9779b2572c5e15f8f667c4ab4e32e3c89214d4488193cca66637b36e31c0" => :el_capitan - end - - head do - url "https://github.com/Singular/Sources.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gmp" - depends_on "mpfr" - depends_on "ntl" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "CXXFLAGS=-std=c++11" - system "make", "install" - end - - test do - testinput = <<~EOS - ring r = 0,(x,y,z),dp; - poly p = x; - poly q = y; - poly qq = z; - p*q*qq; - EOS - assert_match "xyz", pipe_output("#{bin}/Singular", testinput, 0) - end -end diff --git a/Formula/sip.rb b/Formula/sip.rb deleted file mode 100644 index 8e02b42cd6785..0000000000000 --- a/Formula/sip.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Sip < Formula - desc "Tool to create Python bindings for C and C++ libraries" - homepage "https://www.riverbankcomputing.com/software/sip/intro" - url "https://dl.bintray.com/homebrew/mirror/sip-4.19.8.tar.gz" - mirror "https://downloads.sourceforge.net/project/pyqt/sip/sip-4.19.8/sip-4.19.8.tar.gz" - sha256 "7eaf7a2ea7d4d38a56dd6d2506574464bddf7cf284c960801679942377c297bc" - revision 7 - head "https://www.riverbankcomputing.com/hg/sip", :using => :hg - - bottle do - cellar :any_skip_relocation - sha256 "38e39a92b598b92dd22ef602d489280854268833977bc1aab620593bc4ab53d4" => :mojave - sha256 "b782756cf7e277ffad42e393dc2dde63d0a0575abe56e5f4c7c622b44ec7ae14" => :high_sierra - sha256 "a1dcb1e526ec9d26101d961504ad1127920534cada88720bfdf1abce67d5573e" => :sierra - end - - depends_on "python" - depends_on "python@2" - - def install - ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin" - ENV.delete("SDKROOT") # Avoid picking up /Application/Xcode.app paths - - if build.head? - # Link the Mercurial repository into the download directory so - # build.py can use it to figure out a version number. - ln_s cached_download/".hg", ".hg" - # build.py doesn't run with python3 - system "python", "build.py", "prepare" - end - - ["python2", "python3"].each do |python| - version = Language::Python.major_minor_version python - system python, "configure.py", - "--deployment-target=#{MacOS.version}", - "--destdir=#{lib}/python#{version}/site-packages", - "--bindir=#{bin}", - "--incdir=#{include}", - "--sipdir=#{HOMEBREW_PREFIX}/share/sip" - system "make" - system "make", "install" - system "make", "clean" - end - end - - def post_install - (HOMEBREW_PREFIX/"share/sip").mkpath - end - - def caveats; <<~EOS - The sip-dir for Python is #{HOMEBREW_PREFIX}/share/sip. - EOS - end - - test do - (testpath/"test.h").write <<~EOS - #pragma once - class Test { - public: - Test(); - void test(); - }; - EOS - (testpath/"test.cpp").write <<~EOS - #include "test.h" - #include - Test::Test() {} - void Test::test() - { - std::cout << "Hello World!" << std::endl; - } - EOS - (testpath/"test.sip").write <<~EOS - %Module test - class Test { - %TypeHeaderCode - #include "test.h" - %End - public: - Test(); - void test(); - }; - EOS - (testpath/"generate.py").write <<~EOS - from sipconfig import SIPModuleMakefile, Configuration - m = SIPModuleMakefile(Configuration(), "test.build") - m.extra_libs = ["test"] - m.extra_lib_dirs = ["."] - m.generate() - EOS - (testpath/"run.py").write <<~EOS - from test import Test - t = Test() - t.test() - EOS - system ENV.cxx, "-shared", "-Wl,-install_name,#{testpath}/libtest.dylib", - "-o", "libtest.dylib", "test.cpp" - system bin/"sip", "-b", "test.build", "-c", ".", "test.sip" - - ["python2", "python3"].each do |python| - version = Language::Python.major_minor_version python - ENV["PYTHONPATH"] = lib/"python#{version}/site-packages" - system python, "generate.py" - system "make", "-j1", "clean", "all" - system python, "run.py" - end - end -end diff --git a/Formula/sipcalc.rb b/Formula/sipcalc.rb deleted file mode 100644 index fbbec24b94ffd..0000000000000 --- a/Formula/sipcalc.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Sipcalc < Formula - desc "Advanced console-based IP subnet calculator" - homepage "http://www.routemeister.net/projects/sipcalc/" - url "http://www.routemeister.net/projects/sipcalc/files/sipcalc-1.1.6.tar.gz" - sha256 "cfd476c667f7a119e49eb5fe8adcfb9d2339bc2e0d4d01a1d64b7c229be56357" - - bottle do - cellar :any_skip_relocation - sha256 "50bc96758ca5ecdb86fb29ca39bf07f6c4e44192310481436afccc191c6f2cd2" => :mojave - sha256 "9cff165f5e2b98d0c7d4729d4d6309b679cae7d161996242c666053d37134640" => :high_sierra - sha256 "1ccdaec0a816dde9f7caa0f7a77cd984ece78a61a5886032c4c8821915753482" => :sierra - sha256 "56aa686252ac703ed3dbe91f5737ec4d4b95d52516f4ab52947df15b77d1c58f" => :el_capitan - sha256 "6b2fc300755693d382fd5ea971c272a7c8c7bff49614dd88d8db4270aa496012" => :yosemite - sha256 "7ddf7b200984de97143828faf6385314a2ff3f4436432d810e5aaf7dfe44e78c" => :mavericks - sha256 "be6f69bdc8613a2f6f98279445ac443517b7ffb2746268c09e0d2cdc61bbd0e8" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/sipcalc", "-h" - end -end diff --git a/Formula/sipp.rb b/Formula/sipp.rb deleted file mode 100644 index 1fb8464bd69d0..0000000000000 --- a/Formula/sipp.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Sipp < Formula - desc "Traffic generator for the SIP protocol" - homepage "https://sipp.sourceforge.io/" - url "https://github.com/SIPp/sipp/releases/download/v3.5.2/sipp-3.5.2.tar.gz" - sha256 "875fc2dc2e46064aa8af576a26166b45e8a0ae22ec2ae0481baf197931c59609" - - bottle do - cellar :any_skip_relocation - sha256 "e72efd7ec51640ae73f2637a05f99380bef5d8d6205b30a3364e4ba1160d2b76" => :mojave - sha256 "eced6e8fc672c1b5cbad1af8e62d916ae6fab835ac6ccfcf8084187d0633484a" => :high_sierra - sha256 "28952b40fb839d5c5f4a151fcc85c933503be07112724fb4566dbf3a1eeeec8c" => :sierra - sha256 "f2c60af09d5edba1322541c8484c01291b948b2cb2cf78cbc4e0aa854faf0931" => :el_capitan - end - - def install - system "./configure", "--with-pcap" - system "make", "DESTDIR=#{prefix}" - bin.install "sipp" - end - - test do - assert_match "SIPp v#{version}", shell_output("#{bin}/sipp -v", 99) - end -end diff --git a/Formula/sipsak.rb b/Formula/sipsak.rb deleted file mode 100644 index 8297d8b156c06..0000000000000 --- a/Formula/sipsak.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Sipsak < Formula - desc "SIP Swiss army knife" - homepage "https://sourceforge.net/projects/sipsak.berlios/" - url "https://downloads.sourceforge.net/project/sipsak.berlios/sipsak-0.9.6-1.tar.gz" - version "0.9.6" - sha256 "5064c56d482a080b6a4aea71821b78c21b59d44f6d1aa14c27429441917911a9" - - bottle do - cellar :any - sha256 "ec6959b5778c091626354d80a76fcd96fb1c9ad62661818bca1a724d2e27f7b1" => :mojave - sha256 "7590f9703c8c1a70bcc03274f278a398a2bc0d0259c4e7a7fb91c524ec4153ec" => :high_sierra - sha256 "4725693dba5edcb68df030b63cb738795e96d29668bc9bf512ba8e2800ec862a" => :sierra - sha256 "9f42a09240891ecd9aa62dea1dd75dc1c5362d2f946fefecf13ce975a6c05626" => :el_capitan - sha256 "873d8cd50cce684ad55abbdf834157b4464c70877de9d1c37ad3c4ec9aaf6e10" => :yosemite - sha256 "d70729739fcfe770fdfa997dc33cd04370a6cd2f6916e63adfed60473c4bfc55" => :mavericks - sha256 "09d0961004d525dfc5f81bfe111884b401a09993fd83ff2f426016feb99607d4" => :mountain_lion - end - - depends_on "openssl" - - def install - ENV.append "CFLAGS", "-std=gnu89" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/sipsak", "-V" - end -end diff --git a/Formula/siril.rb b/Formula/siril.rb deleted file mode 100644 index 683448e5a599f..0000000000000 --- a/Formula/siril.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Siril < Formula - desc "Astronomical image processing tool" - homepage "https://free-astro.org/index.php/Siril" - url "https://free-astro.org/download/siril-0.9.9.tar.bz2" - sha256 "7958985393eca33b2db173090af78a46e42a7daefe7f6eaa7efa4ba261fa46f3" - revision 3 - head "http://free-astro.org/svn/siril/", :using => :svn - - bottle do - sha256 "9a69ae2805e66e70525d009a6f301aaeaf3b000d36b5810b8fb2d2f97d0ef15c" => :mojave - sha256 "e203a736b9679c74de308ad82ee1ced63aeff9178f7065f5604385953a4c5c76" => :high_sierra - sha256 "0270e3cbbab01ce62050cff3c83faa3f2859be8c7ba87a11eb7d6422f2af197d" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "intltool" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "cfitsio" - depends_on "ffms2" - depends_on "fftw" - depends_on "gnuplot" - depends_on "gsl" - depends_on "gtk-mac-integration" - depends_on "jpeg" - depends_on "libconfig" - depends_on "libraw" - depends_on "librsvg" - depends_on "libsvg" - depends_on "netpbm" - depends_on "opencv" - depends_on "openjpeg" - - # Upstream fix for compilation with OpenCV 4 - # Remove in next version - patch do - url "https://gitlab.com/free-astro/siril/commit/c23c2cc829b2ad9444ccefeb865f7e1b3d49c282.diff" - sha256 "22e179e832c7f6a28d5f2bfb3953be477b15450df41ceeb353b77376bec7e048" - end - - needs :cxx11 - - def install - ENV.cxx11 - - # siril uses pkg-config but it has wrong include paths for several - # headers. Work around that by letting it find all includes. - ENV.append_to_cflags "-I#{HOMEBREW_PREFIX}/include" - - system "./autogen.sh", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/siril", "-v" - end -end diff --git a/Formula/sisc-scheme.rb b/Formula/sisc-scheme.rb deleted file mode 100644 index c4df234924342..0000000000000 --- a/Formula/sisc-scheme.rb +++ /dev/null @@ -1,17 +0,0 @@ -class SiscScheme < Formula - desc "Extensive Java based Scheme interpreter" - homepage "http://sisc-scheme.org/" - url "https://downloads.sourceforge.net/project/sisc/SISC%20Lite/1.16.6/sisc-lite-1.16.6.tar.gz" - sha256 "7a2f1ee46915ef885282f6df65f481b734db12cfd97c22d17b6c00df3117eea8" - - bottle :unneeded - - def install - libexec.install Dir["*"] - (bin/"sisc").write <<~EOS - #!/bin/sh - SISC_HOME=#{libexec} - exec #{libexec}/sisc "$@" - EOS - end -end diff --git a/Formula/sispmctl.rb b/Formula/sispmctl.rb deleted file mode 100644 index 90963924ad65e..0000000000000 --- a/Formula/sispmctl.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Sispmctl < Formula - desc "Control Gembird SIS-PM programmable power outlet strips" - homepage "https://sispmctl.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sispmctl/sispmctl/sispmctl-4.0/sispmctl-4.0.tar.gz" - sha256 "442d9bb9774da7214c222144035ac68ad5d25171040ce2731cfdf49b3365cfd5" - - bottle do - sha256 "cec81af9b77fc4c08d7530aac3aea21f0dcf85ae192428803815c80dc3b30e3a" => :mojave - sha256 "3ad48ee1db3c177b4f93bedfa6163b0dafa96cfb1b1f349dc5d9682e78d67d98" => :high_sierra - sha256 "c4e130a2484f40a4803e1eccac3c0411fde2c881b64a0220a60dede14bf9fdf7" => :sierra - sha256 "4082f505586a99a70dc76516e505ca83d15d794a7c87a87629089d1c50ca44b9" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libusb-compat" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/sispmctl -v 2>&1") - end -end diff --git a/Formula/sjk.rb b/Formula/sjk.rb deleted file mode 100644 index 58d4bfdfa7fe1..0000000000000 --- a/Formula/sjk.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Sjk < Formula - desc "Swiss Java Knife" - homepage "https://github.com/aragozin/jvm-tools" - url "https://search.maven.org/remotecontent?filepath=org/gridkit/jvmtool/sjk-plus/0.10.1/sjk-plus-0.10.1.jar" - sha256 "dafd3b18de282265fe0f806872b23211a1318fc63aaef284fbd6abee5a288368" - - bottle :unneeded - - depends_on :java - - def install - libexec.install "sjk-plus-#{version}.jar" - bin.write_jar_script "#{libexec}/sjk-plus-#{version}.jar", "sjk" - end - - test do - system bin/"sjk", "jps" - end -end diff --git a/Formula/skaffold.rb b/Formula/skaffold.rb deleted file mode 100644 index f7d2cc464d5fc..0000000000000 --- a/Formula/skaffold.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Skaffold < Formula - desc "Easy and Repeatable Kubernetes Development" - homepage "https://github.com/GoogleContainerTools/skaffold" - url "https://github.com/GoogleContainerTools/skaffold.git", - :tag => "v0.20.0", - :revision => "837e53b260a8fbc35765ed8b5f3c41de6a3242b1" - head "https://github.com/GoogleContainerTools/skaffold.git" - - bottle do - cellar :any_skip_relocation - sha256 "7524c533363cb6fe42c0f48008561a4a629bb0de2e030e2b018e21e5b80f1f6a" => :mojave - sha256 "c51a01b85ef20cd87676fb17022599669b9be4618a3f44f0cfac67b13bee9729" => :high_sierra - sha256 "227ae5e082d351ac9edf2167c6c209495eb3c0f936de80b3826ac987fef6a033" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/GoogleContainerTools/skaffold" - dir.install buildpath.children - [buildpath/".brew_home"] - cd dir do - system "make" - bin.install "out/skaffold" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/skaffold version --output {{.GitTreeState}}") - assert_match "clean", output - end -end diff --git a/Formula/skafos.rb b/Formula/skafos.rb deleted file mode 100644 index e45a00cab7680..0000000000000 --- a/Formula/skafos.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Skafos < Formula - desc "CLI for the Metis Machine A.I. and machine learning deployment platform" - homepage "https://metismachine.com/" - url "https://github.com/MetisMachine/skafos/archive/1.7.7.tar.gz" - sha256 "42eecd6094126f1e4febf94541c4b640f2b4ed39829af2686cd83a60fafcd994" - - bottle do - cellar :any - sha256 "c11ad9680b5430242f3a945bacb917fdbb1a5f98a422f458240d92db56c5b188" => :mojave - sha256 "37b0370937fdc69db5edc559e181ff6c076208494bbe733fc5429cb5b975f5a7" => :high_sierra - sha256 "84ec6534b037c9327939151a3a2e91cc85e8e84eb84ea70df7b4356e8f8f20f9" => :sierra - end - - depends_on "cmake" => :build - depends_on "libarchive" - depends_on "yaml-cpp" - - def install - system "make", "_create_version_h" - system "make", "_env_for_prod" - - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.exp").write <<~EOS - spawn #{bin}/skafos setup - set timeout 5 - expect { - timeout { exit 1 } - "Please enter email:" - } - send "me@foo.bar\r" - expect { - timeout { exit 2 } - "Please enter password:" - } - send "1234\r" - expect { - timeout { exit 3 } - eof - } - EOS - assert_match "Invalid email or password", shell_output("expect -f test.exp") - end -end diff --git a/Formula/ski.rb b/Formula/ski.rb deleted file mode 100644 index 2788e8f252bde..0000000000000 --- a/Formula/ski.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ski < Formula - desc "Evade the deadly Yeti on your jet-powered skis" - homepage "http://catb.org/~esr/ski/" - url "http://www.catb.org/~esr/ski/ski-6.12.tar.gz" - sha256 "2f34f64868deb0cc773528c68d9829119fac359c44a704695214d87773df5a33" - - bottle do - cellar :any_skip_relocation - sha256 "3a5815dd128f1818e43954d76054fb5708afa95cf102b2c3a4fe82aaba6d1e49" => :mojave - sha256 "b9ae8b2b8ce8c4454bd0690dffc6d90873c4afbc0cf2945af0791a79b5d871ef" => :high_sierra - sha256 "b7da8676863a5d83104b2fc223b61b49be43d3f18457126053ee98be9ab900fe" => :sierra - sha256 "b7da8676863a5d83104b2fc223b61b49be43d3f18457126053ee98be9ab900fe" => :el_capitan - sha256 "b7da8676863a5d83104b2fc223b61b49be43d3f18457126053ee98be9ab900fe" => :yosemite - end - - head do - url "git://thyrsus.com/repositories/ski.git" - depends_on "xmlto" => :build - end - - def install - if build.head? - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "make" - end - bin.install "ski" - man6.install "ski.6" - end - - test do - assert_match "Bye!", pipe_output("#{bin}/ski", "") - end -end diff --git a/Formula/skinny.rb b/Formula/skinny.rb deleted file mode 100644 index 8d1faf2620cbc..0000000000000 --- a/Formula/skinny.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Skinny < Formula - desc "Full-stack web app framework in Scala" - homepage "http://skinny-framework.org/" - url "https://github.com/skinny-framework/skinny-framework/releases/download/3.0.1/skinny-3.0.1.tar.gz" - sha256 "e81578959b8edf715a407aaf17d339ff5223d9c3654f308cd5bcee553e95eef8" - - bottle :unneeded - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - (bin/"skinny").write <<~EOS - #!/bin/bash - export PATH=#{bin}:$PATH - PREFIX="#{libexec}" exec "#{libexec}/skinny" "$@" - EOS - end - - test do - system bin/"skinny", "new", "myapp" - end -end diff --git a/Formula/skipfish.rb b/Formula/skipfish.rb deleted file mode 100644 index 0df1d8fa781c5..0000000000000 --- a/Formula/skipfish.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Skipfish < Formula - desc "Web application security scanner" - homepage "https://code.google.com/archive/p/skipfish/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/skipfish/skipfish-2.10b.tgz" - sha256 "1a4fbc9d013f1f9b970946ea7228d943266127b7f4100c994ad26c82c5352a9e" - revision 2 - - bottle do - sha256 "58930fa4ed6c9bb930b3e502826e674f6ef9d75c4cf9648d443326e46f09f77d" => :mojave - sha256 "1acea16d96d52ba66c14f3194fb1c7d63f570e3f1ce5828458d28ddbc75d7d77" => :high_sierra - sha256 "e3e89e094313db04248263b0a6d9901ea47254215219046b01c048584ee98f4d" => :sierra - sha256 "60db8bcf08796a72afa621516767d0d0120a4ad305c6b8793b492f20b4679a71" => :el_capitan - end - - depends_on "libidn" - depends_on "openssl" - depends_on "pcre" - - def install - ENV.append "CFLAGS", "-I#{HOMEBREW_PREFIX}/include" - ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" - - chmod 0755, "src/config.h" # Not writeable in the tgz. Lame. - inreplace "src/config.h", - "#define ASSETS_DIR \"assets\"", - "#define ASSETS_DIR \"#{libexec}/assets\"" - - system "make" - bin.install "skipfish" - libexec.install %w[assets dictionaries config signatures doc] - end - - def caveats; <<~EOS - NOTE: Skipfish uses dictionary-based probes and will not run until - you have specified a dictionary for it to use. Please read: - #{libexec}/doc/dictionaries.txt - carefully to make the right choice. This step has a profound impact - on the quality of results later on. - - Use this command to print usage information: - skipfish -h - EOS - end -end diff --git a/Formula/skktools.rb b/Formula/skktools.rb deleted file mode 100644 index 617e2d03ea71b..0000000000000 --- a/Formula/skktools.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Skktools < Formula - desc "SKK dictionary maintenance tools" - homepage "http://openlab.jp/skk/index-j.html" - url "https://deb.debian.org/debian/pool/main/s/skktools/skktools_1.3.4.orig.tar.gz" - sha256 "84cc5d3344362372e0dfe93a84790a193d93730178401a96248961ef161f2168" - - bottle do - cellar :any - sha256 "91ade660cdcd83bdda5d2aaa2c1f0c8904f03c9f4055ee53e7861964acd00082" => :mojave - sha256 "ba33dffb6c11d2c0994f0248a324e6662dda598e3a90dffc06de2a256eb91f3e" => :high_sierra - sha256 "2a067c0d5f053faeaf0c2b3f6d32d26306164e08a5f95ad4d25c562f5308f931" => :sierra - sha256 "90d7201d2e94c37a526005541256485e81e1b5cdba51fd751d6255bcbc1d8069" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-skkdic-expr2" - - system "make", "CC=#{ENV.cc}" - ENV.deparallelize - system "make", "install" - end - - test do - test_dic = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } - わるs /悪/ - わるk /悪/ - わるi /悪/ - EOS - (testpath/"SKK-JISYO.TEST").write test_dic - - test_shuffle = <<~EOS.tap { |s| s.encode("euc-jis-2004") } - わるs /悪/ - わるi /悪/ - わるk /悪/ - EOS - - expect_shuffle = <<~EOS.tap { |s| s.encode("euc-jis-2004") } - ;; okuri-ari entries. - わるs /悪/ - わるk /悪/ - わるi /悪/ - EOS - - test_sp1 = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } - わるs /悪/ - わるk /悪/ - EOS - (testpath/"test.sp1").write test_sp1 - - test_sp2 = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } - わるk /悪/ - わるi /悪/ - EOS - (testpath/"test.sp2").write test_sp2 - - test_sp3 = <<~EOS.strip.tap { |s| s.encode("euc-jis-2004") } - わるi /悪/ - EOS - (testpath/"test.sp3").write test_sp3 - - expect_expr = <<~EOS.tap { |s| s.encode("euc-jis-2004") } - ;; okuri-ari entries. - わるs /悪/ - わるk /悪/ - EOS - - expect_count = "SKK-JISYO.TEST: 3 candidates\n" - actual_count = shell_output("#{bin}/skkdic-count SKK-JISYO.TEST") - assert_equal expect_count, actual_count - - actual_shuffle = pipe_output("#{bin}/skkdic-sort", test_shuffle, 0) - assert_equal expect_shuffle, actual_shuffle - - ["skkdic-expr", "skkdic-expr2"].each do |cmd| - expr_cmd = "#{bin}/#{cmd} test.sp1 + test.sp2 - test.sp3" - actual_expr = shell_output(expr_cmd) - assert_equal expect_expr, pipe_output("#{bin}/skkdic-sort", actual_expr) - end - end -end diff --git a/Formula/skopeo.rb b/Formula/skopeo.rb deleted file mode 100644 index 9f7153c61bb65..0000000000000 --- a/Formula/skopeo.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Skopeo < Formula - desc "Work with remote images registries" - homepage "https://github.com/containers/skopeo" - url "https://github.com/containers/skopeo/archive/v0.1.34.tar.gz" - sha256 "3de73c6cb4598879e887011a57d381d2455a6bccfd88341b8c99fb4902adca47" - - bottle do - cellar :any - sha256 "e53a71091b73c48f685331b9595217abdbbd2f4d5d54fa5348f6c43e6db3e39d" => :mojave - sha256 "9ee8c072fd5d1829f6d8ba3e57af1a10eb534e8703076a6de0f554182a97de5b" => :high_sierra - sha256 "6e58490a7c81ccb13e1b6c506aa90b21b02d81748228d607cbff8496c32c6460" => :sierra - end - - depends_on "go" => :build - depends_on "gpgme" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/containers/skopeo").install buildpath.children - cd "src/github.com/containers/skopeo" do - system "make", "binary-local" - bin.install "skopeo" - prefix.install_metafiles - end - end - - test do - cmd = "#{bin}/skopeo --override-os linux inspect docker://busybox" - output = shell_output(cmd) - assert_match "docker.io/library/busybox", output - end -end diff --git a/Formula/sl.rb b/Formula/sl.rb deleted file mode 100644 index 0e347e05e852f..0000000000000 --- a/Formula/sl.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Sl < Formula - desc "Prints a steam locomotive if you type sl instead of ls" - homepage "https://github.com/mtoyoda/sl" - url "https://github.com/mtoyoda/sl/archive/5.02.tar.gz" - sha256 "1e5996757f879c81f202a18ad8e982195cf51c41727d3fea4af01fdcbbb5563a" - head "https://github.com/mtoyoda/sl.git" - - bottle do - cellar :any_skip_relocation - sha256 "e489648bcc7eff8f065855dcc891eb55f3793a5ff464d96726e313a1bc74d00f" => :mojave - sha256 "627b0b5f8027f876466d03038da7dd0d75804cccc3bbcf45f0fe9c91199be3c3" => :high_sierra - sha256 "afd30cb3a99d238a8ac52810834244d5f47fc2ff597db9ad61012bd2014395b9" => :sierra - sha256 "f186cb86f4d48929aa671434dbd6be0a861069608098a30dc952697bcca85972" => :el_capitan - sha256 "696104243a18e08279d461e66e6a696791e6c36b67df43e361ad6f6de1200440" => :yosemite - sha256 "c7d4432bfc169f7338eeb0c8300a975495b229d6e85bfff4fdd6bbd11eb8da17" => :mavericks - end - - fails_with :clang do - build 318 - end - - def install - system "make", "-e" - bin.install "sl" - man1.install "sl.1" - end - - test do - system "#{bin}/sl", "-c" - end -end diff --git a/Formula/slackcat.rb b/Formula/slackcat.rb deleted file mode 100644 index 011a4c914ec3b..0000000000000 --- a/Formula/slackcat.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Slackcat < Formula - desc "Command-line utility for posting snippets to Slack" - homepage "https://github.com/vektorlab/slackcat" - url "https://github.com/vektorlab/slackcat/archive/v1.4.tar.gz" - sha256 "43c80b7d546bca51af47b3df8b79a2e5ce021042ea91d877e2feb33a7ca81305" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6b46f20293da99226fdeb610dc78780cc3b6e8ec66390d982a5b08f574aed3b5" => :mojave - sha256 "81bf29fac1f47bfaa4064b9b03aae96c4ea179158b0baeb0868203c6b7144221" => :high_sierra - sha256 "7a0331e03695488f07eba24c4ebef11b406face8dcdbfc632beb8c5eb3227395" => :sierra - sha256 "bd75f396807917734adec3c541faebee3789841474fdd81c343c61c6a739d293" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/vektorlab/slackcat").install buildpath.children - cd "src/github.com/vektorlab/slackcat" do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-o", bin/"slackcat", - "-ldflags", "-X main.version=#{version}" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/slackcat -v") - end -end diff --git a/Formula/slacknimate.rb b/Formula/slacknimate.rb deleted file mode 100644 index b4038ad956683..0000000000000 --- a/Formula/slacknimate.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Slacknimate < Formula - desc "Text animation for Slack messages" - homepage "https://github.com/mroth/slacknimate" - url "https://github.com/mroth/slacknimate/archive/v1.0.1.tar.gz" - sha256 "ddac6002edd57a334ce828e2662264598ea7d471757747cffd85ffdfedbb044b" - head "https://github.com/mroth/slacknimate.git" - - bottle do - cellar :any_skip_relocation - sha256 "2cae878e05448d6f0a7679319269e7c95fb2b879f4620b84a6b2b35d6ee739f4" => :mojave - sha256 "6d93b3bbccb0190be8a2702d7fa3e587fa768110567e76b2a43f167381981707" => :high_sierra - sha256 "f546be3bc842ef924e62c2dee561acdf114ee5206253d6e06a848eefd98dcafe" => :sierra - sha256 "e07155d74980ed24bf07acce56c890a86668eb359aecae8dae6eb6973c38cfd8" => :el_capitan - sha256 "f97ea26560c72c550780b81a124f8c69c8588c27e0f87eef65201676f2666672" => :yosemite - sha256 "cf81016bb94d8d2369c98a529b575d3115a263139502294b528197e1ac293ae9" => :mavericks - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - pkgpath = buildpath/"src/github.com/mroth" - pkgpath.install Dir["*"] - cd pkgpath do - system "make" - bin.install "bin/slacknimate" - prefix.install_metafiles - end - end - - test do - system "#{bin}/slacknimate", "--version" - system "#{bin}/slacknimate", "--help" - end -end diff --git a/Formula/slashem.rb b/Formula/slashem.rb deleted file mode 100644 index 8a2e5151b605b..0000000000000 --- a/Formula/slashem.rb +++ /dev/null @@ -1,60 +0,0 @@ -require "etc" - -class Slashem < Formula - desc "Fork/variant of Nethack" - homepage "https://slashem.sourceforge.io/" - url "https://downloads.sourceforge.net/project/slashem/slashem-source/0.0.8E0F1/se008e0f1.tar.gz" - version "0.0.8E0F1" - sha256 "e9bd3672c866acc5a0d75e245c190c689956319f192cb5d23ea924dd77e426c3" - - bottle do - cellar :any_skip_relocation - sha256 "7a764f6117556d92fad752ec06dc28626c0e250632eac85cfa8d841f7c770819" => :mojave - sha256 "5bac56b4e76ea1db5b5e211ac88c4f10c2fa8b179ada29512f41868af1669b3d" => :high_sierra - sha256 "80a4df38057ec2bef889b92b4edfc80158add542a1bd9f1ca50ed8d39eb21e2c" => :sierra - sha256 "3b0ec09db5b1e2abccc22d2cc9282de211d9a15e4d2d66c404f898af2768d1b3" => :el_capitan - sha256 "9220e4e678c8302cd7c1ae15b4af08a733899c38717021c867e35decf79f00a7" => :yosemite - end - - depends_on "pkg-config" => :build - - skip_clean "slashemdir/save" - - # Fixes compilation error in OS X: https://sourceforge.net/p/slashem/bugs/896/ - patch :DATA - - # Fixes user check on older versions of OS X: https://sourceforge.net/p/slashem/bugs/895/ - # Fixed upstream: http://slashem.cvs.sourceforge.net/viewvc/slashem/slashem/configure?r1=1.13&r2=1.14&view=patch - patch :p0 do - url "https://gist.githubusercontent.com/mistydemeo/76dd291c77a509216418/raw/65a41804b7d7e1ae6ab6030bde88f7d969c955c3/slashem-configure.patch" - sha256 "c91ac045f942d2ee1ac6af381f91327e03ee0650a547bbe913a3bf35fbd18665" - end - - def install - ENV.deparallelize - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-mandir=#{man}", - "--with-group=#{Etc.getpwuid.gid}", - "--with-owner=#{Etc.getpwuid.name}", - "--enable-wizmode=#{Etc.getpwuid.name}" - system "make", "install" - - man6.install "doc/slashem.6", "doc/recover.6" - end -end - -__END__ -diff --git a/win/tty/termcap.c b/win/tty/termcap.c -index c3bdf26..8d00b11 100644 ---- a/win/tty/termcap.c -+++ b/win/tty/termcap.c -@@ -960,7 +960,7 @@ cl_eos() /* free after Robert Viduya */ - - #include - --#if !defined(LINUX) && !defined(__FreeBSD__) -+#if !defined(LINUX) && !defined(__FreeBSD__) && !defined(__APPLE__) - extern char *tparm(); - #endif diff --git a/Formula/sleepwatcher.rb b/Formula/sleepwatcher.rb deleted file mode 100644 index 8bfede91d8fe3..0000000000000 --- a/Formula/sleepwatcher.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Sleepwatcher < Formula - desc "Monitors sleep, wakeup, and idleness of a Mac" - homepage "https://www.bernhard-baehr.de/" - url "https://www.bernhard-baehr.de/sleepwatcher_2.2.tgz" - sha256 "c04ac1c49e2b5785ed5d5c375854c9c0b9e959affa46adab57985e4123e8b6be" - - bottle do - cellar :any_skip_relocation - sha256 "43b0b73e895cdd2bcaeb353ae65002642d400004112878df4fbf31ecb1cd5143" => :mojave - sha256 "f9683fbee55fd410cd2650b2e12a01a322e316ceaf39484e5faa4ca3bec25ea3" => :high_sierra - sha256 "b9ebee67696518e4d79efee6e8d564de9b6ccc67fbfea07f68b264b8c6a2a80a" => :sierra - sha256 "d1abbc5f4752f77a01b1dfbadf831f58affc245137535d030992bd5cd3b1dd9c" => :el_capitan - sha256 "e4e3d7f9802dcf14431334c3187108c554c5315b3e34bc03dcb76e8f181158f5" => :yosemite - sha256 "b59893325808df64d3944f9aef6c66f6420d16cba36a2a1934bb8260bc27fe2f" => :mavericks - end - - def install - # Adjust Makefile to build native binary only - inreplace "sources/Makefile" do |s| - s.gsub! /^(CFLAGS)_PPC.*$/, "\\1 = #{ENV.cflags} -prebind" - s.gsub! /^(CFLAGS_X86)/, "#\\1" - s.change_make_var! "BINDIR", "$(PREFIX)/sbin" - s.change_make_var! "MANDIR", "$(PREFIX)/share/man" - s.gsub! /^(.*?)CFLAGS_PPC(.*?)[.]ppc/, "\\1CFLAGS\\2" - s.gsub! /^(.*?CFLAGS_X86.*?[.]x86)/, "#\\1" - s.gsub! /^(\t(lipo|rm).*?[.](ppc|x86))/, "#\\1" - s.gsub! "-o root -g wheel", "" - end - - # Build and install binary - cd "sources" do - mv "../sleepwatcher.8", "." - system "make", "install", "PREFIX=#{prefix}" - end - - # Write the sleep/wakeup scripts - (prefix + "etc/sleepwatcher").install Dir["config/rc.*"] - - # Write the launchd scripts - inreplace Dir["config/*.plist"], "/usr/local/sbin", HOMEBREW_PREFIX/"sbin" - - inreplace "config/de.bernhard-baehr.sleepwatcher-20compatibility.plist", - "/etc", etc/"sleepwatcher" - - prefix.install Dir["config/*.plist"] - end - - def caveats; <<~EOS - For SleepWatcher to work, you will need to read the following: - - #{prefix}/ReadMe.rtf - - Ignore information about installing the binary and man page, - but read information regarding setup of the launchd files which - are installed here: - - #{Dir["#{prefix}/*.plist"].join("\n ")} - - These are the examples provided by the author. - EOS - end -end diff --git a/Formula/sleuthkit.rb b/Formula/sleuthkit.rb deleted file mode 100644 index 8f66757f5b14b..0000000000000 --- a/Formula/sleuthkit.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Sleuthkit < Formula - desc "Forensic toolkit" - homepage "https://www.sleuthkit.org/" - url "https://github.com/sleuthkit/sleuthkit/releases/download/sleuthkit-4.6.4/sleuthkit-4.6.4.tar.gz" - sha256 "90e5397bed861b08cfe8378f1a6032cfe50716056d2a47b0cac77e50a776ec41" - - bottle do - cellar :any - sha256 "ce1663cad76dedba6e23c936d5cf7e460242b7788b3d0c2398609aface6a0111" => :mojave - sha256 "b2fbd5d22f83160c6f6625f8586ac22a53b479b4f728ca66e37128dcb4302c20" => :high_sierra - sha256 "e10adcac8cd1e11875cbc44cf9a390a1a494820ba50183b6459c702b1f369a67" => :sierra - end - - depends_on "ant" => :build - depends_on "afflib" - depends_on :java - depends_on "libewf" - depends_on "libpq" - depends_on "sqlite" - - conflicts_with "irods", :because => "both install `ils`" - conflicts_with "ffind", - :because => "both install a 'ffind' executable." - - def install - ENV.append_to_cflags "-DNDEBUG" - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - - cd "bindings/java" do - system "ant" - end - prefix.install "bindings" - end - - test do - system "#{bin}/tsk_loaddb", "-V" - end -end diff --git a/Formula/slimerjs.rb b/Formula/slimerjs.rb deleted file mode 100644 index e6a5823bb120f..0000000000000 --- a/Formula/slimerjs.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Slimerjs < Formula - desc "Scriptable browser for Web developers" - homepage "https://slimerjs.org/" - url "https://github.com/laurentj/slimerjs/archive/1.0.0.tar.gz" - sha256 "6fd07fa6953e4e497516dd0a7bc5eb2f21c68f9e60bdab080ac2c86e8ab8dfb2" - head "https://github.com/laurentj/slimerjs.git" - - bottle :unneeded - - def install - cd "src" do - system "zip", "-r", "omni.ja", "chrome/", "components/", "modules/", - "defaults/", "chrome.manifest", "-x@package_exclude.lst" - libexec.install %w[application.ini omni.ja slimerjs slimerjs.py] - end - bin.install_symlink libexec/"slimerjs" - end - - def caveats; <<~EOS - The configuration file was installed in: - #{libexec}/application.ini - EOS - end - - test do - ENV["SLIMERJSLAUNCHER"] = "/nonexistent" - assert_match "Set it with the path to Firefox", shell_output("#{bin}/slimerjs test.js", 1) - end -end diff --git a/Formula/sloc.rb b/Formula/sloc.rb deleted file mode 100644 index e52543d33c7b4..0000000000000 --- a/Formula/sloc.rb +++ /dev/null @@ -1,38 +0,0 @@ -require "language/node" - -class Sloc < Formula - desc "Simple tool to count source lines of code" - homepage "https://github.com/flosse/sloc#readme" - url "https://registry.npmjs.org/sloc/-/sloc-0.2.1.tgz" - sha256 "fb56f1763b7dadfd0566f819665efc0725ba8dfbec13c75da3839edf309596e6" - - bottle do - cellar :any_skip_relocation - sha256 "f241a7bf03cb7bb97bb061f5f46442d7a40de893697a5335c821049d471e9466" => :mojave - sha256 "345308d671b83edb390c143554c64958135cf37bc7cd365ce613011da682a8b7" => :high_sierra - sha256 "1386a024efebe74829d85c8d75d07ae9f09f8c8a8104aa41424a5ea8c425fca5" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - return 0; - } - EOS - - std_output = <<~EOS - Path,Physical,Source,Comment,Single-line comment,Block comment,Mixed,Empty block comment,Empty,To Do - Total,4,4,0,0,0,0,0,0,0 - EOS - - assert_match std_output, shell_output("#{bin}/sloc --format=csv .") - end -end diff --git a/Formula/sloccount.rb b/Formula/sloccount.rb deleted file mode 100644 index a04ce1c6843df..0000000000000 --- a/Formula/sloccount.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Sloccount < Formula - desc "Count lines of code in many languages" - homepage "https://www.dwheeler.com/sloccount/" - url "https://www.dwheeler.com/sloccount/sloccount-2.26.tar.gz" - sha256 "fa7fa2bbf2f627dd2d0fdb958bd8ec4527231254c120a8b4322405d8a4e3d12b" - - bottle do - cellar :any_skip_relocation - sha256 "4131346005c6344f672049de9b783fd67476c66e68d3881e9918f2a42904b48d" => :mojave - sha256 "cb8c077fa71631f7a2d3a9041f5aeea519835cf18406398953aaa1f340d8b439" => :high_sierra - sha256 "c6ae6d6442fc33e0aa5302fc99535ad79507067960226533a64e8332a1aaeaae" => :sierra - sha256 "9fe12539b280711faac5e0950b617ed91f35942311aab112607850645b5696bd" => :el_capitan - sha256 "8ee5aab0e8aba23cb6d949c84760fa775473b32b6ce3e245ccb5acfd715f8d68" => :yosemite - sha256 "16433612bab2bc3fd6d3b804210c1d71980756b02e5e034aa9402c8229e1c968" => :mavericks - end - - depends_on "md5sha1sum" - - patch :DATA - - def install - rm "makefile.orig" # Delete makefile.orig or patch falls over - bin.mkpath # Create the install dir or install falls over - system "make", "install", "PREFIX=#{prefix}" - (bin+"erlang_count").write "#!/bin/sh\ngeneric_count '%' $@" - end - - test do - system "#{bin}/sloccount", "--version" - end -end - -__END__ -diff --git a/break_filelist b/break_filelist -index ad2de47..ff854e0 100755 ---- a/break_filelist -+++ b/break_filelist -@@ -205,6 +205,7 @@ $noisy = 0; # Set to 1 if you want noisy reports. - "hs" => "haskell", "lhs" => "haskell", - # ???: .pco is Oracle Cobol - "jsp" => "jsp", # Java server pages -+ "erl" => "erlang", - ); diff --git a/Formula/slowhttptest.rb b/Formula/slowhttptest.rb deleted file mode 100644 index 64ef2f0dec051..0000000000000 --- a/Formula/slowhttptest.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Slowhttptest < Formula - desc "Simulates application layer denial of service attacks" - homepage "https://github.com/shekyan/slowhttptest" - url "https://github.com/shekyan/slowhttptest/archive/v1.7.tar.gz" - sha256 "9fd3ce4b0a7dda2e96210b1e438c0c8ec924a13e6699410ac8530224b29cfb8e" - head "https://github.com/shekyan/slowhttptest.git" - - bottle do - cellar :any - sha256 "3843a8f52b50da1fe95a0772f260a904416ad4678fa03d4918f1bc0bbb18e990" => :mojave - sha256 "8444fd4b1d9504ed908dc5049af4c3ed5f0a271db15d1de5f42b2413413d74bc" => :high_sierra - sha256 "3d196594ae9da5c8852b2010d6c6e581896f973e06d7f5f2bd48a9ae36b63141" => :sierra - sha256 "34cf5108ef284fcc23d91d0ee83358623935ffce718f0783912e7b5af05eab8e" => :el_capitan - sha256 "bb7b09c1ac0489afab54737925d869bb67d2754bdec08969879be4d8ed2ee4aa" => :yosemite - sha256 "45bad60bd26ee4d81a0888658bbc86890331b76a2e8fa071f63e4da8062599fe" => :mavericks - end - - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/slowhttptest", "-u", "https://google.com", - "-p", "1", "-r", "1", "-l", "1", "-i", "1" - end -end diff --git a/Formula/slrn.rb b/Formula/slrn.rb deleted file mode 100644 index 601510c6293a2..0000000000000 --- a/Formula/slrn.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Slrn < Formula - desc "Powerful console-based newsreader" - homepage "https://slrn.sourceforge.io/" - url "https://jedsoft.org/releases/slrn/slrn-1.0.3a.tar.bz2" - sha256 "3ba8a4d549201640f2b82d53fb1bec1250f908052a7983f0061c983c634c2dac" - head "git://git.jedsoft.org/git/slrn.git" - - bottle do - sha256 "5e8fc00235e336b67c0bcc0a9459f96abbec583724e97c1be0dde7619d6900dc" => :mojave - sha256 "73238ccdd5f84b813446674f5be88f604c4e44107ab5bf367caee0bdd00ea410" => :high_sierra - sha256 "46721d6d7a4ac469837a4e41bfdc279727ee7c3dd38351eb3d47aa7b43e64062" => :sierra - sha256 "d45e3c8765302bd61709b091143becf4c7ce78913256620c956dcf2b95431910" => :el_capitan - sha256 "06d71ffeb008854c63eeadf6f45633cf692e648490cb20c2ba5f3229cc3dc808" => :yosemite - end - - depends_on "openssl" - depends_on "s-lang" - - def install - bin.mkpath - man1.mkpath - mkdir_p "#{var}/spool/news/slrnpull" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-ssl=#{Formula["openssl"].opt_prefix}", - "--with-slrnpull=#{var}/spool/news/slrnpull", - "--with-slang=#{HOMEBREW_PREFIX}" - system "make", "all", "slrnpull" - - ENV.deparallelize - system "make", "install" - end - - test do - ENV["TERM"] = "xterm" - assert_match version.to_s, shell_output("#{bin}/slrn --show-config") - end -end diff --git a/Formula/slugify.rb b/Formula/slugify.rb deleted file mode 100644 index 1d412130f0e6f..0000000000000 --- a/Formula/slugify.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Slugify < Formula - desc "Convert filenames and directories to a web friendly format" - homepage "https://github.com/benlinton/slugify" - url "https://github.com/benlinton/slugify/archive/v1.0.1.tar.gz" - sha256 "f6873b062119d3eaa7d89254fc6e241debf074da02e3189f12e08b372af096e5" - head "https://github.com/benlinton/slugify.git" - - bottle :unneeded - - def install - bin.install "slugify" - man1.install "slugify.1" - end - - test do - system "#{bin}/slugify", "-n", "dry_run.txt" - end -end diff --git a/Formula/slurm.rb b/Formula/slurm.rb deleted file mode 100644 index 494b1b6e3d9a4..0000000000000 --- a/Formula/slurm.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Slurm < Formula - desc "Yet another network load monitor" - homepage "https://github.com/mattthias/slurm" - url "https://github.com/mattthias/slurm/archive/upstream/0.4.3.tar.gz" - sha256 "b960c0d215927be1d02c176e1b189321856030226c91f840284886b727d3a3ac" - - bottle do - cellar :any_skip_relocation - sha256 "1877e60b9696aca27dce408c18113108ae08611914a120c9fc52a59db9eec99a" => :mojave - sha256 "97f41cff81bbc7ee1d0f9599e7b697d97834343a7a867497b5920246f836a327" => :high_sierra - sha256 "03f2d26fda7d44d9853f4e24ca0cd28b7096ec174ea6de731234bdb7d7742f88" => :sierra - sha256 "f77b8d2eb56422a448af47cab61f2e9b48d7d82439fa44ecd4dd19cf18ff83f8" => :el_capitan - sha256 "ec4091e007334ba76cccb21d4d9dd6cc229d38193de110c38aee969969ccf959" => :yosemite - sha256 "737bb85b1e76c2a577e515857ae01d7eed5b64f0ea514bae0534f1360cc53566" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"slurm", "-h" - end -end diff --git a/Formula/smake.rb b/Formula/smake.rb deleted file mode 100644 index d241ac6dc7262..0000000000000 --- a/Formula/smake.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Smake < Formula - desc "Portable make program with automake features" - homepage "https://s-make.sourceforge.io/" - url "https://downloads.sourceforge.net/project/s-make/smake-1.2.5.tar.bz2" - sha256 "27566aa731a400c791cd95361cc755288b44ff659fa879933d4ea35d052259d4" - - bottle do - sha256 "6dd776264c5583a982b9a8270956c84274387719aeae7b057d7c581ebc438c70" => :mojave - sha256 "5b1860ab709b7a27201f781f31a34ccf6db6da600ef60741fd918a95c3beedb7" => :high_sierra - sha256 "b1afe84c5a7b535738d2b2ee3f2abf879c908cf4f3b9c5a6f9f9cdd3fc403536" => :sierra - sha256 "a5cb6ea4fab2d0ce67342f482fd0efb4dcc20483722e56ae120880d2a97ebab0" => :el_capitan - sha256 "c1420a59ceba43481eac2b2046a7d3c4aac967a12ff52bccb3b4697eca8d5c8f" => :yosemite - sha256 "4e8157c27f8ab0d5ad2c9673a86357f38acfabea1ac4eef80c54e8141dfdb336" => :mavericks - sha256 "ce1edbcc0ec3f7db2208e39a09183d7dcfa21d50250393f5ad5c83204ab7b3ed" => :mountain_lion - end - - def install - # The bootstrap smake does not like -j - ENV.deparallelize - # Xcode 9 miscompiles smake if optimization is enabled - # https://sourceforge.net/p/schilytools/tickets/2/ - ENV.O1 if DevelopmentTools.clang_build_version >= 900 - - system "make", "GMAKE_NOWARN=true", "INS_BASE=#{libexec}", "INS_RBASE=#{libexec}", "install" - bin.install_symlink libexec/"bin/smake" - man1.install_symlink Dir["#{libexec}/share/man/man1/*.1"] - man5.install_symlink Dir["#{libexec}/share/man/man5/*.5"] - end - - test do - system "#{bin}/smake", "-version" - end -end diff --git a/Formula/smali.rb b/Formula/smali.rb deleted file mode 100644 index 660310c92dbc5..0000000000000 --- a/Formula/smali.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Smali < Formula - desc "Assembler/disassembler for Android's Java VM implementation" - homepage "https://github.com/JesusFreke/smali" - url "https://bitbucket.org/JesusFreke/smali/downloads/smali-2.2.5.jar" - sha256 "7bd1677594b917f6c538b7ac7e8958294a94ec95e99efecda5aee935060138b6" - - bottle :unneeded - - resource "baksmali-jar" do - url "https://bitbucket.org/JesusFreke/smali/downloads/baksmali-2.2.5.jar" - sha256 "e12c5c9c140ee63487037ad8dc6d5ebd43c0185e1a56524f554d0a845240ec06" - end - - resource "baksmali" do - url "https://bitbucket.org/JesusFreke/smali/downloads/baksmali" - sha256 "5d4b79776d401f2cbdb66c7c88e23cca773b9a939520fef4bf42e2856bbbfed4" - end - - resource "smali" do - url "https://bitbucket.org/JesusFreke/smali/downloads/smali" - sha256 "910297fbeefb4590e6bffd185726c878382a0960fb6a7f0733f045b6faf60a30" - end - - def install - resource("baksmali-jar").stage do - libexec.install "baksmali-#{version}.jar" => "baksmali.jar" - end - - libexec.install "smali-#{version}.jar" => "smali.jar" - - %w[smali baksmali].each do |r| - libexec.install resource(r) - inreplace libexec/r, /^libdir=.*$/, "libdir=\"#{libexec}\"" - chmod 0755, libexec/r - bin.install_symlink libexec/r - end - end - - test do - # From examples/HelloWorld/HelloWorld.smali in Smali project repo. - # See https://bitbucket.org/JesusFreke/smali/src/2d8cbfe6bc2d8ff2fcd7a0bf432cc808d842da4a/examples/HelloWorld/HelloWorld.smali?at=master - (testpath/"input.smali").write <<~EOS - .class public LHelloWorld; - .super Ljava/lang/Object; - - .method public static main([Ljava/lang/String;)V - .registers 2 - sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream; - const-string v1, "Hello World!" - invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V - return-void - .end method - EOS - - system bin/"smali", "assemble", "-o", "classes.dex", "input.smali" - system bin/"baksmali", "disassemble", "-o", pwd, "classes.dex" - assert_match "Hello World!", File.read("HelloWorld.smali") - end -end diff --git a/Formula/smartmontools.rb b/Formula/smartmontools.rb deleted file mode 100644 index ef15519af6f6f..0000000000000 --- a/Formula/smartmontools.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Smartmontools < Formula - desc "SMART hard drive monitoring" - homepage "https://www.smartmontools.org/" - url "https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.0/smartmontools-7.0.tar.gz" - sha256 "e5e1ac2786bc87fdbd6f92d0ee751b799fbb3e1a09c0a6a379f9eb64b3e8f61c" - - bottle do - sha256 "eeb9c234d61a85547f6e5f169966f5afd5cb5c31a9f17d758910bdd855d711c4" => :mojave - sha256 "e77726b986b056d7b58112e965c399861d41a568193c45b9862d7ef5f04ed479" => :high_sierra - sha256 "74c52c197fbfef3715fe6ed1dc787756cb7185932958005f738c2ce142579a48" => :sierra - end - - def install - (var/"run").mkpath - (var/"lib/smartmontools").mkpath - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sbindir=#{bin}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}", - "--with-savestates", - "--with-attributelog" - system "make", "install" - end - - test do - system "#{bin}/smartctl", "--version" - system "#{bin}/smartd", "--version" - end -end diff --git a/Formula/smartypants.rb b/Formula/smartypants.rb deleted file mode 100644 index b38257a217126..0000000000000 --- a/Formula/smartypants.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Smartypants < Formula - desc "Typography prettifier" - homepage "https://daringfireball.net/projects/smartypants/" - url "https://daringfireball.net/projects/downloads/SmartyPants_1.5.1.zip" - sha256 "2813a12d8dd23f091399195edd7965e130103e439e2a14f298b75b253616d531" - - bottle :unneeded - - def install - bin.install "SmartyPants.pl" => "smartypants" - end - - test do - assert_equal "“Give me a beer”, said Mike O’Connor", - pipe_output("#{bin}/smartypants", - %q("Give me a beer", said Mike O'Connor), 0) - end -end diff --git a/Formula/smimesign.rb b/Formula/smimesign.rb deleted file mode 100644 index d98f187f34a97..0000000000000 --- a/Formula/smimesign.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Smimesign < Formula - desc "S/MIME signing utility for use with Git" - homepage "https://github.com/github/smimesign" - url "https://github.com/github/smimesign/archive/0.0.10.tar.gz" - sha256 "c2036abba5f38b42acc40f311176a7af0bef7f9cc4f6c0454ba51d2335631db3" - - bottle do - cellar :any_skip_relocation - sha256 "da64d72469542b9f414f755030d0f7367d86239f74a80a67ab280f8e2e792c3a" => :mojave - sha256 "3651001471f346165ad493458c46629ff8ba7395a6610217941cdb4634c7b84b" => :high_sierra - sha256 "2e4c7a707f083376c7ea4e2e659576de4ffde7252327c882516671e35530e40b" => :sierra - end - - depends_on "go" => :build - depends_on :macos => :sierra - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/github/smimesign").install buildpath.children - - cd "src/github.com/github/smimesign" do - system "go", "build", "-o", bin/"smimesign", "-ldflags", "-X main.versionString=#{version}" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/smimesign --version") - system "#{bin}/smimesign", "--list-keys" - assert_match "could not find identity matching specified user-id: bad@identity", shell_output("#{bin}/smimesign -su bad@identity 2>&1", 1) - end -end diff --git a/Formula/smlnj.rb b/Formula/smlnj.rb deleted file mode 100644 index 6e0cb10067566..0000000000000 --- a/Formula/smlnj.rb +++ /dev/null @@ -1,190 +0,0 @@ -class Smlnj < Formula - desc "Standard ML of New Jersey" - homepage "https://www.smlnj.org/" - url "http://smlnj.cs.uchicago.edu/dist/working/110.84/config.tgz" - sha256 "1810d3ca768222e120c7a3f2f93aafd652705371fc73929423c671dce3cef832" - - bottle do - sha256 "d4441907f2dea02188487b3247e402d70b867a6bdd0e84da0cf5e8d7a0d44540" => :sierra - end - - # Mojave doesn't support 32-bit builds, and thus smlnj fails to compile. - # This will only be safe to remove when upstream support 64-bit builds. - depends_on :maximum_macos => [:high_sierra, :build] - - resource "cm" do - url "https://www.smlnj.org/dist/working/110.84/cm.tgz" - sha256 "7055c60481a887f27a5135ac1f33233565b99a7c99c4aa73e023e28e629b0663" - end - - resource "compiler" do - url "https://www.smlnj.org/dist/working/110.84/compiler.tgz" - sha256 "6d23aff2e75727bf6969b05a070128f187e06f60408aabf6a71e0475326fee87" - end - - resource "runtime" do - url "https://www.smlnj.org/dist/working/110.84/runtime.tgz" - sha256 "5fcf4bbdeaddb247f69a333d2295f5f5c0be55b1f86ff4fbffb63f0021d84d6c" - end - - resource "system" do - url "https://www.smlnj.org/dist/working/110.84/system.tgz" - sha256 "f46b1de790000a98f4aa9830325d39cb1e4867338d4db6b8a102084db1512218" - end - - resource "bootstrap" do - url "https://www.smlnj.org/dist/working/110.84/boot.x86-unix.tgz" - sha256 "a29e3b0ca623da197e9c18ea64db4c2a08fe5e6add85c0d053c4ecfa653ace82" - end - - resource "mlrisc" do - url "https://www.smlnj.org/dist/working/110.84/MLRISC.tgz" - sha256 "da3c5236018fa7608863c2fe1f3c57b60013df98b5a249fb3d4edc738cdfd072" - end - - resource "lib" do - url "https://www.smlnj.org/dist/working/110.84/smlnj-lib.tgz" - sha256 "3356924655277416d8a491c1d601a0f567ab3d15cb17e243620e85cb28f0e9dd" - end - - resource "ckit" do - url "https://www.smlnj.org/dist/working/110.84/ckit.tgz" - sha256 "7e2534e393d2372cad8ff9ddd306881db91bbbcc2b0e0538e76868c86c658c36" - end - - resource "nlffi" do - url "https://www.smlnj.org/dist/working/110.84/nlffi.tgz" - sha256 "8b96a82a3d63b000b70a1b982aab9750ce9caa77f316f6a923969e86b0133f31" - end - - resource "cml" do - url "https://www.smlnj.org/dist/working/110.84/cml.tgz" - sha256 "556110c746db863211ac8a97e1bf097b0e5d45dfea4b3e8194b6c389ac2b569a" - end - - resource "exene" do - url "https://www.smlnj.org/dist/working/110.84/eXene.tgz" - sha256 "3fe1c6a1a334e7d7359fbcfd053066c88cb7705a90975b60fff946554aa0019c" - end - - resource "ml-lpt" do - url "https://www.smlnj.org/dist/working/110.84/ml-lpt.tgz" - sha256 "2f60e1467a69fd4fb5501354244337926bc2a65225dde328f6aa3883b14fb3a5" - end - - resource "ml-lex" do - url "https://www.smlnj.org/dist/working/110.84/ml-lex.tgz" - sha256 "cc7e045aa9667f1eed055db1defca0e830eed34c08f3dfdf37f698964fe04070" - end - - resource "ml-yacc" do - url "https://www.smlnj.org/dist/working/110.84/ml-yacc.tgz" - sha256 "cfebaeb5f08810fcc93c49bf171834b7bf14b5f7e76d206e0afa35e18887bdb9" - end - - resource "ml-burg" do - url "https://www.smlnj.org/dist/working/110.84/ml-burg.tgz" - sha256 "62ea37b13788078e3ea77d3b870da42788153c348009f827f2c0b05cfc07d918" - end - - resource "pgraph" do - url "https://www.smlnj.org/dist/working/110.84/pgraph.tgz" - sha256 "aa2f14de13a540dbc370b45757156c0b03516a5b8f97b5759292841d7b7ac1cb" - end - - resource "trace-debug-profile" do - url "https://www.smlnj.org/dist/working/110.84/trace-debug-profile.tgz" - sha256 "ecc54281b8654c75f8b9d4ebdf1ff67de71ef31297cf1b14115cd75645e46a5a" - end - - resource "heap2asm" do - url "https://www.smlnj.org/dist/working/110.84/heap2asm.tgz" - sha256 "3d33c52b650536762d47534f07709e749cc821ce515aef2fb9a746db11433e95" - end - - resource "c" do - url "https://www.smlnj.org/dist/working/110.84/smlnj-c.tgz" - sha256 "145a513becb4c98991af7eae81ae19b8fff336458f1f011eafdc283cb76deee9" - end - - def install - ENV.deparallelize - ENV.m32 # does not build 64-bit - - # Build in place - root = prefix/"SMLNJ_HOME" - root.mkpath - cp_r buildpath, root/"config" - - # Rewrite targets list (default would be too minimalistic) - rm root/"config/targets" - (root/"config/targets").write targets - - # Download and extract all the sources for the base system - %w[cm compiler runtime system].each do |name| - resource(name).stage { cp_r pwd, root/"base" } - end - - # Download the remaining packages that go directly into the root - %w[ - bootstrap mlrisc lib ckit nlffi - cml exene ml-lpt ml-lex ml-yacc ml-burg pgraph - trace-debug-profile heap2asm c - ].each do |name| - resource(name).stage { cp_r pwd, root } - end - - inreplace root/"base/runtime/objs/mk.x86-darwin", "/usr/bin/as", "as" - - # Orrrr, don't mess with our PATH. Superenv carefully sets that up. - inreplace root/"base/runtime/config/gen-posix-names.sh" do |s| - s.gsub! "PATH=/bin:/usr/bin", "# do not hardcode the path" - s.gsub! "/usr/include", "#{MacOS.sdk_path}/usr/include" unless MacOS::CLT.installed? - end - - # Make the configure program recognize macOS 10.13. Reported upstream: - # https://smlnj-gforge.cs.uchicago.edu/tracker/index.php?func=detail&aid=187&group_id=33&atid=215 - inreplace root/"config/_arch-n-opsys", "16*) OPSYS=darwin", "1*) OPSYS=darwin" - - cd root do - system "config/install.sh" - end - - %w[ - sml heap2asm heap2exec ml-antlr - ml-build ml-burg ml-lex ml-makedepend - ml-nlffigen ml-ulex ml-yacc - ].each { |e| bin.install_symlink root/"bin/#{e}" } - end - - def targets - <<~EOS - request ml-ulex - request ml-ulex-mllex-tool - request ml-lex - request ml-lex-lex-ext - request ml-yacc - request ml-yacc-grm-ext - request ml-antlr - request ml-lpt-lib - request ml-burg - request smlnj-lib - request tdp-util - request cml - request cml-lib - request mlrisc - request ml-nlffigen - request ml-nlffi-lib - request mlrisc-tools - request eXene - request pgraph-util - request ckit - request heap2asm - EOS - end - - test do - system bin/"ml-nlffigen" - assert_predicate testpath/"NLFFI-Generated/nlffi-generated.cm", :exist? - end -end diff --git a/Formula/smpeg.rb b/Formula/smpeg.rb deleted file mode 100644 index df91669609d1a..0000000000000 --- a/Formula/smpeg.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Smpeg < Formula - desc "SDL MPEG Player Library" - homepage "https://icculus.org/smpeg/" - url "svn://svn.icculus.org/smpeg/tags/release_0_4_5/", :revision => "399" - - bottle do - cellar :any - rebuild 1 - sha256 "6e826bd49ceb171cc36877c0498d8ccfc3c614f39b684728e0c307b69942d58c" => :mojave - sha256 "2779c8aba2aed376076e53fc9e2e694e8b5fabca0096ae91eed786b73ef3704f" => :high_sierra - sha256 "9ac1a1c83a9861b8762ab711d709e67bf020204fb1c1b5907b244d83ced4ab2c" => :sierra - sha256 "a4bf36f39959150e1f0cd83c8f58761ce59acdee50f591a1f695665b7517728a" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "sdl" - - def install - args = %W[ - --prefix=#{prefix} - --with-sdl-prefix=#{Formula["sdl"].opt_prefix} - --disable-dependency-tracking - --disable-debug - --disable-gtk-player - --disable-gtktest - --disable-opengl-player - --disable-sdltest - ] - - system "./autogen.sh" - system "./configure", *args - system "make" - # Install script is not +x by default for some reason - chmod 0755, "./install-sh" - system "make", "install" - - # Not present since we do not build with gtk+ - rm_f "#{man1}/gtv.1" - end - - test do - system "#{bin}/plaympeg", "--version" - end -end diff --git a/Formula/smpeg2.rb b/Formula/smpeg2.rb deleted file mode 100644 index 18f124e24e0a5..0000000000000 --- a/Formula/smpeg2.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Smpeg2 < Formula - desc "SDL MPEG Player Library" - homepage "https://icculus.org/smpeg/" - url "svn://svn.icculus.org/smpeg/tags/release_2_0_0/", :revision => "408" - head "svn://svn.icculus.org/smpeg/trunk" - - bottle do - cellar :any - sha256 "4ecef89d7ee22d5d23703a5ac29fb6b4fc0cd025e249219a194ca325d79dfa85" => :mojave - sha256 "927cb1d5dd58481afd16e893868a0794b42d56588e7fe9d51b881812e2f26eb6" => :high_sierra - sha256 "05ea6a84c6ff07c3c88e89f0ecd153c5cd92866d3edb8cc4b4dfd06f445971b7" => :sierra - sha256 "52aba7403eee04f66c9184a741354b747dfcd0994fa3bd7de9058b65a30fcf19" => :el_capitan - sha256 "6031bf704fd0508bb90322dbe77f62580708e3fe77362e3dea6b0691360b686b" => :yosemite - sha256 "fa5760a0f8ff18f596b0044a0da7562a361904f2520a7406c3681ace8a705950" => :mavericks - sha256 "fe631e594d91ffa786d7023d7eb2b8b8a25d747a2e227458da26aaf9b935dfc8" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "sdl2" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--with-sdl-prefix=#{Formula["sdl2"].opt_prefix}", - "--disable-dependency-tracking", - "--disable-debug", - "--disable-sdltest" - system "make" - system "make", "install" - - # To avoid a possible conflict with smpeg 0.x - mv "#{bin}/plaympeg", "#{bin}/plaympeg2" - mv "#{man1}/plaympeg.1", "#{man1}/plaympeg2.1" - end - - test do - system "#{bin}/plaympeg2", "--version" - end -end diff --git a/Formula/snag.rb b/Formula/snag.rb deleted file mode 100644 index af023de70ad09..0000000000000 --- a/Formula/snag.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Snag < Formula - desc "Automatic build tool for all your needs" - homepage "https://github.com/Tonkpils/snag" - url "https://github.com/Tonkpils/snag/archive/v1.2.0.tar.gz" - sha256 "37bf661436edf4526adf5428ac5ff948871c613ff4f9b61fbbdfe1fb95f58b37" - head "https://github.com/Tonkpils/snag.git" - - bottle do - cellar :any_skip_relocation - sha256 "3821de3f4b916afd116f9f55c549f1bdec7b2c448994e784baf23eef96d65520" => :mojave - sha256 "ae031acea4e10639f15a1598bf99e45eb8bed08222e31db9e1152a4a1de0dc14" => :high_sierra - sha256 "692ce892c40f38cb39e77b464efa531b27004a9bbaf0096fb5876b570086cf82" => :sierra - sha256 "18a6d589a0b416ee502a8dacd6f919959d25cc08d9bbaad152fdade4c72634dc" => :el_capitan - sha256 "00edba081c3a56f6cda3a4fc5bb1125d8ce93a8239c3cae89346b1893df12025" => :yosemite - sha256 "df63529c6ec2ff4f38f0fb7900687b9362ce710a13013d4bac4bb9cdea5190da" => :mavericks - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - (buildpath/"src/github.com/Tonkpils/").mkpath - ln_s buildpath, buildpath/"src/github.com/Tonkpils/snag" - - system "go", "build", "-o", bin/"snag", "./src/github.com/Tonkpils/snag" - end - - test do - (testpath/".snag.yml").write <<~EOS - build: - - touch #{testpath}/snagged - verbose: true - EOS - begin - pid = fork do - exec bin/"snag" - end - sleep 0.5 - ensure - Process.kill "TERM", pid - Process.wait pid - end - assert_predicate testpath/"snagged", :exist? - end -end diff --git a/Formula/snakemake.rb b/Formula/snakemake.rb deleted file mode 100644 index 95ba89451b1a3..0000000000000 --- a/Formula/snakemake.rb +++ /dev/null @@ -1,130 +0,0 @@ -class Snakemake < Formula - desc "Pythonic workflow system" - homepage "https://snakemake.readthedocs.io/" - url "https://files.pythonhosted.org/packages/5a/a5/704ff1f58a121acf8b96f13a9b0abdbbb27a1a78cf52c676bd0bbd2c5f40/snakemake-5.2.2.tar.gz" - sha256 "adffe7e24b4a613a9e8bf0a2a320b3cea236d86afb9132bb0bbbc08b8e35a3a3" - head "https://bitbucket.org/snakemake/snakemake.git" - - bottle do - cellar :any_skip_relocation - sha256 "a534e048f08709c3dc1a0e4b4469acb2c180c8d26f8656901b0054bd5d4c371c" => :mojave - sha256 "eb9e3e7ff32688eea43f615c0938d24d6ca403f9af7f87721f80621fdee5a693" => :high_sierra - sha256 "ca80f328a2539740627e14ebdd6cc47c42ab2f62bb651a966e77fdbcd1ee5eff" => :sierra - sha256 "208698739662d1f1a8285ddec094f4779be4a12dba4808f664b23ac2e50e5511" => :el_capitan - end - - depends_on "python" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/d2/12/8ef44cede251b93322e8503fd6e1b25a0249fa498bebec191a5a06adbe51/Cython-0.28.4.tar.gz" - sha256 "76ac2b08d3d956d77b574bb43cbf1d37bd58b9d50c04ba281303e695854ebc46" - end - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d/certifi-2018.4.16.tar.gz" - sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "ConfigArgParse" do - url "https://files.pythonhosted.org/packages/77/61/ae928ce6ab85d4479ea198488cf5ffa371bd4ece2030c0ee85ff668deac5/ConfigArgParse-0.13.0.tar.gz" - sha256 "e6441aa58e23d3d122055808e5e2220fd742dff6e1e51082d2a4e4ed145dd788" - end - - resource "datrie" do - url "https://files.pythonhosted.org/packages/44/5f/bf7e4711f6aa95edb2216b3487eeac719645802259643d341668e65636db/datrie-0.7.1.tar.gz" - sha256 "7a11371cc2dbbad71d6dfef57ced6e8b384bb377eeb847c63d58f8dc8e8b2023" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz" - sha256 "6ff5f3180870836cae40f06fa10419f557208175f13ad7bc26caa77beb1f6e02" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "ratelimiter" do - url "https://files.pythonhosted.org/packages/5b/e0/b36010bddcf91444ff51179c076e4a09c513674a56758d7cfea4f6520e29/ratelimiter-1.2.0.post0.tar.gz" - sha256 "5c395dcabdbbde2e5178ef3f89b568a3066454a6ddc223b76473dac22f89b4f7" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/a0/47/66897906448185fcb77fc3c2b1bc20ed0ecca81a0f2f88eda3fc5a34fc3d/wrapt-1.10.11.tar.gz" - sha256 "d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6" - end - - def install - xy = Language::Python.major_minor_version "python3" - - ENV.prepend_create_path "PYTHONPATH", buildpath/"cython/lib/python#{xy}/site-packages" - - resource("Cython").stage do - system "python3", *Language::Python.setup_install_args(buildpath/"cython") - end - - ENV.prepend_path "PATH", buildpath/"cython/bin" - - resource("datrie").stage do - system "./update_c.sh" - ENV.delete "PYTHONPATH" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - resources.each do |r| - next if r.name == "datrie" || r.name == "Cython" - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - (testpath/"Snakefile").write <<~EOS - rule testme: - output: - "test.out" - shell: - "touch {output}" - EOS - system "#{bin}/snakemake" - end -end diff --git a/Formula/snap-telemetry.rb b/Formula/snap-telemetry.rb deleted file mode 100644 index f2749ca24e78e..0000000000000 --- a/Formula/snap-telemetry.rb +++ /dev/null @@ -1,57 +0,0 @@ -class SnapTelemetry < Formula - desc "Snap is an opensource telemetry framework" - homepage "https://snap-telemetry.io/" - url "https://github.com/intelsdi-x/snap/archive/2.0.0.tar.gz" - sha256 "35f6ddcffcff27677309abb6eb4065b9fe029a266c3f7ff77103bf822ff315ab" - head "https://github.com/intelsdi-x/snap.git" - - bottle do - cellar :any_skip_relocation - sha256 "1cd9b411854596b3afe7afa22ed9041d31e21a860739246a5eeb47e03a6844e8" => :mojave - sha256 "066cf3014caa27b6c3327f983cbe632cb85476c0731ec3fda40e85205c1a5f71" => :high_sierra - sha256 "1ff53b8b2f1827e2a607d81dd3db246eb1388dfd1aa7110dcf59a8e4ba606d17" => :sierra - sha256 "50ce1be7d6e83f309d8fd62bf2b36cb03c29b726d575abfbeef895b3f628fb46" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["CGO_ENABLED"] = "0" - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - - snapteld = buildpath/"src/github.com/intelsdi-x/snap" - snapteld.install buildpath.children - - cd snapteld do - system "glide", "install" - system "go", "build", "-o", "snapteld", "-ldflags", "-w -X main.gitversion=#{version}" - sbin.install "snapteld" - prefix.install_metafiles - end - - snaptel = buildpath/"src/github.com/intelsdi-x/snap/cmd/snaptel" - cd snaptel do - system "go", "build", "-o", "snaptel", "-ldflags", "-w -X main.gitversion=#{version}" - bin.install "snaptel" - end - end - - test do - assert_match version.to_s, shell_output("#{sbin}/snapteld --version") - assert_match version.to_s, shell_output("#{bin}/snaptel --version") - - begin - snapteld_pid = fork do - exec "#{sbin}/snapteld -t 0 -l 1 -o #{testpath}" - end - sleep 5 - assert_match("No plugins", shell_output("#{bin}/snaptel plugin list")) - assert_match("No task", shell_output("#{bin}/snaptel task list")) - assert_predicate testpath/"snapteld.log", :exist? - ensure - Process.kill("TERM", snapteld_pid) - end - end -end diff --git a/Formula/snap7.rb b/Formula/snap7.rb deleted file mode 100644 index ce4118810f182..0000000000000 --- a/Formula/snap7.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Snap7 < Formula - desc "Ethernet communication suite that works natively with Siemens S7 PLCs" - homepage "https://snap7.sourceforge.io/" - url "https://downloads.sourceforge.net/project/snap7/1.4.2/snap7-full-1.4.2.7z" - sha256 "1f4270cde8684957770a10a1d311c226e670d9589c69841a9012e818f7b9f80e" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "71aff7cbb3e78369d6b9a93887820dd7def1afe382ed82211be313942e1bb81d" => :mojave - sha256 "b0d670ce6a2d780d13cfaa3346c6aa701f280a85be010dc42c802d6ebd028694" => :high_sierra - sha256 "e04dea88411f3b444dcab340d3f11bd739fb853de65701e727546a9481981924" => :sierra - end - - def install - lib.mkpath - system "make", "-C", "build/osx", - "-f", "#{MacOS.preferred_arch}_osx.mk", - "install", "LibInstall=#{lib}" - include.install "release/Wrappers/c-cpp/snap7.h" - end - - test do - system "python", "-c", "import ctypes.util,sys;ctypes.util.find_library('snap7') or sys.exit(1)" - end -end diff --git a/Formula/snapcraft.rb b/Formula/snapcraft.rb deleted file mode 100644 index 77a1d139be3db..0000000000000 --- a/Formula/snapcraft.rb +++ /dev/null @@ -1,178 +0,0 @@ -class Snapcraft < Formula - include Language::Python::Virtualenv - - desc "Package any app for every Linux desktop, server, cloud or device" - homepage "https://snapcraft.io/" - url "https://files.pythonhosted.org/packages/fc/c6/d3a59d1f08c0b8bc3d166bc6e0a26a29dd61627d2e6266bd81b26fc02142/snapcraft-3.0.1.tar.gz" - sha256 "c9914324749502dff5588f72a93ee05d47b14f2bd400d6234a4e2db22fd6922c" - - bottle do - cellar :any - sha256 "6b767bebc6a392621605477f6c6f0ef8ea8e264a4a7f3e53893c0eb9ded66a8b" => :mojave - sha256 "77a9f5b2fd096c878cf6e2d9de1e26cbc98603014c41640c491f48a68ca0eed0" => :high_sierra - sha256 "082b37eb35d4e2a00836150d1324df9eb1a55d2729febb51417bfde9352cbfe9" => :sierra - end - - depends_on "libsodium" - depends_on "libyaml" - depends_on "lxc" - depends_on "python" - depends_on "squashfs" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/15/d4/2f888fc463d516ff7bf2379a4e9a552fef7f22a94147655d9b1097108248/certifi-2018.1.18.tar.gz" - sha256 "edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/10/f7/3b302ff34045f25065091d40e074479d6893882faef135c96f181a57ed06/cffi-1.11.4.tar.gz" - sha256 "df9083a992b17a28cd4251a3f5c879e0198bb26c9e808c4647e0a18739f1d11d" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz" - sha256 "5308b47021bc2340965c371f0f058cc6971a04502638d4244225c49d80db273a" - end - - resource "cookies" do - url "https://files.pythonhosted.org/packages/f3/95/b66a0ca09c5ec9509d8729e0510e4b078d2451c5e33f47bd6fc33c01517c/cookies-2.2.1.tar.gz" - sha256 "d6b698788cae4cfa4e62ef8643a9ca332b79bd96cb314294b864ae8d7eb3ee8e" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz" - sha256 "6ff5f3180870836cae40f06fa10419f557208175f13ad7bc26caa77beb1f6e02" - end - - resource "libnacl" do - url "https://files.pythonhosted.org/packages/ef/4a/5756e25deb82b690982547f8ed61fbc1008e6931b49f8f3a0b6ad8866b10/libnacl-1.5.2.tar.gz" - sha256 "c58390b0d191db948fc9ab681f07fdfce2a573cd012356bada47d56795d00ee2" - end - - resource "petname" do - url "https://files.pythonhosted.org/packages/b8/6c/3b5c55a6632771b6a3ffc46ebb1d01bd7d2ca7ce3b44ebfd3c6ceeb9a6f6/petname-2.2.tar.gz" - sha256 "be1da50a6aa01e39840e9a4b79b527a333b256733cb681f52669c08df7819ace" - end - - resource "progressbar33" do - url "https://files.pythonhosted.org/packages/71/fc/7c8e01f41a6e671d7b11be470eeb3d15339c75ce5559935f3f55890eec6b/progressbar33-2.4.tar.gz" - sha256 "51fe0d9b3b4023db2f983eeccdfc8c9846b84db8443b9bee002c7f58f4376eff" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pyelftools" do - url "https://files.pythonhosted.org/packages/ba/78/d4a186a2e38731286c99dc3e3ca8123b6f55cf2e28608e8daf2d84b65494/pyelftools-0.24.tar.gz" - sha256 "e9dd97d685a5b96b88a988dabadb88e5a539b64cd7d7927fac9a7368dc4c459c" - end - - resource "pymacaroons" do - url "https://files.pythonhosted.org/packages/38/a8/f98dfe2aca2301e8b8899166554bde1437c7110579c372581e1225ab0c81/pymacaroons-0.12.0.tar.gz" - sha256 "e5fd325cfa845c88f3cb8b5c07a5363e7032fa5cbdb7b48ae0b50445c32167bf" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b261f/PyNaCl-1.2.1.tar.gz" - sha256 "e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9" - end - - resource "pysha3" do - url "https://files.pythonhosted.org/packages/73/bf/978d424ac6c9076d73b8fdc8ab8ad46f98af0c34669d736b1d83c758afee/pysha3-1.0.2.tar.gz" - sha256 "fe988e73f2ce6d947220624f04d467faf05f1bbdbc64b0a201296bb3af92739e" - end - - resource "python-debian" do - url "https://files.pythonhosted.org/packages/54/bf/d59ca16512ee6d740f2272ec8eeab47517bef3043eefbfe47391493cb567/python-debian-0.1.31.tar.gz" - sha256 "21465ccb8a4cb2942f15e74b6c9b92caff5188365e22ab4a0dcc778b90f28479" - end - - resource "pymacaroons-pynacl" do - url "https://github.com/matrix-org/pymacaroons/archive/v0.9.3.tar.gz" - sha256 "871399c4dc1dfab7a435df2d5f2954cbba51d275ca2e93a96abb8b35d348fe5a" - end - - resource "pyxdg" do - url "https://files.pythonhosted.org/packages/26/28/ee953bd2c030ae5a9e9a0ff68e5912bd90ee50ae766871151cd2572ca570/pyxdg-0.25.tar.gz" - sha256 "81e883e0b9517d624e8b0499eb267b82a815c0b7146d5269f364988ae031279d" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "raven" do - url "https://files.pythonhosted.org/packages/d7/54/7d199f893a0ac01f8df9b7ec39c0f3ac19146e78b33401b1f4984c9d3583/raven-6.7.0.tar.gz" - sha256 "f908e9b39f02580e7f822030d119ed3b2e8d32300a2fec6373e5827d588bbae7" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/86/f9/e80fa23edca6c554f1994040064760c12b51daff54b55f9e379e899cd3d4/requests-toolbelt-0.8.0.tar.gz" - sha256 "f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5" - end - - resource "requests-unixsocket" do - url "https://files.pythonhosted.org/packages/f3/94/67d781fb32afbee0fffa0ad9e16ad0491f1a9c303e14790ae4e18f11be19/requests-unixsocket-0.1.5.tar.gz" - sha256 "a91bc0138f61fb3396de6358fa81e2cd069a150ade5111f869df01d8bc9d294c" - end - - resource "responses" do - url "https://files.pythonhosted.org/packages/2e/18/20a4a96365d42f02363ec0062b70ff93f7b6639e569fd0cb174209d59a3a/responses-0.8.1.tar.gz" - sha256 "a64029dbc6bed7133e2c971ee52153f30e779434ad55a5abf40322bcff91d029" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/0d/3f/3a16847fe5c010110a8f54dd8fe7b091b4e22922def374fe1cce9c1cb7e9/simplejson-3.13.2.tar.gz" - sha256 "4c4ecf20e054716cc1e5a81cadc44d3f4027108d8dd0861d8b1e3bd7a32d4f0a" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz" - sha256 "e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"]="en_US.UTF-8" - system "#{bin}/snapcraft", "--version" - system "#{bin}/snapcraft", "--help" - system "#{bin}/snapcraft", "init" - assert_predicate testpath/"snap/snapcraft.yaml", :exist? - end -end diff --git a/Formula/snappy.rb b/Formula/snappy.rb deleted file mode 100644 index ba51dd2610c9a..0000000000000 --- a/Formula/snappy.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Snappy < Formula - desc "Compression/decompression library aiming for high speed" - homepage "https://google.github.io/snappy/" - url "https://github.com/google/snappy/archive/1.1.7.tar.gz" - sha256 "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4" - revision 1 - head "https://github.com/google/snappy.git" - - bottle do - cellar :any - sha256 "8b94b2d804b6d86c76d60f65856964f6dfbe14c8dad56782919273667401bc08" => :mojave - sha256 "162c90af81dcc8378f642b0b9905c78271ea6a5837199fc671e8948749db41f7" => :high_sierra - sha256 "39554f2f199def29cfce83c64e220635cac7d3481bf42fba20ba935c674d0dc4" => :sierra - sha256 "90c4778393606a51788e68dcd7046831a71cc2c95698fe261780e649ac3ce26c" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - # Upstream PR from 20 Dec 2017 "Fix broken version API" - patch do - url "https://github.com/google/snappy/pull/61.patch?full_index=1" - sha256 "131404e4da2440c83115308f58c91b4a29f4ae93bf841284e0877135d122d7e2" - end - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - system "make", "clean" - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - using namespace std; - using namespace snappy; - - int main() - { - string source = "Hello World!"; - string compressed, decompressed; - Compress(source.data(), source.size(), &compressed); - Uncompress(compressed.data(), compressed.size(), &decompressed); - assert(source == decompressed); - return 0; - } - EOS - - system ENV.cxx, "test.cpp", "-L#{lib}", "-lsnappy", "-o", "test" - system "./test" - end -end diff --git a/Formula/snappystream.rb b/Formula/snappystream.rb deleted file mode 100644 index 87bd770d279ed..0000000000000 --- a/Formula/snappystream.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Snappystream < Formula - desc "C++ snappy stream realization (compatible with snappy)" - homepage "https://github.com/hoxnox/snappystream" - url "https://github.com/hoxnox/snappystream/archive/1.0.0.tar.gz" - sha256 "a50a1765eac1999bf42d0afd46d8704e8c4040b6e6c05dcfdffae6dcd5c6c6b8" - head "https://github.com/hoxnox/snappystream.git" - - bottle do - cellar :any_skip_relocation - sha256 "3b4546ed797d251364320b9da77640c4980e913bb08b3376b7394a65833d8aa4" => :mojave - sha256 "75b9c1672f271ec42ca15cb6fa9b327bc3f081a2497804142961633a0ca57884" => :high_sierra - sha256 "0993bdf488fd8a1d59de3b5ecf3080d7ff4a6dee895dd801aff3687c5809d0ae" => :sierra - end - - depends_on "cmake" => :build - depends_on "snappy" - - def install - system "cmake", ".", *std_cmake_args, "-DBUILD_TESTS=ON" - system "make", "all", "test", "install" - end - - test do - (testpath/"test.cxx").write <<~EOS - #include - #include - #include - #include - #include - - int main() - { - { std::ofstream ofile("snappy-file.dat"); - snappy::oSnappyStream osnstrm(ofile); - std::cin >> std::noskipws; - std::copy(std::istream_iterator(std::cin), std::istream_iterator(), std::ostream_iterator(osnstrm)); - } - { std::ifstream ifile("snappy-file.dat"); - snappy::iSnappyStream isnstrm(ifile); - isnstrm >> std::noskipws; - std::copy(std::istream_iterator(isnstrm), std::istream_iterator(), std::ostream_iterator(std::cout)); - } - } - EOS - system ENV.cxx, "test.cxx", "-o", "test", - "-L#{Formula["snappy"].opt_lib}", "-lsnappy", - "-L#{lib}", "-lsnappystream" - system "./test < #{__FILE__} > out.dat && diff #{__FILE__} out.dat" - end -end diff --git a/Formula/snapraid.rb b/Formula/snapraid.rb deleted file mode 100644 index b1d71b511010a..0000000000000 --- a/Formula/snapraid.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Snapraid < Formula - desc "Backup program for disk arrays" - homepage "https://snapraid.sourceforge.io/" - url "https://github.com/amadvance/snapraid/releases/download/v11.3/snapraid-11.3.tar.gz" - sha256 "d35ad92157936db3411e2cf7325665fc59e2d159204f9424895cfa9f33122af1" - - bottle do - sha256 "48610c70ee6cfa3ceb3724e19b0d6ca3f88bd552a57aa4a1b15b4c5da4170e7a" => :mojave - sha256 "a37ca63751fbe401c7239e4adff594d051e4eb9ceb11c4db594a927fc652e680" => :high_sierra - sha256 "e2ffd2c3da613bed66b2a14d682c90703b561b19101ff7f4dbf2864d2107e995" => :sierra - end - - head do - url "https://github.com/amadvance/snapraid.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/snapraid --version") - end -end diff --git a/Formula/sng.rb b/Formula/sng.rb deleted file mode 100644 index 099f2e5db9759..0000000000000 --- a/Formula/sng.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sng < Formula - desc "Enable lossless editing of PNGs via a textual representation" - homepage "https://sng.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sng/sng-1.1.0.tar.gz" - sha256 "119c55870c1d1bdc65f7de9dbc62929ccb0c301c2fb79f77df63f5d477f34619" - - bottle do - cellar :any - sha256 "f6968419ecf0848134eac6705e33c8fe0ea31696d0aa21a1a530af7767ff2865" => :mojave - sha256 "b708d5c925acb4986d3cb6af71a2fc25d9ca53b35c3cc7700332513858057786" => :high_sierra - sha256 "30d9ad9aac3d8aaa67ae524d41bcdfbd92232f053bb0d5ccb3961b811c5b39a3" => :sierra - end - - depends_on "libpng" - depends_on :x11 - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - cp test_fixtures("test.png"), "test.png" - system bin/"sng", "test.png" - assert_include File.read("test.sng"), "width: 8; height: 8; bitdepth: 8;" - end -end diff --git a/Formula/sngrep.rb b/Formula/sngrep.rb deleted file mode 100644 index 836530fdcf382..0000000000000 --- a/Formula/sngrep.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Sngrep < Formula - desc "Command-line tool for displaying SIP calls message flows" - homepage "https://github.com/irontec/sngrep" - url "https://github.com/irontec/sngrep/archive/v1.4.6.tar.gz" - sha256 "638d6557dc68db401b07d73b2e7f8276800281f021fe0c942992566d6b59a48a" - - bottle do - sha256 "3715ca732df699b3165f4410cc4939e7d13502204b76ae31e6d31acd29efcd91" => :mojave - sha256 "23e8dcccf8484a80a81090041559dd4c327d85e6e9ade7d15aa375e613741a4d" => :high_sierra - sha256 "30c2e61accbce75df643a13be8ac64dabf6cbe5a9edcb48d932dee339afbae19" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000 - depends_on "openssl" - - def install - system "./bootstrap.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - test do - system bin/"sngrep", "-NI", test_fixtures("test.pcap") - end -end diff --git a/Formula/snobol4.rb b/Formula/snobol4.rb deleted file mode 100644 index d55df463bcac4..0000000000000 --- a/Formula/snobol4.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Snobol4 < Formula - desc "String oriented and symbolic programming language" - homepage "http://www.snobol4.org/" - url "ftp://ftp.ultimate.com/snobol/snobol4-1.5.tar.gz" - mirror "https://src.fedoraproject.org/lookaside/pkgs/snobol/snobol4-1.5.tar.gz/54ac3ddd51fb34ec63b1eb0ae7b99794/snobol4-1.5.tar.gz" - sha256 "9f7ec649f2d700a30091af3bbd68db90b916d728200f915b1ba522bcfd0d7abd" - - bottle do - sha256 "836e69e4b55f8e061d3862b0f52b7c9800a224e4186bb2116f5d2121b4ed4f79" => :mojave - sha256 "9282b4f4887f0e031321314fcb4ed9af82b7f023c2c20f8cf7b7d278c098424b" => :high_sierra - sha256 "2c8d1b2a54a3a3f0d810c88bc0a2545dbea08f73b57dda6052c4de27bdde62ee" => :sierra - sha256 "f4ee5ba3a933998e7ea1493bab469f00f4ddd13a3e8458002ee43ba6f0cd0e74" => :el_capitan - sha256 "6903e1b05a795eae13f2f97fd2f1f4b883b03e1c94ba28e3747b3df98c6a955d" => :yosemite - sha256 "b76b9e5bbeccd4b879b2b3c450f3388b82f4641d4d414e0f2d83768eeb0c058b" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/snort.rb b/Formula/snort.rb deleted file mode 100644 index 5bba618e3cd44..0000000000000 --- a/Formula/snort.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Snort < Formula - desc "Flexible Network Intrusion Detection System" - homepage "https://www.snort.org" - url "https://www.snort.org/downloads/snort/snort-2.9.11.1.tar.gz" - sha256 "9f6b3aeac5a109f55504bd370564ac431cb1773507929dc461626898f33f46cd" - - bottle do - cellar :any - sha256 "7eb1bf8de87e1f55412cbc27e4b7e25d37819506481a036058d666ca2c62052e" => :mojave - sha256 "ac8a7b3007b307d8368da7e3879e3c6cd6c718746b9443d544f5e8adcb286be6" => :high_sierra - sha256 "b152a9869efd30d40e0d3750a0fd12f825360bf7c1d7cb39156320d32381a649" => :sierra - sha256 "00de9088a3e7471026430cf17a7cc7d3d9787496398662c2e2c6a7c766c212cd" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "daq" - depends_on "libdnet" - depends_on "luajit" - depends_on "openssl" - depends_on "pcre" - - def install - openssl = Formula["openssl"] - - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc}/snort - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --enable-active-response - --enable-flexresp3 - --enable-gre - --enable-mpls - --enable-normalizer - --enable-react - --enable-reload - --enable-sourcefire - --enable-targetbased - --with-openssl-includes=#{openssl.opt_include} - --with-openssl-libraries=#{openssl.opt_lib} - ] - - system "./configure", *args - system "make", "install" - - rm Dir[buildpath/"etc/Makefile*"] - (etc/"snort").install Dir[buildpath/"etc/*"] - end - - def caveats; <<~EOS - For snort to be functional, you need to update the permissions for /dev/bpf* - so that they can be read by non-root users. This can be done manually using: - sudo chmod o+r /dev/bpf* - or you could create a startup item to do this for you. - EOS - end - - test do - system bin/"snort", "-V" - end -end diff --git a/Formula/snow.rb b/Formula/snow.rb deleted file mode 100644 index 12db11e90dbda..0000000000000 --- a/Formula/snow.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Snow < Formula - desc "Whitespace steganography: coded messages using whitespace" - homepage "http://www.darkside.com.au/snow/" - # The upstream website seems to be rejecting curl connections. - # Consistently returns "HTTP/1.1 406 Not Acceptable". - url "https://dl.bintray.com/homebrew/mirror/snow-20130616.tar.gz" - sha256 "c0b71aa74ed628d121f81b1cd4ae07c2842c41cfbdf639b50291fc527c213865" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "bed2d75f7d4210b5bebd533b656bf0ee641f6aaa4665b6c914071d7d1a4a7f04" => :mojave - sha256 "7db54bdc60bd0db33bc854e5b95a928183479d1f2d9ec65d69f36d3d8ccdae6a" => :high_sierra - sha256 "3c975f8c77c450c084b8a468f5d51dd12acaa15dd93dbc440b4523b8dc130316" => :sierra - sha256 "5121a5196c5ed20b7496a5190830bf2e49bdd18c3950fc6b1b8fabb239c9ef7c" => :el_capitan - sha256 "f4e949f65f946916a5f0b018a75e741336fed9e6434f1802d906e003e9da6b65" => :yosemite - sha256 "4d6bd4ca3de8ee330802495bdb04b0928afa21bb47a8fb1cde71d8a0c7919ada" => :mavericks - end - - def install - system "make" - bin.install "snow" - man1.install "snow.1" - end - - test do - touch "in.txt" - touch "out.txt" - system "#{bin}/snow", "-C", "-m", "'Secrets Abound Here'", "-p", - "'hello world'", "in.txt", "out.txt" - # The below should get the response 'Secrets Abound Here' when testing. - system "#{bin}/snow", "-C", "-p", "'hello world'", "out.txt" - end -end diff --git a/Formula/snownews.rb b/Formula/snownews.rb deleted file mode 100644 index ae004f66352db..0000000000000 --- a/Formula/snownews.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Snownews < Formula - desc "Text mode RSS newsreader" - homepage "https://github.com/kouya/snownews" - url "https://github.com/kouya/snownews/archive/v1.5.13.tar.gz" - sha256 "9a06cd58dee7846cbb18166c3b60153c1b7ee963261b205633d77feaa5410455" - - bottle do - sha256 "7c6a6ef9e934c27639eda4b7cc1e47225bdf9f5fc6533e129454a72595024c8c" => :mojave - sha256 "192c7a039cfc5d4f8041982da9a0b0510745e8680754aea64202440c8ace9d6b" => :high_sierra - sha256 "bfa3d3dbdd0ffbb197163bbf35bcb9d033bbad76a478533e546697dff24addb6" => :sierra - sha256 "4ba563f80e1a79532136538595e36bd1f802fcc396515cad3dccb5f7dfcd21e2" => :el_capitan - end - - depends_on "gettext" - depends_on "openssl" - - def install - # Fix file not found errors for /usr/lib/system/libsystem_symptoms.dylib and - # /usr/lib/system/libsystem_darwin.dylib on 10.11 and 10.12, respectively - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - system "./configure", "--prefix=#{prefix}" - - # Must supply -lz because configure relies on "xml2-config --libs" - # for it, which doesn't work on OS X prior to 10.11 - system "make", "install", "EXTRA_LDFLAGS=#{ENV.ldflags} -L#{Formula["openssl"].opt_lib} -lz", "CC=#{ENV.cc}" - end -end diff --git a/Formula/sntop.rb b/Formula/sntop.rb deleted file mode 100644 index bfa751d06212d..0000000000000 --- a/Formula/sntop.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Sntop < Formula - desc "Curses-based utility that polls hosts to determine connectivity" - homepage "https://sntop.sourceforge.io/" - url "https://pkg.freebsd.org/ports-distfiles/sntop-1.4.3.tar.gz" - sha256 "943a5af1905c3ae7ead064e531cde6e9b3dc82598bbda26ed4a43788d81d6d89" - - bottle do - rebuild 1 - sha256 "d010bc2fa761320d0d0f4948d5f95392d892e7bd7815418e9881ec90049d4036" => :mojave - sha256 "c22d769ddb8599acf3f03db2ef85eef5ee28e41f9ec3011e9b23f6168ceb0a76" => :high_sierra - sha256 "f15c15a4e2251e86e55c3bd2c75f660448e38efe9b0b57edd6d3e9301377929c" => :sierra - sha256 "c3f19036cf2d42ce9fa07ed6db6264b3e52ba475827903972877a8131eae60e9" => :el_capitan - end - - depends_on "fping" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--sysconfdir=#{etc}" - etc.mkpath - bin.mkpath - man1.mkpath - system "make", "install" - end - - def caveats; <<~EOS - sntop uses fping by default and fping can only be run by root by default. - You can run `sudo sntop` (or `sntop -p` which uses standard ping). - You should be certain that you trust any software you grant root privileges. - EOS - end - - test do - system "#{bin}/sntop", "--version" - end -end diff --git a/Formula/snzip.rb b/Formula/snzip.rb deleted file mode 100644 index 30de155e1cdb2..0000000000000 --- a/Formula/snzip.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Snzip < Formula - desc "Compression/decompression tool based on snappy" - homepage "https://github.com/kubo/snzip" - url "https://bintray.com/artifact/download/kubo/generic/snzip-1.0.4.tar.gz" - sha256 "a45081354715d48ed31899508ebed04a41d4b4a91dca37b79fc3b8ee0c02e25e" - revision 2 - - bottle do - cellar :any - sha256 "0304142d75d2495662ea2dae386948830aada6a7f653a90a74a746e56a7e9ff8" => :mojave - sha256 "fd4c734255707e1695f5d89a6dccc7d8b6a302771a71f6f6db0a054b9655d287" => :high_sierra - sha256 "953a79f0aa028d4b5f13cc606ead6e225c290972db683947dabed58bb6748257" => :sierra - sha256 "fdc031ce925717ee49048f3ffab3015f1039a06299f5093f7949e9a41cab975e" => :el_capitan - sha256 "68247e4d0d0520d9a2615acd906d079951b84e4138b27a69c2aa7ce6a286dd9e" => :yosemite - end - - depends_on "snappy" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.out").write "test" - system "#{bin}/snzip", "test.out" - system "#{bin}/snzip", "-d", "test.out.sz" - end -end diff --git a/Formula/socat.rb b/Formula/socat.rb deleted file mode 100644 index 820a21ca9949e..0000000000000 --- a/Formula/socat.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Socat < Formula - desc "netcat on steroids" - homepage "http://www.dest-unreach.org/socat/" - url "http://www.dest-unreach.org/socat/download/socat-1.7.3.2.tar.gz" - sha256 "ce3efc17e3e544876ebce7cd6c85b3c279fda057b2857fcaaf67b9ab8bdaf034" - revision 2 - - bottle do - cellar :any - sha256 "492cd9ef5b2f6bc959a8c5618a627f40b8e386d337ed4f5c4fc534d4daeb8c8b" => :mojave - sha256 "8440c4f765cf7c068461e33088e80057fbfa6be598107666714ba7cd0bb8c97d" => :high_sierra - sha256 "c630c4273615556c167da5875a67e28d79e51bc7493eb07ba73b7f7fead14372" => :sierra - sha256 "78787f35cdbc55bc5bce5f12c253eace7db1ae39767d55ad1e032eadc4f33ad3" => :el_capitan - end - - depends_on "openssl" - depends_on "readline" - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - output = pipe_output("#{bin}/socat - tcp:www.google.com:80", "GET / HTTP/1.0\r\n\r\n") - assert_match "HTTP/1.0", output.lines.first - end -end diff --git a/Formula/soci.rb b/Formula/soci.rb deleted file mode 100644 index 70df58ef77d5c..0000000000000 --- a/Formula/soci.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Soci < Formula - desc "Database access library for C++" - homepage "https://soci.sourceforge.io/" - url "https://downloads.sourceforge.net/project/soci/soci/soci-3.2.3/soci-3.2.3.zip" - sha256 "ab0f82873b0c5620e0e8eb2ff89abad6517571fd63bae4bdcac64dd767ac9a05" - - bottle do - sha256 "2e20ceced92132166cffae968a007d5150a6e620c1059e54e82ae0938eaf42ed" => :mojave - sha256 "b6186caa197c5111b9704cc4b4f133f0f5f656727ed3211c7351e2a97302f10f" => :high_sierra - sha256 "61ac3ada591371a743198251fa35d70a18cc6018d23e4a36e3ec45aa6ec99db2" => :sierra - sha256 "4b8d8acc29c2ed8e826be84c9dc777d947033396336885440fb823530460b470" => :el_capitan - sha256 "b802ee253ceb25ebfd2b5a90ef4dc8b229a90c7b1cae1a33533c9bd2ff9e7d50" => :yosemite - end - - option "with-oracle", "Enable Oracle support." - option "with-boost", "Enable boost support." - option "with-mysql", "Enable MySQL support." - option "with-odbc", "Enable ODBC support." - option "with-pg", "Enable PostgreSQL support." - - depends_on "boost" => [:build, :optional] - depends_on "cmake" => :build - depends_on "sqlite" if MacOS.version <= :snow_leopard - - fails_with :clang do - build 421 - cause "Template oddities" - end - - def install - args = std_cmake_args + %w[.. -DWITH_SQLITE3:BOOL=ON] - - %w[boost mysql oracle odbc pg].each do |arg| - arg_var = (arg == "pg") ? "postgresql" : arg - bool = build.with?(arg) ? "ON" : "OFF" - args << "-DWITH_#{arg_var.upcase}:BOOL=#{bool}" - end - - mkdir "build" do - system "cmake", *args - system "make", "install" - end - end -end diff --git a/Formula/sofia-sip.rb b/Formula/sofia-sip.rb deleted file mode 100644 index 54c983845ad7d..0000000000000 --- a/Formula/sofia-sip.rb +++ /dev/null @@ -1,33 +0,0 @@ -class SofiaSip < Formula - desc "SIP User-Agent library" - homepage "https://sofia-sip.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sofia-sip/sofia-sip/1.12.11/sofia-sip-1.12.11.tar.gz" - sha256 "2b01bc2e1826e00d1f7f57d29a2854b15fd5fe24695e47a14a735d195dd37c81" - revision 1 - - bottle do - cellar :any - sha256 "037c3d84ea7df66ffc6cf04dc503200d238cb39df80ad0f086d57e78205f22a6" => :mojave - sha256 "215b6a55868352c1ce67741e1cbede118813b0b1d12a56ba7425114a9bbb56d3" => :high_sierra - sha256 "ddbaf0fc570bd632c520057effc396a1f5e5cc48930644559ca9cafd9cd25360" => :sierra - sha256 "2e78cc40330c53363fb1dddc0568464001b46944628283e26811e4e6ccae28fe" => :el_capitan - sha256 "e2f9ede8ce51b2074659a1fcf576d83031c9037aafd3c39f75330e8e7cb236a5" => :yosemite - sha256 "1e68620530a8dda00d795bdf92f7c564174eefde5d7e703839de2e080bd89ea4" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/localinfo" - system "#{bin}/sip-date" - end -end diff --git a/Formula/softhsm.rb b/Formula/softhsm.rb deleted file mode 100644 index f95deab7f4ca5..0000000000000 --- a/Formula/softhsm.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Softhsm < Formula - desc "Cryptographic store accessible through a PKCS#11 interface" - homepage "https://www.opendnssec.org/softhsm/" - url "https://dist.opendnssec.org/source/softhsm-2.5.0.tar.gz" - sha256 "92aa56cf45e25892326e98b851c44de9cac8559e208720e579bf8e2cd1c132b2" - - bottle do - sha256 "08706b58638ef1705eb815a68e98d1a7cb84881b947dec37fbcfedf3ed7e33c6" => :mojave - sha256 "e19ba4dd4666be95b69981a798814108b11ca706b20e479990feee05babe7014" => :high_sierra - sha256 "5e69215d66ff6210d6c100e673194140c45d356bd810f5061d6e123cbba9a63c" => :sierra - end - - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}/softhsm", - "--localstatedir=#{var}", - "--with-crypto-backend=openssl", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - def post_install - (var/"lib/softhsm/tokens").mkpath - end - - test do - (testpath/"softhsm2.conf").write("directories.tokendir = #{testpath}") - ENV["SOFTHSM2_CONF"] = "#{testpath}/softhsm2.conf" - system "#{bin}/softhsm2-util", "--init-token", "--slot", "0", - "--label", "testing", "--so-pin", "1234", - "--pin", "1234" - system "#{bin}/softhsm2-util", "--show-slots" - end -end diff --git a/Formula/solarus.rb b/Formula/solarus.rb deleted file mode 100644 index cab2ea1bee64f..0000000000000 --- a/Formula/solarus.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Solarus < Formula - desc "Action-RPG game engine" - homepage "http://www.solarus-games.org/" - head "https://github.com/christopho/solarus.git" - - stable do - url "http://www.solarus-games.org/downloads/solarus/solarus-1.5.3-src.tar.gz" - sha256 "7608f3bdc7baef36e95db5e4fa4c8c5be0a3f436c50c53ab72d70a92aa44cc1c" - - # Upstream patch for build issue, remove in next version - # https://github.com/solarus-games/solarus/issues/1084 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e6a26f3d/solarus/config.patch" - sha256 "7bb5c39dd97eca215a22a28dffe23dfac364252f7ff8221e5d76ae40d037be76" - end - end - - bottle do - cellar :any - rebuild 1 - sha256 "f8c784ab5cc03a3bfc41cc53c9eaa037373f97046fa28044492b2286faa3e2ee" => :mojave - sha256 "b03dd0139fb3496f90a23c2847b42908e63366c37f92ad8b219f23bada2c4422" => :high_sierra - sha256 "03b09b647d7d940febe3405420b127567922251f493c15e96945b808a11a041d" => :sierra - sha256 "270c69a61d8bbc33033b4ca18bc669fabbba1e58c7ad67dcd5cb1150f039160a" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "libmodplug" - depends_on "libogg" - depends_on "libvorbis" - depends_on "luajit" - depends_on "physfs" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_ttf" - - def install - mkdir "build" do - system "cmake", "..", "-DSOLARUS_GUI=OFF", *std_cmake_args - system "make", "install" - end - end - - test do - system "#{bin}/solarus-run", "-help" - end -end diff --git a/Formula/solid.rb b/Formula/solid.rb deleted file mode 100644 index 30460743220fb..0000000000000 --- a/Formula/solid.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Solid < Formula - desc "Collision detection library for geometric objects in 3D space" - homepage "http://www.dtecta.com/" - url "http://www.dtecta.com/files/solid-3.5.6.tgz" - sha256 "4acfa20266f0aa5722732794f8e93d7bb446e467719c947a3ca583f197923af0" - - bottle do - cellar :any - rebuild 1 - sha256 "8c7fd219da510e1821b50069ffbcc3025bee102a1ada47fe4b3f9464507fb1bc" => :mojave - sha256 "30954dffe6674f98523b3cb299f909aefbe554b70000cd777df75c326edf80d0" => :high_sierra - sha256 "2836475cd2195c3906950c2a62ed618302e3f57ba4c348a82b737fcb0956fc07" => :sierra - end - - # This patch fixes a broken build on clang-600.0.56. - # Was reported to bugs@dtecta.com (since it also applies to solid-3.5.6) - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--prefix=#{prefix}", - "--infodir=#{info}" - - # exclude the examples from compiling! - # the examples do not compile because the include statements - # for the GLUT library are not platform independent - inreplace "Makefile", " examples ", " " - - system "make", "install" - end -end - -__END__ -diff --git a/include/MT/Quaternion.h b/include/MT/Quaternion.h -index 3726b4f..3393697 100644 ---- a/include/MT/Quaternion.h -+++ b/include/MT/Quaternion.h -@@ -154,7 +154,7 @@ namespace MT { - - Quaternion inverse() const - { -- return conjugate / length2(); -+ return conjugate() / length2(); - } - - Quaternion slerp(const Quaternion& q, const Scalar& t) const -diff --git a/src/complex/DT_CBox.h b/src/complex/DT_CBox.h -index 7fc7c5d..16ce972 100644 ---- a/src/complex/DT_CBox.h -+++ b/src/complex/DT_CBox.h -@@ -131,4 +131,6 @@ inline DT_CBox operator-(const DT_CBox& b1, const DT_CBox& b2) - b1.getExtent() + b2.getExtent()); - } - -+inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform); -+ - #endif diff --git a/Formula/solr.rb b/Formula/solr.rb deleted file mode 100644 index a0e533b9e01fe..0000000000000 --- a/Formula/solr.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Solr < Formula - desc "Enterprise search platform from the Apache Lucene project" - homepage "https://lucene.apache.org/solr/" - url "https://www.apache.org/dyn/closer.cgi?path=lucene/solr/7.6.0/solr-7.6.0.tgz" - sha256 "2cb425a0b30ff153465d306803e514e53e41924d74f28d842cb3a07cace759d5" - - bottle :unneeded - - depends_on :java - - skip_clean "example/logs" - - def install - bin.install %w[bin/solr bin/post bin/oom_solr.sh] - pkgshare.install "bin/solr.in.sh" - prefix.install %w[example server] - libexec.install Dir["*"] - - # Fix the classpath for the post tool - inreplace "#{bin}/post", '"$SOLR_TIP/dist"', "#{libexec}/dist" - - # Fix the paths in the sample solrconfig.xml files - Dir.glob(["#{prefix}/example/**/solrconfig.xml", - "#{prefix}/**/data_driven_schema_configs/**/solrconfig.xml", - "#{prefix}/**/sample_techproducts_configs/**/solrconfig.xml"]) do |f| - inreplace f, ":../../../..}/", "}/libexec/" - end - end - - plist_options :manual => "solr start" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/solr - start - -f - - ServiceDescription - #{name} - WorkingDirectory - #{HOMEBREW_PREFIX} - RunAtLoad - - - - EOS - end - - test do - system bin/"solr" - end -end diff --git a/Formula/solr@5.5.rb b/Formula/solr@5.5.rb deleted file mode 100644 index d094b838841d1..0000000000000 --- a/Formula/solr@5.5.rb +++ /dev/null @@ -1,65 +0,0 @@ -class SolrAT55 < Formula - desc "Enterprise search platform from the Apache Lucene project" - homepage "https://lucene.apache.org/solr/" - url "https://www.apache.org/dyn/closer.cgi?path=lucene/solr/5.5.4/solr-5.5.4.tgz" - mirror "https://archive.apache.org/dist/lucene/solr/5.5.4/solr-5.5.4.tgz" - sha256 "c1528e4afc9a0b8e7e5be0a16f40bb4080f410d502cd63b4447d448c49e9f500" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java - - skip_clean "example/logs" - - def install - bin.install %w[bin/solr bin/post bin/oom_solr.sh] - pkgshare.install "bin/solr.in.sh" - prefix.install %w[example server] - libexec.install Dir["*"] - - # Fix the classpath for the post tool - inreplace "#{bin}/post", '"$SOLR_TIP/dist"', "#{libexec}/dist" - - # Fix the paths in the sample solrconfig.xml files - Dir.glob([ - "#{prefix}/example/**/solrconfig.xml", - "#{prefix}/**/data_driven_schema_configs/**/solrconfig.xml", - "#{prefix}/**/sample_techproducts_configs/**/solrconfig.xml", - ]) do |f| - inreplace f, ":../../../..}/", "}/libexec/" - end - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/solr@5.5/bin/solr start" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/solr - start - -f - - ServiceDescription - #{name} - WorkingDirectory - #{HOMEBREW_PREFIX} - RunAtLoad - - - - EOS - end - - test do - system bin/"solr" - end -end diff --git a/Formula/solr@6.6.rb b/Formula/solr@6.6.rb deleted file mode 100644 index a01da499a45cf..0000000000000 --- a/Formula/solr@6.6.rb +++ /dev/null @@ -1,65 +0,0 @@ -class SolrAT66 < Formula - desc "Enterprise search platform from the Apache Lucene project" - homepage "https://lucene.apache.org/solr/" - url "https://www.apache.org/dyn/closer.cgi?path=lucene/solr/6.6.5/solr-6.6.5.tgz" - mirror "https://archive.apache.org/dist/lucene/solr/6.6.5/solr-6.6.5.tgz" - sha256 "fa65e922bc32d36ef65bee866095da563aa5ddd7e953798c06b6494572d51729" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java - - skip_clean "example/logs" - - def install - bin.install %w[bin/solr bin/post bin/oom_solr.sh] - pkgshare.install "bin/solr.in.sh" - prefix.install %w[example server] - libexec.install Dir["*"] - - # Fix the classpath for the post tool - inreplace "#{bin}/post", '"$SOLR_TIP/dist"', "#{libexec}/dist" - - # Fix the paths in the sample solrconfig.xml files - Dir.glob([ - "#{prefix}/example/**/solrconfig.xml", - "#{prefix}/**/data_driven_schema_configs/**/solrconfig.xml", - "#{prefix}/**/sample_techproducts_configs/**/solrconfig.xml", - ]) do |f| - inreplace f, ":../../../..}/", "}/libexec/" - end - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/solr@6.6/bin/solr start" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/solr - start - -f - - ServiceDescription - #{name} - WorkingDirectory - #{HOMEBREW_PREFIX} - RunAtLoad - - - - EOS - end - - test do - system bin/"solr" - end -end diff --git a/Formula/somagic-tools.rb b/Formula/somagic-tools.rb deleted file mode 100644 index e5483e90a8f1f..0000000000000 --- a/Formula/somagic-tools.rb +++ /dev/null @@ -1,24 +0,0 @@ -class SomagicTools < Formula - desc "Tools to extract firmware from EasyCAP" - homepage "https://code.google.com/archive/p/easycap-somagic-linux/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/easycap-somagic-linux/somagic-easycap-tools_1.1.tar.gz" - sha256 "b091723c55e6910cbf36c88f8d37a8d69856868691899683ec70c83b122a0715" - - bottle do - cellar :any - sha256 "70fc5f4c86296e08ca0ba835a37fb1bbdd9149892777dd6b39d83d367f2dec1b" => :mojave - sha256 "121e3b6667ee8dcd81cf2331342d27b6221b1ebf955f83e00311176fa5fe11ca" => :high_sierra - sha256 "b0fa394d0211f43fe5c9da6e7f36b8e3b6ed5086b8a447b06df42e21bf0e30cd" => :sierra - sha256 "b73262d08d3ec9e10645290555b5fb0c5fd95492c9d5db2ab451285ccb69eac6" => :el_capitan - sha256 "0b0b6840133039a9f7c33579d45fbd93e68dc00e6eabe0bd4d36d7d4da56fc06" => :yosemite - sha256 "0fad2574c7dbb306c975cb68b84a3c317965d9fab4c5b0e0787533cacf8f7988" => :mavericks - end - - depends_on "libgcrypt" - depends_on "libusb" - - def install - system "make" - system "make", "PREFIX=#{prefix}", "install" - end -end diff --git a/Formula/somagic.rb b/Formula/somagic.rb deleted file mode 100644 index 97a071b9a5a3f..0000000000000 --- a/Formula/somagic.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Somagic < Formula - desc "Linux capture program for the Somagic variants of EasyCAP" - homepage "https://code.google.com/archive/p/easycap-somagic-linux/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/easycap-somagic-linux/somagic-easycap_1.1.tar.gz" - sha256 "3a9dd78a47335a6d041cd5465d28124612dad97939c56d7c10e000484d78a320" - - bottle do - cellar :any - sha256 "c2a69924be6f0d397b244955cfa841567ecd3171dc2674a4ac9748f49f58a44b" => :mojave - sha256 "b6c11695d2c25a49a4a2c5795764a83615a214630bc25914e65fc691662617fc" => :high_sierra - sha256 "377ecbdc01ebaab2acf1101aa00bbf5554e7d56b1b630baa28ef70d9deb10811" => :sierra - sha256 "ed8a82423daaabaca0a7ab203edc68b3c0a1a1d617eb24d46486dfa974e9eb4f" => :el_capitan - sha256 "9c87f9d7a694509b446ce726cedcb731c0185b589a1cdfa96c0346f883a75e5d" => :yosemite - sha256 "0684417c6e1f1b498d10c5d24171217fb2e70ed0c8f9bacdd7365e8be8af20fc" => :mavericks - end - - depends_on "libgcrypt" - depends_on "libusb" - depends_on "somagic-tools" - - def install - system "make" - system "make", "PREFIX=#{prefix}", "install" - end - - def caveats - <<~EOS - Before running somagic-capture you must extract the official firmware from the CD. - See https://code.google.com/archive/p/easycap-somagic-linux/wikis/GettingStarted.wiki for details. - EOS - end -end diff --git a/Formula/sonar-completion.rb b/Formula/sonar-completion.rb deleted file mode 100644 index ced6eb549f061..0000000000000 --- a/Formula/sonar-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class SonarCompletion < Formula - desc "Bash completion for Sonar" - homepage "https://github.com/a1dutch/sonarqube-bash-completion" - url "https://github.com/a1dutch/sonarqube-bash-completion/archive/1.0.tar.gz" - sha256 "501bb1c87fab9dd934cdc506f12e74ea21d48be72a9e4321c88187e4a0e0a99a" - head "https://github.com/a1dutch/sonarqube-bash-completion.git" - - bottle :unneeded - - def install - bash_completion.install "etc/bash_completion.d/sonar" - end - - test do - assert_match "-F _sonar", - shell_output("source #{bash_completion}/sonar && complete -p sonar") - end -end diff --git a/Formula/sonar-scanner.rb b/Formula/sonar-scanner.rb deleted file mode 100644 index 63ba0a3d74d69..0000000000000 --- a/Formula/sonar-scanner.rb +++ /dev/null @@ -1,22 +0,0 @@ -class SonarScanner < Formula - desc "Launcher to analyze a project with SonarQube" - homepage "https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner" - url "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227.zip" - sha256 "f0e05102a3e98aceb141577c08896c49e3bff9520d1e2f75a688a0ce0d099bc0" - head "https://github.com/SonarSource/sonar-scanner-cli.git" - - bottle :unneeded - - def install - rm_rf Dir["bin/*.bat"] - libexec.install Dir["*"] - bin.install libexec/"bin/sonar-scanner" - etc.install libexec/"conf/sonar-scanner.properties" - ln_s etc/"sonar-scanner.properties", libexec/"conf/sonar-scanner.properties" - bin.env_script_all_files libexec/"bin/", :SONAR_SCANNER_HOME => libexec - end - - test do - assert_match version.to_s, shell_output("#{bin}/sonar-scanner --version") - end -end diff --git a/Formula/sonarqube-lts.rb b/Formula/sonarqube-lts.rb deleted file mode 100644 index 79b08e94224d9..0000000000000 --- a/Formula/sonarqube-lts.rb +++ /dev/null @@ -1,46 +0,0 @@ -class SonarqubeLts < Formula - desc "Manage code quality" - homepage "https://www.sonarqube.org/" - url "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-6.7.4.zip" - sha256 "a551b555d5ccb0b62a6604b37bad1ee17c5081ab2f67ddbac4fb58fa0eaeaa0e" - - bottle :unneeded - - depends_on :java => "1.8+" - - conflicts_with "sonarqube", :because => "both install the same binaries" - - def install - # Delete native bin directories for other systems - rm_rf Dir["bin/{linux,windows}-*"] - - libexec.install Dir["*"] - - bin.install_symlink "#{libexec}/bin/macosx-universal-64/sonar.sh" => "sonar" - end - - plist_options :manual => "sonar console" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/sonar - start - - RunAtLoad - - - - EOS - end - - test do - assert_match "SonarQube", shell_output("#{bin}/sonar status", 1) - end -end diff --git a/Formula/sonarqube.rb b/Formula/sonarqube.rb deleted file mode 100644 index 8c7a424800875..0000000000000 --- a/Formula/sonarqube.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Sonarqube < Formula - desc "Manage code quality" - homepage "https://www.sonarqube.org/" - url "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.4.zip" - sha256 "e758da84e69b773bc6b05742dbbea7037a3114845733dd822350bc5dba618b46" - - bottle :unneeded - - depends_on :java => "1.8+" - - conflicts_with "sonarqube-lts", :because => "both install the same binaries" - - def install - # Delete native bin directories for other systems - rm_rf Dir["bin/{linux,windows}-*"] - - libexec.install Dir["*"] - - bin.install_symlink "#{libexec}/bin/macosx-universal-64/sonar.sh" => "sonar" - end - - plist_options :manual => "sonar console" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/sonar - start - - RunAtLoad - - - - EOS - end - - test do - assert_match "SonarQube", shell_output("#{bin}/sonar status", 1) - end -end diff --git a/Formula/sonobuoy.rb b/Formula/sonobuoy.rb deleted file mode 100644 index 787938eda2140..0000000000000 --- a/Formula/sonobuoy.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Sonobuoy < Formula - desc "Kubernetes component that generates reports on cluster conformance" - homepage "https://github.com/heptio/sonobuoy" - url "https://github.com/heptio/sonobuoy/archive/v0.13.0.tar.gz" - sha256 "3e7976245097b1e8433f845e8344d4e9071d4b7558e497e8902abe3a7298f49c" - - bottle do - cellar :any_skip_relocation - sha256 "ed9bfc6d93c21cf6a70ad2d462fff5cd156252b274f18bc718496eba8c82d73e" => :mojave - sha256 "b55c5b42e1852b1fc0e5591b57762ec5e3f7c26b2290530630759416cbe953f2" => :high_sierra - sha256 "ab9bbced7de19299b6a2b0a763e6adf699873fe68c34a77deb28e4b205bdfddb" => :sierra - end - - depends_on "go" => :build - - resource "sonobuoyresults" do - url "https://raw.githubusercontent.com/heptio/sonobuoy/master/pkg/client/results/testdata/results-0.10.tar.gz" - sha256 "a945ba4d475e33820310a6138e3744f301a442ba01977d38f2b635d2e6f24684" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/heptio/sonobuoy").install buildpath.children - - cd "src/github.com/heptio/sonobuoy" do - system "go", "build", "-o", bin/"sonobuoy", "-installsuffix", "static", - "-ldflags", - "-s -w -X github.com/heptio/sonobuoy/pkg/buildinfo.Version=#{version}", - "./" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/sonobuoy 2>&1") - assert_match "Sonobuoy is an introspective kubernetes component that generates reports on cluster conformance", output - assert_match version.to_s, shell_output("#{bin}/sonobuoy version 2>&1") - output = shell_output("#{bin}/sonobuoy gen 2>&1") - assert_match "name: heptio-sonobuoy", output - output = shell_output("#{bin}/sonobuoy e2e --show=all " + resource("sonobuoyresults").cached_download + " 2>&1") - assert_match "all tests", output - end -end diff --git a/Formula/sops.rb b/Formula/sops.rb deleted file mode 100644 index cf1f5c9d4d4a3..0000000000000 --- a/Formula/sops.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Sops < Formula - desc "Editor of encrypted files" - homepage "https://github.com/mozilla/sops" - url "https://github.com/mozilla/sops/archive/3.2.0.tar.gz" - sha256 "7063b15b8e4a1625e3f2a64d582c424e93ee0b7292de9891dd3918ab1596c8fe" - head "https://github.com/mozilla/sops.git" - - bottle do - cellar :any_skip_relocation - sha256 "3da5dce6c4dbbdfa90521bd63bfeb6f9f84649149626065d59304c150453bcc0" => :mojave - sha256 "9829b2d6fbf48db2535736ad92b876421170e28eac8cbfd3d5b5d999a927eb2c" => :high_sierra - sha256 "9892a38517b3bbb9894bba47b72d31becd70cee86e5b912a75006b45cf90023c" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - (buildpath/"src/go.mozilla.org").mkpath - ln_s buildpath, "src/go.mozilla.org/sops" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/sops --version 2>&1") - end -end diff --git a/Formula/sord.rb b/Formula/sord.rb deleted file mode 100644 index f228d3333aaf5..0000000000000 --- a/Formula/sord.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Sord < Formula - desc "C library for storing RDF data in memory" - homepage "https://drobilla.net/software/sord/" - url "https://download.drobilla.net/sord-0.16.2.tar.bz2" - sha256 "09f51174dd8f3efbd95f44f0bb0b165f08e066e052d40095de59de787987da8d" - - bottle do - cellar :any - sha256 "d9fb150f83839e9179f5a011cba23885d6fd369912d876b066ab545eff993777" => :mojave - sha256 "c51813aa91714be7ff72372606538ccf028f3019a2e3b1c9eb1af184d925cd2c" => :high_sierra - sha256 "cdc2488f62b363e161df7412fc459fc4b6aa564d5b7d92c841e71d462629751a" => :sierra - sha256 "f83681f6abcdf47721ed6a8af9d6e2a17219808bd08f7951c4c145920e9fdf94" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "pcre" - depends_on "serd" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end -end diff --git a/Formula/sound-touch.rb b/Formula/sound-touch.rb deleted file mode 100644 index 0f88499e05323..0000000000000 --- a/Formula/sound-touch.rb +++ /dev/null @@ -1,34 +0,0 @@ -class SoundTouch < Formula - desc "Audio processing library" - homepage "https://www.surina.net/soundtouch/" - url "https://www.surina.net/soundtouch/soundtouch-2.0.0.tar.gz" - sha256 "d224f7d1421b5f8e74a74c85741345bd9802618a40ae30ce5b427a5705c89d25" - - bottle do - cellar :any - rebuild 1 - sha256 "f082ce515895d8cb5230e4afb0778731febf47800c93e62f4cafad9b14547852" => :mojave - sha256 "d3b8c7fc1c53208d848c810f0f15d4f2da334e602ca8e5ffd373630233546d36" => :high_sierra - sha256 "b17dfb640d87dcc75b1c9676e4be249ae6536739aafd4d55869f941ce43f4b86" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "/bin/sh", "bootstrap" - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - assert_match /SoundStretch v#{version} -/, shell_output("#{bin}/soundstretch 2>&1", 255) - end -end diff --git a/Formula/soundpipe.rb b/Formula/soundpipe.rb deleted file mode 100644 index 3ac6f9db3ebcf..0000000000000 --- a/Formula/soundpipe.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Soundpipe < Formula - desc "Lightweight music DSP library" - homepage "https://paulbatchelor.github.io/proj/soundpipe.html" - url "https://github.com/PaulBatchelor/soundpipe/archive/v1.7.0.tar.gz" - sha256 "2d6f6b155ad93d12f59ae30e2b0f95dceed27e0723147991da6defc6d65eadda" - - bottle do - cellar :any_skip_relocation - sha256 "77a13450033a093276c66a292ad3944174a50509d7238d138a7329fcf3e8faa4" => :mojave - sha256 "4f0b6f6a15345ce24137c640ab6c7a3a6a8c27d2391db3349672008feaaf67e3" => :high_sierra - sha256 "2d4accbb857729269d28c0812f08bb329258622f2ef584e37f48c5a846001804" => :sierra - sha256 "134c366d9bc06559fcfd2fb3a9aadf779bd974da23884b3b87eb9edac9dd22c9" => :el_capitan - end - - depends_on "libsndfile" - - def install - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install "examples", "test" - end - - test do - system ENV.cc, "#{pkgshare}/examples/ex_osc.c", "-o", "test", "-L#{lib}", - "-L#{lib}", "-lsndfile", "-lsoundpipe" - system "./test" - assert_predicate testpath/"test.wav", :exist? - end -end diff --git a/Formula/source-highlight.rb b/Formula/source-highlight.rb deleted file mode 100644 index 86d39054b06ec..0000000000000 --- a/Formula/source-highlight.rb +++ /dev/null @@ -1,32 +0,0 @@ -class SourceHighlight < Formula - desc "Source-code syntax highlighter" - homepage "https://www.gnu.org/software/src-highlite/" - url "https://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.8.tar.gz" - mirror "https://ftpmirror.gnu.org/src-highlite/source-highlight-3.1.8.tar.gz" - mirror "https://fossies.org/linux/www/source-highlight-3.1.8.tar.gz" - sha256 "01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3" - revision 10 - - bottle do - sha256 "9277cf220d941d23e2f8aa6fabc49e546d5d2141e10d86533ca0ab308f036552" => :mojave - sha256 "e9cee3e1adb85f4342db18e9eb058cb1e890ab4787e2d80c7657379c59db0cf4" => :high_sierra - sha256 "ac02e274218e45a543fca0478086bc3fed67d07deff990bf51065586c59602a9" => :sierra - end - - depends_on "boost" - - needs :cxx11 - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-boost=#{Formula["boost"].opt_prefix}" - system "make", "install" - - bash_completion.install "completion/source-highlight" - end - - test do - assert_match /GNU Source-highlight #{version}/, shell_output("#{bin}/source-highlight -V") - end -end diff --git a/Formula/source-to-image.rb b/Formula/source-to-image.rb deleted file mode 100644 index 8d5a9eb12b662..0000000000000 --- a/Formula/source-to-image.rb +++ /dev/null @@ -1,31 +0,0 @@ -class SourceToImage < Formula - desc "Tool for building source and injecting into docker images" - homepage "https://github.com/openshift/source-to-image" - url "https://github.com/openshift/source-to-image.git", - :tag => "v1.1.13", - :revision => "b54d75d3de92d123e68a79c6ee09c2c5fe44e720" - head "https://github.com/openshift/source-to-image.git" - - bottle do - cellar :any_skip_relocation - sha256 "af4411e7f5e5778eea3c2bd2a14ba87b750368073dd5b9ae8b96dcf5fa8518bd" => :mojave - sha256 "8d4cc648d5ae922ffde63f5a0d019e5324e289bde4db4ddbae99419d695acf4f" => :high_sierra - sha256 "c8cb66a64bf537e985d1b32bea711be099b5377002d5ca86c59c34cb6b39368f" => :sierra - end - - depends_on "go" => :build - - def install - # Upstream issue from 28 Feb 2018 "Go 1.10 failure due to version comparison bug" - # See https://github.com/openshift/source-to-image/issues/851 - inreplace "hack/common.sh", "go1.4", "go1.0" - - system "hack/build-go.sh" - bin.install "_output/local/bin/darwin/amd64/s2i" - end - - test do - system "#{bin}/s2i", "create", "testimage", testpath - assert_predicate testpath/"Dockerfile", :exist?, "s2i did not create the files." - end -end diff --git a/Formula/sourcedocs.rb b/Formula/sourcedocs.rb deleted file mode 100644 index 420a14a969e42..0000000000000 --- a/Formula/sourcedocs.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Sourcedocs < Formula - desc "Generate Markdown files from inline source code documentation" - homepage "https://github.com/eneko/SourceDocs" - url "https://github.com/eneko/SourceDocs/archive/0.5.1.tar.gz" - sha256 "3c2e2de695d49dbdd5acb49f8876042bdc97e8d6b95584d3ef6b592b8f10affc" - - bottle do - cellar :any_skip_relocation - sha256 "256b06c1425620af744d17bac21d993c54f12f1543206ae08b29e09fe28d1fc5" => :mojave - sha256 "7a7c4205340af10ab3cb41ea097f3be5fcf134c461c84869216b568aaa86b429" => :high_sierra - end - - depends_on :xcode => ["9.3", :build, :test] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", "-static-stdlib" - bin.install ".build/release/sourcedocs" - end - - test do - assert_match "SourceDocs v#{version}", shell_output("#{bin}/sourcedocs version") - - # There are some issues with SourceKitten running in sandbox mode in Mojave - # The following test has been disabled on Mojave until that issue is resolved - # - https://github.com/Homebrew/homebrew/pull/50211 - # - https://github.com/Homebrew/homebrew-core/pull/32548 - if MacOS.version < "10.14" - mkdir "foo" do - system "swift", "package", "init" - system "swift", "build", "--disable-sandbox" - system "#{bin}/sourcedocs", "generate", - "--spm-module", "foo", - "--output-folder", testpath/"Documentation/Reference" - assert_predicate testpath/"Documentation/Reference/README.md", :exist? - end - end - end -end diff --git a/Formula/sourcekitten.rb b/Formula/sourcekitten.rb deleted file mode 100644 index ec244c8342c5a..0000000000000 --- a/Formula/sourcekitten.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sourcekitten < Formula - desc "Framework and command-line tool for interacting with SourceKit" - homepage "https://github.com/jpsim/SourceKitten" - url "https://github.com/jpsim/SourceKitten.git", - :tag => "0.22.0", - :revision => "176f04295a09324673245d8ec0afcce21ace8722" - head "https://github.com/jpsim/SourceKitten.git" - - bottle do - cellar :any_skip_relocation - sha256 "32ce2eb944de73faf712b7314708bb10e11c37ff99cdd2326663f3e662d244d4" => :mojave - sha256 "dadffd1d44d3365bdacefa3beb320f2d2fcdc832287a388068b659b3ecca2a15" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - depends_on :xcode => "6.0" - - def install - system "make", "prefix_install", "PREFIX=#{prefix}", "TEMPORARY_FOLDER=#{buildpath}/SourceKitten.dst" - end - - test do - # Rewrite test after sandbox issues investigated. - # https://github.com/Homebrew/homebrew/pull/50211 - system "#{bin}/sourcekitten", "version" - end -end diff --git a/Formula/sourcery.rb b/Formula/sourcery.rb deleted file mode 100644 index 2627d85f8c742..0000000000000 --- a/Formula/sourcery.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sourcery < Formula - desc "Meta-programming for Swift, stop writing boilerplate code" - homepage "https://github.com/krzysztofzablocki/Sourcery" - url "https://github.com/krzysztofzablocki/Sourcery/archive/0.15.0.tar.gz" - sha256 "b695713996fff2de8390fae42b81686eac85f1603554cc202edbbd8693f8a32e" - head "https://github.com/krzysztofzablocki/Sourcery.git" - - bottle do - cellar :any_skip_relocation - sha256 "ce8ce8fb0ca123c1438af064028e2ded3f471493df7df59a9df17f203e97aaa0" => :mojave - sha256 "1fbb13334d2301366fc46c324e2826dad4b14044b79480962bb7ed46ad126a40" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - depends_on :xcode => "6.0" - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", - "-static-stdlib" - bin.install ".build/release/sourcery" - lib.install Dir[".build/release/*.dylib"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/sourcery --version").chomp - end -end diff --git a/Formula/sox.rb b/Formula/sox.rb deleted file mode 100644 index 1f5a92741089f..0000000000000 --- a/Formula/sox.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Sox < Formula - desc "SOund eXchange: universal sound sample translator" - homepage "https://sox.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.gz" - sha256 "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "e0e0c4d0d52410e04179c4cdca1cd09c46451a282af6ebe7b8840e6b9aac4268" => :mojave - sha256 "5ba02bdd4b170dc35d5472399a705a13e2711e2e84af79c98b2b484e4acd05cc" => :high_sierra - sha256 "e7bd73d3b1f15ef439b2cba3cddaa74e3fad91747f2be1f66a551d6db1a61c49" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "lame" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mad" - depends_on "opusfile" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - input = testpath/"test.wav" - output = testpath/"concatenated.wav" - cp test_fixtures("test.wav"), input - system bin/"sox", input, input, output - assert_predicate output, :exist? - end -end diff --git a/Formula/spaceinvaders-go.rb b/Formula/spaceinvaders-go.rb deleted file mode 100644 index f65e8845d99b9..0000000000000 --- a/Formula/spaceinvaders-go.rb +++ /dev/null @@ -1,55 +0,0 @@ -require "language/go" - -class SpaceinvadersGo < Formula - desc "Space Invaders in your terminal written in Go" - homepage "https://github.com/asib/spaceinvaders" - url "https://github.com/asib/spaceinvaders/archive/v1.2.tar.gz" - sha256 "e5298c4c13ff42f5cb3bf3913818c5155cf6918fd757124920045485d7ab5b9e" - - bottle do - cellar :any_skip_relocation - sha256 "3f6f5106ba62445e33e2181facd9644dde99bb0f527455e4b49cecdb56cb56aa" => :mojave - sha256 "5a512f039b4a9698eb5ce766798f462b134e98944e07ab3eccf712ee35c811d1" => :high_sierra - sha256 "672db5956f42626d3e9fc18defe431c4f2c18cd647f8cd534f9f522c314a0c49" => :sierra - sha256 "2ac0b623df41e8c9e9da05fc7f21e842bce1e71c0b9d4db52ef685cca9e040b0" => :el_capitan - sha256 "99a7e2c353d5dbb310fa03e4a430d05e0092cb0aee1c19e38bd592492ae16487" => :yosemite - end - - depends_on "go" => :build - - go_resource "github.com/mattn/go-runewidth" do - url "https://github.com/mattn/go-runewidth.git", - :revision => "12e0ff74603c9a3209d8bf84f8ab349fe1ad9477" - end - - go_resource "github.com/nsf/termbox-go" do - url "https://github.com/nsf/termbox-go.git", - :revision => "347ab0bc907040257edaf8b580f729e12c93ab6b" - end - - go_resource "github.com/simulatedsimian/joystick" do - url "https://github.com/simulatedsimian/joystick.git", - :revision => "6aa8abe045a796cf36b720d0484809e3f70dc5bd" - end - - def install - # This builds with Go. - ENV["GOPATH"] = buildpath - sipath = buildpath/"src/github.com/asib/spaceinvaders" - sipath.install Dir["{*,.git}"] - Language::Go.stage_deps resources, buildpath/"src" - cd "src/github.com/asib/spaceinvaders/" do - system "go", "build" - bin.install "spaceinvaders" - prefix.install_metafiles - end - end - - test do - IO.popen("#{bin}/spaceinvaders", "r+") do |pipe| - pipe.puts "q" - pipe.close_write - pipe.close - end - end -end diff --git a/Formula/spaceman-diff.rb b/Formula/spaceman-diff.rb deleted file mode 100644 index 006bef5e7da8e..0000000000000 --- a/Formula/spaceman-diff.rb +++ /dev/null @@ -1,24 +0,0 @@ -class SpacemanDiff < Formula - desc "Diff images from the command-line" - homepage "https://github.com/holman/spaceman-diff" - url "https://github.com/holman/spaceman-diff/archive/v1.0.3.tar.gz" - sha256 "347bf7d32d6c2905f865b90c5e6f4ee2cd043159b61020381f49639ed5750fdf" - head "https://github.com/holman/spaceman-diff.git" - - bottle :unneeded - - depends_on "imagemagick" - depends_on "jp2a" - - def install - bin.install "spaceman-diff" - end - - test do - output = shell_output("#{bin}/spaceman-diff") - assert_match /USAGE/, output - - png = test_fixtures("test.png") - system "script", "-q", "/dev/null", "#{bin}/spaceman-diff", png, "a190ba", "100644", png, "000000", "100644" - end -end diff --git a/Formula/spades.rb b/Formula/spades.rb deleted file mode 100644 index a6f8270c0d53f..0000000000000 --- a/Formula/spades.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Spades < Formula - desc "De novo genome sequence assembly" - homepage "http://cab.spbu.ru/software/spades/" - url "http://cab.spbu.ru/files/release3.13.0/SPAdes-3.13.0.tar.gz" - mirror "https://github.com/ablab/spades/releases/download/v3.13.0/SPAdes-3.13.0.tar.gz" - sha256 "c63442248c4c712603979fa70503c2bff82354f005acda2abc42dd5598427040" - - bottle do - cellar :any - sha256 "1728c4d25e0f62e1f630de9622a2b6dc1add3703cfa8d7471c415ee21bd6e36e" => :mojave - sha256 "3403d415389703649cd92acec88e85646e755a783d289b8a6beb7508ecf96f21" => :high_sierra - sha256 "0d01c5eb1d4072a40ae8a1a2436ecd3987250152f4abc3ba76379b914929bc95" => :sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - - fails_with :clang # no OpenMP support - - def install - mkdir "src/build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - assert_match "TEST PASSED CORRECTLY", shell_output("#{bin}/spades.py --test") - end -end diff --git a/Formula/spandsp.rb b/Formula/spandsp.rb deleted file mode 100644 index 8ae17b54d9e14..0000000000000 --- a/Formula/spandsp.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Spandsp < Formula - desc "DSP functions library for telephony" - homepage "https://www.soft-switch.org/" - url "https://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz" - sha256 "cc053ac67e8ac4bb992f258fd94f275a7872df959f6a87763965feabfdcc9465" - revision 1 - - bottle do - cellar :any - sha256 "d38722be71b9d6b3311ee51cb85bc406b2bc34eaf5741851c3b4ed432aecacf2" => :mojave - sha256 "0b4bb6795c931452181252754da3db80189e6557c344e743296de823cb711efa" => :high_sierra - sha256 "c0b8349525680304f99e464d328df804279be85398969974f2b708e5167c89fe" => :sierra - sha256 "428120be3841ca77961f2d19fe8f98f1615972db4f568e3cfa2c0a44cae44e77" => :el_capitan - sha256 "65fd095ea758180f18ca9c39864dbd3432115610b0db2439dbc923d3c0002f7b" => :yosemite - end - - depends_on "libtiff" - - def install - ENV.deparallelize - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #define SPANDSP_EXPOSE_INTERNAL_STRUCTURES - #include - - int main() - { - t38_terminal_state_t t38; - memset(&t38, 0, sizeof(t38)); - return (t38_terminal_init(&t38, 0, NULL, NULL) == NULL) ? 0 : 1; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lspandsp", "-o", "test" - system "./test" - end -end diff --git a/Formula/spark.rb b/Formula/spark.rb deleted file mode 100644 index 6932b325b8a95..0000000000000 --- a/Formula/spark.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Spark < Formula - desc "Sparklines for the shell" - homepage "https://zachholman.com/spark/" - url "https://github.com/holman/spark/archive/v1.0.1.tar.gz" - sha256 "a81c1bc538ce8e011f62264fe6f33d28042ff431b510a6359040dc77403ebab6" - - bottle :unneeded - - def install - bin.install "spark" - end - - test do - system "#{bin}/spark" - end -end diff --git a/Formula/sparkey.rb b/Formula/sparkey.rb deleted file mode 100644 index c93bf7245d229..0000000000000 --- a/Formula/sparkey.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Sparkey < Formula - desc "Constant key-value store, best for frequent read/infrequent write uses" - homepage "https://github.com/spotify/sparkey/" - url "https://github.com/spotify/sparkey/archive/sparkey-1.0.0.tar.gz" - sha256 "d607fb816d71d97badce6301dd56e2538ef2badb6530c0a564b1092788f8f774" - - bottle do - cellar :any - sha256 "c2c88d318d112376f08a81dd3c38746b0843e1e0fe5c03d1545f7606db2561ba" => :mojave - sha256 "619dd968f275dca8239cf39c7d4f6c571ca883190e84bf2246a45d4e5c944a81" => :high_sierra - sha256 "e19c744556628667d81cfc40c792224b424f545fac1abfd76189d3f675478801" => :sierra - sha256 "fb3c2f20c08d28a563a9d8a0849e0f2492c3a007345c09c81710060d07796054" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "snappy" - - def install - system "autoreconf", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/sparkey", "createlog", "-c", "snappy", "test.spl" - system "echo foo.bar | #{bin}/sparkey appendlog -d . test.spl" - system "#{bin}/sparkey", "writehash", "test.spl" - system "#{bin}/sparkey get test.spi foo | grep ^bar$" - end -end diff --git a/Formula/sparse.rb b/Formula/sparse.rb deleted file mode 100644 index cc71d7abab202..0000000000000 --- a/Formula/sparse.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Sparse < Formula - desc "Static C code analysis tool" - homepage "https://sparse.wiki.kernel.org/" - url "https://www.kernel.org/pub/software/devel/sparse/dist/sparse-0.5.2.tar.xz" - sha256 "4632b7b74af72214247f982f976ba44206933bab3a2717e09df166fb5b8abe7a" - head "https://git.kernel.org/pub/scm/devel/sparse/sparse.git" - - bottle do - cellar :any_skip_relocation - sha256 "db6647114d923224cd794d8ae64955d30ea87a7f1bfd938f4742dffb6594fec3" => :mojave - sha256 "e1f7b2d8585f7c30f1c3c342d034768e14fac1b6043d5d7ba41a7b12d75c3efa" => :high_sierra - sha256 "af4f28e9df8833877fc218dee27092218b57de0414706a64a6fc44946e7de692" => :sierra - sha256 "e393e5c09338e5db469150cd90d7d24f67840be81e36a09ac430f4ffe0254df0" => :el_capitan - end - - def install - inreplace "Makefile", /PREFIX=\$\(HOME\)/, "PREFIX=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.C").write("int main(int a) {return a;}\n") - system "#{bin}/sparse", testpath/"test.C" - end -end diff --git a/Formula/spatialindex.rb b/Formula/spatialindex.rb deleted file mode 100644 index 8d326359f092b..0000000000000 --- a/Formula/spatialindex.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Spatialindex < Formula - desc "General framework for developing spatial indices" - homepage "https://libspatialindex.github.io/" - url "https://download.osgeo.org/libspatialindex/spatialindex-src-1.8.5.tar.gz" - sha256 "7caa46a2cb9b40960f7bc82c3de60fa14f8f3e000b02561b36cbf2cfe6a9bfef" - - bottle do - cellar :any - sha256 "3cffbd33a299a0354849d510cbc7aaa71abdb41fdff3a7d5d0dd3459de2a91fb" => :mojave - sha256 "76e41dc6e6ccb457cb2db3d6806461e065784bf161864ed4276c8041724ce995" => :high_sierra - sha256 "6c60b7939a2220b10e04cc5e47a6672935697a13accc1284bb90b401b866044c" => :sierra - sha256 "34d1e02dd4133ed67a8a4c299044e277e1e9cfc982962c50c44c751723eb85cb" => :el_capitan - sha256 "907f40e614218622fd9fecc0a542adcdf768446a198ef4cc972b30a7eb5e6cd3" => :yosemite - sha256 "33e053a03ea77bc87c3aab4f8319461baab56824e3c933cb09398e6df1b542ba" => :mavericks - sha256 "401c416f243996ac4f6bca61a871aec7fb8811f8aef6073dfc62c64dfe2650f7" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "install" - end - - test do - # write out a small program which inserts a fixed box into an rtree - # and verifies that it can query it - (testpath/"test.cpp").write <<~EOS - #include - - using namespace std; - using namespace SpatialIndex; - - class MyVisitor : public IVisitor { - public: - vector matches; - - void visitNode(const INode& n) {} - void visitData(const IData& d) { - matches.push_back(d.getIdentifier()); - } - void visitData(std::vector& v) {} - }; - - int main(int argc, char** argv) { - IStorageManager* memory = StorageManager::createNewMemoryStorageManager(); - id_type indexIdentifier; - RTree::RTreeVariant variant = RTree::RV_RSTAR; - ISpatialIndex* tree = RTree::createNewRTree( - *memory, 0.5, 100, 10, 2, - variant, indexIdentifier - ); - /* insert a box from (0, 5) to (0, 10) */ - double plow[2] = { 0.0, 0.0 }; - double phigh[2] = { 5.0, 10.0 }; - Region r = Region(plow, phigh, 2); - - std::string data = "a value"; - - id_type id = 1; - - tree->insertData(data.size() + 1, reinterpret_cast(data.c_str()), r, id); - - /* ensure that (2, 2) is in that box */ - double qplow[2] = { 2.0, 2.0 }; - double qphigh[2] = { 2.0, 2.0 }; - Region qr = Region(qplow, qphigh, 2); - MyVisitor q_vis; - - tree->intersectsWithQuery(qr, q_vis); - - return (q_vis.matches.size() == 1) ? 0 : 1; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lspatialindex", "-o", "test" - system "./test" - end -end diff --git a/Formula/spatialite-gui.rb b/Formula/spatialite-gui.rb deleted file mode 100644 index 7365cfd446bf4..0000000000000 --- a/Formula/spatialite-gui.rb +++ /dev/null @@ -1,98 +0,0 @@ -class SpatialiteGui < Formula - desc "GUI tool supporting SpatiaLite" - homepage "https://www.gaia-gis.it/fossil/spatialite_gui/index" - url "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/spatialite_gui-1.7.1.tar.gz" - sha256 "cb9cb1ede7f83a5fc5f52c83437e556ab9cb54d6ace3c545d31b317fd36f05e4" - revision 4 - - bottle do - cellar :any - rebuild 1 - sha256 "877a0b1d4981a2b13031769a812f25549f824817978c6d30b57b2ddecd734f14" => :mojave - sha256 "329a43210fc2f99c3d2c8090bb304bff81e5fc2450778f15f052b32100230151" => :high_sierra - sha256 "1ab0a3f3a0ce183dac239210c4bf2f632cdfe827a59a86f34bf3229bf2df93e4" => :sierra - sha256 "e04f2392b64ad916bb50e62d2267b075eab00ca44f7b8001f7a9f5e30c447e3e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "freexl" - depends_on "geos" - depends_on "libgaiagraphics" - depends_on "libspatialite" - depends_on "proj" - depends_on "sqlite" - depends_on "wxmac" - - patch :DATA - - def install - # Link flags for sqlite don't seem to get passed to make, which - # causes builds to fatally error out on linking. - # https://github.com/Homebrew/homebrew/issues/44003 - sqlite = Formula["sqlite"] - ENV.prepend "LDFLAGS", "-L#{sqlite.opt_lib} -lsqlite3" - ENV.prepend "CFLAGS", "-I#{sqlite.opt_include}" - - # Add aui library; reported upstream multiple times: - # https://groups.google.com/forum/#!searchin/spatialite-users/aui/spatialite-users/wnkjK9pde2E/hVCpcndUP_wJ - inreplace "configure", "WX_LIBS=\"$(wx-config --libs)\"", "WX_LIBS=\"$(wx-config --libs std,aui)\"" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -For some strange reason, wxWidgets does not take the required steps to register -programs as GUI apps like other toolkits do. This necessitates the creation of -an app bundle on OS X. - -This clever hack sidesteps the headache of packing simple programs into app -bundles: - - https://www.miscdebris.net/blog/2010/03/30/ - solution-for-my-mac-os-x-gui-program-doesnt-get-focus-if-its-outside-an-application-bundle ---- - Main.cpp | 21 +++++++++++++++++++++ - 1 files changed, 21 insertions(+), 0 deletions(-) - -diff --git a/Main.cpp b/Main.cpp -index a857e8a..9c90afb 100644 ---- a/Main.cpp -+++ b/Main.cpp -@@ -71,6 +71,12 @@ - #define unlink _unlink - #endif - -+#ifdef __WXMAC__ -+// Allow the program to run and recieve focus without creating an app bundle. -+#include -+extern "C" { void CPSEnableForegroundOperation(ProcessSerialNumber* psn); } -+#endif -+ - IMPLEMENT_APP(MyApp) - bool MyApp::OnInit() - { -@@ -86,6 +92,21 @@ IMPLEMENT_APP(MyApp) - frame->Show(true); - SetTopWindow(frame); - frame->LoadConfig(path); -+ -+#ifdef __WXMAC__ -+ // Acquire the necessary resources to run as a GUI app without being inside -+ // an app bundle. -+ // -+ // Credit for this hack goes to: -+ // -+ // https://www.miscdebris.net/blog/2010/03/30/solution-for-my-mac-os-x-gui-program-doesnt-get-focus-if-its-outside-an-application-bundle -+ ProcessSerialNumber psn; -+ -+ GetCurrentProcess( &psn ); -+ CPSEnableForegroundOperation( &psn ); -+ SetFrontProcess( &psn ); -+#endif -+ - return true; - } - --- -1.7.9 diff --git a/Formula/spatialite-tools.rb b/Formula/spatialite-tools.rb deleted file mode 100644 index a96904279d0c9..0000000000000 --- a/Formula/spatialite-tools.rb +++ /dev/null @@ -1,36 +0,0 @@ -class SpatialiteTools < Formula - desc "CLI tools supporting SpatiaLite" - homepage "https://www.gaia-gis.it/fossil/spatialite-tools/index" - url "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz" - sha256 "f739859bc04f38735591be2f75009b98a2359033675ae310dffc3114a17ccf89" - revision 2 - - bottle do - cellar :any - sha256 "7d0f5232b41d1471d6212ee5004904be9d330a58a3aff9b6cb9d6ab8a90a9f33" => :mojave - sha256 "b77b197aef8f05ac1816a9fd1b262aae9fc026772cc03be67ed5be57904d65fc" => :high_sierra - sha256 "96e80f05afa030b2646bdc60e3a466f0dcca91819890a4c5fff26f063b952db3" => :sierra - sha256 "e20202824ce1995a371f925ed69350601a888592274a778aaec1b78a97ef3867" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libspatialite" - depends_on "readosm" - - def install - # See: https://github.com/Homebrew/homebrew/issues/3328 - ENV.append "LDFLAGS", "-liconv" - # Ensure Homebrew SQLite is found before system SQLite. - sqlite = Formula["sqlite"] - ENV.append "LDFLAGS", "-L#{sqlite.opt_lib}" - ENV.append "CFLAGS", "-I#{sqlite.opt_include}" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"spatialite", "--version" - end -end diff --git a/Formula/spawn-fcgi.rb b/Formula/spawn-fcgi.rb deleted file mode 100644 index 912cc5992c48d..0000000000000 --- a/Formula/spawn-fcgi.rb +++ /dev/null @@ -1,27 +0,0 @@ -class SpawnFcgi < Formula - desc "Spawn fast-CGI processes" - homepage "https://redmine.lighttpd.net/projects/spawn-fcgi" - url "https://www.lighttpd.net/download/spawn-fcgi-1.6.4.tar.gz" - sha256 "ab327462cb99894a3699f874425a421d934f957cb24221f00bb888108d9dd09e" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2512789a14b629470c684a4694e7f26fb28a9734b156f0756279bc8f40c2f2bd" => :mojave - sha256 "31c9d255c30ac65009b0972c7b9fe8a8835f8c305800c1b147471b44113fd285" => :high_sierra - sha256 "23140d56da75279d033d123b5cc5a7d50018dd08e6c74e3ed118eac5adbac555" => :sierra - sha256 "4e6f999ebcad8b7ce84473379b6358ec569559f9e4b772d31ef1a5b0e01fc865" => :el_capitan - sha256 "7473e3e2cd5322b2f09011e2b5119622e145d136cd0a8d4ce7adcb255a13d83b" => :yosemite - sha256 "a19a14cae6fbacdc5aa1a8132f5d290743ba7385c2d76903dbd172ca07b38680" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/spawn-fcgi", "--version" - end -end diff --git a/Formula/spdlog.rb b/Formula/spdlog.rb deleted file mode 100644 index 9a9478f15012f..0000000000000 --- a/Formula/spdlog.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Spdlog < Formula - desc "Super fast C++ logging library" - homepage "https://github.com/gabime/spdlog" - url "https://github.com/gabime/spdlog/archive/v1.2.1.tar.gz" - sha256 "867a4b7cedf9805e6f76d3ca41889679054f7e5a3b67722fe6d0eae41852a767" - head "https://github.com/gabime/spdlog.git" - - bottle do - cellar :any_skip_relocation - sha256 "e94a8414b9acff01d5d80a99993402724f76190f6e070f8c4b8e3b7311089f4c" => :mojave - sha256 "074eabca74ff4274589e5eea0d9f39394126201b73468650c3958786110fc5ec" => :high_sierra - sha256 "074eabca74ff4274589e5eea0d9f39394126201b73468650c3958786110fc5ec" => :sierra - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - - mkdir "spdlog-build" do - args = std_cmake_args - args << "-Dpkg_config_libdir=#{lib}" << ".." - system "cmake", *args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "spdlog/sinks/basic_file_sink.h" - #include - #include - int main() - { - try { - auto console = spdlog::basic_logger_mt("basic_logger", "#{testpath}/basic-log.txt"); - console->info("Test"); - } - catch (const spdlog::spdlog_ex &ex) - { - std::cout << "Log init failed: " << ex.what() << std::endl; - return 1; - } - } - EOS - - system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}", "-o", "test" - system "./test" - assert_predicate testpath/"basic-log.txt", :exist? - assert_match "Test", (testpath/"basic-log.txt").read - end -end diff --git a/Formula/spdylay.rb b/Formula/spdylay.rb deleted file mode 100644 index 372a7b1f2ecf8..0000000000000 --- a/Formula/spdylay.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Spdylay < Formula - desc "Experimental implementation of SPDY protocol versions 2, 3, and 3.1" - homepage "https://github.com/tatsuhiro-t/spdylay" - url "https://github.com/tatsuhiro-t/spdylay/archive/v1.4.0.tar.gz" - sha256 "31ed26253943b9d898b936945a1c68c48c3e0974b146cef7382320a97d8f0fa0" - revision 1 - - bottle do - cellar :any - sha256 "10d813d333390d5e8264362de2085e3be8419730fd2333b8101180057f9e485e" => :mojave - sha256 "9cb131c7f3205acdf923fd3a978a421f99af649d6262698395e458b1a2ef442d" => :high_sierra - sha256 "02084694808e70244e96c4aca7c1351e135215c28375ef84f83d1a86b0324ec1" => :sierra - sha256 "613ca2f401b491abe6d16eb51dfe1d955d7e985d04fc82950633c807f15b017c" => :el_capitan - sha256 "c4fe31125eaff34fca1a71d7fe923d9e0fe3cde230df0fba0d9bb2c2067ea493" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "libxml2" if MacOS.version <= :lion - depends_on "openssl" - - def install - if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - ENV["ac_cv_search_clock_gettime"] = "no" - end - - if MacOS.version > :lion - Formula["libxml2"].stable.stage { (buildpath/"m4").install "libxml.m4" } - end - - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Check here for popular websites using SPDY: - # https://w3techs.com/technologies/details/ce-spdy/all/all - system "#{bin}/spdycat", "-ns", "https://www.twitter.com/" - end -end diff --git a/Formula/speech-tools.rb b/Formula/speech-tools.rb deleted file mode 100644 index cc022d7efcece..0000000000000 --- a/Formula/speech-tools.rb +++ /dev/null @@ -1,59 +0,0 @@ -class SpeechTools < Formula - desc "C++ speech software library from the University of Edinburgh" - homepage "http://festvox.org/docs/speech_tools-2.4.0/" - url "http://festvox.org/packed/festival/2.5/speech_tools-2.5.0-release.tar.gz" - sha256 "e4fd97ed78f14464358d09f36dfe91bc1721b7c0fa6503e04364fb5847805dcc" - - bottle do - cellar :any_skip_relocation - sha256 "49b05f1d4894a23065205b57ea9bb9eeef8e0e8b96a82a7457719197fdce9c56" => :mojave - sha256 "b43389631b881f76529aa4458442b819dc5be784afbf5569f9e526ce3dc7e028" => :high_sierra - sha256 "4d3681ee2194a92fcbad96371c499f5c2a71c59cfe8798b8092f0e57f793fca3" => :sierra - sha256 "a0794d1d7f424833d2fe92726d26b6ebcc8dcf63b7f9700b19e1119ed7e2ca62" => :el_capitan - end - - conflicts_with "align", :because => "both install `align` binaries" - - def install - ENV.deparallelize - system "./configure" - system "make" - # install all executable files in "main" directory - bin.install Dir["main/*"].select { |f| File.file?(f) && File.executable?(f) } - end - - test do - rate_hz = 16000 - frequency_hz = 100 - duration_secs = 5 - basename = "sine" - txtfile = "#{basename}.txt" - wavfile = "#{basename}.wav" - ptcfile = "#{basename}.ptc" - - File.open(txtfile, "w") do |f| - scale = 2 ** 15 - 1 - f.puts Array.new(duration_secs * rate_hz) { |i| (scale * Math.sin(frequency_hz * 2 * Math::PI * i / rate_hz)).to_i } - end - - # convert to wav format using ch_wave - system bin/"ch_wave", txtfile, - "-itype", "raw", - "-istype", "ascii", - "-f", rate_hz.to_s, - "-o", wavfile, - "-otype", "riff" - - # pitch tracking to est format using pda - system bin/"pda", wavfile, - "-shift", (1 / frequency_hz.to_f).to_s, - "-o", ptcfile, - "-otype", "est" - - # extract one frame from the middle using ch_track, capturing stdout - pitch = shell_output("#{bin}/ch_track #{ptcfile} -from #{frequency_hz * duration_secs / 2} -to #{frequency_hz * duration_secs / 2}") - - # should be 100 (Hz) - assert_equal frequency_hz, pitch.to_i - end -end diff --git a/Formula/speedread.rb b/Formula/speedread.rb deleted file mode 100644 index 71e4da4221fb4..0000000000000 --- a/Formula/speedread.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Speedread < Formula - desc "Simple terminal-based rapid serial visual presentation (RSVP) reader" - homepage "https://github.com/pasky/speedread" - url "https://github.com/pasky/speedread/archive/v1.0.tar.gz" - sha256 "a65f5bec427e66893663bcfc49a22e43169dd35976302eaed467eec2a5aafc1b" - head "https://github.com/pasky/speedread.git" - - bottle :unneeded - - def install - bin.install "speedread" - end - - test do - system "#{bin}/speedread", "-w 1000", "<(echo This is a test)" - end -end diff --git a/Formula/speedtest-cli.rb b/Formula/speedtest-cli.rb deleted file mode 100644 index 88dad8f62b815..0000000000000 --- a/Formula/speedtest-cli.rb +++ /dev/null @@ -1,19 +0,0 @@ -class SpeedtestCli < Formula - desc "Command-line interface for https://speedtest.net bandwidth tests" - homepage "https://github.com/sivel/speedtest-cli" - url "https://github.com/sivel/speedtest-cli/archive/v2.0.2.tar.gz" - sha256 "5e22f2dcce1c9020f33faf559b22727483f022008a2912b85d573e578374b6a0" - head "https://github.com/sivel/speedtest-cli.git" - - bottle :unneeded - - def install - bin.install "speedtest.py" => "speedtest" - bin.install_symlink "speedtest" => "speedtest-cli" - man1.install "speedtest-cli.1" - end - - test do - system bin/"speedtest" - end -end diff --git a/Formula/speex.rb b/Formula/speex.rb deleted file mode 100644 index 13ae81f6ff66a..0000000000000 --- a/Formula/speex.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Speex < Formula - desc "Audio codec designed for speech" - homepage "https://speex.org/" - url "https://downloads.xiph.org/releases/speex/speex-1.2.0.tar.gz" - sha256 "eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094" - - bottle do - cellar :any - sha256 "ed212ec09c4a1a2c789e5c2a7a2679b56c75bcf252a52fe28d6615499d21534f" => :mojave - sha256 "525970161e7c1629b242c91d889201ca368814945695efd5b441d58b5b5dcc75" => :high_sierra - sha256 "5aa61761fb5426de78297fdc83579515dda1a880f47c925cb3405b7175079b92" => :sierra - sha256 "056781a4d7c5fe9a05f30160c059352bda0a4f8a759820df7dde7233aa08cba5" => :el_capitan - sha256 "a0b3c91782b8242508adac3ebc0cd86688e75b043ea0d84f4ef7ac9940f8a21b" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libogg" - - def install - ENV.deparallelize - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - SpeexBits bits; - void *enc_state; - - speex_bits_init(&bits); - enc_state = speex_encoder_init(&speex_nb_mode); - - speex_bits_destroy(&bits); - speex_encoder_destroy(enc_state); - - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lspeex", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/speexdsp.rb b/Formula/speexdsp.rb deleted file mode 100644 index 79e1602e4fc65..0000000000000 --- a/Formula/speexdsp.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Speexdsp < Formula - desc "Speex audio processing library" - homepage "https://github.com/xiph/speexdsp" - url "https://github.com/xiph/speexdsp/archive/SpeexDSP-1.2rc3.tar.gz" - sha256 "e8be7482df7c95735e5466efb371bd7f21115f39eb45c20ab7264d39c57b6413" - - bottle do - cellar :any - sha256 "976f26d11b921a994d65f4f1d911e7b181ee19107c6c591613bcd23eb5e0077d" => :mojave - sha256 "4a56292d0a64f7e1e9f9227d6c6aff652e6de5263cf7ba1a3d571321ee5cea09" => :high_sierra - sha256 "367e34d4ba6e7087762193a18910da38905496ec41c0f329604d310a09e4f5ed" => :sierra - sha256 "4891bd2a89fc9369d9c573afd80a1e7593e9414a0d6a956921af1b65f61ab264" => :el_capitan - sha256 "34a342effdc414829a7063d4b8dc7f2bbfa2d37231904f4fa6784c38d90bdb3d" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/sphinx-doc.rb b/Formula/sphinx-doc.rb deleted file mode 100644 index 71c3bd0029970..0000000000000 --- a/Formula/sphinx-doc.rb +++ /dev/null @@ -1,153 +0,0 @@ -class SphinxDoc < Formula - desc "Tool to create intelligent and beautiful documentation" - homepage "https://www.sphinx-doc.org/" - url "https://files.pythonhosted.org/packages/4d/ed/4595274b5c9ce53a768cc0804ef65fd6282c956b93919a969e98d53894e4/Sphinx-1.8.3.tar.gz" - sha256 "c4cb17ba44acffae3d3209646b6baec1e215cad3065e852c68cc569d4df1b9f8" - - bottle do - cellar :any_skip_relocation - sha256 "46545d0ac35892a1802b44fd62a132b76c4d461030a638f20c0c74d7412ffb67" => :mojave - sha256 "ea6ada61350915aa711ed1cf646d8a33c75ae2b161637150933f67ea9bb7c5cb" => :high_sierra - sha256 "8aaa9e542afadc4acc243376d57e3b5799958c931f28772f01627e7ec1e10ce3" => :sierra - end - - keg_only <<~EOS - this formula is mainly used internally by other formulae. - Users are advised to use `pip` to install sphinx-doc - EOS - - depends_on "python@2" if MacOS.version <= :snow_leopard - - # generated from sphinx, setuptools, numpydoc and python-docs-theme - resource "setuptools" do - url "https://files.pythonhosted.org/packages/37/1b/b25507861991beeade31473868463dad0e58b1978c209de27384ae541b0b/setuptools-40.6.3.zip" - sha256 "3b474dad69c49f0d2d86696b68105f3a6f195f7ab655af12ef9a9c326d2b08f8" - end - - resource "alabaster" do - url "https://files.pythonhosted.org/packages/cc/b4/ed8dcb0d67d5cfb7f83c4d5463a7614cb1d078ad7ae890c9143edebbf072/alabaster-0.7.12.tar.gz" - sha256 "a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02" - end - - resource "Babel" do - url "https://files.pythonhosted.org/packages/be/cc/9c981b249a455fa0c76338966325fc70b7265521bad641bf2932f77712f4/Babel-2.6.0.tar.gz" - sha256 "8cba50f48c529ca3fa18cf81fa9403be176d374ac4d60738b839122dfaaa3d23" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "imagesize" do - url "https://files.pythonhosted.org/packages/41/f5/3cf63735d54aa9974e544aa25858d8f9670ac5b4da51020bbfc6aaade741/imagesize-1.1.0.tar.gz" - sha256 "f3832918bc3c66617f92e35f5d70729187676313caa60c187eb0f28b8fe5e3b5" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/ac/7e/1b4c2e05809a4414ebce0892fe1e32c14ace86ca7d50c70f00979ca9b3a3/MarkupSafe-1.1.0.tar.gz" - sha256 "4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3" - end - - resource "numpydoc" do - url "https://files.pythonhosted.org/packages/95/a8/b4706a6270f0475541c5c1ee3373c7a3b793936ec1f517f1a1dab4f896c0/numpydoc-0.8.0.tar.gz" - sha256 "61f4bf030937b60daa3262e421775838c945dcdd671f37b69e8e4854c7eb5ffd" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/cf/50/1f10d2626df0aa97ce6b62cf6ebe14f605f4e101234f7748b8da4138a8ed/packaging-18.0.tar.gz" - sha256 "0886227f54515e592aaa2e5a553332c73962917f2831f1b0f9b9f4380a4b9807" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/64/69/413708eaf3a64a6abb8972644e0f20891a55e621c6759e2c3f3891e05d63/Pygments-2.3.1.tar.gz" - sha256 "5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/d0/09/3e6a5eeb6e04467b737d55f8bba15247ac0876f98fae659e58cd744430c6/pyparsing-2.3.0.tar.gz" - sha256 "f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592" - end - - resource "python-docs-theme" do - url "https://files.pythonhosted.org/packages/77/f9/8c63766fe271549db3a578b652dea6678b90b593300315507b9c922f7173/python-docs-theme-2018.7.tar.gz" - sha256 "018a5bf2a7318c9c9a8346303dac8afc6bc212d92e86561c9b95a3372714155a" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/cd/71/ae99fc3df1b1c5267d37ef2c51b7d79c44ba8a5e37b48e3ca93b4d74d98b/pytz-2018.7.tar.gz" - sha256 "31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz" - sha256 "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "snowballstemmer" do - url "https://files.pythonhosted.org/packages/20/6b/d2a7cb176d4d664d94a6debf52cd8dbae1f7203c8e42426daa077051d59c/snowballstemmer-1.2.1.tar.gz" - sha256 "919f26a68b2c17a7634da993d91339e288964f93c274f1343e3bbbe2096e1128" - end - - resource "sphinxcontrib-websupport" do - url "https://files.pythonhosted.org/packages/07/7a/e74b06dce85555ffee33e1d6b7381314169ebf7e31b62c18fcb2815626b7/sphinxcontrib-websupport-1.1.0.tar.gz" - sha256 "9de47f375baf1ea07cdb3436ff39d7a9c76042c10a769c52353ec46e4e8fc3b9" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/bf/9b/2bf84e841575b633d8d91ad923e198a415e3901f228715524689495b4317/typing-3.6.6.tar.gz" - sha256 "4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - resources.each do |r| - r.stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system bin/"sphinx-quickstart", "-pPorject", "-aAuthor", "-v1.0", "-q", testpath - system bin/"sphinx-build", testpath, testpath/"build" - assert_predicate testpath/"build/index.html", :exist? - assert_predicate libexec/"vendor/lib/python2.7/site-packages/python_docs_theme", :exist? - end -end diff --git a/Formula/sphinx.rb b/Formula/sphinx.rb deleted file mode 100644 index afaca23f9000e..0000000000000 --- a/Formula/sphinx.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Sphinx < Formula - desc "Full-text search engine" - homepage "https://sphinxsearch.com/" - url "https://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz" - sha256 "6662039f093314f896950519fa781bc87610f926f64b3d349229002f06ac41a9" - head "https://github.com/sphinxsearch/sphinx.git" - - bottle do - sha256 "60e5aa2a956bd9c4d1e35453b7b201e33a96565331d476423f26cd62873a3f10" => :mojave - sha256 "b890cf523db9777c7d125842fd6b0a53fe9a7a5a4cb816389ba6f5ee6483c78d" => :high_sierra - sha256 "55ce34bdedf13946fa614bde50839d93135eae720f1021e2c87807d04515ab18" => :sierra - sha256 "c75e018d69afb7d3cb662ebd129af67607d47f7b7f71ce8ea95be75d66dc502d" => :el_capitan - sha256 "f89b43df8735d295a55c74f18d6af4a1a10b9f3ae81df69713c27f9240f78d14" => :yosemite - sha256 "4ec1f1ea71e17b9e924e9f36747d7184114463640f100022cdbb46202e46261f" => :mavericks - end - - option "with-mysql", "Force compiling against MySQL" - option "with-postgresql", "Force compiling against PostgreSQL" - - deprecated_option "mysql" => "with-mysql" - deprecated_option "pgsql" => "with-postgresql" - - depends_on "mysql" => :optional - depends_on "openssl" if build.with? "mysql" - depends_on "postgresql" => :optional - - fails_with :clang do - build 421 - cause "sphinxexpr.cpp:1802:11: error: use of undeclared identifier 'ExprEval'" - end - - resource "stemmer" do - url "https://github.com/snowballstem/snowball.git", - :revision => "9b58e92c965cd7e3208247ace3cc00d173397f3c" - end - - def install - resource("stemmer").stage do - system "make", "dist_libstemmer_c" - system "tar", "xzf", "dist/libstemmer_c.tgz", "-C", buildpath - end - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --localstatedir=#{var} - --with-libstemmer - ] - - if build.with? "mysql" - args << "--with-mysql" - else - args << "--without-mysql" - end - - if build.with? "postgresql" - args << "--with-pgsql" - else - args << "--without-pgsql" - end - - system "./configure", *args - system "make", "install" - end - - def caveats; <<~EOS - This is not sphinx - the Python Documentation Generator. - To install sphinx-python use pip. - - Sphinx has been compiled with libstemmer support. - - Sphinx depends on either MySQL or PostreSQL as a datasource. - - You can install these with Homebrew with: - brew install mysql - For MySQL server. - - brew install mysql-connector-c - For MySQL client libraries only. - - brew install postgresql - For PostgreSQL server. - - We don't install these for you when you install this formula, as - we don't know which datasource you intend to use. - EOS - end - - test do - system bin/"searchd", "--help" - end -end diff --git a/Formula/spidermonkey.rb b/Formula/spidermonkey.rb deleted file mode 100644 index 04c0bb24e3a96..0000000000000 --- a/Formula/spidermonkey.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Spidermonkey < Formula - desc "JavaScript-C Engine" - homepage "https://developer.mozilla.org/en/SpiderMonkey" - url "https://archive.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz" - version "1.8.5" - sha256 "5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687" - revision 2 - head "https://hg.mozilla.org/mozilla-central", :using => :hg - - bottle do - cellar :any - sha256 "2f0aefda519eaec139f47c54efe01b01c58883dbf1a0285f603c85635463f9f6" => :mojave - sha256 "03c8a52da69c69fd7dba21cfb6fad8f3f95f6aa63b0fde61572c39124cbaea41" => :high_sierra - sha256 "62193341691f6f35a1d844409c587b431aa7540b70c02d90451e2cb3623788de" => :sierra - sha256 "5e7789a8ba4e3259364bd3ae827037ba83bf3a076633799bf8f5869b885db399" => :el_capitan - sha256 "38d1b7f54b5dbdd4a0e28e3a1077aed2ada42a9266cfaddeda6a08d761a2d8b2" => :yosemite - end - - depends_on "nspr" - depends_on "readline" - - conflicts_with "narwhal", :because => "both install a js binary" - - def install - cd "js/src" do - # Remove the broken *(for anyone but FF) install_name - inreplace "config/rules.mk", - "-install_name @executable_path/$(SHARED_LIBRARY) ", - "-install_name #{lib}/$(SHARED_LIBRARY) " - end - - mkdir "brew-build" do - system "../js/src/configure", "--prefix=#{prefix}", - "--enable-readline", - "--enable-threadsafe", - "--with-system-nspr", - "--with-nspr-prefix=#{Formula["nspr"].opt_prefix}", - "--enable-macos-target=#{MacOS.version}" - - inreplace "js-config", /JS_CONFIG_LIBS=.*?$/, "JS_CONFIG_LIBS=''" - # These need to be in separate steps. - system "make" - system "make", "install" - - # Also install js REPL. - bin.install "shell/js" - end - end - - test do - path = testpath/"test.js" - path.write "print('hello');" - assert_equal "hello", shell_output("#{bin}/js #{path}").strip - end -end diff --git a/Formula/spigot.rb b/Formula/spigot.rb deleted file mode 100644 index 050e36bbf44dd..0000000000000 --- a/Formula/spigot.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Spigot < Formula - desc "Command-line streaming exact real calculator" - homepage "https://www.chiark.greenend.org.uk/~sgtatham/spigot/" - url "https://www.chiark.greenend.org.uk/~sgtatham/spigot/spigot-20180515.c2b5409.tar.gz" - version "20180515" - sha256 "2642f42875ed310e8aa5413a42a34194b8ba34ae49e2bfb458c9999290d8de41" - - bottle do - cellar :any_skip_relocation - sha256 "2d579b5ee73174fbf3c5bea8772be8728a73772109c77b57bf871f05026b553e" => :mojave - sha256 "689b4a5bb054436424c4e6edc6d8b90aaef1a62edcfc0b01a6e104f7daa3c764" => :high_sierra - sha256 "55266079e88406a0899be8b743b86e10b3ee76a188150703abdf4576b7c1dc80" => :sierra - sha256 "7bcce462df3061635e5ac0818427d1b2b494cd69d5417f8b3597d55e8739c6c0" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Get Ramanujan's number of decimal places of Tau in base10 - expected = <<~EOS - 6.28318530717958647692528676655900576839433879875021164194988918461563281 - 2572417997256069650684234135964296173026564613294187689219101164463450718 - 8162569622349005682054038770422111192892458979098607639288576219513318668 - 9225695129646757356633054240381829129713384692069722090865329642678721452 - 0498282547449174013212631176349763041841925658508183430728735785180720022 - 6610610976409330427682939038830232188661145407315191839061843722347638652 - 2358621023709614892475992549913470377150544978245587636602389825966734672 - 4881313286172042789892790449474381404359721887405541078434352586353504769 - 3496369353388102640011362542905271216555715426855155792183472743574429368 - 8180244990686029309917074210158455937851784708403991222425804392172806883 - 6319627259549542619921037414422699999996745956099902119463465632192637190 - 0489189106938166052850446165066893700705238623763420200062756775057731750 - 6641676284123435533829460719650698085751093746231912572776470757518750391 - 5563715561064342453613226003855753222391818432840397876190514402130971726 - 5577318723067636559364606039040706037059379915472451988277824994435505669 - 5826303114971448490830139190165906623372345571177815019676350927492987863 - 8510120801855403342278019697648025716723207127415320209420363885911192397 - 8935356748988965107595494536942080950692924160933685181389825866273540579 - 7830420950432411393204811607630038702250676486007117528049499294652782839 - 8545208539845593564709563272018683443282439849172630060572365949111413499 - 6770109891771738539913818544215950186059106423306899744055119204729613309 - 9823976366959550713273961485308505572510363683514934578195554558760016329 - 4120032290498384346434429544700282883947137096322722314705104266951483698 - 9368770466478147882866690955248337250379671389711241 - EOS - assert_equal shell_output("#{bin}/spigot -d1729 tau").strip, - expected.delete!("\n") - end -end diff --git a/Formula/spim.rb b/Formula/spim.rb deleted file mode 100644 index dfabe55c7c4fb..0000000000000 --- a/Formula/spim.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Spim < Formula - desc "MIPS32 simulator" - homepage "https://spimsimulator.sourceforge.io/" - # No source code tarball exists - url "http://svn.code.sf.net/p/spimsimulator/code", :revision => 707 - version "9.1.19" - head "http://svn.code.sf.net/p/spimsimulator/code/" - - bottle do - sha256 "ed97fd8280e875fd1d20fe79ce6205dfdf9fb454c71b63f1f5b3849a24a4c7a2" => :mojave - sha256 "dd734941f466f62278aae0826a7fa05a4a960bed55bde3318a5b3f46810c3175" => :high_sierra - sha256 "8a3717f7373bd8b9f4a85b335c321b27597dcd64ee22fc05921e96241458a191" => :sierra - sha256 "0b2c254bc2ab638516345e0fe44b29859179c6ec62704fb369e485a645178bbd" => :el_capitan - sha256 "1207f278f326747acbb97e272724d72dd467e90b4ef798365206958ccd54957a" => :yosemite - end - - def install - bin.mkpath - cd "spim" do - system "make", "EXCEPTION_DIR=#{share}" - system "make", "test" - system "make", "install", "BIN_DIR=#{bin}", - "EXCEPTION_DIR=#{share}", - "MAN_DIR=#{man1}" - end - end - - test do - assert_match "__start", pipe_output("#{bin}/spim", "print_symbols") - end -end diff --git a/Formula/spin.rb b/Formula/spin.rb deleted file mode 100644 index 85904970505aa..0000000000000 --- a/Formula/spin.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Spin < Formula - desc "The efficient verification tool of multi-threaded software" - homepage "https://spinroot.com/spin/whatispin.html" - url "https://spinroot.com/spin/Src/spin648.tar.gz" - version "6.4.8" - sha256 "0035bb114157a759e047c7f94ede0a3d7149003893914c9bbdff45e074ab6ae7" - - bottle do - cellar :any_skip_relocation - sha256 "7e4e65759c869d3b4964139b731725f4b6aba48ee722f5ed8824f92a8b097b77" => :mojave - sha256 "11dcb2192a287c7bdbdbf7109add8ffb9c33161b12b4342c9feef21fd16269d1" => :high_sierra - sha256 "5d881e899d308eee2c72c19050d61f70c53b439d7cb5b188dd6e104345a6fa35" => :sierra - sha256 "f64e72a5667316b47f32d7c1af206a7735708bbbb1a02e7d6d752d1e7e63b3ad" => :el_capitan - end - - def install - ENV.deparallelize - - cd "Src#{version}" do - system "make" - bin.install "spin" - end - - bin.install "iSpin/ispin.tcl" => "ispin" - man1.install "Man/spin.1" - end - - test do - (testpath/"test.pml").write <<~EOS - mtype = { ruby, python }; - mtype = { golang, rust }; - mtype language = ruby; - - active proctype P() { - do - :: if - :: language == ruby -> language = golang - :: language == python -> language = rust - fi; - printf("language is %e", language) - od - } - EOS - output = shell_output("#{bin}/spin #{testpath}/test.pml") - assert_match /language is golang/, output - end -end diff --git a/Formula/spiped.rb b/Formula/spiped.rb deleted file mode 100644 index ed1d6a5c091a7..0000000000000 --- a/Formula/spiped.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Spiped < Formula - desc "Secure pipe daemon" - homepage "https://www.tarsnap.com/spiped.html" - url "https://www.tarsnap.com/spiped/spiped-1.6.0.tgz" - sha256 "e6f7f8f912172c3ad55638af8346ae7c4ecaa92aed6d3fb60f2bda4359cba1e4" - - bottle do - cellar :any - sha256 "4cf975e7272d99897109b7a5b2cca741d46e9b34d877c6be13a140920d8b8901" => :mojave - sha256 "f2008c86b377357db0888b384029b54ee9573d73e891ec322018b80dc499d165" => :high_sierra - sha256 "53e5ec39c188fed1d8a762904988490dd6a73f34f6bfcef986063a34a804cd6a" => :sierra - sha256 "3597aef864440d96505a2445348060926cbab9b2ea44af4ee61094e4bc419d4e" => :el_capitan - sha256 "d61db0a6cf96273e9564fcd3208ff5836840b0369e0a9c269c79904d9f1d3ab6" => :yosemite - end - - depends_on "bsdmake" => :build - depends_on "openssl" - - def install - man1.mkpath - system "bsdmake", "BINDIR_DEFAULT=#{bin}", "MAN1DIR=#{man1}", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/spipe -v 2>&1") - end -end diff --git a/Formula/splint.rb b/Formula/splint.rb deleted file mode 100644 index 7fcec7821c99b..0000000000000 --- a/Formula/splint.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Splint < Formula - desc "Secure Programming Lint" - homepage "https://sourceforge.net/projects/splint/" - url "https://mirrorservice.org/sites/distfiles.macports.org/splint/splint-3.1.2.src.tgz" - mirror "https://src.fedoraproject.org/repo/pkgs/splint/splint-3.1.2.src.tgz/25f47d70bd9c8bdddf6b03de5949c4fd/splint-3.1.2.src.tgz" - sha256 "c78db643df663313e3fa9d565118391825dd937617819c6efc7966cdf444fb0a" - - bottle do - sha256 "eb5d2c9dd5a4ad5a95870ff62d4d4d2cf5744b7d901a918c303f4c74eab4e0c8" => :mojave - sha256 "4d97939d58a64670256ea18422ae7ddd75ea1d12e89d12f40faa0b54e6d9d3a8" => :high_sierra - sha256 "e5847a77e137e1f2339b55ae1fff93a94de33c6ad1a3a34c8a45b3d06a6bf0f9" => :sierra - sha256 "9eac9f8e530c1d9fc238b57f9d4e143fbf5727450657ba92e6d721660777753b" => :el_capitan - sha256 "4b385e4fcf9b82fa2ebd8dabaef7e712039b3f7c83d2f6d5e3263ebf51e7b6d7" => :yosemite - sha256 "ad8551b508f303c69499a60456de49d2b77d1f0f2383383d3c01c1b657a230b6" => :mavericks - end - - # fix compiling error of osd.c - patch :DATA - - def install - ENV.deparallelize # build is not parallel-safe - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--infodir=#{info}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - path = testpath/"test.c" - path.write <<~EOS - #include - int main() - { - char c; - printf("%c", c); - return 0; - } - EOS - - output = shell_output("#{bin}/splint #{path} 2>&1", 1) - assert_match /5:18:\s+Variable c used before definition/, output - end -end - - -__END__ -diff --git a/src/osd.c b/src/osd.c -index ebe214a..4ba81d5 100644 ---- a/src/osd.c -+++ b/src/osd.c -@@ -516,7 +516,7 @@ osd_getPid () - # if defined (WIN32) || defined (OS2) && defined (__IBMC__) - int pid = _getpid (); - # else -- __pid_t pid = getpid (); -+ pid_t pid = getpid (); - # endif - - return (int) pid; diff --git a/Formula/spoof-mac.rb b/Formula/spoof-mac.rb deleted file mode 100644 index 021fa44719199..0000000000000 --- a/Formula/spoof-mac.rb +++ /dev/null @@ -1,81 +0,0 @@ -class SpoofMac < Formula - desc "Spoof your MAC address in macOS" - homepage "https://github.com/feross/SpoofMAC" - url "https://files.pythonhosted.org/packages/9c/59/cc52a4c5d97b01fac7ff048353f8dc96f217eadc79022f78455e85144028/SpoofMAC-2.1.1.tar.gz" - sha256 "48426efe033a148534e1d4dc224c4f1b1d22299c286df963c0b56ade4c7dc297" - head "https://github.com/feross/SpoofMAC.git" - - bottle do - cellar :any_skip_relocation - sha256 "168b9ea72b3ef3b6bd5bf248ee4e2dafaa8f7b35e70c7db2be481be53e73b66e" => :mojave - sha256 "f7972b66a491d8513262e3bdb9098850fe91e4c8e0e3d7a12efd24994e47dda5" => :high_sierra - sha256 "baa45eb53fc9e1a713ca7693351409f66c833834e7c7d0838115bcf5f38df555" => :sierra - sha256 "6c97eaa9a82f7eadb5c1127a0dcf9b0f9f1837e36d3e9978e989471322f42b4a" => :el_capitan - sha256 "927644491edf064dcc3145e05107737c3e571b55989ae8d539bf0b499da3685c" => :yosemite - sha256 "f7dc1529dd2c83d8bf8667d170299aa592910bb4918174b23f6a9b7d3555084e" => :mavericks - end - - depends_on "python@2" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/source/d/docopt/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - def install - ENV["PYTHONPATH"] = libexec/"lib/python2.7/site-packages" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - - resources.each do |r| - r.stage { system "python", *Language::Python.setup_install_args(libexec/"vendor") } - end - - system "python", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - def caveats; <<~EOS - Although spoof-mac can run without root, you must be root to change the MAC. - - The launchdaemon is set to randomize en0. - You can find the interfaces available by running: - "spoof-mac list" - - If you wish to change interface randomized at startup change the plist line: - en0 - to e.g.: - en1 - EOS - end - - plist_options :startup => true, :manual => "spoof-mac" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/spoof-mac - randomize - en0 - - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - system "#{bin}/spoof-mac", "list", "--wifi" - end -end diff --git a/Formula/spotbugs.rb b/Formula/spotbugs.rb deleted file mode 100644 index d8f2754cb3ea3..0000000000000 --- a/Formula/spotbugs.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Spotbugs < Formula - desc "Tool for Java static analysis (FindBugs's successor)" - homepage "https://spotbugs.github.io/" - url "https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/3.1.10/spotbugs-3.1.10.tgz" - sha256 "cc86b7fade75d85378b951eb8dca40aea75bf33336454eea522fccd4e1c540e1" - - head do - url "https://github.com/spotbugs/spotbugs.git" - - depends_on "gradle" => :build - end - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - if build.head? - system "gradle", "build" - system "gradle", "installDist" - libexec.install Dir["spotbugs/build/install/spotbugs/*"] - else - libexec.install Dir["*"] - end - bin.install_symlink "#{libexec}/bin/spotbugs" - end - - test do - (testpath/"HelloWorld.java").write <<~EOS - public class HelloWorld { - private double[] myList; - public static void main(String[] args) { - System.out.println("Hello World"); - } - public double[] getList() { - return myList; - } - } - EOS - system "javac", "HelloWorld.java" - system "jar", "cvfe", "HelloWorld.jar", "HelloWorld", "HelloWorld.class" - output = shell_output("#{bin}/spotbugs -textui HelloWorld.jar") - assert_match /M V EI.*\nM C UwF.*\n/, output - end -end diff --git a/Formula/spring-completion.rb b/Formula/spring-completion.rb deleted file mode 100644 index bb8646d7d99de..0000000000000 --- a/Formula/spring-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class SpringCompletion < Formula - desc "Bash completion for Spring" - homepage "https://github.com/jacaetevha/spring_bash_completion" - url "https://github.com/jacaetevha/spring_bash_completion/archive/v0.0.1.tar.gz" - sha256 "a97b256dbdaca894dfa22bd96a6705ebf4f94fa8206d05f41927f062c3dd60bf" - head "https://github.com/jacaetevha/spring_bash_completion.git" - - bottle :unneeded - - def install - bash_completion.install "spring.bash" => "spring" - end - - test do - assert_match "-F _spring", - shell_output("source #{bash_completion}/spring && complete -p spring") - end -end diff --git a/Formula/spring-loaded.rb b/Formula/spring-loaded.rb deleted file mode 100644 index 413cb48ccc7fb..0000000000000 --- a/Formula/spring-loaded.rb +++ /dev/null @@ -1,17 +0,0 @@ -class SpringLoaded < Formula - desc "Java agent to enable class reloading in a running JVM" - homepage "https://github.com/spring-projects/spring-loaded" - url "https://repo.spring.io/simple/libs-release-local/org/springframework/springloaded/1.2.6.RELEASE/springloaded-1.2.6.RELEASE.jar" - version "1.2.6" - sha256 "6edd6ffb3fd82c3eee95f5588465f1ab3a94fc5fff65b6e3a262f6de5323d203" - - bottle :unneeded - - def install - (share/"java").install "springloaded-#{version}.RELEASE.jar" => "springloaded.jar" - end - - test do - system "java", "-javaagent:#{share}/java/springloaded.jar", "-version" - end -end diff --git a/Formula/spring-roo.rb b/Formula/spring-roo.rb deleted file mode 100644 index 2cb4d1dc1aa87..0000000000000 --- a/Formula/spring-roo.rb +++ /dev/null @@ -1,16 +0,0 @@ -class SpringRoo < Formula - desc "Rapid application development tool for Java developers" - homepage "https://projects.spring.io/spring-roo/" - url "https://s3.amazonaws.com/spring-roo-repository.springsource.org/release/ROO/spring-roo-2.0.0.RELEASE.zip" - version "2.0.0" - sha256 "37819adf23b221a4544a7b1e6853b67f695fb915f5a1d433760e04fb4b5d7263" - - bottle :unneeded - - def install - rm Dir["bin/*.bat"] - libexec.install Dir["*"] - mv "#{libexec}/bin/roo.sh", "#{libexec}/bin/roo" - bin.write_exec_script Dir["#{libexec}/bin/*"] - end -end diff --git a/Formula/sproxy.rb b/Formula/sproxy.rb deleted file mode 100644 index c2665390badc7..0000000000000 --- a/Formula/sproxy.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Sproxy < Formula - desc "HTTP proxy server collecting URLs in a 'siege-friendly' manner" - homepage "https://www.joedog.org/sproxy-home/" - url "http://download.joedog.org/sproxy/sproxy-1.02.tar.gz" - sha256 "29b84ba66112382c948dc8c498a441e5e6d07d2cd5ed3077e388da3525526b72" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "2d689087925622e4f7e2c2572c2339c62a6c2b891bce7093bcd664f1a15c28d9" => :mojave - sha256 "326b01fa9a1370c54929ae4c11d1b67b2238875eca8188365486b9c2a374264f" => :high_sierra - sha256 "8d57317644b76b465adc5caf984f1e3cf57f9486f642705eee66128adbcf3589" => :sierra - sha256 "4ed786b0b05ca3c88d5904e3119d84725a9f9bedf5d952c055f22a81661a825c" => :el_capitan - sha256 "19da9a5b680a860e721ec60763dd48e9a5213505ee643703abcdc66707e8ce51" => :yosemite - sha256 "96b9cdebf5a11907998ba33e2b568fd5a77d46261a6faaa9c33a5d8eeca9a27f" => :mavericks - end - - # Only needed due to the change to "Makefile.am" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - # Prevents "ERROR: Can't create '/usr/local/share/man/man3'"; also fixes an - # audit violation triggered if the man page is installed in #{prefix}/man. - # After making the change below and running autoreconf, the default ends up - # being the same as #{man}, so there's no need for us to pass --mandir to - # configure, though, as a result of this change, that flag would be honored. - # Reported 10th May 2016 to https://www.joedog.org/support/ - inreplace "doc/Makefile.am", "$(prefix)/man", "$(mandir)" - inreplace "lib/Makefile.am", "Makefile.PL", "Makefile.PL PREFIX=$(prefix)" - - # Only needed due to the change to "Makefile.am" - system "autoreconf", "-fiv" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match "SPROXY v#{version}-", shell_output("#{bin}/sproxy -V") - end -end diff --git a/Formula/sql-translator.rb b/Formula/sql-translator.rb deleted file mode 100644 index 8f8a8a5153dad..0000000000000 --- a/Formula/sql-translator.rb +++ /dev/null @@ -1,38 +0,0 @@ -class SqlTranslator < Formula - desc "Manipulate structured data definitions (SQL and more)" - homepage "https://github.com/dbsrgits/sql-translator/" - url "https://cpan.metacpan.org/authors/id/I/IL/ILMARI/SQL-Translator-0.11024.tar.gz" - sha256 "5bde9d6f67850089ef35a9296d6f53e5ee8e991438366b71477f3f27c1581bb1" - - bottle do - cellar :any_skip_relocation - sha256 "301a5bf24c4091a864526cc9a8db75aba078d09c076557653f488678272df469" => :mojave - sha256 "e18c4a3f9b49dfb99675f12ce82a3762ea34970b741a9c1e3a70936234c0048e" => :high_sierra - sha256 "ad3e150727e9163fc385a22ff049bac1ab013ec14fc2499be30c558daf5e2078" => :sierra - sha256 "e90e93b46d07158b9221c55f3a95dc438a8adc0bf965492438a5dc6e66dad22d" => :el_capitan - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV["PERL_MM_OPT"] = "INSTALL_BASE=#{libexec}" - - system "perl", "Makefile.PL", "--defaultdeps" - system "make", "install" - - bin.install Dir["#{libexec}/bin/sqlt*"] - man1.install Dir["#{libexec}/man/man1/sqlt*.1"] - bin.env_script_all_files libexec/"bin", :PERL5LIB => ENV["PERL5LIB"] - end - - test do - command = "#{bin}/sqlt -f MySQL -t PostgreSQL --no-comments -" - sql_input = "create table sqlt ( id int AUTO_INCREMENT );" - sql_output = <<~EOS - CREATE TABLE "sqlt" ( - "id" serial - ); - - EOS - assert_equal sql_output, pipe_output(command, sql_input) - end -end diff --git a/Formula/sqlcipher.rb b/Formula/sqlcipher.rb deleted file mode 100644 index a8b0818515b40..0000000000000 --- a/Formula/sqlcipher.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Sqlcipher < Formula - desc "SQLite extension providing 256-bit AES encryption" - homepage "https://www.zetetic.net/sqlcipher/" - url "https://github.com/sqlcipher/sqlcipher/archive/v4.0.1.tar.gz" - sha256 "2f803017378c7479cb791be59b7bad8392a15acddbcc094e4433581fe421f4ca" - head "https://github.com/sqlcipher/sqlcipher.git" - - bottle do - cellar :any - sha256 "8ba2fd076a260e4ac32148ca6920afde9866a46396d9ce55a71f7053ce87a9fb" => :mojave - sha256 "48860256ecb6db7e072e6fca8db450c20323cd9c0874349c4317e1f29418127e" => :high_sierra - sha256 "8fcdf53d01a09aeec89caecaf3e4dd6fbc4b8c91058db7eb29d328788a286b3f" => :sierra - end - - depends_on "openssl" - - def install - args = %W[ - --prefix=#{prefix} - --enable-tempstore=yes - --with-crypto-lib=#{Formula["openssl"].opt_prefix} - --enable-load-extension - --disable-tcl - ] - - # Build with full-text search enabled - args << "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5" - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - path = testpath/"school.sql" - path.write <<~EOS - create table students (name text, age integer); - insert into students (name, age) values ('Bob', 14); - insert into students (name, age) values ('Sue', 12); - insert into students (name, age) values ('Tim', json_extract('{"age": 13}', '$.age')); - select name from students order by age asc; - EOS - - names = shell_output("#{bin}/sqlcipher < #{path}").strip.split("\n") - assert_equal %w[Sue Tim Bob], names - end -end diff --git a/Formula/sqldiff.rb b/Formula/sqldiff.rb deleted file mode 100644 index e9dffdb79a7dd..0000000000000 --- a/Formula/sqldiff.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Sqldiff < Formula - desc "Displays the differences between SQLite databases" - homepage "https://www.sqlite.org/sqldiff.html" - url "https://sqlite.org/2018/sqlite-src-3260000.zip" - version "3.26.0" - sha256 "e042825ba823d61db7edc45e52655c0434903a1b54bbe85a55880c9aa5884f7b" - - bottle do - cellar :any_skip_relocation - sha256 "070850ae9af4ae3bfa29dfebf6cfc6b392db66eadb1222d7372c4ade50a24959" => :mojave - sha256 "56d0ddecb620ebae3e1abffec56ea4489ed8b9543059dee7763e04938f519de8" => :high_sierra - sha256 "3dc28211099d6381e78cd3a715f4e220639a11168ea0e4e13fae50ac2af693c7" => :sierra - end - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "sqldiff" - bin.install "sqldiff" - end - - test do - dbpath = testpath/"test.sqlite" - sqlpath = testpath/"test.sql" - sqlpath.write "create table test (name text);" - system "/usr/bin/sqlite3 #{dbpath} < #{sqlpath}" - assert_equal "test: 0 changes, 0 inserts, 0 deletes, 0 unchanged", - shell_output("#{bin}/sqldiff --summary #{dbpath} #{dbpath}").strip - end -end diff --git a/Formula/sqlite-analyzer.rb b/Formula/sqlite-analyzer.rb deleted file mode 100644 index 9fbdd8bff4358..0000000000000 --- a/Formula/sqlite-analyzer.rb +++ /dev/null @@ -1,36 +0,0 @@ -class SqliteAnalyzer < Formula - desc "Analyze how space is allocated inside an SQLite file" - homepage "https://www.sqlite.org/" - url "https://sqlite.org/2018/sqlite-src-3260000.zip" - version "3.26.0" - sha256 "e042825ba823d61db7edc45e52655c0434903a1b54bbe85a55880c9aa5884f7b" - - bottle do - cellar :any_skip_relocation - sha256 "c9e6a16dd9ded73db02722a802797c3c7cf9555d828462cae2f33d51c5c118e0" => :mojave - sha256 "76c127180a78cdc88ab9525a7968c80bd0b96dbded1a79d2e3f66d83cdbcc7b6" => :high_sierra - sha256 "196e2be7620473c285d137e00ce2a8a0c5f1549a2eb1d7d1bb56278993d13396" => :sierra - end - - def install - sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - system "./configure", "--disable-debug", - "--with-tcl=#{sdkprefix}/System/Library/Frameworks/Tcl.framework/", - "--prefix=#{prefix}" - system "make", "sqlite3_analyzer" - bin.install "sqlite3_analyzer" - end - - test do - dbpath = testpath/"school.sqlite" - sqlpath = testpath/"school.sql" - sqlpath.write <<~EOS - create table students (name text, age integer); - insert into students (name, age) values ('Bob', 14); - insert into students (name, age) values ('Sue', 12); - insert into students (name, age) values ('Tim', 13); - EOS - system "/usr/bin/sqlite3 #{dbpath} < #{sqlpath}" - system bin/"sqlite3_analyzer", dbpath - end -end diff --git a/Formula/sqlite.rb b/Formula/sqlite.rb deleted file mode 100644 index f95f9d1a9360f..0000000000000 --- a/Formula/sqlite.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Sqlite < Formula - desc "Command-line interface for SQLite" - homepage "https://sqlite.org/" - url "https://sqlite.org/2018/sqlite-autoconf-3260000.tar.gz" - version "3.26.0" - sha256 "5daa6a3fb7d1e8c767cd59c4ded8da6e4b00c61d3b466d0685e35c4dd6d7bf5d" - - bottle do - cellar :any - sha256 "810b44b487f59d73ef873406f44a1bd355516cea45a2886e2edc749e29e34cc8" => :mojave - sha256 "cfa0666026d5360cd73cfb8a51de830fca81db8c6f85743222503204812a5954" => :high_sierra - sha256 "9c8e266e082a3b6ba61193759db4361812685228c2d4003c1ee74634194886cc" => :sierra - end - - keg_only :provided_by_macos, "macOS provides an older sqlite3" - - option "with-fts", "Enable the FTS3 module" - option "with-fts5", "Enable the FTS5 module (experimental)" - option "with-functions", "Enable more math and string functions for SQL queries" - option "with-json1", "Enable the JSON1 extension" - - depends_on "readline" - - resource "functions" do - url "https://sqlite.org/contrib/download/extension-functions.c?get=25" - version "2010-02-06" - sha256 "991b40fe8b2799edc215f7260b890f14a833512c9d9896aa080891330ffe4052" - end - - def install - ENV.append "CPPFLAGS", "-DSQLITE_ENABLE_COLUMN_METADATA=1" - # Default value of MAX_VARIABLE_NUMBER is 999 which is too low for many - # applications. Set to 250000 (Same value used in Debian and Ubuntu). - ENV.append "CPPFLAGS", "-DSQLITE_MAX_VARIABLE_NUMBER=250000" - ENV.append "CPPFLAGS", "-DSQLITE_ENABLE_RTREE=1" - ENV.append "CPPFLAGS", "-DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1" if build.with? "fts" - ENV.append "CPPFLAGS", "-DSQLITE_ENABLE_FTS5=1" if build.with? "fts5" - ENV.append "CPPFLAGS", "-DSQLITE_ENABLE_JSON1=1" if build.with? "json1" - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --enable-dynamic-extensions - --enable-readline - --disable-editline - ] - - system "./configure", *args - system "make", "install" - - if build.with? "functions" - buildpath.install resource("functions") - system ENV.cc, "-fno-common", - "-dynamiclib", - "extension-functions.c", - "-o", "libsqlitefunctions.dylib", - *ENV.cflags.to_s.split - lib.install "libsqlitefunctions.dylib" - end - end - - def caveats - s = "" - if build.with? "functions" - s += <<~EOS - Usage instructions for applications calling the sqlite3 API functions: - - In your application, call sqlite3_enable_load_extension(db,1) to - allow loading external libraries. Then load the library libsqlitefunctions - using sqlite3_load_extension; the third argument should be 0. - See https://sqlite.org/loadext.html. - Select statements may now use these functions, as in - SELECT cos(radians(inclination)) FROM satsum WHERE satnum = 25544; - - Usage instructions for the sqlite3 program: - - If the program is built so that loading extensions is permitted, - the following will work: - sqlite> SELECT load_extension('#{lib}/libsqlitefunctions.dylib'); - sqlite> select cos(radians(45)); - 0.707106781186548 - EOS - end - - user_history = "~/.sqlite_history" - user_history_path = File.expand_path(user_history) - if File.exist?(user_history_path) && File.read(user_history_path).include?("\\040") - s += <<~EOS - Homebrew has detected an existing SQLite history file that was created - with the editline library. The current version of this formula is - built with Readline. To back up and convert your history file so that - it can be used with Readline, run: - - sed -i~ 's/\\\\040/ /g' #{user_history} - - before using the `sqlite` command-line tool again. Otherwise, your - history will be lost. - EOS - end - s - end - - test do - path = testpath/"school.sql" - path.write <<~EOS - create table students (name text, age integer); - insert into students (name, age) values ('Bob', 14); - insert into students (name, age) values ('Sue', 12); - insert into students (name, age) values ('Tim', 13); - select name from students order by age asc; - EOS - - names = shell_output("#{bin}/sqlite3 < #{path}").strip.split("\n") - assert_equal %w[Sue Tim Bob], names - end -end diff --git a/Formula/sqliteodbc.rb b/Formula/sqliteodbc.rb deleted file mode 100644 index 11759585e1b50..0000000000000 --- a/Formula/sqliteodbc.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Sqliteodbc < Formula - desc "SQLite ODBC driver" - homepage "https://ch-werner.homepage.t-online.de/sqliteodbc/" - url "https://ch-werner.homepage.t-online.de/sqliteodbc/sqliteodbc-0.9996.tar.gz" - sha256 "8afbc9e0826d4ff07257d7881108206ce31b5f719762cbdb4f68201b60b0cb4e" - - bottle do - cellar :any - rebuild 1 - sha256 "a49afbd00eb6230ecf0a0a4573c961fe697ab6326998f2a894348d8509dc1c0d" => :mojave - sha256 "6afd81a210f7a0f7b70e70d4d5b89a659c4cf2c9916d85ff65d89ef042bdba52" => :high_sierra - sha256 "73755a497df2713b8f3cc9cd0f19df24aaab01f33bf001be3718c5f8318c784c" => :sierra - end - - depends_on "sqlite" - depends_on "unixodbc" - - def install - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - lib.mkdir - system "./configure", "--prefix=#{prefix}", "--with-odbc=#{Formula["unixodbc"].opt_prefix}", "--with-sqlite3=#{Formula["sqlite"].opt_prefix}" - system "make" - system "make", "install" - lib.install_symlink "#{lib}/libsqlite3odbc.dylib" => "libsqlite3odbc.so" - end - - test do - output = shell_output("#{Formula["unixodbc"].opt_bin}/dltest #{lib}/libsqlite3odbc.so") - assert_equal "SUCCESS: Loaded #{lib}/libsqlite3odbc.so\n", output - end -end diff --git a/Formula/sqlmap.rb b/Formula/sqlmap.rb deleted file mode 100644 index 2cd0d50990f45..0000000000000 --- a/Formula/sqlmap.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Sqlmap < Formula - desc "Penetration testing for SQL injection and database servers" - homepage "http://sqlmap.org" - url "https://github.com/sqlmapproject/sqlmap/archive/1.3.tar.gz" - sha256 "7ea4684e01956e411960a5fd8a6d5b74b3f5972c2a3c6553fbd1e729819190ff" - head "https://github.com/sqlmapproject/sqlmap.git" - - bottle :unneeded - - def install - libexec.install Dir["*"] - - bin.install_symlink libexec/"sqlmap.py" - bin.install_symlink bin/"sqlmap.py" => "sqlmap" - - bin.install_symlink libexec/"sqlmapapi.py" - bin.install_symlink bin/"sqlmapapi.py" => "sqlmapapi" - end - - test do - data = %w[Bob 14 Sue 12 Tim 13] - create = "create table students (name text, age integer);\n" - data.each_slice(2) do |n, a| - create << "insert into students (name, age) values ('#{n}', '#{a}');\n" - end - pipe_output("sqlite3 school.sqlite", create, 0) - select = "select name, age from students order by age asc;" - args = %W[--batch -d sqlite://school.sqlite --sql-query "#{select}"] - output = shell_output("#{bin}/sqlmap #{args.join(" ")}") - data.each_slice(2) { |n, a| assert_match "#{n}, #{a}", output } - end -end diff --git a/Formula/sqlparse.rb b/Formula/sqlparse.rb deleted file mode 100644 index d3efeea7f0e6f..0000000000000 --- a/Formula/sqlparse.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Sqlparse < Formula - include Language::Python::Virtualenv - - desc "Non-validating SQL parser" - homepage "https://github.com/andialbrecht/sqlparse" - url "https://files.pythonhosted.org/packages/79/3c/2ad76ba49f9e3d88d2b58e135b7821d93741856d1fe49970171f73529303/sqlparse-0.2.4.tar.gz" - sha256 "ce028444cfab83be538752a2ffdb56bc417b7784ff35bb9a3062413717807dec" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "608b6e92c003594456ab481c7dcdbd876d402fd96c97ceeaba0dcf5853648319" => :mojave - sha256 "477a0a456ef2dd768bbda3324e9b2fea70b9359402423051f93a5d7e4a6318dd" => :high_sierra - sha256 "9c77ae1a2ca8a0cfe79197762b9c60be451b827cf72f616542547ec280b3acb3" => :sierra - end - - depends_on "python" - - def install - virtualenv_install_with_resources - end - - test do - expected = <<~EOS.chomp - select * - from foo - EOS - output = pipe_output("#{bin}/sqlformat - -a", "select * from foo", 0) - assert_equal expected, output - end -end diff --git a/Formula/sqoop.rb b/Formula/sqoop.rb deleted file mode 100644 index f44eebe57833c..0000000000000 --- a/Formula/sqoop.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Sqoop < Formula - desc "Transfer bulk data between Hadoop and structured datastores" - homepage "https://sqoop.apache.org/" - url "https://archive.apache.org/dist/sqoop/1.4.6/sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz" - version "1.4.6" - sha256 "d582e7968c24ff040365ec49764531cb76dfa22c38add5f57a16a57e70d5d496" - revision 1 - - bottle :unneeded - - depends_on "coreutils" - depends_on "hadoop" - depends_on "hbase" - depends_on "hive" - depends_on :java => "1.6+" - depends_on "zookeeper" - - # Patch for readlink -f missing on macOS. Should be fixed in 1.4.7. - # https://issues.apache.org/jira/browse/SQOOP-2531 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/77adf73/sqoop/1.4.6.patch" - sha256 "f13af5c6525f5bf8f3b993c3ece4f21133680fdbebb663fd4b7b6db9039b07b4" - end - - def sqoop_envs - <<~EOS - export HADOOP_HOME="#{Formula["hadoop"].opt_prefix}" - export HBASE_HOME="#{HOMEBREW_PREFIX}" - export HIVE_HOME="#{HOMEBREW_PREFIX}" - export HCAT_HOME="#{HOMEBREW_PREFIX}" - export ZOOCFGDIR="#{etc}/zookeeper" - export ZOOKEEPER_HOME="#{Formula["zookeeper"].opt_prefix}" - EOS - end - - def install - libexec.install %w[bin conf lib] - libexec.install Dir["*.jar"] - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.6+")) - - # Install a sqoop-env.sh file - envs = libexec/"conf/sqoop-env.sh" - envs.write(sqoop_envs) unless envs.exist? - end - - def caveats; <<~EOS - Hadoop, Hive, HBase and ZooKeeper must be installed and configured - for Sqoop to work. - EOS - end - - test do - assert_match /#{version}/, shell_output("#{bin}/sqoop version") - end -end diff --git a/Formula/sqtop.rb b/Formula/sqtop.rb deleted file mode 100644 index a2c49979c4224..0000000000000 --- a/Formula/sqtop.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sqtop < Formula - desc "Display information about active connections for a Squid proxy" - homepage "https://github.com/paleg/sqtop" - url "https://github.com/paleg/sqtop/archive/v2015-02-08.tar.gz" - version "2015-02-08" - sha256 "eae4c8bc16dbfe70c776d990ecf14328acab0ed736f0bf3bd1647a3ac2f5e8bf" - - bottle do - cellar :any_skip_relocation - sha256 "27786a7ca63d00ecb47e9f1e3e844a077d38048871cec3c03308831716338dc1" => :mojave - sha256 "fe9a704fdf7f24dadba6b4f7cc20f8f07d93c19450701e01b408ea2f7574ec63" => :high_sierra - sha256 "30f51d2886adf914eef22af21dfac92f544c59c88b6e7961972eb6702e48d0c0" => :sierra - sha256 "6d838378cae0971561da60dff1e887bf03b60d1a0ff198a5d468654ef790d9e9" => :el_capitan - sha256 "29291fedaa06b7b680e44e1b82f643f7ddffc67435312b7c2f3654df0728cb8b" => :yosemite - sha256 "f1ab5347b698d2e1221a5111fec52022159afc898e5ad7a5318becb23cd35543" => :mavericks - sha256 "39b62e9a679009e6dc0106a6e63d229b6c310d222966a0f69b90ec388926102e" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/sqtop --help") - end -end diff --git a/Formula/squashfs.rb b/Formula/squashfs.rb deleted file mode 100644 index 05445ea8f24a1..0000000000000 --- a/Formula/squashfs.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Squashfs < Formula - desc "Compressed read-only file system for Linux" - homepage "https://squashfs.sourceforge.io/" - url "https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.3/squashfs4.3.tar.gz" - sha256 "0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6" - revision 1 - - bottle do - cellar :any - sha256 "af10950ae4b9e2acd20ba275b8ea5ca4544e87951ff3c2db94735596c7f3ad39" => :mojave - sha256 "06c8d10e167295f91684c9c5bb596143189f4de5f4e1cba7b3f45ab0ee9ed1cb" => :high_sierra - sha256 "cbf0fba9b2b73aff6465c8611453b832886159c6e12191eb27ab39e58e9ef577" => :sierra - sha256 "192a9b40b56ded7b5d97c1ae9a587173f4380e0a71ec8332dc475d9c5beeb5e1" => :el_capitan - end - - depends_on "lzo" - depends_on "xz" - depends_on "lz4" => :optional - - # Patch necessary to emulate the sigtimedwait process otherwise we get build failures - # Also clang fixes, extra endianness knowledge and a bundle of other macOS fixes. - # Originally from https://github.com/plougher/squashfs-tools/pull/3 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/05ae0eb1/squashfs/squashfs-osx-bundle.diff" - sha256 "276763d01ec675793ddb0ae293fbe82cbf96235ade0258d767b6a225a84bc75f" - end - - def install - args = %W[ - XATTR_SUPPORT=0 - EXTRA_CFLAGS=-std=gnu89 - LZO_SUPPORT=1 - LZO_DIR=#{Formula["lzo"].opt_prefix} - XZ_SUPPORT=1 - XZ_DIR=#{Formula["xz"].opt_prefix} - LZMA_XZ_SUPPORT=1 - ] - args << "LZ4_SUPPORT=1" if build.with? "lz4" - - cd "squashfs-tools" do - system "make", *args - bin.install %w[mksquashfs unsquashfs] - end - doc.install %w[ACKNOWLEDGEMENTS INSTALL OLD-READMEs PERFORMANCE.README README-4.3] - end - - test do - assert_match version.to_s, shell_output("#{bin}/unsquashfs -v", 1) - end -end diff --git a/Formula/squashfuse.rb b/Formula/squashfuse.rb deleted file mode 100644 index c283a94f18ed8..0000000000000 --- a/Formula/squashfuse.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Squashfuse < Formula - desc "FUSE filesystem to mount squashfs archives" - homepage "https://github.com/vasi/squashfuse" - url "https://github.com/vasi/squashfuse/releases/download/0.1.103/squashfuse-0.1.103.tar.gz" - sha256 "42d4dfd17ed186745117cfd427023eb81effff3832bab09067823492b6b982e7" - - bottle do - cellar :any - sha256 "f4cb4305f7773fbf927d51a401453c3cdee1f1d48da2ef33d8fd41d526fa7c0d" => :mojave - sha256 "ada7e939ff42fcd9fb6b1fb81ab596463d6149ff592f73ca924b5b9dca5ddfc4" => :high_sierra - sha256 "c1898c81ae091097ae2502ecbdebdd1831db302dd74b814003191007a4d5f018" => :sierra - sha256 "bf4e6ca88d094fd7d92fbab61dd1c3a4e71b60d7668d23b6044c90e8167833c5" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "lz4" - depends_on "lzo" - depends_on :osxfuse - depends_on "squashfs" - depends_on "xz" - depends_on "zstd" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - # Unfortunately, making/testing a squash mount requires sudo priviledges, so - # just test that squashfuse execs for now. - test do - output = shell_output("#{bin}/squashfuse --version 2>&1", 254) - assert_match version.to_s, output - end -end diff --git a/Formula/squid.rb b/Formula/squid.rb deleted file mode 100644 index 5cafc55d0506b..0000000000000 --- a/Formula/squid.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Squid < Formula - desc "Advanced proxy caching server for HTTP, HTTPS, FTP, and Gopher" - homepage "http://www.squid-cache.org/" - url "http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.28.tar.xz" - sha256 "fd41b622e65c661ada9a98b0338c59e6f2d2ffdb367fe5c8c7212c535e298ed8" - - bottle do - sha256 "6edf20106047e4b1db2fc4a45a77ebac6bb2f594342857e868f14196fa754fa3" => :mojave - sha256 "153519db601c1579c3b845723a7db4ce034a5df6ded7b23e10a33ba886b03893" => :high_sierra - sha256 "d112d9cb8fc0de514eb4affaedda4e7df11a6d2927b2e072143860e4dcab74e2" => :sierra - sha256 "dc110f871460f553c232e41e62097447ec0ba3da35a6395ff2c521e51ba47c73" => :el_capitan - end - - head do - url "lp:squid", :using => :bzr - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl" - - def install - # https://stackoverflow.com/questions/20910109/building-squid-cache-on-os-x-mavericks - ENV.append "LDFLAGS", "-lresolv" - - # For --disable-eui, see: - # http://www.squid-cache.org/mail-archive/squid-users/201304/0040.html - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{etc} - --enable-ssl - --enable-ssl-crtd - --disable-eui - --enable-pf-transparent - --with-included-ltdl - --with-openssl - --enable-delay-pools - --enable-disk-io=yes - --enable-removal-policies=yes - --enable-storeio=yes - ] - - system "./bootstrap.sh" if build.head? - system "./configure", *args - system "make", "install" - end - - plist_options :manual => "squid" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/squid - -N - -d 1 - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - # This test should start squid and then check it runs correctly. - # However currently dies under the sandbox and "Current Directory" - # seems to be set hard on HOMEBREW_PREFIX/var/cache/squid. - # https://github.com/Homebrew/homebrew/pull/44348#issuecomment-143477353 - # If you can fix this, please submit a PR. Thank you! - assert_match version.to_s, shell_output("#{sbin}/squid -v") - end -end diff --git a/Formula/squirrel.rb b/Formula/squirrel.rb deleted file mode 100644 index c1967a9ad34ac..0000000000000 --- a/Formula/squirrel.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Squirrel < Formula - desc "High level, imperative, object-oriented programming language" - homepage "http://www.squirrel-lang.org" - url "https://downloads.sourceforge.net/project/squirrel/squirrel3/squirrel%203.1%20stable/squirrel_3_1_stable.tar.gz" - version "3.1.0" - sha256 "4845a7fb82e4740bde01b0854112e3bb92a0816ad959c5758236e73f4409d0cb" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "3080041c6bda4ffb009faea5924917586204cb004f9a01ac434ff86e0cdb1cd1" => :mojave - sha256 "c57b21bbdcac5cbaf3d7319d64f08c150d16592138bdf1027e7032f579e10091" => :high_sierra - sha256 "f4d3e6db56838a29cd7247f0933de64bb35a6dac581a9ade879205cbfc9d93f7" => :sierra - sha256 "0b6dab6fc2a9a9a9d68d8310977041bd20a492cfe91a6daef07638b0cea55aad" => :el_capitan - end - - # Upstream patch to fix compilation with Xcode 9 - # https://github.com/albertodemichelis/squirrel/commit/a3a78eec - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/dcaba40/squirrel/xcode9.patch" - sha256 "7821b25b11c477341553c29dce5fb3fca2541e829276be2b2e3cd0c5b5a225d2" - end - - def install - system "make" - prefix.install %w[bin include lib] - doc.install Dir["doc/*.pdf"] - doc.install %w[etc samples] - # See: https://github.com/Homebrew/homebrew/pull/9977 - (lib+"pkgconfig/libsquirrel.pc").write pc_file - end - - def pc_file; <<~EOS - prefix=#{opt_prefix} - exec_prefix=${prefix} - libdir=/${exec_prefix}/lib - includedir=/${prefix}/include - bindir=/${prefix}/bin - ldflags= -L/${prefix}/lib - - Name: libsquirrel - Description: squirrel library - Version: #{version} - - Requires: - Libs: -L${libdir} -lsquirrel -lsqstdlib - Cflags: -I${includedir} - EOS - end - - test do - (testpath/"hello.nut").write <<~EOS - print("hello"); - EOS - assert_equal "hello", shell_output("#{bin}/sq #{testpath}/hello.nut").chomp - end -end diff --git a/Formula/sratom.rb b/Formula/sratom.rb deleted file mode 100644 index 6cb55514e5e94..0000000000000 --- a/Formula/sratom.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Sratom < Formula - desc "Library for serializing LV2 atoms to/from RDF" - homepage "https://drobilla.net/software/sratom/" - url "https://download.drobilla.net/sratom-0.6.0.tar.bz2" - sha256 "440ac2b1f4f0b7878f8b95698faa1e8f8c50929a498f68ec5d066863626a3d43" - - bottle do - cellar :any - sha256 "68d2e3350e8fc8f53e6f90892c1fd08c0c0929f352970d55f01367ca86ab43e9" => :mojave - sha256 "7e094cd5a67863974ef62270e7ad71a9b20648bb480b755c4df0e7d35bd04b9b" => :high_sierra - sha256 "9426748f5689b34336762037f1c594b0284ca071abb64f3abc2a4fd5b01866d2" => :sierra - sha256 "eec5d4022ef66509c8a5f6b37b772b5a288dfe2986eb58c00da1c69c959306eb" => :el_capitan - sha256 "e05f2f4d4f22571f883c1a41498aee63bd1afe8227f6817b80c6cc57f9d22bb8" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "lv2" - depends_on "serd" - depends_on "sord" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end -end diff --git a/Formula/sratoolkit.rb b/Formula/sratoolkit.rb deleted file mode 100644 index fcc147cd6479e..0000000000000 --- a/Formula/sratoolkit.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Sratoolkit < Formula - desc "Data tools for INSDC Sequence Read Archive" - homepage "https://github.com/ncbi/sra-tools" - url "https://github.com/ncbi/sra-tools/archive/2.9.3.tar.gz" - sha256 "531c8ce774c9807df091005a23cdf88a63d6efb2be2e38342406af90e4db15c9" - head "https://github.com/ncbi/sra-tools.git" - - bottle do - cellar :any - sha256 "3f096fe6b0e114fa80664808855571f1f4b5a90791d0ff27344045541fabcc1f" => :mojave - sha256 "eae0fff7e32f0c681c804686b5dc7dacbd8d051cc2538a3344b43c3e3c7c7b8d" => :high_sierra - sha256 "0f6ea3b9f3138766a401fa0c892c888eeaeabc95409d26669985ce72aca3f123" => :sierra - end - - depends_on "hdf5" - depends_on "libmagic" - - resource "ngs-sdk" do - url "https://github.com/ncbi/ngs/archive/2.9.2.tar.gz" - sha256 "ac559009b2021f56bbfaea680c8207f1608637435136277dad9796516be0385a" - end - - resource "ncbi-vdb" do - url "https://github.com/ncbi/ncbi-vdb/archive/2.9.2.tar.gz" - sha256 "7db26cc71f7742e693ba8cff8b06fefd2244f42bda4dba4ab315aaea9b9194f0" - end - - def install - ngs_sdk_prefix = buildpath/"ngs-sdk-prefix" - resource("ngs-sdk").stage do - cd "ngs-sdk" do - system "./configure", - "--prefix=#{ngs_sdk_prefix}", - "--build=#{buildpath}/ngs-sdk-build" - system "make" - system "make", "install" - end - end - - ncbi_vdb_source = buildpath/"ncbi-vdb-source" - ncbi_vdb_build = buildpath/"ncbi-vdb-build" - ncbi_vdb_source.install resource("ncbi-vdb") - cd ncbi_vdb_source do - system "./configure", - "--prefix=#{buildpath/"ncbi-vdb-prefix"}", - "--with-ngs-sdk-prefix=#{ngs_sdk_prefix}", - "--build=#{ncbi_vdb_build}" - ENV.deparallelize { system "make" } - end - - # Fix the error: ld: library not found for -lmagic-static - # Upstream PR: https://github.com/ncbi/sra-tools/pull/105 - inreplace "tools/copycat/Makefile", "-smagic-static", "-smagic" - - system "./configure", - "--prefix=#{prefix}", - "--with-ngs-sdk-prefix=#{ngs_sdk_prefix}", - "--with-ncbi-vdb-sources=#{ncbi_vdb_source}", - "--with-ncbi-vdb-build=#{ncbi_vdb_build}", - "--build=#{buildpath}/sra-tools-build" - - system "make", "install" - - # Remove non-executable files. - rm_r [bin/"magic", bin/"ncbi"] - end - - test do - assert_match "Read 1 spots for SRR000001", shell_output("#{bin}/fastq-dump -N 1 -X 1 SRR000001") - assert_match "@SRR000001.1 EM7LVYS02FOYNU length=284", File.read("SRR000001.fastq") - end -end diff --git a/Formula/src.rb b/Formula/src.rb deleted file mode 100644 index a69b91ffa7291..0000000000000 --- a/Formula/src.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Src < Formula - desc "Simple revision control: RCS reloaded with a modern UI" - homepage "http://www.catb.org/~esr/src/" - url "http://www.catb.org/~esr/src/src-1.18.tar.gz" - sha256 "cc0897c1763f57e6627fd912a315de5554e4bb53fa0958c8578223e5379c1a58" - - bottle do - cellar :any_skip_relocation - sha256 "c5da1fd27c011587281c2e991f53e03c06b32e78b23d293be173141ca007be73" => :mojave - sha256 "7b8177edd573490081ab245c28b9b7d93ad333837d754d6ec444461977f79e3d" => :high_sierra - sha256 "7b8177edd573490081ab245c28b9b7d93ad333837d754d6ec444461977f79e3d" => :sierra - sha256 "7b8177edd573490081ab245c28b9b7d93ad333837d754d6ec444461977f79e3d" => :el_capitan - end - - head do - url "git://thyrsus.com/repositories/src.git" - depends_on "asciidoc" => :build - end - - depends_on "rcs" - - conflicts_with "srclib", :because => "both install a 'src' binary" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" if build.head? - - system "make", "install", "prefix=#{prefix}" - end - - test do - (testpath/"test.txt").write "foo" - system "#{bin}/src", "commit", "-m", "hello", "test.txt" - system "#{bin}/src", "status", "test.txt" - end -end diff --git a/Formula/srclib.rb b/Formula/srclib.rb deleted file mode 100644 index b9c7a9ca183ea..0000000000000 --- a/Formula/srclib.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Srclib < Formula - desc "Polyglot code analysis library, built for hackability" - homepage "https://srclib.org" - url "https://github.com/sourcegraph/srclib/archive/v0.2.5.tar.gz" - sha256 "f410dc87edb44bf10ce8ebd22d0b3c20b9a48fd3186ae38227380be04580574a" - head "https://github.com/sourcegraph/srclib.git" - - bottle do - rebuild 1 - sha256 "65d468b529f68033a4cb7083ceb6cf0203957b95d3c856369ef9c681880d1775" => :high_sierra - sha256 "3450a96b7d4af2d1e227b1ae188c29862fdfe1d007a49c2d88045b519a2110dd" => :sierra - sha256 "0546a39d6f96c51817faffc1b5cc28fc5654dbf61ab165ee686b6a8093b0b359" => :el_capitan - end - - depends_on "go" => :build - depends_on "godep" => :build - - def install - ENV["GOBIN"] = bin - ENV["GOPATH"] = buildpath - (buildpath/"src/sourcegraph.com/sourcegraph/srclib").install buildpath.children - - cd "src/sourcegraph.com/sourcegraph/srclib" do - system "godep", "restore" - system "go", "build", "-o", bin/"srclib", "./cmd/srclib" - prefix.install_metafiles - end - end - - test do - system "#{bin}/srclib", "info" - end -end diff --git a/Formula/srecord.rb b/Formula/srecord.rb deleted file mode 100644 index 01d0a07b3e65e..0000000000000 --- a/Formula/srecord.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Srecord < Formula - desc "Tools for manipulating EPROM load files" - homepage "https://srecord.sourceforge.io/" - url "https://downloads.sourceforge.net/project/srecord/srecord/1.64/srecord-1.64.tar.gz" - sha256 "49a4418733c508c03ad79a29e95acec9a2fbc4c7306131d2a8f5ef32012e67e2" - - bottle do - cellar :any - sha256 "6b3b825b501d1ea1635d107fb62021dde713f6da375f53f1a1fdcb59070df63a" => :mojave - sha256 "f6341ba9022e6cbc057c519fcdc7c7518247c850025777b80d2463341315d88c" => :high_sierra - sha256 "0601896fc392a13f7ef861fc3840fadfc7ddc7313763c1d374555129f4301c0d" => :sierra - sha256 "6a0df3e5fb40699d9b1198562b3b3a4e1745c3a0d12923c461246b7784b8324c" => :el_capitan - sha256 "c3c29b357c44bc3da2dbb8f23a6d83aeb637aa374fe0564eb9454e5e6b53d54c" => :yosemite - sha256 "10a04c2aca5e6f554c00aa57bd05f9c3cbe46238c9af66678dc1e6a3323c5cdb" => :mavericks - end - - depends_on "libtool" => :build - depends_on "boost" - depends_on "libgcrypt" - - # Use macOS's pstopdf - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", "LIBTOOL=glibtool" - system "make", "install" - end -end - -__END__ -diff --git a/Makefile.in b/Makefile.in -index b669f1a..b03c002 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -151,7 +151,7 @@ the-default-target: all - - etc/BUILDING.pdf: etc/BUILDING.man - $(GROFF) -Tps -s -I. -t -man etc/BUILDING.man > etc/BUILDING.ps -- ps2pdf etc/BUILDING.ps $@ -+ pstopdf etc/BUILDING.ps $@ - rm etc/BUILDING.ps - - $(datarootdir)/doc/srecord/BUILDING.pdf: .mkdir.__datarootdir__doc_srecord \ -@@ -181,7 +181,7 @@ etc/README.pdf: etc/README.man etc/new.1.1.so etc/new.1.10.so etc/new.1.11.so \ - etc/new.1.60.so etc/new.1.61.so etc/new.1.62.so \ - etc/new.1.63.so etc/new.1.7.so etc/new.1.8.so etc/new.1.9.so - $(GROFF) -Tps -s -I. -t -man etc/README.man > etc/README.ps -- ps2pdf etc/README.ps $@ -+ pstopdf etc/README.ps $@ - rm etc/README.ps - - $(datarootdir)/doc/srecord/README.pdf: .mkdir.__datarootdir__doc_srecord \ -@@ -209,7 +209,7 @@ etc/change_log.pdf: etc/change_log.man etc/new.1.1.so etc/new.1.10.so \ - etc/new.1.62.so etc/new.1.63.so etc/new.1.7.so etc/new.1.8.so \ - etc/new.1.9.so - $(GROFF) -Tps -s -I. -t -man etc/change_log.man > etc/change_log.ps -- ps2pdf etc/change_log.ps $@ -+ pstopdf etc/change_log.ps $@ - rm etc/change_log.ps - - $(datarootdir)/doc/srecord/change_log.pdf: .mkdir.__datarootdir__doc_srecord \ -@@ -283,7 +283,7 @@ etc/reference.pdf: etc/BUILDING.man etc/README.man etc/coding-style.so \ - man/man5/srec_ti_txt.5 man/man5/srec_trs80.5 \ - man/man5/srec_vmem.5 man/man5/srec_wilson.5 - $(GROFF) -Tps -s -I. -t -man etc/reference.man > etc/reference.ps -- ps2pdf etc/reference.ps $@ -+ pstopdf etc/reference.ps $@ - rm etc/reference.ps - - $(datarootdir)/doc/srecord/reference.pdf: .mkdir.__datarootdir__doc_srecord \ diff --git a/Formula/srmio.rb b/Formula/srmio.rb deleted file mode 100644 index 54c8ea982c812..0000000000000 --- a/Formula/srmio.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Srmio < Formula - desc "C library to access the PowerControl of a SRM bike power meter" - homepage "http://www.zuto.de/project/srmio/" - url "http://www.zuto.de/project/files/srmio/srmio-0.1.1~git1.tar.gz" - version "0.1.1~git1" - sha256 "00b3772202034aaada94f1f1c79a1072fac1f69d10ef0afcb751cce74e5ccd31" - - bottle do - cellar :any - sha256 "68a96377224e3eaaae6bf5b2fd984d7cdbbf62a094a52671c2e260509577e8c9" => :mojave - sha256 "5d46a88acdd891c6ab67c32215a80078946495949891c1181cc00abdda972800" => :high_sierra - sha256 "9ca9c4a2d17c7f431b1ad9899ae97ea22ec44e24a9c0c60220638c0f31f9b2c4" => :sierra - sha256 "9e45cba0daaa89683552f1feb19cd49c42d27a311113ecb204ae8c2e48231f3f" => :el_capitan - sha256 "e71a6c2fac5115cae2fe1a8b7eea9fb5800b96f908adf357a667b5df70bd7089" => :yosemite - sha256 "d0c35e531e9defc37adc487e00a18ce46b59181bbdf74d46cbc9f5618153d5e4" => :mavericks - end - - head do - url "https://github.com/rclasen/srmio.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - if build.head? - chmod 0755, "genautomake.sh" - system "./genautomake.sh" - end - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/srmcmd", "--version" - end -end diff --git a/Formula/srt.rb b/Formula/srt.rb deleted file mode 100644 index ad5cd1f22184b..0000000000000 --- a/Formula/srt.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Srt < Formula - desc "Secure Reliable Transport" - homepage "https://www.srtalliance.org/" - url "https://github.com/Haivision/srt/archive/v1.3.1.tar.gz" - sha256 "f202801d9e53cd8854fccc1ca010272076c32c318396c8f61fb9a61807c3dbea" - head "https://github.com/Haivision/srt.git" - - bottle do - cellar :any - sha256 "ca1d4f269452d216938ca7617f83eeab8c47ea51d3cd4bcb5a9fedf514a4aa3c" => :mojave - sha256 "848cb1edeaa90be70ddd2000c79f42432d881de53f4a47e00876c728b45f4fb8" => :high_sierra - sha256 "18ada4492fb671487fca41eeaaa8dcae9ebf7d096f2becb7894b8d215c7615ea" => :sierra - sha256 "52267ab27bbc19a52285505d7f9630c990cb6ed3ef5abd233bfc1a8c92b864e6" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - openssl = Formula["openssl"] - system "cmake", ".", "-DWITH_OPENSSL_INCLUDEDIR=#{openssl.opt_include}", - "-DWITH_OPENSSL_LIBDIR=#{openssl.opt_lib}", - *std_cmake_args - system "make", "install" - end - - test do - cmd = "#{bin}/stransmit file:///dev/null file://con/ 2>&1" - assert_match "Unsupported source type", shell_output(cmd, 1) - end -end diff --git a/Formula/srtp.rb b/Formula/srtp.rb deleted file mode 100644 index f555b2909fdf1..0000000000000 --- a/Formula/srtp.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Srtp < Formula - desc "Implementation of the Secure Real-time Transport Protocol" - homepage "https://github.com/cisco/libsrtp" - url "https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz" - sha256 "44fd7497bce78767e96b54a11bca520adb2ad32effd515f04bce602b60a1a50b" - head "https://github.com/cisco/libsrtp.git" - - bottle do - cellar :any - sha256 "4460696066b2fff80cd18081a69cf8647f88138e11bf9610c5dbc5cbd3002c92" => :mojave - sha256 "bcb274922744410710c235ae65707c4c30bab6d96c1273c00f1d59fc7691bb88" => :high_sierra - sha256 "5186bfcb8ad18ae451beb7e6d14c146b4a8240ba93868e761de4c2a3a5af81d6" => :sierra - sha256 "640a086f11cb6fdaadb50354062de0a1def1194c93250495924f948668a0dbc0" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "openssl" => :optional - - def install - args = %W[ - --disable-debug - --prefix=#{prefix} - ] - args << "--enable-openssl" if build.with? "openssl" - - system "./configure", *args - system "make", "test" - system "make", "shared_library" - system "make", "install" # Can't go in parallel of building the dylib - libexec.install "test/rtpw" - end - - test do - system libexec/"rtpw", "-l" - end -end diff --git a/Formula/ssdb.rb b/Formula/ssdb.rb deleted file mode 100644 index 022e54c096362..0000000000000 --- a/Formula/ssdb.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Ssdb < Formula - desc "NoSQL database supporting many data structures: Redis alternative" - homepage "http://ssdb.io/" - url "https://github.com/ideawu/ssdb/archive/1.9.4.tar.gz" - sha256 "6a24efcc906faf07c02c69975861368c1aa8e4adb3770f4bcd3dd610cdcce537" - head "https://github.com/ideawu/ssdb.git" - - bottle do - cellar :any_skip_relocation - sha256 "e0909c2c863ae8995a2a2e28caa9e14f0a410e02bed59e3e1d099264ee1f0ba8" => :mojave - sha256 "b6682e1b7e93c577e69c60308cc99a0e7124ddc48006207d963888863fb21dd9" => :high_sierra - sha256 "79903c5f68970f2c92716aa357dc7d02842ab9838aed81eb0d10a84a6b7b3277" => :sierra - sha256 "ea82ea4a73dca47ff68b7cfaf205373302709946aaecadd8d71d71741ca02f13" => :el_capitan - sha256 "24f875e83c5457735183542c8c173c01eb08bcf819dc38042f34f0114d220f3f" => :yosemite - end - - depends_on "autoconf" => :build - - def install - inreplace "tools/ssdb-cli", /^DIR=.*$/, "DIR=#{prefix}" - - system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" - system "make", "install", "PREFIX=#{prefix}" - - %w[bench cli dump repair server].each do |suffix| - bin.install "#{prefix}/ssdb-#{suffix}" - end - - ["run", "db/ssdb", "db/ssdb_slave", "log"].each do |dir| - (var/dir).mkpath - end - - inreplace "ssdb.conf" do |s| - s.gsub! "work_dir = ./var", "work_dir = #{var}/db/ssdb/" - s.gsub! "pidfile = ./var/ssdb.pid", "pidfile = #{var}/run/ssdb.pid" - s.gsub! "\toutput: log.txt", "\toutput: #{var}/log/ssdb.log" - end - - inreplace "ssdb_slave.conf" do |s| - s.gsub! "work_dir = ./var_slave", "work_dir = #{var}/db/ssdb_slave/" - s.gsub! "pidfile = ./var_slave/ssdb.pid", "pidfile = #{var}/run/ssdb_slave.pid" - s.gsub! "\toutput: log_slave.txt", "\toutput: #{var}/log/ssdb_slave.log" - end - - etc.install "ssdb.conf" - etc.install "ssdb_slave.conf" - end - - plist_options :manual => "ssdb-server #{HOMEBREW_PREFIX}/etc/ssdb.conf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/ssdb-server - #{etc}/ssdb.conf - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/ssdb.log - StandardOutPath - #{var}/log/ssdb.log - - - EOS - end - - test do - pid = fork do - Signal.trap("TERM") do - system("#{bin}/ssdb-server -d #{HOMEBREW_PREFIX}/etc/ssdb.conf") - exit - end - end - sleep(3) - Process.kill("TERM", pid) - end -end diff --git a/Formula/ssdeep.rb b/Formula/ssdeep.rb deleted file mode 100644 index 376e12299bd08..0000000000000 --- a/Formula/ssdeep.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Ssdeep < Formula - desc "Recursive piecewise hashing tool" - homepage "https://ssdeep-project.github.io/ssdeep/" - url "https://github.com/ssdeep-project/ssdeep/releases/download/release-2.14.1/ssdeep-2.14.1.tar.gz" - sha256 "ff2eabc78106f009b4fb2def2d76fb0ca9e12acf624cbbfad9b3eb390d931313" - - bottle do - cellar :any - sha256 "89e84b13c5e104f7b03a2cf3e9d679a3af57c6432f3c9daa313f9b1caa4cdfb0" => :mojave - sha256 "1c8a9a487676961755daf5688ec478a5925f3a0dfe36faeb7027878600ef2384" => :high_sierra - sha256 "84677545f87098d9c5d74719044c56616a8788f1320c9258794807dac2343328" => :sierra - sha256 "c07f5558ed32f7de17f349cbc62e56cf277d3d30c83fa7844bdf41000729dcba" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - expected = <<~EOS - ssdeep,1.1--blocksize:hash:hash,filename - 192:1xJsxlk/aMhud9Eqfpm0sfQ+CfQoDfpw3RtU:1xJsPMIdOqBCYLYYB7,"#{include}/fuzzy.h" - EOS - assert_equal expected, shell_output("#{bin}/ssdeep #{include}/fuzzy.h") - end -end diff --git a/Formula/ssed.rb b/Formula/ssed.rb deleted file mode 100644 index 0529c00ecdf76..0000000000000 --- a/Formula/ssed.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ssed < Formula - desc "Super sed stream editor" - homepage "https://sed.sourceforge.io/grabbag/ssed/" - url "https://sed.sourceforge.io/grabbag/ssed/sed-3.62.tar.gz" - sha256 "af7ff67e052efabf3fd07d967161c39db0480adc7c01f5100a1996fec60b8ec4" - - bottle do - sha256 "f9ed77103129ce1f3534eb7e7b735a72f5ea83442d46c11664b4a8a3883b1a0a" => :mojave - sha256 "0cc13b472591ed0dab6bcb69f8c08e89cc217342c655355982b44e07a5f7318c" => :high_sierra - sha256 "0834fb44e8acc946a9a7030b4313295777c3c9d8808f67c24daaaa2ce6c6a2ed" => :sierra - sha256 "6c8c5a5547c7c97e59f1f7284083f46d5e61e7ab80ac08ebdfeec4a4b4e95fbb" => :el_capitan - sha256 "7e313ca41f3a8e37bc91ab4a9d8c7acbf508cd7a89ac605df7cee3adcf108510" => :yosemite - sha256 "448b2fdfee6f84c3d72fdf29d5ccd042027a9850ea16d75b5f4ee576d8cbadcc" => :mavericks - sha256 "793435451341ea1e475bde0d46745ba233df28c5ed4bd86f7761a2fad3568fba" => :mountain_lion - end - - conflicts_with "gnu-sed", :because => "both install share/info/sed.info" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}", - "--program-prefix=s" - system "make", "install" - end - - test do - assert_equal "homebrew", - pipe_output("#{bin}/ssed s/neyd/mebr/", "honeydew", 0).chomp - end -end diff --git a/Formula/ssh-audit.rb b/Formula/ssh-audit.rb deleted file mode 100644 index 1a53ea77342a0..0000000000000 --- a/Formula/ssh-audit.rb +++ /dev/null @@ -1,21 +0,0 @@ -class SshAudit < Formula - desc "SSH server auditing" - homepage "https://github.com/arthepsy/ssh-audit" - url "https://github.com/arthepsy/ssh-audit/archive/v1.7.0.tar.gz" - sha256 "cba29cc19ec2932e4f43c720b2c49a7d179219e23482476aeb472f7463713b68" - revision 1 - head "https://github.com/arthepsy/ssh-audit.git" - - bottle :unneeded - - depends_on "python@2" - - def install - bin.install "ssh-audit.py" => "ssh-audit" - end - - test do - output = shell_output("#{bin}/ssh-audit -h 2>&1", 1) - assert_match "force ssh version 1 only", output - end -end diff --git a/Formula/ssh-copy-id.rb b/Formula/ssh-copy-id.rb deleted file mode 100644 index 7cb3ba49ba829..0000000000000 --- a/Formula/ssh-copy-id.rb +++ /dev/null @@ -1,21 +0,0 @@ -class SshCopyId < Formula - desc "Add a public key to a remote machine's authorized_keys file" - homepage "https://www.openssh.com/" - url "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz" - mirror "https://mirror.vdms.io/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz" - version "7.9p1" - sha256 "6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad" - head "https://github.com/openssh/openssh-portable.git" - - bottle :unneeded - - def install - bin.install "contrib/ssh-copy-id" - man1.install "contrib/ssh-copy-id.1" - end - - test do - output = shell_output("#{bin}/ssh-copy-id -h 2>&1", 1) - assert_match "identity_file", output - end -end diff --git a/Formula/ssh-permit-a38.rb b/Formula/ssh-permit-a38.rb deleted file mode 100644 index 47c5973c27b45..0000000000000 --- a/Formula/ssh-permit-a38.rb +++ /dev/null @@ -1,31 +0,0 @@ -class SshPermitA38 < Formula - desc "Central management and deployment for SSH keys" - homepage "https://github.com/ierror/ssh-permit-a38" - url "https://github.com/ierror/ssh-permit-a38/archive/v0.2.0.tar.gz" - sha256 "cb8d94954c0e68eb86e3009d6f067b92464f9c095b6a7754459cfce329576bd9" - - bottle do - sha256 "79aa6e33c91a8cb2dd5c2f30277bc17b26b877010cf07a49ca212e2882085c2b" => :mojave - sha256 "d4a7dc99358b86444ccde5f25ca78c1750eb28ae9e602b2021884660c88efe04" => :high_sierra - sha256 "9cd48f3b1c0bd568dd5a303bd4b69f42e84ef29e883bc5f9738cfd84030c066d" => :sierra - sha256 "548a878a784eda04a5c1601dcf17d7fb908b65eebd9fe44b39b3d7bc609d1575" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "rust" => :build - depends_on "openssl" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix - - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - system bin/"ssh-permit-a38 host 1.exmaple.com add" - - assert(File.readlines("ssh-permit.json").grep(/1.exmaple.com/).size == 1, "Test host not found in ssh-permit.json") - end -end diff --git a/Formula/ssh-vault.rb b/Formula/ssh-vault.rb deleted file mode 100644 index 64f69f53f01db..0000000000000 --- a/Formula/ssh-vault.rb +++ /dev/null @@ -1,38 +0,0 @@ -class SshVault < Formula - desc "Encrypt/decrypt using SSH keys" - homepage "https://ssh-vault.com/" - url "https://github.com/ssh-vault/ssh-vault.git", - :tag => "0.12.4", - :revision => "cc0eb0daebad1144583a943f486e086d300142b0" - head "https://github.com/ssh-vault/ssh-vault.git" - - bottle do - cellar :any_skip_relocation - sha256 "0626c48246281ef41d5153ed6b50349adef603a944b5b24e0575bb40b3712785" => :mojave - sha256 "178173c00bedfa7a48c5381d03596e8164caeb7c3ccb4447579fcdf66149192f" => :high_sierra - sha256 "886172cdae4a8cbbb7ab4caef859cc397c39de3b216044d920153e11d01cc828" => :sierra - sha256 "74a103aab77feb90dede16015dfefac1cb27483630658fa6c0f5a93aeb7fefb9" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/ssh-vault/ssh-vault").install buildpath.children - cd "src/github.com/ssh-vault/ssh-vault" do - system "dep", "ensure", "-vendor-only" - ldflags = "-s -w -X main.version=#{version}" - system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/ssh-vault", "cmd/ssh-vault/main.go" - prefix.install_metafiles - end - end - - test do - output = shell_output("echo hi | #{bin}/ssh-vault -u new create") - fingerprint = output.split("\n").first.split(";").last - cmd = "#{bin}/ssh-vault -k https://ssh-keys.online/#{fingerprint} view" - output = pipe_output(cmd, output, 0) - assert_equal "hi", output.chomp - end -end diff --git a/Formula/sshconfigfs.rb b/Formula/sshconfigfs.rb deleted file mode 100644 index 4f15ab3027f2d..0000000000000 --- a/Formula/sshconfigfs.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Sshconfigfs < Formula - desc "FUSE filesystem to dynamically build SSH config" - homepage "https://github.com/markhellewell/sshconfigfs" - url "https://github.com/markhellewell/sshconfigfs/archive/0.3.tar.gz" - sha256 "b52612b2211ca06642cee6a1abef41a53f0361ed16908372329fa464caedb74a" - revision 1 - head "https://github.com/markhellewell/sshconfigfs.git" - - bottle do - cellar :any_skip_relocation - sha256 "df2bcba207e8f5b42a13ef9c0cde8d9608cf406de517c38ecc55afe71c8d00f7" => :mojave - sha256 "5cace9c241c7d1d79df449539edd9ef624efa99a1f00b4e71a052b6e0accd3ef" => :high_sierra - sha256 "5cace9c241c7d1d79df449539edd9ef624efa99a1f00b4e71a052b6e0accd3ef" => :sierra - end - - depends_on :osxfuse - depends_on "python" - - resource "fusepy" do - url "https://github.com/terencehonles/fusepy/archive/v2.0.2.tar.gz" - sha256 "31fe3f8731d33200fea2f97ab64a1b8e68dae0b48c5c1bd9e7485a9905636bc6" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - resource("fusepy").stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - bin.install "sshconfigfs.py" => "sshconfigfs" - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - plist_options :manual => "sshconfigfs" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/sshconfigfs - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - # We start `sshconfigfs` in the background and kill it after a - # single second. This should give us enough time to catch the - # "INFO starting" message. Actually `sshconfigfs` will die by - # itself just after printing the starting message because OSXFUSE - # cannot run inside the test sandbox (`deny - # forbidden-exec-sugid`). - (testpath/".ssh/config.d").mkpath - output = pipe_output("(#{bin}/sshconfigfs & PID=$! && sleep 1 ; kill $PID) 2>&1") - assert_match "INFO starting", output - end -end diff --git a/Formula/sshfs.rb b/Formula/sshfs.rb deleted file mode 100644 index 611a314dbf41e..0000000000000 --- a/Formula/sshfs.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Sshfs < Formula - desc "File system client based on SSH File Transfer Protocol" - homepage "https://osxfuse.github.io/" - url "https://github.com/libfuse/sshfs/releases/download/sshfs-2.10/sshfs-2.10.tar.gz" - sha256 "70845dde2d70606aa207db5edfe878e266f9c193f1956dd10ba1b7e9a3c8d101" - - bottle do - cellar :any - sha256 "e4c05b69dfe45387aa294ca3fa675cf487db6c99b795859730ec6900fa61ec46" => :mojave - sha256 "283859a4868df7d91fc4a6fcef6ddc590957a661f833fbf81da25f6f2c72a585" => :high_sierra - sha256 "534fc64f25ee6757e4fd802988deee9d2df8f1c38604d36c525a12a67b1d23fa" => :sierra - sha256 "27c5e0d7f9bed4219c12267bd459fbd25a143abf0a9e3f5fa12fd0b587f10007" => :el_capitan - sha256 "61c578fbd666a6c2b5b452a7429e3fd5a64da153652d428386c41b4ebb6e30fa" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on :osxfuse - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/sshfs", "--version" - end -end diff --git a/Formula/sshguard.rb b/Formula/sshguard.rb deleted file mode 100644 index 2ec9bbe8518da..0000000000000 --- a/Formula/sshguard.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Sshguard < Formula - desc "Protect from brute force attacks against SSH" - homepage "https://www.sshguard.net/" - url "https://downloads.sourceforge.net/project/sshguard/sshguard/2.2.0/sshguard-2.2.0.tar.gz" - sha256 "2aff07fee6ec33e4ffd5411916b75189977af1d77b86dac5f3834dd3aa3656c2" - revision 1 - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "64f1cdc325ebfd0cbb29926c2e98e0d1c04ea8661a05aecab217c63a2d23244a" => :mojave - sha256 "2b979c2504070e5f23e74567eb309128a89ce468e1fbdb0507467fa59f48fe59" => :high_sierra - sha256 "db07c4e6798f424c73a343fd52ce08b026bfa7457e88de3c9af7a92428312df0" => :sierra - sha256 "e7abf2b9d63c4051e10e565f37cbf069748ff7836932aa1e3971abd98356d6ac" => :el_capitan - end - - head do - url "https://bitbucket.org/sshguard/sshguard.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "docutils" => :build - end - - def install - system "autoreconf", "-fiv" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - inreplace man8/"sshguard.8", "%PREFIX%/etc/", "#{etc}/" - cp "examples/sshguard.conf.sample", "examples/sshguard.conf" - inreplace "examples/sshguard.conf" do |s| - s.gsub! /^#BACKEND=.*$/, "BACKEND=\"#{opt_libexec}/sshg-fw-#{firewall}\"" - if MacOS.version >= :sierra - s.gsub! %r{^#LOGREADER="/usr/bin/log}, "LOGREADER=\"/usr/bin/log" - else - s.gsub! /^#FILES.*$/, "FILES=#{log_path}" - end - end - etc.install "examples/sshguard.conf" - end - - def firewall - (MacOS.version >= :lion) ? "pf" : "ipfw" - end - - def log_path - (MacOS.version >= :lion) ? "/var/log/system.log" : "/var/log/secure.log" - end - - def caveats - if MacOS.version >= :lion then <<~EOS - Add the following lines to /etc/pf.conf to block entries in the sshguard - table (replace $ext_if with your WAN interface): - - table persist - block in quick on $ext_if proto tcp from to any port 22 label "ssh bruteforce" - - Then run sudo pfctl -f /etc/pf.conf to reload the rules. - EOS - end - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - ProgramArguments - - #{opt_sbin}/sshguard - - RunAtLoad - - - - EOS - end - - test do - require "pty" - PTY.spawn(sbin/"sshguard", "-v") do |r, _w, pid| - begin - assert_equal "SSHGuard #{version}", r.read.strip - ensure - Process.wait pid - end - end - end -end diff --git a/Formula/sshrc.rb b/Formula/sshrc.rb deleted file mode 100644 index a83b31e955811..0000000000000 --- a/Formula/sshrc.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Sshrc < Formula - desc "Bring your .bashrc, .vimrc, etc. with you when you SSH" - homepage "https://github.com/Russell91/sshrc" - url "https://github.com/Russell91/sshrc/archive/0.6.2.tar.gz" - sha256 "ecae095eb69dedc3ea1058c2d6f7028ec626956f5f498a192d66d135aa2fad3d" - head "https://github.com/Russell91/sshrc.git" - - bottle :unneeded - - def install - bin.install %w[sshrc moshrc] - end - - test do - touch testpath/".sshrc" - (testpath/"ssh").write <<~EOS - #!/bin/sh - true - EOS - chmod 0755, testpath/"ssh" - ENV.prepend_path "PATH", testpath - system "#{bin}/sshrc", "localhost" - end -end diff --git a/Formula/sshtrix.rb b/Formula/sshtrix.rb deleted file mode 100644 index 8951b12ee026a..0000000000000 --- a/Formula/sshtrix.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Sshtrix < Formula - desc "SSH login cracker" - homepage "http://www.nullsecurity.net/tools/cracker.html" - url "https://github.com/nullsecuritynet/tools/raw/master/cracker/sshtrix/release/sshtrix-0.0.2.tar.gz" - sha256 "dc90a8b2fbb62689d1b59333413b56a370a0715c38bf0792f517ed6f9763f5df" - revision 1 - - bottle do - cellar :any - sha256 "d684736818642560692ea0a2efa0bb2d43f41bb128312f0161a5ad21fabd8ad4" => :mojave - sha256 "9e5ef47ca5780f4e6e855cb787a6f7926e90f007b5f45bd600f35c3e9782d393" => :high_sierra - sha256 "820c6cbfc33a7705efdc801657111376ae4380a0a068df08011c2a0c6c3f50ee" => :sierra - sha256 "4aa5c719528b14df3b6aedb0db15e97767492703c2fb3de0a48927224e1f126d" => :el_capitan - end - - depends_on "libssh" - - def install - # https://github.com/nullsecuritynet/tools/issues/6 - inreplace "Makefile", "-lssh_threads", "" - - bin.mkpath - system "make", "sshtrix", "CC=#{ENV.cc}" - system "make", "DISTDIR=#{prefix}", "install" - end - - test do - system "#{bin}/sshtrix", "-V" - system "#{bin}/sshtrix", "-O" - end -end diff --git a/Formula/sshuttle.rb b/Formula/sshuttle.rb deleted file mode 100644 index ad2649ca2f79f..0000000000000 --- a/Formula/sshuttle.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Sshuttle < Formula - include Language::Python::Virtualenv - - desc "Proxy server that works as a poor man's VPN" - homepage "https://github.com/sshuttle/sshuttle" - url "https://github.com/sshuttle/sshuttle.git", - :tag => "v0.78.4", - :revision => "6ec42adbf4fc7ed28e5f3c0a813779e61fa01b0f" - revision 1 - head "https://github.com/sshuttle/sshuttle.git" - - bottle do - cellar :any_skip_relocation - sha256 "c076e8f57d9ec1bff5814835243d76ddb065a551855c8f6ad3e8fc9ff627957c" => :mojave - sha256 "58b435fe5d56471fe3fa40b372c7e56f95487326b44231ccc0eb4793410a0e3d" => :high_sierra - sha256 "6ce2edfe00756c60f3bfeaadff07ac1022fa15eab2ecfca60b41e4d4def4e937" => :sierra - end - - depends_on "python" - - def install - # Building the docs requires installing - # markdown & BeautifulSoup Python modules - # so we don't. - virtualenv_install_with_resources - end - - test do - system bin/"sshuttle", "-h" - end -end diff --git a/Formula/ssldump.rb b/Formula/ssldump.rb deleted file mode 100644 index c96abf996eb10..0000000000000 --- a/Formula/ssldump.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Ssldump < Formula - desc "SSLv3/TLS network protocol analyzer" - homepage "https://ssldump.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ssldump/ssldump/0.9b3/ssldump-0.9b3.tar.gz" - sha256 "6422c16718d27c270bbcfcc1272c4f9bd3c0799c351f1d6dd54fdc162afdab1e" - - bottle do - cellar :any - sha256 "81814f2ed4a43f89f2bce76f316a11f6adf36b46cab132c69566ab465bb18b41" => :mojave - sha256 "f61685cdc0a75d520d823508f76ad11a3bd6b3f76c2c0da85045f8a47155f4e2" => :high_sierra - sha256 "e1b49cff5781b5c030696757f3edba544c2bd58a50486962c8cbf0cd3b005da3" => :sierra - sha256 "a468350638d8d0e66e8fe137b1473a25e300b967cadae1652e062f9cd92f2dbb" => :el_capitan - sha256 "714f3e5283285dea18ba6bfc27f3dda2fc9d1317c6fe269fd4ba84aba44fe44c" => :yosemite - sha256 "61b20e42893e904872f075064323366aa29e05fc3bab4a2d09265e6e05189532" => :mavericks - sha256 "835adb0d5cdf60701acfa0a760653149cc03eff2759e7c1c4766737ee1f64ac7" => :mountain_lion - end - - depends_on "openssl" - - # reorder include files - # https://sourceforge.net/p/ssldump/bugs/40/ - # increase pcap sample size from an arbitrary 5000 the max TLS packet size 18432 - patch :DATA - - def install - ENV["LIBS"] = "-lssl -lcrypto" - - # .dylib, not .a - inreplace "configure", "if test -f $dir/libpcap.a; then", - "if test -f $dir/libpcap.dylib; then" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "osx" - system "make" - # force install as make got confused by install target and INSTALL file. - system "make", "install", "-B" - end - - test do - system "#{sbin}/ssldump", "-v" - end -end - -__END__ ---- a/base/pcap-snoop.c 2010-03-18 22:59:13.000000000 -0700 -+++ b/base/pcap-snoop.c 2010-03-18 22:59:30.000000000 -0700 -@@ -46,10 +46,9 @@ - - static char *RCSSTRING="$Id: pcap-snoop.c,v 1.14 2002/09/09 21:02:58 ekr Exp $"; - -- -+#include - #include - #include --#include - #ifndef _WIN32 - #include - #endif ---- a/base/pcap-snoop.c 2012-04-06 10:35:06.000000000 -0700 -+++ b/base/pcap-snoop.c 2012-04-06 10:45:31.000000000 -0700 -@@ -286,7 +286,7 @@ - err_exit("Aborting",-1); - } - } -- if(!(p=pcap_open_live(interface_name,5000,!no_promiscuous,1000,errbuf))){ -+ if(!(p=pcap_open_live(interface_name,18432,!no_promiscuous,1000,errbuf))){ - fprintf(stderr,"PCAP: %s\n",errbuf); - err_exit("Aborting",-1); - } diff --git a/Formula/sslh.rb b/Formula/sslh.rb deleted file mode 100644 index d61fef2b55114..0000000000000 --- a/Formula/sslh.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sslh < Formula - desc "Forward connections based on first data packet sent by client" - homepage "https://www.rutschle.net/tech/sslh.shtml" - url "https://www.rutschle.net/tech/sslh/sslh-v1.19c.tar.gz" - sha256 "bb11dfa88b27ae1ec825a1b8156000c3f17f7e8f042311f19b7a249193c47bf3" - head "https://github.com/yrutschle/sslh.git" - - bottle do - cellar :any - sha256 "d997067745470836e2a30e2a030122a5d101fd4f2768312164b7b94e53e78081" => :mojave - sha256 "4f3429c456314ead9330497258f58dbc07c620a497101d451b37538f773e7138" => :high_sierra - sha256 "4c02e4c94f732f382abb18e3831f629a0dd108211aca169ae7b93c3e387a6b70" => :sierra - sha256 "a457cede9fdc5903b4d4cf390ccf34caf716c1cf8ddfef315197876c250438c0" => :el_capitan - end - - depends_on "libconfig" - depends_on "pcre" - - def install - ENV.deparallelize - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_match version.to_s, shell_output("#{sbin}/sslh -V") - end -end diff --git a/Formula/ssllabs-scan.rb b/Formula/ssllabs-scan.rb deleted file mode 100644 index 98bb6685488b4..0000000000000 --- a/Formula/ssllabs-scan.rb +++ /dev/null @@ -1,37 +0,0 @@ -class SsllabsScan < Formula - desc "This tool is a command-line client for the SSL Labs APIs" - homepage "https://github.com/ssllabs/ssllabs-scan/" - url "https://github.com/ssllabs/ssllabs-scan/archive/v1.4.0.tar.gz" - sha256 "a7d5fad92649172ca4b190f481172b602aa1ae103d14dd1f1951ee250d382eec" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "347219010c359655ec30f056c47a7a3e0d91e80fabfc5655f141c3f20dc980d5" => :mojave - sha256 "bee10085983dac1bcd9d46773ea7e2fc50ec3c8c54442d8ef50cb1683ab9175c" => :high_sierra - sha256 "e527081f119ba004e06bba763d780d676df38bacd28b482bbeae64cbf43e4aea" => :sierra - sha256 "f541615737e69900d1a141af1872bc983cdeb94cd28016dfa8c3f5ba0f11d8c0" => :el_capitan - sha256 "18b509cec2507dd9a50aedcb618a8069ecbecc765cd31791381765c596702932" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - system "make", "build" - bin.install "ssllabs-scan" - end - - def caveats; <<~EOS - By installing this package you agree to the Terms and Conditions defined by Qualys. - You can find the terms and conditions at this link: - https://www.ssllabs.com/about/terms.html - - If you do not agree with those you should uninstall the formula. - EOS - end - - test do - system "#{bin}/ssllabs-scan", "-grade", "-quiet", "-usecache", "ssllabs.com" - end -end diff --git a/Formula/sslmate.rb b/Formula/sslmate.rb deleted file mode 100644 index 879c2f2eb4952..0000000000000 --- a/Formula/sslmate.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Sslmate < Formula - desc "Buy SSL certs from the command-line" - homepage "https://sslmate.com" - url "https://packages.sslmate.com/other/sslmate-1.7.0.tar.gz" - sha256 "55d273bd3983aee1b88a8b7ca6f31281dbe369eb9f46c7fcba11de5dfcbe176e" - - bottle do - cellar :any_skip_relocation - sha256 "7c8c3adbd6de365695d82dea6c27182c2032ebd0a09d08d4a5e20cce91abc029" => :mojave - sha256 "fd6edadfa6af0d2a2bb7390ac37b588a3c1970678e0bfcb306958902e4aea4e5" => :high_sierra - sha256 "fd6edadfa6af0d2a2bb7390ac37b588a3c1970678e0bfcb306958902e4aea4e5" => :sierra - end - - depends_on "python" - - if MacOS.version <= :snow_leopard - depends_on "perl" - depends_on "curl" - - resource "URI" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/URI-1.67.tar.gz" - sha256 "ab7f5fbc80da4ed9c46d63ed956c68a09e83dae30f20c2778c3e056d41883f9d" - end - - resource "Term::ReadKey" do - url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.32.tar.gz" - sha256 "58b90e8908e686d03a161590c1dd870e8a1b005715ca8e6d5080a32459e1e9f8" - end - end - - if MacOS.version <= :mountain_lion - resource "JSON::PP" do - url "https://cpan.metacpan.org/authors/id/M/MA/MAKAMAKA/JSON-PP-2.27300.tar.gz" - sha256 "5feef3067be4acd99ca0ebb29cf1ac1cdb338fe46977585bd1e473ea4bab71a3" - end - end - - resource "boto" do - url "https://files.pythonhosted.org/packages/c8/af/54a920ff4255664f5d238b5aebd8eedf7a07c7a5e71e27afcfe840b82f51/boto-2.49.0.tar.gz" - sha256 "ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a" - end - - def install - if MacOS.version <= :snow_leopard - ENV.prepend_path "PATH", Formula["perl"].bin - end - ENV.prepend_create_path "PERL5LIB", libexec/"vendor/lib/perl5" - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - perl_resources = [] - perl_resources << "URI" << "Term::ReadKey" if MacOS.version <= :snow_leopard - perl_resources << "JSON::PP" if MacOS.version <= :mountain_lion - perl_resources.each do |r| - resource(r).stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}/vendor" - system "make" - system "make", "install" - end - end - - resource("boto").stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - - env = { :PERL5LIB => ENV["PERL5LIB"] } - if MacOS.version <= :snow_leopard - env[:PATH] = "#{Formula["perl"].bin}:#{Formula["curl"].bin}:$PATH" - end - env[:PYTHONPATH] = ENV["PYTHONPATH"] - bin.env_script_all_files(libexec/"bin", env) - - # Fix failure when Homebrew perl is selected at runtime - unless MacOS.version <= :snow_leopard - inreplace libexec/"bin/sslmate", - "#!/usr/bin/env perl", "#!/usr/bin/perl" - end - end - - test do - system "#{bin}/sslmate", "req", "www.example.com" - # Make sure well-formed files were generated: - system "openssl", "rsa", "-in", "www.example.com.key", "-noout" - system "openssl", "req", "-in", "www.example.com.csr", "-noout" - # The version command tests the HTTP client: - system "#{bin}/sslmate", "version" - end -end diff --git a/Formula/sslscan.rb b/Formula/sslscan.rb deleted file mode 100644 index b45070b3532ae..0000000000000 --- a/Formula/sslscan.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Sslscan < Formula - desc "Test SSL/TLS enabled services to discover supported cipher suites" - homepage "https://github.com/rbsec/sslscan" - url "https://github.com/rbsec/sslscan/archive/1.11.12-rbsec.tar.gz" - version "1.11.12" - sha256 "f453a6606ff115aa2b9485fbb20856d63f9110752e42069a02277d5e63a5ce0e" - head "https://github.com/rbsec/sslscan.git" - - bottle do - cellar :any_skip_relocation - sha256 "3275b8b444a9da183e2145ec02d4ae0fb1d0da084323fa80bd04808310cde002" => :mojave - sha256 "596285eb6b6ffaa57d41f00d03d9d1447e2e559d33f8db8c66eefc665e5d7e98" => :high_sierra - sha256 "c71304b18d68a5f61a1d484a2e0588468b992a0e651ab7393bac7a5cc2b2bbb1" => :sierra - end - - resource "insecure-openssl" do - url "https://github.com/openssl/openssl/archive/OpenSSL_1_0_2f.tar.gz" - sha256 "4c9492adcb800ec855f11121bd64ddff390160714d93f95f279a9bd7241c23a6" - end - - def install - (buildpath/"openssl").install resource("insecure-openssl") - - # prevent sslscan from fetching the tip of the openssl fork - # at https://github.com/PeterMosmans/openssl - inreplace "Makefile", "openssl/Makefile: .openssl.is.fresh", - "openssl/Makefile:" - - ENV.deparallelize do - system "make", "static" - end - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_match "static", shell_output("#{bin}/sslscan --version") - system "#{bin}/sslscan", "google.com" - end -end diff --git a/Formula/sslsplit.rb b/Formula/sslsplit.rb deleted file mode 100644 index 9095d12b0842e..0000000000000 --- a/Formula/sslsplit.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Sslsplit < Formula - desc "Man-in-the-middle attacks against SSL encrypted network connections" - homepage "https://www.roe.ch/SSLsplit" - url "https://mirror.roe.ch/rel/sslsplit/sslsplit-0.5.3.tar.bz2" - sha256 "6c4cbc42cd7fb023fed75b82a436d8c1c4beaeb317a2ef41c00403684e0885dd" - head "https://github.com/droe/sslsplit.git", :branch => "develop" - - bottle do - cellar :any - sha256 "71e977bcad186b97a787fee8a9eb1be8a9358436301ed4f3a2c815d99b58bc0c" => :mojave - sha256 "b91c12d10cf84faa52564da27a7cafa9d3daadfb0d957e10f45155e607322e1b" => :high_sierra - sha256 "f739a780837ce81ec5664a0fc83da5b8889b45e686f30eda81b22a279bb19022" => :sierra - sha256 "9ec2a8e64aace6cb71390916b05f49f8b94eab5c59df7f94a0e3b902c585cf55" => :el_capitan - end - - depends_on "check" => :build - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl" - - def install - unless build.head? - ENV.deparallelize - inreplace "GNUmakefile" do |s| - s.gsub! "-o $(BINUID) -g $(BINGID)", "" - s.gsub! "-o $(MANUID) -g $(MANGID)", "" - end - end - system "make", "test" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - pid_webrick = fork do - exec "ruby", "-rwebrick", "-e", - "s = WEBrick::HTTPServer.new(:Port => 8000); " \ - 's.mount_proc("/") {|_,res| res.body = "sslsplit test"}; ' \ - "s.start" - end - pid_sslsplit = fork do - exec "#{bin}/sslsplit", "-P", "http", "127.0.0.1", "8080", - "127.0.0.1", "8000" - end - sleep 1 - # Workaround to kill all processes from sslsplit - pid_sslsplit_child = `pgrep -P #{pid_sslsplit}`.to_i - - begin - assert_equal "sslsplit test", - shell_output("curl -s http://localhost:8080/test") - ensure - Process.kill 9, pid_sslsplit_child - Process.kill 9, pid_webrick - Process.wait pid_webrick - end - end -end diff --git a/Formula/sslyze.rb b/Formula/sslyze.rb deleted file mode 100644 index 7e256defc9197..0000000000000 --- a/Formula/sslyze.rb +++ /dev/null @@ -1,150 +0,0 @@ -class Sslyze < Formula - include Language::Python::Virtualenv - - desc "SSL scanner" - homepage "https://github.com/nabla-c0d3/sslyze" - - stable do - url "https://github.com/nabla-c0d3/sslyze/archive/1.4.3.tar.gz" - sha256 "d9ae34d58cc577ab62aaf58e687ffb23805400a82ed813d37ff15f64d25f6cf0" - - resource "nassl" do - url "https://github.com/nabla-c0d3/nassl/archive/1.1.3.tar.gz" - sha256 "09aa98d630710c2da74aebeda1eccc4e878bd8ececa1c3ad5464d6e777b44eb6" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "75cedd2004b9268d5abac35bf71be4205955221a6dc9aeeee65fc934cffe7b0f" => :mojave - sha256 "c84dcbe2c30a40bfcd36cafc7418c8842435bf81aa9bbd82a18286892d76b3a5" => :high_sierra - sha256 "f65561a05b88c4561c00c024fcecd1def2f5ba65a92875255342ca601732a38f" => :sierra - sha256 "ce82f4e5b63f2893b81f9d95cea808cb340a973fab0a0510346cd4a4156190a1" => :el_capitan - end - - head do - url "https://github.com/nabla-c0d3/sslyze.git" - - resource "nassl" do - url "https://github.com/nabla-c0d3/nassl.git" - end - end - - depends_on :arch => :x86_64 - depends_on "python@2" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tls-parser" do - url "https://files.pythonhosted.org/packages/49/c4/aa379256eb83469154c671b700b3edb42ae781044a4cd40ae92bff8259c7/tls_parser-1.2.1.tar.gz" - sha256 "869ad3c8a45e73bcbb3bf0dd094f0345675c830e851576f42585af1a60c2b0e5" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/ec/cc/28444132a25c113149cec54618abc909596f0b272a74c55bab9593f8876c/typing-3.6.4.tar.gz" - sha256 "d400a9344254803a2368533e4533a4200d21eb7b6b729c173bc38201a74db3f2" - end - - resource "zlib" do - url "https://zlib.net/zlib-1.2.11.tar.gz" - mirror "https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz" - sha256 "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" - end - - resource "openssl-legacy" do - url "https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2e.tar.gz" - sha256 "e23ccafdb75cfcde782da0151731aa2185195ac745eea3846133f2e05c0e0bff" - end - - resource "openssl-modern" do - url "https://github.com/openssl/openssl.git", - :revision => "1f5878b8e25a785dde330bf485e6ed5a6ae09a1a" - end - - def install - venv = virtualenv_create(libexec) - - res = resources.map(&:name).to_set - res -= %w[cryptography nassl openssl-legacy openssl-modern zlib] - - res.each do |r| - venv.pip_install resource(r) - end - - ENV.prepend_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - - resource("nassl").stage do - nassl_path = Pathname.pwd - # openssl fails on parallel build. Related issues: - # - https://rt.openssl.org/Ticket/Display.html?id=3736&user=guest&pass=guest - # - https://rt.openssl.org/Ticket/Display.html?id=3737&user=guest&pass=guest - ENV.deparallelize do - mv "bin/openssl-legacy/include", "nassl_openssl_legacy_include" - mv "bin/openssl-modern/include", "nassl_openssl_modern_include" - rm_rf "bin" # make sure we don't use the prebuilt binaries - (nassl_path/"bin/openssl-legacy/darwin64").mkpath - (nassl_path/"bin/openssl-modern/darwin64").mkpath - mv "nassl_openssl_legacy_include", "bin/openssl-legacy/include" - mv "nassl_openssl_modern_include", "bin/openssl-modern/include" - (nassl_path/"zlib-#{resource("zlib").version}").install resource("zlib") - (nassl_path/"openssl-1.0.2e").install resource("openssl-legacy") - (nassl_path/"openssl-master").install resource("openssl-modern") - system "python", "build_from_scratch.py" - end - system "python", "run_tests.py" - venv.pip_install nassl_path - - # Link cryptography against the openssl modern used by nassl above - # Avoid "TypeError - object of type 'UnrecognizedExtension' has no len()" - # Work around https://github.com/pyca/cryptography/issues/4373 - # See https://github.com/nabla-c0d3/sslyze/issues/323 - ENV.prepend "CPPFLAGS", "-I#{nassl_path}/bin/openssl-modern/include" - ENV.prepend "LDFLAGS", "-L#{nassl_path}/bin/openssl-modern/darwin64" - venv.pip_install resource("cryptography") - end - venv.pip_install_and_link buildpath - end - - test do - assert_match "SCAN COMPLETED", shell_output("#{bin}/sslyze --regular google.com") - assert_no_match /exception/, shell_output("#{bin}/sslyze --certinfo letsencrypt.org") - end -end diff --git a/Formula/ssss.rb b/Formula/ssss.rb deleted file mode 100644 index 83b865e57e812..0000000000000 --- a/Formula/ssss.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Ssss < Formula - desc "Shamir's secret sharing scheme implementation" - homepage "http://point-at-infinity.org/ssss/" - url "http://point-at-infinity.org/ssss/ssss-0.5.tar.gz" - sha256 "5d165555105606b8b08383e697fc48cf849f51d775f1d9a74817f5709db0f995" - - bottle do - cellar :any - sha256 "96db005b3a278b26b7756c3dde1f94975cd09d901191029cf35649dfc1ac1178" => :mojave - sha256 "af51b1deda77dc64304532dbe4131a02520a8e619f5aea178eeef9d30f87f2c9" => :high_sierra - sha256 "d6c84cc81a0e079f55b32bf3bc35be3a70016226f5cb0e6d1862c9dca22aaa56" => :sierra - sha256 "ffc9b4c320b50f3d093000f9cde8fff3e4f2869ff4111a7da25b0cf17a2bc065" => :el_capitan - sha256 "8242a9583ca549f506c107ee1df51c19b04790a8f64605d67ffcd62de34c21ea" => :yosemite - sha256 "695899e6e9fac80f8502362c9bb11811113f33373cfc1d0ea99467ac26035776" => :mavericks - end - - depends_on "gmp" - depends_on "xmltoman" - - def install - inreplace "Makefile" do |s| - # Compile with -DNOMLOCK to avoid warning on every run on macOS. - s.gsub! /\-W /, "-W -DNOMLOCK $(CFLAGS) $(LDFLAGS)" - end - - system "make" - man1.install "ssss.1" - bin.install %w[ssss-combine ssss-split] - end -end diff --git a/Formula/sstp-client.rb b/Formula/sstp-client.rb deleted file mode 100644 index 3163b4cb88e2d..0000000000000 --- a/Formula/sstp-client.rb +++ /dev/null @@ -1,41 +0,0 @@ -class SstpClient < Formula - desc "SSTP (Microsofts Remote Access Solution for PPP over SSL) client" - homepage "https://sstp-client.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sstp-client/sstp-client/sstp-client-1.0.12.tar.gz" - sha256 "487eb406579689803ce0397f6102b18641e4572ac7bc9b9e5f3027c84dcf67ff" - - bottle do - sha256 "361a2e8e315b16b5444338c13e11db2d0b78bb8ad0f73de18526d164f87b237e" => :mojave - sha256 "f910157864b32a5cd004366b0e8ee6cefd09b0edd36afb89d751ede34e27df96" => :high_sierra - sha256 "1bbbe9f5558b4757f8244064144106b0bda636c2adcc3da734634895b960ff68" => :sierra - sha256 "c4b0b6b1ebc16783d22327173bfe1e90bd5fd329786a613422c858fc352672eb" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-ppp-plugin", - "--prefix=#{prefix}", - "--with-runtime-dir=#{var}/run/sstpc" - system "make", "install" - - # Create a directory needed by sstpc for privilege separation - (var/"run/sstpc").mkpath - end - - def caveats; <<~EOS - sstpc reads PPP configuration options from /etc/ppp/options. If this file - does not exist yet, type the following command to create it: - - sudo touch /etc/ppp/options - EOS - end - - test do - system "#{sbin}/sstpc", "--version" - end -end diff --git a/Formula/st.rb b/Formula/st.rb deleted file mode 100644 index 23a06c779901e..0000000000000 --- a/Formula/st.rb +++ /dev/null @@ -1,32 +0,0 @@ -class St < Formula - desc "Statistics from the command-line" - homepage "https://github.com/nferraz/st" - url "https://github.com/nferraz/st/archive/v1.1.4.tar.gz" - sha256 "c02a16f67e4c357690a5438319843149fd700c223128f9ffebecab2849c58bb8" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8c8e5c11bd061f1a90ba17ebc19a285b4cf1494c5790ea6d7c046035ddc65956" => :mojave - sha256 "3de383c349b1db5c6bd1d6a85f0c3637615430c55a4b2cc0f7e19208735ef221" => :high_sierra - sha256 "cc4150103a1c9c5268355d937664401a04c2fa1ad478aa541ef7535004a75210" => :sierra - sha256 "2df47c1388ef527487527c1173508ebdaf217b0f03c70a6e4567d037a912e214" => :el_capitan - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5/site_perl/" - - system "perl", "Makefile.PL", "PREFIX=#{libexec}" - system "make", "install" - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files libexec/"bin", :PERL5LIB => ENV["PERL5LIB"] - - man1.install_symlink Dir[libexec/"share/man/man1/*.1"] - end - - test do - (testpath/"test.txt").write((1..100).map(&:to_s).join("\n")) - assert_equal "5050", pipe_output("#{bin}/st --sum test.txt").chomp - end -end diff --git a/Formula/stanford-corenlp.rb b/Formula/stanford-corenlp.rb deleted file mode 100644 index b7822311a66e1..0000000000000 --- a/Formula/stanford-corenlp.rb +++ /dev/null @@ -1,22 +0,0 @@ -class StanfordCorenlp < Formula - desc "Java suite of core NLP tools" - homepage "https://stanfordnlp.github.io/CoreNLP/" - url "https://nlp.stanford.edu/software/stanford-corenlp-full-2018-02-27.zip" - version "3.9.1" - sha256 "5c50ac680c678d07f86ed0494c68307b513829b563e7641b0d95894d7de1701f" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/*.sh"] - end - - test do - (testpath/"test.txt").write("Stanford is a university, founded in 1891.") - system "#{bin}/corenlp.sh", "-annotators tokenize,ssplit,pos", "-file test.txt" - assert_predicate (testpath/"test.txt.xml"), :exist? - end -end diff --git a/Formula/stanford-ner.rb b/Formula/stanford-ner.rb deleted file mode 100644 index 339d383314d36..0000000000000 --- a/Formula/stanford-ner.rb +++ /dev/null @@ -1,20 +0,0 @@ -class StanfordNer < Formula - desc "Stanford NLP Group's implementation of a Named Entity Recognizer" - homepage "https://nlp.stanford.edu/software/CRF-NER.shtml" - url "https://nlp.stanford.edu/software/stanford-ner-2018-02-27.zip" - version "3.9.1" - sha256 "e37b0094040c95e98799d849a7be2f4967de6b786f0b07360d179756bd4dce95" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/*.sh"] - end - - test do - system "#{bin}/ner.sh", "#{libexec}/sample.txt" - end -end diff --git a/Formula/stanford-parser.rb b/Formula/stanford-parser.rb deleted file mode 100644 index 9130cf272309f..0000000000000 --- a/Formula/stanford-parser.rb +++ /dev/null @@ -1,20 +0,0 @@ -class StanfordParser < Formula - desc "Statistical NLP parser" - homepage "https://nlp.stanford.edu/software/lex-parser.shtml" - url "https://nlp.stanford.edu/software/stanford-parser-full-2018-02-27.zip" - version "3.9.1" - sha256 "c360eb294e52870a1df06878df65ed21c68145065d21f73c0028d717252a9bd7" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/*.sh"] - end - - test do - system "#{bin}/lexparser.sh", "#{libexec}/data/testsent.txt" - end -end diff --git a/Formula/star.rb b/Formula/star.rb deleted file mode 100644 index ce1f5de497b3c..0000000000000 --- a/Formula/star.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Star < Formula - desc "Standard tap archiver" - homepage "https://cdrtools.sourceforge.io/private/star.html" - url "https://downloads.sourceforge.net/project/s-tar/star-1.5.3.tar.bz2" - sha256 "070342833ea83104169bf956aa880bcd088e7af7f5b1f8e3d29853b49b1a4f5b" - - bottle do - cellar :any_skip_relocation - sha256 "8d1e4d304f4ac9c281f3b445f31a1268271eebba6a58f098b4f9339be51218b9" => :mojave - sha256 "9f4a24f592647071a2ead26c2dba4d86cb664f71cdf4d280037a94748c92ec0c" => :high_sierra - sha256 "ec7a276b68c0dc946d3320e3cd9cf923d0affdbfa72587ecccb2efa3dc7276cc" => :sierra - sha256 "64288e33524b1d1afcc5ae7e6ff5dc1488f1793eba9452e54279054d55e93db3" => :el_capitan - sha256 "e3b77b33bc2c8ec917ddf41a29d937de1492253c7d039f5747e44e2361cfadd4" => :yosemite - sha256 "410f5637ccdf115373b5a08c5037cdb8c66cb113719ead191070d087eae43285" => :mavericks - end - - depends_on "smake" => :build - - def install - ENV.deparallelize # smake does not like -j - - system "smake", "GMAKE_NOWARN=true", "INS_BASE=#{prefix}", "INS_RBASE=#{prefix}", "install" - - # Remove symlinks that override built-in utilities - (bin+"gnutar").unlink - (bin+"tar").unlink - (man1+"gnutar.1").unlink - - # Remove useless files - lib.rmtree - include.rmtree - - # Remove conflicting files - %w[makefiles makerules].each { |f| (man5/"#{f}.5").unlink } - end - - test do - system "#{bin}/star", "--version" - end -end diff --git a/Formula/startup-notification.rb b/Formula/startup-notification.rb deleted file mode 100644 index b4d2ee2a80360..0000000000000 --- a/Formula/startup-notification.rb +++ /dev/null @@ -1,26 +0,0 @@ -class StartupNotification < Formula - desc "Reference implementation of startup notification protocol" - homepage "https://www.freedesktop.org/wiki/Software/startup-notification/" - url "https://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.12.tar.gz" - sha256 "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a" - - bottle do - cellar :any - sha256 "9104d94776847d5605cae94d2206c44007fb5ef4d9db1071bdbcbcae0f9c0f84" => :mojave - sha256 "593deddd4f3398736ba818eaa224dcc5b5337c88ba13c7ff1676f96b5c3adfd2" => :high_sierra - sha256 "1480bccd4d65d99905fdd5010bd156b0ff2ee2ada36ce0bcb4e7b74fa632c9da" => :sierra - sha256 "7762bbbdb98d8f360e82a9ac5e94239f94433e7bb38e8eec309230270c5158e0" => :el_capitan - sha256 "770f1ab8c0339c940b098d91989fbc06bacafabe1a91cc891e9891ef39e83781" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on :x11 - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/statik.rb b/Formula/statik.rb deleted file mode 100644 index 9d4099173c2b9..0000000000000 --- a/Formula/statik.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Statik < Formula - include Language::Python::Virtualenv - - desc "Python-based, generic static web site generator aimed at developers" - homepage "https://getstatik.com" - url "https://github.com/thanethomson/statik/archive/v0.22.2.tar.gz" - sha256 "27aeda86c40ba2a489d2d8e85b7b38200e8f5763310003294c135ab2cf09975b" - revision 1 - head "https://github.com/thanethomson/statik.git" - - bottle do - cellar :any - sha256 "0b670112d5c2e9c8166c264ba33a5bd7c01e7cbcb99abe030f2c7923a6e09f5f" => :mojave - sha256 "06551895c3028af13b050ccc738afe4643ac782ca02dc9c9a0de68b04c5a8e5c" => :high_sierra - sha256 "44b40f63c9d8de054cb52ce509347eec87f2ac53afa613bb15d66f3c5b3317f7" => :sierra - end - - depends_on "python" - - conflicts_with "go-statik", :because => "both install `statik` binaries" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", "statik" - venv.pip_install_and_link buildpath - end - - test do - (testpath/"config.yml").write <<~EOS - project-name: Homebrew Test - base-path: / - EOS - (testpath/"models/Post.yml").write("title: String") - (testpath/"data/Post/test-post1.yml").write("title: Test post 1") - (testpath/"data/Post/test-post2.yml").write("title: Test post 2") - (testpath/"views/posts.yml").write <<~EOS - path: - template: /{{ post.pk }}/ - for-each: - post: session.query(Post).all() - template: post - EOS - (testpath/"views/home.yml").write <<~EOS - path: / - template: home - EOS - (testpath/"templates/home.html").write <<~EOS - - Home - Hello world! - - EOS - (testpath/"templates/post.html").write <<~EOS - - Post - {{ post.title }} - - EOS - system bin/"statik" - - assert_predicate testpath/"public/index.html", :exist?, "home view was not correctly generated!" - assert_predicate testpath/"public/test-post1/index.html", :exist?, "test-post1 was not correctly generated!" - assert_predicate testpath/"public/test-post2/index.html", :exist?, "test-post2 was not correctly generated!" - end -end diff --git a/Formula/stdman.rb b/Formula/stdman.rb deleted file mode 100644 index 0dce027fd27b5..0000000000000 --- a/Formula/stdman.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Stdman < Formula - desc "Formatted C++11/14/17 stdlib man pages from cppreference.com" - homepage "https://github.com/jeaye/stdman" - url "https://github.com/jeaye/stdman/archive/2018.03.11.tar.gz" - sha256 "d29e6b34cb5ba9905360cee6adcdf8c49e7f11272521bf2e10b42917486840e8" - version_scheme 1 - head "https://github.com/jeaye/stdman.git" - - bottle do - cellar :any_skip_relocation - sha256 "538451fbb366f727f89919bc2056b4b4bde46351d07509559c1793d5816c9099" => :mojave - sha256 "0f795424e68e066cc1f6c567a5513001481cd610cded75dfab77aa8db42cf9ed" => :high_sierra - sha256 "d3e640c191d2cf471b37b2121d20ebab97ff353f2d69616cfa7f7227db069beb" => :sierra - sha256 "d4b15103ae4011c1f2c9a4e3dcb0b205bfa45595d7ad25d6cb87ec1dc4f395ab" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "man", "-w", "std::string" - end -end diff --git a/Formula/stella.rb b/Formula/stella.rb deleted file mode 100644 index b394ed17ce4e5..0000000000000 --- a/Formula/stella.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Stella < Formula - desc "Atari 2600 VCS emulator" - homepage "https://stella-emu.github.io/" - url "https://github.com/stella-emu/stella/releases/download/5.1.3/stella-5.1.3-src.tar.xz" - sha256 "e074317c25e5d4cabec4558909d301c3a7654ad620863f05d342244fe6bdfe0a" - head "https://github.com/stella-emu/stella.git" - - bottle do - cellar :any - sha256 "6880937715c2f6961602ee8b3ec4061ade86e40cdabdbe917c7f16b0b979ab35" => :mojave - sha256 "382b6e15d5a8dca9745bb1ba933da077cbd2d11b74b971f031933b8745450e1c" => :high_sierra - sha256 "f5b874f65035eb9825ac68d3cebef565945cb62eb7f3d6708f8dc051f55f8579" => :sierra - sha256 "3f71f5dfa4f921dcc8ff076e7054f13599ea2484c1927a7f0c67a33080713fb5" => :el_capitan - end - - depends_on :xcode => :build - depends_on "libpng" - depends_on "sdl2" - - def install - sdl2 = Formula["sdl2"] - libpng = Formula["libpng"] - cd "src/macosx" do - inreplace "stella.xcodeproj/project.pbxproj" do |s| - s.gsub! %r{(\w{24} \/\* SDL2\.framework)}, '//\1' - s.gsub! %r{(\w{24} \/\* png)}, '//\1' - s.gsub! /(HEADER_SEARCH_PATHS) = \(/, - "\\1 = (#{sdl2.opt_include}/SDL2, #{libpng.opt_include}," - s.gsub! /(LIBRARY_SEARCH_PATHS) = ("\$\(LIBRARY_SEARCH_PATHS\)");/, - "\\1 = (#{sdl2.opt_lib}, #{libpng.opt_lib}, \\2);" - s.gsub! /(OTHER_LDFLAGS) = "((-\w+)*)"/, '\1 = "-lSDL2 -lpng \2"' - end - xcodebuild "SYMROOT=build" - prefix.install "build/Release/Stella.app" - bin.write_exec_script "#{prefix}/Stella.app/Contents/MacOS/Stella" - end - end - - test do - assert_match /Stella version #{version}/, shell_output("#{bin}/Stella -help").strip - end -end diff --git a/Formula/stellar-core.rb b/Formula/stellar-core.rb deleted file mode 100644 index 08028b7ace343..0000000000000 --- a/Formula/stellar-core.rb +++ /dev/null @@ -1,37 +0,0 @@ -class StellarCore < Formula - desc "The backbone of the Stellar (XLM) network" - homepage "https://www.stellar.org/" - url "https://github.com/stellar/stellar-core.git", - :tag => "v10.1.0", - :revision => "1fe2e8a768ecc4db2d53a4a67fc733bb1e99ecd1" - head "https://github.com/stellar/stellar-core.git" - - bottle do - cellar :any - sha256 "3203ed07db6511c82c7a70316a0d3458f8457be9ddeb0b4ebe14d3ad05c7eb97" => :mojave - sha256 "b60d53c3aafcbdba140e1b2efaa7641a16861262d20573dcae9e95e1cdbc1d6b" => :high_sierra - sha256 "d08d247b755bbce9502e4b862d3e46049df9c48d6f8c648241cec3bf9364a28c" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pandoc" => :build - depends_on "pkg-config" => :build - depends_on "libsodium" - depends_on "postgresql" - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-postgres" - system "make", "install" - end - - test do - system "#{bin}/stellar-core", "--test", "'[bucket],[crypto],[herder],[upgrades],[accountsubentriescount],[bucketlistconsistent],[cacheisconsistent],[fs]'" - end -end diff --git a/Formula/stern.rb b/Formula/stern.rb deleted file mode 100644 index 0bfb955c4e41f..0000000000000 --- a/Formula/stern.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Stern < Formula - desc "Tail multiple Kubernetes pods & their containers" - homepage "https://github.com/wercker/stern" - url "https://github.com/wercker/stern/archive/1.10.0.tar.gz" - sha256 "7b9d3a7b64224897f96ef052cc27a5889b06e09c393865fa0d5f15db41cc61a0" - head "https://github.com/wercker/stern.git", - :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "f3b4fc666d4d255347e0ea3e60bf96e0ee24860f652050c8094c906898237ddf" => :mojave - sha256 "45a8fe1c99787e06b4334228509f94b6a194eb78355238e40a45a0be30084eb0" => :high_sierra - sha256 "ee3eb750bf439ad47516bdade5a5c61819dfb70a60d164d89aca8e01060d7241" => :sierra - end - - depends_on "go" => :build - depends_on "govendor" => :build - - def install - contents = Dir["{*,.git,.gitignore}"] - gopath = buildpath/"gopath" - (gopath/"src/github.com/wercker/stern").install contents - - ENV["GOPATH"] = gopath - ENV.prepend_create_path "PATH", gopath/"bin" - - cd gopath/"src/github.com/wercker/stern" do - system "govendor", "sync" - system "go", "build", "-o", "bin/stern" - bin.install "bin/stern" - prefix.install_metafiles - end - end - - test do - system "#{bin}/stern", "--version" - end -end diff --git a/Formula/stgit.rb b/Formula/stgit.rb deleted file mode 100644 index 72f0521242841..0000000000000 --- a/Formula/stgit.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Stgit < Formula - desc "Push/pop utility built on top of Git" - homepage "https://github.com/ctmarinas/stgit" - url "https://github.com/ctmarinas/stgit/archive/v0.19.tar.gz" - sha256 "746f043c8a7caf5e675ef9d5c894a4a0a7d581ad4244747512f5efcccfbac5ff" - head "https://github.com/ctmarinas/stgit.git" - - bottle do - cellar :any_skip_relocation - sha256 "f8a902d90ef085fa02d55169da184884d72fa75adc13bf0948d574a4cada462f" => :mojave - sha256 "8200c4517883268e2d6fda6988a3a5b19b37b762eabbb8c262841c0cc245d075" => :high_sierra - sha256 "8200c4517883268e2d6fda6988a3a5b19b37b762eabbb8c262841c0cc245d075" => :sierra - end - - def install - ENV["PYTHON"] = "python" # overrides 'python2' built into makefile - system "make", "prefix=#{prefix}", "all" - system "make", "prefix=#{prefix}", "install" - end - - test do - system "git", "init" - (testpath/"test").write "test" - system "git", "add", "test" - system "git", "commit", "--message", "Initial commit", "test" - system "#{bin}/stg", "init" - system "#{bin}/stg", "log" - end -end diff --git a/Formula/stk.rb b/Formula/stk.rb deleted file mode 100644 index 0eceaeb29cfb0..0000000000000 --- a/Formula/stk.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Stk < Formula - desc "Sound Synthesis Toolkit" - homepage "https://ccrma.stanford.edu/software/stk/" - url "https://ccrma.stanford.edu/software/stk/release/stk-4.6.0.tar.gz" - sha256 "648fcb9a0a4243d2d93fc72b29955953f4e794edf04c31f2ed0ed720d05287d2" - - bottle do - cellar :any_skip_relocation - sha256 "c4097ebf1065c8a253d41902fa54573748ca47f24cd8ec88f340db1f74ecd418" => :mojave - sha256 "67c1c6c12bbf98d866bac55955d4715f94c05c63551bd0687646c6acd549de91" => :high_sierra - sha256 "70c1c7e91fc3477055e6bc1a39dd5ef160c4e496887bb22b88d7fd149b03bfa6" => :sierra - sha256 "e333e99c0fe8611be1fc7fb54d3e4e77f4cde210bb1c281031ed54b74187ef4d" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - fails_with :clang do - build 421 - cause "due to configure file this application will not properly compile with clang" - end - - def install - system "autoreconf", "-fiv" - system "./configure", "--prefix=#{prefix}", "--disable-debug" - system "make" - - lib.install "src/libstk.a" - bin.install "bin/treesed" - - (include/"stk").install Dir["include/*"] - doc.install Dir["doc/*"] - pkgshare.install "src", "projects", "rawwaves" - end - - def caveats; <<~EOS - The header files have been put in a standard search path, it is possible to use an include statement in programs as follows: - - #include \"stk/FileLoop.h\" - #include \"stk/FileWvOut.h\" - - src/ projects/ and rawwaves/ have all been copied to #{opt_pkgshare} - EOS - end - - test do - assert_equal "xx No input files", shell_output("#{bin}/treesed", 1).chomp - end -end diff --git a/Formula/stlink.rb b/Formula/stlink.rb deleted file mode 100644 index 8848c1372fa57..0000000000000 --- a/Formula/stlink.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Stlink < Formula - desc "STM32 discovery line Linux programmer" - homepage "https://github.com/texane/stlink" - url "https://github.com/texane/stlink/archive/v1.5.1.tar.gz" - sha256 "e0145fbfd3e781f21baf12a0750b0933c445ee6338e36142836bf5a2c267e107" - head "https://github.com/texane/stlink.git" - - bottle do - cellar :any - rebuild 1 - sha256 "65d735edcaf4fbc2d23d564a831309d43bedc1efaa9574b0e697f48256711df2" => :mojave - sha256 "9640919d8abfe07ea06e0c208d13dba96988a99bf8ae6080afcc4c332f58b530" => :high_sierra - sha256 "9662ae4fc8ff28f24ea2441a9629fbc66732f1c24d9bd71fca94cea4d16a5901" => :sierra - sha256 "f74ea6ea462e6c7de089bcdcb92f9b44f1e9809e8989da7cc50a65ade4e1be77" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"st-util", "-h" - end -end diff --git a/Formula/stlviewer.rb b/Formula/stlviewer.rb deleted file mode 100644 index af349a0c43961..0000000000000 --- a/Formula/stlviewer.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Stlviewer < Formula - desc "View stl files" - homepage "https://github.com/vishpat/stlviewer#readme" - url "https://github.com/vishpat/stlviewer/archive/release-0.1.tar.gz" - sha256 "55c1969537a7c663273d0d3ab242f0bf61b93d83a7a5ea0786436a2041ecdb8b" - - bottle do - cellar :any_skip_relocation - sha256 "9179139d7ebb44d3eb664f1a58df0003722a76315dd7211345671ca21b7a59a1" => :mojave - sha256 "ce4cddb8ffed5a7154be0ce328b283805fc14a1a5769c911e1492a35c1b07a1c" => :high_sierra - sha256 "9490714ae75aaa68e9c13f9b8d3a9cd87965d09167388d768f6299067774cc69" => :sierra - sha256 "e2b6570f4f4fa6042528212a2c0c4798ee7375855e51eaa607e737d746aa2cd0" => :el_capitan - sha256 "7bf9c633d050993ecca2013098a3ea544bf25cdd5b5bfdff57607e887e58d0b6" => :yosemite - sha256 "cd58c5ba32e12ebb014a809ce8bdcd4a5b85c3caaedd7063710e409a33640707" => :mavericks - end - - def install - system "./compile.py" - bin.install "stlviewer" - end - - test do - shell_output("#{bin}/stlviewer 2>&1", 1) - end -end diff --git a/Formula/stm32flash.rb b/Formula/stm32flash.rb deleted file mode 100644 index d1842f3952330..0000000000000 --- a/Formula/stm32flash.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Stm32flash < Formula - desc "Open source flash program for STM32 using the ST serial bootloader" - homepage "https://sourceforge.net/projects/stm32flash/" - url "https://downloads.sourceforge.net/project/stm32flash/stm32flash-0.5.tar.gz" - sha256 "97aa9422ef02e82f7da9039329e21a437decf972cb3919ad817f70ac9a49e306" - - bottle do - cellar :any_skip_relocation - sha256 "14bbc585e618bf4c223e0008503f9007ef3686e3472a1a1f2bfc8122af42793c" => :mojave - sha256 "2cbbf094a7f2777b674909a5f846bba0cb613a5c2c38e980b67bd769b924e5f5" => :high_sierra - sha256 "74a92cff8b8099a2b8ee8aa0a2a360639400eb53a24b625c149b052e3f26521e" => :sierra - sha256 "1e49a9386e4aac0260e3b24872714e59f3984c7f6fb2779e9bd89e0d23bc1655" => :el_capitan - end - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - output = shell_output("#{bin}/stm32flash -k /dev/tty.XYZ 2>&1", 1) - assert_match "Failed to open port: /dev/tty.XYZ", output - end -end diff --git a/Formula/stockfish.rb b/Formula/stockfish.rb deleted file mode 100644 index cd2cfc1fe4059..0000000000000 --- a/Formula/stockfish.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Stockfish < Formula - desc "Strong open-source chess engine" - homepage "https://stockfishchess.org/" - url "https://github.com/official-stockfish/Stockfish/files/2629649/sf_10.zip" - sha256 "9c2aa8b06935c930e80cba1426e10d76b6b1accc5a769e6bf1f41e15d79cadda" - head "https://github.com/official-stockfish/Stockfish.git" - - bottle do - cellar :any_skip_relocation - sha256 "7e7d58466b8d4f325e69eb593dbb40074541e383b9b1e62dae83b3d9cddfc3a7" => :mojave - sha256 "be82b92aa3b8a89162caca9f206645cb6395b93898f7575ea782f754b2183bd8" => :high_sierra - sha256 "84e6d5d13b0a30843ed3eafd245a3c6a61ecf67635b3b18ba5950fb69aed1bb1" => :sierra - end - - def install - arch = if Hardware::CPU.features.include? :popcnt - "x86-64-modern" - else - "x86-64" - end - - system "make", "-C", "src", "build", "ARCH=#{arch}" - bin.install "src/stockfish" - end - - test do - system "#{bin}/stockfish", "go", "depth", "20" - end -end diff --git a/Formula/stoken.rb b/Formula/stoken.rb deleted file mode 100644 index ee380b06cae14..0000000000000 --- a/Formula/stoken.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Stoken < Formula - desc "Tokencode generator compatible with RSA SecurID 128-bit (AES)" - homepage "https://stoken.sourceforge.io/" - url "https://downloads.sourceforge.net/project/stoken/stoken-0.92.tar.gz" - sha256 "aa2b481b058e4caf068f7e747a2dcf5772bcbf278a4f89bc9efcbf82bcc9ef5a" - - bottle do - cellar :any - sha256 "3a362165a5fac3e9c9117f0f247449aad1c1c6dfa76dfd6dfd652ed5137d7c09" => :mojave - sha256 "cb6b6bb8d97abca20a4395fe9686717186ad1e4fc99f470e74a3b7748bde4d4d" => :high_sierra - sha256 "005b85ff93aa190fbe9590324b1579d960c3207cd144cf860cfc6050eaf10e71" => :sierra - sha256 "f29de39d399ca3b9acbdae0e170e82173f2fbcd5806663a8697c10695b5d1b82" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "nettle" - depends_on "gtk+3" => :optional - - if build.with? "gtk+3" - depends_on "adwaita-icon-theme" - depends_on "hicolor-icon-theme" - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-debug - --disable-silent-rules - --prefix=#{prefix} - ] - - system "./configure", *args - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/stoken", "show", "--random" - end -end diff --git a/Formula/stone-soup.rb b/Formula/stone-soup.rb deleted file mode 100644 index c884f79e04bce..0000000000000 --- a/Formula/stone-soup.rb +++ /dev/null @@ -1,64 +0,0 @@ -class StoneSoup < Formula - desc "Dungeon Crawl Stone Soup: a roguelike game" - homepage "https://crawl.develz.org/" - url "https://crawl.develz.org/release/0.22/stone_soup-0.22.1.tar.xz" - sha256 "49834a0fbfcba4953359c649fbe52f42b983f5c0cc5e9aa95c5e4066f1453c40" - - bottle do - sha256 "000858caed6adc83af07e58ae18ae965068467eda9bc55fa857e67b11758aaf6" => :mojave - sha256 "9c2728c5e7e0aa9cd005dd88be988c9ce0fd442c2fbf4dfbcd0889ddc44a77e9" => :high_sierra - sha256 "6ff5f2ccb4d81ee521d8fd2b86a33c8f382b9d56ac87ec8cf3b15eae69583d64" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "lua@5.1" - depends_on "pcre" - - needs :cxx11 - - def install - ENV.cxx11 - - cd "source" do - args = %W[ - prefix=#{prefix} - DATADIR=data - NO_PKGCONFIG= - BUILD_ZLIB= - BUILD_SQLITE=yes - BUILD_FREETYPE= - BUILD_LIBPNG= - BUILD_LUA=y - BUILD_SDL2= - BUILD_SDL2MIXER= - BUILD_SDL2IMAGE= - BUILD_PCRE= - USE_PCRE=y - ] - - # FSF GCC doesn't support the -rdynamic flag - args << "NO_RDYNAMIC=y" unless ENV.compiler == :clang - - # The makefile has trouble locating the developer tools for - # CLT-only systems, so we set these manually. Reported upstream: - # https://crawl.develz.org/mantis/view.php?id=7625 - # - # On 10.9, stone-soup will try to use xcrun and fail due to an empty - # DEVELOPER_DIR - devdir = MacOS::Xcode.prefix.to_s - devdir += "/" if MacOS.version >= :mavericks && !MacOS::Xcode.installed? - - system "make", "install", - "DEVELOPER_DIR=#{devdir}", "SDKROOT=#{MacOS.sdk_path}", - # stone-soup tries to use `uname -m` to determine build -arch, - # which is frequently wrong on OS X - "SDK_VER=#{MacOS.version}", "MARCH=#{MacOS.preferred_arch}", - *args - end - end - - test do - output = shell_output("#{bin}/crawl --version") - assert_match "Crawl version #{version}", output - end -end diff --git a/Formula/stone.rb b/Formula/stone.rb deleted file mode 100644 index 8a04d7f3c80c0..0000000000000 --- a/Formula/stone.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Stone < Formula - desc "TCP/IP packet repeater in the application layer" - homepage "http://www.gcd.org/sengoku/stone/" - url "http://www.gcd.org/sengoku/stone/stone-2.3e.tar.gz" - sha256 "b2b664ee6771847672e078e7870e56b886be70d9ff3d7b20d0b3d26ee950c670" - - bottle do - cellar :any_skip_relocation - sha256 "0d2db17e57c53f2be5b1b8feea072923bddd3c86efe37c9a8db6296087ee5687" => :mojave - sha256 "579a9dee4b6fb57f0f1313a656250b00a428bdff7c2401431bb96d0ef0496c25" => :high_sierra - sha256 "540bd64b2264bfe03d88ad620a7138a1d96742d6810eec301fd7e5ea63970ee9" => :sierra - sha256 "9d4038c7882d2fe256d77340b5e0ec52a551697b9869fb61f3a22b0be917e92b" => :el_capitan - sha256 "e01e391d43da23b477186a54f96b0d20bb67c24e1503e20408dc12d025f04def" => :yosemite - sha256 "ab43aca5038bdf014c1a5aaadb9e526626c9c4369dcaeac045b9dce6514b30bc" => :mavericks - end - - def install - system "make", "macosx" - bin.install "stone" - end - - test do - assert_match version.to_s, shell_output("#{bin}/stone -h 2>&1", 1) - end -end diff --git a/Formula/storm.rb b/Formula/storm.rb deleted file mode 100644 index 5168d44b8752d..0000000000000 --- a/Formula/storm.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Storm < Formula - desc "Distributed realtime computation system to process data streams" - homepage "https://storm.apache.org" - url "https://www.apache.org/dyn/closer.cgi?path=storm/apache-storm-1.2.2/apache-storm-1.2.2.tar.gz" - sha256 "e97e92ea13998c95ee37565bdf4d6f6a379deb259ec76cb0178cd356502e657f" - - bottle :unneeded - - conflicts_with "stormssh", :because => "both install 'storm' binary" - - def install - libexec.install Dir["*"] - bin.install_symlink libexec/"bin/storm" - end - - test do - system bin/"storm", "version" - end -end diff --git a/Formula/stormlib.rb b/Formula/stormlib.rb deleted file mode 100644 index 17b0c65a2ba28..0000000000000 --- a/Formula/stormlib.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Stormlib < Formula - desc "Library for handling Blizzard MPQ archives" - homepage "http://www.zezula.net/en/mpq/stormlib.html" - url "https://github.com/ladislav-zezula/StormLib/archive/v9.22.tar.gz" - sha256 "7ed583aae5549ba1abc68a8fc9a642b28323cdf835941bd9b2b549a7b623e53d" - head "https://github.com/ladislav-zezula/StormLib.git" - - bottle do - cellar :any - sha256 "c550620a6b13ac72d11763612582483514156a4ffdb1cf5a602b71ae186cc588" => :mojave - sha256 "b76d57a2af0971b96c0cc46b3e24078486f732131b6845e92cbd776b4d5c20c7" => :high_sierra - sha256 "aa27fedf8877032a52c85f9a7a57a94149e9fd2c18f25351fd6a61203e5a797d" => :sierra - sha256 "71e3d5e94f69c23c8f0d5181b4bc130c3202aa6c99e0e42c4b6508b71be0167a" => :el_capitan - end - - depends_on "cmake" => :build - - # prevents cmake from trying to write to /Library/Frameworks/ - patch :DATA - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) { - printf("%s", STORMLIB_VERSION_STRING); - return 0; - } - EOS - system ENV.cc, "-o", "test", "test.c" - assert_equal version.to_s, shell_output("./test") - end -end - -__END__ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 76c6aa9..4fd0a46 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -297,7 +297,6 @@ target_include_directories(${LIBRARY_NAME} PUBLIC src/) - set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "src/StormLib.h;src/StormPort.h") - if(BUILD_SHARED_LIBS) - if(APPLE) -- set_target_properties(${LIBRARY_NAME} PROPERTIES FRAMEWORK true) - set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-framework Carbon") - endif() - if(UNIX) diff --git a/Formula/stormpath-cli.rb b/Formula/stormpath-cli.rb deleted file mode 100644 index f7913b432b2c4..0000000000000 --- a/Formula/stormpath-cli.rb +++ /dev/null @@ -1,115 +0,0 @@ -class StormpathCli < Formula - include Language::Python::Virtualenv - - desc "The official Stormpath command-line client" - homepage "https://github.com/stormpath/stormpath-cli" - url "https://github.com/stormpath/stormpath-cli/archive/0.1.3.tar.gz" - sha256 "e6ec75f781bc85ed7648c9df60c40d863f4cc2b091a90db6e63b36549fd25dba" - revision 1 - head "https://github.com/stormpath/stormpath-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "108644ac378cce01613d95b06c7196a9ba8f2857e97096a6002e3e4107d5949a" => :mojave - sha256 "1dc3d6ae6eca2eda594985a2a18f4f884d52c1040e68f97e58f3131bd57896fd" => :high_sierra - sha256 "8217bab9ebdbbed6fffc9cec313d769707acbaad0f402757cfec8c611e644712" => :sierra - end - - depends_on "python" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/e1/0f/f8d5e939184547b3bdc6128551b831a62832713aa98c2ccdf8c47ecc7f17/certifi-2018.8.24.tar.gz" - sha256 "376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cssselect" do - url "https://files.pythonhosted.org/packages/52/ea/f31e1d2e9eb130fda2a631e22eac369dc644e8807345fbed5113f2d6f92b/cssselect-1.0.3.tar.gz" - sha256 "066d8bc5229af09617e24b3ca4d52f1f9092d9e061931f4184cd572885c23204" - end - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/4b/20/ddf5eb3bd5c57582d2b4652b4bbcf8da301bdfe5d805cb94e805f4d7464d/lxml-4.2.5.tar.gz" - sha256 "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/db/73/2a73deac557e3d2489e4aa14d606e20d6a445cd24a1f8661a6b1d26b41c6/oauthlib-1.0.3.tar.gz" - sha256 "ef4bfe4663ca3b97a995860c0173b967ebd98033d02f38c9e1b2cbb6c191d9ad" - end - - resource "PyDispatcher" do - url "https://files.pythonhosted.org/packages/cd/37/39aca520918ce1935bea9c356bcbb7ed7e52ad4e31bff9b943dfc8e7115b/PyDispatcher-2.0.5.tar.gz" - sha256 "5570069e1b1769af1fe481de6dd1d3a388492acddd2cdad7a3bde145615d5caf" - end - - resource "PyJWT" do - url "https://files.pythonhosted.org/packages/00/5e/b358c9bb24421e6155799d995b4aa3aa3307ffc7ecae4ad9d29fd7e07a73/PyJWT-1.6.4.tar.gz" - sha256 "4ee413b357d53fd3fb44704577afac88e72e878716116270d722723d65b42176" - end - - resource "pyquery" do - url "https://files.pythonhosted.org/packages/e4/46/596311bb390c902b61499ff9fd5a355cdf85c8455737cb0f08c6c2c13e22/pyquery-1.4.0.tar.gz" - sha256 "4771db76bd14352eba006463656aef990a0147a0eeaf094725097acfa90442bf" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "stormpath" do - url "https://files.pythonhosted.org/packages/de/df/a50733a0ef701607ec0888d71d9b988031ab922889fcf0e06b2285a44f92/stormpath-2.5.5.tar.gz" - sha256 "3a5c4f48f6a0de44d761ea2c521498719fa0f64f3497ef22f57473d745b8b8fc" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - def install - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - virtualenv_install_with_resources - end - - test do - system bin/"stormpath", "--help" - end -end diff --git a/Formula/stormssh-completion.rb b/Formula/stormssh-completion.rb deleted file mode 100644 index 7636e6edf2e7a..0000000000000 --- a/Formula/stormssh-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class StormsshCompletion < Formula - desc "Completion for storm-ssh" - homepage "https://github.com/vigo/stormssh-completion" - url "https://github.com/vigo/stormssh-completion/archive/0.1.1.tar.gz" - sha256 "cbdc35d674919aacc18723c42f2b6354fcd3efdcbfbb28e1fe60fbd1c1c7b18d" - - bottle :unneeded - - def install - bash_completion.install "stormssh" - end - - test do - assert_match "-F __stormssh", - shell_output("source #{bash_completion}/stormssh && complete -p storm") - end -end diff --git a/Formula/stormssh.rb b/Formula/stormssh.rb deleted file mode 100644 index 766b17e5433ec..0000000000000 --- a/Formula/stormssh.rb +++ /dev/null @@ -1,142 +0,0 @@ -class Stormssh < Formula - desc "Command-line tool to manage your ssh connections" - homepage "https://github.com/emre/storm" - url "https://files.pythonhosted.org/packages/0a/18/85d12be676ae0c1d98173b07cc289bbf9e0c67d6c7054b8df3e1003bf992/stormssh-0.7.0.tar.gz" - sha256 "8d034dcd9487fa0d280e0ec855d08420f51d5f9f2249f932e3c12119eaa53453" - head "https://github.com/emre/storm.git" - - bottle do - cellar :any - sha256 "ff0a5b97f1450f89fe8ccd0ccb04067200db88fd36758b3847d06fa678f1ce98" => :mojave - sha256 "b9eee122d5ff26e4bfea039705f3bc6aa7677556bf904fa3b9afda495d58c278" => :high_sierra - sha256 "8a359d6072d36572383630fe7632cc59b8526993dc7071d3fca88a0bcc486226" => :sierra - end - - depends_on "python" - - conflicts_with "storm", :because => "both install 'storm' binary" - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "flask" do - url "https://files.pythonhosted.org/packages/4b/12/c1fbf4971fda0e4de05565694c9f0c92646223cff53f15b6eb248a310a62/Flask-1.0.2.tar.gz" - sha256 "2271c0070dbcb5275fad4a82e29f23ab92682dc45f9dfbc22c02ba9b9322ce48" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "markupsafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "jinja2" do - url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz" - sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" - end - - resource "werkzeug" do - url "https://files.pythonhosted.org/packages/9f/08/a3bb1c045ec602dc680906fc0261c267bed6b3bb4609430aff92c3888ec8/Werkzeug-0.14.1.tar.gz" - sha256 "c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c" - end - - resource "itsdangerous" do - url "https://files.pythonhosted.org/packages/source/i/itsdangerous/itsdangerous-0.24.tar.gz" - sha256 "cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519" - end - - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz" - sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/10/46/059775dc8e50f722d205452bced4b3cc965d27e8c3389156acd3b1123ae3/pyasn1-0.4.4.tar.gz" - sha256 "f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz" - sha256 "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/a4/57/86681372e7a8d642718cadeef38ead1c24c4a1af21ae852642bf974e37c7/paramiko-2.4.2.tar.gz" - sha256 "a8975a7df3560c9f1e2b43dc54ebd40fd00a7017392ca5445ce7df409f900fcb" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage { system "python3", *Language::Python.setup_install_args(libexec/"vendor") } - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - sshconfig_path = (testpath/"sshconfig") - touch sshconfig_path - - system bin/"storm", "add", "--config", "sshconfig", "aliastest", "user@example.com:22" - - expected_output = <<~EOS - Host aliastest - hostname example.com - user user - port 22 - EOS - assert_equal expected_output, sshconfig_path.read - end -end diff --git a/Formula/stout.rb b/Formula/stout.rb deleted file mode 100644 index 84f38aaa965b6..0000000000000 --- a/Formula/stout.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Stout < Formula - desc "Reliable static website deploy tool" - homepage "https://github.com/cloudflare/Stout" - url "https://github.com/cloudflare/Stout/archive/v1.3.1.tar.gz" - sha256 "455e238e238bf79f58d2e5a41f5ac582361c71a7eec72f45554f1c8f64de7006" - - bottle do - cellar :any_skip_relocation - sha256 "0b3f55e4d72a4430c9c85a47321057bbdfd112b4b8772417aa8a0a8eee9cf1b8" => :mojave - sha256 "e2774d1b1ea912934176fe6e68a3b7577239da41bbd15b1a71712a54f315a221" => :high_sierra - sha256 "144aac3cb78b98bf773b19e63e7eb3598261ab264e30b6d39ee3c8fdb9442cf9" => :sierra - sha256 "74dac56156c250fef9de8ebae64a1d6ae7b93c068a43f602a4debdc1b23a3945" => :el_capitan - sha256 "bc065cf4232169432ce91ea22c456c6891f00a386055c795131dc82572f5a3ae" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/cloudflare" - ln_s buildpath, buildpath/"src/github.com/cloudflare/stout" - system "go", "build", "-o", bin/"stout", "-v", "github.com/cloudflare/stout/src" - end - - test do - system "#{bin}/stout" - end -end diff --git a/Formula/stow.rb b/Formula/stow.rb deleted file mode 100644 index 34cae147e7bb9..0000000000000 --- a/Formula/stow.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Stow < Formula - desc "Organize software neatly under a single directory tree (e.g. /usr/local)" - homepage "https://www.gnu.org/software/stow/" - url "https://ftp.gnu.org/gnu/stow/stow-2.2.2.tar.gz" - mirror "https://ftpmirror.gnu.org/stow/stow-2.2.2.tar.gz" - sha256 "e2f77649301b215b9adbc2f074523bedebad366812690b9dc94457af5cf273df" - - bottle do - cellar :any_skip_relocation - sha256 "05b4b0aea83a487a80fcacdbf0d0e6d255e471cc0fda1b1cb162e9a83244d98b" => :mojave - sha256 "e530cfa129ccce32a3a593c9ab09ea5c2976bef981d8ea3dc5af9f65e301e78a" => :high_sierra - sha256 "93dc759da363883c6cbf581f957ed0c23abac5563de1680cb11721adc425dedc" => :sierra - sha256 "0bf0a55711d83b08953a2de183d20cec481029dc95e9ea2ebd5049bf13ea8e1b" => :el_capitan - sha256 "4062d438086c6f9e407db818d318ef9d857f7c909bd4730edfc174573f5958d4" => :yosemite - sha256 "1f8ca6143dacc3cebb3551606b51a982b287c3b2f371010c7b10ca82ce89a393" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test").mkpath - system "#{bin}/stow", "-nvS", "test" - end -end diff --git a/Formula/streamlink.rb b/Formula/streamlink.rb deleted file mode 100644 index 362079ff705e7..0000000000000 --- a/Formula/streamlink.rb +++ /dev/null @@ -1,127 +0,0 @@ -class Streamlink < Formula - desc "CLI for extracting streams from various websites to a video player" - homepage "https://streamlink.github.io/" - url "https://github.com/streamlink/streamlink/releases/download/0.14.2/streamlink-0.14.2.tar.gz" - sha256 "a8c7f9a758ade056a35d439f78408e9e43ce1069dde9289d322702d35c214150" - revision 1 - - bottle do - cellar :any - sha256 "c4a96191f6db7355541deb480c22d9257536902b2f734917efa2ceab50410a45" => :mojave - sha256 "c22ef0ffd0a93c276ea06b57ea98fab25ed7fd2faeabeee46fe50802382c56cb" => :high_sierra - sha256 "bbc2bf85d06976e7bdee912a2e8c3f3ed9509c726eaebb1f11eedfce7fd6f760" => :sierra - end - - depends_on "python" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d/certifi-2018.4.16.tar.gz" - sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz" - sha256 "9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "iso-639" do - url "https://files.pythonhosted.org/packages/5a/8d/27969852f4e664525c3d070e44b2b719bc195f4d18c311c52e57bb93614e/iso-639-0.4.5.tar.gz" - sha256 "dc9cd4b880b898d774c47fe9775167404af8a85dd889d58f9008035109acce49" - end - - resource "iso3166" do - url "https://files.pythonhosted.org/packages/46/06/64145b8d6be8474db1f09f6b01a083921c11a4c979d029677c7e943d2433/iso3166-0.8.tar.gz" - sha256 "fbeb17bed90d15b1f6d6794aa2ea458e5e273a1d29b6f4939423c97640e14933" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pycryptodome" do - url "https://files.pythonhosted.org/packages/00/cc/c623e25aa38e947a449a9b67c3a1c65f2db56aeb43b541cb197dc659f78d/pycryptodome-3.6.3.tar.gz" - sha256 "9b2e142322273ee88c96ade5cfc0ff99b759be32a06d49ce55cd39adeb1e4541" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - - resource "PySocks" do - url "https://files.pythonhosted.org/packages/53/12/6bf1d764f128636cef7408e8156b7235b150ea31650d0260969215bb8e7d/PySocks-1.6.8.tar.gz" - sha256 "3fe52c55890a248676fd69dc9e3c4e811718b777834bcaab7a8125cf9deac672" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/28/85/df04ec21c622728316b591c2852fd20a0e74324eeb6ca26f351844ba815f/websocket_client-0.48.0.tar.gz" - sha256 "18f1170e6a1b5463986739d9fd45c4308b0d025c1b2f9b88788d8f69e8a5eb4a" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/streamlink", "https://www.youtube.com/watch?v=he2a4xK8ctk", "144p", "-o", "video.mp4" - assert_match "video.mp4: ISO Media, MPEG v4 system, 3GPP", shell_output("file video.mp4") - end -end diff --git a/Formula/streamripper.rb b/Formula/streamripper.rb deleted file mode 100644 index 4d9f48a02a645..0000000000000 --- a/Formula/streamripper.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Streamripper < Formula - desc "Separate tracks via Shoutcasts title-streaming" - homepage "https://streamripper.sourceforge.io/" - url "https://downloads.sourceforge.net/sourceforge/streamripper/streamripper-1.64.6.tar.gz" - sha256 "c1d75f2e9c7b38fd4695be66eff4533395248132f3cc61f375196403c4d8de42" - - bottle do - cellar :any - sha256 "79591e5c81bf59b36533ff8d7ebcab361df3a4c8809d4adf6086d0b1dee49372" => :mojave - sha256 "e0f65bd98aea085a8c2cc09e8d4a4f383a84bc18ebe39d73f466e538bea7bad4" => :high_sierra - sha256 "3f055510dc825aa663f35c91aa5f4e5a57baacd69c00f0c428df4a98ad9b6a7e" => :sierra - sha256 "eff1bb37cd652e9b3194e2fda3c682bda9da12f413a11c4e5e337c9bc849b2ea" => :el_capitan - sha256 "3465e96b5f17000df88a85729674f911097ab9f1b0170a0c3c89f4892dba6fbb" => :yosemite - sha256 "a92b924639b9210e83cae1e63baa8f9b45ab4ec38816e19e32ad6fbae420a510" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - # the Makefile ignores CPPFLAGS from the environment, which - # breaks the build when HOMEBREW_PREFIX is not /usr/local - ENV.append_to_cflags ENV.cppflags - - chmod 0755, "./install-sh" # or "make install" fails - - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - system "#{bin}/streamripper", "--version" - end -end diff --git a/Formula/stress-ng.rb b/Formula/stress-ng.rb deleted file mode 100644 index 989b7ab1752f0..0000000000000 --- a/Formula/stress-ng.rb +++ /dev/null @@ -1,26 +0,0 @@ -class StressNg < Formula - desc "Stress test a computer system in various selectable ways" - homepage "https://kernel.ubuntu.com/~cking/stress-ng/" - url "https://kernel.ubuntu.com/~cking/tarballs/stress-ng/stress-ng-0.09.11.tar.xz" - sha256 "49695dbd3260c0ddac96a73a8bfdecb6263d8e13dcaab0b386138e77fe04e425" - - bottle do - cellar :any_skip_relocation - sha256 "36197ba3946affee14e67cb006d94c6653f79bf9bb859643afb1bb281e22f020" => :mojave - sha256 "f5c642bf25ad5bac9c364a87015af26b7626b620f8901517c61a5917e59b2db3" => :high_sierra - sha256 "9eeaf3c7a5c10809dadf29a73157ada42aef355f44b078e81dbe6f2f269371db" => :sierra - end - - depends_on :macos => :sierra - - def install - inreplace "Makefile", "/usr", prefix - system "make" - system "make", "install" - end - - test do - output = shell_output("#{bin}/stress-ng -c 1 -t 1 2>&1") - assert_match "successful run completed", output - end -end diff --git a/Formula/stress.rb b/Formula/stress.rb deleted file mode 100644 index b3413dbbd95dd..0000000000000 --- a/Formula/stress.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Stress < Formula - desc "Tool to impose load on and stress test a computer system" - homepage "https://people.seas.harvard.edu/~apw/stress/" - url "https://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/s/stress/stress_1.0.4.orig.tar.gz" - sha256 "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b" - - bottle do - cellar :any_skip_relocation - sha256 "57923f0549beb3e528ad7683a09d615096d875512fb46b9ed7c54aa6382ca793" => :mojave - sha256 "3087af5469f5867b82ab85158c7268d0172b58da91baec06916659bb0fd2f930" => :high_sierra - sha256 "1a18d667f7804579758079e3a3f94683a64687120b5f4b77cf25a63f3f8cec39" => :sierra - sha256 "b4635c185bfba65271d74aaff155161d2df388be303d135315066260e9699c5e" => :el_capitan - sha256 "845f44585d0a3749c163300029f832125950d37af4a5b53c0b20fb143e6db014" => :yosemite - sha256 "6741dc72df4a43cfe2c947d9e50d08df1e35029025ff2436d5a20a01117f4fb6" => :mavericks - sha256 "28ac09ff04e83b174f915a6306de69f70d8b81f6316b0f1884bf2ac8061134ee" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"stress", "--cpu", "2", "--io", "1", "--vm", "1", "--vm-bytes", "128M", "--timeout", "1s", "--verbose" - end -end diff --git a/Formula/strongswan.rb b/Formula/strongswan.rb deleted file mode 100644 index 4651eed2b4a89..0000000000000 --- a/Formula/strongswan.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Strongswan < Formula - desc "VPN based on IPsec" - homepage "https://www.strongswan.org" - url "https://download.strongswan.org/strongswan-5.7.1.tar.bz2" - sha256 "006f9c9126e2a2f4e7a874b5e1bd2abec1bbbb193c8b3b3a4c6ccd8c2d454bec" - - bottle do - sha256 "1cbb4ac83e832978cce224ddde5e92e940484486fe22969166a10230193e32df" => :mojave - sha256 "40cda2362e638287bf61ec0058c61c1b9d193c680aa0c8279ab6c86ef9da8114" => :high_sierra - sha256 "4f829167204e004acb44aa813f5b0d7e2e6271d4cb91e6e0c580cefc1dddb8ab" => :sierra - end - - head do - url "https://git.strongswan.org/strongswan.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - end - - depends_on "openssl" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --sbindir=#{bin} - --sysconfdir=#{etc} - --disable-defaults - --enable-charon - --enable-cmd - --enable-constraints - --enable-curve25519 - --enable-eap-gtc - --enable-eap-identity - --enable-eap-md5 - --enable-eap-mschapv2 - --enable-ikev1 - --enable-ikev2 - --enable-kernel-pfkey - --enable-kernel-pfroute - --enable-nonce - --enable-openssl - --enable-osx-attr - --enable-pem - --enable-pgp - --enable-pkcs1 - --enable-pkcs8 - --enable-pki - --enable-pubkey - --enable-revocation - --enable-scepclient - --enable-socket-default - --enable-sshkey - --enable-stroke - --enable-swanctl - --enable-unity - --enable-updown - --enable-x509 - --enable-xauth-generic - ] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make", "check" - system "make", "install" - end - - def caveats; <<~EOS - You will have to run both "ipsec" and "charon-cmd" with "sudo". - EOS - end - - test do - system "#{bin}/ipsec", "--version" - system "#{bin}/charon-cmd", "--version" - end -end diff --git a/Formula/stubby.rb b/Formula/stubby.rb deleted file mode 100644 index f36e1a7e42c4d..0000000000000 --- a/Formula/stubby.rb +++ /dev/null @@ -1,89 +0,0 @@ -class Stubby < Formula - desc "DNS privacy enabled stub resolver service based on getdns" - homepage "https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby" - url "https://github.com/getdnsapi/stubby/archive/v0.2.3.tar.gz" - sha256 "5fbe10f421f1313b5e2259b0eec96785af0c5b460431cf86bb6450a11cb3f473" - revision 1 - head "https://github.com/getdnsapi/stubby.git", :branch => "develop" - - bottle do - sha256 "e40466bb416aa54ad666c666776054e9377110a2840c32bb4a8f440dfd47085f" => :mojave - sha256 "b277d4481f2c96b9216263e2cd097aa9c474142b400fd4da5bd54dcc425de51e" => :high_sierra - sha256 "fbc6353984eb3fe1b9e6175b2dd450542f888fc8ac71047fec0e50f8a228eceb" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "getdns" - depends_on "libyaml" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - end - - plist_options :startup => true, :manual => "sudo stubby -C #{HOMEBREW_PREFIX}/etc/stubby/stubby.yml" - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - RunAtLoad - - ProgramArguments - - #{opt_bin}/stubby - -C - #{etc}/stubby/stubby.yml - -l - - StandardErrorPath - #{var}/log/stubby/stubby.log - StandardOutPath - #{var}/log/stubby/stubby.log - - - EOS - end - - test do - assert_predicate etc/"stubby/stubby.yml", :exist? - (testpath/"stubby_test.yml").write <<~EOS - resolution_type: GETDNS_RESOLUTION_STUB - dns_transport_list: - - GETDNS_TRANSPORT_TLS - - GETDNS_TRANSPORT_UDP - - GETDNS_TRANSPORT_TCP - listen_addresses: - - 127.0.0.1@5553 - idle_timeout: 0 - upstream_recursive_servers: - - address_data: 145.100.185.15 - - address_data: 145.100.185.16 - - address_data: 185.49.141.37 - EOS - output = shell_output("#{bin}/stubby -i -C stubby_test.yml") - assert_match "bindata for 145.100.185.15", output - pid = fork do - exec "#{bin}/stubby", "-C", testpath/"stubby_test.yml" - end - begin - sleep 2 - output = shell_output("dig @127.0.0.1 -p 5553 getdnsapi.net") - assert_match "status: NOERROR", output - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/stunnel.rb b/Formula/stunnel.rb deleted file mode 100644 index 7f894323a82fd..0000000000000 --- a/Formula/stunnel.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Stunnel < Formula - desc "SSL tunneling program" - homepage "https://www.stunnel.org/" - url "https://www.stunnel.org/downloads/stunnel-5.50.tar.gz" - mirror "https://www.usenix.org.uk/mirrors/stunnel/stunnel-5.50.tar.gz" - sha256 "951d92502908b852a297bd9308568f7c36598670b84286d3e05d4a3a550c0149" - - bottle do - cellar :any - sha256 "e0fb492f1f33313f9b826df1c215b3e9249838ca6b86fc0f16ad82a06aa360ff" => :mojave - sha256 "992e36736d37859b9554a2c31ad76ed48d2ab112f1d93c440f1302cf6ce560fe" => :high_sierra - sha256 "ce75cbd34d1aa2d22faadbc78666e8663c6b5a629ccd76f1e7a343486aea95d8" => :sierra - end - - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}", - "--mandir=#{man}", - "--disable-libwrap", - "--disable-systemd", - "--with-ssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - - # This programmatically recreates pem creation used in the tools Makefile - # which would usually require interactivity to resolve. - cd "tools" do - args = %w[req -new -x509 -days 365 -rand stunnel.rnd -config - openssl.cnf -out stunnel.pem -keyout stunnel.pem -sha256 -subj - /C=PL/ST=Mazovia\ Province/L=Warsaw/O=Stunnel\ Developers/OU=Provisional\ CA/CN=localhost/] - system "dd", "if=/dev/urandom", "of=stunnel.rnd", "bs=256", "count=1" - system "#{Formula["openssl"].opt_bin}/openssl", *args - chmod 0600, "stunnel.pem" - (etc/"stunnel").install "stunnel.pem" - end - end - - def caveats - <<~EOS - A bogus SSL server certificate has been installed to: - #{etc}/stunnel/stunnel.pem - - This certificate will be used by default unless a config file says otherwise! - Stunnel will refuse to load the sample configuration file if left unedited. - - In your stunnel configuration, specify a SSL certificate with - the "cert =" option for each service. - EOS - end - - test do - (testpath/"tstunnel.conf").write <<~EOS - cert = #{etc}/stunnel/stunnel.pem - - setuid = nobody - setgid = nobody - - [pop3s] - accept = 995 - connect = 110 - - [imaps] - accept = 993 - connect = 143 - EOS - - assert_match "successful", pipe_output("#{bin}/stunnel #{testpath}/tstunnel.conf 2>&1") - end -end diff --git a/Formula/stuntman.rb b/Formula/stuntman.rb deleted file mode 100644 index 5334193b8e2af..0000000000000 --- a/Formula/stuntman.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Stuntman < Formula - desc "Implementation of the STUN protocol" - homepage "http://www.stunprotocol.org/" - url "http://www.stunprotocol.org/stunserver-1.2.13.tgz" - sha256 "d336be76c23b330bcdbf7d0af9e82f1f4f9866f9caffd37062c7f44d9c272661" - head "https://github.com/jselbie/stunserver.git" - - bottle do - cellar :any_skip_relocation - sha256 "8580792523ebe1f30693558294d64fd77526c44362f91298bf8dac265349d057" => :mojave - sha256 "4b634566e1b841ab54c3732b032648731cbb00a15f071143be080c1f11121d54" => :high_sierra - sha256 "1d16a7d994f57dbac8b7d2496ac3346f9c753f3d09ec0760b213cabaf92ab403" => :sierra - sha256 "2d3187c4be196200c5007849e56abbd2ea10f30567977feda55455897a5b6061" => :el_capitan - sha256 "4f1011c0cdd34060150d50889a0ed100ee449c5ea5621c4fee8262741b1816af" => :yosemite - end - - depends_on "boost" => :build - depends_on "openssl" - - def install - system "make" - bin.install "stunserver", "stunclient", "stuntestcode" - end - - test do - system "#{bin}/stuntestcode" - end -end diff --git a/Formula/style-check.rb b/Formula/style-check.rb deleted file mode 100644 index 26c2fc1269edb..0000000000000 --- a/Formula/style-check.rb +++ /dev/null @@ -1,30 +0,0 @@ -class StyleCheck < Formula - desc "Parses latex-formatted text in search of forbidden phrases" - homepage "https://www.cs.umd.edu/~nspring/software/style-check-readme.html" - url "https://www.cs.umd.edu/~nspring/software/style-check-0.14.tar.gz" - sha256 "2ae806fcce9e3b80162c64634422dc32d7f0e6f8a81ba5bc7879358744b4e119" - - bottle do - cellar :any_skip_relocation - sha256 "6427d438896bf32d45e0f71aa3d81817e59ac39ffc23cc6fc0ef1a29fb413491" => :mojave - sha256 "3fdd513cff0a9f298357e5e918532bc2c236cbb6bf4c981a77270c69b49b9f08" => :high_sierra - sha256 "1a6787ed0c5cbe6ee567e112b16d5d32193bb0dacbf23e515f512df3287a3abd" => :sierra - sha256 "8ad833cef9ca35a1ae95569f93c8936a82c6d6039e3bd4560e2b1dc93fd029d8" => :el_capitan - sha256 "08759f3a407af4dab0310f4a02ee18f15f2104011d702a300adbe9d33bcde0f5" => :yosemite - sha256 "afeff378c5e3aac20d3fa3756d7dbd85242f6d4d846e9cd670f3119069e83a52" => :mavericks - end - - def install - inreplace "style-check.rb", "/etc/style-check.d/", etc/"style-check.d/" - system "make", "PREFIX=#{prefix}", - "SYSCONFDIR=#{etc}/style-check.d", - "install" - end - - test do - (testpath/".style-censor").write "homebrew % capitalize Homebrew\n" - (testpath/"paper.tex").write "Today I worked on homebrew\n" - - system "#{bin}/style-check.rb", "-v", "paper.tex" - end -end diff --git a/Formula/sub2srt.rb b/Formula/sub2srt.rb deleted file mode 100644 index 678e5b8648f84..0000000000000 --- a/Formula/sub2srt.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Sub2srt < Formula - desc "Convert subtitles from .sub to subviewer .srt format" - homepage "https://github.com/robelix/sub2srt" - url "https://github.com/robelix/sub2srt/archive/0.5.5.tar.gz" - sha256 "169d94d1d0e946a5d57573b7b7b5883875996f802362341fe1a1a0220229b905" - head "https://github.com/robelix/sub2srt.git" - - bottle :unneeded - - def install - bin.install "sub2srt" - end - - test do - (testpath/"test.sub").write <<~EOS - {1100}{1300}time to...|one - {1350}{1400}homebrew|two - EOS - expected = <<~EOS - 1 - 00:00:44,000 --> 00:00:52,000 - time to... - one - - 2 - 00:00:54,000 --> 00:00:56,000 - homebrew - two - EOS - system "#{bin}/sub2srt", "#{testpath}/test.sub" - assert_equal expected, (testpath/"test.srt").read.chomp - end -end diff --git a/Formula/subliminal.rb b/Formula/subliminal.rb deleted file mode 100644 index b86985bdb467e..0000000000000 --- a/Formula/subliminal.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Subliminal < Formula - include Language::Python::Virtualenv - - desc "Library to search and download subtitles" - homepage "https://subliminal.readthedocs.org" - url "https://files.pythonhosted.org/packages/f0/84/8cddb13aa4142e85546cd7c0d0546d2c1a25f0876000a3ec37151dfd8eb9/subliminal-2.0.5.tar.gz" - sha256 "147aa54f54de62d6fcafa213bb9ea89319600c133dab1a5532ff7126352bfbb7" - head "https://github.com/Diaoul/subliminal.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "457861fcc30e065232f158501fd4e3b80fb0c60bcbfbcb12dca0ac3906c37121" => :mojave - sha256 "5582303e8dd6e3ddcc82b5ca88454337116ed22e46c08e6bea6b9068c9d91085" => :high_sierra - sha256 "1e53262d5fe047cbb56366be5c195f172a28c1d0f24dfaccb1808c7d4bd739ac" => :sierra - end - - depends_on "python@2" # does not support Python 3.7 - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/bd/66/0a7f48a0f3fb1d3a4072bceb5bbd78b1a6de4d801fb7135578e7c7b1f563/appdirs-1.4.0.tar.gz" - sha256 "8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5" - end - - resource "babelfish" do - url "https://files.pythonhosted.org/packages/34/b7/b36c651a9136990060ab4d6c9a32de81752123105b940b2f3b958e5c6cd0/babelfish-0.5.5.tar.gz" - sha256 "8380879fa51164ac54a3e393f83c4551a275f03617f54a99d70151358e444104" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/86/ea/8e9fbce5c8405b9614f1fd304f7109d9169a3516a493ce4f7f77c39435b7/beautifulsoup4-4.5.1.tar.gz" - sha256 "3c9474036afda9136aac6463def733f81017bf9ef3510d25634f335b0c87f5e1" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/7d/87/4e3a3f38b2f5c578ce44f8dc2aa053217de9f0b6d737739b0ddac38ed237/chardet-2.3.0.tar.gz" - sha256 "e53e38b3a4afe6d1132de62b7400a4ac363452dc5dfcf8d88e8e0cce663c68aa" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/7a/00/c14926d8232b36b08218067bcd5853caefb4737cda3f0a47437151344792/click-6.6.tar.gz" - sha256 "cc6a19da8ebff6e7074f731447ef7e112bd23adf3de5c597cf9989f2fd8defe9" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/9d/a9/ba70aadc6170841a1c6145e9039d4b1c2a4ef8c44cd0ca9b09ab79be9120/dogpile.cache-0.6.2.tar.gz" - sha256 "73793471af07af6dc5b3ee015abfaca4220caaa34c615537f5ab007ed150726d" - end - - resource "enzyme" do - url "https://files.pythonhosted.org/packages/dd/99/e4eee822d9390ebf1f63a7a67e8351c09fb7cd75262e5bb1a5256898def9/enzyme-0.4.1.tar.gz" - sha256 "f2167fa97c24d1103a94d4bf4eb20f00ca76c38a37499821049253b2059c62bb" - end - - resource "futures" do - url "https://files.pythonhosted.org/packages/55/db/97c1ca37edab586a1ae03d6892b6633d8eaa23b23ac40c7e5bbc55423c78/futures-3.0.5.tar.gz" - sha256 "0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df" - end - - resource "guessit" do - url "https://files.pythonhosted.org/packages/76/12/036c7fba23ff1dcf6ae8b4f5d0bc8d3617c1f7dfe5696e6ed3e6f38f7d75/guessit-2.0.5.tar.gz" - sha256 "626e0024c5cca9b84883b65246e4f238e3f39064664486f69f086c853a63ff61" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/c3/2c/63275fab26a0fd8cadafca71a3623e4d0f0ee8ed7124a5bb128853d178a7/pbr-1.10.0.tar.gz" - sha256 "186428c270309e6fdfe2d5ab0949ab21ae5f7dea831eab96701b86bd666af39c" - end - - resource "pysrt" do - url "https://files.pythonhosted.org/packages/f6/33/16ad65a8973cb8bcb494af09ee1b9ab5ffdd6ff300bce5d3ac7d3cb1f2cc/pysrt-1.1.1.tar.gz" - sha256 "fb4c10424549fc5a32d19cd5091f00316b875461fcd79a7809bb55056974d0aa" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/61/6b/f3a920258ea1237d091b4a06aa0e527fa3ab76ede5875745425851e3d4c7/python-dateutil-2.5.1.tar.gz" - sha256 "40d1bc468c7df50aff9e7a12c14687f9180efcff86900ee2963f9f2c13b5d7a9" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f7/c7/08e54702c74baf9d8f92d0bc331ecabf6d66a56f6d36370f0a672fc6a535/pytz-2016.6.1.tar.bz2" - sha256 "b5aff44126cf828537581e534cc94299b223b945a2bb3b5434d37bf8c7f3a10c" - end - - resource "rarfile" do - url "https://files.pythonhosted.org/packages/21/20/f07592dcf45f8f88a23c094019008ad220307401214a5c5a4e44d3e93acf/rarfile-2.8.tar.gz" - sha256 "2a27e401daa6d8ff0df1112a274a3661ca3e4afaac626217506fb1391069ca61" - end - - resource "rebulk" do - url "https://files.pythonhosted.org/packages/4d/71/44e0ca08d29265185963bf39a5566746ef1a7e663b5e155bd67a9e4fbd5c/rebulk-0.7.3.tar.gz" - sha256 "1ee0f672be5cfeed793d294c1cfc078c254fb0966af59191e4f6a0785b3b1697" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/2e/ad/e627446492cc374c284e82381215dcd9a0a87c4f6e90e9789afefe6da0ad/requests-2.11.1.tar.gz" - sha256 "5acf980358283faba0b897c73959cecf8b841205bb4b2ad3ef545f46eae1a133" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz" - sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/98/33/2c8003cb4294d1729bfb6cdf4bbfe74b968403b2df0a80ee876bebf20488/stevedore-1.17.1.tar.gz" - sha256 "79414e27ece996b2e81161c1ec91536f2b15645d5f6bd28128724486e1c4b8e3" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/".config").mkpath - system bin/"subliminal", "download", "-l", "en", - "The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4" - assert_predicate testpath/"The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.en.srt", :exist? - end -end diff --git a/Formula/subnetcalc.rb b/Formula/subnetcalc.rb deleted file mode 100644 index 49a60c72f9937..0000000000000 --- a/Formula/subnetcalc.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Subnetcalc < Formula - desc "IPv4/IPv6 subnet calculator" - homepage "https://www.uni-due.de/~be0001/subnetcalc/" - url "https://www.uni-due.de/~be0001/subnetcalc/download/subnetcalc-2.4.9.tar.gz" - sha256 "dce27b53857625fdec0409b6534f89eb573d19cc2928ef6d81845902a759cbe9" - head "https://github.com/dreibh/subnetcalc.git" - - bottle do - cellar :any - sha256 "5ae7f6d094951ba6dc5e8e8eac37536bd2b5abdef11b32cb0c76fe105f99647e" => :mojave - sha256 "56552b16e0c1326eb508d13af9bdab59709670b25082ec837d3334fd497c45bf" => :high_sierra - sha256 "bd9806c0f81f3e29c698d170bfe98e43d1c74f0cd88cc2de4511a67dee807c5d" => :sierra - sha256 "424750f2fe1b78f72dc87becbb0310fe82afe0e6797ab30195ac15c1462b56a4" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "geoip" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/subnetcalc", "::1" - end -end diff --git a/Formula/subversion.rb b/Formula/subversion.rb deleted file mode 100644 index 36a8461010254..0000000000000 --- a/Formula/subversion.rb +++ /dev/null @@ -1,230 +0,0 @@ -class Subversion < Formula - desc "Version control system designed to be a better CVS" - homepage "https://subversion.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.11.0.tar.bz2" - mirror "https://archive.apache.org/dist/subversion/subversion-1.11.0.tar.bz2" - sha256 "87c44344b074ac2e9ed7ca9675fb1e5b197051c3deecfe5934e5f6aefbf83e56" - revision 2 - - bottle do - sha256 "e7bbcad66645e19497f86fc53ffbc6ab8565b9c00b27ded3ce768a7c8d5a37d2" => :mojave - sha256 "dccecc8c5673437a8b7001f31ef22af3e95915fd11d7fd63ecccbdd6ba321a25" => :high_sierra - sha256 "bd36436ffe7bc83dd96b4c44802413c838e04d80430df735fe7462a78e5ca0e2" => :sierra - end - - head do - url "https://github.com/apache/subversion.git", :branch => "trunk" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - end - - option "with-java", "Build Java bindings" - - deprecated_option "java" => "with-java" - - depends_on "pkg-config" => :build - depends_on "scons" => :build # For Serf - depends_on "swig" => :build - depends_on "apr" - depends_on "apr-util" - - # build against Homebrew versions of - # gettext, lz4, perl, sqlite and utf8proc for consistency - depends_on "gettext" - depends_on "lz4" - depends_on "openssl" # For Serf - depends_on "perl" - depends_on "sqlite" - depends_on "utf8proc" - - # Other optional dependencies - depends_on :java => ["1.8+", :optional] - - # When building Perl or Ruby bindings, need to use a compiler that - # recognizes GCC-style switches, since that's what the system languages - # were compiled against. - fails_with :clang do - build 318 - cause "core.c:1: error: bad value (native) for -march= switch" - end - - resource "serf" do - url "https://www.apache.org/dyn/closer.cgi?path=serf/serf-1.3.9.tar.bz2" - mirror "https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2" - sha256 "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc" - end - - # Fix #23993 by stripping flags swig can't handle from SWIG_CPPFLAGS - # Prevent "-arch ppc" from being pulled in from Perl's $Config{ccflags} - # Prevent linking into a Python Framework - patch :DATA - - def install - ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/2.7/bin" - # Fix #33530 by ensuring the system Ruby can build test programs. - ENV.delete "SDKROOT" - - serf_prefix = libexec/"serf" - - resource("serf").stage do - # scons ignores our compiler and flags unless explicitly passed - args = %W[ - PREFIX=#{serf_prefix} GSSAPI=/usr CC=#{ENV.cc} - CFLAGS=#{ENV.cflags} LINKFLAGS=#{ENV.ldflags} - OPENSSL=#{Formula["openssl"].opt_prefix} - APR=#{Formula["apr"].opt_prefix} - APU=#{Formula["apr-util"].opt_prefix} - ] - scons(*args) - system "scons", "install" - end - - if build.with? "java" - # Java support doesn't build correctly in parallel: - # https://github.com/Homebrew/homebrew/issues/20415 - ENV.deparallelize - end - - # Use existing system zlib - # Use dep-provided other libraries - # Don't mess with Apache modules (since we're not sudo) - args = %W[ - --prefix=#{prefix} - --disable-debug - --enable-optimize - --disable-mod-activation - --disable-plaintext-password-storage - --with-apr-util=#{Formula["apr-util"].opt_prefix} - --with-apr=#{Formula["apr"].opt_prefix} - --with-apxs=no - --with-ruby-sitedir=#{lib}/ruby - --with-serf=#{serf_prefix} - --with-sqlite=#{Formula["sqlite"].opt_prefix} - --with-zlib=#{MacOS.sdk_path_if_needed}/usr - --without-apache-libexecdir - --without-berkeley-db - --without-gpg-agent - RUBY=/usr/bin/ruby - ] - - args << "--enable-javahl" << "--without-jikes" if build.with? "java" - - # The system Python is built with llvm-gcc, so we override this - # variable to prevent failures due to incompatible CFLAGS - ENV["ac_cv_python_compile"] = ENV.cc - - inreplace "Makefile.in", - "toolsdir = @bindir@/svn-tools", - "toolsdir = @libexecdir@/svn-tools" - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - system "make", "install" - bash_completion.install "tools/client-side/bash_completion" => "subversion" - - system "make", "tools" - system "make", "install-tools" - - system "make", "swig-py" - system "make", "install-swig-py" - (lib/"python2.7/site-packages").install_symlink Dir["#{lib}/svn-python/*"] - - # In theory SWIG can be built in parallel, in practice... - ENV.deparallelize - - archlib = Utils.popen_read("perl -MConfig -e 'print $Config{archlib}'") - perl_core = Pathname.new(archlib)/"CORE" - onoe "'#{perl_core}' does not exist" unless perl_core.exist? - - inreplace "Makefile" do |s| - s.change_make_var! "SWIG_PL_INCLUDES", - "$(SWIG_INCLUDES) -arch #{MacOS.preferred_arch} -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I#{HOMEBREW_PREFIX}/include -I#{perl_core}" - end - system "make", "swig-pl" - system "make", "install-swig-pl" - - # This is only created when building against system Perl, but it isn't - # purged by Homebrew's post-install cleaner because that doesn't check - # "Library" directories. It is however pointless to keep around as it - # only contains the perllocal.pod installation file. - rm_rf prefix/"Library/Perl" - - if build.with? "java" - system "make", "javahl" - system "make", "install-javahl" - end - - # Peg to system Ruby - system "make", "swig-rb", "EXTRA_SWIG_LDFLAGS=-L/usr/lib" - system "make", "install-swig-rb" - end - - def caveats - s = <<~EOS - svntools have been installed to: - #{opt_libexec} - - The perl bindings are located in various subdirectories of: - #{opt_lib}/perl5 - - If you wish to use the Ruby bindings you may need to add: - #{HOMEBREW_PREFIX}/lib/ruby - to your RUBYLIB. - EOS - - if build.with? "java" - s += "\n" - s += <<~EOS - You may need to link the Java bindings into the Java Extensions folder: - sudo mkdir -p /Library/Java/Extensions - sudo ln -s #{HOMEBREW_PREFIX}/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib - EOS - end - - s - end - - test do - system "#{bin}/svnadmin", "create", "test" - system "#{bin}/svnadmin", "verify", "test" - system "perl", "-e", "use SVN::Client; new SVN::Client()" - end -end - -__END__ -diff --git a/subversion/bindings/swig/perl/native/Makefile.PL.in b/subversion/bindings/swig/perl/native/Makefile.PL.in -index a60430b..bd9b017 100644 ---- a/subversion/bindings/swig/perl/native/Makefile.PL.in -+++ b/subversion/bindings/swig/perl/native/Makefile.PL.in -@@ -76,10 +76,13 @@ my $apr_ldflags = '@SVN_APR_LIBS@' - - chomp $apr_shlib_path_var; - -+my $config_ccflags = $Config{ccflags}; -+$config_ccflags =~ s/-arch\s+\S+//g; -+ - my %config = ( - ABSTRACT => 'Perl bindings for Subversion', - DEFINE => $cppflags, -- CCFLAGS => join(' ', $cflags, $Config{ccflags}), -+ CCFLAGS => join(' ', $cflags, $config_ccflags), - INC => join(' ', $includes, $cppflags, - " -I$swig_srcdir/perl/libsvn_swig_perl", - " -I$svnlib_srcdir/include", - -diff --git a/build/get-py-info.py b/build/get-py-info.py -index 29a6c0a..dd1a5a8 100644 ---- a/build/get-py-info.py -+++ b/build/get-py-info.py -@@ -83,7 +83,7 @@ def link_options(): - options = sysconfig.get_config_var('LDSHARED').split() - fwdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR') - -- if fwdir and fwdir != "no-framework": -+ if fwdir and fwdir != "no-framework" and sys.platform != 'darwin': - - # Setup the framework prefix - fwprefix = sysconfig.get_config_var('PYTHONFRAMEWORKPREFIX') diff --git a/Formula/subversion@1.8.rb b/Formula/subversion@1.8.rb deleted file mode 100644 index 0b172428197fe..0000000000000 --- a/Formula/subversion@1.8.rb +++ /dev/null @@ -1,168 +0,0 @@ -class SubversionAT18 < Formula - desc "Version control system" - homepage "https://subversion.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.8.19.tar.bz2" - mirror "https://archive.apache.org/dist/subversion/subversion-1.8.19.tar.bz2" - sha256 "56e869b0db59519867f7077849c9c0962c599974f1412ea235eab7f98c20e6be" - - bottle do - sha256 "8f940fc03a334713836d6ed93f748fe573fc51dc5468dd575e14d7a614a4fb0a" => :mojave - sha256 "3a4e79dead2f4d209e06fe631903ed870610ddfc9ac091ec7d734f5025d0642e" => :high_sierra - sha256 "a3d73ecc8eddacfe764f5a83d5215220b7d3100d694c17ac3bed68089984e863" => :sierra - sha256 "0a39c347943ac7f025af06571378987e5d69805ab45cafd38215b5929a5a3722" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "scons" => :build # For Serf - depends_on "apr" - depends_on "apr-util" - depends_on "openssl" # For Serf - depends_on "sqlite" # build against Homebrew version for consistency - - resource "serf" do - url "https://www.apache.org/dyn/closer.cgi?path=serf/serf-1.3.9.tar.bz2" - mirror "https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2" - sha256 "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc" - end - - # Fix #23993 by stripping flags swig can't handle from SWIG_CPPFLAGS - # Prevent "-arch ppc" from being pulled in from Perl's $Config{ccflags} - # Prevent linking into a Python Framework - patch :DATA - - def install - inreplace "Makefile.in", - "@APXS@ -i -S LIBEXECDIR=\"$(APACHE_LIBEXECDIR)\"", - "@APXS@ -i -S LIBEXECDIR=\"#{libexec.to_s.sub("@", "\\@")}\"" - - serf_prefix = libexec/"serf" - - resource("serf").stage do - # SConstruct merges in gssapi linkflags using scons's MergeFlags, - # but that discards duplicate values - including the duplicate - # values we want, like multiple -arch values for a universal build. - # Passing 0 as the `unique` kwarg turns this behaviour off. - inreplace "SConstruct", "unique=1", "unique=0" - - # scons ignores our compiler and flags unless explicitly passed - args = %W[PREFIX=#{serf_prefix} GSSAPI=/usr CC=#{ENV.cc} - CFLAGS=#{ENV.cflags} LINKFLAGS=#{ENV.ldflags} - OPENSSL=#{Formula["openssl"].opt_prefix}] - - if MacOS.version >= :sierra || !MacOS::CLT.installed? - args << "APR=#{Formula["apr"].opt_prefix}" - args << "APU=#{Formula["apr-util"].opt_prefix}" - end - - scons(*args) - system "scons", "install" - end - - if build.include? "unicode-path" - raise <<~EOS - The --unicode-path patch is not supported on Subversion 1.8. - - Upgrading from a 1.7 version built with this patch is not supported. - - You should stay on 1.7, install 1.7 from homebrew-versions, or - brew rm subversion && brew install subversion - to build a new version of 1.8 without this patch. - EOS - end - - # Use existing system zlib - # Use dep-provided other libraries - # Don't mess with Apache modules (since we're not sudo) - args = ["--disable-debug", - "--prefix=#{prefix}", - "--with-zlib=/usr", - "--with-sqlite=#{Formula["sqlite"].opt_prefix}", - "--with-serf=#{serf_prefix}", - "--disable-mod-activation", - "--disable-nls", - "--without-apache-libexecdir", - "--without-berkeley-db"] - - if MacOS::CLT.installed? && MacOS.version < :sierra - args << "--with-apr=/usr" - args << "--with-apr-util=/usr" - else - args << "--with-apr=#{Formula["apr"].opt_prefix}" - args << "--with-apr-util=#{Formula["apr-util"].opt_prefix}" - args << "--with-apxs=no" - end - - inreplace "Makefile.in", - "toolsdir = @bindir@/svn-tools", - "toolsdir = @libexecdir@/svn-tools" - - system "./configure", *args - system "make" - system "make", "install" - bash_completion.install "tools/client-side/bash_completion" => "subversion" - - system "make", "tools" - system "make", "install-tools" - end - - def caveats; <<~EOS - svntools have been installed to: - #{opt_libexec} - EOS - end - - test do - system "#{bin}/svnadmin", "create", "test" - system "#{bin}/svnadmin", "verify", "test" - end -end - -__END__ -diff --git a/configure b/configure -index 445251b..6ff4332 100755 ---- a/configure -+++ b/configure -@@ -25366,6 +25366,8 @@ fi - SWIG_CPPFLAGS="$CPPFLAGS" - - SWIG_CPPFLAGS=`echo "$SWIG_CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'` -+ SWIG_CPPFLAGS=`echo "$SWIG_CPPFLAGS" | $SED -e 's/-F\/[^ ]* //'` -+ SWIG_CPPFLAGS=`echo "$SWIG_CPPFLAGS" | $SED -e 's/-isystem\/[^ ]* //'` - - - -diff --git a/subversion/bindings/swig/perl/native/Makefile.PL.in b/subversion/bindings/swig/perl/native/Makefile.PL.in -index a60430b..bd9b017 100644 ---- a/subversion/bindings/swig/perl/native/Makefile.PL.in -+++ b/subversion/bindings/swig/perl/native/Makefile.PL.in -@@ -76,10 +76,13 @@ my $apr_ldflags = '@SVN_APR_LIBS@' - - chomp $apr_shlib_path_var; - -+my $config_ccflags = $Config{ccflags}; -+$config_ccflags =~ s/-arch\s+\S+//g; -+ - my %config = ( - ABSTRACT => 'Perl bindings for Subversion', - DEFINE => $cppflags, -- CCFLAGS => join(' ', $cflags, $Config{ccflags}), -+ CCFLAGS => join(' ', $cflags, $config_ccflags), - INC => join(' ', $includes, $cppflags, - " -I$swig_srcdir/perl/libsvn_swig_perl", - " -I$svnlib_srcdir/include", - -diff --git a/build/get-py-info.py b/build/get-py-info.py -index 29a6c0a..dd1a5a8 100644 ---- a/build/get-py-info.py -+++ b/build/get-py-info.py -@@ -83,7 +83,7 @@ def link_options(): - options = sysconfig.get_config_var('LDSHARED').split() - fwdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR') - -- if fwdir and fwdir != "no-framework": -+ if fwdir and fwdir != "no-framework" and sys.platform != 'darwin': - - # Setup the framework prefix - fwprefix = sysconfig.get_config_var('PYTHONFRAMEWORKPREFIX') diff --git a/Formula/suil.rb b/Formula/suil.rb deleted file mode 100644 index 15d4b7bbc0777..0000000000000 --- a/Formula/suil.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Suil < Formula - desc "Lightweight C library for loading and wrapping LV2 plugin UIs" - homepage "https://drobilla.net/software/suil/" - url "https://download.drobilla.net/suil-0.10.0.tar.bz2" - sha256 "9895c531f80c7e89a2b4b47de589d73b70bf48db0b0cfe56e5d54237ea4b8848" - revision 1 - - bottle do - rebuild 1 - sha256 "5923dafda40c49d3ee3a402e497d642433111bfc041a286798bc952b46940079" => :mojave - sha256 "c8271567bd28cab7dfaacb5dc60c4031b3ec32b36e54604cb8ef2db16074d624" => :high_sierra - sha256 "75da682959d5f8a3ea4abbf6fd7da223c3c48a6e196629ecc1fe76e619c500ae" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "lv2" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - return suil_ui_supported("my-host", "my-ui"); - } - EOS - lv2 = Formula["lv2"].opt_include - system ENV.cc, "-I#{lv2}", "-I#{include}/suil-0", "-L#{lib}", "-lsuil-0", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/suite-sparse.rb b/Formula/suite-sparse.rb deleted file mode 100644 index 229f1f370d058..0000000000000 --- a/Formula/suite-sparse.rb +++ /dev/null @@ -1,43 +0,0 @@ -class SuiteSparse < Formula - desc "Suite of Sparse Matrix Software" - homepage "http://faculty.cse.tamu.edu/davis/suitesparse.html" - url "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-5.3.0.tar.gz" - sha256 "90e69713d8c454da5a95a839aea5d97d8d03d00cc1f667c4bdfca03f640f963d" - - bottle do - cellar :any - sha256 "df1a7ad4ee40175a764b4886923eeeb2f2da9bfa9f9acde37749f18b1fa2fe87" => :mojave - sha256 "ce3bbe3bc921e56751cf3c16308aca835d4e469229f9c701c5a55d88e345015f" => :high_sierra - sha256 "383431c30941920ae76418025da663c6795ce3360925dc5644c2c5d505b33ec7" => :sierra - sha256 "080a1b7292deb21297e00e112e6836e20006a3eaca67972d8c0d176092604347" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "metis" - - conflicts_with "mongoose", :because => "suite-sparse vendors libmongoose.dylib" - - def install - mkdir "GraphBLAS/build" do - system "cmake", "..", *std_cmake_args - end - - args = [ - "INSTALL=#{prefix}", - "BLAS=-framework Accelerate", - "LAPACK=$(BLAS)", - "MY_METIS_LIB=-L#{Formula["metis"].opt_lib} -lmetis", - "MY_METIS_INC=#{Formula["metis"].opt_include}", - ] - system "make", "library", *args - system "make", "install", *args - lib.install Dir["**/*.a"] - pkgshare.install "KLU/Demo/klu_simple.c" - end - - test do - system ENV.cc, "-o", "test", pkgshare/"klu_simple.c", - "-L#{lib}", "-lsuitesparseconfig", "-lklu" - system "./test" - end -end diff --git a/Formula/sundials.rb b/Formula/sundials.rb deleted file mode 100644 index ec3e1a0b2a6b2..0000000000000 --- a/Formula/sundials.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Sundials < Formula - desc "Nonlinear and differential/algebraic equations solver" - homepage "https://computation.llnl.gov/casc/sundials/main.html" - url "https://computation.llnl.gov/projects/sundials/download/sundials-4.0.0.tar.gz" - sha256 "953dd7c30d25d5e28f6aa4d803c5b6160294a5c0c9572ac4e9c7e2d461bd9a19" - - bottle do - cellar :any - sha256 "44f1cb73e7f3bcf2dfa3450b72ffc5454d812c5f640c6b4c0db1dcb87a0be80c" => :mojave - sha256 "d363f718a7a7d3d9b9dc9b654a255d98b338da0127cf680a45f3c7d90735681c" => :high_sierra - sha256 "601650d720db30743d29f072955dd5b9f1bb21b96a0b503d29b20058b2a393c0" => :sierra - end - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "suite-sparse" - depends_on "veclibfort" - - def install - blas = "-L#{Formula["veclibfort"].opt_lib} -lvecLibFort" - args = std_cmake_args + %W[ - -DCMAKE_C_COMPILER=#{ENV["CC"]} - -DBUILD_SHARED_LIBS=ON - -DKLU_ENABLE=ON - -DKLU_LIBRARY_DIR=#{Formula["suite-sparse"].opt_lib} - -DKLU_INCLUDE_DIR=#{Formula["suite-sparse"].opt_include} - -DLAPACK_ENABLE=ON - -DLAPACK_LIBRARIES=#{blas};#{blas} - -DMPI_ENABLE=ON - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - cp Dir[prefix/"examples/nvector/serial/*"], testpath - system ENV.cc, "-I#{include}", "test_nvector.c", "sundials_nvector.c", - "test_nvector_serial.c", "-L#{lib}", "-lsundials_nvecserial" - assert_match "SUCCESS: NVector module passed all tests", - shell_output("./a.out 42 0") - end -end diff --git a/Formula/superlu.rb b/Formula/superlu.rb deleted file mode 100644 index b5ab499f8961d..0000000000000 --- a/Formula/superlu.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Superlu < Formula - desc "Solve large, sparse nonsymmetric systems of equations" - homepage "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" - url "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz" - sha256 "28fb66d6107ee66248d5cf508c79de03d0621852a0ddeba7301801d3d859f463" - revision 3 - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "99db35e78ccfb979cfdb922bebf7f79ce9479d5683900d7f64110cb42c92f4c7" => :mojave - sha256 "5c037c2cf95a26ea76672e0831ac3fbf34bb8d4378acc21dc99040f7b9b421f7" => :high_sierra - sha256 "e4fdd5560b722e5fbb5892cde2795a5dcf18889d4f663315fa29a154a266af3a" => :sierra - sha256 "a20af0692236e73bce9cdd4c659ba7b0c98d7dbaf2953bbf0eae4255abec0e1d" => :el_capitan - end - - depends_on "veclibfort" - - def install - ENV.deparallelize - cp "MAKE_INC/make.mac-x", "./make.inc" - - args = ["SuperLUroot=#{buildpath}", - "SUPERLULIB=$(SuperLUroot)/lib/libsuperlu.a", - "CC=#{ENV.cc}", - "BLASLIB=-L#{Formula["veclibfort"].opt_lib} -lvecLibFort"] - - system "make", "lib", *args - lib.install Dir["lib/*"] - (include/"superlu").install Dir["SRC/*.h"] - doc.install Dir["Doc/*"] - - # Source and data for test - pkgshare.install "EXAMPLE/dlinsol.c" - pkgshare.install "EXAMPLE/g20.rua" - end - - test do - system ENV.cc, pkgshare/"dlinsol.c", "-o", "test", - "-I#{include}/superlu", "-L#{lib}", "-lsuperlu", - "-L#{Formula["veclibfort"].opt_lib}", "-lvecLibFort" - assert_match "No of nonzeros in L+U = 11886", - shell_output("./test < #{pkgshare}/g20.rua") - end -end diff --git a/Formula/supermodel.rb b/Formula/supermodel.rb deleted file mode 100644 index 078b5bbedc586..0000000000000 --- a/Formula/supermodel.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Supermodel < Formula - desc "Sega Model 3 arcade emulator" - homepage "https://www.supermodel3.com/" - url "https://www.supermodel3.com/Files/Supermodel_0.2a_Src.zip" - sha256 "ecaf3e7fc466593e02cbf824b722587d295a7189654acb8206ce433dcff5497b" - head "http://svn.code.sf.net/p/model3emu/code/trunk" - - bottle do - rebuild 1 - sha256 "85678e40606c4bff6ff454ec15bafd2ab317887b2fb48865433d8cb0cdae7a3a" => :mojave - sha256 "83c0dbca7a5c28564eba4e7a73894746004aab5025071b350c3c47271fc42625" => :high_sierra - sha256 "1203bb3d289e36e1ca15720dbcd4e63ffcf4fa4d09588cb4fb81092cb72399ec" => :sierra - sha256 "78cf8e9fb973e3cd136a212936bdc8003d9897a1bb8a6a1eba3cc7ff0fba3c88" => :el_capitan - end - - depends_on "sdl" - - def install - inreplace "Makefiles/Makefile.SDL.OSX.GCC" do |s| - # Set up SDL library correctly - s.gsub! "-framework SDL", "`sdl-config --libs`" - s.gsub! /(\$\(COMPILER_FLAGS\))/, "\\1 -I#{Formula["sdl"].opt_prefix}/include" - # Fix missing label issue for auto-generated code - s.gsub! %r{(\$\(OBJ_DIR\)/m68k\w+)\.o: \1.c (.*)\n(\s*\$\(CC\)) \$<}, "\\1.o: \\2\n\\3 \\1.c" - end - - # Use /usr/local/var/supermodel for saving runtime files - inreplace "Src/OSD/SDL/Main.cpp" do |s| - s.gsub! %r{(Config|Saves|NVRAM)/}, "#{var}/supermodel/\\1/" - s.gsub! /(\w+\.log)/, "#{var}/supermodel/Logs/\\1" - end - - system "make", "-f", "Makefiles/Makefile.SDL.OSX.GCC" - bin.install "bin/Supermodel" => "supermodel" - (var/"supermodel/Config").install "Config/Supermodel.ini" - (var/"supermodel/Saves").mkpath - (var/"supermodel/NVRAM").mkpath - (var/"supermodel/Logs").mkpath - end - - def caveats; <<~EOS - Config, Saves, and NVRAM are located in the following directory: - #{var}/supermodel/ - EOS - end - - test do - system "#{bin}/supermodel", "-print-games" - end -end diff --git a/Formula/supersonic.rb b/Formula/supersonic.rb deleted file mode 100644 index b8090e6fd9b3e..0000000000000 --- a/Formula/supersonic.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Supersonic < Formula - desc "C++ library providing a column oriented query engine" - homepage "https://code.google.com/archive/p/supersonic/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/supersonic/supersonic-0.9.4.tar.gz" - sha256 "1592dfd2dc73f0b97298e0d25e51528dc9a94e9e7f4ab525569f63db0442d769" - revision 9 - - bottle do - cellar :any - sha256 "394c7505ea220272eac96246fc9d73cbc95f1bdaa7b9c20963d526b43b1d21ac" => :mojave - sha256 "57ef2a85b81a4581e2ee83f6dd8f931015c25888333f08e16411cc4340935d86" => :high_sierra - sha256 "22004732b50e6175ba87623313f1d4871f89db9888fcab62fb4ba8ff44fffd0c" => :sierra - sha256 "a14e0ddc6e7ad95f12a48aeeeeaaf884b628c6affcd4ddc13cc14f72fed48b1e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "gflags" - depends_on "glog" - depends_on "protobuf" - - needs :cxx11 - - def install - ENV.cxx11 - - # gflags no longer supply .pc files; supersonic's compile expects them. - ENV["GFLAGS_CFLAGS"] = "-I#{Formula["gflags"].opt_include}" - ENV["GFLAGS_LIBS"] = "-L#{Formula["gflags"].opt_lib} -lgflags" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-re2" - system "make", "clean" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using std::cout; - using std::endl; - using supersonic::BoundExpressionTree; - using supersonic::Expression; - using supersonic::Plus; - using supersonic::AttributeAt; - using supersonic::TupleSchema; - using supersonic::Attribute; - using supersonic::INT32; - using supersonic::NOT_NULLABLE; - using supersonic::FailureOrOwned; - using supersonic::HeapBufferAllocator; - using supersonic::View; - using supersonic::EvaluationResult; - using supersonic::SingleSourceProjector; - - BoundExpressionTree* PrepareBoundexpression_r() { - scoped_ptr addition(Plus(AttributeAt(0), AttributeAt(1))); - TupleSchema schema; - schema.add_attribute(Attribute("a", INT32, NOT_NULLABLE)); - schema.add_attribute(Attribute("b", INT32, NOT_NULLABLE)); - FailureOrOwned bound_addition = - addition->Bind(schema, HeapBufferAllocator::Get(), 2048); - - if(bound_addition.is_success()) { - return bound_addition.release(); - } - - return NULL; - } - - const int32* AddColumns(int32* a, int32* b, size_t row_count, BoundExpressionTree* bound_tree) { - TupleSchema schema; - schema.add_attribute(Attribute("a", INT32, NOT_NULLABLE)); - schema.add_attribute(Attribute("b", INT32, NOT_NULLABLE)); - View input_view(schema); - input_view.set_row_count(row_count); - input_view.mutable_column(0)->Reset(a, NULL); - input_view.mutable_column(1)->Reset(b, NULL); - EvaluationResult result = bound_tree->Evaluate(input_view); - if(result.is_success()) { - cout << "Column Count : " << result.get().column_count() << - " and Row Count" << result.get().row_count() << endl; - return result.get().column(0).typed_data(); - } - - return NULL; - } - - int main(void) { - int32 a[8] = {0, 1, 2, 3, 4, 5, 6, 7}; - int32 b[8] = {3, 4, 6, 8, 1, 2, 2, 9}; - - scoped_ptr expr(PrepareBoundexpression_r()); - const int32* result = AddColumns(a, b, 8, expr.get()); - - if(result == NULL) { - cout << "Failed to execute the addition operation!" << endl; - } - - cout << "Results: "; - for(int i = 0; i < 8; i++) { - cout << result[i] << " "; - } - - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-stdlib=libc++", "-L#{lib}", "-lsupersonic", - "-L#{Formula["glog"].opt_lib}", "-lglog", - "-L#{Formula["protobuf"].opt_lib}", "-lprotobuf", - "-L#{Formula["boost"].opt_lib}", "-lboost_system", "-o", "test" - system "./test" - end -end diff --git a/Formula/supertux.rb b/Formula/supertux.rb deleted file mode 100644 index f431bd44bec99..0000000000000 --- a/Formula/supertux.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Supertux < Formula - desc "Classic 2D jump'n run sidescroller game" - homepage "https://www.supertux.org/" - url "https://github.com/SuperTux/supertux/releases/download/v0.5.1/SuperTux-v0.5.1-Source.tar.gz" - sha256 "c9dc3b42991ce5c5d0d0cb94e44c4ec2373ad09029940f0e92331e7e9ada0ac5" - revision 3 - head "https://github.com/SuperTux/supertux.git" - - bottle do - cellar :any - rebuild 1 - sha256 "006225504f80952487eb62f66359ac5976248ec4de46f266915f41f543e4742a" => :mojave - sha256 "66385b85ba64e6ce35f5d74e9c2304e73795b977b75f814ff4eeb55cbfccba0b" => :high_sierra - sha256 "fbde2e2249a89401fd9893b095857b283c4a7a3a4ab9dec47b8c30d2030d0268" => :sierra - sha256 "c66b6e14fc23160f5024ad7790286ec0bcb7f8ed262ce6c400dc8757c1c16ba8" => :el_capitan - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "glew" - depends_on "libogg" - depends_on "libvorbis" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - - # Fix symlink passing to physfs - # https://github.com/SuperTux/supertux/issues/614 - patch do - url "https://github.com/SuperTux/supertux/commit/47a353e2981161e2da12492822fe88d797af2fec.diff?full_index=1" - sha256 "2b12aeead4f425a0626051e246a9f6d527669624803d53d6d0b5758e51099059" - end - - # Fix compilation issue with Xcode 9 - # https://github.com/SuperTux/supertux/issues/762 - # using Squirrel's patch - # https://github.com/albertodemichelis/squirrel/commit/a3a78eec - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/834e41a/supertux/squirrel_xcode9.patch" - sha256 "1830dcb88f635f611aa3236abdaee75b53293df407ebc8214f31635a75876831" - end - - needs :cxx11 - - def install - ENV.cxx11 - - args = std_cmake_args - args << "-DINSTALL_SUBDIR_BIN=bin" - args << "-DINSTALL_SUBDIR_SHARE=share/supertux" - # Without the following option, Cmake intend to use the library of MONO framework. - args << "-DPNG_PNG_INCLUDE_DIR=#{Formula["libpng"].opt_include}" - system "cmake", ".", *args - system "make", "install" - - # Remove unnecessary files - (share/"appdata").rmtree - (share/"applications").rmtree - (share/"pixmaps").rmtree - (prefix/"MacOS").rmtree - end - - test do - assert_equal "supertux2 v#{version}", shell_output("#{bin}/supertux2 --version").chomp - end -end diff --git a/Formula/supervisor.rb b/Formula/supervisor.rb deleted file mode 100644 index 6161319a61c54..0000000000000 --- a/Formula/supervisor.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Supervisor < Formula - include Language::Python::Virtualenv - - desc "Process Control System" - homepage "http://supervisord.org/" - url "https://github.com/Supervisor/supervisor/archive/3.3.5.tar.gz" - sha256 "151001bd249f7556aa1baf3ce4c8fcf3a2bf39a58d6581ac1a7ea1c398b75f5a" - - bottle do - cellar :any_skip_relocation - sha256 "a3ed3071d994b9b2d196fc578efa73df0f718b1987625d51dc557d2ab1ed13a1" => :mojave - sha256 "3eaf8b83c15a57a21ad897c98c7aca0b585bb17da659ce9e49d221a1f2c23f09" => :high_sierra - sha256 "980435fca59e5310dfda4e5d10892dab22fa9e11504428031c7f632be65aead2" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - resource "meld3" do - url "https://files.pythonhosted.org/packages/45/a0/317c6422b26c12fe0161e936fc35f36552069ba8e6f7ecbd99bbffe32a5f/meld3-1.0.2.tar.gz" - sha256 "f7b754a0fde7a4429b2ebe49409db240b5699385a572501bb0d5627d299f9558" - end - - def install - inreplace buildpath/"supervisor/skel/sample.conf" do |s| - s.gsub! %r{/tmp/supervisor\.sock}, var/"run/supervisor.sock" - s.gsub! %r{/tmp/supervisord\.log}, var/"log/supervisord.log" - s.gsub! %r{/tmp/supervisord\.pid}, var/"run/supervisord.pid" - s.gsub! /^;\[include\]$/, "[include]" - s.gsub! %r{^;files = relative/directory/\*\.ini$}, "files = #{etc}/supervisor.d/*.ini" - end - - virtualenv_install_with_resources - - etc.install buildpath/"supervisor/skel/sample.conf" => "supervisord.ini" - end - - def post_install - (var/"run").mkpath - (var/"log").mkpath - end - - plist_options :manual => "supervisord -c #{HOMEBREW_PREFIX}/etc/supervisord.ini" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/supervisord - -c - #{etc}/supervisord.ini - --nodaemon - - - - EOS - end - - test do - (testpath/"sd.ini").write <<~EOS - [unix_http_server] - file=supervisor.sock - - [supervisord] - loglevel=debug - - [rpcinterface:supervisor] - supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - - [supervisorctl] - serverurl=unix://supervisor.sock - EOS - - begin - pid = fork { exec bin/"supervisord", "--nodaemon", "-c", "sd.ini" } - sleep 1 - output = shell_output("#{bin}/supervisorctl -c sd.ini version") - assert_match version.to_s, output - ensure - Process.kill "TERM", pid - end - end -end diff --git a/Formula/surfraw.rb b/Formula/surfraw.rb deleted file mode 100644 index a4faf08478a6e..0000000000000 --- a/Formula/surfraw.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Surfraw < Formula - desc "Shell Users' Revolutionary Front Rage Against the Web" - homepage "https://packages.debian.org/sid/surfraw" - url "https://ftp.openbsd.org/pub/OpenBSD/distfiles/surfraw-2.3.0.tar.gz" - sha256 "ad0420583c8cdd84a31437e59536f8070f15ba4585598d82638b950e5c5c3625" - - bottle do - cellar :any_skip_relocation - sha256 "c9f5fc8020b021799c68cd204d4612f487c44315c15967be78a037576b378920" => :mojave - sha256 "69920395cbde5fdc2492aa27fc765d4dafe910e26d9d3a05777888425310a0a9" => :high_sierra - sha256 "69920395cbde5fdc2492aa27fc765d4dafe910e26d9d3a05777888425310a0a9" => :sierra - sha256 "69920395cbde5fdc2492aa27fc765d4dafe910e26d9d3a05777888425310a0a9" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--with-graphical-browser=open" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - output = shell_output("#{bin}/surfraw -p duckduckgo homebrew") - assert_equal "https://duckduckgo.com/lite/?q=homebrew", output.chomp - end -end diff --git a/Formula/suricata.rb b/Formula/suricata.rb deleted file mode 100644 index 333fff154008d..0000000000000 --- a/Formula/suricata.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Suricata < Formula - desc "Network IDS, IPS, and security monitoring engine" - homepage "https://suricata-ids.org/" - url "https://www.openinfosecfoundation.org/download/suricata-4.0.5.tar.gz" - sha256 "74dacb4359d57fbd3452e384eeeb1dd77b6ae00f02e9994ad5a7b461d5f4c6c2" - revision 2 - - bottle do - sha256 "1d351c09ec06f585958ddd226260888ad8c8cdc30f64f1205c0df0fbfac57668" => :mojave - sha256 "f6a8662692fa102a6c82cb09226ce79119228679dab0811d6c343c3f5c87fa87" => :high_sierra - sha256 "0c7de04f5caac5d4147ac2b510344dfa9c9c1bdd510dcc698164e943fb8256ae" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "libmagic" - depends_on "libnet" - depends_on "libyaml" - depends_on "nspr" - depends_on "nss" - depends_on "pcre" - depends_on "python" - - resource "argparse" do - url "https://files.pythonhosted.org/packages/source/a/argparse/argparse-1.4.0.tar.gz" - sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/source/s/simplejson/simplejson-3.16.0.tar.gz" - sha256 "b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - jansson = Formula["jansson"] - libnet = Formula["libnet"] - libmagic = Formula["libmagic"] - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --sysconfdir=#{etc} - --localstatedir=#{var} - --with-libjansson-includes=#{jansson.opt_include} - --with-libjansson-libraries=#{jansson.opt_lib} - --with-libmagic-includes=#{libmagic.opt_include} - --with-libmagic-libraries=#{libmagic.opt_lib} - --with-libnet-includes=#{libnet.opt_include} - --with-libnet-libs=#{libnet.opt_lib} - ] - - system "./configure", *args - system "make", "install-full" - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - - # Leave the magic-file: prefix in otherwise it overrides a commented out line rather than intended line. - inreplace etc/"suricata/suricata.yaml", %r{magic-file: /.+/magic}, "magic-file: #{libmagic.opt_share}/misc/magic" - end - - test do - assert_match(/#{version}/, shell_output("#{bin}/suricata --build-info")) - end -end diff --git a/Formula/svdlibc.rb b/Formula/svdlibc.rb deleted file mode 100644 index 4c126585ff76c..0000000000000 --- a/Formula/svdlibc.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Svdlibc < Formula - desc "C library to perform singular value decomposition" - homepage "https://tedlab.mit.edu/~dr/SVDLIBC/" - url "https://tedlab.mit.edu/~dr/SVDLIBC/svdlibc.tgz" - version "1.4" - sha256 "aa1a49a95209801803cc2d9f8792e482b0e8302da8c7e7c9a38e25e5beabe5f8" - - bottle do - cellar :any_skip_relocation - rebuild 3 - sha256 "dc6f967a82e022b8bd193a0f346aa50b17df609de22acda3ead9eac89b1fd103" => :mojave - sha256 "7b1c2af44513a0280c2922b22dd0107189e9872a6dc2e0476df2b8c47902cf40" => :high_sierra - sha256 "91a70ced4042615305d39e9d4d88d91b4d971bf8bb40e883b8f7a2682bb2e729" => :sierra - sha256 "f4e320bb8555cfed8d39a134153df533a3b921ae01827728cba36c6217bb85be" => :el_capitan - sha256 "da1b02f2d5758322ddcfc30b0513249f31dd1aad96fd2f3377e9edc301f7c686" => :yosemite - sha256 "3be9467077ff9035209957c3c8111b3a50be89cce873726119efba60856eca38" => :mavericks - end - - def install - # make only builds - no configure or install targets, have to copy files manually - system "make", "HOSTTYPE=target" - include.install "svdlib.h" - lib.install "target/libsvd.a" - bin.install "target/svd" - end -end diff --git a/Formula/svg2pdf.rb b/Formula/svg2pdf.rb deleted file mode 100644 index 0fc50bfc06140..0000000000000 --- a/Formula/svg2pdf.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Svg2pdf < Formula - desc "Renders SVG images to a PDF file (using Cairo)" - homepage "https://cairographics.org/" - url "https://cairographics.org/snapshots/svg2pdf-0.1.3.tar.gz" - sha256 "854a870722a9d7f6262881e304a0b5e08a1c61cecb16c23a8a2f42f2b6a9406b" - revision 1 - - bottle do - cellar :any - sha256 "ba3e83fc0bf7a58166f2c4449b0f0d4590b5902ac2072ece48b9ca5eed13429a" => :mojave - sha256 "7a1c4ac8748a9c9013d6d6e50bd04b024e092dd718c878a0b7bcde3d9ca51a97" => :high_sierra - sha256 "bba8555de1a81fb92de544d77dc62fbe03e005b1b371d16127472890b7697503" => :sierra - sha256 "28e18b196650002c5c40c8cd6e38ecf26d16a5525f7d9ff9e2e3fe6dbfb9e17a" => :el_capitan - sha256 "c8479dbc6d2eaea9a8fd6e5273d571e517cf260bd04468930aa24b185802bd8a" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libsvg-cairo" - - resource("svg.svg") do - url "https://raw.githubusercontent.com/mathiasbynens/small/master/svg.svg" - sha256 "900fbe934249ad120004bd24adf66aad8817d89586273c0cc50e187bddebb601" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - resource("svg.svg").stage do - system "#{bin}/svg2pdf", "svg.svg", "test.pdf" - assert_predicate Pathname.pwd/"test.pdf", :exist? - end - end -end diff --git a/Formula/svg2png.rb b/Formula/svg2png.rb deleted file mode 100644 index 10df07fb5e4f8..0000000000000 --- a/Formula/svg2png.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Svg2png < Formula - desc "SVG to PNG converter" - homepage "https://cairographics.org/" - url "https://cairographics.org/snapshots/svg2png-0.1.3.tar.gz" - sha256 "e658fde141eb7ce981ad63d319339be5fa6d15e495d1315ee310079cbacae52b" - revision 1 - - bottle do - cellar :any - sha256 "fd2d0727b1ae83f458c17625894d0bf824dd9c58605a81528efb4332c17051c0" => :mojave - sha256 "c0495d355b1ca05b777814eb2bed14fbae20075a9aa1dd72bfdcdd2efd117587" => :high_sierra - sha256 "d3d9556295a1bed19da91bbe741d3980638bade739e37bbb19d01f517a5e442c" => :sierra - sha256 "327bbf146aedf651d8af446ae94a736fb89652cd8a4a7d8d0b00b1f6ca3f7693" => :el_capitan - sha256 "8d6abbad01e2b307369b7feadf2b79232b9b1f248bf5f789aa8a3231caffedff" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libsvg-cairo" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/svg2png", test_fixtures("test.svg"), "test.png" - assert_predicate testpath/"test.png", :exist? - end -end diff --git a/Formula/svgcleaner.rb b/Formula/svgcleaner.rb deleted file mode 100644 index b9f9901b0b9c6..0000000000000 --- a/Formula/svgcleaner.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Svgcleaner < Formula - desc "Cleans your SVG files by removing unnecessary data" - homepage "https://github.com/RazrFalcon/svgcleaner" - url "https://github.com/RazrFalcon/svgcleaner/archive/v0.9.5.tar.gz" - sha256 "dcf8dbc8939699e2e82141cb86688b6cd09da8cae5e18232ef14085c2366290c" - head "https://github.com/RazrFalcon/svgcleaner.git" - - bottle do - sha256 "a21da258fc59b005061edce47a5dfc6d9ac9c0e6bd528c9047785132428e4ea9" => :mojave - sha256 "bc7ce28fda3125d1b53d38225cf86b1a72fbfc5bdc6964014ce8a8af96cc9add" => :high_sierra - sha256 "141b68daa2335f0ca15ed707e07b239727340942c82943d9619e0b27a072701e" => :sierra - sha256 "4a8e60702be1d8cc7be187f8de0ead26b234d7018c567adbc4bc358b90c1aba0" => :el_capitan - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - (testpath/"in.svg").write <<~EOS - - - - - EOS - system "#{bin}/svgcleaner", "in.svg", "out.svg" - end -end diff --git a/Formula/svgo.rb b/Formula/svgo.rb deleted file mode 100644 index 4c6b01a5e68f5..0000000000000 --- a/Formula/svgo.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/node" - -class Svgo < Formula - desc "Nodejs-based tool for optimizing SVG vector graphics files" - homepage "https://github.com/svg/svgo" - url "https://github.com/svg/svgo/archive/v1.1.1.tar.gz" - sha256 "9eaf72ce0b15e7643c2f3003c83358da41baa87c1dc81f9976c47e0fcde5cc5e" - - bottle do - cellar :any_skip_relocation - sha256 "551bf258d6507d2f0f59929340540648411fe3dc67053949067c197f54edd3e0" => :mojave - sha256 "08d0632b31fbbb8c18b924f3a1266c193ba41c142ab46fac04f01d63be0cbb75" => :high_sierra - sha256 "39c7140696f44623b74d8f81cf8ed4ee8779cea21eca70d35d87d0031b94ca7b" => :sierra - sha256 "bc141b8dbcd54137fe0bb83719fb2816d7a8e0d7cc7fbeeb5332fea861380c79" => :el_capitan - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - cp test_fixtures("test.svg"), testpath - system bin/"svgo", "test.svg", "-o", "test.min.svg" - assert_match /^ :mojave - sha256 "6aadadb0d4b41e792d67f833997d667844bcd41bed1d867f9f8e6207912dad04" => :high_sierra - sha256 "b73aadf29b0db1d2eee80d9659c1c51651911a18363a1104ff4995ee48520034" => :sierra - end - - depends_on "openssl" - depends_on "python" - depends_on "rtmpdump" - - resource "pycryptodome" do - url "https://files.pythonhosted.org/packages/46/57/3901d4d3c03c3a7cefc570c01dfca3ec5eb086fc6e918b4aa451cb63fcdf/pycryptodome-3.7.0.tar.gz" - sha256 "4444a26fc3830c0d438bca6975ff10d1eb9c0b88f747fdc25b5ab81fb46713d7" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz" - sha256 "6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "PySocks" do - url "https://files.pythonhosted.org/packages/53/12/6bf1d764f128636cef7408e8156b7235b150ea31650d0260969215bb8e7d/PySocks-1.6.8.tar.gz" - sha256 "3fe52c55890a248676fd69dc9e3c4e811718b777834bcaab7a8125cf9deac672" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/97/10/92d25b93e9c266c94b76a5548f020f3f1dd0eb40649cb1993532c0af8f4c/requests-2.20.0.tar.gz" - sha256 "99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "pyyaml" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - def install - virtualenv_install_with_resources - end - - def caveats; <<~EOS - To use post-processing options: - `brew install ffmpeg` or `brew install libav`. - EOS - end - - test do - url = "https://tv.aftonbladet.se/abtv/articles/244248" - match = <<~EOS - https://absvpvod-vh.akamaihd.net/i/2018/02/cdaefe0533c2561f00a41c52a2d790bd - /,1280_720_2800,960_540_1500,640_360_800,480_270_300,.mp4.csmil - /index_0_av.m3u8 - EOS - assert_match match.delete!("\n"), shell_output("#{bin}/svtplay-dl -g #{url}") - end -end diff --git a/Formula/swagger-codegen.rb b/Formula/swagger-codegen.rb deleted file mode 100644 index 140dfe3fd137b..0000000000000 --- a/Formula/swagger-codegen.rb +++ /dev/null @@ -1,45 +0,0 @@ -class SwaggerCodegen < Formula - desc "Generate clients, server stubs, and docs from an OpenAPI spec" - homepage "https://swagger.io/swagger-codegen/" - url "https://github.com/swagger-api/swagger-codegen/archive/v3.0.3.tar.gz" - sha256 "6b6e3e892ac32e329eab0f95d824257b628f7dcf6b7d31097c6099593234309f" - head "https://github.com/swagger-api/swagger-codegen.git" - - bottle do - cellar :any_skip_relocation - sha256 "60825fac6d6996854f48c315f613dc9c3ff445f12a04019831d19e37d3dda79b" => :mojave - sha256 "fd34374939e14763e276b9360a3e299501ba889007780048454a08cfb86a00f1" => :high_sierra - sha256 "b53225cc14072d989e87075c3fc4f0db908444971b26edd16e6b6a30af8f96c0" => :sierra - end - - depends_on "maven" => :build - depends_on :java => "1.8" - - def install - # Need to set JAVA_HOME manually since maven overrides 1.8 with 1.7+ - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp - - system "mvn", "clean", "package" - libexec.install "modules/swagger-codegen-cli/target/swagger-codegen-cli.jar" - bin.write_jar_script libexec/"swagger-codegen-cli.jar", "swagger-codegen" - end - - test do - (testpath/"minimal.yaml").write <<~EOS - --- - openapi: 3.0.0 - info: - version: 0.0.0 - title: Simple API - paths: - /: - get: - responses: - 200: - description: OK - EOS - system "#{bin}/swagger-codegen", "generate", "-i", "minimal.yaml", "-l", "html" - assert_includes File.read(testpath/"index.html"), "

    Simple API

    " - end -end diff --git a/Formula/swagger-codegen@2.rb b/Formula/swagger-codegen@2.rb deleted file mode 100644 index a1cdbfc99bed4..0000000000000 --- a/Formula/swagger-codegen@2.rb +++ /dev/null @@ -1,46 +0,0 @@ -class SwaggerCodegenAT2 < Formula - desc "Generate clients, server stubs, and docs from an OpenAPI spec" - homepage "https://swagger.io/swagger-codegen/" - url "https://github.com/swagger-api/swagger-codegen/archive/v2.4.0.tar.gz" - sha256 "76940646d8cb9e65876a6c0829361ff99ded97126b97d9e954eca03682b287aa" - - bottle do - cellar :any_skip_relocation - sha256 "3a5955496aed7849141c5bf10e9fc5a2e9964b6f3f299d10ac0156a76d5e7a39" => :mojave - sha256 "76ad53fa55c9f441dfebfaa3179fcb5e1a0e6cc5c2bd45ad1a9fce46abccae85" => :high_sierra - sha256 "e832af1f7e633801a232b345c15bd5f5426429c8d5d3438591548c33b7659af3" => :sierra - end - - keg_only :versioned_formula - - depends_on "maven" => :build - depends_on :java => "1.8" - - def install - # Need to set JAVA_HOME manually since maven overrides 1.8 with 1.7+ - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp - - system "mvn", "clean", "package" - libexec.install "modules/swagger-codegen-cli/target/swagger-codegen-cli.jar" - bin.write_jar_script libexec/"swagger-codegen-cli.jar", "swagger-codegen" - end - - test do - (testpath/"minimal.yaml").write <<~EOS - --- - swagger: '2.0' - info: - version: 0.0.0 - title: Simple API - paths: - /: - get: - responses: - 200: - description: OK - EOS - system "#{bin}/swagger-codegen", "generate", "-i", "minimal.yaml", "-l", "html2" - assert_includes File.read(testpath/"index.html"), "

    Simple API

    " - end -end diff --git a/Formula/swaks.rb b/Formula/swaks.rb deleted file mode 100644 index 88f40dac1219a..0000000000000 --- a/Formula/swaks.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Swaks < Formula - desc "SMTP command-line test tool" - homepage "https://www.jetmore.org/john/code/swaks/" - url "https://www.jetmore.org/john/code/swaks/files/swaks-20170101.0.tar.gz" - sha256 "84e62dd0de4a56d5daebe25afd16835bd8d3c7f39caa5e6bc7d86a056925915e" - - bottle :unneeded - - def install - bin.install "swaks" - end - - test do - system "#{bin}/swaks", "--version" - end -end diff --git a/Formula/swfmill.rb b/Formula/swfmill.rb deleted file mode 100644 index 019b5cf606e7d..0000000000000 --- a/Formula/swfmill.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Swfmill < Formula - desc "xml2swf and swf2xml processor" - homepage "https://swfmill.org" - url "https://www.swfmill.org/releases/swfmill-0.3.6.tar.gz" - sha256 "db24f63963957faec02bb14b8b61cdaf7096774f8cfdeb9d3573e2e19231548e" - - bottle do - cellar :any - sha256 "4eb93babe47a07ccb946b87a7e5515eef651b376c590231920a5acdcc6023aea" => :mojave - sha256 "2516e0ca300458f626e1311673643e1cad03131fb77717fb4f6d10e5f7c6e522" => :high_sierra - sha256 "f8f7530eb3697993d145bd67fcb44122319f3dadbd5a15535ae23ce33c1991fc" => :sierra - sha256 "10165ef551225423c4d0b98b734aa112854bb836b6dcca675a0d2dd2adcee75a" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "libpng" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/swftools.rb b/Formula/swftools.rb deleted file mode 100644 index f181a91a47e62..0000000000000 --- a/Formula/swftools.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Swftools < Formula - desc "SWF manipulation and generation tools" - homepage "http://www.swftools.org/" - url "http://www.swftools.org/swftools-0.9.2.tar.gz" - sha256 "bf6891bfc6bf535a1a99a485478f7896ebacbe3bbf545ba551298080a26f01f1" - revision 1 - - bottle do - sha256 "2fa840ad38183d656158ae3055e776ed122df16b866e31125e3b9327a27198c4" => :mojave - sha256 "2db933a79589905a67f36a9ea96a692a684c676d70b5299b087ae892195ff007" => :high_sierra - sha256 "479570fcb99302996b55c361db1a6bb4a3abee611533b854fa350956f6b8cf61" => :sierra - sha256 "7343a6c406b0374b460f1d814e5542372f85df5d6ee500759648084713e33174" => :el_capitan - sha256 "f672348156459f385c6b08ed67c7055cd1cb9ee9dee8d868777596a57ac01a7f" => :yosemite - sha256 "7f18b7dae61164cd47eb34712884dea4de8df821d51ce955c6c33f36c165eaa1" => :mavericks - sha256 "900f2dd522f48c9ea72a3bf8dba53a8f0f35a4867dc68fab5dc85921a769c206" => :mountain_lion - end - - option "with-xpdf", "Build with PDF support" - - depends_on :x11 if build.with? "xpdf" - - resource "xpdf" do - url "https://src.fedoraproject.org/repo/pkgs/xpdf/xpdf-3.04.tar.gz/3bc86c69c8ff444db52461270bef3f44/xpdf-3.04.tar.gz", :using => :nounzip - sha256 "11390c74733abcb262aaca4db68710f13ffffd42bfe2a0861a5dfc912b2977e5" - end - - # Fixes a conftest for libfftwf.dylib that mistakenly calls fftw_malloc() - # rather than fftwf_malloc(). Reported upstream to their mailing list: - # https://lists.nongnu.org/archive/html/swftools-common/2012-04/msg00014.html - # Patch is merged upstream. Remove at swftools-0.9.3. - patch :DATA - - def install - (buildpath/"lib/pdf").install resource("xpdf") if build.with? "xpdf" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/png2swf", "swftools_test.swf", test_fixtures("test.png") - end -end - -__END__ ---- a/configure 2012-04-08 10:25:35.000000000 -0700 -+++ b/configure 2012-04-09 17:42:10.000000000 -0700 -@@ -6243,7 +6243,7 @@ - - int main() - { -- char*data = fftw_malloc(sizeof(fftwf_complex)*600*800); -+ char*data = fftwf_malloc(sizeof(fftwf_complex)*600*800); - fftwf_plan plan = fftwf_plan_dft_2d(600, 800, (fftwf_complex*)data, (fftwf_complex*)data, FFTW_FORWARD, FFTW_ESTIMATE); - plan = fftwf_plan_dft_r2c_2d(600, 800, (float*)data, (fftwf_complex*)data, FFTW_ESTIMATE); - plan = fftwf_plan_dft_c2r_2d(600, 800, (fftwf_complex*)data, (float*)data, FFTW_ESTIMATE); diff --git a/Formula/swi-prolog.rb b/Formula/swi-prolog.rb deleted file mode 100644 index 16e532b6f6964..0000000000000 --- a/Formula/swi-prolog.rb +++ /dev/null @@ -1,62 +0,0 @@ -class SwiProlog < Formula - desc "ISO/Edinburgh-style Prolog interpreter" - homepage "http://www.swi-prolog.org/" - url "http://www.swi-prolog.org/download/stable/src/swipl-7.6.4.tar.gz" - sha256 "2d3d7aabd6d99a02dcc2da5d7604e3500329e541c6f857edc5aa06a3b1267891" - revision 1 - - bottle do - sha256 "4ce8634e10c98507c9a56d69a3793194f1997918643e4d2c0b1a76c62a238e3d" => :mojave - sha256 "6e1bbd48b46ecedbeddff4b6a23138fe5b1784c8f8152772fbe945bfb27425f2" => :high_sierra - sha256 "503b3bf2fb95bd8914617732ac23970789b471e44211c240bab6a63d5a210513" => :sierra - end - - head do - url "https://github.com/SWI-Prolog/swipl-devel.git" - - depends_on "cmake" => :build - end - - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on "libarchive" - depends_on "openssl" - depends_on "readline" - - def install - if build.head? - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DSWIPL_PACKAGES_JAVA=OFF", - "-DSWIPL_PACKAGES_JAVA=OFF", - "-DSWIPL_PACKAGES_X=OFF", - "-DCMAKE_INSTALL_PREFIX=#{libexec}" - system "make", "install" - end - else - ENV["ARPREFIX"] = Formula["libarchive"].opt_prefix - ENV.append "DISABLE_PKGS", "jpl" - ENV.append "DISABLE_PKGS", "xpce" - - # SWI-Prolog's Makefiles don't add CPPFLAGS to the compile command, but do - # include CIFLAGS. Setting it here. Also, they clobber CFLAGS, so including - # the Homebrew-generated CFLAGS into COFLAGS here. - ENV["CIFLAGS"] = ENV.cppflags - ENV["COFLAGS"] = ENV.cflags - - system "./configure", "--prefix=#{libexec}", "--mandir=#{man}" - system "make" - system "make", "install" - end - - bin.write_exec_script Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.pl").write <<~EOS - test :- - write('Homebrew'). - EOS - assert_equal "Homebrew", shell_output("#{bin}/swipl -s #{testpath}/test.pl -g test -t halt") - end -end diff --git a/Formula/swift-protobuf.rb b/Formula/swift-protobuf.rb deleted file mode 100644 index ef049df38776f..0000000000000 --- a/Formula/swift-protobuf.rb +++ /dev/null @@ -1,43 +0,0 @@ -class SwiftProtobuf < Formula - desc "Plugin and runtime library for using protobuf with Swift" - homepage "https://github.com/apple/swift-protobuf" - url "https://github.com/apple/swift-protobuf/archive/1.2.0.tar.gz" - sha256 "5a5a38c8a18227a2771649fb23bb9d38438c466056e1d3d9595ae1ddf97b2d2c" - head "https://github.com/apple/swift-protobuf.git" - - bottle do - cellar :any_skip_relocation - sha256 "7fe5bcf016fc08e6fab3ac223f10dcf297befa413769f728f9148618048e1172" => :mojave - sha256 "7935c650dfa51c286fc979142ee028ebd9ccb9a568868b6c7347af93078ce3cc" => :high_sierra - sha256 "0d19496914a2ccf6010308d1c4b695ffcbc7e0e0aa547e559590902b25d6bce4" => :sierra - end - - depends_on :xcode => ["8.3", :build] - depends_on "protobuf" - - conflicts_with "protobuf-swift", - :because => "both install `protoc-gen-swift` binaries" - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", - "-static-stdlib" - bin.install ".build/release/protoc-gen-swift" - doc.install "Documentation/PLUGIN.md" - end - - test do - (testpath/"test.proto").write <<~EOS - syntax = "proto3"; - enum Flavor { - CHOCOLATE = 0; - VANILLA = 1; - } - message IceCreamCone { - int32 scoops = 1; - Flavor flavor = 2; - } - EOS - system Formula["protobuf"].opt_bin/"protoc", "test.proto", "--swift_out=." - assert_predicate testpath/"test.pb.swift", :exist? - end -end diff --git a/Formula/swift.rb b/Formula/swift.rb deleted file mode 100644 index a6c2f4aa7cb14..0000000000000 --- a/Formula/swift.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Swift < Formula - desc "High-performance system programming language" - homepage "https://github.com/apple/swift" - url "https://github.com/apple/swift/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "1e26cf541f7b10b96344fb1c4500ec52ced525cdf7b6bb77425c768cef0b2c5b" - - bottle do - cellar :any - rebuild 1 - sha256 "eb739a681ff2f5b585422d3b9408dd817724eb7bc0484a31f38db6f7dc387867" => :mojave - sha256 "1a82548cd25a4b6a525b7d8a194393e9853843e952c00c2650792141c17a528d" => :high_sierra - end - - keg_only :provided_by_macos, "Apple's CLT package contains Swift" - - depends_on "cmake" => :build - depends_on "ninja" => :build - - # Depends on latest version of Xcode - # https://github.com/apple/swift#system-requirements - depends_on :xcode => ["10.0", :build] - - # This formula is expected to have broken/missing linkage to - # both UIKit.framework and AssetsLibrary.framework. This is - # simply due to the nature of Swift's SDK Overlays. - resource "clang" do - url "https://github.com/apple/swift-clang/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "cbf22fe2da2e2a19010f6e109ab3f80a8af811d9416c29d031362c02a0e69a66" - end - - resource "cmark" do - url "https://github.com/apple/swift-cmark/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "0e9f097c26703693a5543667716c2cac7a8847806e850db740ae9f90eaf93793" - end - - resource "compiler-rt" do - url "https://github.com/apple/swift-compiler-rt/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "6b14737d2d57f3287a5c2d80d8d8ae917d8f7bbe4d78cc6d66a80e68d55cd00f" - end - - resource "llbuild" do - url "https://github.com/apple/swift-llbuild/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "07a02b4314050a66fad460b76379988d794dac1452a56fcf5073d318458fed6e" - end - - resource "llvm" do - url "https://github.com/apple/swift-llvm/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "bcd85a91824dd166fe852ddb7e58c509f52316011c3079010ad59b017a61ad14" - end - - resource "swiftpm" do - url "https://github.com/apple/swift-package-manager/archive/swift-4.2.1-RELEASE.tar.gz" - sha256 "e1a50dc3d264bdb8d0447c264e8c164403e84b0831ffd53d87f15a742bda7fa9" - end - - def install - workspace = buildpath.parent - build = workspace/"build" - - toolchain_prefix = "/Swift-#{version}.xctoolchain" - install_prefix = "#{toolchain_prefix}/usr" - - ln_sf buildpath, "#{workspace}/swift" - resources.each { |r| r.stage("#{workspace}/#{r.name}") } - - mkdir build do - # List of components to build - components = %w[ - compiler clang-resource-dir-symlink - clang-builtin-headers-in-clang-resource-dir stdlib sdk-overlay tools - editor-integration testsuite-tools toolchain-dev-tools license - sourcekit-xpc-service swift-remote-mirror - swift-remote-mirror-headers - ] - - system "#{workspace}/swift/utils/build-script", - "--release", "--assertions", - "--no-swift-stdlib-assertions", - "--build-subdir=#{build}", - "--llbuild", "--swiftpm", - "--", - "--workspace=#{workspace}", - "--build-args=-j#{ENV.make_jobs}", - "--install-destdir=#{prefix}", - "--toolchain-prefix=#{toolchain_prefix}", - "--install-prefix=#{install_prefix}", - "--host-target=macosx-x86_64", - "--stdlib-deployment-targets=macosx-x86_64", - "--build-swift-static-stdlib", - "--build-swift-dynamic-stdlib", - "--build-swift-static-sdk-overlay", - "--build-swift-dynamic-sdk-overlay", - "--build-swift-stdlib-unittest-extra", - "--install-swift", - "--swift-install-components=#{components.join(";")}", - "--llvm-install-components=clang;libclang;libclang-headers", - "--install-llbuild", - "--install-swiftpm" - end - end - - test do - (testpath/"test.swift").write <<~EOS - let base = 2 - let exponent_inner = 3 - let exponent_outer = 4 - var answer = 1 - - for _ in 1...exponent_outer { - for _ in 1...exponent_inner { - answer *= base - } - } - - print("(\\(base)^\\(exponent_inner))^\\(exponent_outer) == \\(answer)") - EOS - output = shell_output("#{prefix}/Swift-#{version}.xctoolchain/usr/bin/swift test.swift") - assert_match "(2^3)^4 == 4096\n", output - end -end diff --git a/Formula/swiftformat.rb b/Formula/swiftformat.rb deleted file mode 100644 index a74983bf3286f..0000000000000 --- a/Formula/swiftformat.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Swiftformat < Formula - desc "Formatting tool for reformatting Swift code" - homepage "https://github.com/nicklockwood/SwiftFormat" - url "https://github.com/nicklockwood/SwiftFormat/archive/0.37.2.tar.gz" - sha256 "5cf216ff0b89a3d84d0b0df8dad4ce35302ad2a58e2d9e0188bffb60ca8ab6fe" - head "https://github.com/nicklockwood/SwiftFormat.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "f93cf5e329a71a97a862e6061b150f203832985f59e7c67441ed48abd7fb6bba" => :mojave - sha256 "8205e10b9c344c3dd975016041879152acbe8784ab9f9fc9c35eaaad3fa3632c" => :high_sierra - sha256 "3414d24fc85a7892d53487886b7eb513dc7e94c3ddb764b12c655b2f0dcf717e" => :sierra - end - - depends_on :xcode => ["9.2", :build] - - def install - xcodebuild "-project", - "SwiftFormat.xcodeproj", - "-scheme", "SwiftFormat (Command Line Tool)", - "CODE_SIGN_IDENTITY=", - "SYMROOT=build", "OBJROOT=build" - bin.install "build/Release/swiftformat" - end - - test do - (testpath/"potato.swift").write <<~EOS - struct Potato { - let baked: Bool - } - EOS - system "#{bin}/swiftformat", "#{testpath}/potato.swift" - end -end diff --git a/Formula/swiftgen.rb b/Formula/swiftgen.rb deleted file mode 100644 index 51208a14d6c6a..0000000000000 --- a/Formula/swiftgen.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Swiftgen < Formula - desc "Swift code generator for assets, storyboards, Localizable.strings, …" - homepage "https://github.com/SwiftGen/SwiftGen" - url "https://github.com/SwiftGen/SwiftGen.git", - :tag => "6.0.2", - :revision => "b34e66fbeb75f9f625f31cb8a096866dba1ad321" - head "https://github.com/SwiftGen/SwiftGen.git" - - bottle do - cellar :any - sha256 "ca29c729d9c05e52e26fee13cad5cd544f3b68c4381e57875c7cdcae7327d298" => :mojave - sha256 "beac92d79d985ea1d9adbdcdc992f4e2d3fa95175415ea5146895fa58bf2a27b" => :high_sierra - end - - depends_on "ruby" => :build if MacOS.version <= :sierra - depends_on :xcode => ["10.0", :build] - - def install - # Disable swiftlint build phase to avoid build errors if versions mismatch - ENV["NO_CODE_LINT"] = "1" - - # Install bundler, then use it to `rake cli:install` SwiftGen - ENV["GEM_HOME"] = buildpath/"gem_home" - system "gem", "install", "bundler" - ENV.prepend_path "PATH", buildpath/"gem_home/bin" - system "bundle", "install", "--without", "development", "release" - system "bundle", "exec", "rake", "cli:install[#{bin},#{lib},#{pkgshare}/templates]" - - fixtures = { - "Tests/Fixtures/Resources/Colors/colors.xml" => "colors.xml", - "Tests/Fixtures/Resources/Fonts" => "Fonts", - "Tests/Fixtures/Resources/IB-iOS" => "IB-iOS", - "Tests/Fixtures/Resources/Plist/good" => "Plist", - "Tests/Fixtures/Resources/Strings/Localizable.strings" => "Localizable.strings", - "Tests/Fixtures/Resources/XCAssets" => "XCAssets", - "Tests/Fixtures/Resources/YAML/good" => "YAML", - "Tests/Fixtures/Generated/Colors/swift4-context-defaults.swift" => "colors.swift", - "Tests/Fixtures/Generated/Fonts/swift4-context-defaults.swift" => "fonts.swift", - "Tests/Fixtures/Generated/IB-iOS/scenes-swift4-context-all.swift" => "ib-scenes.swift", - "Tests/Fixtures/Generated/Plist/runtime-swift4-context-all.swift" => "plists.swift", - "Tests/Fixtures/Generated/Strings/structured-swift4-context-localizable.swift" => "strings.swift", - "Tests/Fixtures/Generated/XCAssets/swift4-context-all.swift" => "xcassets.swift", - "Tests/Fixtures/Generated/YAML/inline-swift4-context-all.swift" => "yaml.swift", - } - (pkgshare/"fixtures").install fixtures - end - - test do - system bin/"swiftgen", "--version" - - fixtures = pkgshare/"fixtures" - - output = shell_output("#{bin}/swiftgen colors --templatePath #{pkgshare/"templates/colors/swift4.stencil"} #{fixtures}/colors.xml").strip - assert_equal output, (fixtures/"colors.swift").read.strip, "swiftgen colors failed" - - output = shell_output("#{bin}/swiftgen fonts --templatePath #{pkgshare/"templates/fonts/swift4.stencil"} #{fixtures}/Fonts").strip - assert_equal output, (fixtures/"fonts.swift").read.strip, "swiftgen fonts failed" - - output = shell_output("#{bin}/swiftgen ib --templatePath #{pkgshare/"templates/ib/scenes-swift4.stencil"} --param module=SwiftGen #{fixtures}/IB-iOS").strip - assert_equal output, (fixtures/"ib-scenes.swift").read.strip, "swiftgen ib failed" - - output = shell_output("#{bin}/swiftgen plist --templatePath #{pkgshare/"templates/plist/runtime-swift4.stencil"} #{fixtures}/Plist").strip - assert_equal output, (fixtures/"plists.swift").read.strip, "swiftgen plist failed" - - output = shell_output("#{bin}/swiftgen strings --templatePath #{pkgshare/"templates/strings/structured-swift4.stencil"} #{fixtures}/Localizable.strings").strip - assert_equal output, (fixtures/"strings.swift").read.strip, "swiftgen strings failed" - - output = shell_output("#{bin}/swiftgen xcassets --templatePath #{pkgshare/"templates/xcassets/swift4.stencil"} #{fixtures}/XCAssets/*.xcassets").strip - assert_equal output, (fixtures/"xcassets.swift").read.strip, "swiftgen xcassets failed" - - output = shell_output("#{bin}/swiftgen yaml --templatePath #{pkgshare/"templates/yaml/inline-swift4.stencil"} #{fixtures}/YAML").strip - assert_equal output, (fixtures/"yaml.swift").read.strip, "swiftgen yaml failed" - end -end diff --git a/Formula/swiftlint.rb b/Formula/swiftlint.rb deleted file mode 100644 index 2d683fad1aa22..0000000000000 --- a/Formula/swiftlint.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Swiftlint < Formula - desc "Tool to enforce Swift style and conventions" - homepage "https://github.com/realm/SwiftLint" - url "https://github.com/realm/SwiftLint.git", - :tag => "0.29.3", - :revision => "bd0f78a501c17bfcceddb2c7cc3db4c72ee0cd01" - head "https://github.com/realm/SwiftLint.git" - - bottle do - cellar :any_skip_relocation - sha256 "b8dabb2f4407e3692fc63d288a7002d9abea5234c4427a32b47ba821ef60f28b" => :mojave - sha256 "dd5634f0c26d29a7ee9be372f6f1a9ea2dbf5a3fc86a1f7ed51bbd5086fc4d24" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - depends_on :xcode => "8.0" - - def install - system "make", "prefix_install", "PREFIX=#{prefix}", "TEMPORARY_FOLDER=#{buildpath}/SwiftLint.dst" - end - - test do - (testpath/"Test.swift").write "import Foundation" - assert_match "Test.swift:1:1: warning: Trailing Newline Violation: Files should have a single trailing newline. (trailing_newline)", - shell_output("SWIFTLINT_SWIFT_VERSION=3 SWIFTLINT_DISABLE_SOURCEKIT=1 #{bin}/swiftlint lint --no-cache").chomp - assert_match version.to_s, - shell_output("#{bin}/swiftlint version").chomp - end -end diff --git a/Formula/swiftplate.rb b/Formula/swiftplate.rb deleted file mode 100644 index d326363a52786..0000000000000 --- a/Formula/swiftplate.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Swiftplate < Formula - desc "Cross-platform Swift framework templates from the command-line" - homepage "https://github.com/JohnSundell/SwiftPlate" - url "https://github.com/JohnSundell/SwiftPlate/archive/1.4.0.tar.gz" - sha256 "13c6e9d2204c24ed95ad26f3e8266b8c62e709db626acf5e511ced23de9b9143" - head "https://github.com/JohnSundell/SwiftPlate.git" - - bottle do - cellar :any_skip_relocation - sha256 "5f86cbe754c458ee6529ff8f82ecd6e211977e52c96e6d4918c104d9a0bdef72" => :mojave - sha256 "ac5b3589174f354537f3a13d3cac8ca09323c3302e67e7442cadbff6a09ae101" => :high_sierra - sha256 "977e9d6b8e3579566cd5392ba17e34896d0f2c9445ae2061c5eae508ede04dee" => :sierra - sha256 "73c1b35ad98f1d4872bc467b1a027dad41815e336c0c86aebb0d09d9562ddde5" => :el_capitan - end - - depends_on :xcode => "8.2" - - def install - xcodebuild "-project", - "SwiftPlate.xcodeproj", - "-scheme", "SwiftPlate", - "-configuration", "Release", - "CONFIGURATION_BUILD_DIR=build", - "SYMROOT=." - bin.install "build/swiftplate" - end - - test do - system "#{bin}/swiftplate", "--destination", ".", - "--project", "test", "--name", "testUser", - "--email", "test@example.com", "--url", "https://github.com/johnsundell/swiftplate", - "--organization", "exampleOrg", "--force" - assert_predicate testpath/"test.xcodeproj", :exist?, "Failed to generate test.xcodeproj" - end -end diff --git a/Formula/swig.rb b/Formula/swig.rb deleted file mode 100644 index 5820ab380d7f9..0000000000000 --- a/Formula/swig.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Swig < Formula - desc "Generate scripting interfaces to C/C++ code" - homepage "http://www.swig.org/" - url "https://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz" - sha256 "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d" - - bottle do - sha256 "7307b4ffe3222715b2206e6477c5e3022881a730eb95a717d41a3df8e6e20455" => :mojave - sha256 "c0e2656fd10d57281280d20ce8bf9a060cf8714f4283dd1dfde383b3688d9ed1" => :high_sierra - sha256 "68cb1b6bc898f2a1bd39ae24dd0235f68ffa56d04ba8cd4424835335202977d1" => :sierra - sha256 "37bf242aad0c18317cdaef66218483c04fa57e091b7c7f9d72089f5002881338" => :el_capitan - sha256 "3443dbf17f78be0cecb5419772c71bb418caa91763590072224c196a57317717" => :yosemite - end - - head do - url "https://github.com/swig/swig.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pcre" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - int add(int x, int y) - { - return x + y; - } - EOS - (testpath/"test.i").write <<~EOS - %module test - %inline %{ - extern int add(int x, int y); - %} - EOS - (testpath/"run.rb").write <<~EOS - require "./test" - puts Test.add(1, 1) - EOS - system "#{bin}/swig", "-ruby", "test.i" - system ENV.cc, "-c", "test.c" - system ENV.cc, "-c", "test_wrap.c", "-I/System/Library/Frameworks/Ruby.framework/Headers/" - system ENV.cc, "-bundle", "-undefined", "dynamic_lookup", "test.o", "test_wrap.o", "-o", "test.bundle" - assert_equal "2", shell_output("/usr/bin/ruby run.rb").strip - end -end diff --git a/Formula/swig@3.04.rb b/Formula/swig@3.04.rb deleted file mode 100644 index 6676d61ae2d12..0000000000000 --- a/Formula/swig@3.04.rb +++ /dev/null @@ -1,49 +0,0 @@ -class SwigAT304 < Formula - desc "Generate scripting interfaces to C/C++ code" - homepage "http://www.swig.org/" - url "https://downloads.sourceforge.net/project/swig/swig/swig-3.0.4/swig-3.0.4.tar.gz" - sha256 "410ffa80ef5535244b500933d70c1b65206333b546ca5a6c89373afb65413795" - - bottle do - sha256 "264a8dc6653c2fc3ae88f1b0a8d60aef2b54db681b4fce4ce783b4f73f6daa84" => :mojave - sha256 "fa6edd5df156b7a985bfe6f74f56cf15682af6b01d11f0ed342f2f05444234f0" => :high_sierra - sha256 "51b8115c0a2813caf115fb5f082e7aa1b84b7c51acec70822b8619e918969a14" => :sierra - sha256 "84988480f25dea3fce15b6ca0e9a3322222cc473066f23626d59b20001574fdf" => :el_capitan - sha256 "f5e5251fa5d8f6ce3a7e63c9f3762ccd3bbc49f4664d1d781b71425992c2425b" => :yosemite - end - - keg_only :versioned_formula - - depends_on "pcre" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - int add(int x, int y) - { - return x + y; - } - EOS - (testpath/"test.i").write <<~EOS - %module test - %inline %{ - extern int add(int x, int y); - %} - EOS - (testpath/"run.rb").write <<~EOS - require "./test" - puts Test.add(1, 1) - EOS - system "#{bin}/swig", "-ruby", "test.i" - system ENV.cc, "-c", "test.c" - system ENV.cc, "-c", "test_wrap.c", "-I/System/Library/Frameworks/Ruby.framework/Headers/" - system ENV.cc, "-bundle", "-flat_namespace", "-undefined", "suppress", "test.o", "test_wrap.o", "-o", "test.bundle" - assert_equal "2", shell_output("/usr/bin/ruby run.rb").strip - end -end diff --git a/Formula/swimat.rb b/Formula/swimat.rb deleted file mode 100644 index fe5178e5f2f65..0000000000000 --- a/Formula/swimat.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Swimat < Formula - desc "Command-line tool to help format Swift code" - homepage "https://github.com/Jintin/Swimat" - url "https://github.com/Jintin/Swimat/archive/v1.6.tar.gz" - sha256 "44ff6d7642b36ec8e784c1ce1801ad8e9915cda65728e6684f4ca272aee8acbf" - head "https://github.com/Jintin/Swimat.git" - - bottle do - cellar :any_skip_relocation - sha256 "12ffe4eee9c6d9abe8e84abf777f74ed7ab276206ad9f06dca801f4cdbcbca52" => :mojave - sha256 "fc96c111dfbe508667feb7611c9c7d313fa8409c84d5a98d6bcfd99ef67e76d1" => :high_sierra - sha256 "7a14a1bb3c7d1b7421b2bef0d24bf23c98375fa2dfbfd866c7bdc9517162bdbb" => :sierra - end - - depends_on :xcode => "9.0" - - def install - xcodebuild "-target", "CLI", - "-configuration", "Release", - "CODE_SIGN_IDENTITY=", - "SYMROOT=build" - bin.install "build/Release/swimat" - end - - test do - system "#{bin}/swimat", "-h" - (testpath/"SwimatTest.swift").write("struct SwimatTest {}") - system "#{bin}/swimat", "#{testpath}/SwimatTest.swift" - end -end diff --git a/Formula/switch-lan-play.rb b/Formula/switch-lan-play.rb deleted file mode 100644 index 8a1abfc16f632..0000000000000 --- a/Formula/switch-lan-play.rb +++ /dev/null @@ -1,26 +0,0 @@ -class SwitchLanPlay < Formula - desc "Make you and your friends play games like in a LAN" - homepage "https://github.com/spacemeowx2/switch-lan-play" - url "https://github.com/spacemeowx2/switch-lan-play/archive/v0.0.7.tar.gz" - sha256 "0b645fa8bbff18b4b2d1dfd8d975790c6597bc0520c0ab1368387d08f8c2c900" - - bottle do - cellar :any - sha256 "378a55da07264e83e58925d3205a0cdb0916e2afd4e8b4c387dd46de3748a897" => :mojave - sha256 "c4a6f2655ec51819c5ea197c3d30899e4c0208dd836e09c912e012dd275f8d2e" => :high_sierra - sha256 "3f20bf2ec6ce400d56b4bcffe1c7a362ea50cb7ef9c2a55bffd04864254d071f" => :sierra - end - - depends_on "cmake" => :build - depends_on "libuv" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/lan-play --version") - assert_match "1.", shell_output("#{bin}/lan-play --list-if") - end -end diff --git a/Formula/switchaudio-osx.rb b/Formula/switchaudio-osx.rb deleted file mode 100644 index 35b2523086466..0000000000000 --- a/Formula/switchaudio-osx.rb +++ /dev/null @@ -1,37 +0,0 @@ -class SwitchaudioOsx < Formula - desc "Change macOS audio source from the command-line" - homepage "https://github.com/deweller/switchaudio-osx/" - url "https://github.com/deweller/switchaudio-osx/archive/1.0.0.tar.gz" - sha256 "c00389837ffd02b1bb672624fec7b75434e2d72d55574afd7183758b419ed6a3" - head "https://github.com/deweller/switchaudio-osx.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "85d0fe91c72d1a61e331e475af4e6ded9d0ca3581612c1934835bc44653fe407" => :mojave - sha256 "26af506ea42b83ae8ccde71ed8b7666ccf3e3a349b2dd8958af7025854ffefd3" => :high_sierra - sha256 "89ed040cc50c7b7ad88a903da5351cfa0027a4daf22cf73f2713e0887847c5d1" => :sierra - sha256 "515b762164648d739ae36f8c5013d250d84af1264bf3ee366ed35adae2f44208" => :el_capitan - end - - depends_on :xcode => :build - depends_on :macos => :lion - - def install - xcodebuild "-project", "AudioSwitcher.xcodeproj", - "-target", "SwitchAudioSource", - "SYMROOT=build", - "-verbose", - # Force 64-bit for Mojave - "-arch", "x86_64", - # Default target is 10.5, which fails on Mojave - "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - prefix.install Dir["build/Release/*"] - bin.write_exec_script "#{prefix}/SwitchAudioSource" - chmod 0755, "#{bin}/SwitchAudioSource" - end - - test do - system "#{bin}/SwitchAudioSource", "-c" - end -end diff --git a/Formula/sword.rb b/Formula/sword.rb deleted file mode 100644 index 390ea8580c311..0000000000000 --- a/Formula/sword.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Sword < Formula - desc "Cross-platform tools to write Bible software" - homepage "https://www.crosswire.org/sword/index.jsp" - url "https://www.crosswire.org/ftpmirror/pub/sword/source/v1.8/sword-1.8.1.tar.gz" - sha256 "ce9aa8f721a737f406115d35ff438bd07c829fce1605f0d6dcdabc4318bc5e93" - - bottle do - sha256 "ab228fd2df3f45e696e50224872a2fd80d24fcebc92f2b6ba5ff6e36d8534bc6" => :mojave - sha256 "3279c77477c21d1636f573202df976bd37fbaca39ed7e3b310158dad4e961641" => :high_sierra - sha256 "794afe687eb7933fd3aeaee7e480224295614fc0138b8d89b7d9b81be55239a1" => :sierra - sha256 "032c83b3302b78c198d1e346258a1d09c542a1361e1b0f000f82306d8c82acb4" => :el_capitan - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-profile - --disable-tests - --with-curl - --without-icu - --without-clucene - ] - - system "./configure", *args - system "make", "install" - end - - test do - # This will call sword's module manager to list remote sources. - # It should just demonstrate that the lib was correctly installed - # and can be used by frontends like installmgr. - system "#{bin}/installmgr", "-s" - end -end diff --git a/Formula/sxiv.rb b/Formula/sxiv.rb deleted file mode 100644 index 059e84ab6bedf..0000000000000 --- a/Formula/sxiv.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Sxiv < Formula - desc "Simple X Image Viewer" - homepage "https://github.com/muennich/sxiv" - url "https://github.com/muennich/sxiv/archive/v1.3.2.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/s/sxiv/sxiv_1.3.2.orig.tar.gz" - sha256 "9f5368de8f0f57e78ebe02cb531a31107a993f2769cec51bcc8d70f5c668b653" - revision 1 - head "https://github.com/muennich/sxiv.git" - - bottle do - cellar :any - sha256 "ba5bc2b563d91d1415f0f841606b9cfb954de246eb15062b5c1bd976e8073886" => :mojave - sha256 "61d85801587ee6d3158407ae65cd0bece03a08b2e8f99d9e7568b7ddb3b2daee" => :high_sierra - sha256 "606057791d4785165f78ae964bfa990b005d5f0cc3e51f19f64438c29b2670f5" => :sierra - sha256 "16a9ac152429a736db62dc0a2ac34f1b4d70c11b3de10f856bece78acf20a9a1" => :el_capitan - sha256 "de711fb6eb1c6ac0093ad182dd820c9debdb5d08ce03430de6462fbf9568c5e3" => :yosemite - end - - depends_on "giflib" - depends_on "imlib2" - depends_on "libexif" - depends_on :x11 - - def install - system "make", "config.h" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "#{bin}/sxiv", "-v" - end -end diff --git a/Formula/syck.rb b/Formula/syck.rb deleted file mode 100644 index 5520af52d2adc..0000000000000 --- a/Formula/syck.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Syck < Formula - desc "Extension for reading and writing YAML" - homepage "https://wiki.github.com/indeyets/syck/" - url "https://github.s3.amazonaws.com/downloads/indeyets/syck/syck-0.70.tar.gz" - sha256 "4c94c472ee8314e0d76eb2cca84f6029dc8fc58bfbc47748d50dcb289fda094e" - - bottle do - cellar :any_skip_relocation - sha256 "4baab04685bbb2fb536170a1bd069cfdec7fb5b2bc802ce6a80a4be933d8530a" => :mojave - sha256 "a5a983847ae0e83a5f1d83adac736c602f7cce9ae00b9700d81ed766b4fe54bb" => :high_sierra - sha256 "5a5f8c0f9a9def7ab59a052d85fbb128bc9a1c9c9b7ea2f9639109147eeba252" => :sierra - sha256 "a2270f693ce6e8f0542f7d57dc6c8fcb731a268aee3c75a314523446c68602d6" => :el_capitan - sha256 "cacc98eb6fab2440d3f69708688cb80b54bd14e5c472b7097ab9e235d5a670d6" => :yosemite - sha256 "17606e97952cbea53c5649814d0d86c0cc2cdc5893b8063dcb4be8b4606c4f40" => :mavericks - end - - def install - ENV.deparallelize # Not parallel safe. - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/sylpheed.rb b/Formula/sylpheed.rb deleted file mode 100644 index 8230be18f7608..0000000000000 --- a/Formula/sylpheed.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sylpheed < Formula - desc "Simple, lightweight email-client" - homepage "https://sylpheed.sraoss.jp/en/" - url "https://sylpheed.sraoss.jp/sylpheed/v3.7/sylpheed-3.7.0.tar.bz2" - sha256 "eb23e6bda2c02095dfb0130668cf7c75d1f256904e3a7337815b4da5cb72eb04" - revision 1 - - bottle do - sha256 "7b90f17a71f0bd70435538753b63f18583f4d0ea9a5650a6bb4be5b394088044" => :mojave - sha256 "382c0840297de273c0fb68ecee4462ca4e91cdd6cd7a56b0164a7456d485ff97" => :high_sierra - sha256 "99c858ab66bba990574fed5a1b4ba6dcc485c75b15983c12e49039f4c624a138" => :sierra - sha256 "05959f61b600d6d9f323b29a0085b275442c92499657f7a4750b88a9ec36a60e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gpgme" - depends_on "gtk+" - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-updatecheck" - system "make", "install" - end - - test do - system "#{bin}/sylpheed", "--version" - end -end diff --git a/Formula/sync_gateway.rb b/Formula/sync_gateway.rb deleted file mode 100644 index 11032c80cb718..0000000000000 --- a/Formula/sync_gateway.rb +++ /dev/null @@ -1,58 +0,0 @@ -class SyncGateway < Formula - desc "Make Couchbase Server a replication endpoint for Couchbase Lite" - homepage "https://docs.couchbase.com/sync-gateway" - url "https://github.com/couchbase/sync_gateway.git", - :tag => "2.1.0", - :revision => "a036bd817d35ff1c354c644804dc588fb7c41476" - head "https://github.com/couchbase/sync_gateway.git" - - bottle do - cellar :any_skip_relocation - sha256 "9960ef9eb77e0e98e136cbb90de2704c533f6238373a0acc0aaf11c9d66e7454" => :mojave - sha256 "e1500abaed4f0db1aae20b00766eb1634bcaea6a2c0c0c8ee9860f95799e89c1" => :high_sierra - sha256 "460dd8e306588c106283b108cddcc9097095e12ef6f53808515d7b0255a9b8fe" => :sierra - end - - depends_on "gnupg" => :build - depends_on "go" => :build - - resource "depot_tools" do - url "https://chromium.googlesource.com/chromium/tools/depot_tools.git", - :revision => "935b93fb9bf367510eece7db8ee3e383b101c36d" - end - - def install - # Cache the vendored Go dependencies gathered by depot_tools' `repo` command - repo_cache = HOMEBREW_CACHE/"repo_cache/#{name}/.repo" - repo_cache.mkpath - - (buildpath/"depot_tools").install resource("depot_tools") - ENV.prepend_path "PATH", buildpath/"depot_tools" - - (buildpath/"build").install_symlink repo_cache - cp Dir["*.sh"], "build" - - git_commit = `git rev-parse HEAD`.chomp - manifest = buildpath/"new-manifest.xml" - manifest.write Utils.popen_read "python", "rewrite-manifest.sh", - "--manifest-url", - "file://#{buildpath}/manifest/default.xml", - "--project-name", "sync_gateway", - "--set-revision", git_commit - cd "build" do - mkdir "godeps" - system "repo", "init", "-u", stable.url, "-m", "manifest/default.xml" - cp manifest, ".repo/manifest.xml" - system "repo", "sync" - system "sh", "build.sh", "-v" - mv "godeps/bin", prefix - end - end - - test do - pid = fork { exec "#{bin}/sync_gateway" } - sleep 1 - Process.kill("SIGINT", pid) - Process.wait(pid) - end -end diff --git a/Formula/syncthing-inotify.rb b/Formula/syncthing-inotify.rb deleted file mode 100644 index 5d9e73827aff6..0000000000000 --- a/Formula/syncthing-inotify.rb +++ /dev/null @@ -1,61 +0,0 @@ -class SyncthingInotify < Formula - desc "File watcher intended for use with Syncthing" - homepage "https://github.com/syncthing/syncthing-inotify" - url "https://github.com/syncthing/syncthing-inotify/archive/v0.8.7.tar.gz" - sha256 "bf7a71695206c765cf407d85656f6f0f8be1715af3d3bb7f81985f749162a6b2" - head "https://github.com/syncthing/syncthing-inotify.git" - - bottle do - sha256 "36c76a71e9270253c2182cd77058a9848bbc4cf7dcd5543ddf721104726a8192" => :mojave - sha256 "2185ac4821dc09e211297aebb86ed7bf44e7fd6fed461d092e294c0862ed81c1" => :high_sierra - sha256 "442dd6b530e40bd18668f482f2071afa64fcf333892ae3b8a47f435d74396baa" => :sierra - sha256 "651c2857b6b05a2122123e520153db5605f5b89b255b6fd99e785e9465e64691" => :el_capitan - sha256 "da3e6893fd0d8b2a17f6bb486c1e9d23d3066a36faac1e845d8d373e2a5b32b5" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOROOT"] = Formula["go"].opt_libexec - dir = buildpath/"src/github.com/syncthing/syncthing-inotify" - dir.install buildpath.children - cd dir do - system "go", "build", "-ldflags", "-w -X main.Version=#{version}" - bin.install name - prefix.install_metafiles - end - end - - plist_options :manual => "syncthing-inotify" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/syncthing-inotify - - RunAtLoad - - ProcessType - Background - StandardErrorPath - #{var}/log/syncthing-inotify.log - StandardOutPath - #{var}/log/syncthing-inotify.log - - - EOS - end - - test do - system bin/"syncthing-inotify", "-version" - end -end diff --git a/Formula/syncthing.rb b/Formula/syncthing.rb deleted file mode 100644 index 282621550cd87..0000000000000 --- a/Formula/syncthing.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Syncthing < Formula - desc "Open source continuous file synchronization application" - homepage "https://syncthing.net/" - url "https://github.com/syncthing/syncthing.git", - :tag => "v1.0.0", - :revision => "952ab7db1cdbf282af3c7ce2a07e359431099e25" - head "https://github.com/syncthing/syncthing.git" - - bottle do - cellar :any_skip_relocation - sha256 "2a34570abc74eb52bb4ef134742c2605eca7bf0be60a42e3862586f68d1217b9" => :mojave - sha256 "e015cd29dd87f1363b876d0ad0f8a03b35df8cb0588353d3098ea57407f1af7b" => :high_sierra - sha256 "81c09a0b42bce91f4c909c6a4440734a0666dc9f95b3704a047310ae7b799a5f" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/syncthing/syncthing").install buildpath.children - ENV.append_path "PATH", buildpath/"bin" - cd "src/github.com/syncthing/syncthing" do - system "./build.sh", "noupgrade" - bin.install "syncthing" - man1.install Dir["man/*.1"] - man5.install Dir["man/*.5"] - man7.install Dir["man/*.7"] - prefix.install_metafiles - end - end - - plist_options :manual => "syncthing" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/syncthing - -no-browser - -no-restart - - KeepAlive - - Crashed - - SuccessfulExit - - - ProcessType - Background - StandardErrorPath - #{var}/log/syncthing.log - StandardOutPath - #{var}/log/syncthing.log - - - EOS - end - - test do - system bin/"syncthing", "-generate", "./" - end -end diff --git a/Formula/synfig.rb b/Formula/synfig.rb deleted file mode 100644 index 10ac5acad71e9..0000000000000 --- a/Formula/synfig.rb +++ /dev/null @@ -1,125 +0,0 @@ -class Synfig < Formula - desc "Command-line renderer" - homepage "https://synfig.org/" - url "https://downloads.sourceforge.net/project/synfig/releases/1.0.2/source/synfig-1.0.2.tar.gz" - sha256 "34cdf9eac90aadea29fb2997e82da1c32713ab02940f7c8873330f894e167fb4" - revision 5 - head "http://svn.code.sf.net/p/synfig/code/" - - bottle do - sha256 "7051446f2836f7de2f71508639cd7e82de5b71013e55801124f6e5ecf426cca4" => :mojave - sha256 "2f05123f7d5b6cd2d2e0ae7ba1bb070e5bf5bd69f71a85553ea45858ea18b7ab" => :high_sierra - sha256 "ef83f8b014f601eeed4e7810d5edd5c41838ef0cf7df918674aa8975a670bcb7" => :sierra - sha256 "42f7ab274f30645bd06e707a9e7962cabf7ba8766728c781e066efa2cd1a53ac" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "cairo" - depends_on "etl" - depends_on "freetype" - depends_on "gettext" - depends_on "libpng" - depends_on "libsigc++" - depends_on "libtool" - depends_on "libxml++" - depends_on "mlt" - depends_on "openexr" - depends_on "pango" - - # bug filed upstream as https://synfig.org/issues/thebuggenie/synfig/issues/904 - patch do - url "https://gist.githubusercontent.com/tschoonj/06d5de3cdc5d063f8612/raw/26fe46b6eedeecdc686b9fd5aac01de9f2756424/synfig.diff" - sha256 "0ac5b757ba3dda6a863a79e717fc239648c490eac1e643ff275b8ac232a466a3" - end - - needs :cxx11 - - def install - ENV.cxx11 - boost = Formula["boost"] - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-boost=#{boost.opt_prefix}", - "--without-jpeg" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(int argc, char *argv[]) - { - const char *version = synfig::get_version(); - return 0; - } - EOS - ENV.libxml2 - cairo = Formula["cairo"] - etl = Formula["etl"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++"] - libxmlxx = Formula["libxml++"] - mlt = Formula["mlt"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{cairo.opt_include}/cairo - -I#{etl.opt_include} - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{glibmm.opt_include}/giomm-2.4 - -I#{glibmm.opt_include}/glibmm-2.4 - -I#{glibmm.opt_lib}/giomm-2.4/include - -I#{glibmm.opt_lib}/glibmm-2.4/include - -I#{include}/synfig-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{libxmlxx.opt_include}/libxml++-2.6 - -I#{libxmlxx.opt_lib}/libxml++-2.6/include - -I#{mlt.opt_include} - -I#{mlt.opt_include}/mlt - -I#{mlt.opt_include}/mlt++ - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{cairo.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{libxmlxx.opt_lib} - -L#{lib} - -L#{mlt.opt_lib} - -L#{pango.opt_lib} - -lcairo - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lintl - -lmlt - -lmlt++ - -lpango-1.0 - -lpangocairo-1.0 - -lpthread - -lsigc-2.0 - -lsynfig - -lxml++-2.6 - -lxml2 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/synscan.rb b/Formula/synscan.rb deleted file mode 100644 index 38d9faf4d5a3d..0000000000000 --- a/Formula/synscan.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Synscan < Formula - desc "Asynchronous half-open TCP portscanner" - homepage "http://www.digit-labs.org/files/tools/synscan/" - url "http://www.digit-labs.org/files/tools/synscan/releases/synscan-5.02.tar.gz" - sha256 "c4e6bbcc6a7a9f1ea66f6d3540e605a79e38080530886a50186eaa848c26591e" - - bottle do - cellar :any_skip_relocation - sha256 "3e798cc92043613a56d40f9d306081d23b05b878cbc9bc1ac532717a48fd802d" => :high_sierra - sha256 "98648d8ae9cce116cd800d7773ca84e44af92d37059bc62b02b548f3e5b8cbe8" => :sierra - sha256 "d9d3cfbe1016ff7d314cf9db8b7fa796e3d3a43e78b2552e84b224e53f73f541" => :el_capitan - sha256 "3298295fda8028da39ddbc6c3f2d26b42de9dd4f6e3a46a4e19bb871fa545035" => :yosemite - sha256 "4cacc06fdeda9a24bb681cb90c52c4692d5bf3993f18db496c5de19ab9d46dac" => :mavericks - sha256 "e27c723f84d94d6d209c40387fb4816365e11af1c09e296661b67dcaa254c36d" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "macos" - system "make", "install" - end - - test do - system "#{bin}/synscan", "-V" - end -end diff --git a/Formula/syntaxerl.rb b/Formula/syntaxerl.rb deleted file mode 100644 index 15340595faee1..0000000000000 --- a/Formula/syntaxerl.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Syntaxerl < Formula - desc "Syntax checker for Erlang code and config files" - homepage "https://github.com/ten0s/syntaxerl" - url "https://github.com/ten0s/syntaxerl/archive/0.14.0.tar.gz" - sha256 "a7c46789aadf467191f43b82ac6a428faf4d38af2965fdcd946789a7f40439fc" - - bottle do - cellar :any_skip_relocation - sha256 "569cf5e87181031c9b13dd6cb2f4fe17967d4392c87a2db30d498883a05106c6" => :mojave - sha256 "2b4c6e6d7e7413fe81e5107e80841f5a8c4bbddec9e12f3f53c92bedd5fced3b" => :high_sierra - sha256 "0e0ac8402dd61720eeca50047b173f7500dc38bd7cceb37915c4425b7492044e" => :sierra - sha256 "648f30c4fb2db062f4c9f27d3c73cf679181e7183a5b7b83b5670624d88b27d5" => :el_capitan - sha256 "80ea1737253a2115722350d6a6456ba48ae853674bb91f7a8b685e7b8311eb74" => :yosemite - end - - depends_on "erlang" - - def install - system "make" - bin.install "_build/default/bin/syntaxerl" - end - - test do - (testpath/"app.config").write "[{app,[{arg1,1},{arg2,2}]}]." - assert_equal "", shell_output("#{bin}/syntaxerl #{testpath}/app.config") - - (testpath/"invalid.config").write "][" - assert_match "invalid.config:1: syntax error before: ']'", shell_output("#{bin}/syntaxerl #{testpath}/invalid.config", 1) - end -end diff --git a/Formula/sysbench.rb b/Formula/sysbench.rb deleted file mode 100644 index 92f7f3d8b310e..0000000000000 --- a/Formula/sysbench.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Sysbench < Formula - desc "System performance benchmark tool" - homepage "https://github.com/akopytov/sysbench" - url "https://github.com/akopytov/sysbench/archive/1.0.16.tar.gz" - sha256 "c537d0129151584b361efbd4ce9ed0b2195a69b72ce65912e2efa3a68f28b609" - - bottle do - cellar :any - sha256 "c856c03de69a1d737ef1df2473b94d7ff0e58416f25f590c4a408188e8240b1d" => :mojave - sha256 "277a98edd7cad5d63b019c44192269d7a70c6684f1f5b0859b608d3c7c85fc7a" => :high_sierra - sha256 "e89a22e66923d4b1e1c104e9a69b6274265d04e2566e2266805db54d4d92574f" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "mysql-client" - depends_on "openssl" - - def install - system "./autogen.sh" - - # Fix for luajit build breakage. - # Per https://luajit.org/install.html: If MACOSX_DEPLOYMENT_TARGET - # is not set then it's forced to 10.4, which breaks compile on Mojave. - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - system "./configure", "--prefix=#{prefix}", "--with-mysql" - system "make", "install" - end - - test do - system "#{bin}/sysbench", "--test=cpu", "--cpu-max-prime=1", "run" - end -end diff --git a/Formula/sysdig.rb b/Formula/sysdig.rb deleted file mode 100644 index 4e4b2172b676e..0000000000000 --- a/Formula/sysdig.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Sysdig < Formula - desc "System-level exploration and troubleshooting tool" - homepage "https://www.sysdig.org/" - url "https://github.com/draios/sysdig/archive/0.24.2.tar.gz" - sha256 "cd925afd2fb0a26728611666e017d480afd49158c2d70714c7461a97c8820807" - - bottle do - sha256 "f3eebe7276e7a1b5a579f6a095bcdad61c5c6429ada950e5d9abbf2660c59232" => :mojave - sha256 "dd3b00038c5d3d6efaf2c1bc0faa2595f47337d849f1728dd063aa24db96ce16" => :high_sierra - sha256 "42a2aa84a58542e09f47734e12af3986b0c4be83b1d362c48322c585e4aab87d" => :sierra - end - - depends_on "cmake" => :build - depends_on "jsoncpp" - depends_on "luajit" - - # More info on https://gist.github.com/juniorz/9986999 - resource "sample_file" do - url "https://gist.githubusercontent.com/juniorz/9986999/raw/a3556d7e93fa890a157a33f4233efaf8f5e01a6f/sample.scap" - sha256 "efe287e651a3deea5e87418d39e0fe1e9dc55c6886af4e952468cd64182ee7ef" - end - - def install - ENV.libcxx if MacOS.version < :mavericks - - mkdir "build" do - system "cmake", "..", "-DSYSDIG_VERSION=#{version}", - "-DUSE_BUNDLED_DEPS=OFF", - *std_cmake_args - system "make", "install" - end - - (pkgshare/"demos").install resource("sample_file").files("sample.scap") - end - - test do - output = shell_output("#{bin}/sysdig -r #{pkgshare}/demos/sample.scap") - assert_match "/tmp/sysdig/sample", output - end -end diff --git a/Formula/systemc.rb b/Formula/systemc.rb deleted file mode 100644 index c268cd2f0f89b..0000000000000 --- a/Formula/systemc.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Systemc < Formula - desc "Core SystemC language and examples" - homepage "https://accellera.org/" - url "https://www.accellera.org/images/downloads/standards/systemc/systemc-2.3.2.tar.gz" - sha256 "a28eeee00189f0e39f51461dcd7dbed7fb38e4e07dbd9e723473000ce6ef73c5" - - bottle do - cellar :any - sha256 "ed266b79f596258da162637530a1830516ceee6fb4874add5eaa9a84b175cda4" => :mojave - sha256 "7d189564e4277390f8fa0c2e067f17dc31148e33af65c0998b6242405f761a18" => :high_sierra - sha256 "257ab0155a4e4f5d6dea22696f265d1a523efa24627487a5fad4ad70d43e7fd0" => :sierra - sha256 "8dbfcaef7cbca7116bacb300288520ed357768c148a612de2f9a3483266add87" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-arch-suffix=", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "systemc.h" - - int sc_main(int argc, char *argv[]) { - return 0; - } - EOS - system ENV.cxx, "-L#{lib}", "-lsystemc", "test.cpp" - system "./a.out" - end -end diff --git a/Formula/sz81.rb b/Formula/sz81.rb deleted file mode 100644 index 87e517af86805..0000000000000 --- a/Formula/sz81.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sz81 < Formula - desc "ZX80/81 emulator" - homepage "https://sz81.sourceforge.io/" - url "https://downloads.sourceforge.net/project/sz81/sz81/2.1.7/sz81-2.1.7-source.tar.gz" - sha256 "4ad530435e37c2cf7261155ec43f1fc9922e00d481cc901b4273f970754144e1" - head "http://svn.code.sf.net/p/sz81/code/sz81" - - bottle do - sha256 "b90dc9986a1f3f6fa93967745f331d55d4e8837e05e47b9b28d3ee9245e561d3" => :mojave - sha256 "c23507f4f58b7144b2b4c0dd42ed6ae22a6d65661d15ea024ab8b65fd2a774ba" => :high_sierra - sha256 "853475dfc7991beea12b01669e81fc35ce10e6a9b067716eb026e0ff693d5c4c" => :sierra - sha256 "7a9b6ffa108486dea9514df6fbdd820a0e7b829c893ecb1b76a1b69ca8f39a21" => :el_capitan - sha256 "a7f7cc5af1a1a42449da3169e18587df907369c94debf6bb15edba62acf0e199" => :yosemite - end - - depends_on "sdl" - - def install - args = %W[ - PREFIX=#{prefix} - BINDIR=#{bin} - ] - system "make", *args - system "make", "install", *args - end - - test do - assert_match /sz81 #{version} -/, shell_output("#{bin}/sz81 -h", 1) - end -end diff --git a/Formula/szip.rb b/Formula/szip.rb deleted file mode 100644 index 1d2416bf1b54f..0000000000000 --- a/Formula/szip.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Szip < Formula - desc "Implementation of extended-Rice lossless compression algorithm" - homepage "https://support.hdfgroup.org/HDF5/release/obtain5.html#extlibs" - url "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz" - sha256 "21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412" - revision 1 - - bottle do - cellar :any - sha256 "a6f7b3c066968d98311e0a1af58464562d586f0194f29d78d9ddbee59c96b833" => :mojave - sha256 "3b84fc3869965a5851cd13554ab46283a13adfa568ca7df1288728b2cfde0c4a" => :high_sierra - sha256 "c57296964a6ac43991c5f3a6b0b14e3deb99e14f3d1214427385dc4112e803af" => :sierra - sha256 "a4b1f903019aaa2e1d53e661aaf90f0e91937b3ad4b71126483feffb4c2d2e13" => :el_capitan - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include "szlib.h" - - int main() - { - sz_stream c_stream; - c_stream.options_mask = 0; - c_stream.bits_per_pixel = 8; - c_stream.pixels_per_block = 8; - c_stream.pixels_per_scanline = 16; - c_stream.image_pixels = 16; - assert(SZ_CompressInit(&c_stream) == SZ_OK); - assert(SZ_CompressEnd(&c_stream) == SZ_OK); - return 0; - } - EOS - system ENV.cc, "-L", lib, "test.c", "-o", "test", "-lsz" - system "./test" - end -end diff --git a/Formula/t-completion.rb b/Formula/t-completion.rb deleted file mode 100644 index 7d92ef6aca94d..0000000000000 --- a/Formula/t-completion.rb +++ /dev/null @@ -1,19 +0,0 @@ -class TCompletion < Formula - desc "Completion for CLI power tool for Twitter" - homepage "https://sferik.github.io/t/" - url "https://github.com/sferik/t/archive/v3.1.0.tar.gz" - sha256 "900ef6e3d6180b70bf2434503774ea5e1bf985b9110d4f051c44a191b08f6062" - head "https://github.com/sferik/t.git" - - bottle :unneeded - - def install - bash_completion.install "etc/t-completion.sh" => "t" - zsh_completion.install "etc/t-completion.zsh" => "_t" - end - - test do - assert_match "-F _t", - shell_output("source #{bash_completion}/t && complete -p t") - end -end diff --git a/Formula/t/t-completion.rb b/Formula/t/t-completion.rb new file mode 100644 index 0000000000000..d7b1ac30b7bfc --- /dev/null +++ b/Formula/t/t-completion.rb @@ -0,0 +1,22 @@ +class TCompletion < Formula + desc "Completion for CLI power tool for Twitter" + homepage "https://sferik.github.io/t/" + url "https://github.com/sferik/t-ruby/archive/refs/tags/v4.2.0.tar.gz" + sha256 "3053ce8983ee673c6975bca7235cebea3eeb9bdfa7c5644d44cb7ad6fd9aaf9b" + license "MIT" + head "https://github.com/sferik/t-ruby.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "dac644293e51a204dd1df5d419678a5d1e59f9ea2475d5308cd658aba3cb6faa" + end + + def install + bash_completion.install "etc/t-completion.sh" => "t" + zsh_completion.install "etc/t-completion.zsh" => "_t" + end + + test do + assert_match "-F _t", + shell_output("bash -c 'source #{bash_completion}/t && complete -p t'") + end +end diff --git a/Formula/t/t-rec.rb b/Formula/t/t-rec.rb new file mode 100644 index 0000000000000..0c1af857d9c35 --- /dev/null +++ b/Formula/t/t-rec.rb @@ -0,0 +1,36 @@ +class TRec < Formula + desc "Blazingly fast terminal recorder that generates animated gif images for the web" + homepage "https://github.com/sassman/t-rec-rs" + url "https://github.com/sassman/t-rec-rs/archive/refs/tags/v0.7.9.tar.gz" + sha256 "1744fb7743209ea153a729f89e8e7f2f03bd61247488fbeea31abbe234087cd7" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb5c8d1f7926b19c4911d6a2007a7f2b0dea7b0e8bf75682fb5d07a40fed2d3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "31e705c01ca086aeb97ea2ab92f97cdc982e8a2c003fa1262352c282c9e184f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9f6104c42e6d8dc1dd9c33f8d9a62b2c331054878b475991b1ed32ad72012cc6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3697e02ec5dfa92fc7168ffac442b767fc4d3a2a6ec994e8ca90f22720e52e96" + sha256 cellar: :any_skip_relocation, sonoma: "7ee2792601edc77380d0749e1e7605cd8f2607311b1225ecae60a7314b3bc68b" + sha256 cellar: :any_skip_relocation, ventura: "20f8a41fa02ef8d34c2525dd831f67be5e13a87df27ef3ff9289ca69272e44cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7f070666a185ffc61a81f8e9d5c9bd128b3fcb12e53d01c6906df0d91d92c10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62fa013bdcdb71ede6a588656dad31e8af3e6184d6ced54c6218959ab79899fe" + end + + depends_on "rust" => :build + depends_on "imagemagick" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + o = shell_output("WINDOWID=999999 #{bin}/t-rec 2>&1", 1).strip + if OS.mac? + assert_equal "Error: Cannot grab screenshot from CGDisplay of window id 999999", o + else + assert_equal "Error: $DISPLAY variable not set and no value was provided explicitly", o + end + end +end diff --git a/Formula/t/t1lib.rb b/Formula/t/t1lib.rb new file mode 100644 index 0000000000000..0e7d08383829d --- /dev/null +++ b/Formula/t/t1lib.rb @@ -0,0 +1,97 @@ +class T1lib < Formula + desc "C library to generate/rasterize bitmaps from Type 1 fonts" + homepage "https://www.t1lib.org/" + url "https://www.ibiblio.org/pub/linux/libs/graphics/t1lib-5.1.2.tar.gz" + mirror "https://fossies.org/linux/misc/old/t1lib-5.1.2.tar.gz" + sha256 "821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59" + license "GPL-2.0-only" + + livecheck do + url "https://www.ibiblio.org/pub/Linux/libs/graphics/" + regex(/href=.*?t1lib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "8d2eebfeac867815095b36e655608d597e57085aaf03946b961fd50b551ba984" + sha256 arm64_sequoia: "b13bdc384d062e0a30c75b4ec280865e39273acb787acf872d98a416a5b08ffd" + sha256 arm64_sonoma: "549b1729a39ffb52fa0a6e733d43f73d371bcbaea936270c5ad22e421c923127" + sha256 arm64_ventura: "4178a1b4a03a25c8216994221938a31ea77cf68bc4e80e61995d3375423d12f2" + sha256 arm64_monterey: "015a6d7c251045c97f334922342d56d1ba93a398f32ba4c0b32ce9ef494fa02a" + sha256 arm64_big_sur: "e9a134358b78dfcbf7d13a6edc7de434eb72981c14ec81d461527b05f2e32b1d" + sha256 sonoma: "aaa86e53a2f28e3edae8eaad292cbb7beddc1251160bc9d28b7d6ae09e4cae7e" + sha256 ventura: "54dc8980970a69062fe9eb15c368ad93b5d589fbea5e14766d6c2d22103d3506" + sha256 monterey: "3989c26968d5f2d39ee4f6677121b3bafc455f7780eeb1394250792535f2392e" + sha256 big_sur: "297e202327e6968bb7bd6d6ebff52205128189fa91bfc37785d45b4df028d3b6" + sha256 catalina: "9318f5f1fcb5b4f3b0b5ce67c0925964c95bf10b7f843c70e4f6ed2b5a734360" + sha256 arm64_linux: "53645a5cb98164213a964a7f5f38412e4ce9290e83d6147cb5d2cdf676354869" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51b691773063f4f7c0e6cbfa5be259516c77ad7b1c52bb189d045b8056216bf9" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "without_doc" + system "make", "install" + share.install "Fonts" => "fonts" + end + + test do + # T1_SetString seems to fail on macOS with "(E) T1_SetString(): t1_abort: Reason: unable to fix subpath break?" + # https://github.com/Homebrew/homebrew-core/pull/194149#issuecomment-2412940237 + (testpath/"test.c").write <<~C + #include + #include + #include + + int main( void) + { + int i; + T1_SetBitmapPad(16); + + if ((T1_InitLib(NO_LOGFILE)==NULL)){ + fprintf(stderr, "Initialization of t1lib failed\\n"); + return EXIT_FAILURE; + } + + for( i=0; i :build + depends_on "automake" => :build + end + + def install + system "./bootstrap.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"t1mac", "--version" + end +end diff --git a/Formula/t/ta-lib.rb b/Formula/t/ta-lib.rb new file mode 100644 index 0000000000000..070174d0da75d --- /dev/null +++ b/Formula/t/ta-lib.rb @@ -0,0 +1,37 @@ +class TaLib < Formula + desc "Tools for market analysis" + homepage "https://ta-lib.org/" + url "https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz" + sha256 "aa04066d17d69c73b1baaef0883414d3d56ab3775872d82916d1cdb376a3ae86" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7817d0d8bfa2799e2b90618352a6d276dfa36ff1af3f343c9f4d7fe0be8d6240" + sha256 cellar: :any, arm64_sequoia: "0ef739e4436909635fc3bacd8df2362d37a9467f11631111463dd387776b6b13" + sha256 cellar: :any, arm64_sonoma: "8d7deb75b383ebc50513ebd077c4268acdb09d602b19ed4c8878f915f8f8b1e4" + sha256 cellar: :any, arm64_ventura: "12709c4df99f1dce0315b653a1bdb962f3cc6c429bda41a13d17f4dd43079644" + sha256 cellar: :any, sonoma: "c34c5da2df4abefcb86d3f130a7e8fe0b85fad2c83e2343d9e65e4a615c6b235" + sha256 cellar: :any, ventura: "151e74186d18550800b5e7e714c50e99e25b1e4f536fc83521e45e4ce389fc0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6bc65c4e2fb0d567fb739d473d9ee2b696741bb5d05f0f10c8594e096c875c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "868d1163296be1e3d5f10bcdf4047f0e218eb91617da562eac14fd04cd05433d" + end + + on_macos do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + ENV.deparallelize + # Call autoreconf on macOS to fix -flat_namespace usage + system "autoreconf", "--force", "--install", "--verbose" if OS.mac? + system "./configure", *std_configure_args + system "make", "install" + bin.install "src/tools/ta_regtest/.libs/ta_regtest" + end + + test do + system bin/"ta_regtest" + end +end diff --git a/Formula/t/tabiew.rb b/Formula/t/tabiew.rb new file mode 100644 index 0000000000000..8a0b6c1cd9b80 --- /dev/null +++ b/Formula/t/tabiew.rb @@ -0,0 +1,53 @@ +class Tabiew < Formula + desc "TUI to view and query tabular files (CSV,TSV, Parquet, etc.)" + homepage "https://github.com/shshemi/tabiew" + url "https://github.com/shshemi/tabiew/archive/refs/tags/v0.11.1.tar.gz" + sha256 "da3b74987f318471aa9701a80deb69837be82df9c9308f4380abfb26df2abf79" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6bd1b2dbb9ac3e7ad069e1125f9e17368f2e85a6f887772037d6a53bedb47d23" + sha256 cellar: :any, arm64_sequoia: "e1c27e0718dd472be14f51e58d56bd08854c5f97923be23fe9a77de930305231" + sha256 cellar: :any, arm64_sonoma: "0fb4cd270519ff8c1b470aaa18f23f64c9b0c4c38698001345d7e32dfcd24205" + sha256 cellar: :any, arm64_ventura: "06556b8ff92c18611451060c5ca6ba3441b90bf31a53b61ca9ce4705b52a359c" + sha256 cellar: :any, sonoma: "ca433890032f62f4e49995a401d8460a55a1202b70a7b709283b0cea273b850b" + sha256 cellar: :any, ventura: "b4a4baa0102dd4abc3cf871f10152d2585913e85f4c71b6bb3f161a2f9150965" + sha256 cellar: :any_skip_relocation, arm64_linux: "f71cf83e2cf034bdc1215039c5888ce591a69daf0508d08cc47bda3075244615" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6533aa32a5da1e32d851244d7661063147a020a70c2b76771f3e3c7616be9453" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + conflicts_with "watcher", because: "both install `tw` binaries" + + def install + system "cargo", "install", *std_cargo_args + + man1.install "target/manual/tabiew.1" => "tw.1" + bash_completion.install "target/completion/tw.bash" => "tw" + zsh_completion.install "target/completion/_tw" + fish_completion.install "target/completion/tw.fish" + end + + test do + (testpath/"test.csv").write <<~CSV + time,tide,wait + 1,42,"no man" + 7,11,"you think?" + CSV + input, = Open3.popen2 "script -q output.txt" + input.puts "stty rows 80 cols 130" + input.puts bin/"tw test.csv" + input.puts ":F tide < 40" + input.puts ":goto 1" + sleep 1 + input.puts ":q" + sleep 1 + input.close + sleep 2 + + assert_match "you think?", (testpath/"output.txt").read + end +end diff --git a/Formula/t/tabixpp.rb b/Formula/t/tabixpp.rb new file mode 100644 index 0000000000000..f055c6bc4769a --- /dev/null +++ b/Formula/t/tabixpp.rb @@ -0,0 +1,43 @@ +class Tabixpp < Formula + desc "C++ wrapper to tabix indexer" + homepage "https://github.com/vcflib/tabixpp" + url "https://github.com/vcflib/tabixpp/archive/refs/tags/v1.1.2.tar.gz" + sha256 "c850299c3c495221818a85c9205c60185c8ed9468d5ec2ed034470bb852229dc" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a24d3855da2af735455696a4cf8e41dac8acab4926de40d26097086ffb4e6c33" + sha256 cellar: :any, arm64_sequoia: "8feff85967f3147f174f965ab1aaadee620fdcdfb8a7f1292613b35b552cf717" + sha256 cellar: :any, arm64_sonoma: "646a0fe583346a08a86b7d4b4f9af547b762ee01d7dc108d3c5436c7fdb1d09b" + sha256 cellar: :any, arm64_ventura: "3710a4010ff9ae3a7d23e3299d591a04edf0489a73d85830f53ac287be9095c8" + sha256 cellar: :any, sonoma: "f2809f7561299cec3e859f6a7bb51c23144f1d16f271e1ce3f7ed19a9815c67f" + sha256 cellar: :any, ventura: "d2f97126da85f553513b6548d0250ce1c9214dcca8633aa839ab2b9924bbf422" + sha256 cellar: :any_skip_relocation, arm64_linux: "498836e6beff84a9a7068c96323e36ed257ca6552106a6c35730fd45e229bd87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb45c34d01eb2533ba080600ae58484c26015e136fb8bdad5f11f6dcdbbe93a6" + end + + depends_on "htslib" + depends_on "xz" + + def install + htslib_include = Formula["htslib"].opt_include + args = %W[ + INCLUDES=-I#{htslib_include} + HTS_HEADERS=#{htslib_include}/htslib/bgzf.h #{htslib_include}/htslib/tbx.h + HTS_LIB= + PREFIX=#{prefix} + DESTDIR= + SLIB= + ] + system "make", "install", *args + pkgshare.install "test" + end + + test do + cp_r pkgshare/"test", testpath + system bin/"tabix++", "test/vcf_file.vcf.gz" + assert_path_exists "test/vcf_file.vcf.gz.tbi" + end +end diff --git a/Formula/t/tabulate.rb b/Formula/t/tabulate.rb new file mode 100644 index 0000000000000..9196734878878 --- /dev/null +++ b/Formula/t/tabulate.rb @@ -0,0 +1,50 @@ +class Tabulate < Formula + desc "Table Maker for Modern C++" + homepage "https://github.com/p-ranav/tabulate" + url "https://github.com/p-ranav/tabulate/archive/refs/tags/v1.5.tar.gz" + sha256 "16b289f46306283544bb593f4601e80d6ea51248fde52e910cc569ef08eba3fb" + license all_of: [ + "MIT", + "BSL-1.0", # {optional,string_view,variant}_lite.hpp + "BSD-3-Clause", # termcolor.hpp + ] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "636ac9d2ecadd40138dc030e967b464b296cba28f5eb180377c7e18d18778f97" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # https://github.com/p-ranav/tabulate/blob/master/samples/shape.cpp + (testpath/"test.cpp").write <<~CPP + #include + using namespace tabulate; + using Row_t = Table::Row_t; + + void print_shape(Table &table) { + auto shape = table.shape(); + std::cout << "Shape: (" << shape.first << ", " << shape.second << ")" << std::endl; + } + + int main() { + Table table; + table.add_row(Row_t{"Command", "Description"}); + table.add_row(Row_t{"git status", "List all new or modified files"}); + table.add_row(Row_t{"git diff", "Show file differences that haven't been staged"}); + std::cout << table << std::endl; + print_shape(table); + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test" + assert_match "Shape: (63, 7)", shell_output("./test") + end +end diff --git a/Formula/t/tach.rb b/Formula/t/tach.rb new file mode 100644 index 0000000000000..d41d7e20411a6 --- /dev/null +++ b/Formula/t/tach.rb @@ -0,0 +1,109 @@ +class Tach < Formula + include Language::Python::Virtualenv + + desc "Tool to enforce dependencies using modular architecture" + homepage "https://docs.gauge.sh/getting-started/introduction" + url "https://files.pythonhosted.org/packages/c0/03/71dc08afb67a98f75f338cbe06cafa4d4266a80b5f3192fae73289a38412/tach-0.29.0.tar.gz" + sha256 "0b27b9265eee34f396515a2e918fa783d3d02e69edfb6ea1dfd1843d49021429" + license "MIT" + head "https://github.com/gauge-sh/tach.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "995084e09cf2ff810a40e1d22ec4c5aa9ecac3c176a5726659614447f4572f4a" + sha256 cellar: :any, arm64_sequoia: "defec1904f98fd5d1cc1d1d978fc9326e6687c2522f4fa0ebc3532da8bb929bd" + sha256 cellar: :any, arm64_sonoma: "4d105b5522297e83a83048afa1134729344e0f4659f499f4a80c3ba585d57d49" + sha256 cellar: :any, sonoma: "775042c04cf9ecb0f3f6d8dca870215a8087a1715288be7cd81ca7f5e5d879e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "44034ea44dc7cd32910d77643a4c8f0bde3d3ae744d08e7527de9bab2b9e0618" + sha256 cellar: :any_skip_relocation, x86_64_linux: "308dfeff95177f8e90c3c4260cad36a761163f06f53bb72c4b9dc0464442aab0" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.14" + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz" + sha256 "d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pydot" do + url "https://files.pythonhosted.org/packages/66/dd/e0e6a4fb84c22050f6a9701ad9fd6a67ef82faa7ba97b97eb6fdc6b49b34/pydot-3.0.4.tar.gz" + sha256 "3ce88b2558f3808b0376f22bfa6c263909e1c3981e2a7b629b65b451eee4a25d" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/f2/a5/181488fc2b9d093e3972d2a472855aae8a03f000592dbfce716a512b3359/pyparsing-3.2.5.tar.gz" + sha256 "2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz" + sha256 "64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/tach --version") + + assert_match "Configuration file not found.", shell_output("#{bin}/tach server 2>&1", 1) + end +end diff --git a/Formula/t/tag.rb b/Formula/t/tag.rb new file mode 100644 index 0000000000000..d7284de6eaf75 --- /dev/null +++ b/Formula/t/tag.rb @@ -0,0 +1,39 @@ +class Tag < Formula + desc "Manipulate and query tags on macOS files" + homepage "https://github.com/jdberry/tag/" + url "https://github.com/jdberry/tag/archive/refs/tags/v0.10.tar.gz" + sha256 "5ab057d3e3f0dbb5c3be3970ffd90f69af4cb6201c18c1cbaa23ef367e5b071e" + license "MIT" + revision 1 + head "https://github.com/jdberry/tag.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd8bc8fffd2b86efc0a22070b48426c82f98979625bf991332a633a83070cc85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0276d10f3dbc55011085ba7d45f74a29760a8985108e946be3d2c6abf0bdfb34" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "22c9b07c4317b1d90da2431a3679babf1381a98c6c1311f565bdd83b94c88389" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f02aa65b8800efb9bc93089aded8bff111549d41f28e7ba223b02a1240d5c7b2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "87582cbaf5cadbc19c6d8c2c9ea6793d3116a119d7de6b18b7b5a6d898b4ffd4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "68b99acc16647610b02c286aae5b302c7c2128164817d9eb197d2d5f9f51ca72" + sha256 cellar: :any_skip_relocation, sonoma: "bd6e785addd1fe6d8ec7c6fe81b17550a0fab220c6bb54a1ae358990dcd1d549" + sha256 cellar: :any_skip_relocation, ventura: "b8b8096c01415421b0b68db1e01003d7ce635db093f5f00120dd133055f782d3" + sha256 cellar: :any_skip_relocation, monterey: "4b70ddf8fa1ead9e8bffdd2d12194301be5c2be66ea3a355b62eee2836d5c0bc" + sha256 cellar: :any_skip_relocation, big_sur: "a63e067af22cda164f890108f610bfecd4bc3b2759fd1dd473dac59d1654a156" + sha256 cellar: :any_skip_relocation, catalina: "e1572ae47d558d60983f7c1cbe9ae42a5c7f2dcb950762ab6c721e81351f5657" + end + + depends_on :macos + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + test_tag = "test_tag" + test_file = Pathname.pwd+"test_file" + touch test_file + system bin/"tag", "--add", test_tag, test_file + assert_equal test_tag, `#{bin}/tag --list --no-name #{test_file}`.chomp + end +end diff --git a/Formula/t/taglib.rb b/Formula/t/taglib.rb new file mode 100644 index 0000000000000..e2864f90d9028 --- /dev/null +++ b/Formula/t/taglib.rb @@ -0,0 +1,62 @@ +class Taglib < Formula + desc "Audio metadata library" + homepage "https://taglib.org/" + url "https://taglib.github.io/releases/taglib-2.1.1.tar.gz" + sha256 "3716d31f7c83cbf17b67c8cf44dd82b2a2f17e6780472287a16823e70305ddba" + license all_of: ["LGPL-2.1-only", "MPL-1.1"] + head "https://github.com/taglib/taglib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6f29ef2be3f8ab43a3956a21de1f80d0bb3951df2e16376f592e476a4fe07cf8" + sha256 cellar: :any, arm64_sequoia: "78cd3f2121fab66ac1f4b3f28a54c46d129375e8ece28f7eeb4cb68f2c89722a" + sha256 cellar: :any, arm64_sonoma: "a8d56fabd553d9d4f5de8a78476f803ea5e6d7d7dc00861f767fbe54b161f50d" + sha256 cellar: :any, arm64_ventura: "3723f18ff63cd33ec1b6da0f7ab43c08be3994c6c70471a9a21025488b5956d1" + sha256 cellar: :any, sonoma: "4a107bbeb7a9d53f3046d18a19a4161e5e549ab3cf67069d65d506bdc317132f" + sha256 cellar: :any, ventura: "793d01948030616da5df4d999fba744e7639d5441aff12e83b1fec516042cc87" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f60f5717e204f3b8e059ca019f928b8b95a46ad1c40fe96b5903b867874881a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04369b3a1ba6dcdfd99b354eb9c92106f7c507f1819b68b349d1798478c6cab1" + end + + depends_on "cmake" => :build + depends_on "utf8cpp" + + uses_from_macos "zlib" + + def install + args = %w[-DWITH_MP4=ON -DWITH_ASF=ON -DBUILD_SHARED_LIBS=ON] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~EOS + #include + #include + #include + + int main() { + TagLib::ID3v2::Tag tag; + + auto* artistFrame = new TagLib::ID3v2::TextIdentificationFrame("TPE1", TagLib::String::UTF8); + artistFrame->setText("Test Artist"); + tag.addFrame(artistFrame); + + auto* titleFrame = new TagLib::ID3v2::TextIdentificationFrame("TIT2", TagLib::String::UTF8); + titleFrame->setText("Test Title"); + tag.addFrame(titleFrame); + + std::cout << "Artist: " << tag.artist() << std::endl; + std::cout << "Title: " << tag.title() << std::endl; + + return 0; + } + EOS + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-L#{lib}", "-ltag", "-I#{include}", "-lz" + assert_match "Artist: Test Artist", shell_output("./test") + + assert_match version.to_s, shell_output("#{bin}/taglib-config --version") + end +end diff --git a/Formula/t/tagref.rb b/Formula/t/tagref.rb new file mode 100644 index 0000000000000..b1d659829e65f --- /dev/null +++ b/Formula/t/tagref.rb @@ -0,0 +1,59 @@ +class Tagref < Formula + desc "Refer to other locations in your codebase" + homepage "https://github.com/stepchowfun/tagref" + url "https://github.com/stepchowfun/tagref/archive/refs/tags/v1.10.0.tar.gz" + sha256 "47d18c8fe3b037fd32fbeeeb91cf763840a809050a82a386dd56f73505a375fd" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ddb3d0e12f6c24a0b83a387e5e1392fdeb16fbc0c8dc858690448dcd6575b7ae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ead16f369050ce660900f833ef63cfa2040c7f0deba8a0545ee5fea24f57d15e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0aa631523fd3592e9f52b7abb2f5670a927cb6779515614eee07cefc71f88ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ed4bf80ef6f1aed8347f311832712b181836ce4dece7e944dc388fd89018a72" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5f400c0ef3ef0cbf288d732a56b925c0cb198b4258f8f77987c74c5a0643dd0b" + sha256 cellar: :any_skip_relocation, sonoma: "e3bc0ef94cf98c84d34ac8452224747603d7ec12c74f15912088f0815ce98859" + sha256 cellar: :any_skip_relocation, ventura: "58365312aba136e092131d67eec59209f83563bca4c39dc125f17160f60299a8" + sha256 cellar: :any_skip_relocation, monterey: "1eb81cfbe02b48597193f52be781db4d766f5fdf3c690b83d195c49b8028a675" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4a49434a44171844bb5b38fc02f2b1dc25cf1ff4985aa095ca1e865765ba093" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77b2f0a10a0bed8fb20f230a9f18590f9c2583657d173ef8c0c2b003443aa469" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"file-1.txt").write <<~EOS + Here's a reference to the tag below: [ref:foo] + Here's a reference to a tag in another file: [ref:bar] + Here's a tag: [tag:foo] + EOS + + (testpath/"file-2.txt").write <<~EOS + Here's a tag: [tag:bar] + EOS + + ENV["NO_COLOR"] = "true" + output = shell_output("#{bin}/tagref 2>&1") + assert_match( + "2 tags, 2 tag references, 0 file references, and 0 directory references", + output, + "Tagref did not find all the tags.", + ) + + (testpath/"file-3.txt").write <<~EOS + Here's a reference to a non-existent tag: [ref:baz] + EOS + + output = shell_output("#{bin}/tagref 2>&1", 1) + assert_match( + "No tag found for [ref:baz] @ ./file-3.txt:1.", + output, + "Tagref did not complain about a missing tag.", + ) + end +end diff --git a/Formula/t/tailor.rb b/Formula/t/tailor.rb new file mode 100644 index 0000000000000..e89fb650dddc9 --- /dev/null +++ b/Formula/t/tailor.rb @@ -0,0 +1,28 @@ +class Tailor < Formula + desc "Cross-platform static analyzer and linter for Swift" + homepage "https://sleekbyte.github.io/tailor/" + url "https://github.com/sleekbyte/tailor/releases/download/v0.12.0/tailor-0.12.0.tar" + sha256 "ec3810b27e9a35ecdf3a21987f17cad86918240d773172264e9abbb1a7efc415" + license "MIT" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ff96b6b585afcd69215b88d8a797bfc4115c987b6dbd58c1e844c8d7ff268fec" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + (bin/"tailor").write_env_script libexec/"bin/tailor", JAVA_HOME: Formula["openjdk"].opt_prefix + man1.install libexec/"tailor.1" + end + + test do + (testpath/"Test.swift").write "import Foundation\n" + system bin/"tailor", testpath/"Test.swift" + end +end diff --git a/Formula/t/tailscale.rb b/Formula/t/tailscale.rb new file mode 100644 index 0000000000000..6f05b4cdca2f2 --- /dev/null +++ b/Formula/t/tailscale.rb @@ -0,0 +1,61 @@ +class Tailscale < Formula + desc "Easiest, most secure way to use WireGuard and 2FA" + homepage "https://tailscale.com" + url "https://github.com/tailscale/tailscale.git", + tag: "v1.90.6", + revision: "28f6c2dbfc5d3f7dde8d566a9214f6e0f55a9d17" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dc629f72345afffcae0a906304f0415c41190dba9bbee7baeaca7ddef432e447" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46ffb8c4ad5f9d68b7f766ec91e81e96000da7ea3cb256957011324c31b96ddb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4daa911192da5a6755a51d22b6024c033f6d2b8658486674424a4c3b02858faa" + sha256 cellar: :any_skip_relocation, sonoma: "d3a726deeac5ff2c8e64964d2ba856b35ba4be253b211f833b2d814e8ae23a8d" + sha256 cellar: :any_skip_relocation, arm64_linux: "54655d35c06fd408b004f5856041c6fc46b5e6dacb908e263290e47fefa17c72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "731915b54ab54afbcf96c9b520d19b0f89e175389efb0f5dd19fbdc544eae054" + end + + depends_on "go" => :build + + conflicts_with cask: "tailscale-app" + + def install + vars = Utils.safe_popen_read("./build_dist.sh", "shellvars") + ldflags = %W[ + -s -w + -X tailscale.com/version.longStamp=#{vars.match(/VERSION_LONG="(.*)"/)[1]} + -X tailscale.com/version.shortStamp=#{vars.match(/VERSION_SHORT="(.*)"/)[1]} + -X tailscale.com/version.gitCommitStamp=#{vars.match(/VERSION_GIT_HASH="(.*)"/)[1]} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/tailscale" + system "go", "build", *std_go_args(ldflags:, output: bin/"tailscaled"), "./cmd/tailscaled" + + generate_completions_from_executable(bin/"tailscale", "completion") + end + + service do + run opt_bin/"tailscaled" + keep_alive true + log_path var/"log/tailscaled.log" + error_log_path var/"log/tailscaled.log" + end + + test do + version_text = shell_output("#{bin}/tailscale version") + assert_match version.to_s, version_text + assert_match(/commit: [a-f0-9]{40}/, version_text) + + fork do + system bin/"tailscaled", "-tun=userspace-networking", "-socket=#{testpath}/tailscaled.socket" + end + + sleep 2 + assert_match "Logged out.", shell_output("#{bin}/tailscale --socket=#{testpath}/tailscaled.socket status", 1) + end +end diff --git a/Formula/t/tailspin.rb b/Formula/t/tailspin.rb new file mode 100644 index 0000000000000..b9bb91638555d --- /dev/null +++ b/Formula/t/tailspin.rb @@ -0,0 +1,37 @@ +class Tailspin < Formula + desc "Log file highlighter" + homepage "https://github.com/bensadeh/tailspin" + url "https://github.com/bensadeh/tailspin/archive/refs/tags/5.5.0.tar.gz" + sha256 "e9d7cefb865585bb048a2ccbfcc1f900ae344134d71132a7c48ee0d5af09cdaf" + license "MIT" + head "https://github.com/bensadeh/tailspin.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "95494039cb74f12c62c4d37a73dda0cdeffd7289e8d943e3e2886edf0b9202fb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44586a6dcad6fb8267c8740d76404ad12bf7e089c429247e2ace1c8619277110" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b72108e7744f6539b7478ef15df4b3e8ca8c3ba20809b4ecdb0cf4ace12d608" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5a88936ed1623af9aa4560bdce4a641275bf630c06ac380b382fe84e38a2abd" + sha256 cellar: :any_skip_relocation, sonoma: "b12c37ddda9f095c000238c85caa5f97045f782fd9f573a859a1268257e1bb3b" + sha256 cellar: :any_skip_relocation, ventura: "38be0ff04c8a3539a1e5f93339f2e3627fa989afc813062e20d1f660669620a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9b8c4d226fe1c26a0ceab3934e20a74a252dd839c426dc26dde346336b044b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5aca6beeb105f23fa5564d72ed192d7994351a7faa1c0e89e167472c9dadfe6c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/tspin.bash" => "tspin" + fish_completion.install "completions/tspin.fish" + zsh_completion.install "completions/tspin.zsh" => "_tspin" + man1.install "man/tspin.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tspin --version") + + (testpath/"test.log").write("test\n") + system bin/"tspin", "test.log" + end +end diff --git a/Formula/t/tailwindcss-language-server.rb b/Formula/t/tailwindcss-language-server.rb new file mode 100644 index 0000000000000..9238f4782f062 --- /dev/null +++ b/Formula/t/tailwindcss-language-server.rb @@ -0,0 +1,67 @@ +class TailwindcssLanguageServer < Formula + desc "LSP for TailwindCSS" + homepage "https://github.com/tailwindlabs/tailwindcss-intellisense/tree/HEAD/packages/tailwindcss-language-server" + url "https://github.com/tailwindlabs/tailwindcss-intellisense/archive/refs/tags/v0.14.29.tar.gz" + sha256 "50bd5f0fa99b055871165f950db704ce20b12291476d70ea957f96da132680ab" + license "MIT" + + livecheck do + url "https://registry.npmjs.org/@tailwindcss/language-server/latest" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b1851593616dfc24f7d20fad69d25478fe3628dd23a5a046aa0d219300265998" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1851593616dfc24f7d20fad69d25478fe3628dd23a5a046aa0d219300265998" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1851593616dfc24f7d20fad69d25478fe3628dd23a5a046aa0d219300265998" + sha256 cellar: :any_skip_relocation, sonoma: "b1851593616dfc24f7d20fad69d25478fe3628dd23a5a046aa0d219300265998" + sha256 cellar: :any_skip_relocation, arm64_linux: "feaa7ab8e63b03b7d9294fde0183f0e297f0bdb7039e862c245635a7f197dd16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "feaa7ab8e63b03b7d9294fde0183f0e297f0bdb7039e862c245635a7f197dd16" + end + + depends_on "pnpm" => :build + depends_on "node" + + # lockfile update + patch do + url "https://github.com/tailwindlabs/tailwindcss-intellisense/commit/6f19018d336ae1b72e124569dd3ee4f328df2fb6.patch?full_index=1" + sha256 "ea45bfe06cd0f89c790d465510408dd1adf4ce8364ed24d56c977b81c22bc635" + end + + def install + # Prevent pnpm from downloading another copy due to `packageManager` feature + (buildpath/"pnpm-workspace.yaml").append_lines <<~YAML + managePackageManagerVersions: false + YAML + + cd "packages/tailwindcss-language-server" do + system "pnpm", "install", "--frozen-lockfile" + system "pnpm", "run", "build" + bin.install "bin/tailwindcss-language-server" + end + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"tailwindcss-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/t/tailwindcss.rb b/Formula/t/tailwindcss.rb new file mode 100644 index 0000000000000..7027d8b84a197 --- /dev/null +++ b/Formula/t/tailwindcss.rb @@ -0,0 +1,83 @@ +class Tailwindcss < Formula + desc "Utility-first CSS framework" + homepage "https://tailwindcss.com" + url "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.16.tgz" + sha256 "2e4b18d55f54728093971fe5a474a2f5518a9d0df4d9a2b347a7b7d2d5cd31c6" + license "MIT" + head "https://github.com/tailwindlabs/tailwindcss.git", branch: "main" + + # There can be a notable gap between when a version is added to npm and the + # GitHub release is created, so we check the "latest" release on GitHub + # instead of the default `Npm` check for the `stable` URL. + livecheck do + url :head + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "6c72b13f078446185ee60489412c021cbc44d37af462c66af9d43033ead33734" + sha256 arm64_sequoia: "86fef8df318cb0e87d5162e81390212244675dcbb539a3038dc99e5fa63569d9" + sha256 arm64_sonoma: "b8ce5e023c588ae6df4b3622c3403259ca15a4330780487e577ac7122c6b44e5" + sha256 sonoma: "9d20905fadb64a39067cbf9fb3bc614b531727164d99a7d17e78d7af426aaebc" + sha256 cellar: :any_skip_relocation, arm64_linux: "4304fc0e67b31d2a20e9cf25c37276e98deb27ae228c93c12c81f9c3bde962cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "303f979e06805cf063423c1685778d9d6c3e1bc78e10bc557f9215dc3ea9a51d" + end + + depends_on "node" + + # Imitate standalone CLI and include first-party plugins + # https://github.com/tailwindlabs/tailwindcss/blob/main/packages/%40tailwindcss-standalone/package.json#L28-L31 + resource "@tailwindcss/aspect-ratio" do + url "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz" + sha256 "858df3d82234e12e59e6f8bd5d272d1e6c65aefcb4263dac84d0331f5ef00455" + end + + resource "@tailwindcss/forms" do + url "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.10.tgz" + sha256 "f5003f088c8bfeef2d2576932b0521e29f84b7ca68e59afd709fef75bd4fe9bb" + end + + resource "@tailwindcss/typography" do + url "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz" + sha256 "0490006975cde689af548a2755f9c263344b7896f7fcc1d6b6f6680b59af3465" + end + + def install + resources.each do |r| + system "npm", "install", *std_npm_args(prefix: false), r.cached_download + end + system "npm", "install", *std_npm_args + bin.install libexec.glob("bin/*") + bin.env_script_all_files libexec/"bin", NODE_PATH: libexec/"lib/node_modules/@tailwindcss/cli/node_modules" + end + + test do + # https://github.com/tailwindlabs/tailwindcss/blob/main/integrations/cli/standalone.test.ts + (testpath/"index.html").write <<~HTML +
    +

    Headline

    +
    + +
    + HTML + + (testpath/"input.css").write <<~CSS + @tailwind base; + @import "tailwindcss"; + @import "tailwindcss/theme" theme(reference); + @import "tailwindcss/utilities"; + + @plugin "@tailwindcss/forms"; + @plugin "@tailwindcss/typography"; + @plugin "@tailwindcss/aspect-ratio"; + CSS + + system bin/"tailwindcss", "--input", "input.css", "--output", "output.css" + assert_path_exists testpath/"output.css" + + output = (testpath/"output.css").read + assert_match ".form-input {", output + assert_match ".prose {", output + assert_match ".aspect-w-16 {", output + end +end diff --git a/Formula/t/takt.rb b/Formula/t/takt.rb new file mode 100644 index 0000000000000..fe6024aa00440 --- /dev/null +++ b/Formula/t/takt.rb @@ -0,0 +1,49 @@ +class Takt < Formula + desc "Text-based music programming language" + homepage "https://takt.sourceforge.net/" + url "https://downloads.sourceforge.net/project/takt/takt-0.310-src.tar.gz" + sha256 "eb2947eb49ef84b6b3644f9cf6f1ea204283016c4abcd1f7c57b24b896cc638f" + license "GPL-2.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "fb1c2a27bc7182659239d0ef52d07617a56aa6e0fb1498f531cd12e7b045d434" + sha256 arm64_sequoia: "89999aa891436126770e5d390013ec55a9f2eff6e569e046443de74b9cd648d5" + sha256 arm64_sonoma: "9cf5685481804bc8482d1f8d9eaa3b7e41465e70e8d04662e81243d9ac139aef" + sha256 arm64_ventura: "d9787c5847508262a9e7f4e61165e94c80a39efc54587a804a2fc20904acf42b" + sha256 arm64_monterey: "1e8949e4e3457701233d4f72fd01e9852dafc3e1373124b9de0eaa08b7f6dca9" + sha256 arm64_big_sur: "910a1325ce07065c113c1efd53e8295a10b8db613ef6fa1e5bfda1abc8fa922d" + sha256 sonoma: "c1ab777ee7c89e4897a4d7cc7b115fb29a0acedb46b5fbfaf40368c78ed34cdb" + sha256 ventura: "47084647d30b62e5b76dbad42b93aec1e4aa21ab16b4b326be2e783c14b128af" + sha256 monterey: "4a3a4bf1b60b32d06bd0fd687e1fbb67684432db141aaf0acd0dcf54b8f5f00e" + sha256 big_sur: "fd9dec43c0d9d5634d3bf23f8c6112090429d279243c5c0acd4dbfff8025fdbc" + sha256 catalina: "b5f6d5891f4955b26be88358c37199d9f9b1ebd66eaaa519ccbcfddbfa615780" + sha256 arm64_linux: "d770c92134e4a2e483ff3d4f9371647ed5b688ab8f019d073917689927412a05" + sha256 x86_64_linux: "f448f82ff76bc5ea174cab0648cadca7d547688a783c424ab5e7a68a41fe8839" + end + + depends_on "readline" + + on_linux do + depends_on "alsa-lib" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + system "./configure", "--prefix=#{prefix}", "--with-lispdir=#{elisp}" + system "make", "install" + end + + test do + system bin/"takt", "-o etude1.mid", pkgshare/"examples/etude1.takt" + end +end diff --git a/Formula/t/taktuk.rb b/Formula/t/taktuk.rb new file mode 100644 index 0000000000000..43da1b07b34f5 --- /dev/null +++ b/Formula/t/taktuk.rb @@ -0,0 +1,39 @@ +class Taktuk < Formula + desc "Deploy commands to (a potentially large set of) remote nodes" + homepage "https://taktuk.gitlabpages.inria.fr/" + url "https://deb.debian.org/debian/pool/main/t/taktuk/taktuk_3.7.8.orig.tar.gz" + sha256 "f674edd33d27760b1ee6d41abf4542e07061d049405f0203d151e1af74be9b5c" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/t/taktuk/" + regex(/href=.*?taktuk[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9b7af9bb1751fc08c3a0c738daa15c25213bd52e741330334386bb13f407c7a8" + sha256 cellar: :any, arm64_sequoia: "01c8d15035ec43b420659f736333289b8c1562d8ac5f9d92e2cc4f4fde62859f" + sha256 cellar: :any, arm64_sonoma: "1c0669bf7050dad9bb1f3d0e237d240f21e28453c76985fcfd8294d58e488f94" + sha256 cellar: :any, sonoma: "6a0d53be5717eb2f8df21692d10fdd0adb02a409986905a0b68848df8ea99ecd" + sha256 cellar: :any_skip_relocation, arm64_linux: "06b5805260616eda515108c0ecce2dd476e4b01efd5cb16101f069bb8534778b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "324acdbdacf274b1b1ac362d386d010b5c4cbc84a534ee5f7a7717a8c20f5692" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "perl" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make" + ENV.deparallelize + system "make", "install", "INSTALLSITEMAN3DIR=#{man3}" + end + + test do + system bin/"taktuk", "quit" + end +end diff --git a/Formula/t/tal.rb b/Formula/t/tal.rb new file mode 100644 index 0000000000000..86dbfbc1056f7 --- /dev/null +++ b/Formula/t/tal.rb @@ -0,0 +1,54 @@ +class Tal < Formula + desc "Align line endings if they match" + homepage "https://thomasjensen.com/software/tal/" + url "https://thomasjensen.com/software/tal/tal-1.9.tar.gz" + mirror "https://www.mirrorservice.org/sites/download.salixos.org/x86_64/extra-14.2/source/misc/tal/tal-1.9.tar.gz" + sha256 "5d450cee7162c6939811bca945eb475e771efe5bd6a08b520661d91a6165bb4c" + license :public_domain + + livecheck do + url :homepage + regex(/href=.*?tal[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3aad8a5f10c8cee1e5b9dbfb673a6b05ff97774e5cb2f0f813b76c893b3e424" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd3c811b07d428e7beccf39eda7c3a0af73695f03188dfc7ea652472d492c794" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "94631ec0dafade563c1652e557981e5b4ed4f3583f3586bc9091be4d96c2b7b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "717e28a9ea9f325fd72962d66372a1e4edc3b27e81ea54a861f8c54dceea0a56" + sha256 cellar: :any_skip_relocation, arm64_monterey: "94237b7f329c30c17aed19d82bb18a790abf2abcbfc404a57ef9e237db4a0735" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7ca62e367e9b35b079d0419bc02c4baec570154a089337f4ffce87441e9ba7af" + sha256 cellar: :any_skip_relocation, sonoma: "beb5a6e9a3745345a2de1441503f9718428c27aca657c319a15615bdff1ed993" + sha256 cellar: :any_skip_relocation, ventura: "d586b3fdc04b4b8b8379249958cae1be5f1d15417b50aa8699a7c63ab99598c2" + sha256 cellar: :any_skip_relocation, monterey: "b869e27ee13cb3e2ec83b0bb24a3dfc17b753ae94afa8e11d5e75943e8f1c132" + sha256 cellar: :any_skip_relocation, big_sur: "ff2e907039f88888af6724c384e32b3191fd39097266bbdcf415faa3b9cc927f" + sha256 cellar: :any_skip_relocation, catalina: "1d2978734ee3f0c63efdd0acdff401014954c34ed709ed397348dc1f3f973b88" + sha256 cellar: :any_skip_relocation, arm64_linux: "779b8afc3da3186f16ce41fd9d40257f24e01b80520b625ddcf848f636646357" + sha256 cellar: :any_skip_relocation, x86_64_linux: "568fa7d6db8a642d71501bd804351e281c512fa82f3c2757bc870e7e8d871ecd" + end + + def install + system "make", "tal" + bin.install "tal" + man1.install "tal.1" + end + + test do + (testpath/"test.c").write <<~C + /***************************************************/ + /* some text and so on */ + /* even more text */ + /* foo, bar. bar bar. */ + /***************************************************/ + C + assert_equal <<~C, shell_output("#{bin}/tal -p 0 test.c") + /***************************************************/ + /* some text and so on */ + /* even more text */ + /* foo, bar. bar bar. */ + /***************************************************/ + C + end +end diff --git a/Formula/t/talhelper.rb b/Formula/t/talhelper.rb new file mode 100644 index 0000000000000..bb95e138b7b23 --- /dev/null +++ b/Formula/t/talhelper.rb @@ -0,0 +1,38 @@ +class Talhelper < Formula + desc "Configuration helper for talos clusters" + homepage "https://budimanjojo.github.io/talhelper/latest/" + url "https://github.com/budimanjojo/talhelper/archive/refs/tags/v3.0.38.tar.gz" + sha256 "ee3edcda197eac41b2cf374490f34ab328ac8cbfb211031215f71d6d076a2afe" + license "BSD-3-Clause" + head "https://github.com/budimanjojo/talhelper.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "adfe6f9c309524c1abfe005f0f84c3f413461003f9b1f7856c649985e5aa4894" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "adfe6f9c309524c1abfe005f0f84c3f413461003f9b1f7856c649985e5aa4894" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "adfe6f9c309524c1abfe005f0f84c3f413461003f9b1f7856c649985e5aa4894" + sha256 cellar: :any_skip_relocation, sonoma: "1692042565670644d48777fa294bcde7d95984fd3ee1e31e770546ef1ac006d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c4d4ee58d059e9424acaab8bd569ceb6190e52f102357f3ca618ac876294352" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bf03eb0d82f913c382e6fb3e3ed6ce05208d56905ca37640999a8c6522b84e7" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/budimanjojo/talhelper/v#{version.major}/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"talhelper", "completion") + pkgshare.install "example" + end + + test do + cp_r Dir["#{pkgshare}/example/*"], testpath + + output = shell_output("#{bin}/talhelper genconfig 2>&1", 1) + assert_match "failed to load env file: trying to decrypt talenv.yaml with sops", output + + assert_match "cluster:", shell_output("#{bin}/talhelper gensecret") + + assert_match version.to_s, shell_output("#{bin}/talhelper --version") + end +end diff --git a/Formula/t/talisman.rb b/Formula/t/talisman.rb new file mode 100644 index 0000000000000..362767d2fc9bb --- /dev/null +++ b/Formula/t/talisman.rb @@ -0,0 +1,36 @@ +class Talisman < Formula + desc "Tool to detect and prevent secrets from getting checked in" + homepage "https://thoughtworks.github.io/talisman/" + url "https://github.com/thoughtworks/talisman/archive/refs/tags/v1.37.0.tar.gz" + sha256 "40f9ab7d43fadf75abe7a4d71fac5ff083f71b63afada282146827725460d2d1" + license "MIT" + version_scheme 1 + head "https://github.com/thoughtworks/talisman.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d763005bb6e19df8cf0cdf814b2597f396e862c6f32ff6b066575164f9faa043" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c92711cc5d8857281b8bb8d7ba99f01b8389511e80ca0106cf2fbd9ab1d95e19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c92711cc5d8857281b8bb8d7ba99f01b8389511e80ca0106cf2fbd9ab1d95e19" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c92711cc5d8857281b8bb8d7ba99f01b8389511e80ca0106cf2fbd9ab1d95e19" + sha256 cellar: :any_skip_relocation, sonoma: "8918ff5adb067d32ec162569baf29e824d96b9f51e2a2c4a8dd118a8f3f02aca" + sha256 cellar: :any_skip_relocation, ventura: "8918ff5adb067d32ec162569baf29e824d96b9f51e2a2c4a8dd118a8f3f02aca" + sha256 cellar: :any_skip_relocation, arm64_linux: "29eafe05ccc38bcc04e8c8f5669c9fc25b2a15c9781a72d0959710b41a96ecc0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89549ecbadfe50fcce80851f3503243a9ea156a19561814ef73359fd44ea3abf" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd" + end + + test do + system "git", "init", "." + assert_match "talisman scan report", shell_output("#{bin}/talisman --scan") + end +end diff --git a/Formula/t/talloc.rb b/Formula/t/talloc.rb new file mode 100644 index 0000000000000..6be694d7cb6f6 --- /dev/null +++ b/Formula/t/talloc.rb @@ -0,0 +1,54 @@ +class Talloc < Formula + desc "Hierarchical, reference-counted memory pool with destructors" + homepage "https://talloc.samba.org/" + url "https://www.samba.org/ftp/talloc/talloc-2.4.3.tar.gz" + sha256 "dc46c40b9f46bb34dd97fe41f548b0e8b247b77a918576733c528e83abd854dd" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.samba.org/ftp/talloc/" + regex(/href=.*?talloc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "48fa5996bb7edeaffed110ccd66edfe54030a38308c4f7eef8b2b3477d7ec10d" + sha256 cellar: :any, arm64_sequoia: "6abdf3d390f094513a2233b594b63358dab2fd6b035b834ecacf18d4671a7b6d" + sha256 cellar: :any, arm64_sonoma: "afc3f29cd0d83d88010f350f8cb55dc3018c2199363c92c546f9e328b14001c0" + sha256 cellar: :any, arm64_ventura: "d851af75e1e18d20ccf184bd0f1d950f7a364ff676e0e4291220d24795d87bc8" + sha256 cellar: :any, sonoma: "ba2ccc5ac28845e2d8af43882e17bb552a66543eb635d05526a91088c29598aa" + sha256 cellar: :any, ventura: "c9a6f30c274ae31febabd3ba18b922beca680f49534ea9cbdafaef0ac7d111f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "3feb71b0dd36238cf6739e43a0c902756462912f40b183f4a1764fc94fbaf3f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d654af5ac59ff0e6731171fddd996c5fc30d10f2c4387d521bdfa4108c27f818" + end + + uses_from_macos "python" => :build + + def install + system "./configure", "--prefix=#{prefix}", + "--disable-rpath", + "--without-gettext", + "--disable-python" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() + { + int ret; + TALLOC_CTX *tmp_ctx = talloc_new(NULL); + if (tmp_ctx == NULL) { + ret = 1; + goto done; + } + ret = 0; + done: + talloc_free(tmp_ctx); + return ret; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ltalloc", "-o", "test" + system testpath/"test" + end +end diff --git a/Formula/t/talosctl.rb b/Formula/t/talosctl.rb new file mode 100644 index 0000000000000..e645b84c798e3 --- /dev/null +++ b/Formula/t/talosctl.rb @@ -0,0 +1,39 @@ +class Talosctl < Formula + desc "CLI for out-of-band management of Kubernetes nodes created by Talos" + homepage "https://www.talos.dev/" + url "https://github.com/siderolabs/talos/archive/refs/tags/v1.11.3.tar.gz" + sha256 "618a31409f6c50b42dc0bc11117df9a12d68d5df452cc68fd1d22c0c2233b8a4" + license "MPL-2.0" + head "https://github.com/siderolabs/talos.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ee761ab12171140c96285a11188ab5ee3e46bf7bfb221dde2fff73c7f282f496" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c46a26543347120bf9106954b67490cbf29831029327ddcf52263ae25419f4e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8045ae6e295a8eeb550ea49b3a76e5f769cd562cec573e143e32f2d1fc3ddb47" + sha256 cellar: :any_skip_relocation, sonoma: "d1bb4b13636be9df35655ef1ed38b5a7664c7e24216353af19aad7b32f3d2520" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdaff91ad8b4aca46f1beda998953ccda3a56f763af1cc6e25dafb19d0554639" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02bdcd8543667e424edd45a306f00e530bc276c5537090ba33c61781c872d30e" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/siderolabs/talos/pkg/machinery/version.Tag=#{version} + -X github.com/siderolabs/talos/pkg/machinery/version.Built=#{time.iso8601} + + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/talosctl" + + generate_completions_from_executable(bin/"talosctl", "completion") + end + + test do + # version check also failed with `failed to determine endpoints` for server config + assert_match version.to_s, shell_output("#{bin}/talosctl version 2>&1", 1) + + output = shell_output("#{bin}/talosctl list 2>&1", 1) + assert_match "error constructing client: failed to determine endpoints", output + end +end diff --git a/Formula/t/tanka.rb b/Formula/t/tanka.rb new file mode 100644 index 0000000000000..404a650618885 --- /dev/null +++ b/Formula/t/tanka.rb @@ -0,0 +1,41 @@ +class Tanka < Formula + desc "Flexible, reusable and concise configuration for Kubernetes using Jsonnet" + homepage "https://tanka.dev" + url "https://github.com/grafana/tanka/archive/refs/tags/v0.35.0.tar.gz" + sha256 "2a74a22b2cd13c4b2b4a76b3c855b43b75adf1569c3f40b14a98fd11bc65f230" + license "Apache-2.0" + head "https://github.com/grafana/tanka.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ba5f87f1a0bf34796946413f0507b6f7f44862de0a11207fa7d8421695a43aa0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba5f87f1a0bf34796946413f0507b6f7f44862de0a11207fa7d8421695a43aa0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ba5f87f1a0bf34796946413f0507b6f7f44862de0a11207fa7d8421695a43aa0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba5f87f1a0bf34796946413f0507b6f7f44862de0a11207fa7d8421695a43aa0" + sha256 cellar: :any_skip_relocation, sonoma: "90c897898b81e7717985a96fbeddeea2866dd462b10cfdc6294e56561e3177c9" + sha256 cellar: :any_skip_relocation, ventura: "90c897898b81e7717985a96fbeddeea2866dd462b10cfdc6294e56561e3177c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "45f6db59b95d3e5473efc91f85afe5a672337401baafef0fb53a94cb75426ba8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b5e7865362e8c922da248429736a650f8ed87b3fa840e9c49e0eb9dbb473c6f" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = %W[ + -s -w + -X github.com/grafana/tanka/pkg/tanka.CurrentVersion=#{version} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"tk"), "./cmd/tk" + end + + test do + system "git", "clone", "https://github.com/sh0rez/grafana.libsonnet" + system bin/"tk", "show", "--dangerous-allow-redirect", "grafana.libsonnet/environments/default" + end +end diff --git a/Formula/t/taplo.rb b/Formula/t/taplo.rb new file mode 100644 index 0000000000000..b785aadf0e807 --- /dev/null +++ b/Formula/t/taplo.rb @@ -0,0 +1,51 @@ +class Taplo < Formula + desc "TOML toolkit written in Rust" + homepage "https://taplo.tamasfe.dev" + url "https://github.com/tamasfe/taplo/archive/refs/tags/0.10.0.tar.gz" + sha256 "c2f7b3234fc62000689a476b462784db4d1bb2be6edcc186654b211f691efaf8" + license "MIT" + head "https://github.com/tamasfe/taplo.git", branch: "master" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check releases instead of the Git + # tags. Upstream maintains multiple products in this repo and the "latest" + # release may be for another product, so we have to check multiple releases + # to identify the correct version. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d2f39a73bc659d10bcc88514690a0830b9585e2411e5f3341e10a27e96ca7f0f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc34b4585bd26c0731a98223e7353e3c37e84693bbb828aae0c165eec4f6bd05" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e89c3dd297d444b0dd22566341b14c8a1cafb92a5e3065401e5d6ba04481dba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec6957561bfe3ef9bc51acb50b47e5dd47798504521e1eb3f69028ead7f6fe42" + sha256 cellar: :any_skip_relocation, sonoma: "38160e4bd1c2389f0790068445938f0c223ca45c8e7ee91f0dcbe3bd82e6fd1b" + sha256 cellar: :any_skip_relocation, ventura: "e56649fe5573e848113e04f1addb70bc0862fd80d5e13a0f76ebccb1374b26d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f0c83c7dbb6db7edb0d040085531e82fc78f9f44c675a4a53078c3b265ec183" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d598a281ccf6b7749d8e15dc2a506e471c06c6baa982969e712120704dc3899b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--features", "lsp", *std_cargo_args(path: "crates/taplo-cli") + end + + test do + test_file = testpath/"invalid.toml" + (testpath/"invalid.toml").write <<~TOML + # INVALID TOML DOC + fruit = [] + + [[fruit]] # Not allowed + TOML + + output = shell_output("#{bin}/taplo lint #{test_file} 2>&1", 1) + assert_match "expected array of tables", output + + assert_match version.to_s, shell_output("#{bin}/taplo --version") + end +end diff --git a/Formula/t/tarantool.rb b/Formula/t/tarantool.rb new file mode 100644 index 0000000000000..3bb248b0d61db --- /dev/null +++ b/Formula/t/tarantool.rb @@ -0,0 +1,94 @@ +class Tarantool < Formula + desc "In-memory database and Lua application server" + homepage "https://tarantool.org/" + url "https://download.tarantool.org/tarantool/src/tarantool-3.5.0.tar.gz" + sha256 "396780491b4f01c75f7098056e9a21562a687234085543bf52a5c5a6905f2dbc" + license "BSD-2-Clause" + version_scheme 1 + head "https://github.com/tarantool/tarantool.git", branch: "master" + + # The upstream release page (https://www.tarantool.io/en/doc/latest/release/) + # simply links to GitHub releases, so we check the "latest" release directly. + livecheck do + url :head + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8dbca5e09bab4ef910aeb06b4daeac4e282309105c7f5859bec7bc17d88f8fe4" + sha256 cellar: :any, arm64_sequoia: "6c5828162564addff9cd3ed7b52022bceb0d0ed3ec5d94fa0615b1ca39577d64" + sha256 cellar: :any, arm64_sonoma: "c219179af278c35dc4b4de390e52800546de9a545cf611a1df2b830916349281" + sha256 cellar: :any, arm64_ventura: "f2e041b8e088e58c76d93f05a8d27d4f9ae4e5845d9de8a41e8cae3c27dd299a" + sha256 cellar: :any, sonoma: "314369f182f312fdcb1aebc4b8e91808e23abe386070b9bc6e535e3fce7f9ce1" + sha256 cellar: :any, ventura: "e73a676ed760eabd5d4ca31d4aa1bd1007e485044fe02026287d9085cdec903b" + sha256 cellar: :any_skip_relocation, arm64_linux: "590263b5e1ecad50b34a3af8b03399cb455ee5095db304eb56de53dc8cfef5ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0501b2ce4c00e8631849fd5218e9d6770e32c0c815bbf22cd0943683a417eeab" + end + + depends_on "cmake" => :build + depends_on "curl" # curl 8.4.0+ + depends_on "icu4c@77" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "readline" + depends_on "zstd" + + uses_from_macos "ncurses" + + on_linux do + depends_on "libunwind" + end + + def install + # Workaround for clang >= 16 until upstream fix is available[^1]. + # Also, trying to apply LuaJIT commit[^2] worked on Xcode 16 but caused issue on Xcode 15. + # + # [^1]: https://github.com/tarantool/tarantool/issues/10566 + # [^2]: https://github.com/LuaJIT/LuaJIT/commit/2240d84464cc3dcb22fd976f1db162b36b5b52d5 + ENV.append "LDFLAGS", "-Wl,-no_deduplicate" if DevelopmentTools.clang_build_version >= 1600 + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + args = %W[ + -DCMAKE_INSTALL_SYSCONFDIR=#{etc} + -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} + -DENABLE_DIST=ON + -DCURL_ROOT=#{Formula["curl"].opt_prefix} + -DCURL_ROOT_DIR=#{Formula["curl"].opt_prefix} + -DICU_ROOT=#{icu4c.opt_prefix} + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DREADLINE_ROOT=#{Formula["readline"].opt_prefix} + -DENABLE_BUNDLED_LIBCURL=OFF + -DENABLE_BUNDLED_LIBUNWIND=OFF + -DENABLE_BUNDLED_LIBYAML=OFF + -DENABLE_BUNDLED_ZSTD=OFF + -DLUAJIT_NO_UNWIND=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"lib/tarantool").mkpath + (var/"log/tarantool").mkpath + (var/"run/tarantool").mkpath + end + + test do + (testpath/"test.lua").write <<~LUA + box.cfg{} + local s = box.schema.create_space("test") + s:create_index("primary") + local tup = {1, 2, 3, 4} + s:insert(tup) + local ret = s:get(tup[1]) + if (ret[3] ~= tup[3]) then + os.exit(-1) + end + os.exit(0) + LUA + system bin/"tarantool", "#{testpath}/test.lua" + end +end diff --git a/Formula/t/tarlz.rb b/Formula/t/tarlz.rb new file mode 100644 index 0000000000000..ed96b65285399 --- /dev/null +++ b/Formula/t/tarlz.rb @@ -0,0 +1,51 @@ +class Tarlz < Formula + desc "Data compressor" + homepage "https://www.nongnu.org/lzip/tarlz.html" + url "https://download.savannah.gnu.org/releases/lzip/tarlz/tarlz-0.28.1.tar.lz" + mirror "https://download-mirror.savannah.gnu.org/releases/lzip/tarlz/tarlz-0.28.1.tar.lz" + sha256 "ab3c92b7f7f10c9539bc7be691fba648af21d4c89e55d81ec66d761f8dd8b5a9" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/tarlz/" + regex(/href=.*?tarlz[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "75626336deac9be501e32bfe2f05fc391b56ef668cc6674da26a0dfdcca6ed88" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6ad4e0ffe9444a31b9dd00c618834f3929a075849575310215035d689fbac9c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93ed3e0ca784a60679dec53ce55dc8948b81bb677fe5cd91d7f7847dc602577f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe03db2f1b10579d8ff7bbc962ab84351ea9299d9b19ae65550c9fe799fca8f3" + sha256 cellar: :any_skip_relocation, sonoma: "8dc7b46bdef760864e10f7922512fe8b4922cb196443488355f2fb1be31b6304" + sha256 cellar: :any_skip_relocation, ventura: "8bc7f3fcd10fafbd3f675688a34db7590539b7ea40f51202febedbb253e1ed7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c6814a91403d1f9b976d9b803497b997fdb857aa2f25a4682d5a231b4353b3a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a7dead1614f09e2a87c8f2cfd49baa970780b82b228f07bfd9dffe45ed84ef7" + end + + depends_on "lzlib" + + def install + system "./configure", *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + spath = testpath/"source" + dpath = testpath/"destination" + stestfilepath = spath/"test.txt" + dtestfilepath = dpath/"source/test.txt" + lzipfilepath = testpath/"test.tar.lz" + stestfilepath.write "TEST CONTENT" + + mkdir_p spath + mkdir_p dpath + + system bin/"tarlz", "-C", testpath, "-cf", lzipfilepath, "source" + assert_path_exists lzipfilepath + + system bin/"tarlz", "-C", dpath, "-xf", lzipfilepath + assert_equal "TEST CONTENT", dtestfilepath.read + end +end diff --git a/Formula/t/tarsnap-gui.rb b/Formula/t/tarsnap-gui.rb new file mode 100644 index 0000000000000..b9f981e9c5386 --- /dev/null +++ b/Formula/t/tarsnap-gui.rb @@ -0,0 +1,72 @@ +class TarsnapGui < Formula + desc "Cross-platform GUI for the Tarsnap command-line client" + homepage "https://www.tarsnap.com/" + url "https://github.com/Tarsnap/tarsnap-gui/archive/refs/tags/v1.0.2.tar.gz" + sha256 "3b271f474abc0bbeb3d5d62ee76b82785c7d64145e6e8b51fa7907b724c83eae" + license "BSD-2-Clause" + revision 1 + head "https://github.com/Tarsnap/tarsnap-gui.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "bd02f77a05c961179c8cd9c080367dd5792305a26b840bfb4aa5584dedc267d6" + sha256 cellar: :any, arm64_sequoia: "c9cddf5f7eb1d96d77deabf95a9633bdc7fbc649f8349e6960db1f071346e34a" + sha256 cellar: :any, arm64_sonoma: "219f6ec9f2c36912eaca916110b5ddbb59b7da0285ecee28a73e31023347dad5" + sha256 cellar: :any, arm64_ventura: "4fd9934a3a064497bfcb361b154dccb74c1cf6343d1b0c40080f1b10f7c061ee" + sha256 cellar: :any, arm64_monterey: "80bebc64d5dad7087f331f5c5e1ebecda9d0ca787903bdb9c233220b53400a5d" + sha256 cellar: :any, arm64_big_sur: "5143f6dbbb9fadc47420f18716d62135b3e70c4de32e3cef4338c977f0a2d375" + sha256 cellar: :any, sonoma: "0bcca07b474c99ee8db92f57a79d5fcff7efd952a5833fca445863a5d099d60b" + sha256 cellar: :any, ventura: "b16373c9282a6fc51a9d7e901a082fd287939ce043b19075f09a4f8b67568823" + sha256 cellar: :any, monterey: "d46639aead1bc9920510f83bb88ca30f6fc58c82235dc4f04037b460582139d6" + sha256 cellar: :any, big_sur: "5b913f4a300a6694e27a950a473da438dfa2846461466ae0aabc0bee09d2d431" + sha256 cellar: :any, catalina: "f36b378d5ebee2accc759ec58bd8e554389d606ac7c8b7cf9042ae830b96bc01" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc5bf08c24dc5dc1a85d550744ff823086e32076300936f9462ca6b0857db88f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97b8a8c25cd8383218b698725c2a88cbdb55f161188de94df95406514573d34c" + end + + # Last release on 2018-08-23 + # Can undeprecate if new release with Qt 6 support is available. + deprecate! date: "2026-05-19", because: "needs end-of-life Qt 5" + + depends_on "qt@5" + depends_on "tarsnap" + + # Work around build error: Set: Entry, ":CFBundleGetInfoString", Does Not Exist + # Issue ref: https://github.com/Tarsnap/tarsnap-gui/issues/557 + patch :DATA + + def install + system "qmake" + system "make" + if OS.mac? + prefix.install "Tarsnap.app" + bin.install_symlink prefix/"Tarsnap.app/Contents/MacOS/Tarsnap" => "tarsnap-gui" + else + bin.install "tarsnap-gui" + end + end + + test do + # Set QT_QPA_PLATFORM to minimal to avoid error "could not connect to display" + ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + system bin/"tarsnap-gui", "--version" + end +end + +__END__ +diff --git a/Tarsnap.pro b/Tarsnap.pro +index 9954fc5c..560621b1 100644 +--- a/Tarsnap.pro ++++ b/Tarsnap.pro +@@ -131,5 +131,8 @@ osx { + + # Add VERSION to the app bundle. (Why doesn't qmake do this?) + INFO_PLIST_PATH = $$shell_quote($${OUT_PWD}/$${TARGET}.app/Contents/Info.plist) +- QMAKE_POST_LINK += /usr/libexec/PlistBuddy -c \"Set :CFBundleGetInfoString $${VERSION}\" $${INFO_PLIST_PATH} ; ++ QMAKE_POST_LINK += /usr/libexec/PlistBuddy \ ++ -c \"Add :CFBundleVersionString string $${VERSION}\" \ ++ -c \"Add :CFBundleShortVersionString string $${VERSION}\" \ ++ $${INFO_PLIST_PATH} ; + } diff --git a/Formula/t/tarsnap.rb b/Formula/t/tarsnap.rb new file mode 100644 index 0000000000000..d3af6d7d15b48 --- /dev/null +++ b/Formula/t/tarsnap.rb @@ -0,0 +1,57 @@ +class Tarsnap < Formula + desc "Online backups for the truly paranoid" + homepage "https://www.tarsnap.com/" + url "https://www.tarsnap.com/download/tarsnap-autoconf-1.0.41.tgz" + sha256 "bebdbe1e6e91233755beb42ef0b4adbefd9573455258f009fb331556c799b3d0" + license "0BSD" + + livecheck do + url "https://www.tarsnap.com/download.html" + regex(/href=.*?tarsnap-autoconf[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0a6fa3ce87975086eb2327e182c9e667c26f7b108ca55fae07d1395c234fcb41" + sha256 cellar: :any, arm64_sequoia: "78007da0922ad1bb06ec75c05b9306fa3a52937245371c53e325c840f7f00891" + sha256 cellar: :any, arm64_sonoma: "12b7762dc18b71cd86b9bf7aa12fe0a4cbb4f4537e4072e66482039a7744cb06" + sha256 cellar: :any, arm64_ventura: "7baebf33f0670c8fd4e3788599fa28a10c83a4be7ea0ddc1538cd48d68d58067" + sha256 cellar: :any, sonoma: "02a5c3c5a3c09a084eb4941fdc6cb74428011200705656ebae06386e92244f81" + sha256 cellar: :any, ventura: "a79d0a85059b11a514f05fcb0ae86faab0758983f2aa3280144761cfa1506f19" + sha256 cellar: :any_skip_relocation, arm64_linux: "668e24f0f0c50a92bc5a6800d3e74c5b162b51b3ced6e18b5cd9dd7570c2b89d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e00f951a9e99d1456f080c90c3a9bdbfedda1b04af93317daa3c67a71613cf4e" + end + + head do + url "https://github.com/Tarsnap/tarsnap.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "e2fsprogs" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + args = %W[ + --disable-silent-rules + --sysconfdir=#{etc} + --with-bash-completion-dir=#{bash_completion} + --without-lzma + --without-lzmadec + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"tarsnap", "-c", "--dry-run", testpath + end +end diff --git a/Formula/t/tarsnapper.rb b/Formula/t/tarsnapper.rb new file mode 100644 index 0000000000000..bafd79a6f9a4c --- /dev/null +++ b/Formula/t/tarsnapper.rb @@ -0,0 +1,63 @@ +class Tarsnapper < Formula + include Language::Python::Virtualenv + + desc "Tarsnap wrapper which expires backups using a gfs-scheme" + homepage "https://github.com/miracle2k/tarsnapper" + url "https://files.pythonhosted.org/packages/4e/c5/0a08950e5faba96e211715571c68ef64ee37b399ef4f0c4ab55e66c3c4fe/tarsnapper-0.5.0.tar.gz" + sha256 "b129b0fba3a24b2ce80c8a2ecd4375e36b6c7428b400e7b7ab9ea68ec9bb23ec" + license "BSD-2-Clause" + revision 1 + + bottle do + rebuild 8 + sha256 cellar: :any, arm64_tahoe: "32c13f98b225238a1c36beb4aea44cc7aa9fc5f0ea6916836e9f24c9009a759a" + sha256 cellar: :any, arm64_sequoia: "aede490b7d29991225df23efd94e0c740fc0a179b2625a54e026865ac4916f78" + sha256 cellar: :any, arm64_sonoma: "4a553095ec22748abec5bdab416bd67fc74865d373b20d36befb36afe40ba08f" + sha256 cellar: :any, sonoma: "4368cf715ad3a98e93ae54bcd6df1532199927753a4bb5915155141a183ea5a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a08f2b3ac06f061600d9a402ac6ffca74de70f9e973699fbf14e9f3dfaa7a08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba5eacaf4328d52c8277a96a4befdcac0570cb99372882717562683797c677c5" + end + + depends_on "libyaml" + depends_on "python@3.14" + depends_on "tarsnap" + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + # Drop unneeded argparse requirement: https://github.com/miracle2k/tarsnapper/pull/72 + patch do + url "https://github.com/miracle2k/tarsnapper/commit/def72ae8499b38ab4726d826d7363490de6564fb.patch?full_index=1" + sha256 "927ff17243b2e751afc7034b059365ca0373db74dcc8d917b8489058a66b2d1c" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "usage: tarsnapper", shell_output("#{bin}/tarsnapper --help") + end +end diff --git a/Formula/t/tart.rb b/Formula/t/tart.rb new file mode 100644 index 0000000000000..c9be90f3b478e --- /dev/null +++ b/Formula/t/tart.rb @@ -0,0 +1,50 @@ +class Tart < Formula + desc "macOS and Linux VMs on Apple Silicon to use in CI and other automations" + homepage "https://tart.run/" + # NOTE: 1.x uses non-open source license + # https://tart.run/blog/2023/02/11/changing-tart-license/ + url "https://github.com/cirruslabs/tart/archive/refs/tags/0.38.0.tar.gz" + sha256 "ca6a46c2373eb9c9e105d2a80229f7cbcdb03d5ce800173ec01b78424f5a5d7f" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4dbd3a34414fec476db6ef5cb18ad889546b730e2f9e449ced3e2b14abd5dd30" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2938ae8b794f0875409753bc21f34b306e4ee39e73157d28fc2b1407b7bd39c1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "be32fd68c2c54a9c874b4278ae8599116c1bb74464c1ae94064097839ae64e09" + end + + # https://tart.run/blog/2023/02/11/changing-tart-license/ + # Original deprecation date: 2024-09-16 + disable! date: "2025-02-28", because: "switched to a DFSG-incompatible license" + + depends_on maximum_macos: [:sonoma, :build] + depends_on "rust" => :build + depends_on xcode: ["14.1", :build] + depends_on arch: :arm64 + depends_on macos: :monterey + depends_on :macos + + uses_from_macos "swift" + + resource "softnet" do + url "https://github.com/cirruslabs/softnet/archive/refs/tags/0.6.2.tar.gz" + sha256 "7f42694b32d7f122a74a771e1f2f17bd3dca020fb79754780fbc17e9abd65bbe" + end + + def install + resource("softnet").stage do + system "cargo", "install", *std_cargo_args + end + system "swift", "build", "--disable-sandbox", "-c", "release" + system "/usr/bin/codesign", "-f", "-s", "-", "--entitlement", "Resources/tart.entitlements", ".build/release/tart" + bin.install ".build/release/tart" + generate_completions_from_executable(bin/"tart", "--generate-completion-script") + end + + test do + ENV["TART_HOME"] = testpath/".tart" + (testpath/"empty.ipsw").write "" + output = shell_output("#{bin}/tart create --from-ipsw #{testpath/"empty.ipsw"} test 2>&1", 1) + assert_match "Unable to load restore image", output + end +end diff --git a/Formula/t/tartufo.rb b/Formula/t/tartufo.rb new file mode 100644 index 0000000000000..c64c37a8c81db --- /dev/null +++ b/Formula/t/tartufo.rb @@ -0,0 +1,68 @@ +class Tartufo < Formula + include Language::Python::Virtualenv + + desc "Searches through git repositories for high entropy strings and secrets" + homepage "https://tartufo.readthedocs.io/en/stable/" + url "https://files.pythonhosted.org/packages/52/70/2e1422e84b1f817cb4f626337a783e44c60d9c4c1ada8c9f1a671afadb33/tartufo-5.0.2.tar.gz" + sha256 "d7f680da7aadc91840d2bde2605a9e71fa635ac1c6ee39490fb11e9a1494ff58" + license "GPL-2.0-only" + head "https://github.com/godaddy/tartufo.git", branch: "main" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "8affda16c621e6df802d498d4293fa69ec1b66e4dc525635f48021fb7e6bbd1e" + end + + depends_on "pygit2" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: "pygit2" + + resource "cached-property" do + url "https://files.pythonhosted.org/packages/61/2c/d21c1c23c2895c091fa7a91a54b6872098fea913526932d21902088a7c41/cached-property-1.5.2.tar.gz" + sha256 "9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + def install + # Unpin python for 3.14: https://github.com/godaddy/tartufo/pull/547 + inreplace "pyproject.toml", 'python = ">=3.8, <3.14"', 'python = ">=3.8"' + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"tartufo", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/tartufo --version") + + output = shell_output("#{bin}/tartufo scan-remote-repo https://github.com/godaddy/tartufo.git") + assert_match "All clear. No secrets detected.", output + end +end diff --git a/Formula/t/task-spooler.rb b/Formula/t/task-spooler.rb new file mode 100644 index 0000000000000..33da534882a9c --- /dev/null +++ b/Formula/t/task-spooler.rb @@ -0,0 +1,37 @@ +class TaskSpooler < Formula + desc "Batch system to run tasks one after another" + homepage "https://viric.name/soft/ts/" + url "https://viric.name/soft/ts/ts-1.0.3.tar.gz" + sha256 "fa833311543dc535b60cb7ab83c64ab5ee31128dbaaaa13dde341984e542b428" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?ts[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "78baa7d9fb718eee974a876fcec66405f2c5ed87f46185fad9387fccf41896ce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec87fc500e93595c87fc6624bd6321ce23f58e72c3b6050992e6d0f0856f24b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f452fc17ad06bee57a2b4ea77cc8f8dc353f75de71ff41220675f1d89db96fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "179ccb94441ab71e1ffbf12b2fbe50b8c74d209cd28f338fdd62afc7ebc73b32" + sha256 cellar: :any_skip_relocation, arm64_monterey: "592a592ddf965521fa01a4733b80524051f29e9edfff2a4d02eb7070d6a674ba" + sha256 cellar: :any_skip_relocation, sonoma: "dc00ccd9f2d7d917d8844ba3a1a83922a308c9c96f606d4ee393994e6c3d5075" + sha256 cellar: :any_skip_relocation, ventura: "0c672767f6d5836e3e544ffe55ea1aaec1e16d3d1b5ff5fa0bbeb9c0f41712e4" + sha256 cellar: :any_skip_relocation, monterey: "085939ebfcf9dd9d12c920e19961dd80e949fe753a0d5ec436fde0ef3769a4c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "601305ac8af305e6660eb7b8326287378d7d0f22ece837f4e8de6359023fda26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e4af081f98757cabedf4d83a4177876f3c363ad5fa89b654b0f43830f0c0be1" + end + + conflicts_with "moreutils", because: "both install a `ts` executable" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"ts", "-l" + end +end diff --git a/Formula/t/task.rb b/Formula/t/task.rb new file mode 100644 index 0000000000000..65cfe5373aec8 --- /dev/null +++ b/Formula/t/task.rb @@ -0,0 +1,55 @@ +class Task < Formula + desc "Feature-rich console based todo list manager" + homepage "https://taskwarrior.org/" + url "https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v3.4.2/task-3.4.2.tar.gz" + sha256 "d302761fcd1268e4a5a545613a2b68c61abd50c0bcaade3b3e68d728dd02e716" + license "MIT" + head "https://github.com/GothenburgBitFactory/taskwarrior.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "cc6340ca46a8ccbc3e2c8712e8ef69faa5cdb328b105d84bd605bb956777eafb" + sha256 arm64_sequoia: "474f4515f109d7ef2b9834d2cebddb06182d3d11c477bae99000d9eb6aa40676" + sha256 arm64_sonoma: "de5f379d7cbf9801583a3dd2a66c953925b7ba2f142ac25e1a959847b605238e" + sha256 sonoma: "3174738a25b98886b22b14bad71b49fdca9c7d0a13157ff695a3e45f1b8efc23" + sha256 arm64_linux: "5dfec83b72433cd1702bf4d9ccae6923547259053d742eb9e954305fea211295" + sha256 x86_64_linux: "0391e1e4292445ce5006a922a5b24b0f25aa41844c6b0626e4a6e96e17df5d52" + end + + depends_on "cmake" => :build + depends_on "corrosion" => :build + depends_on "rust" => :build + + on_linux do + depends_on "readline" + depends_on "util-linux" + end + + conflicts_with "go-task", because: "both install `task` binaries" + + # Fix to not download `corrosion` when `SYSTEM_CORROSION` is turned on + # PR ref: https://github.com/GothenburgBitFactory/taskwarrior/pull/3976 + patch do + url "https://github.com/GothenburgBitFactory/taskwarrior/commit/cd1d184f62ee45fa0030a85ede698b7aed865aa3.patch?full_index=1" + sha256 "a5775db70a678f8d666bd69f31aef0bccb98cf252f15d3d28f05233a6bd3b720" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DSYSTEM_CORROSION=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + bash_completion.install "scripts/bash/task.sh" + zsh_completion.install "scripts/zsh/_task" + fish_completion.install "scripts/fish/task.fish" + end + + test do + touch testpath/".taskrc" + system bin/"task", "add", "Write", "a", "test" + assert_match "Write a test", shell_output("#{bin}/task list") + end +end diff --git a/Formula/t/task@2.rb b/Formula/t/task@2.rb new file mode 100644 index 0000000000000..fbac039f0a9a6 --- /dev/null +++ b/Formula/t/task@2.rb @@ -0,0 +1,48 @@ +class TaskAT2 < Formula + desc "Feature-rich console based todo list manager" + homepage "https://taskwarrior.org/" + url "https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v2.6.2/task-2.6.2.tar.gz" + sha256 "b1d3a7f000cd0fd60640670064e0e001613c9e1cb2242b9b3a9066c78862cfec" + license "MIT" + + bottle do + sha256 arm64_sequoia: "f8c1a9cf2878e0f0167b9ec74d1ef1ffb393048efa96309e6c39295e1a83843e" + sha256 arm64_sonoma: "82df1c51fe66c7f8981adea3530dcb68c461a994e4f63eb3010b9478bf66ee76" + sha256 arm64_ventura: "dfbe4a2d59a68aa0a67addcc9ffa8d2fe062f03083f9942c2273617d853e94c3" + sha256 arm64_monterey: "289d6b7e6297a61fd798ead189573672163738ff9b48d3f27cfba6bc2e251463" + sha256 sonoma: "d3be3340c35f266904599c9a3927323f02c797cb15c977af12e2f09658c3eb54" + sha256 ventura: "4e3710bd68b073e6bd7053dddeebda5dbbbd263b97314a11bd989cd306ac6fe1" + sha256 monterey: "b7aff94161fa64605d6738d900c671f6d6c56fabdb916669ba2637421b4d8319" + sha256 arm64_linux: "520281ca177683c84f7fda4f0832c59224fdd0df9e0fa6f82cad87a0c788e8e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a1030f03e0e5ec13e4111be5eb28369bf81d84df3690614c422c33ca3076ff7" + end + + keg_only :versioned_formula + + disable! date: "2025-04-30", because: :unmaintained + + depends_on "cmake" => :build + depends_on "gnutls" + + on_linux do + depends_on "linux-headers@5.15" => :build + depends_on "readline" + depends_on "util-linux" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bash_completion.install "scripts/bash/task.sh" => "task" + zsh_completion.install "scripts/zsh/_task" + fish_completion.install "scripts/fish/task.fish" + end + + test do + touch testpath/".taskrc" + system bin/"task", "add", "Write", "a", "test" + assert_match "Write a test", shell_output("#{bin}/task list") + end +end diff --git a/Formula/t/taskd.rb b/Formula/t/taskd.rb new file mode 100644 index 0000000000000..13b59cebb4de0 --- /dev/null +++ b/Formula/t/taskd.rb @@ -0,0 +1,42 @@ +class Taskd < Formula + desc "Client-server synchronization for todo lists" + homepage "https://taskwarrior.org/docs/taskserver/setup.html" + url "https://github.com/GothenburgBitFactory/taskserver/releases/download/v1.1.0/taskd-1.1.0.tar.gz" + sha256 "7b8488e687971ae56729ff4e2e5209ff8806cf8cd57718bfd7e521be130621b4" + license "MIT" + revision 1 + head "https://github.com/GothenburgBitFactory/taskserver.git", branch: "1.2.0" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "61cffe43c79c6f9b87120529a75db6303a304526f47426999b22a3115418ee7a" + sha256 cellar: :any, arm64_sonoma: "e3bb75dc9d5d281fcdd7a9eb5604d5d17f36791458bf69c91a88403c385913f3" + sha256 cellar: :any, arm64_ventura: "dff5f74888539c8a37113ff4f0cdb5c4753a6bcfd8cba312978eada666286b6e" + sha256 cellar: :any, arm64_monterey: "d965204a53afd9cb1f71824fffda964a63ca016560d31d8eabe7d1e2d87f804a" + sha256 cellar: :any, sonoma: "f95e28f8daaea0136706ae30efc5c12afcae319e8ee29de57318977f30d3d118" + sha256 cellar: :any, ventura: "1654093173dc0c9e2fba9bc9be2a50d28fe437f9332f853b54c4b3cf503b6eae" + sha256 cellar: :any, monterey: "a0131221a82276fc6feb0bec88b260d6731d346e05c84570b7f8ba376d1714eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d85ff632c1f5b0eb1bddf79925f0ef64bbb38ecfe4d811d4560ee166c461cc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d81536e57b798ded725ca302e02ff8b57e49445b02346508a5a707c925608a8e" + end + + deprecate! date: "2024-07-04", because: :repo_archived + disable! date: "2025-07-07", because: :repo_archived + + depends_on "cmake" => :build + depends_on "gnutls" + + on_linux do + depends_on "util-linux" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"taskd", "init", "--data", testpath + end +end diff --git a/Formula/t/taskell.rb b/Formula/t/taskell.rb new file mode 100644 index 0000000000000..e812570e0e283 --- /dev/null +++ b/Formula/t/taskell.rb @@ -0,0 +1,61 @@ +class Taskell < Formula + desc "Command-line Kanban board/task manager with support for Trello" + homepage "https://taskell.app" + # TODO: Try to switch `ghc@9.2` to `ghc` when a release supports brick>=1 + url "https://github.com/smallhadroncollider/taskell/archive/refs/tags/1.11.4.tar.gz" + sha256 "0d4f3f54fb0b975f969d7ef8a810bbc7a78e0b46aec28cc4cb337ee36e8abdfc" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81cffc6cbe93688273e832ebe73d24f0f0b7e7ba39e6e09cdf22efa8c919c692" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3d4adedf5311251d430126a527c229bc743f7ad10204f953669c46ed1ecb1ae" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e3bddb43e9655602e40fdbdc7152cc34d574d76654410ae2735b02eb66e402f9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0af5900a42ff1461448170364e3f8d7f81f274bb5e44db84779a34f6e76a7e46" + sha256 cellar: :any_skip_relocation, sonoma: "bed386e1f1a69da0821cba2178089929a2fe973017455bcd1e109a5f6339a2d6" + sha256 cellar: :any_skip_relocation, ventura: "d80b3487d9a6f372fe881ab460469daca32287cac49ddce328b794a067cb7c08" + sha256 cellar: :any_skip_relocation, monterey: "b57296655c42311e58057cdd587e579316ee535cbebb25c2e4ea33d2c2ee3141" + sha256 cellar: :any_skip_relocation, big_sur: "5b343d4e8b61335b598fda4c5d07084f7f31186c28212ce70eeee3216f7ceeeb" + sha256 cellar: :any_skip_relocation, catalina: "aa033e92954aee8915a4ede120e11015ce2aaadb9f313bd893656d78f20805ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc781498e466ae79de14896e8e93c63f3492babb46ed0570ec3d3ba2e25b0f8d" + end + + deprecate! date: "2024-04-05", because: :repo_archived + disable! date: "2025-04-08", because: :repo_archived + + depends_on "cabal-install" => :build + depends_on "ghc@9.2" => :build + depends_on "hpack" => :build + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + # Work around build failure from Brick v1 API. + # src/Taskell.hs:64:13: error: + # Not in scope: 'Brick.continue' + # Module 'Brick' does not export 'continue'. + # Issue ref: https://github.com/smallhadroncollider/taskell/issues/125 + cabal_install_constraints = ["--constraint=brick<1", "--constraint=vty<6"] + + system "hpack" + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args, *cabal_install_constraints + end + + test do + (testpath/"test.md").write <<~MARKDOWN + ## To Do + + - A thing + - Another thing + MARKDOWN + + expected = <<~EOS + test.md + Lists: 1 + Tasks: 2 + EOS + + assert_match expected, shell_output("#{bin}/taskell -i test.md") + end +end diff --git a/Formula/t/taskflow.rb b/Formula/t/taskflow.rb new file mode 100644 index 0000000000000..82268eb64d506 --- /dev/null +++ b/Formula/t/taskflow.rb @@ -0,0 +1,41 @@ +class Taskflow < Formula + desc "General-purpose Task-parallel Programming System using Modern C++" + homepage "https://github.com/taskflow/taskflow" + url "https://github.com/taskflow/taskflow/archive/refs/tags/v3.10.0.tar.gz" + sha256 "fe86765da417f6ceaa2d232ffac70c9afaeb3dc0816337d39a7c93e39c2dee0b" + license "MIT" + head "https://github.com/taskflow/taskflow.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "19f3e408df4d63fc9360f3a8606b266c64788765291fd5ee92cba91c6d6f4c29" + end + + depends_on "cmake" => :build + depends_on "make" => :build + + def install + args = %w[ + -DTF_BUILD_EXAMPLES=OFF + -DTF_BUILD_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + tf::Executor executor; + tf::Taskflow taskflow; + executor.run(taskflow).wait(); + } + CPP + system ENV.cxx, "test.cpp", "-std=c++20", "-pthread", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/taskline.rb b/Formula/t/taskline.rb new file mode 100644 index 0000000000000..957a415de3e3a --- /dev/null +++ b/Formula/t/taskline.rb @@ -0,0 +1,42 @@ +class Taskline < Formula + desc "Tasks, boards & notes for the command-line habitat" + homepage "https://github.com/perryrh0dan/taskline" + url "https://registry.npmjs.org/@perryrh0dan/taskline/-/taskline-1.6.0.tgz" + sha256 "b27122b0578c6890342ec3742ef14f89aca4315853282f982c1b6dad6b6faba2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d576ef1ca2c0ee5e1ced0ad1b08e0222452947519a8bcdf4e21da04c0be262d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d576ef1ca2c0ee5e1ced0ad1b08e0222452947519a8bcdf4e21da04c0be262d4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d576ef1ca2c0ee5e1ced0ad1b08e0222452947519a8bcdf4e21da04c0be262d4" + sha256 cellar: :any_skip_relocation, sonoma: "d576ef1ca2c0ee5e1ced0ad1b08e0222452947519a8bcdf4e21da04c0be262d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f337709b217bdd3a8e7a82e6f352908a812dec109976faf6ad1fc8eca8e4609f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f337709b217bdd3a8e7a82e6f352908a812dec109976faf6ad1fc8eca8e4609f" + end + + depends_on "node" + + on_linux do + depends_on "xsel" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + clipboardy_fallbacks_dir = libexec/"lib/node_modules/@perryrh0dan/#{name}/node_modules/clipboardy/fallbacks" + rm_r(clipboardy_fallbacks_dir) # remove pre-built binaries + if OS.linux? + linux_dir = clipboardy_fallbacks_dir/"linux" + linux_dir.mkpath + # Replace the vendored pre-built xsel with one we build ourselves + ln_sf (Formula["xsel"].opt_bin/"xsel").relative_path_from(linux_dir), linux_dir + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/tl --version") + + assert_match "Available Boards:", shell_output("#{bin}/tl boards") + end +end diff --git a/Formula/t/taskopen.rb b/Formula/t/taskopen.rb new file mode 100644 index 0000000000000..7239d9f547132 --- /dev/null +++ b/Formula/t/taskopen.rb @@ -0,0 +1,40 @@ +class Taskopen < Formula + desc "Tool for taking notes and open urls with taskwarrior" + homepage "https://github.com/jschlatow/taskopen" + url "https://github.com/jschlatow/taskopen/archive/refs/tags/v2.0.2.tar.gz" + sha256 "249cce42ac427376a8909e81e49f2d2ba0e79d29b9f83224560cb45df8b7d31c" + license "GPL-2.0-only" + head "https://github.com/jschlatow/taskopen.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ba5315263677626560719cf9b4936356ea4e097211a40863d8ce055e09f0dada" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5f5c99069492f89ba1914486b47319087cadb8cfdf6f01ee6916e54253ca18c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9d13f19de0ae93c8fb39013f97cf6f15746119abfa12dad2b3bf32c0d71960d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2655a0cca3da272aafa320a8ba8e194db08bb9b43fa8beb8c8c5fde23cafca73" + sha256 cellar: :any_skip_relocation, sonoma: "9fdaabc629647d5636b4546ef9f9ba9eb0c2a7302757b35fbc17ab515e8a508a" + sha256 cellar: :any_skip_relocation, ventura: "1d74f583708153e1e0ba9887a202c9213c8c67920ada59ac846aa32ed284544f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1fd23bf1717a925c9a112ca24740edecc4087709e05c577837cced58948994a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae7f9a63cc6b29145c0539b67631464262aaf2088de11d9fe071060bdd500da2" + end + + depends_on "nim" => :build + depends_on "task" + + def install + system "make", "install", "PREFIX=#{prefix}", "VERSION=#{version}" + end + + test do + touch testpath/".taskrc" + touch testpath/".taskopenrc" + + system "task", "add", "BrewTest" + system "task", "1", "annotate", "Notes" + + assert_match <<~EOS, shell_output("#{bin}/taskopen diagnostics") + Taskopen: #{version} + Taskwarrior: #{Formula["task"].version} + Configuration: #{testpath}/.taskopenrc + EOS + end +end diff --git a/Formula/t/tasksh.rb b/Formula/t/tasksh.rb new file mode 100644 index 0000000000000..33915e49caedf --- /dev/null +++ b/Formula/t/tasksh.rb @@ -0,0 +1,55 @@ +class Tasksh < Formula + desc "Shell wrapper for Taskwarrior commands" + homepage "https://github.com/GothenburgBitFactory/taskshell" + url "https://github.com/GothenburgBitFactory/taskshell/releases/download/v1.2.0/tasksh-1.2.0.tar.gz" + sha256 "6e42f949bfd7fbdde4870af0e7b923114cc96c4344f82d9d924e984629e21ffd" + license "MIT" + revision 1 + head "https://github.com/GothenburgBitFactory/taskshell.git", branch: "master" + + livecheck do + url "https://gothenburgbitfactory.org" + regex(/href=.*?tasksh[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0b87af510cb7ba2daf5c1bc8b21d17c30a9ba43512dcc180beed93d9a8cda5bd" + sha256 cellar: :any, arm64_sequoia: "71cf7963bf3f6eab310007ab05aafb9be4e4c766f6446f79671073cc7100a83f" + sha256 cellar: :any, arm64_sonoma: "e03ada11df6af02686b40955cd55f00851e00ec558cbedd71bf84c1ed5098b94" + sha256 cellar: :any, arm64_ventura: "1a8bbc54e5712ab5b9caa686e6348365da4c8bdaebeaae474be2edda28368d72" + sha256 cellar: :any, arm64_monterey: "6c6390a79e5f4645f2cf2507a1c29ad1b935a5f51d87387412e557343688a11d" + sha256 cellar: :any, arm64_big_sur: "590c43b791080cc6ca56cef896c9e75a8ca77915b061a1d0a711a0489e69ab63" + sha256 cellar: :any, sonoma: "fc26e6d677232268991d4926c4c2e5f13f839918be416b4675326d227f4fc1ac" + sha256 cellar: :any, ventura: "d0a97986a19732ce4d3818c5b452f6ce636ce957e401350cade47190e5b7b2e0" + sha256 cellar: :any, monterey: "778d32859e2a65b224819a39d022611b7959fba4d72d08a45d42f76bf6cf6cf8" + sha256 cellar: :any, big_sur: "987789014e770fb3b4b1d4500321877c457ba2a1dde2fc9925762dfb0d7da541" + sha256 cellar: :any, catalina: "68a13aa8ea81fd1fe7c2c5e9eadd3850fe21265b34c4cf2f1cf7e7ede3caeaee" + sha256 cellar: :any_skip_relocation, arm64_linux: "c18914e24a50c9ea3489db09b04c7d702555bc703bb799ff51244419135f5bca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8a89402e614a9f93aa6716e6b4c442b44f2f0471c0d8534096ee8428565a149" + end + + depends_on "cmake" => :build + depends_on "readline" # Possible opportunistic linkage. TODO: Check if this can be removed. + depends_on "task" + + on_linux do + depends_on "readline" + end + + def install + # Workaround for CMake 4 compatibility + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"tasksh", "--version" + (testpath/".taskrc").write "data.location=#{testpath}/.task\n" + assert_match "Created task 1.", pipe_output(bin/"tasksh", "add Test Task", 0) + end +end diff --git a/Formula/t/taskwarrior-tui.rb b/Formula/t/taskwarrior-tui.rb new file mode 100644 index 0000000000000..1d597a5d11b0e --- /dev/null +++ b/Formula/t/taskwarrior-tui.rb @@ -0,0 +1,41 @@ +class TaskwarriorTui < Formula + desc "Terminal user interface for taskwarrior" + homepage "https://kdheepak.com/taskwarrior-tui/" + url "https://github.com/kdheepak/taskwarrior-tui/archive/refs/tags/v0.26.4.tar.gz" + sha256 "064ab8a4a7f057ed00a6cf061bf124607d5b4812fce145fd60efa7315c765625" + license "MIT" + head "https://github.com/kdheepak/taskwarrior-tui.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d8656e616b9620edb3913d44f735f64c9dd0dd11a4081a2626fe63b870718529" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4783503eeb0862c5afd092060312490f63f1df82a0d5150d7f8763deee220a1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59163fdd5bfadd3f071a0dfe9323d4f53302edde36018a142aaf96dc369ce3a9" + sha256 cellar: :any_skip_relocation, sonoma: "1ac3c7628ba3bc1595f3b4de4354b7a48df50fff065aef9162cc1f02f50eeb65" + sha256 cellar: :any_skip_relocation, arm64_linux: "831ba8c0d9f38f98ee43ba9b453646505019790c162dd7639aab5a71ff18416f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf53d6f867842191056512d1900734fd848cafc662f6d866c9ae55ee5b77c6d1" + end + + depends_on "rust" => :build + depends_on "task" + + def install + system "cargo", "install", *std_cargo_args + man1.install "docs/taskwarrior-tui.1" + bash_completion.install "completions/taskwarrior-tui.bash" => "taskwarrior-tui" + fish_completion.install "completions/taskwarrior-tui.fish" + zsh_completion.install "completions/_taskwarrior-tui" + end + + test do + assert_match version.to_s, shell_output("#{bin}/taskwarrior-tui --version") + assert_match "a value is required for '--report ' but none was supplied", + shell_output("#{bin}/taskwarrior-tui --report 2>&1", 2) + end +end diff --git a/Formula/t/tass64.rb b/Formula/t/tass64.rb new file mode 100644 index 0000000000000..816ea43696b4e --- /dev/null +++ b/Formula/t/tass64.rb @@ -0,0 +1,49 @@ +class Tass64 < Formula + desc "Multi pass optimizing macro assembler for the 65xx series of processors" + homepage "https://tass64.sourceforge.net/" + url "https://downloads.sourceforge.net/project/tass64/source/64tass-1.60.3243-src.zip" + sha256 "9d83be3d23a2c55e085b7c7a7856c2f96080447ea120a6a8c21a217ed76427f0" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later", "LGPL-2.1-only", "MIT"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03b1af6642d7196b136bc4b001706670f3c390c8b20c241b257a2d3b06f750be" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d23f98e527d005deb40dd737df7e79ddcaa192953a55effa2fbaa9907b0ce9cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26ba4c9a64c5b1d8aaba7e1c56d886471187bfb5a7bc07a96f1b07c6959a6489" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3bf1f29a383055486a8cdd26b701e4a82b05a948a9416d1547fee27ff1b42377" + sha256 cellar: :any_skip_relocation, sonoma: "507d0e2c74ee13cfdb580822c62d9cd5954b817bb5900e337ea64607c5e1dab1" + sha256 cellar: :any_skip_relocation, ventura: "1a174fd0558e49d58a058ba6359b261bce98721d85d0cac0e212196151cb1f31" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc863e3da3c692f65b8aaa4e941d6b65c70192b2b7f065b2bc4df9011ae69e54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78bccbf88389de622f3d3aaee67eb4c065904c84aa87bc74b62a8ae17aa53012" + end + + def install + system "make", "install", "CPPFLAGS=-D_XOPEN_SOURCE", "prefix=#{prefix}" + + # `make install` does not install syntax highlighting definitions + pkgshare.install "syntax" + end + + test do + (testpath/"hello.asm").write <<~'ASM' + ;; Simple "Hello World" program for C64 + *=$c000 + LDY #$00 + L0 + LDA L1,Y + CMP #0 + BEQ L2 + JSR $FFD2 + INY + JMP L0 + L1 + .text "HELLO WORLD",0 + L2 + RTS + ASM + + system bin/"64tass", "-a", "hello.asm", "-o", "hello.prg" + assert_path_exists testpath/"hello.prg" + end +end diff --git a/Formula/t/taze.rb b/Formula/t/taze.rb new file mode 100644 index 0000000000000..ca55baf0233fd --- /dev/null +++ b/Formula/t/taze.rb @@ -0,0 +1,36 @@ +class Taze < Formula + desc "Modern cli tool that keeps your deps fresh" + homepage "https://github.com/antfu-collective/taze" + url "https://registry.npmjs.org/taze/-/taze-19.9.0.tgz" + sha256 "14d09cd3dd24edd91929f43388887fe96e948b6e70884461eeaae3e6c14e9dad" + license "MIT" + head "https://github.com/antfu-collective/taze.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "91faaa3adfb15b50c9aeaef32712cc86647bdf8c6afaeced532ec7b914ca958b" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/taze --version") + + (testpath/"package.json").write <<~JSON + { + "name": "brewtest", + "version": "1.0.0", + "dependencies": { + "homebrew-nonexistent": "1.1.0" + } + } + JSON + + output = shell_output("#{bin}/taze 2>&1") + assert_match "Failed to fetch package \"homebrew-nonexistent\"", output + end +end diff --git a/Formula/t/tbb.rb b/Formula/t/tbb.rb new file mode 100644 index 0000000000000..c7757d4849997 --- /dev/null +++ b/Formula/t/tbb.rb @@ -0,0 +1,111 @@ +class Tbb < Formula + desc "Rich and complete approach to parallelism in C++" + homepage "https://uxlfoundation.github.io/oneTBB/" + url "https://github.com/uxlfoundation/oneTBB/archive/refs/tags/v2022.3.0.tar.gz" + sha256 "01598a46c1162c27253a0de0236f520fd8ee8166e9ebb84a4243574f88e6e50a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cc9fcdb5dd902f43174d0da933d9fd5cbefbc0a64782564b5b8193abc627ec0f" + sha256 cellar: :any, arm64_sequoia: "c15f3cd373ecc7ce5187734d1c93ff10dd22e83ba7b4e67010ec65052649bab6" + sha256 cellar: :any, arm64_sonoma: "6c12a8bf6407d61c277c7f99638af11c5600ec21af20f43319f49c4bb2fb69b9" + sha256 cellar: :any, sonoma: "8a759acc184a76c75165db15bd39903332e980221963da164b8a0356780acfcd" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cac87ad2e8f4fbf64aea23ea3ed64a54b8df675102b3013a09407ea0f43fb0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8e86274bf47f0546c742ffbd718b78c83703e3d6f8a2cd33ca7bd93c34b9291" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "swig" => :build + depends_on "hwloc" + + def python3 + "python3.14" + end + + def install + # Prevent `setup.py` from installing tbb4py as a deprecated egg directly into HOMEBREW_PREFIX. + # We need this due to our Python patch. + site_packages = Language::Python.site_packages(python3) + inreplace "python/CMakeLists.txt", + "install --prefix build -f", + "\\0 --install-lib build/#{site_packages} --single-version-externally-managed --record=RECORD" + + tbb_site_packages = prefix/site_packages/"tbb" + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath},-rpath,#{rpath(source: tbb_site_packages)}" + + args = %W[ + -DTBB_TEST=OFF + -DTBB4PY_BUILD=ON + -DPYTHON_EXECUTABLE=#{which(python3)} + ] + + system "cmake", "-S", ".", "-B", "build/shared", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *args, *std_cmake_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", ".", "-B", "build/static", + "-DBUILD_SHARED_LIBS=OFF", + *args, *std_cmake_args + system "cmake", "--build", "build/static" + lib.install buildpath.glob("build/static/*/libtbb*.a") + end + + test do + # The glob that installs these might fail, + # so let's check their existence. + assert_path_exists lib/"libtbb.a" + assert_path_exists lib/"libtbbmalloc.a" + + (testpath/"cores-types.cpp").write <<~CPP + #include + #include + + int main() { + const auto numa_nodes = tbb::info::numa_nodes(); + const auto size = numa_nodes.size(); + const auto type = numa_nodes.front(); + return size != 1 || type != tbb::task_arena::automatic ? EXIT_SUCCESS : EXIT_FAILURE; + } + CPP + + system ENV.cxx, "cores-types.cpp", "-std=c++14", "-DTBB_PREVIEW_TASK_ARENA_CONSTRAINTS_EXTENSION=1", + "-L#{lib}", "-ltbb", "-o", "core-types" + system "./core-types" + + (testpath/"sum1-100.cpp").write <<~CPP + #include + #include + #include + + int main() + { + auto total = tbb::parallel_reduce( + tbb::blocked_range(0, 100), + 0.0, + [&](tbb::blocked_range r, int running_total) + { + for (int i=r.begin(); i < r.end(); ++i) { + running_total += i + 1; + } + + return running_total; + }, std::plus() + ); + + std::cout << total << std::endl; + return 0; + } + CPP + + system ENV.cxx, "sum1-100.cpp", "-std=c++14", "-L#{lib}", "-ltbb", "-o", "sum1-100" + assert_equal "5050", shell_output("./sum1-100").chomp + + system python3, "-c", "import tbb" + end +end diff --git a/Formula/t/tbls.rb b/Formula/t/tbls.rb new file mode 100644 index 0000000000000..53ab7b221c3fe --- /dev/null +++ b/Formula/t/tbls.rb @@ -0,0 +1,36 @@ +class Tbls < Formula + desc "CI-Friendly tool to document a database" + homepage "https://github.com/k1LoW/tbls" + url "https://github.com/k1LoW/tbls/archive/refs/tags/v1.91.2.tar.gz" + sha256 "764010e6a2c8d8121170dc5617d7acbcb8cbcb37a5e2c403db475d84f2b11cf9" + license "MIT" + head "https://github.com/k1LoW/tbls.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e624a27800b30b06f69105962c69e9409c8afe18722047dc7d1d1799af7199ea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41371010ea04aa78835b638d7776bdc258aa509554b6c6bab7b23b2e262b3a57" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "009bc8d85e7546e89948422f374de195bc293cbb8ee868622f3325f63ba083a9" + sha256 cellar: :any_skip_relocation, sonoma: "cf4d0c1e9ef4d922a4b395212e8d297a7fcd7ddefa1e611ceae9fe1c23419180" + sha256 cellar: :any_skip_relocation, arm64_linux: "34393a7b6edb9adbf4dbbc2cf1cdb0578cf2deb1bd3df5393ad6a55443fa2024" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bef0ac9c6ba7bd01666f59f16fb79394374445ddd8a0fc6853b96f6fef579de" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/k1LoW/tbls.version=#{version} + -X github.com/k1LoW/tbls.date=#{time.iso8601} + -X github.com/k1LoW/tbls/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"tbls", "completion") + end + + test do + assert_match "unsupported driver", shell_output("#{bin}/tbls doc", 1) + assert_match version.to_s, shell_output("#{bin}/tbls version") + end +end diff --git a/Formula/t/tbox.rb b/Formula/t/tbox.rb new file mode 100644 index 0000000000000..2a955144cb740 --- /dev/null +++ b/Formula/t/tbox.rb @@ -0,0 +1,47 @@ +class Tbox < Formula + desc "Glib-like multi-platform C library" + homepage "https://github.com/tboox/tbox" + url "https://github.com/tboox/tbox/archive/refs/tags/v1.7.7.tar.gz" + sha256 "ae387dcf1952aca572516bdce4a47d04e9b411f5bf7add281247af7c874f3c3f" + license "Apache-2.0" + head "https://github.com/tboox/tbox.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c0157e36f3c03a6cdaf4e17b60320650aed9d99398404ca6d894c714f0b44631" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6e4af286a06c7866122031814f6a626582ab9547e98e475ab98eaf6ea86189f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71ed8833a338308bf58f3be6ee12841e046a381cae5850a54c5ea8b863f8c28d" + sha256 cellar: :any_skip_relocation, sonoma: "9711d7ffe9e3d9aff25a4fe4fcd8c00561abafce8165dbd12a74278c3eafa82a" + sha256 cellar: :any_skip_relocation, arm64_linux: "3efecca9ec4ddd248669af677d411d92f4492614f21c3369f6b34bf4ecb7b446" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9ac90346db19743ecd7dc455f60b18c8dda35bb4d3be669811112be1b515f31" + end + + depends_on "xmake" => :build + + def install + system "xmake", "config", "--charset=y", "--demo=n", "--small=y", "--xml=y" + system "xmake" + system "xmake", "install", "-o", prefix + end + + test do + (testpath/"test.c").write <<~C + #include + int main() + { + if (tb_init(tb_null, tb_null)) + { + tb_trace_i("hello tbox!"); + tb_exit(); + } + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ltbox", "-lm", "-pthread", "-o", "test" + assert_equal "hello tbox!\n", shell_output("./test") + end +end diff --git a/Formula/t/tcc.rb b/Formula/t/tcc.rb new file mode 100644 index 0000000000000..e96730b63d2fb --- /dev/null +++ b/Formula/t/tcc.rb @@ -0,0 +1,71 @@ +class Tcc < Formula + desc "Tiny C compiler" + homepage "https://bellard.org/tcc/" + license "LGPL-2.0-or-later" + revision 1 + head "https://repo.or.cz/tinycc.git", branch: "mob" + + stable do + url "https://download.savannah.nongnu.org/releases/tinycc/tcc-0.9.27.tar.bz2" + sha256 "de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c" + + depends_on arch: :x86_64 + # Big Sur and later are not supported + # http://savannah.nongnu.org/bugs/?59640 + depends_on maximum_macos: :catalina + end + + livecheck do + url "https://download.savannah.nongnu.org/releases/tinycc/" + regex(/href=.*?tcc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 catalina: "68930891a8746b34b372ecfe43a6a042d0097414713c831353a095135d7b9569" + sha256 x86_64_linux: "053f79a5752554e18ecba168184e48481bce8a2db418a3f9b0de094f9e6d0e4d" + end + + # Last release on 2017-12-17 and currently only builds on single runner (x86_64 linux). + # The HEAD mob branch unmoderated so not ideal to use an arbitrary commit. + deprecate! date: "2025-09-16", because: :unsupported + + def install + # Add appropriate include paths for macOS or Linux. + os_include_path = if OS.mac? + MacOS.sdk_path/"usr/include" + else + "/usr/include:/usr/include/x86_64-linux-gnu" + end + + args = %W[ + --prefix=#{prefix} + --source-path=#{buildpath} + --sysincludepaths=#{HOMEBREW_PREFIX}/include:#{os_include_path}:{B}/include + --enable-cross + ] + args << "--cc=#{ENV.cc}" if build.head? + + ENV.deparallelize + system "./configure", *args + + make_args = [] + make_args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" if OS.mac? + + system "make", *make_args + system "make", "install" + end + + test do + (testpath/"hello-c.c").write <<~C + #include + int main() + { + puts("Hello, world!"); + return 0; + } + C + assert_equal "Hello, world!\n", shell_output("#{bin}/tcc -run hello-c.c") + end +end diff --git a/Formula/t/tccutil.rb b/Formula/t/tccutil.rb new file mode 100644 index 0000000000000..98fa6f47ae7e3 --- /dev/null +++ b/Formula/t/tccutil.rb @@ -0,0 +1,40 @@ +class Tccutil < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Utility to modify the macOS Accessibility Database (TCC.db)" + homepage "https://github.com/jacobsalmela/tccutil" + url "https://github.com/jacobsalmela/tccutil/archive/refs/tags/v1.5.1.tar.gz" + sha256 "37c0d87bf95ab750806c4807003b44f0dc9574ef08ff480ffbb982caa9d8c7c7" + license "GPL-2.0-or-later" + head "https://github.com/jacobsalmela/tccutil.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "973aa0820d9a988f0b53b060af19dabd769782101c73c073ca218ee75ef98457" + end + + depends_on :macos + depends_on "python@3.14" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def python3 + which("python3.14") + end + + def install + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), "tccutil.py" + bin.install "tccutil.py" => "tccutil" + end + + test do + assert_match "Unrecognized command \"check\"", shell_output("#{bin}/tccutil check 2>&1") + assert_match "tccutil #{version}", shell_output("#{bin}/tccutil --version") + end +end diff --git a/Formula/t/tcl-tk.rb b/Formula/t/tcl-tk.rb new file mode 100644 index 0000000000000..317d461ce5197 --- /dev/null +++ b/Formula/t/tcl-tk.rb @@ -0,0 +1,220 @@ +class TclTk < Formula + desc "Tool Command Language" + homepage "https://www.tcl-lang.org" + url "https://downloads.sourceforge.net/project/tcl/Tcl/9.0.2/tcl9.0.2-src.tar.gz" + mirror "https://fossies.org/linux/misc/tcl9.0.2-src.tar.gz" + sha256 "e074c6a8d9ba2cddf914ba97b6677a552d7a52a3ca102924389a05ccb249b520" + license "TCL" + + livecheck do + url :stable + regex(%r{url=.*?/(?:tcl|tk).?v?(\d+(?:\.\d+)+)[._-]src\.t}i) + end + + bottle do + rebuild 2 + sha256 arm64_tahoe: "b631e4d2682c782a22c063a0263ae099c3f8239e35a38ea492f7ee9da711f3a5" + sha256 arm64_sequoia: "e019a7b2e5d62f7533c9b23627c2da661ffccec2a2f9afa056e7d558f7128aeb" + sha256 arm64_sonoma: "305a01bf826d8287810ec7cd74f8b28b991ee2efa1377afb7d79a241b77f458a" + sha256 arm64_ventura: "f7203825cf7ab0e9fb018eaad0cfa04f01d11a7b4eb06d4f878af09493bbae70" + sha256 sonoma: "784bbcd50aaf5b38767db343a300dcba115682158ce58bc827458250070782fc" + sha256 ventura: "f575bbed2a3761d5a937f61945c7b9ca809b9eba2d4d953c060b4e93dd7ee888" + sha256 arm64_linux: "2fef2e484f5ad184e862e49d6d7ae7bb56ba13d9c7f05af28e4c44facfd4c5f0" + sha256 x86_64_linux: "6881a0071cbf016fcfee42486e50779950ee5188070f13fe5190e1e252d4431e" + end + + depends_on "libtommath" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "freetype" => :build + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + end + + conflicts_with "page", because: "both install `page` binaries" + conflicts_with "the_platinum_searcher", because: "both install `pt` binaries" + + resource "critcl" do + url "https://github.com/andreas-kupries/critcl/archive/refs/tags/3.3.1.tar.gz" + sha256 "d970a06ae1cdee7854ca1bc571e8b5fe7189788dc5a806bce67e24bbadbe7ae2" + + livecheck do + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + end + + resource "tcllib" do + url "https://downloads.sourceforge.net/project/tcllib/tcllib/2.0/tcllib-2.0.tar.xz" + sha256 "642c2c679c9017ab6fded03324e4ce9b5f4292473b62520e82aacebb63c0ce20" + end + + # There is no tcltls release compatible with TCL 9 and upstream Fossil repo + # added bot check that breaks download so instead track the Debian version. + # TODO: Track official versions once available + # Ref: https://core.tcl-lang.org/tcltls/tktview/f5a0fe8ddf + # Ref: https://sourceforge.net/p/tcl/mailman/tcl-core/thread/eab3a8bf-b846-45ef-a80c-6bc94d6dfe91@elmicron.de/ + resource "tcltls" do + url "https://deb.debian.org/debian/pool/main/t/tcltls/tcltls_1.8.0.orig.tar.gz" + sha256 "720a9e0bed3ba41b1ad141443c8651b7d0dc8fc9087f2077accb1ba9a5736489" + end + + resource "tk" do + url "https://downloads.sourceforge.net/project/tcl/Tcl/9.0.2/tk9.0.2-src.tar.gz" + mirror "https://fossies.org/linux/misc/tk9.0.2-src.tar.gz" + sha256 "76fb852b2f167592fe8b41aa6549ce4e486dbf3b259a269646600e3894517c76" + + livecheck do + formula :parent + end + end + + # "https://downloads.sourceforge.net/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itk%204.1.0/itk4.1.0.tar.gz" + # would cause `bad URI(is not URI?)` error on 12/13 builds + # Also need a newer release than available on SourceForce for TCL 9 + # so we use the GitHub mirror which is easier to access than Fossil + resource "itk4" do + url "https://github.com/tcltk/itk/archive/refs/tags/itk-4-2-3.tar.gz" + version "4.2.3" + sha256 "bc5ed347212fce403e04d3161cd429319af98da47effd3e32e20d2f04293b036" + end + + def install + odie "tk resource needs to be updated" if version != resource("tk").version + + # Remove bundled libraries. Some private headers are still needed + ["compat/zlib", "libtommath"].each do |dir| + (buildpath/dir).find do |path| + rm(path) if path.file? && path.extname != ".h" + end + end + + args = %W[ + --prefix=#{prefix} + --includedir=#{include}/tcl-tk + --mandir=#{man} + --disable-zipfs + --enable-man-suffix + --enable-64bit + ] + + ENV["TCL_PACKAGE_PATH"] = "#{HOMEBREW_PREFIX}/lib" + cd "unix" do + system "./configure", *args, "--with-system-libtommath" + system "make" + system "make", "install" + system "make", "install-private-headers" + bin.install_symlink "tclsh#{version.to_f}" => "tclsh" + end + + # Let tk finds our new tclsh + ENV.prepend_path "PATH", bin + + resource("tk").stage do + cd "unix" do + args << "--enable-aqua=yes" if OS.mac? + system "./configure", *args, "--without-x", "--with-tcl=#{lib}" + system "make" + system "make", "install" + system "make", "install-private-headers" + bin.install_symlink "wish#{version.to_f}" => "wish" + end + end + + resource("critcl").stage do + system bin/"tclsh", "build.tcl", "install" + end + + resource("tcllib").stage do + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + system "make", "critcl" + cp_r "modules/tcllibc", "#{lib}/" + ln_s "#{lib}/tcllibc/macosx-x86_64-clang", "#{lib}/tcllibc/macosx-x86_64" if OS.mac? + end + + resource("tcltls").stage do + system "./configure", "--with-openssl-dir=#{Formula["openssl@3"].opt_prefix}", + "--prefix=#{prefix}", + "--with-tcl=#{lib}", + "--with-tclinclude=#{include}/tcl-tk", + "--includedir=#{include}/tcl-tk", + "--mandir=#{man}" + system "make", "install" + end + + resource("itk4").stage do + itcl_dir = lib.glob("itcl*").last + # Workaround to build non-release tarball by using TEA files from itcl + odie "Update `itk4` build step!" if Pathname("tclconfig").exist? + Pathname.pwd.install_symlink buildpath/"pkgs/#{itcl_dir.basename}/tclconfig" + + args = %W[ + --prefix=#{prefix} + --exec-prefix=#{prefix} + --with-tcl=#{lib} + --with-tclinclude=#{include}/tcl-tk + --with-tk=#{lib} + --with-tkinclude=#{include}/tcl-tk + --with-itcl=#{itcl_dir} + ] + system "./configure", *args + system "make" + system "make", "install" + end + + # Use the sqlite-analyzer formula instead + # https://github.com/Homebrew/homebrew-core/pull/82698 + rm bin/"sqlite3_analyzer" + end + + def caveats + <<~EOS + The sqlite3_analyzer binary is in the `sqlite-analyzer` formula. + EOS + end + + test do + assert_match "#{HOMEBREW_PREFIX}/lib", pipe_output("#{bin}/tclsh", "puts $auto_path\n") + assert_equal "honk", pipe_output("#{bin}/tclsh", "puts honk\n").chomp + + # Fails with: no display name and no $DISPLAY environment variable + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + test_itk = <<~TCL + # Check that Itcl and Itk load, and that we can define, instantiate, + # and query the properties of a widget. + + + # If anything errors, just exit + catch { + package require Itcl + package require Itk + + # Define class + itcl::class TestClass { + inherit itk::Toplevel + constructor {args} { + itk_component add bye { + button $itk_interior.bye -text "Bye" + } + eval itk_initialize $args + } + } + + # Create an instance + set testobj [TestClass .#auto] + + # Check the widget has a bye component with text property "Bye" + if {[[$testobj component bye] cget -text]=="Bye"} { + puts "OK" + } + } + exit + TCL + assert_equal "OK\n", pipe_output("#{bin}/wish", test_itk), "Itk test failed" + end +end diff --git a/Formula/t/tcl-tk@8.rb b/Formula/t/tcl-tk@8.rb new file mode 100644 index 0000000000000..8bc48abf18b3c --- /dev/null +++ b/Formula/t/tcl-tk@8.rb @@ -0,0 +1,194 @@ +class TclTkAT8 < Formula + desc "Tool Command Language" + homepage "https://www.tcl-lang.org" + url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.17/tcl8.6.17-src.tar.gz" + sha256 "a3903371efcce8a405c5c245d029e9f6850258a60fa3761c4d58995610949b31" + license "TCL" + + livecheck do + url :stable + regex(%r{url=.*?/(?:tcl|tk).?v?(8(?:\.\d+)+)[._-]src\.t}i) + end + + bottle do + sha256 arm64_tahoe: "dcb91a0ce161a5de4411a331fbdc0443e010f16e867a26e093583ca0c6b1ebbb" + sha256 arm64_sequoia: "fd1ae557ac59471bc1a6b141a78273fe7b1e2154186c27ef599b508affb8c69f" + sha256 arm64_sonoma: "46cb139db73eab4d113778559f21c7e8c5c3914dbf6524962bd88bf15d3915ae" + sha256 arm64_ventura: "e2f813b5b23dda76c8d961f118a4a77360e72caaab03255c71070dc0649078dc" + sha256 sonoma: "65215a409050220c17bd917ec3738a6b97bd9328848bc289c2b370f25f1c7ee8" + sha256 ventura: "44a8171122f23f667cffea136a25077b952948565eeaa6859809ed70ae128762" + sha256 arm64_linux: "7ec5ecf3c4291c7b56b15aea1ebfb3812de07893579e4135d454ff2443e2d39a" + sha256 x86_64_linux: "86181bc79ec5677dbcf649598e7cecb3760172ec1419caa330ace6f71e29e30f" + end + + keg_only :versioned_formula + + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "freetype" => :build + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + end + + resource "critcl" do + url "https://github.com/andreas-kupries/critcl/archive/refs/tags/3.3.1.tar.gz" + sha256 "d970a06ae1cdee7854ca1bc571e8b5fe7189788dc5a806bce67e24bbadbe7ae2" + end + + resource "tcllib" do + url "https://downloads.sourceforge.net/project/tcllib/tcllib/2.0/tcllib-2.0.tar.xz" + sha256 "642c2c679c9017ab6fded03324e4ce9b5f4292473b62520e82aacebb63c0ce20" + end + + resource "tcltls" do + url "https://core.tcl-lang.org/tcltls/uv/tcltls-1.7.22.tar.gz" + sha256 "e84e2b7a275ec82c4aaa9d1b1f9786dbe4358c815e917539ffe7f667ff4bc3b4" + end + + resource "tk" do + url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.17/tk8.6.17-src.tar.gz" + sha256 "e4982df6f969c08bf9dd858a6891059b4a3f50dc6c87c10abadbbe2fc4838946" + + livecheck do + formula :parent + end + end + + # "https://downloads.sourceforge.net/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itk%204.1.0/itk4.1.0.tar.gz" + # would cause `bad URI(is not URI?)` error on 12/13 builds + resource "itk4" do + url "https://deb.debian.org/debian/pool/main/i/itk4/itk4_4.1.0.orig.tar.gz" + mirror "https://src.fedoraproject.org/lookaside/extras/itk/itk4.1.0.tar.gz/sha512/1deed09daf66ae1d0cc88550be13814edff650f3ef2ecb5ae8d28daf92e37550b0e46921eb161da8ccc3886aaf62a4a3087df0f13610839b7c2d6f4b39c9f07e/itk4.1.0.tar.gz" + sha256 "da646199222efdc4d8c99593863c8d287442ea5a8687f95460d6e9e72431c9c7" + end + + def install + odie "tk resource needs to be updated" if version != resource("tk").version + + # Remove bundled zlib + rm_r("compat/zlib") + + args = %W[ + --prefix=#{prefix} + --includedir=#{include}/tcl-tk + --mandir=#{man} + --enable-man-suffix + --enable-threads + --enable-64bit + ] + + ENV["TCL_PACKAGE_PATH"] = "#{HOMEBREW_PREFIX}/lib" + cd "unix" do + system "./configure", *args + system "make" + system "make", "install" + system "make", "install-private-headers" + bin.install_symlink "tclsh#{version.to_f}" => "tclsh" + end + + # Let tk finds our new tclsh + ENV.prepend_path "PATH", bin + + resource("tk").stage do + cd "unix" do + args << "--enable-aqua=yes" if OS.mac? + system "./configure", *args, "--without-x", "--with-tcl=#{lib}" + system "make" + system "make", "install" + system "make", "install-private-headers" + bin.install_symlink "wish#{version.to_f}" => "wish" + end + end + + resource("critcl").stage do + system bin/"tclsh", "build.tcl", "install" + end + + resource("tcllib").stage do + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + system "make", "critcl" + cp_r "modules/tcllibc", "#{lib}/" + ln_s "#{lib}/tcllibc/macosx-x86_64-clang", "#{lib}/tcllibc/macosx-x86_64" if OS.mac? + end + + resource("tcltls").stage do + system "./configure", "--with-ssl=openssl", + "--with-openssl-dir=#{Formula["openssl@3"].opt_prefix}", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + resource("itk4").stage do + itcl_dir = lib.glob("itcl*").last + args = %W[ + --prefix=#{prefix} + --exec-prefix=#{prefix} + --with-tcl=#{lib} + --with-tclinclude=#{include}/tcl-tk + --with-tk=#{lib} + --with-tkinclude=#{include}/tcl-tk + --with-itcl=#{itcl_dir} + ] + system "./configure", *args + system "make" + system "make", "install" + end + + # Use the sqlite-analyzer formula instead + # https://github.com/Homebrew/homebrew-core/pull/82698 + rm bin/"sqlite3_analyzer" + end + + def caveats + <<~EOS + The sqlite3_analyzer binary is in the `sqlite-analyzer` formula. + EOS + end + + test do + assert_match "#{HOMEBREW_PREFIX}/lib", pipe_output("#{bin}/tclsh", "puts $auto_path\n") + assert_equal "honk", pipe_output("#{bin}/tclsh", "puts honk\n").chomp + + # Fails with: no display name and no $DISPLAY environment variable + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + test_itk = <<~TCL + # Check that Itcl and Itk load, and that we can define, instantiate, + # and query the properties of a widget. + + + # If anything errors, just exit + catch { + package require Itcl + package require Itk + + # Define class + itcl::class TestClass { + inherit itk::Toplevel + constructor {args} { + itk_component add bye { + button $itk_interior.bye -text "Bye" + } + eval itk_initialize $args + } + } + + # Create an instance + set testobj [TestClass .#auto] + + # Check the widget has a bye component with text property "Bye" + if {[[$testobj component bye] cget -text]=="Bye"} { + puts "OK" + } + } + exit + TCL + assert_equal "OK\n", pipe_output("#{bin}/wish", test_itk), "Itk test failed" + end +end diff --git a/Formula/t/tclap.rb b/Formula/t/tclap.rb new file mode 100644 index 0000000000000..3c234f59288bd --- /dev/null +++ b/Formula/t/tclap.rb @@ -0,0 +1,27 @@ +class Tclap < Formula + desc "Templatized C++ command-line parser library" + homepage "https://tclap.sourceforge.net/" + url "https://downloads.sourceforge.net/project/tclap/tclap-1.2.5.tar.gz" + sha256 "bb649f76dae35e8d0dcba4b52acfd4e062d787e6a81b43f7a4b01275153165a6" + license "MIT" + + livecheck do + url :stable + regex(%r{url=.*?/tclap[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1067d4df91f61b3a6af2efd80c62b4359cc7f1f9088892ad9443d13be791bc0a" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + # Installer scripts have problems with parallel make + ENV.deparallelize + system "make", "install" + end +end diff --git a/Formula/t/tcpdump.rb b/Formula/t/tcpdump.rb new file mode 100644 index 0000000000000..42def19e93978 --- /dev/null +++ b/Formula/t/tcpdump.rb @@ -0,0 +1,53 @@ +class Tcpdump < Formula + desc "Command-line packet analyzer" + homepage "https://www.tcpdump.org/" + url "https://www.tcpdump.org/release/tcpdump-4.99.5.tar.gz" + sha256 "8c75856e00addeeadf70dad67c9ff3dd368536b2b8563abf6854d7c764cd3adb" + license "BSD-3-Clause" + head "https://github.com/the-tcpdump-group/tcpdump.git", branch: "master" + + livecheck do + url "https://www.tcpdump.org/release/" + regex(/href=.*?tcpdump[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bdf16573a1d3b7b374650072536dbf02491b83a60b606f34e023af5bb3551efc" + sha256 cellar: :any, arm64_sequoia: "1148ef2fa8284dd4f3501fbb831e355d1802ff312588e964000e8bf6119d5f1a" + sha256 cellar: :any, arm64_sonoma: "3f5043c5db6891bd831a8c669d502d7b648e94c5d7879bfc50bbd19c3206d966" + sha256 cellar: :any, arm64_ventura: "fe74349a8c4053d8174b151fa0a5f08ad21bde866b32c98d17352cdaf2979407" + sha256 cellar: :any, arm64_monterey: "0931f78d5219508116403e1b5bc32c350f41391ecc09e91e79700ee6f6afacf3" + sha256 cellar: :any, sonoma: "8b597346315197c4496008670bc19b707b9101f2fc3f8c3cb5ce27660b15f1af" + sha256 cellar: :any, ventura: "c89ac387870a36878ec784a2596001604fb8e45bf08b843cc67bca65b6b8b2e8" + sha256 cellar: :any, monterey: "747664cf9fe675ea183ab0296ac49e94b787cf7872d312796b44f389f4f9fe5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "8962c15fc888b856a9996e75496920d235e191aba7026856cf18ed26315b8e33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93fbba2a9bdd304e8aaa4c78e6f74b8e41de3312bd444833320f4dbe09b08dc9" + end + + depends_on "libpcap" + depends_on "openssl@3" + + def install + system "./configure", "--prefix=#{prefix}", + "--disable-smb", + "--disable-universal" + system "make", "install" + end + + test do + output = shell_output("#{bin}/tcpdump --help 2>&1") + assert_match "tcpdump version #{version}", output + assert_match "libpcap version #{Formula["libpcap"].version}", output + assert_match "OpenSSL #{Formula["openssl@3"].version}", output + + match = if OS.mac? + "tcpdump: (cannot open BPF device) /dev/bpf0: Operation not permitted" + else + <<~EOS + tcpdump: eth0: You don't have permission to perform this capture on that device + (socket: Operation not permitted) + EOS + end + assert_match match, shell_output("#{bin}/tcpdump ipv6 2>&1", 1) + end +end diff --git a/Formula/t/tcpflow.rb b/Formula/t/tcpflow.rb new file mode 100644 index 0000000000000..1fd50b210f16d --- /dev/null +++ b/Formula/t/tcpflow.rb @@ -0,0 +1,65 @@ +class Tcpflow < Formula + desc "TCP/IP packet demultiplexer" + homepage "https://github.com/simsong/tcpflow" + url "https://corp.digitalcorpora.org/downloads/tcpflow/tcpflow-1.6.1.tar.gz" + sha256 "436f93b1141be0abe593710947307d8f91129a5353c3a8c3c29e2ba0355e171e" + license "GPL-3.0-only" + + livecheck do + url "https://digitalcorpora.s3.us-west-2.amazonaws.com/?list-type=2&delimiter=%2F&prefix=downloads%2Ftcpflow%2F" + regex(/tcpflow[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :xml do |xml, regex| + xml.get_elements("//Contents/Key").filter_map do |item| + item.text&.[](regex, 1) + end + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "4af77114345b5c48affe1c4d540387572e4882253d948bedfeae203e9ab9a654" + sha256 cellar: :any, arm64_sequoia: "173cfbc01371f93960738b1c9d0a7fc46f4ee1ea3f3932710c7f7359e7b80c3a" + sha256 cellar: :any, arm64_sonoma: "b3a8fb517ef2d283b4e669ad14f65e9d6bd5c15eeeba306cc92b396adb9f0d2b" + sha256 cellar: :any, arm64_ventura: "1f2a7ca46614781861f8c1f9a9d6af8b13320bf9ff03f830fa199ad250a094a3" + sha256 cellar: :any, arm64_monterey: "a41756ac3931a3f64fba3000f2b86a02f844b69bdd41907ced290b9855f97aec" + sha256 cellar: :any, arm64_big_sur: "6e3f95b6a3d009e8f85c0da483e8759b37190710a4b74f1980b751bec54cd42b" + sha256 cellar: :any, sonoma: "9dc20c2d7a6a462677563001cb3b2ef28cc309a7b9f2907f70e5375115045996" + sha256 cellar: :any, ventura: "df7deb202cad6e5c8a51ed01ba5fcf16fddc80cccfda4eccc196bce7b6f9b0fd" + sha256 cellar: :any, monterey: "73e14653361b7c3276f5f5acd7e79c09982cc0f0d5f9c3f0102c1845bc5e5e95" + sha256 cellar: :any, big_sur: "b4bd69530d81550d1a428dff981fc71f5a45fd4cc406e9f10dee030e1b350b90" + sha256 cellar: :any, catalina: "96d3ce376bae12013a22db5a49e71bc45a8478a07ba7ef1bfb1dc1daa33e3bac" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bc8ea9e3684dbed7beefecc3b35e829b75486eaf71ebce04727ffe5898e7080" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0fb8e4d90327529dca426de617f298ec135fac0fca31e547551774832541aac" + end + + head do + url "https://github.com/simsong/tcpflow.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "boost" => :build + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "libpcap" + uses_from_macos "zlib" + + def install + system "bash", "./bootstrap.sh" if build.head? + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--mandir=#{man}" + system "make", "install" + end + + test do + output = shell_output("#{bin}/tcpflow -v -r #{test_fixtures("test.pcap")} 2>&1") + assert_match "Total flows processed: 2", output + assert_match "Total packets processed: 11", output + assert_match "Test", (testpath/"192.168.001.118.00080-192.168.001.115.51613").read + end +end diff --git a/Formula/t/tcping.rb b/Formula/t/tcping.rb new file mode 100644 index 0000000000000..7d9e799219733 --- /dev/null +++ b/Formula/t/tcping.rb @@ -0,0 +1,39 @@ +class Tcping < Formula + desc "TCP connect to the given IP/port combo" + homepage "https://github.com/mkirchner/tcping" + url "https://github.com/mkirchner/tcping/archive/refs/tags/2.1.0.tar.gz" + sha256 "b8aa427420fe00173b5a2c0013d78e52b010350f5438bf5903c1942cba7c39c9" + license "MIT" + head "https://github.com/mkirchner/tcping.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9b6f59dabfa7d65422fa6ec42a7fec5fb60b41aeeeb732b8d90edf146494a47" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b43eafbc84776f3718d8fdcad688ca581d2b3e74de5de6f199d6af57ed810930" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3658deb0ed9da1938d4c2a6c4336fdc51ac8a2037365a9b9b19708d5c16d7cd9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "126f8832750fd4260255814f399ca26fdd109a8bd52cde1737670b3be389213e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8784cccfd9d750f59c8e9437fde962edc453147d4fdc960f34b047cc4b3eb909" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "291b7eae0dc9f77b2df1d10ed1c685ddf48af0b835b4818f96a256a10b0841c3" + sha256 cellar: :any_skip_relocation, sonoma: "c1cc2aea721c8489ca2f2dd6e6141062bbce6b926e0fbd7137b28d4c33907007" + sha256 cellar: :any_skip_relocation, ventura: "74dabc6cf5b77e3251cb11ab8fcd1a6bba24e67fb180871833c11919f193c496" + sha256 cellar: :any_skip_relocation, monterey: "90eb918cc445fb97563d157bd1c75ca2abf1a8423c2b83de0d2c101ae13a9c86" + sha256 cellar: :any_skip_relocation, big_sur: "0049f186fb30a2217b7a8fe05eacac7e766f666135d5c898221e6cc25455349a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b53bd88f1bb3f5be9aa7c52013cdb0fd60eaf39d8c05baca7556dd8600b4c6f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16c2e18d02839e6b0e79ac685045de38f37afd44543cd43c82ae1e0cec435282" + end + + def install + system "make" + bin.install "tcping" + end + + test do + system bin/"tcping", "www.google.com", "80" + end +end diff --git a/Formula/t/tcpkali.rb b/Formula/t/tcpkali.rb new file mode 100644 index 0000000000000..1a2bfc864b318 --- /dev/null +++ b/Formula/t/tcpkali.rb @@ -0,0 +1,44 @@ +class Tcpkali < Formula + desc "High performance TCP and WebSocket load generator and sink" + homepage "https://web.archive.org/web/20230303212249/https://github.com/satori-com/tcpkali" + url "https://www.mirrorservice.org/sites/distfiles.macports.org/tcpkali/tcpkali-1.1.1.tar.gz" + sha256 "a9a15a1703fc4960360a414ee282d821a7b42d4bbba89f9e72a796164ff69598" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b35b2a69212122e9fe05744632f7e9d4fb424881dc430216559df87f797d4239" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3356d233dace7efe54b216d5ba97ed31a4ad7e800bb94ad5bc078dcdda8e7a0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e39e3dddac6717a918e86cb86f552ccc71c2a828b361599083a0d36fa3e79780" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a4e360c9b9f4e392e429075847cf3d4f02d0318668d19d5745a7f0108c381330" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1da7a44e7f3a40440cbb5ac8fa5fde5156c22125080daf5c6afc884b3f8dc264" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7e7b45ed05cf7d7ad1dde75394b670e192c217cdfe98012e8da514cf6717d64a" + sha256 cellar: :any_skip_relocation, sonoma: "647259f0136c276ba922e9b437821f4f6b7c6211532827fe70fb363bca4cf2ac" + sha256 cellar: :any_skip_relocation, ventura: "e3a2e0de9e4081e5f2720aec73737040ad1449b1d69d4ce7fbd1cad1940f4c11" + sha256 cellar: :any_skip_relocation, monterey: "4fb40f82ea3e44a7903dea3e1ef6a950833368346a5810a91b393b7537ec8bd6" + sha256 cellar: :any_skip_relocation, big_sur: "6496fe2ab336a75fecc905017ea8886c67dff3e13139b37474e6f500eb98e0fa" + sha256 cellar: :any_skip_relocation, catalina: "01bd403a6b94827f4670877d1e36ee4c439f708d84d364584e5b1538837e72d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a21cdba0e1d2863bb691ab0b2a6b416f801b38236a399a3bd8d6cfc67762f539" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae1230bcf9879d1d8f09d5e0a3b80c9baf7f59c2bfa77a296a06ed6a821d5be7" + end + + deprecate! date: "2025-03-19", because: :repo_removed + + uses_from_macos "bison" => :build + uses_from_macos "ncurses" + + def install + args = [] + if OS.linux? + inreplace "src/tcpkali_syslimits.c", "", "" + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"tcpkali", "-l1237", "-T0.5", "127.1:1237" + end +end diff --git a/Formula/t/tcpreplay.rb b/Formula/t/tcpreplay.rb new file mode 100644 index 0000000000000..a4ec2079b9ec1 --- /dev/null +++ b/Formula/t/tcpreplay.rb @@ -0,0 +1,74 @@ +class Tcpreplay < Formula + desc "Replay saved tcpdump files at arbitrary speeds" + homepage "https://tcpreplay.appneta.com/" + url "https://github.com/appneta/tcpreplay/releases/download/v4.5.2/tcpreplay-4.5.2.tar.gz" + sha256 "ccff3bb29469a04ccc20ed0b518e3e43c4a7b5a876339d9435bfd9db7fe5d0f1" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "BSD-4-Clause", "GPL-3.0-or-later", "ISC"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "b176ea94713287877a7ea7070827e6c878b02dc5b041fbb72d86959844067489" + sha256 cellar: :any, arm64_sequoia: "e1d0937d05aafd45c31f68cc66122d3bbd37d7fddca7772af45bd17f9d7ad16b" + sha256 cellar: :any, arm64_sonoma: "151b9f95a3924504efbd0458e1136d24eee4555989cacd7f3289daaae63c1d8e" + sha256 cellar: :any, arm64_ventura: "bebe392ee113e4351695149aa69c3a5f49a23141e29d5a1d87653994add8266c" + sha256 cellar: :any, sonoma: "02f52b95155aa75b197e8c1c726acb334c3f3c24bf76fcd1823bed6610afbc0e" + sha256 cellar: :any, ventura: "8c7ab5e0ffd729cda025aa995fa9bb607c47170d44c41dc438f82f1032cd22f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7adebd39df6e58f28d5da9cb969966b411a6e6dcf844e0fc65956ce9fea96a29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1602f54ea30d09b224bf50cb03fd4c505aafc866a73a8eb58182bca38dae5dbd" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libdnet" + + uses_from_macos "libpcap" + + on_sonoma :or_older do + # Fix build failure due to signature mismatch for `TAILQ_FOREACH_REVERSE` + # between the bundled `queue.h` and system `queue.h`. + # https://github.com/appneta/tcpreplay/issues/981 + patch :DATA + end + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + --enable-dynamic-link + --with-libdnet=#{Formula["libdnet"].opt_prefix} + ] + + args << if OS.mac? + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version + + "--with-macosx-sdk=#{MacOS.version}" + else + "--with-libpcap=#{Formula["libpcap"].opt_prefix}" + end + + system "./configure", *args + + system "make", "install" + end + + test do + system bin/"tcpreplay", "--version" + end +end + +__END__ +diff --git i/src/fragroute/mod.c w/src/fragroute/mod.c +index e7effdc6..ed6feb7d 100644 +--- i/src/fragroute/mod.c ++++ w/src/fragroute/mod.c +@@ -177,7 +177,7 @@ mod_close(void) + { + struct rule *rule; + +- TAILQ_FOREACH_REVERSE(rule, &rules, next, head) ++ TAILQ_FOREACH_REVERSE(rule, &rules, head, next) + { + if (rule->mod->close != NULL) + rule->data = rule->mod->close(rule->data); diff --git a/Formula/t/tcpsplit.rb b/Formula/t/tcpsplit.rb new file mode 100644 index 0000000000000..cbb837841793e --- /dev/null +++ b/Formula/t/tcpsplit.rb @@ -0,0 +1,35 @@ +class Tcpsplit < Formula + desc "Break a packet trace into some number of sub-traces" + homepage "https://www.icir.org/mallman/software/tcpsplit/" + url "https://www.icir.org/mallman/software/tcpsplit/tcpsplit-0.3.tar.gz" + sha256 "9ba0a12d294fa4ccc8cad8d9662126f01b436ced48642c3fb2520121943f5cf5" + # The license is similar to X11 but with a different phrasing to the no advertising clause + license :cannot_represent + + livecheck do + url :homepage + regex(/href=.*?tcpsplit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0b02564f0e125bdab2ac132ffdf03a9c621fc26a1ec3182a27e4deca418f29b4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1b13d6af21036479f6a802039f11fc02a16a1d1cbda789af99ecba3100d88130" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a6891aac6306a346be1a28c7ee462636576a7835c8e7a796d6a3d64cd5ceb7f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "415a55da3fec588f476a348a4d5424ab7fa2a4bfdbdfb30e8e5d7a225f1bee56" + sha256 cellar: :any_skip_relocation, sonoma: "098840d4bbc97133040b4697034b972fc24acaeb6175bee7da477c495df5c5c7" + sha256 cellar: :any_skip_relocation, ventura: "9cf285c0719876d2dbd4df148886919cdec7d0b51bc8e59bc0feeffe733cab87" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b4ad04b2a151de072a19e191e56b996008f105147feda5b7bc449430f7327c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be8f207776a5ace12166e89d26b391cb43a7bf4c289d620b49ea4c948d1d91e9" + end + + uses_from_macos "libpcap" + + def install + system "make" + bin.install "tcpsplit" + end + + test do + system bin/"tcpsplit", "--version" + end +end diff --git a/Formula/t/tcpstat.rb b/Formula/t/tcpstat.rb new file mode 100644 index 0000000000000..d51c140b61402 --- /dev/null +++ b/Formula/t/tcpstat.rb @@ -0,0 +1,45 @@ +class Tcpstat < Formula + desc "Active TCP connections monitoring tool" + homepage "https://github.com/jtt/tcpstat" + url "https://github.com/jtt/tcpstat/archive/refs/tags/rel-0-1.tar.gz" + version "0.1" + sha256 "366a221950759015378775862a7499aaf727a3a9de67b15463b0991c2362fdaf" + license "BSD-2-Clause" + head "https://github.com/jtt/tcpstat.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "819e87c8105c753f181730fced67949dbc440e4a6e790c089f030134e6903ec3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e7c67338b0d6c0f83589d31ce70046af5888a6bb752e5f2d69361d81b57ef99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05facda1f2a318b0253ef9b01500561ed6791d0b5143c5aeb05d1187902a6758" + sha256 cellar: :any_skip_relocation, arm64_ventura: "50c363371b5503288c97c1a00b5dc678aa2e121fc5470bb42676bb1c107fc7da" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4126408cb79eaf56b14fb122539a770f8c593c90576c2f23cc6cfaef2a094f54" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0f5880a02d97d890364b5e98871dabb0682bf1d73d43f6a2cf92f0039f29619c" + sha256 cellar: :any_skip_relocation, sonoma: "54ea40debc75f08ad7120f8bccafceefea48cb0caa516f674a5d45f95cd84adb" + sha256 cellar: :any_skip_relocation, ventura: "64eeee455c63e53025d2bae91de42a412c3459afe2cd7c080f6ba272f66f2b7e" + sha256 cellar: :any_skip_relocation, monterey: "c4a031f93d9e107740f63c329da289a7b8534d168b66326f67b3f0dc5da82e6e" + sha256 cellar: :any_skip_relocation, big_sur: "1a8c9f2f529162b1b5fecee421aaa0c99b80864f752717142fb7f77c5f5acc43" + sha256 cellar: :any_skip_relocation, catalina: "86c1f5aad64e2d611dcb9d74b4eb0f51f24f79d1cdcaf636f62199099d625fa1" + sha256 cellar: :any_skip_relocation, arm64_linux: "bfd5b8071a1b3ad738db96ecd1ee944f6b58e781b9759cc9ec0d5be421fe99af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "036527a4c4492a1ca44c9b7c29ab1437108fc2c57105ade2f98fa8cf43a4e839" + end + + uses_from_macos "ncurses" + + def install + # Workaround for arm64 linux. Upstream isn't actively maintained + if OS.linux? && Hardware::CPU.arm? + inreplace "Makefile" do |s| + s.change_make_var! "CFLAGS", "#{s.get_make_var("CFLAGS")} -fsigned-char" + end + end + + system "make" + bin.install "tcpstat" + end + + test do + assert_match "Resolving", pipe_output(bin/"tcpstat", "q") + end +end diff --git a/Formula/t/tcptrace.rb b/Formula/t/tcptrace.rb new file mode 100644 index 0000000000000..ab4650718886a --- /dev/null +++ b/Formula/t/tcptrace.rb @@ -0,0 +1,63 @@ +class Tcptrace < Formula + # The tcptrace.org site has a history of going down sometimes, which is why + # we're using mirrors even though the first-party site may be available. + desc "Analyze tcpdump output" + homepage "https://web.archive.org/web/20210826120800/http://www.tcptrace.org/" + url "https://www.mirrorservice.org/sites/distfiles.macports.org/tcptrace/tcptrace-6.6.7.tar.gz" + mirror "https://distfiles.macports.org/tcptrace/tcptrace-6.6.7.tar.gz" + sha256 "63380a4051933ca08979476a9dfc6f959308bc9f60d45255202e388eb56910bd" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d117c6645454b8a7d360ca644eff63f362abe2ce853b5d01733c67a49ca4373" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5391990c5db4c21d094d243368443f039990ed44da3d07e0a52b2f0922a3a6a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5a61be1025abf1a097a9353517bc3e3f861a3b443f42350937ca345a0befe648" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dc1e3a00440e80a1b1ad88fc3ab0c872f47bd1f9d8fa9909add44144f3703be8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d27d973e94299d333fdd27c65e1260ee1c8ef12361a33e98a10cde109c781433" + sha256 cellar: :any_skip_relocation, sonoma: "1d23eeda4b2720acc9e15b49be4db33001e1c3fa3272d7046375f1ce8b19cc25" + sha256 cellar: :any_skip_relocation, ventura: "1be33a669bf94abdb6259a9a92b8c72027cd5ccc2054cf25c592ea9b5b34c123" + sha256 cellar: :any_skip_relocation, monterey: "82fa4c9aa859f61dd6f2ca36078b41b9994196d975a82b09b77529069a6fe195" + sha256 cellar: :any_skip_relocation, big_sur: "64787cc311c9da8d2090af5732efbe42f74c6dc5037b2b7ecb7055485603f20d" + sha256 cellar: :any_skip_relocation, catalina: "a1a61bd690da912afedd38f62eac7d5a1724c1ce68c68e7bcd8576e3fb86d956" + sha256 cellar: :any_skip_relocation, arm64_linux: "048969e3fdf2e0c22e2e65b3a6548a0e5da8dd032ee770b32f8444e5ce007835" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7516135879ddee3a7a4271980b8485ac12c3b1826cb99ba23e9f6f849fda4ceb" + end + + deprecate! date: "2024-04-18", because: :unmaintained + disable! date: "2025-04-22", because: :unmaintained + + uses_from_macos "libpcap" + + on_linux do + on_arm do + depends_on "automake" => :build + end + end + + patch do + url "https://github.com/msagarpatel/tcptrace/commit/f36b1567a5691d4c32489ab8493d8d4faaad3935.patch?full_index=1" + sha256 "ee86790cc2c3cea38ab9d764b3bfbc6adf5f62ca6c33c590329c00429d0a9ef8" + end + + def install + # Workaround for ancient config files not recognizing aarch64 linux. + if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + %w[config.guess config.sub].each do |fn| + cp Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}"/fn, fn + end + end + + system "./configure", *std_configure_args + system "make", "tcptrace" + + # don't install with owner/group + inreplace "Makefile", "-o bin -g bin", "" + system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man}" + end + + test do + touch "dump" + assert_match(/0 packets seen, 0 TCP packets/, + shell_output("#{bin}/tcptrace dump")) + end +end diff --git a/Formula/t/tcptraceroute.rb b/Formula/t/tcptraceroute.rb new file mode 100644 index 0000000000000..fad63c6025e49 --- /dev/null +++ b/Formula/t/tcptraceroute.rb @@ -0,0 +1,71 @@ +class Tcptraceroute < Formula + desc "Traceroute implementation using TCP packets" + homepage "https://github.com/mct/tcptraceroute" + license "GPL-2.0-only" + revision 2 + head "https://github.com/mct/tcptraceroute.git", branch: "master" + + stable do + url "https://github.com/mct/tcptraceroute/archive/refs/tags/tcptraceroute-1.5beta7.tar.gz" + sha256 "57fd2e444935bc5be8682c302994ba218a7c738c3a6cae00593a866cd85be8e7" + + # Call `pcap_lib_version()` rather than access `pcap_version` directly + # upstream issue: https://github.com/mct/tcptraceroute/issues/5 + patch do + url "https://github.com/mct/tcptraceroute/commit/3772409867b3c5591c50d69f0abacf780c3a555f.patch?full_index=1" + sha256 "c08e013eb01375e5ebf891773648a0893ccba32932a667eed00a6cee2ccf182e" + end + end + + # This regex is open-ended because the newest version is a beta version and + # we need to match these versions until there's a new stable release. + livecheck do + url :stable + regex(/^(?:tcptraceroute[._-])?v?(\d+(?:\.\d+)+.*)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3487da59a7faa8fc676d540fd1b5f310b62b845250e1916db5dfbb192a37b76f" + sha256 cellar: :any, arm64_sequoia: "07b6c54371373c5e7e23fba003ca0177fc103f0b9c84c22a4fc1d718fd96bf00" + sha256 cellar: :any, arm64_sonoma: "3fc2b91a08dc814aae2d8ddc521b7894cc843efceff301856deaf55c81402b39" + sha256 cellar: :any, arm64_ventura: "aa1fdc2d1d997ff5e63da0625d7961cc7b7e7b75e6c4031ef42267d1ce277944" + sha256 cellar: :any, arm64_monterey: "ba3030414b8fd5d2a556652a1bf5d7be188dddb8ad6e221e7d6662e295a00102" + sha256 cellar: :any, arm64_big_sur: "4e2b9c6ebec4fbbe3918044164a2ea7bfff0970e06e0c720bef8143d322ab3e2" + sha256 cellar: :any, sonoma: "8ed1d063b115127d0461606a589ddef863e39073dfbb9187a27470b7a7af8ac4" + sha256 cellar: :any, ventura: "029ae4c460d3454865fed73329f641b0788d9f4f7f2fc079b04954f0145e6e41" + sha256 cellar: :any, monterey: "b9308ddeb907678411916f047d9119350c5054afd5e995e113cf5ad287156e9c" + sha256 cellar: :any, big_sur: "f0e063340080998a098d428af420778bf27b0d5b772943b482152ad9e2793db2" + sha256 cellar: :any, catalina: "32a7e7e680f6e481353c0ab25fbfebb1f79f48bce4d2215d4765211e3494d450" + sha256 cellar: :any_skip_relocation, arm64_linux: "93f9bdf4d9051c31897edf8d96ea5b78e55ec2d1b8abb4b5f05f06ada2d7256a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97750459321657901904cd492047c4d011d7e7b705d01ce37d82fe5622dec168" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libnet" + + uses_from_macos "libpcap" + + def install + # Regenerate configure script for arm64/Apple Silicon support. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-libnet=#{HOMEBREW_PREFIX}", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + tcptraceroute requires root privileges so you will need to run + `sudo tcptraceroute`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + output = shell_output("#{bin}/tcptraceroute --help 2>&1", 1) + assert_match "Usage: tcptraceroute", output + end +end diff --git a/Formula/t/tcptunnel.rb b/Formula/t/tcptunnel.rb new file mode 100644 index 0000000000000..42bf1b4d1f72c --- /dev/null +++ b/Formula/t/tcptunnel.rb @@ -0,0 +1,37 @@ +class Tcptunnel < Formula + desc "TCP port forwarder" + homepage "https://vakuumverpackt.de/tcptunnel/" + url "https://github.com/vakuum/tcptunnel/archive/refs/tags/v0.8.tar.gz" + sha256 "1926e2636d26570035a5a0292c8d7766c4a9af939881121660df0d0d4513ade4" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7a7efb2e5ce2524bfa04b2942b08e245786ac43a8bf4fe6bfd74ec31b9deef4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8cda7483257c117ca1f5fa465c9659b2dd6ca6e88705c95c19a299b0bbdd2319" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "566b47c82002d0bebdd2d445c83e6c32640e42cbbbb9d7b818b0519b62c0f252" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9503c7ec45671862d4d806931e056c9d0c6e7ea9cdda143bd17ea355b6c6a78a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "08ea4f67e68abd0d281d62a9f59f172b3ada2f84de3efba2c66318909686fd04" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f551ae0b42199f7636702669a5f32d4fb6bafef330036e8b14f3cfda556a4d32" + sha256 cellar: :any_skip_relocation, sonoma: "ab42208d9916d141100118933e3f68d98622d9008af6fb3547e44433769bf9ff" + sha256 cellar: :any_skip_relocation, ventura: "8eb0261ee4669e199766ea61e9b9f7ab7cd1b9ca51794f5d26650c542dc55e10" + sha256 cellar: :any_skip_relocation, monterey: "d75d983ef25fb64ae2d4fef51dd7c5a29451a3326ae99f2aaf24254d174d9f3b" + sha256 cellar: :any_skip_relocation, big_sur: "65ab13dc5646735a64d821e3eab7f04a55bd0739b83b36769b3d0664de74ed80" + sha256 cellar: :any_skip_relocation, catalina: "e82c25ab68b43d632739d345b3ac1c3a6d22a9c8a51d44f9cfc3967e64469794" + sha256 cellar: :any_skip_relocation, arm64_linux: "59d0cdd268a8b0d3fe0ca85c547c68b185b5a7b6f1159b3a8eb5ac9f50178785" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b82ce2df1293960dc7d0e4b5b9d809198073121331d7287edacbd5cffe17d94c" + end + + def install + bin.mkpath + # installs directly into the prefix so should use bin + system "./configure", "--prefix=#{bin}" + system "make" + system "make", "install" + end + + test do + system bin/"tcptunnel", "--version" + end +end diff --git a/Formula/t/tcsh.rb b/Formula/t/tcsh.rb new file mode 100644 index 0000000000000..f547e16fc4364 --- /dev/null +++ b/Formula/t/tcsh.rb @@ -0,0 +1,44 @@ +class Tcsh < Formula + desc "Enhanced, fully compatible version of the Berkeley C shell" + homepage "https://www.tcsh.org/" + url "https://astron.com/pub/tcsh/tcsh-6.24.16.tar.gz" + mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.24.16.tar.gz" + sha256 "4208cf4630fb64d91d81987f854f9570a5a0e8a001a92827def37d0ed8f37364" + license "BSD-3-Clause" + + livecheck do + url "https://astron.com/pub/tcsh/" + regex(/href=.*?tcsh[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0df869ae003eeca37ff2acec0a8a9f604c1ffebda8b279facc0e3be826240dce" + sha256 arm64_sequoia: "e4425a06fe4fe997de2b9e14d64707622bf7867dd6d6dc55de9f344c0ad44075" + sha256 arm64_sonoma: "ffa54a7ec5c1d26ce100e3abfaed1defe293003550bb173229af5c808b476090" + sha256 arm64_ventura: "09039946701333cbde295724f9dd803219879acdf6705d1d200346cb57605f59" + sha256 sonoma: "487cae9b37287fb4080711e0877f76e09948b6d45ce4dfd7aa00f16fcdc7f753" + sha256 ventura: "c610c6f60d2cb8249d081203a842e784f3632414890481956ff126f4bf5c335c" + sha256 arm64_linux: "9570055136a3774880053458831d48cd936b3655b19f55f5b731481f7ae3671c" + sha256 x86_64_linux: "695cc9b9c3dbf80e7e088cd0803b43019ff2e5844223c5ad0553ef483a08e45e" + end + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" + system "make", "install" + bin.install_symlink "tcsh" => "csh" + end + + test do + (testpath/"test.csh").write <<~EOS + #!#{bin}/tcsh -f + set ARRAY=( "t" "e" "s" "t" ) + foreach i ( `seq $#ARRAY` ) + echo -n $ARRAY[$i] + end + EOS + assert_equal "test", shell_output("#{bin}/tcsh ./test.csh") + end +end diff --git a/Formula/t/tctl.rb b/Formula/t/tctl.rb new file mode 100644 index 0000000000000..fd17b95366543 --- /dev/null +++ b/Formula/t/tctl.rb @@ -0,0 +1,41 @@ +class Tctl < Formula + desc "Temporal CLI (tctl)" + homepage "https://docs.temporal.io/cli" + url "https://github.com/temporalio/tctl/archive/refs/tags/v1.18.1.tar.gz" + sha256 "945272db4860e3a015e43b4ffc8fc24ecd585e604f4b94b3a964d2f4e51b9c32" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c12ec8c0ad2ef4cca609b9df65b2056e85651857e322e8015b1b9d323b5650bc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7820bd1e43e2d0b5fbbbf20ac2592642c42d2085c2f8ec4c96a98ec609fb6a35" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac5e8aca07861abbfb56081050cfb6faa543a8ccb5ce8c800b5f0197de90cbfb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa22864d02f9260322e70777bdf2cb834e697a1bcddd49a84211a7030d743bf3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ac4a78dea7bbb2f643e8db88ab808abd9ecaf6c9363017c65346a28a3a4b5e38" + sha256 cellar: :any_skip_relocation, sonoma: "081280cf31bbf2fc09c433ad8e5e3f8368c720b0fe51f303fa2bc04940333683" + sha256 cellar: :any_skip_relocation, ventura: "2086b0e1d687f32df0b3b72951f7e647e6d53dc87633f3b58bc7e7c8b1e3cd74" + sha256 cellar: :any_skip_relocation, monterey: "888e39c95e804081f11c4da9a0c62535a91e18cafbf661e3b1f7203082c1957c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c4e8c844a0839abe2e32c2ac60826765819e9e79e1f63f5f27b6291acab48e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6fe6c1efa47cbfe9750cb68e0c9e413a4e2005d382faf3554202585f71218500" + end + + deprecate! date: "2024-12-04", because: :unmaintained, replacement_formula: "temporal" + + depends_on "go" => :build + + conflicts_with "teleport", because: "both install `tctl` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/tctl/main.go" + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"tctl-authorization-plugin"), + "./cmd/plugins/tctl-authorization-plugin" + end + + test do + # Given tctl is pointless without a server, not much interesting to test here. + run_output = shell_output("#{bin}/tctl --version 2>&1") + assert_match "tctl version", run_output + + run_output = shell_output("#{bin}/tctl --ad 192.0.2.0:1234 n l 2>&1", 1) + assert_match "rpc error", run_output + end +end diff --git a/Formula/t/td.rb b/Formula/t/td.rb new file mode 100644 index 0000000000000..97dce14076ede --- /dev/null +++ b/Formula/t/td.rb @@ -0,0 +1,39 @@ +class Td < Formula + desc "Your todo list in your terminal" + homepage "https://github.com/Swatto/td" + url "https://github.com/Swatto/td/archive/refs/tags/1.4.2.tar.gz" + sha256 "e85468dad3bf78c3fc32fc2ab53ef2d6bc28c3f9297410917af382a6d795574b" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ed379b6dd0971f68d160943435d87d150b664e0b4e9037654dfe50dc85e4014c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "386a1ba61c06bcdafaa9afedf609caa8eba893e2dbe50326122e03495ad9eff1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cea6b716c9daded4db7c3f1da8515348cd5ab876eefc9c8e1e28e3a3833379ef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4726f25e4fea482ddc0341f590311e2098e4e5a3b12f569376d85e1c5570d09" + sha256 cellar: :any_skip_relocation, arm64_monterey: "183862b016182f09f43d0c3092fdcb50894ca9f5814b83af816f1d4329368eab" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c78967ab33419211ed531310b5d40da8b7cfdb4573099d8e1b38b940c75d7a24" + sha256 cellar: :any_skip_relocation, sonoma: "eb030b14d31d5c32a5627be4c8bfb0a049416894c4f0e44204029f43cd65395a" + sha256 cellar: :any_skip_relocation, ventura: "ae0fe556264d24e6e18f4ecfbea037d1888269412dfab6a2e4c655b793985329" + sha256 cellar: :any_skip_relocation, monterey: "4de1e88f3b9f6477a154a6f5e946a7411a5a30a4e054d3fac9ad9b62d5964b4c" + sha256 cellar: :any_skip_relocation, big_sur: "665d2709804555227ee9fdffdf918574902345547bec837c53cd06fff04212c9" + sha256 cellar: :any_skip_relocation, catalina: "b3fb2df4df96602895a40900d682fa42ca9bbbc814463eeccd50ddc2cae8f485" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5463d1085c518796a801c19c708a6a1e68da5769b4209c83de7437a361b1e4c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32afc5a28386f21e96fad99d94094b1011519e21bcbfd7ee14e6cef892f36e68" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/".todos").write "[]\n" + system bin/"td", "a", "todo of test" + todos = (testpath/".todos").read + assert_match "todo of test", todos + assert_match "pending", todos + end +end diff --git a/Formula/t/tdb.rb b/Formula/t/tdb.rb new file mode 100644 index 0000000000000..d34235de838ad --- /dev/null +++ b/Formula/t/tdb.rb @@ -0,0 +1,45 @@ +class Tdb < Formula + desc "Trivial DataBase, by the Samba project" + homepage "https://tdb.samba.org/" + url "https://www.samba.org/ftp/tdb/tdb-1.4.14.tar.gz" + sha256 "144f407d42ed7a0ec1470a40ef17ad41133fe910bce865dd9fe084d49c907526" + license "GPL-3.0-or-later" + + livecheck do + url "https://www.samba.org/ftp/tdb/" + regex(/href=.*?tdb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "68dbd4f902ea117c3400a462d65dde2fbdb84e031437ad72a3203e17068e534c" + sha256 cellar: :any, arm64_sequoia: "867552b59be50ba8f9acab7d343dfb13ddf5fc01cdb5dad9b65514e126f1be9e" + sha256 cellar: :any, arm64_sonoma: "2bc5ca7cdcdb65b9a9742315da84853eb713aa703f083777e7bcdb85ae85ab37" + sha256 cellar: :any, arm64_ventura: "ceac8c5018279b2d32ce36c6b8a2e935bcb5021cb35cb7b36990dde903025224" + sha256 cellar: :any, sonoma: "e57ec266ee5dbe513c5d218f99c366493871569433a3a383565876833fb95807" + sha256 cellar: :any, ventura: "f8c8fb3c9a322a0473aee4d9dfa4d2cbab77fff71cf529106583a88401f718c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "16ca3025453f3622fe6f49a74b3f4eb4f7f6b2612392a0819ca89799aacc0bc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a312fe0c0bb79b98ce580dab59fd56fcc8306b1adcda8cc7cb34bf2525986bc" + end + + uses_from_macos "python" => :build + + conflicts_with "jena", because: "both install `tdbbackup`, `tdbdump` binaries" + + def install + system "./configure", "--bundled-libraries=NONE", + "--disable-python", + "--disable-rpath", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + testdb = "test-db.tdb" + + # database creation + pipe_output("#{bin}/tdbtool", "create #{testdb}\ninsert foo bar\n", 0) + assert_path_exists testpath/testdb + assert_match "Database integrity is OK and has 1 records.", pipe_output("#{bin}/tdbtool #{testdb}", "check\n") + assert_match "key 3 bytes: foo", pipe_output("#{bin}/tdbtool #{testdb}", "keys\n") + end +end diff --git a/Formula/t/tdd-guard.rb b/Formula/t/tdd-guard.rb new file mode 100644 index 0000000000000..c1fbe6d6b89f6 --- /dev/null +++ b/Formula/t/tdd-guard.rb @@ -0,0 +1,51 @@ +class TddGuard < Formula + desc "Automated TDD enforcement for Claude Code" + homepage "https://github.com/nizos/tdd-guard" + url "https://registry.npmjs.org/tdd-guard/-/tdd-guard-1.1.0.tgz" + sha256 "f9da65d258979704097f6646190473a31080e05909ab54c814b8d902a8938087" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3fb3feb1c6e6a4b7f4b36982a45445b69e2845212e85c4318c49e1b53ceaebb7" + sha256 cellar: :any, arm64_sequoia: "9fb17dde7acb7f69dcdb60339c839e9eaf83935be59b6728c42f286ce26678ae" + sha256 cellar: :any, arm64_sonoma: "9fb17dde7acb7f69dcdb60339c839e9eaf83935be59b6728c42f286ce26678ae" + sha256 cellar: :any, sonoma: "ea1930bf4be0a3f3d86f01f8be7ad0c5b231d510c30220c50f25d174cb21fdaf" + sha256 cellar: :any_skip_relocation, arm64_linux: "0db9e7258bed48c9637a0eef9fdc5e08924d0cf30acca05fada8a46fffdfa690" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bca2b4d222c93da8b4a5dddc4e7218e51b39e9b420fcec6be899cd157d63d9e1" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binaries + node_modules = libexec/"lib/node_modules/tdd-guard/node_modules" + ripgrep_vendor_dir = node_modules/"@anthropic-ai/claude-agent-sdk/vendor/ripgrep" + rm_r(ripgrep_vendor_dir) + end + + test do + (testpath/".env").write <<~EOS + MODEL_TYPE=claude_cli + USE_SYSTEM_CLAUDE=true + LINTER_TYPE=eslint + EOS + + input = <<~JSON + { + "event": "PreToolUse", + "tool_use": { + "name": "Write", + "input": { + "path": "example.py", + "contents": "print('hello')" + } + } + } + JSON + + assert_match "reason", pipe_output(bin/"tdd-guard", input, 0) + end +end diff --git a/Formula/t/tdlib.rb b/Formula/t/tdlib.rb new file mode 100644 index 0000000000000..c6b032528afbf --- /dev/null +++ b/Formula/t/tdlib.rb @@ -0,0 +1,58 @@ +class Tdlib < Formula + desc "Cross-platform library for building Telegram clients" + homepage "https://github.com/tdlib/td" + url "https://github.com/tdlib/td/archive/refs/tags/v1.8.0.tar.gz" + sha256 "30d560205fe82fb811cd57a8fcbc7ac853a5b6195e9cb9e6ff142f5e2d8be217" + license "BSL-1.0" + head "https://github.com/tdlib/td.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b2c7b6d981f8553c9ea1e6c15e03a922085be2a184463d0e9b74c103a2ce0ecc" + sha256 cellar: :any, arm64_sequoia: "4fcaff4924fb49375c92b662b6ee8a5271594413b2b2e118a37daf71bbe4b829" + sha256 cellar: :any, arm64_sonoma: "ee744b1888d6f8e979263e56cf9c1360d6338941f238fc97394762333b13a0fd" + sha256 cellar: :any, arm64_ventura: "453ae4e6474f7483de288a9f9401e50384dfc4e094fe34f4f6927d0868f1c53c" + sha256 cellar: :any, arm64_monterey: "d63a391500b354be858ea542555e32e5bcbf25e1c5b6e5ce6fb1fc9caa383b1f" + sha256 cellar: :any, arm64_big_sur: "d89f1c5d42063c1c787d8bdacef1d4a7f508e4f480f65f55412fa2c6d85ae01d" + sha256 cellar: :any, sonoma: "0cd87bf5abd70cab87e71bb9507ccdbda13b064acce240f573585dbd3935995b" + sha256 cellar: :any, ventura: "a18fe5ac33ffbd29734e6a811a4a5f00303487c1a63bce58b9d5a05e0b161e06" + sha256 cellar: :any, monterey: "f445c63b3ebc517e25008bc5eefe5cb631e9fbdac5f80530e292270be44bee25" + sha256 cellar: :any, big_sur: "e005fffee17a01c0deb9d1cf6afc29fb3d997bbb56391c3fc5b5d70b52503a8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "2301826209f4550f3662a5f36a751318b25a92bfe2f0b6ecb36a62d3eea5a9a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "763e767a1c640428361a506075089ca11a7f2e930dd315137968bc359ab901d1" + end + + depends_on "cmake" => :build + depends_on "gperf" => :build + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "zlib" + + def install + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"tdjson_example.cpp").write <<~CPP + #include "td/telegram/td_json_client.h" + #include + + int main() { + void* client = td_json_client_create(); + if (!client) return 1; + std::cout << "Client created: " << client; + return 0; + } + CPP + + system ENV.cxx, "tdjson_example.cpp", "-L#{lib}", "-ltdjson", "-o", "tdjson_example" + assert_match "Client created", shell_output("./tdjson_example") + end +end diff --git a/Formula/t/tdom.rb b/Formula/t/tdom.rb new file mode 100644 index 0000000000000..a84c89407fe39 --- /dev/null +++ b/Formula/t/tdom.rb @@ -0,0 +1,50 @@ +class Tdom < Formula + desc "XML/DOM/XPath/XSLT/HTML/JSON implementation for Tcl" + homepage "https://tdom.org/" + url "https://tdom.org/downloads/tdom-0.9.5-src.tgz" + sha256 "ce22e3f42da9f89718688bf413b82fbf079b40252ba4dd7f2a0e752232bb67e8" + license "MPL-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fbf84ebf5d244be2bc9ed3c6fe9a996c8bef2377f9a2b058d8b915f30ff75141" + sha256 cellar: :any, arm64_sequoia: "f98f56e8f8be62637a79a2a50e0e25c4560336a00d0aa3b33350f2b8021d9337" + sha256 cellar: :any, arm64_sonoma: "05e1ab5a96379f4cf427299ef7fc13cc7295201d099ebd729b4caca07ea29147" + sha256 cellar: :any, arm64_ventura: "14999e9dad6567460b4947213240636d8d6a392b9e8dad78b015ec319ba8a228" + sha256 cellar: :any, sonoma: "3195c542314a9f7264cfd1d74ab76b81d984a0d64662ee9c8ae78678939be048" + sha256 cellar: :any, ventura: "306b99b603977df988833a0510efa21466efb0adb65172112ae93336d8a686f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc0da95e2734d23da915d3c5e7a1ca8a334a90142a3293307b5418b8533c07e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d70020be1396f84fdbfd00d80ba80ce290a0040b0e929ff7b8444d1f18c8882e" + end + + depends_on "tcl-tk" + + def install + system "./configure", "--disable-silent-rules", "--with-tcl=#{ENV["HOMEBREW_PREFIX"]}/lib", *std_configure_args + system "make", "install" + end + + test do + test_tdom = <<~TCL + if {[catch { + package require tdom + + set xml { + + 12345 + } + + set doc [dom parse $xml] + set node [$doc selectNodes root/child/text()] + if {[$node data] == "12345"} { + puts "OK" + } + } resultVar]} { + puts $resultVar + } + TCL + + assert_equal "OK", pipe_output("#{ENV["HOMEBREW_PREFIX"]}/bin/tclsh", test_tdom).chomp + end +end diff --git a/Formula/t/tea.rb b/Formula/t/tea.rb new file mode 100644 index 0000000000000..8c5c0bf1a905f --- /dev/null +++ b/Formula/t/tea.rb @@ -0,0 +1,32 @@ +class Tea < Formula + desc "Command-line tool to interact with Gitea servers" + homepage "https://gitea.com/gitea/tea" + url "https://gitea.com/gitea/tea/archive/v0.11.1.tar.gz" + sha256 "1da6b6d2534bd6ffb0931400014bbdef26242cf4d35d4ba44c24928811825805" + license "MIT" + head "https://gitea.com/gitea/tea.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2bfa35ec5ab4abbebb112d8a0fc9e9345446a8adad4711702b8add6afb6b246" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2bfa35ec5ab4abbebb112d8a0fc9e9345446a8adad4711702b8add6afb6b246" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e2bfa35ec5ab4abbebb112d8a0fc9e9345446a8adad4711702b8add6afb6b246" + sha256 cellar: :any_skip_relocation, sonoma: "9d453ba641dd34c5bcebec76d1745fc7d4d98e01e92e412091dbd231b0b9a91e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f69c82c69b48dfc5edba4c6ab98f1eb470a40b6f48451cf7bbd6e9fd9f8c02d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b60cf1abd449ca7d8c0c4dc0591dee476b861dafc5c544618e8e6fbf60f0747c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + generate_completions_from_executable(bin/"tea", "completion") + end + + test do + assert_equal <<~EOS, shell_output("#{bin}/tea pulls", 1) + No gitea login configured. To start using tea, first run + tea login add + and then run your command again. + EOS + end +end diff --git a/Formula/t/tealdeer.rb b/Formula/t/tealdeer.rb new file mode 100644 index 0000000000000..7e72e8670bf8f --- /dev/null +++ b/Formula/t/tealdeer.rb @@ -0,0 +1,33 @@ +class Tealdeer < Formula + desc "Very fast implementation of tldr in Rust" + homepage "https://tealdeer-rs.github.io/tealdeer/" + url "https://github.com/tealdeer-rs/tealdeer/archive/refs/tags/v1.8.0.tar.gz" + sha256 "b1f1262de60ef3105ff93de71568a68a56ad5874a28f105ab7cb5857d305cdb9" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/tealdeer-rs/tealdeer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9ed071cec67ba6f99de640f8752e0974147d86d502fb166ac8fde1a33f8d4ac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba274f70026520a3199e64792400c0b92714af8fc2a68a8a513ae811e7bee24f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "691ac8167586b4f0cce7e2d58773141634c4fdbf711a260789a47c38bb5e53b0" + sha256 cellar: :any_skip_relocation, sonoma: "e5f589c151bb427c9798d0302b6b685f2fe91ef03a2e937f4f99452a69e8bd8d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c692047199775883070e21df53a7ce1dfec50657f46f4d23596b00de3c10ce8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b5fb8da742b6c1d021f516ef9e1795e9a5c089a68ab978d8fd31c8998a0d19d" + end + + depends_on "rust" => :build + + conflicts_with "tlrc", because: "both install `tldr` binaries" + conflicts_with "tldr", because: "both install `tldr` binaries" + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "completion/bash_tealdeer" => "tldr" + zsh_completion.install "completion/zsh_tealdeer" => "_tldr" + fish_completion.install "completion/fish_tealdeer" => "tldr.fish" + end + + test do + assert_match "brew", shell_output("#{bin}/tldr -u && #{bin}/tldr brew") + end +end diff --git a/Formula/t/teamtype.rb b/Formula/t/teamtype.rb new file mode 100644 index 0000000000000..e82506ccc78da --- /dev/null +++ b/Formula/t/teamtype.rb @@ -0,0 +1,35 @@ +class Teamtype < Formula + desc "Peer-to-peer, editor-agnostic collaborative editing of local text files" + homepage "https://github.com/teamtype/teamtype" + url "https://github.com/teamtype/teamtype/archive/refs/tags/v0.9.0.tar.gz" + sha256 "eabc7a197a6d5f1a06855d168796f5db95e1d61cfe1cb9cb05ce6f4e3cec7cb9" + license "AGPL-3.0-or-later" + head "https://github.com/teamtype/teamtype.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4167d805a9ca673742f74926d93fee28f70b38f369e70ce4c1bca73a4550485c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f9e1566b9d76dc2e9fb6bb82c952fbb73bfff45128b20657023f74148741c27" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b10337c3b94b61247e909e7092bacc678ae59b2a3f57f10355b62015be54c510" + sha256 cellar: :any_skip_relocation, sonoma: "783ea10276bca6114f78ca1a0fae428dce806cca03d8d1bf54953878b996d43d" + sha256 cellar: :any_skip_relocation, arm64_linux: "e2f429aafb4b93539d399194e25a098361019264535b20a3300c30d7271dbe7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbfbc77a57e1995bb4874da5f4976bfc4cd429e8ecd168e67c8c8872d746a7c9" + end + + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + cd "daemon" do + system "cargo", "install", *std_cargo_args + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/teamtype --version") + + (testpath/".teamtype").mkpath + expected = "For security reasons, the parent directory of the socket must only be accessible by the current user" + assert_match expected, pipe_output("#{bin}/teamtype share 2>&1", "y", 1) + end +end diff --git a/Formula/t/technitium-dns.rb b/Formula/t/technitium-dns.rb new file mode 100644 index 0000000000000..889c5741e9acf --- /dev/null +++ b/Formula/t/technitium-dns.rb @@ -0,0 +1,82 @@ +class TechnitiumDns < Formula + desc "Self host a DNS server for privacy & security" + homepage "https://technitium.com/dns/" + url "https://github.com/TechnitiumSoftware/DnsServer/archive/refs/tags/v13.6.0.tar.gz" + sha256 "37ade6327dc63700b4a63db6347d3174112d8ffcb817645073f7e5e114e76400" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2ab3ef53a19ae5424598fc16147cf78d2e5a13b7e26adce5b54133698e7db1c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a501489591cd182a2acd46fa546b3cd716eed5fa2009c5943a76340e2198c666" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "047ed2ef79d6f7b05619f0573e3f1a1bc60d45220ae23e40b0b5e851b291250a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68cf6f51e7498135466e5c74d0744fb848c01bcf7ce58179f6aecbd650f08fc5" + sha256 cellar: :any_skip_relocation, ventura: "6d349a289209bd35d1c01174290fcd8d83a22255edd72acd988c9b8fb29e686c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e21db5a1ac666bfc822ed4df1495afdc0fa3f843a17140e5909a346b9453e3ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e40c481b7ad55f8e17df945cef5b74b02fb887d3a9c75cb999761b79c23c0721" + end + + # TODO: update dotnet version + # Issue ref: https://github.com/TechnitiumSoftware/DnsServer/issues/1303 + depends_on "dotnet@8" + depends_on "libmsquic" + depends_on "technitium-library" + + on_linux do + depends_on "bind" => :test # for `dig` + end + + def install + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "1" + + dotnet = Formula["dotnet@8"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --no-self-contained + --output #{libexec} + --use-current-runtime + ] + + inreplace Dir.glob("**/*.csproj"), + "..\\..\\TechnitiumLibrary\\bin", + Formula["technitium-library"].libexec.to_s.tr("/", "\\"), + audit_result: false + system "dotnet", "publish", "DnsServerApp/DnsServerApp.csproj", *args + + (bin/"technitium-dns").write <<~SHELL + #!/bin/bash + export DYLD_FALLBACK_LIBRARY_PATH=#{Formula["libmsquic"].opt_lib} + export DOTNET_ROOT=#{dotnet.opt_libexec} + exec #{dotnet.opt_libexec}/dotnet #{libexec}/DnsServerApp.dll #{etc}/technitium-dns + SHELL + end + + service do + run opt_bin/"technitium-dns" + keep_alive true + error_log_path var/"log/technitium-dns.log" + log_path var/"log/technitium-dns.log" + working_dir var + end + + test do + dotnet = Formula["dotnet@8"] + tmpdir = Pathname.new(Dir.mktmpdir) + # Start the DNS server + require "pty" + PTY.spawn("#{dotnet.opt_libexec}/dotnet #{libexec}/DnsServerApp.dll #{tmpdir}") do |r, _w, pid| + # Give the server time to start + sleep 2 + # Use `dig` to resolve "localhost" + assert_match "Server was started successfully", r.gets + output = shell_output("dig @127.0.0.1 localhost 2>&1") + assert_match "ANSWER SECTION", output + assert_match "localhost.", output + ensure + Process.kill("KILL", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/technitium-library.rb b/Formula/t/technitium-library.rb new file mode 100644 index 0000000000000..cb329c5f0f766 --- /dev/null +++ b/Formula/t/technitium-library.rb @@ -0,0 +1,86 @@ +class TechnitiumLibrary < Formula + desc "Library for technitium .net based applications" + homepage "https://technitium.com" + url "https://github.com/TechnitiumSoftware/TechnitiumLibrary/archive/refs/tags/dns-server-v13.6.0.tar.gz" + sha256 "b191357282562662b11563d80476d18061e7cb7adf6d5b0637e012c5e961faae" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "492665baab8d63961a06444ce1c653865cf3269b129f3cf4e7cd6cbd1e55349e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e4cb83b00dd9588bf345937b4221fd0b8c5e12ba18f149ff5de729bc6df4334" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28984faece182530989be911c65002be59e1ed4a8a828d10ce834223af4ce65d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a130d29c1e2c741cf0d27b613d0b73196ea28f72027d20d26d787c4d2a7a8357" + sha256 cellar: :any_skip_relocation, ventura: "d6ca1c337f27ceb3c4019a9cdd99872667f6ae3e7d4c5ea7d3db76ad69411461" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5d4297401a01a142b864d51d70fbc4726a6c5e93d802a59b67c404c0431cd13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1a8b06b6c37b37f17a0f6ef36e5ff08ff9c5a32089b69b1f7be8695fe0acc35" + end + + depends_on "dotnet@8" + + def install + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "1" + + dotnet = Formula["dotnet@8"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --no-self-contained + --output #{libexec} + --use-current-runtime + ] + + system "dotnet", "publish", "TechnitiumLibrary.ByteTree/TechnitiumLibrary.ByteTree.csproj", *args + system "dotnet", "publish", "TechnitiumLibrary.Net/TechnitiumLibrary.Net.csproj", *args + end + + test do + dotnet = Formula["dotnet@8"] + target_framework = "net#{dotnet.version.major_minor}" + + (testpath/"test.cs").write <<~CSHARP + using System; + using TechnitiumLibrary; + + namespace Homebrew + { + public class TechnitiumLibraryTest + { + public static void Main(string[] args) + { + Console.WriteLine(Base32.ToBase32HexString(new byte[] { 1, 2, 3 })); + } + } + } + CSHARP + + (testpath/"test.csproj").write <<~XML + + + Exe + #{target_framework} + AnyCPU + Homebrew + Homebrew.Dotnet + Homebrew.Dotnet + $(AssemblyName) + false + + + + + + + #{libexec}/TechnitiumLibrary.dll + + + + XML + + system "#{dotnet.opt_libexec}/dotnet", "build", "--framework", target_framework, + "--output", testpath, testpath/"test.csproj" + output = shell_output("#{dotnet.opt_libexec}/dotnet run --framework #{target_framework} #{testpath}/test.dll") + assert_match "04106===", output + end +end diff --git a/Formula/t/tectonic.rb b/Formula/t/tectonic.rb new file mode 100644 index 0000000000000..0f4734889d731 --- /dev/null +++ b/Formula/t/tectonic.rb @@ -0,0 +1,84 @@ +class Tectonic < Formula + desc "Modernized, complete, self-contained TeX/LaTeX engine" + homepage "https://tectonic-typesetting.github.io/" + license "MIT" + revision 4 + head "https://github.com/tectonic-typesetting/tectonic.git", branch: "master" + + stable do + url "https://github.com/tectonic-typesetting/tectonic/archive/refs/tags/tectonic@0.15.0.tar.gz" + sha256 "3c13de312c4fe39ff905ad17e64a15a3a59d33ab65dacb0a8b9482c57e6bc6aa" + + # Backport `time` update to build on newer Rust + patch do + url "https://github.com/tectonic-typesetting/tectonic/commit/6b49ca8db40aaca29cb375ce75add3e575558375.patch?full_index=1" + sha256 "86e5343d1ce3e725a7dab0227003dddd09dcdd5913eb9e5866612cb77962affb" + end + + # Backport fix for icu4c 75 + patch do + url "https://github.com/tectonic-typesetting/tectonic/commit/d260961426b01f7643ba0f35f493bdb671eeaf3f.patch?full_index=1" + sha256 "7d2014a1208569a63fca044b8957e2d2256fa169ea2ebe562aed6f490eec17d1" + end + end + + # As of writing, only the tags starting with `tectonic@` are release versions. + # NOTE: The `GithubLatest` strategy cannot be used here because the "latest" + # release on GitHub sometimes points to a tag that isn't a release version. + livecheck do + url :stable + regex(/^tectonic@v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "1be8bd6145da06beaad10b842d5d1b4b95437d5b7434393988c2fba1950c75c7" + sha256 cellar: :any, arm64_sequoia: "ffc8602e1b2f1a67000d75005c1cbaae38bdd947e553c9f0b2691b808c37b485" + sha256 cellar: :any, arm64_sonoma: "d285d2e6edecf5aa4eff882adfc33da8b77f42e5c38e830f71f4df3bfeaa51f2" + sha256 cellar: :any, arm64_ventura: "f32891c5831052e3bb42bc8fb0e16b03bd9c4d7589c352f5aaf44d75f025b23c" + sha256 cellar: :any, sonoma: "fa701da13aceb845275ab33d2be416e8e920de049200aa24f3b59f0ece64e7df" + sha256 cellar: :any, ventura: "56ce8b708073b61d53ad803ac2b7977023b3361db901051e314387d15f1ed766" + sha256 cellar: :any_skip_relocation, arm64_linux: "9503c0b5a4f9746927ca7d4773284b0880289a9197d4512034bd0b7516d313b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "729380f2cf1ff68094a032dc5c4dc21fcbfc70dba58bbf2c597b1b2d675fcbc3" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "freetype" + depends_on "graphite2" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "libpng" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "fontconfig" + end + + def install + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? # needed for CLT-only builds + + # Fix to error: implicit autoref creates a reference to the dereference of a raw pointer + # for rust 1.89+, remove with next release + inreplace "crates/engine_bibtex/src/xbuf.rs", "(*old).len()", "(&(*old)).len()" if build.stable? + + # Ensure that the `openssl` crate picks up the intended library. + # https://crates.io/crates/openssl#manual-configuration + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + + system "cargo", "install", "--features", "external-harfbuzz", *std_cargo_args + bin.install_symlink bin/"tectonic" => "nextonic" + end + + test do + (testpath/"test.tex").write 'Hello, World!\bye' + system bin/"tectonic", "-o", testpath, "--format", "plain", testpath/"test.tex" + assert_path_exists testpath/"test.pdf", "Failed to create test.pdf" + assert_match "PDF document", shell_output("file test.pdf") + + system bin/"nextonic", "new", "." + system bin/"nextonic", "build" + assert_path_exists testpath/"build/default/default.pdf", "Failed to create default.pdf" + end +end diff --git a/Formula/t/teem.rb b/Formula/t/teem.rb new file mode 100644 index 0000000000000..eb325628adde9 --- /dev/null +++ b/Formula/t/teem.rb @@ -0,0 +1,85 @@ +class Teem < Formula + desc "Libraries for scientific raster data" + homepage "https://teem.sourceforge.net/" + url "https://downloads.sourceforge.net/project/teem/teem/1.11.0/teem-1.11.0-src.tar.gz" + sha256 "a01386021dfa802b3e7b4defced2f3c8235860d500c1fa2f347483775d4c8def" + # License is LGPL-2.1-or-later with a non-SPDX license exception for linking + license :cannot_represent + head "https://svn.code.sf.net/p/teem/code/teem/trunk" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f4d6028758c3ab8fc8c0aac33a7d8ba0326c175d0cc4e2b0ec717b2d20e923da" + sha256 cellar: :any, arm64_sequoia: "81b45cdf2ea8755adac691f6e58accc314cf9ddfe9152c3f017fd839df3da9c2" + sha256 cellar: :any, arm64_sonoma: "3e9555bbe75fe5a36a3f62a36434158fa024153accdb69266ffce6d59254fed7" + sha256 cellar: :any, arm64_ventura: "675bc15ec206fbcdd01c475ae95b82f8fbb5f8143bd781ee87ba09971eb75d84" + sha256 cellar: :any, arm64_monterey: "1c2da9c13e69b5cf2729b29ee33b48208963735e6e0394a17709993e6457a0e3" + sha256 arm64_big_sur: "92abe3197ae4ee54df9af997f519538bd8e2b93f5221185f02aaa61de4b5e5aa" + sha256 cellar: :any, sonoma: "c65d52399cfdd28153cde34b05075a2be6fb2e1530f5b6f9d3a971fcf4115c27" + sha256 cellar: :any, ventura: "d4dec6840b897d0a4c59e41beb0802a6fb1c4736974558c4f96485ad3bb34792" + sha256 cellar: :any, monterey: "f179c33f2bb70a99d4f52e47f21dd8be70e49642607f47af90b1d5001f369d48" + sha256 big_sur: "c7c9999dbb12db2cfd64815a3df772be7222278bb22e857b72d0db0101d498af" + sha256 catalina: "105f54c1cb830584bcf694756ab18eab2a7d9a67e3226699272c4449cc2f816e" + sha256 cellar: :any_skip_relocation, arm64_linux: "b136f971a5b05201d52c353da5db32fb4d0781d79ded3ac590425f03e12ea3b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5940970f22f2f7c70ad15cda8f227df675d47924d4a37ff5461699dde188f7f" + end + + depends_on "cmake" => :build + depends_on "libpng" + + uses_from_macos "zlib" + + # Fixes build with CMake 4.0+. + patch :DATA + + def install + # Installs CMake archive files directly into lib, which we discourage. + # Workaround by adding version to libdir & then symlink into expected structure. + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DTeem_USE_LIB_INSTALL_SUBDIR=ON + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + lib.install_symlink Dir.glob(lib/"Teem-#{version}/#{shared_library("*")}") + (lib/"cmake/teem").install_symlink Dir.glob(lib/"Teem-#{version}/*.cmake") + end + + test do + system bin/"nrrdSanity" + end +end + +__END__ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -413,7 +413,7 @@ ELSE(Teem_USE_LIB_INSTALL_SUBDIR) + SET(EXTRA_INSTALL_PATH "") + ENDIF(Teem_USE_LIB_INSTALL_SUBDIR) + +-INSTALL(TARGETS teem ++INSTALL(TARGETS teem EXPORT teem-export + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${EXTRA_INSTALL_PATH} + ARCHIVE DESTINATION lib${EXTRA_INSTALL_PATH} +@@ -448,7 +448,7 @@ ENDIF(BUILD_TESTING) + #----------------------------------------------------------------------------- + # Help outside projects build Teem projects. + INCLUDE(CMakeExportBuildSettings) +-EXPORT_LIBRARY_DEPENDENCIES(${Teem_BINARY_DIR}/TeemLibraryDepends.cmake) ++install(EXPORT teem-export DESTINATION lib${EXTRA_INSTALL_PATH} FILE TeemLibraryDepends.cmake) + CMAKE_EXPORT_BUILD_SETTINGS(${Teem_BINARY_DIR}/TeemBuildSettings.cmake) + + SET(CFLAGS "${CMAKE_C_FLAGS}") +@@ -512,6 +512,5 @@ INSTALL(FILES + "${Teem_BINARY_DIR}/CMake/TeemConfig.cmake" + "${Teem_SOURCE_DIR}/CMake/TeemUse.cmake" + "${Teem_BINARY_DIR}/TeemBuildSettings.cmake" +- "${Teem_BINARY_DIR}/TeemLibraryDepends.cmake" + DESTINATION lib${EXTRA_INSTALL_PATH} + ) diff --git a/Formula/t/teensy_loader_cli.rb b/Formula/t/teensy_loader_cli.rb new file mode 100644 index 0000000000000..6dbf4d0b4dc61 --- /dev/null +++ b/Formula/t/teensy_loader_cli.rb @@ -0,0 +1,45 @@ +class TeensyLoaderCli < Formula + desc "Command-line integration for Teensy USB development boards" + homepage "https://www.pjrc.com/teensy/loader_cli.html" + url "https://github.com/PaulStoffregen/teensy_loader_cli/archive/refs/tags/2.3.tar.gz" + sha256 "d9c5357d7e8b99e9a9ae93f5e921c35a133a4a5d399f57eec10f3a606be5d89f" + license "GPL-3.0-only" + head "https://github.com/PaulStoffregen/teensy_loader_cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "16c36bc25668e666c3ac22f0d6f2f6344e22eddd0488fbe8627481b1e0e4ea9a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b91358c333152610ecbdb875f7c77eb7e3e5db9a8165ce08fb4932a526dc1330" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "31075e6eb9a92d0ddaa3b9505c00fd00c77b057dc817b192c02bb0a3c1bb9cd0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "369f2615e61079c280fa552715b8a771d3f620f4b05bc494b45c568b8f647fb0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6a73f7e320626476c5bbf849d59794329cc55414f9e3dca28e4f6ff7f0e74720" + sha256 cellar: :any_skip_relocation, sonoma: "0beb513ca87f99ee2a03e3700570bb2e82f7f6905b2921a5a14a31df6e0f12bf" + sha256 cellar: :any_skip_relocation, ventura: "1800778350862ed8662bf3183296fb5ba2efc08a5d9dd4531f684639176d02ee" + sha256 cellar: :any_skip_relocation, monterey: "1ac5153cfe35bc276fc73c0bb14823f34bd8ae34b408ab81d3140df1db128d03" + sha256 cellar: :any_skip_relocation, arm64_linux: "e48cb8f9df797606fcae3289ae2c308f39760ddc4e8c1a2c098e23af48ac5d1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "578d01b193225d1af0f017f21000dc19fa544e15c090af656869c1de14eb7f44" + end + + on_linux do + depends_on "libusb-compat" + end + + def install + if OS.mac? + ENV["OS"] = "MACOSX" + ENV["SDK"] = MacOS.sdk_path || "/" + + # Work around "Error opening HID Manager" by disabling HID Manager check. Port of alswl's fix. + # Ref: https://github.com/alswl/teensy_loader_cli/commit/9c16bb0add3ba847df5509328ad6bd5bc09d9ecd + # Ref: https://forum.pjrc.com/threads/36546-teensy_loader_cli-on-OSX-quot-Error-opening-HID-Manager-quot + inreplace "teensy_loader_cli.c", /ret != kIOReturnSuccess/, "0" + end + + system "make" + bin.install "teensy_loader_cli" + end + + test do + output = shell_output("#{bin}/teensy_loader_cli 2>&1", 1) + assert_match "Filename must be specified", output + end +end diff --git a/Formula/t/teip.rb b/Formula/t/teip.rb new file mode 100644 index 0000000000000..d477be773a9ec --- /dev/null +++ b/Formula/t/teip.rb @@ -0,0 +1,51 @@ +class Teip < Formula + desc 'Masking tape to help commands "do one thing well"' + homepage "https://github.com/greymd/teip" + url "https://github.com/greymd/teip/archive/refs/tags/v2.3.2.tar.gz" + sha256 "c9e45d9f5fb263a67c42907d05d8a20dd62b910175270a59decc475e66ea6031" + license "MIT" + head "https://github.com/greymd/teip.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d5cf074867fb73e8e9d8553194cf8672c935c5921b969051b321021050ee841d" + sha256 cellar: :any, arm64_sequoia: "dc593ddc6816e59c32a3c28434566875dd30036937ed24fb6fbaf0b11c813f21" + sha256 cellar: :any, arm64_sonoma: "4df0b07d8bd0edaf62e6daac722039dc3dfb1f1e8340439e41c2631cb3eeec4c" + sha256 cellar: :any, arm64_ventura: "939622ea9607368b299e1eb0a3c19c01320a0399f8c01fa8502d14794fc1e983" + sha256 cellar: :any, arm64_monterey: "924342e2ea29ddf0eaa9906e74c6cf03b1356d00091bf24b54788bf61136b7b4" + sha256 cellar: :any, sonoma: "3f757977cbafda79df194a8e162bd144236fc7c4bbb7ec3c3adc389130470a3a" + sha256 cellar: :any, ventura: "3c20de30934eb61457693d5c6747425220abcba516f541eaed678e5c21cf7278" + sha256 cellar: :any, monterey: "700d30d9d917de84ae8f2e517a9d424a279cc3cbad82caaa360a2b78a1133047" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5278da10c0acf92bf08183e58fe34b4c000fa56923afb1e12f8352fb296f10f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82477350d16f0ce242352d7d6046fb2a1a2024cd9ba064219012e5c451d9b582" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" + + uses_from_macos "llvm" => :build # for libclang + + def install + ENV["RUSTONIG_DYNAMIC_LIBONIG"] = "1" + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + system "cargo", "install", "--features", "oniguruma", *std_cargo_args + man1.install "man/teip.1" + zsh_completion.install "completion/zsh/_teip" + fish_completion.install "completion/fish/teip.fish" + bash_completion.install "completion/bash/teip" + end + + test do + require "utils/linkage" + + ENV["TEIP_HIGHLIGHT"] = "<{}>" + assert_match "<1>23", pipe_output("#{bin}/teip -c 1", "123", 0) + + [ + Formula["oniguruma"].opt_lib/shared_library("libonig"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"teip", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/t/tektoncd-cli.rb b/Formula/t/tektoncd-cli.rb new file mode 100644 index 0000000000000..b31b2b8fbf60b --- /dev/null +++ b/Formula/t/tektoncd-cli.rb @@ -0,0 +1,37 @@ +class TektoncdCli < Formula + desc "CLI for interacting with TektonCD" + homepage "https://github.com/tektoncd/cli" + url "https://github.com/tektoncd/cli/archive/refs/tags/v0.42.0.tar.gz" + sha256 "75ebac469ce88bc8e5b841be8749aa8abd6a54d3fb6de4d7a5dfc3076f7fbadf" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "43684a7e01fea5b6aa0c83f1c130748a53f6267a56e1fb5dd609667c4cb03e9f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3868939904bd4eb1c9614f352014100df40a550af4b6282eea021a859c94abdb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2fb0a47fdd1bb4a29c54d910b50d8eafd9438ebceceff23096ebc10d18b8b0bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bdf5b8749277adea716fd96619a59a553fa3855f6b71ced9429e24cb9fb0716a" + sha256 cellar: :any_skip_relocation, sonoma: "8257fc9a12e4d996330227e5386b759968fca2ac71a5875660857b40df206b37" + sha256 cellar: :any_skip_relocation, ventura: "e4c6c550430258ca05f694e6970734c6315321e4077ad9bab7d5d6b5c5449376" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f31481fb06fc3a815dfa42b43ef02d3c08d5c9483310bc00f8e142870e3d48d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ea98ca60b01fdb0031b0d2b8defa4be64ea0b96050ac0200fdcd008612a8ab8" + end + + depends_on "go" => :build + + def install + system "make", "bin/tkn" + bin.install "bin/tkn" => "tkn" + + generate_completions_from_executable(bin/"tkn", "completion") + end + + test do + output = shell_output("#{bin}/tkn pipelinerun describe homebrew-formula 2>&1", 1) + assert_match "Error: Couldn't get kubeConfiguration namespace", output + end +end diff --git a/Formula/t/teku.rb b/Formula/t/teku.rb new file mode 100644 index 0000000000000..91f7bd0309bcc --- /dev/null +++ b/Formula/t/teku.rb @@ -0,0 +1,45 @@ +class Teku < Formula + desc "Java Implementation of the Ethereum 2.0 Beacon Chain" + homepage "https://docs.teku.consensys.net/" + url "https://github.com/ConsenSys/teku.git", + tag: "25.11.0", + revision: "766920acb458d681f86edd60e0d5e6611cfcd4c8" + license "Apache-2.0" + head "https://github.com/ConsenSys/teku.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "647333b6b37e02b4552c9f9d63041447fe51a28055b1793d0ad7010ab59e2e37" + end + + depends_on "gradle@8" => :build + depends_on "openjdk" + + def install + system "gradle", "installDist" + + libexec.install Dir["build/install/teku/*"] + + (bin/"teku").write_env_script libexec/"bin/teku", Language::Java.overridable_java_home_env + end + + test do + assert_match "teku/", shell_output("#{bin}/teku --version") + + rest_port = free_port + test_args = %W[ + --ee-endpoint=http://127.0.0.1 + --ignore-weak-subjectivity-period-enabled + --rest-api-enabled + --rest-api-port=#{rest_port} + --p2p-enabled=false + + ] + fork do + exec bin/"teku", *test_args + end + sleep 15 + + output = shell_output("curl -sS -XGET http://127.0.0.1:#{rest_port}/eth/v1/node/syncing") + assert_match "is_syncing", output + end +end diff --git a/Formula/t/telegraf.rb b/Formula/t/telegraf.rb new file mode 100644 index 0000000000000..11780cd12c421 --- /dev/null +++ b/Formula/t/telegraf.rb @@ -0,0 +1,49 @@ +class Telegraf < Formula + desc "Plugin-driven server agent for collecting & reporting metrics" + homepage "https://www.influxdata.com/time-series-platform/telegraf/" + url "https://github.com/influxdata/telegraf/archive/refs/tags/v1.36.3.tar.gz" + sha256 "bbf1ff269da3c55101d171fedae8f74b20a00b3e33823ac9eddbe248bf4fc76b" + license "MIT" + head "https://github.com/influxdata/telegraf.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e1e963034b8f1a9133a29c7eee05827a543320f33655c7e1be457b1ce8b9082" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f98285790a41e369936e399f19fed4ad6a7320a19e7176134be31ec353e11f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb7ed4cf974db5ac9868829d14c1a6d4a0e47029a9f581d32c805c7193aba68b" + sha256 cellar: :any_skip_relocation, sonoma: "f7711a98448b83fa81b7dcb16ade04c9dda2e0a17da513cfa69aae6c1b9a288d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a48b84dd3f801930313ae8121d5f4d132b3e14861c9ebcfc3bc35d2f0bc8a019" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43cd02ad6212cb80c56d4c7cdd9b91a71c179a48cf327d60e79fd02c6aa39b08" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/influxdata/telegraf/internal.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/telegraf" + + (buildpath/"telegraf.conf").write Utils.safe_popen_read(bin/"telegraf", "config") + etc.install "telegraf.conf" + # Create directory for additional user configurations + (etc/"telegraf.d").mkpath + end + + service do + run [opt_bin/"telegraf", "-config", etc/"telegraf.conf", "-config-directory", etc/"telegraf.d"] + keep_alive true + working_dir var + log_path var/"log/telegraf.log" + error_log_path var/"log/telegraf.log" + environment_variables HOME: HOMEBREW_PREFIX + end + + test do + assert_match version.to_s, shell_output("#{bin}/telegraf --version") + (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") + system bin/"telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" + end +end diff --git a/Formula/t/telegram-downloader.rb b/Formula/t/telegram-downloader.rb new file mode 100644 index 0000000000000..4a621c0a44cf2 --- /dev/null +++ b/Formula/t/telegram-downloader.rb @@ -0,0 +1,39 @@ +class TelegramDownloader < Formula + desc "Telegram Messenger downloader/tools written in Golang" + homepage "https://docs.iyear.me/tdl/" + url "https://github.com/iyear/tdl/archive/refs/tags/v0.19.2.tar.gz" + sha256 "b30c37f1c0ce86027288b2e26c7c445bf0ac17608023967ebb4893928fd3e7d7" + license "AGPL-3.0-only" + head "https://github.com/iyear/tdl.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c37182e227783ef49b902c0f26ee5942f954474080ea311130eae47051ccc749" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52577886ec767716895563462765268a52edb2f08e4b3140362893d122a9d227" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "baa0337af8214dc4119764cf00a59617fe759e404549c0a85865877e458c2e36" + sha256 cellar: :any_skip_relocation, sonoma: "6b77e39f55d27404159d6618b5c4a0a0453eb11c2cea72d36f7466f65a4783c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7378ba3a892f1085ba51215c4ea86d1c248b914326a5ea27a26e6a2022da053" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9224b9978bed5e238dcef82735871adf8480499ffd62d010179f6ab0a4652907" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/iyear/tdl/pkg/consts.Version=#{version} + -X github.com/iyear/tdl/pkg/consts.Commit=#{tap.user} + -X github.com/iyear/tdl/pkg/consts.CommitDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"tdl") + + generate_completions_from_executable(bin/"tdl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/tdl version") + + assert_match "not authorized. please login first", shell_output("#{bin}/tdl chat ls -n _test", 1) + end +end diff --git a/Formula/t/teleport.rb b/Formula/t/teleport.rb new file mode 100644 index 0000000000000..def0e37445b94 --- /dev/null +++ b/Formula/t/teleport.rb @@ -0,0 +1,106 @@ +class Teleport < Formula + desc "Modern SSH server for teams managing distributed infrastructure" + homepage "https://goteleport.com/" + url "https://github.com/gravitational/teleport/archive/refs/tags/v18.3.0.tar.gz" + sha256 "04b7c1382275a4de270030db527b9e1918393a1aba8235f05f8e023844626b70" + license all_of: ["AGPL-3.0-or-later", "Apache-2.0"] + head "https://github.com/gravitational/teleport.git", branch: "master" + + # As of writing, two major versions of `teleport` are being maintained + # side by side and the "latest" release can point to an older major version, + # so we can't use the `GithubLatest` strategy. We use the `GithubReleases` + # strategy instead of `Git` because there is often a notable gap (days) + # between when a version is tagged and released. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "35f164b0725f0f29a6e4394e0d759737b1c8ca28c2425c49b7da9f0a6df23001" + sha256 cellar: :any, arm64_sequoia: "3b9a035c15328b6676f70115190ed8fa4a4ca0d82672197fa9b4dcf282db73d4" + sha256 cellar: :any, arm64_sonoma: "163004b070625a0862aea06a60bb7640319cf31afd09f8b8b9cb2412f22d3e29" + sha256 cellar: :any, sonoma: "4af6c4b53417a767e3d24137d7de07f80a6713bea125d817eb27abb3b0935b51" + sha256 cellar: :any_skip_relocation, arm64_linux: "26cc87883a72123826aae7338eb17669b722937498a3a7947544f8ae3a6513c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65c69c5a448e81ef8b6efed2ebfcd2236a2abf5e8e56665c0718d83afc2e0d45" + end + + depends_on "go" => :build + depends_on "node@22" => :build # node 24 support issue, https://github.com/gravitational/teleport/issues/57202 + depends_on "pkgconf" => :build + depends_on "pnpm" => :build + depends_on "rust" => :build + # TODO: try to remove rustup dependancy, see https://github.com/Homebrew/homebrew-core/pull/191633#discussion_r1774378671 + depends_on "rustup" => :build + depends_on "wasm-pack" => :build + depends_on "libfido2" + depends_on "openssl@3" + + uses_from_macos "zip" + + conflicts_with "etsh", because: "both install `tsh` binaries" + conflicts_with "tctl", because: "both install `tctl` binaries" + conflicts_with cask: "teleport-suite" + conflicts_with cask: "teleport-suite@17" + conflicts_with cask: "teleport-suite@16" + conflicts_with cask: "tsh", because: "both install `tsh` binaries" + conflicts_with cask: "tsh@13", because: "both install `tsh` binaries" + + # disable `wasm-opt` for ironrdp pkg release build, upstream pr ref, https://github.com/gravitational/teleport/pull/50178 + patch :DATA + + def install + # Prevent pnpm from downloading another copy due to `packageManager` feature + (buildpath/"pnpm-workspace.yaml").append_lines <<~YAML + managePackageManagerVersions: false + YAML + + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "stable" + + ENV.deparallelize { system "make", "full", "FIDO2=dynamic" } + bin.install Dir["build/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/teleport version") + assert_match version.to_s, shell_output("#{bin}/tsh version") + assert_match version.to_s, shell_output("#{bin}/tctl version") + + mkdir testpath/"data" + (testpath/"config.yml").write <<~YAML + version: v2 + teleport: + nodename: testhost + data_dir: #{testpath}/data + log: + output: stderr + severity: WARN + YAML + + spawn bin/"teleport", "start", "--roles=proxy,node,auth", "--config=#{testpath}/config.yml" + sleep 10 + system "curl", "--insecure", "https://localhost:3080" + + status = shell_output("#{bin}/tctl status --config=#{testpath}/config.yml") + assert_match(/Cluster:\s*testhost/, status) + assert_match(/Version:\s*#{version}/, status) + end +end + +__END__ +diff --git a/web/packages/shared/libs/ironrdp/Cargo.toml b/web/packages/shared/libs/ironrdp/Cargo.toml +index ddcc4db..913691f 100644 +--- a/web/packages/shared/libs/ironrdp/Cargo.toml ++++ b/web/packages/shared/libs/ironrdp/Cargo.toml +@@ -7,6 +7,9 @@ publish.workspace = true + + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + ++[package.metadata.wasm-pack.profile.release] ++wasm-opt = false ++ + [lib] + crate-type = ["cdylib"] diff --git a/Formula/t/television.rb b/Formula/t/television.rb new file mode 100644 index 0000000000000..101a080b1c1ec --- /dev/null +++ b/Formula/t/television.rb @@ -0,0 +1,33 @@ +class Television < Formula + desc "General purpose fuzzy finder TUI" + homepage "https://github.com/alexpasmantier/television" + url "https://github.com/alexpasmantier/television/archive/refs/tags/0.13.8.tar.gz" + sha256 "db252ceb27d8cac92c9a09525ca95894a89754802409cf35e17b7bac5096bbcf" + license "MIT" + head "https://github.com/alexpasmantier/television.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1864c11cc95d91fd90b3aeb0a8873a5d385fe8c8bbcd5799ff1045f7b35122c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17fa78f84bcac37f09e045936d8aa5cccf8aca5dcba2b6d640a09308231c5a80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e0b50bcb0bda8b0f3d089b8879b9c1d7ee0bda6d401ca794d593615468e3cc5" + sha256 cellar: :any_skip_relocation, sonoma: "46e864981d02ba3e7c7df821b47d45c1a968494870689ebcc5dad22eb0b6218e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc09f998c7fe93329c1c74b577f9703ef48f76f01e0f7a895fbad1de6b193c23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f31cfb9888d715a2397139a365cc73b821f72bb55caad160f69a163abff75446" + end + + depends_on "rust" => :build + + conflicts_with "tidy-viewer", because: "both install `tv` binaries" + + def install + system "cargo", "install", *std_cargo_args + man1.install "man/tv.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tv -V") + + output = shell_output("#{bin}/tv help") + assert_match "Cross-platform", output + end +end diff --git a/Formula/t/teller.rb b/Formula/t/teller.rb new file mode 100644 index 0000000000000..94d43ac9ba091 --- /dev/null +++ b/Formula/t/teller.rb @@ -0,0 +1,56 @@ +class Teller < Formula + desc "Secrets management tool for developers" + homepage "https://github.com/tellerops/teller" + url "https://github.com/tellerops/teller/archive/refs/tags/v2.0.7.tar.gz" + sha256 "1d4275ede4366a31efc94039c58da4cec87466d09cc01444c3c18e9432716d23" + license "Apache-2.0" + head "https://github.com/tellerops/teller.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c3ab62c1579d3f41b3642fe3b3170a8c116be3abb320b09aac2c8f37b5ad51ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9e07be61dd9142e5650014b5f8ef4df9bf689dc59d1b2a4e8825554db831ea2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "703d3907b7c26f917c3fe9fd1e87cad407a54c9f687104bf0b99a0027a91bfc7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a778a5408aa36e9c37b43b174e836bec8b3a33e47c277fe1848bca16e138f159" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ee1a519ff52b6ac79cf9452148c1e43da20f53b3c480c4e6c720dc6eaa7aa1d9" + sha256 cellar: :any_skip_relocation, sonoma: "1e8cec0e0438ed0d2fd78f55732c0e25817a5f5b29abec395feab13ed7064ce4" + sha256 cellar: :any_skip_relocation, ventura: "ef538ec71a01c3d9c720834548d1d1ef69c188e3b35af336aa929cdbcc410dcf" + sha256 cellar: :any_skip_relocation, monterey: "6a2c68920ddfa793d15b9929c3776bdf57dae94c1bba39a3ecc98b469971fdf2" + sha256 cellar: :any_skip_relocation, arm64_linux: "732e1ec643cafa019abff281687553156cb58b234b896f4294617137b37c21bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5a575efbb6d5fc01d43cd7ba2f6df6c0fc121e696b7b176a8b309c55b955503" + end + + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "teller-cli") + end + + test do + (testpath/"test.env").write <<~EOS + foo=bar + EOS + + (testpath/".teller.yml").write <<~YAML + project: brewtest + providers: + # this will fuse vars with the below .env file + # use if you'd like to grab secrets from outside of the project tree + dotenv: + kind: dotenv + maps: + - id: one + path: #{testpath}/test.env + YAML + + output = shell_output("#{bin}/teller -c #{testpath}/.teller.yml show 2>&1") + assert_match "[dotenv (dotenv)]: foo = ba", output + + assert_match version.to_s, shell_output("#{bin}/teller --version") + end +end diff --git a/Formula/t/telnet.rb b/Formula/t/telnet.rb new file mode 100644 index 0000000000000..b5dc78523185d --- /dev/null +++ b/Formula/t/telnet.rb @@ -0,0 +1,63 @@ +class Telnet < Formula + desc "User interface to the TELNET protocol" + homepage "https://opensource.apple.com/" + url "https://github.com/apple-oss-distributions/remote_cmds/archive/refs/tags/remote_cmds-306.tar.gz" + sha256 "7f014f7eebb115460ea782e6bcade6d16effa56da17ee30f00012af07bc96c36" + license all_of: ["BSD-4-Clause-UC", "APSL-1.0"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6916778f3b7f0607f648eba463764b8aaf9249daa4d6f12f3f2c2891c925059a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5314fd7135b21e32772b3d96751829e521453a429ab6b734fefbc99b4c94446" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4db0190453f42c13370d8412c5d15398c1f85528c2f55e0e7f70d87d6fe1fd19" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19ac3a5684b7216a9f42b0d38574fe09b675060184a703b9ce902778080b45e2" + sha256 cellar: :any_skip_relocation, sonoma: "7cd17dbe54ca38974677ffaa5716384f0095957f5ad6aa5ee6e6398f58de6cb9" + sha256 cellar: :any_skip_relocation, ventura: "e19e94a0f40871798ad05efa016f6bfd367b6216e3230d87324d41437411562a" + end + + depends_on xcode: :build + depends_on :macos + + conflicts_with "inetutils", because: "both install 'telnet' binaries" + + resource "libtelnet" do + url "https://github.com/apple-oss-distributions/libtelnet/archive/refs/tags/libtelnet-13.tar.gz" + sha256 "4ffc494a069257477c3a02769a395da8f72f5c26218a02b9ea73fa2a63216cee" + end + + def install + resource("libtelnet").stage do + ENV["SDKROOT"] = MacOS.sdk_path + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version + + xcodebuild "OBJROOT=build/Intermediates", + "SYMROOT=build/Products", + "DSTROOT=build/Archive", + "-IDEBuildLocationStyle=Custom", + "-IDECustomDerivedDataLocation=#{buildpath}", + "-arch", Hardware::CPU.arch + + libtelnet_dst = buildpath/"libtelnet" + libtelnet_dst.install "build/Products/Release/libtelnet.a" + libtelnet_dst.install "build/Products/Release/usr/local/include/libtelnet/" + end + + xcodebuild "OBJROOT=build/Intermediates", + "SYMROOT=build/Products", + "DSTROOT=build/Archive", + "OTHER_CFLAGS=${inherited} #{ENV.cflags} -I#{buildpath}/libtelnet", + "OTHER_LDFLAGS=${inherited} #{ENV.ldflags} -L#{buildpath}/libtelnet", + "-IDEBuildLocationStyle=Custom", + "-IDECustomDerivedDataLocation=#{buildpath}", + "-sdk", "macosx", + "-arch", Hardware::CPU.arch, + "-target", "telnet" + + bin.install "build/Products/Release/telnet" + man1.install "telnet/telnet.1" + end + + test do + output = shell_output("#{bin}/telnet india.colorado.edu 13", 1) + assert_match "Connected to india.colorado.edu.", output + end +end diff --git a/Formula/t/telnetd.rb b/Formula/t/telnetd.rb new file mode 100644 index 0000000000000..ca4a5579dd39b --- /dev/null +++ b/Formula/t/telnetd.rb @@ -0,0 +1,70 @@ +class Telnetd < Formula + desc "TELNET server" + homepage "https://opensource.apple.com/" + url "https://github.com/apple-oss-distributions/remote_cmds/archive/refs/tags/remote_cmds-306.tar.gz" + sha256 "7f014f7eebb115460ea782e6bcade6d16effa56da17ee30f00012af07bc96c36" + license all_of: ["BSD-4-Clause-UC", "BSD-3-Clause"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "352b9a21a62d85b6636369978ad5b6bffa79323abbd985371f663d6da0c16e30" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07bf8f40affa2499a35c1d4721d0f037e12081c299a43df1c11a0a51ebf15ac0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed85960517cbb617e9b60788b809d4909266b9a377d28d714f9a713858fd57da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "02ad1e6f02dcf3316ecb981540fcac0ebf600ffe5f24250a830704464742185c" + sha256 cellar: :any_skip_relocation, sonoma: "7fea7f6cc2ea119744bfa263e2c2a67766d169fb9ed0f73a97a6de8c00a0e06e" + sha256 cellar: :any_skip_relocation, ventura: "447534356a8a29764410dcf44c188300ce42e57487f9c8145d81b19d1b0868b4" + end + + depends_on xcode: :build + depends_on :macos + + resource "libtelnet" do + url "https://github.com/apple-oss-distributions/libtelnet/archive/refs/tags/libtelnet-13.tar.gz" + sha256 "4ffc494a069257477c3a02769a395da8f72f5c26218a02b9ea73fa2a63216cee" + end + + def install + resource("libtelnet").stage do + xcodebuild "OBJROOT=build/Intermediates", + "SYMROOT=build/Products", + "DSTROOT=build/Archive", + "-IDEBuildLocationStyle=Custom", + "-IDECustomDerivedDataLocation=#{buildpath}", + "-arch", Hardware::CPU.arch + + libtelnet_dst = buildpath/"libtelnet" + libtelnet_dst.install "build/Products/Release/libtelnet.a" + libtelnet_dst.install "build/Products/Release/usr/local/include/libtelnet/" + end + + xcodebuild "OBJROOT=build/Intermediates", + "SYMROOT=build/Products", + "DSTROOT=build/Archive", + "OTHER_CFLAGS=${inherited} #{ENV.cflags} -I#{buildpath}/libtelnet", + "OTHER_LDFLAGS=${inherited} #{ENV.ldflags} -L#{buildpath}/libtelnet", + "-IDEBuildLocationStyle=Custom", + "-IDECustomDerivedDataLocation=#{buildpath}", + "-sdk", "macosx", + "-arch", Hardware::CPU.arch, + "-target", "telnetd" + + sbin.install "build/Products/Release/telnetd" + man8.install "telnetd/telnetd.8" + end + + def caveats + <<~EOS + You may need super-user privileges to run this program properly. See the man + page for more details. + EOS + end + + test do + assert_match "usage: telnetd", shell_output("#{sbin}/telnetd usage 2>&1", 1) + port = free_port + fork do + exec "#{sbin}/telnetd -debug #{port}" + end + sleep 2 + system "nc", "-vz", "127.0.0.1", port + end +end diff --git a/Formula/t/templ.rb b/Formula/t/templ.rb new file mode 100644 index 0000000000000..25cce42e1ba8b --- /dev/null +++ b/Formula/t/templ.rb @@ -0,0 +1,37 @@ +class Templ < Formula + desc "Language for writing HTML user interfaces in Go" + homepage "https://templ.guide" + url "https://github.com/a-h/templ/archive/refs/tags/v0.3.960.tar.gz" + sha256 "61c1d8fe51c6351be10977e69049787eae44aa1fa7c09bfac493c80a1f884dae" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f5871f3f6a56e89e8cc808917542723963ddc39c60d940356afa51c6cb742057" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f5871f3f6a56e89e8cc808917542723963ddc39c60d940356afa51c6cb742057" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5871f3f6a56e89e8cc808917542723963ddc39c60d940356afa51c6cb742057" + sha256 cellar: :any_skip_relocation, sonoma: "c0656f2d51b518adf724c8729971db695cdffe560af475ac6a07b37a23035f4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbf42e75d9d672142875ee5bd63a9e1ce4027777910d1459befc4ec12a851365" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63d98da9d9d73e96a7451977fdef3b670bf2dd875a521aa45f7a458909322975" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/templ" + end + + test do + assert_match version.to_s, shell_output("#{bin}/templ version") + + (testpath/"test.templ").write <<~TEMPL + package main + + templ Test() { +

    Hello, World

    + } + TEMPL + + output = shell_output("#{bin}/templ generate -stdout -f #{testpath}/test.templ") + assert_match "func Test() templ.Component {", output + end +end diff --git a/Formula/t/template-glib.rb b/Formula/t/template-glib.rb new file mode 100644 index 0000000000000..e4cc0ea62e8f4 --- /dev/null +++ b/Formula/t/template-glib.rb @@ -0,0 +1,52 @@ +class TemplateGlib < Formula + desc "GNOME templating library for GLib" + homepage "https://gitlab.gnome.org/GNOME/template-glib" + url "https://download.gnome.org/sources/template-glib/3.38/template-glib-3.38.0.tar.xz" + sha256 "40d00dc223dcf2eb7f2ec422f7dec5a67373a0ca1101abca0f49c62f050cb312" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b3ab7adc6345abeb4dc093292a825914ecaffd78d30ba9f0847e12b5aa9f2d97" + sha256 cellar: :any, arm64_sequoia: "d373da3667fd52328b674bfee2e7e00ae6491c1bb5c062c6a708405024eead88" + sha256 cellar: :any, arm64_sonoma: "7f5ece60e9438f43195763b98fdd4288515e1e56a3def2c5ffc18201fcc68fb9" + sha256 cellar: :any, sonoma: "3ec54286435a0e5ce5c8eb74b984bfbac346e8170f83591dd5c9984d70c5ab4e" + sha256 arm64_linux: "4305c9ea3e417f2e4db5784a1eac0cccdf5a1043ea45f65bb1bd92ecfcb5e1bc" + sha256 x86_64_linux: "ce711717e79f3d62de5c5462b667809227a3c7296e1c030b15aa2fe915f2a172" + end + + depends_on "bison" => :build # does not appear to work with system bison + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + depends_on "glib" + depends_on "gobject-introspection" + + uses_from_macos "flex" => :build + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dvapi=true", "-Dintrospection=enabled", "-Dtests=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + TmplTemplateLocator *locator = tmpl_template_locator_new(); + g_assert_nonnull(locator); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs template-glib-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/t/temporal.rb b/Formula/t/temporal.rb new file mode 100644 index 0000000000000..a4beccc495a44 --- /dev/null +++ b/Formula/t/temporal.rb @@ -0,0 +1,46 @@ +class Temporal < Formula + desc "Command-line interface for running and interacting with Temporal Server and UI" + homepage "https://temporal.io/" + url "https://github.com/temporalio/cli/archive/refs/tags/v1.5.1.tar.gz" + sha256 "7f0e9ac007df107f6efc05e8ac257642956ec0e04d565bf800ccc3ce62cf70dd" + license "MIT" + head "https://github.com/temporalio/cli.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aac60cdba8f3404bdb99f7a3bbffa4b3f87eed42a4d3fa9d25f713e47efe4c1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a60f858acca3c426cbbc3c3d44bcf300ff3c21d07d0a4283f98e4f0599b2df8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e2e9e9b71dc15b45e9ac6e4793d92c1b10b9437c6ba841155e7b0b5495cc184" + sha256 cellar: :any_skip_relocation, sonoma: "a8d2fe89d770ac803683188b1bccd3271c2499c5e4024db263d1c486b5b11c54" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba07ab189d087b8a6580c0897b463369f6ecf7903920e252cc063fc101cfc3df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1207471e6b15856c80c00e392bab6217dddbe5ca26a689435446e2e061d085cb" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/temporalio/cli/temporalcli.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/temporal" + generate_completions_from_executable bin/"temporal", "completion" + end + + service do + run [opt_bin/"temporal", "server", "start-dev"] + keep_alive true + error_log_path var/"log/temporal.log" + log_path var/"log/temporal.log" + working_dir var + end + + test do + run_output = shell_output("#{bin}/temporal --version") + assert_match "temporal version #{version}", run_output + + run_output = shell_output("#{bin}/temporal workflow list --address 192.0.2.0:1234 2>&1", 1) + assert_match "failed reaching server", run_output + end +end diff --git a/Formula/t/temporal_tables.rb b/Formula/t/temporal_tables.rb new file mode 100644 index 0000000000000..081c965495e9e --- /dev/null +++ b/Formula/t/temporal_tables.rb @@ -0,0 +1,70 @@ +class TemporalTables < Formula + desc "Temporal Tables PostgreSQL Extension" + homepage "https://pgxn.org/dist/temporal_tables/" + url "https://github.com/arkhipov/temporal_tables/archive/refs/tags/v1.2.2.tar.gz" + sha256 "85517266748a438ab140147cb70d238ca19ad14c5d7acd6007c520d378db662e" + license "BSD-2-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "961c3574dee3785c6a4a2d5dfee3fc55c758b09b06df2dc106a6f20caf555c18" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2be633c14e63c4523d088fd0caadba5c804d7b2d9683f6a78e56f3e5111596d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f35985639da76876dd1f2a903d24d2339eab09eb9e2885a01227a78c5016cc5f" + sha256 cellar: :any_skip_relocation, sonoma: "2a3a851746ab81698051d7d408bcb4ebb38948aa5135f49480a62e8ac42c1acb" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c361513b78e4984086bb63776a72ecb2d2b44fb4c086cffa269652eefecafc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41bcf18a2b6d4abee03cd3f87ddcceb820fee5410d2442ad1613075f7fc97c92" + end + + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + postgresqls.each do |postgresql| + args = %W[ + PG_CONFIG=#{postgresql.opt_bin}/pg_config + pkglibdir=#{lib/postgresql.name} + datadir=#{share/postgresql.name} + docdir=#{doc} + ] + system "make", "install", *args + system "make", "clean", *args + end + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + psql = postgresql.opt_bin/"psql" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'temporal_tables' + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + begin + system psql, "-p", port.to_s, "-c", "CREATE EXTENSION \"temporal_tables\";", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/t/tendermint.rb b/Formula/t/tendermint.rb new file mode 100644 index 0000000000000..e81558e0cbda7 --- /dev/null +++ b/Formula/t/tendermint.rb @@ -0,0 +1,50 @@ +class Tendermint < Formula + desc "BFT state machine replication for applications in any programming languages" + homepage "https://tendermint.com/" + url "https://github.com/tendermint/tendermint/archive/refs/tags/v0.35.9.tar.gz" + sha256 "8385fb075e81d4d4875573fdbc5f2448372ea9eaebc1b18421d6fb497798774b" + license "Apache-2.0" + head "https://github.com/tendermint/tendermint.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ddc9b6cc60737cbd10628628ad914d6e1330a2a327eec2795674ae15b7f0c714" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1511d60c1245cac653fda123d49181a5041a49edfc6c33649161c032035a5d1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68ef6b0500008a57a4bd732acfdb8e8952f4de2832742cb8b4979be3bdde5089" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa03d9507cc713dc1d85b03a5374f52f0b1fa9a8bdeff7f04fabb0ce54158ac4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa03d9507cc713dc1d85b03a5374f52f0b1fa9a8bdeff7f04fabb0ce54158ac4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fa03d9507cc713dc1d85b03a5374f52f0b1fa9a8bdeff7f04fabb0ce54158ac4" + sha256 cellar: :any_skip_relocation, sonoma: "b19905fb5656c1f5412b8d669f7eaa43ff73b54825b5379b4964b3561b3b59ae" + sha256 cellar: :any_skip_relocation, ventura: "c764c958d1586a5fcf8a8ba7ede5c8edd7f350dec38689c13fd61d6e00154a3d" + sha256 cellar: :any_skip_relocation, monterey: "c764c958d1586a5fcf8a8ba7ede5c8edd7f350dec38689c13fd61d6e00154a3d" + sha256 cellar: :any_skip_relocation, big_sur: "c764c958d1586a5fcf8a8ba7ede5c8edd7f350dec38689c13fd61d6e00154a3d" + sha256 cellar: :any_skip_relocation, catalina: "c764c958d1586a5fcf8a8ba7ede5c8edd7f350dec38689c13fd61d6e00154a3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "50a1fe51c2ba29d7b0bda7a8b103a950cad2267f1e859cb525bd51b989bc91f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fad00242ca40a9571b66d96a4f31268ee81fa317726834d82475630267d9ef13" + end + + depends_on "go" => :build + + def install + system "make", "build", "VERSION=#{version}" + bin.install "build/tendermint" + + generate_completions_from_executable(bin/"tendermint", "completion", + shells: [:bash], shell_parameter_format: :none) + generate_completions_from_executable(bin/"tendermint", "completion", "--zsh", + shells: [:zsh], shell_parameter_format: :none) + end + + test do + mkdir(testpath/"staging") + shell_output("#{bin}/tendermint init full --home #{testpath}/staging") + assert_path_exists testpath/"staging/config/genesis.json" + assert_path_exists testpath/"staging/config/config.toml" + assert_path_exists testpath/"staging/data" + end +end diff --git a/Formula/t/tenere.rb b/Formula/t/tenere.rb new file mode 100644 index 0000000000000..41455e820094c --- /dev/null +++ b/Formula/t/tenere.rb @@ -0,0 +1,37 @@ +class Tenere < Formula + desc "TUI interface for LLMs written in Rust" + homepage "https://github.com/pythops/tenere" + url "https://github.com/pythops/tenere/archive/refs/tags/v0.11.3.tar.gz" + sha256 "3605fcdff3dbd5d153ed6126e98274994bd00ed83a2a1f5587058d75797257a8" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bddcfb3d99b6ff5156f85cbd3b338ebd243570526f51d8d84c2fe3ff2a4abbaa" + sha256 cellar: :any, arm64_sequoia: "0ef20facf1138986f008cd6fd4b7f0f4ee847c47f8e0f253471044d468222a14" + sha256 cellar: :any, arm64_sonoma: "0a7a2b4307ec2afb07dcb5c766c81d7a1454d3d0b668e69e4dc8de25e0f051b5" + sha256 cellar: :any, arm64_ventura: "f1d6be5362295a0be1bf0e3d2c5e1a89f64f3e14521619e4ddcfef824a1f0af1" + sha256 cellar: :any, sonoma: "17cde7da4a41e034a6fa20dcbfb8db9091cd6ee05b4b7fb35ad612b3bc061be7" + sha256 cellar: :any, ventura: "3cc90383070bf3d7a567028c64914ce022e8d5a9f55c57b7119c07f512902d4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ca836b19fd554f3f8e871363dfbe25ea82ceb2016d2209c9f622d49bddbc37d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ac1b9027c10ec8262887b680068256db66ce69499ea85d2eff4d7814031e07a" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2@1.8" + depends_on "oniguruma" + + uses_from_macos "zlib" + + def install + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/tenere --version") + assert_match "Can not find the openai api key", shell_output("#{bin}/tenere 2>&1", 1) + end +end diff --git a/Formula/t/tengo.rb b/Formula/t/tengo.rb new file mode 100644 index 0000000000000..3cc453bf5f4c5 --- /dev/null +++ b/Formula/t/tengo.rb @@ -0,0 +1,43 @@ +class Tengo < Formula + desc "Fast script language for Go" + homepage "https://tengolang.com" + url "https://github.com/d5/tengo/archive/refs/tags/v3.0.0.tar.gz" + sha256 "61279c893e0c0d2a02a21c9e724a0124e719798948776e1bac41b7fb845136ae" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c93892d0177b5d0520a654866c4822554a5a06a8599afdee5185166238e2443d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10c3e44f039ecd6b7f43ceabf80249654e25a079270b25373066051a08e0bdcc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10c3e44f039ecd6b7f43ceabf80249654e25a079270b25373066051a08e0bdcc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "10c3e44f039ecd6b7f43ceabf80249654e25a079270b25373066051a08e0bdcc" + sha256 cellar: :any_skip_relocation, sonoma: "250e938de1c268bbaa0dcb010df63c3d6427476c2a317e5ee40e4f67dd2d2b85" + sha256 cellar: :any_skip_relocation, ventura: "250e938de1c268bbaa0dcb010df63c3d6427476c2a317e5ee40e4f67dd2d2b85" + sha256 cellar: :any_skip_relocation, arm64_linux: "98750059e6eab32be3c593d770fd330c7b5c9be19305cb795151ea4ec0597faf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4c55cd3c296195d74538e9f8c922f6f3b1e12414733ffac200589d584193858" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/tengo" + end + + test do + (testpath/"main.tengo").write <<~EOS + fmt := import("fmt") + + each := func(seq, fn) { + for x in seq { fn(x) } + } + + sum := func(init, seq) { + each(seq, func(x) { init += x }) + return init + } + + fmt.println(sum(0, [1, 2, 3])) // "6" + fmt.println(sum("", [1, 2, 3])) // "123" + EOS + assert_equal "6\n123\n", shell_output("#{bin}/tengo #{testpath}/main.tengo") + end +end diff --git a/Formula/t/tenv.rb b/Formula/t/tenv.rb new file mode 100644 index 0000000000000..03768a06f4ddc --- /dev/null +++ b/Formula/t/tenv.rb @@ -0,0 +1,47 @@ +class Tenv < Formula + desc "OpenTofu / Terraform / Terragrunt / Terramate / Atmos version manager" + homepage "https://tofuutils.github.io/tenv/" + url "https://github.com/tofuutils/tenv/archive/refs/tags/v4.7.21.tar.gz" + sha256 "e320d79495cc15f22386f7b305bb4915fbb5d349e8b6d5713ca1750266cb1275" + license "Apache-2.0" + head "https://github.com/tofuutils/tenv.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d16ed18031c65fdc3abcdb0076c45406104b1c0fc97855fa481c45c2a0e59bdd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b96df51a328414e2ad5d4bb8f95cb94953dadbb516c456ef940e8a6cda6740ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b96df51a328414e2ad5d4bb8f95cb94953dadbb516c456ef940e8a6cda6740ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b96df51a328414e2ad5d4bb8f95cb94953dadbb516c456ef940e8a6cda6740ac" + sha256 cellar: :any_skip_relocation, sonoma: "2616b23ade2f41d21afe865395ee15a6a0cb7ee6b2c18c746acf53c1a839f1d8" + sha256 cellar: :any_skip_relocation, ventura: "2616b23ade2f41d21afe865395ee15a6a0cb7ee6b2c18c746acf53c1a839f1d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "a920766536256b783fadfbca3f082cf16dea68ce3c8e99d6614f36600649c50b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f919fde0fed92f5dbe82686d97ee1db952003915936ae77411449285a59d8da9" + end + + depends_on "go" => :build + + conflicts_with "opentofu", "tofuenv", because: "both install tofu binary" + conflicts_with "terragrunt", because: "both install terragrunt binary" + conflicts_with "terramate", because: "both install terramate binary" + conflicts_with "atmos", because: "both install atmos binary" + conflicts_with "tfenv", because: "tfenv symlinks terraform binaries" + conflicts_with "tgenv", because: "tgenv symlinks terragrunt binaries" + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = "-s -w -X main.version=#{version}" + %w[tenv terraform terragrunt terramate tf tofu atmos].each do |f| + system "go", "build", *std_go_args(ldflags:, output: bin/f), "./cmd/#{f}" + end + generate_completions_from_executable(bin/"tenv", "completion") + end + + test do + assert_match "1.6.2", shell_output("#{bin}/tenv tofu list-remote") + assert_match version.to_s, shell_output("#{bin}/tenv --version") + end +end diff --git a/Formula/t/tenyr.rb b/Formula/t/tenyr.rb new file mode 100644 index 0000000000000..7190ad92271b9 --- /dev/null +++ b/Formula/t/tenyr.rb @@ -0,0 +1,63 @@ +class Tenyr < Formula + desc "32-bit computing environment (including simulated CPU)" + homepage "https://kulp.github.io/tenyr/" + url "https://github.com/kulp/tenyr/archive/refs/tags/v0.9.9.tar.gz" + sha256 "29010e3df8449e9210faf96ca5518d573af4ada4939fe1e7cfbc169fe9179224" + license "MIT" + head "https://github.com/kulp/tenyr.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "594fd49bb4b9498796f617ff227b3524b3d7612e8c3eca557f22cfd1ec0fde0b" + sha256 cellar: :any, arm64_sequoia: "4067084c37f782e15f3b179f7dedc7a599c66b791e3c0aa013e7dbc8ae804e0f" + sha256 cellar: :any, arm64_sonoma: "8e373dabed5c34e87d91d2456d4bf011df0ed7d49a5e1eecf21d1dbca6e2501f" + sha256 cellar: :any, arm64_ventura: "655a2c3c2841cca8dc2a9a12251050701c738425dc78687f2062357ded8bf4a2" + sha256 cellar: :any, arm64_monterey: "9254f0926869364cd952129f192c9fc230ef6a6343e373c1640872bbe9c51345" + sha256 cellar: :any, arm64_big_sur: "d5b29d7fe175e9d5fa9a37fa80f390b7c0a302b5d8d8d55cf591a394878cfb1c" + sha256 cellar: :any, sonoma: "d9847884a384e0b167e004c67fed4250131b69620291d924208f1f07e98be419" + sha256 cellar: :any, ventura: "7174b9cc9538058923d3e8cb74867679cddb2f8d932c644b31af6a1948a3d701" + sha256 cellar: :any, monterey: "6fd5d63030858e3d238e668643502a954424d6cebc82a15a6a0e19eb13505ac6" + sha256 cellar: :any, big_sur: "1d65d8a309019393a6db1f4d16d09f6fea293fc23dbb572ffab044cdabd952ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "21cc8e97d6069437c1117ead2fce89372a5251458e8878f58ff8127ce5e52f7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5c12c61e48eeb39a813598a9d1723095d0d0aaa5d6b30118457df84ac4f57de" + end + + depends_on "bison" => :build # tenyr requires bison >= 2.5 + + depends_on "sdl2" + depends_on "sdl2_image" + + uses_from_macos "flex" => :build + + def install + inreplace "src/devices/sdlvga.c", "SDL_image.h", "SDL2/SDL_image.h" + inreplace "src/devices/sdlled.c", "SDL_image.h", "SDL2/SDL_image.h" + + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `...'; ....o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "make", "BISON=#{Formula["bison"].opt_bin}/bison", + "JIT=0", "BUILDDIR=build/homebrew" + + pkgshare.install "rsrc", "plugins" + cd "build/homebrew" do + bin.install "tsim", "tas", "tld" + lib.install Dir[shared_library("*")] + end + end + + test do + # sanity test assembler, linker and simulator + (testpath/"part1").write "B <- 9\n" + (testpath/"part2").write "C <- B * 3\n" + + system bin/"tas", "--output=a.to", "part1" + system bin/"tas", "--output=b.to", "part2" + system bin/"tld", "--output=test.texe", "a.to", "b.to" + + assert_match "C 0000001b", shell_output("#{bin}/tsim -vvvv test.texe 2>&1") + end +end diff --git a/Formula/t/tere.rb b/Formula/t/tere.rb new file mode 100644 index 0000000000000..0f3a0bee6e431 --- /dev/null +++ b/Formula/t/tere.rb @@ -0,0 +1,39 @@ +class Tere < Formula + desc "Terminal file explorer" + homepage "https://github.com/mgunyho/tere" + url "https://github.com/mgunyho/tere/archive/refs/tags/v1.6.0.tar.gz" + sha256 "7db94216b94abd42f48105c90e0e777593aaf867472615eb94dc2f77bb6a3cfb" + license "EUPL-1.2" + head "https://github.com/mgunyho/tere.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "787e582804b995bb8b5d87d670ca4043d3647a94c11afa8e332f15656935c7ce" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c9a60b3dc17b2a32d0ecf1836b3914099c6ddc58f19261dae3b5fa7166b28ae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec52070d45befb5b87f6e7785a336cd8966774c754bbc7a6f1f0107d66523b13" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f59761f29b1ceeb7f633056dfac46d6293ef9ff320dcf3260a2e7ce5fb7d988a" + sha256 cellar: :any_skip_relocation, sonoma: "65ae7c433f4610971aa049108551e70bd6b89adb5dbd0966699ed4ae7ae23aab" + sha256 cellar: :any_skip_relocation, ventura: "1330af75bc33de620228e27758d6bdef23e1956c7a249d3f7d6f644e4d40fa00" + sha256 cellar: :any_skip_relocation, arm64_linux: "175b2dacf2c4dad2c0a6f871d0225970305f240fed95724145cae5c244c59787" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9665ab7e423ec09d10dd3e85bec42d8a1e222ef3bfcfb7b229fcdafa5210d69c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Launch `tere` and then immediately exit to test whether `tere` runs without errors. + PTY.spawn(bin/"tere") do |r, w, _pid| + r.winsize = [80, 43] + sleep 1 + w.write "\e" + begin + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + end +end diff --git a/Formula/t/termbg.rb b/Formula/t/termbg.rb new file mode 100644 index 0000000000000..a71c68ea71e3e --- /dev/null +++ b/Formula/t/termbg.rb @@ -0,0 +1,29 @@ +class Termbg < Formula + desc "Rust library for terminal background color detection" + homepage "https://github.com/dalance/termbg" + url "https://github.com/dalance/termbg/archive/refs/tags/v0.6.2.tar.gz" + sha256 "b933907d181e59ce0aa522ed598a9fa70125a6523f7fbd1f537c3b99bd75ffdd" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/dalance/termbg.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0966ba2c3c68175f179c88b293c396a89867b38aeb1293200527aa66039dfda5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "73367dc16651ae85eddfc43526501a01ea3721d3c1d40de0e7dcff2f49f0ea90" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "280098ca00d9d2e31672b8bc0cabca6082200c12c936e2c68122ab8b8e79afd8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "375b6b6bf7872f951fa94361662929b418326b2680a1c5d03bb54b9319b72fd7" + sha256 cellar: :any_skip_relocation, sonoma: "185c02be7e39375a0b96aaa18443010547bfab80b7afa1856b6c85db29bcb39e" + sha256 cellar: :any_skip_relocation, ventura: "0977f7809818025cd59757e9a4bea7cbd80b81cccf9d3644667e441271f5e786" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb326e7812e6470aeb2da3737d385f02106bd8cf5b36f4d4abfd41c3d0a4f692" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98b27a88db545fce6ca91fa68de4370a715636f9313a000dc99a6e9188f8cb84" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/termbg --version") + end +end diff --git a/Formula/t/termbox.rb b/Formula/t/termbox.rb new file mode 100644 index 0000000000000..a1b80629c4e33 --- /dev/null +++ b/Formula/t/termbox.rb @@ -0,0 +1,44 @@ +class Termbox < Formula + desc "Library for writing text-based user interfaces" + homepage "https://github.com/termbox/termbox" + url "https://github.com/termbox/termbox/archive/refs/tags/v1.1.4.tar.gz" + sha256 "402fa1b353882d18e8ddd48f9f37346bbb6f5277993d3b36f1fc7a8d6097ee8a" + license "MIT" + head "https://github.com/termbox/termbox.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "aa4f2e932f63b5801947e8ec51324138da823801d57cef26823a7181b3e05a0b" + sha256 cellar: :any, arm64_sequoia: "571090957f2e0ff1cc0bf2f15802e7e1585e769e14ebdaf2fd6ac649d5a26602" + sha256 cellar: :any, arm64_sonoma: "4f40420e806ed17a377452472803016909039a1d5054483e14bde23583ca2ea8" + sha256 cellar: :any, arm64_ventura: "1c91ef6f8297e7e77925b8810b50c495ee1fa90907aeafb540993c83421534a1" + sha256 cellar: :any, arm64_monterey: "a1371f4a993d30d381ab3bf5ea2fda669e23f0ea982c3de4c6bf8b01a2ec1747" + sha256 cellar: :any, arm64_big_sur: "ed78a6e1ccf8220eea8b25a1d836c72eb3c505f01d1886e367dd4563316f7ac3" + sha256 cellar: :any, sonoma: "2138fecfc44c6b3f92ad9530596eb05e09a9bdade60ff9083a17e6714a4855b8" + sha256 cellar: :any, ventura: "1fa6ac18b01cd55874c1cb9e1d0cdc2e83a017a0888dfed8a1417327fc6c5faf" + sha256 cellar: :any, monterey: "b1f84d69e57749e830ca1b95c627a8a0eae4f743c5fda140f6c73df685cecd57" + sha256 cellar: :any, big_sur: "31e50d5d18789baf3012c36fc3230e7268b044db64c7466e9c1b2ac5e0d62eb0" + sha256 cellar: :any, catalina: "1366318342e7c939466f699a6d5116b8d5581af33bddc0724d4c9a622e1f0d75" + sha256 cellar: :any_skip_relocation, arm64_linux: "51e61e4ce516638b93e670a942c60310e5a13b23fa40eda6c17d554e6bb555e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96b1a190d17aaf736b5a592ef9a594458d58871360af83cfea7823881d4a1a1d" + end + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + // we can't test other functions because the CI test runs in a + // non-interactive shell + tb_set_clear_attributes(42, 42); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-ltermbox", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/termcolor.rb b/Formula/t/termcolor.rb new file mode 100644 index 0000000000000..9883e8a3ae363 --- /dev/null +++ b/Formula/t/termcolor.rb @@ -0,0 +1,38 @@ +class Termcolor < Formula + desc "Header-only C++ library for printing colored messages" + homepage "https://termcolor.readthedocs.io/" + url "https://github.com/ikalnytskyi/termcolor/archive/refs/tags/v2.1.0.tar.gz" + sha256 "435994c32557674469404cb1527c283fdcf45746f7df75fd2996bb200d6a759f" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d521f9450ba8bfd71eb601ff8d6ac8e8705c12caf6d10bf8d3f2808463d48091" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main(int /*argc*/, char** /*argv*/) + { + std::cout << termcolor::red << "Hello Colorful World"; + std::cout << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}" + assert_match "Hello Colorful World", shell_output("./test") + end +end diff --git a/Formula/t/terminal-notifier.rb b/Formula/t/terminal-notifier.rb new file mode 100644 index 0000000000000..a60c986b92e4f --- /dev/null +++ b/Formula/t/terminal-notifier.rb @@ -0,0 +1,43 @@ +class TerminalNotifier < Formula + desc "Send macOS User Notifications from the command-line" + homepage "https://github.com/julienXX/terminal-notifier" + url "https://github.com/julienXX/terminal-notifier/archive/refs/tags/2.0.0.tar.gz" + sha256 "6f22a7626e4e68e88df2005a5f256f7d3b432dbf4c0f8a0c15c968d9e38bf84c" + license "MIT" + head "https://github.com/julienXX/terminal-notifier.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2dfafb7ab7b14b1ce364454f260da7a23d4007fea1c863dbe78391db5bf3b3d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "838ac4918afdb8464694e9236c4c61cde9b6d36caa35d01bbc00c6445015c77e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9814bfe9969788afd44c03f4469cf732ab61931a645da58a00b33f95126a381c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "20ebb413679d76521e4434cb4351560f35052985a11cbb1f85c12e45bef95919" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9862b6cf8d3b299ef67dcfb6e31d3040670bdfe58110d04797b117b3702de42" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d1268e236f13f5bb4cd5fead9cf54cfb54ceefb98e34861bd39cf3c7e6ef34cf" + sha256 cellar: :any_skip_relocation, sonoma: "bab8943d11a5f323b8963455e07e23bfd569873956cdc9660a9b6f32dfecc316" + sha256 cellar: :any_skip_relocation, ventura: "29c41b914cd8299dba529d1fc6029e4af981ee90010f8a8b11dc4ded8e097855" + sha256 cellar: :any_skip_relocation, monterey: "6513db788b33570b1b89d2b0215e3176d629814b3233c993e995ec9806ad32df" + sha256 cellar: :any_skip_relocation, big_sur: "91f14694ebce08887492aa75138753cd9ff74977868927b15b52559728280055" + sha256 cellar: :any_skip_relocation, catalina: "78eff95b7436480521ee68a8581ff2df0c615adefccd279486f2491f1b1c0a4b" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "Terminal Notifier.xcodeproj", + "-target", "terminal-notifier", + "SYMROOT=build", + "-verbose", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", + "CODE_SIGN_IDENTITY=" + prefix.install "build/Release/terminal-notifier.app" + bin.write_exec_script prefix/"terminal-notifier.app/Contents/MacOS/terminal-notifier" + end + + test do + assert_match version.to_s, pipe_output("#{bin}/terminal-notifier -help") + end +end diff --git a/Formula/t/terminalimageviewer.rb b/Formula/t/terminalimageviewer.rb new file mode 100644 index 0000000000000..1fbd35904c5b7 --- /dev/null +++ b/Formula/t/terminalimageviewer.rb @@ -0,0 +1,36 @@ +class Terminalimageviewer < Formula + desc "Display images in a terminal using block graphic characters" + homepage "https://github.com/stefanhaustein/TerminalImageViewer" + url "https://github.com/stefanhaustein/TerminalImageViewer/archive/refs/tags/v1.2.1.tar.gz" + sha256 "08d0c30e3ffa47b69d1bce07bea56f04b7deb4a8a79307ce435a4f0852fbcd5f" + license "Apache-2.0" + head "https://github.com/stefanhaustein/TerminalImageViewer.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d15318b665e2ca76d7d9f1c2c7f6d6fddef75446202fbd6dc7444a97c14b58d1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6ee22b5d19739497f5fd9a9e082da1106cca1ebe64d1307ddb436ba7c435671a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b97f5e9862b3628ec382a93bea224821d85b770dc7e6024c434148993a48a6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7def3c517971218e5878b610d27c01dae72e0ee14716063d243ad58248e3ac43" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8050c890cdf88c6a0b1b5a9e70497c7810b1af57463d4213c0369fd397ff9c71" + sha256 cellar: :any_skip_relocation, sonoma: "d518d4e732fe89892e30ce4f3566803575ffc8cb79c09483a2780862704f8b81" + sha256 cellar: :any_skip_relocation, ventura: "48dbddfc5411ffb659e84592e7d4c7da6e9384eb14567d8fa3727fdff25f39c9" + sha256 cellar: :any_skip_relocation, monterey: "24fcc2c2d18fabd9f35449bc9fd08b4c2d5bedd17a3905ada74cf50858064c34" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a6596ac570f7ce8eb5789f7521dbae729fe2f9f319fc73c983ac664130b2fa1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09bed7a395fb96ff84f0bf05ed864786956f90048e25c4c918cdf68055b88fbe" + end + + depends_on "imagemagick" + + def install + cd "src" do + system "make" + bin.install "tiv" + end + end + + test do + system bin/"tiv", test_fixtures("test.png") + end +end diff --git a/Formula/t/terminator.rb b/Formula/t/terminator.rb new file mode 100644 index 0000000000000..90095d9c85baf --- /dev/null +++ b/Formula/t/terminator.rb @@ -0,0 +1,65 @@ +class Terminator < Formula + include Language::Python::Virtualenv + + desc "Multiple GNOME terminals in one window" + homepage "https://gnome-terminator.org" + url "https://github.com/gnome-terminator/terminator/archive/refs/tags/v2.1.5.tar.gz" + sha256 "df46cb8fbf4bc80289cabbf59e22a03948a65278c637573db3bc5e7acfd1966b" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cbda9e2f530787bf8fd70762ca08efb46d62c2797d85d89e496341278a96e615" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "447a6bc238316f05ae3d03ce0d958aa11ab7dc5a9afb855fd5b9e63a21cc4001" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c394010de722af4f788075577f32fdfce3dcfbca6e1d8b4ccdd677a55491fd0" + sha256 cellar: :any_skip_relocation, sonoma: "f0a19f86cbd0e0823969bb007b6ab6898e6a41c453baecc97360afe450d2a2de" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d283e891e6a1d4f90cb6ebf1a5c5230b4be167fa80228956654ae83c74eb07f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05acec1e4469598de53102f0009da36200afe641e3a75d20071843a71c6373ab" + end + + depends_on "pygobject3" => :no_linkage + depends_on "python@3.14" + depends_on "vte3" + + on_linux do + depends_on "gettext" => :build + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + pid = Process.spawn bin/"terminator", "-d", [:out, :err] => "#{testpath}/output" + sleep 30 + Process.kill "TERM", pid + output = if OS.mac? + "Window::create_layout: Making a child of type: Terminal" + else + "You need to run terminator in an X environment. Make sure $DISPLAY is properly set" + end + assert_match output, File.read("#{testpath}/output") + ensure + Process.kill "KILL", pid + end +end diff --git a/Formula/t/termrec.rb b/Formula/t/termrec.rb new file mode 100644 index 0000000000000..d71db5f41503c --- /dev/null +++ b/Formula/t/termrec.rb @@ -0,0 +1,48 @@ +class Termrec < Formula + desc "Record videos of terminal output" + homepage "https://angband.pl/termrec.html" + url "https://github.com/kilobyte/termrec/archive/refs/tags/v0.19.tar.gz" + sha256 "0550c12266ac524a8afb764890c420c917270b0a876013592f608ed786ca91dc" + license "LGPL-3.0-or-later" + head "https://github.com/kilobyte/termrec.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0abe8cc3df72b187ea7c2aa19c180e0ef4404ff91560cd1b4bbc7e20884bdd85" + sha256 cellar: :any, arm64_sequoia: "e49f5031c0c2bd9c8a17c75bd3d345755a47525ef4a68d32ca257dcb47b7eb10" + sha256 cellar: :any, arm64_sonoma: "206c6ea13f36cb770ad80f1702f1620a5a8cd8a82eea1e01d136f6b46ccecf03" + sha256 cellar: :any, arm64_ventura: "b5e160a090054b7e36883023816a7123f6305131c9248cb2543d939d209a7c7b" + sha256 cellar: :any, sonoma: "8225f9ddc5ff3c7e8110435fdfd09d5e0310a4370dcded0e1b4a4ef06424f9c7" + sha256 cellar: :any, ventura: "d58a44779c299757776b50043dd4a039fdccc99d96d77a4ada9096499adbfe01" + sha256 cellar: :any_skip_relocation, arm64_linux: "3958a773f4a5f6981ed0d7bd45594a982d7db69b77badac66615edee697f84ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5d5fbe66e009d9a482ea968920e75bf9789fcbc1b08fa7d865ab90528709a11" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "xz" + + uses_from_macos "zlib" + + def install + # Work around build error: call to undeclared function 'forkpty' + # Issue ref: https://github.com/kilobyte/termrec/issues/8 + ENV.append "CFLAGS", "-include util.h" if DevelopmentTools.clang_build_version >= 1403 + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"termrec", "--help" + end +end diff --git a/Formula/t/termscp.rb b/Formula/t/termscp.rb new file mode 100644 index 0000000000000..bd8545c85b58c --- /dev/null +++ b/Formula/t/termscp.rb @@ -0,0 +1,46 @@ +class Termscp < Formula + desc "Feature rich terminal file transfer and explorer" + homepage "https://termscp.veeso.dev/" + url "https://github.com/veeso/termscp/archive/refs/tags/v0.18.0.tar.gz" + sha256 "3791b4c4b63dd4ea31b6e4d7be754edf9441c5a84c9e7be878463411c4337588" + license "MIT" + head "https://github.com/veeso/termscp.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "54011ce5f08eecb7beb5f4195126cb828dabd3dacb138e2c63f8a4c4ea55db5d" + sha256 cellar: :any, arm64_sequoia: "9b0ebfc7d1e98d38f9a60557b4c17746b24c62634beb0117d7fa033549d20b67" + sha256 cellar: :any, arm64_sonoma: "0134e8eb5be800b3dd71f9d1924df8c83500c6fb0b83e48e22644f91873b830a" + sha256 cellar: :any, arm64_ventura: "9fb082121f4c9fec8023e9d2b06238155dd0e504891bb2485b4110c3a7759e0b" + sha256 cellar: :any, sonoma: "6cec211fe0514243a27ad595b7f7f11ad871a0b47d26534e09ecac5dff811f8b" + sha256 cellar: :any, ventura: "8e51d0d0f3286718ab030dbc926b20cbf444b4bb286b7ecd38937308df549717" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed399ac73da3fd8546765a6d84ee1438101316f12996f2468414a8ae0b4d6a3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36219c281e9b898a73a0f0fd79ba0bdbc0a36675a4503d30282a272d87e0a90" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "dbus" + depends_on "samba" + end + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + require "pty" + PTY.spawn(bin/"termscp", "config") do |_r, _w, pid| + sleep 10 + Process.kill 9, pid + end + end +end diff --git a/Formula/t/termshark.rb b/Formula/t/termshark.rb new file mode 100644 index 0000000000000..24e47e17ac317 --- /dev/null +++ b/Formula/t/termshark.rb @@ -0,0 +1,104 @@ +class Termshark < Formula + desc "Terminal UI for tshark, inspired by Wireshark" + homepage "https://termshark.io" + url "https://github.com/gcla/termshark/archive/refs/tags/v2.4.0.tar.gz" + sha256 "949c71866fcd2f9ed71a754ea9e3d1bdc23dee85969dcdc78180f1d18ca8b087" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4d25d6397d1fd6a69180bb90da9b2278d6e17b25db52493e8264ca61f5c75403" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0c4f19d16204de97425576057c2ac0d841a78bb26981703c919ed102e104982" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "097ad857907c26ef893a9f0863fbe6d21d49d5015068c3bc981f0c7a522ba52f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11cf99e534c667d968ea4daff6c3baf9a86345a6823627ad722398e5c5daeedd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "37948c9f61f945ad6044eb03753da35bf735a2ef0599c21ee957c24c6549e670" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d95e25d67a299e15d5e9c861c5f1b99b98a58802ba78ec847d1801f6f1ef1432" + sha256 cellar: :any_skip_relocation, sonoma: "b32b42612b27155cf760d7411e2644b25ba09fb662b1b8bdd4d0b84821ceb914" + sha256 cellar: :any_skip_relocation, ventura: "c5b4d2aa47e0f3796c68add48dfd28b7f79780261d00a62897ab23fa977b8423" + sha256 cellar: :any_skip_relocation, monterey: "b22556c8b7777479e5a36c5c8abb9fbcff1e2774feb96383533ece79da6a5a6d" + sha256 cellar: :any_skip_relocation, big_sur: "8b19aa1bd9d176bb52410f2751fd3877e22a8d4ba21ee7cccd93d08ef32c8653" + sha256 cellar: :any_skip_relocation, catalina: "ce2586a94ccbc846b9d825e48dfec76e3aec711315564b01db2d87d9643a03b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c4b0b7dd2e10d91bcf7fb4a64b436f5e54ad0e00d7f68d02102a5ab0cbb1be7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69ee110ad437376b219f4aaa960818850be8e28868c8a0dc3ceff715849c8b1f" + end + + # https://github.com/gcla/termshark/issues/167 + deprecate! date: "2025-01-03", because: :unmaintained + + depends_on "go" => :build + depends_on "socat" => :test + depends_on "wireshark" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/termshark" + end + + test do + assert_match "termshark v#{version}", + shell_output("#{bin}/termshark -v --pass-thru=false") + + # Build a test pcap programmatically. Termshark will read this + # from a temp file. + packet = [] + packet += [0xd4, 0xc3, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00] + packet += [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] + packet += [0x00, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00] + packet += [0xf3, 0x2a, 0x39, 0x52, 0x00, 0x00, 0x00, 0x00] + packet += [0x4d, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00] + packet += [0x10, 0x40, 0x00, 0x20, 0x35, 0x01, 0x2b, 0x59] + packet += [0x00, 0x06, 0x29, 0x17, 0x93, 0xf8, 0xaa, 0xaa] + packet += [0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00] + packet += [0x00, 0x37, 0xf9, 0x39, 0x00, 0x00, 0x40, 0x11] + packet += [0xa6, 0xdb, 0xc0, 0xa8, 0x2c, 0x7b, 0xc0, 0xa8] + packet += [0x2c, 0xd5, 0xf9, 0x39, 0x00, 0x45, 0x00, 0x23] + packet += [0x8d, 0x73, 0x00, 0x01, 0x43, 0x3a, 0x5c, 0x49] + packet += [0x42, 0x4d, 0x54, 0x43, 0x50, 0x49, 0x50, 0x5c] + packet += [0x6c, 0x63, 0x63, 0x6d, 0x2e, 0x31, 0x00, 0x6f] + packet += [0x63, 0x74, 0x65, 0x74, 0x00, 0xf3, 0x2a, 0x39] + packet += [0x52, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00] + packet += [0x00, 0x4d, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00] + packet += [0x20, 0x35, 0x01, 0x2b, 0x59, 0x00, 0x06, 0x29] + packet += [0x17, 0x93, 0xf8, 0xaa, 0xaa, 0x03, 0x00, 0x00] + packet += [0x00, 0x08, 0x00, 0x45, 0x00, 0x00, 0x37, 0xf9] + packet += [0x39, 0x00, 0x00, 0x40, 0x11, 0xa6, 0xdb, 0xc0] + packet += [0xa8, 0x2c, 0x7b, 0xc0, 0xa8, 0x2c, 0xd5, 0xf9] + packet += [0x39, 0x00, 0x45, 0x00, 0x23, 0x8d, 0x73, 0x00] + packet += [0x01, 0x43, 0x3a, 0x5c, 0x49, 0x42, 0x4d, 0x54] + packet += [0x43, 0x50, 0x49, 0x50, 0x5c, 0x6c, 0x63, 0x63] + packet += [0x6d, 0x2e, 0x31, 0x00, 0x6f, 0x63, 0x74, 0x65] + packet += [0x74, 0x00] + + File.write("#{HOMEBREW_TEMP}/termshark-test.pcap", packet.pack("C*")) + + # Rely on exit code of grep - if termshark works correctly, it will + # detect stdout is not a tty, defer to tshark and display the grepped IP. + system [ + "#{bin}/termshark -r #{HOMEBREW_TEMP}/termshark-test.pcap", + " | grep 192.168.44.123", + ].join + + # Pretend to be a tty and run termshark with the temporary pcap. Queue up + # 'q' and 'enter' to terminate. Rely on the exit code of termshark, which + # should be EXIT_SUCCESS/0. Output is piped to /dev/null to avoid + # interfering with the outer terminal. The quit command is delayed five + # seconds to provide ample time for termshark to load the pcap (there is + # no external mechanism to tell when the load is complete). + testcmds = [ + "{ sleep 5 ; echo q ; echo ; } | ", + "socat - EXEC:'sh -c \\\"", + "stty rows 50 cols 80 && ", + "TERM=xterm ", + "#{bin}/termshark -r #{HOMEBREW_TEMP}/termshark-test.pcap", + "\\\"',pty,setsid,ctty > /dev/null", + ] + system testcmds.join + + # "Scrape" the terminal UI for a specific IP address contained in the test + # pcap. Since the output contains ansi terminal codes, use the -a flag to + # grep to ensure it's not treated as binary input. + testcmds[5] = "\\\"',pty,setsid,ctty | grep -a 192.168.44.123 > /dev/null" + system testcmds.join + + # Clean up. + File.delete("#{HOMEBREW_TEMP}/termshark-test.pcap") + end +end diff --git a/Formula/t/termsvg.rb b/Formula/t/termsvg.rb new file mode 100644 index 0000000000000..2dd73a51de507 --- /dev/null +++ b/Formula/t/termsvg.rb @@ -0,0 +1,31 @@ +class Termsvg < Formula + desc "Record, share and export your terminal as a animated SVG image" + homepage "https://github.com/MrMarble/termsvg" + url "https://github.com/MrMarble/termsvg/archive/refs/tags/v0.10.0.tar.gz" + sha256 "7b9c7aae3f58c9dce7930fe2868e39d59817e143d13e5771c268f9c7f0cbdf31" + license "GPL-3.0-only" + head "https://github.com/MrMarble/termsvg.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "363363e29f811eb53cd39e456c15c7c6ccef0f00f84bb0edd67b22151265c42e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "363363e29f811eb53cd39e456c15c7c6ccef0f00f84bb0edd67b22151265c42e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "363363e29f811eb53cd39e456c15c7c6ccef0f00f84bb0edd67b22151265c42e" + sha256 cellar: :any_skip_relocation, sonoma: "6b803686c893179cef6188beb67d6e7c1eb9af8dbea5a0dfc3a3a8931ca16e5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbcb76116d128262297b857a7d6858b717ba81ff742e224d4e5bd7943433d93d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ea62b9ca79d8a7fd00715bae7f7a76d072a303cc2b6e60aca1dc474773f2d69" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/termsvg" + end + + test do + assert_match version.to_s, shell_output("#{bin}/termsvg --version") + + output = shell_output("#{bin}/termsvg play nonexist 2>&1", 80) + assert_match "no such file or directory", output + end +end diff --git a/Formula/t/tern.rb b/Formula/t/tern.rb new file mode 100644 index 0000000000000..885e9d60242d5 --- /dev/null +++ b/Formula/t/tern.rb @@ -0,0 +1,173 @@ +class Tern < Formula + include Language::Python::Virtualenv + + desc "Software Bill of Materials (SBOM) tool" + homepage "https://github.com/tern-tools/tern" + url "https://files.pythonhosted.org/packages/f8/4b/123b2ca469126b45e61853acf028fe1d466f4fe1d5e7afd1d4972c151b4d/tern-2.12.1.tar.gz" + sha256 "c8c22f162962107adb64caaf5f764044e59caa28b9566079e101181c6449a1c0" + license "BSD-2-Clause" + head "https://github.com/tern-tools/tern.git", branch: "main" + + no_autobump! because: "`update-python-resources` cannot determine dependencies" + + bottle do + rebuild 6 + sha256 cellar: :any, arm64_tahoe: "c2368960d81379b79e48e0df91ecc463fd25fd8f595a7b1a6867d956e2c93ac0" + sha256 cellar: :any, arm64_sequoia: "23a415ed6ef4ee3ae695c1c1c51ef8f6f31815083517b20343fb8070e4019f6a" + sha256 cellar: :any, arm64_sonoma: "76e87f5103ee3445130482b61c9e7f97368f06153681c199d9615d342cca0f26" + sha256 cellar: :any, sonoma: "cff0113720890d17c290f91528e1ebeeb4aea2581f9742894ea394c996126466" + sha256 cellar: :any_skip_relocation, arm64_linux: "96820b7459cdc1803158765a4b10c56725f859bd9066761b5c5e9141318353d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "835d90b9f1cd8d3af14850620412b055c765bdbee93ef95ba6446aaa2d5ed99a" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.14" + + on_linux do + depends_on "attr" # for `getfattr` + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" + sha256 "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "debian-inspector" do + url "https://files.pythonhosted.org/packages/76/27/2bdbfe084be16806c35fcc91bac3236706d1d62751c39a293b2cab77ebcc/debian_inspector-31.0.0.tar.gz" + sha256 "46094f953464b269bb09855eadeee3c92cb6b487a0bfa26eba537b52cc3d6b47" + end + + resource "docker" do + url "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz" + sha256 "ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c" + end + + resource "dockerfile-parse" do + url "https://files.pythonhosted.org/packages/92/df/929ee0b5d2c8bd8d713c45e71b94ab57c7e11e322130724d54f469b2cd48/dockerfile-parse-2.0.1.tar.gz" + sha256 "3184ccdc513221983e503ac00e1aa504a2aa8f84e5de673c46b0b6eee99ec7bc" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz" + sha256 "5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/9a/c8/dd58967d119baab745caec2f9d853297cec1989ec1d63f677d3880632b88/gitpython-3.1.45.tar.gz" + sha256 "85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" + sha256 "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/3a/f0/de0ac00a4484c0d87b71e3d9985518278d89797fa725e90abd3453bccb42/packageurl_python-0.17.5.tar.gz" + sha256 "a7be3f3ba70d705f738ace9bf6124f31920245a49fa69d4b416da7037dd2de61" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/ad/8d/23253ab92d4731eb34383a69b39568ca63a1685bec1e9946e91a32fc87ad/pbr-7.0.1.tar.gz" + sha256 "3ecbcb11d2b8551588ec816b3756b1eb4394186c3b689b17e04850dfc20f7e57" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/0b/de/e13fa6dc61d78b30ba47481f99933a3b49a57779d625c392d8036770a60d/regex-2025.7.34.tar.gz" + sha256 "9ead9765217afd04a86822dfcd4ed2747dfe426e887da413b15ff0ac2457e21a" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz" + sha256 "26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz" + sha256 "3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + tern requires root privileges so you will need to run `sudo tern`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + output = if OS.mac? + shell_output("#{bin}/tern report --image alpine:3.13.5 2>&1", 1) + else + shell_output("#{bin}/tern report --image alpine:3.13.5 2>&1") + end + assert_match "rootfs - Running command", output + assert_path_exists testpath/"tern.log" + + assert_match version.to_s, shell_output("#{bin}/tern --version") + end +end diff --git a/Formula/t/terracognita.rb b/Formula/t/terracognita.rb new file mode 100644 index 0000000000000..50b9921a2e2a0 --- /dev/null +++ b/Formula/t/terracognita.rb @@ -0,0 +1,37 @@ +class Terracognita < Formula + desc "Reads from existing Cloud Providers and generates Terraform code" + homepage "https://github.com/cycloidio/terracognita" + url "https://github.com/cycloidio/terracognita/archive/refs/tags/v0.8.4.tar.gz" + sha256 "7420694805c3ab666591b9686958eb49e61452065546f0eb315f215c8241da84" + license "MIT" + head "https://github.com/cycloidio/terracognita.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3414c031aa7304a9c4af81caeee5f4f9f3da41c8ef762fd9657f787a1d10435a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa0ff02f1d9b52f3346855414e13cb1cff919534536e0fec444ebd82d75700fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bbd00a7bc6811d48d638ac1e8b4b6a9a9845db156627566f50ecf6fd84b3b188" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fca8f74b9f5fa7410e7abe7d6f5388ed960ab552b3da92064c57f44396c49a56" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fca8f74b9f5fa7410e7abe7d6f5388ed960ab552b3da92064c57f44396c49a56" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fca8f74b9f5fa7410e7abe7d6f5388ed960ab552b3da92064c57f44396c49a56" + sha256 cellar: :any_skip_relocation, sonoma: "cf950d168859c9c7a3b40a524f2dda3f8d585834a275936fb70c2a20dd969f07" + sha256 cellar: :any_skip_relocation, ventura: "f01273cbda69dc4373fd896c787361f4f9b9da0ff70b5901fa96b551305cfbcd" + sha256 cellar: :any_skip_relocation, monterey: "f01273cbda69dc4373fd896c787361f4f9b9da0ff70b5901fa96b551305cfbcd" + sha256 cellar: :any_skip_relocation, big_sur: "f01273cbda69dc4373fd896c787361f4f9b9da0ff70b5901fa96b551305cfbcd" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d473c1cace1654e96eb0340c230d73160b1bb00cb3c6e60506fd21fed971dc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22ca7df6e40ef40b990867a5a81b2e2b883f0867d1be7c8179c178d997e847a1" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/cycloidio/terracognita/cmd.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match "v#{version}", shell_output("#{bin}/terracognita version") + assert_match "Error: one of --module, --hcl or --tfstate are required", + shell_output("#{bin}/terracognita aws 2>&1", 1) + assert_match "aws_instance", shell_output("#{bin}/terracognita aws resources") + end +end diff --git a/Formula/t/terraform-cleaner.rb b/Formula/t/terraform-cleaner.rb new file mode 100644 index 0000000000000..71daa131e95ce --- /dev/null +++ b/Formula/t/terraform-cleaner.rb @@ -0,0 +1,64 @@ +class TerraformCleaner < Formula + desc "Tiny utility which detects unused variables in your terraform modules" + homepage "https://github.com/sylwit/terraform-cleaner" + url "https://github.com/sylwit/terraform-cleaner/archive/refs/tags/v0.0.4.tar.gz" + sha256 "61628133831ec667aa37cd5fc1a34a3a2c31e4e997d5f41fdf380fe3e017ab55" + license "MIT" + head "https://github.com/sylwit/terraform-cleaner.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0df9454cbf8c02fd4ac90be3d5b5b6df738794407bf3f5e865ea9e408051a377" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67a332100916e31bdbef196c2f08954acccdfaf069c23c84d62bcb51d8452066" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67a332100916e31bdbef196c2f08954acccdfaf069c23c84d62bcb51d8452066" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67a332100916e31bdbef196c2f08954acccdfaf069c23c84d62bcb51d8452066" + sha256 cellar: :any_skip_relocation, sonoma: "6837b7386c38bb8a93e922cf9889e5a95e90e15469111b110e4316802d714363" + sha256 cellar: :any_skip_relocation, ventura: "6837b7386c38bb8a93e922cf9889e5a95e90e15469111b110e4316802d714363" + sha256 cellar: :any_skip_relocation, arm64_linux: "729f4ad39999e1d2da4700bcb7a49f955d7566290de3cbe80114b1999ce45201" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f64a821e096cd1dd000e4123dd6dd917905d21ba089da6d9b998f4c3920800f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"test.tf").write <<~HCL + terraform { + required_version = ">= 1.0" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5" + } + } + } + + provider "aws" { + region = var.aws_region + } + + variable "aws_region" { + type = string + default = "us-east-1" + } + + variable "foo" { + type = string + default = "unused" + } + HCL + + output = shell_output("#{bin}/terraform-cleaner --unused-only") + assert_equal <<~EOS.chomp, output + + 🚀 Module: . + 👉 1 variables found + foo : 0 + + 1 modules processed + EOS + end +end diff --git a/Formula/t/terraform-docs.rb b/Formula/t/terraform-docs.rb new file mode 100644 index 0000000000000..03bdb326c2ff9 --- /dev/null +++ b/Formula/t/terraform-docs.rb @@ -0,0 +1,72 @@ +class TerraformDocs < Formula + desc "Tool to generate documentation from Terraform modules" + homepage "https://terraform-docs.io/" + url "https://github.com/terraform-docs/terraform-docs/archive/refs/tags/v0.20.0.tar.gz" + sha256 "793ad60be207292b9f27664d5c73bd75512e7a5e458b0fe2daa872b5ad46d6a9" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7fe8d99487a213818abfba231555ba8fb1e8fb91349e681b497e81907bb9a3f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "61839fb6a203ccc38e8c8f6d17eac0180ca754dfee8acb2c22caf36462445270" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "077a2f758437da21b2261542136cce7ef0e3a25a49bc9302881656c80710000c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9846110ee3a9ab3686bd96e381e651ed83816224c476540218c289a72c2f2ba" + sha256 cellar: :any_skip_relocation, sonoma: "b5dcc69027cbb34191b24b89b2364c79f41bfdc710a9ed97313305df0b840ea8" + sha256 cellar: :any_skip_relocation, ventura: "d81ad6cb5d8ecd1c47f261ccfe5e997944e5d79bbf65b4b2967a0181e3e8b1e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "195ef180318ab81e1e834597c845df5c9a71f792bb2d6037f77f766cdb6b9100" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ed822006985f68806fc9ad31c591f314252ab941d939568a40096989fcecb36" + end + + depends_on "go" => :build + + def install + system "make", "build" + cpu = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + os = OS.kernel_name.downcase + + bin.install "bin/#{os}-#{cpu}/terraform-docs" + + generate_completions_from_executable(bin/"terraform-docs", "completion", shells: [:bash, :zsh]) + end + + test do + (testpath/"main.tf").write <<~HCL + /** + * Module usage: + * + * module "foo" { + * source = "github.com/foo/baz" + * subnet_ids = "${join(",", subnet.*.id)}" + * } + */ + + variable "subnet_ids" { + description = "a comma-separated list of subnet IDs" + } + + variable "security_group_ids" { + default = "sg-a, sg-b" + } + + variable "amis" { + default = { + "us-east-1" = "ami-8f7687e2" + "us-west-1" = "ami-bb473cdb" + "us-west-2" = "ami-84b44de4" + "eu-west-1" = "ami-4e6ffe3d" + "eu-central-1" = "ami-b0cc23df" + "ap-northeast-1" = "ami-095dbf68" + "ap-southeast-1" = "ami-cf03d2ac" + "ap-southeast-2" = "ami-697a540a" + } + } + + // The VPC ID. + output "vpc_id" { + value = "vpc-5c1f55fd" + } + HCL + system bin/"terraform-docs", "json", testpath + end +end diff --git a/Formula/t/terraform-graph-beautifier.rb b/Formula/t/terraform-graph-beautifier.rb new file mode 100644 index 0000000000000..80a6db383aaf9 --- /dev/null +++ b/Formula/t/terraform-graph-beautifier.rb @@ -0,0 +1,38 @@ +class TerraformGraphBeautifier < Formula + desc "CLI to beautify `terraform graph` output" + homepage "https://github.com/pcasteran/terraform-graph-beautifier" + url "https://github.com/pcasteran/terraform-graph-beautifier/archive/refs/tags/v0.3.4.tar.gz" + sha256 "36762a21cfdf34b2082b8921d4352c3160d759a7a3743225f1a084f9b3dffe4a" + license "Apache-2.0" + head "https://github.com/pcasteran/terraform-graph-beautifier.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d25d1b1141dac30d981d344f63b304c48b778155f6a457b000b965eed8a219d2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0baf8c158de8191e5c9cbbd0c77397e78d000045857e37784c3dd73cc9e042b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dcc2b1e8bb7321d175baf7210354cd1985c2caf162445b0ad0bb89edf0f9277a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ca9777ce209ebb0f9e47c71c583c89b15f0d07fcd35e5e074dc706674b37e5ec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "23548a3575b9f6295ba84f0bf527aa30449cb20cc57096d5b781d7e1e7defbdb" + sha256 cellar: :any_skip_relocation, sonoma: "967666b68ef9c9fe345f6d8386a43394f334f42a7b99dc6210b1daf40ddfbbbf" + sha256 cellar: :any_skip_relocation, ventura: "168a8f71bd4555a7ccb1adae9040df668957d296ea1c48d08229833445fcf2f8" + sha256 cellar: :any_skip_relocation, monterey: "ab5d8a20c580aa7d871511a0f2594d980931eec5c2be920bf25f0c2a452900f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc3a3550aa27a8ef0d719a9e9e256fdf9995034b3e67de8ece8c1f0812d3bc5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bfe06d0bcfb50ee315da696362d5a635846067f2601f2669b6b1274b8d8cff48" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + pkgshare.install "test" + end + + test do + test_file = (pkgshare/"test/config1_expected.gv").read + output = pipe_output("#{bin}/terraform-graph-beautifier --graph-name=test --output-type=graphviz", test_file) + assert_equal test_file, output + + assert_match version.to_s, shell_output("#{bin}/terraform-graph-beautifier -v") + end +end diff --git a/Formula/t/terraform-iam-policy-validator.rb b/Formula/t/terraform-iam-policy-validator.rb new file mode 100644 index 0000000000000..944994ec18e26 --- /dev/null +++ b/Formula/t/terraform-iam-policy-validator.rb @@ -0,0 +1,105 @@ +class TerraformIamPolicyValidator < Formula + include Language::Python::Virtualenv + + desc "CLI to validate AWS IAM policies in Terraform templates for best practices" + homepage "https://github.com/awslabs/terraform-iam-policy-validator" + url "https://files.pythonhosted.org/packages/89/6b/bdb90f2fcb4a0033f138d52d5b24af9a2f8a84703ef94cbc31d51f0afaed/tf_policy_validator-0.0.9.tar.gz" + sha256 "ec8496bb8d45642a61f36dba95c867ac8ca5438bfc5bebafe8e3eec03a50d181" + license "MIT-0" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0dd0550290c327df46e97ec879a63d04c632107e4ce2a87f7aa2b549b8f8d8c5" + sha256 cellar: :any, arm64_sequoia: "8c34011a2385b9d46775b722071f2f070fdae6f0508967f501e31d7ca03a3d3d" + sha256 cellar: :any, arm64_sonoma: "83bd301802bce5b64783a8175386dbb639c799fd73326f6eae79051d5033cd42" + sha256 cellar: :any, sonoma: "58c49adba68848ecf839f79d312ee8e7534c57b9f4f38c2748633add9be29ae2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a65691acb8eef199f0caba0e76f1914bdd2cff6d8a47269d1a0add317903c3c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fe92d2f99352427a9957b1734dbe103fa9c3eb43cf2d33294aaba7cba5ddef5" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + (testpath/"default.yaml").write <<~YAML + settings: + example_key: example_value + YAML + + (testpath/"tf.json").write <<~JSON + { + "format_version": "1.0", + "terraform_version": "1.0.0", + "planned_values": { + "root_module": { + "resources": [ + { + "address": "aws_iam_policy.example", + "mode": "managed", + "type": "aws_iam_policy", + "name": "example", + "provider_name": "registry.terraform.io/hashicorp/aws", + "values": { + "policy": "{\\"Version\\":\\"2012-10-17\\",\\"Statement\\":[{\\"Effect\\":\\"Allow\\",\\"Action\\":[\\"s3:GetObject\\"],\\"Resource\\":\\"arn:aws:s3:::mybucket/*\\"}]}" + } + } + ] + } + } + } + JSON + + output = shell_output("#{bin}/tf-policy-validator validate " \ + "--config default.yaml --template-path tf.json --region us-east-1 2>&1", 1) + assert_match "No IAM policies defined", output + end +end diff --git a/Formula/t/terraform-inventory.rb b/Formula/t/terraform-inventory.rb new file mode 100644 index 0000000000000..9f3212a6edf01 --- /dev/null +++ b/Formula/t/terraform-inventory.rb @@ -0,0 +1,63 @@ +class TerraformInventory < Formula + desc "Go app which generates a dynamic Ansible inventory from a Terraform state file" + homepage "https://github.com/adammck/terraform-inventory" + url "https://github.com/adammck/terraform-inventory/archive/refs/tags/v0.10.tar.gz" + sha256 "8bd8956da925d4f24c45874bc7b9012eb6d8b4aa11cfc9b6b1b7b7c9321365ac" + license "MIT" + head "https://github.com/adammck/terraform-inventory.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bcdc79974fa55bb1087fe38999c01b1136c56f0b733706bf9b87fb937e81aa9d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8779884bc89245540e8bca1eae1ff1205e9dcfb406b2b306a5488cdc161547bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45e0a0a0852cc89534be9dc22760628b624e1e085d25b6a30bcd6ec1f25fb9d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49d755bc67a9ac995c186a4143723379d87ef43ea76018706302aad4ac135efe" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0a1c36c1ddf616cee16ffaa7686fee0dc5043142c5aac0b95698b0caafe67c50" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "df26181ba3116beae2b5582eb6725c2c8d9ddad018be827f6d07d252cfc019c0" + sha256 cellar: :any_skip_relocation, sonoma: "4724f1231e34d9c006f69df14a35683a750407d6b3cfa92775f41e289a645804" + sha256 cellar: :any_skip_relocation, ventura: "c704f37b60a3427858da569809b96102c32817bb88f17027f2d2e579e3e7ace7" + sha256 cellar: :any_skip_relocation, monterey: "7444adf6b3ea13567454c7ef34feebc5d5fddedeaefe5be07382544ebf67d79b" + sha256 cellar: :any_skip_relocation, big_sur: "ab56b7c132afc5508e5e10cfa21b784aa2f84fa8a23d9985b7b45eb04c8bdae1" + sha256 cellar: :any_skip_relocation, catalina: "ab56b7c132afc5508e5e10cfa21b784aa2f84fa8a23d9985b7b45eb04c8bdae1" + sha256 cellar: :any_skip_relocation, arm64_linux: "81cac3290ff42bd1c1759d9596b08e9647533f202dfabf5b9ad91e44a6f696bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "853cf36916d4bb9834f0f6b491e347a109a2930d350a1a31b8e7b8233720c20b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.build_version=#{version}") + end + + test do + example = <<~JSON + { + "version": 1, + "serial": 1, + "modules": [ + { + "path": [ + "root" + ], + "outputs": {}, + "resources": { + "aws_instance.example_instance": { + "type": "aws_instance", + "primary": { + "id": "i-12345678", + "attributes": { + "public_ip": "1.2.3.4" + }, + "meta": { + "schema_version": "1" + } + } + } + } + } + ] + } + JSON + (testpath/"example.tfstate").write(example) + assert_match(/example_instance/, shell_output("#{bin}/terraform-inventory --list example.tfstate")) + end +end diff --git a/Formula/t/terraform-local.rb b/Formula/t/terraform-local.rb new file mode 100644 index 0000000000000..4de45f7216a15 --- /dev/null +++ b/Formula/t/terraform-local.rb @@ -0,0 +1,91 @@ +class TerraformLocal < Formula + include Language::Python::Virtualenv + + desc "CLI wrapper to deploy your Terraform applications directly to LocalStack" + homepage "https://localstack.cloud/" + url "https://files.pythonhosted.org/packages/06/8a/61237cd8b95d41f2e997fee78f1a05fd3f5e65845cfe7aae9362a9d28022/terraform_local-0.24.1.tar.gz" + sha256 "2cfaeb283a1753083f3f59be1a2e08d225286913633694d695b04bba9913ae91" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "02003d3379322362954e861be100d4a7a6739c57a9fea59d367aa703fd1cd7eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18800188bee9dc2358e6216a1caae2ab4830ca148579485e6be7b1568a18a386" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d63ec41c396ee5ee40ed6d3c6b57b1af040aa8f0b5e1daafc44b7fbbb251582" + sha256 cellar: :any_skip_relocation, sonoma: "805d1ee675ff6223d939eb35bfa08deed14d71fff27cffcf05e3cabc71eb2e0b" + sha256 cellar: :any_skip_relocation, arm64_linux: "911ea3b2dcd209aa620aff35b2d5744edf0c68eac7407b5b7f0acb31d446434f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b8631e5c95a7741c03479efbc1daf2fed887328e0971476e9795cb37be8dd5d" + end + + depends_on "localstack" + depends_on "python@3.14" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ba/41/d4d73f55b367899ee377cd77c228748c18698ea3507c2a95b328f9152017/boto3-1.40.50.tar.gz" + sha256 "ae34363e8f34a49ab130d10c507a611926c1101d5d14d70be5598ca308e13266" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/5b/66/21d9ac0d37e5c4e55171466351cfc77404d8d664ccc17d4add6dba1dee99/botocore-1.40.50.tar.gz" + sha256 "1d3d5b5759c9cb30202cd5ad231ec8afb1abe5be0c088a1707195c2cbae0e742" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "lark" do + url "https://files.pythonhosted.org/packages/1d/37/a13baf0135f348af608c667633cbe5d13aa2c5c15a56ae9ad3e6cba45ae3/lark-1.3.0.tar.gz" + sha256 "9a3839d0ca5e1faf7cfa3460e420e859b66bcbde05b634e73c369c8244c5fa48" + end + + resource "localstack-client" do + url "https://files.pythonhosted.org/packages/22/11/4f10b87d634edd616d8063dd0ed1193be747e524e28801f826d72828b98f/localstack_client-2.10.tar.gz" + sha256 "732a07e23fffd6a581af2714bbe006ad6f884ac4f8ac955211a8a63321cdc409" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "python-hcl2" do + url "https://files.pythonhosted.org/packages/50/8e/f82ed407a10c2dd4228ff0fceec8a16dd6a9191a2ed119233c04dccf2ca4/python_hcl2-7.3.1.tar.gz" + sha256 "f8f55583703daf7bbcb595a33c68de891064d565974ea39998b81d15a4c4657b" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz" + sha256 "eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/tflocal state list 2>&1", 1) + assert_match(/No such file or directory|No state file was found/, output) + end +end diff --git a/Formula/t/terraform-ls.rb b/Formula/t/terraform-ls.rb new file mode 100644 index 0000000000000..e4ece787e6849 --- /dev/null +++ b/Formula/t/terraform-ls.rb @@ -0,0 +1,54 @@ +class TerraformLs < Formula + desc "Terraform Language Server" + homepage "https://github.com/hashicorp/terraform-ls" + url "https://github.com/hashicorp/terraform-ls/archive/refs/tags/v0.38.2.tar.gz" + sha256 "7f309f0eb1ef42386c9bc29d0050d2607c456cb08ad1fa5966b04790c4779a11" + license "MPL-2.0" + head "https://github.com/hashicorp/terraform-ls.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e22dc5c03073df6d2cfb6327ddc9132130fcc31753621ffdb5c7d4fa87aa78d7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e22dc5c03073df6d2cfb6327ddc9132130fcc31753621ffdb5c7d4fa87aa78d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e22dc5c03073df6d2cfb6327ddc9132130fcc31753621ffdb5c7d4fa87aa78d7" + sha256 cellar: :any_skip_relocation, sonoma: "5aa0bd88c9a2579fa25b2ab37a9f8c063619308153406bf52d24ad4c57553b57" + sha256 cellar: :any_skip_relocation, arm64_linux: "008feee1598ebbcc0450e7ffea44bc8843bcaaf757ec2c6e80a70e1e40912026" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a52adac219fbde5f56abe43322ad66a0379387fc6aa663e512b6d1c5c03d3c4d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.rawVersion=#{version}+#{tap.user} + ] + system "go", "build", *std_go_args(ldflags: ldflags.join(" ")) + end + + test do + port = free_port + + pid = fork do + exec "#{bin}/terraform-ls serve -port #{port} /dev/null" + end + sleep 2 + + begin + tcp_socket = TCPSocket.new("localhost", port) + tcp_socket.puts <<~EOF + Content-Length: 59 + + {"jsonrpc":"2.0","method":"initialize","params":{},"id":1} + EOF + assert_match "Content-Type", tcp_socket.gets("\n") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/terraform-lsp.rb b/Formula/t/terraform-lsp.rb new file mode 100644 index 0000000000000..556eb3bb4271d --- /dev/null +++ b/Formula/t/terraform-lsp.rb @@ -0,0 +1,64 @@ +class TerraformLsp < Formula + desc "Language Server Protocol for Terraform" + homepage "https://github.com/juliosueiras/terraform-lsp" + url "https://github.com/juliosueiras/terraform-lsp.git", + tag: "v0.0.12", + revision: "b0a5e4c435a054577e4c01489c1eef7216de4e45" + license "MIT" + head "https://github.com/juliosueiras/terraform-lsp.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e520989a451215fc8aa36173dbce765df4d6abfa73ada73699898677a0c76baf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e98d5085bd970cb5d03bc97f210858c8de0115a912ac62dd7859749b84fd5a98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42d32b5aa73ae3c3cb86c68edfcd9d244dc42f78adfc93967529961648625255" + sha256 cellar: :any_skip_relocation, arm64_ventura: "219f8480f5b9bbee461552d88a1f4da1539a7c1592b3b04be6c46e0a6dd9dadd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ecb868c9f9037a6797df54f8280d01309e34e700a4b26bced14555e8287ef96f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d30386f77e1057c954a62ff46ced4e7b6cf8ba69b26bcbf137200932d498e788" + sha256 cellar: :any_skip_relocation, sonoma: "d330c1aafbb2f100048ec4803e02ddb83404ea850453821cb127a5cca034a97c" + sha256 cellar: :any_skip_relocation, ventura: "51b95312d3b714a7ded4ec05810b072904fb55dc75c3d480e11cf6134a97757a" + sha256 cellar: :any_skip_relocation, monterey: "10cca16bfcddb58b30bfbe1e3a1aea9c58e4433b9b6260e0108d86fca7cb48c1" + sha256 cellar: :any_skip_relocation, big_sur: "4f3c322749538d6e2872b0c7741d448e60d8552028c378a37ec91fc1fe9f1ab0" + sha256 cellar: :any_skip_relocation, catalina: "0606bf7a3d018590555ff5060a38dcec78f57a11927791e7f20caa614caa49db" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e5d4b396b057db51b2ab3ee755341626e016a5da660bd68a2f832b397b89def" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7eae59625f858958621455404b365659464230b5a54783cb20be44e4569d539f" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + -X main.GitCommit=#{Utils.git_head} + -X main.Date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + end + + test do + port = free_port + + pid = fork do + exec "#{bin}/terraform-lsp serve -tcp -port #{port}" + end + sleep 2 + + begin + tcp_socket = TCPSocket.new("localhost", port) + tcp_socket.puts <<~EOF + Content-Length: 59 + + {"jsonrpc":"2.0","method":"initialize","params":{},"id":1} + EOF + assert_match "Content-Length:", tcp_socket.gets("\n") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + + assert_match version.to_s, shell_output("#{bin}/terraform-lsp serve -version") + end +end diff --git a/Formula/t/terraform-mcp-server.rb b/Formula/t/terraform-mcp-server.rb new file mode 100644 index 0000000000000..3e0edbb264d32 --- /dev/null +++ b/Formula/t/terraform-mcp-server.rb @@ -0,0 +1,41 @@ +class TerraformMcpServer < Formula + desc "MCP server for Terraform" + homepage "https://github.com/hashicorp/terraform-mcp-server" + url "https://github.com/hashicorp/terraform-mcp-server/archive/refs/tags/v0.3.2.tar.gz" + sha256 "885453e9e5125d6b995e362dd5fe06edbdd5ef1188f35a43c37bccf844c61ba9" + license "MPL-2.0" + head "https://github.com/hashicorp/terraform-mcp-server.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4bea6e10d906c112aced5820d8786d38f4caaf97b79b50a30bb68cab0d9b358c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4bea6e10d906c112aced5820d8786d38f4caaf97b79b50a30bb68cab0d9b358c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4bea6e10d906c112aced5820d8786d38f4caaf97b79b50a30bb68cab0d9b358c" + sha256 cellar: :any_skip_relocation, sonoma: "ab6e6bdf3f7101e6eda09dd3927b8b112de455658cc6090606d1738d7e50c799" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4c046b54f8b6aa375826a78fba51106c2026482bff503b143e29f7da709aa27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ec290ff35e4f5c73be34c12d000cd71be0a841b853119ac64291b27921f84d5" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/hashicorp/terraform-mcp-server/version.GitCommit=#{tap.user} + -X github.com/hashicorp/terraform-mcp-server/version.BuildDate=#{time.iso8601} + -X github.com/hashicorp/terraform-mcp-server/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/terraform-mcp-server" + end + + test do + assert_match version.to_s, shell_output("#{bin}/terraform-mcp-server --version") + + json = <<~JSON + {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26"}} + {"jsonrpc":"2.0","id":2,"method":"tools/list"} + JSON + + output = pipe_output(bin/"terraform-mcp-server", json, 0) + assert_match "Fetches the latest version of a Terraform module from the public registry", output + end +end diff --git a/Formula/t/terraform-module-versions.rb b/Formula/t/terraform-module-versions.rb new file mode 100644 index 0000000000000..645365a68c752 --- /dev/null +++ b/Formula/t/terraform-module-versions.rb @@ -0,0 +1,32 @@ +class TerraformModuleVersions < Formula + desc "CLI that checks Terraform code for module updates" + homepage "https://github.com/keilerkonzept/terraform-module-versions" + url "https://github.com/keilerkonzept/terraform-module-versions/archive/refs/tags/v3.3.13.tar.gz" + sha256 "b85fbeb788c6fca0c328a29a1aab839cd556a7506105f544326a6e322d2aaf80" + license "MIT" + head "https://github.com/keilerkonzept/terraform-module-versions.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "570693949b4aeecf98436163b51c05af549c7100d35fbb07254fd8c9cb085d19" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f120f8f70dfe4d25b7df6c6fb2469eeaf6bca263d732ad30397a7ec34e9892c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f120f8f70dfe4d25b7df6c6fb2469eeaf6bca263d732ad30397a7ec34e9892c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f120f8f70dfe4d25b7df6c6fb2469eeaf6bca263d732ad30397a7ec34e9892c6" + sha256 cellar: :any_skip_relocation, sonoma: "e1f9c1efef4d6bd1de99676ca38f0d48df39201303c7cb5ef5171f013f51b9f1" + sha256 cellar: :any_skip_relocation, ventura: "e1f9c1efef4d6bd1de99676ca38f0d48df39201303c7cb5ef5171f013f51b9f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f97491547c6d3a1ce689aab8fcb4f8e4a0eb8bfccf4da2b0bce094806bda0ce7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58972338b2b52cdd49510d81a228a18eeaa615d4ceec36cd35707dad896b0966" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/terraform-module-versions version") + + assert_match "TYPE", shell_output("#{bin}/terraform-module-versions list") + assert_match "UPDATE?", shell_output("#{bin}/terraform-module-versions check") + end +end diff --git a/Formula/t/terraform-provider-libvirt.rb b/Formula/t/terraform-provider-libvirt.rb new file mode 100644 index 0000000000000..2db5370aa2bea --- /dev/null +++ b/Formula/t/terraform-provider-libvirt.rb @@ -0,0 +1,31 @@ +class TerraformProviderLibvirt < Formula + desc "Terraform provisioning with Linux KVM using libvirt" + homepage "https://github.com/dmacvicar/terraform-provider-libvirt" + url "https://github.com/dmacvicar/terraform-provider-libvirt/archive/refs/tags/v0.8.3.tar.gz" + sha256 "9d04ca75d7cb3db511ea251369890d1bdf2a6b7d77c4d4ce5d3cb0d2c0214252" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ffdbf2aca8d25e2cbb7823d116270cf0a9bc22561f96c4e169e491c69e50132a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4965933e5ec39c5f04ae18a08828df9e0dbbda8f7d80d1278c4951493fe9d15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4965933e5ec39c5f04ae18a08828df9e0dbbda8f7d80d1278c4951493fe9d15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4965933e5ec39c5f04ae18a08828df9e0dbbda8f7d80d1278c4951493fe9d15" + sha256 cellar: :any_skip_relocation, sonoma: "15e9fab3f999c737143ad9c66ff18fb3861f17035636179d3ffe752fbb120933" + sha256 cellar: :any_skip_relocation, ventura: "15e9fab3f999c737143ad9c66ff18fb3861f17035636179d3ffe752fbb120933" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c334e377f38bcb5959801706982f3c3ed8ca37b2da550351137ec7a49f800ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42969edbf2abbbba627cf3bd855e749aba8a2cbf570e5da9fa1a45a912444374" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + depends_on "libvirt" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match(/This binary is a plugin/, shell_output("#{bin}/terraform-provider-libvirt 2>&1", 1)) + end +end diff --git a/Formula/t/terraform-rover.rb b/Formula/t/terraform-rover.rb new file mode 100644 index 0000000000000..3161ea7bd7d60 --- /dev/null +++ b/Formula/t/terraform-rover.rb @@ -0,0 +1,62 @@ +class TerraformRover < Formula + desc "Terraform Visualizer" + homepage "https://github.com/im2nguyen/rover" + url "https://github.com/im2nguyen/rover/archive/refs/tags/v0.3.3.tar.gz" + sha256 "491709df11c70c9756e55f4cd203321bf1c6b92793b8db91073012a1f13b42e5" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0c8bae1c6ef570dad674bd7984d2f20ee36b55d92c2c73e9ea6fb96d1fbad622" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "190f1c6618d6c0ce1b895f0337e312d2db36c4c0e9020b97384b6ac7140eaae3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1818e26e098b7c82f51fae7441e753503c7e4a75276d251febef3d4857f0c6d1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "565e31665caca943d71cc52d6c7b59b688fa54f02455091f7c6770bae0742a4a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a438136c2b7532ebda2f4d03b932e447b15c9f30ca81eabac463578ed4b72ad9" + sha256 cellar: :any_skip_relocation, sonoma: "d54c14df4cf66eb0b4fd5fae9a343a819e26a592d4dca3e8a28ff273e0a9d67d" + sha256 cellar: :any_skip_relocation, ventura: "4931a68ebe6dae34d3d55d53dacfadcb42467f09dd4716459dbb4ab37dc74984" + sha256 cellar: :any_skip_relocation, monterey: "a68c002a32b05deaa61a950e2fbf62ea55ba2cdd5836314e0014c9f8cea09e10" + sha256 cellar: :any_skip_relocation, big_sur: "b5e72acca059507deef119a07073f60d8a4183fdb59393412fd2353b4eb6d41d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b078227fb4f38d09892b8ff73db1cb786940ef8dbb850e2f75c7c79d4688c882" + end + + # https://github.com/im2nguyen/rover/issues/125 + # https://github.com/im2nguyen/rover/issues/133 + deprecate! date: "2024-02-22", because: "depends on soon-to-be-deprecated terraform" + disable! date: "2025-02-24", because: "depends on terraform" + + depends_on "go" => :build + depends_on "node" + depends_on "terraform" + + # build patch for building with node 20 and go 1.21.0 + # fix `Error: error:0308010C:digital envelope routines::unsupported` error + # upstream patch PR, https://github.com/im2nguyen/rover/pull/128 + patch do + url "https://github.com/im2nguyen/rover/commit/8f5c9ca2ca6294c6a0463199ace822335c780041.patch?full_index=1" + sha256 "c13464fe2de234ab670e58cd9f8999d23b088260927797708ce00bd5a11ce821" + end + patch do + url "https://github.com/im2nguyen/rover/commit/989802276f74c57406a6b23a8d7ccc470fcdc975.patch?full_index=1" + sha256 "3550755a11358385000f1a6af96a305c3f49690949d079d8e4fd59b8d17a06f5" + end + + def install + cd "ui" do + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "build" + end + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"main.tf").write <<~HCL + output "hello_world" { + value = "Hello, World!" + } + HCL + system bin/"terraform-rover", "-standalone", "-tfPath", Formula["terraform"].bin/"terraform" + assert_path_exists testpath/"rover.zip" + + assert_match version.to_s, shell_output("#{bin}/terraform-rover --version") + end +end diff --git a/Formula/t/terraform.rb b/Formula/t/terraform.rb new file mode 100644 index 0000000000000..925cecfbb3d96 --- /dev/null +++ b/Formula/t/terraform.rb @@ -0,0 +1,76 @@ +class Terraform < Formula + desc "Tool to build, change, and version infrastructure" + homepage "https://www.terraform.io/" + # NOTE: Do not bump to v1.6.0+ as license changed to BUSL-1.1 + # https://github.com/hashicorp/terraform/pull/33661 + # https://github.com/hashicorp/terraform/pull/33697 + url "https://github.com/hashicorp/terraform/archive/refs/tags/v1.5.7.tar.gz" + sha256 "6742fc87cba5e064455393cda12f0e0241c85a7cb2a3558d13289380bb5f26f5" + license "MPL-2.0" + head "https://github.com/hashicorp/terraform.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87e8faf4dc4090ff8259a2cc258ac20518c154989af694475a3105d5ad57d664" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "82a9dcb1351fa533ea106fe0222678c89814a42ce4939d17c01178f4dbff4713" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9f647f7ab0dc2c8878c6f4ab51bcd412197bc02e30389b15cc37de2b0dfaf8b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8b14e9ffc5a5d154e5d6b58b94c18372c2f69c5ce1fd5735b351c1a1bac0187f" + sha256 cellar: :any_skip_relocation, sonoma: "9ce38d4ffe85f9530ba5911299d190f0a119610c4fd9fc6b30f57871647b61cb" + sha256 cellar: :any_skip_relocation, ventura: "f68fee2494570a785d854056484c6853421e592a7e58489bfdc692ef87913412" + sha256 cellar: :any_skip_relocation, monterey: "b8cef4d46451e2780754cdf5c5510b8ed458025668a03beb1dd69c23b61396ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "390afc2492fa4ea2fc7dce55efa25b9ae09e060639e1dc3d9c160718893881b3" + end + + # https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + deprecate! date: "2024-04-04", because: "changed its license to BUSL on the next release" + disable! date: "2025-04-12", because: "changed its license to BUSL on the next release" + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + def caveats + <<~EOS + We will not accept any new Terraform releases in homebrew/core (with the BUSL license). + The next release changed to a non-open-source license: + https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + See our documentation for acceptable licences: + https://docs.brew.sh/License-Guidelines + EOS + end + + test do + minimal = testpath/"minimal.tf" + minimal.write <<~HCL + variable "aws_region" { + default = "us-west-2" + } + + variable "aws_amis" { + default = { + eu-west-1 = "ami-b1cf19c6" + us-east-1 = "ami-de7ab6b6" + us-west-1 = "ami-3f75767a" + us-west-2 = "ami-21f78e11" + } + } + + # Specify the provider and access details + provider "aws" { + access_key = "this_is_a_fake_access" + secret_key = "this_is_a_fake_secret" + region = var.aws_region + } + + resource "aws_instance" "web" { + instance_type = "m1.small" + ami = var.aws_amis[var.aws_region] + count = 4 + } + HCL + system bin/"terraform", "init" + system bin/"terraform", "graph" + end +end diff --git a/Formula/t/terraform_landscape.rb b/Formula/t/terraform_landscape.rb new file mode 100644 index 0000000000000..494a874caf5f7 --- /dev/null +++ b/Formula/t/terraform_landscape.rb @@ -0,0 +1,70 @@ +class TerraformLandscape < Formula + desc "Improve Terraform's plan output" + homepage "https://github.com/coinbase/terraform-landscape" + url "https://github.com/coinbase/terraform-landscape/archive/refs/tags/v0.3.4.tar.gz" + sha256 "9e9b8e00aacf821fd07c9e3194e1e9f5824032dad4b12995649bcd9c59731ee1" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "6e403181c8828200717e99f9c86505f294c787db63060d1a356b4d95bff92f62" + end + + depends_on "ruby" + + resource "colorize" do + url "https://rubygems.org/gems/colorize-0.8.1.gem" + sha256 "0ba0c2a58232f9b706dc30621ea6aa6468eeea120eb6f1ccc400105b90c4798c" + end + + resource "commander" do + url "https://rubygems.org/gems/commander-4.5.2.gem" + sha256 "2c0746b01be9cfbbbf929d154a9bae0a224954c98b8e2b2f35b51984a6258f8c" + end + + resource "diffy" do + url "https://rubygems.org/gems/diffy-3.4.0.gem" + sha256 "340cc7e53db308b305a7c9eed37655d347a78b72422a2df60b9699ffee3c2f5b" + end + + resource "highline" do + url "https://rubygems.org/gems/highline-2.0.3.gem" + sha256 "2ddd5c127d4692721486f91737307236fe005352d12a4202e26c48614f719479" + end + + resource "polyglot" do + url "https://rubygems.org/gems/polyglot-0.3.5.gem" + sha256 "59d66ef5e3c166431c39cb8b7c1d02af419051352f27912f6a43981b3def16af" + end + + resource "treetop" do + url "https://rubygems.org/gems/treetop-1.6.11.gem" + sha256 "102e13adf065fc916eae60b9539a76101902a56e4283c847468eaea9c2c72719" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--no-document", + "--ignore-dependencies", "--install-dir", libexec + end + system "gem", "build", "terraform_landscape.gemspec" + system "gem", "install", "--ignore-dependencies", "terraform_landscape-#{version}.gem" + bin.install libexec/"bin/landscape" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + output = shell_output("#{bin}/landscape -v") + assert_match "Terraform Landscape #{version}", output + + test_input = "+ some_resource_type.some_resource_name" + colorized_expected_output = "\e[0;32;49m+ some_resource_type.some_resource_name\e[0m\n\n\n" + + output = shell_output("echo '#{test_input}' | #{bin}/landscape") + assert_match colorized_expected_output, output + end +end diff --git a/Formula/t/terraformer.rb b/Formula/t/terraformer.rb new file mode 100644 index 0000000000000..b83aecf7e41fc --- /dev/null +++ b/Formula/t/terraformer.rb @@ -0,0 +1,40 @@ +class Terraformer < Formula + desc "CLI tool to generate terraform files from existing infrastructure" + homepage "https://github.com/GoogleCloudPlatform/terraformer" + url "https://github.com/GoogleCloudPlatform/terraformer/archive/refs/tags/0.8.30.tar.gz" + sha256 "9e4738fadae011e458fa6fee168f47166cd3a9f5d7a9378018116345b0d6b4e6" + license "Apache-2.0" + head "https://github.com/GoogleCloudPlatform/terraformer.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "77df38f3f9fb70c3e797b0383a7806f4b4eb48e6d3966a228b2ae28094f47b75" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "76897a56f9ca4e794bfda1657619693478002f030986002ae0488f375f24eaba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8075775bc33c531995a7ab2e7b3f064f7e0bf437481959d48a9c57a85c40c90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bbe623acb962e6d9b1e76120231ed2de80de73a57e0ec938f5671e692ad1d587" + sha256 cellar: :any_skip_relocation, sonoma: "b2af0e4b871f67d1c732e7cae619a59624f22e3ba6f5adb8afa45d2a6e187dee" + sha256 cellar: :any_skip_relocation, ventura: "78eacf84bec4f443c67df8e8cff13534af27ed4beeb3692bc78e59c6adaf6a67" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa13f910e96e23576a6b03ba649e12a684bdfc1222246ea0c5acb4723b37eede" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cdfe4cd7d86eb95d6c0a08849778d3c0813ccbf2ac6b7dc2face163688ad01e4" + end + + depends_on "go" => :build + + def install + ldflags = %w[-s -w] + # Work around failure: ld: B/BL out of range -162045188 (max +/-128MB) + ldflags << "-extldflags=-ld_classic" if DevelopmentTools.clang_build_version == 1500 && Hardware::CPU.arm? + + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, + shell_output("#{bin}/terraformer version") + + assert_match "Available Commands", + shell_output("#{bin}/terraformer -h") + + assert_match "aaa", + shell_output("#{bin}/terraformer import google --resources=gcs --projects=aaa 2>&1", 1) + end +end diff --git a/Formula/t/terragrunt-atlantis-config.rb b/Formula/t/terragrunt-atlantis-config.rb new file mode 100644 index 0000000000000..7a79ba3464d00 --- /dev/null +++ b/Formula/t/terragrunt-atlantis-config.rb @@ -0,0 +1,29 @@ +class TerragruntAtlantisConfig < Formula + desc "Generate Atlantis config for Terragrunt projects" + homepage "https://github.com/transcend-io/terragrunt-atlantis-config" + url "https://github.com/transcend-io/terragrunt-atlantis-config/archive/refs/tags/v1.21.1.tar.gz" + sha256 "eefc48f2bedc11c154c6c7e088bb10316d811b2d6b851b11d37d80f18a28e517" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9dec17aa158c10a82522b739705b0adf4ee38a3aa0b7ae1e557dba5bd403e73" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9dec17aa158c10a82522b739705b0adf4ee38a3aa0b7ae1e557dba5bd403e73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9dec17aa158c10a82522b739705b0adf4ee38a3aa0b7ae1e557dba5bd403e73" + sha256 cellar: :any_skip_relocation, sonoma: "aebee1dd99ca225d24872c9deaaaa75e5d3929b5342290b377e0134eb10ab29e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c10183ff34a7f6f80a81d9922b6464941d199e15c177f5bb5bb3c1dbc8e0fedb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9792965a2e68d6c2310b8aca3ac9c56f9c20b46729ae79d9466bfc023fccd8b2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/terragrunt-atlantis-config generate --root #{testpath} 2>&1") + assert_match "Could not find an old config file. Starting from scratch", output + + assert_match version.to_s, shell_output("#{bin}/terragrunt-atlantis-config version") + end +end diff --git a/Formula/t/terragrunt.rb b/Formula/t/terragrunt.rb new file mode 100644 index 0000000000000..9f4f3f6208930 --- /dev/null +++ b/Formula/t/terragrunt.rb @@ -0,0 +1,41 @@ +class Terragrunt < Formula + desc "Thin wrapper for Terraform e.g. for locking state" + homepage "https://terragrunt.gruntwork.io/" + url "https://github.com/gruntwork-io/terragrunt/archive/refs/tags/v0.93.0.tar.gz" + sha256 "e058767360b82d1f37043300ec8ed9e3fd82e4b1bd3ddb42d4cc9def5cbd6f42" + license "MIT" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f463fd986f29efdf20a40342805e9ce664f939146a3a16decad15ac062c6ff22" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f463fd986f29efdf20a40342805e9ce664f939146a3a16decad15ac062c6ff22" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f463fd986f29efdf20a40342805e9ce664f939146a3a16decad15ac062c6ff22" + sha256 cellar: :any_skip_relocation, sonoma: "0d7e846af1aad0e3d40f657a8e58174f521464706921d894e4e31b5e82d425b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "08f512cecb261227089a4a76547b065264fe6e2eeb211de12ea12d13d792f1a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c49a2ee9462f7f9b6618d8ab3f93b701ba36807c85cbbf33e4968727b77d36ac" + end + + depends_on "go" => :build + + conflicts_with "tenv", because: "both install terragrunt binary" + conflicts_with "tgenv", because: "tgenv symlinks terragrunt binaries" + + def install + ldflags = %W[ + -s -w + -X github.com/gruntwork-io/go-commons/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/terragrunt --version") + end +end diff --git a/Formula/t/terrahash.rb b/Formula/t/terrahash.rb new file mode 100644 index 0000000000000..a9af9716ec5cc --- /dev/null +++ b/Formula/t/terrahash.rb @@ -0,0 +1,52 @@ +class Terrahash < Formula + desc "Create and store a hash of the Terraform modules used by your configuration" + homepage "https://github.com/ned1313/terrahash" + url "https://github.com/ned1313/terrahash/archive/refs/tags/v0.1.0.tar.gz" + sha256 "3f6d3db33167a77290741ca24ac32cb82f18400969cde4e501c84d250801758f" + license "MIT" + head "https://github.com/ned1313/terrahash.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c4b9014227d119a55bc9f42a5b244a12b88f0b19f09fdd85e3514b42d61682eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3bff28cc077e366d5dcef34c43192ea54defa55bce901fc53eaacfe329c194d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2827a0447062c2ee47306aafa09964dcbf25713e403461e3cfb3ed62ec9b11ea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f5309604e6a55ef456ba83b7bbe1c2ff8a24bd18b54703979737bf9500de7433" + sha256 cellar: :any_skip_relocation, arm64_monterey: "92e077e939732efc7b7809f338e561103207273c1c54d3fbc29b5315dd11c920" + sha256 cellar: :any_skip_relocation, sonoma: "2d73a995a7cd3b4ab3beec53269ad53cffffc28e76fb7f9a88b4e065ec1771bd" + sha256 cellar: :any_skip_relocation, ventura: "4645c23fc4859d34d2d03e6e1ad252dd833cb00f3d16be8996468e8f1507184d" + sha256 cellar: :any_skip_relocation, monterey: "a41c2cebf76de380cabfa016a7403e93b46367daa53570645543153013af6648" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d25b8e45a3885003a2ded44bcf917175d7a383659472c7d520e487cbcf8d1b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c60a0bdc8f9cb977a7e4b7804e1d845f70af7e697b06c2e1eca856ac55f533f" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"terrahash", "completion") + end + + test do + (testpath/"main.tf").write <<~HCL + module "example" { + source = "terraform-aws-modules/ec2-instance/aws" + version = "~> 5" + + ami = "ami-0c55b159cbfafe1f0" + instance_type = "t2.micro" + name = "example" + } + HCL + + system "tofu", "init" + assert_path_exists testpath/".terraform.lock.hcl" + + output = shell_output("#{bin}/terrahash init -s #{testpath}") + assert_match "Summary: 1 modules added to mod lock file", output + assert_path_exists testpath/".terraform.module.lock.hcl" + + assert_match version.to_s, shell_output("#{bin}/terrahash version") + end +end diff --git a/Formula/t/terrahelp.rb b/Formula/t/terrahelp.rb new file mode 100644 index 0000000000000..461b66ac24381 --- /dev/null +++ b/Formula/t/terrahelp.rb @@ -0,0 +1,61 @@ +class Terrahelp < Formula + desc "Tool providing extra functionality for Terraform" + homepage "https://github.com/opencredo/terrahelp" + url "https://github.com/opencredo/terrahelp/archive/refs/tags/v0.7.5.tar.gz" + sha256 "bfcffdf06e1db075872a6283d1f1cc6858b8139bf10dd480969b419aa6fc01f7" + license "Apache-2.0" + head "https://github.com/opencredo/terrahelp.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0473183fea6fcf7de2d8bb2a2ff65a1230c023e994b2cc1c1bcca147d16c37ea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5fc796c20c29a328691b8499b2987a5249ea4be381ceb270d73200dfd310f85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c077330b4b023abcd41cc69010561ff2046b426a760ea6129ff496df69416b04" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0637ab5db3f9423836bd621b67c01fcfbcf44fd86ac6033ff2b4ffab979a64b4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1de2d581302493095a12fc646062b1ea074aa792a36e81d37827438e832599a3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a416eab4b11b794fd807c6a6ce9d1fd87ebf8a4bfedeaa6ac45eeb9f6c092d52" + sha256 cellar: :any_skip_relocation, sonoma: "1b6320e4c3b16729d7b8399435f0b1cd3dc8a84c0391653c54c613fb8395b132" + sha256 cellar: :any_skip_relocation, ventura: "87ba308df8d9e75be30aa87e63ed4682fe818f5dffc5d9528325fe6782876971" + sha256 cellar: :any_skip_relocation, monterey: "e04b7ade448da1809858ef7cefea05f34b5670d4b159b3f67d8700c0572201d7" + sha256 cellar: :any_skip_relocation, big_sur: "da129e3fa2f21f00fe0b054d5510509d39d6d26cbd58efa7d06297363254fcc7" + sha256 cellar: :any_skip_relocation, catalina: "8db95e8da4909b68eaa18a9fab2e38769fcfa79426b3c1a53a4ac9d5315092fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba89b11520800ffb246741ad83c4825f42eb767d6ede1cdcf89897da0d39a9ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6fdaed3d9218418ada94b13cbdfc0bd156ac0b5b44294a95674df07a3e66147a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args, "-mod=vendor" + end + + test do + tf_vars = testpath/"terraform.tfvars" + tf_vars.write <<~EOS + tf_sensitive_key_1 = "sensitive-value-1-AK#%DJGHS*G" + EOS + + tf_output = testpath/"tf.out" + tf_output.write <<~EOS + Refreshing Terraform state in-memory prior to plan... + The refreshed state will be used to calculate this plan, but + will not be persisted to local or remote state storage. + + ... + + <= data.template_file.example + rendered: "" + template: "..." + vars.%: "1" + vars.msg1: "sensitive-value-1-AK#%DJGHS*G" + + Plan: 0 to add, 0 to change, 0 to destroy. + EOS + + output = pipe_output("#{bin}/terrahelp mask --tfvars #{tf_vars}", tf_output.read).strip + + assert_match("vars.msg1: \"******\"", output, "expecting sensitive value to be masked") + refute_match(/sensitive-value-1-AK#%DJGHS\*G/, output, "not expecting sensitive value to be presentt") + end +end diff --git a/Formula/t/terrahub.rb b/Formula/t/terrahub.rb new file mode 100644 index 0000000000000..31f3a96ebaa29 --- /dev/null +++ b/Formula/t/terrahub.rb @@ -0,0 +1,46 @@ +class Terrahub < Formula + desc "Terraform automation and orchestration tool" + homepage "https://web.archive.org/web/20240302100339/https://docs.terrahub.io/" + url "https://registry.npmjs.org/terrahub/-/terrahub-0.5.9.tgz" + sha256 "0288f47ab305550d0f21633a9a487e1de688556229242bf0c86e120d1240e1c4" + license "MPL-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f55d63174552fd453e84e74afdb9c3d7d76cf070ee8171f84f2a509ae1fb3e39" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "338bea3d5cf73bd46b3c98463c61454328de8bd281762ee4e504408e851622c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1c3889a86c9e36878ef3e3e9695c1033e06ba5843c58a9dc852684f0ee9911b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1c3889a86c9e36878ef3e3e9695c1033e06ba5843c58a9dc852684f0ee9911b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c1c3889a86c9e36878ef3e3e9695c1033e06ba5843c58a9dc852684f0ee9911b" + sha256 cellar: :any_skip_relocation, sonoma: "bf9b067ad0af2c0b17f573103306810203382430682d497201701f944d4394b8" + sha256 cellar: :any_skip_relocation, ventura: "bf9b067ad0af2c0b17f573103306810203382430682d497201701f944d4394b8" + sha256 cellar: :any_skip_relocation, monterey: "bf9b067ad0af2c0b17f573103306810203382430682d497201701f944d4394b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "d910829fdd680a735d1683dd502ec0f52720d2b340c9ad435d69ec7f6acf5e22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4916e5335be420a247d7aa5785bb29ac1e17d3bd55015e3cb8d75e726b73d656" + end + + deprecate! date: "2025-02-13", because: :unmaintained + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/".terrahub.yml").write <<~YAML + project: + name: terrahub-demo + code: abcd1234 + vpc_component: + name: vpc + root: ./vpc + subnet_component: + name: subnet + root: ./subnet + YAML + output = shell_output("#{bin}/terrahub graph") + assert_match "Project: terrahub-demo", output + end +end diff --git a/Formula/t/terramaid.rb b/Formula/t/terramaid.rb new file mode 100644 index 0000000000000..9d57630e24bd1 --- /dev/null +++ b/Formula/t/terramaid.rb @@ -0,0 +1,43 @@ +class Terramaid < Formula + desc "Utility for generating Mermaid diagrams from Terraform configurations" + homepage "https://github.com/RoseSecurity/Terramaid" + url "https://github.com/RoseSecurity/Terramaid/archive/refs/tags/v2.9.0.tar.gz" + sha256 "6b6e797d2ce5038414307af19cc0aebb2363cbfff66828610f814f61b79e377d" + license "Apache-2.0" + head "https://github.com/RoseSecurity/Terramaid.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5d9286e0b8856b587c83a56f03b6b3dc08613eae3fec76299525360091eefe69" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d9286e0b8856b587c83a56f03b6b3dc08613eae3fec76299525360091eefe69" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d9286e0b8856b587c83a56f03b6b3dc08613eae3fec76299525360091eefe69" + sha256 cellar: :any_skip_relocation, sonoma: "0a7e6f9cc76b33e119276a960ceb16bf6ca1ace2907bb147c8f1fd41b2c70f2a" + sha256 cellar: :any_skip_relocation, arm64_linux: "05ec52f9c3e8a0cc7be2b94b452e261d0fa47c70c1c84c8ddf88e3bf1f7c5efa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d89d47b37e93c8f5bdddfa1247f11c8447b6f55f016b6b7960c96a19eba857b" + end + + depends_on "go" => [:build, :test] + depends_on "opentofu" => :test + + def install + ldflags = "-s -w -X github.com/RoseSecurity/terramaid/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"terramaid", "completion") + end + + test do + ENV["TERRAMAID_TF_BINARY"] = "tofu" + + (testpath/"main.tf").write <<~HCL + resource "aws_instance" "example" { + ami = "ami-0c55b159cbfafe1f0" + instance_type = "t2.micro" + } + HCL + + system bin/"terramaid", "run", "-w", testpath.to_s, "-o", testpath/"output.mmd" + assert_path_exists testpath/"output.mmd" + + assert_match version.to_s, shell_output("#{bin}/terramaid version") + end +end diff --git a/Formula/t/terramate.rb b/Formula/t/terramate.rb new file mode 100644 index 0000000000000..f1b1c1f7afd27 --- /dev/null +++ b/Formula/t/terramate.rb @@ -0,0 +1,31 @@ +class Terramate < Formula + desc "Managing Terraform stacks with change detections and code generations" + homepage "https://terramate.io/docs/" + url "https://github.com/terramate-io/terramate/archive/refs/tags/v0.14.7.tar.gz" + sha256 "36d71ed54634af2f61958bcf139db5509f1307064716fc1aa180ab97d3a9b668" + license "MPL-2.0" + head "https://github.com/terramate-io/terramate.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "85696b980c239adcc6a0c72bde226cb75ee260bef0f4ef510d660d58f44260e4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "85696b980c239adcc6a0c72bde226cb75ee260bef0f4ef510d660d58f44260e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "85696b980c239adcc6a0c72bde226cb75ee260bef0f4ef510d660d58f44260e4" + sha256 cellar: :any_skip_relocation, sonoma: "b7c71fcee8c316625c0ec526e21236c913b1ce347e84d8cadb2917d9c9c7d255" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d4deae325bc1095d5e474e786258270de3c1ccd45b9b1f21abcf6201358ec15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e12442e853b2b354c045cfad4fc4ffa00189590a9ea37025b391017610f0c361" + end + + depends_on "go" => :build + + conflicts_with "tenv", because: "both install terramate binary" + + def install + system "go", "build", *std_go_args(output: bin/"terramate", ldflags: "-s -w"), "./cmd/terramate" + system "go", "build", *std_go_args(output: bin/"terramate-ls", ldflags: "-s -w"), "./cmd/terramate-ls" + end + + test do + assert_match version.to_s, shell_output("#{bin}/terramate version") + assert_match version.to_s, shell_output("#{bin}/terramate-ls -version") + end +end diff --git a/Formula/t/terrapin-scanner.rb b/Formula/t/terrapin-scanner.rb new file mode 100644 index 0000000000000..967fb3ef817f3 --- /dev/null +++ b/Formula/t/terrapin-scanner.rb @@ -0,0 +1,36 @@ +class TerrapinScanner < Formula + desc "Vulnerability scanner for the Terrapin attack" + homepage "https://terrapin-attack.com/" + url "https://github.com/RUB-NDS/Terrapin-Scanner/archive/refs/tags/v1.1.3.tar.gz" + sha256 "3dde1f19e9228a2a284d73c63b193fdf775cb993945fb328cd01e3a6cc834bf1" + license "Apache-2.0" + head "https://github.com/RUB-NDS/Terrapin-Scanner.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "741220ba0403c3fef850bee62a4e95bc709a6c09b8c8fd649dedcbec624a7c71" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d313ceecb351ed4b58d37e59fefe4092122577466cf8df2eb21fac0aca78514" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7f6c8f5b37b3e428566572156b3b2aafd3cbae6b682bb816e2a7383d12b3e87" + sha256 cellar: :any_skip_relocation, arm64_ventura: "debf3a1d1766ae89e3602df352d89cc6ae5e0d39c8f464c602a8f7bfb6bec82b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6d10e5ad979f31d9b56e74f743ea6df1db26ee31e15e9bce07d55ae11355fc5b" + sha256 cellar: :any_skip_relocation, sonoma: "938c69dc59167cc7623e247801c78718b50153c920d8ccab9eb8ed605afcd542" + sha256 cellar: :any_skip_relocation, ventura: "71fa69fc56d13745e3ec2b4d69cb428da7d648fa0fc04ae3e57631943021992b" + sha256 cellar: :any_skip_relocation, monterey: "dde6c16e39d7fc0bd16b4657b516dfc18d671b5aa86af5b7181e675428c24ae0" + sha256 cellar: :any_skip_relocation, arm64_linux: "97b45e2b36eb504254135533af46052f9962759842d570fda198783847bd0884" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d30e5880884a5379fd5a39238feac53605a78ef62c41a4c4cc591c338968a0db" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"Terrapin-Scanner") + end + + test do + output = shell_output("#{bin}/Terrapin-Scanner --connect localhost:2222 2>&1", 2) + assert_match "connect: connection refused", output + + assert_match version.to_s, shell_output("#{bin}/Terrapin-Scanner --version") + end +end diff --git a/Formula/t/terrascan.rb b/Formula/t/terrascan.rb new file mode 100644 index 0000000000000..e72ab328336ed --- /dev/null +++ b/Formula/t/terrascan.rb @@ -0,0 +1,56 @@ +class Terrascan < Formula + desc "Detect compliance and security violations across Infrastructure as Code" + homepage "https://runterrascan.io/" + url "https://github.com/tenable/terrascan/archive/refs/tags/v1.19.9.tar.gz" + sha256 "13c120a63d7024ca8c54422e047424e318622625336ed77b2c1a36ef5fb1441c" + license "Apache-2.0" + head "https://github.com/tenable/terrascan.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0b40d6c29fb9eecb6f19626e2f1b9f65babf3be3388542f81ed459f153a49399" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "55eba53ea3122827a508c8e157c2454488eba175c7be3f8bf5b936de423b0139" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f60423de629cd20ce0ff69e89135366135b39210338c3888c2431b4c7426b9d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "592b8157f3ccc5c93b0639f8309a4a5a302ca89df28ac7d2d0952844db61966a" + sha256 cellar: :any_skip_relocation, sonoma: "32e3939c3b64a6998af3fdb27aa6d47e783c4add9025b96b26a752075c5759c8" + sha256 cellar: :any_skip_relocation, ventura: "d8339a426f1cdf82ac986fdf3a72ecb4b8405c2c34f17552aca0ff55218de9ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b993936733949479fd684722cec212f9820553e9e21fede7b3da620067c1a69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc9651bca3ae4b21cea476f602ee391066e161aa1151a3eb80d32b5c725ffe1e" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=ignore" + system "go", "build", *std_go_args(ldflags:), "./cmd/terrascan" + + generate_completions_from_executable(bin/"terrascan", "completion") + end + + test do + (testpath/"ami.tf").write <<~HCL + resource "aws_ami" "example" { + name = "terraform-example" + virtualization_type = "hvm" + root_device_name = "/dev/xvda" + + ebs_block_device { + device_name = "/dev/xvda" + snapshot_id = "snap-xxxxxxxx" + volume_size = 8 + } + } + HCL + + expected = <<~EOS + \tViolated Policies :\t0 + \tLow :\t0 + \tMedium :\t0 + \tHigh :\t0 + EOS + + output = shell_output("#{bin}/terrascan scan -f #{testpath}/ami.tf -t aws") + assert_match expected, output + assert_match(/Policies Validated\s+:\s+\d+/, output) + end +end diff --git a/Formula/t/terratag.rb b/Formula/t/terratag.rb new file mode 100644 index 0000000000000..c6b28342ad93b --- /dev/null +++ b/Formula/t/terratag.rb @@ -0,0 +1,44 @@ +class Terratag < Formula + desc "CLI to automate tagging for AWS, Azure & GCP resources in Terraform" + homepage "https://www.terratag.io/" + url "https://github.com/env0/terratag/archive/refs/tags/v0.7.3.tar.gz" + sha256 "ae27b37043126bd18271e157018fc49b826fdbe8346d2074dddc83bf771c8e6b" + license "MPL-2.0" + head "https://github.com/env0/terratag.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0eaf6a4bfb673e20ce191c14ca054364cb8808830360c21666d1a09e8845d94d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0eaf6a4bfb673e20ce191c14ca054364cb8808830360c21666d1a09e8845d94d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0eaf6a4bfb673e20ce191c14ca054364cb8808830360c21666d1a09e8845d94d" + sha256 cellar: :any_skip_relocation, sonoma: "5408650be83085a17f5a9eba64c9dfea56ece0bc7d0380c68ace19e690c5dfac" + sha256 cellar: :any_skip_relocation, arm64_linux: "e558591f774d3476b577d99c5cc7f1c836f7722ff204e1881103dded4e251668" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7458454f1f48018fc049b9a3ace224d76b6f264924fab5ba8759e7eb0be31d2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/terratag" + end + + test do + (testpath/"main.tf").write <<~EOS + provider "aws" { + region = "us-east-1" + } + + resource "aws_instance" "example" { + ami = "ami-12345678" + instance_type = "t2.micro" + } + EOS + + system bin/"terratag", "-dir", testpath.to_s, "-tags", '{"environment":"test","owner":"brew"}', + "-rename=false" + + output = shell_output("#{bin}/terratag -dir #{testpath} " \ + "-tags '{\"environment\":\"test\",\"owner\":\"brew\"}' -rename=false 2>&1") + + assert_match "terraform init must run before running terratag", output + end +end diff --git a/Formula/t/teslamate.rb b/Formula/t/teslamate.rb new file mode 100644 index 0000000000000..2fb5d5059069d --- /dev/null +++ b/Formula/t/teslamate.rb @@ -0,0 +1,103 @@ +class Teslamate < Formula + desc "Self-hosted data logger for your Tesla" + homepage "https://docs.teslamate.org" + url "https://github.com/teslamate-org/teslamate/archive/refs/tags/v2.1.1.tar.gz" + sha256 "25787bbf785fa623e8d54ecd39976af737c8bff9aaa9b581bf9d7254c9defcaa" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "87ff93fad948ad249b3e18922d4f8196177d1d9ac4b7744d8083459968e000d4" + sha256 cellar: :any, arm64_sequoia: "7c204f36cabb2d89dddf6f7d818b305b29598ec220d4343cb25d051fec4c4040" + sha256 cellar: :any, arm64_sonoma: "376137b668590f52bd25dfafcbce56a83a9e677de2f20a223f1aca3e6f21f4a8" + sha256 cellar: :any, arm64_ventura: "4e7cbcb7595ee69a10af1da9231ed37bf8fe79174a88ae22851908fb1dc5e742" + sha256 cellar: :any, sonoma: "b0c19c28d0094cbeb0dfd9ffdedf330513ea6a4a31a1cfcf4614db6963de4563" + sha256 cellar: :any, ventura: "0aee63b55d7bfc4593fac0b52a17dd24741f2713d282267b5a48dd97f0c1cc57" + sha256 cellar: :any_skip_relocation, arm64_linux: "5be50a032e3597e5bd0b49b8f20adacd461b8703ac73af4dec6699290679b4ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbd202552ff94068a7f6ee70827060adefc9ab36ddcb542111d71b8fbbaa75bb" + end + + depends_on "node" => :build + depends_on "postgresql@18" => :test + depends_on "elixir" + depends_on "erlang" + depends_on "openssl@3" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + # See https://docs.teslamate.org/docs/installation/debian/ + system "mix", "local.hex", "--force" + system "mix", "local.rebar", "--force" + system "mix", "deps.get", "--only", "prod" + system "npm", "install", "--prefix", "./assets", *std_npm_args(prefix: false) + system "npm", "run", "deploy", "--prefix", "./assets" + + with_env("MIX_ENV" => "prod") do + system "mix", "do", "phx.digest,", "release", "--overwrite" + end + + touch buildpath/"teslamate.env" + etc.install "teslamate.env" + libexec.install Dir["_build/prod/rel/teslamate/*"] + bin.install_symlink Dir["#{libexec}/bin/teslamate"] + + # Corresponds to https://github.com/teslamate-org/teslamate/blob/main/entrypoint.sh + (bin/"teslamate_brew_services").write <<~EOS + #!/bin/bash + set -e + source #{etc}/teslamate.env + #{bin}/teslamate eval "TeslaMate.Release.migrate" + exec #{bin}/teslamate start + EOS + end + + service do + run opt_bin/"teslamate_brew_services" + keep_alive true + log_path var/"log/teslamate.log" + error_log_path var/"log/teslamate.log" + working_dir var + end + + test do + ENV["LC_ALL"] = "C" + + pg_port = free_port + pg_bin = Formula["postgresql@18"].opt_bin + pg_ctl = pg_bin/"pg_ctl" + datadir = testpath/"postgres" + system pg_ctl, "init", "-D", datadir + + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + port = #{pg_port} + unix_socket_directories = '#{datadir}' + EOS + + system pg_ctl, "start", "-D", datadir, "-l", testpath/"postgres.log" + begin + system pg_bin/"createdb", "-h", datadir, "-p", pg_port.to_s, "teslamate" + system pg_bin/"createuser", "-h", datadir, "-p", pg_port.to_s, "-s", "teslamate" + + # Run Teslamate with the test database + ENV["DATABASE_USER"] = "teslamate" + ENV["DATABASE_PASS"] = "" + ENV["DATABASE_NAME"] = "teslamate" + ENV["DATABASE_HOST"] = "127.0.0.1" + ENV["DATABASE_PORT"] = pg_port.to_s + ENV["DISABLE_MQTT"] = "true" + log_file = testpath/"teslamate_test.log" + File.open(log_file, "w") do |file| + pid = spawn(opt_bin/"teslamate_brew_services", out: file, err: file) + sleep 20 + system opt_bin/"teslamate", "stop" + Process.kill("KILL", pid) + Process.wait(pid) + end + output = log_file.read + assert_match "Access TeslaMateWeb.Endpoint at http://localhost", output + ensure + system pg_ctl, "stop", "-D", datadir + end + end +end diff --git a/Formula/t/tesseract-lang.rb b/Formula/t/tesseract-lang.rb new file mode 100644 index 0000000000000..94d42eea79072 --- /dev/null +++ b/Formula/t/tesseract-lang.rb @@ -0,0 +1,34 @@ +class TesseractLang < Formula + desc "Enables extra languages support for Tesseract" + homepage "https://github.com/tesseract-ocr/tessdata_fast/" + url "https://github.com/tesseract-ocr/tessdata_fast/archive/refs/tags/4.1.0.tar.gz" + sha256 "d0e3bb6f3b4e75748680524a1d116f2bfb145618f8ceed55b279d15098a530f9" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "ff6da65c5137edfec72e7826768d1d8f3fb311c45eb8c0ba21cfff191a7ed56c" + end + + depends_on "tesseract" + + resource "testfile" do + url "https://raw.githubusercontent.com/tesseract-ocr/test/6dd816cdaf3e76153271daf773e562e24c928bf5/testing/eurotext.tif" + sha256 "7b9bd14aba7d5e30df686fbb6f71782a97f48f81b32dc201a1b75afe6de747d6" + end + + def install + rm "eng.traineddata" + rm "osd.traineddata" + (share/"tessdata").install Dir["*"] + end + + test do + resource("testfile").stage do + system "#{Formula["tesseract"].bin}/tesseract", "./eurotext.tif", "./output", "-l", "eng+deu" + assert_match "über den faulen Hund. Le renard brun\n", File.read("output.txt") + end + end +end diff --git a/Formula/t/tesseract.rb b/Formula/t/tesseract.rb new file mode 100644 index 0000000000000..e9e4dcdf889b6 --- /dev/null +++ b/Formula/t/tesseract.rb @@ -0,0 +1,98 @@ +class Tesseract < Formula + desc "OCR (Optical Character Recognition) engine" + homepage "https://tesseract-ocr.github.io/" + url "https://github.com/tesseract-ocr/tesseract/archive/refs/tags/5.5.1.tar.gz" + sha256 "a7a3f2a7420cb6a6a94d80c24163e183cf1d2f1bed2df3bbc397c81808a57237" + license "Apache-2.0" + head "https://github.com/tesseract-ocr/tesseract.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "375581dadab9eb9664e9a1f3ca4a0e621c9f1a9e016ce0653f68c01091829bd0" + sha256 arm64_sequoia: "868efa52231ba29227c3f394bbb6ed684743222cf15622661f253a9f0d6164ed" + sha256 arm64_sonoma: "7b80671e010cd121964ed5962159fc8b42950796c33304de155c850378eaa49d" + sha256 arm64_ventura: "894270307a4fe98f7b0caa386c24efc7d995b60e468f5e4536b48b4b5275126d" + sha256 cellar: :any, sonoma: "1a804044fac31660e5d4bdffec1de80c60b6d99b21312cdaa7f69fc6c4c42304" + sha256 cellar: :any, ventura: "3f17c42eb79554bf6544344380fd67e22ecc54aed07e719b4f7f03c4fb6f83c7" + sha256 arm64_linux: "a1f93cc60eca99a4c5bac11c40b02620df5628ea55b95bf6dd7813f533947724" + sha256 x86_64_linux: "1874dfec6cedc7cd1bd7fd117623933eab4bbf7193128f81b6dffc7d8791eed3" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "fontconfig" + depends_on "glib" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "leptonica" + depends_on "libarchive" + depends_on "pango" + + on_macos do + depends_on "freetype" + depends_on "gettext" + end + + resource "eng" do + url "https://github.com/tesseract-ocr/tessdata_fast/raw/4.1.0/eng.traineddata" + sha256 "7d4322bd2a7749724879683fc3912cb542f19906c83bcc1a52132556427170b2" + end + + resource "osd" do + url "https://github.com/tesseract-ocr/tessdata_fast/raw/4.1.0/osd.traineddata" + sha256 "9cf5d576fcc47564f11265841e5ca839001e7e6f38ff7f7aacf46d15a96b00ff" + end + + resource "snum" do + url "https://github.com/USCDataScience/counterfeit-electronics-tesseract/raw/319a6eeacff181dad5c02f3e7a3aff804eaadeca/Training%20Tesseract/snum.traineddata" + sha256 "36f772980ff17c66a767f584a0d80bf2302a1afa585c01a226c1863afcea1392" + end + + def install + # explicitly state leptonica header location, as the makefile defaults to /usr/local/include, + # which doesn't work for non-default homebrew location + ENV["LIBLEPT_HEADERSDIR"] = HOMEBREW_PREFIX/"include" + + ENV.cxx11 + + system "./autogen.sh" + system "./configure", "--datarootdir=#{HOMEBREW_PREFIX}/share", + "--disable-silent-rules", + *std_configure_args + + system "make", "training" + + # make install in the local share folder to avoid permission errors + system "make", "install", "training-install", "datarootdir=#{share}" + + resource("snum").stage { mv "snum.traineddata", share/"tessdata" } + resource("eng").stage { mv "eng.traineddata", share/"tessdata" } + resource("osd").stage { mv "osd.traineddata", share/"tessdata" } + end + + def caveats + <<~EOS + This formula contains only the "eng", "osd", and "snum" language data files. + If you need any other supported languages, run `brew install tesseract-lang`. + EOS + end + + test do + resource "homebrew-test_resource" do + url "https://raw.githubusercontent.com/tesseract-ocr/test/6dd816cdaf3e76153271daf773e562e24c928bf5/testing/eurotext.tif" + sha256 "7b9bd14aba7d5e30df686fbb6f71782a97f48f81b32dc201a1b75afe6de747d6" + end + + resource("homebrew-test_resource").stage do + system bin/"tesseract", "./eurotext.tif", "./output", "-l", "eng" + assert_match "The (quick) [brown] {fox} jumps!\n", File.read("output.txt") + end + end +end diff --git a/Formula/t/testdisk.rb b/Formula/t/testdisk.rb new file mode 100644 index 0000000000000..c65d12c55e94e --- /dev/null +++ b/Formula/t/testdisk.rb @@ -0,0 +1,46 @@ +class Testdisk < Formula + desc "Powerful free data recovery utility" + homepage "https://www.cgsecurity.org/wiki/TestDisk" + url "https://www.cgsecurity.org/testdisk-7.2.tar.bz2" + sha256 "f8343be20cb4001c5d91a2e3bcd918398f00ae6d8310894a5a9f2feb813c283f" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.cgsecurity.org/wiki/TestDisk_Download" + regex(/href=.*?testdisk[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ef939fc1be6e7d281fbc1340258bf82710eec158535d76ea6ca5290ff1fd9a8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1726a772720eff30c93476660a6ce2ee68c89b400e5247086ebf6b77b27c1b84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76fe31d9656985c415243cdb7ab5a1f65696f8bcebebd2f2a1308517e870f205" + sha256 cellar: :any_skip_relocation, arm64_ventura: "843c14d99607b293dcbe021687205437023bc8a5a57813bac8214d2abe578179" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b599705f681955d6fcd094b44777dc29fa6b45886b3d47bef910579dbfd837de" + sha256 cellar: :any_skip_relocation, sonoma: "8db633d609f8cd60846d7f0f580a752f2c4959a89c2cf5c2150fbec8c1db1500" + sha256 cellar: :any_skip_relocation, ventura: "3acf40e8f1a8649610455147ad0c1e3d9400882b9df1e5ba247b4ac19fdd87ec" + sha256 cellar: :any_skip_relocation, monterey: "e0c1d8dc41bac15b27c7dddaa1cc375e0205cba23e002a5dde0db8bd4251f291" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e80b679b3c59a860ea10e68c79ab7de1acc58c4e2218956cd99f6bab22fa58e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0624bb8d366a5835a037928e92fcbdd998e0df181a7a1b41458f10d5c0f84231" + end + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "util-linux" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args.reject { |s| s["disable-debug"] } + system "make", "install" + end + + test do + path = "test.dmg" + cp test_fixtures(path + ".gz"), path + ".gz" + system "gunzip", path + system bin/"testdisk", "/list", path + end +end diff --git a/Formula/t/testkube.rb b/Formula/t/testkube.rb new file mode 100644 index 0000000000000..271ff1ad24333 --- /dev/null +++ b/Formula/t/testkube.rb @@ -0,0 +1,43 @@ +class Testkube < Formula + desc "Kubernetes-native framework for test definition and execution" + homepage "https://testkube.io" + url "https://github.com/kubeshop/testkube/archive/refs/tags/v2.3.0.tar.gz" + sha256 "cf8d2519691e7d3c05be796ef6404c3d711c544a803180842a2563cb998ceb75" + license "MIT" + head "https://github.com/kubeshop/testkube.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6b3c1dfb3c4cd6d6528ffdf474fd2c1d832aadc9e037be0e8ee65bf021e9fb4d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b3c1dfb3c4cd6d6528ffdf474fd2c1d832aadc9e037be0e8ee65bf021e9fb4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b3c1dfb3c4cd6d6528ffdf474fd2c1d832aadc9e037be0e8ee65bf021e9fb4d" + sha256 cellar: :any_skip_relocation, sonoma: "01e0c5489fdea3cf4b51f71564d61564868f89bc46a257354d15829f1b7f8601" + sha256 cellar: :any_skip_relocation, arm64_linux: "d02d9f1ad169aea94805023ad9131f6feb0b04298495f1ff62c150f10471f1cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6e9540598fed819983a2196a3d0f7648a073d961162466aa410380a63f8a35b" + end + + depends_on "go" => :build + depends_on "helm" + depends_on "kubernetes-cli" + + def install + ldflags = "-s -w -X main.version=#{version} -X main.builtBy=#{tap.user}" + + system "go", "build", *std_go_args(ldflags:, output: bin/"kubectl-testkube"), "./cmd/kubectl-testkube" + bin.install_symlink "kubectl-testkube" => "testkube" + + generate_completions_from_executable(bin/"kubectl-testkube", "completion") + end + + test do + output = shell_output("#{bin}/kubectl-testkube get tests 2>&1", 1) + assert_match("no configuration has been provided", output) + + output = shell_output("#{bin}/kubectl-testkube help") + assert_match("Testkube entrypoint for kubectl plugin", output) + end +end diff --git a/Formula/t/testscript.rb b/Formula/t/testscript.rb new file mode 100644 index 0000000000000..1d898a58f2692 --- /dev/null +++ b/Formula/t/testscript.rb @@ -0,0 +1,30 @@ +class Testscript < Formula + desc "Integration tests for command-line applications in .txtar format" + homepage "https://github.com/rogpeppe/go-internal/tree/master/cmd/testscript" + url "https://github.com/rogpeppe/go-internal/archive/refs/tags/v1.14.1.tar.gz" + sha256 "7e54f6d0f002a4904f150e29417515b286ff3b0bbde8e1a01082cbb5178132cb" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "28d3ec9f59f45bbc4d9422e206e72a57e219d7f406f45358969047c0b2c7d2b0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32cde373625b9755ac45543595073083f253574b0bfdf50ce6d42fd8e20f08b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32cde373625b9755ac45543595073083f253574b0bfdf50ce6d42fd8e20f08b0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "32cde373625b9755ac45543595073083f253574b0bfdf50ce6d42fd8e20f08b0" + sha256 cellar: :any_skip_relocation, sonoma: "49b838e6643cee284d00a50e1cd8be9c5b3d67033856bc360deef31f2c629fcc" + sha256 cellar: :any_skip_relocation, ventura: "49b838e6643cee284d00a50e1cd8be9c5b3d67033856bc360deef31f2c629fcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "c20bb5d4ba2e8032f66e5c61ddeaf01d07052db00e6810814be3abc85714f992" + sha256 cellar: :any_skip_relocation, x86_64_linux: "022c023408e7ecc0d604e44d262d675fb4be88303ea8794b422f1b472009e1ab" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/testscript" + end + + test do + (testpath/"hello.txtar").write("exec echo hello!\nstdout hello!") + + assert_equal "PASS\n", shell_output("#{bin}/testscript hello.txtar") + end +end diff --git a/Formula/t/testssl.rb b/Formula/t/testssl.rb new file mode 100644 index 0000000000000..2ead7973257fe --- /dev/null +++ b/Formula/t/testssl.rb @@ -0,0 +1,34 @@ +class Testssl < Formula + desc "Tool which checks for the support of TLS/SSL ciphers and flaws" + homepage "https://testssl.sh/" + url "https://github.com/testssl/testssl.sh/archive/refs/tags/v3.2.2.tar.gz" + sha256 "7beafef432baecf76ef76f2ae022b5ada4ea7fad54e02ae7d192db85b42a496f" + license "GPL-2.0-only" + head "https://github.com/testssl/testssl.sh.git", branch: "3.3dev" + + bottle do + sha256 cellar: :any_skip_relocation, all: "941c4d422ac32d5236eb0a40d6e4c8820162b7c3b539f010d82d32db4271c8be" + end + + depends_on "openssl@3" + + on_linux do + depends_on "bind" => :test # can also use `drill` or `ldns` + depends_on "util-linux" # for `hexdump` + end + + def install + bin.install "testssl.sh" + man1.install "doc/testssl.1" + prefix.install "etc" + env = { + PATH: "#{Formula["openssl@3"].opt_bin}:$PATH", + TESTSSL_INSTALL_DIR: prefix, + } + bin.env_script_all_files(libexec/"bin", env) + end + + test do + system bin/"testssl.sh", "--local", "--warnings", "off" + end +end diff --git a/Formula/t/tetra.rb b/Formula/t/tetra.rb new file mode 100644 index 0000000000000..e6dff2c8c4ebe --- /dev/null +++ b/Formula/t/tetra.rb @@ -0,0 +1,35 @@ +class Tetra < Formula + desc "Tetragon CLI to observe, manage and troubleshoot Tetragon instances" + homepage "https://tetragon.io/" + url "https://github.com/cilium/tetragon/archive/refs/tags/v1.6.0.tar.gz" + sha256 "83469d661ca86ce74e75c10eb01628291088cedb73e2641029504b3bd7fb1f86" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd5eeed671d70196a85650b5cbed6983a65736fd1dcb93467f67cd46b49c3d1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2eed2fea2a2857a98f3fe6606a620afae50ae014211eb75e4c8a7080e4c2b65" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1909076e0a335f5e09b2aa738dd1ccf93baf2cedac0ef4e72f6b47542557052a" + sha256 cellar: :any_skip_relocation, sonoma: "7d9f4f87022c5ff971733c04095877a0904e2549b4d4d7d090adcdb48d6d70d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce66eb92abce3d9e047ca52f8048a1b8a53693523b4ba173c3eceb392eade209" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3fa4268ef3b24e2d63b989a6012df5bda72d48e0821ee287e0b4039a2396c817" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/cilium/tetragon/pkg/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"tetra"), "./cmd/tetra" + + generate_completions_from_executable(bin/"tetra", "completion") + end + + test do + assert_match "CLI version: #{version}", shell_output("#{bin}/tetra version --build") + assert_match "{}", pipe_output("#{bin}/tetra getevents", "invalid_event") + end +end diff --git a/Formula/t/tevent.rb b/Formula/t/tevent.rb new file mode 100644 index 0000000000000..6d27db54d9849 --- /dev/null +++ b/Formula/t/tevent.rb @@ -0,0 +1,77 @@ +class Tevent < Formula + desc "Event system based on the talloc memory management library" + homepage "https://tevent.samba.org" + url "https://www.samba.org/ftp/tevent/tevent-0.17.1.tar.gz" + sha256 "1be2dea737cde25fe06621f84945e63eb71259e0c43e9f8f5da482dab1a7be92" + license "LGPL-3.0-or-later" + + livecheck do + url "https://www.samba.org/ftp/tevent/" + regex(/href=.*?tevent[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e7447eb820e3be9a34b7dece613895a67f10de300bb30d0e59322467591f3edf" + sha256 cellar: :any, arm64_sequoia: "cf0a28518720b3c7c49c61ab6c9022cae01592fd4080679182cb7b8540f85155" + sha256 cellar: :any, arm64_sonoma: "d6842bb23c4ce73840132be51a67414f3351c6a6f1aeb8a4f0c4a2c39b2a4853" + sha256 cellar: :any, arm64_ventura: "35724246e278253aa0f95ca74069a1349748379fc0559d00a1ffba72a5178399" + sha256 cellar: :any, sonoma: "e6a681b4cf04d84f7b6a8ef3f446f9d798238fa38034594194cd777e5f4ff623" + sha256 cellar: :any, ventura: "a33ba3c6e7c392e14b4f3793449a38b74294b1556b74564eaba98fbcbde7a931" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ff33cd50247ce9a038e70ad4b99e91e4fe5b71d2127297f0f313188b51733ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2030d92ac3d56d9387cbf24abb485f6699c557f39fce15d6f46b1ea7e03ad6c2" + end + + depends_on "cmocka" => :build + depends_on "pkgconf" => :build + depends_on "talloc" + + uses_from_macos "python" => :build + + def install + system "./configure", "--bundled-libraries=NONE", + "--disable-python", + "--disable-rpath", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + # https://tevent.samba.org/tevent_events.html#Immediate + (testpath/"test.c").write <<~C + #include + #include + #include + struct info_struct { + int counter; + }; + static void foo(struct tevent_context *ev, struct tevent_immediate *im, void *private_data) { + struct info_struct *data = talloc_get_type_abort(private_data, struct info_struct); + printf("Data value: %d\\n", data->counter); + } + int main (void) { + struct tevent_context *event_ctx; + TALLOC_CTX *mem_ctx; + struct tevent_immediate *im; + printf("INIT\\n"); + mem_ctx = talloc_new(NULL); + event_ctx = tevent_context_init(mem_ctx); + struct info_struct *data = talloc(mem_ctx, struct info_struct); + // setting up private data + data->counter = 1; + // first immediate event + im = tevent_create_immediate(mem_ctx); + if (im == NULL) { + fprintf(stderr, "FAILED\\n"); + return EXIT_FAILURE; + } + tevent_schedule_immediate(im, event_ctx, foo, data); + tevent_loop_wait(event_ctx); + talloc_free(mem_ctx); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ltevent", "-L#{Formula["talloc"].opt_lib}", "-ltalloc" + system "./test" + end +end diff --git a/Formula/t/tex-fmt.rb b/Formula/t/tex-fmt.rb new file mode 100644 index 0000000000000..b1a7e11cbf79a --- /dev/null +++ b/Formula/t/tex-fmt.rb @@ -0,0 +1,54 @@ +class TexFmt < Formula + desc "Extremely fast LaTeX formatter written in Rust" + homepage "https://wgunderwood.github.io/tex-fmt/" + url "https://github.com/WGUNDERWOOD/tex-fmt/archive/refs/tags/v0.5.6.tar.gz" + sha256 "84422be49ede7bfaa42949d192a9d7dfb2317c9e68edf3cf6abc346c8a19f036" + license "MIT" + head "https://github.com/WGUNDERWOOD/tex-fmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "308e7c17a6e05131ff3e483eee3845fa7287c5b41c20b45d2832b7ee75763ed2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "529746e62639558106ed94dfdeceed69b8c021629fb0b3581aab111831373981" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "890703e95c42436f8f80d74d2819a726238eaedb25d096629e8e0d9af216b6f2" + sha256 cellar: :any_skip_relocation, sonoma: "93713998c6d2477d3981309c914b0cd7f54fd3eb7a5e2c7c3eb05c2d2c5eda83" + sha256 cellar: :any_skip_relocation, arm64_linux: "3675c374858ef61f677ede0867d97efd2c06a7127ad8136d2c7a0fd5f5c83914" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6800478c7df7b44b8437fdcc3c87133dd812445db40c7f4c98c2af4ff151afb3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"tex-fmt", "--completion") + man1.install "man/tex-fmt.1" + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \title{tex-fmt Homebrew Test} + \begin{document} + \maketitle + \begin{itemize} + \item Hello + \item World + \end{itemize} + \end{document} + TEX + + assert_equal <<~'TEX', shell_output("#{bin}/tex-fmt --print #{testpath}/test.tex") + \documentclass{article} + \title{tex-fmt Homebrew Test} + \begin{document} + \maketitle + \begin{itemize} + \item Hello + \item World + \end{itemize} + \end{document} + TEX + + assert_match version.to_s, shell_output("#{bin}/tex-fmt --version") + end +end diff --git a/Formula/t/texi2html.rb b/Formula/t/texi2html.rb new file mode 100644 index 0000000000000..039cf62a6941d --- /dev/null +++ b/Formula/t/texi2html.rb @@ -0,0 +1,49 @@ +class Texi2html < Formula + desc "Convert TeXinfo files to HTML" + homepage "https://www.nongnu.org/texi2html/" + url "https://download.savannah.gnu.org/releases/texi2html/texi2html-5.0.tar.gz" + sha256 "e60edd2a9b8399ca615c6e81e06fa61946ba2f2406c76cd63eb829c91d3a3d7d" + license "GPL-2.0-or-later" + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0f76e24ff2903b5bc781b51c1fa641893343610b6827eed40af85063af2def71" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a2abbe20da6fd14b3e73a4d7f08f366af564a2dc2e86b39de3291a9f7c3b9eec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a2abbe20da6fd14b3e73a4d7f08f366af564a2dc2e86b39de3291a9f7c3b9eec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a2abbe20da6fd14b3e73a4d7f08f366af564a2dc2e86b39de3291a9f7c3b9eec" + sha256 cellar: :any_skip_relocation, sonoma: "20ac4a12f76ccf5fe1ab324264c9b72f1b3d9cfedf981b7e743b636045e32f45" + sha256 cellar: :any_skip_relocation, ventura: "20ac4a12f76ccf5fe1ab324264c9b72f1b3d9cfedf981b7e743b636045e32f45" + sha256 cellar: :any_skip_relocation, arm64_linux: "e07d313b8d6ff0b95101597fffdd363fe7a935154ed310c4ec4d47214339f6e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec47e69ea0775ca07947f7be4d5111ab308b2b472042b517e0bf0ea19b115d05" + end + + on_macos do + depends_on "gettext" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", "--infodir=#{info}", *args, *std_configure_args + chmod 0755, "./install-sh" + system "make", "install" + end + + test do + (testpath/"test.texinfo").write <<~EOS + @ifnottex + @node Top + @top Hello World! + @end ifnottex + @bye + EOS + system bin/"texi2html", "test.texinfo" + assert_match "Hello World!", File.read("test.html") + end +end diff --git a/Formula/t/texi2mdoc.rb b/Formula/t/texi2mdoc.rb new file mode 100644 index 0000000000000..48e215140b579 --- /dev/null +++ b/Formula/t/texi2mdoc.rb @@ -0,0 +1,49 @@ +class Texi2mdoc < Formula + desc "Convert Texinfo data to mdoc input" + homepage "https://mandoc.bsd.lv/texi2mdoc/" + url "https://mandoc.bsd.lv/texi2mdoc/snapshots/texi2mdoc-0.1.2.tgz" + sha256 "7a45fd87c27cc8970a18db9ddddb2f09f18b8dd5152bf0ca377c3a5e7d304bfe" + license "ISC" + head "anoncvs@mandoc.bsd.lv:/cvs", using: :cvs + + livecheck do + url "https://mandoc.bsd.lv/texi2mdoc/snapshots/" + regex(/href=.*?texi2mdoc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5b041762001de978d115ff087c59982e554f06f6b83a92d1d35988d4e73ff7db" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9a769b9b0c164d2f296ef48c04dfa683a0605dbf55e93f12c34c273b9ca6f90c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10e2d836d65a262b58228fd05b6b09a9d069d2b889905b36a81239fd646aec7d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a6c15b6cfa57413d994f850c8e1175bbb2023859cbdfd8730b07795c543a40f3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d24979a6eebabad2b16282ea9f5b1518a847c10874cd3fb0545c687a3569849f" + sha256 cellar: :any_skip_relocation, sonoma: "a991a1ed6f69eeaec46e684c2d66c257d04ae6da8664aea9d0db3c8c24f1f97b" + sha256 cellar: :any_skip_relocation, ventura: "086e55b2a674e03d5ac3d53a5553823ad4b72c7062d43d9ae64e138bb2f96b4f" + sha256 cellar: :any_skip_relocation, monterey: "9b2c1306839db292791ad1e6e89a0c723a9baaeeb5ca4dfcf8132d2b19646b33" + sha256 cellar: :any_skip_relocation, arm64_linux: "59a3fc35cc4cf7c00742287367c32d3aeb3945b95d10ec83581276efb86e3fe2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f155dfc278556137351b12849d598130decfbf64e824f99de7dda813a731051f" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + share.install prefix/"man" + end + + test do + (testpath/"test.texi").write <<~EOS + @ifnottex + @node Top + @top Hello World! + @end ifnottex + @bye + EOS + + output = shell_output("#{bin}/texi2mdoc #{testpath}/test.texi") + expected_outputs = [/\.Nm\s+test/, /\.Sh\s+Hello World!/] + expected_outputs.each do |expected| + assert_match expected, output + end + end +end diff --git a/Formula/t/texinfo.rb b/Formula/t/texinfo.rb new file mode 100644 index 0000000000000..2469e9b601a97 --- /dev/null +++ b/Formula/t/texinfo.rb @@ -0,0 +1,58 @@ +class Texinfo < Formula + desc "Official documentation format of the GNU project" + homepage "https://www.gnu.org/software/texinfo/" + url "https://ftpmirror.gnu.org/gnu/texinfo/texinfo-7.2.tar.xz" + mirror "https://ftp.gnu.org/gnu/texinfo/texinfo-7.2.tar.xz" + sha256 "0329d7788fbef113fa82cb80889ca197a344ce0df7646fe000974c5d714363a6" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_tahoe: "d8199dd58cb98598116281a797f447c3dd655419f7e5e7db3e5ad80a3cd9662c" + sha256 arm64_sequoia: "abfc842bb08fd512dd878e2233ea6d0d3682685dd9d5a03a86c6c8d170ca104e" + sha256 arm64_sonoma: "948d36004ea61e34f1b27d04d4b56c5b1e2cf7bc28861c89fa9cd7c3c87cbdb5" + sha256 arm64_ventura: "71ed6d2d1b181f10f9fabac5935ff3956d7b63f670e652465b601c2929a19cc2" + sha256 tahoe: "0e5d8e8b5faddb0c8628fb3511b93af72e402e1bc28cc8cbcc21d185e27d3040" + sha256 sequoia: "bb81887583e785c41b1f6e9812f62f04a304f7d655dad3139d82077f2e61b64d" + sha256 sonoma: "4bc4f8a0d5ed88dbee2565088997164573ca8c2e7f229030b2035ba8905172a2" + sha256 ventura: "a8e566d23516d94e0f573b648122c74c317c7eea8d16acf55645e5347759c363" + sha256 arm64_linux: "f749de410013d9fe866ac0dd634ed6e8d9f462f9979d341f2d9fa727bb1790ee" + sha256 x86_64_linux: "46fdddc6b9297240790546b7f1405a7ea103a7c652c74c05cc1bef6b88f320f1" + end + + uses_from_macos "ncurses" + uses_from_macos "perl" + + on_linux do + depends_on "gettext" + depends_on "libunistring" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-install-warnings", + "--prefix=#{prefix}" + system "make", "install" + doc.install Dir["doc/refcard/txirefcard*"] + end + + def post_install + info_dir = HOMEBREW_PREFIX/"share/info/dir" + info_dir.delete if info_dir.exist? + info_dir.dirname.glob(["*.info", "*.info.gz"]) do |f| + quiet_system("#{bin}/install-info", "--quiet", f, info_dir) + end + end + + test do + (testpath/"test.texinfo").write <<~EOS + @ifnottex + @node Top + @top Hello World! + @end ifnottex + @bye + EOS + + system bin/"makeinfo", "test.texinfo" + assert_match "Hello World!", (testpath/"test.info").read + end +end diff --git a/Formula/t/texlab.rb b/Formula/t/texlab.rb new file mode 100644 index 0000000000000..f63bb1ec62dd7 --- /dev/null +++ b/Formula/t/texlab.rb @@ -0,0 +1,70 @@ +class Texlab < Formula + desc "Implementation of the Language Server Protocol for LaTeX" + homepage "https://github.com/latex-lsp/texlab/" + url "https://github.com/latex-lsp/texlab/archive/refs/tags/v5.24.0.tar.gz" + sha256 "5018eb803875e9c6e03656e88ed6121214dacd24e94ea7b83710197c9ee819c8" + license "GPL-3.0-only" + head "https://github.com/latex-lsp/texlab.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1bae63ec92296b2e02529d96a69287db0d52148d1297d1cbdb7680882a3babdd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9a9287a4293c57b60fd667a3eb12bb43ea54b87ca8f86af6197f1b1c3d4ee5d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c51e28d0519134a6aac372d214806a8a0db78a50439ff1e4ae6f0c6003d52e6b" + sha256 cellar: :any_skip_relocation, sonoma: "c208969d693b993c62c08b2d22aee7ffea1eaf6570ac390a61685321c76f2afd" + sha256 cellar: :any_skip_relocation, arm64_linux: "336de87208b4cb27f943c3399c1baa6ca2d7ff7f38ae6a687a681bda6e025ca7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4faa4f344ba54bb4694188edf6d89ad0762b8b3ccfaf2f26b202705b5dc12df" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/texlab") + end + + def rpc(json) + "Content-Length: #{json.size}\r\n\r\n#{json}" + end + + test do + input = rpc <<~JSON + { + "jsonrpc":"2.0", + "id":1, + "method":"initialize", + "params": { + "rootUri": "file:/dev/null", + "capabilities": {} + } + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "method":"initialized", + "params": {} + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "id": 1, + "method":"shutdown", + "params": null + } + JSON + + input += rpc <<~JSON + { + "jsonrpc":"2.0", + "method":"exit", + "params": {} + } + JSON + + output = /Content-Length: \d+\r\n\r\n/ + + assert_match output, pipe_output(bin/"texlab", input, 0) + end +end diff --git a/Formula/t/texlive.rb b/Formula/t/texlive.rb new file mode 100644 index 0000000000000..d62b143c2094b --- /dev/null +++ b/Formula/t/texlive.rb @@ -0,0 +1,597 @@ +class Texlive < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Free software distribution for the TeX typesetting system" + homepage "https://www.tug.org/texlive/" + url "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz" + mirror "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2025/texlive-20250308-source.tar.xz" + sha256 "fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f" + license :cannot_represent + revision 1 + head "https://github.com/TeX-Live/texlive-source.git", branch: "trunk" + + livecheck do + url "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/" + regex(/href=.*?texlive[._-]v?(\d+(?:\.\d+)*)[._-]source\.t/i) + strategy :page_match do |page, regex| + # Match years from directories + years = page.scan(%r{href=["']?v?(\d+(?:\.\d+)*)/?["' >]}i) + .flatten + .uniq + .map { |v| Version.new(v) } + .sort + next if years.blank? + + # Fetch the page for the newest year directory + newest_year = years.last.to_s + year_page = Homebrew::Livecheck::Strategy.page_content(URI.join(@url, newest_year).to_s) + next if year_page[:content].blank? + + # Match version from source tarball filenames + year_page[:content].scan(regex).flatten + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "bb72cec70fc9b442faec35816b8e5c9006b08534252dca16a299ddc2ea44182f" + sha256 arm64_sequoia: "4189f13ae380fdcd0b7183e2fdcb30a9c3b9e30767a9e94650da62d65e0774d2" + sha256 arm64_sonoma: "075e9b05001a12a666e5b7d955e820e7131c699113a83334f0ee9ebbc22c2b22" + sha256 sonoma: "f071ce2cbc2b8c45aeedfd9cc70f17c56460a9228d400c003201ae30d567a069" + sha256 arm64_linux: "b0ff02eb93542fb35401627b1c800e214c123457c108e11898bb30c3bd260e4f" + sha256 x86_64_linux: "c2332cb42c33291614a46cf51621585791fe6510f254bc008180d924305a07b3" + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "clisp" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gd" + depends_on "ghostscript" + depends_on "gmp" + depends_on "graphite2" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libx11" + depends_on "libxft" + depends_on "lua" + depends_on "luajit" + depends_on "mpfr" + depends_on "openjdk" + depends_on "openssl@3" + depends_on "perl" + depends_on "pixman" + depends_on "potrace" + depends_on "pstoedit" + depends_on "python@3.14" + + uses_from_macos "ncurses" + uses_from_macos "ruby" + uses_from_macos "tcl-tk" + uses_from_macos "zlib" + + on_linux do + depends_on "libice" + depends_on "libnsl" + depends_on "libsm" + depends_on "libxaw" + depends_on "libxext" + depends_on "libxi" + depends_on "libxmu" + depends_on "libxpm" + depends_on "libxt" + depends_on "mesa" + end + + conflicts_with "cweb", because: "both install `cweb` binaries" + conflicts_with "lcdf-typetools", because: "both install a `cfftot1` executable" + conflicts_with "ht", because: "both install `ht` binaries" + conflicts_with "opendetex", because: "both install `detex` binaries" + + resource "texlive-extra" do + url "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-extra.tar.xz" + mirror "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2025/texlive-20250308-extra.tar.xz" + sha256 "ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2" + end + + resource "install-tl" do + url "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/install-tl-unx.tar.gz" + mirror "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2025/install-tl-unx.tar.gz" + sha256 "9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6" + end + + resource "texlive-texmf" do + url "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-texmf.tar.xz" + mirror "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2025/texlive-20250308-texmf.tar.xz" + sha256 "08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf" + end + + resource "Module::Build" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + end + + resource "ExtUtils::Config" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.010.tar.gz" + sha256 "82e7e4e90cbe380e152f5de6e3e403746982d502dd30197a123652e46610c66d" + end + + resource "ExtUtils::Helpers" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.028.tar.gz" + sha256 "c8574875cce073e7dc5345a7b06d502e52044d68894f9160203fcaab379514fe" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.014.tar.gz" + sha256 "ae65d20cc3c7e14b3cd790915c84510f82dfb37a4c9b88aa74b2e843af417d01" + end + + resource "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.051.tar.gz" + sha256 "74fdce35e8cd4d787bc2d4fc1d43a291b7bbced4e94dc5fc592bd81ca93a98e9" + end + + resource "Digest::SHA1" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Digest-SHA1-2.13.tar.gz" + sha256 "68c1dac2187421f0eb7abf71452a06f190181b8fc4b28ededf5b90296fb943cc" + end + + resource "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.32.tar.gz" + sha256 "ef2d6cab0bad18e3ab1c4e6125cc5f695c7e459899f512451c8fa3ef83fa7fc0" + end + + resource "Path::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.146.tar.gz" + sha256 "861ef09bca68254e9ab24337bb6ec9d58593a792e9d68a27ee6bec2150f06741" + end + + resource "File::Copy::Recursive" do + url "https://cpan.metacpan.org/authors/id/D/DM/DMUEY/File-Copy-Recursive-0.45.tar.gz" + sha256 "d3971cf78a8345e38042b208bb7b39cb695080386af629f4a04ffd6549df1157" + end + + resource "File::Which" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz" + sha256 "3201f1a60e3f16484082e6045c896842261fc345de9fb2e620fd2a2c7af3a93a" + end + + resource "IPC::System::Simple" do + url "https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-1.30.tar.gz" + sha256 "22e6f5222b505ee513058fdca35ab7a1eab80539b98e5ca4a923a70a8ae9ba9e" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.31.tar.gz" + sha256 "b9c4d58b2614b8611ae03a95a6d60ed996f4b311ef3cd5a937b92f1825ecc564" + end + + resource "TimeDate" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz" + sha256 "c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2" + end + + resource "Crypt::RC4" do + url "https://cpan.metacpan.org/authors/id/S/SI/SIFUKURT/Crypt-RC4-2.02.tar.gz" + sha256 "5ec4425c6bc22207889630be7350d99686e62a44c6136960110203cd594ae0ea" + end + + resource "Digest::Perl::MD5" do + url "https://cpan.metacpan.org/authors/id/D/DE/DELTA/Digest-Perl-MD5-1.9.tar.gz" + sha256 "7100cba1710f45fb0e907d8b1a7bd8caef35c64acd31d7f225aff5affeecd9b1" + end + + resource "IO::Scalar" do + url "https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/IO-Stringy-2.113.tar.gz" + sha256 "51220fcaf9f66a639b69d251d7b0757bf4202f4f9debd45bdd341a6aca62fe4e" + end + + resource "OLE::Storage_Lite" do + url "https://cpan.metacpan.org/authors/id/J/JM/JMCNAMARA/OLE-Storage_Lite-0.22.tar.gz" + sha256 "d0566d6c29d397ea736379dc515c36849f6b97107cf700ba8250505c984cf965" + end + + resource "Spreadsheet::ParseExcel" do + url "https://cpan.metacpan.org/authors/id/J/JM/JMCNAMARA/Spreadsheet-ParseExcel-0.66.tar.gz" + sha256 "bfd76acfba988601dc051bda73b4bb25f6839a006dd960b6a7401c249245f65b" + end + + resource "Encode::Locale" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz" + sha256 "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1" + end + + resource "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.06.tar.gz" + sha256 "7b685191c6acc3e773d1fc02c95ee1f9fae94f77783175f5e78c181cc92d2b52" + end + + resource "LWP::MediaTypes" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz" + sha256 "8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9" + end + + resource "IO::HTML" do + url "https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-1.004.tar.gz" + sha256 "c87b2df59463bbf2c39596773dfb5c03bde0f7e1051af339f963f58c1cbd8bf5" + end + + resource "HTTP::Request::Common" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-7.00.tar.gz" + sha256 "5afa95eb6ed1c632e81656201a2738e2c1bc6cbfae2f6d82728e2bb0b519c1dc" + end + + resource "HTML::Tagset" do + url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz" + sha256 "eb89e145a608ed1f8f141a57472ee5f69e67592a432dcd2e8b1dbb445f2b230b" + end + + resource "HTML::Parser" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.83.tar.gz" + sha256 "7278ce9791256132b26a71a5719451844704bb9674b58302c3486df43584f8c0" + end + + resource "HTML::TreeBuilder" do + url "https://cpan.metacpan.org/authors/id/K/KE/KENTNL/HTML-Tree-5.07.tar.gz" + sha256 "f0374db84731c204b86c1d5b90975fef0d30a86bd9def919343e554e31a9dbbf" + end + + resource "File::Slurper" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/File-Slurper-0.014.tar.gz" + sha256 "d5a36487339888c3cd758e648160ee1d70eb4153cacbaff57846dbcefb344b0c" + end + + resource "Font::AFM" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Font-AFM-1.20.tar.gz" + sha256 "32671166da32596a0f6baacd0c1233825a60acaf25805d79c81a3f18d6088bc1" + end + + resource "HTML::FormatText" do + url "https://cpan.metacpan.org/authors/id/N/NI/NIGELM/HTML-Formatter-2.16.tar.gz" + sha256 "cb0a0dd8aa5e8ba9ca214ce451bf4df33aa09c13e907e8d3082ddafeb30151cc" + end + + resource "File::Listing" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.16.tar.gz" + sha256 "189b3a13fc0a1ba412b9d9ec5901e9e5e444cc746b9f0156d4399370d33655c6" + end + + resource "HTTP::Cookies" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz" + sha256 "8c9a541a4a39f6c0c7e3d0b700b05dfdb830bd490a1b1942a7dedd1b50d9a8c8" + end + + resource "HTTP::Daemon" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-6.16.tar.gz" + sha256 "b38d092725e6fa4e0c4dc2a47e157070491bafa0dbe16c78a358e806aa7e173d" + end + + resource "HTTP::Negotiate" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz" + sha256 "1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016" + end + + resource "Net::HTTP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.23.tar.gz" + sha256 "0d65c09dd6c8589b2ae1118174d3c1a61703b6ecfc14a3442a8c74af65e0c94e" + end + + resource "WWW::RobotRules" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz" + sha256 "46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e" + end + + resource "LWP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.78.tar.gz" + sha256 "b738bdcf54e2c6bb81fd2b83ec47bc83347f97b371ea80f0dc10360f817a9a44" + end + + resource "CGI" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEEJO/CGI-4.67.tar.gz" + sha256 "f4a6896eb94a3ecaa1c1ba02f7e0d2bed0be4c5ad3378d80196ec25662ac4111" + end + + resource "HTML::Form" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Form-6.12.tar.gz" + sha256 "2ced87d0878afa007d22c41927f0e8da63844608f20881f645f364dc32cdce6f" + end + + resource "HTTP::Server::Simple" do + url "https://cpan.metacpan.org/authors/id/B/BP/BPS/HTTP-Server-Simple-0.52.tar.gz" + sha256 "d8939fa4f12bd6b8c043537fd0bf96b055ac3686b9cdd9fa773dca6ae679cb4c" + end + + resource "WWW::Mechanize" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/WWW-Mechanize-2.19.tar.gz" + sha256 "7b02e808018ff22a8798e51b5f329d8fac333fbfa8fb63808910091dade8b61f" + end + + resource "Mozilla::CA" do + url "https://cpan.metacpan.org/authors/id/L/LW/LWP/Mozilla-CA-20250202.tar.gz" + sha256 "32d43ce8cb3b201813898f0c4c593a08df350c1e47484e043fc8adebbda60dbf" + end + + resource "Net::SSLeay" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz" + sha256 "9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d" + end + + resource "IO::Socket::SSL" do + url "https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.089.tar.gz" + sha256 "f683112c1642967e9149f51ad553eccd017833b2f22eb23a9055609d2e3a14d1" + end + + resource "LWP::Protocol::https" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-Protocol-https-6.14.tar.gz" + sha256 "59cdeabf26950d4f1bef70f096b0d77c5b1c5a7b5ad1b66d71b681ba279cbb2a" + end + + resource "Tk" do + url "https://cpan.metacpan.org/authors/id/S/SR/SREZIC/Tk-804.036.tar.gz" + sha256 "32aa7271a6bdfedc3330119b3825daddd0aa4b5c936f84ad74eabb932a200a5e" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + def install + python3 = "python3.14" + venv = virtualenv_create(libexec, python3) + venv.pip_install resource("pygments") + + # Install Perl resources + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV["PERL_MM_USE_DEFAULT"] = "1" + ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix + + tex_resources = %w[texlive-extra install-tl texlive-texmf] + + resources.each do |r| + next if tex_resources.include? r.name + next if r.name == "pygments" + + r.stage do + if File.exist? "Makefile.PL" + args = ["INSTALL_BASE=#{libexec}"] + args += ["X11INC=#{HOMEBREW_PREFIX}/include", "X11LIB=#{HOMEBREW_PREFIX}/lib"] if r.name == "Tk" + + system "perl", "Makefile.PL", *args + system "make" + system "make", "install" + else + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + end + end + end + + # Install TeXLive resources + resource("texlive-extra").stage do + share.install "tlpkg" + end + + resource("install-tl").stage do + cd "tlpkg" do + (share/"tlpkg").install "installer" + (share/"tlpkg").install "tltcl" + end + end + + resource("texlive-texmf").stage do + share.install "texmf-dist" + end + + # Clean unused files + rm_r(share/"texmf-dist/doc") + rm_r(share/"tlpkg/installer/wget") + rm_r(share/"tlpkg/installer/xz") + + # Set up config files to use the correct path for the TeXLive root + inreplace buildpath/"texk/kpathsea/texmf.cnf", + "TEXMFROOT = $SELFAUTOPARENT", "TEXMFROOT = $SELFAUTODIR/share" + inreplace share/"texmf-dist/web2c/texmfcnf.lua", + "selfautoparent:texmf", "selfautodir:share/texmf" + + # icu4c 75+ needs C++17 + # TODO: Remove in 2025 release + ENV.append "CXXFLAGS", "-std=gnu++17" + + # Work around build failure on Intel Sonoma after updating to Xcode 16 + # sh: line 1: 27478 Segmentation fault: 11 luajittex -ini -jobname=luajittex -progname=luajittex luatex.ini ... + ENV.O1 if DevelopmentTools.clang_build_version == 1600 && Hardware::CPU.intel? + + args = [ + "--disable-dvisvgm", # needs its own formula + "--disable-missing", + "--disable-native-texlive-build", # needed when doing a distro build + "--disable-static", + "--disable-ps2eps", # provided by ps2eps formula + "--disable-psutils", # provided by psutils formula + "--disable-t1utils", # provided by t1utils formula + "--enable-build-in-source-tree", + "--enable-shared", + "--enable-compiler-warnings=yes", + "--with-system-clisp-runtime=system", + "--with-system-cairo", + "--with-system-freetype2", + "--with-system-gd", + "--with-system-gmp", + "--with-system-graphite2", + "--with-system-harfbuzz", + "--with-system-icu", + "--with-system-libpng", + "--with-system-mpfr", + "--with-system-ncurses", + "--with-system-pixman", + "--with-system-potrace", + "--with-system-zlib", + ] + args << "--with-banner-add=/#{tap.user}" if tap + + args << if OS.mac? + "--without-x" + else + # Make sure xdvi uses xaw, even if motif is available + "--with-xdvi-x-toolkit=xaw" + end + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + system "make", "texlinks" + + # Create tlmgr config file. This file limits the actions that the user + # can perform in 'system' mode, which would write to the cellar. 'tlmgr' should + # be used with --usermode whenever possible. + actions = %w[ + candidates + check + dump-tlpdb + help + info + init-usertree + list + print-platform + print-platform-info + search + show + version + ] + (share/"texmf-config/tlmgr/config").write "allowed-actions=#{actions.join(",")}\n" + + # Delete some Perl scripts that are provided by existing formulae as newer versions. + rm bin/"latexindent" # provided by latexindent formula + rm bin/"latexdiff" # provided by latexdiff formula + rm bin/"latexdiff-vc" # provided by latexdiff formula + rm bin/"latexrevise" # provided by latexdiff formula + + # Wrap some Perl scripts in an env script so that they can find dependencies + env_script_files = %w[ + crossrefware/bbl2bib.pl + crossrefware/bibdoiadd.pl + crossrefware/bibmradd.pl + crossrefware/biburl2doi.pl + crossrefware/bibzbladd.pl + crossrefware/ltx2crossrefxml.pl + ctan-o-mat/ctan-o-mat.pl + ctanify/ctanify + ctanupload/ctanupload.pl + exceltex/exceltex + latex-git-log/latex-git-log + pax/pdfannotextractor.pl + ptex-fontmaps/kanji-fontmap-creator.pl + purifyeps/purifyeps + svn-multi/svn-multi.pl + texdoctk/texdoctk.pl + ulqda/ulqda.pl + ] + + env_script_files.each do |perl_script| + bin_name = File.basename(perl_script, ".pl") + rm bin/bin_name + (bin/bin_name).write_env_script(share/"texmf-dist/scripts"/perl_script, PERL5LIB: ENV["PERL5LIB"]) + end + + # Wrap some Python scripts so they can find dependencies and fix depythontex. + ENV.prepend_path "PYTHONPATH", venv.site_packages + rm bin/"pygmentex" + rm bin/"pythontex" + rm bin/"depythontex" + (bin/"pygmentex").write_env_script(share/"texmf-dist/scripts/pygmentex/pygmentex.py", + PYTHONPATH: ENV["PYTHONPATH"]) + (bin/"pythontex").write_env_script(share/"texmf-dist/scripts/pythontex/pythontex3.py", + PYTHONPATH: ENV["PYTHONPATH"]) + ln_sf share/"texmf-dist/scripts/pythontex/depythontex3.py", bin/"depythontex" + + # Rewrite shebangs in some Python scripts so they use brewed Python. + python_shebang_rewrites = %w[ + dviasm/dviasm.py + latex-make/figdepth.py + latex-make/gensubfig.py + latex-make/latexfilter.py + latex-make/svg2dev.py + latex-make/svgdepth.py + latex-papersize/latex-papersize.py + lilyglyphs/lilyglyphs_common.py + lilyglyphs/lily-glyph-commands.py + lilyglyphs/lily-image-commands.py + lilyglyphs/lily-rebuild-pdfs.py + pdfbook2/pdfbook2 + pygmentex/pygmentex.py + pythontex/depythontex3.py + pythontex/pythontex3.py + pythontex/pythontex_install.py + spix/spix.py + texliveonfly/texliveonfly.py + webquiz/webquiz + webquiz/webquiz.py + webquiz/webquiz_makequiz.py + webquiz/webquiz_util.py + ] + + python_shebang_rewrites.each do |python_script| + rewrite_shebang detected_python_shebang, share/"texmf-dist/scripts"/python_script + end + + # Delete ebong because it requires Python 2 + rm bin/"ebong" + + # Initialize texlive environment + ENV.prepend_path "PATH", bin + system "fmtutil-sys", "--all" + with_env(LUATEXDIR: share/"texmf-dist/scripts/context/lua") do + system "luatex", "--luaonly", "mtxrun.lua", "--generate" + end + system "mktexlsr" + end + + test do + assert_match "Usage", shell_output("#{bin}/tex --help") + assert_match "revision", shell_output("#{bin}/tlmgr --version") + assert_match "AMS mathematical facilities for LaTeX", shell_output("#{bin}/tlmgr info amsmath") + + (testpath/"test.latex").write <<~'LATEX' + \documentclass[12pt]{article} + \usepackage[utf8]{inputenc} + \usepackage{amsmath} + \usepackage{lipsum} + + \title{\LaTeX\ test} + \author{\TeX\ Team} + \date{September 2021} + + \begin{document} + + \maketitle + + \section*{An equation with amsmath} + \begin{equation} \label{eu_eqn} + e^{\pi i} + 1 = 0 + \end{equation} + The beautiful equation \ref{eu_eqn} is known as Euler's identity. + + \section*{Lorem Ipsum} + \lipsum[3] + + \lipsum[5] + + \end{document} + LATEX + + assert_match "Output written on test.dvi", shell_output("#{bin}/latex #{testpath}/test.latex") + assert_path_exists testpath/"test.dvi" + assert_match "Output written on test.pdf", shell_output("#{bin}/pdflatex #{testpath}/test.latex") + assert_path_exists testpath/"test.pdf" + assert_match "This is dvips", shell_output("#{bin}/dvips #{testpath}/test.dvi 2>&1") + assert_path_exists testpath/"test.ps" + end +end diff --git a/Formula/t/texmath.rb b/Formula/t/texmath.rb new file mode 100644 index 0000000000000..bc01462bce42c --- /dev/null +++ b/Formula/t/texmath.rb @@ -0,0 +1,32 @@ +class Texmath < Formula + desc "Haskell library for converting LaTeX math to MathML" + homepage "https://johnmacfarlane.net/texmath.html" + url "https://hackage.haskell.org/package/texmath-0.13.0.1/texmath-0.13.0.1.tar.gz" + sha256 "a31b24bac9f4e33e72af77608f89aa4f70e5ed356576e9b91e95d2f0078a08d4" + license "GPL-2.0-or-later" + head "https://github.com/jgm/texmath.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d9f08c196f74d7b4882440dd942b6d529e88d3438b0ec127f30a4834ed1de8c6" + sha256 cellar: :any, arm64_sequoia: "2a93a8c95e6e1bbfa40f5f03c1f41324da5a18d79ec97f815c0d6b442987177e" + sha256 cellar: :any, arm64_sonoma: "5c20352d200aff898e62798346847559cc002a1e1e689d0c17b2fa0ddb999fc3" + sha256 cellar: :any, sonoma: "13892f62af010342ccd32805887c81f4817ba02e339a6ac99c7da8fea3c3bc87" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b3da00d11f7d5aadfa19ef90b424def2af6c661c63283fcec7fc391bfe63569" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e1c70a62fc647f295595b78da71fa0f3d8a24d12d441dad4c512322728a39ab" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", "--flags=executable", *std_cabal_v2_args + end + + test do + assert_match "2", pipe_output(bin/"texmath", "a^2 + b^2 = c^2", 0) + end +end diff --git a/Formula/t/text-embeddings-inference.rb b/Formula/t/text-embeddings-inference.rb new file mode 100644 index 0000000000000..c32553752382f --- /dev/null +++ b/Formula/t/text-embeddings-inference.rb @@ -0,0 +1,37 @@ +class TextEmbeddingsInference < Formula + desc "Blazing fast inference solution for text embeddings models" + homepage "https://huggingface.co/docs/text-embeddings-inference/quick_tour" + url "https://github.com/huggingface/text-embeddings-inference/archive/refs/tags/v1.8.3.tar.gz" + sha256 "778fcfbc98d12dd8d3a47b3a670a3a9fcb245385721f5095f36e31515d44bf7d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "832f809af4b7b37398bca2edc0545e3aab38149bb22a676a027f92d2c2759f60" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd59feeb6cb0b596f93faaae2b64e9454accb2132d0092f195020c1084619f92" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "504bab41dca62d5f855646504a8bbc21b7439d7158abff4040b23c9889b1c2b1" + sha256 cellar: :any_skip_relocation, sonoma: "997936782ae78f1bd10abc7ae3fd2ddfdccaf8f135be3a533c659bd1ad69392e" + sha256 cellar: :any_skip_relocation, arm64_linux: "229d24b337d84a46750fc79d42aa9d5429521310a37a671b1874fa813f792c61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f9636dff12382578075cc7b31d2ca5c153bcf9e095e63ff93c02d98dba0e731" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + def install + args = (OS.mac? && Hardware::CPU.arm?) ? ["-F", "metal"] : [] + system "cargo", "install", *std_cargo_args(path: "router"), "-F", "candle", *args + end + + test do + port = free_port + spawn bin/"text-embeddings-router", "-p", port.to_s, "--model-id", "sentence-transformers/all-MiniLM-L6-v2" + + sleep 2 if OS.mac? && Hardware::CPU.intel? + + data = "{\"inputs\":\"What is Deep Learning?\"}" + header = "Content-Type: application/json" + retries = "--retry 5 --retry-connrefused" + assert_match "[[", shell_output("curl 127.0.0.1:#{port}/embed -X POST -d '#{data}' -H '#{header}' #{retries}") + end +end diff --git a/Formula/t/textidote.rb b/Formula/t/textidote.rb new file mode 100644 index 0000000000000..e82b1fce60d72 --- /dev/null +++ b/Formula/t/textidote.rb @@ -0,0 +1,70 @@ +class Textidote < Formula + desc "Spelling, grammar and style checking on LaTeX documents" + homepage "https://sylvainhalle.github.io/textidote" + url "https://github.com/sylvainhalle/textidote/archive/refs/tags/v0.8.3.tar.gz" + sha256 "8c55d6f6f35d51fb5b84e7dcc86a4041e06b3f92d6a919023dc332ba2effd584" + license "GPL-3.0-or-later" + head "https://github.com/sylvainhalle/textidote.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3341188f4b8fb7912f78dcb53dda8f624dcc8693f96a51c1ccaa49422746b84a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3bc15a1fbb32e89fa3aa4f01a348336f1032974eca44c74789719e8e3ee9f391" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c7874766d3f1f514f1b32435f160c92a0622a19ca8d2b0f7a8f653bfec05445" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4bf516adb25ff61f3453f6825819e6353e2045619e46c7168ee250a782dc538d" + sha256 cellar: :any_skip_relocation, sonoma: "39c5742e46605837bfb719356ba9aeb9811afa145ef5bdaabe0982704a270a30" + sha256 cellar: :any_skip_relocation, ventura: "e50f6561b290ac98eec57706a01c5a6e644a66b5d12e2c289d81c785d05f6ce4" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bf9049a7149770b7e587a8a0fd0437750306a7ab810b7f6d878aeca523a54e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73b3a785959a0992e981b78f47a4c39932c59f158a3d4c3281fb5ccc5926abc5" + end + + depends_on "ant" => :build + depends_on "openjdk" + + def install + # Build the JAR + system "ant", "download-deps" + system "ant", "-Dbuild.targetjdk=#{Formula["openjdk"].version.major}" + + # Install the JAR + a wrapper script + libexec.install "textidote.jar" + # Fix run with `openjdk` 24. + # Reported upstream at https://github.com/sylvainhalle/textidote/issues/265. + bin.write_jar_script libexec/"textidote.jar", "textidote", "-Djdk.xml.totalEntitySizeLimit=50000000" + + bash_completion.install "Completions/textidote.bash" => "textidote" + zsh_completion.install "Completions/textidote.zsh" => "_textidote" + end + + test do + output = shell_output("#{bin}/textidote --version") + assert_match "TeXtidote", output + + (testpath/"test1.tex").write <<~'TEX' + \documentclass{article} + \begin{document} + This should fails. + \end{document} + TEX + + output = shell_output("#{bin}/textidote --check en #{testpath}/test1.tex", 1) + assert_match "The modal verb 'should' requires the verb's base form..", output + + (testpath/"test2.tex").write <<~'TEX' + \documentclass{article} + \begin{document} + This should work. + \end{document} + TEX + + output = shell_output("#{bin}/textidote --check en #{testpath}/test2.tex") + assert_match "Everything is OK!", output + end +end diff --git a/Formula/t/textract.rb b/Formula/t/textract.rb new file mode 100644 index 0000000000000..3f487cf077d64 --- /dev/null +++ b/Formula/t/textract.rb @@ -0,0 +1,164 @@ +class Textract < Formula + include Language::Python::Virtualenv + + desc "Extract text from various different types of files" + homepage "https://textract.readthedocs.io/" + url "https://files.pythonhosted.org/packages/81/9f/dd29fcec368f007d44e51f0273489d5172a6d32ed9c796df5054fbb31c9f/textract-1.6.5.tar.gz" + sha256 "68f0f09056885821e6c43d8538987518daa94057c306679f2857cc5ee66ad850" + license "MIT" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d99fe84d6451dad89f286e0fd1b66279c5f33da07e712f51f6ab3cc51d7e719" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28dc3b359e04b6aef1709e193f9d9f9ae624e036ceaf0b346f398286b9e6d8af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ba581b23948e522b8b98ef0fd8347ae001157a6e2bfe179c53abc7f4a58c88f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7e6d5d68ae37d5b7ddc85e6a4c0120e4275e16d834deb34c19bf9ed247c1e846" + sha256 cellar: :any_skip_relocation, sonoma: "865a9a3abd5252a93757e6654d408a55c53177d4423c59fc8cf71c237341724b" + sha256 cellar: :any_skip_relocation, ventura: "320a824421208cab9ea2a6f1b01b66ca19681ed8994f3b79e7d255782be7958f" + sha256 cellar: :any_skip_relocation, monterey: "52d8d47213610e4a4b5f7e946ed9c8996b5b8690abe87fbdca439ff459ed7f0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "03ed2aa65dca0b01d777ddee042f8d7489ac0f35626f02e86b8c0449b8d81b6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c586d18c8d63831319b36c7e0904037b363f6fa74ce0c71f15237e9f98fa7a54" + end + + # https://github.com/deanmalmgren/textract/issues/498 + deprecate! date: "2024-06-18", because: :unmaintained + disable! date: "2025-06-21", because: :unmaintained + + depends_on "antiword" + depends_on "flac" + depends_on "pillow" + depends_on "poppler" + depends_on "python@3.12" + depends_on "swig" + depends_on "tesseract" + depends_on "unrtf" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/ae/28/07d2cfe0838f998ea2eafab59f52b0ceb1e70adb1831fa14b958a9fa6c5c/argcomplete-1.10.3.tar.gz" + sha256 "a37f522cf3b6a34abddfedb61c4546f60023b3799b22d1cd971eacdc0861530a" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/e8/b0/cd2b968000577ec5ce6c741a54d846dfa402372369b8b6861720aa9ecea7/beautifulsoup4-4.11.1.tar.gz" + sha256 "ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" + sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" + end + + resource "compressed-rtf" do + url "https://files.pythonhosted.org/packages/8e/ac/abb196bb0b42a239d605fe97c314c3312374749013a07da4e6e0408f223c/compressed_rtf-1.0.6.tar.gz" + sha256 "c1c827f1d124d24608981a56e8b8691eb1f2a69a78ccad6440e7d92fde1781dd" + end + + resource "docx2txt" do + url "https://files.pythonhosted.org/packages/7d/7d/60ee3f2b16d9bfdfa72e8599470a2c1a5b759cb113c6fe1006be28359327/docx2txt-0.8.tar.gz" + sha256 "2c06d98d7cfe2d3947e5760a57d924e3ff07745b379c8737723922e7009236e5" + end + + resource "ebcdic" do + url "https://github.com/roskakori/CodecMapper/archive/refs/tags/v1.1.1.tar.gz" + sha256 "7a1a77fdc7e87924e42826087bd9c0c4b48b779156c10cabc94eec237739c818" + end + + resource "extract-msg" do + url "https://files.pythonhosted.org/packages/67/fb/ed86f4fa53e58e90598f635bba9b4140a20992bd968aaaf8ae1fbacd6e57/extract_msg-0.28.7.tar.gz" + sha256 "7ebdbd7863a3699080a69f71ec0cd30ed9bfee70bad9acc6a8e6abe9523c78c0" + end + + resource "imapclient" do + url "https://files.pythonhosted.org/packages/ea/31/883f78210ed7578f6dd41e4dbc3ad5e7c6127a51e56513b8b7bb7efdf9b3/IMAPClient-2.1.0.zip" + sha256 "60ba79758cc9f13ec910d7a3df9acaaf2bb6c458720d9a02ec33a41352fd1b99" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/2b/b4/bbccb250adbee490553b6a52712c46c20ea1ba533a643f1424b27ffc6845/lxml-5.1.0.tar.gz" + sha256 "3eea6ed6e6c918e468e693c41ef07f3c3acc310b70ddd9cc72d9ef84bc9564ca" + end + + resource "olefile" do + url "https://files.pythonhosted.org/packages/69/1b/077b508e3e500e1629d366249c3ccb32f95e50258b231705c09e3c7a4366/olefile-0.47.zip" + sha256 "599383381a0bf3dfbd932ca0ca6515acd174ed48870cbf7fee123d698c192c1c" + end + + resource "pdfminer-six" do + url "https://files.pythonhosted.org/packages/e8/31/7acc148333749d6a8ef7cbf25902bdf59a462811a69d040a9a259916b6bd/pdfminer.six-20191110.tar.gz" + sha256 "141a53ec491bee6d45bf9b2c7f82601426fb5d32636bcf6b9c8a8f3b6431fea6" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/b9/ed/19223a0a0186b8a91ebbdd2852865839237a21c74f1fbc4b8d5b62965239/pycryptodome-3.20.0.tar.gz" + sha256 "09609209ed7de61c2b560cc5c8c4fbf892f8b15b1faf7e4cbffac97db1fffda7" + end + + resource "python-pptx" do + url "https://files.pythonhosted.org/packages/20/e7/aeaf794b2d440da609684494075e64cfada248026ecb265807d0668cdd00/python-pptx-0.6.23.tar.gz" + sha256 "587497ff28e779ab18dbb074f6d4052893c85dedc95ed75df319364f331fedee" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/ce/21/952a240de1c196c7e3fbcd4e559681f0419b1280c617db21157a0390717b/soupsieve-2.5.tar.gz" + sha256 "5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690" + end + + resource "SpeechRecognition" do + # not available on PyPI; see https://github.com/Uberi/speech_recognition/issues/580 + url "https://github.com/Uberi/speech_recognition/archive/refs/tags/3.8.1.tar.gz" + sha256 "82d3313db383409ddaf3e42625fb0c3518231a1feb5e2ed5473b10b3d5ece7bd" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/04/d3/c19d65ae67636fe63953b20c2e4a8ced4497ea232c43ff8d01db16de8dc0/tzlocal-5.2.tar.gz" + sha256 "8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e" + end + + resource "xlrd" do + url "https://files.pythonhosted.org/packages/aa/05/ec9d4fcbbb74bbf4da9f622b3b61aec541e4eccf31d3c60c5422ec027ce2/xlrd-1.2.0.tar.gz" + sha256 "546eb36cee8db40c3eaa46c351e67ffee6eeb5fa2650b71bc4c758a29a1b29b2" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/2b/a3/dd02e3559b2c785d2357c3752cc191d750a280ff3cb02fa7c2a8f87523c3/XlsxWriter-3.1.9.tar.gz" + sha256 "de810bf328c6a4550f4ffd6b0b34972aeb7ffcf40f3d285a0413734f9b63a929" + end + + # Drop distutils for 3.12: https://github.com/deanmalmgren/textract/pull/502 + patch do + url "https://github.com/deanmalmgren/textract/commit/78f9e644dd502bb721867ce3560d2d0a8b41d648.patch?full_index=1" + sha256 "1865a006e8f7a86f18ed488ee004a1f529743bc5048ea650c12091db2e6827db" + end + + def install + ENV["PIP_USE_PEP517"] = "1" + venv = virtualenv_create(libexec, "python3.12") + venv.pip_install resources.reject { |r| r.name == "ebcdic" } + resource("ebcdic").stage { venv.pip_install "ebcdic" } + # delete SpeechRecognition's flac binaries that our `flac` formula provides + rm libexec.glob("lib/python*.*/site-packages/speech_recognition/flac*") + + # https://github.com/deanmalmgren/textract/issues/476 + inreplace "requirements/python", "extract-msg<=0.29.*", "extract-msg<0.30" + venv.pip_install_and_link buildpath + end + + test do + cp test_fixtures("test.pdf"), "test.pdf" + pdf_output = shell_output("#{bin}/textract test.pdf") + assert_includes pdf_output, "Homebrew test." + end +end diff --git a/Formula/t/texttest.rb b/Formula/t/texttest.rb new file mode 100644 index 0000000000000..3c24e32afc831 --- /dev/null +++ b/Formula/t/texttest.rb @@ -0,0 +1,57 @@ +class Texttest < Formula + include Language::Python::Virtualenv + + desc "Tool for text-based Approval Testing" + homepage "https://www.texttest.org/" + url "https://files.pythonhosted.org/packages/50/d2/5ac2d5f53a6b4b72d8485796b9abfa29a8bedd0c4ca08341a382425a49f8/texttest-4.4.5.tar.gz" + sha256 "99243585979f016c2c89a38a3a3c61e942e13574fb19dd2c933261a3255daaba" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "66def708bd3edca475d00878e7a295156918753563a63e7bf8a6abbece577ab4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "707f18abde6bd5a5b501d23152c9f55ba7cdaede653995d7a6365104ed6b18b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3cd8caf904a5695bd3e7d80008f2640a8df183a3849a82d9448ea6b153646033" + sha256 cellar: :any_skip_relocation, sonoma: "9c54892ff2a2092027639b777ee00852067dc36ed4c11f2c467426e94bbe5b6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "56731920709d9d0a9f293793fb0cefab826cee9bcedff9e45e012178dc0970f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37a505872aa2656f941827bdc33e9c9b0a1b8edcee4c34033b11f42c79b2b178" + end + + depends_on "adwaita-icon-theme" + depends_on "gtk+3" + depends_on "pygobject3" + depends_on "python@3.14" + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"testsuite.test").write <<~EOS + Test1 + EOS + + (testpath/"config.test").write <<~EOS + executable:/bin/echo + filename_convention_scheme:standard + EOS + + (testpath/"Test1/options.test").write <<~EOS + Success! + EOS + + (testpath/"Test1/stdout.test").write <<~EOS + Success! + EOS + + File.write(testpath/"Test1/stderr.test", "") + + output = shell_output("#{bin}/texttest -d #{testpath} -b -a test") + assert_match "S: TEST test-case Test1 succeeded", output + end +end diff --git a/Formula/t/tf-profile.rb b/Formula/t/tf-profile.rb new file mode 100644 index 0000000000000..29654a8b800d8 --- /dev/null +++ b/Formula/t/tf-profile.rb @@ -0,0 +1,40 @@ +class TfProfile < Formula + desc "CLI tool to profile Terraform runs" + homepage "https://github.com/datarootsio/tf-profile" + url "https://github.com/datarootsio/tf-profile/archive/refs/tags/v0.5.0.tar.gz" + sha256 "cfc5b9c68188f3cac1318b24d0b53ba4cae8af325ae5332865e1f0c92905b20b" + license "MIT" + head "https://github.com/datarootsio/tf-profile.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "634e5dd145e202275e5d16c3f2653b6e0827e3f96d1f7abbcb40b3aea6380e53" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3d27c04d0f690020ab293d51b7c1bcba6cec6570b0c5e9505c55710a001746a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3d27c04d0f690020ab293d51b7c1bcba6cec6570b0c5e9505c55710a001746a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f3d27c04d0f690020ab293d51b7c1bcba6cec6570b0c5e9505c55710a001746a" + sha256 cellar: :any_skip_relocation, sonoma: "55fc5b3eff827ab558666e9c4b398da3b813185347583fc9b7f86fc9a8fc8f63" + sha256 cellar: :any_skip_relocation, ventura: "55fc5b3eff827ab558666e9c4b398da3b813185347583fc9b7f86fc9a8fc8f63" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fc725da2027e30719d536c6d3eb6c774512abc7264e35dafa00e7a79e34c274" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6fa07426feb28fb5add75bf78c5c11884f62ba74783161b861d70783149eccab" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", tags: "netgo") + pkgshare.install "test" + + generate_completions_from_executable(bin/"tf-profile", "completion") + end + + test do + test_file = pkgshare/"test/argo.log" + output = shell_output("#{bin}/tf-profile stats #{test_file}") + assert_match "Number of resources in configuration 100", output + assert_match "Resources not in desired state 2 out of 76 (2.6%)", output + + output = shell_output("#{bin}/tf-profile table #{test_file}") + assert_match "tot_time modify_started modify_ended", output + + assert_match version.to_s, shell_output("#{bin}/tf-profile version") + end +end diff --git a/Formula/t/tf-summarize.rb b/Formula/t/tf-summarize.rb new file mode 100644 index 0000000000000..7470695779aba --- /dev/null +++ b/Formula/t/tf-summarize.rb @@ -0,0 +1,38 @@ +class TfSummarize < Formula + desc "CLI to print the summary of the terraform plan" + homepage "https://github.com/dineshba/tf-summarize" + url "https://github.com/dineshba/tf-summarize/archive/refs/tags/v0.3.14.tar.gz" + sha256 "c4ea4825aef3bb393917aaa97beec66a07e58890229bd4832f719b1dad4f449e" + license "MIT" + head "https://github.com/dineshba/tf-summarize.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b4f564bd9474540f43c55132f62fe1c77030303ff0c96c2f89f95d5ba1165ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49d532560bc3caf6e781226c2f9559532f8f73bf1132664b36b97883f2573ad5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49d532560bc3caf6e781226c2f9559532f8f73bf1132664b36b97883f2573ad5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49d532560bc3caf6e781226c2f9559532f8f73bf1132664b36b97883f2573ad5" + sha256 cellar: :any_skip_relocation, sonoma: "b6850383b616f89461bf37cd0389bd0fc9bf2d79f41cd490e3e19166b1c09171" + sha256 cellar: :any_skip_relocation, ventura: "b6850383b616f89461bf37cd0389bd0fc9bf2d79f41cd490e3e19166b1c09171" + sha256 cellar: :any_skip_relocation, arm64_linux: "50127b7d075bc6873c2802e2882c1e4c4b87802f7e9faa464e188c97d4ad2361" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7984edfb50bba79f2729f8d566314c0cdf95f3d648d63472738210773f6c0c89" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + resource "tfplan.json" do + url "https://raw.githubusercontent.com/dineshba/tf-summarize/c447ded989b8e84b52d993e0b0e30139b5fb5818/example/tfplan.json" + sha256 "ceca61c72c77b4400d4170e58abc0cafd3ad1d42d622fe8a5b06cdfba3273131" + end + + assert_match version.to_s, shell_output("#{bin}/tf-summarize -v") + + testpath.install resource("tfplan.json") + output = shell_output("#{bin}/tf-summarize -json-sum #{testpath}/tfplan.json") + assert_match "7", JSON.parse(output)["changes"]["add"].to_s + end +end diff --git a/Formula/t/tfautomv.rb b/Formula/t/tfautomv.rb new file mode 100644 index 0000000000000..aab1c1b2e3ac0 --- /dev/null +++ b/Formula/t/tfautomv.rb @@ -0,0 +1,34 @@ +class Tfautomv < Formula + desc "Generate Terraform moved blocks automatically for painless refactoring" + homepage "https://tfautomv.dev/" + url "https://github.com/busser/tfautomv/archive/refs/tags/v0.7.0.tar.gz" + sha256 "0a00bfb9b4a236640cc4ad0efd9d1982c14f93d5379a5adcd35b1691e0846044" + license "Apache-2.0" + head "https://github.com/busser/tfautomv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "beb580a46afbac4b2ccf321188d41c995fc2a5dd0b8228fe0f54317ebbd51104" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "15f822277c9415edce4e42e4cc8d26af85af55c4c3c673bb9a589023e416dd71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15f822277c9415edce4e42e4cc8d26af85af55c4c3c673bb9a589023e416dd71" + sha256 cellar: :any_skip_relocation, arm64_ventura: "15f822277c9415edce4e42e4cc8d26af85af55c4c3c673bb9a589023e416dd71" + sha256 cellar: :any_skip_relocation, sonoma: "7ddabecdc49b7b4257f5674f0448deca4e522d314c006a1cdf144a6e0b24e3ab" + sha256 cellar: :any_skip_relocation, ventura: "7ddabecdc49b7b4257f5674f0448deca4e522d314c006a1cdf144a6e0b24e3ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9fd9613a0cf5634330b018e613dd555774227cf0d22d14ffac8034bd8e847e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d29d02610f03ccc17652c66df782b807f69d000b22a89a6c6e18e8b21356863" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + tofu = Formula["opentofu"].opt_bin/"tofu" + output = shell_output("#{bin}/tfautomv --terraform-bin #{tofu} 2>&1", 1) + assert_match "No configuration files", output + + assert_match version.to_s, shell_output("#{bin}/tfautomv --version") + end +end diff --git a/Formula/t/tfcmt.rb b/Formula/t/tfcmt.rb new file mode 100644 index 0000000000000..e3406e2b72a38 --- /dev/null +++ b/Formula/t/tfcmt.rb @@ -0,0 +1,45 @@ +class Tfcmt < Formula + desc "Notify the execution result of terraform command" + homepage "https://suzuki-shunsuke.github.io/tfcmt/" + url "https://github.com/suzuki-shunsuke/tfcmt/archive/refs/tags/v4.14.12.tar.gz" + sha256 "c21afa0421722529433c971dd8954b77db38632b069969798d908e650ed07b5d" + license "MIT" + head "https://github.com/suzuki-shunsuke/tfcmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "63e4a7dc88d9cbe39de88bbf3ab86801a43867f95dc8b9353b099c1382c579a9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "63e4a7dc88d9cbe39de88bbf3ab86801a43867f95dc8b9353b099c1382c579a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63e4a7dc88d9cbe39de88bbf3ab86801a43867f95dc8b9353b099c1382c579a9" + sha256 cellar: :any_skip_relocation, sonoma: "1d4a2653cc8b2ce7f03c5d283d41af04cdf9f9546530d3e19d59598c02827552" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a65399c5f4122b404d9dcbcff2007134b150d3b860653791c9bd69bcd6969d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec72c09333e81c102ffb4d5f0eaed361f54a839a38f1caf2418a565f39787683" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/tfcmt" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tfcmt version") + + (testpath/"main.tf").write <<~HCL + resource "aws_instance" "example" { + ami = "ami-0c55b159cbfafe1f0" + instance_type = "t2.micro" + } + HCL + + ENV["TFCMT_GITHUB_TOKEN"] = "test_token" + ENV["TFCMT_REPO_OWNER"] = "test_owner" + ENV["TFCMT_REPO_NAME"] = "test_repo" + ENV["TFCMT_SHA"] = "test_sha" + ENV["TFCMT_PR_NUMBER"] = "1" + ENV["TFCMT_CONFIG"] = "test_config" + + output = shell_output("#{bin}/tfcmt plan 2>&1", 1) + assert_match "config for tfcmt is not found at all", output + end +end diff --git a/Formula/t/tfel.rb b/Formula/t/tfel.rb new file mode 100644 index 0000000000000..6c63fce0e7e6e --- /dev/null +++ b/Formula/t/tfel.rb @@ -0,0 +1,81 @@ +class Tfel < Formula + desc "Code generation tool dedicated to material knowledge for numerical mechanics" + homepage "https://thelfer.github.io/tfel/web/index.html" + url "https://github.com/thelfer/tfel/archive/refs/tags/TFEL-5.0.1.tar.gz" + sha256 "820b2f9d54e237b2c2d9d6f06aaf7d4a1d3f34fb373e6549bee4fd8b55ecfad1" + license "GPL-1.0-or-later" + revision 2 + head "https://github.com/thelfer/tfel.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "da65729946101a094a08bdf88484da80941b8dcd10e6df3e8be2ddef77856b1a" + sha256 arm64_sequoia: "d8f4566c670b50e71803044ef482f3cbf6edd05f7477cb3e2295262adf842637" + sha256 arm64_sonoma: "d2b104c21a79dc7aafbb7cfd951a0bf9584872572016e6b371192f8989c81d9d" + sha256 sonoma: "28a3ca566bf9548afa081935a9f21d11e3f14213a79b8e29bc93a78f4a067009" + sha256 arm64_linux: "9671f1caabe0f5a693a48f8db0dd6737ab01e256a26793c72c7c96a498a685c0" + sha256 x86_64_linux: "a65a73c20aff24cf6c9eaa842ab9458d4193ce7c7e265167eec4533d199ad084" + end + + depends_on "cmake" => :build + depends_on "gcc" => :build # for gfortran + depends_on "boost-python3" + depends_on "python@3.14" + + def install + args = [ + "-DUSE_EXTERNAL_COMPILER_FLAGS=ON", + "-Denable-reference-doc=OFF", + "-Denable-website=OFF", + "-Dlocal-castem-header=ON", + "-Denable-python=ON", + "-Denable-python-bindings=ON", # requires boost-python + "-Denable-numpy-support=OFF", + "-Denable-fortran=ON", + "-Denable-cyrano=ON", + "-Denable-lsdyna=ON", + "-Denable-aster=ON", + "-Denable-abaqus=ON", + "-Denable-calculix=ON", + "-Denable-comsol=ON", + "-Denable-diana-fea=ON", + "-Denable-ansys=ON", + "-Denable-europlexus=ON", + "-Denable-testing=OFF", + "-Dpython-static-interpreter-workaround=ON", + ] + + # Avoid linkage to boost container and graph modules + # Issue ref: https://github.com/boostorg/boost/issues/985 + args << "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.mfront").write <<~MFRONT + @Parser Implicit; + @Behaviour Norton; + @Algorithm NewtonRaphson_NumericalJacobian ; + @RequireStiffnessTensor; + @MaterialProperty real A; + @MaterialProperty real m; + @StateVariable real p ; + @ComputeStress{ + sig = D*eel ; + } + @Integrator{ + real seq = sigmaeq(sig) ; + Stensor n = Stensor(0.) ; + if(seq > 1.e-12){ + n = 1.5*deviator(sig)/seq ; + } + feel += dp*n-deto ; + fp -= dt*A*pow(seq,m) ; + } + MFRONT + system bin/"mfront", "--obuild", "--interface=generic", "test.mfront" + assert_path_exists testpath/"src"/shared_library("libBehaviour") + end +end diff --git a/Formula/t/tfenv.rb b/Formula/t/tfenv.rb new file mode 100644 index 0000000000000..1d5e56579cd4d --- /dev/null +++ b/Formula/t/tfenv.rb @@ -0,0 +1,41 @@ +class Tfenv < Formula + desc "Terraform version manager inspired by rbenv" + homepage "https://github.com/tfutils/tfenv" + url "https://github.com/tfutils/tfenv/archive/refs/tags/v3.0.0.tar.gz" + sha256 "463132e45a211fa3faf85e62fdfaa9bb746343ff1954ccbad91cae743df3b648" + license "MIT" + head "https://github.com/tfutils/tfenv.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "3116d62535390452009656099a9b90cd687a2c1b1ad0fd9eb26dd3300daf1a4d" + end + + uses_from_macos "unzip" + + on_macos do + depends_on "grep" + end + + conflicts_with "tenv", because: "tfenv symlinks terraform binaries" + + def install + prefix.install %w[bin lib libexec share] + bin.env_script_all_files libexec, + TFENV_CONFIG_DIR: "${TFENV_CONFIG_DIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/tfenv}" + end + + test do + assert_match "0.10.0", shell_output("#{bin}/tfenv list-remote") + with_env(TFENV_TERRAFORM_VERSION: "0.10.0", TF_AUTO_INSTALL: "false") do + assert_equal "0.10.0", shell_output("#{bin}/tfenv version-name").strip + end + end +end diff --git a/Formula/t/tfk8s.rb b/Formula/t/tfk8s.rb new file mode 100644 index 0000000000000..0d4bef647b6b5 --- /dev/null +++ b/Formula/t/tfk8s.rb @@ -0,0 +1,62 @@ +class Tfk8s < Formula + desc "Kubernetes YAML manifests to Terraform HCL converter" + homepage "https://github.com/jrhouston/tfk8s" + url "https://github.com/jrhouston/tfk8s/archive/refs/tags/v0.1.10.tar.gz" + sha256 "be2680e76311ac7dd814a1bb0dceb486e3511d8d68845421338f9fcf5a92d5f9" + license "MIT" + head "https://github.com/jrhouston/tfk8s.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f9b07f68aa49e570daa4a68138d7f16893d524b2e2715df5de719be05da6a61e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e499b7011e3ce354ecbcc659a9dfbd792a4c27a434bc433b591878417c0e1d2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c997b7b01ee594d2d0f3e080ac8c3577d2dc49f0165f1af655a6d03e650610d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5feb499b0c5f97e06ab039c8e6c29b25760ef7403ca5d134524c7876e104b630" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ae64126f7d4aa6ab26ac854ee30eb7c7bf2ec5ed4e796d4d3d4e9c984c8e7e66" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3d9655de7508722848160492f9db8fdbd1c8af5916beae34275bc8fa067ff645" + sha256 cellar: :any_skip_relocation, sonoma: "bb61ac75407dd370ff45e09ff5624cd1db54714968fa0ad5c4731c0f2e733500" + sha256 cellar: :any_skip_relocation, ventura: "fe55588c429a2f74bdcbf062b252b69d15462d3af30ad8694a6e903c07ce105d" + sha256 cellar: :any_skip_relocation, monterey: "eb8f3df61a59e34291ea70c2fd93620b2bace987e18a50e15ca6b36e540d68af" + sha256 cellar: :any_skip_relocation, big_sur: "3671bf1dfd597f92b38958f4a1836336de5110962d0222b5c829097121a41ec2" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c5aeeca332a3116ad97a6eec394df57815c497b3c1a2f312a4c95c872ce12e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8abd3395c96d3cd264129a5811d98b07e010187b3c7bad9239a77d738c390e7c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.toolVersion=#{version}") + end + + test do + (testpath/"input.yml").write <<~YAML + apiVersion: v1 + kind: ConfigMap + metadata: + name: test + data: + TEST: test + YAML + + expected = <<~HCL + resource "kubernetes_manifest" "configmap_test" { + manifest = { + "apiVersion" = "v1" + "data" = { + "TEST" = "test" + } + "kind" = "ConfigMap" + "metadata" = { + "name" = "test" + } + } + } + HCL + + system bin/"tfk8s", "-f", "input.yml", "-o", "output.tf" + assert_equal expected, File.read("output.tf") + + assert_match version.to_s, shell_output("#{bin}/tfk8s --version") + end +end diff --git a/Formula/t/tflint.rb b/Formula/t/tflint.rb new file mode 100644 index 0000000000000..c8fd76eb3ec92 --- /dev/null +++ b/Formula/t/tflint.rb @@ -0,0 +1,50 @@ +class Tflint < Formula + desc "Linter for Terraform files" + homepage "https://github.com/terraform-linters/tflint" + url "https://github.com/terraform-linters/tflint/archive/refs/tags/v0.59.1.tar.gz" + sha256 "9b45910e897fd2028d748387abc781f13c57127bacde97b083aed2198c7b105d" + license "MPL-2.0" + head "https://github.com/terraform-linters/tflint.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f873357d065fdce6b58511cc37b38ef5d36135e34d8c1a707b993bb8a26b786f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0bdbbc0944d5f47051b969872a11095f31206e85bf3857a050ca80f44ff2d087" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0bdbbc0944d5f47051b969872a11095f31206e85bf3857a050ca80f44ff2d087" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0bdbbc0944d5f47051b969872a11095f31206e85bf3857a050ca80f44ff2d087" + sha256 cellar: :any_skip_relocation, sonoma: "89252903c5ffb7006376c4aa2f14c4b0182fbf2c48b32e4af014685ef066b3bc" + sha256 cellar: :any_skip_relocation, ventura: "c8a04be9e66bc4e17b48527b62617cf41e3cd8551014697f3e80a587342e2c56" + sha256 cellar: :any_skip_relocation, arm64_linux: "e92a75a5899b92c88e73f883ec91806731f8a99ab9e9b2fb2b4e9e70facc8237" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fefd140e3739fa3794d2ba554aa010c220f3a703dce0259b032060d6e44c96b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"test.tf").write <<~HCL + terraform { + required_version = ">= 1.0" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 4" + } + } + } + + provider "aws" { + region = var.aws_region + } + HCL + + # tflint returns exitstatus: 0 (no issues), 2 (errors occurred), 3 (no errors but issues found) + assert_empty shell_output("#{bin}/tflint --filter=test.tf") + assert_match version.to_s, shell_output("#{bin}/tflint --version") + end +end diff --git a/Formula/t/tfmcp.rb b/Formula/t/tfmcp.rb new file mode 100644 index 0000000000000..18aa118a93263 --- /dev/null +++ b/Formula/t/tfmcp.rb @@ -0,0 +1,36 @@ +class Tfmcp < Formula + desc "Terraform Model Context Protocol (MCP) Tool" + homepage "https://github.com/nwiizo/tfmcp" + url "https://github.com/nwiizo/tfmcp/archive/refs/tags/v0.1.5.tar.gz" + sha256 "a89882037b1c0a85d900b9e5d34edbc3c4ca78c648e7e54f423663c286f769cd" + license "MIT" + head "https://github.com/nwiizo/tfmcp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ae9966198115c0313c9fe9c917c73cc7548bf066ef424baca1768a3842d4d277" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c1d37d1f0afc8606af8d61b58ce87562353684d98ed17d6e95d5056092a448d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec63fab7c65d3f7336871a3b73197638677766164670f553a6aa76f173f4f9b6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4bd00155426fbe42e66b0407d99cf051e92a748c18170fc42af5353dd4f9565b" + sha256 cellar: :any_skip_relocation, sonoma: "362715e0769e7a47ba53e588141435f145a3463aa68033276f7ed104588d8634" + sha256 cellar: :any_skip_relocation, ventura: "231f29d10d19a1af5e6fa244d4867472a0e8e1d28eb32604ee1206e94642dad4" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cb0be4c5bd966660398b8da91aab2c6bc6951904a56ba5bc3801f6dd0205e71" + sha256 cellar: :any_skip_relocation, x86_64_linux: "575a05e0b7b7c95fee7fedde98338e4dc02701b9d12df6e644e928c1c336dd2b" + end + + depends_on "rust" => :build + depends_on "opentofu" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/tfmcp --version") + + ENV["TERRAFORM_BINARY_NAME"] = "tofu" + + output = shell_output("#{bin}/tfmcp analyze 2>&1") + assert_match "Terraform analysis complete", output + assert_match "Hello from tfmcp!", (testpath/"main.tf").read + end +end diff --git a/Formula/t/tfmigrate.rb b/Formula/t/tfmigrate.rb new file mode 100644 index 0000000000000..9f960ada8e48f --- /dev/null +++ b/Formula/t/tfmigrate.rb @@ -0,0 +1,43 @@ +class Tfmigrate < Formula + desc "Terraform/OpenTofu state migration tool for GitOps" + homepage "https://github.com/minamijoyo/tfmigrate" + url "https://github.com/minamijoyo/tfmigrate/archive/refs/tags/v0.4.3.tar.gz" + sha256 "6630aae0d443827e222a0344096e189d05a4b9897afd1b8a9499ba6173d6eb8d" + license "MIT" + head "https://github.com/minamijoyo/tfmigrate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "65cff3de122db120d4f394b9614d3b944e1fcf872f278924c00b42d0e6ee7fbd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef126861e4028b2c48bccb7eb5f72116aebfee30818603940c3ef8fd0916236c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef126861e4028b2c48bccb7eb5f72116aebfee30818603940c3ef8fd0916236c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef126861e4028b2c48bccb7eb5f72116aebfee30818603940c3ef8fd0916236c" + sha256 cellar: :any_skip_relocation, sonoma: "301aa0212bce66744d414925cc73a8a97ea4905f59a030d357d05ea196ccccc2" + sha256 cellar: :any_skip_relocation, ventura: "301aa0212bce66744d414925cc73a8a97ea4905f59a030d357d05ea196ccccc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "0990baac6fff9aecc7b64730009c0588d922c2e3e9fbade883e88e56e6dec9a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd6c636409a4b4dee3a857647e8ed769accc7a2848fe22a70954603052ab94cb" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + ENV["TFMIGRATE_EXEC_PATH"] = "tofu" + + (testpath/"tfmigrate.hcl").write <<~HCL + migration "state" "brew" { + actions = [ + "mv aws_security_group.foo aws_security_group.baz", + ] + } + HCL + output = shell_output("#{bin}/tfmigrate plan tfmigrate.hcl 2>&1", 1) + assert_match "[migrator@.] compute a new state", output + assert_match "No state file was found!", output + + assert_match version.to_s, shell_output("#{bin}/tfmigrate --version") + end +end diff --git a/Formula/t/tfmv.rb b/Formula/t/tfmv.rb new file mode 100644 index 0000000000000..579737e5e7c5e --- /dev/null +++ b/Formula/t/tfmv.rb @@ -0,0 +1,42 @@ +class Tfmv < Formula + desc "CLI to rename Terraform resources and generate moved blocks" + homepage "https://github.com/suzuki-shunsuke/tfmv" + url "https://github.com/suzuki-shunsuke/tfmv/archive/refs/tags/v0.2.8.tar.gz" + sha256 "c2ae0d1c0bb5d0d7cdbb256f8a784753df5c2f9e1175e91449849efe5a7e668f" + license "MIT" + head "https://github.com/suzuki-shunsuke/tfmv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "068e9b03ab71694280924d8badc57117372b569947727d31be1752343f40d524" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "04674f9a20ae847e01db7ff8f04cbf24daa3b41bed2ce646830804c2843493f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "04674f9a20ae847e01db7ff8f04cbf24daa3b41bed2ce646830804c2843493f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04674f9a20ae847e01db7ff8f04cbf24daa3b41bed2ce646830804c2843493f5" + sha256 cellar: :any_skip_relocation, sonoma: "9cc0e643c4f038d1a84e0366ebeceb14d52dcdc7c68941a2da84257098bcfc4c" + sha256 cellar: :any_skip_relocation, ventura: "9cc0e643c4f038d1a84e0366ebeceb14d52dcdc7c68941a2da84257098bcfc4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "60fdec9de2f834f8cf0eabd9dfc59cbe2258863efa75bd42928dd9fb17bd9a7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43eff6cba1a9ceb6e4896c71b7924740f0354ad148eb2379208e6d0a3418fb95" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/tfmv" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tfmv --version") + + (testpath/"main.tf").write <<~HCL + resource "aws_instance" "example" { + ami = "ami-0c55b159cbfafe1f0" + instance_type = "t2.micro" + } + HCL + + output = shell_output("#{bin}/tfmv --replace example/new_example main.tf") + assert_match "aws_instance.new_example", JSON.parse(output)["changes"][0]["new_address"] + + assert_match "resource \"aws_instance\" \"new_example\" {", (testpath/"main.tf").read + end +end diff --git a/Formula/t/tfocus.rb b/Formula/t/tfocus.rb new file mode 100644 index 0000000000000..36083434d18a7 --- /dev/null +++ b/Formula/t/tfocus.rb @@ -0,0 +1,34 @@ +class Tfocus < Formula + desc "Tool for selecting and executing terraform plan/apply on specific resources" + homepage "https://github.com/nwiizo/tfocus" + url "https://github.com/nwiizo/tfocus/archive/refs/tags/v0.1.5.tar.gz" + sha256 "cf8d841d170c551e8f669e8fe71b5c85f0f2b36623ca6e2b8189aa041e76b75d" + license "MIT" + head "https://github.com/nwiizo/tfocus.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "258361e1ca78414d867f992032a024b6391dfc49737fbf25e184a3b6b6274cc3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5dbfaf820e34ef9e6bb04d45a1d277fea9a27cda78fed88ae90f3686efa0006" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c72c12d7d0620fe84de30e04a49bdd1c98961891ec81267b95957c3dbc5dfbeb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae42614fc40aafade49f9d100c5062396a5ae898c69967234a0762103fa550bf" + sha256 cellar: :any_skip_relocation, sonoma: "0b997ef677047ba1e07f50d7bef51846e68c022fc7dfb73fcf1a6abc1f674654" + sha256 cellar: :any_skip_relocation, ventura: "fedfc7f38e939c9774d87f0a0323dbc998a4ff996d9bf871ac59c9c00e52050b" + sha256 cellar: :any_skip_relocation, arm64_linux: "773b63ffe352855a4c69c081dfa3286c894f02c352108f66bb2a7635fbc62542" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fac1961de78a056730c0b3a0695287a27eb52bed318bd05bb5606b105a0ac1c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/tfocus --version") + + output = shell_output("#{bin}/tfocus 2>&1", 1) + assert_match "No Terraform files found in the current directory", output + end +end diff --git a/Formula/t/tfplugingen-openapi.rb b/Formula/t/tfplugingen-openapi.rb new file mode 100644 index 0000000000000..d453d9ef2110a --- /dev/null +++ b/Formula/t/tfplugingen-openapi.rb @@ -0,0 +1,30 @@ +class TfplugingenOpenapi < Formula + desc "OpenAPI to Terraform Provider Code Generation Specification" + homepage "https://github.com/hashicorp/terraform-plugin-codegen-openapi" + url "https://github.com/hashicorp/terraform-plugin-codegen-openapi/archive/refs/tags/v0.3.0.tar.gz" + sha256 "30bbf07996185312f8d7ad42163b6f1bcb756adfdd8ec981d63c72c4b7b1e721" + license "MPL-2.0" + head "https://github.com/hashicorp/terraform-plugin-codegen-openapi.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a0aeb3eacbc8acbd4b5b6a3def118e3b020a5b46615cb1404b35ba8172aba72e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0aeb3eacbc8acbd4b5b6a3def118e3b020a5b46615cb1404b35ba8172aba72e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0aeb3eacbc8acbd4b5b6a3def118e3b020a5b46615cb1404b35ba8172aba72e" + sha256 cellar: :any_skip_relocation, sonoma: "bd1f2d1c1db38774680f5db82b743824fbcedfc44be28f67bcd33ce49f293190" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb727f1c401fbe225a9407b9aa7e326bf4dd15fe2e1b5c938a467b26fe9bf387" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13808c557251e72adfa46d56d9194aef2a947568441e4bc422489891a6387852" + end + + depends_on "go" => :build + + def install + commit = build.head? ? Utils.git_short_head : tap.user + ldflags = "-s -w -X main.commit=#{commit} -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/tfplugingen-openapi" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tfplugingen-openapi --version 2>&1") + assert_match "OpenAPI specification file is required", shell_output("#{bin}/tfplugingen-openapi generate 2>&1", 1) + end +end diff --git a/Formula/t/tfprovidercheck.rb b/Formula/t/tfprovidercheck.rb new file mode 100644 index 0000000000000..541a3ceac5d46 --- /dev/null +++ b/Formula/t/tfprovidercheck.rb @@ -0,0 +1,60 @@ +class Tfprovidercheck < Formula + desc "CLI to prevent malicious Terraform Providers from being executed" + homepage "https://github.com/suzuki-shunsuke/tfprovidercheck" + url "https://github.com/suzuki-shunsuke/tfprovidercheck/archive/refs/tags/v1.0.6.tar.gz" + sha256 "35b7038242c67864fc969c84e0614e155e8cc4be955226c440b2bba26f3ab116" + license "MIT" + head "https://github.com/suzuki-shunsuke/tfprovidercheck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7bd39984bfc74a74c2398c3e26c4bd067eda608951b44c584d085da72d3bb8dd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5999fe7f5aa3878e386922f3ae60620217e21281a9eb206d43ea4accd48950f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5999fe7f5aa3878e386922f3ae60620217e21281a9eb206d43ea4accd48950f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5999fe7f5aa3878e386922f3ae60620217e21281a9eb206d43ea4accd48950f8" + sha256 cellar: :any_skip_relocation, sonoma: "ad3c0f23e2e60f0b0415a78664d1c937eda185ecaf2bb1c32b5422ac81d5e24e" + sha256 cellar: :any_skip_relocation, ventura: "ad3c0f23e2e60f0b0415a78664d1c937eda185ecaf2bb1c32b5422ac81d5e24e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2564548cfaddf04848f2f34174a0451843a87be03e12cdb2f5c410efba03f297" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea1b43a81af9d43ce3fd5e9aff2f6d642678a533fd867da44c4be37e55d3a7a2" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/tfprovidercheck" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tfprovidercheck -version") + + (testpath/"test.tf").write <<~HCL + terraform { + required_version = ">= 1.0" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5" + } + } + } + + provider "aws" { + region = var.aws_region + } + HCL + + # Only google provider and azurerm provider are allowed + (testpath/".tfprovidercheck.yaml").write <<~YAML + providers: + - name: registry.terraform.io/hashicorp/google + version: ">= 4.0.0" + - name: registry.terraform.io/hashicorp/azurerm + YAML + + system "tofu", "init" + json_output = shell_output("tofu version -json") + output = pipe_output("#{bin}/tfprovidercheck 2>&1", json_output, 1) + assert_match "Terraform Provider is disallowed", output + end +end diff --git a/Formula/t/tfproviderlint.rb b/Formula/t/tfproviderlint.rb new file mode 100644 index 0000000000000..c02c80fca91d6 --- /dev/null +++ b/Formula/t/tfproviderlint.rb @@ -0,0 +1,45 @@ +class Tfproviderlint < Formula + desc "Terraform Provider Lint Tool" + homepage "https://github.com/bflad/tfproviderlint" + url "https://github.com/bflad/tfproviderlint/archive/refs/tags/v0.31.0.tar.gz" + sha256 "9defa750077052ebf1639532e771a9e986b7a53948b6a16cb647ceaf60cfbce1" + license "MPL-2.0" + revision 1 + head "https://github.com/bflad/tfproviderlint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6f4bf27d9b61e145f042c164ed14a9a3a01ce9b9caaafabd14dd91764b6f7014" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7ed7fe0393b6cc3591ca9dbcce920c84698ff11ab9446e29e93888a67a494f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7ed7fe0393b6cc3591ca9dbcce920c84698ff11ab9446e29e93888a67a494f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7ed7fe0393b6cc3591ca9dbcce920c84698ff11ab9446e29e93888a67a494f8" + sha256 cellar: :any_skip_relocation, sonoma: "a6ff646a23f8738c5e0b3dcb848c09b1125182d03e0d7925d58927bb6b066f36" + sha256 cellar: :any_skip_relocation, ventura: "a6ff646a23f8738c5e0b3dcb848c09b1125182d03e0d7925d58927bb6b066f36" + sha256 cellar: :any_skip_relocation, arm64_linux: "a31f564bfe6ecb8bb9ac76043141bf54674b05d51ef4c0df2cfa964fdf25742c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45dcc2992373e36bd948f80f3a4e9db317c4d209ee2e449c476fbd1e4490854c" + end + + depends_on "go" => [:build, :test] + + def install + ldflags = %W[ + -s -w + -X github.com/bflad/tfproviderlint/version.Version=#{version} + -X github.com/bflad/tfproviderlint/version.VersionPrerelease=#{"dev" if build.head?} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/tfproviderlint" + end + + test do + resource "homebrew-test_resource" do + url "https://github.com/russellcardullo/terraform-provider-pingdom/archive/refs/tags/v1.1.3.tar.gz" + sha256 "3834575fd06123846245eeeeac1e815f5e949f04fa08b65c67985b27d6174106" + end + + testpath.install resource("homebrew-test_resource") + assert_match "S006: schema of TypeMap should include Elem", + shell_output("#{bin}/tfproviderlint -fix #{testpath}/... 2>&1", 3) + + assert_match version.to_s, shell_output("#{bin}/tfproviderlint --version") + end +end diff --git a/Formula/t/tfschema.rb b/Formula/t/tfschema.rb new file mode 100644 index 0000000000000..646075c863b62 --- /dev/null +++ b/Formula/t/tfschema.rb @@ -0,0 +1,36 @@ +class Tfschema < Formula + desc "Schema inspector for Terraform/OpenTofu providers" + homepage "https://github.com/minamijoyo/tfschema" + url "https://github.com/minamijoyo/tfschema/archive/refs/tags/v0.7.9.tar.gz" + sha256 "094f8a3c80bac1afc8f03a979625b1334eb5318261f8b8fec9f20ebef3d3d14c" + license "MIT" + head "https://github.com/minamijoyo/tfschema.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "74eb616a07e9b291ef3a898fafdada0863bfae1fc9f68c35c9296d9999b87f89" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a26bacd3c1d2c3181c66869f2073433ffd6e22e5886a005d1c5f7c4cf975421d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e1b3e06b4e54a071f7de0ddca39efc3c5d907d683d43ace34bb58f6c67aefb70" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5226fa144a7d62a560b71935d21f5ec06bb8d012ff52a96c446e27ca071faea" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e97f4365b1120a43460e1cf0f9a315d656835844c7e74d812c6e283ff2d6009f" + sha256 cellar: :any_skip_relocation, sonoma: "211f9e3b81ba3ea4718527da5163c9601cf047e1a96d1150633e18629e0a0e9f" + sha256 cellar: :any_skip_relocation, ventura: "d49710e06a136faa07a494c6be24b5f0b549edcb6ef4a021d29da09b626798e1" + sha256 cellar: :any_skip_relocation, monterey: "7c9bc506e3047c96c6e816c631b9d7c106fd2f7569413c1fb27eae986d8a6f97" + sha256 cellar: :any_skip_relocation, arm64_linux: "5520369f0f5296724c0d5465ee7a71be144c9a73762c9f3797a809055bc68cfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cee668cff712e456427c14fc7945eebc14812aa148194a4898bad8017933b70a" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"provider.tf").write "provider \"aws\" {}" + system Formula["opentofu"].bin/"tofu", "init" + assert_match "permissions_boundary", shell_output("#{bin}/tfschema resource show aws_iam_user") + + assert_match version.to_s, shell_output("#{bin}/tfschema --version") + end +end diff --git a/Formula/t/tfsec.rb b/Formula/t/tfsec.rb new file mode 100644 index 0000000000000..a23bf791e36f0 --- /dev/null +++ b/Formula/t/tfsec.rb @@ -0,0 +1,52 @@ +class Tfsec < Formula + desc "Static analysis security scanner for your terraform code" + homepage "https://aquasecurity.github.io/tfsec/latest/" + url "https://github.com/aquasecurity/tfsec/archive/refs/tags/v1.28.14.tar.gz" + sha256 "61fe8ee670cceaf45d85c2789da66616d0045f8dbba4ec2b9db453436f9b9804" + license "MIT" + head "https://github.com/aquasecurity/tfsec.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eb1908905eba53c4bc447ab6b45f55e8993f2baa1e5b0a6633185ce20087df9a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8cf695583885541d5458402c40342efa2beebee6ad5cfce832c738bfc5b8a2c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "95f94624c56f21064b7621e9d01c9cc78a60186864119a7f738b62d9fb97727b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c3fed3af871e78aa8129120ee048064e4f6bfc8a8d44a8aff8582a0e48732c9" + sha256 cellar: :any_skip_relocation, sonoma: "181f6a3acfe91948ad4482b079d602bc1c03ad5c415c916f2dba42d590eed863" + sha256 cellar: :any_skip_relocation, ventura: "d7384e0c097b2e9668cd12a696f4b5bd6ae8df1832051fcafa32e6583b715057" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ba4ea5c30dc01b827abd7f4f8719806a1a76ecda0ff3096a6a170a3461b4c82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dde3909cdd3d6c5e799ad913a640ba9d2ba2af6e7112254ab4d280335dda52cf" + end + + depends_on "go" => :build + + def install + system "scripts/install.sh", "v#{version}" + bin.install "tfsec" + end + + test do + (testpath/"good/brew-validate.tf").write <<~HCL + resource "aws_alb_listener" "my-alb-listener" { + port = "443" + protocol = "HTTPS" + } + HCL + (testpath/"bad/brew-validate.tf").write <<~HCL + resource "aws_security_group_rule" "world" { + description = "A security group triggering tfsec AWS006." + type = "ingress" + cidr_blocks = ["0.0.0.0/0"] + } + HCL + + good_output = shell_output("#{bin}/tfsec #{testpath}/good") + assert_match "No problems detected!", good_output + bad_output = shell_output("#{bin}/tfsec #{testpath}/bad 2>&1", 1) + assert_match "1 potential problem(s) detected.", bad_output + end +end diff --git a/Formula/t/tfsort.rb b/Formula/t/tfsort.rb new file mode 100644 index 0000000000000..be65e82dd9c2c --- /dev/null +++ b/Formula/t/tfsort.rb @@ -0,0 +1,38 @@ +class Tfsort < Formula + desc "CLI to sort Terraform variables and outputs" + homepage "https://github.com/AlexNabokikh/tfsort" + url "https://github.com/AlexNabokikh/tfsort/archive/refs/tags/v0.7.1.tar.gz" + sha256 "6f72bb06b57573ee63fec715cd4493ed90d0af0dfeea7478abfde04745d39157" + license "Apache-2.0" + head "https://github.com/AlexNabokikh/tfsort.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a909ead38b4e912cdb01422b2de69df0c1e4ec6dca044df587e54ecda98bdfe4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3fb6cc984f31e20e1d481f5170ba5d0afa80a5eb42c070e3e1e58a0b3c427726" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fb6cc984f31e20e1d481f5170ba5d0afa80a5eb42c070e3e1e58a0b3c427726" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3fb6cc984f31e20e1d481f5170ba5d0afa80a5eb42c070e3e1e58a0b3c427726" + sha256 cellar: :any_skip_relocation, sonoma: "997f3dbd8f733cb8ac4885f5c1e847167aab98aa2026e2bff412538b5feea54d" + sha256 cellar: :any_skip_relocation, ventura: "997f3dbd8f733cb8ac4885f5c1e847167aab98aa2026e2bff412538b5feea54d" + sha256 cellar: :any_skip_relocation, arm64_linux: "87487fc1f259042ccd78e6cf15983308a5f9dd856193fcb59a73f838e9e768ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3424821cc7dd576fa0a9814cf0da0b292b5f754ef8e63485af5f85b7e15233f2" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + + # install testdata + pkgshare.install "internal/hclsort/testdata" + end + + test do + cp_r pkgshare/"testdata/.", testpath + + assert_empty shell_output("#{bin}/tfsort invalid.tf 2>&1") + + system bin/"tfsort", "valid.tofu" + assert_equal (testpath/"expected.tofu").read, (testpath/"valid.tofu").read + end +end diff --git a/Formula/t/tfstate-lookup.rb b/Formula/t/tfstate-lookup.rb new file mode 100644 index 0000000000000..7c1afabf403c1 --- /dev/null +++ b/Formula/t/tfstate-lookup.rb @@ -0,0 +1,35 @@ +class TfstateLookup < Formula + desc "Lookup resource attributes in tfstate" + homepage "https://github.com/fujiwara/tfstate-lookup" + url "https://github.com/fujiwara/tfstate-lookup/archive/refs/tags/v1.7.1.tar.gz" + sha256 "25cdce913064998704a8b5d26ff01a572564531999211e6c05b382f20df03f7e" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ec6c860f2042486eda3902de89f8927e5d9399a052b38b0fea5b553c3ac527d7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec6c860f2042486eda3902de89f8927e5d9399a052b38b0fea5b553c3ac527d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec6c860f2042486eda3902de89f8927e5d9399a052b38b0fea5b553c3ac527d7" + sha256 cellar: :any_skip_relocation, sonoma: "dcdd6c4010e472341aac6bbf7daed018e323d90de529723c067b5dba7fbd473a" + sha256 cellar: :any_skip_relocation, arm64_linux: "daa9fe3570937c49eb9a1d52155f063a4885cfddd78c72242212b8c396524d05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7ffa1abd666e9b02d9fa1654b29bfe6462720139e85efa8140b580aab8398b1" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/tfstate-lookup" + end + + test do + (testpath/"terraform.tfstate").write <<~EOS + { + "version": 4, + "terraform_version": "1.7.2", + "resources": [] + } + EOS + + output = shell_output("#{bin}/tfstate-lookup -dump") + assert_match "{}", output + end +end diff --git a/Formula/t/tfupdate.rb b/Formula/t/tfupdate.rb new file mode 100644 index 0000000000000..6bfe50d86917f --- /dev/null +++ b/Formula/t/tfupdate.rb @@ -0,0 +1,38 @@ +class Tfupdate < Formula + desc "Update version constraints in your Terraform configurations" + homepage "https://github.com/minamijoyo/tfupdate" + url "https://github.com/minamijoyo/tfupdate/archive/refs/tags/v0.9.2.tar.gz" + sha256 "4020825b5618686287d7040a5d992c9e36f4435031219c048cff25213932fa5d" + license "MIT" + head "https://github.com/minamijoyo/tfupdate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8f86ec84ac66c0984579ca716c7a7b5b32aa8dfe6afcfa67f3ec24fe733ab938" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "247825cbffb910ffc07e8ec49e72e101acf2f8624d432ccf3869bb98874ed1a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "247825cbffb910ffc07e8ec49e72e101acf2f8624d432ccf3869bb98874ed1a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "247825cbffb910ffc07e8ec49e72e101acf2f8624d432ccf3869bb98874ed1a5" + sha256 cellar: :any_skip_relocation, sonoma: "5cf43eba7b409ae0090035d99a4f0d4bf1503449a388bbc888441a055d781c61" + sha256 cellar: :any_skip_relocation, ventura: "5cf43eba7b409ae0090035d99a4f0d4bf1503449a388bbc888441a055d781c61" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a86305ca2ac02dd0656da86fec12717973110f344020e27aa4151fbf99da2e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b21bc43bc4e0576aca32458bbf76c1c33a9d2f996bf652d1f191d71c9f16998" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"provider.tf").write <<~HCL + provider "aws" { + version = "2.39.0" + } + HCL + + system bin/"tfupdate", "provider", "aws", "-v", "2.40.0", testpath/"provider.tf" + assert_match "2.40.0", File.read(testpath/"provider.tf") + + assert_match version.to_s, shell_output("#{bin}/tfupdate --version") + end +end diff --git a/Formula/t/tgenv.rb b/Formula/t/tgenv.rb new file mode 100644 index 0000000000000..e4632fa496372 --- /dev/null +++ b/Formula/t/tgenv.rb @@ -0,0 +1,26 @@ +class Tgenv < Formula + desc "Terragrunt version manager inspired by tfenv" + homepage "https://github.com/tgenv/tgenv" + url "https://github.com/tgenv/tgenv/archive/refs/tags/v1.2.1.tar.gz" + sha256 "241b18ee59bd993256c9dc0847e23824c9ebf42b4d121db11fbdff9ddb6432b2" + license "MIT" + head "https://github.com/tgenv/tgenv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b51fcece0e2a8b77f96f8460b123aedb1ab6cd9497b5da570e00639258324ece" + end + + uses_from_macos "unzip" + + conflicts_with "tenv", because: "tgenv symlinks terragrunt binaries" + conflicts_with "terragrunt", because: "tgenv symlinks terragrunt binaries" + + def install + prefix.install %w[bin libexec] + end + + test do + ret_status = OS.mac? ? 1 : 0 + assert_match "0.73.6", shell_output("#{bin}/tgenv list-remote 2>&1", ret_status) + end +end diff --git a/Formula/t/tgif.rb b/Formula/t/tgif.rb new file mode 100644 index 0000000000000..b63325158a426 --- /dev/null +++ b/Formula/t/tgif.rb @@ -0,0 +1,102 @@ +class Tgif < Formula + desc "Xlib-based interactive 2D drawing tool" + homepage "https://sourceforge.net/projects/tgif/" + url "https://downloads.sourceforge.net/project/tgif/tgif/4.2.5/tgif-QPL-4.2.5.tar.gz" + sha256 "2f24e9fecafae6e671739bd80691a06c9d032bdd1973ca164823e72ab1c567ba" + license "QPL-1.0" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a906f3f2e65cdea619db1d9e4fde93545c46979cd45eabb7bab645e8ad8e9bd2" + sha256 arm64_sequoia: "d25b56e8a0c3f77e501a9a9bb0e1214a0c50b28885be6971ad522d6d18bf54fb" + sha256 arm64_sonoma: "c50b1a8d587e78480c0b90da2aac56ff3439668b3d59fa44e2ba1ee1cc2a2674" + sha256 arm64_ventura: "27cafeb5046eb26fd967d69564c384d1a8e3ae9aabe890d3337f791d3fbc1f48" + sha256 arm64_monterey: "82ff8e9a80be770347e07f11fc83c8fdc06856200cc5507b020ada88368f258c" + sha256 arm64_big_sur: "29699e47040d83ff53dbe9800a053ba9a41fe1ae1834e08ede2844ec59803662" + sha256 sonoma: "b3f55a3692aec31ac03d2316f72305fdc736a1935ed69e98dcf1ab8183e316cc" + sha256 ventura: "c06f7f0460e80628f7e8071322ea3813cd3bc12d21f9843ee58f4e397626de19" + sha256 monterey: "3b5ab882fc7b33701cbb6c8340c1c423afe3b088f5c34b6bee69a9bc9cf27d39" + sha256 big_sur: "0488ea1c1291ea86653e1f5e3b0a9d7499ee101ccec3a5cb8f1e855aa445181d" + sha256 catalina: "ce5a689942aed9986f74150bddebb09a129aba97810658fc67a6060519eacd86" + sha256 arm64_linux: "071bd8c29e292d980e4bc1cc1898406b6fb7b4133ac91d8b892bfac23c905d65" + sha256 x86_64_linux: "e399c02348529aca39dfe252f2ee3e31fecb290d79599609abf4097c0b06afb8" + end + + depends_on "libice" + depends_on "libidn" + depends_on "libsm" + depends_on "libx11" + depends_on "libxext" + depends_on "libxmu" + depends_on "libxt" + + uses_from_macos "zlib" + + # patch sent upstream to the author email (bill.cheng@usc.edu) + # fixes the -Wimplicit-function-declaration error on Sonoma + patch :DATA + + def install + # Workaround for newer Clang + inreplace "Makefile.in", "-Wall", "-Wall -Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.obj").write <<~EOS + %TGIF 4.2.5 + state(0,37,100.000,0,0,0,16,1,9,1,1,0,0,1,0,1,0,'Courier',0,80640,0,0,0,10,0,0,1,1,0,16,0,0,1,1,1,1,1088,1408,1,0,2880,0). + % + % @(#)$Header$ + % %W% + % + unit("1 pixel/pixel"). + color_info(11,65535,0,[ + "magenta", 65535, 0, 65535, 65535, 0, 65535, 1, + "red", 65535, 0, 0, 65535, 0, 0, 1, + "green", 0, 65535, 0, 0, 65535, 0, 1, + "blue", 0, 0, 65535, 0, 0, 65535, 1, + "yellow", 65535, 65535, 0, 65535, 65535, 0, 1, + "pink", 65535, 49344, 52171, 65535, 49344, 52171, 1, + "cyan", 0, 65535, 65535, 0, 65535, 65535, 1, + "CadetBlue", 24415, 40606, 41120, 24415, 40606, 41120, 1, + "white", 65535, 65535, 65535, 65535, 65535, 65535, 1, + "black", 0, 0, 0, 0, 0, 0, 1, + "DarkSlateGray", 12079, 20303, 20303, 12079, 20303, 20303, 1 + ]). + script_frac("0.6"). + fg_bg_colors('black','white'). + dont_reencode("FFDingbests:ZapfDingbats"). + objshadow_info('#c0c0c0',2,2). + rotate_pivot(0,0,0,0). + spline_tightness(1). + page(1,"",1,''). + box('black','',64,64,128,128,0,1,1,0,0,0,0,0,0,'1',0,[ + ]). + + EOS + system bin/"tgif", "-print", "-text", "-quiet", "test.obj" + assert_path_exists testpath/"test.txt" + end +end +__END__ +--- a/wb.c ++++ b/wb.c +@@ -20,11 +20,12 @@ + + #define _INCLUDE_FROM_WB_C_ + ++#include "tgifdefs.h" ++ + #if (defined(PTHREAD) || defined(HAVE_LIBPTHREAD)) + #include + #endif /* (defined(PTHREAD) || defined(HAVE_LIBPTHREAD)) */ + +-#include "tgifdefs.h" + #include "cmdids.h" + + #ifdef _HAS_STREAMS_SUPPORT diff --git a/Formula/t/tgpt.rb b/Formula/t/tgpt.rb new file mode 100644 index 0000000000000..fc52c25464eed --- /dev/null +++ b/Formula/t/tgpt.rb @@ -0,0 +1,36 @@ +class Tgpt < Formula + desc "AI Chatbots in terminal without needing API keys" + homepage "https://github.com/aandrew-me/tgpt" + url "https://github.com/aandrew-me/tgpt/archive/refs/tags/v2.11.0.tar.gz" + sha256 "79cbb20d33d38370cc86a5d28d584a3492631295a95635615052db39e92636a3" + license "GPL-3.0-only" + head "https://github.com/aandrew-me/tgpt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ff1814a032b50dc938619a0d3beb42ea04bc71e859c74e1bb0788a7195608d4a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0aaf7491e34e5fac755643beb05c215be1c25600e1a3dd92bf5da8585ce49b9c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa57f2611186a6c6efcc5db8dcfad0d90d398873db067d07db64021160b2f97a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ca27e2b876508123185c8fb67b65af1aa156c0c3dadcbee75068c9e466f6528" + sha256 cellar: :any_skip_relocation, sonoma: "61e4f46de86ffc8116273f270809e7db38fe1567c496f85519f1895d757568e3" + sha256 cellar: :any_skip_relocation, ventura: "652445f4990a5d03d9c8a20339a28502ba45b2b02081058f6fa425ba491b62d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9fb13ae92813f7636af5f1e86da4443ad5dfac176f2380ad637a3e42065555c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d5f05da6f4436deb70610058e858992622bfe504aa815f1b0969529bb6a3fab" + end + + depends_on "go" => :build + + on_linux do + depends_on "libx11" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/tgpt --version") + + output = shell_output("#{bin}/tgpt --provider pollinations \"What is 1+1\"") + assert_match(/(1|one)\s*(\+|\splus\s|\sand\s)\s*(1|one)\s*(\sequals\s|\sis\s|=)\s*(2|two)/i, output) + end +end diff --git a/Formula/t/tgui.rb b/Formula/t/tgui.rb new file mode 100644 index 0000000000000..7f233e3e77da2 --- /dev/null +++ b/Formula/t/tgui.rb @@ -0,0 +1,68 @@ +class Tgui < Formula + desc "GUI library for use with sfml" + homepage "https://tgui.eu" + url "https://github.com/texus/TGUI/archive/refs/tags/v1.11.0.tar.gz" + sha256 "096e1183137a9e3e8f2f3d2fc65ff6355e938ffa7383dce0e51e06885abe7e61" + license "Zlib" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "86614489998a70a5dc860c8364a5507e5cd042d99b84e788cecfdbd378de9bac" + sha256 cellar: :any, arm64_sequoia: "6bd9dca615dd65cd0f668566bcd5aca4806d1bc4e9c2be96104f724523452047" + sha256 cellar: :any, arm64_sonoma: "d835948113282163393ba26748b51ca96d3335387b06ed984a9641950ac1d2db" + sha256 cellar: :any, sonoma: "07c98ea2048d0ba71e18e9036d9bd5e098de1320d0699105b2ad047c31d5e9f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ebe73db411a2707b600090dd1d2e0886dc5108d26c04c89117309fa7c6ee56a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c8ddfdbefda92eab2364d8eff35f12eb1973c0cd758c29e6bb8dfa1df357eff" + end + + depends_on "cmake" => :build + depends_on "sfml" + + def install + args = %W[ + -DTGUI_MISC_INSTALL_PREFIX=#{pkgshare} + -DTGUI_BACKEND=SFML_GRAPHICS + -DTGUI_BUILD_FRAMEWORK=FALSE + -DTGUI_BUILD_EXAMPLES=TRUE + -DTGUI_BUILD_GUI_BUILDER=TRUE + -DTGUI_BUILD_TESTS=FALSE + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() + { + sf::RenderWindow window{sf::VideoMode{{800, 600}}, "TGUI example (SFML-Graphics)"}; + tgui::Gui gui{window}; + if (!window.isOpen()) + return 1; + const auto event = window.pollEvent(); + window.close(); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-I#{Formula["sfml"].opt_include}", + "-L#{lib}", "-L#{Formula["sfml"].opt_lib}", + "-ltgui", "-lsfml-graphics", "-lsfml-system", "-lsfml-window", + "-o", "test" + + if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + assert_match "Failed to open X11 display", shell_output("./test 2>&1", 134) + else + system "./test" + end + end +end diff --git a/Formula/t/thanos.rb b/Formula/t/thanos.rb new file mode 100644 index 0000000000000..c00a99def0f37 --- /dev/null +++ b/Formula/t/thanos.rb @@ -0,0 +1,33 @@ +class Thanos < Formula + desc "Highly available Prometheus setup with long term storage capabilities" + homepage "https://thanos.io" + url "https://github.com/thanos-io/thanos/archive/refs/tags/v0.40.1.tar.gz" + sha256 "40a9aba9bfde720f03f1db9b1458d41deadfed283b87ead26fd4ad535bdd8f83" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b2211d32b581452107e32edf6e47d917064862b6883bc88b075d23699dc58e23" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8299faeda73834ba48cdf5d5220a96a9d507f33196b12b37b1e58a703a6f02eb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb4f8a30998c7f2a5382a61397024fa15e4f0bd3b8cc29b6107cfe779431c0b9" + sha256 cellar: :any_skip_relocation, sonoma: "96b19d24ce9f556221a6b5f339a83829ceb13dfd6897cde7c229e2ff5a35035f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a16153e87b273509af206ba3b08c92a58685a1aa3502637b624a82df9164f7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f7c5c466a3dc773129c6228f236db90f96ee20c0194ee8419a39dc27b84aed3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/thanos" + end + + test do + (testpath/"bucket_config.yaml").write <<~YAML + type: FILESYSTEM + config: + directory: #{testpath} + YAML + + output = shell_output("#{bin}/thanos tools bucket inspect --objstore.config-file bucket_config.yaml") + assert_match "| ULID |", output + end +end diff --git a/Formula/t/the-way.rb b/Formula/t/the-way.rb new file mode 100644 index 0000000000000..b105f93815835 --- /dev/null +++ b/Formula/t/the-way.rb @@ -0,0 +1,36 @@ +class TheWay < Formula + desc "Code snippets manager for your terminal" + homepage "https://github.com/out-of-cheese-error/the-way" + url "https://github.com/out-of-cheese-error/the-way/archive/refs/tags/v0.20.3.tar.gz" + sha256 "84e0610f6b74c886c6cfa92cbce5f1d4f4d12b6e504d379c11659ab9ef980e97" + license "MIT" + head "https://github.com/out-of-cheese-error/the-way.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e845a243d3985c6399c2284687ccce5b3fb6d222aac698f9be8f7cd3b32ee15" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4494b131233473d0c65fbd5e3a47811f8f49e7759fc61a5274c33705d7091c4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9882113a96595af349dce6faaaaaf6bd207460c137dd9e85e4b8991e8c09910" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68b6cf14740cad218421c8ed87ddf071d04f139e2e746ad8e241a1af23af9cf8" + sha256 cellar: :any_skip_relocation, sonoma: "3ace9e79b695db8059908af5b68196e9da01251dfa8802c6ac592bb0fb4e4b0c" + sha256 cellar: :any_skip_relocation, ventura: "b4f03407e705be5dd0d40f7e5ae7388f172d1ee955dd667cc0d840e8e5d8240f" + sha256 cellar: :any_skip_relocation, arm64_linux: "845ef37713caf44d84308259c0e6c84be204d8dbab39ac2eeca81dc4061be11a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e13db7053f848a032d23750e6facfbf5cb9738bfdb0025786f4308f407455994" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"the-way", "complete") + end + + test do + assert_match version.to_s, shell_output("#{bin}/the-way --version") + + output = shell_output("#{bin}/the-way config default") + assert_match "db_dir = 'the_way_db'", output + + system bin/"the-way", "list" + end +end diff --git a/Formula/t/the_platinum_searcher.rb b/Formula/t/the_platinum_searcher.rb new file mode 100644 index 0000000000000..f49fb233803d3 --- /dev/null +++ b/Formula/t/the_platinum_searcher.rb @@ -0,0 +1,50 @@ +class ThePlatinumSearcher < Formula + desc "Multi-platform code-search similar to ack and ag" + homepage "https://github.com/monochromegane/the_platinum_searcher" + url "https://github.com/monochromegane/the_platinum_searcher/archive/refs/tags/v2.2.0.tar.gz" + sha256 "3d5412208644b13723b2b7ca4af0870d25c654e3a76feee846164c51b88240b0" + license "MIT" + head "https://github.com/monochromegane/the_platinum_searcher.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "83e283a230eb2226c0664d30e2bfceebf1e5cf42dbf4841bbdafc96cffd6307e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ba93995429038b3bc692cf512396e683d766b131a307e63afbbe913218b54c1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a410fe6377573632c20334478aa337d0c4c39660402881d31d356b6ce055e05d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d34acea6e7a4f0bfff85c75756c119ad978a11e72e2901f15e40a107cd1a8564" + sha256 cellar: :any_skip_relocation, arm64_monterey: "920eca3416a24f405f47f9422797e405768da23008de8ec12f3beb292e8b6be2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0f3097b2d88f4b8479ecb3e3439f6688656fc1c5e20f18a4c300edf9ea953874" + sha256 cellar: :any_skip_relocation, sonoma: "8651447550ab494a2cd70ebd3339f3d3d705606b2683f12dcb9722de69ff2d55" + sha256 cellar: :any_skip_relocation, ventura: "f2f494e7c9a055b112241f2a9d30b260f6aec006382337941c7bb6ea23c5ef74" + sha256 cellar: :any_skip_relocation, monterey: "b9f8d4628e265fe8cee61b17d40a0695316940d4805d84ee98de11abc6dc54fa" + sha256 cellar: :any_skip_relocation, big_sur: "63cc973af4c1fc612acb86c7a928f1680f84db7edfae52f374b95925c00761dc" + sha256 cellar: :any_skip_relocation, catalina: "79066cac44fd6cd21b8feadc9737045f98846832f15bd2a2e1fdaae3a8165e6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c21d15d5a6ac396326e399a183e29cac1ac75f71215f8052eba4acc021b0ab3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6ba21397a0538c990656c24ba157c5650ea62a26da823afdba238da37226d3b" + end + + depends_on "go" => :build + + conflicts_with "tcl-tk", because: "both install `pt` binaries" + + # Patch to remove godep dependency. Remove when this is merged into release: + # https://github.com/monochromegane/the_platinum_searcher/pull/211 + patch do + url "https://github.com/monochromegane/the_platinum_searcher/commit/763f368fe26fa44a12e1a37598185322aa30ba8f.patch?full_index=1" + sha256 "2ee0f53065663f22f3c44b30c5804e37b8cb49200a30c4513b9ef668441dd543" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"pt"), "./cmd/pt" + end + + test do + path = testpath/"hello_world.txt" + path.write "Hello World!" + + lines = shell_output("#{bin}/pt 'Hello World!' #{path}").strip.split(":") + assert_equal "Hello World!", lines[2] + end +end diff --git a/Formula/t/the_silver_searcher.rb b/Formula/t/the_silver_searcher.rb new file mode 100644 index 0000000000000..ee5270a135a05 --- /dev/null +++ b/Formula/t/the_silver_searcher.rb @@ -0,0 +1,48 @@ +class TheSilverSearcher < Formula + desc "Code-search similar to ack" + homepage "https://geoff.greer.fm/ag/" + url "https://github.com/ggreer/the_silver_searcher/archive/refs/tags/2.2.0.tar.gz" + sha256 "6a0a19ca5e73b2bef9481c29a508d2413ca1a0a9a5a6b1bd9bbd695a7626cbf9" + license "Apache-2.0" + head "https://github.com/ggreer/the_silver_searcher.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c9ef4b9e6cbcd7a5a0f2d489fe7b1c0c76384618ac42ff769783fe629de736fc" + sha256 cellar: :any, arm64_sequoia: "30781ad800cf0e58f863b36727ef2d78e8c2a84061a8e57cf6c269ab3a3e9594" + sha256 cellar: :any, arm64_sonoma: "fb4b711bc05b5c42950dffd4b21b867989524a9f8ee0ff91da42c09dbbf2fce2" + sha256 cellar: :any, arm64_ventura: "817b92ceac05e4860cdd5f7102289f55494359bb67c9fe4c8213d87b53261d7c" + sha256 cellar: :any, arm64_monterey: "b567416368a9b131cf32f2c81400327a059da194c6d95df7368aa039fac73dfb" + sha256 cellar: :any, arm64_big_sur: "a1fa06a9147b1138f884408f88557357e4a48330373f720ca428aac0f3333221" + sha256 cellar: :any, sonoma: "c4d42f4505baa908ab3f441a3f15d7ac91f1ff62d2f443522a0e802f1e4388d4" + sha256 cellar: :any, ventura: "75b86330b34c4d6326b44c3f22f3b8e7fb912889e0a3765e5ef805b0127764b3" + sha256 cellar: :any, monterey: "613ce2a96feead807bb675c2a72388fdfde47b1f7702031909fc558dc0faf11f" + sha256 cellar: :any, big_sur: "e0fe6360a649e3a9722d72d258a65a4ec449e76e82166c9d0fc48530e73e952e" + sha256 cellar: :any, catalina: "6fd80fdd0896dae09c01d3c9785ddd658bb5f2f229e7d011d3fbdde887bc35d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "42693255381ed7eddc6ea74405580a839969b17cf657b52916b664ed301c12d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08b2980ce1d36b89a1620934e9d513116bf2707396027d54a0096a088656228f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "pcre" + depends_on "xz" + + uses_from_macos "zlib" + + def install + ENV.append_to_cflags "-fcommon" if ENV.compiler.to_s.start_with?("gcc") + # Stable tarball does not include pre-generated configure script + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install", "bashcompdir=#{bash_completion}" + end + + test do + (testpath/"Hello.txt").write("Hello World!") + system bin/"ag", "Hello World!", testpath + end +end diff --git a/Formula/t/thefuck.rb b/Formula/t/thefuck.rb new file mode 100644 index 0000000000000..3e7b42918c7b0 --- /dev/null +++ b/Formula/t/thefuck.rb @@ -0,0 +1,136 @@ +class Thefuck < Formula + include Language::Python::Virtualenv + + desc "Programmatically correct mistyped console commands" + homepage "https://github.com/nvbn/thefuck" + url "https://files.pythonhosted.org/packages/ac/d0/0c256afd3ba1d05882154d16aa0685018f21c60a6769a496558da7d9d8f1/thefuck-3.32.tar.gz" + sha256 "976740b9aa536726fa23cadc9a10bf457e92e335901c61fcff9152c84485ac3d" + license "MIT" + head "https://github.com/nvbn/thefuck.git", branch: "master" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a8c8342968e5cb7addf06da5c3cb5216f5877d52e90e5a819f2146b999403aad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "34112fed6a5db846c5960cd7d185eb164144366e6ecbfefc1680646bee3e3dee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44ab5752da80809b23b1fff941c13a7a6d93f7c10d15e7f891e5a7d114e5fdcc" + sha256 cellar: :any_skip_relocation, sonoma: "059e916f07ed54e66733375ff6ca6c0343dc168f60cf9e0085ebe0e2461bea84" + sha256 cellar: :any_skip_relocation, arm64_linux: "520de6b7f2774d67b759b1ce0ac86a2af9cafe1884bd540fd19896e69e5dd2b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22117e74d1dda01753469bae6e149044017c175ca03564825a929400a1bc61f5" + end + + depends_on "python@3.14" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "pyte" do + url "https://files.pythonhosted.org/packages/ab/ab/b599762933eba04de7dc5b31ae083112a6c9a9db15b01d3109ad797559d9/pyte-0.8.2.tar.gz" + sha256 "5af970e843fa96a97149d64e170c984721f20e52227a2f57f0a54207f08f083f" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + # Drop distutils for 3.12: https://github.com/nvbn/thefuck/pull/1404 + patch do + url "https://github.com/nvbn/thefuck/commit/dd26fb91a0fdec42fc1990bb91eab21e2c44a0a8.patch?full_index=1" + sha256 "ea7824d7e4947fb9cd81ed1b5850b53b0e071a82b7e77acaba2391a8bf161b85" + end + + # Drop imp for 3.12: https://github.com/nvbn/thefuck/commit/0420442e778dd7bc53bdbdb50278eea2c207dc74 + patch :DATA + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + Add the following to your .bash_profile, .bashrc or .zshrc: + + eval $(thefuck --alias) + + For other shells, check https://github.com/nvbn/thefuck/wiki/Shell-aliases + EOS + end + + test do + ENV["THEFUCK_REQUIRE_CONFIRMATION"] = "false" + ENV["LC_ALL"] = "en_US.UTF-8" + + output = shell_output("#{bin}/thefuck --version 2>&1") + assert_match "The Fuck #{version} using Python", output + + output = shell_output("#{bin}/thefuck --alias") + assert_match "TF_ALIAS=fuck", output + + output = shell_output("#{bin}/thefuck echho ok") + assert_equal "echo ok", output.chomp + + output = shell_output("#{bin}/fuck") + assert_match "Seems like fuck alias isn't configured!", output + end +end + +__END__ +diff --git a/thefuck/conf.py b/thefuck/conf.py +index 27876ef47..611ec84b7 100644 +--- a/thefuck/conf.py ++++ b/thefuck/conf.py +@@ -1,4 +1,3 @@ +-from imp import load_source + import os + import sys + from warnings import warn +@@ -6,6 +5,17 @@ + from . import const + from .system import Path + ++try: ++ import importlib.util ++ ++ def load_source(name, pathname, _file=None): ++ module_spec = importlib.util.spec_from_file_location(name, pathname) ++ module = importlib.util.module_from_spec(module_spec) ++ module_spec.loader.exec_module(module) ++ return module ++except ImportError: ++ from imp import load_source ++ + + class Settings(dict): + def __getattr__(self, item): +diff --git a/thefuck/types.py b/thefuck/types.py +index 96e6ace67..b3b64c35d 100644 +--- a/thefuck/types.py ++++ b/thefuck/types.py +@@ -1,9 +1,8 @@ +-from imp import load_source + import os + import sys + from . import logs + from .shells import shell +-from .conf import settings ++from .conf import settings, load_source + from .const import DEFAULT_PRIORITY, ALL_ENABLED + from .exceptions import EmptyCommand + from .utils import get_alias, format_raw_script diff --git a/Formula/t/theharvester.rb b/Formula/t/theharvester.rb new file mode 100644 index 0000000000000..cb09b841da537 --- /dev/null +++ b/Formula/t/theharvester.rb @@ -0,0 +1,349 @@ +class Theharvester < Formula + include Language::Python::Virtualenv + + desc "Gather materials from public sources (for pen testers)" + homepage "https://www.edge-security.com" + url "https://github.com/laramies/theHarvester/archive/refs/tags/4.8.2.tar.gz" + sha256 "193611579f9a14507f2d7a0b2ecde778335b22fa0b6279898b5b5cd1f72439b1" + license "GPL-2.0-only" + head "https://github.com/laramies/theHarvester.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5a94e44dd2b39a1184cf83f4d033af7e88b683ed06427a13871733d739b22a5b" + sha256 cellar: :any, arm64_sequoia: "993ca4993464b2fccdda10492a4665530b7f0c05fa019688e8094eaf5ecaabb7" + sha256 cellar: :any, arm64_sonoma: "2ae58d0bbb213d540eca82d9777f4131ee821bcc642cf7c9c269f32bd1782b0a" + sha256 cellar: :any, sonoma: "54b608cfb3a7215f5b10dbc15739d2b10012d1234b58296ce55cfedde87d0983" + sha256 cellar: :any_skip_relocation, arm64_linux: "0036ca085a1637143a74449c675ae5801098465ba2bb807fb21a80ca3c3c9725" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68a2eba22a5c6d5f98e6c134804f670dec38dd19511e6798761f1937d774050d" + end + + depends_on "certifi" => :no_linkage + depends_on "cffi" + depends_on "libyaml" + depends_on "pydantic-core" + depends_on "python@3.14" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["cffi", "certifi", "pydantic-core"], + extra_packages: ["greenlet", "pyee"] + + # `uvloop` is manually updated to support Python 3.14, remove in next release + + # No sdist on PyPI, so we use the GitHub tarball + # Ref: https://github.com/microsoft/playwright-python/issues/2579 + resource "playwright" do + url "https://github.com/microsoft/playwright-python/archive/refs/tags/v1.55.0.tar.gz" + sha256 "adda41b4a6c02f414d535b7a0e03bc5f4c4f77fb3d4ef3028f8b609ca71f3613" + end + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/17/0a/163e5260cecc12de6abc259d158d9da3b8ec062ab863107dcdb1166cdcef/aiodns-3.5.0.tar.gz" + sha256 "11264edbab51896ecf546c18eb0dd56dff0428c6aa6d2cd87e643e07300eb310" + end + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/0b/03/a88171e277e8caa88a4c77808c20ebb04ba74cc4681bf1e9416c862de237/aiofiles-24.1.0.tar.gz" + sha256 "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/e6/0b/e39ad954107ebf213a2325038a3e7a506be3d98e1435e1f82086eec4cde2/aiohttp-3.12.14.tar.gz" + sha256 "6e06e120e34d93100de448fd941522e11dafa78ef1a893c179901b7d66aa29f2" + end + + resource "aiomultiprocess" do + url "https://files.pythonhosted.org/packages/02/d4/1e69e17dda5df91734b70d03dbbf9f222ddb438e1f3bf4ea8fa135ce46de/aiomultiprocess-0.9.1.tar.gz" + sha256 "f0231dbe0291e15325d7896ebeae0002d95a4f2675426ca05eb35f24c60e495b" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "aiosqlite" do + url "https://files.pythonhosted.org/packages/13/7d/8bca2bf9a247c2c5dfeec1d7a5f40db6518f88d314b8bca9da29670d2671/aiosqlite-0.21.0.tar.gz" + sha256 "131bb8056daa3bc875608c631c678cda73922a2d4ba8aec373b19f18c17e7aa3" + end + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz" + sha256 "62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "backoff" do + url "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz" + sha256 "03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + end + + resource "censys" do + url "https://files.pythonhosted.org/packages/f3/db/89a2a0709deeca690bee2bc77cb330c87f8bd2c41b7d8dfa2e5880048da6/censys-2.2.17.tar.gz" + sha256 "da07d8589fc98b8878eec5772d275d199dda89a3340ce69cd6ab2dc5567e887f" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "fastapi" do + url "https://files.pythonhosted.org/packages/78/d7/6c8b3bfe33eeffa208183ec037fee0cce9f7f024089ab1c5d12ef04bd27c/fastapi-0.116.1.tar.gz" + sha256 "ed52cbf946abfd70c5a0dccb24673f0670deeb517a88b3544d03c2a6bf283143" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/03/b8/704d753a5a45507a7aab61f18db9509302ed3d0a27ac7e0359ec2905b1a6/greenlet-3.2.4.tar.gz" + sha256 "0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "limits" do + url "https://files.pythonhosted.org/packages/bb/e5/c968d43a65128cd54fb685f257aafb90cd5e4e1c67d084a58f0e4cbed557/limits-5.6.0.tar.gz" + sha256 "807fac75755e73912e894fdd61e2838de574c5721876a19f7ab454ae1fffb4b5" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/c5/ed/60eb6fa2923602fba988d9ca7c5cdbd7cf25faa795162ed538b527a35411/lxml-6.0.0.tar.gz" + sha256 "032e65120339d44cdc3efc326c9f660f5f7205f3a535c1fdbf898b29ea01fb72" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "netaddr" do + url "https://files.pythonhosted.org/packages/54/90/188b2a69654f27b221fba92fda7217778208532c962509e959a9cee5229d/netaddr-1.3.0.tar.gz" + sha256 "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "pycares" do + url "https://files.pythonhosted.org/packages/8d/ad/9d1e96486d2eb5a2672c4d9a2dd372d015b8d7a332c6ac2722c4c8e6bbbf/pycares-4.11.0.tar.gz" + sha256 "c863d9003ca0ce7df26429007859afd2a621d3276ed9fef154a9123db9252557" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pyee" do + url "https://files.pythonhosted.org/packages/95/03/1fd98d5841cd7964a27d729ccf2199602fe05eb7a405c1462eb7277945ed/pyee-13.0.0.tar.gz" + sha256 "b391e3c5a434d1f5118a25615001dbc8f669cf410ab67d04c4d4e07c55481c37" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz" + sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/3c/f8/5dc70102e4d337063452c82e1f0d95e39abfe67aa222ed8a5ddeb9df8de8/requests_file-3.0.1.tar.gz" + sha256 "f14243d7796c588f3521bd423c5dea2ee4cc730e54a3cac9574d78aca1272576" + end + + resource "retrying" do + url "https://files.pythonhosted.org/packages/4e/e5/986cabb44cc073a8bf50c3d8d4c85514c6741fff78ebf853a0ebcd441a97/retrying-1.4.0.tar.gz" + sha256 "efa99c78bf4fbdbe6f0cba4101470fbc684b93d30ca45ffa1288443a9805172f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shodan" do + url "https://files.pythonhosted.org/packages/c5/06/c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28/shodan-1.31.0.tar.gz" + sha256 "c73275386ea02390e196c35c660706a28dd4d537c5a21eb387ab6236fac251f6" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "slowapi" do + url "https://files.pythonhosted.org/packages/a0/99/adfc7f94ca024736f061257d39118e1542bade7a52e86415a4c4ae92d8ff/slowapi-0.1.9.tar.gz" + sha256 "639192d0f1ca01b1c6d95bf6c71d794c3a9ee189855337b4821f7f457dddad77" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/15/b9/cc3017f9a9c9b6e27c5106cc10cc7904653c3eec0729793aec10479dd669/starlette-0.47.3.tar.gz" + sha256 "6bc94f839cc176c4858894f1f8908f0ab79dfec1a6b8402f6da9be26ebea52e9" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "ujson" do + url "https://files.pythonhosted.org/packages/f0/00/3110fd566786bfa542adb7932d62035e0c0ef662a8ff6544b6643b3d6fd7/ujson-5.10.0.tar.gz" + sha256 "b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/5e/42/e0e305207bb88c6b8d3061399c6a961ffe5fbb7e2aa63c9234df7259e9cd/uvicorn-0.35.0.tar.gz" + sha256 "bc662f087f7cf2ce11a1d7fd70b90c9f98ef2e2831556dd078d131b96cc94a01" + end + + resource "uvloop" do + url "https://files.pythonhosted.org/packages/06/f0/18d39dbd1971d6d62c4629cc7fa67f74821b0dc1f5a77af43719de7936a7/uvloop-0.22.1.tar.gz" + sha256 "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz" + sha256 "f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/46/2c/c06ef49dc36e7954e55b802a8b231770d286a9758b3d936bd1e04ce5ba88/xlsxwriter-3.2.9.tar.gz" + sha256 "254b1c37a368c444eac6e2f867405cc9e461b0ed97a3233b2ac1e574efb4140c" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PLAYWRIGHT"] = resource("playwright").version + virtualenv_install_with_resources + bin.install_symlink libexec/"bin/theHarvester" => "theharvester" + end + + test do + output = shell_output("#{bin}/theharvester -d brew.sh --limit 1 --source urlscan 2>&1") + assert_match "docs.brew.sh", output + assert_match "formulae.brew.sh", output + end +end diff --git a/Formula/t/theora.rb b/Formula/t/theora.rb new file mode 100644 index 0000000000000..907d07cc258d5 --- /dev/null +++ b/Formula/t/theora.rb @@ -0,0 +1,65 @@ +class Theora < Formula + desc "Open video compression format" + homepage "https://www.theora.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-1.2.0.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/theora/libtheora-1.2.0.tar.gz" + sha256 "279327339903b544c28a92aeada7d0dcfd0397b59c2f368cc698ac56f515906e" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/theora/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)libtheora[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b611f6607b0d916bd49ec4b88113cd230d7c0199865b287e75b1ae769bae64b0" + sha256 cellar: :any, arm64_sequoia: "0474983a6d3f2982c2b34586f12c58d5363ed4e67e6642686d295a4c62533d6e" + sha256 cellar: :any, arm64_sonoma: "878dc139277240e36ce8c46ed65d869f16fc3386d1f1f89206f897a1a96b199b" + sha256 cellar: :any, arm64_ventura: "38881010b87d59c0e6fc985c48dd607a3a78f18f58ae6a91ba17d0f80bb89a5b" + sha256 cellar: :any, sonoma: "094215d640402c7f3730447fa4dcc8335cfbc92f759bb426335fc2ba08feaf1f" + sha256 cellar: :any, ventura: "7b1efa69f2e6a7efbbd0bbe5b5127992816b2d680980ea4cf8c3d8050bca3cf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "54226528eb3fc0bad9b016d49bec5b58ce076253a256dddb19e5c18829948c11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0ef196a720cc37055ba91062862548c6325398fefe3e94ea3b540f8db8eb4c7" + end + + head do + url "https://gitlab.xiph.org/xiph/theora.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libogg" + depends_on "libvorbis" + + def install + system "./autogen.sh" if build.head? + + args = %w[ + --disable-oggtest + --disable-vorbistest + --disable-examples + ] + args << "--disable-asm" if build.head? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + theora_info inf; + theora_info_init(&inf); + theora_info_clear(&inf); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ltheora", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/thors-mongo.rb b/Formula/t/thors-mongo.rb new file mode 100644 index 0000000000000..0ac5f54519b92 --- /dev/null +++ b/Formula/t/thors-mongo.rb @@ -0,0 +1,83 @@ +class ThorsMongo < Formula + desc "Mongo API and Serialization library" + homepage "https://github.com/Loki-Astari/ThorsMongo" + url "https://github.com/Loki-Astari/ThorsMongo.git", + tag: "6.0.06", + revision: "9ff64c7f7d52415a9f09d764078a9d2b29b06f16" + license "GPL-3.0-only" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "eb4b075302bd83e81f8035e2c7a581bc4bf48f0593364f68b1d703170b53d9f6" + sha256 cellar: :any, arm64_sequoia: "df22574c3d8d42c2acd7545936aac68e10fb01a62d468e8a37737fdf29d0d61e" + sha256 cellar: :any, arm64_sonoma: "ba80135aa78d5bbd0bd423da47424b2f2ecf57321971e20574c91e92ea9bc299" + sha256 cellar: :any, arm64_ventura: "45f3b9efe0946ceb9b65e733276324e0627dee6935c6de01a754db430fc74ef7" + sha256 cellar: :any, sonoma: "685f7324a917a8a8c535483572c45fdb40324be940c5ac3347792df6f43898c9" + sha256 cellar: :any, ventura: "5f2ef80e0b25ca4b261d310ce1f4e3d555024c9681e445dc6881575f55de48e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fdff2c40dd5efb489fad7025d5e026a9dc69163bfbb5fb0ff938a7ad1410b40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e075ff4433d7bfe5d4a31dc004ca0a3243e8de78d7046866174d493d90d57118" + end + + depends_on "libyaml" + depends_on "magic_enum" + depends_on "openssl@3" + depends_on "snappy" + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + ENV["COV"] = "gcov" + # Workaround for failure when building with Xcode std::from_chars + # src/Serialize/./StringInput.h:104:27: error: call to deleted function 'from_chars' + ENV.append_to_cflags "-DNO_STD_SUPPORT_FROM_CHAR_DOUBLE=1" if DevelopmentTools.clang_build_version == 1700 + + system "./brew/init" + system "./configure", "--disable-vera", + "--disable-test-with-integration", + "--disable-test-with-mongo-query", + "--disable-Mongo-Service", + *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "ThorSerialize/JsonThor.h" + #include "ThorSerialize/SerUtil.h" + #include + #include + #include + + struct HomeBrewBlock + { + std::string key; + int code; + }; + ThorsAnvil_MakeTrait(HomeBrewBlock, key, code); + + int main() + { + using ThorsAnvil::Serialize::jsonImporter; + using ThorsAnvil::Serialize::jsonExporter; + + std::stringstream inputData(R"({"key":"XYZ","code":37373})"); + + HomeBrewBlock object; + inputData >> jsonImporter(object); + + if (object.key != "XYZ" || object.code != 37373) { + std::cerr << "Fail"; + return 1; + } + std::cerr << "OK"; + return 0; + } + CPP + system ENV.cxx, "-std=c++20", "test.cpp", "-o", "test", + "-I#{include}", "-L#{lib}", "-lThorSerialize", "-lThorsLogging", "-ldl" + system "./test" + end +end diff --git a/Formula/t/thrax.rb b/Formula/t/thrax.rb new file mode 100644 index 0000000000000..aa12db5175af5 --- /dev/null +++ b/Formula/t/thrax.rb @@ -0,0 +1,49 @@ +class Thrax < Formula + include Language::Python::Shebang + + desc "Tools for compiling grammars into finite state transducers" + homepage "https://www.openfst.org/twiki/bin/view/GRM/Thrax" + url "https://www.openfst.org/twiki/pub/GRM/ThraxDownload/thrax-1.3.10.tar.gz" + mirror "http://206.196.111.47/twiki/pub/GRM/ThraxDownload/thrax-1.3.10.tar.gz" + sha256 "78dedada58a0a8543b4ea90c77a36783ac82495cf5456bec5d83baafac74b764" + license "Apache-2.0" + + livecheck do + url "https://www.openfst.org/twiki/bin/view/GRM/ThraxDownload" + regex(/href=.*?thrax[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "d21f145cc76bc57df426ef5693cc37018225c6756254a40f78a1e65a3de1f3f8" + sha256 cellar: :any, arm64_sequoia: "1d006e65d56ae1d4828fec2513300a9c6593a39930fd787a922c67e6f361ac0a" + sha256 cellar: :any, arm64_sonoma: "da461f0ee541bae3f2801f9db92cb334227fb8f8ff3d1db35f572e0d43493733" + sha256 cellar: :any, sonoma: "856ef28235ec1772a3b695f448fae21b7b9f65077b947555cd5e6c0ab006c174" + end + + # Regenerate `configure` to avoid `-flat_namespace` bug. + # None of our usual patches apply. + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + depends_on :macos + depends_on "openfst" + uses_from_macos "python" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"thraxmakedep" + end + + test do + # see https://www.openfst.org/twiki/bin/view/GRM/ThraxQuickTour + cp_r pkgshare/"grammars", testpath + cd "grammars" do + system bin/"thraxmakedep", "example.grm" + system "make" + system bin/"thraxrandom-generator", "--far=example.far", "--rule=TOKENIZER" + end + end +end diff --git a/Formula/t/threadweaver.rb b/Formula/t/threadweaver.rb new file mode 100644 index 0000000000000..913a2ac39f03f --- /dev/null +++ b/Formula/t/threadweaver.rb @@ -0,0 +1,57 @@ +class Threadweaver < Formula + desc "Helper for multithreaded programming" + homepage "https://api.kde.org/threadweaver-index.html" + url "https://download.kde.org/stable/frameworks/6.19/threadweaver-6.19.0.tar.xz" + sha256 "d8d4d0b6e62b067a8ce4fed7aefeed02ed43a43f97f085db3baedf9210070da1" + license "LGPL-2.0-or-later" + head "https://invent.kde.org/frameworks/threadweaver.git", branch: "master" + + livecheck do + url "https://download.kde.org/stable/frameworks/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e57f4a57723719a3b510db93fef405319571a429650c15c2fd2f29e0afcafe3b" + sha256 cellar: :any, arm64_sequoia: "4053492538da7320c29d2cae3227b32181e42197d71b2f180d33e3cabd4ffe30" + sha256 cellar: :any, arm64_sonoma: "205c22f35dcfb6d0825ddbbbd016d00d4fce6bde3645f7a30d18bcbc6fe4c77c" + sha256 cellar: :any, sonoma: "15f7854ad687e5c0d62f3af8c027ba321477d0ac3da56fc1d72f8a7c769d2618" + sha256 cellar: :any_skip_relocation, arm64_linux: "4bcaff3f5092ac0183ff7d8bb3831991a7829f88e54bf58482515b0f71ea7d10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8d5074305d348f64cd2e5c605d35a158acf8fd7cd322a63acd6c82f9f945263" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "extra-cmake-modules" => [:build, :test] + depends_on "qttools" => :build + depends_on "qtbase" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_QCH=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples" + end + + test do + cp_r (pkgshare/"examples/HelloWorld").children, testpath + + kf = "KF#{version.major}" + (testpath/"CMakeLists.txt").unlink + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(HelloWorld LANGUAGES CXX) + find_package(ECM REQUIRED NO_MODULE) + find_package(#{kf}ThreadWeaver REQUIRED NO_MODULE) + add_executable(ThreadWeaver_HelloWorld HelloWorld.cpp) + target_link_libraries(ThreadWeaver_HelloWorld #{kf}::ThreadWeaver) + CMAKE + + system "cmake", "-S", ".", "-B", ".", *std_cmake_args + system "cmake", "--build", "." + + ENV["LC_ALL"] = "en_US.UTF-8" + assert_equal "Hello World!", shell_output("./ThreadWeaver_HelloWorld 2>&1").strip + end +end diff --git a/Formula/t/threatcl.rb b/Formula/t/threatcl.rb new file mode 100644 index 0000000000000..e064052860e4a --- /dev/null +++ b/Formula/t/threatcl.rb @@ -0,0 +1,37 @@ +class Threatcl < Formula + desc "Documenting your Threat Models with HCL" + homepage "https://github.com/threatcl/threatcl" + url "https://github.com/threatcl/threatcl/archive/refs/tags/v0.2.6.tar.gz" + sha256 "b0cfd7bc212f29e1af190e6595912378926fd64befdc26e04b4739270c668601" + license "MIT" + head "https://github.com/threatcl/threatcl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "913e3bb7456c04dcbbadcbc54e8ba407dd1f8db772fe144401872df66b7241b6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cdbf60d8445b7f5067148a824ca1f70a4e138d87d872bafb48ccab7c4dadec08" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0bc55fcfeb23137d9e707c03e3154df54a9b2ccf9255b01ca85f211a496d8bc" + sha256 cellar: :any_skip_relocation, sonoma: "e361d834120621ae309afd3e327b271171a29a8cb7d4f54f26a9fed46b9db55e" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7753153529db7a90229f85b9c753d2189456aa7f916e7409afe8dae577ac951" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfae3b835a89033df0b5cfd9da2da82638403c8089690cf49c6aa84d0f083a09" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" + + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/threatcl" + + pkgshare.install "examples" + end + + test do + cp_r pkgshare/"examples", testpath + system bin/"threatcl", "list", "examples" + + output = shell_output("#{bin}/threatcl validate #{testpath}/examples") + assert_match "[threatmodel: Modelly model]", output + + assert_match version.to_s, shell_output("#{bin}/threatcl --version 2>&1") + end +end diff --git a/Formula/t/three-body.rb b/Formula/t/three-body.rb new file mode 100644 index 0000000000000..48690b4abadec --- /dev/null +++ b/Formula/t/three-body.rb @@ -0,0 +1,53 @@ +class ThreeBody < Formula + desc "三体编程语言 Three Body Language written in Rust" + homepage "https://github.com/rustq/3body-lang" + url "https://github.com/rustq/3body-lang/archive/refs/tags/0.6.5.tar.gz" + sha256 "e6c4c4039f868fce6c08adfe5852dfe15d2564ac8b9033e60bd0e098c5c5df5e" + license "MIT" + head "https://github.com/rustq/3body-lang.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "80eaf013ad1372dff0e75a304e1a699669d19bed0d5eb9eaca11dc0563e647e7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b14b79b6374be096bc29c9e9f25a429c9330d1bbf42bb7228a5df22b038ccce4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17906f40f4a7908537f9c3a96653a588c31d0b420bb10c7c3f98ab1a0b2a3020" + sha256 cellar: :any_skip_relocation, arm64_ventura: "393d8bf1e63c5818b19ffc7fddc4ed4d19fc6f727852e14a7f3406c6a2b995b5" + sha256 cellar: :any_skip_relocation, sonoma: "0ea9365c8fb00a4cc63a309c4316bfb1b5978ea35505e0e3dcc7e8f4e3b62e7b" + sha256 cellar: :any_skip_relocation, ventura: "3a011425102efc7f388625413dcb9456fdb494ce9f9e19c3da548ef6637977fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "c251fd07b1525f4cfa75465cc9dacad96dd2c5f0343ec9b4ccca6167c9f28d00" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8ed8e8bf645ee93eef6d9ea9566286f8ecd54d46ebae8f2b854574edda7721e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_equal "\"文明\"", shell_output("#{bin}/3body -c '给 岁月 以 \"文明\"; 岁月'").strip + assert_equal "\"生命\"", shell_output("#{bin}/3body -c '给 时光 以 \"生命\"; 时光'").strip + assert_equal "Error(Can not assign to constant variable 水!)", shell_output("#{bin}/3body -c ' + 思想钢印 水 = \"剧毒的\"; + 水 = \"?\"'").strip + assert_equal "4", shell_output("#{bin}/3body -c '给 自然选择 以 0; 自然选择 前进 4'").strip + assert_equal "3", shell_output("#{bin}/3body -c '给 宇宙 以 { \"维度\": 10 }; 宇宙.维度 降维 7'").strip + assert_equal "true", shell_output("#{bin}/3body -c '这是计划的一部分'").strip + assert_equal "false", shell_output("#{bin}/3body -c '主不在乎'").strip + assert_equal "3", shell_output("#{bin}/3body -c ' + 给 水滴 以 法则() { + 给 响 = 0; + return 法则() { + 响 = 响 + 1; 响 + } + }; + 给 撞 = 水滴(); + 撞(); + 撞(); + 撞()'").strip + assert_equal "\"半人马星系\"", shell_output("#{bin}/3body -c '给 三体世界坐标 以 \"半人马星系\"; 广播(三体世界坐标);'").strip + assert_empty shell_output("#{bin}/3body -c '冬眠(1000); 二向箔清理(); 毁灭();'").strip + assert_equal "[builtin function]", shell_output("#{bin}/3body -c '程心'").strip + end +end diff --git a/Formula/t/threemux.rb b/Formula/t/threemux.rb new file mode 100644 index 0000000000000..54bdb62c93f3c --- /dev/null +++ b/Formula/t/threemux.rb @@ -0,0 +1,43 @@ +class Threemux < Formula + desc "Terminal multiplexer inspired by i3" + homepage "https://github.com/aaronjanse/3mux" + url "https://github.com/aaronjanse/3mux/archive/refs/tags/v1.1.0.tar.gz" + sha256 "0f4dae181914c73eaa91bdb21ee0875f21b5da64c7c9d478f6d52a2d0aa2c0ea" + license "MIT" + head "https://github.com/aaronjanse/3mux.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "21124333bddcbd848413f1f91b1277a848777555165c7f649518236370c237de" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d8d3f42362a72fe5ef6390d24223c572b596d234c590d7dcd51129678f6aae5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "358ebf92a4d1ccf5844e2b21c3918d4fdc0344f3d5aea110b170e2c5244bd438" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cef0aa7766c9cf4045c403ae53f20fa8fcb4913c80148b01755b4a4da7449d8e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "471a6870e6b9d45e994d2977c855e0aea4ed22b1f59f0d09afaf4d096edd0e2c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2d3dd3465938d0ac5b845b07689a08b667613210d9d58649c9a152ade32dc347" + sha256 cellar: :any_skip_relocation, sonoma: "fa0adac1469fbe07b01febde46412e9f4d182a5d891c7816b788f1264fc53d06" + sha256 cellar: :any_skip_relocation, ventura: "2ca8026a1a322986b2ad2697314f37faf58634c0de2ca4722cfbe194c05006d8" + sha256 cellar: :any_skip_relocation, monterey: "64497230017e4e033cbafc7ae8f684e5ff77c1a8af3ec153f715269d5f4dab01" + sha256 cellar: :any_skip_relocation, big_sur: "c87ed9904dccc4872aa6c8ed0e6de39bc7f3ccdb5fa7fef1b99e45871d85da18" + sha256 cellar: :any_skip_relocation, catalina: "8071788129cb66bd2e7c6fe9f877a56fe2807b70204747a858a4e68a650a07b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "33160e89fe6932ee113b37f9a8799cb2348d8713a8bf3f7220ac06871707ce69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33200f3fd9175837129386fdfa67575eebacc806d9da099d98b0888aaff56124" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"3mux") + end + + test do + require "open3" + + Open3.popen2e(bin/"3mux") do |stdin, _, _| + stdin.write "brew\n" + stdin.write "3mux detach\n" + end + + assert_match "Sessions:", pipe_output("#{bin}/3mux ls") + end +end diff --git a/Formula/t/thrift.rb b/Formula/t/thrift.rb new file mode 100644 index 0000000000000..25eb2ea700401 --- /dev/null +++ b/Formula/t/thrift.rb @@ -0,0 +1,100 @@ +class Thrift < Formula + desc "Framework for scalable cross-language services development" + homepage "https://thrift.apache.org/" + license "Apache-2.0" + + stable do + url "https://www.apache.org/dyn/closer.lua?path=thrift/0.22.0/thrift-0.22.0.tar.gz" + mirror "https://archive.apache.org/dist/thrift/0.22.0/thrift-0.22.0.tar.gz" + sha256 "794a0e455787960d9f27ab92c38e34da27e8deeda7a5db0e59dc64a00df8a1e5" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "42608a22cdba8bc0100f0d60f78359ea3d9a2baaec1eadf236a05f5362c9b87f" + sha256 cellar: :any, arm64_sequoia: "70c48b3b34e4aa0908129c427ee8c0da57a052180692f01c6afb468cc1e1392b" + sha256 cellar: :any, arm64_sonoma: "a8bd60c98ef9c6a987391251b619506453bc60fa81f8a8d419e8732c01c540df" + sha256 cellar: :any, arm64_ventura: "54a0bf02668741b09c8e3859d25cf4f3228bb3259a93aa1e82ce39c447de8946" + sha256 cellar: :any, sonoma: "f4173a0bc4fe8a05a14c8d33bdcf5e2364965f4138ee0c58b9627dad43b3ba2a" + sha256 cellar: :any, ventura: "d6d6745b54e308233d5e85e98887ffa7029785535c7861cd48cd22ccf2a6adf6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2346bc45c0a02792c5dc16144571f15842fac8f95840e6c9a0d7a9de7da3859c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32a0c481912313d3b116a70687b97318473645131958ce443ddba3668cd394c9" + end + + head do + url "https://github.com/apache/thrift.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + end + + depends_on "bison" => :build + depends_on "boost" => [:build, :test] + depends_on "openssl@3" + uses_from_macos "zlib" + + def install + system "./bootstrap.sh" unless build.stable? + + args = %W[ + --disable-debug + --disable-tests + --prefix=#{prefix} + --libdir=#{lib} + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --without-java + --without-kotlin + --without-python + --without-py3 + --without-ruby + --without-haxe + --without-netstd + --without-perl + --without-php + --without-php_extension + --without-dart + --without-erlang + --without-go + --without-d + --without-nodejs + --without-nodets + --without-lua + --without-rs + --without-swift + ] + + ENV.cxx11 if ENV.compiler == :clang + + # Don't install extensions to /usr: + ENV["PY_PREFIX"] = prefix + ENV["PHP_PREFIX"] = prefix + ENV["JAVA_PREFIX"] = buildpath + + system "./configure", *args + ENV.deparallelize + system "make" + system "make", "install" + end + + test do + (testpath/"test.thrift").write <<~THRIFT + service MultiplicationService { + i32 multiply(1:i32 x, 2:i32 y), + } + THRIFT + + system bin/"thrift", "-r", "--gen", "cpp", "test.thrift" + + system ENV.cxx, "-std=c++11", "gen-cpp/MultiplicationService.cpp", + "gen-cpp/MultiplicationService_server.skeleton.cpp", + "-I#{include}/include", + "-L#{lib}", "-lthrift" + end +end diff --git a/Formula/t/thriftgo.rb b/Formula/t/thriftgo.rb new file mode 100644 index 0000000000000..9da3fb88d44f3 --- /dev/null +++ b/Formula/t/thriftgo.rb @@ -0,0 +1,45 @@ +class Thriftgo < Formula + desc "Implementation of thrift compiler in go language with plugin mechanism" + homepage "https://github.com/cloudwego/thriftgo" + url "https://github.com/cloudwego/thriftgo/archive/refs/tags/v0.4.3.tar.gz" + sha256 "d705854e766e8bc89e2ef44385d00810938fcba22686d417d93c8f83a07fe3ce" + license "Apache-2.0" + head "https://github.com/cloudwego/thriftgo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5cb46a98965f84e1857d0ae5395d532e3cbdef428e03e39a60ba40bf75fb48ba" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cb46a98965f84e1857d0ae5395d532e3cbdef428e03e39a60ba40bf75fb48ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cb46a98965f84e1857d0ae5395d532e3cbdef428e03e39a60ba40bf75fb48ba" + sha256 cellar: :any_skip_relocation, sonoma: "132fa03cdcc0762f6df66d48116df589207f914fcdeb207e27ec8ae8852f0ab9" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf9b14ced5844d920c396b4545bb0f41a9a065ced28314d3fc1f26b988a79df3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c769a0df181ec44dff7f01ce065f5f32370671d478626344fc615bb337bc099" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/thriftgo --version 2>&1") + assert_match "thriftgo #{version}", output + + thriftfile = testpath/"test.thrift" + thriftfile.write <<~THRIFT + namespace go api + struct Request { + 1: string message + } + struct Response { + 1: string message + } + service Hello { + Response echo(1: Request req) + } + THRIFT + system bin/"thriftgo", "-o=.", "-g=go", "test.thrift" + assert_path_exists testpath/"api"/"test.go" + refute_predicate (testpath/"api"/"test.go").size, :zero? + end +end diff --git a/Formula/t/thrulay.rb b/Formula/t/thrulay.rb new file mode 100644 index 0000000000000..b0d2ddb0d74af --- /dev/null +++ b/Formula/t/thrulay.rb @@ -0,0 +1,45 @@ +class Thrulay < Formula + desc "Measure performance of a network" + homepage "https://sourceforge.net/projects/thrulay/" + url "https://downloads.sourceforge.net/project/thrulay/thrulay/0.9/thrulay-0.9.tar.gz" + sha256 "373d5613dfe371f6b4f48fc853f6c27701b2981ba4100388c9881cb802d1780d" + # Similar to BSD-3-Clause-LBNL (i.e. BSD-3-Clause with an additional default + # contribution licensing clause) but different phrasing from the SPDX license + license :cannot_represent + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "eb92cf4715801f5889b767248ee53ccc473da2803c836e00651846de45dd2c38" + sha256 cellar: :any, arm64_sequoia: "8980e64ea2ecc17ba2e111d4798a39c7789fc1b0009c2f0ae5664b0fcff8603f" + sha256 cellar: :any, arm64_sonoma: "d26583fd1ddd768813b4b89c02d46862821e356bf6c009cd1ecf985363ab4317" + sha256 cellar: :any, arm64_ventura: "bfbbc0ce92dbcfda1209154db22b59916f996348b77bf8421a4c70a6b5bcbba1" + sha256 cellar: :any, arm64_monterey: "d9520dcaf88a54de7a0cbab36185a133a20b003332ae0e9b7bc6abde9fd10da2" + sha256 cellar: :any, arm64_big_sur: "70bb8243a69fe2432baba1ca86f440d607e3e87811d62d70e025c3b095999228" + sha256 cellar: :any, sonoma: "8c5239b3206e4eed48cb5cc35a87eb9e7305dc773245b0ec7e912b04e3d8f9d2" + sha256 cellar: :any, ventura: "77520bf722d669ecc5db10c8d245b1db3969935242d791df066f4cfa0be689bf" + sha256 cellar: :any, monterey: "130e94a8ba3c605f200d818f1d3cac45223d8f53837f39d1a5f03d48177bad35" + sha256 cellar: :any, big_sur: "ad146242acc5078690b249d86fa2336adbc93a47543138c9e9c383a1b4a18460" + sha256 cellar: :any, catalina: "fa6da453412e97cf222c12f7c2aaa7ef3e2db5d58dc98538c364b377ece63c62" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbfc443848749b0d2cee05c74f2c27a8d734cad7c274c86b0d97b3081ddf8a61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66cdfd861122990076cd447dea49124c4cf5a1629c3ca1a3540b98a12c19fb87" + end + + def install + # Fix flat namespace usage + inreplace "configure", "${wl}-flat_namespace ${wl}-undefined ${wl}suppress", "${wl}-undefined ${wl}dynamic_lookup" + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + ENV.deparallelize + system "make", "install" + end + + test do + # prints "thrulay/2 (client part) release 0.9rc1" + system bin/"thrulay", "-V" + end +end diff --git a/Formula/t/tidy-html5.rb b/Formula/t/tidy-html5.rb new file mode 100644 index 0000000000000..9de36d00806d4 --- /dev/null +++ b/Formula/t/tidy-html5.rb @@ -0,0 +1,48 @@ +class TidyHtml5 < Formula + desc "Granddaddy of HTML tools, with support for modern standards" + homepage "https://www.html-tidy.org/" + url "https://github.com/htacg/tidy-html5/archive/refs/tags/5.8.0.tar.gz" + sha256 "59c86d5b2e452f63c5cdb29c866a12a4c55b1741d7025cf2f3ce0cde99b0660e" + license "Zlib" + head "https://github.com/htacg/tidy-html5.git", branch: "next" + + livecheck do + url :stable + regex(/^v?(\d+\.\d*?[02468](?:\.\d+)*)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "613a88aa2c9aac81af122ec9ee6e2278788e1b5c4398f1139b123555390adcdd" + sha256 cellar: :any, arm64_sequoia: "570d2482168cd8be11bb433f743f934bf7797a952863cd282230111b5de15a73" + sha256 cellar: :any, arm64_sonoma: "42f788763482699cc7ead38ace15bce63e075ee20c070bbb74db279002d66af6" + sha256 cellar: :any, arm64_ventura: "25de41a82adac06447528f20ebe466530708c86a7440c6d9f3dd122df90e5684" + sha256 cellar: :any, arm64_monterey: "15f70f84c933bc11475f62c0cda4e1ccc72e5786bdbd64da76249fbfb35be8e5" + sha256 cellar: :any, arm64_big_sur: "de46584bc851655bae8d839b27b4423f8309e0c8de3923deb5be554a57617f45" + sha256 cellar: :any, sonoma: "dbae8d55a2a35e2245dea6ff6180eac37973514342d4a3895a82a5f43752972a" + sha256 cellar: :any, ventura: "254a9044ebeb9ac00b4c45fa1df1513ab9f912acbcd82e2bf5afc31c8bb71245" + sha256 cellar: :any, monterey: "eb97c832fbe63a48464dee4dbef7a9e370906360dc36cd664af6a6abe738faec" + sha256 cellar: :any, big_sur: "9127cf10347816285db70f0ec794a08433e44426f9f4320d5fecedbdcfb15e2b" + sha256 cellar: :any, catalina: "fe486f6a2455b7c59eac3ba8a5e4b2e1a6ff49bb6440465d9470013a23a5fe0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff4664d175a951b8e595d017608fcf0981cb95cbba3c094fc8366ea1b1f9cd05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f80a0abaed47dfa224213a413fbe6f23d1a538cf4bfeb633296f5e7e465fb2d" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4.0+ + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + system "cmake", "-S", ".", "-B", "builddir", *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + output = pipe_output("#{bin}/tidy -q", "") + assert_match(/^/, output) + assert_match "HTML Tidy for HTML5", output + end +end diff --git a/Formula/t/tidy-viewer.rb b/Formula/t/tidy-viewer.rb new file mode 100644 index 0000000000000..b735ff1bd2f63 --- /dev/null +++ b/Formula/t/tidy-viewer.rb @@ -0,0 +1,39 @@ +class TidyViewer < Formula + desc "CLI csv pretty printer" + homepage "https://github.com/alexhallam/tv" + url "https://github.com/alexhallam/tv/archive/refs/tags/1.8.93.tar.gz" + sha256 "e99811843fe3e28d22c82f6c8ad757bf5065c622fbbb2d7e4011ab346dca6f1d" + license "Unlicense" + + # Some tagged versions using a stable version format are marked as + # "pre-release" on GitHub, so it's necessary to check releases. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7673c3682c0550e667dbf4a64e46262bfa5952a8f6d2cda5de6016f2abce527e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59e5edc1187a4fddb10592384f491b0199410c3d0cd9876a50e31e1cfed74139" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63a15fd1cf49c717544e9c4d67d225032c96e335487e91f61a280220ae277214" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9234b7369f9fb91d430b4f109108129349e9c577ecee6225c3919cba256f08d" + sha256 cellar: :any_skip_relocation, sonoma: "7063ec566328d464dbf16495cb34b804cae5bd69a3022fe707e68f8a3b3a94c0" + sha256 cellar: :any_skip_relocation, ventura: "cc554f92a73722ed202bca0a40da4998726c4909acfcd1833fa86b3df146adf6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3e4c1abf58e2202e189964db71b04df20fc4f42b1d9c4ba26499057328165da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe2877bb0b8093eb42716de3339a76afe78a6f2f83bc98540e6f8aecbda4af73" + end + + depends_on "rust" => :build + + conflicts_with "television", because: "both install `tv` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "tidy-viewer-cli") + bin.install_symlink "tidy-viewer" => "tv" + end + + test do + (testpath/"test.csv").write("first header,second header") + assert_match "first header", shell_output("#{bin}/tv #{testpath}/test.csv") + end +end diff --git a/Formula/t/tiff2png.rb b/Formula/t/tiff2png.rb new file mode 100644 index 0000000000000..354024a36cb87 --- /dev/null +++ b/Formula/t/tiff2png.rb @@ -0,0 +1,38 @@ +class Tiff2png < Formula + desc "TIFF to PNG converter" + homepage "http://www.libpng.org/pub/png/apps/tiff2png.html" + url "https://github.com/rillian/tiff2png/archive/refs/tags/v0.92.tar.gz" + sha256 "64e746560b775c3bd90f53f1b9e482f793d80ea6e7f5d90ce92645fd1cd27e4a" + license "ISC" + revision 3 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5f6897931983716f6fe5d478b09f57bca507eb1cccce61b78dfca5bc8722d683" + sha256 cellar: :any, arm64_sequoia: "d8e03677d759133baf47f323bb3ca630c65cc7c66e53809ae8cb2458ea6e65c5" + sha256 cellar: :any, arm64_sonoma: "02a4646315bc8a2391938a856635056e7b64b372b6c2607960911eb772229bf1" + sha256 cellar: :any, arm64_ventura: "cb4f278f194339e85a3e75b701c29e471b718760ad14bb10580bb546a3314e89" + sha256 cellar: :any, arm64_monterey: "0ae6b6e42ee87ba89102282f21f1b7e4bbe98ded275f363a91e47ec9f0ec3cb2" + sha256 cellar: :any, arm64_big_sur: "3df140d14c8a0c8247e1157ddb05ff9e5249b7115e26871c0eb498b43eccc180" + sha256 cellar: :any, sonoma: "4585533c56cded0abce37fda111fb2154d3c8b77cac407f6e4e85c243e8bc129" + sha256 cellar: :any, ventura: "77ab7ae23d1ee2add50645d344474f641c21abd8da1df66eb84b0e312a41cca6" + sha256 cellar: :any, monterey: "80039b863040ebc5f7868d5331c358ee3ef0f210520eeb45a11cb746a406ebd0" + sha256 cellar: :any, big_sur: "bd5b088f08568c294627c010ca998e811a6ff11251299fec4df84caa35db8c74" + sha256 cellar: :any_skip_relocation, arm64_linux: "69ce08a03121ac9f4854a7b20a9728a24d2abe573045d5664daeaf0962ee27e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3c16e66fef90676d5b183e53657435b8f97e2f80832391edddae38ee523c02a" + end + + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + + def install + bin.mkpath + system "make", "INSTALL=#{prefix}", "CC=#{ENV.cc}", "install" + end + + test do + system bin/"tiff2png", test_fixtures("test.tiff") + end +end diff --git a/Formula/t/tig.rb b/Formula/t/tig.rb new file mode 100644 index 0000000000000..296975be84971 --- /dev/null +++ b/Formula/t/tig.rb @@ -0,0 +1,57 @@ +class Tig < Formula + desc "Text interface for Git repositories" + homepage "https://jonas.github.io/tig/" + url "https://github.com/jonas/tig/releases/download/tig-2.6.0/tig-2.6.0.tar.gz" + sha256 "99d4a0fdd3d93547ebacfe511195cb92e4f75b91644c06293c067f401addeb3e" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5464963cbef880b886995cebc53ba6465f96a360a08ab04a0652b98a691d7de2" + sha256 cellar: :any, arm64_sequoia: "8e4dfb08982c3aa19fab2a11c5f9d0c9ba4bc84f31be5b6eb1949f550330b947" + sha256 cellar: :any, arm64_sonoma: "6aef8066f91d46c4ce81efdad40d741f89ea45fa6b3e9f324f7a4f2aebe430e3" + sha256 cellar: :any, sonoma: "0a3dd5d81806bac10f99984b1e84d5d89c857a706207ddee9ca82ea00c0eb15f" + sha256 cellar: :any_skip_relocation, arm64_linux: "4281d358afb993ded992ad26db2c21c1f08c1389b88bb2732e26e204c001439b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfe9453ea284cf1c2a94073e7da2f52b0d1f645a620b3401d4a39b3ba4bd697a" + end + + head do + url "https://github.com/jonas/tig.git", branch: "master" + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "xmlto" => :build + end + + depends_on "pkgconf" => :build + # https://github.com/jonas/tig/issues/1210 + depends_on "ncurses" + depends_on "pcre2" + depends_on "readline" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" + system "make" + # Ensure the configured `sysconfdir` is used during runtime by + # installing in a separate step. + system "make", "install", "sysconfdir=#{pkgshare}/examples" + system "make", "install-doc-man" + bash_completion.install "contrib/tig-completion.bash" + zsh_completion.install "contrib/tig-completion.zsh" => "_tig" + cp "#{bash_completion}/tig-completion.bash", zsh_completion + end + + def caveats + <<~EOS + A sample of the default configuration has been installed to: + #{opt_pkgshare}/examples/tigrc + to override the system-wide default configuration, copy the sample to: + #{etc}/tigrc + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/tig -v") + end +end diff --git a/Formula/t/tiger-vnc.rb b/Formula/t/tiger-vnc.rb new file mode 100644 index 0000000000000..866e7888e339f --- /dev/null +++ b/Formula/t/tiger-vnc.rb @@ -0,0 +1,65 @@ +class TigerVnc < Formula + desc "High-performance, platform-neutral implementation of VNC" + homepage "https://tigervnc.org/" + url "https://github.com/TigerVNC/tigervnc/archive/refs/tags/v1.15.0.tar.gz" + sha256 "7f231906801e89f09a212e86701f3df1722e36767d6055a4e619390570548537" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "bc4e4b2999680e43b53573d900ea230aaa943be9b2ad109c8875b50b662eabfe" + sha256 cellar: :any, arm64_sequoia: "a5283ed63187173fe553e5beca0be9171e20bb26be778af47f232df26376cf0e" + sha256 cellar: :any, arm64_sonoma: "b74a31a13cf7229b1624f299e64b6c7ac7a1e94b4fd952b8cfc1266d49e6048b" + sha256 cellar: :any, arm64_ventura: "c65397dac1671e42fdbc3df44d242ef44e21fa7671901f9f56e96a88526ab3cf" + sha256 cellar: :any, sonoma: "31e91e161513884c41ad3e821d96b2972ac93f3bac5352b56ea94031d5c6b376" + sha256 cellar: :any, ventura: "73dc4363e534ffeb8b4370ad23d4cfb6af0cecf6c5cb0e22f44bb6838feb356c" + sha256 arm64_linux: "221f90791a23f0b9ed7d13585c582e8ace7dc8afb42c37ff994ae3baa56c3c1f" + sha256 x86_64_linux: "a55108da56f37feaa9f9b1f3da1837bae065ac4f4d8bbcbf9de80676c03d205f" + end + + depends_on "cmake" => :build + depends_on "fltk@1.3" # fltk 1.4 issue: https://github.com/TigerVNC/tigervnc/issues/1949 + depends_on "gettext" + depends_on "gmp" + depends_on "gnutls" + depends_on "jpeg-turbo" + depends_on "nettle" + depends_on "pixman" + + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxdamage" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxft" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxtst" + depends_on "linux-pam" + end + + def install + turbo = Formula["jpeg-turbo"] + args = %W[ + -DJPEG_INCLUDE_DIR=#{turbo.include} + -DJPEG_LIBRARY=#{turbo.lib}/#{shared_library("libjpeg")} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/vncviewer -h 2>&1", 1) + assert_match(/TigerVNC [Vv]iewer v#{version}/, output) + end +end diff --git a/Formula/t/tika.rb b/Formula/t/tika.rb new file mode 100644 index 0000000000000..27962f966e18e --- /dev/null +++ b/Formula/t/tika.rb @@ -0,0 +1,55 @@ +class Tika < Formula + desc "Content analysis toolkit" + homepage "https://tika.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tika/3.2.3/tika-app-3.2.3.jar" + mirror "https://archive.apache.org/dist/tika/3.2.3/tika-app-3.2.3.jar" + sha256 "80c20c085e2c0976bbd55969e5bf90dda2b7155db31068639fbc871d0369e7e7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "16c85f0ebf19e98b151a9f7885619440592718925034cc969536ade1805bdea4" + end + + depends_on "openjdk" + + resource "server" do + url "https://www.apache.org/dyn/closer.lua?path=tika/3.2.3/tika-server-standard-3.2.3.jar" + mirror "https://archive.apache.org/dist/tika/3.2.3/tika-server-standard-3.2.3.jar" + sha256 "c00898065af088925ba4b65856db66e6140e4c750d28219b61b96885885e7593" + + livecheck do + formula :parent + end + end + + def install + odie "update `server` resource" if version != resource("server").version + libexec.install "tika-app-#{version}.jar" + bin.write_jar_script libexec/"tika-app-#{version}.jar", "tika" + + libexec.install resource("server") + bin.write_jar_script libexec/"tika-server-standard-#{version}.jar", "tika-rest-server" + end + + service do + run [opt_bin/"tika-rest-server"] + working_dir var/"tika" + end + + test do + pdf = test_fixtures("test.pdf") + assert_equal "application/pdf\n", shell_output("#{bin}/tika --detect #{pdf}") + + port = free_port + pid = fork do + exec bin/"tika-rest-server", "--port=#{port}" + end + + sleep 10 + response = shell_output("curl -s -i http://localhost:#{port}") + assert_match "HTTP/1.1 200 OK", response + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/t/tile38.rb b/Formula/t/tile38.rb new file mode 100644 index 0000000000000..0c466c8f76595 --- /dev/null +++ b/Formula/t/tile38.rb @@ -0,0 +1,70 @@ +class Tile38 < Formula + desc "In-memory geolocation data store, spatial index, and realtime geofence" + homepage "https://tile38.com/" + url "https://github.com/tidwall/tile38.git", + tag: "1.36.5", + revision: "0b31bf10dfcfcbe1044a2e74e86a7e40cd72f82d" + license "MIT" + head "https://github.com/tidwall/tile38.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6c9990718f67497f27822a55596c07bf0c4ee56309e32716133d15b6f8278d25" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ee88a236bf68b49cdfb2543dc88eb95fae293be156b07de8060dbebe107053b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "03f270ec38f4b69a51bf8b77db658937c01b805c289589b6dc7e23ed68c2e609" + sha256 cellar: :any_skip_relocation, sonoma: "1f0498da1366d75037f12a3f4e2405c496d062930f0b57ef4b2afb230d1f0ddf" + sha256 cellar: :any_skip_relocation, arm64_linux: "c166d5307e57710adfbb4ee57c42eac71e5f6771b60b02b154ff7fdc563a8568" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c89546c235af2ab22636fd440fde5344e121d36f458ece74a0589601006c8dc0" + end + + depends_on "go" => :build + + def datadir + var/"tile38/data" + end + + def install + ldflags = %W[ + -s -w + -X github.com/tidwall/tile38/core.Version=#{version} + -X github.com/tidwall/tile38/core.GitSHA=#{Utils.git_short_head} + ] + + system "go", "build", *std_go_args(ldflags:, output: bin/"tile38-server"), "./cmd/tile38-server" + system "go", "build", *std_go_args(ldflags:, output: bin/"tile38-cli"), "./cmd/tile38-cli" + end + + def post_install + # Make sure the data directory exists + datadir.mkpath + end + + def caveats + <<~EOS + To connect: tile38-cli + EOS + end + + service do + run [opt_bin/"tile38-server", "-d", var/"tile38/data"] + keep_alive true + working_dir var + log_path var/"log/tile38.log" + error_log_path var/"log/tile38.log" + end + + test do + port = free_port + pid = fork do + exec bin/"tile38-server", "-q", "-p", port.to_s + end + sleep 2 + # remove `$408` in the first line output + json_output = shell_output("#{bin}/tile38-cli -p #{port} server") + tile38_server = JSON.parse(json_output) + + assert_equal tile38_server["ok"], true + assert_path_exists testpath/"data" + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/t/tiledb.rb b/Formula/t/tiledb.rb new file mode 100644 index 0000000000000..89dbddd27fb9e --- /dev/null +++ b/Formula/t/tiledb.rb @@ -0,0 +1,63 @@ +class Tiledb < Formula + desc "Universal storage engine" + homepage "https://tiledb.com/" + url "https://github.com/TileDB-Inc/TileDB/archive/refs/tags/2.29.1.tar.gz" + sha256 "e507b6edf2a3893038ae92c74b4756561f3c11a03c6c311c7ae76d40f924cc05" + license "MIT" + revision 2 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fddeb76bf28760be96460e3bbac36bc271822d4e9c58f2eff64a5bee9f890494" + sha256 cellar: :any, arm64_sequoia: "bce96a06ef04735d43f6a778c85fe292234d07f2d52b82da0c59e2c452d8394f" + sha256 cellar: :any, arm64_sonoma: "c4b287665441eb33547d34fff306761eb3a5ef46037673ae4b331c77c874bb0c" + sha256 cellar: :any, sonoma: "2df9af09b803bed610a054c5c0c8e6ed8f62cbf7c91a54e35256f36ee9a380d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "043165f31f6e3b169b2104d8c2b75f8b13aca8d31096cf1626f98743aa8866e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be3685b9d9c7cfa97ab6b50512d739f2614cabdcd2e962c0db39a8c36c4ca410" + end + + depends_on "cmake" => :build + + depends_on "fmt" + depends_on "lz4" + depends_on "openssl@3" + depends_on "spdlog" + depends_on "webp" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + args = %w[ + -DTILEDB_EXPERIMENTAL_FEATURES=OFF + -DTILEDB_TESTS=OFF + -DTILEDB_VERBOSE=ON + -DTILEDB_WERROR=OFF + -DTILEDB_DISABLE_AUTO_VCPKG=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + auto [major, minor, patch] = tiledb::version(); + std::cout << major << "." << minor << "." << patch << std::endl; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-ltiledb", "-o", "test" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/t/tilt.rb b/Formula/t/tilt.rb new file mode 100644 index 0000000000000..05f79dfc62cf0 --- /dev/null +++ b/Formula/t/tilt.rb @@ -0,0 +1,48 @@ +class Tilt < Formula + desc "Define your dev environment as code. For microservice apps on Kubernetes" + homepage "https://tilt.dev/" + url "https://github.com/tilt-dev/tilt.git", + tag: "v0.35.2", + revision: "eb60ec434a3d40d43f070cced95bc93116a2918b" + license "Apache-2.0" + head "https://github.com/tilt-dev/tilt.git", branch: "master" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "357caf218f22e1fe123226968702cfcb9d35e670de1a526f37a9028acb107b3f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b89951af0c741fec48e6f55f0fc4c744ee069cd37f3cd5f7a1b82f28a542fa3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "532d397a840b26663becf1a86e435780746bff0255973b9c7aba849cb8f47085" + sha256 cellar: :any_skip_relocation, sonoma: "2306f8077ed2dec8cc3b9f61276119878ee57c3b652f32304a62a1f0e951321b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5853b71fca1dbdb40b5e3f22450cfdd81d9e9058e521e35e744901626891aac9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4bd64b3b445a95aaea93de4359efc0e2de52cbda7e105bde9dfaef62c47de1f" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "yarn" => :build + + def install + # bundling the frontend assets first will allow them to be embedded into + # the final build + system "yarn", "config", "set", "ignore-engines", "true" # allow our newer node + system "make", "build-js" + + ENV["CGO_ENABLED"] = "1" + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{Utils.git_head} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/tilt" + + generate_completions_from_executable(bin/"tilt", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/tilt version") + + assert_match "Error: No tilt apiserver found: tilt-default", shell_output("#{bin}/tilt api-resources 2>&1", 1) + end +end diff --git a/Formula/t/timedog.rb b/Formula/t/timedog.rb new file mode 100644 index 0000000000000..0f76ab547b463 --- /dev/null +++ b/Formula/t/timedog.rb @@ -0,0 +1,25 @@ +class Timedog < Formula + desc "Lists files that were saved by a backup of the macOS Time Machine" + homepage "https://github.com/nlfiedler/timedog" + url "https://github.com/nlfiedler/timedog/archive/refs/tags/v1.4.tar.gz" + sha256 "169ab408fe5c6b292a7d4adf0845c42160108fd43d6a392b95210204de49cb52" + license "GPL-2.0-or-later" + head "https://github.com/nlfiedler/timedog.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a0e45f17640f67392a0681305ed9ea138fde831f355a79ef857d05e1fd7e0b9e" + end + + depends_on :macos + + def install + bin.install "timedog" + end + + test do + assert_match "No machine directory found for host", shell_output("#{bin}/timedog 2>&1", 1) + end +end diff --git a/Formula/t/timelimit.rb b/Formula/t/timelimit.rb new file mode 100644 index 0000000000000..8390e79a29133 --- /dev/null +++ b/Formula/t/timelimit.rb @@ -0,0 +1,49 @@ +class Timelimit < Formula + desc "Limit a process's absolute execution time" + homepage "https://devel.ringlet.net/sysutils/timelimit/" + url "https://devel.ringlet.net/files/sys/timelimit/timelimit-1.9.2.tar.gz" + sha256 "320a72770288b2deeb9abbd343f9c27afcb6190bb128ad2a1e1ee2a03a796d45" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/latest release is .*?timelimit[._-]v?(\d+(?:\.\d+)+)&1", 143).chomp + end +end diff --git a/Formula/t/timewarrior.rb b/Formula/t/timewarrior.rb new file mode 100644 index 0000000000000..dec0e2dd6232a --- /dev/null +++ b/Formula/t/timewarrior.rb @@ -0,0 +1,43 @@ +class Timewarrior < Formula + desc "Command-line time tracking application" + homepage "https://timewarrior.net/" + url "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v1.9.1/timew-1.9.1.tar.gz" + sha256 "7ad34f95c0d61d356df55149f9479f8d9aaec417e5f57f2a1cc76ae2f8a3171b" + license "MIT" + head "https://github.com/GothenburgBitFactory/timewarrior.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ea4c97b2d577a0a3d268ec4a2ca79244775d73718203df09e5b23523061f74f0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83db5313c87e12f701f786f9149982b3d38ecf2dc1813ef1a22b91e07902ba16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6260c851ad3262bcc6c1016c5f742129207079ae5a17d75d33df1dff11bf0922" + sha256 cellar: :any_skip_relocation, arm64_ventura: "40fe36d1b5f38ecf7fe8c8161cace77be60a7165a13cf44e68e82eecdbb64017" + sha256 cellar: :any_skip_relocation, sonoma: "d40e37d723c4aee31fca85d467c047464b1397f97ae948efbff46d3e1a56df2d" + sha256 cellar: :any_skip_relocation, ventura: "f4cdb02ac055a05689acb45862cb6bb3af49d2bfe7aaa3f81353b54d09ebe932" + sha256 cellar: :any_skip_relocation, arm64_linux: "110987680619bdb5ca21d536a4a63d5e6fb645dffdd3a77b86f0394349e50d17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14ec84c5fd5f38ff35f9dfb8d893dec579c8ddf79864b79dafb38714e0f05f46" + end + + depends_on "asciidoctor" => :build + depends_on "cmake" => :build + + on_linux do + depends_on "man-db" => :test + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/".timewarrior/data").mkpath + (testpath/".timewarrior/extensions").mkpath + touch testpath/".timewarrior/timewarrior.cfg" + + man = OS.mac? ? "man" : "gman" + system man, "-P", "cat", "timew-summary" + + assert_match "Tracking foo", shell_output("#{bin}/timew start foo") + end +end diff --git a/Formula/t/timg.rb b/Formula/t/timg.rb new file mode 100644 index 0000000000000..57eb4b6b3e781 --- /dev/null +++ b/Formula/t/timg.rb @@ -0,0 +1,52 @@ +class Timg < Formula + desc "Terminal image and video viewer" + homepage "https://timg.sh/" + url "https://github.com/hzeller/timg/archive/refs/tags/v1.6.3.tar.gz" + sha256 "59c908867f18c81106385a43065c232e63236e120d5b2596b179ce56340d7b01" + license "GPL-2.0-only" + head "https://github.com/hzeller/timg.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "29d6beebc4277ef79f9d14c083fa370a7b929b03a769d676ac9b2bb87964ed68" + sha256 cellar: :any, arm64_sequoia: "0c8ee925cc198a9795f2ff70674a1ef3cbc8bee913c5d9372babe3ab74120b54" + sha256 cellar: :any, arm64_sonoma: "1e322a578c3f81fd6cbfcb27dd55dd5f9504525668abc56590ef155d0eaa65ba" + sha256 cellar: :any, sonoma: "2bdef3af0e1ae32d4e893d6f8d5984bb1568b9f36e3d91276dbf87d40d7abe3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "318dbf7ec1b15f1e72f684b4d8b749ad81e777e3149d5f86a27956f46c79205f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83740c7f5cc8839d160a8c269e5c4a483e50c0869213a73dd82abecd0ab389bc" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "ffmpeg" + depends_on "glib" + depends_on "graphicsmagick" + depends_on "jpeg-turbo" + depends_on "libdeflate" + depends_on "libexif" + depends_on "libpng" + depends_on "librsvg" + depends_on "libsixel" + depends_on "openslide" + depends_on "poppler" + depends_on "webp" + + on_macos do + depends_on "gdk-pixbuf" + depends_on "gettext" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"timg", "--version" + system bin/"timg", "-g10x10", test_fixtures("test.gif") + system bin/"timg", "-g10x10", test_fixtures("test.png") + system bin/"timg", "-pq", "-g10x10", "-o", testpath/"test-output.txt", test_fixtures("test.jpg") + assert_match "38;2;255;38;0;49m", (testpath/"test-output.txt").read + end +end diff --git a/Formula/t/timidity.rb b/Formula/t/timidity.rb new file mode 100644 index 0000000000000..7642ad6af34c8 --- /dev/null +++ b/Formula/t/timidity.rb @@ -0,0 +1,69 @@ +class Timidity < Formula + desc "Software synthesizer" + homepage "https://timidity.sourceforge.net/" + url "https://downloads.sourceforge.net/project/timidity/TiMidity++/TiMidity++-2.15.0/TiMidity++-2.15.0.tar.bz2" + sha256 "161fc0395af16b51f7117ad007c3e434c825a308fa29ad44b626ee8f9bb1c8f5" + license "GPL-2.0-or-later" + revision 3 + + livecheck do + url :stable + regex(%r{url=.*?/TiMidity%2B%2B[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "d1870a696de648a1ed46e25d590b6f6a3bfa73091044c8623fbf77901e71c7a9" + sha256 arm64_sequoia: "8e504bb7f36e5feae11358a05aaa0b9651b84cc60664d4d8199c6c72c07d13c4" + sha256 arm64_sonoma: "faa51ccbf4324d22f47660879db054f204dd19fd7d18361a4e8bc207b261ae10" + sha256 arm64_ventura: "ae1cb080608f21a9265afd6faa3ce8a045a69ef72347306661580adad6da2d4a" + sha256 sonoma: "e64e294d42736c8781c217604b149e2bbc03754312416f92b3bae9a6e2ecde54" + sha256 ventura: "8547254f49bc780399c907f8a23916843840065a06ebdfce850b0a3280429b2d" + sha256 arm64_linux: "4c6b979e2ec599528a1fa01884d6886e757ccfb57624785b27f3ca2c4bf6167c" + sha256 x86_64_linux: "641143b8f2f77b6d9c41cf16994b389cfd2523ec4f97d6bd1acabca4a5f376d1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + depends_on "flac" + depends_on "libao" + depends_on "libogg" + depends_on "libvorbis" + depends_on "speex" + + resource "freepats" do + url "https://github.com/feross/freepats/archive/refs/tags/v1.0.3.tar.gz" + sha256 "d79fa8719500880627b1b65286fde6ddb06274540a3eba21178d2058d525007e" + end + + def install + ENV.append_to_cflags "-DSTDC_HEADERS" if OS.mac? + audio_options = %w[ + vorbis + flac + speex + ao + ] + audio_options << "darwin" if OS.mac? + + system "./autogen.sh" if Hardware::CPU.arm? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--enable-audio=#{audio_options.join(",")}" + system "make", "install" + + # Freepats instrument patches from https://github.com/feross/freepats + (share/"freepats").install resource("freepats") + pkgshare.install_symlink share/"freepats/Tone_000", + share/"freepats/Drum_000", + share/"freepats/freepats.cfg" => "timidity.cfg" + end + + test do + system bin/"timidity" + end +end diff --git a/Formula/t/timoni.rb b/Formula/t/timoni.rb new file mode 100644 index 0000000000000..ed73d578d72f2 --- /dev/null +++ b/Formula/t/timoni.rb @@ -0,0 +1,38 @@ +class Timoni < Formula + desc "Package manager for Kubernetes, powered by CUE and inspired by Helm" + homepage "https://timoni.sh/" + url "https://github.com/stefanprodan/timoni/archive/refs/tags/v0.25.2.tar.gz" + sha256 "b7c98986ceec18f40a6ce96845c125f042e84668dc765c306dcebe7e3b87fb64" + license "Apache-2.0" + head "https://github.com/stefanprodan/timoni.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "40b5542812caf38e60ef89831ff1f98dd253c6d5d2feae3a88fb75b6e43d8947" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6f35266b3464bc3a4410cc5da4e89cef32cbcfcc471bdef2fb1b6c2e85ec799" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ead36e09083dd9e732ef5c3bd628d3329fc1c2aab1e684a0bdd430e466cbddf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "466250b8c24a0b0a9b5d0af25ec47faa821b84278d8053b9b4a8a588de78a209" + sha256 cellar: :any_skip_relocation, sonoma: "15b711a8bcdf50b7eaa73a64940fc853bdf6848ba6972dc9726371b9f04c8eff" + sha256 cellar: :any_skip_relocation, ventura: "3d4633b3db46ec196beaa366c8ff06555835796f7c0886c7d28dc8fd746b817f" + sha256 cellar: :any_skip_relocation, arm64_linux: "2087e64f4390c6d82ad504f3366f21a6b81725ff885e9de38505724a596ca710" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f72b67e94145d5b8457de29f699b358f2b86e5c84fc8c22764a653db3a2d30a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.VERSION=#{version}"), "./cmd/timoni" + + generate_completions_from_executable(bin/"timoni", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/timoni version") + + system bin/"timoni", "mod", "init", "test-mod", "--namespace", "test" + assert_path_exists testpath/"test-mod/timoni.cue" + assert_path_exists testpath/"test-mod/values.cue" + + output = shell_output("#{bin}/timoni mod vet test-mod 2>&1") + assert_match "INF timoni.sh/test-mod valid module", output + end +end diff --git a/Formula/t/tin.rb b/Formula/t/tin.rb new file mode 100644 index 0000000000000..5b0f9f8198462 --- /dev/null +++ b/Formula/t/tin.rb @@ -0,0 +1,51 @@ +class Tin < Formula + desc "Threaded, NNTP-, and spool-based UseNet newsreader" + homepage "http://www.tin.org" + url "https://sunsite.icm.edu.pl/pub/unix/news/tin/v2.6/tin-2.6.4.tar.xz" + sha256 "c66a1e8db30ddabe7e3313e6870f7877fe20f0da99afb65db3d8c41012fe55f7" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(%r{tin-current\.t.*?>TIN v?(\d+(?:\.\d+)+).*?stable}i) + end + + bottle do + sha256 arm64_tahoe: "37d09deb544531a4da9a4cf852ca5dbd7f09cd02fd8b87f7344218ee6b5bbac5" + sha256 arm64_sequoia: "3d597df858bc4fffb3f8be38154eaf650d981fbd36a609e1a0eb8b1113a01086" + sha256 arm64_sonoma: "e729c23660a5a51cb38391405c50fec69f2713c8517e319e4f425894ac1d98c5" + sha256 arm64_ventura: "0bab093b5385450e3f87471243afe4b341443a141b971f5a02f7ad82a161f13b" + sha256 sonoma: "b426577ee9e85591383eb389a0b2077228699af99fe7f7fdf5cc942f8b486264" + sha256 ventura: "e9ee890eefb1b3cdde1c3c4420fab41c632163b30ce7429d74a67bf03b092fd6" + sha256 cellar: :any_skip_relocation, arm64_linux: "59fbbd067f08e1c809d0eac35d969b80b53dddddd7b0e447a06b3a33ad785727" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7da69315726b0f03dd42918f5e545befd3afc660d08f2b6ec70f1a651c421abb" + end + + depends_on "pcre2" + + uses_from_macos "bison" => :build + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "libunistring" + end + + conflicts_with "mutt", because: "both install mmdf.5 and mbox.5 man pages" + + def install + # Remove bundled libraries + rm_r buildpath/"pcre" + + system "./configure", *std_configure_args, + "--mandir=#{man}", + "--with-pcre2-config=#{Formula["pcre2"].opt_prefix}/bin/pcre2-config" + system "make", "build" + system "make", "install" + end + + test do + system bin/"tin", "-H" + end +end diff --git a/Formula/t/tinc.rb b/Formula/t/tinc.rb new file mode 100644 index 0000000000000..616feebbc69ba --- /dev/null +++ b/Formula/t/tinc.rb @@ -0,0 +1,131 @@ +class Tinc < Formula + desc "Virtual Private Network (VPN) tool" + homepage "https://www.tinc-vpn.org/" + url "https://tinc-vpn.org/packages/tinc-1.0.36.tar.gz" + sha256 "40f73bb3facc480effe0e771442a706ff0488edea7a5f2505d4ccb2aa8163108" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url "https://www.tinc-vpn.org/download/" + regex(/href=.*?tinc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "bdab833e860c75048151b91a12eb976954b197ab0fb099390c53582a18f8b64b" + sha256 cellar: :any, arm64_sequoia: "d452247fec1d29690250c77dafdeb7cac2c945ddef7f11e19fa728563cf4f720" + sha256 cellar: :any, arm64_sonoma: "ab60d88c2bb9f1d867bc7fad3ff18086c3bb907502cc1f9af3c61eab5c633771" + sha256 cellar: :any, arm64_ventura: "9f2467372c458402453d111b49be9ebdfb5d7e53f1a3a33d32bf2c43e9cd6b1b" + sha256 cellar: :any, arm64_monterey: "4fb0f6f2276a92f60c5aad1674c137850d6e0a6ac77adc8ce575aa4288a8b942" + sha256 cellar: :any, arm64_big_sur: "88d77dd06ee97bf7c1cc0e330876c992d7d460cc55e8e62ebb5c03a0f4ebb0e2" + sha256 cellar: :any, sonoma: "dfbaa4b890c987e2daeb4a38a4a82d8008ad23e38b135768909c9eeda980c2ff" + sha256 cellar: :any, ventura: "3f2730126370c8ded288e13b4756426213aef4082039f8a7b64776214ce70db6" + sha256 cellar: :any, monterey: "58d69be546dceda9a4d413770531633c132cf46a5901553f3d0367cd0bae282f" + sha256 cellar: :any, big_sur: "094208fa2043d75696fa60b47a4d26f32e67fbffcce78cc37429a6eac641ddb8" + sha256 cellar: :any, catalina: "878a5d0ded29f6b9ad6a18e040508e7597551d4b359c39f9ecaaa7fc6cb91b12" + sha256 cellar: :any_skip_relocation, arm64_linux: "66115eb9b72b5609f201efb79752275a5d166d530e538689d3770ad51e8a33e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1cf23e958fe70fd7662d67e87ab9adfd4d838550b104216ec70363391ec7595" + end + + depends_on "lzo" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # fix build errors, upstream pr ref, https://github.com/gsliepen/tinc/pull/464 + patch :DATA + + def install + system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}" + system "make", "install" + end + + def post_install + (var/"run/tinc").mkpath + end + + service do + run [opt_sbin/"tincd", "--config=#{etc}/tinc", "--pidfile=#{var}/run/tinc/tinc.pid", "-D"] + keep_alive true + require_root true + working_dir etc/"tinc" + log_path var/"log/tinc/stdout.log" + error_log_path var/"log/tinc/stderr.log" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/tincd --version") + end +end + +__END__ +diff --git a/src/net_socket.c b/src/net_socket.c +index 6195c16..e072970 100644 +--- a/src/net_socket.c ++++ b/src/net_socket.c +@@ -102,14 +102,14 @@ static bool bind_to_interface(int sd) { + + #if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE) + memset(&ifr, 0, sizeof(ifr)); +- strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); +- ifr.ifr_ifrn.ifrn_name[IFNAMSIZ - 1] = 0; ++ strncpy(ifr.ifr_name, iface, IFNAMSIZ); ++ ifr.ifr_name[IFNAMSIZ - 1] = 0; + free(iface); + + status = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)); + + if(status) { +- logger(LOG_ERR, "Can't bind to interface %s: %s", ifr.ifr_ifrn.ifrn_name, strerror(errno)); ++ logger(LOG_ERR, "Can't bind to interface %s: %s", ifr.ifr_name, strerror(errno)); + return false; + } + +@@ -157,13 +157,13 @@ int setup_listen_socket(const sockaddr_t *sa) { + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); +- strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); +- ifr.ifr_ifrn.ifrn_name[IFNAMSIZ - 1] = 0; ++ strncpy(ifr.ifr_name, iface, IFNAMSIZ); ++ ifr.ifr_name[IFNAMSIZ - 1] = 0; + free(iface); + + if(setsockopt(nfd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr))) { + closesocket(nfd); +- logger(LOG_ERR, "Can't bind to interface %s: %s", ifr.ifr_ifrn.ifrn_name, strerror(sockerrno)); ++ logger(LOG_ERR, "Can't bind to interface %s: %s", ifr.ifr_name, strerror(sockerrno)); + return -1; + } + +diff --git a/src/raw_socket_device.c b/src/raw_socket_device.c +index f4ed694..cf13fe9 100644 +--- a/src/raw_socket_device.c ++++ b/src/raw_socket_device.c +@@ -61,12 +61,12 @@ static bool setup_device(void) { + #endif + + memset(&ifr, 0, sizeof(ifr)); +- strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); +- ifr.ifr_ifrn.ifrn_name[IFNAMSIZ - 1] = 0; ++ strncpy(ifr.ifr_name, iface, IFNAMSIZ); ++ ifr.ifr_name[IFNAMSIZ - 1] = 0; + + if(ioctl(device_fd, SIOCGIFINDEX, &ifr)) { + close(device_fd); +- logger(LOG_ERR, "Can't find interface %s: %s", ifr.ifr_ifrn.ifrn_name, strerror(errno)); ++ logger(LOG_ERR, "Can't find interface %s: %s", ifr.ifr_name, strerror(errno)); + return false; + } + +@@ -76,7 +76,7 @@ static bool setup_device(void) { + sa.sll_ifindex = ifr.ifr_ifindex; + + if(bind(device_fd, (struct sockaddr *) &sa, (socklen_t) sizeof(sa))) { +- logger(LOG_ERR, "Could not bind %s to %s: %s", device, ifr.ifr_ifrn.ifrn_name, strerror(errno)); ++ logger(LOG_ERR, "Could not bind %s to %s: %s", device, ifr.ifr_name, strerror(errno)); + return false; + } diff --git a/Formula/t/tintin.rb b/Formula/t/tintin.rb new file mode 100644 index 0000000000000..8b13c59656fc6 --- /dev/null +++ b/Formula/t/tintin.rb @@ -0,0 +1,45 @@ +class Tintin < Formula + desc "MUD client" + homepage "https://tintin.mudhalla.net/" + url "https://github.com/scandum/tintin/releases/download/2.02.51/tintin-2.02.51.tar.gz" + sha256 "9279f25d18defddf449863f4bad6ec971feacd297a9d9ddaac28c9b5d5eced02" + license "GPL-3.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c79e4c05084a38e2dce0d540e32dad034ded6da9669f4351a8e1ee4f3f749bc5" + sha256 cellar: :any, arm64_sequoia: "c8410631e4b5913d30deff7f49b6c1f0b8e5d86b9aa894a61a5a61138ce4a8fe" + sha256 cellar: :any, arm64_sonoma: "699fae6ad2d5b69edb8a966d22364e25c27485084d3c8a55d6b767680e4be03e" + sha256 cellar: :any, arm64_ventura: "27270803fb800ee49cd574dcbfa6a7d2e3dd18e4baf5a7d04107684421d15849" + sha256 cellar: :any, sonoma: "39d054d89de62da4d8e05f4f85e33bcf7eaac2ac6ca5567138bc9b0dbf94b912" + sha256 cellar: :any, ventura: "1bf5c897c70f625d4d2b115b832470b7ff7009caf600f03b4a6075fc66c1b813" + sha256 cellar: :any_skip_relocation, arm64_linux: "12d800c80fab044fd6ac3cc2052516797095394b8e5e532e8e59c7a3bb0dd52f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "135f4682a04e95b104a5bcb6ac078c42bd87cc5c355a455c96d9ae796ce9d34a" + end + + depends_on "gnutls" + depends_on "pcre" # PCRE2 issue: https://github.com/scandum/tintin/issues/163 + + uses_from_macos "zlib" + + def install + # find Homebrew's libpcre + ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" + + cd "src" do + system "./configure", "--prefix=#{prefix}" + system "make", "CFLAGS=#{ENV.cflags}", + "INCS=#{ENV.cppflags}", + "LDFLAGS=#{ENV.ldflags}", + "install" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/tt++ -V", 1) + end +end diff --git a/Formula/t/tiny-remapper.rb b/Formula/t/tiny-remapper.rb new file mode 100644 index 0000000000000..cb96e6643ba07 --- /dev/null +++ b/Formula/t/tiny-remapper.rb @@ -0,0 +1,66 @@ +class TinyRemapper < Formula + desc "Tiny, efficient tool for remapping JAR files using \"Tiny\"-format mappings" + homepage "https://fabricmc.net/" + # TODO: Check if we can use `openjdk` 25+ when bumping the version. + url "https://maven.fabricmc.net/net/fabricmc/tiny-remapper/0.12.0/tiny-remapper-0.12.0-fat.jar" + sha256 "32fdef3f97d1fac16fcdab81f965e2fd0886e7dd1477bfd5db4737d3ec85bb34" + license "LGPL-3.0-only" + + livecheck do + url "https://maven.fabricmc.net/net/fabricmc/tiny-remapper/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e39e2271aec7554aaf75991751431639c7bad8cca90cff913a9795f37279a27b" + end + + depends_on "openjdk@21" + + def openjdk + Formula["openjdk@21"] + end + + def install + libexec.install "tiny-remapper-#{version}-fat.jar" + bin.write_jar_script libexec/"tiny-remapper-#{version}-fat.jar", "tiny-remapper", + java_version: "21" + end + + test do + (testpath/"Main.java").write <<~JAVA + import java.lang.reflect.Method; + + class Main { + private static void method_1234() { + Method[] methods = Main.class.getDeclaredMethods(); + + for (Method method : methods) { + System.out.println("method " + method.getName()); + } + } + + public static void main(String args[]) { + method_1234(); + } + } + JAVA + + (testpath/"mappings.tiny").write <<~TINY + tiny 2 0 intermediary named + c Main Main + \tm ()V method_1234 printMethods + TINY + + javac = openjdk.opt_bin/"javac" + java = openjdk.opt_bin/"java" + jar = openjdk.opt_bin/"jar" + + system javac, "Main.java" + system jar, "-cf", "input.jar", "Main.class" + assert_match "method method_1234", shell_output("#{java} -cp input.jar Main") + + system bin/"tiny-remapper", "input.jar", "output.jar", "mappings.tiny", "intermediary", "named" + assert_match "method printMethods", shell_output("#{java} -cp output.jar Main") + end +end diff --git a/Formula/t/tiny.rb b/Formula/t/tiny.rb new file mode 100644 index 0000000000000..1465a678757af --- /dev/null +++ b/Formula/t/tiny.rb @@ -0,0 +1,45 @@ +class Tiny < Formula + desc "Terminal IRC client" + homepage "https://github.com/osa1/tiny" + url "https://github.com/osa1/tiny/archive/refs/tags/v0.13.0.tar.gz" + sha256 "599697fa736d7500b093566a32204691093bd16abd76f43a76b761487a7c584c" + license "MIT" + head "https://github.com/osa1/tiny.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f39273bea2d44c1f991cb568d3bb3caeec238629895d7332f93cc3fd8cb8a8c2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6362dac49c5a0b79b04dc91ded217ab137a122398a14dce062179667802278e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "670eea450b4070a2eb2984d25773a284faf38671fbb333ad4d131cecaf23be18" + sha256 cellar: :any_skip_relocation, arm64_ventura: "56f21368dff225e7fae151b96ded515ab2c858c6a4cbd8bb5f124c6964937d98" + sha256 cellar: :any_skip_relocation, sonoma: "d9c036c42cf375368d2668c63e52da17ffd3432f96729c41b685bcc0cfaeee87" + sha256 cellar: :any_skip_relocation, ventura: "7028b5c3c765572cf316d00e7fe552a37794e518e8cb0acaeb63c95eb8e90cf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d245db5944104a25d7623ca20f447ae4a0960ad0ad085351efadb8f7cc4a51a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82dba4c308ec8fd1b7185f7a92427f69dae4ca52a2c503088e8d284dd3746e1a" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "dbus" + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/tiny") + end + + test do + assert_match version.to_s, shell_output("#{bin}/tiny --version") + + begin + output_log = testpath/"output.log" + pid = spawn bin/"tiny", [:out, :err] => output_log.to_s + sleep 1 + assert_match "tiny couldn't find a config file", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/tinycdb.rb b/Formula/t/tinycdb.rb new file mode 100644 index 0000000000000..cd966c3ef9c42 --- /dev/null +++ b/Formula/t/tinycdb.rb @@ -0,0 +1,88 @@ +class Tinycdb < Formula + desc "Create and read constant databases" + homepage "https://www.corpit.ru/mjt/tinycdb.html" + url "https://www.corpit.ru/mjt/tinycdb/tinycdb-0.81.tar.gz" + sha256 "469de2d445bf54880f652f4b6dc95c7cdf6f5502c35524a45b2122d70d47ebc2" + license :public_domain + revision 1 + + livecheck do + url :homepage + regex(/href=.*?tinycdb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bd03805a76b700768943e3216fba150262d5fb9f121f1e46e7474c761ce647da" + sha256 cellar: :any, arm64_sequoia: "680cfcfc325b233fe7340563af3250740568b8a3689fae20f477e108ed673a8e" + sha256 cellar: :any, arm64_sonoma: "345b0faa2f7c6d23974d5c2428eb7961fbf0934a5064e39f1d957469c6ca491c" + sha256 cellar: :any, arm64_ventura: "29a4f84b5a7f2f4eeb6301260a9dd6dc063428a9550bb646b526c3cca3d96565" + sha256 cellar: :any, sonoma: "00517e16683f21a47b6f985fd00927be4fca3c501aa34e445008aad1f9bbf7ea" + sha256 cellar: :any, ventura: "c803d0c447413f5d29e43172e75c6a6ac54f6b23b2c85c469e1d0a2930932b95" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b2c198f26388658e08919e7222f77af9d609383307ba7e87dd29dc781cb7bef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e936f20c0ba2216f0ead62448ee2793eb96181c32bb381b9f3207e34e3ce46b5" + end + + def libcdb_soversion + # This value is used only on macOS. + # If the test block fails only on Linux, then this value likely needs updating. + "1" + end + + def install + system "make" + system "make", "install", "prefix=#{prefix}", "mandir=#{man}" + + shared_flags = ["prefix=#{prefix}"] + shared_flags += if OS.mac? + %W[ + SHAREDLIB=#{shared_library("$(LIBBASE)", libcdb_soversion)} + SOLIB=#{shared_library("$(LIBBASE)")} + LDFLAGS_SONAME=-Wl,-install_name,$(prefix)/ + LDFLAGS_VSCRIPT= + LIBMAP= + ] + end.to_a + + system "make", *shared_flags, "shared" + system "make", *shared_flags, "install-sharedlib" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + struct cdb_make cdbm; + int fd; + char *key = "test", + *val = "homebrew"; + unsigned klen = 4, + vlen = 8; + + fd = open("#{testpath}/db", O_RDWR|O_CREAT); + + cdb_make_start(&cdbm, fd); + cdb_make_add(&cdbm, key, klen, val, vlen); + cdb_make_exists(&cdbm, key, klen); + cdb_make_finish(&cdbm); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcdb", "-o", "test" + system "./test" + return unless OS.linux? + + # Let's test whether our hard-coded `libcdb_soversion` is correct, since we don't override this on Linux. + # If this test fails, the the value in the `libcdb_soversion` needs updating. + versioned_libcdb_candidates = lib.glob(shared_library("libcdb", "*")).reject { |so| so.to_s.end_with?(".so") } + assert_equal versioned_libcdb_candidates.count, 1, "expected only one versioned `libcdb`!" + + versioned_libcdb = versioned_libcdb_candidates.first.basename.to_s + soversion = versioned_libcdb[/\.(\d+)$/, 1] + assert_equal libcdb_soversion, soversion + end +end diff --git a/Formula/t/tinymist.rb b/Formula/t/tinymist.rb new file mode 100644 index 0000000000000..dc9816baa466f --- /dev/null +++ b/Formula/t/tinymist.rb @@ -0,0 +1,59 @@ +class Tinymist < Formula + desc "Services for Typst" + homepage "https://myriad-dreamin.github.io/tinymist/" + url "https://github.com/Myriad-Dreamin/tinymist/archive/refs/tags/v0.14.0.tar.gz" + sha256 "0a5dbd53e9bc3334b153f996d9fdafb52bed76fa59b27e759e9f9721dd490c1f" + license "Apache-2.0" + head "https://github.com/Myriad-Dreamin/tinymist.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0630506a5c76d938509170054914e1f1b6bb65412b3f7c4e41cec0cbff6dc87f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1604e50f99a084dbf5ff291928436ace931c9899a32b0b492bfba3246addc5e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cdd0e6c91906a67400d7d9fdf56ce7c09e1000f30f7fcb20e228ec0731cf7fe" + sha256 cellar: :any_skip_relocation, sonoma: "199c7771a980edcb37fd65fa9c6acfe484d1bbe36a5652b98f96d448f54c2195" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ffa2f1283a361b638a0e6633dabfe9a0c3b3f74ba388618b709d512f6491135" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f693ec1fe9141211f2ee5ba1960b3d84fe40c047e7430bcaa3cabd759da9d25a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/tinymist-cli") + end + + test do + system bin/"tinymist", "probe" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = IO.popen([bin/"tinymist", "lsp"], "w+") do |pipe| + pipe.write(input) + sleep 1 + pipe.close_write + pipe.read + end + + assert_match(/^Content-Length: \d+/i, output) + json_dump = output.lines.last.strip + assert_equal 1, JSON.parse(json_dump)["id"] + end +end diff --git a/Formula/t/tinyproxy.rb b/Formula/t/tinyproxy.rb new file mode 100644 index 0000000000000..deb7e5697f294 --- /dev/null +++ b/Formula/t/tinyproxy.rb @@ -0,0 +1,72 @@ +class Tinyproxy < Formula + desc "HTTP/HTTPS proxy for POSIX systems" + homepage "https://tinyproxy.github.io/" + url "https://github.com/tinyproxy/tinyproxy/releases/download/1.11.2/tinyproxy-1.11.2.tar.xz" + sha256 "6a126880706691c987e2957b1c99b522efb1964a75eb767af4b30aac0b88a26a" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "5837c70bdd0d954054e2fa463d5d5a8031afb33dc40dc84543f59bb04f5f77c6" + sha256 arm64_sequoia: "2556f6c1aa3073beccdf952d8baf20c880300ef2d5067fe2588c43b7b58be0a2" + sha256 arm64_sonoma: "54a2231b4ad6b362db15d5709eb7ae1f171584e64725546b4ef5d5c384ca6b4c" + sha256 arm64_ventura: "38dd9771beb51039ef32c6f96e110726598387867c3bb22215298310e735aaeb" + sha256 arm64_monterey: "77833ca6e2e9f3926d7f7a69c63aec9bb83da5241ba8ce6ed8c8ed1eaf2d1a6a" + sha256 sonoma: "e7f5a728df755d3fcb83b2639e924354c7bc479152bf766b819660b3caf1c302" + sha256 ventura: "11689d10c680a3c1e7b5fe372fe7ed44507e3e6415ab4dbf2b093a04f433bc2b" + sha256 monterey: "c581f25dbd95d8248cd632a11993c35ea42798ede63e2f27a59aa2bb875ff778" + sha256 arm64_linux: "7ed36d11605e92c9fae9fa3b6d0869e2e18744c47664a6b3d8b6c6669ad91ee5" + sha256 x86_64_linux: "f63df2e51f811d5d80b7a2ce3f3e4bd0f170186061e937a39f1d06b787db793d" + end + + depends_on "asciidoc" => :build + depends_on "docbook-xsl" => :build + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + args = %W[ + --disable-debug + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + --localstatedir=#{var} + --sysconfdir=#{etc} + --disable-regexcheck + --enable-filter + --enable-reverse + --enable-transparent + ] + + system "./configure", *args + system "make", "install" + end + + def post_install + (var/"log/tinyproxy").mkpath + (var/"run/tinyproxy").mkpath + end + + service do + run [opt_bin/"tinyproxy", "-d"] + keep_alive false + working_dir HOMEBREW_PREFIX + end + + test do + port = free_port + cp etc/"tinyproxy/tinyproxy.conf", testpath/"tinyproxy.conf" + inreplace testpath/"tinyproxy.conf", "Port 8888", "Port #{port}" + + pid = fork do + exec bin/"tinyproxy", "-c", testpath/"tinyproxy.conf" + end + sleep 2 + + begin + assert_match "tinyproxy", shell_output("curl localhost:#{port}") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/tinysearch.rb b/Formula/t/tinysearch.rb new file mode 100644 index 0000000000000..343e0551e73c1 --- /dev/null +++ b/Formula/t/tinysearch.rb @@ -0,0 +1,40 @@ +class Tinysearch < Formula + desc "Tiny, full-text search engine for static websites built with Rust and Wasm" + homepage "https://github.com/tinysearch/tinysearch" + url "https://github.com/tinysearch/tinysearch/archive/refs/tags/v0.10.0.tar.gz" + sha256 "6262df7566e9bd5557f60a9217258cbd73bc62061c74fb372e07cf4188775ccb" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/tinysearch/tinysearch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3c9705d7d8912da7e4a11f967b57b026a974a3232a998e3cf555c154f668f0ad" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "139c066dad7c16d8da58919d2d48f7aaadc41237f300c3632a88e5060d41f282" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "252f534d5748d9f8d9845c878eae6e2f39664ff2ee0f0fcb25c9a74ec9eb8418" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60b2fd76408155e7dc31bde94dc8253cb59cf8b7ded087be2cc794d451e76b45" + sha256 cellar: :any_skip_relocation, sonoma: "14490663c0beb01f76937ff1023980806e75d51bb97912f00f2490f7a485bc09" + sha256 cellar: :any_skip_relocation, ventura: "c05ac327ccaba7f59ce94631ba82d4083ccc442de3232f3513292c6f759d66e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "2372210d0075d8b401f1b5de4a06359432aa6489cf6e3fadab578cacc67e4329" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7746d68cca7ebd9ad68eb6e0ead34dfed4741b924b561abaaf5c16ae4507c9ab" + end + + depends_on "rust" => :build + + depends_on "rustup" + depends_on "wasm-pack" + + def install + system "cargo", "install", "--features", "bin", *std_cargo_args + pkgshare.install "fixtures" + end + + test do + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "stable" + system "rustup", "target", "add", "wasm32-unknown-unknown" + + system bin/"tinysearch", pkgshare/"fixtures/index.json" + assert_path_exists testpath/"wasm_output/tinysearch_engine.wasm" + assert_match "TinySearch WASM Demo", (testpath/"wasm_output/demo.html").read + end +end diff --git a/Formula/t/tinysparql.rb b/Formula/t/tinysparql.rb new file mode 100644 index 0000000000000..8a92f51e4452d --- /dev/null +++ b/Formula/t/tinysparql.rb @@ -0,0 +1,112 @@ +class Tinysparql < Formula + desc "Low-footprint RDF triple store with SPARQL 1.1 interface" + homepage "https://tinysparql.org/" + url "https://download.gnome.org/sources/tinysparql/3.10/tinysparql-3.10.1.tar.xz" + sha256 "5a7f3e789db6671a550ed6280ed4f60a60bea77368da92be68dc7d8d7e230265" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + head "https://gitlab.gnome.org/GNOME/tinysparql.git", branch: "main" + + # TinySPARQL doesn't follow GNOME's "even-numbered minor is stable" version + # scheme but they do appear to use 90+ minor/patch versions, which may + # indicate unstable versions (e.g., 1.99.0, 2.2.99.0, etc.). + livecheck do + url "https://download.gnome.org/sources/tinysparql/cache.json" + regex(/tinysparql[._-]v?(\d+(?:(?!\.9\d)\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "90a9d4e285934a23cfb38b4a8410f19f9b20e0086447f34d5489b953bf950253" + sha256 arm64_sequoia: "1f73787281850f174147e4a66a4be08baa96539bb61debc4f464cae1ab45eabe" + sha256 arm64_sonoma: "236421dcbf8307292b06b0a8599a1a694d1cd4ac4faad453e0f53190a59e15fa" + sha256 sonoma: "40eb8fa83ed0f88fabb44b05e68dec6ed7b79719929cab94e2037f40f1dab09c" + sha256 arm64_linux: "41dee40c34bf2f0c6556060937d92f8eca469425a82707d098eeefea9a88b011" + sha256 x86_64_linux: "d06043b1ac9cd894653d4ea399765da704dc8ba2e7768405b9f0ce9bea75dc47" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "dbus" + depends_on "glib" + depends_on "icu4c@77" + depends_on "json-glib" + depends_on "libsoup" + depends_on "sqlite" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + args = %w[ + -Dman=false + -Ddocs=false + -Dsystemd_user_services=false + -Dtests=false + ] + + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + gint main(gint argc, gchar *argv[]) { + g_autoptr(GError) error = NULL; + g_autoptr(GFile) ontology; + g_autoptr(TrackerSparqlConnection) connection; + g_autoptr(TrackerSparqlCursor) cursor; + int i = 0; + + ontology = tracker_sparql_get_ontology_nepomuk(); + connection = tracker_sparql_connection_new(0, NULL, ontology, NULL, &error); + + if (error) { + g_critical("Error: %s", error->message); + return 1; + } + + cursor = tracker_sparql_connection_query(connection, "SELECT ?r { ?r a rdfs:Resource }", NULL, &error); + + if (error) { + g_critical("Couldn't query: %s", error->message); + return 1; + } + + while (tracker_sparql_cursor_next(cursor, NULL, &error)) { + if (error) { + g_critical("Couldn't get next: %s", error->message); + return 1; + } + if (i++ < 5) { + if (i == 1) { + g_print("Printing first 5 results:"); + } + + g_print("%s", tracker_sparql_cursor_get_string(cursor, 0, NULL)); + } + } + + return 0; + } + C + + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + ENV.prepend_path "PKG_CONFIG_PATH", icu4c.opt_lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs tracker-sparql-3.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/t/tinysvm.rb b/Formula/t/tinysvm.rb new file mode 100644 index 0000000000000..0521b277382c0 --- /dev/null +++ b/Formula/t/tinysvm.rb @@ -0,0 +1,73 @@ +class Tinysvm < Formula + desc "Support vector machine library for pattern recognition" + homepage "http://chasen.org/~taku/software/TinySVM/" + url "http://chasen.org/~taku/software/TinySVM/src/TinySVM-0.09.tar.gz" + sha256 "e377f7ede3e022247da31774a4f75f3595ce768bc1afe3de9fc8e962242c7ab8" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?TinySVM[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a2eb89bfd1881f7b67dce74b71a07303f8fb67833fb83d269f1a5546ef23250f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abf56f8965d9604d945e925ce1d7fe4bb6dfe40a3290f7e60dd7308be6f7e211" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "75db20d17ee9a60546200f1a0329d5f9c66ae6f162d7b821ac888a27016bfc79" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9d10346e2bcb343d454ce390ad8388b25b3fd0040e9d0d163cf34db818b3d124" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6c2118088fe8eead47f050a218c6c7c5928f1c127cfebfb6652f845d5fa195fd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0bc765f1a83890ba72ab3ddd3b7c43d947b4f8e2aaac19807e7703c6ee58158b" + sha256 cellar: :any_skip_relocation, sonoma: "12ea52272fb0b0d6d7a3dbd64037a014c0c8be9c5c1f1d32b1ea89626bb76041" + sha256 cellar: :any_skip_relocation, ventura: "0fed16a29b53d89101342664aed44ff3c3341d012ff02ba3b17de3bec6e5ceda" + sha256 cellar: :any_skip_relocation, monterey: "06e39f32239001cf5191e4896a8c8714c598513769e08129c182f47aa7f47366" + sha256 cellar: :any_skip_relocation, big_sur: "2ead575e862216b468d3f55c0b20789405f25e03667838da0fadeb0bd3931d37" + sha256 cellar: :any_skip_relocation, catalina: "5bbed1c1f653d0fde6a8e82740a18f8f0e4c95f6d06c7c14dd8dbd4ed096c758" + sha256 cellar: :any_skip_relocation, arm64_linux: "b94cad8abff9ac7cd69e6e0946255e477dba4c6038e1ff8609b9ea499c9d5e1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8706fa788fd556b7f18b3c1aee12390a933b5eafaa909508304d6992f218e02d" + end + + # Use correct compilation flag, via MacPorts. + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/tinysvm/patch-configure.diff" + sha256 "b4cd84063fd56cdcb0212528c6d424788528a9d6b8b0a17aa01294773c62e8a7" + end + + def install + # Needed to select proper getopt, per MacPorts + ENV.append_to_cflags "-D__GNU_LIBRARY__" + + # Fix for newer clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--host=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--mandir=#{man}", "--disable-shared", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"train.svmdata").write <<~EOS + +1 201:1.2 3148:1.8 3983:1 4882:1 + -1 874:0.3 3652:1.1 3963:1 6179:1 + +1 1168:1.2 3318:1.2 3938:1.8 4481:1 + +1 350:1 3082:1.5 3965:1 6122:0.2 + -1 99:1 3057:1 3957:1 5838:0.3 + EOS + + (testpath/"train.svrdata").write <<~EOS + 0.23 201:1.2 3148:1.8 3983:1 4882:1 + 0.33 874:0.3 3652:1.1 3963:1 6179:1 + -0.12 1168:1.2 3318:1.2 3938:1.8 4481:1 + EOS + + system bin/"svm_learn", "-t", "1", "-d", "2", "-c", "train.svmdata", "test" + system bin/"svm_classify", "-V", "train.svmdata", "test" + system bin/"svm_model", "test" + + assert_path_exists testpath/"test" + end +end diff --git a/Formula/t/tinyxml.rb b/Formula/t/tinyxml.rb new file mode 100644 index 0000000000000..b328b88a22689 --- /dev/null +++ b/Formula/t/tinyxml.rb @@ -0,0 +1,92 @@ +class Tinyxml < Formula + desc "XML parser" + homepage "https://sourceforge.net/projects/tinyxml/" + url "https://downloads.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" + sha256 "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593" + license "Zlib" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d9865bd3033992b304259880d063f35dd08c314ecf0f3a627a6dda616e946b8b" + sha256 cellar: :any, arm64_sonoma: "bc5be45bfaaab1e89a96c0fba01f026586cfd831d067a5a534b3c72de7026f83" + sha256 cellar: :any, arm64_ventura: "5ce481b9f659d845c681b7b88daac645064e622d9e3f93710f35ecc58821a4cf" + sha256 cellar: :any, arm64_monterey: "aaed7baf7452fd109d0fd56329e123f22aa9cef10e03457be3c264558d2d48bc" + sha256 cellar: :any, arm64_big_sur: "04fccb4076db86eb901b710f5d50b01ea6e6cec907979aed5eb5135c9654e16d" + sha256 cellar: :any, sonoma: "411be9ab2a72b062658be8540ca60f4e7df5b8cdf87d8d08717828d5265c89ce" + sha256 cellar: :any, ventura: "36c60c1b48773714de769e0cf8f29601304c28e83c04469d10a9230cd46fd132" + sha256 cellar: :any, monterey: "ab27b95104332e68e5bda836a4044b972add1033f8dc9622472a7b9682eceed3" + sha256 cellar: :any, big_sur: "e98aaca0d889c322b5e2294495e7613e656773fb5f605a6239d8b85949011b99" + sha256 cellar: :any, catalina: "7cc1ada5d273bec9f50a1809a9989306ec9601a037c06b362cee321fbdc5c0a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5e3985222d867ac93818435d71472b2b51de10c1e9fb5bc1cfeefc78b56c123" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ade5525899de7063ade79d1b0dec70ceef3d0acc08e1dc1b55e937cb539ad38d" + end + + # sourceforge recommends tinyxml2 as an alternative + disable! date: "2025-06-03", because: :deprecated_upstream + + depends_on "cmake" => :build + + # The first two patches are taken from the debian packaging of tinyxml. + # The first patch enforces use of stl strings, rather than a custom string type. + # The second patch is a fix for incorrect encoding of elements with special characters + # originally posted at https://sourceforge.net/p/tinyxml/patches/51/ + # The third patch adds a CMakeLists.txt file to build a shared library and provide an install target + # submitted upstream as https://sourceforge.net/p/tinyxml/patches/66/ + patch do + url "https://raw.githubusercontent.com/robotology/yarp/59eedfbaa1069aa5f03a4a9980d984d59decd55c/extern/tinyxml/patches/enforce-use-stl.patch" + sha256 "16a5b5e842eb0336be606131e5fb12a9165970f7bd943780ba09df2e1e8b29b1" + end + + patch do + url "https://raw.githubusercontent.com/robotology/yarp/59eedfbaa1069aa5f03a4a9980d984d59decd55c/extern/tinyxml/patches/entity-encoding.patch" + sha256 "c5128e03933cd2e22eb85554d58f615f4dbc9177bd144cae2913c0bd7b140c2b" + end + + patch do + url "https://gist.githubusercontent.com/scpeters/6325123/raw/cfb079be67997cb19a1aee60449714a1dedefed5/tinyxml_CMakeLists.patch" + sha256 "32160135c27dc9fb7f7b8fb6cf0bf875a727861db9a07cf44535d39770b1e3c7" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (lib/"pkgconfig/tinyxml.pc").write pc_file + end + + def pc_file + <<~EOS + prefix=#{opt_prefix} + exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: TinyXml + Description: Simple, small, C++ XML parser + Version: #{version} + Libs: -L${libdir} -ltinyxml + Cflags: -I${includedir} + EOS + end + + test do + (testpath/"test.xml").write <<~XML + + World + XML + + (testpath/"test.cpp").write <<~CPP + #include + + int main() + { + TiXmlDocument doc ("test.xml"); + doc.LoadFile(); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-L#{lib}", "-ltinyxml", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/tinyxml2.rb b/Formula/t/tinyxml2.rb new file mode 100644 index 0000000000000..a5bcf1f429a72 --- /dev/null +++ b/Formula/t/tinyxml2.rb @@ -0,0 +1,39 @@ +class Tinyxml2 < Formula + desc "Improved tinyxml (in memory efficiency and size)" + homepage "https://leethomason.github.io/tinyxml2/" + url "https://github.com/leethomason/tinyxml2/archive/refs/tags/11.0.0.tar.gz" + sha256 "5556deb5081fb246ee92afae73efd943c889cef0cafea92b0b82422d6a18f289" + license "Zlib" + head "https://github.com/leethomason/tinyxml2.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "13273ba8306a9e264423051435f0af43915ab99d865a537e39bf4fb517e06c24" + sha256 cellar: :any, arm64_sequoia: "547cd64f4a05b78839ba3b1aa14f062a0bfe39c54fe22d34229c729f5258fbd4" + sha256 cellar: :any, arm64_sonoma: "c2003e2db45283b198c1bdedde97f4802da748639ccf484d1bd88a7802bd6149" + sha256 cellar: :any, arm64_ventura: "1e5668be8fa0aa9055dd729b63c8e588093e2ed7142f3f1987b646ede0cd46eb" + sha256 cellar: :any, sonoma: "7e9a788c39b407964a7c3fe4314597f9dcd79ccfb2e0285bed668400a683f656" + sha256 cellar: :any, ventura: "65a3ebdb7165567537c04c772f7bda89bf86c76aaeae1bed179807be0925b04f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7f5f7fc450393d4fc812c231db8b66464ee6f40be800b5e77bfb89ea819e6b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13c9eee32ef5d3a82e63177c56653c9514b179a4c07f42c4b1bccbae27e0670b" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-Dtinyxml2_SHARED_LIBS=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + tinyxml2::XMLDocument doc (false); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-ltinyxml2", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/tio.rb b/Formula/t/tio.rb new file mode 100644 index 0000000000000..6df2c4c6ba3e2 --- /dev/null +++ b/Formula/t/tio.rb @@ -0,0 +1,44 @@ +class Tio < Formula + desc "Simple TTY terminal I/O application" + homepage "https://tio.github.io" + url "https://github.com/tio/tio/releases/download/v3.9/tio-3.9.tar.xz" + sha256 "06fe0c22e3e75274643c017928fbc85e86589bc1acd515d92f98eecd4bbab11b" + license "GPL-2.0-or-later" + head "https://github.com/tio/tio.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "31136d19c38be07ad62a597959f7477b9afbd9aaafeae6f88c8a55391fd35f0e" + sha256 cellar: :any, arm64_sequoia: "d859f7a3951e0cf44e33cef1cd9fe1cf1f5ea2027e8a0f2f7241d802f6345528" + sha256 cellar: :any, arm64_sonoma: "815733f3d33d84e6b6f16a616dd4c1ee1dfea19d1310842579796c86c80d78d2" + sha256 cellar: :any, arm64_ventura: "ef6cda9f15f7419c8786fde48e36050b8e0527d1ac9b7da60c701cd8be29893f" + sha256 cellar: :any, sonoma: "eff6132fd0c5bc4d35e5f44a97e8b7538881f3d35c75d45bb5ce58c7116fa024" + sha256 cellar: :any, ventura: "af299fc0c5b32da363167450793ca0ae78f40605353db850da9f9c684d384ffe" + sha256 arm64_linux: "42266b46a3364e7b85daec0a33922996016880c7905707dc23aead6a8baa3c9a" + sha256 x86_64_linux: "2a5457998f6b942835c7bcfdb22fb9673abaecf9dce98eb65c3ab67a18529aa9" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "lua" + + def install + system "meson", "setup", "build", "-Dbashcompletiondir=#{bash_completion}", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # Test that tio emits the correct error output when run with an argument that is not a tty. + # Use `script` to run tio with its stdio attached to a PTY, otherwise it will complain about that instead. + expected = "Error: Not a tty device" + output = if OS.mac? + shell_output("script -q /dev/null #{bin}/tio /dev/null", 1).strip + else + shell_output("script -q /dev/null -e -c \"#{bin}/tio /dev/null\"", 1).strip + end + assert_match expected, output + end +end diff --git a/Formula/t/tippecanoe.rb b/Formula/t/tippecanoe.rb new file mode 100644 index 0000000000000..9e9c0732ec237 --- /dev/null +++ b/Formula/t/tippecanoe.rb @@ -0,0 +1,38 @@ +class Tippecanoe < Formula + desc "Build vector tilesets from collections of GeoJSON features" + homepage "https://github.com/felt/tippecanoe" + url "https://github.com/felt/tippecanoe/archive/refs/tags/2.79.0.tar.gz" + sha256 "b0fd9df49b6efc988288ea48774822c6de19eb48428017f27ee0b3b01d44f05d" + license "BSD-2-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "41f5baacdcf8fb2a3eecf025c42119d054823382187bbc2aec283d48e4f352aa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3c3e2348158de483fb2736c54062b15f60556cd8df3d2ce6dc51887ab10e9b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6f03bd4804e1dfd92a168d64780a83fa141071211da196f8dec7ac2c2d5bb7bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6faf6f939872e4aced660fbadbc532a1fe89266160e35605fc3898423759c140" + sha256 cellar: :any_skip_relocation, sonoma: "45ceaa42ef046d217a7beb96d03b620204f5409e456419585e5a4f5a9bd2dbc7" + sha256 cellar: :any_skip_relocation, ventura: "0be791fe0605b84f8c2f33ac9d544227d7ef8bb8a36396f66c431f851ddee57b" + sha256 cellar: :any_skip_relocation, arm64_linux: "355ea18747634ebd9f8f60e49e4cee3ba58f1bf2ec636d282bc16371c1d1e525" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8548c16fa99ffc64952302b930cc240e2b917fad2e91379b9e8a6eaae05c3461" + end + + uses_from_macos "sqlite" + uses_from_macos "zlib" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.json").write <<~JSON + {"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0,0]}} + JSON + safe_system bin/"tippecanoe", "-o", "test.mbtiles", "test.json" + assert_path_exists testpath/"test.mbtiles", "tippecanoe generated no output!" + end +end diff --git a/Formula/t/titan-server.rb b/Formula/t/titan-server.rb new file mode 100644 index 0000000000000..7a014688b4e3d --- /dev/null +++ b/Formula/t/titan-server.rb @@ -0,0 +1,43 @@ +class TitanServer < Formula + desc "Distributed graph database" + homepage "https://thinkaurelius.github.io/titan/" + url "http://s3.thinkaurelius.com/downloads/titan/titan-1.0.0-hadoop1.zip" + version "1.0.0" + sha256 "67538e231db5be75821b40dd026bafd0cd7451cdd7e225a2dc31e124471bb8ef" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad979abf4355375d61b23ec670d548680090f6d8ce4616c00f6c039fa99a1838" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6d98726b834d82fe0adb786919652c5f0e0974ff3cb03969b2c69042cd4998c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d152d5cdf3a9a8f600f9956f9e1687a4cbcccbda4398c69ddde2d44a42d43723" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d152d5cdf3a9a8f600f9956f9e1687a4cbcccbda4398c69ddde2d44a42d43723" + sha256 cellar: :any_skip_relocation, sonoma: "aa9d2a7bdbbec0244fe31f207bcf289a8453fb9e8786239669180e5b867450df" + sha256 cellar: :any_skip_relocation, ventura: "11f1ceef4d191f1bf683fdec2a0cff3ffff8510b373e83fa12065af581583e0e" + sha256 cellar: :any_skip_relocation, monterey: "6e84706c4de8f9288fe11a9c28d0b6901289ce45ddcd7ff51abc1ecfcc6f3ac3" + sha256 cellar: :any_skip_relocation, big_sur: "6e84706c4de8f9288fe11a9c28d0b6901289ce45ddcd7ff51abc1ecfcc6f3ac3" + sha256 cellar: :any_skip_relocation, catalina: "6e84706c4de8f9288fe11a9c28d0b6901289ce45ddcd7ff51abc1ecfcc6f3ac3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6d98726b834d82fe0adb786919652c5f0e0974ff3cb03969b2c69042cd4998c" + end + + # upstream is not responsive on the issues and no commits since 2015 dec + # community has forked the project to janusgraph + # https://github.com/thinkaurelius/titan/issues/1393 + # https://github.com/thinkaurelius/titan/issues/1392 + disable! date: "2025-01-01", because: :does_not_build + + on_linux do + depends_on "openjdk" + end + + def install + libexec.install %w[bin conf data ext javadocs lib log scripts] + bin.install_symlink libexec/"bin/titan.sh" => "titan" + bin.install_symlink libexec/"bin/gremlin.sh" => "titan-gremlin" + bin.install_symlink libexec/"bin/gremlin-server.sh" => "titan-gremlin-server" + end + + test do + assert_match("not found in the java process table", shell_output("#{bin}/titan stop")) + end +end diff --git a/Formula/t/titlecase.rb b/Formula/t/titlecase.rb new file mode 100644 index 0000000000000..7ea8549abbf18 --- /dev/null +++ b/Formula/t/titlecase.rb @@ -0,0 +1,21 @@ +class Titlecase < Formula + desc "Script to convert text to title case" + homepage "http://plasmasturm.org/code/titlecase/" + url "https://github.com/ap/titlecase/archive/refs/tags/v1.015.tar.gz" + sha256 "908ef5c40d103200bcc9bd8a55171f20e14d09166aaa556dc91611567d695811" + license "MIT" + head "https://github.com/ap/titlecase.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "58818d9ed040c4248d0fde4cbbd9affdc6ecde2b9cd3d3fd3ea74df606ffa6ee" + end + + def install + bin.install "titlecase" + end + + test do + (testpath/"test").write "homebrew" + assert_equal "Homebrew\n", shell_output("#{bin}/titlecase test") + end +end diff --git a/Formula/t/tivodecode.rb b/Formula/t/tivodecode.rb new file mode 100644 index 0000000000000..b8a881c2497a1 --- /dev/null +++ b/Formula/t/tivodecode.rb @@ -0,0 +1,39 @@ +class Tivodecode < Formula + desc "Convert .tivo to .mpeg" + homepage "https://tivodecode.sourceforge.net/" + url "https://downloads.sourceforge.net/project/tivodecode/tivodecode/0.2pre4/tivodecode-0.2pre4.tar.gz" + sha256 "788839cc4ad66f5b20792e166514411705e8564f9f050584c54c3f1f452e9cdf" + # The `:cannot_represent` is for the Turing encryption algorithm under a non-SPDX + # QUALCOMM license which has similar restrictions to BSD-Systemics along with an + # additional clause relating to the use of patented encryption algorithms. + license all_of: ["BSD-3-Clause", :cannot_represent] + + livecheck do + url :stable + regex(%r{url=.*?/tivodecode[._-]v?(\d+(?:\.\d+)+(?:pre\d+)?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6aef5d85f98c48a4aa08864d14228ae5770baf31272041e54624ef837c977000" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43393a250746ba85b622a828143a3a24a89d89ffb72b2c38d05161432fd73875" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4c625902dffd6e9e9827abf8d13961e8863e191323b8b909f02358bef81ee5f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "edea82441461a1fb59d0b4ffff0c70063e2dd064bbcbaf7dd2f35a9fbc464602" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d2289a446ab7ec226d1b6b3ddb042336d0a223009268984fa5d949394842e2e6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5171d7774e6eed485e7b3d57e3dd2b9bc0e935f97dd7890109ccdb3c4975ab62" + sha256 cellar: :any_skip_relocation, sonoma: "794351b4fb9c017c7d4c870ec11db2ecdfff74c0700ab310077045faf020a76d" + sha256 cellar: :any_skip_relocation, ventura: "2e6c1b18e7f2309d3ff7197901b23c59e548242cf2489daca28f0b8faca44ee5" + sha256 cellar: :any_skip_relocation, monterey: "dab7b05eb81397cfcb9e875a351d24d3a05741c77aaf28da7411318ef72dd770" + sha256 cellar: :any_skip_relocation, big_sur: "aeec3ab80bd78902f47343a699f3ebd4566b2d3fd9ce8076550bd705caf69486" + sha256 cellar: :any_skip_relocation, catalina: "153d8b8e152ccf3c87041ff40739a80952da5ad06c572d7febb9b222b16069e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "69e56e2279ac41857a466d4eac31b69c6dfc3ad70899e26adb1908e39bdcf387" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28e4184504b5139d3532d972cad416bcd9188669c075681e36834f4e93d2b60d" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end +end diff --git a/Formula/t/tkdiff.rb b/Formula/t/tkdiff.rb new file mode 100644 index 0000000000000..54f479c0e16c8 --- /dev/null +++ b/Formula/t/tkdiff.rb @@ -0,0 +1,34 @@ +class Tkdiff < Formula + desc "Graphical side by side diff utility" + homepage "https://tkdiff.sourceforge.io/" + url "https://downloads.sourceforge.net/project/tkdiff/tkdiff/6.0/tkdiff-6-0.zip" + version "6.0" + sha256 "4fa27c87846c1d6635da5beaa90ce4561638ee25a9169e455175afcf5288e453" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/tkdiff/v?(\d+(?:\.\d+)+)/[^"]+?\.zip}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0d252a16273fc3118cb657242250606329c9076ea30a20ba5ecbffd2b7d304d5" + end + + # upstream bug report about running with system tcl-tk, https://sourceforge.net/p/tkdiff/bugs/98/ + depends_on "tcl-tk" + + def install + bin.install "tkdiff" + end + + test do + # Fails with: no display name and no $DISPLAY environment variable on GitHub Actions + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + system bin/"tkdiff", "--help" + end +end diff --git a/Formula/t/tkey-ssh-agent.rb b/Formula/t/tkey-ssh-agent.rb new file mode 100644 index 0000000000000..907c6dc307a91 --- /dev/null +++ b/Formula/t/tkey-ssh-agent.rb @@ -0,0 +1,81 @@ +class TkeySshAgent < Formula + desc "SSH agent for use with the TKey security stick" + homepage "https://tillitis.se/" + url "https://github.com/tillitis/tkey-ssh-agent/archive/refs/tags/v1.0.0.tar.gz" + sha256 "abe43e1948101a5da007ff997161216ee7d44a54e3fa6b0aa255c22fcab11ae1" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0812ed782ed16ff61d9d05b4d8694d88f7933d292de9c4b76fe854478f214e15" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92e34132b71fc3c562a8353058c5deaf720fc80f243dccd3eb5dac62a95c2d65" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "858a66ab63cfde2b070de13ee0d7e440a13d3215c3fb8f97714fa28b5c20b4d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c191dcb7265469492b7bdc6f9acd2acdee23149d96c5e91d74bd7a01c90a8d02" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9b84ded0ad2a15580436087607efaf173b28356d4ce46ace2862947d4cb41b05" + sha256 cellar: :any_skip_relocation, sonoma: "d3f4b8eeaf67e42b56043d539607a54f5a28eb6ecea69c3d62744ac027c8865d" + sha256 cellar: :any_skip_relocation, ventura: "80ff5be57d0784f94c05403897524d25f26779a0474eb5699833134f575fa7d2" + sha256 cellar: :any_skip_relocation, monterey: "464090fb25f2826ce0495ebd2d17c39276726044e3d6bc87ea22ceac9d7db469" + sha256 cellar: :any_skip_relocation, arm64_linux: "008ad6f1db8ea8650a084cd5d75312202ae93222ad7835eb5b33d893dbd8ec29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e001c74cb92e401e908892f2baedade9fc815124f6ca28b45db0c06c3599172" + end + + depends_on "go" => :build + + on_macos do + depends_on "pinentry-mac" + end + + on_linux do + depends_on "pinentry" + end + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/tkey-ssh-agent" + man1.install "system/tkey-ssh-agent.1" + end + + def post_install + (var/"run").mkpath + (var/"log").mkpath + end + + def caveats + <<~EOS + To use this SSH agent, set this variable in your ~/.zshrc and/or ~/.bashrc: + export SSH_AUTH_SOCK="#{var}/run/tkey-ssh-agent.sock" + EOS + end + + service do + run macos: [ + opt_bin/"tkey-ssh-agent", + "--agent-socket", + var/"run/tkey-ssh-agent.sock", + "--uss", + "--pinentry", + HOMEBREW_PREFIX/"bin/pinentry-mac", + ], + linux: [ + opt_bin/"tkey-ssh-agent", + "--agent-socket", + var/"run/tkey-ssh-agent.sock", + "--uss", + ] + keep_alive true + log_path var/"log/tkey-ssh-agent.log" + error_log_path var/"log/tkey-ssh-agent.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tkey-ssh-agent --version") + socket = testpath/"tkey-ssh-agent.sock" + fork { exec bin/"tkey-ssh-agent", "--agent-socket", socket } + sleep 1 + assert_path_exists socket + end +end diff --git a/Formula/t/tkrzw.rb b/Formula/t/tkrzw.rb new file mode 100644 index 0000000000000..579553d2a002e --- /dev/null +++ b/Formula/t/tkrzw.rb @@ -0,0 +1,55 @@ +class Tkrzw < Formula + desc "Set of implementations of DBM" + homepage "https://dbmx.net/tkrzw/" + url "https://dbmx.net/tkrzw/pkg/tkrzw-1.0.32.tar.gz" + sha256 "d3404dfac6898632b69780c0f0994c5f6ba962191a61c9b0f4b53ba8bb27731c" + license "Apache-2.0" + + livecheck do + url "https://dbmx.net/tkrzw/pkg/" + regex(/href=.*?tkrzw[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "fc118de56a8fac03f58c69b8af87157ba99f837885e0bf92ba6a6c3190b72af4" + sha256 arm64_sequoia: "ab5d487ff3e9827fdc4c61a698a2bd94ac7476b90530dcff5644a325ba8a93a7" + sha256 arm64_sonoma: "70cbd979207abeae3c522f5f1a8fd8bf72eeeafdd015e80d780b185e7668b14c" + sha256 sonoma: "c8a0f6879237655ef6a8e0a25293b3be58e87f6e65c0441690e409ad9337b75f" + sha256 arm64_linux: "c2762232e09d5ba59613499f799af33b1c835403ffa3b55940b5cb1e83122322" + sha256 x86_64_linux: "8071105a6bd977363587e9d2995cc5d7b1a53da7a905d082df4033598ef1728e" + end + + uses_from_macos "zlib" + + def install + if OS.linux? + ENV.append_to_cflags "-I#{Formula["zlib"].opt_include}" + ENV.append "LDFLAGS", "-L#{Formula["zlib"].opt_lib}" + end + # Don't add -lstdc++ to tkrzw_build_util and tkrzw.pc + ENV["ac_cv_lib_stdcpp_main"] = "no" if ENV.compiler == :clang + + system "./configure", "--enable-zlib", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "tkrzw_dbm_hash.h" + int main(int argc, char** argv) { + tkrzw::HashDBM dbm; + dbm.Open("casket.tkh", true).OrDie(); + dbm.Set("hello", "world").OrDie(); + std::cout << dbm.GetSimple("hello") << std::endl; + dbm.Close().OrDie(); + return 0; + } + CPP + + cflags = shell_output("#{bin}/tkrzw_build_util config -i").chomp.split + ldflags = shell_output("#{bin}/tkrzw_build_util config -l").chomp.split + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *cflags, *ldflags + assert_equal "world\n", shell_output("./test") + end +end diff --git a/Formula/t/tl-expected.rb b/Formula/t/tl-expected.rb new file mode 100644 index 0000000000000..3e5a951764485 --- /dev/null +++ b/Formula/t/tl-expected.rb @@ -0,0 +1,59 @@ +class TlExpected < Formula + desc "C++11/14/17 std::expected with functional-style extensions" + homepage "https://tl.tartanllama.xyz/en/latest/" + url "https://github.com/TartanLlama/expected/archive/refs/tags/v1.3.1.tar.gz" + sha256 "9a04f4f472fbb5c30bf60402f1ca626c4a76987f867978d0b8a35d7ab3fb8fe7" + license "CC0-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c0a6195be54cf7f219a4a6f4d9f4fd5955b00f24a786f21d28a48a0d7bd3b98b" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DEXPECTED_ENABLE_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + tl::expected divide(int a, int b) { + if (b == 0) { + return tl::make_unexpected("Division by zero"); + } + return a / b; + } + + int main() { + auto result = divide(10, 5); + if (result) { + std::cout << "Result: " << *result << std::endl; + } else { + std::cout << "Error: " << result.error() << std::endl; + } + + result = divide(2, 0); + if (result) { + std::cout << "Result: " << *result << std::endl; + } else { + std::cout << "Error: " << result.error() << std::endl; + } + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-o", "test" + assert_equal <<~EOS, shell_output("./test") + Result: 2 + Error: Division by zero + EOS + end +end diff --git a/Formula/t/tldr.rb b/Formula/t/tldr.rb new file mode 100644 index 0000000000000..dd1538646eaaa --- /dev/null +++ b/Formula/t/tldr.rb @@ -0,0 +1,44 @@ +class Tldr < Formula + desc "Simplified and community-driven man pages" + homepage "https://tldr.sh/" + url "https://github.com/tldr-pages/tldr-c-client/archive/refs/tags/v1.6.1.tar.gz" + sha256 "1a2aa8e764846fad1f41a0304e28416f5c38b6d3a3131ad1e85116749aec34ba" + license "MIT" + head "https://github.com/tldr-pages/tldr-c-client.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "da6e060988186434dccc852f32e1f8869b82257b22fbfa96dd14ab4d219ad863" + sha256 cellar: :any, arm64_sequoia: "6af1cb13f99042c4bf60228a9365f1578488990549dba76a844909b6033c61c7" + sha256 cellar: :any, arm64_sonoma: "00d61b3c3ffb5df313b167d915d0f10896f2bfb5b4336f51332f0d7e84e2f6b2" + sha256 cellar: :any, arm64_ventura: "32223909bb7889f5b22a95b27676700eddf3c2e4a889332ce3f04e70e1faa1cd" + sha256 cellar: :any, arm64_monterey: "87a1252e89172fb34ebb77a20f1224c9941cd9315c5746e4fb930cc01ddb66b3" + sha256 cellar: :any, sonoma: "86f757f6250dc09efccab23100a8a5b402475c8ae4e3264eebf4563dddf5435b" + sha256 cellar: :any, ventura: "af00415190134abec3feec158ebc30e3511c43fc07b22dd2d8acf4e669564d0e" + sha256 cellar: :any, monterey: "65388c830508d2935fc720af7ca9851dfe8a0a08000644f513b26e61098450de" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebe1e16b5e69d08b0cf773f4a681d1f28cef6b0cab984d41ceef64d9cf68721d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1e92ca409631c8006533f00706aeb966dcd6d7ee175b51c8aceeab523ebb3f5" + end + + deprecate! date: "2024-10-24", because: :unmaintained, replacement_formula: "tlrc" + disable! date: "2025-10-24", because: :unmaintained, replacement_formula: "tlrc" + + depends_on "pkgconf" => :build + depends_on "libzip" + + uses_from_macos "curl" + + conflicts_with "tlrc", because: "both install `tldr` binaries" + conflicts_with "tealdeer", because: "both install `tldr` binaries" + + def install + system "make", "PREFIX=#{prefix}", "install" + + bash_completion.install "autocomplete/complete.bash" => "tldr" + zsh_completion.install "autocomplete/complete.zsh" => "_tldr" + fish_completion.install "autocomplete/complete.fish" => "tldr.fish" + end + + test do + assert_match "brew", shell_output("#{bin}/tldr brew") + end +end diff --git a/Formula/t/tldx.rb b/Formula/t/tldx.rb new file mode 100644 index 0000000000000..7969af348341b --- /dev/null +++ b/Formula/t/tldx.rb @@ -0,0 +1,30 @@ +class Tldx < Formula + desc "Domain Availability Research Tool" + homepage "https://brandonyoung.dev/blog/introducing-tldx/" + url "https://github.com/brandonyoungdev/tldx/archive/refs/tags/v1.3.0.tar.gz" + sha256 "4e72535ad99396ad1f4d2322024f317fd5d3f05d3e82a645fa403d3ce95b3729" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "76759fb677db0005af23b2da332e69128e055472d504ba29b1223b9abd72ce1a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84bddde265a819e8ca9466fa889b68ce364cc362c83d3c3f18e5491025bca97f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84bddde265a819e8ca9466fa889b68ce364cc362c83d3c3f18e5491025bca97f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "84bddde265a819e8ca9466fa889b68ce364cc362c83d3c3f18e5491025bca97f" + sha256 cellar: :any_skip_relocation, sonoma: "4a1dbaa3bf0602624c72c21bbf828f50717d921de9891ffee378696a60ebe533" + sha256 cellar: :any_skip_relocation, ventura: "4a1dbaa3bf0602624c72c21bbf828f50717d921de9891ffee378696a60ebe533" + sha256 cellar: :any_skip_relocation, arm64_linux: "def1739918a5766e8ee7b466e9b84b6b6abdd9c93b7561da1d0d8e817a924768" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc23b2e244244574127afec5b6194eb2d2ed206dd0e3fe42fb5f054154a9096f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/brandonyoungdev/tldx/cmd.Version=#{version}") + end + + test do + assert_match "brew.sh is not available", shell_output("#{bin}/tldx brew --tlds sh") + + assert_match version.to_s, shell_output("#{bin}/tldx --version") + end +end diff --git a/Formula/t/tllist.rb b/Formula/t/tllist.rb new file mode 100644 index 0000000000000..e4a4148127b4b --- /dev/null +++ b/Formula/t/tllist.rb @@ -0,0 +1,42 @@ +class Tllist < Formula + desc "C header file only implementation of a typed linked list" + homepage "https://codeberg.org/dnkl/tllist" + url "https://codeberg.org/dnkl/tllist/archive/1.1.0.tar.gz" + sha256 "0e7b7094a02550dd80b7243bcffc3671550b0f1d8ba625e4dff52517827d5d23" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "77de1b3da7cd1dabd452b4275407c913e1b43152a8617515d3bdee49124a094e" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + tll(int) an_integer_list = tll_init(); + + tll_push_back(an_integer_list, 4711); + tll_push_back(an_integer_list, 1234); + + printf("%zu", tll_length(an_integer_list)); + } + C + + system ENV.cc, "test.c", "-I#{include}", "-o", "test" + + assert_equal "2", shell_output("./test") + end +end diff --git a/Formula/t/tlrc.rb b/Formula/t/tlrc.rb new file mode 100644 index 0000000000000..7e1a412867e87 --- /dev/null +++ b/Formula/t/tlrc.rb @@ -0,0 +1,36 @@ +class Tlrc < Formula + desc "Official tldr client written in Rust" + homepage "https://tldr.sh/tlrc/" + url "https://github.com/tldr-pages/tlrc/archive/refs/tags/v1.12.0.tar.gz" + sha256 "402942f1bc37301da9dd1870294d7edd8e81989a178c6439cfbd866d9a9bf67a" + license "MIT" + head "https://github.com/tldr-pages/tlrc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "09c51b3ef2e33c87d899f0480a720bb4224f65329a091370344b984d42f48eac" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f82f86ffb0b23c55d52ee4345d70d1d47cf089ae79232f77e1539a4913014795" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0612abdd2e4e06c1267c2dd0f1d9e15db481245bb4a24bad18609c7e5c55bea7" + sha256 cellar: :any_skip_relocation, sonoma: "202da0505b809d8acd1000455f1ae63ccdcb589a5ec8b416f7c34c5a2b46a505" + sha256 cellar: :any_skip_relocation, arm64_linux: "38d841e720d52704ac843b20260fb9e5ab5ee89f57e4cde8b6aea4172be3e835" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7ce495afb5e5f4e97c9393d46f6b6a09e716626f2352729840a0c055db562e0" + end + + depends_on "rust" => :build + + conflicts_with "tealdeer", because: "both install `tldr` binaries" + conflicts_with "tldr", because: "both install `tldr` binaries" + + def install + system "cargo", "install", *std_cargo_args + + man1.install "tldr.1" + + bash_completion.install "completions/tldr.bash" => "tldr" + zsh_completion.install "completions/_tldr" + fish_completion.install "completions/tldr.fish" + end + + test do + assert_match "brew", shell_output("#{bin}/tldr brew") + end +end diff --git a/Formula/t/tlsx.rb b/Formula/t/tlsx.rb new file mode 100644 index 0000000000000..03268a815cb48 --- /dev/null +++ b/Formula/t/tlsx.rb @@ -0,0 +1,35 @@ +class Tlsx < Formula + desc "Fast and configurable TLS grabber focused on TLS based data collection" + homepage "https://github.com/projectdiscovery/tlsx" + url "https://github.com/projectdiscovery/tlsx/archive/refs/tags/v1.2.1.tar.gz" + sha256 "d79c827791275a9ad4b5967b06828deecab55bedb2b7af641a6c01a28e37f113" + license "MIT" + head "https://github.com/projectdiscovery/tlsx.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "25ccf9a4adab06e88260f863187fb359ae9af9e759a418571e0705ecc0ab0007" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b523148d9ff50e73445a9df48bf3687f12db49373c4897681b72fc454dfe40da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40c8b59e628608c15ea5a079e9fd4a1f728244df2025c7c7d06cc5a28c55f0dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4910b7d50091cdcb006c704f748248db8d01739cdeb10332451e21d78f1162d8" + sha256 cellar: :any_skip_relocation, sonoma: "743d4e7e663604afe1c9f4311c5cbe047644c2e4342373969c6a2c44ac8d5cac" + sha256 cellar: :any_skip_relocation, ventura: "02cee159f2b303a124a4ed749730b301fa6d5a7dc50e551c1ee248e59b14fb73" + sha256 cellar: :any_skip_relocation, arm64_linux: "20f4d72c7b38682c7e8564fa7d4f1264e51cafb3d5bc6d49a3e66a523cfdec10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17c25ab219ce2f06967bff6fe499ed44fa9dc6ab7c20225ef50369eaca6ef3a7" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/tlsx" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tlsx -version 2>&1") + system bin/"tlsx", "-u", "expired.badssl.com:443", "-expired" + end +end diff --git a/Formula/t/tlx.rb b/Formula/t/tlx.rb new file mode 100644 index 0000000000000..6f8188ab34bb4 --- /dev/null +++ b/Formula/t/tlx.rb @@ -0,0 +1,50 @@ +class Tlx < Formula + desc "Collection of Sophisticated C++ Data Structures, Algorithms and Helpers" + homepage "https://tlx.github.io" + url "https://github.com/tlx/tlx/archive/refs/tags/v0.6.1.tar.gz" + sha256 "24dd1acf36dd43b8e0414420e3f9adc2e6bb0e75047e872a06167961aedad769" + license "BSL-1.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "24a8426be33e4421b2f636ba05b6784352bd1a559e5b2dde90ecae8420e0f591" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e35cf4b2cf66334a3c6782fef229a96684942f5aa07063874e0020fb319e15b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2be507f7ba45c99557ac676c7c47b0288b5e364a2c61b33e2abf173865e8f9b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5bf4de79e505634d807afd511f8c30b43e1f770a0d727549f8428fa504308f2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4d67f614d8877c5fc1796c9e7c4d913fe085890e2556908fb7d0ee767c7bbdd3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "14ad8d90c73c62b2e9b1332ed5ffbe59487cfbcf36d0157390fd9e59327ec6c5" + sha256 cellar: :any_skip_relocation, sonoma: "66a4109ede842a3ea53e81b6938ec834860b439d43254ddad12ed173ec479e9e" + sha256 cellar: :any_skip_relocation, ventura: "1fa9c67739a557c7faba1bf0a20352d8ecef8e79f32ba8caf2ef293fdc098dcd" + sha256 cellar: :any_skip_relocation, monterey: "0065add2f25b25eeb527aeb48625e34563d0afb702a496c67223ee78f3570547" + sha256 cellar: :any_skip_relocation, big_sur: "00ee92b029c92c9ac1f8326e9b039970097b802fe6ab79c2b8cf33251e3e7f60" + sha256 cellar: :any_skip_relocation, arm64_linux: "8740b303922f5a8190cddac66aeb6262a7c0dfa633cd98add555d0e4e1cdc6e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e67f35bf407415cf0ab4f5afba211439f82b8da3495a6a52b0301c3a76f099b8" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4.0+ + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + tlx::Aggregate agg; + for (int i = 0; i < 30; ++i) { + agg.add(i); + } + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-ltlx", "-o", "test", "-std=c++17" + system "./test" + end +end diff --git a/Formula/t/tm.rb b/Formula/t/tm.rb new file mode 100644 index 0000000000000..54ab1f3803185 --- /dev/null +++ b/Formula/t/tm.rb @@ -0,0 +1,101 @@ +class Tm < Formula + desc "TriggerMesh CLI to work with knative objects" + homepage "https://triggermesh.com" + url "https://github.com/triggermesh/tm/archive/refs/tags/v1.21.0.tar.gz" + sha256 "865d62d11ac28536ed630562088ca8537ceb5c54fcbc413788171f98ab301df2" + license "Apache-2.0" + head "https://github.com/triggermesh/tm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b87ee9cdc5bff6989252c305af1da3540d847784eea6f895acb5cd589abdafd1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb35c98edad2b1a8ea811001ca4c9df94cd4313717622b0da3ee0b04e518e6fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a457f9d2f739486050e6f0e952f881c804cd15eba2007375523bf5cb85e92f25" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a55ee1208229d3940370f20a88131eadeb396084a07720000c3484fa5b82d56a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a63d19c633b0be034cc7bb8454f140c18273399890c25048f20fe3227c2b7217" + sha256 cellar: :any_skip_relocation, sonoma: "f220342f0f170328bb1792e493e89b153738b8a32176f22c7f166afe83f220e9" + sha256 cellar: :any_skip_relocation, ventura: "6c14190586c9aab45552232a455c4c9f0483ce3b14e3928216eed82e9b0f411a" + sha256 cellar: :any_skip_relocation, monterey: "71035b89d26e7a8f1e03bde9cd7f9c1b3abb288703ee5719059be45e899d0401" + sha256 cellar: :any_skip_relocation, big_sur: "b38ad58b65ceb623a5c816f1c20c46dcfb9e941f3c80a2353a1845ab356b2e10" + sha256 cellar: :any_skip_relocation, catalina: "1d325bf50624c61747e81862667df2f74abfb03889c5dd1ad6f008136ba03c4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58105d9cd50de7d0aa4e130051b6819670acbb2c53702ed9c783d90f92b610ff" + end + + deprecate! date: "2024-03-15", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/triggermesh/tm/cmd.version=v#{version} + ].join(" ") + + system "go", "build", *std_go_args(ldflags:) + end + + test do + (testpath/"kubeconfig").write <<~YAML + apiVersion: v1 + clusters: + - cluster: + certificate-authority-data: test + server: http://127.0.0.1:8080 + name: test + contexts: + - context: + cluster: test + user: test + name: test + current-context: test + kind: Config + preferences: {} + users: + - name: test + user: + token: test + YAML + + ENV["KUBECONFIG"] = testpath/"kubeconfig" + + # version + version_output = shell_output("#{bin}/tm version") + assert_match "Triggermesh CLI, version v#{version}", version_output + + # node + system bin/"tm", "generate", "node", "foo-node" + assert_path_exists testpath/"foo-node/serverless.yaml" + assert_path_exists testpath/"foo-node/handler.js" + + runtime = "https://raw.githubusercontent.com/triggermesh/knative-lambda-runtime/master/node10/runtime.yaml" + yaml = File.read("foo-node/serverless.yaml") + assert_match "runtime: #{runtime}", yaml + + # python + system bin/"tm", "generate", "python", "foo-python" + assert_path_exists testpath/"foo-python/serverless.yaml" + assert_path_exists testpath/"foo-python/handler.py" + + runtime = "https://raw.githubusercontent.com/triggermesh/knative-lambda-runtime/master/python37/runtime.yaml" + yaml = File.read("foo-python/serverless.yaml") + assert_match "runtime: #{runtime}", yaml + + # go + system bin/"tm", "generate", "go", "foo-go" + assert_path_exists testpath/"foo-go/serverless.yaml" + assert_path_exists testpath/"foo-go/main.go" + + runtime = "https://raw.githubusercontent.com/triggermesh/knative-lambda-runtime/master/go/runtime.yaml" + yaml = File.read("foo-go/serverless.yaml") + assert_match "runtime: #{runtime}", yaml + + # ruby + system bin/"tm", "generate", "ruby", "foo-ruby" + assert_path_exists testpath/"foo-ruby/serverless.yaml" + assert_path_exists testpath/"foo-ruby/handler.rb" + + runtime = "https://raw.githubusercontent.com/triggermesh/knative-lambda-runtime/master/ruby25/runtime.yaml" + yaml = File.read("foo-ruby/serverless.yaml") + assert_match "runtime: #{runtime}", yaml + end +end diff --git a/Formula/t/tmate.rb b/Formula/t/tmate.rb new file mode 100644 index 0000000000000..bb83042a94b17 --- /dev/null +++ b/Formula/t/tmate.rb @@ -0,0 +1,58 @@ +class Tmate < Formula + desc "Instant terminal sharing" + homepage "https://tmate.io/" + license "ISC" + head "https://github.com/tmate-io/tmate.git", branch: "master" + + stable do + url "https://github.com/tmate-io/tmate/archive/refs/tags/2.4.0.tar.gz" + sha256 "62b61eb12ab394012c861f6b48ba0bc04ac8765abca13bdde5a4d9105cb16138" + + # Fix finding `msgpack` + # https://github.com/tmate-io/tmate/pull/281 + patch do + url "https://github.com/tmate-io/tmate/commit/a5c6e80d3c54cd7faed52de5283b4f96bea86c13.patch?full_index=1" + sha256 "d48006bf00d6addd5db7c6b875b7a890d6f9bc1a8984a9e12e1087af5ff58f35" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e05c861a81f5b44cf1c246ef007a24de34c6499c7c6b1fdf97ccfb9f9d43f3d4" + sha256 cellar: :any, arm64_sequoia: "b27b6f267188c6bd851cf061dc7fabf97a127c7930a57070cb46caf0333ef71f" + sha256 cellar: :any, arm64_sonoma: "1d2e440f793063b6f35862278723efe92afdbe5bab8a23bff6bf122b3f6a61f9" + sha256 cellar: :any, arm64_ventura: "8dd348850ee2dcc734eb9d148495406df82136ddec0d8e50ebef480128db3f10" + sha256 cellar: :any, arm64_monterey: "0b067f5ce9b9019b93dccf8447cab6c7c6a3dac573ce914c9534079fea180d01" + sha256 cellar: :any, arm64_big_sur: "d92025cef2400ab0fcb0f8efa5866e180fff73486db2e73f4e77b5d1afba5d97" + sha256 cellar: :any, sonoma: "2dd07e9beb1e9fbd1ccad386ddd78d13a0932349312580728090b9414c3e45a5" + sha256 cellar: :any, ventura: "00d387966abc3146d0cfb59e73b31802265573c3e0f7a74eaed39d0b76f5fa68" + sha256 cellar: :any, monterey: "b914a728ce6481c4379668b5cac0db712f78d37cc922f97786369fcb8be232fb" + sha256 cellar: :any, big_sur: "215c8724caffc137265dc5fa565bed563b5bd8d046b0e54addcf1628d60a9268" + sha256 cellar: :any, catalina: "a278bcb401068bed2434ec48bfb059a86d793a6daa4877574ac0ed7168cb1ebc" + sha256 cellar: :any_skip_relocation, arm64_linux: "d32cec664457d6e17deecc2f05a9b8fae500e5621473679789e413a453f0032c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b3b3d87ea67d6ee52e3775578b7f37d46cca673aae9f412484439d10e9de620" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libssh" + depends_on "msgpack" + + uses_from_macos "ncurses" + + def install + system "sh", "autogen.sh" + + ENV.append "LDFLAGS", "-lresolv" + system "./configure", "--sysconfdir=#{etc}", *std_configure_args + system "make", "install" + end + + test do + system bin/"tmate", "-V" + end +end diff --git a/Formula/t/tmex.rb b/Formula/t/tmex.rb new file mode 100644 index 0000000000000..a1d823939c23a --- /dev/null +++ b/Formula/t/tmex.rb @@ -0,0 +1,33 @@ +class Tmex < Formula + desc "Minimalist tmux layout manager" + homepage "https://github.com/evnp/tmex" + url "https://github.com/evnp/tmex/archive/refs/tags/v2.0.6.tar.gz" + sha256 "83f16a8231c1c14105134c5e30d1294b41011de2e624e2a91f37d335b5a01712" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7962a086b783ba9d0c735495c568e5a2299e8a33891772d70069dd68ea2d408f" + end + + depends_on "tmux" + + uses_from_macos "bash" + + def install + bin.install "tmex" + man1.install "man/tmex.1" + + # Build an `:all` bottle + inreplace man1/"tmex.1" do |s| + s.gsub! "/opt/homebrew", HOMEBREW_PREFIX + s.gsub! prefix, opt_prefix, audit_result: false + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/tmex -v 2>&1") + + assert_match "new-session -s test", shell_output("#{bin}/tmex test -tp 1224") + end +end diff --git a/Formula/t/tml.rb b/Formula/t/tml.rb new file mode 100644 index 0000000000000..eebc2c31ed889 --- /dev/null +++ b/Formula/t/tml.rb @@ -0,0 +1,30 @@ +class Tml < Formula + desc "Tiny markup language for terminal output" + homepage "https://github.com/liamg/tml" + url "https://github.com/liamg/tml/archive/refs/tags/v0.7.0.tar.gz" + sha256 "68a87626aeba0859c39eebfe96d40db2d39615865bfe55e819feda3c7c9e1824" + license "Unlicense" + head "https://github.com/liamg/tml.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b6cf3e1d68d91ba4a9ac1a89f12888ae12688d1900db3274f1cc636ab8c7f80b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b29c24330dd225c36eca02a8b4ebaf812acea9b2f6fb927e5130cf03261afa32" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b29c24330dd225c36eca02a8b4ebaf812acea9b2f6fb927e5130cf03261afa32" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b29c24330dd225c36eca02a8b4ebaf812acea9b2f6fb927e5130cf03261afa32" + sha256 cellar: :any_skip_relocation, sonoma: "614aa201d2d108d63b5758ddd9ff35d591bd129f096fbc04c702868422576e6c" + sha256 cellar: :any_skip_relocation, ventura: "614aa201d2d108d63b5758ddd9ff35d591bd129f096fbc04c702868422576e6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ce7ed2e65514f5e6eaf588dc625153887044642505caa235383785af27ccc23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a69543363747967ff8fdc7ff2252bb11ceaafc97fd9374832dd5576485928cd6" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./tml" + end + + test do + output = pipe_output(bin/"tml", "not red", 0) + assert_match "\e[0m\e[32mnot red\e[39m\e[0m", output + end +end diff --git a/Formula/t/tmpmail.rb b/Formula/t/tmpmail.rb new file mode 100644 index 0000000000000..3606decc204ab --- /dev/null +++ b/Formula/t/tmpmail.rb @@ -0,0 +1,27 @@ +class Tmpmail < Formula + desc "Temporary email right from your terminal written in POSIX sh" + homepage "https://github.com/sdushantha/tmpmail" + url "https://github.com/sdushantha/tmpmail/archive/refs/tags/v1.2.3.tar.gz" + sha256 "8d12f5474b89ee585413ec32cc9991a971a00e8bb63ac8e5a2e736f734f37cfb" + license "MIT" + head "https://github.com/sdushantha/tmpmail.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "81e6aa8ea9a04b09f48bde663f58eb155061f1f83f8647727371a72cafaf9c0d" + end + + depends_on "jq" + depends_on "w3m" + depends_on "xclip" + + def install + bin.install "tmpmail" + man1.install "tmpmail.1" + end + + test do + system bin/"tmpmail", "--generate" + + assert_match version.to_s, shell_output("#{bin}/tmpmail --version") + end +end diff --git a/Formula/t/tmpreaper.rb b/Formula/t/tmpreaper.rb new file mode 100644 index 0000000000000..be20eb23d994e --- /dev/null +++ b/Formula/t/tmpreaper.rb @@ -0,0 +1,45 @@ +class Tmpreaper < Formula + desc "Clean up files in directories based on their age" + homepage "https://packages.debian.org/sid/tmpreaper" + url "https://ftp.debian.org/debian/pool/main/t/tmpreaper/tmpreaper_1.6.18.tar.xz" + sha256 "2ae7de0775b49abd222d09ad71360d795b40aa7c31253363e64c182966a37c00" + license "GPL-2.0-only" + + livecheck do + url "https://deb.debian.org/debian/pool/main/t/tmpreaper/" + regex(/href=.*?tmpreaper[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "30aab94f88a07061601a3333b691fc941c683b7936e955bac83de7c48f97c482" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a134d1977bb0607e2b93a5e35fbfa2979310e58042604a858f91ebe5bef87b4f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f35e698b40aab74ca34120de8327b518a4770ec4e07d1fb44d6d46a7c589cb68" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa1b0ab8c36bf2ba8f9bbb2d9be36eaaf5395c9d6f2a9a904ad25ebfbcbaa783" + sha256 cellar: :any_skip_relocation, sonoma: "a0e097e2544698d880b83f4a8284105917b8f09628484ead21888bd31b5051cb" + sha256 cellar: :any_skip_relocation, ventura: "f2810c2ef580d6317db1e5089a75f6fad8542e7d9f6798d7a3cfd75ab4eb1024" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d4eb5e686f3ec01a8fec3b07930dc37c0353d816bf9ce845f3131bd9ef87ff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c0688fa5f46502a1b12339adaf4d7af1a746046dea9f400729968265944f1fe" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + on_linux do + depends_on "e2fsprogs" + depends_on "util-linux" + end + + def install + system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" + system "make", "install" + end + + test do + touch "removed" + sleep 3 + touch "not-removed" + system "#{sbin}/tmpreaper", "2s", "." + refute_path_exists testpath/"removed" + assert_path_exists testpath/"not-removed" + end +end diff --git a/Formula/t/tmpwatch.rb b/Formula/t/tmpwatch.rb new file mode 100644 index 0000000000000..a5fd861813373 --- /dev/null +++ b/Formula/t/tmpwatch.rb @@ -0,0 +1,51 @@ +class Tmpwatch < Formula + desc "Find and remove files not accessed in a specified time" + homepage "https://pagure.io/tmpwatch" + url "https://releases.pagure.org/tmpwatch/tmpwatch-2.11.tar.bz2" + sha256 "93168112b2515bc4c7117e8113b8d91e06b79550d2194d62a0c174fe6c2aa8d4" + license "GPL-2.0-only" + head "https://pagure.io/tmpwatch.git", branch: "master" + + livecheck do + url :head + regex(/^(?:r|tmpwatch|v)[._-]?(\d+(?:[._-]\d+)+)$/i) + strategy :git do |tags| + tags.filter_map { |tag| tag[regex, 1]&.gsub(/[_-]/, ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "60ee1cc81b639e95ae3d7dd8ec82c30aca2f4ee7ad84a94bfec4e2ebcb1e184c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "593b95beea81c8d5c890fd6bba09e14033619d8d7cdd7de4fe3d703040cbdd72" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a6f568b045a6b0e57b08423182e7c189cb507637f8a888890d7072d667f232f9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d6f80858cba05532b70c7d3ae636b0c7550ef651891fef8e36b182e131662c2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "aee3dbca7f86d8c80da945837cb30a43a5c55ade929df40d4c4221ca3243b954" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b5f38895989ced860baaac4a22ed677b6adc7e3eaf07ecea5e65325b3a090071" + sha256 cellar: :any_skip_relocation, sonoma: "03de8ab41e8bff1c92f3ed5e2fdd5b2aa6225fa0f0289934a83df4bf1af939f5" + sha256 cellar: :any_skip_relocation, ventura: "e09f42c2a9e80778995eb414e36f92ab3735db17cdaee935ebc206bd30b3ecb9" + sha256 cellar: :any_skip_relocation, monterey: "4359f2939cbe74d9c423defa38ef041574c12d7d223d7fb9b2e9665a4e382f60" + sha256 cellar: :any_skip_relocation, big_sur: "990ba2839f3c2ddf69e280e976463969d3274410f1a84a90e00a6a9b0f5cef35" + sha256 cellar: :any_skip_relocation, catalina: "acd49e52b73f82c2cab4a77f46e99e0f69f856dc43cbf03f775ab58b44e78d6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "caa859a2ada543faf06353b9023dd1ffb11c3d9afbcfce55079ea2a8a0a480ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2741db5b51e3d5cce2e16a2e200a5ac071d8ddb76255a3a4ae5b1752ec9cb33b" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + mkdir "test" do + touch %w[a b c] + ten_minutes_ago = Time.new - 600 + File.utime(ten_minutes_ago, ten_minutes_ago, "a") + system "#{sbin}/tmpwatch", "2m", Pathname.pwd + assert_equal %w[b c], Dir["*"] + end + end +end diff --git a/Formula/t/tmt.rb b/Formula/t/tmt.rb new file mode 100644 index 0000000000000..8cd2fa20b6182 --- /dev/null +++ b/Formula/t/tmt.rb @@ -0,0 +1,166 @@ +class Tmt < Formula + include Language::Python::Virtualenv + + desc "Test Management Tool" + homepage "https://tmt.readthedocs.io" + url "https://files.pythonhosted.org/packages/c9/40/efb1886505e20715a82e43ed6fed14e7f82e62c5572f14e8b55ca468cd20/tmt-1.60.0.tar.gz" + sha256 "7c7932363eb3f5dc294ffdac6f732b037767e5848f7f73761fab24ba912ae2ef" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "13caa2cf9c582acabb2ecf674ff3312f3d8a0e5e57162563918985e9308f9076" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acae4b9842f117c474e2177c264cc609464a8bb360dff12614b83291b09bb20e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ba15ddebf06041c1a8c9b009215dee14568a32ab937e4a298ffad48ff55c077" + sha256 cellar: :any_skip_relocation, sonoma: "81181c724f4e68bd89668fb96f2508252c6408b77008497e717afefe95100bac" + sha256 cellar: :any_skip_relocation, arm64_linux: "e03f8f3fe3c262957fca47cf804186160adc31c7162756af5067b21c4b9406ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b982c5e49dd7ecc2f4e497c7b0d91d0855d4c4024a185b83d90da7b00492ca0f" + end + + depends_on "beakerlib" + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + pypi_packages exclude_packages: ["certifi", "pydantic-core", "rpds-py"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "flexcache" do + url "https://files.pythonhosted.org/packages/55/b0/8a21e330561c65653d010ef112bf38f60890051d244ede197ddaa08e50c1/flexcache-0.3.tar.gz" + sha256 "18743bd5a0621bfe2cf8d519e4c3bfdf57a269c15d1ced3fb4b64e0ff4600656" + end + + resource "flexparser" do + url "https://files.pythonhosted.org/packages/82/99/b4de7e39e8eaf8207ba1a8fa2241dd98b2ba72ae6e16960d8351736d8702/flexparser-0.4.tar.gz" + sha256 "266d98905595be2ccc5da964fe0a2c3526fbbffdc45b65b3146d75db992ef6b2" + end + + resource "fmf" do + url "https://files.pythonhosted.org/packages/2c/fe/aed3f3befc18d725776c10fe621790002671d0c4d50a6287d71fa371cf90/fmf-1.7.0.tar.gz" + sha256 "131b557786b912f99d49d8dcc84196e3c2f39c5ce5ffe8b78e48150afd380dc3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pint" do + url "https://files.pythonhosted.org/packages/5a/cb/e6ffaf3d019e8501b1264dac529bf829ac2f1fe1d488cfcf67f1fccadacf/pint-0.25.tar.gz" + sha256 "22911a30d682ee0540d656571c19a7b1806ce00b2be88a16f67218108b7b8cc2" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/9f/c7/ee630b29e04a672ecfc9b63227c87fd7a37eb67c1bf30fe95376437f897c/ruamel.yaml-0.18.16.tar.gz" + sha256 "a6e587512f3c998b2225d68aa1f35111c29fad14aed561a26e73fab729ec5e5a" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"tmt", shell_parameter_format: :click) + end + + test do + output = shell_output("#{bin}/tmt init --template mini") + assert_match "Applying template 'mini'", output + assert_match <<~YAML, (testpath/"plans/example.fmf").read + summary: Basic smoke test + execute: + how: tmt + script: tmt --help + YAML + + assert_match version.to_s, pipe_output("#{bin}/tmt --version") + end +end diff --git a/Formula/t/tmux-mem-cpu-load.rb b/Formula/t/tmux-mem-cpu-load.rb new file mode 100644 index 0000000000000..49e4ae646db00 --- /dev/null +++ b/Formula/t/tmux-mem-cpu-load.rb @@ -0,0 +1,31 @@ +class TmuxMemCpuLoad < Formula + desc "CPU, RAM memory, and load monitor for use with tmux" + homepage "https://github.com/thewtex/tmux-mem-cpu-load" + url "https://github.com/thewtex/tmux-mem-cpu-load/archive/refs/tags/v3.8.2.tar.gz" + sha256 "c433e396050a821f915f3fd1e7d932b46204def8d59a46fce4f486b1b4ebef2e" + license "Apache-2.0" + head "https://github.com/thewtex/tmux-mem-cpu-load.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "19c2ae55cb2ffbc4cfeff943ea057a2b6e98c444c3b7a851bc25adc4969679a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1b9704023cfa01f2a66fd26ba6619fee06b10e37fe37d50520c60c703b71b082" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a40e5242c4235deeb4203110ee580afa44e2071595717c8565c744a40835135a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49ae4c6d2621caa0711fdc119a045f6e13be528da201e5df678ebbf2ce16bd7d" + sha256 cellar: :any_skip_relocation, sonoma: "73c300b2c57ff480f97b6013a9627c3b74532e8983829b1512f84a8ca5604107" + sha256 cellar: :any_skip_relocation, ventura: "e86000baff73acb680106265ee4ff32c469bc060097904401f274dd2f5aa6e31" + sha256 cellar: :any_skip_relocation, arm64_linux: "c91113c2894a4d31d72697bbf71047a6318b938c67d5750386bf333d0140e2f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9dcb9393b62f525dcadb1e1c463e3f0e34d9553038e8089db2c82548f180e56f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"tmux-mem-cpu-load" + end +end diff --git a/Formula/t/tmux-sessionizer.rb b/Formula/t/tmux-sessionizer.rb new file mode 100644 index 0000000000000..c1a6059928fb7 --- /dev/null +++ b/Formula/t/tmux-sessionizer.rb @@ -0,0 +1,33 @@ +class TmuxSessionizer < Formula + desc "Tool for opening git repositories as tmux sessions" + homepage "https://github.com/jrmoulton/tmux-sessionizer/" + url "https://github.com/jrmoulton/tmux-sessionizer/archive/refs/tags/v0.5.0.tar.gz" + sha256 "c3205764f70c8e7f94a1b32eccbc22e402cd9ab28c54d06b405073cae185bdd8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "31eba54816ac3d642e85c0c3ccc08c1738edea0278a8706423ab6acda7dc4315" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "20971b1673ee2cfa08f990642538eadb168ef54dce98400ff72cd1696c4ba283" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91922de190efa1c9899f4e2479f8b4ad089b7d599b77bb1d06325b330d9b9fb1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "80aa9e9af59eddeba40896b474cd216e8fcb84556e8439bde6946c3c8d35a881" + sha256 cellar: :any_skip_relocation, sonoma: "d419591132c0593b5a0404be795a04464026f4ceb98c4f3ff011ec5e8913409e" + sha256 cellar: :any_skip_relocation, ventura: "807e3f2c36d3c0535d8f70ac197c777a112fcaa43c8baa21599c4508611086d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc042dfb028a16bbf7c7c5d56d8e1a66be403debdcc52805b10d98c804192a8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c1267d366d4184bfd6620de0b6f7ed966c86b9a0a88761cf16e16c1f2132da3" + end + + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"tms", shell_parameter_format: :clap) + end + + test do + assert_match "Configuration has been stored", shell_output("#{bin}/tms config -p /dev/null") + assert_match version.to_s, shell_output("#{bin}/tms --version") + end +end diff --git a/Formula/t/tmux-xpanes.rb b/Formula/t/tmux-xpanes.rb new file mode 100644 index 0000000000000..d8eee0a0cfa2b --- /dev/null +++ b/Formula/t/tmux-xpanes.rb @@ -0,0 +1,25 @@ +class TmuxXpanes < Formula + desc "Ultimate terminal divider powered by tmux" + homepage "https://github.com/greymd/tmux-xpanes" + url "https://github.com/greymd/tmux-xpanes/archive/refs/tags/v4.2.0.tar.gz" + sha256 "d5253a13ffc7a63134c62847d23951972b75bd01b333f6c02449b1cd1e502030" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2be02befe36fe61aef1786514521572e2e4d48edbb828bc7154b1dafa629d0c4" + end + + depends_on "tmux" + + def install + system "./install.sh", prefix + end + + test do + # Check options with valid combination + pipe_output("#{bin}/xpanes --dry-run -c echo", "hello", 0) + + # Check options with invalid combination (-n requires number) + pipe_output("#{bin}/xpanes --dry-run -n foo -c echo 2>&1", "hello", 4) + end +end diff --git a/Formula/t/tmux.rb b/Formula/t/tmux.rb new file mode 100644 index 0000000000000..cb493dd2dc04d --- /dev/null +++ b/Formula/t/tmux.rb @@ -0,0 +1,89 @@ +class Tmux < Formula + desc "Terminal multiplexer" + homepage "https://tmux.github.io/" + url "https://github.com/tmux/tmux/releases/download/3.5a/tmux-3.5a.tar.gz" + sha256 "16216bd0877170dfcc64157085ba9013610b12b082548c7c9542cc0103198951" + license "ISC" + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+[a-z]?)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9e191356b2a932e1e0e640219344a21ab61eb68fe24256d80281d7d037838867" + sha256 cellar: :any, arm64_sequoia: "5e371680cf27c72d30e70f57087bef3fadb408e1881a58839137625c10919f64" + sha256 cellar: :any, arm64_sonoma: "58e253aca23e3deb4b6e171419047cba7283a51cba51962351f5e51661d53437" + sha256 cellar: :any, arm64_ventura: "7cfc60d84d3ec0ba61580633d7add6ffc0eeaa07ec27ceb2380fe434530c90bb" + sha256 cellar: :any, sonoma: "2e10a69a7d9828300ef1ec19f139c6d7eef7522d451e8812073460c4ba61ac28" + sha256 cellar: :any, ventura: "7d823e8b277d302563902e25b9e75594ad46f1996f9e53e5bb70d89c910bf092" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f1e10dbf08da58ff7e32cab75871cef72777a6d3f82e27a315ac0e292169db4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8f77441d2c3db824f04268e62e1db8f240cbff682b12b40a77f5f3ae12f5a94" + end + + head do + url "https://github.com/tmux/tmux.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "ncurses" + depends_on "utf8proc" + + uses_from_macos "bison" => :build # for yacc + + resource "completion" do + url "https://raw.githubusercontent.com/imomaliev/tmux-bash-completion/8da7f797245970659b259b85e5409f197b8afddd/completions/tmux" + sha256 "4e2179053376f4194b342249d75c243c1573c82c185bfbea008be1739048e709" + end + + def install + system "sh", "autogen.sh" if build.head? + + args = %W[ + --enable-sixel + --sysconfdir=#{etc} + --enable-utf8proc + ] + + # tmux finds the `tmux-256color` terminfo provided by our ncurses + # and uses that as the default `TERM`, but this causes issues for + # tools that link with the very old ncurses provided by macOS. + # https://github.com/Homebrew/homebrew-core/issues/102748 + args << "--with-TERM=screen-256color" if OS.mac? && MacOS.version < :sonoma + + system "./configure", *args, *std_configure_args + system "make", "install" + + pkgshare.install "example_tmux.conf" + bash_completion.install resource("completion") + end + + def caveats + <<~EOS + Example configuration has been installed to: + #{opt_pkgshare} + EOS + end + + test do + system bin/"tmux", "-V" + + require "pty" + + socket = testpath/tap.user + PTY.spawn bin/"tmux", "-S", socket, "-f", File::NULL + sleep 10 + + assert_path_exists socket + assert_predicate socket, :socket? + assert_equal "no server running on #{socket}", shell_output("#{bin}/tmux -S#{socket} list-sessions 2>&1", 1).chomp + end +end diff --git a/Formula/t/tmuxai.rb b/Formula/t/tmuxai.rb new file mode 100644 index 0000000000000..daf26e81340c3 --- /dev/null +++ b/Formula/t/tmuxai.rb @@ -0,0 +1,32 @@ +class Tmuxai < Formula + desc "AI-powered, non-intrusive terminal assistant" + homepage "https://tmuxai.dev/" + url "https://github.com/alvinunreal/tmuxai/archive/refs/tags/v2.0.1.tar.gz" + sha256 "392ac5107c736d1f85c6a82dd42f71bb80b702908ce794f953978aafb7347fe9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bda04861393afd566c72a0c4ec640f5e46d5aedd429e7edc602d5e71f86e173c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bda04861393afd566c72a0c4ec640f5e46d5aedd429e7edc602d5e71f86e173c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bda04861393afd566c72a0c4ec640f5e46d5aedd429e7edc602d5e71f86e173c" + sha256 cellar: :any_skip_relocation, sonoma: "9388e0a68084df6e31ede0e85004378a62e4345e36f6a4bc5eb8e32f8cf7afcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "286dce12746627d345383484f4230a57546849cd7584d1d91e87eca5782636ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ba6480640cf386f4d8e6ff00ea4f399572b5796c00720fc0156caa29950db08" + end + + depends_on "go" => :build + depends_on "tmux" + + def install + ldflags = "-s -w -X github.com/alvinunreal/tmuxai/internal.Version=v#{version}" + + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/tmuxai -v") + + output = shell_output("#{bin}/tmuxai -f nonexistent 2>&1", 1) + assert_match "Error reading task file", output + end +end diff --git a/Formula/t/tmuxinator-completion.rb b/Formula/t/tmuxinator-completion.rb new file mode 100644 index 0000000000000..09c3c684bc94d --- /dev/null +++ b/Formula/t/tmuxinator-completion.rb @@ -0,0 +1,27 @@ +class TmuxinatorCompletion < Formula + desc "Shell completion for Tmuxinator" + homepage "https://github.com/tmuxinator/tmuxinator" + url "https://github.com/tmuxinator/tmuxinator/archive/refs/tags/v3.3.5.tar.gz" + sha256 "56dc5ca39d11bad38f7fb602ce412a0f564dc0757765ad105a2cccbe84fcd2ca" + license "MIT" + head "https://github.com/tmuxinator/tmuxinator.git", branch: "master" + + livecheck do + formula "tmuxinator" + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "4aee484d9040bd3897506e285aa83a34c016815f4930337aa5294cdae2ac4271" + end + + def install + bash_completion.install "completion/tmuxinator.bash" => "tmuxinator" + zsh_completion.install "completion/tmuxinator.zsh" => "_tmuxinator" + fish_completion.install Dir["completion/*.fish"] + end + + test do + assert_match "-F _tmuxinator", + shell_output("bash -c 'source #{bash_completion}/tmuxinator && complete -p tmuxinator'") + end +end diff --git a/Formula/t/tmuxinator.rb b/Formula/t/tmuxinator.rb new file mode 100644 index 0000000000000..ef0d40cea265c --- /dev/null +++ b/Formula/t/tmuxinator.rb @@ -0,0 +1,71 @@ +class Tmuxinator < Formula + desc "Manage complex tmux sessions easily" + homepage "https://github.com/tmuxinator/tmuxinator" + url "https://github.com/tmuxinator/tmuxinator/archive/refs/tags/v3.3.5.tar.gz" + sha256 "56dc5ca39d11bad38f7fb602ce412a0f564dc0757765ad105a2cccbe84fcd2ca" + license "MIT" + head "https://github.com/tmuxinator/tmuxinator.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6b6e4ff4d810440e7512b14545f3f2ae267114342ef1133b537c181e0de8a636" + end + + depends_on "ruby" + depends_on "tmux" + depends_on "tmuxinator-completion" + + resource "xdg" do + url "https://rubygems.org/downloads/xdg-2.2.5.gem" + sha256 "f3a5f799363852695e457bb7379ac6c4e3e8cb3a51ce6b449ab47fbb1523b913" + end + + resource "thor" do + url "https://rubygems.org/downloads/thor-1.4.0.gem" + sha256 "8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d" + end + + resource "erubi" do + url "https://rubygems.org/downloads/erubi-1.13.1.gem" + sha256 "a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + + system "gem", "build", "tmuxinator.gemspec" + system "gem", "install", "--ignore-dependencies", "tmuxinator-#{version}.gem" + bin.install libexec/"bin/tmuxinator" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + + # Make sure tmuxinator checks HOMEBREW_PREFIX for data files. Also ensures uniform bottles. + inreplace_files = libexec.glob("gems/xdg-*/lib/xdg/base_dir{,/extended}.rb") + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX + end + + test do + version_output = shell_output("#{bin}/tmuxinator version") + assert_match "tmuxinator #{version}", version_output + + commands = shell_output("#{bin}/tmuxinator commands") + commands_list = %w[ + commands completions copy debug delete doctor + edit implode local list new open start stop + stop_all version + ] + + expected_commands = commands_list.join("\n") + assert_match expected_commands, commands + + list_output = shell_output("#{bin}/tmuxinator list") + assert_match "tmuxinator projects:", list_output + + system bin/"tmuxinator", "new", "test" + list_output = shell_output("#{bin}/tmuxinator list") + assert_equal "tmuxinator projects:\ntest\n", list_output + end +end diff --git a/Formula/t/tmuxp.rb b/Formula/t/tmuxp.rb new file mode 100644 index 0000000000000..ebadaad2fc1a2 --- /dev/null +++ b/Formula/t/tmuxp.rb @@ -0,0 +1,58 @@ +class Tmuxp < Formula + include Language::Python::Virtualenv + + desc "Tmux session manager. Built on libtmux" + homepage "https://tmuxp.git-pull.com/" + url "https://files.pythonhosted.org/packages/89/1d/a272b6b2fc9bc55404705fc79143347211bd8684b957315f075b5139942b/tmuxp-1.56.0.tar.gz" + sha256 "e8d73a24735933a39482839fa43e300835252c06f690b069966d488ee546feaf" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "bdb4eeaec4a23bf906bf89da279f3cbeae8a408a35f8d98e5644c3c59f36c0b2" + sha256 cellar: :any, arm64_sequoia: "743d2a92eee806c485dca643cc1530060273cd790aa8d906793b5496616d6d5e" + sha256 cellar: :any, arm64_sonoma: "b4e2972cd0ee0ac22ef05e0cb5bf6674e5197ebdb9c0d74b03e03c64720e8a1b" + sha256 cellar: :any, sonoma: "25dba888a3c4edf74a8443c7cd0ca3332c4c1b46ad7a7a020902c1c6e666579a" + sha256 cellar: :any_skip_relocation, arm64_linux: "89d41d4db9fd5032e0b50b087af46fb53af264010066a06ede39f0a1127d964f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1460a663e04a12e4eb93f1e309d44994c935a0914a46381d4069b4b66284836" + end + + depends_on "libyaml" + depends_on "python@3.14" + depends_on "tmux" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "libtmux" do + url "https://files.pythonhosted.org/packages/64/b7/962d522112b20b4cb85e8d67c5338cbf3c487d3a4857de9538c6fbc3c9b8/libtmux-0.47.0.tar.gz" + sha256 "49cce513498bbe7f1e5b29fd168b74b95815e869989dae74363d907fbae9d461" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/tmuxp --version") + + (testpath/"test_session.yaml").write <<~YAML + session_name: 2-pane-vertical + windows: + - window_name: my test window + panes: + - echo hello + - echo hello + YAML + + system bin/"tmuxp", "debug-info" + system bin/"tmuxp", "convert", "--yes", "test_session.yaml" + assert_path_exists testpath/"test_session.json" + end +end diff --git a/Formula/t/tmx.rb b/Formula/t/tmx.rb new file mode 100644 index 0000000000000..70e138929a376 --- /dev/null +++ b/Formula/t/tmx.rb @@ -0,0 +1,64 @@ +class Tmx < Formula + desc "Portable C library to load tiled maps in your games" + homepage "https://libtmx.readthedocs.io/en/latest/" + url "https://github.com/baylej/tmx/archive/refs/tags/tmx_1.10.0.tar.gz" + sha256 "8ee42d1728c567d6047a58b2624c39c8844aaf675c470f9f284c4ed17e94188f" + license "BSD-2-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "1b3a8a6fd858dd20ae6077447eada7a22689c93c0e11beeaccd3231d997be4be" + sha256 cellar: :any, arm64_sequoia: "b90d11cd5cb3b8b5d3ed6755386f7a0c61cba35135bf113366b0fe55170c16ed" + sha256 cellar: :any, arm64_sonoma: "338149122323df8764c414aca5f168221b3b239e988c28a10e4f2a1f08aeb10d" + sha256 cellar: :any, arm64_ventura: "824f876037e825eee41439481c88496183ceeaf3b28b2f6713b76947e000e1d5" + sha256 cellar: :any, sonoma: "373c7ff58f085aae49d1472d061222aed7d3ed7c67675a982333c77d5bff6ad2" + sha256 cellar: :any, ventura: "245d68a570c8b1bf021dd5d1fbf40d1b35d0ad3a3fe6839824af29548d8e05b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "86b83ccccb9e5ab0ab728bcb5fa4c3ec20f95e2a837d28f0ef20de71cd7f8adf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c43d5b6605675c73193fff26c3f7e8dadbeb89833e9d5dc4a8e6cdbef76526cf" + end + + depends_on "cmake" => :build + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.tmx").write <<~XML + + + + + + + + + + eJy9lN0OgCAIRjX/6v1fuLXZxr7BB9bq4twochioLaVUfqAB11qfyLisYK1nOFsnReztYr8bTsvP9vJ0Yfyq7yno6x/7iuF7mucQRH3WeZYL96y4TZmfVyeueTV4Pq8fXq+YM+Ibk0g9GIv1sX56OTTnGx/mqwTWd80X6T3+ffgPRubNfOjEv0DC3suKTzoHYfV+RtgJlkd7f7fTm4OWi6GdZXNn93H1rqLzBIoiCFE= + + + + + XML + (testpath/"test.c").write <<~C + #include + + int main(void) { + tmx_map *map = tmx_load("test.tmx"); + tmx_map_free(map); + + tmx_resource_manager *rc_mgr = tmx_make_resource_manager(); + tmx_free_resource_manager(rc_mgr); + + return 0; + } + C + system ENV.cc, "test.c", "#{lib}/#{shared_library("libtmx")}", "-lz", "-lxml2", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/tnef.rb b/Formula/t/tnef.rb new file mode 100644 index 0000000000000..4dfe0122584b9 --- /dev/null +++ b/Formula/t/tnef.rb @@ -0,0 +1,39 @@ +class Tnef < Formula + desc "Microsoft MS-TNEF attachment unpacker" + homepage "https://github.com/verdammelt/tnef" + url "https://github.com/verdammelt/tnef/archive/refs/tags/1.4.18.tar.gz" + sha256 "fa56dd08649f51b173017911cae277dc4b2c98211721c2a60708bf1d28839922" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "44529baf2a4c808692492827a1e241d50d4664afb347e2c9efbd174459e77dfa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83bd5a4cd7402252e5b3652cb5660aa5ec15527623608cc08556dbb1c6b14b15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fa9d1e41b5eae6e4190c2d2a3a3c19c2ab8bffd9424aa69b6e0ea1f55d04f6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "920a01f591be96275e201cfd5dc6e34014cfe036cf255ad5c67daa3167f327e7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1201de0e009993b46a273968cbcd8c9a43c468c30310807712052d398c7034f2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4e6bdd57047af524d3efd157858a47d857a12fc110142a3d94bd47c8552fdc0a" + sha256 cellar: :any_skip_relocation, sonoma: "e44086c7acb426a7cab55fa86e6b38ac9e399b75ee5f962d0b0332c1dfa6e211" + sha256 cellar: :any_skip_relocation, ventura: "cd8e00e27d2857404867233b70ccbe5f991ca50c03d9660533a0b60de47db438" + sha256 cellar: :any_skip_relocation, monterey: "a79b4c0a54e6b4454281c5f40a500e7f3923588815374f28684e9d0fc53adda4" + sha256 cellar: :any_skip_relocation, big_sur: "37ce4eac19eaa6e7111d7ef7897595ac71ebb58f6d7da32dc309bb02bc5a90b4" + sha256 cellar: :any_skip_relocation, catalina: "ff92eb820b2efae9e87e42491a590601f400160f27ea2804b176b02b1648be66" + sha256 cellar: :any_skip_relocation, arm64_linux: "93e86704b1d441a799e40b3f446e612a42f303bc7f00e1aa8fae44f97ea5d0c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a295c834fdb6ae952708260a5a49bfd9771538ca5b6eda6014eeccaa1956dbbd" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"tnef", "--version" + end +end diff --git a/Formula/t/tnftp.rb b/Formula/t/tnftp.rb new file mode 100644 index 0000000000000..382f4c5de0c7e --- /dev/null +++ b/Formula/t/tnftp.rb @@ -0,0 +1,52 @@ +class Tnftp < Formula + desc "NetBSD's FTP client" + homepage "https://cdn.netbsd.org/pub/NetBSD/misc/tnftp/" + url "https://cdn.netbsd.org/pub/NetBSD/misc/tnftp/tnftp-20230507.tar.gz" + mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/NetBSD/misc/tnftp/tnftp-20230507.tar.gz" + sha256 "be0134394bd7d418a3b34892b0709eeb848557e86474e1786f0d1a887d3a6580" + license all_of: [ + "BSD-2-Clause", + "BSD-3-Clause", # src/domacro.c + "ISC", # libnetbsd/{strlcat.c,strlcpy.c} (Linux) + ] + + livecheck do + url :homepage + regex(/href=.*?tnftp[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2440ff711b034d1b7ebc3a676040bedba8424402704586cb3948c517541ab7f3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29c3ac9c028f43ac6f65a2ff8c1d35499d90b6d2025a41853c699e9792195beb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f20f5343db721bf151d17ba4b37cf479e41fd8d286444bcaa7b6df312eb7b02" + sha256 cellar: :any_skip_relocation, sonoma: "282fb33ade8765b9c59b745e26d314ead7a547f0d9362498d57e429a623cb8e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3a23db7b60314ced9767889c224c4e0a743deda98e5861a62bcdf4a59dd87b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6fb344df376df4a00da292939661fa12e8dcdee1d5404906d7f533df3dc3dfb1" + end + + uses_from_macos "bison" => :build + uses_from_macos "libedit" + uses_from_macos "ncurses" + + conflicts_with "inetutils", because: "both install `ftp' binaries" + + def install + # Remove bundled libedit. Still need Makefile.in to configure + rm_r(Dir["libedit/*"] - ["libedit/Makefile.in"]) + + system "./configure", "--without-local-libedit", *std_configure_args + system "make", "install" + + # Add compatibility symlinks as we used to manually install as `ftp` + bin.install_symlink "tnftp" => "ftp" + man1.install_symlink "tnftp.1" => "ftp.1" + end + + test do + system bin/"tnftp", "ftp://ftp.netbsd.org/pub/NetBSD/README" + assert_match "This directory contains files related to NetBSD", File.read("README") + end +end diff --git a/Formula/t/tnftpd.rb b/Formula/t/tnftpd.rb new file mode 100644 index 0000000000000..9580717dcfe11 --- /dev/null +++ b/Formula/t/tnftpd.rb @@ -0,0 +1,65 @@ +class Tnftpd < Formula + desc "NetBSD's FTP server" + homepage "https://cdn.netbsd.org/pub/NetBSD/misc/tnftp/" + url "https://cdn.netbsd.org/pub/NetBSD/misc/tnftp/tnftpd-20231001.tar.gz" + mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/NetBSD/misc/tnftp/tnftpd-20231001.tar.gz" + sha256 "24a51bd2e5818ddb8c2479df9c8175a78dd8a5ef49ee3ab09f5f39c35069826e" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "ISC"] + + livecheck do + url :homepage + regex(/href=.*?tnftpd[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d9d80e1b2f1df559934eb827edb881709d86a7197e56c47fb3fae56b01b4a0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0896487aea674c344c0b0018f331767231546c8269d940de9910f2107a17b26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d2553f19ea668a58de5f03311347e89a3522e458c9d9482ea3ae4a8825ae34eb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "846e191bdee68e9a0123e864e7683917efce53a479ecfaa1448422bc512024af" + sha256 cellar: :any_skip_relocation, arm64_monterey: "011a300c9b49318f006a133c9967d2a5968862e427204d578752b692105070e2" + sha256 cellar: :any_skip_relocation, sonoma: "8985fce13cecf1bc9e202f30ea4a5c9cd19c417ff4eb7afe6cd8d08dfd02a819" + sha256 cellar: :any_skip_relocation, ventura: "80301322ab495d2380c7be37f703293f89b6a0956b27fe6f796ce493ca862da2" + sha256 cellar: :any_skip_relocation, monterey: "1c0f3a77356aa9ea4a691f0388cf4e9ad42002c7d67a09fa18b500d0172abe0c" + sha256 cellar: :any_skip_relocation, arm64_linux: "59f715a746e1ae9772414c45c5739d3c10061c9a2fac68e0a2efdc0280d08a0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef05fc95a88ae0c7ca0fba016115eb2d840d4a218935f39d137f61a5e63144ef" + end + + uses_from_macos "bison" => :build + uses_from_macos "libxcrypt" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + + sbin.install "src/tnftpd" => "ftpd" + man8.install "src/tnftpd.man" => "ftpd.8" + man5.install "src/ftpusers.man" => "ftpusers.5" + man5.install "src/ftpd.conf.man" => "ftpd.conf.5" + etc.install "examples/ftpd.conf" + etc.install "examples/ftpusers" + end + + def caveats + <<~EOS + You may need super-user privileges to run this program properly. See the man + page for more details. + EOS + end + + test do + # Errno::EIO: Input/output error @ io_fillbuf - fd:5 /dev/pts/0 + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # running a whole server, connecting, and so forth is a bit clunky and hard + # to write properly so... + require "pty" + require "expect" + + PTY.spawn "#{sbin}/ftpd -x" do |input, _output, _pid| + str = input.expect(/ftpd: illegal option -- x/) + assert_match "ftpd: illegal option -- x", str[0] + end + end +end diff --git a/Formula/t/toast.rb b/Formula/t/toast.rb new file mode 100644 index 0000000000000..3fbf897e46d68 --- /dev/null +++ b/Formula/t/toast.rb @@ -0,0 +1,39 @@ +class Toast < Formula + desc "Tool for running tasks in containers" + homepage "https://github.com/stepchowfun/toast" + url "https://github.com/stepchowfun/toast/archive/refs/tags/v0.47.7.tar.gz" + sha256 "532a883c0e96ab274c25e3256ad532e525fd2d5e393ebd4712e591de64a2f7c9" + license "MIT" + head "https://github.com/stepchowfun/toast.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e0d9f65aeb892f6b89fa305c453c76df57442f044504cafa48098590f55db5a7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3f558594467882fba23da8e01983eac6efd36eb830be012f702967b3caf4fb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce42343f3cc19695a755e28e579cc7937ac70a7ec7e35dc5d0c2cc39e71264ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d5dffeed5b421ec1253333fe7e621cc590cf8606d2880400d6500a577e03b2c" + sha256 cellar: :any_skip_relocation, sonoma: "b2a20c9c83d5f0bbef1ae0b0157f7a2adfcdce1251e649c53c78295123352604" + sha256 cellar: :any_skip_relocation, ventura: "2361a75dc4e6f9bbc4ee54b983b5575f5ad60b50dc941702274d8f163afbd0e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "35a83e8715ac42e645ef9edfefb127d454eb2bbee2c2f791d466a68da876dcb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ed0686a150d2936eb37bb83197d2e55088533f73af946df1261a58ced8cddc6" + end + + depends_on "rust" => :build + + conflicts_with "libgsm", because: "both install `toast` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"toast.yml").write <<~YAML + image: alpine + tasks: + homebrew_test: + description: brewtest + command: echo hello + YAML + + assert_match "homebrew_test", shell_output("#{bin}/toast --list") + end +end diff --git a/Formula/t/todo-txt.rb b/Formula/t/todo-txt.rb new file mode 100644 index 0000000000000..8b979e7809ecf --- /dev/null +++ b/Formula/t/todo-txt.rb @@ -0,0 +1,39 @@ +class TodoTxt < Formula + desc "Minimal, todo.txt-focused editor" + homepage "http://todotxt.org/" + url "https://github.com/todotxt/todo.txt-cli/releases/download/v2.13.0/todo.txt_cli-2.13.0.tar.gz" + sha256 "d3b925434029aac212213c103fb6573a4f960c74dd467a3efac9bd9afe89d15f" + license "GPL-3.0-only" + head "https://github.com/todotxt/todo.txt-cli.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "aa11eb960775585bbb243b4206daeabb25c7d776e24d57726bb7ad359fd6d290" + end + + def install + bin.install "todo.sh" + prefix.install "todo.cfg" # Default config file + bash_completion.install "todo_completion" + end + + def caveats + <<~EOS + To configure, copy the default config to your HOME and edit it: + cp #{prefix}/todo.cfg ~/.todo.cfg + EOS + end + + test do + cp prefix/"todo.cfg", testpath/".todo.cfg" + inreplace testpath/".todo.cfg", "export TODO_DIR=${HOME:-$USERPROFILE}", "export TODO_DIR=#{testpath}" + system bin/"todo.sh", "add", "Hello World!" + system bin/"todo.sh", "list" + end +end diff --git a/Formula/t/todoist-cli.rb b/Formula/t/todoist-cli.rb new file mode 100644 index 0000000000000..f848cb60f8167 --- /dev/null +++ b/Formula/t/todoist-cli.rb @@ -0,0 +1,41 @@ +class TodoistCli < Formula + desc "CLI for Todoist" + homepage "https://github.com/sachaos/todoist" + url "https://github.com/sachaos/todoist/archive/refs/tags/v0.22.0.tar.gz" + sha256 "b8220ec1ec14f298afed0e32e4028067b8833553a6976f99d7ee35b7a75d5a71" + license "MIT" + head "https://github.com/sachaos/todoist.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7227b1cc7c159e9ff807f338f78eb623e9ee244e09eaed66ae5a78e4438a9c52" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b565b7bccb371408be79df4a27dd9cdf2d4338543986746de44b3db83f36046" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b565b7bccb371408be79df4a27dd9cdf2d4338543986746de44b3db83f36046" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b565b7bccb371408be79df4a27dd9cdf2d4338543986746de44b3db83f36046" + sha256 cellar: :any_skip_relocation, sonoma: "541bfadda568102b4ce50990479db15588312bcf712f507fd8235c989fbb2b5b" + sha256 cellar: :any_skip_relocation, ventura: "541bfadda568102b4ce50990479db15588312bcf712f507fd8235c989fbb2b5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c77e4c07320575b4fa7f62a4df805df7c808a7b45cb90af656c60b9b6e4d25e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "751b77cecda38891d3cadd3ffaee3b190f033e337ce1312721a4d4b1cfd4a9fc" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(output: bin/"todoist", ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/todoist --version") + + test_config = testpath/".config/todoist/config.json" + test_config.write <<~JSON + { + "token": "test_token" + } + JSON + chmod 0600, test_config + + output = shell_output("#{bin}/todoist list 2>&1") + assert_match "There is no task.", output + end +end diff --git a/Formula/t/todoman.rb b/Formula/t/todoman.rb new file mode 100644 index 0000000000000..85ae5fe0775f2 --- /dev/null +++ b/Formula/t/todoman.rb @@ -0,0 +1,96 @@ +class Todoman < Formula + include Language::Python::Virtualenv + + desc "Simple CalDAV-based todo manager" + homepage "https://todoman.readthedocs.io/" + url "https://files.pythonhosted.org/packages/87/4c/1369f1a4b0c6eefcca49db997aa8ae0cd53d64e03d7c0f80905b6380a444/todoman-4.6.0.tar.gz" + sha256 "bff9be48c88168c3f7b732bb0b65f3539abbcd3383e878f9835fcf43c83add53" + license "ISC" + head "https://github.com/pimutils/todoman.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9e003c9f9026bc99400996a18f27ed32701e4a03d8efa31541adcd4083f1a654" + end + + depends_on "jq" # Needed for ZSH completions. + depends_on "python@3.14" + + conflicts_with "bash-snippets", because: "both install `todo` binaries" + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-log" do + url "https://files.pythonhosted.org/packages/32/32/228be4f971e4bd556c33d52a22682bfe318ffe57a1ddb7a546f347a90260/click-log-0.4.0.tar.gz" + sha256 "3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/98/1d/3062fcc89ee05a715c0b9bfe6490c00c576314f27ffee3a704122c6fd259/humanize-4.13.0.tar.gz" + sha256 "78f79e68f76f0b04d711c4e55d32bebef5be387148862cb1ef83d2b58e7935a0" + end + + resource "icalendar" do + url "https://files.pythonhosted.org/packages/08/13/e5899c916dcf1343ea65823eb7278d3e1a1d679f383f6409380594b5f322/icalendar-6.3.1.tar.gz" + sha256 "a697ce7b678072941e519f2745704fc29d78ef92a2dc53d9108ba6a04aeba466" + end + + resource "parsedatetime" do + url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" + sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/bb/d3/09683323e2290732a39dc92ca5031d5e5ddda56f8d236f885a400535b29a/urwid-3.0.3.tar.gz" + sha256 "300804dd568cda5aa1c5b204227bd0cfe7a62cef2d00987c5eb2e4e64294ed9b" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + + bash_completion.install "contrib/completion/bash/_todo" => "todo" + zsh_completion.install "contrib/completion/zsh/_todo" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + + (testpath/".config/todoman/config.py").write <<~PYTHON + path = "#{testpath}/.calendar/*" + date_format = "%Y-%m-%d" + default_list = "Personal" + PYTHON + + (testpath/".calendar/Personal").mkpath + system bin/"todo", "new", "newtodo" + assert_match "newtodo", shell_output("#{bin}/todo list") + end +end diff --git a/Formula/t/tofrodos.rb b/Formula/t/tofrodos.rb new file mode 100644 index 0000000000000..480a78baba820 --- /dev/null +++ b/Formula/t/tofrodos.rb @@ -0,0 +1,42 @@ +class Tofrodos < Formula + desc "Converts DOS <-> UNIX text files, alias tofromdos" + homepage "https://www.thefreecountry.com/tofrodos/" + url "https://www.thefreecountry.com/tofrodos/tofrodos-1.8.3.zip" + sha256 "44d76fb024164982aa5e166c1a3c29fa7555c9e0ee8e196cc52595c57a4b55dc" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?tofrodos[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ed51d90d1c7e5a548f75ee9aeac84b5f11dd5f1ee683674b4b2edec39b053de" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f5b16d880a34a9f8f8bcf3c3a5520affe8356fcf24854fd23e09b07ee1b2de8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55ad657b7068a6106e846311ca92abbbf94ed236d7c48b263a25eabc95acc434" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef7cc693cfb4c53110c3771bfd4c3843a314ad610417c4e47cf3af5ec4ef6d09" + sha256 cellar: :any_skip_relocation, sonoma: "fbbecca042307e05f058ab8f8d95a97340cc7111114041581059f6815129f15b" + sha256 cellar: :any_skip_relocation, ventura: "e4ea589dde1039b1732d7ada4b8f817b30d90aea37a3ece09c520316505688c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "97e7b249efc5aea737734daf57e21300701accc3f70419030be49ff039ceb50a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6883c12d2a042937a3e93beacc2350d65dcdc5c99230b8325ef022488552a14b" + end + + def install + mkdir_p [bin, man1] + + system "make", "-C", "src", "all" + system "make", "-C", "src", "BINDIR=#{bin}", "MANDIR=#{man1}", "install" + end + + test do + (testpath/"test.txt").write <<~EOS + Example text + EOS + + shell_output("#{bin}/todos -b #{testpath}/test.txt") + shell_output("#{bin}/fromdos #{testpath}/test.txt") + assert_equal (testpath/"test.txt").read, (testpath/"test.txt.bak").read + end +end diff --git a/Formula/t/tofu-ls.rb b/Formula/t/tofu-ls.rb new file mode 100644 index 0000000000000..e4c1c1c6fecd8 --- /dev/null +++ b/Formula/t/tofu-ls.rb @@ -0,0 +1,54 @@ +class TofuLs < Formula + desc "OpenTofu Language Server" + homepage "https://github.com/opentofu/tofu-ls" + url "https://github.com/opentofu/tofu-ls/archive/refs/tags/v0.2.0.tar.gz" + sha256 "3163abd91f9664a56b0ace41592795d03aee6ae6ae9d3d33f92726e4c66be011" + license "MPL-2.0" + head "https://github.com/opentofu/tofu-ls.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dcbc5c21dc7bb4f43e492fbe8693888b72c979434103ee8cb0f07fe66a9d92d0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcbc5c21dc7bb4f43e492fbe8693888b72c979434103ee8cb0f07fe66a9d92d0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dcbc5c21dc7bb4f43e492fbe8693888b72c979434103ee8cb0f07fe66a9d92d0" + sha256 cellar: :any_skip_relocation, sonoma: "779aae4a97cced2ff450ebc5621dbe233d9c594ae65816d7686b510eb7b6eb63" + sha256 cellar: :any_skip_relocation, arm64_linux: "bedc584848aa75636c41ea7ba1225ad6b56a7d919168a1c1fe5ec0007df2ea6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97aabd183f28d91d19157fe67d078c561cd9721c51d416e2cf7eb9cf0453e45c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.rawVersion=#{version}+#{tap.user} + ] + system "go", "build", *std_go_args(ldflags: ldflags.join(" ")) + end + + test do + port = free_port + + pid = fork do + exec "#{bin}/tofu-ls serve -port #{port} /dev/null" + end + sleep 2 + + begin + tcp_socket = TCPSocket.new("localhost", port) + tcp_socket.puts <<~EOF + Content-Length: 59 + + {"jsonrpc":"2.0","method":"initialize","params":{},"id":1} + EOF + assert_match "Content-Type", tcp_socket.gets("\n") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/tofuenv.rb b/Formula/t/tofuenv.rb new file mode 100644 index 0000000000000..32ea093007b39 --- /dev/null +++ b/Formula/t/tofuenv.rb @@ -0,0 +1,32 @@ +class Tofuenv < Formula + desc "OpenTofu version manager inspired by tfenv" + homepage "https://tofuutils.github.io/tofuenv/" + url "https://github.com/tofuutils/tofuenv/archive/refs/tags/v1.0.7.tar.gz" + sha256 "047c6a01a0d4c7ded2cf126ae1e891bb3479b2544ec2d2f0d3951de2d08f6c7d" + license "MIT" + head "https://github.com/tofuutils/tofuenv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3febcab9a632034fdedf2d4ae0105d4425bcdb12ac73e58b586a1ddf6db36487" + end + + uses_from_macos "unzip" + + on_macos do + depends_on "grep" + depends_on "jq" + end + + conflicts_with "opentofu", "tenv", because: "both install tofu binary" + + def install + prefix.install %w[bin lib libexec share] + end + + test do + assert_match "1.8.7", shell_output("#{bin}/tofuenv list-remote") + with_env(TOFUENV_TOFU_VERSION: "1.8.7", TF_AUTO_INSTALL: "false") do + assert_equal "1.8.7", shell_output("#{bin}/tofuenv version-name").strip + end + end +end diff --git a/Formula/t/toilet.rb b/Formula/t/toilet.rb new file mode 100644 index 0000000000000..30e52089b9288 --- /dev/null +++ b/Formula/t/toilet.rb @@ -0,0 +1,51 @@ +class Toilet < Formula + desc "Color-based alternative to figlet (uses libcaca)" + homepage "http://caca.zoy.org/wiki/toilet" + url "http://caca.zoy.org/raw-attachment/wiki/toilet/toilet-0.3.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/t/toilet/toilet_0.3.orig.tar.gz" + sha256 "89d4b530c394313cc3f3a4e07a7394fa82a6091f44df44dfcd0ebcb3300a81de" + license "WTFPL" + + livecheck do + url "http://caca.zoy.org/raw-attachment/wiki/toilet/" + regex(/href=.*?toilet[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "bd5b942e1d680bf03e3cd4ca644c4468e4184804f9e42044cd4e8a3d8be4df13" + sha256 arm64_sequoia: "2c559d7c5172c0f9751ecb6a75a550e1202cf3f09a0cf867799672beea54c2b5" + sha256 arm64_sonoma: "e357c586a77052ed8e040b211e693d1f420c2667caffe012d5e5d121659bc3e7" + sha256 arm64_ventura: "24f5a74c74de3d9dd4a7ee917c9e2faa072c1062189b6272d8bb041a91f8be6a" + sha256 arm64_monterey: "76a5e77f5e0c747a41dc7f087a65b4eb9817ab59e0b81b33fc4a98cc7c44cbfe" + sha256 arm64_big_sur: "962eed08eba86fe1f35bdc00f6cf7d119639b93a305451f0283517c5b89df15a" + sha256 sonoma: "66eb8162654bad10f2f6fe8bcee529b61c07e08d97fb4159dd13c903511f3da2" + sha256 ventura: "2f95a953e9876a0768f11f7017f045d3cf5edd2e79a42bcb997de08f6c478875" + sha256 monterey: "d5698e72ecfe4ed624397f0da8b342b8080b716d8abd6657a19d517463ffa399" + sha256 big_sur: "6656e1a05049339433307a78ae8df879f45903c179642361e0ef24331e3e44c4" + sha256 catalina: "816162aa8f967f14e6db8f9b48024ef5119c04955575299e02fe88b2b0158ac6" + sha256 arm64_linux: "b9b9b289bfeca15d75013d0cb29999beccaf644a914c8a6ce154be438a24c417" + sha256 x86_64_linux: "774d107ea52b43b2224252e84eaf529d8b944fa34746935d34a9c4bb791a110e" + end + + head do + url "https://github.com/cacalabs/toilet.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libcaca" + + def install + system "./bootstrap" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"toilet", "--version" + end +end diff --git a/Formula/t/toipe.rb b/Formula/t/toipe.rb new file mode 100644 index 0000000000000..f5c4e9c116228 --- /dev/null +++ b/Formula/t/toipe.rb @@ -0,0 +1,38 @@ +class Toipe < Formula + desc "Yet another typing test, but crab flavoured" + homepage "https://github.com/Samyak2/toipe" + url "https://github.com/Samyak2/toipe/archive/refs/tags/v0.5.0.tar.gz" + sha256 "31e4c7679487425254ad90bbc4d14a9bd55af6c6a20cce0b3f8eaa52fffe6bf7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e5069bda110d16a90d262f87fccd6e4029d144bfa2f3f3c5a33e47117efb2221" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d409f827261750a1cee4855aaba29da4ca9dca009b7e82485e079d4e66b38de0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0ce4d37eded9cca126146d2d64a07c8fc668d030bc661107ea85ac3f2e4289f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a3ad889e7f6b27f58aa6ee57a24fd5265b373e5cac9b1dd7bb941e2212d30a6a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7a57c6209f87c4aee533f7af560b00e6a789f93538a79d73db02d52609ff0fad" + sha256 cellar: :any_skip_relocation, sonoma: "638314ee280e0178d2a5fd3df5b83ed79ad4800fa6124ff55c691b15841a6b99" + sha256 cellar: :any_skip_relocation, ventura: "dcf1654718d4a6f1b6e5c12ba277bc2f033609d4a4a576d247e45b81bab90a9a" + sha256 cellar: :any_skip_relocation, monterey: "00fc421a810c0416cdf3ff8125af6f8f3fcf59a489087057f8128ad30130f1c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a761b2cd6f5ccb7f6fff0ea85a7cfad080dd73bdc13a065f6e42bfb1768da455" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8017e2889572c9c07f45b7a7f394cbfbd0267e50b408eba36fba5d13cf24521b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + require "pty" + PTY.spawn(bin/"toipe") do |r, _w, pid| + output = r.gets + assert_match "ToipeError: Terminal height is too short! Toipe requires at least 34 lines", output + ensure + Process.kill("TERM", pid) + end + + assert_match version.to_s, shell_output("#{bin}/toipe --version") + end +end diff --git a/Formula/t/tokei.rb b/Formula/t/tokei.rb new file mode 100644 index 0000000000000..483413a2f2f76 --- /dev/null +++ b/Formula/t/tokei.rb @@ -0,0 +1,51 @@ +class Tokei < Formula + desc "Program that allows you to count code, quickly" + homepage "https://github.com/XAMPPRocky/tokei" + url "https://github.com/XAMPPRocky/tokei/archive/refs/tags/v12.1.2.tar.gz" + sha256 "81ef14ab8eaa70a68249a299f26f26eba22f342fb8e22fca463b08080f436e50" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/XAMPPRocky/tokei.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5d1756b74a56c9ced04632520557539bad59caaf3de740efc7a48ed865f2cac4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "40b48918b40641291a8a9ad1d81bc1da4d4c5a87f9dd427b95716ae8c3d98dab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5cea8923b59fbf212777ab62587234ee3ac0899c959c9d2fad3eca5e5129709" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58c651b034293b8dc4d2dc00c7b2a13d8c6c3c093683ab5e1ebe08a1dc6cf6f9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6ca867ee898e06ea98d3f3012e753ecb6e292160353e187fa62619f86447ca7c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c7b1e487acc3cddaeb578dfab8ec1e8f81fe00834d60d81311b6ca56d2c29f1b" + sha256 cellar: :any_skip_relocation, sonoma: "56ec718817e088be8c7aa15872d73df9d54238eacf2e9e8f5e6527f5d548996e" + sha256 cellar: :any_skip_relocation, ventura: "ecedf025a74087395440a35c5698d6e35e8831c9da184bee5ecab2d056cf1a0a" + sha256 cellar: :any_skip_relocation, monterey: "19c6b4270cf51286adf6e2ddfd2aa45bfa721d52bfe5c8c0792277311a930116" + sha256 cellar: :any_skip_relocation, big_sur: "eb4878d9ef7023cba511a2c84635ebf1c428741772ebc5fd139f8a0c258574d4" + sha256 cellar: :any_skip_relocation, catalina: "65063af77fcd93f8e3340e48e7cd8db8c8effc00fc93dbf540c9ce60e764329f" + sha256 cellar: :any_skip_relocation, arm64_linux: "631b4058a3d5387cc82a008413f6072cb890d827a93ac8746b0a36a851a92e1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db7e8862a35ed6f09f4c502c45d14e2891fdff54524b1daa728bcd8fdebef2b0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--features", "all", *std_cargo_args + end + + test do + (testpath/"lib.rs").write <<~RUST + #[cfg(test)] + mod tests { + #[test] + fn test() { + println!("It works!"); + } + } + RUST + system bin/"tokei", "lib.rs" + end +end diff --git a/Formula/t/tokyo-cabinet.rb b/Formula/t/tokyo-cabinet.rb new file mode 100644 index 0000000000000..f4f3a34778502 --- /dev/null +++ b/Formula/t/tokyo-cabinet.rb @@ -0,0 +1,41 @@ +class TokyoCabinet < Formula + desc "Lightweight database library" + homepage "https://dbmx.net/tokyocabinet/" + url "https://dbmx.net/tokyocabinet/tokyocabinet-1.4.48.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/t/tokyocabinet/tokyocabinet_1.4.48.orig.tar.gz" + sha256 "a003f47c39a91e22d76bc4fe68b9b3de0f38851b160bbb1ca07a4f6441de1f90" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?tokyocabinet[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "5655b93d3db869cbf2abe384b76277cd015652da54ef000ddad3b78e8c7da775" + sha256 arm64_sequoia: "4f3639469a608b0ad65b82a7529849eb87808348165e167cb3ff347cfb92dd54" + sha256 arm64_sonoma: "2b6225400e5958eca5bc1c1b2539e4b511020af2c268b4d955f3a05bffbaa7db" + sha256 arm64_ventura: "50d14af6225ba943a9fda88ddfa7527525ace16d00fa6a67bb47a58bde2bad17" + sha256 arm64_monterey: "8613d58abe525cbea2a46d918013fc2372666dd3a158c49d71cc44c82aaad340" + sha256 arm64_big_sur: "1c4886501c3137bf93f3afcb374fd4b218a37e2aa36fb1065e43753ebbb162a9" + sha256 sonoma: "c7d9ad175da2501a8249a95d77e9c755b8decd26cb744f839bdc5b17176c82a6" + sha256 ventura: "520ecff48dd7c1a31ac7c3fa9c12c91804778ff921a5bae42e8076e0fb2e4fdb" + sha256 monterey: "48abfb18ba86f14dd9698399b13e22771b2888077523804adfab8e6bae31b64f" + sha256 big_sur: "d9f3ac52eec8c99b8b9474d5e7eb53fb9cdb012bd377ffbed78db87b0e465c47" + sha256 catalina: "23694919d46c474b8c12d69d2e980d08f96f6bface62a74be7b8554de532e871" + sha256 arm64_linux: "2c17d11fad21ee6b273e754d76564b0213376df0a9699f66d9a30111cc3d6c63" + sha256 x86_64_linux: "14fcc181d3ded3aae77cb94d6667b04c81c2dd46981529b40c8fa765b794b98f" + end + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end +end diff --git a/Formula/t/tokyo-dystopia.rb b/Formula/t/tokyo-dystopia.rb new file mode 100644 index 0000000000000..2a95cac98c240 --- /dev/null +++ b/Formula/t/tokyo-dystopia.rb @@ -0,0 +1,50 @@ +class TokyoDystopia < Formula + desc "Lightweight full-text search system" + homepage "https://dbmx.net/tokyodystopia/" + url "https://dbmx.net/tokyodystopia/tokyodystopia-0.9.15.tar.gz" + sha256 "28b43c592a127d1c9168eac98f680aa49d1137b4c14b8d078389bbad1a81830a" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?tokyodystopia[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a2f63111d93534d9aee115227c1f069d622d08d0df19e9d9664f653c28b60dc4" + sha256 cellar: :any, arm64_sequoia: "da35291f169e133bb8dcc321c5114ea62714f6e0eadab7a69cef121e0c76813f" + sha256 cellar: :any, arm64_sonoma: "16af9fb0facf080bd076d60cd306742fb641f7430cf0c14946e5e37d2d4dcb8c" + sha256 cellar: :any, arm64_ventura: "b668547ea69b42bff8b084ec960fb1d1b0233179b2b8b2ea5bb83b013ab81f84" + sha256 cellar: :any, arm64_monterey: "6c120e05bb6ced87121536beab4895c0b03d0e94206fe6fafac4a96326bf2e32" + sha256 cellar: :any, arm64_big_sur: "9e0c8988268eec1f5fe33f5d7f494f636c64690f417e179e37a83f9b4880b315" + sha256 cellar: :any, sonoma: "b79acb9af00f15c839c1248e5cd38897f8d8dff2fe20cd87033bdc93573458a5" + sha256 cellar: :any, ventura: "21e551f8a8e43d5c841619fa462b209aa25a18140cbe0ece3f923a14e3cab1fa" + sha256 cellar: :any, monterey: "60710bf05465d1a0d1b9820998971cbe2ba9387e4bb121bc6aeadc4aa00a2d91" + sha256 cellar: :any, big_sur: "f771602cfd9301739750f839295241f829528eee8ecfe02ac95b55fc24c3841e" + sha256 cellar: :any, catalina: "eb04133c9d459ee1ab9a4fe00b3f6b31621d9df2672a252784779a44a5991b77" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c1c01fa3151f25a7d15fde5db6d0c5e27cf836b8b57d40c4f39bb3a82dddec7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1babf4df457924711f3ad2fc7e8f9f797950f53de9f1b740290ec1c112ca83e8" + end + + depends_on "tokyo-cabinet" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.tsv").write <<~TSV + 1\tUnited States + 55\tBrazil + 81\tJapan + TSV + + system bin/"dystmgr", "importtsv", "casket", "test.tsv" + system bin/"dystmgr", "put", "casket", "83", "China" + system bin/"dystmgr", "list", "-pv", "casket" + end +end diff --git a/Formula/t/tombi.rb b/Formula/t/tombi.rb new file mode 100644 index 0000000000000..db5b7728200b5 --- /dev/null +++ b/Formula/t/tombi.rb @@ -0,0 +1,57 @@ +class Tombi < Formula + desc "TOML formatter, linter and language server" + homepage "https://github.com/tombi-toml/tombi" + url "https://github.com/tombi-toml/tombi/archive/refs/tags/v0.6.40.tar.gz" + sha256 "cd3e0b3cc0118e8faf0e86f644c56bbfc228fcd0a17dd0c0c96a235c3acff0cd" + license "MIT" + head "https://github.com/tombi-toml/tombi.git", branch: "main" + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "df87c26c1069eaeee59795dff440de3e86ee690700b6bf4e29a44007ad8835af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d7ece5f397f03e9f081a2ff147e88d40d1e78723f9ab019c266043451c13afd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a955ee58b1fcd2dfe2e0e811c05f27b4a0edab16b9559565922bf4bc9a2c0dc8" + sha256 cellar: :any_skip_relocation, sonoma: "cdb19611e2de692d321da5ad73292108da0127c56378d324a1287795725d9e4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9453ab5b5c451459b9b128b44b10136db778ab2d77b6f71fc5f30935da1bd31e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6d86eeb03a13c6c87520208eb343fb84665eb9523019400268b25324705cb8d" + end + + depends_on "rust" => :build + + def install + ENV["TOMBI_VERSION"] = version.to_s + system "cargo", "xtask", "set-version" + system "cargo", "install", *std_cargo_args(path: "rust/tombi-cli") + + generate_completions_from_executable(bin/"tombi", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/tombi --version") + + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"tombi", "lsp") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 1 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/t/tomcat-native.rb b/Formula/t/tomcat-native.rb new file mode 100644 index 0000000000000..34a3ab3597954 --- /dev/null +++ b/Formula/t/tomcat-native.rb @@ -0,0 +1,70 @@ +class TomcatNative < Formula + desc "Lets Tomcat use some native resources for performance" + homepage "https://tomcat.apache.org/native-doc/" + url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-connectors/native/2.0.9/source/tomcat-native-2.0.9-src.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-connectors/native/2.0.9/source/tomcat-native-2.0.9-src.tar.gz" + sha256 "8aed0def414d7f49b688e826797513e95182ecbd7b6f8b6f025e527b85065c02" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f826440c6ed78de39219996ddfa952959ad65b1361b478ab48e0430dc3c041c" + sha256 cellar: :any, arm64_sequoia: "d69d5e50666db22767640427773e7f032e40bb9a4802fc48f0a1b7991263fe4b" + sha256 cellar: :any, arm64_sonoma: "54bac94b6a98b710c507941c7a6c750256f001c86a0605f828b176b53a4d5773" + sha256 cellar: :any, arm64_ventura: "82f712cd4cc80f9a85c240fe8eefacf0de8f2c8191020533d20575dee8bbb1b8" + sha256 cellar: :any, sonoma: "670968ff66ddab50702616d827e2c15cdbb97a95def107c0707224f3feaa6b49" + sha256 cellar: :any, ventura: "0c1abba080581dfadb7557e36ff283c7dff8655eef0aaaba5807fc58015c9405" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b34d0fa510a7c5365e1d983d3046a89bf03223247e3e7676158652f002bc175" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66f6cf0d5dcb235699a3c4606eef141556286eefc51c574b643fd53acc1f2d1e" + end + + depends_on "tomcat" => :test + depends_on "apr" + depends_on "openjdk" + depends_on "openssl@3" + + def install + cd "native" do + system "./configure", "--with-apr=#{Formula["apr"].opt_prefix}", + "--with-java-home=#{Formula["openjdk"].opt_prefix}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make" + system "make", "install" + end + end + + def caveats + <<~EOS + In order for tomcat's APR lifecycle listener to find this library, you'll + need to add it to java.library.path. This can be done by adding this line + to $CATALINA_HOME/bin/setenv.sh + + CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=#{opt_lib}" + + If $CATALINA_HOME/bin/setenv.sh doesn't exist, create it and make it executable. + EOS + end + + test do + ENV["CATALINA_BASE"] = testpath + tomcat = Formula["tomcat"] + cp_r tomcat.libexec.children, testpath + (testpath/"bin/setenv.sh").write <<~SH + CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=#{opt_lib}" + SH + chmod "+x", "bin/setenv.sh" + + pid = spawn(tomcat.bin/"catalina", "start") + sleep 10 + sleep 10 if OS.mac? && Hardware::CPU.intel? + begin + system tomcat.bin/"catalina", "stop" + ensure + Process.wait pid + end + + output = (testpath/"logs/catalina.out").read + assert_match(/Loaded Apache Tomcat Native library .* using APR version/, output) + assert_match "OpenSSL successfully initialized", output + end +end diff --git a/Formula/t/tomcat.rb b/Formula/t/tomcat.rb new file mode 100644 index 0000000000000..4364a6bcb6567 --- /dev/null +++ b/Formula/t/tomcat.rb @@ -0,0 +1,57 @@ +class Tomcat < Formula + desc "Implementation of Java Servlet and JavaServer Pages" + homepage "https://tomcat.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-11/v11.0.13/bin/apache-tomcat-11.0.13.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-11/v11.0.13/bin/apache-tomcat-11.0.13.tar.gz" + sha256 "f174c8aebb6d27864ba40823ceb059191d27cc0ee24a28b691ccd416839b8ecf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b71906008f51b322bfb2239cc14ad673daf2d35cd3b06bcaf5893dde71c7f48c" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + + pkgetc.install Dir["conf/*"] + (buildpath/"conf").rmdir + libexec.install_symlink pkgetc => "conf" + + libexec.install Dir["*"] + (bin/"catalina").write_env_script "#{libexec}/bin/catalina.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + def caveats + <<~EOS + Configuration files: #{pkgetc} + EOS + end + + service do + run [opt_bin/"catalina", "run"] + keep_alive true + end + + test do + ENV["CATALINA_BASE"] = testpath + cp_r Dir["#{libexec}/*"], testpath + rm Dir["#{libexec}/logs/*"] + + pid = fork do + exec bin/"catalina", "start" + end + sleep 3 + begin + system bin/"catalina", "stop" + ensure + Process.wait pid + end + assert_path_exists testpath/"logs/catalina.out" + end +end diff --git a/Formula/t/tomcat@10.rb b/Formula/t/tomcat@10.rb new file mode 100644 index 0000000000000..39bd7f27bbada --- /dev/null +++ b/Formula/t/tomcat@10.rb @@ -0,0 +1,63 @@ +class TomcatAT10 < Formula + desc "Implementation of Java Servlet and JavaServer Pages" + homepage "https://tomcat.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-10/v10.1.48/bin/apache-tomcat-10.1.48.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.48/bin/apache-tomcat-10.1.48.tar.gz" + sha256 "6c000c20136cf2aed046142997818416a160c0e516c1fba24544b4d09dba9513" + license "Apache-2.0" + + livecheck do + url :stable + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "9608b8ec594b2a7a6dd2af3ff6918c5de1cb2c4adae2def26f057d658a40075a" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + + pkgetc.install Dir["conf/*"] + (buildpath/"conf").rmdir + libexec.install_symlink pkgetc => "conf" + + libexec.install Dir["*"] + (bin/"catalina").write_env_script "#{libexec}/bin/catalina.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + def caveats + <<~EOS + Configuration files: #{pkgetc} + EOS + end + + service do + run [opt_bin/"catalina", "run"] + keep_alive true + end + + test do + ENV["CATALINA_BASE"] = testpath + cp_r Dir["#{libexec}/*"], testpath + rm Dir["#{libexec}/logs/*"] + + pid = fork do + exec bin/"catalina", "start" + end + sleep 3 + begin + system bin/"catalina", "stop" + ensure + Process.wait pid + end + assert_path_exists testpath/"logs/catalina.out" + end +end diff --git a/Formula/t/tomcat@8.rb b/Formula/t/tomcat@8.rb new file mode 100644 index 0000000000000..effa038617256 --- /dev/null +++ b/Formula/t/tomcat@8.rb @@ -0,0 +1,63 @@ +class TomcatAT8 < Formula + desc "Implementation of Java Servlet and JavaServer Pages" + homepage "https://tomcat.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-8/v8.5.100/bin/apache-tomcat-8.5.100.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.100/bin/apache-tomcat-8.5.100.tar.gz" + sha256 "163abe51289dd09dc375791888d6f2d5508c06050548dc4fc7700251f4bebaca" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8704ee4ff0be3b0acdadf62c2fd3fd8aaf12944b49f2a2621886b8f935ed397c" + end + + keg_only :versioned_formula + + # https://tomcat.apache.org/tomcat-85-eol.html + deprecate! date: "2024-03-31", because: :unsupported + disable! date: "2025-03-31", because: :unsupported + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + + pkgetc.install Dir["conf/*"] + (buildpath/"conf").rmdir + libexec.install_symlink pkgetc => "conf" + + libexec.install Dir["*"] + (bin/"catalina").write_env_script "#{libexec}/bin/catalina.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + def caveats + <<~EOS + Configuration files: #{pkgetc} + EOS + end + + service do + run [opt_bin/"catalina", "run"] + keep_alive true + end + + test do + ENV["CATALINA_BASE"] = testpath + cp_r Dir["#{libexec}/*"], testpath + rm Dir["#{libexec}/logs/*"] + + pid = fork do + exec bin/"catalina", "start" + end + sleep 3 + begin + system bin/"catalina", "stop" + ensure + Process.wait pid + end + assert_path_exists testpath/"logs/catalina.out" + end +end diff --git a/Formula/t/tomcat@9.rb b/Formula/t/tomcat@9.rb new file mode 100644 index 0000000000000..57f3472cb3497 --- /dev/null +++ b/Formula/t/tomcat@9.rb @@ -0,0 +1,63 @@ +class TomcatAT9 < Formula + desc "Implementation of Java Servlet and JavaServer Pages" + homepage "https://tomcat.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-9/v9.0.111/bin/apache-tomcat-9.0.111.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.111/bin/apache-tomcat-9.0.111.tar.gz" + sha256 "ea964bb9f09ea3a9aa0f525924e8c27efaf277a708f69e81f7d0adf585a5c373" + license "Apache-2.0" + + livecheck do + url :stable + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "09c95e04691c44161ea4034324efd65e0c6b8f78ef0e68fd65d686c21b5f5011" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + + pkgetc.install Dir["conf/*"] + (buildpath/"conf").rmdir + libexec.install_symlink pkgetc => "conf" + + libexec.install Dir["*"] + (bin/"catalina").write_env_script "#{libexec}/bin/catalina.sh", Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + Configuration files: #{pkgetc} + EOS + end + + service do + run [opt_bin/"catalina", "run"] + keep_alive true + end + + test do + ENV["CATALINA_BASE"] = testpath + cp_r Dir["#{libexec}/*"], testpath + rm Dir["#{libexec}/logs/*"] + + pid = fork do + exec bin/"catalina", "start" + end + sleep 3 + begin + system bin/"catalina", "stop" + ensure + Process.wait pid + end + assert_path_exists testpath/"logs/catalina.out" + end +end diff --git a/Formula/t/tomee-plume.rb b/Formula/t/tomee-plume.rb new file mode 100644 index 0000000000000..b4e02764818aa --- /dev/null +++ b/Formula/t/tomee-plume.rb @@ -0,0 +1,40 @@ +class TomeePlume < Formula + desc "Apache TomEE Plume" + homepage "https://tomee.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomee/tomee-10.1.2/apache-tomee-10.1.2-plume.tar.gz" + mirror "https://archive.apache.org/dist/tomee/tomee-10.1.2/apache-tomee-10.1.2-plume.tar.gz" + sha256 "58066f8da82c4b9194a579dd31f55e0ba7bd08fe073fe1defd86f60b89c41b4c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ed1c3f847d659c083921f778db78ee3a18900621f5529473bdfd8335cd8b6f1c" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + rm_r(Dir["bin/*.bat.original"]) + rm_r(Dir["bin/*.exe"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*.sh"] + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + def caveats + <<~EOS + The home of Apache TomEE Plume is: + #{opt_libexec} + To run Apache TomEE: + #{opt_bin}/startup.sh + EOS + end + + test do + system "#{opt_bin}/configtest.sh" + end +end diff --git a/Formula/t/tomee-plus.rb b/Formula/t/tomee-plus.rb new file mode 100644 index 0000000000000..8f075e1b03859 --- /dev/null +++ b/Formula/t/tomee-plus.rb @@ -0,0 +1,41 @@ +class TomeePlus < Formula + desc "Everything in TomEE Web Profile and JAX-RS, plus more" + homepage "https://tomee.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomee/tomee-10.1.2/apache-tomee-10.1.2-plus.tar.gz" + mirror "https://archive.apache.org/dist/tomee/tomee-10.1.2/apache-tomee-10.1.2-plus.tar.gz" + sha256 "d64bcd00029ba3ea51c59263a581eff6da0df5b24f636dfdf83755dc2f765698" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2187a93f5e98f9218fd17c15ce08094801059fb29be871dfbc2279182d401181" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + rm_r(Dir["bin/*.bat.original"]) + rm_r(Dir["bin/*.exe"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + libexec.install Dir["*"] + (bin/"tomee-plus-startup").write_env_script "#{libexec}/bin/startup.sh", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Apache TomEE Plus is: + #{opt_libexec} + To run Apache TomEE: + #{opt_libexec}/bin/tomee-plus-startup + EOS + end + + test do + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + system "#{opt_libexec}/bin/configtest.sh" + end +end diff --git a/Formula/t/tomee-webprofile.rb b/Formula/t/tomee-webprofile.rb new file mode 100644 index 0000000000000..1f89612f87d81 --- /dev/null +++ b/Formula/t/tomee-webprofile.rb @@ -0,0 +1,41 @@ +class TomeeWebprofile < Formula + desc "All-Apache Java EE 7 Web Profile stack" + homepage "https://tomee.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tomee/tomee-10.1.2/apache-tomee-10.1.2-webprofile.tar.gz" + mirror "https://archive.apache.org/dist/tomee/tomee-10.1.2/apache-tomee-10.1.2-webprofile.tar.gz" + sha256 "22fe8734b036fe09f7789b4bb44168a8ec7281450275a662cf15847a7ed396ac" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fc6f5b70557f903cdf24bbc42e58863ec432123865c7096e3e917dda49c21aac" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["bin/*.bat"]) + rm_r(Dir["bin/*.bat.original"]) + rm_r(Dir["bin/*.exe"]) + + # Install files + prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] + libexec.install Dir["*"] + (bin/"tomee-webprofile-startup").write_env_script "#{libexec}/bin/startup.sh", + Language::Java.overridable_java_home_env + end + + def caveats + <<~EOS + The home of Apache TomEE Web is: + #{opt_libexec} + To run Apache TomEE: + #{opt_libexec}/bin/tomee-webprofile-startup + EOS + end + + test do + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + system "#{opt_libexec}/bin/configtest.sh" + end +end diff --git a/Formula/t/toml-bombadil.rb b/Formula/t/toml-bombadil.rb new file mode 100644 index 0000000000000..7ef2ae2f6ef37 --- /dev/null +++ b/Formula/t/toml-bombadil.rb @@ -0,0 +1,55 @@ +class TomlBombadil < Formula + desc "Dotfile manager with templating" + homepage "https://github.com/oknozor/toml-bombadil" + url "https://github.com/oknozor/toml-bombadil/archive/refs/tags/4.2.0.tar.gz" + sha256 "b911678642a1229908dfeabbdd7f799354346c0e37f3ac999277655e01b6f229" + license "MIT" + head "https://github.com/oknozor/toml-bombadil.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2d56dd5101d3de48bc6ec47ede5a788021cd815ddaa0f3a9f39fd26f23b35ac4" + sha256 cellar: :any, arm64_sequoia: "905ddd0270646b44ff488fb84dfb605629359c4d3621f6ad4539b8965116dbef" + sha256 cellar: :any, arm64_sonoma: "ce0dcbfe365b603d63838d1a13159dafe420206f4195c40cd9c2f6664a366760" + sha256 cellar: :any, arm64_ventura: "5a7c807337580c8c0938e10b17baca04e0cca1730d3575a1de0ebe562c3732fe" + sha256 cellar: :any, sonoma: "a74977ffa395f041b92f6ef4e989d3cd8319cb1884bf82975b2bb889b30fe23e" + sha256 cellar: :any, ventura: "9f03631a0c28507a788635f902f3387bfbbf7a8c533e834b78c680b685dc7e54" + sha256 cellar: :any_skip_relocation, arm64_linux: "b86e0ee0f27cb207b98bad86ef088454bb5950f3f5d18d751d24c8ef18adae8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2085ccd09aaa6ea756deb9d198231ffa1d83777c329f081ef3a1c62300ae1b4c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"bombadil", "generate-completions") + end + + test do + config_dir = if OS.mac? + testpath/"Library/Application Support" + else + testpath/".config" + end + + config_dir.mkpath + (config_dir/"bombadil.toml").write <<~TOML + dotfiles_dir = "dotfiles" + TOML + + (testpath/"dotfiles").mkpath + + ENV["HOME"] = testpath + + output = shell_output("#{bin}/bombadil get vars") + + assert_match(/"arch":\s*".+"/, output) + assert_match(/"os":\s*".+"/, output) + end +end diff --git a/Formula/t/toml-test.rb b/Formula/t/toml-test.rb new file mode 100644 index 0000000000000..8f020ed6515b7 --- /dev/null +++ b/Formula/t/toml-test.rb @@ -0,0 +1,38 @@ +class TomlTest < Formula + desc "Language agnostic test suite for TOML parsers" + homepage "https://github.com/toml-lang/toml-test" + url "https://github.com/toml-lang/toml-test/archive/refs/tags/v1.6.0.tar.gz" + sha256 "79ee1f9edef786e28cc54504179672071dbc7bad24d73348e8e7d7e766068abc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d0f52af8f042c94662189576a844d1f8d5d5e238609afac58b4061f4007e1f66" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41dedc807934ac3a07fec76dfd5b281ce8545e7c53b2ce4820578840d78710b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41dedc807934ac3a07fec76dfd5b281ce8545e7c53b2ce4820578840d78710b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41dedc807934ac3a07fec76dfd5b281ce8545e7c53b2ce4820578840d78710b4" + sha256 cellar: :any_skip_relocation, sonoma: "f9b3b7fce7698c7e0f0302fefa8e243ab1592b879c4cbb910ab32716ae5dde20" + sha256 cellar: :any_skip_relocation, ventura: "f9b3b7fce7698c7e0f0302fefa8e243ab1592b879c4cbb910ab32716ae5dde20" + sha256 cellar: :any_skip_relocation, arm64_linux: "00ce205eb7bca140cb56d9fdddfcab657890587bf0f63bd48c78e433634df458" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa6601c9403bb864f502aa08e3df84a74688d6033a2c56f6dcbc6dc1a7c3d040" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/toml-test" + pkgshare.install "tests" + end + + test do + system bin/"toml-test", "-version" + system bin/"toml-test", "-help" + (testpath/"stub-decoder").write <<~SH + #!/bin/sh + cat #{pkgshare}/tests/valid/example.json + SH + chmod 0755, testpath/"stub-decoder" + system bin/"toml-test", "-testdir", pkgshare/"tests", + "-run", "valid/example*", + "--", testpath/"stub-decoder" + end +end diff --git a/Formula/t/toml11.rb b/Formula/t/toml11.rb new file mode 100644 index 0000000000000..bbbd3e94ba323 --- /dev/null +++ b/Formula/t/toml11.rb @@ -0,0 +1,46 @@ +class Toml11 < Formula + desc "TOML for Modern C++" + homepage "https://toruniina.github.io/toml11/" + url "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.4.0.tar.gz" + sha256 "815bfe6792aa11a13a133b86e7f0f45edc5d71eb78f5fb6686c49c7f792b9049" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "4b7ee42a48906e90cc3f54ef70b943bdc34edec94917f745f2e2dee74d75802e" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_CXX_STANDARD=11", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.toml").write <<~TOML + test_str = "a test string" + TOML + + (testpath/"test.cpp").write <<~CPP + #include "toml.hpp" + #include + + int main(int argc, char** argv) { + const auto data = toml::parse("test.toml"); + const auto test_str = toml::find(data, "test_str"); + std::cout << "test_str = " << test_str << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}" + assert_equal "test_str = a test string\n", shell_output("./test") + end +end diff --git a/Formula/t/toml2json.rb b/Formula/t/toml2json.rb new file mode 100644 index 0000000000000..5bfb9e90fca4a --- /dev/null +++ b/Formula/t/toml2json.rb @@ -0,0 +1,33 @@ +class Toml2json < Formula + desc "Convert TOML to JSON" + homepage "https://github.com/woodruffw/toml2json" + url "https://github.com/woodruffw/toml2json/archive/refs/tags/v1.3.2.tar.gz" + sha256 "7cca2cf9339458c603729a3985211d164d07eeb1d40af4a59116aa21e25ef3ed" + license "MIT" + head "https://github.com/woodruffw/toml2json.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0ca4a4532d8edb249db5a39b5011ef93dfb68369041cb6e2826d28f98315be89" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32a4e008f4a0ad455cc5ce9f9de148d39914e2a7654dc97ffc1427ea9da17b62" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "659b9de6ec9dff88938220da1ba5476ec701adece0276324b0b9cd119c9d6c38" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9e6fc12c96c7bf64544e90e786b40746905c826043b26904297d19132ec5fa46" + sha256 cellar: :any_skip_relocation, sonoma: "1af6af912659008f5912e892f1ec4a60038bfb4e9bacb8f3afd874a2898c04cd" + sha256 cellar: :any_skip_relocation, ventura: "34e24d0cb671969f44b76d96176f43618abee19fbb13375d24aa1c799c69225b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7edd47db03b8ddeef9bce364a8209b559751973ef2d69d24aa73bb508523860" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c3aa6df5475a72cad6908928e791de675289616259221645924914c8d380c04" + end + + depends_on "rust" => :build + + conflicts_with "remarshal", because: "both install `toml2json` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + out = pipe_output(bin/"toml2json", 'wow = "amazing"') + json = JSON.parse(out) + assert_equal "amazing", json.fetch("wow") + end +end diff --git a/Formula/t/tomlplusplus.rb b/Formula/t/tomlplusplus.rb new file mode 100644 index 0000000000000..4c854b408fba2 --- /dev/null +++ b/Formula/t/tomlplusplus.rb @@ -0,0 +1,61 @@ +class Tomlplusplus < Formula + desc "Header-only TOML config file parser and serializer for C++17" + homepage "https://marzer.github.io/tomlplusplus/" + url "https://github.com/marzer/tomlplusplus/archive/refs/tags/v3.4.0.tar.gz" + sha256 "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "871dfe4e410d713db5ee049a54446fc0d421163a1fc30a66d3d9c1946c886640" + sha256 cellar: :any, arm64_sequoia: "3934d4a98565c6b3161550033341f13c4e74085b3de259e57f09007c5a03b940" + sha256 cellar: :any, arm64_sonoma: "40067a1ffc31cf6fdcb26161a1809b815a8d82a63afdf93232dd81521329e05d" + sha256 cellar: :any, arm64_ventura: "871c57fbe77aa04bba1388ac0ca4e0ccf4c125333a84b84a860a6548a2bffb8f" + sha256 cellar: :any, arm64_monterey: "71e6c4e3940782e94ba05fb8357430b56c973b1ff867340ce966acfdc649f6c4" + sha256 cellar: :any, sonoma: "6771afc5d63e1df3d2fd8858c305ef28e97df6cd43808692431f6a84881665c9" + sha256 cellar: :any, ventura: "a7496d680b31e37abfbb26e8117132a1b9833058d3bda72335ace6dcffcf6277" + sha256 cellar: :any, monterey: "1f3418dd05029a34c9cf2a64d798c35f7553094aae8c9c702f82b736317d6dc4" + sha256 cellar: :any_skip_relocation, arm64_linux: "aee73aaa4f42f852a53342e4575e66309e76197eb2fefcaf0385a298562d0e8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f59dade0a31cf96a7708117ae8b8cb743bfacab47972dcdeb30ee1a8ba84bd5f" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() + { + std::string tomlContent = R"toml( + # This is a TOML document + + title = "TOML Example" + + [owner] + name = "Tom Preston-Werner" + dob = 1979-05-27T07:32:00-08:00 + )toml"; + + auto data = toml::parse(tomlContent); + std::cout << "Title: " << data["title"].value_or("No title") << std::endl; + return 0; + } + CPP + + pkg_config_flags = shell_output("pkgconf --cflags --libs tomlplusplus").chomp.split + system ENV.cxx, "test.cpp", *pkg_config_flags, "-std=c++17", "-o", "test" + assert_match "Title: TOML Example", shell_output("./test") + end +end diff --git a/Formula/t/toot.rb b/Formula/t/toot.rb new file mode 100644 index 0000000000000..28a87ae9faaf5 --- /dev/null +++ b/Formula/t/toot.rb @@ -0,0 +1,100 @@ +class Toot < Formula + include Language::Python::Virtualenv + + desc "Mastodon CLI & TUI" + homepage "https://toot.bezdomni.net/" + url "https://files.pythonhosted.org/packages/7f/87/83a31c9f1e4da5d4a32713072d209317f9927c90000578aaad68bf82ed6a/toot-0.51.0.tar.gz" + sha256 "48e2c422c92aebca20c1913238b6dbff969a048ee4eaa70d62921a1e58415797" + license "GPL-3.0-only" + head "https://github.com/ihabunek/toot.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2dc9a4fd124c9932d55710871b36ae56ad75ea0324a6703d39bbfe456e953637" + end + + depends_on "certifi" + depends_on "pillow" + depends_on "python@3.14" + + pypi_packages package_name: "toot[images,richtext]", + exclude_packages: ["certifi", "pillow"] + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/77/e9/df2358efd7659577435e2177bfa69cba6c33216681af51a707193dec162a/beautifulsoup4-4.14.2.tar.gz" + sha256 "2a98ab9f944a11acee9cc848508ec28d9228abfd522ef0fad6a02a72e0ded69e" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz" + sha256 "e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f" + end + + resource "term-image" do + url "https://files.pythonhosted.org/packages/39/87/7e8ba20702294ee8b750427c2600308c20f39ddf3b0f73250dc43ef13038/term_image-0.7.2.tar.gz" + sha256 "07320573baa667dcde145d55e94769cbaafeea43b61245245153ff5075b55ffb" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz" + sha256 "430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/bb/d3/09683323e2290732a39dc92ca5031d5e5ddda56f8d236f885a400535b29a/urwid-3.0.3.tar.gz" + sha256 "300804dd568cda5aa1c5b204227bd0cfe7a62cef2d00987c5eb2e4e64294ed9b" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/toot --version") + assert_equal "You are not logged in to any accounts", shell_output("#{bin}/toot auth").chomp + end +end diff --git a/Formula/t/topfew.rb b/Formula/t/topfew.rb new file mode 100644 index 0000000000000..23a8bb89bcdee --- /dev/null +++ b/Formula/t/topfew.rb @@ -0,0 +1,30 @@ +class Topfew < Formula + desc "Finds the field values which appear most often in a stream of records" + homepage "https://github.com/timbray/topfew" + url "https://github.com/timbray/topfew/archive/refs/tags/v2.0.0.tar.gz" + sha256 "89b9abe7304eb6bb50cc5b3152783e50600439955f73b6175c6db8aec75c0ac9" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "565223383079283a6c12ede0f085804a272ce65f14d8ae5882667b517db5434f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bed91d915da3735f3b96723b744cbed823de57da2f096a5c337a6b170ddd5f19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d7f6c39d1e8eaed9de48d13494541f44f5aa09b74eb8a6436f8eb662026cccc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d7f6c39d1e8eaed9de48d13494541f44f5aa09b74eb8a6436f8eb662026cccc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4d7f6c39d1e8eaed9de48d13494541f44f5aa09b74eb8a6436f8eb662026cccc" + sha256 cellar: :any_skip_relocation, sonoma: "6fa90b99c1b653a0c80c0f0468930f89ca1c3e50ab5927ddb38ff2f015f4e7b3" + sha256 cellar: :any_skip_relocation, ventura: "6fa90b99c1b653a0c80c0f0468930f89ca1c3e50ab5927ddb38ff2f015f4e7b3" + sha256 cellar: :any_skip_relocation, monterey: "6fa90b99c1b653a0c80c0f0468930f89ca1c3e50ab5927ddb38ff2f015f4e7b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "342f33c16251a92b7b5ebf03802f9c005deff56d61c1a00cdcdc7c4b8289c5d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dec313f97c765887b956f178a9794d411e67040886de5583bf3f7be97a263aa" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "1 bar", pipe_output("#{bin}/topfew -f 2", "foo bar\n") + end +end diff --git a/Formula/t/topgit.rb b/Formula/t/topgit.rb new file mode 100644 index 0000000000000..082722aa965e3 --- /dev/null +++ b/Formula/t/topgit.rb @@ -0,0 +1,15 @@ +class Topgit < Formula + desc "Git patch queue manager" + homepage "https://github.com/mackyle/topgit" + url "https://github.com/mackyle/topgit/archive/refs/tags/topgit-0.19.14.tar.gz" + sha256 "0556485ca8ddf0cf863de4da36b11351545aca74fbf71581ffe9f5a5ce0718cb" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "00f58e04cdec33f5f8b5a141443aeba8fd6ceb94bc43b834954dbd40eda37e73" + end + + def install + system "make", "install", "prefix=#{prefix}" + end +end diff --git a/Formula/t/topgrade.rb b/Formula/t/topgrade.rb new file mode 100644 index 0000000000000..397a8b7729a64 --- /dev/null +++ b/Formula/t/topgrade.rb @@ -0,0 +1,40 @@ +class Topgrade < Formula + desc "Upgrade all the things" + homepage "https://github.com/topgrade-rs/topgrade" + url "https://github.com/topgrade-rs/topgrade/archive/refs/tags/v16.1.2.tar.gz" + sha256 "58d1d8de281dbcb4fd2cee1e1e8b22deb5e5baf282c9518a3ddb2673bba07c88" + license "GPL-3.0-or-later" + head "https://github.com/topgrade-rs/topgrade.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "96dd09d80604a4052f1df24d239d9c3a884900106dfe05d0463b535c71d286f8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df0032bdc7a994892625b2bc08a29c618d88d5f7d21055ee903478042f16a45d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f74666eb1aa2917bf450436eb69ad81a6867d595a07263d57cab28a151f86ab" + sha256 cellar: :any_skip_relocation, sonoma: "fc6282b12ce7356ae4999bfe4f50242a951706cca571742a5fde045b0eed96e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ec33b3bb467390043967b14276d86d4afc4d812b7d7e6d2653fe5890cff62d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e612c953fdae54c80cf4c16fb679f27e4e4261e63cf570139cc8a1d766c3065" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"topgrade", "--gen-completion") + (man1/"topgrade.1").write Utils.safe_popen_read(bin/"topgrade", "--gen-manpage") + end + + test do + ENV["TOPGRADE_SKIP_BRKC_NOTIFY"] = "true" + assert_match version.to_s, shell_output("#{bin}/topgrade --version") + + output = shell_output("#{bin}/topgrade -n --only brew_formula") + assert_match %r{Dry running: (?:#{HOMEBREW_PREFIX}/bin/)?brew upgrade}o, output + refute_match(/\sSelf update\s/, output) + end +end diff --git a/Formula/t/topiary.rb b/Formula/t/topiary.rb new file mode 100644 index 0000000000000..57a816844a632 --- /dev/null +++ b/Formula/t/topiary.rb @@ -0,0 +1,45 @@ +class Topiary < Formula + desc "Uniform formatter for simple languages, as part of the Tree-sitter ecosystem" + homepage "https://topiary.tweag.io/" + url "https://github.com/tweag/topiary/archive/refs/tags/v0.7.0.tar.gz" + sha256 "88f90418b9a87f8b80d914f8cae00b173b5db9961ac9bcda4c063d6ed4b76aa8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d63d024bc5ddd00ac02004434c7c107bb4fe37310994facaa64f4a6f458df37d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30a66cb9ec015233b5f91e1380b0bd1b97fe5f90b95c3bfb8cd5233a84c99aa4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dcdd629e1ebcdbd523edcadc4f9623a27c3bb19bc973a96595bfbf3ab9e2e270" + sha256 cellar: :any_skip_relocation, sonoma: "3f6944a75a4096bf266677510d6edf76c88709df1f49299f916261ddf23d2816" + sha256 cellar: :any_skip_relocation, arm64_linux: "761c4d8c2d993d393abdf4ae4da47f6a05423c6ffe3cff9e8e0385e1210be545" + sha256 cellar: :any_skip_relocation, x86_64_linux: "108b8746d36ae57e0c9f29cd5d4114ab4f1a0694cac7da7223cfa8d18e49ca10" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "topiary-cli") + + generate_completions_from_executable(bin/"topiary", "completion") + share.install "topiary-queries/queries" + end + + test do + ENV["TOPIARY_LANGUAGE_DIR"] = share/"queries" + + (testpath/"test.rs").write <<~RUST + fn main() { + println!("Hello, world!"); + } + RUST + + system bin/"topiary", "format", testpath/"test.rs" + + assert_match <<~RUST, File.read("#{testpath}/test.rs") + fn main() { + println!("Hello, world!"); + } + RUST + + assert_match version.to_s, shell_output("#{bin}/topiary --version") + end +end diff --git a/Formula/t/tor.rb b/Formula/t/tor.rb new file mode 100644 index 0000000000000..9bde026267a3f --- /dev/null +++ b/Formula/t/tor.rb @@ -0,0 +1,64 @@ +class Tor < Formula + desc "Anonymizing overlay network for TCP" + homepage "https://www.torproject.org/" + url "https://www.torproject.org/dist/tor-0.4.8.19.tar.gz" + mirror "https://www.torservers.net/mirrors/torproject.org/dist/tor-0.4.8.19.tar.gz" + mirror "https://fossies.org/linux/misc/tor-0.4.8.19.tar.gz" + sha256 "3cb649a1d33ba6a65f109d224534e93aaf0a6de84a5b1cb4b054bfa06bb74f5a" + # Complete list of licenses: + # https://gitweb.torproject.org/tor.git/plain/LICENSE + license all_of: [ + "BSD-2-Clause", + "BSD-3-Clause", + "MIT", + "NCSA", + ] + + livecheck do + url "https://dist.torproject.org/" + regex(/href=.*?tor[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "112ffb60658314ce8f8477bd9bd261b9e92b2fa009ef6a25b932d8f7c735bb04" + sha256 arm64_sequoia: "ef4680d2a89bfcd79619759980697bac195bfd77a3a05f99ce44c91087b4f3e9" + sha256 arm64_sonoma: "bace408b993f6210dd85a1d51de2116c9e3a573b4cea59db3bd0e59f532e2c6a" + sha256 sonoma: "48a14ff9cd27a54313b97c900920878f9d4c90f7fc1a2069b6a1c216ea4e9726" + sha256 arm64_linux: "b525a9d1593e101b0dab070c6c65549004705b422f5efc02293f8f3d087bcd56" + sha256 x86_64_linux: "2f01104d624c0f360564a0f7b5783aea9563ea546f48ceeb822cbf9c340ef5f6" + end + + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libscrypt" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + args = %W[ + --disable-silent-rules + --sysconfdir=#{etc} + --localstatedir=#{var} + --with-openssl-dir=#{Formula["openssl@3"].opt_prefix} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + service do + run opt_bin/"tor" + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/tor.log" + error_log_path var/"log/tor.log" + end + + test do + pipe_output("#{bin}/tor-gencert --create-identity-key --passphrase-fd 0") + assert_path_exists testpath/"authority_certificate" + assert_path_exists testpath/"authority_identity_key" + assert_path_exists testpath/"authority_signing_key" + end +end diff --git a/Formula/t/torchvision.rb b/Formula/t/torchvision.rb new file mode 100644 index 0000000000000..6ec7516e6c2db --- /dev/null +++ b/Formula/t/torchvision.rb @@ -0,0 +1,111 @@ +class Torchvision < Formula + include Language::Python::Virtualenv + + desc "Datasets, transforms, and models for computer vision" + homepage "https://pytorch.org/vision/stable/index.html" + url "https://github.com/pytorch/vision/archive/refs/tags/v0.24.0.tar.gz" + sha256 "f799cdd1d67a3edbcdc6af8fb416fe1b019b512fb426c0314302cd81518a0095" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "900f3b8a00d3dc5544803d42890d1744f47a621c2fbee0f55b67b3a0af848fee" + sha256 cellar: :any, arm64_sequoia: "6da1e31b6e478bba712f3e93f19ca15bb4e27ce16d674219c80d2dd06e6faa73" + sha256 cellar: :any, arm64_sonoma: "82cf2692496050e4cb06fe77a0f9003238cbbfe07d8351f158e07490fec11415" + sha256 cellar: :any, sonoma: "051d2fd6ab5276fbe72f26fff49d598b2b7b10eab4cedb6369856bc299f20df0" + sha256 cellar: :any_skip_relocation, arm64_linux: "28f574c23e35e7a347ae81dfffaaabaecdbe16be30fc7b8c5e48620152b675da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37b65a878423eb3d380e60ae22ac96598af0fb79757d2401bf868d99104639db" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "numpy" + depends_on "pillow" + depends_on "pytorch" + depends_on "webp" + + pypi_packages exclude_packages: %w[certifi numpy pillow torch] + + def install + # Avoid overlinking to `abseil`, `libomp` and `protobuf` + args = OS.mac? ? ["-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs"] : [] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + jpeg = Formula["jpeg-turbo"] + inreplace "setup.py", + 'jpeg_found, jpeg_include_dir, jpeg_library_dir = find_library(header="jpeglib.h")', + "jpeg_found, jpeg_include_dir, jpeg_library_dir = True, '#{jpeg.include}', '#{jpeg.lib}'" + + python3 = "python3.14" + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + + # We depend on pytorch, but that's a separate formula, so install a `.pth` file to link them. + # This needs to happen _before_ we try to install torchvision. + # NOTE: This is an exception to our usual policy as building `pytorch` is complicated + site_packages = Language::Python.site_packages(venv.root/"bin/python3") + pth_contents = "import site; site.addsitedir('#{Formula["pytorch"].opt_libexec/site_packages}')\n" + (venv.site_packages/"homebrew-pytorch.pth").write pth_contents + + venv.pip_install_and_link(buildpath, build_isolation: false) + + pkgshare.install "examples" + end + + test do + # test that C++ libraries are available + # See also https://github.com/pytorch/vision/issues/2134#issuecomment-1793846900 + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + + int main() { + auto& ops = torch::jit::getAllOperatorsFor(torch::jit::Symbol::fromQualString("torchvision::nms")); + assert(ops.size() == 1); + } + CPP + pytorch = Formula["pytorch"] + openmp_flags = if OS.mac? + libomp = Formula["libomp"] + %W[ + -Xpreprocessor -fopenmp + -I#{libomp.opt_include} + -L#{libomp.opt_lib} -lomp + ] + else + %w[-fopenmp] + end + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *openmp_flags, + "-I#{pytorch.opt_include}", + "-I#{pytorch.opt_include}/torch/csrc/api/include", + "-L#{pytorch.opt_lib}", "-ltorch", "-ltorch_cpu", "-lc10", + "-L#{lib}", *("-Wl,--no-as-needed" if OS.linux?), "-ltorchvision" + + system "./test" + + # test that the `torchvision` Python module is available + cp test_fixtures("test.png"), "test.png" + system libexec/"bin/python", "-c", <<~PYTHON + import torch + import torchvision + t = torchvision.io.read_image("test.png") + assert isinstance(t, torch.Tensor) + PYTHON + end +end diff --git a/Formula/t/torsocks.rb b/Formula/t/torsocks.rb new file mode 100644 index 0000000000000..52517139fa2b7 --- /dev/null +++ b/Formula/t/torsocks.rb @@ -0,0 +1,42 @@ +class Torsocks < Formula + desc "Use SOCKS-friendly applications with Tor" + homepage "https://gitlab.torproject.org/tpo/core/torsocks" + url "https://gitlab.torproject.org/tpo/core/torsocks/-/archive/v2.5.0/torsocks-v2.5.0.tar.bz2" + sha256 "31a917328b221e955230b7663abfbc50d3a9b445a68cb0313c11cf884f8cb41f" + license "GPL-2.0-only" + head "https://gitlab.torproject.org/tpo/core/torsocks.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "176eff92c63f1ea09319b33df72fb67b6a1f57f1da4df3cdfcf8a0c60e9b0e22" + sha256 arm64_sequoia: "9f967a566d267075d63cb069a6d77973bfc4cb5e1244c2ca57171a04352f0b26" + sha256 arm64_sonoma: "b25792853457dbbc903f6aac9d252de7889ba0006c5a0cb904a9428cee03c066" + sha256 arm64_ventura: "4593fd902084328734cda9b1bfccd26242211d6beae0c510100630fbf31b07c0" + sha256 sonoma: "df428080ebd167aecf3abb603b6207ad469c9c52c55677a4e8deb0635ef1fac1" + sha256 ventura: "383a9b0bcdc089b45a2a13badbf11aebcf37674b749f086636d432bca79b6f2c" + sha256 arm64_linux: "3a273bb1e5923f05e4caa4d9a269c97020844c935a36845224acf4bf7799e129" + sha256 x86_64_linux: "4b4330e179d1c4a866f8be595ed65c1b443f5cc40e21bb30d0fb6be030c6e6a7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + # https://gitlab.torproject.org/legacy/trac/-/issues/28538 + patch do + url "https://gitlab.torproject.org/legacy/trac/uploads/9efc1c0c47b3950aa91e886b01f7e87d/0001-Fix-macros-for-accept4-2.patch" + sha256 "97881f0b59b3512acc4acb58a0d6dfc840d7633ead2f400fad70dda9b2ba30b0" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"torsocks", "--help" + end +end diff --git a/Formula/t/totp-cli.rb b/Formula/t/totp-cli.rb new file mode 100644 index 0000000000000..fc736463432fe --- /dev/null +++ b/Formula/t/totp-cli.rb @@ -0,0 +1,33 @@ +class TotpCli < Formula + desc "Authy/Google Authenticator like TOTP CLI tool written in Go" + homepage "https://yitsushi.github.io/totp-cli/" + url "https://github.com/yitsushi/totp-cli/archive/refs/tags/v1.9.2.tar.gz" + sha256 "c8b87c7854f373423dba2f8c6167c2836b6ae1f66b29b1becb505c277a00c54f" + license "MIT" + head "https://github.com/yitsushi/totp-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4f1100b0352e1655adde8916a571f21ab8c0648bb1855a70b85d58536376352f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9515bdef2db3bf5da965a8277124a63896168381b4b137081f0a00aa8f2d77ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9515bdef2db3bf5da965a8277124a63896168381b4b137081f0a00aa8f2d77ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9515bdef2db3bf5da965a8277124a63896168381b4b137081f0a00aa8f2d77ac" + sha256 cellar: :any_skip_relocation, sonoma: "65b2d6046eea06c4d909b30fbbc6c63ba549bcd7d11b638f6567bcd938a99b87" + sha256 cellar: :any_skip_relocation, ventura: "65b2d6046eea06c4d909b30fbbc6c63ba549bcd7d11b638f6567bcd938a99b87" + sha256 cellar: :any_skip_relocation, arm64_linux: "917d681477bf4f6ae1ea440252d6ce6afe051b83c81de3df631b5fb93912b0f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17aa04b4b9f66b5ef84c7584f1195cff95d76395cda1a02b5e756f90e5227576" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + bash_completion.install "autocomplete/bash_autocomplete" => "totp-cli" + zsh_completion.install "autocomplete/zsh_autocomplete" => "_totp-cli" + end + + test do + assert_match "generate", shell_output("#{bin}/totp-cli help") + assert_match "storage error", pipe_output("#{bin}/totp-cli list 2>&1", "") + end +end diff --git a/Formula/t/touca.rb b/Formula/t/touca.rb new file mode 100644 index 0000000000000..089af4cf75900 --- /dev/null +++ b/Formula/t/touca.rb @@ -0,0 +1,80 @@ +class Touca < Formula + include Language::Python::Virtualenv + + desc "Open source tool for regression testing complex software workflows" + homepage "https://github.com/trytouca/trytouca/tree/main/sdk/python" + url "https://files.pythonhosted.org/packages/c8/6d/e1986d8c9b4f6cd2b583d0df8bd1769989b5ce5cb91dcc613b0d187e4a7a/touca-1.8.7.tar.gz" + sha256 "244a52be4cf4670077fda0b740ac067470745da7084c241bc619b332f771d940" + license "Apache-2.0" + revision 3 + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "2aef71401d6fa95a1c2a1d9ce7ccf63c49e0131602a7876914ddbb373246b6f3" + end + + deprecate! date: "2025-08-13", because: :unmaintained + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "commonmark" do + url "https://files.pythonhosted.org/packages/60/48/a60f593447e8f0894ebb7f6e6c1f25dafc5e89c5879fdc9360ae93ff83f0/commonmark-0.9.1.tar.gz" + sha256 "452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60" + end + + resource "flatbuffers" do + url "https://files.pythonhosted.org/packages/0c/6e/3e52cd294d8e7a61e010973cce076a0cb2c6c0dfd4d0b7a13648c1b98329/flatbuffers-23.5.26.tar.gz" + sha256 "9ea1144cac05ce5d86e2859f431c6cd5e66cd9c78c558317c7955fb8d4c78d89" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/11/23/814edf09ec6470d52022b9e95c23c1bef77f0bc451761e1504ebd09606d3/rich-12.6.0.tar.gz" + sha256 "ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0" + end + + resource "touca-fbs" do + url "https://files.pythonhosted.org/packages/0e/ae/c5bd348bf8c21d5696538261dc8c05fc5e5a7d60056ecf7180c590d02bd1/touca_fbs-0.0.3.tar.gz" + sha256 "f9d31d0498bff34637356dcd567ae026e9f10d24ee806bf2e020be49b472779d" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + def install + # Allow latest `certifi`: https://github.com/trytouca/trytouca/pull/663 + inreplace "pyproject.toml", 'certifi = "^2022.12.7"', 'certifi = ">=2022.12.7"' + # Workaround broken script with poetry 2+ + inreplace "pyproject.toml", 'touca = { callable = "touca.cli.__main__:main" }', + 'touca = "touca.cli.__main__:main"' + venv = virtualenv_install_with_resources without: "flatbuffers" + + # Workaround a relative LICENSE file failing with new setuptools validation + # https://github.com/pypa/setuptools/commit/c31ebdc4749f1439972451a7b9b28734281d3830 + # Backport of https://github.com/google/flatbuffers/commit/6cb4d671a88e054744ce3029df9e733dc724ee76 + resource("flatbuffers").stage do + inreplace "setup.cfg", "../license", "../LICENSE" + inreplace "setup.py", "license_files='../LICENSE',", "" + venv.pip_install Pathname.pwd + end + end + + test do + assert_match "v#{version}", shell_output("#{bin}/touca version") + assert_empty shell_output("#{bin}/touca profile set test-profile") + assert_empty shell_output("#{bin}/touca config set some-key=some-value") + assert_match "some-key", shell_output("#{bin}/touca config show") + assert_match "some-value", shell_output("#{bin}/touca config show") + assert_match "test-profile", shell_output("#{bin}/touca profile ls") + assert_empty shell_output("#{bin}/touca profile rm test-profile") + end +end diff --git a/Formula/t/tox.rb b/Formula/t/tox.rb new file mode 100644 index 0000000000000..b30b934da17d5 --- /dev/null +++ b/Formula/t/tox.rb @@ -0,0 +1,97 @@ +class Tox < Formula + include Language::Python::Virtualenv + + desc "Generic Python virtualenv management and test command-line tool" + homepage "https://tox.wiki/en/latest/" + url "https://files.pythonhosted.org/packages/59/bf/0e4dbd42724cbae25959f0e34c95d0c730df03ab03f54d52accd9abfc614/tox-4.32.0.tar.gz" + sha256 "1ad476b5f4d3679455b89a992849ffc3367560bbc7e9495ee8a3963542e7c8ff" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a80d5e7e1e14a51252720aea7849cffa531365a6a8ae015aabcda19ed7aa73ca" + end + + depends_on "python@3.14" + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/cc/7e/b975b5814bd36faf009faebe22c1072a1fa1168db34d285ef0ba071ad78c/cachetools-6.2.1.tar.gz" + sha256 "3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pyproject-api" do + url "https://files.pythonhosted.org/packages/45/7b/c0e1333b61d41c69e59e5366e727b18c4992688caf0de1be10b3e5265f6b/pyproject_api-1.10.0.tar.gz" + sha256 "40c6f2d82eebdc4afee61c773ed208c04c19db4c4a60d97f8d7be3ebc0bbb330" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + def install + virtualenv_install_with_resources + end + + # Avoid relative paths + def post_install + lib_python_path = Pathname.glob(libexec/"lib/python*").first + lib_python_path.each_child do |f| + next unless f.symlink? + + realpath = f.realpath + rm f + ln_s realpath, f + end + end + + test do + assert_match "usage", shell_output("#{bin}/tox --help") + system bin/"tox" + pyver = Language::Python.major_minor_version(Formula["python@3.14"].opt_bin/"python3.14").to_s.delete(".") + + system bin/"tox", "quickstart", "src" + (testpath/"src/test_trivial.py").write <<~PYTHON + def test_trivial(): + assert True + PYTHON + chdir "src" do + system bin/"tox", "run" + end + assert_path_exists testpath/"src/.tox/py#{pyver}" + end +end diff --git a/Formula/t/toxcore.rb b/Formula/t/toxcore.rb new file mode 100644 index 0000000000000..9d7be221fbb5a --- /dev/null +++ b/Formula/t/toxcore.rb @@ -0,0 +1,52 @@ +class Toxcore < Formula + desc "C library implementing the Tox peer to peer network protocol" + homepage "https://tox.chat/" + # This repo is a fork, but it is the source used by Debian, Fedora, and Arch, + # and is the repo linked in the homepage. + url "https://github.com/TokTok/c-toxcore/releases/download/v0.2.20/c-toxcore-0.2.20.tar.gz" + sha256 "a9c89a8daea745d53e5d78e7aacb99c7b4792c4400a5a69c71238f45d6164f4c" + license "GPL-3.0-or-later" + revision 2 + head "https://github.com/TokTok/c-toxcore.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "01071297d658e6e0851e482c7cb6d2d9ba8461e79fac25c41aaa0c585c7b9469" + sha256 cellar: :any, arm64_sequoia: "3379c4a841b711aa33e822e3b99fedb344ef6cca8c23ac87ca636f16516bb7ff" + sha256 cellar: :any, arm64_sonoma: "61ed64fe45f6ce3191e5c53c04d2d49aa4c5cbfe739971e1f45cb42a7b400754" + sha256 cellar: :any, arm64_ventura: "6bd944dabdce173a8d838e61b511bbdf0076a69ca244f06b8a4abe057b6df206" + sha256 cellar: :any, sonoma: "fbb6f976d3eb729b4a4cb934dbe11abb47ec1f90905c114a35636f3e9c1c3165" + sha256 cellar: :any, ventura: "2e8cb55ca687bde4925ae3d4b79bfcff988c7dce31c7a5b12e337392609fe1bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff21beb0e5b1a7f90489cd6b5d0130713a6b5c59cdfcc3565b706f3299342112" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1118526ac90564b275c1b5d2373fb942448fe6d2edc513c728eea469d3f8f5d9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libconfig" + depends_on "libsodium" + depends_on "libvpx" + depends_on "opus" + + def install + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + TOX_ERR_NEW err_new; + Tox *tox = tox_new(NULL, &err_new); + if (err_new != TOX_ERR_NEW_OK) { + return 1; + } + return 0; + } + C + system ENV.cc, "-I#{include}/toxcore", testpath/"test.c", + "-L#{lib}", "-ltoxcore", "-o", "test" + system "./test" + end +end diff --git a/Formula/t/toxiproxy.rb b/Formula/t/toxiproxy.rb new file mode 100644 index 0000000000000..71c4b3128412d --- /dev/null +++ b/Formula/t/toxiproxy.rb @@ -0,0 +1,67 @@ +class Toxiproxy < Formula + desc "TCP proxy to simulate network & system conditions for chaos & resiliency testing" + homepage "https://github.com/shopify/toxiproxy" + url "https://github.com/Shopify/toxiproxy/archive/refs/tags/v2.12.0.tar.gz" + sha256 "9332a884c559fbcf96cbe2c1b46312eb1e1b7191eb9a73a3d3b857d4e9789eb1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "366a468183e8c98dae90c4ce3dfaa6f740117e4d9485aee8caf687eac0b3b2eb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "294a21ff88b3b908d344de82803ff4d66bbeb6834bc42e0b503a4681f497ecb8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe38bd275653854eaeea1f762c9abbda9288e803da31118cd29a2d2ee0347553" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a2fad1caee2311b6102a1f58d5f3a30de56f5df9f7e6a462ac3edebc36a64af9" + sha256 cellar: :any_skip_relocation, sonoma: "34c15b5c0ee7761719352512657dfabfe1971b672dc498f0dde8b31a066ae17b" + sha256 cellar: :any_skip_relocation, ventura: "8ab0b56d6ca497ad409b54a3f04c472faf10c972873a5fb07799655439b07e91" + sha256 cellar: :any_skip_relocation, arm64_linux: "be11e08a83dc827210a32100c31f7d94533b1dc526ee8b8ae597ab48d7e0454e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff23599856b2b7c08cd3873700a345b07480950ceb7f8d4484c6efaf492b6788" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/Shopify/toxiproxy/v2.Version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"toxiproxy-server"), "./cmd/server" + system "go", "build", *std_go_args(ldflags:, output: bin/"toxiproxy-cli"), "./cmd/cli" + end + + service do + run opt_bin/"toxiproxy-server" + keep_alive true + log_path var/"log/toxiproxy.log" + error_log_path var/"log/toxiproxy.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/toxiproxy-server --version") + assert_match version.to_s, shell_output("#{bin}/toxiproxy-cli --version") + + proxy_port = free_port + fork { system bin/"toxiproxy-server", "--port", proxy_port.to_s } + + upstream_port = free_port + + fork do + server = TCPServer.new(upstream_port) + body = "Hello Homebrew" + loop do + socket = server.accept + socket.write "HTTP/1.1 200 OK\r\n" \ + "Content-Type: text/plain; charset=utf-8\r\n" \ + "Content-Length: #{body.bytesize}\r\n" \ + "\r\n" + socket.write body + # Don't close the socket here; toxiproxy expects to close the connection + end + end + + sleep 3 + + listen_port = free_port + system bin/"toxiproxy-cli", "--host", "127.0.0.1:#{proxy_port}", "create", + "--listen", "127.0.0.1:#{listen_port}", + "--upstream", "127.0.0.1:#{upstream_port}", + "hello-homebrew" + + assert_equal "Hello Homebrew", shell_output("curl -s http://127.0.0.1:#{listen_port}/") + end +end diff --git a/Formula/t/tpl.rb b/Formula/t/tpl.rb new file mode 100644 index 0000000000000..b4f995ae9e672 --- /dev/null +++ b/Formula/t/tpl.rb @@ -0,0 +1,91 @@ +class Tpl < Formula + desc "Store and retrieve binary data in C" + homepage "https://troydhanson.github.io/tpl/" + url "https://github.com/troydhanson/tpl/archive/refs/tags/v1.6.1.tar.gz" + sha256 "0b3750bf62f56be4c42f83c89d8449b24f1c5f1605a104801d70f2f3c06fb2ff" + license "BSD-1-Clause" + head "https://github.com/troydhanson/tpl.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c308e47d85f79d24b666e56b5c980f7593ca25816e5e73b614964a224bf82466" + sha256 cellar: :any, arm64_sequoia: "563eee39c340a994167ebeaa62bba135164a2873031485754b3bd237e235a313" + sha256 cellar: :any, arm64_sonoma: "648d49fb0cd54c646e5257ba9aba1b88867913b5cb54e8accdbdf45dcd2b038d" + sha256 cellar: :any, arm64_ventura: "2bfb6b7bbdfecfa9aa8e25c3841dd9dbc6d333c746792a446ac729536c643475" + sha256 cellar: :any, arm64_monterey: "cd423b01e4be55cc76cfc5c780582519f9583073f8b4e42a823c007cc59805e6" + sha256 cellar: :any, arm64_big_sur: "28d206fb0a8b3d318bbb8281a2cf64cb371f6a78896bc6c4b0b4187a2c109e96" + sha256 cellar: :any, sonoma: "76ba231b3d240b5a5302162c0ea2aa1bf0bf8d2ac4557f063495ab56bd584163" + sha256 cellar: :any, ventura: "b67d07d542d44a4fd9f2bb91e6f080796a264229eaffee4b19fad72295576db5" + sha256 cellar: :any, monterey: "0b544b3ee645924b61bd2a7f2b2d237e02796e26fd57be3688a900b050c7fb33" + sha256 cellar: :any, big_sur: "cdfa3d793f5b6086e7f50abdce45fd21bb869444dc202e285f8c486f18e9f1f8" + sha256 cellar: :any, catalina: "25b8a5fa1deda50c6dd07d69e96dd41e647b78b0f57f2696e5ddd056e509c71b" + sha256 cellar: :any_skip_relocation, arm64_linux: "649efbc4c4e6c8e57d4f7207bc2ede36facb438e7fd272162722f9707db999bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49c4f470d6782300dd24da0af8a3886cc977a9c24a0de37c606181b3db09e44d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + (testpath/"store.c").write <<~C + #include + + int main(int argc, char *argv[]) { + tpl_node *tn; + int id = 0; + char *name, *names[] = { "Alice", "Bob", "Charlie" }; + + tn = tpl_map("A(is)", &id, &name); + + for(name = names[0]; id < 3; name = names[++id]) { + tpl_pack(tn,1); + } + + tpl_dump(tn, TPL_FILE, "users.tpl"); + tpl_free(tn); + } + C + + (testpath/"load.c").write <<~C + #include + #include + #include + + int main(int argc, char *argv[]) { + tpl_node *tn; + int id; + char *name; + + tn = tpl_map("A(is)", &id, &name); + tpl_load(tn, TPL_FILE, "users.tpl"); + + while (tpl_unpack(tn, 1) > 0) { + printf("%d: %s\\n", id, name); + free(name); + } + tpl_free(tn); + } + C + + system ENV.cc, "store.c", "-I#{include}", "-L#{lib}", "-ltpl", "-o", "store" + system ENV.cc, "load.c", "-I#{include}", "-L#{lib}", "-ltpl", "-o", "load" + + expected = <<~EOS + 0: Alice + 1: Bob + 2: Charlie + EOS + + system "./store" + assert_equal expected, shell_output("./load") + end +end diff --git a/Formula/t/tpm.rb b/Formula/t/tpm.rb new file mode 100644 index 0000000000000..66ca3aa3c73ff --- /dev/null +++ b/Formula/t/tpm.rb @@ -0,0 +1,32 @@ +class Tpm < Formula + desc "Plugin manager for tmux" + homepage "https://github.com/tmux-plugins/tpm" + url "https://github.com/tmux-plugins/tpm/archive/refs/tags/v3.1.0.tar.gz" + sha256 "2411fc416c4475d297f61078d0a03afb3a1f5322fff26a13fdb4f20d7e975570" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "585e25b7dbe7d14caa7056eb0cc5f180256d8833a0e2e8fbcf01e72016b74c08" + end + + depends_on "tmux" + + def install + pkgshare.install Dir["*"] + end + + def caveats + <<~EOS + To initialize TPM add this to your tmux configuration file + (~/.tmux.conf or $XDG_CONFIG_HOME/tmux/tmux.conf): + run '#{opt_pkgshare}/tpm' + EOS + end + + test do + assert_empty shell_output(pkgshare/"tpm") + end +end diff --git a/Formula/t/tproxy.rb b/Formula/t/tproxy.rb new file mode 100644 index 0000000000000..58de8494834ab --- /dev/null +++ b/Formula/t/tproxy.rb @@ -0,0 +1,36 @@ +class Tproxy < Formula + desc "CLI tool to proxy and analyze TCP connections" + homepage "https://github.com/kevwan/tproxy" + url "https://github.com/kevwan/tproxy/archive/refs/tags/v0.9.1.tar.gz" + sha256 "0d5b030c03791882ef077336b689e863b2e41d5f16cdaf8210a76770d219ebc9" + license "MIT" + head "https://github.com/kevwan/tproxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1d287d969b2cec4853843339cf6ab489ffd9fcda29758f850e81fddac0ed1c0b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f712de225051b2d0321080046ad650ae2c5b6b978514b371582780eaf33a1cb1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f712de225051b2d0321080046ad650ae2c5b6b978514b371582780eaf33a1cb1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f712de225051b2d0321080046ad650ae2c5b6b978514b371582780eaf33a1cb1" + sha256 cellar: :any_skip_relocation, sonoma: "7568f803d5ed42f93f629f5132a3e9bc48deb6f345f600bb43fac27a12f2d78b" + sha256 cellar: :any_skip_relocation, ventura: "7568f803d5ed42f93f629f5132a3e9bc48deb6f345f600bb43fac27a12f2d78b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7d9fdf1c245ec0aba0fd5ccd9724bba77b3c726066b1164f59b7b734d8efd48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2753876622eab4735d7d5c380464e18626ba7d22a89c99036aa9030e080402a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + require "pty" + port = free_port + + # proxy localhost:80 with delay of 100ms + r, _, pid = PTY.spawn("#{bin}/tproxy -p #{port} -r localhost:80 -d 100ms") + assert_match "Listening on 127.0.0.1:#{port}", r.readline + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/t/tracebox.rb b/Formula/t/tracebox.rb new file mode 100644 index 0000000000000..f3c9e69e37e21 --- /dev/null +++ b/Formula/t/tracebox.rb @@ -0,0 +1,69 @@ +class Tracebox < Formula + desc "Middlebox detection tool" + homepage "https://github.com/tracebox/tracebox" + url "https://github.com/tracebox/tracebox.git", + tag: "v0.4.4", + revision: "4fc12b2e330e52d340ecd64b3a33dbc34c160390" + license all_of: [ + "GPL-2.0-only", + "BSD-3-Clause", # noinst/libcrafter + ] + revision 3 + head "https://github.com/tracebox/tracebox.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "45f15d0a644fc4eef18fac8f124fb9e4283c27e89e97ec98ae93d79ed4b4e8af" + sha256 cellar: :any, arm64_sequoia: "4477778df4c958271cb1d399c2a61efd383a466ef5ebf73d0710dd9d7ff55eeb" + sha256 cellar: :any, arm64_sonoma: "2932a710d67503cee019ef902088ab3f5000017f737dfa3818fd76db9d39d048" + sha256 cellar: :any, arm64_ventura: "9705e61653def47f938f0ec3f16fb21080f295a511a49c293e2c852574e656b3" + sha256 cellar: :any, arm64_monterey: "b64f5f9a5ddb03779fd042bc15a95940e618c4de3fe7e2fcb9b5ad8959fab0f0" + sha256 cellar: :any, sonoma: "6abeaa63adac2a5329f9e40368963e975ba14f5cc86ce98fb28371c1299c7e37" + sha256 cellar: :any, ventura: "64fbec3f29837959980185a6df8c454f1fbfcc9eeff0f337acb80076b740482a" + sha256 cellar: :any, monterey: "8de9a06925cc930fd05d09f08924e323080d0cf375e5153781ffb4ba0071cce7" + sha256 cellar: :any_skip_relocation, arm64_linux: "22b4b1b26e23a933ca5145017f4c0ebc42846780d15063770cddb8626c5ad5cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "534c62a00f80541550000853b7656fba20be0e72dc879df166f7172b93460321" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "json-c" + depends_on "lua" + + uses_from_macos "libpcap" + + def install + unless OS.mac? + ENV.cxx11 # work around error: reference to 'byte' is ambiguous + ENV.append_to_cflags "-I#{Formula["libpcap"].opt_include}" + ENV.append "LDFLAGS", "-L#{Formula["libpcap"].opt_lib}" + end + # Work around limited `libpcap` and `lua` search paths in configure.ac + ENV.append "LIBS", "-lpcap -lm" + ENV["LUA_INCLUDE"] = "-I#{Formula["lua"].opt_include}/lua" + ENV["LUA_LIB"] = "-L#{Formula["lua"].opt_lib} -llua" + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", + "--with-libpcap=yes", + *std_configure_args + system "make" + system "make", "install" + end + + def caveats + <<~EOS + Tracebox requires superuser privileges e.g. run with sudo. + + You should be certain that you trust any software you are executing with + elevated privileges. + EOS + end + + test do + system bin/"tracebox", "-v" + end +end diff --git a/Formula/t/tracetest.rb b/Formula/t/tracetest.rb new file mode 100644 index 0000000000000..54fe637d34fe1 --- /dev/null +++ b/Formula/t/tracetest.rb @@ -0,0 +1,32 @@ +class Tracetest < Formula + desc "Build integration and end-to-end tests" + homepage "https://docs.tracetest.io/" + url "https://github.com/kubeshop/tracetest/archive/refs/tags/v1.7.1.tar.gz" + sha256 "9f2fb4edab3e469465302c70bcddf0f48517306db0004afdc1d016f30b5380e5" + license "MIT" # MIT license for the CLI, TCL license for agent + head "https://github.com/kubeshop/tracetest.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a4e174c5e1728e5f76c7474244d22351c5c0ec14d02d3f9e0fa9cf0471fd798a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4e174c5e1728e5f76c7474244d22351c5c0ec14d02d3f9e0fa9cf0471fd798a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a4e174c5e1728e5f76c7474244d22351c5c0ec14d02d3f9e0fa9cf0471fd798a" + sha256 cellar: :any_skip_relocation, sonoma: "d6b1da02531d87d79eac9d39dfb0ca789d31dfb1f4ee9711b2f65a6031609240" + sha256 cellar: :any_skip_relocation, arm64_linux: "00de76769264422d7739b45c3bfcafcf599a347ef4e2dbb666ad39951874e33a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b93cbf60776d43d78f16f9f6235519ff7c1a3c4546770b680fd44e443f4df7a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/kubeshop/tracetest/cli/config.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cli" + + generate_completions_from_executable(bin/"tracetest", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/tracetest version 2>&1", 1) + + assert_match "Server: Not Configured", shell_output("#{bin}/tracetest list 2>&1", 1) + end +end diff --git a/Formula/t/tractorgen.rb b/Formula/t/tractorgen.rb new file mode 100644 index 0000000000000..8bef87a70e605 --- /dev/null +++ b/Formula/t/tractorgen.rb @@ -0,0 +1,52 @@ +class Tractorgen < Formula + desc "Generates ASCII tractor art" + homepage "https://vergenet.net/~conrad/software/tractorgen/" + url "https://vergenet.net/~conrad/software/tractorgen/dl/tractorgen-0.31.7.tar.gz" + sha256 "469917e1462c8c3585a328d035ac9f00515725301a682ada1edb3d72a5995a8f" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?tractorgen[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "81c1cbe1001cfa689511d5c002fdf3a4f619fa0973a3c86b376e34ef5bedfe4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2bedfd7170837438de7a29894660b3ae2e9c885167792ef3521a19e419c9e91" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "139afef5c6ba8b491a2365fa5df36592c3e5ff42f68891af662713f086779237" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d231cca23211331c6edbdd485855ff0ca9cbf8f302cd3717b501b5057f710c8" + sha256 cellar: :any_skip_relocation, sonoma: "2276a12b428001802e9b1c2fa9921260adf74219eb55e1595c249f3c2e1c288b" + sha256 cellar: :any_skip_relocation, ventura: "ba42862bdd4dd45376fa17c8ba2121a30d4161f700780a53bfd9f6fc8077c40c" + sha256 cellar: :any_skip_relocation, arm64_linux: "69199dd0c7cdbb707559f20a2cd85e9532ccceac3640496bc7807e38cfc099f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f332d2d3f6b3f7f4ce26f3bce0b598b44fec0e173fef2bec1bad5843b6b9744f" + end + + # Backport fix for error: call to undeclared function 'atoi' + patch do + url "https://github.com/kfish/tractorgen/commit/294162055ba4ab3a5a80a5ae1cfbdcbe92584239.patch?full_index=1" + sha256 "1848b797ec759c1dfe97fe42cb20f5316b08b7b710fd1dba19b7443879af8dfb" + end + + def install + # Workaround for Xcode 14.3. Alternatively could autoreconf but that requires additional dependencies. + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + expected = <<~'EOS'.gsub(/^/, " ") # needs to be indented five spaces + r- + _| + / |_\_ \\ + | |o|----\\ + |_______\_--_\\ + (O)_O_O_(O) \\ + EOS + assert_equal expected, shell_output("#{bin}/tractorgen 4") + end +end diff --git a/Formula/t/tracy.rb b/Formula/t/tracy.rb new file mode 100644 index 0000000000000..739db0d6ae52f --- /dev/null +++ b/Formula/t/tracy.rb @@ -0,0 +1,68 @@ +class Tracy < Formula + desc "Real-time, nanosecond resolution frame profiler" + homepage "https://github.com/wolfpld/tracy" + url "https://github.com/wolfpld/tracy/archive/refs/tags/v0.11.1.tar.gz" + sha256 "2c11ca816f2b756be2730f86b0092920419f3dabc7a7173829ffd897d91888a1" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5612309d34ac9c0a34ab536a0259a85039825959af74b5d1af40a38a79e78898" + sha256 cellar: :any, arm64_sequoia: "ef5601dccb812f86784c050ffc090b003b18dae3f1a8e38aa2994a43628f6079" + sha256 cellar: :any, arm64_sonoma: "d6f150dd66767e47837006f661a3c36ed7cd7ad21dfe76a7c1ba8aff1820a924" + sha256 cellar: :any, arm64_ventura: "2b2b2517cdf72b57face88cc1dbf6083bfd2a2b2271e857825bc7d012fd2bf43" + sha256 cellar: :any, arm64_monterey: "27320ae60ea734c462bbfcd54fbee3444eed1de85b80315c1814850d043b229e" + sha256 cellar: :any, sonoma: "4f862af547f74f1859b5e717cd7368a6394b170db1f68ead37b23ddd5a1e1cfb" + sha256 cellar: :any, ventura: "b32e96ee1c8c76f0064509f450da12f54b2860c007a3651288e6fd2bb0d7cc0c" + sha256 cellar: :any, monterey: "1db13a28c85ccdd2ea30ca6f33b8a534b60610f513c3ae69ddc3d33e2ae8ab5a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e42b03f16a1d0f0ccc344b0426a3ec779eeb3bf37dd9491847873b379693eaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aeef3daf639e9ed8491a9b7e0b11652809dd6d165410d9070fcf5f40f8883a85" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "capstone" + depends_on "freetype" + + on_macos do + depends_on "glfw" + end + + on_linux do + depends_on "wayland-protocols" => :build + depends_on "dbus" + depends_on "libxkbcommon" + depends_on "mesa" + depends_on "tbb" + depends_on "wayland" + end + + def install + args = %w[CAPSTONE GLFW FREETYPE].map { |arg| "-DDOWNLOAD_#{arg}=OFF" } + + buildpath.each_child do |child| + next unless child.directory? + next unless (child/"CMakeLists.txt").exist? + next if %w[python test].include?(child.basename.to_s) + + system "cmake", "-S", child, "-B", child/"build", *args, *std_cmake_args + system "cmake", "--build", child/"build" + bin.install child.glob("build/tracy-*").select(&:executable?) + end + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + bin.install_symlink "tracy-profiler" => "tracy" + end + + test do + assert_match "Tracy Profiler #{version}", shell_output("#{bin}/tracy --help") + + port = free_port + pid = spawn bin/"tracy", "-p", port.to_s + sleep 1 + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/t/tradcpp.rb b/Formula/t/tradcpp.rb new file mode 100644 index 0000000000000..f58597763d640 --- /dev/null +++ b/Formula/t/tradcpp.rb @@ -0,0 +1,51 @@ +class Tradcpp < Formula + desc "K&R-style C preprocessor" + homepage "https://www.netbsd.org/~dholland/tradcpp/" + url "https://cdn.netbsd.org/pub/NetBSD/misc/dholland/tradcpp-0.5.3.tar.gz" + sha256 "e17b9f42cf74b360d5691bc59fb53f37e41581c45b75fcd64bb965e5e2fe4c5e" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?tradcpp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68bb9f87e1ac6100139f901a1b2f1de048f4bc3a7c09604ed35c4e46791a886a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "794a2163ec873f752cfa605b86a1cb8cba108bebe9d41f371bd444e63a51b2dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "98a960df81fa5a9d651e084529ffdbe2732d92e6b452ddb8530845abf29043d2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae50daead4edf3e9669b42267182a9bae1f57720bbeb635e9dcc50341ceb27b3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f4a656232f875bcb230883e1f5ed126b4a548d0cece88453a487a4e2cfc4dd89" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2b8d415d6720467f22655633820ca17c596c7eb6c9e4a3251ce0d12c6b0c64b5" + sha256 cellar: :any_skip_relocation, sonoma: "d6175a0b58881e2f0fcc5d45dec27aaddc6d7fc8d937c19b0c7183fd304116c0" + sha256 cellar: :any_skip_relocation, ventura: "4655462eea375707576c583c4107442cf648ed1deeebfbd64517b7058717ea66" + sha256 cellar: :any_skip_relocation, monterey: "4efcf13b3cf15f4c8013ba1000f424d0a240ba16b8436a086d82a1a29edc7d2c" + sha256 cellar: :any_skip_relocation, big_sur: "8818618fd35264ceb99df10c17a3af736fd91c886a1db778ad752095631523c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "9699d8ebc30977e2f8caa90b4fcd8b3b7df9c015d0d561387c8f4a4e56735166" + sha256 cellar: :any_skip_relocation, x86_64_linux: "825a5e3d755cd11ad9e6e7cdb2f5d499cf273b294da1c78a7488535eccad598b" + end + + depends_on "bmake" => :build + + def install + bmake_args = %W[ + prefix=#{prefix} + MK_INSTALL_AS_USER=yes + MANDIR=#{man} + ] + + system "bmake" + system "bmake", *bmake_args, "install" + end + + test do + (testpath/"test.c").write <<~C + #define FOO bar + FOO + C + assert_match "bar", shell_output("#{bin}/tradcpp ./test.c") + end +end diff --git a/Formula/t/trader.rb b/Formula/t/trader.rb new file mode 100644 index 0000000000000..a704b759c8fca --- /dev/null +++ b/Formula/t/trader.rb @@ -0,0 +1,44 @@ +class Trader < Formula + desc "Star Traders" + homepage "https://www.zap.org.au/projects/trader/" + url "https://ftp.zap.org.au/pub/trader/unix/trader-7.20.tar.xz" + sha256 "bad368c471d7f4c371fbe8f5da24872f9e3ad609ddb7dad0e015c960c88b3aa9" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?trader[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "e1479fb417ef273bfa538ccd0427ff4721ddf9861e253f20886bb8924b85422f" + sha256 arm64_sequoia: "9be56b4808087e536b25a7728556b09a959e1f41fd17a512de2b911645fbbccf" + sha256 arm64_sonoma: "6ae36dfc033af6586d9b339653b74796de0bfca17e12e94a8ad74848ceef2b8c" + sha256 arm64_ventura: "38906420c79cc92198a4b560f8d4ab6862c8379b608cb833d0798c9b2cb2126e" + sha256 arm64_monterey: "659237e8c041b9122c2792770c8e320ed6678782e214d2c65c2fb0febeb89427" + sha256 sonoma: "cf2f81124457ed2d2e149befd2a4ae5565b4bbbeee4489065f5728a7258e9c1d" + sha256 ventura: "eb2510848f86e058d2e71cece3b1c8907266da2b9a92b1e76161c45e180af9e8" + sha256 monterey: "89dec91679b5a775aa0d89ea0c9af16569b69dec9903b99998b9d7421564863c" + sha256 arm64_linux: "9c2b9f22360ef13d813e3b024cc74855e4e0cc4ef5933eda96f19f1961e793a7" + sha256 x86_64_linux: "39db68dcc4e59eb947e208f403ae5f1f3a8abbefe5b530339b2bd860768288b8" + end + + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "ncurses" # The system version does not work correctly + + def install + args = %W[ + --disable-silent-rules + --with-libintl-prefix=#{Formula["gettext"].opt_prefix} + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # Star Traders is an interactive game, so the only option for testing + # is to run something like "trader --version" + system bin/"trader", "--version" + end +end diff --git a/Formula/t/traefik.rb b/Formula/t/traefik.rb new file mode 100644 index 0000000000000..8ec350338bb4f --- /dev/null +++ b/Formula/t/traefik.rb @@ -0,0 +1,83 @@ +class Traefik < Formula + desc "Modern reverse proxy" + homepage "https://traefik.io/" + url "https://github.com/traefik/traefik/releases/download/v3.5.4/traefik-v3.5.4.src.tar.gz" + sha256 "27b7b9c475ca9d83385c4a135b278699e45027e02721e2b8453928d982914579" + license "MIT" + head "https://github.com/traefik/traefik.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c217efd27bd55e2a972ea96d4d19684ff59fbd20aa1a877ec0ff59f540d7400a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1241ab0e721886c8db7d9f5f5537aebbd94965fad6b5c4f901b82ea2178c3ebc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a0631e884a6486d36d3685f497f3d5b12e3ee6fb494398e289885ebaed7e8f2" + sha256 cellar: :any_skip_relocation, sonoma: "178f20538af9d90aa07fa80e4a038ba44f10641dbdcf9cac4aa4c80dd4db381f" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd16c147969f5c8d7d1bab3b499536d55045064ea0c7f51a8156ec4f4b3352b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b304cd0a52e9cdc461305416e9bbdde1e2b3396a81ff8da1c04c4800f7480b7a" + end + + depends_on "go" => :build + depends_on "node" => :build + + def install + ENV["COREPACK_ENABLE_DOWNLOAD_PROMPT"] = "0" + + system "corepack", "enable", "--install-directory", buildpath + + cd "webui" do + system buildpath/"yarn", "install" + system buildpath/"yarn", "build" + end + + ldflags = %W[ + -s -w + -X github.com/traefik/traefik/v#{version.major}/pkg/version.Version=#{version} + ] + system "go", "generate" + system "go", "build", *std_go_args(ldflags:), "./cmd/traefik" + end + + service do + run [opt_bin/"traefik", "--configfile=#{etc}/traefik/traefik.toml"] + keep_alive false + working_dir var + log_path var/"log/traefik.log" + error_log_path var/"log/traefik.log" + end + + test do + ui_port = free_port + http_port = free_port + + (testpath/"traefik.toml").write <<~TOML + [entryPoints] + [entryPoints.http] + address = ":#{http_port}" + [entryPoints.traefik] + address = ":#{ui_port}" + [api] + insecure = true + dashboard = true + TOML + + begin + pid = fork do + exec bin/"traefik", "--configfile=#{testpath}/traefik.toml" + end + sleep 8 + cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{http_port}/" + assert_match "404 Not Found", shell_output(cmd_ui) + sleep 1 + cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{ui_port}/dashboard/" + assert_match "200 OK", shell_output(cmd_ui) + + # Make sure webui assets for dashboard are present at expected destination + cmd_ui = "curl -XGET http://127.0.0.1:#{ui_port}/dashboard/" + assert_match "Traefik Proxy", shell_output(cmd_ui) + ensure + Process.kill(9, pid) + Process.wait(pid) + end + + assert_match version.to_s, shell_output("#{bin}/traefik version 2>&1") + end +end diff --git a/Formula/t/traefik@2.rb b/Formula/t/traefik@2.rb new file mode 100644 index 0000000000000..19dea1720f645 --- /dev/null +++ b/Formula/t/traefik@2.rb @@ -0,0 +1,78 @@ +class TraefikAT2 < Formula + desc "Modern reverse proxy" + homepage "https://traefik.io/" + url "https://github.com/traefik/traefik/releases/download/v2.11.24/traefik-v2.11.24.src.tar.gz" + sha256 "6f505d857ff5c0b06dc8fe7ec5d8f59afdc8b7157b3455d5899313e52542ca89" + license "MIT" + + livecheck do + url :stable + regex(/^v?(2\.\d+\.\d+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "73048dcf01645f2338386b52a32d1b1c2b89d5df2c38caf674a34d6f5ba3906a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cedafb4b6da68660a07ad28aedae8010f2e9cfe9ca375db31269c97790cb3b53" + sha256 cellar: :any_skip_relocation, arm64_ventura: "485b4f744fb8916575df6401bbd142b8d1d35afb671172d12db00c52840255cc" + sha256 cellar: :any_skip_relocation, sonoma: "e76d43aa4d9340c31cc641d3216fb88e7c1c422aa0d60807b144ff205788d4ee" + sha256 cellar: :any_skip_relocation, ventura: "72cc24e148cceb839dfce62a05a10ebd2b9ca6e55055e4ba9216a46848435647" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2ec92cfef643d9ec9bd6fcbb9df1885efdfb906da26c3a324dcbad9d9ea8190" + end + + keg_only :versioned_formula + + # https://doc.traefik.io/traefik/deprecation/releases/ + disable! date: "2025-04-30", because: :unmaintained + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/traefik/traefik/v#{version.major}/pkg/version.Version=#{version} + ] + system "go", "generate" + system "go", "build", *std_go_args(ldflags:, output: bin/"traefik"), "./cmd/traefik" + end + + service do + run [opt_bin/"traefik", "--configfile=#{etc}/traefik/traefik.toml"] + keep_alive false + working_dir var + log_path var/"log/traefik.log" + error_log_path var/"log/traefik.log" + end + + test do + ui_port = free_port + http_port = free_port + + (testpath/"traefik.toml").write <<~TOML + [entryPoints] + [entryPoints.http] + address = ":#{http_port}" + [entryPoints.traefik] + address = ":#{ui_port}" + [api] + insecure = true + dashboard = true + TOML + + begin + pid = fork do + exec bin/"traefik", "--configfile=#{testpath}/traefik.toml" + end + sleep 8 + cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{http_port}/" + assert_match "404 Not Found", shell_output(cmd_ui) + sleep 1 + cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{ui_port}/dashboard/" + assert_match "200 OK", shell_output(cmd_ui) + ensure + Process.kill(9, pid) + Process.wait(pid) + end + + assert_match version.to_s, shell_output("#{bin}/traefik version 2>&1") + end +end diff --git a/Formula/t/trafficserver.rb b/Formula/t/trafficserver.rb new file mode 100644 index 0000000000000..79691ec27fb52 --- /dev/null +++ b/Formula/t/trafficserver.rb @@ -0,0 +1,75 @@ +class Trafficserver < Formula + desc "HTTP/1.1 and HTTP/2 compliant caching proxy server" + homepage "https://trafficserver.apache.org/" + url "https://downloads.apache.org/trafficserver/trafficserver-10.1.0.tar.bz2" + mirror "https://archive.apache.org/dist/trafficserver/trafficserver-10.1.0.tar.bz2" + sha256 "bccc35bbfc80f215b0858a0a7e531ac990b13a9eb1e3e81a3b15eaa3fde0596e" + license "Apache-2.0" + + bottle do + sha256 arm64_tahoe: "f1f228335aa43ef6fc7ff8e68c2777dc3ff42335cb0b9b71bc74deac28998ab3" + sha256 arm64_sequoia: "bd0435227b8259ad3ddb4f0e2554fa80313afc5534a216727907e93ed4449154" + sha256 arm64_sonoma: "45d46d5d4940acc9f404ca0a096f8b2b35e4b6633ba7dc8d1ac7992775a2ff78" + sha256 arm64_ventura: "1cf5918b4f826a901f82779b9e260ad303ce9cef5fa9da4b87680681a5fa4b28" + sha256 sonoma: "6f468481e98e0f32cd21782569d9cc7db867f5330c55afbb8f8220af749bab60" + sha256 ventura: "49c8fba7b87b464e8fa5b22cf02f94c353cdca306b8860249e004e2b801a7216" + sha256 arm64_linux: "445d11a0ce8676fe74a1df1be2fa6b1bf9544ab7e7bd69bdfa931acf62424f1c" + sha256 x86_64_linux: "701d46ac0f4dfd5ed88a48e5f01bb55f675f9e275a4e692ba7a773e82e0d39f6" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "brotli" + depends_on "hwloc" + depends_on "imagemagick" + depends_on "libmaxminddb" + depends_on "luajit" + depends_on "nuraft" + depends_on "openssl@3" + depends_on "pcre" # PCRE2 issue: https://github.com/apache/trafficserver/issues/8780 + depends_on "pcre2" + depends_on "xz" + depends_on "yaml-cpp" + + uses_from_macos "flex" => :build + uses_from_macos "curl" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "libcap" + depends_on "libunwind" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_EXPERIMENTAL_PLUGINS=ON", + "-DEXTERNAL_YAML_CPP=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"log/trafficserver").mkpath + (var/"trafficserver").mkpath + + config = etc/"trafficserver/records.config" + return unless File.exist?(config) + return if File.read(config).include?("proxy.config.admin.user_id STRING #{ENV["USER"]}") + + config.append_lines "CONFIG proxy.config.admin.user_id STRING #{ENV["USER"]}" + end + + test do + if OS.mac? + output = shell_output("#{bin}/trafficserver status") + assert_match "Apache Traffic Server is not running", output + else + output = shell_output("#{bin}/trafficserver status 2>&1", 3) + assert_match "traffic_server is not running", output + end + end +end diff --git a/Formula/t/trafilatura.rb b/Formula/t/trafilatura.rb new file mode 100644 index 0000000000000..5b6426ef66f2d --- /dev/null +++ b/Formula/t/trafilatura.rb @@ -0,0 +1,113 @@ +class Trafilatura < Formula + include Language::Python::Virtualenv + + desc "Discovery, extraction and processing for Web text" + homepage "https://trafilatura.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/06/25/e3ebeefdebfdfae8c4a4396f5a6ea51fc6fa0831d63ce338e5090a8003dc/trafilatura-2.0.0.tar.gz" + sha256 "ceb7094a6ecc97e72fea73c7dba36714c5c5b577b6470e4520dca893706d6247" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "78eeb8533c2e41af7dc4c93e93ed552aeb051edf082214038a63ccd26b980fe7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "985ab3f8594e40cfbf4d91afefbea3a0f5a9b58add3c5ba485fdaecb077c04af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67a57c816e4a8af511baff49bff416e0cf95af47be65d6d9e8f05e9f01ed961a" + sha256 cellar: :any_skip_relocation, sonoma: "b28c628b22023d9f0ad4a61a23197bb3c40975e2f6964a2020ec36a8343a2269" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c6e645e3f89f424599cb55f7589fcbb74419a5fbe424c3f4ea7c0986ecb1efa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b6fb43a785f9db7f5993c5192019184ac67f5a93883277533d4707268bcc42a" + end + + depends_on "certifi" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "certifi" + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "courlan" do + url "https://files.pythonhosted.org/packages/6f/54/6d6ceeff4bed42e7a10d6064d35ee43a810e7b3e8beb4abeae8cff4713ae/courlan-1.3.2.tar.gz" + sha256 "0b66f4db3a9c39a6e22dd247c72cfaa57d68ea660e94bb2c84ec7db8712af190" + end + + resource "dateparser" do + url "https://files.pythonhosted.org/packages/a9/30/064144f0df1749e7bb5faaa7f52b007d7c2d08ec08fed8411aba87207f68/dateparser-1.2.2.tar.gz" + sha256 "986316f17cb8cdc23ea8ce563027c5ef12fc725b6fb1d137c14ca08777c5ecf7" + end + + resource "htmldate" do + url "https://files.pythonhosted.org/packages/a5/26/aaae4cab984f0b7dd0f5f1b823fa2ed2fd4a2bb50acd5bd2f0d217562678/htmldate-1.9.3.tar.gz" + sha256 "ac0caf4628c3ded4042011e2d60dc68dfb314c77b106587dd307a80d77e708e9" + end + + resource "justext" do + url "https://files.pythonhosted.org/packages/49/f3/45890c1b314f0d04e19c1c83d534e611513150939a7cf039664d9ab1e649/justext-3.0.2.tar.gz" + sha256 "13496a450c44c4cd5b5a75a5efcd9996066d2a189794ea99a49949685a0beb05" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + end + + resource "lxml-html-clean" do + url "https://files.pythonhosted.org/packages/d9/cb/c9c5bb2a9c47292e236a808dd233a03531f53b626f36259dcd32b49c76da/lxml_html_clean-0.4.3.tar.gz" + sha256 "c9df91925b00f836c807beab127aac82575110eacff54d0a75187914f1bd9d8c" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tld" do + url "https://files.pythonhosted.org/packages/df/a1/5723b07a70c1841a80afc9ac572fdf53488306848d844cd70519391b0d26/tld-0.13.1.tar.gz" + sha256 "75ec00936cbcf564f67361c41713363440b6c4ef0f0c1592b5b0fbe72c17a350" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/trafilatura --version") + + assert_match "Google", shell_output("#{bin}/trafilatura -u https://www.google.com") + end +end diff --git a/Formula/t/traildb.rb b/Formula/t/traildb.rb new file mode 100644 index 0000000000000..162a012d550f1 --- /dev/null +++ b/Formula/t/traildb.rb @@ -0,0 +1,80 @@ +class Traildb < Formula + desc "Blazingly-fast database for log-structured data" + homepage "https://traildb.io/" + url "https://github.com/traildb/traildb/archive/refs/tags/0.6.tar.gz" + sha256 "f73515fe56c547f861296cf8eecc98b8e8bf00d175ad9fb7f4b981ad7cf8b67c" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "2595608345bc29813fa5bc78ab86cd54a890e8d6a70e04889ccc3205f8ecd143" + sha256 arm64_sequoia: "6855e108a52b0df9a4f13492f09ccf0d8ae7efcb2b25441f88a9d1e214137c4c" + sha256 arm64_sonoma: "54903d470c8c610d59b4122f43e3c0292781c8949d5ba8e141f59362e1beb16e" + sha256 arm64_ventura: "fc31267f2145da6af9f4cf19609bebd1e4e5f7e468549bb2adbdfd40bd3b50ad" + sha256 arm64_monterey: "f34fd4ae7821c7f82a44e374e4c07603a63ec224c5ddb441c38e0defcaaeb4a7" + sha256 arm64_big_sur: "1889bda4c138dbcf3d7a7229a47705631f2c5880f20a23e3612685c8a1ad7208" + sha256 sonoma: "b3d15cca75203e35bc56037c0ec9e1139c54ab909c81ec36a02d7b7ed9daa117" + sha256 ventura: "0534a5fd56705faf95c68bd3a4e0ab4b401baaef55d4e8fc37f88126643e5f16" + sha256 monterey: "f973d38d9cfe84c422bf98fc4c91265b2d3865efde148fe9b32a2a3af75d44e9" + sha256 big_sur: "c86da6038d5ffb50fac4db5af5e0e4cb91c93814fcd712fc4e2697747db2a0a8" + sha256 arm64_linux: "3f4b1ec53424608bb138857437b16b36f9ec0ca5272e2833665d1c2280b25a20" + sha256 x86_64_linux: "eacba47e211b4e29a1a44507087e2fc1cb501f00c853ee406a0c954c8ba4c47e" + end + + depends_on "pkgconf" => :build + depends_on "judy" + depends_on "libarchive" + + uses_from_macos "python" => :build + + # Update waf script for Python 3 + # Use resource instead of patch since applying corrupts waf + resource "waf" do + on_macos do + url "https://raw.githubusercontent.com/traildb/traildb/053ed8e5d0301c792f3ee703cd9936c49ecf41a1/waf" + sha256 "2e0cf83a63843da127610420cef1d3126f1187d8e572b6b3a28052fc2250d4bf" + end + on_linux do + # Update `waf` further for Python 3.12+ support. We don't use this on macOS as newer versions + # fail to find `libarchive` on non-/usr/local prefix due to wscript PKG_CONFIG_PATH override + url "https://waf.io/waf-2.1.4" + sha256 "7803d63e698ada49a74ab6979a0fd708a5f9a3456206cba3a3e07387fdcf946d" + end + end + + def install + ENV["PREFIX"] = prefix + resource("waf").stage { buildpath.install Dir["*"].first => "waf" } + system "python3", "./waf", "configure", "install" + end + + test do + # Check that the library has been installed correctly + (testpath/"test.c").write <<~C + #include + #include + int main() { + const char *path = "test.tdb"; + const char *fields[] = {}; + tdb_cons* c1 = tdb_cons_init(); + assert(tdb_cons_open(c1, path, fields, 0) == 0); + assert(tdb_cons_finalize(c1) == 0); + tdb* t1 = tdb_init(); + assert(tdb_open(t1, path) == 0); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ltraildb", "-o", "test" + system "./test" + + # Check that the provided tdb binary works correctly + (testpath/"in.csv").write("1234 1234\n") + system bin/"tdb", "make", "-c", "-i", "in.csv", "--tdb-format", "pkg" + end +end diff --git a/Formula/t/trailscraper.rb b/Formula/t/trailscraper.rb new file mode 100644 index 0000000000000..5d45b9910e9ac --- /dev/null +++ b/Formula/t/trailscraper.rb @@ -0,0 +1,116 @@ +class Trailscraper < Formula + include Language::Python::Virtualenv + + desc "Tool to get valuable information out of AWS CloudTrail" + homepage "https://github.com/flosell/trailscraper" + url "https://files.pythonhosted.org/packages/dd/1e/34d60a04f97291d8c3c316a4f61d22b0870100adc704e8bedfb4930c0401/trailscraper-0.9.1.tar.gz" + sha256 "96278fcd08aba2c684cad5e73972149d3f756ef52f146532440793ddcbbf9230" + license "Apache-2.0" + revision 2 + head "https://github.com/flosell/trailscraper.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8da913c5b8d0e449868e097ecb12c2f33d7dee6c0f026385c5a13faad6d30c04" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4910ab0b8fbc98ce496cd35e4a725771cf741ea1edc1e9824659bd6641536f76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f159c66daf496cf9e137d8154891355a2ed8892c0d665d86c8c86226812edf28" + sha256 cellar: :any_skip_relocation, tahoe: "02c4cbd4cb133ae5d892cd7f0cb3274dde7af9773b5c218dc3e85bc3748aed3c" + sha256 cellar: :any_skip_relocation, sequoia: "7f5bf17e597c820e7c00df37b3e663754421a53c5359485b5a5860018109e45b" + sha256 cellar: :any_skip_relocation, sonoma: "41c66b04cdbd8eb317d87073d4c659df3bff97c0df5c804cdf09b3e7076b09ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "c069a63cedf9c96bd0482566cc611c0b54b9eeb7aa96924cd4bf77360b07342d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "944dd3d39133adc61186caefc9dda00ab262a95122760272e01ab8fd972f62c3" + end + + depends_on "python@3.14" + + pypi_packages extra_packages: "setuptools" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/32/f7/b870fb8d2ca96a996db97c9d30d1eb087b341cec1004722e99672a79800d/boto3-1.37.9.tar.gz" + sha256 "51b76da93d7c2a3dff6155ee4aa25455940e7ade08292d22aeeed08b9e0dbf0b" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/34/79/4e072e614339727f79afef704e5993b5b4d2667c1671c757cc4deb954744/botocore-1.37.38.tar.gz" + sha256 "c3ea386177171f2259b284db6afc971c959ec103fa2115911c4368bea7cbbc5d" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "dateparser" do + url "https://files.pythonhosted.org/packages/bd/3f/d3207a05f5b6a78c66d86631e60bfba5af163738a599a5b9aa2c2737a09e/dateparser-1.2.1.tar.gz" + sha256 "7e4919aeb48481dbfc01ac9683c8e20bfe95bb715a38c1e9f6af889f4f30ccc3" + end + + resource "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz" + sha256 "c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz" + sha256 "c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/ea/46/f44d8be06b85bc7c4d8c95d658be2b68f27711f279bf9dd0612a5e4794f5/ruamel.yaml-0.18.10.tar.gz" + sha256 "20c86ab29ac2153f80a428e1254a8adf686d3383df04490514ca3b79a362db58" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/c4/2b/5c9562795c2eb2b5f63536961754760c25bf0f34af93d36aa28dea2fb303/s3transfer-0.11.5.tar.gz" + sha256 "8c8aad92784779ab8688a61aefff3e28e9ebdce43142808eaa3f0b0f402f68b7" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "toolz" do + url "https://files.pythonhosted.org/packages/8a/0b/d80dfa675bf592f636d1ea0b835eab4ec8df6e9415d8cfd766df54456123/toolz-1.0.0.tar.gz" + sha256 "2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz" + sha256 "cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"trailscraper", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/trailscraper --version") + + test_input = '{"Records": []}' + output = pipe_output("#{bin}/trailscraper generate", test_input) + assert_match "Statement", output + end +end diff --git a/Formula/t/transcrypt.rb b/Formula/t/transcrypt.rb new file mode 100644 index 0000000000000..8ef1fc728d0cb --- /dev/null +++ b/Formula/t/transcrypt.rb @@ -0,0 +1,38 @@ +class Transcrypt < Formula + desc "Configure transparent encryption of files in a Git repo" + homepage "https://github.com/elasticdog/transcrypt" + url "https://github.com/elasticdog/transcrypt/archive/refs/tags/v2.3.1.tar.gz" + sha256 "c5f5af35016474ffd1f8605be1eac2e2f17743737237065657e3759c8d8d1a66" + license "MIT" + head "https://github.com/elasticdog/transcrypt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c796653e0de06fc0a443b591892bd9ad29771a810673a6165d47a61c36c9d157" + end + + on_linux do + depends_on "util-linux" + end + + def install + bin.install "transcrypt" + man1.install "man/transcrypt.1" + bash_completion.install "contrib/bash/transcrypt" + zsh_completion.install "contrib/zsh/_transcrypt" + end + + test do + system "git", "init" + system bin/"transcrypt", "--password", "guest", "--yes" + + (testpath/".gitattributes").atomic_write <<~EOS + sensitive_file filter=crypt diff=crypt merge=crypt + EOS + (testpath/"sensitive_file").write "secrets" + system "git", "add", ".gitattributes", "sensitive_file" + system "git", "commit", "--message", "Add encrypted version of file" + + assert_equal `git show HEAD:sensitive_file --no-textconv`.chomp, + "U2FsdGVkX198ELlOY60n2ekOK1DiMCLS1dRs53RGBeU=" + end +end diff --git a/Formula/t/translate-shell.rb b/Formula/t/translate-shell.rb new file mode 100644 index 0000000000000..450108b8c56d1 --- /dev/null +++ b/Formula/t/translate-shell.rb @@ -0,0 +1,44 @@ +class TranslateShell < Formula + desc "Command-line translator using Google Translate and more" + homepage "https://www.soimort.org/translate-shell" + url "https://github.com/soimort/translate-shell/archive/refs/tags/v0.9.7.1.tar.gz" + sha256 "f949f379779b9e746bccb20fcd180d041fb90da95816615575b49886032bcefa" + license "Unlicense" + head "https://github.com/soimort/translate-shell.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "58078d2c0655645aa195c91dc972beb161c90a4085a58bced9d2a9d9830c7b92" + end + + depends_on "fribidi" + depends_on "gawk" + depends_on "rlwrap" + + on_linux do + depends_on "util-linux" + end + + def install + system "make" + bin.install "build/trans" + man1.install "man/trans.1" + end + + def caveats + <<~EOS + By default, text-to-speech functionality is provided by macOS's builtin + `say' command. This functionality may be improved in certain cases by + installing one of mplayer, mpv, or mpg123, all of which are available + through `brew install'. + EOS + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + assert_equal "hello\n", + shell_output("#{bin}/trans -no-init -b -s es -t en hola").downcase + end +end diff --git a/Formula/t/translate-toolkit.rb b/Formula/t/translate-toolkit.rb new file mode 100644 index 0000000000000..8621bb33fdd52 --- /dev/null +++ b/Formula/t/translate-toolkit.rb @@ -0,0 +1,47 @@ +class TranslateToolkit < Formula + include Language::Python::Virtualenv + + desc "Toolkit for localization engineers" + homepage "https://toolkit.translatehouse.org/" + url "https://files.pythonhosted.org/packages/5f/26/200ba39b505d8b0a7d4e072e6aa84a4d757fae8c00e5e3a2f2ccba2ab198/translate_toolkit-3.16.3.tar.gz" + sha256 "d9656526a8bb0f0a88a16a08ed463036589cd34af059daf80aaaa90b9246586c" + license "GPL-2.0-or-later" + head "https://github.com/translate/translate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7fc608977f3ea337455cfb4932078a376cdcef70dc16b862baead4dd2ab83c5e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11578cc5be114ea0621d675d80e51b1ad601839e18d495c07b93cfa3a9d99a8a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb2accc8375061e61e70e20d557eaaa80c53c462d9e6ba02e155a3b73a66d8db" + sha256 cellar: :any_skip_relocation, sonoma: "196a5adaa4464d58b76dc693bae24168a72e887eb8180c59cf45f6f7bbe09f44" + sha256 cellar: :any_skip_relocation, arm64_linux: "070b5d84232a016ba5bc6ac31649ab4bbdef60f4fb7401121d6f5b304d7bc410" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9bb091b1aa68b6020f3a03ca09b05a77b1dc118935be5504b7dbc5a2f5f92d4" + end + + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + test_file = testpath/"test.po" + touch test_file + assert_match "Processing file : #{test_file}", shell_output("#{bin}/pocount --no-color #{test_file}") + + assert_match version.to_s, shell_output("#{bin}/pretranslate --version") + assert_match version.to_s, shell_output("#{bin}/podebug --version") + end +end diff --git a/Formula/t/transmission-cli.rb b/Formula/t/transmission-cli.rb new file mode 100644 index 0000000000000..ad25968de2eff --- /dev/null +++ b/Formula/t/transmission-cli.rb @@ -0,0 +1,110 @@ +class TransmissionCli < Formula + desc "Lightweight BitTorrent client" + homepage "https://transmissionbt.com/" + url "https://github.com/transmission/transmission/releases/download/4.0.6/transmission-4.0.6.tar.xz" + sha256 "2a38fe6d8a23991680b691c277a335f8875bdeca2b97c6b26b598bc9c7b0c45f" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + revision 4 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "25ddc150f211ccc39b47eb5d45659b61f104ae2d777f7980ca19732abb9a2fb9" + sha256 arm64_sequoia: "542c4fe40c57c427680eb5a982e0a6437bbaa9adac9b174fcb5f9fc5cf98dffe" + sha256 arm64_sonoma: "2e13ac5fce4a74345d5e02ae860fea0b05c7d6fbe7f94a448d14a121d9586fea" + sha256 arm64_ventura: "61e957019a73bb95a8805af721ce6b7f9f9acdc30c6bc8a65ab0b47b273f869b" + sha256 sonoma: "498982b372e53a61addf98d76169e5c01851d89bce7b70bc3915894f184ca558" + sha256 ventura: "f25b459d033bdf9842d66e09ec65989a0336caca52b195206b6dfaf39cd9ee6d" + sha256 arm64_linux: "a34e16ce8d16148d11ff1eedca2ba0bbfa45a5942a272d281d88d9936be05290" + sha256 x86_64_linux: "d05e4a68c07c6fa2b73df241d91d566d6af0e5ea0008cdc360ad6e65d7379624" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "miniupnpc" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" # Uses CommonCrypto on macOS + end + + # miniupnpc 2.2.8 compatibility patch + patch :DATA + + def install + odie "Remove cmake 4 build patch" if build.stable? && version > "4.0.6" + + # CMake 4 compatibility for third-parties of miniupnpc + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + args = %w[ + -DENABLE_CLI=ON + -DENABLE_DAEMON=ON + -DENABLE_MAC=OFF + -DENABLE_NLS=OFF + -DENABLE_QT=OFF + -DENABLE_TESTS=OFF + -DENABLE_UTILS=ON + -DENABLE_WEB=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (var/"transmission").mkpath + end + + def caveats + <<~EOS + This formula only installs the command line utilities. + + Transmission.app can be downloaded directly from the website: + https://www.transmissionbt.com/ + + Alternatively, install with Homebrew Cask: + brew install --cask transmission + EOS + end + + service do + run [opt_bin/"transmission-daemon", "--foreground", "--config-dir", var/"transmission/", "--log-info", + "--logfile", var/"transmission/transmission-daemon.log"] + keep_alive true + end + + test do + system bin/"transmission-create", "-o", testpath/"test.mp3.torrent", test_fixtures("test.mp3") + assert_match(/^magnet:/, shell_output("#{bin}/transmission-show -m #{testpath}/test.mp3.torrent")) + end +end + +__END__ +diff --git a/libtransmission/port-forwarding-upnp.cc b/libtransmission/port-forwarding-upnp.cc +index 7c4865b..695d43f 100644 +--- a/libtransmission/port-forwarding-upnp.cc ++++ b/libtransmission/port-forwarding-upnp.cc +@@ -275,8 +275,13 @@ tr_port_forwarding_state tr_upnpPulse(tr_upnp* handle, tr_port port, bool is_ena + + FreeUPNPUrls(&handle->urls); + auto lanaddr = std::array{}; +- if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) == +- UPNP_IGD_VALID_CONNECTED) ++ if ( ++#if (MINIUPNPC_API_VERSION >= 18) ++ UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1, nullptr, 0) ++#else ++ UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) ++#endif ++ == UPNP_IGD_VALID_CONNECTED) + { + tr_logAddInfo(fmt::format(_("Found Internet Gateway Device '{url}'"), fmt::arg("url", handle->urls.controlURL))); + tr_logAddInfo(fmt::format(_("Local Address is '{address}'"), fmt::arg("address", lanaddr.data()))); diff --git a/Formula/t/trash-cli.rb b/Formula/t/trash-cli.rb new file mode 100644 index 0000000000000..ed25ae72f8332 --- /dev/null +++ b/Formula/t/trash-cli.rb @@ -0,0 +1,49 @@ +class TrashCli < Formula + include Language::Python::Virtualenv + + desc "Command-line interface to the freedesktop.org trashcan" + homepage "https://github.com/andreafrancia/trash-cli" + url "https://files.pythonhosted.org/packages/f7/6c/d51b36377c35e4f9e69af4d8b61a920f26251483cdc0165f5513da7aefeb/trash_cli-0.24.5.26.tar.gz" + sha256 "c721628e82c4be110b710d72b9d85c9595d8b524f4da241ad851a7479d0bdceb" + license "GPL-2.0-or-later" + head "https://github.com/andreafrancia/trash-cli.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "096c7187b9376eb817001e3ed11ea683e43d81c25c493c9f1036dc3bea281823" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5cefc22f1ecb8432383170c378630a1b2ab97fbdcd63006cddf43eedd70b41f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce16cef08f1698139e1e509ff3c42621cdad38fe96634593c0ecc7a10458d218" + sha256 cellar: :any_skip_relocation, sonoma: "a0cc43661442da45b0e393fc69c9a92adf86dec427dcea7b64bc39bfee6ded85" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f6ad80444c0db11ae7faf5bfa3e119eb09603242938e35ef89fe3e3b080a09d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88aba05ddc72fd1c30e4aa6e69351cd59e4aaf11d043d2eeafa013f0c574c9ba" + end + + keg_only :shadowed_by_macos + + depends_on "python@3.14" + + conflicts_with "macos-trash", because: "both install a `trash` binary" + conflicts_with "osx-trash", because: "both install a `trash` binary" + conflicts_with "trash", because: "both install a `trash` binary" + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + touch "testfile" + assert_path_exists testpath/"testfile" + system bin/"trash-put", "testfile" + refute_path_exists testpath/"testfile" + end +end diff --git a/Formula/t/trash.rb b/Formula/t/trash.rb new file mode 100644 index 0000000000000..4f7bbd9e05d5d --- /dev/null +++ b/Formula/t/trash.rb @@ -0,0 +1,47 @@ +class Trash < Formula + desc "CLI tool that moves files or folder to the trash" + homepage "https://hasseg.org/trash/" + url "https://github.com/ali-rantakari/trash/archive/refs/tags/v0.9.2.tar.gz" + sha256 "e8739c93d710ac4da721e16878e7693019d3a2ad7d8acd817f41426601610083" + license "MIT" + head "https://github.com/ali-rantakari/trash.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c8ea446c49b05c3be652742ae95a0be1bda3354746add8c2721c337462fe8bdb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3b7a766bcc683b339c145ab7d8b484f2bbd65aac6903fd952dec7f4521efe5f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "90cffd3d151720b768c48a8874f7b8dfaaf6f7a9e9000ffe23cfa3f9e4aa6b76" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60186a8823abc9dd734475e3f787edd7c2d6a2254fff25b7289de2db15447099" + sha256 cellar: :any_skip_relocation, arm64_monterey: "541af91d1cb128aa743460a529a3dcab5bac63b61ccde0a60d73aee23ab7d5c0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "11c0c85ec692ea6d4a125070f0a6ca576aff991608a6c9632b984cbf983e2481" + sha256 cellar: :any_skip_relocation, sonoma: "c26e06202022f708790f22f4477b65e3337d611c42e9a814ada1526bda03d923" + sha256 cellar: :any_skip_relocation, ventura: "539093ca74c72ed8be974fd9042b14f55cde0ef2c1fadbedc7343099a394593e" + sha256 cellar: :any_skip_relocation, monterey: "09b8ac7ade28ca59bd578b90680ece838a507b90b35e44d06a16f4d8ab9ae6e6" + sha256 cellar: :any_skip_relocation, big_sur: "403ba52ce97d38535e1d127ca227afd4ea2d0e0c8b414118dbc5376c9ed8f094" + sha256 cellar: :any_skip_relocation, catalina: "b452d67cdeeb52db0aaadd258bc3e214a5ea5ed37da698b45017b01457115ea6" + end + + keg_only :shadowed_by_macos + + depends_on :macos + + conflicts_with "macos-trash", because: "both install a `trash` binary" + conflicts_with "osx-trash", because: "both install a `trash` binary" + conflicts_with "trash-cli", because: "both install a `trash` binary" + + def install + # https://github.com/ali-rantakari/trash/issues/43 + inreplace "Makefile", "-force_cpusubtype_ALL", "" + + system "make" + system "make", "docs" + bin.install "trash" + man1.install "trash.1" + end + + test do + system bin/"trash" + end +end diff --git a/Formula/t/travis.rb b/Formula/t/travis.rb new file mode 100644 index 0000000000000..3ec0c797f2750 --- /dev/null +++ b/Formula/t/travis.rb @@ -0,0 +1,196 @@ +class Travis < Formula + desc "Command-line client for Travis CI" + homepage "https://github.com/travis-ci/travis.rb/" + url "https://github.com/travis-ci/travis.rb/archive/refs/tags/v1.14.0.tar.gz" + sha256 "6fe418bf33b025a106dd99762aa8ebc595b4b549d4087c6921d5565b741f7361" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "e8824ef084cf3367d7f585718d44436dc5b931e321059aa120e57379cb7665ff" + sha256 cellar: :any, arm64_sequoia: "a2656c812d2de510207764913a794922237221ac0840c5f238e391fc73b913c9" + sha256 cellar: :any, arm64_sonoma: "51bf2cb257cdd819adb71a0e2b5c44177f5ef3ff83fd23718b08fd89248d8f97" + sha256 cellar: :any, arm64_ventura: "7b54aebccabde93f8f5898240e2107347d671d6d4e7a51606a674c7386111453" + sha256 cellar: :any, sonoma: "5773a64c642d24d49102ae362ff3b877da2e78a2565aac86b8c84b008473fbe7" + sha256 cellar: :any, ventura: "a722365f1d543352566b79d0468abe9a8eebc6b45707d1930af9d6c2cb679ac7" + sha256 cellar: :any_skip_relocation, arm64_linux: "842d832fc7b524d3c607f0773cbf61be80b49120b456b4dc197c10651fd7687e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad1edfc0f78b697477f04ac92d4e3b6a094341ef0894f92ee684c83b60aba68f" + end + + depends_on "pkgconf" => :build + depends_on "ruby" + + uses_from_macos "libffi" + + resource "net-http-pipeline" do + url "https://rubygems.org/gems/net-http-pipeline-1.0.1.gem" + sha256 "6923ce2f28bfde589a9f385e999395eead48ccfe4376d4a85d9a77e8c7f0b22f" + end + + resource "connection_pool" do + url "https://rubygems.org/gems/connection_pool-2.4.1.gem" + sha256 "0f40cf997091f1f04ff66da67eabd61a9fe0d4928b9a3645228532512fab62f4" + end + + resource "net-http-persistent" do + url "https://rubygems.org/gems/net-http-persistent-4.0.2.gem" + sha256 "03f827a33857b1d56b4e796957ad19bf5b58367d853fd0a224eb70fba8d02a44" + end + + resource "multi_json" do + url "https://rubygems.org/gems/multi_json-1.15.0.gem" + sha256 "1fd04138b6e4a90017e8d1b804c039031399866ff3fbabb7822aea367c78615d" + end + + resource "ffi" do + url "https://rubygems.org/gems/ffi-1.16.3.gem" + sha256 "6d3242ff10c87271b0675c58d68d3f10148fabc2ad6da52a18123f06078871fb" + end + + resource "ethon" do + url "https://rubygems.org/gems/ethon-0.16.0.gem" + sha256 "bba0da1cea8ac3e1f5cdd7cb1cb5fc78d7ac562c33736f18f0c3eb2b63053d9e" + end + + resource "typhoeus" do + url "https://rubygems.org/gems/typhoeus-1.4.1.gem" + sha256 "1c17db8364bd45ab302dc61e460173c3e69835896be88a3df07c206d5c55ef7c" + end + + resource "ruby2_keywords" do + url "https://rubygems.org/gems/ruby2_keywords-0.0.5.gem" + sha256 "ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef" + end + + resource "faraday-net_http" do + url "https://rubygems.org/gems/faraday-net_http-3.0.2.gem" + sha256 "6882929abed8094e1ee30344a3369e856fe34530044630d1f652bf70ebd87e8d" + end + resource "base64" do + url "https://rubygems.org/gems/base64-0.2.0.gem" + sha256 "0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507" + end + + resource "faraday" do + url "https://rubygems.org/gems/faraday-2.7.12.gem" + sha256 "ed38dcd396d2defcf8a536bbf7ef45e6385392ab815fe087df46777be3a781a7" + end + + resource "faraday-typhoeus" do + url "https://rubygems.org/gems/faraday-typhoeus-1.1.0.gem" + sha256 "24c6147c213818dde3ebc50ae47ab92f9a7e554903aa362707126f749c6890e7" + end + + resource "faraday-retry" do + url "https://rubygems.org/gems/faraday-retry-2.2.1.gem" + sha256 "4146fed14549c0580bf14591fca419a40717de0dd24f267a8ec2d9a728677608" + end + + resource "public_suffix" do + url "https://rubygems.org/gems/public_suffix-5.0.5.gem" + sha256 "72c340218bb384610536919988705cc29e09749c0021fd7005f715c7e5dfc493" + end + + resource "addressable" do + url "https://rubygems.org/downloads/addressable-2.8.6.gem" + sha256 "798f6af3556641a7619bad1dce04cdb6eb44b0216a991b0396ea7339276f2b47" + end + + resource "minitest" do + url "https://rubygems.org/downloads/minitest-5.20.0.gem" + sha256 "a3faf26a757ced073aaae0bd10481340f53e221a4f50d8a6033591555374752e" + end + + resource "concurrent-ruby" do + url "https://rubygems.org/gems/concurrent-ruby-1.3.1.gem" + sha256 "c369f1d0875b42295fe0fabc321065f3cfeab8c32c526c01b6b05af1efc8b0ce" + end + + resource "tzinfo" do + url "https://rubygems.org/gems/tzinfo-2.0.6.gem" + sha256 "8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b" + end + + resource "i18n" do + url "https://rubygems.org/gems/i18n-1.14.5.gem" + sha256 "26dcbc05e364b57e27ab430148b3377bc413987d34cc042336271d8f42e9d1b9" + end + + resource "activesupport" do + url "https://rubygems.org/gems/activesupport-7.0.8.3.gem" + sha256 "233d1f2b0e3e473ed03e8dadbda8feb249bef424c3baf8bd64af6b1fe3bb6af9" + end + + resource "travis-gh" do + url "https://rubygems.org/gems/travis-gh-0.21.0.gem" + sha256 "43265fdd15eab3a19422faf442cdf8f0508500542e835cd3cdc1029fe73f7a5b" + end + + resource "rack" do + url "https://rubygems.org/gems/rack-3.0.11.gem" + sha256 "a08473678160760d9085ebe14508a42add18cde4217107b4b1aa01c8f14ff98c" + end + + resource "rack-test" do + url "https://rubygems.org/gems/rack-test-2.1.0.gem" + sha256 "0c61fc61904049d691922ea4bb99e28004ed3f43aa5cfd495024cc345f125dfb" + end + + resource "json" do + url "https://rubygems.org/gems/json-2.7.1.gem" + sha256 "187ea312fb58420ff0c40f40af1862651d4295c8675267c6a1c353f1a0ac3265" + end + + resource "websocket" do + url "https://rubygems.org/gems/websocket-1.2.10.gem" + sha256 "2cc1a4a79b6e63637b326b4273e46adcddf7871caa5dc5711f2ca4061a629fa8" + end + + resource "pusher-client" do + url "https://rubygems.org/gems/pusher-client-0.6.2.gem" + sha256 "c405c931090e126c056d99f6b69a01b1bcb6cbfdde02389c93e7d547c6efd5a3" + end + + resource "launchy" do + url "https://rubygems.org/gems/launchy-2.5.2.gem" + sha256 "8aa0441655aec5514008e1d04892c2de3ba57bd337afb984568da091121a241b" + end + + resource "json_pure" do + url "https://rubygems.org/gems/json_pure-2.6.3.gem" + sha256 "c39185aa41c04a1933b8d66d1294224743262ee6881adc7b5a488ab2ae19c74e" + end + + resource "highline" do + url "https://rubygems.org/gems/highline-2.1.0.gem" + sha256 "d63d7f472f8ffaa143725161ae6fb06895b5cb7527e0b4dac5ad1e4902c80cb9" + end + + resource "faraday-rack" do + url "https://rubygems.org/gems/faraday-rack-2.0.0.gem" + sha256 "41759651c9e8baba520c21f807a8787dbb8480c2dbe64569264346ffad6b0461" + end + + def install + ENV["GEM_HOME"] = libexec + + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + system "gem", "build", "travis.gemspec" + system "gem", "install", "--ignore-dependencies", "travis-#{version}.gem" + bin.install libexec/"bin/travis" + rm_r(libexec/"gems/travis-#{version}/assets/notifications/Travis CI.app") + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + output = shell_output("#{bin}/travis whoami 2>&1 --pro", 1) + assert_match "not logged in, please run travis login", output + + output = shell_output("#{bin}/travis init 2>&1", 1) + assert_match "Can't figure out GitHub repo name", output + end +end diff --git a/Formula/t/trdsql.rb b/Formula/t/trdsql.rb new file mode 100644 index 0000000000000..08484e199513c --- /dev/null +++ b/Formula/t/trdsql.rb @@ -0,0 +1,39 @@ +class Trdsql < Formula + desc "CLI tool that can execute SQL queries on CSV, LTSV, JSON, YAML and TBLN" + homepage "https://github.com/noborus/trdsql" + url "https://github.com/noborus/trdsql/archive/refs/tags/v1.1.0.tar.gz" + sha256 "e3b8bef57330648d3f4b279bd4c652eaeba19aa4fae3fe05cfa596a2b3f4bc51" + license "MIT" + head "https://github.com/noborus/trdsql.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9ddcc05dd7ac0be0fe6e20e1881ee61ee15db929558e968a914c8a1c032bbe1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ecd934194fed8b8fcb0c00cdb3108e5a4bf9ba7e465c13f4e14e9a864ffc0a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f998e6d2c9f7085a17395d4b3d4da1065bf806139a03a5dcd99054dcf8071d88" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c3a2bd0fe2bf86949101930b1efb4c280a52756d59f69b3f04d0c8c612dd415" + sha256 cellar: :any_skip_relocation, sonoma: "1dc4cae00a081d54f378ff91ab8b3b80c538063efec0633b11ce0e24c4dc64e4" + sha256 cellar: :any_skip_relocation, ventura: "bb08c8329af1c57cdda3d50b3d685274c45835665a9d91bf7db15caf01d5c19e" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f84e77253c3cb7ad195e7e3dae37b9981e018aa6bc18be292566f433efa7c07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bcfdc24169094af5142de81d1f342512c639c262bc8f10566e5ee5230ae6a2ac" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/noborus/trdsql.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/trdsql" + end + + test do + assert_match version.to_s, shell_output("#{bin}/trdsql --version") + + (testpath/"test.csv").write <<~CSV + name,age + Alice,30 + Bob,25 + CSV + + output = shell_output("#{bin}/trdsql -ih 'SELECT name FROM test.csv where age > 25'") + assert_equal "Alice", output.chomp + end +end diff --git a/Formula/t/tre-command.rb b/Formula/t/tre-command.rb new file mode 100644 index 0000000000000..87d38f08a588a --- /dev/null +++ b/Formula/t/tre-command.rb @@ -0,0 +1,40 @@ +class TreCommand < Formula + desc "Tree command, improved" + homepage "https://github.com/dduan/tre" + url "https://github.com/dduan/tre/archive/refs/tags/v0.4.0.tar.gz" + sha256 "280243cfa837661f0c3fff41e4a63c6768631073c9f6ce9982d9ed08e038788a" + license "MIT" + head "https://github.com/dduan/tre.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "61124e9bd9782b9ddfa36f838995411afa0d901063b33eaf25e527c5e63b7b8d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ece0114a11a6a7358aa4465613c05ea48a12b002bc425cd08ce3ed0d86c24b30" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b56a1c935f7283cbcc876a004a120e05dc88697238d85498043455f9cecdb36e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da85ee4f6a66a56b10372a9e6702ff9cb63574543780b65ff71abaa25efdf223" + sha256 cellar: :any_skip_relocation, sonoma: "88227f6cdf34f1809d7bd0a8fc413c03c2256c6d3eded62e835ae4280cac3cbc" + sha256 cellar: :any_skip_relocation, ventura: "5a5d538e52db0c9136ce286ff233e845a3aeea9746796d3e0c449c6d19f71e57" + sha256 cellar: :any_skip_relocation, arm64_linux: "66386309ee18528d98fee3a568613dcc7d37b9992fc29d0fe10868b3d679a9c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb6a971b2a393fbca9ae0823891e7da696e1436f2261619f3fee3c1b7d455c4a" + end + + depends_on "rust" => :build + + def install + ENV["SHELL_COMPLETIONS_DIR"] = buildpath/"completions" + + system "cargo", "install", *std_cargo_args + man1.install "manual/tre.1" + + bash_completion.install "completions/tre.bash" => "tre" + fish_completion.install "completions/tre.fish" + zsh_completion.install "completions/_tre" + end + + test do + (testpath/"foo.txt").write("") + assert_match("── foo.txt", shell_output("#{bin}/tre")) + end +end diff --git a/Formula/t/tre.rb b/Formula/t/tre.rb new file mode 100644 index 0000000000000..c17be33d70658 --- /dev/null +++ b/Formula/t/tre.rb @@ -0,0 +1,31 @@ +class Tre < Formula + desc "Lightweight, POSIX-compliant regular expression (regex) library" + homepage "https://github.com/laurikari/tre" + url "https://github.com/laurikari/tre/releases/download/v0.9.0/tre-0.9.0.tar.gz" + sha256 "f57f5698cafdfe516d11fb0b71705916fe1162f14b08cf69d7cf86923b5a2477" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0046ebce7ba173f666176e93abbb6d2079677d02e584f097d97f923d0c0ff0a3" + sha256 cellar: :any, arm64_sequoia: "85fd4370b99c94723511074c06989cb4f9d4dadaac1678caac21d6796f931ee7" + sha256 cellar: :any, arm64_sonoma: "e0123ce5b530d27ff0df617882b040d17da215ff57a434ac2fdf0e8438536b8f" + sha256 cellar: :any, arm64_ventura: "d0c9476251a0aacd0395c113b38b90ecd0f714e39a1581fc4ad1d253daa9481c" + sha256 cellar: :any, sonoma: "943904e06f61a77afa4d5ae7d50e6e8008bd32bd66f395ec43a2b58af06b840f" + sha256 cellar: :any, ventura: "79f195205a3d5296ace3a48a14d3beb763b906b7e0a0d674c9ac897dbb4e6329" + sha256 arm64_linux: "1d9d8bb6a5a094d7c9e9469f87bfb88cd0aefa9ac4c77b525b66d25b8e22373e" + sha256 x86_64_linux: "29ffb52469a70317b5c0b010b3af90d3f3cc804fb28e856c7f112f9b8049a0ef" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_equal "brow", pipe_output("#{bin}/agrep -1 brew", "brow", 0) + end +end diff --git a/Formula/t/trec_eval.rb b/Formula/t/trec_eval.rb new file mode 100644 index 0000000000000..5dd0d7238f5ab --- /dev/null +++ b/Formula/t/trec_eval.rb @@ -0,0 +1,54 @@ +class TrecEval < Formula + desc "Evaluation software used in the Text Retrieval Conference" + homepage "https://trec.nist.gov/" + url "https://github.com/usnistgov/trec_eval/archive/refs/tags/v9.0.8.tar.gz" + sha256 "c3994a73103ec842e12df693749584a45814c35c36dcc15f38984bd463566ba1" + license :public_domain + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "76b82a760b649ff274423803886addc93b50219638567a293aa3cfbb996da7bf" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fcdd6e403afdb47f056383b66c17ec205973b463c9f09e0991b5272eacddfaa7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55f874cf4900def882e6d43572bb1da136c2b2fc4a457bdd0fee5a02e865b197" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16c8aaa0d9b33883411eba081aee36c8dda1bc3e2ed8ea84e9883c9edf320e9a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "01082fb524981b3e81e180e9a4a1ac92e0fe68ef210318e0a1c41eadad89a291" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "908cb93ceda4eb3561890ed39752d7ea5e2f41e5aced235445426bcc52958080" + sha256 cellar: :any_skip_relocation, sonoma: "6d65df57d397752e4cd42b01eb7eb4a0160e08e357215a3ebbecacdb9baa1647" + sha256 cellar: :any_skip_relocation, ventura: "c3bc70311ebbcabf059835dcd53f3eb1fe056dfc01f517bad1e1f0c9f4cb6ec9" + sha256 cellar: :any_skip_relocation, monterey: "0d8a6a62eb6ff6687da3c825bbc4f9b655b1435012f12fbadab8d7c00bcc7cd7" + sha256 cellar: :any_skip_relocation, big_sur: "909a8fa72d9da9dc50790dd31faf7ce80bfa13f6714fb39008ea4ef9ceefbff5" + sha256 cellar: :any_skip_relocation, catalina: "ea8723ce3d27bc893ec5255f8bb3235d03d442a58ef36586997b085626d752c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfa28a32fa647c2cd07ae80866f5962a1cd62a464e4e372d1d305920687b04f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc3ec132aca6dc41b193e739765cbc951b20c705d84aac1a98f930a5ebb1ee32" + end + + def install + system "make" + bin.install "trec_eval" + end + + test do + qrels = <<~EOS + 301 0 q1 0 + 302 0 q2 1 + EOS + results = <<~EOS + 301 Q0 q1 3 1.23 testid + 302 Q0 q2 50 2.34 testid + EOS + out = <<~EOS + runid \tall\ttestid + num_q \tall\t2 + map \tall\t0.5000 + P_10 \tall\t0.0500 + recall_10 \tall\t0.5000 + ndcg_cut_10 \tall\t0.5000 + EOS + (testpath/"qrels.test").write(qrels) + (testpath/"results.test").write(results) + test_out = shell_output("#{bin}/trec_eval -m runid -m num_q -m\ + map -m ndcg_cut.10 -m P.10 -m recall.10 qrels.test results.test") + assert_equal out, test_out + end +end diff --git a/Formula/t/tree-sitter-cli.rb b/Formula/t/tree-sitter-cli.rb new file mode 100644 index 0000000000000..e6766eb3b2dff --- /dev/null +++ b/Formula/t/tree-sitter-cli.rb @@ -0,0 +1,67 @@ +class TreeSitterCli < Formula + desc "Parser generator tool" + homepage "https://tree-sitter.github.io" + url "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.25.10.tar.gz" + sha256 "ad5040537537012b16ef6e1210a572b927c7cdc2b99d1ee88d44a7dcdc3ff44c" + license "MIT" + head "https://github.com/tree-sitter/tree-sitter.git", branch: "master" + + livecheck do + formula "tree-sitter" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d7997c710a29c99f823c4f19596db1ec1511c204b7b74c45d7c9eff5ec637f7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9f79036f5265e03b7365ce303c413b51ce1f66c3c20362f4d040fb2b6f8327d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9311741beeb74356d9d7653a64beb2990858389457849d0d96d2cd2580580f4" + sha256 cellar: :any_skip_relocation, sonoma: "bd67480759e3b56974e91cc6c47af09113f7dfb5de2e92ff4871dd12b1eec0e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f55705990d6330ff1958e780708a86fed5e0bd9bbadcd93598271bcf98e5315" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0b636167c67993dc97c347b7b5a01b04af40a3bcdb2803fcd8980efb58de312" + end + + depends_on "rust" => :build + depends_on "node" => :test + + link_overwrite "bin/tree-sitter" + link_overwrite "etc/bash_completion.d/tree-sitter" + link_overwrite "share/fish/vendor_completions.d/tree-sitter.fish", "share/zsh/site-functions/_tree-sitter" + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + generate_completions_from_executable(bin/"tree-sitter", "complete", shell_parameter_format: :arg) + end + + test do + # a trivial tree-sitter test + assert_equal "tree-sitter #{version}", shell_output("#{bin}/tree-sitter --version").strip + + # test `tree-sitter generate` + (testpath/"grammar.js").write <<~JS + module.exports = grammar({ + name: 'YOUR_LANGUAGE_NAME', + rules: { + source_file: $ => 'hello' + } + }); + JS + system bin/"tree-sitter", "generate", "--abi=latest" + + # test `tree-sitter parse` + (testpath/"test/corpus/hello.txt").write <<~EOS + hello + EOS + parse_result = shell_output("#{bin}/tree-sitter parse #{testpath}/test/corpus/hello.txt").strip + assert_equal("(source_file [0, 0] - [1, 0])", parse_result) + + # test `tree-sitter test` + (testpath/"test"/"corpus"/"test_case.txt").write <<~EOS + ========= + hello + ========= + hello + --- + (source_file) + EOS + system bin/"tree-sitter", "test" + end +end diff --git a/Formula/t/tree-sitter.rb b/Formula/t/tree-sitter.rb new file mode 100644 index 0000000000000..11f895d20fc1d --- /dev/null +++ b/Formula/t/tree-sitter.rb @@ -0,0 +1,66 @@ +class TreeSitter < Formula + desc "Incremental parsing library" + homepage "https://tree-sitter.github.io/" + url "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.25.10.tar.gz" + sha256 "ad5040537537012b16ef6e1210a572b927c7cdc2b99d1ee88d44a7dcdc3ff44c" + license "MIT" + head "https://github.com/tree-sitter/tree-sitter.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f9a598017206ce74d26f36092de8a18e28a5dcc78afba03853a248c46ab5998" + sha256 cellar: :any, arm64_sequoia: "6296ee2587853fcf55e33195b48366eba0757577b64364e4e71cb84fccd83dfc" + sha256 cellar: :any, arm64_sonoma: "62123823b2664ffd87749f9efb3b3f63e87e0e454e373b17bce056f3fbf4a1f9" + sha256 cellar: :any, sonoma: "ce78af5bcfc0e9319e3df5149b39371543ac7d58d6de67e3f0c10c8eb7a41bb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c41c7235ba0dac5544cc6360090d51ecb07b5e977a31c602d98793ece3fccf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a292ee5d00c1c04db4d8083f6dcd8b70807d83cf9d97cc1764a492e4c588fd5" + end + + def install + system "make", "install", "AMALGAMATED=1", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + This formula now installs only the `tree-sitter` library (`libtree-sitter`). + To install the CLI tool: + brew install tree-sitter-cli + EOS + end + + test do + (testpath/"test_program.c").write <<~C + #include + #include + #include + int main(int argc, char* argv[]) { + TSParser *parser = ts_parser_new(); + if (parser == NULL) { + return 1; + } + // Because we have no language libraries installed, we cannot + // actually parse a string successfully. But, we can verify + // that it can at least be attempted. + const char *source_code = "empty"; + TSTree *tree = ts_parser_parse_string( + parser, + NULL, + source_code, + strlen(source_code) + ); + if (tree == NULL) { + printf("tree creation failed"); + } + ts_tree_delete(tree); + ts_parser_delete(parser); + return 0; + } + C + system ENV.cc, "test_program.c", "-L#{lib}", "-ltree-sitter", "-o", "test_program" + assert_equal "tree creation failed", shell_output("./test_program") + end +end diff --git a/Formula/t/tree.rb b/Formula/t/tree.rb new file mode 100644 index 0000000000000..f29787d2f66b1 --- /dev/null +++ b/Formula/t/tree.rb @@ -0,0 +1,35 @@ +class Tree < Formula + desc "Display directories as trees (with optional color/HTML output)" + homepage "https://oldmanprogrammer.net/source.php?dir=projects/tree" + url "https://github.com/Old-Man-Programmer/tree/archive/refs/tags/2.2.1.tar.gz" + sha256 "5caddcbca805131ff590b126d3218019882e4ca10bc9eb490bba51c05b9b3b75" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ef884002e8601fb801ed14e025d3138a48b74b8a4fa735230a849d4ce0d0fa8c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ccfac896234e1c63841b421873387c407f375af7e6db54abea549d24e3c69589" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a290f08288dc441d0842aeb0fc5d27e2ebb890ad0ef03680c08fddf4b6281252" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a4eded180a935460b5b2d0cc50504197e29d4b9cbd04d20b800860c73e81d930" + sha256 cellar: :any_skip_relocation, sonoma: "a6d54f8fe160c9508e5a85b4245900a9458200cac58e5a2105eef7fa75564884" + sha256 cellar: :any_skip_relocation, ventura: "834f7d3715e67ca1b3b24fc3979c0290ab81e0fdd22ad971c8d25746457a6693" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f416641929a817a779910d616492604eece253c52fb062034a1822cd953cf76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45f02a1a405f4782d3e26963f7f37b3842e9857b06cd36cc0e5945cbeeb55758" + end + + def install + ENV.append "CFLAGS", "-fomit-frame-pointer" + objs = "tree.o list.o hash.o color.o file.o filter.o info.o unix.o xml.o json.o html.o strverscmp.o" + + system "make", "PREFIX=#{prefix}", + "MANDIR=#{man}", + "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "LDFLAGS=#{ENV.ldflags}", + "OBJS=#{objs}", + "install" + end + + test do + system bin/"tree", prefix + end +end diff --git a/Formula/t/treecc.rb b/Formula/t/treecc.rb new file mode 100644 index 0000000000000..3c579ba372221 --- /dev/null +++ b/Formula/t/treecc.rb @@ -0,0 +1,44 @@ +class Treecc < Formula + desc "Aspect-oriented approach to writing compilers" + homepage "https://gnu.org/software/dotgnu/treecc/treecc.html" + url "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-0.3.10.tar.gz" + sha256 "5e9d20a6938e0c6fedfed0cabc7e9e984024e4881b748d076e8c75f1aeb6efe7" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/dotgnu-pnet/" + regex(/href=.*?treecc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2b78957fb3111f30628833a2f8de46fbb1e2b603fce6edefdee88936759372d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d079ee6685d1432e363a820725469f633d8d649e235e7bf95a549d8a34b7789" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c98884b6106530ec5a9e7984d5bd9c18637794f9e52168c4877a7f72c0f068a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a9f078361781eeb11f2a5f595c0728c6753af61f8b2876c390d469bde5f1467" + sha256 cellar: :any_skip_relocation, arm64_monterey: "55d7a609393fe94689f48ae77c7e5c579fcfd408fb3c1fc3ea265bbac0dc842f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b29736a869955071e87b8be7b9d8f7a36e1c2d4f52796e49bbef8d5c002147b6" + sha256 cellar: :any_skip_relocation, sonoma: "4228b4ef75425916287069e7de68723fac704a1ac8ec806d95228497e844124d" + sha256 cellar: :any_skip_relocation, ventura: "225da2d6061f4bb879dfc442a62111ec9e181fb3a4730b4b35b9a7c108ae0322" + sha256 cellar: :any_skip_relocation, monterey: "e5df47b775de8602bf18db65da4a4eea2093d19fda212ea300c455b4ff899c5e" + sha256 cellar: :any_skip_relocation, big_sur: "239d0728cb07d6376c1da25192595b472842acd775b7d95570786fac003ca10f" + sha256 cellar: :any_skip_relocation, catalina: "3a46948ef72e0801cab4767e1f0075d01ab8b7a8eb4b07a9a7e81d021c43e2fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ce0d7869668cc4f7b2f5334f7823cbdfe4685ee548dcfad1132c36a2cca5437" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dbfb97ace2365eaa60578f1d0c7ae29b9d30d1a445040df285b9b9ca4fce263" + end + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make" + bin.install "treecc" + end + + test do + system bin/"treecc", "-v" + end +end diff --git a/Formula/t/treefmt.rb b/Formula/t/treefmt.rb new file mode 100644 index 0000000000000..774aede7a4209 --- /dev/null +++ b/Formula/t/treefmt.rb @@ -0,0 +1,30 @@ +class Treefmt < Formula + desc "One CLI to format the code tree" + homepage "https://treefmt.com/latest/" + url "https://github.com/numtide/treefmt/archive/refs/tags/v2.4.0.tar.gz" + sha256 "2b67a03045e8d31c6018d2149438d544c1c9dae7db44510cdd596030a13b38fd" + license "MIT" + head "https://github.com/numtide/treefmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "eb28440bb5687c47285d3eda1deb2afbca41b8ec9e90734489bb9ad1e357d33d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eb28440bb5687c47285d3eda1deb2afbca41b8ec9e90734489bb9ad1e357d33d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb28440bb5687c47285d3eda1deb2afbca41b8ec9e90734489bb9ad1e357d33d" + sha256 cellar: :any_skip_relocation, sonoma: "4e0b3d5ee9295e23ed72fd76594e5c54fd46660c40521a02c4303f38da39687a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e024ffde13c8cc821c8eea234f9a86cfa24c3d2907bfbc03565f8d3558d67b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f560c64d79a0d230c5ba5d8f41376ff022eb22a97fee928e18959a44adb9f713" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/numtide/treefmt/v2/build.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + output = shell_output("#{bin}/treefmt 2>&1", 1) + assert_match "failed to find treefmt config file: could not find [treefmt.toml .treefmt.toml]", output + assert_match version.to_s, shell_output("#{bin}/treefmt --version") + end +end diff --git a/Formula/t/treefrog.rb b/Formula/t/treefrog.rb new file mode 100644 index 0000000000000..c10731f7c9796 --- /dev/null +++ b/Formula/t/treefrog.rb @@ -0,0 +1,57 @@ +class Treefrog < Formula + desc "High-speed C++ MVC Framework for Web Application" + homepage "https://www.treefrogframework.org/" + url "https://github.com/treefrogframework/treefrog-framework/archive/refs/tags/v2.11.2.tar.gz" + sha256 "2c878603e8dd609ddabb02ee0e3a74fe306ccdf93ea65f9999f9a60ad68249be" + license "BSD-3-Clause" + head "https://github.com/treefrogframework/treefrog-framework.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "472dc077d93e2bdd8944a167f143a692b09b9cad986863a2f807a7a5ca0f769b" + sha256 arm64_sequoia: "3cd5de64e354398012b990b47e63657cdc50b676819214c2888b8b715b8679f7" + sha256 arm64_sonoma: "11189ca8d064f982fb2712cc29d5687c9235d3c92c1995bb6a8c7caf522c3425" + sha256 sonoma: "059630842f97bd3996453939787ea983fbe51618355cf049d7bcea551d4f9112" + sha256 arm64_linux: "cb74d250416af73e5314724745f813a40a6238c14642dab59d2cffa7b4b19276" + sha256 x86_64_linux: "891c89d4b27108e6fd7dc708bc6e4e10ee1ed2ca72af7311e38458884f7408ae" + end + + depends_on "pkgconf" => :build + depends_on "glog" + depends_on "lz4" + depends_on "mongo-c-driver" + depends_on "qtbase" + depends_on "qtdeclarative" + + def install + rm_r("3rdparty") + # Skip unneeded CMake check + inreplace "configure", "if ! which cmake ", "if false " + + system "./configure", "--prefix=#{prefix}", + "--enable-shared-glog", + "--enable-shared-lz4", + "--enable-shared-mongoc" + system "make", "-C", "src", "install" + system "make", "-C", "tools", "install" + end + + test do + ENV.delete "CPATH" + system bin/"tspawn", "new", "hello" + assert_path_exists testpath/"hello" + cd "hello" do + assert_path_exists Pathname.pwd/"hello.pro" + + system Formula["qtbase"].opt_bin/"qmake" + assert_path_exists Pathname.pwd/"Makefile" + system "make" + system bin/"treefrog", "-v" + end + end +end diff --git a/Formula/t/tremor-runtime.rb b/Formula/t/tremor-runtime.rb new file mode 100644 index 0000000000000..e39f3bc9c9d22 --- /dev/null +++ b/Formula/t/tremor-runtime.rb @@ -0,0 +1,135 @@ +class TremorRuntime < Formula + desc "Early-stage event processing system for unstructured data" + homepage "https://www.tremor.rs/" + url "https://github.com/tremor-rs/tremor-runtime/archive/refs/tags/v0.12.4.tar.gz" + sha256 "91cbe0ca5c4adda14b8456652dfaa148df9878e09dd65ac6988bb781e3df52af" + license "Apache-2.0" + head "https://github.com/tremor-rs/tremor-runtime.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_ventura: "efa5826b0b470f692379f07d5d1303ceb0fbf1dd8d5062185042461bcd390a71" + sha256 cellar: :any, arm64_monterey: "4f373f2849cdb89dedf4edd77ba6742ecd4963cfcc104227ac54485822befe69" + sha256 cellar: :any, arm64_big_sur: "37a3edd0351331d3bdc1bebe3337cd37000cff71819d3345a748613a93cedb4a" + sha256 cellar: :any, ventura: "48cf6ebc8f669c2e4e888483b1bf798c736335efc1d94929238eb52b9b912fb9" + sha256 cellar: :any, monterey: "7764dfa50f3ceaa361799ea9f576e77f9d809a9bbc541688f331e605ade4109d" + sha256 cellar: :any, big_sur: "a6ab5749ffcfefc98be00158795203b8b99f17fee2c0c6985ee404082454ffb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df88e4137f9eb13a7f8c26324f7e97031335464d8505448131a8c6f1542352ac" + end + + deprecate! date: "2024-09-23", because: :does_not_build + disable! date: "2025-09-23", because: :does_not_build + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "librdkafka" + depends_on "oniguruma" + depends_on "xz" # for liblzma + + on_linux do + # Use `llvm@15` to work around build failure with Clang 16 described in + # https://github.com/rust-lang/rust-bindgen/issues/2312. + # TODO: Switch back to `uses_from_macos "llvm" => :build` when `bindgen` is + # updated to 0.62.0 or newer. There is a check in the `install` method. + depends_on "llvm@15" => :build + end + + fails_with :gcc do + version "8" + cause "GCC 9+ required for C++20" + end + + # Fix invalid usage of `macro_export`. + # Remove on next release. + patch do + url "https://github.com/tremor-rs/tremor-runtime/commit/986fae5cf1022790e60175125b848dc84f67214f.patch?full_index=1" + sha256 "ff772097264185213cbea09addbcdacc017eda4f90c97d0dad36b0156e3e9dbc" + end + + def install + ENV["CARGO_FEATURE_DYNAMIC_LINKING"] = "1" # for librdkafka + ENV["RUSTONIG_DYNAMIC_LIBONIG"] = "1" + + bindgen_version = Version.new( + (buildpath/"Cargo.lock").read + .match(/name = "bindgen"\nversion = "(.*)"/)[1], + ) + if bindgen_version >= "0.62.0" + odie "`bindgen` crate is updated to 0.62.0 or newer! Please remove " \ + 'this check and try switching to `uses_from_macos "llvm" => :build`.' + end + + inreplace ".cargo/config", "+avx,+avx2,", "" + + system "cargo", "install", *std_cargo_args(path: "tremor-cli") + + generate_completions_from_executable(bin/"tremor", "completions", base_name: "tremor") + + # main binary + bin.install "target/release/tremor" + + # stdlib + (lib/"tremor-script").install (buildpath/"tremor-script/lib").children + + # sample config for service + (etc/"tremor").install "docker/config/docker.troy" => "main.troy" + + # wrapper + (bin/"tremor-wrapper").write_env_script (bin/"tremor"), TREMOR_PATH: "#{lib}/tremor-script" + end + + # demo service + service do + run [opt_bin/"tremor-wrapper", "run", etc/"tremor/main.troy"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/tremor.log" + error_log_path var/"log/tremor_error.log" + end + + test do + assert_match "tremor #{version}\n", shell_output("#{bin}/tremor --version") + + (testpath/"test.troy").write <<~EOS + define flow test + flow + use tremor::connectors; + + define pipeline capitalize + into + out, err, exit + pipeline + use std::string; + use std::time::nanos; + select string::uppercase(event) from in into out; + select {"exit": 0, "delay": nanos::from_seconds(1) } from in into exit; + end; + + define connector file_in from file + with codec="string", config={"path": "#{testpath}/in.txt", "mode": "read"} + end; + define connector file_out from file + with codec="string", config={"path": "#{testpath}/out.txt", "mode": "truncate"} + end; + + create pipeline capitalize from capitalize; + create connector input from file_in; + create connector output from file_out; + create connector exit from connectors::exit; + + connect /connector/input to /pipeline/capitalize; + connect /pipeline/capitalize to /connector/output; + connect /pipeline/capitalize/exit to /connector/exit; + end; + + deploy flow test; + EOS + + (testpath/"in.txt").write("hello") + + system bin/"tremor-wrapper", "run", testpath/"test.troy" + + assert_match(/^HELLO/, (testpath/"out.txt").readlines.first) + end +end diff --git a/Formula/t/trezor-agent.rb b/Formula/t/trezor-agent.rb new file mode 100644 index 0000000000000..15d97bbf99d31 --- /dev/null +++ b/Formula/t/trezor-agent.rb @@ -0,0 +1,326 @@ +class TrezorAgent < Formula + include Language::Python::Virtualenv + + desc "Hardware SSH/GPG agent for Trezor and Ledger" + homepage "https://github.com/romanz/trezor-agent" + # NOTE: On version bumps, check if `bleak`'s OS-specific extra_packages need to be updated. + # These are required to avoid losing resources since the packages are resolved based on native OS. + # Ref: https://github.com/hbldh/bleak/blob/develop/pyproject.toml#L28-L40 + url "https://files.pythonhosted.org/packages/11/bc/aa2bdee9cd81af9ecde0a9e8b5c6c6594a4a0ee7ade950b51a39d54f9e63/trezor_agent-0.12.0.tar.gz" + sha256 "e08ca5a54bd7658017164c8518d6cdf623d3b077dfdccfd12f612af5fef05855" + license "LGPL-3.0-only" + revision 7 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "eacf3b2cc29eb355e0e86ba40df6005aa8f1aa8e39419500a22cc2b557377773" + sha256 cellar: :any, arm64_sequoia: "73a1579e72b264ebd779ecf359d286aecb62319983c451bc8eb7aa7c3c0a0ef0" + sha256 cellar: :any, arm64_sonoma: "37527d676d0ed75edf43729ca9b40c27cdeadd9d90145777377eb1457b819942" + sha256 cellar: :any, sonoma: "4731593bbf393c868553a5209027a4503263b557e7806cdbcf50d9103d0cf835" + sha256 cellar: :any_skip_relocation, arm64_linux: "d502901f599f98daae8babce06856edb473691259576a0184ffb29f2cf0d0ba0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "822b6ca6e8131a09891ff37fe50f61eb437f44f2a3b58661e54c2957a0c58654" + end + + depends_on "pkgconf" => :build # for hidapi resource + depends_on "rust" => :build # for construct-classes + depends_on "certifi" + depends_on "cryptography" + depends_on "hidapi" + depends_on "libsodium" # for pynacl + depends_on "libusb" # for libusb1 + depends_on "pillow" + depends_on "python@3.14" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1699 + end + + pypi_packages exclude_packages: ["certifi", "cryptography", "pillow"], + extra_packages: %w[ + dbus-fast ledger-agent pyobjc-core + pyobjc-framework-CoreBluetooth pyobjc-framework-libdispatch + ] + + resource "backports-shutil-which" do + url "https://files.pythonhosted.org/packages/a0/22/51b896a4539f1bff6a7ab8514eb031b9f43f12bff23f75a4c3f4e9a666e5/backports.shutil_which-3.5.2.tar.gz" + sha256 "fe39f567cbe4fad89e8ac4dbeb23f87ef80f7fe8e829669d0221ecdb0437c133" + end + + resource "base58" do + url "https://files.pythonhosted.org/packages/7f/45/8ae61209bb9015f516102fa559a2914178da1d5868428bd86a1b4421141d/base58-2.1.1.tar.gz" + sha256 "c5d0cb3f5b6e81e8e35da5754388ddcc6d0d14b6c6a132cb93d69ed580a7278c" + end + + resource "bech32" do + url "https://files.pythonhosted.org/packages/ab/fe/b67ac9b123e25a3c1b8fc3f3c92648804516ab44215adb165284e024c43f/bech32-1.2.0.tar.gz" + sha256 "7d6db8214603bd7871fcfa6c0826ef68b85b0abd90fa21c285a9c5e21d2bd899" + end + + resource "bleak" do + url "https://files.pythonhosted.org/packages/10/88/6bb2bcb94ef7a2f37c5bd5ec99a4ae9208c4caa3fa6d203f9b601e047e64/bleak-1.1.1.tar.gz" + sha256 "eeef18053eb3bd569a25bff62cd4eb9ee56be4d84f5321023a7c4920943e6ccb" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "construct" do + url "https://files.pythonhosted.org/packages/02/77/8c84b98eca70d245a2a956452f21d57930d22ab88cbeed9290ca630cf03f/construct-2.10.70.tar.gz" + sha256 "4d2472f9684731e58cc9c56c463be63baa1447d674e0d66aeb5627b22f512c29" + end + + resource "construct-classes" do + url "https://files.pythonhosted.org/packages/75/6f/e2e98ed52e94fd9db21a7f816061e0d47fef9b13077b5a9940a7b55e0b98/construct_classes-0.2.2.tar.gz" + sha256 "c644026fef4d082fd6632efa974376d77e8be7d95e4e57a6df74407fc0954efd" + end + + resource "dbus-fast" do + url "https://files.pythonhosted.org/packages/1b/f9/3952e3514244417a33643087bc5dc134aff546606d5f66f796018cb7fdfc/dbus_fast-2.44.5.tar.gz" + sha256 "e9d738e3898e2d505d7f2d5d21949bd705d7cd3d7240dda5481bb1c5fd5e3da8" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/c0/1f/924e3caae75f471eae4b26bd13b698f6af2c44279f67af317439c2f4c46a/ecdsa-0.19.1.tar.gz" + sha256 "478cba7b62555866fcb3bb3fe985e06decbdb68ef55713c4e5ab98c57d508e61" + end + + resource "ecpy" do + url "https://files.pythonhosted.org/packages/e0/48/3f8c1a252e3a46fd04e6fabc5e11c933b9c39cf84edd4e7c906e29c23750/ECPy-1.2.5.tar.gz" + sha256 "9635cffb9b6ecf7fd7f72aea1665829ac74a1d272006d0057d45a621aae20228" + end + + resource "future" do + url "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz" + sha256 "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + end + + resource "hidapi" do + url "https://files.pythonhosted.org/packages/47/72/21ccaaca6ffb06f544afd16191425025d831c2a6d318635e9c8854070f2d/hidapi-0.14.0.post4.tar.gz" + sha256 "48fce253e526d17b663fbf9989c71c7ef7653ced5f4be65f1437c313fb3dbdf6" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "ledger-agent" do + url "https://files.pythonhosted.org/packages/a3/c9/ac7546d6168662af356493231ca8818bdf8ffd05238a68fe5085fd9e6358/ledger_agent-0.9.0.tar.gz" + sha256 "2265ba9c6a4594ff798fe480856ea36bfe6d8ae7ba2190b74f9666510530f20f" + end + + resource "ledgerblue" do + url "https://files.pythonhosted.org/packages/a9/2b/acdc7792de33a63bc723a21ff2d4350d55ad1bfd388de17a7343b251b03b/ledgerblue-0.1.55.tar.gz" + sha256 "eacd95f1c5e293a8c483ccf750ae3da95c2874f6f05cc2245a4ee227b398d2b3" + end + + resource "libagent" do + url "https://files.pythonhosted.org/packages/33/9f/d80eb0568f617d4041fd83b8b301fdb817290503ee4c1546024df916454e/libagent-0.15.0.tar.gz" + sha256 "c87caebdb932ed42bcd8a8cbe40ce3589587c71c3513ca79cadf7a040e24b4eb" + + # Backport replacement of pkg_resources to fix issue seen on arm64 linux + patch do + url "https://github.com/romanz/trezor-agent/commit/68e39c14216f466c8710bf65ef133c744f8f92da.patch?full_index=1" + sha256 "a2b2279ba0eaf7a11d2a2e1f79155829bc8939942848b01602062f6c269b68b0" + end + end + + resource "libusb1" do + url "https://files.pythonhosted.org/packages/a2/7f/c59ad56d1bca8fa4321d1bb77ba4687775751a4deceec14943a44da18ca0/libusb1-3.3.1.tar.gz" + sha256 "3951d360f2daf0e0eacf839e15d2d1d2f4f5e7830231eb3188eeffef2dd17bad" + end + + resource "lockfile" do + url "https://files.pythonhosted.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz" + sha256 "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799" + end + + resource "mnemonic" do + url "https://files.pythonhosted.org/packages/ff/77/e6232ed59fbd7b90208bb8d4f89ed5aabcf30a524bc2fb8f0dafbe8e7df9/mnemonic-0.21.tar.gz" + sha256 "1fe496356820984f45559b1540c80ff10de448368929b9c60a2b55744cc88acf" + end + + resource "ndeflib" do + url "https://files.pythonhosted.org/packages/58/f8/cd11ec90bd6a6bcf35bb80e4e29fdebe8bf2b05e869a93ca1e41d85518d0/ndeflib-0.3.3.tar.gz" + sha256 "1d56828558b9b16f2822a4051824346347b66adf5320ea86070748b6f2454a88" + end + + resource "nfcpy" do + url "https://files.pythonhosted.org/packages/38/a2/cce3ab796e84bea5098c4231ff56e523cb182c58a21280ccff0d75e693e6/nfcpy-1.0.4.tar.gz" + sha256 "e5bd08d0119e1d9e95d05215f838b07b44d03b651adddc523cc1a38892b8af6b" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/fa/a4/cc17347aa2897568beece2e674674359f911d6fe21b0b8d6268cd42727ac/protobuf-6.32.1.tar.gz" + sha256 "ee2469e4a021474ab9baafea6cd070e5bf27c7d29433504ddea1a4ee5850f68d" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz" + sha256 "447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pydes" do + url "https://files.pythonhosted.org/packages/92/5e/0075a35ea5d307a182b0963900298b209ea2f363ccdd5a27e8cb04c58410/pyDes-2.0.1.tar.gz" + sha256 "e2ab8e21d2b83e90d90dbfdcb6fb8ac0000b813238b7ecaede04f8435c389012" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/b9/ab/33968940b2deb3d92f5b146bc6d4009a5f95d1d06c148ea2f9ee965071af/pyelftools-0.32.tar.gz" + sha256 "6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5" + end + + resource "pymsgbox" do + url "https://files.pythonhosted.org/packages/ae/6a/e80da7594ee598a776972d09e2813df2b06b3bc29218f440631dfa7c78a8/pymsgbox-2.0.1.tar.gz" + sha256 "98d055c49a511dcc10fa08c3043e7102d468f5e4b3a83c6d3c61df722c7d798d" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/06/c6/a3124dee667a423f2c637cfd262a54d67d8ccf3e160f3c50f622a85b7723/pynacl-1.6.0.tar.gz" + sha256 "cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/e8/e9/0b85c81e2b441267bca707b5d89f56c2f02578ef8f3eafddf0e0c0b8848c/pyobjc_core-11.1.tar.gz" + sha256 "b63d4d90c5df7e762f34739b39cc55bc63dbcf9fb2fb3f2671e528488c7a87fe" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/4b/c5/7a866d24bc026f79239b74d05e2cf3088b03263da66d53d1b4cf5207f5ae/pyobjc_framework_cocoa-11.1.tar.gz" + sha256 "87df76b9b73e7ca699a828ff112564b59251bb9bbe72e610e670a4dc9940d038" + end + + resource "pyobjc-framework-corebluetooth" do + url "https://files.pythonhosted.org/packages/3d/fe/2081dfd9413b7b4d719935c33762fbed9cce9dc06430f322d1e2c9dbcd91/pyobjc_framework_corebluetooth-11.1.tar.gz" + sha256 "1deba46e3fcaf5e1c314f4bbafb77d9fe49ec248c493ad00d8aff2df212d6190" + end + + resource "pyobjc-framework-libdispatch" do + url "https://files.pythonhosted.org/packages/be/89/7830c293ba71feb086cb1551455757f26a7e2abd12f360d375aae32a4d7d/pyobjc_framework_libdispatch-11.1.tar.gz" + sha256 "11a704e50a0b7dbfb01552b7d686473ffa63b5254100fdb271a1fe368dd08e87" + end + + resource "pyserial" do + url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" + sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" + end + + resource "python-daemon" do + url "https://files.pythonhosted.org/packages/3d/37/4f10e37bdabc058a32989da2daf29e57dc59dbc5395497f3d36d5f5e2694/python_daemon-3.1.2.tar.gz" + sha256 "f7b04335adc473de877f5117e26d5f1142f4c9f7cd765408f0877757be5afbf4" + end + + resource "python-gnupg" do + url "https://files.pythonhosted.org/packages/42/d0/72a14a79f26c6119b281f6ccc475a787432ef155560278e60df97ce68a86/python-gnupg-0.5.5.tar.gz" + sha256 "3fdcaf76f60a1b948ff8e37dc398d03cf9ce7427065d583082b92da7a4ff5a63" + end + + resource "python-u2flib-host" do + url "https://files.pythonhosted.org/packages/4d/3d/0997fe8196f5be24b7015708a0744a0ef928c4fb3c8bc820dc3328208ef2/python-u2flib-host-3.0.3.tar.gz" + sha256 "ab678b9dc29466a779efcaa2f0150dce35059a7d17680fc26057fa599a53fc0a" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shamir-mnemonic" do + url "https://files.pythonhosted.org/packages/b2/fd/9f5b305b5280795209817efe6b0cd6017f4714e3f36d160b2d4dfcc78c02/shamir_mnemonic-0.3.0.tar.gz" + sha256 "bc04886a1ddfe2a64d8a3ec51abf0f664d98d5b557cc7e78a8ad2d10a1d87438" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "slip10" do + url "https://files.pythonhosted.org/packages/7b/30/6ba9170f06c61f82b4f66bacefd13819a295798f959027a0600211d8f7ad/slip10-1.0.1.tar.gz" + sha256 "02b350ae557b591791428b17551f95d7ac57e9211f37debdc814c90b4a123a54" + end + + resource "trezor" do + url "https://files.pythonhosted.org/packages/c2/11/bd2ff7f6ff07cdd739b27de64398e9772ceaef59e0ee1341f4bb4a571794/trezor-0.13.10.tar.gz" + sha256 "7a0b6ae4628dd0c31a5ceb51258918d9bbdd3ad851388837225826b228ee504f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/2c/41/aa4bf9664e4cda14c3b39865b12251e8e7d239f4cd0e3cc1b6c2ccde25c1/websocket_client-1.9.0.tar.gz" + sha256 "9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + def install + without = if OS.mac? + # needed for pyobjc-core "-fdisable-block-signature-string" + ENV.llvm_clang if DevelopmentTools.clang_build_version <= 1699 + + # Help `pyobjc-framework-cocoa` pick correct SDK after removing -isysroot from Python formula + ENV.append_to_cflags "-isysroot #{MacOS.sdk_path}" + ["dbus-fast"] + else + resources.filter_map { |r| r.name if r.name.start_with?("pyobjc") } + end + virtualenv_install_with_resources(without:) + end + + test do + output = shell_output("#{bin}/trezor-agent identity@myhost 2>&1", 1) + assert_match "Trezor not connected", output + + # Check versions of resources as resolver may not pick correct versions of non-OS extra packages + system libexec/"bin/python", "-m", "pip", "check" + end +end diff --git a/Formula/t/trezor-bridge.rb b/Formula/t/trezor-bridge.rb new file mode 100644 index 0000000000000..6ffdfa1637075 --- /dev/null +++ b/Formula/t/trezor-bridge.rb @@ -0,0 +1,64 @@ +class TrezorBridge < Formula + desc "Trezor Communication Daemon" + homepage "https://github.com/trezor/trezord-go" + url "https://github.com/trezor/trezord-go.git", + tag: "v2.0.33", + revision: "2680d5e6f7b02f06aefac1c2a9fef2c6052685de" + license "LGPL-3.0-only" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "571d4d50ac297d3cbf185c383d7e9dce39043801ebef303bd63b5a07bf819777" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "026eae2c42ba181bbb882176d03e3592558cb7d2d946d3de7c1766c30dd4fdce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ed7f24a07138a009a6ae6f962138c0ea9bee316ebe730b534ba072140b48629" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c207cb9221f8c6ce8e813200cc98bd0cca5dd3e29e85e5ece6c74b0dce071db7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "34ad3a642fda0faf46777da05d3a0deb9f691e4a0bf60a4db5da213c2b1e413a" + sha256 cellar: :any_skip_relocation, sonoma: "55eab81dca886c7fcb19eef1859d7166a3db6a4a24c1bcfae2b49829af8c45f2" + sha256 cellar: :any_skip_relocation, ventura: "5f6906f339f0c85c6d048aff26fa7a87adea4e87b8e262f54dd482e7d31231fc" + sha256 cellar: :any_skip_relocation, monterey: "3c19a0c1ec5d0ede24e8178c9a8e79fa7777e266ce9a941fdbdc5fc7abd4f6d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1e934f0f4c538d7a228bcdf430b1f97df1c8e469e9cd685f8cfec93dd18334d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0039559d527cb2841e04cff9bb7bc59b6db17f6f74f442768af8a81776ccacd9" + end + + depends_on "go" => :build + + # upstream patch ref, https://github.com/trezor/trezord-go/pull/300 + patch do + url "https://github.com/trezor/trezord-go/commit/318b01237604256b1a561b2fa57826aa0ebb218d.patch?full_index=1" + sha256 "b48d0026281814f9a6a8cac48b701db741391d285867593b4ce272e70aff229a" + end + + # Fix build with go 1.24 + patch do + url "https://github.com/trezor/trezord-go/commit/8ca9600d176bebf6cd2ad93ee9525a04059ee735.patch?full_index=1" + sha256 "3eaa5c4bcc09a931e2c07ca7a6183346ee07ca5cf98e75a0ee237677e3269a7d" + end + + def install + system "go", "build", *std_go_args(output: bin/"trezord-go", ldflags: "-s -w") + end + + service do + run opt_bin/"trezord-go" + keep_alive true + require_root true + working_dir HOMEBREW_PREFIX + end + + test do + # start the server with the USB disabled and enable UDP interface instead + server = IO.popen("#{bin}/trezord-go -u=false -e 21324") + sleep 1 + + output = shell_output("curl -s -X POST -H 'Origin: https://test.trezor.io' http://localhost:21325/") + assert_equal version.to_s, JSON.parse(output)["version"] + + assert_match "[]", + shell_output("curl -s -X POST -H 'Origin: https://test.trezor.io' http://localhost:21325/enumerate") + ensure + Process.kill("SIGINT", server.pid) + Process.wait(server.pid) + end +end diff --git a/Formula/t/triangle.rb b/Formula/t/triangle.rb new file mode 100644 index 0000000000000..87b380ef27203 --- /dev/null +++ b/Formula/t/triangle.rb @@ -0,0 +1,34 @@ +class Triangle < Formula + desc "Convert images to computer generated art using Delaunay triangulation" + homepage "https://github.com/esimov/triangle" + url "https://github.com/esimov/triangle/archive/refs/tags/v2.0.0.tar.gz" + sha256 "071ba2a39b62e7914a233af74e7935ddb7a875bc2a5f193cd43862da65b1c516" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fc82e8afee9b3ce6d620eeb7beb96c1789560d5228a7511f738c68341e4b4214" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d0f61e1189f94030e6d58917a972b58ed3097fddabc1d7b81d2c6261af44e7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "213bc5484b8bb951fcaae1220b5bddc4a042540f9db6da9884ef101a5cb9b8cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f567dea995e69a581eaf1b78d288c8193dfdb4068e8114f80794e7eadf4e108a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a5c72d8022b7c7bc20511f07ff9f8dcd9637bffe596554ca7a9671dda8e713e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7a6c8a7b7499e2b4d22c1fcb903545a7602c5762bc4b86f84fcd2c238f18c2ad" + sha256 cellar: :any_skip_relocation, sonoma: "b19fb41b35bcfd2afb20cedca877cb42dd165e93ff3076b7832954c4a2ed8cb7" + sha256 cellar: :any_skip_relocation, ventura: "6adfa73341672560f138bfefd050ffaefb400151b293d68af8c146e9382f739b" + sha256 cellar: :any_skip_relocation, monterey: "6044828f80d3b03acad78089a4a0608512f6aa0a1316b181d76da12aa098da0d" + sha256 cellar: :any_skip_relocation, big_sur: "777c1ba9464e94d016028f2892e9e50e95d4b41817fda1fecc67c8caab029bbf" + sha256 cellar: :any_skip_relocation, catalina: "59397ab86cef290c6ce4b9c3d3bda0f89997d3cf5017b83b46575a7407a4a316" + sha256 cellar: :any_skip_relocation, arm64_linux: "183396419c6ca77cf3ce28777ecf0575734beb1e02a6c6f63f02b2b13077eee2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93ce74ef95c2f4cb8ea2c3ece364712611680fd719884f1efbfdca4e0198784f" + end + + depends_on "go" => :build + + def install + system "go", "build", "-mod=vendor", *std_go_args(ldflags: "-s -w"), "./cmd/triangle" + end + + test do + system bin/"triangle", "-in", test_fixtures("test.png"), "-out", "out.png" + assert_path_exists testpath/"out.png" + end +end diff --git a/Formula/t/trimal.rb b/Formula/t/trimal.rb new file mode 100644 index 0000000000000..a443768c7ec57 --- /dev/null +++ b/Formula/t/trimal.rb @@ -0,0 +1,37 @@ +class Trimal < Formula + desc "Automated alignment trimming in large-scale phylogenetic analyses" + homepage "https://trimal.readthedocs.io/" + url "https://github.com/inab/trimal/archive/refs/tags/v1.5.0.tar.gz" + sha256 "3fba2e07bffb7290c34e713a052d0f0ff1ce0792861740a8cec46f40685c6d73" + license "GPL-3.0-only" + head "https://github.com/inab/trimal.git", branch: "trimAl" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e6b8f43f9bf10254985da1367d4016fa241b2dce9227d727475738c42f667978" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7601f4fa41f4b2c49221fcfd10680dae2d7ba2ecf7b118ada2626df50b3dfe56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d9046969829e57b325ddb627977fccaf33ec9b3b9dd17fdd1acec4c45af0ed7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a64b8c35e66ccd823b1778665bebc09a42c5d630897591c18fd8b50b68f9ec6" + sha256 cellar: :any_skip_relocation, sonoma: "6b995bc17baddfea2602992cf14f32151e5e96967fe64d4fb75b11529b47f54c" + sha256 cellar: :any_skip_relocation, ventura: "c08772fe873d74045bb407315005b425aff589897efa1e76bd505c7e78d6200e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7c0979024f0c970c93afe487233d6847fc182f23f00e8a89a88eca999a318ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbdf2569d36a67e7381636245466bc4747821e04db83d1c6883b9a632920054f" + end + + def install + cd "source" do + system "make" + bin.install "readal", "trimal", "statal" + end + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + system bin/"trimal", "-in", "test.fasta", "-out", "out.fasta" + assert_path_exists "out.fasta" + end +end diff --git a/Formula/t/trino.rb b/Formula/t/trino.rb new file mode 100644 index 0000000000000..01699f829823d --- /dev/null +++ b/Formula/t/trino.rb @@ -0,0 +1,156 @@ +class Trino < Formula + include Language::Python::Shebang + + desc "Distributed SQL query engine for big data" + homepage "https://trino.io" + url "https://search.maven.org/remotecontent?filepath=io/trino/trino-server/476/trino-server-476.tar.gz" + sha256 "cfd5accde17e8ebd251eeeb78aed1f490e77bb3a164d95a0f454bf8a7c1cbd3f" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=io/trino/trino-server/" + regex(%r{href=["']?v?(\d+(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1ad827af910e6a5db71563892c1a9a407730605e266c500734ea4444a584d24f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9caf9aa709b5d188d268df9aafc60487021b6e8b30c27b4f93a5172a47df134d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9caf9aa709b5d188d268df9aafc60487021b6e8b30c27b4f93a5172a47df134d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9caf9aa709b5d188d268df9aafc60487021b6e8b30c27b4f93a5172a47df134d" + sha256 cellar: :any_skip_relocation, sonoma: "1f78192a519c995d1c42f31229b277281a5072e347bef52164e5032eadb1726f" + sha256 cellar: :any_skip_relocation, ventura: "1f78192a519c995d1c42f31229b277281a5072e347bef52164e5032eadb1726f" + sha256 cellar: :any_skip_relocation, arm64_linux: "fac2e33c3fd34fb992cb5007183e77ee93c723fc8d3d1f057095f67e8bb10505" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98801d4ca23627319d3a02e7328760df5e9d1ea688c80c259f3fe654c5918360" + end + + depends_on "go" => :build + depends_on "openjdk" + + resource "trino-src" do + url "https://github.com/trinodb/trino/archive/refs/tags/476.tar.gz" + sha256 "5a288d90f02858131387a93e9c221bed77849073fb107e6cdf0a74945ee33cbe" + + livecheck do + formula :parent + end + end + + resource "trino-cli" do + url "https://search.maven.org/remotecontent?filepath=io/trino/trino-cli/476/trino-cli-476-executable.jar" + sha256 "fe4e9c7fb569cd67673afa1622945f6308e1e59bdb825419352b80887661757b" + + livecheck do + formula :parent + end + end + + # `brew livecheck --autobump --resources trino` should show the launcher version which is found by + # getting airbase version at https://github.com/trinodb/trino/blob/#{version}/pom.xml#L8 and then + # dep.launcher.version at https://github.com/airlift/airbase/blob//airbase/pom.xml#L225 + resource "launcher" do + url "https://github.com/airlift/launcher/archive/refs/tags/304.tar.gz" + sha256 "4afd1ed339c64bccab54421c01317665364a5e71dec20fb6b7b2f60281f1b344" + + livecheck do + url "https://raw.githubusercontent.com/trinodb/trino/refs/tags/#{LATEST_VERSION}/pom.xml" + regex(%r{airbase\s*(\d+(?:\.\d+)*)}i) + strategy :page_match do |page, regex| + airbase_version = page[regex, 1] + next if airbase_version.blank? + + get_airbase_page = Homebrew::Livecheck::Strategy.page_content( + "https://raw.githubusercontent.com/airlift/airbase/refs/tags/#{airbase_version}/airbase/pom.xml", + ) + next if get_airbase_page[:content].blank? + + get_airbase_page[:content][%r{(\d+(?:\.\d+)*)}i, 1] + end + end + end + + resource "procname" do + on_linux do + url "https://github.com/airlift/procname/archive/c75422ec5950861852570a90df56551991399d8c.tar.gz" + sha256 "95b04f7525f041c1fa651af01dced18c4e9fb68684fb21a298684e56eee53f48" + end + end + + def install + odie "trino-src resource needs to be updated" if version != resource("trino-src").version + odie "trino-cli resource needs to be updated" if version != resource("trino-cli").version + + # Workaround for https://github.com/airlift/launcher/issues/8 + inreplace "bin/launcher", 'case "$(arch)" in', 'case "$(uname -m)" in' if OS.mac? && Hardware::CPU.intel? + + # Replace pre-build binaries + rm_r(Dir["bin/{darwin,linux}-*"]) + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + platform_dir = buildpath/"bin/#{OS.kernel_name.downcase}-#{arch}" + resource("launcher").stage do |r| + ldflags = "-s -w -X launcher/args.Version=#{r.version}" + system "go", "build", "-C", "src/main/go", *std_go_args(ldflags:, output: platform_dir/"launcher") + end + if OS.linux? + resource("procname").stage do + system "make" + platform_dir.install "libprocname.so" + end + end + + libexec.install Dir["*"] + libexec.install resource("trino-cli") + bin.write_jar_script libexec/"trino-cli-#{version}-executable.jar", "trino" + (bin/"trino-server").write_env_script libexec/"bin/launcher", Language::Java.overridable_java_home_env + + resource("trino-src").stage do + (libexec/"etc").install Dir["core/docker/default/etc/*"] + inreplace libexec/"etc/node.properties", "docker", tap.user.downcase + inreplace libexec/"etc/node.properties", "/data/trino", var/"trino/data" + inreplace libexec/"etc/jvm.config", %r{^-agentpath:/usr/lib/trino/bin/libjvmkill.so$\n}, "" + end + + # Work around OpenJDK / Apple (FB12076992) issue causing crashes with brew-built OpenJDK. + # TODO: May want to look into privileges/signing as this doesn't happen on casks like Temurin & Zulu + # + # Ref: https://github.com/trinodb/trino/issues/18983#issuecomment-1794206475 + # Ref: https://bugs.openjdk.org/browse/CODETOOLS-7903447 + (libexec/"etc/jvm.config").append_lines <<~CONFIG if OS.mac? + # https://bugs.openjdk.org/browse/CODETOOLS-7903447 + -Djol.skipHotspotSAAttach=true + CONFIG + end + + def post_install + (var/"trino/data").mkpath + end + + service do + run [opt_bin/"trino-server", "run"] + working_dir opt_libexec + end + + test do + assert_match version.to_s, shell_output("#{bin}/trino --version") + + ENV["CATALOG_MANAGEMENT"] = "static" + port = free_port + cp libexec/"etc/config.properties", testpath/"config.properties" + inreplace testpath/"config.properties", "8080", port.to_s + server = spawn bin/"trino-server", "run", "--verbose", + "--data-dir", testpath, + "--config", testpath/"config.properties" + sleep 30 + sleep 30 if OS.mac? && Hardware::CPU.intel? + + query = "SELECT state FROM system.runtime.nodes" + output = shell_output("#{bin}/trino --debug --server localhost:#{port} --execute '#{query}'") + assert_match '"active"', output + ensure + Process.kill("TERM", server) + begin + Process.wait(server) + rescue Errno::ECHILD + quiet_system "pkill", "-9", "-P", server.to_s + end + end +end diff --git a/Formula/t/trippy.rb b/Formula/t/trippy.rb new file mode 100644 index 0000000000000..71f37b7363da6 --- /dev/null +++ b/Formula/t/trippy.rb @@ -0,0 +1,36 @@ +class Trippy < Formula + desc "Network diagnostic tool, inspired by mtr" + homepage "https://trippy.rs/" + url "https://github.com/fujiapple852/trippy/archive/refs/tags/0.13.0.tar.gz" + sha256 "72e598d2e0b947e8bc46706021c511f169b7e7634a734c326e492e0f30725c35" + license "Apache-2.0" + head "https://github.com/fujiapple852/trippy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "43b6f631c8a293fc7afa5b9f2752bb95b46beef7ee132d185c4e2a7b13caf570" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5aa029604d2f1edc732e6c8fd9ccebe1e1c1d1b230b5fa2a176aa0fed0eb00aa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18d09726f789d0018dbc2bad3b2e3113e218bd83c1925cde652c2659d2e5a7ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cac5f223c373ab5e005d9f8d7cd83d4b592c1b0f9654ee900b5fce957d12e914" + sha256 cellar: :any_skip_relocation, sonoma: "488a25a98d18e87bc3ffcacc8e22f2f1cb8c087bb714dfef5a20fb4a6df3e8ba" + sha256 cellar: :any_skip_relocation, ventura: "3fee54d51f08db8f3768ccc174fd827e0aa650c1634a7ffccb5208aa97a5742e" + sha256 cellar: :any_skip_relocation, arm64_linux: "36282bf41fbc68b6fdb67dc6dd604573d24d2a3805db6c1d500a9d3d12428334" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c67898cd0f8db4cf94b36fdd02b59434b2f8092d4a0d31f9608202ef67fd62a0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/trippy") + + generate_completions_from_executable(bin/"trip", "--generate") + end + + test do + # https://github.com/fujiapple852/trippy#privileges + expected = "Error: privileges are required" + output = shell_output("#{bin}/trip brew.sh 2>&1", 1) + assert_match expected, output + + assert_match "trip #{version}", shell_output("#{bin}/trip --version") + end +end diff --git a/Formula/t/triton.rb b/Formula/t/triton.rb new file mode 100644 index 0000000000000..36ca4ffaeaebe --- /dev/null +++ b/Formula/t/triton.rb @@ -0,0 +1,36 @@ +class Triton < Formula + desc "Joyent Triton CLI" + homepage "https://www.npmjs.com/package/triton" + url "https://registry.npmjs.org/triton/-/triton-7.17.0.tgz" + sha256 "00792c7668da5fc711e79cce1ee130e3e4adf5696a622b995f7b2a4127a4dc7f" + license "MPL-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4439edefa94f5a68416fe607c2348093afb67d8e3ff93fbacfe37c150513525d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ebb4e410777f4fd73d5b2d9e053f6406cd7f35df730e884e73414e7980316b99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "335c7ce7476abb0b30ec27480b0eb18e60d11771ee0bed1baa90ecfe79949d0d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b5d51a665b609e9e1a536e91ffc13930f695cc96265b2905e15804760f4cf8e8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "04be8789f7840d7b88ef1402e3ed3e686e5c5e115bbaa90b46633b47ba4750bb" + sha256 cellar: :any_skip_relocation, sonoma: "2d149dcabb4fe72ca676257c3f21cd6d04cdb03fae0fc279e2ad2cb430dc916e" + sha256 cellar: :any_skip_relocation, ventura: "1cfc86cf1a4166d848d6e6dcc2c8a64ed89a2cbc8f15f2136b6396c7877b8cd1" + sha256 cellar: :any_skip_relocation, monterey: "61eda1b0dc67fa27004de110b8ec47d4d0702bfa5f0b7d4499155a897f62d513" + sha256 cellar: :any_skip_relocation, arm64_linux: "d05854619c01c03c774facc77e0b54bf7dbc083236343688def51272cc225812" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46eee957ebc27472822c184984ab5534641818668b31408a135d5709f7295789" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + generate_completions_from_executable(bin/"triton", "completion", shells: [:bash]) + end + + test do + output = shell_output("#{bin}/triton profile ls") + assert_match(/\ANAME CURR ACCOUNT USER URL$/, output) + end +end diff --git a/Formula/t/trivy.rb b/Formula/t/trivy.rb new file mode 100644 index 0000000000000..b9f63dcf5a503 --- /dev/null +++ b/Formula/t/trivy.rb @@ -0,0 +1,39 @@ +class Trivy < Formula + desc "Vulnerability scanner for container images, file systems, and Git repos" + homepage "https://trivy.dev/" + url "https://github.com/aquasecurity/trivy/archive/refs/tags/v0.67.2.tar.gz" + sha256 "280ff8cfb17d05d6b4d1b07bdd3cd26971032301bedb3b800a14886e64ce75eb" + license "Apache-2.0" + head "https://github.com/aquasecurity/trivy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3e4550b452792c7ca30d2ed141ecd202ef113bcffd2f52e79e943bed1c48b9bd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "daa85678f139297e0ec1249403372aa59ab2e8593890e9134649a2bfae75e931" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf5ddffdadebb255c7ba54462bffd33f6f0e052ea6d299f88eb57b4931126b51" + sha256 cellar: :any_skip_relocation, sonoma: "10e5532199afb1b19840e3d1fca95f6bedcca5d001d6bb2877f220643cf01cd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "5001081ee01f4f9487e9d12913c413443b4ad9edc184b6b12643c901e706c9b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc75dd8d6a957b1ad25f50e072c39f4d7a377219e183e4198c8edcfc86c201a4" + end + + depends_on "go" => :build + + def install + ENV["GOEXPERIMENT"] = "jsonv2" + + ldflags = %W[ + -s -w + -X github.com/aquasecurity/trivy/pkg/version/app.ver=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/trivy" + (pkgshare/"templates").install Dir["contrib/*.tpl"] + + generate_completions_from_executable(bin/"trivy", "completion") + end + + test do + output = shell_output("#{bin}/trivy image alpine:3.10") + assert_match(/\(UNKNOWN: \d+, LOW: \d+, MEDIUM: \d+, HIGH: \d+, CRITICAL: \d+\)/, output) + + assert_match version.to_s, shell_output("#{bin}/trivy --version") + end +end diff --git a/Formula/t/trojan-go.rb b/Formula/t/trojan-go.rb new file mode 100644 index 0000000000000..a8bbe25754a66 --- /dev/null +++ b/Formula/t/trojan-go.rb @@ -0,0 +1,164 @@ +class TrojanGo < Formula + desc "Trojan proxy in Go" + homepage "https://p4gefau1t.github.io/trojan-go/" + url "https://github.com/p4gefau1t/trojan-go.git", + tag: "v0.10.6", + revision: "2dc60f52e79ff8b910e78e444f1e80678e936450" + license "GPL-3.0-only" + head "https://github.com/p4gefau1t/trojan-go.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e5ff7287bf3913b64c7f3a691df6229bd4a2dbb5f44d46e73ce1b36b968bfdc2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5ff7287bf3913b64c7f3a691df6229bd4a2dbb5f44d46e73ce1b36b968bfdc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5ff7287bf3913b64c7f3a691df6229bd4a2dbb5f44d46e73ce1b36b968bfdc2" + sha256 cellar: :any_skip_relocation, sonoma: "aef59484731100b7a80263353a251ad5c33281f0f3ce0fe4c3c427f42aaa3867" + sha256 cellar: :any_skip_relocation, arm64_linux: "3546d218a396d0ce42976b0593c71f4cd48f0edd81b0e2ba1dde4d3cd15e4004" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d15ceba20c4d223f29bcb8daa59d4e045a089cfdd49c10a9a98dd770565d6fc" + end + + depends_on "go" => :build + + resource "geoip" do + url "https://github.com/v2fly/geoip/releases/download/202509050142/geoip.dat" + sha256 "a01e09150b456cb2f3819d29d6e6c34572420aaee3ff9ef23977c4e9596c20ec" + end + + resource "geoip-only-cn-private" do + url "https://github.com/v2fly/geoip/releases/download/202509050142/geoip-only-cn-private.dat" + sha256 "845483083b4a7a82087d4293e8a190239ae79698012c1a973baac1156f91c4c2" + end + + resource "geosite" do + url "https://github.com/v2fly/domain-list-community/releases/download/20250906011216/dlc.dat" + sha256 "186158b6c2f67ac59e184ed997ebebcef31938be9874eb8a7d5e3854187f4e8d" + end + + def install + execpath = libexec/name + ldflags = %W[ + -s -w + -X github.com/p4gefau1t/trojan-go/constant.Version=v#{version} + -X github.com/p4gefau1t/trojan-go/constant.Commit=#{Utils.git_head} + ] + + system "go", "build", *std_go_args(ldflags:, tags: "full"), "-o", execpath + (bin/"trojan-go").write_env_script execpath, + TROJAN_GO_LOCATION_ASSET: "${TROJAN_GO_LOCATION_ASSET:-#{pkgshare}}" + + pkgetc.install "example/client.json" => "config.json" + + resource("geoip").stage do + pkgshare.install "geoip.dat" + end + + resource("geoip-only-cn-private").stage do + pkgshare.install "geoip-only-cn-private.dat" + end + + resource("geosite").stage do + pkgshare.install "dlc.dat" => "geosite.dat" + end + end + + def caveats + <<~EOS + An example config is installed to #{etc}/trojan-go/config.json + EOS + end + + service do + run [opt_bin/"trojan-go", "-config", etc/"trojan-go/config.json"] + run_type :immediate + keep_alive true + end + + test do + (testpath/"test.crt").write <<~EOS + -----BEGIN CERTIFICATE----- + MIIBuzCCASQCCQDC8CtpZ04+pTANBgkqhkiG9w0BAQsFADAhMQswCQYDVQQGEwJV + UzESMBAGA1UEAwwJbG9jYWxob3N0MCAXDTIxMDUxMDE0MjEwNFoYDzIxMjEwNDE2 + MTQyMTA0WjAhMQswCQYDVQQGEwJVUzESMBAGA1UEAwwJbG9jYWxob3N0MIGfMA0G + CSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8VJ+Gv2BRZajCUJ8LxGCGopO6w27xvwLu + U0ztdJibWCUUYxGk7IDnhnarbpD18CnZ0bqqUvu/gn1Lod5rHUuDdh2KdMefiugR + bu1jtKxi25kKfd+12nqph7dI9iuenroHUi5SBxCCKEQSo528/2QIeltTtBASNiKB + CBjdIu0wjwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBAGm7Lrhd7ZP91d7ezBLQZ3L/ + xciCZUmm6DcMfGgel13aI8keYID5LPUoIJ8X3uoOu2SV7r4G53mJKtyyqUKfbMBG + DSq4rm8g2L9r5LdVYQFcvJjJxHGLMOvZUvm7NiQH1/zd73nHYhu+0yravaUkywEl + fhs+mOABareCK+xi+YT0 + -----END CERTIFICATE----- + EOS + (testpath/"test.key").write <<~EOS + -----BEGIN PRIVATE KEY----- + MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALxUn4a/YFFlqMJQ + nwvEYIaik7rDbvG/Au5TTO10mJtYJRRjEaTsgOeGdqtukPXwKdnRuqpS+7+CfUuh + 3msdS4N2HYp0x5+K6BFu7WO0rGLbmQp937XaeqmHt0j2K56eugdSLlIHEIIoRBKj + nbz/ZAh6W1O0EBI2IoEIGN0i7TCPAgMBAAECgYBRusO0PW82Q9DV6xjqiWF+bCWC + QnfuL3+9H6dd0WC84abNzySEFyLl1wO+5+++22e+IHdKnVKlTKLFZMzaXU88UJjG + WwQdKhLPw4MvVsPNwFtDlP+EyKfzKHlQ5PAhPjw5Hz1isE2b98JNqMbj0QMZqpES + hm391fmfk8QPBPsLyQJBAPpWUOfJcQUC1bh0qF/XatLmg6A4DEHyhbZq/kehcvZK + zes71uzcW1NuzDE3ahbv3IFy5UOWWWiPXD1Dp/iGBYUCQQDAlzs+rd9Uaqq4ZfdA + iH2wkUub+2kcRi59MlH9B22Wb+VmWTqcwwhVFlKB8to/0bIsK+cae8D1VBYLhuZu + yKADAkEAzxrYBlrOiPHGdLr2jYv/UYnpvYSBB5In8znjMsmr/Xz3jTRNZFoNqCHT + BqisuVspl2LBr7/UKj/odLrjXSUrrQJAUIuvQnKTcYm+5qn2c23iK0NI/O5zsliD + vuaZtZoysfUQWvK8ea1zwao5TZHUx1YbDzA5UjEprTDCm4WKwBB2IwJBANbtLRvS + CsWbp+cEK+zSllqBhvlJQUf2DNQRGHsItbq1dbqNA3xF1WWh6IQSevN4M1exdBLa + OOqlfB3Fyb6Mld0= + -----END PRIVATE KEY----- + EOS + + http_server_port = free_port + fork do + server = TCPServer.new(http_server_port) + loop do + socket = server.accept + socket.write "HTTP/1.1 200 OK\r\n" \ + "Content-Type: text/plain; charset=utf-8\r\n" \ + "Content-Length: 0\r\n" \ + "\r\n" + socket.close + end + end + + trojan_go_server_port = free_port + (testpath/"server.yaml").write <<~YAML + run-type: server + local-addr: 127.0.0.1 + local-port: #{trojan_go_server_port} + remote-addr: 127.0.0.1 + remote-port: #{http_server_port} + password: + - test + ssl: + cert: #{testpath}/test.crt + key: #{testpath}/test.key + YAML + server = fork { exec bin/"trojan-go", "-config", testpath/"server.yaml" } + + trojan_go_client_port = free_port + (testpath/"client.yaml").write <<~YAML + run-type: client + local-addr: 127.0.0.1 + local-port: #{trojan_go_client_port} + remote-addr: 127.0.0.1 + remote-port: #{trojan_go_server_port} + password: + - test + ssl: + verify: false + sni: localhost + YAML + client = fork { exec bin/"trojan-go", "-config", testpath/"client.yaml" } + + sleep 3 + begin + output = shell_output("curl --socks5 127.0.0.1:#{trojan_go_client_port} example.com") + assert_match "Example Domain", output + ensure + Process.kill 9, server + Process.wait server + Process.kill 9, client + Process.wait client + end + end +end diff --git a/Formula/t/truecrack.rb b/Formula/t/truecrack.rb new file mode 100644 index 0000000000000..2fcaa31265046 --- /dev/null +++ b/Formula/t/truecrack.rb @@ -0,0 +1,60 @@ +class Truecrack < Formula + desc "Brute-force password cracker for TrueCrypt" + homepage "https://github.com/lvaccaro/truecrack" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/truecrack/truecrack_v35.tar.gz" + version "3.5" + sha256 "25bf270fa3bc3591c3d795e5a4b0842f6581f76c0b5d17c0aef260246fe726b3" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fa006f2b40a1844949c625ee3ded3b0626420c1969b7595b5081ba471a8ce234" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f14ab900548cbe7d0b0f713604d6d63a7c41874e9d73d36f9aa0ff36ab58af33" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c14111bcb0920f73fa1af5ed3daed97cb19152ea38aa9583a75c5c9a05b47d81" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dec2443fbc84baf2fddd59c65666390b490b3156354fe092eaa4440e3732c078" + sha256 cellar: :any_skip_relocation, arm64_monterey: "255979daec38fcb5b7af34d55a34bf54f71c9ad5935117eb5b5dc2685022aa71" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d16243315d1cff0bc8f1341cfdc31d9385d0c411fba462cdfa00b81326245b79" + sha256 cellar: :any_skip_relocation, sonoma: "1cf756cf417d9ae2be44f0d27e56b2ed785524df77cdbae2ff8f05e50805bdab" + sha256 cellar: :any_skip_relocation, ventura: "7ec74e37f62c3e23612137ed389121530914e6b3d5ac38d62738e3dcbfa0ac09" + sha256 cellar: :any_skip_relocation, monterey: "b776b06cdbe28835e7899c72a5cc5a54438d052b7b147163edc6adc710c80022" + sha256 cellar: :any_skip_relocation, big_sur: "101def9295ec59ebe5391aefe7384944aecc52e6cc610edddbb4cb0fcaad489d" + sha256 cellar: :any_skip_relocation, catalina: "fb57614e52a889118b43b5ea47d5ae7174ac84525c7496908804d6aca51a8818" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd2c903e910b747ac43ee9604851ea08131dbda84ed405b43f51110b3c29037a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13ed8fdfc8e7a6289dd469d0dbc4bac91f00d8917d3609e5b2ac44d1d641fb86" + end + + # Fix missing return value compilation issue + # https://github.com/lvaccaro/truecrack/issues/41 + patch do + url "https://gist.githubusercontent.com/anonymous/b912a1ede06eb1e8eb38/raw/1394a8a6bedb7caae8ee034f512f76a99fe55976/truecrack-return-value-fix.patch" + sha256 "8aa608054f9b822a1fb7294a5087410f347ba632bbd4b46002aada76c289ed77" + end + + def install + if OS.linux? + # Issue ref: https://github.com/lvaccaro/truecrack/issues/56 + inreplace "src/Makefile.in", /^CFLAGS = /, "\\0-fcommon -Wno-implicit-function-declaration " + elsif DevelopmentTools.clang_build_version >= 1403 + # Fix compile with newer Clang + inreplace "src/Makefile.in", /^CFLAGS = /, "\\0-Wno-implicit-function-declaration " + end + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + # Re datarootdir override: Dumps two files in top-level share + # (autogen.sh and cudalt.py) which could cause conflict elsewhere. + system "./configure", "--enable-cpu", + "--datarootdir=#{pkgshare}", + "--mandir=#{man}", + *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"truecrack" + end +end diff --git a/Formula/t/truffle.rb b/Formula/t/truffle.rb new file mode 100644 index 0000000000000..e9fa3e95d3537 --- /dev/null +++ b/Formula/t/truffle.rb @@ -0,0 +1,68 @@ +class Truffle < Formula + desc "Development environment, testing framework and asset pipeline for Ethereum" + homepage "https://trufflesuite.com" + url "https://registry.npmjs.org/truffle/-/truffle-5.11.5.tgz" + sha256 "bbc24698fc9964cd80acc8952500f708ef18984096eba9e75f40db3486392347" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "8f995c388105f622043e56ba9ab48c436004b9aea99a3580b67a70ee504cb84a" + sha256 arm64_sequoia: "faf61c11f0243979a4bed2ebccbfc71cd540b1d72faded9b7bbfc871bbd8ae74" + sha256 arm64_sonoma: "92ad4c83b95c30319d61cfe06957a32f10b288c01cbcc8fec77dd1377d2f53ad" + sha256 arm64_ventura: "7e859053402f47674c30baebf3b5aa05ad21609471ab14d222dd9aee2b62a3b4" + sha256 arm64_monterey: "dc749938200b0b6aed95ac1103daf87ac555b729862e55767163936f0b1c26e8" + sha256 sonoma: "3f7dbf05369a67669711f1d7358446c46380a5caf38b599d1653156441d5e60e" + sha256 ventura: "7fda9c9211a1884fe42f87dcdfe896eb35d8e5dd332e324d0fb25230417e3c1a" + sha256 monterey: "ea609ec0150beda892f4bdad71aff910c78fbe91338798e8a6a65c37a0434f11" + sha256 cellar: :any_skip_relocation, arm64_linux: "561cb47cb5d7ca64d71b9464c9fd356b06fccf878432c303ba6bbd5ddbf1b133" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9db01e2a5e1d9ab923419eafc7a0588dd02bca55f62310277838a41d4cc5c653" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir[libexec/"bin/*"] + + # Remove incompatible pre-built binaries + truffle_dir = libexec/"lib/node_modules/truffle" + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + platforms = ["#{os}-#{arch}"] + platforms << "#{os}-x64+arm64" if OS.mac? + %w[ + **/node_modules/* + node_modules/ganache/node_modules/@trufflesuite/bigint-buffer + ].each do |pattern| + truffle_dir.glob("#{pattern}/prebuilds/*").each do |dir| + dir.glob("*.musl.node").map(&:unlink) + rm_r(dir) if platforms.exclude?(dir.basename.to_s) + end + end + pattern = "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/{binaries,dist}/*.node" + truffle_dir.glob(pattern) do |f| + rm(f) unless f.basename.to_s.match?("_#{os}_#{arch}_") + end + + # Remove incompatible pre-built binaries that have arbitrary names + truffle_dir.glob("node_modules/ganache/dist/node{/,/F/}*.node").each do |f| + next unless f.dylib? + next if f.arch == Hardware::CPU.arch + next if OS.mac? && f.archs.include?(Hardware::CPU.arch) + + f.unlink + end + + # Replace universal binaries with their native slices + deuniversalize_machos + end + + test do + system bin/"truffle", "init" + system bin/"truffle", "compile" + system bin/"truffle", "test" + end +end diff --git a/Formula/t/trufflehog.rb b/Formula/t/trufflehog.rb new file mode 100644 index 0000000000000..bad02bf28374c --- /dev/null +++ b/Formula/t/trufflehog.rb @@ -0,0 +1,34 @@ +class Trufflehog < Formula + desc "Find and verify credentials" + homepage "https://trufflesecurity.com/" + url "https://github.com/trufflesecurity/trufflehog/archive/refs/tags/v3.90.12.tar.gz" + sha256 "df98f2d3cda1f6d4556a82732004943b8eb7e8c0a057a7d9f3c19c16840e35fa" + # upstream license ask, https://github.com/trufflesecurity/trufflehog/issues/1446 + license "AGPL-3.0-only" + head "https://github.com/trufflesecurity/trufflehog.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b9fce7801bc5e305e9afd79f3faa4aa26180900670e7f63cdf5054a10ddd7474" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8bd429959ec23b4347a1c4faa637dd4990331c61d173845cf19f5fae30a74ba1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "853d6b49076a9b39bd09a1ee0aa4ef95912bdfa8d74f170c9819def1e332eba0" + sha256 cellar: :any_skip_relocation, sonoma: "e108f7c1f39b4391536ca767d89c282121a28d48c0ccd1cae12ec0649c8ef3c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8cfcc81f7b94b5b27cfb16e6b18bd0879fd4675fdd8bfe3a2657d07e8adce14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef3a8ae845769dd5a8482e2d550da17fe02636a197e80902d9fb057793a91a03" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + repo = "https://github.com/trufflesecurity/test_keys" + output = shell_output("#{bin}/trufflehog git #{repo} --no-update --only-verified 2>&1") + expected = "{\"chunks\": 0, \"bytes\": 0, \"verified_secrets\": 0, \"unverified_secrets\": 0, \"scan_duration\":" + assert_match expected, output + + assert_match version.to_s, shell_output("#{bin}/trufflehog --version 2>&1") + end +end diff --git a/Formula/t/trunk.rb b/Formula/t/trunk.rb new file mode 100644 index 0000000000000..2db874ee86777 --- /dev/null +++ b/Formula/t/trunk.rb @@ -0,0 +1,50 @@ +class Trunk < Formula + desc "Build, bundle & ship your Rust WASM application to the web" + homepage "https://trunkrs.dev/" + url "https://github.com/trunk-rs/trunk/archive/refs/tags/v0.21.14.tar.gz" + sha256 "8687bcf96bdc4decee88458745bbb760ad31dfd109e955cf455c2b64caeeae2f" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/trunk-rs/trunk.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "93022640040f9f21249a52ac60776e812e0aed4a02b9e0b61676eb8b51ac6f96" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f29f737a25367f9d601004ab3c69d5af49388d105dbbf4de4342e9b26bb19235" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e353a529700001a2d583d8b5c7b64fd33437b62cb06df847d87be200750a7d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f527d08ece51ec56bc8f5cab717340954024b412c948739ae4dba0f5aa5c203e" + sha256 cellar: :any_skip_relocation, sonoma: "327a4675ef5bbe597bb701f9bf8fae1f5c0a5158a9b6e6b995e0beadd480adf6" + sha256 cellar: :any_skip_relocation, ventura: "1a95cdffa128c65c96942b7d28b0037c230ee87f89c426253665068717bfed7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f03d00804c927fda2616c5ac7ad5a145bf84e361d6b36369a6fc4383562006d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75d36fb9a7d305547ce7580004d3da051ddd6089a8338fff63e2a033efb17578" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "bzip2" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + ENV["TRUNK_CONFIG"] = testpath/"Trunk.toml" + (testpath/"Trunk.toml").write <<~TOML + trunk-version = ">=0.19.0" + + [build] + target = "index.html" + dist = "dist" + TOML + + assert_match "Configuration {\n", shell_output("#{bin}/trunk config show") + + assert_match version.to_s, shell_output("#{bin}/trunk --version") + end +end diff --git a/Formula/t/trurl.rb b/Formula/t/trurl.rb new file mode 100644 index 0000000000000..744338ca51cdb --- /dev/null +++ b/Formula/t/trurl.rb @@ -0,0 +1,32 @@ +class Trurl < Formula + desc "Command-line tool for URL parsing and manipulation" + homepage "https://curl.se/trurl/" + url "https://github.com/curl/trurl/releases/download/trurl-0.16.1/trurl-0.16.1.tar.gz" + sha256 "aac947d4fb421a58abc19a3771e87942cd4721b8f855c433478c94c11a8203ba" + license "curl" + head "https://github.com/curl/trurl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b85273354bcc4088546ae4bef82d933579d8c81fd9f77c0403e2a4402c63a476" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e77852df0afaaf260ec8a9bba1c4b0536866a72c0d6d4070fea5f344aa81070" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd620f42f89c0bb12b9db5a1f139a949c8db111752e951f40089c9221c9c2ef3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fb1195a085b9698e6b1989fe970d8156d75041e1e0b57a035ca198398ca4abae" + sha256 cellar: :any_skip_relocation, sonoma: "f7e5d221285006395dcc352f22faa4f34600b73cc012d3686bce0584c74f703e" + sha256 cellar: :any_skip_relocation, ventura: "76a64a6398d7e7ef61f8140c04a6d777b3248326579aa5a22c0ba276e69ab042" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d50283a36a33f49b589c407d7c5dde5081b4f2aab28f4a499804914d0d247c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cdfb216b12de94af1ec6da70bf70ff6260f5638c8efb552c503082ba86ec230" + end + + uses_from_macos "curl", since: :ventura # uses CURLUE_NO_ZONEID, available since curl 7.81.0 + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/trurl https://example.com/hello.html " \ + "--default-port --get '{scheme} {port} {path}'").chomp + assert_equal "https 443 /hello.html", output + end +end diff --git a/Formula/t/trzsz-go.rb b/Formula/t/trzsz-go.rb new file mode 100644 index 0000000000000..21bc990c97722 --- /dev/null +++ b/Formula/t/trzsz-go.rb @@ -0,0 +1,44 @@ +class TrzszGo < Formula + desc "Simple file transfer tools, similar to lrzsz (rz/sz), and compatible with tmux" + homepage "https://trzsz.github.io" + url "https://github.com/trzsz/trzsz-go/archive/refs/tags/v1.1.8.tar.gz" + sha256 "9ff477c98081ffccecdd61b1bb51d573a0b67c7d205ecfc9d50b20dd4b54f3f1" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c0816e19ac0d99b467e03dc79ec6216c2bb640f6f9b30357446a026683632ac7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "534ff81d4dff7072e4786d57e64c69fa938e72f50757133d5553c7e29edbaf61" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1116b86864ee5874affa1d2c0d099323187af43f213dfeb74aab41cadc10934" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1116b86864ee5874affa1d2c0d099323187af43f213dfeb74aab41cadc10934" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c1116b86864ee5874affa1d2c0d099323187af43f213dfeb74aab41cadc10934" + sha256 cellar: :any_skip_relocation, sonoma: "fd7d30223b48aadf61451c156036936de0a5492f0f0bf2598d316ec5f822d1dd" + sha256 cellar: :any_skip_relocation, ventura: "fd7d30223b48aadf61451c156036936de0a5492f0f0bf2598d316ec5f822d1dd" + sha256 cellar: :any_skip_relocation, monterey: "fd7d30223b48aadf61451c156036936de0a5492f0f0bf2598d316ec5f822d1dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "77d3ae4a2ea4512fd8645c93dc2dba19c3e9fb9962d874a06bcf06be2723d9e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "867de3126f27ad11567dced2ecdac5c3f18f754345dae498c14dda8e0da8c1fa" + end + + depends_on "go" => :build + + conflicts_with "trzsz", because: "both install `trz`, `tsz` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"trz"), "./cmd/trz" + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"tsz"), "./cmd/tsz" + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"trzsz"), "./cmd/trzsz" + end + + test do + assert_match "trzsz go #{version}", shell_output("#{bin}/trzsz --version") + assert_match "trz (trzsz) go #{version}", shell_output("#{bin}/trz --version 2>&1") + assert_match "tsz (trzsz) go #{version}", shell_output("#{bin}/tsz --version 2>&1") + + assert_match "Wrapping command line to support trzsz", shell_output("#{bin}/trzsz 2>&1") + touch "tmpfile" + assert_match "Not a directory", shell_output("#{bin}/trz tmpfile 2>&1", 254) + rm "tmpfile" + assert_match "No such file", shell_output("#{bin}/tsz tmpfile 2>&1", 255) + end +end diff --git a/Formula/t/trzsz-ssh.rb b/Formula/t/trzsz-ssh.rb new file mode 100644 index 0000000000000..90c06097e8866 --- /dev/null +++ b/Formula/t/trzsz-ssh.rb @@ -0,0 +1,35 @@ +class TrzszSsh < Formula + desc "Simple ssh client with trzsz ( trz / tsz ) support" + homepage "https://trzsz.github.io/ssh" + url "https://github.com/trzsz/trzsz-ssh/archive/refs/tags/v0.1.23.tar.gz" + sha256 "e4fa0f6f443faede83380ceca4a0de862c054f37c27983a7bbe6bced1d9f80da" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5366a0fc68e55f86518f33296a6594c11d8ce788b283badfd869ee787615a8d1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5366a0fc68e55f86518f33296a6594c11d8ce788b283badfd869ee787615a8d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5366a0fc68e55f86518f33296a6594c11d8ce788b283badfd869ee787615a8d1" + sha256 cellar: :any_skip_relocation, sonoma: "b49a6e4f5145e57aeafbec67bf1f200393b64e931af6906e1c940bade7941f2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "52121142aa23b88a5f98b2c2980a428bc00c837bc46dfa14829f90798cc44b2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3502362a3dc731febbb45ff0cd6b1b1228424fc7dbad0307695b237ad1f0358" + end + + depends_on "go" => :build + + conflicts_with "tssh", because: "both install `tssh` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"tssh"), "./cmd/tssh" + end + + test do + assert_match "trzsz ssh #{version}", shell_output("#{bin}/tssh -V 2>&1") + assert_match "trzsz ssh #{version}", shell_output("#{bin}/tssh --version 2>&1") + + assert_match "invalid option", shell_output("#{bin}/tssh -o abc 2>&1", 255) + assert_match "invalid bind specification", shell_output("#{bin}/tssh -D xyz 2>&1", 255) + assert_match "invalid forward specification", shell_output("#{bin}/tssh -L 123 2>&1", 255) + end +end diff --git a/Formula/t/trzsz.rb b/Formula/t/trzsz.rb new file mode 100644 index 0000000000000..d291c4d6f122c --- /dev/null +++ b/Formula/t/trzsz.rb @@ -0,0 +1,77 @@ +class Trzsz < Formula + include Language::Python::Virtualenv + + desc "Simple file transfer tools, similar to lrzsz (rz/sz), and compatible with tmux" + homepage "https://trzsz.github.io" + url "https://files.pythonhosted.org/packages/22/1e/40a495c84a0dc625a4d97638c5cae308306718c493f480ee5ac64801947b/trzsz-1.1.5.tar.gz" + sha256 "57be064b259d57326f75683704b8e93a56ce0d67d9b3b2b36ad4d53e98a28854" + license "MIT" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b57f72d47439cd304aa457bcd75e138d447b4819571c9a01fac3e8856b7d832a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8ce638b0601b5f449a00264cd0de40f0167fd485108d321c64eebc8ccb4c0bb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c9385e793d458298fe55e9ce4f0d80c1ab0d78a28fa468d03a94ecc8dbb47b2" + sha256 cellar: :any_skip_relocation, sonoma: "c7551b00282c2c5e16a00d56bd961ab504f38a605d5d1e2a6012a7d10dc27492" + sha256 cellar: :any_skip_relocation, arm64_linux: "ffe42aec52133ecfdb2fbae429d43c8042789d80125e5e6890ab65362365e6ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a212e8abf46f7833d81f32028d3552df8ca793366e4743219ede67442c4d94f3" + end + + depends_on "python@3.14" + + conflicts_with "trzsz-go", because: "both install `trz`, `tsz` binaries" + + pypi_packages extra_packages: "trzsz-iterm2" + + resource "iterm2" do + url "https://files.pythonhosted.org/packages/57/6b/98ce521178651fad694c7ed704c882e4ef0b10fecc0a687b4e859ef623c3/iterm2-2.10.tar.gz" + sha256 "8c0cf95ffca9f1bf7409883618deee66acd73c63929222e23435780dcc516869" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/fa/a4/cc17347aa2897568beece2e674674359f911d6fe21b0b8d6268cd42727ac/protobuf-6.32.1.tar.gz" + sha256 "ee2469e4a021474ab9baafea6cd070e5bf27c7d29433504ddea1a4ee5850f68d" + end + + resource "trzsz-iterm2" do + url "https://files.pythonhosted.org/packages/1e/21/e8c12001396080263407277edc85ba765ee18bed54ae6d72e83516de7d9c/trzsz-iterm2-1.1.5.tar.gz" + sha256 "a7f6fb6359523d871d03be099a876043d039458cb6086d22d1e0f3e874283c4b" + end + + resource "trzsz-libs" do + url "https://files.pythonhosted.org/packages/f2/c2/89cfeb038585c18e320ede2182d70096a162f22298e29b7f1234bbc5230e/trzsz-libs-1.1.5.tar.gz" + sha256 "baff5cea450e1310a292f5702d4a8f7dc855fbe2aefe21b13d2451bc05cedea4" + end + + resource "trzsz-svr" do + url "https://files.pythonhosted.org/packages/76/c7/78c1c91eeb99c86dd80d903cdb463da0d1fbea9b7f25a1c1de5b0f96ecf5/trzsz-svr-1.1.5.tar.gz" + sha256 "2f1fbc119df3c6010bf7b030635a5dc3cc1513025e5d0415d84d2d2a417b077f" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + def install + virtualenv_install_with_resources + bin.install_symlink libexec/"bin/trz" + bin.install_symlink libexec/"bin/tsz" + bin.install_symlink libexec/"bin/trzsz-iterm2" + end + + test do + assert_match "trz (trzsz) py #{version}", shell_output("#{bin}/trz -v") + assert_match "tsz (trzsz) py #{version}", shell_output("#{bin}/tsz -v") + assert_match "trzsz-iterm2 (trzsz) py #{version}", shell_output("#{bin}/trzsz-iterm2 -v") + + touch "tmpfile" + assert_match "Not a directory", shell_output("#{bin}/trz tmpfile 2>&1") + + rm "tmpfile" + assert_match "No such file", shell_output("#{bin}/tsz tmpfile 2>&1") + + assert_match "arguments are required", shell_output("#{bin}/trzsz-iterm2 2>&1", 2) + end +end diff --git a/Formula/t/tsduck.rb b/Formula/t/tsduck.rb new file mode 100644 index 0000000000000..e5df849a87bc4 --- /dev/null +++ b/Formula/t/tsduck.rb @@ -0,0 +1,80 @@ +class Tsduck < Formula + desc "MPEG Transport Stream Toolkit" + homepage "https://tsduck.io/" + url "https://github.com/tsduck/tsduck/archive/refs/tags/v3.42-4421.tar.gz" + sha256 "4e8549967b25cbdc247c27297ef8bfa84a27f291553849fd721680c675822ec5" + license "BSD-2-Clause" + head "https://github.com/tsduck/tsduck.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "5b623289b58ad333bbfb279db9871defd305d2811f219130d2868cfe86673851" + sha256 cellar: :any, arm64_sequoia: "9327703566706a7077885bf1ed22c933cd4d82146e34f186c7b0eb5bff6add8e" + sha256 cellar: :any, arm64_sonoma: "8bedbd9dd8951b291c9556a957fd241102b0cfd418bd8ae3d893b9dc48e4c182" + sha256 cellar: :any, arm64_ventura: "b9f894857c6bb01b382100d2451d475499e7d9ec5fa5d337d376a4a6ed17afd3" + sha256 cellar: :any, sonoma: "f45c7372512d9d368a4f2fbb5d1ec5e50d25d211f92922ed09f7b55b1c4067ac" + sha256 cellar: :any, ventura: "2abd61849397bf5683de519900ad7b4ae3a236eb63ca1b4040c094722db4d5ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "95b6392d75893200f3ab0fa324a449c7f2f1e1f646ee0e3f434161d5239c21d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b603e585148b9d84984bb05e5bbfabf212396b6e1233c94fe9eabba7ff9fbee1" + end + + depends_on "asciidoctor" => :build + depends_on "dos2unix" => :build + depends_on "gnu-sed" => :build + depends_on "grep" => :build + depends_on "openjdk" => :build + depends_on "qpdf" => :build + depends_on "librist" + depends_on "libvatek" + depends_on "openssl@3" + depends_on "srt" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "libedit" + uses_from_macos "pcsc-lite" + uses_from_macos "zlib" + + on_macos do + depends_on "bash" => :build + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1599 + depends_on "make" => :build + end + + # Needs clang 16 + fails_with :clang do + build 1599 + cause "Requires full C++20 support" + end + + def install + if OS.linux? + ENV["LINUXBREW"] = "true" + ENV["VATEK_CFLAGS"] = "-I#{Formula["libvatek"].opt_include}/vatek" + end + system "gmake", "NOGITHUB=1", "NOTEST=1" + ENV.deparallelize + system "gmake", "NOGITHUB=1", "NOTEST=1", "install", "SYSPREFIX=#{prefix}" + end + + test do + assert_match "TSDuck - The MPEG Transport Stream Toolkit", shell_output("#{bin}/tsp --version 2>&1") + input = shell_output("#{bin}/tsp --list=input 2>&1") + %w[craft file hls http srt rist].each do |str| + assert_match "#{str}:", input + end + output = shell_output("#{bin}/tsp --list=output 2>&1") + %w[ip file hls srt rist].each do |str| + assert_match "#{str}:", output + end + packet = shell_output("#{bin}/tsp --list=packet 2>&1") + %w[fork tables analyze sdt timeshift nitscan].each do |str| + assert_match "#{str}:", packet + end + end +end diff --git a/Formula/t/tsnet-serve.rb b/Formula/t/tsnet-serve.rb new file mode 100644 index 0000000000000..26ac841184a2b --- /dev/null +++ b/Formula/t/tsnet-serve.rb @@ -0,0 +1,45 @@ +class TsnetServe < Formula + desc "Expose HTTP applications to a Tailscale Tailnet network" + homepage "https://github.com/shayne/tsnet-serve" + url "https://github.com/shayne/tsnet-serve/archive/refs/tags/v1.3.2.tar.gz" + sha256 "05d11ec7ac4e1bdb2ce6a8db3999e314ceab51ee7b462df3ec75895704438cc7" + license "MIT" + head "https://github.com/shayne/tsnet-serve.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8870b627f377c37f5bca645d1eaaead4fdedd84239dcfaf60d643d99668b4a74" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e79d05ede181726fe1493fc6861d94f5fd5ecf115d63b43bfda78e75cea62928" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4858338aa9aa119ec3ffb6b6bcd8289b14c425643dc5cabb325d1f8569708c60" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a782710bea95a2736499ab7b1e1f371932956515f301d0a2ec80d4c43224c33e" + sha256 cellar: :any_skip_relocation, sonoma: "561db8d5942c4ece35f09fa0ad788448a816e2b0d5b9a3a0e05f91a40cbf5a5d" + sha256 cellar: :any_skip_relocation, ventura: "2caaa5230c882cdf6bca6ed21c5a92d17d2ce3380f7749685e324504f93efeb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "113ba6f73a541c717d6a026d6e24f598907ac49e0236e53029c2bdd62bd7b116" + sha256 cellar: :any_skip_relocation, x86_64_linux: "040a566fb79644a0870e5f6b877e616555a92a148fbaff66cb327be3b62d8a1e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + assert_match version.to_s, shell_output("#{bin}/tsnet-serve -version") + + hostname = "test" + backend = "http://localhost:8080" + + logfile = testpath/"tsnet-serve.log" + pid = spawn bin/"tsnet-serve", "-hostname", hostname, "-backend", backend, + out: logfile.to_s, err: logfile.to_s + + sleep 1 + + output = logfile.read + assert_match "tsnet starting with hostname \"#{hostname}\"", output + assert_match "LocalBackend state is NeedsLogin", output + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/t/tssh.rb b/Formula/t/tssh.rb new file mode 100644 index 0000000000000..ce0f297b52fc6 --- /dev/null +++ b/Formula/t/tssh.rb @@ -0,0 +1,36 @@ +class Tssh < Formula + desc "SSH Lightweight management tools" + homepage "https://github.com/luanruisong/tssh" + url "https://github.com/luanruisong/tssh/archive/refs/tags/2.1.3.tar.gz" + sha256 "35b2b28eea5e41d6faa1e0eeee30ad18e069cc3489121257661097297692cd73" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "33302c3e3fb3837451b9a03118795e19c863a4c65bb8e2dc440f31dab9833efe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d7c551460003a24a70c44899bbd8ed68eac573b75a926cf3a42b586b6517560" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d7c551460003a24a70c44899bbd8ed68eac573b75a926cf3a42b586b6517560" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d7c551460003a24a70c44899bbd8ed68eac573b75a926cf3a42b586b6517560" + sha256 cellar: :any_skip_relocation, sonoma: "93b16345f6977178f63810e9555df80443c00fae2e628a964cee8b3ffad8ab14" + sha256 cellar: :any_skip_relocation, ventura: "93b16345f6977178f63810e9555df80443c00fae2e628a964cee8b3ffad8ab14" + sha256 cellar: :any_skip_relocation, arm64_linux: "89a41d4e35ebf5cd8ca7041757cd2cf85a39ca8316a3531006b79f7263a5c642" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a870f0b129a69a7a1eeb04f2571065e7309bfc52421395ba6347206d4b8bc080" + end + + depends_on "go" => :build + + conflicts_with "trzsz-ssh", because: "both install `tssh` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + output_v = shell_output("#{bin}/tssh -v") + assert_match "version #{version}", output_v + output_e = shell_output("#{bin}/tssh -e") + assert_match "TSSH_HOME", output_e + end +end diff --git a/Formula/t/tsui.rb b/Formula/t/tsui.rb new file mode 100644 index 0000000000000..432057ffc97dd --- /dev/null +++ b/Formula/t/tsui.rb @@ -0,0 +1,55 @@ +class Tsui < Formula + desc "TUI for configuring and monitoring Tailscale" + homepage "https://neuralink.com/tsui" + url "https://github.com/neuralinkcorp/tsui/archive/refs/tags/v0.2.0.tar.gz" + sha256 "1ae87ad281587efbf80ef0bf9cc0b519dd4f08465cb378e34e97230f2f3526f0" + license "MIT" + head "https://github.com/neuralinkcorp/tsui.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c5aa985bc23f46808385ac73b79f5ebd81cb5e7281799bb8197e1c3bccd4f2d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3ca9c93120f6fb18fa2450a484d7ec1010c07b278303764c6e190465d56b0ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0194b896a9a93fc431be42723304fda6a1387587994f816979858f5572959d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b6466361263798b364befe5c20bbd1e9190e10192c585f7748dc15c137db5e7" + sha256 cellar: :any_skip_relocation, sonoma: "0c4f8cafa900e370bd481d335d58726d48065ec40990d55d4b7ceaf100cc8f4f" + sha256 cellar: :any_skip_relocation, ventura: "6fc53cdc2d15c3e8e6c0bfb5e506ecc143e2b674a331d91d2de345de0015177a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a10bf1333fdf6ac408c80c36c6259d1b31f8be73d5600909de9b2708f82ccb03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca260cc4f6d4e96c9067a627aa3b3018f2cedc2f687a9aee134a4367bd4cbefc" + end + + depends_on "go" => :build + + on_linux do + depends_on "libx11" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + input, = Open3.popen2 "SHELL=/bin/sh script -q output.txt" + input.puts "stty rows 80 cols 130" + input.puts bin/"tsui" + sleep 10 + input.putc "q" + input.puts "exit" + sleep 10 + input.close + sleep 10 + + screenlog = (testpath/"output.txt").read + # remove ANSI colors + screenlog.encode!("UTF-8", "binary", + invalid: :replace, + undef: :replace, + replace: "") + + assert_match(Regexp.union( + /Status:\s+(Not )?Connected/, # If Tailscale running + /Failed to connect to local Tailscale daemon/, # If Tailscale not running + ), screenlog) + end +end diff --git a/Formula/t/tsung.rb b/Formula/t/tsung.rb new file mode 100644 index 0000000000000..683174170380a --- /dev/null +++ b/Formula/t/tsung.rb @@ -0,0 +1,38 @@ +class Tsung < Formula + desc "Load testing for HTTP, PostgreSQL, Jabber, and others" + # `http://tsung.erlang-projects.org/` is no longer accessible, + # upstream bug report, https://github.com/processone/tsung/issues/417 + homepage "https://github.com/processone/tsung" + url "https://github.com/processone/tsung/archive/refs/tags/v1.8.0.tar.gz" + sha256 "6c55df48b82f185dfd60ae7271e09bbc25c6c8bc568bb8bfc0cdb056d77c3899" + license "GPL-2.0-or-later" + head "https://github.com/processone/tsung.git", branch: "develop" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1da5e28ebc2cdbbc423599d8ad4a10558df7a0e3435a7dc1dd03d5de86989308" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0716843ec27cd4cb42773d90b4db0ec5f3ce200c467dc9354786cfed3967a6e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49d55c65d11487c31015102992d20c0853656fc09b85e6f35570573417a949ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d847edc850acbfe70004c707b2ec18962c7b83877efb2bd576f23fc31119d82f" + sha256 cellar: :any_skip_relocation, sonoma: "8e611fcda350d09739af49168a0514ad347454c0d4d1722f18fe254f98334ee9" + sha256 cellar: :any_skip_relocation, ventura: "92304f38be35fef5b26c9469042c657220ee200d1c3fcd88ecb3b98b1a1063e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "78d662c5b4361d28dfc3b3bec656d9c85200bf4166d3258377acfeb1c4bd20b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e15a598cd9b077c6cd445b23a56d8d799f7ea330c92cea542d244bdc3d82aa36" + end + + depends_on "erlang" + depends_on "gnuplot" + + def install + system "./configure", *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + system bin/"tsung", "status" + end +end diff --git a/Formula/t/tt.rb b/Formula/t/tt.rb new file mode 100644 index 0000000000000..13eacfcf39c58 --- /dev/null +++ b/Formula/t/tt.rb @@ -0,0 +1,54 @@ +class Tt < Formula + desc "Command-line utility to manage Tarantool applications" + homepage "https://github.com/tarantool/tt" + url "https://github.com/tarantool/tt/releases/download/v2.11.0/tt-2.11.0-complete.tar.gz" + sha256 "a9c1b05d547f622d329e791f710157ba8b889337a26ed2215ff862156bea9c4d" + license "BSD-2-Clause" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4c0e7f414a73d8a1f47ba8393f14ebb98b1ba7dafbd595c1913dca056b97bd3c" + sha256 cellar: :any, arm64_sequoia: "6ab63d8e56f2df245cbe854bb9eb3206196edd57f2c4682be19787939b70c5eb" + sha256 cellar: :any, arm64_sonoma: "56a68cea046497844c9764d60fb95c9a853b94b221f0a1081519d3fb9e465ae1" + sha256 cellar: :any, arm64_ventura: "cc0823f89f35c41d56f9bbf9201be2393b09672de59f813f81105efdacdbc48b" + sha256 cellar: :any, sonoma: "a203c9faf7c44b99380f428598f44aa9a57c8b5d87bec2d8736d4937b4ddcedb" + sha256 cellar: :any, ventura: "47eeb659c3ae04d58acef7618b1144c8abd7958c7d8b5a955782224969320e90" + sha256 cellar: :any_skip_relocation, arm64_linux: "448c01c6d3bf5a331c99e1b50a870b33abfb695295bb6567384543d5557d47df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "582f189afc1e1a27feeb14875f53b9732ed5a2edf5218513431d1b098f5bd34d" + end + + depends_on "go" => :build + depends_on "mage" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "unzip" + uses_from_macos "zip" + + on_macos do + depends_on "bash-completion" + end + + def install + ENV["TT_CLI_BUILD_SSL"] = "shared" + system "mage", "build" + bin.install "tt" + (etc/"tarantool").install "package/tt.yaml.default" => "tt.yaml" + + generate_completions_from_executable(bin/"tt", "completion") + end + + test do + system bin/"tt", "init" + system bin/"tt", "create", "cartridge", "--name", "cartridge_app", "-f", "--non-interactive", "-d", testpath + assert_path_exists testpath/"cartridge_app/init.lua" + end +end diff --git a/Formula/t/tta.rb b/Formula/t/tta.rb new file mode 100644 index 0000000000000..87870ba790d2b --- /dev/null +++ b/Formula/t/tta.rb @@ -0,0 +1,49 @@ +class Tta < Formula + desc "Lossless audio codec" + homepage "https://sourceforge.net/projects/tta/" + url "https://downloads.sourceforge.net/project/tta/tta/libtta/libtta-2.2.tar.gz" + sha256 "1723424d75b3cda907ff68abf727bb9bc0c23982ea8f91ed1cc045804c1435c4" + license "LGPL-3.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/libtta[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8a462551e8fec801357526eed49a963aaa646f1c9ff3cd657ec1787ac8ff9f4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eaf4b5e6bf2e815f028c54bb2df0d3470f984495c16526ee8d51ea6a08c3a7fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f45089fcc147fe7133617e39ce52b106f4334b4509db14ce28ec68f8fe35cd32" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48fe3083c87c3f78c9ce5d2076ed9220a18d6ba64347e5b10e739d1a08c4fce0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "941f70e3d5b3b0ad8846dbdd68e074fef2094e9e9ddde9494a781b045b1da3b6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bd5a172d4fc33058df72affc82f3b4d0f66d147007bce62e45b429370403fb29" + sha256 cellar: :any_skip_relocation, sonoma: "3a895bbe06844788d796ebe9a22d2656a7c09e6e66c0c492e6da6538e5824124" + sha256 cellar: :any_skip_relocation, ventura: "2dab99ae6cc3568d3b685607cbfb8b624f916d8e2bceae530fb46656509298aa" + sha256 cellar: :any_skip_relocation, monterey: "21fb40ccded96b6a0b51ecf1c078ddeae5b9bb116d4ce88985d4bb5b93644aae" + sha256 cellar: :any_skip_relocation, big_sur: "7f2b84e5f849d0903006aa3550ec718c31130b4d50271efef0ffe37c1a29e0d2" + sha256 cellar: :any_skip_relocation, catalina: "af41c210ceddaa4957dc8bc4fec9dedb839157914c3d2d9fbb4bed63239cd9f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30808b3d8bf5450eb396ecbf102837b9943355ea54cb6b27c052b6e2fd902adc" + end + + # CPU aarch64 is not supported + on_linux do + depends_on arch: :x86_64 + end + + def install + args = ["--disable-silent-rules"] + if Hardware::CPU.intel? + sse = if OS.mac? && MacOS.version.requires_sse4? + "sse4" + else + "sse2" + end + args << "--enable-#{sse}" + end + + system "./configure", *std_configure_args, *args + system "make", "install" + end +end diff --git a/Formula/t/ttdl.rb b/Formula/t/ttdl.rb new file mode 100644 index 0000000000000..ca88e251bffa2 --- /dev/null +++ b/Formula/t/ttdl.rb @@ -0,0 +1,30 @@ +class Ttdl < Formula + desc "Terminal Todo List Manager" + homepage "https://github.com/VladimirMarkelov/ttdl" + url "https://github.com/VladimirMarkelov/ttdl/archive/refs/tags/v4.12.0.tar.gz" + sha256 "63f2e5bf3d1c4052a2f02559e223ad9cf620e56034eff3c69601c6ea1076f2e0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f4d1415dee606ba56a170689c6a38387aa795ca07c0b0608f8b448f5157bc406" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a1ac7595cd62454f87be931c4f90e864eb5c76cfee6df65c60d0ddb41aa3522" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c53061836ad80b8186be6eb3a00d69611d5ba14c13cbaf68fd47bcff4225ce49" + sha256 cellar: :any_skip_relocation, arm64_ventura: "421e23b6865edebb668cca9d543d7e842f391d87d26b54c89346985caf15847a" + sha256 cellar: :any_skip_relocation, sonoma: "a97d799302693ff19597c4195a132b0d8dc2c6ab7ef568e067bb922600ed5af3" + sha256 cellar: :any_skip_relocation, ventura: "573f2eb8bed047e8375a41efbf1b1add345f99129aeed7d31c3369ce8829a780" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fcb8484a3d6a6a66f87e30ae58effbe6b7b503464a68a73f0096cf27fc7cfb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54bdb622ae30e6a2e7e9b1a5e082c282c978ccd2fc2304e9234bf803f23f6bd1" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "Added todo", shell_output("#{bin}/ttdl 'add readme due:tomorrow'") + assert_path_exists testpath/"todo.txt" + assert_match "add readme", shell_output("#{bin}/ttdl list") + end +end diff --git a/Formula/t/ttf2eot.rb b/Formula/t/ttf2eot.rb new file mode 100644 index 0000000000000..c7d2f92720ef0 --- /dev/null +++ b/Formula/t/ttf2eot.rb @@ -0,0 +1,43 @@ +class Ttf2eot < Formula + desc "Convert TTF files to EOT" + homepage "https://github.com/wget/ttf2eot" + url "https://github.com/wget/ttf2eot/archive/refs/tags/v0.0.3.tar.gz" + sha256 "f363c4f2841b6d0b0545b30462e3c202c687d002da3d5dec7e2b827a032a3a65" + license any_of: ["LGPL-2.0-or-later", "BSD-2-Clause"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d16324780cc0664cc3e5372cc1c6959062258a6480c23e4ca1791c0e0013f864" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4063624dce85f67ce9f8d03c746e79350fd5ec24b3439cdef46e71bf1f07418" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "04c47f19d3aaac57af033502618dc069f0145102dc4296c17afd5ec871cdddeb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "867b5d7d37b4ac230168ea41318dd3a6f9fed7b64dba3f6aed2e57ac3f89d9a8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ac0f37ff08692308c939a421e2d2ab2dfc7130d1bcc85ca070e1baab844dfcc8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ad7c55fc38097327fcc7ecc967f4af2a24ee690ffe8f1ed5e465f5ef398c4750" + sha256 cellar: :any_skip_relocation, sonoma: "aa65afa0cca03bd779972063ad68340335fc8411e9af7ce3f18c684a4f0059eb" + sha256 cellar: :any_skip_relocation, ventura: "d2f96c1fb256084ee3ac130861a7a72ddf03841ff45414dada9ec4d04acc1241" + sha256 cellar: :any_skip_relocation, monterey: "7b791e8df0d498383f11ccbed2017a57be517169725560b92ccd0d25ef602123" + sha256 cellar: :any_skip_relocation, big_sur: "88edb09b376fe32ce292747416549530e92a763c9859817e7eb936c65cf1c696" + sha256 cellar: :any_skip_relocation, catalina: "05b1f397b4784a77f36a3d3138e812932db4419d8d03e0f0735e58591677e918" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac667f059eb2d3394c7869f8475a60d36840d7d94992557178974b10166b80bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20e9bce41da4284c7cb5a07cc7fa05f911457de66e3ddadf4b0cc1334773100d" + end + + def install + system "make" + bin.install "ttf2eot" + end + + test do + if OS.mac? + font_name = "Arial Unicode" + font_dir = "/Library/Fonts" + else + font_name = "DejaVuSans" + font_dir = "/usr/share/fonts/truetype/dejavu" + end + cp "#{font_dir}/#{font_name}.ttf", testpath + system("#{bin}/ttf2eot < '#{font_name}.ttf' > '#{font_name}.eot'") + assert_path_exists testpath/"#{font_name}.eot" + end +end diff --git a/Formula/t/ttf2pt1.rb b/Formula/t/ttf2pt1.rb new file mode 100644 index 0000000000000..24782c4f7536b --- /dev/null +++ b/Formula/t/ttf2pt1.rb @@ -0,0 +1,39 @@ +class Ttf2pt1 < Formula + desc "True Type Font to Postscript Type 1 converter" + homepage "https://ttf2pt1.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ttf2pt1/ttf2pt1/3.4.4/ttf2pt1-3.4.4.tgz" + sha256 "ae926288be910073883b5c8a3b8fc168fde52b91199fdf13e92d72328945e1d0" + # Uses a BSD license that removes a different clause from BSD-4-Clause than BSD-3-Clause, + # i.e. it omits the non-endorsement clause (4) and retains the acknowledgement clause (3) + license :cannot_represent + + livecheck do + url :stable + regex(%r{url=.*?/ttf2pt1[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0d173b72ff99b8f7d512c1017fa40e52a1b6f7e5432338f5846ce62511cb219e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6ad2fb422b592e707adf8a5e622a1aba01994fdeee1979ce0810e1a7fea435d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35473cb3d10d199702745a66cbd1219309eb884b517d5a1f3356c2b83ec717dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a6dae9b03e84c199e865c7b0852804a408627bcc5251dc219841371e391a8753" + sha256 cellar: :any_skip_relocation, arm64_monterey: "821e641a7addc5001641aac0fb7f610cc2ede29766dd09df88dea12968d3eda8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7b3f1cd65430d9bf494da6fceebb293a0f21840191009525090258871eced58b" + sha256 cellar: :any_skip_relocation, sonoma: "ae066b9ac0a6bc08cbfc13d07433918ea6119e6c41f5f15b0dc07170650b2fff" + sha256 cellar: :any_skip_relocation, ventura: "cf3ba7fa8cbaf80acc4667dbc7abf8004d8d86892448b857573f6330bda988dc" + sha256 cellar: :any_skip_relocation, monterey: "94c056ea4644c7820eb48d3c85964b43c6e42f479efd374128f311f919a93f65" + sha256 cellar: :any_skip_relocation, big_sur: "736c22b9245fa658e10cbb775f943e93bbf42f90477999647461102e87832f29" + sha256 cellar: :any_skip_relocation, catalina: "29a39e797de6107bfe0878e68eb0eabd67d7cbb9b10e76055f1d9d3618a1a842" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4c6c32597ec38d178f8c2fd2bd7fc0e38b8b916a15250b73bbcd42fa07eb734" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa39b65205b22d6c02893d9b5c503d0309edeb8884e0e9336c9d725dc049a666" + end + + def install + # CFLAGS_SYS is used to fix compilation with newer Clang + system "make", "all", "INSTDIR=#{prefix}", "CFLAGS_SYS=-Wno-implicit-function-declaration" + bin.install "ttf2pt1" + man1.install "ttf2pt1.1" + end +end diff --git a/Formula/t/ttfautohint.rb b/Formula/t/ttfautohint.rb new file mode 100644 index 0000000000000..597710443da1e --- /dev/null +++ b/Formula/t/ttfautohint.rb @@ -0,0 +1,66 @@ +class Ttfautohint < Formula + desc "Auto-hinter for TrueType fonts" + homepage "https://www.freetype.org/ttfautohint/" + url "https://downloads.sourceforge.net/project/freetype/ttfautohint/1.8.4/ttfautohint-1.8.4.tar.gz" + sha256 "8a876117fa6ebfd2ffe1b3682a9a98c802c0f47189f57d3db4b99774206832e1" + license any_of: ["FTL", "GPL-2.0-or-later"] + + livecheck do + url "https://sourceforge.net/projects/freetype/rss?path=/ttfautohint" + regex(%r{url=.*?/ttfautohint[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9efb3056dde7f1557a920fe397c958c996c0f34d2a03d8913255845f9661f2e2" + sha256 cellar: :any, arm64_sequoia: "707de245f1d8feaa830ef678f1d658c59a8a2ed6a8b1aba8aa65b9981e2d0758" + sha256 cellar: :any, arm64_sonoma: "9342d7fcb9ceff49803164315b7e08d844f4d7792589ec1b4a737265a39acb7c" + sha256 cellar: :any, arm64_ventura: "e783c67f64f6aeeaf22b635133eacac161f936bb5c71479109d5bc86ee188c98" + sha256 cellar: :any, arm64_monterey: "6aa8eb3acf16503b4f18ff09c7a072449e1b1c519bb8b72a7827ec8242a9c9b1" + sha256 cellar: :any, arm64_big_sur: "1ff2650d6b448e25018921dd855a32d1414c7491fef92f44af042ca1025b1976" + sha256 cellar: :any, sonoma: "84a63397be31f725cffd64eed4b7e40e776e94f6ef1fe8dea84a4adc172592f7" + sha256 cellar: :any, ventura: "288ff076d988ce45c5a253188f1da0a7a7fbded29b52499678e3c649c61ec226" + sha256 cellar: :any, monterey: "8ab23158e7597f79406f2bffd1e5557eb146d8055d73cbcea589cf26b57a32fc" + sha256 cellar: :any, big_sur: "0fceaf938c626642f90f505ca041b14c82696a8b9897504a92415296d635a292" + sha256 cellar: :any, catalina: "e5ad45157f4260f5cdfc68595ca2af5bd8524a342b47e3e39c78afa88da3b0d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e396a76f14968d0778b51a5093552d6e63e643ebc0b5d7f5b06719d8c8932f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68214f0cc124de6b895152c8b780ea5aae067ce0ac571074a472d1723260c94b" + end + + head do + url "https://repo.or.cz/ttfautohint.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "harfbuzz" + depends_on "libpng" + + def install + system "./bootstrap" if build.head? + system "./configure", "--disable-silent-rules", + "--without-doc", + "--without-qt", + *std_configure_args + system "make", "install" + end + + test do + if OS.mac? + font_name = "Arial Unicode.ttf" + font_dir = "/Library/Fonts" + else + font_name = "DejaVuSans.ttf" + font_dir = "/usr/share/fonts/truetype/dejavu" + end + cp "#{font_dir}/#{font_name}", testpath + system bin/"ttfautohint", font_name, "output.ttf" + assert_path_exists testpath/"output.ttf" + end +end diff --git a/Formula/t/tth.rb b/Formula/t/tth.rb new file mode 100644 index 0000000000000..ceae8977c607f --- /dev/null +++ b/Formula/t/tth.rb @@ -0,0 +1,41 @@ +class Tth < Formula + desc "TeX/LaTeX to HTML converter" + homepage "http://silas.psfc.mit.edu/tth/" + url "https://downloads.sourceforge.net/project/tth/tth4.16.tar.gz" + sha256 "b0e118d49a37e06598c1e2b524ea352ceabf064afef25acf02b556229ee43512" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/tth[._-]?v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "78e1ec7d5be8797a77a217fcc2554a1449311cd638fba7ef1f3c9a706c50f027" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9de28731b96776948549eece755898c358e0df99e6078f8b6eb07baaa489efd9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "85bba0ec3b07964610a39b5686c62e7ccb25a058b8883184061aaffe3fa55306" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a630245be3f0b2b1f83a21d6af1525ee257d6211bc1c6845e31ab398eae6767" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2e2fb5e9595c2687fecaf6a24da03d4a97c53ed99621750aa9d76f66e6bd7271" + sha256 cellar: :any_skip_relocation, sonoma: "567e126bb0a4f62da3051a005a9490d240d9c3d335c5998914e10c9ea991b29d" + sha256 cellar: :any_skip_relocation, ventura: "8715b445b87dd7f4363ac369d328eb62a3777029052f20340f4d82f46258f2ed" + sha256 cellar: :any_skip_relocation, monterey: "2f3a06677f7f7f9267f37ad78c748b4809e6f10e61cb53804ed712cd94631d9f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e4122efc9e5e4ae81a404ef164a420fe399d9b13d761f7805876a0f1078aeb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d23d9a3cb16bbbd398fef5f4ed527bfcdbe5708ff653056ea1b3bdf7217783bd" + end + + uses_from_macos "flex" => :build + + def install + system "make", "tth.c" + system ENV.cc, "-o", "tth", "tth.c" + bin.install %w[tth latex2gif ps2gif] + man1.install "tth.1" + end + + test do + assert_match(/version #{version}/, pipe_output(bin/"tth", "")) + end +end diff --git a/Formula/t/ttmath.rb b/Formula/t/ttmath.rb new file mode 100644 index 0000000000000..a0ef7c244d0db --- /dev/null +++ b/Formula/t/ttmath.rb @@ -0,0 +1,24 @@ +class Ttmath < Formula + desc "Bignum library for C++" + homepage "https://www.ttmath.org/" + url "https://downloads.sourceforge.net/project/ttmath/ttmath/ttmath-0.9.3/ttmath-0.9.3-src.tar.gz" + sha256 "4a9a7d1d377fc3907fb75facd4817ba6ac9d60bb4837584256467a54705c6fde" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3f53ff4798c67c56be591df93ec2ee2d2d5609ee894d958528ebd2cb65a75ccc" + end + + def install + include.install "ttmath" + pkgshare.install "samples" + end + + test do + cp_r pkgshare/"samples", testpath + system "make", "-C", "samples", "all" + end +end diff --git a/Formula/t/tty-clock.rb b/Formula/t/tty-clock.rb new file mode 100644 index 0000000000000..fe7b05d0a7b54 --- /dev/null +++ b/Formula/t/tty-clock.rb @@ -0,0 +1,40 @@ +class TtyClock < Formula + desc "Digital clock in ncurses" + homepage "https://github.com/xorg62/tty-clock" + url "https://github.com/xorg62/tty-clock/archive/refs/tags/v2.3.tar.gz" + sha256 "343e119858db7d5622a545e15a3bbfde65c107440700b62f9df0926db8f57984" + license "BSD-3-Clause" + head "https://github.com/xorg62/tty-clock.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d8de065838a148bed951b9e337b8a06f8db5fda6dd7c16a2b299b42a14b8730a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7068bc510258482b8643c72d3cd98e5aeb11ec1c870a4f843b4dab323adc5437" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9d3a157ca3d9c96d55c96e377ce0adf1033d388971438793fce2646976d5ab2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa482bfe16706d591d196d62b30fd517e4b0e677ee9c320466a0f4021e6ad361" + sha256 cellar: :any_skip_relocation, arm64_monterey: "da788fd6f94799b9cb8fe52dae41d592871e9c7e422e216d90d08350f2f51a48" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fcae9d0e0eeaf68815b4a521f7f75c352d4188a38652b4841bd48b608120edce" + sha256 cellar: :any_skip_relocation, sonoma: "0531b48964a9b4deca9fcae4230bec9c9216f909405770f9d4460c450f819dd6" + sha256 cellar: :any_skip_relocation, ventura: "29d7e07686de67b6b7e20cb51c72e756582aad75a15d3ca603751842ebe2bcbb" + sha256 cellar: :any_skip_relocation, monterey: "d2f40bb8f0155c0b2f5b22d2b6269a37c9fbd73976736476156969944e27bc1c" + sha256 cellar: :any_skip_relocation, big_sur: "fd72f43c25837763c243876436de51d99369fb8f540171aec16b2f66cb2870e3" + sha256 cellar: :any_skip_relocation, catalina: "dc5a60415f5cd5397d973b361db6bc0db2172621fe6eed037ee05c851097c27d" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe5ad63f95c7fcbe74f39fff2206c1e8d20145d023e29ad783109632f8868308" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b676f9ca583791e909a241667741a84289d4f75c5673fdd31176c48450ab701" + end + + depends_on "pkgconf" => :build + + uses_from_macos "ncurses" + + def install + ENV.append "LDFLAGS", "-lncurses" + system "make", "PREFIX=#{prefix}" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"tty-clock", "-i" + end +end diff --git a/Formula/t/tty-share.rb b/Formula/t/tty-share.rb new file mode 100644 index 0000000000000..0fc32f23762a9 --- /dev/null +++ b/Formula/t/tty-share.rb @@ -0,0 +1,32 @@ +class TtyShare < Formula + desc "Terminal sharing over the Internet" + homepage "https://tty-share.com/" + url "https://github.com/elisescu/tty-share/archive/refs/tags/v2.4.1.tar.gz" + sha256 "abc186307a95f55f1750592a38871d4839d2ff26365880110bdf107675ea264a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "df6d54c41d4ea39472c924d0741c20d7bfcc0782a97886f64e01ab211c5ece41" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec03c0cba5c97e463a37e817eb97638bdb3b9111821fd1c44760ef33e0d33ada" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec03c0cba5c97e463a37e817eb97638bdb3b9111821fd1c44760ef33e0d33ada" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec03c0cba5c97e463a37e817eb97638bdb3b9111821fd1c44760ef33e0d33ada" + sha256 cellar: :any_skip_relocation, sonoma: "d89b2fc16110d5ee948280744ed4a703d86242a31f96e00ca98f1b6dcb3b9adf" + sha256 cellar: :any_skip_relocation, ventura: "d89b2fc16110d5ee948280744ed4a703d86242a31f96e00ca98f1b6dcb3b9adf" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfe97df24936c6e03ff13104c270616dde9944f4ab07456f844bab82f92776d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2a9c4c7c1155365d7eebcd4bfee4d22010b21584bc843f17d1b4c513182f01c" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + # Running `echo 1 | tty-share` ensures that the tty-share command doesn't have a tty at stdin, + # no matter the environment where the test runs in. + output_when_notty = `echo 1 | #{bin}/tty-share` + assert_equal output_when_notty, "Input not a tty\n" + end +end diff --git a/Formula/t/tty-solitaire.rb b/Formula/t/tty-solitaire.rb new file mode 100644 index 0000000000000..ebf69f5554964 --- /dev/null +++ b/Formula/t/tty-solitaire.rb @@ -0,0 +1,29 @@ +class TtySolitaire < Formula + desc "Ncurses-based klondike solitaire game" + homepage "https://github.com/mpereira/tty-solitaire" + url "https://github.com/mpereira/tty-solitaire/archive/refs/tags/v1.4.1.tar.gz" + sha256 "8eb536a87f0586e1f057a3aa05256df34cbd92a3e22545d1df2f945e27d89db2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68978167fdbd89196ad631d75fa0e2011379fcb816213f845b158f773a71815a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a922321fcc1b9359ea8696d2cdc9b67707d0a53066bba8107a4f0038ddc63283" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "781c758d098bb95bde662e5dcae67b09ccbc6b56ff68f82c1df7c45e9e06211b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ce1aa6d4a70db64d2beaa2cf33af2e8509c3477a10f29d2b711e6b58759b7fe8" + sha256 cellar: :any_skip_relocation, sonoma: "67af4c12cfc86dcaefbf8b1dd68018c3259203ee5cd5bebb593a9d8f3097581f" + sha256 cellar: :any_skip_relocation, ventura: "47de6fd6466b91c5ba555ae3046e1fde2055db67092b6c8111678b58602835df" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ce96af387a123810255fa0934cf9ce9dbc6fe576befef5da6c378bb1d20b5e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5612b22fbc7581b67e322b40374fd20d8ede4be785b1b38265e1ad3d94643b08" + end + + uses_from_macos "ncurses" + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"ttysolitaire", "-h" + end +end diff --git a/Formula/t/ttyd.rb b/Formula/t/ttyd.rb new file mode 100644 index 0000000000000..4acea82f4945e --- /dev/null +++ b/Formula/t/ttyd.rb @@ -0,0 +1,49 @@ +class Ttyd < Formula + desc "Command-line tool for sharing terminal over the web" + homepage "https://tsl0922.github.io/ttyd/" + url "https://github.com/tsl0922/ttyd/archive/refs/tags/1.7.7.tar.gz" + sha256 "039dd995229377caee919898b7bd54484accec3bba49c118e2d5cd6ec51e3650" + license "MIT" + revision 3 + head "https://github.com/tsl0922/ttyd.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "3575c39d033473cf334f3ae01be1c9545f167e31897ccece1e64ec818fd2923f" + sha256 arm64_sequoia: "286f33bd4f2d04694e70e27eec18b4d32ea7dcf8dbf609900b3d3391ec44eb50" + sha256 arm64_sonoma: "8871886dd83c2666e921d9891b5cf60ff3854efa699b19e8133add3fb2d80615" + sha256 arm64_ventura: "134a716ab6694dd2fa944bef6149f89e4555c06c2f5acf7798538f2895b820fa" + sha256 sonoma: "aef24f3864a335abb92a577d7c7a7bd23a41c1f7ba590e15b52cd899f4cddb8d" + sha256 ventura: "d15c58a5b7f85a28266fba4eaff26f6a114996d07b965d7797bf07d18264b747" + sha256 arm64_linux: "c9f58aa81b52998f825007e7a1d36705d5ef45bca7bfaf992c26c459f07ada38" + sha256 x86_64_linux: "3e25ce41430844029173828faaeb06116e7fe6a4722b3053dabf180ccb07426c" + end + + depends_on "cmake" => :build + depends_on "json-c" + depends_on "libevent" + depends_on "libuv" + depends_on "libwebsockets" + depends_on "openssl@3" + + uses_from_macos "vim" # needed for xxd + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + "-Dlibwebsockets_DIR=#{Formula["libwebsockets"].opt_lib}/cmake/libwebsockets", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + port = free_port + fork do + system bin/"ttyd", "--port", port.to_s, "bash" + end + sleep 5 + + system "curl", "-sI", "http://localhost:#{port}" + end +end diff --git a/Formula/t/ttygif.rb b/Formula/t/ttygif.rb new file mode 100644 index 0000000000000..ad99f0fd485af --- /dev/null +++ b/Formula/t/ttygif.rb @@ -0,0 +1,43 @@ +class Ttygif < Formula + desc "Converts a ttyrec file into gif files" + homepage "https://github.com/icholy/ttygif" + url "https://github.com/icholy/ttygif/archive/refs/tags/1.6.0.tar.gz" + sha256 "050b9e86f98fb790a2925cea6148f82f95808d707735b2650f3856cb6f53e0ae" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d5fce5ba582f5b18009dc239f63010c981ebf1181a5f34072d6550f73f2e8053" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6e237ea0e9b4a23fd56ec73b8946859eebcc2b4fb732c6268a9ce942db6ad8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "440b8d0af646eb7601a60d54d5af8813aa268593ebc3edd5dd1961f19915aee0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d782d59a6f04174b4d94642784cd3a3d3d3f9005c13f8e22a53d6c0473ebf4e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c953e6967a6bc0c649d81c226565818a223a509fc11e556c7bd242b347c888f0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "59d6b52ffd6c8f0680e6dda60fdf17dd1f445abb1339be73687dac519b847517" + sha256 cellar: :any_skip_relocation, sonoma: "660c1ff6f6e028646a79a81f535084202bcea231e9d574c74b6e3b01e8ba3373" + sha256 cellar: :any_skip_relocation, ventura: "3a0f3584b025375422648b2f6c7f5b59b1623253e61a5400f84e6974c62111d4" + sha256 cellar: :any_skip_relocation, monterey: "4c955eb6cda1e45e9668ad7eb8cd2f4c8d03754a4fb877a08fc4ffeb6c8602cb" + sha256 cellar: :any_skip_relocation, big_sur: "fd4346a5d4ff4e7fdbb5fefad4ab5943f927e43d7fb4fe5a45a496d6f8bf62f3" + sha256 cellar: :any_skip_relocation, catalina: "c9fcc9f4e6331acefe39cd12ed8c8ae353d028040526c84f98d6f656cd34af03" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f640f1292cd1506f8c97f9f177cb9dbeffa113ca28c36c65da9609c1770551b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6db4dfad8975d11c05ab0ffad2da2ca5864872948ba4e872323e9dee07c26289" + end + + depends_on "imagemagick" + depends_on "ttyrec" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # Disable test on Linux because it fails with this error: + # Error: WINDOWID environment variable was empty. + # This is expected as a valid X window ID is required: + # https://walialu.com/ttygif-error-windowid-environment-variable-was-empty + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + ENV["TERM_PROGRAM"] = "Something" + system bin/"ttygif", "--version" + end +end diff --git a/Formula/t/ttyplot.rb b/Formula/t/ttyplot.rb new file mode 100644 index 0000000000000..a2e58ca6e9bc9 --- /dev/null +++ b/Formula/t/ttyplot.rb @@ -0,0 +1,36 @@ +class Ttyplot < Formula + desc "Realtime plotting utility for terminal with data input from stdin" + homepage "https://github.com/tenox7/ttyplot" + url "https://github.com/tenox7/ttyplot/archive/refs/tags/1.7.1.tar.gz" + sha256 "d1624eea52abec5538c9b19bae00f81642c2d2886cd7755988466b74424ce9ca" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "816129fa92f1f7570a96c8ef72b50739cdf8b61aa1e82757b39ef9c7167743b0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91f2f451e768d21221e8ac31f5d6cfcac856315052a16bd213c5410166de3eb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a5b767fb22376073b1cba6e278d070248b8c8dd5823559360b36386218eed7f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39a3bd658a12d3eb8be9baa5ab23b4bc85c2cfacb96fd05aac64b8dfae705702" + sha256 cellar: :any_skip_relocation, sonoma: "a15fda21cf564d3fc84ec3930879758b07d6d462c08c086fab150957d56593e8" + sha256 cellar: :any_skip_relocation, ventura: "e2aad133932bcf084b6cfae316e8ff6bd1cdc51b449cbb0a918365bfd9ae1788" + sha256 cellar: :any_skip_relocation, arm64_linux: "9477520982405b4c6dcc165fefbf076da0774c10cf32e0423b4be6f88cb45742" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b1a52187d8e41064b9d3e9d6a6c452fdb03e989591ee0d05a2d4829280579e3" + end + + depends_on "pkgconf" => :build + uses_from_macos "ncurses" + + def install + system "make" + bin.install "ttyplot" + end + + test do + # `ttyplot` writes directly to the TTY, and doesn't stop even when stdin is closed. + assert_match "unit displayed beside vertical bar", shell_output("#{bin}/ttyplot -h") + end +end diff --git a/Formula/t/ttyrec.rb b/Formula/t/ttyrec.rb new file mode 100644 index 0000000000000..78544a40a0b45 --- /dev/null +++ b/Formula/t/ttyrec.rb @@ -0,0 +1,78 @@ +class Ttyrec < Formula + desc "Terminal interaction recorder and player" + homepage "http://0xcc.net/ttyrec/" + url "http://0xcc.net/ttyrec/ttyrec-1.0.8.tar.gz" + sha256 "ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec" + license "BSD-4-Clause" + revision 1 + + livecheck do + url :homepage + regex(/href=["']?ttyrec[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2b44b170e50cd4a45a34866f55c074aa7178b26a733350d471dff58709831cf0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1bc483dbae460cdc63985077a07ab767d1f3b3b2d614ef276a038a07bbaa479c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d151676ce6f3761eb16f59d01ebfc1504d63477695f5b5c8d178a0d5c095139a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8da60792e0827bc948f8f1f0ce1f4c2e223e987c62943e8d854887d2b3557de4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3ae3690abbab9b59cd40c4a0004f21c5277c5642484fed77c180115030fa637e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5538f4c65b9395dd35a7d9f975a7da59a9e9b1bc4cf09725b86d61c48755306a" + sha256 cellar: :any_skip_relocation, sonoma: "0e9bd8f7c2282ae05b62d8e632eca528d483830ecaadd072d8fa9de280720585" + sha256 cellar: :any_skip_relocation, ventura: "e9de3489dab176b7c6335e02bf2e58dbc83a31687a714af08ec3a4c4d5cd4be1" + sha256 cellar: :any_skip_relocation, monterey: "2e9366729fa85940745e55645c77c6f22c2ba47ad356159e5fc5564988e88e0b" + sha256 cellar: :any_skip_relocation, big_sur: "dc7756b323c5faf2006093ac2873d7805f5ddfc06df6bf5bcbcdd4fa70b2c328" + sha256 cellar: :any_skip_relocation, catalina: "6d893647087afa85234f60103507a5a878360d018816c557534d469c4edf7bf9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea3a96ddfe71319d95009cd84257f98d42a335e692aea071b9d9a718e2d58a89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2dd1acdb4519d34c1b28fced057623dcd6457c60def91150fd042ed6be04e481" + end + + resource "matrix.tty" do + url "http://0xcc.net/tty/tty/matrix.tty" + sha256 "76b8153476565c5c548aa04c2eeaa7c7ec8c1385bcf8b511c68915a3a126fdeb" + end + + # Fixes "ttyrec.c:209:20: error: storage size of ‘status’ isn’t known"; + # check `man 2 wait3`. + patch :DATA + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # macOS has openpty() in + # Reported by email to satoru@0xcc.net on 2017-12-20 + inreplace "ttyrec.c", "", "" if OS.mac? + + # openpty is a BSD function + ENV.append_to_cflags "-DHAVE_openpty" if OS.mac? + + system "make", "CFLAGS=#{ENV.cflags}" + bin.install %w[ttytime ttyplay ttyrec] + man1.install Dir["*.1"] + end + + test do + resource("matrix.tty").stage do + assert_equal "9\tmatrix.tty", shell_output("#{bin}/ttytime matrix.tty").strip + end + end +end + +__END__ +--- a/ttyrec.c ++++ b/ttyrec.c +@@ -203,11 +203,7 @@ doinput() + void + finish() + { +-#if defined(SVR4) + int status; +-#else /* !SVR4 */ +- union wait status; +-#endif /* !SVR4 */ + register int pid; + register int die = 0; + diff --git a/Formula/t/tuc.rb b/Formula/t/tuc.rb new file mode 100644 index 0000000000000..3695b998214eb --- /dev/null +++ b/Formula/t/tuc.rb @@ -0,0 +1,30 @@ +class Tuc < Formula + desc "Text manipulation and cutting tool" + homepage "https://github.com/riquito/tuc" + url "https://github.com/riquito/tuc/archive/refs/tags/v1.3.0.tar.gz" + sha256 "81dc5f4a0355ecdf9515c88c34c365d20f339d316df7dbe72667cd2b18445c61" + license "GPL-3.0-or-later" + head "https://github.com/riquito/tuc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d8368bcbeb63d6af7ba8c279723ccbbdf3779ade8f14a1dc7cac1db98b61d1bd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6423b86779b7adb9dbd51a0614bba4367c827aa90802ba4b6f9b64422b10110b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cecfa65eff149ea2095592f5ec310182b5801a62f4e2e09ce233838716e8674" + sha256 cellar: :any_skip_relocation, arm64_ventura: "82286170a0face60057a9bfcf202542473ac1f698915aa5390a15591e2e0452b" + sha256 cellar: :any_skip_relocation, sonoma: "9a308ef5da38037c8a7e77db5000aa2ef5fb52fe974e49f5f44522b199c939c0" + sha256 cellar: :any_skip_relocation, ventura: "464244aec270c457d24ce5059ddd6e105b19071c63032705e2cf21b6dd32e715" + sha256 cellar: :any_skip_relocation, arm64_linux: "de55cc6dc3472e93627ec3c691410cccc25ee560c1bf027cf39fac5ef88002a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6e58bc262cc056acb46774e08cd64f6eb7dc33d952ce4d8ade6ef3a29d5fda9" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--features", "regex", *std_cargo_args + end + + test do + output = pipe_output("#{bin}/tuc -e '[, ]+' -f 1,3", "a,b, c") + assert_equal "ac\n", output + end +end diff --git a/Formula/t/tuisky.rb b/Formula/t/tuisky.rb new file mode 100644 index 0000000000000..57c0300fa69c9 --- /dev/null +++ b/Formula/t/tuisky.rb @@ -0,0 +1,49 @@ +class Tuisky < Formula + desc "TUI client for bluesky" + homepage "https://github.com/sugyan/tuisky" + url "https://github.com/sugyan/tuisky/archive/refs/tags/v0.2.1.tar.gz" + sha256 "b87e50c8483624a2ccb4beeceb0503c3ad1f0a7ff3ac20a6da92eb952752c85d" + license "MIT" + head "https://github.com/sugyan/tuisky.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3598e2757c0abf6877e3263a5256b21f08973a5afaf9cfe96030c85169686ccd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b34ae115c6eec39e76460e02f3bb6756d12715293f45979205c44f5d775f019f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "58424b63780eb01f0eccbc9aef4e75120b18b8b7616dc60d12c4c04033502196" + sha256 cellar: :any_skip_relocation, arm64_ventura: "00bdf438a3637643b47f76f00eab585301fad00c9259fd37f524a4538f0608e6" + sha256 cellar: :any_skip_relocation, sonoma: "28edebdbb9dafc02fe03363746e2469db444a4bb7890bdbe9dd26fbcedfcfe2e" + sha256 cellar: :any_skip_relocation, ventura: "2f0f1a04028c894d1a914b5ccf8a270005f8fa67b09327a53f45470ad413248f" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf2ca0fca8f43e3f2281cdb30d8dd6224496e6bcdd64702b310bc1334b065c8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59d75761a312d19428ef28dbba6eae4a03cbb60c50975689470e16a795b458b4" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + + pkgetc.install "config/example.config.toml" => "config.toml" + end + + test do + assert_match version.to_s, shell_output("#{bin}/tuisky --version") + + # Fails in Linux CI with `No such device or address (os error 6)` + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + begin + output_log = testpath/"output.log" + pid = spawn bin/"tuisky", [:out, :err] => output_log.to_s + sleep 1 + assert_match "https://bsky.social", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/tun2proxy.rb b/Formula/t/tun2proxy.rb new file mode 100644 index 0000000000000..b9e835803a39d --- /dev/null +++ b/Formula/t/tun2proxy.rb @@ -0,0 +1,40 @@ +class Tun2proxy < Formula + desc "Tunnel (TUN) interface for SOCKS and HTTP proxies" + homepage "https://github.com/tun2proxy/tun2proxy" + url "https://github.com/tun2proxy/tun2proxy/archive/refs/tags/v0.7.16.tar.gz" + sha256 "23a14d0d38a2fcf48212fc2ce363039b332e8a0ca910f9210fd219c82ce44ca6" + license "MIT" + head "https://github.com/tun2proxy/tun2proxy.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8c886b1f88729f3fff662a7447255896d6df4ec4e31151821e708b8b84a2348" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "823da9036a92c50c9c274a6fab66f6b5aec820c0cb892ccd507c405dcbdbbb13" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c49fdda1bdd3b9f0874f64ae4265fd6779f42493cf0e6a530018f38f02ee701c" + sha256 cellar: :any_skip_relocation, sonoma: "557a4e0f65de26ea073aa4c2defdd526dae9b51b400de5b2b45936e24aae3d28" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b46dc728dff1df625f0e8980195780618a5862ee7d9acfa2806e30815c5dd34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8f520982edbe186ceb4b5b0286e690b5d65cb0bd86655bd00213bc11524a5d2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/tun2proxy-bin --version") + + expected = if OS.mac? + "Operation not permitted (os error 1)" + else + "No such file or directory (os error 2)" + end + + assert_match expected, shell_output("#{bin}/tun2proxy-bin --proxy socks5://127.0.0.1:1080 --tun utun4 2>&1", 1) + end +end diff --git a/Formula/t/tundra.rb b/Formula/t/tundra.rb new file mode 100644 index 0000000000000..208d8804747ed --- /dev/null +++ b/Formula/t/tundra.rb @@ -0,0 +1,78 @@ +class Tundra < Formula + desc "Code build system that tries to be fast for incremental builds" + homepage "https://github.com/deplinenoise/tundra" + url "https://github.com/deplinenoise/tundra/archive/refs/tags/v2.17.1.tar.gz" + sha256 "8cc16bf466b1006b089c132e46373fa651ed9fc5ef60d147a5af689f40686396" + license "MIT" + + # Upstream has tagged some versions without creating a GitHub release, so we + # have to check GitHub releases until we can correctly identify the latest + # version from the Git tags. However, the latest release on GitHub is simply + # "latest" instead of a version, so we have to use the `GithubReleases` + # strategy until `GithubLatest` works again. + livecheck do + url :stable + strategy :github_releases + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e1bb8df7048132f46b74c03364a0b546e27f608eb9868ddfe780678001ab5b2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b2b5072ea820f8d6c1d44cad48800a2e1df21bf2591587016627e8a945a460f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b3926c1298ab41348fd6ac3a6a1f50b7418a3651c8d8ce36a4fd17c58d7287a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4de7c173c546e24d82c32c49cdd38a6c5b171f31e265b60c31754688a6597fde" + sha256 cellar: :any_skip_relocation, sonoma: "8f50ea8f6274c56342341da47ba040fbbca36e7f3985c85754f22c22cf46ed5c" + sha256 cellar: :any_skip_relocation, ventura: "b7d16f6a49ea3f46004c2bd81f06db5b1bd3e61a623c7f74d32ccf0956e0bd7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "498d5c53b38c42f02714f86ad03052b2a901189cb92e0731c5ba7074488e1cca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fad1cea39ec00029ac59d256942a16e6e1d7fca077ad817e312257335bf32858" + end + + depends_on "googletest" => :build + + def install + ENV.append "CFLAGS", "-I#{Formula["googletest"].opt_include}/googletest/googletest" + inreplace "Makefile", "c++11", "c++17" + + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~'C' + #include + int main() { + printf("Hello World\n"); + return 0; + } + C + + os, cc = if OS.mac? + ["macosx", "clang"] + else + ["linux", "gcc"] + end + + (testpath/"tundra.lua").write <<~LUA + Build { + Units = function() + local test = Program { + Name = "test", + Sources = { "test.c" }, + } + Default(test) + end, + Configs = { + { + Name = "#{os}-#{cc}", + DefaultOnHost = "#{os}", + Tools = { "#{cc}" }, + }, + }, + } + LUA + system bin/"tundra2" + system "./t2-output/#{os}-#{cc}-debug-default/test" + end +end diff --git a/Formula/t/tunnel.rb b/Formula/t/tunnel.rb new file mode 100644 index 0000000000000..43d5af599d015 --- /dev/null +++ b/Formula/t/tunnel.rb @@ -0,0 +1,37 @@ +class Tunnel < Formula + desc "Expose local servers to the internet securely" + homepage "https://github.com/labstack/tunnel-client" + url "https://github.com/labstack/tunnel-client/archive/refs/tags/v0.5.15.tar.gz" + sha256 "7a57451416b76dbf220e69c7dd3e4c33dc84758a41cdb9337a464338565e3e6e" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e55c3ef84669231471ef0111b6f0d59b989a40a780def3d30badda873bb5374c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "847dc0c5ba0c3db3aa8f83cb4af3632bda3fa9bebd5a6a751c0d93a747575f7e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ff186e3d2a8616aa808392dc79c60676e30ccd766e8841aa2d7f6e23efa84ea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8bd84b399a3ff97b60c445f54dcc918c98fd1804bfb4fd4ffbf0c2583fa6327d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fc5f7baf6232a8be13a17350b3ac13d264c530e40c93cdc5aacbe9af856fb060" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "57607af5d1084a837f6dac59d268a9c5ed879acddac12840a1a4e8f375a070c6" + sha256 cellar: :any_skip_relocation, sonoma: "34cf449aea4ad5edcea70888c68936c178616ba84cf809565036701b421b9562" + sha256 cellar: :any_skip_relocation, ventura: "10d71f8a7917d1f09b4292bd74c0bf9b71191ecf2f771b16c4272c8825a82331" + sha256 cellar: :any_skip_relocation, monterey: "b63c0576e0a46d3177fcb0574dc63bc252885ab52840f3454eb3660f31fcb744" + sha256 cellar: :any_skip_relocation, big_sur: "cb4ebc8c76b4866aeaa4da672e81e7027ffad1f4d78a7867aa1b17511827b3bd" + sha256 cellar: :any_skip_relocation, catalina: "8119646cdda9c9578230f230b8b9156159d9adecbf30b1c8d6fed8ddbdce54bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "4718f19cf9adc078564221a450b1b8229d1aecfb0e7b6e1cd05c26eaf9a9d30d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a079e012dffd514c536355269716695a150db0dc30cd3ea2c27aee789615805" + end + + # `https://tunnel.labstack.com/docs` is no longer accessible + deprecate! date: "2025-02-23", because: :unmaintained + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/tunnel" + end + + test do + assert_match "you need an api key", shell_output("#{bin}/tunnel 8080", 1) + end +end diff --git a/Formula/t/tuntox.rb b/Formula/t/tuntox.rb new file mode 100644 index 0000000000000..7662a5fc6abdb --- /dev/null +++ b/Formula/t/tuntox.rb @@ -0,0 +1,60 @@ +class Tuntox < Formula + desc "Tunnel TCP connections over the Tox protocol" + homepage "https://gdr.name/tuntox/" + url "https://github.com/gjedeer/tuntox/archive/refs/tags/0.0.10.1.tar.gz" + sha256 "7f04ccf7789467ff5308ababbf24d44c300ca54f4035137f35f8e6cb2d779b12" + license "GPL-3.0-only" + head "https://github.com/gjedeer/tuntox.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "bff9afd8a3a6496881f6ad2d4920d3caf40cc4310b6240c989a1cc009e37ea5d" + sha256 cellar: :any, arm64_sequoia: "a89e240676e2a2acce9e69f80a92d36cf7a15f22668227aec6ac8cbd9aaffcc9" + sha256 cellar: :any, arm64_sonoma: "880d486454923edadb84110e8a318081260529b455c3efc848333b4ab798bdf9" + sha256 cellar: :any, arm64_ventura: "820efcfb534b933681932b0563ee91a092dd681e2bdfdcd16acec0f0a5615203" + sha256 cellar: :any, arm64_monterey: "7f5d128f4ce928c72171e3ea664e67c3e0a565beb4a26eb788691b8cabe543be" + sha256 cellar: :any, arm64_big_sur: "141a9a6dd20c4a5e8d880b4ce10781253ff13d49d1b2492391ae6a1fdc1a0437" + sha256 cellar: :any, sonoma: "4d32b28b2190221c4868f6066b1a4c7c7922f98365d6e78e702f1f74cd65963b" + sha256 cellar: :any, ventura: "652bf52893e79c3379b39c8865ab0618a9b6dfe82a40e7cb47b529e8a10d2058" + sha256 cellar: :any, monterey: "5a94edbe46870d5ba3103cd52264f4e814e7ea366aac1daa4b6a8f3c6e1a6429" + sha256 cellar: :any, big_sur: "610ffc38571ec6550991c9c055205253b61b74c130da1a1a193d4ad12789b611" + sha256 cellar: :any, catalina: "028fe7d07cced8a912fe1b8407d03ded470e4883726edcc7a0d4a0fbb14c50c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c2155cd3b704f8ff29fb52307f2283e88866d35558970169017fafed93ac096" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3cac8ddc89ca91fed03ad0907d5ad9ac15c02309a97949b6449d93a7d5449c8" + end + + depends_on "cscope" => :build + depends_on "pkgconf" => :build + depends_on "toxcore" + + def install + inreplace "gitversion.h", /.*/, '#define GITVERSION "N/A"' + inreplace "Makefile" do |s| + s.gsub! "gitversion.h: FORCE", "" + # -lrt substitution can be removed after 0.0.10.1 + s.gsub! "-lrt", "" if OS.mac? + end + system "make", "prefix=#{prefix}", "install" + end + + test do + require "open3" + + Open3.popen2e(bin/"tuntox") do |stdin, stdout_err, th| + pid = th.pid + stdin.close + sleep 5 + io = stdout_err.wait_readable(100) + refute_nil io + + out = io.read_nonblock(1024) + + begin + assert_includes out, "Using Tox ID" + ensure + Process.kill("SIGTERM", pid) + end + end + end +end diff --git a/Formula/t/tup.rb b/Formula/t/tup.rb new file mode 100644 index 0000000000000..a987034b1f8cf --- /dev/null +++ b/Formula/t/tup.rb @@ -0,0 +1,31 @@ +class Tup < Formula + desc "File-based build system" + homepage "https://gittup.org/tup/" + url "https://github.com/gittup/tup/archive/refs/tags/v0.8.tar.gz" + sha256 "45ca35c4c1d140f3faaab7fabf9d68fd9c21074af2af9a720cff4b27cab47d07" + license "GPL-2.0-only" + revision 1 + head "https://github.com/gittup/tup.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "04d0f54b9afb1fd40a96877e366db5a482b201e01e2d5bde296c618c1738314d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d1f0921353b16d91b7e91ad6bbaf443f784eebb3f9d1f2ce22058e3e888d9f5" + end + + depends_on "pkgconf" => :build + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + ENV["TUP_LABEL"] = version + system "./build.sh" + bin.install "build/tup" + man1.install "tup.1" + doc.install (buildpath/"docs").children + pkgshare.install "contrib/syntax" + end + + test do + system bin/"tup", "-v" + end +end diff --git a/Formula/t/turso.rb b/Formula/t/turso.rb new file mode 100644 index 0000000000000..81fa89a638b6a --- /dev/null +++ b/Formula/t/turso.rb @@ -0,0 +1,62 @@ +class Turso < Formula + desc "Interactive SQL shell for Turso" + homepage "https://github.com/tursodatabase/turso" + url "https://github.com/tursodatabase/turso/archive/refs/tags/v0.3.2.tar.gz" + sha256 "f9c04914f1aecebdef2b20335348d9a9ba06730f600408d66e4e43a993691dc5" + license "MIT" + head "https://github.com/tursodatabase/turso.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ad0d62c1d75c47f14528850203753be9afca92515c9d854a928c71ce3df730ba" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb807b8c7c07c4484fbbe8b0f49ce719dd043fc63c99bebdd96d143b56fac885" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2394c51edc692232157564e664aed0a2e57681fb2064867e82fb321bf91e813d" + sha256 cellar: :any_skip_relocation, sonoma: "61e1a22c25ff297452a75a9918c00817b8f3e7a6fd3ca44a8dcdffb9a2c8b77b" + sha256 cellar: :any_skip_relocation, arm64_linux: "701b1bb4edcae8fc1b74289f31eba12d51b7c08915c1c2420a4066f2b90d7329" + sha256 cellar: :any_skip_relocation, x86_64_linux: "736440df08755f57554b39364e1f90bf280c73d1ad04be483f6eb6be8f717006" + end + + depends_on "rust" => :build + uses_from_macos "sqlite" => :test + + # Fix to error unsupported option '-mcrypto|-maes' for target 'arm64-apple-macosx' + # PR ref: https://github.com/tursodatabase/turso/pull/3561 + patch do + url "https://github.com/tursodatabase/turso/commit/0ef0c7587979ce3f6863599e387c9ef6e93abe75.patch?full_index=1" + sha256 "788ffb4a456318a16073784b940fe6c10376dc54bc4408ca6d55db068b888303" + end + + def install + # Workaround to build `aegis v0.9.3` for arm64 linux without -march `sha3` + ENV.append_to_cflags "-march=native" if OS.linux? && Hardware::CPU.arm? + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/tursodb --version") + + # Fails in Linux CI with "Error: I/O error: Operation not permitted (os error 1)" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + data = %w[Bob 14 Sue 12 Tim 13] + create = "create table students (name text, age integer);\n" + data.each_slice(2) do |n, a| + create << "insert into students (name, age) values ('#{n}', '#{a}');\n" + end + pipe_output("sqlite3 school.sqlite", create, 0) + + begin + output_log = testpath/"output.log" + pid = spawn bin/"tursodb", "school.sqlite", [:out, :err] => output_log.to_s + sleep 2 + assert_match "\".help\" for usage hints.", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/t/tut.rb b/Formula/t/tut.rb new file mode 100644 index 0000000000000..89627273f65ef --- /dev/null +++ b/Formula/t/tut.rb @@ -0,0 +1,35 @@ +class Tut < Formula + desc "TUI for Mastodon with vim inspired keys" + homepage "https://tut.anv.nu" + url "https://github.com/RasmusLindroth/tut/archive/refs/tags/2.0.1.tar.gz" + sha256 "afa8c49036461a36c091d83ef51f9a3bbd938ee78f817c6467175699a989b863" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "42b58b435946efe9b969c3b218c1f7a1786500807f93676a4d31b1680c426942" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51d7ac8bcdb9eff188e5480de11bc29d8b0adca36c195cf3adaddd631a4db1d4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "36cee035f905ca3370c02f3ce18a6447a9cc10a299675001933607f80480b3f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73a5450eb16784d6c42f63e497748c837d663e796d910ac7a1a839f694d6d91a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "af53e3fc39990fc439f5613e1931c24bc38d05526cebd108edcc24d298ad9f86" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a32649707bb41ba0dbbda69879cc9fdfdbc7e5611399ffdebe54b9857f8e8bd7" + sha256 cellar: :any_skip_relocation, sonoma: "a9e3f9b4605812f27a115fcc6a299a36676b99d1fedb89e06a33801c4e0ee3b8" + sha256 cellar: :any_skip_relocation, ventura: "bb9f6d0b46819c74ed5c2b82d85bb320153853fcb826b8637b6ca6632fc9098f" + sha256 cellar: :any_skip_relocation, monterey: "dc6cd4fa84bc565c7f22bab2a4d55e8c313a67ecf21978a98a40cbb7fad5e4f2" + sha256 cellar: :any_skip_relocation, big_sur: "931e7398ad80e6374b97fa18da74d2973698e9ef732995347e1bd01a9ac04a8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "57654e947d5c94cdbccd46dadc822ea72599793f890f12ae8823d617443aa53a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3b8f56c413f16c8c270d137048c2a2d7f2f68418f20f7a5b67c6ba2f1d18167" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/tut --version") + assert_match "Instance:", pipe_output("#{bin}/tut --new-user 2> /dev/null") + end +end diff --git a/Formula/t/tvnamer.rb b/Formula/t/tvnamer.rb new file mode 100644 index 0000000000000..d1be15f24f713 --- /dev/null +++ b/Formula/t/tvnamer.rb @@ -0,0 +1,63 @@ +class Tvnamer < Formula + include Language::Python::Virtualenv + + desc "Automatic TV episode file renamer that uses data from thetvdb.com" + homepage "https://github.com/dbr/tvnamer" + url "https://files.pythonhosted.org/packages/7e/07/688dc96a86cf212ffdb291d2f012bc4a41ee78324a2eda4c98f05f5e3062/tvnamer-3.0.4.tar.gz" + sha256 "dc2ea8188df6ac56439343630466b874c57756dd0b2538dd8e7905048f425f04" + license "Unlicense" + revision 10 + head "https://github.com/dbr/tvnamer.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2938bf51e08d22399680d1b0658a8fb15fcdd26d46d9664474187799b5e296cb" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-cache" do + url "https://files.pythonhosted.org/packages/0c/d4/bdc22aad6979ceeea2638297f213108aeb5e25c7b103fa02e4acbe43992e/requests-cache-0.5.2.tar.gz" + sha256 "813023269686045f8e01e2289cc1e7e9ae5ab22ddd1e2849a9093ab3ab7270eb" + end + + resource "tvdb-api" do + url "https://files.pythonhosted.org/packages/a9/66/7f9c6737be8524815a02dd2edd3a24718fa786614573104342eae8d2d08b/tvdb_api-3.1.0.tar.gz" + sha256 "f63f6db99441bb202368d44aaabc956acc4202b18fc343a66bf724383ee1f563" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + raw_file = testpath/"brass.eye.s01e01.avi" + expected_file = testpath/"Brass Eye - [01x01] - Animals.avi" + touch raw_file + system bin/"tvnamer", "-b", raw_file + assert_path_exists expected_file + end +end diff --git a/Formula/t/twarc.rb b/Formula/t/twarc.rb new file mode 100644 index 0000000000000..1369c40dc8c4f --- /dev/null +++ b/Formula/t/twarc.rb @@ -0,0 +1,140 @@ +class Twarc < Formula + include Language::Python::Virtualenv + + desc "Command-line tool and Python library for archiving Twitter JSON" + homepage "https://github.com/DocNow/twarc" + url "https://files.pythonhosted.org/packages/44/1e/b124f63e6b220c0bd85abe062b77809a0cfd2e9e6d8aed25f9069687df5a/twarc-2.14.1.tar.gz" + sha256 "54537495c6575863769e82ba4a0db7d68538e7c5afa9b8fcc8856a0ae94d9fa0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5d3a127a7b46efa8bcb391710a9f5aa29658e58c5fe61f98d18ec2a7ac111ea0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "583aafb5dc3bfdf6d172d3cb3b31f9aac6d6e4b656db6746aca71fcead8d45b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3ca42e6d22c10a0bccdd8e8360bedec03e0814eb0940d8c68ff03c6020c4305" + sha256 cellar: :any_skip_relocation, sonoma: "cb1b24aaa73b69d3feb1e34b5b5c61e04260ae247bea3db5297b519f547eab2e" + sha256 arm64_linux: "5517806c5d66a65bb1d555bd6ff31a42cfce3fe14dbd44e1607c146abc6c5506" + sha256 x86_64_linux: "87c7ac41550c8909529c200c4dde5199b543f4f4510a19da1d216aa0767e7b8f" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "numpy" => :no_linkage + depends_on "python@3.14" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[certifi numpy] + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-config-file" do + url "https://files.pythonhosted.org/packages/13/09/dfee76b0d2600ae8bd65e9cc375b6de62f6ad5600616a78ee6209a9f17f3/click_config_file-0.6.0.tar.gz" + sha256 "ded6ec1a73c41280727ec9c06031e929cdd8a5946bf0f99c0c3db3a71793d515" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/b6/43/50033d25ad96a7f3845f40999b4778f753c3901a11808a584fed7c00d9f5/humanize-4.14.0.tar.gz" + sha256 "2fa092705ea640d605c435b1ca82b2866a1b601cdf96f076d70b79a855eba90d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "pandas" do + url "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz" + sha256 "e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" + sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-oauthlib" do + url "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz" + sha256 "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "twarc-csv" do + url "https://files.pythonhosted.org/packages/33/c5/cabde70e45eeec51b550a2f581d812b3bb7b3f3d01381d31acda1a7963f4/twarc-csv-0.7.2.tar.gz" + sha256 "8d62f426bd6c7dd0b7848078382ace2e847843e2598fc91b0e88ae42888ec9f4" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + assert_equal "usage: twarc [-h] [--log LOG] [--consumer_key CONSUMER_KEY]", + shell_output("#{bin}/twarc -h").chomp.split("\n").first + end +end diff --git a/Formula/t/tweak.rb b/Formula/t/tweak.rb new file mode 100644 index 0000000000000..74b64dd17ba11 --- /dev/null +++ b/Formula/t/tweak.rb @@ -0,0 +1,42 @@ +class Tweak < Formula + desc "Command-line, ncurses library based hex editor" + homepage "https://www.chiark.greenend.org.uk/~sgtatham/tweak/" + url "https://www.chiark.greenend.org.uk/~sgtatham/tweak/tweak-3.02.tar.gz" + sha256 "5b4c19b1bf8734d1623e723644b8da58150b882efa9f23bbe797c3922f295a1a" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?tweak[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cd057cbf1a867eb44bdb3754dd80b9332866977d6fa19c6ecffd35e11df4f5cc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bf452cf3fc91bce4ad69ee5bea2c8485c80aac9efad963b3492cd10d2eb83619" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7696232f907f0fb9d98fdd2b1fbff035fddfa50180f63b0edef3c556f8b0aeb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71052661cea0d22a4808275349d795438ae29ecee01aa145e0d0cef0214e6642" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a7fd74395285898f8a5d187c349de12b3cdb658b3b613e0dde445e1c679de808" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c5688f682787ca49543c2a6bed37237fc52c4ecd11707ec7d5688eaa60e9bf21" + sha256 cellar: :any_skip_relocation, sonoma: "6f735e94f919b22d47f9ed92dc74cace693042f6f3c01ad2910c0ff1241c9bd1" + sha256 cellar: :any_skip_relocation, ventura: "f124b1cff60dee61f0128c440f647f34e8b38bedc1b9120b822a5a3b50e4c2c8" + sha256 cellar: :any_skip_relocation, monterey: "398bfc5cdc33b289dd14f243ba00a3bfc9281878588fd2995931931e87dfdeb8" + sha256 cellar: :any_skip_relocation, big_sur: "db84e159f437b7ba3c6592ee9564842e6d21823325777c2317acdda483d452bd" + sha256 cellar: :any_skip_relocation, catalina: "a38441e05b3953b324cee772161ebb1ccf12bf2262c476af921fee963fdee413" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e1f2f53b18e654221c1d61699c1e766fe53d5df15add6ef0b4aac050ea7b618" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44b7907316240a0b5efb6a1025c22664da20e509d1d7d9787a7bdaa060d4c06f" + end + + uses_from_macos "ncurses" + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man1}" + end + + test do + output = shell_output("#{bin}/tweak -D") + assert_match "# Default .tweakrc generated", output + end +end diff --git a/Formula/t/tweakcc.rb b/Formula/t/tweakcc.rb new file mode 100644 index 0000000000000..85021e9d2654e --- /dev/null +++ b/Formula/t/tweakcc.rb @@ -0,0 +1,30 @@ +class Tweakcc < Formula + desc "Customize your Claude Code themes, thinking verbs, and more" + homepage "https://github.com/Piebald-AI/tweakcc" + url "https://registry.npmjs.org/tweakcc/-/tweakcc-2.0.3.tgz" + sha256 "43d64a758edd3fdbe2e14676baaa7ca8c2c2fa475509bd775730fa30b15e5d7d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4798bfec559745464168aba0d6047b1db1337495d27edb12a2acebebe3fc644d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4798bfec559745464168aba0d6047b1db1337495d27edb12a2acebebe3fc644d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4798bfec559745464168aba0d6047b1db1337495d27edb12a2acebebe3fc644d" + sha256 cellar: :any_skip_relocation, sonoma: "6e8c4a1bf31e09cb091860094bd11a00f69b1f0c2f5d2da672a2c48bc0b81edf" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e8c4a1bf31e09cb091860094bd11a00f69b1f0c2f5d2da672a2c48bc0b81edf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e8c4a1bf31e09cb091860094bd11a00f69b1f0c2f5d2da672a2c48bc0b81edf" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/tweakcc --version") + + output = shell_output("#{bin}/tweakcc --apply 2>&1", 1) + assert_match "Applying saved customizations to Claude Code", output + end +end diff --git a/Formula/t/twine.rb b/Formula/t/twine.rb new file mode 100644 index 0000000000000..e43a98d39a295 --- /dev/null +++ b/Formula/t/twine.rb @@ -0,0 +1,138 @@ +class Twine < Formula + include Language::Python::Virtualenv + + desc "Utilities for interacting with PyPI" + homepage "https://github.com/pypa/twine" + url "https://files.pythonhosted.org/packages/e0/a8/949edebe3a82774c1ec34f637f5dd82d1cf22c25e963b7d63771083bbee5/twine-6.2.0.tar.gz" + sha256 "e5ed0d2fd70c9959770dce51c8f39c8945c574e18173a7b81802dab51b4b75cf" + license "Apache-2.0" + head "https://github.com/pypa/twine.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3227f0e354b08ccfed685d5fc026f94d38165bdc3a43418744e6e891dbcb7f28" + sha256 cellar: :any, arm64_sequoia: "ce34d75acb8e41e2e5ba344e81141361903ac26fa42bbb110240cf1808979af4" + sha256 cellar: :any, arm64_sonoma: "771a981146bd5a6a9aa09802af7f867c8bcfbcfb2c5b74391ee72822a5991fec" + sha256 cellar: :any, sonoma: "41494a474a94b87b22446119a8d60b14efea0f2e537b53b41013e83e9782d506" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c6779dbb92779f2b0b428658827127d5ed8bf078c948027da55f3d41d0cf0e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f84d039eaa74629b4ada4b29207ba34642cf3f2094107efe444a8b09463bd18e" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz" + sha256 "9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d" + end + + resource "id" do + url "https://files.pythonhosted.org/packages/22/11/102da08f88412d875fa2f1a9a469ff7ad4c874b0ca6fed0048fe385bdb3d/id-1.5.0.tar.gz" + sha256 "292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "nh3" do + url "https://files.pythonhosted.org/packages/cf/a6/c6e942fc8dcadab08645f57a6d01d63e97114a30ded5f269dc58e05d4741/nh3-0.3.1.tar.gz" + sha256 "6a854480058683d60bdc7f0456105092dae17bef1f300642856d74bd4201da93" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "readme-renderer" do + url "https://files.pythonhosted.org/packages/5a/a9/104ec9234c8448c4379768221ea6df01260cd6c2ce13182d4eac531c8342/readme_renderer-44.0.tar.gz" + sha256 "8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-toolbelt" do + url "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" + sha256 "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + end + + resource "rfc3986" do + url "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" + sha256 "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + pkgshare.install "tests/fixtures/twine-1.5.0-py2.py3-none-any.whl" + end + + test do + wheel = "twine-1.5.0-py2.py3-none-any.whl" + cmd = "#{bin}/twine upload -uuser -ppass #{pkgshare}/#{wheel} 2>&1" + assert_match(/Uploading.*#{wheel}.*HTTPError: 403/m, shell_output(cmd, 1)) + end +end diff --git a/Formula/t/twitch-cli.rb b/Formula/t/twitch-cli.rb new file mode 100644 index 0000000000000..3ca72fca1002d --- /dev/null +++ b/Formula/t/twitch-cli.rb @@ -0,0 +1,31 @@ +class TwitchCli < Formula + desc "CLI to make developing on Twitch easier" + homepage "https://github.com/twitchdev/twitch-cli" + url "https://github.com/twitchdev/twitch-cli/archive/refs/tags/v1.1.25.tar.gz" + sha256 "63d13cd54b64e17237650d7aaadb1453fe28565f54111be056beb24d58831c67" + license "Apache-2.0" + head "https://github.com/twitchdev/twitch-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "138964474a40f751a228aaf34807b3040c906fa223af73c80bf948a1f41fc4d1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46c2326b2b21618cdbc86c7469e863301a71a1e9ab5b5f3313c5e204cb62e099" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd89ac2c534af562c2213b52eaa12a181c145d099d86f45ef80e5af0926a8ed3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f9c5a15fb1412f96d2db036f72bf1c72dc36643d8f067ff6ed7937d132f7153" + sha256 cellar: :any_skip_relocation, sonoma: "7c4a06fb87e8f90426d94117dddd7ccfba176b57084331c9e9b04ca473e71271" + sha256 cellar: :any_skip_relocation, ventura: "d6d991cb51f10126ceb455fc579dc97ec278cd14b007d3267670ff09b536d436" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d934024bce9a3de783dce2c8929ac17f822ac8632d4b786da4c5953713ade24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe71e31769022181108b966e4adadaab884c53a3ebdb754b70be5cd613475c23" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.buildVersion=#{version}", output: bin/"twitch") + end + + test do + assert_match version.to_s, shell_output("#{bin}/twitch version") + output = shell_output("#{bin}/twitch mock-api generate 2>&1") + assert_match "Name: Mock API Client", output + end +end diff --git a/Formula/t/twm.rb b/Formula/t/twm.rb new file mode 100644 index 0000000000000..8721f9ecf04dd --- /dev/null +++ b/Formula/t/twm.rb @@ -0,0 +1,49 @@ +class Twm < Formula + desc "Tab Window Manager for X Window System" + homepage "https://www.x.org/" + url "https://www.x.org/releases/individual/app/twm-1.0.13.1.tar.xz" + sha256 "a52534755aa8b492c884e52fa988bac84ab4d54641954679b9aaf08e323df2c5" + license "X11" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "10c97cb0c9229ad2c77532f6c83736b5e31eb33dc08fe84cd2bd8f7545c56c64" + sha256 arm64_sequoia: "55081cc48b42c43ff5affd9958066960f6e178282d70022d70811ae3c6376d91" + sha256 arm64_sonoma: "1cfdeb205b58d944d90a7a9e46cdb1fb38b2562512b780e951ec746e7da97ea9" + sha256 arm64_ventura: "2674ec6c6954c05425a89ebe7833f275defe6ccbd8bdd550c26a78f86159f7af" + sha256 sonoma: "e1caa71427548f73cec6e7e4c43249b4293979ba2f90731c1add941f86c7b4f9" + sha256 ventura: "003cc59faaf5062d86c004e73c46d501b635999f8e743375fd7b6d301b183639" + sha256 arm64_linux: "4371c26596b82bc06d424f527663fd20cee9d63b301b712c38d0fd95d5ea1ab7" + sha256 x86_64_linux: "6993e42ad8cfc6af686eeadf5e0c970b4d23de655c5485562b14f34997c1caee" + end + + depends_on "pkgconf" => :build + + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + depends_on "libxext" + depends_on "libxmu" + depends_on "libxrandr" + depends_on "libxt" + + uses_from_macos "bison" => :build + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + fork do + exec Formula["xorg-server"].bin/"Xvfb", ":1" + end + ENV["DISPLAY"] = ":1" + sleep 10 + fork do + exec bin/"twm" + end + end +end diff --git a/Formula/t/two-lame.rb b/Formula/t/two-lame.rb new file mode 100644 index 0000000000000..cae28a42db7a5 --- /dev/null +++ b/Formula/t/two-lame.rb @@ -0,0 +1,36 @@ +class TwoLame < Formula + desc "Optimized MPEG Audio Layer 2 (MP2) encoder" + homepage "https://www.twolame.org/" + url "https://downloads.sourceforge.net/project/twolame/twolame/0.4.0/twolame-0.4.0.tar.gz" + sha256 "cc35424f6019a88c6f52570b63e1baf50f62963a3eac52a03a800bb070d7c87d" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3d0622b14c8204b38bc567923186649071882fca6ef5e8315d049958c07ca5ed" + sha256 cellar: :any, arm64_sequoia: "8adffc94879ee562f0f12517db906144dffb3e5154318eb23bd33426834f32dd" + sha256 cellar: :any, arm64_sonoma: "0a0ff83aa3691d3f363db88871bcc231cb139461f7cb5d1fd8bffa80d52a09b4" + sha256 cellar: :any, arm64_ventura: "7ea2224ac3c69dcbbc8a2bced6b9bd1b478effea5ded33806420e70e51f396dd" + sha256 cellar: :any, arm64_monterey: "3b49ddbaac0612e42ffcfa8cda457d5602063d645f124da8c6353f15abc5c9c5" + sha256 cellar: :any, arm64_big_sur: "15f7868c873400af4b2f9e566356bfa00217f563d51511120367c4dc75d2867f" + sha256 cellar: :any, sonoma: "eba83a95de7443f34b27409f9bbb2d85311020f71f41d6611f430eafad9fa792" + sha256 cellar: :any, ventura: "5d52f911e18dfde2ae188d42b7f57033c4b246771da3faebd7b276962f6e88e4" + sha256 cellar: :any, monterey: "5f40da46c678cf30b76918f6ba6d38a80425fe52b6fd06c290608de175b3cfad" + sha256 cellar: :any, big_sur: "4847a0b0e48b6f8ac14113793e18a6b31d8dce22b09dc707c35306ec2b3ecdfa" + sha256 cellar: :any, catalina: "9ba9f3afb14f2ac2fa911046a83ee50ed6a93d747f0c305788a61b4138e5fe5a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7878b98ffa5f6ca3ab73a54876e159bc42fa4bbfb9d73a5d7fa60af97d85812a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a0261525798a434c29f332eaa62ed01cf06c4bb2bdf76a64cdf2e6a46fd1b0a" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + bin.install "simplefrontend/.libs/stwolame" + end + + test do + system bin/"stwolame", test_fixtures("test.wav"), "test.mp2" + end +end diff --git a/Formula/t/two-ms.rb b/Formula/t/two-ms.rb new file mode 100644 index 0000000000000..38c2f37aaa87f --- /dev/null +++ b/Formula/t/two-ms.rb @@ -0,0 +1,40 @@ +class TwoMs < Formula + desc "Detect secrets in files and communication platforms" + homepage "https://github.com/Checkmarx/2ms" + url "https://github.com/Checkmarx/2ms/archive/refs/tags/v4.6.0.tar.gz" + sha256 "cb969c70294b3870768c4b1be036e577fdec54384e2db25360c265eccaf17b3b" + license "Apache-2.0" + head "https://github.com/Checkmarx/2ms.git", branch: "master" + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "00a3d4048b412ba6dfe482a03935b6f520e55f49d36c74065026ae2dd6e551e9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "47b55690b091fe9c8506a4fc7f8f93c680f8790f43d7fe436dfd53d2d577e50a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "146eb8814dfa484867cb4ad58f8d791b91d074c06d65c18a4fc7fdc595404af2" + sha256 cellar: :any_skip_relocation, sonoma: "e6840899b1e2120bbdf7864ed18787bbef2356ce4529e3e4610f567df2c1bdcc" + sha256 cellar: :any_skip_relocation, arm64_linux: "402864fc67c28ad2447ee703a890fa90d803d6c1761e85628ec129735b04e97c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b95ba06de301a613c84cf0a43052c3c5d8e42457f8b383a0174987319a322d6d" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/checkmarx/2ms/v#{version.major}/cmd.Version=v#{version}" + system "go", "build", *std_go_args(ldflags: ldflags, output: bin/"2ms"), "main.go" + end + + test do + assert_match version.to_s, shell_output("#{bin}/2ms --version") + + (testpath/"secret_test.txt").write <<~EOS + "client_secret" : "6da89121079f83b2eb6acccf8219ea982c3d79bccc3e9c6a85856480661f8fde", + EOS + + output = shell_output("#{bin}/2ms filesystem --path #{testpath}/secret_test.txt --validate", 2) + assert_match "Detected a Generic API Key", output + end +end diff --git a/Formula/t/twoping.rb b/Formula/t/twoping.rb new file mode 100644 index 0000000000000..6de0ce0add4db --- /dev/null +++ b/Formula/t/twoping.rb @@ -0,0 +1,41 @@ +class Twoping < Formula + include Language::Python::Virtualenv + + desc "Ping utility to determine directional packet loss" + homepage "https://www.finnie.org/software/2ping/" + url "https://www.finnie.org/software/2ping/2ping-4.5.1.tar.gz" + sha256 "b56beb1b7da1ab23faa6d28462bcab9785021011b3df004d5d3c8a97ed7d70d8" + license "MPL-2.0" + revision 1 + head "https://github.com/rfinnie/2ping.git", branch: "main" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "36ac72c9db470317e921501d45104718203129dfdcfd8d1671c6136154fd82b4" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + + man1.install "doc/2ping.1" + man1.install_symlink "2ping.1" => "2ping6.1" + bash_completion.install "2ping.bash_completion" => "2ping" + end + + service do + run [opt_bin/"2ping", "--listen", "--quiet"] + keep_alive true + require_root true + log_path File::NULL + error_log_path File::NULL + end + + test do + assert_match "OK 2PING", shell_output( + "#{bin}/2ping --count=10 --interval=0.2 --port=-1 --interface-address=127.0.0.1 " \ + "--listen --nagios=1000,5%,1000,5% 127.0.0.1", + ) + end +end diff --git a/Formula/t/twtxt.rb b/Formula/t/twtxt.rb new file mode 100644 index 0000000000000..f8f881d978e8a --- /dev/null +++ b/Formula/t/twtxt.rb @@ -0,0 +1,114 @@ +class Twtxt < Formula + include Language::Python::Virtualenv + + desc "Decentralised, minimalist microblogging service for hackers" + homepage "https://github.com/buckket/twtxt" + url "https://files.pythonhosted.org/packages/fc/4c/cff74642212dbca8d4d9059119555cd335324b3da0b52990a414a0257756/twtxt-1.3.1.tar.gz" + sha256 "f15e580f8016071448b24048402b939b9e8dec07eabacd84b1f2878d751b71ff" + license "MIT" + revision 6 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "770eca225a0a54216e7df9eeabc1f62662ad7c3e843ec7932fe5f8fa9dc3ebfd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65084f6db31ebe76cb66b50614e0efc3fc33ce5d5b2d8b7b5b95c6b41301cbae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "98acc47c361296e7cd9d4d6d85e355b81bc91f6418ab7425c8868b5faf7d167e" + sha256 cellar: :any_skip_relocation, tahoe: "cc6acc2cf1214951a2fa8c20f71559d3a7bb1964f04067c38459026db532c608" + sha256 cellar: :any_skip_relocation, sequoia: "f3786d5fb528221022304c98473b3a95b99a9a97075ef2423b4ba70b7fa130b7" + sha256 cellar: :any_skip_relocation, sonoma: "68cce3972d43daca56824086ee5abe882b5e48dfb176f54adfbe48a32271c09a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e56165f0ffc1993594d02f626a9fba47a06d26237f702e9fb47fff1df48f5a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40b14baf842363c7ec3cfb9a64196afc01fb7d6d35b11c2678a87d9adcf33047" + end + + depends_on "python@3.14" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/98/1d/3062fcc89ee05a715c0b9bfe6490c00c576314f27ffee3a704122c6fd259/humanize-4.13.0.tar.gz" + sha256 "78f79e68f76f0b04d711c4e55d32bebef5be387148862cb1ef83d2b58e7935a0" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + # Drop setuptools dep: https://github.com/buckket/twtxt/pull/178 + patch do + url "https://github.com/buckket/twtxt/commit/12bdd3670bff339fd27a7cd71c8ec64086b4ae5b.patch?full_index=1" + sha256 "e206e7d18040d2b6c0d93ef2d7e4770c3e24448621bc6b5e0f206e193c6298ad" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"twtxt", shell_parameter_format: :click) + end + + test do + (testpath/"config").write <<~INI + [twtxt] + nick = homebrew + twtfile = twtxt.txt + [following] + brewtest = https://example.org/alice.txt + INI + assert_match "✓ You’ve unfollowed brewtest", shell_output("#{bin}/twtxt -c config unfollow brewtest") + + assert_match version.to_s, shell_output("#{bin}/twtxt --version") + end +end diff --git a/Formula/t/twty.rb b/Formula/t/twty.rb new file mode 100644 index 0000000000000..900d9211daf0f --- /dev/null +++ b/Formula/t/twty.rb @@ -0,0 +1,49 @@ +class Twty < Formula + desc "Command-line twitter client written in golang" + homepage "https://github.com/mattn/twty/" + url "https://github.com/mattn/twty/archive/refs/tags/v0.0.13.tar.gz" + sha256 "4e76ada5e7c5f2e20881fbf303fb50d3d4a443a8e37f2444371a90102737e49b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06376606f273478b5bbcb8f781549cf79bf9b4cf596cc3a274104c1dca2704ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "455017b709a05e29e56106d6fafd24f4e9c09fba6d18bcc2b8a5173faf1d21c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f646e71ba538e0406565dde123ecea7cc153510e53abd19373d1bd3ec159173e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c6bab324fcbfdfd720834fae87499bd2725318394393f63f277c0212d5a56ce4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cfda1fe3c8de3bec08877dfc0d1ed0c33c9f88094fb2514e23b724305ec15ee4" + sha256 cellar: :any_skip_relocation, sonoma: "020ce84c0f8943cc35f54c2bd93e1b115405b8a54b084dc30470dca34ab4a77b" + sha256 cellar: :any_skip_relocation, ventura: "5805a300e13f68dcbe7b998bab1c07bee79ad2d62e666a25c67e4ac73759b78f" + sha256 cellar: :any_skip_relocation, monterey: "de800aefbbc7f4299b2b8db41be41f8270c8bfda3b926e1e6fafa1d67c4bdcf1" + sha256 cellar: :any_skip_relocation, big_sur: "a77b1519634272bbb35b4f5fa588cc2cda46fc8aacf6414205291900e18a1ece" + sha256 cellar: :any_skip_relocation, catalina: "65a106670027565383dee061957cd83963dc4df76bd7725b4d4ae40b21bfdc55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb45326df2a5cb80531378ae156fc20400346d5c5c8d82548429b62463ec603e" + end + + # see discussions in https://github.com/mattn/twty/issues/28 + # and https://github.com/orakaro/rainbowstream/issues/342 + disable! date: "2025-01-01", because: "uses the old, unsupported Twitter API" + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # Prevent twty executing open or xdg-open + testpath_bin = testpath/"bin" + ENV.prepend_path "PATH", testpath_bin + testpath_bin.install_symlink which("true") => "open" + testpath_bin.install_symlink which("true") => "xdg-open" + + # twty requires PIN code from stdin and putting nothing to stdin to make authentication failed + require "pty" + PTY.spawn(bin/"twty") do |r, _w, pid| + output = r.gets + assert_match "cannot request temporary credentials: OAuth server status 401", output + assert_match "{\"errors\":[{\"code\":32,\"message\":\"Could not authenticate you.\"}]}", output + ensure + Process.kill "TERM", pid + end + end +end diff --git a/Formula/t/txr.rb b/Formula/t/txr.rb new file mode 100644 index 0000000000000..1f8fdb9008d25 --- /dev/null +++ b/Formula/t/txr.rb @@ -0,0 +1,55 @@ +class Txr < Formula + desc "Lisp-like programming language for convenient data munging" + homepage "https://www.nongnu.org/txr/" + url "https://www.kylheku.com/cgit/txr/snapshot/txr-302.tar.bz2" + sha256 "f0de012ed62218e049d09a39ae6a9387598d8eac12a7c2d7d9d906c27c36ef54" + license "BSD-2-Clause" + + livecheck do + url "https://www.kylheku.com/cgit/txr" + regex(/href=.*?txr[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8641468e2c261437ffcc3f0c9625a8f1f839f995c7ed7b452684db37bd3a24d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5011b7cb0fcfeae6fd9ad108ff54d0662a55db8478002b0ab333a74ea36e7222" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8c9a0c0475cda5d4c108ff27f40e87150656795008ea14ad7657076421fdaf4" + sha256 cellar: :any_skip_relocation, sonoma: "5dc1e4925fd0d626bdf266f85a3fd44c30845db68915acefb6d16ccb55926723" + sha256 cellar: :any_skip_relocation, arm64_linux: "43cd336b765f13dea501739ea53c0c6354301433645fb8da16c8d51217d8170d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f836edb00ae58379e6ff4153e6a84ab60fa1fdb97f0c6ae9121ddacde2b526be" + end + + depends_on "pkgconf" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def install + # FIXME: We need to bypass the compiler shim to work around `-mbranch-protection=standard` + # (specifically pac-ret) causing tests/012/compile.tl to fail with an illegal instruction + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CC"] = DevelopmentTools.locate(ENV.cc) + ENV.append_to_cflags ENV["HOMEBREW_OPTFLAGS"] if ENV["HOMEBREW_OPTFLAGS"] + ENV.append "CPPFLAGS", "-mbranch-protection=bti" + end + + # FIXME: Workaround to avoid the compiler shim suppressing warnings needed during configure. + # Existing shim logic only works for autotools configure scripts where `as_nl` is used. + with_env(as_nl: "\n") do + system "./configure", "--no-debug-flags", "--prefix=#{prefix}" + end + system "make", "VERBOSE=1" + system "make", "tests" # run tests as upstream has gotten reports of broken TXR in Homebrew + system "make", "install" + (share/"vim/vimfiles/syntax").install Dir["*.vim"] + Utils::Gzip.compress(*man1.glob("*.1")) + end + + test do + assert_equal "3", shell_output("#{bin}/txr -p '(+ 1 2)'").chomp + end +end diff --git a/Formula/t/txt2man.rb b/Formula/t/txt2man.rb new file mode 100644 index 0000000000000..cd873f207374d --- /dev/null +++ b/Formula/t/txt2man.rb @@ -0,0 +1,39 @@ +class Txt2man < Formula + desc "Converts flat ASCII text to man page format" + homepage "https://github.com/mvertes/txt2man/" + url "https://github.com/mvertes/txt2man/archive/refs/tags/txt2man-1.7.1.tar.gz" + sha256 "4d9b1bfa2b7a5265b4e5cb3aebc1078323b029aa961b6836d8f96aba6a9e434d" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^(?:txt2man[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fc8be081e702c9f38869232afb35214fc78bc7765ba03a508f140452ce6fe606" + end + + depends_on "gawk" + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + (testpath/"foo.txt").write "foo" + (testpath/"foo.1").write Utils.safe_popen_read(bin/"txt2man", "-d", "17 Dec 2022", testpath/"foo.txt") + + expected = <<~EOS + .\\" Text automatically generated by txt2man + .TH untitled "17 Dec 2022" "" "" + .RS + foo + EOS + + assert_equal expected, (testpath/"foo.1").read + end +end diff --git a/Formula/t/txt2tags.rb b/Formula/t/txt2tags.rb new file mode 100644 index 0000000000000..100f4bcc4b2d8 --- /dev/null +++ b/Formula/t/txt2tags.rb @@ -0,0 +1,26 @@ +class Txt2tags < Formula + include Language::Python::Virtualenv + + desc "Conversion tool to generating several file formats" + homepage "https://txt2tags.org/" + url "https://files.pythonhosted.org/packages/27/17/c9cdebfc86e824e25592a20a8871225dad61b6b6c0101f4a2cb3434890dd/txt2tags-3.9.tar.gz" + sha256 "7e4244db6a63aaa58fc17fa4cdec62b6fb89cc41d3a00ba4edaffa37f27d6746" + license "GPL-2.0-or-later" + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "b938a2bda24749153a44deefd623b6551d5b3349e859dc80c22c18323987f62b" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.txt").write("\n= Title =") + system bin/"txt2tags", "-t", "html", "--no-headers", "test.txt" + assert_match "

    Title

    ", File.read("test.html") + end +end diff --git a/Formula/t/tygo.rb b/Formula/t/tygo.rb new file mode 100644 index 0000000000000..5efde89d1729c --- /dev/null +++ b/Formula/t/tygo.rb @@ -0,0 +1,56 @@ +class Tygo < Formula + desc "Generate Typescript types from Golang source code" + homepage "https://github.com/gzuidhof/tygo" + url "https://github.com/gzuidhof/tygo.git", + tag: "v0.2.19", + revision: "39a3193308d2f22ed302f81ef286eb394aecdad0" + license "MIT" + head "https://github.com/gzuidhof/tygo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dd3b1b9b4a048d17611d43022f4a13306944d08bf4ea1c2698a70a16a4df3314" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "24e755baa5f3a58505d2f3adfb074d623a9d9c7e7fe050bde251db2efbdb3f20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24e755baa5f3a58505d2f3adfb074d623a9d9c7e7fe050bde251db2efbdb3f20" + sha256 cellar: :any_skip_relocation, arm64_ventura: "24e755baa5f3a58505d2f3adfb074d623a9d9c7e7fe050bde251db2efbdb3f20" + sha256 cellar: :any_skip_relocation, sonoma: "aaee779ee95a066318e97f7511e1c469d66d1a3f6d15f0abf74710cf5678ca85" + sha256 cellar: :any_skip_relocation, ventura: "aaee779ee95a066318e97f7511e1c469d66d1a3f6d15f0abf74710cf5678ca85" + sha256 cellar: :any_skip_relocation, arm64_linux: "3cc839d1d8c5bf38b6fdf1efd7859932b8af62a80be8fb49a69dd8dc60cca5b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8116df3dbb098c78a642fd54ac52e926a40a083d3418b4e99e33408d08ca5af" + end + + depends_on "go" => [:build, :test] + + def install + ldflags = %W[ + -s -w + -X github.com/gzuidhof/tygo/cmd.version=#{version} + -X github.com/gzuidhof/tygo/cmd.commit=#{Utils.git_head} + -X github.com/gzuidhof/tygo/cmd.commitDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"tygo", "completion") + pkgshare.install "examples" + end + + test do + (testpath/"tygo.yml").write <<~YAML + packages: + - path: "simple" + type_mappings: + time.Time: "string /* RFC3339 */" + null.String: "null | string" + null.Bool: "null | boolean" + uuid.UUID: "string /* uuid */" + uuid.NullUUID: "null | string /* uuid */" + YAML + + system "go", "mod", "init", "simple" + cp pkgshare/"examples/simple/simple.go", testpath + system bin/"tygo", "--config", testpath/"tygo.yml", "generate" + assert_match "source: simple.go", (testpath/"index.ts").read + + assert_match version.to_s, shell_output("#{bin}/tygo --version") + end +end diff --git a/Formula/t/typedb.rb b/Formula/t/typedb.rb new file mode 100644 index 0000000000000..339c48dec98ad --- /dev/null +++ b/Formula/t/typedb.rb @@ -0,0 +1,30 @@ +class Typedb < Formula + desc "Strongly-typed database with a rich and logical type system" + homepage "https://typedb.com/" + url "https://github.com/typedb/typedb/releases/download/2.23.0/typedb-all-mac-2.23.0.zip" + sha256 "93a5540c02e3e4f4b7783a2d14a8907dcfde3c2b051984ca6b2df79abc3830ce" + license "AGPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "dc3d91037b148bc7c232e2146eae539b52e328c6c76de01b137aa4639d6a6976" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + mkdir_p var/"typedb/data" + inreplace libexec/"server/conf/config.yml", "server/data", var/"typedb/data" + mkdir_p var/"typedb/logs" + inreplace libexec/"server/conf/config.yml", "server/logs", var/"typedb/logs" + bin.install libexec/"typedb" + bin.env_script_all_files(libexec, Language::Java.java_home_env) + end + + test do + assert_match "A STRONGLY-TYPED DATABASE", shell_output("#{bin}/typedb server --help") + end +end diff --git a/Formula/t/typescript-language-server.rb b/Formula/t/typescript-language-server.rb new file mode 100644 index 0000000000000..f373a0fa0631c --- /dev/null +++ b/Formula/t/typescript-language-server.rb @@ -0,0 +1,45 @@ +class TypescriptLanguageServer < Formula + desc "Language Server Protocol implementation for TypeScript wrapping tsserver" + homepage "https://github.com/typescript-language-server/typescript-language-server" + url "https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-5.1.0.tgz" + sha256 "05431961a3b5f315aa81cdb1ddfd9743684c11a63b4e9030f02587d5e8848b73" + license all_of: ["MIT", "Apache-2.0"] + + bottle do + sha256 cellar: :any_skip_relocation, all: "bd1d71484c306d4906677aa8fdb0f6b1d4585c06ead9428079dca7d5c2b2d79e" + end + + depends_on "node" + depends_on "typescript" + + def install + system "npm", "install", *std_npm_args + + node_modules = libexec/"lib/node_modules" + typescript = Formula["typescript"].opt_libexec/"lib/node_modules/typescript" + ln_sf typescript.relative_path_from(node_modules), node_modules + + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"typescript-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/t/typescript.rb b/Formula/t/typescript.rb new file mode 100644 index 0000000000000..19c40891f124f --- /dev/null +++ b/Formula/t/typescript.rb @@ -0,0 +1,33 @@ +class Typescript < Formula + desc "Language for application scale JavaScript development" + homepage "https://www.typescriptlang.org/" + url "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz" + sha256 "10e108c9cf7d5f2879053dff18515fb405abf2ccef63eaaf017d9c571687a1d3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0c23793ac33b974de3cf9ae83c60ce9d2bb405a0994e956bb845f2bde50b37ec" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.ts").write <<~EOS + class Test { + greet() { + return "Hello, world!"; + } + }; + var test = new Test(); + document.body.innerHTML = test.greet(); + EOS + + system bin/"tsc", "test.ts" + assert_path_exists testpath/"test.js", "test.js was not generated" + end +end diff --git a/Formula/t/typeshare.rb b/Formula/t/typeshare.rb new file mode 100644 index 0000000000000..5fcb7e60e0f0c --- /dev/null +++ b/Formula/t/typeshare.rb @@ -0,0 +1,50 @@ +class Typeshare < Formula + desc "Synchronize type definitions between Rust and other languages for seamless FFI" + homepage "https://github.com/1Password/typeshare" + url "https://github.com/1Password/typeshare/archive/refs/tags/v1.13.3.tar.gz" + sha256 "3aa054a8ef566263873a4056be248e6a6790b0815259073ee4a9549229618a09" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/1Password/typeshare.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "31776deda2ddab4f93bd1b3b7c52f91c1fa00f002396a35269f778559d1c3416" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a815a340d00c9d99b90f83421907b1c07dab78947d6c8d7c5d6a7f3a6c459aca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fcbddc02d23fcf0d89e4acec4ee07417ad9636ad522dcd8c2bd1a5f8c88a3618" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8033f7eaa3404fbfeef3759e82b6d683e82a87f1f1bbec306ef8d3d2a6cc8929" + sha256 cellar: :any_skip_relocation, sonoma: "afc917dd47c64d42b99fdcbba61b63fb75699a2daaa1f58026fd08631e24a00c" + sha256 cellar: :any_skip_relocation, ventura: "048e626aed9871628b7ba678979bbe2408f571d26ab66446c36593054e43d3ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a319a9bd392fc23241734a3b6f1cc7c40bbc50b39fad724c20e9fe427c805c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cff89a63dc6bcdc331facca557f0f641dec53235b0dba99f8d65abdaf35b311" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + + generate_completions_from_executable(bin/"typeshare", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/typeshare --version") + + system bin/"typeshare", "--generate-config", testpath + assert_path_exists testpath/"typeshare.toml" + + (testpath/"example.rs").write <<~RUST + #[typeshare] + struct MyStruct { + my_name: String, + my_age: u32, + } + RUST + + system bin/"typeshare", testpath/"example.rs", "--lang", "typescript", "--output-file", testpath/"TestType.ts" + assert_match "Generated by typeshare", (testpath/"TestType.ts").read + end +end diff --git a/Formula/t/typespeed.rb b/Formula/t/typespeed.rb new file mode 100644 index 0000000000000..0477c0b51aa24 --- /dev/null +++ b/Formula/t/typespeed.rb @@ -0,0 +1,46 @@ +class Typespeed < Formula + desc "Zap words flying across the screen by typing them correctly" + homepage "https://typespeed.sourceforge.net/" + url "https://downloads.sourceforge.net/project/typespeed/typespeed/0.6.5/typespeed-0.6.5.tar.gz" + sha256 "5c860385ceed8a60f13217cc0192c4c2b4705c3e80f9866f7d72ff306eb72961" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "0180b1eba9c871f2ae91394a54bc99f92e5c48db780f1ad601bbfd2691bf4e5a" + sha256 arm64_sequoia: "ab447d0e1c0d2482ef500191eb296b9da4a5d49735d9326e5c738cb496aaaa43" + sha256 arm64_sonoma: "5515f9db04d81a28229879b3c60150bde9f9d22d77c95a124f4d862d82645712" + sha256 arm64_ventura: "5b61f01011a8cd0315d07703f8efcba7fc009f9efa4a4c7a75254a1ac239e681" + sha256 arm64_monterey: "f34485cb16d4e55ec320c2ed3a5a0f5c681a73ef7950c8f8c609b7b93a8a34e8" + sha256 arm64_big_sur: "bf2143006f2dbbb230b3c899a77fc98c1a056316fc957f195a5fb4b27c388947" + sha256 sonoma: "5c5ee2bc8feb9d58b2e67e43d5093796750ff6e7d45351a0f0161027b067b9ae" + sha256 ventura: "346b2433e18fde5989536ed95707edf90baa445b61edfcc40f8308edccbfece5" + sha256 monterey: "f369e235804129a758d84d47415d28bea243b3579cd96bce8a3163b44739eab1" + sha256 big_sur: "a1624c4d927fda389aceec074f743e73bd10417059764d480141a88fab23bb82" + sha256 catalina: "cff9da11f7441f1ff4db7cbfa57f0711ff0bbe08a80ee7067021c619bc01cb06" + sha256 arm64_linux: "b77850229d406c13937f40c43c0cbb4888dff463edab2a4ef0f528ae0312ad78" + sha256 x86_64_linux: "4fcef57ff481d6947275a5b93e1489379a2ba7d1938d9de031fddd4bc4199f1d" + end + + uses_from_macos "ncurses" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `rules'; typespeed-file.o:(.bss+0x2050): first defined here + # multiple definition of `words'; typespeed-file.o:(.bss+0x30): first defined here + # multiple definition of `opt'; typespeed-file.o:(.bss+0x0): first defined here + # multiple definition of `now'; typespeed-file.o:(.bss+0x30b0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + # Fix the hardcoded gcc. + inreplace "src/Makefile.in", "gcc", ENV.cc + inreplace "testsuite/Makefile.in", "gcc", ENV.cc + system "./configure", *args, *std_configure_args + system "make", "install" + end +end diff --git a/Formula/t/typewritten.rb b/Formula/t/typewritten.rb new file mode 100644 index 0000000000000..ab811bb83f704 --- /dev/null +++ b/Formula/t/typewritten.rb @@ -0,0 +1,24 @@ +class Typewritten < Formula + desc "Minimal zsh prompt" + homepage "https://typewritten.dev" + url "https://github.com/reobin/typewritten/archive/refs/tags/v1.5.2.tar.gz" + sha256 "03dcd8239e66cbeac7fa31457bae8355d1fc05fb49dcb05b77ed40f4771226fd" + license "MIT" + head "https://github.com/reobin/typewritten.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8a6b8fe7ec007b83306cbb94c0d4fed1f6a39fb4f3f053cce9420e4ddbca6137" + end + + depends_on "zsh" => :test + + def install + libexec.install "typewritten.zsh", "async.zsh", "lib" + zsh_function.install_symlink libexec/"typewritten.zsh" => "prompt_typewritten_setup" + end + + test do + prompt = "setopt prompt_subst; autoload -U promptinit; promptinit && prompt -p typewritten" + assert_match "❯", shell_output("zsh -c '#{prompt}'") + end +end diff --git a/Formula/t/typical.rb b/Formula/t/typical.rb new file mode 100644 index 0000000000000..abf74782a36a0 --- /dev/null +++ b/Formula/t/typical.rb @@ -0,0 +1,75 @@ +class Typical < Formula + desc "Data interchange with algebraic data types" + homepage "https://github.com/stepchowfun/typical" + url "https://github.com/stepchowfun/typical/archive/refs/tags/v0.12.1.tar.gz" + sha256 "d7759bc05f011c915b54b359bcd9563d4b371703ccc57ea005142be6cd219e86" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3bd77af13df1984838b7531462b75f776ecf4b30a93e5cb33f354e7e9a1ed775" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c01cc1debef78935e3f85f11fd37d36bafe1d01004a2d2e25ea1da1f61389785" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8ccf68539d6d557517d2e21fc4b9f7d7d7f507bb4092b2513dbd84843648a72a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "63b48359d88032a38e54a7a8677046bb3af866d844ed640017e30ae19a9bbdbc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "11ffb6008f6eb95c39678a6aba3d0a7ee483a0859ae9082a8999b2268743fd48" + sha256 cellar: :any_skip_relocation, sonoma: "7c9e1f6d5abe29582f533368446ef64a0041254ee3c381ce6618f597717199b7" + sha256 cellar: :any_skip_relocation, ventura: "290f31aa718a6c45651d3ff7745584ceaded134888422a4bf250739ac7b56de2" + sha256 cellar: :any_skip_relocation, monterey: "412157dc6a44b87200149f28895009843e956ab0b702b119b375db208fdf4005" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8023c6ec0ddbe4e92dd80bd2978b581327110e4aca3354e358850b90d7c6a6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54692b2545fc98b49f5bc3a8da38ef8eae24e0176b7b36695f96da39841be433" + end + + depends_on "rust" => :build + + # eliminate needless lifetimes, upstream pr ref, https://github.com/stepchowfun/typical/pull/501 + patch :DATA + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"types.t").write <<~EOS + struct SendEmailRequest { + to: String = 0 + subject: String = 1 + body: String = 2 + } + + choice SendEmailResponse { + success = 0 + error: String = 1 + } + EOS + + assert_empty shell_output("#{bin}/typical generate types.t --rust types.rs --typescript types.ts") + + generated_rust_code = (testpath/"types.rs").read + generated_typescript_code = (testpath/"types.ts").read + + assert_match "// This file was automatically generated by Typical", generated_rust_code + assert_match "pub struct SendEmailRequestIn", generated_rust_code + assert_match "pub struct SendEmailRequestOut", generated_rust_code + assert_match "pub enum SendEmailResponseIn", generated_rust_code + assert_match "pub enum SendEmailResponseOut", generated_rust_code + assert_match "// This file was automatically generated by Typical", generated_typescript_code + assert_match "export type SendEmailRequestIn", generated_typescript_code + assert_match "export type SendEmailRequestOut", generated_typescript_code + assert_match "export type SendEmailResponseIn", generated_typescript_code + assert_match "export type SendEmailResponseOut", generated_typescript_code + end +end + +__END__ +diff --git a/src/error.rs b/src/error.rs +index 4563e1e..213faf9 100644 +--- a/src/error.rs ++++ b/src/error.rs +@@ -34,7 +34,7 @@ impl fmt::Display for Error { + } + + impl error::Error for Error { +- fn source<'a>(&'a self) -> Option<&(dyn error::Error + 'static)> { ++ fn source(&self) -> Option<&(dyn error::Error + 'static)> { + self.reason.as_deref() + } + } diff --git a/Formula/t/typioca.rb b/Formula/t/typioca.rb new file mode 100644 index 0000000000000..61c1c1c549eaf --- /dev/null +++ b/Formula/t/typioca.rb @@ -0,0 +1,40 @@ +class Typioca < Formula + desc "Cozy typing speed tester in terminal" + homepage "https://github.com/bloznelis/typioca" + url "https://github.com/bloznelis/typioca/archive/refs/tags/3.1.0.tar.gz" + sha256 "b58dfd36e9f23054b96cbd5859d1a93bc8d3f22b4ce4fd16546c9f19fc4a003c" + license "MIT" + head "https://github.com/bloznelis/typioca.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e4dad0118007da9cd8ba1062735f66af73057d2b7d75bef2f70d4580ba5a2412" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d67b7e8e8f4bf06519b363da75af9c40805aec9a4a11373cd464d9d3acd59785" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d67b7e8e8f4bf06519b363da75af9c40805aec9a4a11373cd464d9d3acd59785" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d67b7e8e8f4bf06519b363da75af9c40805aec9a4a11373cd464d9d3acd59785" + sha256 cellar: :any_skip_relocation, sonoma: "001224a612f62adb17c03bf47007fa8fabafa8b3005be2f48db19cd311a4bcdb" + sha256 cellar: :any_skip_relocation, ventura: "001224a612f62adb17c03bf47007fa8fabafa8b3005be2f48db19cd311a4bcdb" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5bffa9dabacbb6821255070ca8449be5960ac8e895b39eab13eccdad7d1ba85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23a8e545f920e97d3dd4cf38f12ddf5bc4f2d62af406c2e7d27daa7501b12e5c" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/bloznelis/typioca/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"typioca", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/typioca --version") + + pid = spawn bin/"typioca", "serve" + sleep 1 + assert_path_exists testpath/"typioca" + assert_path_exists testpath/"typioca.pub" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/t/typos-cli.rb b/Formula/t/typos-cli.rb new file mode 100644 index 0000000000000..60f4ec97b708b --- /dev/null +++ b/Formula/t/typos-cli.rb @@ -0,0 +1,32 @@ +class TyposCli < Formula + desc "Source code spell checker" + homepage "https://github.com/crate-ci/typos" + url "https://github.com/crate-ci/typos/archive/refs/tags/v1.39.0.tar.gz" + sha256 "947d761577cc4adfccf685c091ed1f32f92a2982c7dd61f48d6370cd46b8e2bb" + license any_of: ["Apache-2.0", "MIT"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a2581dac76f1f863da9108fce39c6323a596164c5f41866ea59a72491e7fa6c9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0549517d1c8a9ea3ae0b28070df40122a13359b8f3f8a5b3d5f31d5a7364feb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dba69cd87a8a297084f874aa69d90a3bd19eebe14592dda2ab3823fe16740b8e" + sha256 cellar: :any_skip_relocation, sonoma: "c91044f5258dd33ae528afce114ed1abc8157187786261238c75ab9064a3ebd5" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ea4b99d135e93266180eff3ce29d516859d65a319d253d7f196a6e9b670596d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c7185366f055401633decee5f8848a49de9388c8634070905bfe80d184b2d9a" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/typos-cli") + end + + test do + assert_match "error: `teh` should be `the`", pipe_output("#{bin}/typos -", "teh", 2) + assert_empty pipe_output("#{bin}/typos -", "the") + end +end diff --git a/Formula/t/typos-lsp.rb b/Formula/t/typos-lsp.rb new file mode 100644 index 0000000000000..ac84fa65f8cd5 --- /dev/null +++ b/Formula/t/typos-lsp.rb @@ -0,0 +1,44 @@ +class TyposLsp < Formula + desc "Language Server for typos-cli" + homepage "https://github.com/tekumara/typos-lsp" + url "https://github.com/tekumara/typos-lsp/archive/refs/tags/v0.1.45.tar.gz" + sha256 "4a4251c72a5cb0f7cb23439348d8a6374a047557b890ccaf581c534d0979f2d5" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fea5b30f11f143c40fe9aa0f17a2757017ee2717aa0ad5b64fd1cd4ad608ed37" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4cd71d665f26c227c23b4179884eaa317d5b0d36b83a09076fd5248bcfdffa87" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e554c6cea71c81d6c3c630130695908fa39544546d00acde0e83cf65d554401b" + sha256 cellar: :any_skip_relocation, sonoma: "bdbfd415ba77c34f2ce7fdf2425664cae885613322e80c557f46166a06edd56a" + sha256 cellar: :any_skip_relocation, arm64_linux: "75a8ba3f5f23269c1f7a322d627f32e622ba82072b7039fa0f1fddc48e5a9a76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7dda1efcfe280a33af29797acfb63fe19dc5d075cbe88180a326a6ab1a5221f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/typos-lsp") + end + + test do + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output(bin/"typos-lsp", input) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/t/typst.rb b/Formula/t/typst.rb new file mode 100644 index 0000000000000..6b49c5246230c --- /dev/null +++ b/Formula/t/typst.rb @@ -0,0 +1,47 @@ +class Typst < Formula + desc "Markup-based typesetting system" + homepage "https://typst.app/" + url "https://github.com/typst/typst/archive/refs/tags/v0.14.0.tar.gz" + sha256 "39df9db43c792b0ab71cde97bdc03d4763fff7d3525b67d549ffc8bfc99b6395" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/typst/typst.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3eacec25746075f53980844a1e38958a0a3f8343a37dc6af416895ecc1bcac7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "da7726e20b43313f179ef947b797477dad8465e5d1b24817a290a0cdcde2c611" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cbf24d69a7de5884455c84e0f691e3d1d8bcbfc9c0880ce1e0cd9ed4e559770a" + sha256 cellar: :any_skip_relocation, sonoma: "110b0df6556bc0413ba05499c4e56d78ddc7e7887bb7b65a4eaa5acce8b4fa9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "befee91fab89142a1dd0a56f737c1270b506e12f99857caa233834e16cf4526f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "500554a3e43e98514734acffb5c7aaaf881dbc9f9f76e51ef09dceecfca5a060" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + ENV["TYPST_VERSION"] = version.to_s + ENV["GEN_ARTIFACTS"] = "artifacts" + system "cargo", "install", *std_cargo_args(path: "crates/typst-cli") + + man1.install buildpath.glob("crates/typst-cli/artifacts/*.1") + generate_completions_from_executable(bin/"typst", "completions") + end + + test do + (testpath/"Hello.typ").write("Hello World!") + system bin/"typst", "compile", "Hello.typ", "Hello.pdf" + assert_path_exists testpath/"Hello.pdf" + + assert_match version.to_s, shell_output("#{bin}/typst --version") + end +end diff --git a/Formula/t/typstfmt.rb b/Formula/t/typstfmt.rb new file mode 100644 index 0000000000000..e9f4819f26079 --- /dev/null +++ b/Formula/t/typstfmt.rb @@ -0,0 +1,36 @@ +class Typstfmt < Formula + desc "Formatter for typst" + homepage "https://github.com/astrale-sharp/typstfmt" + url "https://github.com/astrale-sharp/typstfmt/archive/refs/tags/0.2.10.tar.gz" + sha256 "5a3f413a428b2590552c2d0ab0ab04c7a745e1cca128844b7b82ea49326d65c4" + license one_of: ["MIT", "Apache-2.0"] + head "https://github.com/astrale-sharp/typstfmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "840ef206e895decf1e2e6f6d4667f0cb5ffc106720664f8651183ddbfa43942f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "844ad26eecdbd64cc9e98bea828c52772bb45a0f6fdc0e79a8ac8a8092679cc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "582d6c33840b510206e0e80d85406a2f16de67fdcb93102f480330cb226b81d3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bb0272d469193fa0dadcca3ee4d379204a58774ad69b84ec3330064793fecaa8" + sha256 cellar: :any_skip_relocation, sonoma: "f676e54a7b0e56cce946b8da875e5c991490b6d9e25dbd573ce58dc788a0139f" + sha256 cellar: :any_skip_relocation, ventura: "73843c71221c4b6ac172f2a3f62f0549841074a7b09ef5ef4794b9c88fd0be3e" + sha256 cellar: :any_skip_relocation, monterey: "8bd83b378a237b4be80690c7ad71e7c5609e3b85c6179f0d5a5806179ee1321a" + sha256 cellar: :any_skip_relocation, arm64_linux: "86165016420a35d4c382d1d96242e158279d866754c561f27ff2a853349a8147" + sha256 cellar: :any_skip_relocation, x86_64_linux: "560dc8c7913216f620d70b2322c5c384a756eee645d4db0369d798660fd0feef" + end + + deprecate! date: "2024-06-08", because: :unmaintained + disable! date: "2025-06-21", because: :unmaintained + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"Hello.typ").write("Hello World!") + system bin/"typstfmt", "Hello.typ" + + assert_match version.to_s, shell_output("#{bin}/typstfmt --version") + end +end diff --git a/Formula/t/typstyle.rb b/Formula/t/typstyle.rb new file mode 100644 index 0000000000000..8b317164111af --- /dev/null +++ b/Formula/t/typstyle.rb @@ -0,0 +1,32 @@ +class Typstyle < Formula + desc "Beautiful and reliable typst code formatter" + homepage "https://typstyle-rs.github.io/typstyle/" + url "https://github.com/typstyle-rs/typstyle/archive/refs/tags/v0.14.0.tar.gz" + sha256 "2315f866a9bed03d3251e53dd4c46d99a74b9c6138ac1df141c5b9c4a0f4a350" + license "Apache-2.0" + head "https://github.com/typstyle-rs/typstyle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d1da6f8fb77c144b4c34c29f5145db3ef2031fa2c7014010b59ad01392ecddb5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e57d788a6dd2c3895c66a96f6c80cdc5165df5e9d8a6d1d4e4d29b45c3d7ebc6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c4be2526197591b92204cd3eed9979d0351616b8aeb4d347cb7a2609c8a06a1" + sha256 cellar: :any_skip_relocation, sonoma: "6b638c3060bf061f5c8a424ac1073fcdb37ce730e9c8699ac39be2b6fe5762db" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a966c3c7b80eab480cad0bd3b5be79b6ad367ef76c53b49d6bb2e877f8f70a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1480e7aa3efd9f9a2d789951934b89b313eb273b8f01e55f0068d23ec1eb9d0" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/typstyle") + + generate_completions_from_executable(bin/"typstyle", "completions") + end + + test do + (testpath/"Hello.typ").write("Hello World!") + system bin/"typstyle", "Hello.typ" + + assert_match version.to_s, shell_output("#{bin}/typstyle --version") + end +end diff --git a/Formula/t/typtea.rb b/Formula/t/typtea.rb new file mode 100644 index 0000000000000..0bd87ff2a329f --- /dev/null +++ b/Formula/t/typtea.rb @@ -0,0 +1,32 @@ +class Typtea < Formula + desc "Minimal terminal-based typing speed tester" + homepage "https://github.com/ashish0kumar/typtea" + url "https://github.com/ashish0kumar/typtea/archive/refs/tags/v0.1.6.tar.gz" + sha256 "d2c5580b46c39189b28de3fde92ae51a811efc063a1d819bbc2db359a7c34f98" + license "MIT" + head "https://github.com/ashish0kumar/typtea.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34762664901bd215ea8d9bfc390daa6ccfbedd6c3d511abab0867de8a27e1aa5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29331a5f5f84fbdbf6d724163f70bbcce0bba015850e62f8e4185292b661dcc4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29331a5f5f84fbdbf6d724163f70bbcce0bba015850e62f8e4185292b661dcc4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "29331a5f5f84fbdbf6d724163f70bbcce0bba015850e62f8e4185292b661dcc4" + sha256 cellar: :any_skip_relocation, sonoma: "b7993fc19824a6841a296131340db8f5d9d40e0b92b599ea095e1586db409dde" + sha256 cellar: :any_skip_relocation, ventura: "b7993fc19824a6841a296131340db8f5d9d40e0b92b599ea095e1586db409dde" + sha256 cellar: :any_skip_relocation, arm64_linux: "07ea14d623844b30f7e212f3eb32717c6cb9d72fbf1da52deb37c71134f613ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d9099d3a169a377f90f6b9c703d1f8403f60d12bc77500c79d5157350ab6a14" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/ashish0kumar/typtea/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/typtea version") + + assert_match "python", shell_output("#{bin}/typtea start --list-langs 2>&1") + end +end diff --git a/Formula/t/tz.rb b/Formula/t/tz.rb new file mode 100644 index 0000000000000..b7ec3fca1e1c4 --- /dev/null +++ b/Formula/t/tz.rb @@ -0,0 +1,31 @@ +class Tz < Formula + desc "CLI time zone visualizer" + homepage "https://github.com/oz/tz" + url "https://github.com/oz/tz/archive/refs/tags/v0.8.0.tar.gz" + sha256 "dfb6829483e7455e6d2038e946243022db15ea5475c096ad18f091eb9f6eb5ad" + license "GPL-3.0-or-later" + head "https://github.com/oz/tz.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "042c065ef5a5f56fcbaeb67c1d462246a04fec0bf796788c8247478191b6d78e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d201f92d60530fcf9037fd2064ab8cc4843fcbc1d5c65a881d12874de7696d0a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d201f92d60530fcf9037fd2064ab8cc4843fcbc1d5c65a881d12874de7696d0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d201f92d60530fcf9037fd2064ab8cc4843fcbc1d5c65a881d12874de7696d0a" + sha256 cellar: :any_skip_relocation, sonoma: "ab630a5fcbb3eb9f3809a33defe7c6aae3af94c7f70474463bee74f0c8e7ec59" + sha256 cellar: :any_skip_relocation, ventura: "ab630a5fcbb3eb9f3809a33defe7c6aae3af94c7f70474463bee74f0c8e7ec59" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2ff7bdbf48bab0cb4185f04d003b962dba23472f7669f97e2e02ba48515ca8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e1921d53e895df6d45df6aad030ea2300f072117d5bffa8c31ae3de1807b20e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "US/Eastern", shell_output("#{bin}/tz --list") + + assert_match version.to_s, shell_output("#{bin}/tz -v") + end +end diff --git a/Formula/t/tzdb.rb b/Formula/t/tzdb.rb new file mode 100644 index 0000000000000..73793a125da21 --- /dev/null +++ b/Formula/t/tzdb.rb @@ -0,0 +1,55 @@ +class Tzdb < Formula + desc "Time Zone Database" + homepage "https://www.iana.org/time-zones" + url "https://data.iana.org/time-zones/releases/tzdb-2025b.tar.lz" + sha256 "ec2f98c739009fd81a654efe2ee75069f54bcee5e0d80f510ee7e1f469ed293a" + license all_of: ["BSD-3-Clause", :public_domain] + + livecheck do + url :homepage + regex(/href=.*?tzdb[._-]v?(\d+(?:\.\d+)*[a-z]?)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "c2735093cdf1e304a2ef21d70a0890ab65a029938c4c7b6a0859150897aa611e" + sha256 arm64_sequoia: "395beebfd6ee0c176b652616c699bc61156e13434ce1825c150b423a51c89a88" + sha256 arm64_sonoma: "0038255105832e3ee626bb0df264b1319e7e78b9cad31a2abe63318d78ca492d" + sha256 arm64_ventura: "e9ca9450eef87b08d7c13aaded06eec5c1d74e18669bef7410478c25f4d3c1ed" + sha256 sonoma: "a5a51679cf236bc9507f021a8242109e28d3ed819314a952b4b490bd98897b62" + sha256 ventura: "247d8ff7d370a6cad981b6f02ed7701552f3afd7acf6d995bd65c7da1b4afabd" + sha256 arm64_linux: "8043c2dc13b4519c7da6b6f6ab3cf65e54aff930fb3cdcd8946b92dd41dfd554" + sha256 x86_64_linux: "9d3694b504470a7c9be63ea205ee5a4a488a57f983d75ca3d563de4ef98f5e0b" + end + + on_macos do + depends_on "gettext" + end + + def localtime + etc/"localtime" + end + + def install + make_args = %W[ + CFLAGS=#{ENV.cflags} + USRDIR=#{prefix} + TZDEFAULT=#{localtime} + ] + if OS.mac? + gettext = Formula["gettext"] + make_args[0] += " -DHAVE_GETTEXT -I#{gettext.include} -L#{gettext.lib}" + make_args << "LDLIBS=-lintl" + end + + system "make", *make_args, "install" + end + + def post_install + # Generate default localtime, from Makefile. + system sbin/"zic", "-l", "Factory", "-p", "-", "-t", localtime + end + + test do + assert_match "UTC", shell_output("#{bin}/zdump UTC") + end +end diff --git a/Formula/t/tzdiff.rb b/Formula/t/tzdiff.rb new file mode 100644 index 0000000000000..62412984e999d --- /dev/null +++ b/Formula/t/tzdiff.rb @@ -0,0 +1,21 @@ +class Tzdiff < Formula + desc "Displays Timezone differences with localtime in CLI (shell script)" + homepage "https://github.com/belgianbeer/tzdiff" + url "https://github.com/belgianbeer/tzdiff/archive/refs/tags/1.2.1.tar.gz" + sha256 "3438af02d6f808e9984e1746d5fd2e4bbf6e53cdb866fc0d4ded74a382d48d62" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c64a8ff4953f517e2a83959e64b6bf0fb8eb4f8d78118561686ef8940e73c798" + end + + def install + bin.install "tzdiff" + man1.install "tzdiff.1" + end + + test do + assert_match "Asia/Tokyo", shell_output("#{bin}/tzdiff -l Tokyo") + assert_match version.to_s, shell_output("#{bin}/tzdiff -v") + end +end diff --git a/Formula/t1lib.rb b/Formula/t1lib.rb deleted file mode 100644 index aa5b8be5dd296..0000000000000 --- a/Formula/t1lib.rb +++ /dev/null @@ -1,24 +0,0 @@ -class T1lib < Formula - desc "C library to generate/rasterize bitmaps from Type 1 fonts" - homepage "https://www.t1lib.org/" - url "https://www.ibiblio.org/pub/linux/libs/graphics/t1lib-5.1.2.tar.gz" - mirror "https://fossies.org/linux/misc/old/t1lib-5.1.2.tar.gz" - sha256 "821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59" - - bottle do - rebuild 2 - sha256 "2fc10925d1618b809de806ee87722c96d8c03655e3d586f0a37b3d049ee2e082" => :mojave - sha256 "a36bc3913f6b51cb7772609a52049f90fc6241ffca3bf18c4295455ef5f4df4c" => :high_sierra - sha256 "94789287c849a04f05a40c79940aee6efe3e03318c95db9c2be69ee4e6806d82" => :sierra - sha256 "fa356a5405f5b0cf57c15ebd5b680c215e1e498189914e9b9663eb132655a8c1" => :el_capitan - sha256 "6d1bf242eb7a5201180b9d4b505a7f83663802383d358180cea696714ae57fc8" => :yosemite - sha256 "ec107b30d4b9a95bbc094a7a944cab862ed78a875c5ed0002aa7232ec514e9d7" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "without_doc" - system "make", "install" - share.install "Fonts" => "fonts" - end -end diff --git a/Formula/t1utils.rb b/Formula/t1utils.rb deleted file mode 100644 index 6556e65e2cf42..0000000000000 --- a/Formula/t1utils.rb +++ /dev/null @@ -1,34 +0,0 @@ -class T1utils < Formula - desc "Command-line tools for dealing with Type 1 fonts" - homepage "https://www.lcdf.org/type/" - url "https://www.lcdf.org/type/t1utils-1.41.tar.gz" - sha256 "fc5edd7e829902b3b685886382fed690d533681c0ab218a387c9e47606623427" - - bottle do - cellar :any_skip_relocation - sha256 "e597bc84951ac4148dbd0c81747403f3e8d2a52709d9c5bf018f7d7d4fc43cdb" => :mojave - sha256 "03aaed34570454b58242053b8e6531e78ba036e4a906abaaf29b7b0c48fb008e" => :high_sierra - sha256 "40e108fcb6088b1c4d1fc1061de851efe3fb826d7353c21d8862216ef8857cd2" => :sierra - sha256 "fc81594a73833517058d954a208275328ac7e90867ca6b3ca8d4a4553aa34be4" => :el_capitan - sha256 "0983d0a649572d241ba27ae239888f56c3fe108bf00e2ca9faffd2306a44988f" => :yosemite - end - - head do - url "https://github.com/kohler/t1utils.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./bootstrap.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/t1mac", "--version" - end -end diff --git a/Formula/ta-lib.rb b/Formula/ta-lib.rb deleted file mode 100644 index ba1162864fba8..0000000000000 --- a/Formula/ta-lib.rb +++ /dev/null @@ -1,29 +0,0 @@ -class TaLib < Formula - desc "Tools for market analysis" - homepage "https://ta-lib.org/" - url "https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz" - sha256 "9ff41efcb1c011a4b4b6dfc91610b06e39b1d7973ed5d4dee55029a0ac4dc651" - - bottle do - cellar :any - rebuild 1 - sha256 "db4ba23b6c0a235b2478416040a2321e305fe2f57810e87d6b5400addc0c3eea" => :mojave - sha256 "5d53fe57d49e5c60b8ea81e633e502e73569e191f16fa36aabb39085ffe2581a" => :high_sierra - sha256 "0229a85f2bdaa14baabe840b12f50eed8eb88233d13bcdb0424c5ab6fc2a4a6c" => :sierra - sha256 "3b5927cdb5f69cdc57d8ecbdf5b6fc95a5b6aad7c626c79d1893f2d824030e65" => :el_capitan - sha256 "bb40b6d09be26ee497aae27abea5808730af29e6387fa347996eae49c32c448d" => :yosemite - sha256 "da1457eb5a09c71f90da185b954aff3d399e61a20ff78ad0bd9d177ad11ad1b7" => :mavericks - sha256 "d4c5bf3efdaed633acf74d8039d723fd828e52982ebc864a48e09c2e71506311" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - bin.install "src/tools/ta_regtest/.libs/ta_regtest" - end - - test do - system "#{bin}/ta_regtest" - end -end diff --git a/Formula/tag.rb b/Formula/tag.rb deleted file mode 100644 index 6f299a44e3c3d..0000000000000 --- a/Formula/tag.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Tag < Formula - desc "Manipulate and query tags on Mavericks files" - homepage "https://github.com/jdberry/tag/" - url "https://github.com/jdberry/tag/archive/v0.9.tar.gz" - sha256 "ec2e3df36e18d4bd17f8fea34c1c5b9311e23d220e4ad64fc55505aa4c4b552a" - head "https://github.com/jdberry/tag.git" - - bottle do - cellar :any_skip_relocation - sha256 "0f1c31729b905f07c0401f39d4e10014363fdd976d26f5ceb0390b233eafcbd4" => :mojave - sha256 "a956e7444a881bbe4db8f1100e3a6c2913d795291a3522d34795df9ea4a26b14" => :high_sierra - sha256 "976deacd9ba2533d152a70d4920ce0edab6e22f35fd72f438774c675e9bf532f" => :sierra - sha256 "f91752c50c52456037e04b7e38c1fd1246edb0086fc681860e71f222c2891df8" => :el_capitan - sha256 "640a9ebb8fa34d93f5566e2af7e25716eaa2497165c4e7122bcae1d9cd51fb5a" => :yosemite - end - - depends_on :macos => :mavericks - - def install - system "make" - bin.install "bin/tag" - end - - test do - test_tag = "test_tag" - test_file = Pathname.pwd+"test_file" - touch test_file - system "#{bin}/tag", "--add", test_tag, test_file - assert_equal test_tag, `#{bin}/tag --list --no-name #{test_file}`.chomp - end -end diff --git a/Formula/taglib.rb b/Formula/taglib.rb deleted file mode 100644 index 0405a926a589c..0000000000000 --- a/Formula/taglib.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Taglib < Formula - desc "Audio metadata library" - homepage "https://taglib.github.io/" - url "https://taglib.github.io/releases/taglib-1.11.1.tar.gz" - sha256 "b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b" - head "https://github.com/taglib/taglib.git" - - bottle do - cellar :any - sha256 "98f103a3174694dd9ff58661cb83c08180049681ac1768b55b447dd99874150d" => :mojave - sha256 "14e9be9fd1d5a86615d8b2b6ac51893eb6fab0eb6100f44547d297ccadc4497e" => :high_sierra - sha256 "a0a374439cbf94a6fb57d791abf0bc6fb974eef1cf21f66c2731d1fc83d2428d" => :sierra - sha256 "edaf79d2a2ec72ae32d9b46621697626a27299226a6b4d963431da8c37d3af52" => :el_capitan - sha256 "bfda081fd34cb47bcdfd41e814612dbdf330166e30e69867cf43fcac60e5ed1a" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "cmake", "-DWITH_MP4=ON", "-DWITH_ASF=ON", "-DBUILD_SHARED_LIBS=ON", - *std_cmake_args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/taglib-config --version") - end -end diff --git a/Formula/tailor.rb b/Formula/tailor.rb deleted file mode 100644 index 177b6c66272b3..0000000000000 --- a/Formula/tailor.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Tailor < Formula - desc "Cross-platform static analyzer and linter for Swift" - homepage "https://tailor.sh" - url "https://github.com/sleekbyte/tailor/releases/download/v0.12.0/tailor-0.12.0.tar" - sha256 "ec3810b27e9a35ecdf3a21987f17cad86918240d773172264e9abbb1a7efc415" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install Dir["*"] - bin.install_symlink libexec/"bin/tailor" - man1.install libexec/"tailor.1" - end - - test do - (testpath/"Test.swift").write "import Foundation\n" - system "#{bin}/tailor", testpath/"Test.swift" - end -end diff --git a/Formula/taisei.rb b/Formula/taisei.rb deleted file mode 100644 index fc5508cd3839b..0000000000000 --- a/Formula/taisei.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Taisei < Formula - desc "Clone of Touhou Project shoot-em-up games" - homepage "https://taisei-project.org/" - url "https://github.com/taisei-project/taisei.git", - :tag => "v1.2", - :revision => "46fb0f894ad269528ac7fda533c7994eddd9b758" - revision 1 - - bottle do - sha256 "5a63d77e6ba51f8907f1d6a08ca6fc3c94b7f4317afd746c91f0c8011d767c20" => :mojave - sha256 "162eb10eaf78191aeb474f75095cb35b5840dd4b4ad1e0452ec65ab19590cf80" => :high_sierra - sha256 "0065ca15927c95e455dd3a42c4cc1dfcb9365069c914a8d1bffca11e41dbde00" => :sierra - sha256 "b9eae75e261940cba3bf33aec8fea1904c6de4648a0dea1f32f517289e0d9a1d" => :el_capitan - end - - # Yes, these are all build deps; the game copies them into the app bundle, - # and doesn't require the Homebrew versions at runtime. - depends_on "freetype" => :build - depends_on "libpng" => :build - depends_on "libzip" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python" => :build - depends_on "sdl2" => :build - depends_on "sdl2_mixer" => :build - depends_on "sdl2_ttf" => :build - - # Fixes a bug in the .app bundle build script. - # # Will be in the next release. - patch do - url "https://github.com/taisei-project/taisei/commit/68b0d4f5c6f2015704e1ed1b4098be1c4336db74.patch?full_index=1" - sha256 "cb1f79826e632a61daa271cb59d0a80ab77dea876d384c381ab66d5eb9b9bd27" - end - - def install - mkdir "build" do - system "meson", "--prefix=#{prefix}", "-Ddocs=false", ".." - system "ninja" - system "ninja", "install" - end - end - - def caveats - "Sound may not work." - end - - test do - output = shell_output("#{prefix}/Taisei.app/Contents/MacOS/Taisei -h", 1) - assert_match "Touhou clone", output - end -end diff --git a/Formula/takt.rb b/Formula/takt.rb deleted file mode 100644 index 4263b4ce6e573..0000000000000 --- a/Formula/takt.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Takt < Formula - desc "Text-based music programming language" - homepage "https://takt.sourceforge.io" - url "https://downloads.sourceforge.net/project/takt/takt-0.310-src.tar.gz" - sha256 "eb2947eb49ef84b6b3644f9cf6f1ea204283016c4abcd1f7c57b24b896cc638f" - revision 1 - - bottle do - sha256 "16a54e53f4c4aa0a3aef15ecdcc1804b3f46aa049e30eb2e68a3823bc47eb665" => :mojave - sha256 "09ab01c470d00703ee02751fb70ddc91e3a625466e98fde9aaaf041654287574" => :high_sierra - sha256 "d69f489e47d47dba63edc7defeb8829272093e47fea263ba54054f21557131e4" => :sierra - sha256 "7862cdfe9f54eba4d4263558669d852a6a87d01be3d1f5ad56439e5bfc893b64" => :el_capitan - sha256 "46f0c0e3b50840d54601615db699ff0e77a3a891e3928a013939f94ecf66b78b" => :yosemite - end - - depends_on "readline" - - def install - system "./configure", "--prefix=#{prefix}", "--with-lispdir=#{elisp}" - system "make", "install" - end - - test do - system bin/"takt", "-o etude1.mid", pkgshare/"examples/etude1.takt" - end -end diff --git a/Formula/taktuk.rb b/Formula/taktuk.rb deleted file mode 100644 index eb606fb3c1ae1..0000000000000 --- a/Formula/taktuk.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Taktuk < Formula - desc "Deploy commands to (a potentially large set of) remote nodes" - homepage "http://taktuk.gforge.inria.fr/" - url "https://gforge.inria.fr/frs/download.php/file/37055/taktuk-3.7.7.tar.gz" - sha256 "56a62cca92670674c194e4b59903e379ad0b1367cec78244641aa194e9fe893e" - - bottle do - cellar :any - sha256 "6ff23461c51c77612a5c00fc4caf40d9c91aa3e7b2f409e9a86f57f27f305f01" => :mojave - sha256 "9cc466f8a75eea1974143fedecd42547eb14401d772e527776f387aec4832f77" => :high_sierra - sha256 "0ffc0bb09703bbf32afbcd302850803f94ecbb311eaa77353275e7dcb1549f62" => :sierra - sha256 "4a731d243e6915729240deb75dc99cfee513bb7d0f69169981623b14ce6601c1" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - system "#{bin}/taktuk", "quit" - end -end diff --git a/Formula/tal.rb b/Formula/tal.rb deleted file mode 100644 index bdb0309af4e92..0000000000000 --- a/Formula/tal.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tal < Formula - desc "Align line endings if they match" - # The canonical url currently returns HTTP/1.1 500 Internal Server Error. - homepage "https://web.archive.org/web/20160406172703/https://thomasjensen.com/software/tal/" - url "https://www.mirrorservice.org/sites/download.salixos.org/x86_64/extra-14.2/source/misc/tal/tal-1.9.tar.gz" - mirror "https://web.archive.org/web/20160406172703/https://thomasjensen.com/software/tal/tal-1.9.tar.gz" - sha256 "5d450cee7162c6939811bca945eb475e771efe5bd6a08b520661d91a6165bb4c" - - bottle do - cellar :any_skip_relocation - sha256 "3e9ac201bb27300afd327dd1a24c093e602376c4a4e36af27f7d1047ffae9b5d" => :mojave - sha256 "852023d9d33d893ca0852f36d795b044212e69911e2380cc4f0d22f99e22c1c2" => :high_sierra - sha256 "9c2c4e5f9d6922f9a9d434485dea4ddf321744728c83adcda822c3c314f6a86e" => :sierra - sha256 "bbdef6b2c92650352b7199cc2a9e3bc4698bf2a14fce46397eebcee72c1de419" => :el_capitan - sha256 "e6b6f315bc14f5e001893371d18fb0ba88bea4c4d76dd657820eecf509103f9e" => :yosemite - sha256 "26945b8471e2731ce34604a19f8bdb046770d961422969999a789168aa7ee25b" => :mavericks - end - - def install - system "make", "linux" - bin.install "tal" - man1.install "tal.1" - end - - test do - system "#{bin}/tal", "/etc/passwd" - end -end diff --git a/Formula/talloc.rb b/Formula/talloc.rb deleted file mode 100644 index 29d8a995f96ac..0000000000000 --- a/Formula/talloc.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Talloc < Formula - desc "Hierarchical, reference-counted memory pool with destructors" - homepage "https://talloc.samba.org/" - url "https://www.samba.org/ftp/talloc/talloc-2.1.14.tar.gz" - sha256 "b185602756a628bac507fa8af8b9df92ace69d27c0add5dab93190ad7c3367ce" - - bottle do - cellar :any - sha256 "f57a3c49190148c184c8c41e2872dacd7db4dba5174dab901a132594a806749b" => :mojave - sha256 "ec36bac486e6f474745eadc80c421f3647205d6df7f13559c8b720a1dffb6cac" => :high_sierra - sha256 "c95ae1f0a8bcb15608fa616dfc9282132ef575be9a9b3e1a79c6dcc8843dffb7" => :sierra - sha256 "560fb76da75d8fdb6e81168e3123ffcce31eb44a6c186c0d929b79fb7af5cf5d" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-rpath", - "--without-gettext", - "--disable-python" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - int ret; - TALLOC_CTX *tmp_ctx = talloc_new(NULL); - if (tmp_ctx == NULL) { - ret = 1; - goto done; - } - ret = 0; - done: - talloc_free(tmp_ctx); - return ret; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-ltalloc", "test.c", "-o", "test" - system testpath/"test" - end -end diff --git a/Formula/tarantool.rb b/Formula/tarantool.rb deleted file mode 100644 index a3c2e96a43203..0000000000000 --- a/Formula/tarantool.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Tarantool < Formula - desc "In-memory database and Lua application server" - homepage "https://tarantool.org/" - url "https://download.tarantool.org/tarantool/1.10/src/tarantool-1.10.2.1.tar.gz" - sha256 "2d077978a65e785349883ef3c98c46d35af26bcc10dae58eabfca27cfbcc6c6b" - revision 1 - head "https://github.com/tarantool/tarantool.git", :branch => "2.1", :shallow => false - - bottle do - sha256 "16e54418400f8cd7aa62c00c409d8b21e8effba0692c238e3eec942644bcd11f" => :mojave - sha256 "0ba1fc8552f04842eb5e19947a4d2f052572316345838cbe6193c96aa45579b0" => :sierra - end - - depends_on "cmake" => :build - depends_on "icu4c" - depends_on "openssl" - depends_on "readline" - - def install - sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path - - # Necessary for luajit to build on macOS Mojave (see luajit formula) - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - args = std_cmake_args - args << "-DCMAKE_INSTALL_MANDIR=#{doc}" - args << "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}" - args << "-DCMAKE_INSTALL_LOCALSTATEDIR=#{var}" - args << "-DENABLE_DIST=ON" - args << "-DOPENSSL_ROOT_DIR=#{Formula["openssl"].opt_prefix}" - args << "-DREADLINE_ROOT=#{Formula["readline"].opt_prefix}" - args << "-DCURL_INCLUDE_DIR=#{sdk}/usr/include" - args << "-DCURL_LIBRARY=/usr/lib/libcurl.dylib" - - system "cmake", ".", *args - system "make" - system "make", "install" - end - - def post_install - local_user = ENV["USER"] - inreplace etc/"default/tarantool", /(username\s*=).*/, "\\1 '#{local_user}'" - - (var/"lib/tarantool").mkpath - (var/"log/tarantool").mkpath - (var/"run/tarantool").mkpath - end - - test do - (testpath/"test.lua").write <<~EOS - box.cfg{} - local s = box.schema.create_space("test") - s:create_index("primary") - local tup = {1, 2, 3, 4} - s:insert(tup) - local ret = s:get(tup[1]) - if (ret[3] ~= tup[3]) then - os.exit(-1) - end - os.exit(0) - EOS - system bin/"tarantool", "#{testpath}/test.lua" - end -end diff --git a/Formula/tarsnap-gui.rb b/Formula/tarsnap-gui.rb deleted file mode 100644 index 87b9c022d0ca1..0000000000000 --- a/Formula/tarsnap-gui.rb +++ /dev/null @@ -1,28 +0,0 @@ -class TarsnapGui < Formula - desc "Cross-platform GUI for the Tarsnap command-line client" - homepage "https://github.com/Tarsnap/tarsnap-gui/wiki" - url "https://github.com/Tarsnap/tarsnap-gui/archive/v1.0.2.tar.gz" - sha256 "3b271f474abc0bbeb3d5d62ee76b82785c7d64145e6e8b51fa7907b724c83eae" - head "https://github.com/Tarsnap/tarsnap-gui.git" - - bottle do - sha256 "c62f584809071d3dabf02cbf29d788b4f86e6fcd5996293d30377d26f141971d" => :mojave - sha256 "41217f384ad4c1702c2ba93d7f97c24b67294aa6331c9a16900455e3a997ca6c" => :high_sierra - sha256 "ba85a52b227ea1bb947f970e5f3926057b44560a3a562356558f7009535d31ab" => :sierra - sha256 "b0fa1979fa2cf1ee3b56e1060c7d9e5bcd4c9319104adfea4cf1fd279ae80518" => :el_capitan - end - - depends_on "qt" - depends_on "tarsnap" - - def install - system "qmake" - system "make" - system "macdeployqt", "Tarsnap.app" - prefix.install "Tarsnap.app" - end - - test do - system "#{opt_prefix}/Tarsnap.app/Contents/MacOS/Tarsnap", "--version" - end -end diff --git a/Formula/tarsnap.rb b/Formula/tarsnap.rb deleted file mode 100644 index eeb7e03d451b0..0000000000000 --- a/Formula/tarsnap.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Tarsnap < Formula - desc "Online backups for the truly paranoid" - homepage "https://www.tarsnap.com/" - url "https://www.tarsnap.com/download/tarsnap-autoconf-1.0.39.tgz" - sha256 "5613218b2a1060c730b6c4a14c2b34ce33898dd19b38fb9ea0858c5517e42082" - - bottle do - sha256 "6e5bd7f2ba58872d43896d92ac1bf1d9f42f2cddc16dc1c374d7353b8d55a82d" => :mojave - sha256 "b152754ed7ef385e4fd816fbf24571322479757c083ce889134903d4b88e0232" => :high_sierra - sha256 "7d4da94d575085b3f2c2066ae5b0e83edd589d0238d065fb0f9ba68d916c3868" => :sierra - sha256 "6c4ff5911171f779b85bda69f07eb7a561ec0911517fe3a48b2cb917c1ff4f92" => :el_capitan - sha256 "6cc300ce4d0db123d225b9b2ff1d28625061440484932a9c572282de785d4819" => :yosemite - end - - head do - url "https://github.com/Tarsnap/tarsnap.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "openssl" - depends_on "xz" => :optional - - def install - # dyld: lazy symbol binding failed: Symbol not found: _clock_gettime - # Reported 20 Aug 2017 https://github.com/Tarsnap/tarsnap/issues/286 - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "libcperciva/util/monoclock.c", "CLOCK_MONOTONIC", - "UNDEFINED_GIBBERISH" - end - - system "autoreconf", "-iv" if build.head? - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --sysconfdir=#{etc} - --with-bash-completion-dir=#{bash_completion} - ] - args << "--without-lzma" << "--without-lzmadec" if build.without? "xz" - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"tarsnap", "-c", "--dry-run", testpath - end -end diff --git a/Formula/tarsnapper.rb b/Formula/tarsnapper.rb deleted file mode 100644 index 640961fdb2d26..0000000000000 --- a/Formula/tarsnapper.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Tarsnapper < Formula - include Language::Python::Virtualenv - - desc "Tarsnap wrapper which expires backups using a gfs-scheme" - homepage "https://github.com/miracle2k/tarsnapper" - url "https://github.com/miracle2k/tarsnapper/archive/0.4.tar.gz" - sha256 "94ac22c3ed72e6321596f7d229b34fd21b59a00035162c5b22f2a1ee64dc6d01" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "ca9c4a44a5014fb5a63d16bd6abb5c9ca2dd7ef103598ae2953736b3da174c61" => :mojave - sha256 "8ac2d23a92f7da69ec82e587922dfaad33356fb1dd7d3b168248982b54a33f95" => :high_sierra - sha256 "923a9c639afde08b955988b07201a67f2fa57318e11bfa36dbbafcba28e627f2" => :sierra - end - - depends_on "python" - depends_on "tarsnap" - - resource "argparse" do - url "https://files.pythonhosted.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz" - sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/89/43/07d07654ee3e25235d8cea4164cdee0ec39d1fda8e9203156ebe403ffda4/pexpect-4.6.0.tar.gz" - sha256 "2a8e88259839571d1251d278476f3eec5db26deb73a70be5ed5dc5435e418aba" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match /usage: tarsnapper/, shell_output("#{bin}/tarsnapper --help") - end -end diff --git a/Formula/task-spooler.rb b/Formula/task-spooler.rb deleted file mode 100644 index 2c78b363d4cf2..0000000000000 --- a/Formula/task-spooler.rb +++ /dev/null @@ -1,26 +0,0 @@ -class TaskSpooler < Formula - desc "Batch system to run tasks one after another" - homepage "https://vicerveza.homeunix.net/~viric/soft/ts/" - url "https://vicerveza.homeunix.net/~viric/soft/ts/ts-1.0.tar.gz" - sha256 "4f53e34fff0bb24caaa44cdf7598fd02f3e5fa7cacaea43fa0d081d03ffbb395" - - bottle do - cellar :any_skip_relocation - sha256 "319c29e750b0ba183b14accb571c4d210723458d5fcd72302b5ec866e5a76ad4" => :mojave - sha256 "8045397e275ade52621a1ab3a21e3eddf277fafd1beea60db2d10bc15d11b8f2" => :high_sierra - sha256 "e0f7e33946d3f8c93782692b3bab5833cb2e882f1fb47a4473b69e39ce3e7378" => :sierra - sha256 "9403d0c240bad09d576288d6b5ed94057dad03ceb30a4893a935c13f9e58af7f" => :el_capitan - end - - if Tab.for_name("moreutils").with?("ts") - conflicts_with "moreutils", :because => "both install a `ts` executable." - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/ts", "-l" - end -end diff --git a/Formula/task.rb b/Formula/task.rb deleted file mode 100644 index 06c8a70d3816e..0000000000000 --- a/Formula/task.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Task < Formula - desc "Feature-rich console based todo list manager" - homepage "https://taskwarrior.org/" - url "https://taskwarrior.org/download/task-2.5.1.tar.gz" - sha256 "d87bcee58106eb8a79b850e9abc153d98b79e00d50eade0d63917154984f2a15" - head "https://github.com/GothenburgBitFactory/taskwarrior.git", :branch => "2.6.0", :shallow => false - - bottle do - sha256 "bba98b6bdfb3f79f1434229d8ade4b0622119320353da0eb8fec39809d66947d" => :mojave - sha256 "6a651be957b736bef14633efedef011a81c49ee37178eae4d8ef863549d7c584" => :high_sierra - sha256 "d1cb582ab9ee211ec154690634b5988f8058ead31000c74d5cdfa949d319d0ed" => :sierra - sha256 "07aa2c19ae6d7a9a46b286bfc48fa970aa9a9e0237e034bbaab354dcfc4f6848" => :el_capitan - sha256 "113fc7ce057c51ea14021006a4106c25d29e361e4b70113e33fb7a83e57ee8d1" => :yosemite - sha256 "7888e42210edb6691ff57d056585536abd318d62b43a898bb98e286373519164" => :mavericks - end - - depends_on "cmake" => :build - depends_on "gnutls" - - needs :cxx11 - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - bash_completion.install "scripts/bash/task.sh" - zsh_completion.install "scripts/zsh/_task" - fish_completion.install "scripts/fish/task.fish" - end - - test do - touch testpath/".taskrc" - system "#{bin}/task", "add", "Write", "a", "test" - assert_match "Write a test", shell_output("#{bin}/task list") - end -end diff --git a/Formula/taskd.rb b/Formula/taskd.rb deleted file mode 100644 index d9fa899759204..0000000000000 --- a/Formula/taskd.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Taskd < Formula - desc "Client-server synchronization for todo lists" - homepage "https://taskwarrior.org/docs/taskserver/setup.html" - url "https://taskwarrior.org/download/taskd-1.1.0.tar.gz" - sha256 "7b8488e687971ae56729ff4e2e5209ff8806cf8cd57718bfd7e521be130621b4" - revision 1 - head "https://github.com/GothenburgBitFactory/taskserver.git" - - bottle do - sha256 "5114191cccfbb5cfcff6ce3b6d7ad5a6e373d8153653e7af734f362a9e70239c" => :mojave - sha256 "53ea3abeff00da4d69f53d089416c1e003bae625decbc44412b8ff51b9ccf302" => :high_sierra - sha256 "93b3a449cc983885491a01511275b3b4b8ff6cc624aa4326a9e268d4a28ff4af" => :sierra - sha256 "d7806f456a540d6052928f6e1c9fcd5e89f0d1b3c5496d552e187b117fc94b24" => :el_capitan - sha256 "2c1a95a98ea309c776ab0f210fd8a9297bc866e25b2ee7ba0301d6f8df531a2a" => :yosemite - sha256 "a83899074cf81fcf6737546f9f572db6ce1a8762af943e7663fe14760fd5ef77" => :mavericks - end - - depends_on "cmake" => :build - depends_on "gnutls" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/taskd", "init", "--data", testpath - end -end diff --git a/Formula/taskell.rb b/Formula/taskell.rb deleted file mode 100644 index 95479671618bc..0000000000000 --- a/Formula/taskell.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "language/haskell" - -class Taskell < Formula - include Language::Haskell::Cabal - - desc "Command-line Kanban board/task manager with support for Trello" - homepage "https://taskell.app" - url "https://github.com/smallhadroncollider/taskell/archive/1.3.5.tar.gz" - sha256 "c1d0c5e8b1703f312e1150d1f121311898008d5a9d1dbb823df0bbc5e1b8b3ce" - - bottle do - cellar :any_skip_relocation - sha256 "63d740bff025d90721e5884928e6070b530d8a09cca413487480545132311b00" => :mojave - sha256 "29b60fee3c327db90ab96465bad5133a8583b6ed6cd89406f41041d795199ebb" => :high_sierra - sha256 "8d5a18b033e871bcd82bc2b50b5519cafe6d6c9da65672a01deb665a3d1af825" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - cabal_sandbox do - cabal_install "hpack" - system "./.cabal-sandbox/bin/hpack" - install_cabal_package - end - end - - test do - (testpath/"test.md").write <<~EOS - ## To Do - - - A thing - - Another thing - EOS - - expected = <<~EOS - test.md - Lists: 1 - Tasks: 2 - EOS - - assert_match expected, shell_output("#{bin}/taskell -i test.md") - end -end diff --git a/Formula/tasksh.rb b/Formula/tasksh.rb deleted file mode 100644 index 64bbfab07cc95..0000000000000 --- a/Formula/tasksh.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tasksh < Formula - desc "Shell wrapper for Taskwarrior commands" - homepage "https://tasktools.org/projects/tasksh.html" - url "https://taskwarrior.org/download/tasksh-1.2.0.tar.gz" - sha256 "6e42f949bfd7fbdde4870af0e7b923114cc96c4344f82d9d924e984629e21ffd" - head "https://github.com/GothenburgBitFactory/taskshell.git", :branch => "1.3.0" - - bottle do - cellar :any_skip_relocation - sha256 "c766ebd317962a04a3d78a4fbcc202085a27e0d15f63debf095f84a9a97d6306" => :mojave - sha256 "17f99be8d0aea4c43877fbfb121b7989047f04650ccffa85e948859e8ee51e0b" => :high_sierra - sha256 "fd1b333c777401c53d5ddc8aaf52150a2a15fea4230a91d457d9d99ce2819ee7" => :sierra - sha256 "d695adcf10582123053612d98ed4bf988b22c50919598bf167bc2e62db142352" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "task" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/tasksh", "--version" - (testpath/".taskrc").write "data.location=#{testpath}/.task\n" - assert_match "Created task 1.", pipe_output("#{bin}/tasksh", "add Test Task", 0) - end -end diff --git a/Formula/tass64.rb b/Formula/tass64.rb deleted file mode 100644 index 46cbbbc4fc98a..0000000000000 --- a/Formula/tass64.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Tass64 < Formula - desc "Multi pass optimizing macro assembler for the 65xx series of processors" - homepage "https://tass64.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tass64/source/64tass-1.53.1515-src.zip" - sha256 "f18e5d3f7f27231c1f8ce781eee8b585fe5aaec186eccdbdb820c1b8c323eb6c" - - bottle do - cellar :any_skip_relocation - sha256 "662059bcfe282b613ebf0bb9e0e6f0ce4dacd447fdab932ac3b184f45895977c" => :mojave - sha256 "3726bb4afcd89279e27bcabd10a662b93c7da52732eca84343240913689f6b75" => :high_sierra - sha256 "43a54d0b972b0173af35552d5e6fc497ae09c9ad181ef3f544aed38e50152633" => :sierra - end - - def install - system "make", "install", "CPPFLAGS=-D_XOPEN_SOURCE", "prefix=#{prefix}" - - # `make install` does not install syntax highlighting defintions - pkgshare.install "syntax" - end - - test do - (testpath/"hello.asm").write <<~'EOS' - ;; Simple "Hello World" program for C64 - *=$c000 - LDY #$00 - L0 - LDA L1,Y - CMP #0 - BEQ L2 - JSR $FFD2 - INY - JMP L0 - L1 - .text "HELLO WORLD",0 - L2 - RTS - EOS - - system "#{bin}/64tass", "-a", "hello.asm", "-o", "hello.prg" - assert_predicate testpath/"hello.prg", :exist? - end -end diff --git a/Formula/tbb.rb b/Formula/tbb.rb deleted file mode 100644 index b20c974d7b0e4..0000000000000 --- a/Formula/tbb.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Tbb < Formula - desc "Rich and complete approach to parallelism in C++" - homepage "https://www.threadingbuildingblocks.org/" - url "https://github.com/01org/tbb/archive/2019_U3.tar.gz" - version "2019_U3" - sha256 "b2244147bc8159cdd8f06a38afeb42f3237d3fc822555499d7ccfbd4b86f8ece" - revision 1 - - bottle do - cellar :any - sha256 "3b5ac43b2280ebbebc39541a95a63e287b08eceb8ba75912cd8b89f731ffe663" => :mojave - sha256 "fc57daae5222af5ba8178f810113ac37066b40d268d3e30da78e1aeaa40cfd0f" => :high_sierra - sha256 "77e4f8db4f7bc6c1327567a8944d5eb3ba5a6503cc1404e65f18284e1f7aabfd" => :sierra - end - - depends_on "cmake" => :build - depends_on "swig" => :build - # requires malloc features first introduced in Lion - # https://github.com/Homebrew/homebrew/issues/32274 - depends_on :macos => :lion - depends_on "python" - - def install - compiler = (ENV.compiler == :clang) ? "clang" : "gcc" - system "make", "tbb_build_prefix=BUILDPREFIX", "compiler=#{compiler}" - lib.install Dir["build/BUILDPREFIX_release/*.dylib"] - - # Build and install static libraries - system "make", "tbb_build_prefix=BUILDPREFIX", "compiler=#{compiler}", - "extra_inc=big_iron.inc" - lib.install Dir["build/BUILDPREFIX_release/*.a"] - include.install "include/tbb" - - cd "python" do - ENV["TBBROOT"] = prefix - system "python3", *Language::Python.setup_install_args(prefix) - end - - system "cmake", "-DTBB_ROOT=#{prefix}", - "-DTBB_OS=Darwin", - "-DSAVE_TO=lib/cmake/TBB", - "-P", "cmake/tbb_config_generator.cmake" - - (lib/"cmake"/"TBB").install Dir["lib/cmake/TBB/*.cmake"] - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main() - { - std::cout << tbb::task_scheduler_init::default_num_threads(); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-ltbb", "-o", "test" - system "./test" - end -end diff --git a/Formula/tbox.rb b/Formula/tbox.rb deleted file mode 100644 index d00956a8dd3b4..0000000000000 --- a/Formula/tbox.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tbox < Formula - desc "Glib-like multi-platform c library" - homepage "https://tboox.org/" - url "https://github.com/waruqi/tbox/archive/v1.6.3.tar.gz" - sha256 "1ea225195ad6d41a29389137683fee7a853fa42f3292226ddcb6d6d862f5b33c" - head "https://github.com/waruqi/tbox.git" - - bottle do - cellar :any_skip_relocation - sha256 "63a75febf95f9f60e187e2100e6d64f772f3ef59d3e2e5603a1fdb7cbe77b992" => :mojave - sha256 "2f34f5d60397588aff11eefc308a6d23f3a23fe451d118094b04b00024877832" => :high_sierra - sha256 "956ff755fecde9ad86e5920b9ecd01cf1de767354b60f68476d61a4583c04c81" => :sierra - sha256 "7b238a754afed5af34b0ccc0caa47b2997791c34ad24b3a403334711e2ec71d4" => :el_capitan - end - - depends_on "xmake" => :build - - def install - system "xmake", "config", "--charset=y", "--demo=n", "--small=y", "--xml=y" - system "xmake", "install", "-o", prefix - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - if (tb_init(tb_null, tb_null)) - { - tb_trace_i("hello tbox!"); - tb_exit(); - } - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ltbox", "-I#{include}", "-o", "test" - system "./test" - end -end diff --git a/Formula/tcc.rb b/Formula/tcc.rb deleted file mode 100644 index fa49d8fdec21a..0000000000000 --- a/Formula/tcc.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tcc < Formula - desc "Tiny C compiler" - homepage "https://bellard.org/tcc/" - url "https://download.savannah.nongnu.org/releases/tinycc/tcc-0.9.27.tar.bz2" - sha256 "de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c" - revision 1 - - bottle do - sha256 "ca8cd4827e72201cd5f368b5b74b9dead8554e0188b7ea63f81926d775d704e9" => :mojave - sha256 "1ad7de1b974ca3e16668dec9cbef2accb29ecedb8f3f5819c06a2f77c8f3f2d1" => :high_sierra - sha256 "c2949f3a99d1efb600137e4bb617ebd8a385697038f9cb8136c681033a7a636e" => :sierra - end - - def install - args = %W[ - --prefix=#{prefix} - --source-path=#{buildpath} - --sysincludepaths=/usr/local/include:#{MacOS.sdk_path}/usr/include:{B}/include - --enable-cross" - ] - - ENV.deparallelize - system "./configure", *args - system "make", "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - system "make", "install" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - assert_equal "Hello, world!\n", shell_output("#{bin}/tcc -run hello-c.c") - end -end diff --git a/Formula/tccutil.rb b/Formula/tccutil.rb deleted file mode 100644 index 97d9f07619c97..0000000000000 --- a/Formula/tccutil.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Tccutil < Formula - desc "Utility to modify the macOS Accessibility Database (TCC.db)" - homepage "https://github.com/jacobsalmela/tccutil" - url "https://github.com/jacobsalmela/tccutil/archive/v1.2.3.tar.gz" - sha256 "8146f44e6b44add60ce29469ce04000baa0066d632373f7c8ad21cf906d06cc3" - head "https://github.com/jacobsalmela/tccutil.git" - - bottle :unneeded - - def install - bin.install "tccutil.py" => "tccutil" - end - - test do - system "#{bin}/tccutil", "--help" - end -end diff --git a/Formula/tcl-tk.rb b/Formula/tcl-tk.rb deleted file mode 100644 index 02471ccfbceab..0000000000000 --- a/Formula/tcl-tk.rb +++ /dev/null @@ -1,79 +0,0 @@ -class TclTk < Formula - desc "Tool Command Language" - homepage "https://www.tcl.tk/" - url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.8/tcl8.6.8-src.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcl/tcl8.6.8-src.tar.gz" - version "8.6.8" - sha256 "c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a" - - bottle do - rebuild 1 - sha256 "120f17e162aa5e7351d59a97dc068055b421892ebb6226734349ee759ca42754" => :mojave - sha256 "869c7dd3f4e4cd25dca3cda9f0ff8350af08c3ba18ebcc60b661ca8df58ba8a5" => :high_sierra - sha256 "d7ff69ed715709d44eaff72bca96099ad2815091fcd97358ad5aaa5239bf06b8" => :sierra - end - - keg_only :provided_by_macos, - "tk installs some X11 headers and macOS provides an (older) Tcl/Tk" - - resource "tcllib" do - url "https://downloads.sourceforge.net/project/tcllib/tcllib/1.18/tcllib-1.18.tar.gz" - sha256 "72667ecbbd41af740157ee346db77734d1245b41dffc13ac80ca678dd3ccb515" - end - - resource "tk" do - url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.8/tk8.6.8-src.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tk/tk8.6.8-src.tar.gz" - version "8.6.8" - sha256 "49e7bca08dde95195a27f594f7c850b088be357a7c7096e44e1158c7a5fd7b33" - - # Upstream issue 7 Jan 2018 "Build failure with Aqua support on OS X 10.8 and 10.9" - # See https://core.tcl.tk/tcl/tktview/95a8293a2936e34cc8d0658c21e5214f1ca9b435 - if MacOS.version == :mavericks || MacOS.version == :mountain_lion - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/0a883ad388b/x11/tk/files/patch-macosx-tkMacOSXXStubs.c.diff" - sha256 "2cdba6bbf2503307fe4f4d7200ad57c9926ebf0ff6ed3e65bf551067a30a04a9" - end - end - end - - def install - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --enable-threads - --enable-64bit - ] - - cd "unix" do - system "./configure", *args - system "make" - system "make", "install" - system "make", "install-private-headers" - ln_s bin/"tclsh#{version.to_f}", bin/"tclsh" - end - - # Let tk finds our new tclsh - ENV.prepend_path "PATH", bin - - resource("tk").stage do - cd "unix" do - system "./configure", *args, "--enable-aqua=yes", - "--without-x", "--with-tcl=#{lib}" - system "make" - system "make", "install" - system "make", "install-private-headers" - ln_s bin/"wish#{version.to_f}", bin/"wish" - end - end - - resource("tcllib").stage do - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - end - - test do - assert_equal "honk", pipe_output("#{bin}/tclsh", "puts honk\n").chomp - end -end diff --git a/Formula/tclap.rb b/Formula/tclap.rb deleted file mode 100644 index 2c6ddaa5e87a4..0000000000000 --- a/Formula/tclap.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Tclap < Formula - desc "Templatized C++ command-line parser library" - homepage "https://tclap.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tclap/tclap-1.2.2.tar.gz" - sha256 "f5013be7fcaafc69ba0ce2d1710f693f61e9c336b6292ae4f57554f59fde5837" - - bottle do - cellar :any_skip_relocation - sha256 "31d001dc926c1faf748a2dd0ad34fe9f3c3908400eac998802ce36ba78fab794" => :mojave - sha256 "8e85cfa71594680dc52d5ff18d93cf585fc5990c28316f0b60f42584ff3a2697" => :high_sierra - sha256 "8e85cfa71594680dc52d5ff18d93cf585fc5990c28316f0b60f42584ff3a2697" => :sierra - sha256 "8e85cfa71594680dc52d5ff18d93cf585fc5990c28316f0b60f42584ff3a2697" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - # Installer scripts have problems with parallel make - ENV.deparallelize - system "make", "install" - end -end diff --git a/Formula/tcpdump.rb b/Formula/tcpdump.rb deleted file mode 100644 index 10ddd175cd314..0000000000000 --- a/Formula/tcpdump.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Tcpdump < Formula - desc "Command-line packet analyzer" - homepage "https://www.tcpdump.org/" - url "https://www.tcpdump.org/release/tcpdump-4.9.2.tar.gz" - sha256 "798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79" - head "https://github.com/the-tcpdump-group/tcpdump.git" - - bottle do - cellar :any - sha256 "8fdb5a59a18ca1ae658fa29e258f6760343da172c96977a15d13b2309874939c" => :mojave - sha256 "321254c4ef9c9d005b59bd6ecc2511a6c8444eda92c93f836db4ffecaf4c36c9" => :high_sierra - sha256 "f383f086f232e06e01c9d206c98f65d9df5109366f13ba684910b8e249e35a6e" => :sierra - sha256 "10486fd04e4b4df5f7fbd2b9aba3d48c903730c53df3ee9b7f57887db0347df8" => :el_capitan - sha256 "97fc8337c3808fa208b72f1eea5eea6d53bf67c083ca6b1b3ddf751b8342c574" => :yosemite - end - - depends_on "openssl" - depends_on "libpcap" => :optional - - def install - system "./configure", "--prefix=#{prefix}", - "--enable-ipv6", - "--disable-smb", - "--disable-universal" - system "make", "install" - end - - test do - system sbin/"tcpdump", "--help" - end -end diff --git a/Formula/tcpflow.rb b/Formula/tcpflow.rb deleted file mode 100644 index 6ab6b5fde2f3b..0000000000000 --- a/Formula/tcpflow.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Tcpflow < Formula - desc "TCP flow recorder" - homepage "https://github.com/simsong/tcpflow" - url "https://digitalcorpora.org/downloads/tcpflow/tcpflow-1.5.0.tar.gz" - sha256 "20abe3353a49a13dcde17ad318d839df6312aa6e958203ea710b37bede33d988" - - bottle do - cellar :any - sha256 "8929b11e0613406e66dae23cb27d38c0dbaf7606fb95cf404e18090a998cac95" => :mojave - sha256 "0aadaae80b60771c86b712aee5cc13b0bcca0757698fce835384d992dc3a6a41" => :high_sierra - sha256 "25254b1669a0e7d3ad0507c2ab233b5024203eaaad968c7c09aa4b91a6403f0a" => :sierra - end - - head do - url "https://github.com/simsong/tcpflow.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "boost" => :build - depends_on "openssl" - depends_on "sqlite" if MacOS.version < :lion - - def install - system "bash", "./bootstrap.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/tcping.rb b/Formula/tcping.rb deleted file mode 100644 index 74a8f3ec4380e..0000000000000 --- a/Formula/tcping.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Tcping < Formula - desc "TCP connect to the given IP/port combo" - homepage "https://web.archive.org/web/20171102193822/linuxco.de/tcping/tcping.html" - url "https://mirrors.kernel.org/gentoo/distfiles/tcping-1.3.5.tar.gz" - sha256 "1ad52e904094d12b225ac4a0bc75297555e931c11a1501445faa548ff5ecdbd0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "7e63d5e3df764f4b351a2d168c13de68e0725b9520c21880e83a4ad6145f13c5" => :mojave - sha256 "bb3e69e0576e29ca536a5b88fc5d14fddf400e94b2e6a27e4e2f6629a500c292" => :high_sierra - sha256 "96b44e7048d867ee871abd1728e6672490e230ab0070c00844c9991e4f12fc70" => :sierra - sha256 "2fb4f218abf6de64e4a8ee49447567aa0666f212dfb49f45a4f8d8f30ef40076" => :el_capitan - sha256 "a9e7c0063e20ea023d0b5ad29564e2f8744e5685f3f3b794f02d5ceb4c316421" => :yosemite - sha256 "92f3a1c1ed85cbfec37ed40f4f8234262b28758072d69765995839cbf290f393" => :mavericks - end - - def install - system "make" - bin.install "tcping" - end - - test do - system "#{bin}/tcping", "www.google.com", "80" - end -end diff --git a/Formula/tcpkali.rb b/Formula/tcpkali.rb deleted file mode 100644 index 6cfaefa3ac30c..0000000000000 --- a/Formula/tcpkali.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Tcpkali < Formula - desc "High performance TCP and WebSocket load generator and sink" - homepage "https://github.com/machinezone/tcpkali" - url "https://github.com/machinezone/tcpkali/releases/download/v1.1.1/tcpkali-1.1.1.tar.gz" - sha256 "a9a15a1703fc4960360a414ee282d821a7b42d4bbba89f9e72a796164ff69598" - - bottle do - cellar :any_skip_relocation - sha256 "3e9bbcb12b289d1dff3c2355664208ee0a65cea032ebe1dc0d6d1346f67c1a2f" => :mojave - sha256 "b82b2ea3a3d17d3fd464a5e887c9cce14dce8a82bbcb350df5f7bd321893bfdb" => :high_sierra - sha256 "f73513ed96b6436085e0941865f0cc4fd2ce1009a1d8770c740e8e97d5173cf1" => :sierra - sha256 "2d0075b2fca885fb694660a3914362030be255c8e3dfed407bb8ca96c996bbf7" => :el_capitan - sha256 "71573c4926d086721c028e73d9812475fe3a58bd8313a43ef9c6a54918334760" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/tcpkali", "-l1237", "-T0.5", "127.1:1237" - end -end diff --git a/Formula/tcpreplay.rb b/Formula/tcpreplay.rb deleted file mode 100644 index 355a56b166018..0000000000000 --- a/Formula/tcpreplay.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tcpreplay < Formula - desc "Replay saved tcpdump files at arbitrary speeds" - homepage "https://tcpreplay.appneta.com/" - url "https://github.com/appneta/tcpreplay/releases/download/v4.3.1/tcpreplay-4.3.1.tar.gz" - sha256 "95ba661011689a4a6c03896ba7fa549470c2c2d4d0e907dd0c4a4580bbe25e34" - - bottle do - cellar :any - sha256 "13eb5d7675349a7840d4cd925718fce267df8d9cacc270ae3968d9fbdd974aed" => :mojave - sha256 "f878a29cfa13475e768d9dcb36f2939810eb5ee05a20add2a8520bebf1a9720f" => :high_sierra - sha256 "160b57832d9edbfb3944534c32bb6c86d08937cd2d816418b7c6dad2ca739c9d" => :sierra - end - - depends_on "libdnet" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-dynamic-link" - system "make", "install" - end - - test do - system bin/"tcpreplay", "--version" - end -end diff --git a/Formula/tcpsplit.rb b/Formula/tcpsplit.rb deleted file mode 100644 index ce50ee96c53e7..0000000000000 --- a/Formula/tcpsplit.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Tcpsplit < Formula - desc "Break a packet trace into some number of sub-traces" - homepage "https://www.icir.org/mallman/software/tcpsplit/" - url "https://www.icir.org/mallman/software/tcpsplit/tcpsplit-0.2.tar.gz" - sha256 "885a6609d04eb35f31f1c6f06a0b9afd88776d85dec0caa33a86cef3f3c09d1d" - - bottle do - cellar :any_skip_relocation - sha256 "b3a7f083a50a33edf1799fc16b6d52db71eee85bd69bad9d1d3d42e6de5cfa6f" => :mojave - sha256 "0b603f1737a000ec2452bd3ac48df7c4e04d6cfb15fc48dabca96bd23137f40a" => :high_sierra - sha256 "2e9d12ee609d30075f141527c3804ce78a8c312e5b72ce6eb655ed08521faf45" => :sierra - sha256 "5014edcbc87913b2103c9347dd4b132ca1b4c3b1a007c853eda75213481e7d30" => :el_capitan - sha256 "c87bf331cb20c6301b922ee3fb37f0c92957f3e32d0391b07aa7b36980b20819" => :yosemite - sha256 "ec4011f01c1d8c2f71172956b70b99336aa8ec89372d37c1678caa23d6986f1a" => :mavericks - end - - def install - system "make" - bin.install "tcpsplit" - end - - test do - system "#{bin}/tcpsplit", "--version" - end -end diff --git a/Formula/tcpstat.rb b/Formula/tcpstat.rb deleted file mode 100644 index 2b043bcb13e27..0000000000000 --- a/Formula/tcpstat.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Tcpstat < Formula - desc "Active TCP connections monitoring tool" - homepage "https://github.com/jtt/tcpstat" - url "https://github.com/jtt/tcpstat/archive/rel-0-1.tar.gz" - version "0.1" - sha256 "366a221950759015378775862a7499aaf727a3a9de67b15463b0991c2362fdaf" - head "https://github.com/jtt/tcpstat.git" - - bottle do - cellar :any_skip_relocation - sha256 "805b8444d7bcf36e2da7285474b20f5193f8e104fd990e9f87fa922bdb13801d" => :mojave - sha256 "164e0b5ef61bb28432b7a3d5aa23ca78d291130aa9473b9019dce643ac93bc03" => :high_sierra - sha256 "378e42522ee14d64c0f5bf9bceeb0100c9193210eea2ee2ff80433b2b3da0166" => :sierra - sha256 "e483bf39d0e42a8124c3e2e50f117e66b285bada33df94c1b070460c6df622ea" => :el_capitan - sha256 "313fe3a9402b65b6f44b583c49ba83d301b63708b2e0a554100a5e83c03559d8" => :yosemite - sha256 "d090af2c66892bd831257dcd3ea109ab8c85cfdd7be6d2c7c2295e13b1c0b7b8" => :mavericks - end - - def install - system "make" - bin.install "tcpstat" - end - - test do - (testpath/"script.exp").write <<~EOS - set timeout 30 - spawn "#{bin}/tcpstat" - send -- "q" - expect eof - EOS - - system "expect", "-f", "script.exp" - end -end diff --git a/Formula/tcptrace.rb b/Formula/tcptrace.rb deleted file mode 100644 index c04feb9378ad7..0000000000000 --- a/Formula/tcptrace.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Tcptrace < Formula - desc "Analyze tcpdump output" - homepage "http://www.tcptrace.org/" # site is currently offline - url "https://www.mirrorservice.org/sites/distfiles.macports.org/tcptrace/tcptrace-6.6.7.tar.gz" - mirror "https://distfiles.macports.org/tcptrace/tcptrace-6.6.7.tar.gz" - sha256 "63380a4051933ca08979476a9dfc6f959308bc9f60d45255202e388eb56910bd" - - bottle do - cellar :any_skip_relocation - sha256 "b927868b2addc93b296fb8f31b08147014e9a81a356d4f18b0d4134db40081de" => :mojave - sha256 "39916506fcd6385aee6375813128a126a84f947623594011f6c2c9df1b6dc8b2" => :high_sierra - sha256 "7ccc5e6859be970a5a8a064630704111d37b03a7e3cf3a9874e16a60e4abe02b" => :sierra - sha256 "e46775d7cc808b5b52a0a36a33142b824a9b2d8bce5b0557bc1041c2e55c5ffb" => :el_capitan - sha256 "f9de7ef41a2b9dc8daee1fddef1035ddf6a08cf473b6edafcf4bb069ab5f0052" => :yosemite - sha256 "03ecc0ca3c3be27ccf8bcf88be26fb03addecbd14cc1283cab7947d39f9da6ae" => :mavericks - sha256 "a76f62f4da583260948fb22f69d123c2c6d64e92236fb67c40a37bbe492d08e0" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "tcptrace" - - # don't install with owner/group - inreplace "Makefile", "-o bin -g bin", "" - system "make", "install", "BINDIR=#{bin}", "MANDIR=#{man}" - end - - test do - touch "dump" - assert_match(/0 packets seen, 0 TCP packets/, - shell_output("#{bin}/tcptrace dump")) - end -end diff --git a/Formula/tcptraceroute.rb b/Formula/tcptraceroute.rb deleted file mode 100644 index a418ba5c9841c..0000000000000 --- a/Formula/tcptraceroute.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Tcptraceroute < Formula - desc "Traceroute implementation using TCP packets" - homepage "https://github.com/mct/tcptraceroute" - revision 1 - head "https://github.com/mct/tcptraceroute.git" - - stable do - url "https://github.com/mct/tcptraceroute/archive/tcptraceroute-1.5beta7.tar.gz" - sha256 "57fd2e444935bc5be8682c302994ba218a7c738c3a6cae00593a866cd85be8e7" - - # Call `pcap_lib_version()` rather than access `pcap_version` directly - # upstream issue: https://github.com/mct/tcptraceroute/issues/5 - patch do - url "https://github.com/mct/tcptraceroute/commit/3772409867b3c5591c50d69f0abacf780c3a555f.patch?full_index=1" - sha256 "c08e013eb01375e5ebf891773648a0893ccba32932a667eed00a6cee2ccf182e" - end - end - - bottle do - cellar :any - sha256 "27fb840b747841e42dddb71edf57b29a3bae93380bc9f53c19b07fb9307e603b" => :mojave - sha256 "d8093c6d5e3cc0738753df38332f303704de764942000130be13ee351a32255a" => :high_sierra - sha256 "dd1916233cb76a06e925884f9a1b8e681a181ae3699e0cd7086c5cd8d0c85f43" => :sierra - sha256 "823a6a2b058ebd9d9a612079d469cbb4bdcc7f3e438c40758836cf7a2373cd00" => :el_capitan - sha256 "883c29c6037488f13724adddd84c87c0d13e846aaf3a45b1c60206ac091c37fe" => :yosemite - end - - depends_on "libnet" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-libnet=#{HOMEBREW_PREFIX}", - "--mandir=#{man}" - system "make", "install" - end - - def caveats; <<~EOS - tcptraceroute requires root privileges so you will need to run - `sudo tcptraceroute`. - You should be certain that you trust any software you grant root privileges. - EOS - end - - test do - output = shell_output("#{bin}/tcptraceroute --help 2>&1", 1) - assert_match "Usage: tcptraceroute", output - end -end diff --git a/Formula/tcptunnel.rb b/Formula/tcptunnel.rb deleted file mode 100644 index cdea1a2952b50..0000000000000 --- a/Formula/tcptunnel.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Tcptunnel < Formula - desc "TCP port forwarder" - homepage "http://www.vakuumverpackt.de/tcptunnel/" - url "https://github.com/vakuum/tcptunnel/archive/v0.8.tar.gz" - sha256 "1926e2636d26570035a5a0292c8d7766c4a9af939881121660df0d0d4513ade4" - - bottle do - cellar :any_skip_relocation - sha256 "4084370b62478a4a3bc1943035542dd9b4d452b606ae9bf738bbc4fa53e19fd5" => :mojave - sha256 "b70d7f63371b5a638fa4d2f0e1cc3f27995f3f20ca1aa1712bb711bb6c9b928c" => :high_sierra - sha256 "8243b6410ae3d61df3d9c400be33c24b8da0fd0807161a02f38440c18d984661" => :sierra - sha256 "e387a861c4a9ceb3014883c851cdc43a56eddba635e1d313d976095ff78bb686" => :el_capitan - sha256 "513995a3f0a331a06ac6531ddad6e1812a9c32add2252852c81d8abe6714c5aa" => :yosemite - sha256 "d8b4b1fc5969c71bdf24c0793df0d0bcf77475ffd6eeb12a74304d2c6e1c3b1c" => :mavericks - end - - def install - bin.mkpath - system "./configure", "--prefix=#{bin}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/tcptunnel", "--version" - end -end diff --git a/Formula/tcsh.rb b/Formula/tcsh.rb deleted file mode 100644 index e3d6f3c35431c..0000000000000 --- a/Formula/tcsh.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Tcsh < Formula - desc "Enhanced, fully compatible version of the Berkeley C shell" - homepage "https://web.archive.org/web/20170609182511/www.tcsh.org/Home" - url "ftp://ftp.astron.com/pub/tcsh/tcsh-6.20.00.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.20.00.tar.gz" - sha256 "b89de7064ab54dac454a266cfe5d8bf66940cb5ed048d0c30674ea62e7ecef9d" - - bottle do - sha256 "26605931ba06f06560ff0efbbec205d80a8129eee50b5106cf508d3f2ad08f65" => :mojave - sha256 "7a37ce9d651ee573cfd079ef0743089ddd4929817827296972b41f8af74158bd" => :high_sierra - sha256 "3a59ccfdab60133b8854d528465882a3a8aaaa874f70ef1e4a0deee2f06802c6" => :sierra - sha256 "d43bbcefe883ba5bd0dc998e5c4e6e9afcd35bacc780864fdcfe5a560002d7d1" => :el_capitan - sha256 "ecbd811718e22c579434568185a8ea87d78d420c251913f84da8093f61d1b408" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" - system "make", "install" - end - - test do - (testpath/"test.csh").write <<~EOS - #!#{bin}/tcsh -f - set ARRAY=( "t" "e" "s" "t" ) - foreach i ( `seq $#ARRAY` ) - echo -n $ARRAY[$i] - end - EOS - assert_equal "test", shell_output("#{bin}/tcsh ./test.csh") - end -end diff --git a/Formula/td.rb b/Formula/td.rb deleted file mode 100644 index 0754f90df5c98..0000000000000 --- a/Formula/td.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Td < Formula - desc "Your todo list in your terminal" - homepage "https://github.com/Swatto/td" - url "https://github.com/Swatto/td/archive/1.4.0.tar.gz" - sha256 "b8080a73b274c201bc1fadaf5b83e5fab26b38838f4c82b49f1ae5dadaa94c20" - - bottle do - cellar :any_skip_relocation - sha256 "b77b89e4f9b100d834c786d0e60c17aa80a51ed452ffab032589837c11c00714" => :mojave - sha256 "91a8beaacb3c67dff0dd12a717c10868df7874d9668a043eb658be4eb180390a" => :high_sierra - sha256 "55f7d879795bcf5cde8af98b463f4751c6c5426ceed96a46a0c1531b1324a60f" => :sierra - sha256 "e740be06065aac7f578e47d0bbf6ef803993a6246d0d7fa74c90367b5f3ea080" => :el_capitan - sha256 "e608e79004fe1cfbefb2f9963ed4a4e86aad8e8c751e12a97ff3a03325bddd2b" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - (buildpath/"src/github.com/Swatto/td").install buildpath.children - cd "src/github.com/Swatto/td" do - system "go", "install" - prefix.install_metafiles - end - end - - test do - (testpath/".todos").write "[]\n" - system "#{bin}/td", "a", "todo of test" - todos = (testpath/".todos").read - assert_match "todo of test", todos - assert_match "pending", todos - end -end diff --git a/Formula/tdlib.rb b/Formula/tdlib.rb deleted file mode 100644 index ea396511eec0d..0000000000000 --- a/Formula/tdlib.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Tdlib < Formula - desc "Cross-platform library for building Telegram clients" - homepage "https://core.telegram.org/tdlib" - url "https://github.com/tdlib/td/archive/v1.3.0.tar.gz" - sha256 "2953fe75027ac531248b359123aa4812666377ac874c1db506fa74176f2d2338" - - bottle do - cellar :any - sha256 "b4814dca4a43f82588ce6fbe98aba1aea02b030a979deb68b42c4330c69ad282" => :mojave - sha256 "45114d88ad51f18337f09debc02165757349811c1022dd0849ef1adf74a9d40f" => :high_sierra - sha256 "e5fec3448dccf46ab20db066d2699cdfb79beb62592f57ff59f7520ed02103ec" => :sierra - end - - depends_on "cmake" => :build - depends_on "gperf" - depends_on "openssl" - depends_on "readline" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"tdjson_example.cpp").write <<~EOS - #include "td/telegram/td_json_client.h" - #include - - int main() { - void* client = td_json_client_create(); - if (!client) return 1; - std::cout << "Client created: " << client; - return 0; - } - EOS - - system ENV.cxx, "tdjson_example.cpp", "-L#{lib}", "-ltdjson", "-o", "tdjson_example" - assert_match "Client created", shell_output("./tdjson_example") - end -end diff --git a/Formula/tealdeer.rb b/Formula/tealdeer.rb deleted file mode 100644 index fd1bcc26ecdf6..0000000000000 --- a/Formula/tealdeer.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Tealdeer < Formula - desc "Very fast implementation of tldr in Rust" - homepage "https://github.com/dbrgn/tealdeer" - url "https://github.com/dbrgn/tealdeer/archive/v1.1.0.tar.gz" - sha256 "647990936af527e9738e8befb432fdf8dd40e7b2ab0066afc652330fddd3dd0e" - - bottle do - sha256 "788e57ff6bf20cb0c43513d1b3ecd444ce4c880e5504a7865b47f01ec53a68db" => :mojave - sha256 "a8de8c1172dee32c86825b24cc1a85e24265d535ee150c553ab023d9abef1a74" => :high_sierra - sha256 "957602ffd92a10f6928efa1674e49301058878aaf62f961c5c2d4b4b27e14dae" => :sierra - end - - depends_on "rust" => :build - - conflicts_with "tldr", :because => "both install `tldr` binaries" - - def install - system "cargo", "install", "--root", prefix, - "--path", "." - bash_completion.install "bash_tealdeer" - end - - test do - assert_match "brew", shell_output("#{bin}/tldr -u && #{bin}/tldr brew") - end -end diff --git a/Formula/teapot.rb b/Formula/teapot.rb deleted file mode 100644 index 705674e1c142a..0000000000000 --- a/Formula/teapot.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Teapot < Formula - desc "Table editor and planner" - homepage "https://www.syntax-k.de/projekte/teapot/" - url "https://www.syntax-k.de/projekte/teapot/teapot-2.3.0.tar.gz" - sha256 "580e0cb416ae3fb3df87bc6e92e43bf72929d47b65ea2b50bc09acea3bff0b65" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "29d1d772e73a64a1616dcbeb3d32e8839ec7642f809d604eef52ac7805405ba3" => :mojave - sha256 "f918044ee7953b5cc9be50487cc86bf57b4e217990551cc67c6f0c9c41f0ac0a" => :high_sierra - sha256 "f0dc057cdfa1aa5168898a22791ee72fd3e525fd750838e94147f8b3811c1b07" => :sierra - sha256 "84673e8886e1f24250116d8c423383d0babbc53e1cb669ba46b45a37a2344399" => :el_capitan - sha256 "0ffd7fa1ac31cc91c9c71d225d26970e23da5719d7505d4a1dcaf40617c44afb" => :yosemite - sha256 "24dd3dfcdc52f47f3247ae56931cc9864434118e8d097e64e72201fdaeb08391" => :mavericks - end - - depends_on "cmake" => :build - - # The upstream tarball still defines the version number as "2.2.1", even - # though the tarball contains the directory name "teapot-2.3.0" and there are - # significant differences between this and the 2.2.1 tarball. - patch :DATA - - def install - args = std_cmake_args + ["-DENABLE_HELP=OFF", ".."] - mkdir "macbuild" do - system "cmake", *args - system "make", "install" - end - doc.install "doc/teapot.lyx" - end -end -__END__ -diff --git a/config.h b/config.h -index 2a4e34f..cdf11a1 100644 ---- a/config.h -+++ b/config.h -@@ -1,7 +1,7 @@ - /* configuration values */ - - --#define VERSION "2.2.1" -+#define VERSION "2.3.0" - - #define HELPFILE "/usr/local/share/doc/teapot/html/index.html" diff --git a/Formula/tectonic.rb b/Formula/tectonic.rb deleted file mode 100644 index 19f8946152065..0000000000000 --- a/Formula/tectonic.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Tectonic < Formula - desc "Modernized, complete, self-contained TeX/LaTeX engine" - homepage "https://tectonic-typesetting.github.io/" - url "https://github.com/tectonic-typesetting/tectonic/archive/v0.1.11.tar.gz" - sha256 "e700dc691dfd092adfe098b716992136343ddfac5eaabb1e8cfae4e63f8454c7" - revision 1 - - bottle do - sha256 "1a7529e618b09f3b3c7852d7734f631847c7d31334ebe43d10a5da3dc14bc6b4" => :mojave - sha256 "5bfc6c5d8d8f1c80ed55e7543bb081a6fa1f83faa8ca01759541b179f62c9c65" => :high_sierra - sha256 "86202b51be7fe24c4306ca5e38aa39112bc879d0f651bffdee0d35e1ca71d72f" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "freetype" - depends_on "graphite2" - depends_on "harfbuzz" - depends_on "icu4c" - depends_on "libpng" - depends_on "openssl" - - def install - ENV.cxx11 - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version # needed for CLT-only builds - - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix - - system "cargo", "install", "--root", prefix, "--path", "." - pkgshare.install "tests" - end - - test do - system bin/"tectonic", "-o", testpath, pkgshare/"tests/xenia/paper.tex" - assert_predicate testpath/"paper.pdf", :exist?, "Failed to create paper.pdf" - assert_match "PDF document", shell_output("file paper.pdf") - end -end diff --git a/Formula/tee-clc.rb b/Formula/tee-clc.rb deleted file mode 100644 index fe0a306f58151..0000000000000 --- a/Formula/tee-clc.rb +++ /dev/null @@ -1,39 +0,0 @@ -class TeeClc < Formula - desc "Microsoft Team Explorer Everywhere command-line Client" - homepage "https://github.com/Microsoft/team-explorer-everywhere" - url "https://github.com/Microsoft/team-explorer-everywhere/releases/download/14.134.0/TEE-CLC-14.134.0.zip" - sha256 "af4b7123a09475ff03a3f5662df3de614df2f4acc33df16cdab307b5fb6d7dc7" - - bottle :unneeded - - depends_on :java => "1.6+" - - conflicts_with "tiny-fugue", :because => "both install a `tf` binary" - - def install - libexec.install "tf", "lib" - (libexec/"native").install "native/macosx" - bin.write_exec_script libexec/"tf" - - prefix.install "ThirdPartyNotices.html" - share.install "help" - end - - test do - (testpath/"test.exp").write <<~EOS - spawn #{bin}/tf workspace - set timeout 5 - expect { - timeout { exit 1 } - "workspace could not be determined" - } - - spawn #{bin}/tf eula - expect { - "MICROSOFT TEAM EXPLORER EVERYWHERE" { exit 0 } - timeout { exit 1 } - } - EOS - system "expect", "-f", "test.exp" - end -end diff --git a/Formula/teem.rb b/Formula/teem.rb deleted file mode 100644 index 544407385af72..0000000000000 --- a/Formula/teem.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Teem < Formula - desc "Libraries for scientific raster data" - homepage "https://teem.sourceforge.io/" - url "https://downloads.sourceforge.net/project/teem/teem/1.11.0/teem-1.11.0-src.tar.gz" - sha256 "a01386021dfa802b3e7b4defced2f3c8235860d500c1fa2f347483775d4c8def" - head "http://svn.code.sf.net/p/teem/code/teem/trunk" - - bottle do - sha256 "439d02dd7f54d7f307b5984d00448a4e77309660e8f1c52e998ef9ea40fdcaa1" => :mojave - sha256 "4cb2692b42e79880161879605c3990cd5d0c4fbb171c7ccd003bb9d6bb0fee09" => :high_sierra - sha256 "31d19cd9e0e4c064fb743c41a286736503e61b1d5e4b81f29140fcebf2cde2c8" => :sierra - sha256 "5ade8dc18d0c66ac154d802df6c64e88222781b6fc427a841fb1f4047f8c4e49" => :el_capitan - sha256 "3974a9a565044cb4de798eb1bec2b8980eef03eb6bd7ec6c98cddd606f7c8a29" => :yosemite - sha256 "c340d18c157b81be663636ff72326ecb946313ea1dfc533a6ba95b9efdb6bf44" => :mavericks - sha256 "96733ab04a4a3a7feb5db5c95f58b0a0c1ef418b91988d1000898a46c142a3ec" => :mountain_lion - end - - depends_on "cmake" => :build - depends_on "libpng" - - def install - # Installs CMake archive files directly into lib, which we discourage. - # Workaround by adding version to libdir & then symlink into expected structure. - system "cmake", *std_cmake_args, - "-DBUILD_SHARED_LIBS:BOOL=ON", - "-DTeem_USE_LIB_INSTALL_SUBDIR:BOOL=ON" - system "make", "install" - - lib.install_symlink Dir.glob(lib/"Teem-#{version}/*.dylib") - (lib/"cmake/teem").install_symlink Dir.glob(lib/"Teem-#{version}/*.cmake") - end - - test do - system "#{bin}/nrrdSanity" - end -end diff --git a/Formula/teensy_loader_cli.rb b/Formula/teensy_loader_cli.rb deleted file mode 100644 index 458fb66db9830..0000000000000 --- a/Formula/teensy_loader_cli.rb +++ /dev/null @@ -1,29 +0,0 @@ -class TeensyLoaderCli < Formula - desc "Command-line integration for Teensy USB development boards" - homepage "https://www.pjrc.com/teensy/loader_cli.html" - url "https://github.com/PaulStoffregen/teensy_loader_cli/archive/2.1.tar.gz" - sha256 "5c36fe45b9a3a71ac38848b076cd692bf7ca8826a69941c249daac3a1d95e388" - revision 1 - head "https://github.com/PaulStoffregen/teensy_loader_cli.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "29f39b8c7638729e3217e102c3c1baae55e77446cd98f4eb98bd9a03a1af2dcf" => :mojave - sha256 "27403d4218ade972073291cf3a7c0550bf624fa7ad5ad60d63786ca87303d518" => :high_sierra - sha256 "8e4375b7d7fef1ed28bb48cef480c347ef488137956a61ec8b146946fd25e324" => :sierra - end - - def install - ENV["OS"] = "MACOSX" - ENV["SDK"] = MacOS.sdk_path || "/" - - system "make" - bin.install "teensy_loader_cli" - end - - test do - output = shell_output("#{bin}/teensy_loader_cli 2>&1", 1) - assert_match /Filename must be specified/, output - end -end diff --git a/Formula/teleconsole.rb b/Formula/teleconsole.rb deleted file mode 100644 index 833fda0773a6b..0000000000000 --- a/Formula/teleconsole.rb +++ /dev/null @@ -1,81 +0,0 @@ -require "language/go" - -class Teleconsole < Formula - desc "Free service to share your terminal session with people you trust" - homepage "https://www.teleconsole.com" - url "https://github.com/gravitational/teleconsole/archive/0.3.1.tar.gz" - sha256 "663307a1dfe4baadf7e1ed9f5b66b1d203bf9696068e9bcd86e535f286e64d59" - - bottle do - cellar :any_skip_relocation - sha256 "0f51cf4866e3e7955dadc31e6a73c30fd99566c110674394d34dfdefc042453c" => :mojave - sha256 "a00b04aeb2e57c8ae3cca20632033bb2a60e1c3ec242497bee4a14240e5276a5" => :high_sierra - sha256 "77f2ea18e72c3662cdc3a9b204752b4d18ee65df2a4d9b47d53b31a7440a5109" => :sierra - sha256 "d7b7e6dd7c164f7145532f14fae09909651c4f997e75c8b8b2f5b98b9512a117" => :el_capitan - sha256 "7e2997cfe314a0b08332bfc6c4611707f8c97aa80ba92bc74a6ce3d2abc9c159" => :yosemite - end - - depends_on "go" => :build - - go_resource "github.com/Sirupsen/logrus" do - url "https://github.com/Sirupsen/logrus.git", - :revision => "d26492970760ca5d33129d2d799e34be5c4782eb" - end - - go_resource "github.com/gravitational/trace" do - url "https://github.com/gravitational/trace.git", - :revision => "6e153c7add15eb07e311f892779fb294373c4cfa" - end - - go_resource "github.com/gravitational/teleport" do - url "https://github.com/gravitational/teleport.git", - :revision => "002b640a16f097e2f834b4ae33c9edfb81d5798c" - end - - go_resource "github.com/jonboulle/clockwork" do - url "https://github.com/jonboulle/clockwork.git", - :revision => "bcac9884e7502bb2b474c0339d889cb981a2f27f" - end - - go_resource "golang.org/x/crypto" do - url "https://go.googlesource.com/crypto.git", - :revision => "9477e0b78b9ac3d0b03822fd95422e2fe07627cd" - end - - go_resource "golang.org/x/net" do - url "https://go.googlesource.com/net.git", - :revision => "55a3084c9119aeb9ba2437d595b0a7e9cb635da9" - end - - go_resource "github.com/fatih/color" do - url "https://github.com/fatih/color.git", - :revision => "bf82308e8c8546dc2b945157173eb8a959ae9505" - end - - go_resource "github.com/mattn/go-colorable" do - url "https://github.com/mattn/go-colorable.git", - :revision => "d228849504861217f796da67fae4f6e347643f15" - end - - go_resource "github.com/mattn/go-isatty" do - url "https://github.com/mattn/go-isatty.git", - :revision => "66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8" - end - - patch do - url "https://github.com/gravitational/teleconsole/pull/8.patch?full_index=1" - sha256 "54f551f939c82c482a4aa6df5dbf5077943cf39f2b1d5265a0747c9cc5606e24" - end - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/gravitational" - ln_s buildpath, buildpath/"src/github.com/gravitational/teleconsole" - Language::Go.stage_deps resources, buildpath/"src" - system "make", "OUT=#{bin}/teleconsole" - end - - test do - system "#{bin}/teleconsole", "help" - end -end diff --git a/Formula/telegraf.rb b/Formula/telegraf.rb deleted file mode 100644 index 561c7d3cf8d1a..0000000000000 --- a/Formula/telegraf.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Telegraf < Formula - desc "Server-level metric gathering agent for InfluxDB" - homepage "https://influxdata.com" - url "https://github.com/influxdata/telegraf/archive/1.9.1.tar.gz" - sha256 "27ce44eb3f5153e0e3eba4609262a746586d866a1ca5f17c5a77e12596e513e4" - head "https://github.com/influxdata/telegraf.git" - - bottle do - cellar :any_skip_relocation - sha256 "9a8d09b15848278239f5326a3b92b65a85568a9656472425d83caaca007f91db" => :mojave - sha256 "7da8c953e4b98fb28f403ff58ce0d1375635350175fcfd605c29edb5ea1ceef4" => :high_sierra - sha256 "d3414e96f29f0a92056a554625fde582f30017a291233dfe5443990ab1b79a71" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/influxdata/telegraf" - dir.install buildpath.children - cd dir do - system "dep", "ensure", "-vendor-only" - system "go", "install", "-ldflags", "-X main.version=#{version}", "./..." - prefix.install_metafiles - end - bin.install "bin/telegraf" - etc.install dir/"etc/telegraf.conf" => "telegraf.conf" - end - - def post_install - # Create directory for additional user configurations - (etc/"telegraf.d").mkpath - end - - plist_options :manual => "telegraf -config #{HOMEBREW_PREFIX}/etc/telegraf.conf" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/telegraf - -config - #{etc}/telegraf.conf - -config-directory - #{etc}/telegraf.d - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/telegraf.log - StandardOutPath - #{var}/log/telegraf.log - - - EOS - end - - test do - (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") - system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", - "-input-filter", "cpu:mem" - end -end diff --git a/Formula/telegram-cli.rb b/Formula/telegram-cli.rb deleted file mode 100644 index ffd92d3f5af1e..0000000000000 --- a/Formula/telegram-cli.rb +++ /dev/null @@ -1,51 +0,0 @@ -class TelegramCli < Formula - desc "Command-line interface for Telegram" - homepage "https://github.com/vysheng/tg" - url "https://github.com/vysheng/tg.git", - :tag => "1.3.1", - :revision => "5935c97ed05b90015418b5208b7beeca15a6043c" - revision 1 - head "https://github.com/vysheng/tg.git" - - bottle do - sha256 "850f77c9390643abf874aac99b624e312b2ceca803fd21207df48a5c9230fe66" => :mojave - sha256 "938c36ae945666dc88be1aec3e714a79a71d42f9daa1010d0e73206b61f9a635" => :high_sierra - sha256 "e9ff00dd7a4983b41b08519f0a756990a0aa30bc2263b6e262f72ee3e9b23ce2" => :sierra - sha256 "caabf1d19eb2b5b04560e9dc15583eb7dc3c0b0a733c732d73da09abf51dbbaf" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "libconfig" - depends_on "libevent" - depends_on "openssl" - depends_on "readline" - - # Look for the configuration file under /usr/local/etc rather than /etc on OS X. - # Pull Request: https://github.com/vysheng/tg/pull/1306 - patch do - url "https://github.com/vysheng/tg/pull/1306.patch?full_index=1" - sha256 "1cdaa1f3e1f7fd722681ea4e02ff31a538897ed9d704c61f28c819a52ed0f592" - end - - def install - args = %W[ - --prefix=#{prefix} - CFLAGS=-I#{Formula["readline"].include} - CPPFLAGS=-I#{Formula["readline"].include} - LDFLAGS=-L#{Formula["readline"].lib} - --disable-liblua - --disable-python - ] - - system "./configure", *args - system "make" - - bin.install "bin/telegram-cli" => "telegram" - (etc/"telegram-cli").install "server.pub" - end - - test do - assert_match "telegram-cli", (shell_output "#{bin}/telegram -h", 1) - end -end diff --git a/Formula/teleport.rb b/Formula/teleport.rb deleted file mode 100644 index 0ebd6230bf996..0000000000000 --- a/Formula/teleport.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Teleport < Formula - desc "Modern SSH server for teams managing distributed infrastructure" - homepage "https://gravitational.com/teleport" - url "https://github.com/gravitational/teleport/archive/v3.1.1.tar.gz" - sha256 "44a9da5a207a086aacb9025705a1d31d6eaedcab2cfa882ca3e325051ade3810" - - bottle do - cellar :any_skip_relocation - sha256 "af5ad1894ae91780665dc0a5fd8ae22a58065c20549c6b84f4c32be46789c9b7" => :mojave - sha256 "1ff46d3ccc3f2bee77d1cfecb150489c7d75b319e749b5c559e7811eba9d4bb3" => :high_sierra - sha256 "19fcbff9632b770d426f8705772dcbaae53461fb73e232353382b7d9291c606c" => :sierra - end - - depends_on "go" => :build - - conflicts_with "etsh", :because => "both install `tsh` binaries" - - def install - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = MacOS.prefer_64_bit? ? "amd64" : "386" - ENV["GOPATH"] = buildpath - ENV["GOROOT"] = Formula["go"].opt_libexec - - (buildpath/"src/github.com/gravitational/teleport").install buildpath.children - cd "src/github.com/gravitational/teleport" do - ENV.deparallelize { system "make", "full" } - bin.install Dir["build/*"] - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/teleport version") - (testpath/"config.yml").write shell_output("#{bin}/teleport configure") - .gsub("0.0.0.0", "127.0.0.1") - .gsub("/var/lib/teleport", testpath) - .gsub("/var/run", testpath) - .gsub(/https_(.*)/, "") - begin - pid = spawn("#{bin}/teleport start -c #{testpath}/config.yml") - sleep 5 - system "/usr/bin/curl", "--insecure", "https://localhost:3080" - system "/usr/bin/nc", "-z", "localhost", "3022" - system "/usr/bin/nc", "-z", "localhost", "3023" - system "/usr/bin/nc", "-z", "localhost", "3025" - ensure - Process.kill(9, pid) - end - end -end diff --git a/Formula/telnet.rb b/Formula/telnet.rb deleted file mode 100644 index 9eb73802b9c4b..0000000000000 --- a/Formula/telnet.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Telnet < Formula - desc "User interface to the TELNET protocol (built from macOS Sierra sources)" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/remote_cmds/remote_cmds-60.tar.gz" - sha256 "9d27417d5032113e93edebc37f82a060536bc557b119544e59c46aeb1be92820" - - bottle do - cellar :any_skip_relocation - sha256 "d63cb3bdfa4f1dce67cf0956b2fa36d15b0a429a71a6e5538df1a9f517b76589" => :mojave - sha256 "31ab0f184327fd51fa3273df44bb3f4f2fd78049c15998795fea7e7ee72439d8" => :high_sierra - sha256 "fd42af8e2c7670c2554ee11c6443f701f6045b9a89c40d3a8463232a8a9a7f90" => :sierra - sha256 "048572040593f5674d28136d7de979e03b276f96e1063c930709b22527b963e2" => :el_capitan - end - - depends_on :xcode => :build - - conflicts_with "inetutils", :because => "both install 'telnet' binaries" - - resource "libtelnet" do - url "https://opensource.apple.com/tarballs/libtelnet/libtelnet-13.tar.gz" - sha256 "e7d203083c2d9fa363da4cc4b7377d4a18f8a6f569b9bcf58f97255941a2ebd1" - end - - def install - resource("libtelnet").stage do - ENV["SDKROOT"] = MacOS.sdk_path - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - # Force 64 bit-only build, otherwise it fails on Mojave - xcodebuild "SYMROOT=build", "-arch", "x86_64" - - libtelnet_dst = buildpath/"telnet.tproj/build/Products" - libtelnet_dst.install "build/Release/libtelnet.a" - libtelnet_dst.install "build/Release/usr/local/include/libtelnet/" - end - - system "make", "-C", "telnet.tproj", - "OBJROOT=build/Intermediates", - "SYMROOT=build/Products", - "DSTROOT=build/Archive", - "CFLAGS=$(CC_Flags) -isystembuild/Products/", - "LDFLAGS=$(LD_Flags) -Lbuild/Products/", - "RC_ARCHS=x86_64", # Force 64-bit build for Mojave - "install" - - bin.install "telnet.tproj/build/Archive/usr/local/bin/telnet" - man1.install "telnet.tproj/telnet.1" - end - - test do - output = shell_output("#{bin}/telnet 94.142.241.111 666", 1) - assert_match "Connected to towel.blinkenlights.nl.", output - end -end diff --git a/Formula/telnetd.rb b/Formula/telnetd.rb deleted file mode 100644 index 59696ee4250b7..0000000000000 --- a/Formula/telnetd.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Telnetd < Formula - desc "TELNET server (built from macOS Sierra sources)" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/remote_cmds/remote_cmds-54.50.1.tar.gz" - sha256 "156ddec946c81af1cbbad5cc6e601135245f7300d134a239cda45ff5efd75930" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "61c06e02268d33b84484ba991221493ef0d01dfcff6c4e655ff831c3f7fc6f51" => :mojave - sha256 "6c0d7658f3f74e12ea983a72907635a0444d97290b43c604b96218b4e6ca52d1" => :high_sierra - sha256 "43e4d4a2eb55629583d76ce9c6131f2ce1d4868b90d2e24a170ffc63f4947c8a" => :sierra - sha256 "87932091398ba2cddf14298d70ce1b17ebb7c1e734e177807f23444a44987df2" => :el_capitan - end - - depends_on :xcode => :build - - resource "libtelnet" do - url "https://opensource.apple.com/tarballs/libtelnet/libtelnet-13.tar.gz" - sha256 "e7d203083c2d9fa363da4cc4b7377d4a18f8a6f569b9bcf58f97255941a2ebd1" - end - - def install - resource("libtelnet").stage do - # Force 64 bit-only build, otherwise it fails on Mojave - xcodebuild "SYMROOT=build", "-arch", "x86_64" - - libtelnet_dst = buildpath/"telnetd.tproj/build/Products" - libtelnet_dst.install "build/Release/libtelnet.a" - libtelnet_dst.install "build/Release/usr/local/include/libtelnet/" - end - - system "make", "-C", "telnetd.tproj", - "OBJROOT=build/Intermediates", - "SYMROOT=build/Products", - "DSTROOT=build/Archive", - "CC=#{ENV.cc}", - "CFLAGS=$(CC_Flags) -isystembuild/Products/", - "LDFLAGS=$(LD_Flags) -Lbuild/Products/", - "RC_ARCHS=x86_64" # Force 64-bit build for Mojave - - sbin.install "telnetd.tproj/build/Products/telnetd" - man8.install "telnetd.tproj/telnetd.8" - end - - def caveats - <<~EOS - You may need super-user privileges to run this program properly. See the man - page for more details. - EOS - end - - test do - assert_match "usage: telnetd", shell_output("#{sbin}/telnetd usage 2>&1", 1) - end -end diff --git a/Formula/template-glib.rb b/Formula/template-glib.rb deleted file mode 100644 index 2682dbeeed4ef..0000000000000 --- a/Formula/template-glib.rb +++ /dev/null @@ -1,65 +0,0 @@ -class TemplateGlib < Formula - desc "GNOME templating library for GLib" - homepage "https://gitlab.gnome.org/GNOME/template-glib" - url "https://download.gnome.org/sources/template-glib/3.30/template-glib-3.30.0.tar.xz" - sha256 "cf690d391bfc71036e31867df6da90315a3db83f739a8657f580b941b96e3649" - - bottle do - sha256 "bc65703062e59b6f45e161ec7e3c6c050ed6961e046498880cf2de28bf2aa4bb" => :mojave - sha256 "f0f00da3b21f9e4899f833cd559c1ec1a010031212e639a1e1410bc50e4aafaf" => :high_sierra - sha256 "8f5560f08f8b609a77aec92fb6542350f69097242e695738d62bc9536aa43d37" => :sierra - sha256 "d1d5b7cf68a80849bc6d95c0a29093aac2b639aeb924b6d8061d31fbe458d772" => :el_capitan - end - - depends_on "bison" => :build # does not appear to work with system bison - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python" => :build - depends_on "glib" - depends_on "gobject-introspection" - - def install - mkdir "build" do - system "meson", "--prefix=#{prefix}", "-Dwith_vapi=false", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - TmplTemplateLocator *locator = tmpl_template_locator_new(); - g_assert_nonnull(locator); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - pcre = Formula["pcre"] - flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split - flags += %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/template-glib-1.0 - -I#{pcre.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -ltemplate_glib-1.0 - -Wl,-framework - -Wl,CoreFoundation - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/temporal_tables.rb b/Formula/temporal_tables.rb deleted file mode 100644 index 4db6c019a0d53..0000000000000 --- a/Formula/temporal_tables.rb +++ /dev/null @@ -1,52 +0,0 @@ -class TemporalTables < Formula - desc "Temporal Tables PostgreSQL Extension" - homepage "https://pgxn.org/dist/temporal_tables/" - url "https://github.com/arkhipov/temporal_tables/archive/v1.2.0.tar.gz" - sha256 "e6d1b31a124e8597f61b86f08b6a18168f9cd9da1db77f2a8dd1970b407b7610" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "39df26c928bb5460cfdb81a6b6e885565e127629f6fbddc34e87a101232a4819" => :mojave - sha256 "64f64ad4344321f89ce6b14c4bd44eb04f026ae76ffcdd65396879f533158dfa" => :high_sierra - sha256 "eec62fa0f8393fbeb3e7f53fa6fb904e0e75048d8ea64946d162f0a3b9f679ea" => :sierra - end - - depends_on "postgresql" - - # Fix for postgresql 11 compatibility: - # https://github.com/arkhipov/temporal_tables/issues/38 - patch do - url "https://github.com/mlt/temporal_tables/commit/24906c44.diff?full_index=1" - sha256 "9c20bde0bafb9cbf0fee9a4922134069e403c728660f6b9c0d6ee3ae7e48cdfc" - end - - def install - ENV["PG_CONFIG"] = Formula["postgresql"].opt_bin/"pg_config" - - # Use stage directory to prevent installing to pg_config-defined dirs, - # which would not be within this package's Cellar. - mkdir "stage" - system "make", "install", "DESTDIR=#{buildpath}/stage" - - lib.install Dir["stage/**/lib/*"] - (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] - end - - test do - pg_bin = Formula["postgresql"].opt_bin - pg_port = "55562" - system "#{pg_bin}/initdb", testpath/"test" - pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } - - begin - sleep 2 - - system "#{pg_bin}/createdb", "-p", pg_port, "test" - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION temporal_tables;" - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/tenyr.rb b/Formula/tenyr.rb deleted file mode 100644 index b9b255767dc33..0000000000000 --- a/Formula/tenyr.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Tenyr < Formula - desc "32-bit computing environment (including simulated CPU)" - homepage "http://tenyr.info/" - url "https://github.com/kulp/tenyr/archive/v0.9.6.tar.gz" - sha256 "04b92514927abfb5b7814a203bd296e8b528ae759c755402427db4cbc3ddbc47" - head "https://github.com/kulp/tenyr.git", :branch => "develop" - - bottle do - cellar :any - sha256 "79f1f08181a4a3563a95e002068cde55db5dd83f1e67e4baa10937659d72bb97" => :mojave - sha256 "7ed5a7f7573c9970216c21dc1586fef1107ea97e20f143dd11ee41c6627d13b3" => :high_sierra - sha256 "0b734e40019ad537072b648526d08c6d34c669251ca5bb8b4c22a3c2bd3ea745" => :sierra - sha256 "1b09019bb0131b4ce6599612e55a828d22390757473c22dceab47aa30671fd1f" => :el_capitan - end - - depends_on "bison" => :build # tenyr requires bison >= 2.5 - depends_on "pkg-config" => :build - depends_on "sdl2_image" - - def install - system "make", "BISON=#{Formula["bison"].opt_bin}/bison", - "JIT=0", "BUILDDIR=build/homebrew" - - pkgshare.install "rsrc", "plugins" - cd "build/homebrew" do - bin.install "tsim", "tas", "tld" - lib.install Dir["*.dylib"] - end - end - - test do - # sanity test assembler, linker and simulator - (testpath/"part1").write "B <- 9\n" - (testpath/"part2").write "C <- B * 3\n" - - system "#{bin}/tas", "--output=a.to", "part1" - system "#{bin}/tas", "--output=b.to", "part2" - system "#{bin}/tld", "--output=test.texe", "a.to", "b.to" - - assert_match "C 0000001b", shell_output("#{bin}/tsim -vvvv test.texe 2>&1") - end -end diff --git a/Formula/tepl.rb b/Formula/tepl.rb deleted file mode 100644 index 73819d1fbff86..0000000000000 --- a/Formula/tepl.rb +++ /dev/null @@ -1,106 +0,0 @@ -class Tepl < Formula - desc "GNOME Text Editor Product Line" - homepage "https://wiki.gnome.org/Projects/Tepl" - url "https://download.gnome.org/sources/tepl/4.2/tepl-4.2.0.tar.xz" - sha256 "8839d4428ecdd87fd5abc657ebbe5a9601a57262e9946845e47dec264e669ccd" - revision 1 - - bottle do - sha256 "7441ef2c9d036a7b98f4d31b1fc2d4db265aff6950520f7f0832e79fc91ce9f7" => :mojave - sha256 "2077774560060c8ab6bdb55f207959d22e798c8ded812a5302b7e8a657f3e238" => :high_sierra - sha256 "30e342a9e85b2bf27e568ec242f141e4845b119d5392ce5df5868edb72599027" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "amtk" - depends_on "gtksourceview4" - depends_on "uchardet" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = tepl_file_get_type(); - return 0; - } - EOS - ENV.libxml2 - atk = Formula["atk"] - amtk = Formula["amtk"] - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gtkx3 = Formula["gtk+3"] - gtksourceview4 = Formula["gtksourceview4"] - harfbuzz = Formula["harfbuzz"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pcre = Formula["pcre"] - pixman = Formula["pixman"] - uchardet = Formula["uchardet"] - flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split - flags += %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{amtk.opt_include}/amtk-5 - -I#{cairo.opt_include}/cairo - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/gio-unix-2.0/ - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gtksourceview4.opt_include}/gtksourceview-4 - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/tepl-4 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pcre.opt_include} - -I#{pixman.opt_include}/pixman-1 - -I#{uchardet.opt_include}/uchardet - -D_REENTRANT - -L#{atk.opt_lib} - -L#{amtk.opt_lib} - -L#{cairo.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gtksourceview4.opt_lib} - -L#{gtkx3.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lamtk-5.0 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -ltepl-4 - -lgtk-3 - -lgtksourceview-4.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/term.rb b/Formula/term.rb deleted file mode 100644 index 0955724ae1bdd..0000000000000 --- a/Formula/term.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Term < Formula - desc "Open terminal in specified directory (and optionally run command)" - homepage "https://github.com/liyanage/macosx-shell-scripts/blob/master/term" - url "https://raw.githubusercontent.com/liyanage/macosx-shell-scripts/e29f7eaa1eb13d78056dec85dc517626ab1d93e3/term" - version "2.1" - sha256 "a0a430f024ff330c6225fe52e3ed9278fccf8a9cd2be9023282481dacfdffb3c" - - bottle :unneeded - - def install - bin.install "term" - end -end diff --git a/Formula/termbox.rb b/Formula/termbox.rb deleted file mode 100644 index 0fe850e70452a..0000000000000 --- a/Formula/termbox.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Termbox < Formula - desc "Library for writing text-based user interfaces" - homepage "https://code.google.com/p/termbox/" - url "https://github.com/nsf/termbox/archive/v1.1.2.tar.gz" - sha256 "61c9940b42b3ac44bf0cba67eacba75e3c02088b8c695149528c77def04d69b1" - head "https://github.com/nsf/termbox.git" - - bottle do - cellar :any - sha256 "a2d151f7fd74514d23a009b498c5fde9db4a781cd0052386e39a50b054b4cc49" => :mojave - sha256 "338467da37e0f1a93eda52353d50805b84be1a63135e3979120fe660422a9dd8" => :high_sierra - sha256 "503690d456e5625825b38dc7513ed8c806e4031de7b22fd66eebe0c66145ec41" => :sierra - sha256 "84820bcc0a8af2ff453330e8155ca467e2794de179fed4b0238b05635e1fe35a" => :el_capitan - end - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - // we can't test other functions because the CI test runs in a - // non-interactive shell - tb_set_clear_attributes(42, 42); - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-ltermbox", "-o", "test" - system "./test" - end -end diff --git a/Formula/terminal-notifier.rb b/Formula/terminal-notifier.rb deleted file mode 100644 index 441864610ea97..0000000000000 --- a/Formula/terminal-notifier.rb +++ /dev/null @@ -1,32 +0,0 @@ -class TerminalNotifier < Formula - desc "Send macOS User Notifications from the command-line" - homepage "https://github.com/julienXX/terminal-notifier" - url "https://github.com/julienXX/terminal-notifier/archive/2.0.0.tar.gz" - sha256 "6f22a7626e4e68e88df2005a5f256f7d3b432dbf4c0f8a0c15c968d9e38bf84c" - head "https://github.com/julienXX/terminal-notifier.git" - - bottle do - cellar :any_skip_relocation - sha256 "9671c602326357b7397248bfb0cf062bc47f19add15b615e512f58545c387c31" => :mojave - sha256 "f112656234f4100d23cc1a41b96f92a09974360a822c2ec0fb6f9970862c1a22" => :high_sierra - sha256 "210cd525fad70bbaef40f092bc3478b1519f68f73c034990230d8b1cc61a8a7c" => :sierra - sha256 "75ce68fd95fb502e20ccb25be72f7db12112ac1a4bdf5a70c140cd174ecbacf5" => :el_capitan - end - - depends_on :xcode => :build - depends_on :macos => :mountain_lion - - def install - xcodebuild "-project", "Terminal Notifier.xcodeproj", - "-target", "terminal-notifier", - "SYMROOT=build", - "-verbose", - "CODE_SIGN_IDENTITY=" - prefix.install "build/Release/terminal-notifier.app" - bin.write_exec_script prefix/"terminal-notifier.app/Contents/MacOS/terminal-notifier" - end - - test do - assert_match version.to_s, pipe_output("#{bin}/terminal-notifier -help") - end -end diff --git a/Formula/terminator.rb b/Formula/terminator.rb deleted file mode 100644 index ada57e17697f9..0000000000000 --- a/Formula/terminator.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Terminator < Formula - desc "Multiple terminals in one window" - homepage "https://gnometerminator.blogspot.com/p/introduction.html" - revision 2 - head "lp:terminator", :using => :bzr - - stable do - url "https://launchpad.net/terminator/trunk/0.98/+download/terminator-0.98.tar.gz" - sha256 "0a6d8c9ffe36d67e60968fbf2752c521e5d498ceda42ef171ad3e966c02f26c1" - - # Patch to fix cwd resolve issue for OS X / Darwin - # See: https://bugs.launchpad.net/terminator/+bug/1261293 - # Should be fixed in next release after 0.98 - patch :DATA - end - - bottle do - cellar :any_skip_relocation - sha256 "684029ff528fce3fc54d7449574539948d0d53255e3ad7f58ec679af58c2c96e" => :mojave - sha256 "00e85432871cb5e7df4bcbe8e835cf9ad619f772de9018c41ed781bef4fa6643" => :high_sierra - sha256 "00e85432871cb5e7df4bcbe8e835cf9ad619f772de9018c41ed781bef4fa6643" => :sierra - sha256 "00e85432871cb5e7df4bcbe8e835cf9ad619f772de9018c41ed781bef4fa6643" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "pango" - depends_on "pygobject" - depends_on "pygtk" - depends_on "python@2" - depends_on "vte" - - def install - ENV.prepend_create_path "PYTHONPATH", lib/"python2.7/site-packages" - system "python", *Language::Python.setup_install_args(prefix) - end - - def post_install - system "#{Formula["gtk"].opt_bin}/gtk-update-icon-cache", "-f", - "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - end - - test do - ENV.prepend_path "PYTHONPATH", Formula["pygtk"].opt_lib/"python2.7/site-packages/gtk-2.0" - ENV.prepend_path "PYTHONPATH", lib/"python2.7/site-packages" - system "#{bin}/terminator", "--version" - end -end - -__END__ -diff --git a/terminatorlib/cwd.py b/terminatorlib/cwd.py -index 7b17d84..e3bdbad 100755 ---- a/terminatorlib/cwd.py -+++ b/terminatorlib/cwd.py -@@ -49,6 +49,11 @@ def get_pid_cwd(): - func = sunos_get_pid_cwd - else: - dbg('Unable to determine a get_pid_cwd for OS: %s' % system) -+ try: -+ import psutil -+ func = generic_cwd -+ except (ImportError): -+ dbg('psutil not found') - - return(func) - -@@ -71,4 +76,9 @@ def sunos_get_pid_cwd(pid): - """Determine the cwd for a given PID on SunOS kernels""" - return(proc_get_pid_cwd(pid, '/proc/%s/path/cwd')) - -+def generic_cwd(pid): -+ """Determine the cwd using psutil which also supports Darwin""" -+ import psutil -+ return psutil.Process(pid).as_dict()['cwd'] -+ - # vim: set expandtab ts=4 sw=4: diff --git a/Formula/termius.rb b/Formula/termius.rb deleted file mode 100644 index 2b4438d19fee9..0000000000000 --- a/Formula/termius.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Termius < Formula - include Language::Python::Virtualenv - - desc "CLI tool for termius.com (aka serverauditor.com)" - homepage "https://termius.com" - url "https://github.com/Crystalnix/termius-cli/archive/v1.2.12.tar.gz" - sha256 "89be6d35e5c4918c0d9e3f2410620d3a84c7108e52c2c87cfa6166c5612e08ee" - head "https://github.com/Crystalnix/termius-cli.git", :branch => "master" - - bottle do - cellar :any - sha256 "f801f52981e96110777c57834b03e4f3c870f1172b15f0e2575150a2ff0f5136" => :mojave - sha256 "889d254460c3892d6c96fcd5057984ff649e84431c4d03678184dd78f7be98d0" => :high_sierra - sha256 "f2f40553971e9461a1a426b8c1a92c581c5063181f3483f19f0b95fc1dfccdb1" => :sierra - end - - depends_on "bash-completion" - depends_on "openssl" - depends_on "python" - depends_on "zsh-completions" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", "termius" - venv.pip_install_and_link buildpath - - bash_completion.install "contrib/completion/bash/termius" - zsh_completion.install "contrib/completion/zsh/_termius" - end - - test do - system "#{bin}/termius", "host", "--address", "localhost", "-L", "test_host" - system "#{bin}/termius", "host", "--delete", "test_host" - end -end diff --git a/Formula/termrec.rb b/Formula/termrec.rb deleted file mode 100644 index c156578751f17..0000000000000 --- a/Formula/termrec.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Termrec < Formula - desc "Record videos of terminal output" - homepage "https://angband.pl/termrec.html" - url "https://github.com/kilobyte/termrec/archive/v0.18.tar.gz" - sha256 "b74aeea0526b606d0c0a8dfe4149670f7d34be9d4369e974a15abc67509a02ac" - head "https://github.com/kilobyte/termrec.git" - - bottle do - cellar :any - sha256 "062bb1a65c337321569546e845048d3fb5912113bca87080530b72cd262fc8ff" => :mojave - sha256 "61ffceeab4daf5feeeada49c1057ddafc8c5efb0c1561d7b8e1303462cba490b" => :high_sierra - sha256 "b51ae0744fb22e3807841f852452c422f9117d53c83503b8b89ea7936ba700e7" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "xz" - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/termrec", "--help" - end -end diff --git a/Formula/termshare.rb b/Formula/termshare.rb deleted file mode 100644 index 0cdf3f8196911..0000000000000 --- a/Formula/termshare.rb +++ /dev/null @@ -1,62 +0,0 @@ -require "language/go" - -class Termshare < Formula - desc "Interactive or view-only terminal sharing via client or web" - homepage "https://github.com/progrium/termshare" - url "https://github.com/progrium/termshare/archive/v0.2.0.tar.gz" - sha256 "fa09a5492d6176feff32bbcdb3b2dc3ff1b5ab2d1cf37572cc60eb22eb531dcd" - revision 1 - head "https://github.com/progrium/termshare.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "bb86a376d3ec20e2ccfe1359f90f394b515dedd9d2015a8e0e753704ffbefbdf" => :mojave - sha256 "9f20373c2b495c9308ed1b798d1d928e06318cbe996093b97e0126b038e76085" => :high_sierra - sha256 "5d883c6747f478ab161ca648923a7397a782f437bb59d660df6a252b21f62e99" => :sierra - sha256 "c540732aab70ec29b60459c19bb4ee55c0584b3a63476473219a115d2ec380af" => :el_capitan - sha256 "c3b9c2784b02536ce97a2a3b3a205314e7ada8e727ac60b54577d933a04aa808" => :yosemite - sha256 "aa9131a7eae6efe7e7d3bac1e73711f7bfe52f1dd246389bdbb137c70c815310" => :mavericks - end - - depends_on "go" => :build - - go_resource "golang.org/x/net" do - url "https://go.googlesource.com/net.git", - :revision => "7553b97266dcbbf78298bd1a2b12d9c9aaae5f40" - end - - go_resource "github.com/heroku/hk" do - url "https://github.com/heroku/hk.git", - :revision => "406190e9c93802fb0a49b5c09611790aee05c491" - end - - go_resource "github.com/kr/pty" do - url "https://github.com/kr/pty.git", - :revision => "f7ee69f31298ecbe5d2b349c711e2547a617d398" - end - - go_resource "github.com/nu7hatch/gouuid" do - url "https://github.com/nu7hatch/gouuid.git", - :revision => "179d4d0c4d8d407a32af483c2354df1d2c91e6c3" - end - - def install - ENV["GOPATH"] = buildpath - path = buildpath/"src/github.com/progrium/termshare" - path.install Dir["*"] - Language::Go.stage_deps resources, buildpath/"src" - - cd path do - # https://github.com/progrium/termshare/issues/9 - inreplace "termshare.go", "code.google.com/p/go.net/websocket", - "golang.org/x/net/websocket" - system "go", "build", "-o", bin/"termshare" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/termshare -v") - end -end diff --git a/Formula/termtosvg.rb b/Formula/termtosvg.rb deleted file mode 100644 index e07336353632c..0000000000000 --- a/Formula/termtosvg.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Termtosvg < Formula - include Language::Python::Virtualenv - - desc "Record terminal sessions as SVG animations" - homepage "https://nbedos.github.io/termtosvg" - url "https://github.com/nbedos/termtosvg/archive/0.7.0.tar.gz" - sha256 "a90cbd2ea29e1bdf4059aa8feb8f19e9f32da5620b447289ac78cde38682c7c2" - - bottle do - cellar :any_skip_relocation - sha256 "b6feb245add3b66176dc35cba270d818d6ab9404fad35b820b6d896f3c03b3f0" => :mojave - sha256 "d225f3c7c759e062d1e54e201455c7849c900f4c9431cde19218c3075316d02b" => :high_sierra - sha256 "e466333346009ad6a43efdcf1c55a1d3b4c72811046e80e67918f9dff7848d22" => :sierra - end - - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-U", "-e", "." - venv.pip_install_and_link buildpath - bin.install_symlink libexec/"bin/termtosvg" - end - - test do - system libexec/"bin/python", "-m", "unittest", "termtosvg.tests.suite" - end -end diff --git a/Formula/terraform-docs.rb b/Formula/terraform-docs.rb deleted file mode 100644 index 37ee874f16a58..0000000000000 --- a/Formula/terraform-docs.rb +++ /dev/null @@ -1,67 +0,0 @@ -class TerraformDocs < Formula - desc "Tool to generate documentation from Terraform modules" - homepage "https://github.com/segmentio/terraform-docs" - url "https://github.com/segmentio/terraform-docs/archive/v0.5.0.tar.gz" - sha256 "310f4b13585d6ae59687bf20763af5e27930dd30673af24b7297d5fe1fe9df22" - - bottle do - cellar :any_skip_relocation - sha256 "b41eeb6f997c60a93bc8ec9bf6ad8206561f98b3d2bd464a03b388dcdf1c4676" => :mojave - sha256 "9ad7cf9b7bfe86ec62e72dc337bf020c13d48a1f97345988d3f8095ba4a6ec0b" => :high_sierra - sha256 "5c93638483229ba886dbd760b05f29754c3845ac9a839fc2760bdadae5d7ecd4" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/segmentio/terraform-docs" - dir.install buildpath.children - - cd dir do - system "make", "build-darwin-amd64" - bin.install "bin/darwin-amd64/terraform-docs" - prefix.install_metafiles - end - end - - test do - (testpath/"main.tf").write <<~EOS - /** - * Module usage: - * - * module "foo" { - * source = "github.com/foo/baz" - * subnet_ids = "${join(",", subnet.*.id)}" - * } - */ - - variable "subnet_ids" { - description = "a comma-separated list of subnet IDs" - } - - variable "security_group_ids" { - default = "sg-a, sg-b" - } - - variable "amis" { - default = { - "us-east-1" = "ami-8f7687e2" - "us-west-1" = "ami-bb473cdb" - "us-west-2" = "ami-84b44de4" - "eu-west-1" = "ami-4e6ffe3d" - "eu-central-1" = "ami-b0cc23df" - "ap-northeast-1" = "ami-095dbf68" - "ap-southeast-1" = "ami-cf03d2ac" - "ap-southeast-2" = "ami-697a540a" - } - } - - // The VPC ID. - output "vpc_id" { - value = "vpc-5c1f55fd" - } - EOS - system "#{bin}/terraform-docs", "json", testpath - end -end diff --git a/Formula/terraform-inventory.rb b/Formula/terraform-inventory.rb deleted file mode 100644 index cf81e1051532d..0000000000000 --- a/Formula/terraform-inventory.rb +++ /dev/null @@ -1,69 +0,0 @@ -require "language/go" - -class TerraformInventory < Formula - desc "Terraform State → Ansible Dynamic Inventory" - homepage "https://github.com/adammck/terraform-inventory" - url "https://github.com/adammck/terraform-inventory/archive/v0.6.1.tar.gz" - sha256 "9cdcbc5ce4247b72bb72923d01246f51252a88908d760d766daeac51dd8feed9" - head "https://github.com/adammck/terraform-inventory.git" - - bottle do - cellar :any_skip_relocation - sha256 "29b5351cf96762d28878a118d6bd30d3165985dbc6e6fa5115f44bdbad0cc776" => :mojave - sha256 "15e8799c163c87affb5f4a48ffbb3e1f0392f837df4fba1db174088fe8159c6b" => :high_sierra - sha256 "6c423700ad3cb2a27295cbbca5de08a5a47b3f42a7c9cc53abfe9c3d1061b6b3" => :sierra - sha256 "d876b7acee1bfaaeaaf284bfd8518195b10005f7de504c8aaf39be3164b93dac" => :el_capitan - sha256 "77b4cfd96088f6019ad5bd0f0faf6757d1fb8c34ea3b327490ff33fde03538c1" => :yosemite - sha256 "19fed440ba3c95ef85fcd529f151131136fa684c9a091d17177ac8f74426e7d5" => :mavericks - end - - depends_on "go" => :build - - go_resource "github.com/stretchr/testify" do - url "https://github.com/stretchr/testify.git", - :revision => "f390dcf405f7b83c997eac1b06768bb9f44dec18" - end - - def install - ENV["GOPATH"] = buildpath - - mkdir_p buildpath/"src/github.com/adammck/" - ln_sf buildpath, buildpath/"src/github.com/adammck/terraform-inventory" - Language::Go.stage_deps resources, buildpath/"src" - - system "go", "build", "-o", bin/"terraform-inventory", "-ldflags", "-X main.build_version='#{version}'" - end - - test do - example = <<~EOS - { - "version": 1, - "serial": 1, - "modules": [ - { - "path": [ - "root" - ], - "outputs": {}, - "resources": { - "aws_instance.example_instance": { - "type": "aws_instance", - "primary": { - "id": "i-12345678", - "attributes": { - "public_ip": "1.2.3.4" - }, - "meta": { - "schema_version": "1" - } - } - } - } - } - ] - } - EOS - (testpath/"example.tfstate").write(example) - assert_match(/example_instance/, shell_output("#{bin}/terraform-inventory --list example.tfstate")) - end -end diff --git a/Formula/terraform-provisioner-ansible.rb b/Formula/terraform-provisioner-ansible.rb deleted file mode 100644 index f04e8c79bfd69..0000000000000 --- a/Formula/terraform-provisioner-ansible.rb +++ /dev/null @@ -1,70 +0,0 @@ -require "language/go" - -class TerraformProvisionerAnsible < Formula - desc "Ansible provisioner for Terraform" - homepage "https://github.com/jonmorehouse/terraform-provisioner-ansible" - url "https://github.com/jonmorehouse/terraform-provisioner-ansible/archive/0.0.2.tar.gz" - sha256 "5ba93ea5d6f28e156d7e4eba90cd89032f7dc6aff396a8429c903da4efa2d8b6" - head "https://github.com/jonmorehouse/terraform-provisioner-ansible.git" - - bottle do - cellar :any_skip_relocation - sha256 "47e33e69955c8da7284077ca6ff8b412433a73955f0df91d477ead370e3b99cd" => :mojave - sha256 "9c5773e4d576ae2f7e28438587b42170a33a6767c13805ed7ef372ad102bc139" => :high_sierra - sha256 "a56474f71703f7d660a17ed6faf039e98ccf50d32ce82b2c92fcc907f012ad78" => :sierra - sha256 "2b96de2a84016f1637fd428d40fcdcf16c960e795ce9307c2fb58672be2d21c0" => :el_capitan - sha256 "2b9f182b17571e29b4b6767db5974e39d3b5e2e5e1bb87b83b6cf1f28f855a10" => :yosemite - end - - depends_on "go" => :build - depends_on "terraform" - - go_resource "github.com/hashicorp/terraform" do - url "https://github.com/hashicorp/terraform.git", - :revision => "fa6a83ebdc323f2b415779786e102e69ddbf9a48" - end - - go_resource "github.com/mitchellh/mapstructure" do - url "https://github.com/mitchellh/mapstructure.git", - :revision => "f3009df150dadf309fdee4a54ed65c124afad715" - end - - go_resource "github.com/mitchellh/go-homedir" do - url "https://github.com/mitchellh/go-homedir.git", - :revision => "756f7b183b7ab78acdbbee5c7f392838ed459dda" - end - - go_resource "github.com/mitchellh/go-linereader" do - url "https://github.com/mitchellh/go-linereader.git", - :revision => "07bab5fdd9580500aea6ada0e09df4aa28e68abd" - end - - def install - ENV["GOPATH"] = buildpath - - terrapath = buildpath/"src/github.com/jonmorehouse/terraform-provisioner-ansible" - terrapath.install Dir["*"] - - Language::Go.stage_deps resources, buildpath/"src" - - cd terrapath do - system "go", "build" - bin.install "terraform-provisioner-ansible" - prefix.install_metafiles - end - end - - def caveats - <<~EOS - Once installed a $HOME/.terraformrc file is used to enable the plugin: - - provisioners { - ansible = "#{HOMEBREW_PREFIX}/bin/terraform-provisioner-ansible" - } - EOS - end - - test do - assert_match(/This binary is a plugin/, shell_output("#{bin}/terraform-provisioner-ansible 2>&1", 1)) - end -end diff --git a/Formula/terraform.rb b/Formula/terraform.rb deleted file mode 100644 index 1a2d3e1ff0209..0000000000000 --- a/Formula/terraform.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Terraform < Formula - desc "Tool to build, change, and version infrastructure" - homepage "https://www.terraform.io/" - url "https://github.com/hashicorp/terraform/archive/v0.11.11.tar.gz" - sha256 "aa60d15b06ac7a925a722a5ad0070bb1aa580f9ed54cfcc08378f84e25526e01" - head "https://github.com/hashicorp/terraform.git" - - bottle do - cellar :any_skip_relocation - sha256 "f5f3096f7493b4ce63bc1750539201e2931c7730b594f49ca3e852d851a3b571" => :mojave - sha256 "f450cc1b615d9fb9dcb10cb2e0a6182989e54ff55ddc3e07538a4f0da39e038e" => :high_sierra - sha256 "6956acc2bf7916b8b085c2b4542e962e5d8cabc307bcc7d690f4b13c8d483aeb" => :sierra - end - - depends_on "go" => :build - depends_on "gox" => :build - - conflicts_with "tfenv", :because => "tfenv symlinks terraform binaries" - - def install - ENV["GOPATH"] = buildpath - ENV.prepend_create_path "PATH", buildpath/"bin" - - dir = buildpath/"src/github.com/hashicorp/terraform" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - # v0.6.12 - source contains tests which fail if these environment variables are set locally. - ENV.delete "AWS_ACCESS_KEY" - ENV.delete "AWS_SECRET_KEY" - - arch = MacOS.prefer_64_bit? ? "amd64" : "386" - ENV["XC_OS"] = "darwin" - ENV["XC_ARCH"] = arch - system "make", "tools", "test", "bin" - - bin.install "pkg/darwin_#{arch}/terraform" - prefix.install_metafiles - end - end - - test do - minimal = testpath/"minimal.tf" - minimal.write <<~EOS - variable "aws_region" { - default = "us-west-2" - } - - variable "aws_amis" { - default = { - eu-west-1 = "ami-b1cf19c6" - us-east-1 = "ami-de7ab6b6" - us-west-1 = "ami-3f75767a" - us-west-2 = "ami-21f78e11" - } - } - - # Specify the provider and access details - provider "aws" { - access_key = "this_is_a_fake_access" - secret_key = "this_is_a_fake_secret" - region = "${var.aws_region}" - } - - resource "aws_instance" "web" { - instance_type = "m1.small" - ami = "${lookup(var.aws_amis, var.aws_region)}" - count = 4 - } - EOS - system "#{bin}/terraform", "init" - system "#{bin}/terraform", "graph" - end -end diff --git a/Formula/terraform_landscape.rb b/Formula/terraform_landscape.rb deleted file mode 100644 index 0f1810d55932b..0000000000000 --- a/Formula/terraform_landscape.rb +++ /dev/null @@ -1,73 +0,0 @@ -class TerraformLandscape < Formula - desc "Improve Terraform's plan output" - homepage "https://github.com/coinbase/terraform-landscape" - url "https://github.com/coinbase/terraform-landscape/archive/v0.2.2.tar.gz" - sha256 "09eb14df6c5743478380e6b8eb618226773da0a0055fe4fcf955018b5c9fb668" - - bottle do - sha256 "55d689c8224f57a30b2dba356eef0f1b7bbf1c7e353724b236138dc0f678406b" => :mojave - sha256 "ea8e016b581df875a5f2591c47698c6f75a4afea329cd2ed996bb1b0dc59d3d6" => :high_sierra - sha256 "25ddfefd03e21886b042060b9bf5a9060ba2ab0565ae9580a3b492323d97403b" => :sierra - end - - depends_on "ruby" if MacOS.version <= :mountain_lion - - resource "colorize" do - url "https://rubygems.org/gems/colorize-0.8.1.gem" - sha256 "0ba0c2a58232f9b706dc30621ea6aa6468eeea120eb6f1ccc400105b90c4798c" - end - - resource "commander" do - url "https://rubygems.org/gems/commander-4.4.7.gem" - sha256 "8fc35d22ba7a386adecb728e68908e98b6a076340aaec6c654583a93ca9faadf" - end - - resource "diffy" do - url "https://rubygems.org/gems/diffy-3.2.1.gem" - sha256 "4ffe1a7b01c958053407f9a8e6492c3e8c11b59db0ab5c3ae44f056067ae3185" - end - - resource "highline" do - url "https://rubygems.org/gems/highline-2.0.0.gem" - sha256 "74524686caf43dd56465ba847bd2c33b552028cf23973c4f1fbb5e5971f93a19" - end - - resource "string_undump" do - url "https://rubygems.org/gems/string_undump-0.1.1.gem" - sha256 "7b2b70d86bfac09e774d3be3be1fbae7780ebcd5a1edfdad7bbb15be78ae1793" - end - - resource "polyglot" do - url "https://rubygems.org/gems/polyglot-0.3.5.gem" - sha256 "59d66ef5e3c166431c39cb8b7c1d02af419051352f27912f6a43981b3def16af" - end - - resource "treetop" do - url "https://rubygems.org/gems/treetop-1.6.10.gem" - sha256 "67df9f52c5fdeb7b2b8ce42156f9d019c1c4eb643481a68149ff6c0b65bc613c" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - r.verify_download_integrity(r.fetch) - system "gem", "install", r.cached_download, "--no-document", - "--ignore-dependencies", "--install-dir", libexec - end - system "gem", "build", "terraform_landscape.gemspec" - system "gem", "install", "--ignore-dependencies", "terraform_landscape-#{version}.gem" - bin.install libexec/"bin/landscape" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - output = shell_output("#{bin}/landscape -v") - assert_match "Terraform Landscape #{version}", output - - test_input = "+ some_resource_type.some_resource_name" - colorized_expected_output = "\e[0;32;49m+ some_resource_type.some_resource_name\e[0m\n\n\n" - - output = shell_output("echo '#{test_input}' | #{bin}/landscape") - assert_match colorized_expected_output, output - end -end diff --git a/Formula/terraforming.rb b/Formula/terraforming.rb deleted file mode 100644 index 11cfb786823ef..0000000000000 --- a/Formula/terraforming.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Terraforming < Formula - desc "Export existing AWS resources to Terraform style (tf, tfstate)" - homepage "https://terraforming.dtan4.net/" - url "https://github.com/dtan4/terraforming.git", - :tag => "v0.16.0", - :revision => "a38e73739ff7ed5261abebabe08aced770bcd84c" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4d921fc793a0a32c6ae75b8e3b35a8cb47b834ac430f0585c1b860aca44d79d7" => :mojave - sha256 "ce6b17219d75b0591b352b4eb3714f1d7467a724fd86cdb7395c763e11c75ac6" => :high_sierra - sha256 "d7d8af22c0e17a45c9858cbda1c7cf6b7755fe21cca08d31d196c007a221a770" => :sierra - end - - resource "aws-sdk-autoscaling" do - url "https://rubygems.org/gems/aws-sdk-autoscaling-1.3.0.gem" - sha256 "35ad92666e75f4fc17bbc312efcf459c604f4505737b6c6287ce55b579e9ce5d" - end - - resource "aws-sdk-cloudwatch" do - url "https://rubygems.org/gems/aws-sdk-cloudwatch-1.2.0.gem" - sha256 "3c40aa67e5f7e32be3bd63daff6056a753dd7f2938e955960784a74d5be33908" - end - - resource "aws-sdk-ec2" do - url "https://rubygems.org/gems/aws-sdk-ec2-1.10.0.gem" - sha256 "5bc356c5e38e3e482563e40525c7fd1bb2791d847b970329b1b0688aa0aa628e" - end - - resource "aws-sdk-efs" do - url "https://rubygems.org/gems/aws-sdk-efs-1.0.0.gem" - sha256 "91e12fcb58cc42b0a67263867c3bff9a7da8496e1312a51e1b9db991627b817c" - end - - resource "aws-sdk-elasticache" do - url "https://rubygems.org/gems/aws-sdk-elasticache-1.1.0.gem" - sha256 "1cf9a2b9124b3490ee6aa2d5328b0144f70de45565def4605cbea5b26753d5af" - end - - resource "aws-sdk-elasticloadbalancing" do - url "https://rubygems.org/gems/aws-sdk-elasticloadbalancing-1.1.0.gem" - sha256 "a819b8427733f06cd83fe41a912e953b5503a61d857d3b9f9548d7801c3e9534" - end - - resource "aws-sdk-elasticloadbalancingv2" do - url "https://rubygems.org/gems/aws-sdk-elasticloadbalancingv2-1.3.0.gem" - sha256 "e578163969e152dca6ee538dc958218d66e8cad00d8dd8332609bb95ea7566cc" - end - - resource "aws-sdk-iam" do - url "https://rubygems.org/gems/aws-sdk-iam-1.3.0.gem" - sha256 "e724ac129db6d5c7e9ec43c1fb1ca47abb1490a9e8013d0be9501f1660324ba6" - end - - resource "aws-sdk-kms" do - url "https://rubygems.org/gems/aws-sdk-kms-1.2.0.gem" - sha256 "4a76cbd7a9e605e52d1851fd38c4121a29e5aa7c18f0a6eab816842598765fa9" - end - - resource "aws-sdk-rds" do - url "https://rubygems.org/gems/aws-sdk-rds-1.4.0.gem" - sha256 "a7116634bb8645f8c288748f44207f97364e8358b4f8743a9df16cf1b3a8d637" - end - - resource "aws-sdk-redshift" do - url "https://rubygems.org/gems/aws-sdk-redshift-1.1.0.gem" - sha256 "f4622f0c4a6f3b04f5b3e6b27bca4baccca94a2db6708f60da6df9defe7e8d86" - end - - resource "aws-sdk-route53" do - url "https://rubygems.org/gems/aws-sdk-route53-1.3.0.gem" - sha256 "98299ba6d3d8c9a54fdab9dec71a2ac409277bdcd187fce4d7012caa4d5aff46" - end - - resource "aws-sdk-s3" do - url "https://rubygems.org/gems/aws-sdk-s3-1.5.0.gem" - sha256 "6efcfc8249a1de4b4626c603ae5190b30b3762fbc5ed6536caa483a4c262328e" - end - - resource "aws-sdk-sns" do - url "https://rubygems.org/gems/aws-sdk-sns-1.1.0.gem" - sha256 "253cb65bebcfd6d2d6650899335c4b71a2d977adad53eeae21467800892cd79b" - end - - resource "aws-sdk-sqs" do - url "https://rubygems.org/gems/aws-sdk-sqs-1.2.0.gem" - sha256 "ab48397ecb46909607afb3e7f1fa171fcc7e9d9337fac53a2825b3241ca51a9d" - end - - resource "multi_json" do - url "https://rubygems.org/gems/multi_json-1.12.2.gem" - sha256 "5dcc0b569969f3d1658c68b5d597fcdc1fc3a34d4ae92b4615c740d95aaa51e5" - end - - resource "thor" do - url "https://rubygems.org/gems/thor-0.20.0.gem" - sha256 "b47dad86e151c08921cf935c1ad2be4d9982e435784d6bc223530b62a4bfb85a" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - r.verify_download_integrity(r.fetch) - system "gem", "install", r.cached_download, "--no-document", - "--install-dir", libexec - end - system "gem", "build", "terraforming.gemspec" - system "gem", "install", "--ignore-dependencies", - "terraforming-#{version}.gem" - bin.install libexec/"bin/terraforming" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - output = shell_output("#{bin}/terraforming help ec2") - assert_match "Usage:", output - assert_match "terraforming ec2", output - end -end diff --git a/Formula/terragrunt.rb b/Formula/terragrunt.rb deleted file mode 100644 index 6b7fe375043b8..0000000000000 --- a/Formula/terragrunt.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Terragrunt < Formula - desc "Thin wrapper for Terraform e.g. for locking state" - homepage "https://github.com/gruntwork-io/terragrunt" - url "https://github.com/gruntwork-io/terragrunt/archive/v0.17.4.tar.gz" - sha256 "3e0dd2c233c6e6f01d7c98b9bca88430f555b55494c33212ddc3f242890f12cf" - head "https://github.com/gruntwork-io/terragrunt.git" - - bottle do - cellar :any_skip_relocation - sha256 "b324d3f49f6c2c817365cac24760df475e73d7eeff59cf6ee35a15ecb799b839" => :mojave - sha256 "a6a168a1a8da7d692381f56e817a635a6251fc66ef922a0226fdc32537ee8ade" => :high_sierra - sha256 "d090775f701c8a5b942a803d458b7066939b4a6ca391e9247a16e555efc5a55d" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - depends_on "terraform" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/gruntwork-io/terragrunt").install buildpath.children - cd "src/github.com/gruntwork-io/terragrunt" do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-o", bin/"terragrunt", "-ldflags", "-X main.VERSION=v#{version}" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/terragrunt --version") - end -end diff --git a/Formula/tesseract.rb b/Formula/tesseract.rb deleted file mode 100644 index 2454c9acf879e..0000000000000 --- a/Formula/tesseract.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Tesseract < Formula - desc "OCR (Optical Character Recognition) engine" - homepage "https://github.com/tesseract-ocr/" - url "https://github.com/tesseract-ocr/tesseract/archive/4.0.0.tar.gz" - sha256 "a1f5422ca49a32e5f35c54dee5112b11b99928fc9f4ee6695cdc6768d69f61dd" - head "https://github.com/tesseract-ocr/tesseract.git" - - bottle do - rebuild 1 - sha256 "76f2053063b398c6b73a9a34cc94e3624aef5f4ea4df75841860d68a7791b6b5" => :mojave - sha256 "4586623a6e94cc9ff80a814a1c7be0be9b952f8776b333a81297b1443a0b0b04" => :high_sierra - sha256 "ca1d2d2c38cc2f3054bf3b9692977b217dc060dcfe77af5f84f767d0dbac5150" => :sierra - end - - option "with-all-languages", "Install recognition data for all languages" - option "with-training-tools", "Install OCR training tools" - option "with-serial-num-pack", "Install serial number recognition pack" - - deprecated_option "all-languages" => "with-all-languages" - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "leptonica" - depends_on "libtiff" - - if build.with? "training-tools" - depends_on "libtool" => :build - depends_on "icu4c" - depends_on "glib" - depends_on "cairo" - depends_on "pango" - depends_on :x11 - end - - resource "tessdata" do - url "https://github.com/tesseract-ocr/tessdata_fast/archive/4.0.0.tar.gz" - sha256 "f1b71e97f27bafffb6a730ee66fd9dc021afc38f318fdc80a464a84a519227fe" - end - - resource "eng" do - url "https://github.com/tesseract-ocr/tessdata_fast/raw/4.0.0/eng.traineddata" - sha256 "7d4322bd2a7749724879683fc3912cb542f19906c83bcc1a52132556427170b2" - end - - resource "osd" do - url "https://github.com/tesseract-ocr/tessdata_fast/raw/4.0.0/osd.traineddata" - sha256 "9cf5d576fcc47564f11265841e5ca839001e7e6f38ff7f7aacf46d15a96b00ff" - end - - resource "snum" do - url "https://github.com/USCDataScience/counterfeit-electronics-tesseract/raw/319a6eeacff181dad5c02f3e7a3aff804eaadeca/Training%20Tesseract/snum.traineddata" - sha256 "36f772980ff17c66a767f584a0d80bf2302a1afa585c01a226c1863afcea1392" - end - - needs :cxx11 - - def install - if build.with? "training-tools" - icu4c = Formula["icu4c"] - ENV.append "CFLAGS", "-I#{icu4c.opt_include}" - ENV.append "LDFLAGS", "-L#{icu4c.opt_lib}" - end - - # explicitly state leptonica header location, as the makefile defaults to /usr/local/include, - # which doesn't work for non-default homebrew location - ENV["LIBLEPT_HEADERSDIR"] = HOMEBREW_PREFIX/"include" - - ENV.cxx11 - - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - - system "make", "install" - if build.with? "serial-num-pack" - resource("snum").stage { mv "snum.traineddata", share/"tessdata" } - end - if build.with? "training-tools" - system "make", "training" - system "make", "training-install" - end - if build.with? "all-languages" - resource("tessdata").stage { mv Dir["*"], share/"tessdata" } - else - resource("eng").stage { mv "eng.traineddata", share/"tessdata" } - resource("osd").stage { mv "osd.traineddata", share/"tessdata" } - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/tesseract -v 2>&1") - end -end diff --git a/Formula/testdisk.rb b/Formula/testdisk.rb deleted file mode 100644 index 71b11b4a58681..0000000000000 --- a/Formula/testdisk.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Testdisk < Formula - desc "Powerful free data recovery utility" - homepage "https://www.cgsecurity.org/wiki/TestDisk" - url "https://www.cgsecurity.org/testdisk-7.0.tar.bz2" - sha256 "00bb3b6b22e6aba88580eeb887037aef026968c21a87b5f906c6652cbee3442d" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2c605aa973b201cd63a19efa53a7748a629b860b48f452db6c2ea61856d6aea3" => :mojave - sha256 "e2643fdb09f3d33b18fb181590fe5fc58f9117a8a02791eb55ba5cce998b6cb0" => :high_sierra - sha256 "30784b33a74eaa138c16ddc7cbe56bc542f19759a87cfdea37084691ba5788b4" => :sierra - sha256 "979d1f6ba12aeee68300a657a78a234874707068232934d7f91597621a60253e" => :el_capitan - sha256 "13f6481decb5ad3f40f0617351dd9c78a02c3c0694a82cb048adde6ba897703f" => :yosemite - sha256 "d3e8a600a135807b630a4d649c052dc6065270910bd96f6b1f27265251787331" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - path = "test.dmg" - system "hdiutil", "create", "-megabytes", "10", path - system "#{bin}/testdisk", "/list", path - end -end diff --git a/Formula/testssl.rb b/Formula/testssl.rb deleted file mode 100644 index e572276a55f73..0000000000000 --- a/Formula/testssl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Testssl < Formula - desc "Tool which checks for the support of TLS/SSL ciphers and flaws" - homepage "https://testssl.sh/" - url "https://github.com/drwetter/testssl.sh/archive/v2.9.5-7.tar.gz" - version "2.9.5-7" - sha256 "cefa572026119fbc872d24dc0fcec64a105b0e11a85291b48f0e5ef494f55517" - head "https://github.com/drwetter/testssl.sh.git", :branch => "2.9dev" - - bottle :unneeded - - depends_on "openssl" - - def install - bin.install "testssl.sh" - man1.install "doc/testssl.1" - prefix.install "etc" - env = { - :PATH => "#{Formula["openssl"].opt_bin}:$PATH", - :TESTSSL_INSTALL_DIR => prefix, - } - bin.env_script_all_files(libexec/"bin", env) - end - - test do - system "#{bin}/testssl.sh", "--local", "--warnings", "off" - end -end diff --git a/Formula/texapp.rb b/Formula/texapp.rb deleted file mode 100644 index 17f6a89931ee6..0000000000000 --- a/Formula/texapp.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Texapp < Formula - desc "App.net client based on TTYtter" - homepage "https://www.floodgap.com/software/texapp/" - url "https://www.floodgap.com/software/texapp/dist0/0.6.11.txt" - sha256 "03c3d5475dfb7877000ce238d342023aeab3d44f7bac4feadc475e501aa06051" - - bottle do - cellar :any_skip_relocation - sha256 "8d0f4b422910cdff2f791a2c7e916f2dfc001bb060b2e43760c3db8bb7f1ac3f" => :mojave - sha256 "6615c40b9f733227163ad90b0082c40e7a5885c8ffa36dcb6c5892c09367c279" => :high_sierra - sha256 "6615c40b9f733227163ad90b0082c40e7a5885c8ffa36dcb6c5892c09367c279" => :sierra - sha256 "6615c40b9f733227163ad90b0082c40e7a5885c8ffa36dcb6c5892c09367c279" => :el_capitan - end - - def install - bin.install "#{version}.txt" => "texapp" - end - - test do - assert_match "trying to find cURL ...", pipe_output("#{bin}/texapp", "^C") - end -end diff --git a/Formula/texi2html.rb b/Formula/texi2html.rb deleted file mode 100644 index 2b563571ebc3a..0000000000000 --- a/Formula/texi2html.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Texi2html < Formula - desc "Convert TeXinfo files to HTML" - homepage "https://www.nongnu.org/texi2html/" - url "https://download.savannah.gnu.org/releases/texi2html/texi2html-5.0.tar.gz" - sha256 "e60edd2a9b8399ca615c6e81e06fa61946ba2f2406c76cd63eb829c91d3a3d7d" - - bottle do - rebuild 1 - sha256 "cf02c2e593ded1e5b3ffaf04b9dc8a474ab36633ed40c50454c98a3adb5a7908" => :mojave - sha256 "5259ab2074f122f4725058d2477233add1a32c30d385680276b06c11e06bc67f" => :high_sierra - sha256 "5259ab2074f122f4725058d2477233add1a32c30d385680276b06c11e06bc67f" => :sierra - sha256 "5259ab2074f122f4725058d2477233add1a32c30d385680276b06c11e06bc67f" => :el_capitan - end - - depends_on "gettext" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", - "--mandir=#{man}", "--infodir=#{info}" - chmod 0755, "./install-sh" - system "make", "install" - end - - test do - (testpath/"test.texinfo").write <<~EOS - @ifnottex - @node Top - @top Hello World! - @end ifnottex - @bye - EOS - system "#{bin}/texi2html", "test.texinfo" - assert_match /Hello World!/, File.read("test.html") - end -end diff --git a/Formula/texinfo.rb b/Formula/texinfo.rb deleted file mode 100644 index 3ebd8601493de..0000000000000 --- a/Formula/texinfo.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Texinfo < Formula - desc "Official documentation format of the GNU project" - homepage "https://www.gnu.org/software/texinfo/" - url "https://ftp.gnu.org/gnu/texinfo/texinfo-6.5.tar.xz" - mirror "https://ftpmirror.gnu.org/texinfo/texinfo-6.5.tar.xz" - sha256 "77774b3f4a06c20705cc2ef1c804864422e3cf95235e965b1f00a46df7da5f62" - - bottle do - sha256 "641a738c35fd055e7c73df2542ae0a08a085c235682432adda41c607271b9fd1" => :mojave - sha256 "a38bf65a736b3e64843eecf9a3ad6029cb6538ff09261072c2cd339598ae2f8d" => :high_sierra - sha256 "ad81d72c79b14e1ed7beed59202514817fde7d12cc4e37657fdc689bb081a2e2" => :sierra - sha256 "e3099c5bc15295e7cadb2ce8b5f89d8983a8599b8d8602277aae23b9ff3482b1" => :el_capitan - end - - keg_only :provided_by_macos, <<~EOS - software that uses TeX, such as lilypond and octave, require a newer - version of these files - EOS - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-install-warnings", - "--prefix=#{prefix}" - system "make", "install" - doc.install Dir["doc/refcard/txirefcard*"] - end - - test do - (testpath/"test.texinfo").write <<~EOS - @ifnottex - @node Top - @top Hello World! - @end ifnottex - @bye - EOS - system "#{bin}/makeinfo", "test.texinfo" - assert_match "Hello World!", File.read("test.info") - end -end diff --git a/Formula/texmath.rb b/Formula/texmath.rb deleted file mode 100644 index a1f092f0c1e3b..0000000000000 --- a/Formula/texmath.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/haskell" - -class Texmath < Formula - include Language::Haskell::Cabal - - desc "Haskell library for converting LaTeX math to MathML" - homepage "https://johnmacfarlane.net/texmath.html" - url "https://hackage.haskell.org/package/texmath-0.11.1.1/texmath-0.11.1.1.tar.gz" - sha256 "c6f5a6dc010d23c2c38dc4fbc62d7c36d3d1c80d5ceb6a0e4b472b8278f4dbeb" - - bottle do - cellar :any_skip_relocation - sha256 "84a9c7b77ccd647ff3c869c94c505d8d143b942ea3c236805621a505cc4c0d01" => :mojave - sha256 "760e01e12ab44dba38a1e2dba27ce6514f5875fab403b77eabcdede4aad704db" => :high_sierra - sha256 "486ed9a7ba32823a46744c5b8b46e5edde1ee30ed2259963cd34c6a1949b20d8" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - install_cabal_package "--enable-tests", :flags => ["executable"] do - system "cabal", "test" - end - end - - test do - assert_match "2", pipe_output(bin/"texmath", "a^2 + b^2 = c^2") - end -end diff --git a/Formula/textql.rb b/Formula/textql.rb deleted file mode 100644 index e061ebc05eec8..0000000000000 --- a/Formula/textql.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Textql < Formula - desc "Executes SQL across text files" - homepage "https://github.com/dinedal/textql" - url "https://github.com/dinedal/textql/archive/2.0.3.tar.gz" - sha256 "1fc4e7db5748938c31fe650e882aec4088d9123d46284c6a6f0ed6e8ea487e48" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b6d4fd5ee0a2d1758651f91c35e6bd40a832f0d997ec2a120268bfde03a48cfb" => :mojave - sha256 "38cbf8cacc0dd7e29831c8c7fe9f0437473c164bee549defb8744d6ca3e53fcb" => :high_sierra - sha256 "f7bcfcacbd0b3076037e4715dabd1d925ef52ec66a3018d7a0124d091a7711c5" => :sierra - sha256 "9950b83cf4d7bf59d3bf54711a845ddcf27f31dd004150acce3b8011ca2874a5" => :el_capitan - end - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - (buildpath/"src/github.com/dinedal/textql").install buildpath.children - - cd "src/github.com/dinedal/textql" do - system "glide", "install" - system "go", "build", "-ldflags", "-X main.VERSION=#{version}", - "-o", bin/"textql", "./textql" - man1.install "man/textql.1" - prefix.install_metafiles - end - end - - test do - assert_equal "3\n", - pipe_output("#{bin}/textql -sql 'select count(*) from stdin'", "a\nb\nc\n") - end -end diff --git a/Formula/tfenv.rb b/Formula/tfenv.rb deleted file mode 100644 index b1283eaff2b66..0000000000000 --- a/Formula/tfenv.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Tfenv < Formula - desc "Terraform version manager inspired by rbenv" - homepage "https://github.com/kamatama41/tfenv" - url "https://github.com/kamatama41/tfenv/archive/v0.6.0.tar.gz" - sha256 "f2ca32ade0e90d6988106e85efaa548ed116cac1ded24f88dd19f479c6381e2e" - head "https://github.com/kamatama41/tfenv.git" - - bottle :unneeded - - conflicts_with "terraform", :because => "tfenv symlinks terraform binaries" - - def install - prefix.install ["bin", "libexec"] - end - - test do - system bin/"tfenv", "list-remote" - end -end diff --git a/Formula/tgif.rb b/Formula/tgif.rb deleted file mode 100644 index bc379f39644ed..0000000000000 --- a/Formula/tgif.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Tgif < Formula - desc "Xlib-based interactive 2D drawing tool" - homepage "http://bourbon.usc.edu/tgif/" - url "https://downloads.sourceforge.net/project/tgif/tgif/4.2.5/tgif-QPL-4.2.5.tar.gz" - sha256 "2f24e9fecafae6e671739bd80691a06c9d032bdd1973ca164823e72ab1c567ba" - - bottle do - sha256 "4067b1468cc15d199a88629b19a677bd1d97462478a48d6a751aca6c1802e738" => :mojave - sha256 "4023a1df9a1b9ee248891d2d54ce00127407ce80f89d2b1edef05fe2e4c8cf1f" => :high_sierra - sha256 "d96d0bafe9c364642e354a6d80ffce48d532a8ed161372cf549c213b9a0a8a30" => :sierra - sha256 "9912995702f73e3add877e329b9bd894e9a7f5fe2024161b27b6d81462aeda9d" => :el_capitan - sha256 "df95673872cdb34ca9cccfaa456bdc4a35e29d720b8ffa4875501cf864d399bd" => :yosemite - end - - depends_on :x11 - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.obj").write <<~EOS - %TGIF 4.2.5 - state(0,37,100.000,0,0,0,16,1,9,1,1,0,0,1,0,1,0,'Courier',0,80640,0,0,0,10,0,0,1,1,0,16,0,0,1,1,1,1,1088,1408,1,0,2880,0). - % - % @(#)$Header$ - % %W% - % - unit("1 pixel/pixel"). - color_info(11,65535,0,[ - "magenta", 65535, 0, 65535, 65535, 0, 65535, 1, - "red", 65535, 0, 0, 65535, 0, 0, 1, - "green", 0, 65535, 0, 0, 65535, 0, 1, - "blue", 0, 0, 65535, 0, 0, 65535, 1, - "yellow", 65535, 65535, 0, 65535, 65535, 0, 1, - "pink", 65535, 49344, 52171, 65535, 49344, 52171, 1, - "cyan", 0, 65535, 65535, 0, 65535, 65535, 1, - "CadetBlue", 24415, 40606, 41120, 24415, 40606, 41120, 1, - "white", 65535, 65535, 65535, 65535, 65535, 65535, 1, - "black", 0, 0, 0, 0, 0, 0, 1, - "DarkSlateGray", 12079, 20303, 20303, 12079, 20303, 20303, 1 - ]). - script_frac("0.6"). - fg_bg_colors('black','white'). - dont_reencode("FFDingbests:ZapfDingbats"). - objshadow_info('#c0c0c0',2,2). - rotate_pivot(0,0,0,0). - spline_tightness(1). - page(1,"",1,''). - box('black','',64,64,128,128,0,1,1,0,0,0,0,0,0,'1',0,[ - ]). - - EOS - system "#{bin}/tgif", "-print", "-text", "-quiet", "test.obj" - assert_predicate testpath/"test.txt", :exist? - end -end diff --git a/Formula/tgui.rb b/Formula/tgui.rb deleted file mode 100644 index 587a6c0bfd23f..0000000000000 --- a/Formula/tgui.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tgui < Formula - desc "GUI library for use with sfml" - homepage "https://tgui.eu" - url "https://github.com/texus/TGUI/archive/v0.8.2.tar.gz" - sha256 "084af94a20b3db1c44bcaa0a8c49628dfb90c1e83ff16471428ed4649be6d6a9" - - bottle do - cellar :any - sha256 "dc2e7583c8294d0ad1f314e35db130b3eea4ed329e81003ad4df808b90fa7f45" => :mojave - sha256 "728d86aad229f2c200736753792c2e508b00072a499b5c82107eb65351268d61" => :high_sierra - sha256 "3f5ff4192768e03be629c5c60e34f6fca0e15e642dbf6e81c23784d9ba4dc910" => :sierra - end - - depends_on "cmake" => :build - depends_on "sfml" - - def install - system "cmake", ".", *std_cmake_args, - "-DTGUI_MISC_INSTALL_PREFIX=#{pkgshare}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - sf::Text text; - text.setString("Hello World"); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-I#{include}", - "-L#{lib}", "-L#{Formula["sfml"].opt_lib}", - "-ltgui", "-lsfml-graphics", "-lsfml-system", "-lsfml-window", - "-o", "test" - system "./test" - end -end diff --git a/Formula/thc-pptp-bruter.rb b/Formula/thc-pptp-bruter.rb deleted file mode 100644 index 5795e0b12e664..0000000000000 --- a/Formula/thc-pptp-bruter.rb +++ /dev/null @@ -1,34 +0,0 @@ -class ThcPptpBruter < Formula - desc "Brute force program against PPTP VPN endpoints (TCP port 1723)" - homepage "https://thc.org" - url "https://freeworld.thc.org/releases/thc-pptp-bruter-0.1.4.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/thc-pptp-bruter-0.1.4.tar.gz" - sha256 "baa05f398d325b490e3eb4cd0ffaf67a6ae306c968a7d8114267b0c088de6ee2" - - bottle do - cellar :any - sha256 "96b0991f521b87d0a839ad676210c5ea940f529c40cb29df81ef7275a26bb09d" => :mojave - sha256 "ef9ccd5b90616a66263fa9779c31fc3858a32fc5ec0bd69d98df3329072415a7" => :high_sierra - sha256 "bf0734c5bac73d3948b6b10856c9cff316f28dcac7d5213323f42dcd7f210306" => :sierra - sha256 "29311d0d9c7592bcaae2acbf529bc6cb836df622361a9343aeb37543a0ff7f48" => :el_capitan - sha256 "9236475e9ec15fdddefd4b9ad01d619d645ad0227adc50e9ae7c5b01a68ff964" => :yosemite - sha256 "e34bda13c8753b1064fb59712e799191dd00addfa30b0f9947d2dd97dac47b1a" => :mavericks - sha256 "fa6df7bd11a9f2a2903e60775ab1324a7220d37da30a4bb6e4a8eb77e2163c3d" => :mountain_lion - end - - depends_on "openssl" - - def install - # The function openpty() is defined in pty.h on Linux, but in util.h on macOS. - # See https://groups.google.com/group/sage-devel/msg/97916255b631e3e5 - inreplace "src/pptp_bruter.c", "pty.h", "util.h" - - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/thc-pptp-bruter" - end -end diff --git a/Formula/the_platinum_searcher.rb b/Formula/the_platinum_searcher.rb deleted file mode 100644 index d557aa21f00c0..0000000000000 --- a/Formula/the_platinum_searcher.rb +++ /dev/null @@ -1,37 +0,0 @@ -class ThePlatinumSearcher < Formula - desc "Multi-platform code-search similar to ack and ag" - homepage "https://github.com/monochromegane/the_platinum_searcher" - url "https://github.com/monochromegane/the_platinum_searcher/archive/v2.2.0.tar.gz" - sha256 "3d5412208644b13723b2b7ca4af0870d25c654e3a76feee846164c51b88240b0" - head "https://github.com/monochromegane/the_platinum_searcher.git" - - bottle do - cellar :any_skip_relocation - sha256 "b2e99bee242a5b9a1667a321de1e777eb83a8023b034ebe0da3fc0953a193f26" => :mojave - sha256 "5b85047b2b893e8ec45e3f68b37c09cfb80ceb0a7c2b9c70937f2f2ca1f6f0bc" => :high_sierra - sha256 "1e952c6a666f180343cfdc1afa859f702638276e597d4292520fa6cf91ac82b8" => :sierra - sha256 "3439437518655cdd74c95eda5a161c01d5fe80604ef9c3e8936449a96ba3dcc1" => :el_capitan - end - - depends_on "go" => :build - depends_on "godep" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/monochromegane/the_platinum_searcher" - dir.install buildpath.children - cd dir do - system "godep", "restore" - system "go", "build", "-o", bin/"pt", ".../cmd/pt" - prefix.install_metafiles - end - end - - test do - path = testpath/"hello_world.txt" - path.write "Hello World!" - - lines = `#{bin}/pt 'Hello World!' #{path}`.strip.split(":") - assert_equal "Hello World!", lines[2] - end -end diff --git a/Formula/the_silver_searcher.rb b/Formula/the_silver_searcher.rb deleted file mode 100644 index bfd87559b5c35..0000000000000 --- a/Formula/the_silver_searcher.rb +++ /dev/null @@ -1,37 +0,0 @@ -class TheSilverSearcher < Formula - desc "Code-search similar to ack" - homepage "https://github.com/ggreer/the_silver_searcher" - url "https://github.com/ggreer/the_silver_searcher/archive/2.2.0.tar.gz" - sha256 "6a0a19ca5e73b2bef9481c29a508d2413ca1a0a9a5a6b1bd9bbd695a7626cbf9" - head "https://github.com/ggreer/the_silver_searcher.git" - - bottle do - cellar :any - sha256 "e57f89664f48c131dfb462dc4be2f5265867d827f82efb1c3841ba71d9156ed0" => :mojave - sha256 "0bf5394d8ab5f61b8fbb593249f556f13b358d16eb0d3c97215be3da0476e94b" => :high_sierra - sha256 "2365e24e5d0b1bef64b35c6a8f9e4f61d1f38eafe38c06d6e0acefc6a9a955db" => :sierra - sha256 "1f35dcee133d638a16462db711560b624020e9dd8f732ac5a6f13a09b694421a" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "pcre" - depends_on "xz" - - def install - # Stable tarball does not include pre-generated configure script - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - - bash_completion.install "ag.bashcomp.sh" - end - - test do - (testpath/"Hello.txt").write("Hello World!") - system "#{bin}/ag", "Hello World!", testpath - end -end diff --git a/Formula/thefuck.rb b/Formula/thefuck.rb deleted file mode 100644 index bce172c073dea..0000000000000 --- a/Formula/thefuck.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Thefuck < Formula - include Language::Python::Virtualenv - - desc "Programatically correct mistyped console commands" - homepage "https://github.com/nvbn/thefuck" - url "https://files.pythonhosted.org/packages/79/5e/a8a5ae5bfbe14f6ec01b1b9cee68383b1ff71e59be41a8923e3290c6fc21/thefuck-3.28.tar.gz" - sha256 "cc123eb1e6962d315b777db286e6a172231f02eff00ab340fdd38c4504badc3a" - head "https://github.com/nvbn/thefuck.git" - - bottle do - cellar :any_skip_relocation - sha256 "ba156420e76de319599e62504d73aef820ff06a8d363e5c6501124dd71337c76" => :mojave - sha256 "5c4e966a4939ae0a6cf59b7f544656c87d98dd98cae7b645b6a0e1cb3538eda1" => :high_sierra - sha256 "4829a8bb95a312c52a996b0cb4a6520bebc2c464391dd0eb3b08572dddc7a8ab" => :sierra - end - - depends_on "python" - - resource "colorama" do - url "https://files.pythonhosted.org/packages/e6/76/257b53926889e2835355d74fec73d82662100135293e17d382e2b74d1669/colorama-0.3.9.tar.gz" - sha256 "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz" - sha256 "c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/14/a2/8ac7dda36eac03950ec2668ab1b466314403031c83a95c5efc81d2acf163/psutil-5.4.5.tar.gz" - sha256 "ebe293be36bb24b95cdefc5131635496e88b17fabbcf1e4bc9b5c01f5e489cfe" - end - - resource "pyte" do - url "https://files.pythonhosted.org/packages/66/37/6fed89b484c8012a0343117f085c92df8447a18af4966d25599861cd5aa0/pyte-0.8.0.tar.gz" - sha256 "7e71d03e972d6f262cbe8704ff70039855f05ee6f7ad9d7129df9c977b5a88c5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - virtualenv_install_with_resources - end - - def caveats; <<~EOS - Add the following to your .bash_profile, .bashrc or .zshrc: - - eval $(thefuck --alias) - - For other shells, check https://github.com/nvbn/thefuck/wiki/Shell-aliases - EOS - end - - test do - ENV["THEFUCK_REQUIRE_CONFIRMATION"] = "false" - ENV["LC_ALL"] = "en_US.UTF-8" - - output = shell_output("#{bin}/thefuck --version 2>&1") - assert_match "The Fuck #{version} using Python", output - - output = shell_output("#{bin}/thefuck --alias") - assert_match "TF_ALIAS=fuck", output - - output = shell_output("#{bin}/thefuck git branchh") - assert_equal "git branch", output.chomp - - output = shell_output("#{bin}/thefuck echho ok") - assert_equal "echo ok", output.chomp - - output = shell_output("#{bin}/fuck") - assert_match "Seems like fuck alias isn't configured!", output - end -end diff --git a/Formula/theharvester.rb b/Formula/theharvester.rb deleted file mode 100644 index d3a355c412dba..0000000000000 --- a/Formula/theharvester.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Theharvester < Formula - include Language::Python::Virtualenv - - desc "Gather materials from public sources (for pen testers)" - homepage "http://www.edge-security.com/theharvester.php" - url "https://github.com/laramies/theHarvester/archive/3.0.6.tar.gz" - sha256 "a8ee1d28ae6c82ea3eb9ccf3eee23d2adc749672c6e0497a62f8f1c2ab395d2b" - head "https://github.com/laramies/theHarvester.git" - - bottle do - cellar :any_skip_relocation - sha256 "1dbace026e1efa3ff81ec7466918f9be6a1611ff6f2096e6b61c2e24d17ab21c" => :mojave - sha256 "95ad2239029134599857dafec1c1a6cfd4aaf4a4179b116daf1f667d644a815e" => :high_sierra - sha256 "4ad92a36c760ec2195fce390512467e48f8fad0e507fc9b2c94a720edebd102f" => :sierra - end - - depends_on "python" - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/88/df/86bffad6309f74f3ff85ea69344a078fc30003270c8df6894fca7a3c72ff/beautifulsoup4-4.6.3.tar.gz" - sha256 "90f8e61121d6ae58362ce3bed8cd997efb00c914eae0ff3d363c32f9a9822d10" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz" - sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "html5lib" do - url "https://files.pythonhosted.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz" - sha256 "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/cb/09/1f13472d09c220c2d3accc51bc3be65f94ed8b59bf09b26f81bda64faea0/soupsieve-1.3.1.tar.gz" - sha256 "f75ea3af46ccadaa34accb2601eda67ba1d24fc5f163408af4d1c6a48ddf95b5" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - def install - venv = virtualenv_create(libexec/"venv", "python3") - venv.pip_install resources - - libexec.install Dir["*"] - (libexec/"theHarvester.py").chmod 0755 - (bin/"theharvester").write_env_script("#{libexec}/theHarvester.py", :PATH => "#{libexec}/venv/bin:$PATH") - end - - test do - output = shell_output("#{bin}/theharvester -d brew.sh -l 1 -b pgp 2>&1") - assert_match "security@brew.sh", output - end -end diff --git a/Formula/theora.rb b/Formula/theora.rb deleted file mode 100644 index 03417deb78f85..0000000000000 --- a/Formula/theora.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Theora < Formula - desc "Open video compression format" - homepage "https://www.theora.org/" - url "https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2" - sha256 "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc" - - bottle do - cellar :any - rebuild 2 - sha256 "0423b3f4858072285691307877ef1899e62e67b67fad2f871e7937d7db572836" => :mojave - sha256 "8398d6af4942b4201329dffe526d91223ed2f03d39b99c59f16b58907b26b2d2" => :high_sierra - sha256 "899a793d64a16ea5a18bfe984c8a97966b6c027c258abb026b7d77443849eeca" => :sierra - sha256 "03b63a91812185120355da8292b40a2afd8377dcd8e3825eb9cbc217a3f4bc79" => :el_capitan - sha256 "ab9dd77803ec6885cb9701859de9b1b8ff6b85cb7cef24400dec6adb4b8c6378" => :yosemite - sha256 "58be26743e23be63aee48186bfa9cd8a982de957efb040a6ab3030aa62753977" => :mavericks - end - - head do - url "https://git.xiph.org/theora.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libogg" - depends_on "libvorbis" - - def install - cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath - system "./autogen.sh" if build.head? - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-oggtest - --disable-vorbistest - --disable-examples - ] - - args << "--disable-asm" if build.head? - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - theora_info inf; - theora_info_init(&inf); - theora_info_clear(&inf); - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-ltheora", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/thors-serializer.rb b/Formula/thors-serializer.rb deleted file mode 100644 index 480ec8e72d586..0000000000000 --- a/Formula/thors-serializer.rb +++ /dev/null @@ -1,65 +0,0 @@ -class ThorsSerializer < Formula - desc "Declarative serialization library (JSON/YAML) for C++" - homepage "https://github.com/Loki-Astari/ThorsSerializer" - url "https://github.com/Loki-Astari/ThorsSerializer.git", - :tag => "1.9.1", - :revision => "0f60ae61e1e37dd6343c9afe28898125a77ecc2d" - - bottle do - cellar :any - sha256 "736892141ba33ef4425361d797a1c088a58668a6bf6005239c5c9d7d770898eb" => :mojave - sha256 "8883c664e953a4567ca1c158ce4dc02af834009b0df32eb095c67e1c3d66126d" => :high_sierra - sha256 "1eb242a70936dfaf6947cb1ce3f6467e772e9e4f409d2fad30ab9ccbf0254b4a" => :sierra - end - - depends_on "libyaml" - - needs :cxx14 - - def install - ENV["COV"] = "gcov" - - system "./configure", "--disable-binary", - "--disable-vera", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "ThorSerialize/JsonThor.h" - #include "ThorSerialize/SerUtil.h" - #include - #include - #include - - struct Block - { - std::string key; - int code; - }; - ThorsAnvil_MakeTrait(Block, key, code); - - int main() - { - using ThorsAnvil::Serialize::jsonImport; - using ThorsAnvil::Serialize::jsonExport; - - std::stringstream inputData(R"({"key":"XYZ","code":37373})"); - - Block object; - inputData >> jsonImport(object); - - if (object.key != "XYZ" || object.code != 37373) { - std::cerr << "Fail"; - return 1; - } - std::cerr << "OK"; - return 0; - } - EOS - system ENV.cxx, "-std=c++14", "test.cpp", "-o", "test", - "-I#{include}", "-L#{lib}", "-lThorSerialize17" - system "./test" - end -end diff --git a/Formula/thrift.rb b/Formula/thrift.rb deleted file mode 100644 index 0725e92513405..0000000000000 --- a/Formula/thrift.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Thrift < Formula - desc "Framework for scalable cross-language services development" - homepage "https://thrift.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz" - sha256 "c4ad38b6cb4a3498310d405a91fef37b9a8e79a50cd0968148ee2524d2fa60c2" - - bottle do - cellar :any - rebuild 1 - sha256 "5b99e08e1a69b6b9e39769982efec86fd773753d39439ca89011e180bcdb9249" => :mojave - sha256 "3a0d80b8f12a25fc87a4fe58722357c932c320a5d9a79f27346d21bcb956a337" => :high_sierra - sha256 "85bc8f2f5634985803ae738a548710cb6f0ca71acb0a35b7b2f29631b894820d" => :sierra - end - - head do - url "https://github.com/apache/thrift.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - end - - option "with-java", "Install Java binding" - - deprecated_option "with-python" => "with-python@2" - - depends_on "bison" => :build - depends_on "boost" - depends_on "openssl" - depends_on "python@2" => :optional - - if build.with? "java" - depends_on "ant" => :build - depends_on :java => "1.8" - end - - def install - system "./bootstrap.sh" unless build.stable? - - args = %W[ - --disable-debug - --disable-tests - --prefix=#{prefix} - --libdir=#{lib} - --with-openssl=#{Formula["openssl"].opt_prefix} - --without-erlang - --without-haskell - --without-perl - --without-php - --without-php_extension - --without-ruby - ] - - args << "--without-python" if build.without? "python@2" - args << "--without-java" if build.without? "java" - - ENV.cxx11 if MacOS.version >= :mavericks && ENV.compiler == :clang - - # Don't install extensions to /usr: - ENV["PY_PREFIX"] = prefix - ENV["PHP_PREFIX"] = prefix - ENV["JAVA_PREFIX"] = buildpath - - system "./configure", *args - ENV.deparallelize - system "make" - system "make", "install" - - # Even when given a prefix to use it creates /usr/local/lib inside - # that dir & places the jars there, so we need to work around that. - (pkgshare/"java").install Dir["usr/local/lib/*.jar"] if build.with? "java" - end - - def caveats; <<~EOS - To install Ruby binding: - gem install thrift - EOS - end - - test do - system "#{bin}/thrift", "--version" - end -end diff --git a/Formula/thrift@0.9.rb b/Formula/thrift@0.9.rb deleted file mode 100644 index d4b97ef9fbd52..0000000000000 --- a/Formula/thrift@0.9.rb +++ /dev/null @@ -1,54 +0,0 @@ -class ThriftAT09 < Formula - desc "Framework for scalable cross-language services development" - homepage "https://thrift.apache.org" - url "https://archive.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz" - sha256 "b0740a070ac09adde04d43e852ce4c320564a292f26521c46b78e0641564969e" - - bottle do - cellar :any - rebuild 1 - sha256 "79422a32dc72ec61bb4f0b9db57a08af6c7478ac676e52f14d05e9060acff2df" => :mojave - sha256 "c48f3d1200f4cedd092622f380bee268caefa553822c4b0f7bf25aec13d19371" => :high_sierra - sha256 "d0b173d367891df3d5a9398ea5f5e3a48cbd412fa88955e29d061b7707b7b9e4" => :sierra - end - - keg_only :versioned_formula - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "openssl" - - def install - args = %w[ - --without-erlang - --without-haskell - --without-java - --without-perl - --without-php - --without-php_extension - --without-python - --without-ruby - --without-tests - ] - - ENV.cxx11 if MacOS.version >= :mavericks && ENV.compiler == :clang - - # Don't install extensions to /usr - ENV["JAVA_PREFIX"] = pkgshare/"java" - - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--libdir=#{lib}", - *args - ENV.deparallelize - system "make", "install" - end - - test do - assert_match "Thrift", shell_output("#{bin}/thrift --version") - end -end diff --git a/Formula/thrulay.rb b/Formula/thrulay.rb deleted file mode 100644 index 4a9bb9b40b2cd..0000000000000 --- a/Formula/thrulay.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Thrulay < Formula - desc "Measure performance of a network" - homepage "https://sourceforge.net/projects/thrulay/" - url "https://downloads.sourceforge.net/project/thrulay/thrulay/0.9/thrulay-0.9.tar.gz" - sha256 "373d5613dfe371f6b4f48fc853f6c27701b2981ba4100388c9881cb802d1780d" - - bottle do - cellar :any - sha256 "8b15107dd47fcf14a6060c2dc1a740c4b6c5be66775486d396a90bd810e6c069" => :mojave - sha256 "e0d81a536ac3dce349b093394af8d7b89f531deb1854aa44a5b46068c1e02162" => :high_sierra - sha256 "00938642d65ba687a0ef83e85f682d6bdb1df02a7807fc3d337e3ca473af1cf9" => :sierra - sha256 "74f52b9eaa39092931b68630eef408db6b53e1b0c538ec52950b89d0a4ea5563" => :el_capitan - sha256 "f0a9bb5aa42ee3ce25965c50163e190ba13c220d91d4855fd38655cb91aae138" => :yosemite - sha256 "558dc8e0634a811bab7dd9608dcb2e1ed95375e0cd3d37a4e3be6e9c30f94ed1" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - ENV.deparallelize - system "make", "install" - end -end diff --git a/Formula/tidy-html5.rb b/Formula/tidy-html5.rb deleted file mode 100644 index eec2f37571e16..0000000000000 --- a/Formula/tidy-html5.rb +++ /dev/null @@ -1,30 +0,0 @@ -class TidyHtml5 < Formula - desc "Granddaddy of HTML tools, with support for modern standards" - homepage "https://www.html-tidy.org/" - url "https://github.com/htacg/tidy-html5/archive/5.6.0.tar.gz" - sha256 "08a63bba3d9e7618d1570b4ecd6a7daa83c8e18a41c82455b6308bc11fe34958" - head "https://github.com/htacg/tidy-html5.git", :branch => "next" - - bottle do - cellar :any - sha256 "bd3ca7dc82a913c8576716cbcc957260251132f6dd7b8c526c9ef0c4674faf0f" => :mojave - sha256 "af9633f1578980fe3d4351c3d71b4b83cc79f814d87310e4b7d05830c53c9621" => :high_sierra - sha256 "6c8f843d25d6964b18d4c2fa15aaf2606b36decbbe65c31b38a7982e499a9d28" => :sierra - sha256 "48416711a2f1a080e9eae1ecba30773ee48eae98181e25c6ae5ace07cb7ac8ee" => :el_capitan - end - - depends_on "cmake" => :build - - def install - cd "build/cmake" - system "cmake", "../..", *std_cmake_args - system "make" - system "make", "install" - end - - test do - output = pipe_output(bin/"tidy -q", "") - assert_match /^/, output - assert_match /HTML Tidy for HTML5/, output - end -end diff --git a/Formula/tidyp.rb b/Formula/tidyp.rb deleted file mode 100644 index 6cc9df656a349..0000000000000 --- a/Formula/tidyp.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tidyp < Formula - desc "Validate and modify HTML" - homepage "http://tidyp.com/" - url "https://github.com/downloads/petdance/tidyp/tidyp-1.04.tar.gz" - sha256 "20b0fad32c63575bd4685ed09b8c5ca222bbc7b15284210d4b576d0223f0b338" - - bottle do - cellar :any - sha256 "234868d17b7ca6e890d0adc4e339e2a35c81b3c72f0fd8487d1d3352b03fddc5" => :mojave - sha256 "52ef5e1d78ef5a3404e2345683fc03a61b0fad8084b74508473a042b1858b54c" => :high_sierra - sha256 "6b5b65c1476004cc973fff0992dfaf77887b5a5df583ac31fc22665d250b538a" => :sierra - sha256 "5274bb4cd33d9c15d8c73dbe4cfb54e686da29cd29093adba549024fe520b82c" => :el_capitan - sha256 "710962782d909bf11987f8b147d7e141ccba48643ab2db02c7f267d6cf871dd9" => :yosemite - sha256 "7501f78d5f8e549fec7f689cd24aafa716e2097744ec78359d8092183469e4c8" => :mavericks - end - - resource "manual" do - url "https://raw.githubusercontent.com/petdance/tidyp/6a6c85bc9cb089e343337377f76127d01dd39a1c/htmldoc/tidyp1.xsl" - sha256 "68ea4bb74e0ed203fb2459d46e789b2f94e58dc9a5a6bc6c7eb62b774ac43c98" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - - # Use the newly brewed tidyp to generate the manual - resource("manual").stage do - system "#{bin}/tidyp -xml-help > tidyp1.xml" - system "#{bin}/tidyp -xml-config > tidyp-config.xml" - system "/usr/bin/xsltproc tidyp1.xsl tidyp1.xml > tidyp.1" - man1.install gzip("tidyp.1") - end - end - - test do - system "#{bin}/tidyp", "--version" - end -end diff --git a/Formula/tiff2png.rb b/Formula/tiff2png.rb deleted file mode 100644 index 62d564fa4a83c..0000000000000 --- a/Formula/tiff2png.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tiff2png < Formula - desc "TIFF to PNG converter" - homepage "http://www.libpng.org/pub/png/apps/tiff2png.html" - url "https://github.com/rillian/tiff2png/archive/v0.92.tar.gz" - sha256 "64e746560b775c3bd90f53f1b9e482f793d80ea6e7f5d90ce92645fd1cd27e4a" - revision 1 - - bottle do - cellar :any - sha256 "e8cf86b68e703c8c5c6fc0f6e9ffee0e2823a103cb685d4a33d21fb626a96439" => :mojave - sha256 "e20cc758aab7de1c1e9d286e469a444fe9e384bcffe472ec6a52c06b31131ac4" => :high_sierra - sha256 "19951f2ec63fa3c77a43fe2c2444251686ad4fcc1038fbeeb8873fcd528d8954" => :sierra - sha256 "43f0afaca7d61a7f55489260deb233c0a35619d3101d362f80dc7a765a877599" => :el_capitan - sha256 "bf11412cac81c328f8e8de50c182be049696d053ac900b56302685e858562811" => :yosemite - end - - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - def install - bin.mkpath - system "make", "INSTALL=#{prefix}", "CC=#{ENV.cc}", "install" - end - - test do - system "#{bin}/tiff2png", test_fixtures("test.tiff") - end -end diff --git a/Formula/tig.rb b/Formula/tig.rb deleted file mode 100644 index 6c369ff345c21..0000000000000 --- a/Formula/tig.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Tig < Formula - desc "Text interface for Git repositories" - homepage "https://jonas.github.io/tig/" - url "https://github.com/jonas/tig/releases/download/tig-2.4.1/tig-2.4.1.tar.gz" - sha256 "b6b6aa183e571224d0e1fab3ec482542c1a97fa7a85b26352dc31dbafe8558b8" - - bottle do - sha256 "ee892fc9cf84e4d71b0353f0be2ec4b30be58d843975111d605cb4cb1dfc1f2f" => :mojave - sha256 "7212ea8dafd00af09770b01c3fd4e8e0f8fd0dbec15182443713e2e28a429bbb" => :high_sierra - sha256 "f5bb2f81aede65620461805770e47cf27f78450416918322079fcb4b5ef92a97" => :sierra - sha256 "328074d19609efd84dce823240a23142962091c49ca10ea3fd01c1143a49e207" => :el_capitan - end - - head do - url "https://github.com/jonas/tig.git" - - depends_on "asciidoc" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "xmlto" => :build - end - - depends_on "readline" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" - system "make" - # Ensure the configured `sysconfdir` is used during runtime by - # installing in a separate step. - system "make", "install", "sysconfdir=#{pkgshare}/examples" - system "make", "install-doc-man" - bash_completion.install "contrib/tig-completion.bash" - zsh_completion.install "contrib/tig-completion.zsh" => "_tig" - cp "#{bash_completion}/tig-completion.bash", zsh_completion - end - - def caveats; <<~EOS - A sample of the default configuration has been installed to: - #{opt_pkgshare}/examples/tigrc - to override the system-wide default configuration, copy the sample to: - #{etc}/tigrc - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/tig -v") - end -end diff --git a/Formula/tiger-vnc.rb b/Formula/tiger-vnc.rb deleted file mode 100644 index a59f2351fc2f6..0000000000000 --- a/Formula/tiger-vnc.rb +++ /dev/null @@ -1,37 +0,0 @@ -class TigerVnc < Formula - desc "High-performance, platform-neutral implementation of VNC" - homepage "https://tigervnc.org/" - url "https://github.com/TigerVNC/tigervnc/archive/v1.9.0.tar.gz" - sha256 "f15ced8500ec56356c3bf271f52e58ed83729118361c7103eab64a618441f740" - revision 1 - - bottle do - rebuild 1 - sha256 "a048d592b84fae525742e746550892c20319af975bf01b2ca87a975a7abfae86" => :mojave - sha256 "1040513ec177df5275b41b8b1dda64126a6e88327771803600e5635b2983505f" => :high_sierra - sha256 "dca94ec794ece0340d127104ad373a185535317b130c96863f69c9a2c00e1ccd" => :sierra - end - - depends_on "cmake" => :build - depends_on "fltk" - depends_on "gettext" - depends_on "gnutls" - depends_on "jpeg-turbo" - depends_on :x11 - - def install - turbo = Formula["jpeg-turbo"] - args = std_cmake_args + %W[ - -DJPEG_INCLUDE_DIR=#{turbo.include} - -DJPEG_LIBRARY=#{turbo.lib}/libjpeg.dylib - . - ] - system "cmake", *args - system "make", "install" - end - - test do - output = shell_output("#{bin}/vncviewer -h 2>&1", 1) - assert_match "TigerVNC Viewer 64-bit v#{version}", output - end -end diff --git a/Formula/tika.rb b/Formula/tika.rb deleted file mode 100644 index 9bd59b96c20ad..0000000000000 --- a/Formula/tika.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tika < Formula - desc "Content analysis toolkit" - homepage "https://tika.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tika/tika-app-1.20.jar" - sha256 "0101e805555efd65bf1878276a8790fa51e9c7e89d979daa137b9fc8bf8cbd58" - - bottle :unneeded - - depends_on :java => "1.7+" - - resource "server" do - url "https://www.apache.org/dyn/closer.cgi?path=tika/tika-server-1.20.jar" - sha256 "d80ad0f5f3b8d1b58a9ff9c43c6ad7c1c736ef0d9c63ee7e8d83e948aff2d274" - end - - def install - libexec.install "tika-app-#{version}.jar" - bin.write_jar_script libexec/"tika-app-#{version}.jar", "tika" - - libexec.install resource("server") - bin.write_jar_script libexec/"tika-server-#{version}.jar", "tika-rest-server" - end - - test do - pdf = test_fixtures("test.pdf") - assert_equal "application/pdf\n", shell_output("#{bin}/tika --detect #{pdf}") - end -end diff --git a/Formula/tile38.rb b/Formula/tile38.rb deleted file mode 100644 index 74ba65aab35e9..0000000000000 --- a/Formula/tile38.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Tile38 < Formula - desc "In-memory geolocation data store, spatial index, and realtime geofence" - homepage "https://tile38.com/" - url "https://github.com/tidwall/tile38/archive/1.14.4.tar.gz" - sha256 "6db298c81b4df478f7edbc31f953d70fde7266c04b84c1ab0f08fa90bef68bb7" - head "https://github.com/tidwall/tile38.git" - - bottle do - cellar :any_skip_relocation - sha256 "c634695e5842b912aac7eaed86e9c1308fae922696197f5b7899ba774b6f2699" => :mojave - sha256 "0a29163df762fe5b6ce6d4ae6fae53da15838ed6bf1266fe9c156da9b1242d25" => :high_sierra - sha256 "c24d7322257af32c2488cc3a8d4bdfddbc513538e13b92f35ac90be6577dc8f9" => :sierra - end - - depends_on "go" => :build - depends_on "godep" => :build - - def datadir - var/"tile38/data" - end - - def install - ENV["GOPATH"] = buildpath - system "make" - - bin.install "tile38-cli", "tile38-server" - end - - def post_install - # Make sure the data directory exists - datadir.mkpath - end - - def caveats; <<~EOS - To connect: tile38-cli - EOS - end - - plist_options :manual => "tile38-server -d #{HOMEBREW_PREFIX}/var/tile38/data" - - def plist; <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/tile38-server - -d - #{datadir} - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/tile38.log - StandardOutPath - #{var}/log/tile38.log - - - EOS - end - - test do - system bin/"tile38-cli", "-h" - end -end diff --git a/Formula/timedog.rb b/Formula/timedog.rb deleted file mode 100644 index b9e58ffc6cedc..0000000000000 --- a/Formula/timedog.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Timedog < Formula - desc "Lists files that were saved by a backup of the macOS Time Machine" - homepage "https://github.com/nlfiedler/timedog" - url "https://github.com/nlfiedler/timedog/archive/v1.4.tar.gz" - sha256 "169ab408fe5c6b292a7d4adf0845c42160108fd43d6a392b95210204de49cb52" - head "https://github.com/nlfiedler/timedog.git" - - bottle :unneeded - - def install - bin.install "timedog" - end - - test do - assert_match "No machine directory found for host", shell_output("#{bin}/timedog 2>&1", 1) - end -end diff --git a/Formula/timelimit.rb b/Formula/timelimit.rb deleted file mode 100644 index b5fb84ea42263..0000000000000 --- a/Formula/timelimit.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Timelimit < Formula - desc "Limit a process's absolute execution time" - homepage "https://devel.ringlet.net/sysutils/timelimit/" - url "https://devel.ringlet.net/files/sys/timelimit/timelimit-1.9.0.tar.gz" - sha256 "34185bbfe807a912f352f4e2f634c9c3781810b376c4bba947a2381611e7d72c" - - bottle do - cellar :any_skip_relocation - sha256 "4b868a4ee5bd9e424e6ea4aa36fc828d6efd3f07b1d72063bbdb5a0c59baa276" => :mojave - sha256 "872dbbd21820c6d08513f29bc0c024f8584c7d7b7b6b4b436553414d08fd6950" => :high_sierra - sha256 "5fdeeb6ef9c0306f7195187b8068bc4f84de79d6f6716977a262ce26abb3b1db" => :sierra - sha256 "d36206d7c4ba1431fb592ad9335e9ae3bea8b983245cec1e65cc24318088bd86" => :el_capitan - end - - def install - # don't install for specific users - inreplace "Makefile", "-o ${BINOWN} -g ${BINGRP}", "" - inreplace "Makefile", "-o ${SHAREOWN} -g ${SHAREGRP}", "" - - args = %W[LOCALBASE=#{prefix} MANDIR=#{man}/man] - - check_args = args + ["check"] - install_args = args + ["install"] - - system "make", *check_args - system "make", *install_args - end - - test do - assert_equal "timelimit: sending warning signal 15", - shell_output("#{bin}/timelimit -p -t 1 sleep 5 2>&1", 143).chomp - end -end diff --git a/Formula/timewarrior.rb b/Formula/timewarrior.rb deleted file mode 100644 index 9d2c475ef33cf..0000000000000 --- a/Formula/timewarrior.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Timewarrior < Formula - desc "Command-line time tracking application" - homepage "https://taskwarrior.org/docs/timewarrior/" - url "https://taskwarrior.org/download/timew-1.1.1.tar.gz" - sha256 "1f7d9a62e55fc5a3126433654ccb1fd7d2d135f06f05697f871897c9db77ccc9" - head "https://github.com/GothenburgBitFactory/timewarrior.git" - - bottle do - cellar :any_skip_relocation - sha256 "48af9bcedd665d7c2541eb3edc9ed14bccf26a1b3861e295b971ed1d8c2cedc6" => :mojave - sha256 "add032f6bd1e1b67ff81902522473f6c46e232a097d338b711110a8dea7fc622" => :high_sierra - sha256 "79da22a5383fdd5e22eff38ac9deb005c745e78764e1278909b8488cc770dd0d" => :sierra - sha256 "71c77b016f36f2aa46d7aa823b9c7dead64f99d6a7458561caa76bb6c8d1c11f" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/".timewarrior/data").mkpath - (testpath/".timewarrior/extensions").mkpath - touch testpath/".timewarrior/timewarrior.cfg" - assert_match "Tracking foo", shell_output("#{bin}/timew start foo") - end -end diff --git a/Formula/timidity.rb b/Formula/timidity.rb deleted file mode 100644 index f5e4eca0785a7..0000000000000 --- a/Formula/timidity.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Timidity < Formula - desc "Software synthesizer" - homepage "https://timidity.sourceforge.io/" - url "https://downloads.sourceforge.net/project/timidity/TiMidity++/TiMidity++-2.14.0/TiMidity++-2.14.0.tar.bz2" - sha256 "f97fb643f049e9c2e5ef5b034ea9eeb582f0175dce37bc5df843cc85090f6476" - - bottle do - sha256 "04f54d77441e16992c34443e4e6b39a2f03c83e450edb4fa05ec9d9c87972bc0" => :mojave - sha256 "5db392f0e53371e29fdca1ebeee3fdad24043f038c943314e991a06765d102a5" => :high_sierra - sha256 "b45b1df69ab87563a77e1163114160f66679fde5548bac0ae81acb7fae86ab80" => :sierra - sha256 "0b26a98c3e8e3706f8ff1fb2e21c014ac7245c01510799172e7f3ebdc71602ac" => :el_capitan - sha256 "2bfaec5aaaacf7ed13148f437cbeba6bb793f9eacdab739b7202d151031253b4" => :yosemite - sha256 "9e56e31b91c1cab53ebd7830114520233b02f7766f69f2e761d005b8bcd2fb58" => :mavericks - sha256 "a6c27dd89a2a68505faa01a3be6b770d5c89ae79a9b4739a5f7f1d226bfedb2d" => :mountain_lion - end - - depends_on "flac" - depends_on "libao" - depends_on "libogg" - depends_on "libvorbis" - depends_on "speex" - - resource "freepats" do - url "https://freepats.zenvoid.org/freepats-20060219.zip" - sha256 "532048a5777aea717effabf19a35551d3fcc23b1ad6edd92f5de1d64600acd48" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--enable-audio=darwin,vorbis,flac,speex,ao" - system "make", "install" - - # Freepats instrument patches from https://freepats.zenvoid.org/ - (share/"freepats").install resource("freepats") - pkgshare.install_symlink share/"freepats/Tone_000", - share/"freepats/Drum_000", - share/"freepats/freepats.cfg" => "timidity.cfg" - end - - test do - system "#{bin}/timidity" - end -end diff --git a/Formula/tin.rb b/Formula/tin.rb deleted file mode 100644 index 4d6b713876287..0000000000000 --- a/Formula/tin.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tin < Formula - desc "Threaded, NNTP-, and spool-based UseNet newsreader" - homepage "http://www.tin.org" - url "http://ftp.cuhk.edu.hk/pub/packages/news/tin/v2.4/tin-2.4.2.tar.gz" - sha256 "93839d2fd82175281c57f1a408dfb56bf716cf4f0b259b3e03462dca32391d51" - - bottle do - sha256 "e8fb724dc37c9ff8cc7681ca5bac7ee335e8636f57482171ed4f3c31a59bf066" => :mojave - sha256 "e9b2afbdc37d3a349dd8341e7ceb1191466b28fc9e636ef15308d6c5b7075ba4" => :high_sierra - sha256 "7964b2236af4b8c195271238b66a054293d94ce5bda3f10746f0b8e1d06c9f91" => :sierra - sha256 "572e6d081547a2b9fc46afffa994f52ffd5696be884e18858c8c03131a72faec" => :el_capitan - end - - conflicts_with "mutt", :because => "both install mmdf.5 and mbox.5 man pages" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "build" - system "make", "install" - end - - test do - system "#{bin}/tin", "-H" - end -end diff --git a/Formula/tinc.rb b/Formula/tinc.rb deleted file mode 100644 index e507f21354c1a..0000000000000 --- a/Formula/tinc.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Tinc < Formula - desc "Virtual Private Network (VPN) tool" - homepage "https://www.tinc-vpn.org/" - url "https://tinc-vpn.org/packages/tinc-1.0.35.tar.gz" - sha256 "18c83b147cc3e2133a7ac2543eeb014d52070de01c7474287d3ccecc9b16895e" - - bottle do - sha256 "98c73cd30d30b74363b2093621006361da5a8738e040d9c6bf329016d7f18c3f" => :mojave - sha256 "9c76119b5f3116772bff828dfb3032d44d1ee6d232236789c03871cf605d9f37" => :high_sierra - sha256 "0c78ab7901f43d6f2dd2406157308377722df4d225737fb193dcd7e3f3ef7714" => :sierra - end - - depends_on "lzo" - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{sbin}/tincd --version") - end -end diff --git a/Formula/tintin.rb b/Formula/tintin.rb deleted file mode 100644 index 9b49be857d6b2..0000000000000 --- a/Formula/tintin.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tintin < Formula - desc "MUD client" - homepage "https://tintin.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tintin/TinTin%2B%2B%20Source%20Code/2.01.4/tintin-2.01.4.tar.gz" - sha256 "dd22afbff45a93ec399065bae385489131af7e1b6ae8abb28f80d6a03b82ebbc" - revision 2 - - bottle do - cellar :any - sha256 "fbdf58d5dbba8cf3acf14c2691b7bc2408ef46cc2d1d720ee2baf0386da95f12" => :mojave - sha256 "552223fd7efc3d68a99a1d49135a6537091f0d893e67f08eaf876e2385a0460d" => :high_sierra - sha256 "58dbcc694fb3b80f10951d06f24fb4fd0e94eac1a3dc84017cd82e38610ff6a7" => :sierra - sha256 "bd1fe99b7c2a458acd81a5a567ba57c664c99f9f5f73adb8845bae7d7363a151" => :el_capitan - end - - depends_on "gnutls" - depends_on "pcre" - - def install - # find Homebrew's libpcre - ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" - - cd "src" do - system "./configure", "--prefix=#{prefix}" - system "make", "CFLAGS=#{ENV.cflags}", - "INCS=#{ENV.cppflags}", - "LDFLAGS=#{ENV.ldflags}", - "install" - end - end - - test do - require "pty" - (testpath/"input").write("#end {bye}\n") - PTY.spawn(bin/"tt++", "-G", "input") do |r, _w, _pid| - assert_match "Goodbye", r.read - end - end -end diff --git a/Formula/tiny-fugue.rb b/Formula/tiny-fugue.rb deleted file mode 100644 index 30bd9d9d1d78b..0000000000000 --- a/Formula/tiny-fugue.rb +++ /dev/null @@ -1,82 +0,0 @@ -class TinyFugue < Formula - desc "Programmable MUD client" - homepage "https://tinyfugue.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tinyfugue/tinyfugue/5.0%20beta%208/tf-50b8.tar.gz" - version "5.0b8" - sha256 "3750a114cf947b1e3d71cecbe258cb830c39f3186c369e368d4662de9c50d989" - - bottle do - rebuild 1 - sha256 "65a9e5f9d8ad9890474161ba55b5ebc73f46398a2145c800d506bc975e5b995b" => :mojave - sha256 "870605dd7981a86165e8af6c79e18b5ac556bd5f933a46ff6ef000be50a87714" => :high_sierra - sha256 "f4df3ef186829f13f9f4d5512faf3e65e01eaf14aefd42b0f6895aded918fe79" => :sierra - sha256 "8b87d1b3de3a1ed16b2c587897c1716b00d011d152476ecdaa922a1406f2846a" => :el_capitan - sha256 "fbc2ca2d91d2a3bb3df752a98306f7f7f04756870019eb7f72df06a68efa632e" => :yosemite - sha256 "0d7db7bf7a3744de5cb572c013da516e98b5d6ed911a2f3bf4e0a028a160fd04" => :mavericks - end - - depends_on "libnet" - depends_on "openssl" - depends_on "pcre" - - conflicts_with "tee-clc", :because => "both install a `tf` binary" - - # pcre deprecated pcre_info. Switch to HB pcre-8.31 and pcre_fullinfo. - # Not reported upstream; project is in stasis since 2007. - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-getaddrinfo", - "--enable-termcap=ncurses" - system "make", "install" - end -end - - -__END__ ---- a/src/malloc.c 2007-01-13 15:12:39.000000000 -0800 -+++ b/src/malloc.c 2012-10-26 08:23:30.000000000 -0700 -@@ -7,6 +7,7 @@ - ************************************************************************/ - static const char RCSid[] = "$Id: malloc.c,v 35004.22 2007/01/13 23:12:39 kkeys Exp $"; - -+#include "sys/types.h" - #include "tfconfig.h" - #include "port.h" - #include "signals.h" ---- a/src/macro.c 2007-01-13 15:12:39.000000000 -0800 -+++ b/src/macro.c 2012-10-26 08:15:31.000000000 -0700 -@@ -893,7 +893,8 @@ - } - spec->attr &= ~F_NONE; - if (spec->nsubattr) { -- int n = pcre_info(spec->trig.ri->re, NULL, NULL); -+ int n; -+ pcre_fullinfo(spec->trig.ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n); - for (i = 0; i < spec->nsubattr; i++) { - spec->subattr[i].attr &= ~F_NONE; - if (spec->subattr[i].subexp > n) { ---- a/src/pattern.c 2007-01-13 15:12:39.000000000 -0800 -+++ b/src/pattern.c 2012-10-26 08:16:19.000000000 -0700 -@@ -151,7 +151,7 @@ - emsg ? emsg : "unknown error"); - goto tf_reg_compile_error; - } -- n = pcre_info(ri->re, NULL, NULL); -+ pcre_fullinfo(ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n); - if (n < 0) goto tf_reg_compile_error; - ri->ovecsize = 3 * (n + 1); - ri->ovector = dmalloc(NULL, sizeof(int) * ri->ovecsize, file, line); ---- a/src/pattern.h 2007-01-13 15:12:39.000000000 -0800 -+++ b/src/pattern.h 2012-10-26 08:17:54.000000000 -0700 -@@ -10,7 +10,7 @@ - #ifndef PATTERN_H - #define PATTERN_H - --#include "pcre-2.08/pcre.h" -+#include - - typedef struct RegInfo { - pcre *re; diff --git a/Formula/tinycdb.rb b/Formula/tinycdb.rb deleted file mode 100644 index 1cc4641717986..0000000000000 --- a/Formula/tinycdb.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Tinycdb < Formula - desc "Create and read constant databases" - homepage "http://www.corpit.ru/mjt/tinycdb.html" - url "http://www.corpit.ru/mjt/tinycdb/tinycdb-0.78.tar.gz" - sha256 "50678f432d8ada8d69f728ec11c3140e151813a7847cf30a62d86f3a720ed63c" - - bottle do - cellar :any_skip_relocation - sha256 "6ccb5ea327e61b14af89692af32c9fe6fbd9c2d04447ef92970b6f7909fba26b" => :mojave - sha256 "7b3ca0152fa89592ce48a85cca3aad67b3c1f0ad35e153a52bbb8a772540dd3d" => :high_sierra - sha256 "a1b2de0589b4530d51f33060657d5c7f08a46d1e90b60f2c2a03f499ff944a4e" => :sierra - sha256 "4f4341c31d1ed6eddce4dfa57360e339f27f37a0db5b5b6df8df46f5ccda65c2" => :el_capitan - sha256 "d73abbd1439c1579c3ab925d2110fee60f287bb9b262850e030c74f7c356bcaa" => :yosemite - sha256 "b35dda3e5219c993140f7ed6244f483b0159cbd4458fb3ee4461e25daa368d41" => :mavericks - sha256 "cc08f9c7d8ab18de0f547d6790ebef51ad0984e82ed99e8d2cb7567725ca8eb5" => :mountain_lion - end - - def install - system "make" - system "make", "install", "prefix=#{prefix}", "mandir=#{man}" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main() { - struct cdb_make cdbm; - int fd; - char *key = "test", - *val = "homebrew"; - unsigned klen = 4, - vlen = 8; - - fd = open("#{testpath}/db", O_RDWR|O_CREAT); - - cdb_make_start(&cdbm, fd); - cdb_make_add(&cdbm, key, klen, val, vlen); - cdb_make_exists(&cdbm, key, klen); - cdb_make_finish(&cdbm); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lcdb", "-o", "test" - system "./test" - end -end diff --git a/Formula/tinyproxy.rb b/Formula/tinyproxy.rb deleted file mode 100644 index 2ec09a7f0712e..0000000000000 --- a/Formula/tinyproxy.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Tinyproxy < Formula - desc "HTTP/HTTPS proxy for POSIX systems" - homepage "https://www.banu.com/tinyproxy/" - url "https://github.com/tinyproxy/tinyproxy/releases/download/1.10.0/tinyproxy-1.10.0.tar.xz" - sha256 "59be87689c415ba0d9c9bc6babbdd3df3b372d60b21e526b118d722dbc995682" - revision 1 - - bottle do - sha256 "fdf164a29e4730795b6b66fdabb34a35f34b91e4d8c896fa461542ec356d464d" => :mojave - sha256 "05aed7a81fe9f92f043fe55ac10dba2474df664f710c01ee92283e5cf7fe0324" => :high_sierra - sha256 "97cefacaaf1aa12eabe102ad86cee01c24f50f2a3ec07ca1eb17799319f02385" => :sierra - end - - depends_on "asciidoc" => :build - depends_on "docbook-xsl" => :build - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{etc} - --disable-regexcheck - --enable-filter - --enable-reverse - --enable-transparent - ] - - system "./configure", *args - system "make", "install" - end - - def post_install - (var/"log/tinyproxy").mkpath - (var/"run/tinyproxy").mkpath - end - - plist_options :manual => "tinyproxy" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/tinyproxy - -d - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - pid = fork do - exec "#{bin}/tinyproxy" - end - sleep 2 - - begin - assert_match /tinyproxy/, shell_output("curl localhost:8888") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/tinysvm.rb b/Formula/tinysvm.rb deleted file mode 100644 index 7c4bb4dc1a762..0000000000000 --- a/Formula/tinysvm.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Tinysvm < Formula - desc "Support vector machine library for pattern recognition" - homepage "http://chasen.org/~taku/software/TinySVM/" - url "http://chasen.org/~taku/software/TinySVM/src/TinySVM-0.09.tar.gz" - sha256 "e377f7ede3e022247da31774a4f75f3595ce768bc1afe3de9fc8e962242c7ab8" - - bottle do - cellar :any_skip_relocation - sha256 "56f1afa09c931eb7e8dfaf46f1a814c1df306e4c20269ef78fddfbdf85a7251a" => :mojave - sha256 "62f0920fdf8f5b7f29cebacc1add1396daef668c67e3d10644d9d35d1b49afc5" => :high_sierra - sha256 "a6ad14c984b337bee83372ac6a29ffe7c0491180a302cfcd8f53b1a3ee6816e1" => :sierra - sha256 "2b84b75043ba1d97172e2756e3da870a8ec8e074167ab5402e7a4e1b4c923864" => :el_capitan - sha256 "ea90446332244176d4ec3bc4ff0c6175810c3a39d942f225bb55c0fb6252858d" => :yosemite - sha256 "c3464518eb4a82d123939aca024c328d885c3f14e74df31b4deed9588bb495b1" => :mavericks - sha256 "3d55eaafeeef653a2e41f6d521a2050dc9dac24cfdaf49ba21c311cbcdfa676d" => :mountain_lion - end - - # Use correct compilation flag, via MacPorts. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/838f605/tinysvm/patch-configure.diff" - sha256 "b4cd84063fd56cdcb0212528c6d424788528a9d6b8b0a17aa01294773c62e8a7" - end - - def install - # Needed to select proper getopt, per MacPorts - ENV.append_to_cflags "-D__GNU_LIBRARY__" - - inreplace "configure", "-O9", "" # clang barfs on -O9 - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-shared" - system "make", "install" - end - - test do - (testpath/"train.svmdata").write <<~EOS - +1 201:1.2 3148:1.8 3983:1 4882:1 - -1 874:0.3 3652:1.1 3963:1 6179:1 - +1 1168:1.2 3318:1.2 3938:1.8 4481:1 - +1 350:1 3082:1.5 3965:1 6122:0.2 - -1 99:1 3057:1 3957:1 5838:0.3 - EOS - - (testpath/"train.svrdata").write <<~EOS - 0.23 201:1.2 3148:1.8 3983:1 4882:1 - 0.33 874:0.3 3652:1.1 3963:1 6179:1 - -0.12 1168:1.2 3318:1.2 3938:1.8 4481:1 - EOS - - system "#{bin}/svm_learn", "-t", "1", "-d", "2", "-c", "train.svmdata", "test" - system "#{bin}/svm_classify", "-V", "train.svmdata", "test" - system "#{bin}/svm_model", "test" - - assert_predicate testpath/"test", :exist? - end -end diff --git a/Formula/tinyxml.rb b/Formula/tinyxml.rb deleted file mode 100644 index 26918b1157c90..0000000000000 --- a/Formula/tinyxml.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Tinyxml < Formula - desc "XML parser" - homepage "http://www.grinninglizard.com/tinyxml/" - url "https://downloads.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" - sha256 "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593" - - bottle do - cellar :any - sha256 "c1fc1d7fa9e6934412294e921cde90bcfd107b68dbdddd9acf8cae4927190718" => :mojave - sha256 "ec0f83018a9ff93c11b6a8c92483056b2771359a14aedfb6dc46e1ab078ce9ac" => :high_sierra - sha256 "ef8c7bbbae6148e161b6f3369ede8bd3533a32847dc716000b46d26e6fb1c26c" => :sierra - sha256 "16e6052892b43e68c45f5122b6802e9bc32001dc9478dfcd89511a24544660e5" => :el_capitan - sha256 "4b1df9cb229b04f9968621a52737d96e86fcd6c2ad8904ae8a5c324347845f50" => :yosemite - sha256 "75f79bb5d502e7be74de20e1cd3e3dcdd4702b37ef7de53d9d9a546a51776b50" => :mavericks - sha256 "2db8d34dafd503a2982dd9ca5ffb4a2a2740e0eb78195933cb121dd7b7836728" => :mountain_lion - end - - depends_on "cmake" => :build - - # The first two patches are taken from the debian packaging of tinyxml. - # The first patch enforces use of stl strings, rather than a custom string type. - # The second patch is a fix for incorrect encoding of elements with special characters - # originally posted at https://sourceforge.net/p/tinyxml/patches/51/ - # The third patch adds a CMakeLists.txt file to build a shared library and provide an install target - # submitted upstream as https://sourceforge.net/p/tinyxml/patches/66/ - patch do - url "https://raw.githubusercontent.com/robotology/yarp/master/extern/tinyxml/patches/enforce-use-stl.patch" - sha256 "16a5b5e842eb0336be606131e5fb12a9165970f7bd943780ba09df2e1e8b29b1" - end - - patch do - url "https://raw.githubusercontent.com/robotology/yarp/master/extern/tinyxml/patches/entity-encoding.patch" - sha256 "c5128e03933cd2e22eb85554d58f615f4dbc9177bd144cae2913c0bd7b140c2b" - end - - patch do - url "https://gist.githubusercontent.com/scpeters/6325123/raw/cfb079be67997cb19a1aee60449714a1dedefed5/tinyxml_CMakeLists.patch" - sha256 "32160135c27dc9fb7f7b8fb6cf0bf875a727861db9a07cf44535d39770b1e3c7" - end - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - (lib+"pkgconfig/tinyxml.pc").write pc_file - end - - def pc_file; <<~EOS - prefix=#{opt_prefix} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include - - Name: TinyXml - Description: Simple, small, C++ XML parser - Version: #{version} - Libs: -L${libdir} -ltinyxml - Cflags: -I${includedir} - EOS - end - - test do - (testpath/"test.xml").write <<~EOS - - World - EOS - (testpath/"test.cpp").write <<~EOS - #include - - int main() - { - TiXmlDocument doc ("test.xml"); - doc.LoadFile(); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-ltinyxml", "-o", "test" - system "./test" - end -end diff --git a/Formula/tinyxml2.rb b/Formula/tinyxml2.rb deleted file mode 100644 index c700d34151790..0000000000000 --- a/Formula/tinyxml2.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Tinyxml2 < Formula - desc "Improved tinyxml (in memory efficiency and size)" - homepage "http://grinninglizard.com/tinyxml2" - url "https://github.com/leethomason/tinyxml2/archive/7.0.1.tar.gz" - sha256 "a381729e32b6c2916a23544c04f342682d38b3f6e6c0cad3c25e900c3a7ef1a6" - head "https://github.com/leethomason/tinyxml2.git" - - bottle do - cellar :any - sha256 "233eac209902fba3aebf51fa81d15a5b472064eec22bc5364b8685453166a08a" => :mojave - sha256 "cc447f7fcf805805c97e4d9aedacd5638b103177de32fb30986bcaec37698c18" => :high_sierra - sha256 "90fda15a1ce430ed1e77891a23c65a53092deca1b585330aa86fbde8ea3b80b5" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - tinyxml2::XMLDocument doc (false); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-ltinyxml2", "-o", "test" - system "./test" - end -end diff --git a/Formula/tippecanoe.rb b/Formula/tippecanoe.rb deleted file mode 100644 index 935c5560d0c8d..0000000000000 --- a/Formula/tippecanoe.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Tippecanoe < Formula - desc "Build vector tilesets from collections of GeoJSON features" - homepage "https://github.com/mapbox/tippecanoe" - url "https://github.com/mapbox/tippecanoe/archive/1.32.9.tar.gz" - sha256 "553d63a6385bfedcd4c0736a6b705ca20aa0dbf2bedc0db2e5775d450bfe9fe3" - - bottle do - cellar :any_skip_relocation - sha256 "0743af42ed2f0908232f1b813af8b4faf37a8f25e9abd8a341d0628e7e974c37" => :mojave - sha256 "bdaa75b7f76b8cb3e6327e0c7413926151087e4518664d9b1894058642370c8f" => :high_sierra - sha256 "34b90621908d81c59c2c60d7dbd62abcfdf9607b257605c0f5a81c12d8f774f4" => :sierra - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.json").write <<~EOS - {"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0,0]}} - EOS - safe_system "#{bin}/tippecanoe", "-o", "test.mbtiles", "test.json" - assert_predicate testpath/"test.mbtiles", :exist?, "tippecanoe generated no output!" - end -end diff --git a/Formula/titan-server.rb b/Formula/titan-server.rb deleted file mode 100644 index 7e12b99961428..0000000000000 --- a/Formula/titan-server.rb +++ /dev/null @@ -1,19 +0,0 @@ -class TitanServer < Formula - desc "Distributed graph database" - homepage "https://thinkaurelius.github.io/titan/" - url "http://s3.thinkaurelius.com/downloads/titan/titan-1.0.0-hadoop1.zip" - sha256 "67538e231db5be75821b40dd026bafd0cd7451cdd7e225a2dc31e124471bb8ef" - - bottle :unneeded - - def install - libexec.install %w[bin conf data ext javadocs lib log scripts] - bin.install_symlink libexec/"bin/titan.sh" => "titan" - bin.install_symlink libexec/"bin/gremlin.sh" => "titan-gremlin" - bin.install_symlink libexec/"bin/gremlin-server.sh" => "titan-gremlin-server" - end - - test do - system "#{bin}/titan", "stop" - end -end diff --git a/Formula/titlecase.rb b/Formula/titlecase.rb deleted file mode 100644 index 0214948a1ac93..0000000000000 --- a/Formula/titlecase.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Titlecase < Formula - desc "Script to convert text to title case" - homepage "http://plasmasturm.org/code/titlecase/" - url "https://github.com/ap/titlecase/archive/v1.004.tar.gz" - sha256 "fbaafdb66ab4ba26f1f03fa292771d146c050fff0a3a640e11314ace322c2d92" - head "https://github.com/ap/titlecase.git" - - bottle :unneeded - - def install - bin.install "titlecase" - end - - test do - (testpath/"test").write "homebrew" - assert_equal "Homebrew\n", shell_output("#{bin}/titlecase test") - end -end diff --git a/Formula/tivodecode.rb b/Formula/tivodecode.rb deleted file mode 100644 index bac79a4265199..0000000000000 --- a/Formula/tivodecode.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Tivodecode < Formula - desc "Convert .tivo to .mpeg" - homepage "https://tivodecode.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tivodecode/tivodecode/0.2pre4/tivodecode-0.2pre4.tar.gz" - sha256 "788839cc4ad66f5b20792e166514411705e8564f9f050584c54c3f1f452e9cdf" - - bottle do - cellar :any_skip_relocation - sha256 "efa83924ac8d8e07e539c6d9b3aa5d5d7440fd34bccc1da793ead1224eabdbbf" => :mojave - sha256 "0016f711d79454b154708804c574633c48e472b9a81c257730e5cf4aa00dd220" => :high_sierra - sha256 "5682668b2e721933054656cebc49ccb46c382428b77409d94251c6f1dfd3092d" => :sierra - sha256 "d50450e62c6fcf71643ceaf5f33dcf4e904e389c89597ccbe148de3053839ccd" => :el_capitan - sha256 "cb74afdc87eca67025849836bee29e04f6c8e7755753a9daa52c84cfc9201cd8" => :yosemite - sha256 "7622e7c60ecd22127b454e303d7c15b14c6cc79bcddf00c0de0de58e9350b5bd" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/tj.rb b/Formula/tj.rb deleted file mode 100644 index 05ef342684690..0000000000000 --- a/Formula/tj.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Tj < Formula - desc "Line timestamping tool" - homepage "https://github.com/sgreben/tj" - url "https://github.com/sgreben/tj/archive/7.0.0.tar.gz" - sha256 "6f9f988a05f9089d2a96edd046d673392d6fac2ea74ff0999b2f0428e9f72f7f" - - bottle do - cellar :any_skip_relocation - sha256 "9e9789735a9437803ccadf92845d8bfb2f85e11429fb97e195c01fb2887cf045" => :mojave - sha256 "6e47b0d410b1a9aafc4b31bf6f397e5b6194faf2aea88e0fc0f45a4584adbf37" => :high_sierra - sha256 "f62d1e6bebec485f947355a7a0a79fd9f3986396ac5f79c96e630693533a5c9d" => :sierra - sha256 "679f41ee55f109604f19583683f43406e4af88f86b60534ab4e758d5b2192940" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/sgreben/tj").install buildpath.children - cd "src/github.com/sgreben/tj" do - system "make", "binaries/osx_x86_64/tj" - bin.install "binaries/osx_x86_64/tj" - prefix.install_metafiles - end - end - - test do - system bin/"tj", "test" - end -end diff --git a/Formula/tkdiff.rb b/Formula/tkdiff.rb deleted file mode 100644 index b37e2668a92b7..0000000000000 --- a/Formula/tkdiff.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Tkdiff < Formula - desc "Graphical side by side diff utility" - homepage "https://tkdiff.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tkdiff/tkdiff/4.3.4/tkdiff-4-3-4.zip" - version "4.3.4" - sha256 "b75413f1832b2d6f28dca21445eb5661d7aad50fe5ea7d34e19da53f34955f0f" - - bottle :unneeded - - def install - bin.install "tkdiff" - end - - test do - system "#{bin}/tkdiff", "--help" - end -end diff --git a/Formula/tldr.rb b/Formula/tldr.rb deleted file mode 100644 index 978276a5bca0f..0000000000000 --- a/Formula/tldr.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tldr < Formula - desc "Simplified and community-driven man pages" - homepage "https://tldr.sh/" - url "https://github.com/tldr-pages/tldr-cpp-client/archive/v1.3.0.tar.gz" - sha256 "6210ece3f5d8f8e55b404e2f6c84be50bfdde9f0d194a271bce751a3ed6141be" - revision 2 - head "https://github.com/tldr-pages/tldr-cpp-client.git" - - bottle do - cellar :any - sha256 "c5f99efa930b7f80647496c83fe118bd184feae7c5f256dc67d7594aceba7120" => :mojave - sha256 "00f5ce204fa62e51ed3be821abba9fdda36335b6cecf65231158c02b9713f357" => :high_sierra - sha256 "06f9609695fb6b14bbd78f3246bb176b341aecda6ce70515723cee8e8e4ced69" => :sierra - sha256 "209c571e3472128665194e73451199087236758a0a7cfa6e88ffd7aa444abbac" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libzip" - - conflicts_with "tealdeer", :because => "both install `tldr` binaries" - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - assert_match "brew", shell_output("#{bin}/tldr brew") - end -end diff --git a/Formula/tlsdate.rb b/Formula/tlsdate.rb deleted file mode 100644 index 893bc3c97a1ed..0000000000000 --- a/Formula/tlsdate.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tlsdate < Formula - desc "Secure rdate replacement" - homepage "https://www.github.com/ioerror/tlsdate/" - url "https://github.com/ioerror/tlsdate/archive/tlsdate-0.0.13.tar.gz" - sha256 "90efdff87504b5159cb6a3eefa9ddd43723c073d49c4b3febba9e48fc1292bf9" - head "https://github.com/ioerror/tlsdate.git" - - bottle do - sha256 "3c33940ba1ca145ebd4d62e52c690bff6d537ded3441f3f4b060738dc730cb0c" => :mojave - sha256 "f84b34785fda2e7229b0bef6bb1a13c3d128c03413c1d81c08333d9d0ee0732f" => :high_sierra - sha256 "0d2b8b903299eae65fe12cfb5d5d7a7bcfabfad1f9be4a0870cdfeee7040b4ff" => :sierra - sha256 "c7d7ea17bf9e7cb9b897a0f0aeed0ef3c50f2c309e0b6055fdfe7bee3aca5152" => :el_capitan - sha256 "58bfadb241575316ab6877c584a09e3681084165bfd733430e5c3f4b0b8be494" => :yosemite - sha256 "cf446ccff505ef69dd583f61d82a61420697b39c66c2cd2f006944d688ac8fee" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libevent" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - # Upstream PR to fix the build on macOS - patch do - url "https://github.com/ioerror/tlsdate/pull/160.patch?full_index=1" - sha256 "c2af25386fd7ffa889e421e864fdd72bbf90f2551347e6155ad7fb7b13122b90" - end - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/tlsdate", "--verbose", "--dont-set-clock" - end -end diff --git a/Formula/tmate.rb b/Formula/tmate.rb deleted file mode 100644 index bed3d56a8f179..0000000000000 --- a/Formula/tmate.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Tmate < Formula - desc "Instant terminal sharing" - homepage "https://tmate.io/" - url "https://github.com/tmate-io/tmate/archive/2.2.1.tar.gz" - sha256 "d9c2ac59f42e65aac5f500f0548ea8056fd79c9c5285e5af324d833e2a84c305" - revision 4 - head "https://github.com/tmate-io/tmate.git" - - bottle do - cellar :any - sha256 "788ab394a785b79e997e8324b0973cf70ef5d214d4c2427869b36c032d77d45b" => :mojave - sha256 "9f6b37c2a0011b255d3a5c39e0bf653e8271d4f8cfc4306bc615ddf77946b442" => :high_sierra - sha256 "a3a692cff9eba1a68eef998577050169da2eb3930e9e12902a33c689ed904548" => :sierra - sha256 "95dac4cc5d9fc02d7a7d832d471b4911b52e97ced0ab98e902c84d33ee54dc7c" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "libssh" - depends_on "msgpack" - - def install - system "sh", "autogen.sh" - - ENV.append "LDFLAGS", "-lresolv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - end - - test do - system "#{bin}/tmate", "-V" - end -end diff --git a/Formula/tmpreaper.rb b/Formula/tmpreaper.rb deleted file mode 100644 index ac4e9dda11819..0000000000000 --- a/Formula/tmpreaper.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Tmpreaper < Formula - desc "Clean up files in directories based on their age" - homepage "https://packages.debian.org/sid/tmpreaper" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tmpreaper/tmpreaper_1.6.13+nmu1.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tmpreaper/tmpreaper_1.6.13+nmu1.tar.gz" - version "1.6.13_nmu1" - sha256 "c88f05b5d995b9544edb7aaf36ac5ce55c6fac2a4c21444e5dba655ad310b738" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cd7fa68eb0292ea2831b7792b7319ac29dfe005c1a1ec868877b7a04d1ad6490" => :mojave - sha256 "be0cf74a352a88dc2c6f616ad1bd695e37ff0736826f20007a1727e48ce16b84" => :high_sierra - sha256 "44d3eb40f2c063642d57ccd7d65460901e7240abda5bda8b54721d77f731d755" => :sierra - sha256 "e9992640d7c0e139caef8ccb130af90548f6435b3789b61c8c873f619e55ade9" => :el_capitan - sha256 "a027f222a96bde98ae5f3e271d990871884a89fab8578066cc6b1cdb3a01aa2c" => :yosemite - sha256 "31519a6cd52a36c1eb9f5a65b67b6f893d3a9f3c9d4601051cc6f33061bc8bf5" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}" - system "make", "install" - end - - test do - touch "removed" - sleep 3 - touch "not-removed" - system "#{sbin}/tmpreaper", "2s", "." - refute_predicate testpath/"removed", :exist? - assert_predicate testpath/"not-removed", :exist? - end -end diff --git a/Formula/tmpwatch.rb b/Formula/tmpwatch.rb deleted file mode 100644 index 538cc922e8e3b..0000000000000 --- a/Formula/tmpwatch.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Tmpwatch < Formula - desc "Find and remove files not accessed in a specified time" - homepage "https://pagure.io/tmpwatch" - url "https://releases.pagure.org/tmpwatch/tmpwatch-2.11.tar.bz2" - sha256 "93168112b2515bc4c7117e8113b8d91e06b79550d2194d62a0c174fe6c2aa8d4" - - bottle do - cellar :any_skip_relocation - sha256 "727f356600eb58bb27a23ab91a4ffc8904eec726c2e9f85025d810e3a19030eb" => :mojave - sha256 "18ca8e16075315e3aca9cd4e2e445358c33d5911a647557ad8971edb232e4cc4" => :high_sierra - sha256 "945dbe942b232586517a2fcd81faab1fc20d3936e53ddf9154158dd0b7d3d55c" => :sierra - sha256 "d19ca779df5c019f840d0c186822fbab4758bf3635101aa975b4bad35bb2f184" => :el_capitan - sha256 "6b7935b74c118e797b2cba298e0f546d4231ac2c5eb165f4a63bc6c2d0a372dc" => :yosemite - sha256 "0083a3dd898627e47dabc967328de86df6bf60c2c62210fd9dd4846795de0a8f" => :mavericks - sha256 "c0416097ea10d23751b2db15f21d437d863e5de3ed44fe50e0f8ebc34f487f2f" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - mkdir "test" do - touch %w[a b c] - ten_minutes_ago = Time.new - 600 - File.utime(ten_minutes_ago, ten_minutes_ago, "a") - system "#{sbin}/tmpwatch", "2m", Pathname.pwd - assert_equal %w[b c], Dir["*"] - end - end -end diff --git a/Formula/tmux-cssh.rb b/Formula/tmux-cssh.rb deleted file mode 100644 index 1e0cdbdd41afa..0000000000000 --- a/Formula/tmux-cssh.rb +++ /dev/null @@ -1,19 +0,0 @@ -class TmuxCssh < Formula - desc "TMUX with a \"ClusterSSH\"-like behavior" - homepage "https://github.com/dennishafemann/tmux-cssh" - url "https://github.com/dennishafemann/tmux-cssh/archive/1.0.6-0.tar.gz" - version "1.0.6-0" - sha256 "0819ede68fcde7df7b86df440790d6be2a45259b5c2af40bbe9b476a1bf54acc" - - bottle :unneeded - - depends_on "tmux" - - def install - bin.install "tmux-cssh" - end - - test do - system "#{bin}/tmux-cssh", "--help" - end -end diff --git a/Formula/tmux-mem-cpu-load.rb b/Formula/tmux-mem-cpu-load.rb deleted file mode 100644 index 86248c9a1b023..0000000000000 --- a/Formula/tmux-mem-cpu-load.rb +++ /dev/null @@ -1,31 +0,0 @@ -class TmuxMemCpuLoad < Formula - desc "CPU, RAM memory, and load monitor for use with tmux" - homepage "https://github.com/thewtex/tmux-mem-cpu-load" - url "https://github.com/thewtex/tmux-mem-cpu-load/archive/v3.4.0.tar.gz" - sha256 "a773994e160812a964abc7fc4e8ec16b7d9833edb0a66e5c67f287c7c5949ecb" - head "https://github.com/thewtex/tmux-mem-cpu-load.git" - - bottle do - cellar :any_skip_relocation - sha256 "6da11cf3e7664d4b75de9a276c9b3823072a9d46855e2aaa2caeaa57ffdb9221" => :mojave - sha256 "ac291740dbf05c7cae025836caf5c2ad1f375f9060fc871dfc5adf51abe2a4c2" => :high_sierra - sha256 "8743cb844ff2a55657f2f1eb7bfae300c02a3fdf255fdd5e8242d1a60103838d" => :sierra - sha256 "9e2c7e5fd03feb98cead3f366a9cc35375cee80c30fd570c742440d69319c296" => :el_capitan - sha256 "abd6293238671268ea1f0362518cd82c4b3133cb42b0327d579c93768ea81110" => :yosemite - sha256 "24e52a177d0201edf30621a648c7cbbf1f2cc7e4bd9f9145a7f8c258d9219725" => :mavericks - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"tmux-mem-cpu-load" - end -end diff --git a/Formula/tmux-xpanes.rb b/Formula/tmux-xpanes.rb deleted file mode 100644 index 4467e2ca4c07d..0000000000000 --- a/Formula/tmux-xpanes.rb +++ /dev/null @@ -1,22 +0,0 @@ -class TmuxXpanes < Formula - desc "Ultimate terminal divider powered by tmux" - homepage "https://github.com/greymd/tmux-xpanes" - url "https://github.com/greymd/tmux-xpanes/archive/v3.1.0.tar.gz" - sha256 "453e9a5df245e024b66f0ef527e96880b559581576979622e5e8eb8b5f950cd2" - - bottle :unneeded - - depends_on "tmux" - - def install - system "./install.sh", prefix - end - - test do - # Check options with valid combination - pipe_output("#{bin}/xpanes --dry-run -c echo", "hello", 0) - - # Check options with invalid combination (-n requires number) - pipe_output("#{bin}/xpanes --dry-run -n foo -c echo 2>&1", "hello", 4) - end -end diff --git a/Formula/tmux.rb b/Formula/tmux.rb deleted file mode 100644 index 81546a98cd35d..0000000000000 --- a/Formula/tmux.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Tmux < Formula - desc "Terminal multiplexer" - homepage "https://tmux.github.io/" - url "https://github.com/tmux/tmux/releases/download/2.8/tmux-2.8.tar.gz" - sha256 "7f6bf335634fafecff878d78de389562ea7f73a7367f268b66d37ea13617a2ba" - - bottle do - sha256 "1853b704405374f88dcb00ef4c82c18efbcbac2ce855de681bd7017c3b5e6b36" => :mojave - sha256 "b50d0ac39ae8219d84b9fba7ae5f0422143d8a7a9575b9193d7604dc1b3a85f0" => :high_sierra - sha256 "d4b259196136dfb9fe4cf68a348d68edc58ac2b6d0954fe60c6694b053826cd3" => :sierra - end - - head do - url "https://github.com/tmux/tmux.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "utf8proc" => :optional - - resource "completion" do - url "https://raw.githubusercontent.com/imomaliev/tmux-bash-completion/homebrew_1.0.0/completions/tmux" - sha256 "05e79fc1ecb27637dc9d6a52c315b8f207cf010cdcee9928805525076c9020ae" - end - - def install - system "sh", "autogen.sh" if build.head? - - args = %W[ - --disable-Dependency-tracking - --prefix=#{prefix} - --sysconfdir=#{etc} - ] - - args << "--enable-utf8proc" if build.with?("utf8proc") - - ENV.append "LDFLAGS", "-lresolv" - system "./configure", *args - - system "make", "install" - - pkgshare.install "example_tmux.conf" - bash_completion.install resource("completion") - end - - def caveats; <<~EOS - Example configuration has been installed to: - #{opt_pkgshare} - EOS - end - - test do - system "#{bin}/tmux", "-V" - end -end diff --git a/Formula/tmuxinator-completion.rb b/Formula/tmuxinator-completion.rb deleted file mode 100644 index 41766537a549e..0000000000000 --- a/Formula/tmuxinator-completion.rb +++ /dev/null @@ -1,20 +0,0 @@ -class TmuxinatorCompletion < Formula - desc "Shell completion for Tmuxinator" - homepage "https://github.com/tmuxinator/tmuxinator" - url "https://github.com/tmuxinator/tmuxinator/archive/v0.15.0.tar.gz" - sha256 "e5c121126aebe3afc758c0561b8ef05508712a799d3821453063b87445806ed4" - head "https://github.com/tmuxinator/tmuxinator.git" - - bottle :unneeded - - def install - bash_completion.install "completion/tmuxinator.bash" => "tmuxinator" - zsh_completion.install "completion/tmuxinator.zsh" => "_tmuxinator" - fish_completion.install Dir["completion/*.fish"] - end - - test do - assert_match "-F _tmuxinator", - shell_output("source #{bash_completion}/tmuxinator && complete -p tmuxinator") - end -end diff --git a/Formula/tn5250.rb b/Formula/tn5250.rb deleted file mode 100644 index 5f982820fe9fe..0000000000000 --- a/Formula/tn5250.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Tn5250 < Formula - desc "5250 terminal and printer emulator" - homepage "https://tn5250.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tn5250/tn5250/0.17.4/tn5250-0.17.4.tar.gz" - sha256 "354237d400dc46af887cb3ffa4ed1f2c371f5b8bee8be046a683a4ac9db4f9c5" - revision 1 - - bottle do - sha256 "879e6a667127db850dc7cf94959bfbe1f1accb5b70c8c70b8d8418566ed34b6e" => :mojave - sha256 "57cf521a088585c906d03536052352540749f01dd2325f1b39a5416b187e9f64" => :high_sierra - sha256 "677c563daec583859a4ad6ffd0c57d2a2b74e1cc42d6b380fc2f8ac18a3abcec" => :sierra - sha256 "3d799f665866c2fa21ca2712682178ba64cdb2b5bf0ad77705de6ec869c529c7" => :el_capitan - sha256 "e7c01e8c5c3e732c9f36e7480f788a2ca7387ada7d74daaccb06d48b7fafdac4" => :yosemite - sha256 "992b0e0f6fdedf1030a0326936fc7533a013639385d39a590d6b68a8728844dd" => :mavericks - end - - depends_on "openssl" - - # Fix segfault; reported here: - # https://archive.midrange.com/linux5250/201207/msg00000.html - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end - -__END__ -diff --git a/curses/cursesterm.c b/curses/cursesterm.c -index bf20f05..b9c394c 100644 ---- a/curses/cursesterm.c -+++ b/curses/cursesterm.c -@@ -22,6 +22,9 @@ - #define _TN5250_TERMINAL_PRIVATE_DEFINED - #include "tn5250-private.h" - #include "cursesterm.h" -+#ifdef __APPLE__ -+#include -+#endif - - #ifdef USE_CURSES - -diff --git a/curses/tn5250.c b/curses/tn5250.c -index 30a1627..67392b1 100644 ---- a/curses/tn5250.c -+++ b/curses/tn5250.c -@@ -19,6 +19,7 @@ - */ - - #include "tn5250-private.h" -+#include "cursesterm.h" - - Tn5250Session *sess = NULL; - Tn5250Stream *stream = NULL; diff --git a/Formula/tnef.rb b/Formula/tnef.rb deleted file mode 100644 index 418369d815309..0000000000000 --- a/Formula/tnef.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tnef < Formula - desc "Microsoft MS-TNEF attachment unpacker" - homepage "https://github.com/verdammelt/tnef" - url "https://github.com/verdammelt/tnef/archive/1.4.17.tar.gz" - sha256 "1dd87ebc0ff32c60ce2bc87362b880dc885525051bf3da55e11492565831c6da" - - bottle do - cellar :any_skip_relocation - sha256 "5ba739818e3a1d567b41b55d7f91b0cba091d72cae8163c81a4ce28580b362a8" => :mojave - sha256 "15020412f544e13024591117403ff6db1abe840a225d567c755c1f88652fc84d" => :high_sierra - sha256 "f7364607dc960c4b18ff4643cbbb5ebb89a591c36d71a6c2344ab99b725a6f27" => :sierra - sha256 "ab8d466c0d78822062f8b5a347cc0f5897e02b7c2754bf18613bad85c911c52b" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-i" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/tnef", "--version" - end -end diff --git a/Formula/tnftp.rb b/Formula/tnftp.rb deleted file mode 100644 index 914eb64ec8ec4..0000000000000 --- a/Formula/tnftp.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Tnftp < Formula - desc "NetBSD's FTP client (built from macOS Sierra sources)" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/lukemftp/lukemftp-16.tar.gz" - version "20070806" - sha256 "ba35a8e3c2e524e5772e729f592ac0978f9027da2433753736e1eb1f1351ae9d" - - bottle do - cellar :any_skip_relocation - sha256 "286b8f6bfb0217e88c81305e28eb32aaa78c3d0528518372191c8364c080f351" => :mojave - sha256 "d10b32070661a883375a361016f73c3be47f9702be5fa902ca491d3f12ed8022" => :high_sierra - sha256 "8aca7a23ac918f7a69b13df67452420fb711e320cc57743cefd15134516da1ab" => :sierra - sha256 "fdaf7c1ab1fcb48226a9846452b352e4da302ac6aca61a74a67f97b8bb21c942" => :el_capitan - end - - depends_on :xcode => :build - - conflicts_with "inetutils", :because => "both install `ftp' binaries" - - def install - # Trying to use Apple's pre-supplied Makefile resulted - # in headaches... they have made the build process - # specifically for installing to /usr/bin and so it - # just doesn't play well with homebrew. - - # so just build straight from ftp's own sources - # from the extracted 20070806 tarball which have - # already been patched - cd "tnftp" do - system "./configure" - system "make", "all" - system "strip", "-x", "src/ftp" # this is done in Apple's `post-install` target - - bin.install "src/ftp" - man1.install "src/ftp.1" - prefix.install_metafiles - end - end - - test do - require "pty" - require "expect" - - PTY.spawn "#{bin}/ftp ftp://anonymous:none@speedtest.tele2.net" do |input, output, _pid| - str = input.expect(/Connected to speedtest.tele2.net./) - output.puts "exit" - assert_match "Connected to speedtest.tele2.net.", str[0] - end - end -end diff --git a/Formula/tnftpd.rb b/Formula/tnftpd.rb deleted file mode 100644 index 90c2b6a6e7799..0000000000000 --- a/Formula/tnftpd.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Tnftpd < Formula - desc "NetBSD's FTP server (built from macOS Sierra sources)" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/lukemftpd/lukemftpd-51.tar.gz" - version "20100324" - sha256 "969b8a35fabcc82759da2433973b9606b7b62f73527e76ac8f18d0a19f473c2a" - - bottle do - sha256 "ce27ec83c1e3000355b624f25f8f0f6efbc14bda6436374c74c0ddeb2d67902b" => :mojave - sha256 "ee9f7bc91071b5a4c625621593b78cf34cc01ee06b828c942afc6aa30cbee5ff" => :high_sierra - sha256 "64d040373d1378a529947ad70460044013716d0e9fb0cbd2b5c81475caead3c7" => :sierra - sha256 "4ef4b7c1a35307c4a3e6b70dad1ba193aceda75920da79b0a2bd135446863d5e" => :el_capitan - end - - depends_on :xcode => :build - - def install - system "tar", "zxvf", "tnftpd-20100324.tar.gz" - - cd "tnftpd-20100324" do - system "./configure" - system "make" - - sbin.install "src/tnftpd" => "ftpd" - man8.install "src/tnftpd.man" => "ftpd.8" - man5.install "src/ftpusers.man" => "ftpusers.5" - man5.install "src/ftpd.conf.man" => "ftpd.conf.5" - etc.install "examples/ftpd.conf" - etc.install "examples/ftpusers" - prefix.install_metafiles - end - end - - def caveats - <<~EOS - You may need super-user privileges to run this program properly. See the man - page for more details. - EOS - end - - test do - # running a whole server, connecting, and so forth is a bit clunky and hard - # to write properly so... - require "pty" - require "expect" - - PTY.spawn "#{sbin}/ftpd -x" do |input, _output, _pid| - str = input.expect(/ftpd: illegal option -- x/) - assert_match "ftpd: illegal option -- x", str[0] - end - end -end diff --git a/Formula/tnote.rb b/Formula/tnote.rb deleted file mode 100644 index 1eb2a294b1852..0000000000000 --- a/Formula/tnote.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tnote < Formula - desc "Small note-taking program for the terminal" - homepage "https://tnote.sourceforge.io/" - url "https://downloads.sourceforge.net/project/tnote/tnote/tnote-0.2.1/tnote-0.2.1.tar.gz" - sha256 "451e0e352cb279725c5e12ad1c1377be63c7113f3fe568fb6213ede478ba6a87" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "54026c946cb475ed1e08617e78307d8f71afaf000fa8d9a92e75a21717694580" => :mojave - sha256 "cba19ccd15645c46e579818a294817efe9a80421ae8768572406bf24b26912a2" => :high_sierra - sha256 "cba19ccd15645c46e579818a294817efe9a80421ae8768572406bf24b26912a2" => :sierra - end - - depends_on "python@2" # does not support Python 3 - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - man1.install Dir[libexec/"share/man/man1/*"] - end - - test do - ENV["EDITOR"] = "/bin/cat" - system bin/"tnote", "--nocol", "-a", "test" - end -end diff --git a/Formula/todo-txt.rb b/Formula/todo-txt.rb deleted file mode 100644 index 6e49d4db0a154..0000000000000 --- a/Formula/todo-txt.rb +++ /dev/null @@ -1,28 +0,0 @@ -class TodoTxt < Formula - desc "Minimal, todo.txt-focused editor" - homepage "http://todotxt.org/" - url "https://github.com/todotxt/todo.txt-cli/releases/download/v2.11.0/todo.txt_cli-2.11.0.tar.gz" - sha256 "5fe723bea3e3a1e697484cba92b46e90f13150ee1a444c4a9408c2cd28ea5255" - head "https://github.com/todotxt/todo.txt-cli.git" - - bottle :unneeded - - def install - bin.install "todo.sh" - prefix.install "todo.cfg" # Default config file - bash_completion.install "todo_completion" - end - - def caveats; <<~EOS - To configure, copy the default config to your HOME and edit it: - cp #{prefix}/todo.cfg ~/.todo.cfg - EOS - end - - test do - cp prefix/"todo.cfg", testpath/".todo.cfg" - inreplace testpath/".todo.cfg", "export TODO_DIR=$(dirname \"$0\")", "export TODO_DIR=#{testpath}" - system bin/"todo.sh", "add", "Hello World!" - system bin/"todo.sh", "list" - end -end diff --git a/Formula/todolist.rb b/Formula/todolist.rb deleted file mode 100644 index 27c171c414aa2..0000000000000 --- a/Formula/todolist.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Todolist < Formula - desc "Very fast, simple task manager for the command-line, based upon GTD" - homepage "http://todolist.site" - url "https://github.com/gammons/todolist/archive/v0.8.1.tar.gz" - sha256 "b3eaf0a06ef212396b6b45990cf8d6a8451341b6e48d9be577bb7e457a6b4edd" - - bottle do - cellar :any_skip_relocation - sha256 "aa40fd0ed74a2a449935ec063459691f82fc1855e8fe2b24a1cb220a9a434baf" => :mojave - sha256 "914d32b92a0fa0421856f0068a36f4d4b87769ec7919f05c110b124457372319" => :high_sierra - sha256 "b3068ed4422f44173357d953a2dcc469f89f45808d7517c709558dbf26fda12f" => :sierra - sha256 "519e69368b87773607ef70616bdf4fbd250c715f1c16bcce00e134784dd7fe24" => :el_capitan - end - - depends_on "go" => :build - depends_on "govendor" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/gammons/").mkpath - ln_s buildpath, buildpath/"src/github.com/gammons/todolist" - system "go", "build", "-o", bin/"todolist", "./src/github.com/gammons/todolist" - end - - test do - system bin/"todolist", "init" - assert_predicate testpath/".todos.json", :exist? - add_task = shell_output("#{bin}/todolist add learn the Tango") - assert_match /Todo.* added/, add_task - end -end diff --git a/Formula/todoman.rb b/Formula/todoman.rb deleted file mode 100644 index ee19df9fee687..0000000000000 --- a/Formula/todoman.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Todoman < Formula - include Language::Python::Virtualenv - - desc "Simple CalDAV-based todo manager" - homepage "https://todoman.readthedocs.io/" - url "https://files.pythonhosted.org/packages/bb/49/25511ca1f2762eda6cd95ccf1bd62c9ca5009469445b9263064a5ffbff78/todoman-3.4.0.tar.gz" - sha256 "dc01585fda6ee492ee41b6db676c365f9c118af6fcda9e97ce517c9e9b0b8424" - revision 1 - head "https://github.com/pimutils/todoman.git" - - bottle do - cellar :any_skip_relocation - sha256 "eba6abcf64c816d21c8a3932acfeca64baa2e073bb0464a60fdfa12eb65f82fd" => :mojave - sha256 "8a5816f83a8e50dd7b483fd82ad3c47d7db3e3803446e424d176a08f352af5a8" => :high_sierra - sha256 "ecb46e5e65f8c5e60fe1f7bbdc6469dafc492be8f8cc6c6677786a83584c6045" => :sierra - sha256 "f93a19ad26c8d3bc910680cf002e632243b1f0936185aed725c81107690761e7" => :el_capitan - end - - depends_on "python" - - conflicts_with "devtodo", :because => "both install a `todo` binary" - - resource "atomicwrites" do - url "https://files.pythonhosted.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz" - sha256 "240831ea22da9ab882b551b31d4225591e5e447a68c5e188db5b89ca1d487585" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "click-log" do - url "https://files.pythonhosted.org/packages/31/b7/95ad377ec87570d2e80f90e8ffe574a3d907a97c2b6613a17b6f81e0dda5/click-log-0.2.1.tar.gz" - sha256 "493af4fde9999fa3a15696a1c3c7ace394296542a035caaf5854b32140413de4" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "humanize" do - url "https://files.pythonhosted.org/packages/8c/e0/e512e4ac6d091fc990bbe13f9e0378f34cf6eecd1c6c268c9e598dcf5bb9/humanize-0.5.1.tar.gz" - sha256 "a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19" - end - - resource "icalendar" do - url "https://files.pythonhosted.org/packages/aa/58/d9fb6d9dc8919e32c175a56a25a296c7ca9d5f4075e52647126d40dcf6c6/icalendar-4.0.1.tar.gz" - sha256 "682a42023d3d43a3a83933b4e329d109aabb07c9e11cb94a4d83ca687c3a3e8d" - end - - resource "parsedatetime" do - url "https://files.pythonhosted.org/packages/e3/b3/02385db13f1f25f04ad7895f35e9fe3960a4b9d53112775a6f7d63f264b6/parsedatetime-2.4.tar.gz" - sha256 "3d817c58fb9570d1eec1dd46fa9448cd644eeed4fb612684b02dfda3a79cb84b" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/10/76/52efda4ef98e7544321fd8d5d512e11739c1df18b0649551aeccfb1c8376/pytz-2018.4.tar.gz" - sha256 "c06425302f2cf668f1bba7a0a03f3c1d34d4ebeef2c72003da308b3947c7f749" - end - - resource "pyxdg" do - url "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz" - sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz" - sha256 "e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - (testpath/".config/todoman/todoman.conf").write <<~EOS - [main] - path = #{testpath}/.calendar/* - date_format = %Y-%m-%d - default_list = Personal - EOS - (testpath/".calendar/Personal").mkpath - system "#{bin}/todo", "new", "newtodo" - assert_match "newtodo", shell_output("#{bin}/todo list") - end -end diff --git a/Formula/tofrodos.rb b/Formula/tofrodos.rb deleted file mode 100644 index 8465b54312a23..0000000000000 --- a/Formula/tofrodos.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Tofrodos < Formula - desc "Converts DOS <-> UNIX text files, alias tofromdos" - homepage "https://www.thefreecountry.com/tofrodos/" - url "https://tofrodos.sourceforge.io/download/tofrodos-1.7.13.tar.gz" - sha256 "3457f6f3e47dd8c6704049cef81cb0c5a35cc32df9fe800b5fbb470804f0885f" - - bottle do - cellar :any_skip_relocation - sha256 "07d0fcc1ef5c69866787c61fc3cabafe08f873c111c22974758f1c4beae41f99" => :mojave - sha256 "083975a39eaa51713f2eda153276ac95d8dfc1f038d25c4826be1ddcd540855b" => :high_sierra - sha256 "3d5363cda2170ce2fbcb7e03c84f715b62ead1e5646000dd06395f5677fd2269" => :sierra - sha256 "4a2b22ff08d0fb65c80be7359be2f04d12b70f4e6d490b96cb819ea69b3e3d88" => :el_capitan - sha256 "4a5427c6870c3d4822ef4da3ddd8d79c18b91e5b7f14edb4aa449a53da70114e" => :yosemite - sha256 "c9759ec570e6a284b250563b8d66076401641f40c1836e293f4eab82cc9fe4ff" => :mavericks - end - - def install - cd "src" do - system "make" - bin.install %w[todos fromdos] - man1.install "fromdos.1" - man1.install_symlink "fromdos.1" => "todos.1" - end - end -end diff --git a/Formula/toilet.rb b/Formula/toilet.rb deleted file mode 100644 index 78ea7241bdaa8..0000000000000 --- a/Formula/toilet.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Toilet < Formula - desc "Color-based alternative to figlet (uses libcaca)" - homepage "http://caca.zoy.org/wiki/toilet" - url "http://caca.zoy.org/raw-attachment/wiki/toilet/toilet-0.3.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/t/toilet/toilet_0.3.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/toilet/toilet_0.3.orig.tar.gz" - sha256 "89d4b530c394313cc3f3a4e07a7394fa82a6091f44df44dfcd0ebcb3300a81de" - - bottle do - sha256 "27c9e1fe38ec012c5dd9199c8100d49c56e386c65c336a4fbcaaa25a9341cab2" => :mojave - sha256 "dda87a313d7398dd3157ca74d752b3d364647fc56c3238fb5bd320fcc904ebd5" => :high_sierra - sha256 "24008d251358aa73e7e597b203e360857fec5b88278e6ea6de08d4eef3865f80" => :sierra - sha256 "93822fde3d2e69f46143dcb9d8551e7e4301c7a470ae53b3fda8ec6cb44584dd" => :el_capitan - sha256 "7362333eea743740a9cdb064c5a74829e37b3f15645797622bb283b9cf3f3b1a" => :yosemite - sha256 "ef2c34f742b366f84d2aeeb6d83fb94d6bd443f210e56968fb8b2b5700eab759" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libcaca" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/toilet", "--version" - end -end diff --git a/Formula/tokei.rb b/Formula/tokei.rb deleted file mode 100644 index 23726f010d490..0000000000000 --- a/Formula/tokei.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Tokei < Formula - desc "Program that allows you to count code, quickly" - homepage "https://github.com/Aaronepower/tokei" - url "https://github.com/Aaronepower/tokei/archive/v8.0.1.tar.gz" - sha256 "9d365695e3c790747d982bf0dc598f2a65b7e51b90fa98d4f34dfef72a019e13" - - bottle do - sha256 "137ef240f73c02dac90354234b438cd3f5c2f9c1cf5075a391c8cc288bdd840b" => :mojave - sha256 "e06badc2722ed6c96e6d64030d12e08651f6ad4d882ac2c249d62d56ad22ed85" => :high_sierra - sha256 "d7ad074a5d5eb1681f7980be1baa41e97127d3d538d482337c8ad8860657f9b9" => :sierra - sha256 "de37219e09df50f8545e0cd7d478373a1c1b1a171a1706868980e1e330b456af" => :el_capitan - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", ".", - "--features", "all" - end - - test do - (testpath/"lib.rs").write <<~EOS - #[cfg(test)] - mod tests { - #[test] - fn test() { - println!("It works!"); - } - } - EOS - system bin/"tokei", "lib.rs" - end -end diff --git a/Formula/tokyo-cabinet.rb b/Formula/tokyo-cabinet.rb deleted file mode 100644 index c5417a617b0b2..0000000000000 --- a/Formula/tokyo-cabinet.rb +++ /dev/null @@ -1,23 +0,0 @@ -class TokyoCabinet < Formula - desc "Lightweight database library" - homepage "https://fallabs.com/tokyocabinet/" - url "https://fallabs.com/tokyocabinet/tokyocabinet-1.4.48.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/t/tokyocabinet/tokyocabinet_1.4.48.orig.tar.gz" - sha256 "a003f47c39a91e22d76bc4fe68b9b3de0f38851b160bbb1ca07a4f6441de1f90" - - bottle do - rebuild 1 - sha256 "dd723c7394954fe354044bbd6bbea955e985c4652f0d2e7e9a7696da87d7a3aa" => :mojave - sha256 "6470326d4c4d4d9a459407ec73a6ea6a2d6d2d459fb547467584dcf4e777aea8" => :high_sierra - sha256 "9ace00b3ee94dbd63c427910c5aff77935f04bb884047061c792d6e90836a380" => :sierra - sha256 "a209fa62fdb84a86784de5eb9699a9a6811c962afab2ebf418b2a712f51852d8" => :el_capitan - sha256 "3267823914e250aff7c8d3a5a686a010f0fc96242a417dbf47bb1502aa020ad6" => :yosemite - sha256 "8d8e93ed60945cfb729395882e69d3924d899c8f792eab73a6094aa78b47c75c" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/tokyo-dystopia.rb b/Formula/tokyo-dystopia.rb deleted file mode 100644 index 7904de377ec17..0000000000000 --- a/Formula/tokyo-dystopia.rb +++ /dev/null @@ -1,38 +0,0 @@ -class TokyoDystopia < Formula - desc "Lightweight full-text search system" - homepage "https://fallabs.com/tokyodystopia/" - url "https://fallabs.com/tokyodystopia/tokyodystopia-0.9.15.tar.gz" - sha256 "28b43c592a127d1c9168eac98f680aa49d1137b4c14b8d078389bbad1a81830a" - - bottle do - cellar :any - sha256 "056aa0bfed85351c6296b0749dfa15a2e9471ef554796f726708438e312b5790" => :mojave - sha256 "3f00b619720603bd0712b52d01a355124604637c44cab5a3132fda942f195e2c" => :high_sierra - sha256 "0a7da80cf5e8892112986d9a51e8cd3804da2a7436b8a03b472f561b06c35890" => :sierra - sha256 "2a9e21b6f57781adb9e3dc673f2e466b817d4a00860b45fa49ded534d4cb0ed4" => :el_capitan - sha256 "6fa4ed94aace1e4c3b2a9962f31055883325255f8175c63aa08f079a4974eb6e" => :yosemite - sha256 "231960b2f9d41cc1ee48a66812b1f0fa5977613e39ddd1a62c22a46e21b3feaf" => :mavericks - sha256 "a79ed3369dae255bff5344e0aa38039f65a8a25d9ef9f86c0068d49c3a4de009" => :mountain_lion - end - - depends_on "tokyo-cabinet" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.tsv").write <<~EOS - 1\tUnited States - 55\tBrazil - 81\tJapan - EOS - - system "#{bin}/dystmgr", "importtsv", "casket", "test.tsv" - system "#{bin}/dystmgr", "put", "casket", "83", "China" - system "#{bin}/dystmgr", "list", "-pv", "casket" - end -end diff --git a/Formula/tomcat-native.rb b/Formula/tomcat-native.rb deleted file mode 100644 index 9b6de07e74818..0000000000000 --- a/Formula/tomcat-native.rb +++ /dev/null @@ -1,49 +0,0 @@ -class TomcatNative < Formula - desc "Lets Tomcat use some native resources for performance" - homepage "https://tomcat.apache.org/native-doc/" - url "https://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-connectors/native/1.2.19/source/tomcat-native-1.2.19-src.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.2.19/source/tomcat-native-1.2.19-src.tar.gz" - sha256 "95c91d17907b321f3abe8799bd73bf32b544dd12ff59bcb3eb7db584bbf65f63" - - bottle do - cellar :any - rebuild 1 - sha256 "f33bee57406b4046e6b8ab8c4d214c7c2c03edeb797440570646e4c4bd1c2346" => :mojave - sha256 "ad856715f0f03622f10df6b090069d5ea2dd7472056133d00b4c74bf6be62ea2" => :high_sierra - sha256 "87c67f203543576408082aa94f9abde64372bff2bcf635610eda83e4801b2939" => :sierra - end - - depends_on "libtool" => :build - depends_on "apr" - depends_on :java => "1.7+" - depends_on "openssl" - depends_on "tomcat" - - def install - cd "native" do - system "./configure", "--prefix=#{prefix}", - "--with-apr=#{Formula["apr"].opt_prefix}", - "--with-java-home=#{ENV["JAVA_HOME"]}", - "--with-ssl=#{Formula["openssl"].opt_prefix}" - - # fixes occasional compiling issue: glibtool: compile: specify a tag with `--tag' - args = ["LIBTOOL=glibtool --tag=CC"] - # fixes a broken link in mountain lion's apr-1-config (it should be /XcodeDefault.xctoolchain/): - # usr/local/opt/libtool/bin/glibtool: line 1125: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc: No such file or directory - args << "CC=#{ENV.cc}" if MacOS.version >= :mountain_lion - system "make", *args - system "make", "install" - end - end - - def caveats; <<~EOS - In order for tomcat's APR lifecycle listener to find this library, you'll - need to add it to java.library.path. This can be done by adding this line - to $CATALINA_HOME/bin/setenv.sh - - CATALINA_OPTS=\"$CATALINA_OPTS -Djava.library.path=#{opt_lib}\" - - If $CATALINA_HOME/bin/setenv.sh doesn't exist, create it and make it executable. - EOS - end -end diff --git a/Formula/tomcat.rb b/Formula/tomcat.rb deleted file mode 100644 index 6205342b6247c..0000000000000 --- a/Formula/tomcat.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Tomcat < Formula - desc "Implementation of Java Servlet and JavaServer Pages" - homepage "https://tomcat.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=/tomcat/tomcat-9/v9.0.14/bin/apache-tomcat-9.0.14.tar.gz" - sha256 "5bdb23aaccb12c2bf087c2aa2193813c597b8f7443a614fdd78d971fb6a63c16" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/catalina.sh" => "catalina" - end - - plist_options :manual => "catalina run" - - def plist; <<~EOS - - - - - Disabled - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/catalina - run - - KeepAlive - - - - EOS - end - - test do - ENV["CATALINA_BASE"] = testpath - cp_r Dir["#{libexec}/*"], testpath - rm Dir["#{libexec}/logs/*"] - - pid = fork do - exec bin/"catalina", "start" - end - sleep 3 - begin - system bin/"catalina", "stop" - ensure - Process.wait pid - end - assert_predicate testpath/"logs/catalina.out", :exist? - end -end diff --git a/Formula/tomcat@6.rb b/Formula/tomcat@6.rb deleted file mode 100644 index ce2cb5a99b646..0000000000000 --- a/Formula/tomcat@6.rb +++ /dev/null @@ -1,46 +0,0 @@ -class TomcatAT6 < Formula - desc "Implementation of Java Servlet and JavaServer Pages" - homepage "https://tomcat.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-6/v6.0.53/bin/apache-tomcat-6.0.53.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.53/bin/apache-tomcat-6.0.53.tar.gz" - sha256 "35249a4b40f41fb5f602f5602142d59faaa96dc1567df807d108d4d2b942e2f0" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java - - def install - rm_rf Dir["bin/*.{cmd,bat]}"] - libexec.install Dir["*"] - (libexec+"logs").mkpath - bin.mkpath - Dir["#{libexec}/bin/*.sh"].each { |f| ln_s f, bin } - end - - def caveats; <<~EOS - Some of the support scripts used by Tomcat have very generic names. - These are likely to conflict with support scripts used by other Java-based - server software. - You can add #{bin} to your PATH instead. - EOS - end - - test do - ENV["CATALINA_BASE"] = testpath - cp_r Dir["#{libexec}/*"], testpath - rm Dir["#{libexec}/logs/*"] - - pid = fork do - exec bin/"catalina.sh", "start" - end - sleep 3 - begin - system bin/"catalina.sh", "stop" - ensure - Process.wait pid - end - assert_predicate testpath/"logs/catalina.out", :exist? - end -end diff --git a/Formula/tomcat@7.rb b/Formula/tomcat@7.rb deleted file mode 100644 index c958f15c9d334..0000000000000 --- a/Formula/tomcat@7.rb +++ /dev/null @@ -1,43 +0,0 @@ -class TomcatAT7 < Formula - desc "Implementation of Java Servlet and JavaServer Pages" - homepage "https://tomcat.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92.tar.gz" - sha256 "d3fe8a26f52241203282d1bacd739880c72fffbd21fab7a74834b7125c2d0148" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java - - # Keep log folders - skip_clean "libexec" - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/catalina.sh" => "catalina" - end - - test do - ENV["CATALINA_BASE"] = testpath - cp_r Dir["#{libexec}/*"], testpath - rm Dir["#{libexec}/logs/*"] - - pid = fork do - exec bin/"catalina", "start" - end - sleep 3 - begin - system bin/"catalina", "stop" - ensure - Process.wait pid - end - assert_predicate testpath/"logs/catalina.out", :exist? - end -end diff --git a/Formula/tomcat@8.rb b/Formula/tomcat@8.rb deleted file mode 100644 index e30af710ccb22..0000000000000 --- a/Formula/tomcat@8.rb +++ /dev/null @@ -1,63 +0,0 @@ -class TomcatAT8 < Formula - desc "Implementation of Java Servlet and JavaServer Pages" - homepage "https://tomcat.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz" - sha256 "b636fa3a662bbf556774368da62dd620fa5bf0da2045785d274d1766bfb32bb1" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on :java => "1.7+" - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/catalina.sh" => "catalina" - end - - plist_options :manual => "catalina run" - - def plist; <<~EOS - - - - - Disabled - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/catalina - run - - KeepAlive - - - - EOS - end - - test do - ENV["CATALINA_BASE"] = testpath - cp_r Dir["#{libexec}/*"], testpath - rm Dir["#{libexec}/logs/*"] - - pid = fork do - exec bin/"catalina", "start" - end - sleep 3 - begin - system bin/"catalina", "stop" - ensure - Process.wait pid - end - assert_predicate testpath/"logs/catalina.out", :exist? - end -end diff --git a/Formula/tomee-jax-rs.rb b/Formula/tomee-jax-rs.rb deleted file mode 100644 index ed8121193cec7..0000000000000 --- a/Formula/tomee-jax-rs.rb +++ /dev/null @@ -1,32 +0,0 @@ -class TomeeJaxRs < Formula - desc "TomeEE Web Profile plus JAX-RS" - homepage "https://tomee.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomee/tomee-1.7.4/apache-tomee-1.7.4-jaxrs.tar.gz" - sha256 "35f56e5f79dfa3ebfe220c2c45b280b204dcd265c4e905b994669391f4672e71" - - bottle :unneeded - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - rm_rf Dir["bin/*.bat.original"] - rm_rf Dir["bin/*.exe"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/startup.sh" => "tomee-jax-rs-startup" - end - - def caveats; <<~EOS - The home of Apache TomEE JAX-RS is: - #{opt_libexec} - To run Apache TomEE: - #{opt_libexec}/bin/tomee-jax-rs-startup - EOS - end - - test do - system "#{opt_libexec}/bin/configtest.sh" - end -end diff --git a/Formula/tomee-plume.rb b/Formula/tomee-plume.rb deleted file mode 100644 index fe23f9a00569c..0000000000000 --- a/Formula/tomee-plume.rb +++ /dev/null @@ -1,32 +0,0 @@ -class TomeePlume < Formula - desc "Apache TomEE Plume" - homepage "https://tomee.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomee/tomee-1.7.4/apache-tomee-1.7.4-plume.tar.gz" - sha256 "0f37dbe25c3a68a365f440cfaac01e63158e6ccce943f367203418038b5be402" - - bottle :unneeded - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - rm_rf Dir["bin/*.bat.original"] - rm_rf Dir["bin/*.exe"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/startup.sh" => "tomee-plume-startup" - end - - def caveats; <<~EOS - The home of Apache TomEE Plume is: - #{opt_libexec} - To run Apache TomEE: - #{opt_libexec}/bin/tomee-plume-startup - EOS - end - - test do - system "#{opt_libexec}/bin/configtest.sh" - end -end diff --git a/Formula/tomee-plus.rb b/Formula/tomee-plus.rb deleted file mode 100644 index 694c6a1c3d671..0000000000000 --- a/Formula/tomee-plus.rb +++ /dev/null @@ -1,32 +0,0 @@ -class TomeePlus < Formula - desc "Everything in TomEE Web Profile and JAX-RS, plus more" - homepage "https://tomee.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomee/tomee-1.7.4/apache-tomee-1.7.4-plus.tar.gz" - sha256 "be43806d65bde4fdd393e0d78f91f910f9bf2e468425738d817afe0fefaffbc3" - - bottle :unneeded - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - rm_rf Dir["bin/*.bat.original"] - rm_rf Dir["bin/*.exe"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - bin.install_symlink "#{libexec}/bin/startup.sh" => "tomee-plus-startup" - end - - def caveats; <<~EOS - The home of Apache TomEE Plus is: - #{opt_libexec} - To run Apache TomEE: - #{opt_libexec}/bin/tomee-plus-startup - EOS - end - - test do - system "#{opt_libexec}/bin/configtest.sh" - end -end diff --git a/Formula/tomee-webprofile.rb b/Formula/tomee-webprofile.rb deleted file mode 100644 index 4ca335a638225..0000000000000 --- a/Formula/tomee-webprofile.rb +++ /dev/null @@ -1,38 +0,0 @@ -class TomeeWebprofile < Formula - desc "All-Apache Java EE 6 Web Profile stack" - homepage "https://tomee.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=tomee/tomee-1.7.5/apache-tomee-1.7.5-webprofile.tar.gz" - sha256 "e68a76dcd8ced3ef9bfc5f065b710372cc91653dc7e1bda8e101199a87f5047d" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - rm_rf Dir["bin/*.bat.original"] - rm_rf Dir["bin/*.exe"] - - # Install files - prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] - libexec.install Dir["*"] - libexec.install_symlink "#{libexec}/bin/startup.sh" => "tomee-webprofile-startup" - env = Language::Java.java_home_env("1.8") - env[:JRE_HOME] = "$(#{Language::Java.java_home_cmd("1.8")})" - (bin/"tomee-webprofile-startup").write_env_script libexec/"tomee-webprofile-startup", env - (bin/"tomee-webprofile-configtest").write_env_script libexec/"bin/configtest.sh", env - end - - def caveats; <<~EOS - The home of Apache TomEE Web is: - #{opt_libexec} - To run Apache TomEE: - #{opt_libexec}/bin/tomee-webprofile-startup - EOS - end - - test do - system "#{bin}/tomee-webprofile-configtest" - end -end diff --git a/Formula/topgit.rb b/Formula/topgit.rb deleted file mode 100644 index ae7fc4963d14e..0000000000000 --- a/Formula/topgit.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Topgit < Formula - desc "Git patch queue manager" - homepage "https://github.com/greenrd/topgit" - url "https://github.com/greenrd/topgit/archive/topgit-0.9.tar.gz" - sha256 "24b55f666e8d88ebf092a1df365492a659210a750c0793acb0c8560694203dfd" - - bottle do - cellar :any_skip_relocation - sha256 "a33a1cd27a30392535a263631bf395b818abeb887a059ff1bb58bdf45ad4580b" => :mojave - sha256 "bf554bc1d3a6afc87245deebbff89577c8e86e664681333956124da696b54629" => :high_sierra - sha256 "5c1167b5d2f75b7b09d4b43ece472e2ae541d50ef2202afe08c14dbd8368ba06" => :sierra - sha256 "a70a472becf5cdf957519831ff3365a7113b35c4d962f4159d23d89f7e5acc47" => :el_capitan - sha256 "6ace8c6f3df714648de5cfc30ccb2066e589d9038fbf67796eeb4b76c7426989" => :yosemite - sha256 "d682d50b1fda7c88b519153806d17886a46ef70840fc00d37a42e5b942ed50e7" => :mavericks - end - - def install - system "make", "install", "prefix=#{prefix}" - end -end diff --git a/Formula/topgrade.rb b/Formula/topgrade.rb deleted file mode 100644 index c462a5da4eb9e..0000000000000 --- a/Formula/topgrade.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Topgrade < Formula - desc "Upgrade all the things" - homepage "https://github.com/r-darwish/topgrade" - url "https://github.com/r-darwish/topgrade/archive/v1.4.0.tar.gz" - sha256 "c73f2b4c9e3bcbe8e0eb16cc5ea80af4678616ecd1c90535575ea54eb66bf43f" - - bottle do - cellar :any_skip_relocation - sha256 "46a0142c7c50ca1a66278c2273b7146bf3256bf49c27f35ebad5cd82fe3494f1" => :mojave - sha256 "15735e275ec3da0b6c7ecb637dbfc20623ec8b9e35999cf83ce86e72bb62f133" => :high_sierra - sha256 "a971770d8af0c12ce5a53a34cb707520a9226af356ccfe17bf3854a5ccc2d3c3" => :sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - output = shell_output("#{bin}/topgrade -n") - assert_match "Dry running: #{HOMEBREW_PREFIX}/bin/brew upgrade", output - assert_not_match /\sSelf update\s/, output - end -end diff --git a/Formula/tor.rb b/Formula/tor.rb deleted file mode 100644 index 6dc4c7daeba68..0000000000000 --- a/Formula/tor.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Tor < Formula - desc "Anonymizing overlay network for TCP" - homepage "https://www.torproject.org/" - url "https://www.torproject.org/dist/tor-0.3.5.7.tar.gz" - mirror "https://www.torservers.net/mirrors/torproject.org/dist/tor-0.3.5.7.tar.gz" - sha256 "1b0887fc21ac535befea7243c5d5f1e31394d7458d64b30807a3e98cca0d839e" - - bottle do - sha256 "1d66f0083cd6e556ffbb7e1d7a5fc6fb042e3f02e458c2e9f5010f3588ff8236" => :mojave - sha256 "c3b5e77347110bf566e120126d2d589addc1fb68b33270a6a73d55bd50a6f329" => :high_sierra - sha256 "b297ace424d40176cf2191e45c728aa5594a29faeb93e3f5506fe528314e3b15" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl" - depends_on "libscrypt" => :optional - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --sysconfdir=#{etc} - --localstatedir=#{var} - --with-openssl-dir=#{Formula["openssl"].opt_prefix} - ] - - args << "--disable-libscrypt" if build.without? "libscrypt" - - system "./configure", *args - system "make", "install" - end - - plist_options :manual => "tor" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/tor - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/log/tor.log - StandardOutPath - #{var}/log/tor.log - - - EOS - end - - test do - pipe_output("script -q /dev/null #{bin}/tor-gencert --create-identity-key", "passwd\npasswd\n") - assert_predicate testpath/"authority_certificate", :exist? - assert_predicate testpath/"authority_signing_key", :exist? - assert_predicate testpath/"authority_identity_key", :exist? - end -end diff --git a/Formula/torrentcheck.rb b/Formula/torrentcheck.rb deleted file mode 100644 index 9df6f89dde374..0000000000000 --- a/Formula/torrentcheck.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Torrentcheck < Formula - desc "Command-line torrent viewer and hash checker" - homepage "https://torrentcheck.sourceforge.io/" - url "https://downloads.sourceforge.net/project/torrentcheck/torrentcheck-1.00.zip" - sha256 "a839f9ac9669d942f83af33db96ce9902d84f85592c99b568ef0f5232ff318c5" - - bottle do - cellar :any_skip_relocation - sha256 "68fe4afd56987956e760e7dc7cac8db8677dd9c4aee2b844435fbc90e0da039a" => :mojave - sha256 "7d214899822d24fabad867f67d8062bb689a74e8f7975ea2209bf69aca342abe" => :high_sierra - sha256 "c1169f112306b1f235297cba2c8920894e063b9b1f774e36be75f3f2c194bda5" => :sierra - sha256 "ea6fbaa86be1c799c3baa4405aa1a750c2b3e1deb4bea0a412027d427f0922da" => :el_capitan - sha256 "46426cdf1c627f448d54895b7f08379b90948030be346753104f5f6a5fabca3b" => :yosemite - sha256 "ed300dfc8d1f7f7fe3c9c161b8f86cc6a379c7a4cca3914bb0c665d66ec6596a" => :mavericks - end - - def install - inreplace "torrentcheck.c", "#include ", "" - system ENV.cc, "torrentcheck.c", "sha1.c", "-o", "torrentcheck", *ENV.cflags.to_s.split - bin.install "torrentcheck" - end -end diff --git a/Formula/torsocks.rb b/Formula/torsocks.rb deleted file mode 100644 index 557137d483a60..0000000000000 --- a/Formula/torsocks.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Torsocks < Formula - desc "Use SOCKS-friendly applications with Tor" - homepage "https://gitweb.torproject.org/torsocks.git/" - url "https://git.torproject.org/torsocks.git", - :tag => "v2.2.0", - :revision => "e54d80bc9595beeceac637b03e5c5395c07e62f7" - head "https://git.torproject.org/torsocks.git" - - bottle do - sha256 "4d16b374c18800543dda79ec5618ba048d1b85d4d75eb229e7c584b69aaab02c" => :mojave - sha256 "8ab3874d27a0f2e343b2fe19e596ce369d571055b6aae6cbcf5cf33609731262" => :high_sierra - sha256 "aa753c8002d5dbd78aa75b5bfd284646dd724a65f4896cb3f902b1c7283fd96a" => :sierra - sha256 "3b978df65102580b8817d6d92e517ecd3a9f7086970c10af279a8d57fea60cae" => :el_capitan - sha256 "7f1fd0440c3775776bddcb55f153108d0715a3ac9ee8a6a13798d168fbd71e41" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/torsocks", "--help" - end -end diff --git a/Formula/tox.rb b/Formula/tox.rb deleted file mode 100644 index ab64ca59eb521..0000000000000 --- a/Formula/tox.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Tox < Formula - include Language::Python::Virtualenv - - desc "Generic Python virtualenv management and test command-line tool" - homepage "https://tox.readthedocs.org/" - url "https://files.pythonhosted.org/packages/14/c4/ee073df7f649e2a1977781807c0bb1fcfc691a99ee7b4a7a3cc819841458/tox-3.6.1.tar.gz" - sha256 "2a8d8a63660563e41e64e3b5b677e81ce1ffa5e2a93c2c565d3768c287445800" - - bottle do - cellar :any_skip_relocation - sha256 "86a638b3df47d21d5d92a78bf16a7467fd6dd3e485f94117fd6ace5cdcb7601f" => :mojave - sha256 "0816bb04a0dc557c895329de749d2584f3f6ed9ead0db6b34387e8d6f9f439f0" => :high_sierra - sha256 "904fd9ef383137f357e9c1b2bf1f12ec90766e232e47fa17a6c4d9acb424228e" => :sierra - end - - depends_on "python" - - resource "filelock" do - url "https://files.pythonhosted.org/packages/2a/bd/6a87635dba4906ae56377b22f64805b2f00d8cafb26e411caaf3559a5475/filelock-3.0.10.tar.gz" - sha256 "d610c1bb404daf85976d7a82eb2ada120f04671007266b708606565dd03b5be6" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/cf/50/1f10d2626df0aa97ce6b62cf6ebe14f605f4e101234f7748b8da4138a8ed/packaging-18.0.tar.gz" - sha256 "0886227f54515e592aaa2e5a553332c73962917f2831f1b0f9b9f4380a4b9807" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/65/25/81d0de17cd00f8ca994a4e74e3c4baf7cd25072c0b831dad5c7d9d6138f8/pluggy-0.8.0.tar.gz" - sha256 "447ba94990e8014ee25ec853339faf7b0fc8050cdc3289d4d71f7f410fb90095" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/c7/fa/eb6dd513d9eb13436e110aaeef9a1703437a8efa466ce6bb2ff1d9217ac7/py-1.7.0.tar.gz" - sha256 "bf92637198836372b520efcba9e020c330123be8ce527e535d185ed4b6f45694" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/d0/09/3e6a5eeb6e04467b737d55f8bba15247ac0876f98fae659e58cd744430c6/pyparsing-2.3.0.tar.gz" - sha256 "f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/b9/19/5cbd78eac8b1783671c40e34bb0fa83133a06d340a38b55c645076d40094/toml-0.10.0.tar.gz" - sha256 "229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/4e/8b/75469c270ac544265f0020aa7c4ea925c5284b23e445cf3aa8b99f662690/virtualenv-16.1.0.tar.gz" - sha256 "f899fafcd92e1150f40c8215328be38ff24b519cd95357fa6e78e006c7638208" - end - - def install - virtualenv_install_with_resources - end - - # Avoid relative paths - def post_install - lib_python_path = Pathname.glob(libexec/"lib/python*").first - lib_python_path.each_child do |f| - next unless f.symlink? - realpath = f.realpath - rm f - ln_s realpath, f - end - inreplace lib_python_path/"orig-prefix.txt", - Formula["python"].opt_prefix, Formula["python"].prefix.realpath - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - pyver = Language::Python.major_minor_version("python3").to_s.delete(".") - (testpath/"tox.ini").write <<~EOS - [tox] - envlist=py#{pyver} - skipsdist=True - - [testenv] - deps=pytest - commands=pytest - EOS - (testpath/"test_trivial.py").write <<~EOS - def test_trivial(): - assert True - EOS - assert_match "usage", shell_output("#{bin}/tox --help") - system "#{bin}/tox" - assert_predicate testpath/".tox/py#{pyver}", :exist? - end -end diff --git a/Formula/tpl.rb b/Formula/tpl.rb deleted file mode 100644 index b5bdc167d64fd..0000000000000 --- a/Formula/tpl.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Tpl < Formula - desc "Store and retrieve binary data in C" - homepage "https://troydhanson.github.io/tpl/" - url "https://github.com/troydhanson/tpl/archive/v1.6.1.tar.gz" - sha256 "0b3750bf62f56be4c42f83c89d8449b24f1c5f1605a104801d70f2f3c06fb2ff" - head "https://github.com/troydhanson/tpl.git" - - bottle do - cellar :any - sha256 "668ff54097397dbf1f934f6fc380611459c1ec0c36336d1058171d4eeb349ad7" => :mojave - sha256 "18b15a737709ac6d8ec47963fb02fba255b5e9f6c8968c126dc60bb3a0d7adee" => :high_sierra - sha256 "1d8a496506b276702c07d594e17b9c7be4f43c1a4651120b765b2015c18bbe54" => :sierra - sha256 "a887350815a2791312bdec2ecdf82795d6f54c67f9e76842236e8bb1f507108d" => :el_capitan - sha256 "2587ed48c7a6ff2c309e688695c79d845b5fe2a06eae1189dc1c9de21f9bceaa" => :yosemite - sha256 "237a01785ea7f81c9977440e6d1ede64fa109a060aa855a938a6f11f6f187d4a" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - system "make", "-C", "tests" - end -end diff --git a/Formula/tpp.rb b/Formula/tpp.rb deleted file mode 100644 index af9f62a8bbbfc..0000000000000 --- a/Formula/tpp.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Tpp < Formula - desc "Ncurses-based presentation tool" - homepage "https://synflood.at/tpp.html" - url "https://synflood.at/tpp/tpp-1.3.1.tar.gz" - sha256 "68e3de94fbfb62bd91a6d635581bcf8671a306fffe615d00294d388ad91e1b5f" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "bd92be45cec9c61438618155e9d22fe58c03b0feedbd8272a214d20edf37f16a" => :mojave - sha256 "e132735b420b285a5ffd5f6946d93a2e67f8797e07f00d2bce40f8c7989ff65a" => :high_sierra - sha256 "8736306dac4a3d2a2ed8bb4dcd1c08c77fb9026b9cde5ad07791eb90eef2392f" => :sierra - sha256 "25e92e9f229433131cc82cf48a3cec90d19a28a08a56fadcc095b1ecf4df2304" => :el_capitan - end - - resource "ncurses-ruby" do - url "https://downloads.sourceforge.net/project/ncurses-ruby.berlios/ncurses-ruby-1.3.1.tar.bz2" - sha256 "dca8ce452e989ce1399cb683184919850f2baf79e6af9d16a7eed6a9ab776ec5" - end - - def install - lib_ncurses = libexec+"ncurses-ruby" - inreplace "tpp.rb", 'require "ncurses"', <<~EOS - require File.expand_path('#{lib_ncurses}/ncurses_bin.bundle', __FILE__) - require File.expand_path('#{lib_ncurses}/ncurses_sugar.rb', __FILE__) - EOS - - bin.install "tpp.rb" => "tpp" - share.install "contrib", "examples" - man1.install "doc/tpp.1" - doc.install "README", "CHANGES", "DESIGN", "COPYING", "THANKS", "README.de" - - resource("ncurses-ruby").stage do - # Missing include leads to compilation failure with Xcode 9 - # Reported by email on 2018-03-13 - inreplace "ncurses_wrap.c", '#include "ncurses_wrap.h"', - "#include \"ncurses_wrap.h\"\n#include " - - inreplace "extconf.rb", '$CFLAGS += " -g"', - '$CFLAGS += " -g -DNCURSES_OPAQUE=0"' - system "ruby", "extconf.rb" - system "make" - lib_ncurses.install "lib/ncurses_sugar.rb", "ncurses_bin.bundle" - end - end - - test do - assert_equal "tpp - text presentation program #{version}", - shell_output("#{bin}/tpp --version", 1).chomp - end -end diff --git a/Formula/trace2html.rb b/Formula/trace2html.rb deleted file mode 100644 index e267c8b175239..0000000000000 --- a/Formula/trace2html.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Trace2html < Formula - desc "Utility from Google Trace Viewer to convert JSON traces to HTML" - homepage "https://github.com/google/trace-viewer" - url "https://github.com/google/trace-viewer/archive/2015-07-07.tar.gz" - version "2015-07-07" - sha256 "6125826d07869fbd634ef898a45df3cabf45e6bcf951f2c63e49f87ce6a0442a" - - bottle :unneeded - - depends_on "python@2" - - def install - libexec.install Dir["*"] - bin.install_symlink libexec/"tracing/trace2html" - end - - test do - touch "test.json" - system "#{bin}/trace2html", "test.json" - assert_predicate testpath/"test.html", :exist? - end -end diff --git a/Formula/tracebox.rb b/Formula/tracebox.rb deleted file mode 100644 index 1695f990ec6ab..0000000000000 --- a/Formula/tracebox.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Tracebox < Formula - desc "Middlebox detection tool" - homepage "https://www.tracebox.org/" - url "https://github.com/tracebox/tracebox.git", - :tag => "v0.4.4", - :revision => "4fc12b2e330e52d340ecd64b3a33dbc34c160390" - revision 1 - head "https://github.com/tracebox/tracebox.git" - - bottle do - cellar :any - sha256 "0e22b5bc6204f1c344f83d8ec69a95bd61b7ab6365c619dfa5dcb53df04c576a" => :mojave - sha256 "e3e8333e7674ff8829df657bd759353fecc45c6d982afbc33cf35774a6ec23ec" => :high_sierra - sha256 "52a3ff0ecd8903cee1be17802dfe0624dc89858088354132496a241ea4207561" => :sierra - sha256 "2c0b3b4bb42d38aafdb702f3b7a5e514588ce75dd5dc459368d40273332b3a7d" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "json-c" - depends_on "lua" - - needs :cxx11 - - def install - ENV.libcxx - system "autoreconf", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - def caveats; <<~EOS - Tracebox requires superuser privileges e.g. run with sudo. - - You should be certain that you trust any software you are executing with - elevated privileges. - EOS - end - - test do - system bin/"tracebox", "-v" - end -end diff --git a/Formula/tractorgen.rb b/Formula/tractorgen.rb deleted file mode 100644 index c5c0df6069051..0000000000000 --- a/Formula/tractorgen.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Tractorgen < Formula - desc "Generates ASCII tractor art" - homepage "http://www.kfish.org/software/tractorgen/" - url "http://www.kfish.org/software/tractorgen/dl/tractorgen-0.31.7.tar.gz" - sha256 "469917e1462c8c3585a328d035ac9f00515725301a682ada1edb3d72a5995a8f" - - bottle do - cellar :any_skip_relocation - sha256 "0416b04f09a509f3912de4cac964fb96e2a54246f8ffb9d170d4f2bb16b6f959" => :mojave - sha256 "936883746158534e9650a0b26f18e680eed527fb56f71ad51e5ec203d8f7f451" => :high_sierra - sha256 "646d87ca0cb1a5ec93a8aa1ddaa1f28233347ca0a1f56e49c323809ec8295432" => :sierra - sha256 "ccac503b4577fc81e69d3e778c27c31fad9a1c5fa8627e97f293d87ab1177f8d" => :el_capitan - sha256 "e50de2fd2d9015873282a62fc7a21f3ef419d527d07eeab3830ace52ec25c3c9" => :yosemite - sha256 "acbfbe90462924fbc6f2658ca0ee591a122639356ce6ff042b558199b477bf4a" => :mavericks - sha256 "bcc0f270ae8414659db18f339044a3030beff37c8a4a305c1c544919b2fb0a7e" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - expected = <<~'EOS'.gsub(/^/, " ") # needs to be indented five spaces - r- - _| - / |_\_ \\ - | |o|----\\ - |_______\_--_\\ - (O)_O_O_(O) \\ - EOS - assert_equal expected, shell_output("#{bin}/tractorgen 4") - end -end diff --git a/Formula/traefik.rb b/Formula/traefik.rb deleted file mode 100644 index 826cec2e6889d..0000000000000 --- a/Formula/traefik.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Traefik < Formula - desc "Modern reverse proxy" - homepage "https://traefik.io/" - url "https://github.com/containous/traefik/releases/download/v1.7.6/traefik-v1.7.6.src.tar.gz" - version "1.7.6" - sha256 "2fc433c81bace17e801a071fed1ae4405835a8adbc9d6969baa42bab61dbad9e" - head "https://github.com/containous/traefik.git" - - bottle do - cellar :any_skip_relocation - sha256 "41b65c4f7e201330d267a2210d754c09ddae8406f8fe0ff15b3db98ff9632da0" => :mojave - sha256 "97b2fc8dca8cfce791b83d4d91ff1969397b601fe6f1c81c0ed68bffae1c54d0" => :high_sierra - sha256 "ca337dd3c61066244a6bba19d2f6220b446bddea90bc04c35b642ef9bb09aa93" => :sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - depends_on "node" => :build - depends_on "yarn" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/containous/traefik").install buildpath.children - - # Fix yarn + upath@1.0.4 incompatibility; remove once upath is upgraded to 1.0.5+ - Pathname.new("#{ENV["HOME"]}/.yarnrc").write("ignore-engines true\n") - - cd "src/github.com/containous/traefik" do - cd "webui" do - system "yarn", "install" - system "yarn", "run", "build" - end - system "go", "generate" - system "go", "build", "-o", bin/"traefik", "./cmd/traefik" - prefix.install_metafiles - end - end - - test do - require "socket" - - web_server = TCPServer.new(0) - http_server = TCPServer.new(0) - web_port = web_server.addr[1] - http_port = http_server.addr[1] - web_server.close - http_server.close - - (testpath/"traefik.toml").write <<~EOS - [web] - address = ":#{web_port}" - - [entryPoints.http] - address = ":#{http_port}" - EOS - - begin - pid = fork do - exec bin/"traefik", "--configfile=#{testpath}/traefik.toml" - end - sleep 5 - cmd = "curl -sIm3 -XGET http://localhost:#{web_port}/dashboard/" - assert_match /200 OK/m, shell_output(cmd) - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/trafficserver.rb b/Formula/trafficserver.rb deleted file mode 100644 index 6fcdf18407bed..0000000000000 --- a/Formula/trafficserver.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Trafficserver < Formula - desc "HTTP/1.1 compliant caching proxy server" - homepage "https://trafficserver.apache.org/" - - stable do - url "https://www.apache.org/dyn/closer.cgi?path=trafficserver/trafficserver-7.1.4.tar.bz2" - sha256 "1c5213f8565574ec8a66e08529fd20060c1b9a6cd9b803ba9bbb3b9847651b53" - - needs :cxx11 - end - - bottle do - rebuild 1 - sha256 "5fb5f9e4d0e7bc111c22d094de568ec45373400fa0e4189a751f4602afc0e533" => :mojave - sha256 "cd1e05ee174b9fa8c4aed38819649a5013d9390d90d607cd56705577bd0a16b2" => :high_sierra - sha256 "c7a1bb274aea0e1129ab7fb29106b47142b5dd62fc1a840722468b0e0f615c3a" => :sierra - end - - head do - url "https://github.com/apache/trafficserver.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - fails_with :clang do - build 800 - cause "needs C++17" - end - end - - depends_on "openssl" - depends_on "pcre" - - def install - ENV.cxx11 if build.stable? - - # Per https://luajit.org/install.html: If MACOSX_DEPLOYMENT_TARGET - # is not set then it's forced to 10.4, which breaks compile on Mojave. - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - # Needed for OpenSSL headers - if MacOS.version <= :lion - ENV.append_to_cflags "-Wno-deprecated-declarations" - end - - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --localstatedir=#{var} - --sysconfdir=#{etc}/trafficserver - --with-openssl=#{Formula["openssl"].opt_prefix} - --with-tcl=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework - --with-group=admin - --disable-silent-rules - --enable-experimental-plugins - ] - - system "autoreconf", "-fvi" if build.head? - system "./configure", *args - - # Fix wrong username in the generated startup script for bottles. - inreplace "rc/trafficserver.in", "@pkgsysuser@", "$USER" - - inreplace "lib/perl/Makefile", - "Makefile.PL INSTALLDIRS=$(INSTALLDIRS)", - "Makefile.PL INSTALLDIRS=$(INSTALLDIRS) INSTALLSITEMAN3DIR=#{man3}" - - system "make" if build.head? - system "make", "install" - end - - def post_install - (var/"log/trafficserver").mkpath - (var/"trafficserver").mkpath - - config = etc/"trafficserver/records.config" - return unless File.exist?(config) - return if File.read(config).include?("proxy.config.admin.user_id STRING #{ENV["USER"]}") - - config.append_lines "CONFIG proxy.config.admin.user_id STRING #{ENV["USER"]}" - end - - test do - output = shell_output("#{bin}/trafficserver status") - assert_match "Apache Traffic Server is not running", output - end -end diff --git a/Formula/trafshow.rb b/Formula/trafshow.rb deleted file mode 100644 index 1ab06fb7c7df8..0000000000000 --- a/Formula/trafshow.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Trafshow < Formula - desc "Continuous network traffic display" - # Upstream homepage down since late 2014, but only displays a manpage. - homepage "https://web.archive.org/web/20130707021442/soft.risp.ru/trafshow/index_en.shtml" - url "https://pkg.freebsd.org/ports-distfiles/trafshow-5.2.3.tgz" - mirror "https://dl.bintray.com/homebrew/mirror/trafshow-5.2.3.tgz" - sha256 "ea7e22674a66afcc7174779d0f803c1f25b42271973b4f75fab293b8d7db11fc" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "27f0fa0ce96139f6958efdd964b3ef4741d39a05f86ce33567eb622c55b10717" => :mojave - sha256 "d7d2f4fc92f234fd9fda9ec65a03b37aaf43d40203682ee3821526bb18f1ad13" => :high_sierra - sha256 "c6324418840429d76f53035ae9e013190b8190f75f9fc1eaa8100bc9e7df27f8" => :sierra - sha256 "c6bd1f502ddbcc756a400958f1f79da193c5784b7cd71361e1e6742412ae442c" => :el_capitan - sha256 "fd7be4933f9be5a4a3ebaf0e31086e0f5566608305dd88779f0b0790fdc75c05" => :yosemite - end - - depends_on "libtool" => :build - - { - "domain_resolver.c" => "43b97d4ea025ed2087e4525a0b1acffc887082148df6dd2603b91fa70f79b678", - "colormask.c" => "04121b295d22a18aaf078611c75401a620570fbd89362bba2dd1abc042ea3c4a", - "trafshow.c" => "3164a612689d8ec310453a50fbb728f9bae3c356b88c41b6eab7ba7e925b1bf1", - "trafshow.1" => "8072e52acc56dd6f64c75f5d2e8a814431404b3fdfbc15149aaad1d469c47ff1", - "configure" => "c6e34dddd6c159cbd373b2b593f7643642cb10449c6bc6c606e160586bc5b794", - }.each do |name, sha| - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/be6fd4a/trafshow/patch-#{name}" - sha256 sha - end - end - - # libpcap on 10.12 has pcap_lib_version() instead of pcap_version - if MacOS.version >= :sierra - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/7ad7c77/trafshow/patch-pcap-version-sierra.diff" - sha256 "03213c8b8b46241ecef8f427cdbec9b09f5fdc35b9d67672ad4b370a1186aed5" - end - end - - def install - cp Dir["#{Formula["libtool"].opt_pkgshare}/*/config.{guess,sub}"], buildpath - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-slang" - system "make" - bin.install "trafshow" - man1.install "trafshow.1" - etc.install ".trafshow" => "trafshow.default" - end - - test do - assert_match version.to_s, shell_output("#{bin}/trafshow -v 2>&1", 1) - end -end diff --git a/Formula/traildb.rb b/Formula/traildb.rb deleted file mode 100644 index ff3a659449989..0000000000000 --- a/Formula/traildb.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Traildb < Formula - desc "Blazingly-fast database for log-structured data" - homepage "http://traildb.io/" - url "https://github.com/traildb/traildb/archive/0.6.tar.gz" - sha256 "f73515fe56c547f861296cf8eecc98b8e8bf00d175ad9fb7f4b981ad7cf8b67c" - - bottle do - cellar :any - sha256 "61992aff616c9e39b703e8b2c138f3997dd9ba7ec6c85eea711605327e221b1f" => :mojave - sha256 "b383a6635462acd29d12473520ff1cf70920c429f0ed9a010cf2860bf7df3180" => :high_sierra - sha256 "e84323b169f8a2d3ccadadb65d968c99265f37f581d9fe002c259b76b180776e" => :sierra - sha256 "901e2214b9ddcd214b857db69569c12f85041e6cd087df00ef1c0d624605effe" => :el_capitan - sha256 "381ac2503006105329e6b915501cf8bfdd787121df79c23da4721e04a8b838a9" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libarchive" - - resource "judy" do - url "https://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" - sha256 "d2704089f85fdb6f2cd7e77be21170ced4b4375c03ef1ad4cf1075bd414a63eb" - end - - def install - # We build judy as static library, so we don't need to install it - # into the real prefix - judyprefix = "#{buildpath}/resources/judy" - - resource("judy").stage do - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--disable-shared", "--prefix=#{judyprefix}" - - # Parallel build is broken - ENV.deparallelize do - system "make", "-j1", "install" - end - end - - ENV["PREFIX"] = prefix - ENV.append "CFLAGS", "-I#{judyprefix}/include" - ENV.append "LDFLAGS", "-L#{judyprefix}/lib" - system "./waf", "configure", "install" - end - - test do - # Check that the library has been installed correctly - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - const char *path = "test.tdb"; - const char *fields[] = {}; - tdb_cons* c1 = tdb_cons_init(); - assert(tdb_cons_open(c1, path, fields, 0) == 0); - assert(tdb_cons_finalize(c1) == 0); - tdb* t1 = tdb_init(); - assert(tdb_open(t1, path) == 0); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ltraildb", "-o", "test" - system "./test" - - # Check that the provided tdb binary works correctly - (testpath/"in.csv").write("1234 1234\n") - system "#{bin}/tdb", "make", "-c", "-i", "in.csv", "--tdb-format", "pkg" - end -end diff --git a/Formula/transcrypt.rb b/Formula/transcrypt.rb deleted file mode 100644 index 08442359041df..0000000000000 --- a/Formula/transcrypt.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Transcrypt < Formula - desc "Configure transparent encryption of files in a Git repo" - homepage "https://github.com/elasticdog/transcrypt" - url "https://github.com/elasticdog/transcrypt/archive/v1.1.0.tar.gz" - sha256 "615092a6a478fb92b4b37b950d86880548830788ab3142400f6f87b9c5b37db5" - head "https://github.com/elasticdog/transcrypt.git" - - bottle :unneeded - - def install - bin.install "transcrypt" - man.install "man/transcrypt.1" - bash_completion.install "contrib/bash/transcrypt" - zsh_completion.install "contrib/zsh/_transcrypt" - end - - test do - system "git", "init" - system bin/"transcrypt", "--password", "guest", "--yes" - - (testpath/".gitattributes").atomic_write <<~EOS - sensitive_file filter=crypt diff=crypt - EOS - (testpath/"sensitive_file").write "secrets" - system "git", "add", ".gitattributes", "sensitive_file" - system "git", "commit", "--message", "Add encrypted version of file" - - assert_equal `git show HEAD:sensitive_file --no-textconv`.chomp, - "U2FsdGVkX1/BC5TmOtJ9kCgCq4EmYX0crGU7mAIhDEA=" - end -end diff --git a/Formula/translate-shell.rb b/Formula/translate-shell.rb deleted file mode 100644 index df5bfab3a4cfb..0000000000000 --- a/Formula/translate-shell.rb +++ /dev/null @@ -1,37 +0,0 @@ -class TranslateShell < Formula - desc "Command-line translator using Google Translate and more" - homepage "https://www.soimort.org/translate-shell" - url "https://github.com/soimort/translate-shell/archive/v0.9.6.9.tar.gz" - sha256 "05705c541a5d3c34e0df954a799371a0466c85de26400e632672e073767051b4" - head "https://github.com/soimort/translate-shell.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "cdb64cb73dd0d2e4911d489a82f7f7ce03f96f65c403324ee5e62107f9a24d18" => :mojave - sha256 "f942f0e292e4667bbdbe12a6afbe329504ba5659645e2e375cfd4eee4676b3ed" => :high_sierra - sha256 "f942f0e292e4667bbdbe12a6afbe329504ba5659645e2e375cfd4eee4676b3ed" => :sierra - end - - depends_on "fribidi" - depends_on "gawk" - depends_on "rlwrap" - - def install - system "make" - bin.install "build/trans" - man1.install "man/trans.1" - end - - def caveats; <<~EOS - By default, text-to-speech functionality is provided by macOS's builtin - `say' command. This functionality may be improved in certain cases by - installing one of mplayer, mpv, or mpg123, all of which are available - through `brew install'. - EOS - end - - test do - assert_equal "hello\n", - shell_output("#{bin}/trans -no-init -b -s fr -t en bonjour").downcase - end -end diff --git a/Formula/translate-toolkit.rb b/Formula/translate-toolkit.rb deleted file mode 100644 index a30409fd585c6..0000000000000 --- a/Formula/translate-toolkit.rb +++ /dev/null @@ -1,41 +0,0 @@ -class TranslateToolkit < Formula - include Language::Python::Virtualenv - - desc "Toolkit for localization engineers" - homepage "https://toolkit.translatehouse.org/" - url "https://github.com/translate/translate/archive/2.3.1.tar.gz" - sha256 "0b2d79f0023ce545c6240829624ce1e1ce54ea7bc7913428880345ff423fd999" - head "https://github.com/translate/translate.git" - - bottle do - cellar :any_skip_relocation - sha256 "655232d6bfccf14a3be633b36f89f3cc29bc804c788436124c8c9e11214d5b75" => :mojave - sha256 "c54103dd3a9194ddaa950425a5788fee88980eb108802f4bf84c8f8ef17b6d20" => :high_sierra - sha256 "f03d495e61d79fae702eaa31e1043b23ba00ed9845438de6705b2cc3a2336c92" => :sierra - end - - depends_on "python" - - resource "argparse" do - url "https://files.pythonhosted.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz" - sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4" - end - - resource "diff-match-patch" do - url "https://files.pythonhosted.org/packages/22/82/46eaeab04805b4fac17630b59f30c4f2c8860988bcefd730ff4f1992908b/diff-match-patch-20121119.tar.gz" - sha256 "9dba5611fbf27893347349fd51cc1911cb403682a7163373adacc565d11e2e4c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"pretranslate", "-h" - end -end diff --git a/Formula/transmission.rb b/Formula/transmission.rb deleted file mode 100644 index a4a1ef5e296a2..0000000000000 --- a/Formula/transmission.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Transmission < Formula - desc "Lightweight BitTorrent client" - homepage "https://www.transmissionbt.com/" - url "https://github.com/transmission/transmission-releases/raw/dc77bea/transmission-2.94.tar.xz" - sha256 "35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d" - - bottle do - rebuild 1 - sha256 "2a7d6cb307a817eed5a02bab0dcfbb2d024d626bd768116d5107ef74a79282a5" => :mojave - sha256 "6aa06621a0754c3a2f76572f68f0992747b4b2240e7424795f63071bfab5475b" => :high_sierra - sha256 "57ec396481d8107933552649d46de6ec78aaaa6c3a80ab27d1ba2a9465925471" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - - def install - ENV.append "LDFLAGS", "-framework Foundation -prebind" - ENV.append "LDFLAGS", "-liconv" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-mac - --disable-nls - --without-gtk - ] - - system "./configure", *args - system "make", "install" - - (var/"transmission").mkpath - end - - def caveats; <<~EOS - This formula only installs the command line utilities. - - Transmission.app can be downloaded directly from the website: - https://www.transmissionbt.com/ - - Alternatively, install with Homebrew Cask: - brew cask install transmission - EOS - end - - plist_options :manual => "transmission-daemon --foreground" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/transmission-daemon - --foreground - --config-dir - #{var}/transmission/ - --log-info - --logfile - #{var}/transmission/transmission-daemon.log - - KeepAlive - - NetworkState - - - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/transmission-create", "-o", "#{testpath}/test.mp3.torrent", test_fixtures("test.mp3") - assert_match /^magnet:/, shell_output("#{bin}/transmission-show -m #{testpath}/test.mp3.torrent") - end -end diff --git a/Formula/trash-cli.rb b/Formula/trash-cli.rb deleted file mode 100644 index f9a6d5b04103d..0000000000000 --- a/Formula/trash-cli.rb +++ /dev/null @@ -1,32 +0,0 @@ -class TrashCli < Formula - include Language::Python::Virtualenv - - desc "Command-line interface to the freedesktop.org trashcan" - homepage "https://github.com/andreafrancia/trash-cli" - url "https://github.com/andreafrancia/trash-cli/archive/0.17.1.14.tar.gz" - sha256 "8fdd20e5e9c55ea4e24677e602a06a94a93f1155f9970c55b25dede5e037b974" - revision 1 - head "https://github.com/andreafrancia/trash-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "63895ceb716e9cd3b45bc9dd676afbb973c49f82cf11445aca89ef3cc1e3da69" => :mojave - sha256 "c4d324ed98f547cad585e0eaa348c7e8b26e9036c77ab7bbfcc856d76c1ddeb4" => :high_sierra - sha256 "5cb6346603e9ba432c92d46bc20f8612dad0dfa4e32e1996e2c0cc1aaab87990" => :sierra - end - - depends_on "python" - - conflicts_with "trash", :because => "both install a `trash` binary" - - def install - virtualenv_install_with_resources - end - - test do - touch "testfile" - assert_predicate testpath/"testfile", :exist? - system bin/"trash-put", "testfile" - refute_predicate testpath/"testfile", :exist? - end -end diff --git a/Formula/trash.rb b/Formula/trash.rb deleted file mode 100644 index b44c05a9267a9..0000000000000 --- a/Formula/trash.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Trash < Formula - desc "CLI tool that moves files or folder to the trash" - homepage "https://hasseg.org/trash/" - url "https://github.com/ali-rantakari/trash/archive/v0.9.2.tar.gz" - sha256 "e8739c93d710ac4da721e16878e7693019d3a2ad7d8acd817f41426601610083" - head "https://github.com/ali-rantakari/trash.git" - - bottle do - cellar :any_skip_relocation - sha256 "fa83a082a40fb46d6cdd954ad643c8be433bce1bb4f7f5e541d487cbdc2d920f" => :mojave - sha256 "8ecc3fcedf8a31e799f04be6940850dcc6db11f2dc0f1db0fa3a3af1c49cac21" => :high_sierra - sha256 "b30768556b816f51df0fc7d8016dec80d30a60c8402bf1238b9f9a68848677b1" => :sierra - sha256 "75cebaa2b12cd75eeb1bb8deb4737639064f68f010cab94e378bd5ce727d4c34" => :el_capitan - end - - conflicts_with "trash-cli", :because => "both install a `trash` binary" - - def install - system "make" - system "make", "docs" - bin.install "trash" - man1.install "trash.1" - end - - test do - system "#{bin}/trash" - end -end diff --git a/Formula/travis.rb b/Formula/travis.rb deleted file mode 100644 index 4f21478daf5c3..0000000000000 --- a/Formula/travis.rb +++ /dev/null @@ -1,132 +0,0 @@ -class Travis < Formula - desc "Command-line client for Travis CI" - homepage "https://github.com/travis-ci/travis.rb/" - url "https://github.com/travis-ci/travis.rb/archive/v1.8.9.tar.gz" - sha256 "7a143bd0eb90e825370c808d38b70cca8c399c68bea8138442f40f09b6bbafc4" - revision 3 - - bottle do - sha256 "d695085c0886f6db8d5a1afeb6cae27e61d7fcc41d2e069c16ce0909048dba64" => :mojave - sha256 "32634e86fdc04e7ca0df1834cf1ee6e8cdd3bfb0f89c0e4ed36a0d55b08483b3" => :high_sierra - sha256 "1d21554de55885fd08e4433772663410044f088cf346b63533142019a2d865f5" => :sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - resource "addressable" do - url "https://rubygems.org/gems/addressable-2.4.0.gem" - sha256 "7abfff765571b0a73549c9a9d2f7e143979cd0c252f7fa4c81e7102a973ef656" - end - - resource "backports" do - url "https://rubygems.org/gems/backports-3.11.3.gem" - sha256 "57b04d4e2806c199bff3663d810db25e019cf88c42cacc0edbb36d3038d6a5ab" - end - - resource "ethon" do - url "https://rubygems.org/gems/ethon-0.11.0.gem" - sha256 "88ec7960a8e00f76afc96ed15dcc8be0cb515f963fe3bb1d4e0b5c51f9d7e078" - end - - resource "faraday" do - url "https://rubygems.org/gems/faraday-0.15.2.gem" - sha256 "affa23f5e5ee27170cbb5045c580af9b396bac525516c6583661c2bb08038f92" - end - - resource "faraday_middleware" do - url "https://rubygems.org/gems/faraday_middleware-0.12.2.gem" - sha256 "2d90093c18c23e7f5a6f602ed3114d2c62abc3f7f959dd3046745b24a863f1dc" - end - - resource "ffi" do - url "https://rubygems.org/gems/ffi-1.9.25.gem" - sha256 "f854f08f08190fec772a12e863f33761d02ad3efea3c3afcdeffc8a06313f54a" - end - - resource "gh" do - url "https://rubygems.org/gems/gh-0.15.1.gem" - sha256 "ef733f81c17846f217f5ad9616105e9adc337775d41de1cc330133ad25708d3c" - end - - resource "highline" do - url "https://rubygems.org/gems/highline-1.7.10.gem" - sha256 "1e147d5d20f1ad5b0e23357070d1e6d0904ae9f71c3c49e0234cf682ae3c2b06" - end - - if MacOS.version <= :sierra - resource "json" do - url "https://rubygems.org/gems/json-2.1.0.gem" - sha256 "b76fd09b881088c6c64a12721a1528f2f747a1c2ee52fab4c1f60db8af946607" - end - end - - resource "launchy" do - url "https://rubygems.org/gems/launchy-2.4.3.gem" - sha256 "42f52ce12c6fe079bac8a804c66522a0eefe176b845a62df829defe0e37214a4" - end - - resource "multi_json" do - url "https://rubygems.org/gems/multi_json-1.13.1.gem" - sha256 "db8613c039b9501e6b2fb85efe4feabb02f55c3365bae52bba35381b89c780e6" - end - - resource "multipart-post" do - url "https://rubygems.org/gems/multipart-post-2.0.0.gem" - sha256 "3dc44e50d3df3d42da2b86272c568fd7b75c928d8af3cc5f9834e2e5d9586026" - end - - resource "net-http-persistent" do - url "https://rubygems.org/gems/net-http-persistent-2.9.4.gem" - sha256 "24274d207ffe66222ef70c78a052c7ea6e66b4ff21e2e8a99e3335d095822ef9" - end - - resource "net-http-pipeline" do - url "https://rubygems.org/gems/net-http-pipeline-1.0.1.gem" - sha256 "6923ce2f28bfde589a9f385e999395eead48ccfe4376d4a85d9a77e8c7f0b22f" - end - - resource "pusher-client" do - url "https://rubygems.org/gems/pusher-client-0.6.2.gem" - sha256 "c405c931090e126c056d99f6b69a01b1bcb6cbfdde02389c93e7d547c6efd5a3" - end - - resource "typhoeus" do - url "https://rubygems.org/gems/typhoeus-0.8.0.gem" - sha256 "28b7cf3c7d915a06d412bddab445df94ab725252009aa409f5ea41ab6577a30f" - end - - resource "websocket" do - url "https://rubygems.org/gems/websocket-1.2.8.gem" - sha256 "1d8155c1cdaab8e8e72587a60e08423c9dd84ee44e4e827358ce3d4c2ccb2138" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - r.verify_download_integrity(r.fetch) - system "gem", "install", r.cached_download, "--ignore-dependencies", - "--no-document", "--install-dir", libexec - end - system "gem", "build", "travis.gemspec" - system "gem", "install", "--ignore-dependencies", "travis-#{version}.gem" - bin.install libexec/"bin/travis" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - (testpath/".travis.yml").write <<~EOS - language: ruby - - sudo: true - - matrix: - include: - - os: osx - rvm: system - EOS - output = shell_output("#{bin}/travis lint #{testpath}/.travis.yml") - assert_match "valid", output - output = shell_output("#{bin}/travis init 2>&1", 1) - assert_match "Can't figure out GitHub repo name", output - end -end diff --git a/Formula/tre.rb b/Formula/tre.rb deleted file mode 100644 index 11b5edb5f82e4..0000000000000 --- a/Formula/tre.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tre < Formula - desc "Lightweight, POSIX-compliant regular expression (regex) library" - homepage "https://laurikari.net/tre/" - url "https://laurikari.net/tre/tre-0.8.0.tar.bz2" - sha256 "8dc642c2cde02b2dac6802cdbe2cda201daf79c4ebcbb3ea133915edf1636658" - - bottle do - cellar :any - sha256 "6135ceb88c62b006fb0fbcc772ffd4006da4ae03d05fd872155fa36d33216efc" => :mojave - sha256 "eaab931989b5bf5fc18949eaa234a1840531ef3aeb9deda65e4d66be40cae149" => :high_sierra - sha256 "e28b7ac6153b06c067538f555f9ac5973df49c14ac2693aa4239ae407982e2c9" => :sierra - sha256 "8a1762dbd40b98869e01a19c29cdb1cfa5a127543b3e132fb0fdff996e46f566" => :el_capitan - sha256 "6fada15a2fd1c5905f8ed45d3c966da5e14efeb10522f82c26d2a23a918abaad" => :yosemite - sha256 "c57f9bfa724cd20843a672f5e8bd384e05e65bac062dd7d7b676db9b1c11f998" => :mavericks - sha256 "1159edaece87806b8141cb351d896641b6de1667b0f62d6214ff0412ffae7fc4" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "brow", pipe_output("#{bin}/agrep -1 brew", "brow", 0) - end -end diff --git a/Formula/tree.rb b/Formula/tree.rb deleted file mode 100644 index 3cf6f3d20a324..0000000000000 --- a/Formula/tree.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Tree < Formula - desc "Display directories as trees (with optional color/HTML output)" - homepage "http://mama.indstate.edu/users/ice/tree/" - url "https://deb.debian.org/debian/pool/main/t/tree/tree_1.8.0.orig.tar.gz" - sha256 "715d5d4b434321ce74706d0dd067505bb60c5ea83b5f0b3655dae40aa6f9b7c2" - - bottle do - cellar :any_skip_relocation - sha256 "7152288c457dd893de50fa9d6ac9a8599748564e1b3586eec8eff7057089051a" => :mojave - sha256 "107d965994381d34e90b58a62f1c306c1b8a698db2696cdd905ba65c801ecc3b" => :high_sierra - sha256 "07d980571469a0cc699c69a8726eee338f782ba61c041e58f01ddb2924d08aeb" => :sierra - end - - def install - ENV.append "CFLAGS", "-fomit-frame-pointer" - objs = "tree.o unix.o html.o xml.o json.o hash.o color.o file.o strverscmp.o" - - system "make", "prefix=#{prefix}", - "MANDIR=#{man1}", - "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}", - "OBJS=#{objs}", - "install" - end - - test do - system "#{bin}/tree", prefix - end -end diff --git a/Formula/treecc.rb b/Formula/treecc.rb deleted file mode 100644 index 362f9ef67c432..0000000000000 --- a/Formula/treecc.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Treecc < Formula - desc "Aspect-oriented approach to writing compilers" - homepage "https://gnu.org/software/dotgnu/treecc/treecc.html" - url "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-0.3.10.tar.gz" - sha256 "5e9d20a6938e0c6fedfed0cabc7e9e984024e4881b748d076e8c75f1aeb6efe7" - - bottle do - cellar :any_skip_relocation - sha256 "4e9b82d074d10eae24c0c7e95879435ec8896072669d826614f34213843bfe5e" => :mojave - sha256 "c05c019775b00f92fe2ea47a02c999356105789b9aa5536c4356090ccbb9ba99" => :high_sierra - sha256 "0b3e61d5a910222d170fcee80d094be0dcd2707b7bebc6d40667a8f25b4b2e5c" => :sierra - sha256 "e74d23594113e594ad8021fe55b0f0f863fcd4b01140c3fd8b1a5f2bb6c8ad74" => :el_capitan - sha256 "595dada9ecb2cef6d3e225e99a98997968d15f8009038511c464b6499cbcd872" => :yosemite - sha256 "9f9a9e6a66c9e0a60888ad2af502070683637b5cd19dec6e080211a45c3313e6" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - bin.install "treecc" - end - - test do - system "#{bin}/treecc", "-v" - end -end diff --git a/Formula/treefrog.rb b/Formula/treefrog.rb deleted file mode 100644 index 6490d69d55b29..0000000000000 --- a/Formula/treefrog.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Treefrog < Formula - desc "High-speed C++ MVC Framework for Web Application" - homepage "http://www.treefrogframework.org/" - url "https://github.com/treefrogframework/treefrog-framework/archive/v1.22.0.tar.gz" - sha256 "0b9d79d0e17266ff603c1ff812289e8d2500d8f758d3c700ccc3aaad51e3751d" - head "https://github.com/treefrogframework/treefrog-framework.git" - - bottle do - rebuild 1 - sha256 "48c4597ce3646a2481946824dcb6aee5b1bcec9f7449c1054c265b70f66800d9" => :mojave - sha256 "5c271befbf580381e9676937716a4c215b09b83ea75416cf6229d495956ce5d3" => :high_sierra - sha256 "04a85f1d383d87e7d37be11b91360341c0686c758a4eda6b0185121f88824684" => :sierra - end - - depends_on :xcode => ["8.0", :build] - depends_on :macos => :el_capitan - depends_on "qt" - - def install - system "./configure", "--prefix=#{prefix}" - - cd "src" do - system "make" - system "make", "install" - end - - cd "tools" do - system "make" - system "make", "install" - end - end - - test do - system bin/"tspawn", "new", "hello" - assert_predicate testpath/"hello", :exist? - cd "hello" do - assert_predicate Pathname.pwd/"hello.pro", :exist? - system HOMEBREW_PREFIX/"opt/qt/bin/qmake" - assert_predicate Pathname.pwd/"Makefile", :exist? - system "make" - system bin/"treefrog", "-v" - end - end -end diff --git a/Formula/trezor-agent.rb b/Formula/trezor-agent.rb deleted file mode 100644 index ea205e89cbea5..0000000000000 --- a/Formula/trezor-agent.rb +++ /dev/null @@ -1,158 +0,0 @@ -class TrezorAgent < Formula - include Language::Python::Virtualenv - - desc "Hardware-based SSH/GPG agent" - homepage "https://github.com/romanz/trezor-agent" - url "https://files.pythonhosted.org/packages/16/0f/077ff482453b92ad78736fe63cdb8050351f0fefa734eb0d0c4ebcbae4e0/trezor_agent-0.9.3.tar.gz" - sha256 "0c1ef62903534d8b01260dbd6304780e278bc83e0bc21f6a83beee76e48e1580" - - bottle do - cellar :any_skip_relocation - sha256 "83db41f5d78c10f82264245ff79a9444184b21be1e569445c1e687dc1a0f1bc9" => :mojave - sha256 "a025733214bbc2e5cef5210c230282096f00138b4357c11c0f4e330725ac73e1" => :high_sierra - sha256 "5e8dcfdcbd5b1793caa2962af7973027d0ab173d93d832e6c10010b7b7631b83" => :sierra - sha256 "5b49057445da916a9802cc03e40586e1c6795a3d184f3d65bf022d85fb967f32" => :el_capitan - end - - depends_on "libusb" - depends_on "python" - - resource "ConfigArgParse" do - url "https://files.pythonhosted.org/packages/77/61/ae928ce6ab85d4479ea198488cf5ffa371bd4ece2030c0ee85ff668deac5/ConfigArgParse-0.13.0.tar.gz" - sha256 "e6441aa58e23d3d122055808e5e2220fd742dff6e1e51082d2a4e4ed145dd788" - end - - resource "PyMsgBox" do - url "https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip" - sha256 "3888116a60812d01d44529c402014bf0896d2a9262617cb18faa9a7b3800ad4e" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/9d/36/49d0ee152b6a1631f03a541532c6201942430060aa97fe011cf01a2cce64/Unidecode-1.0.22.tar.gz" - sha256 "8c33dd588e0c9bc22a76eaa0c715a5434851f726131bd44a6c26471746efabf5" - end - - resource "backports.shutil_which" do - url "https://files.pythonhosted.org/packages/dd/ea/715dc80584207a0ff4a693a73b03c65f087d8ad30842832b9866fe18cb2f/backports.shutil_which-3.5.1.tar.gz" - sha256 "dd439a7b02433e47968c25a45a76704201c4ef2167deb49830281c379b1a4a9b" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/e1/0f/f8d5e939184547b3bdc6128551b831a62832713aa98c2ccdf8c47ecc7f17/certifi-2018.8.24.tar.gz" - sha256 "376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/f9/e5/99ebb176e47f150ac115ffeda5fedb6a3dbb3c00c74a59fd84ddf12f5857/ecdsa-0.13.tar.gz" - sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa" - end - - resource "ed25519" do - url "https://files.pythonhosted.org/packages/d5/d6/cd19a64022dc7557d245aad6a943eed7693189b48c58a9adf3bc00ceedc5/ed25519-1.4.tar.gz" - sha256 "2991b94e1883d1313c956a1e3ced27b8a2fdae23ac40c0d9d0b103d5a70d1d2a" - end - - resource "hidapi" do - url "https://files.pythonhosted.org/packages/c1/86/89df0e8890f96eeb5fb68d4ccb14cb38e2c2d2cfd7601ba972206acd9015/hidapi-0.7.99.post21.tar.gz" - sha256 "e0be1aa6566979266a8fc845ab0e18613f4918cf2c977fe67050f5dc7e2a9a97" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "libagent" do - url "https://files.pythonhosted.org/packages/dc/77/e9c300e04dd449e726ebc153c15aff18c38b7dbb1704f985f4ddb881d6f8/libagent-0.12.0.tar.gz" - sha256 "55af1ad2a6c95aef1fc5588c2002c9e54edbb14e248776b64d00628235ceda3e" - end - - resource "libusb1" do - url "https://files.pythonhosted.org/packages/39/c6/a9c8c38e3a8a587cd5c32146a5156375e107e483eb2ccb80284a147921dd/libusb1-1.6.6.tar.gz" - sha256 "a49917a2262cf7134396f6720c8be011f14aabfc5cdc53f880cc672c0f39d271" - end - - resource "lockfile" do - url "https://files.pythonhosted.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz" - sha256 "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799" - end - - resource "mnemonic" do - url "https://files.pythonhosted.org/packages/a4/5a/663362ccceb76035ad50fbc20203b6a4674be1fe434886b7407e79519c5e/mnemonic-0.18.tar.gz" - sha256 "02a7306a792370f4a0c106c2cf1ce5a0c84b9dbd7e71c6792fdb9ad88a727f1d" - end - - resource "pbkdf2" do - url "https://files.pythonhosted.org/packages/02/c0/6a2376ae81beb82eda645a091684c0b0becb86b972def7849ea9066e3d5e/pbkdf2-1.3.tar.gz" - sha256 "ac6397369f128212c43064a2b4878038dab78dab41875364554aaf2a684e6979" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/1b/90/f531329e628ff34aee79b0b9523196eb7b5b6b398f112bb0c03b24ab1973/protobuf-3.6.1.tar.gz" - sha256 "1489b376b0f364bcc6f89519718c057eb191d7ad6f1b395ffd93d1aa45587811" - end - - resource "pyblake2" do - url "https://files.pythonhosted.org/packages/a6/ea/559658f48713567276cabe1344a9ef918adcb34a9da417dbf0a2f7477d8e/pyblake2-1.1.2.tar.gz" - sha256 "5ccc7eb02edb82fafb8adbb90746af71460fbc29aa0f822526fc976dff83e93f" - end - - resource "python-daemon" do - url "https://files.pythonhosted.org/packages/99/2a/75fe6aa7086e838570f29899f674e7896a42be26d9fff33f90d990e599d2/python-daemon-2.2.0.tar.gz" - sha256 "aca149ebf7e73f10cd554b2df5c95295d49add8666348eff6195053ec307728c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "rlp" do - url "https://files.pythonhosted.org/packages/01/aa/475f96f82d3d91e6f9e434ad465069e4b031665df048050fab70385ad1c9/rlp-1.0.2.tar.gz" - sha256 "040fb5172fa23d27953a886c40cac989fc031d0629db934b5a9edcd2fb28df1e" - end - - resource "semver" do - url "https://files.pythonhosted.org/packages/47/13/8ae74584d6dd33a1d640ea27cd656a9f718132e75d759c09377d10d64595/semver-2.8.1.tar.gz" - sha256 "5b09010a66d9a3837211bb7ae5a20d10ba88f8cb49e92cb139a69ef90d5060d8" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "trezor" do - url "https://files.pythonhosted.org/packages/4e/98/b59ad74f5511154981e423b58b0bd03bc05d537ad120ee235dbaa10e37ea/trezor-0.10.2.tar.gz" - sha256 "4dba4d5c53d3ca22884d79fb4aa68905fb8353a5da5f96c734645d8cf537138d" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - def install - virtualenv_install_with_resources - end - - test do - output = shell_output("#{bin}/trezor-agent identity@myhost 2>&1", 1) - assert_match "Trezor not connected", output - end -end diff --git a/Formula/triton.rb b/Formula/triton.rb deleted file mode 100644 index e8eac37572dfb..0000000000000 --- a/Formula/triton.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class Triton < Formula - desc "Joyent Triton CLI" - homepage "https://www.npmjs.com/package/triton" - url "https://registry.npmjs.org/triton/-/triton-6.1.2.tgz" - sha256 "8178ba4944ec4bdd889f512c75757b4957a849cd1a25a156c6a4590c6f51daaa" - - bottle do - sha256 "8076f9d3e55399ba25ab931a19518189d5cd6e01241171140b3a42a97e98c4ae" => :mojave - sha256 "636d290a02708b0da5bd5253255992577582f7f302c1525646a05dd12106e189" => :high_sierra - sha256 "6c50d2c6a7afa147faf8933c7ab6eefcede05a12aadcc5060b58b0883d0f8089" => :sierra - sha256 "b0aa58088e9ae79da67cfcb9c277116b53906e1a528629edb8350c797976568d" => :el_capitan - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - output = shell_output("#{bin}/triton profile ls") - assert_match /\ANAME CURR ACCOUNT USER URL$/, output - end -end diff --git a/Formula/trr.rb b/Formula/trr.rb deleted file mode 100644 index c070dc9cc9eb6..0000000000000 --- a/Formula/trr.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Trr < Formula - desc "Type training program for emacs users" - homepage "https://code.google.com/archive/p/trr22/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/trr22/trr22_0.99-5.tar.gz" - version "22.0.99.5" - sha256 "6bac2f947839cebde626cdaab0c0879de8f6f6e40bfd7a14ccdfe1a035a3bcc6" - revision 1 - - bottle do - sha256 "14b4972311987725cc19c4278503c4ecf24cc98599c0caf411363f859dcc1f5e" => :mojave - sha256 "cf2a952840541507c0f5b830d6db985a9aa9e4dab5bdc80bef4d8b7683303da8" => :high_sierra - sha256 "85385ce899c573ebe08ccca03a8993b2ecffb7d064ae9cc85e337ce8462650e5" => :sierra - sha256 "2b5abc44babd72072cd9303e305d7586574ae65df2c350ca474764dede329035" => :el_capitan - sha256 "b965ca412e2a97b20bda8afb03fb042fe05f162c6391ea5460e05473c9260ced" => :yosemite - sha256 "1b24783f3b7060b6c1ac0a9edac5a990fc2bcefcccef9746897a627c912a931f" => :mavericks - sha256 "2373aaab80559228b2d5510494ba23f22fa6527d6e906ce4c7c6dbc6ff8a9ce4" => :mountain_lion - end - - depends_on "nkf" => :build - depends_on "apel" - - def install - system "make", "clean" - cp Dir["#{Formula["apel"].opt_elisp}/**/*.el"], buildpath - - # The file "CONTENTS" is firstly encoded to EUC-JP. - # This encodes it to UTF-8 to avoid garbled characters. - system "nkf", "-w", "--overwrite", buildpath/"CONTENTS" - - # wrong text filename - inreplace buildpath/"CONTENTS", "EmacsLisp", "Elisp_programs" - - system "make", "clean" - cp Dir["#{Formula["apel"].opt_elisp}/**/*.elc"], buildpath - - # texts for playing trr - texts = "The_Constitution_Of_JAPAN Constitution_of_the_USA Iccad_90 C_programs Elisp_programs Java_programs Ocaml_programs Python_programs" - - inreplace buildpath/"Makefile", "japanese = t", "japanese = nil" - - system "make", "install", - "CC=#{ENV.cc}", - "TRRDIR=#{prefix}", - "INFODIR=#{info}", - "BINDIR=#{bin}", - "TEXTS=#{texts}", - "LISPDIR=#{elisp}" - (prefix/"record").install Dir["record/*"] - end - - test do - program = testpath/"test-trr.el" - program.write <<~EOS - (add-to-list 'load-path "#{HOMEBREW_PREFIX}/share/emacs/site-lisp/apel/emu") - (add-to-list 'load-path "#{elisp}") - (require 'trr) - (print (TRR:trainer-menu-buffer)) - EOS - - assert_equal "\"Type & Menu\"", shell_output("emacs -Q --batch -l #{program}").strip - end -end diff --git a/Formula/truecrack.rb b/Formula/truecrack.rb deleted file mode 100644 index 8f371bcdd1237..0000000000000 --- a/Formula/truecrack.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Truecrack < Formula - desc "Brute-force password cracker for TrueCrypt" - homepage "https://github.com/lvaccaro/truecrack" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/truecrack/truecrack_v35.tar.gz" - version "3.5" - sha256 "25bf270fa3bc3591c3d795e5a4b0842f6581f76c0b5d17c0aef260246fe726b3" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8eff51aec7a5413b11d35adcc1559e036687ae31aee11a477cc7d62f603fd1e1" => :mojave - sha256 "fd148aa52883969c30029e25889c560443347575cb064fe9e93d48e9940afcb6" => :high_sierra - sha256 "96ecdedf66599ec83da60c5a64de37dce4aa3411bf3a575bb5d5e1b6646fd5b3" => :sierra - sha256 "2905997955799043b8f07c7cb28854d0a0acd3a84131b92b6c49780570dd198f" => :el_capitan - sha256 "d7d6879b7132093ebcc716ffe115dc20974c68e7e629f7f7cc3bce5030d153d3" => :yosemite - sha256 "8357dddf047bdd2180f241edb5848e49a48083300484143a245f41e5def1888d" => :mavericks - end - - # Fix missing return value compilation issue - # https://github.com/lvaccaro/truecrack/issues/41 - patch do - url "https://gist.githubusercontent.com/anonymous/b912a1ede06eb1e8eb38/raw/1394a8a6bedb7caae8ee034f512f76a99fe55976/truecrack-return-value-fix.patch" - sha256 "8aa608054f9b822a1fb7294a5087410f347ba632bbd4b46002aada76c289ed77" - end - - def install - # Re datarootdir override: Dumps two files in top-level share - # (autogen.sh and cudalt.py) which could cause conflict elsewhere. - system "./configure", "--enable-cpu", - "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--datarootdir=#{pkgshare}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/truecrack" - end -end diff --git a/Formula/truncate.rb b/Formula/truncate.rb deleted file mode 100644 index de2122bbb5abe..0000000000000 --- a/Formula/truncate.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Truncate < Formula - desc "Truncates a file to a given size" - homepage "https://www.vanheusden.com/truncate/" - url "https://github.com/flok99/truncate/archive/0.9.tar.gz" - sha256 "a959d50cf01a67ed1038fc7814be3c9a74b26071315349bac65e02ca23891507" - head "https://github.com/flok99/truncate.git" - - bottle do - cellar :any_skip_relocation - sha256 "99e774220ef9a0cdb89f4300c671ac9eb74840cf5ed2d0731f12d20e680ff939" => :mojave - sha256 "e1386eda3a93dddd528d1c3bf33b78c9c4da12039d7434b8db956e05eace9482" => :high_sierra - sha256 "c4c892f0afbdf3a401ccb0af2a7cf8c65b37ccfdfe2412dda5284faa94f562ff" => :sierra - sha256 "299b80454c20134c5d0916da25fb3d5f0b6843e620dac6babebe01a899253a69" => :el_capitan - sha256 "a9d1c87d6cfec42674f0e7db25b786ba100a04c8c0da318fd5f6299a7418843f" => :yosemite - sha256 "d8751674842b772bd3a5318c1234f262518d05d66a7fe3b06ce5f59b2176bba8" => :mavericks - end - - def install - system "make" - bin.install "truncate" - man1.install "truncate.1" - end - - test do - system "#{bin}/truncate", "-s", "1k", "testfile" - end -end diff --git a/Formula/tsung.rb b/Formula/tsung.rb deleted file mode 100644 index 14b9d84e4c734..0000000000000 --- a/Formula/tsung.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Tsung < Formula - desc "Load testing for HTTP, PostgreSQL, Jabber, and others" - homepage "http://tsung.erlang-projects.org/" - url "http://tsung.erlang-projects.org/dist/tsung-1.7.0.tar.gz" - sha256 "6394445860ef34faedf8c46da95a3cb206bc17301145bc920151107ffa2ce52a" - head "https://github.com/processone/tsung.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "bfd02c24483727832c624e5de2e289efec4eaf30b651be8da85696c1c896c091" => :mojave - sha256 "64dba403e11577b28f3a80114158b96d8c74f58d09a4d9930801674031d4a7d9" => :high_sierra - sha256 "e52abdb35507ceff03804d29a1ecf4e64d11e3345a9f095462cb653bba6cac6d" => :sierra - sha256 "11f06a010b1a56d7a751bf5379d7d053c1befdf41f73aabeb79330761566724d" => :el_capitan - end - - depends_on "erlang" - depends_on "gnuplot" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - system bin/"tsung", "status" - end -end diff --git a/Formula/tta.rb b/Formula/tta.rb deleted file mode 100644 index 692b17d7f5c65..0000000000000 --- a/Formula/tta.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Tta < Formula - desc "Lossless audio codec" - homepage "https://web.archive.org/web/20100131140204/true-audio.com/" - url "https://downloads.sourceforge.net/project/tta/tta/libtta/libtta-2.2.tar.gz" - sha256 "1723424d75b3cda907ff68abf727bb9bc0c23982ea8f91ed1cc045804c1435c4" - - bottle do - cellar :any_skip_relocation - sha256 "898e75423e5f2a1f872b7ce2e2258db686f09ea04edf56555b15c113f04e9141" => :mojave - sha256 "10ec40111e20f5168d67b02c52b464065e72fa48060c37a5fd86907062e8a997" => :high_sierra - sha256 "7a3c44b675bbaf81041c7eeacef622fab8fe3abbc83329a927a1ed0034231b1f" => :sierra - sha256 "0543d1561fe44fc6137f90076d247f16e6ac28e72413a7ba3bac08d422bb4e9c" => :el_capitan - sha256 "e25b0a3c395c62d2cb130f4817e405a9e09494c92c17fc71bf123d72b6da5f06" => :yosemite - sha256 "1b4bdda9786729fffe279cd17faea744108198064d2effcc42b078eb85862671" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-sse4" - system "make", "install" - end -end diff --git a/Formula/ttf2eot.rb b/Formula/ttf2eot.rb deleted file mode 100644 index 59c200ac573b1..0000000000000 --- a/Formula/ttf2eot.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ttf2eot < Formula - desc "Convert TTF files to EOT" - homepage "https://github.com/wget/ttf2eot" - url "https://github.com/wget/ttf2eot/archive/v0.0.3.tar.gz" - sha256 "f363c4f2841b6d0b0545b30462e3c202c687d002da3d5dec7e2b827a032a3a65" - - bottle do - cellar :any_skip_relocation - sha256 "54d328636bcb7d9fe1e28bf46115f0b718fc9f4d8e18c48b39d5b2e87bb3930b" => :mojave - sha256 "7b44ec925ee2bbeeaba775befc77c0c22f2f690ecd94edb72e471c631da80f43" => :high_sierra - sha256 "26f40d7a58de2ee396fc04dd47c41e9b65640570fa1ca8b71134dd88e6e88c06" => :sierra - sha256 "5fc89e642b7d51c0c7965d9a952d1b697f94b4ec16d7711ff37387979ce47f5d" => :el_capitan - end - - def install - system "make" - bin.install "ttf2eot" - end - - test do - cp "/Library/Fonts/Arial.ttf", testpath - system("#{bin}/ttf2eot < Arial.ttf > Arial.eot") - assert_predicate testpath/"Arial.eot", :exist? - end -end diff --git a/Formula/ttf2pt1.rb b/Formula/ttf2pt1.rb deleted file mode 100644 index 6d8bfa1dbf9f7..0000000000000 --- a/Formula/ttf2pt1.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Ttf2pt1 < Formula - desc "True Type Font to Postscript Type 1 converter" - homepage "https://ttf2pt1.sourceforge.io/" - url "https://downloads.sourceforge.net/ttf2pt1/ttf2pt1-3.4.4.tgz" - sha256 "ae926288be910073883b5c8a3b8fc168fde52b91199fdf13e92d72328945e1d0" - - bottle do - cellar :any_skip_relocation - sha256 "6cdd6394dba88c5c8acc8199443a3dcb8f3eaf357c8497d58b84c5a4e475cc5f" => :mojave - sha256 "180c25530da15c48af99ea59e20f40e18e7339e812a375c9d3760ad23429a085" => :high_sierra - sha256 "e70efa3a1b28b212ea2366ac50b33fbf48e9b7922d03f1a6b86965af87244bee" => :sierra - sha256 "0ef606dfb439ad46c5442b35458f009e864ee3270145c7be940581a5d272bc54" => :el_capitan - sha256 "65c1456cab73a91161e4dddbc4f04842029a810a8e4e4c396e90fbf039e61f60" => :yosemite - sha256 "c81f56318e2311c422c1a53647650478660ec16fc935380c01cf10c1f53edd73" => :mavericks - end - - def install - system "make", "all", "INSTDIR=#{prefix}" - bin.install "ttf2pt1" - man1.install "ttf2pt1.1" - end -end diff --git a/Formula/ttfautohint.rb b/Formula/ttfautohint.rb deleted file mode 100644 index a34825d72567b..0000000000000 --- a/Formula/ttfautohint.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Ttfautohint < Formula - desc "Auto-hinter for TrueType fonts" - homepage "https://www.freetype.org/ttfautohint/" - url "https://downloads.sourceforge.net/project/freetype/ttfautohint/1.8.2/ttfautohint-1.8.2.tar.gz" - sha256 "386741701596a8b2d5fb744901922ed2bd740490f7e6c81e5d7e83ac677889a7" - - bottle do - cellar :any - sha256 "5a56efdcfabb79895db80fd244c6578f5042e1aa30196a48fa51e530a9586899" => :mojave - sha256 "d44712b0e6a341fad7a535ab42f9f131994528352ce98bd838697110d7cfd67a" => :high_sierra - sha256 "754ef442537be790bc6e1fea4723cf007ba5a9bb78a56e5933c9c7026ff38fec" => :sierra - sha256 "f94c3bd7520d4af65b157c124957e3fbe765c55e2b316c45d761f4e441c3a273" => :el_capitan - end - - head do - url "https://repo.or.cz/ttfautohint.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "harfbuzz" - depends_on "libpng" - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--without-doc", - "--without-qt" - system "make", "install" - end - - test do - system "#{bin}/ttfautohint", "-V" - end -end diff --git a/Formula/tth.rb b/Formula/tth.rb deleted file mode 100644 index c051aa94ee40b..0000000000000 --- a/Formula/tth.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Tth < Formula - desc "TeX/LaTeX to HTML converter" - homepage "http://hutchinson.belmont.ma.us/tth/" - url "http://hutchinson.belmont.ma.us/tth/tth_distribution/tth_4.12.tgz" - sha256 "9d35c7414493faae79fb60866966862c58c2f37eefe08e77d226ecbd6d7acfa2" - - bottle do - cellar :any_skip_relocation - sha256 "9a2a248e2b669c30cdb8c085d94be14b3b2fe5092dd76a1f960fa74fb3e554f7" => :mojave - sha256 "5b06f95fbccf3847cbabee3dec070cae76763acef5b0801e0870359639a20880" => :high_sierra - sha256 "22b58ab69a94f8e031efa6662179b14a2ba57bf0582174eda559abc0e3cf9701" => :sierra - sha256 "d02002b9156fc175d253f30ac2e5e7fa29a32e3c109caeaa3367d33fa496eb8f" => :el_capitan - end - - def install - system ENV.cc, "-o", "tth", "tth.c" - bin.install %w[tth latex2gif ps2gif ps2png] - man1.install "tth.1" - end - - test do - assert_match(/version #{version}/, pipe_output("#{bin}/tth", "")) - end -end diff --git a/Formula/tty-clock.rb b/Formula/tty-clock.rb deleted file mode 100644 index 6ac9a7d61929e..0000000000000 --- a/Formula/tty-clock.rb +++ /dev/null @@ -1,28 +0,0 @@ -class TtyClock < Formula - desc "Digital clock in ncurses" - homepage "https://github.com/xorg62/tty-clock" - url "https://github.com/xorg62/tty-clock/archive/v2.3.tar.gz" - sha256 "343e119858db7d5622a545e15a3bbfde65c107440700b62f9df0926db8f57984" - head "https://github.com/xorg62/tty-clock.git" - - bottle do - cellar :any_skip_relocation - sha256 "eab206747869e0190d82dfa71d7763df4a3f202c3035f7bccb5b32fc52580989" => :mojave - sha256 "b3d2a19cdb38e0e156be552d6f9ca8926097300f17bbe6628b7443934d3e1cb1" => :high_sierra - sha256 "9b0e056ec6d86d9ba9cbd2abc02236607a6ad5601e7a656d10cad20182564315" => :sierra - sha256 "c0d981769811bf1c265e11702ea0d26bcf87102ac92896c04c14a91fbed1cc8c" => :el_capitan - sha256 "9341fb07070b665dc5f9593c1b4811ec734f7221afbde2547cee55fc9102aa1e" => :yosemite - end - - depends_on "pkg-config" => :build - - def install - ENV.append "LDFLAGS", "-lncurses" - system "make", "PREFIX=#{prefix}" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "#{bin}/tty-clock", "-i" - end -end diff --git a/Formula/tty-solitaire.rb b/Formula/tty-solitaire.rb deleted file mode 100644 index ce39e17b59a23..0000000000000 --- a/Formula/tty-solitaire.rb +++ /dev/null @@ -1,22 +0,0 @@ -class TtySolitaire < Formula - desc "Ncurses-based klondike solitaire game" - homepage "https://github.com/mpereira/tty-solitaire" - url "https://github.com/mpereira/tty-solitaire/archive/v1.1.1.tar.gz" - sha256 "146f9ed6ee9d79dfd936c213e3a413a967daba3978fb1021e05a1c52c7684e9c" - - bottle do - cellar :any_skip_relocation - sha256 "9433dbbb39b808bfbe06f1b58b1aff782ca2bdeced389aaf0207fee720cfb0ce" => :mojave - sha256 "6451237a79182add9dfa4678f54473adfac2a5fc47918d10eb188debcd5d9add" => :high_sierra - sha256 "f6df872618485b7e759b8de0d3e890d1e465b0fad7e2f0373227d98ed857ebea" => :sierra - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/ttysolitaire", "-h" - end -end diff --git a/Formula/ttyd.rb b/Formula/ttyd.rb deleted file mode 100644 index 31c3cc615daae..0000000000000 --- a/Formula/ttyd.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Ttyd < Formula - desc "Command-line tool for sharing terminal over the web" - homepage "https://github.com/tsl0922/ttyd" - url "https://github.com/tsl0922/ttyd/archive/1.4.2.tar.gz" - sha256 "ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315" - revision 1 - head "https://github.com/tsl0922/ttyd.git" - - bottle do - cellar :any - sha256 "63ff5fd136e1ee8abdb01958a7225e166a01b679ef379b848061e9904e4c8234" => :mojave - sha256 "63870bbeb2aff93c52a8c119de713fe06b13a3acecb637317f8cbb8fd2082ab2" => :high_sierra - sha256 "85453c4bedbd3a22303021360b43b0e4c9aca637ded605dfa8b29897e2b3ccf9" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "libwebsockets" - depends_on "openssl" - - def install - cmake_args = std_cmake_args + ["-DOPENSSL_ROOT_DIR=#{Formula["openssl"].opt_prefix}"] - system "cmake", ".", *cmake_args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ttyd --version") - end -end diff --git a/Formula/ttygif.rb b/Formula/ttygif.rb deleted file mode 100644 index cb3049dc0162c..0000000000000 --- a/Formula/ttygif.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Ttygif < Formula - desc "Converts a ttyrec file into gif files" - homepage "https://github.com/icholy/ttygif" - url "https://github.com/icholy/ttygif/archive/1.4.0.tar.gz" - sha256 "6ca3dc5dcade2bdcf8000068ae991eac518204960c157634d92f87248c3cee2a" - - bottle do - cellar :any_skip_relocation - sha256 "4e3e5a1116ac263b68ca7fb25b26b17d927a9135971de3340f44e4a9a4a2dc5e" => :mojave - sha256 "c8dbee8441c56e4ade77fc6990a1336e6017519760e2719813bc92f8e10eaf69" => :high_sierra - sha256 "f64ad6118dc421166dca05ac1ef2d146d545caddc49dcf1a17e06d3c9deee6fd" => :sierra - sha256 "c32e7ce8c456e02c9b945e9cca6252a071b68b9cda84651877481b54a76f6c1c" => :el_capitan - sha256 "6459139f3d5eb5a52aacf11d1774c0404a7947d0e87e674c2bba54724bc06bbf" => :yosemite - end - - depends_on "imagemagick" - depends_on "ttyrec" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - ENV["TERM_PROGRAM"] = "Something" - assert_match version.to_s, shell_output("#{bin}/ttygif --version") - end -end diff --git a/Formula/ttyrec.rb b/Formula/ttyrec.rb deleted file mode 100644 index 46e169b9f57a9..0000000000000 --- a/Formula/ttyrec.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ttyrec < Formula - desc "Terminal interaction recorder and player" - homepage "http://0xcc.net/ttyrec/" - url "http://0xcc.net/ttyrec/ttyrec-1.0.8.tar.gz" - sha256 "ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "fa4e19544555ebf7956beceaa656bb8aed894f26b82683a5db32b88501cc5a85" => :mojave - sha256 "8121debd07c4ecdd24d86fc7dadb00a7807e028f512418b5ba0d85768619628d" => :high_sierra - sha256 "0323b20a0905ad1c3a2f997714572d779bcf6db63d8798840c14f6a75fd70cd5" => :sierra - sha256 "ec05f403a1aa20da2e1fbd6f4d912b3d31fa1fd100c9adba68c928146a50bbc0" => :el_capitan - end - - resource "matrix.tty" do - url "http://0xcc.net/tty/tty/matrix.tty" - sha256 "76b8153476565c5c548aa04c2eeaa7c7ec8c1385bcf8b511c68915a3a126fdeb" - end - - def install - # macOS has openpty() in - # Reported by email to satoru@0xcc.net on 2017-12-20 - inreplace "ttyrec.c", "", "" - - system "make", "CFLAGS=#{ENV.cflags} -DHAVE_openpty" - bin.install %w[ttytime ttyplay ttyrec] - man1.install Dir["*.1"] - end - - test do - resource("matrix.tty").stage do - assert_equal "9\tmatrix.tty", shell_output("#{bin}/ttytime matrix.tty").strip - end - end -end diff --git a/Formula/tundra.rb b/Formula/tundra.rb deleted file mode 100644 index e57285294d238..0000000000000 --- a/Formula/tundra.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Tundra < Formula - desc "Code build system that tries to be fast for incremental builds" - homepage "https://github.com/deplinenoise/tundra" - url "https://github.com/deplinenoise/tundra/archive/v2.08.tar.gz" - sha256 "b27aa8c13a606559ab757f0409ed8260d3349424923926d3add50f58213d6ca6" - - bottle do - cellar :any_skip_relocation - sha256 "452cf94a919ac957eccbd47347bc94da67653acb5ec2020a7767fd50f6d9589e" => :mojave - sha256 "b9c54d89a948a457ad5cf5e70366c43f2efef5a43aa11fc136b6e6b0800039c5" => :high_sierra - sha256 "5a49d13377f30d7822376ac9668441139b5512172d00d71a2a62baf772bcdffb" => :sierra - end - - resource "gtest" do - url "https://github.com/google/googletest/archive/release-1.8.0.tar.gz" - sha256 "58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8" - end - - def install - (buildpath/"unittest/googletest").install resource("gtest") - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.c").write <<~'EOS' - #include - int main() { - printf("Hello World\n"); - return 0; - } - EOS - (testpath/"tundra.lua").write <<~'EOS' - Build { - Units = function() - local test = Program { - Name = "test", - Sources = { "test.c" }, - } - Default(test) - end, - Configs = { - { - Name = "macosx-clang", - DefaultOnHost = "macosx", - Tools = { "clang-osx" }, - }, - }, - } - EOS - system bin/"tundra2" - system "./t2-output/macosx-clang-debug-default/test" - end -end diff --git a/Formula/tunnel.rb b/Formula/tunnel.rb deleted file mode 100644 index 71b73cf7d4543..0000000000000 --- a/Formula/tunnel.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Tunnel < Formula - desc "Expose local servers to internet securely" - homepage "https://labstack.com/docs/tunnel" - url "https://github.com/labstack/tunnel-client/archive/v0.2.12.tar.gz" - sha256 "939ce5a0485c945b8e92eb99a29ae0a12ec46a66e59cef44ad9af2dbe2371163" - - bottle do - cellar :any_skip_relocation - sha256 "57a9c7581653336740728f5d9d75e6292f941844ba14c2b2e48060e8d52aad4e" => :mojave - sha256 "61e5d30fad5d2011f0bbe8eb9301565d0df9056b4a5dce65acbd5f88e6ba747f" => :high_sierra - sha256 "b5cf0fb1637e8d1342bf6a15e6bffe21e2a4d20f157401bafa36f596e8106aba" => :sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"tunnel", "./cmd/tunnel" - prefix.install_metafiles - end - - test do - begin - pid = fork do - $stdout.reopen("#{testpath}/out", "w") - exec bin/"tunnel", "8080" - end - sleep 5 - assert_match "labstack.me", (testpath/"out").read - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/tup.rb b/Formula/tup.rb deleted file mode 100644 index da57cb0a64cab..0000000000000 --- a/Formula/tup.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Tup < Formula - desc "File-based build system" - homepage "http://gittup.org/tup/" - url "https://github.com/gittup/tup/archive/v0.7.8.tar.gz" - sha256 "37baed2d12ef6ce66ce186dc5aa9bcf23098c35d3aee2dc25cb3177eee224b60" - head "https://github.com/gittup/tup.git" - - bottle do - cellar :any - sha256 "fe62bd2762c7ff15e628b6c241c8f6acd81d190c03136c6edce2fd76afafe9f0" => :mojave - sha256 "9a2e688be1a21af9fc0c2e9edb0e2a679eb7553356e59682037a760c6bd90b8d" => :high_sierra - sha256 "fc8a299e3ed77a756edbcb957343d1cc95594126f23514eea729649a7fcc6071" => :sierra - end - - depends_on "pkg-config" => :build - depends_on :osxfuse - - def install - ENV["TUP_LABEL"] = version - system "./build.sh" - bin.install "build/tup" - man1.install "tup.1" - doc.install (buildpath/"docs").children - pkgshare.install "contrib/syntax" - end - - test do - system "#{bin}/tup", "-v" - end -end diff --git a/Formula/tvnamer.rb b/Formula/tvnamer.rb deleted file mode 100644 index 89cdeb05553fd..0000000000000 --- a/Formula/tvnamer.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Tvnamer < Formula - desc "Automatic TV episode file renamer that uses data from thetvdb.com" - homepage "https://github.com/dbr/tvnamer" - url "https://github.com/dbr/tvnamer/archive/2.4.tar.gz" - sha256 "bddaba4b3887ab3b6777932457c8d8f65754b64de9a13b9987869e8e78573bb2" - revision 1 - head "https://github.com/dbr/tvnamer.git" - - bottle do - cellar :any_skip_relocation - sha256 "4f9eaff367dac5d210af44c8a1b768bbd34b5584f755980a9e1b6348c983263f" => :mojave - sha256 "96c779980beab409c042f22ed2fecfaca0f9d10d3ca2421ec9fdad94e6011363" => :high_sierra - sha256 "295f7a2e93d3aa599cf23bcf0c90630d0ab5b16508af7b90813c8582623ac085" => :sierra - end - - depends_on "python" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/e1/0f/f8d5e939184547b3bdc6128551b831a62832713aa98c2ccdf8c47ecc7f17/certifi-2018.8.24.tar.gz" - sha256 "376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "requests-cache" do - url "https://files.pythonhosted.org/packages/1a/cf/12349c7113b252d9a0b26d497d3349baeb6c8f293b440e55a00e7fa6e4a4/requests-cache-0.4.13.tar.gz" - sha256 "fe561ca119879bbcfb51f03a35e35b425e18f338248e59fd5cf2166c77f457a2" - end - - resource "tvdb_api" do - url "https://files.pythonhosted.org/packages/ba/c5/abcff2dd75e63daae3466fffd05a28428e57828f8b878125571a8e8343a8/tvdb_api-2.0.tar.gz" - sha256 "b1de28a5100121d91b1f6a8ec7e86f2c4bdf48fb22fab3c6fe21e7fb7346bf8f" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - raw_file = testpath/"brass.eye.s01e01.avi" - expected_file = testpath/"Brass Eye - [01x01] - Animals.avi" - touch raw_file - system bin/"tvnamer", "-b", raw_file - assert_predicate expected_file, :exist? - end -end diff --git a/Formula/twarc.rb b/Formula/twarc.rb deleted file mode 100644 index 37c714f82c64b..0000000000000 --- a/Formula/twarc.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Twarc < Formula - include Language::Python::Virtualenv - - desc "Command-line tool and Python library for archiving Twitter JSON" - homepage "https://github.com/DocNow/twarc" - url "https://files.pythonhosted.org/packages/e1/f2/2d79badd5fab00826d5fb2a66b0d1923933ef937338edbdbdd01ae3f5181/twarc-1.6.1.tar.gz" - sha256 "2dc79f58859ceb609a139ae90296b9eff754a2219a0b3faa6cd794d2faf6c18b" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "efafb2a333928c22287dcdb2bc5f533ba974f06301cc66786a2f5d1281004510" => :mojave - sha256 "cc8a3acf5a667b44b9bab745f1169663a4e3bf1a76d9f0453be3c5140a63794a" => :high_sierra - sha256 "a7bd954c8c173983e004079fba76021d9d19708c62ecd2da9d049fa518c959ac" => :sierra - end - - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", "twarc" - venv.pip_install_and_link buildpath - end - - test do - assert_equal "usage: twarc [-h] [--log LOG] [--consumer_key CONSUMER_KEY]", - shell_output("#{bin}/twarc -h").chomp.split("\n").first - end -end diff --git a/Formula/twemcache.rb b/Formula/twemcache.rb deleted file mode 100644 index 527fe17ec176d..0000000000000 --- a/Formula/twemcache.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Twemcache < Formula - desc "Twitter fork of memcached" - homepage "https://github.com/twitter/twemcache" - url "https://github.com/twitter/twemcache/archive/v2.6.3.tar.gz" - sha256 "ab05927f7d930b7935790450172187afedca742ee7963d5db1e62164e7f4c92b" - head "https://github.com/twitter/twemcache.git" - - bottle do - cellar :any - sha256 "3bb92984e15ff8517bc60d961407b9a8799373e4785f419dc32fd4cc83d1d08f" => :mojave - sha256 "7992ac700ca1044335e84a77d09152b2b4a214dd595064f462049dd0ad65d92e" => :high_sierra - sha256 "cd20b77b8e04478fb459fcd3b31bb49f4c6015362420b8ffd726305af9763895" => :sierra - sha256 "fd57a26c75cb67d097894a9c757bd50b2799b1a6e8ba20510345a1f1ef5eee61" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libevent" - - def install - system "autoreconf", "-fvi" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system bin/"twemcache", "--help" - end -end diff --git a/Formula/twine-pypi.rb b/Formula/twine-pypi.rb deleted file mode 100644 index 0450221841feb..0000000000000 --- a/Formula/twine-pypi.rb +++ /dev/null @@ -1,119 +0,0 @@ -class TwinePypi < Formula - include Language::Python::Virtualenv - - desc "Utilities for interacting with PyPI" - homepage "https://github.com/pypa/twine" - url "https://files.pythonhosted.org/packages/29/4d/801bbad5968e674c1ca047118025243a475f986a6f5b3ca36e5afece0f9f/twine-1.12.1.tar.gz" - sha256 "7d89bc6acafb31d124e6e5b295ef26ac77030bf098960c2a4c4e058335827c5c" - head "https://github.com/pypa/twine.git" - - bottle do - cellar :any_skip_relocation - sha256 "cad1920ab974e60b495cb07e1e94fe6359076d42d030a80f54bce608ba97875e" => :mojave - sha256 "340f83f5f1326ae14a5de04cddc6a2a83999dc4dc23ff605b037e258717469a3" => :high_sierra - sha256 "cc3b4a6cd497c6d0bf925d86a3390f12a59797e3286ea2ed64604b20b0db9b8e" => :sierra - end - - depends_on "python" - - resource "bleach" do - url "https://files.pythonhosted.org/packages/10/46/14ab80c1a82b038a548d9155ea7ac11592e6bf6389aa9244e6947d085ed4/bleach-3.0.1.tar.gz" - sha256 "c39d25d9ada62009853b0281efdc35a792db8cdee89465433e6d0aaaf5defc3f" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/e1/0f/f8d5e939184547b3bdc6128551b831a62832713aa98c2ccdf8c47ecc7f17/certifi-2018.8.24.tar.gz" - sha256 "376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cmarkgfm" do - url "https://files.pythonhosted.org/packages/e2/a3/4021fbc17c5afe7f307d14eba0d6899a8e66b351ab65649b1c89c50a836d/cmarkgfm-0.4.2.tar.gz" - sha256 "f20900f16377f2109783ae9348d34bc80530808439591c3d3df73d5c7ef1a00c" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz" - sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz" - sha256 "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "pkginfo" do - url "https://files.pythonhosted.org/packages/39/c9/111ececbeed8e69cd1b6bec79a32a0b0f6074038a4244e58e285ad278248/pkginfo-1.4.2.tar.gz" - sha256 "5878d542a4b3f237e359926384f1dde4e099c9f5525d236b1840cf704fa8d474" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz" - sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" - end - - resource "readme_renderer" do - url "https://files.pythonhosted.org/packages/aa/b6/384c1dfe9b3ac3404817ac32fa44abbe0b51c2494ba118e0ad7ff3e72efb/readme_renderer-22.0.tar.gz" - sha256 "237ca8705ffea849870de41101dba41543561da05c0ae45b2f1c547efa9843d2" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz" - sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/86/f9/e80fa23edca6c554f1994040064760c12b51daff54b55f9e379e899cd3d4/requests-toolbelt-0.8.0.tar.gz" - sha256 "f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/5a/53/05ac96b04b6417d5d8d4638ac22e39b39a8c8e5e2a35cda5e8d2efa275c3/tqdm-4.26.0.tar.gz" - sha256 "df02c0650160986bac0218bb07952245fc6960d23654648b5d5526ad5a4128c9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/3c/d2/dc5471622bd200db1cd9319e02e71bc655e9ea27b8e0ce65fc69de0dac15/urllib3-1.23.tar.gz" - sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - def install - virtualenv_install_with_resources - pkgshare.install "tests/fixtures/twine-1.5.0-py2.py3-none-any.whl" - end - - test do - wheel = "twine-1.5.0-py2.py3-none-any.whl" - cmd = "#{bin}/twine upload -uuser -ppass #{pkgshare}/#{wheel} 2>&1" - assert_match(/Uploading.*#{wheel}.*HTTPError: 403/m, shell_output(cmd, 1)) - end -end diff --git a/Formula/two-lame.rb b/Formula/two-lame.rb deleted file mode 100644 index a5e9e2a92b2f5..0000000000000 --- a/Formula/two-lame.rb +++ /dev/null @@ -1,22 +0,0 @@ -class TwoLame < Formula - desc "Optimized MPEG Audio Layer 2 (MP2) encoder" - # Homepage down since at least December 2015 - # homepage "http://www.twolame.org/" - homepage "https://sourceforge.net/projects/twolame/" - url "https://downloads.sourceforge.net/twolame/twolame-0.3.13.tar.gz" - sha256 "98f332f48951f47f23f70fd0379463aff7d7fb26f07e1e24e42ddef22cc6112a" - - bottle do - cellar :any - rebuild 1 - sha256 "3e1206ffe2663c75cc8def2832a0b36374bd1c548f234e178462219536abf539" => :mojave - sha256 "34e26fc01f8c195e0b410bf3756cb283d86417f1b1d4ec0ac799441976601f78" => :high_sierra - sha256 "f1138207ebf9a6e1a95ebd553b3f7a8c91ba7546d812c313fa1f3beac8d593c9" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/twoping.rb b/Formula/twoping.rb deleted file mode 100644 index afcbb2655ff8d..0000000000000 --- a/Formula/twoping.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Twoping < Formula - desc "Ping utility to determine directional packet loss" - homepage "https://www.finnie.org/software/2ping/" - url "https://www.finnie.org/software/2ping/2ping-4.3.tar.gz" - sha256 "d729c021ed5bcd29137da520a465632e19cf4c4339e0426546593379a570327e" - head "https://github.com/rfinnie/2ping.git" - - bottle do - cellar :any_skip_relocation - sha256 "263a94b215874f6bcc0478cbc14d3a83e656ba4428d2b9d4f0031782a2b5fdda" => :mojave - sha256 "ede1052f3ad05e51c653d49935e2f9a1be9b7bc39ee5f77da20e5fc81ffa3dd7" => :high_sierra - sha256 "ede1052f3ad05e51c653d49935e2f9a1be9b7bc39ee5f77da20e5fc81ffa3dd7" => :sierra - end - - depends_on "python" - - def install - pyver = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{pyver}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - man1.install "doc/2ping.1" - man1.install_symlink "2ping.1" => "2ping6.1" - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - plist_options :manual => "2ping --listen", :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/2ping - --listen - --quiet - - UserName - nobody - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - system bin/"2ping", "-c", "5", "test.2ping.net" - end -end diff --git a/Formula/twtxt.rb b/Formula/twtxt.rb deleted file mode 100644 index bc3a4bbec2d5e..0000000000000 --- a/Formula/twtxt.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Twtxt < Formula - desc "Decentralised, minimalist microblogging service for hackers" - homepage "https://github.com/buckket/twtxt" - url "https://github.com/buckket/twtxt/archive/v1.2.3.tar.gz" - sha256 "73b9d4988f96cc969c0c50ece0e9df12f7385735db23190e40c0d5e16f7ccd8c" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "6c948ba92af7f299cc6acfdcdd6893a9b20780ef149b6fdb7d575e01c7ea0aaf" => :mojave - sha256 "f963596e688a14b0623e9dea3eaf6409735c8368f3dce28de620f399717daa78" => :high_sierra - sha256 "cb5e432d05084bfa411569f25516766f4f0daba7d6d290c027d285ff7db3e895" => :sierra - sha256 "e5f0349895e6ace478d6e6d1821502fbc77232adb44a2f6467087518aa03eace" => :el_capitan - end - - depends_on "python" - - resource "aiohttp" do - url "https://files.pythonhosted.org/packages/c0/b9/853b158f5cb5d218daaff0fb0dbc2bd7de45b2c6c5f563dff0ee530ec52a/aiohttp-2.3.10.tar.gz" - sha256 "8adda6583ba438a4c70693374e10b60168663ffa6564c5c75d3c7a9055290964" - - # Python 3.7 compat - patch :DATA - end - - resource "async_timeout" do - url "https://files.pythonhosted.org/packages/35/82/6c7975afd97661e6115eee5105359ee191a71ff3267fde081c7c8d05fae6/async-timeout-3.0.0.tar.gz" - sha256 "b3c0ddc416736619bd4a95ca31de8da6920c3b9a140c64dbef2b2fa7bf521287" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "humanize" do - url "https://files.pythonhosted.org/packages/8c/e0/e512e4ac6d091fc990bbe13f9e0378f34cf6eecd1c6c268c9e598dcf5bb9/humanize-0.5.1.tar.gz" - sha256 "a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "multidict" do - url "https://files.pythonhosted.org/packages/9d/b9/3cf1b908d7af6530209a7a16d71ab2734a736c3cdf0657e3a06d0209811e/multidict-4.3.1.tar.gz" - sha256 "5ba766433c30d703f6b2c17eb0b6826c6f898e5f58d89373e235f07764952314" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "yarl" do - url "https://files.pythonhosted.org/packages/43/b8/057c3e5b546ff4b24263164ecda13f6962d85c9dc477fcc0bcdcb3adb658/yarl-1.2.6.tar.gz" - sha256 "c8cbc21bbfa1dd7d5386d48cc814fe3d35b80f60299cdde9279046f399c3b0d8" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - # If the test needs to be updated, more users can be found here: - # https://github.com/mdom/we-are-twtxt/blob/master/we-are-twtxt.txt - test do - ENV["LC_ALL"] = "en_US.UTF-8" - ENV["LANG"] = "en_US.UTF-8" - (testpath/"config").write <<~EOS - [twtxt] - nick = homebrew - twtfile = twtxt.txt - [following] - abliss = https://abliss.keybase.pub/twtxt.txt#7a778276dd852edc65217e759cba637a28b4426b - EOS - (testpath/"twtxt.txt").write <<~EOS - 2016-02-05T18:00:56.626750+00:00 Homebrew speaks! - EOS - assert_match "PGP", shell_output("#{bin}/twtxt -c config timeline") - end -end - -__END__ -diff --git a/setup.py b/setup.py -index 9ca33d1..05b65f3 100644 ---- a/setup.py -+++ b/setup.py -@@ -63,8 +63,7 @@ with codecs.open(os.path.join(os.path.abspath(os.path.dirname( - - - install_requires = ['chardet', 'multidict>=4.0.0', -- 'async_timeout>=1.2.0', 'yarl>=1.0.0', -- 'idna-ssl>=1.0.0'] -+ 'async_timeout>=1.2.0', 'yarl>=1.0.0'] - - - def read(f): diff --git a/Formula/txr.rb b/Formula/txr.rb deleted file mode 100644 index f30232343b09c..0000000000000 --- a/Formula/txr.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Txr < Formula - desc "Original, new programming language for convenient data munging" - homepage "https://www.nongnu.org/txr/" - url "http://www.kylheku.com/cgit/txr/snapshot/txr-198.tar.bz2" - sha256 "82f53cd14b2cd60a9d0faed49ca14d42f5e212d2f05310c54b8a041a9d28ebf4" - head "http://www.kylheku.com/git/txr", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "896a215273823e5d0fc3a3169b85fa669f81e65e1a2e8a8d691896cdb73e3029" => :mojave - sha256 "80a3df0768847b56f4d7f9e06db6ffe0e248f6d6be33aaaaaf305202bdbf1a7e" => :high_sierra - sha256 "69ac09578a8a6e2aa8113b6795553b9be2266ee2f4803435d0904658992b8a7e" => :sierra - sha256 "164024941a33530d80cfedf4f0b3f585863686dbe623036bcfde4d9112276b5e" => :el_capitan - end - - def install - ENV.deparallelize - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_equal "3", shell_output(bin/"txr -p '(+ 1 2)'").chomp - end -end diff --git a/Formula/txt2tags.rb b/Formula/txt2tags.rb deleted file mode 100644 index d7efadd17c3e5..0000000000000 --- a/Formula/txt2tags.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Txt2tags < Formula - desc "Conversion tool to generating several file formats" - homepage "https://txt2tags.org/" - url "https://github.com/txt2tags/txt2tags/archive/2.6.tar.gz" - sha256 "c87b911ac5cc97dd2fdb6067601cf4fbd0094a065f6b7a593142fa75e3a924c1" - revision 1 - - bottle :unneeded - - def install - bin.install "txt2tags" - man1.install "doc/English/manpage.man" => "txt2tags.1" - end - - test do - (testpath/"test.txt").write("\n= Title =") - system bin/"txt2tags", "-t", "html", "--no-headers", "test.txt" - assert_match %r{

    Title

    }, File.read("test.html") - end -end diff --git a/Formula/typesafe-activator.rb b/Formula/typesafe-activator.rb deleted file mode 100644 index 11523d035333c..0000000000000 --- a/Formula/typesafe-activator.rb +++ /dev/null @@ -1,22 +0,0 @@ -class TypesafeActivator < Formula - desc "Tools for working with Lightbend Reactive Platform" - homepage "https://www.lightbend.com/community/core-tools/activator-and-sbt" - url "https://downloads.typesafe.com/typesafe-activator/1.3.12/typesafe-activator-1.3.12-minimal.zip" - sha256 "d5037bcc2793011a03807a123035d2b3dafde32bcf0fab9112cb958a59ad9386" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm Dir["bin/*.bat"] # Remove Windows .bat files - libexec.install Dir["libexec/*"] - bin.install Dir["bin/*"] - chmod 0755, bin/"activator" - end - - test do - out = shell_output("#{bin}/activator -help", 1).split("\n")[0] - assert_equal "Usage: activator [options]", out - end -end diff --git a/Formula/typescript.rb b/Formula/typescript.rb deleted file mode 100644 index 9d2bd32653a7e..0000000000000 --- a/Formula/typescript.rb +++ /dev/null @@ -1,38 +0,0 @@ -require "language/node" - -class Typescript < Formula - desc "Language for application scale JavaScript development" - homepage "https://www.typescriptlang.org/" - url "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz" - sha256 "98cfaa85ca3e1f46cd2c263d1ddcbfd689df46eb3183ca4aafe0d1af283ae298" - head "https://github.com/Microsoft/TypeScript.git" - - bottle do - cellar :any_skip_relocation - sha256 "70885ba86ba6c2e0443542fb340e3960cb04eaefb09541f87fa73c25d6eaa3c2" => :mojave - sha256 "7cfe5421f2f71150ba6a6fdc96c53d10fdb52c68386adb722b71e4f3ec5b81f2" => :high_sierra - sha256 "1aeba83d0e9ea54b17d2aa6f4b04482c0af6bb55c9e17421b435f71cb3dae442" => :sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.ts").write <<~EOS - class Test { - greet() { - return "Hello, world!"; - } - }; - var test = new Test(); - document.body.innerHTML = test.greet(); - EOS - - system bin/"tsc", "test.ts" - assert_predicate testpath/"test.js", :exist?, "test.js was not generated" - end -end diff --git a/Formula/typespeed.rb b/Formula/typespeed.rb deleted file mode 100644 index 479e24a077547..0000000000000 --- a/Formula/typespeed.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Typespeed < Formula - desc "Zap words flying across the screen by typing them correctly" - homepage "https://typespeed.sourceforge.io" - url "https://downloads.sourceforge.net/project/typespeed/typespeed/0.6.5/typespeed-0.6.5.tar.gz" - sha256 "5c860385ceed8a60f13217cc0192c4c2b4705c3e80f9866f7d72ff306eb72961" - - bottle do - sha256 "49c54c15fa8204ca5ae373f0a1995c01b7b6e24de0ab0af7d8081e9f3b229258" => :mojave - sha256 "70fe987eeaabcf8e94996d56a478c1aac14781f2475337476ff2dc87543bb602" => :high_sierra - sha256 "8c4af1a3e4e8c32eab5da01fc3b30604eaad86bf84f4a96af7878599c92a4a36" => :sierra - sha256 "82223614505b9fac677ba4ac4ad9f3b646597cddde604f8c981cc000b8ed7bf6" => :el_capitan - sha256 "23d3acaedb26f5bedccc2186dec138679fdea40f036edd57ce84ff363c082206" => :yosemite - sha256 "2dca5154739dc08e5a3ac88acfed5377f7547124cfceb6e4e86e9a1bf2fa531a" => :mavericks - end - - def install - # Fix the hardcoded gcc. - inreplace "src/Makefile.in", "gcc", ENV.cc - inreplace "testsuite/Makefile.in", "gcc", ENV.cc - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/u-boot-tools.rb b/Formula/u-boot-tools.rb deleted file mode 100644 index bd61bd0a75843..0000000000000 --- a/Formula/u-boot-tools.rb +++ /dev/null @@ -1,29 +0,0 @@ -class UBootTools < Formula - desc "Universal boot loader" - homepage "https://www.denx.de/wiki/U-Boot/" - url "http://ftp.denx.de/pub/u-boot/u-boot-2018.07.tar.bz2" - sha256 "9f10df88bc91b35642e461217f73256bbaeeca9ae2db8db56197ba5e89e1f6d4" - - bottle do - cellar :any - rebuild 1 - sha256 "ef92748f2dce7b805eb70b9e6381d15c4897206e62cc17041a0ec0ff76bf9078" => :mojave - sha256 "c9af409154e2a3c626cab9711d1538b99eec39f977b11f2abf75ca34bae755e9" => :high_sierra - sha256 "baef3b783798fee71d0623fc1387954cf1e190d501617ae56238bc75180fc2da" => :sierra - end - - depends_on "openssl" - - def install - system "make", "sandbox_defconfig" - system "make", "tools" - bin.install "tools/mkimage" - bin.install "tools/dumpimage" - man1.install "doc/mkimage.1" - end - - test do - system bin/"mkimage", "-V" - system bin/"dumpimage", "-V" - end -end diff --git a/Formula/u/u-boot-tools.rb b/Formula/u/u-boot-tools.rb new file mode 100644 index 0000000000000..bcedc882a7160 --- /dev/null +++ b/Formula/u/u-boot-tools.rb @@ -0,0 +1,46 @@ +class UBootTools < Formula + desc "Universal boot loader" + homepage "https://www.denx.de/wiki/U-Boot/" + url "https://ftp.denx.de/pub/u-boot/u-boot-2025.10.tar.bz2" + sha256 "b4f032848e56cc8f213ad59f9132c084dbbb632bc29176d024e58220e0efdf4a" + license all_of: ["GPL-2.0-only", "GPL-2.0-or-later", "BSD-3-Clause"] + + livecheck do + url "https://ftp.denx.de/pub/u-boot/" + regex(/href=.*?u-boot[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "eae837cdcebd80c439d182556a223200722850c402c6646a5999a848f07b4805" + sha256 cellar: :any, arm64_sequoia: "45d6adf6ae44e41ef0d82ae6280f84fd229b5488fc34d02a20ae657d8880b501" + sha256 cellar: :any, arm64_sonoma: "1fca5fdd813fffeddbcc88be551b6a262205968a04611c3ba2f234d5bfe5662e" + sha256 cellar: :any, sonoma: "3fe021a9ce76a2b2565e530e1fd5a5cc59ced4f36cf80ac03fc571e100caadf2" + sha256 cellar: :any_skip_relocation, arm64_linux: "da73a2faec910b22297eb01f8013306d60f1ca186e6cf5274f1beb807acfbae7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52eec93eb9c5d038ff7405c35ce0cd8f5957c6662da009fa202df86d4da63246" + end + + depends_on "coreutils" => :build # Makefile needs $(gdate) + depends_on "openssl@3" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + # Replace keyword not present in make 3.81 + inreplace "Makefile", "undefine MK_ARCH", "unexport MK_ARCH" + + # Disable mkeficapsule + inreplace "configs/tools-only_defconfig", "CONFIG_TOOLS_MKEFICAPSULE=y", "CONFIG_TOOLS_MKEFICAPSULE=n" + + system "make", "tools-only_defconfig" + system "make", "tools-only", "NO_SDL=1" + bin.install "tools/mkimage" + bin.install "tools/dumpimage" + man1.install "doc/mkimage.1" + end + + test do + system bin/"mkimage", "-V" + system bin/"dumpimage", "-V" + end +end diff --git a/Formula/u/uade.rb b/Formula/u/uade.rb new file mode 100644 index 0000000000000..fa8b2984b724d --- /dev/null +++ b/Formula/u/uade.rb @@ -0,0 +1,84 @@ +class Uade < Formula + desc "Play Amiga tunes through UAE emulation" + homepage "https://zakalwe.fi/uade/" + license "GPL-2.0-only" + + stable do + url "https://zakalwe.fi/uade/uade3/uade-3.05.tar.bz2" + sha256 "1a2dd9fdf8cf47c4587dcc09df16f1bb49374a9e7f8f53cdb4816d50c87e4f4c" + + resource "libzakalwe" do + url "https://gitlab.com/hors/libzakalwe/-/archive/v1.0.0/libzakalwe-v1.0.0.tar.bz2" + sha256 "cb503c557b04f34069654083963a056deb85a6dea25ba4b69aaaa2bbf7290a98" + end + + resource "bencode-tools" do + url "https://gitlab.com/heikkiorsila/bencodetools/-/archive/v1.0.1/bencodetools-v1.0.1.tar.bz2" + sha256 "e41ae682525cf335b5f5ec0ba9b954abfe7b448e8ed13e2aa2a44e49fce2ca12" + end + end + + livecheck do + url "https://zakalwe.fi/uade/download.html" + regex(/href=.*?uade[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0f30d852e9fac327855a1871f8b00ffbb476b03d32162be3e7d690982eec541a" + sha256 arm64_sequoia: "bd88580d311132e6f8989d53759a3f4014c3bd2a799a4beeda45917443bd24b1" + sha256 arm64_sonoma: "ebc44bdc2b0985767cfc0e758b626bdc7a4fd25d46fd131f9a345b49f1637170" + sha256 arm64_ventura: "dd63456268436dad18fad3257239338d9be764a2c65f66a116ec38dc9ad523c7" + sha256 sonoma: "8efa9e1dc22e259d2608f0300414f326405fa336fa8bc7323a1894cc9eba424f" + sha256 ventura: "c6c24f4dad586bede8ea9cb93103e5b7acdd4694503ffaa00bc66022022c2365" + sha256 arm64_linux: "8057cf30b698dd3e7756646839dc75910047f24f7752149e565499f86eed29f0" + sha256 x86_64_linux: "57119bf1df980db377ed2a47e16a386060756151ca74a3506bac17685834c4b9" + end + + head do + url "https://gitlab.com/uade-music-player/uade.git", branch: "master" + + resource "libzakalwe" do + url "https://gitlab.com/hors/libzakalwe.git", branch: "master" + end + + resource "bencode-tools" do + url "https://gitlab.com/heikkiorsila/bencodetools.git", branch: "master" + end + end + + depends_on "pkgconf" => :build + depends_on "libao" + + def install + lib.mkdir # for libzakalwe + + resource("libzakalwe").stage do + # Workaround for Xcode 14.3 + if DevelopmentTools.clang_build_version >= 1403 + inreplace "Makefile", "CFLAGS = -W -Wall", "CFLAGS = -Wno-implicit-function-declaration -W -Wall" + end + + inreplace "Makefile", "-Wl,-soname,$@", "-Wl" + system "./configure", *std_configure_args + system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}" + end + + resource("bencode-tools").stage do + system "./configure", "--prefix=#{prefix}", "--without-python" + system "make" + system "make", "install" + end + + system "./configure", "--prefix=#{prefix}", + "--libzakalwe-prefix=#{prefix}", + "--without-write-audio" + system "make", "install" + end + + test do + output = shell_output("#{bin}/uade123 --get-info #{test_fixtures("test.mp3")} 2>&1", 1).chomp + assert_equal "Unknown format: #{test_fixtures("test.mp3")}", output + + assert_match version.to_s, shell_output("#{bin}/uade123 --version") + end +end diff --git a/Formula/u/ubertooth.rb b/Formula/u/ubertooth.rb new file mode 100644 index 0000000000000..8f5eb928577f3 --- /dev/null +++ b/Formula/u/ubertooth.rb @@ -0,0 +1,45 @@ +class Ubertooth < Formula + desc "Host tools for Project Ubertooth" + homepage "https://greatscottgadgets.com/ubertoothone/" + url "https://github.com/greatscottgadgets/ubertooth/releases/download/2020-12-R1/ubertooth-2020-12-R1.tar.xz" + version "2020-12-R1" + sha256 "93a4ce7af8eddcc299d65aff8dd3a0455293022f7fea4738b286353f833bf986" + license "GPL-2.0-or-later" + head "https://github.com/greatscottgadgets/ubertooth.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7013ad79a01ca1cf9d46d00110bc15a9610de9a2bf80a7951244ab2cfdf1adb7" + sha256 cellar: :any, arm64_sequoia: "fa7215f06163e3333e33b92dd89476ced1eaa8f7ca3c2f5e790494832cb73cac" + sha256 cellar: :any, arm64_sonoma: "640cbd39fd3290bec4eecaef753ba84135b5c000b08d7c0fe455971df354390e" + sha256 cellar: :any, arm64_ventura: "dbf1e2cf18fba265c0119a87fd659ee8331d2bd54dcdd3bf07eabda6de17cb41" + sha256 cellar: :any, sonoma: "50f74c97eecde210eeb23a86df867e4824034605544048ae9e39f0e9bfd2d532" + sha256 cellar: :any, ventura: "c6acf9ec2c33e2fdf289a33f52e1ca4e9c2e10c81225a06d6c41ffd9cd730fba" + sha256 cellar: :any_skip_relocation, arm64_linux: "452dcee2cfe766cd5b230dd29fa5c8e2691c15f0d9850e64afe45cdda1cf43d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2cd546fd818a705d9da6c089bf001471ca9d46b03fd6241a2528f0da22c71b9c" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libbtbb" + depends_on "libusb" + + def install + args = ["-DCMAKE_INSTALL_RPATH=#{rpath}", "-DENABLE_PYTHON=OFF"] + # Workaround for CMake 4 until fixed upstream, https://github.com/greatscottgadgets/ubertooth/pull/546 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + # Tell CMake to install udev rules in HOMEBREW_PREFIX/etc on Linux because it defaults to /etc. + args << "-DUDEV_RULES_PATH=#{etc}/udev/rules.d" unless OS.mac? + + system "cmake", "-S", "host", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Most ubertooth utilities require an ubertooth device present. + system bin/"ubertooth-rx", "-i", File::NULL + end +end diff --git a/Formula/u/ubi.rb b/Formula/u/ubi.rb new file mode 100644 index 0000000000000..f566e2a5cbc42 --- /dev/null +++ b/Formula/u/ubi.rb @@ -0,0 +1,35 @@ +class Ubi < Formula + desc "Universal Binary Installer" + homepage "https://github.com/houseabsolute/ubi" + url "https://github.com/houseabsolute/ubi/archive/refs/tags/v0.8.4.tar.gz" + sha256 "8f58d2dd267eb9dab99f59e4a9fdc2341f50bafedb1589f9773bc52ca2346f74" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/houseabsolute/ubi.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6c6f9a699bfde76300fc1532f435bdd4c7939959b2abdda9afbc313287eb571e" + sha256 cellar: :any, arm64_sequoia: "ada637809495b61fb3b3b283b6841924e7692422a37a70a398684179b0f3bb6b" + sha256 cellar: :any, arm64_sonoma: "1fefb670ddea8dd453a69fd9389633d8f29ae224d1877a0dd8a98453ab4badf7" + sha256 cellar: :any, sonoma: "ef9528fb21add881d327a9fb527b5a72a08762850bdaeff30a9441847cf70dc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "40e2f9b06fb19d322f130bb10bc68e6a15a97c28f345179b77cad2f7b59d2e40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d3c99cd2d5f4ed6c15ddaa75d592aa6ad821f7ec28ad5c87f9c9ed053214134" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "xz" # required for lzma support + + uses_from_macos "bzip2" + + def install + system "cargo", "install", *std_cargo_args(path: "ubi-cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ubi --version") + + system bin/"ubi", "--project", "houseabsolute/precious" + system testpath/"bin/precious", "--version" + end +end diff --git a/Formula/u/ucg.rb b/Formula/u/ucg.rb new file mode 100644 index 0000000000000..92bc5ba57d67b --- /dev/null +++ b/Formula/u/ucg.rb @@ -0,0 +1,80 @@ +class Ucg < Formula + desc "Tool for searching large bodies of source code (like grep)" + homepage "https://gvansickle.github.io/ucg/" + license "GPL-3.0-or-later" + + stable do + url "https://github.com/gvansickle/ucg/releases/download/0.3.3/universalcodegrep-0.3.3.tar.gz" + sha256 "116d832bbc743c7dd469e5e7f1b20addb3b7a08df4b4441d59da3acf221caf2d" + + # Fix Xcode 9 compilation issue: https://github.com/gvansickle/ucg/issues/118 + # Patch adapted from upstream: https://github.com/gvansickle/ucg/commit/395f89 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/ucg/xcode9.patch" + sha256 "3005fda5923cfa3093ce53ad84435fd7a5974f960b2e222e0e59afa90414af90" + end + + # Backport fix for Linux + # Ref: https://github.com/gvansickle/ucg/commit/619be108a10b49cb22441c1cbf378ea630237a2d + patch :DATA + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, sonoma: "1cfae5edabc50ba8598a2212217b22f8d7b1d81c118f86e52ce94b1b889a98a4" + sha256 cellar: :any, ventura: "afbb657bc288953de91236ba95f3c609ba4e411e8602f0efda43770422436c43" + sha256 cellar: :any, monterey: "3ffc7fcd491433d72238d232acc46f48e08e1c85b40a147f67dabb7de8ec830d" + sha256 cellar: :any, big_sur: "ea472cd9d4ecff1791a8df22e8207387957cad4af9b367698887772b98f434ff" + sha256 cellar: :any, catalina: "2e18cfd35ea53d5326a69f3d21cf32c2e850cd864735e3e45cd645d85e350ec7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e2db85a685f30bdda52dbc415278d3e070fc3b8aa8dd5529cede481d5e5e8eb" + end + + head do + url "https://github.com/gvansickle/ucg.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on arch: :x86_64 # https://github.com/gvansickle/ucg/issues/123 + depends_on "pcre2" + + on_macos do + depends_on "argp-standalone" => :build + + # Can be undeprecated if upstream decides to support arm64 macOS + # https://docs.brew.sh/Support-Tiers#future-macos-support + # TODO: Make `depends_on :linux` when removing macOS support + deprecate! date: "2025-09-25", because: :unsupported + disable! date: "2026-09-25", because: :unsupported + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.txt").write("Hello World!") + assert_match "Hello World!", shell_output("#{bin}/ucg 'Hello World' #{testpath}") + end +end + +__END__ +diff --git a/src/libext/DoubleCheckedLock.hpp b/src/libext/DoubleCheckedLock.hpp +index fbce12f5d11fd384becb37fd43ce74d254fc4ac3..be06119bb8d0bb42be77bece750c40c6724606be 100644 +--- a/src/libext/DoubleCheckedLock.hpp ++++ b/src/libext/DoubleCheckedLock.hpp +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + /** + * Function template implementing a double-checked lock. diff --git a/Formula/u/uchardet.rb b/Formula/u/uchardet.rb new file mode 100644 index 0000000000000..608220d38b629 --- /dev/null +++ b/Formula/u/uchardet.rb @@ -0,0 +1,40 @@ +class Uchardet < Formula + desc "Encoding detector library" + homepage "https://www.freedesktop.org/wiki/Software/uchardet/" + url "https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.8.tar.xz" + sha256 "e97a60cfc00a1c147a674b097bb1422abd9fa78a2d9ce3f3fdcc2e78a34ac5f0" + license any_of: ["MPL-1.1", "GPL-2.0-or-later", "LGPL-2.1-or-later"] + head "https://gitlab.freedesktop.org/uchardet/uchardet.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9c7726503e9063cc35716cd81cd22ebb8dbe34aec0922bd02d90b5a435940476" + sha256 cellar: :any, arm64_sequoia: "171e31b14ade23db98fd45f32cebdd1c278ce5b5d629d4e3be7c81a56bee03a7" + sha256 cellar: :any, arm64_sonoma: "70b2c779c315b71c067c8f4a743a90688dfa329c9d5e1c174345d0071fdf09d8" + sha256 cellar: :any, arm64_ventura: "a85a41114a32e8a455a0940c5d1f9b475a2dcb15b0041966cde44f632c5f8caf" + sha256 cellar: :any, arm64_monterey: "b8da933deae20869dfec3d4d04688424230adc652863dc7015b73ed8ffbdc028" + sha256 cellar: :any, arm64_big_sur: "96c2ca2cfaef487e62d7286fe76df3f50fba67fe22b21bffb8478cbed2eb3e0a" + sha256 cellar: :any, sonoma: "724236eec957527714222c9a831ffd648cdf0a371dea3d80dd1cd91fbd245aab" + sha256 cellar: :any, ventura: "a553c6d711641482107e7604e8d81e00a615932f1a79cdb2cdfca9cd22a3d6db" + sha256 cellar: :any, monterey: "52b6ebd4f6db0057634f195332a98b18d0f1dff5e7911e550291cb91c86b54cb" + sha256 cellar: :any, big_sur: "8da0b45a3f4d87647b96aea829a3db161ef364eb131529b6393b718f5478006a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fbe4342fd9a7bfd00ec092ca4cf8931d8dba18b79a7158496e60755790b18d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6392159b044059cbf22acfbe579343e119a8639dcea266e93a49b5e1a0bf08df" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", # Workaround for CMake 4+ + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_equal "ASCII", pipe_output(bin/"uchardet", "Homebrew").chomp + end +end diff --git a/Formula/u/ucl.rb b/Formula/u/ucl.rb new file mode 100644 index 0000000000000..8721fed8aade0 --- /dev/null +++ b/Formula/u/ucl.rb @@ -0,0 +1,88 @@ +class Ucl < Formula + desc "Data compression library with small memory footprint" + homepage "https://www.oberhumer.com/opensource/ucl/" + url "https://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz" + sha256 "b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.oberhumer.com/opensource/ucl/download/" + regex(/href=.*?ucl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be21a9408fd10aabdb648f2c5075a234cd1308fd2628f6fb205751883835532f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2bf62c73925dcc1099836d528dd46f4f6f3fdae979f58584a930dbe92e89055" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "efc85c20038e401439abb0d3889816554d0476e968422782c97661a9b5c51ef1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "462fd1b3bf0382d5dd445f4d12b86f47e4577ab52a17d227b2c80a8e2faf5307" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4c7f82e2d2c969d71a2dbaca2cc6c0f2577c422a16281a981e3193535263803c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ef63a86669c63e486c3682494a93c9db453a33089a2a71398efb8e5e26cf5e44" + sha256 cellar: :any_skip_relocation, sonoma: "d7e4f8a3757883ff1541ef0e571a38c72d3a1e74017c83d6ed3639559164f17a" + sha256 cellar: :any_skip_relocation, ventura: "395e6919528cb44ea1daecd6a41cc6e73da22f100e84310c67072b411ccd5db2" + sha256 cellar: :any_skip_relocation, monterey: "4317885999b8297a1919d5d65a9246efdd7bc1807fd2df4a9268a202fbf3a97c" + sha256 cellar: :any_skip_relocation, big_sur: "91ce0597dc8e648e4ee0d0caaa30bceb5f569acc90634d88fa5e7859f2ae682a" + sha256 cellar: :any_skip_relocation, catalina: "116db1f8157bf88831fece730fb3e6fa82420d53c29b032afd63b979df42b386" + sha256 cellar: :any_skip_relocation, arm64_linux: "b6a1eb60e36db3e3b262b7953d6523e61dc6cf519c06eb6487bdd2f7efda29bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1733761c7ce4452219f15055b4d72ca6e287c9c18691d9aa66c4aae0349d28c" + end + + depends_on "automake" => :build + + def install + # Workaround to build with newer GCC + ENV.append "CFLAGS", "-std=c90" if OS.linux? + + # Workaround for ancient ./configure file + # Normally it would be cleaner to run "autoremake" to get a more modern one, + # but the tarball doesn't seem to include all of the local m4 files that were used + ENV.append "CFLAGS", "-Wno-implicit-function-declaration" + # Workaround for ancient config.sub files not recognising aarch64 macos. + # As above, autoremake would be nicer, but that does not work. + %w[config.guess config.sub].each do |fn| + cp "#{Formula["automake"].opt_prefix}/share/automake-#{Formula["automake"].version.major_minor}/#{fn}", + "acconfig/#{fn}" + end + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + // simplified version of + // https://github.com/korczis/ucl/blob/HEAD/examples/simple.c + #include + #include + #include + #define IN_LEN (128*1024L) + #define OUT_LEN (IN_LEN + IN_LEN / 8 + 256) + int main(int argc, char *argv[]) { + int r; + ucl_byte *in, *out; + ucl_uint in_len, out_len, new_len; + + if (ucl_init() != UCL_E_OK) { return 4; } + in = (ucl_byte *) ucl_malloc(IN_LEN); + out = (ucl_byte *) ucl_malloc(OUT_LEN); + if (in == NULL || out == NULL) { return 3; } + + in_len = IN_LEN; + ucl_memset(in,0,in_len); + + r = ucl_nrv2b_99_compress(in,in_len,out,&out_len,NULL,5,NULL,NULL); + if (r != UCL_E_OK) { return 2; } + if (out_len >= in_len) { return 0; } + r = ucl_nrv2b_decompress_8(out,out_len,in,&new_len,NULL); + if (r != UCL_E_OK && new_len == in_len) { return 1; } + ucl_free(out); + ucl_free(in); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lucl", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/ucloud.rb b/Formula/u/ucloud.rb new file mode 100644 index 0000000000000..83334debb53bc --- /dev/null +++ b/Formula/u/ucloud.rb @@ -0,0 +1,31 @@ +class Ucloud < Formula + desc "Official tool for managing UCloud services" + homepage "https://www.ucloud.cn" + url "https://github.com/ucloud/ucloud-cli/archive/refs/tags/v0.3.0.tar.gz" + sha256 "4b70919ce47d14fe92496be1686ac2264a23a5f898cba5faff1bcc0f38363686" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5957d48f407072d115c3cad17b814e36e44083d12f88b7453db1b6ecc7589cdc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bad072862ba359124e3ed02553063f25772337376aafe978c3fc6633f1c3be14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bad072862ba359124e3ed02553063f25772337376aafe978c3fc6633f1c3be14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bad072862ba359124e3ed02553063f25772337376aafe978c3fc6633f1c3be14" + sha256 cellar: :any_skip_relocation, sonoma: "aa91bbe59f176048fa024ca08093692f67fcd8c815ef0288d00a8e631254d272" + sha256 cellar: :any_skip_relocation, ventura: "aa91bbe59f176048fa024ca08093692f67fcd8c815ef0288d00a8e631254d272" + sha256 cellar: :any_skip_relocation, arm64_linux: "feb403aaf56c604a31e3f49b6c7d05807b0c9ce4924ca4cad5f9cf9d8d41607b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8461b7142d140881f42abb9c283555dd751565fd50d33072c344ed3e6b02602f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "-mod=vendor" + end + + test do + system bin/"ucloud", "config", "--project-id", "org-test", "--profile", "default", "--active", "true" + config_json = (testpath/".ucloud/config.json").read + assert_match '"project_id":"org-test"', config_json + assert_match version.to_s, shell_output("#{bin}/ucloud --version") + end +end diff --git a/Formula/u/ucommon.rb b/Formula/u/ucommon.rb new file mode 100644 index 0000000000000..baccc23e3e79e --- /dev/null +++ b/Formula/u/ucommon.rb @@ -0,0 +1,82 @@ +class Ucommon < Formula + desc "GNU C++ runtime library for threads, sockets, and parsing" + homepage "https://www.gnu.org/software/commoncpp/" + url "https://ftp.debian.org/debian/pool/main/u/ucommon/ucommon_7.0.1.orig.tar.gz" + sha256 "99fd0e2c69f24e4ca93d01a14bc3fc4e40d69576f235f80f7a8ab37c16951f3e" + license all_of: [ + "LGPL-3.0-or-later", + "GPL-2.0-or-later" => { with: "mif-exception" }, + ] + + livecheck do + url "https://ftp.debian.org/debian/pool/main/u/ucommon/" + regex(/href=.*?ucommon[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "47d6c23a79119bb4b597cb141c4054018cec80e5dabd11b5379a15cd406d96b9" + sha256 arm64_sequoia: "8d1eb9d2f6984eb37ce94f421122cdddce8070132ddf9b911dae8ed69accadea" + sha256 arm64_sonoma: "aef98eb17b5948c37b54052b5695cbc7de0e3ebfed947973ccf5df6bc99280db" + sha256 arm64_ventura: "2f5710346714a1abd916b61ac2f8cdb3935ffb8f25d975e9188b102aa0d2cfc9" + sha256 arm64_monterey: "38d325d005640c936e08eee001469b019b63be1a604a4cb7ef2def41f2dda2eb" + sha256 sonoma: "d9e52557eb8da88b69857f8ada8e310ece430553c7ac5c1b1769fa4b354cc497" + sha256 ventura: "7fa74730296e4837ff21ff4a40320d8a5fa0f0f1217bac95875bd59a001fdd44" + sha256 monterey: "593ba25333186ce44b5f5c1fadcdc4d1afed3429a7961758128036c5a7f3a115" + sha256 arm64_linux: "44f61ccf52f496b65a2225aad7bd15381c4a8f881a6a13ccdc25d76dbadd2948" + sha256 x86_64_linux: "3cb9863a696fdced7013b30774bea48fced75770d6e2c7a85d4dda337f1ee271" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "gnutls" + + on_macos do + depends_on "gettext" + end + + # Workaround for macOS 15 SDK adding SO_BINDTODEVICE in sys/socket.h + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", "--with-sslstack=gnutls", "--with-pkg-config", *std_configure_args + system "make", "install" + end + + test do + system bin/"ucommon-config", "--libs" + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + ucommon::String test_string("Hello, Ucommon!"); + std::cout << test_string << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lucommon" + system "./test" + end +end + +__END__ +diff --git a/corelib/socket.cpp b/corelib/socket.cpp +index 76a52273..04dae257 100644 +--- a/corelib/socket.cpp ++++ b/corelib/socket.cpp +@@ -3023,7 +3023,7 @@ int Socket::bindto(socket_t so, const char *host, const char *svc, int protocol) + if(host && !strcmp(host, "*")) + host = NULL; + +-#if defined(SO_BINDTODEVICE) && !defined(__QNX__) ++#if defined(SO_BINDTODEVICE) && !defined(__QNX__) && !defined(__APPLE__) + if(host && !strchr(host, '.') && !strchr(host, ':')) { + struct ifreq ifr; + memset(&ifr, 0, sizeof(ifr)); diff --git a/Formula/u/ucon64.rb b/Formula/u/ucon64.rb new file mode 100644 index 0000000000000..0c688448c697e --- /dev/null +++ b/Formula/u/ucon64.rb @@ -0,0 +1,73 @@ +class Ucon64 < Formula + desc "ROM backup tool and emulator's Swiss Army knife program" + homepage "https://ucon64.sourceforge.io/" + url "https://downloads.sourceforge.net/project/ucon64/ucon64/ucon64-2.2.2/ucon64-2.2.2-src.tar.gz" + sha256 "e100ad4a30f6c19abde98e361c6a0ecac4e40477f54cfb75498c5ccd21fb3a18" + license "GPL-2.0-or-later" + head "https://svn.code.sf.net/p/ucon64/svn/trunk/ucon64" + + livecheck do + url :stable + regex(%r{url=.*?/ucon64[._-]v?(\d+(?:\.\d+)+)-src\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "ac2730906d6b8ba2c3fa8a010fab0911f6c249b85e913a4195e99fdb8596cee2" + sha256 arm64_sequoia: "f55e08ec43d072e3a5e53d38a3244adae7dcaceca71045c2bd525f05a1588609" + sha256 arm64_sonoma: "301ce960dee0312e69f72b00da7d4e297091039cfe5e3d10364fe48fb0b49122" + sha256 arm64_ventura: "228557d22fcc52015a45e5e22d4e8b9d6a9997600e5ad4127afd39d2bdbd7dd0" + sha256 arm64_monterey: "516c8d6bcfbc9101c237e9ec08d13b11f9e0347d1fa5841f670cb8945a93b665" + sha256 arm64_big_sur: "ca76694128cae76b0f5f177d3ab2106a7e955caf7480be607368e8507cf0ab75" + sha256 sonoma: "92e61d689784b5efd81c592b19479e8daea813005c712443ccff002ce2c6e504" + sha256 ventura: "9e2d7117710cb6f8084dcbc36ecf0c607c1de1d31923df54224cf6f21f8b86ba" + sha256 monterey: "1ffac20e4aafeabe33ab750f2f40589bb894caf7ee372380a065abeb7e06655c" + sha256 big_sur: "1638a10fb2622983abc00934ba023cb03a1d7b332e45d9024b717f74a0d3fee7" + sha256 catalina: "3672dbe3c97e6d71f22a6666adec1cca709ffc3dea9c76baf16fbeb8f63a4782" + sha256 arm64_linux: "15cef90fe66dfeaa08768ef3a8c3640ae30454fbd7e682b05357b7bc95be9fb3" + sha256 x86_64_linux: "f2b2e0353e5bfa4e226a5182b6d36786874ced3c0ae4426866d2a2436aa0c739" + end + + uses_from_macos "unzip" => [:build, :test] + uses_from_macos "zlib" + + def install + # ucon64's normal install process installs the discmage library in + # the user's home folder. We want to store it inside the prefix, so + # we have to change the default value of ~/.ucon64rc to point to it. + # .ucon64rc is generated by the binary, so we adjust the default that + # is set when no .ucon64rc exists. + inreplace "src/ucon64_misc.c", "PROPERTY_MODE_DIR (\"ucon64\") \"#{shared_library("discmage")}\"", + "\"#{opt_prefix}/libexec/#{shared_library("libdiscmage")}\"" + + cd "src" do + args = ["--disable-silent-rules", "--with-libdiscmage"] + args << "--disable-parallel" if OS.linux? && Hardware::CPU.arm? # no sys/io.h + system "./configure", *args, *std_configure_args + system "make" + bin.install "ucon64" + libexec.install "libdiscmage/#{shared_library("discmage")}" => shared_library("libdiscmage") + end + end + + def caveats + <<~EOS + You can copy/move your DAT file collection to $HOME/.ucon64/dat + Be sure to check $HOME/.ucon64rc for configuration after running uCON64 + for the first time. + EOS + end + + test do + resource "homebrew-super_bat_puncher_demo" do + url "http://morphcat.de/superbatpuncher/Super%20Bat%20Puncher%20Demo.zip" + sha256 "d74cb3ba11a4ef5d0f8d224325958ca1203b0d8bb4a7a79867e412d987f0b846" + end + + resource("homebrew-super_bat_puncher_demo").stage testpath + + assert_match "00000000 4e 45 53 1a 08 00 11 00 00 00 00 00 00 00 00 00", + shell_output("#{bin}/ucon64 \"#{testpath}/Super Bat Puncher Demo.nes\"") + end +end diff --git a/Formula/u/ucspi-tcp.rb b/Formula/u/ucspi-tcp.rb new file mode 100644 index 0000000000000..4e2b28ac479b2 --- /dev/null +++ b/Formula/u/ucspi-tcp.rb @@ -0,0 +1,60 @@ +class UcspiTcp < Formula + desc "Tools for building TCP client-server applications" + homepage "https://cr.yp.to/ucspi-tcp.html" + url "https://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz" + sha256 "4a0615cab74886f5b4f7e8fd32933a07b955536a3476d74ea087a3ea66a23e9c" + license :public_domain + + livecheck do + url "https://cr.yp.to/ucspi-tcp/install.html" + regex(/href=.*?ucspi-tcp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d1e6c8483d5cc332f7a227ecfe6dcab0392f2d4cbbe33e144dd1c2650d89a86b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08361b13bd495c563f6340c7cf4aecabf43475f00a3e47116295de56a014c8cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "afe836f6e29e826d8e00da8a7f81909b65ebf51e18d3aa9d15709f991d28e5b1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "283ab40c4100a1eba330dbb5392d4b88cf224acabfadda051a5040947da685fc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1936ea190d3606211cbe6808e3a1d811662145cdf993900ef55730f62fb5daa6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f12aad8b88657b73fa01910b07d03d0e2af44d2c4a14ed833acb25bfe1d55f6b" + sha256 cellar: :any_skip_relocation, sonoma: "a0dc01e7228b408a7e4f3b7f4b00854901b4bfebe7a0c7bbe4144acdafebbf06" + sha256 cellar: :any_skip_relocation, ventura: "eebce9e4176167e4464bb3f411b786a32fe520c37dc7d070af949927337543de" + sha256 cellar: :any_skip_relocation, monterey: "4253dce5cb7114f47612bb7d84f9aeb61fca1da1d7afed62cfb00b4924811eb4" + sha256 cellar: :any_skip_relocation, big_sur: "e6e117599fbdb3619aa5bbc6dbc0dad76b73c507cab9fcf90b4e258b3a3ffb9f" + sha256 cellar: :any_skip_relocation, catalina: "7daae5b06fc2d2d42c1fcfc02368bf84e565d0557de006c14c2a31cc91cd25ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "92866f7a65abdf24cf7d3cf1ef62ca038c7d8b8df368b0da9463e305c3c615c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1403c13191ec33d523a407bcac88d15d712598e39629a265890805527bb2a566" + end + + # IPv6 patch + # Used to be https://www.fefe.de/ucspi/ucspi-tcp-0.88-ipv6.diff19.bz2 + patch do + url "https://raw.githubusercontent.com/homebrew/patches/2b3e4da/ucspi-tcp/patch-0.88-ipv6.diff" + sha256 "c2d6ce17c87397253f298cc28499da873efe23afe97e855bdcf34ae66374036a" + end + + def install + # Fix compile with newer Clang + inreplace "conf-cc", "gcc -O2", "gcc -O2 -Wno-implicit-function-declaration -Wno-implicit-int" + + # Work around build error from root requirement: "Oops. Your getgroups() returned 0, + # and setgroups() failed; this means that I can't reliably do my shsgr test. Please + # either ``make'' as root or ``make'' while you're in one or more supplementary groups." + inreplace "Makefile", "( cat warn-shsgr; exit 1 )", "cat warn-shsgr" if OS.linux? + + (buildpath/"conf-home").unlink + (buildpath/"conf-home").write prefix + + system "make" + bin.mkpath + system "make", "setup" + share.install prefix/"man" + end + + test do + assert_match(/usage: tcpserver/, + shell_output("#{bin}/tcpserver 2>&1", 100)) + end +end diff --git a/Formula/u/udis86.rb b/Formula/u/udis86.rb new file mode 100644 index 0000000000000..df3aa95cc18a1 --- /dev/null +++ b/Formula/u/udis86.rb @@ -0,0 +1,45 @@ +class Udis86 < Formula + desc "Minimalistic disassembler library for x86" + homepage "https://sourceforge.net/projects/udis86/" + url "https://downloads.sourceforge.net/project/udis86/udis86/1.7/udis86-1.7.2.tar.gz" + sha256 "9c52ac626ac6f531e1d6828feaad7e797d0f3cce1e9f34ad4e84627022b3c2f4" + license "BSD-2-Clause" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/udis86[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "64411bb2fb41c08729313426c8753ca7d79932086111c970803ecf5a87b6d06b" + sha256 cellar: :any, arm64_sequoia: "c8ace05db1e4342ac3920f58c3841e8952df549f1385bb7b76305c332073fd00" + sha256 cellar: :any, arm64_sonoma: "9dcbdeb6b295c79410cd870c01c87b7313c62252089a2b2821df27ceae2db586" + sha256 cellar: :any, sonoma: "96c8db68a32708148bbbdcbfdb0ed3144c8f118972eabdaca6d8ec49f868ba64" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6468cbe7b75d58bd68d0907006195ce52159a18444febf1f260e19d81a1f08f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4799d288d7a86e2b63f0a9c55d7b50e21bae0770b6a728542e09a1fbcd62c96b" + end + + depends_on "python@3.14" => :build + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--prefix=#{prefix}", + "--enable-shared", + "--with-python=#{which("python3.14")}" + system "make" + system "make", "install" + end + + test do + assert_match("int 0x80", pipe_output("#{bin}/udcli -x", "cd 80").split.last(2).join(" ")) + end +end diff --git a/Formula/u/udp2raw-multiplatform.rb b/Formula/u/udp2raw-multiplatform.rb new file mode 100644 index 0000000000000..290bec1cb3ea2 --- /dev/null +++ b/Formula/u/udp2raw-multiplatform.rb @@ -0,0 +1,55 @@ +class Udp2rawMultiplatform < Formula + desc "Multi-platform(cross-platform) version of udp2raw-tunnel client" + homepage "https://github.com/wangyu-/udp2raw-multiplatform" + url "https://github.com/wangyu-/udp2raw-multiplatform/archive/refs/tags/20230206.0.tar.gz" + sha256 "a4c2aece9e302a7895319efe940e5693522bafe9ae35b3f8088f091b35599e8a" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "72ead352399ece1b7045bc70fdc82b5cd82246adf55fb61e6eaaa467583ffb65" + sha256 cellar: :any, arm64_sequoia: "5c9cec87f3f22ae136248cc81851645b561e7136008a7a2fcdba3787daf3daa2" + sha256 cellar: :any, arm64_sonoma: "f71f48884d9d19d40d3c04a4e0a99aa87a415a12614a5a02625e75018d6cb2f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91759a9869401575af6f3a52a51aa4efff60aed38cb140d02e2f051bd34fb9ec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a718e5fef4e3258d02331b824b55d336496163e4c7f94b3de712b8c1f0340d73" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "af40d80100acdacdfdcd44088f487c63c213c640d15b1f05314c0eda667a9e93" + sha256 cellar: :any, sonoma: "74e1ebe2c833591c39c45153d2a65839688bb206aff6281ff0da085ef2f29058" + sha256 cellar: :any_skip_relocation, ventura: "34a11617d24ae83e56d50032a8a8367a5a92618863c5c4e4f3bdb8ad0b91398f" + sha256 cellar: :any_skip_relocation, monterey: "bae88e034ddd85ff02e74744b474be4f01b0f263cdb59ca72dee587e47bd7eb1" + sha256 cellar: :any_skip_relocation, big_sur: "bcc9b02e7167c8096e98deafbbf4262c675d96faf02ec6a214d1650e8ea75cdf" + sha256 cellar: :any_skip_relocation, arm64_linux: "eac995325cedfd5b1029ac3c2e0cebc14b912cfc945e7ff8eecfa160655f77d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23603c4582835dcb9428c1c3e553802937568f9e7ea1bd283bf329541562ffdc" + end + + depends_on "libnet" + uses_from_macos "libpcap" + + def install + ENV["OPT"] = Utils.safe_popen_read("libnet-config", "--cflags") + + if OS.linux? + system "make", "linux" + elsif OS.mac? + system "make", "mac" + end + + bin.install "udp2raw_mp" + etc.install "example.conf" => "udp2raw_client.conf" + end + + service do + run [opt_bin/"udp2raw_mp", "--conf-file", etc/"udp2raw_client.conf"] + keep_alive true + require_root true + log_path var/"log/udp2raw.log" + error_log_path var/"log/udp2raw.log" + end + + test do + assert_match(/.+SOCK_RAW allocation failed: Operation not permitted/, + shell_output( + "#{bin}/udp2raw_mp -c -r 127.0.0.1:#{free_port} -l 127.0.0.1:#{free_port} --log-level 1 --disable-color", 255 + )) + end +end diff --git a/Formula/u/udptunnel.rb b/Formula/u/udptunnel.rb new file mode 100644 index 0000000000000..aa8c0a9e8a1d3 --- /dev/null +++ b/Formula/u/udptunnel.rb @@ -0,0 +1,63 @@ +class Udptunnel < Formula + desc "Tunnel UDP packets over a TCP connection" + # The original webpage (and download) is still available at the original + # site, but currently www.cs.columbia.edu returns a 404 error if you + # try to fetch them over https instead of http + homepage "http://www1.cs.columbia.edu/~lennox/udptunnel/" + url "https://pkg.freebsd.org/ports-distfiles/udptunnel-1.1.tar.gz" + mirror "https://sources.voidlinux.org/udptunnel-1.1/udptunnel-1.1.tar.gz" + sha256 "45c0e12045735bc55734076ebbdc7622c746d1fe4e6f7267fa122e2421754670" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?udptunnel[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "955432103c2a78902e1560848604ef6aff9513feef9603f1f6ff10235136e8a2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be4c5ad4d4094dd6afe8d22aa7ab5fad4a53ca8605a4d9c8b379f209076fe48b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68d39772c6215367e95610b65557e2055741cc6f1647f0c203ecb1e2bef0a617" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41ccbefe035c6cb8d7cb3a1aaec9421819c18d02f909b296c8751ee541aa585d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dbb91d06c314bf6dea17191505ba382300f7a5b8551c973d79f516ba769153a6" + sha256 cellar: :any_skip_relocation, sonoma: "f6d79761a7e95026828863a9ac3b4446603008c36610b651d2ad2b2a73e3110b" + sha256 cellar: :any_skip_relocation, ventura: "8f92018d640442578d0d26e06ea3893666da7847cb88acf76ef3dd6530f55397" + sha256 cellar: :any_skip_relocation, monterey: "b81e584e4ed1d6e579829e55488fe8ff398862d36f0619867b94ec4fbf6d1f61" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb84b77db4dc77640e9ed18c024af27dd1557dc6f4ec00acd374791a2f461664" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af4f9f7bf957a343e94d7dfeb746dd2a6bcf80e9f6689fcb083d281494f75ac7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + on_linux do + depends_on "libnsl" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + ENV["LIBS"] = "-L#{Formula["libnsl"].opt_lib}" if OS.linux? + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + doc.install "udptunnel.html" + end + + test do + assert_equal <<~EOS, shell_output("#{bin}/udptunnel -h 2>&1", 2) + Usage: #{bin}/udptunnel -s TCP-port [-r] [-v] UDP-addr/UDP-port[/ttl] + or #{bin}/udptunnel -c TCP-addr[/TCP-port] [-r] [-v] UDP-addr/UDP-port[/ttl] + -s: Server mode. Wait for TCP connections on the port. + -c: Client mode. Connect to the given address. + -r: RTP mode. Connect/listen on ports N and N+1 for both UDP and TCP. + Port numbers must be even. + -v: Verbose mode. Specify -v multiple times for increased verbosity. + EOS + end +end diff --git a/Formula/u/udunits.rb b/Formula/u/udunits.rb new file mode 100644 index 0000000000000..99176fed802fd --- /dev/null +++ b/Formula/u/udunits.rb @@ -0,0 +1,58 @@ +class Udunits < Formula + desc "Unidata unit conversion library" + homepage "https://docs.unidata.ucar.edu/udunits/current/" + url "https://downloads.unidata.ucar.edu/udunits/2.2.28/udunits-2.2.28.tar.gz" + sha256 "590baec83161a3fd62c00efa66f6113cec8a7c461e3f61a5182167e0cc5d579e" + license "UCAR" + + livecheck do + url "https://downloads.unidata.ucar.edu/udunits/release_info.json" + strategy :json do |json| + json["releases"]&.map { |item| item["version"] } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "9be11e8aa15c3a8eaf65ca066808eacbfda46e627f6ab4bd42bc6778b52c3984" + sha256 arm64_sequoia: "8ba9d3ce2f87072bd50d40063a6db63a456ec9a934d381002d1c31587c0e10b1" + sha256 arm64_sonoma: "bb3b99a3627d9008b70648de70aee2014444eebc0eac4ad50d2cec00c4260a62" + sha256 arm64_ventura: "c6f54e9f07ec6617aeee1bd95a6ebd444e5b72adb9c3268b9fdb68cd443c26f6" + sha256 arm64_monterey: "64af7e42ad61c45d6f1790d747c9e3d8bbd8634a86fc51961646b31a16f64edf" + sha256 arm64_big_sur: "d7abb17bec04dc4aede1c62e24766a4f31c6d4c4cc5f1716fcb56f1da06b0492" + sha256 sonoma: "da48653db9f58cce8bcb98eb2bbf8a8949d8a90114c20ae3b63900f1abe8800e" + sha256 ventura: "05ba4dddcb5941e0a0af12b1064403e144577e4910c851a2e8ecb13d1faa5b20" + sha256 monterey: "ed2147b73e154d445d1959b871e956975bc2ed2d33757d9ed57df1114af2222c" + sha256 big_sur: "cb3a237ce5aa71c094ece2c9a7ba3199238d8facf053760a5f29ebec93f29e53" + sha256 catalina: "5787ba730b9969468621db38503a036de75aea0a8e62cbd253e9c73262355419" + sha256 arm64_linux: "9f5ace99f37c2ada5a443b740687abd53823d454265843bd9f029a7cbe49bea6" + sha256 x86_64_linux: "9df6142349c78d0ebb0922ea53c48f702ca83cf223513437022086ee332c22a8" + end + + head do + url "https://github.com/Unidata/UDUNITS-2.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "expat" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match(/1 kg = 1000 g/, shell_output("#{bin}/udunits2 -H kg -W g")) + end +end diff --git a/Formula/u/ufbt.rb b/Formula/u/ufbt.rb new file mode 100644 index 0000000000000..a127c6aba8f57 --- /dev/null +++ b/Formula/u/ufbt.rb @@ -0,0 +1,35 @@ +class Ufbt < Formula + include Language::Python::Virtualenv + + desc "Compact tool for building and debugging applications for Flipper Zero" + homepage "https://pypi.org/project/ufbt/" + url "https://files.pythonhosted.org/packages/59/3b/013525f91836171870c49a53db8d2f772b5d32e682c0d25d0d0481c9bb51/ufbt-0.2.6.tar.gz" + sha256 "4f1a858858598ed2e25bbab69e2ea604bc00758c3b1e8ecf897a29866157363b" + license "GPL-3.0-or-later" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "2bd8cb39ff223bce351824caed83bc909b0b7bea6e61b7c8e91cc2c000bef32c" + end + + depends_on "python@3.14" + + resource "mslex" do + url "https://files.pythonhosted.org/packages/e0/97/7022667073c99a0fe028f2e34b9bf76b49a611afd21b02527fbfd92d4cd5/mslex-1.3.0.tar.gz" + sha256 "641c887d1d3db610eee2af37a8e5abda3f70b3006cdfd2d0d29dc0d1ae28a85d" + end + + resource "oslex" do + url "https://files.pythonhosted.org/packages/5e/a9/ebd426ee0ca59fb5ba8f0039c53989f4ca475f2dd9583b5719e2fb01602c/oslex-0.1.3.tar.gz" + sha256 "1ed4cd82c75df2a8bcb0da34400984183753933155d0c7d999fa533137685f2d" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["UFBT_HOME"] = testpath/".ufbt" + system bin/"ufbt", "vscode_dist", "create", "APPID=test_app" + end +end diff --git a/Formula/u/uffizzi.rb b/Formula/u/uffizzi.rb new file mode 100644 index 0000000000000..2ab6d240e1e9c --- /dev/null +++ b/Formula/u/uffizzi.rb @@ -0,0 +1,206 @@ +class Uffizzi < Formula + desc "Self-serve developer platforms in minutes, not months with k8s virtual clusters" + homepage "https://uffizzi.com" + url "https://github.com/UffizziCloud/uffizzi_cli/archive/refs/tags/v2.4.21.tar.gz" + sha256 "3f64e26f177fbf26840f0a3a044e26b1744eb139320cd94bc2a2e4e8111d0450" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8360ffc4b2af6e03c6ae6167c9b9aacfcf53fe48372421e73053da6324b909bf" + sha256 cellar: :any, arm64_sequoia: "48623cb8888180c827dacca11e41f476d88ac681de19db5e5343db6b059e4e17" + sha256 cellar: :any, arm64_sonoma: "f05055a86f37b464e742f14d1e1c2f195cc29e369581eaa3ae1317c78f7b5d78" + sha256 cellar: :any, arm64_ventura: "286c16729f6c52967267775e4aa023f2d4629adb9b1e9c2ff2e1fdbf200db412" + sha256 cellar: :any, sonoma: "1d422ffd54445d9e404fcd73233cdee005808dbd33121a8f2ebbc0d686dec999" + sha256 cellar: :any, ventura: "9a7695c432c05597c5cdbce5cbe84573d782b5c5ee3dcbc9181048da49d88a06" + sha256 cellar: :any_skip_relocation, arm64_linux: "15fe59302710ebe347b090a31cba8e5ed24b40b34db36d2b96d79d201e520910" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d976bbe6deb261da05d0e050400ff12e5fd9a8f5462925c15e8ac856756e3332" + end + + depends_on "ruby" + depends_on "skaffold" + + conflicts_with "conserver", because: "both install `console` binaries" + + # Runtime dependencies of uffizzi + # List with `gem install --explain uffizzi-cli` + resource "tty-cursor" do + url "https://rubygems.org/gems/tty-cursor-0.7.1.gem" + sha256 "79534185e6a777888d88628b14b6a1fdf5154a603f285f80b1753e1908e0bf48" + end + + resource "tty-spinner" do + url "https://rubygems.org/gems/tty-spinner-0.9.3.gem" + sha256 "0e036f047b4ffb61f2aa45f5a770ec00b4d04130531558a94bfc5b192b570542" + end + + resource "wisper" do + url "https://rubygems.org/gems/wisper-2.0.1.gem" + sha256 "ce17bc5c3a166f241a2e6613848b025c8146fce2defba505920c1d1f3f88fae6" + end + + resource "tty-screen" do + url "https://rubygems.org/gems/tty-screen-0.8.2.gem" + sha256 "c090652115beae764336c28802d633f204fb84da93c6a968aa5d8e319e819b50" + end + + resource "tty-reader" do + url "https://rubygems.org/gems/tty-reader-0.9.0.gem" + sha256 "c62972c985c0b1566f0e56743b6a7882f979d3dc32ff491ed490a076f899c2b1" + end + + resource "tty-color" do + url "https://rubygems.org/gems/tty-color-0.6.0.gem" + sha256 "6f9c37ca3a4e2367fb2e6d09722762647d6f455c111f05b59f35730eeb24332a" + end + + resource "pastel" do + url "https://rubygems.org/gems/pastel-0.8.0.gem" + sha256 "481da9fb7d2f6e6b1a08faf11fa10363172dc40fd47848f096ae21209f805a75" + end + + resource "tty-prompt" do + url "https://rubygems.org/gems/tty-prompt-0.23.1.gem" + sha256 "fcdbce905238993f27eecfdf67597a636bc839d92192f6a0eef22b8166449ec8" + end + + resource "thor" do + url "https://rubygems.org/gems/thor-1.3.2.gem" + sha256 "eef0293b9e24158ccad7ab383ae83534b7ad4ed99c09f96f1a6b036550abbeda" + end + + resource "bigdecimal" do + url "https://rubygems.org/gems/bigdecimal-3.1.8.gem" + sha256 "a89467ed5a44f8ae01824af49cbc575871fa078332e8f77ea425725c1ffe27be" + end + + resource "concurrent-ruby" do + url "https://rubygems.org/gems/concurrent-ruby-1.3.5.gem" + sha256 "813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6" + end + + resource "sentry-ruby" do + url "https://rubygems.org/gems/sentry-ruby-5.23.0.gem" + sha256 "8e8bb2f9a56a267a50fcba947f2ae131b6542f45fc3bb5764c2c25ba68f385cc" + end + + resource "securerandom" do + url "https://rubygems.org/gems/securerandom-0.4.1.gem" + sha256 "cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1" + end + + resource "minitar" do + url "https://rubygems.org/gems/minitar-1.0.2.gem" + sha256 "b192eb2ba7672906ed53853d2188130a849f1c2451e5b2dac688d9f5f7634672" + end + + resource "logger" do + url "https://rubygems.org/gems/logger-1.6.6.gem" + sha256 "dd618d24e637715472732e7eed02e33cfbdf56deaad225edd0f1f89d38024017" + end + + resource "childprocess" do + url "https://rubygems.org/gems/childprocess-5.1.0.gem" + sha256 "9a8d484be2fd4096a0e90a0cd3e449a05bc3aa33f8ac9e4d6dcef6ac1455b6ec" + end + + resource "public_suffix" do + url "https://rubygems.org/gems/public_suffix-6.0.1.gem" + sha256 "61d44e1cab5cbbbe5b31068481cf16976dd0dc1b6b07bd95617ef8c5e3e00c6f" + end + + resource "addressable" do + url "https://rubygems.org/gems/addressable-2.8.7.gem" + sha256 "462986537cf3735ab5f3c0f557f14155d778f4b43ea4f485a9deb9c8f7c58232" + end + + resource "launchy" do + url "https://rubygems.org/gems/launchy-3.1.1.gem" + sha256 "72b847b5cc961589dde2c395af0108c86ff0119f42d4648d25b5440ebb10059e" + end + + resource "i18n" do + url "https://rubygems.org/gems/i18n-1.14.7.gem" + sha256 "ceba573f8138ff2c0915427f1fc5bdf4aa3ab8ae88c8ce255eb3ecf0a11a5d0f" + end + + resource "faker" do + url "https://rubygems.org/gems/faker-3.5.1.gem" + sha256 "1ad1fbea279d882f486059c23fe3ddb816ccd1d7052c05a45014b4450d859bfc" + end + + resource "awesome_print" do + url "https://rubygems.org/gems/awesome_print-1.9.2.gem" + sha256 "e99b32b704acff16d768b3468680793ced40bfdc4537eb07e06a4be11133786e" + end + + resource "benchmark" do + url "https://rubygems.org/gems/benchmark-0.4.0.gem" + sha256 "0f12f8c495545e3710c3e4f0480f63f06b4c842cc94cec7f33a956f5180e874a" + end + + resource "uri" do + url "https://rubygems.org/gems/uri-1.0.2.gem" + sha256 "b303504ceb7e5905771fa7fa14b649652fa949df18b5880d69cfb12494791e27" + end + + resource "drb" do + url "https://rubygems.org/gems/drb-2.2.1.gem" + sha256 "e9d472bf785f558b96b25358bae115646da0dbfd45107ad858b0bc0d935cb340" + end + + resource "base64" do + url "https://rubygems.org/gems/base64-0.2.0.gem" + sha256 "0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507" + end + + resource "minitest" do + url "https://rubygems.org/gems/minitest-5.22.3.gem" + sha256 "ea84676290cb5e2b4f31f25751af6050aa90d3e43e4337141c3e3e839611981e" + end + + resource "connection_pool" do + url "https://rubygems.org/gems/connection_pool-2.5.0.gem" + sha256 "233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc" + end + + resource "tzinfo" do + url "https://rubygems.org/gems/tzinfo-2.0.6.gem" + sha256 "8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b" + end + + resource "activesupport" do + url "https://rubygems.org/gems/activesupport-8.0.2.gem" + sha256 "8565cddba31b900cdc17682fd66ecd020441e3eef320a9930285394e8c07a45e" + end + + resource "uffizzi-cli" do + url "https://rubygems.org/gems/uffizzi-cli-2.4.21.gem" + sha256 "3eba41369adaf27bd1f655c21e468b023a7b1ffb1248a2bbb5f27369523a1650" + end + + def install + ENV["GEM_HOME"] = libexec + ENV["GEM_PATH"] = libexec + + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--no-document", "--install-dir", libexec + end + + bin.install Dir["#{libexec}/bin/*"] + + bin.env_script_all_files(libexec, GEM_HOME: ENV["GEM_HOME"], GEM_PATH: ENV["GEM_PATH"]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/uffizzi version") + server_url = "https://example.com" + system bin/"uffizzi config set server #{server_url}" + assert_match server_url, shell_output("#{bin}/uffizzi config get-value server") + end +end diff --git a/Formula/u/uftp.rb b/Formula/u/uftp.rb new file mode 100644 index 0000000000000..681254a35776e --- /dev/null +++ b/Formula/u/uftp.rb @@ -0,0 +1,47 @@ +class Uftp < Formula + desc "Secure, reliable, efficient multicast file transfer program" + homepage "https://uftp-multicast.sourceforge.net/" + url "https://downloads.sourceforge.net/project/uftp-multicast/source-tar/uftp-5.0.3.tar.gz" + sha256 "cb8668c19b1f10bc63a16ffa893e205dc3ec86361037d477d8003260ebc40080" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url :stable + regex(%r{url=.*?/uftp[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "fb631c49f47b8e3f94c295c6257e61c7caa441d37f40a8f9ffa8d80a9db30a94" + sha256 cellar: :any, arm64_sequoia: "a06f88677a1fc1815127a1e75dcc3855a46f70b9e23333883a23f9635095b466" + sha256 cellar: :any, arm64_sonoma: "24937667b9315c47cc2ddda94564cda1e1d96cc023c38ecf73be04d14ce3f451" + sha256 cellar: :any, arm64_ventura: "2b988c5f0d11e5c32152fcdd31b760f5d76ad87518e17b08bef428de1637c68f" + sha256 cellar: :any, arm64_monterey: "7d5a837843772eb893e746c3cba51dc03fcd976ebfef1ffd51823a6e880e5bcb" + sha256 cellar: :any, sonoma: "767d6bb0732fc7caf62d2a83cefd46e505ab1f26a1fe37fd74121716bae96945" + sha256 cellar: :any, ventura: "427b1ac8f16271a483e972b4a1ef5721d7bf0f200a9d4e49f42151dab276273a" + sha256 cellar: :any, monterey: "1ae379b34875e8a2deab485dbfc9716606ecba8f34267f979eb10e36ca474745" + sha256 cellar: :any_skip_relocation, arm64_linux: "4335c5c6de511f66172229cfedec62145ddf1f408b48e14b732c457e861fd746" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd8ee6610e199b5cd9fbc20357597205bce8d7a9c92937e45ab0287ee11aa3fc" + end + + depends_on "openssl@3" + + def install + system "make", "OPENSSL=#{Formula["openssl@3"].opt_prefix}", "DESTDIR=#{prefix}", "install" + # the makefile installs into DESTDIR/usr/..., move everything up one and remove usr + # the project maintainer was contacted via sourceforge on 12-Feb, he responded WONTFIX on 13-Feb + prefix.install (prefix/"usr").children + (prefix/"usr").unlink + end + + service do + run [opt_bin/"uftpd", "-d"] + keep_alive true + working_dir var + end + + test do + system bin/"uftp_keymgt" + end +end diff --git a/Formula/u/uftrace.rb b/Formula/u/uftrace.rb new file mode 100644 index 0000000000000..9a0c49d2505e7 --- /dev/null +++ b/Formula/u/uftrace.rb @@ -0,0 +1,52 @@ +class Uftrace < Formula + desc "Function graph tracer for C/C++/Rust" + homepage "https://uftrace.github.io/slide/" + url "https://github.com/namhyung/uftrace/archive/refs/tags/v0.18.1.tar.gz" + sha256 "c089e7f38dab8d17346d41cee0ec69dc60699d5527b54e6765712235577da0db" + license "GPL-2.0-only" + head "https://github.com/namhyung/uftrace.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_linux: "56729da9bc84fc58b8b3ce35f4e85718bff5c8bf7c341dee8a88348b303ef25e" + sha256 x86_64_linux: "a9008877be858371336101a973648c5e99648050e21bb3470b89e86851b6bc65" + end + + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + depends_on "capstone" + depends_on "elfutils" + depends_on "libunwind" + depends_on :linux + depends_on "luajit" + depends_on "ncurses" + depends_on "python@3.14" + + def install + # TODO: Obsolete with git master, to be removed when updating to next release + inreplace "misc/version.sh", "deps/have_libpython2.7", "deps/have_libpython*" + + python3 = "python3.14" + pyver = Language::Python.major_minor_version python3 + # Help pkg-config find python as we only provide `python3-embed` for aliased python formula + inreplace Dir["check-deps/Makefile{,.check}"], "pkg-config python3", "pkg-config python-#{pyver}" + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install", "V=1" + end + + test do + out = shell_output("#{bin}/uftrace -A . -R . -P main #{bin}/uftrace -V") + assert_match "dwarf", out + assert_match "python", out + assert_match "luajit", out + assert_match "tui", out + assert_match "sched", out + assert_match "dynamic", out + + assert_match "| main() {", out + assert_match "| getopt_long(2, ", out + assert_match "printf", out + assert_match "| } /* main */", out + end +end diff --git a/Formula/u/uggconv.rb b/Formula/u/uggconv.rb new file mode 100644 index 0000000000000..b42434ab7c3c2 --- /dev/null +++ b/Formula/u/uggconv.rb @@ -0,0 +1,52 @@ +class Uggconv < Formula + desc "Universal Game Genie code converter" + homepage "https://web.archive.org/web/20230505074213/https://wyrmcorp.com/software/uggconv/index.shtml" + url "https://web.archive.org/web/20230505074320/https://wyrmcorp.com/software/uggconv/uggconv-1.0.tar.gz" + sha256 "9a215429bc692b38d88d11f38ec40f43713576193558cd8ca6c239541b1dd7b8" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3802603d8a8f1cadf23ebd88778fdeff1a797cd6241cb0f7460e6784bba01971" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b7da823890abb6aa5b02742c2b75d104883781b2c58bc3ae45469e936fadb1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ad9e49d325916e5ae774fdb74c4ab2c9f8624316a920dfe8a1394d2a395ff049" + sha256 cellar: :any_skip_relocation, arm64_monterey: "27654b49d8d698a39c1e7592fad41eaa5c81a8151196b7eb054c0e711bee4a36" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "002cd504e9385234ab9b1b4595709ffccb2fda5d49c377add9c27eb422c04ed3" + sha256 cellar: :any_skip_relocation, sonoma: "b47543cb9b25c23ea21d206a3fc46630a736e29a0e673251cc7eb6c1ef77085e" + sha256 cellar: :any_skip_relocation, ventura: "2118cac3d4f75602660b9c8249ad80889313144e1705b9be04dccfd4e8ef5257" + sha256 cellar: :any_skip_relocation, monterey: "ad5e3778249cab414b73491a205ffc0c45817d0061dcf59d561315e544eeca4c" + sha256 cellar: :any_skip_relocation, big_sur: "820cca76f8c5618ba401a343644cffae2ece5526e0295dc29d0dd0f5f524789a" + sha256 cellar: :any_skip_relocation, catalina: "c1fc237ad27120a1804b37d765a47833d67bcd38cfa67be07aed808739021146" + sha256 cellar: :any_skip_relocation, arm64_linux: "288f3d97f53ba57c9fbe6901a0e4739ff76c2f1965728dd10e383112365ab7c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70d91fd685adcb8943530056934bc1e8f0ed0c5502a9205c6b1c8fa982fdec53" + end + + # upstream is gone + deprecate! date: "2024-09-11", because: :repo_removed + disable! date: "2025-09-11", because: :repo_removed + + # Add missing `#include`. + patch :DATA + + def install + system "make" + bin.install "uggconv" + man1.install "uggconv.1" + end + + test do + assert_equal "7E00CE:03 = D7DA-FE86\n", + shell_output("#{bin}/uggconv -s 7E00CE:03") + end +end + +__END__ +--- a/uggconv.c ++++ b/uggconv.c +@@ -47,6 +47,7 @@ + */ + + #include ++#include + #include + #include + diff --git a/Formula/u/ugit.rb b/Formula/u/ugit.rb new file mode 100644 index 0000000000000..a3e249a112bf7 --- /dev/null +++ b/Formula/u/ugit.rb @@ -0,0 +1,26 @@ +class Ugit < Formula + desc "Undo git commands. Your damage control git buddy" + homepage "https://bhupesh.me/undo-your-last-git-mistake-with-ugit/" + url "https://github.com/Bhupesh-V/ugit/archive/refs/tags/v5.9.tar.gz" + sha256 "f93d9d4bb0d6fd676704e45733190413885c859ff2807b84cc8113bf674fc063" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5d2cbe4ed925006cc99467b8a4b837b75e60a2381641b15471fd71a08d0d2b5d" + end + + depends_on "bash" + depends_on "fzf" + + conflicts_with "git-extras", because: "both install `git-undo` binaries" + + def install + bin.install "ugit" + bin.install "git-undo" + end + + test do + assert_match "ugit version #{version}", shell_output("#{bin}/ugit --version") + assert_match "Ummm, you are not inside a Git repo", shell_output(bin/"ugit") + end +end diff --git a/Formula/u/ugrep.rb b/Formula/u/ugrep.rb new file mode 100644 index 0000000000000..9a71aa42614e9 --- /dev/null +++ b/Formula/u/ugrep.rb @@ -0,0 +1,43 @@ +class Ugrep < Formula + desc "Ultra fast grep with query UI, fuzzy search, archive search, and more" + homepage "https://ugrep.com/" + url "https://github.com/Genivia/ugrep/archive/refs/tags/v7.5.0.tar.gz" + sha256 "08ed29981e4e9ed07077139519a17273658d6097f90642a14d9dfdf07fb74ee9" + license "BSD-3-Clause" + + bottle do + sha256 arm64_tahoe: "fc463b3cd1c674c21631a538ee8a4203c05a193a901c3d1df37f1d8a16ec602f" + sha256 arm64_sequoia: "80ef6af211355394f755ac8eed4509da7b796c1aaae345d91143fbfb8848e26d" + sha256 arm64_sonoma: "f74e5ac31fc95e4024ba9a81c69ee132d99d04a76da3a399c4329c30e4ae42a9" + sha256 arm64_ventura: "308d7ef1bbbef4976e9099aed9221e0a5baab08be7fb0d3da25b6f0e7b5ff19e" + sha256 sonoma: "ae44222b4e6352ea6d2e2d93db3d6c47b9b85f134fca64cfa849c77de18e690c" + sha256 ventura: "82d872bce269b881df93402ae5a7c6bd959d0e3b7b0357109e8703f6e3a15d60" + sha256 arm64_linux: "fec5451d72d8c9ba9aa4981373bb40a0e1b14ce199da29ae14f62fa7e942b24f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d50d7e87b82652b8b5a81852c9ef9dcc0f90daa8bab26226e702780f2a323636" + end + + depends_on "brotli" + depends_on "lz4" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "./configure", "--enable-color", + "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"Hello.txt").write("Hello World!") + assert_match "Hello World!", shell_output("#{bin}/ug 'Hello' '#{testpath}'").strip + assert_match "Hello World!", shell_output("#{bin}/ugrep 'World' '#{testpath}'").strip + end +end diff --git a/Formula/u/uhd.rb b/Formula/u/uhd.rb new file mode 100644 index 0000000000000..a30676c1b6c1c --- /dev/null +++ b/Formula/u/uhd.rb @@ -0,0 +1,67 @@ +class Uhd < Formula + include Language::Python::Virtualenv + + desc "Hardware driver for all USRP devices" + homepage "https://files.ettus.com/manual/" + url "https://github.com/EttusResearch/uhd/archive/refs/tags/v4.9.0.1.tar.gz" + sha256 "0be26a139f23041c1fb6e9666d84cba839460e3c756057dc48dc067cc356a7bc" + license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later", "MIT", "BSD-3-Clause", "Apache-2.0"] + head "https://github.com/EttusResearch/uhd.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "069d898a967190d493b39b0b70ac3111bdf303389c2475554a8e18367a73b582" + sha256 arm64_sequoia: "3e9e65b9f0a9d02033546536b99ca62d5e9cd281982bdfb14979a106f882f029" + sha256 arm64_sonoma: "e1966fd506014c5dc9852cbdb0ed6476fda3f41e02805fa9500e1669fccebf48" + sha256 sonoma: "7efdeef6402f336a0f35e76f838ea4a923928a128e3afe224bd86542e5c96948" + sha256 arm64_linux: "7ce9ee9c5688b6eca8ff1aa4f94f3939b128cd1f16662146c033119a5792122d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18d4a089eb243dd2caa86003ddd2cf79a955209afec4bd1011a5dd21c096114f" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "libusb" + depends_on "python@3.14" + + on_linux do + depends_on "ncurses" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + ENV.prepend_path "PYTHONPATH", venv.site_packages + + args = %W[ + -DENABLE_TESTS=OFF + -DUHD_VERSION=#{version} + ] + system "cmake", "-S", "host", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/uhd_config_info --version") + end +end diff --git a/Formula/u/uhdm.rb b/Formula/u/uhdm.rb new file mode 100644 index 0000000000000..60422601642db --- /dev/null +++ b/Formula/u/uhdm.rb @@ -0,0 +1,87 @@ +class Uhdm < Formula + include Language::Python::Virtualenv + + desc "Universal Hardware Data Model, modeling of the SystemVerilog Object Model" + homepage "https://github.com/chipsalliance/UHDM" + url "https://github.com/chipsalliance/UHDM/archive/refs/tags/v1.86.tar.gz" + sha256 "179203b166be5d1be12b901c69c6a569ebebf4fe47bc674b1268bd9319216fce" + license "Apache-2.0" + head "https://github.com/chipsalliance/UHDM.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2ce89e087ced115f5a6c356b4efac1674d259f8b028a7a16997e5f9a8d903ad4" + sha256 cellar: :any, arm64_sequoia: "5214272d0282ba0b866470e0d532329b357d486f6e95d55865d38d95c9f2e2af" + sha256 cellar: :any, arm64_sonoma: "e30934ee0658182c51c03eac208da0fab592caf97f3da7f0346140e670805cdc" + sha256 cellar: :any, sonoma: "334106194c86016e35a7fddd5d5e02dc79a50debaece31d276e68e7ccfa807ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "a076b91886ec218426897ed533ead40aae0e0d11a40d24c4ae54e3eb0388b494" + sha256 cellar: :any_skip_relocation, x86_64_linux: "228db393232f4c6523c75317591765327ae1754e16634e8fdf5fec8837c6239a" + end + + depends_on "cmake" => :build + depends_on "python@3.14" => :build + depends_on "pkgconf" => :test + depends_on "capnp" + + resource "orderedmultidict" do + url "https://files.pythonhosted.org/packages/53/4e/3823a27d764bb8388711f4cb6f24e58453e92d6928f4163fdb01e3a3789f/orderedmultidict-1.0.1.tar.gz" + sha256 "04070bbb5e87291cc9bfa51df413677faf2141c73c61d2a5f7b26bea3cd882ad" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def python3 + which("python3.14") + end + + def install + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DUHDM_BUILD_TESTS=OFF + -DUHDM_USE_HOST_GTEST=ON + -DUHDM_USE_HOST_CAPNP=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DPython3_EXECUTABLE=#{buildpath}/venv/bin/python + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Create a minimal .uhdm file and ensure executables work + (testpath/"test.cpp").write <<~CPP + #include + #include + #include "uhdm/constant.h" + #include "uhdm/uhdm.h" + #include "uhdm/uhdm_types.h" // for uhdmconstant + #include "uhdm/vhpi_user.h" // vpi_user functions. + #include "uhdm/vpi_uhdm.h" // struct uhdm_handle + int main() { + UHDM::Serializer serializer; + UHDM::constant *value = serializer.MakeConstant(); + value->VpiFile("hello.v"); + value->VpiLineNo(42); + value->VpiSize(12345); + value->VpiDecompile("decompile"); + uhdm_handle uhdm_handle(UHDM::uhdmconstant, value); + vpiHandle vpi_handle = (vpiHandle)&uhdm_handle; + assert(vpi_get_str(vpiFile, vpi_handle) == std::string("hello.v")); + assert(vpi_get(vpiLineNo, vpi_handle) == 42); + assert(vpi_get(vpiSize, vpi_handle) == 12345); + assert(vpi_get_str(vpiDecompile, vpi_handle) == std::string("decompile")); + } + CPP + + flags = shell_output("pkg-config --cflags --libs UHDM").chomp.split + system ENV.cxx, "test.cpp", "-o", "test", "-fPIC", "-std=c++17", *flags + system testpath/"test" + end +end diff --git a/Formula/u/uhubctl.rb b/Formula/u/uhubctl.rb new file mode 100644 index 0000000000000..035e63b78fa8b --- /dev/null +++ b/Formula/u/uhubctl.rb @@ -0,0 +1,39 @@ +class Uhubctl < Formula + desc "USB hub per-port power control" + homepage "https://github.com/mvp/uhubctl" + url "https://github.com/mvp/uhubctl/archive/refs/tags/v2.6.0.tar.gz" + sha256 "56ca15ddf96d39ab0bf8ee12d3daca13cea45af01bcd5a9732ffcc01664fdfa2" + license "GPL-2.0-only" + head "https://github.com/mvp/uhubctl.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3d264b405111b616523248b1de4a0998b9c73f0c670a00e20358dcaeeed033cc" + sha256 cellar: :any, arm64_sequoia: "45506e121cd1c2bdf1077b0086f6dae8adcf1b24c48c32882d2c06eee848b87a" + sha256 cellar: :any, arm64_sonoma: "28e0b5ad40356523caf8b0e489af4f5a18cfcebafb21f323800068a3cb591f18" + sha256 cellar: :any, arm64_ventura: "9aa4d8a4629679ba2346d33a5afa11d0b90a27c32f75de3eaf6c67859c35a2b5" + sha256 cellar: :any, sonoma: "c453944fda7c0a41845021a45cd07f42d870af48a5c893fa016a19f0cd3848f0" + sha256 cellar: :any, ventura: "d715191cd6f1574c69b4ca8d3d69cff12b500c26e925f07cf795aaaf0dc593bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "d79e098adc1e2e6895c3659d146cbc1db5df67699b5e3092e5e85aee775d30c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07793f3832ebcec92c9f949974959c0593c777c20f760afbbfb000dd08f41b45" + end + + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "make" + bin.install "uhubctl" + end + + test do + # test uhubctl -v: + assert_match version.to_s, shell_output("#{bin}/uhubctl -v") + + # test for non-existent USB device: + actual = shell_output("#{bin}/uhubctl -l 100-1.2.3.4.5 -a 0 -p 1 2>&1", 1) + expected = /No compatible devices detected/ + assert_match expected, actual + end +end diff --git a/Formula/u/ulfius.rb b/Formula/u/ulfius.rb new file mode 100644 index 0000000000000..b5134f82ef9e4 --- /dev/null +++ b/Formula/u/ulfius.rb @@ -0,0 +1,59 @@ +class Ulfius < Formula + desc "HTTP Framework for REST Applications in C" + homepage "https://babelouest.github.io/ulfius/" + url "https://github.com/babelouest/ulfius/archive/refs/tags/v2.7.15.tar.gz" + sha256 "19cf789b2af1919b69f77c7701237bfc318a9781ec657b68fd4b6ffa9d53f111" + license "LGPL-2.1-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "a535c2a3e95d6f0a6d9426b4bebb34b17337aa1d2eb3352464c00c01062f8bad" + sha256 cellar: :any, arm64_sequoia: "6020a868ce69b336b8ef6dd3b37bd70cd21eb8a246ddae1ae45a9b713b672e42" + sha256 cellar: :any, arm64_sonoma: "453e5f09539969edae37b6aeafbe2165a455a91b12df2d0c4920d7db20b20ced" + sha256 cellar: :any, arm64_ventura: "4ba9e5737a26c0feece3bfe0ab61c5e48668352323c32d6be741ee7e210b23ff" + sha256 cellar: :any, arm64_monterey: "7729359e1306b5f7a7d1a7624cbe743002f67b4e59d61f681e48c9e1f226b599" + sha256 cellar: :any, sonoma: "4b5da848abed1816659dd597ccc41309b3c1203b2995cad5cf2db0300f9dd2b2" + sha256 cellar: :any, ventura: "4441a18184afaf2dd7455d10c927106aff533171586db43327aebe25ae58b6e9" + sha256 cellar: :any, monterey: "668f26af0904892c71317dee876e011e9caa179dda3b1f242db74d1387de74e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c35e214b85f1734b4d5fe4fcaf6ff18d6ab1f0b9253ec7801c9518a2c44f48d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aaf71e924637028cb1e0510ac9e58eeff98e0958fd0662bc593e60855dba652d" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "gnutls" + depends_on "jansson" + depends_on "libmicrohttpd" + depends_on "orcania" + depends_on "yder" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + args = %W[ + -DWITH_JOURNALD=OFF + -DWITH_WEBSOCKET=on + -DWITH_GNUTLS=on + -DWITH_CURL=on + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "ulfius-build", *args, *std_cmake_args + system "cmake", "--build", "ulfius-build" + system "cmake", "--install", "ulfius-build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + struct _u_instance instance; + ulfius_init_instance(&instance, 8081, NULL, NULL); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lulfius", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/ultralist.rb b/Formula/u/ultralist.rb new file mode 100644 index 0000000000000..ef65ab727d148 --- /dev/null +++ b/Formula/u/ultralist.rb @@ -0,0 +1,38 @@ +class Ultralist < Formula + desc "Simple GTD-style task management for the command-line" + homepage "https://ultralist.io" + url "https://github.com/gammons/ultralist/archive/refs/tags/1.7.0.tar.gz" + sha256 "d4a524c94c1ea4a748711a1187246ed1fd00eaaafd5b8153ad23b42d36485f79" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cf20c183b0f002e46e7120e832512041e727cf95055558a4883081888df4daa8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "110edc14d3b119a73a5de437726450fb928f436c94743d94db437bfe132b37be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b2752e4eb0dd8af2d061318320c6c9efe9b9668ffbf87349bc7d0a0517b590b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b299b08dcd7d0729ab4a7d5ed7b236c1d63d33ee4d67c64c313a604995303430" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ad84b05d81e36133f2f57f72b0da8997b96e30d0b12122bb563e8e012d724271" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a2604f11a36ecf612bfd2912cd1b1a1345ea70995e884d156d935663150cbf9" + sha256 cellar: :any_skip_relocation, sonoma: "3b8e53935f5471c24002269aa8e31a50553dfb4b691fd0f246eb241e64d8a63d" + sha256 cellar: :any_skip_relocation, ventura: "f038715abbc33eb9fb530e784c0a53406c251f71af164c601dfe7fba3d7cee57" + sha256 cellar: :any_skip_relocation, monterey: "e400736305be6718a828515079c72ab56f3ee8257672945f0a18c9a435a43ccc" + sha256 cellar: :any_skip_relocation, big_sur: "b1c9c3e4f51dcec7c482a44e9111fdb3bf42081195d73df63c858c8c60a66eb0" + sha256 cellar: :any_skip_relocation, catalina: "529daa8fdf264f4f13f8f93d785095d4a803f94902772e25094415691bf7f83c" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb37076414ad6dfb8788d0a12a0cbc3db6d1429a7bb2d3b8c664f11ef2587184" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1d287b06c14adcd326d8dd626209fcfa7a287919dce6f755f80a6513b2ed6e7" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + system bin/"ultralist", "init" + assert_path_exists testpath/".todos.json" + add_task = shell_output("#{bin}/ultralist add learn the Tango") + assert_match(/Todo.* added/, add_task) + end +end diff --git a/Formula/u/um.rb b/Formula/u/um.rb new file mode 100644 index 0000000000000..8dcc29967bc1f --- /dev/null +++ b/Formula/u/um.rb @@ -0,0 +1,58 @@ +class Um < Formula + desc "Command-line utility for creating and maintaining personal man pages" + homepage "https://github.com/sinclairtarget/um" + url "https://github.com/sinclairtarget/um/archive/refs/tags/4.2.0.tar.gz" + sha256 "f8c3f4bc5933cb4ab9643dcef7b01b8e8edf2dcbcd8062ef3ef214d1673ae64e" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1fe07dc6291ab69c1c4e7e6545be26dde8bfbf587f732860689535a7dad145f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46ec29ef67ab6cbf8cde6a9d5029f6224f2fcc77a58f40f5feb178cacab94822" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b91d98a8fd437a600f933a582128c859b9cbf5f84ffd499275156db31c44f1b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e762de5b91a07098e4c24148a58d32e431ce4bbddce1980665137a60b1c5ca7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0e762de5b91a07098e4c24148a58d32e431ce4bbddce1980665137a60b1c5ca7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d8adee04ef491baecd2fb172ce7382a8082ba320b39f0d37ebe569a587ef145c" + sha256 cellar: :any_skip_relocation, sonoma: "b91d98a8fd437a600f933a582128c859b9cbf5f84ffd499275156db31c44f1b5" + sha256 cellar: :any_skip_relocation, ventura: "0e762de5b91a07098e4c24148a58d32e431ce4bbddce1980665137a60b1c5ca7" + sha256 cellar: :any_skip_relocation, monterey: "0e762de5b91a07098e4c24148a58d32e431ce4bbddce1980665137a60b1c5ca7" + sha256 cellar: :any_skip_relocation, big_sur: "cdec90ed59042a6701044f4bbc22e6b355426f9ba711f400899b672c1300d487" + sha256 cellar: :any_skip_relocation, catalina: "266b397cd3e24060e7926f438279325aed89643070618add3db64175e348c04b" + sha256 cellar: :any_skip_relocation, arm64_linux: "85c354a3514a26d514680306f030dfaa2a247f71ef772d1b3e1d5920b9c7fec6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c71496a39f88373f2f233b19384bb1ef43e631b280ca0ba51ffcd2838012904f" + end + + uses_from_macos "ruby" + + resource "kramdown" do + url "https://rubygems.org/gems/kramdown-1.17.0.gem" + sha256 "5862410a2c1692fde2fcc86d78d2265777c22bd101f11c76442f1698ab242cd8" + end + + def install + ENV["GEM_HOME"] = libexec + + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + + system "gem", "build", "um.gemspec" + system "gem", "install", "--ignore-dependencies", "um-#{version}.gem" + + bin.install libexec/"bin/um" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + + bash_completion.install "um-completion.sh" + man1.install Dir["doc/man1/*"] + end + + test do + system bin/"um", "topic", "-d" # Set default topic + + output = shell_output("#{bin}/um topic") + assert_match shell_output("#{bin}/um config default_topic"), output + end +end diff --git a/Formula/u/umka-lang.rb b/Formula/u/umka-lang.rb new file mode 100644 index 0000000000000..e431bd1412d19 --- /dev/null +++ b/Formula/u/umka-lang.rb @@ -0,0 +1,52 @@ +class UmkaLang < Formula + desc "Statically typed embeddable scripting language" + homepage "https://github.com/vtereshkov/umka-lang" + url "https://github.com/vtereshkov/umka-lang/archive/refs/tags/v1.5.4.tar.gz" + sha256 "b40ecaeafc4bcd2ed705868c183b0d40db344f28874933b67ee23d89dbe29518" + license "BSD-2-Clause" + head "https://github.com/vtereshkov/umka-lang.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0c45dad6f4dca2a4a4c00775b58f2b77ec2e050613bb44038f7a7491fd377352" + sha256 cellar: :any, arm64_sequoia: "e0cf3861d1cc51ff4dc39e62f05b9fc7ae92417010b53910f32b4545894af83f" + sha256 cellar: :any, arm64_sonoma: "a35d9dc07073cef3ecf311f12cae7af924ee26ea7906a03958130035a4e0bef8" + sha256 cellar: :any, arm64_ventura: "81df877bb4721e395076e831e938121f0b6c29c992b98f61119db0834b6883eb" + sha256 cellar: :any, sonoma: "9633dfef9c656af8c1f0b07f52215498751eaf08a334819e1b45217857963b28" + sha256 cellar: :any, ventura: "b131af9e493d3a5f5ad1ebe5c1ef13fab4a947a20c2caef15c6b5c088eb3d244" + sha256 cellar: :any_skip_relocation, arm64_linux: "59990ebcb7e37a492d0c39d74ca4267992a6d1d636bf82cd9dc3e211fd7be0e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c838094302eeeefd555650800cdd39a50828c187759418e1b726ab9852e03be" + end + + def install + # Workaround to build on arm64 linux + if OS.linux? && Hardware::CPU.arm? + inreplace "Makefile" do |s| + cflags = s.get_make_var("CFLAGS").split + s.change_make_var! "CFLAGS", cflags.join(" ") if cflags.delete("-malign-double") + end + end + + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"hello.um").write <<~UMKA + fn main() { + printf("Hello Umka!") + } + UMKA + + assert_match "Hello Umka!", shell_output("#{bin}/umka #{testpath}/hello.um") + + (testpath/"test.c").write <<~C + #include + #include + int main(void) { + printf("Umka version: %s\\n", umkaGetVersion()); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lumka", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/umlet.rb b/Formula/u/umlet.rb new file mode 100644 index 0000000000000..15db33d05967f --- /dev/null +++ b/Formula/u/umlet.rb @@ -0,0 +1,40 @@ +class Umlet < Formula + desc "This UML tool aimed at providing a fast way of creating UML diagrams" + homepage "https://www.umlet.com/" + url "https://www.umlet.com/download/umlet_15_1/umlet-standalone-15.1.zip" + sha256 "33aa1559b3a63c14f2812f9316463d3d6b9c15f60b0f7decb8d52e5a914b308a" + license "GPL-3.0-only" + + livecheck do + url "https://www.umlet.com/changes.htm" + regex(/href=.*?umlet-standalone[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "81e9e4e1e8f71f11e7ddc0468109c03b5fc37353620c24c34fca14eace0b1373" + end + + depends_on "openjdk" + + def install + rm Dir["*.{desktop,exe}"] + libexec.install Dir["*"] + + inreplace "#{libexec}/umlet.sh", /^# export UMLET_HOME=.*$/, + "export UMLET_HOME=#{libexec}" + + chmod 0755, "#{libexec}/umlet.sh" + + (bin/"umlet-#{version}").write_env_script "#{libexec}/umlet.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + bin.install_symlink "umlet-#{version}" => "umlet" + end + + test do + system bin/"umlet", "-action=convert", "-format=png", + "-output=#{testpath}/test-output.png", + "-filename=#{libexec}/palettes/Plots.uxf" + end +end diff --git a/Formula/u/umockdev.rb b/Formula/u/umockdev.rb new file mode 100644 index 0000000000000..fdef986908c38 --- /dev/null +++ b/Formula/u/umockdev.rb @@ -0,0 +1,77 @@ +class Umockdev < Formula + desc "Mock hardware devices for creating unit tests and bug reporting" + homepage "https://github.com/martinpitt/umockdev" + url "https://github.com/martinpitt/umockdev/releases/download/0.19.4/umockdev-0.19.4.tar.xz" + sha256 "b2014eb0835be508ddf0cdbdd682e33b3daefa6aab5b24c5b326f46f9db8706d" + license "LGPL-2.1-or-later" + head "https://github.com/martinpitt/umockdev.git", branch: "main" + + bottle do + sha256 arm64_linux: "d66cee53f5ef75b4bfecf01ec8d43ae6302be991c58988b9df529f550228e28a" + sha256 x86_64_linux: "28b1b390f3ce079526b9c7c25551fc9c758a5e50db29d70e6ae34c52f947b3d5" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "glib" + depends_on "libpcap" + depends_on :linux + depends_on "systemd" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # https://github.com/martinpitt/umockdev/blob/main/tests/test-umockdev.c + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + gchar *attributes[] = { "idVendor", "0815", "idProduct", "AFFE", NULL }; + gchar *properties[] = { "ID_INPUT", "1", "ID_INPUT_KEYBOARD", "1", NULL }; + UMockdevTestbed *testbed; + struct udev *udev; + struct udev_monitor *udev_mon; + struct udev_device *device; + + testbed = umockdev_testbed_new(); + g_assert(testbed != NULL); + udev = udev_new(); + g_assert(udev != NULL); + udev_mon = udev_monitor_new_from_netlink(udev, "udev"); + g_assert(udev_mon != NULL); + g_assert_cmpint(udev_monitor_get_fd(udev_mon), >, 0); + g_assert_cmpint(udev_monitor_enable_receiving(udev_mon), ==, 0); + + g_autofree gchar *syspath = umockdev_testbed_add_devicev(testbed, "usb", "extkeyboard1", + NULL, attributes, properties); + g_assert_cmpstr(syspath, ==, "/sys/devices/extkeyboard1"); + + device = udev_monitor_receive_device(udev_mon); + g_assert(device != NULL); + g_assert_cmpstr(udev_device_get_syspath(device), ==, syspath); + g_assert_cmpstr(udev_device_get_action(device), ==, "add"); + + udev_device_unref(device); + udev_monitor_unref(udev_mon); + udev_unref(udev); + g_object_unref(testbed); + return 0; + } + C + + ENV.append_path "PKG_CONFIG_PATH", Formula["systemd"].lib/"pkgconfig" if OS.linux? + flags = shell_output("pkgconf --cflags --libs umockdev-1.0 libudev").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system bin/"umockdev-wrapper", testpath/"test" + end +end diff --git a/Formula/u/umple.rb b/Formula/u/umple.rb new file mode 100644 index 0000000000000..e3ccac9dda5c3 --- /dev/null +++ b/Formula/u/umple.rb @@ -0,0 +1,36 @@ +class Umple < Formula + desc "Modeling tool/programming language that enables Model-Oriented Programming" + homepage "https://cruise.umple.org/umple/" + url "https://github.com/umple/umple/releases/download/v1.35.0/umple-1.35.0.7523.c616a4dce.jar" + version "1.35.0" + sha256 "493b637b7432396418ebf9dcd90f4b08ec0f91a0a3247de8dbb326e0a0f80bb3" + license "MIT" + version_scheme 1 + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "8f29200d94979325078d9073338ed60413e7cde1392125b72d43e1e2105e8d3a" + end + + depends_on "openjdk" + + def install + filename = File.basename(stable.url) + + libexec.install filename + bin.write_jar_script libexec/filename, "umple" + end + + test do + (testpath/"test.ump").write("class X{ a; }") + system bin/"umple", "test.ump", "-c", "-" + assert_path_exists testpath/"X.java" + assert_path_exists testpath/"X.class" + end +end diff --git a/Formula/u/unac.rb b/Formula/u/unac.rb new file mode 100644 index 0000000000000..11bf001423ddf --- /dev/null +++ b/Formula/u/unac.rb @@ -0,0 +1,83 @@ +class Unac < Formula + desc "C library and command that removes accents from a string" + homepage "https://savannah.nongnu.org/projects/unac" + url "https://deb.debian.org/debian/pool/main/u/unac/unac_1.8.0.orig.tar.gz" + sha256 "29d316e5b74615d49237556929e95e0d68c4b77a0a0cfc346dc61cf0684b90bf" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/u/unac/" + regex(/href=.*?unac[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5e3436d86661dae0bcfda2b5064f3978fb4d5a2573ce656dc146c762e42161e8" + sha256 cellar: :any, arm64_sequoia: "648dfb172e5d6311dc6659235d05b5c22b814f48adab26a9a64288382f0a90d7" + sha256 cellar: :any, arm64_sonoma: "27170110668e4f920abf561c75cc4b8f0f9bed1ba84ab5b52426663f2fb68546" + sha256 cellar: :any, arm64_ventura: "9ef0e09918bdf4928f18a5ef4759da9877635890cae18a739b149d25933034f8" + sha256 cellar: :any, arm64_monterey: "4a72fdcbb521166b6e9e470cbbdd8027d52d883e849a3428583f5b00b16353fd" + sha256 cellar: :any, arm64_big_sur: "5d58477a342637a20d39e60b0164846f14e8f2aac2d1fc01e162e8eefef63af7" + sha256 cellar: :any, sonoma: "98f6c4c1cdaef704abb8111989b7ab0bc8cf215164a6c8f175c1e6ef5b3ccda4" + sha256 cellar: :any, ventura: "46fa079329a7e44ea6f5d48cc8466d73cff663a9ceb2753159e0045babaff7f7" + sha256 cellar: :any, monterey: "9c0f897a477038083f9531c3a258f85df3dad6d5fbdcd0e00df8070ee4675c26" + sha256 cellar: :any, big_sur: "434a30fa5bd969126e166925e6509885bb45e12977f4690c08b2b4fbcfb20dd4" + sha256 cellar: :any, catalina: "c065103ee8b1c39a665dcca68787edadc6a60620e627912a721b3d5732ff0152" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bcb9bedf0de026241c6f1de1bcffe69c67c1cfdfd5c8e590ffb7a5d09ce8c40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee6f3909a8a3f44657dc39813bee9cd551475eb835973cb34be6cbd23fe7eb0f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + + on_macos do + # configure.ac doesn't properly detect Mac OS's iconv library. This patch fixes that. + patch :DATA + end + + # Patches from https://udd.debian.org/patches.cgi?src=unac&version=1.8.0-8 + patch do + url "https://sources.debian.org/data/main/u/unac/1.8.0-8/debian/patches/gcc-4-fix-bug-556379.patch" + sha256 "f91d2c376826ff05eba7a13ee37b8152851f2c24ced29ee88afdf9b42b6a2fc8" + end + + patch do + url "https://sources.debian.org/data/main/u/unac/1.8.0-8/debian/patches/update-autotools.diff" + sha256 "8310103e199edf477e3f3fd961a2ecb09bf361ba1602871b8a223b1ee65cc11a" + end + + def install + ENV.append_path "ACLOCAL_PATH", Formula["gettext"].pkgshare/"m4" + + touch "config.rpath" + inreplace "autogen.sh", "libtool", "glibtool" + system "./autogen.sh" + system "./configure", *std_configure_args + + # Separate steps to prevent race condition in folder creation + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + assert_equal "foo", shell_output("#{bin}/unaccent utf-8 fóó").strip + end +end + +__END__ +diff --git a/configure.ac b/configure.ac +index 4a4eab6..9f25d50 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,6 +49,7 @@ AM_MAINTAINER_MODE + + AM_ICONV + ++LIBS="$LIBS -liconv" + AC_CHECK_FUNCS(iconv_open,,AC_MSG_ERROR([ + iconv_open not found try to install replacement from + http://www.gnu.org/software/libiconv/ diff --git a/Formula/u/unar.rb b/Formula/u/unar.rb new file mode 100644 index 0000000000000..f51f4c7401e32 --- /dev/null +++ b/Formula/u/unar.rb @@ -0,0 +1,89 @@ +class Unar < Formula + desc "Command-line unarchiving tools supporting multiple formats" + homepage "https://theunarchiver.com/command-line" + url "https://github.com/MacPaw/XADMaster/archive/refs/tags/v1.10.8.tar.gz" + sha256 "652953d7988b3c33f4f52b61c357afd1a7c2fc170e5e6e2219f4432b0c4cd39f" + license "LGPL-2.1-or-later" + revision 6 + head "https://github.com/MacPaw/XADMaster.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "56993d0f9b04a85ef06f0fc00e2309459a509a0bcc5da2dabf3fc2371eb1a73e" + sha256 cellar: :any, arm64_sequoia: "3c3885c3e70e7e37ad4d2d2a4a3d8840cf53e9f675a6642f57ad93d4da4fa8a8" + sha256 cellar: :any, arm64_sonoma: "456de86a2a8cf4b63c7b598f9b4740a4598af1b8dcfe066724601075da938739" + sha256 cellar: :any, arm64_ventura: "b9d20ecd5c6627f96ff7554775a5944848ff89ffc666e4b841bb67ab51782950" + sha256 cellar: :any, sonoma: "e398cb80ec4fe5195312ecef6986e96858c7a172bf0aa5fb310d7a5738ba4bd8" + sha256 cellar: :any, ventura: "ff08a4c92f3b66fc3bbd8f8e6ddfab7c4f82a7cad165c116a773402054131a74" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9447a1e19c7166109c05fbd7760c44e33442a3523857f0f7e71d1e46d8f59a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19ffbed9a0f8c86c8b688e347e6b4bcb4f63aeaee730d511aa90b9e553a3060e" + end + + depends_on xcode: :build + + uses_from_macos "llvm" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "gnustep-base" + depends_on "icu4c@77" + depends_on "libobjc2" + depends_on "wavpack" + end + + # Clang must be used on Linux because GCC Objective C support is insufficient. + fails_with :gcc + + resource "universal-detector" do + url "https://github.com/MacPaw/universal-detector/archive/refs/tags/1.1.tar.gz" + sha256 "8e8532111d0163628eb828a60d67b53133afad3f710b1967e69d3b8eee28a811" + end + + def install + resource("universal-detector").stage buildpath/"../UniversalDetector" + + # Link to libc++.dylib instead of libstdc++.6.dylib + inreplace "XADMaster.xcodeproj/project.pbxproj", "libstdc++.6.dylib", "libc++.1.dylib" + + # Replace usage of __DATE__ to keep builds reproducible + inreplace %w[lsar.m unar.m], "@__DATE__", "@\"#{time.strftime("%b %d %Y")}\"" + + # Makefile.linux does not support an out-of-tree build. + if OS.mac? + mkdir "build" do + # Build XADMaster.framework, unar and lsar + arch = Hardware::CPU.arm? ? "arm64" : "x86_64" + %w[XADMaster unar lsar].each do |target| + xcodebuild "-target", target, "-project", "../XADMaster.xcodeproj", + "SYMROOT=#{buildpath/"build"}", "-configuration", "Release", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}", "ARCHS=#{arch}", "ONLY_ACTIVE_ARCH=YES" + end + + bin.install "./Release/unar", "./Release/lsar" + %w[UniversalDetector XADMaster].each do |framework| + lib.install "./Release/lib#{framework}.a" + frameworks.install "./Release/#{framework}.framework" + (include/"lib#{framework}").install_symlink Dir["#{frameworks}/#{framework}.framework/Headers/*"] + end + end + else + system "make", "-f", "Makefile.linux" + bin.install "unar", "lsar" + lib.install buildpath/"../UniversalDetector/libUniversalDetector.a", "libXADMaster.a" + end + + cd "Extra" do + man1.install "lsar.1", "unar.1" + bash_completion.install "unar.bash_completion" => "unar" + bash_completion.install "lsar.bash_completion" => "lsar" + end + end + + test do + cp prefix/"README.md", "." + system "gzip", "README.md" + assert_equal "README.md.gz: Gzip\nREADME.md\n", shell_output("#{bin}/lsar README.md.gz") + system bin/"unar", "README.md.gz" + assert_path_exists testpath/"README.md" + end +end diff --git a/Formula/u/unbound.rb b/Formula/u/unbound.rb new file mode 100644 index 0000000000000..253474b9eec62 --- /dev/null +++ b/Formula/u/unbound.rb @@ -0,0 +1,71 @@ +class Unbound < Formula + desc "Validating, recursive, caching DNS resolver" + homepage "https://www.unbound.net" + url "https://nlnetlabs.nl/downloads/unbound/unbound-1.24.1.tar.gz" + sha256 "7f2b1633e239409619ae0527f67878b0f33ae0ec0ee5a3a51c042c359ba1eeab" + license "BSD-3-Clause" + head "https://github.com/NLnetLabs/unbound.git", branch: "master" + + # We check the GitHub repo tags instead of + # https://nlnetlabs.nl/downloads/unbound/ since the first-party site has a + # tendency to lead to an `execution expired` error. + livecheck do + url :head + regex(/^(?:release-)?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "a4fead66dfb4bc13b6cb4bc86d8d1ccc575a4be81f302d8c6a727f0eda79a296" + sha256 arm64_sequoia: "14cd3f7445095878f8cad653a17930a72f693212558d1275dc435466f116a781" + sha256 arm64_sonoma: "ace4f490254fc339d4c4bd5df16a849e0dc8ac5f5b0378e18c29eb97ef4f867f" + sha256 sonoma: "824d9ac0ed639af4e1bdd70f1dbf69cacbf5eaab1f88d6da3dd6170807d2b876" + sha256 arm64_linux: "06d817c11cb6c3c88fee2a9b2a647f566d8ec711dc87fe139c34dd7c16727707" + sha256 x86_64_linux: "86a8bd5b188b8b0c8687f97491a25e52eb45d45d5e91ca979b2ce586b0c0f9e1" + end + + depends_on "libevent" + depends_on "libnghttp2" + depends_on "openssl@3" + + uses_from_macos "expat" + + def install + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --enable-event-api + --enable-tfo-client + --enable-tfo-server + --with-libevent=#{Formula["libevent"].opt_prefix} + --with-libnghttp2=#{Formula["libnghttp2"].opt_prefix} + --with-ssl=#{Formula["openssl@3"].opt_prefix} + ] + + args << "--with-libexpat=#{MacOS.sdk_path}/usr" if OS.mac? && MacOS.sdk_path_if_needed + args << "--with-libexpat=#{Formula["expat"].opt_prefix}" if OS.linux? + system "./configure", *args + + inreplace "doc/example.conf", 'username: "unbound"', 'username: "@@HOMEBREW-UNBOUND-USER@@"' + system "make" + system "make", "install" + end + + def post_install + conf = etc/"unbound/unbound.conf" + return unless conf.exist? + return unless conf.read.include?('username: "@@HOMEBREW-UNBOUND-USER@@"') + + inreplace conf, 'username: "@@HOMEBREW-UNBOUND-USER@@"', + "username: \"#{ENV["USER"]}\"" + end + + service do + run [opt_sbin/"unbound", "-d", "-c", etc/"unbound/unbound.conf"] + keep_alive true + require_root true + end + + test do + system sbin/"unbound-control-setup", "-d", testpath + end +end diff --git a/Formula/u/unciv.rb b/Formula/u/unciv.rb new file mode 100644 index 0000000000000..46d4f1320ab83 --- /dev/null +++ b/Formula/u/unciv.rb @@ -0,0 +1,30 @@ +class Unciv < Formula + desc "Open-source Android/Desktop remake of Civ V" + homepage "https://github.com/yairm210/Unciv" + url "https://github.com/yairm210/Unciv/releases/download/4.18.12/Unciv.jar" + sha256 "87463b6bfc2f9983b0afe02156363e3fbb904106e87e9aa45f9fcd77cb4bdc28" + license "MPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(?:[._-]?patch\d*)?)$/i) + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, all: "d46b388f2ca6272d727de3752c1c4f8886bad66e4dbb72b4f11a75a2c6e56ceb" + end + + depends_on "openjdk" + + def install + libexec.install "Unciv.jar" + bin.write_jar_script libexec/"Unciv.jar", "unciv" + end + + test do + # Unciv is a GUI application, so there is no cli functionality to test + assert_match version.to_str, shell_output("#{bin}/unciv --version") + end +end diff --git a/Formula/u/uncover.rb b/Formula/u/uncover.rb new file mode 100644 index 0000000000000..4279f3af8c93d --- /dev/null +++ b/Formula/u/uncover.rb @@ -0,0 +1,30 @@ +class Uncover < Formula + desc "Tool to discover exposed hosts on the internet using multiple search engines" + homepage "https://github.com/projectdiscovery/uncover" + url "https://github.com/projectdiscovery/uncover/archive/refs/tags/v1.1.0.tar.gz" + sha256 "63858b248a5e5729d2887a080359335bbf435965bc8c75acb26b377ff5db98ce" + license "MIT" + head "https://github.com/projectdiscovery/uncover.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "43dc0f9c9e7d15bc4017bdff2aadb8a32306c0548e65916ac1a0f4ee3f9d4e6c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e53b9641ef3ca32670c2beef2889926f5dc3c1a24a2459b80c9bda3383a4f280" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a544836a98e20fecf8aa7668c32794faf19c83ad2470479458e18b2e48e2873" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e642d0ab1505914cf21378ae8c161c7469ffbf4532432661a8675e6765d0b4a0" + sha256 cellar: :any_skip_relocation, sonoma: "dfcfae2e612eb6f1ff71ef0b884b733b8df6ede3e153966c53bc94cf68f075fc" + sha256 cellar: :any_skip_relocation, ventura: "409b4f658ad90217918b7313aca3d9872695102447893881f155c06b7328543e" + sha256 cellar: :any_skip_relocation, arm64_linux: "6290343a4862c09a796e82f599d44cca0adf7e0fc0f4a7f7aaab2c69daf6bcae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "066f5b2749c79734de3ec2d3f913f03230c331866ee199cae9557e26cbcab221" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/uncover" + end + + test do + assert_match version.to_s, shell_output("#{bin}/uncover -version 2>&1") + assert_match "no keys were found", shell_output("#{bin}/uncover -q brew -e shodan 2>&1", 1) + end +end diff --git a/Formula/u/uncrustify.rb b/Formula/u/uncrustify.rb new file mode 100644 index 0000000000000..248013b03f0b3 --- /dev/null +++ b/Formula/u/uncrustify.rb @@ -0,0 +1,47 @@ +class Uncrustify < Formula + desc "Source code beautifier" + homepage "https://uncrustify.sourceforge.net/" + url "https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.81.0.tar.gz" + sha256 "484623dc16b92206adc6ac0770077c6c67c6e441102148c2a121a19549330ff9" + license "GPL-2.0-or-later" + head "https://github.com/uncrustify/uncrustify.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6fab78e60bb0348bd5249910825d251579f4f435fb75099136380bf40b1b30ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "95185b021122589ff6c0c457ca16433fa0dad4199eda25ac9d27dd3766ad45ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b637552b2ae8ce6b96724cc43c963787b96d4ac10fecc801a9f19cd32b8d4a8f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49ca479826a62c4ee74245651b6c2516204b0ad7799fcb5df55cc2784e6c1bd4" + sha256 cellar: :any_skip_relocation, sonoma: "b10c110b8a8d4e68cafc48388a43c912dbc24418ef696327f4d51f2015abe81a" + sha256 cellar: :any_skip_relocation, ventura: "264d193e45520357f4d7f5b78f5678a764830c32e2a610841411d81f520aab35" + sha256 cellar: :any_skip_relocation, arm64_linux: "04b1104857cacbf2c9a3008a22166c79b3979fd2bf63febae974ec662a0fbc42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cb6aeb4dc069d9b46f27bbd6ecedc413fb7d617c22f88db6c562f106ee05cd8" + end + + depends_on "cmake" => :build + uses_from_macos "python" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + doc.install (buildpath/"documentation").children + end + + test do + (testpath/"t.c").write <<~C + #include + int main(void) {return 0;} + C + + expected = <<~C + #include + int main(void) { + \treturn 0; + } + C + + system bin/"uncrustify", "-c", doc/"htdocs/default.cfg", "t.c" + assert_equal expected, (testpath/"t.c.uncrustify").read + end +end diff --git a/Formula/u/undercutf1.rb b/Formula/u/undercutf1.rb new file mode 100644 index 0000000000000..07cc097c9d99d --- /dev/null +++ b/Formula/u/undercutf1.rb @@ -0,0 +1,54 @@ +class Undercutf1 < Formula + desc "F1 Live Timing TUI for all F1 sessions with variable delay to sync to your TV" + homepage "https://github.com/JustAman62/undercut-f1" + url "https://github.com/JustAman62/undercut-f1/archive/refs/tags/v3.3.51.tar.gz" + sha256 "fd1d577bc5aeaf869fefdde4c6b7e2894d705f62b4e327e3d0284bf0710e19ed" + license "GPL-3.0-only" + head "https://github.com/JustAman62/undercut-f1.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3aab82222f879b11534033e31b63042c6b9b025b01e7da94f9707c5a1d8d5969" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d82b1ff2ff969f8f947357112235f01e7eab5ac3a93b439c2d6628ec6d7dc53" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c93b23f3008a9bb5d282e93afb80b9edf123b701bd01dc55facb84ff43ff803" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6b8c29ce4861d6f5e4cc929fbcfd1d1d8b97142469d3ae221b90d01229a57e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90eee7f6455f5a16ecda3fc4d87e00d3a2befea45e296df9735bc9e9fbb36e14" + end + + depends_on "dotnet" + depends_on "ffmpeg" + depends_on "fontconfig" + depends_on "mpg123" + + def install + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "1" + + dotnet = Formula["dotnet"] + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --output #{libexec} + --no-self-contained + --use-current-runtime + -p:PublishSingleFile=true + -p:IncludeAllContentForSelfExtract=true + -p:IncludeNativeLibrariesForSelfExtract=true + -p:EnableCompressionInSingleFile=false + -p:DebugType=None + -p:PublicRelease=true + ] + + # Version override is not needed if cloning from HEAD + args << "-p:OverridePackageVersion=#{version}" if build.stable? + + system "dotnet", "publish", "UndercutF1.Console/UndercutF1.Console.csproj", *args + + (bin/"undercutf1").write_env_script libexec/"undercutf1", DOTNET_ROOT: "${DOTNET_ROOT:-#{dotnet.opt_libexec}}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/undercutf1 --version") + + output = shell_output("#{bin}/undercutf1 import 2025") + assert_match "Available Meetings", output + end +end diff --git a/Formula/u/ungit.rb b/Formula/u/ungit.rb new file mode 100644 index 0000000000000..b2187924f399e --- /dev/null +++ b/Formula/u/ungit.rb @@ -0,0 +1,30 @@ +class Ungit < Formula + desc "Easiest way to use Git. On any platform. Anywhere" + homepage "https://github.com/FredrikNoren/ungit" + url "https://registry.npmjs.org/ungit/-/ungit-1.5.28.tgz" + sha256 "51f2e120f7b4ceb88ff19c7debf77877d50363f15df07d2df1235257387858af" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f3c29e0ac2bf9111ce8f2e1537df51535cec6e7b517b6d111b10644f72bfe3e2" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + port = free_port + + fork do + exec bin/"ungit", "--no-launchBrowser", "--port=#{port}" + end + sleep 15 + + assert_includes shell_output("curl -s 127.0.0.1:#{port}/"), "ungit" + end +end diff --git a/Formula/u/uni-algo.rb b/Formula/u/uni-algo.rb new file mode 100644 index 0000000000000..05fe1f65413a9 --- /dev/null +++ b/Formula/u/uni-algo.rb @@ -0,0 +1,49 @@ +class UniAlgo < Formula + desc "Unicode Algorithms Implementation for C/C++" + homepage "https://github.com/uni-algo/uni-algo" + url "https://github.com/uni-algo/uni-algo/archive/refs/tags/v1.2.0.tar.gz" + sha256 "f2a1539cd8635bc6088d05144a73ecfe7b4d74ee0361fabed6f87f9f19e74ca9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "34be3ad63252d36a5233e5ec30f0c13037217de44cff3eb333cfea6fed96e9e2" + sha256 cellar: :any, arm64_sequoia: "09f9020f24fd9b76bb3639c21fb5b588f3fa92c934a8f372c83ecea0a0bbc2bd" + sha256 cellar: :any, arm64_sonoma: "f726cbc59189310f80dc73042432149c0dfb8f1f14bdbc215c8ccf94bd4ffa30" + sha256 cellar: :any, arm64_ventura: "226d0ccf2575a4d4bd3fb85030ce5c49c742796629ca39d49be49e21ca5e976b" + sha256 cellar: :any, arm64_monterey: "6584de32b16dd17dc10b3c191c02571e9a31a3c24874d42463fdb87c8731dc78" + sha256 cellar: :any, sonoma: "4f671dc3b902289131ad865eccf76b6aede03b6cf9bc3bb46ed50674a6c81efd" + sha256 cellar: :any, ventura: "8fbf0f7ba2a59794df31d03b58c1e605d321162f54cd2e91a374d4e1414e9f48" + sha256 cellar: :any, monterey: "760286609376bbe66a454a5d443c40423f7cb4d5cefa55fb4bae09880f1dcdb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a61b42231ce224c3607e3c8e82b193ccd2eacbcee77a5aa4f5666395c539e8ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23987577980bb9edbf0d7a5ddbebaecaedec5ddf44fe0453f02877434fc39d61" + end + + depends_on "cmake" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(utf8_norm LANGUAGES CXX) + find_package(uni-algo CONFIG REQUIRED) + add_executable(utf8_norm utf8_norm.cpp) + target_link_libraries(utf8_norm PRIVATE uni-algo::uni-algo) + CMAKE + + (testpath/"utf8_norm.cpp").write <<~CPP + #include + int main() { + return (una::norm::to_nfc_utf8("W\\u0302") == "Ŵ") ? 0 : 1; + } + CPP + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_PREFIX_PATH:STRING=#{opt_lib}" + system "cmake", "--build", "build" + system "build/utf8_norm" + end +end diff --git a/Formula/u/uni.rb b/Formula/u/uni.rb new file mode 100644 index 0000000000000..9097d8a0f9ef3 --- /dev/null +++ b/Formula/u/uni.rb @@ -0,0 +1,30 @@ +class Uni < Formula + desc "Unicode database query tool for the command-line" + homepage "https://github.com/arp242/uni" + url "https://github.com/arp242/uni/archive/refs/tags/v2.8.0.tar.gz" + sha256 "627a8aebe8d72bad5a462b8efc8b96dc96794b926b094de3f1e5b9965e44a678" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2998fd67a43c49f3236e66445de964059199ab4768d9fd38b60f3090192f8a03" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37e3831bc8e3e33e11bd120dba3ac8cca6d5514dcb99b001c9f5737c7bc0f1d6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37e3831bc8e3e33e11bd120dba3ac8cca6d5514dcb99b001c9f5737c7bc0f1d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37e3831bc8e3e33e11bd120dba3ac8cca6d5514dcb99b001c9f5737c7bc0f1d6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "37e3831bc8e3e33e11bd120dba3ac8cca6d5514dcb99b001c9f5737c7bc0f1d6" + sha256 cellar: :any_skip_relocation, sonoma: "e35a0f3bdaf6a9c3eeac5bfeb1041c2f1bc454cfc3f13be21e97081e77a33530" + sha256 cellar: :any_skip_relocation, ventura: "e35a0f3bdaf6a9c3eeac5bfeb1041c2f1bc454cfc3f13be21e97081e77a33530" + sha256 cellar: :any_skip_relocation, monterey: "e35a0f3bdaf6a9c3eeac5bfeb1041c2f1bc454cfc3f13be21e97081e77a33530" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c1644a7b55d42d6d5745029d5f4d861702dd3c331f4d6dbca67606c2ea4afc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e806e0bf1993f45ab980bd2a01bd4ae1d00b60adc33449c5ec5fdb766c0eebc2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "CLINKING BEER MUGS", shell_output("#{bin}/uni identify 🍻") + end +end diff --git a/Formula/u/uni2ascii.rb b/Formula/u/uni2ascii.rb new file mode 100644 index 0000000000000..e41d69ec79c21 --- /dev/null +++ b/Formula/u/uni2ascii.rb @@ -0,0 +1,57 @@ +class Uni2ascii < Formula + desc "Bi-directional conversion between UTF-8 and various ASCII flavors" + homepage "https://billposer.org/Software/uni2ascii.html" + url "http://billposer.org/Software/Downloads/uni2ascii-4.20.tar.bz2" + sha256 "0c5002f54b262d937ba3a8249dd3148791a3f6ec383d80ec479ae60ee0de681a" + license "GPL-3.0-only" + + livecheck do + url :homepage + regex(/href=.*?uni2ascii[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "31181b902fd25b915422c12eb90c0ecfe2a642d52568d9fb0324f3813e8af7a5" + sha256 cellar: :any, arm64_sequoia: "df56e8714e5ed1d14033b28e4315bc472b5166613a5b25730f6d379f5c661c69" + sha256 cellar: :any, arm64_sonoma: "d3a472d2c31cfa9dc963c26fe7f15d7a3f782a937d7026c4ad59bbd986729af5" + sha256 cellar: :any, arm64_ventura: "2e92a28331236f4d0a7a3f14a2be9acfe64f4fcc61394a8e0eba9211c1a4415d" + sha256 cellar: :any, arm64_monterey: "12397160ce567ec3d0d101b0028c9c962d82a0861873bbc0172492d975dfb3ac" + sha256 cellar: :any, sonoma: "1290b690baabd758c09160b9c252713672e53765064840e03c6c0369e28c555b" + sha256 cellar: :any, ventura: "e017fd2d8f72748c1359d02c265e0a9c8f12e8cd37dfe58170ccb0de7d1a8c1b" + sha256 cellar: :any, monterey: "5f6b3ece8272dde8a0d191ca12151aa4b56c9afb6e3fa90d5d5d0db0024941d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "97973de94ff7fcd95e4828d4059d537763a6b3fb6fa3c56b2160be5c105b40d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc233e02cdbc8f3cb9dfe84c213d8b6eb3650f2102d85050ea412b93c5bf94eb" + end + + on_macos do + depends_on "gettext" + end + + # notified upstream about this patch + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/uni2ascii/uni2ascii-4.20.patch" + sha256 "250a529eda136d0edf9e63b92a6fe95f4ef5dfad3f94e6fd8d877138ada857f8" + end + + def install + if OS.mac? + gettext = Formula["gettext"] + ENV.append "CFLAGS", "-I#{gettext.include}" + ENV.append "LDFLAGS", "-L#{gettext.lib}" + ENV.append "LDFLAGS", "-lintl" + end + + ENV["MKDIRPROG"]="mkdir -p" + + system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + # uni2ascii + assert_equal "0x00E9", pipe_output("#{bin}/uni2ascii -q", "é") + + # ascii2uni + assert_equal "e\n", pipe_output("#{bin}/ascii2uni -q", "0x65") + end +end diff --git a/Formula/u/unibilium.rb b/Formula/u/unibilium.rb new file mode 100644 index 0000000000000..254d71dfae2fc --- /dev/null +++ b/Formula/u/unibilium.rb @@ -0,0 +1,65 @@ +class Unibilium < Formula + desc "Very basic terminfo library" + homepage "https://github.com/neovim/unibilium" + url "https://github.com/neovim/unibilium/archive/refs/tags/v2.1.2.tar.gz" + sha256 "370ecb07fbbc20d91d1b350c55f1c806b06bf86797e164081ccc977fc9b3af7a" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a4e4de62f7bd54a11da5b031f9c831040eef3790b9e111f40332feaea4cdd682" + sha256 cellar: :any, arm64_sequoia: "c154ef3c2f532ebb1e73372a76230d144057983813624abbad7ca85d1ce3a2b8" + sha256 cellar: :any, arm64_sonoma: "dbd59e13386ef0e756eac19424e54c8b3d30ae65eb4c7c7f7d102a290fd409f7" + sha256 cellar: :any, arm64_ventura: "db2c6a451a395ff30ceff7e6dbfd30f7b02343bf08e850ae9d0e20d6c9da42b1" + sha256 cellar: :any, sonoma: "19a58769977601b8bbc47959efeefb4bad5cc938d7dcde0c083c8227d8296026" + sha256 cellar: :any, ventura: "0fc063e7d4d00b0b93b8b71c5d57921afad9d09d21ddb044e4e6cc44cecfe9ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "239e6447b0d84b67599683cea8cadae7f8dd273e51426f819603f635577a4dc8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62bf69d2c9fe15ec8c9fe12e690befc1d8971c05b7f3f2fb890e2f4740e88798" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + + # Check Homebrew ncurses terminfo if available. + terminfo_dirs = [Formula["ncurses"].opt_share/"terminfo"] + + terminfo_dirs += if OS.mac? + [Utils.safe_popen_read("ncurses5.4-config", "--terminfo-dirs").strip] + else + # Unibilium's default terminfo path + %w[ + /etc/terminfo + /lib/terminfo + /usr/share/terminfo + /usr/lib/terminfo + /usr/local/share/terminfo + /usr/local/lib/terminfo + ] + end + + system "make", "TERMINFO_DIRS=\"#{terminfo_dirs.join(":")}\"" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + setvbuf(stdout, NULL, _IOLBF, 0); + unibi_term *ut = unibi_dummy(); + unibi_destroy(ut); + printf("%s", unibi_terminfo_dirs); + return 0; + } + C + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lunibilium", "-o", "test" + assert_match %r{\A#{Formula["ncurses"].opt_share}/terminfo:}o, shell_output("./test") + end +end diff --git a/Formula/u/unicorn.rb b/Formula/u/unicorn.rb new file mode 100644 index 0000000000000..0fba76001b343 --- /dev/null +++ b/Formula/u/unicorn.rb @@ -0,0 +1,80 @@ +class Unicorn < Formula + desc "Lightweight multi-architecture CPU emulation framework" + homepage "https://www.unicorn-engine.org/" + url "https://github.com/unicorn-engine/unicorn/archive/refs/tags/2.1.4.tar.gz" + sha256 "ea8863f095a0136388694e5a6063afd9bb7650e30243dd6251af59c5ce5601f4" + license all_of: [ + "GPL-2.0-only", + "GPL-2.0-or-later", # glib, qemu + ] + head "https://github.com/unicorn-engine/unicorn.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e317a3a90c3c1209bd849383f6b3a4b12c4bce696e1265c86ed4f4982581d274" + sha256 cellar: :any, arm64_sequoia: "717aaa05f34162a41e10f5abfe602e4782dd96f36f430cf95a54a383f946a138" + sha256 cellar: :any, arm64_sonoma: "ea180ba3dcebf82a08b4f609d165939c6882117b5b05d928ce82ca9e932f9a4c" + sha256 cellar: :any, arm64_ventura: "4840fa33b6992f0c941c4df168c856af825d1e4304a8c3b93f61dab9a72e6adb" + sha256 cellar: :any, sonoma: "b5fa6de6bd6cc5724e389317ad7e9aeddab31d79fa80c27570b728476e9d47c5" + sha256 cellar: :any, ventura: "b5867abd468fce9779267faa65115f42986a2d5d4d6f59d2af0c6c39b726dc45" + sha256 cellar: :any_skip_relocation, arm64_linux: "c31c5817a5dee6699a2e9e0f520bd2e5084b6c94a230ddf602ad8c076cac1599" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d95c484b1fb36c5a31dc3c5e2d6d20881de4ec035f20263e190f2bd33005d96" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DUNICORN_SHARE=yes", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test1.c").write <<~C + /* Adapted from https://www.unicorn-engine.org/docs/tutorial.html + * shamelessly and without permission. This almost certainly needs + * replacement, but for now it should be an OK placeholder + * assertion that the libraries are intact and available. + */ + + #include + + #include + + #define X86_CODE32 "\x41\x4a" + #define ADDRESS 0x1000000 + + int main(int argc, char *argv[]) { + uc_engine *uc; + uc_err err; + int r_ecx = 0x1234; + int r_edx = 0x7890; + + err = uc_open(UC_ARCH_X86, UC_MODE_32, &uc); + if (err != UC_ERR_OK) { + fprintf(stderr, "Failed on uc_open() with error %u.\\n", err); + return -1; + } + uc_mem_map(uc, ADDRESS, 2 * 1024 * 1024, UC_PROT_ALL); + if (uc_mem_write(uc, ADDRESS, X86_CODE32, sizeof(X86_CODE32) - 1)) { + fputs("Failed to write emulation code to memory.\\n", stderr); + return -1; + } + uc_reg_write(uc, UC_X86_REG_ECX, &r_ecx); + uc_reg_write(uc, UC_X86_REG_EDX, &r_edx); + err = uc_emu_start(uc, ADDRESS, ADDRESS + sizeof(X86_CODE32) - 1, 0, 0); + if (err) { + fprintf(stderr, "Failed on uc_emu_start with error %u (%s).\\n", + err, uc_strerror(err)); + return -1; + } + uc_close(uc); + puts("Emulation complete."); + return 0; + } + C + system ENV.cc, "-o", "test1", "test1.c", "-pthread", "-lpthread", "-lm", "-L#{lib}", "-lunicorn" + system testpath/"test1" + end +end diff --git a/Formula/u/unifdef.rb b/Formula/u/unifdef.rb new file mode 100644 index 0000000000000..39b176deb57d6 --- /dev/null +++ b/Formula/u/unifdef.rb @@ -0,0 +1,39 @@ +class Unifdef < Formula + desc "Selectively process conditional C preprocessor directives" + homepage "https://dotat.at/prog/unifdef/" + url "https://dotat.at/prog/unifdef/unifdef-2.12.tar.gz" + sha256 "fba564a24db7b97ebe9329713ac970627b902e5e9e8b14e19e024eb6e278d10b" + license all_of: [ + "BSD-2-Clause", + "BSD-3-Clause", # only for `unifdef.1` + ] + head "https://github.com/fanf2/unifdef.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "32f10f0ec152a2e92709ac763ae4538cc33d0504be7981302da2d9e183d55334" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d582e3e4238886e561523bdc7f0a1066ac4316c06efd6efd710ba0e6f7ea5898" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c67a592e10c3d607f6ea9676fe8bb6ac59472b2eec185261e9d382d186f65707" + sha256 cellar: :any_skip_relocation, arm64_ventura: "703fd0028a589e6862e6fb89564a0f1bbb17091dd5d9b35b7c338e172e8d554c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6f6b3c3f19a6bcf92928abedb4b6b77249fd8b88caa25495c6dd2367f34d6ac0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8dbc4bc39701aac4f2da738734f72bc002ad3e3e802343405b5c4acd1eb42928" + sha256 cellar: :any_skip_relocation, sonoma: "20af4f3b948e04fda28c60eb66b3f8b641073d2b4f84ecc54c0df4172961484f" + sha256 cellar: :any_skip_relocation, ventura: "dc78ddeb1a4e7a7501b778360e664f0ddb7a66945b5ee66141a8292f072fbce5" + sha256 cellar: :any_skip_relocation, monterey: "a4f1210ad5c6a8b1c4673aec0339343492ac84eadec4c16a4ebf259e982604af" + sha256 cellar: :any_skip_relocation, big_sur: "aa7b0d6df5dfa2fbaa5886881def3b22b1bb55917f3734f7aede03816c257b28" + sha256 cellar: :any_skip_relocation, catalina: "ae908aa0c1845ce059576df3922808db790fb0ea91109f89aa930c8da7a68904" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea9e4af82e2fb61fc1cc1ebeac02116bd1cf6a62d2d3e6fd3f4aabaac946487f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb229f3727c18db662a53be7406a73ed233acd172bb161e53af606baa4de016b" + end + + keg_only :provided_by_macos + + def install + system "make", "prefix=#{prefix}", "install" + end + + test do + pipe_output(bin/"unifdef", "echo ''") + end +end diff --git a/Formula/u/unison.rb b/Formula/u/unison.rb new file mode 100644 index 0000000000000..8457d9fefcb5e --- /dev/null +++ b/Formula/u/unison.rb @@ -0,0 +1,44 @@ +class Unison < Formula + desc "File synchronization tool" + homepage "https://www.cis.upenn.edu/~bcpierce/unison/" + url "https://github.com/bcpierce00/unison/archive/refs/tags/v2.53.7.tar.gz" + sha256 "a259537cef465c4806d6c1638c382620db2dd395ae42a0dd2efa3ba92712bed5" + license "GPL-3.0-or-later" + head "https://github.com/bcpierce00/unison.git", branch: "master" + + # The "latest" release on GitHub sometimes points to unstable versions (e.g., + # release candidates), so we check the Git tags instead. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c68218e549c0491d88c1e02216101ac3773930559beea5254fe44727d2085ffb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a438d9f6ebf8318b89efb5a90a75a1f868cc97a6d7cb946fc4ccc8e6e2eba8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b4395fbbe4b611bdc416c5259d92dede2513075efc54aa2dd45cfdf7684bb44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3cdc258a6195ed8bf7d6cf8b133514b9095d78ac2959e6046d799f21c5b0e060" + sha256 cellar: :any_skip_relocation, sonoma: "31775a533d0d7564451e30b2e733b1cafacba867c350a39419299831b7c56bb8" + sha256 cellar: :any_skip_relocation, ventura: "44fde2dbd196dafa390ced91ad35cea7c22e65ea2a32462bd626459b80bd1af3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b57e871a883112dd1ebb85cf7862e1be1224ce27856e2de283906df7bc068b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "791845dc0fad058e50afecf62cd4ce75c65bde67cf3c2d3b28743d46ba86c8b2" + end + + depends_on "ocaml" => :build + + conflicts_with cask: "unison-app" + + def install + system "make", "src/unison" + bin.install "src/unison" + # unison-fsmonitor is built just for Linux targets + if OS.linux? + system "make", "src/unison-fsmonitor" + bin.install "src/unison-fsmonitor" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/unison -version") + end +end diff --git a/Formula/u/unisonlang.rb b/Formula/u/unisonlang.rb new file mode 100644 index 0000000000000..cbf52fc337dfe --- /dev/null +++ b/Formula/u/unisonlang.rb @@ -0,0 +1,119 @@ +class Unisonlang < Formula + desc "Friendly programming language from the future" + homepage "https://unison-lang.org/" + license "MIT" + + stable do + url "https://github.com/unisonweb/unison.git", + tag: "release/0.5.49", + revision: "d85de68861c65d6419a6ac9df8022400adb27f4d" + + resource "local-ui" do + url "https://github.com/unisonweb/unison-local-ui/archive/refs/tags/release/0.5.49.tar.gz" + sha256 "33f0043667cee96da2cf280e1ab364f3a537f36368b8dcc22ab652fe412a1222" + + livecheck do + formula :parent + end + end + end + + livecheck do + url :stable + regex(%r{^release/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "14d799f4d8116f0e1bfbeb2fcb519e281b92a4eda16216e22567b827fa28f95d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "99f973cbdab57fde249a30d66dbfd80c4dafd914b425f6e88940c3a437677613" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0159bb8829c2b678aeb20ebbd8a37631237fd1195d912551a8fb1720eb552359" + sha256 cellar: :any_skip_relocation, sonoma: "8ca28b5775cb38ecdda78872c8a5a42b7a215ad8fd76b64cc9a179318455790e" + sha256 cellar: :any_skip_relocation, arm64_linux: "58f6de572c563be3f6b3492b0fb383a1cd21e242e68147f85e6ba3eac9fea6e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7364d2513f2eef2e62ae03d1653737e212bb99c2ba22bb950d7dd8de78a8acca" + end + + head do + url "https://github.com/unisonweb/unison.git", branch: "trunk" + + resource "local-ui" do + url "https://github.com/unisonweb/unison-local-ui.git", branch: "main" + end + end + + depends_on "elm" => :build + depends_on "elm-format" => :build + depends_on "ghc@9.6" => :build + depends_on "haskell-stack" => :build + depends_on "node" => :build + + uses_from_macos "python" => :build + uses_from_macos "xz" => :build + uses_from_macos "zlib" + + def install + odie "local-ui resource needs to be updated" if build.stable? && version != resource("local-ui").version + + jobs = ENV.make_jobs + ENV.deparallelize + + # Build and install the web interface + resource("local-ui").stage do + ENV["npm_config_ignore_scripts"] = "elm,elm-format" + + system "npm", "install", *std_npm_args(prefix: false) + # Install missing peer dependencies + system "npm", "install", *std_npm_args(prefix: false), "favicons" + + # Wire the real binaries into node_modules + ln_sf Formula["elm"].opt_bin/"elm", "node_modules/elm/bin/elm" + ln_sf Formula["elm-format"].opt_bin/"elm-format", "node_modules/elm-format/bin/elm-format" + + # HACK: Flaky command occasionally stalls build indefinitely so we force fail + # if that occurs. Problem seems to happening while running `elm-json install`. + # Issue ref: https://github.com/zwilias/elm-json/issues/50 + Timeout.timeout(300) do + system "npm", "run", "ui-core-install" + end + system "npm", "run", "build" + + prefix.install "dist/unisonLocal" => "ui" + end + + stack_args = %W[ + -v + --system-ghc + --no-install-ghc + --skip-ghc-check + --copy-bins + --local-bin-path=#{buildpath} + ] + + system "stack", "-j#{jobs}", "build", *stack_args + + prefix.install "unison" => "ucm" + bin.install_symlink prefix/"ucm" + end + + test do + (testpath/"hello.u").write <<~UNISON + helloTo : Text ->{IO, Exception} () + helloTo name = + printLine ("Hello " ++ name) + + hello : '{IO, Exception} () + hello _ = + helloTo "Homebrew" + UNISON + + (testpath/"hello.md").write <<~MARKDOWN + ```ucm + scratch/main> project.create test + test/main> load hello.u + test/main> add + test/main> run hello + ``` + MARKDOWN + + assert_match "Hello Homebrew", shell_output("#{bin}/ucm --codebase-create ./ transcript.fork hello.md") + end +end diff --git a/Formula/u/unittest-cpp.rb b/Formula/u/unittest-cpp.rb new file mode 100644 index 0000000000000..3085a3fa19e98 --- /dev/null +++ b/Formula/u/unittest-cpp.rb @@ -0,0 +1,51 @@ +class UnittestCpp < Formula + desc "Unit testing framework for C++" + homepage "https://github.com/unittest-cpp/unittest-cpp" + license "MIT" + + stable do + url "https://github.com/unittest-cpp/unittest-cpp/releases/download/v2.0.0/unittest-cpp-2.0.0.tar.gz" + sha256 "1d1b118518dc200e6b87bbf3ae7bfd00a0cfc6be708255f98e5e3d627a7c9f98" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2323ac44a3d90775803af02237bc15b7b3ea93c3fa0e7b1aadfb792e4fd29193" + sha256 cellar: :any, arm64_sequoia: "8477bf1fd9cd1f227c003d267c92492e60b169896c2e9e04b23ba7473b89201a" + sha256 cellar: :any, arm64_sonoma: "618082a8d57ee7c5a285bd1f2e8fffc2edc76ba703e0764baf13f34236d44813" + sha256 cellar: :any, arm64_ventura: "28ee0e0de478207bb7eedd6520545049ef6c56c7a552aca7c3376c57c1d7a51d" + sha256 cellar: :any, arm64_monterey: "f2a8bed855277f7c67eb1c174b323cbac98d332db7cd30e69f6d4982eb9c4bd1" + sha256 cellar: :any, arm64_big_sur: "462837c9588ccf8f585d9d82af071bb91a59f2bf3ef155ccc863c416491cab68" + sha256 cellar: :any, sonoma: "28884982e1d90392cf66cc823860eda61d9bd4cb6b3946b05f7bb3f36d6115e1" + sha256 cellar: :any, ventura: "d925e9cb70b8846bdc1c8a5c7af8d0fcda5192ccb16c5b47a96bf22070f0d427" + sha256 cellar: :any, monterey: "6689794273416bc2eaaf64753f76a1c6529bb8b859d7a58291d8aae03f5a4268" + sha256 cellar: :any, big_sur: "ea9e79c44e4bc95225504ea78baf0ae87b440f3a555239725672b3b5b205ebc5" + sha256 cellar: :any, catalina: "19a4cef9ba95b37528f2a88d280b0f4c77809d7553a8e5747cfd4e41363f2fce" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d3f6916cc0b8b7006d3a5c5480ad23154ed7ab4ca58d187d1412b4655c12800" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b00aa2974e4ab2714fb6d98ada6b1dc127a20641f05170196ecf58beea63d6a7" + end + + head do + url "https://github.com/unittest-cpp/unittest-cpp.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, File.read(lib/"pkgconfig/UnitTest++.pc") + end +end diff --git a/Formula/u/unittest.rb b/Formula/u/unittest.rb new file mode 100644 index 0000000000000..81a1b1fd35385 --- /dev/null +++ b/Formula/u/unittest.rb @@ -0,0 +1,41 @@ +class Unittest < Formula + desc "C++ Unit Test Framework" + homepage "https://unittest.red-bean.com/" + url "https://unittest.red-bean.com/tar/unittest-0.50-62.tar.gz" + sha256 "9586ef0149b6376da9b5f95a992c7ad1546254381808cddad1f03768974b165f" + license "BSD-3-Clause" + + livecheck do + url "https://unittest.red-bean.com/tar/" + regex(/href=.*?unittest[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1dca828fc584f8c03ad644362e528a803710f424773a437bb3cd22a28356cec4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "21c093f62ed5f62198f1a5275ea0e1793db566cdf0b6893e0a153a84ed41253f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "22d12ce92d27e2c6b3b1c137d6193c4295c6aadb4dd658fe0ee10822ca130367" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c301be0c1a8cabb9339ce5f1a2284c6c9d7c54a3f9458f92563d388ec418f0b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dc9de7f5271e4a57ce5f2bd565924006f39ebb8f136ba5f4493778007c019ff5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2da59f3f0206902816c2dac6c273768858f092eb917b696b0a8b04096ea97007" + sha256 cellar: :any_skip_relocation, sonoma: "e99414011e169671d5946a628027bc27c4a76d633cd658524d5adaf9a5fccfae" + sha256 cellar: :any_skip_relocation, ventura: "a6600c783f2a191f11bb0f4b8f236819216ee20e2d4610bcc006a4478a706ded" + sha256 cellar: :any_skip_relocation, monterey: "d83feaeec071b449126875572d29d4df64580c06c2f4a8fcc4fca55a5c68c7f4" + sha256 cellar: :any_skip_relocation, big_sur: "8f449bf2ba73aaf03dd8316d6057639bd2c3a38ef347157f3721cbabfb60212f" + sha256 cellar: :any_skip_relocation, catalina: "ef8f5c6e18c32b813cb825ce467a6997592dca4762833f8e03f156629ffa74f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc7cca539bea1e17f6eb787a2061ee632cbde672e48ddb1f551a5802eab80b01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "253282b6d8bd11e9b124dea0b9356211b422502f0e809cd2f043f791275d7459" + end + + def install + ENV.append "CXX", "-std=c++03" + system "./configure", *std_configure_args + system "make", "install" + pkgshare.install "test/unittesttest" + end + + test do + system "#{pkgshare}/unittesttest" + end +end diff --git a/Formula/u/unitycatalog.rb b/Formula/u/unitycatalog.rb new file mode 100644 index 0000000000000..77747ae370261 --- /dev/null +++ b/Formula/u/unitycatalog.rb @@ -0,0 +1,54 @@ +class Unitycatalog < Formula + desc "Open, Multi-modal Catalog for Data & AI" + homepage "https://unitycatalog.io/" + url "https://github.com/unitycatalog/unitycatalog/archive/refs/tags/v0.3.0.tar.gz" + sha256 "fae708a22f1e38e19f754aca22925d66016a7efeaab680ce87c27496c75078d1" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8d0ef55f20e1d003a29001a2e018e6b0fb839a6c0bab924c25815a92ec7ed421" + end + + depends_on "sbt" => :build + depends_on "openjdk@21" + + def install + system "sbt", "createTarball" + + mkdir "build" do + system "tar", "xzf", "../target/unitycatalog-#{version}.tar.gz", "-C", "." + + inreplace "jars/classpath" do |s| + s.gsub! %r{[^:]+/([^/]+\.jar)}, "#{libexec}/jars/\\1" + end + + prefix.install "bin" + libexec.install "jars" + pkgetc.install "etc" + end + + java_env = Language::Java.overridable_java_home_env("21") + java_env["PATH"] = "${JAVA_HOME}/bin:${PATH}" + bin.env_script_all_files libexec/"bin", java_env + end + + service do + run opt_bin/"start-uc-server" + working_dir etc/"unitycatalog" + end + + test do + port = free_port + spawn bin/"start-uc-server", "--port", port.to_s + sleep 20 + + output = shell_output("#{bin}/uc catalog list --server http://localhost:#{port}") + assert_match "[]", output + end +end diff --git a/Formula/u/uniutils.rb b/Formula/u/uniutils.rb new file mode 100644 index 0000000000000..0f34afe8fcda7 --- /dev/null +++ b/Formula/u/uniutils.rb @@ -0,0 +1,83 @@ +class Uniutils < Formula + desc "Manipulate and analyze Unicode text" + homepage "https://billposer.org/Software/unidesc.html" + url "https://billposer.org/Software/Downloads/uniutils-2.28.tar.gz" + sha256 "41c14c0223376f2d96c80c2ba1b1494fc74cd8982d561630e688e2245aaf3364" + license all_of: [ + "GPL-2.0-or-later", + "GPL-3.0-only", + ] + + livecheck do + url :homepage + regex(/href=.*?uniutils[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c8c2a6ab2e7fd876281c9b107d275f17ab9620a3241a664cdd11af7f02d08fc2" + sha256 cellar: :any, arm64_sequoia: "b1e77b1c7bb772f82fa4f847d6d08f8b7b4da149516636d45ec0aaa662937490" + sha256 cellar: :any, arm64_sonoma: "d2e0b6cb5b9a69c9c3b7741b22d800538287c470d377c7796487146cb7875f33" + sha256 cellar: :any, arm64_ventura: "a7487de087156bf2db6b8db4966e4d8864a822c21da7c07d9c740a17be5771b9" + sha256 cellar: :any, arm64_monterey: "3c4ddbab225f52bd4b6b2b46f35a3a01f827f52367b3cf709251c7eeda260ede" + sha256 cellar: :any, sonoma: "6cb5418da4466190223532647f17da877e3af7d19fe61fce7f56fc1465e47c25" + sha256 cellar: :any, ventura: "6ec87153855511c01c9ec16b2d917c8e80517b3a5da69f74b34f2e40f540b1dc" + sha256 cellar: :any, monterey: "432cba754fdf29b6e4e99e43a45f4340047dbe3042038ab8c2de173c7bfdc596" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ff9239b9e70ce2c37680c210c047c0b8d7b88b68058550a267b98643c1f358c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b35edd0447764ae2524bba5bf3eb9178d70a5a3559b4c896e8ac8bfaf65f2466" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_macos do + depends_on "gettext" # for libintl + end + + # Allow build with clang. This patch was reported to debian here: + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740968 + # And emailed to the upstream source at billposer@alum.mit.edu + patch :DATA + + def install + # fix `./install-sh: Permission denied` issue + system "autoreconf", "--force", "--install", "--verbose" + + # workaround for Xcode 14.3 + if DevelopmentTools.clang_build_version >= 1403 + ENV.append "CFLAGS", "-Wno-implicit-function-declaration -Wno-implicit-int" + end + + # fix `_libintl_bindtextdomain` and `_libintl_textdomain` symbols not found + gettext = Formula["gettext"] + ENV.append "CFLAGS", "-I#{gettext.include}" + ENV.append "LDFLAGS", "-L#{gettext.lib}" + ENV.append "LDFLAGS", "-lintl" if OS.mac? + + system "./configure", "--disable-silent-rules", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + s = pipe_output("#{bin}/uniname", "ü") + assert_match "LATIN SMALL LETTER U WITH DIAERESIS", s + end +end + +__END__ +Description: Fix clang FTBFS [-Wreturn-type] +Author: Nicolas Sévelin-Radiguet +Last-Update: 2014-03-06 +--- a/unifuzz.c ++++ b/unifuzz.c +@@ -97,7 +97,7 @@ + } + + /* Emit the middle character from each range */ +-EmitAllRanges(short AboveBMPP) { ++void EmitAllRanges(short AboveBMPP) { + int i; + UTF32 scp; + extern int Ranges_Defined; diff --git a/Formula/u/universal-ctags.rb b/Formula/u/universal-ctags.rb new file mode 100644 index 0000000000000..b67c80956353c --- /dev/null +++ b/Formula/u/universal-ctags.rb @@ -0,0 +1,63 @@ +class UniversalCtags < Formula + desc "Maintained ctags implementation" + homepage "https://ctags.io/" + url "https://github.com/universal-ctags/ctags/archive/refs/tags/p6.2.20251102.0.tar.gz" + version "p6.2.20251102.0" + sha256 "a920c411c2da33f7acfc0e53dbfe610080b78330114fbdd435856257a4234be0" + license "GPL-2.0-only" + head "https://github.com/universal-ctags/ctags.git", branch: "master" + + livecheck do + url :stable + regex(/^(p\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "012dd4be0ec320cb272e2c9f9e7fe8db14ceba515eef61b8c3a0496f68a0c936" + sha256 cellar: :any, arm64_sequoia: "afeb31c2b7324d5490229fa87296ff3ab2de6a5ed118e648108448b76e90302f" + sha256 cellar: :any, arm64_sonoma: "0c8961ab1a1888cf8a8466de0ce35d1b9245d7c1eb36d0d05a25e7b1bab8ce18" + sha256 cellar: :any, sonoma: "58ded787f2ae1acae7ae91a1ad0f0c41a472c318531e2a383fb2701af24f54d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "664cd0e44ed35789d1dfb0e916f68e8fb06b5ab7f46748ba7181a0f304b89377" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfed90184e56481e5059b02f1972fbb647475b6b97a4f2754343eb9e56b9f53b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docutils" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "jansson" + depends_on "libyaml" + depends_on "pcre2" + + uses_from_macos "libxml2" + + conflicts_with "ctags", because: "both install `ctags` binaries" + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + void func() + { + printf("Hello World!"); + } + + int main() + { + func(); + return 0; + } + C + system bin/"ctags", "-R", "." + assert_match(/func.*test\.c/, File.read("tags")) + end +end diff --git a/Formula/u/unixodbc.rb b/Formula/u/unixodbc.rb new file mode 100644 index 0000000000000..2640e96d786df --- /dev/null +++ b/Formula/u/unixodbc.rb @@ -0,0 +1,45 @@ +class Unixodbc < Formula + desc "ODBC 3 connectivity for UNIX" + homepage "https://www.unixodbc.org/" + url "https://www.unixodbc.org/unixODBC-2.3.14.tar.gz" + mirror "https://fossies.org/linux/privat/unixODBC-2.3.14.tar.gz" + sha256 "4e2814de3e01fc30b0b9f75e83bb5aba91ab0384ee951286504bb70205524771" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.unixodbc.org/download.html" + regex(/href=.*?unixODBC[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "16b4c2a9d565749bae947c75a100ec4628e57c427af5b542593f67474077b3cb" + sha256 arm64_sequoia: "e1522105d20545743c713e90c17bf6393d7a829ec01137ec0d6942bbc04ea2d2" + sha256 arm64_sonoma: "39f022a55a502b3b1d46769705cc46c4aa9f9206b902558ed56cd47aab3d54d8" + sha256 sonoma: "6fc56b53e2abd5b38ed655c2c32caae95753e6b6f5a9fe0a10c4b760a3974d2e" + sha256 arm64_linux: "8e6e9979f6e88ae812222d215688d5b044e25f3182a70e3fbeec3ca07dd9f3d9" + sha256 x86_64_linux: "3f04884aa241e341fea833df1fcb51ec7b181e5a75ff4a7b86ca87dc4c7a24dd" + end + + depends_on "libtool" + + conflicts_with "virtuoso", because: "both install `isql` binaries" + + # These conflict with `libiodbc`, which is now keg-only. + link_overwrite "include/odbcinst.h", "include/sql.h", "include/sqlext.h", + "include/sqltypes.h", "include/sqlucode.h" + link_overwrite "lib/libodbc.a", "lib/libodbc.so" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--enable-static", + "--enable-gui=no" + system "make", "install" + end + + test do + system bin/"odbcinst", "-j" + end +end diff --git a/Formula/u/unnethack.rb b/Formula/u/unnethack.rb new file mode 100644 index 0000000000000..d91358927d218 --- /dev/null +++ b/Formula/u/unnethack.rb @@ -0,0 +1,92 @@ +class Unnethack < Formula + desc "Fork of Nethack" + homepage "https://unnethack.wordpress.com/" + license "NGPL" + + stable do + url "https://github.com/UnNetHack/UnNetHack/archive/refs/tags/5.3.2.tar.gz" + sha256 "a32a2c0e758eb91842033d53d43f718f3bc719a346e993d9b23bac06f0ac9004" + + # Apply upstream commit to fix build with newer bison. Remove with next release. + patch do + url "https://github.com/UnNetHack/UnNetHack/commit/04f0a3a850a94eb8837ddcef31303968240d1c31.patch?full_index=1" + sha256 "5285dc2e57b378bc77c01879399e2af248ef967977ed50e0c13a80b1993a7081" + end + + # Fix implicit `ioctl` function declaration. Remove with the next release. + patch do + url "https://github.com/UnNetHack/UnNetHack/commit/33a3bb6539452875a88efbf6da0148a1cccc00c1.patch?full_index=1" + sha256 "07e1bb472c4f20957dafc6cfc49fcfd3178a5e04fcebf93a4fc7922ec8c0a963" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(?:[._-]\d{6,8})?)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "95679ab2628590f991ccb63e169583d400bfadc242a7cc87cf914e733104f1f1" + sha256 arm64_sequoia: "fccec5070c4616fe421556ce507d015687ccdcd4da2681b2f8cc676dd4e7df9e" + sha256 arm64_sonoma: "1c6320df0cd991aeb79ab344592d38726b9844cf5427c15b8a24d3195f2864b7" + sha256 arm64_ventura: "dce7d673a3f638fe97b4757fe3d78cb61b5fbdd1fec8b1f536e1295179195e91" + sha256 arm64_monterey: "05c4befbdb39343bd07d991ea4d3b048215098aea8af4239e0c6ecef27deb330" + sha256 arm64_big_sur: "5b4386eee78f20075e693b6ad437df496c8c914518161d8901991c1c4a6ee1f9" + sha256 sonoma: "c3a805f2af26f6941d60c7366f6c4f05fe67851fbe61c30fc2f73d05963b07a9" + sha256 ventura: "25c86b07ec5d9a182bf5a55a607bf232297585269d68ba7c6abcdd71eea6b8fa" + sha256 monterey: "c93c7e1e75f40ea747049d51072aefee9604e92c2643921aaa251ca35a08b2fc" + sha256 big_sur: "45d58053580ccdf9b65510768136206b71453b3457f23240a6dc592f817a6145" + sha256 catalina: "5a1aea5f715d4c8892be4a5e76d60157da6637559a0055c41ea8024284807e91" + sha256 arm64_linux: "fe7c3c84361536ea594420bcd89757bac4450462dfe0b9a2dd47e7626f3ec1d8" + sha256 x86_64_linux: "31307b80abcdcf33c36d3716969e3a2b8202d80e6ea79574f3689d21eb3faac5" + end + + head do + url "https://github.com/UnNetHack/UnNetHack.git", branch: "master" + + depends_on "lua" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_linux do + depends_on "util-linux" + end + + # directory for temporary level data of running games + skip_clean "var/unnethack/level" + + def install + # Workaround for newer Clang. Fixed in HEAD but requires large patch + # Ref: https://github.com/UnNetHack/UnNetHack/commit/00dd95ccad390e72d6a4fb2e058df48ed509b564 + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + ENV["LUA_INCLUDE"] = "-I#{Formula["lua"].opt_include}/lua" if build.head? + + # directory for version specific files that shouldn't be deleted when + # upgrading/uninstalling + version_specific_directory = "#{var}/unnethack/#{version}" + + args = [ + "--prefix=#{prefix}", + "--with-owner=#{`id -un`}", + # common xlogfile for all versions + "--enable-xlogfile=#{var}/unnethack/xlogfile", + "--with-bonesdir=#{version_specific_directory}/bones", + "--with-savesdir=#{version_specific_directory}/saves", + "--enable-wizmode=#{`id -un`}", + ] + args << "--with-group=admin" if OS.mac? + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args + ENV.deparallelize # Race condition in make + + # disable the `chgrp` calls + system "make", "install", "CHGRP=#" + end +end diff --git a/Formula/u/unoconv.rb b/Formula/u/unoconv.rb new file mode 100644 index 0000000000000..bb978ccf20d2e --- /dev/null +++ b/Formula/u/unoconv.rb @@ -0,0 +1,47 @@ +class Unoconv < Formula + include Language::Python::Virtualenv + + desc "Convert between any document format supported by OpenOffice" + homepage "https://github.com/unoconv/unoconv" + url "https://files.pythonhosted.org/packages/ab/40/b4cab1140087f3f07b2f6d7cb9ca1c14b9bdbb525d2d83a3b29c924fe9ae/unoconv-0.9.0.tar.gz" + sha256 "308ebfd98e67d898834876348b27caf41470cd853fbe2681cc7dacd8fd5e6031" + license "GPL-2.0-only" + revision 4 + head "https://github.com/unoconv/unoconv.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f291c61047fa90c216cc24d8363d849594bfac8ecbe103a4163a5fdd1c2621ab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f291c61047fa90c216cc24d8363d849594bfac8ecbe103a4163a5fdd1c2621ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f291c61047fa90c216cc24d8363d849594bfac8ecbe103a4163a5fdd1c2621ab" + sha256 cellar: :any_skip_relocation, sonoma: "ff27d27f6639defe6172e7fa54ba4421e3b89fa89cea8bd6982072899bb0bc1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff27d27f6639defe6172e7fa54ba4421e3b89fa89cea8bd6982072899bb0bc1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff27d27f6639defe6172e7fa54ba4421e3b89fa89cea8bd6982072899bb0bc1e" + end + + deprecate! date: "2025-04-27", because: :repo_archived, replacement_formula: "unoserver" + + depends_on "python@3.14" + + pypi_packages extra_packages: "setuptools" + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + def install + virtualenv_install_with_resources + man1.install "doc/unoconv.1" + end + + def caveats + <<~EOS + In order to use unoconv, a copy of LibreOffice between versions 3.6.0.1 - 4.3.x must be installed. + EOS + end + + test do + assert_match "office installation", pipe_output("#{bin}/unoconv 2>&1") + end +end diff --git a/Formula/u/unoserver.rb b/Formula/u/unoserver.rb new file mode 100644 index 0000000000000..2662303615264 --- /dev/null +++ b/Formula/u/unoserver.rb @@ -0,0 +1,24 @@ +class Unoserver < Formula + include Language::Python::Virtualenv + + desc "Server for file conversions with Libre Office" + homepage "https://github.com/unoconv/unoserver" + url "https://files.pythonhosted.org/packages/eb/4d/1bdb4f4a8c7fa128a5ca047672d5760228bafc290f2d5ce8cd46d4d1658a/unoserver-3.4.tar.gz" + sha256 "3dcf2204013def1d1ddd3671f38b11346bdf349fef9728277462666a8a634419" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5de729d1856ff399c3b65420322c5c477c1a45f0076641a2cd0f879fb7e9eb6b" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_match "office installation", pipe_output("#{bin}/unoserver 2>&1") + end +end diff --git a/Formula/u/unp.rb b/Formula/u/unp.rb new file mode 100644 index 0000000000000..76ee1bdfab66f --- /dev/null +++ b/Formula/u/unp.rb @@ -0,0 +1,40 @@ +class Unp < Formula + desc "Unpack everything with one command" + homepage "https://tracker.debian.org/pkg/unp" + url "https://deb.debian.org/debian/pool/main/u/unp/unp_2.0.tar.xz" + sha256 "651764eeed41331e699ead891334e3d9512048f6891d55db7761412323622970" + license "GPL-2.0-only" + + livecheck do + url "https://deb.debian.org/debian/pool/main/u/unp/" + regex(/href=.*?unp[._-]v?(\d+(?:\.\d+)+(?:~pre\d+)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "f8e6eebe12a5258e2798298cf372b0fd8dd80085420656f9dc7b48206073a8a0" + end + + depends_on "p7zip" + + conflicts_with "uutils-coreutils", because: "both install `ucat` binaries" + + def install + bin.install %w[unp ucat] + man1.install "debian/unp.1" + bash_completion.install "debian/unp.bash-completion" => "unp" + %w[COPYING CHANGELOG].each { |f| rm f } + mv "debian/README.Debian", "README" + mv "debian/copyright", "COPYING" + mv "debian/changelog", "ChangeLog" + end + + test do + path = testpath/"test" + path.write "Homebrew" + system "gzip", "test" + system bin/"unp", "test.gz" + assert_equal "Homebrew", path.read + end +end diff --git a/Formula/u/unpaper.rb b/Formula/u/unpaper.rb new file mode 100644 index 0000000000000..f9d07886466e3 --- /dev/null +++ b/Formula/u/unpaper.rb @@ -0,0 +1,53 @@ +class Unpaper < Formula + desc "Post-processing for scanned/photocopied books" + homepage "https://www.flameeyes.com/projects/unpaper" + url "https://www.flameeyes.com/files/unpaper-7.0.0.tar.xz" + sha256 "2575fbbf26c22719d1cb882b59602c9900c7f747118ac130883f63419be46a80" + license "GPL-2.0-or-later" + revision 3 + head "https://github.com/unpaper/unpaper.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "320c0664be9f441fb7a5f6bc021d37530845fa4ea4da99d3d8d401db90b2681d" + sha256 cellar: :any, arm64_sequoia: "99d2fa75bbc4f530241ab2a64e5cbc1a5061fa96c5567faa70eca694b6228ef9" + sha256 cellar: :any, arm64_sonoma: "1d183d40ad7c4dfd89f52ca00311238722f2527a6a1a751e3efc6135e1354a3b" + sha256 cellar: :any, arm64_ventura: "0e1846058cd13818ec2ce52723cede8c9623c31f27f0f9ec86f05c33340f8208" + sha256 cellar: :any, sonoma: "6777c3ff2dd38462fa6977af915316a930a157356ce0b9dd95a2fe99c80b54d2" + sha256 cellar: :any, ventura: "ff58caf46e5464a26fe3e79631296ded2c6372c0bc984ab1192942fe24841880" + sha256 arm64_linux: "dd466760c8a54553861474272a465e1a4460d48bd8dc6a0dd885e5cf39a06a63" + sha256 x86_64_linux: "4ee017ffb7c00c3573b669f7b87f17bca1faceb37ae72f43496d612c36700cc7" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "ffmpeg" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.pbm").write <<~EOS + P1 + 6 10 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 0 0 0 0 1 0 + 1 0 0 0 1 0 + 0 1 1 1 0 0 + 0 0 0 0 0 0 + 0 0 0 0 0 0 + EOS + system bin/"unpaper", testpath/"test.pbm", testpath/"out.pbm" + assert_path_exists testpath/"out.pbm" + end +end diff --git a/Formula/u/unrtf.rb b/Formula/u/unrtf.rb new file mode 100644 index 0000000000000..d1298fc65d2b9 --- /dev/null +++ b/Formula/u/unrtf.rb @@ -0,0 +1,57 @@ +class Unrtf < Formula + desc "RTF to other formats converter" + homepage "https://www.gnu.org/software/unrtf/" + url "https://ftpmirror.gnu.org/gnu/unrtf/unrtf-0.21.10.tar.gz" + mirror "https://ftp.gnu.org/gnu/unrtf/unrtf-0.21.10.tar.gz" + sha256 "b49f20211fa69fff97d42d6e782a62d7e2da670b064951f14bbff968c93734ae" + license "GPL-3.0-or-later" + head "https://hg.savannah.gnu.org/hgweb/unrtf/", using: :hg + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "47b072cc65135724c6ae7cad739a1dfac82adb69afdfe7692e1e035994b69da0" + sha256 arm64_sequoia: "cea46b40e6483a6d9ca253f214b32830ad9fe133502aeee92b4ff06074da8566" + sha256 arm64_sonoma: "b1dc04615894a229fd0ece73e4e96f5a86e6448dc422714d259bee15a9eec0e9" + sha256 arm64_ventura: "fbc5a59efc2a686ed6968150a3101f3e5121194eb8d505672bcf457b924085a1" + sha256 arm64_monterey: "90ccbe686fedc51d5c3ef8f7088577a625e0ad3c3199632fcdc12d6e4e379f52" + sha256 arm64_big_sur: "7a091ab8d8e5a67f2821d1436300d6c41c9f15ead01a83ade9d38fc9cc2494b6" + sha256 sonoma: "6ca9282faa32d4c1c91cd56cf2e6f885b4b87abea3c6d63df37b24405ff3127a" + sha256 ventura: "9371bbf23b01669c95f9742f469f0762e83c7f86c29234d9975f81936f8cdcb0" + sha256 monterey: "ca17c1fba58a187402fd76342528ce8da2c391d25622b425c2db15c8f0345d71" + sha256 big_sur: "198691cb483c4ae73b4c676d289bee8040937afe2881e07afbfb7b9f1e99a760" + sha256 catalina: "90361817069fa7149b201a0caf5e65abd872d10f8fdda154ff450511debf1d99" + sha256 arm64_linux: "97ef0301bf3d4b776f44f968d7e50c6926ee24a5667c405ded4d84eccd762ad1" + sha256 x86_64_linux: "c3e2f45e057ebc00b8a825db67d9bd29396038f2beb692edcea2815c7b9d1284" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "./bootstrap" + args = %W[--prefix=#{prefix}] + args << "LIBS=-liconv" if OS.mac? + system "./configure", *args + system "make", "install" + end + + test do + (testpath/"test.rtf").write <<~'RTF' + {\rtf1\ansi + {\b hello} world + } + RTF + expected = <<~HTML + + + + + + + hello world + + HTML + assert_equal expected, shell_output("#{bin}/unrtf --html test.rtf") + end +end diff --git a/Formula/u/unshield.rb b/Formula/u/unshield.rb new file mode 100644 index 0000000000000..7cbeafcfde003 --- /dev/null +++ b/Formula/u/unshield.rb @@ -0,0 +1,37 @@ +class Unshield < Formula + desc "Extract files from InstallShield cabinet files" + homepage "https://github.com/twogood/unshield" + url "https://github.com/twogood/unshield/archive/refs/tags/1.6.2.tar.gz" + sha256 "a937ef596ad94d16e7ed2c8553ad7be305798dcdcfd65ae60210b1e54ab51a2f" + license "MIT" + head "https://github.com/twogood/unshield.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ca7cacd291d91e1efd405c583a994117fff1fc42dc0fc464312f502607d8abb9" + sha256 cellar: :any, arm64_sequoia: "958b5103955b4485df69ee82cfefd26fb6f41da6852b05a10b0fa75ec04ae558" + sha256 cellar: :any, arm64_sonoma: "397ed621a6603bd58822fe74cd47f32a74396f64daeba951c57ffa3fa699eb80" + sha256 cellar: :any, arm64_ventura: "b7cf5fafee5891f097cba5e79298640a672df925261bb8ecf033d07ccd15df2d" + sha256 cellar: :any, sonoma: "22fe14bf3e367654c7899946475a7eaf8238e27b59a4b7f9c79b0d2705fdba4e" + sha256 cellar: :any, ventura: "f853aee13b486fec004917ef8a3d35a5ba21171da6f0b0a1c7b0cd1904ff6cf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b65582b6f445ae0cd30ac4761345fb6fedfbdca7ae043818b649645d85f329f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bed5e7793bcfe46608d32e67dd616e8e3058909abb805d4f2f91fa9b8b7e3518" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # cmake check for libiconv will miss the OS library without this hint + ENV.append "LDFLAGS", "-liconv" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DUSE_OUR_OWN_MD5=OFF" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"unshield", "-e", "sjis", "-V" + end +end diff --git a/Formula/u/unum.rb b/Formula/u/unum.rb new file mode 100644 index 0000000000000..5e972ff2c9fcd --- /dev/null +++ b/Formula/u/unum.rb @@ -0,0 +1,34 @@ +class Unum < Formula + desc "Interconvert numbers, Unicode, and HTML/XHTML entities" + homepage "https://www.fourmilab.ch/webtools/unum/" + url "https://www.fourmilab.ch/webtools/unum/prior-releases/3.6-15.1.0/unum.tar.gz" + version "3.6-15.1.0" + sha256 "9e4cb91aff389091f8c04122107ce3f7face4389ee27a9fb398b574dda20b457" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + + livecheck do + url "https://www.fourmilab.ch/webtools/unum/prior-releases/" + regex(%r{href=["']?v?(\d+(?:[.-]\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "49e6e959912529d4da9b0097beac4bcc654679022720b74eff4c5010d5ae6c77" + end + + depends_on "pod2man" => :build + + uses_from_macos "perl" + + def install + system "#{Formula["pod2man"].opt_bin}/pod2man", "unum.pl", "unum.1" + bin.install "unum.pl" => "unum" + man1.install "unum.1" + end + + test do + assert_match "LATIN SMALL LETTER X", shell_output("#{bin}/unum x").strip + end +end diff --git a/Formula/u/unxip.rb b/Formula/u/unxip.rb new file mode 100644 index 0000000000000..fb922f39e8634 --- /dev/null +++ b/Formula/u/unxip.rb @@ -0,0 +1,52 @@ +class Unxip < Formula + desc "Fast Xcode unarchiver" + homepage "https://github.com/saagarjha/unxip" + url "https://github.com/saagarjha/unxip/archive/refs/tags/v3.2.tar.gz" + sha256 "6ce48aa06d1fe06352f2937912cb43c7cd93c0a8066222af35d29d6d08130788" + license "LGPL-3.0-only" + head "https://github.com/saagarjha/unxip.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ca5e191670cf44169a204b22a239e8c10e9142baf0995959bf557831b5665a90" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1fa72679808308ce14aee5bf55c8d8c9080de2514705afcd8b5405ffdbfd71b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db9c5c1721975700b4b3bd8b55bb651a9fac41f8723dbad495495a5924905f34" + sha256 cellar: :any_skip_relocation, sonoma: "5ca746820d1e0bfdaacd3c9b051b62239cef1c765bb1b8434461aa07d8749454" + sha256 arm64_linux: "a5dab6693c7660439be128a6bf2abcbd81bacad55360c439daa4a8833f4c4315" + sha256 x86_64_linux: "a0f1eaa4fd6f16d6a20b9cc5707bf569748878e60e76e849d41fddd3115b8797" + end + + depends_on macos: :sonoma + + uses_from_macos "swift", since: :sonoma + + on_sonoma :or_older do + depends_on xcode: ["16.0", :build] + end + + # Uses Compression framework on macOS + on_linux do + depends_on "xz" + depends_on "zlib" + end + + def install + args = %w[--disable-sandbox --configuration release] + args += %W[-Xcc -I#{HOMEBREW_PREFIX}/include -Xlinker -L#{HOMEBREW_PREFIX}/lib] if OS.linux? + + system "swift", "build", *args + bin.install ".build/release/unxip" + end + + test do + assert_equal "unxip #{version}", shell_output("#{bin}/unxip --version").strip + # On Linux we don't have `xar` or XAR support in `libarchive` + return if OS.linux? + + # Create a sample xar archive just to satisfy a .xip header, then test + # the failure case of expanding to a non-existent directory + touch "foo.txt" + system "xar", "-c", "-f", "foo.xip", "foo.txt" + assert_match %r{^Failed to access output directory at /not/a/real/dir.*$}, + shell_output("2>&1 #{bin}/unxip foo.xip /not/a/real/dir", 1) + end +end diff --git a/Formula/u/unyaffs.rb b/Formula/u/unyaffs.rb new file mode 100644 index 0000000000000..855941c395d7c --- /dev/null +++ b/Formula/u/unyaffs.rb @@ -0,0 +1,41 @@ +class Unyaffs < Formula + desc "Extract files from a YAFFS2 filesystem image" + homepage "https://packages.debian.org/sid/unyaffs" + url "https://deb.debian.org/debian/pool/main/u/unyaffs/unyaffs_0.9.7.orig.tar.gz" + sha256 "099ee9e51046b83fe8555d7a6284f6fe4fbae96be91404f770443d8129bd8775" + license "GPL-2.0-only" + revision 1 + + livecheck do + url "https://deb.debian.org/debian/pool/main/u/unyaffs/" + regex(/href=.*?unyaffs[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5068e81bc76a677c3b186e77b91df1b38d9fd0c2936762231c1c54ccceca194a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec8fe9164edaf17dc336a0dc203f5955d17692fa22f508cfe04f4cd87921a85c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "992ddb8ed826d693a43e89852d2a913e79547240910233975d83660b66f88835" + sha256 cellar: :any_skip_relocation, arm64_ventura: "928a43f3c85d35b25a782cca819a91de0f0836745093784bac2ac71217c55ede" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6bcb9d49cf20172488361e571f7411b6db6e42e9052cf005c4035c6a223d5c0d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b70c51c64fb6a69a0b26295d8b1d444c9a1a3b69f0283449657039537074fc64" + sha256 cellar: :any_skip_relocation, sonoma: "88cb072ec2c01fa29325d1992f1261585079091b1641ad3258cf5b1c0276bfbe" + sha256 cellar: :any_skip_relocation, ventura: "641a7e133d326fcaa9d6c280e721c5a265694f086acd7a07ccebd850fe7ed652" + sha256 cellar: :any_skip_relocation, monterey: "1ff1b1841d784d1fccc11d986113a60bad0d61d3faf21ce8f456d8b47d00ae1b" + sha256 cellar: :any_skip_relocation, big_sur: "961d0e37689b4e339382d8354c452640a52df505b2466e49e99775a6870f654b" + sha256 cellar: :any_skip_relocation, catalina: "936d36f9cbe3df837dff0759f65c46e6083c922c1a8e7e504a6ac3b734fd3805" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c792cf1749a245cfabfa082c6ae0fc4ff707f65f258225d3d5d64e20b80b992" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ea922f7eba91f9c6d6f3769fc9491e0f1414d9ecf006855414f8a544ef01638" + end + + def install + system "make" + bin.install "unyaffs" + man1.install "unyaffs.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/unyaffs -V") + end +end diff --git a/Formula/u/unzip.rb b/Formula/u/unzip.rb new file mode 100644 index 0000000000000..7b7dae713a436 --- /dev/null +++ b/Formula/u/unzip.rb @@ -0,0 +1,125 @@ +class Unzip < Formula + desc "Extraction utility for .zip compressed archives" + homepage "https://infozip.sourceforge.net/UnZip.html" + url "https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz" + version "6.0" + sha256 "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" + license "Info-ZIP" + revision 8 + + livecheck do + url :stable + regex(%r{url=.*?(?:%20)?v?(\d+(?:\.\d+)+)/unzip\d+\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be1cb055cbcf3e1420ea25a48ab6da010c2e70efff5ffe7e4e91dac7231c4ae2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe1f7ac37950ec13dde20b2ab1eb86eb45f066a305df1fa6c8349d6de0e14dec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7bb9045e4d39a6409b1eaa113ccd21337374726d74a9b4b2344ea6a87f13543" + sha256 cellar: :any_skip_relocation, arm64_ventura: "28765484286482079acb25eebf967819544b1a86daf3b92f6c19d282296e3915" + sha256 cellar: :any_skip_relocation, sonoma: "ecb59929e280df14e71d9f163de7aa1613f005fb4d44dd40fc1a811ea5d61132" + sha256 cellar: :any_skip_relocation, ventura: "76363f884cbb100c668adea01a3d72a8efadc23e5bee125182ad030d6fd3685f" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c82849237d428857a01410f203b89819f02e7ab28651400d6ebefe46f3feca4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e3fe87c9f438d2012de977edf649608574a8c3265797fb693923bdca9227a7d" + end + + keg_only :provided_by_macos + + uses_from_macos "zip" => :test + uses_from_macos "bzip2" + + # Upstream is unmaintained so we use the Ubuntu patchset: + # https://packages.ubuntu.com/noble/unzip + patch do + url "http://archive.ubuntu.com/ubuntu/pool/main/u/unzip/unzip_6.0-28ubuntu4.1.debian.tar.xz" + sha256 "d123c8e6972dbdd17ba1a4920fb57ed2ede9237dbae149dcbf55df829c77baf3" + apply %w[ + patches/01-manpages-in-section-1-not-in-section-1l.patch + patches/02-this-is-debian-unzip.patch + patches/03-include-unistd-for-kfreebsd.patch + patches/04-handle-pkware-verification-bit.patch + patches/05-fix-uid-gid-handling.patch + patches/06-initialize-the-symlink-flag.patch + patches/07-increase-size-of-cfactorstr.patch + patches/08-allow-greater-hostver-values.patch + patches/09-cve-2014-8139-crc-overflow.patch + patches/10-cve-2014-8140-test-compr-eb.patch + patches/11-cve-2014-8141-getzip64data.patch + patches/12-cve-2014-9636-test-compr-eb.patch + patches/13-remove-build-date.patch + patches/14-cve-2015-7696.patch + patches/15-cve-2015-7697.patch + patches/16-fix-integer-underflow-csiz-decrypted.patch + patches/17-restore-unix-timestamps-accurately.patch + patches/18-cve-2014-9913-unzip-buffer-overflow.patch + patches/19-cve-2016-9844-zipinfo-buffer-overflow.patch + patches/20-cve-2018-1000035-unzip-buffer-overflow.patch + patches/20-unzip60-alt-iconv-utf8.patch + patches/21-fix-warning-messages-on-big-files.patch + patches/22-cve-2019-13232-fix-bug-in-undefer-input.patch + patches/23-cve-2019-13232-zip-bomb-with-overlapped-entries.patch + patches/24-cve-2019-13232-do-not-raise-alert-for-misplaced-central-directory.patch + patches/25-cve-2019-13232-fix-bug-in-uzbunzip2.patch + patches/26-cve-2019-13232-fix-bug-in-uzinflate.patch + patches/27-zipgrep-avoid-test-errors.patch + patches/28-cve-2022-0529-and-cve-2022-0530.patch + ] + end + + def install + # These macros also follow Ubuntu, and are required: + # - to correctly handle large archives (> 4GB) + # - extract & print archive contents with non-latin characters + loc_macros = %w[ + -DLARGE_FILE_SUPPORT + -DUNICODE_SUPPORT + -DUNICODE_WCHAR + -DUTF8_MAYBE_NATIVE + -DNO_WORKING_ISPRINT + ] + cflags = ENV.cflags.to_s.split + cflags << "-DNO_LCHMOD" unless OS.mac? + args = %W[ + CC=#{ENV.cc} + CFLAGS=#{cflags.join(" ")} + LOC=#{loc_macros.join(" ")} + D_USE_BZ2=-DUSE_BZIP2 + L_BZ2=-lbz2 + ] + if OS.mac? + args << "LFLAGS1=-liconv" << "macosx" + else + args << "unzips" + end + system "make", "-f", "unix/Makefile", *args + system "make", "-f", "unix/Makefile", "prefix=#{prefix}", "MANDIR=#{man1}", "install" + end + + test do + (testpath/"test1").write "Hello!" + (testpath/"test2").write "Bonjour!" + (testpath/"test3").write "Hej!" + + if OS.mac? + system "/usr/bin/zip", "test.zip", "test1", "test2", "test3" + else + system Formula["zip"].bin/"zip", "test.zip", "test1", "test2", "test3" + end + %w[test1 test2 test3].each do |f| + rm f + refute_path_exists testpath/f, "Text files should have been removed!" + end + + system bin/"unzip", "test.zip" + %w[test1 test2 test3].each do |f| + assert_path_exists testpath/f, "Failure unzipping test.zip!" + end + + assert_match "Hello!", File.read(testpath/"test1") + assert_match "Bonjour!", File.read(testpath/"test2") + assert_match "Hej!", File.read(testpath/"test3") + end +end diff --git a/Formula/u/up.rb b/Formula/u/up.rb new file mode 100644 index 0000000000000..3cf72fe3a6e2f --- /dev/null +++ b/Formula/u/up.rb @@ -0,0 +1,38 @@ +class Up < Formula + desc "Tool for writing command-line pipes with instant live preview" + homepage "https://github.com/akavel/up" + url "https://github.com/akavel/up/archive/refs/tags/v0.4.tar.gz" + sha256 "3ea2161ce77e68d7e34873cc80324f372a3b3f63bed9f1ad1aefd7969dd0c1d1" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "41660751b3b6db84af28af28f3debef5305f6076127c8e82084665b374a20790" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c337068ce52d195859c44c0f90e4f1264b2d10a87fd6a3616e7ba2949087c7be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a89c4913c0dca7e416bba8ef1cd30684f4ebc7a6f58061a3fa1d22fc91339d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f5a6065d0135d29db9a246ef73a18d6336ad72813783425cb6e109a93ea0a99" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d956b1e6e6d9d1e76beadfdff52cce9bc0b7440813cd046cc96aa18324bc787a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f3452e5a6d248a93e947fb5500bd7c5aad22fe77ad791b07c9fc7fe645b47170" + sha256 cellar: :any_skip_relocation, sonoma: "0be1b12cf1d9ba815952b51c8a12c712a201b73e56d41bf5d8b13c4d9333b21e" + sha256 cellar: :any_skip_relocation, ventura: "518b6745aef4837bb14288c365f26b448d0dbd76d47a996a9a9792330cad05c7" + sha256 cellar: :any_skip_relocation, monterey: "2b54cdd0bb6cb00c205dcfc1b1bd355513999a85e7213bbcac0823ca14f09f58" + sha256 cellar: :any_skip_relocation, big_sur: "48e91e5ef814e94a40749a9765a17eea031cc3e7b20edf4161187d454a1291da" + sha256 cellar: :any_skip_relocation, catalina: "1389b7f7a0c33f8563bacc20c09ba7781440a9fdd0b42a357a944e64dc65e3dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7e2421c9736e3abffbea3612d9d0f4dfe513b6dd4b8ed27ff88f3ee4971d80f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9571f93607c8448f5dc5cc3cffa29dbd87c44f255d6339ca0c119d970f39b051" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "up.go" + end + + test do + assert_match "error", shell_output("#{bin}/up --debug 2>&1", 1) + assert_path_exists testpath/"up.debug", "up.debug not found" + assert_includes File.read(testpath/"up.debug"), "checking $SHELL" + end +end diff --git a/Formula/u/uptimed.rb b/Formula/u/uptimed.rb new file mode 100644 index 0000000000000..be83f62fd3ddf --- /dev/null +++ b/Formula/u/uptimed.rb @@ -0,0 +1,47 @@ +class Uptimed < Formula + desc "Utility to track your highest uptimes" + homepage "https://github.com/rpodgorny/uptimed/" + url "https://github.com/rpodgorny/uptimed/archive/refs/tags/v0.4.7.tar.gz" + sha256 "2f669d2968ca1d0865b7a97791c9dbcca759631a1afc5d6702964f070a57252b" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "1a4da6e33e3e7435bc5113e5188a66010b6040ca93d94516083b81c58b054141" + sha256 cellar: :any, arm64_sequoia: "ee7bb2f7dc9f48106feb78d76476b6adc63ac69234e0b09e4a032479175aac45" + sha256 cellar: :any, arm64_sonoma: "306897fc0a7d58890bd55d642505888b4989db7017b4ddfd1ba0af603ed5365e" + sha256 cellar: :any, arm64_ventura: "c026d07897983b4e7f7f07ceb14d77aeea163b8c3d26bfbdc2e7e3f5a5b2ed56" + sha256 cellar: :any, sonoma: "cfdfb6af9480fc37d99d5bdf24f213de9d42fa5ed907019bd020119a26149b8a" + sha256 cellar: :any, ventura: "c7cf1dd6683a839238be3ff06ae5289bde6e97e0a5594d3d3c1f14c8decf0dd9" + sha256 cellar: :any_skip_relocation, arm64_linux: "08296a599456611026d0242ac0946327fb2c004de2e3f5217af4fa14eabc5348" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63fe05bdf7bb27772273516a7d3886a2a196c5fd78487805ff1b57db150ef784" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + + # Per MacPorts + inreplace "Makefile", "/var/spool/uptimed", "#{var}/uptimed" + inreplace "libuptimed/urec.h", "/var/spool", var + inreplace "etc/uptimed.conf-dist", "/var/run", "#{var}/uptimed" + system "make", "install" + end + + service do + run [opt_sbin/"uptimed", "-f", "-p", var/"run/uptimed.pid"] + keep_alive false + working_dir opt_prefix + end + + test do + system "#{sbin}/uptimed", "-t", "0" + sleep 2 + output = shell_output("#{bin}/uprecords -s") + assert_match(/->\s+\d+\s+\d+\w,\s+\d+:\d+:\d+\s+|.*/, output, "Uptime returned is invalid") + end +end diff --git a/Formula/u/uptoc.rb b/Formula/u/uptoc.rb new file mode 100644 index 0000000000000..3039462efe387 --- /dev/null +++ b/Formula/u/uptoc.rb @@ -0,0 +1,39 @@ +class Uptoc < Formula + desc "Convenient static file deployment tool that supports multiple platforms" + homepage "https://github.com/bonaysoft/uptoc" + url "https://github.com/bonaysoft/uptoc.git", + tag: "v1.4.3", + revision: "30266b490379c816fc08ca3670fd96808214b24c" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a3d7a5541827372a2aae8b7feafc0f335b732fd0697fb2cf1bd608c493b53662" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08d4c187e6b815cf9700234440df6fee4b43a1b434f849b0a198df53b7643c96" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6af1eb82ab71a0b60e91a89799ae844a36b8c5744c34aa3995d138551e057ffd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "942cacc0ae14be9ca4c89497326c0c2d2a80dd9387489ba12de73da0fd98cb62" + sha256 cellar: :any_skip_relocation, arm64_monterey: "09100a8e6f85e66cd71378e628bc57cf200f224750a000be31b6bef6be1a1ae2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7e6500f982ce6d54888461d97c8bad6dda039d065e883a60047ca549d9e06329" + sha256 cellar: :any_skip_relocation, sonoma: "898327e594c1901b920946634905310b4249f00d7d1e8a7aab3dd14e694785ec" + sha256 cellar: :any_skip_relocation, ventura: "cc771d7e3dd47f766d7a7e9fd76a9c5b25367f2f6f2ddafc2ab1c5a08fb5db7a" + sha256 cellar: :any_skip_relocation, monterey: "e9d53160af121806f4eed752935163d9ffc17b84ec42afeedec7eafb8c1bc0a4" + sha256 cellar: :any_skip_relocation, big_sur: "40353c235e30210ab737684f85d6c444b580192eccbf50d84fbae0fa8a64c27b" + sha256 cellar: :any_skip_relocation, catalina: "7a2f3982a14ad4176b17832e87dfb2a41fd10d87e0e35ade341b8baa17d3b7ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "423e183833efc41df40c270119843aa9eba45be0dc56187bebc095ca911721db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac376a91915fef295b2fc42dcc20591f5fc63246308ffe11d920a9ecf6ae59dc" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.release=#{version} -X main.commit=#{Utils.git_head} -X main.repo=#{stable.url}" + system "go", "build", *std_go_args(ldflags:), "./cmd" + end + + test do + assert_match version.to_s, shell_output("#{bin}/uptoc -v 2>&1") + assert_match "uptoc config", shell_output("#{bin}/uptoc ./abc 2>&1", 1) + end +end diff --git a/Formula/u/upx.rb b/Formula/u/upx.rb new file mode 100644 index 0000000000000..99d8d28d32ce2 --- /dev/null +++ b/Formula/u/upx.rb @@ -0,0 +1,38 @@ +class Upx < Formula + desc "Compress/expand executable files" + homepage "https://upx.github.io/" + url "https://github.com/upx/upx/releases/download/v5.0.2/upx-5.0.2-src.tar.xz" + sha256 "209b219bbcfa58c249ffe6eba3c244e0910fa8be792b5521e4daf938167f05cc" + license "GPL-2.0-or-later" + head "https://github.com/upx/upx.git", branch: "devel" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a10f0dbe257ac5d72be40562532c272d3fe14aa4c49c0f3454ec23f0691806e8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "183ba13b8566966fb0f428fe17e887ffeea096c87e59c0be317b8552974f042d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fdcbfa167531022ea0a4fc110c9b96c95fed073027ae048b4357be3189dcaa8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21354b0a85693c6c93d65b82ba60ea6d1cbfd13e5710fd8c9e262f5feded4d0f" + sha256 cellar: :any_skip_relocation, sonoma: "3802c1dede88d78c6d6799e807c0f2cb2b92d8baa1fe09806128c77ea3a0c2d6" + sha256 cellar: :any_skip_relocation, ventura: "921b8e0d57058148d566ad538cacfd3566a20b0f7d61eeb02f7c529f6859d0ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a8479dbe20775134e426975ca1fcada5c4b0aafd4b9c31ff5b8cc45803d348e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "164093aeaaae9de464485858f091a3c5b7cba6a4f5e589fb12864c9ceb2cfa16" + end + + depends_on "cmake" => :build + depends_on "ucl" => :build + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"upx", "-1", "-o", "./hello", test_fixtures("elf/c.elf") + assert_path_exists testpath/"hello" + system bin/"upx", "-d", "./hello" + end +end diff --git a/Formula/u/urdfdom.rb b/Formula/u/urdfdom.rb new file mode 100644 index 0000000000000..cb6033eab4797 --- /dev/null +++ b/Formula/u/urdfdom.rb @@ -0,0 +1,98 @@ +class Urdfdom < Formula + desc "Unified Robot Description Format (URDF) parser" + homepage "https://wiki.ros.org/urdf/" + url "https://github.com/ros/urdfdom/archive/refs/tags/5.0.2.tar.gz" + sha256 "f929a33ec6171a57d4ff7d4c0eff6fb79d4725c279189d4f4c8806c4aa4e71ac" + license "BSD-3-Clause" + + # Upstream uses Git tags (e.g. `1.0.0`) to indicate a new version. They + # created a few releases on GitHub in the past but now they simply use tags. + # See: https://github.com/Homebrew/homebrew-core/pull/158963#issuecomment-1879185279 + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "36671ef4a695736b45da805c8d9de32bb5059b503f614e978ae7d01624c5b7f9" + sha256 cellar: :any, arm64_sequoia: "756fda4ead0dd187f6ed44bdbdf1d03142a4088d334e9d27bfe1ae1b6d0f2cfa" + sha256 cellar: :any, arm64_sonoma: "08e6d3e29fb2072ade8ff174827d0c59ee5c28bcf288e8da09a56846ead4998d" + sha256 cellar: :any, arm64_ventura: "07a35187641e8a0a27266ead0227892a37e8f847ec580877c513382cca1b740c" + sha256 cellar: :any, sonoma: "3d2f693b70cc2f54f6f9135577865cad22d5231197058020586bb98137e525e0" + sha256 cellar: :any, ventura: "f1e57f3dd834b113e765beaa5f26e187647f5ecb34445e761fa5028614fb3d17" + sha256 cellar: :any_skip_relocation, arm64_linux: "c970633d691e7638e3d19fb153f405b76ed940371558199f682b71cca5043e5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df20fa90b221d69a837117f743067ba079e9d414d441aedf1edf1a3ec68169dc" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "console_bridge" + depends_on "tinyxml2" + depends_on "urdfdom_headers" + + def install + ENV.cxx11 + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + std::string xml_string = + "" + " " + " " + " "; + urdf::parseURDF(xml_string); + return 0; + } + CPP + system ENV.cxx, "test.cpp", *shell_output("pkg-config --cflags urdfdom").chomp.split, + "-L#{lib}", "-lurdfdom_world", + "-std=c++11", "-o", "test" + system "./test" + + (testpath/"test.xml").write <<~XML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XML + + system bin/"check_urdf", testpath/"test.xml" + end +end diff --git a/Formula/u/urdfdom_headers.rb b/Formula/u/urdfdom_headers.rb new file mode 100644 index 0000000000000..ac040ea8df88d --- /dev/null +++ b/Formula/u/urdfdom_headers.rb @@ -0,0 +1,43 @@ +class UrdfdomHeaders < Formula + desc "Headers for Unified Robot Description Format (URDF) parsers" + homepage "https://wiki.ros.org/urdfdom_headers/" + url "https://github.com/ros/urdfdom_headers/archive/refs/tags/2.0.0.tar.gz" + sha256 "e12db588ccce52958264f6e4363ca642ab86c328c372e925681a12f7c39d963a" + license "BSD-3-Clause" + + # Upstream uses Git tags (e.g. `1.0.0`) to indicate a new version. They + # created a few releases on GitHub in the past but now they simply use tags. + # See: https://github.com/Homebrew/homebrew-core/pull/158963#issuecomment-1879185279 + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "80c4b6d49d0ad60ef20d34de3e6be2c5ff0087eff03dfe322732b052cbd92f5b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + double quat[4]; + urdf::Rotation rot; + rot.getQuaternion(quat[0], quat[1], quat[2], quat[3]); + return 0; + } + CPP + + system ENV.cxx, shell_output("pkg-config --cflags urdfdom_headers").chomp, "test.cpp", "-std=c++11", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/urh.rb b/Formula/u/urh.rb new file mode 100644 index 0000000000000..406dedf1b51f9 --- /dev/null +++ b/Formula/u/urh.rb @@ -0,0 +1,80 @@ +class Urh < Formula + include Language::Python::Virtualenv + + desc "Universal Radio Hacker" + homepage "https://github.com/jopohl/urh" + url "https://files.pythonhosted.org/packages/7b/af/be36ae7e9184410c2c6d406a1551d7096f394e238cc5f63cb4ddcfc5f2e5/urh-2.9.8.tar.gz" + sha256 "864130b19553833827931f48f874045a39a6cee219a310a910bcd2ef02cf96b4" + license "GPL-3.0-only" + revision 1 + head "https://github.com/jopohl/urh.git", branch: "master" + + no_autobump! because: "`update-python-resources` cannot determine dependencies" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ac9e1a2e9eb4ef1d2a51dd85e54252794f1082f3de02ae077b86bcf7c9c6cc24" + sha256 cellar: :any, arm64_sequoia: "62ea259eba408187297df3dada6609c7e3c132dac3005165d0e641e52220caa0" + sha256 cellar: :any, arm64_sonoma: "44fca98d4457a4a5798ccc36bc43d3d5bb163f5206d371d7348b20babc8c8aed" + sha256 cellar: :any, sonoma: "859acfa8aa4edfa004eabc14350f08ab187986d9fb20f1ebb724daf421fcdc83" + sha256 cellar: :any_skip_relocation, arm64_linux: "d39c8f2f760344dff758d9ab2dff7334046172ff77d8687327dc949dd9e60898" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcb7995e05db0dfd4a416f43bc7cc57b6d31638b2b908e3f5d12ab849062a613" + end + + depends_on "cmake" => :build # for numpy + depends_on "meson" => :build # for numpy + depends_on "ninja" => :build # for numpy + depends_on "pkgconf" => :build + depends_on "hackrf" + depends_on "pyqt@5" + depends_on "python@3.14" + + on_linux do + depends_on "patchelf" => :build # for numpy + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/84/4d/b720d6000f4ca77f030bd70f12550820f0766b568e43f11af7f7ad9061aa/cython-3.0.11.tar.gz" + sha256 "7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff" + end + + # upstream issue: https://github.com/jopohl/urh/issues/1149 + resource "numpy" do + url "https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz" + sha256 "2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/1f/5a/07871137bb752428aa4b659f910b399ba6f291156bdea939be3e96cae7cb/psutil-6.1.1.tar.gz" + sha256 "cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + end + + def install + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resources + # Need to disable build isolation and install Setuptools since `urh` only + # has a setup.py which assumes Cython and Setuptools are already installed + venv.pip_install_and_link(buildpath, build_isolation: false) + end + + test do + (testpath/"test.py").write <<~PYTHON + from urh.util.GenericCRC import GenericCRC; + c = GenericCRC(); + expected = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0] + assert(expected == c.crc([0, 1, 0, 1, 1, 0, 1, 0]).tolist()) + PYTHON + system libexec/"bin/python3", "test.py" + + # test command-line functionality + output = shell_output("#{bin}/urh_cli -pm 0 0 -pm 1 100 -mo ASK -sps 100 -s 2e3 " \ + "-m 1010111100001 -f 868.3e6 -d RTL-TCP -tx 2>/dev/null", 1) + + assert_match(/Modulating/, output) + assert_match(/Successfully modulated 1 messages/, output) + end +end diff --git a/Formula/u/uriparser.rb b/Formula/u/uriparser.rb new file mode 100644 index 0000000000000..f8c4ae79d24a6 --- /dev/null +++ b/Formula/u/uriparser.rb @@ -0,0 +1,44 @@ +class Uriparser < Formula + desc "URI parsing library (strictly RFC 3986 compliant)" + homepage "https://uriparser.github.io/" + url "https://github.com/uriparser/uriparser/releases/download/uriparser-0.9.9/uriparser-0.9.9.tar.bz2" + sha256 "027b923c0ce89786d8cf7a842ef77dcfff3a6a097c0e67d241b447d1eae8db4c" + license "BSD-3-Clause" + head "https://github.com/uriparser/uriparser.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5c4f9193621690a1de4ce6f5ae18f623362314a05762e3b5f7082d61c771854" + sha256 cellar: :any, arm64_sequoia: "e2c29d08c85241f773b135ee33da1ddb8927b7c54c82130fdedd5de90a1b1422" + sha256 cellar: :any, arm64_sonoma: "a630502ffbbf1043adc36494c0323bb8769ef9f90b2fbf0a682ea69bd7f052d3" + sha256 cellar: :any, arm64_ventura: "f516ff326638f85478d18d4d68ee8ef700094465610ad77d5334145f80ae86aa" + sha256 cellar: :any, sonoma: "16c96a36df667b883749319d432e153a17ba8b92d4e095842372393cd56e1eda" + sha256 cellar: :any, ventura: "0d58050aad70cd35e623b6f166035c83239ab5cac6602a618f7b8574caa78206" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d6268670d5d5700b71984169dbced8cfc9f9e0416c23efcedc29825f447464c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecc58cbb61b010dc4464969c6af86038df87e03b858e3f8164faeeb42993945f" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DURIPARSER_BUILD_TESTS=OFF + -DURIPARSER_BUILD_DOCS=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + expected = <<~EOS + uri: https://brew.sh + scheme: https + hostText: brew.sh + absolutePath: false + (always false for URIs with host) + EOS + assert_equal expected, shell_output("#{bin}/uriparse https://brew.sh").chomp + end +end diff --git a/Formula/u/urlfinder.rb b/Formula/u/urlfinder.rb new file mode 100644 index 0000000000000..b6e75f12fab12 --- /dev/null +++ b/Formula/u/urlfinder.rb @@ -0,0 +1,42 @@ +class Urlfinder < Formula + desc "Extracting URLs and subdomains from JS files on a website" + homepage "https://github.com/pingc0y/URLFinder" + url "https://github.com/pingc0y/URLFinder/archive/refs/tags/2023.9.9.tar.gz" + sha256 "033944c58814547d240182daf8506bdf6cd0cd54b25a57212a87e2e70ec92bc7" + license "MIT" + head "https://github.com/pingc0y/URLFinder.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "26b43818b3c94162949546ae14e4f0cf43ca8868a7e16558ce9c7620867a93be" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba0d3713537c7c40ac307a3911c7f96096a03270e8bfb029c73c37a0dbc25357" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2696316763f9ba4efd365b8d76c62ff87a417b4b06aa1cc566da1f4f2b01faf8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4b8b469498628aa1b97562c53a55f8faea5b6337b0d546163907889f9948f16" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f7a21bbee69256af88f1c123453284c9813fe12850093bba484bfaf2f08c7cdc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "830f418eecdb18171ff48442ed58949225c4481225181c5896ae1b87ce54c6e3" + sha256 cellar: :any_skip_relocation, sonoma: "6450a88906097f54b892397bbb2a421a1367836be2cf82ce1afdff1f372b6b57" + sha256 cellar: :any_skip_relocation, ventura: "0e126e8624e34eb2f23653cc1e5db89ca938db380214cd2a9f6638385dd41cad" + sha256 cellar: :any_skip_relocation, monterey: "de4942e24d0f6e39160b160bad5ecb54ad6b0e7bc02ca32eecdb91b55b0a1f4c" + sha256 cellar: :any_skip_relocation, big_sur: "4963b3f926b8d62356802c9ab2ff6bf14ea47348b34fabc6ae32a5373a16c1b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "51861ca3a9390db470a4f09fda72c026b1fe78b98bdeac07d62a71264eb9919b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "955e2684479dcbbd05369e082499a91b856dd0f2f096d25d7c59a64d6f5ae58e" + end + + depends_on "go" => :build + + # upstream PR ref, https://github.com/pingc0y/URLFinder/pull/96 + patch do + url "https://github.com/pingc0y/URLFinder/commit/cd4b141bd92448ed4b27a1db65b05075e40e8200.patch?full_index=1" + sha256 "e08f45c1a103125dfbaec04305f26140fe6766aa137b7a5fbe899d18efdb1064" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "Start 1 Spider...", shell_output("#{bin}/urlfinder -u https://example.com") + assert_match version.to_s, shell_output("#{bin}/urlfinder version") + end +end diff --git a/Formula/u/urlscan.rb b/Formula/u/urlscan.rb new file mode 100644 index 0000000000000..5d9b6a7138d70 --- /dev/null +++ b/Formula/u/urlscan.rb @@ -0,0 +1,36 @@ +class Urlscan < Formula + include Language::Python::Virtualenv + + desc "View/select the URLs in an email message or file" + homepage "https://github.com/firecat53/urlscan" + url "https://files.pythonhosted.org/packages/af/95/4c28f3cfdb866f9a6e301fbafedb0e537dd40c8cf9d33872e67ed38ec1d2/urlscan-1.0.7.tar.gz" + sha256 "041b932f94cb1e2e8dbb20f43322da85cb483be328fa10477c6e5e96a89891c3" + license "GPL-2.0-or-later" + head "https://github.com/firecat53/urlscan.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "17b62b76b4b04fc9fbce367ffbed2cc3514882e37eda4495d9232032eedf1011" + end + + depends_on "python@3.14" + + resource "urwid" do + url "https://files.pythonhosted.org/packages/bb/d3/09683323e2290732a39dc92ca5031d5e5ddda56f8d236f885a400535b29a/urwid-3.0.3.tar.gz" + sha256 "300804dd568cda5aa1c5b204227bd0cfe7a62cef2d00987c5eb2e4e64294ed9b" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + output = pipe_output("#{bin}/urlscan -nc", "To:\n\nhttps://github.com/\nSome Text.\nhttps://brew.sh/") + assert_equal "https://github.com/\nhttps://brew.sh/\n", output + end +end diff --git a/Formula/u/urlview.rb b/Formula/u/urlview.rb new file mode 100644 index 0000000000000..5b7fcc4901386 --- /dev/null +++ b/Formula/u/urlview.rb @@ -0,0 +1,83 @@ +class Urlview < Formula + desc "URL extractor/launcher" + homepage "https://packages.debian.org/sid/misc/urlview" + # TODO: Consider switching to new Debian maintainer's fork if it is adopted + # by other repositories as allowed by our documented policy. Alternatively, + # we could introduce the fork as `urlview-ng` and deprecate this formula. + url "https://deb.debian.org/debian/pool/main/u/urlview/urlview_0.9.orig.tar.gz" + version "0.9-23.1" + sha256 "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42" + license "GPL-2.0-or-later" + + # Since this formula incorporates patches and uses a version like `0.9-21`, + # this check is open-ended (rather than targeting the .orig.tar.gz file), so + # we identify patch versions as well. + livecheck do + url "https://deb.debian.org/debian/pool/main/u/urlview/" + regex(/href=.*?urlview[._-]v?(\d+(?:\.\d+)*[a-z]?(?:-\d+(?:\.\d+)*)?)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b6e3087bd014b40df019a8836f5f478181677742d8b45636acba03c5a7c956fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2a05f008302affc74e6cab2a4fc76d212678746d4d167252e21d0a7f50d49e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ceb55a63116f409bce3870150eda3310cc48f57813c79e6cb6d8a082e9be2eb0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cef111adfd85ccdf8ae30eda094940acc688c8454679b3432c2c8b39e54c32ea" + sha256 cellar: :any_skip_relocation, sonoma: "3197e439d22f3e5dcbfa8b38f2e73c40f52e89252b3279c3c5d236b6605165be" + sha256 cellar: :any_skip_relocation, ventura: "b39f7e2238dbb7ec1e87a121aa48a88bac18b1e269e3a9b84b601ca410260eea" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e27f5f34535a7b50e88660b1bcf3fb56bb430b76fa8f39f07231d7d3a1e95d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb73442a4c8cac047d120ec566f4bbc59ce23b6eece8fdedd67db4bb9832c2dd" + end + + uses_from_macos "ncurses" + + on_linux do + depends_on "automake" + end + + patch do + url "http://ftp.debian.org/debian/pool/main/u/urlview/urlview_0.9-23.1.debian.tar.xz" + sha256 "bdb3b403b165ff1fe7d1a7c05275b6c865e4740d9ed46fd9c81495be1fbe2b9f" + apply "patches/debian.patch", + "patches/Fix-warning-about-implicit-declaration-of-function.patch", + "patches/invoke-AM_INIT_AUTOMAKE-with-foreign.patch", + "patches/Link-against-libncursesw-setlocale-LC_ALL.patch", + "patches/Allow-dumping-URLs-to-stdout.patch" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + man1.mkpath + + url_handler = OS.mac? ? "open" : etc/"urlview/url_handler.sh" + inreplace "urlview.man", "/etc/urlview/url_handler.sh", url_handler + inreplace "urlview.c", + '#define DEFAULT_COMMAND "/etc/urlview/url_handler.sh %s"', + %Q(#define DEFAULT_COMMAND "#{url_handler} %s") + + unless OS.mac? + touch("NEWS") # autoreconf will fail if this file does not exist + system "autoreconf", "--force", "--install", "--verbose" + + # Disable use of librx, since it is not needed on Linux. + ENV["CFLAGS"] = "-DHAVE_REGEX_H" + (etc/"urlview").install "url_handler.sh" + end + + system "./configure", "--mandir=#{man}", "--sysconfdir=#{etc}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.txt").write <<~EOS + https://github.com/Homebrew + EOS + PTY.spawn("urlview test.txt") do |_r, w, _pid| + sleep 1 + w.write("\cD") + end + end +end diff --git a/Formula/u/urlwatch.rb b/Formula/u/urlwatch.rb new file mode 100644 index 0000000000000..b4ae030b4fdca --- /dev/null +++ b/Formula/u/urlwatch.rb @@ -0,0 +1,111 @@ +class Urlwatch < Formula + include Language::Python::Virtualenv + + desc "Get notified when a webpage changes" + homepage "https://thp.io/2008/urlwatch/" + url "https://files.pythonhosted.org/packages/76/a3/e3bc54a669fa3ec440ea9d8db64590e761343b02b6ae9fcfcdc05c28d9ea/urlwatch-2.29.tar.gz" + sha256 "f317ca8b123b15af510ec9e08bf885d8a8b574f502253e5ded200d757366da98" + license "BSD-3-Clause" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ea236318d1131719a6e57a455f3f8f77b38234a4f7d3934e70ff1aa2501f32d5" + sha256 cellar: :any, arm64_sequoia: "fb04b5ba8d463d374d68019d0c9b49bc5bfb6909138318a32117ff36124c194b" + sha256 cellar: :any, arm64_sonoma: "7c4e8da6f2e2c90dca91f0b084fb6ae897ed06f9e1ec97c12d0e8f113c40d0eb" + sha256 cellar: :any, sonoma: "2184dcfadbe944b36361a9e85bc40036d86774640f7c838dd13e9cad6ef0f70b" + sha256 cellar: :any_skip_relocation, arm64_linux: "39da67529211c63a0533556346a7b8580045fcd08d9446745a30d82c7a17d105" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fb0c11c63bb9871912bf09b8822befd11c47f5d384eab827feed8cde05f9683" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/72/0a/c3ea9573b1dc2e151abfe88c7fe0c26d1892fe6ed02d0cdb30f0d57029d5/cssselect-1.3.0.tar.gz" + sha256 "57f8a99424cfab289a1b6a816a43075a4b00948c86b4dcf3ef4ee7e15f7ab0c7" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "minidb" do + url "https://files.pythonhosted.org/packages/aa/ea/5b803a05d523733735f8581cc8a51306cbea1a65ee4a5067abd98a969c4b/minidb-2.0.8.tar.gz" + sha256 "d985748753cc19c2bed83654b77dd0f2212cfa82de7b8fbc8fe5f6058c2c661c" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"config.yaml").write("") + (testpath/"urls.yaml").write("") + output = shell_output("#{bin}/urlwatch --config #{testpath/"config.yaml"} " \ + "--urls #{testpath/"urls.yaml"} --test-filter 1", 1) + assert_match("Not found: '1'", output) + end +end diff --git a/Formula/u/uru.rb b/Formula/u/uru.rb new file mode 100644 index 0000000000000..1a359d47ad1dd --- /dev/null +++ b/Formula/u/uru.rb @@ -0,0 +1,46 @@ +class Uru < Formula + desc "Use multiple rubies on multiple platforms" + homepage "https://bitbucket.org/jonforums/uru" + url "https://bitbucket.org/jonforums/uru/get/v0.8.5.tar.gz" + sha256 "47148454f4c4d5522641ac40aec552a9390a2edc1a0cd306c5d16924f0be7e34" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "93a4aa65b18a37ece4076353fdfee72392dae4a84118ac70e25d0cdd2829ae63" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5422b52374d4e7de9f934714fabe3b984a1e76fb795cc82cdac81c7477bbcf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19c329e3ad2a981d5edcf2f708608297f4b3d5da68c8344744cb78cffd513c42" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e1c97e2f9106da354206149ff4138bc8731b9e68675d57e2080c19bd2951c23c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "afe47dce0be291a7c3c15d9723f5892164d4b72a481747bf2e1f74a1ba7b56fa" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "70e3160416c65e40510431b1bd79105074505ceb63f9619451783eda48cd29e8" + sha256 cellar: :any_skip_relocation, sonoma: "5efa8d6b97be0d898916806359703001ee9438789edf69e171e74b7cd28f5068" + sha256 cellar: :any_skip_relocation, ventura: "aeb836f9cc4bc8f40f488f21abb3ca10bc2d20364e961737a541e0856c9b38fa" + sha256 cellar: :any_skip_relocation, monterey: "85e032eb3924d873d80f6358a5ea0e05b60cb1f28edb22d16d34bdd7ba164ff9" + sha256 cellar: :any_skip_relocation, big_sur: "ac10ec7e98c10782f1b238e768a7f4b2cd7c51040a2db171d731afb9c41130c0" + sha256 cellar: :any_skip_relocation, catalina: "d566fe465acd16153f2b1da700bacb19bb3fd78bfe13b055f255cd3b68688233" + sha256 cellar: :any_skip_relocation, arm64_linux: "3457892313460eef01491b76a45a15a2acca89237f911a482137fb09dcfa6c82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36ec6869ab83065e9bc5a08b7a4ec769297c4e608bc85001886d73598919c6cb" + end + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + (buildpath/"src/bitbucket.org/jonforums/uru").install Dir["*"] + system "go", "build", "-ldflags", "-s", "bitbucket.org/jonforums/uru/cmd/uru" + bin.install "uru" => "uru_rt" + end + + def caveats + <<~EOS + Append to ~/.profile on Ubuntu, or to ~/.zshrc on Zsh + $ echo 'eval "$(uru_rt admin install)"' >> ~/.bash_profile + EOS + end + + test do + system bin/"uru_rt" + end +end diff --git a/Formula/u/urweb.rb b/Formula/u/urweb.rb new file mode 100644 index 0000000000000..5134dc9369c48 --- /dev/null +++ b/Formula/u/urweb.rb @@ -0,0 +1,70 @@ +class Urweb < Formula + desc "Ur/Web programming language" + homepage "http://www.impredicative.com/ur/" + url "https://github.com/urweb/urweb/releases/download/20200209/urweb-20200209.tar.gz" + sha256 "ac3010c57f8d90f09f49dfcd6b2dc4d5da1cdbb41cbf12cb386e96e93ae30662" + license "BSD-3-Clause" + revision 12 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "40f2e161cfeaf9893642eb75010789e7be64acc2d53e9ef2af12eb1308a4d551" + sha256 arm64_sequoia: "6b9b4b19d55dd9fa56d0e848f3730131b1d9942e7752af3c4d4cbe9e7865cac5" + sha256 arm64_sonoma: "5ae2a880693f266d5a4c97a701f6c275be9af42c6a5001285df1fd5943cf9020" + sha256 arm64_ventura: "22c6a1384b9b1eceff5db2458d95a6fd4204e7db2073bae3b4b790cf3f3e0fa3" + sha256 sonoma: "99566a5188759af116d5a8f53f8250d0b41d81d790712536a17647c98ff7e063" + sha256 ventura: "7c0dcc4ba08622d7a5c46e5d71c946c1327adda0c3024a6fa6e2927c7544e5d6" + sha256 arm64_linux: "d7f9948cfa0a05c8acd5ed831f1aee5d9b1eff4ec164f315097e621a7d6b1a9b" + sha256 x86_64_linux: "85193d19fd4b3065379dce5a2123a7838157f229e84fa71a14fd6e6cc298e62c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "mlton" => :build + depends_on "gmp" + depends_on "icu4c@77" + depends_on "openssl@3" + + # Patch to fix build for icu4c 68.2 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/urweb/icu4c68-2.patch" + sha256 "8ec1ec5bec95e9feece8ff4e9c0435ada0ba2edbe48439fb88af4d56adcf2b3e" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "SITELISP=$prefix/share/emacs/site-lisp/urweb", + "ICU_INCLUDES=-I#{icu4c.opt_include}", + "ICU_LIBS=-L#{icu4c.opt_lib}" + system "make", "install" + end + + test do + (testpath/"hello.ur").write <<~EOS + fun target () = return + Welcome! + + fun main () = return + Go there + + EOS + (testpath/"hello.urs").write <<~EOS + val main : unit -> transaction page + EOS + (testpath/"hello.urp").write "hello" + system bin/"urweb", "hello" + system "./hello.exe", "-h" + end +end diff --git a/Formula/u/urx.rb b/Formula/u/urx.rb new file mode 100644 index 0000000000000..f026f07abfd27 --- /dev/null +++ b/Formula/u/urx.rb @@ -0,0 +1,38 @@ +class Urx < Formula + desc "Extracts URLs from OSINT Archives for Security Insights" + homepage "https://github.com/hahwul/urx" + url "https://github.com/hahwul/urx/archive/refs/tags/0.8.0.tar.gz" + sha256 "616da098ff8f044007b55642f9fbc52c8310f667ebfa64a43bbba9ee64725aa2" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d6dd267008bc40803a7a9e2c3f163e2a1cdaa8d513c767eeb009ea8bb0912c10" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "939f467d16a57621fe8f15ac7411e030844ee2bdd128860e2723afa0dacc2826" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d26ba3ce1d6a804045d6d39d432d0e89b29a037ee2988583179ed9845ee4b2e7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2813f0283278d238361b12a6fd4fd77d8b308a67784c5770cccbf9d51ca324c2" + sha256 cellar: :any_skip_relocation, sonoma: "e3c32155a5d8952863cdeacbae2f398c3aadad2a2159d1c42f5a93d7bda92b2d" + sha256 cellar: :any_skip_relocation, ventura: "8e2879cd695d6823be6766cd01cfa04649f72ff02b278b2137ad9d82e887b9f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d68187c02cd476dc6f538d1f0392f2ef75ed679f92adf647da269f6cc4ececd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c720ff72528d8ca45f5db518f29461c36cbbeee59a1944f3d5f89465080e9150" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + on_linux do + depends_on "openssl@3" + end + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "urx #{version}", shell_output("#{bin}/urx --version") + assert_match "https://brew.sh/", shell_output("#{bin}/urx brew.sh --providers=cc --include-sitemap") + end +end diff --git a/Formula/u/usage.rb b/Formula/u/usage.rb new file mode 100644 index 0000000000000..3a6e717a3a82f --- /dev/null +++ b/Formula/u/usage.rb @@ -0,0 +1,29 @@ +class Usage < Formula + desc "Tool for working with usage-spec CLIs" + homepage "https://usage.jdx.dev/" + url "https://github.com/jdx/usage/archive/refs/tags/v2.6.0.tar.gz" + sha256 "05c344567659233e935743ef79bd29b344f8c4e05ec9a25aca1195b87a85c191" + license "MIT" + head "https://github.com/jdx/usage.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "174bd62af8bd1822fb75b4c25194097368648b2c8b276c2388db8d7bb871ca3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c38509d0784801b16ebc0bb0fec9357103bbead06c83163e015ca698187b063" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "052565f69e7c5deff83990bb92875ab3de6856e9f58d9999283c1ed2df33efe8" + sha256 cellar: :any_skip_relocation, sonoma: "81ebd5a886000a6e41a5b949bfaa3f637b850a5ebfc62d02c95535a37f9194c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "c629ea4b9891fcdb9edfa51cdd6f39d423d4d6c466e68136961aed24f0ffcf25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac456401b2420387630ffff8d7bb8798cbc7653bbb81367c1326704b86e97e30" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + generate_completions_from_executable(bin/"usage", "--completions") + end + + test do + assert_match "usage-cli", shell_output("#{bin}/usage --version").chomp + assert_equal "--foo", shell_output("#{bin}/usage complete-word --spec 'flag \"--foo\"' -").chomp + end +end diff --git a/Formula/u/usb.ids.rb b/Formula/u/usb.ids.rb new file mode 100644 index 0000000000000..0e14310c98c2a --- /dev/null +++ b/Formula/u/usb.ids.rb @@ -0,0 +1,24 @@ +class UsbIds < Formula + desc "Repository of vendor, device, subsystem and device class IDs used in USB devices" + homepage "http://www.linux-usb.org/usb-ids.html" + url "https://deb.debian.org/debian/pool/main/u/usb.ids/usb.ids_2025.09.15.orig.tar.xz" + sha256 "2cd44b6720e7470e70fd5ab3f33b29dd918da32bd6379a2c017f506674822de3" + license any_of: ["GPL-2.0-or-later", "BSD-3-Clause"] + + livecheck do + url "https://deb.debian.org/debian/pool/main/u/usb.ids/" + regex(/href=.*?usb\.ids[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "0c9c1c85df427517e19a02318f372036dbaac13b93ab998627ce5189493ab05c" + end + + def install + (share/"misc").install "usb.ids" + end + + test do + assert_match "Version: #{version}", File.read(share/"misc/usb.ids", encoding: "ISO-8859-1") + end +end diff --git a/Formula/u/usbredir.rb b/Formula/u/usbredir.rb new file mode 100644 index 0000000000000..98b886e1a6c92 --- /dev/null +++ b/Formula/u/usbredir.rb @@ -0,0 +1,46 @@ +class Usbredir < Formula + desc "USB traffic redirection library" + homepage "https://www.spice-space.org" + url "https://www.spice-space.org/download/usbredir/usbredir-0.15.0.tar.xz" + sha256 "6dc2a380277688a068191245dac2ab7063a552999d8ac3ad8e841c10ff050961" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] + + livecheck do + url "https://www.spice-space.org/download/usbredir/" + regex(/href=.*?usbredir[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "abc432af08f1f179d62c85fc6f683e597fab22d36e41d3f63e30013391892157" + sha256 cellar: :any, arm64_sequoia: "9e802affea255b4b4510b5985491f20a25d4e890d45894a32f566ff709b63414" + sha256 cellar: :any, arm64_sonoma: "7ae69db9be837baef0c19b6672d10da0cc466d3ff17cbe8deb86c492e5b1bc1e" + sha256 cellar: :any, arm64_ventura: "e40f49cf40316f8812f7df47be812df5bf1269eb77bcf6079624499adccdc310" + sha256 cellar: :any, sonoma: "b30c9161cd179a576749dcf9a00ef50030fbdfe7fb6c93a05338dfc9b5bcf736" + sha256 cellar: :any, ventura: "f9d8eeb3c790e34bd9e457380922676ef663f3df8057c5f857d627a97fbc490e" + sha256 arm64_linux: "cba9904ac1855514dd4ebefd97d38975e6ab19b5ad919a3e7be447a794b2f408" + sha256 x86_64_linux: "a2e5043bd22e186e35537b39c64aa4c6360535a1cde629212b6c0ccf2c9a99b8" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libusb" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + return usbredirparser_create() ? 0 : 1; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lusbredirparser", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/usbutils.rb b/Formula/u/usbutils.rb new file mode 100644 index 0000000000000..606da6e7ba170 --- /dev/null +++ b/Formula/u/usbutils.rb @@ -0,0 +1,59 @@ +class Usbutils < Formula + desc "List detailed info about USB devices" + # Homepage for multiple Linux USB tools, 'usbutils' is one of them. + homepage "http://www.linux-usb.org/" + url "https://mirrors.edge.kernel.org/pub/linux/utils/usb/usbutils/usbutils-019.tar.gz" + sha256 "347c52b65a6aeb22cfe3af8382192004f99725850e1dc5f705336e54cf6d59fc" + license all_of: [ + "GPL-2.0-only", + "GPL-2.0-or-later", + any_of: ["GPL-2.0-only", "GPL-3.0-only"], + ] + + livecheck do + url "https://mirrors.edge.kernel.org/pub/linux/utils/usb/usbutils/" + regex(/href=.*?usbutils[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "26e37532e86411091b25054bfc3967d825fd533557c8a59296867caab2fb9c95" + sha256 cellar: :any, arm64_sequoia: "3fd964e13e53ac02a5ab1e3aad9507622a2ca4b950f53a39fc644492c7e0bb25" + sha256 cellar: :any, arm64_sonoma: "625af4354b888ad7fd99c48bd952b0f90191ca0f5212a77a4e5878d8c3336f05" + sha256 cellar: :any, sonoma: "235c82fe47c5faec50df91713b449941b4a89d8895b87c6b5950e78d2e099cb6" + sha256 arm64_linux: "9dd93abd2b124a8d0beb4c155fcd417ec99b837d38db7a7b4f8b82745761d51a" + sha256 x86_64_linux: "7d95c8f655bf97ceb6e232dbdbb27e9ce977dd6590311bff52077f652d0512b0" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + on_linux do + depends_on "systemd" + end + + conflicts_with "lsusb", "lsusb-laniksj", because: "both provide an `lsusb` binary" + + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/usbutils/portable.patch" + sha256 "ec09531017e1fa45dbc37233b286a736a24d7f98668e38a92e3697559f739c7f" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def caveats + <<~EOS + usbhid-dump requires either proper code signing with com.apple.vm.device-access + entitlement or root privilege + EOS + end + + test do + assert_empty shell_output("#{bin}/lsusb -d ffff:ffff", 1) + end +end diff --git a/Formula/u/userspace-rcu.rb b/Formula/u/userspace-rcu.rb new file mode 100644 index 0000000000000..c545c4248e23e --- /dev/null +++ b/Formula/u/userspace-rcu.rb @@ -0,0 +1,33 @@ +class UserspaceRcu < Formula + desc "Library for userspace RCU (read-copy-update)" + homepage "https://liburcu.org" + url "https://lttng.org/files/urcu/userspace-rcu-0.15.3.tar.bz2" + sha256 "26687ec84e3e114759454c884a08abeaf79dec09b041895ddf4c45ec150acb6d" + license all_of: ["LGPL-2.1-or-later", "MIT"] + + livecheck do + url "https://lttng.org/files/urcu/" + regex(/href=.*?userspace-rcu[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "470f8a4f63b8b32daacb3efc1aa003e4aa68071d8a923a63cb05ccf66a69dd66" + sha256 cellar: :any, arm64_sequoia: "803c04e96ef85190c9338f6b91411f1645b89c5bd8de5a1ee9724f2a7e4ccbd2" + sha256 cellar: :any, arm64_sonoma: "e6df3658e9fd7684a6b9d5cd14941712e84f9ed881f7388b4238fe6a3f0e9afd" + sha256 cellar: :any, arm64_ventura: "b2efd6e63f3925c486bf181900733d11fbe0efe9134eb5f9c1b5fd0b57915dfb" + sha256 cellar: :any, sonoma: "295eca2ee55330fe9bb24779117146c560c01682a2cf3502a9b82b6579debb3f" + sha256 cellar: :any, ventura: "0611a1a66d68b403c40341b4505937dbd305d448caf46720314d7a8fbb952ec0" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ab9a83c005211672492d9524dd791315c90a2f57b6f05f98fbd637036b5c22f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fd83d743bebf1d0bb809fc70f305bbc175738a680b1c998b317895785ca0f50" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args.reject { |s| s["disable-debug"] } + system "make", "install" + end + + test do + cp_r doc/"examples", testpath + system "make", "CFLAGS=-pthread", "-C", "examples" + end +end diff --git a/Formula/u/utf8cpp.rb b/Formula/u/utf8cpp.rb new file mode 100644 index 0000000000000..34632dd17e748 --- /dev/null +++ b/Formula/u/utf8cpp.rb @@ -0,0 +1,41 @@ +class Utf8cpp < Formula + desc "UTF-8 with C++ in a Portable Way" + homepage "https://github.com/nemtrif/utfcpp" + url "https://github.com/nemtrif/utfcpp/archive/refs/tags/v4.0.8.tar.gz" + sha256 "f808b26d8c3a59def27fea207182ece77a8930bd121a69f80d328ecf3cfef925" + license "BSL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7089d7abf749ad7d492fdc83781eb929aacc6ee829d5e85753a380256adf48fc" + end + + depends_on "cmake" => [:build, :test] + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0 FATAL_ERROR) + project(utf8_append LANGUAGES CXX) + find_package(utf8cpp REQUIRED CONFIG) + add_executable(utf8_append utf8_append.cpp) + CMAKE + + (testpath/"utf8_append.cpp").write <<~CPP + #include + int main() { + unsigned char u[5] = {0, 0, 0, 0, 0}; + utf8::append(0x0448, u); + return (u[0] == 0xd1 && u[1] == 0x88 && u[2] == 0 && u[3] == 0 && u[4] == 0) ? 0 : 1; + } + CPP + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_PREFIX_PATH=#{opt_lib}", "-DCMAKE_VERBOSE_MAKEFILE=ON" + system "cmake", "--build", "build" + system "./build/utf8_append" + end +end diff --git a/Formula/u/utf8proc.rb b/Formula/u/utf8proc.rb new file mode 100644 index 0000000000000..cf1ff837cf2a2 --- /dev/null +++ b/Formula/u/utf8proc.rb @@ -0,0 +1,38 @@ +class Utf8proc < Formula + desc "Clean C library for processing UTF-8 Unicode data" + homepage "https://juliastrings.github.io/utf8proc/" + url "https://github.com/JuliaStrings/utf8proc/archive/refs/tags/v2.11.0.tar.gz" + sha256 "c24379b5fa0a429a1f9a3fc23b44a75f2b141a34c09146a529a55d20a5808070" + license all_of: ["MIT", "Unicode-DFS-2015"] + head "https://github.com/JuliaStrings/utf8proc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "0adfed95cc97ea5bc7c47c8092751384bd19b1e0d8106156371b3450141af5ba" + sha256 cellar: :any, arm64_sequoia: "c0b3f0ba16f271e968b9997d28376af5ab4ad892635e9e03680a04a969fff582" + sha256 cellar: :any, arm64_sonoma: "9c20559a53854e3621a707a2ac212252fc38e07d1d8becf463eb41d00296db6c" + sha256 cellar: :any, arm64_ventura: "94453c744f5af4f41a6dc1559b317ca3ada968e1cc7de14397307db73d8eeb98" + sha256 cellar: :any, sonoma: "e4cee72016fbf5a9d60ba840db4f990f9445f7678d1085d77f25333b59a5b1c8" + sha256 cellar: :any, ventura: "d7bf494ab688bbe9228b8417482cef6de6facefb14138f9fb0b77a77ebbce5c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff2d7961db74b2c8b9410c611065d68fa4f37528494fd1511818f53030a3dc94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eceec934bae4b7682d8c751d7242322b51c9d0521969471037b1bc4135fe1f40" + end + + def install + system "make", "install", "prefix=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + const char *version = utf8proc_version(); + return strnlen(version, sizeof("1.3.1-dev")) > 0 ? 0 : -1; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lutf8proc", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/utftex.rb b/Formula/u/utftex.rb new file mode 100644 index 0000000000000..8ed8d1f58dc9c --- /dev/null +++ b/Formula/u/utftex.rb @@ -0,0 +1,38 @@ +class Utftex < Formula + desc "Pretty print math in monospace fonts, using a TeX-like syntax" + homepage "https://github.com/bartp5/libtexprintf" + url "https://github.com/bartp5/libtexprintf/archive/refs/tags/v1.25.tar.gz" + sha256 "c50a44e33eba551526ff553c0af0bdd3f3a219d8ed60f11fcd9d7b30cd028af1" + license "GPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "810152b38fa50c074810e0955537874ef3b0022a8d704690a3b59a57f49be63d" + sha256 cellar: :any, arm64_sequoia: "2600f08ffa67d205a11c72fb8edaa16bc5b25e0b1ef5b6a7d88e4dbee325d7cf" + sha256 cellar: :any, arm64_sonoma: "fcefa68f71397e48ca164144e5c78eacc458462b440ee3406379e8fc281b0b5e" + sha256 cellar: :any, arm64_ventura: "73dc2f438c0c50b6a443aa39a102520bd3f524bb2710729ecc8f2f908c7d497b" + sha256 cellar: :any, arm64_monterey: "0810afd3a4807c93ecaaf60b948ebc54d669b5b199c7e34ef06e3962abdb5b05" + sha256 cellar: :any, arm64_big_sur: "2d42b33bf2be0776e1927f78d85e2a264b4a99cceaee85678c2f77d000863304" + sha256 cellar: :any, sonoma: "651d5493ded02c7aa424c3f2c9c0c53eea8508d2116fdd05fd43320319958651" + sha256 cellar: :any, ventura: "48ad8ca0fca773183943258a5000b80ac87a92fbcf643b5d5ae6308549f4679f" + sha256 cellar: :any, monterey: "4612a84d1625b774f4eea4e64c764dad77ca3b85e3fb80eadba71cb7febcc31e" + sha256 cellar: :any, big_sur: "972ff7102230d15986fd1cfe3b0275d47ca7c8fe99483e1009250cebcc96295a" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fcba65838ab58ed111d25293809ba66ff3640d6086d42d1fcdca08dd8e6f235" + sha256 cellar: :any_skip_relocation, x86_64_linux: "765d49e6c14eb18ed03f6898866b5f1ef95cf3e7e3355e1881e2a5c966b33719" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./autogen.sh" + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + system bin/"utftex", "\\left(\\frac{hello}{world}\\right)" + end +end diff --git a/Formula/u/uthash.rb b/Formula/u/uthash.rb new file mode 100644 index 0000000000000..3bfce73a51e63 --- /dev/null +++ b/Formula/u/uthash.rb @@ -0,0 +1,61 @@ +class Uthash < Formula + desc "C macros for hash tables and more" + homepage "https://troydhanson.github.io/uthash/" + url "https://github.com/troydhanson/uthash/archive/refs/tags/v2.3.0.tar.gz" + sha256 "e10382ab75518bad8319eb922ad04f907cb20cccb451a3aa980c9d005e661acc" + license "BSD-1-Clause" + head "https://github.com/troydhanson/uthash.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7332f52405884ffd9db409700b607565d8afeca373d6954ef84f03ed5842ddbe" + end + + def install + include.install buildpath.glob("src/*.h") + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + struct my_struct { + int id; + char name[15]; + UT_hash_handle hh; + }; + + int main() { + struct my_struct *users = NULL; + struct my_struct *s, *p = NULL; + int uid = 42; + char name[] = "John Doe"; + + HASH_FIND_INT(users, &uid, s); + assert(s == NULL); + + s = (struct my_struct*)malloc(sizeof *s); + s->id = uid; + strcpy(s->name, name); + HASH_ADD_INT(users, id, s); + + HASH_FIND_INT(users, &uid, p); + assert(s == p); + + HASH_DEL(users, s); + free(s); + HASH_FIND_INT(users, &uid, s); + assert(s == NULL); + printf("ok"); + } + C + system ENV.cc, "test.c", "-I#{include}", "-o", "test" + assert_equal "ok", shell_output("./test") + end +end diff --git a/Formula/u/util-linux.rb b/Formula/u/util-linux.rb new file mode 100644 index 0000000000000..cc8e731bdf548 --- /dev/null +++ b/Formula/u/util-linux.rb @@ -0,0 +1,151 @@ +class UtilLinux < Formula + desc "Collection of Linux utilities" + homepage "https://github.com/util-linux/util-linux" + url "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/util-linux-2.41.2.tar.xz" + sha256 "6062a1d89b571a61932e6fc0211f36060c4183568b81ee866cf363bce9f6583e" + license all_of: [ + "BSD-3-Clause", + "BSD-4-Clause-UC", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0-or-later", + "LGPL-2.1-or-later", + :public_domain, + ] + + # The directory listing where the `stable` archive is found uses major/minor + # version directories, where it's necessary to check inside a directory to + # find the full version. The newest directory can contain unstable versions, + # so it could require more than two requests to identify the newest stable + # version. With this in mind, we simply check the Git tags as a best effort. + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "040b136047c445817906cd47d3a5f631e0a4dff4d4157e2aa7a737538db852f1" + sha256 arm64_sequoia: "36a1fd226b4a6b70250535118ffaa3365abb70c5d7241fe1ef9caa4d289b994c" + sha256 arm64_sonoma: "a0da9dac552c00c8b27ed475d30bf3ae4c792ccefea72340ddca02c39bc8d99e" + sha256 sonoma: "27500fdc87061175f627971705e9e024c4d92007e3ec963e6cd1c92ff8aab7b4" + sha256 arm64_linux: "f3e6d3197f597780d22fe50674fb3567408775e9ddf13274dbfd8f8b287bf2cc" + sha256 x86_64_linux: "b3d0437207ab023cd13567d4b9ca2de87c09ce4a2b86b29996d0df97039217d9" + end + + keg_only :shadowed_by_macos, "macOS provides the uuid.h header" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" # for libintl + end + + on_linux do + depends_on "readline" + + conflicts_with "bash-completion", because: "both install `mount`, `rfkill`, and `rtcwake` completions" + conflicts_with "flock", because: "both install `flock` binaries" + conflicts_with "ossp-uuid", because: "both install `uuid.3` file" + conflicts_with "rename", because: "both install `rename` binaries" + end + + # bits: only build when cpu_set_t is available. Needed for `--disable-bits`. + # Remove when included in a stable release; when doing so, also remove + # `autoconf`, `automake`, `gettext`, `gtk-doc`, and `libtool` build deps and + # the `autoreconf` call in the `install` method. + patch do + url "https://github.com/util-linux/util-linux/commit/45f943a4b36f59814cf5a735e4975f2252afac26.patch?full_index=1" + sha256 "b372a7578ff397787f37e1aa1c03c8299c9b3e3f7ab8620c4af68c93ab2103b5" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + + args = %W[--disable-silent-rules --disable-asciidoc --with-bashcompletiondir=#{bash_completion}] + + if OS.mac? + # Support very old ncurses used on macOS 13 and earlier + # https://github.com/util-linux/util-linux/issues/2389 + ENV.append_to_cflags "-D_XOPEN_SOURCE_EXTENDED" if MacOS.version <= :ventura + + args << "--disable-bits" # does not build on macOS + args << "--disable-ipcs" # does not build on macOS + args << "--disable-ipcrm" # does not build on macOS + args << "--disable-wall" # already comes with macOS + args << "--disable-liblastlog2" # does not build on macOS + args << "--disable-libmount" # does not build on macOS + args << "--enable-libuuid" # conflicts with ossp-uuid + else + args << "--disable-use-tty-group" # Fix chgrp: changing group of 'wall': Operation not permitted + args << "--disable-kill" # Conflicts with coreutils. + args << "--without-systemd" # Do not install systemd files + args << "--disable-chfn-chsh" + args << "--disable-login" + args << "--disable-su" + args << "--disable-runuser" + args << "--disable-makeinstall-chown" + args << "--disable-makeinstall-setuid" + args << "--without-python" + end + + system "./configure", *args, *std_configure_args + + install_args = [] + install_args << "LDFLAGS=-lm" if OS.linux? + system "make", "install", *install_args + end + + def caveats + linux_only_bins = %w[ + addpart agetty + blkdiscard blkzone blockdev + chcpu chmem choom chrt ctrlaltdel + delpart dmesg + eject + fallocate fdformat fincore findmnt fsck fsfreeze fstrim + hwclock + ionice ipcrm ipcs + kill + last ldattach losetup lsblk lscpu lsipc lslocks lslogins lsmem lsns + mount mountpoint + nsenter + partx pivot_root prlimit + raw readprofile resizepart rfkill rtcwake + script scriptlive setarch setterm sulogin swapoff swapon switch_root + taskset + umount unshare utmpdump uuidd + wall wdctl + zramctl + ] + on_macos do + <<~EOS + The following tools are not supported for macOS, and are therefore not included: + #{Formatter.columns(linux_only_bins)} + EOS + end + end + + test do + stat = File.stat "/usr" + owner = Etc.getpwuid(stat.uid).name + group = Etc.getgrgid(stat.gid).name + + flags = ["x", "w", "r"] * 3 + perms = flags.each_with_index.reduce("") do |sum, (flag, index)| + sum.insert 0, (stat.mode.nobits?(2 ** index) ? "-" : flag) + end + + out = shell_output("#{bin}/namei -lx /usr").split("\n").last.split + assert_equal ["d#{perms}", owner, group, "usr"], out + end +end diff --git a/Formula/u/util-macros.rb b/Formula/u/util-macros.rb new file mode 100644 index 0000000000000..005ecc7970d97 --- /dev/null +++ b/Formula/u/util-macros.rb @@ -0,0 +1,29 @@ +class UtilMacros < Formula + desc "X.Org: Set of autoconf macros used to build other xorg packages" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/util/util-macros-1.20.2.tar.xz" + sha256 "9ac269eba24f672d7d7b3574e4be5f333d13f04a7712303b1821b2a51ac82e8e" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1667d87ebab1bae1e48e9ef068534059be1bc7398cea4a39de35cb850109bd79" + end + + depends_on "pkgconf" => :test + + def install + args = %W[ + --disable-silent-rules + --sysconfdir=#{etc} + --localstatedir=#{var} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_equal version.to_s, shell_output("pkgconf --modversion xorg-macros").chomp + end +end diff --git a/Formula/u/utimer.rb b/Formula/u/utimer.rb new file mode 100644 index 0000000000000..fd28672d91754 --- /dev/null +++ b/Formula/u/utimer.rb @@ -0,0 +1,57 @@ +class Utimer < Formula + desc "Multifunction timer tool" + homepage "https://launchpad.net/utimer" + url "https://launchpad.net/utimer/0.4/0.4/+download/utimer-0.4.tar.gz" + sha256 "07a9d28e15155a10b7e6b22af05c84c878d95be782b6b0afaadec2f7884aa0f7" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e23eb9898bf6490db8dab00ca39f6c2b2e90fd358c3049e1f36a0c637ca06b6c" + sha256 cellar: :any, arm64_sequoia: "b81fca5d55f6c336477ac27ce66e9fb030be982864b54be675ee624b73444f7b" + sha256 cellar: :any, arm64_sonoma: "ee04213e439d3e859b16c5f0e07f19d70400a9dea3bcde536212cee288bfb6f6" + sha256 cellar: :any, arm64_ventura: "f4b18b839f3d9864738ba4e120852b0d3fae8d67c7d98b4ce370a89a9eb839ec" + sha256 cellar: :any, arm64_monterey: "3c86234c30c090ef832ddfb4c4b52117f6ef31956246abb311645860154cc6fc" + sha256 cellar: :any, arm64_big_sur: "bb50ed1a38ea9dc66c442261dbf8f6e517b9d374869e647d2136c580a47f7aca" + sha256 cellar: :any, sonoma: "db50a4407088f9b9e67399934093cfd7fd5e703658176f07264f1555c9a42300" + sha256 cellar: :any, ventura: "ee2b3d29f6278e6a0195e0fccc6a787eb610a1b882960aad227a94ddcf19e6c8" + sha256 cellar: :any, monterey: "8f1bc7e7ea1445618ce50bfcc7c8aea1570ea70245d17e47b4ac7d9d6d68e295" + sha256 cellar: :any, big_sur: "35c830b5c976738af7451ff1d110028a351e1b16145efa54ba0d042ff43e8980" + sha256 cellar: :any, catalina: "58144b80218183cb1cb0bdccd87baf86a4bddbab8b3107a2197227a15b6a4f27" + sha256 cellar: :any_skip_relocation, arm64_linux: "afd0dd70f2d6382759333b763d794b5f309ecb15f48e5228f4df6c00787414f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a44f6b1ef51bbbb0a61411585f06bc0d7e9d94083b04c11802f26ba2b2f36d8e" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + depends_on "glib" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + # Work around /usr/bin/ld: timer.o:(.bss+0x0): multiple definition of `ut_config' + ENV.append_to_cflags "-fcommon" if OS.linux? + # Fix compile with newer Clang. Project is no longer maintained so cannot be fixed upstream. + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match "Elapsed Time:", shell_output("#{bin}/utimer -t 0ms") + end +end diff --git a/Formula/u/uudeview.rb b/Formula/u/uudeview.rb new file mode 100644 index 0000000000000..122c7d6dbffc7 --- /dev/null +++ b/Formula/u/uudeview.rb @@ -0,0 +1,67 @@ +class Uudeview < Formula + desc "Smart multi-file multi-part decoder" + homepage "http://www.fpx.de/fp/Software/UUDeview/" + url "http://www.fpx.de/fp/Software/UUDeview/download/uudeview-0.5.20.tar.gz" + sha256 "e49a510ddf272022af204e96605bd454bb53da0b3fe0be437115768710dae435" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?uudeview[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4a0021e8cbb12c07b7c46049e72d217530ed08c2474d57f145044ab7d24674d8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "519dcd3ca61e2c1eac14d1e1b15dc2b87492421fa77bfc396163b6882df7c298" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a58cd61413eb8e656d8395b63d1542e9f256d669d227b23d7cf0f70181a420c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "28d8a4e08275d26926e19c32a6ca833ed3a1c3969ea5126c4def92e72442e66d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8c72240dbc205cb79229af479b8dc1774b4eb11d0ffad47391102e033be4bb07" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "93a098dc40d16b9785888c20c8d1707a62fe471938c99ea8074df042548cfed7" + sha256 cellar: :any_skip_relocation, sonoma: "cfbdefb80f1571aa3c8df28efe90f9a526ef1c936a51a2c0ea913e6da8447927" + sha256 cellar: :any_skip_relocation, ventura: "b82ecb8116e22c3c53af765f8da79f52aed9668182ff8b16d5a0523e739e51e7" + sha256 cellar: :any_skip_relocation, monterey: "0b5de5467dd832158645bca2006500fadaefc2e187819e883e9ff1a85bb60e64" + sha256 cellar: :any_skip_relocation, big_sur: "94426299f928e2c7985194d2a3f436112b2ca580945eacc82ad5047c619c2417" + sha256 cellar: :any_skip_relocation, catalina: "9b5990b5b763e90614bd2d074e670c20e834541d60082a4e78f90d67a65da5c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "59e22160ac8e39b4efe0f3c935141e1c24656875c142a69df72992d302c16c79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cdd9748ec5c1baf9934bade72dd8a3eea06b632d0f1c49e57b682663bbb8371" + end + + # fix implicit declaration, remove in release > 0.5.20 + patch do + url "https://github.com/hannob/uudeview/commit/a8f98cf10e2c1ab883c31ed1292f16bfdd43ef33.patch?full_index=1" + sha256 "1154a62902355105fc61cc38033b9284d488ca29b971ad18744915990ffb31ec" + end + + patch do + url "https://github.com/hannob/uudeview/commit/c54cb38ab71363647577fa98bedf4e0a3759c17b.patch?full_index=1" + sha256 "44347fdb875d5a86909f6c2e6bd25f4325a34c7be83927b6fd5ba4cfe0bea46c" + end + + patch do + url "https://github.com/hannob/uudeview/commit/72a52709ea1c79c8747d2c0face50f03873d2f81.patch?full_index=1" + sha256 "452788a9e81a0839b8bab924406db26542b529dedb8e8073df50eb299aae9dfc" + end + + def install + # Fix for newer clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-DSTDC_HEADERS" + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--disable-tcl" + system "make", "install" + # uudeview provides the public library libuu, but no way to install it. + # Since the package is unsupported, upstream changes are unlikely to occur. + # Install the library and headers manually for now. + lib.install "uulib/libuu.a" + include.install "uulib/uudeview.h" + end + + test do + system bin/"uudeview", "-V" + end +end diff --git a/Formula/u/uutils-coreutils.rb b/Formula/u/uutils-coreutils.rb new file mode 100644 index 0000000000000..c28fc8b957b41 --- /dev/null +++ b/Formula/u/uutils-coreutils.rb @@ -0,0 +1,103 @@ +class UutilsCoreutils < Formula + desc "Cross-platform Rust rewrite of the GNU coreutils" + homepage "https://uutils.github.io/coreutils/" + url "https://github.com/uutils/coreutils/archive/refs/tags/0.3.0.tar.gz" + sha256 "422b4bab88d6a4da9eabcc947b4e8e0c7fbd123c88700f8750da45910bfb03b6" + license "MIT" + head "https://github.com/uutils/coreutils.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "256eafde0ea718394802557077a7e53f3afd2a65f4bcac9055833776a0774b67" + sha256 cellar: :any, arm64_sequoia: "e2da51d0a24835f9bd9e5f65871500086ad3d6b69135493bb0b53a05bb114428" + sha256 cellar: :any, arm64_sonoma: "e5f890883dbbd588167e72c246d4eb1649229dbd200e9f8bf694c406308d56c1" + sha256 cellar: :any, sonoma: "57572c249715dd02efdcd964e72630de9638af87041031a8c80eb3bd74b7f6a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a4d174facae5c9e6d254c96c17caf28f098309e97fa67dc2df42cfbc57a8412" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14d4e9b255c29494fbcb0419817cee6e027a378e6acb2026361b062d5138a1a1" + end + + depends_on "make" => :build + depends_on "rust" => :build + depends_on "sphinx-doc" => :build + + on_macos do + conflicts_with "coreutils", because: "uutils-coreutils and coreutils install the same binaries" + end + + conflicts_with "unp", because: "both install `ucat` binaries" + + def install + man1.mkpath + + # Prevent to add a feature for `selinux` + inreplace "GNUmakefile", "$(SELINUX_PROGS)", "" + + args = %W[ + PROG_PREFIX=u + PREFIX=#{prefix} + SPHINXBUILD=#{Formula["sphinx-doc"].opt_bin}/sphinx-build + ] + # Call `make` as `gmake` to use Homebrew `make`. + system "gmake", "install", *args + + # Symlink all commands into libexec/uubin without the 'u' prefix + coreutils_filenames(bin).each do |cmd| + (libexec/"uubin").install_symlink bin/"u#{cmd}" => cmd + end + + # Symlink all man(1) pages into libexec/uuman without the 'u' prefix + coreutils_filenames(man1).each do |cmd| + (libexec/"uuman"/"man1").install_symlink man1/"u#{cmd}" => cmd + end + + (libexec/"uubin").install_symlink "../uuman" => "man" + + # Symlink non-conflicting binaries + no_conflict = if OS.mac? + %w[ + base32 dircolors factor hashsum hostid nproc numfmt pinky ptx realpath + shred shuf stdbuf tac timeout truncate + ] + else + %w[hashsum] + end + no_conflict.each do |cmd| + bin.install_symlink "u#{cmd}" => cmd + man1.install_symlink "u#{cmd}.1.gz" => "#{cmd}.1.gz" + end + end + + def caveats + provided_by = "coreutils" + on_macos do + provided_by = "macOS" + end + <<~EOS + Commands also provided by #{provided_by} have been installed with the prefix "u". + If you need to use these commands with their normal names, you + can add a "uubin" directory to your PATH from your bashrc like: + PATH="#{opt_libexec}/uubin:$PATH" + EOS + end + + def coreutils_filenames(dir) + filenames = [] + dir.find do |path| + next if path.directory? || path.basename.to_s == ".DS_Store" + + filenames << path.basename.to_s.sub(/^u/, "") + end + filenames.sort + end + + test do + (testpath/"test").write("test") + (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test") + system bin/"uhashsum", "--sha1", "-c", "test.sha1" + system bin/"uln", "-f", "test", "test.sha1" + end +end diff --git a/Formula/u/uutils-diffutils.rb b/Formula/u/uutils-diffutils.rb new file mode 100644 index 0000000000000..7133284e49558 --- /dev/null +++ b/Formula/u/uutils-diffutils.rb @@ -0,0 +1,46 @@ +class UutilsDiffutils < Formula + desc "Cross-platform Rust rewrite of the GNU diffutils" + homepage "https://uutils.github.io/diffutils/" + url "https://github.com/uutils/diffutils/archive/refs/tags/v0.4.2.tar.gz" + sha256 "3be767b5417fb5358d6a979603628c9a926367c700c45335e888b605d9d16ef4" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/uutils/diffutils.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f477add026e8b2295da234cfc09ec20062d59156b7a96dcde891ed18fe9eb5e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b9c46a4be56b29642e8ea525e0e4f805fbb17285bb255359f20b373fb8ad189" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d016794b8782c3113ba872639c5969b51f49b58e2e39956ebdca05b62c5662cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "acdb4a2f8fbe583ed632f18cac365ca767af2e86739dd636e77ad8bd912e0d1f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bca2a21c5c80ada29af665c945506e8f592bdaac961bd6ed6fb5eb8a498e05d5" + sha256 cellar: :any_skip_relocation, sonoma: "f6c35358ce672179dfcca353ac742008c4a674f40a6ac414f87250279ccbed1b" + sha256 cellar: :any_skip_relocation, ventura: "164477ab12dacdd32526a9fab350043799be6d63a0341995e86d1f170d112389" + sha256 cellar: :any_skip_relocation, monterey: "fc5c26ab72d931c1a0c4f6f6c40ccf9986d4ce96b43b5e9471444d2e4351b1d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbffc8e98550a7bfbacb94a2294de960775adae4472b69e3c0f57c942098cf67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e18f180be6675b73db0198972f114cb11af7b36a5f8b99c005b5447d42c7415" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(root: libexec) + mv libexec/"bin", libexec/"uubin" + Dir.children(libexec/"uubin").each do |cmd| + bin.install_symlink libexec/"uubin"/cmd => "u#{cmd}" + end + end + + def caveats + <<~EOS + All commands have been installed with the prefix "u". + If you need to use these commands with their normal names, you + can add a "uubin" directory to your PATH from your bashrc like: + PATH="#{opt_libexec}/uubin:$PATH" + EOS + end + + test do + (testpath/"a").write "foo" + (testpath/"b").write "foo" + system bin/"udiffutils", "a", "b" + end +end diff --git a/Formula/u/uutils-findutils.rb b/Formula/u/uutils-findutils.rb new file mode 100644 index 0000000000000..357038153f5e3 --- /dev/null +++ b/Formula/u/uutils-findutils.rb @@ -0,0 +1,77 @@ +class UutilsFindutils < Formula + desc "Cross-platform Rust rewrite of the GNU findutils" + homepage "https://uutils.github.io/findutils/" + url "https://github.com/uutils/findutils/archive/refs/tags/0.8.0.tar.gz" + sha256 "932f153d256f7a4cf40255a948689bf59a10f14c8804151817ab50fa1b46429a" + license "MIT" + head "https://github.com/uutils/findutils.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "9c59351876b4d6de586972073bc02e141ac57804b24e933399e10844774eafde" + sha256 cellar: :any, arm64_sequoia: "c197c5ae51adde63a7d0a3770d89156032935597db27883e24d912043411bd9f" + sha256 cellar: :any, arm64_sonoma: "3cd43adf157c7f4ffe8ff244b90b7d01a42206cf3cf7dd55d314e815a2462da9" + sha256 cellar: :any, arm64_ventura: "5edf7fd9d0c8f2be1ee7cb0ed463225bc1fa36dd31b04bb3127448cdd35001a0" + sha256 cellar: :any, sonoma: "f3518a5685deaf7be0e4f12d5ea7f84eeaaedcc6ec1c0d1280810a7678ee302e" + sha256 cellar: :any, ventura: "aa9cc3375d6bda074e8fb1011ef52f3ae0d0f99bcc952aa27e93e834e16af145" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1d8413308ed4eb7a6001c5dde07faaf73a96aa26e5e9d0aa6a382bcb6a64918" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d595a82a20897f5ec7fbe852d50fca44f05d20e537913bf9b86aab9e2ef4e4c5" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" + + uses_from_macos "llvm" => :build + + def unwanted_bin_link?(cmd) + %w[ + testing-commandline + ].include? cmd + end + + def install + ENV["RUSTONIG_DYNAMIC_LIBONIG"] = "1" + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + + system "cargo", "install", *std_cargo_args(root: libexec) + mv libexec/"bin", libexec/"uubin" + Dir.children(libexec/"uubin").each do |cmd| + bin.install_symlink libexec/"uubin"/cmd => "u#{cmd}" unless unwanted_bin_link? cmd + end + end + + def caveats + <<~EOS + Commands also provided by macOS have been installed with the prefix "u". + If you need to use these commands with their normal names, you + can add a "uubin" directory to your PATH from your bashrc like: + PATH="#{opt_libexec}/uubin:$PATH" + EOS + end + + test do + require "utils/linkage" + + touch "HOMEBREW" + assert_match "HOMEBREW", shell_output("#{bin}/ufind .") + assert_match "HOMEBREW", shell_output("#{opt_libexec}/uubin/find .") + + expected_linkage = { + libexec/"uubin/find" => [ + Formula["oniguruma"].opt_lib/shared_library("libonig"), + ], + libexec/"uubin/xargs" => [ + Formula["oniguruma"].opt_lib/shared_library("libonig"), + ], + } + missing_linkage = [] + expected_linkage.each do |binary, dylibs| + dylibs.each do |dylib| + next if Utils.binary_linked_to_library?(binary, dylib) + + missing_linkage << "#{binary} => #{dylib}" + end + end + assert missing_linkage.empty?, "Missing linkage: #{missing_linkage.join(", ")}" + end +end diff --git a/Formula/u/uuu.rb b/Formula/u/uuu.rb new file mode 100644 index 0000000000000..610e41303a3ce --- /dev/null +++ b/Formula/u/uuu.rb @@ -0,0 +1,59 @@ +class Uuu < Formula + desc "Universal Update Utility, mfgtools 3.0. NXP I.MX Chip image deploy tools" + homepage "https://github.com/nxp-imx/mfgtools" + url "https://github.com/nxp-imx/mfgtools/releases/download/uuu_1.5.201/uuu_source-uuu_1.5.201.tar.gz" + sha256 "c763b87ffdf10ac5499a0c319463759caa336bc6567b56d6d0ef448590c1a76d" + license "BSD-3-Clause" + revision 1 + head "https://github.com/nxp-imx/mfgtools.git", branch: "master" + + livecheck do + url :stable + regex(/(?:uuu[._-])?v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "fed58f70ac4516c28720b1a2e0f7c6ac4f4095e1daf153fc88eb1261566bf3a2" + sha256 arm64_sequoia: "d0dc183bd58f476ccf616ecb35d4b96a95e345859da2adea6c50ecaafb3c482c" + sha256 arm64_sonoma: "cee3bc7e87a0a6554789ce3545c6254f1ddd99b74fa4958bd1e63611b7b4a52e" + sha256 arm64_ventura: "040d1ce65a6874b5cb49fff2b1ea0117e088a6432a50757750ee4ee71a03a695" + sha256 sonoma: "c53b10c409834bb554170339dff52cbb948c7aa1a5a8f895b29c99f60dbf2dd3" + sha256 ventura: "a0dc155bb4e5404c93e4d7fc492876367c3776d6120d0c04201f9258e438656e" + sha256 arm64_linux: "3ad4106bf0c1f97dd53645f7d4e60c7f17352169cd67e1a25a9bc6ff75aeb3cc" + sha256 x86_64_linux: "4aa91b9b65de6c00a02e2d6d5922521da22633139829b348f1186296225e348c" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "libusb" + depends_on "libzip" + depends_on "openssl@3" + depends_on "tinyxml2" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + # cmake 4.0 build patch, upstream pr ref, https://github.com/nxp-imx/mfgtools/pull/467 + patch do + url "https://github.com/nxp-imx/mfgtools/commit/2c712cb86478a3527145272f0cc96533f9386b7a.patch?full_index=1" + sha256 "220fd4a7d9f1abe957e621da486eabe6c8a35e61d4c3e6c5f54bcedcf0e13ed0" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "Universal Update Utility", shell_output("#{bin}/uuu -h") + + cmd_result = shell_output("#{bin}/uuu -dry FB: ucmd setenv fastboot_buffer ${loadaddr}") + assert_match "Wait for Known USB Device Appear", cmd_result + assert_match "Start Cmd:FB: ucmd setenv fastboot_buffer", cmd_result + assert_match "Okay", cmd_result + end +end diff --git a/Formula/u/uv.rb b/Formula/u/uv.rb new file mode 100644 index 0000000000000..fa531cf25e6a6 --- /dev/null +++ b/Formula/u/uv.rb @@ -0,0 +1,46 @@ +class Uv < Formula + desc "Extremely fast Python package installer and resolver, written in Rust" + homepage "https://docs.astral.sh/uv/" + url "https://github.com/astral-sh/uv/archive/refs/tags/0.9.7.tar.gz" + sha256 "050c37c43c3c54bc322b26770550c654969f057e9d079aa658a6555fa6a3a409" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/astral-sh/uv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d4426aa157abb90ab741eab75bb558916c4089848f2abedaf851d9dc339a86b7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9512341179d58aa49a3afcedad6b4f83c0478b6087bc0183951e46d4cd95d5f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0dad0afc9715c22e33f879c5f85debefaa5136a8972067b7b63bb14ac09419eb" + sha256 cellar: :any_skip_relocation, sonoma: "1d2e31779cd6543a890677b9756991d6415a0b295db4dde43d11378143841f6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f58cd60bc3f8d30bd51893398d595652ab99bc7dbf503456c9cf610fad20a514" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7835952803a058de9c1ee9a0e9da9449b8ec3048b85edbe1fd35421c8d35e307" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "python" => :test + uses_from_macos "bzip2" + uses_from_macos "xz" + + def install + ENV["UV_COMMIT_HASH"] = ENV["UV_COMMIT_SHORT_HASH"] = tap.user + ENV["UV_COMMIT_DATE"] = time.strftime("%F") + # See: https://github.com/astral-sh/uv/issues/15401 + ENV["JEMALLOC_SYS_WITH_LG_PAGE"] = "16" if Hardware::CPU.arm? && OS.linux? + system "cargo", "install", *std_cargo_args(path: "crates/uv") + generate_completions_from_executable(bin/"uv", "generate-shell-completion") + generate_completions_from_executable(bin/"uvx", "--generate-shell-completion") + end + + test do + (testpath/"requirements.in").write <<~REQUIREMENTS + requests + REQUIREMENTS + + compiled = shell_output("#{bin}/uv pip compile -q requirements.in") + assert_match "This file was autogenerated by uv", compiled + assert_match "# via requests", compiled + + assert_match "ruff 0.5.1", shell_output("#{bin}/uvx -q ruff@0.5.1 --version") + end +end diff --git a/Formula/u/uvg266.rb b/Formula/u/uvg266.rb new file mode 100644 index 0000000000000..e864e5c8e0a53 --- /dev/null +++ b/Formula/u/uvg266.rb @@ -0,0 +1,40 @@ +class Uvg266 < Formula + desc "Open-source VVC/H.266 encoder" + homepage "https://github.com/ultravideo/uvg266" + url "https://github.com/ultravideo/uvg266/archive/refs/tags/v0.8.1.tar.gz" + sha256 "9a2c68f94a1105058d1e654191036423d0a0fcf33b7e790dd63801997540b6ec" + license "BSD-3-Clause" + head "https://github.com/ultravideo/uvg266.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ad4d6f123370fbb4a893ef57358872d7772beabd0e2fa29f9229f8e0db022bcb" + sha256 cellar: :any, arm64_sequoia: "8aad1b0d383ca8ecbc1ff05759906c85de0bbcbdf8dca93529e92a6d81cd5c54" + sha256 cellar: :any, arm64_sonoma: "2e1d62a8487ecb14e1b585c0a7e4b6d3a59ee1a9c2a1ead291697968c1b6eb55" + sha256 cellar: :any, arm64_ventura: "aeee7925bcfdc18d227a1d911489a03abd2f5ca434336c9da4b308516641d1dc" + sha256 cellar: :any, arm64_monterey: "b958ad1e7e6fa2607fc592db623418c2a7125d6bd7d75b247fe8c6d1fbb5b4ab" + sha256 cellar: :any, sonoma: "1ff7b317c2ef872de0f794eb448e26cf4b1569352b2dac1e041357756d94b3da" + sha256 cellar: :any, ventura: "9219b51849b23154d86aec45505cc450e83833a14b8c5ecf32cec6fc889a4096" + sha256 cellar: :any, monterey: "5b0ac26a3a6a6162769cd3d08d7eeb2fc43ad4bfdab0905e6e0044ef8fa73c95" + sha256 cellar: :any_skip_relocation, arm64_linux: "b789955cf0ac4e360740908d922e1bb1f0bfab904ac642635947e71542ae1724" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2b2fc85f72c8d371bd32609a2723478c4c5f7575e3337827b5991c5b91f498d" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-videosample" do + url "https://samples.mplayerhq.hu/V-codecs/lm20.avi" + sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392" + end + testpath.install resource("homebrew-videosample") + + system bin/"uvg266", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.vvc" + assert_path_exists testpath/"lm20.vvc" + end +end diff --git a/Formula/u/uvicorn.rb b/Formula/u/uvicorn.rb new file mode 100644 index 0000000000000..455046b140211 --- /dev/null +++ b/Formula/u/uvicorn.rb @@ -0,0 +1,115 @@ +class Uvicorn < Formula + include Language::Python::Virtualenv + + desc "ASGI web server" + homepage "https://www.uvicorn.org/" + url "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz" + sha256 "fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d" + license "BSD-3-Clause" + head "https://github.com/encode/uvicorn.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "88ae75e58728a8d9b9dfe8ac810f9f2eeea84f8a11c21299a3710ab694607f14" + sha256 cellar: :any, arm64_sequoia: "6cf2ff30d1beaefc1ca672163d50f350ab93ffaecbbf5d7a3474bf41d3178d6f" + sha256 cellar: :any, arm64_sonoma: "0609438fcde8ccb8b3480e162ca5a1edc87c769539a2c8e35120bb6619780362" + sha256 cellar: :any, sonoma: "9058300f53664b4ec78476cd628c025e572d182746da927d6409aa3f933295ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e83be33e043a3495f1670ceb6ed579e7e20a4aabc08aa749fad9575e9c225df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a996d97cbd195d6a09df09674a7d1a4c36d75dd9c2876c3f6565ab2312591f5" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.14" + + pypi_packages package_name: "uvicorn[standard]" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httptools" do + url "https://files.pythonhosted.org/packages/b5/46/120a669232c7bdedb9d52d4aeae7e6c7dfe151e99dc70802e2fc7a5e1993/httptools-0.7.1.tar.gz" + sha256 "abd72556974f8e7c74a259655924a717a2365b236c882c3f6f8a45fe94703ac9" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz" + sha256 "a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "uvloop" do + url "https://files.pythonhosted.org/packages/06/f0/18d39dbd1971d6d62c4629cc7fa67f74821b0dc1f5a77af43719de7936a7/uvloop-0.22.1.tar.gz" + sha256 "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz" + sha256 "a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"uvicorn", shell_parameter_format: :click) + end + + test do + (testpath/"example.py").write <<~PYTHON + async def app(scope, receive, send): + assert scope['type'] == 'http' + + await send({ + 'type': 'http.response.start', + 'status': 200, + 'headers': [ + (b'content-type', b'text/plain'), + ], + }) + await send({ + 'type': 'http.response.body', + 'body': b'Hello, Homebrew!', + }) + PYTHON + + port = free_port + pid = fork do + exec bin/"uvicorn", "--port=#{port}", "example:app" + end + + assert_match "Hello, Homebrew!", shell_output("curl --silent --retry 5 --retry-connrefused 127.0.0.1:#{port}/") + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/u/uvw.rb b/Formula/u/uvw.rb new file mode 100644 index 0000000000000..3eab664e56322 --- /dev/null +++ b/Formula/u/uvw.rb @@ -0,0 +1,82 @@ +class Uvw < Formula + desc "Header-only, event based, tiny and easy to use libuv wrapper in modern C++" + homepage "https://github.com/skypjack/uvw" + url "https://github.com/skypjack/uvw/archive/refs/tags/v3.4.0_libuv_v1.48.tar.gz" + version "3.4.0" + sha256 "c16600573871a5feeb524234b378ab832c8971b2a68d030c6bd0e3077d416ade" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)(?:[._-]libuv[._-]v?\d+(?:\.\d+)*)?$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "594413006be49d686f144c3122cb960e9eb204a9dbc3503dd7622b8051b61e78" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ffd8957741528fa17ff2883d204d9a86f58bf13f1d2d12e11b9e23436412c1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd6b702c8f2b647f207611e843ec0d36731982a20b61759e9aae7465f5e8cb8f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d9cdb35b83cb69c02172ba1e43007e5d605d3fb4c3b3af40ebf24e34cd7dcba1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5dfb062fab38ca015d435f5f324208a67a9414e2a823541eba2c720fb884af6a" + sha256 cellar: :any_skip_relocation, sonoma: "6e9929a431e28be34456a3c4eeffa04c4b045a98e416acc4727423d54a2c6815" + sha256 cellar: :any_skip_relocation, ventura: "d4a069f5c1bbb5d81410483e2a1989498acd3788827abb2ee38d30f590f5b65e" + sha256 cellar: :any_skip_relocation, monterey: "8bc362bc8cb3cf30ea27a8d4f4f9b5cd44b8290b45b440f6b6da97a6b22a7284" + sha256 cellar: :any_skip_relocation, arm64_linux: "612431aeef05fad9b635b106bdd5fde18f7d03b30de86ff5e64f0655696aed45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1df5b81661883a5eb47d2156a1def7b605a78d8270c255e8c367b347d8b06ceb" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => :test + depends_on "libuv" + + def install + args = %w[ + -DBUILD_UVW_LIBS=ON + -DBUILD_DOCS=OFF + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0) + project(test_uvw) + + set(CMAKE_CXX_STANDARD 17) + + find_package(uvw REQUIRED) + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBUV REQUIRED libuv) + + add_executable(test main.cpp) + target_include_directories(test PRIVATE ${uvw_INCLUDE_DIRS}) + target_link_libraries(test PRIVATE uvw::uvw uv) + CMAKE + + (testpath/"main.cpp").write <<~CPP + #include + #include + + int main() { + auto loop = uvw::loop::get_default(); + auto timer = loop->resource(); + + timer->on([](const uvw::timer_event &, uvw::timer_handle &handle) { + std::cout << "Timer event triggered!" << std::endl; + handle.close(); + }); + + timer->start(uvw::timer_handle::time{1000}, uvw::timer_handle::time{0}); + loop->run(); + return 0; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + system "./build/test" + end +end diff --git a/Formula/u/uvwasi.rb b/Formula/u/uvwasi.rb new file mode 100644 index 0000000000000..9c687de6dcdc1 --- /dev/null +++ b/Formula/u/uvwasi.rb @@ -0,0 +1,91 @@ +class Uvwasi < Formula + desc "WASI syscall API built atop libuv" + homepage "https://github.com/nodejs/uvwasi" + url "https://github.com/nodejs/uvwasi/archive/refs/tags/v0.0.23.tar.gz" + sha256 "cdb148aac298883b51da887657deca910c7c02f35435e24f125cef536fe8d5e1" + license "MIT" + head "https://github.com/nodejs/uvwasi.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "c2742f168c40ecdcf97566b4bbca3419dc010995edbd25fd2805c45cccbe11fd" + sha256 cellar: :any, arm64_sequoia: "3bbe2380eb184f540f5b23a9cd2f92ef21a4779b04ff6068b6c3a0b4e7865c7e" + sha256 cellar: :any, arm64_sonoma: "923e457efe87a95fd53031ca80440ce09ab3862a9ac7df374b3fe634c7001c23" + sha256 cellar: :any, sonoma: "74534d557b0603f0fac5d6b4e98257bee2f372c55e0eabf97b0ac5ccbd10415d" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc607f16b816da2d32a2d8a3eec770c64f8a497524dd1a33d5b6f252db0ac44d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2befd108f0cf4fffab4832dc834e0b7c4b8aec470ad95994435792c6b3ab9bcc" + end + + depends_on "cmake" => :build + depends_on "libuv" + + # Apply open PR to remove find_dependency in CMake configuration file + # PR ref: https://github.com/nodejs/uvwasi/pull/313 + patch do + url "https://github.com/nodejs/uvwasi/commit/fcc0be004867939389aba3cc715ea90b86ab869c.patch?full_index=1" + sha256 "4a3a388e9831709089270b7c6bc779d86257857192dee247d32ec360cd7819cc" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Adapted from "Example Usage" in README. + (testpath/"test-uvwasi.c").write <<~C + #include + #include + #include "uv.h" + #include "uvwasi.h" + + int main(void) { + uvwasi_t uvwasi; + uvwasi_options_t init_options; + uvwasi_errno_t err; + + memset(&init_options, 0, sizeof(init_options)); + + /* Setup the initialization options. */ + init_options.in = 0; + init_options.out = 1; + init_options.err = 2; + init_options.fd_table_size = 4; + + init_options.argc = 1; + init_options.argv = calloc(init_options.argc, sizeof(char*)); + init_options.argv[0] = strdup("test-uvwasi"); + + init_options.envp = calloc(1, sizeof(char*)); + init_options.envp[0] = NULL; + + init_options.preopenc = 1; + init_options.preopens = calloc(1, sizeof(uvwasi_preopen_t)); + init_options.preopens[0].mapped_path = strdup("/sandbox"); + init_options.preopens[0].real_path = strdup("/tmp"); + + init_options.allocator = NULL; + + /* Initialize the sandbox. */ + err = uvwasi_init(&uvwasi, &init_options); + + if (err != UVWASI_ESUCCESS) { + fprintf(stderr, "uvwasi_init() failed: %d\\n", err); + return 1; + } + + /* Clean up resources. */ + uvwasi_destroy(&uvwasi); + return 0; + } + C + + ENV.append_to_cflags "-I#{include} -I#{Formula["libuv"].opt_include}" + ENV.append "LDFLAGS", "-L#{lib}" + ENV.append "LDLIBS", "-luvwasi" + + system "make", "test-uvwasi" + system "./test-uvwasi" + end +end diff --git a/Formula/u/uwsgi.rb b/Formula/u/uwsgi.rb new file mode 100644 index 0000000000000..3300463e52d92 --- /dev/null +++ b/Formula/u/uwsgi.rb @@ -0,0 +1,118 @@ +class Uwsgi < Formula + desc "Full stack for building hosting services" + homepage "https://uwsgi-docs.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/9f/49/2f57640e889ba509fd1fae10cccec1b58972a07c2724486efba94c5ea448/uwsgi-2.0.31.tar.gz" + sha256 "e8f8b350ccc106ff93a65247b9136f529c14bf96b936ac5b264c6ff9d0c76257" + license "GPL-2.0-or-later" + head "https://github.com/unbit/uwsgi.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "3c36ef0487dd1f7fa40d9741ce01dc2657582ba76e1879b8b0de066515d1b3d8" + sha256 arm64_sequoia: "6f7f4e12229641099470b25ce4632430453d587dea74ca6d1ddcd536a1f56b60" + sha256 arm64_sonoma: "dbbbdcde2bd3c5a0b8654a90d449340f160a249a7102b2b9b6269e83ba129f2f" + sha256 sonoma: "80fd46872c6dab38b10b83ea73bae5c24e68e52a5fe8983b00de3a7312c87768" + sha256 arm64_linux: "97a745c0f389067dfd9501355f05b5dd55245cba77658ca888fec497c882bcb7" + sha256 x86_64_linux: "8af74b0f5b72985bbe1aeb2014638df4111fca18e89f11149cc5fd0ce3c4d51e" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "pcre2" + depends_on "python@3.14" + depends_on "sqlite" + depends_on "yajl" + + uses_from_macos "curl" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "openldap" + uses_from_macos "perl" + + on_linux do + depends_on "linux-pam" + end + + def python3 + "python3.14" + end + + def install + openssl = Formula["openssl@3"] + ENV.prepend "CFLAGS", "-I#{openssl.opt_include}" + ENV.prepend "LDFLAGS", "-L#{openssl.opt_lib}" + + (buildpath/"buildconf/brew.ini").write <<~INI + [uwsgi] + ssl = true + json = yajl + xml = libxml2 + yaml = embedded + inherit = base + plugin_dir = #{libexec}/uwsgi + embedded_plugins = null + INI + + system python3, "uwsgiconfig.py", "--verbose", "--build", "brew" + + plugins = %w[airbrake alarm_curl asyncio cache + carbon cgi cheaper_backlog2 cheaper_busyness + corerouter curl_cron dumbloop dummy + echo emperor_amqp fastrouter forkptyrouter gevent + http logcrypto logfile ldap logpipe logsocket + msgpack notfound pam ping psgi pty rawrouter + router_basicauth router_cache router_expires + router_hash router_http router_memcached + router_metrics router_radius router_redirect + router_redis router_rewrite router_static + router_uwsgi router_xmldir rpc signal spooler + sqlite3 sslrouter stats_pusher_file + stats_pusher_socket symcall syslog + transformation_chunked transformation_gzip + transformation_offload transformation_tofile + transformation_toupper ugreen webdav zergpool] + plugins << "alarm_speech" if OS.mac? + plugins << "cplusplus" if OS.linux? + + (libexec/"uwsgi").mkpath + plugins.each do |plugin| + system python3, "uwsgiconfig.py", "--verbose", "--plugin", "plugins/#{plugin}", "brew" + end + + system python3, "uwsgiconfig.py", "--verbose", "--plugin", "plugins/python", "brew", "python3" + + bin.install "uwsgi" + end + + service do + run [opt_bin/"uwsgi", "--uid", "_www", "--gid", "_www", "--master", "--die-on-term", "--autoload", "--logto", + HOMEBREW_PREFIX/"var/log/uwsgi.log", "--emperor", HOMEBREW_PREFIX/"etc/uwsgi/apps-enabled"] + keep_alive true + working_dir HOMEBREW_PREFIX + end + + test do + (testpath/"helloworld.py").write <<~PYTHON + def application(env, start_response): + start_response('200 OK', [('Content-Type','text/html')]) + return [b"Hello World"] + PYTHON + + port = free_port + args = %W[ + --http-socket 127.0.0.1:#{port} + --protocol=http + --plugin python3 + -w helloworld + ] + pid = spawn("#{bin}/uwsgi", *args) + sleep 4 + sleep 6 if Hardware::CPU.intel? + + begin + assert_match "Hello World", shell_output("curl localhost:#{port}") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/uade.rb b/Formula/uade.rb deleted file mode 100644 index 9f1ec49dc3ef1..0000000000000 --- a/Formula/uade.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Uade < Formula - desc "Play Amiga tunes through UAE emulation" - homepage "http://zakalwe.fi/uade/" - head "git://zakalwe.fi/uade" - - stable do - url "http://zakalwe.fi/uade/uade2/uade-2.13.tar.bz2" - sha256 "3b194e5aebbfa99d3708d5a0b5e6bd7dc5d1caaecf4ae9b52f8ff87e222dd612" - - # Upstream patch to fix compiler detection under superenv - patch :DATA - end - bottle do - sha256 "c3fec98e439e93b609a93b3041a0e09be74426652b5dd78f15c543afeeb4216d" => :mojave - sha256 "226dc1fbb9535b64f19e04310db19fb9a760024fc0b0c73e3c68cf7c72e508d9" => :high_sierra - sha256 "432a5f95b33416c9bfc29ef4d81ea6d4fab2a568c71c00a9bda034985ed1276b" => :sierra - sha256 "59ddaa5a6d841f436a5d297330ff62b613e446785ad17666c8fb4157d3a7c8db" => :el_capitan - sha256 "454945f35580b0b2bc8f0c7ddeecfae091634f54ee3a367eb14acce7251e5779" => :yosemite - sha256 "807b7f5cb5a83348c778003d781d715cec73d37da537e0b11b8138c93aad4938" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libao" - - resource "bencode-tools" do - url "https://github.com/heikkiorsila/bencode-tools.git" - end - - def install - if build.head? - resource("bencode-tools").stage do - system "./configure", "--prefix=#{prefix}", "--without-python" - system "make" - system "make", "install" - end - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -diff --git a/configure b/configure -index 05bfa9b..a73608e 100755 ---- a/configure -+++ b/configure -@@ -399,13 +399,13 @@ if test -n "$sharedir"; then - uadedatadir="$sharedir" - fi - --$NATIVECC -v 2>/dev/null >/dev/null -+$NATIVECC --version 2>/dev/null >/dev/null - if test "$?" != "0"; then - echo Native CC "$NATIVECC" not found, please install a C compiler - exit 1 - fi - --$TARGETCC -v 2>/dev/null >/dev/null -+$TARGETCC --version 2>/dev/null >/dev/null - if test "$?" != "0"; then - echo Target CC "$TARGETCC" not found, please install a C compiler - exit 1 diff --git a/Formula/uberftp.rb b/Formula/uberftp.rb deleted file mode 100644 index d9693bd48bbc7..0000000000000 --- a/Formula/uberftp.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Uberftp < Formula - desc "Interactive GridFTP client" - homepage "https://github.com/JasonAlt/UberFTP" - url "https://github.com/JasonAlt/UberFTP/archive/Version_2_8.tar.gz" - sha256 "8a397d6ef02bb714bb0cbdb259819fc2311f5d36231783cd520d606c97759c2a" - - bottle do - cellar :any - sha256 "4f4fe88e7dbc9c06bf2057f8eae9833709c1880542818dcb2a2666b1eb9764b6" => :mojave - sha256 "03fc04e9897a29b806bb0f5b527e37f2263bbb2ec7df7b12b6e222c55e7fab41" => :high_sierra - sha256 "74ab71c89b96942aa3287080033c7b11cb28d1eb1fa37b628b69997976fed892" => :sierra - sha256 "e8dce3fad5462c096d9e1c4e605280679f9a79b6b9204401fb10d3449807d2d9" => :el_capitan - sha256 "84ab25a3cae1ac0d4aeb2b967b151b396301eb1f7877bb6225ed202847a35cff" => :yosemite - sha256 "9c7f1cbb83c268b00a137e608497bafe066ac41a034c256ca55075d1eeb72cfe" => :mavericks - end - - depends_on "globus-toolkit" - - def install - globus = Formula["globus-toolkit"].opt_prefix - - # patch needed since location changed with globus-toolkit versions>=6.0, - # patch to upstream is not yet merged - # (located at https://github.com/JasonAlt/UberFTP/pull/8) - # but solves not whole problem (needs aditional patch) - inreplace "configure", "globus_location/include/globus/gcc64dbg", "globus_location/libexec/include" - inreplace "configure", "globus_location/lib64", "globus_location/libexec/lib" - - system "./configure", "--prefix=#{prefix}", - "--with-globus=#{globus}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/uberftp", "-v" - end -end diff --git a/Formula/ubertooth.rb b/Formula/ubertooth.rb deleted file mode 100644 index f48e60e4e0a44..0000000000000 --- a/Formula/ubertooth.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ubertooth < Formula - desc "Host tools for Project Ubertooth" - homepage "https://github.com/greatscottgadgets/ubertooth/wiki" - url "https://github.com/greatscottgadgets/ubertooth/releases/download/2018-12-R1/ubertooth-2018-12-R1.tar.xz" - version "2018-12-R1" - sha256 "0042daa79db0f4148a0255cdf05aa57006e23ac36edf7024e9e99ccc4892867b" - head "https://github.com/greatscottgadgets/ubertooth.git" - - bottle do - cellar :any - sha256 "9e6dcaeeff6974606332371fc0ce861d679bc9d00471f4185a7531b320e581fb" => :mojave - sha256 "d3891c8cd1e395c8d7acd9f364d6d42d3bcb7d9d1ddd5adea9dfabc7f0aead69" => :high_sierra - sha256 "b4e68f3183b67bd99d276c0889e6c36ea6a1c99931446bec237d9bf7b4cc5d81" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libbtbb" - depends_on "libusb" - - def install - mkdir "host/build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - # Most ubertooth utilities require an ubertooth device present. - system "#{bin}/ubertooth-rx", "-i", "/dev/null" - end -end diff --git a/Formula/ucg.rb b/Formula/ucg.rb deleted file mode 100644 index 6f43ef473aaf7..0000000000000 --- a/Formula/ucg.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Ucg < Formula - desc "Tool for searching large bodies of source code (like grep)" - homepage "https://github.com/gvansickle/ucg" - url "https://github.com/gvansickle/ucg/releases/download/0.3.3/universalcodegrep-0.3.3.tar.gz" - sha256 "116d832bbc743c7dd469e5e7f1b20addb3b7a08df4b4441d59da3acf221caf2d" - head "https://github.com/gvansickle/ucg.git" - - bottle do - cellar :any - rebuild 1 - sha256 "2b073d5a0ee4cb2fe71822ce27c014b00974298cfc656f1fe0279f58bde398f9" => :mojave - sha256 "3642e741bc9ffd1cf1982bfc2c373e0ed54a417c08ac46f43e4cf8a09a0a1a8a" => :high_sierra - sha256 "dddf2d62a2e582a9356a4da6434ddb0432ce6d6b1d50a5dc6728f9b6254531a5" => :sierra - sha256 "e4699a681ae9d2e9d68ce7da85fc050907070bc9650fad0c4f76faf991f3a422" => :el_capitan - end - - depends_on "argp-standalone" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "pcre2" - - # Fix Xcode 9 compilation issue: https://github.com/gvansickle/ucg/issues/118 - # Patch adapted from upstream: https://github.com/gvansickle/ucg/commit/395f89 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/00615b/ucg/xcode9.patch" - sha256 "3005fda5923cfa3093ce53ad84435fd7a5974f960b2e222e0e59afa90414af90" - end - - def install - system "autoreconf", "-i" if build.head? - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.txt").write("Hello World!") - assert_match "Hello World!", shell_output("#{bin}/ucg 'Hello World' #{testpath}") - end -end diff --git a/Formula/uchardet.rb b/Formula/uchardet.rb deleted file mode 100644 index 1c056733464d1..0000000000000 --- a/Formula/uchardet.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Uchardet < Formula - desc "Encoding detector library" - homepage "https://www.freedesktop.org/wiki/Software/uchardet/" - url "https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.6.tar.xz" - sha256 "8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61" - head "https://anongit.freedesktop.org/git/uchardet/uchardet.git" - - bottle do - cellar :any - sha256 "d276b3607abe2ed5e2922cda3572d09192c60f13bf18d6d84cee24c12d700bcf" => :mojave - sha256 "c0416fb559e8c10f1cca21a0b0162d462cc02019d8abbce3712f64261b1ce8fe" => :high_sierra - sha256 "dce2d199e163858a10f27f9d94d232b8df5d38507098b629356ee5154d4f182c" => :sierra - sha256 "998232b6d034c090680202ca6d48a9af4924f091f3b597e4aa318f87fdf29bb8" => :el_capitan - sha256 "ab930a4e2c217362dc7e05940cc6449d024f18c5014847ff9428facef02316c7" => :yosemite - sha256 "c02f20920ac97596ab425b057275372a77c80c7d523191f2e5ab78c636d6827f" => :mavericks - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args - args << "-DCMAKE_INSTALL_NAME_DIR=#{lib}" - system "cmake", ".", *args - system "make", "install" - end - - test do - assert_equal "ASCII", pipe_output("#{bin}/uchardet", "Homebrew").chomp - end -end diff --git a/Formula/ucl.rb b/Formula/ucl.rb deleted file mode 100644 index 3195c1eb62d23..0000000000000 --- a/Formula/ucl.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Ucl < Formula - desc "Data compression library with small memory footprint" - homepage "https://www.oberhumer.com/opensource/ucl/" - url "https://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz" - sha256 "b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348" - - bottle do - cellar :any_skip_relocation - sha256 "b676bbfb2ff44a3ff71e96a11bc8ae86ea2466029faea800427196d3ece8261e" => :mojave - sha256 "95bba447faa9e980720b780e1db69bf59e72f026a19a965bbb1b18f3de9230de" => :high_sierra - sha256 "b2019331517fea2505cb2d25eebbdf6ceb9a45378525d0e36a096ea3c45ad9a8" => :sierra - sha256 "d56b0d36a68a2bc558742eac0c6632612180797cc45520389b5d87f09c23b1bd" => :el_capitan - sha256 "32a54309c092854fc5a4a443a1e9d33fb677ff257d983ea7d5b0eb7bb90d3b2e" => :yosemite - sha256 "3c334012766dce80dac49d279be1be1ae4a1fc5df188cc19a25ba1bec84305a9" => :mavericks - sha256 "4190f1602c52b934a93581741fcccba8dad4e8dc4f478342d71b1b564cd62834" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - // simplified version of - // https://github.com/korczis/ucl/blob/master/examples/simple.c - #include - #include - #include - #define IN_LEN (128*1024L) - #define OUT_LEN (IN_LEN + IN_LEN / 8 + 256) - int main(int argc, char *argv[]) { - int r; - ucl_byte *in, *out; - ucl_uint in_len, out_len, new_len; - - if (ucl_init() != UCL_E_OK) { return 4; } - in = (ucl_byte *) ucl_malloc(IN_LEN); - out = (ucl_byte *) ucl_malloc(OUT_LEN); - if (in == NULL || out == NULL) { return 3; } - - in_len = IN_LEN; - ucl_memset(in,0,in_len); - - r = ucl_nrv2b_99_compress(in,in_len,out,&out_len,NULL,5,NULL,NULL); - if (r != UCL_E_OK) { return 2; } - if (out_len >= in_len) { return 0; } - r = ucl_nrv2b_decompress_8(out,out_len,in,&new_len,NULL); - if (r != UCL_E_OK && new_len == in_len) { return 1; } - ucl_free(out); - ucl_free(in); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lucl", "-o", "test" - system "./test" - end -end diff --git a/Formula/ucloud.rb b/Formula/ucloud.rb deleted file mode 100644 index 7f12383bf54ca..0000000000000 --- a/Formula/ucloud.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ucloud < Formula - desc "The official tool to managment your ucloud services" - homepage "https://www.ucloud.cn" - url "https://github.com/ucloud/ucloud-cli/archive/0.1.7.tar.gz" - sha256 "e1f6870bcd2e9c1acb4a8c415490ef1c7d5cc65a35e745c339e9b3a391db159f" - - bottle do - cellar :any_skip_relocation - sha256 "96d18c0e4546516e2e842d249f9e07e87356a1f2f9968de83e0d863dcf9c204a" => :mojave - sha256 "e190b11724029c31e83f6371dc662fe330f1f31ae6ccfe51ab7a1bc6c67ac0fa" => :high_sierra - sha256 "3feed318f4057faafd111839f7bcc1d9046931429f5123d708154c11c0ba172e" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/ucloud/ucloud-cli" - dir.install buildpath.children - cd dir do - system "go", "build", "-o", bin/"ucloud" - prefix.install_metafiles - end - end - - test do - system "#{bin}/ucloud", "config", "--project-id", "org-test" - config_json = (testpath/".ucloud/config.json").read - assert_match '"project_id":"org-test"', config_json - assert_match version.to_s, shell_output("#{bin}/ucloud --version") - end -end diff --git a/Formula/ucommon.rb b/Formula/ucommon.rb deleted file mode 100644 index ac89752d31ca1..0000000000000 --- a/Formula/ucommon.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ucommon < Formula - desc "GNU C++ runtime library for threads, sockets, and parsing" - homepage "https://www.gnu.org/software/commoncpp/" - url "https://ftp.gnu.org/gnu/commonc++/ucommon-7.0.0.tar.gz" - sha256 "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7" - - bottle do - sha256 "34ef3423a4f8f0de02e05e8a00a5f1cb12bd0b9790103354792c24b7613ccb80" => :mojave - sha256 "650bda43b289012df676190269cde7bb3be3e1337f4f2eddc6f472ae38bbda1c" => :high_sierra - sha256 "0546fbc44ac1e17d8757b41a67b2d68b15bc872b4b19fea649e5d7fe54a4d2d4" => :sierra - sha256 "57756d7809936ed885ef8fc7a284498ab12a5be6cc1ad41ad148dd45074fc322" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gnutls" - - # Fix build, reported by email to bug-commoncpp@gnu.org on 2017-10-05 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/77f0d9d2/ucommon/cachelinesize.patch" - sha256 "46aef9108e2012362b6adcb3bea2928146a3a8fe5e699450ffaf931b6db596ff" - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", - "--disable-silent-rules", "--enable-socks", - "--with-sslstack=gnutls", "--with-pkg-config" - system "make", "install" - end - - test do - system "#{bin}/ucommon-config", "--libs" - end -end diff --git a/Formula/ucon64.rb b/Formula/ucon64.rb deleted file mode 100644 index 128fae764d1e3..0000000000000 --- a/Formula/ucon64.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Ucon64 < Formula - desc "ROM backup tool and emulator's Swiss Army knife program" - homepage "https://ucon64.sourceforge.io/" - url "https://downloads.sourceforge.net/ucon64/ucon64-2.1.0-src.tar.gz" - sha256 "c99964060a5337cea811b27c4103e186a14ba1f04b19cff08bac0260271bc872" - head "http://svn.code.sf.net/p/ucon64/svn/trunk/ucon64" - - bottle do - sha256 "84609c8e92dae09a76f12eebe5c19d1769eb22d28029db5d15c14949800c358f" => :mojave - sha256 "3fc97894b8edaa28fa90a2cb494976be49fa7a28fb875797bd5f56ddc3b2fd69" => :high_sierra - sha256 "6fe6e1cf1db14e4592eb3486c6629bff06813a42c34b9ae8e188a5ad02745344" => :sierra - sha256 "015cfd4803ea86f02429fc9a1f5de59d72012c9d0e32a92c9f996922ef422084" => :el_capitan - end - - resource "super_bat_puncher_demo" do - url "http://morphcat.de/superbatpuncher/Super%20Bat%20Puncher%20Demo.zip" - sha256 "d74cb3ba11a4ef5d0f8d224325958ca1203b0d8bb4a7a79867e412d987f0b846" - end - - def install - # ucon64's normal install process installs the discmage library in - # the user's home folder. We want to store it inside the prefix, so - # we have to change the default value of ~/.ucon64rc to point to it. - # .ucon64rc is generated by the binary, so we adjust the default that - # is set when no .ucon64rc exists. - inreplace "src/ucon64_misc.c", 'PROPERTY_MODE_DIR ("ucon64") "discmage.dylib"', - "\"#{opt_prefix}/libexec/libdiscmage.dylib\"" - - cd "src" do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - bin.install "ucon64" - libexec.install "libdiscmage/discmage.so" => "libdiscmage.dylib" - end - end - - def caveats - <<~EOS - You can copy/move your DAT file collection to $HOME/.ucon64/dat - Be sure to check $HOME/.ucon64rc for configuration after running uCON64 - for the first time. - EOS - end - - test do - resource("super_bat_puncher_demo").stage testpath - - assert_match "00000000 4e 45 53 1a 08 00 11 00 00 00 00 00 00 00 00 00", - shell_output("#{bin}/ucon64 \"#{testpath}/Super Bat Puncher Demo.nes\"") - end -end diff --git a/Formula/ucspi-tcp.rb b/Formula/ucspi-tcp.rb deleted file mode 100644 index a49bc7ce30455..0000000000000 --- a/Formula/ucspi-tcp.rb +++ /dev/null @@ -1,39 +0,0 @@ -class UcspiTcp < Formula - desc "Tools for building TCP client-server applications" - homepage "https://cr.yp.to/ucspi-tcp.html" - url "https://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz" - sha256 "4a0615cab74886f5b4f7e8fd32933a07b955536a3476d74ea087a3ea66a23e9c" - - bottle do - cellar :any_skip_relocation - sha256 "f464584f762728957020fce03d331fb6e96c79a721cdd5911afb452d4b91da7b" => :mojave - sha256 "b3f2714c61a157eb31ef53915901c29c24ad3dc5cf7d7c3403dcd501399e26b4" => :high_sierra - sha256 "46d324e867e5a35cbb17e8a215ff33f693651d11645eed116e4e4a6c02085b34" => :sierra - sha256 "a57368e57812063bc4e1450c0bef5cad8392c44e54abf3c8ca950ea51abe7ae9" => :el_capitan - sha256 "727e93394b415da772b43ce5028ad54dcb569f695e6c8c4cdf05dc462b2febbe" => :yosemite - sha256 "67eb31db588a2299c5e69a4a60f3c56d07624a58e52e77cff2e58be554085d9f" => :mavericks - end - - # IPv6 patch - # Used to be https://www.fefe.de/ucspi/ucspi-tcp-0.88-ipv6.diff19.bz2 - patch do - url "https://raw.githubusercontent.com/homebrew/patches/2b3e4da/ucspi-tcp/patch-0.88-ipv6.diff" - sha256 "c2d6ce17c87397253f298cc28499da873efe23afe97e855bdcf34ae66374036a" - end - - def install - (buildpath/"conf-home").unlink - (buildpath/"conf-home").write prefix - - system "make" - bin.mkpath - system "make", "setup" - system "make", "check" - share.install prefix/"man" - end - - test do - assert_match(/usage: tcpserver/, - shell_output("#{bin}/tcpserver 2>&1", 100)) - end -end diff --git a/Formula/udis86.rb b/Formula/udis86.rb deleted file mode 100644 index 1142a4b045c4c..0000000000000 --- a/Formula/udis86.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Udis86 < Formula - desc "Minimalistic disassembler library for x86" - homepage "https://udis86.sourceforge.io" - url "https://downloads.sourceforge.net/udis86/udis86-1.7.2.tar.gz" - sha256 "9c52ac626ac6f531e1d6828feaad7e797d0f3cce1e9f34ad4e84627022b3c2f4" - - bottle do - cellar :any - sha256 "b510a8349883e86135cf030953df54b671cf668a1e3e5020fc059a0f6f92a52d" => :mojave - sha256 "cefad0043918886a862a040adf2450699c00cbef3fd561bbc8867e2328b16ac8" => :high_sierra - sha256 "e3774a825eda78db57585c75b739dc60d0c069e35c8666575f5889908b0735d5" => :sierra - sha256 "e763db7beca50f11ab341f13f5fd571513f4847772bb70ef83d94bb576427673" => :el_capitan - sha256 "bcd6eb347f55bc856ceb64604d3bace30219e346de34caa8be7de2b52a1cb35d" => :yosemite - sha256 "84b56e3d62695b2c39c2c450d94fcd258439baedbcd68980a19b685f2e2b95c9" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--enable-shared" - system "make" - system "make", "install" - end - - test do - assert_match("int 0x80", pipe_output("#{bin}/udcli -x", "cd 80").split.last(2).join(" ")) - end -end diff --git a/Formula/udns.rb b/Formula/udns.rb deleted file mode 100644 index 055823e20428f..0000000000000 --- a/Formula/udns.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Udns < Formula - desc "DNS resolver library" - homepage "http://www.corpit.ru/mjt/udns.html" - url "http://www.corpit.ru/mjt/udns/udns-0.4.tar.gz" - sha256 "115108dc791a2f9e99e150012bcb459d9095da2dd7d80699b584ac0ac3768710" - - bottle do - cellar :any - sha256 "ce9ffcdbc08861f382e251d66293c4de690e5bffe1ca3015909332b71ea306c8" => :mojave - sha256 "806e631f04904c4e550e3397a6519ee1803cb3cbef916967f42aed331e875afa" => :high_sierra - sha256 "8fbcc7a26f6be81abfe4766e9efc012c720938e8ea9dc9f20497cb82b101e659" => :sierra - sha256 "59939957b47912ebb286426391a4e2c904ecc416e9de18dc8c0a74052ac82ffe" => :el_capitan - sha256 "342aff7270a4251655eb7cfc538b39db1805cfe965ada5cad1a2819b727d9107" => :yosemite - sha256 "d6be7acb570845e63c6ac69b8169c4ce1d5a31f5f76f60bad10168a5b13126ff" => :mavericks - end - - # Build target for dylib. See: - # http://www.corpit.ru/pipermail/udns/2011q3/000154.html - patch :DATA - - def install - system "./configure" - system "make" - system "make", "dylib" - - bin.install "dnsget", "rblcheck" - doc.install "NOTES", "TODO", "ex-rdns.c" - include.install "udns.h" - lib.install "libudns.a", "libudns.0.dylib", "libudns.dylib" - man1.install "dnsget.1", "rblcheck.1" - man3.install "udns.3" - end -end - -__END__ ---- udns-0.4.orig/Makefile.in 2014-01-23 02:45:31.000000000 -0800 -+++ udns-0.4/Makefile.in 2014-08-16 20:22:00.000000000 -0700 -@@ -42,6 +42,11 @@ - SOLIBV = lib$(NAME).so.$(SOVER) - SOLIBFL= -L. -l$(NAME)_s - -+DYLIB = lib$(NAME).dylib -+DYLIBV = lib$(NAME).$(SOVER).dylib -+ -+LIBS = $(LIB) $(SOLIBV) $(DYLIB) -+ - UTILS = $(USRCS:.c=) - UOBJS = $(USRCS:.c=.o) - SOUTILS = $(USRCS:.c=_s) -@@ -71,6 +76,14 @@ - .c.o: - $(CC) $(CFLAGS) $(CDEFS) -c $< - -+dylib: $(DYLIB) -+ -+$(DYLIBV): $(SOBJS) -+ $(CC) -dynamiclib $(SOBJS) -o $(DYLIBV) -+$(DYLIB): $(DYLIBV) -+ rm -rf $@ -+ ln -s $(DYLIBV) $@ -+ - shared: $(SOLIBV) $(SOUTILS) - sharedlib: $(SOLIBV) diff --git a/Formula/udptunnel.rb b/Formula/udptunnel.rb deleted file mode 100644 index 7adec6ebbe39a..0000000000000 --- a/Formula/udptunnel.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Udptunnel < Formula - desc "Tunnel UDP packets over a TCP connection" - homepage "https://web.archive.org/web/20161224191851/www.cs.columbia.edu/~lennox/udptunnel/" - url "https://web.archive.org/web/20161224191851/www.cs.columbia.edu/~lennox/udptunnel/udptunnel-1.1.tar.gz" - mirror "https://ftp.nsysu.edu.tw/FreeBSD/ports/local-distfiles/leeym/udptunnel-1.1.tar.gz" - sha256 "45c0e12045735bc55734076ebbdc7622c746d1fe4e6f7267fa122e2421754670" - - bottle do - cellar :any_skip_relocation - sha256 "7923707e0f1851b728643b010aba4b2052e076f935467a1b0ec8ef05d0cbe54b" => :mojave - sha256 "938663a675b5ef62316fa1f7f4f33895d1b28af656ee722c5f8cf6ba94123f4e" => :high_sierra - sha256 "c129b87c78c3297365d7e78b77985b69deb4def8d030b029d812bb25610b8bb0" => :sierra - sha256 "acbc74c384071aa6be92bea754274c5025de0123afd389d1b174e444a7beec42" => :el_capitan - sha256 "8c4b8fb805fa94098925417a8fa61ced0d546b1b77330fd03cd5a72ee6e43b70" => :yosemite - sha256 "8f0051f653f62bef0e85f8ced4806a8bae244a911e05129e4fc2bf05912c9412" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - doc.install "udptunnel.html" - end - - test do - system "#{bin}/udptunnel -h; true" - end -end diff --git a/Formula/udpxy.rb b/Formula/udpxy.rb deleted file mode 100644 index dbacce5ae6f72..0000000000000 --- a/Formula/udpxy.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Udpxy < Formula - desc "UDP-to-HTTP multicast traffic relay daemon" - homepage "http://www.udpxy.com/" - url "http://www.udpxy.com/download/1_23/udpxy.1.0.23-12-prod.tar.gz" - mirror "https://fossies.org/linux/www/udpxy.1.0.23-12-prod.tar.gz" - version "1.0.23-12" - sha256 "16bdc8fb22f7659e0427e53567dc3e56900339da261199b3d00104d699f7e94c" - - bottle do - cellar :any_skip_relocation - sha256 "37defc78c8d90754343c9d0c1b69bf1939ba081c42868daa41572551f5d60e4a" => :mojave - sha256 "46de795b585d88c658554fb943931885db85d75c7f838d9db6d11d98e46538d0" => :high_sierra - sha256 "ee35787b2877b8ac1a9fa967e9f8fbf466f8c107e28cc61fee59c26aef9bf44d" => :sierra - sha256 "0d4a899340bdee7f4497d68fe3bc59213ad83382d205aa08ada871d9d08c010d" => :el_capitan - end - - def install - system "make" - system "make", "install", "DESTDIR=#{prefix}", "PREFIX=''" - end - - plist_options :manual => "udpxy -p 4022" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/udpxy - -p - 4022 - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end -end diff --git a/Formula/udunits.rb b/Formula/udunits.rb deleted file mode 100644 index be9ab6bd6b2a5..0000000000000 --- a/Formula/udunits.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Udunits < Formula - desc "Unidata unit conversion library" - homepage "https://www.unidata.ucar.edu/software/udunits/" - url "ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.26.tar.gz" - mirror "https://fossies.org/linux/privat/udunits-2.2.26.tar.gz" - sha256 "368f4869c9c7d50d2920fa8c58654124e9ed0d8d2a8c714a9d7fdadc08c7356d" - - bottle do - sha256 "5d06e98f43d762c488ee32fdafcd11c6a1ba1e1527fb176cd2558a465701bfc1" => :mojave - sha256 "9bb90283343d3490d247eda07024cbdfa68b1dbc5255d2697c73ed2e73a29799" => :high_sierra - sha256 "754d3116eb032cc012c164b0a5edea7432f6e6a4b2853a9b7153e560dfb9075a" => :sierra - sha256 "5fbd4d1d36e471bc71720b61a1d4a76b363e115fc71b74208fc5284883087bda" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match(/1 kg = 1000 g/, shell_output("#{bin}/udunits2 -H kg -W g")) - end -end diff --git a/Formula/ufraw.rb b/Formula/ufraw.rb deleted file mode 100644 index c06cbb957decd..0000000000000 --- a/Formula/ufraw.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Ufraw < Formula - desc "Unidentified Flying RAW: RAW image processing utility" - homepage "https://ufraw.sourceforge.io" - url "https://downloads.sourceforge.net/project/ufraw/ufraw/ufraw-0.22/ufraw-0.22.tar.gz" - sha256 "f7abd28ce587db2a74b4c54149bd8a2523a7ddc09bedf4f923246ff0ae09a25e" - revision 2 - - bottle do - sha256 "374d46188ae4127e29b0e8bd3da65341a68ba7473aebb4592873bda2621f31e9" => :mojave - sha256 "73a19c1aa3644f1b53174226a8ee2853ad6354315859ac90b59739e884e4544b" => :high_sierra - sha256 "74d32fc9213f4f8f9aa16249e17f5c23d6cb92c706bfe85a51f36ee5d05bd3a1" => :sierra - sha256 "7f60c27241d80fbd9b2a2aa1ed5a8635de6a7326850321a7dcafd819fb7aa564" => :el_capitan - sha256 "e894048c08cb563ebda3be58de6d89667f1c7ae6337738b03792ebe7306ce74d" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "dcraw" - depends_on "gettext" - depends_on "glib" - depends_on "jasper" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "little-cms2" - depends_on "exiv2" => :optional - - # jpeg 9 compatibility - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b8ed064/ufraw/jpeg9.patch" - sha256 "45de293a9b132eb675302ba8870f5b6216c51da8247cd096b24a5ab60ffbd7f9" - end - - # Fix compilation with Xcode 9, see https://sourceforge.net/p/ufraw/bugs/419/ - if MacOS.version >= :high_sierra - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/d5bf686c74/ufraw/high_sierra.patch" - sha256 "60c67978cc84b5a118855bcaa552d5c5c3772b407046f1b9db9b74076a938f6e" - end - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-gtk", - "--without-gimp" - system "make", "install" - (share/"pixmaps").rmtree - end - - test do - assert_match version.to_s, shell_output("#{bin}/ufraw-batch --version 2>&1") - end -end diff --git a/Formula/uftp.rb b/Formula/uftp.rb deleted file mode 100644 index e9879cb4c11b0..0000000000000 --- a/Formula/uftp.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Uftp < Formula - desc "Secure, reliable, efficient multicast file transfer program" - homepage "https://uftp-multicast.sourceforge.io/" - url "https://downloads.sourceforge.net/project/uftp-multicast/source-tar/uftp-4.9.8.tar.gz" - sha256 "e98c6318e497124d777ca71eae752d213207c35de9f782c8bcaaf82ece20e599" - - bottle do - cellar :any - sha256 "1e9cf93c7cf204be2c2fa257321adc3c561e38f2232b1cb730d1b7afe246dabb" => :mojave - sha256 "69cc89d4b25477b115b242297b7c2ea4385a2097870d433b344e36333e874a9c" => :high_sierra - sha256 "8df58014e1e469d45a7f703387464a31663f0d632693b906fee835179000f95f" => :sierra - sha256 "b59605f65f2224aab208aaeac7867d25a05c8abe92afe8aff6a71a60a1e9e297" => :el_capitan - end - - depends_on "openssl" - - def install - system "make", "OPENSSL=#{Formula["openssl"].opt_prefix}", "DESTDIR=#{prefix}", "install" - # the makefile installs into DESTDIR/usr/..., move everything up one and remove usr - # the project maintainer was contacted via sourceforge on 12-Feb, he responded WONTFIX on 13-Feb - prefix.install Dir["#{prefix}/usr/*"] - (prefix/"usr").unlink - end - - plist_options :manual => "uftpd" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/uftpd - -d - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system "#{bin}/uftp_keymgt" - end -end diff --git a/Formula/uggconv.rb b/Formula/uggconv.rb deleted file mode 100644 index bc8d7719ca47f..0000000000000 --- a/Formula/uggconv.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Uggconv < Formula - desc "Universal Game Genie code convertor" - homepage "https://wyrmcorp.com/software/uggconv/index.shtml" - url "https://wyrmcorp.com/software/uggconv/uggconv-1.0.tar.gz" - sha256 "9a215429bc692b38d88d11f38ec40f43713576193558cd8ca6c239541b1dd7b8" - - bottle do - cellar :any_skip_relocation - sha256 "71b4a6ad5be4b5dbefe2c64dc17b6bcff00eedcf72070f4a22273ff1f0a392cd" => :mojave - sha256 "ed41635e3235d763c9dcad68db2e390821af5a62ec6709fca8b9c5e9b5d0b995" => :high_sierra - sha256 "a22594f94bf7baa1908bd1225f52f1db3dd01daa17f99038ecfbd60e22d12b5d" => :sierra - sha256 "5ab8b271f2ccc17e5229921f01b92ff7b0c297908902c83d24612bb47592af3c" => :el_capitan - sha256 "a40a8a1adee9286acedba6e8eedf20bc53e4bf291fc73478bd3ba0314792c6ce" => :yosemite - end - - def install - system "make" - bin.install "uggconv" - man1.install "uggconv.1" - end - - test do - assert_equal "7E00CE:03 = D7DA-FE86\n", - shell_output("#{bin}/uggconv -s 7E00CE:03") - end -end diff --git a/Formula/uhd.rb b/Formula/uhd.rb deleted file mode 100644 index 4224062a1f9ac..0000000000000 --- a/Formula/uhd.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Uhd < Formula - desc "Hardware driver for all USRP devices" - homepage "https://files.ettus.com/manual/" - url "https://github.com/EttusResearch/uhd/archive/v3.13.0.2.tar.gz" - sha256 "e18d0524cbf571be4847fd7f971dc30c37efd9e7a333761b74e1266a07cbd35b" - revision 1 - head "https://github.com/EttusResearch/uhd.git" - - bottle do - sha256 "04491dbf6bbb887e4d65d25e6f02c02ad9c49b210e46a3c4bbaa803c4fd14ceb" => :mojave - sha256 "de21647f4209a1bbe42c43d9845e7ee7472b9fc41a68ae0bcf108738d2621331" => :high_sierra - sha256 "832788aca2fa3cb7a58ba44f545977ee2310d27835160913cc44827d599d6d54" => :sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "boost" - depends_on "libusb" - depends_on "python" - - resource "Mako" do - url "https://files.pythonhosted.org/packages/eb/f3/67579bb486517c0d49547f9697e36582cd19dafb5df9e687ed8e22de57fa/Mako-1.0.7.tar.gz" - sha256 "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - resource("Mako").stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - mkdir "host/build" do - system "cmake", "..", *std_cmake_args, "-DENABLE_PYTHON3=ON" - system "make" - system "make", "test" - system "make", "install" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/uhd_config_info --version") - end -end diff --git a/Formula/um.rb b/Formula/um.rb deleted file mode 100644 index 9e13d6a2c799c..0000000000000 --- a/Formula/um.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Um < Formula - desc "Command-line utility for creating and maintaining personal man pages" - homepage "https://github.com/sinclairtarget/um" - url "https://github.com/sinclairtarget/um/archive/4.1.0.tar.gz" - sha256 "0606cd8da69618d508d06dee859dd1147a4d8846cdff57fb8958c71fe906523f" - - bottle do - cellar :any_skip_relocation - sha256 "1d1db24a30203c2439682f6cc2a5426aab764187ee7586f23baf1e7c8a866cf1" => :mojave - sha256 "292928bc6148b5a43c6247602fae927be0b06c8e6d0ec2b60d25432ed77e74d7" => :high_sierra - sha256 "985f610f0669af71b2d24cf8489d15967f1ea30b650372165ea41aabd93cfc33" => :sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - resource "kramdown" do - url "https://rubygems.org/gems/kramdown-1.17.0.gem" - sha256 "5862410a2c1692fde2fcc86d78d2265777c22bd101f11c76442f1698ab242cd8" - end - - def install - ENV["GEM_HOME"] = libexec - - resources.each do |r| - r.verify_download_integrity(r.fetch) - system "gem", "install", r.cached_download, "--ignore-dependencies", - "--no-document", "--install-dir", libexec - end - - system "gem", "build", "um.gemspec" - system "gem", "install", "--ignore-dependencies", "um-#{version}.gem" - - bin.install libexec/"bin/um" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - - bash_completion.install "um-completion.sh" - man1.install Dir["doc/man1/*"] - end - - test do - system bin/"um", "topic", "-d" # Set default topic - - output = shell_output("#{bin}/um topic") - assert_match shell_output("#{bin}/um config default_topic"), output - end -end diff --git a/Formula/umlet.rb b/Formula/umlet.rb deleted file mode 100644 index 46eccbbe71886..0000000000000 --- a/Formula/umlet.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Umlet < Formula - desc "This UML tool aimed at providing a fast way of creating UML diagrams" - homepage "https://www.umlet.com/" - url "https://www.umlet.com/umlet_14_2/umlet-standalone-14.2.zip" - sha256 "dc09538d04cb899218f3bdfdb5205f60359cff68cb1428d1228c6d91743d8cb9" - - bottle :unneeded - - depends_on :java => "1.6+" - - def install - rm Dir["*.{desktop,exe}"] - libexec.install Dir["*"] - - inreplace "#{libexec}/umlet.sh", " java ", " ${JAVA_HOME}/bin/java " - inreplace "#{libexec}/umlet.sh", /^programDir=.*$/, - "programDir=#{libexec}" - - chmod 0755, "#{libexec}/umlet.sh" - - (bin/"umlet-#{version}").write_env_script "#{libexec}/umlet.sh", - Language::Java.java_home_env("1.6+") - bin.install_symlink "umlet-#{version}" => "umlet" - end - - test do - system "#{bin}/umlet", "-action=convert", "-format=png", - "-output=#{testpath}/test-output.png", - "-filename=#{libexec}/palettes/Plots.uxf" - end -end diff --git a/Formula/unac.rb b/Formula/unac.rb deleted file mode 100644 index 79f4de8eba6d9..0000000000000 --- a/Formula/unac.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Unac < Formula - desc "C library and command that removes accents from a string" - homepage "https://savannah.nongnu.org/projects/unac" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/unac/unac_1.8.0.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/u/unac/unac_1.8.0.orig.tar.gz" - sha256 "29d316e5b74615d49237556929e95e0d68c4b77a0a0cfc346dc61cf0684b90bf" - - bottle do - cellar :any - sha256 "29753f2d4ea3f9a56f9a3d8fdca4c4fe47044ff1bc986d9ecc06d5f376197da6" => :mojave - sha256 "eade4a2fba6e5828dccd3779b5e6681ca2558dbde421639624f089be835c55e8" => :high_sierra - sha256 "b97f2799eafd917f8fe1cc47c39634bc91a19ca452ce11ec8fd5edf37ea1dba3" => :sierra - sha256 "6c9d63dde182a55e237e63cfa4ab625164ce275e343fd88003483227bd7439bc" => :el_capitan - sha256 "0db9b14eae2c3db5d2d268deb4a3369557a13d35dd216f4ea50aa0776eb56fb3" => :yosemite - sha256 "1fd7af2c4ef86426dc63f80a14076a37ebabced46a572caf1b0e9fe760ab64c1" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - - # configure.ac doesn't properly detect Mac OS's iconv library. This patch fixes that. - patch :DATA - - patch :p0 do - url "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=patch-libunac1.txt;att=1;bug=623340" - sha256 "59e98d779424c17f6549860672085ffbd4dda8961d49eda289aa6835710b91c8" - end - - patch :p0 do - url "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=patch-unaccent.c.txt;att=1;bug=623340" - sha256 "a2fd06151214400ba007ecd2193b07bdfb81f84aa63323ef3e31a196e38afda7" - end - - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/unac/unac_1.8.0-6.diff.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/u/unac/unac_1.8.0-6.diff.gz" - sha256 "13a362f8d682670c71182ab5f0bbf3756295a99fae0d7deb9311e611a43b8111" - end - - def install - chmod 0755, "configure" - touch "config.rpath" - inreplace "autogen.sh", "libtool", "glibtool" - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - # Separate steps to prevent race condition in folder creation - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - assert_equal "foo", shell_output("#{bin}/unaccent utf-8 fóó").strip - end -end - -__END__ -diff --git a/configure.ac b/configure.ac -index 4a4eab6..9f25d50 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -49,6 +49,7 @@ AM_MAINTAINER_MODE - - AM_ICONV - -+LIBS="$LIBS -liconv" - AC_CHECK_FUNCS(iconv_open,,AC_MSG_ERROR([ - iconv_open not found try to install replacement from - http://www.gnu.org/software/libiconv/ diff --git a/Formula/unar.rb b/Formula/unar.rb deleted file mode 100644 index 5915a33d29428..0000000000000 --- a/Formula/unar.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Unar < Formula - desc "Command-line unarchiving tools supporting multiple formats" - homepage "https://unarchiver.c3.cx/commandline" - url "https://wakaba.c3.cx/releases/TheUnarchiver/unar1.10.1_src.zip" - version "1.10.1" - sha256 "40967014a505b7a27864c49dc3b5d30b98ae4e6d4873783b2ef9ef9215fd092b" - head "https://bitbucket.org/WAHa_06x36/theunarchiver", :using => :hg - - bottle do - cellar :any - rebuild 1 - sha256 "da43cef8fa866f3ef1b49207616198f71865a2bd74bea8a4ca6561663c8c5a4a" => :mojave - sha256 "83d44f348e559ec06bea6a5e9d9b50252884b2f9eefda0d0834f4b43f9445049" => :high_sierra - sha256 "26a7dc14db6b28cc896f5692fd1ba6b3434656c80df5e28fecb41dfa952f31d8" => :sierra - end - - depends_on :xcode => :build - - # Fix build for Xcode 10 but remove libstdc++.6.dylib and linking libc++.dylib instead - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/a94f6f/unar/xcode10.diff" - sha256 "d4ac4abe6f6bcc2175efab6be615432b5a8093f8bfc99fba21552bc820b29703" - end - - def install - # ZIP for 1.10.1 additionally contains a `__MACOSX` directory, preventing - # stripping of the first path component during extraction of the archive. - mv Dir["The Unarchiver/*"], "." - - args = %W[ - -project ./XADMaster/XADMaster.xcodeproj - SYMROOT=.. - -configuration Release - MACOSX_DEPLOYMENT_TARGET=#{MacOS.version} - ] - - # Build XADMaster.framework, unar and lsar - xcodebuild "-target", "XADMaster", *args - xcodebuild "-target", "unar", *args - xcodebuild "-target", "lsar", *args - - bin.install "./Release/unar", "./Release/lsar" - lib.install "./Release/libXADMaster.a" - frameworks.install "./Release/XADMaster.framework" - (include/"libXADMaster").install_symlink Dir["#{frameworks}/XADMaster.framework/Headers/*"] - - cd "./Extra" do - man1.install "lsar.1", "unar.1" - bash_completion.install "unar.bash_completion", "lsar.bash_completion" - end - end - - test do - cp prefix/"README.md", "." - system "gzip", "README.md" - assert_equal "README.md.gz: Gzip\nREADME.md\n", shell_output("#{bin}/lsar README.md.gz") - system bin/"unar", "README.md.gz" - assert_predicate testpath/"README.md", :exist? - end -end diff --git a/Formula/unarj.rb b/Formula/unarj.rb deleted file mode 100644 index f16eed00d64c7..0000000000000 --- a/Formula/unarj.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Unarj < Formula - desc "ARJ file archiver" - homepage "http://www.arjsoftware.com/files.htm" - url "https://src.fedoraproject.org/repo/pkgs/unarj/unarj-2.65.tar.gz/c6fe45db1741f97155c7def322aa74aa/unarj-2.65.tar.gz" - sha256 "d7dcc325160af6eb2956f5cb53a002edb2d833e4bb17846669f92ba0ce3f0264" - - bottle do - cellar :any_skip_relocation - sha256 "e7459bb6bae23b6b6b8a7bfcd2a869275903f243e755440709eb5b550783f88a" => :mojave - sha256 "3b7158daf585ed94c61106abb7cbfc956f1a918e4d185ffaa89c755b1c9deba6" => :high_sierra - sha256 "44c4722b1e3d30d987bcbd9fc9ccd7015c54d087bedb7da030e50cc84d0a52e6" => :sierra - sha256 "7bdcd771f852f59915623dae370c8f807cbf20f242dad60d62afa1dc683cdf4a" => :el_capitan - sha256 "95794638930505f1d4a23553571d62de07dd3f62da7687ef571c6f7e893bba42" => :yosemite - sha256 "d81c8d0e7799847d65e8059eee61bb29f9e33ea3ea501465dee0cc7c68f425ff" => :mavericks - sha256 "ec371113bda90ac0f08a58822a6131934f358a10c9bf2a7e09b066827bbe9c62" => :mountain_lion - end - - resource "testfile" do - url "https://s3.amazonaws.com/ARJ/ARJ286.EXE" - sha256 "e7823fe46fd971fe57e34eef3105fa365ded1cc4cc8295ca3240500f95841c1f" - end - - def install - system "make" - bin.mkdir - system "make", "install", "INSTALLDIR=#{bin}" - end - - test do - # Ensure that you can extract ARJ.EXE from a sample self-extracting file - resource("testfile").stage do - system "#{bin}/unarj", "e", "ARJ286.EXE" - assert_predicate Pathname.pwd/"ARJ.EXE", :exist? - end - end -end diff --git a/Formula/unbound.rb b/Formula/unbound.rb deleted file mode 100644 index d9fd97160d0f5..0000000000000 --- a/Formula/unbound.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Unbound < Formula - desc "Validating, recursive, caching DNS resolver" - homepage "https://www.unbound.net" - url "https://nlnetlabs.nl/downloads/unbound/unbound-1.8.3.tar.gz" - sha256 "2b692b8311edfad41e7d0380aac34576060d4176add81dc5db419c79b2a4cecc" - head "https://github.com/NLnetLabs/unbound.git" - - bottle do - sha256 "e21cbf4085644f6fc3b226a3ef03de317834624a45400054b17c7a18799d721d" => :mojave - sha256 "72bd8b7806b868eb355effd760632b7d81b21c31b8b727b4a37b054235aa94ae" => :high_sierra - sha256 "0af6432dd3cab953a253da55ec32e49b05141d27b3c3fedcb522e84d74ca8f9b" => :sierra - end - - depends_on "libevent" - depends_on "openssl" - - def install - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc} - --with-libevent=#{Formula["libevent"].opt_prefix} - --with-ssl=#{Formula["openssl"].opt_prefix} - ] - - args << "--with-libexpat=#{MacOS.sdk_path}/usr" if MacOS.sdk_path_if_needed - system "./configure", *args - - inreplace "doc/example.conf", 'username: "unbound"', 'username: "@@HOMEBREW-UNBOUND-USER@@"' - system "make" - system "make", "test" - system "make", "install" - end - - def post_install - conf = etc/"unbound/unbound.conf" - return unless conf.exist? - return unless conf.read.include?('username: "@@HOMEBREW-UNBOUND-USER@@"') - inreplace conf, 'username: "@@HOMEBREW-UNBOUND-USER@@"', - "username: \"#{ENV["USER"]}\"" - end - - plist_options :startup => true - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - RunAtLoad - - ProgramArguments - - #{opt_sbin}/unbound - -d - -c - #{etc}/unbound/unbound.conf - - UserName - root - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - system sbin/"unbound-control-setup", "-d", testpath - end -end diff --git a/Formula/uncrustify.rb b/Formula/uncrustify.rb deleted file mode 100644 index 56460e838c84c..0000000000000 --- a/Formula/uncrustify.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Uncrustify < Formula - desc "Source code beautifier" - homepage "https://uncrustify.sourceforge.io/" - url "https://github.com/uncrustify/uncrustify/archive/uncrustify-0.68.1.tar.gz" - sha256 "038d371e7fd10feda8a27f663217eac56fd8d78b0650499e3048d544d836571d" - head "https://github.com/uncrustify/uncrustify.git" - - bottle do - cellar :any_skip_relocation - sha256 "fe33a43615dfdb24d4d11cca7e4ba9c8b85dcd679dd52dd074e2d3346dbc90e7" => :mojave - sha256 "70f9b02d6000712c79d2f9236ea5abe9a46756b7b892ee3fd6cb8d8c7e6cc045" => :high_sierra - sha256 "3160bd989bf75c02632ba127547cfac7f93a3ea4e9a415ed8e898615f85f160c" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - doc.install (buildpath/"documentation").children - end - - test do - (testpath/"t.c").write <<~EOS - #include - int main(void) {return 0;} - EOS - expected = <<~EOS - #include - int main(void) { - \treturn 0; - } - EOS - - system "#{bin}/uncrustify", "-c", "#{doc}/htdocs/default.cfg", "t.c" - assert_equal expected, File.read("#{testpath}/t.c.uncrustify") - end -end diff --git a/Formula/uni2ascii.rb b/Formula/uni2ascii.rb deleted file mode 100644 index 825e01e9717fe..0000000000000 --- a/Formula/uni2ascii.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Uni2ascii < Formula - desc "Bi-directional conversion between UTF-8 and various ASCII flavors" - # homepage/url: "the website you are looking for is suspended" - # Switched to Debian mirrors June 2015. - homepage "https://billposer.org/Software/uni2ascii.html" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/uni2ascii/uni2ascii_4.18.orig.tar.gz" - mirror "https://mirrors.kernel.org/debian/pool/main/u/uni2ascii/uni2ascii_4.18.orig.tar.gz" - sha256 "9e24bb6eb2ced0a2945e2dabed5e20c419229a8bf9281c3127fa5993bfa5930e" - - bottle do - cellar :any_skip_relocation - sha256 "97c679d5f838e03832a99e83068eddcddfa5276971f8edcd19b53a33d0179305" => :mojave - sha256 "e95934b7cfcfc96467f1d9d36ec91e04e53fa0edd71f9c0b8aff6e357128de5a" => :high_sierra - sha256 "298ca15b89643dfa4946d485105fed7baa6934556c63d2bf97a3b7af0984c325" => :sierra - sha256 "3cc5e96fa9c49edb0b06d60af238f4a4803feefe22bbf5924698649e8c4db5fb" => :el_capitan - sha256 "0200efd85e37c8c6e2582f82ff8fbb050bba07d31a1bf3720837f5d30da6a54b" => :yosemite - sha256 "b58b9d744048c9e2cc81e75d46c94926d14b2c25a613a05cd0835882221ade7c" => :mavericks - sha256 "fe16b41d049b9dada88474ace55d1155b70afe7b679d323772743a86ec24cb64" => :mountain_lion - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - ENV["MKDIRPROG"]="mkdir -p" - system "make", "install" - end - - test do - # uni2ascii - assert_equal "0x00E9", pipe_output("#{bin}/uni2ascii -q", "é") - - # ascii2uni - assert_equal "e\n", pipe_output("#{bin}/ascii2uni -q", "0x65") - end -end diff --git a/Formula/unibilium.rb b/Formula/unibilium.rb deleted file mode 100644 index debbddc89ae41..0000000000000 --- a/Formula/unibilium.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Unibilium < Formula - desc "Very basic terminfo library" - homepage "https://github.com/mauke/unibilium" - url "https://github.com/mauke/unibilium/archive/v2.0.0.tar.gz" - sha256 "78997d38d4c8177c60d3d0c1aa8c53fd0806eb21825b7b335b1768d7116bc1c1" - - bottle do - cellar :any - sha256 "3886afa29fecdbf2051ae6a92fac638bd27b6edafb75b199e50c0fc6fbf18266" => :mojave - sha256 "5c29d645cd3e0ad950a7054c73b89cb76114b369476eb8bca26587c38571861d" => :high_sierra - sha256 "15338d452e5e09e7b8f3bedd6d557d735d06bfbc53204487d11b6c225a04ad71" => :sierra - sha256 "d8caea872f5f8ed11503e46fc37f17fafbc8a4c64a5382e2bf9e6d84feda2f98" => :el_capitan - end - - depends_on "libtool" => :build - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - setvbuf(stdout, NULL, _IOLBF, 0); - unibi_term *ut = unibi_dummy(); - unibi_destroy(ut); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lunibilium", "-o", "test" - system "./test" - end -end diff --git a/Formula/unicorn.rb b/Formula/unicorn.rb deleted file mode 100644 index 4eea8a80ac3b6..0000000000000 --- a/Formula/unicorn.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Unicorn < Formula - desc "Lightweight multi-architecture CPU emulation framework" - homepage "https://www.unicorn-engine.org/" - url "https://github.com/unicorn-engine/unicorn/archive/1.0.1.tar.gz" - sha256 "3a6a4f2b8c405ab009040ca43af8e4aa10ebe44d9c8b336aa36dc35df955017c" - head "https://github.com/unicorn-engine/unicorn.git" - - bottle do - cellar :any - rebuild 1 - sha256 "78a5143347e18c673a63dc4b171f610499eb728836f20626bd77bc886374b853" => :mojave - sha256 "c44cbb02b8073ca0e70f13cf16272964ab52a8b19a20da07dcfd76c6f15585dd" => :high_sierra - sha256 "8c134f4b88d63da3908d419dd29118d6ada4489091cd53e81cc9a72f28a9760b" => :sierra - end - - depends_on "pkg-config" => :build - - def install - ENV["PREFIX"] = prefix - ENV["UNICORN_ARCHS"] = "x86 x86_64 arm mips aarch64 m64k ppc sparc" - ENV["UNICORN_SHARED"] = "yes" - ENV["UNICORN_DEBUG"] = "no" - system "make" - system "make", "install" - - cd "bindings/python" do - system "python", *Language::Python.setup_install_args(prefix) - end - end - - test do - (testpath/"test1.c").write <<~EOS - /* Adapted from https://www.unicorn-engine.org/docs/tutorial.html - * shamelessly and without permission. This almost certainly needs - * replacement, but for now it should be an OK placeholder - * assertion that the libraries are intact and available. - */ - - #include - - #include - - #define X86_CODE32 "\x41\x4a" - #define ADDRESS 0x1000000 - - int main(int argc, char *argv[]) { - uc_engine *uc; - uc_err err; - int r_ecx = 0x1234; - int r_edx = 0x7890; - - err = uc_open(UC_ARCH_X86, UC_MODE_32, &uc); - if (err != UC_ERR_OK) { - fprintf(stderr, "Failed on uc_open() with error %u.\\n", err); - return -1; - } - uc_mem_map(uc, ADDRESS, 2 * 1024 * 1024, UC_PROT_ALL); - if (uc_mem_write(uc, ADDRESS, X86_CODE32, sizeof(X86_CODE32) - 1)) { - fputs("Failed to write emulation code to memory.\\n", stderr); - return -1; - } - uc_reg_write(uc, UC_X86_REG_ECX, &r_ecx); - uc_reg_write(uc, UC_X86_REG_EDX, &r_edx); - err = uc_emu_start(uc, ADDRESS, ADDRESS + sizeof(X86_CODE32) - 1, 0, 0); - if (err) { - fprintf(stderr, "Failed on uc_emu_start with error %u (%s).\\n", - err, uc_strerror(err)); - return -1; - } - uc_close(uc); - puts("Emulation complete."); - return 0; - } - EOS - system ENV.cc, "-o", testpath/"test1", testpath/"test1.c", - "-lpthread", "-lm", "-L#{lib}", "-lunicorn" - system testpath/"test1" - - system "python", "-c", "import unicorn; print(unicorn.__version__)" - end -end diff --git a/Formula/unifdef.rb b/Formula/unifdef.rb deleted file mode 100644 index 8951a68b63799..0000000000000 --- a/Formula/unifdef.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Unifdef < Formula - desc "Selectively process conditional C preprocessor directives" - homepage "https://dotat.at/prog/unifdef/" - url "https://dotat.at/prog/unifdef/unifdef-2.11.tar.gz" - sha256 "e8483c05857a10cf2d5e45b9e8af867d95991fab0f9d3d8984840b810e132d98" - head "https://github.com/fanf2/unifdef.git" - - bottle do - cellar :any_skip_relocation - sha256 "a4f1251e49839d04791e90a1a6c72d72679ebad399ca8cc184aae7f729ce518e" => :mojave - sha256 "a7e42f5a8e2c467e84dbf9edc4f14cad362850e324088844d6b11f1cae88ce9f" => :high_sierra - sha256 "be948ffc760273a09943faa7c156e4014534da82c78bc2c3c4f2a4a4416e962e" => :sierra - sha256 "a89e5cc9b179fa5135077ad0c27e34cebe13a33dc02adccab4969855ba173357" => :el_capitan - sha256 "3277bf0977c385e3cf5ccf3355e11f30b057c58d8539a27d5a23531ce7de9542" => :yosemite - sha256 "8533d1ce7b70e51256a3c24d557345b7b7ac0b7e6562de5a0f942c058ae518db" => :mavericks - end - - keg_only :provided_by_macos, "the unifdef provided by Xcode cannot compile gevent" - - def install - system "make", "prefix=#{prefix}", "install" - end - - test do - pipe_output("#{bin}/unifdef", "echo ''") - end -end diff --git a/Formula/unison.rb b/Formula/unison.rb deleted file mode 100644 index 3f372ce488491..0000000000000 --- a/Formula/unison.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Unison < Formula - desc "File synchronization tool for OSX" - homepage "https://www.cis.upenn.edu/~bcpierce/unison/" - url "https://github.com/bcpierce00/unison/archive/v2.51.2.tar.gz" - sha256 "a2efcbeab651be6df69cc9b253011a07955ecb91fb407a219719451197849d5e" - - bottle do - cellar :any_skip_relocation - sha256 "55a361bda2f5a43073508d25702eea6b16470f74619e4a6d1058f7fc89f901e5" => :mojave - sha256 "1622a673b2bc8ef6d00dd754c26cfd3d5f737ed1dc48a46bbce486fa0f766181" => :high_sierra - sha256 "fd00605490100ec224f5d86a79da341ce639e1d0772fb48cc133672d1bc2a812" => :sierra - sha256 "53c945e143961a5d158a36980664d5be7153b84074bfa4220eee2db35404b7d3" => :el_capitan - end - - depends_on "ocaml" => :build - - def install - ENV.deparallelize - ENV.delete "CFLAGS" # ocamlopt reads CFLAGS but doesn't understand common options - ENV.delete "NAME" # https://github.com/Homebrew/homebrew/issues/28642 - system "make", "UISTYLE=text" - bin.install "src/unison" - prefix.install_metafiles "src" - end - - test do - assert_match version.to_s, shell_output("#{bin}/unison -version") - end -end diff --git a/Formula/unittest-cpp.rb b/Formula/unittest-cpp.rb deleted file mode 100644 index b25b25865ae5c..0000000000000 --- a/Formula/unittest-cpp.rb +++ /dev/null @@ -1,32 +0,0 @@ -class UnittestCpp < Formula - desc "Unit testing framework for C++" - homepage "https://github.com/unittest-cpp/unittest-cpp" - url "https://github.com/unittest-cpp/unittest-cpp/releases/download/v2.0.0/unittest-cpp-2.0.0.tar.gz" - sha256 "1d1b118518dc200e6b87bbf3ae7bfd00a0cfc6be708255f98e5e3d627a7c9f98" - - bottle do - cellar :any - sha256 "9837dfbba5a3014097d3b406bd48e174a6a788d0c0b3107bd1fabeeb0ce6b89e" => :mojave - sha256 "206f44c35a82fac519b64b8c4ae6bc397e360d8404e8279a24b906d7729efed2" => :high_sierra - sha256 "91d028b464f32fcf6edda6b791be2b70d9b770934edd7af7d2b8ff24e9c5eb06" => :sierra - sha256 "6136d8cdc420681130c59d9f77327ddad6b46a35d29da5be760b522c7456e2a2" => :el_capitan - sha256 "573f6f3a83ba0d2d0e3b54314a5eb93affd11f03bcc409d381ef8253d7e03c4c" => :yosemite - end - - head do - url "https://github.com/unittest-cpp/unittest-cpp.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}", "--disable-silent-rules" - system "make", "install" - end - - test do - assert_match version.to_s, File.read(lib/"pkgconfig/UnitTest++.pc") - end -end diff --git a/Formula/unittest.rb b/Formula/unittest.rb deleted file mode 100644 index 77d64e826a063..0000000000000 --- a/Formula/unittest.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Unittest < Formula - desc "C++ Unit Test Framework" - homepage "http://unittest.red-bean.com/" - url "http://unittest.red-bean.com/tar/unittest-0.50-62.tar.gz" - sha256 "9586ef0149b6376da9b5f95a992c7ad1546254381808cddad1f03768974b165f" - - bottle do - cellar :any_skip_relocation - sha256 "a1ab22f2b4904a5c03ea8642fa096166b9fcc131e535a1d15e07772e1fbcea8d" => :mojave - sha256 "b34ab2aa983e33bf86eda07a58af410a769da7e969620e479c6f7e965de2c397" => :high_sierra - sha256 "c997c9ce2d6984607af24a6dc7dc21ddefc0570a15d2fb61192b3a361120a83d" => :sierra - sha256 "501b61d05de70cfb53116c66daf380cb35a1665eeecf34dfc6b27ab945458f43" => :el_capitan - sha256 "8e26d281818bdf26ae2876004f5388fee9bd954589f57a6a25c979949e5f5bf1" => :yosemite - sha256 "2acbb80540c9ff3c17cf4ab95db16657947761813915a94fa4afc0204e4b09b3" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "test/unittesttest" - end - - test do - system "#{pkgshare}/unittesttest" - end -end diff --git a/Formula/uniutils.rb b/Formula/uniutils.rb deleted file mode 100644 index 5279b23e78e15..0000000000000 --- a/Formula/uniutils.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Uniutils < Formula - desc "Manipulate and analyze Unicode text" - homepage "https://billposer.org/Software/unidesc.html" - url "https://billposer.org/Software/Downloads/uniutils-2.27.tar.gz" - sha256 "c662a9215a3a67aae60510f679135d479dbddaf90f5c85a3c5bab1c89da61596" - - bottle do - cellar :any_skip_relocation - sha256 "2ea235c47ef4ede643ccb1adaccbc376b0cbe39bbdeb3d5623bcbea210cd7519" => :mojave - sha256 "6717501e797865b956ded03f433b9353e033328727bcdd6263b1f3721c8ef30d" => :high_sierra - sha256 "5f6609e92596f48fbb20bd0245437f4e967ebc9d06d9fc5e130584f394dce21a" => :sierra - sha256 "9e83bffe9268c4be17f6e37254da13d2edfeee19869bd075580eeaa8f770078b" => :el_capitan - sha256 "8707e4003370e82a9dc93f928f35f7160b4fa52d6954df916f292020bf9a790b" => :yosemite - end - - # Allow build with clang. This patch was reported to debian here: - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740968 - # And emailed to the upstream source at billposer@alum.mit.edu - patch :DATA - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - s = pipe_output("#{bin}/uniname", "ü") - assert_match /latin small letter u with diaeresis/i, s - end -end - -__END__ -Description: Fix clang FTBFS [-Wreturn-type] -Author: Nicolas Sévelin-Radiguet -Last-Update: 2014-03-06 ---- a/unifuzz.c -+++ b/unifuzz.c -@@ -97,7 +97,7 @@ - } - - /* Emit the middle character from each range */ --EmitAllRanges(short AboveBMPP) { -+void EmitAllRanges(short AboveBMPP) { - int i; - UTF32 scp; - extern int Ranges_Defined; diff --git a/Formula/unixodbc.rb b/Formula/unixodbc.rb deleted file mode 100644 index c53e94562d552..0000000000000 --- a/Formula/unixodbc.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Unixodbc < Formula - desc "ODBC 3 connectivity for UNIX" - homepage "http://www.unixodbc.org/" - url "http://www.unixodbc.org/unixODBC-2.3.7.tar.gz" - sha256 "45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77" - - bottle do - sha256 "c4f375c528496bae444824f4d01922e31a9a8b0c6822cd97da89f5843e740025" => :mojave - sha256 "6f16f12d3463655c3b3fc8251083f77a31b0a690ecf6ac88f4b0daea2f060044" => :high_sierra - sha256 "4cf86c20705681ed7978e0a390d84df26264d1c41b21899e034da47c8e1803ad" => :sierra - sha256 "85be7365deb1229df2f46ccaa71ed1a5f6083135649e42a4b345ce9e55db4140" => :el_capitan - end - - depends_on "libtool" - - keg_only "shadows system iODBC header files" if MacOS.version < :mavericks - - conflicts_with "virtuoso", :because => "Both install `isql` binaries." - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--enable-static", - "--enable-gui=no" - system "make", "install" - end - - test do - system bin/"odbcinst", "-j" - end -end diff --git a/Formula/unnethack.rb b/Formula/unnethack.rb deleted file mode 100644 index 5efa2fc042fcf..0000000000000 --- a/Formula/unnethack.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Unnethack < Formula - desc "Fork of Nethack" - homepage "https://sourceforge.net/projects/unnethack/" - url "https://downloads.sourceforge.net/project/unnethack/unnethack/5.2.0/unnethack-5.2.0.tar.gz" - sha256 "1dc6a47e79229265b14ccb224ef151b2b04b327ab1865ae770078b5e8c724119" - head "https://github.com/UnNetHack/UnNetHack.git" - - bottle do - sha256 "c95ffced18c9be00207e55c4d592f477cd5975fd04412115de66629d74e66088" => :mojave - sha256 "4648259b51fa627ee3ad0ef01b5040e573741f9528385d8c04d8b6354ec745c8" => :high_sierra - sha256 "4ccafeafee0cd1e9cc7705ee312101229748100ea32b5cb1c7c63b29ed1d7742" => :sierra - end - - # directory for temporary level data of running games - skip_clean "var/unnethack/level" - - def install - # directory for version specific files that shouldn't be deleted when - # upgrading/uninstalling - version_specific_directory = "#{var}/unnethack/#{version}" - - args = [ - "--prefix=#{prefix}", - "--with-owner=#{`id -un`}", - "--with-group=admin", - # common xlogfile for all versions - "--enable-xlogfile=#{var}/unnethack/xlogfile", - "--with-bonesdir=#{version_specific_directory}/bones", - "--with-savesdir=#{version_specific_directory}/saves", - "--enable-wizmode=#{`id -un`}", - ] - - system "./configure", *args - ENV.deparallelize # Race condition in make - - # disable the `chgrp` calls - system "make", "install", "CHGRP=#" - end -end diff --git a/Formula/unoconv.rb b/Formula/unoconv.rb deleted file mode 100644 index 4ea0010cdcb33..0000000000000 --- a/Formula/unoconv.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Unoconv < Formula - desc "Convert between any document format supported by OpenOffice" - homepage "http://dag.wiee.rs/home-made/unoconv/" - url "https://files.pythonhosted.org/packages/a2/b8/3131d20bfa2065e489edc7ca2dbfd66fd8d4fcbbde3476c76605a7e69269/unoconv-0.8.2.tar.gz" - sha256 "c7091a409384c05b3509b18be6c8d7059d26f491dfa78660ecdfbde3e72b03be" - revision 1 - head "https://github.com/dagwieers/unoconv.git" - - bottle do - cellar :any_skip_relocation - sha256 "07a0230f3b34e5d3566bf167320563d7923deb380e78c6d8380f7f2b56f0b50b" => :mojave - sha256 "af451c29611a9fed41fb2b68984a20f80ff9a812a23c28233878ee84fb8dc208" => :high_sierra - sha256 "af451c29611a9fed41fb2b68984a20f80ff9a812a23c28233878ee84fb8dc208" => :sierra - end - - depends_on "python" - - def install - system "make", "install", "prefix=#{prefix}" - end - - def caveats; <<~EOS - In order to use unoconv, a copy of LibreOffice between versions 3.6.0.1 - 4.3.x must be installed. - EOS - end -end diff --git a/Formula/unp.rb b/Formula/unp.rb deleted file mode 100644 index c211cd12ce2f0..0000000000000 --- a/Formula/unp.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Unp < Formula - desc "Unpack everything with one command" - homepage "https://packages.debian.org/source/stable/unp" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2" - version "2.0-pre7-nmu1" - sha256 "7c2d6f2835a5a59ee2588b66d8015d97accd62e71e38ba90ebd4d71d8fd78227" - - bottle :unneeded - - depends_on "p7zip" - - def install - bin.install %w[unp ucat] - man1.install "debian/unp.1" - bash_completion.install "bash_completion.d/unp" - %w[COPYING CHANGELOG].each { |f| rm f } - mv "debian/README.Debian", "README" - mv "debian/copyright", "COPYING" - mv "debian/changelog", "ChangeLog" - end - - test do - path = testpath/"test" - path.write "Homebrew" - system "gzip", "test" - system "#{bin}/unp", "test.gz" - assert_equal "Homebrew", path.read - end -end diff --git a/Formula/unp64.rb b/Formula/unp64.rb deleted file mode 100644 index 2c0bb1d20b8c7..0000000000000 --- a/Formula/unp64.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Unp64 < Formula - desc "Generic C64 prg unpacker," - homepage "http://iancoog.altervista.org/" - url "http://iancoog.altervista.org/C/unp64_235_src.tar.bz2" - version "2.35" - sha256 "763713b1933374173f71465fb8e33b3124d84b5fd96e560dbb4edf076bdfeb65" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "8ea046591c46ac09c3b1d82e1143a19ed8aa0143526e982efaed503ba8391a78" => :mojave - sha256 "3bb668767bea20f8002928722f6b05c1394965688bafa22c38cff72f3d160fea" => :high_sierra - sha256 "0693a0f4eda10e575321a8e39a0dc5fdbc9efb796c77b51e6b144c2573fddec8" => :sierra - end - - def install - cd "src" - system "make", "unp64" - bin.install "Release/unp64" - end - - test do - code = [0x00, 0xc0, 0x4c, 0xe2, 0xfc] - File.open(testpath/"a.prg", "wb") do |output| - output.write [code.join].pack("H*") - end - - output = shell_output("#{bin}/unp64 -i a.prg 2>&1") - assert_match "a.prg : (Unknown)", output - end -end diff --git a/Formula/unpaper.rb b/Formula/unpaper.rb deleted file mode 100644 index 555579c5929be..0000000000000 --- a/Formula/unpaper.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Unpaper < Formula - desc "Post-processing for scanned/photocopied books" - homepage "https://www.flameeyes.eu/projects/unpaper" - url "https://www.flameeyes.eu/files/unpaper-6.1.tar.xz" - sha256 "237c84f5da544b3f7709827f9f12c37c346cdf029b1128fb4633f9bafa5cb930" - revision 2 - - bottle do - cellar :any - sha256 "255eef39573324e6772fcbb69d2f6567b4230152f55ffa6b545b41fd81d8a7ac" => :mojave - sha256 "064acb1292a5a948eb3963be07c400d8fe0e7fa008afec78bfdd659392e45871" => :high_sierra - sha256 "f35014bc991ee89bc5af4a4f25034bf525220a13a8925518424a5a423273a1cc" => :sierra - sha256 "743399859c237fb673ee9dec339d660215d92db2383f31c3208f726116adeb1d" => :el_capitan - end - - head do - url "https://github.com/Flameeyes/unpaper.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "ffmpeg" - - def install - system "autoreconf", "-i" if build.head? - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.pbm").write <<~EOS - P1 - 6 10 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 0 0 0 0 1 0 - 1 0 0 0 1 0 - 0 1 1 1 0 0 - 0 0 0 0 0 0 - 0 0 0 0 0 0 - EOS - system bin/"unpaper", testpath/"test.pbm", testpath/"out.pbm" - assert_predicate testpath/"out.pbm", :exist? - end -end diff --git a/Formula/unrar.rb b/Formula/unrar.rb deleted file mode 100644 index 1527a7640b00e..0000000000000 --- a/Formula/unrar.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Unrar < Formula - desc "Extract, view, and test RAR archives" - homepage "https://www.rarlab.com/" - url "https://www.rarlab.com/rar/unrarsrc-5.6.8.tar.gz" - sha256 "a4cc0ac14a354827751912d2af4a0a09e2c2129df5766576fa7e151791dd3dff" - - bottle do - cellar :any - sha256 "7e0be06e3eaff12ffe15077e7cba64e28724455fd0610181682ea758d4061fa2" => :mojave - sha256 "5c95916f59938cdf07802ffbf0bf4aa6bac7f052b9911ecfff7281f6cdb924e7" => :high_sierra - sha256 "63beb3bbeb7661646a1c11700f86273c51ba810a3e9e6accd3b6d68d91d30560" => :sierra - end - - def install - # upstream doesn't particularly care about their unix targets, - # so we do the dirty work of renaming their shared objects to - # dylibs for them. - inreplace "makefile", "libunrar.so", "libunrar.dylib" - - system "make" - # Explicitly clean up for the library build to avoid an issue with an - # apparent implicit clean which confuses the dependencies. - system "make", "clean" - system "make", "lib" - - bin.install "unrar" - lib.install "libunrar.dylib" - end - - test do - contentpath = "directory/file.txt" - rarpath = testpath/"archive.rar" - data = "UmFyIRoHAM+QcwAADQAAAAAAAACaCHQggDIACQAAAAkAAAADtPej1LZwZE" \ - "QUMBIApIEAAGRpcmVjdG9yeVxmaWxlLnR4dEhvbWVicmV3CsQ9ewBABwA=" - - rarpath.write data.unpack("m").first - assert_equal contentpath, `#{bin}/unrar lb #{rarpath}`.strip - assert_equal 0, $CHILD_STATUS.exitstatus - - system "#{bin}/unrar", "x", rarpath, testpath - assert_equal "Homebrew\n", (testpath/contentpath).read - end -end diff --git a/Formula/unravel.rb b/Formula/unravel.rb deleted file mode 100644 index 033206ead2fc5..0000000000000 --- a/Formula/unravel.rb +++ /dev/null @@ -1,36 +0,0 @@ -require "language/node" - -class Unravel < Formula - desc "Command-line client for Clojure REPLs" - homepage "https://github.com/pesterhazy/unravel" - url "https://github.com/pesterhazy/unravel/archive/0.2.2.tar.gz" - sha256 "144b2a96dc5900dada9e668f765ac63d55b97770525f1c994b8b41084048a9cc" - - bottle do - cellar :any_skip_relocation - sha256 "fc60902e32d40beca8a58844d98e27d9fe45cb735154dd88d492ba243a9753da" => :mojave - sha256 "ea6f701ccd6c808661420c77e5c2b2b73b3b3a3a646f18e91e235c3c3843a560" => :high_sierra - sha256 "9110d228db2cf18125861f289705c135fc7c5ac9b3ebdd01aa69726d7b758ed3" => :sierra - sha256 "34d1aca980ed2894b743656b271aa42a36b69a4828763c1c1c5ded1638110570" => :el_capitan - end - - depends_on "lumo" - depends_on "node" - - def install - # This is installed by Homebrew - inreplace "package.json", /"lumo-cljs": ".+?",/, "" - inreplace "bin/unravel", - '"${UNRAVEL_HOME}/node_modules/lumo-cljs/bin/lumo"', "lumo" - - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - - (bin/"unravel").write_env_script libexec/"bin/unravel", - :UNRAVEL_HOME => libexec/"lib/node_modules/unravel-repl" - end - - test do - # We'd need a REPL to connect to in order to have a proper test - assert_match "Socket error", shell_output("#{bin}/unravel localhost 1", 1) - end -end diff --git a/Formula/unrtf.rb b/Formula/unrtf.rb deleted file mode 100644 index b22596d766170..0000000000000 --- a/Formula/unrtf.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Unrtf < Formula - desc "RTF to other formats converter" - homepage "https://www.gnu.org/software/unrtf/" - url "https://ftp.gnu.org/gnu/unrtf/unrtf-0.21.9.tar.gz" - mirror "https://ftpmirror.gnu.org/unrtf/unrtf-0.21.9.tar.gz" - sha256 "22a37826f96d754e335fb69f8036c068c00dd01ee9edd9461a36df0085fb8ddd" - head "https://hg.savannah.gnu.org/hgweb/unrtf/", :using => :hg - - bottle do - sha256 "2185683e84438c36ba6297451d786490712c60e0251f84985e8a2c5bcbdb4a49" => :mojave - sha256 "20b25e70ca6dce766d851b7bafef64adf81633ff8cf6cb5ed97c70a4abbc3c60" => :high_sierra - sha256 "6d305effeb3f7b8196db7c0746c2efb3170a809186916d7380ee35390cc9786b" => :sierra - sha256 "2d658e54c0f66ae90764c8588fa7181c68d69d505336747b9bd5e496ba7b99d6" => :el_capitan - sha256 "42737f31a7ea06592c2ad22a48f0e2537c0cd025129870399bd4f0fbe7362a98" => :yosemite - sha256 "852bd896c8537489400e646ed41f2876079e124203e493cfc1e2d7f51d024726" => :mavericks - sha256 "7e680da7a4c4da9ed3b21f04e5125721cf506cc9579a2e95b4635078b0606cb2" => :mountain_lion - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./bootstrap" - system "./configure", "LIBS=-liconv", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.rtf").write <<~'EOS' - {\rtf1\ansi - {\b hello} world - } - EOS - expected = <<~EOS - - - - - - - hello world - - EOS - assert_equal expected, shell_output("#{bin}/unrtf --html test.rtf") - end -end diff --git a/Formula/unshield.rb b/Formula/unshield.rb deleted file mode 100644 index e82f0f561800c..0000000000000 --- a/Formula/unshield.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Unshield < Formula - desc "Extract files from InstallShield cabinet files" - homepage "https://github.com/twogood/unshield" - url "https://github.com/twogood/unshield/archive/1.4.3.tar.gz" - sha256 "aa8c978dc0eb1158d266eaddcd1852d6d71620ddfc82807fe4bf2e19022b7bab" - head "https://github.com/twogood/unshield.git" - - bottle do - sha256 "8573268732d26e07b72ea5f7fce96a3826be475e91648610a89b5cf2a0a12f98" => :mojave - sha256 "a5fadd49dbea41adc48b239cae345a7befdc04b897c66edea379b9c737c935c2" => :high_sierra - sha256 "1bfb2381721e5ce11c80a0b828ccbabd4550f3aee1671d4027fb98c4c2869721" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"unshield", "-V" - end -end diff --git a/Formula/unyaffs.rb b/Formula/unyaffs.rb deleted file mode 100644 index a63ebb9b706ed..0000000000000 --- a/Formula/unyaffs.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Unyaffs < Formula - desc "Extract files from a YAFFS2 filesystem image" - homepage "https://github.com/ehlers/unyaffs" - url "https://github.com/ehlers/unyaffs/archive/0.9.7.tar.gz" - sha256 "099ee9e51046b83fe8555d7a6284f6fe4fbae96be91404f770443d8129bd8775" - head "https://github.com/ehlers/unyaffs.git" - - bottle do - cellar :any_skip_relocation - sha256 "40557f6cfcea6b1d9528c29f4f4bd1f55272f83e1ff6bbcb4a2b8b9fa39e6b6d" => :mojave - sha256 "a5782b3ff1d562df3fc65956293b9fe51e8d75f1c746b0fd62e1b6dd99573ef5" => :high_sierra - sha256 "75da4c47cc7a56283d88fc1438a8a91a4d3d4c0e40c3a6e6f228ec69de33c205" => :sierra - sha256 "fe8c38e3c09223e9cea5b052a4774b7e502b0a057101c788629727cbf942b786" => :el_capitan - end - - def install - system "make" - bin.install "unyaffs" - end - - test do - assert_match version.to_s, shell_output("#{bin}/unyaffs -V") - end -end diff --git a/Formula/unzip.rb b/Formula/unzip.rb deleted file mode 100644 index 25fb50d0c16b9..0000000000000 --- a/Formula/unzip.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Unzip < Formula - desc "Extraction utility for .zip compressed archives" - homepage "https://infozip.sourceforge.io/UnZip.html" - url "https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz" - version "6.0" - sha256 "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "ac4f4f1d2450f39747f0def0c33230015688d2223dcc64a73b7c52e545f7072c" => :mojave - sha256 "c69a3531f5c1c834132c89124e11e580cb052870515875240f035dd471977893" => :high_sierra - sha256 "72cf9820bc8fe8c008bdb1cf7b231afbb0bc6b48511f4d40e5e4840f5bb5df65" => :sierra - sha256 "8a2bfa62e728c9a9bc44d7acb9f34698e599b47f8200c45290b62502c682a6ec" => :el_capitan - sha256 "3c69150f5a9ad6d1d1737eb17c06315dd7d0bc02b9c1a11e02ecb281c1e5f37f" => :yosemite - end - - keg_only :provided_by_macos - - # Upstream is unmaintained so we use the Debian patchset: - # https://packages.debian.org/sid/unzip - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/unzip/unzip_6.0-21.debian.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/u/unzip/unzip_6.0-21.debian.tar.xz" - sha256 "8accd9d214630a366476437a3ec1842f2e057fdce16042a7b19ee569c33490a3" - apply %w[ - patches/01-manpages-in-section-1-not-in-section-1l.patch - patches/02-this-is-debian-unzip.patch - patches/03-include-unistd-for-kfreebsd.patch - patches/04-handle-pkware-verification-bit.patch - patches/05-fix-uid-gid-handling.patch - patches/06-initialize-the-symlink-flag.patch - patches/07-increase-size-of-cfactorstr.patch - patches/08-allow-greater-hostver-values.patch - patches/09-cve-2014-8139-crc-overflow.patch - patches/10-cve-2014-8140-test-compr-eb.patch - patches/11-cve-2014-8141-getzip64data.patch - patches/12-cve-2014-9636-test-compr-eb.patch - patches/13-remove-build-date.patch - patches/14-cve-2015-7696.patch - patches/15-cve-2015-7697.patch - patches/16-fix-integer-underflow-csiz-decrypted.patch - patches/17-restore-unix-timestamps-accurately.patch - patches/18-cve-2014-9913-unzip-buffer-overflow.patch - patches/19-cve-2016-9844-zipinfo-buffer-overflow.patch - ] - end - - def install - system "make", "-f", "unix/Makefile", - "CC=#{ENV.cc}", - "LOC=-DLARGE_FILE_SUPPORT", - "D_USE_BZ2=-DUSE_BZIP2", - "L_BZ2=-lbz2", - "macosx", - "LFLAGS1=-liconv" - system "make", "prefix=#{prefix}", "MANDIR=#{man1}", "install" - end - - test do - (testpath/"test1").write "Hello!" - (testpath/"test2").write "Bonjour!" - (testpath/"test3").write "Hej!" - - system "/usr/bin/zip", "test.zip", "test1", "test2", "test3" - %w[test1 test2 test3].each do |f| - rm f - refute_predicate testpath/f, :exist?, "Text files should have been removed!" - end - - system bin/"unzip", "test.zip" - %w[test1 test2 test3].each do |f| - assert_predicate testpath/f, :exist?, "Failure unzipping test.zip!" - end - - assert_match "Hello!", File.read(testpath/"test1") - assert_match "Bonjour!", File.read(testpath/"test2") - assert_match "Hej!", File.read(testpath/"test3") - end -end diff --git a/Formula/up.rb b/Formula/up.rb deleted file mode 100644 index 577ee111a81ab..0000000000000 --- a/Formula/up.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Up < Formula - desc "Tool for writing command-line pipes with instant live preview" - homepage "https://github.com/akavel/up" - url "https://github.com/akavel/up/archive/v0.3.2.tar.gz" - sha256 "359510cfea8af8f14de39d63f63cc5c765f681cca2c37f00174837d52c62cad1" - - bottle do - cellar :any_skip_relocation - sha256 "0c453761279cdc6a995ae471841b2e8513215c3d30f4f448c3cf82f548376fa5" => :mojave - sha256 "f9ea40f11e458e2bda259fa428a9f390d9a9efce1d7983f9325eda17b4655501" => :high_sierra - sha256 "558f89d83bd23a28ef31a1d72f7749521f68ebf0d767a8cffb2c6b9311461e13" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - dir = buildpath/"src/github.com/akavel/up" - dir.install buildpath.children - - cd dir do - system "go", "build", "-o", bin/"up", "up.go" - prefix.install_metafiles - end - end - - test do - shell_output("#{bin}/up --debug 2&>1", 1) - assert_predicate testpath/"up.debug", :exist?, "up.debug not found" - assert_includes File.read(testpath/"up.debug"), "checking $SHELL" - end -end diff --git a/Formula/upscaledb.rb b/Formula/upscaledb.rb deleted file mode 100644 index 4a12530bc758c..0000000000000 --- a/Formula/upscaledb.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Upscaledb < Formula - desc "Database for embedded devices" - homepage "https://upscaledb.com/" - revision 10 - - stable do - url "http://files.upscaledb.com/dl/upscaledb-2.2.0.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/upscaledb-2.2.0.tar.gz" - sha256 "7d0d1ace47847a0f95a9138637fcaaf78b897ef682053e405e2c0865ecfd253e" - - # Remove for > 2.2.2 - # Upstream commit from 12 Feb 2018 "Fix compilation with Boost 1.66 (#110)" - patch do - url "https://github.com/cruppstahl/upscaledb/commit/01156f9a8.patch?full_index=1" - sha256 "e65b9f2b624b7cdad00c3c1444721cadd615688556d8f0bb389d15f5f5f4f430" - end - end - - bottle do - cellar :any - sha256 "5795b13d05e078ccc9e8474cad0af6f4f4bdaf689b5e85142548dd0c02a79482" => :mojave - sha256 "ad0b6887fa34cfc4c5176bae916d93328e051e2446965889543062785569bf90" => :high_sierra - sha256 "3c171ea5437d86b084663145ab8ef0135d85a8032e98f94f945ee3300156f31c" => :sierra - end - - head do - url "https://github.com/cruppstahl/upscaledb.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "boost" - depends_on "gnutls" - depends_on :java - depends_on "openssl" - depends_on "protobuf" - - fails_with :clang do - build 503 - cause "error: member access into incomplete type 'const std::type_info" - end - - resource "libuv" do - url "https://github.com/libuv/libuv/archive/v0.10.37.tar.gz" - sha256 "4c12bed4936dc16a20117adfc5bc18889fa73be8b6b083993862628469a1e931" - end - - def install - # Fix collision with isset() in - # See https://github.com/Homebrew/homebrew-core/pull/4145 - inreplace "./src/5upscaledb/upscaledb.cc", - "# include \"2protobuf/protocol.h\"", - "# include \"2protobuf/protocol.h\"\n#define isset(f, b) (((f) & (b)) == (b))" - - system "./bootstrap.sh" if build.head? - - resource("libuv").stage do - system "make", "libuv.dylib", "SO_LDFLAGS=-Wl,-install_name,#{libexec}/libuv/lib/libuv.dylib" - (libexec/"libuv/lib").install "libuv.dylib" - (libexec/"libuv").install "include" - end - - ENV.prepend "LDFLAGS", "-L#{libexec}/libuv/lib" - ENV.prepend "CFLAGS", "-I#{libexec}/libuv/include" - ENV.prepend "CPPFLAGS", "-I#{libexec}/libuv/include" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "JDK=#{ENV["JAVA_HOME"]}" - system "make", "install" - - pkgshare.install "samples" - end - - test do - system ENV.cc, "-I#{include}", "-L#{lib}", "-lupscaledb", - pkgshare/"samples/db1.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/uptimed.rb b/Formula/uptimed.rb deleted file mode 100644 index 43b2a77a4b932..0000000000000 --- a/Formula/uptimed.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Uptimed < Formula - desc "Utility to track your highest uptimes" - homepage "https://github.com/rpodgorny/uptimed/" - url "https://github.com/rpodgorny/uptimed/archive/v0.4.1.tar.gz" - sha256 "01b16519bbdd3b99c97a09e910b74e4dceb5eea74e3ab20b6c90c76c8cb55905" - - bottle do - sha256 "607e02ebcebdeb8413890a529bc3b2a74e886dc8ba530b87be890519e8c3a8f4" => :mojave - sha256 "7dda8cf4cbda86ba76db57c3352b916726da78640e656c49edf5c8b63441a817" => :high_sierra - sha256 "01e1e14e4af2adc149ef379042fbb223fd9ce27fbc7f2b0e4711088c90bf9dd1" => :sierra - sha256 "9b0d74450aa29f5fbbc1f6d2749b9d35c9af37e4594c88b53bb4c950a7c4c73b" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - # Per MacPorts - inreplace "Makefile", "/var/spool/uptimed", "#{var}/uptimed" - inreplace "libuptimed/urec.h", "/var/spool", var - inreplace "etc/uptimed.conf-dist", "/var/run", "#{var}/uptimed" - system "make", "install" - end - - plist_options :manual => "uptimed" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - WorkingDirectory - #{opt_prefix} - ProgramArguments - - #{opt_sbin}/uptimed - -f - -p - #{var}/run/uptimed.pid - - - - EOS - end - - test do - system "#{sbin}/uptimed", "-t", "0" - sleep 2 - output = shell_output("#{bin}/uprecords -s") - assert_match /->\s+\d+\s+\d+\w,\s+\d+:\d+:\d+\s+|.*/, output, "Uptime returned is invalid" - end -end diff --git a/Formula/upx.rb b/Formula/upx.rb deleted file mode 100644 index b75dcae618d9d..0000000000000 --- a/Formula/upx.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Upx < Formula - desc "Compress/expand executable files" - homepage "https://upx.github.io/" - head "https://github.com/upx/upx.git", :branch => "devel" - - stable do - url "https://github.com/upx/upx/archive/v3.95.tar.gz" - sha256 "fdb79c8238360115770e9c13bdaeb48da6fb09c813b0a461c5f9faee176d6fb9" - - # This can be removed, along with the two patches, when switching back to - # the release tarball rather than the archive tarball. This should be - # done on the next stable release. - resource "lzma-sdk" do - url "https://github.com/upx/upx-lzma-sdk/archive/v3.95.tar.gz" - sha256 "4932ed7b79cf47aa91fe737c068f74553e17033161c7e7e532e4b967f02f1557" - end - - # Patch required due to 3.95 MacOS bug https://github.com/upx/upx/issues/218 - # and ought to be included in the next release - patch do - url "https://github.com/upx/upx/commit/0dac6b7be3339ac73051d40ed4d268cd2bb0dc7c.patch?full_index=1" - sha256 "957de8bab55bb71156a1ae59fa66c67636acd265a4c6fa43d12e8793bafebb22" - end - - # https://github.com/Homebrew/homebrew-core/pull/31846#issuecomment-419750313 - patch do - url "https://github.com/upx/upx/commit/9bb6854e642a2505102b9d3f9ec8535ec8ab6d9c.patch?full_index=1" - sha256 "f525a574b65e6484f0eb29e2a37d5df58da85b121adec06271b19ed5f4cc49b4" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "b54c2ee46e440481f780d3e6abb7cb3c1b8fe1e19de5b34dec4964d5a3c9f444" => :mojave - sha256 "9c9c64af53571828b5315dc247885f6f14dc250088d24d2e22c8ec431102b1c4" => :high_sierra - sha256 "21086139ffa7f4d7012f046182a04baebb7afc0bb434f5a59f5636875389afbb" => :sierra - sha256 "7410cdbfca2b1d0fa0fe58abd4b0aa22c158d77667b7aa9b04ff6c58f02d1cab" => :el_capitan - end - - depends_on "ucl" - - def install - (buildpath/"src/lzma-sdk").install resource("lzma-sdk") if build.stable? - system "make", "all" - bin.install "src/upx.out" => "upx" - man1.install "doc/upx.1" - end - - test do - cp "#{bin}/upx", "." - chmod 0755, "./upx" - - system "#{bin}/upx", "-1", "./upx" - system "./upx", "-V" # make sure the binary we compressed works - system "#{bin}/upx", "-d", "./upx" - end -end diff --git a/Formula/urbit.rb b/Formula/urbit.rb deleted file mode 100644 index 3459f06bc7bb5..0000000000000 --- a/Formula/urbit.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Urbit < Formula - desc "Personal cloud computer" - homepage "https://urbit.org" - url "https://github.com/urbit/urbit.git", - :tag => "urbit-0.6.0", - :revision => "7633b5cc9cf249d873f16f08c09a1ee10a4f24d2" - - bottle do - rebuild 1 - sha256 "d8b27d852fa3508ce51c34ec4a66f885449a2c4b0a2b8cbfe6b31ed580dcceaa" => :mojave - sha256 "b13f985e22cb451d6bd2bf0060b0d106f706550100805388bc295d0553a4272e" => :high_sierra - sha256 "b983f7e4aa657b96409603575589f3c411cf639c93586930b796ac278ad6e3ac" => :sierra - sha256 "02b46f9c7977498538159ecfbcb394a7b5cf77a6a547676534c8fd04a6d0e987" => :el_capitan - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on "libsigsegv" - depends_on "libuv" - depends_on "openssl" - depends_on "re2c" - - def install - system "./scripts/build" - bin.install "build/urbit" - end - - test do - assert_match "Development Usage:", shell_output("#{bin}/urbit 2>&1", 1) - end -end diff --git a/Formula/urdfdom.rb b/Formula/urdfdom.rb deleted file mode 100644 index ecf46230c8205..0000000000000 --- a/Formula/urdfdom.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Urdfdom < Formula - desc "Unified Robot Description Format (URDF) parser" - homepage "https://wiki.ros.org/urdf/" - url "https://github.com/ros/urdfdom/archive/1.0.0.tar.gz" - sha256 "243ea925d434ebde0f9dee35ee5615ecc2c16151834713a01f85b97ac25991e1" - revision 1 - - bottle do - cellar :any - sha256 "0d9948da11cd8e1d0f5d90ce33362d6bf8ca24cbe412c0673b5d23790abc8148" => :mojave - sha256 "ffe532a4d96689d515b46ac589afbb9e071a463250e65bbd9453d2db7e8e9eee" => :high_sierra - sha256 "8d4a25f145f4522f14b5085fdc7c3f6182237ee472a1b51e31e0093371f68acd" => :sierra - sha256 "03be42a92fe4a40b03ff648b45393ad6ca4db533286bdff32e3837862a326a1e" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "console_bridge" - depends_on "tinyxml" - depends_on "urdfdom_headers" - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - std::string xml_string = - "" - " " - " " - " "; - urdf::parseURDF(xml_string); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lurdfdom_world", "-std=c++11", - "-o", "test" - system "./test" - end -end diff --git a/Formula/urdfdom_headers.rb b/Formula/urdfdom_headers.rb deleted file mode 100644 index 385ed54cc0e6e..0000000000000 --- a/Formula/urdfdom_headers.rb +++ /dev/null @@ -1,37 +0,0 @@ -class UrdfdomHeaders < Formula - desc "Headers for Unified Robot Description Format (URDF) parsers" - homepage "https://wiki.ros.org/urdfdom_headers/" - url "https://github.com/ros/urdfdom_headers/archive/1.0.2.tar.gz" - sha256 "28d488d4a1542c427f09df23d443655db50405406f7b8e313eb0de499ce6b163" - - bottle do - cellar :any_skip_relocation - sha256 "bddc8c1985d764bee36ee25db4b3c18fe45b8de0f113875a3085489f3cd50d1d" => :mojave - sha256 "9757800f4153efd48e5d77b3548da9a4b854165376eed6d541897f120a3d7da5" => :high_sierra - sha256 "9757800f4153efd48e5d77b3548da9a4b854165376eed6d541897f120a3d7da5" => :sierra - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - double quat[4]; - urdf::Rotation rot; - rot.getQuaternion(quat[0], quat[1], quat[2], quat[3]); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-o", "test" - system "./test" - end -end diff --git a/Formula/urh.rb b/Formula/urh.rb deleted file mode 100644 index 78bbf929d423f..0000000000000 --- a/Formula/urh.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Urh < Formula - desc "Universal Radio Hacker" - homepage "https://github.com/jopohl/urh" - url "https://files.pythonhosted.org/packages/81/29/8ffecf5a0d99bef5a4463fd9dbea537e119562737aaac10b1997da135d5d/urh-2.2.3.tar.gz" - sha256 "9867398e94b1c05a227fa2a5765cfbf7fda6327600a2e50f612988063d05ee1d" - revision 3 - head "https://github.com/jopohl/urh.git" - - bottle do - sha256 "fec9b7d41d20bd4ba98e28ffb78c9113cfaf31fd592f478aa98c8d4082b53371" => :mojave - sha256 "aaacecdabc58fdd199c2259935010d065d10bb913d659747168758ca02eddfaf" => :high_sierra - sha256 "6af1143085602e2abe23491d08b5ab85482c09b3f40d07f97926499b3b73f2ab" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "hackrf" - depends_on "numpy" - depends_on "pyqt" - depends_on "python" - depends_on "zeromq" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/d2/12/8ef44cede251b93322e8503fd6e1b25a0249fa498bebec191a5a06adbe51/Cython-0.28.4.tar.gz" - sha256 "76ac2b08d3d956d77b574bb43cbf1d37bd58b9d50c04ba281303e695854ebc46" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/51/9e/0f8f5423ce28c9109807024f7bdde776ed0b1161de20b408875de7e030c3/psutil-5.4.6.tar.gz" - sha256 "686e5a35fe4c0acc25f3466c32e716f2d498aaae7b7edc03e2305b682226bcf6" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/aa/fd/f2e65a05558ff8b58b71404efc79c2b03cef922667260e1d703896597b93/pyzmq-17.1.0.tar.gz" - sha256 "2199f753a230e26aec5238b0518b036780708a4c887d4944519681a920b9dee4" - end - - def install - # Workaround for https://github.com/Homebrew/brew/issues/932 - ENV.delete "PYTHONPATH" - # suppress urh warning about needing to recompile the c++ extensions - inreplace "src/urh/main.py", "GENERATE_UI = True", "GENERATE_UI = False" - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - next if r.name == "Cython" - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - saved_python_path = ENV["PYTHONPATH"] - ENV.prepend_create_path "PYTHONPATH", buildpath/"cython/lib/python#{xy}/site-packages" - - resource("Cython").stage do - system "python3", *Language::Python.setup_install_args(buildpath/"cython") - end - - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => saved_python_path) - end - - test do - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - (testpath/"test.py").write <<~EOS - from urh.util.GenericCRC import GenericCRC; - c = GenericCRC(); - expected = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0] - assert(expected == c.crc([0, 1, 0, 1, 1, 0, 1, 0]).tolist()) - EOS - system "python3", "test.py" - end -end diff --git a/Formula/uriparser.rb b/Formula/uriparser.rb deleted file mode 100644 index ef2c01db11b4d..0000000000000 --- a/Formula/uriparser.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Uriparser < Formula - desc "URI parsing library (strictly RFC 3986 compliant)" - homepage "https://uriparser.github.io/" - url "https://github.com/uriparser/uriparser/releases/download/uriparser-0.9.1/uriparser-0.9.1.tar.bz2" - sha256 "75248f3de3b7b13c8c9735ff7b86ebe72cbb8ad043291517d7d53488e0893abe" - - bottle do - cellar :any - sha256 "69c5e0b1aad68761b9737618740c57339c06fa5b33ca42f8739af1e795cc6645" => :mojave - sha256 "aecf626254251f0f3eecca369bf8cda28f530a14bdf2bb493063a8eb78b402bc" => :high_sierra - sha256 "0657e76e94b481bc0b859ba68b8e31d460dce44e7ec3fcc573cb5bfd6bb89839" => :sierra - end - - head do - url "https://github.com/uriparser/uriparser.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - conflicts_with "libkml", :because => "both install `liburiparser.dylib`" - - resource "gtest" do - url "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" - sha256 "9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c" - end - - def install - (buildpath/"gtest").install resource("gtest") - (buildpath/"gtest/googletest").cd do - system "cmake", "." - system "make" - end - ENV["GTEST_CFLAGS"] = "-I./gtest/googletest/include" - ENV["GTEST_LIBS"] = "-L./gtest/googletest/ -lgtest" - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-doc" - system "make", "check" - system "make", "install" - end - - test do - expected = <<~EOS - uri: https://brew.sh - scheme: https - hostText: brew.sh - absolutePath: false - (always false for URIs with host) - EOS - assert_equal expected, shell_output("#{bin}/uriparse https://brew.sh").chomp - end -end diff --git a/Formula/urlview.rb b/Formula/urlview.rb deleted file mode 100644 index 1b9374aad8cb6..0000000000000 --- a/Formula/urlview.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Urlview < Formula - desc "URL extractor/launcher" - homepage "https://packages.debian.org/sid/misc/urlview" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/urlview/urlview_0.9.orig.tar.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/u/urlview/urlview_0.9.orig.tar.gz" - version "0.9-20" - sha256 "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42" - - bottle do - cellar :any_skip_relocation - sha256 "82e4e63f3439db87bc1f1f4b51d9ff7298a69c610e726a56b5ede58463975b59" => :mojave - sha256 "ded9ca6285a2c87ecfe9af130e5bc231adfa501c2aae5602c13f40b998077f6a" => :high_sierra - sha256 "0f75c9a2a4018f9bac7262314a9f391c63353abd707f820b92a389b21bbf08b8" => :sierra - sha256 "f748da269d23717c525cc0272bf90a1c286a16aaa868d9433505f6a72d28bfed" => :el_capitan - end - - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/u/urlview/urlview_0.9-20.diff.gz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/u/urlview/urlview_0.9-20.diff.gz" - sha256 "0707956fd7195aefe6d6ff2eaabe8946e3d18821a1ce97c0f48d0f8d6e37514e" - end - - def install - inreplace "urlview.man", "/etc/urlview/url_handler.sh", "open" - inreplace "urlview.c", - '#define DEFAULT_COMMAND "/etc/urlview/url_handler.sh %s"', - '#define DEFAULT_COMMAND "open %s"' - - man1.mkpath - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - end -end diff --git a/Formula/uru.rb b/Formula/uru.rb deleted file mode 100644 index ff39c91e56484..0000000000000 --- a/Formula/uru.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Uru < Formula - desc "Use multiple rubies on multiple platforms" - homepage "https://bitbucket.org/jonforums/uru" - url "https://bitbucket.org/jonforums/uru/get/v0.8.5.tar.gz" - sha256 "47148454f4c4d5522641ac40aec552a9390a2edc1a0cd306c5d16924f0be7e34" - - bottle do - cellar :any_skip_relocation - sha256 "25c90f23ff4d5225d439f8783d25d440ee2b7fc6e8afdc5772914deab0ae3184" => :mojave - sha256 "d6da062bd8e0d7134a9d98285344064a82329b138bd7e0ed14fbc01a27530079" => :high_sierra - sha256 "fb1b6ac6bd09955f072e9b65e92cc992b6da4a14640694d8a830aaacad944518" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/bitbucket.org/jonforums/uru").install Dir["*"] - system "go", "build", "-ldflags", "-s", "bitbucket.org/jonforums/uru/cmd/uru" - bin.install "uru" => "uru_rt" - end - - def caveats; <<~EOS - Append to ~/.profile on Ubuntu, or to ~/.zshrc on Zsh - $ echo 'eval "$(uru_rt admin install)"' >> ~/.bash_profile - EOS - end - - test do - system "#{bin}/uru_rt" - end -end diff --git a/Formula/urweb.rb b/Formula/urweb.rb deleted file mode 100644 index c1770981763e9..0000000000000 --- a/Formula/urweb.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Urweb < Formula - desc "Ur/Web programming language" - homepage "http://www.impredicative.com/ur/" - url "https://github.com/urweb/urweb/releases/download/20180616/urweb-20180616.tar.gz" - sha256 "211793601c3ba958f45b81c30035cf5e3c236650e23bdf4503dc6074fc143e12" - - bottle do - sha256 "231256636387c96e61448be2afa84936a0a91f5096ac955695e92f6b29c5d7af" => :mojave - sha256 "e3af81b278f7b8b530241a69007a91af6cf45e648c15537be5dc3c9078ed3eed" => :high_sierra - sha256 "3b22d7d19cf6a6abadd99ba668b06460bb3c4aab8fc9fc6043c438bbe2939290" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "mlton" => :build - depends_on "gmp" - depends_on "openssl" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --with-openssl=#{Formula["openssl"].opt_prefix} - --prefix=#{prefix} - SITELISP=$prefix/share/emacs/site-lisp/urweb - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"hello.ur").write <<~EOS - fun target () = return - Welcome! - - fun main () = return - Go there - - EOS - (testpath/"hello.urs").write <<~EOS - val main : unit -> transaction page - EOS - (testpath/"hello.urp").write "hello" - system "#{bin}/urweb", "hello" - system "./hello.exe", "-h" - end -end diff --git a/Formula/usbmuxd.rb b/Formula/usbmuxd.rb deleted file mode 100644 index 4f3da2d09e4d9..0000000000000 --- a/Formula/usbmuxd.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Usbmuxd < Formula - desc "USB multiplexor daemon for iPhone and iPod Touch devices" - homepage "https://www.libimobiledevice.org/" - revision 1 - - stable do - url "https://www.libimobiledevice.org/downloads/libusbmuxd-1.0.10.tar.bz2" - sha256 "1aa21391265d2284ac3ccb7cf278126d10d354878589905b35e8102104fec9f2" - - # Backport of upstream security fix for CVE-2016-5104. - patch do - url "https://github.com/libimobiledevice/libusbmuxd/commit/4397b3376dc4.patch?full_index=1" - sha256 "b28e17c82dc11320741d33cf68fd78e1baec9e4133f5265b944f167839cbe9bb" - end - end - - bottle do - cellar :any - sha256 "2305d6794314c64d0fb8c3339c2d75a8e01d218715bc871560e4fe9fcad486a8" => :mojave - sha256 "253be465f391159e278a0a9625775075503f75b0a404aa64b9f557486de3b82c" => :high_sierra - sha256 "37a70014ca7c861639b8dc0f280b66306c082091731dfc3a53d1ef709ab98d5e" => :sierra - sha256 "e7227fb7deaefc2990e23d9cfdb3aa4305fc7f31e902560fa46272168c85e151" => :el_capitan - sha256 "0aae53db481257e6ce5eed9be080b63b347f2e05d5dfecc55b0936a9ee5ab336" => :yosemite - sha256 "e36b16d09c26e83daf359216a9b66fd2515a10d7432fdcc724c7aba5224f19b1" => :mavericks - end - - head do - url "https://git.sukimashita.com/libusbmuxd.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libplist" - depends_on "libusb" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"iproxy" - end -end diff --git a/Formula/userspace-rcu.rb b/Formula/userspace-rcu.rb deleted file mode 100644 index 8f21cd621da9d..0000000000000 --- a/Formula/userspace-rcu.rb +++ /dev/null @@ -1,31 +0,0 @@ -class UserspaceRcu < Formula - desc "Library for userspace RCU (read-copy-update)" - homepage "https://lttng.org/urcu" - url "https://www.lttng.org/files/urcu/userspace-rcu-0.10.1.tar.bz2" - sha256 "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f79eb06" - - bottle do - cellar :any_skip_relocation - sha256 "1a620b36743e9afeb795192e4d7defc2e581646afab160336f30182ef5458359" => :mojave - sha256 "9e3e9a7e4615f206faab5567f4eeab37dfa0aad7bdb9113803716df70abb9e0e" => :high_sierra - sha256 "a9e38da39a4afa118c7eeb9cadbb0466caea3f77a8525473a6603297b0d32a9f" => :sierra - sha256 "e44fe1d83cedac0ccf9e22a406e8efac399ac281fbc858dbc20d7b57fe564503" => :el_capitan - end - - def install - args = ["--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}"] - # workaround broken upstream detection of build platform - # marked as wontfix: https://bugs.lttng.org/issues/578#note-1 - args << "--build=#{Hardware::CPU.arch_64_bit}" - system "./configure", *args - system "make" - system "make", "install" - end - - test do - cp_r "#{doc}/examples", testpath - system "make", "-C", "examples" - end -end diff --git a/Formula/utf8proc.rb b/Formula/utf8proc.rb deleted file mode 100644 index 90a6fab3bd14a..0000000000000 --- a/Formula/utf8proc.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Utf8proc < Formula - desc "Clean C library for processing UTF-8 Unicode data" - homepage "https://juliastrings.github.io/utf8proc/" - url "https://github.com/JuliaStrings/utf8proc/archive/v2.2.0.tar.gz" - sha256 "3f8fd1dbdb057ee5ba584a539d5cd1b3952141c0338557cb0bdf8cb9cfed5dbf" - - bottle do - cellar :any - sha256 "59d0f3510a26a5c31c9954e9284ad82e863b0d6da00397094c9e26f442b49ec0" => :mojave - sha256 "cdcd5132f9ae0bebe232c59e76d66f4a0cb6a4a26f37c94041a78fd214484348" => :high_sierra - sha256 "dda62c99b48421dee34963e3be55e1db932227b21b4ab5005f268ff4e4f187c3" => :sierra - sha256 "f7065fb123f7d5946ed5c55784d14069c54c1cef02982f28921018307cb86a99" => :el_capitan - end - - def install - system "make", "install", "prefix=#{prefix}" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() { - const char *version = utf8proc_version(); - return strnlen(version, sizeof("1.3.1-dev")) > 0 ? 0 : -1; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lutf8proc", "-o", "test" - system "./test" - end -end diff --git a/Formula/util-linux.rb b/Formula/util-linux.rb deleted file mode 100644 index 15081b964f578..0000000000000 --- a/Formula/util-linux.rb +++ /dev/null @@ -1,51 +0,0 @@ -class UtilLinux < Formula - desc "Collection of Linux utilities" - homepage "https://github.com/karelzak/util-linux" - url "https://www.kernel.org/pub/linux/utils/util-linux/v2.32/util-linux-2.32.1.tar.xz" - sha256 "86e6707a379c7ff5489c218cfaf1e3464b0b95acf7817db0bc5f179e356a67b2" - revision 1 - - bottle do - cellar :any - sha256 "977cf2845acc9cdcbcf1b7e92d9c0af0066c5d0cc17df307a123c13180a64e62" => :mojave - sha256 "d551dad77ab8c533bab98d5bd91291db1f296564336d59d600f0ce75496a9d08" => :high_sierra - sha256 "aeef9c88dd7ea82ac3f71b6f3793b2316b76ee59a8e01cc56f6316efa4e1346c" => :sierra - sha256 "f3040a39ad4ffb9eabd9446843dfc3b66df01b3264c875dc68e7339636830357" => :el_capitan - end - - conflicts_with "rename", :because => "both install `rename` binaries" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-ipcs", # does not build on macOS - "--disable-ipcrm", # does not build on macOS - "--disable-wall", # already comes with macOS - "--disable-libuuid", # conflicts with ossp-uuid - "--disable-libsmartcols" # macOS already ships 'column' - - system "make", "install" - - # Remove binaries already shipped by macOS - %w[cal col colcrt colrm getopt hexdump logger nologin look mesg more renice rev ul whereis].each do |prog| - rm_f bin/prog - rm_f sbin/prog - rm_f man1/"#{prog}.1" - rm_f man8/"#{prog}.8" - rm_f share/"bash-completion/completions/#{prog}" - end - - # install completions only for installed programs - Pathname.glob("bash-completion/*") do |prog| - if (bin/prog.basename).exist? || (sbin/prog.basename).exist? - bash_completion.install prog - end - end - end - - test do - out = shell_output("#{bin}/namei -lx /usr").split("\n") - assert_equal ["f: /usr", "Drwxr-xr-x root wheel /", "drwxr-xr-x root wheel usr"], out - end -end diff --git a/Formula/utimer.rb b/Formula/utimer.rb deleted file mode 100644 index 1b134a27e8598..0000000000000 --- a/Formula/utimer.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Utimer < Formula - desc "Multifunction timer tool" - homepage "https://launchpad.net/utimer" - url "https://launchpad.net/utimer/0.4/0.4/+download/utimer-0.4.tar.gz" - sha256 "07a9d28e15155a10b7e6b22af05c84c878d95be782b6b0afaadec2f7884aa0f7" - - bottle do - sha256 "c81c54c3cf3a208bffc2971136b48339a0d86ae78ec0843b1d62e4342621b0bd" => :mojave - sha256 "5b16fba957c604780f67e530d2d6d794072087a1efd8c9926b45a7bcfb81033f" => :high_sierra - sha256 "83857df76553031baf373cf3c8d0124d5d7424bd9d42b2860e7fec530e6e91ca" => :sierra - sha256 "d7a0ec14fe3d04b314cb0c6c9e5d70b6f72d2de02e4e3227039919551eb118a6" => :el_capitan - sha256 "6009a679cfedeecb55dbdf0e952bc2b09a7c292f8aba5d6e861072139e2a8a23" => :yosemite - sha256 "a1841baa5d50002615efb07d07d5049e5965c06099e120f71654eec83dd4f1a3" => :mavericks - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "Elapsed Time:", shell_output("#{bin}/utimer -t 0ms") - end -end diff --git a/Formula/uudeview.rb b/Formula/uudeview.rb deleted file mode 100644 index 2bbb7be92cc9e..0000000000000 --- a/Formula/uudeview.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Uudeview < Formula - desc "Smart multi-file multi-part decoder" - homepage "http://www.fpx.de/fp/Software/UUDeview/" - url "http://www.fpx.de/fp/Software/UUDeview/download/uudeview-0.5.20.tar.gz" - sha256 "e49a510ddf272022af204e96605bd454bb53da0b3fe0be437115768710dae435" - revision 1 - - bottle do - sha256 "c5d18a9546ce1a85463f9539913849a345d789b320a85fbcb4808d55e698ddfd" => :mojave - sha256 "9dc171e8989c39f86f0c7dc3731223cfa5ca675777423141a81dd2eedb030fd1" => :high_sierra - sha256 "a8ab0219be6aa4d27c2d2cf782fdd6729c927b6e241c1a19c277c508dfaf9504" => :sierra - sha256 "fa6bcd2362f84742db9e89d4e474a4359d06d9829db2a54223597b5ab662053c" => :el_capitan - sha256 "2692468b933a114f9f2cdebdb566ace98a5d33694fa6133e5024df5e4022a63f" => :yosemite - sha256 "632df808fdc10ec4f8dbc18c028b51f6c28152fe0cc00c4b2a19a723f0b0499b" => :mavericks - sha256 "880ad715f426a3284778d05138b45af606e8a7e78bd3aff4bd6e96fe9020f22d" => :mountain_lion - end - - # Fix function signatures (for clang) - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/19da78c/uudeview/inews.c.patch" - sha256 "4bdf357ede31abc17b1fbfdc230051f0c2beb9bb8805872bd66e40989f686d7b" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-tcl" - system "make", "install" - # uudeview provides the public library libuu, but no way to install it. - # Since the package is unsupported, upstream changes are unlikely to occur. - # Install the library and headers manually for now. - lib.install "uulib/libuu.a" - include.install "uulib/uudeview.h" - end - - test do - system "#{bin}/uudeview", "-V" - end -end diff --git a/Formula/uwsgi.rb b/Formula/uwsgi.rb deleted file mode 100644 index aeac023935aa7..0000000000000 --- a/Formula/uwsgi.rb +++ /dev/null @@ -1,162 +0,0 @@ -class Uwsgi < Formula - desc "Full stack for building hosting services" - homepage "https://uwsgi-docs.readthedocs.org/en/latest/" - head "https://github.com/unbit/uwsgi.git" - - stable do - url "https://projects.unbit.it/downloads/uwsgi-2.0.17.1.tar.gz" - sha256 "d2318235c74665a60021a4fc7770e9c2756f9fc07de7b8c22805efe85b5ab277" - - # Fix "library not found for -lgcc_s.10.5" with 10.14 SDK - # Remove in next release - patch do - url "https://github.com/unbit/uwsgi/commit/6b1b397f.diff?full_index=1" - sha256 "b2c3a22f980a4e3bd2ab2fe5c5356d8a91e567a3ab3e6ccbeeeb2ba4efe4568a" - end - end - - bottle do - rebuild 1 - sha256 "bedd428644e52332dea9c0c022e1b95572e86b82a26f00676d9041e1d3668041" => :mojave - sha256 "a324da423d63b2e6fa8c36680a84a19c5a2a82f33c8e819c1c3c3ca318fb48a7" => :high_sierra - sha256 "c46dd9c0e215063d503b275759ec1055521b124d1f8c5d378de086d186089088" => :sierra - end - - deprecated_option "with-python3" => "with-python" - - depends_on "go" => [:build, :optional] - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "pcre" - depends_on "python@2" - depends_on "yajl" - - depends_on "libyaml" => :optional - depends_on "python" => :optional - depends_on "zeromq" => :optional - - # "no such file or directory: '... libpython2.7.a'" - # Reported 23 Jun 2016: https://github.com/unbit/uwsgi/issues/1299 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/726bff4/uwsgi/libpython-tbd-xcode-sdk.diff" - sha256 "d71c879774b32424b5a9051ff47d3ae6e005412e9214675d806857ec906f9336" - end - - def install - # Fix file not found errors for /usr/lib/system/libsystem_symptoms.dylib and - # /usr/lib/system/libsystem_darwin.dylib on 10.11 and 10.12, respectively - if MacOS.version == :sierra || MacOS.version == :el_capitan - ENV["SDKROOT"] = MacOS.sdk_path - end - - ENV.append %w[CFLAGS LDFLAGS], "-arch #{MacOS.preferred_arch}" - openssl = Formula["openssl"] - ENV.prepend "CFLAGS", "-I#{openssl.opt_include}" - ENV.prepend "LDFLAGS", "-L#{openssl.opt_lib}" - - yaml = build.with?("libyaml") ? "libyaml" : "embedded" - - (buildpath/"buildconf/brew.ini").write <<~EOS - [uwsgi] - ssl = true - json = yajl - xml = libxml2 - yaml = #{yaml} - inherit = base - plugin_dir = #{libexec}/uwsgi - embedded_plugins = null - EOS - - system "python", "uwsgiconfig.py", "--verbose", "--build", "brew" - - plugins = %w[airbrake alarm_curl alarm_speech asyncio cache - carbon cgi cheaper_backlog2 cheaper_busyness - corerouter curl_cron cplusplus dumbloop dummy - echo emperor_amqp fastrouter forkptyrouter gevent - http logcrypto logfile ldap logpipe logsocket - msgpack notfound pam ping psgi pty rawrouter - router_basicauth router_cache router_expires - router_hash router_http router_memcached - router_metrics router_radius router_redirect - router_redis router_rewrite router_static - router_uwsgi router_xmldir rpc signal spooler - sqlite3 sslrouter stats_pusher_file - stats_pusher_socket symcall syslog - transformation_chunked transformation_gzip - transformation_offload transformation_tofile - transformation_toupper ugreen webdav zergpool] - - plugins << "gccgo" if build.with? "go" - - (libexec/"uwsgi").mkpath - plugins.each do |plugin| - system "python", "uwsgiconfig.py", "--verbose", "--plugin", "plugins/#{plugin}", "brew" - end - - python_versions = { - "python" => "python2.7", - "python2" => "python2.7", - } - python_versions["python3"] = "python3" if build.with? "python" - python_versions.each do |k, v| - system v, "uwsgiconfig.py", "--verbose", "--plugin", "plugins/python", "brew", k - end - - bin.install "uwsgi" - end - - plist_options :manual => "uwsgi" - - def plist; <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/uwsgi - --uid - _www - --gid - _www - --master - --die-on-term - --autoload - --logto - #{HOMEBREW_PREFIX}/var/log/uwsgi.log - --emperor - #{HOMEBREW_PREFIX}/etc/uwsgi/apps-enabled - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - (testpath/"helloworld.py").write <<~EOS - def application(env, start_response): - start_response('200 OK', [('Content-Type','text/html')]) - return [b"Hello World"] - EOS - - pid = fork do - exec "#{bin}/uwsgi --http-socket 127.0.0.1:8080 --protocol=http --plugin python -w helloworld" - end - sleep 2 - - begin - assert_match "Hello World", shell_output("curl localhost:8080") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/v.rb b/Formula/v.rb deleted file mode 100644 index 8689e6ada8fd9..0000000000000 --- a/Formula/v.rb +++ /dev/null @@ -1,20 +0,0 @@ -class V < Formula - desc "Z for vim" - homepage "https://github.com/rupa/v" - url "https://github.com/rupa/v/archive/v1.1.tar.gz" - sha256 "6483ef1248dcbc6f360b0cdeb9f9c11879815bd18b0c4f053a18ddd56a69b81f" - head "https://github.com/rupa/v.git" - - bottle :unneeded - - def install - bin.install "v" - man1.install "v.1" - end - - test do - (testpath/".vimrc").write "set viminfo='25,\"50,n#{testpath}/.viminfo" - system "/usr/bin/vim", "-u", testpath/".vimrc", "+wq", "test.txt" - assert_equal "#{testpath}/test.txt", shell_output("#{bin}/v -a --debug").chomp - end -end diff --git a/Formula/v/v.rb b/Formula/v/v.rb new file mode 100644 index 0000000000000..2ff3ea56f65f6 --- /dev/null +++ b/Formula/v/v.rb @@ -0,0 +1,43 @@ +class V < Formula + desc "Z for vim" + homepage "https://github.com/rupa/v" + license "WTFPL" + revision 1 + head "https://github.com/rupa/v.git", branch: "master" + + stable do + url "https://github.com/rupa/v/archive/refs/tags/v1.1.tar.gz" + sha256 "6483ef1248dcbc6f360b0cdeb9f9c11879815bd18b0c4f053a18ddd56a69b81f" + + # Include license + patch do + url "https://github.com/rupa/v/commit/d19e6ea79fe361c2c62fbf514d52691042ff83e1.patch?full_index=1" + sha256 "13ca8ba595db0b168fc0a8b8363386ecdbc216cc3d6a94811b5bfa30d5abbbbf" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "02186023120c9b712a9eb310bf10b090cee1e693c8e4f302880a414d8ea6f3e7" + end + + uses_from_macos "vim" + + conflicts_with "vlang", because: "both install `v` binaries" + + def install + # Align documentation to generate `:all` bottle + inreplace ["README", "v.1"], "/usr/local", HOMEBREW_PREFIX + + bin.install "v" + man1.install "v.1" + end + + test do + (testpath/".vimrc").write "set viminfo='25,\"50,n#{testpath}/.viminfo" + system "vim", "-u", testpath/".vimrc", "+wq", "test.txt" + assert_equal "#{testpath}/test.txt", shell_output("#{bin}/v -a --debug").chomp + end +end diff --git a/Formula/v/v2ray.rb b/Formula/v/v2ray.rb new file mode 100644 index 0000000000000..5cec997aea375 --- /dev/null +++ b/Formula/v/v2ray.rb @@ -0,0 +1,104 @@ +class V2ray < Formula + desc "Platform for building proxies to bypass network restrictions" + homepage "https://v2fly.org/" + url "https://github.com/v2fly/v2ray-core/archive/refs/tags/v5.41.0.tar.gz" + sha256 "c67caa2d73f35a9562ecaeb5184733c943c9dafb47e8f1cfeacb892a9247e9b5" + license all_of: ["MIT", "CC-BY-SA-4.0"] + head "https://github.com/v2fly/v2ray-core.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "719e2394b0475aac4e443ea5d018d8a221bc4f4bba68e1ed52e184f123a9c0c8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "719e2394b0475aac4e443ea5d018d8a221bc4f4bba68e1ed52e184f123a9c0c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "719e2394b0475aac4e443ea5d018d8a221bc4f4bba68e1ed52e184f123a9c0c8" + sha256 cellar: :any_skip_relocation, sonoma: "6f1e2fd111799b674bb696db6f099837a359d0d3fcfb79c47460095d98a90ad8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d486a59d1f4f59b3a3b209a23e7025b785ee86f0d8a7884dedb34937f2d99c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d96ca58e2a379c9912e5672b68ea709e4d28ec028d11adaed366e96f5135df8" + end + + depends_on "go" => :build + + resource "geoip" do + url "https://github.com/v2fly/geoip/releases/download/202510050144/geoip.dat" + sha256 "c23ac8343e9796f8cc8b670c3aeb6df6d03d4e8914437a409961477f6b226098" + end + + resource "geoip-only-cn-private" do + url "https://github.com/v2fly/geoip/releases/download/202510050144/geoip-only-cn-private.dat" + sha256 "62a303deff40ce0d3735c2dc974b832f85b5f21892b03b0b4ae2acb53717d730" + end + + resource "geosite" do + url "https://github.com/v2fly/domain-list-community/releases/download/20250916122507/dlc.dat" + sha256 "1a7dad0ceaaf1f6d12fef585576789699bd1c6ea014c887c04b94cb9609350e9" + end + + def install + ldflags = "-s -w -buildid=" + system "go", "build", *std_go_args(ldflags:, output: libexec/"v2ray"), "./main" + + (bin/"v2ray").write_env_script libexec/"v2ray", + V2RAY_LOCATION_ASSET: "${V2RAY_LOCATION_ASSET:-#{pkgshare}}" + + pkgetc.install "release/config/config.json" + + resource("geoip").stage do + pkgshare.install "geoip.dat" + end + + resource("geoip-only-cn-private").stage do + pkgshare.install "geoip-only-cn-private.dat" + end + + resource("geosite").stage do + pkgshare.install "dlc.dat" => "geosite.dat" + end + end + + service do + run [opt_bin/"v2ray", "run", "-config", etc/"v2ray/config.json"] + keep_alive true + end + + test do + (testpath/"config.json").write <<~JSON + { + "log": { + "access": "#{testpath}/log" + }, + "outbounds": [ + { + "protocol": "freedom", + "tag": "direct" + } + ], + "routing": { + "rules": [ + { + "ip": [ + "geoip:private" + ], + "outboundTag": "direct", + "type": "field" + }, + { + "domains": [ + "geosite:private" + ], + "outboundTag": "direct", + "type": "field" + } + ] + } + } + JSON + output = shell_output "#{bin}/v2ray test -c #{testpath}/config.json" + + assert_match "Configuration OK", output + assert_path_exists testpath/"log" + end +end diff --git a/Formula/v/v8.rb b/Formula/v/v8.rb new file mode 100644 index 0000000000000..5709679861715 --- /dev/null +++ b/Formula/v/v8.rb @@ -0,0 +1,313 @@ +class V8 < Formula + desc "Google's JavaScript engine" + homepage "https://v8.dev/docs" + # Track V8 version from Chrome stable: https://chromiumdash.appspot.com/releases?platform=Mac + # Check `brew livecheck --resources v8` for any resource updates + url "https://github.com/v8/v8/archive/refs/tags/13.5.212.10.tar.gz" + sha256 "2c47b3de22591f4384f75aa462301eb9fdb9d661ee07f73cab95a89d0a75d5ae" + license "BSD-3-Clause" + + livecheck do + url "https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Mac" + regex(/(\d+\.\d+\.\d+\.\d+)/i) + strategy :json do |json, regex| + # Find the v8 commit hash for the newest Chromium release version + v8_hash = json.max_by { |item| Version.new(item["version"]) }.dig("hashes", "v8") + next if v8_hash.blank? + + # Check the v8 commit page for version text + v8_page = Homebrew::Livecheck::Strategy.page_content( + "https://chromium.googlesource.com/v8/v8.git/+/#{v8_hash}", + ) + v8_page[:content]&.scan(regex)&.map { |match| match[0] } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "608bb35f6b352cd6c1e10489fb301b6e826e8f97cb279d268a29829713924515" + sha256 cellar: :any, arm64_sequoia: "72d470fd40a8a7c552ed76a235a593eae664619f2ff63433e4dd99d41ae7c496" + sha256 cellar: :any, arm64_sonoma: "042e5464470b5b353559ef4f50dcb118025f0969af15fc85025ed4c6202d9b3e" + sha256 cellar: :any, sonoma: "13d60cdca44d3f1b9a5ea1997981321169048a24f384691f349887d27eb480b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b07cbc0682b820d94953ef5fe2b3c5940f7ebc9fb6375c38172b446cd08455a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c443ea4ea031822f96fddc71f10a6d0a56f3f1ab39d57b1732963ee90a04b778" + end + + depends_on "llvm" => :build + depends_on "ninja" => :build + depends_on xcode: ["10.0", :build] # for xcodebuild, min version required by v8 + + uses_from_macos "python" => :build + + on_linux do + depends_on "lld" => :build + depends_on "pkgconf" => :build + depends_on "glib" + end + + # Look up the correct resource revisions in the DEP file of the specific releases tag + # e.g. for CIPD dependency gn: https://chromium.googlesource.com/v8/v8.git/+/refs/tags//DEPS#74 + resource "gn" do + url "https://gn.googlesource.com/gn.git", + revision: "4a8016dc391553fa1644c0740cc04eaac844121e" + version "4a8016dc391553fa1644c0740cc04eaac844121e" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(/["']gn_version["']:\s*["']git_revision:([0-9a-f]+)["']/i) + end + end + + resource "build" do + url "https://chromium.googlesource.com/chromium/src/build.git", + revision: "efb3303345a5501074564393470197a904b4afb7" + version "efb3303345a5501074564393470197a904b4afb7" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/build\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "buildtools" do + url "https://chromium.googlesource.com/chromium/src/buildtools.git", + revision: "b248db940ef3dd7e5f4694ebf4d8a3f67aa0086d" + version "b248db940ef3dd7e5f4694ebf4d8a3f67aa0086d" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/buildtools\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/abseil-cpp" do + url "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git", + revision: "2705c6655c0008cc3fb152dae27890d44bc335f1" + version "2705c6655c0008cc3fb152dae27890d44bc335f1" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/third_party/abseil-cpp\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/fast_float/src" do + url "https://chromium.googlesource.com/external/github.com/fastfloat/fast_float.git", + revision: "cb1d42aaa1e14b09e1452cfdef373d051b8c02a4" + version "cb1d42aaa1e14b09e1452cfdef373d051b8c02a4" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/external/github.com/fastfloat/fast_float\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/fp16/src" do + url "https://chromium.googlesource.com/external/github.com/Maratyszcza/FP16.git", + revision: "0a92994d729ff76a58f692d3028ca1b64b145d91" + version "0a92994d729ff76a58f692d3028ca1b64b145d91" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/external/github.com/Maratyszcza/FP16\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/googletest/src" do + url "https://chromium.googlesource.com/external/github.com/google/googletest.git", + revision: "24a9e940d481f992ba852599c78bb2217362847b" + version "24a9e940d481f992ba852599c78bb2217362847b" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/external/github.com/google/googletest\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/highway/src" do + url "https://chromium.googlesource.com/external/github.com/google/highway.git", + revision: "00fe003dac355b979f36157f9407c7c46448958e" + version "00fe003dac355b979f36157f9407c7c46448958e" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/external/github.com/google/highway\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/icu" do + url "https://chromium.googlesource.com/chromium/deps/icu.git", + revision: "d30b7b0bb3829f2e220df403ed461a1ede78b774" + version "d30b7b0bb3829f2e220df403ed461a1ede78b774" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/deps/icu\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/jinja2" do + url "https://chromium.googlesource.com/chromium/src/third_party/jinja2.git", + revision: "5e1ee241ab04b38889f8d517f2da8b3df7cfbd9a" + version "5e1ee241ab04b38889f8d517f2da8b3df7cfbd9a" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/third_party/jinja2\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/markupsafe" do + url "https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git", + revision: "9f8efc8637f847ab1ba984212598e6fb9cf1b3d4" + version "9f8efc8637f847ab1ba984212598e6fb9cf1b3d4" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/third_party/markupsafe\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/partition_alloc" do + url "https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git", + revision: "46d880ff62f340854a5a70142b0abf604c7af221" + version "46d880ff62f340854a5a70142b0abf604c7af221" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(/["']partition_alloc_version["']:\s*["']([0-9a-f]+)["']/i) + end + end + + resource "third_party/simdutf" do + url "https://chromium.googlesource.com/chromium/src/third_party/simdutf.git", + revision: "5a9a2134b280c1b956ad68a0643797fe26dd1c94" + version "5a9a2134b280c1b956ad68a0643797fe26dd1c94" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/third_party/simdutf["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + resource "third_party/zlib" do + url "https://chromium.googlesource.com/chromium/src/third_party/zlib.git", + revision: "788cb3c270e8700b425c7bdca1f9ce6b0c1400a9" + version "788cb3c270e8700b425c7bdca1f9ce6b0c1400a9" + + livecheck do + url "https://raw.githubusercontent.com/v8/v8/refs/tags/#{LATEST_VERSION}/DEPS" + regex(%r{["']/chromium/src/third_party/zlib\.git["']\s*\+\s*["']@["']\s*\+\s*["']([0-9a-f]+)["']}i) + end + end + + def install + resources.each { |r| r.stage(buildpath/r.name) } + + # Build gn from source and add it to the PATH + cd "gn" do + system "python3", "build/gen.py" + system "ninja", "-C", "out/", "gn" + end + ENV.prepend_path "PATH", buildpath/"gn/out" + + # create gclient_args.gni + (buildpath/"build/config/gclient_args.gni").write <<~GN + declare_args() { + checkout_google_benchmark = false + } + GN + + # setup gn args + gn_args = { + is_debug: false, + is_component_build: true, + v8_use_external_startup_data: false, + v8_enable_fuzztest: false, + v8_enable_i18n_support: true, # enables i18n support with icu + clang_use_chrome_plugins: false, # disable the usage of Google's custom clang plugins + use_custom_libcxx: false, # uses system libc++ instead of Google's custom one + treat_warnings_as_errors: false, # ignore not yet supported clang argument warnings + } + + # workaround to use shim to compile v8 + ENV.llvm_clang + llvm = Formula["llvm"] + clang_base_path = buildpath/"clang" + clang_base_path.install_symlink (llvm.opt_prefix.children - [llvm.opt_bin]) + (clang_base_path/"bin").install_symlink llvm.opt_bin.children + %w[clang clang++].each do |compiler| + rm(clang_base_path/"bin"/compiler) + (clang_base_path/"bin"/compiler).write_env_script Superenv.shims_path/"llvm_#{compiler}", _skip: "" + chmod "+x", clang_base_path/"bin"/compiler + end + + # uses Homebrew clang instead of Google clang + gn_args[:clang_base_path] = "\"#{clang_base_path}\"" + gn_args[:clang_version] = "\"#{llvm.version.major}\"" + + if OS.linux? + ENV["AR"] = DevelopmentTools.locate("ar") + ENV["NM"] = DevelopmentTools.locate("nm") + gn_args[:use_sysroot] = false # don't use sysroot + gn_args[:custom_toolchain] = "\"//build/toolchain/linux/unbundle:default\"" # uses system toolchain + gn_args[:host_toolchain] = "\"//build/toolchain/linux/unbundle:default\"" # to respect passed LDFLAGS + gn_args[:use_rbe] = false + else + ENV["DEVELOPER_DIR"] = ENV["HOMEBREW_DEVELOPER_DIR"] # help run xcodebuild when xcode-select is set to CLT + gn_args[:use_lld] = false # upstream use LLD but this leads to build failure on ARM + end + + # Make sure private libraries can be found from lib + ENV.prepend "LDFLAGS", "-Wl,-rpath,#{rpath(target: libexec)}" + + # Transform to args string + gn_args_string = gn_args.map { |k, v| "#{k}=#{v}" }.join(" ") + + # Build with gn + ninja + system "gn", "gen", "--args=#{gn_args_string}", "out.gn" + system "ninja", "-j", ENV.make_jobs, "-C", "out.gn", "-v", "d8" + + # Install libraries and headers into libexec so d8 can find them, and into standard directories + # so other packages can find them and they are linked into HOMEBREW_PREFIX + libexec.install "include" + + # Make sure we don't symlink non-headers into `include`. + header_files_and_directories = (libexec/"include").children.select do |child| + (child.extname == ".h") || child.directory? + end + include.install_symlink header_files_and_directories + + libexec.install "out.gn/d8", "out.gn/icudtl.dat" + bin.write_exec_script libexec/"d8" + + libexec.install Pathname.glob("out.gn/#{shared_library("*")}") + lib.install_symlink libexec.glob(shared_library("libv8*")) + lib.glob("*.TOC").map(&:unlink) if OS.linux? # Remove symlinks to .so.TOC text files + end + + test do + assert_equal "Hello World!", shell_output("#{bin}/d8 -e 'print(\"Hello World!\");'").chomp + t = "#{bin}/d8 -e 'print(new Intl.DateTimeFormat(\"en-US\").format(new Date(\"2012-12-20T03:00:00\")));'" + assert_match %r{12/\d{2}/2012}, shell_output(t).chomp + + (testpath/"test.cpp").write <<~CPP + #include + #include + int main(){ + static std::unique_ptr platform = v8::platform::NewDefaultPlatform(); + v8::V8::InitializePlatform(platform.get()); + v8::V8::Initialize(); + return 0; + } + CPP + + # link against installed libc++ + system ENV.cxx, "-std=c++20", "test.cpp", + "-I#{include}", "-L#{lib}", + "-Wl,-rpath,#{libexec}", + "-lv8", "-lv8_libplatform" + end +end diff --git a/Formula/v/vala-language-server.rb b/Formula/v/vala-language-server.rb new file mode 100644 index 0000000000000..205cd1868f85e --- /dev/null +++ b/Formula/v/vala-language-server.rb @@ -0,0 +1,61 @@ +class ValaLanguageServer < Formula + desc "Code Intelligence for Vala & Genie" + homepage "https://github.com/vala-lang/vala-language-server" + url "https://github.com/vala-lang/vala-language-server/releases/download/0.48.7/vala-language-server-0.48.7.tar.xz" + sha256 "a93e09497738144792466d0c5ccb1347583d84a9987b65b08f6aa5d5a1e3f431" + license "LGPL-2.1-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6de961a16d8c01a87334d3e5f8952bccde9d82e321719c8b7606a173b6a4f79b" + sha256 cellar: :any, arm64_sequoia: "7b298f02d9378880231ad35d238897b5fa76e7a0c92efc802676f114fe20ab9f" + sha256 cellar: :any, arm64_sonoma: "ac975caa3ddb69b060ade26f3fd96eb26d1ea002cb52742c0418a4edc23058ff" + sha256 cellar: :any, arm64_ventura: "8bceda4daa8845f577ab8133fff13b22ff342e9d9bc567a3b0e9c97eb6de8ab8" + sha256 cellar: :any, arm64_monterey: "51eb75d062bfb8901eaeff0ca491584cfbc62bb266861ab760d9fd1c34aada5d" + sha256 cellar: :any, arm64_big_sur: "865dc144b42045cf9243ef56f7153dc341d6cb160b957c11f900844c27e4a2c5" + sha256 cellar: :any, sonoma: "2142ed177e269f7b29398f13dab2e234cd788becf8a4220c1a1c7f0b9b24925d" + sha256 cellar: :any, ventura: "5c3225a7fd5a42ae0b78713fe57ed1840ec4b090393e8e1cf53c1d250a392641" + sha256 cellar: :any, monterey: "0b7304461e6e427f1ed2ebad4dcb6d66589c0bb5f77c6cf921207359461e5e46" + sha256 cellar: :any, big_sur: "237b5e936501fb0d96ca3304947f4224113d39bb4a218a1b25d0702959a1fe81" + sha256 arm64_linux: "f7bde32833468a8a783f9992ed2aad1dda845285a650bb7f1c69e8ad2fc24b8e" + sha256 x86_64_linux: "063a6451f6da46ce3112e2de698c723b69867fb4890a97b5ae78b16dc85ef23d" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "json-glib" + depends_on "jsonrpc-glib" + depends_on "libgee" + depends_on "vala" + + on_macos do + depends_on "gettext" + end + + def install + # Workaround to build with newer clang + # Upstream bug report, https://github.com/vala-lang/vala-language-server/issues/310 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "meson", "setup", "build", "-Dplugins=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + length = (testpath.to_s.length + 151) + input = + "Content-Length: #{length}\r\n" \ + "\r\n" \ + "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"" \ + "processId\":88075,\"rootPath\":\"#{testpath}\",\"capabilities\":{},\"trace\":\"ver" \ + "bose\",\"workspaceFolders\":null}}\r\n" + + output = pipe_output(bin/"vala-language-server", input, 0) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/v/vala.rb b/Formula/v/vala.rb new file mode 100644 index 0000000000000..8eb4d4f8f711f --- /dev/null +++ b/Formula/v/vala.rb @@ -0,0 +1,63 @@ +class Vala < Formula + desc "Compiler for the GObject type system" + homepage "https://wiki.gnome.org/Projects/Vala" + url "https://download.gnome.org/sources/vala/0.56/vala-0.56.18.tar.xz" + sha256 "f2affe7d40ab63db8e7b9ecc3f6bdc9c2fc7e3134c84ff2d795f482fe926a382" + license "LGPL-2.1-or-later" + revision 2 + + bottle do + sha256 arm64_tahoe: "b107f1bbd7f2ef11df45879dfe7eef7c06043148318e1a924b17e8befe0109b5" + sha256 arm64_sequoia: "0c9df5e695775789df165924d269b06a50037038d4373bdd47efb84f61cde9ad" + sha256 arm64_sonoma: "3d2afba20cfa6404b491373e85b36252a644a6ba1f9e0dd3f62c3f3b519ace40" + sha256 sonoma: "7be08cdc3ca80eefd9cf5bddffabe828046acd66afa768f6e86baaa69a5e25fd" + sha256 arm64_linux: "d562efbe5304e1d15f1eb40be1a2f8f0fceb6ace109866ec9f1089998b90ef81" + sha256 x86_64_linux: "6d4a016086637ae5654795825ee3d8de34d9ff43f3b78f5c4b89aa304cc7ed20" + end + + depends_on "gobject-introspection" => :build + depends_on "glib" + depends_on "graphviz" + depends_on "pkgconf" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libxslt" => :build # for xsltproc + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" # Fails to compile as a single step + system "make", "install" + end + + test do + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libffi"].opt_lib/"pkgconfig" + test_string = "Hello Homebrew\n" + path = testpath/"hello.vala" + path.write <<~VALA + void main () { + print ("#{test_string}"); + } + VALA + + valac_args = [ + # Build with debugging symbols. + "-g", + # Use Homebrew's default C compiler. + "--cc=#{ENV.cc}", + # Save generated C source code. + "--save-temps", + # Vala source code path. + path.to_s, + ] + + system bin/"valac", *valac_args + assert_path_exists testpath/"hello.c" + + assert_equal test_string, shell_output("#{testpath}/hello") + end +end diff --git a/Formula/v/valabind.rb b/Formula/v/valabind.rb new file mode 100644 index 0000000000000..4d759a4a11da4 --- /dev/null +++ b/Formula/v/valabind.rb @@ -0,0 +1,51 @@ +class Valabind < Formula + desc "Vala bindings for radare, reverse engineering framework" + homepage "https://github.com/radare/valabind" + url "https://github.com/radare/valabind/archive/refs/tags/1.8.0.tar.gz" + sha256 "3eba8c36c923eda932a95b8d0c16b7b30e8cdda442252431990436519cf87cdd" + license "GPL-3.0-or-later" + revision 3 + head "https://github.com/radare/valabind.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "745683d881871d85218f78aee42d4631ebc836810ac19aa2b63d6e56fe252b0f" + sha256 cellar: :any, arm64_sequoia: "ec16d96176ce495628ccf3a5311f73bf79372b0f43916402658f889766a8d671" + sha256 cellar: :any, arm64_sonoma: "80030cd7d5a34964e901ca0423f7544e4303e8303f3d19f9bed8fe7d05e69944" + sha256 cellar: :any, arm64_ventura: "e28af78b2d274aed69831674e266fca2dd7d5d372c6fad894b781e2f7921441e" + sha256 cellar: :any, arm64_monterey: "f97a49df3bd721459f95344eb6797f64dfc3179e3472c9fb559dd1e9a6f5407f" + sha256 cellar: :any, arm64_big_sur: "fd3b71cafaf1ca949145a4e2045228091c58ced1adf4ac750b380e4f0e3d22e9" + sha256 cellar: :any, sonoma: "f5be1780534f375152b19fde9500b1341a3506c9588adbb0590eaf72dea36dd4" + sha256 cellar: :any, ventura: "33cf37fa5a4819b5f8c79adbf0ed5808873779541ae90eca8abccd2f020f5451" + sha256 cellar: :any, monterey: "564959ce8e6bec75bb130cb85bc352a33d31fdd97f8252dc8bc6ebce79bc4f5f" + sha256 cellar: :any, big_sur: "0d194995ef330fa38ccb9ed89038f8309c7c9fb84592301f73a3ae07e83504f7" + sha256 cellar: :any, catalina: "4bd9b0d76eea42421f543452ac64b28a3ae852556c6a82fd32fe09538c78809b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f0a965e11e7dc99c638686a3099d5884b835eca8fdf5424e9062cfca6745a6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a026ff063223ac9af89b8fd78aa1d610cc20771b3995dd9b39bc2f2e6ac04c19" + end + + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "swig" + depends_on "vala" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_macos do + depends_on "gettext" + end + + def install + # Workaround to build with newer clang + # Upstream bug report, https://github.com/radare/valabind/issues/61 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "make", "VALA_PKGLIBDIR=#{Formula["vala"].opt_lib}/vala-#{Formula["vala"].version.major_minor}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"valabind", "--help" + end +end diff --git a/Formula/v/vale.rb b/Formula/v/vale.rb new file mode 100644 index 0000000000000..222de25d020a9 --- /dev/null +++ b/Formula/v/vale.rb @@ -0,0 +1,47 @@ +class Vale < Formula + desc "Syntax-aware linter for prose" + homepage "https://vale.sh/" + url "https://github.com/errata-ai/vale/archive/refs/tags/v3.13.0.tar.gz" + sha256 "a6811e19c0ca8fc453da98238c2ffc7c5d5d1e77346d72d24fd47c09302fd7c0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8de7318150b31fa1b69c7a2177238b2c1aa6cabfb2a13494ee30b5c287cc263b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "63ae982fd3a5ded522999879e982ab8b0e0033c118e4eb261d0b09ebf90b0d5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ff6d4482cd580a3db3c4f90959c3b88b227eedcaafe21ff96855abbef5e28b8" + sha256 cellar: :any_skip_relocation, sonoma: "c5fd2c5ae3597780cd4e342cbbaef0aec26975ca0fe64a0e3bd50efa0e6a8b4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae47355bd4765a8b9e8501b2c67b1deee1a33d6aabbe8d93b64fa8555e5f7e8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5aad10ecae4057bb92bc9dfd77c9a5fd90fa1ea914f28488482c02266e619f53" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "1" if OS.linux? && Hardware::CPU.arm? + + ldflags = "-X main.version=#{version} -s -w" + system "go", "build", *std_go_args, "-ldflags=#{ldflags}", "./cmd/vale" + end + + test do + mkdir_p "styles/demo" + (testpath/"styles/demo/HeadingStartsWithCapital.yml").write <<~YAML + extends: capitalization + message: "'%s' should be in title case" + level: warning + scope: heading.h1 + match: $title + YAML + + (testpath/"vale.ini").write <<~INI + StylesPath = styles + [*.md] + BasedOnStyles = demo + INI + + (testpath/"document.md").write("# heading is not capitalized") + + output = shell_output("#{bin}/vale --config=#{testpath}/vale.ini #{testpath}/document.md 2>&1") + assert_match(/✖ .*0 errors.*, .*1 warning.* and .*0 suggestions.* in 1 file\./, output) + end +end diff --git a/Formula/v/valgrind.rb b/Formula/v/valgrind.rb new file mode 100644 index 0000000000000..631c041db3276 --- /dev/null +++ b/Formula/v/valgrind.rb @@ -0,0 +1,46 @@ +class Valgrind < Formula + desc "Dynamic analysis tools (memory, debug, profiling)" + homepage "https://www.valgrind.org/" + url "https://sourceware.org/pub/valgrind/valgrind-3.26.0.tar.bz2" + sha256 "8d54c717029106f1644aadaf802ab9692e53d93dd015cbd19e74190eba616bd7" + license "GPL-2.0-or-later" + + livecheck do + url "https://sourceware.org/pub/valgrind/" + regex(/href=.*?valgrind[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "57fc318a97c43d1bdae43943c9de23c26c5f804983fe29f4d1853802ce4f6646" + sha256 x86_64_linux: "df7ce68951218b8d2646a402d30b9733626bb67b80255fd207f4903060528498" + end + + head do + url "https://sourceware.org/git/valgrind.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on :linux + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --enable-only64bit + --without-mpicc + ] + + system "./autogen.sh" if build.head? + + system "./configure", *args + system "make" + system "make", "install" + end + + test do + assert_match "usage", shell_output("#{bin}/valgrind --help") + end +end diff --git a/Formula/v/valijson.rb b/Formula/v/valijson.rb new file mode 100644 index 0000000000000..9e9fff3317da9 --- /dev/null +++ b/Formula/v/valijson.rb @@ -0,0 +1,32 @@ +class Valijson < Formula + desc "Header-only C++ library for JSON Schema validation" + homepage "https://github.com/tristanpenman/valijson" + url "https://github.com/tristanpenman/valijson/archive/refs/tags/v1.0.6.tar.gz" + sha256 "bf0839de19510ff7792d8a8aca94ea11a288775726b36c4c9a2662651870f8da" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "edc5d9558ddd586d6b8e88adcae7424ed931afe9259b2da33770ed6105b156e3" + end + + depends_on "cmake" => :build + depends_on "jsoncpp" => :test + + def install + system "cmake", " -S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main (void) { std::cout << "Hello world"; } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-L#{Formula["jsoncpp"].opt_lib}", "-ljsoncpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/v/valkey.rb b/Formula/v/valkey.rb new file mode 100644 index 0000000000000..fe40fdcc22dcf --- /dev/null +++ b/Formula/v/valkey.rb @@ -0,0 +1,56 @@ +class Valkey < Formula + desc "High-performance data structure server that primarily serves key/value workloads" + homepage "https://valkey.io" + url "https://github.com/valkey-io/valkey/archive/refs/tags/9.0.0.tar.gz" + sha256 "088f47e167eb640ea31af48c81c5d62ee56321f25a4b05d4e54a0ef34232724b" + license all_of: [ + "BSD-3-Clause", + "BSD-2-Clause", # deps/jemalloc, deps/linenoise, src/lzf* + "BSL-1.0", # deps/fpconv + "MIT", # deps/lua + any_of: ["CC0-1.0", "BSD-2-Clause"], # deps/hdr_histogram + ] + head "https://github.com/valkey-io/valkey.git", branch: "unstable" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ee3308904a57c7075476c4a2a24acb60cc06902094070bc813c99a0a751cdc30" + sha256 cellar: :any, arm64_sequoia: "e7f33f1532584d45173e4d5abe6f47a0e028ee0d4891b568b41ecaf27615c54f" + sha256 cellar: :any, arm64_sonoma: "f4fa02ca5ef0ed8394333bccc33bc3cf6bb4d78b1ddc97f91599684243273158" + sha256 cellar: :any, sonoma: "ca251acd0cecda0ce5ecae2ad07c7404056d83641650c2b5d1ed065e4b3d0271" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f92b04c0ac2a7483847701f0221f94141dcaafd753492c09a8d20b8c0da221b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ded3d34faf48e176c5828c32371e96204e170e249fc5b03c77bfe64bfb0d8be3" + end + + depends_on "openssl@3" + + conflicts_with "redis", because: "both install `redis-*` binaries" + + def install + system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes" + + %w[run db/valkey log].each { |p| (var/p).mkpath } + + # Fix up default conf file to match our paths + inreplace "valkey.conf" do |s| + s.gsub! "/var/run/valkey_6379.pid", var/"run/valkey.pid" + s.gsub! "dir ./", "dir #{var}/db/valkey/" + s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1") + end + + etc.install "valkey.conf" + etc.install "sentinel.conf" => "valkey-sentinel.conf" + end + + service do + run [opt_bin/"valkey-server", etc/"valkey.conf"] + keep_alive true + error_log_path var/"log/valkey.log" + log_path var/"log/valkey.log" + working_dir var + end + + test do + system bin/"valkey-server", "--test-memory", "2" + %w[run db/valkey log].each { |p| assert_path_exists var/p, "#{var/p} doesn't exist!" } + end +end diff --git a/Formula/v/vals.rb b/Formula/v/vals.rb new file mode 100644 index 0000000000000..a718de10d6cea --- /dev/null +++ b/Formula/v/vals.rb @@ -0,0 +1,48 @@ +class Vals < Formula + desc "Helm-like configuration values loader with support for various sources" + homepage "https://github.com/helmfile/vals" + url "https://github.com/helmfile/vals/archive/refs/tags/v0.42.4.tar.gz" + sha256 "cd0d000a68df7db53b8293859042e776ccbca6dbd001fbd923a329797fdbf9ff" + license "Apache-2.0" + head "https://github.com/helmfile/vals.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1dd0677f69ee1118d5e8c42339f0e0987cc9affa4f05cec4d9c64c6deb8c0164" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1dd0677f69ee1118d5e8c42339f0e0987cc9affa4f05cec4d9c64c6deb8c0164" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1dd0677f69ee1118d5e8c42339f0e0987cc9affa4f05cec4d9c64c6deb8c0164" + sha256 cellar: :any_skip_relocation, sonoma: "6238133f4742520903f5a085623763f002afe5db5225382c3f29d7d39a869847" + sha256 cellar: :any_skip_relocation, arm64_linux: "447e3de3a5efbabe9db5808509e05c916f0a0d65de592318ef8627bb13462b2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3790cbb12224b2ee0e6ef548dd9810381a2aa704f0cbb86ff74934ff2fd79ba4" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version} -X main.commit=#{tap.user}"), "./cmd/vals" + end + + test do + assert_match version.to_s, shell_output("#{bin}/vals version") + + (testpath/"test.yaml").write <<~YAML + foo: "bar" + YAML + output = shell_output("#{bin}/vals eval -f test.yaml") + assert_match "foo: bar", output + + (testpath/"secret.yaml").write <<~YAML + apiVersion: v1 + kind: Secret + metadata: + name: test-secret + data: + username: dGVzdC11c2Vy # base64 encoded "test-user" + password: dGVzdC1wYXNz # base64 encoded "test-pass" + YAML + + output = shell_output("#{bin}/vals ksdecode -f secret.yaml") + assert_match "stringData", output + assert_match "username: test-user", output + assert_match "password: test-pass", output + end +end diff --git a/Formula/v/vamp-plugin-sdk.rb b/Formula/v/vamp-plugin-sdk.rb new file mode 100644 index 0000000000000..b5d62a5fd422e --- /dev/null +++ b/Formula/v/vamp-plugin-sdk.rb @@ -0,0 +1,69 @@ +class VampPluginSdk < Formula + desc "Audio processing plugin system sdk" + homepage "https://www.vamp-plugins.org/" + # curl fails to fetch upstream source, using Debian's instead + url "https://deb.debian.org/debian/pool/main/v/vamp-plugin-sdk/vamp-plugin-sdk_2.10.0.orig.tar.gz" + mirror "https://code.soundsoftware.ac.uk/attachments/download/2691/vamp-plugin-sdk-2.10.0.tar.gz" + sha256 "aeaf3762a44b148cebb10cde82f577317ffc9df2720e5445c3df85f3739ff75f" + license all_of: ["X11", "BSD-3-Clause"] + revision 1 + head "https://code.soundsoftware.ac.uk/hg/vamp-plugin-sdk", using: :hg + + # code.soundsoftware.ac.uk has SSL certificate verification issues, so we're + # using Debian in the interim time. If/when the `stable` URL returns to + # code.soundsoftware.ac.uk, the previous `livecheck` block should be + # reinstated: https://github.com/Homebrew/homebrew-core/pull/75104 + livecheck do + url "https://deb.debian.org/debian/pool/main/v/vamp-plugin-sdk/" + regex(/href=.*?vamp-plugin-sdk[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9bb7224a25dadc8224c09bee6594dcd2003a0d8a9f43f3bc392d889923ffb539" + sha256 cellar: :any, arm64_sequoia: "0fd18a6d81ea391818744555984ec3b2f8052f801a097be6511dc4589d9810fc" + sha256 cellar: :any, arm64_sonoma: "1ba7dd45b17c25c2eecfa787ee7ca90509534e91492351c5237acd33be37b3b7" + sha256 cellar: :any, arm64_ventura: "000ee83ec09f5d546c480315b154076d94e56006892509f8bf31796d9361331d" + sha256 cellar: :any, sonoma: "046ceaa07d234cb1e8bb83998f35a0a9d8188e0a650c5f56b89556ca2926cc95" + sha256 cellar: :any, ventura: "db668adf1c325b7714a5212f2c8aaf55f6eed7cf9486e58a4573334a13555812" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9db23c618723a54ba3fdf8481efeb39a46aed83c59c699eebb5e78e888f4aa0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9cb9dabefa0df5e50224c77c88a1b892f59fecbad8f987ac2cc94a87fd09a55" + end + + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "libogg" + depends_on "libsndfile" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "vamp-sdk/Plugin.h" + #include + + class MyPlugin : public Vamp::Plugin { }; + + const VampPluginDescriptor * + vampGetPluginDescriptor(unsigned int version, unsigned int index) { return NULL; } + CPP + + flags = if OS.mac? + ["-Wl,-dylib"] + else + ["-shared", "-fPIC"] + end + + system ENV.cxx, "test.cpp", "-I#{include}", *flags, "-o", shared_library("test") + assert_match "Usage:", shell_output("#{bin}/vamp-rdf-template-generator 2>&1", 2) + + cp "#{lib}/vamp/vamp-example-plugins.so", testpath/shared_library("vamp-example-plugins") + ENV["VAMP_PATH"]=testpath + assert_match "amplitudefollower", shell_output("#{bin}/vamp-simple-host -l") + end +end diff --git a/Formula/v/vapor.rb b/Formula/v/vapor.rb new file mode 100644 index 0000000000000..07b7ec5e8aa02 --- /dev/null +++ b/Formula/v/vapor.rb @@ -0,0 +1,36 @@ +class Vapor < Formula + desc "Command-line tool for Vapor (Server-side Swift web framework)" + homepage "https://vapor.codes" + url "https://github.com/vapor/toolbox/archive/refs/tags/19.2.0.tar.gz" + sha256 "c2970459166469afe8614ecdca33dae556a5e2fb386b92eeba2498af9014fc60" + license "MIT" + head "https://github.com/vapor/toolbox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b6716440de079f3dfbeb56279efdfa6cdcee4e14c23dff68238146868e3b7c85" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f2c6943fa3c7ce08edf4fe755bc457fd5182b5cbefbb8d72c529c9c725b7a29" + sha256 cellar: :any, arm64_sonoma: "e4eb5458e494f81f695d6be97343d49befba175e46d1408f2d97d39ad60a9e3e" + sha256 cellar: :any, arm64_ventura: "485828ab22141232f3b316fe8bb6d71140de71ef521de4854a1500b922ba093b" + sha256 cellar: :any, sonoma: "286cab5c6174a01ace08ae6c190aff18d484b7466ea718164bea75ced45540db" + sha256 cellar: :any, ventura: "140bed5e1eb6392a50317549580f1ed06031cc684c32337cc28e668e92d71e89" + sha256 arm64_linux: "3c7444e3bc22eda208626e10ebf482b669a7fe043cd83912ed9227e4e8b5a681" + sha256 x86_64_linux: "68d00588ea3a03d785c0e2fd0745d3310136cd5f366de20a9b2db8142d0be06b" + end + + uses_from_macos "swift", since: :sequoia # Swift 6.0 + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "-Xswiftc", "-cross-module-optimization" + bin.install ".build/release/vapor" + end + + test do + system bin/"vapor", "new", "hello-world", "-n" + assert_path_exists testpath/"hello-world/Package.swift" + end +end diff --git a/Formula/v/vapoursynth-imwri.rb b/Formula/v/vapoursynth-imwri.rb new file mode 100644 index 0000000000000..5ff6877f1028c --- /dev/null +++ b/Formula/v/vapoursynth-imwri.rb @@ -0,0 +1,56 @@ +class VapoursynthImwri < Formula + desc "VapourSynth filters - ImageMagick HDRI writer/reader" + homepage "https://github.com/vapoursynth/vs-imwri" + url "https://github.com/vapoursynth/vs-imwri/archive/refs/tags/R2.tar.gz" + sha256 "f4d2965d32877005d0709bd8339828f951885a0cb51e0c006d123ede0b74307b" + license "LGPL-2.1-or-later" + revision 3 + version_scheme 1 + head "https://github.com/vapoursynth/vs-imwri.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cc90cc4f2d65c9f885c7fe4557766fdfb19a868f1a6ef9166803851a3fb8d798" + sha256 cellar: :any, arm64_sequoia: "05e577ee12e4337fb9af5870c39c485e5e7a5ac4b56365361e9c2e7e35eca388" + sha256 cellar: :any, arm64_sonoma: "2bbe0c55617799e49cfd693a838565894dc7ecb5fbcaef0b72e9103da674999d" + sha256 cellar: :any, arm64_ventura: "8795d8f3142e89ca1785f5d83312ab82ae4c24dc0e92b54aae294dbca1d14d0c" + sha256 cellar: :any, sonoma: "6ffe0859ceae64e20741fb000a0319b456dd51d437e35e79f354eabcdface889" + sha256 cellar: :any, ventura: "92866496e81b76604e8f4fbd5cab2d6d94d2f83cb4521e731802445ebcbd86e6" + sha256 arm64_linux: "f90a76a7b71b8d829a4f90c0969b2f7321f849f1ab9616f136cf943ffe198d10" + sha256 x86_64_linux: "099e77da73bbc6d8333e6067705d531ba193d3a496d8c99fc5287f7bec4f5ac2" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "imagemagick" + depends_on "vapoursynth" + + on_macos do + depends_on "jpeg-xl" + depends_on "libheif" + depends_on "libtiff" + end + + def install + # Upstream build system wants to install directly into vapoursynth's libdir and does not respect + # prefix, but we want it in a Cellar location instead. + inreplace "meson.build", + "install_dir = vapoursynth_dep.get_variable(pkgconfig: 'libdir') / 'vapoursynth'", + "install_dir = '#{lib}/vapoursynth'" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + python = Formula["vapoursynth"].deps + .find { |d| d.name.match?(/^python@\d\.\d+$/) } + .to_formula + .opt_libexec/"bin/python" + system python, "-c", "from vapoursynth import core; core.imwri" + end +end diff --git a/Formula/v/vapoursynth-ocr.rb b/Formula/v/vapoursynth-ocr.rb new file mode 100644 index 0000000000000..e4d6e7db6f580 --- /dev/null +++ b/Formula/v/vapoursynth-ocr.rb @@ -0,0 +1,49 @@ +class VapoursynthOcr < Formula + desc "VapourSynth filters - Tesseract OCR filter" + homepage "https://www.vapoursynth.com" + url "https://github.com/vapoursynth/vs-ocr/archive/refs/tags/R3.tar.gz" + sha256 "e9da11b7f5f3e4acfee5890729769217aa5b385bb573cb303c2661d8d8a83712" + license "MIT" + version_scheme 1 + head "https://github.com/vapoursynth/vs-ocr.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "7170ccabb3adf8e0a5bd54ca6c531b3d0d54b2c7f8455aa912096ed3458ca048" + sha256 cellar: :any, arm64_sequoia: "59e7198e55f020269ef5dba9f54c07b67c5a789379df455ec634e6b236a129b0" + sha256 cellar: :any, arm64_sonoma: "780ee3e48072500cbe2847c42e301fae220ec8a6d5cb2104c5c43cecc7a7feb7" + sha256 cellar: :any, arm64_ventura: "cd5724d21e95a31025bf0d0bad580406d2b3921a1afbd0778a3fafe123809b70" + sha256 cellar: :any, sonoma: "2106c78c52a64e3dee5fffaf924358216e2a4d962614d47dc1055721d0e535fe" + sha256 cellar: :any, ventura: "04e3d8edb77293bb176d2757f36ad28deb8d1c4fd571c7de3a95e04395ed731f" + sha256 arm64_linux: "4e8060e44aa0bb280d0338e204154016949a9d54e5c9216849c0ef3f276fba73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ba3f2ce6d29c86e69853b445c6b8a4a4f95c26f88dc7e3947ecea9845009882" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "tesseract" + depends_on "vapoursynth" + + def install + # Upstream build system wants to install directly into vapoursynth's libdir and does not respect + # prefix, but we want it in a Cellar location instead. + inreplace "meson.build", + "install_dir : join_paths(vapoursynth_dep.get_pkgconfig_variable('libdir'), 'vapoursynth')", + "install_dir : '#{lib}/vapoursynth'" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + python = Formula["vapoursynth"].deps + .find { |d| d.name.match?(/^python@\d\.\d+$/) } + .to_formula + .opt_libexec/"bin/python" + system python, "-c", "from vapoursynth import core; core.ocr" + end +end diff --git a/Formula/v/vapoursynth-sub.rb b/Formula/v/vapoursynth-sub.rb new file mode 100644 index 0000000000000..6a07031c69f2e --- /dev/null +++ b/Formula/v/vapoursynth-sub.rb @@ -0,0 +1,58 @@ +class VapoursynthSub < Formula + desc "VapourSynth filters - Subtitling filter" + homepage "https://www.vapoursynth.com" + url "https://github.com/vapoursynth/subtext/archive/refs/tags/R5.tar.gz" + sha256 "d1e4649c5417e671679753840ae0931cdbd353a862333129d7bd600770fd3db8" + license "MIT" + revision 2 + version_scheme 1 + head "https://github.com/vapoursynth/subtext.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "66be173efb94e72979fb21fd34617d7dbfe31fc1a59a91fd327264303753c0d7" + sha256 cellar: :any, arm64_sequoia: "4c5a5ece07feae55fe604f485bf45c3005565a2479ce6cb318f0732bddd529ff" + sha256 cellar: :any, arm64_sonoma: "73845ff92fa1677f86fbbccf84d5e2cd461078f650fe1372edefa4f9e7538b41" + sha256 cellar: :any, arm64_ventura: "8d5b3e8589adfc64e774b1b9f717406c56b552aea8f4cdd8ac97750411492e91" + sha256 cellar: :any, sonoma: "c4fa3e6025b1835664760fa97c5971cf31179cddae818de5d18e03655e04bcfc" + sha256 cellar: :any, ventura: "047cfdebb5cf5bee06d1238db056ab7a70896b040bb25c7ffffe0d94f025504a" + sha256 arm64_linux: "2bbe3501f1c999b11558063e691155ead7aaa80b6e68ee9f69e0ec992b3835e4" + sha256 x86_64_linux: "20aa5b0a19e74a404e14a24328ff7de1e07101682c44063d57677d50d7b3007e" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "libass" + depends_on "vapoursynth" + + # Apply open PR to support FFmpeg 8 + # PR ref: https://github.com/vapoursynth/subtext/pull/17 + patch do + url "https://github.com/vapoursynth/subtext/commit/09c9e2bb87a635cdc5377c70983f8ceb7fae5841.patch?full_index=1" + sha256 "362498e7e97d5039dcf6bed4b146e6f3995dda321ceb4c78545e44dbe5062255" + end + + def install + # Upstream build system wants to install directly into vapoursynth's libdir and does not respect + # prefix, but we want it in a Cellar location instead. + inreplace "meson.build", + "install_dir : join_paths(vapoursynth_dep.get_pkgconfig_variable('libdir'), 'vapoursynth')", + "install_dir : '#{lib}/vapoursynth'" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + python = Formula["vapoursynth"].deps + .find { |d| d.name.match?(/^python@\d\.\d+$/) } + .to_formula + .opt_libexec/"bin/python" + system python, "-c", "from vapoursynth import core; core.sub" + end +end diff --git a/Formula/v/vapoursynth.rb b/Formula/v/vapoursynth.rb new file mode 100644 index 0000000000000..9f377805a2e38 --- /dev/null +++ b/Formula/v/vapoursynth.rb @@ -0,0 +1,79 @@ +class Vapoursynth < Formula + desc "Video processing framework with simplicity in mind" + homepage "https://www.vapoursynth.com" + url "https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R72.tar.gz" + sha256 "650f77feebfd08842b521273f59e0c88f7ba9d7cb5f151d89b79b8dfdd4ce633" + license "LGPL-2.1-or-later" + revision 1 + head "https://github.com/vapoursynth/vapoursynth.git", branch: "master" + + livecheck do + url :stable + regex(/^R(\d+(?:\.\d+)*?)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6e25798f5037641754cc810363dfb6c171ad60db37149c15d581de01bd85d975" + sha256 cellar: :any, arm64_sequoia: "1be3b17dd888bd35931e513d9501c1ae3d13ca8df129360400e9a37e28c19122" + sha256 cellar: :any, arm64_sonoma: "b019ea2a813d43818d534d047a82ca353915ffa336517f822212fb7802c700b6" + sha256 cellar: :any, sonoma: "363c3069fd1c227f6940de2bd5bece455ee1ddb9578ea2fc82cf3d2036aba8f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ee99112759f86db2f64bc4a6966731dd60a863450af3c3f71f0c26c6aef3348" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f6ecf50c9407e1740250ac54fa75bceaf6e936432c265140776703b585cd78f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cython" => :build + depends_on "libtool" => :build + depends_on "nasm" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" + depends_on "zimg" + + # std::to_chars requires at least MACOSX_DEPLOYMENT_TARGET=13.3 + # so it is possible to avoid LLVM dependency on Ventura but the + # bottle would have issues if system was on macOS 13.2 or older. + on_ventura :or_older do + depends_on "llvm" + fails_with :clang + end + + def install + if OS.mac? && MacOS.version <= :ventura + ENV.llvm_clang + ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/c++" + end + + system "./autogen.sh" + inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)" + system "./configure", "--disable-silent-rules", + "--with-cython=#{Formula["cython"].bin}/cython", + "--with-plugindir=#{HOMEBREW_PREFIX}/lib/vapoursynth", + "--with-python_prefix=#{prefix}", + "--with-python_exec_prefix=#{prefix}", + *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + This formula does not contain optional filters that require extra dependencies. + To use vapoursynth.core.sub, execute: + brew install vapoursynth-sub + To use vapoursynth.core.ocr, execute: + brew install vapoursynth-ocr + To use vapoursynth.core.imwri, execute: + brew install vapoursynth-imwri + To use vapoursynth.core.ffms2, execute the following: + brew install ffms2 + ln -s "../libffms2.dylib" "#{HOMEBREW_PREFIX}/lib/vapoursynth/#{shared_library("libffms2")}" + For more information regarding plugins, please visit: + http://www.vapoursynth.com/doc/plugins.html + EOS + end + + test do + system Formula["python@3.14"].opt_bin/"python3.14", "-c", "import vapoursynth" + system bin/"vspipe", "--version" + end +end diff --git a/Formula/v/varlock.rb b/Formula/v/varlock.rb new file mode 100644 index 0000000000000..71ecbffd70986 --- /dev/null +++ b/Formula/v/varlock.rb @@ -0,0 +1,36 @@ +class Varlock < Formula + desc "Add declarative schema to .env files using @env-spec decorator comments" + homepage "https://varlock.dev" + url "https://registry.npmjs.org/varlock/-/varlock-0.1.0.tgz" + sha256 "144bbb4616dce7582a23539795390f9b12a25978326fd955f43fc9d2f1389369" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8f3b1b90979da00d84dcbe63dc5f1b6532030336b0f8e3049de72815397f9af7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/varlock --version") + + (testpath/".env.schema").write <<~TEXT + # This is the header, and may contain root decorators + # @envFlag=APP_ENV + # @defaultSensitive=false @defaultRequired=false + # @generateTypes(lang=ts, path=env.d.ts) + # --- + + # This is a config item comment block and may contain decorators which affect only the item + # @required @type=enum(dev, test, staging, prod) + APP_ENV=dev + TEXT + + assert_match "dev", shell_output("#{bin}/varlock load 2>&1") + end +end diff --git a/Formula/v/varnish.rb b/Formula/v/varnish.rb new file mode 100644 index 0000000000000..bc4731b0d16d2 --- /dev/null +++ b/Formula/v/varnish.rb @@ -0,0 +1,109 @@ +class Varnish < Formula + desc "High-performance HTTP accelerator" + homepage "https://www.varnish-cache.org/" + url "https://varnish-cache.org/_downloads/varnish-8.0.0.tgz" + mirror "https://fossies.org/linux/www/varnish-8.0.0.tgz" + sha256 "633b8c4706591ceae241c8432ef84f7c5ef9787f4eea535babf5fc6c6111ad5b" + license "BSD-2-Clause" + + livecheck do + url "https://varnish-cache.org/releases/" + regex(/href=.*?varnish[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0a8d6152d4ad247cd6db1428e8e1623962e2e36e37845885b938149cb8ef9b75" + sha256 arm64_sequoia: "d2344af09a8923209d5574df6a82d7259e89c178d3eb9d3d171cd331b24e079f" + sha256 arm64_sonoma: "9d45e69a4fe1ac7c0ac795ccabbd42ca112d505d89e6e9ae6f7ea285d5ca456a" + sha256 sonoma: "9365b9f88df4e9f64ec4f3029314bcc02f9145e30162b338d33310c3a4922da0" + sha256 arm64_linux: "96e866901ed4adc75cc7ffd649220ac99f4218659918dc362dfa110baff1182c" + sha256 x86_64_linux: "f962e3926627d4613fc452eb9ed4d976e11449f98a660a937cb7e2953e75c16e" + end + + depends_on "docutils" => :build + depends_on "graphviz" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "pcre2" + + uses_from_macos "python" => :build + uses_from_macos "libedit" + uses_from_macos "ncurses" + + def install + system "./configure", "--localstatedir=#{var}", *std_configure_args + + # flags to set the paths used by varnishd to load VMODs and VCL, + # pointing to the ${HOMEBREW_PREFIX}/ shared structure so other packages + # can install VMODs and VCL. + ENV.append_to_cflags "-DVARNISH_VMOD_DIR='\"#{HOMEBREW_PREFIX}/lib/varnish/vmods\"'" + ENV.append_to_cflags "-DVARNISH_VCL_DIR='\"#{pkgetc}:#{HOMEBREW_PREFIX}/share/varnish/vcl\"'" + + # Fix missing pthread symbols on Linux + ENV.append_to_cflags "-pthread" if OS.linux? + + system "make", "install", "CFLAGS=#{ENV.cflags}" + + (etc/"varnish").install "etc/example.vcl" => "default.vcl" + (var/"varnish").mkpath + + (pkgshare/"tests").install buildpath.glob("bin/varnishtest/tests/*.vtc") + (pkgshare/"tests/vmod").install buildpath.glob("vmod/tests/*.vtc") + end + + service do + run [opt_sbin/"varnishd", "-n", var/"varnish", "-f", etc/"varnish/default.vcl", "-s", "malloc,1G", "-T", + "127.0.0.1:2000", "-a", "127.0.0.1:8080", "-F"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"varnish/varnish.log" + error_log_path var/"varnish/varnish.log" + end + + test do + assert_match version.to_s, shell_output("#{sbin}/varnishd -V 2>&1") + + # run a subset of the varnishtest tests: + # - b*.vtc (basic functionality) + # - m*.vtc (VMOD modules, including loading), but skipping m00000.vtc which is known to fail + # but is "nothing of concern" (see varnishcache/varnish-cache#3710) + # - u*.vtc (utilities and background processes) + testpath = pkgshare/"tests" + timeout_tests = [ + testpath/"m00000.vtc", + testpath/"b00047.vtc", + testpath/"b00084.vtc", + testpath/"b00086.vtc", + testpath/"u00008.vtc", + ] + + # test suites need libvmod_debug.so, see discussions in https://github.com/varnishcache/varnish-cache/issues/4393 + debug_tests = [ + testpath/"b00040.vtc", + testpath/"b00070.vtc", + testpath/"b00085.vtc", + testpath/"b00092.vtc", + testpath/"m00019.vtc", + testpath/"m00021.vtc", + testpath/"m00023.vtc", + testpath/"m00022.vtc", + testpath/"b00060.vtc", + testpath/"m00025.vtc", + testpath/"m00027.vtc", + testpath/"m00048.vtc", + testpath/"m00049.vtc", + testpath/"m00054.vtc", + testpath/"m00053.vtc", + testpath/"m00051.vtc", + testpath/"m00052.vtc", + testpath/"m00059.vtc", + testpath/"m00060.vtc", + testpath/"m00061.vtc", + ] + tests = testpath.glob("[bmu]*.vtc") - timeout_tests - debug_tests + # -j: run the tests (using up to half the cores available) + # -q: only report test failures + # varnishtest will exit early if a test fails (use -k to continue and find all failures) + system bin/"varnishtest", "-j", [Hardware::CPU.cores / 2, 1].max, "-q", *tests + end +end diff --git a/Formula/v/vault-cli.rb b/Formula/v/vault-cli.rb new file mode 100644 index 0000000000000..d572105a5c472 --- /dev/null +++ b/Formula/v/vault-cli.rb @@ -0,0 +1,33 @@ +class VaultCli < Formula + desc "Subversion-like utility to work with Jackrabbit FileVault" + homepage "https://jackrabbit.apache.org/filevault/index.html" + url "https://search.maven.org/remotecontent?filepath=org/apache/jackrabbit/vault/vault-cli/4.1.4/vault-cli-4.1.4-bin.tar.gz" + sha256 "f832ab743b3b0947565fbd2cad652ad4a314156e63fd95db4ab619f4cf6aa38c" + license "Apache-2.0" + head "https://github.com/apache/jackrabbit-filevault.git", branch: "master" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/apache/jackrabbit/vault/vault-cli/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "a3610c6dd06f06450d668e4461d1ed15cd68fe0a0e7e0b1e6292f350a33cd207" + end + + depends_on "openjdk" + + def install + # Remove windows files + rm(Dir["bin/*.bat"]) + + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files(libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix) + end + + test do + # Bad test, but we're limited without a Jackrabbit repo to speak to... + system bin/"vlt", "--version" + end +end diff --git a/Formula/v/vaulted.rb b/Formula/v/vaulted.rb new file mode 100644 index 0000000000000..642beb955b5b7 --- /dev/null +++ b/Formula/v/vaulted.rb @@ -0,0 +1,40 @@ +class Vaulted < Formula + desc "Allows the secure storage and execution of environments" + homepage "https://github.com/miquella/vaulted" + url "https://github.com/miquella/vaulted/archive/refs/tags/v3.0.0.tar.gz" + sha256 "ea5183f285930ffa4014d54d4ed80ac8f7aa9afd1114e5fce6e65f2e9ed1af0c" + license "MIT" + head "https://github.com/miquella/vaulted.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7f919c6220160dc33b1658f61720477353a695f4aaa379b6f174e30ff79a9b87" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a7d20c4d22958ce6a36c53ae40821c077a31bfcce9df74593bc83a7bcf318332" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7fde70166c645a842baec036f638bc3e0435f22bcc2c16fd2e81186ff200c882" + sha256 cellar: :any_skip_relocation, arm64_ventura: "43bb79ce25f0da8778ab20ed2bbb322674d256edb638cb00b502eb1dec31dee4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "af4905ab6698699c3f794645c49052db9bac1a63f025f35ec81f21c057a38faf" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7cdbcf9ca2bf59f73b8dad9d409410bc49c5e682def3025b543d57ec29ab88ac" + sha256 cellar: :any_skip_relocation, sonoma: "8462a0d5dfcc77e7f6ea5975ea9c10a83444a66139b20d667473db42e7959362" + sha256 cellar: :any_skip_relocation, ventura: "1d176247a329b9986e3d85dc57cc01f1296268c647b7c60b70219adb25847735" + sha256 cellar: :any_skip_relocation, monterey: "bd52afb1a8d91c97a398e247f115fd65fdb77635a8148059bacafc2473ec6fbc" + sha256 cellar: :any_skip_relocation, big_sur: "6d28ce78d9de727b84a069328160ec719db14789645e6088d67eeab462085722" + sha256 cellar: :any_skip_relocation, catalina: "6e28a27d6d1c24b2cd7d3ca0ff147a8309425dcd1d405861378bd40c191af5d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "811cae4f0e603c7c8e604481168308176c1120bf57e45ea80a1145e76558a2b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3acf911a97ce6aa9aacff3d0e39c70d497e2b2b808a5ebe620301259035988c3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + man1.install Dir["doc/man/vaulted*.1"] + end + + test do + (testpath/".local/share/vaulted").mkpath + touch(".local/share/vaulted/test_vault") + output = IO.popen([bin/"vaulted", "ls"], &:read) + output == "test_vault\n" + end +end diff --git a/Formula/v/vbindiff.rb b/Formula/v/vbindiff.rb new file mode 100644 index 0000000000000..7902ebd79bbbc --- /dev/null +++ b/Formula/v/vbindiff.rb @@ -0,0 +1,43 @@ +class Vbindiff < Formula + desc "Visual Binary Diff" + homepage "https://www.cjmweb.net/vbindiff/" + url "https://www.cjmweb.net/vbindiff/vbindiff-3.0_beta5.tar.gz" + sha256 "f04da97de993caf8b068dcb57f9de5a4e7e9641dc6c47f79b60b8138259133b8" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?vbindiff[._-]v?(\d+(?:\.\d+)+(?:.?beta\d+)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e2e6e0b5616b035911aed46c5ab5fe7649886d86dbc880ea42e8c64cb70816c7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a3b8297335705d8d6c97b391d707bd8c19d30b84d36e8f045065490230a1298" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dba50c94e878fd349ce1d2b73a8029d0441d22a59aac179e717ad32839f4a9af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2765e76b73db2ad73a57dacd123cebc482dbc90dcded199f38d45fa5b3b63fad" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d8075454b11304c47a1e77537da4abe37c6188b0cd53c8d74cf920ec9f0015a1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2ded05d39834aefcfefe2639b2c861410dd94a6a1213ef892f8b5bfd4c1624b9" + sha256 cellar: :any_skip_relocation, sonoma: "8ea8ad10cca27cd58a5d1b5e34b2160624eae1d7c36c4e07e31a9c4289c98e84" + sha256 cellar: :any_skip_relocation, ventura: "b937359639366c69a2b3227d6c1c5ce6590fcbf30e7a8242e87e37772f42c575" + sha256 cellar: :any_skip_relocation, monterey: "e6a1e5857b109bfc7d8f195d34dac26362adba2650385edbc23de485cf4c49f0" + sha256 cellar: :any_skip_relocation, big_sur: "0e5988880d2866314fe6fae0eb5ce97c863396553f9575d6d70b0da8b2b66128" + sha256 cellar: :any_skip_relocation, catalina: "c7e303922a1f33af5fe107d192a530cfb3d545a55d4b7e681cdb5603e24cdfb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1775e6fbae0723ad70926c4fe72cf62b4627880df9d2c05ae035eec0813ec335" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e67eb1ec328a7cdfc6a1ffa6f6b8cdf60f106040ef5714d6b1b15067a37f6214" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"vbindiff", "-L" + end +end diff --git a/Formula/v/vc.rb b/Formula/v/vc.rb new file mode 100644 index 0000000000000..ef8508ca47283 --- /dev/null +++ b/Formula/v/vc.rb @@ -0,0 +1,50 @@ +class Vc < Formula + desc "SIMD Vector Classes for C++" + homepage "https://github.com/VcDevel/Vc" + url "https://github.com/VcDevel/Vc/archive/refs/tags/1.4.5.tar.gz" + sha256 "eb734ef4827933fcd67d4c74aef54211b841c350a867c681c73003eb6d511a48" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d53132f09cec1f76a87908c55b8483b14597f078a4f94e54fd9db46e2d3d3011" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "789847027f8d06a5d306ffcf999f7080b0e257e9e336b557b78beb70f1ac4c3a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "12e14e942d2a5731d3887be279807412ce7f5a8aee97299db2e4f9bc7018d307" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc7cfc2f7ab132f3e877d9457d4683335ea23453934447352567e71e19812cf5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1112be197628e9954b83528bdac5ea8899bcac4957ae808ffebc47ec08bae054" + sha256 cellar: :any_skip_relocation, sonoma: "de1f4a4224f4cb2a9b8cccbcc8bff55f6b54cc060df433f265cb6268e13beece" + sha256 cellar: :any_skip_relocation, ventura: "b718e2c8384e24be4668186f14e6a05e025e9244888c91a88ff2c30d0dc6658e" + sha256 cellar: :any_skip_relocation, monterey: "6710920fa0199be3b39e5bb10c0ac93f57b322637eadd606d7e307b149c93b08" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cebe6014bee0f108e6ca0d508c87907d81167b67c6561a9eab3a1ecf3254355" + sha256 cellar: :any_skip_relocation, x86_64_linux: "885b412d8d27d60b3db7c1a9ee1c6b2a41034e08bafd030f5e363a6e1301e7eb" + end + + depends_on "cmake" => :build + + def install + ENV.runtime_cpu_detection + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + using Vc::float_v; + using Vec3D = std::array; + + float_v scalar_product(Vec3D a, Vec3D b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + } + + int main(){ + return 0; + } + CPP + extra_flags = [] + extra_flags += ["-lm", "-lstdc++"] unless OS.mac? + system ENV.cc, "test.cpp", "-std=c++11", "-L#{lib}", "-lVc", *extra_flags, "-o", "test" + system "./test" + end +end diff --git a/Formula/v/vc4asm.rb b/Formula/v/vc4asm.rb new file mode 100644 index 0000000000000..044cee2340415 --- /dev/null +++ b/Formula/v/vc4asm.rb @@ -0,0 +1,57 @@ +class Vc4asm < Formula + desc "Macro assembler for Broadcom VideoCore IV aka Raspberry Pi GPU" + homepage "https://maazl.de/project/vc4asm/doc/index.html" + url "https://github.com/maazl/vc4asm/archive/refs/tags/V0.3.tar.gz" + sha256 "f712fb27eb1b7d46b75db298fd50bb62905ccbdd7c0c7d27728596c496f031c2" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "212c820e20fe7369665a9193ac74df93754800cd6b538a8a1b76957310a844ac" + sha256 cellar: :any, arm64_sequoia: "c66f2ce86c71a5c824c8e0f19edd39b714ae56d6f3ebdfc287fa7549e66a8f2d" + sha256 cellar: :any, arm64_sonoma: "8292e0e5586e00d1e0c74c5b411ac925547a0b46dbdbd3ca54b7ffc95eed2248" + sha256 cellar: :any, arm64_ventura: "49337c5ba68c5868f9804568af0ab0fc29223eee04b6f50154fa30ef49fb23f1" + sha256 cellar: :any, arm64_monterey: "af417dc649bc49003da98b9756e05da700076907cc4963818b839b817f721bc5" + sha256 cellar: :any, arm64_big_sur: "64082d8d1fd7f2a360f9ffdd29a9fbde0a24b600f38806bc4556e4ea9b5175bc" + sha256 cellar: :any, sonoma: "87bd89c5992b3b7fdbd6d87bcc9fe0a96958dddbb4cad8ee1210d19d84b32c49" + sha256 cellar: :any, ventura: "3962b9835cebd3238c331effab584026a12adfec4be373c174e7f7575a9e8ff7" + sha256 cellar: :any, monterey: "1a80a7ddd01b91da357ecae8507af244f0dde770275e36ee523b0da7c0f489f4" + sha256 cellar: :any, big_sur: "1eefbd03ec375b8021eb783af2fdf5e343c5548201eddbb29e6cf9b6db47e80c" + sha256 cellar: :any, catalina: "cd4f683e1e968cb0577b7e6d9b054c503719b10f9bd37442feb8481a19d75fd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6fa60166e7cf2540a0a7f87c2b179b3b0bb2df5e9c9a764cf883c5b03baab18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c0fe82118a412102288a10b2470baa741000c5448d6a1fa719fd8974daf73eb" + end + + depends_on "cmake" => :build + + # Backport fix for GCC 9+ + patch do + url "https://github.com/maazl/vc4asm/commit/ff16f635b07e14b07c1de69bf322e3bf7feecd93.patch?full_index=1" + sha256 "b4c6e87018aa512ff8398cc77bd3f80dd9aaca196c3da76a845db7e25eaac99b" + end + + def install + # Upstream create a "CMakeCache.txt" directory in their tarball + # because they don't want CMake to write a cache file, but brew + # expects this to be a file that can be copied to HOMEBREW_LOGS + rm_r "CMakeCache.txt" + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.qasm").write <<~ASM + mov -, sacq(9) + add r0, r4, ra1.unpack8b + add.unpack8ai r0, r4, ra1 + add r0, r4.8a, ra1 + ASM + system bin/"vc4asm", "-o test.hex", "-V", "#{share}/vc4inc/vc4.qinc", "test.qasm" + end +end diff --git a/Formula/v/vcdimager.rb b/Formula/v/vcdimager.rb new file mode 100644 index 0000000000000..15eb2ce4d44e8 --- /dev/null +++ b/Formula/v/vcdimager.rb @@ -0,0 +1,41 @@ +class Vcdimager < Formula + desc "(Super) video CD authoring solution" + homepage "https://www.gnu.org/software/vcdimager/" + url "https://ftpmirror.gnu.org/gnu/vcdimager/vcdimager-2.0.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/vcdimager/vcdimager-2.0.1.tar.gz" + sha256 "67515fefb9829d054beae40f3e840309be60cda7d68753cafdd526727758f67a" + license "GPL-2.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4fc5cf3e045233757dcf29a78fb731148d3c5ce9692df7825024b0b3ae66619e" + sha256 cellar: :any, arm64_sequoia: "2dbaab4b58479eca7337c3648f97c5f77bb8fb2ee40fd065b931215a16d52330" + sha256 cellar: :any, arm64_sonoma: "3b3614dbce9b743fb1f7e31e2dfdd0a59ac7949277c5fb712c09d0fbdef0751d" + sha256 cellar: :any, arm64_ventura: "826dc8ca62806a582b3f6380e63c459e7f720a4a1d038fd9a3e9ddd0b6b0e260" + sha256 cellar: :any, sonoma: "ead756089657c553a3d6e6f0fe321aa4075743698b15525101fcd6196bd1584f" + sha256 cellar: :any, ventura: "418377dbcee1226a016018065deea7a062aff9dd367fc04af9ddd58ada1307a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ea9d3fa898a61767152f2a7fbdddc2375a42a10b24b7c38542d509d760bc7a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0352ab14296e214d729962fb5c50eb822c7abcacede083e5107c273a908fbaee" + end + + depends_on "pkgconf" => :build + depends_on "libcdio" + depends_on "popt" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"vcdimager", "--help" + end +end diff --git a/Formula/v/vcftools.rb b/Formula/v/vcftools.rb new file mode 100644 index 0000000000000..7b7e229f420c0 --- /dev/null +++ b/Formula/v/vcftools.rb @@ -0,0 +1,40 @@ +class Vcftools < Formula + desc "Tools for working with VCF files" + homepage "https://vcftools.github.io/" + url "https://github.com/vcftools/vcftools/releases/download/v0.1.17/vcftools-0.1.17.tar.gz" + sha256 "b9e0e1c3e86533178edb35e02c6c4de9764324ea0973bebfbb747018c2d2a42c" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b0b552db414a764f26d3c91714e2fb2cc4711cb0d5e55bbdd063773eaf765ec0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "241688b646045d5427f84c0648839563ae007188dc724b11e75b9bd02a21aef3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be6b8bad02dbcd148cede55aa64faef15f37fc232957c663f7726707754955f1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "352df490e413cc6dc659bca5ddb0fa6f4875471593ebc8877f92a265da6a29c5" + sha256 cellar: :any_skip_relocation, sonoma: "ca95fbb22ea7a18e989e5d939026e235a4cd368fe21836db529fdc2ac148554a" + sha256 cellar: :any_skip_relocation, ventura: "db860e18120257d1a4da7bcfd454b072c63af840398ef75c25b7115039954e8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1f4780fa49479f742e3ff4c9a56f628c5bb89158f78f88172b450b78a7bbe8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3fffa5c3dcaf6f4f200c540e6d1bd4944c9e3840756c190dfcbbe787f2bd164e" + end + + depends_on "pkgconf" => :build + depends_on "htslib" + + def install + system "./configure", "--disable-silent-rules", + "--with-pmdir=lib/perl5/site_perl", + *std_configure_args + system "make", "install" + + bin.env_script_all_files(libexec/"bin", PERL5LIB: lib/"perl5/site_perl") + end + + test do + (testpath/"test.vcf").write <<~EOS + ##fileformat=VCFv4.0 + #CHROM POS ID REF ALT QUAL FILTER INFO + 1 1 . A C 10 PASS . + EOS + + system bin/"vcf-validator", "test.vcf" + end +end diff --git a/Formula/v/vcluster.rb b/Formula/v/vcluster.rb new file mode 100644 index 0000000000000..c0c88e2e1825a --- /dev/null +++ b/Formula/v/vcluster.rb @@ -0,0 +1,45 @@ +class Vcluster < Formula + desc "Creates fully functional virtual k8s cluster inside host k8s cluster's namespace" + homepage "https://www.vcluster.com" + url "https://github.com/loft-sh/vcluster.git", + tag: "v0.30.0", + revision: "6ba617b4d88a4211442d0efae4bd5cacce6c085a" + license "Apache-2.0" + head "https://github.com/loft-sh/vcluster.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "acac963da6a5d36521bf54f188492b1c13dc271c9aedc74987bc8e55c1910f7f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8fd9ab5075be6e3a237a52cceb75db4bc678bd02c3c13a3b9b92853dee972bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "799430f67311f7b035545d997a77b9e08c5041713d8b21515f729de66db60a06" + sha256 cellar: :any_skip_relocation, sonoma: "188be6fcd48ed5430e1ac2c4aeab05190c2b3b7bb5a1d8fb31ea412cf3134d05" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd28ba4ff665db580fd48ebdcbeb6cc1165d447e6e5bd1fcf6ff3f22d8debcf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3d1650b92ef194ae6f0a269edda5b9320095a32c18c3b3228479b58d4a7393c" + end + + depends_on "go" => :build + depends_on "helm" + depends_on "kubernetes-cli" + + def install + ldflags = "-s -w -X main.commitHash=#{Utils.git_head} -X main.buildDate=#{time.iso8601} -X main.version=#{version}" + system "go", "generate", "./..." + system "go", "build", "-mod", "vendor", *std_go_args(ldflags:), "./cmd/vclusterctl" + + generate_completions_from_executable(bin/"vcluster", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/vcluster version") + + output = shell_output("#{bin}/vcluster create vcluster -n vcluster --create-namespace 2>&1", 1) + assert_match "try setting KUBERNETES_MASTER environment variable", output + end +end diff --git a/Formula/v/vcpkg.rb b/Formula/v/vcpkg.rb new file mode 100644 index 0000000000000..93601645d9057 --- /dev/null +++ b/Formula/v/vcpkg.rb @@ -0,0 +1,79 @@ +class Vcpkg < Formula + desc "C++ Library Manager" + homepage "https://github.com/microsoft/vcpkg" + url "https://github.com/microsoft/vcpkg-tool/archive/refs/tags/2025-10-16.tar.gz" + version "2025.10.16" + sha256 "70c25e3c3653e917c8d776c90b35b55490152bec36b8be87ca88491697fde3ef" + license "MIT" + revision 1 + head "https://github.com/microsoft/vcpkg-tool.git", branch: "main" + + # The source repository has pre-release tags with the same + # format as the stable tags. + livecheck do + url :stable + regex(/v?(\d{4}(?:[._-]\d{2}){2})/i) + strategy :github_latest do |json, regex| + match = json["tag_name"]&.match(regex) + next if match.blank? + + match[1].tr("-", ".") + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "873c34e3f99a7997215192fde00f98988237e2c048d90218bbb45bfe08471c6a" + sha256 cellar: :any, arm64_sequoia: "68406e2d085c69d20c67f7e10f46c6255587b117cb776c0321a7be64e1b27944" + sha256 cellar: :any, arm64_sonoma: "0adc67aca72dfe2221783f13ae5941876e39a35606c2bc7e0e0d6063a8e2e3b7" + sha256 cellar: :any, sonoma: "8644221c17f6d1cc616fa4f7be900ab8ba8a78df5c1ec5f05f87d0f12206c8e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e04b09aa086260813feec548f6e2520ff166b5347412f3f832d06930fa13497" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b740efebb04f73e6100e84b9c9449d1a7f6e9cb76154fc2778d5855bdca2c46d" + end + + depends_on "cmake" => :build + depends_on "cmrc" => :build + depends_on "fmt" + depends_on "ninja" # This will install its own copy at runtime if one isn't found. + + # upstream pr ref, https://github.com/microsoft/vcpkg-tool/pull/1826 + patch do + url "https://github.com/microsoft/vcpkg-tool/commit/7e5f9b42018d19172e87236783bb0c713f176b7a.patch?full_index=1" + sha256 "2537ff975b66809c14790887090daacadcdd213123d6356a891667048c3b32fe" + end + + def install + # Improve error message when user fails to set `VCPKG_ROOT`. + inreplace "include/vcpkg/base/message-data.inc.h", + "If you are trying to use a copy of vcpkg that you've built, y", + "Y" + + system "cmake", "-S", ".", "-B", "build", + "-DVCPKG_DEVELOPMENT_WARNINGS=OFF", + "-DVCPKG_BASE_VERSION=#{version.to_s.tr(".", "-")}", + "-DVCPKG_VERSION=#{version}", + "-DVCPKG_DEPENDENCY_EXTERNAL_FMT=ON", + "-DVCPKG_DEPENDENCY_CMAKERC=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + # This is specific to the way we install only the `vcpkg` tool. + def caveats + <<~EOS + This formula provides only the `vcpkg` executable. To use vcpkg: + git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg" + export VCPKG_ROOT="$HOME/vcpkg" + EOS + end + + test do + output = shell_output("#{bin}/vcpkg search sqlite 2>&1", 1) + # DO NOT CHANGE. If the test breaks then the `inreplace` needs fixing. + # No, really, stop trying to change this. + assert_match "You must define", output + refute_match "copy of vcpkg that you've built", output + end +end diff --git a/Formula/v/vcprompt.rb b/Formula/v/vcprompt.rb new file mode 100644 index 0000000000000..a8e3d35eca162 --- /dev/null +++ b/Formula/v/vcprompt.rb @@ -0,0 +1,36 @@ +class Vcprompt < Formula + desc "Provide version control info in shell prompts" + homepage "https://github.com/powerman/vcprompt" + url "https://github.com/powerman/vcprompt/archive/refs/tags/v1.3.0.tar.gz" + sha256 "3db5ebad2e333d43b464b665c8d43b35156b0f144052f10c340a5c5007a6874d" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c88613793fa29e4eef8e6871f9974a4486fc0129194e7ceafe26d257a253d06c" + sha256 cellar: :any, arm64_sequoia: "647b480e6f4b4168c0c89405dfa6351f9a0ae16065be2a90c9822ae958cc789f" + sha256 cellar: :any, arm64_sonoma: "aea4d0a7c13f68e976cfb12ffb42b2ad3d7cbacb46ba0716039d72a8027401e4" + sha256 cellar: :any, arm64_ventura: "a83a4e89e903a4d9c4ec2110d37bac60d699247a24efd4f880787243b090a1ef" + sha256 cellar: :any, sonoma: "172c06fc8931c12d95d40773f0660aa5d26810ef44e9f9007d5b9f116cded777" + sha256 cellar: :any, ventura: "64f638de25d6b06d7a10829a1414982c457bd4d53277b2d7ec172e1a07884362" + sha256 cellar: :any_skip_relocation, arm64_linux: "444f2645da1b8fe40ecc443ab2aa1ca804fa85da5a96c189b54fd1708e1c7037" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d41e332c1f9175c9e63429921c6e96490e6cec5e785736f3a844cb8f9b4da873" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "sqlite" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "PREFIX=#{prefix}", + "MANDIR=#{man1}", + "install" + end + + test do + system bin/"vcprompt" + end +end diff --git a/Formula/v/vcs.rb b/Formula/v/vcs.rb new file mode 100644 index 0000000000000..eb2a0a8fc9599 --- /dev/null +++ b/Formula/v/vcs.rb @@ -0,0 +1,48 @@ +class Vcs < Formula + desc "Creates video contact sheets (previews) of videos" + homepage "https://web.archive.org/web/20240824173847/https://p.outlyer.net/vcs/" + url "https://web.archive.org/web/20240824173847/https://p.outlyer.net/files/vcs/vcs-1.13.4.tar.gz" + sha256 "dc1d6145e10eeed61d16c3591cfe3496a6ac392c9c2f7c2393cbdb0cf248544b" + license "LGPL-2.0-or-later" + revision 3 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "15704818d772bec9a6e0298be99cf2fa16dea6e4365d74d987cf50a3ab144677" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65bbf115d8f6b21bf141e823218b52ce3cae82bfc2c4783d1ffabec160b1c6b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "65bbf115d8f6b21bf141e823218b52ce3cae82bfc2c4783d1ffabec160b1c6b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "65bbf115d8f6b21bf141e823218b52ce3cae82bfc2c4783d1ffabec160b1c6b3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "65bbf115d8f6b21bf141e823218b52ce3cae82bfc2c4783d1ffabec160b1c6b3" + sha256 cellar: :any_skip_relocation, sonoma: "c910f7b36e0b796a03ebf4fa4a7b2adb315188db72901920abc95c790c3edd8e" + sha256 cellar: :any_skip_relocation, ventura: "c910f7b36e0b796a03ebf4fa4a7b2adb315188db72901920abc95c790c3edd8e" + sha256 cellar: :any_skip_relocation, monterey: "c910f7b36e0b796a03ebf4fa4a7b2adb315188db72901920abc95c790c3edd8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c00d07a489a459bf48fb8393815f2a6187822407431cabcd2f6674510e144577" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f48057f0e485f6e6b20d221f4f036e0708d896e6bb3165837e5a96f193710c1b" + end + + deprecate! date: "2025-03-22", because: :repo_removed + + depends_on "ffmpeg" + depends_on "ghostscript" + depends_on "imagemagick" + + on_macos do + depends_on "gnu-getopt" + end + + def install + inreplace "vcs", "declare GETOPT=getopt", "declare GETOPT=#{Formula["gnu-getopt"].opt_bin}/getopt" if OS.mac? + + system "make", "install", "prefix=#{prefix}" + end + + test do + system Formula["ffmpeg"].bin/"ffmpeg", "-f", "rawvideo", "-s", "hd720", + "-pix_fmt", "yuv420p", "-r", "30", "-t", "5", "-i", "/dev/zero", + testpath/"video.mp4" + assert_path_exists testpath/"video.mp4" + + system bin/"vcs", "-i", "1", "-o", testpath/"sheet.png", testpath/"video.mp4" + assert_path_exists testpath/"sheet.png" + end +end diff --git a/Formula/v/vcsh.rb b/Formula/v/vcsh.rb new file mode 100644 index 0000000000000..368480b9a2fd7 --- /dev/null +++ b/Formula/v/vcsh.rb @@ -0,0 +1,39 @@ +class Vcsh < Formula + desc "Config manager based on git" + homepage "https://github.com/RichiH/vcsh" + url "https://github.com/RichiH/vcsh/releases/download/v2.0.10/vcsh-2.0.10.tar.zst" + sha256 "6ed8f4eee683f2cc8f885b31196fdc3b333f86ebc3110ecd1bcd60dfac64c0b4" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3184a9cba5e9b79532e01e2fa7b24478918585c55bed898b0eaed6886390d456" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + # Set GIT, SED, and GREP to prevent + # hardcoding shim references and absolute paths. + # We set this even where we have no shims because + # the hardcoded absolute path might not be portable. + system "./configure", "--without-zsh-completion-dir", + "--without-bash-completion-dir", + "GIT=git", "SED=sed", "GREP=grep", + *std_configure_args + system "make", "install" + + # Make the shebang uniform across macOS and Linux + inreplace bin/"vcsh", %r{^#!/bin/(ba)?sh$}, "#!/usr/bin/env bash" + bash_completion.install "completions/vcsh.bash" => "vcsh" + zsh_completion.install "completions/vcsh.zsh" => "_vcsh" + end + + test do + assert_match "Initialized empty", shell_output("#{bin}/vcsh init test").strip + end +end diff --git a/Formula/v/vde.rb b/Formula/v/vde.rb new file mode 100644 index 0000000000000..d8800f5366989 --- /dev/null +++ b/Formula/v/vde.rb @@ -0,0 +1,40 @@ +class Vde < Formula + desc "Ethernet compliant virtual network" + homepage "https://github.com/virtualsquare/vde-2" + url "https://github.com/virtualsquare/vde-2/archive/refs/tags/v2.3.3.tar.gz" + sha256 "a7d2cc4c3d0c0ffe6aff7eb0029212f2b098313029126dcd12dc542723972379" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + head "https://github.com/virtualsquare/vde-2.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "7d38316ce1948eb727d590d88e81fb5c74f2ae4f0dcd9b7161266a4af1ff2e3b" + sha256 arm64_sequoia: "1e3ffe05a0f354b3909f74d3374fc036156c438147f5ac8dd34a8f747071e9f8" + sha256 arm64_sonoma: "3d2231810ad7229ba6a68178d648ab1f13bdfe50b214cb2d299d644d66e03762" + sha256 arm64_ventura: "982a56825cbd1bd374001330e3492e83a1d82825ed7228d33705ffad3b927e8e" + sha256 arm64_monterey: "0cd674a5b677c8e4deb2735884366f6a384b0867aa7483e7293e361cbaab350e" + sha256 arm64_big_sur: "55d8e9f7b7e4f4593c6a3a4c88f4d6f11c76a8839b876fe63cae40d01e6312dc" + sha256 sonoma: "9015f4eeed08db31898c74789119cbc543776f6eb13f4428da554f5d240c1697" + sha256 ventura: "e203e8f3933c5dcdc45cdaae85f63b31ecd38a86d90eb5f4f0c1fd7825ad2347" + sha256 monterey: "88cc1ceea76bdf304ec6750a2c54c979b34869d853fe6942aff1b23ea213f83e" + sha256 big_sur: "05e4b0a57c14a91bf9fbf6afc1cda903fe07504da5545ba4de72c7bf09d53893" + sha256 catalina: "ff106fafad478b7380d270d0969584e753b0f3592f59b2f43dca8bc86246b2e0" + sha256 arm64_linux: "522952a405fbeafae167b3a044c95156d29ee89adbe317818906e750c0edf557" + sha256 x86_64_linux: "d9ab4e00d44ce831749d0d4363ffee5332295292a5ebcf2d5379d64796b549d9" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"vde_switch", "-v" + end +end diff --git a/Formula/v/vdirsyncer.rb b/Formula/v/vdirsyncer.rb new file mode 100644 index 0000000000000..0ef6a8c32a8c2 --- /dev/null +++ b/Formula/v/vdirsyncer.rb @@ -0,0 +1,166 @@ +class Vdirsyncer < Formula + include Language::Python::Virtualenv + + desc "Synchronize calendars and contacts" + homepage "https://github.com/pimutils/vdirsyncer" + url "https://files.pythonhosted.org/packages/2e/f6/94ed82de371cc80784ffe90e0dac8ce9f5d272c01d614415a5e800ffb303/vdirsyncer-0.20.0.tar.gz" + sha256 "feb1a533500a95c14fd155733a1056fe359192553d82c07c6ba04fcbfc40b12d" + license "BSD-3-Clause" + head "https://github.com/pimutils/vdirsyncer.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "75ab31ff785fba1735d79baea47e6d38838d18785582a45fc68bb5d42657d3b5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c91b81a552b82994bb1aeb26469d33d0dcffb25b1a48028d3cff35ff4dcabfd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30230a16cfd07581a92e4d1b529f94677d2f6f0cbfbb4014604e496e623a9b5b" + sha256 cellar: :any_skip_relocation, tahoe: "60056fb254bc02d0a06b38eff09fe8db64a4024713779ba1ed13e1ed774f47d8" + sha256 cellar: :any_skip_relocation, sequoia: "1bf072ade0401bba421e2d5f47294721014c6ac45960cdc2b8f2e02d4396eb0c" + sha256 cellar: :any_skip_relocation, sonoma: "50f047aa9305c8335bbc586b55db5c02c15cfdbe71b3a19ca9e95464ab9ab997" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd0cfa246d0eb9cbaecae07a26a88566288b402627c69789f8979bd5326791aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d885fef88156092f417a482cf0daa9e986704c527392450b080308f35170689" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages package_name: "vdirsyncer[google]", + exclude_packages: "certifi" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" + sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz" + sha256 "378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67" + end + + resource "aiohttp-oauthlib" do + url "https://files.pythonhosted.org/packages/ba/0a/cc204fcc311324358252fd38a884b1acae9f9e3936a54b2ce139946daada/aiohttp-oauthlib-0.1.0.tar.gz" + sha256 "893cd1a59ddd0c2e4e980e3a544f9710b7c4ffb9e27b4cd038b51fe1d70393b7" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" + sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" + end + + resource "aiostream" do + url "https://files.pythonhosted.org/packages/bf/1c/d5ae5c059529a98610fc15268e39506a4f8467501983afb5e45d34dc18db/aiostream-0.7.0.tar.gz" + sha256 "5ab4acd44ef5f583b6488c32ade465f43c3d7b0df039f1ee49dfb1fd1e255e02" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-log" do + url "https://files.pythonhosted.org/packages/32/32/228be4f971e4bd556c33d52a22682bfe318ffe57a1ddb7a546f347a90260/click-log-0.4.0.tar.gz" + sha256 "3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" + sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" + sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" + sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" + sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" + sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"vdirsyncer", shell_parameter_format: :click) + end + + service do + run [opt_bin/"vdirsyncer", "-v", "ERROR", "sync"] + run_type :interval + interval 60 + log_path var/"log/vdirsyncer.log" + error_log_path var/"log/vdirsyncer.log" + working_dir HOMEBREW_PREFIX + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + (testpath/".config/vdirsyncer/config").write <<~INI + [general] + status_path = "#{testpath}/.vdirsyncer/status/" + [pair contacts] + a = "contacts_a" + b = "contacts_b" + collections = ["from a"] + [storage contacts_a] + type = "filesystem" + path = "~/.contacts/a/" + fileext = ".vcf" + [storage contacts_b] + type = "filesystem" + path = "~/.contacts/b/" + fileext = ".vcf" + INI + (testpath/".contacts/a/foo/092a1e3b55.vcf").write <<~EOS + BEGIN:VCARD + VERSION:3.0 + EMAIL;TYPE=work:username@example.org + FN:User Name Ö φ 風 ض + UID:092a1e3b55 + N:Name;User + END:VCARD + EOS + (testpath/".contacts/b/foo/").mkpath + system bin/"vdirsyncer", "discover" + system bin/"vdirsyncer", "sync" + assert_match "Ö φ 風 ض", (testpath/".contacts/b/foo/092a1e3b55.vcf").read + end +end diff --git a/Formula/v/veccore.rb b/Formula/v/veccore.rb new file mode 100644 index 0000000000000..71dfbbd4fbda5 --- /dev/null +++ b/Formula/v/veccore.rb @@ -0,0 +1,40 @@ +class Veccore < Formula + desc "C++ Library for Portable SIMD Vectorization" + homepage "https://github.com/root-project/veccore" + url "https://github.com/root-project/veccore/archive/refs/tags/v0.8.2.tar.gz" + sha256 "1268bca92acf00acd9775f1e79a2da7b1d902733d17e283e0dd5e02c41ac9666" + license "Apache-2.0" + head "https://github.com/root-project/veccore.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "7cb81dd2bcb91896afae27ce9431387752ef9a6a443da7767a6bef6faa945a4b" + end + + depends_on "cmake" => :build + depends_on "vc" + + def install + args = %w[ + -DUMESIMD=OFF + -DVC=ON + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + auto main() -> int { + std::cout<(0.0)< :build + depends_on "cmake" => :build + depends_on "pcre" => :build # PCRE2 issue: https://github.com/VectorCamp/vectorscan/issues/320 + depends_on "pkgconf" => :build + depends_on "ragel" => :build + + def install + cmake_args = [ + "-DCCACHE_FOUND=CCACHE_FOUND-NOTFOUND", + "-DBUILD_STATIC_LIBS=ON", + "-DBUILD_SHARED_LIBS=ON", + "-DFAT_RUNTIME=OFF", + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() + { + printf("hyperscan v%s", hs_version()); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhs", "-o", "test" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/v/vedic.rb b/Formula/v/vedic.rb new file mode 100644 index 0000000000000..ca64d2bea992b --- /dev/null +++ b/Formula/v/vedic.rb @@ -0,0 +1,37 @@ +class Vedic < Formula + desc "Simple Sanskrit programming language" + homepage "https://vedic-lang.github.io/" + url "https://github.com/vedic-lang/vedic/archive/refs/tags/v2.0.6.tar.gz" + sha256 "9bfb68dfa8a79c02d52905eb1403267209dae80ad05287b7f3706f14071c4800" + license "MIT" + head "https://github.com/vedic-lang/vedic.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "56502244e08e30a3a86559996431cd27db1959096e6b465c56c793c2495ebd23" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4afe71c7c4dae3f9edfd94229be33eab94b9349f1a50c787b2e98ba07a34861f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c9bdcd049f25d6408a40c2693a39e098ae74512801535b6fa6539566375f679f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3fe45503d405ec81208fa88cf42b7dbe9fa003316c3783dd4d53ff19f48e89ee" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b737a9a7256fc30550659cebf7214dadbeb155d49eed775b84a91dff83c7c5cd" + sha256 cellar: :any_skip_relocation, sonoma: "a852103a96ff00273820b27230d0f482cf1690978c2f6587b1f7f778a343c4f4" + sha256 cellar: :any_skip_relocation, ventura: "c012da02f916791259476071c8fc1bdf92e3273033411b90154b43672e39bbac" + sha256 cellar: :any_skip_relocation, monterey: "7a53d21f56acac6b0322b0da98880f29efe8f24badfa62bb850d6ff52a4da378" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ea67bafadca41308429cc2ffa531885f65a4ce2eb6dc373148f87a8c00356e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2334b13281923d5c4f0964b6ce0ea51e8770866304de94b76e6de92d200566e9" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + # hello world in vedic + (testpath/"hello.ved").write <<~EOS + वद("नमस्ते विश्व!"); + EOS + assert_match "नमस्ते विश्व!", shell_output("#{bin}/vedic hello.ved") + + assert_match version.to_s, shell_output("#{bin}/vedic --version") + end +end diff --git a/Formula/v/vegeta.rb b/Formula/v/vegeta.rb new file mode 100644 index 0000000000000..570de26ca97c0 --- /dev/null +++ b/Formula/v/vegeta.rb @@ -0,0 +1,35 @@ +class Vegeta < Formula + desc "HTTP load testing tool and library" + homepage "https://github.com/tsenart/vegeta" + url "https://github.com/tsenart/vegeta/archive/refs/tags/v12.13.0.tar.gz" + sha256 "0a3d46beefbe2df2b9c448f383fd574117bcc56f2b2d0965abb9e2b49979567f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "118cdcdb82aff12be53c7cd2272d36ca31288e61849ae091bfe82c688da332a6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "118cdcdb82aff12be53c7cd2272d36ca31288e61849ae091bfe82c688da332a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "118cdcdb82aff12be53c7cd2272d36ca31288e61849ae091bfe82c688da332a6" + sha256 cellar: :any_skip_relocation, sonoma: "51ba41ac0959aabf05e224a8b84ab980c21317fc628831017c1af852cdffa744" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf74bd9cd8c59b3727adc2fffe59ca2cc1fe74ebf227d5d686fc582b9c277985" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24296d1e26a30ef08357173a325629f85901c8ef49a69aa71ae1a8fb84ebe8c6" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + -X main.Date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + end + + test do + input = "GET https://example.com" + output = pipe_output("#{bin}/vegeta attack -duration=1s -rate=1", input, 0) + report = pipe_output("#{bin}/vegeta report", output, 0) + assert_match "Requests [total, rate, throughput]", report + end +end diff --git a/Formula/v/veilid.rb b/Formula/v/veilid.rb new file mode 100644 index 0000000000000..1587d1ae2930f --- /dev/null +++ b/Formula/v/veilid.rb @@ -0,0 +1,36 @@ +class Veilid < Formula + desc "Peer-to-peer network for easily sharing various kinds of data" + homepage "https://veilid.com/" + url "https://gitlab.com/veilid/veilid/-/archive/v0.4.8/veilid-v0.4.8.tar.bz2" + sha256 "e041a1b3d2008cb51c3b18daf5d760d45de39240f24b8bb0cbd78b02aa7375fa" + license "MPL-2.0" + head "https://gitlab.com/veilid/veilid.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "525677ac4688593eebf9dab60e5d6376e8767e003c02e2342b3d093e65dac612" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7d1dc507427cb58a58fec83cd77d9ec598c75c620a72f26a3dd7a6b241a5651" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e382e18b9f3bcbc5def2a377a982add30bf2b5f008575152bdee97d3987d95b" + sha256 cellar: :any_skip_relocation, sonoma: "98401c46eaa313a135271fe7ecc25a119e424e9e5f47626691da2a4d62d1c897" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4b14dfbc0596ee79cfd15f42984127f78f9426e640adc648ea45220848e1e90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f2e03b649cbbd169478f337c6849ff56db23296b585bf9a849ccb8f71351b3d" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + def install + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + ENV.append_to_rustflags "--cfg tokio_unstable" + system "cargo", "install", *std_cargo_args(path: "veilid-cli") + system "cargo", "install", *std_cargo_args(path: "veilid-server") + end + + test do + require "yaml" + command = "#{bin}/veilid-server --set-config client_api.ipc_enabled=false --dump-config" + server_config = YAML.load(shell_output(command)) + assert_match "server.crt", server_config["core"]["network"]["tls"]["certificate_path"] + assert_match "Invalid server address", shell_output("#{bin}/veilid-cli --address FOO 2>&1", 1) + end +end diff --git a/Formula/v/velero.rb b/Formula/v/velero.rb new file mode 100644 index 0000000000000..a6a5e283cfb6f --- /dev/null +++ b/Formula/v/velero.rb @@ -0,0 +1,41 @@ +class Velero < Formula + desc "Disaster recovery for Kubernetes resources and persistent volumes" + homepage "https://velero.io/" + url "https://github.com/vmware-tanzu/velero/archive/refs/tags/v1.17.0.tar.gz" + sha256 "5634ef389637ef4e254e5d9d41e7770b26b397836684588634fcbd9a7b25980f" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2da3a164b5adbfbac07483a7fc5716a4463b3faa6357312d867812b5ce3adf1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e9d332e6a7f871d9662c57d48d7248e498c358ab44347541ac8fc7844a22c5d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f44c30f23d9531e9b2d2cf93afe7b767e3792ba96ebbd8d366bc61b4411a4757" + sha256 cellar: :any_skip_relocation, sonoma: "7bac20aec80c6b644a065993f18addca5ce3b8a666327ee4cfceb547ea5dadb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "1876b1caf821b0006677e5229edc16f5256f9c169229f9a94f74a1cefb9930e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "992408148702639e9c6be5c4cb2d64a5ac4928cf7d0fb9d801b974dd7fc8e5f2" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v#{version} + ] + system "go", "build", *std_go_args(ldflags:), "-installsuffix", "static", "./cmd/velero" + + generate_completions_from_executable(bin/"velero", "completion") + end + + test do + output = shell_output("#{bin}/velero 2>&1") + assert_match "Velero is a tool for managing disaster recovery", output + assert_match "Version: v#{version}", shell_output("#{bin}/velero version --client-only 2>&1") + system bin/"velero", "client", "config", "set", "TEST=value" + assert_match "value", shell_output("#{bin}/velero client config get 2>&1") + end +end diff --git a/Formula/v/vera++.rb b/Formula/v/vera++.rb new file mode 100644 index 0000000000000..652e42aadf689 --- /dev/null +++ b/Formula/v/vera++.rb @@ -0,0 +1,159 @@ +class Veraxx < Formula + desc "Programmable tool for C++ source code" + homepage "https://bitbucket.org/verateam/vera" + url "https://bitbucket.org/verateam/vera/downloads/vera++-1.3.0.tar.gz" + sha256 "9415657a09438353489db10ca860dd6459e446cfd9c649a1a2e02268da66f270" + license "BSL-1.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99507020d8491dc44e6404d4d2d859ec8f05270afd4aef8b75f5f1ebb04be413" + sha256 cellar: :any_skip_relocation, arm64_ventura: "70c7c8d7038196b5360a0c35c2d76545ab6c71c40e9d98cd5ccc5ef61a410328" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c71cdf0709dfbdcd7cf1628a500de2aa59d229a818f5bf265a0906a628b1d762" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fb1646c3a9cb8a0707a2674d546b6db25dcbea0fffd7461358c43247ae35ddcc" + sha256 cellar: :any_skip_relocation, sonoma: "88fa0e8078500d31ca2a4b44d35847e0f188f8cb9c1b210e730da796138adc1a" + sha256 cellar: :any_skip_relocation, ventura: "4e2cb9ea3299ad6bd01536e167272eb9e8a90b8a1e90f70f0ad69c70075f0cfc" + sha256 cellar: :any_skip_relocation, monterey: "52eb0f8c9c1faee12df61ff3419d4a168c589fd05c2370f918a2b8e72ffb1d56" + sha256 cellar: :any_skip_relocation, big_sur: "f28290171b8cc68f972b3cdbf811c1491d4be7dd8307fe1551dbfbdbc38269ba" + sha256 cellar: :any_skip_relocation, catalina: "985e75bcd4c9a559fd2e2841d10d0cb3d73fdc940a76aa3d3050514017d61560" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad710a6d70551b2d74732c9774a926f8a3c63f2db1aa87373701cfc90039d996" + end + + # luabind resource tarball is no longer available so does not build. + # Also uses unmaintained/EOL versions of `boost` and `lua` as resources. + # Last release on 2015-01-22 + deprecate! date: "2024-10-09", because: :does_not_build + disable! date: "2025-10-09", because: :does_not_build + + depends_on "cmake" => :build + + uses_from_macos "tcl-tk" + + # Use prebuilt docs to avoid need for pandoc + resource "doc" do + url "https://bitbucket.org/verateam/vera/downloads/vera++-1.3.0-doc.tar.gz" + sha256 "122a15e33a54265d62a6894974ca2f0a8f6ff98742cf8e6152d310cc23099400" + end + + # Custom-built boost, lua, and luabind are used by the build scripts + resource "boost" do + url "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2" + sha256 "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41" + end + + resource "lua" do + url "https://github.com/LuaDist/lua/archive/refs/tags/5.2.3.tar.gz" + sha256 "c8aa2c74e8f31861cea8f030ece6b6cb18974477bd1e9e1db4c01aee8f18f5b6" + end + + resource "luabind" do + url "https://github.com/verateam/luabind/archive/refs/tags/vera-1.3.0.tar.gz" + sha256 "7d93908b7d978e44ebe5dfad6624e6daa033f284a5f24013f37cac162a18f71a" + end + + # Fix Python detection. + patch :DATA + + def install + resource("boost").stage do + system "./bootstrap.sh", "--prefix=#{buildpath}/3rdParty", + "--with-libraries=filesystem,system,program_options,regex,wave,python" + system "./b2", "install", "threading=multi", "link=static", "warnings=off", + "cxxflags=-DBOOST_WAVE_SUPPORT_MS_EXTENSIONS=1", "-s NO_BZIP2=1" + end + + resource("lua").stage do + args = std_cmake_args + args << "-DBUILD_SHARED_LIBS:BOOL=OFF" + args << "-DCMAKE_INSTALL_PREFIX:PATH=#{buildpath}/3rdParty" + system "cmake", ".", *args + system "make", "install" + end + + resource("luabind").stage do + args = std_cmake_args + args << "-DBUILD_TESTING:BOOL=OFF" + args << "-DLUA_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include" + args << "-DLUA_LIBRARIES:PATH=#{buildpath}/3rdParty/lib/liblua.a" + args << "-DBOOST_ROOT:PATH=#{buildpath}/3rdParty" + args << "-DCMAKE_INSTALL_PREFIX:PATH=#{buildpath}/3rdParty" + system "cmake", ".", *args + system "make", "install" + end + + args = std_cmake_args + %W[ + -DVERA_USE_SYSTEM_BOOST:BOOL=ON + -DBoost_USE_STATIC_LIBS:BOOL=ON + -DLUA_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include + -DLUA_LIBRARIES:PATH=#{buildpath}/3rdParty/lib/liblua.a + -DLUA_LIBRARY:PATH=#{buildpath}/3rdParty/lib/liblua.a + -DLUABIND_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include + -DLUABIND_LIBRARIES:PATH=#{buildpath}/3rdParty/lib/libluabind.a + -DLUABIND_LIBRARY:PATH=#{buildpath}/3rdParty/lib/libluabind.a + -DBoost_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include + -DBoost_LIBRARY_DIR_RELEASE:PATH=#{buildpath}/3rdParty/lib + ] + if OS.linux? || MacOS.version >= :monterey + # Disable building Python rules support since vera++ needs Python 2. + # Revisit on release with Python 3: https://bitbucket.org/verateam/vera/issues/108/migrate-to-python-3 + args << "-DVERA_PYTHON=OFF" + end + system "cmake", ".", *args + system "make", "install" + + resource("doc").stage do + man1.install "vera++.1" + doc.install "vera++.html" + end + end + + test do + assert_equal version.to_s, shell_output("#{bin}/vera++ --version").strip + end +end +__END__ +diff --git a/src/boost.cmake b/src/boost.cmake +index 797cb60..d8c51c8 100644 +--- a/src/boost.cmake ++++ b/src/boost.cmake +@@ -8,7 +8,16 @@ mark_as_advanced(VERA_USE_SYSTEM_BOOST) + + set(boostLibs filesystem system program_options regex wave) + if(VERA_PYTHON) +- list(APPEND boostLibs python) ++ # Note that Boost Python components require a Python version ++ # suffix (Boost 1.67 and later), e.g. python36 or python27 for ++ # the versions built against Python 3.6 and 2.7, respectively. ++ # This also applies to additional components using Python ++ # including mpi_python and numpy. Earlier Boost releases may use ++ # distribution-specific suffixes such as 2, 3 or 2.7. These may also ++ # be used as suffixes, but note that they are not portable. ++ # ++ # from https://cmake.org/cmake/help/latest/module/FindBoost.html ++ list(APPEND boostLibs python27) + endif() + + if(VERA_USE_SYSTEM_BOOST) +@@ -40,6 +49,7 @@ else() + set(SOURCEFORGE downloads.sourceforge.net CACHE STRING + "Sourceforge host used to download external projects. Use it to force a specific mirror.") + mark_as_advanced(SOURCEFORGE) ++ string(REPLACE "python27" "python" boostLibs "${boostLibs}") + string(REPLACE ";" "," boostLibsComma "${boostLibs}") + string(REPLACE ";" " --with-" WITH_LIBS "${boostLibs}") + set(WITH_LIBS "--with-${WITH_LIBS}") +diff --git a/src/python.cmake b/src/python.cmake +index 9df6892..ba4210f 100644 +--- a/src/python.cmake ++++ b/src/python.cmake +@@ -4,8 +4,8 @@ mark_as_advanced(VERA_USE_SYSTEM_PYTHON) + + if(VERA_USE_SYSTEM_PYTHON) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +- find_package(PythonInterp 2.0) +- find_package(PythonLibs 2.0) ++ find_package(PythonInterp 2.7) ++ find_package(PythonLibs 2.7) + if(WIN32 AND NOT PYTHONLIBS_FOUND) + message(FATAL_ERROR "Could NOT find Python. Turn VERA_USE_SYSTEM_PYTHON to OFF to build it with vera++.") + endif() diff --git a/Formula/v/verapdf.rb b/Formula/v/verapdf.rb new file mode 100644 index 0000000000000..87c2821787817 --- /dev/null +++ b/Formula/v/verapdf.rb @@ -0,0 +1,45 @@ +class Verapdf < Formula + desc "Open-source industry-supported PDF/A validation" + homepage "https://verapdf.org/home/" + url "https://github.com/veraPDF/veraPDF-apps/archive/refs/tags/v1.28.2.tar.gz" + sha256 "48225e1b75d1dc1b9c87b845668bca37f9628a5a0a0010a6a8b55c8b332c3462" + license any_of: ["GPL-3.0-or-later", "MPL-2.0"] + head "https://github.com/veraPDF/veraPDF-apps.git", branch: "integration" + + livecheck do + url :stable + regex(/^v?(\d+\.\d*[02468]\.\d+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3cd84926712c2b06d9aa5500a6577809256e1b3c5a7690dd6af807c6e8e68f01" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e4ab904561e91dc5a727f1aef5b92d6375b511453853da22e1a8bd8ff3f2a5c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe5e4c7241fb3f4cd5b0b7d3ff6da79dae60059da3e8374707c7ec99b07298f1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e4d47eba52e8321865e0a87cd8cdb849803af7dc6791c75a2d9c3b0636f56c54" + sha256 cellar: :any_skip_relocation, sonoma: "320b07cb60d7dc030d16fef2c12417e2484d6fec0452e1a2d60455946531f9bd" + sha256 cellar: :any_skip_relocation, ventura: "036f34f42ac11286ecae531cb5b5f9ccdbf4fa9392a190c33a94abf1a0ddf982" + sha256 cellar: :any_skip_relocation, arm64_linux: "daf107c8fed2ce3613bdb98afe21304efa0d69566f96ac8d83e126fbf12f43dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "549f11f668ca6a791fb4ec44ef80774ba65eee9b218c9994e194bc3ab2a2f06b" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + system "mvn", "clean", "install", "-DskipTests" + + installer_file = Pathname.glob("installer/target/verapdf-izpack-installer-*.jar").first + system "java", "-DINSTALL_PATH=#{libexec}", "-jar", installer_file, "-options-system" + + bin.install libexec/"verapdf", libexec/"verapdf-gui" + bin.env_script_all_files libexec, Language::Java.overridable_java_home_env + prefix.install "tests" + end + + test do + with_env(VERAPDF: bin/"verapdf", NO_CD: "1") do + system prefix/"tests/exit-status.sh" + end + end +end diff --git a/Formula/v/vercel-cli.rb b/Formula/v/vercel-cli.rb new file mode 100644 index 0000000000000..9ffd3fff95dc9 --- /dev/null +++ b/Formula/v/vercel-cli.rb @@ -0,0 +1,38 @@ +class VercelCli < Formula + desc "Command-line interface for Vercel" + homepage "https://vercel.com/home" + url "https://registry.npmjs.org/vercel/-/vercel-48.8.2.tgz" + sha256 "927f7091ed2583cd75ca183646f6250a0c201b5702e1a7c1462bbd8227599f67" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e34266c9a05d925d0109a1994e51facf7f7ba489cbb77e01a21c0080135cbed0" + sha256 cellar: :any, arm64_sequoia: "01d38ce64dd94c63358de9f18e0d8657c57874a2f75099cfb338173d1aeceb66" + sha256 cellar: :any, arm64_sonoma: "01d38ce64dd94c63358de9f18e0d8657c57874a2f75099cfb338173d1aeceb66" + sha256 cellar: :any, sonoma: "b4043b0f5520a648812ae4952a8a40e62783cce44fa62e316fa22cb64e14ae89" + sha256 cellar: :any_skip_relocation, arm64_linux: "bcdb10f5e61f25bd3e30cf48d3a005d4d7353a1c87ceb6109034f6d8bf45d820" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95b00463ff2930c120136abb165655bbab29cd24197e3d0cb27c38a0040570fe" + end + + depends_on "node" + + def install + inreplace "dist/index.js", "${await getUpdateCommand()}", + "brew upgrade vercel-cli" + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible deasync modules + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/vercel/node_modules" + node_modules.glob("deasync/bin/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + system bin/"vercel", "init", "jekyll" + assert_path_exists testpath/"jekyll/_config.yml", "_config.yml must exist" + assert_path_exists testpath/"jekyll/README.md", "README.md must exist" + end +end diff --git a/Formula/v/verilator.rb b/Formula/v/verilator.rb new file mode 100644 index 0000000000000..3e933c93c831e --- /dev/null +++ b/Formula/v/verilator.rb @@ -0,0 +1,73 @@ +class Verilator < Formula + desc "Verilog simulator" + homepage "https://www.veripool.org/wiki/verilator" + url "https://github.com/verilator/verilator/archive/refs/tags/v5.042.tar.gz" + sha256 "bec14f17de724851b110b698f3bd25e22effaaced7265b26d2bc13075dbfb4bf" + license any_of: ["LGPL-3.0-only", "Artistic-2.0"] + head "https://github.com/verilator/verilator.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "a62819b0a093e37e976b3cff2d5d4883eadc3ccee4079ac151819ca664599c7c" + sha256 arm64_sequoia: "7fae027c30a60d38b8a83eea7de31026d1083d5145ee27621257aafad8ac7779" + sha256 arm64_sonoma: "1ed60c4ee4c168116fc9290718695920356a700b8e81071add2f2307e1b68d9f" + sha256 sonoma: "b6dfccb5d12f77e788431f3b5240086e01f98de73a7014a4fcaaef92802f9279" + sha256 arm64_linux: "fc3076ca79ec74585b5d5de5825c70490217de9d72352a903df0d1781de45e58" + sha256 x86_64_linux: "1cdc5c08fc08e8e9a4e57276776c1a2d97618fa07f6ff8a6e85050f322bf2aa7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "help2man" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "perl" + uses_from_macos "python" + + skip_clean "bin" # Allows perl scripts to keep their executable flag + + def install + system "autoconf" + system "./configure", "--prefix=#{prefix}" + ENV.deparallelize if OS.mac? + # `make` and `make install` need to be separate for parallel builds + system "make" + system "make", "install" + + # Avoid hardcoding build-time references that may not be valid at runtime. + inreplace pkgshare/"include/verilated.mk" do |s| + s.change_make_var! "CXX", "c++" + s.change_make_var! "LINK", "c++" + s.change_make_var! "PERL", "perl" + s.change_make_var! "PYTHON3", "python3" + end + end + + test do + (testpath/"test.v").write <<~VERILOG + module test; + initial begin $display("Hello World"); $finish; end + endmodule + VERILOG + (testpath/"test.cpp").write <<~CPP + #include "Vtest.h" + #include "verilated.h" + int main(int argc, char **argv, char **env) { + Verilated::commandArgs(argc, argv); + Vtest* top = new Vtest; + while (!Verilated::gotFinish()) { top->eval(); } + delete top; + exit(0); + } + CPP + system bin/"verilator", "-Wall", "--cc", "test.v", "--exe", "test.cpp" + cd "obj_dir" do + system "make", "-j", "-f", "Vtest.mk", "Vtest" + expected = <<~EOS + Hello World + - test.v:2: Verilog $finish + EOS + assert_equal expected, shell_output("./Vtest") + end + end +end diff --git a/Formula/v/vermin.rb b/Formula/v/vermin.rb new file mode 100644 index 0000000000000..11a3531afee68 --- /dev/null +++ b/Formula/v/vermin.rb @@ -0,0 +1,30 @@ +class Vermin < Formula + include Language::Python::Virtualenv + + desc "Concurrently detect the minimum Python versions needed to run code" + homepage "https://github.com/netromdk/vermin" + url "https://files.pythonhosted.org/packages/93/10/55e6b248ef9d757d521210d04418ac73417d850cbaa6b0366a7f6291d4dc/vermin-1.7.0.tar.gz" + sha256 "e9e3c2c901dc2ceec746d9b9e807d6639ec4233a749ad62f51bc0334fbb38707" + license "MIT" + head "https://github.com/netromdk/vermin.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f98f5ae78d3a75725e6def0a1dc52381cfc23983f41236468da51c40bd5a641a" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_equal <<~EOS, shell_output("#{bin}/vermin --no-parse-comments #{bin}/vermin") + Minimum required versions: ~2, ~3 + Note: Not enough evidence to conclude it won't work with Python 2 or 3. + EOS + + assert_match version.to_s, shell_output("#{bin}/vermin --version") + end +end diff --git a/Formula/v/verovio.rb b/Formula/v/verovio.rb new file mode 100644 index 0000000000000..782b21b5497f0 --- /dev/null +++ b/Formula/v/verovio.rb @@ -0,0 +1,40 @@ +class Verovio < Formula + desc "Command-line MEI music notation engraver" + homepage "https://www.verovio.org" + url "https://github.com/rism-digital/verovio/archive/refs/tags/version-5.6.0.tar.gz" + sha256 "caea6c2d0b127bf7c6352f98c1174d2513498d06a1f6e0269b075e87f9333f39" + license "LGPL-3.0-only" + head "https://github.com/rism-digital/verovio.git", branch: "develop" + + bottle do + sha256 arm64_tahoe: "76f2e2f51492fdea5b960f32b50e4500c945faf68e1351d8637517fd9eda0ffe" + sha256 arm64_sequoia: "dd2a429ef3cd34dee429c48088e345580b35058cde2e7434c5071ee706c730b0" + sha256 arm64_sonoma: "7a8d0c0df488d46f86a43c04db91aa7a58f2ef6938dc2ca2d40c9a80e0c4f7c9" + sha256 arm64_ventura: "616407346dd6c98b6242be33f322ae9b8569f0fe0a0d9f331596def7219fb777" + sha256 sonoma: "449750a1cc9ea583aa34e8121aa6762f1cf4f7ce7e34cf06120e7d3b2298c60e" + sha256 ventura: "24f75ac1a8aa45ff8945fa2f0562812d16c20e526a2e7b08318ae174c7d08142" + sha256 arm64_linux: "f349d21d2a340ce6d611198539bf43ecf419ff8937e5e372551ad0b8b99bab5e" + sha256 x86_64_linux: "c5488f3ec6134eb7ff4caa71b6ecb0cf6c9481e804d1ed939ab8fc9af4b985db" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", "./cmake", "-B", "tools", *std_cmake_args + system "cmake", "--build", "tools" + system "cmake", "--install", "tools" + end + + test do + resource "homebrew-testdata" do + url "https://www.verovio.org/examples/downloads/Ahle_Jesu_meines_Herzens_Freud.mei" + sha256 "79e6e062f7f0300e8f0f4364c4661835a0baffc3c1468504a555a5b3f9777cc9" + end + + system bin/"verovio", "--version" + resource("homebrew-testdata").stage do + shell_output("#{bin}/verovio Ahle_Jesu_meines_Herzens_Freud.mei -o #{testpath}/output.svg") + end + assert_path_exists testpath/"output.svg" + end +end diff --git a/Formula/v/versitygw.rb b/Formula/v/versitygw.rb new file mode 100644 index 0000000000000..9a586a07c178d --- /dev/null +++ b/Formula/v/versitygw.rb @@ -0,0 +1,34 @@ +class Versitygw < Formula + desc "Versity S3 Gateway" + homepage "https://www.versity.com/products/versitygw/" + url "https://github.com/versity/versitygw/archive/refs/tags/v1.0.18.tar.gz" + sha256 "d4271f8b98d6f1d722a1ddc405777889013b9111afee60b5f00887cee861fe95" + license "Apache-2.0" + head "https://github.com/versity/versitygw.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8ed3757d781784cba1cc2d468f821a9d6e2e0d44f236fa1578d7141c460eb49b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f3af83211ed29a6e80e527f4ff862c69ceb40b34850af1d00289949550f9189" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f98492e184a6715bbae1cff23908bfb942d2effe2539e63ee320f0df31f94040" + sha256 cellar: :any_skip_relocation, sonoma: "8bdc6dbed3e465e7ac7cca06fce1da77fa9b42f7436a18fe76b06cf6475af0b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fde8a090ef2f04c36cefc3e1c71ca9bb0f71fa8414c2270826f0663652511c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a0c2ffe3642acd703a6dafc99515b90afae8b8c6243ef0dd0bc527e81f7cab8" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.BuildTime=#{time.iso8601} -X main.Build=#{tap.user}" + system "go", "build", *std_go_args(ldflags:), "./cmd/versitygw" + end + + test do + assert_match version.to_s, shell_output("#{bin}/versitygw --version") + + system bin/"versitygw", "utils", "gen-event-filter-config" + assert_equal true, JSON.parse((testpath/"event_config.json").read)["s3:ObjectAcl:Put"] + + output = shell_output("#{bin}/versitygw admin list-buckets 2>&1", 1) + assert_match "Required flags \"access, secret, endpoint-url\"", output + end +end diff --git a/Formula/v/veryfasttree.rb b/Formula/v/veryfasttree.rb new file mode 100644 index 0000000000000..0f981e6eec46b --- /dev/null +++ b/Formula/v/veryfasttree.rb @@ -0,0 +1,114 @@ +class Veryfasttree < Formula + desc "Efficient phylogenetic tree inference for massive taxonomic datasets" + homepage "https://github.com/citiususc/veryfasttree" + url "https://github.com/citiususc/veryfasttree/archive/refs/tags/v4.0.5.tar.gz" + sha256 "e753c01555b3363747ea1d51248d691aa1e79d228cac187a6725ea8cd86ad321" + license all_of: [ + "GPL-3.0-only", + "BSD-3-Clause", # libs/cli11 + "MPL-2.0", # libs/bxzstr + ] + head "https://github.com/citiususc/veryfasttree.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8cbf9aa1a695d9430f2277fe1d40da68c4aaa1eae6e5b7b1c6f0cae29577192c" + sha256 cellar: :any, arm64_sequoia: "e377c3426836e11514282dfcd1fc2699fc6c25f721eaae8cf4f2bdf9ea41d0b1" + sha256 cellar: :any, arm64_sonoma: "bbbb02a03c029e97e52372649ba3ed63176cfd17567eb6a58ae05307bc63db3c" + sha256 cellar: :any, arm64_ventura: "d78b15098c68bd0567765551e2cd6139df15b5e17426768b716ff8a8b9183a80" + sha256 cellar: :any, sonoma: "b52e607f554c788ee123c30fdd3fe87a0be0cdd175374eee9e9e380866a0ce74" + sha256 cellar: :any, ventura: "914f6187005dc9c904f502bc865f53beb0b041cd5c93f233c6b84b8688cf3483" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b220e9b734bfd7db831ba87a603065222e23d7b72d485c3bfabb309e6117faf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7a8c21c3829da9c21800b2107f95fccc5758bdf2a5c9cbe1546be455bb82b76" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "robin-map" => :build + depends_on "xxhash" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + def install + # remove libraries that can be unbundled + rm_r(Dir["libs/*"] - ["libs/CLI11", "libs/bxzstr"]) + + # workaround to use brew `robin-map` which needs C++17 + inreplace "CMakeLists.txt", "set(CMAKE_CXX_STANDARD 11)", "set(CMAKE_CXX_STANDARD 17)" + ENV.append_to_cflags "-Wno-register" + + args = ["-DUSE_SHARED=ON"] + args << "-DUSE_NATIVE=OFF" if ENV.effective_arch != :native + args << "-DUSE_SEE4=ON" if Hardware::CPU.intel? && OS.mac? && MacOS.version.requires_sse41? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + man1.install "man/VeryFastTree.1" + end + + test do + (testpath/"test.fasta").write <<~FASTA + >N3289 + --RNRSCRRDNTNGQDLQAALAIFAAKVYVGVALQSVQVAAGIGKHPVYKHIPSKKYTGL + IIQELYLERLMAELADGLADAAPDVLLDIRGLMLALDAPAREKPIIL-LHLAASAGDALR + DKGQALRRELLPRLSGLGYAGLASGALTGDNATLMSARLIGLLVSATLLAL--------- + ----------------- + >N1763 + ------ISKDTTEERFLEVDKLTFAPKSYAGTLQTKILSAVSVPAGTLYKDFPTTELALL + VTLEVYQATDTSGAQDGLAANARDILHVLVELFLALAGFAAQDPLHLLLPMAAALTSSLR + GRLRELRRELLAKGAAKVYTGLGAADATGDGVQLGAASLAMQLLGALLPCLRLDALLGSL + ASGLPEEKLASLAIFL- + >N2100 + --RGRARPKQTTAESNLDATMGKFASQEYDGTMHRELGAASGVSLGTLYPDYPTWEMLIL + VTLESYLEPVVSALYAGLATDAPDILQR-LQLFLALLGFAMNHPGALLKSLAATLESELC + GKLKALTREVLEKLGASVFEGLPEPTLTGDEATPMSAALLMPLVQALLLCLLLQPLLAKH + SDDLPQIILAIYGIF-- + >N774 + --RGRRRTKTIVSEKDLSATMGRFAEQPYDGSLERNAATAASAPLNTMYGEFPTQDMFLL + MCLESYLIPTVLEADAE-ATEARDVLRRRLQLFLALLGFALNHPTQLLKMLATTLHKALR + GKIKDLQREVFARLTASAPAGLAAQFLTGDNATLMEAVLLMPFLAALLSCLILEPLDRKF + ADDFPAVILAIYAIF-- + >N211 + --KARGRTTIETGEKVLTGEMDRFAELQYDGSLQRDDTTGAAPPLGTLYGKLPTQDMFLL + FALESYLDPGTPELGQGLATKAPDGLRKRLHLFLGLLSFSLDHPVHLLKSLATT-HKAVR + GKVKDLQRDRFARLNASAPSGIAHPALTGDMATLMEAGLLMPLLAALLPILILAPLDKKY + AHDNHNDILAIYAIFLT + >N747 + MGKARGITTAYAYSQVLIGRLGAHAALPYNGSLERKDVAALDAPTNKLYGQFPDGDSWLL + GALEAYIHTCPPELPQSLATQAPETIFTRLQPYLGLADFGLAHPGQLLKIEATKLQRAVR + GKFKELQKDAPAQLTANGITVVGQPNLTGDLGTLSEAVVLLQLVPSLLAAIIFKPIDKKY + GESAPVGILLPFSVW-- + >N952 + MGRGRARTTVEAGEKVLLGTMIRFAELPHDGSLQRNDSTALAAPLNTLYAKFPTQDMFLL + FALESYLHPSSPELGMGLATPAPDILRKRLALFLGLLSFSLEHPIQLLKSLATT-HKAVR + GPFKDLQKDVPAHLTATAPSGIAHPALTGDMATLMEAVLLMPLLAALLPVLVLKPLDKKF + ADDSPGDILAVYAIF-- + >N3964 + ------RTTVEDNDKVLNATMDRFADLPYDGSLQRDDTTAQTAPLGTLYGKFPTADMFLL + NALESYLDPKRPELGQGLATKAPDALRKKLQLFLGLLAFALSHPNRLLKSLATT-HKLVR + GKLKDQEREIFARLTASAPPAIAHPALTGDMATLMEAVLLMPLLAALLTVLPLEPLDKAY + EDDSPGDILAVYAVF-- + >N3613 + LGRGMARTTVEDLETVLNATMDRFAQLPYDGSLQRDDTTAASAPLGTLYGKSPTADMFLQ + FALESYLDPKRPELGQGLATKAPDALRKRLQLYLGLLSFALEHPTPLLQSLATTLHK-VR + GKLKNLQREVFARLTASAASGIAHPALTGDMATLMDAVLLMPLLAKLLTIIILEPLDKKY + SDNSPDDILAAYAAFLS + >N1689 + MKLGRYRTVQTANEKYLETTAGRYADQNYAGTAQRGVQKANSVPLGTLYPDLPTRDMLLL + VSLESYLESITAGL-AGLATKAVTLFKVVLVLFLSVTGFALSHPGELFLSMAAVLQTEIR + GKLKNLTRELLQKLSASLTAGLAVPELTGDEASLGAGKILVPLLAALLVALLLSPLLGGF + SDDLPNMVLAIYAVTL- + >N3700 + MKMGRPRTKQSTSQRYLDTAGARYDDQAYAGTLQRGLGNAKGVPLGTLYLDFPIRDMLLL + VTLESYLESIVAGLYA-GATKAPNLLQAVLILFLNVVGFALLHPGALLLTMAAVLHNELI + GKLKEFSRELLERLAASVITGLAVPELTGDEGTLAAGVILMALLAALLLYLLLDPLLSGF + SGDLPDSGLAVHA---- + FASTA + system bin/"VeryFastTree", "test.fasta" + end +end diff --git a/Formula/v/vespa-cli.rb b/Formula/v/vespa-cli.rb new file mode 100644 index 0000000000000..ad2f4cebe74a6 --- /dev/null +++ b/Formula/v/vespa-cli.rb @@ -0,0 +1,43 @@ +class VespaCli < Formula + desc "Command-line tool for Vespa.ai" + homepage "https://vespa.ai" + url "https://github.com/vespa-engine/vespa/archive/refs/tags/v8.600.35.tar.gz" + sha256 "3874fda98380ea91bbb6e7b183e1c4fb896b25518c7645f32b445b2b4be7736d" + license "Apache-2.0" + + livecheck do + url :stable + regex(/\D*?(\d+(?:\.\d+)+)(?:-\d+)?/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5c0ac1b744211a252a9901d61c9a198f99457257ad05db492d470bb9a2acf6cb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "481dcaaf33d503961b36f20e0afa2688e6c52f0c2fa3b53a821b0813081c54b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c608ecc78cbd49dc25477f009916e79620f7e528352fb3cd712e250ae52e71a4" + sha256 cellar: :any_skip_relocation, sonoma: "889275d114f64e4f7f72903456e55d9508c0824f6a36e54489f688acd91e8622" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a22da97e465e19b519e38431931ea25a2baa74bd88aed39c7713cbcede1ab15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b55aa485483a2e5dafb066ca644a7c03b7b73d88bc833ea7bb5a7ce1d43e3558" + end + + depends_on "go" => :build + + def install + cd "client/go" do + with_env(VERSION: version.to_s, PREFIX: prefix.to_s) do + system "make", "install", "manpages" + end + generate_completions_from_executable(bin/"vespa", "completion") + end + end + + test do + ENV["VESPA_CLI_HOME"] = testpath + assert_match "Vespa CLI version #{version}", shell_output("#{bin}/vespa version") + doc_id = "id:mynamespace:music::a-head-full-of-dreams" + output = shell_output("#{bin}/vespa document get #{doc_id} 2>&1", 1) + assert_match "Error: deployment not converged", output + system bin/"vespa", "config", "set", "target", "cloud" + assert_match "target = cloud", shell_output("#{bin}/vespa config get target") + end +end diff --git a/Formula/v/vet.rb b/Formula/v/vet.rb new file mode 100644 index 0000000000000..5be25322059d7 --- /dev/null +++ b/Formula/v/vet.rb @@ -0,0 +1,33 @@ +class Vet < Formula + desc "Policy driven vetting of open source dependencies" + homepage "https://safedep.io/" + url "https://github.com/safedep/vet/archive/refs/tags/v1.12.7.tar.gz" + sha256 "9e34169f37784728656affffb3e67a9b11d4b0bb622b410df620392ab667667f" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cedd6c2250960223fc27e0b9b0b8218602159dc815feb6396d09273c1ab5b170" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "812599e182f891f12fad3ea2e979d611c3e2b1c3bb8091e608bf779488ea7dbe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "de8b728265d1af140df2128520c1e8d424a9dbc89874d3dcd5c630552877473c" + sha256 cellar: :any_skip_relocation, sonoma: "9fddef692102ad464219ae8a8a143c680f6c37d59d6f7ba5bc51e4c383255c38" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d851da94bad3d8ee76e9aa78c8d240409ba546dc514861c0ee54b8032c5b930" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1996adea4152813c4b5c6a450894948582abff3b5c91ecfb02a9c9907e58a0c7" + end + + depends_on "go" + + def install + ENV["CGO_ENABLED"] = "1" + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"vet", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/vet version 2>&1") + + output = shell_output("#{bin}/vet scan parsers 2>&1") + assert_match "Available Lockfile Parsers", output + end +end diff --git a/Formula/v/vexctl.rb b/Formula/v/vexctl.rb new file mode 100644 index 0000000000000..70f74fd4a9cbf --- /dev/null +++ b/Formula/v/vexctl.rb @@ -0,0 +1,39 @@ +class Vexctl < Formula + desc "Tool to create, transform and attest VEX metadata" + homepage "https://openssf.org/projects/openvex/" + url "https://github.com/openvex/vexctl/archive/refs/tags/v0.4.1.tar.gz" + sha256 "ed77b48de3ead71af608fb3ae5e5f4e19647d87fe9dfe38d4ffce4ee1c1e7c3b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a98d2b6408c16612ccb3d1db6ecdda65bbf6b40d4b07adca31dd8704666aafa4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a98d2b6408c16612ccb3d1db6ecdda65bbf6b40d4b07adca31dd8704666aafa4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a98d2b6408c16612ccb3d1db6ecdda65bbf6b40d4b07adca31dd8704666aafa4" + sha256 cellar: :any_skip_relocation, sonoma: "9db5167ea7db6957525725f29c57b9a72f0b758ec16f002a44af866e2100e138" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdb980c111f359a32bc0597528f517846a2b806cb25b28cf09d3373ec315b47f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fee7ab65814a907c75c47fede705015488316e2e5d145e9f8822e1c3bc37f6be" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/release-utils/version.gitVersion=#{version} + -X sigs.k8s.io/release-utils/version.gitCommit=#{tap.user} + -X sigs.k8s.io/release-utils/version.gitTreeState=clean + -X sigs.k8s.io/release-utils/version.buildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"vexctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/vexctl version") + + assert_match "Valid Statuses:\n\tnot_affected\n\taffected\n\tfixed\n\tunder_investigation\n", + shell_output("#{bin}/vexctl list status") + end +end diff --git a/Formula/v/vfkit.rb b/Formula/v/vfkit.rb new file mode 100644 index 0000000000000..852aa2fd07462 --- /dev/null +++ b/Formula/v/vfkit.rb @@ -0,0 +1,37 @@ +class Vfkit < Formula + desc "Command-line hypervisor using Apple's Virtualization Framework" + homepage "https://github.com/crc-org/vfkit" + url "https://github.com/crc-org/vfkit.git", + tag: "v0.6.1", + revision: "97c536487a40f137bc12d6561aa70625a54a4b08" + license "Apache-2.0" + head "https://github.com/crc-org/vfkit.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b6a2d79218e58d4326d9d4414d3459457a5fca8556283170fa621dbe46d5db0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc4052299d0269c894dc734cb606a28fab6b9de085afeddcf81bb4fa2d8f0f54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f22e5e7f36bcfa133de94570777eddeb5b3cd7a27a01772e460c2f2f10de24f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "327542e26cfe0a498e0270fd04f1c7ded2d97426d881a97939df9631f981b5b4" + sha256 cellar: :any_skip_relocation, sonoma: "b0907b22ba995891cc690e90ccd37cc329a72d79f59418f12f34ea2401594a18" + sha256 cellar: :any_skip_relocation, ventura: "174f80e56113503f461402d391682e90ed602597c678b5459095c62faeaace47" + end + + depends_on "go" => :build + depends_on :macos + + def install + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + system "make", "out/vfkit-#{arch}" + bin.install "out/vfkit-#{arch}" => "vfkit" + end + + test do + version_output = shell_output("#{bin}/vfkit --version 2>&1") + assert_match("vfkit version: v#{version}", version_output) + + # start a VM with non-existing kernel + output = shell_output("#{bin}/vfkit --kernel foo --initrd bar " \ + "--kernel-cmdline baz 2>&1", 1) + assert_match("foo: no such file or directory", output) + end +end diff --git a/Formula/v/vfox.rb b/Formula/v/vfox.rb new file mode 100644 index 0000000000000..c2f8ed89896b6 --- /dev/null +++ b/Formula/v/vfox.rb @@ -0,0 +1,39 @@ +class Vfox < Formula + desc "Version manager with support for Java, Node.js, Flutter, .NET & more" + homepage "https://vfox.dev/" + url "https://github.com/version-fox/vfox/archive/refs/tags/v0.9.2.tar.gz" + sha256 "22e2024248c4faecd5d85db77f1870b4c7e6c9cc2d509d38371e6a520cd6f25b" + license "Apache-2.0" + head "https://github.com/version-fox/vfox.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "68dad5b1f82ddb8ca869516d57f3845e22a9aa436615902ed1310764bb45664d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77789be346d4e7a969f1484a28921ef1dee97811fc46643479f677d74c46f11e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb214e3bf897289c3066be0fedfe0bcfe74c3b0d08cb19edd55d13f88102a45b" + sha256 cellar: :any_skip_relocation, sonoma: "604cae55002f43e41e8bbd6a4479f5777b3fe6a424b7ceb2f656a6f4c986f177" + sha256 cellar: :any_skip_relocation, arm64_linux: "b697ba448e0db318201a7255ebc51cb736f5f4b1b967c635e11b6c39d9ac26de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5086636b415c128dce5da08260946951b22a7a2c529454a3ea67d0ee66926792" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + bash_completion.install "completions/bash_autocomplete" => "vfox" + zsh_completion.install "completions/zsh_autocomplete" => "_vfox" + end + + test do + assert_match version.to_s, shell_output("#{bin}/vfox --version") + + system bin/"vfox", "add", "golang" + output = shell_output("#{bin}/vfox info golang") + assert_match "Golang plugin, https://go.dev/dl/", output + end +end diff --git a/Formula/v/vgmstream.rb b/Formula/v/vgmstream.rb new file mode 100644 index 0000000000000..0c7074187fd5d --- /dev/null +++ b/Formula/v/vgmstream.rb @@ -0,0 +1,55 @@ +class Vgmstream < Formula + desc "Library for playing streamed audio formats from video games" + homepage "https://vgmstream.org" + url "https://github.com/vgmstream/vgmstream.git", + tag: "r2055", + revision: "f499bf0c8b8d746ab2bd7feebd914d972ef40fec" + version "r2055" + license "ISC" + version_scheme 1 + head "https://github.com/vgmstream/vgmstream.git", branch: "master" + + livecheck do + url :stable + regex(/([^"' >]+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "95f555a4ebae967e06fa52f6d49591c155bbf9de76319810103be63f3b36509c" + sha256 cellar: :any, arm64_sequoia: "ead8ddf1f27baefb7d612d6a8f6d4bd639fad43d26f07927b6ba7b7c3790d40c" + sha256 cellar: :any, arm64_sonoma: "190dcf8e315535c20f12236b232ba58fcd9384b89a6b06a496d3f4a39fc33fcd" + sha256 cellar: :any, sonoma: "e4c2649bfa4b4312947ef25e0c4a039cdbf012dd1ed27bd5ac40d56fa2e7b41c" + sha256 cellar: :any_skip_relocation, arm64_linux: "27f007d2599de73dc38adda802b63e697045fa2d6b4c149b53953560219aecc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b41fedd96803ea083f2bbe486e2818da5fd985b96daaa2d294c36fd448471714" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "ffmpeg" + depends_on "libao" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "speex" + + on_macos do + depends_on "libogg" + end + + def install + # TODO: Try adding `-DBUILD_SHARED_LIBS=ON` in a future release. + # Currently failing with requires target "g719_decode" that is not in any export set + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_AUDACIOUS:BOOL=OFF", + "-DUSE_CELT=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + lib.install "build/src/libvgmstream.a" # remove when switching to shared libs + end + + test do + assert_match "decode", shell_output("#{bin}/vgmstream-cli 2>&1", 1) + end +end diff --git a/Formula/v/vgo.rb b/Formula/v/vgo.rb new file mode 100644 index 0000000000000..4eaff598282b1 --- /dev/null +++ b/Formula/v/vgo.rb @@ -0,0 +1,34 @@ +class Vgo < Formula + desc "Project scaffolder for Go, written in Go" + homepage "https://github.com/vg006/vgo" + url "https://github.com/vg006/vgo/archive/refs/tags/v0.2.0.tar.gz" + sha256 "3a2fee499c91225f2abe1acdb8a640560cda6f4364f4b1aff04756d8ada6282d" + license "MIT" + head "https://github.com/vg006/vgo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "625060653e73c0e996276bc83f4f6dfc586c10739248ea167e296ef4d1212d64" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "625060653e73c0e996276bc83f4f6dfc586c10739248ea167e296ef4d1212d64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "625060653e73c0e996276bc83f4f6dfc586c10739248ea167e296ef4d1212d64" + sha256 cellar: :any_skip_relocation, sonoma: "ed465eb32ba71c56fbb1f2430e89f8db84230a825ea361a7332d622065be2ee0" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9544aa949090a4777ed45e28cb84512c712899bb7d2f512e4629174e261a3f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00919354e85aa7eabe2a62e05f80e9704ec285193c5caf5a5a752d26af38084f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"vgo", "completion") + end + + test do + expected = if OS.mac? + "Failed to build the vgo tool" + else + "┃ ✔ Built vgo\n┃ ✔ Installed vgo" + end + assert_match expected, shell_output("#{bin}/vgo build 2>&1") + end +end diff --git a/Formula/v/vgrep.rb b/Formula/v/vgrep.rb new file mode 100644 index 0000000000000..074e64ccd9527 --- /dev/null +++ b/Formula/v/vgrep.rb @@ -0,0 +1,48 @@ +class Vgrep < Formula + desc "User-friendly pager for grep" + homepage "https://github.com/vrothberg/vgrep" + url "https://github.com/vrothberg/vgrep/archive/refs/tags/v2.8.0.tar.gz" + sha256 "325b28bd5e8da316e319361f2dd8e3cc74fcd55724fc8ad4b2a73c21b2903bd8" + license "GPL-3.0-only" + version_scheme 1 + head "https://github.com/vrothberg/vgrep.git", branch: "main" + + # The leading `v` in this regex is intentionally non-optional, as we need to + # exclude a few older tags that use a different version scheme and would + # erroneously appear as newer than the newest version. We can't check the + # "latest" release on GitHub because it's sometimes a lower version that was + # released after a higher version (i.e., "latest" is the most recent release + # but not necessarily the newest version in this context). + livecheck do + url :stable + regex(/^v(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "576cc3661197c7140e4f1e73f1136f2e48588485aeb20625704358acca2e8802" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0533a4c02c2376d7e5d41a529de7519be4092d4c66b4ad66cfd4cd277fb1fc6b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "61e6682d7f0a226d7f0a58d29540c30caf07f6cc49ed243bdde5a8e64f238dab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa7ba93c9e1de2091f5aa809bc772e383160c14bc1c53fc623be305ebb8053a3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "875458d3eafd19ab0490d73130dc93e75e09c6080dbd65080855b2b53dad6bb0" + sha256 cellar: :any_skip_relocation, sonoma: "7a2adca7bf767eb1385fb51fbbbab3ec42b048ec1d4e839fea1f8c9248a07a9f" + sha256 cellar: :any_skip_relocation, ventura: "98268b0618e3050e2082400d38ff4ae366804775eca808f01984036611e4f3d5" + sha256 cellar: :any_skip_relocation, monterey: "ae3ceae715d522bfedb2ddb04f15e80b4049b8e55d4c08290ab4fa6272c0ab96" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7051f4493387b915de7035c592383bc6795aa91af876dc2873994b9c879bae0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5cf84272a6a20e77a2c2e198bdaa103204b0b104a00b6fa7f16a026455b7225" + end + + depends_on "go" => :build + depends_on "go-md2man" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + system "make", "install-docs", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.txt").write "Hello from Homebrew!\n" + output = shell_output("#{bin}/vgrep -w Homebrew --no-less .") + assert_match "Hello from", output + assert_match "Homebrew", output + end +end diff --git a/Formula/v/vgt.rb b/Formula/v/vgt.rb new file mode 100644 index 0000000000000..b0789d5719297 --- /dev/null +++ b/Formula/v/vgt.rb @@ -0,0 +1,40 @@ +class Vgt < Formula + desc "Visualising Go Tests" + homepage "https://github.com/roblaszczak/vgt" + url "https://github.com/roblaszczak/vgt/archive/refs/tags/v1.0.0.tar.gz" + sha256 "1db7e7d9c2e2d0b4c5c6f33a71b4e13142a20319238f7d47166fea68919488c5" + license "MIT" + head "https://github.com/roblaszczak/vgt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c4a235266ef75ac8e4b1acd2ae26efb5c917066ae58f4c5e9d44f07bf364105" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b7d4427dfe87372d187344ca5f584db793edcba6c21a64161ad1a7e19e3b723" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b7d4427dfe87372d187344ca5f584db793edcba6c21a64161ad1a7e19e3b723" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b7d4427dfe87372d187344ca5f584db793edcba6c21a64161ad1a7e19e3b723" + sha256 cellar: :any_skip_relocation, sonoma: "d2a8a56c5cbb80908ba244db470a0cc708ca661d241c8867a3648d70d33a83ca" + sha256 cellar: :any_skip_relocation, ventura: "d2a8a56c5cbb80908ba244db470a0cc708ca661d241c8867a3648d70d33a83ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "31d6c7512e21ba8d1b393b0090881f7839dd6362c93f26a6649b8eeb860c17c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e7fb72f52e24e0095a704bccbbb3aed40ba98aa3edc34eaf37e220bad3ab481" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"test.go").write <<~EOS + package test + + import "testing" + + func TestExample(t *testing.T) { + t.Log("Hello from sample test") + } + EOS + + output = pipe_output("#{bin}/vgt --print-html", "go test -json #{testpath}/sample_test.go", 0) + assert_match "Test Results (0s 0 passed, 0 failed)", output + end +end diff --git a/Formula/v/vhs.rb b/Formula/v/vhs.rb new file mode 100644 index 0000000000000..d0053353ad92d --- /dev/null +++ b/Formula/v/vhs.rb @@ -0,0 +1,44 @@ +class Vhs < Formula + desc "Your CLI home video recorder" + homepage "https://github.com/charmbracelet/vhs" + url "https://github.com/charmbracelet/vhs/archive/refs/tags/v0.10.0.tar.gz" + sha256 "ae37fe7e52ade753f850ab81c7d5344f8e540ab6886f877bf5b613620c909893" + license "MIT" + head "https://github.com/charmbracelet/vhs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b559e27a6e0ba6aa3a9e576306c5de4c7623df4e66fe22b23d8b064a785cba75" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "62e58ee735695f64fff35b0c32c1ddda7688d7da3c970652e3118ec8843394be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "62e58ee735695f64fff35b0c32c1ddda7688d7da3c970652e3118ec8843394be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62e58ee735695f64fff35b0c32c1ddda7688d7da3c970652e3118ec8843394be" + sha256 cellar: :any_skip_relocation, sonoma: "555c4a74bb2df5b11488b54589a7b8b4cea5bcddba87ad9c1bf04a2054ffa154" + sha256 cellar: :any_skip_relocation, ventura: "555c4a74bb2df5b11488b54589a7b8b4cea5bcddba87ad9c1bf04a2054ffa154" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5f740a33f47dd36334f738d3e737470af49606c175729525b1436dae5ea5f33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f1fe18a37fa617a10925711ff8d2c00ea7f61a9030537d478b2df88fe3aec46" + end + + depends_on "go" => :build + depends_on "ffmpeg" + depends_on "ttyd" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + + (man1/"vhs.1").write Utils.safe_popen_read(bin/"vhs", "man") + + generate_completions_from_executable(bin/"vhs", "completion") + end + + test do + (testpath/"test.tape").write <<~TAPE + Output test.gif + Type "Foo Bar" + Enter + Sleep 1s + TAPE + + system bin/"vhs", "validate", "test.tape" + + assert_match version.to_s, shell_output("#{bin}/vhs --version") + end +end diff --git a/Formula/v/vibe-log-cli.rb b/Formula/v/vibe-log-cli.rb new file mode 100644 index 0000000000000..e011835845e49 --- /dev/null +++ b/Formula/v/vibe-log-cli.rb @@ -0,0 +1,45 @@ +class VibeLogCli < Formula + desc "CLI tool for analyzing Claude Code sessions" + homepage "https://vibe-log.dev/" + url "https://registry.npmjs.org/vibe-log-cli/-/vibe-log-cli-0.7.6.tgz" + sha256 "e53b35ca24b0ad207a969e3af3b02fa4d2ac98517e8a01a021f20a5c0478988b" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "c0b14ba1dc371a6ecef295ca03c3f16cabc9f7ea0ee60691fb4dcab44f7f4844" + sha256 cellar: :any, arm64_sequoia: "d094b70575adf732345dc5614e7034ae15f0bdecf750ad3b34169561d1b8ae60" + sha256 cellar: :any, arm64_sonoma: "d094b70575adf732345dc5614e7034ae15f0bdecf750ad3b34169561d1b8ae60" + sha256 cellar: :any, sonoma: "c26b230c27c63d330f982667036cc4354311d274daa25f26b05460ba0bfeda89" + sha256 cellar: :any_skip_relocation, arm64_linux: "8dbcfb956b6014317514306513ff4ce1fbb8425bc3ba0bcd479a0d7bd721a5b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd48f8cace0b9fc94bf2e5ebe65acaf177c1313bb715d54e6960b2f255c2f3f7" + end + + depends_on "node" + + on_linux do + depends_on "xsel" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binaries + vendor_dir = libexec/"lib/node_modules/vibe-log-cli/node_modules/@anthropic-ai/claude-agent-sdk/vendor/ripgrep" + rm_r(vendor_dir) + + clipboardy_fallbacks_dir = libexec/"lib/node_modules/#{name}/node_modules/clipboardy/fallbacks" + rm_r(clipboardy_fallbacks_dir) # remove pre-built binaries + if OS.linux? + linux_dir = clipboardy_fallbacks_dir/"linux" + linux_dir.mkpath + # Replace the vendored pre-built xsel with one we build ourselves + ln_sf (Formula["xsel"].opt_bin/"xsel").relative_path_from(linux_dir), linux_dir + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/vibe-log --version") + assert_match "Failed to send sessions", shell_output("#{bin}/vibe-log send --silent 2>&1") + end +end diff --git a/Formula/v/vice.rb b/Formula/v/vice.rb new file mode 100644 index 0000000000000..3a6573395d93a --- /dev/null +++ b/Formula/v/vice.rb @@ -0,0 +1,92 @@ +class Vice < Formula + desc "Versatile Commodore Emulator" + homepage "https://sourceforge.net/projects/vice-emu/" + url "https://downloads.sourceforge.net/project/vice-emu/releases/vice-3.9.tar.gz" + sha256 "40202b63455e26b87ecc63eb5a52322c6fa3f57cab12acf0c227cf9f4daec370" + license "GPL-2.0-or-later" + head "https://svn.code.sf.net/p/vice-emu/code/trunk/vice" + + livecheck do + url :stable + regex(%r{url=.*?/vice[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "3233bcda97a1a7daab6ae5189b535ee872174ea804be74d3dbd3197d55ff0c7d" + sha256 arm64_sequoia: "8b78df5935aab1f83e0207ea2f728b96a74e66d69f5299e8507f990f11920822" + sha256 arm64_sonoma: "729bb747eeb23ff89b1cb604520e7204880394934d91f316c9dc7aeef2f7f73f" + sha256 arm64_ventura: "076944a3a5d61b727aaa53724661d96a975f22092da741c06db0ab0a4d2a8adc" + sha256 sonoma: "214a47453e12ef15db2adc4cece96aca944ae2dc4b785166bf5e6dc96323d621" + sha256 ventura: "550d23369b47768525c093b7b7e7f7d737488060bef4e69919685a1dfdaf5c56" + sha256 arm64_linux: "ab0b2b09715f4ef67be4be7dbf0eacea5a49211cfa2b7704759c0be64e3b6229" + sha256 x86_64_linux: "752515da593a5bbddd5ab728ecba2bab8a5ae79ec449cd5471de3c2854ce893e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "dos2unix" => :build + depends_on "pkgconf" => :build + depends_on "texinfo" => :build + depends_on "xa" => :build + depends_on "yasm" => :build + + depends_on "adwaita-icon-theme" + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "flac" + depends_on "gdk-pixbuf" + depends_on "giflib" + depends_on "glew" + depends_on "glib" + depends_on "gtk+3" + depends_on "lame" + depends_on "libogg" + depends_on "libpng" + depends_on "librsvg" + depends_on "libvorbis" + depends_on "pango" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "alsa-lib" + depends_on "fontconfig" + depends_on "libx11" + depends_on "mesa" + depends_on "pulseaudio" + end + + def install + system "./autogen.sh" + + system "./configure", "--disable-arch", + "--disable-pdf-docs", + "--enable-gtk3ui", + "--enable-midi", + "--enable-lame", + "--enable-ethernet", + "--enable-cpuhistory", + "--with-flac", + "--with-vorbis", + "--with-gif", + "--with-png", + "--without-evdev", # TODO: needs libevdev + *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/x64sc -console -limitcycles 1000000", 1) + assert_match "Initializing chip model", output + end +end diff --git a/Formula/v/victorialogs.rb b/Formula/v/victorialogs.rb new file mode 100644 index 0000000000000..0181822e1904a --- /dev/null +++ b/Formula/v/victorialogs.rb @@ -0,0 +1,56 @@ +class Victorialogs < Formula + desc "Open source user-friendly database for logs from VictoriaMetrics" + homepage "https://docs.victoriametrics.com/victorialogs/" + url "https://github.com/VictoriaMetrics/VictoriaLogs/archive/refs/tags/v1.37.2.tar.gz" + sha256 "3f70cf19f5404fed3460a5255bfd6268508bf1a0384f12b9f7e7de24026b4f10" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3a5c2455b20ec21a654419f6867afe7c5563b53162794da15d92823718e398f5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e02502ad690151bc8870cb5539363c77f4d16ad383effd2fa2fe6ca3c9cf4bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a8c8cab888164c5f71f58c503cb5129bd82b0b7a69957ee102d96d3f18be538" + sha256 cellar: :any_skip_relocation, sonoma: "4332c4da1522aeedb41b6b3f862d45ed34993269611f20b77548d81f2b86be5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7289997dda4f5301013b0864482ff2395ba81662bc95aa5d025373226b13da65" + sha256 cellar: :any_skip_relocation, x86_64_linux: "635f73adda9cb069481d7ed30f96e93d1b17c67d4e90ef5ed6ed6695eecda459" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"victoria-logs"), "./app/victoria-logs" + end + + service do + run [ + opt_bin/"victoria-logs", + "-httpListenAddr=127.0.0.1:9428", + "-storageDataPath=#{var}/victorialogs-data", + ] + keep_alive false + log_path var/"log/victoria-logs.log" + error_log_path var/"log/victoria-logs.err.log" + end + + test do + http_port = free_port + + pid = fork do + exec bin/"victoria-logs", + "-httpListenAddr=127.0.0.1:#{http_port}", + "-storageDataPath=#{testpath}/victorialogs-data" + end + sleep 5 + assert_match "Single-node VictoriaLogs", shell_output("curl -s 127.0.0.1:#{http_port}") + + assert_match version.to_s, shell_output("#{bin}/victoria-logs --version") + ensure + Process.kill(9, pid) + Process.wait(pid) + end +end diff --git a/Formula/v/victoriametrics.rb b/Formula/v/victoriametrics.rb new file mode 100644 index 0000000000000..c6fea139afe50 --- /dev/null +++ b/Formula/v/victoriametrics.rb @@ -0,0 +1,81 @@ +class Victoriametrics < Formula + desc "Cost-effective and scalable monitoring solution and time series database" + homepage "https://victoriametrics.com/" + url "https://github.com/VictoriaMetrics/VictoriaMetrics/archive/refs/tags/v1.129.0.tar.gz" + sha256 "f8a44659ac1f94460f2afa55a1e7f832e6c93c6f43a885928edaca3cc198072c" + license "Apache-2.0" + + # There are tags like `pmm-6401-v1.89.1` in the upstream repo. They don't + # actually represent releases, despite referring to one in the tag name. + # Make sure we only match the ones using the common format. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9a5c9ace46b56af1d61c71dd4fba26af14cb39f9bdc9bba3fd73069b0537b69d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "708599e0f66aae028937fc21f5c7198adadc6952eea3bfd49f80be2eec21650a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10af73cb9587a9ff295c09a6c26c1d098a6a05a17657f7e89356f56ac9662e18" + sha256 cellar: :any_skip_relocation, sonoma: "e1af1487ac80ed5a2a316bb4879787f42888d78ba5473d8a0c03c10b575b35cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6c19cb79c8a24ca75a707210c11407e5f3faf9adbfc26d6b245c293b389412f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef28cb1cc0a464a3c43c8f52bcad9a0b472eadb4b9ff0eb4ec8d8a68817a3bf8" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"victoria-metrics"), "./app/victoria-metrics" + + (etc/"victoriametrics/scrape.yml").write <<~YAML + global: + scrape_interval: 10s + + scrape_configs: + - job_name: "victoriametrics" + static_configs: + - targets: ["127.0.0.1:8428"] + YAML + end + + service do + run [ + opt_bin/"victoria-metrics", + "-httpListenAddr=127.0.0.1:8428", + "-promscrape.config=#{etc}/victoriametrics/scrape.yml", + "-storageDataPath=#{var}/victoriametrics-data", + ] + keep_alive false + log_path var/"log/victoria-metrics.log" + error_log_path var/"log/victoria-metrics.err.log" + end + + test do + http_port = free_port + + (testpath/"scrape.yml").write <<~YAML + global: + scrape_interval: 10s + + scrape_configs: + - job_name: "victoriametrics" + static_configs: + - targets: ["127.0.0.1:#{http_port}"] + YAML + + pid = fork do + exec bin/"victoria-metrics", + "-httpListenAddr=127.0.0.1:#{http_port}", + "-promscrape.config=#{testpath}/scrape.yml", + "-storageDataPath=#{testpath}/victoriametrics-data" + end + sleep 5 + assert_match "Single-node VictoriaMetrics", shell_output("curl -s 127.0.0.1:#{http_port}") + + assert_match version.to_s, shell_output("#{bin}/victoria-metrics --version") + ensure + Process.kill(9, pid) + Process.wait(pid) + end +end diff --git a/Formula/v/viddy.rb b/Formula/v/viddy.rb new file mode 100644 index 0000000000000..dd1eec14e4b41 --- /dev/null +++ b/Formula/v/viddy.rb @@ -0,0 +1,41 @@ +class Viddy < Formula + desc "Modern watch command" + homepage "https://github.com/sachaos/viddy" + url "https://github.com/sachaos/viddy/archive/refs/tags/v1.3.0.tar.gz" + sha256 "59d5be862cf6b522ed069e276c28f927e5d2cea13525513959e1577a5ad6afd5" + license "MIT" + head "https://github.com/sachaos/viddy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d7c01377ce6dc8d3cef31fa0ffefa6dcb6e2b3f0c4edc0519f937a0bf4e96a3a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "618af16f6d99f7f2309e65cc33b60eea874f15ae8a0965b873c1a8ef1f9bda41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a9475b43a3238107af27cd6d6f14621af0e5e0fd0504a3fddad1e33277f3b7af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5132a22bfe77049378f62158a9c2fb9e52ab6f04c426e9cfdff4e7c78a0de06f" + sha256 cellar: :any_skip_relocation, sonoma: "a635acfdd97d4fb6f785a0164db30c399430f156b8012b85ad82a3872f39b869" + sha256 cellar: :any_skip_relocation, ventura: "81a7bf5985de9f5702b68665dfa75f562819d363b5d6a4c882c5ef9b778ed18d" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f3f38348b9fd1683ec0e625e899e8254fd6a7d1f54d2f0e7d3b09dd887aca16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2936c3ac0cc4092280d63ccc8ef986cfaad49c117fc763266ae435edaa1626e2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + # Errno::EIO: Input/output error @ io_fread - /dev/pts/0 + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + begin + pid = fork do + system bin/"viddy", "--interval", "1", "date" + end + sleep 2 + ensure + Process.kill("TERM", pid) + end + + assert_match "viddy #{version}", shell_output("#{bin}/viddy --version") + end +end diff --git a/Formula/v/video-compare.rb b/Formula/v/video-compare.rb new file mode 100644 index 0000000000000..6246ab2b1a05b --- /dev/null +++ b/Formula/v/video-compare.rb @@ -0,0 +1,38 @@ +class VideoCompare < Formula + desc "Split screen video comparison tool using FFmpeg and SDL2" + homepage "https://github.com/pixop/video-compare" + url "https://github.com/pixop/video-compare/archive/refs/tags/20250928.tar.gz" + sha256 "cdcdb764868cf358ef5337f68e7bfd4526ec3efac27cc35db70c4158e3dea99f" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_tahoe: "910208b91886f314f1d7632da2bb5f916f6357ce76b5b00535078df8dceaf032" + sha256 cellar: :any, arm64_sequoia: "98c027c6b7f3e2ef5c0fe56ceb7b6545eda8dbe27524eb268e69cbf483a83145" + sha256 cellar: :any, arm64_sonoma: "7f9c4a23d6de575e87ec2276a6af9673df512c4646d4261ba8dc55e6020d7cda" + sha256 cellar: :any, sonoma: "3036e9421329fa9efc1d78b82da1083ad7e91b3f657fc7f2b7f54f5c0ef2ca48" + sha256 cellar: :any_skip_relocation, arm64_linux: "88f8d5c6df6b40958ac867b211df6dd0e501db96f5f4c975f4da44a8e1fe98a9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81747388788294842ab546f3f4718e0ef67f0ef423e6aa21866d4d95aad1bf4b" + end + + depends_on "ffmpeg" + depends_on "sdl2" + depends_on "sdl2_ttf" + + def install + system "make" + bin.install "video-compare" + end + + test do + testvideo = test_fixtures("test.gif") # GIF is valid ffmpeg input format + begin + pid = fork do + exec bin/"video-compare", testvideo, testvideo + end + sleep 3 + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/v/videoalchemy.rb b/Formula/v/videoalchemy.rb new file mode 100644 index 0000000000000..ee2f3b2e5f2a3 --- /dev/null +++ b/Formula/v/videoalchemy.rb @@ -0,0 +1,42 @@ +class Videoalchemy < Formula + desc "Toolkit expanding video processing capabilities" + homepage "https://viddotech.github.io/videoalchemy/" + url "https://github.com/viddotech/videoalchemy/archive/refs/tags/1.0.0.tar.gz" + sha256 "1ad4ab7e1037a84a7a894ff7dd5e0e3b1b33ded684eace4cadc606632bbc5e3d" + license "MIT" + head "https://github.com/viddotech/videoalchemy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1670c950b06ac91c73f850beb664762fcc4a9dc60a8191b95e1f71ab199935a0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f90306872d961d0f3b3faa8591c95d22f55f989d5176e3365b7e03a1f158ed24" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f90306872d961d0f3b3faa8591c95d22f55f989d5176e3365b7e03a1f158ed24" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f90306872d961d0f3b3faa8591c95d22f55f989d5176e3365b7e03a1f158ed24" + sha256 cellar: :any_skip_relocation, sonoma: "2e949c0b167c2278117aa0e3340c623b67419920e1de8c933f016581fd183579" + sha256 cellar: :any_skip_relocation, ventura: "2e949c0b167c2278117aa0e3340c623b67419920e1de8c933f016581fd183579" + sha256 cellar: :any_skip_relocation, arm64_linux: "02e3e7dc86988f811270fb9459edd3332229f25d259b20857db90c1946144578" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f53966609f56765856602f4a631171eaafeefb0fb2bb6bc9bf26fc25650ddc92" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/compose" + + generate_completions_from_executable(bin/"videoalchemy", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/videoalchemy --version") + + (testpath/"test.yaml").write <<~YAML + version: '1.0' + tasks: + - name: "Test Task" + command: "echo Hello, Videoalchemy!" + YAML + + output = shell_output("#{bin}/videoalchemy compose -f test.yaml") + assert_match "Validation Error: generate_path => is required", output + end +end diff --git a/Formula/v/viennacl.rb b/Formula/v/viennacl.rb new file mode 100644 index 0000000000000..ad3fbd388e04b --- /dev/null +++ b/Formula/v/viennacl.rb @@ -0,0 +1,46 @@ +class Viennacl < Formula + desc "Linear algebra library for many-core architectures and multi-core CPUs" + homepage "https://viennacl.sourceforge.net/" + url "https://downloads.sourceforge.net/project/viennacl/1.7.x/ViennaCL-1.7.1.tar.gz" + sha256 "a596b77972ad3d2bab9d4e63200b171cd0e709fb3f0ceabcaf3668c87d3a238b" + license "MIT" + revision 1 + head "https://github.com/viennacl/viennacl-dev.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ef65ab6738404defb457637aa1d644b54db8bd55b9c0ddcc99dfb005e2653441" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd97554d6b9c07ca2fcf625dec5198ef86dffba1b1723e9e83796ccba63c2d7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0190d51c44ab429c844d6c7d74d85aaa447639e320ad460f491e5b5a6fff8f1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a55d8851ffa58afce58203d6ed577321fa309f02c63f472794c35e147bbee696" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8088de8835167e42aa0271cd230cea442279337a2108576fd46a1db4610c72c2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "194ed5f169b951284a52fd44858a435b4312abd99f420a9b963823a4736d66c0" + sha256 cellar: :any_skip_relocation, sonoma: "8baf6eb07e9d6a0d8a302d5f0a406abeec1a734ead438b381e1a4b9343c06aba" + sha256 cellar: :any_skip_relocation, ventura: "39bb6f51bf36fed3df3de63ef1b2ab0c52b2d1ddf9bbded384d9f5fa2591d7d9" + sha256 cellar: :any_skip_relocation, monterey: "c727de7f290a066e697f0bdddc8fb72c544a725f8984872ecc87fe9a3127d377" + sha256 cellar: :any_skip_relocation, big_sur: "edf2e2951bd78f8677614eed708dc5aaf038c520cd270b4ff0ace91ec73b843d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8be9cf74c6fa495a1958540b784d738db97428ddfc84c582860ad952faa5162e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8386a723438da51b3051c19ecc14af8c69f27c6a17f6f7e6b1bdcec6c1c85083" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + libexec.install "build/examples/benchmarks/dense_blas-bench-cpu" => "test" + end + + test do + system opt_libexec/"test" + end +end diff --git a/Formula/v/vifm.rb b/Formula/v/vifm.rb new file mode 100644 index 0000000000000..4e9c8eba0780f --- /dev/null +++ b/Formula/v/vifm.rb @@ -0,0 +1,40 @@ +class Vifm < Formula + desc "Ncurses-based file manager with vi-like keybindings" + homepage "https://vifm.info/" + url "https://github.com/vifm/vifm/releases/download/v0.14.3/vifm-0.14.3.tar.bz2" + sha256 "16a9be1108d6a5a09e9f947f7256375e519ba41ebe9473659b20739fdbf3440e" + license "GPL-2.0-or-later" + head "https://github.com/vifm/vifm.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "fef99972b61b5f0ca5f6f5214dc9fae1d90508558fb0775e0bcdc7786dba2587" + sha256 arm64_sequoia: "803d2f505403b4c23e678df422bbaf2f2aa1dd6e568274b32a4eb50f0a34ee98" + sha256 arm64_sonoma: "6508066db55cdff5af7884ad5ba6455a636434c4f637397981304d034651baa5" + sha256 arm64_ventura: "3c628a1a387e199df5b32697e171202ac2f9d3cda71d3f62f932e8366b60e50d" + sha256 sonoma: "38c54361f27f82b26c461669e3bd56211d79fa229e9644214492591e5b4780b1" + sha256 ventura: "f36622bdf6b5e6cde98dee0a65b5c0b8b963bf6cbc7dd0e379fb4509aa0de358" + sha256 arm64_linux: "22f6ba59fbe1dc0925d355e21a4ac014f31830cd34c9405958aea1f90620e674" + sha256 x86_64_linux: "a1023542a6fdad4e838d0c449365c52698690f23b901a2ddde744bdf79db0619" + end + + depends_on "ncurses" + + uses_from_macos "mandoc" => :build + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-curses=#{Formula["ncurses"].opt_prefix}", + "--without-gtk", + "--without-libmagic", + "--without-X11" + system "make" + system "make", "check" + + ENV.deparallelize { system "make", "install" } + end + + test do + assert_match version.to_s, shell_output("#{bin}/vifm --version") + end +end diff --git a/Formula/v/vile.rb b/Formula/v/vile.rb new file mode 100644 index 0000000000000..b5f77e5271a03 --- /dev/null +++ b/Formula/v/vile.rb @@ -0,0 +1,51 @@ +class Vile < Formula + desc "Vi Like Emacs Editor" + homepage "https://invisible-island.net/vile/" + url "https://invisible-island.net/archives/vile/current/vile-9.8za.tgz" + sha256 "65ba15ec145dfc5506217162228c7d88f01c0490a0dccde7a8a19f1c7c1b93b2" + license "GPL-2.0-or-later" + + livecheck do + url "https://invisible-island.net/archives/vile/current/" + regex(/href=.*?vile[._-]v?(\d+(?:\.\d+)+[a-z]*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "7d79abf379edd20ee6cfbea6ee0083c4523bf15d2548a54c26f522ef7056989d" + sha256 arm64_sequoia: "7728979664a4c7edf21462cc0b8f92b142afb086ec09f25c95655ae505987f96" + sha256 arm64_sonoma: "5f69aa47ad920cc7457274cbed9e6b9f7df93ae5212f95e32e67dc052fd5aa1f" + sha256 arm64_ventura: "1da870f5170e7ec88f561de66a0cc33ef311aff1286cc75fb81dcce222199438" + sha256 sonoma: "d9b590f1bfa6fd0babaf72eed46cbecdb5e18c80e559451f8532af8771059e2f" + sha256 ventura: "f9128012e729d2813788f6fa74366538105c6894bdc5955667f298cbaa3a3818" + sha256 arm64_linux: "d567c9686cfda46b23c1f9a9fbd3f94b7b7d769dca59646e234673ac2c67b80f" + sha256 x86_64_linux: "9ec063cf33a1aaf4f5fa4f4d5eb0fb953b31c6ce159d7d171b5269db6a276f77" + end + + uses_from_macos "flex" => :build + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "perl" + + def install + system "./configure", "--disable-imake", + "--enable-colored-menus", + "--with-ncurses", + "--without-x", + "--with-screen=ncurses", + *std_configure_args + system "make", "install" + end + + test do + require "pty" + ENV["TERM"] = "xterm" + PTY.spawn(bin/"vile") do |r, w, _pid| + w.write "ibrew\e:w new\r:q\r" + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + assert_path_exists testpath/"new" + assert_equal "brew\n", (testpath/"new").read + end +end diff --git a/Formula/v/vilistextum.rb b/Formula/v/vilistextum.rb new file mode 100644 index 0000000000000..9359fd7f022cc --- /dev/null +++ b/Formula/v/vilistextum.rb @@ -0,0 +1,50 @@ +class Vilistextum < Formula + desc "HTML to text converter" + homepage "https://bhaak.net/vilistextum/" + url "https://bhaak.net/vilistextum/vilistextum-2.6.9.tar.gz" + sha256 "3a16b4d70bfb144e044a8d584f091b0f9204d86a716997540190100c20aaf88d" + license "GPL-2.0-only" + + livecheck do + url "https://bhaak.net/vilistextum/download.html" + regex(/href=.*?vilistextum[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :page_match do |page, regex| + # Omit version with old scheme that is incorrectly treated as newest + # NOTE: This `strategy` block can be removed in the future if/when the + # download page only contains versions with three parts like 2.3.0. + page.scan(regex).map { |match| ((version = match.first) == "2.22") ? nil : version } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "49595a548ac3b8e7818c1467db59e825ee7d0ca03d38311b3494451bc40687e8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "518d8afa3e88d75bb45459300aa06568ebdb4b712495fac4d0edbe3dcfa17fb5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ca2e91c4c222843276180c7e4368437fad8284a673b5cd3b26aeb3650204b6f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a6b83b2e8ddabeedb5def8c287c556efa9b442929a98d06171265b7f781e8cf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e63b2fe29b72a3f2203aaf741fa4589b345c6ca5fb761a132cf27a6b5bee5068" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dfd4ab35a880dbac2c93e43eed5e0001093fad04c94c32f955c3f91822d84ccd" + sha256 cellar: :any_skip_relocation, sonoma: "8cbbc0db2ecdc6e6cd4cc5d6c003e757911c724310d249553a0cd848b26317c7" + sha256 cellar: :any_skip_relocation, ventura: "768041a4e365f2dde17beb262782927aed7a6b44f5d6d0290e962ce2b96d0925" + sha256 cellar: :any_skip_relocation, monterey: "24296c2112ad6437cf40295a62b10898500ed3c13b2af65f514f8138ea874b6b" + sha256 cellar: :any_skip_relocation, big_sur: "c1107f3edeb308819c5b074f1ed2072583c3bc5a7800af162ab10ef460548f18" + sha256 cellar: :any_skip_relocation, catalina: "cead55f6cb7e4d66d3f6ca2bf013f0cb653144a0fe79620fdd5735a1e57566a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a04388664012287fb80e99c0fc242735287a279d74ee7a0e29c4414567c41a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b6ebe879dd14d1bf3482d057ab7364ff9851f2ab3d4af5d0a97a59c9c2ca8d8" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of ``; .o:: first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"vilistextum", "-v" + end +end diff --git a/Formula/v/vim.rb b/Formula/v/vim.rb new file mode 100644 index 0000000000000..2e951ba663f4b --- /dev/null +++ b/Formula/v/vim.rb @@ -0,0 +1,107 @@ +class Vim < Formula + desc "Vi 'workalike' with many additional features" + homepage "https://www.vim.org/" + # vim should only be updated every 50 releases on multiples of 50 + url "https://github.com/vim/vim/archive/refs/tags/v9.1.1850.tar.gz" + sha256 "bdbb731902bec15784789a24d93f201d541ba942d9f663b446bd9f62d896b907" + license "Vim" + head "https://github.com/vim/vim.git", branch: "master" + + # The Vim repository contains thousands of tags and the `Git` strategy isn't + # ideal in this context. This is an exceptional situation, so this checks the + # first 50 tags using the GitHub API (to minimize data transfer). + livecheck do + url "https://api.github.com/repos/vim/vim/tags?per_page=50" + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :json do |json, regex| + json.map do |tag| + match = tag["name"]&.match(regex) + next if match.blank? + + match[1] + end + end + throttle 50 + end + + bottle do + sha256 arm64_tahoe: "0081cc54900b22ca61f1d4b18547a56f3e5faee8e5986516a692756cc47333de" + sha256 arm64_sequoia: "b19ad1ae7d0c165d94b59e710bb0576af50e973ea2f95b01028f79f7f89a7fa6" + sha256 arm64_sonoma: "b774316eeb8bae2b5c7d567724fc0a3069e137c83c57942b8ad34fa85f4cfc78" + sha256 sonoma: "bfc826e05c446b6df72d593178a6b8e860cf0c8157685f3c3a5dbd92087b4cf2" + sha256 arm64_linux: "98d817ca039fec81bccc4c45a547cb470c0ada47f7043c1e7066350ff30aef45" + sha256 x86_64_linux: "a689dee71641417f43136ec97d3962ac46fb33a0fe7574c1e7a9c64fa3b0d03e" + end + + depends_on "gettext" + depends_on "libsodium" + depends_on "lua" + depends_on "ncurses" + depends_on "python@3.14" + depends_on "ruby" + + uses_from_macos "perl" + + on_linux do + depends_on "acl" + end + + conflicts_with "ex-vi", + because: "vim and ex-vi both install bin/ex and bin/view" + + conflicts_with "macvim", + because: "vim and macvim both install vi* binaries" + + def install + ENV.prepend_path "PATH", Formula["python@3.14"].opt_libexec/"bin" + + # https://github.com/Homebrew/homebrew-core/pull/1046 + ENV.delete("SDKROOT") + + # vim doesn't require any Python package, unset PYTHONPATH. + ENV.delete("PYTHONPATH") + + ENV.append_to_cflags "-mllvm -enable-constraint-elimination=0" if DevelopmentTools.clang_build_version == 1600 + + # We specify HOMEBREW_PREFIX as the prefix to make vim look in the + # the right place (HOMEBREW_PREFIX/share/vim/{vimrc,vimfiles}) for + # system vimscript files. We specify the normal installation prefix + # when calling "make install". + # Homebrew will use the first suitable Perl & Ruby in your PATH if you + # build from source. Please don't attempt to hardcode either. + system "./configure", "--prefix=#{HOMEBREW_PREFIX}", + "--mandir=#{man}", + "--enable-multibyte", + "--with-tlib=ncurses", + "--with-compiledby=Homebrew", + "--enable-cscope", + "--enable-terminal", + "--enable-perlinterp", + "--enable-rubyinterp", + "--enable-python3interp", + "--disable-gui", + "--without-x", + "--enable-luainterp", + "--with-lua-prefix=#{Formula["lua"].opt_prefix}" + system "make" + # Parallel install could miss some symlinks + # https://github.com/vim/vim/issues/1031 + ENV.deparallelize + # If stripping the binaries is enabled, vim will segfault with + # statically-linked interpreters like ruby + # https://github.com/vim/vim/issues/114 + system "make", "install", "prefix=#{prefix}", "STRIP=#{which "true"}" + bin.install_symlink "vim" => "vi" + end + + test do + (testpath/"commands.vim").write <<~VIM + :python3 import vim; vim.current.buffer[0] = 'hello python3' + :wq + VIM + system bin/"vim", "-T", "dumb", "-s", "commands.vim", "test.txt" + assert_equal "hello python3", File.read("test.txt").chomp + assert_match "+gettext", shell_output("#{bin}/vim --version") + assert_match "+sodium", shell_output("#{bin}/vim --version") + end +end diff --git a/Formula/v/vimpager.rb b/Formula/v/vimpager.rb new file mode 100644 index 0000000000000..dcb996a31a562 --- /dev/null +++ b/Formula/v/vimpager.rb @@ -0,0 +1,48 @@ +class Vimpager < Formula + desc "Use ViM as PAGER" + homepage "https://github.com/rkitover/vimpager" + url "https://github.com/rkitover/vimpager/archive/refs/tags/2.06.tar.gz" + sha256 "cc616d0840a6f2501704eea70de222ab662421f34b2da307e11fb62aa70bda5d" + license "BSD-2-Clause" + head "https://github.com/rkitover/vimpager.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e3063e707ee99bf0930d116200bc09709807c0bd69ce7f9d69ba8f147c95ca35" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f2a6dd688af38e4777f82795806da5477f9bbc91f05f1bb567777656169652a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b414a1f47556bd96038f4314fdcc4a5794c7064990e2b464c951717043c7c0c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd379bf4e911d29607becd56bc99a4d3c0c5fafaa5bcf422c7df37e5dc9ec2bb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b2b9ce26d12c155adb0c9e2524b67b7e8e0a41fb75ee524999ec0818ca619659" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "356c5407fc0656ac0b4ae4a7a3e62f1992525a120a7a1d0b6fdd514561d5381d" + sha256 cellar: :any_skip_relocation, sonoma: "4f8a31227e01c9e95ee0fee475942de77686f3ea1b24fdb6fe518c5f4fc551b7" + sha256 cellar: :any_skip_relocation, ventura: "c37538249a0c974631d1b6b09d7dcb434a7cca9a9453d2c273ac23c0196932d1" + sha256 cellar: :any_skip_relocation, monterey: "37620c6662f65c8314c749c26260bafff4645b80877e9f152783d063dcae9283" + sha256 cellar: :any_skip_relocation, big_sur: "9ead831c50c50e1b95b18695737936bc907c9241867d3700c87120c8af09aea7" + sha256 cellar: :any_skip_relocation, catalina: "2a409da1fc4a31e1165e33ed681ed15b874d514721c7295a0901ebf4516aa469" + sha256 cellar: :any_skip_relocation, arm64_linux: "88731e26d05f8af78003b1fd55a7e19bb8c1bc3e1475ff4a5e995d459158acaf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "305b43fcc4537a7e89d1a30aef599be641925cb68fe6f87de8216e9cec4391ad" + end + + depends_on "pandoc" => :build + + def install + system "make", "install", "PREFIX=#{prefix}" + system "make", "docs" + end + + def caveats + <<~EOS + To use vimpager as your default pager, add `export PAGER=vimpager` to your + shell configuration. + EOS + end + + test do + (testpath/"test.txt").write <<~EOS + This is test + EOS + + assert_match(/This is test/, shell_output("#{bin}/vimcat test.txt")) + end +end diff --git a/Formula/v/vimpc.rb b/Formula/v/vimpc.rb new file mode 100644 index 0000000000000..098e9331d021b --- /dev/null +++ b/Formula/v/vimpc.rb @@ -0,0 +1,44 @@ +class Vimpc < Formula + desc "Ncurses based mpd client with vi like key bindings" + homepage "https://sourceforge.net/projects/vimpc/" + url "https://github.com/boysetsfrog/vimpc/archive/refs/tags/v0.09.2.tar.gz" + sha256 "caa772f984e35b1c2fbe0349bc9068fc00c17bcfcc0c596f818fa894cac035ce" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/boysetsfrog/vimpc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "8013c280a8da6f6acbe6df84589b721620b2ae2d171374a8a1775e80636d213a" + sha256 arm64_sequoia: "1fcf1d047f24ee3ba7d4ef487535073559d3cd25129d607581784f2625e40bcf" + sha256 arm64_sonoma: "e1e7386a32a897ad76ea0a934d81f3c694f32638df2a7ec6a440703e00086f00" + sha256 arm64_ventura: "c8ba4e9529a838e511d9a8cef03df1fff057074983c6ec28a8b89b5b948257d3" + sha256 sonoma: "f176d799036dee333704bb6fbc5c682703b384df24710d566353fbd36c5c73c1" + sha256 ventura: "5c2aaf2d541312c5cc94edee59489088f397a5345e548e869057b1c62eb32d65" + sha256 arm64_linux: "7228a6e08f338c414bd766a2616bc2b25dab0daad7d6c0c381c62724f634a1c9" + sha256 x86_64_linux: "20f51a883a9520406f7cbfd7e8c8d9bc533efbb03ce4ecd63e3578aca351daa4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "libmpdclient" + depends_on "pcre" + depends_on "taglib" + + uses_from_macos "curl" + uses_from_macos "ncurses" + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"vimpc", "-v" + end +end diff --git a/Formula/v/vimtutor-sequel.rb b/Formula/v/vimtutor-sequel.rb new file mode 100644 index 0000000000000..ccba7bf0be1d3 --- /dev/null +++ b/Formula/v/vimtutor-sequel.rb @@ -0,0 +1,25 @@ +class VimtutorSequel < Formula + desc "Advanced vimtutor for intermediate vim users" + homepage "https://github.com/micahkepe/vimtutor-sequel" + url "https://github.com/micahkepe/vimtutor-sequel/releases/download/v1.3.1/vimtutor-sequel-1.3.1.tar.gz" + sha256 "190627358111d73170d4b1bc7a9823c511b44a71068a8c54207fdd116f4c2152" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "95f9e9dc1f8ef08838250ec32a95122ef979a6a437b5454cf5db4ce1ffe5e27b" + end + + depends_on "vim" + + def install + bin.install "vimtutor-sequel.sh" => "vimtutor-sequel" + pkgshare.install "vimtutor-sequel.txt" + pkgshare.install "vimtutor-sequel.vimrc" + end + + test do + assert_match "Vimtutor Sequel version #{version}", shell_output("#{bin}/vimtutor-sequel --version") + end +end diff --git a/Formula/v/vineflower.rb b/Formula/v/vineflower.rb new file mode 100644 index 0000000000000..b6ecc5d2cbe10 --- /dev/null +++ b/Formula/v/vineflower.rb @@ -0,0 +1,46 @@ +class Vineflower < Formula + desc "Java decompiler" + homepage "https://vineflower.org/" + url "https://github.com/Vineflower/vineflower/archive/refs/tags/1.11.1.tar.gz" + sha256 "104df4042023190416bff2ad0e2386ddf7669c6aa585f19b9d965a7f5ca5132b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1cba4e8ecb0595caa54ffac65633de2aa402920b6f26cb381209b2ef8959c996" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "62479a14ae3965038932cdf833ee87a48e50b1db0c767362c82d7b5327f62849" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b54dfedf26ee257ef870b6e6a5b96a84ba6fd96955ab16818c093d7b534d653a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "754e2ce57f9e000ac224811a2fb61c127acb8ca4420e1017faa1d162d4da280d" + sha256 cellar: :any_skip_relocation, sonoma: "0db4c09fd07af41914236c4221a59b5e618d3303ea95fc435369813ab8bdda9a" + sha256 cellar: :any_skip_relocation, ventura: "49ee9fd5f4021a9d9eb7d91840c99d111c80644fc0c838e7b83a762934c9f5d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "588526a440bb51f009a1f5a31025a7c0f64fbb2cf95a9dd687d234cfd1739968" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ffc032d554d132c2387490e51c8e11a084d5a31d6d97956c69286b999966355" + end + + # Issue ref: https://github.com/Vineflower/vineflower/issues/495 + depends_on "gradle@8" => :build + depends_on "openjdk" + + def install + system "gradle", "build", "-x", "test" + + version_suffix = ENV["GITHUB_ACTIONS"] ? "" : "+local" + jar = Dir["build/libs/vineflower-#{version}#{version_suffix}.jar"].first + libexec.install jar => "vineflower.jar" + + bin.write_jar_script libexec/"vineflower.jar", "vineflower" + end + + test do + (testpath/"FooBar.java").write <<~JAVA + public class FooBar { + public static void bar() {} + public static void foo() { + bar(); + } + } + JAVA + + system Formula["openjdk"].bin/"javac", "FooBar.java" + refute_includes shell_output("#{bin}/vineflower FooBar.class"), "error" + end +end diff --git a/Formula/v/vineyard.rb b/Formula/v/vineyard.rb new file mode 100644 index 0000000000000..643c3faefa94c --- /dev/null +++ b/Formula/v/vineyard.rb @@ -0,0 +1,171 @@ +class Vineyard < Formula + desc "In-memory immutable data manager. (Project under CNCF)" + homepage "https://v6d.io" + url "https://github.com/v6d-io/v6d/releases/download/v0.24.4/v6d-0.24.4.tar.gz" + sha256 "055bab09ca67542ccb13229de8c176b7875b4ba8c8a818e942218dccc32a6bae" + license "Apache-2.0" + revision 3 + + bottle do + sha256 arm64_tahoe: "388703848a6fae1239d0513990fa0d0317cddd66d8d421d29ad4adf025c65e39" + sha256 arm64_sequoia: "4c5443b768dd9089120473ce9433133f2d465dd883cbd8f1be67fefdc10455fb" + sha256 arm64_sonoma: "2e365658fce541b6df6659907fa801c252df280575f7d30064c7fe69b6e62876" + sha256 sonoma: "885299f05cee5c5e16f14c5329ecc67f796019c6b874fc7b33208552820c1313" + sha256 cellar: :any_skip_relocation, arm64_linux: "3db5ee41222f909dc047486254a3b7bb5f8dfdbb9eedb21abf257433fe1516c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3ef1fba309bea99d222332012d1a9e0a9bb82ec55813883cc015f31bc204053" + end + + depends_on "cmake" => [:build, :test] + depends_on "llvm" => :build # for clang Python bindings + depends_on "openssl@3" => :build # indirect (not linked) but CMakeLists.txt checks for it + depends_on "python-setuptools" => :build + depends_on "python@3.14" => :build + depends_on "apache-arrow" + depends_on "boost" + depends_on "cpprestsdk" + depends_on "etcd" + depends_on "etcd-cpp-apiv3" + depends_on "gflags" + depends_on "glog" + depends_on "libgrape-lite" + depends_on "open-mpi" + + on_tahoe do + fails_with :clang do + build 1700 + cause "https://github.com/llvm/llvm-project/issues/142118" + end + end + + on_linux do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # apache-arrow 21.0.0 support + # https://github.com/v6d-io/v6d/pull/2052 + patch do + url "https://github.com/v6d-io/v6d/commit/cab3ed986e15464d6b544a98bac4db38d0e89e3a.patch?full_index=1" + sha256 "ce1325c893f210a3eae9ff29a8ab6cfa377d6672ab260db58de8522857856206" + end + + def install + # TODO: Remove after https://github.com/Homebrew/brew/pull/20696 + ENV.llvm_clang if OS.mac? && MacOS.version == :tahoe && DevelopmentTools.clang_build_version == 1700 + + # Workaround to support Boost 1.87.0+ until upstream fix for https://github.com/v6d-io/v6d/issues/2041 + boost_asio_post_files = %w[ + src/server/async/socket_server.cc + src/server/server/vineyard_server.cc + src/server/services/etcd_meta_service.cc + src/server/services/local_meta_service.cc + src/server/services/local_meta_service.h + src/server/services/meta_service.cc + ] + inreplace boost_asio_post_files, /^(\s*)(\S+)\.post\(/, "\\1boost::asio::post(\\2," + inreplace "src/server/services/etcd_meta_service.cc", "backoff_timer_->cancel(ec);", "backoff_timer_->cancel();" + + # Workaround to support Boost 1.88.0+ + # TODO: Try upstreaming fix along with above + boost_process_files = %w[ + src/server/util/etcd_launcher.cc + src/server/util/etcd_member.cc + src/server/util/kubectl.cc + src/server/util/proc.cc + src/server/util/proc.h + src/server/util/redis_launcher.h + ] + inreplace boost_process_files, '#include "boost/process.hpp"', "" + inreplace "src/server/util/etcd_launcher.h", '#include "boost/process/child.hpp"', "" + ENV.append "CXXFLAGS", "-std=c++17" + ENV.append "CXXFLAGS", "-DBOOST_PROCESS_VERSION=1" + headers = %w[args async child env environment io search_path] + headers.each { |header| ENV.append "CXXFLAGS", "-include boost/process/v1/#{header}.hpp" } + + python3 = "python3.14" + # LLVM is keg-only. + llvm = deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+)?$/) } + ENV.prepend_path "PYTHONPATH", llvm.opt_prefix/Language::Python.site_packages(python3) + + args = [ + "-DBUILD_VINEYARD_PYTHON_BINDINGS=OFF", + "-DBUILD_VINEYARD_TESTS=OFF", + "-DCMAKE_CXX_STANDARD=17", + "-DCMAKE_CXX_STANDARD_REQUIRED=TRUE", + "-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON", # for newer protobuf + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DLIBGRAPELITE_INCLUDE_DIRS=#{Formula["libgrape-lite"].opt_include}", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + "-DPYTHON_EXECUTABLE=#{which(python3)}", + "-DUSE_EXTERNAL_ETCD_LIBS=ON", + "-DUSE_EXTERNAL_HIREDIS_LIBS=ON", + "-DUSE_EXTERNAL_REDIS_LIBS=ON", + "-DUSE_LIBUNWIND=OFF", + ] + args << "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Replace `open-mpi` Cellar path that breaks on `open-mpi` version/revision bumps. + # CMake FindMPI uses REALPATH so there isn't a clean way to handle during generation. + openmpi = Formula["open-mpi"] + inreplace lib/"cmake/vineyard/vineyard-targets.cmake", openmpi.prefix.realpath, openmpi.opt_prefix + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + + #include + + int main(int argc, char **argv) { + vineyard::Client client; + VINEYARD_CHECK_OK(client.Connect(argv[1])); + + std::shared_ptr status; + VINEYARD_CHECK_OK(client.InstanceStatus(status)); + std::cout << "vineyard instance is: " << status->instance_id << std::endl; + + return 0; + } + CPP + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + + project(vineyard-test LANGUAGES C CXX) + + find_package(vineyard REQUIRED) + + add_executable(vineyard-test ${CMAKE_CURRENT_SOURCE_DIR}/test.cc) + target_include_directories(vineyard-test PRIVATE ${VINEYARD_INCLUDE_DIRS}) + target_link_libraries(vineyard-test PRIVATE ${VINEYARD_LIBRARIES}) + CMAKE + + # Remove Homebrew's lib directory from LDFLAGS as it is not available during + # `shell_output`. + ENV.remove "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + + vineyard_sock = testpath/"vineyard.sock" + # prepare vineyardd + vineyardd_pid = spawn bin/"vineyardd", "--norpc", + "--meta=local", + "--socket=#{vineyard_sock}" + + # sleep to let vineyardd get its wits about it + sleep 10 until vineyard_sock.exist? && vineyard_sock.socket? + + assert_equal("vineyard instance is: 0\n", + shell_output("#{testpath}/build/vineyard-test #{vineyard_sock}")) + ensure + # clean up the vineyardd process before we leave + Process.kill("HUP", vineyardd_pid) + end +end diff --git a/Formula/v/vint.rb b/Formula/v/vint.rb new file mode 100644 index 0000000000000..9f9f646d702ec --- /dev/null +++ b/Formula/v/vint.rb @@ -0,0 +1,94 @@ +class Vint < Formula + include Language::Python::Virtualenv + + desc "Vim script Language Lint" + homepage "https://github.com/Vimjas/vint" + url "https://files.pythonhosted.org/packages/9c/c7/d5fbe5f778edee83cba3aea8cc3308db327e4c161e0656e861b9cc2cb859/vim-vint-0.3.21.tar.gz" + sha256 "5dc59b2e5c2a746c88f5f51f3fafea3d639c6b0fdbb116bb74af27bf1c820d97" + license "MIT" + revision 2 + head "https://github.com/Vimjas/vint.git", branch: "master" + + bottle do + rebuild 7 + sha256 cellar: :any, arm64_tahoe: "253fc8481dee8ad20013ec07a09d1de0857b361f4ea4b9109e1d042720be995a" + sha256 cellar: :any, arm64_sequoia: "162fc8f95662794610623e833c5dc3b8a8b4061b96e051ece9df831c35b6857f" + sha256 cellar: :any, arm64_sonoma: "03f615049167d33b5ab100cbbaff0d4461503392d550b895c98438ba5e5855e4" + sha256 cellar: :any, sonoma: "0f54ebab62e360237f7dbb53db433dbf7270a94a57f63f6fbca5b7ce4dc06618" + sha256 cellar: :any_skip_relocation, arm64_linux: "627fcee4eb35a20a7af92b2e52e4dd278ce997a1107406cfc45fb07aefa4bc21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a203916188f247d771f950c352eb7d70c5483651a612e2366ff9804da26b00c2" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "ansicolor" do + url "https://files.pythonhosted.org/packages/79/74/630817c7eb1289a1412fcc4faeca74a69760d9c9b0db94fc09c91978a6ac/ansicolor-0.3.2.tar.gz" + sha256 "3b840a6b1184b5f1568635b1adab28147947522707d41ceba02d5ed0a0877279" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + # Drop setuptools dep. Next release will switch to setuptools_scm, + # this patch uses importlib for a smaller self-contained diff + # https://github.com/Vimjas/vint/commit/997677ae688fbaf47da426500cc56aae7305d243 + patch :DATA + + def install + virtualenv_install_with_resources + end + + test do + system bin/"vint", "--help" + (testpath/"bad.vim").write <<~VIM + not vimscript + VIM + assert_match "E492", shell_output("#{bin}/vint bad.vim", 1) + + (testpath/"good.vim").write <<~VIM + " minimal vimrc + syntax on + set backspace=indent,eol,start + filetype plugin indent on + VIM + assert_empty shell_output("#{bin}/vint good.vim") + end +end + +__END__ +diff --git a/vint/linting/cli.py b/vint/linting/cli.py +index 55db52e..c347f23 100644 +--- a/vint/linting/cli.py ++++ b/vint/linting/cli.py +@@ -1,7 +1,6 @@ + import sys + from argparse import ArgumentParser + from pathlib import PosixPath +-import pkg_resources + import logging + + from vint.linting.linter import Linter +@@ -150,11 +149,11 @@ class CLI(object): + + + def _get_version(self): +- # In unit tests, pkg_resources cannot find vim-vint. +- # So, I decided to return dummy version ++ from importlib import metadata ++ + try: +- version = pkg_resources.require('vim-vint')[0].version +- except pkg_resources.DistributionNotFound: ++ version = metadata.version('vim-vint') ++ except metadata.PackageNotFoundError: + version = 'test_mode' + + return version diff --git a/Formula/v/vip.rb b/Formula/v/vip.rb new file mode 100644 index 0000000000000..1bf8fd42e46d9 --- /dev/null +++ b/Formula/v/vip.rb @@ -0,0 +1,55 @@ +class Vip < Formula + desc "Program that provides for interactive editing in a pipeline" + homepage "https://users.cs.duke.edu/~des/vip.html" + url "https://users.cs.duke.edu/~des/scripts/vip" + version "19971113" + sha256 "171278e8bd43abdbd3a4c35addda27a0d3c74fc784dbe60e4783d317ac249d11" + # Permission is granted to reproduce and distribute this program + # with the following conditions: + # 1) This copyright notice and the author identification below + # must be left intact in the program and in any copies. + # 2) Any modifications to the program must be clearly identified + # in the source file. + # + # Written by Daniel E. Singer, Duke Univ. Dept of Computer Science, 5/30/95 + license :cannot_represent + + # This only uses the first match, which should be the timestamp near the + # start of the file. There are subsequent dates that use a mm/dd/yy format + # instead of yy/mm/dd and lead to an `invalid date` error. + livecheck do + url :stable + regex(%r{(\d{2}/\d{2}/\d{2})\s+\d{2}:\d{2}}i) + strategy :page_match do |page, regex| + match = page.match(regex) + next if match.blank? + + Date.parse(match[1])&.strftime("%Y%m%d") + end + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "4168bb377aa3ca2722f484c1bfbd8c5d89e9231565439ac1ad2ad06ddfeb3d20" + end + + resource "man" do + url "https://www.cs.duke.edu/~des/scripts/vip.man" + sha256 "37b2753f7c7b39c81f97b10ea3f8e2dd5ea92ea8d130144fa99ed54306565f6f" + end + + # use awk and /var/tmp as temporary directory + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/vip/19971113.patch" + sha256 "96879c8d778f21b21aa27eb138424a82ffa8e8192b8cf15b2c4a5794908ef790" + end + + def install + bin.install "vip" + resource("man").stage do + man1.install "vip.man" => "vip.1" + end + end +end diff --git a/Formula/v/vips.rb b/Formula/v/vips.rb new file mode 100644 index 0000000000000..6347314046b63 --- /dev/null +++ b/Formula/v/vips.rb @@ -0,0 +1,94 @@ +class Vips < Formula + desc "Image processing library" + homepage "https://github.com/libvips/libvips" + url "https://github.com/libvips/libvips/releases/download/v8.17.3/vips-8.17.3.tar.xz" + sha256 "41e9a1439cd57dcc6d4435a085e2cfe181d9da1962fa84a484f09e8b536e4b77" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_tahoe: "4f44cc392df532999605e02234097ac91042184f8d5f3a6c8a414225e7260845" + sha256 arm64_sequoia: "456f9d782dd6b2af4d8311b8d040988abf8af69fd89400c1ebc085b4c29f9733" + sha256 arm64_sonoma: "67e7abf054152ee0163f3761f8f6308d7250b148dd863c3700aed2fb6e4d3217" + sha256 sonoma: "42bef575db06850228f3c4cb09895c43c4c02164aca9c83fa32f9584c7ab792f" + sha256 arm64_linux: "5c412ee24f00dfca055cfb8df678d728ba5a0ece5a98d785f8997674368a23bd" + sha256 x86_64_linux: "9bdc27bcffe24ac1397fd84fb6a9b40a65656e7ee3776a40abdf8a556749ec00" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "cfitsio" + depends_on "cgif" + depends_on "fftw" + depends_on "fontconfig" + depends_on "gettext" + depends_on "glib" + depends_on "highway" + depends_on "imagemagick" + depends_on "jpeg-xl" + depends_on "libarchive" + depends_on "libexif" + depends_on "libheif" + depends_on "libimagequant" + depends_on "libmatio" + depends_on "librsvg" + depends_on "libspng" + depends_on "libtiff" + depends_on "little-cms2" + depends_on "mozjpeg" + depends_on "openexr" + depends_on "openjpeg" + depends_on "openslide" + depends_on "pango" + depends_on "poppler" + depends_on "webp" + + uses_from_macos "python" => :build + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + # mozjpeg needs to appear before libjpeg, otherwise it's not used + ENV.prepend_path "PKG_CONFIG_PATH", Formula["mozjpeg"].opt_lib/"pkgconfig" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + if OS.mac? + # `pkg-config --libs vips` includes libarchive, but that package is + # keg-only so it needs to look for the pkgconfig file in libarchive's opt + # path. + libarchive = Formula["libarchive"].opt_prefix + inreplace [lib/"pkgconfig/vips.pc", lib/"pkgconfig/vips-cpp.pc"] do |s| + s.gsub!(/^Requires\.private:(.*)\blibarchive\b(.*?)(,.*)?$/, + "Requires.private:\\1#{libarchive}/lib/pkgconfig/libarchive.pc\\3") + end + end + end + + test do + system bin/"vips", "-l" + cmd = "#{bin}/vipsheader -f width #{test_fixtures("test.png")}" + assert_equal "8", shell_output(cmd).chomp + + # --trellis-quant requires mozjpeg, vips warns if it's not present + cmd = "#{bin}/vips jpegsave #{test_fixtures("test.png")} #{testpath}/test.jpg --trellis-quant 2>&1" + assert_empty shell_output(cmd) + + # [palette] requires libimagequant, vips warns if it's not present + cmd = "#{bin}/vips copy #{test_fixtures("test.png")} #{testpath}/test.png[palette] 2>&1" + assert_empty shell_output(cmd) + + # Make sure `pkg-config` can parse `vips.pc` and `vips-cpp.pc` after the `inreplace`. + system "pkgconf", "--print-errors", "vips" + system "pkgconf", "--print-errors", "vips-cpp" + end +end diff --git a/Formula/v/vipsdisp.rb b/Formula/v/vipsdisp.rb new file mode 100644 index 0000000000000..13b8ec1b9c40c --- /dev/null +++ b/Formula/v/vipsdisp.rb @@ -0,0 +1,53 @@ +class Vipsdisp < Formula + desc "Viewer for large images" + homepage "https://github.com/jcupitt/vipsdisp" + url "https://github.com/jcupitt/vipsdisp/releases/download/v4.1.2/vipsdisp-4.1.2.tar.xz" + sha256 "1f9edf4cf7b3abcccbd7cb61e63b8d9c8397db689dd3c937048fea7ca56d7b0c" + license "MIT" + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "e96efb520abcfe2ec3480c03967b47f9277827e1e55cd3a5d3d577245aa85ba3" + sha256 cellar: :any, arm64_sequoia: "eaa67c33717298b5477ad9687a39e9a00a579e3850f90d1b0fb734c1093293bb" + sha256 cellar: :any, arm64_sonoma: "821b91ff0853e7b29ad63a002df4817bda0b387e331205540a1a65ca5cf570ab" + sha256 cellar: :any, arm64_ventura: "10f33027b004be6cf5b6e48f1f01d8447be738e2a69b67e134a46c3c4d00914c" + sha256 cellar: :any, sonoma: "0966771f6ba547c06fa250505218cb3219ceb3a11dce5f6188045d2763801be3" + sha256 cellar: :any, ventura: "3d3fadaf0b9a14f093e00af7516b356401e927daa6dca2f815e4668c0a59b645" + sha256 arm64_linux: "976698d21deec523c0d69ffa2f52362d08b16f833c316fa0e81e53c79fc4699e" + sha256 x86_64_linux: "526f1451fd37d2b905494cdd3032d95cf3ca4a7477746a626693f6577097279b" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "graphene" + depends_on "gtk4" + depends_on "hicolor-icon-theme" + depends_on "vips" + + def install + # ensure that we don't run the meson post install script + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + system "#{Formula["gtk4"].opt_bin}/gtk4-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + + test do + system bin/"vipsdisp", "--help" + end +end diff --git a/Formula/v/virgil.rb b/Formula/v/virgil.rb new file mode 100644 index 0000000000000..d52735bc5c045 --- /dev/null +++ b/Formula/v/virgil.rb @@ -0,0 +1,34 @@ +class Virgil < Formula + desc "CLI tool to manage your Virgil account and applications" + homepage "https://github.com/VirgilSecurity/virgil-cli" + url "https://github.com/VirgilSecurity/virgil-cli.git", + tag: "v5.2.9", + revision: "604e4339d100c9cd133f4730ba0efbd599321ecb" + license "BSD-3-Clause" + head "https://github.com/VirgilSecurity/virgil-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, sonoma: "0d6baf5fbae58063f78f30264489c23a91179d000db777feb19d88d67786862d" + sha256 cellar: :any_skip_relocation, ventura: "933b5e559d600ae1953d8e627863ee64525bea81f11dd7cc87439471a1065625" + sha256 cellar: :any_skip_relocation, monterey: "6ad1a2ee3c09e0ea3ae2027c7a35a26a9ab048ba3b3454072bc47ff2f144a7dc" + sha256 cellar: :any_skip_relocation, big_sur: "e9ce86f5569a014b80c43e5bdf3d16aed3fc81c3e6fe4841e0b649f6d07542d3" + sha256 cellar: :any_skip_relocation, catalina: "841082fa11c796ba0045d4ced3cead342fba308b049f07db4a0bd3309acc08c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05da77ebed1e01c11281b7f148441a6aa22f9be8d219037913c238d95c615425" + end + + disable! date: "2025-03-02", because: :does_not_build + + depends_on "go" => :build + # https://github.com/VirgilSecurity/virgil-cli/issues/58 + depends_on arch: :x86_64 + + def install + system "make" + bin.install "virgil" + end + + test do + result = shell_output "#{bin}/virgil purekit keygen" + assert_match "SK.1.", result + end +end diff --git a/Formula/v/virt-manager.rb b/Formula/v/virt-manager.rb new file mode 100644 index 0000000000000..dd169b98154ab --- /dev/null +++ b/Formula/v/virt-manager.rb @@ -0,0 +1,127 @@ +class VirtManager < Formula + include Language::Python::Virtualenv + include Language::Python::Shebang + + desc "App for managing virtual machines" + homepage "https://virt-manager.org/" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/virt-manager/virt-manager.git", branch: "main" + + stable do + url "https://releases.pagure.org/virt-manager/virt-manager-5.1.0.tar.xz" + sha256 "ccfc44b6c1c0be8398beb687c675d9ea4ca1c721dfb67bd639209a7b0dec11b1" + + # Backport support for etree rather than deprecated libxml2 python bindings + # Ref: https://github.com/virt-manager/virt-manager/pull/983 + patch do + url "https://github.com/virt-manager/virt-manager/commit/d4988b02efb8bba91fd55614fbbff11b3a915d44.patch?full_index=1" + sha256 "fc1daaf8440b01600b0297384f5bdd1cda654aaee958ce3fcd27d79c6b2d9ffb" + end + patch do + url "https://github.com/virt-manager/virt-manager/commit/ff9fa95e52f890ccd8dce18567aa7cc30582ca4f.patch?full_index=1" + sha256 "5ae4ce21b65cf77fa9511bae70799bd3c1890ab15a31372491662a7dc186df4f" + end + patch do + url "https://github.com/virt-manager/virt-manager/commit/d0372e82c8b6fe6b5517d850a81847422c861446.patch?full_index=1" + sha256 "5084650b38527f8bac3f2ea803b81f1a49ecf51cb461c3ad7088ec9f90845dae" + end + patch do + url "https://github.com/virt-manager/virt-manager/commit/766bf2ecdc5ac6853b41a36412d09c1950c700bf.patch?full_index=1" + sha256 "24deb9287b86caaac7eaea7d5dff145c0686bbc32ccb6952a8a0d4b0c6d3adeb" + end + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2d4c414f5d463facecd2891e7cd47eeba3d2a1ac28e0d6a8c6a8551cacd86fbd" + end + + depends_on "docutils" => :build + depends_on "intltool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "adwaita-icon-theme" + depends_on "certifi" => :no_linkage + depends_on "cpio" + depends_on "gtk-vnc" + depends_on "gtksourceview4" + depends_on "libosinfo" + depends_on "libvirt-glib" + depends_on "libvirt-python" => :no_linkage + depends_on :macos + depends_on "osinfo-db" + depends_on "py3cairo" => :no_linkage + depends_on "pygobject3" => :no_linkage + depends_on "python@3.14" + depends_on "spice-gtk" + depends_on "vte3" + + pypi_packages package_name: "", + exclude_packages: "certifi", + extra_packages: "requests" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + python3 = "python3.14" + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + + system "meson", "setup", "build", "-Dtests=disabled", + "-Dupdate-icon-cache=false", + "-Dcompile-schemas=false", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children + end + + def post_install + # manual schema compile step + system Formula["glib"].opt_bin/"glib-compile-schemas", HOMEBREW_PREFIX/"share/glib-2.0/schemas" + # manual icon cache update step + system Formula["gtk+3"].opt_bin/"gtk3-update-icon-cache", HOMEBREW_PREFIX/"share/icons/hicolor" + end + + test do + libvirt_pid = spawn Formula["libvirt"].opt_sbin/"libvirtd", "-f", Formula["libvirt"].etc/"libvirt/libvirtd.conf" + + output = testpath/"virt-manager.log" + virt_manager_pid = fork do + $stdout.reopen(output) + $stderr.reopen(output) + exec bin/"virt-manager", "-c", "test:///default", "--debug" + end + sleep 20 + sleep 10 if OS.mac? && Hardware::CPU.intel? + + assert_match "conn=test:///default changed to state=Active", output.read + ensure + Process.kill("TERM", libvirt_pid) + Process.kill("TERM", virt_manager_pid) + Process.wait(libvirt_pid) + Process.wait(virt_manager_pid) + end +end diff --git a/Formula/v/virtctl.rb b/Formula/v/virtctl.rb new file mode 100644 index 0000000000000..84efa5fde6525 --- /dev/null +++ b/Formula/v/virtctl.rb @@ -0,0 +1,39 @@ +class Virtctl < Formula + desc "Allows for using more advanced kubevirt features" + homepage "https://kubevirt.io/" + url "https://github.com/kubevirt/kubevirt/archive/refs/tags/v1.6.2.tar.gz" + sha256 "be69c1d91c4534e0391f4101f2eedc4dc6c0b30569d9d60a6569033f5edd8465" + license "Apache-2.0" + head "https://github.com/kubevirt/kubevirt.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ef9a9acd294de1dc3153b8763f0383b2f93bbaf067db52744b37b6dec048c773" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef9a9acd294de1dc3153b8763f0383b2f93bbaf067db52744b37b6dec048c773" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef9a9acd294de1dc3153b8763f0383b2f93bbaf067db52744b37b6dec048c773" + sha256 cellar: :any_skip_relocation, sonoma: "acb70b3c204315e3b8f0e6a143e3ca56a1fd6cb809e83057fbdc1de33afe9c9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a06c8fc127a7662396ccf46d9c4f0ccdf0dd08bebb43c740283d9e0aa745482" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68eb00732fb622f92e72c51b2f8f86bfc07693f80ed87f0173d35fdccd7c70ee" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X kubevirt.io/client-go/version.gitVersion=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/virtctl" + + generate_completions_from_executable(bin/"virtctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/virtctl version -c") + assert_match "connection refused", shell_output("#{bin}/virtctl userlist myvm 2>&1", 1) + end +end diff --git a/Formula/v/virtualenv.rb b/Formula/v/virtualenv.rb new file mode 100644 index 0000000000000..bd0eb67d43fa9 --- /dev/null +++ b/Formula/v/virtualenv.rb @@ -0,0 +1,40 @@ +class Virtualenv < Formula + include Language::Python::Virtualenv + + desc "Tool for creating isolated virtual python environments" + homepage "https://virtualenv.pypa.io/" + url "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz" + sha256 "643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c" + license "MIT" + head "https://github.com/pypa/virtualenv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3f429528ebe9b16ef159b6907263bfc2475a5db7b1644d055c547c624f66cc00" + end + + depends_on "python@3.14" + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"virtualenv", "venv_dir" + assert_match "venv_dir", shell_output("venv_dir/bin/python -c 'import sys; print(sys.prefix)'") + end +end diff --git a/Formula/v/virtualenvwrapper.rb b/Formula/v/virtualenvwrapper.rb new file mode 100644 index 0000000000000..2d50e732478c7 --- /dev/null +++ b/Formula/v/virtualenvwrapper.rb @@ -0,0 +1,72 @@ +class Virtualenvwrapper < Formula + include Language::Python::Virtualenv + + desc "Python virtualenv extensions" + homepage "https://virtualenvwrapper.readthedocs.io/" + url "https://files.pythonhosted.org/packages/97/0b/1f6daec2e0bd25275953256f83f98fb337b78b9d03d44b7eb9619b72b046/virtualenvwrapper-6.1.1.tar.gz" + sha256 "112e7ea34a9a3ce90aaea54182f0d3afef4d1a913eeb75e98a263b4978cd73c6" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "30d8dfe8f228e972af05832eb995dbe6d4027d3539cab05dd1fce36c6d0183bf" + end + + depends_on "python@3.14" + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/2a/5f/8418daad5c353300b7661dd8ce2574b0410a6316a8be650a189d5c68d938/stevedore-5.5.0.tar.gz" + sha256 "d31496a4f4df9825e1a1e4f1f74d19abb0154aff311c3b376fcc89dae8fccd73" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + resource "virtualenv-clone" do + url "https://files.pythonhosted.org/packages/85/76/49120db3bb8de4073ac199a08dc7f11255af8968e1e14038aee95043fafa/virtualenv-clone-0.5.7.tar.gz" + sha256 "418ee935c36152f8f153c79824bb93eaf6f0f7984bae31d3f48f350b9183501a" + end + + def install + virtualenv_install_with_resources + + (bin/"virtualenvwrapper.sh").unlink + (bin/"virtualenvwrapper.sh").write <<~SH + #!/bin/sh + export VIRTUALENVWRAPPER_PYTHON="#{libexec}/bin/python" + export VIRTUALENVWRAPPER_VIRTUALENV="${VIRTUALENVWRAPPER_VIRTUALENV:-#{libexec}/bin/virtualenv}" + export VIRTUALENVWRAPPER_VIRTUALENV_CLONE="${VIRTUALENVWRAPPER_VIRTUALENV_CLONE:-#{libexec}/bin/virtualenv-clone}" + source "#{libexec}/bin/virtualenvwrapper.sh" + SH + end + + def caveats + <<~EOS + To activate virtualenvwrapper, add the following to your shell profile + e.g. ~/.profile or ~/.zshrc + source virtualenvwrapper.sh + EOS + end + + test do + assert_match "created virtual environment", + shell_output("bash -c 'source virtualenvwrapper.sh; mktmpenv'") + end +end diff --git a/Formula/v/virtualfish.rb b/Formula/v/virtualfish.rb new file mode 100644 index 0000000000000..9908c6f7c78d5 --- /dev/null +++ b/Formula/v/virtualfish.rb @@ -0,0 +1,102 @@ +class Virtualfish < Formula + include Language::Python::Virtualenv + + desc "Python virtual environment manager for the fish shell" + homepage "https://virtualfish.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/1f/4e/343d044d61e80a44163d15ad2f6ca20eca0cb4fef4058caf8e5e55fc3dd9/virtualfish-2.5.9.tar.gz" + sha256 "9beada15b00c5b38c700ed8dfd76fe35ad0c716dec391536cc322ddd1bccf5e2" + license "MIT" + revision 1 + head "https://github.com/justinmayer/virtualfish.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b3a88c4f99fcec7089fea68596b5bcfd8a958b0efbf976ac24382e7bd937ecb0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a7c92e54504109326a36795da0a495f1706780401a87d42f06f7e4d3836c1ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3bf883dd8de5a67da56d7d9440e28232bd206280894e1b8bc1405ba51a4c307b" + sha256 cellar: :any_skip_relocation, sonoma: "7968863cc9ebad65cdb0674406f5f1b3b82cefeb8a7e893e0177de6a13f0f3cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "dda22263a86449d56e0457dc078f0a76dfc7457375bbb07ef5be4713df9bccf8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48eef847a95a8e50067fd8a94a3477a232413b1b0af6e389b9d5cdcb16a2b9e0" + end + + depends_on "fish" + depends_on "python@3.14" + + resource "distlib" do + url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz" + sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pkgconfig" do + url "https://files.pythonhosted.org/packages/c4/e0/e05fee8b5425db6f83237128742e7e5ef26219b687ab8f0d41ed0422125e/pkgconfig-1.5.5.tar.gz" + sha256 "deb4163ef11f75b520d822d9505c1f462761b4309b1bb713d08689759ea8b899" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/b3/31/4723d756b59344b643542936e37a31d1d3204bcdc42a7daa8ee9eb06fb50/psutil-7.1.0.tar.gz" + sha256 "655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz" + sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + To activate virtualfish, run the following in a fish shell: + vf install + EOS + end + + test do + # Pre-create .virtualenvs to avoid interactive prompt + (testpath/".virtualenvs").mkpath + + # Run `vf install` in the test environment, adds vf as function + refute_path_exists testpath/".config/fish/conf.d/virtualfish-loader.fish" + assert_match "VirtualFish is now installed!", shell_output("fish -c '#{bin}/vf install'") + assert_path_exists testpath/".config/fish/conf.d/virtualfish-loader.fish" + + # Add virtualenv to prompt so virtualfish doesn't link to prompt doc + (testpath/".config/fish/functions/fish_prompt.fish").write <<~FISH + function fish_prompt --description 'Test prompt for virtualfish' + echo -n -s (pwd) 'VIRTUAL_ENV=' (basename "$VIRTUAL_ENV") '>' + end + FISH + + # Create a virtualenv 'new_virtualenv' + refute_path_exists testpath/".virtualenvs/new_virtualenv/pyvenv.cfg" + system "fish", "-c", "vf new new_virtualenv" + assert_path_exists testpath/".virtualenvs/new_virtualenv/pyvenv.cfg" + + # The virtualenv is listed + assert_match "new_virtualenv", shell_output('fish -c "vf ls"') + + # cannot delete virtualenv on sequoia, upstream bug report, https://github.com/justinmayer/virtualfish/issues/250 + return if OS.mac? && MacOS.version >= :sequoia + + # Delete the virtualenv + system "fish", "-c", "vf rm new_virtualenv" + refute_path_exists testpath/".virtualenvs/new_virtualenv/pyvenv.cfg" + end +end diff --git a/Formula/v/virtualpg.rb b/Formula/v/virtualpg.rb new file mode 100644 index 0000000000000..ec3a5ff45d3c4 --- /dev/null +++ b/Formula/v/virtualpg.rb @@ -0,0 +1,49 @@ +class Virtualpg < Formula + desc "Loadable dynamic extension for SQLite and SpatiaLite" + homepage "https://www.gaia-gis.it/fossil/virtualpg/index" + url "https://www.gaia-gis.it/gaia-sins/virtualpg-2.0.1.tar.gz" + sha256 "be2aebeb8c9ff274382085f51d422e823858bca4f6bc2fa909816464c6a1e08b" + license "MPL-1.1" + + livecheck do + url :homepage + regex(/href=.*?virtualpg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "96423b815a0781a3635f54f02bac58f5b6f97ad735184005b812b7bbe2bda8c6" + sha256 cellar: :any, arm64_sequoia: "8e204f28da296c7deb1ce80831b2bfe8d7456aa540642c554de86f031c7aabad" + sha256 cellar: :any, arm64_sonoma: "d66f74bcc667dbd4b71f0a9cc8374b3bd17d1ec31e9a112bb61729af23e9479f" + sha256 cellar: :any, arm64_ventura: "666a4cdf6831d4a2d8ca68c9f1674a23215d947dae38c6a5a966f051d172ba4d" + sha256 cellar: :any, sonoma: "19e10266fbc74189b0acd7ed6e8d9026008ccf7f7731ef66cbe093caf2e79ec8" + sha256 cellar: :any, ventura: "8f2292bbe12befda53781d168e3a0dc8fdbf3b387e53abf920a25971605b42cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8800783153dea8ff0de92a169b8a9810aa69e0682ca0fd567c983d8925e42c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a3eea533c6345f3ba72760bb196a0c673414e87b02763a4cb48f260acdce535" + end + + depends_on "libpq" + depends_on "sqlite" + + def install + # New SQLite3 extension won't load via SELECT load_extension('mod_virtualpg'); + # unless named mod_virtualpg.dylib (should actually be mod_virtualpg.bundle) + # See: https://groups.google.com/forum/#!topic/spatialite-users/EqJAB8FYRdI + # needs upstream fixes in both SQLite and libtool + inreplace "configure", + "shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'", + "shrext_cmds='.dylib'" + + system "./configure", "--disable-silent-rules", + "--with-pgconfig=#{Formula["libpq"].opt_bin}/pg_config", + *std_configure_args + system "make", "install" + end + + test do + # Verify mod_virtualpg extension can be loaded using Homebrew's SQLite + system "echo", "\" SELECT load_extension('#{opt_lib}/mod_virtualpg');\" | #{Formula["sqlite"].opt_bin}/sqlite3" + end +end diff --git a/Formula/v/virtuoso.rb b/Formula/v/virtuoso.rb new file mode 100644 index 0000000000000..c061d34ad4d0f --- /dev/null +++ b/Formula/v/virtuoso.rb @@ -0,0 +1,83 @@ +class Virtuoso < Formula + desc "High-performance object-relational SQL database" + homepage "https://virtuoso.openlinksw.com" + url "https://github.com/openlink/virtuoso-opensource/releases/download/v7.2.16/virtuoso-opensource-7.2.16.tar.gz" + sha256 "0a70dc17f0e333d73307c9c46e8a7a82df70a410ddfe027a5bf7ba6c9204a928" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + + bottle do + sha256 cellar: :any, arm64_tahoe: "4e12002e4f941f27a576e940b39a2d70cb6ad040f65b3c2a8c012def31f9ab16" + sha256 cellar: :any, arm64_sequoia: "2f1513bc01588c8a278253aad7557f0b14cd297e051b1ae39576e16fc779b6f7" + sha256 cellar: :any, arm64_sonoma: "d00998fbe031ce5df6cde22125bc017f20ef2763af9b2cc433d9eae3a95433c6" + sha256 cellar: :any, sonoma: "03ba42739b024430e37704edac175f60dcae3f08af2e38876cefdc09c82d99b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab5e8186e1d41064571c5a3471d87b261e7e5cd3eebd6994d848624b74703319" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea3b5e195f0f6ba1e23280505bc3dcd973a07676a939967c0f5c0744212f6865" + end + + head do + url "https://github.com/openlink/virtuoso-opensource.git", branch: "develop/7" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + # If gawk isn't found, make fails deep into the process. + depends_on "gawk" => :build + depends_on "openssl@3" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "gperf" => :build + uses_from_macos "python" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "net-tools" => :build + depends_on "xz" # for liblzma + end + + conflicts_with "unixodbc", because: "both install `isql` binaries" + + skip_clean :la + + # Support openssl 3.6, upstream pr ref, https://github.com/openlink/virtuoso-opensource/pull/1364 + patch :DATA + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--without-internal-zlib" + system "make", "install" + end + + def caveats + <<~EOS + NOTE: the Virtuoso server will start up several times on port 1111 + during the install process. + EOS + end + + test do + system bin/"virtuoso-t", "+checkpoint-only" + end +end + +__END__ +diff --git a/configure b/configure +index 2953300..a4c8766 100755 +--- a/configure ++++ b/configure +@@ -23182,8 +23182,8 @@ main (void) + /* LibreSSL defines OPENSSL_VERSION_NUMBER 0x20000000L but uses a compatible API to OpenSSL v1.0.x */ + #elif OPENSSL_VERSION_NUMBER < 0x1020000fL + /* OpenSSL versions 0.9.8e - 1.1.1 are supported */ +- #elif OPENSSL_VERSION_NUMBER < 0x30600000L +- /* OpenSSL versions 3.0.x - 3.5.x are supported */ ++ #elif OPENSSL_VERSION_NUMBER < 0x30700000L ++ /* OpenSSL versions 3.0.x - 3.6.x are supported */ + #else + #error OpenSSL version too new + #endif diff --git a/Formula/v/virustotal-cli.rb b/Formula/v/virustotal-cli.rb new file mode 100644 index 0000000000000..83bb8c4078ace --- /dev/null +++ b/Formula/v/virustotal-cli.rb @@ -0,0 +1,37 @@ +class VirustotalCli < Formula + desc "Command-line interface for VirusTotal" + homepage "https://github.com/VirusTotal/vt-cli" + url "https://github.com/VirusTotal/vt-cli/archive/refs/tags/1.2.0.tar.gz" + sha256 "4f7cd36b73511709b01448340d904fd4d7e291a50263d0d3f946502a8173fc9c" + license "Apache-2.0" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6435c7783f637607c200a9610fc0a2eca11237de71245989593fb4a8e82267f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6435c7783f637607c200a9610fc0a2eca11237de71245989593fb4a8e82267f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f6435c7783f637607c200a9610fc0a2eca11237de71245989593fb4a8e82267f" + sha256 cellar: :any_skip_relocation, sonoma: "d290dab039ad26bd14c6306c662b6fdc04b96831c5925b24677e476da6bfd1a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "14f862e8f87ce5a7262002c7429afb48765024dfc301372f2b2107e84917a1e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69e50be69ffd0c5503f14e514af40c632d1d69d7b3c9e959da5e9f6a2c44359b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X cmd.Version=#{version}", output: bin/"vt"), "./vt" + + generate_completions_from_executable(bin/"vt", "completion") + end + + test do + output = shell_output("#{bin}/vt url #{homepage} 2>&1", 1) + assert_match "Error: An API key is needed", output + end +end diff --git a/Formula/v/vis.rb b/Formula/v/vis.rb new file mode 100644 index 0000000000000..02e05e60970c9 --- /dev/null +++ b/Formula/v/vis.rb @@ -0,0 +1,57 @@ +class Vis < Formula + desc "Vim-like text editor" + homepage "https://github.com/martanne/vis" + url "https://github.com/martanne/vis/archive/refs/tags/v0.9.tar.gz" + sha256 "bd37ffba5535e665c1e883c25ba5f4e3307569b6d392c60f3c7d5dedd2efcfca" + license "ISC" + head "https://github.com/martanne/vis.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_tahoe: "9d3f2a7bde3bb933488eb286842e9eecfe7a65443189c12a3b1e351a3d2738e4" + sha256 arm64_sequoia: "f1c209db49526dc713fdf8663255d7aef96ce0faf1cca2b2d037fa88888f975b" + sha256 arm64_sonoma: "4de1ac73095911d0aaebca111f7dd326b96c6eec57f5488e76be4ca56ab345e0" + sha256 sonoma: "30727e3f7d1ef664832a4f26127fefc72378b27ea57099b9a10c299494c2e6c3" + sha256 arm64_linux: "ca1b523f0ad09b716cee018694c0cea5a2fd54d2b5357e473fb4b94502eafa8e" + sha256 x86_64_linux: "8c183d876deb3dc5fbcd043e61bb3292eadeb90650e08fbe820d0e40eeebc3bd" + end + + depends_on "pkgconf" => :build + depends_on "libtermkey" + depends_on "lpeg" + depends_on "lua" + depends_on "tre" + + uses_from_macos "unzip" => :build + uses_from_macos "ncurses" + + def install + system "./configure", "--enable-lua", "--enable-lpeg-static=no", *std_configure_args + system "make", "install" + + return unless OS.mac? + + # Rename vis & the matching manpage to avoid clashing with the system. + mv bin/"vis", bin/"vise" + mv man1/"vis.1", man1/"vise.1" + end + + def caveats + on_macos do + <<~EOS + To avoid a name conflict with the macOS system utility /usr/bin/vis, + this text editor must be invoked by calling `vise` ("vis-editor"). + EOS + end + end + + test do + binary = if OS.mac? + bin/"vise" + else + bin/"vis" + end + + assert_match "vis #{version} +curses +lua", shell_output("#{binary} -v 2>&1") + end +end diff --git a/Formula/v/visidata.rb b/Formula/v/visidata.rb new file mode 100644 index 0000000000000..2775bd78288ca --- /dev/null +++ b/Formula/v/visidata.rb @@ -0,0 +1,51 @@ +class Visidata < Formula + include Language::Python::Virtualenv + + desc "Terminal spreadsheet multitool for discovering and arranging data" + homepage "https://www.visidata.org/" + url "https://files.pythonhosted.org/packages/aa/c0/ab9f01fcacbfbacde960e143f7c168c4de3c4f7e450873f8fd96fa2fcfb3/visidata-3.3.tar.gz" + sha256 "a94f4e398477e038541849cf4df1d1f2efc399da544d77db189bdb7f2fc014c4" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8be7f319d1633fce26ef5706d96174cf42244bea0f88da6114f7e5cf0ac9c962" + end + + depends_on "python@3.14" + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "standard-mailcap" do + url "https://files.pythonhosted.org/packages/53/e8/672bd621c146b89667a2bfaa58a1384db13cdd62bb7722ddb8d672bf7a75/standard_mailcap-3.13.0.tar.gz" + sha256 "19ed7955dbeaccb35e8bb05b2b5443ce55c1f932a8cbe7a5c13d42f9db4f499a" + end + + def install + virtualenv_install_with_resources + + man1.install "visidata/man/visidata.1", "visidata/man/vd.1" + end + + test do + %w[vd visidata].each do |cmd| + assert_match version.to_s, shell_output("#{bin}/#{cmd} --version") + end + + (testpath/"test.csv").write <<~CSV + name,age + Alice,42 + Bob,34 + CSV + + assert_match "age", shell_output("#{bin}/vd -b -f csv test.csv") + end +end diff --git a/Formula/v/visionmedia-watch.rb b/Formula/v/visionmedia-watch.rb new file mode 100644 index 0000000000000..2afb66d45a549 --- /dev/null +++ b/Formula/v/visionmedia-watch.rb @@ -0,0 +1,33 @@ +class VisionmediaWatch < Formula + desc "Periodically executes the given command" + homepage "https://github.com/tj/watch" + url "https://github.com/tj/watch/archive/refs/tags/0.4.0.tar.gz" + sha256 "d37ead189a644661d219b566170122b80d44f235c0df6df71b2b250f3b412547" + license "MIT" + head "https://github.com/tj/watch.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f003e974ce7bc63ad04454caad6daadc1d0c9afbb6d186fa11775791393fef0a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a1230c8458404ec82ba7142d81abed0964e482842427e0860bdd0590cc25ad88" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ae623768a63f7e3c72abb3bc6b06dbcefad5c698195d8298b2e89de2cd04d63" + sha256 cellar: :any_skip_relocation, arm64_ventura: "483b9ff4d88bc672f1fbdaeecabda4c664f392efed8077af088449b5be541048" + sha256 cellar: :any_skip_relocation, arm64_monterey: "40495ba873ac4427ecab5da7d30a23594efd23d27b26996045ba1a38c357f3ca" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4df49e42fc91ffb6991b43ce81c7b9e7d7f261bac48c712aac427f7e61385f4d" + sha256 cellar: :any_skip_relocation, sonoma: "b2212f0f464174908add9014aea15a3a8ce6cdac892479b72cedcb812d28fe76" + sha256 cellar: :any_skip_relocation, ventura: "62cb611c93b182fddcfdb54a2e1053b1c1a8140046dca0f9737269d60bed5be6" + sha256 cellar: :any_skip_relocation, monterey: "f749ac37533097322fc34e946c16eb286a3eee82ac4d36125ebe29dc39f0c4e5" + sha256 cellar: :any_skip_relocation, big_sur: "9df96f9ac4ae658f41cc25dbbb863f1a9974cbe28cb0ef7b8efbb54751fd41cb" + sha256 cellar: :any_skip_relocation, catalina: "8a8d2389c8d830b692fdb2431a6414bfa68e80575b5cf303b81fc04ba851e5c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "49af167e4231314e0b015c7fbc606983a7149546798d147d9f439f912230edec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1dcfe8e94d71a7fd667ce896127b665675c2a4d18f04c8c3d317efe50e5ae68f" + end + + conflicts_with "watch" + + def install + bin.mkdir + system "make", "PREFIX=#{prefix}", "install" + end +end diff --git a/Formula/v/visp.rb b/Formula/v/visp.rb new file mode 100644 index 0000000000000..784ccb5ab6747 --- /dev/null +++ b/Formula/v/visp.rb @@ -0,0 +1,208 @@ +class Visp < Formula + desc "Visual Servoing Platform library" + homepage "https://visp.inria.fr/" + url "https://visp-doc.inria.fr/download/releases/visp-3.6.0.tar.gz" + sha256 "eec93f56b89fd7c0d472b019e01c3fe03a09eda47f3903c38dc53a27cbfae532" + license "GPL-2.0-or-later" + revision 19 + + livecheck do + url "https://visp.inria.fr/download/" + regex(/href=.*?visp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7efeb3c73ba6c90938f8df5cc15ad7e996cdaace2c7694056989536607b89e65" + sha256 cellar: :any, arm64_sequoia: "def3fe5709f81618936e77b2323f0accb57724ce33346dfefff79356ca663973" + sha256 cellar: :any, arm64_sonoma: "a428e82264b87d1065860037c8e0d3a91b60c0d023314e8f3518bef3f2f39a27" + sha256 cellar: :any, sonoma: "5b28a9211a9171ae48bb9e4ed235ca0e84e046ead0b5519fa9c64b34b4192ed7" + sha256 cellar: :any_skip_relocation, arm64_linux: "b00e634ae5fa2b84cc6300c3bc89d6602e2dfa8cddcd7fc79158d4d86402ab36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "227d11044d1fd82fddc407d2c63c8f4a121c33cbe81609442ab50ab2f6b2c7ae" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => [:build, :test] + + depends_on "eigen" + depends_on "gsl" + depends_on "jpeg-turbo" + depends_on "libdc1394" + depends_on "libpng" + depends_on "lz4" + depends_on "openblas" + depends_on "opencv" + depends_on "pcl" + depends_on "vtk" + depends_on "zbar" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "boost" + depends_on "flann" + depends_on "glew" + depends_on "libomp" + depends_on "libpcap" + depends_on "qhull" + depends_on "qtbase" + end + + on_linux do + depends_on "libnsl" + end + + # Backport fix for recent Apple Clang + patch do + url "https://github.com/lagadic/visp/commit/8c1461661f99a5db31c89ede9946d2b0244f8123.patch?full_index=1" + sha256 "1e0126c731bf14dfe915088a4205a16ec0b6d5f2ea57d0e84f2f69b8e86b144f" + end + patch do + url "https://github.com/lagadic/visp/commit/e41aa4881e0d58c182f0c140cc003b37afb99d39.patch?full_index=1" + sha256 "c0dd6678f1b39473da885f7519daf16018e20209c66cdd04f660a968f6fadbba" + end + + # Backport fix for VTK include directories detection + patch do + url "https://github.com/lagadic/visp/commit/44d06319430c4933127e8dc31094259d92c63c2e.patch?full_index=1" + sha256 "a474659656764ca7b98d7ab7bad162cd9d36c50018d3033eb59806d2ac309850" + end + patch do + url "https://github.com/lagadic/visp/commit/09c900480c5b9d3b2d97244fe3b109e48f8e2d27.patch?full_index=1" + sha256 "417c3fa88cd5718e48e970ddd590ccaaafbe01db328dee79390fb931afa67da9" + end + patch do + url "https://github.com/lagadic/visp/commit/d6aebe3af2700c95c17c75aafb4f25d478a8f853.patch?full_index=1" + sha256 "740cb92ff79a368475af7979ff6ac4c443f90808bd02dd841aec3428cdbc95ed" + end + + # One usage of OpenCV Universal Intrinsics API altered starting from 4.9.0 + # TODO: Remove this patch in the next release + patch do + url "https://github.com/lagadic/visp/commit/ebfa2602faca0f40db2dd1cc0cfb72cd8177640c.patch?full_index=1" + sha256 "7fac428ca4fee039a84770e9c7877c43e28945038ff21233da74f3ae159703e0" + end + + def install + ENV.cxx11 + + # Avoid superenv shim references + inreplace "CMakeLists.txt" do |s| + s.sub!(/CMake build tool:"\s+\${CMAKE_BUILD_TOOL}/, + "CMake build tool: gmake\"") + s.sub!(/C\+\+ Compiler:"\s+\${VISP_COMPILER_STR}/, + "C++ Compiler: #{ENV.cxx}\"") + s.sub!(/C Compiler:"\s+\${CMAKE_C_COMPILER}/, + "C Compiler: #{ENV.cc}\"") + end + + system "cmake", ".", "-DBUILD_DEMOS=OFF", + "-DBUILD_EXAMPLES=OFF", + "-DBUILD_TESTS=OFF", + "-DBUILD_TUTORIALS=OFF", + "-DUSE_DC1394=ON", + "-DDC1394_INCLUDE_DIR=#{Formula["libdc1394"].opt_include}", + "-DDC1394_LIBRARY=#{Formula["libdc1394"].opt_lib/shared_library("libdc1394")}", + "-DUSE_EIGEN3=ON", + "-DEigen3_DIR=#{Formula["eigen"].opt_share}/eigen3/cmake", + "-DEIGEN3_INCLUDE_DIR=#{Formula["eigen"].opt_include}/eigen3", + "-DUSE_GSL=ON", + "-DGSL_INCLUDE_DIR=#{Formula["gsl"].opt_include}", + "-DGSL_cblas_LIBRARY=#{Formula["gsl"].opt_lib/shared_library("libgslcblas")}", + "-DGSL_gsl_LIBRARY=#{Formula["gsl"].opt_lib/shared_library("libgsl")}", + "-DUSE_JPEG=ON", + "-DJPEG_INCLUDE_DIR=#{Formula["jpeg-turbo"].opt_include}", + "-DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib/shared_library("libjpeg")}", + "-DUSE_LAPACK=ON", + "-DUSE_LIBUSB_1=OFF", + "-DUSE_OPENCV=ON", + "-DOpenCV_DIR=#{Formula["opencv"].opt_share}/OpenCV", + "-DUSE_PCL=ON", + "-DUSE_PNG=ON", + "-DPNG_PNG_INCLUDE_DIR=#{Formula["libpng"].opt_include}", + "-DPNG_LIBRARY_RELEASE=#{Formula["libpng"].opt_lib/shared_library("libpng")}", + "-DUSE_PTHREAD=ON", + "-DUSE_PYLON=OFF", + "-DUSE_REALSENSE=OFF", + "-DUSE_REALSENSE2=OFF", + "-DUSE_X11=OFF", + "-DUSE_XML2=ON", + "-DUSE_ZBAR=ON", + "-DZBAR_INCLUDE_DIRS=#{Formula["zbar"].opt_include}", + "-DZBAR_LIBRARIES=#{Formula["zbar"].opt_lib/shared_library("libzbar")}", + "-DUSE_ZLIB=ON", + *std_cmake_args + + # Replace generated references to OpenCV's Cellar path + opencv = Formula["opencv"] + opencv_references = Dir[ + "CMakeCache.txt", + "CMakeFiles/Export/lib/cmake/visp/VISPModules.cmake", + "VISPConfig.cmake", + "VISPGenerateConfigScript.info.cmake", + "VISPModules.cmake", + "modules/**/flags.make", + "unix-install/VISPConfig.cmake", + ] + inreplace opencv_references, opencv.prefix.realpath, opencv.opt_prefix + system "cmake", "--build", "." + system "cmake", "--install", "." + + # Make sure software built against visp don't reference opencv's cellar path either + inreplace [lib/"pkgconfig/visp.pc", lib/"cmake/visp/VISPConfig.cmake", lib/"cmake/visp/VISPModules.cmake"], + opencv.prefix.realpath, opencv.opt_prefix + end + + def post_install + # Replace SDK paths in bottle when pouring on different OS version than bottle OS. + # This avoids error like https://github.com/orgs/Homebrew/discussions/5853 + # TODO: Consider handling this in brew, e.g. as part of keg cleaner or bottle relocation + if OS.mac? && (tab = Tab.for_formula(self)).poured_from_bottle + bottle_os = bottle&.tag&.to_macos_version + if bottle_os.nil? && (os_version = tab.built_on.fetch("os_version", "")[/\d+(?:\.\d+)*$/]) + bottle_os = MacOSVersion.new(os_version).strip_patch + end + return if bottle_os.nil? || MacOS.version == bottle_os + + sdk_path_files = [ + lib/"cmake/visp/VISPConfig.cmake", + lib/"cmake/visp/VISPModules.cmake", + lib/"pkgconfig/visp.pc", + ] + bottle_sdk_path = MacOS.sdk_for_formula(self, bottle_os).path + inreplace sdk_path_files, bottle_sdk_path, MacOS.sdk_for_formula(self).path, audit_result: false + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() + { + std::cout << VISP_VERSION_MAJOR << "." << VISP_VERSION_MINOR << + "." << VISP_VERSION_PATCH << std::endl; + return 0; + } + CPP + pkg_config_flags = shell_output("pkgconf --cflags --libs visp").chomp.split + system ENV.cxx, "test.cpp", "-o", "test", *pkg_config_flags + assert_equal version.to_s, shell_output("./test").chomp + + ENV.delete "CPATH" + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10 FATAL_ERROR) + project(visp-check) + find_package(VISP REQUIRED) + include_directories(${VISP_INCLUDE_DIRS}) + add_executable(visp-check test.cpp) + target_link_libraries(visp-check ${VISP_LIBRARIES}) + CMAKE + + system "cmake", "-B", "build", "-S", "." + system "cmake", "--build", "build" + assert_equal version.to_s, shell_output("build/visp-check").chomp + end +end diff --git a/Formula/v/vit.rb b/Formula/v/vit.rb new file mode 100644 index 0000000000000..49f5847ae43d7 --- /dev/null +++ b/Formula/v/vit.rb @@ -0,0 +1,51 @@ +class Vit < Formula + include Language::Python::Virtualenv + + desc "Full-screen terminal interface for Taskwarrior" + homepage "https://github.com/vit-project/vit" + url "https://files.pythonhosted.org/packages/83/91/ff4440f0c87ffe8ff73176bf165925e364b938729ba9eb7a9090ae229129/vit-2.3.3.tar.gz" + sha256 "fa5ad719f868078cf92169094d73089b718654f7cd18ef65501dee153c7c8436" + license "MIT" + head "https://github.com/vit-project/vit.git", branch: "2.x" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e690473bf1990d4aa5181c8e9e4a7656b3d6c83dbc1572c79f84b039655095a5" + end + + depends_on "python@3.14" + depends_on "task" + + resource "tasklib" do + url "https://files.pythonhosted.org/packages/3e/50/3e876f39e31bad8783fd3fe117577cbf1dde836e161f8446631bde71aeb4/tasklib-2.5.1.tar.gz" + sha256 "5ccd731b52636dd10457a8b8d858cb0d026ffaab1e3e751baf791bf803e37d7b" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/bb/d3/09683323e2290732a39dc92ca5031d5e5ddda56f8d236f885a400535b29a/urwid-3.0.3.tar.gz" + sha256 "300804dd568cda5aa1c5b204227bd0cfe7a62cef2d00987c5eb2e4e64294ed9b" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/".vit").mkpath + touch testpath/".vit/config.ini" + touch testpath/".taskrc" + + require "pty" + PTY.spawn(bin/"vit") do |_stdout, _stdin, pid| + sleep 3 + sleep 10 if OS.mac? && Hardware::CPU.intel? + Process.kill "TERM", pid + end + assert_path_exists testpath/".task" + end +end diff --git a/Formula/v/vite.rb b/Formula/v/vite.rb new file mode 100644 index 0000000000000..dff23e784b625 --- /dev/null +++ b/Formula/v/vite.rb @@ -0,0 +1,33 @@ +class Vite < Formula + desc "Next generation frontend tooling. It's fast!" + homepage "https://vitejs.dev/" + url "https://registry.npmjs.org/vite/-/vite-7.1.12.tgz" + sha256 "85f5144ff94a0ee96ae48b142fb4f26a704381723702c6acd467020d43c657bf" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "26fdfba9571333adf9192d9c8e916268c1e6ecbd8a5da84a4753767d11e8ee84" + sha256 cellar: :any, arm64_sequoia: "3894dc1aaaef38d549694ba2c4c911728823e031d41327ad576c0d73602ee479" + sha256 cellar: :any, arm64_sonoma: "3894dc1aaaef38d549694ba2c4c911728823e031d41327ad576c0d73602ee479" + sha256 cellar: :any, sonoma: "9c71f8caae163be8a0b3926843816b010602e96bbba13e1d872f9f30426c91db" + sha256 cellar: :any_skip_relocation, arm64_linux: "95d991a81d88ac86c91a91101d4d0ce0ba53e9d1747225a025882c72f2d0a94c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "128b9245a14d19880de9d4be5167a9c1112d1f8ecb333a13409fef65421ee0b8" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/vite optimize --force") + assert_match "Forced re-optimization of dependencies", output + + output = shell_output("#{bin}/vite optimize") + assert_match "Hash is consistent. Skipping.", output + + assert_match version.to_s, shell_output("#{bin}/vite --version") + end +end diff --git a/Formula/v/vitess.rb b/Formula/v/vitess.rb new file mode 100644 index 0000000000000..468f7a2f5709a --- /dev/null +++ b/Formula/v/vitess.rb @@ -0,0 +1,84 @@ +class Vitess < Formula + desc "Database clustering system for horizontal scaling of MySQL" + homepage "https://vitess.io" + url "https://github.com/vitessio/vitess/archive/refs/tags/v23.0.0.tar.gz" + sha256 "4048df4344eeead97dbf6126e09b9ccb2c5d83258bda19028f641b9a9f4e0b07" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f0527e0ec0169239cfce80fd83afc8dc7a3842dcf46b9bf6f04190a6a8b1a497" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef496ff7737cf572799801c4059d256b4ed1ac1ac01547afc638ff082e1c29d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6d79d861b8078513bd8cc9726491dde8370e2ddf33a5f07510e4c21d987ad0d" + sha256 cellar: :any_skip_relocation, sonoma: "5699f4f1344bc9a1d36dcefea6408bf2ffeecc6ba45d9d440764b0a7213b2064" + sha256 cellar: :any_skip_relocation, arm64_linux: "79b06c3c77949112420f47ddc3224c75497e657d79f92b5c9efec1fdffdb5d20" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61fc570d8c084fc88cfa3c4170aff428a5503edd6ac9f666a1735e88f675acbe" + end + + depends_on "go" => :build + depends_on "etcd" + + def install + # -buildvcs=false needed for build to succeed on Go 1.18. + # It can be removed when this is no longer the case. + system "make", "install-local", "PREFIX=#{prefix}", "VTROOT=#{buildpath}", "VT_EXTRA_BUILD_FLAGS=-buildvcs=false" + pkgshare.install "examples" + end + + test do + ENV["ETCDCTL_API"] = "3" + etcd_server = "localhost:#{free_port}" + peer_port = free_port + cell = "testcell" + + fork do + exec Formula["etcd"].opt_bin/"etcd", + "--name=vitess_test", + "--data-dir=#{testpath}/etcd", + "--listen-client-urls=http://#{etcd_server}", + "--advertise-client-urls=http://#{etcd_server}", + "--listen-peer-urls=http://localhost:#{peer_port}", + "--initial-advertise-peer-urls=http://localhost:#{peer_port}", + "--initial-cluster=vitess_test=http://localhost:#{peer_port}", + "--auto-compaction-retention=1" + end + + sleep 3 + + # Test etcd is responding before continuing + system Formula["etcd"].opt_bin/"etcdctl", "--endpoints", "http://#{etcd_server}", "endpoint", "health" + + # Create necessary directory structure using etcd v3 API + system Formula["etcd"].opt_bin/"etcdctl", "--endpoints", "http://#{etcd_server}", + "put", "/vitess/global", "" + + system Formula["etcd"].opt_bin/"etcdctl", "--endpoints", "http://#{etcd_server}", + "put", "/vitess/#{cell}", "" + + # Run vtctl with etcd2 implementation but using etcd v3 API + fork do + exec bin/"vtctl", "--topo_implementation", "etcd2", + "--topo_global_server_address", etcd_server, + "--topo_global_root", testpath/"global", + "VtctldCommand", "AddCellInfo", + "--root", testpath/cell, + "--server-address", etcd_server, + cell + end + sleep 1 + + port = free_port + fork do + exec bin/"vtgate", "--topo_implementation", "etcd2", + "--topo_global_server_address", etcd_server, + "--topo_global_root", testpath/"global", + "--tablet_types_to_wait", "PRIMARY,REPLICA", + "--cell", cell, + "--cells_to_watch", cell, + "--port", port.to_s + end + sleep 8 + + output = shell_output("curl -s localhost:#{port}/debug/health") + assert_equal "ok", output + end +end diff --git a/Formula/v/vitetris.rb b/Formula/v/vitetris.rb new file mode 100644 index 0000000000000..15e98fb1e0c88 --- /dev/null +++ b/Formula/v/vitetris.rb @@ -0,0 +1,43 @@ +class Vitetris < Formula + desc "Terminal-based Tetris clone" + homepage "https://www.victornils.net/tetris/" + url "https://github.com/vicgeralds/vitetris/archive/refs/tags/v0.59.1.tar.gz" + sha256 "699443df03c8d4bf2051838c1015da72039bbbdd0ab0eede891c59c840bdf58d" + license "BSD-2-Clause" + head "https://github.com/vicgeralds/vitetris.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ab9a0fde775af14600b636a041e026c987933c871cec3e67a4184f6521a61b2e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd6ea28531dfab3328f90186dc273aec6bc0fe8aea3975c464fc69f780566547" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e97501d1c6455a0f05c42b8ac32a26a11361329c13f031c29be0302303c3f8c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a7e9d7a5f17a0ecec24844b5170fa3a022e98e957bc8c957aed74278f90b5e6f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1abdb3a699387c63bb17e24037ba5f6233758ba792964c076db235622de37c0c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ab846d19502cc5c5aea07435f491a2e7e73f84b37bae0d40e79dffed69a8e6b" + sha256 cellar: :any_skip_relocation, sonoma: "7cc3b8950c3b0b366c192dadad3b3ab1293322a1db723144168c0122e2681986" + sha256 cellar: :any_skip_relocation, ventura: "ffb6b3d04c4295734d3278c42f819ff40a9b17e4b01869cb9c8fdadba2e8657f" + sha256 cellar: :any_skip_relocation, monterey: "8430ca0038c16d9e4b3e65d2ff25ed6b97bde494b28d06d55386dd01288de711" + sha256 cellar: :any_skip_relocation, big_sur: "1fa572cc6545ae0b7dffcabbab5d15f256c29d0a7d8f8af1bfef4371bf31401c" + sha256 cellar: :any_skip_relocation, catalina: "9b92a065c5c65480ac9fbe8b3414e3c8c467ba6decbe72054a269f18b77e4280" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b8820b3b339b4694117c0598599f072ed88a046ccb8941f6cb437895a1042da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8081c35e8f308bd3c0bd5521edce69ed47a4af99700a9799ebffe8e52430989" + end + + def install + # workaround for newer clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + # remove a 'strip' option not supported on OS X and root options for + # 'install' + inreplace "Makefile", "-strip --strip-all $(PROGNAME)", "-strip $(PROGNAME)" + + system "./configure", "--prefix=#{prefix}", "--without-xlib" + system "make", "install" + end + + test do + system bin/"tetris", "-hiscore" + end +end diff --git a/Formula/v/viu.rb b/Formula/v/viu.rb new file mode 100644 index 0000000000000..844afed91693f --- /dev/null +++ b/Formula/v/viu.rb @@ -0,0 +1,31 @@ +class Viu < Formula + desc "Simple terminal image viewer written in Rust" + homepage "https://github.com/atanunq/viu" + url "https://github.com/atanunq/viu/archive/refs/tags/v1.5.1.tar.gz" + sha256 "bd1bc61367420dcbb1ab46df53a46fd7d35379960c9ab39bbccb7ace5afaeb62" + license "MIT" + head "https://github.com/atanunq/viu.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4a29f7f69f33b0dac172ab89994c6d3538bc5730644fbac53d423e3dbf43b682" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "298b762aae2f3d85767ff186854b274d75b684276c91bb9048a17142cb690e04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8518d30560a1d752ced697787cd009e895e13e72c2d07f59413321f487abea9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6bd7363df65a5b02121c0ba2ad2267983432e70a1a4396dbd5dab19a8c4c673" + sha256 cellar: :any_skip_relocation, sonoma: "392053a600ae8d3a24db90f17c2e1ff88a4a00d047c15ec94c112cd193b9d70b" + sha256 cellar: :any_skip_relocation, ventura: "22194f25fab54b3543e2902d2b028d9767a00788bbc69eb4bc9591ee7682aaee" + sha256 cellar: :any_skip_relocation, arm64_linux: "259fa1d80abdad023497161eddfaf32f334a32a867302506884c0ae149c2a859" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da1bdb071e5a0e473a01d3cfbbbd88546184c20c61b0fd14b9b941b449474f3f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + expected_output = "\e[0m\e[38;5;202m▀\e[0m" + output = shell_output("#{bin}/viu #{test_fixtures("test.jpg")}").chomp + assert_equal expected_output, output + end +end diff --git a/Formula/v/vivid.rb b/Formula/v/vivid.rb new file mode 100644 index 0000000000000..d1ccb55988bef --- /dev/null +++ b/Formula/v/vivid.rb @@ -0,0 +1,30 @@ +class Vivid < Formula + desc "Generator for LS_COLORS with support for multiple color themes" + homepage "https://github.com/sharkdp/vivid" + url "https://github.com/sharkdp/vivid/archive/refs/tags/v0.10.1.tar.gz" + sha256 "88db6158dad60aba66ae16f2cd1b09f515625940a33bada65da5562a03538e49" + license any_of: ["MIT", "Apache-2.0"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cead0da902988950326a5860ac608c02825268ad1671928e3e4cdc29c15b4ea6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2304e6f41c313ba88b3c3cc0677ec82d501b5929e2b793afe99326ee5b4dcb71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9428a55dd427e7f69fd5d2bca9ce9ed2facc3f9a46dcb88eef94c2262ef16fae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b836a81f247fdbbfdb40cdb637b8da247189d6bdcd47d12fef66c8e45782bd1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "560ecb779c10ccaef4b429f834b9003a105e6624336ef79547a131479ecc378e" + sha256 cellar: :any_skip_relocation, sonoma: "6de93d50a62ed34f7b448db4620a765f2084ba538b611c0cffa45ccc3be4c0ba" + sha256 cellar: :any_skip_relocation, ventura: "21e4d0ad3a7c823273dccbb76b0de6769eabc4b4623e69416f0624468e45ab4c" + sha256 cellar: :any_skip_relocation, monterey: "457741bc68092d77ae065c74392404f8a1fb401b6e9aec6a07bf77b61fd89f06" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf00f818ea1317ee924a71ccc69204143400762fa5b35b673f64f3b0caabf66c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07ad36619ada9c224b6f245fed8f79cf39b69e343d223917bd816a1fa873bcdf" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_includes shell_output("#{bin}/vivid preview molokai"), "archives.images: \e[4;38;2;249;38;114m*.bin\e[0m\n" + end +end diff --git a/Formula/v/vlang.rb b/Formula/v/vlang.rb new file mode 100644 index 0000000000000..5130e98d1ed35 --- /dev/null +++ b/Formula/v/vlang.rb @@ -0,0 +1,110 @@ +class Vlang < Formula + desc "V programming language" + homepage "https://vlang.io" + # NOTE: Keep this in sync with V compiler below when updating + url "https://github.com/vlang/v/archive/refs/tags/0.4.12.tar.gz" + sha256 "65e3579df61ae0a7314aa5f0c7eb3b0b9b45170a0275e392e9c168be23046e89" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "66bd18c2171d1bd9d8f25f791690baae240a98837743f21bb50662b266186a34" + sha256 arm64_sequoia: "34eebb4e50157633d5e4ab04b216e5857f58248e65b5eda24011685b4d4ff9cb" + sha256 arm64_sonoma: "1fdbf0be4c88696e5302f46434cfc0776c88453e2cbadd31bc8da899e888ee73" + sha256 cellar: :any, sonoma: "5417d65f37a266f462509fd0934683fc4681fc318ab687b70dc1c60f1769b3e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f826247b5a984b578b0e04c642cda090d10e272be4b0ed06b32cb3e7f397d5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b445d348864d8703f9138ec2141a0f3992c2bba7d799fd80cec6379eb92c78e" + end + + depends_on "bdw-gc" + + on_linux do + on_arm do + depends_on "llvm" => :build + + fails_with :gcc do + cause "compilation failed with errors in vlib/v/ast/scope.v" + end + end + end + + conflicts_with "v", because: "both install `v` binaries" + + resource "vc" do + # For every vlang release there is a matching commit of the V compiler in the format + # "[v:master] {short SHA of the vlang release commit} - {vlang version number}". + # The sources of this V compiler commit need to be used here + url "https://github.com/vlang/vc/archive/e377b42e26eb9c703ccaf65f37d700a7369ac3db.tar.gz" + sha256 "92714821ca60606751500c3d740de6015b575c078e52fa7c73b0e3346f966de4" + + on_big_sur :or_older do + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/vlang/vc.patch" + sha256 "0e0a2de7e37c0b22690599c0ee0a1176c2c767ea95d5fade009dd9c1f5cbf85d" + end + end + end + + # upstream discussion, https://github.com/vlang/v/issues/16776 + # macport patch commit, https://github.com/macports/macports-ports/commit/b3e0742a + patch :DATA + + def install + inreplace "vlib/builtin/builtin_d_gcboehm.c.v", "@PREFIX@", Formula["bdw-gc"].opt_prefix + # upstream-recommended packaging, https://github.com/vlang/v/blob/master/doc/packaging_v_for_distributions.md + %w[up self].each do |cmd| + (buildpath/"cmd/tools/v#{cmd}.v").delete + (buildpath/"cmd/tools/v#{cmd}.v").write <<~EOS + println('ERROR: `v #{cmd}` is disabled. Use `brew upgrade #{name}` to update V.') + EOS + end + # `v share` requires X11 on Linux, so don't build it + mv "cmd/tools/vshare.v", "vshare.v.orig" if OS.linux? + + resource("vc").stage do + system ENV.cc, "-std=gnu99", "-w", "-o", buildpath/"v1", "v.c", "-lm" + end + system "./v1", "-no-parallel", "-o", buildpath/"v2", "cmd/v" + system "./v2", "-prod", "-d", "dynamic_boehm", "-o", buildpath/"v", "cmd/v" + rm ["./v1", "./v2"] + system "./v", "-prod", "-d", "dynamic_boehm", "build-tools" + mv "vshare.v.orig", "cmd/tools/vshare.v" if OS.linux? + + libexec.install "cmd", "thirdparty", "v", "v.mod", "vlib" + bin.install_symlink libexec/"v" + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/hello_world.v", testpath + system bin/"v", "-o", "test", "hello_world.v" + assert_equal "Hello, World!", shell_output("./test").chomp + end +end + +__END__ +diff --git a/vlib/builtin/builtin_d_gcboehm.c.v b/vlib/builtin/builtin_d_gcboehm.c.v +index 444a014..159e5a1 100644 +--- a/vlib/builtin/builtin_d_gcboehm.c.v ++++ b/vlib/builtin/builtin_d_gcboehm.c.v +@@ -43,13 +43,13 @@ $if dynamic_boehm ? { + } $else { + $if macos || linux { + #flag -DGC_BUILTIN_ATOMIC=1 +- #flag -I @VEXEROOT/thirdparty/libgc/include +- $if (prod && !tinyc && !debug) || !(amd64 || arm64 || i386 || arm32 || rv64) { ++ #flag -I @PREFIX@/include ++ $if (!macos && prod && !tinyc && !debug) || !(amd64 || arm64 || i386 || arm32 || rv64) { + // TODO: replace the architecture check with a `!$exists("@VEXEROOT/thirdparty/tcc/lib/libgc.a")` comptime call + #flag @VEXEROOT/thirdparty/libgc/gc.o + } $else { + $if !use_bundled_libgc ? { +- #flag @VEXEROOT/thirdparty/tcc/lib/libgc.a ++ #flag @PREFIX@/lib/libgc.a + } + } + $if macos { diff --git a/Formula/v/vlmcsd.rb b/Formula/v/vlmcsd.rb new file mode 100644 index 0000000000000..9c8ace477b6f8 --- /dev/null +++ b/Formula/v/vlmcsd.rb @@ -0,0 +1,84 @@ +class Vlmcsd < Formula + desc "KMS Emulator in C" + homepage "https://github.com/Wind4/vlmcsd" + url "https://github.com/Wind4/vlmcsd/archive/refs/tags/svn1113.tar.gz" + version "svn1113" + sha256 "62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc" + license "LGPL-2.1-or-later" + head "https://github.com/Wind4/vlmcsd.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "47d7c9405f1932a71b0554b886d164d79639cf0a1d130a7fb94ea99b0d3a8403" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42bed0ef59c540a54cc77bf71002b8229414ed077be0bceecd568fe37b33a4be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ea7a29e62f3886e4c495c373cf3976109b0e08010d1c28ace15f9bfc426238f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58a2efe9d5940bc384b74ed21b81599146942ea924e9844a7b6060558f8ca621" + sha256 cellar: :any_skip_relocation, arm64_monterey: "20f3ba285635e158a02b7cb528e25eda9fa45b6a832f5893536e88b6e965a332" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7b3abfda639485474805f9d4d93f2c6e47efacd9e8affbed3aca44bda55c1964" + sha256 cellar: :any_skip_relocation, sonoma: "c0e148f84144ce1029dab23c1edf9c99e9e630eddb73ad99f8651a78c0639393" + sha256 cellar: :any_skip_relocation, ventura: "dea463c5c77779229911e99d092d97a3cda08e557c262b23feed1764ef718b89" + sha256 cellar: :any_skip_relocation, monterey: "46d9330798889d87f2e2013b99fed4416124fa119d59591aadc7ebd80197c024" + sha256 cellar: :any_skip_relocation, big_sur: "4e7ff7a7b2b24f12671783aba5e87a444576418ec0220d037dbe25d5f1e2ff71" + sha256 cellar: :any_skip_relocation, catalina: "1b6375150a6cbd27eb386f0fae0bcbbccdfc9b3079dc6cfb5a9ce633029d5484" + sha256 cellar: :any_skip_relocation, arm64_linux: "dcc3d4b4374dc513a4e3d307eb104d756007f820dad447357f21706185a46a88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bacd07ef0cda2ea4ad4c5d7274b97bf8b067b69fd4412d20272b0d1c8828d1c" + end + + deprecate! date: "2024-12-31", because: :repo_archived + + uses_from_macos "llvm" => :build + + def install + system "make", "CC=clang" + bin.install "bin/vlmcsd" + bin.install "bin/vlmcs" + (etc/"vlmcsd").mkpath + etc.install "etc/vlmcsd.ini" => "vlmcsd/vlmcsd.ini" + etc.install "etc/vlmcsd.kmd" => "vlmcsd/vlmcsd.kmd" + man1.install "man/vlmcs.1" + man7.install "man/vlmcsd.7" + man8.install "man/vlmcsd.8" + man5.install "man/vlmcsd.ini.5" + man1.install "man/vlmcsdmulti.1" + end + + def caveats + <<~EOS + The default port is 1688 + + To configure vlmcsd, edit + #{etc}/vlmcsd/vlmcsd.ini + After changing the configuration, please restart vlmcsd + launchctl unload #{launchd_service_path} + launchctl load #{launchd_service_path} + Or, if you don't want/need launchctl, you can just run: + brew services restart vlmcsd + EOS + end + + service do + run [opt_bin/"vlmcsd", "-i", etc/"vlmcsd/vlmcsd.ini", "-D"] + keep_alive false + end + + test do + output = shell_output("#{bin}/vlmcsd -V") + assert_match "vlmcsd", output + output = shell_output("#{bin}/vlmcs -V") + assert_match "vlmcs", output + begin + pid = fork do + exec bin/"vlmcsd", "-D" + end + # Run vlmcsd, then use vlmcs to check + # the running status of vlmcsd + sleep 2 + output = shell_output("#{bin}/vlmcs") + assert_match "successful", output + sleep 2 + ensure + Process.kill 9, pid + Process.wait pid + end + end +end diff --git a/Formula/v/vmdktool.rb b/Formula/v/vmdktool.rb new file mode 100644 index 0000000000000..0f2103f4cb461 --- /dev/null +++ b/Formula/v/vmdktool.rb @@ -0,0 +1,70 @@ +class Vmdktool < Formula + desc "Converts raw filesystems to VMDK files and vice versa" + homepage "https://manned.org/vmdktool" + url "https://people.freebsd.org/~brian/vmdktool/vmdktool-1.4.tar.gz" + sha256 "981eb43d3db172144f2344886040424ef525e15c85f84023a7502b238aa7b89c" + license "BSD-2-Clause" + + livecheck do + url "https://people.freebsd.org/~brian/vmdktool/" + regex(/href=.*?vmdktool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3db3ea9bea6a9a99403953ee3d75c7d9d8a35662c6a4d75ea972cc0400b0c440" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d87c022cf0446ab70cc9a23de9548969cf6cab3d276a11990456db9e2ba69e31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f33e91edf4a6492ba75404b0b6ef39e7cc3075eb170f135724aa8db9db1476d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a9371495c777605438ae7e124289e79bc22fc0c546b230046cd9e7010ca5d52" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7823dbeb8f044ce3183f1ea2d6ebec16ce30fc9fe2951cc55b84c5a9043f8569" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2a19ea885fcf69d6929cb155489aab52543b1b1f456eedf9f49f3f6eebf51ec9" + sha256 cellar: :any_skip_relocation, sonoma: "eb305d43f1248a35dbd25af126481da9fb2f80b9cc2aac19f4a0c9afe4808fb1" + sha256 cellar: :any_skip_relocation, ventura: "d1dbb970c776f264f235648b87e6669b4d240176ef5ab3272e4d3432f0033344" + sha256 cellar: :any_skip_relocation, monterey: "9d68c339c6dfb87f9cc70d1df15e36337b2a57cbae54825b24a2c7dc1e4096dc" + sha256 cellar: :any_skip_relocation, big_sur: "9f3f1adccbe9d28c54b0009c00866636ab7872914ff6587ccf206f15cb08ac68" + sha256 cellar: :any_skip_relocation, catalina: "2d4faffbb4ae8f2aba0822834278e532c08fad14e8b07ef534415e1535e3c369" + sha256 cellar: :any_skip_relocation, arm64_linux: "ecc420b4587709e6cb04854c0da136aeacb34ad6c7587dcfc97c49e407bd6f09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c1d93d16f35a13226a5b332895c50d04badd06732ff6b69094dc1844db8c98d" + end + + depends_on "groff" => :build + + uses_from_macos "zlib" + + def install + # Fixes "call to undeclared library function 'tolower' with type 'int (int)'". + inreplace "expand_number.c", + "#ifndef __APPLE__\n#include \n#endif", + "#include " + + system "make", "CFLAGS=-D_GNU_SOURCE -g -O -pipe" + + # The vmdktool Makefile isn't as well-behaved as we'd like: + # 1) It defaults to man page installation in $PREFIX/man instead of + # $PREFIX/share/man, and doesn't recognize '$MANDIR' as a way to + # override this default. + # 2) It doesn't do 'install -d' to create directories before installing + # to them. + # The maintainer (Brian Somers, brian@awfulhak.org) has been notified + # of these issues as of 2017-01-25 but no fix is yet forthcoming. + # There is no public issue tracker for vmdktool that we know of. + # In the meantime, we can work around these issues as follows: + bin.mkpath + man8.mkpath + inreplace "Makefile", "man/man8", "share/man/man8" + + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # Create a blank disk image in raw format + system "dd", "if=/dev/zero", "of=blank.raw", "bs=512", "count=20480" + # Use vmdktool to convert to streamOptimized VMDK file + system bin/"vmdktool", "-v", "blank.vmdk", "blank.raw" + # Inspect the VMDK with vmdktool + output = shell_output("#{bin}/vmdktool -i blank.vmdk") + assert_match "RDONLY 20480 SPARSE", output + assert_match "streamOptimized", output + end +end diff --git a/Formula/v/vmtouch.rb b/Formula/v/vmtouch.rb new file mode 100644 index 0000000000000..3b5a2568132dc --- /dev/null +++ b/Formula/v/vmtouch.rb @@ -0,0 +1,41 @@ +class Vmtouch < Formula + desc "Portable file system cache diagnostics and control" + homepage "https://hoytech.com/vmtouch/" + url "https://github.com/hoytech/vmtouch/archive/refs/tags/v1.3.1.tar.gz" + sha256 "d57b7b3ae1146c4516429ab7d6db6f2122401db814ddd9cdaad10980e9c8428c" + license "BSD-3-Clause" + head "https://github.com/hoytech/vmtouch.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "08b363fa7ab899df5673f242967d7e8b07854c1403c04edc47bc4d3738f12d6b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "71ea80f43e78935336818c646b4561db14301e5590d0e726f221a944cb9efb73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af6dca4823cffd3272dce9a60743bfe9d7fd9a8bd467b3ae55ba370b8bb37d00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "291bc54c646fa540129601fd7dad8a46756f8bc739a3cd505e5d8241a0000177" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c301e4360ef07fffe67a5860df289c3ec091bb4c51793b65054370b6a997040b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6d55c8a93a6826d78dcd439155de21e3da33598bd00c022e1fb4d39635f12c53" + sha256 cellar: :any_skip_relocation, sonoma: "74d32e30b5ef6ab2e3d1c22a227aad8a9bbd16d26be101e00ae12321ff4d3e12" + sha256 cellar: :any_skip_relocation, ventura: "748e2395fb262337812098a9add42b3389469f4e084a4c9139f7350f8499262b" + sha256 cellar: :any_skip_relocation, monterey: "10abb43d5b8bfb7ed49edd377f826747cdb58d6db5ecf91e58223d6f8144ffb8" + sha256 cellar: :any_skip_relocation, big_sur: "89ed86d067750e6bf19a6a79d7f3b9c3b2ad2e39795f174ba2452d11d43f650e" + sha256 cellar: :any_skip_relocation, catalina: "30c620a4dc06285c41c7194468de50cf0f12aab38c6441d8e1bbad6d4231ee1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "51eb867695f92dce54b46d64c23ce16cc9ea3a2fb59b581de5785ac36b96a664" + sha256 cellar: :any_skip_relocation, x86_64_linux: "370429512a98b307f32755176f1bc39b988f6c787f24bbd304dd95f20b7c399d" + end + + # Upstream change broke macOS support in 1.3.1, patch submitted upstream and accepted. + # Remove patch in next release. + patch do + url "https://github.com/hoytech/vmtouch/commit/75f04153601e552ef52f5e3d349eccd7e6670303.patch?full_index=1" + sha256 "9cb455d86018ee8d30cb196e185ccc6fa34be0cdcfa287900931bcb87c858587" + end + + def install + system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man}" + end + + test do + system bin/"vmtouch", bin/"vmtouch" + end +end diff --git a/Formula/v/vncsnapshot.rb b/Formula/v/vncsnapshot.rb new file mode 100644 index 0000000000000..5d208f0cc122b --- /dev/null +++ b/Formula/v/vncsnapshot.rb @@ -0,0 +1,76 @@ +class Vncsnapshot < Formula + desc "Command-line utility for taking VNC snapshots" + homepage "https://sourceforge.net/projects/vncsnapshot/" + url "https://downloads.sourceforge.net/project/vncsnapshot/vncsnapshot/1.2a/vncsnapshot-1.2a-src.tar.gz" + sha256 "20f5bdf6939a0454bc3b41e87e41a5f247d7efd1445f4fac360e271ddbea14ee" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :stable + regex(%r{url=.*?/vncsnapshot[._-]v?(\d+(?:\.\d+)+[a-z]?)-src\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f1ed1939873bb250358b769a50e551174a9a5be3cfd22c5350f7c50e48609842" + sha256 cellar: :any, arm64_sequoia: "dbe251c7617197a4d00167efc4aa0bd4c17a9d7089c3d3e4dbf80c58b09ca3f8" + sha256 cellar: :any, arm64_sonoma: "5c3ef7d35c4c3a35c325110923ca87c9a331b4f9f9ae30a436ef4d026f16ae74" + sha256 cellar: :any, arm64_ventura: "9b81b8c12801895e02f291fcd962c03faa8c5c550f8f3912ad189e71a950e512" + sha256 cellar: :any, arm64_monterey: "d205593b6f2b24d41406f720f81fe527a985fcee83fdfb8851eb607636a7de55" + sha256 cellar: :any, arm64_big_sur: "8c12953cef25c007e23110a5c80e1a685cef585fb0696a2e31f8492894cf127a" + sha256 cellar: :any, sonoma: "2ee8b91e07becd05e3d5797b5aeee317f3151f25c3188d4b3a77d203779ec72d" + sha256 cellar: :any, ventura: "e04fc4dbfc4c8ddeeb36f9ff9909f06e54487635c2049884523b47093fbffb02" + sha256 cellar: :any, monterey: "47f55734407ee86c9eca1740751bf822f239151c8f119d26883f27f109380030" + sha256 cellar: :any, big_sur: "cba42f4c7903e6a9c817cab231c2a553cb3ef5e9df4c11ee4c1402a1c3e82dc1" + sha256 cellar: :any, catalina: "d64a17a417984662cb80caf048ba2898ccf432da49d9e160c4a3aca47dc01ad2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbafb1d33173e5fc8126864c0b92736461b3c3873e362c5d17230f42a1fe623e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6accb435728be7238acce06e9235ac713b796025055e03bc0aadb28dc21f6546" + end + + depends_on "jpeg-turbo" + + uses_from_macos "zlib" + + patch :DATA # remove old PPC __APPLE__ ifdef from sockets.cxx + + def install + # From Ubuntu + inreplace "rfb.h", "typedef unsigned long CARD32;", + "typedef unsigned int CARD32;" + + args = [ + "JPEG_INCLUDE=-I#{Formula["jpeg-turbo"].opt_include}", + "JPEG_LIB=-L#{Formula["jpeg-turbo"].opt_lib} -ljpeg", + ] + if OS.linux? + args << "ZLIB_INCLUDE=-I#{Formula["zlib"].opt_include}" + args << "ZLIB_LIB=-L#{Formula["zlib"].opt_lib} -lz" + end + + ENV.deparallelize + system "make", *args + bin.install "vncsnapshot", "vncpasswd" + man1.install "vncsnapshot.man1" => "vncsnapshot.1" + end +end + +__END__ +diff --git a/sockets.cxx b/sockets.cxx +index ecdf0db..6c827fa 100644 +--- a/sockets.cxx ++++ b/sockets.cxx +@@ -38,9 +38,9 @@ typedef int socklen_t; + #include + #endif + +-#ifdef __APPLE__ +-typedef int socklen_t; +-#endif ++//#ifdef __APPLE__ ++//typedef int socklen_t; ++//#endif + + extern "C" { + #include "vncsnapshot.h" diff --git a/Formula/v/vnstat.rb b/Formula/v/vnstat.rb new file mode 100644 index 0000000000000..177cc91bebf97 --- /dev/null +++ b/Formula/v/vnstat.rb @@ -0,0 +1,81 @@ +class Vnstat < Formula + desc "Console-based network traffic monitor" + homepage "https://humdi.net/vnstat/" + url "https://humdi.net/vnstat/vnstat-2.13.tar.gz" + sha256 "c9fe19312d1ec3ddfbc4672aa951cf9e61ca98dc14cad3d3565f7d9803a6b187" + license "GPL-2.0-only" + head "https://github.com/vergoh/vnstat.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "e1a8d49bd1309534dce38382dd0976eb5049d28fd209d8142d1353ba580ee360" + sha256 arm64_sequoia: "01d7585fcf02e3595ca5c701ae5756ca1b9b4e4ee2ef4fb2e76ea07dea677160" + sha256 arm64_sonoma: "cefa8fe3c1f63ad65685d6e812b79176faab950dd28fa1fbc8955d56ad4f2910" + sha256 arm64_ventura: "224ef1e8f2893b154ecd52d8999fb9f3f4ce57f4b565ac7881ac9250d5287505" + sha256 sonoma: "d0bb412ae03b8ddd2b071926ca8cd5b92420c9fa435546a2fa7f0570a2d7c6aa" + sha256 ventura: "d719d32162aa76bdfa057cb4ef089a864bafb31855d4355ba1e8e5e1cf3a9db9" + sha256 arm64_linux: "a2f1ff3f507091717d9c0b8b2d407a806d7435aa28e9b163203a72616b6a0c84" + sha256 x86_64_linux: "cb0052ce9d13c668838ca8dcd339f852ab9508fc41b1359ac712baf7322b29b0" + end + + depends_on "gd" + + uses_from_macos "sqlite" + + def install + inreplace %w[src/cfg.c src/common.h man/vnstat.1 man/vnstatd.8 man/vnstati.1 + man/vnstat.conf.5].each do |s| + s.gsub! "/etc/vnstat.conf", "#{etc}/vnstat.conf", audit_result: false + s.gsub! "/var/", "#{var}/", audit_result: false + s.gsub! "var/lib", "var/db", audit_result: false + # https://github.com/Homebrew/homebrew-core/pull/84695#issuecomment-913043888 + # network interface difference between macos and linux + s.gsub! "\"eth0\"", "\"en0\"", audit_result: false if OS.mac? + end + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--sbindir=#{bin}", + "--localstatedir=#{var}" + system "make", "install" + end + + def post_install + (var/"db/vnstat").mkpath + (var/"log/vnstat").mkpath + (var/"run/vnstat").mkpath + end + + def caveats + <<~EOS + To monitor interfaces other than "en0" edit #{etc}/vnstat.conf + EOS + end + + service do + run [opt_bin/"vnstatd", "--nodaemon", "--config", etc/"vnstat.conf"] + keep_alive true + require_root true + working_dir var + process_type :background + end + + test do + cp etc/"vnstat.conf", testpath + inreplace "vnstat.conf", var, testpath/"var" + inreplace "vnstat.conf", ";Interface", "Interface" + inreplace "vnstat.conf", ";DatabaseDir", "DatabaseDir" + (testpath/"var/db/vnstat").mkpath + + begin + stat = IO.popen("#{bin}/vnstatd --nodaemon --config vnstat.conf") + sleep 1 + sleep 2 if OS.mac? && Hardware::CPU.intel? + ensure + Process.kill "SIGINT", stat.pid + Process.wait stat.pid + end + assert_match "Info: Monitoring", stat.read + end +end diff --git a/Formula/v/vnu.rb b/Formula/v/vnu.rb new file mode 100644 index 0000000000000..0ae42f68a35bf --- /dev/null +++ b/Formula/v/vnu.rb @@ -0,0 +1,33 @@ +class Vnu < Formula + desc "Nu Markup Checker: command-line and server HTML validator" + homepage "https://validator.github.io/validator/" + url "https://registry.npmjs.org/vnu-jar/-/vnu-jar-25.11.4.tgz" + sha256 "50bd42e0b20d36e45aa41aa4f856fc7df6621caeed0df25884a16f1cd51b1579" + license "MIT" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "cf88b90ef828296ad50684cad0ca78f68fb322855ff03db8f622746b7135dd19" + end + + depends_on "openjdk" + + def install + libexec.install "build/dist/vnu.jar" + bin.write_jar_script libexec/"vnu.jar", "vnu" + end + + test do + (testpath/"index.html").write <<~HTML + + + + hi + + + + + HTML + system bin/"vnu", testpath/"index.html" + end +end diff --git a/Formula/v/vo-amrwbenc.rb b/Formula/v/vo-amrwbenc.rb new file mode 100644 index 0000000000000..5b9e93411d8fd --- /dev/null +++ b/Formula/v/vo-amrwbenc.rb @@ -0,0 +1,49 @@ +class VoAmrwbenc < Formula + desc "Library for the VisualOn Adaptive Multi Rate Wideband (AMR-WB) audio encoder" + homepage "https://sourceforge.net/projects/opencore-amr/" + url "https://downloads.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz" + sha256 "5652b391e0f0e296417b841b02987d3fd33e6c0af342c69542cbb016a71d9d4e" + license "Apache-2.0" + + livecheck do + url "https://sourceforge.net/projects/opencore-amr/rss?path=/vo-amrwbenc" + regex(%r{url=.*?/vo-amrwbenc[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "654ba6332b443125e46a211f00ed4f16b219d6de0068d8a4ea863200e97694cc" + sha256 cellar: :any, arm64_sequoia: "fec91381e714f851e4215e99f160daeeb8844fe28ac28bb86f4de6076eb7db1e" + sha256 cellar: :any, arm64_sonoma: "2b42ddf93167c6e68a0ff075380b69d1b03b9ead3125cf392571578c282ca677" + sha256 cellar: :any, arm64_ventura: "d627a6b0fb346506f9723a73eeb0f3e3d6d267e2e657ef4f13da37131fa88a31" + sha256 cellar: :any, sonoma: "e32dbde8f52e3a617f4ee48deb707b07f530ba72206c25df1fb82b19ccf085a7" + sha256 cellar: :any, ventura: "d12ffd9e43f25d2f17e86773ac2704a37577310042799eac2b59193184e4937a" + sha256 cellar: :any_skip_relocation, arm64_linux: "4dc5fe1a71f25d535c42c04b8927b2d34eb807301f2c226f2d803b9800c96db5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16b6d44ce234aa2ec2c3a3a0051f0ea76b469d6bf0b285b1878f761e0c7bf33c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + void *handle; + handle = E_IF_init(); + E_IF_exit(handle); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lvo-amrwbenc", "-o", "test" + system "./test" + end +end diff --git a/Formula/v/volcano-cli.rb b/Formula/v/volcano-cli.rb new file mode 100644 index 0000000000000..5d8bf16d09072 --- /dev/null +++ b/Formula/v/volcano-cli.rb @@ -0,0 +1,36 @@ +class VolcanoCli < Formula + desc "CLI for Volcano, Cloud Native Batch System" + homepage "https://volcano.sh" + url "https://github.com/volcano-sh/volcano/archive/refs/tags/v1.13.0.tar.gz" + sha256 "1839c3959a05292d741e7e26b0dc33e018acfc818f5a690fa8ccaa8fe847a3d2" + license "Apache-2.0" + head "https://github.com/volcano-sh/volcano.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d753db4b00bd45c2420176535394cdbfe05aa8cfdf9c7bfe7d5921cf40557e9c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aa4b9505f24d04917a6f03276e47411dcd4560629b739f13b201e668028d7452" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6b2364981682f4eabcda333112dae9209295536994d7223119629e6b09bbaa9" + sha256 cellar: :any_skip_relocation, sonoma: "0d67f7ed570525b1eaad996edbde306095182fa3c85916c3605c6791456cac3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "15f70bf49e9dc50d3a1aa0b03fc41f5f37a4c52cef60452501e5560a6b1632f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2d068ecba92dbdfeccc8baeadaa348e8543a24d3d34874b67051a7f01e57da4" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X volcano.sh/volcano/pkg/version.GitSHA=#{tap.user} + -X volcano.sh/volcano/pkg/version.Built=#{time.iso8601} + -X volcano.sh/volcano/pkg/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"vcctl"), "./cmd/cli" + end + + test do + assert_match version.to_s, shell_output("#{bin}/vcctl version") + + output = shell_output("#{bin}/vcctl queue list 2>&1", 255) + assert_match "Failed to list queue", output + end +end diff --git a/Formula/v/volk.rb b/Formula/v/volk.rb new file mode 100644 index 0000000000000..b09d20cfed086 --- /dev/null +++ b/Formula/v/volk.rb @@ -0,0 +1,66 @@ +class Volk < Formula + include Language::Python::Virtualenv + + desc "Vector Optimized Library of Kernels" + homepage "https://www.libvolk.org/" + url "https://github.com/gnuradio/volk/releases/download/v3.2.0/volk-3.2.0.tar.gz" + sha256 "9c6c11ec8e08aa37ce8ef7c5bcbdee60bac2428faeffb07d072e572ed05eb8cd" + license "LGPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0101fc34bd0194f1b696b1a18febd7e4e53784c9fac00bbd238839cebd818c80" + sha256 cellar: :any, arm64_sequoia: "e11bbb09bdccdc73383832a358473a026e4e47df07403047173e0bc2a951ef19" + sha256 cellar: :any, arm64_sonoma: "c8a7cb1121c51fa06ac8c1549c1f3e51cc16f1eda40ef1234a4e83f24d0bd27d" + sha256 cellar: :any, sonoma: "71a9d3ea9e5aea62969977a769049643b60e8fcf60784dbb2baa7819072f8f8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e7a7b3d137b539988f0393dd47a6a4f118066252d1f2b06da93edb7a0eb9014" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f02bd47c23ba777669675e79e099e91047a23924cdb4a4f850a0fca6c19250c9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "cpu_features" + depends_on "orc" + depends_on "python@3.14" + + resource "mako" do + url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" + sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + ENV.prepend_path "PYTHONPATH", buildpath/"venv"/Language::Python.site_packages(python3) + + # Avoid falling back to bundled cpu_features + rm_r(buildpath/"cpu_features") + + # Avoid references to the Homebrew shims directory + inreplace "lib/CMakeLists.txt" do |s| + s.gsub! "${CMAKE_C_COMPILER}", ENV.cc + s.gsub! "${CMAKE_CXX_COMPILER}", ENV.cxx + end + + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which(python3)}", + "-DENABLE_TESTING=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"volk_modtool", "--help" + system bin/"volk_profile", "--iter", "10" + end +end diff --git a/Formula/v/volt.rb b/Formula/v/volt.rb new file mode 100644 index 0000000000000..5e91f7b68e147 --- /dev/null +++ b/Formula/v/volt.rb @@ -0,0 +1,50 @@ +class Volt < Formula + desc "Meta-level vim package manager" + homepage "https://github.com/vim-volt/volt" + url "https://github.com/vim-volt/volt/archive/refs/tags/v0.3.7.tar.gz" + sha256 "db64e9a04426d2b1c0873e1ffd7a4c2d0f1ffe61688bee670bb16089b9c98639" + license "MIT" + head "https://github.com/vim-volt/volt.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fbaafd3e4142b6c23f3e24eb068fd5a88beb6606e19b5b2cc9f7c6bda6ebc707" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a7d8d94a9503960278ce6a43f2cf5ce58658d04d06b72be99804a9e0d52f901" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9dd1f6abf67c665ee109373b87fed3c705902f2b5fddc68bc7c2dfaec0194c73" + sha256 cellar: :any_skip_relocation, arm64_ventura: "59485100787529576ed3a8c6b89aaa86fe1efb46854d39e5b5952769c96d258d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "87cfdbc43edeb2cedc60ddda401062cad644f0fa6d799d7ef112800984a10da7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "836f10188a9b461531bac4b6eb803e4f86057342e443df99c0c466e224af18b6" + sha256 cellar: :any_skip_relocation, sonoma: "8f36e0949fd1b874327a78d1fad51791f7f2349b4dfa964c9774b2bb338e386f" + sha256 cellar: :any_skip_relocation, ventura: "c5244e0342f754911a266ba1fa595c9ef9eb14b19e9191f325ff484551be9297" + sha256 cellar: :any_skip_relocation, monterey: "d7d07259218a768843d6c9131e6e9f616e242b50f01aacbbdb9f539960cbcf77" + sha256 cellar: :any_skip_relocation, big_sur: "f08427b7e8f71b984417f65a5154dde9883610fb683891e16e267928c578bd59" + sha256 cellar: :any_skip_relocation, catalina: "60210297f62f908ef4090a7f69631ad02cb4fe2ce8472e953f67ad91caa9461c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d73df7f1d4f25fcf52a63390fb88fc5416df7c599556ea2f90f38f6a3151c5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe7d78905a357fa59f18330aab57269cce1fda6af521552918d54911fd075035" + end + + depends_on "go" => :build + + uses_from_macos "vim" => :test + + # Go 1.14+ compatibility. + patch do + url "https://github.com/vim-volt/volt/commit/aa9586901d249aa40e67bc0b3e0e7d4f13d5a88b.patch?full_index=1" + sha256 "62bed17b5c58198f44a669e41112335928e2fa93d71554aa6bddc782cf124872" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + bash_completion.install "_contrib/completion/bash" => "volt" + zsh_completion.install "_contrib/completion/zsh" => "_volt" + cp bash_completion/"volt", zsh_completion/"volt-completion.bash" + end + + test do + (testpath/"volt/repos/localhost/foo/bar/plugin/baz.vim").write "qux" + system bin/"volt", "get", "localhost/foo/bar" + assert_equal "qux", (testpath/".vim/pack/volt/opt/localhost_foo_bar/plugin/baz.vim").read + end +end diff --git a/Formula/v/volta.rb b/Formula/v/volta.rb new file mode 100644 index 0000000000000..9a7a9822f4383 --- /dev/null +++ b/Formula/v/volta.rb @@ -0,0 +1,52 @@ +class Volta < Formula + desc "JavaScript toolchain manager for reproducible environments" + homepage "https://volta.sh" + url "https://github.com/volta-cli/volta/archive/refs/tags/v2.0.2.tar.gz" + sha256 "0e93d17c36fb79222b10881d6c67d667483f85b19a0498eacfc535ef31894dbe" + license "BSD-2-Clause" + head "https://github.com/volta-cli/volta.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "60e950c599630d46e928ddbd6f9cf4494dcbd5a7781e116c0890aa156de912ea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acfec2a99f0b9365f89152d6796918fab98839f43a7f16a3a180417e2082f5fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb744499c855e7fc137088663ef45db348e20727549a20c5822ef5887b896205" + sha256 cellar: :any_skip_relocation, arm64_ventura: "92156fa743a1700648c3ac10594c042c94ceb2b415ff800054d1a13777d49019" + sha256 cellar: :any_skip_relocation, sonoma: "8cf25e1f75d7f3b228a79a986e81817c0690feb96f253b5d11309311166189a0" + sha256 cellar: :any_skip_relocation, ventura: "1c41e466e6b4ce60d13addb1cb792785d4ecaef3c768491f062771603252d523" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a116be251ad88fcb927346f510bff705183f8922cb287533d014acdb83031f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0eede98248c0b47f51645f2a7c051549913fcb207f48364f446611f542845ae" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + def install + system "cargo", "install", *std_cargo_args + generate_completions_from_executable(bin/"volta", "completions") + + bin.each_child do |f| + basename = f.basename + next if basename.to_s == "volta-shim" + + (libexec/"bin").install f + (bin/basename).write_env_script libexec/"bin"/basename, VOLTA_INSTALL_DIR: opt_prefix/"bin" + end + end + + test do + system bin/"volta", "install", "node@19.0.1" + node = shell_output("#{bin}/volta which node").chomp + assert_match "19.0.1", shell_output("#{node} --version") + path = testpath/"test.js" + path.write "console.log('hello');" + output = shell_output("#{testpath}/.volta/bin/node #{path}").strip + assert_equal "hello", output + end +end diff --git a/Formula/v/vorbis-tools.rb b/Formula/v/vorbis-tools.rb new file mode 100644 index 0000000000000..2353f62026167 --- /dev/null +++ b/Formula/v/vorbis-tools.rb @@ -0,0 +1,62 @@ +class VorbisTools < Formula + desc "Ogg Vorbis CODEC tools" + homepage "https://github.com/xiph/vorbis-tools" + url "https://ftp.osuosl.org/pub/xiph/releases/vorbis/vorbis-tools-1.4.3.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/vorbis/vorbis-tools-1.4.3.tar.gz" + sha256 "a1fe3ddc6777bdcebf6b797e7edfe0437954b24756ffcc8c6b816b63e0460dde" + license all_of: [ + "LGPL-2.0-or-later", # intl/ (libintl) + "GPL-2.0-or-later", # share/ + "GPL-2.0-only", # oggenc/, vorbiscomment/ + ] + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/vorbis/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)vorbis-tools[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ba951810e66deef3e95f0221893c66ba61714a590200dea95af16590595aba94" + sha256 cellar: :any, arm64_sequoia: "90772f684b42063eeed55dfe4e3474007b1ff9f6f83114ac04f6b392984a39bd" + sha256 cellar: :any, arm64_sonoma: "5b2a530e21e74a68a228e4a7c4a4adbd8e7723e6dbbd627a44001f8b90673002" + sha256 cellar: :any, arm64_ventura: "fa047db81ba9212b7ee38570602086bed423456007c59eb2e9f5c2e883b412a5" + sha256 cellar: :any, sonoma: "c06c90a0f929edb01a55843de22d3d7c81c97ca23c3baf27ada5ef9ec0793872" + sha256 cellar: :any, ventura: "dfd8e9fe627b76127cd956477d35f043d6f3cd1a0a00830f1e7bd33ae8cc5ca2" + sha256 cellar: :any_skip_relocation, arm64_linux: "817d166c647bc6e97d1a462c2d350c011dc4c298d09e77aed7fd939b90303a86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b66ff3ed8885d6b8c6ba8aff13bdfd348907376039d1c9d218daec795886df6f" + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "libao" + depends_on "libogg" + depends_on "libvorbis" + + uses_from_macos "curl" + + on_monterey :or_newer do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + if OS.mac? && (MacOS.version >= :monterey) + # Workaround for Xcode 14 ld. + system "autoreconf", "--force", "--install", "--verbose" + end + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", *std_configure_args, "--disable-nls", "--without-speex" + system "make", "install" + end + + test do + system bin/"oggenc", test_fixtures("test.wav"), "-o", "test.ogg" + assert_path_exists testpath/"test.ogg" + output = shell_output("#{bin}/ogginfo test.ogg") + assert_match "20.625000 kb/s", output + end +end diff --git a/Formula/v/vorbisgain.rb b/Formula/v/vorbisgain.rb new file mode 100644 index 0000000000000..fd56d82602bb5 --- /dev/null +++ b/Formula/v/vorbisgain.rb @@ -0,0 +1,46 @@ +class Vorbisgain < Formula + desc "Add Replay Gain volume tags to Ogg Vorbis files" + homepage "https://sjeng.org/vorbisgain.html" + url "https://sjeng.org/ftp/vorbis/vorbisgain-0.37.tar.gz" + sha256 "dd6db051cad972bcac25d47b4a9e40e217bb548a1f16328eddbb4e66613530ec" + license "LGPL-2.1-only" + + livecheck do + url "https://sjeng.org/ftp/vorbis/" + regex(/href=.*?vorbisgain[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2184e1fd2ac1887c416d3aef7c8596ff7b4b5bb34e5f1d2e47f9b4ef54e69094" + sha256 cellar: :any, arm64_sequoia: "1e173fbe7ad9eff215301e6c55c6b8e30a8299c5f946a4102ef15cbbc5080b1f" + sha256 cellar: :any, arm64_sonoma: "8d09f799836dc2108d73030122904158aefd8b4a61df21be1084d2732f730feb" + sha256 cellar: :any, arm64_ventura: "5d6e594f8ec28faf2891f44a74881f69332db9a43a8e3058032a32d2d00612c1" + sha256 cellar: :any, arm64_monterey: "5d007797235d2075ef13137bbbc16f2781e7657501f5d8c023acdd1b8a67fb91" + sha256 cellar: :any, arm64_big_sur: "5763a2b6c8f9c2d5c27e708a8cbc88f5274dcb7e44f5f5ecf2b29b909e18e017" + sha256 cellar: :any, sonoma: "883d2c263b7328b4dc485555c3c0c5792a6cacc8a9588c5d2dc13db5d2ab8a02" + sha256 cellar: :any, ventura: "c24c65881c8ef77deee9c5c06aa1ee1f7ea6270d34c2aae39916850e7d87283a" + sha256 cellar: :any, monterey: "2425fba1e48046342e47fc515d958f5c76905679c4c8d2dafa9686860387f2dc" + sha256 cellar: :any, big_sur: "c70e02a12f7c232b752afebcee063ecb031eb120f64c58bb6a95325100aa6767" + sha256 cellar: :any, catalina: "b49eb04725bc5ab78fa94e261bb23598b4b4cacf1e8508a9ea543b0069947894" + sha256 cellar: :any_skip_relocation, arm64_linux: "32f7069967cb439534cab42cacd2edbc3e81d8fb180362260ccd8ee19759e85d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98180bd55bee493621155475e77ba5de249c1ce27f85edc895a69c9d41a63df3" + end + + depends_on "libogg" + depends_on "libvorbis" + + def install + # fix implicit-function-declaration errors + ENV.append_to_cflags "-DGWINSZ_IN_SYS_IOCTL" + inreplace "misc.c", "#include ", "#include \n#include " + + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"vorbisgain", "--version" + end +end diff --git a/Formula/v/voro++.rb b/Formula/v/voro++.rb new file mode 100644 index 0000000000000..7e09eb9533264 --- /dev/null +++ b/Formula/v/voro++.rb @@ -0,0 +1,50 @@ +class Voroxx < Formula + desc "3D Voronoi cell software library" + homepage "https://math.lbl.gov/voro++" + url "https://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz" + sha256 "ef7970071ee2ce3800daa8723649ca069dc4c71cc25f0f7d22552387f3ea437e" + license "BSD-3-Clause" + revision 2 + + livecheck do + url "https://math.lbl.gov/voro++/download/" + regex(/href=.*?voro\+\+[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e92608286d7f5525760a291095fffa5174353cd4360288b3b370734e266e332a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c76ccd2f7c88492a312735928f7b629188da9bac80b579effbf140eaff73cb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e400aeb0f042dc4b3bfb00bf1a165ce714dd25bbfe8535457bfbec22f9c838c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d9115a80aa1515ed06f302a722c50a2f2a986c348ebc4934b45368c4ab4afde" + sha256 cellar: :any_skip_relocation, sonoma: "e585c0c80a4987580d186106c18bc7885d7b2556b8e3483642fbf588ace5bf3b" + sha256 cellar: :any_skip_relocation, ventura: "ae3b15478092b468424cd6958a85abe801ad22442fdb97fd21684c033aaae799" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8679748ddd61c78e57c10ef4c8855d933287303f931b595abe67c6339e44bac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b8a79d25b9feaedc06ed05f9affbe8e78443e20344b561b85daec8cbed9a089" + end + + def install + inreplace "config.mk", "CFLAGS=", "CFLAGS=-fPIC " if OS.linux? + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install("examples") + mv prefix/"man", share/"man" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "voro++.hh" + double rnd() { return double(rand())/RAND_MAX; } + int main() { + voro::container con(0, 1, 0, 1, 0, 1, 6, 6, 6, false, false, false, 8); + for (int i = 0; i < 20; i++) con.put(i, rnd(), rnd(), rnd()); + if (fabs(con.sum_cell_volumes() - 1) > 1.e-8) abort(); + con.draw_cells_gnuplot("test.gnu"); + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}/voro++", "-L#{lib}", + "-lvoro++" + system "./a.out" + assert_path_exists testpath/"test.gnu" + end +end diff --git a/Formula/v/votca.rb b/Formula/v/votca.rb new file mode 100644 index 0000000000000..5fe05ddbd934d --- /dev/null +++ b/Formula/v/votca.rb @@ -0,0 +1,66 @@ +class Votca < Formula + desc "Versatile Object-oriented Toolkit for Coarse-graining Applications" + homepage "https://www.votca.org/" + url "https://github.com/votca/votca/archive/refs/tags/v2025.1.tar.gz" + sha256 "85b487d2b2a31f26869be422c98f816b95c88a4ab112ea4650cccd4c2706bdbf" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "fded17617f5140a20b04b5cfc9281e6429380d175d4e055a3d6b4dcc52a85b57" + sha256 cellar: :any, arm64_sequoia: "1cf98138786201b215734a1211d11cf41966ff3dce3d488b048628576236d4db" + sha256 cellar: :any, arm64_sonoma: "4b16956c81ad38c7f4a48867d10f1e08e7b1c18018b47440d7b040a5fc48397b" + sha256 cellar: :any, sonoma: "ae0f8523a835692c893098181ad612b727c3f0ada15d6d7d29f5cf0227f854c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6599a17075e452492e0f9266812795c28c724103e97c58563058d8d2b436217d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab37fef79c54edc8f175901834c1d6a6017029943f52c33d308e34fda97d67a3" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => :build + depends_on "boost" + depends_on "eigen" + depends_on "fftw" + # add gromacs dep back once it was built with clang + depends_on "hdf5" + depends_on "libecpint" + depends_on "libint" + depends_on "libxc" + + uses_from_macos "expat" + + on_macos do + depends_on "libomp" + end + + # Apply open PR to support eigen 5.0.0 + # PR ref: https://github.com/votca/votca/pull/1189 + patch do + url "https://github.com/votca/votca/commit/cc581d91196c3505c649e35ba69bcc8ec33fa14b.patch?full_index=1" + sha256 "08da2d4fd694eb1b3909fe4ef452b042a0b0733ca5d8b68e0e655b09842cb069" + end + + def install + args = [ + "-DINSTALL_RC_FILES=OFF", + "-DINSTALL_CSGAPPS=ON", + "-DBUILD_XTP=ON", + "-DCMAKE_DISABLE_FIND_PACKAGE_GROMACS=ON", + "-DENABLE_RPATH_INJECT=ON", + "-DPYrdkit_FOUND=OFF", + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"csg_property", "--help" + (testpath/"table.in").write <<~EOS + 0 0 i + 1 1 i + EOS + system bin/"csg_resample", "--in", "table.in", "--out", "table.out", "--grid", "0:0.1:1", "--type", "linear" + assert_path_exists "#{testpath}/table.out" + end +end diff --git a/Formula/v/vowpal-wabbit.rb b/Formula/v/vowpal-wabbit.rb new file mode 100644 index 0000000000000..1a5df0daa05dd --- /dev/null +++ b/Formula/v/vowpal-wabbit.rb @@ -0,0 +1,121 @@ +class VowpalWabbit < Formula + desc "Online learning algorithm" + homepage "https://github.com/VowpalWabbit/vowpal_wabbit" + url "https://github.com/VowpalWabbit/vowpal_wabbit/archive/refs/tags/9.10.0.tar.gz" + sha256 "9f4ec5cddf67af2c7aa9b380b23fe22c4b11e2109f2cbaa1314bdf3570749a4d" + license "BSD-3-Clause" + revision 2 + head "https://github.com/VowpalWabbit/vowpal_wabbit.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cf06a7d71afc411b70a5180e3c7f17174800c21eb984ca552523d05e1d48dc8d" + sha256 cellar: :any, arm64_sequoia: "dcf23c662a2ae94c97abfe2756a3b7b545fee913148f471aa4706c0bdb97c27d" + sha256 cellar: :any, arm64_sonoma: "315dbd71b2ae7c0a4a7d04e69616de5b9efadc6684dfa6450be6ad4a4ba8bb7d" + sha256 cellar: :any, sonoma: "35f2af451771f6153f139aea0cea8e6afa495b4cb33f4c9b4d52f3de887e2c7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "92f674e4035f4e003784b4942809934d3b7e82801e33c4e98484eda70952ede3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83f19ae77085270dab292a53fa72203559c6b0782010cb55846a8c9e09c43283" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "eigen" => :build + depends_on "rapidjson" => :build + depends_on "spdlog" => :build + depends_on "fmt" + + uses_from_macos "zlib" + + on_arm do + depends_on "sse2neon" => :build + end + + # Reported at https://github.com/VowpalWabbit/vowpal_wabbit/issues/4700 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/vowpal-wabbit/fmt11.diff" + sha256 "15f6f9013715bd1dc33456394b3f464aed863ef726479bb272a2f92db2ee7ea0" + end + + # Apply open PR to support eigen 5.0.0 + # PR ref: https://github.com/VowpalWabbit/vowpal_wabbit/pull/4720 + patch do + url "https://github.com/VowpalWabbit/vowpal_wabbit/commit/1c8a86786f415d44a001e64ba823c5f3e80f48a0.patch?full_index=1" + sha256 "035973d7b49ac3cf266700c4777950b2b0ded095114873110b75467bfe3c2199" + end + + def install + args = %w[ + -DRAPIDJSON_SYS_DEP=ON + -DFMT_SYS_DEP=ON + -DSPDLOG_SYS_DEP=ON + -DVW_BOOST_MATH_SYS_DEP=ON + -DVW_EIGEN_SYS_DEP=ON + -DVW_SSE2NEON_SYS_DEP=ON + -DVW_INSTALL=ON + -DVW_CXX_STANDARD=14 + ] + + # The project provides a Makefile, but it is a basic wrapper around cmake + # that does not accept *std_cmake_args. + # The following should be equivalent, while supporting Homebrew's standard args. + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bin.install Dir["utl/*"] + rm bin/"active_interactor.py" + rm bin/"vw-validate.html" + rm bin/"clang-format.sh" + rm bin/"release_blog_post_template.md" + rm_r bin/"flatbuffer" + rm_r bin/"dump_options" + end + + test do + (testpath/"house_dataset").write <<~EOS + 0 | price:.23 sqft:.25 age:.05 2006 + 1 2 'second_house | price:.18 sqft:.15 age:.35 1976 + 0 1 0.5 'third_house | price:.53 sqft:.32 age:.87 1924 + EOS + system bin/"vw", "house_dataset", "-l", "10", "-c", "--passes", "25", "--holdout_off", + "--audit", "-f", "house.model", "--nn", "5" + system bin/"vw", "-t", "-i", "house.model", "-d", "house_dataset", "-p", "house.predict" + + (testpath/"csoaa.dat").write <<~EOS + 1:1.0 a1_expect_1| a + 2:1.0 b1_expect_2| b + 3:1.0 c1_expect_3| c + 1:2.0 2:1.0 ab1_expect_2| a b + 2:1.0 3:3.0 bc1_expect_2| b c + 1:3.0 3:1.0 ac1_expect_3| a c + 2:3.0 d1_expect_2| d + EOS + system bin/"vw", "--csoaa", "3", "csoaa.dat", "-f", "csoaa.model" + system bin/"vw", "-t", "-i", "csoaa.model", "-d", "csoaa.dat", "-p", "csoaa.predict" + + (testpath/"ect.dat").write <<~EOS + 1 ex1| a + 2 ex2| a b + 3 ex3| c d e + 2 ex4| b a + 1 ex5| f g + EOS + system bin/"vw", "--ect", "3", "-d", "ect.dat", "-f", "ect.model" + system bin/"vw", "-t", "-i", "ect.model", "-d", "ect.dat", "-p", "ect.predict" + + (testpath/"train.dat").write <<~EOS + 1:2:0.4 | a c + 3:0.5:0.2 | b d + 4:1.2:0.5 | a b c + 2:1:0.3 | b c + 3:1.5:0.7 | a d + EOS + (testpath/"test.dat").write <<~EOS + 1:2 3:5 4:1:0.6 | a c d + 1:0.5 2:1:0.4 3:2 4:1.5 | c d + EOS + system bin/"vw", "-d", "train.dat", "--cb", "4", "-f", "cb.model" + system bin/"vw", "-t", "-i", "cb.model", "-d", "test.dat", "-p", "cb.predict" + end +end diff --git a/Formula/v/vpcs.rb b/Formula/v/vpcs.rb new file mode 100644 index 0000000000000..8032f42d979d9 --- /dev/null +++ b/Formula/v/vpcs.rb @@ -0,0 +1,43 @@ +class Vpcs < Formula + desc "Virtual PC simulator for testing IP routing" + homepage "https://vpcs.sourceforge.net/" + url "https://downloads.sourceforge.net/project/vpcs/0.8/vpcs-0.8-src.tbz" + sha256 "dca602d0571ba852c916632c4c0060aa9557dd744059c0f7368860cfa8b3c993" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "158636f42e7e2b5c9bb55093d13dcedeb7513c17a003a3432741acde18e4402f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c720c9b26f940276b3431e88b4c8ce29cbe2fe616536d0b8419a6e378e09c3af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a6670a2833658d64a9be4c0e42f07b7224ef2cf1ea50faafa982f8469a49052" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5ad3049e60f55965753362c2d6b5d5919dbe4b5537b155a0d914614d4a0d8cf6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a039b6f432de6fe7fb3429b6ccad3a822e1249e6b11a3af0d916c98a908b4dc9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d673e17698f476b16e70b66227623b829779846d0f4b2246cf84c85f8427d8de" + sha256 cellar: :any_skip_relocation, sonoma: "9d359b2fa18ff5dc0f8a1f34ef372d1d721fcc4400bf935ef743368a7ec05cf4" + sha256 cellar: :any_skip_relocation, ventura: "c65377d546fbe8026e2a833918b2ef9cf10578a05f6f6f7a0141aa264b4875ef" + sha256 cellar: :any_skip_relocation, monterey: "6f3e52b8fd8ee4aab736d67fc99ed39fc72364fa9a3ffc9db1b8bd0d8b27661f" + sha256 cellar: :any_skip_relocation, big_sur: "75d81877dc7c7e8a07b5a1496e1264ac19fd8206f5dcc24de835931a0d1501eb" + sha256 cellar: :any_skip_relocation, catalina: "180a02cc1bb06bb9e5f441688d6b1a51e5c531cd6dea68399aba55f3c5691dd9" + sha256 cellar: :any_skip_relocation, arm64_linux: "5de5fc1e177ac3651f6c1ea17097307535b8735757ded9e3f693458db2e86827" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ee66bd58892962238c81873d186c5066fd53490328b2c0db6667532565db008" + end + + def install + cd "src" do + if OS.mac? + system "make", "-f", "Makefile.osx" + else + # Avoid conflicting getopt + rm "getopt.h" + # Use -fcommon to work around multiple definition of `vpc' + system "make", "-f", "Makefile.linux", "CCOPT=-fcommon" + end + bin.install "vpcs" + end + end + + test do + system bin/"vpcs", "--version" + end +end diff --git a/Formula/v/vpn-slice.rb b/Formula/v/vpn-slice.rb new file mode 100644 index 0000000000000..f13f63e5784d2 --- /dev/null +++ b/Formula/v/vpn-slice.rb @@ -0,0 +1,50 @@ +class VpnSlice < Formula + include Language::Python::Virtualenv + + desc "Vpnc-script replacement for easy and secure split-tunnel VPN setup" + homepage "https://github.com/dlenski/vpn-slice" + url "https://files.pythonhosted.org/packages/74/fd/6c9472e8ed83695abace098d83ba0df4ea48e29e7b2f6c77ced73b9f7dce/vpn-slice-0.16.1.tar.gz" + sha256 "28d02dd1b41210b270470350f28967320b3a34321d57cc9736f53d6121e9ceaa" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/dlenski/vpn-slice.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1ce45fcd3f9bed8b11fd2780ecf0ec7379c9ba89d8f79e692b0c71bb31dfde26" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd141a705bff3a74746ba42047e6636530cd379ee7dbc3aab25977cd51a10e17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "414c174578e03c9f89b096e4cac861119b9e29fcb9e68b44d02ebd9e1d911be9" + sha256 cellar: :any_skip_relocation, sonoma: "78fbe63be8429f0ab38427d75dd2ed511a578f89f5019d5a775a7acb4cc2784a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8778f4daae86d96a51e7aed7efd2de7b556cc1dd1e41246855278da5622056d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e11db2b6fae77e64c63f5f9c3151a64d81a79db650bf5389e99dbeb406954734" + end + + depends_on "python@3.14" + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz" + sha256 "181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/8d/48/49393a96a2eef1ab418b17475fb92b8fcfad83d099e678751b05472e69de/setproctitle-1.3.7.tar.gz" + sha256 "bc2bc917691c1537d5b9bca1468437176809c7e11e5694ca79a9ca12345dcb9e" + end + + # Drop setuptools dep + # https://github.com/dlenski/vpn-slice/pull/149 + patch do + url "https://github.com/dlenski/vpn-slice/commit/5d0c48230854ffed5042192d921d8d97fbe427be.patch?full_index=1" + sha256 "0ae3a54d14f1be373478820de2c774861dd97f9ae156fef21d27c76cee157951" + end + + def install + virtualenv_install_with_resources + end + + test do + # vpn-slice needs root/sudo credentials + output = shell_output("#{bin}/vpn-slice 192.168.0.0/24 2>&1", 1) + assert_match "Cannot read/write /etc/hosts", output + end +end diff --git a/Formula/v/vramsteg.rb b/Formula/v/vramsteg.rb new file mode 100644 index 0000000000000..bca9027c98946 --- /dev/null +++ b/Formula/v/vramsteg.rb @@ -0,0 +1,51 @@ +class Vramsteg < Formula + desc "Add progress bars to command-line applications" + homepage "https://gothenburgbitfactory.org/vramsteg/" + url "https://github.com/GothenburgBitFactory/vramsteg/releases/download/v1.1.0/vramsteg-1.1.0.tar.gz" + sha256 "9cc82eb195e4673d9ee6151373746bd22513033e96411ffc1d250920801f7037" + license "MIT" + head "https://github.com/GothenburgBitFactory/vramsteg.git", branch: "develop" + + livecheck do + url "https://gothenburgbitfactory.org" + regex(/href=.*?vramsteg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a5479befe15922fb1599789c162d94db24b307d31ab67508ac4ca5ab2e416a8a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0fc0621375da82a15b6a36551f6fe423df69a79c656beae75ce15a6e6c331556" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f122182d7989681603772e5ca869e722b9a358e170f2f60135c635a51142a6a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2158611ee7a141add85d1e540484a167ca3ba679d9e0ce60d9381b938e20ecb1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "efdbbb479580eea937df42d340735d4d621783ba8fdff2987a4ac05b38623dbf" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a7bc2f2c1ca7f14f5c6551f48907f9be12b623c5ebc16cd454afefe337760336" + sha256 cellar: :any_skip_relocation, sonoma: "824cff846fd4ad84038fc095676cf1e64927c7414742a536b9f0679f6adebd1c" + sha256 cellar: :any_skip_relocation, ventura: "b1bd6ff70efa1795e140c5dd958bc9faab78c6ad0bc6be86c191e09aa53398a7" + sha256 cellar: :any_skip_relocation, monterey: "0464b7532d2b80277a1c560422b20affe4e7b5ce41b8d5e33937a5038fe35993" + sha256 cellar: :any_skip_relocation, big_sur: "d004f9d2ef1b642f8128c368e57235f6d2580fd90d928da9996684430a6881ee" + sha256 cellar: :any_skip_relocation, catalina: "a6f6f99e3b12dca8a56919d1144b10e43a9059e7691d56dfdf8aab330e6febe8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7d833b721091e38b120fb58944129769f20109b74d881735f7ab1dadf62b487" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17541c74c89bdac3887fca1b40afe76b5a1778aef0ccb8dd092d04088ed3b281" + end + + depends_on "cmake" => :build + + def install + # Workaround for CMake 4 until following commit is in a release: + # https://github.com/GothenburgBitFactory/vramsteg/commit/b43db620a922b8ee4b8324804aa0fd6150985e03 + if build.stable? + odie "Remove `-DCMAKE_POLICY_VERSION_MINIMUM=3.5`" if version > "1.1.1" + args = ["-DCMAKE_POLICY_VERSION_MINIMUM=3.5"] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Check to see if vramsteg can obtain the current time as epoch + assert_match(/^\d+$/, shell_output("#{bin}/vramsteg --now")) + end +end diff --git a/Formula/v/vrc-get.rb b/Formula/v/vrc-get.rb new file mode 100644 index 0000000000000..7dca2054ff999 --- /dev/null +++ b/Formula/v/vrc-get.rb @@ -0,0 +1,36 @@ +class VrcGet < Formula + desc "Open Source alternative of Command-line client of VRChat Package Manager" + homepage "https://github.com/vrc-get/vrc-get" + url "https://github.com/vrc-get/vrc-get/archive/refs/tags/v1.9.1.tar.gz" + sha256 "a8d35448a01b70df0753dd264c096a32b21dc2bd2ef9b5a54423c4309c7aa3db" + license "MIT" + head "https://github.com/vrc-get/vrc-get.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "de850d693542af7f6e08660d844b13e76331feed2e0ac47367bebbf9816bc4b7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "12597ac2dd9b97563c431a6c0220ad2daa8bd519d18467ebf0955d0ff0682670" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e96d29ec329670fd8fb921193e07ef71e5699358df6b60ee65a14fc068927526" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3660f27b64f9e969466fe49bfa55f631dd67ce978bccbac2f9826033637de250" + sha256 cellar: :any_skip_relocation, sonoma: "3c4202ebc728de42372a7db3a926572b7de9de197a1deeb35f207be9f5d131b7" + sha256 cellar: :any_skip_relocation, ventura: "d108f92673c5e0502b59e7682ddaa208886bad7a8162fc2172315759ba20aae6" + sha256 cellar: :any_skip_relocation, arm64_linux: "ecec52be3888898c5755c085e97cdb6aab7c36ea33ccf5a8adf81735de95bc93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcf026916c83f75b0ede1071e1cd8c1eb87a74d131456a6bd417d8e31edc7580" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "vrc-get") + end + + test do + ENV["XDG_DATA_HOME"] = testpath/"data-home" + system bin/"vrc-get", "update" + assert_path_exists testpath/"data-home/VRChatCreatorCompanion/Repos/vrc-official.json" + end +end diff --git a/Formula/v/vroom.rb b/Formula/v/vroom.rb new file mode 100644 index 0000000000000..8de2b7b74fd07 --- /dev/null +++ b/Formula/v/vroom.rb @@ -0,0 +1,107 @@ +class Vroom < Formula + desc "Vehicle Routing Open-Source Optimization Machine" + homepage "http://vroom-project.org/" + url "https://github.com/VROOM-Project/vroom.git", + tag: "v1.13.0", + revision: "c87a87c4053b01396fb1011f665910c696e27c91" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "329045c3316d3e16c16a145b645c51070f0b88bc114336e0816ffea599dbf486" + sha256 cellar: :any, arm64_sequoia: "1c0df6c3a21095891a7cbf1508accd44318e83734b741b0ebc9aea5e99b61cd7" + sha256 cellar: :any, arm64_sonoma: "6165a7cb235b8a0bc6e57479ec80257751698945e9a4b699115d3163fa1a0add" + sha256 cellar: :any, arm64_ventura: "0c57cf1a0b33c08327c768bf70580b3c9687fa18694466965b8d3f2e794f9093" + sha256 cellar: :any, arm64_monterey: "e9748811a768dafc95d402f4626c04e0a63b69aa3e503a22c835334b4503d814" + sha256 cellar: :any, sonoma: "7cd025997ecb18d3d5fc35a953720fb96ce631ede626a9cb8bcf315187ce83c8" + sha256 cellar: :any, ventura: "788ecd2b38d2c912a0a573f7a0a7b2f7ac926dcf0ea9de61a1bb7e7ed8111d88" + sha256 cellar: :any, monterey: "bb59f660179205c05dc8ab2990b8fd3064be81b436f4b9ec12466906fa17c2fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e679e29f0cff84510a44089366d2109889217dc40e4ff8eb8df3c72cde24ea6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42d4abf7176dba741db892b3708064ea7ffaa687892edd30dc0146d9144fe767" + end + + depends_on "cxxopts" => :build + depends_on "pkgconf" => :build + depends_on "rapidjson" => :build + depends_on "asio" + depends_on "openssl@3" + + # Apply changes from open PR to fix build with newer Asio + # PR ref: https://github.com/VROOM-Project/vroom/pull/1279 + patch :DATA + + def install + # fixes https://github.com/VROOM-Project/vroom/issues/997 , remove in version > 1.13.0 + inreplace "src/main.cpp", "throw cxxopts::OptionException", "throw cxxopts::exceptions::parsing" + inreplace "src/main.cpp", "catch (const cxxopts::OptionException", "catch (const cxxopts::exceptions::exception" + + # Use brewed dependencies instead of vendored dependencies + cd "include" do + rm_r(["cxxopts", "rapidjson"]) + mkdir_p "cxxopts" + ln_s Formula["cxxopts"].opt_include, "cxxopts/include" + ln_s Formula["rapidjson"].opt_include, "rapidjson" + end + + cd "src" do + system "make" + end + bin.install "bin/vroom" + pkgshare.install "docs" + end + + test do + output = shell_output("#{bin}/vroom -i #{pkgshare}/docs/example_2.json") + expected_routes = JSON.parse((pkgshare/"docs/example_2_sol.json").read)["routes"] + actual_routes = JSON.parse(output)["routes"] + assert_equal expected_routes, actual_routes + end +end + +__END__ +diff --git a/src/routing/http_wrapper.cpp b/src/routing/http_wrapper.cpp +index 474de70e..80d0131d 100644 +--- a/src/routing/http_wrapper.cpp ++++ b/src/routing/http_wrapper.cpp +@@ -37,14 +37,12 @@ std::string HttpWrapper::send_then_receive(const std::string& query) const { + std::string response; + + try { +- asio::io_service io_service; ++ asio::io_context io_context; + +- tcp::resolver r(io_service); ++ tcp::resolver r(io_context); + +- tcp::resolver::query q(_server.host, _server.port); +- +- tcp::socket s(io_service); +- asio::connect(s, r.resolve(q)); ++ tcp::socket s(io_context); ++ asio::connect(s, r.resolve(_server.host, _server.port)); + + asio::write(s, asio::buffer(query)); + +@@ -86,16 +84,14 @@ std::string HttpWrapper::ssl_send_then_receive(const std::string& query) const { + std::string response; + + try { +- asio::io_service io_service; ++ asio::io_context io_context; + + asio::ssl::context ctx(asio::ssl::context::method::sslv23_client); +- asio::ssl::stream ssock(io_service, ctx); +- +- tcp::resolver r(io_service); ++ asio::ssl::stream ssock(io_context, ctx); + +- tcp::resolver::query q(_server.host, _server.port); ++ tcp::resolver r(io_context); + +- asio::connect(ssock.lowest_layer(), r.resolve(q)); ++ asio::connect(ssock.lowest_layer(), r.resolve(_server.host, _server.port)); + ssock.handshake(asio::ssl::stream_base::handshake_type::client); + + asio::write(ssock, asio::buffer(query)); diff --git a/Formula/v/vrpn.rb b/Formula/v/vrpn.rb new file mode 100644 index 0000000000000..af386f7509811 --- /dev/null +++ b/Formula/v/vrpn.rb @@ -0,0 +1,60 @@ +class Vrpn < Formula + desc "Virtual reality peripheral network" + homepage "https://github.com/vrpn/vrpn/wiki" + url "https://github.com/vrpn/vrpn.git", + tag: "v07.36", + revision: "79deb000cc0b47ae49a80c92c78167c02d8a04d8" + license "BSL-1.0" + head "https://github.com/vrpn/vrpn.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e621c7902a1bf2c9eaedc06eb6d6fba8240754df7e05ca825878841b921fb1da" + sha256 cellar: :any, arm64_sequoia: "6df76cd24b9715b3cd44fba0da667b8d6999759e2da6a00c8ac1e5aaf5cdc7cc" + sha256 cellar: :any, arm64_sonoma: "96810647768b9f76928312becdbdf4566475faf3dfad67524d633e0f19456c35" + sha256 cellar: :any, arm64_ventura: "e4cadc44e87394fa280711cb00ecb7b0363a63e459a3bec2604cb66dea4707e9" + sha256 cellar: :any, sonoma: "c07c530ba62053c232c91eaa9953b7ded4a7f874a88b57b591a9523afa4f43b7" + sha256 cellar: :any, ventura: "85bf1f7e010c6298a774fc915b12a27efbec8c511ba8afefd4fc2027a60c9fe6" + sha256 cellar: :any_skip_relocation, arm64_linux: "9973bb24a161a50bd8406bb48d97dfed0d9235c00b27d196b81e38841dd4d31d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12b74a67ae4e340f4226650337b007bb94edbe27c751ccc83429120a4a91f37c" + end + + depends_on "cmake" => :build + depends_on "libusb" # for HID support + + def install + args = %w[ + -DVRPN_BUILD_CLIENTS=OFF + -DVRPN_BUILD_JAVA=OFF + -DVRPN_USE_WIIUSE=OFF + -DVRPN_BUILD_PYTHON=OFF + -DVRPN_BUILD_PYTHON_HANDCODED_3X=OFF + ] + + args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + vrpn_Analog_Remote *analog = new vrpn_Analog_Remote("Tracker0@localhost"); + if (analog) { + std::cout << "vrpn_Analog_Remote created successfully!" << std::endl; + delete analog; + return 0; + } + return 1; + } + CPP + + system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lvrpn" + system "./test" + + system bin/"vrpn_server", "-h" + end +end diff --git a/Formula/v/vsce.rb b/Formula/v/vsce.rb new file mode 100644 index 0000000000000..519bee5e4f797 --- /dev/null +++ b/Formula/v/vsce.rb @@ -0,0 +1,44 @@ +class Vsce < Formula + desc "Tool for packaging, publishing and managing VS Code extensions" + homepage "https://code.visualstudio.com/api/working-with-extensions/publishing-extension#vsce" + url "https://registry.npmjs.org/@vscode/vsce/-/vsce-3.6.2.tgz" + sha256 "7fa985bcc864a122e598669558a8c1167d4ba37c1e4f561a64200b4d13ba162d" + license "MIT" + head "https://github.com/microsoft/vscode-vsce.git", branch: "main" + + livecheck do + url "https://registry.npmjs.org/@vscode/vsce/latest" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 arm64_tahoe: "ab70c67b19ba1251580c0ee93a261143febfd579721b2fb9df2e8de807e4f70a" + sha256 arm64_sequoia: "979167f8d40eb68ad0091ef5bcec60d243df514d2224029d3c1e7fddb6aad4ad" + sha256 arm64_sonoma: "545fee6c6d65d01c1e766d4e05be633913634c4d765c3ee75778b483466a15bb" + sha256 sonoma: "fb7b142ff7f0d180df91c361a754d1e71a084c148b60069f6d5c3c7a8b3bdfe7" + sha256 cellar: :any_skip_relocation, arm64_linux: "142c7ea984a586a18e1c393045c5f548773a1e16e06e3a787c1ad65a35a26877" + sha256 cellar: :any_skip_relocation, x86_64_linux: "daf62d9a92e051fc32dd369bcdd1b1ec2ebb7231aeb86d6b94fed01c3e34dbbc" + end + + depends_on "pkgconf" => :build + depends_on "node" + + uses_from_macos "zlib" + + on_linux do + depends_on "glib" + depends_on "libsecret" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir[libexec/"bin/*"] + end + + test do + error = shell_output("#{bin}/vsce verify-pat 2>&1", 1) + assert_match "Extension manifest not found:", error + end +end diff --git a/Formula/v/vscli.rb b/Formula/v/vscli.rb new file mode 100644 index 0000000000000..45cf5d11ea499 --- /dev/null +++ b/Formula/v/vscli.rb @@ -0,0 +1,32 @@ +class Vscli < Formula + desc "CLI/TUI that launches VSCode projects, with a focus on dev containers" + homepage "https://github.com/michidk/vscli" + url "https://github.com/michidk/vscli/archive/refs/tags/v1.3.0.tar.gz" + sha256 "91384db69cf5b32af96178df79634d5707eaffaf3517a567e965d3c5a32f81fb" + license "MIT" + head "https://github.com/michidk/vscli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ad8559f49092dd0c2fe1cfddf33097f92cabebb86dec9757a9a9d0766adcf7f6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ccb604795d27bcc966a4aa2a33100b1162c808d2ec875a6e1420e8f879e1416" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "00054eac8e8afb076cb0fdca4d5ff2eef8523963bf88ccbbb8e2a79c438813ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8c0b3a54aa8f18e0e3bdf96941855a4641f73374e4c9c282c72b2aba9decb89" + sha256 cellar: :any_skip_relocation, sonoma: "367ff1a937fc6b20de3ac0f80feb8626e352bdb543ec0ac8958bd9e58a10d2c3" + sha256 cellar: :any_skip_relocation, ventura: "fa1962291453a1152836cd93461515b4eef44d9ae99c70de6f4f204836e7450d" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc5eee1bdaa04dd44a7e813abc87e406ec2186f9f638399efeb9fc34b9c08ca3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8e75d6e48da77d6493750ce4d02c5de079d684e62908f7d3db2219477a8c250" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/vscli --version") + + output = shell_output("#{bin}/vscli open --dry-run 2>&1", 1) + assert_match "No dev container found, opening on host system with Visual Studio Code...", output + end +end diff --git a/Formula/v/vscode-langservers-extracted.rb b/Formula/v/vscode-langservers-extracted.rb new file mode 100644 index 0000000000000..d22865f2b9f65 --- /dev/null +++ b/Formula/v/vscode-langservers-extracted.rb @@ -0,0 +1,43 @@ +class VscodeLangserversExtracted < Formula + desc "Language servers for HTML, CSS, JavaScript, and JSON extracted from vscode" + homepage "https://github.com/hrsh7th/vscode-langservers-extracted" + url "https://registry.npmjs.org/vscode-langservers-extracted/-/vscode-langservers-extracted-4.10.0.tgz" + sha256 "d6e2d090d09c4b91daa74e9e7462a3d3f244efb96aa5111004cfffa49d6dc9ef" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "1d95f2ff8fdf6fd36f817214ae5435cd51d0d6490a3e01e25780f8728d4c9999" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + %w[css eslint html json markdown].each do |lang| + Open3.popen3("#{bin}/vscode-#{lang}-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end + end +end diff --git a/Formula/v/vsd.rb b/Formula/v/vsd.rb new file mode 100644 index 0000000000000..82ec01adaad88 --- /dev/null +++ b/Formula/v/vsd.rb @@ -0,0 +1,53 @@ +class Vsd < Formula + desc "Download video streams over HTTP, DASH (.mpd), and HLS (.m3u8)" + homepage "https://github.com/clitic/vsd" + url "https://github.com/clitic/vsd/archive/refs/tags/vsd-0.4.3.tar.gz" + sha256 "a50a7e749693dc38c48d8ea64178da8c513895f381f6c8a2516925c7442a7bfc" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a6afb8eff7a7b62ee6b5c4d500f621c407afa66bf212fa4397fe8af7aa4ee87f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8abaffcc19f3666772c38792b46a2371e945e0eaf5941ebbaa754437d39f318c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5da1799a9df3a4d1e053aa31986682cc986327c729a4df782a4d7cecd9c62f47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e3f732f0b2d6b00d959aa08289ee2f1c4a98ed5c397796034d27c11a291fd116" + sha256 cellar: :any_skip_relocation, sonoma: "0a583dc975ea90844e8fa056cdcbccd99584fee50e59ae00d663cc4173457cb7" + sha256 cellar: :any_skip_relocation, ventura: "29d474e46b2c8a02689e43515f647a85782a9047ce1806722ee71a904092ed2a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9eb0ce725f4b3592b446e05387e2a5f159c4b1e3c2223154093843cfeb18169" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51be065f05066ab65664c99440369eeee9b629919fd635bef1e169849f0ce720" + end + + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + depends_on "ffmpeg" + + on_linux do + depends_on "openssl@3" + end + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + inreplace "vsd/Cargo.toml" do |s| + s.gsub! ", path = \"../mp4decrypt\"", "" + s.gsub! ", path = \"../vsd-mp4\"", "" + end + + system "cargo", "install", *std_cargo_args(path: "vsd") + end + + test do + test_url = "http://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8" + output = testpath/"sample.mp4" + + system bin/"vsd", "save", test_url, "-o", output + assert_path_exists output + assert_operator output.size, :>, 0 + end +end diff --git a/Formula/v/vsearch.rb b/Formula/v/vsearch.rb new file mode 100644 index 0000000000000..77a558b291435 --- /dev/null +++ b/Formula/v/vsearch.rb @@ -0,0 +1,37 @@ +class Vsearch < Formula + desc "Versatile open-source tool for microbiome analysis" + homepage "https://github.com/torognes/vsearch" + url "https://github.com/torognes/vsearch/archive/refs/tags/v2.30.1.tar.gz" + sha256 "f65f03538a77cd1212bd04a52bb722114765329e64bd35e10ee2aefcd81137fe" + license any_of: ["BSD-2-Clause", "GPL-3.0-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "682936d6b9438e348ef258c1bf8f07655adc069ade788e4020c95f12daac9856" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe13b0567e0c4989c5173b8f66713d4ce6fc601537c60f8c39e591ce344f7eac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e106dba1bba6f22d5f1e605ec0165c9a04dbaa90a4c643ef5a33d6451f02c68c" + sha256 cellar: :any_skip_relocation, sonoma: "450c6c560f6489c74b918f2f8bd1f7ee07c2ec976221edf9612bf5bccfb6a11c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a22293bacfa967390daebf320e8a092430f3865aec1f829aecd1021bfe80636b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ed4b1ae0fab3422a3af92e277066246b517a2a920f86038e4eac25c3fa3ec6d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + system bin/"vsearch", "--rereplicate", "test.fasta", "--output", "output.txt" + assert_path_exists testpath/"output.txt" + end +end diff --git a/Formula/v/vsftpd.rb b/Formula/v/vsftpd.rb new file mode 100644 index 0000000000000..17463793d2885 --- /dev/null +++ b/Formula/v/vsftpd.rb @@ -0,0 +1,84 @@ +class Vsftpd < Formula + desc "Secure FTP server for UNIX" + homepage "https://security.appspot.com/vsftpd.html" + url "https://security.appspot.com/downloads/vsftpd-3.0.5.tar.gz" + mirror "https://fossies.org/linux/misc/vsftpd-3.0.5.tar.gz" + sha256 "26b602ae454b0ba6d99ef44a09b6b9e0dfa7f67228106736df1f278c70bc91d3" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?vsftpd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "01dbfae43456eddf9dda1082d584faffbc1375610626a5b2c6229ae3fdbd13f2" + sha256 arm64_sequoia: "d878a9c0483cf81228a5301cf5768e613271d731fbf2affa778a475bcea57a09" + sha256 arm64_sonoma: "7547e5fa4936a51a84b4e016545b8088199e1f92fc7299f8619b6b3f5b7ba5bf" + sha256 arm64_ventura: "7e015b54e1995a19395d9802116f3f7d0895818260c1aeddd793ca2b2da806aa" + sha256 sonoma: "63fafab3ad2cc9aa1c22643d6b923292a58b0872abbc774fb028b0d79f3febe6" + sha256 ventura: "ac39611af47fe2cb0fa24462a75d835016c9edca1a5904ee112886e223fcc0b8" + sha256 arm64_linux: "a7e48ecdd12b194050395cc3532a82bcc3724a4d19d0f5e43cb0cc62723f3440" + sha256 x86_64_linux: "4443fcbe19aa4dd49e55a9c5fcd7e3c069a07320a4c86b9d252c4020ba7614ee" + end + + uses_from_macos "perl" => :build + + on_linux do + depends_on "libcap" + depends_on "linux-pam" + end + + # Patch to remove UTMPX dependency, locate macOS's PAM library, and + # remove incompatible LDFLAGS. (reported to developer via email) + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/vsftpd/3.0.3.patch" + sha256 "c158fac428e06e16219e332c3897c3f730586e55d0ef3a670ed3c716e3de5371" + end + + # Patch to disable all calls to setrlimit, as macOS, starting from + # Monterey does not support this syscall. (reported to developer via + # GitHub) + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/vsftpd/3.0.5.patch" + sha256 "95afc3bc00dd6cc37a2c64b19b1e7e30951ec022f839dbab1773b7716966b9cf" + end + + def install + inreplace "defs.h", "/etc/vsftpd.conf", "#{etc}/vsftpd.conf" + inreplace "tunables.c", "/etc", etc + inreplace "tunables.c", "/var", var + + args = OS.linux? ? ["LIBS=-lcap -lpam"] : [] + system "make", *args + + # make install has all the paths hardcoded; this is easier: + sbin.install "vsftpd" + etc.install "vsftpd.conf" + man5.install "vsftpd.conf.5" + man8.install "vsftpd.8" + end + + def caveats + <<~EOS + To use chroot, vsftpd requires root privileges, so you will need to run + `sudo vsftpd`. + You should be certain that you trust any software you grant root privileges. + + The vsftpd.conf file must be owned by root or vsftpd will refuse to start: + sudo chown root #{HOMEBREW_PREFIX}/etc/vsftpd.conf + EOS + end + + service do + run [opt_sbin/"vsftpd", etc/"vsftpd.conf"] + require_root true + end + + test do + assert_match version.to_s, shell_output("#{sbin}/vsftpd -v 0>&1") + end +end diff --git a/Formula/v/vsh.rb b/Formula/v/vsh.rb new file mode 100644 index 0000000000000..a146d3d1ab219 --- /dev/null +++ b/Formula/v/vsh.rb @@ -0,0 +1,32 @@ +class Vsh < Formula + desc "HashiCorp Vault interactive shell" + homepage "https://github.com/fishi0x01/vsh" + url "https://github.com/fishi0x01/vsh/archive/refs/tags/v0.14.0.tar.gz" + sha256 "cf9350c3adb5cd0df031f3f44e58f040300dd8e3ad798f6c1583dc6902f7935f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4b7a734a15409fb61ec222ec5716e9f6969e02fb46b517fe61dda4e1df48f656" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f8b53244f2ef6156f7b8bc917c9ecd86baca799a2ea791415ce2f9b84e825e2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f8b53244f2ef6156f7b8bc917c9ecd86baca799a2ea791415ce2f9b84e825e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f8b53244f2ef6156f7b8bc917c9ecd86baca799a2ea791415ce2f9b84e825e2" + sha256 cellar: :any_skip_relocation, sonoma: "d5909bc9d4463dce38dabfa0238cd0dae7a60c451d9ce83cdde4350aca6cc43c" + sha256 cellar: :any_skip_relocation, ventura: "d5909bc9d4463dce38dabfa0238cd0dae7a60c451d9ce83cdde4350aca6cc43c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1840008cbb5e34dc3de6f5ad429ee45dc1ad00ba537d3999a65de0f623e3fe88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "efcf0ec78b552d792483b5f77b6e6bd69bdb1dc02ab8221d2acf8a4662ed933b" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.vshVersion=v#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + version_output = shell_output("#{bin}/vsh --version") + assert_match version.to_s, version_output + error_output = shell_output("#{bin}/vsh -c ls 2>&1", 1) + assert_match "Error initializing vault client | Is VAULT_ADDR properly set?", error_output + end +end diff --git a/Formula/v/vstr.rb b/Formula/v/vstr.rb new file mode 100644 index 0000000000000..0f0e5549d3b96 --- /dev/null +++ b/Formula/v/vstr.rb @@ -0,0 +1,95 @@ +class Vstr < Formula + desc "C string library" + homepage "http://www.and.org/vstr/" + url "http://www.and.org/vstr/1.0.15/vstr-1.0.15.tar.bz2" + sha256 "d33bcdd48504ddd21c0d53e4c2ac187ff6f0190d04305e5fe32f685cee6db640" + license "LGPL-2.1-or-later" + + livecheck do + url "http://www.and.org/vstr/latest/" + regex(/href=.*?vstr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2725b8c09c36af9b495587022630130f5561972343fa3d91bba4de2773f7c76e" + sha256 cellar: :any, arm64_sequoia: "578ee5248bf780a885cfc3dc8a806949ded7af743c3be7e7c839fe4d190a43cd" + sha256 cellar: :any, arm64_sonoma: "54ad15b7c3afd4dadfe4f48c8da91b39efc16d597b9f7300dc67aab5c3f75a40" + sha256 cellar: :any, arm64_ventura: "50f3aa1e3a2842093e6ce37468ff013c81ca97b948fb3d7b11f66c58b95f108b" + sha256 cellar: :any, arm64_monterey: "dd5f9608d327370e2be19fa4c7aaa756db7b505a192dab7ebeedf413e379f53d" + sha256 cellar: :any, arm64_big_sur: "3c181dc7e473ded8e40136b7779a8e24859bbef80a60e627fb3a2672e43609cb" + sha256 cellar: :any, sonoma: "e8a6083d5029f10cde668b105012a8302eafcdde1d497ea92d6af9fcbb14a33f" + sha256 cellar: :any, ventura: "dfb9e211db08192d08eb31c1928a9664f102662bf97324dff1e8e2a1616882c3" + sha256 cellar: :any, monterey: "029df7c0188636bd34fdb8f2a26697f61cc140660623992ee38af2e1050417c5" + sha256 cellar: :any, big_sur: "cc1c69c834bde35ed9e0df8178e8e65d9ba5703fbf2cf896290aed6a7433c4b3" + sha256 cellar: :any, catalina: "adbf13e88473af357032472ac09af1230667c5010089089a3c223819ef74c7f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7507e113107828ddec905dfb3c2b373d11f676800cc342fdf080a12038df960" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8346f2277202db06584db705dcf754a00ca364c547791d911e7c3395072b1b6e" + end + + depends_on "pkgconf" => :build + + # Fix flat namespace usage on macOS. + patch :DATA + + def install + ENV.append "CFLAGS", "--std=gnu89" + ENV["ac_cv_func_stat64"] = "no" if OS.mac? && Hardware::CPU.arm? + + args = ["--mandir=#{man}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + // based on http://www.and.org/vstr/examples/ex_hello_world.c + #define VSTR_COMPILE_INCLUDE 1 + #include + #include + #include + #include + + int main(void) { + Vstr_base *s1 = NULL; + + if (!vstr_init()) + err(EXIT_FAILURE, "init"); + + if (!(s1 = vstr_dup_cstr_buf(NULL, "Hello Homebrew\\n"))) + err(EXIT_FAILURE, "Create string"); + + while (s1->len) + if (!vstr_sc_write_fd(s1, 1, s1->len, STDOUT_FILENO, NULL)) { + if ((errno != EAGAIN) && (errno != EINTR)) + err(EXIT_FAILURE, "write"); + } + + vstr_free_base(s1); + vstr_exit(); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lvstr", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/configure b/configure +index 84b6b1b..ffa2faf 100755 +--- a/configure ++++ b/configure +@@ -8313,7 +8313,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then +- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ++ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) diff --git a/Formula/v/vtable-dumper.rb b/Formula/v/vtable-dumper.rb new file mode 100644 index 0000000000000..ab99b8405dced --- /dev/null +++ b/Formula/v/vtable-dumper.rb @@ -0,0 +1,27 @@ +class VtableDumper < Formula + desc "List contents of virtual tables in a shared library" + homepage "https://github.com/lvc/vtable-dumper" + url "https://github.com/lvc/vtable-dumper/archive/refs/tags/1.2.tar.gz" + sha256 "6993781b6a00936fc5f76dc0db4c410acb46b6d6e9836ddbe2e3c525c6dd1fd2" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "e6eb8224c4c4acb7c276d913a9e83c650c8c12e574e164846430253b4e53a17f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b5ec9a7807288402bd3bcffb73137bdbd02c303f2d9aa085d4c93e0f7b45727" + end + + depends_on "elfutils" + depends_on :linux + + def install + system "make", "prefix=#{prefix}", "install" + end + + test do + libstdcxx = Pathname.glob("/usr/**/libstdc++.so.6").first + assert_match(/: \d+ entries/, shell_output("#{bin}/vtable-dumper #{libstdcxx}")) + end +end diff --git a/Formula/v/vtclock.rb b/Formula/v/vtclock.rb new file mode 100644 index 0000000000000..56edcf44eb779 --- /dev/null +++ b/Formula/v/vtclock.rb @@ -0,0 +1,39 @@ +class Vtclock < Formula + desc "Text-mode fullscreen digital clock" + homepage "https://github.com/dse/vtclock" + url "https://github.com/dse/vtclock/archive/refs/tags/v0.99.1.tar.gz" + sha256 "72ce681381ade2442542f2d133eee39eaa1de7f75c11102e31182402c2fe6e23" + license "GPL-2.0-or-later" + version_scheme 1 + head "https://github.com/dse/vtclock.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9bc71b0b4a7fc2c216cb72ddf9111be288923ddbe3ce612fba3b5900714d8edc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8251c5182970bebfed0812e9653332dd8f414eb949f5c447a99d43063834301d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1cd6bcab5a2c2dde71190c91cc5758564b741aa04b5947f864d1fba6aed6a743" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89c6c0d99a0582e29faf08b44b05d8a9b69193facdb40ade4d98c4d22a798a2c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7c5819c67c24bab17b04730f1a9b8571333bd10cd880c9f5fa3d4fd9a41444cf" + sha256 cellar: :any_skip_relocation, sonoma: "33c363d3176a4db688176faf1e83d3fe8492fa2efb62361b9c1efef3104aab29" + sha256 cellar: :any_skip_relocation, ventura: "192f4a0d954282a6e38a1733c4cfea3c8d50ff06c752cbf1d8ec039240ba3c49" + sha256 cellar: :any_skip_relocation, monterey: "f10bddbdc44fb16506a386997ebbfc54641481f84538cb5c0ca7089291e951c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "393f3bbb5eaeb24e1893ea7e71738dc0095d68b28cbbbab6a71cb8ec18aa1492" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8aaffb5793d37cea515c7e1c1d428225dcd58cb898d088f1113fadb76b9fd0e7" + end + + depends_on "pkgconf" => :build + uses_from_macos "ncurses" + + def install + system "make" + bin.install "vtclock" + end + + test do + system bin/"vtclock", "-h" + end +end diff --git a/Formula/v/vtcode.rb b/Formula/v/vtcode.rb new file mode 100644 index 0000000000000..e1b6928ddf2e0 --- /dev/null +++ b/Formula/v/vtcode.rb @@ -0,0 +1,37 @@ +class Vtcode < Formula + desc "CLI Semantic Coding Agent" + homepage "https://github.com/vinhnx/vtcode" + url "https://static.crates.io/crates/vtcode/vtcode-0.39.13.crate" + sha256 "93d1894ccd74cdef313ae2c52b1e0be102b0a5c1335645b59ee69225469e787a" + license "MIT" + head "https://github.com/vinhnx/vtcode.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "53319b5b26171718d551f89fc256c4871121d0771d884febffd6fbbc4288f017" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ff8dda783ef735e6c8ba444b319b60b1e297f812c5b680f947780325643757c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8ed16c09ccca889e0a86d2823c4245bb82574abf65b18dd42bf1a77ccf300249" + sha256 cellar: :any_skip_relocation, sonoma: "41b661cebe6b49ddb5a4d454fe00cf4650b78eb4cb847663c08efad6c62239a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "78446007f8c6e14588eebc97aa00e9d40ddbe2daa84628b36d7ecde7c50d0cac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4700c54e78bbabc3596ff7f0ca8b00219799ae5131711e68c69329b6542cffc" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/vtcode --version") + + output = shell_output("#{bin}/vtcode init 2>&1", 1) + assert_match "No API key found for OpenAI provider", output + end +end diff --git a/Formula/v/vte3.rb b/Formula/v/vte3.rb new file mode 100644 index 0000000000000..6ca29af4eccd7 --- /dev/null +++ b/Formula/v/vte3.rb @@ -0,0 +1,96 @@ +class Vte3 < Formula + desc "Terminal emulator widget used by GNOME terminal" + homepage "https://wiki.gnome.org/Apps/Terminal/VTE" + url "https://download.gnome.org/sources/vte/0.82/vte-0.82.1.tar.xz" + sha256 "79376d70402d271e2d38424418e1aea72357934d272e321e3906b71706a78e3a" + license "LGPL-2.0-or-later" + revision 1 + + bottle do + sha256 arm64_tahoe: "2cf4efdd5e0ab05af005d315fd99f27b661f38e6c50e3d8a6d5e6fea85af7fb6" + sha256 arm64_sequoia: "b6c9498e25e03bb684afeab9cbd05f6833c643d242a118ea571afe379b109c62" + sha256 arm64_sonoma: "161ae16255d4a3d53a375f7b237c62b9315680866342a3275ac39a361c1ba909" + sha256 sonoma: "71e78b975afa1c28ea53b458b4736d29def5bd29d94775c71f033cd49c1d3aa0" + sha256 arm64_linux: "24f3810564f8bb1da1c3b13c1bdcce39472c6dffef86b3053565707d688d13b8" + sha256 x86_64_linux: "955ff19c2f4f6618f8afa72e564a45ff89f13c3cca7b989edf4562e42c716000" + end + + depends_on "fast_float" => :build + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "fribidi" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gnutls" + depends_on "graphene" + depends_on "gtk+3" + depends_on "gtk4" + depends_on "icu4c@77" + depends_on "lz4" + depends_on "pango" + depends_on "pcre2" + depends_on "simdutf" + + uses_from_macos "python" => :build + + on_macos do + depends_on "gettext" + end + + on_ventura :or_older do + depends_on "llvm" => :build + + fails_with :clang do + cause "error: 'to_chars' is unavailable: introduced in macOS 13.3" + end + end + + on_linux do + depends_on "systemd" + end + + # https://en.cppreference.com/w/cpp/compiler_support/23.html#cpp_lib_string_resize_and_overwrite_202110L + fails_with :gcc do + version "11" + cause "Requires C++23 basic_string::resize_and_overwrite()" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + system "meson", "setup", "build", "-Dgir=true", + "-Dgtk3=true", + "-Dgtk4=true", + "-Dgnutls=true", + "-Dvapi=true", + "-D_b_symbolic_functions=false", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + guint v = vte_get_major_version(); + return 0; + } + C + flags = shell_output("pkgconf --cflags --libs vte-2.91").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + + flags = shell_output("pkgconf --cflags --libs vte-2.91-gtk4").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/v/vtk.rb b/Formula/v/vtk.rb new file mode 100644 index 0000000000000..249fae19f2b32 --- /dev/null +++ b/Formula/v/vtk.rb @@ -0,0 +1,159 @@ +class Vtk < Formula + desc "Toolkit for 3D computer graphics, image processing, and visualization" + homepage "https://www.vtk.org/" + url "https://www.vtk.org/files/release/9.5/VTK-9.5.2.tar.gz" + sha256 "cee64b98d270ff7302daf1ef13458dff5d5ac1ecb45d47723835f7f7d562c989" + license "BSD-3-Clause" + head "https://gitlab.kitware.com/vtk/vtk.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "eaeffd8adfb0d751affbca472ad5262eb8080cd69a93fba419eea65e4c284e04" + sha256 cellar: :any, arm64_sequoia: "c00bd8996fdeafbc88512f222086aa450f1f337a4032896b0578af4ce1e50d3f" + sha256 cellar: :any, arm64_sonoma: "2a1607f21b1e98cd23b1ea45bc776d66b1b05387ee7c59f89180f9b10b4fcac9" + sha256 cellar: :any, sonoma: "f7021fd6e91f4ce36d1b13e5deeda31de64b75781deb00e6486079f5c466c980" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad44c6d5d2195f8cfa98c4e73d8445e939a8e2e70e5534c38f2259f495da05a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73692fd4d3b2f8ac3ef7c57c904d2881f007c448f7407606215ebdd8f5da60cf" + end + + depends_on "cmake" => [:build, :test] + depends_on "pyqt" => :test + depends_on "boost" + depends_on "cgns" + depends_on "double-conversion" + depends_on "eigen" + depends_on "fontconfig" + depends_on "freetype" + depends_on "hdf5" + depends_on "jpeg-turbo" + depends_on "jsoncpp" + depends_on "libharu" + depends_on "libogg" + depends_on "libpng" + depends_on "libtiff" + depends_on "lz4" + depends_on "netcdf" + depends_on "nlohmann-json" + depends_on "proj" + depends_on "pugixml" + depends_on "python@3.14" + depends_on "qtbase" + depends_on "qtdeclarative" + depends_on "sqlite" + depends_on "theora" + depends_on "utf8cpp" + depends_on "xz" + + uses_from_macos "expat" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_linux do + depends_on "gl2ps" + depends_on "libx11" + depends_on "libxcursor" + depends_on "mesa" + end + + def install + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + if OS.mac? && MacOS.version < :sequoia + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + + python = "python3.14" + qml_plugin_dir = lib/"qml/VTK.#{version.major_minor}" + vtkmodules_dir = prefix/Language::Python.site_packages(python)/"vtkmodules" + rpaths = [rpath, rpath(source: qml_plugin_dir), rpath(source: vtkmodules_dir)] + + args = %W[ + -DBUILD_SHARED_LIBS:BOOL=ON + -DCMAKE_INSTALL_RPATH:STRING=#{rpaths.join(";")} + -DCMAKE_DISABLE_FIND_PACKAGE_ICU:BOOL=ON + -DCMAKE_CXX_STANDARD=14 + -DVTK_IGNORE_CMAKE_CXX11_CHECKS=ON + -DVTK_WRAP_PYTHON:BOOL=ON + -DVTK_PYTHON_VERSION:STRING=3 + -DVTK_LEGACY_REMOVE:BOOL=ON + -DVTK_MODULE_ENABLE_VTK_InfovisBoost:STRING=YES + -DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms:STRING=YES + -DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig:STRING=YES + -DVTK_MODULE_USE_EXTERNAL_VTK_cgns:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_eigen:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_expat:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_freetype:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_hdf5:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_jpeg:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_libharu:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_libproj:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_libxml2:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_lz4:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_lzma:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_netcdf:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_nlohmannjson:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_ogg:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_png:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_pugixml:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_sqlite:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_theora:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_tiff:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_utf8:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_zlib:BOOL=ON + -DPython3_EXECUTABLE:FILEPATH=#{which(python)} + -DVTK_GROUP_ENABLE_Qt:STRING=YES + -DVTK_QT_VERSION:STRING=6 + ] + # External gl2ps causes failure linking to macOS OpenGL.framework + args << "-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=ON" unless OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + vtk_dir = lib/"cmake/vtk-#{version.major_minor}" + vtk_cmake_module = vtk_dir/"VTK-vtk-module-find-packages.cmake" + assert_match Formula["boost"].version.major_minor_patch.to_s, vtk_cmake_module.read, + "VTK needs to be rebuilt against Boost!" + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 4.0 FATAL_ERROR) + project(Distance2BetweenPoints LANGUAGES CXX) + find_package(VTK REQUIRED COMPONENTS vtkCommonCore CONFIG) + add_executable(Distance2BetweenPoints Distance2BetweenPoints.cxx) + target_link_libraries(Distance2BetweenPoints PRIVATE ${VTK_LIBRARIES}) + CMAKE + + (testpath/"Distance2BetweenPoints.cxx").write <<~CPP + #include + #include + int main() { + double p0[3] = {0.0, 0.0, 0.0}; + double p1[3] = {1.0, 1.0, 1.0}; + assert(vtkMath::Distance2BetweenPoints(p0, p1) == 3.0); + return 0; + } + CPP + + system "cmake", ".", "-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DVTK_DIR=#{vtk_dir}" + system "make" + system "./Distance2BetweenPoints" + + (testpath/"Distance2BetweenPoints.py").write <<~PYTHON + import vtk + p0 = (0, 0, 0) + p1 = (1, 1, 1) + assert vtk.vtkMath.Distance2BetweenPoints(p0, p1) == 3 + PYTHON + + system bin/"vtkpython", "Distance2BetweenPoints.py" + system bin/"vtkpython", "-c", "from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor" + end +end diff --git a/Formula/v/vttest.rb b/Formula/v/vttest.rb new file mode 100644 index 0000000000000..a78ddbfa2e925 --- /dev/null +++ b/Formula/v/vttest.rb @@ -0,0 +1,35 @@ +class Vttest < Formula + desc "Test compatibility of VT100-compatible terminals" + homepage "https://invisible-island.net/vttest/" + url "https://invisible-mirror.net/archives/vttest/vttest-20241208.tgz" + sha256 "8fee3bac7e87d4aa4a217bd2b38ab9910c3b8cf9a605b450c76ccc0ad2a6519d" + license "BSD-3-Clause" + + livecheck do + url "https://invisible-mirror.net/archives/vttest/" + regex(/href=.*?vttest[._-]v?(\d+(?:[.-]\d+)*)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a4a0aeb7d6b51f67003a4c244abed71bd83ec1ad5cd074cb3ccfd2d1fbef1301" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c0bf421235c658ec8217bcb7a68799df68c5f060b05940bb20f97e7fb43a7b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7cdb02a9f59bf22b59a6efb440d27427e380fb411d7408b2cece68856c120ca8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5ce70a33f514b64a73dd2012c56b0654a599cae4df45d7987f76ae50f6c84a6c" + sha256 cellar: :any_skip_relocation, sonoma: "f6297dcf4f42e03066edf5ecf2440a4c40e19a63a57f3dd1857600adeb29422c" + sha256 cellar: :any_skip_relocation, ventura: "1fa08429b674d918c8e3c4f68c070228f155fce751bfde191875b65f34a455de" + sha256 cellar: :any_skip_relocation, arm64_linux: "a961a2d59fc8e50c696c22fa6b129751d3c8eefbff8778abd51f6c67597d31ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0e0ebc43609027dc1615b1b71dd18f1d4a7e662cee41e3cd57ea480130f5205" + end + + def install + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/vttest -V") + end +end diff --git a/Formula/v/vue-cli.rb b/Formula/v/vue-cli.rb new file mode 100644 index 0000000000000..87467d715f439 --- /dev/null +++ b/Formula/v/vue-cli.rb @@ -0,0 +1,59 @@ +class VueCli < Formula + desc "Standard Tooling for Vue.js Development" + homepage "https://cli.vuejs.org/" + url "https://registry.npmjs.org/@vue/cli/-/cli-5.0.8.tgz" + sha256 "29aa4eb0ba827624e42683e1339ebd40e663ad09836dd027df30e3d2108b0b71" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "99415c2c2a9d3487c7bd190b79d63434126556c6afa2ccf482e618b52b071c7e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b72fda6c0563cd941f67f7fcff7ce0562af8f248188775a0409c7c26e23a2fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c106882fcbc2627f6939d21aa711c75b8781a49a846b0a2c64a3a48d230f1bd6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c106882fcbc2627f6939d21aa711c75b8781a49a846b0a2c64a3a48d230f1bd6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c106882fcbc2627f6939d21aa711c75b8781a49a846b0a2c64a3a48d230f1bd6" + sha256 cellar: :any_skip_relocation, sonoma: "566e867488804efc1ff36499d3abaf6d5d20bae6173f8577f54f8d50b120b6e2" + sha256 cellar: :any_skip_relocation, ventura: "566e867488804efc1ff36499d3abaf6d5d20bae6173f8577f54f8d50b120b6e2" + sha256 cellar: :any_skip_relocation, monterey: "566e867488804efc1ff36499d3abaf6d5d20bae6173f8577f54f8d50b120b6e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f08dc625a000e5e23fb2ee9286233e8b9e2d3893cb091280423d3276919beba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f068d7c069a1dae0ecbba18a4537d4816d55d6357ff9feb4806923ee486e92e9" + end + + deprecate! date: "2024-12-22", because: :deprecated_upstream + + depends_on "node" + + on_macos do + depends_on "terminal-notifier" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Remove vendored pre-built binary `terminal-notifier` + node_notifier_vendor_dir = libexec/"lib/node_modules/@vue/cli/node_modules/node-notifier/vendor" + rm_r(node_notifier_vendor_dir) # remove vendored pre-built binaries + + if OS.mac? + terminal_notifier_dir = node_notifier_vendor_dir/"mac.noindex" + terminal_notifier_dir.mkpath + + # replace vendored `terminal-notifier` with our own + terminal_notifier_app = Formula["terminal-notifier"].opt_prefix/"terminal-notifier.app" + ln_sf terminal_notifier_app.relative_path_from(terminal_notifier_dir), terminal_notifier_dir + end + end + + test do + (testpath/".vuerc").write <<~JSON + { + "useTaobaoRegistry": false, + "packageManager": "yarn" + } + JSON + + assert_match "yarn", shell_output("#{bin}/vue config") + assert_match "npm", shell_output("#{bin}/vue info") + end +end diff --git a/Formula/v/vue-language-server.rb b/Formula/v/vue-language-server.rb new file mode 100644 index 0000000000000..aa722c4301f50 --- /dev/null +++ b/Formula/v/vue-language-server.rb @@ -0,0 +1,45 @@ +class VueLanguageServer < Formula + desc "Vue.js language server" + homepage "https://github.com/vuejs/language-tools" + url "https://registry.npmjs.org/@vue/language-server/-/language-server-3.1.3.tgz" + sha256 "7eb9c6a9360875757dc3f4b94be304e11a44627dd2cecbe947a0f8308064821e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "aa68f76ce9c6bfee24fd64b89fcce3f9dfdb6788a1930f5e5574d578d982f02c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f1deba4bc5f23b4d91fcf182371589c609f51eb8fd75816d65b9030aca59869" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae0c559d5c98edf408894aa05084a221683061b91909bd02da0756027ee2d0df" + sha256 cellar: :any_skip_relocation, sonoma: "7ff73b82c0b4466cc1c40b3fd8546db9748fdf827fa597779db02c9d31fccfd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d717ee1879dfbe697baee20a5a46d9107663c148bd396dc6f34d3a7f8423330" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19174c114c6fb1d80e2d7835d275375effc8e1b3df0ef487a167aeb187158611" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"vue-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/v/vulkan-extensionlayer.rb b/Formula/v/vulkan-extensionlayer.rb new file mode 100644 index 0000000000000..c3bff3a5b71d8 --- /dev/null +++ b/Formula/v/vulkan-extensionlayer.rb @@ -0,0 +1,73 @@ +class VulkanExtensionlayer < Formula + desc "Layer providing Vulkan features when native support is unavailable" + homepage "https://github.com/KhronosGroup/Vulkan-ExtensionLayer" + url "https://github.com/KhronosGroup/Vulkan-ExtensionLayer/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "cf460018911ded2e5e8a63328b3d344e015e046767e258e953f7167b0d5d295c" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-ExtensionLayer.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0275f83711730c2fc0eb296824891aa95d95d01eb7c7e96b2a4ec042ee90fe04" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3072e883fa50073e48b456b0f26a60276f9b9bb82f8a3ac4d60c40557e238be2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e75ce97277bb396537ae0a29dd792498485bd000a7b647ff861bc4d31b823e98" + sha256 cellar: :any_skip_relocation, sonoma: "4c8be820732306a8d0835675fc7fedfc0ff242f8a74f1b5ae2a0b9f20bc49a04" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ea475ce351d93ca654fde7e244e1603b259c805038846f3e151568ac750e13c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12297ca0e27ecd83b8f08bac219b6b07d04d9b9a12adad46c73e6bc00c5c7a1a" + end + + depends_on "cmake" => :build + depends_on "vulkan-loader" => :test + depends_on "vulkan-tools" => :test + depends_on "glslang" + depends_on "spirv-headers" + depends_on "spirv-tools" + depends_on "vulkan-headers" + depends_on "vulkan-utility-libraries" + + on_linux do + depends_on "libxcb" => :build + depends_on "libxrandr" => :build + depends_on "mesa" => :build + depends_on "pkgconf" => :build + depends_on "wayland" => :build + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_TESTS=OFF", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + "-DGLSLANG_INSTALL_DIR=#{Formula["glslang"].prefix}", + "-DSPIRV_HEADERS_INSTALL_DIR=#{Formula["spirv-headers"].prefix}", + "-DSPIRV_TOOLS_INSTALL_DIR=#{Formula["spirv-tools"].prefix}", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].prefix}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + In order to use these layers in a Vulkan application, you may need to place them in the environment with + export VK_LAYER_PATH=#{opt_share}/vulkan/explicit_layer.d + EOS + end + + test do + ENV.prepend_path "VK_LAYER_PATH", share/"vulkan/explicit_layer.d" + ENV["VK_ICD_FILENAMES"] = Formula["vulkan-tools"].lib/"mock_icd/VkICD_mock_icd.json" + ENV["VK_MEMORY_DECOMPRESSION_FORCE_ENABLE"]="true" + ENV["VK_SHADER_OBJECT_FORCE_ENABLE"]="true" + ENV["VK_VK_SYNCHRONIZATION2_FORCE_ENABLE"]="true" + + actual = shell_output("vulkaninfo") + %w[VK_EXT_shader_object VK_KHR_synchronization2 VK_KHR_timeline_semaphore + VK_NV_memory_decompression].each do |expected| + assert_match expected, actual + end + end +end diff --git a/Formula/v/vulkan-headers.rb b/Formula/v/vulkan-headers.rb new file mode 100644 index 0000000000000..322b6fbbaa396 --- /dev/null +++ b/Formula/v/vulkan-headers.rb @@ -0,0 +1,38 @@ +class VulkanHeaders < Formula + desc "Vulkan Header files and API registry" + homepage "https://github.com/KhronosGroup/Vulkan-Headers" + url "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "c465aa56757e7746ac707f582b6e2d51546569a4a2488c1172fb543aa5fdfc2c" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Headers.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "39e7f6c6ae8d8e0523c3fd7aaa8892d40bd152752acc7086e5f4949ba289f44c" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + printf("vulkan version %d", VK_VERSION_1_0); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test" + system "./test" + end +end diff --git a/Formula/v/vulkan-loader.rb b/Formula/v/vulkan-loader.rb new file mode 100644 index 0000000000000..5a4ef46c16721 --- /dev/null +++ b/Formula/v/vulkan-loader.rb @@ -0,0 +1,61 @@ +class VulkanLoader < Formula + desc "Vulkan ICD Loader" + homepage "https://github.com/KhronosGroup/Vulkan-Loader" + url "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "65a2a063a8a33ff298848bb1e70deff8499f1ea8aa486feaa8b2f507d8e9989d" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Loader.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "82386db4f3ceedd82ec27991ea9cbb16c899101027a5f494612762aeafa044db" + sha256 arm64_sequoia: "320f7371be1199e8188b680a5103ee449b9eb67e5e5072dd0874fa47ac6b7788" + sha256 arm64_sonoma: "97c25212bafe90fa308fa3d0c2e1e964eb599a3f1e51226f98ca733283d2ca7a" + sha256 cellar: :any, tahoe: "0d8b2c11565f9aa2b9b2fffeb78f16de1a87e625d01f7918835ea89e66532fb3" + sha256 cellar: :any, sequoia: "6277127f41c357628e526d438225de39a9959422676fa0b3fadaf16344a71be9" + sha256 cellar: :any, sonoma: "9118bc3d24a7f6bbe45f715404a9e2f151568eee2ffe7108cc274f23cb7c652c" + sha256 arm64_linux: "aeee57bdcd8a82e159fbc89f44f1764a1b13866f6b69ab76fe5024fcba6b0958" + sha256 x86_64_linux: "ea4f729e108aa515ed49b2f696f38ec09c0771932b753da5b75832769a170dd4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "vulkan-headers" + + on_linux do + depends_on "libxrandr" => :build + depends_on "libx11" + depends_on "libxcb" + depends_on "wayland" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].prefix}", + "-DCMAKE_INSTALL_INCLUDEDIR=#{Formula["vulkan-headers"].include}", + "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", + "-DFALLBACK_CONFIG_DIRS=#{etc}/xdg:/etc/xdg", + "-DFALLBACK_DATA_DIRS=#{HOMEBREW_PREFIX}/share:/usr/local/share:/usr/share", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + uint32_t version; + vkEnumerateInstanceVersion(&version); + return (version >= VK_API_VERSION_1_1) ? 0 : 1; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{Formula["vulkan-headers"].opt_include}", + "-L#{lib}", "-lvulkan" + system "./test" + end +end diff --git a/Formula/v/vulkan-profiles.rb b/Formula/v/vulkan-profiles.rb new file mode 100644 index 0000000000000..a32d4c4c35de0 --- /dev/null +++ b/Formula/v/vulkan-profiles.rb @@ -0,0 +1,83 @@ +class VulkanProfiles < Formula + desc "Tools for Vulkan profiles" + homepage "https://github.com/KhronosGroup/Vulkan-Profiles" + url "https://github.com/KhronosGroup/Vulkan-Profiles/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "7ee96a046e5b39fc7a14ee9f24f583e5b1a6605c07bbb1dcd5430d5a274c34f1" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Profiles.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "01e8ba7b73ff7955de21717d29ce432c60a146c75a3158bed60330d40f1bce4e" + sha256 cellar: :any, arm64_sequoia: "c1e76678b0d75e433476d40b663247d6ad4f998f01daad8bc0017ea883e57ae0" + sha256 cellar: :any, arm64_sonoma: "525b848e0ee206d52751f8604bf17d67dbd8e7b2091069a03f3e6290bd50b8fc" + sha256 cellar: :any, sonoma: "7985cd12be7e5df54485adf807242b65a7f0eb639cf64471004ff89ba7679d20" + sha256 cellar: :any_skip_relocation, arm64_linux: "2daf5369e75a414af600883379c0971d94d941b4eb3abf8fb09cf59cdd419ed7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8c57221568ff40fdef0164487f992b4f9a1db0f53794ee6b576b2af7dd208d1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "vulkan-tools" => :test + depends_on "jsoncpp" + depends_on "valijson" + depends_on "vulkan-headers" + depends_on "vulkan-loader" + depends_on "vulkan-utility-libraries" + + uses_from_macos "python" => :build + + on_macos do + depends_on "molten-vk" => :test + end + + on_linux do + depends_on "mesa" => :test + end + + def install + # fix dependency on no-longer-existing CMake files for jsoncpp + inreplace "CMakeLists.txt", + "find_package(jsoncpp REQUIRED CONFIG)", + "find_package(PkgConfig REQUIRED QUIET)\npkg_search_module(jsoncpp REQUIRED jsoncpp)" + inreplace "layer/CMakeLists.txt", "jsoncpp_static", "jsoncpp" + inreplace "profiles/test/CMakeLists.txt", "jsoncpp_static", "jsoncpp" + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + "-DPython3_EXECUTABLE=#{which("python3")}", + "-DVALIJSON_INSTALL_DIR=#{Formula["valijson"].prefix}", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].prefix}", + "-DVULKAN_LOADER_INSTALL_DIR=#{Formula["vulkan-loader"].prefix}", + "-DVULKAN_UTILITY_LIBRARIES_INSTALL_DIR=#{Formula["vulkan-utility-libraries"].prefix}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + In order to use the provided layer in a Vulkan application, you may need to place it in the environment with + export VK_LAYER_PATH=#{opt_share}/vulkan/explicit_layer.d + EOS + end + + test do + # FIXME: when GitHub Actions Intel Mac runners support the use of Metal, + # remove this weakened version and conditional + if OS.mac? && Hardware::CPU.intel? + assert_path_exists share/"vulkan/explicit_layer.d/VkLayer_khronos_profiles.json" + else + ENV.prepend_path "VK_LAYER_PATH", share/"vulkan/explicit_layer.d" + + actual = shell_output("vulkaninfo") + %w[VK_EXT_layer_settings VK_EXT_tooling_info].each do |expected| + assert_match expected, actual + end + end + end +end diff --git a/Formula/v/vulkan-tools.rb b/Formula/v/vulkan-tools.rb new file mode 100644 index 0000000000000..c256558589292 --- /dev/null +++ b/Formula/v/vulkan-tools.rb @@ -0,0 +1,115 @@ +class VulkanTools < Formula + desc "Vulkan utilities and tools" + homepage "https://github.com/KhronosGroup/Vulkan-Tools" + url "https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "617e91b396ac771869d62cd131f05dcc0b82d038744dab7f575bcf213852f8bf" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Tools.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "e079b74dc2567dd9caf79a1f89330785766bee451674c4e48caac0fd3b77882b" + sha256 arm64_sequoia: "921563dd293ce0efcfae733634ad8fef0730d502689cfe204852b5e67e81920a" + sha256 arm64_sonoma: "246ce100577c4fe6d65ea969488b5011557cbadcfec3562cd2b22eca40d6fb98" + sha256 cellar: :any, sonoma: "df9cf294d5a387539ca41254529dcfc1eb24019ea48a5c443ed2e858e29e6066" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e4db1b7ae9f312bcaca4151c1809f104d33072513c2576f3342a142184f5919" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34f980af2c3cb0c031f3ad5b256f2f31b5e159d8a78b69f3d80d76e46b068caf" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on xcode: :build # for ibtool + depends_on "glslang" + depends_on "vulkan-headers" + depends_on "vulkan-loader" + + on_macos do + depends_on "molten-vk" + end + + on_linux do + depends_on "libx11" + depends_on "libxcb" + depends_on "libxkbfile" + depends_on "libxrandr" + depends_on "wayland" + depends_on "wayland-protocols" + end + + def install + if OS.mac? + # account for using already-built MoltenVK instead of the source repo + inreplace "cube/CMakeLists.txt", + "${MOLTENVK_DIR}/MoltenVK/icd/MoltenVK_icd.json", + "${MOLTENVK_DIR}/etc/vulkan/icd.d/MoltenVK_icd.json" + inreplace buildpath.glob("*/macOS/*/CMakeLists.txt"), + "${MOLTENVK_DIR}/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib", + "${MOLTENVK_DIR}/lib/libMoltenVK.dylib" + end + + args = [ + "-DBUILD_ICD=ON", + "-DBUILD_CUBE=ON", + "-DBUILD_VULKANINFO=ON", + "-DINSTALL_ICD=OFF", # we will manually place it in a nonconflicting location + "-DGLSLANG_INSTALL_DIR=#{Formula["glslang"].opt_prefix}", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].opt_prefix}", + "-DVULKAN_LOADER_INSTALL_DIR=#{Formula["vulkan-loader"].opt_prefix}", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + ] + args += if OS.mac? + ["-DMOLTENVK_REPO_ROOT=#{Formula["molten-vk"].opt_prefix}"] + else + [ + "-DBUILD_WSI_DIRECTFB_SUPPORT=OFF", + "-DBUILD_WSI_WAYLAND_SUPPORT=ON", + "-DBUILD_WSI_XCB_SUPPORT=ON", + "-DBUILD_WSI_XLIB_SUPPORT=ON", + ] + end + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (lib/"mock_icd").install (buildpath/"build/icd/VkICD_mock_icd.json").realpath, + shared_library("build/icd/libVkICD_mock_icd") + + return unless OS.mac? + + targets = [ + Formula["molten-vk"].opt_lib/shared_library("libMoltenVK"), + Formula["vulkan-loader"].opt_lib/shared_library("libvulkan", Formula["vulkan-loader"].version.to_s), + ] + prefix.glob("cube/*.app/Contents/Frameworks").each do |framework_dir| + ln_sf targets, framework_dir, verbose: true + end + + (bin/"vkcube").write_env_script "/usr/bin/open", "-a #{prefix}/cube/vkcube.app", {} + (bin/"vkcubepp").write_env_script "/usr/bin/open", "-a #{prefix}/cube/vkcubepp.app", {} + end + + def caveats + <<~EOS + The mock ICD files have been installed in + #{opt_lib}/mock_icd + You can use them with the Vulkan Loader by setting + export VK_ICD_FILENAMES=#{opt_lib}/mock_icd/VkICD_mock_icd.json + EOS + end + + test do + with_env(VK_ICD_FILENAMES: lib/"mock_icd/VkICD_mock_icd.json") do + assert_match "Vulkan Mock Device", shell_output("#{bin}/vulkaninfo --summary") + end + + return if !OS.mac? || (Hardware::CPU.intel? && ENV["HOMEBREW_GITHUB_ACTIONS"]) + + with_env(XDG_DATA_DIRS: testpath) do + assert_match "DRIVER_ID_MOLTENVK", shell_output("#{bin}/vulkaninfo --summary") + end + end +end diff --git a/Formula/v/vulkan-utility-libraries.rb b/Formula/v/vulkan-utility-libraries.rb new file mode 100644 index 0000000000000..67060b9075bcf --- /dev/null +++ b/Formula/v/vulkan-utility-libraries.rb @@ -0,0 +1,56 @@ +class VulkanUtilityLibraries < Formula + desc "Utility Libraries for Vulkan" + homepage "https://github.com/KhronosGroup/Vulkan-Utility-Libraries" + url "https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "953ef4c2547b1611f90102f531f362bcfd6c76751eba2ae8c0f23b38947ef48d" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7272e1c787ffb0f00312ba40c143589e6230517b984e6aa6574e091be5fc47bb" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "895f887dd77255fccb680a0f4f957644f4ce23b6102f32cdf8d26ff2053adb73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "709537ccf75df7acbd6cb24f2c709a9ab3d199ea235571fb39c5066d397c820e" + sha256 cellar: :any_skip_relocation, tahoe: "fd4c0422a15272ab5e7fe2b493b3e9ad2127bfcbb7a7c4a6d22322a243b2525a" + sha256 cellar: :any_skip_relocation, sequoia: "ba896c69ef0a020c7d6e575683751b5330095325e2aea1af54715ebe34aec733" + sha256 cellar: :any_skip_relocation, sonoma: "a2a3f70cbf3013ecdb445488cd458a7c8da36f4e2cf7f6104ae18352ebba75ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "9939979badffed549bb95f773867a615145ffccf955dfbd44dbad1d91d56fa26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73f685274a3b294b29443b0a2adb9cf1583897f3713c2ad74a573a6645fe4ea1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "vulkan-headers" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + VkLayerSettingEXT s; + s.pLayerName = "VK_LAYER_LUNARG_test"; + s.pSettingName = "test_setting"; + s.type = VK_LAYER_SETTING_TYPE_INT32_EXT; + s.valueCount = 1; + int vals[1] = {5}; + s.pValues = &vals; + + printf("%s\\n", s.pLayerName); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-o", "test" + system "./test" + end +end diff --git a/Formula/v/vulkan-validationlayers.rb b/Formula/v/vulkan-validationlayers.rb new file mode 100644 index 0000000000000..f8da3fc8b0152 --- /dev/null +++ b/Formula/v/vulkan-validationlayers.rb @@ -0,0 +1,80 @@ +class VulkanValidationlayers < Formula + desc "Vulkan layers that enable developers to verify correct use of the Vulkan API" + homepage "https://github.com/KhronosGroup/Vulkan-ValidationLayers" + url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "91d9be1347a270288bcc50206bda8ccf6aad33bab8318c0643dd36bef97478f9" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-ValidationLayers.git", branch: "main" + + livecheck do + url :stable + regex(/^vulkan-sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4cadbbe3c6c4eb854d5918df5fbfdf68acf56980e6145169474f5f19c7835e8b" + sha256 cellar: :any, arm64_sequoia: "04776b0c10645c93630cb549cafa8baa7d10bfb54e9ae20a092256f43ac1d9a0" + sha256 cellar: :any, arm64_sonoma: "0891798fc2906b4c4f20e20a3c284452c7353c6b38dabfa6bf1c7878f644c91f" + sha256 cellar: :any, sonoma: "f59c2b9f61e6ef5354c82ac2e9ef51014b9b5b884878474c846344446f7593a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "887726bda3fceca312ed20356e3414b7f405c42d55cc9f5918c0bc138fa4ed66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fa355cedf002ed9cb336d7f2991ee29109590dc58ee6ed334669094e646dce4" + end + + depends_on "cmake" => :build + depends_on "spirv-headers" => :build + depends_on "vulkan-tools" => :test + depends_on "glslang" + depends_on "spirv-tools" + depends_on "vulkan-headers" + depends_on "vulkan-loader" + depends_on "vulkan-utility-libraries" + + on_linux do + depends_on "libx11" => :build + depends_on "libxcb" => :build + depends_on "libxrandr" => :build + depends_on "pkgconf" => :build + depends_on "wayland" => :build + end + + def install + args = [ + "-DGLSLANG_INSTALL_DIR=#{Formula["glslang"].prefix}", + "-DSPIRV_HEADERS_INSTALL_DIR=#{Formula["spirv-headers"].opt_prefix}", + "-DSPIRV_TOOLS_INSTALL_DIR=#{Formula["spirv-tools"].opt_prefix}", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].prefix}", + "-DVULKAN_UTILITY_LIBRARIES_INSTALL_DIR=#{Formula["vulkan-utility-libraries"].prefix}", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + "-DBUILD_TESTS=OFF", + "-DUSE_ROBIN_HOOD_HASHING=OFF", + ] + if OS.linux? + args += [ + "-DBUILD_WSI_XCB_SUPPORT=ON", + "-DBUILD_WSI_XLIB_SUPPORT=ON", + "-DBUILD_WSI_WAYLAND_SUPPORT=ON", + ] + end + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + In order to use this layer in a Vulkan application, you may need to place it in the environment with + export VK_LAYER_PATH=#{opt_share}/vulkan/explicit_layer.d + EOS + end + + test do + ENV.prepend_path "VK_LAYER_PATH", share/"vulkan/explicit_layer.d" + ENV["VK_ICD_FILENAMES"] = Formula["vulkan-tools"].lib/"mock_icd/VkICD_mock_icd.json" + + actual = shell_output("vulkaninfo") + %w[VK_EXT_debug_report VK_EXT_debug_utils VK_EXT_validation_features + VK_EXT_debug_marker VK_EXT_tooling_info VK_EXT_validation_cache].each do |expected| + assert_match expected, actual + end + end +end diff --git a/Formula/v/vulkan-volk.rb b/Formula/v/vulkan-volk.rb new file mode 100644 index 0000000000000..dc450d6983af2 --- /dev/null +++ b/Formula/v/vulkan-volk.rb @@ -0,0 +1,75 @@ +class VulkanVolk < Formula + desc "Meta loader for Vulkan API" + homepage "https://github.com/zeux/volk" + url "https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz" + sha256 "8d6a4092d5de62d0c6290394cf81cf7a99e36875934b1b75d595e76d08fcadd1" + license "MIT" + head "https://github.com/zeux/volk.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:vulkan[._-])?sdk[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e674a2b40e978b2146e6e163902f56ae953c881541d2bb3c0a2034889f4ba750" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d80186aa7965a923549ab0eafdd485e59ea5ae0d31271aac130e0300f6aea9a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb944471c4ebd519fe8a7456c09fc17ad22249c88ff998a3e7e3201187cae7a7" + sha256 cellar: :any_skip_relocation, sonoma: "7602f7e532461ebf7bc4bee741b654ae901f5cd8107815ce5d1a027abcead1ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "826c7b85686e90eb0c28051a8ba54ed4bebb96370232be03e023ec339e45ee38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c120a25ac0f05121f45a4b412f68bdde42445ca143964c339599cf957c69fe5" + end + + depends_on "cmake" => :build + depends_on "vulkan-headers" => [:build, :test] + depends_on "vulkan-loader" + + conflicts_with "volk" => "both install volkConfig.cmake" + + def volk_static_defines + res = "" + on_macos do + res = "VK_USE_PLATFORM_MACOS_MVK" + end + on_linux do + res = "VK_USE_PLATFORM_XLIB_KHR" + end + res + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DVOLK_INSTALL=ON", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].prefix}", + "-DVOLK_STATIC_DEFINES=#{volk_static_defines}", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "volk.h" + + int main() { + VkResult res = volkInitialize(); + if (res == VK_SUCCESS) { + printf("Result was VK_SUCCESS\\n"); + return 0; + } else { + printf("Result was VK_ERROR_INITIALIZATION_FAILED\\n"); + return 1; + } + } + C + system ENV.cc, testpath/"test.c", + "-I#{include}", "-L#{lib}", + "-I#{Formula["vulkan-headers"].include}", + "-lvolk", "-D#{volk_static_defines}", + "-Wl,-rpath,#{Formula["vulkan-loader"].opt_lib}", + "-o", testpath/"test" + system testpath/"test" + end +end diff --git a/Formula/v/vulsio-gost.rb b/Formula/v/vulsio-gost.rb new file mode 100644 index 0000000000000..39820066cd4d7 --- /dev/null +++ b/Formula/v/vulsio-gost.rb @@ -0,0 +1,38 @@ +class VulsioGost < Formula + desc "Local CVE tracker & notification system" + homepage "https://github.com/vulsio/gost" + url "https://github.com/vulsio/gost/archive/refs/tags/v0.7.0.tar.gz" + sha256 "e20b39dff98c82a791ae9e5ac40ce78f6e25a5beac3ce7b4d53a3c0b45794f04" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "35a73401f7fa6b69b6af81402d8116722f47a846a8853fe87d34a5139c9f7bc1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "35a73401f7fa6b69b6af81402d8116722f47a846a8853fe87d34a5139c9f7bc1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35a73401f7fa6b69b6af81402d8116722f47a846a8853fe87d34a5139c9f7bc1" + sha256 cellar: :any_skip_relocation, sonoma: "0cd5c4ecf1ff7ce9d33aa4b3f6e95c5ba82810c8c0452b28466a7007f4ab3b00" + sha256 cellar: :any_skip_relocation, arm64_linux: "c62a7a554861cad139d2b4bf8d369a7b988cdd540cff391d63bf67cbf368b7f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68e4b8cff66df393723fad3e63f4bc186f5ee9dde268c2f3b9d1075ada5812d2" + end + + depends_on "go" => :build + + conflicts_with "gost", because: "both install `gost` binaries" + + def install + ldflags = %W[ + -s -w + -X github.com/vulsio/gost/config.Version=#{version} + -X github.com/vulsio/gost/config.Revision=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"gost") + + generate_completions_from_executable(bin/"gost", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/gost version") + + output = shell_output("#{bin}/gost fetch debian 2>&1") + assert_match "Fetched all CVEs from Debian", output + end +end diff --git a/Formula/v/vultr.rb b/Formula/v/vultr.rb new file mode 100644 index 0000000000000..853365958cd8c --- /dev/null +++ b/Formula/v/vultr.rb @@ -0,0 +1,30 @@ +class Vultr < Formula + desc "Command-line tool for Vultr services" + homepage "https://github.com/vultr/vultr-cli" + url "https://github.com/vultr/vultr-cli/archive/refs/tags/v3.8.0.tar.gz" + sha256 "41cc0a9c62b61196802bc2105d0fd7c835eea554d8378eb84d6ce0c8c55eb16c" + license "Apache-2.0" + head "https://github.com/vultr/vultr-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "879612d01a2224cfdeeaddd7d8afa85ce071742e8af0deabe8afd9bcd851e71c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "879612d01a2224cfdeeaddd7d8afa85ce071742e8af0deabe8afd9bcd851e71c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "879612d01a2224cfdeeaddd7d8afa85ce071742e8af0deabe8afd9bcd851e71c" + sha256 cellar: :any_skip_relocation, sonoma: "7ff5eb9f6fde77ef29c3e113e1dcda6c0142c41b730a0163028ecf6faaf4bd75" + sha256 cellar: :any_skip_relocation, arm64_linux: "d91debae77ec8d0930597124fdfa1614736f797a88ae1e1df032a2121bee49c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26d0f20f4eab68a6dd7c023ff3cabd474ac26d25422f98614611c5277ed825f8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"vultr", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/vultr version") + assert_match "Custom", shell_output("#{bin}/vultr os list") + end +end diff --git a/Formula/v/vulture.rb b/Formula/v/vulture.rb new file mode 100644 index 0000000000000..db398d6eef188 --- /dev/null +++ b/Formula/v/vulture.rb @@ -0,0 +1,30 @@ +class Vulture < Formula + include Language::Python::Virtualenv + + desc "Find dead Python code" + homepage "https://github.com/jendrikseipp/vulture" + url "https://files.pythonhosted.org/packages/8e/25/925f35db758a0f9199113aaf61d703de891676b082bd7cf73ea01d6000f7/vulture-2.14.tar.gz" + sha256 "cb8277902a1138deeab796ec5bef7076a6e0248ca3607a3f3dee0b6d9e9b8415" + license "MIT" + head "https://github.com/jendrikseipp/vulture.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "98d42d8c72dd9ae09720b3bd04a9ba102157f120717d14ea706a965199ad4bf5" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "vulture #{version}\n", shell_output("#{bin}/vulture --version") + + (testpath/"unused.py").write "class Unused: pass" + assert_match "unused.py:1: unused class 'Unused'", shell_output("#{bin}/vulture #{testpath}/unused.py", 3) + (testpath/"used.py").write "print(1+1)" + assert_empty shell_output("#{bin}/vulture #{testpath}/used.py") + end +end diff --git a/Formula/v/vunnel.rb b/Formula/v/vunnel.rb new file mode 100644 index 0000000000000..bc5c7e381051e --- /dev/null +++ b/Formula/v/vunnel.rb @@ -0,0 +1,273 @@ +class Vunnel < Formula + include Language::Python::Virtualenv + + desc "Tool for collecting vulnerability data from various sources" + homepage "https://github.com/anchore/vunnel" + url "https://files.pythonhosted.org/packages/6d/a9/0a55bc84983ed23bcda8b0d61c83a941b60f92faf1c275edc5acdf99fc5f/vunnel-0.43.0.tar.gz" + sha256 "8c434be0accbbc4a3cbcdc2fe899550bc1e36730917234cb632fbfd5108e0a6f" + license "Apache-2.0" + head "https://github.com/anchore/vunnel.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "322689bd3c89e46ac7467a7197d52e79b38baeee8539d76642ac3fae20447c6d" + sha256 cellar: :any, arm64_sequoia: "b3a4c116bdccda937db5e5b3b4373dc8149e4684475a8783d876b58979af3f07" + sha256 cellar: :any, arm64_sonoma: "a509005b08838f36893439198766cbc9699c0c6a1eb525cee3f5c60c382473ff" + sha256 cellar: :any, sonoma: "d38aa7832e9d0200a050f4ea0d109589b55a4869df187bc587d1d888aa9f4aab" + sha256 cellar: :any_skip_relocation, arm64_linux: "29519e29b234b31d27b14547cc0ff0052c3bac62633885c9dfbd033133cfa336" + sha256 cellar: :any_skip_relocation, x86_64_linux: "260e667eaa31cc8d86be52ada7322d436f015ca0978c2c6c8c3ba68bccfcea0e" + end + + depends_on "rust" => :build + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + depends_on "rpds-py" => :no_linkage + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: ["certifi", "rpds-py"] + + resource "attrs" do + url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" + sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-default-group" do + url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz" + sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/a2/61/f083b5ac52e505dfc1c624eafbf8c7589a0d7f32daa398d2e7590efa5fda/colorlog-6.10.1.tar.gz" + sha256 "eb4ae5cb65fe7fec7773c2306061a8e63e02efc2c72eba9d27b0fa23c94f1321" + end + + resource "cvss" do + url "https://files.pythonhosted.org/packages/a5/f6/1f7d315de23f39bbc32b94bb6b33a1b6124856037bfaa3f8bdb1a49584fa/cvss-3.6.tar.gz" + sha256 "f21d18224efcd3c01b44ff1b37dec2e3208d29a6d0ce6c87a599c73c21ee1a99" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "docformatter" do + url "https://files.pythonhosted.org/packages/f7/05/812faba28882695291c7dc61e64249081ee6394c9459987a6ce599c10ef5/docformatter-1.5.0.tar.gz" + sha256 "9dc71659d3b853c3018cd7b2ec34d5d054370128e12b79ee655498cb339cc711" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "ijson" do + url "https://files.pythonhosted.org/packages/d0/12/3116e1d5752aa9d480eb58ae4b348d38c1aeaf792c5fbca22e44c27d4bf1/ijson-2.6.1.tar.gz" + sha256 "75ebc60b23abfb1c97f475ab5d07a5ed725ad4bd1f58513d8b258c21f02703d0" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz" + sha256 "c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730" + end + + resource "iso8601" do + url "https://files.pythonhosted.org/packages/b9/f3/ef59cee614d5e0accf6fd0cbba025b93b272e626ca89fb70a3e9187c5d15/iso8601-2.1.0.tar.gz" + sha256 "6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "jsonschema" do + url "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz" + sha256 "e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" + sha256 "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "mashumaro" do + url "https://files.pythonhosted.org/packages/f8/67/c4e235256baf6837106d2620c7123eb1e5786c704c7f7d7fa488ad6afc61/mashumaro-3.17.tar.gz" + sha256 "de1d8b1faffee58969c7f97e35963a92480a38d4c9858e92e0721efec12258ed" + end + + resource "mergedeep" do + url "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz" + sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8" + end + + resource "oras" do + url "https://files.pythonhosted.org/packages/c3/78/16f3847ef31a3b1410c401712336a9c5d90fa97c3cc1f4bacd9dcfced9b7/oras-0.2.38.tar.gz" + sha256 "58482f78275cb5cc9fdf135248ca878a19204428a51bd3a1ca24c32714d35341" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/c6/fe/ed708782d6709cc60eb4c2d8a361a440661f74134675c72990f2c48c785f/orjson-3.11.4.tar.gz" + sha256 "39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/3a/f0/de0ac00a4484c0d87b71e3d9985518278d89797fa725e90abd3453bccb42/packageurl_python-0.17.5.tar.gz" + sha256 "a7be3f3ba70d705f738ace9bf6124f31920245a49fa69d4b416da7037dd2de61" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" + sha256 "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz" + sha256 "86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" + end + + resource "pytest-snapshot" do + url "https://files.pythonhosted.org/packages/9b/7b/ab8f1fc1e687218aa66acec1c3674d9c443f6a2dc8cb6a50f464548ffa34/pytest-snapshot-0.9.0.tar.gz" + sha256 "c7013c3abc3e860f9feff899f8b4debe3708650d8d8242a61bf2625ff64db7f3" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" + sha256 "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "sqlalchemy" do + url "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz" + sha256 "0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz" + sha256 "64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549" + end + + resource "toposort" do + url "https://files.pythonhosted.org/packages/69/19/8e955d90985ecbd3b9adb2a759753a6840da2dff3c569d412b2c9217678b/toposort-1.10.tar.gz" + sha256 "bfbb479c53d0a696ea7402601f4e693c97b0367837c8898bc6471adfca37a6bd" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" + sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" + end + + resource "untokenize" do + url "https://files.pythonhosted.org/packages/f7/46/e7cea8159199096e1df52da20a57a6665da80c37fb8aeb848a3e47442c32/untokenize-0.1.1.tar.gz" + sha256 "3865dbbbb8efb4bb5eaa72f1be7f3e0be00ea8b7f125c69cbd1f5fda926f37a2" + + # Fix to support Python 3.14 + # PR ref: https://github.com/myint/untokenize/pull/5 + patch do + url "https://github.com/myint/untokenize/commit/46cf0233fe18097398f5692f9caf3d2e5d94eb14.patch?full_index=1" + sha256 "fa7cafaba2d606cb45d763d828a2a7a6a2532b39593bd82ac122dfe7df8145ef" + end + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "xsdata" do + url "https://files.pythonhosted.org/packages/20/13/0de81fd3e39c1c45125e5b79f8731f32b0a6d7556959a9a1aa87bcc43624/xsdata-22.12.tar.gz" + sha256 "a3d5f1b7b6fff8c916f7825c836ea285a4e7d3f3a94dcbbed0e63ba15dc94466" + end + + resource "xxhash" do + url "https://files.pythonhosted.org/packages/02/84/30869e01909fb37a6cc7e18688ee8bf1e42d57e7e0777636bd47524c43c7/xxhash-3.6.0.tar.gz" + sha256 "f0162a78b13a0d7617b2845b90c763339d1f1d82bb04a4b07f4ab535cc5e05d6" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz" + sha256 "a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + end + + def install + # hatch does not support a SOURCE_DATE_EPOCH before 1980. + # Remove after https://github.com/pypa/hatch/pull/1999 is released. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + # Fix compilation of ijson native extensions, note: + # This would not be needed if latest ijson version is used upstream, but there are reasons it is + # currently held back: https://github.com/anchore/vunnel/pull/103 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"vunnel", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/vunnel --version") + + assert_match "alpine", shell_output("#{bin}/vunnel list") + end +end diff --git a/Formula/v/vvdec.rb b/Formula/v/vvdec.rb new file mode 100644 index 0000000000000..3d8639e412f59 --- /dev/null +++ b/Formula/v/vvdec.rb @@ -0,0 +1,41 @@ +class Vvdec < Formula + desc "Fraunhofer Versatile Video Decoder" + homepage "https://github.com/fraunhoferhhi/vvdec" + url "https://github.com/fraunhoferhhi/vvdec/archive/refs/tags/v3.0.0.tar.gz" + sha256 "090688c2f9beebd4e8a2ec197a5b9429803498cd3c91fbec62fe7718a8268114" + license "BSD-3-Clause-Clear" + head "https://github.com/fraunhoferhhi/vvdec.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fb021719e84fa86ade8a14edc36868ab97ad24a46e1a4a2a60f3e2c9ba282f8a" + sha256 cellar: :any, arm64_sequoia: "b956fabeb934f949925f8671518902161fd38277e72106964a43b49c48d8c031" + sha256 cellar: :any, arm64_sonoma: "8f9c6a6c8c81c797a68a0b25487784e3dc66a5e0ca7972900d65a2dab9793de6" + sha256 cellar: :any, arm64_ventura: "2554098c8f97cff5cc2b85325a3e53bfc311e9faa9ee2051d9d80e8f20bae1bb" + sha256 cellar: :any, sonoma: "b1fc2efdf0309717ea11531baccc04c608255d388239c0c4718786e3f3dca834" + sha256 cellar: :any, ventura: "618b27f29d85a69c088a927c66f463abad82db277f31090e5d71fba38b41857e" + sha256 cellar: :any_skip_relocation, arm64_linux: "be35dcb2b448927fe23a662f37dc29656e74e4d6e7f0f5e76e3404e37b25cbee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba30c7153eef5cfcd61dab7bc0b615dadb12b4d6243d98386349237f60534221" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=1", + "-DVVDEC_INSTALL_VVDECAPP=1", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test-video" do + url "https://archive.org/download/testvideo_20230410_202304/test.vvc" + sha256 "753261009b6472758cde0dee2c004ff712823b43e62ec3734f0f46380bec8e46" + end + + resource("homebrew-test-video").stage testpath + system bin/"vvdecapp", "-b", testpath/"test.vvc", "-o", testpath/"test.yuv" + assert_path_exists testpath/"test.yuv" + end +end diff --git a/Formula/v/vvenc.rb b/Formula/v/vvenc.rb new file mode 100644 index 0000000000000..8560b21a6cac7 --- /dev/null +++ b/Formula/v/vvenc.rb @@ -0,0 +1,47 @@ +class Vvenc < Formula + desc "Fraunhofer Versatile Video Encoder" + homepage "https://github.com/fraunhoferhhi/vvenc" + url "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.13.1.tar.gz" + sha256 "9d0d88319b9c200ebf428471a3f042ea7dcd868e8be096c66e19120a671a0bc8" + license "BSD-3-Clause-Clear" + head "https://github.com/fraunhoferhhi/vvenc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6ff2a0e57323213b64e43a108807eeb2500624452b0ab087fd38619374146ca8" + sha256 cellar: :any, arm64_sequoia: "2e526df41954df8bd763675725849ffc2567bf9f44133309939d0d6623e0bb98" + sha256 cellar: :any, arm64_sonoma: "df6e45adb580246422f6bf5d0a9e366633e5238011b30e18c25794018b24fc66" + sha256 cellar: :any, arm64_ventura: "2ae0e24d7f2d84238c98bf7f57fca61652348b3e915195d7bbb30cd2cdee4c43" + sha256 cellar: :any, sonoma: "9e14a23f8a69305779d246ff1c1401250d07d5599419e034dd136421510501d6" + sha256 cellar: :any, ventura: "16c29cb6a182e02a04594cf43dd9c72e21dbf2c1e2061443ebdd3d19b01615fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "0621f4273cc43a0320e06a61647300c4a05fc14c2e75e3c8a1919b312d675c5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bff00818fee11e6b176f71b084247d14b41f1bc2e4920a2cff1acc50faa9d2c" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DVVENC_INSTALL_FULLFEATURE_APP=1", + "-DBUILD_SHARED_LIBS=1", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-test_video" do + url "https://raw.githubusercontent.com/fraunhoferhhi/vvenc/master/test/data/RTn23_80x44p15_f15.yuv" + sha256 "ecd2ef466dd2975f4facc889e0ca128a6bea6645df61493a96d8e7763b6f3ae9" + end + + resource("homebrew-test_video").stage testpath + system bin/"vvencapp", + "-i", testpath/"RTn23_80x44p15_f15.yuv", + "-s", "360x640", + "--fps", "60/1", + "--format", "yuv420_10", + "--hdr", "hdr10_2020", + "-o", testpath/"RTn23_80x44p15_f15.vvc" + assert_path_exists testpath/"RTn23_80x44p15_f15.vvc" + end +end diff --git a/Formula/v8.rb b/Formula/v8.rb deleted file mode 100644 index fd2415f1311fd..0000000000000 --- a/Formula/v8.rb +++ /dev/null @@ -1,96 +0,0 @@ -# Track Chrome stable, see https://omahaproxy.appspot.com/ -class V8 < Formula - desc "Google's JavaScript engine" - homepage "https://github.com/v8/v8/wiki" - url "https://chromium.googlesource.com/chromium/tools/depot_tools.git", - :revision => "f28ef9887ee23597d4a0b89d068f7b8e377fc876" - version "7.1.302.28" # the version of the v8 checkout, not a depot_tools version - - bottle do - cellar :any - sha256 "cd882e5011ef37e84c957b1aaa8717618aae34204df08325f85ab11dd8d31409" => :mojave - sha256 "2a7ec6035b6d93fa17984de397a72900ff003dd53b1f788008ea45556fe9296a" => :high_sierra - sha256 "31e9d7558d573186a536d99b41fe001a63e6fdb06c4113a17afebc9dcdc9fc07" => :sierra - end - - # depot_tools/GN require Python 2.7+ - depends_on "python@2" => :build - - # https://bugs.chromium.org/p/chromium/issues/detail?id=620127 - depends_on :macos => :el_capitan - - needs :cxx11 - - def install - # Add depot_tools in PATH - ENV.prepend_path "PATH", buildpath - # Prevent from updating depot_tools on every call - # see https://www.chromium.org/developers/how-tos/depottools#TOC-Disabling-auto-update - ENV["DEPOT_TOOLS_UPDATE"] = "0" - - # Initialize and sync gclient - system "gclient", "root" - system "gclient", "config", "--spec", <<~EOS - solutions = [ - { - "url": "https://chromium.googlesource.com/v8/v8.git", - "managed": False, - "name": "v8", - "deps_file": "DEPS", - "custom_deps": {}, - }, - ] - target_os = [ "mac" ] - target_os_only = True - cache_dir = "#{HOMEBREW_CACHE}/gclient_cache" - EOS - - system "gclient", "sync", - "-j", ENV.make_jobs, - "-r", version, - "--no-history", - "-vvv" - - # Enter the v8 checkout - cd "v8" do - output_path = "out.gn/x64.release" - - gn_args = { - :is_debug => false, - :is_component_build => true, - :v8_use_external_startup_data => false, - :v8_enable_i18n_support => true, - } - - # Transform to args string - gn_args_string = gn_args.map { |k, v| "#{k}=#{v}" }.join(" ") - - # Build with gn + ninja - system "gn", "gen", "--args=#{gn_args_string}", output_path - - system "ninja", "-j", ENV.make_jobs, "-C", output_path, - "-v", "d8" - - # Install all the things - include.install Dir["include/*"] - - cd output_path do - lib.install Dir["lib*.dylib"] - - # Install d8 and icudtl.dat in libexec and symlink - # because they need to be in the same directory. - libexec.install Dir["d8", "icudt*.dat"] - (bin/"d8").write <<~EOS - #!/bin/bash - exec "#{libexec}/d8" --icu-data-file="#{libexec}/icudtl.dat" "$@" - EOS - end - end - end - - test do - assert_equal "Hello World!", shell_output("#{bin}/d8 -e 'print(\"Hello World!\");'").chomp - t = "#{bin}/d8 -e 'print(new Intl.DateTimeFormat(\"en-US\").format(new Date(\"2012-12-20T03:00:00\")));'" - assert_match %r{12/\d{2}/2012}, shell_output(t).chomp - end -end diff --git a/Formula/v8@3.15.rb b/Formula/v8@3.15.rb deleted file mode 100644 index de63f41736eac..0000000000000 --- a/Formula/v8@3.15.rb +++ /dev/null @@ -1,53 +0,0 @@ -class V8AT315 < Formula - desc "Google's open source JavaScript engine" - homepage "https://github.com/v8/v8/wiki" - url "https://github.com/v8/v8-git-mirror/archive/3.15.11.18.tar.gz" - sha256 "93a4945a550e5718d474113d9769a3c010ba21e3764df8f22932903cd106314d" - revision 1 - - bottle do - cellar :any - sha256 "38ef56c652ac4f91ec1ddac61b8719ffba4c949103a6636e15aa1cd768e2d14d" => :mojave - sha256 "42c0c3b3f4dc7153023e14aef59c623f10c78ffe8f2d7a43ab984f2810a694dd" => :high_sierra - sha256 "4b845ce6a7fdc4110518dfbf48ab721d7f48b9e64f78e6d1cc199078ac9d874b" => :sierra - sha256 "9c191175be793dba50999f5ac1894f26b9eb39ca231f0618d5954833e5db8945" => :el_capitan - sha256 "f3b4dddabc17df3d84c3e1bbd894fa33a60e221a150eb7ede77d64daaef1088b" => :yosemite - end - - keg_only :versioned_formula - - resource "gyp" do - url "https://chromium.googlesource.com/external/gyp.git", - :revision => "f7bc250ccc4d619a1cf238db87e5979f89ff36d7" - end - - def install - # Bully GYP into correctly linking with c++11 - ENV.cxx11 - ENV["GYP_DEFINES"] = "clang=1 mac_deployment_target=#{MacOS.version}" - (buildpath/"build/gyp").install resource("gyp") - - # fix up libv8.dylib install_name - # https://github.com/Homebrew/homebrew/issues/36571 - # https://code.google.com/p/v8/issues/detail?id=3871 - inreplace "tools/gyp/v8.gyp", - "'OTHER_LDFLAGS': ['-dynamiclib', '-all_load']", - "\\0, 'DYLIB_INSTALL_NAME_BASE': '#{opt_lib}'" - - system "make", "native", - "-j#{ENV.make_jobs}", - "library=shared", - "snapshot=on", - "console=readline" - - prefix.install "include" - cd "out/native" do - lib.install Dir["lib*"] - bin.install "d8", "lineprocessor", "mksnapshot", "preparser", "process", "shell" => "v8" - end - end - - test do - assert_equal "Hello World!", pipe_output("#{bin}/v8 -e 'print(\"Hello World!\")'").chomp - end -end diff --git a/Formula/vagrant-completion.rb b/Formula/vagrant-completion.rb deleted file mode 100644 index de3f53bc542af..0000000000000 --- a/Formula/vagrant-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class VagrantCompletion < Formula - desc "Bash completion for Vagrant" - homepage "https://github.com/hashicorp/vagrant" - url "https://github.com/hashicorp/vagrant/archive/v2.2.2.tar.gz" - sha256 "4f1233a753933025da8735df5c0c77762350094468df1692bb041e1991195e0b" - head "https://github.com/hashicorp/vagrant.git" - - bottle :unneeded - - def install - bash_completion.install "contrib/bash/completion.sh" => "vagrant" - end - - test do - assert_match "-F _vagrant", - shell_output("source #{bash_completion}/vagrant && complete -p vagrant") - end -end diff --git a/Formula/vala.rb b/Formula/vala.rb deleted file mode 100644 index 1faff8f2715d4..0000000000000 --- a/Formula/vala.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Vala < Formula - desc "Compiler for the GObject type system" - homepage "https://wiki.gnome.org/Projects/Vala" - url "https://download.gnome.org/sources/vala/0.42/vala-0.42.4.tar.xz" - sha256 "b528906d080ac5b6043285a82c194c988e495c70da71ae19c1fc7811509f4f1e" - - bottle do - sha256 "9c6c86b7f494f23a71204ef1ea9557bb7451c0af221cc8dd1cdf9a08bf80bc1e" => :mojave - sha256 "57491a07b55149a072f8d630fa3faabc62237eaaaef1d22c7a8c8b84850f7874" => :high_sierra - sha256 "167682d16807eff93bdcf20e59bb851a4b6cc46e6c61981a1db1128329aad9c2" => :sierra - end - - depends_on "gettext" - depends_on "glib" - depends_on "graphviz" - depends_on "pkg-config" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" # Fails to compile as a single step - system "make", "install" - end - - test do - test_string = "Hello Homebrew\n" - path = testpath/"hello.vala" - path.write <<~EOS - void main () { - print ("#{test_string}"); - } - EOS - valac_args = [ - # Build with debugging symbols. - "-g", - # Use Homebrew's default C compiler. - "--cc=#{ENV.cc}", - # Save generated C source code. - "--save-temps", - # Vala source code path. - path.to_s, - ] - system "#{bin}/valac", *valac_args - assert_predicate testpath/"hello.c", :exist? - - assert_equal test_string, shell_output("#{testpath}/hello") - end -end diff --git a/Formula/valabind.rb b/Formula/valabind.rb deleted file mode 100644 index 28aed688702f7..0000000000000 --- a/Formula/valabind.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Valabind < Formula - desc "Vala bindings for radare, reverse engineering framework" - homepage "https://radare.org/" - url "https://github.com/radare/valabind/archive/1.6.0.tar.gz" - sha256 "0d266486655c257fd993758c3e4cc8e32f0ec6f45d0c0e15bb6e6be986e4b78e" - revision 1 - head "https://github.com/radare/valabind.git" - - bottle do - cellar :any - sha256 "c149f20a01849a3ee477d0ea236fd78fedd45d2c1fe8ebc97bdf637f2fa4cec5" => :mojave - sha256 "9cc2312ef64b8f1d39a36d9b157d9112920ebdda221e64d0680b32e641e0a795" => :high_sierra - sha256 "e9ffa47579200c0f8a1394c6495b1c8c52d581084bcd9273121d4e907fff307c" => :sierra - sha256 "c43502d503c09c23f2c225250c5e8ccf9f7100b88703767f27ceed729b55a8c3" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "swig" - depends_on "vala" - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"valabind", "--help" - end -end diff --git a/Formula/valgrind.rb b/Formula/valgrind.rb deleted file mode 100644 index caf23db781a40..0000000000000 --- a/Formula/valgrind.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Valgrind < Formula - desc "Dynamic analysis tools (memory, debug, profiling)" - homepage "http://www.valgrind.org/" - - stable do - url "https://sourceware.org/pub/valgrind/valgrind-3.14.0.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/valgrind-3.14.0.tar.bz2" - sha256 "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5" - - depends_on :maximum_macos => :high_sierra - end - - bottle do - sha256 "7869473ca1009d871dfcb496cc4d08e0318315d18721854ef42960b76e2ef64d" => :high_sierra - sha256 "5ac984d472025c7bbc081e3be88b31f709944cf924945ebe85427f00d7cca73e" => :sierra - end - - head do - url "https://sourceware.org/git/valgrind.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - # Valgrind needs vcpreload_core-*-darwin.so to have execute permissions. - # See #2150 for more information. - skip_clean "lib/valgrind" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-only64bit - --build=amd64-darwin - ] - system "./autogen.sh" if build.head? - - # Look for headers in the SDK on Xcode-only systems: https://bugs.kde.org/show_bug.cgi?id=295084 - unless MacOS::CLT.installed? - inreplace "coregrind/Makefile.in", %r{(\s)(?=/usr/include/mach/)}, '\1'+MacOS.sdk_path.to_s - end - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - system "#{bin}/valgrind", "ls", "-l" - end -end diff --git a/Formula/vamp-plugin-sdk.rb b/Formula/vamp-plugin-sdk.rb deleted file mode 100644 index 0c68ea55eb874..0000000000000 --- a/Formula/vamp-plugin-sdk.rb +++ /dev/null @@ -1,46 +0,0 @@ -class VampPluginSdk < Formula - desc "Audio processing plugin system sdk" - homepage "https://www.vamp-plugins.org/" - url "https://code.soundsoftware.ac.uk/attachments/download/2206/vamp-plugin-sdk-2.7.1.tar.gz" - sha256 "c6fef3ff79d2bf9575ce4ce4f200cbf219cbe0a21cfbad5750e86ff8ae53cb0b" - head "https://code.soundsoftware.ac.uk/hg/vamp-plugin-sdk", :using => :hg - - bottle do - cellar :any - sha256 "9457a8641dc9dfa3dd5494cf7714b84fa577c67a1d0fdd147203cecf2421af5d" => :mojave - sha256 "b81ef33d608958bde47122893d48582417ce580599606bf8e893a8791b9e7b0c" => :high_sierra - sha256 "f5b77eaf0b80183cf7c19b08c4734b49393ad38e382da03666a8c8a3b5063b5d" => :sierra - sha256 "acd0d2d514e459907217d67a6a2652bce37e6b87564fc9383a1e22763b84472a" => :el_capitan - sha256 "ada7d84cbd975d1857e83651815a8a3a465ee04299fd32e5d90eba6646d6325c" => :yosemite - end - - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "libogg" - depends_on "libsndfile" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "vamp-sdk/Plugin.h" - #include - - class MyPlugin : public Vamp::Plugin { }; - - const VampPluginDescriptor * - vampGetPluginDescriptor(unsigned int version, unsigned int index) { return NULL; } - EOS - - system ENV.cxx, "test.cpp", "-I#{include}", "-Wl,-dylib", "-o", "test.dylib" - assert_match /Usage:/, shell_output("#{bin}/vamp-rdf-template-generator 2>&1", 2) - - cp "#{lib}/vamp/vamp-example-plugins.so", testpath/"vamp-example-plugins.dylib" - ENV["VAMP_PATH"]=testpath - assert_match /amplitudefollower/, shell_output("#{bin}/vamp-simple-host -l") - end -end diff --git a/Formula/vapoursynth.rb b/Formula/vapoursynth.rb deleted file mode 100644 index f0d84cddcf7ca..0000000000000 --- a/Formula/vapoursynth.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Vapoursynth < Formula - include Language::Python::Virtualenv - - desc "Video processing framework with simplicity in mind" - homepage "http://www.vapoursynth.com" - url "https://github.com/vapoursynth/vapoursynth/archive/R45.1.tar.gz" - sha256 "4f43e5bb8c4817fdebe572d82febe4abac892918c54e1cb71aa6f6eb3677a877" - head "https://github.com/vapoursynth/vapoursynth.git" - - bottle do - sha256 "c713072de8230c28fa9a76532b8fd79354addf33017519205a98a56c44f0cebb" => :mojave - sha256 "40a4f329f1414e8c6ebc4b1388119ab3908f90e0a5bbec76109a3f86bd1e914e" => :high_sierra - sha256 "6d55273a72e636657c5ed8d192876b4da757c07fa991fdd1488ac1cf8792520a" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "nasm" => :build - depends_on "pkg-config" => :build - - depends_on "libass" - depends_on :macos => :el_capitan # due to zimg dependency - depends_on "python" - depends_on "tesseract" - depends_on "zimg" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/f0/66/6309291b19b498b672817bd237caec787d1b18013ee659f17b1ec5844887/Cython-0.29.tar.gz" - sha256 "94916d1ede67682638d3cc0feb10648ff14dc51fb7a7f147f4fedce78eaaea97" - end - - def install - venv = virtualenv_create(buildpath/"cython", "python3") - venv.pip_install "Cython" - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--with-cython=#{buildpath}/cython/bin/cython" - system "make", "install" - end - - test do - py3 = Language::Python.major_minor_version "python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{py3}/site-packages" - system "python3", "-c", "import vapoursynth" - system bin/"vspipe", "--version" - end -end diff --git a/Formula/varnish.rb b/Formula/varnish.rb deleted file mode 100644 index 1868515775c94..0000000000000 --- a/Formula/varnish.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Varnish < Formula - desc "High-performance HTTP accelerator" - homepage "https://www.varnish-cache.org/" - url "https://varnish-cache.org/_downloads/varnish-6.1.0.tgz" - sha256 "161b92519801240886a55cc27484efc995dde1ad4703d9afd49fa8f32656e27d" - - bottle do - sha256 "ba4d03d0208cd64feef54afa139f644eb9ec5c48e4117b4009108a29fcb8aeb7" => :mojave - sha256 "e29fef5fe3a17fae5b3b8ad51aebf667fea87148b6f5deb0e99531018391532f" => :high_sierra - sha256 "e860417f4e718652728f00584f4552054d3d6a7cd8c6064dc570311ba0e4f2ea" => :sierra - end - - depends_on "docutils" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "pcre" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}" - system "make", "install" - (etc/"varnish").install "etc/example.vcl" => "default.vcl" - (var/"varnish").mkpath - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/sbin/varnishd -n #{HOMEBREW_PREFIX}/var/varnish -f #{HOMEBREW_PREFIX}/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080 -F" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/varnishd - -n - #{var}/varnish - -f - #{etc}/varnish/default.vcl - -s - malloc,1G - -T - 127.0.0.1:2000 - -a - 0.0.0.0:8080 - -F - - KeepAlive - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/varnish/varnish.log - StandardOutPath - #{var}/varnish/varnish.log - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{sbin}/varnishd -V 2>&1") - end -end diff --git a/Formula/varnish@4.rb b/Formula/varnish@4.rb deleted file mode 100644 index 2c79412036adf..0000000000000 --- a/Formula/varnish@4.rb +++ /dev/null @@ -1,71 +0,0 @@ -class VarnishAT4 < Formula - desc "High-performance HTTP accelerator" - homepage "https://www.varnish-cache.org/" - url "https://varnish-cache.org/_downloads/varnish-4.1.10.tgz" - sha256 "364833fbf6fb7540ddd54b62b5ac52b2fb00e915049c8446d71d334323e87c22" - - bottle do - sha256 "92ba094ad81290badf5058e7741651e7b9b5e4e549c4693eeeaaca40d2fe4d19" => :mojave - sha256 "e9231087ada4329fb23bb4b76afaf6545ecfa2567197abd90584513143edd20e" => :high_sierra - sha256 "c7b61727e6a392c17fc72eb7683d7699b7f9c5851cd3818647eac9ab2ba67bee" => :sierra - sha256 "06565d5821f9054953cced9d141765f018b116e57986a470a15142ec6cfb420e" => :el_capitan - end - - keg_only :versioned_formula - - depends_on "docutils" => :build - depends_on "pkg-config" => :build - depends_on "pcre" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}" - system "make", "install" - (etc/"varnish").install "etc/example.vcl" => "default.vcl" - (var/"varnish").mkpath - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/varnish@4/sbin/varnishd -n #{HOMEBREW_PREFIX}/var/varnish -f #{HOMEBREW_PREFIX}/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/varnishd - -n - #{var}/varnish - -f - #{etc}/varnish/default.vcl - -s - malloc,1G - -T - 127.0.0.1:2000 - -a - 0.0.0.0:8080 - - KeepAlive - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/varnish/varnish.log - StandardOutPath - #{var}/varnish/varnish.log - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{sbin}/varnishd -V 2>&1") - end -end diff --git a/Formula/vassh.rb b/Formula/vassh.rb deleted file mode 100644 index eb22ec56f13f6..0000000000000 --- a/Formula/vassh.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Vassh < Formula - desc "Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder" - homepage "https://github.com/x-team/vassh" - url "https://github.com/x-team/vassh/archive/0.2.tar.gz" - sha256 "dd9b3a231c2b0c43975ba3cc22e0c45ba55fbbe11a3e4be1bceae86561b35340" - - bottle :unneeded - - def install - bin.install "vassh.sh", "vasshin", "vassh" - end - - test do - system "#{bin}/vassh", "-h" - end -end diff --git a/Formula/vault-cli.rb b/Formula/vault-cli.rb deleted file mode 100644 index 30d5b1c9e9534..0000000000000 --- a/Formula/vault-cli.rb +++ /dev/null @@ -1,24 +0,0 @@ -class VaultCli < Formula - desc "Subversion-like utility to work with Jackrabbit FileVault" - homepage "https://jackrabbit.apache.org/filevault/index.html" - url "https://search.maven.org/remotecontent?filepath=org/apache/jackrabbit/vault/vault-cli/3.1.40/vault-cli-3.1.40-bin.tar.gz" - sha256 "c08f46a61afa170aeed0230d710e7de9034740592e24ee6589d7ea9d992109d5" - - bottle :unneeded - - depends_on :java - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env) - end - - test do - # Bad test, but we're limited without a Jackrabbit repo to speak to... - system "#{bin}/vlt", "--version" - end -end diff --git a/Formula/vault.rb b/Formula/vault.rb deleted file mode 100644 index d00c400b5bfd2..0000000000000 --- a/Formula/vault.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Please don't update this formula until the release is official via -# mailing list or blog post. There's a history of GitHub tags moving around. -# https://github.com/hashicorp/vault/issues/1051 -class Vault < Formula - desc "Secures, stores, and tightly controls access to secrets" - homepage "https://vaultproject.io/" - url "https://github.com/hashicorp/vault.git", - :tag => "v0.11.5", - :revision => "a59ffa4a0f09bbf198241fe6793a96722789b639" - head "https://github.com/hashicorp/vault.git" - - bottle do - cellar :any_skip_relocation - sha256 "ccdd43326edadd365168e929aae2e4da898d65838df3e61dae7892d46eea0a32" => :mojave - sha256 "250d162042ebd0577625c969f5eef235cb1cabf857b75a8657462e2b6b82f85a" => :high_sierra - sha256 "ee289fb807fea35118c3f88c2bbbf39ee4accc3efa2c40869b06c2352801eed9" => :sierra - end - - depends_on "go" => :build - depends_on "gox" => :build - - def install - ENV["GOPATH"] = buildpath - - contents = buildpath.children - [buildpath/".brew_home"] - (buildpath/"src/github.com/hashicorp/vault").install contents - - (buildpath/"bin").mkpath - - cd "src/github.com/hashicorp/vault" do - system "make", "dev" - bin.install "bin/vault" - prefix.install_metafiles - end - end - - test do - pid = fork { exec bin/"vault", "server", "-dev" } - sleep 1 - ENV.append "VAULT_ADDR", "http://127.0.0.1:8200" - system bin/"vault", "status" - Process.kill("TERM", pid) - end -end diff --git a/Formula/vaulted.rb b/Formula/vaulted.rb deleted file mode 100644 index 3153b1938892b..0000000000000 --- a/Formula/vaulted.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Vaulted < Formula - desc "Allows the secure storage and execution of environments" - homepage "https://github.com/miquella/vaulted" - url "https://github.com/miquella/vaulted/archive/v2.3.0.tar.gz" - sha256 "8e4f56007591fe1a6abcaf77c63ebf99d346f3191b5306fd53d3292081330eed" - head "https://github.com/miquella/vaulted.git" - - bottle do - cellar :any_skip_relocation - sha256 "da19f0ae3296cd695dced87aa93828c96754570427842880a286397d5de30c50" => :mojave - sha256 "5c027f23bd0a0d9b30a8392ad40e86a72ea57700d4a8a8a16d51973085b2d6b5" => :high_sierra - sha256 "e81be3ea83b9716e53e9e981aa87da08a9bfcc8555f11eaf602fd6e36b56beae" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GO111MODULE"] = "on" - system "go", "build", "-o", bin/"vaulted", "." - man1.install Dir["doc/man/vaulted*.1"] - end - - test do - (testpath/".local/share/vaulted").mkpath - touch(".local/share/vaulted/test_vault") - output = IO.popen(["#{bin}/vaulted", "ls"], &:read) - output == "test_vault\n" - end -end diff --git a/Formula/vavrdiasm.rb b/Formula/vavrdiasm.rb deleted file mode 100644 index 808416b8e8f6f..0000000000000 --- a/Formula/vavrdiasm.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Vavrdiasm < Formula - desc "8-bit Atmel AVR disassembler" - homepage "https://github.com/vsergeev/vAVRdisasm" - url "https://github.com/vsergeev/vavrdisasm/archive/v3.1.tar.gz" - sha256 "4fe5edde40346cb08c280bd6d0399de7a8d2afdf20fb54bf41a8abb126636360" - - bottle do - cellar :any_skip_relocation - sha256 "5b0c0f8ae850c12118808020420ed94d9c7b221f1bb64ec81fe5553b089424e4" => :mojave - sha256 "14295cb0db6aa3259a2b1e2c8ba020fee253804135aea259695ac00bdd906764" => :high_sierra - sha256 "c04a9755b9f2e15fa512fdb08d28b95b8cf0304287f3a7930975b4ad75417fcf" => :sierra - sha256 "0671b1062a86e8d596a9f404fd843cb37d6d2d1bb28ebb2b8a8f6cbdd763c97c" => :el_capitan - sha256 "ce57062586ca9cb91290141376f1da1f5de3c6efb6fe4687585a3e64cc29c014" => :yosemite - sha256 "f881c5a6d94581c4fc9efb13118c84c40700f13d130302f6ee4cb16968d1f6b0" => :mavericks - sha256 "d3866a89762e6d98987128b3e961788d1f997b1851b8b35213a9bb7ce3f53f39" => :mountain_lion - end - - # Patch: - # - BSD `install(1)' does not have a GNU-compatible `-D' (create intermediate - # directories) flag. Switch to using `mkdir -p'. - # - Make `PREFIX' overridable - # https://github.com/vsergeev/vavrdisasm/pull/2 - patch :DATA - - def install - ENV["PREFIX"] = prefix - system "make" - system "make", "install" - end - - test do - # Code to generate `file.hex': - ## .device ATmega88 - ## - ## LDI R16, 0xfe - ## SER R17 - # - # Compiled with avra: - ## avra file.S && mv file.S.hex file.hex - - (testpath/"file.hex").write <<~EOS - :020000020000FC - :040000000EEF1FEFF1 - :00000001FF - EOS - - output = `vavrdisasm file.hex`.lines.to_a - - assert output[0].match(/ldi\s+R16,\s0xfe/).length == 1 - assert output[1].match(/ser\s+R17/).length == 1 - end -end - -__END__ -diff --git a/Makefile b/Makefile -index 3b61942..f1c94fc 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,5 +1,5 @@ - PROGNAME = vavrdisasm --PREFIX = /usr -+PREFIX ?= /usr - BINDIR = $(PREFIX)/bin - - ################################################################################ -@@ -35,7 +35,8 @@ test: $(PROGNAME) - python2 crazy_test.py - - install: $(PROGNAME) -- install -D -s -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME) -+ mkdir -p $(DESTDIR)$(BINDIR) -+ install -s -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME) - - uninstall: - rm -f $(DESTDIR)$(BINDIR)/$(PROGNAME) diff --git a/Formula/vbindiff.rb b/Formula/vbindiff.rb deleted file mode 100644 index 34199de4c706d..0000000000000 --- a/Formula/vbindiff.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Vbindiff < Formula - desc "Visual Binary Diff" - homepage "https://www.cjmweb.net/vbindiff/" - url "https://www.cjmweb.net/vbindiff/vbindiff-3.0_beta5.tar.gz" - sha256 "f04da97de993caf8b068dcb57f9de5a4e7e9641dc6c47f79b60b8138259133b8" - - bottle do - cellar :any_skip_relocation - sha256 "907ff3fce1fcb1cba6e746ea624f84234fe55703caa380b7ee19c1f8bb6cd193" => :mojave - sha256 "c5d1025c94e7fe141a9522ed1460bfba8047393d63d59f54b391dec063c05c68" => :high_sierra - sha256 "d6474b9e6a00c71f2c207c07dbfb015aa428d8f32e193b69c7b4a1f534f128db" => :sierra - sha256 "b2f557094c03f5870173b32cdf9e8ff8bd7fd74340adfea7f1db6b6eced367d9" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/vbindiff", "-L" - end -end diff --git a/Formula/vc4asm.rb b/Formula/vc4asm.rb deleted file mode 100644 index 1c28ab4fa47ff..0000000000000 --- a/Formula/vc4asm.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Vc4asm < Formula - desc "Macro assembler for Broadcom VideoCore IV aka Raspberry Pi GPU" - homepage "http://maazl.de/project/vc4asm/doc/index.html" - url "https://github.com/maazl/vc4asm/archive/V0.2.3.tar.gz" - sha256 "8d5f49f7573d1cc6a7baf7cee5e1833af2a87427ad8176989083c6ba7d034c8c" - - bottle do - cellar :any_skip_relocation - sha256 "fc0a060875dd9233a3675b034055b1ae23d8775701529024b91f184a7e97521e" => :mojave - sha256 "db9bbf5ee3cb47a0f3ffa1d9bf355205873237e9f2dbd26777546935401ef4b0" => :high_sierra - sha256 "2547c982e3fde40316d01d802bd01bf49af208e6737ecafeaeb8ad988ea3255d" => :sierra - sha256 "72d54a4237c4e0f952fd1a3d913725d84814ed5b657affa1d6dcafa19e1cdc44" => :el_capitan - sha256 "871b3b109ac49b09056f83e4488105196060d2388dc5052c679776b43fab5927" => :yosemite - end - - # Fixes "ar: illegal option combination for -r" - # Reported 13 Apr 2017 https://github.com/maazl/vc4asm/issues/18 - resource "old_makefile" do - url "https://raw.githubusercontent.com/maazl/vc4asm/c6991f0/src/Makefile" - sha256 "2ea9a9e660e85dace2e9b1c9be17a57c8a91e89259d477f9f63820aee102a2d3" - end - - needs :cxx11 - - def install - ENV.cxx11 - - # Fixes "error: use of undeclared identifier 'errno'" - # Reported 13 Apr 2017 https://github.com/maazl/vc4asm/issues/19 - inreplace "src/utils.cpp", "#include ", - "#include \n#include " - - (buildpath/"src").install resource("old_makefile") - system "make", "-C", "src" - bin.install "bin/vc4asm", "bin/vc4dis" - share.install "share/vc4.qinc" - end - - test do - (testpath/"test.qasm").write <<~EOS - mov -, sacq(9) - add r0, r4, ra1.unpack8b - add.unpack8ai r0, r4, ra1 - add r0, r4.8a, ra1 - EOS - system "#{bin}/vc4asm", "-o test.hex", "-V", "#{share}/vc4.qinc", "test.qasm" - end -end diff --git a/Formula/vcdimager.rb b/Formula/vcdimager.rb deleted file mode 100644 index 8b86a264eb6d6..0000000000000 --- a/Formula/vcdimager.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Vcdimager < Formula - desc "(Super) video CD authoring solution" - homepage "https://www.gnu.org/software/vcdimager/" - url "https://ftp.gnu.org/gnu/vcdimager/vcdimager-2.0.1.tar.gz" - mirror "https://ftpmirror.gnu.org/vcdimager/vcdimager-2.0.1.tar.gz" - sha256 "67515fefb9829d054beae40f3e840309be60cda7d68753cafdd526727758f67a" - - bottle do - cellar :any - sha256 "1dada6e9157e7e89d903a2cbc82ec12199ad7afb8384af90a4601bd99d4b18fd" => :mojave - sha256 "a990e94922c3b6e779907c421cf9aafc10d2f5bce3196580d0274909a18f6cb7" => :high_sierra - sha256 "e78e0d7842f71d68f5ef23ea13c64a04c012a523e0759b78a1395a21281c7b73" => :sierra - sha256 "9094f54dbd4234a5fb6bd23ab39c2b4f87f7bebb5ccfb398942fb98df37813b0" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libcdio" - depends_on "popt" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"vcdimager", "--help" - end -end diff --git a/Formula/vcftools.rb b/Formula/vcftools.rb deleted file mode 100644 index c54e858efb439..0000000000000 --- a/Formula/vcftools.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Vcftools < Formula - desc "Tools for working with VCF files" - homepage "https://vcftools.github.io/" - url "https://github.com/vcftools/vcftools/releases/download/v0.1.16/vcftools-0.1.16.tar.gz" - sha256 "dbfc774383c106b85043daa2c42568816aa6a7b4e6abc965eeea6c47dde914e3" - - bottle do - cellar :any_skip_relocation - sha256 "5d52f2eafbf96fcffd2b8f9804c2d0ca9752af4242c27ed5fe15a6f8cb935498" => :mojave - sha256 "2fc4ca7c7c23841a1eed8539910737b5986079be6d22d1ff8375f052266bf478" => :high_sierra - sha256 "32c81874b5d34dee1e36f2dd628cb7eaba8ecef3d612985d7c02c61d6790c5b6" => :sierra - sha256 "866bc9927660b97ae5bc34dc38db397212163ab289b3284db2d8c610b2aff3d4" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "htslib" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-pmdir=lib/perl5/site_perl" - system "make", "install" - - bin.env_script_all_files(libexec/"bin", :PERL5LIB => lib/"perl5/site_perl") - end - - test do - (testpath/"test.vcf").write <<~EOS - ##fileformat=VCFv4.0 - #CHROM POS ID REF ALT QUAL FILTER INFO - 1 1 . A C 10 PASS . - EOS - system "#{bin}/vcf-validator", "test.vcf" - end -end diff --git a/Formula/vcprompt.rb b/Formula/vcprompt.rb deleted file mode 100644 index fab1e9ec89348..0000000000000 --- a/Formula/vcprompt.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Vcprompt < Formula - desc "Provide version control info in shell prompts" - homepage "https://bitbucket.org/gward/vcprompt" - url "https://bitbucket.org/gward/vcprompt/downloads/vcprompt-1.2.1.tar.gz" - sha256 "98c2dca278a34c5cdbdf4a5ff01747084141fbf4c50ba88710c5a13c3cf9af09" - - bottle do - cellar :any - rebuild 1 - sha256 "9c1a9204571d68401cca95f2ee1acbf5c1b0cd22f0f9251d506a4a201d795dfc" => :mojave - sha256 "cd5abc9fe361da52bef71b639adc956a8b18f02cbf95272ddf9802862d469090" => :high_sierra - sha256 "9416ab35f637cc751b667f1a8481d17936faa58f39749d87e4e32b07b647f229" => :sierra - sha256 "11e4de5f008aec3510274ef2265d6d30d214249e127cc1d3045b01b47232c96b" => :el_capitan - sha256 "a6b02f96a018c993568e4ee43bfa23343c88aa4c6aa58b4727b69c01340f59ff" => :yosemite - sha256 "ee133ff8277ce6d7792acd261ba3f27259e677badfe73b80ffd6fd08c6cd3665" => :mavericks - end - - head do - url "https://bitbucket.org/gward/vcprompt", :using => :hg - depends_on "autoconf" => :build - end - - depends_on "sqlite" - - def install - system "autoconf" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "PREFIX=#{prefix}", - "MANDIR=#{man1}", - "install" - end - - test do - system "#{bin}/vcprompt" - end -end diff --git a/Formula/vcs.rb b/Formula/vcs.rb deleted file mode 100644 index b94cd06de3b62..0000000000000 --- a/Formula/vcs.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Vcs < Formula - desc "Creates video contact sheets (previews) of videos" - homepage "https://p.outlyer.net/vcs/" - url "https://p.outlyer.net/vcs/files/vcs-1.13.2.tar.gz" - sha256 "fc2a2b3994d5ffb5d87fb3dceaa5f6855aca7a89c58533b12fd11b8fb5b623af" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "45898505ec08747398c0557fbc94a200dbd336fedb60d82dff646af476f424ae" => :mojave - sha256 "b50a29774c1653b6f0cf23cf70b425212062138db17634916a46f9e5269fe5d6" => :high_sierra - sha256 "d9b65057f5f6746e32f075af250611956e3fecf6aae5300ce517fe0edfb155cc" => :sierra - sha256 "93bf052fe5378df11b4dfa929d6c2aea6a5a623a198a8a765374332ca662dfaf" => :el_capitan - sha256 "93bf052fe5378df11b4dfa929d6c2aea6a5a623a198a8a765374332ca662dfaf" => :yosemite - end - - depends_on "ffmpeg" - depends_on "ghostscript" - depends_on "gnu-getopt" - depends_on "imagemagick" - depends_on "mplayer" => :optional - - def install - inreplace "vcs", "declare GETOPT=getopt", "declare GETOPT=#{Formula["gnu-getopt"].opt_bin}/getopt" - - system "make", "install", "prefix=#{prefix}" - end - - test do - system Formula["ffmpeg"].bin/"ffmpeg", "-f", "rawvideo", "-s", "hd720", - "-pix_fmt", "yuv420p", "-r", "30", "-t", "5", "-i", "/dev/zero", - testpath/"video.mp4" - assert_predicate testpath/"video.mp4", :exist? - - system bin/"vcs", "-i", "1", "-o", testpath/"sheet.png", testpath/"video.mp4" - assert_predicate testpath/"sheet.png", :exist? - end -end diff --git a/Formula/vcsh.rb b/Formula/vcsh.rb deleted file mode 100644 index 6720ed263ce52..0000000000000 --- a/Formula/vcsh.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Vcsh < Formula - desc "Config manager based on git" - homepage "https://github.com/RichiH/vcsh" - url "https://github.com/RichiH/vcsh/archive/v1.20151229-1.tar.gz" - version "1.20151229-1" - sha256 "7682a517eaf88a86ea5e38ad81707800e965375eaff8b5cfd882e210fe2fef71" - - bottle :unneeded - - def install - bin.install "vcsh" - man1.install "vcsh.1" - zsh_completion.install "_vcsh" - end - - test do - assert_match /Initialized empty/, shell_output("#{bin}/vcsh init test").strip - end -end diff --git a/Formula/vde.rb b/Formula/vde.rb deleted file mode 100644 index eac6cde47eba5..0000000000000 --- a/Formula/vde.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Vde < Formula - desc "Ethernet compliant virtual network" - homepage "https://vde.sourceforge.io/" - url "https://downloads.sourceforge.net/project/vde/vde2/2.3.2/vde2-2.3.2.tar.gz" - sha256 "22df546a63dac88320d35d61b7833bbbcbef13529ad009c7ce3c5cb32250af93" - - bottle do - sha256 "a0cf184ec7804a4984607e3e7d311395514390235241d7844e31aafeb40d48cb" => :mojave - sha256 "49241bcf4445833cedd86c3d8901e563032874f9976a21a106073760a5095e39" => :high_sierra - sha256 "3e9215e631197e75b179f9f33bc27483ead1d2ce8b3875b7846cc2568cfe67c2" => :sierra - sha256 "97989b0577f7a1fbd13c916aff1e61391cf3d7b886c4ef965f0b765e034c8bbc" => :el_capitan - sha256 "5ca4100e3dae3df4704e2fdf9ae07a1fb0637d2cb2e916e7db931a4cb84a0c55" => :yosemite - sha256 "ab336b6d84a03dd981d70ab8b377ec3a61dcb9abfffd233c84a0e74c8fadc8b8" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - # 2.3.1 built in parallel but 2.3.2 does not. See: - # https://sourceforge.net/p/vde/bugs/54/ - ENV.deparallelize - system "make", "install" - end -end diff --git a/Formula/vdirsyncer.rb b/Formula/vdirsyncer.rb deleted file mode 100644 index 6961031368b95..0000000000000 --- a/Formula/vdirsyncer.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Vdirsyncer < Formula - include Language::Python::Virtualenv - - desc "Synchronize calendars and contacts" - homepage "https://github.com/pimutils/vdirsyncer" - url "https://github.com/pimutils/vdirsyncer.git", - :tag => "0.16.7", - :revision => "dcf5f701b7b5c21a8f4e8c80243db3e0baff1313" - head "https://github.com/pimutils/vdirsyncer.git" - - bottle do - cellar :any_skip_relocation - sha256 "2c40f6ad53b8a558ed7503b5fe2413ae86850ea74f6ab41b560c3019185719fc" => :mojave - sha256 "89f7e1832a262681843b223527d96c5f6a587ded3b2884df9a87204c463f1911" => :high_sierra - sha256 "57510d02d159de632f3fdb98d7de88aba5ea01d375b4f096d6d367c976e355bc" => :sierra - sha256 "81eaa19b3cbc91007a0a5cfe9979cca1f207b2ac2a72b87aabca41ae019838f7" => :el_capitan - end - - depends_on "python" - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:", - "--ignore-installed", "requests-oauthlib", - buildpath - system libexec/"bin/pip", "uninstall", "-y", "vdirsyncer" - venv.pip_install_and_link buildpath - - prefix.install "contrib/vdirsyncer.plist" - inreplace prefix/"vdirsyncer.plist" do |s| - s.gsub! "@@WORKINGDIRECTORY@@", bin - s.gsub! "@@VDIRSYNCER@@", bin/name - s.gsub! "@@SYNCINTERVALL@@", "60" - end - end - - def post_install - inreplace prefix/"vdirsyncer.plist", "@@LOCALE@@", ENV["LC_ALL"] || ENV["LANG"] || "en_US.UTF-8" - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - (testpath/".config/vdirsyncer/config").write <<~EOS - [general] - status_path = "#{testpath}/.vdirsyncer/status/" - [pair contacts] - a = "contacts_a" - b = "contacts_b" - collections = ["from a"] - [storage contacts_a] - type = "filesystem" - path = "~/.contacts/a/" - fileext = ".vcf" - [storage contacts_b] - type = "filesystem" - path = "~/.contacts/b/" - fileext = ".vcf" - EOS - (testpath/".contacts/a/foo/092a1e3b55.vcf").write <<~EOS - BEGIN:VCARD - VERSION:3.0 - EMAIL;TYPE=work:username@example.org - FN:User Name Ö φ 風 ض - UID:092a1e3b55 - N:Name;User - END:VCARD - EOS - (testpath/".contacts/b/foo/").mkpath - system "#{bin}/vdirsyncer", "discover" - system "#{bin}/vdirsyncer", "sync" - assert_match /Ö φ 風 ض/, (testpath/".contacts/b/foo/092a1e3b55.vcf").read - end -end diff --git a/Formula/veclibfort.rb b/Formula/veclibfort.rb deleted file mode 100644 index 11a76da0b932b..0000000000000 --- a/Formula/veclibfort.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Veclibfort < Formula - desc "GNU Fortran compatibility for Apple's vecLib" - homepage "https://github.com/mcg1969/vecLibFort" - url "https://github.com/mcg1969/vecLibFort/archive/0.4.2.tar.gz" - sha256 "c61316632bffa1c76e3c7f92b11c9def4b6f41973ecf9e124d68de6ae37fbc85" - revision 6 - head "https://github.com/mcg1969/vecLibFort.git" - - bottle do - cellar :any - sha256 "cfc57cf7c918e03eca808df69b322b150802aeee21bfafcd3906d52cdf4d8598" => :mojave - sha256 "482b9bd9210a7b32c30e4536d77529110f7a85399c83efd370f2612e9dd60d65" => :high_sierra - sha256 "f655ad9b96a1e13a17dd757a598608850634ccc04fb52436e3f838f588ffe157" => :sierra - sha256 "c91bb504dc969a045cbfc837b7f54de5e04012894b835a3b39ed1a6dc075d52f" => :el_capitan - end - - depends_on "gcc" # for gfortran - - def install - system "make", "all" - system "make", "PREFIX=#{prefix}", "install" - pkgshare.install "tester.f90" - end - - test do - system "gfortran", "-o", "tester", "-O", pkgshare/"tester.f90", - "-L#{lib}", "-lvecLibFort" - assert_match "SLAMCH", shell_output("./tester") - end -end diff --git a/Formula/vecx.rb b/Formula/vecx.rb deleted file mode 100644 index 25e6835d14115..0000000000000 --- a/Formula/vecx.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Vecx < Formula - desc "Vectrex emulator" - homepage "https://github.com/jhawthorn/vecx" - url "https://github.com/jhawthorn/vecx/archive/v1.1.tar.gz" - sha256 "206ab30db547b9c711438455917b5f1ee96ff87bd025ed8a4bd660f109c8b3fb" - head "https://github.com/jhawthorn/vecx.git" - - bottle do - cellar :any - sha256 "8e55a474a2d775bf3cbd0d7801b6d23aa3cf759d1aa48268542fee67cc6ab322" => :mojave - sha256 "2a2b5d63a8be0bcf51a9b4eee05b0751fd3757b5576e515931a55ad6f729a465" => :high_sierra - sha256 "9417cc9e5938dc117b4ab7ab41518a2b28e366cae15cdf1192af15e6237a35e6" => :sierra - sha256 "48d404ad79ecd0ac870ca0b3390a6465e7ed2755d58eaf130ec93a4e874e5f34" => :el_capitan - sha256 "65e4cd91159f3772ec9e688d93bb1c1dd823e9c397b5163a62b1499909a2b74b" => :yosemite - end - - depends_on "sdl" - depends_on "sdl_gfx" - depends_on "sdl_image" - - def install - # Fix missing symobls for inline functions - # https://github.com/jhawthorn/vecx/pull/3 - inreplace ["e6809.c", "vecx.c"], /__inline/, 'static \1' - - system "make" - bin.install "vecx" - end - - test do - assert_match "rom.dat: No such file or directory", shell_output("#{bin}/vecx 2>&1", 1) - end -end diff --git a/Formula/vegeta.rb b/Formula/vegeta.rb deleted file mode 100644 index 100a77823cd1d..0000000000000 --- a/Formula/vegeta.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Vegeta < Formula - desc "HTTP load testing tool and library" - homepage "https://github.com/tsenart/vegeta" - url "https://github.com/tsenart/vegeta.git", - :tag => "cli/v12.2.0", - :revision => "65db074680f5a0860d495e5fd037074296a4c425" - - bottle do - cellar :any_skip_relocation - sha256 "4bbc3b02ddf47cb7d75c4344744ec9c273145174d5ead4b9141a7d4f4418aa1f" => :mojave - sha256 "f3fdd71e68611f4227b7b12eb3e0ab6499a2166c5f096aeeb1819d052aacf81a" => :high_sierra - sha256 "0a5a909e5c563ca6ae28cb96f11a95e1dca2eb036824d7152b6eb5f504155da1" => :sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - src = buildpath/"src/github.com/tsenart/vegeta" - src.install buildpath.children - src.cd do - system "make", "vegeta" - bin.install "vegeta" - prefix.install_metafiles - end - end - - test do - input = "GET https://google.com" - output = pipe_output("#{bin}/vegeta attack -duration=1s -rate=1", input, 0) - report = pipe_output("#{bin}/vegeta report", output, 0) - assert_match(/Success +\[ratio\] +100.00%/, report) - end -end diff --git a/Formula/vera++.rb b/Formula/vera++.rb deleted file mode 100644 index d4d28855ee1f0..0000000000000 --- a/Formula/vera++.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Veraxx < Formula - desc "Programmable tool for C++ source code" - homepage "https://bitbucket.org/verateam/vera" - url "https://bitbucket.org/verateam/vera/downloads/vera++-1.3.0.tar.gz" - sha256 "9415657a09438353489db10ca860dd6459e446cfd9c649a1a2e02268da66f270" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "41254f89a2510f8c3f39718a2068a9000658ca714ee104fd426a1cc4d7afd8e7" => :mojave - sha256 "73b49e98703b820ffc65213f2e14d0932c5b08851165042811b3e3318bbc84f6" => :high_sierra - sha256 "3a261328afd43c8c38f33802ced93557c58ae8903dab90e0ca4546004003447f" => :sierra - sha256 "76dcb0b9340b8fc9413fc848dff27e8805d7b2a9c63d5128fc83ce5bd3bd1cd5" => :el_capitan - sha256 "a2620392e9204964ecd0ec0bc6b90268d27e5e2a28ef304aff3d3719ed058b80" => :yosemite - sha256 "05d5ff89c4ce8aa8054a94d234824fff41cd9f16e029022096c1d99301c9e572" => :mavericks - end - - depends_on "cmake" => :build - - # Use prebuilt docs to avoid need for pandoc - resource "doc" do - url "https://bitbucket.org/verateam/vera/downloads/vera++-1.3.0-doc.tar.gz" - sha256 "122a15e33a54265d62a6894974ca2f0a8f6ff98742cf8e6152d310cc23099400" - end - - # Custom-built boost, lua, and luabind are used by the build scripts - resource "boost" do - url "https://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.bz2" - sha256 "134732acaf3a6e7eba85988118d943f0fa6b7f0850f65131fff89823ad30ff1d" - end - - resource "lua" do - url "https://github.com/LuaDist/lua/archive/5.2.3.tar.gz" - sha256 "c8aa2c74e8f31861cea8f030ece6b6cb18974477bd1e9e1db4c01aee8f18f5b6" - end - - resource "luabind" do - url "https://github.com/verateam/luabind/archive/vera-1.3.0.tar.gz" - sha256 "7d93908b7d978e44ebe5dfad6624e6daa033f284a5f24013f37cac162a18f71a" - end - - def install - resource("boost").stage do - system "./bootstrap.sh", "--prefix=#{buildpath}/3rdParty", - "--with-libraries=filesystem,system,program_options,regex,wave,python" - system "./b2", "install", "threading=multi", "link=static", "warnings=off", - "cxxflags=-DBOOST_WAVE_SUPPORT_MS_EXTENSIONS=1", "-s NO_BZIP2=1" - end - - resource("lua").stage do - args = std_cmake_args - args << "-DBUILD_SHARED_LIBS:BOOL=OFF" - args << "-DCMAKE_INSTALL_PREFIX:PATH=#{buildpath}/3rdParty" - system "cmake", ".", *args - system "make", "install" - end - - resource("luabind").stage do - args = std_cmake_args - args << "-DBUILD_TESTING:BOOL=OFF" - args << "-DLUA_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include" - args << "-DLUA_LIBRARIES:PATH=#{buildpath}/3rdParty/lib/liblua.a" - args << "-DBOOST_ROOT:PATH=#{buildpath}/3rdParty" - args << "-DCMAKE_INSTALL_PREFIX:PATH=#{buildpath}/3rdParty" - system "cmake", ".", *args - system "make", "install" - end - - system "cmake", ".", - "-DVERA_USE_SYSTEM_BOOST:BOOL=ON", "-DBoost_USE_STATIC_LIBS:BOOL=ON", - "-DLUA_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include", - "-DLUA_LIBRARIES:PATH=#{buildpath}/3rdParty/lib/liblua.a", - "-DLUA_LIBRARY:PATH=#{buildpath}/3rdParty/lib/liblua.a", - "-DLUABIND_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include", - "-DLUABIND_LIBRARIES:PATH=#{buildpath}/3rdParty/lib/libluabind.a", - "-DLUABIND_LIBRARY:PATH=#{buildpath}/3rdParty/lib/libluabind.a", - "-DBoost_INCLUDE_DIR:PATH=#{buildpath}/3rdParty/include", - "-DBoost_LIBRARY_DIR_RELEASE:PATH=#{buildpath}/3rdParty/lib", - *std_cmake_args - system "make", "install" - system "ctest" - - resource("doc").stage do - man1.install "vera++.1" - doc.install "vera++.html" - end - end - - test do - assert_equal version.to_s, shell_output("#{bin}/vera++ --version").strip - end -end diff --git a/Formula/verilator.rb b/Formula/verilator.rb deleted file mode 100644 index 6a232a47ea49f..0000000000000 --- a/Formula/verilator.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Verilator < Formula - desc "Verilog simulator" - homepage "https://www.veripool.org/wiki/verilator" - url "https://www.veripool.org/ftp/verilator-4.008.tgz" - sha256 "d5cef6edd3bdb7754776d902daae7a7e5dd662baa7c7f895cb7028b1d6910cac" - - bottle do - sha256 "05cdfe0a8555d10f43f6af2b8e820f80591b00df62628deff8f6ee9cff7a3cc6" => :mojave - sha256 "a3e8106bf822313e78b42e887cca373d48ca1307868cb5bcd4a602ba8b8bff2f" => :high_sierra - sha256 "7b381623263dd15f4244f9fc447bf2134799c0b1579aee2af56b2e0916a06b62" => :sierra - end - - head do - url "http://git.veripool.org/git/verilator", :using => :git - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - skip_clean "bin" # Allows perl scripts to keep their executable flag - - # Needs a newer flex on Lion (and presumably below) - # https://www.veripool.org/issues/720-Verilator-verilator-not-building-on-Mac-OS-X-Lion-10-7- - depends_on "flex" if MacOS.version <= :lion - - def install - system "autoconf" if build.head? - system "./configure", "--prefix=#{prefix}" - # `make` and `make install` need to be separate for parallel builds - system "make" - system "make", "install" - end - - test do - (testpath/"test.v").write <<~EOS - module test; - initial begin $display("Hello World"); $finish; end - endmodule - EOS - (testpath/"test.cpp").write <<~EOS - #include "Vtest.h" - #include "verilated.h" - int main(int argc, char **argv, char **env) { - Verilated::commandArgs(argc, argv); - Vtest* top = new Vtest; - while (!Verilated::gotFinish()) { top->eval(); } - delete top; - exit(0); - } - EOS - system "/usr/bin/perl", bin/"verilator", "-Wall", "--cc", "test.v", "--exe", "test.cpp" - cd "obj_dir" do - system "make", "-j", "-f", "Vtest.mk", "Vtest" - expected = <<~EOS - Hello World - - test.v:2: Verilog $finish - EOS - assert_equal expected, shell_output("./Vtest") - end - end -end diff --git a/Formula/vert.rb b/Formula/vert.rb deleted file mode 100644 index 33e976b5fa6dd..0000000000000 --- a/Formula/vert.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Vert < Formula - desc "Command-line version testing" - homepage "https://github.com/Masterminds/vert" - url "https://github.com/Masterminds/vert/archive/v0.1.0.tar.gz" - sha256 "96e22de4c03c0a5ae1afb26c717f211c85dd74c8b7a9605ff525c87e66d19007" - - bottle do - cellar :any_skip_relocation - sha256 "a2fbb031b72d6b4524dc31add5536acef1fdb913c5db28240bd4352c107da638" => :mojave - sha256 "b7c63c671335e19afca83f08091a987c35576eb4cb94f1d7b00490d1448f3e77" => :high_sierra - sha256 "e189a592a062ef9e2cc19506f99272ffc9f97f3e529a54eddd7287f0c9574935" => :sierra - sha256 "534043c69cbd56a22d656ba873e180e628b3a0ace433d8f020b886212afa050e" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/Masterminds/vert").install buildpath.children - cd "src/github.com/Masterminds/vert" do - system "dep", "ensure", "-vendor-only" - system "make", "build" - bin.install "vert" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/vert 1.2.3 1.2.3 1.2.4 1.2.5", 2) - assert_match "1.2.3", output - end -end diff --git a/Formula/vert.x.rb b/Formula/vert.x.rb deleted file mode 100644 index fc7a1ca7c7e5b..0000000000000 --- a/Formula/vert.x.rb +++ /dev/null @@ -1,30 +0,0 @@ -class VertX < Formula - desc "Toolkit for building reactive applications on the JVM" - homepage "https://vertx.io/" - url "https://dl.bintray.com/vertx/downloads/vert.x-3.6.2-full.tar.gz" - sha256 "0157c9ee2db462f83dbc1b7f56d89c6b9b88eff58da1d0406b4f38b44c7d3b71" - - bottle :unneeded - depends_on :java => "1.8+" - - def install - rm_f Dir["bin/*.bat"] - libexec.install %w[bin conf lib] - bin.install_symlink "#{libexec}/bin/vertx" - end - - test do - (testpath/"HelloWorld.java").write <<~EOS - import io.vertx.core.AbstractVerticle; - public class HelloWorld extends AbstractVerticle { - public void start() { - System.out.println("Hello World!"); - vertx.close(); - System.exit(0); - } - } - EOS - output = shell_output("#{bin}/vertx run HelloWorld.java") - assert_equal "Hello World!\n", output - end -end diff --git a/Formula/vf.rb b/Formula/vf.rb deleted file mode 100644 index 210afc111fc00..0000000000000 --- a/Formula/vf.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Vf < Formula - desc "Enhanced version of `cd` command" - homepage "https://github.com/glejeune/vf" - url "https://github.com/glejeune/vf/archive/0.0.1.tar.gz" - sha256 "6418d188b88d5f3885b7a8d24520ac47accadb5144ae24e836aafbea4bd41859" - head "https://github.com/glejeune/vf.git" - - bottle :unneeded - - def install - # Since the shell file is sourced instead of run - # install to prefix instead of bin - prefix.install Dir["*"] - end - - def caveats; <<~EOS - To complete installation, add the following line to your shell's rc file: - source #{opt_prefix}/vf.sh - EOS - end - - test do - (testpath/"test").mkpath - assert_equal "cd test", shell_output("ruby #{prefix}/vf.rb test").chomp - end -end diff --git a/Formula/vfuse.rb b/Formula/vfuse.rb deleted file mode 100644 index 248f266125bd6..0000000000000 --- a/Formula/vfuse.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Vfuse < Formula - desc "Convert bootable DMG images for use in VMware Fusion" - homepage "https://github.com/chilcote/vfuse" - url "https://github.com/chilcote/vfuse/archive/2.0.9.tar.gz" - sha256 "527a6f620387e8ad278fb3c1fa329155f6b23215cf8902c4ba51ce4d48560aaa" - - bottle :unneeded - - def install - bin.install Dir["pkgroot/usr/local/vfuse/bin/*"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/vfuse --version") - end -end diff --git a/Formula/vgmstream.rb b/Formula/vgmstream.rb deleted file mode 100644 index 8c55a24d87cc4..0000000000000 --- a/Formula/vgmstream.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Vgmstream < Formula - desc "Library for playing streamed audio formats from video games" - homepage "https://hcs64.com/vgmstream.html" - url "https://github.com/kode54/vgmstream/archive/r1040.tar.gz" - version "r1040" - sha256 "0ff6534a4049b27b01caf209811b87b1bfe445f94e141a5fe601f2dae9d03c89" - head "https://github.com/kode54/vgmstream.git" - - bottle do - cellar :any - rebuild 2 - sha256 "dd7dae465bb50700fcf448c3a5fc0478600c6151eeade7196c88202aa19c2f4f" => :mojave - sha256 "970428e954d82c2aaef2da083320fabd21ae7ba866fd2055d5fdcdd21f2989b0" => :high_sierra - sha256 "b85d6942270fc9024de56e4fe08618f7ffce1499f4c9faf3f31b246310a17511" => :sierra - sha256 "980226be71f7ba16f71e7cd4ba53a4160c03cf9308036d014538b1feb8285d08" => :el_capitan - end - - depends_on "libvorbis" - depends_on "mpg123" - - def install - cd "test" do - system "make" - bin.install "test" => "vgmstream" - lib.install "../src/libvgmstream.a" - end - end - - test do - assert_match "decode", shell_output("#{bin}/vgmstream 2>&1", 1) - end -end diff --git a/Formula/vice.rb b/Formula/vice.rb deleted file mode 100644 index 83229f3464f29..0000000000000 --- a/Formula/vice.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Vice < Formula - desc "Versatile Commodore Emulator" - homepage "https://vice-emu.sourceforge.io/" - url "https://downloads.sourceforge.net/project/vice-emu/releases/vice-3.3.tar.gz" - sha256 "1a55b38cc988165b077808c07c52a779d181270b28c14b5c9abf4e569137431d" - - bottle do - sha256 "0b76399d14543c4b7d8ef37779b2d1f79861dd2647650b8739f7f77cfaba4de5" => :mojave - sha256 "5e4241d38f267003d787c07968e071774b6491c7969cd9df476acd25e4235dca" => :high_sierra - sha256 "06f42f2f85f32bb8630513d7d809545e49da9e8ff9b0053a26a0b068886cee79" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "texinfo" => :build - depends_on "xa" => :build - depends_on "yasm" => :build - depends_on "ffmpeg" - depends_on "flac" - depends_on "giflib" - depends_on "jpeg" - depends_on "lame" - depends_on "libogg" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mpg123" - depends_on "portaudio" - depends_on "sdl2" - depends_on "xz" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-arch", - "--disable-bundle", - "--enable-external-ffmpeg", - "--enable-sdlui2" - system "make", "install" - end - - def caveats; <<~EOS - App bundles are no longer built for each emulator. The binaries are - available in #{HOMEBREW_PREFIX}/bin directly instead. - EOS - end - - test do - assert_match "Usage", shell_output("#{bin}/petcat -help", 1) - end -end diff --git a/Formula/viennacl.rb b/Formula/viennacl.rb deleted file mode 100644 index 1a16fbe33ba86..0000000000000 --- a/Formula/viennacl.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Viennacl < Formula - desc "Linear algebra library for many-core architectures and multi-core CPUs" - homepage "https://viennacl.sourceforge.io/" - url "https://downloads.sourceforge.net/project/viennacl/1.7.x/ViennaCL-1.7.1.tar.gz" - sha256 "a596b77972ad3d2bab9d4e63200b171cd0e709fb3f0ceabcaf3668c87d3a238b" - head "https://github.com/viennacl/viennacl-dev.git" - - bottle do - cellar :any_skip_relocation - sha256 "0d2ae6a32779520d35e8194948a0df499bc147743fd54f59fe3c69e833e84f1c" => :mojave - sha256 "7be4bc5f161868a9646a575530acd83034e7af6e39439e262c499b219738e74e" => :high_sierra - sha256 "809b0ff014ad6fdae2337ac8dd0cde29c72fe4cb8817a7e7417e9722b7572059" => :sierra - sha256 "cb5cd96fd4c730518b6b0e150fd15386ad71576e444bfbbd5f055e844d4a5976" => :el_capitan - sha256 "875f61b8270246247450c0beedc9710b52d07171717dd2f9de9a493f3b4027b6" => :yosemite - sha256 "7256e29352bcf349fda479ef6913241249db48065ce64e7daee8cfe7b96c88fd" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - libexec.install "#{buildpath}/examples/benchmarks/dense_blas-bench-cpu" => "test" - end - - test do - system "#{opt_libexec}/test" - end -end diff --git a/Formula/viewvc.rb b/Formula/viewvc.rb deleted file mode 100644 index c8fd43fa92643..0000000000000 --- a/Formula/viewvc.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Viewvc < Formula - desc "Browser interface for CVS and Subversion repositories" - homepage "http://www.viewvc.org" - url "https://github.com/viewvc/viewvc/releases/download/1.1.26/viewvc-1.1.26.tar.gz" - sha256 "9d718237df7fc04d511302812c0bec0363cf6b8334ab796953a764c2de426e43" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "d9768a4c14c2c7cf7a8318b1b5ed4b6a2e74702b1018402e6e454e2df05bc0f1" => :mojave - sha256 "dd3b0a77e2eb08bbec7f5a0b14744f2dcc7894d4da9702d1e489e901c8e9a4f0" => :high_sierra - sha256 "dd3b0a77e2eb08bbec7f5a0b14744f2dcc7894d4da9702d1e489e901c8e9a4f0" => :sierra - sha256 "dd3b0a77e2eb08bbec7f5a0b14744f2dcc7894d4da9702d1e489e901c8e9a4f0" => :el_capitan - end - - depends_on "subversion" - - def install - system "python", "./viewvc-install", "--prefix=#{libexec}", "--destdir=" - Pathname.glob(libexec/"bin/*") do |f| - next if f.directory? - bin.install_symlink f => "viewvc-#{f.basename}" - end - end - - test do - require "net/http" - require "uri" - - begin - pid = fork { exec "#{bin}/viewvc-standalone.py", "--port=9000" } - sleep 2 - uri = URI.parse("http://127.0.0.1:9000/viewvc") - Net::HTTP.get_response(uri) # First request always returns 400 - assert_equal "200", Net::HTTP.get_response(uri).code - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/vifm.rb b/Formula/vifm.rb deleted file mode 100644 index 75f10c1917437..0000000000000 --- a/Formula/vifm.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Vifm < Formula - desc "Ncurses based file manager with vi like keybindings" - homepage "https://vifm.info/" - url "https://github.com/vifm/vifm/releases/download/v0.9.1/vifm-0.9.1.tar.bz2" - sha256 "28b9a4b670d9ddc9af8c9804dc22fa93f4fd0adabce94d43ebedc157a5dce7b3" - - bottle do - sha256 "f390e5effa7cc533944c35e9ea4f389b0ab38780f2011c69de759e8bc7dbe784" => :mojave - sha256 "85ed156c78b6259286e1bbde0559efbb7d184f061f1fe6d7dfa3c9e73262cbce" => :high_sierra - sha256 "7123769c4a1a3ea3e59871d3150182bbf3da2d98a4036b3a06a39ebacfaf65ed" => :sierra - sha256 "88bda24c638a68880447a6e10dcfa06ac2e49a2b77415b6a85ac3dfd33c20114" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-gtk", - "--without-libmagic", - "--without-X11" - system "make" - system "make", "check" - ENV.deparallelize { system "make", "install" } - end - - test do - assert_match version.to_s, shell_output("#{bin}/vifm --version") - end -end diff --git a/Formula/vilistextum.rb b/Formula/vilistextum.rb deleted file mode 100644 index 0f66fdeebbad2..0000000000000 --- a/Formula/vilistextum.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Vilistextum < Formula - desc "HTML to text converter" - homepage "https://bhaak.net/vilistextum/" - url "https://bhaak.net/vilistextum/vilistextum-2.6.9.tar.gz" - sha256 "3a16b4d70bfb144e044a8d584f091b0f9204d86a716997540190100c20aaf88d" - - bottle do - cellar :any_skip_relocation - sha256 "c36418e1556b9f5f9c0126811fddca3149137abfed6b36596ec4612c3806a3ec" => :mojave - sha256 "6005ce3b4c593707dfe7ffbc10ea64f26ce6e441803a9133ab46ba0fbaee422f" => :high_sierra - sha256 "b8fa6ddde71b9b86128e12bbc343935ca5ec58e15d28da2a1a9972a23df9becd" => :sierra - sha256 "d46bae51c7e9a7193a735660af8583960c98e50f03aa33c8a9d81c22b2d9bf61" => :el_capitan - sha256 "77ab66b58db8649e9444584b5ee85e6c6c7badeb665425263c50282367eea003" => :yosemite - sha256 "be608cbb3892c81f92392253a86456f042e804b55c58e1331a01531781137f74" => :mavericks - sha256 "40d71172fde61fe9bb297b411fabb64bcc2b915036da2a531c56e1d84382131d" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/vilistextum", "-v" - end -end diff --git a/Formula/vim.rb b/Formula/vim.rb deleted file mode 100644 index 501e52cc6e3bd..0000000000000 --- a/Formula/vim.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Vim < Formula - desc "Vi 'workalike' with many additional features" - homepage "https://www.vim.org/" - # vim should only be updated every 50 releases on multiples of 50 - url "https://github.com/vim/vim/archive/v8.1.0700.tar.gz" - sha256 "7a41eb920cbf1301cede574808d53fc7a90b3f782567de94b858f6c7ee0fa484" - head "https://github.com/vim/vim.git" - - bottle do - cellar :any - sha256 "98c32d97b47e62280e4143c230d48f6e77b220a5e06995d382b9403038c5c119" => :mojave - sha256 "eaf2c7cca624c5652d5cca698beeb7958abaae44ad0149aaaecc49f572007222" => :high_sierra - sha256 "f2026bf664684ba4a9c43c47ba37077b5016ca62b6a9d87d62220bf9acbccb39" => :sierra - end - - depends_on "gettext" - depends_on "lua" - depends_on "perl" - depends_on "python" - depends_on "ruby" - - conflicts_with "ex-vi", - :because => "vim and ex-vi both install bin/ex and bin/view" - - conflicts_with "macvim", - :because => "vim and macvim both install vi* binaries" - - def install - ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin" - - # https://github.com/Homebrew/homebrew-core/pull/1046 - ENV.delete("SDKROOT") - - # vim doesn't require any Python package, unset PYTHONPATH. - ENV.delete("PYTHONPATH") - - # We specify HOMEBREW_PREFIX as the prefix to make vim look in the - # the right place (HOMEBREW_PREFIX/share/vim/{vimrc,vimfiles}) for - # system vimscript files. We specify the normal installation prefix - # when calling "make install". - # Homebrew will use the first suitable Perl & Ruby in your PATH if you - # build from source. Please don't attempt to hardcode either. - system "./configure", "--prefix=#{HOMEBREW_PREFIX}", - "--mandir=#{man}", - "--enable-multibyte", - "--with-tlib=ncurses", - "--enable-cscope", - "--enable-terminal", - "--with-compiledby=Homebrew", - "--enable-perlinterp", - "--enable-rubyinterp", - "--enable-python3interp", - "--enable-gui=no", - "--without-x", - "--enable-luainterp", - "--with-lua-prefix=#{Formula["lua"].opt_prefix}" - system "make" - # Parallel install could miss some symlinks - # https://github.com/vim/vim/issues/1031 - ENV.deparallelize - # If stripping the binaries is enabled, vim will segfault with - # statically-linked interpreters like ruby - # https://github.com/vim/vim/issues/114 - system "make", "install", "prefix=#{prefix}", "STRIP=#{which "true"}" - bin.install_symlink "vim" => "vi" - end - - test do - (testpath/"commands.vim").write <<~EOS - :python3 import vim; vim.current.buffer[0] = 'hello python3' - :wq - EOS - system bin/"vim", "-T", "dumb", "-s", "commands.vim", "test.txt" - assert_equal "hello python3", File.read("test.txt").chomp - assert_match "+gettext", shell_output("#{bin}/vim --version") - end -end diff --git a/Formula/vim@7.4.rb b/Formula/vim@7.4.rb deleted file mode 100644 index 08dd027ef82bf..0000000000000 --- a/Formula/vim@7.4.rb +++ /dev/null @@ -1,103 +0,0 @@ -class VimAT74 < Formula - desc "Vi 'workalike' with many additional features" - homepage "https://www.vim.org/" - url "https://github.com/vim/vim/archive/v7.4.2367.tar.gz" - sha256 "a9ae4031ccd73cc60e771e8bf9b3c8b7f10f63a67efce7f61cd694cd8d7cda5c" - revision 18 - - bottle do - cellar :any - sha256 "18867439556347ed829fc7bef2865f957bd8785b0ac44629e687cdedb6b624ba" => :mojave - sha256 "d6b2ef5343bb627902044c1b7308247313a01c4423e66218748bd33d836ceda0" => :high_sierra - sha256 "4f7321b2f4a244b305c78666aefe4c45a3cb832f75b67d60b26f180f4e5391f6" => :sierra - end - - keg_only :versioned_formula - - depends_on "lua" - depends_on "perl" - depends_on "python" - depends_on "ruby" - - # Python 3.7 compat - # Equivalent to upstream commit 24 Mar 2018 "patch 8.0.1635: undefining - # _POSIX_THREADS causes problems with Python 3" - # See https://github.com/vim/vim/commit/16d7eced1a08565a9837db8067c7b9db5ed68854 - patch :DATA - - def install - ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin" - - # https://github.com/Homebrew/homebrew-core/pull/1046 - ENV.delete("SDKROOT") - ENV["LUA_PREFIX"] = HOMEBREW_PREFIX if build.with?("lua") || build.with?("luajit") - - # vim doesn't require any Python package, unset PYTHONPATH. - ENV.delete("PYTHONPATH") - - # We specify HOMEBREW_PREFIX as the prefix to make vim look in the - # the right place (HOMEBREW_PREFIX/share/vim/{vimrc,vimfiles}) for - # system vimscript files. We specify the normal installation prefix - # when calling "make install". - # Homebrew will use the first suitable Perl & Ruby in your PATH if you - # build from source. Please don't attempt to hardcode either. - system "./configure", "--prefix=#{HOMEBREW_PREFIX}", - "--mandir=#{man}", - "--enable-multibyte", - "--with-tlib=ncurses", - "--enable-cscope", - "--with-compiledby=Homebrew", - "--enable-perlinterp", - "--enable-rubyinterp", - "--enable-python3interp", - "--enable-gui=no", - "--without-x", - "--enable-luainterp", - "--with-lua-prefix=#{Formula["lua"].opt_prefix}" - system "make" - # Parallel install could miss some symlinks - # https://github.com/vim/vim/issues/1031 - ENV.deparallelize - # If stripping the binaries is enabled, vim will segfault with - # statically-linked interpreters like ruby - # https://github.com/vim/vim/issues/114 - system "make", "install", "prefix=#{prefix}", "STRIP=#{which "true"}" - bin.install_symlink "vim" => "vi" if build.with? "override-system-vi" - end - - test do - if build.with? "python@2" - (testpath/"commands.vim").write <<~EOS - :python import vim; vim.current.buffer[0] = 'hello world' - :wq - EOS - system bin/"vim", "-T", "dumb", "-s", "commands.vim", "test.txt" - assert_equal "hello world", File.read("test.txt").chomp - elsif build.with? "python" - (testpath/"commands.vim").write <<~EOS - :python3 import vim; vim.current.buffer[0] = 'hello python3' - :wq - EOS - system bin/"vim", "-T", "dumb", "-s", "commands.vim", "test.txt" - assert_equal "hello python3", File.read("test.txt").chomp - end - end -end - -__END__ -diff --git a/src/if_python3.c b/src/if_python3.c -index 02d913492c..59c115dd8d 100644 ---- a/src/if_python3.c -+++ b/src/if_python3.c -@@ -34,11 +34,6 @@ - - #include - --/* Python.h defines _POSIX_THREADS itself (if needed) */ --#ifdef _POSIX_THREADS --# undef _POSIX_THREADS --#endif -- - #if defined(_WIN32) && defined(HAVE_FCNTL_H) - # undef HAVE_FCNTL_H - #endif diff --git a/Formula/vimpager.rb b/Formula/vimpager.rb deleted file mode 100644 index 03fccffdd7b5d..0000000000000 --- a/Formula/vimpager.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Vimpager < Formula - desc "Use ViM as PAGER" - homepage "https://github.com/rkitover/vimpager" - url "https://github.com/rkitover/vimpager/archive/2.06.tar.gz" - sha256 "cc616d0840a6f2501704eea70de222ab662421f34b2da307e11fb62aa70bda5d" - head "https://github.com/rkitover/vimpager.git" - - bottle do - cellar :any_skip_relocation - sha256 "f4ec02de4d30af041e98f3ab4ce6344424f7a8f5bfeca6cf21dc179cbd6e576a" => :mojave - sha256 "73aaa39c9876664b2f0b0a98dea30ea34e05504f28d607276873345d57b97834" => :high_sierra - sha256 "308c68e761983beb317bbefcba285022dbc74a66486a3da7e2ac8bc929649a3a" => :sierra - sha256 "eccfe695299ff91b489e0385b2024e6f383426f696dc4a5462fe2e0bc6f875b1" => :el_capitan - sha256 "be8ae8e77106e1fa95821b59171b982af74365693be0b416e41bb807a07c6c60" => :yosemite - sha256 "4e751d2207b8925e1c229edb88a7f635d41aa611a576a1b7a9bf0b9b701df341" => :mavericks - end - - depends_on "pandoc" => :build - - def install - system "make", "install", "PREFIX=#{prefix}" - system "make", "docs" - end - - def caveats; <<~EOS - To use vimpager as your default pager, add `export PAGER=vimpager` to your - shell configuration. - EOS - end - - test do - (testpath/"test.txt").write <<~EOS - This is test - EOS - - assert_match(/This is test/, shell_output("#{bin}/vimcat test.txt")) - end -end diff --git a/Formula/vimpc.rb b/Formula/vimpc.rb deleted file mode 100644 index 50e916fe9540f..0000000000000 --- a/Formula/vimpc.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Vimpc < Formula - desc "Ncurses based mpd client with vi like key bindings" - homepage "https://sourceforge.net/projects/vimpc/" - url "https://downloads.sourceforge.net/project/vimpc/Release%200.09.1/vimpc-0.09.1.tar.gz" - sha256 "082fa9974e01bf563335ebf950b2f9bc129c0d05c0c15499f7827e8418306031" - revision 1 - - bottle do - sha256 "8309ae13a377c616044dc14b47c0b086773742070ca2fa9ad1aaca19101d4b80" => :mojave - sha256 "cfbf82448637f02a2df18f3e48cae13d693335a8c18ceda70178cee16cf263ce" => :high_sierra - sha256 "b82c822bb057772a0edce2c5a8f61863efd130b682b67eae3c27c287674b3839" => :sierra - sha256 "9114eadfce8e890ea003ef9ea763905dcd47e6a9dc72e8388071721ebabd1820" => :el_capitan - sha256 "2cdc5fc0899ac53a35ae1e1ee99eb0e282750277a407699d37afe419068ffce3" => :yosemite - end - - head do - url "https://github.com/boysetsfrog/vimpc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "boost" => :build unless MacOS.version >= :mavericks - depends_on "libmpdclient" - depends_on "pcre" - depends_on "taglib" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/vimpc", "-v" - end -end diff --git a/Formula/vip.rb b/Formula/vip.rb deleted file mode 100644 index 4a88b1bdf67e8..0000000000000 --- a/Formula/vip.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Vip < Formula - desc "Program that provides for interactive editing in a pipeline" - homepage "https://www.cs.duke.edu/~des/vip.html" - url "https://www.cs.duke.edu/~des/scripts/vip" - version "19971113" - sha256 "171278e8bd43abdbd3a4c35addda27a0d3c74fc784dbe60e4783d317ac249d11" - - bottle do - cellar :any_skip_relocation - sha256 "da936f8d9a839a1235962c772ae957563c13f089d5953df7c1ba64b694cb0687" => :mojave - sha256 "5622623485848fc1e4238404c3491f056f4220c6a80fbe9342ec89cd34b15bcb" => :high_sierra - sha256 "12eec6f5294a94f2fb09c54f218470aab2fb7bad58570e8a82c789d8ba5e9639" => :sierra - sha256 "1bf2041f43bcea1e8c503119a9b34f8849b751da767ec5b5094fd5fa8fe5f297" => :el_capitan - sha256 "8e60ec9a240192f872f5d730ca93c9bc9e73d4644e685173554ff786b634ef7c" => :yosemite - sha256 "96ae6a94171da559b1762970dc99b1c458ccd68c061d40248879d16bb6df8511" => :mavericks - end - - resource "man" do - url "https://www.cs.duke.edu/~des/scripts/vip.man" - sha256 "37b2753f7c7b39c81f97b10ea3f8e2dd5ea92ea8d130144fa99ed54306565f6f" - end - - # use awk and /var/tmp as temporary directory - patch :DATA - - def install - bin.install "vip" - resource("man").stage do - man1.install "vip.man" => "vip.1" - end - end -end - - -__END__ -diff --git a/vip b/vip -index f150167..e517675 100644 ---- a/vip -+++ b/vip -@@ -66,7 +66,7 @@ Usage: $PROG [ -no ] [ command ] - otherwise stdin is used; - " - --: ${TMPDIR:="/usr/tmp"} # where temp. files go -+: ${TMPDIR:="/var/tmp"} # where temp. files go - TEMP_FILE="$TMPDIR/$PROG.$$" # temp. file to hold data to edit - COMMAND="cat" # default command to produce input - DFLT_ED="vi" # default editor -@@ -81,6 +81,10 @@ case "$SYS" in - ;; - "HP-UX "*) - AWK=awk -+ ;; -+ "Darwin "*) -+ AWK=awk -+ ;; - esac - - # diff --git a/Formula/vips.rb b/Formula/vips.rb deleted file mode 100644 index a9c6dbc374daf..0000000000000 --- a/Formula/vips.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Vips < Formula - desc "Image processing library" - homepage "https://github.com/libvips/libvips" - url "https://github.com/libvips/libvips/releases/download/v8.7.3/vips-8.7.3.tar.gz" - sha256 "03e0ed90d63b4e2d7d60ea5bd97283d0f5b1388c6c363e27ec9d34b624b6f5aa" - - bottle do - sha256 "9628bd3b483f97730039c7ba6642cea42d3c87549537f5b6c3a5677b4cd4eb0c" => :mojave - sha256 "af3fcb3fbf417786b58c2c0d7c98235a022e9cbde83f4b5ebd728625acdbc4d8" => :high_sierra - sha256 "d2482e8515b7b082c4e09bf8a3e23c22047ecea22c8c0d0b9802012259ed14e1" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "fontconfig" - depends_on "gettext" - depends_on "giflib" - depends_on "glib" - depends_on "graphicsmagick" - depends_on "jpeg" - depends_on "libexif" - depends_on "libgsf" - depends_on "libpng" - depends_on "librsvg" - depends_on "libtiff" - depends_on "little-cms2" - depends_on "openexr" - depends_on "openslide" - depends_on "orc" - depends_on "pango" - depends_on "poppler" - depends_on "webp" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-magick - --with-magickpackage=GraphicsMagick - ] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/vips", "-l" - cmd = "#{bin}/vipsheader -f width #{test_fixtures("test.png")}" - assert_equal "8", shell_output(cmd).chomp - end -end diff --git a/Formula/virtualhost.sh.rb b/Formula/virtualhost.sh.rb deleted file mode 100644 index 5191316d71a5d..0000000000000 --- a/Formula/virtualhost.sh.rb +++ /dev/null @@ -1,13 +0,0 @@ -class VirtualhostSh < Formula - desc "Script for macOS to create Apache virtual hosts" - homepage "https://github.com/virtualhost/virtualhost.sh" - url "https://github.com/virtualhost/virtualhost.sh/archive/1.35.tar.gz" - sha256 "75d34b807e71acd253876c6a99cdbc11ce31ffb159155373c83a99af862fffcc" - head "https://github.com/virtualhost/virtualhost.sh.git" - - bottle :unneeded - - def install - bin.install "virtualhost.sh" - end -end diff --git a/Formula/virtualpg.rb b/Formula/virtualpg.rb deleted file mode 100644 index b6681050fa460..0000000000000 --- a/Formula/virtualpg.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Virtualpg < Formula - desc "Loadable dynamic extension for SQLite and SpatiaLite" - homepage "https://www.gaia-gis.it/fossil/virtualpg/index" - url "https://www.gaia-gis.it/gaia-sins/virtualpg-1.0.2.tar.gz" - sha256 "37abd56b2899c90b355e50d843ba019af540b83e7af1da110a766f041abb514e" - - bottle do - cellar :any - sha256 "11f87cc36cdd1bc00799f4d877b7c25c6ffae17c32322041831cec002d927c8d" => :mojave - sha256 "2e7d844424706349b16cbbf1f7ab6fd257703ed8de3347277090c75cadb491b8" => :high_sierra - sha256 "1d61bc6b83f9584e6a787b614f475177fe98472bc6fa697c1a6695dfe6f65701" => :sierra - sha256 "47b8d302bde32565c4b1a627041fda8df645b4349d3eb5ff250b266309d47271" => :el_capitan - end - - depends_on "libspatialite" - depends_on "postgis" - - def install - # New SQLite3 extension won't load via SELECT load_extension('mod_virtualpg'); - # unless named mod_virtualpg.dylib (should actually be mod_virtualpg.bundle) - # See: https://groups.google.com/forum/#!topic/spatialite-users/EqJAB8FYRdI - # needs upstream fixes in both SQLite and libtool - inreplace "configure", - "shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'", - "shrext_cmds='.dylib'" - - system "./configure", "--enable-shared=yes", - "--disable-dependency-tracking", - "--with-pgconfig=#{Formula["postgresql"].opt_bin}/pg_config", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Verify mod_virtualpg extension can be loaded using Homebrew's SQLite - system "echo", "\" SELECT load_extension('#{opt_lib}/mod_virtualpg');\" | #{Formula["sqlite"].opt_bin}/sqlite3" - end -end diff --git a/Formula/virtuoso.rb b/Formula/virtuoso.rb deleted file mode 100644 index 75a26a9f10da6..0000000000000 --- a/Formula/virtuoso.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Virtuoso < Formula - desc "High-performance object-relational SQL database" - homepage "https://virtuoso.openlinksw.com/wiki/main/" - url "https://github.com/openlink/virtuoso-opensource/releases/download/v7.2.5.1/virtuoso-opensource-7.2.5.tar.gz" - # Upstream pushed a hot-fix retag of 7.2.5 as 7.2.5.1. - # This explicit version should be safe to remove next release. - version "7.2.5.1" - sha256 "826477d25a8493a68064919873fb4da4823ebe09537c04ff4d26ba49d9543d64" - - bottle do - cellar :any - sha256 "699c3f1bf4711cc0ec3a0c81f69047fcf721f4f2a38db629858f7b155217d1f8" => :mojave - sha256 "b01c3c149c4f025ea1456fc5a5d3c5ca68eb6d99797226e35204dbd80cb43cb1" => :high_sierra - sha256 "b7df838df0d82a95a0f7fc40177b5fb94fb0e47559d559c75baa473af7956b92" => :sierra - sha256 "4bacfd4bbaf1d4a048a68f4993b06fc2b6a9a2c1145f9cea78fb8fbff23166a1" => :el_capitan - end - - head do - url "https://github.com/openlink/virtuoso-opensource.git", :branch => "develop/7" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - # If gawk isn't found, make fails deep into the process. - depends_on "gawk" => :build - depends_on "openssl" - - conflicts_with "unixodbc", :because => "Both install `isql` binaries." - - skip_clean :la - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - def caveats; <<~EOS - NOTE: the Virtuoso server will start up several times on port 1111 - during the install process. - EOS - end - - test do - system bin/"virtuoso-t", "+checkpoint-only" - end -end diff --git a/Formula/vis.rb b/Formula/vis.rb deleted file mode 100644 index 80d80ef7c3108..0000000000000 --- a/Formula/vis.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Vis < Formula - desc "Vim-like text editor" - homepage "https://github.com/martanne/vis" - url "https://github.com/martanne/vis/archive/v0.5.tar.gz" - sha256 "77ea70ebc9c811d88e32199ef5b3ee9b834ac1e880fb61b6d2460f93f0587df5" - head "https://github.com/martanne/vis.git" - - bottle do - rebuild 1 - sha256 "93c11117e6a40af5059b02810737dbb1cd494a1eae88acc0d0230d0afeae4768" => :mojave - sha256 "da6c3c09d9b53f77c0aecbdd99d145447ed12505f3d2103532502415b53f4564" => :high_sierra - sha256 "831f3f4424b231e086784a1741eb1bdc94b5134fa220176a24848f7f226634ab" => :sierra - sha256 "d902e9dbb59c21ab7b8d3476c9125a160c8633599ed1097caa001f32ac50f3b4" => :el_capitan - end - - depends_on "luarocks" => :build - depends_on "pkg-config" => :build - depends_on "libtermkey" - depends_on "lua" - - resource "lpeg" do - url "https://luarocks.org/manifests/gvvaughan/lpeg-1.0.1-1.src.rock" - sha256 "149be31e0155c4694f77ea7264d9b398dd134eca0d00ff03358d91a6cfb2ea9d" - end - - def install - luapath = libexec/"vendor" - ENV["LUA_PATH"] = "#{luapath}/share/lua/5.3/?.lua" - ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so" - - resource("lpeg").stage do - system "luarocks", "build", "lpeg", "--tree=#{luapath}" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - - env = { :LUA_PATH => ENV["LUA_PATH"], :LUA_CPATH => ENV["LUA_CPATH"] } - bin.env_script_all_files(libexec/"bin", env) - # Rename vis & the matching manpage to avoid clashing with the system. - mv bin/"vis", bin/"vise" - mv man1/"vis.1", man1/"vise.1" - end - - def caveats; <<~EOS - To avoid a name conflict with the macOS system utility /usr/bin/vis, - this text editor must be invoked by calling `vise` ("vis-editor"). - EOS - end - - test do - assert_match "vis v#{version} +curses +lua", shell_output("#{bin}/vise -v 2>&1") - end -end diff --git a/Formula/visionmedia-watch.rb b/Formula/visionmedia-watch.rb deleted file mode 100644 index 25ad296a7a9f0..0000000000000 --- a/Formula/visionmedia-watch.rb +++ /dev/null @@ -1,25 +0,0 @@ -class VisionmediaWatch < Formula - desc "Periodically executes the given command" - homepage "https://github.com/visionmedia/watch" - url "https://github.com/visionmedia/watch/archive/0.3.1.tar.gz" - sha256 "769196a9f33d069b1d6c9c89e982e5fdae9cfccd1fd4000d8da85e9620faf5a6" - head "https://github.com/visionmedia/watch.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "03a1d48222a068e547401e4d37c702fe5d15ce05d625c9a41c356be8ee70c4d6" => :mojave - sha256 "8214381e2ca4562345192b1b88a732f2f8fdfbfc3d107649c652e2985be4ef52" => :high_sierra - sha256 "2d0df99a4e8b377f064c393a4e349cf12374df139a3cf04f76dd8b69f2558d39" => :sierra - sha256 "b43dbb305fcb6c681d2208456a1f39dd0aa5b97790b629ac907a666869119f20" => :el_capitan - sha256 "4d31b501672801394c687aa45a44741f3461fb4730e96fe94197a1e7952fe2e0" => :yosemite - sha256 "941cd639bf71a7d0e7397b77a3eebce4bd06fbc4ef30aac69147b04b3f6569f8" => :mavericks - end - - conflicts_with "watch" - - def install - bin.mkdir - system "make", "PREFIX=#{prefix}", "install" - end -end diff --git a/Formula/visitors.rb b/Formula/visitors.rb deleted file mode 100644 index 8c02cc7339c35..0000000000000 --- a/Formula/visitors.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Visitors < Formula - desc "Web server log analyzer" - homepage "http://www.hping.org/visitors/" - url "http://www.hping.org/visitors/visitors-0.7.tar.gz" - sha256 "d2149e33ffe96b1f52b0587cff65973b0bc0b24ec43cdf072a782c1bd52148ab" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1201c09cc18a282ddfcb3ab763332dd138c7a49730ab7decb1c1d991d6e36c2b" => :mojave - sha256 "4d858c628dfc343e09629f930a9bf8b341a55a6afa643ba3695b92e1fe5f4083" => :high_sierra - sha256 "703c1a15a3e29b870f2a37b335a321b258a7e248c665e8d3647bcc61754adcd7" => :sierra - sha256 "60d139c48a4d3c8b457462530893ff11c681e512cf707ba6819a783eb17d3c4c" => :el_capitan - sha256 "2d0a3e1a40e08ae6b4892731b0cd1f3a495e8eba42476630b7863fc057e85df3" => :yosemite - sha256 "c94f334e326f511b486e4b63b5e62ee7a59121ea5d790a8e5854ff4b57abb5e6" => :mavericks - end - - def install - system "make" - - # There is no "make install", so do it manually - bin.install "visitors" - man1.install "visitors.1" - end - - test do - IO.popen("#{bin}/visitors - -o text 2>&1", "w+") do |pipe| - pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:00 -0400] "GET /1 HTTP/1.1" 200 9 - -' - pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:01 -0400] "GET /2 HTTP/1.1" 200 9 - -' - pipe.close_write - assert_match(/Different pages requested: 2/, pipe.read) - end - end -end diff --git a/Formula/visp.rb b/Formula/visp.rb deleted file mode 100644 index 92f5202112b12..0000000000000 --- a/Formula/visp.rb +++ /dev/null @@ -1,192 +0,0 @@ -class Visp < Formula - desc "Visual Servoing Platform library" - homepage "https://visp.inria.fr/" - url "https://gforge.inria.fr/frs/download.php/latestfile/475/visp-3.1.0.tar.gz" - sha256 "2a1df8195b06f9a057bd4c7d987697be2fdcc9d169e8d550fcf68e5d7f129d96" - revision 2 - - bottle do - sha256 "ed11d41df8e68b67795cdde1cc9dc2761bd66b6cb406e0cbc955db90ff066a9e" => :mojave - sha256 "a2b5b96e25a69762a1a6d07ab66bf9790adc9fc436a5a57c29d82f9ca13c426f" => :high_sierra - sha256 "b157bf06ff32d11195abafc2e82b7277e08b76bddeff95690f7a7277735ca118" => :sierra - end - - depends_on "cmake" => :build - depends_on "eigen" - depends_on "gsl" - depends_on "jpeg" - depends_on "libdc1394" - depends_on "libpng" - depends_on "opencv" - depends_on "zbar" - - # Allow compilation with OpenCV 4, remove in next version - # https://github.com/lagadic/visp/issues/373 - # https://github.com/lagadic/visp/commit/547041b8 - patch :DATA - - needs :cxx11 - - def install - ENV.cxx11 - - sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path - - system "cmake", ".", "-DBUILD_DEMOS=OFF", - "-DBUILD_EXAMPLES=OFF", - "-DBUILD_TESTS=OFF", - "-DBUILD_TUTORIALS=OFF", - "-DUSE_DC1394=ON", - "-DDC1394_INCLUDE_DIR=#{Formula["libdc1394"].opt_include}", - "-DDC1394_LIBRARY=#{Formula["libdc1394"].opt_lib}/libdc1394.dylib", - "-DUSE_EIGEN3=ON", - "-DEigen3_DIR=#{Formula["eigen"].opt_share}/eigen3/cmake", - "-DUSE_GSL=ON", - "-DGSL_INCLUDE_DIR=#{Formula["gsl"].opt_include}", - "-DGSL_cblas_LIBRARY=#{Formula["gsl"].opt_lib}/libgslcblas.dylib", - "-DGSL_gsl_LIBRARY=#{Formula["gsl"].opt_lib}/libgsl.dylib", - "-DUSE_JPEG=ON", - "-DJPEG_INCLUDE_DIR=#{Formula["jpeg"].opt_include}", - "-DJPEG_LIBRARY=#{Formula["jpeg"].opt_lib}/libjpeg.dylib", - "-DUSE_LAPACK=OFF", - "-DUSE_LIBUSB_1=OFF", - "-DUSE_OPENCV=ON", - "-DOpenCV_DIR=#{Formula["opencv"].opt_share}/OpenCV", - "-DUSE_PCL=OFF", - "-DUSE_PNG=ON", - "-DPNG_PNG_INCLUDE_DIR=#{Formula["libpng"].opt_include}", - "-DPNG_LIBRARY_RELEASE=#{Formula["libpng"].opt_lib}/libpng.dylib", - "-DUSE_PTHREAD=ON", - "-DPTHREAD_INCLUDE_DIR=#{sdk}/usr/include", - "-DPTHREAD_LIBRARY=/usr/lib/libpthread.dylib", - "-DUSE_PYLON=OFF", - "-DUSE_REALSENSE=OFF", - "-DUSE_REALSENSE2=OFF", - "-DUSE_X11=OFF", - "-DUSE_XML2=ON", - "-DXML2_INCLUDE_DIR=#{sdk}/usr/include/libxml2", - "-DXML2_LIBRARY=/usr/lib/libxml2.dylib", - "-DUSE_ZBAR=ON", - "-DZBAR_INCLUDE_DIRS=#{Formula["zbar"].opt_include}", - "-DZBAR_LIBRARIES=#{Formula["zbar"].opt_lib}/libzbar.dylib", - "-DUSE_ZLIB=ON", - "-DZLIB_INCLUDE_DIR=#{sdk}/usr/include", - "-DZLIB_LIBRARY_RELEASE=/usr/lib/libz.dylib", - "-DWITH_LAPACK=OFF", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() - { - std::cout << VISP_VERSION_MAJOR << "." << VISP_VERSION_MINOR << - "." << VISP_VERSION_PATCH << std::endl; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-o", "test" - assert_equal version.to_s, shell_output("./test").chomp - end -end - -__END__ -diff --git a/modules/core/include/visp3/core/vpImageConvert.h b/modules/core/include/visp3/core/vpImageConvert.h -index 65165748a9f6c2b2145d57247c4575dbfe96ef97..54d32b12e50d935b29656a2735d907e8212005d0 100644 ---- a/modules/core/include/visp3/core/vpImageConvert.h -+++ b/modules/core/include/visp3/core/vpImageConvert.h -@@ -56,21 +56,26 @@ - #include - - #ifdef VISP_HAVE_OPENCV --#if (VISP_HAVE_OPENCV_VERSION >= 0x030000) // Require opencv >= 3.0.0 --#include --#include --#include -+#if (VISP_HAVE_OPENCV_VERSION >= 0x040000) // Require opencv >= 4.0.0 -+# include -+# include -+# include -+# include -+#elif (VISP_HAVE_OPENCV_VERSION >= 0x030000) // Require opencv >= 3.0.0 -+# include -+# include -+# include - #elif (VISP_HAVE_OPENCV_VERSION >= 0x020408) // Require opencv >= 2.4.8 --#include --#include --#include -+# include -+# include -+# include - #elif (VISP_HAVE_OPENCV_VERSION >= 0x020101) // Require opencv >= 2.1.1 --#include --#include --#include --#include -+# include -+# include -+# include -+# include - #else --#include -+# include - #endif - #endif - -diff --git a/modules/vision/include/visp3/vision/vpKeyPoint.h b/modules/vision/include/visp3/vision/vpKeyPoint.h -index d269d22a0c4b2549b6df8f3cbccc8005651a4784..468241311eb87e8b12b8c261c39fc46396a0d549 100644 ---- a/modules/vision/include/visp3/vision/vpKeyPoint.h -+++ b/modules/vision/include/visp3/vision/vpKeyPoint.h -@@ -57,7 +57,7 @@ - #include - #include - #ifdef VISP_HAVE_MODULE_IO --#include -+# include - #endif - #include - #include -@@ -68,20 +68,25 @@ - // Require at least OpenCV >= 2.1.1 - #if (VISP_HAVE_OPENCV_VERSION >= 0x020101) - --#include --#include --#include -- --#if defined(VISP_HAVE_OPENCV_XFEATURES2D) // OpenCV >= 3.0.0 --#include --#elif defined(VISP_HAVE_OPENCV_NONFREE) && (VISP_HAVE_OPENCV_VERSION >= 0x020400) && \ -- (VISP_HAVE_OPENCV_VERSION < 0x030000) --#include --#endif -- --#ifdef VISP_HAVE_XML2 --#include --#endif -+# include -+# include -+# include -+ -+# if (VISP_HAVE_OPENCV_VERSION >= 0x040000) // Require opencv >= 4.0.0 -+# include -+# include -+# endif -+ -+# if defined(VISP_HAVE_OPENCV_XFEATURES2D) // OpenCV >= 3.0.0 -+# include -+# elif defined(VISP_HAVE_OPENCV_NONFREE) && (VISP_HAVE_OPENCV_VERSION >= 0x020400) && \ -+ (VISP_HAVE_OPENCV_VERSION < 0x030000) -+# include -+# endif -+ -+# ifdef VISP_HAVE_XML2 -+# include -+# endif - - /*! - \class vpKeyPoint diff --git a/Formula/vit.rb b/Formula/vit.rb deleted file mode 100644 index 2aa6408cb6ecb..0000000000000 --- a/Formula/vit.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Vit < Formula - desc "Front-end for Task Warrior" - homepage "https://taskwarrior.org/news/news.20140406.html" - url "https://taskwarrior.org/download/vit-1.2.tar.gz" - sha256 "a78dee573130c8d6bc92cf60fafac0abc78dd2109acfba587cb0ae202ea5bbd0" - revision 1 - head "https://github.com/scottkosty/vit.git" - - bottle do - cellar :any_skip_relocation - sha256 "ab438fe55ae7d9fa33079d907a9fd432a9a4c094a9eaf3257592cf1aeadbe8a8" => :mojave - sha256 "d2ffe07bc8ede58d12bcb7401db8f3086eaba071f57b3ec4ce377e0ad18e4d3d" => :high_sierra - sha256 "26c2d6376f2c94d32d11972dbd061e5d4ef1edd31c889a084558339494c34b5b" => :sierra - sha256 "148f01bcfe731892cbfbc63eb9e8d95fded12f07c2d56a7429f8ddea27207f51" => :el_capitan - sha256 "e91023aac9f44f67570d248255fc61ed614091fdfafb16003b49064d90866d91" => :yosemite - sha256 "3f7e65dd15708aaf63ed1d3d3bc948cd020371b35c4537a1366d34a94181767e" => :mavericks - end - - depends_on "task" - - resource "Curses" do - url "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.31.tgz" - sha256 "7bb4623ac97125c85e25f9fbf980103da7ca51c029f704f0aa129b7a2e50a27a" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec+"lib/perl5" - - resource("Curses").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "build" - - bin.install "vit" - man1.install "vit.1" - man5.install "vitrc.5" - # vit-commands needs to be installed in the keg because that's where vit - # will look for it. - (prefix+"etc").install "commands" => "vit-commands" - bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"]) - end -end diff --git a/Formula/vitetris.rb b/Formula/vitetris.rb deleted file mode 100644 index d37990d505aa0..0000000000000 --- a/Formula/vitetris.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Vitetris < Formula - desc "Terminal-based Tetris clone" - homepage "https://www.victornils.net/tetris/" - url "https://www.victornils.net/tetris/vitetris-0.57.tar.gz" - sha256 "0c9fa6c8b16e2f8968f65e16a87f1bcd39b827d510c6efb0771f0400ab91cdc2" - - bottle do - cellar :any_skip_relocation - sha256 "57a4c3d266930344ac69130d2dc5075c25783d0446712ff983ce1b42c69b4a4b" => :mojave - sha256 "1a01bb4e1ac4a04e4cd139683a0593c3ad2aadca28c8c7ed7b2ca1881400ffac" => :high_sierra - sha256 "817866938f1d4df2dcbb69166e187ec4a5d2f61cff83d50725f5112e773c5f34" => :sierra - sha256 "d3d2d0c8a86995742c790418cd4e11bbf46d0ea4efa6b8bd5f372a3df7f9ea2b" => :el_capitan - sha256 "3ce0392ac4a01daeb72ae626eba038f32d4b3acd0ecb3695f0ec57376e1a4039" => :yosemite - end - - # remove a 'strip' option not supported on OS X and root options for - # 'install' - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", "--without-xlib" - system "make", "install" - end - - test do - system "#{bin}/tetris", "-hiscore" - end -end -__END__ ---- a/Makefile 2013-10-07 11:57:18.000000000 +0200 -+++ b/Makefile 2013-10-07 11:57:29.000000000 +0200 -@@ -5,7 +5,7 @@ - # Uncomment to change the default. (Only used in Unix-like systems.) - #HISCORE_FILENAME = /var/games/vitetris-hiscores - --INSTALL = install -oroot -groot -+INSTALL = install - - default: build - @echo Done. -@@ -18,7 +18,7 @@ - cd src; $(MAKE) tetris - mv -f src/tetris$(EXE) $(PROGNAME) - @echo stripping symbols to reduce program size: -- -strip --strip-all $(PROGNAME) -+ -strip $(PROGNAME) - - gameserver: src/netw/gameserver.c - cd src/netw; $(MAKE) gameserver diff --git a/Formula/vmdktool.rb b/Formula/vmdktool.rb deleted file mode 100644 index 853469e688c3e..0000000000000 --- a/Formula/vmdktool.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Vmdktool < Formula - desc "Converts raw filesystems to VMDK files and vice versa" - homepage "https://manned.org/vmdktool" - url "https://people.freebsd.org/~brian/vmdktool/vmdktool-1.4.tar.gz" - sha256 "981eb43d3db172144f2344886040424ef525e15c85f84023a7502b238aa7b89c" - - bottle do - cellar :any_skip_relocation - sha256 "13ed1b70d5c6d7f7411df7736940bf9fcd220fa92b229b79558e648cbdc0a641" => :mojave - sha256 "276a35d178515782c7a741a2ebd45c6b47aee0d7ecfd725c386f589e69336fdc" => :high_sierra - sha256 "3fa294be9d6e9e6b56435526520262aaa86f5909cc10b9ccf9d9670ae3ac0e3c" => :sierra - sha256 "8604a90f9ad0f3b04767c021a4d24dacdcabd788767df56a45e3913231d4336e" => :el_capitan - sha256 "f19ae3ac92ae4400c7139771f3a5ec07d32bf2e3ed49bfa7add445f8a680ef0c" => :yosemite - end - - def install - system "make", "CFLAGS='-D_GNU_SOURCE -g -O -pipe'" - - # The vmdktool Makefile isn't as well-behaved as we'd like: - # 1) It defaults to man page installation in $PREFIX/man instead of - # $PREFIX/share/man, and doesn't recognize '$MANDIR' as a way to - # override this default. - # 2) It doesn't do 'install -d' to create directories before installing - # to them. - # The maintainer (Brian Somers, brian@awfulhak.org) has been notified - # of these issues as of 2017-01-25 but no fix is yet forthcoming. - # There is no public issue tracker for vmdktool that we know of. - # In the meantime, we can work around these issues as follows: - bin.mkpath - man8.mkpath - inreplace "Makefile", "man/man8", "share/man/man8" - - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Create a blank disk image in raw format - system "dd", "if=/dev/zero", "of=blank.raw", "bs=512", "count=20480" - # Use vmdktool to convert to streamOptimized VMDK file - system "#{bin}/vmdktool", "-v", "blank.vmdk", "blank.raw" - # Inspect the VMDK with vmdktool - output = shell_output("#{bin}/vmdktool -i blank.vmdk") - assert_match "RDONLY 20480 SPARSE", output - assert_match "streamOptimized", output - end -end diff --git a/Formula/vmtouch.rb b/Formula/vmtouch.rb deleted file mode 100644 index 10adad99a9544..0000000000000 --- a/Formula/vmtouch.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Vmtouch < Formula - desc "Portable file system cache diagnostics and control" - homepage "https://hoytech.com/vmtouch/" - url "https://github.com/hoytech/vmtouch/archive/v1.3.0.tar.gz" - sha256 "4615980b8f824c8eb164e50ec0880bcb71591f4e3989a6075e5a3e2efd122ceb" - head "https://github.com/hoytech/vmtouch.git" - - bottle do - cellar :any_skip_relocation - sha256 "854bd4ab9a30fbb09adea336b29660bae8cb1b56811d4023822008172736b7de" => :mojave - sha256 "94cbb48095dbd350e29591f055d01789df27991deda9419d42138641e7386274" => :high_sierra - sha256 "036d04749746169bd38c71e8637b235edd6ac8b1cc007a884e094a3004ce1933" => :sierra - sha256 "fa1dd70ebdef2556d84315c28c693f5de9f18ee4b545205a030d1216af58a34a" => :el_capitan - sha256 "e1e4bd20e994a155ea892305cf6c87aac9206bea4a94b2a59439e836ce15a10a" => :yosemite - end - - def install - system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man}" - end - - test do - system bin/"vmtouch", bin/"vmtouch" - end -end diff --git a/Formula/vncsnapshot.rb b/Formula/vncsnapshot.rb deleted file mode 100644 index a522aa149f651..0000000000000 --- a/Formula/vncsnapshot.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Vncsnapshot < Formula - desc "Command-line utility for taking VNC snapshots" - homepage "https://sourceforge.net/projects/vncsnapshot/" - url "https://downloads.sourceforge.net/project/vncsnapshot/vncsnapshot/1.2a/vncsnapshot-1.2a-src.tar.gz" - sha256 "20f5bdf6939a0454bc3b41e87e41a5f247d7efd1445f4fac360e271ddbea14ee" - revision 1 - - bottle do - cellar :any - sha256 "873b5911f289edac2f6af11571981a107f7ed353c281ff0e68a596f0bf77d201" => :mojave - sha256 "76511216d57e76f357ab805fc700f6d777db9d173436d1b65c3de0733352472b" => :high_sierra - sha256 "534d56ed36faf618d5617a1f32b4d7e1fd7cd433a1fc4c64e8c1e9312d53b1c9" => :sierra - sha256 "1069a6f396c574c9efa7f6ac41772807f3d5e53c152a94a42733d64522d0a31d" => :el_capitan - sha256 "efd8f3255029bcb16a554855f3f3fdb7ea59604df888aec6380da1d7330e3094" => :yosemite - end - - depends_on "jpeg" - - patch :DATA # remove old PPC __APPLE__ ifdef from sockets.cxx - - def install - # From Ubuntu - inreplace "rfb.h", "typedef unsigned long CARD32;", - "typedef unsigned int CARD32;" - - system "make" - bin.install "vncsnapshot", "vncpasswd" - man1.install "vncsnapshot.man1" => "vncsnapshot.1" - end -end - -__END__ -diff --git a/sockets.cxx b/sockets.cxx -index ecdf0db..6c827fa 100644 ---- a/sockets.cxx -+++ b/sockets.cxx -@@ -38,9 +38,9 @@ typedef int socklen_t; - #include - #endif - --#ifdef __APPLE__ --typedef int socklen_t; --#endif -+//#ifdef __APPLE__ -+//typedef int socklen_t; -+//#endif - - extern "C" { - #include "vncsnapshot.h" diff --git a/Formula/vnstat.rb b/Formula/vnstat.rb deleted file mode 100644 index de56e99d17e8e..0000000000000 --- a/Formula/vnstat.rb +++ /dev/null @@ -1,89 +0,0 @@ -class Vnstat < Formula - desc "Console-based network traffic monitor" - homepage "https://humdi.net/vnstat/" - url "https://humdi.net/vnstat/vnstat-1.18.tar.gz" - sha256 "d7193592b9e7445fa5cbe8af7d3b39982f165ee8fc58041ff41f509b37c687d5" - head "https://github.com/vergoh/vnstat.git" - - bottle do - sha256 "71d5cfa630f710ba51faad03f8dfba4952af4143fc65b9dbe3c614d2a2ca3700" => :mojave - sha256 "0e0b04bd9787c9f010d26e5ae3541dea2f175ba4978e6e47facfb64d1fa2b1b5" => :high_sierra - sha256 "1dc2fe8f702bdf75b4abd1ac24602f95526dccbec90018bd1e276f1070bf66f1" => :sierra - sha256 "19db09a61e7be5967f4574b22407628fc15d823f8d2f821bcd3cd99b7b564da1" => :el_capitan - end - - depends_on "gd" - - def install - inreplace %w[src/cfg.c src/common.h man/vnstat.1 man/vnstatd.1 man/vnstati.1 - man/vnstat.conf.5].each do |s| - s.gsub! "/etc/vnstat.conf", "#{etc}/vnstat.conf", false - s.gsub! "/var/", "#{var}/", false - s.gsub! "var/lib", "var/db", false - s.gsub! "\"eth0\"", "\"en0\"", false - end - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--sbindir=#{bin}", - "--localstatedir=#{var}" - system "make", "install" - end - - def post_install - (var/"db/vnstat").mkpath - (var/"log/vnstat").mkpath - (var/"run/vnstat").mkpath - end - - def caveats; <<~EOS - To monitor interfaces other than "en0" edit #{etc}/vnstat.conf - EOS - end - - plist_options :startup => true, :manual => "#{HOMEBREW_PREFIX}/opt/vnstat/bin/vnstatd --nodaemon --config #{HOMEBREW_PREFIX}/etc/vnstat.conf" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/vnstatd - --nodaemon - --config - #{etc}/vnstat.conf - - KeepAlive - - RunAtLoad - - WorkingDirectory - #{var} - ProcessType - Background - - - EOS - end - - test do - cp etc/"vnstat.conf", testpath - inreplace "vnstat.conf", "/usr/local/var", testpath/"var" - (testpath/"var/db/vnstat").mkpath - - begin - stat = IO.popen("#{bin}/vnstatd --nodaemon --config vnstat.conf") - sleep 1 - ensure - Process.kill "SIGINT", stat.pid - Process.wait stat.pid - end - assert_match "Info: Monitoring:", stat.read - end -end diff --git a/Formula/vnu.rb b/Formula/vnu.rb deleted file mode 100644 index b922d5fdcc9ad..0000000000000 --- a/Formula/vnu.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Vnu < Formula - desc "Nu Markup Checker: command-line and server HTML validator" - homepage "https://validator.github.io/validator/" - url "https://github.com/validator/validator/releases/download/18.11.5/vnu.jar_18.11.5.zip" - sha256 "b9785a3ab51671509c8d418cc84298b1389ca2d82107aa0537544090a7c51862" - version_scheme 1 - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install "vnu.jar" - bin.write_jar_script libexec/"vnu.jar", "vnu" - end - - test do - (testpath/"index.html").write <<~EOS - - - - hi - - - - - EOS - system bin/"vnu", testpath/"index.html" - end -end diff --git a/Formula/volatility.rb b/Formula/volatility.rb deleted file mode 100644 index efca5da6472f8..0000000000000 --- a/Formula/volatility.rb +++ /dev/null @@ -1,190 +0,0 @@ -class Volatility < Formula - include Language::Python::Virtualenv - - desc "Advanced memory forensics framework" - homepage "https://github.com/volatilityfoundation/volatility" - url "https://downloads.volatilityfoundation.org/releases/2.6/volatility-2.6.zip" - sha256 "5b73050d72bf94870ffce22843f03d4b0b7764011dec29ef1a0a5b1b46cf9295" - revision 1 - head "https://github.com/volatilityfoundation/volatility.git" - - bottle do - cellar :any - rebuild 2 - sha256 "1f6c687d09dd2aac886fa9a2e529b1fd37ebccaaf9d68f85cbb771d4d22d5e3d" => :mojave - sha256 "276c6c0d85b6dc3132007ec5289f1be160c654dfbb4d9e8fbf30b2031d0ed7c8" => :high_sierra - sha256 "23d74d545277d9724884472d9762175294f3c789908bd5ce47072f481fcdfd16" => :sierra - sha256 "31481a560abecead5deaa382da5cb5689c7d37d9fe7e1074a971bb849b2ee415" => :el_capitan - end - - depends_on "freetype" - depends_on "jpeg" - depends_on "python@2" - depends_on "yara" - - resource "distorm3" do - url "https://files.pythonhosted.org/packages/28/f9/8ff25a8f3edb581b5bc0efbed6382dcca22e5e7eff39464346c629105739/distorm3-3.3.4.zip" - sha256 "a4dddc2d3cf4fe3e1f8b35507e3c30b082f6e0b0ae46e71c4d6ed6f463eb09ae" - end - - resource "yara-python" do - url "https://files.pythonhosted.org/packages/3e/6c/ec2453fd811ea2f8c157d196b4dd76eb3c229362918fdb661358bd3e8645/yara-python-3.5.0.tar.gz" - sha256 "c743ef051127eacc903fd4bd63d552ecf00031b59a9a8e7d0d017063de24b69c" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - end - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/46/4f/94f6165052774839b4a4af0c72071aa528d5dc8cb8bc6bb43e24a55c10cc/Pillow-3.4.2.tar.gz" - sha256 "0ee9975c05602e755ff5000232e0335ba30d507f6261922a658ee11b1cec36d1" - end - - resource "openpyxl" do - url "https://files.pythonhosted.org/packages/dc/f2/c57f9f00f8ae5e1a73cb096dbf600433724f037ffcbd51c456f89da5efd9/openpyxl-2.4.1.tar.gz" - sha256 "836e66578320e5871baa5a958c7acb7dcbc1b508989a675276b20ac2e1c08d82" - end - - resource "et_xmlfile" do - url "https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz" - sha256 "614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b" - end - - resource "jdcal" do - url "https://files.pythonhosted.org/packages/9b/fa/40beb2aa43a13f740dd5be367a10a03270043787833409c61b79e69f1dfd/jdcal-1.3.tar.gz" - sha256 "b760160f8dc8cc51d17875c6b663fafe64be699e10ce34b6a95184b5aa0fdc9e" - end - - resource "ujson" do - url "https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz" - sha256 "f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2" - sha256 "7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b" - end - - resource "ipython" do - url "https://files.pythonhosted.org/packages/89/63/a9292f7cd9d0090a0f995e1167f3f17d5889dcbc9a175261719c513b9848/ipython-5.1.0.tar.gz" - sha256 "7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961" - end - - resource "appnope" do - url "https://files.pythonhosted.org/packages/26/34/0f3a5efac31f27fabce64645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz" - sha256 "8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" - end - - resource "backports.shutil_get_terminal_size" do - url "https://files.pythonhosted.org/packages/ec/9c/368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/backports.shutil_get_terminal_size-1.0.0.tar.gz" - sha256 "713e7a8228ae80341c70586d1cc0a8caa5207346927e23d09dcbcaf18eadec80" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/13/8a/4eed41e338e8dcc13ca41c94b142d4d20c0de684ee5065523fee406ce76f/decorator-4.0.10.tar.gz" - sha256 "9c6e98edcb33499881b86ede07d9968c81ab7c769e28e9af24075f0a5379f070" - end - - resource "enum34" do - url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz" - sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1" - end - - resource "ipython_genutils" do - url "https://files.pythonhosted.org/packages/71/b7/a64c71578521606edbbce15151358598f3dfb72a3431763edc2baf19e71f/ipython_genutils-0.1.0.tar.gz" - sha256 "3a0624a251a26463c9dfa0ffa635ec51c4265380980d9a50d65611c3c2bd82a6" - end - - resource "pathlib2" do - url "https://files.pythonhosted.org/packages/c9/27/8448b10d8440c08efeff0794adf7d0ed27adb98372c70c7b38f3947d4749/pathlib2-2.1.0.tar.gz" - sha256 "deb3a960c1d55868dfbcac98432358b92ba89d95029cddd4040db1f27405055c" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz" - sha256 "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92" - end - - resource "pickleshare" do - url "https://files.pythonhosted.org/packages/69/fe/dd137d84daa0fd13a709e448138e310d9ea93070620c9db5454e234af525/pickleshare-0.7.4.tar.gz" - sha256 "84a9257227dfdd6fe1b4be1319096c20eb85ff1e82c7932f36efccfe1b09737b" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/83/14/5ac258da6c530eca02852ee25c7a9ff3ca78287bb4c198d0d0055845d856/prompt_toolkit-1.0.9.tar.gz" - sha256 "cd6523b36adc174cc10d54b1193eb626b4268609ff6ea92c15bcf1996609599c" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/db/d7/b465161910f3d1cef593c5e002bff67e0384898f597f1a7fdc8db4c02bf6/ptyprocess-0.5.1.tar.gz" - sha256 "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz" - sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81" - end - - resource "simplegeneric" do - url "https://files.pythonhosted.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip" - sha256 "dc972e06094b9af5b855b3df4a646395e43d1c9d0d39ed345b7393560d0b9173" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz" - sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" - end - - resource "traitlets" do - url "https://files.pythonhosted.org/packages/b1/d6/5b5aa6d5c474691909b91493da1e8972e309c9f01ecfe4aeafd272eb3234/traitlets-4.3.1.tar.gz" - sha256 "ba8c94323ccbe8fd792e45d8efe8c95d3e0744cc8c085295b607552ab573724c" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - venv = virtualenv_create(libexec) - - resource("Pillow").stage do - inreplace "setup.py" do |s| - sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" - s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" - s.gsub! "JPEG_ROOT = None", - "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', " \ - "'#{Formula["jpeg"].opt_prefix}/include')" - s.gsub! "FREETYPE_ROOT = None", - "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', " \ - "'#{Formula["freetype"].opt_prefix}/include')" - end - - begin - # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs - deleted = ENV.delete "SDKROOT" - unless MacOS::CLT.installed? - ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" - end - venv.pip_install Pathname.pwd - ensure - ENV["SDKROOT"] = deleted - end - end - - res = resources.map(&:name).to_set - ["Pillow"] - - res.each do |r| - venv.pip_install resource(r) - end - - venv.pip_install_and_link buildpath - end - - test do - system "#{bin}/vol.py", "--info" - end -end diff --git a/Formula/voldemort.rb b/Formula/voldemort.rb deleted file mode 100644 index 5dc36a57d97cb..0000000000000 --- a/Formula/voldemort.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Voldemort < Formula - desc "Distributed key-value storage system" - homepage "https://www.project-voldemort.com/" - url "https://github.com/voldemort/voldemort/archive/release-1.10.26-cutoff.tar.gz" - sha256 "8bd41b53c3b903615d281e7277d5a9225075c3d00ea56c6e44d73f6327c73d55" - - bottle do - cellar :any_skip_relocation - sha256 "25ce694b1f816f5004a21399d514cf44be904f8e575d8df4f0911370ac1fba19" => :mojave - sha256 "9a4436d48d7908470727c7c4bbc9d6ed34ef45f2512646823418651f4aa6a991" => :high_sierra - sha256 "e1509d1ec241f1d5c693ba6aeb00938fb0cbc7d7f4e92bab54d2dafdbe631849" => :sierra - end - - depends_on "gradle" => :build - depends_on :java => "1.8" - - def install - system "./gradlew", "build", "-x", "test" - libexec.install %w[lib dist contrib] - bin.install Dir["bin/*{.sh,.py}"] - libexec.install "bin" - pkgshare.install "config" => "config-examples" - (etc/"voldemort").mkpath - env = { - :VOLDEMORT_HOME => libexec, - :VOLDEMORT_CONFIG_DIR => etc/"voldemort", - } - bin.env_script_all_files(libexec/"bin", env) - end - - test do - system bin/"vadmin.sh" - end -end diff --git a/Formula/voms.rb b/Formula/voms.rb deleted file mode 100644 index 0103ed048ee3f..0000000000000 --- a/Formula/voms.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Voms < Formula - desc "Virtual organization membership service" - homepage "https://github.com/italiangrid/voms" - url "https://github.com/italiangrid/voms-clients/archive/v3.0.7.tar.gz" - sha256 "24cc29f4dc93f048e1cda9003ab8004e5d0ebc245d0139a058e6224bc2ca6ba7" - - bottle do - cellar :any_skip_relocation - sha256 "bc3c2980b8816b23d01c8f9b0db3b47c27c1ab26572465c8867baad452ad4035" => :mojave - sha256 "50f51cebb89971280072db95e7674a2ace3363ad11e7fb39654411d240f9067c" => :high_sierra - sha256 "247e6715cfaa6511762096465e7d32c1b3cc729a78833c7a033d6df62a952789" => :sierra - sha256 "2c714e700a020e728425fcacfb2d4217bbbfcbf2ccb5e62fa2d723dd4d4c4fd2" => :el_capitan - sha256 "9afed6217d4abdaf71419b4cdab29599244962891ccdd600e53ad2454f6b3191" => :yosemite - sha256 "7f8dc56553a8b31c5080ef32493ee1d509b4945c7493a16fa9def20daed57d54" => :mavericks - end - - depends_on "maven" => :build - depends_on :java - depends_on "openssl" - - def install - system "mvn", "package", "-Dmaven.repo.local=$(pwd)/m2repo/", "-Dmaven.javadoc.skip=true" - system "tar", "-xf", "target/voms-clients.tar.gz" - share.install "voms-clients/share/java" - man5.install Dir["voms-clients/share/man/man5/*.5"] - man1.install Dir["voms-clients/share/man/man1/*.1"] - bin.install Dir["voms-clients/bin/*"] - end - - test do - system "#{bin}/voms-proxy-info", "--version" - end -end diff --git a/Formula/vorbis-tools.rb b/Formula/vorbis-tools.rb deleted file mode 100644 index 5ca4393a4af7a..0000000000000 --- a/Formula/vorbis-tools.rb +++ /dev/null @@ -1,43 +0,0 @@ -class VorbisTools < Formula - desc "Ogg Vorbis CODEC tools" - homepage "https://github.com/xiph/vorbis-tools" - url "https://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz" - sha256 "a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc" - revision 2 - - bottle do - sha256 "ebcf801412fdea4ebf8e3dc850317fe6c8f8c4d9eeb10e3ba9c09bff3300b5cb" => :mojave - sha256 "fd042bd1be3987bfd945e4e681d246b179af2f67ec139c51d62ce7ab27ff0fdd" => :high_sierra - sha256 "6f6d8a2ac7093b409aae173ac42877fd9b3360284c17eb8789923c36e88acf00" => :sierra - sha256 "d5ef7448a1d2373a418c87dbd5a74975b0979c0c3c411e49414fe54869f31482" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "libao" - depends_on "libogg" - depends_on "libvorbis" - - def install - # Fix `brew linkage --test` "Missing libraries: /usr/lib/libnetwork.dylib" - # Prevent bogus linkage to the libnetwork.tbd in Xcode 7's SDK - ENV.delete("SDKROOT") if MacOS.version == :yosemite - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-nls - --prefix=#{prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"oggenc", test_fixtures("test.wav"), "-o", "test.ogg" - assert_predicate testpath/"test.ogg", :exist? - output = shell_output("#{bin}/ogginfo test.ogg") - assert_match "20.625000 kb/s", output - end -end diff --git a/Formula/vorbisgain.rb b/Formula/vorbisgain.rb deleted file mode 100644 index 6ce5035163e53..0000000000000 --- a/Formula/vorbisgain.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Vorbisgain < Formula - desc "Add Replay Gain volume tags to Ogg Vorbis files" - homepage "https://sjeng.org/vorbisgain.html" - url "https://sjeng.org/ftp/vorbis/vorbisgain-0.37.tar.gz" - sha256 "dd6db051cad972bcac25d47b4a9e40e217bb548a1f16328eddbb4e66613530ec" - - bottle do - cellar :any - sha256 "75aa0134fbe5f63549d0e9328f6ae2d3513670e74d5f35ca7c633917a9383aee" => :mojave - sha256 "86d9a629d242005f13a1de8a591aee61455059b9072ab528afbebe63ecda9613" => :high_sierra - sha256 "3572efe1e0741ee5b1f3cc0499325ae59acec5f9ab44df5987bab22312d9e3af" => :sierra - sha256 "00f7047e5d884dbf22ed036154961b41d4ad6ae8295c55043929b008ae82a9f7" => :el_capitan - sha256 "a1315eaaaf667f7486deb2b899c422e3cc9caa8f9e771221dca12b0ecc085dc7" => :yosemite - sha256 "7bff88a3512ff2d28846b89b89f1cfd130e5934f1f6301d36e66ccc26b896281" => :mavericks - end - - depends_on "libogg" - depends_on "libvorbis" - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/vorbisgain", "--version" - end -end diff --git a/Formula/voro++.rb b/Formula/voro++.rb deleted file mode 100644 index bcd6cee0089db..0000000000000 --- a/Formula/voro++.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Voroxx < Formula - desc "3D Voronoi cell software library" - homepage "http://math.lbl.gov/voro++" - url "http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz" - sha256 "ef7970071ee2ce3800daa8723649ca069dc4c71cc25f0f7d22552387f3ea437e" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "cd60116a442b685c8275ba23f64fd453b01b517247d0a7c969d3b4fe5a7ae706" => :mojave - sha256 "72c8a07d26abe320651fb74425c67baecd8044e23f2951d86704c8dba88f3871" => :high_sierra - sha256 "9d522e672d8f551439c18b536e0ca2d0dc94a6036722eba12bbaba37d2aa3428" => :sierra - sha256 "b10e4cccc62a7fff1a34c6f80174e2f62cb12dfcaf2782b2c81cc567f0928943" => :el_capitan - sha256 "d7ce06fd7ebd51a8a592c2409f80eae0bbc6a5fc0d906ffa324534c805249af1" => :yosemite - end - - def install - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install("examples") - mv prefix/"man", share/"man" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "voro++.hh" - double rnd() { return double(rand())/RAND_MAX; } - int main() { - voro::container con(0, 1, 0, 1, 0, 1, 6, 6, 6, false, false, false, 8); - for (int i = 0; i < 20; i++) con.put(i, rnd(), rnd(), rnd()); - if (fabs(con.sum_cell_volumes() - 1) > 1.e-8) abort(); - con.draw_cells_gnuplot("test.gnu"); - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}/voro++", "-L#{lib}", - "-lvoro++" - system "./a.out" - assert_predicate testpath/"test.gnu", :exist? - end -end diff --git a/Formula/vowpal-wabbit.rb b/Formula/vowpal-wabbit.rb deleted file mode 100644 index 598611da1f85d..0000000000000 --- a/Formula/vowpal-wabbit.rb +++ /dev/null @@ -1,81 +0,0 @@ -class VowpalWabbit < Formula - desc "Online learning algorithm" - homepage "https://github.com/JohnLangford/vowpal_wabbit" - url "https://github.com/JohnLangford/vowpal_wabbit/archive/8.6.1.tar.gz" - sha256 "452c3e83b73fd67f5e9cfae8bfbaf398cda73dc688186b376e6106c376ec5eb1" - - bottle do - cellar :any - sha256 "de51b144ef201d85cb2ff3edc21e4903186a5acf890fbe2032c1ae405cd61e18" => :mojave - sha256 "48a939d6399a4ad1ed2f3f0babd8d7a9edc5a6e801683b5b06f12b5f0daf5d55" => :high_sierra - sha256 "18283653fa6b9fdfafdf1361a86b43bf1f56a609934499e0f31634b960b69862" => :sierra - sha256 "23598d455b5a62bdf8f65df7b266b07be980738cfe69f664e5f1cb110ec72cf1" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "boost" - - needs :cxx11 - - def install - ENV.cxx11 - ENV["AC_PATH"] = "#{HOMEBREW_PREFIX}/share" - system "./autogen.sh", "--prefix=#{prefix}", - "--with-boost=#{Formula["boost"].opt_prefix}" - system "make" - system "make", "install" - bin.install Dir["utl/*"] - rm bin/"active_interactor.py" - rm bin/"new_version" - rm bin/"vw-validate.html" - rm bin/"release.ps1" - end - - test do - (testpath/"house_dataset").write <<~EOS - 0 | price:.23 sqft:.25 age:.05 2006 - 1 2 'second_house | price:.18 sqft:.15 age:.35 1976 - 0 1 0.5 'third_house | price:.53 sqft:.32 age:.87 1924 - EOS - system bin/"vw", "house_dataset", "-l", "10", "-c", "--passes", "25", "--holdout_off", "--audit", "-f", "house.model", "--nn", "5" - system bin/"vw", "-t", "-i", "house.model", "-d", "house_dataset", "-p", "house.predict" - - (testpath/"csoaa.dat").write <<~EOS - 1:1.0 a1_expect_1| a - 2:1.0 b1_expect_2| b - 3:1.0 c1_expect_3| c - 1:2.0 2:1.0 ab1_expect_2| a b - 2:1.0 3:3.0 bc1_expect_2| b c - 1:3.0 3:1.0 ac1_expect_3| a c - 2:3.0 d1_expect_2| d - EOS - system bin/"vw", "--csoaa", "3", "csoaa.dat", "-f", "csoaa.model" - system bin/"vw", "-t", "-i", "csoaa.model", "-d", "csoaa.dat", "-p", "csoaa.predict" - - (testpath/"ect.dat").write <<~EOS - 1 ex1| a - 2 ex2| a b - 3 ex3| c d e - 2 ex4| b a - 1 ex5| f g - EOS - system bin/"vw", "--ect", "3", "-d", "ect.dat", "-f", "ect.model" - system bin/"vw", "-t", "-i", "ect.model", "-d", "ect.dat", "-p", "ect.predict" - - (testpath/"train.dat").write <<~EOS - 1:2:0.4 | a c - 3:0.5:0.2 | b d - 4:1.2:0.5 | a b c - 2:1:0.3 | b c - 3:1.5:0.7 | a d - EOS - (testpath/"test.dat").write <<~EOS - 1:2 3:5 4:1:0.6 | a c d - 1:0.5 2:1:0.4 3:2 4:1.5 | c d - EOS - system bin/"vw", "-d", "train.dat", "--cb", "4", "-f", "cb.model" - system bin/"vw", "-t", "-i", "cb.model", "-d", "test.dat", "-p", "cb.predict" - end -end diff --git a/Formula/vpcs.rb b/Formula/vpcs.rb deleted file mode 100644 index 4672b1d23d7e0..0000000000000 --- a/Formula/vpcs.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Vpcs < Formula - desc "Virtual PC simulator for testing IP routing" - homepage "https://vpcs.sourceforge.io/" - url "https://downloads.sourceforge.net/project/vpcs/0.8/vpcs-0.8-src.tbz" - sha256 "dca602d0571ba852c916632c4c0060aa9557dd744059c0f7368860cfa8b3c993" - - bottle do - cellar :any_skip_relocation - sha256 "5728bc8e33f81a307c74fe625305c42363a493ff1dc612d604feec971374385d" => :mojave - sha256 "ac52b231d875679e7bd4da3a09c6b5bc833e5b93fe5a77749dc834b1d82d21d5" => :high_sierra - sha256 "78c7e415e9bcbdf28cfdda5d37fce9cc7d735b01d61400b41239e0cdee17ada5" => :sierra - sha256 "0f1a65e672fd1d2dbc866279835231ec3737e64c514f38a08bf409807e910222" => :el_capitan - end - - def install - cd "src" do - system "make", "-f", "Makefile.osx" - bin.install "vpcs" - end - end - - test do - system "#{bin}/vpcs", "--version" - end -end diff --git a/Formula/vramsteg.rb b/Formula/vramsteg.rb deleted file mode 100644 index 8995f4c20dbeb..0000000000000 --- a/Formula/vramsteg.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Vramsteg < Formula - desc "Add progress bars to command-line applications" - homepage "https://gothenburgbitfactory.org/projects/vramsteg.html" - url "https://gothenburgbitfactory.org/download/vramsteg-1.1.0.tar.gz" - sha256 "9cc82eb195e4673d9ee6151373746bd22513033e96411ffc1d250920801f7037" - head "https://github.com/GothenburgBitFactory/vramsteg.git", :branch => "1.1.1" - - bottle do - cellar :any_skip_relocation - sha256 "a868fba582ce440a14ae18d4be193209e7d25fd3291b568bea7f123e61aa044d" => :mojave - sha256 "0c9aff3582ad05a388cba8c43770ead295d921a8e419323a3c4115f09e609ba1" => :high_sierra - sha256 "7f65668b7bb036fb19e69bdc9cbc2ec48728bc8c1936253f6d5e8d74a113a3fd" => :sierra - sha256 "e4b3e2e66c2f772a38de529b884091a2ffa1f920af6604696129d21cc9e70b99" => :el_capitan - sha256 "9285766e0502b88c62d3d295402a41c46b8d9d2707a492bb5d70484b1080c212" => :yosemite - sha256 "f9ea5a2984d676db153d2128b1aa84a413edb93692e9c6be8147e5a856d42972" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - # Check to see if vramsteg can obtain the current time as epoch - assert_match /^\d+$/, shell_output("#{bin}/vramsteg --now") - end -end diff --git a/Formula/vrpn.rb b/Formula/vrpn.rb deleted file mode 100644 index 436a5b6349573..0000000000000 --- a/Formula/vrpn.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Vrpn < Formula - desc "Virtual reality peripheral network" - homepage "https://github.com/vrpn/vrpn/wiki" - url "https://github.com/vrpn/vrpn/releases/download/version_07.34/vrpn_07.34.zip" - sha256 "1ecb68f25dcd741c4bfe161ce15424f1319a387a487efa3fbf49b8aa249c9910" - head "https://github.com/vrpn/vrpn.git" - - bottle do - cellar :any - sha256 "5a3e1485fdbc883c3996fef9993ef1f3a0aa0e991c9610e82091663db412e471" => :mojave - sha256 "9b9f4a31161dbc0a4a9ea0759122f0a3725a361dde0b5f1def9bab4e59de12e7" => :high_sierra - sha256 "4e03c131adba54f74742151ee269d2d0c1716e307294679ed2366c0e6cb5fd41" => :sierra - sha256 "36e5273f8006b1fe5f1655e258f8937e06e9abc4ad849e2c9b1e7a1462fe790d" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "libusb" # for HID support - - def install - ENV.libstdcxx unless MacOS.version > :mavericks - - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}", - "-DVRPN_BUILD_CLIENTS:BOOL=OFF", - "-DVRPN_BUILD_JAVA:BOOL=OFF" - system "make", "install" - end - end -end diff --git a/Formula/vsftpd.rb b/Formula/vsftpd.rb deleted file mode 100644 index c1a4be0b20b95..0000000000000 --- a/Formula/vsftpd.rb +++ /dev/null @@ -1,129 +0,0 @@ -class Vsftpd < Formula - desc "Secure FTP server for UNIX" - homepage "https://security.appspot.com/vsftpd.html" - url "https://security.appspot.com/downloads/vsftpd-3.0.3.tar.gz" - mirror "https://fossies.org/linux/misc/vsftpd-3.0.3.tar.gz" - sha256 "9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7" - - bottle do - rebuild 2 - sha256 "5605a908ab4b24008e48f2280107695a7afaae8a1a521964b8f2248d2baa960a" => :mojave - sha256 "dbfc9b28f5ea49dda09d31fb630d995b72fd63b83b358e04156329252c3ab25b" => :high_sierra - sha256 "22349437bd4d75b1ffd2fddfd90f92367e0a4f478f540b9086457541883f2c3b" => :sierra - sha256 "108243559f3fea06d140173a3e3cb497c2f22c47d45e85ae108c088c1a1370df" => :el_capitan - sha256 "25a9d2e92ca7e3efda6c9882a62ad5927c0c5e450eca4d62d7829c467dd086d9" => :yosemite - end - - depends_on "openssl" => :optional - - # Patch to remove UTMPX dependency, locate macOS's PAM library, and - # remove incompatible LDFLAGS. (reported to developer via email) - patch :DATA - - def install - if build.with? "openssl" - inreplace "builddefs.h", "#undef VSF_BUILD_SSL", "#define VSF_BUILD_SSL" - end - - inreplace "defs.h", "/etc/vsftpd.conf", "#{etc}/vsftpd.conf" - inreplace "tunables.c", "/etc", etc - inreplace "tunables.c", "/var", var - system "make" - - # make install has all the paths hardcoded; this is easier: - sbin.install "vsftpd" - etc.install "vsftpd.conf" - man5.install "vsftpd.conf.5" - man8.install "vsftpd.8" - end - - def caveats - s = "" - - if build.with? "openssl" - s += <<~EOS - vsftpd was compiled with SSL support. To use it you must generate a SSL - certificate and set 'enable_ssl=YES' in your config file. - - EOS - end - - s += <<~EOS - To use chroot, vsftpd requires root privileges, so you will need to run - `sudo vsftpd`. - You should be certain that you trust any software you grant root privileges. - - The vsftpd.conf file must be owned by root or vsftpd will refuse to start: - sudo chown root #{HOMEBREW_PREFIX}/etc/vsftpd.conf - EOS - s - end - - plist_options :startup => true, :manual => "sudo vsftpd" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{sbin}/vsftpd - #{etc}/vsftpd.conf - - RunAtLoad - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{sbin}/vsftpd -v 0>&1") - end -end - -__END__ -diff --git a/sysdeputil.c b/sysdeputil.c -index 9dc8a5e..66dbe30 100644 ---- a/sysdeputil.c -+++ b/sysdeputil.c -@@ -64,6 +64,10 @@ - #include - - /* BEGIN config */ -+#if defined(__APPLE__) -+ #undef VSF_SYSDEP_HAVE_UTMPX -+#endif -+ - #if defined(__linux__) - #include - #include -diff --git a/vsf_findlibs.sh b/vsf_findlibs.sh -index b988be6..68d4a34 100755 ---- a/vsf_findlibs.sh -+++ b/vsf_findlibs.sh -@@ -20,6 +20,8 @@ if find_func pam_start sysdeputil.o; then - locate_library /usr/lib/libpam.sl && echo "-lpam"; - # AIX ends shared libraries with .a - locate_library /usr/lib/libpam.a && echo "-lpam"; -+ # Mac OS X / Darwin shared libraries with .dylib -+ locate_library /usr/lib/libpam.dylib && echo "-lpam"; - else - locate_library /lib/libcrypt.so && echo "-lcrypt"; - locate_library /usr/lib/libcrypt.so && echo "-lcrypt"; -diff --git a/Makefile b/Makefile -index c63ed1b..556519e 100644 ---- a/Makefile -+++ b/Makefile -@@ -10,7 +10,7 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ - - LIBS = `./vsf_findlibs.sh` - LINK = -Wl,-s --LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now -+LDFLAGS = -fPIE -pie - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ - tunables.o ftpdataio.o secbuf.o ls.o \ diff --git a/Formula/vstr.rb b/Formula/vstr.rb deleted file mode 100644 index 16f43e5b65264..0000000000000 --- a/Formula/vstr.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Vstr < Formula - desc "C string library" - homepage "http://www.and.org/vstr/" - url "http://www.and.org/vstr/1.0.15/vstr-1.0.15.tar.bz2" - sha256 "d33bcdd48504ddd21c0d53e4c2ac187ff6f0190d04305e5fe32f685cee6db640" - - bottle do - cellar :any - sha256 "8927c49aa4daba57ffab9a9ea332504346467cf22c137af3e1a16b859318a0f5" => :mojave - sha256 "af6d9cc097c4eb9c1719496b2e29593763b5b17b279ef4c234d681cfe4174b37" => :high_sierra - sha256 "07e2b05d9908a847c72950532d3ed12771c856365c8747c8c5917da9a5ea4413" => :sierra - sha256 "d2d5b14e9ac589c782307e058e06815ad2408bbcf418ac721d3fac3be8b832a7" => :el_capitan - sha256 "0d4176307ea18472c9da9a765bcb033e6256ae361d2e32b758b205a56dd7e38a" => :yosemite - sha256 "5fc509c660fc38b3484a093ce0894ee2e9c3ea3cccc43222071c4d8139975d8d" => :mavericks - sha256 "10918d69a40e4516a549dae179e73c390248f4eaa8c75460228d9ba7d330fee9" => :mountain_lion - end - - depends_on "pkg-config" => :build - - def install - ENV.append "CFLAGS", "--std=gnu89" if ENV.compiler == :clang - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - // based on http://www.and.org/vstr/examples/ex_hello_world.c - #define VSTR_COMPILE_INCLUDE 1 - #include - #include - #include - #include - - int main(void) { - Vstr_base *s1 = NULL; - - if (!vstr_init()) - err(EXIT_FAILURE, "init"); - - if (!(s1 = vstr_dup_cstr_buf(NULL, "Hello Homebrew\\n"))) - err(EXIT_FAILURE, "Create string"); - - while (s1->len) - if (!vstr_sc_write_fd(s1, 1, s1->len, STDOUT_FILENO, NULL)) { - if ((errno != EAGAIN) && (errno != EINTR)) - err(EXIT_FAILURE, "write"); - } - - vstr_free_base(s1); - vstr_exit(); - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-lvstr", "-o", "test" - system "./test" - end -end diff --git a/Formula/vsts-cli.rb b/Formula/vsts-cli.rb deleted file mode 100644 index 2080388ea989e..0000000000000 --- a/Formula/vsts-cli.rb +++ /dev/null @@ -1,220 +0,0 @@ -class VstsCli < Formula - include Language::Python::Virtualenv - - desc "Manage and work with VSTS/TFS resources from the command-line" - homepage "https://docs.microsoft.com/en-us/cli/vsts" - url "https://files.pythonhosted.org/packages/f9/c2/3ed698480ab30d2807fc961eef152099589aeaec3f1407945a4e07275de5/vsts-cli-0.1.4.tar.gz" - sha256 "27defe1d8aaa1fcbc3517274c0fdbd42b5ebe2c1c40edfc133d98fe4bb7114de" - - bottle do - cellar :any_skip_relocation - sha256 "55cd1a1328f4d3f85d4f7319b8cc1eaa6bfb2c528922f7707e5156649a54c997" => :mojave - sha256 "0ab4def28bd633cdbd4d82158db3eb7f105e91091c2740cf37a6f84d065a0c69" => :high_sierra - sha256 "cffcc18b4f1785c13c9599de7f829df864fa319ee614383b1652526a17ea87a3" => :sierra - end - - depends_on "python" - - resource "argcomplete" do - url "https://files.pythonhosted.org/packages/3c/21/9741e5e5e63245a8cdafb32ffc738bff6e7ef6253b65953e77933e56ce88/argcomplete-1.9.4.tar.gz" - sha256 "06c8a54ffaa6bfc9006314498742ec8843601206a3b94212f82657673662ecf1" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz" - sha256 "6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "entrypoints" do - url "https://files.pythonhosted.org/packages/27/e8/607697e6ab8a961fc0b141a97ea4ce72cd9c9e264adeb0669f6d194aa626/entrypoints-0.2.3.tar.gz" - sha256 "d2d587dde06f99545fb13a383d2cd336a8ff1f359c5839ce3a64c917d10c029f" - end - - resource "humanfriendly" do - url "https://files.pythonhosted.org/packages/0d/2d/8cb8583e4dc4e44932460c88dbe1d7fde907df60589452342bc242ac7da0/humanfriendly-4.7.tar.gz" - sha256 "ee071c8f6c7457db53472ae9974aaf561c95fdbe072e1f2a3ba29aaa6ca51098" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz" - sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/a0/c9/c08bf10bd057293ff385abaef38e7e548549bbe81e95333157684e75ebc6/keyring-13.2.1.tar.gz" - sha256 "6364bb8c233f28538df4928576f4e051229e0451651073ab20b315488da16a58" - end - - resource "knack" do - url "https://files.pythonhosted.org/packages/b5/58/2ba172d2ea8babae13a2a4d3fc0be810fd067429f990e850e4088f22494e/knack-0.4.1.tar.gz" - sha256 "ba45fd69c2faf91fd3d6e95cec1c0ef7e0f4362e33c59bf5a260216ffcb859a0" - end - - resource "msrest" do - url "https://files.pythonhosted.org/packages/d8/9a/34f359d9acba054274202f6a2f0bdc3c907f938aeb7dff612002874f17ea/msrest-0.6.2.tar.gz" - sha256 "1b8daa01341fb77b0797c5fbc28e7e957388eb562721cc6392603ea5a4a39345" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/df/5f/3f4aae7b28db87ddef18afed3b71921e531ca288dc604eb981e9ec9f8853/oauthlib-2.1.0.tar.gz" - sha256 "ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/63/a2/91c31c4831853dedca2a08a0f94d788fc26a48f7281c99a303769ad2721b/Pygments-2.3.0.tar.gz" - sha256 "82666aac15622bd7bb685a4ee7f6625dd716da3ef7473620c192c0168aae64fc" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" - sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/40/35/298c36d839547b50822985a2cf0611b3b978a5ab7a5af5562b8ebe3e1369/requests-2.20.1.tar.gz" - sha256 "ea881206e59f41dbd0bd445437d792e43906703fff75ca8ff43ccdb11f33f263" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/95/be/072464f05b70e4142cb37151e215a2037b08b1400f8a56f2538b76ca6205/requests-oauthlib-1.0.0.tar.gz" - sha256 "8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/12/c2/11d6845db5edf1295bc08b2f488cf5937806586afe42936c3f34c097ebdc/tabulate-0.8.2.tar.gz" - sha256 "e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "vsts" do - url "https://files.pythonhosted.org/packages/e7/37/d8725833efba01d234aabda5a0c2ffb6c369dd3286bca265dfbbe7a51250/vsts-0.1.20.tar.gz" - sha256 "1ece70729d616029f7fd1859524ee6b7d95ff07403af7bb4f963322ad28005f8" - end - - resource "vsts-cli" do - url "https://files.pythonhosted.org/packages/f9/c2/3ed698480ab30d2807fc961eef152099589aeaec3f1407945a4e07275de5/vsts-cli-0.1.4.tar.gz" - sha256 "27defe1d8aaa1fcbc3517274c0fdbd42b5ebe2c1c40edfc133d98fe4bb7114de" - end - - resource "vsts-cli-admin" do - url "https://files.pythonhosted.org/packages/96/15/501240b53c6de9c81ba7c2c57e4a7227cc68eacb776a7b034178d7ffb56d/vsts-cli-admin-0.1.4.tar.gz" - sha256 "d8a56dd57112a91818557043a8c1e98e26b8d9e793a448ceaa9df0439972cfd5" - end - - resource "vsts-cli-admin-common" do - url "https://files.pythonhosted.org/packages/fa/bc/13802bc886316f41f39ee47e086e60d1d2bf00b03399afbcb07bb8d3abd9/vsts-cli-admin-common-0.1.4.tar.gz" - sha256 "6794d7b6d016b93e66613b84c31f67a90c2b296675b29b2ea9bbf1566e996f8a" - end - - resource "vsts-cli-build" do - url "https://files.pythonhosted.org/packages/69/8b/0b03651a621a8a1f438cbdad2023a6cf1bf83f528452ba628a33d773983f/vsts-cli-build-0.1.4.tar.gz" - sha256 "e4152ead1961506371e8a17656b18bc8797034411c2b2d355b73250c86b27052" - end - - resource "vsts-cli-build-common" do - url "https://files.pythonhosted.org/packages/d9/2e/294931be3d181742362feb138084f2dfef4632aa6f9762e89c8e14b2d8a7/vsts-cli-build-common-0.1.4.tar.gz" - sha256 "64fe48b944a04f2ae7df0afa9bfcd37b281d786d3558bb66c597c990f0745f08" - end - - resource "vsts-cli-code" do - url "https://files.pythonhosted.org/packages/98/ce/d2edb9adcb403b5abb76efcf6a9ae3c5e1943215a4fb1fa20062e3094853/vsts-cli-code-0.1.4.tar.gz" - sha256 "2154f0769cdb694110886ef7859dda86f19c02f67d037dc592ae21772a51b938" - end - - resource "vsts-cli-code-common" do - url "https://files.pythonhosted.org/packages/63/8a/1afd03644034f2f81e912864f6f8457b7da95580e3319b45fe6e17d4dbb0/vsts-cli-code-common-0.1.4.tar.gz" - sha256 "ed41220313ceb67612d6dc30596ef53cd2bbf1f55df826ca8cecd364a8a92130" - end - - resource "vsts-cli-common" do - url "https://files.pythonhosted.org/packages/d4/4e/58e5b3a1a36e2db2f032d26d3be78ef227467d69ac280f9d69d1abc514e6/vsts-cli-common-0.1.4.tar.gz" - sha256 "a031ad9748b9dbd8552357b42a92363a641572fe1035540c2542b05078aa9005" - end - - resource "vsts-cli-package" do - url "https://files.pythonhosted.org/packages/2e/25/4c36f9d006c06fe0cf91694ec04ec68171492b9854e8e6ab5492c9db50c2/vsts-cli-package-0.1.4.tar.gz" - sha256 "74ab09d40b2e3572518e618d0e46d227bfa3f5db999e936a04f590a4fc6ed1ec" - end - - resource "vsts-cli-package-common" do - url "https://files.pythonhosted.org/packages/26/d2/16071a391735a1d71d121fe0fb0789baedcb14192cda597027bc7538453f/vsts-cli-package-common-0.1.4.tar.gz" - sha256 "07cbe4e4f6602b6ef7168a24110925433dbb357135c269952457c8c071ff877c" - end - - resource "vsts-cli-release" do - url "https://files.pythonhosted.org/packages/24/8e/245b35fc07684290628ed4cfd4e3821c8401c47091ce12f67efdc0cf81d9/vsts-cli-release-0.1.4.tar.gz" - sha256 "9b82ed707da696c4708285e5f1ea4ff0f72a010c90e7c6d070267a8fb9343ca5" - end - - resource "vsts-cli-release-common" do - url "https://files.pythonhosted.org/packages/e5/2d/889686657c3d82b7768d95989fde922dddf64339735a3159848c5468f7d7/vsts-cli-release-common-0.1.4.tar.gz" - sha256 "619022dd2e9092db941b6bb6dbc6958d1f5f2e6c41c67f015e181325a562e859" - end - - resource "vsts-cli-team" do - url "https://files.pythonhosted.org/packages/ed/7b/f6178e31d666257a80fd9ec8281809a4eead3de0f61c3031c4fad38f0c3c/vsts-cli-team-0.1.4.tar.gz" - sha256 "ca966527eff69441d89a7aaa5758d53ab31d5d527acc064d29d72270f1b913a2" - end - - resource "vsts-cli-team-common" do - url "https://files.pythonhosted.org/packages/c6/d4/0d0d9b15d22e1a2044760152864279fc0c4054f8a0254e86529dad3fae53/vsts-cli-team-common-0.1.4.tar.gz" - sha256 "57aab81b472d76ef010036ed90f7bd11fffb66c79c1991d64b0694a8b2f47c08" - end - - resource "vsts-cli-work" do - url "https://files.pythonhosted.org/packages/68/2d/547a18affb25bd1f8be2fdcec64df2a75fb5fb4377a5edd2432b522b46f6/vsts-cli-work-0.1.4.tar.gz" - sha256 "dca2324f5445765a3ff4d9178d9b37c985b75e22c20660741d43ef24ac72ec74" - end - - resource "vsts-cli-work-common" do - url "https://files.pythonhosted.org/packages/36/51/d4b7accf6b9e009875f4a2c05ceba7ddd8936f99c2dde5f4308a40edc360/vsts-cli-work-common-0.1.4.tar.gz" - sha256 "ec023e69d88292024e6bd5ac34b9d5913aa92c4ce148751c33fdf9da13e0d522" - end - - def install - virtualenv_install_with_resources - bin.install_symlink "#{libexec}/bin/vsts" => "vsts" - end - - test do - system "#{bin}/vsts", "configure", "--help" - output = shell_output("#{bin}/vsts logout 2>&1", 1) - assert_equal "ERROR: The credential was not found", output.chomp - output = shell_output("#{bin}/vsts work 2>&1", 2) - assert_match "vsts work: error: the following arguments are required", output - end -end diff --git a/Formula/vtclock.rb b/Formula/vtclock.rb deleted file mode 100644 index a0bd6d5c5753f..0000000000000 --- a/Formula/vtclock.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Vtclock < Formula - desc "Text-mode fullscreen digital clock" - homepage "https://webonastick.com/vtclock/" - url "https://webonastick.com/vtclock/vtclock-2005-02-20.tar.gz" - sha256 "5fcbceff1cba40c57213fa5853c4574895755608eaf7248b6cc2f061133dab68" - - bottle do - cellar :any_skip_relocation - sha256 "380055ab532f75e4cb03f91d5e0cbceb14371d4b57ddad9771d562cf572e5746" => :mojave - sha256 "d72cbcb6862c0030433a2413fbf1d1773d6ed8207a5c681c9ffd206fa5798f45" => :high_sierra - sha256 "766e69763326b8a8c5cfdc636cbba9f6fcffde0739be56612c54a2904d95d456" => :sierra - sha256 "f87c685e59533a0085b439c4153c2734d4091447f5a81c627ccc0d2e589ac65d" => :el_capitan - sha256 "a72a8c176276c40a3e9b0c6083a61013efb55b5ea43cd786000dad3c4243dd96" => :yosemite - sha256 "9811bd8bb3e5cd2f94dc37346e09588bbab5cb1f0cb1ef5f094adf20046440da" => :mavericks - end - - def install - system "make" - bin.install "vtclock" - end - - test do - system "#{bin}/vtclock", "-h" - end -end diff --git a/Formula/vte.rb b/Formula/vte.rb deleted file mode 100644 index e544f74fa5296..0000000000000 --- a/Formula/vte.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Vte < Formula - desc "Terminal emulator widget used by GNOME terminal" - homepage "https://developer.gnome.org/vte/" - url "https://download.gnome.org/sources/vte/0.28/vte-0.28.2.tar.xz" - sha256 "86cf0b81aa023fa93ed415653d51c96767f20b2d7334c893caba71e42654b0ae" - revision 2 - - bottle do - sha256 "73a55b1ddc926786641989613b15635d9ba9a04c0c241c5b085ee0c8c6d17911" => :mojave - sha256 "39b6a674facccd03a24f040ae3a6b7d3426280332e0a2908355a89a9d35d7a38" => :high_sierra - sha256 "41ba9567a2cfa0fa8838d0331fba21aa620362677d90eca4446922bc4ef0382e" => :sierra - sha256 "f57ca7c969e677208d1df618243a7fc453ae49660d114de05365467b51d97adc" => :el_capitan - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gtk+" - depends_on "pygobject" - depends_on "pygtk" - depends_on "python@2" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-Bsymbolic - --enable-python - ] - - # pygtk-codegen-2.0 has been deprecated and replaced by - # pygobject-codegen-2.0, but the vte Makefile does not detect this. - ENV["PYGTK_CODEGEN"] = Formula["pygobject"].bin/"pygobject-codegen-2.0" - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - char *rv = vte_get_user_shell(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gtkx = Formula["gtk+"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/gio-unix-2.0/ - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{include}/vte-0.0 - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gtkx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lvte - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/vte3.rb b/Formula/vte3.rb deleted file mode 100644 index bd8db2a8c401f..0000000000000 --- a/Formula/vte3.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Vte3 < Formula - desc "Terminal emulator widget used by GNOME terminal" - homepage "https://developer.gnome.org/vte/" - url "https://download.gnome.org/sources/vte/0.54/vte-0.54.3.tar.xz" - sha256 "693682145025c2af72d1070afaecba111351e747b4ba8f4a9d246b139f44ebfd" - - bottle do - rebuild 1 - sha256 "8d3823ac42085a43d7a0a5a9212f130b1f9e453ada67cf20ae629d72aeae86ed" => :mojave - sha256 "4c9cdf1a7326a2cdc16881a2583f7afac7e2142371b0f2bec9823d4040c06496" => :high_sierra - sha256 "476aa29837093b16673dd2913be8d2d312f4ce68afc31d5324d7edf54bc3ecff" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "gtk-doc" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnutls" - depends_on "gtk+3" - depends_on "pcre2" - depends_on "vala" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - args = [ - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-Bsymbolic", - "--enable-introspection=yes", - "--enable-gtk-doc", - ] - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - guint v = vte_get_major_version(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gnutls = Formula["gnutls"] - gtkx3 = Formula["gtk+3"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - libtasn1 = Formula["libtasn1"] - nettle = Formula["nettle"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{fontconfig.opt_include} - -I#{freetype.opt_include}/freetype2 - -I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0 - -I#{gettext.opt_include} - -I#{glib.opt_include}/gio-unix-2.0/ - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gnutls.opt_include} - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{include}/vte-2.91 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{libtasn1.opt_include} - -I#{nettle.opt_include} - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{cairo.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gnutls.opt_lib} - -L#{gtkx3.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgnutls - -lgobject-2.0 - -lgtk-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lvte-2.91 - -lz - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/vtk.rb b/Formula/vtk.rb deleted file mode 100644 index 914b1b1c6911e..0000000000000 --- a/Formula/vtk.rb +++ /dev/null @@ -1,136 +0,0 @@ -class Vtk < Formula - desc "Toolkit for 3D computer graphics, image processing, and visualization" - homepage "https://www.vtk.org/" - url "https://www.vtk.org/files/release/8.1/VTK-8.1.2.tar.gz" - sha256 "0995fb36857dd76ccfb8bb07350c214d9f9099e80b1e66b4a8909311f24ff0db" - head "https://github.com/Kitware/VTK.git" - - bottle do - sha256 "5b8a2aa16741db6f3fb5b4a8cf0a0e4057291457018521a06e31a88821d79828" => :mojave - sha256 "45c099cf78ffc78b66cf21eed6ebf704fd67b75bfa3a86648a864b07535974d3" => :high_sierra - sha256 "5e089bf8847eb38d2412a24dbf0c125099a5908b9412881c6611ac675379e392" => :sierra - end - - option "without-python@2", "Build without python2 support" - - deprecated_option "without-python" => "without-python@2" - - depends_on "cmake" => :build - depends_on "boost" - depends_on "fontconfig" - depends_on "hdf5" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "netcdf" - depends_on "python@2" => :recommended - depends_on "python" => :optional - depends_on "qt" => :optional - depends_on "pyqt" if build.with? "qt" - - needs :cxx11 - - def install - args = std_cmake_args + %W[ - -DBUILD_SHARED_LIBS=ON - -DBUILD_TESTING=OFF - -DCMAKE_INSTALL_NAME_DIR:STRING=#{lib} - -DCMAKE_INSTALL_RPATH:STRING=#{lib} - -DModule_vtkInfovisBoost=ON - -DModule_vtkInfovisBoostGraphAlgorithms=ON - -DModule_vtkRenderingFreeTypeFontConfig=ON - -DVTK_REQUIRED_OBJCXX_FLAGS='' - -DVTK_USE_COCOA=ON - -DVTK_USE_SYSTEM_EXPAT=ON - -DVTK_USE_SYSTEM_HDF5=ON - -DVTK_USE_SYSTEM_JPEG=ON - -DVTK_USE_SYSTEM_LIBXML2=ON - -DVTK_USE_SYSTEM_NETCDF=ON - -DVTK_USE_SYSTEM_PNG=ON - -DVTK_USE_SYSTEM_TIFF=ON - -DVTK_USE_SYSTEM_ZLIB=ON - ] - - mkdir "build" do - if build.with?("python") && build.with?("python@2") - # VTK Does not support building both python 2 and 3 versions - odie "VTK: Does not support building both python 2 and 3 wrappers" - elsif build.with?("python") || build.with?("python@2") - python_executable = `which python3`.strip if build.with? "python" - python_executable = `which python2.7`.strip if build.with? "python@2" - - python_prefix = `#{python_executable} -c 'import sys;print(sys.prefix)'`.chomp - python_include = `#{python_executable} -c 'from distutils import sysconfig;print(sysconfig.get_python_inc(True))'`.chomp - python_version = "python" + `#{python_executable} -c 'import sys;print(sys.version[:3])'`.chomp - py_site_packages = "#{lib}/#{python_version}/site-packages" - - args << "-DVTK_WRAP_PYTHON=ON" - args << "-DPYTHON_EXECUTABLE='#{python_executable}'" - args << "-DPYTHON_INCLUDE_DIR='#{python_include}'" - # CMake picks up the system's python dylib, even if we have a brewed one. - if File.exist? "#{python_prefix}/Python" - args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'" - elsif File.exist? "#{python_prefix}/lib/lib#{python_version}.a" - args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/lib#{python_version}.a'" - elsif File.exist? "#{python_prefix}/lib/lib#{python_version}.dylib" - args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/lib#{python_version}.dylib'" - else - odie "No libpythonX.Y.{dylib|a} file found!" - end - # Set the prefix for the python bindings to the Cellar - args << "-DVTK_INSTALL_PYTHON_MODULE_DIR='#{py_site_packages}/'" - end - - if build.with? "qt" - args << "-DVTK_QT_VERSION:STRING=5" << "-DVTK_Group_Qt=ON" - args << "-DVTK_WRAP_PYTHON_SIP=ON" - args << "-DSIP_PYQT_DIR='#{Formula["pyqt5"].opt_share}/sip'" - end - - system "cmake", "..", *args - system "make" - system "make", "install" - end - - # Avoid hard-coding Python 2 or 3's Cellar paths - inreplace Dir["#{lib}/cmake/**/vtkPython.cmake"].first do |s| - if build.with? "python" - s.gsub! Formula["python"].prefix.realpath, Formula["python"].opt_prefix - end - if build.with? "python@2" - s.gsub! Formula["python@2"].prefix.realpath, Formula["python@2"].opt_prefix - end - end - - # Avoid hard-coding HDF5's Cellar path - inreplace Dir["#{lib}/cmake/**/vtkhdf5.cmake"].first, - Formula["hdf5"].prefix.realpath, Formula["hdf5"].opt_prefix - end - - def caveats; <<~EOS - Even without the --with-qt option, you can display native VTK render windows - from python. Alternatively, you can integrate the RenderWindowInteractor - in PyQt5 or Wx at runtime. Read more: - import vtk.qt5; help(vtk.qt5) or import vtk.wx; help(vtk.wx) - EOS - end - - test do - vtk_include = Dir[opt_include/"vtk-*"].first - major, minor = vtk_include.match(/.*-(.*)$/)[1].split(".") - - (testpath/"version.cpp").write <<~EOS - #include - #include - int main(int, char *[]) { - assert (vtkVersion::GetVTKMajorVersion()==#{major}); - assert (vtkVersion::GetVTKMinorVersion()==#{minor}); - return EXIT_SUCCESS; - } - EOS - - system ENV.cxx, "-std=c++11", "version.cpp", "-I#{vtk_include}" - system "./a.out" - system "#{bin}/vtkpython", "-c", "exit()" - end -end diff --git a/Formula/vttest.rb b/Formula/vttest.rb deleted file mode 100644 index 43609184d952c..0000000000000 --- a/Formula/vttest.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Vttest < Formula - desc "Test compatibility of VT100-compatible terminals" - homepage "https://invisible-island.net/vttest/" - url "https://invisible-mirror.net/archives/vttest/vttest-20140305.tgz" - sha256 "0168aa34061d4470a68b0dd0781a2a9e2bbfb1493e540c99f615b867a11cbf83" - - bottle do - cellar :any_skip_relocation - sha256 "8ff835e1beb71c0e221c87be184b6afdf1c8d6cb050c8d8f0d9d22b46c5df88f" => :mojave - sha256 "6a3972df6f5ab23fb7480ffda28b8b1e8059854b837f1c947744e5dfb542c6bb" => :high_sierra - sha256 "360d6eaa04e1a147eee360fed7d66ab779acc0a0ab3b51b1916cdf4d4a7f11f1" => :sierra - sha256 "e758b4d59d1322b736f247c9ebbabe3c73ad06b324120997c6af784b8a3ab3f7" => :el_capitan - sha256 "2584fb77678acad877286416b79db38673320ec028e6a6add37b987b150af648" => :yosemite - sha256 "e2faf045a9a09d49e64f104bf65ca7a8fabf4552a50621bd22206e80ef579844" => :mavericks - sha256 "acb979d3b90f828d2b504b9f0872ad4eb3c421d30872ad291df91123038433d4" => :mountain_lion - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - assert_predicate bin/"vttest", :exist? - end -end diff --git a/Formula/vultr.rb b/Formula/vultr.rb deleted file mode 100644 index 0137ab60fa61e..0000000000000 --- a/Formula/vultr.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Vultr < Formula - desc "Command-line tool for Vultr" - homepage "https://jamesclonk.github.io/vultr" - url "https://github.com/JamesClonk/vultr/archive/1.15.0.tar.gz" - sha256 "6e5eafdf16e18bcb5d2a6a448307b021f47149e480a01d6cfb4454e923623d3f" - head "https://github.com/JamesClonk/vultr.git" - - bottle do - cellar :any_skip_relocation - sha256 "4c2dc53809a93069890fd09c539e9ccb32cdaa6a56b6ec8af66322b87fb95abc" => :mojave - sha256 "223b1b559d163410cae027526f5c6de0c7f9ac766bafbf77b7abf1e4a2f3e83a" => :high_sierra - sha256 "97fec16060a7e644402ea8e24fe57aa0dcf4a8e31b6505dc8f57574fd1b57f2c" => :sierra - sha256 "b97a438ef61327a2c876a934417d61f0cebc710520f0a17eb123217b57a13d2f" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/JamesClonk").mkpath - ln_s buildpath, buildpath/"src/github.com/JamesClonk/vultr" - system "go", "build", "-o", bin/"vultr" - end - - test do - system bin/"vultr", "version" - end -end diff --git a/Formula/w-calc.rb b/Formula/w-calc.rb deleted file mode 100644 index bc32f88883672..0000000000000 --- a/Formula/w-calc.rb +++ /dev/null @@ -1,28 +0,0 @@ -class WCalc < Formula - desc "Very capable calculator" - homepage "https://w-calc.sourceforge.io/" - url "https://downloads.sourceforge.net/w-calc/wcalc-2.5.tar.bz2" - sha256 "0e2c17c20f935328dcdc6cb4c06250a6732f9ee78adf7a55c01133960d6d28ee" - revision 1 - - bottle do - cellar :any - sha256 "955d80417eea9747844f52b13d91005f207a869e04f49a4a8f1e1db7e8acfa74" => :mojave - sha256 "be1800e5bb6cbf1e8087a0310ba648ec80f5013081d8db1145011c2c826b3c0c" => :high_sierra - sha256 "f934e56de20012d05890525117377efd717ee9d1f09feada9cb41068791065ba" => :sierra - sha256 "f9b1cd0799ffed7d47cb467d6a9ba606208ec93f263180eb094713ef0bec2bfc" => :el_capitan - end - - depends_on "gmp" - depends_on "mpfr" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match "4", shell_output("#{bin}/wcalc 2+2") - end -end diff --git a/Formula/w/w-calc.rb b/Formula/w/w-calc.rb new file mode 100644 index 0000000000000..e945990397c59 --- /dev/null +++ b/Formula/w/w-calc.rb @@ -0,0 +1,42 @@ +class WCalc < Formula + desc "Very capable calculator" + homepage "https://w-calc.sourceforge.net/" + url "https://downloads.sourceforge.net/project/w-calc/Wcalc/2.5/wcalc-2.5.tar.bz2" + sha256 "0e2c17c20f935328dcdc6cb4c06250a6732f9ee78adf7a55c01133960d6d28ee" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ea670dd67545b11daf3baa92b75881e4abdafa8456c69876ba800b24777e6d7a" + sha256 cellar: :any, arm64_sequoia: "6e58f6ee9e2c2996498fbdefc112993bf9462421d1523e46360eebd7fbb975c8" + sha256 cellar: :any, arm64_sonoma: "22c9fbdad127cb9d4a7bb8cdf77a9a42a07e3849e222e16004ceff2b9a913b97" + sha256 cellar: :any, arm64_ventura: "2140a067af2aa1e613e7dfc8ec7ef33ff4650f4519b4e989ad7d36d00636ffa2" + sha256 cellar: :any, arm64_monterey: "710c2684d517f0f0f522008f77b8e3cced2aa51e5e7f5a42d1c9441ad40c24db" + sha256 cellar: :any, arm64_big_sur: "0213a099bdf4e642145fba3fa6d034edaa5d5c628259cd175f271b3aa5b35ff8" + sha256 cellar: :any, sonoma: "522929c224331663ad3fb955b1a0db32fc2e2faf3e292235d81662a09bc53c4d" + sha256 cellar: :any, ventura: "5b810eb4cf6254d48f1d6c6c5c582db14cec2b7cd432ba052746b99c2434b0c7" + sha256 cellar: :any, monterey: "efd668bc2f63e75a53063b66b9efca1cffea5eb1ea345ad7f72f6e1fcc805dd0" + sha256 cellar: :any, big_sur: "27705bfedd11e7181437ecfa3518ed5ca3a10cf9bbb81c6dd7f331080a476b9a" + sha256 cellar: :any, catalina: "dfde02c6213c6eeeecaeae55d7ecaa7620ab5c86f346f9242c82899802901b8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "77cd92e140bbedd38f7dcfa8827d03b0d829fc97c6188314ce7d647ed969cbcf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "739d3b28f0cfb194a6965fd522a335859e9f5611faf0f6bafbd8577f5fb823de" + end + + depends_on "gmp" + depends_on "mpfr" + + def install + # Workaround for build with newer clang + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + assert_match "4", shell_output("#{bin}/wcalc 2+2") + end +end diff --git a/Formula/w/w3m.rb b/Formula/w/w3m.rb new file mode 100644 index 0000000000000..f1a94e7decbc7 --- /dev/null +++ b/Formula/w/w3m.rb @@ -0,0 +1,57 @@ +class W3m < Formula + desc "Pager/text based browser" + homepage "https://w3m.sourceforge.net/" + license "w3m" + head "https://github.com/tats/w3m.git", branch: "master" + + stable do + url "https://deb.debian.org/debian/pool/main/w/w3m/w3m_0.5.3+git20230121.orig.tar.xz" + sha256 "974d1095a47f1976150a792fe9c5a44cc821c02b6bdd714a37a098386250e03a" + version "0.5.3-git20230121" + + # Fix for CVE-2023-4255 + patch do + url "https://sources.debian.org/data/main/w/w3m/0.5.3%2Bgit20230121-2.1/debian/patches/0002-CVE-2023-4255.patch" + sha256 "7a84744bae63f3e470b877038da5a221ed8289395d300a904ac5a8626b0a9cea" + end + end + + livecheck do + url "https://deb.debian.org/debian/pool/main/w/w3m/" + regex(/href=.*?w3m[._-]v?(\d+(?:\.\d+)+(?:\+git\d+)?)\.orig\.t/i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match.first.tr("+", "-") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "66b442a770ff9d6b7abb96a5994925af7a6ae07c68c4362d801e3d9b69f1fc6f" + sha256 arm64_sequoia: "d43c6ea193e92ae3a7ff8c68d77dfa6b69b28695bf0ef4009c07a8b55049bbb0" + sha256 arm64_sonoma: "7ebcfdfd3b2424232e38d4bb2df40b78aa189a5f9f59d7d95479a5c9b5504962" + sha256 arm64_ventura: "76450cc0ba39c902c03f3262950fc6fbd71ab37487d8b739d3c39294e08f269f" + sha256 sonoma: "b832f5eced22941c1c3f44520dd6bc6f656d861c27eb52a942b93723df23d0da" + sha256 ventura: "b0a1d6e3855af50f3d32878d2889fa99f281985bec224b18ce42e48d55df89a1" + sha256 arm64_linux: "bf66af8f63d1faba8adeccf8539174f8cf1e40834068a57745ef7f8916694079" + sha256 x86_64_linux: "08f462b37359e85d7d9628d5bfce123da1f7e28c1811157b3d485cb6424fff39" + end + + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "openssl@3" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "./configure", "--disable-image", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + assert_match "DuckDuckGo", shell_output("#{bin}/w3m -dump https://duckduckgo.com") + end +end diff --git a/Formula/w/wabt.rb b/Formula/w/wabt.rb new file mode 100644 index 0000000000000..4e21d3e78a0f2 --- /dev/null +++ b/Formula/w/wabt.rb @@ -0,0 +1,49 @@ +class Wabt < Formula + desc "Web Assembly Binary Toolkit" + homepage "https://github.com/WebAssembly/wabt" + url "https://github.com/WebAssembly/wabt.git", + tag: "1.0.38", + revision: "f571f444ebf1d06521408b51f2c6ec2ca3c2f818" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "da07f9033d3f4a8ca3d1921548a9ef08f1e0e9e46f4a1289e52f623cd0d5e42e" + sha256 cellar: :any, arm64_sequoia: "c610ef4df5bf250acf48fbb4ba722017bdf74531efe531eb0c07abec25733e88" + sha256 cellar: :any, arm64_sonoma: "928dc19f5d5be568613a2846e6521ac802eff4ed05e763554a22defeb651d453" + sha256 cellar: :any, sonoma: "156e54ebc8d7b34147cc7bd63d16f341922425d8c9312082c9126885e3420f27" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a87f15b62909b0d90e98ddd67056ba7edc6bddea910fb480ab98a89178ca4f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9941c4334ae8a592d231d446d8d7f21b1e15e59602f1f57212f217feb467eb47" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "python" => :build + + def install + ENV.append_to_cflags "-fPIC" if OS.linux? + + args = %w[ + -DBUILD_TESTS=OFF + -DWITH_WASI=ON + -DFETCHCONTENT_FULLY_DISCONNECTED=OFF + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", *args, *std_cmake_args + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"sample.wast").write("(module (memory 1) (func))") + system bin/"wat2wasm", testpath/"sample.wast" + end +end diff --git a/Formula/w/waffle.rb b/Formula/w/waffle.rb new file mode 100644 index 0000000000000..5d2b56aac01f0 --- /dev/null +++ b/Formula/w/waffle.rb @@ -0,0 +1,64 @@ +class Waffle < Formula + desc "C library for selecting an OpenGL API and window system at runtime" + homepage "https://waffle.freedesktop.org/" + url "https://waffle.freedesktop.org/files/release/waffle-1.8.1/waffle-1.8.1.tar.xz" + sha256 "f616c0ca6072d36bf81fb79a3695799973a978775e0213744bf0a39be6367425" + license "BSD-2-Clause" + head "https://gitlab.freedesktop.org/mesa/waffle.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "aac60d0464beecfe42add4b1be34ca27c1eaf49361202afb805df8acec7c024f" + sha256 cellar: :any, arm64_sequoia: "eb655477acb0eb6fe4a81e4ef5ba36d9d489df1bee0081d8e928b81c420168cd" + sha256 cellar: :any, arm64_sonoma: "0390ae70fb5f03b0625daaead204fdafe05e14452075f3251b589c1fd3e54515" + sha256 cellar: :any, arm64_ventura: "f49b790d1b6852b8d3568de22cb147bb63762adf37929988d225caa76acadc2e" + sha256 cellar: :any, arm64_monterey: "1d9fe5d73c406d4026183163af71d1b59ba96a090bff3d3190eac32cf99928af" + sha256 cellar: :any, sonoma: "a59ee0f3ad1c4f4a47c07661e1439f4156dd10b88038115765ef51173282d597" + sha256 cellar: :any, ventura: "be09dc2b2af894dd48245599720c93135c7edd32fa01d5cc80bbd9fbfc0aec43" + sha256 cellar: :any, monterey: "445f768e3b9d4bb8a5e53741cb57acafe5a64d01d3454528326dafdacda4ca34" + sha256 arm64_linux: "2cdfe7169a64ad8138255aca48128fdc8d23b9885224cddac2a23bcdb3ceabc1" + sha256 x86_64_linux: "e66ab6325cd9b5b39752985ee80e3724e9affd46a75d1d2c7b764f6fbbe87b9b" + end + + depends_on "docbook-xsl" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + uses_from_macos "libxslt" => :build + + on_linux do + depends_on "libx11" + depends_on "libxcb" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "systemd" + depends_on "wayland" + end + + def install + args = %w[ + -Dbuild-examples=true + -Dbuild-htmldocs=true + -Dbuild-manpages=true + ] + + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + cp_r prefix/"share/doc/waffle1/examples", testpath + cd "examples" + # Homebrew-specific work around for linker flag ordering problem in Ubuntu. + unless OS.mac? + inreplace "Makefile.example", "$(LDFLAGS) -o gl_basic gl_basic.c", + "gl_basic.c $(LDFLAGS) -o gl_basic" + inreplace "Makefile.example", "$(LDFLAGS) -o simple-x11-egl simple-x11-egl.c", + "simple-x11-egl.c $(LDFLAGS) -o simple-x11-egl" + end + ENV.append_to_cflags "-D_DARWIN_C_SOURCE" if OS.mac? + system "make", "-f", "Makefile.example" + end +end diff --git a/Formula/w/wagyu.rb b/Formula/w/wagyu.rb new file mode 100644 index 0000000000000..78f3d5dc574f3 --- /dev/null +++ b/Formula/w/wagyu.rb @@ -0,0 +1,39 @@ +class Wagyu < Formula + desc "Rust library for generating cryptocurrency wallets" + homepage "https://github.com/howardwu/wagyu" + url "https://github.com/howardwu/wagyu/archive/refs/tags/v0.6.1.tar.gz" + sha256 "2458b3d49653acd5df5f3161205301646527eca9f6ee3d84c7871afa275bad9f" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/howardwu/wagyu.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "169cc26ad96b50f80735faec915301f7c91106aef8beb498ef50273b03eaff00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "57802d359431dc4eefc7b5b38d70be730221ef164ccd327600e350eb9244465c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ddd3c15f7b61762da075af23b4139550f61109882648de03745dfb8ac859d412" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4a1163611ed4e907c5458922ca04ab13d6bb1c2f84b7de13d186f3e2f13ada34" + sha256 cellar: :any_skip_relocation, sonoma: "6158f8e5ef5e24a635e01d70f3357535d74591b1a4d1e1cc3bb8dd15cf4bd4ff" + sha256 cellar: :any_skip_relocation, ventura: "675db40f0160e4dcc9910c5f1f511946620bac4403ce4ee5b92e97c991186f97" + sha256 cellar: :any_skip_relocation, monterey: "0a09ccc659885bddbe3daadfda30eff1a4f88bad1e2e4582567451013f855b3d" + sha256 cellar: :any_skip_relocation, big_sur: "c3deaea08b0f90132b84451b50bcc6fc5dac9e5cf540c2ef18c3c2a7ce61f8d0" + sha256 cellar: :any_skip_relocation, catalina: "af829681e853e2a146e256548fe69da9e55fde6d974f300b342754831749bd9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a81b1c07ee67f4e0cac9e8a7ca17720e440b40c14d66e76db3f5945f862eadb9" + end + + # cannot build with latest rust and upstream is not active + # https://github.com/howardwu/wagyu/issues/280 + # https://github.com/howardwu/wagyu/issues/282 + # https://github.com/howardwu/wagyu/issues/285 + deprecate! date: "2024-09-11", because: :does_not_build + disable! date: "2025-09-11", because: :does_not_build + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"wagyu", "bitcoin" + end +end diff --git a/Formula/w/wails.rb b/Formula/w/wails.rb new file mode 100644 index 0000000000000..69111634d0775 --- /dev/null +++ b/Formula/w/wails.rb @@ -0,0 +1,40 @@ +class Wails < Formula + desc "Create beautiful applications using Go" + homepage "https://wails.io" + url "https://github.com/wailsapp/wails/archive/refs/tags/v2.10.2.tar.gz" + sha256 "864b53f22ca98ed17e456b352ec4691cfc2105bdcb23e87df8f826035b08d8c0" + license "MIT" + head "https://github.com/wailsapp/wails.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03848759d3b2c81aeb25b57dd4eb3cd16d4e51039628d8c7f95475c6b4166a5d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6f98b0a5d0c15753a4410eb2580d4b663b8c91862d873af5789ccc0c9296be9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f6f98b0a5d0c15753a4410eb2580d4b663b8c91862d873af5789ccc0c9296be9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f6f98b0a5d0c15753a4410eb2580d4b663b8c91862d873af5789ccc0c9296be9" + sha256 cellar: :any_skip_relocation, sonoma: "e0cca6feb3ce022ff0875c747eb3440925aa672dda5b791bf7515e161f6354fc" + sha256 cellar: :any_skip_relocation, ventura: "e0cca6feb3ce022ff0875c747eb3440925aa672dda5b791bf7515e161f6354fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "887c9deaecbf4f4864a42d516644477c8b52ddbc84a570334d19aa893b094aba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "199bb21c9f41e82c78e3b5c50c9ebe71bec297615d91deb6c323bfc8c8e47510" + end + + depends_on "go" + + def install + cd "v2" do + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/wails" + end + end + + test do + ENV["NO_COLOR"] = "1" + + output = shell_output("#{bin}/wails init -n brewtest 2>&1") + assert_match "# Initialising Project 'brewtest'", output + assert_match "Template | Vanilla + Vite", output + + assert_path_exists testpath/"brewtest/go.mod" + assert_equal "brewtest", JSON.parse((testpath/"brewtest/wails.json").read)["name"] + + assert_match version.to_s, shell_output("#{bin}/wails version") + end +end diff --git a/Formula/w/wait4x.rb b/Formula/w/wait4x.rb new file mode 100644 index 0000000000000..6d12e3d20e3fc --- /dev/null +++ b/Formula/w/wait4x.rb @@ -0,0 +1,27 @@ +class Wait4x < Formula + desc "Wait for a port or a service to enter the requested state" + homepage "https://wait4x.dev" + url "https://github.com/wait4x/wait4x/archive/refs/tags/v3.6.0.tar.gz" + sha256 "5b8e4ceaefd3902cda157aebd01dae76e29d7c93893fba7eacf7eb1a0ef17c27" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "873a4dbc6c0a3cba863b54345638cd99e42b94d4bf8f5f30f703872dfee6998a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "904540878870a12881db9cd848237254e9088cef14488e8ff5dfae174387085a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3532dfa326de95c1a6d622be47a3cf4ec83eac56a00894fb711b614b220d1f8" + sha256 cellar: :any_skip_relocation, sonoma: "a2fb789e633fc517647f200b1b70a76947f44cd33ae7b3a204277442a0994122" + sha256 cellar: :any_skip_relocation, arm64_linux: "07256649fd60fdac7e2aedceddb3805f7aeb5ef030014beaf9fa4ffbf0a36a4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50ac8efca6a7f91489119531764c7adb18f3b5e31770088fc79da375202b6986" + end + + depends_on "go" => :build + + def install + system "make", "build" + bin.install "dist/wait4x" + end + + test do + system bin/"wait4x", "exec", "true" + end +end diff --git a/Formula/w/wait_on.rb b/Formula/w/wait_on.rb new file mode 100644 index 0000000000000..8d0a12ca91715 --- /dev/null +++ b/Formula/w/wait_on.rb @@ -0,0 +1,36 @@ +class WaitOn < Formula + desc "Provides shell scripts with access to kqueue(3)" + homepage "https://www.freshports.org/sysutils/wait_on/" + url "https://pkg.freebsd.org/ports-distfiles/wait_on-1.1.tar.gz" + mirror "https://mirrorservice.org/sites/distfiles.macports.org/wait_on/wait_on-1.1.tar.gz" + sha256 "d7f40655f5c11e882890340826d1163050e2748de66b292c15b10d32feb6490f" + license "BSD-4-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e548523ed71f1fd1796069ae4182d5ae191eb7a76fc4ad83e39353c648b85e23" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ffd8be74922f931670be9f5bb8fbea47735ddef928a74d44562bcf0e2969c01d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "866722ebcb399e5524776cc6ffdd2022112287368e4fa768b8b9bbfe2a8a30cc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d6736732caacfe89a285f06256c397fefb2e47f11032f282d84e874b384fd21" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5d7664213ff9c0136cb6e8add7a2bfc87f2bf316594f9305e53a287834b12c72" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ca26e2aeef0c80f7b61b392ea50b03f7465bcdc0c8c3be2248aca538935fdc78" + sha256 cellar: :any_skip_relocation, sonoma: "272cd3ee9f3a5c193057d419fe9b4b5d787e6c0de452c1c20bdca85a56ba05b1" + sha256 cellar: :any_skip_relocation, ventura: "9427ad9d03fbceae7b129c5f00e7ad2fdd4e6d7630c933e1e1ef8554166cb1ed" + sha256 cellar: :any_skip_relocation, monterey: "abc2d21a1add07205d46997d869de4a896bd47174033c0e392e74c17813251b1" + sha256 cellar: :any_skip_relocation, big_sur: "b7a8f90a892e9b2cbe4455d9fd4aedfdf7b65c3534e00b8849e94652171bd4e3" + sha256 cellar: :any_skip_relocation, catalina: "befef0facd28d26c22ed14197e74c1bff41c9cd2f787ae4bee59027cfb89b2c7" + end + + depends_on "bmake" => :build + depends_on :macos # needs BSD kqueue + + def install + system "bmake" + system "bmake", "install", "MK_INSTALL_AS_USER=yes", "MANDIR=#{man}", "PREFIX=#{prefix}" + end + + test do + system bin/"wait_on", "-v" + end +end diff --git a/Formula/w/wakatime-cli.rb b/Formula/w/wakatime-cli.rb new file mode 100644 index 0000000000000..1ee47990f456c --- /dev/null +++ b/Formula/w/wakatime-cli.rb @@ -0,0 +1,40 @@ +class WakatimeCli < Formula + desc "Command-line interface to the WakaTime api" + homepage "https://wakatime.com/" + url "https://github.com/wakatime/wakatime-cli.git", + tag: "v1.131.0", + revision: "71f75a0bc9521a950fde6d4b10dd378d1491c7be" + license "BSD-3-Clause" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b262c6203e69718e5084f97b1a487d320175350fbf4b053c24dc24cc48ee349c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f865313a2b4c3dcb382b18e04d30f6eb8448cfbfd2022243686ae3bd1372adf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f865313a2b4c3dcb382b18e04d30f6eb8448cfbfd2022243686ae3bd1372adf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f865313a2b4c3dcb382b18e04d30f6eb8448cfbfd2022243686ae3bd1372adf" + sha256 cellar: :any_skip_relocation, sonoma: "03e9b73352730afd93bbb1a4d69c83c200a3aa0a018439196a758f285cfd39b4" + sha256 cellar: :any_skip_relocation, ventura: "03e9b73352730afd93bbb1a4d69c83c200a3aa0a018439196a758f285cfd39b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "de4c75bd897eb100a9e02677542318d0b964df86fd5188a3b0de53f92c666426" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8179095604d08f93c0d46842cd9851afd40bd2f124339b97a2ee0df752b79e30" + end + + depends_on "go" => :build + + def install + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + ldflags = %W[ + -s -w + -X github.com/wakatime/wakatime-cli/pkg/version.Arch=#{arch} + -X github.com/wakatime/wakatime-cli/pkg/version.BuildDate=#{time.iso8601} + -X github.com/wakatime/wakatime-cli/pkg/version.Commit=#{Utils.git_head(length: 7)} + -X github.com/wakatime/wakatime-cli/pkg/version.OS=#{OS.kernel_name.downcase} + -X github.com/wakatime/wakatime-cli/pkg/version.Version=v#{version} + ].join(" ") + system "go", "build", *std_go_args(ldflags:) + end + + test do + output = shell_output("#{bin}/wakatime-cli --help 2>&1") + assert_match "Command line interface used by all WakaTime text editor plugins", output + end +end diff --git a/Formula/w/wakeonlan.rb b/Formula/w/wakeonlan.rb new file mode 100644 index 0000000000000..ff21d218c1aed --- /dev/null +++ b/Formula/w/wakeonlan.rb @@ -0,0 +1,29 @@ +class Wakeonlan < Formula + desc "Sends magic packets to wake up network-devices" + homepage "https://github.com/jpoliv/wakeonlan" + url "https://github.com/jpoliv/wakeonlan/archive/refs/tags/v0.42.tar.gz" + sha256 "4f533f109f7f4294f6452b73227e2ce4d2aa81091cf6ae1f4fa2f87bad04a031" + license "Artistic-1.0-Perl" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "0859c811ae72fce06de1a607d36b0955517c80f5ea73431ee6c1dd38c749a0c6" + end + + # Build with Homebrew `perl` to build an `:all` bottle. + depends_on "perl" => :build + uses_from_macos "perl" + + def install + system "perl", "Makefile.PL" + system "make" + bin.install "blib/script/wakeonlan" + man1.install "blib/man1/wakeonlan.1" + end + + test do + system bin/"wakeonlan", "--version" + end +end diff --git a/Formula/w/wal-g.rb b/Formula/w/wal-g.rb new file mode 100644 index 0000000000000..5cd96a6b1fc3b --- /dev/null +++ b/Formula/w/wal-g.rb @@ -0,0 +1,51 @@ +class WalG < Formula + desc "Archival restoration tool for databases" + homepage "https://github.com/wal-g/wal-g" + url "https://github.com/wal-g/wal-g/archive/refs/tags/v3.0.7.tar.gz" + sha256 "69368316b90fae7c040e489ad540f6018d0f00963c5bc94d262d530e83bdd4ce" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "8aa6dcd7b9a17e0d53a37d54c020c88602e7e4e64712c6aeec5acd30047c4fa7" + sha256 cellar: :any, arm64_sequoia: "c64d5ad15282efaf311ca082f96e4b190b0dd3f26df838c430f343ec00236356" + sha256 cellar: :any, arm64_sonoma: "aee2c57633ed2939227c23d119a6f398345da14bd3f894ececdfb12218dd8853" + sha256 cellar: :any, sonoma: "8c1cccbeff937880545db272acf046cc328ef1021e73d1d6694a9dbf06ccad3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "38f2f7a5933676604e10dd476adc3ba2d4770ea081c973dd79a5e15971a8fd81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6f9f6d8dae5a52ba674f4bf21190df5e62dbc75222419da9e67b3c62213c781" + end + + depends_on "go" => :build + depends_on "brotli" + depends_on "libsodium" + depends_on "lzo" + + def install + %w[etcd fdb gp mongo mysql pg redis sqlserver].each do |db| + ldflags = %W[ + -s -w + -X github.com/wal-g/wal-g/cmd/#{db}.buildDate=#{time.iso8601} + -X github.com/wal-g/wal-g/cmd/#{db}.gitRevision=#{tap.user} + -X github.com/wal-g/wal-g/cmd/#{db}.walgVersion=#{version} + ] + output = bin/"wal-g-#{db}" + tags = %w[brotli libsodium lzo] + system "go", "build", *std_go_args(ldflags:, output:, tags:), "./main/#{db}" + end + end + + test do + ENV["WALG_FILE_PREFIX"] = testpath + + %w[etcd fdb gp mongo mysql pg redis sqlserver].each do |db| + assert_match version.to_s, shell_output("#{bin}/wal-g-#{db} --version") + + flags = case db + when "gp" + "--config #{testpath}" + when "mongo" + "--mongodb-uri mongodb://" + end + assert_match "No backups found", shell_output("#{bin}/wal-g-#{db} backup-list #{flags} 2>&1") + end + end +end diff --git a/Formula/w/wal2json.rb b/Formula/w/wal2json.rb new file mode 100644 index 0000000000000..9edec4295afa9 --- /dev/null +++ b/Formula/w/wal2json.rb @@ -0,0 +1,61 @@ +class Wal2json < Formula + desc "Convert PostgreSQL changesets to JSON format" + homepage "https://github.com/eulerto/wal2json" + url "https://github.com/eulerto/wal2json/archive/refs/tags/wal2json_2_6.tar.gz" + sha256 "18b4bdec28c74a8fc98a11c72de38378a760327ef8e5e42e975b0029eb96ba0d" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/(?:wal2json[._-])?v?(\d+(?:[._]\d+)+)/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6df07eb3b4c76fd3a26aabbd3d9512f2018ca40991a213805b3d97a359e6bbea" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0cd88f515f6d34e3aeb5ecbf7ef5a869639b032373512e8eb6d68b58e9b3b2af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "79300555385707acce8e526b38f75d91445f7bf43ad8dcc4b3d51083edd29a82" + sha256 cellar: :any_skip_relocation, sonoma: "1bd372e6fe5bf4532c35eea95a8da392cca051f40fb43eb2721a6d8669375eb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "98ff83a1fd6e9730c36c443fd57824831f83b48d426836a33e6a98e94b70647b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b73b0d8f8d95d485c6a5b8e9bc0ccf357292d8ca232ca6708cba79cb0875a7e9" + end + + depends_on "postgresql@17" => [:build, :test] + depends_on "postgresql@18" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + odie "Too many postgresql dependencies!" if postgresqls.count > 2 + + postgresqls.each do |postgresql| + system "make", "install", "USE_PGXS=1", + "PG_CONFIG=#{postgresql.opt_bin}/pg_config", + "pkglibdir=#{lib/postgresql.name}" + system "make", "clean" + end + end + + test do + ENV["LC_ALL"] = "C" + postgresqls.each do |postgresql| + pg_ctl = postgresql.opt_bin/"pg_ctl" + port = free_port + + datadir = testpath/postgresql.name + system pg_ctl, "initdb", "-D", datadir + (datadir/"postgresql.conf").write <<~EOS, mode: "a+" + + shared_preload_libraries = 'wal2json' + port = #{port} + EOS + system pg_ctl, "start", "-D", datadir, "-l", testpath/"log-#{postgresql.name}" + system pg_ctl, "stop", "-D", datadir + end + end +end diff --git a/Formula/w/walk.rb b/Formula/w/walk.rb new file mode 100644 index 0000000000000..aaec5887648c8 --- /dev/null +++ b/Formula/w/walk.rb @@ -0,0 +1,39 @@ +class Walk < Formula + desc "Terminal navigator" + homepage "https://github.com/antonmedv/walk" + url "https://github.com/antonmedv/walk/archive/refs/tags/v1.13.0.tar.gz" + sha256 "9f62377438908757fcb2210bd08bf346391858f21d0ef664d7998abf635880cb" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b1cc7f94688414f6b4106eb69287cda711b724acf675a64fbdcd9a6b1c1b2c4c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cce3ab82e4e2280c930d6f3c532440a20749e42175316a90fb64d7f00cea7d1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cce3ab82e4e2280c930d6f3c532440a20749e42175316a90fb64d7f00cea7d1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cce3ab82e4e2280c930d6f3c532440a20749e42175316a90fb64d7f00cea7d1f" + sha256 cellar: :any_skip_relocation, sonoma: "9719de03b75d0b1697d97ca68da9481bc29191c5cb3d89e5d899f7ff8c61ef1b" + sha256 cellar: :any_skip_relocation, ventura: "9719de03b75d0b1697d97ca68da9481bc29191c5cb3d89e5d899f7ff8c61ef1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "703f1027bcd2e5546c10901ca9b0a6df4dd76fa20c3647e9eba389fdc0dd592a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfa31d4ff035f46edf2aa77d9b6165e4edb93278f268b059325bed36d3b8e42e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + require "pty" + + PTY.spawn(bin/"walk") do |r, w, _pid| + r.winsize = [80, 60] + sleep 1 + w.write "\e" + begin + r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + end +end diff --git a/Formula/w/wallpaper.rb b/Formula/w/wallpaper.rb new file mode 100644 index 0000000000000..3f045a668aa3d --- /dev/null +++ b/Formula/w/wallpaper.rb @@ -0,0 +1,27 @@ +class Wallpaper < Formula + desc "Manage the desktop wallpaper" + homepage "https://github.com/sindresorhus/macos-wallpaper" + url "https://github.com/sindresorhus/macos-wallpaper/archive/refs/tags/v2.3.3.tar.gz" + sha256 "07838483fe015ae9798b542c1c15e02143bbae85c5f2e6fb51e6923bd76556ed" + license "MIT" + head "https://github.com/sindresorhus/macos-wallpaper.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f32335062b487623a8128191f5a991409f3be90893ff52e74762a08f129c7940" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f5748b482f492542189bce07a118dba99c058ac615864247f7127b44551d4f00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6a1e560bda31c57d95392aa21e3e6c1e9d611e89dd96134db985604cc3f52dd" + sha256 cellar: :any_skip_relocation, sonoma: "d1723c93aa42b6b3fdf61a1821db8975d4b2fa031f0fbfd2688f6b558a869164" + end + + depends_on xcode: ["16.0", :build] + depends_on :macos + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/wallpaper" + end + + test do + system bin/"wallpaper", "get" + end +end diff --git a/Formula/w/wally.rb b/Formula/w/wally.rb new file mode 100644 index 0000000000000..1d92d7abe5317 --- /dev/null +++ b/Formula/w/wally.rb @@ -0,0 +1,53 @@ +class Wally < Formula + desc "Modern package manager for Roblox projects inspired by Cargo" + homepage "https://github.com/UpliftGames/wally" + url "https://github.com/UpliftGames/wally/archive/refs/tags/v0.3.2.tar.gz" + sha256 "f7da2a10865b05efe97273aa1d08e0efbb9d26fecb770d819bdc01fbb98a0ad9" + license "MPL-2.0" + head "https://github.com/UpliftGames/wally.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3e14cdebf6fd46f95716076bdbdd68500710844f336d60d23b8795a327d5ac43" + sha256 cellar: :any, arm64_sequoia: "9eea75cb9e40ea07b81574797fbe351889814dc6100d7fc70cc353d185ff84ca" + sha256 cellar: :any, arm64_sonoma: "c98969ccbc9fcce5f9d14618ba96de22687718a8b82d3739ef5fa5b773b7082a" + sha256 cellar: :any, arm64_ventura: "c2342665f1ff90ae3b398b6f77f6a8b13a40cb28da096fd90396d311f49a6954" + sha256 cellar: :any, arm64_monterey: "c89a4d262ef25cabd1314c9199386ad26293245329bc4b4f42ca61efe0e671ae" + sha256 cellar: :any, arm64_big_sur: "e163760b40bb391a16d79959b2900441b819a128b20fac990728d757daead46b" + sha256 cellar: :any, sonoma: "3707aa60b7275a7ebba2ff3b2518a0cc689efc0e890669568e9df66ce7e5ae0a" + sha256 cellar: :any, ventura: "e2b3d38a5a171f0942cf2931a434aabe6a6ca9014c39468918f4711a48b3ccb3" + sha256 cellar: :any, monterey: "aed7b3c520028f006b526682892ed3a94af7986f68fbd4b1adda297ffcb44bff" + sha256 cellar: :any, big_sur: "c552601bb3c6eb5495b40e5ac0312243731c47ec2478eb1adb8b0b57c595b228" + sha256 cellar: :any_skip_relocation, arm64_linux: "2378ee8d4ce4a0d0075124b85633b99554f08c8db12327a2487c91dfc802326a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66ffa7e6874e0908b42a519d4b67223b668c08e11d3dc5eef078c7e35671593c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + ENV["OPENSSL_NO_VENDOR"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"wally.toml").write <<~TOML + [package] + name = "test/test" + version = "0.1.0" + license = "MIT" + realm = "server" + registry = "https://github.com/UpliftGames/wally-index" + [dependencies] + TOML + + system bin/"wally", "install" + assert_path_exists testpath/"wally.lock" + end +end diff --git a/Formula/w/wandio.rb b/Formula/w/wandio.rb new file mode 100644 index 0000000000000..03611f996e937 --- /dev/null +++ b/Formula/w/wandio.rb @@ -0,0 +1,59 @@ +class Wandio < Formula + desc "Transparently read from and write to zip, bzip2, lzma or zstd archives" + homepage "https://github.com/LibtraceTeam/wandio" + url "https://github.com/LibtraceTeam/wandio/archive/refs/tags/4.2.6-1.tar.gz" + version "4.2.6" + sha256 "f035d4d6beadf7a7e5619fb73db5a84d338008b5f4d6b1b8843619547248ec73" + license "LGPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:[.-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.gsub(/-1$/, "") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5cc4f12e0470409771792e2cb729aae66e6471d2a21758923c79aa21639209b1" + sha256 cellar: :any, arm64_sequoia: "685add7045c60ef524de06b753866b39fcb9a35b25dc57041609b8661b2bf545" + sha256 cellar: :any, arm64_sonoma: "3653ed92c97fe1d0574bb854a16e54fce8c25740a75aaf6989bc065fbfe5477b" + sha256 cellar: :any, arm64_ventura: "ad3894a632efe3456a375e96358f0f1719a57856d8bce53d4d7f13095a3b62f8" + sha256 cellar: :any, arm64_monterey: "755dd52c90ec7a3db4b475f24ebe60805b0d1ca1812cc65a2764e12bdbbcba54" + sha256 cellar: :any, arm64_big_sur: "036e3e338d06911199aee8d98a813cdfb89e5cf462193a7073f881e81bbe81aa" + sha256 cellar: :any, sonoma: "e4169552ae06821d31de301c7a2eec3d7bb733c72684386044e403521c4d531a" + sha256 cellar: :any, ventura: "3309dcd938ca538d3d9f35added3121069cee9f269fe95a153e0d0739a6cbe6d" + sha256 cellar: :any, monterey: "cb8eae9bae43a9cb8e6a39aa0a130170a0c41e5451fde7071aba2bc858ce5bd8" + sha256 cellar: :any, big_sur: "e1f3714ad297b93d897a9e291793e458084f380b253e7082f612dc35990464a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "5048ccd59624fe77b17eba9d1ebb78f4ded274bd2b4f94046d71b42e2edc580f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac5e2d66c128660db66748acbc77d1623cc500b3e140a253e2fb9c9f4f86c79d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "lz4" + depends_on "lzo" + depends_on "xz" # For LZMA + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + system "./bootstrap.sh" + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-http" + system "make", "install" + end + + test do + system bin/"wandiocat", "-z", "9", "-Z", "gzip", "-o", "test.gz", + test_fixtures("test.png"), test_fixtures("test.pdf") + assert_path_exists testpath/"test.gz" + end +end diff --git a/Formula/w/wangle.rb b/Formula/w/wangle.rb new file mode 100644 index 0000000000000..7afc17c8d1001 --- /dev/null +++ b/Formula/w/wangle.rb @@ -0,0 +1,89 @@ +class Wangle < Formula + desc "Modular, composable client/server abstractions framework" + homepage "https://github.com/facebook/wangle" + url "https://github.com/facebook/wangle/archive/refs/tags/v2025.11.03.00.tar.gz" + sha256 "006bcf6415b1d76105d276f8f977925fb1dbdc4f82f72a3f165652562eed5284" + license "Apache-2.0" + head "https://github.com/facebook/wangle.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "213d02316154879a7214ca6d079803708a2aa64aa5cc79fc18c2651c1c7936f3" + sha256 cellar: :any, arm64_sequoia: "08f67558f9603843cc1c25b0abd82a1386cbef8395b6289f8ac112d5570edccd" + sha256 cellar: :any, arm64_sonoma: "65c6cc9f11939b63b84f1eca01169d1c68d0c9d606973d1a54810efac5c93798" + sha256 cellar: :any, sonoma: "add728cfc8b507a20c13b33a6e959ab5c5f26b1450bf8d01af745091635cc044" + sha256 cellar: :any_skip_relocation, arm64_linux: "a80ed4a51ca0945114c86d0c7fe3186fa281db5e7666567ada6b2e6c0187d29b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e941198855bbc6584e9690726a5dbe1f663298b752c7781abd399c844d9cacf2" + end + + depends_on "cmake" => [:build, :test] + depends_on "double-conversion" + depends_on "fizz" + depends_on "fmt" + depends_on "folly" + depends_on "gflags" + depends_on "glog" + depends_on "libevent" + depends_on "lz4" + depends_on "openssl@3" + depends_on "zstd" + uses_from_macos "bzip2" + + def install + args = ["-DBUILD_TESTS=OFF"] + # Prevent indirect linkage with boost, libsodium, snappy and xz + linker_flags = %w[-dead_strip_dylibs] + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")}" if OS.mac? + + system "cmake", "-S", "wangle", "-B", "build/shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", "wangle", "-B", "build/static", "-DBUILD_SHARED_LIBS=OFF", *args, *std_cmake_args + system "cmake", "--build", "build/static" + lib.install "build/static/lib/libwangle.a" + + pkgshare.install Dir["wangle/example/echo/*.cpp"] + end + + test do + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(Echo LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + + list(APPEND CMAKE_MODULE_PATH "#{Formula["fizz"].opt_libexec}/cmake") + find_package(gflags REQUIRED) + find_package(folly CONFIG REQUIRED) + find_package(fizz CONFIG REQUIRED) + find_package(wangle CONFIG REQUIRED) + + add_executable(EchoClient #{pkgshare}/EchoClient.cpp) + target_link_libraries(EchoClient wangle::wangle) + add_executable(EchoServer #{pkgshare}/EchoServer.cpp) + target_link_libraries(EchoServer wangle::wangle) + CMAKE + + ENV.delete "CPATH" + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_MODULE_PATH=#{testpath}/cmake", "-Wno-dev" + system "cmake", "--build", "build" + + port = free_port + fork { exec testpath/"build/EchoServer", "-port", port.to_s } + sleep 30 + + require "pty" + output = "" + PTY.spawn(testpath/"build/EchoClient", "-port", port.to_s) do |r, w, pid| + w.write "Hello from Homebrew!\nAnother test line.\n" + sleep 60 + Process.kill "TERM", pid + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + assert_match("Hello from Homebrew!", output) + assert_match("Another test line.", output) + end +end diff --git a/Formula/w/waon.rb b/Formula/w/waon.rb new file mode 100644 index 0000000000000..7585a437016a1 --- /dev/null +++ b/Formula/w/waon.rb @@ -0,0 +1,44 @@ +class Waon < Formula + desc "Wave-to-notes transcriber" + homepage "https://kichiki.github.io/WaoN/" + url "https://github.com/kichiki/WaoN/archive/refs/tags/v0.11.tar.gz" + sha256 "75d5c1721632afee55a54bcbba1a444e53b03f4224b03da29317e98aa223c30b" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ba4c8874a6eeda9339d900073289cd829ab0bb0ca156509b141e3ff20fa9d432" + sha256 cellar: :any, arm64_sequoia: "10296a60dfeda8e84d9d66f0bbce71ca7072f3a108936537aedabb4108f1e9bd" + sha256 cellar: :any, arm64_sonoma: "7b3a144f5378ada22f1510604e3c49057031d6003769d97ccb8deee748b874e5" + sha256 cellar: :any, arm64_ventura: "648dea99dcc66856eb8a50ae15b4f8b026be97accb83bdceaabe795933b63af1" + sha256 cellar: :any, arm64_monterey: "42e529969e77de03e3dccc5c7e8ea1883bb860f22cc253b710a2d0125f0648df" + sha256 cellar: :any, arm64_big_sur: "5c2460bd2671fbb035d30f61a80c470caca47d2cc2b84b103b1d9d25540dd233" + sha256 cellar: :any, sonoma: "40676016b9dc97fd7e1af31a12d79e6bd59608f1751a3a1df31b8e07843f4d71" + sha256 cellar: :any, ventura: "0cac05703864bf3fa9a3d7b5df3707eed37ed165926b63c9fe8fac3c3814427c" + sha256 cellar: :any, monterey: "5c75aa3dabee6f46d25c3ac932ef5af20f00cfefe4e5e586489c380ed9aa4c05" + sha256 cellar: :any, big_sur: "1fb554284ace79c0c8eae1d7dc9b9e9ce9d7d90e35e97ad318f5cf7dcdaa059c" + sha256 cellar: :any, catalina: "47eaaeeea5b323dced48d444ffc21c2f16b86443271952bceac22abd788ebd8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "da0153186a47b6bbf4df39692da5552c67d68f455c1fe36fb2c13dd811106571" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f91b56d77254441ef842600da7b63b3ec7f84046cad6d89c64314aafa82af1e2" + end + + depends_on "pkgconf" => :build + depends_on "sox" => :test + depends_on "fftw" + depends_on "libsndfile" + + def install + system "make", "-f", "Makefile.waon", "waon" + bin.install "waon" + man1.install "waon.1" + end + + test do + system "sox", "-n", testpath/"test.wav", "synth", "3", "sin", "A4" + output = shell_output("#{bin}/waon -i #{testpath}/test.wav -o #{testpath}/output.midi 2>&1") + assert_match "# of events = 2", output + assert_match "n = 2", output + assert_path_exists testpath/"output.midi" + end +end diff --git a/Formula/w/wapm.rb b/Formula/w/wapm.rb new file mode 100644 index 0000000000000..129f3f35c2d6d --- /dev/null +++ b/Formula/w/wapm.rb @@ -0,0 +1,61 @@ +class Wapm < Formula + desc "WebAssembly Package Manager (CLI)" + homepage "https://wapm.io/" + url "https://github.com/wasmerio/wapm-cli/archive/refs/tags/v0.5.9.tar.gz" + sha256 "67f98e7e584ee05b53a70e19624ca73538aef28f46e1bb31c49262ba0e00a2ec" + license "MIT" + head "https://github.com/wasmerio/wapm-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "34251ab13608ada57daca8bb40d97979ec895c7a1e9ba1c9f6ccd2e5e0307068" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "64bcf4597cca94cacbe81f5171e942822148f75e4a5a6996c4a03755f853695d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b08738bc1b9beda9d2a865bff6cafe3fa4216bf96c9252c35646718f5f1607d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ff4e64b42f0dc537ce9ff5dfc463af0adda2fe75526eee5d42da45484747646c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "572c1d1a4ad8b4a56affef4ef40085b875f9f655f439fecd249f620b1b632caf" + sha256 cellar: :any_skip_relocation, sonoma: "2d9990dc2cac2d3b46b6bdbe1443de739d774d37ed64172b34e025d95883d930" + sha256 cellar: :any_skip_relocation, ventura: "5478c5f66e9b93bc517fbd617131457369af4db06a3adacd5154fe1f4866c07f" + sha256 cellar: :any_skip_relocation, monterey: "d8ac65e18e12300294d391210f8944fdf3a21a2580c1e633f4399085f6c98780" + sha256 cellar: :any_skip_relocation, big_sur: "429a76f2db523702a2c6ce40c0f0e4562f0756e22882680b2e7e6e94e2f2a675" + sha256 cellar: :any_skip_relocation, catalina: "d164b8af6b8a005697c6795e9c53df98200fb1b6cdc103ecce68dd69b135525c" + sha256 cellar: :any_skip_relocation, arm64_linux: "71ed13219631ca8b4893c6788aadc5d1aa133e1ddd9a3da1daf0555e6a36f93b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7ee08cb75bf71add9b45bd1df5b65b605ac8d667349e745948cc8dcb089721e" + end + + deprecate! date: "2024-04-05", because: :repo_archived + disable! date: "2025-04-08", because: :repo_archived + + depends_on "rust" => :build + depends_on "wasmer" => :test + + on_linux do + depends_on "pkgconf" => :build + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ENV["WASMER_DIR"] = ".wasmer" + ENV["WASMER_CACHE_DIR"] = "#{ENV["WASMER_DIR"]}/cache" + Dir.mkdir ENV["WASMER_DIR"] + Dir.mkdir ENV["WASMER_CACHE_DIR"] + + system bin/"wapm", "install", "cowsay" + + expected_output = <<~'EOF' + _____________ + < hello wapm! > + ------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || + EOF + assert_equal expected_output, shell_output("#{bin}/wapm run cowsay hello wapm!") + + system bin/"wapm", "uninstall", "cowsay" + end +end diff --git a/Formula/w/wartremover.rb b/Formula/w/wartremover.rb new file mode 100644 index 0000000000000..e5ae846cf318e --- /dev/null +++ b/Formula/w/wartremover.rb @@ -0,0 +1,46 @@ +class Wartremover < Formula + desc "Flexible Scala code linting tool" + homepage "https://github.com/wartremover/wartremover" + url "https://github.com/wartremover/wartremover/archive/refs/tags/v3.4.1.tar.gz" + sha256 "196ae02ea2717e56f848ad055996373d7b402c3cf930f24f449073964a4abdd4" + license "Apache-2.0" + head "https://github.com/wartremover/wartremover.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "f926d544a948151379125fe3ff4b4da1536d4cf337b3d9c2884f61fbc4284374" + end + + depends_on "sbt" => :build + depends_on "openjdk" + + # Fix to error: Deduplicate found + # PR ref: https://github.com/wartremover/wartremover/pull/1418 + patch do + url "https://github.com/wartremover/wartremover/commit/8dd18c1c3999dbabded920709a8c7c07e2e3b8c1.patch?full_index=1" + sha256 "cee269e254b64deef154ba13d58f68a2cabbfec41c6e659676afc21e25ca714a" + end + + def install + system "sbt", "assembly" + libexec.install "wartremover-assembly.jar" + bin.write_jar_script libexec/"wartremover-assembly.jar", "wartremover" + end + + test do + (testpath/"foo").write <<~EOS + object Foo { + def foo() { + var msg = "Hello World" + println(msg) + } + } + EOS + cmd = "#{bin}/wartremover -traverser org.wartremover.warts.Unsafe foo 2>&1" + assert_match "var is disabled", shell_output(cmd, 1) + end +end diff --git a/Formula/w/wasi-libc.rb b/Formula/w/wasi-libc.rb new file mode 100644 index 0000000000000..fe9d7821a7571 --- /dev/null +++ b/Formula/w/wasi-libc.rb @@ -0,0 +1,104 @@ +class WasiLibc < Formula + desc "Libc implementation for WebAssembly" + homepage "https://wasi.dev" + license all_of: [ + "Apache-2.0", + "MIT", + "Apache-2.0" => { with: "LLVM-exception" }, + ] + head "https://github.com/WebAssembly/wasi-libc.git", branch: "main" + + stable do + url "https://github.com/WebAssembly/wasi-libc/archive/refs/tags/wasi-sdk-27.tar.gz" + sha256 "00850da0742670d5ad7fd556bf7bc5452512bac79f17ac76d5cfaa3b74526898" + + resource "WASI" do + # Check the commit hash of `tools/wasi-headers/WASI` from the commit of the tag above. + url "https://github.com/WebAssembly/WASI/archive/59cbe140561db52fc505555e859de884e0ee7f00.tar.gz" + sha256 "fc78b28c2c06b64e0233544a65736fc5c515c5520365d6cf821408eadedaf367" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "258a8c5259156419c7f55f31d3eef5821cdffe5e1a210b613a65f05a5f8cfaf7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3f302ae2ace8f8c4ec65ae1945ac3bf3ac191dcbb9bd591750ad0c99f5e707b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3f302ae2ace8f8c4ec65ae1945ac3bf3ac191dcbb9bd591750ad0c99f5e707b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f3f302ae2ace8f8c4ec65ae1945ac3bf3ac191dcbb9bd591750ad0c99f5e707b" + sha256 cellar: :any_skip_relocation, sonoma: "f3f302ae2ace8f8c4ec65ae1945ac3bf3ac191dcbb9bd591750ad0c99f5e707b" + sha256 cellar: :any_skip_relocation, ventura: "f3f302ae2ace8f8c4ec65ae1945ac3bf3ac191dcbb9bd591750ad0c99f5e707b" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb897cf5452150158acd426d3bd4ada857e4e751d503aeff9e877bd216e25a57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb897cf5452150158acd426d3bd4ada857e4e751d503aeff9e877bd216e25a57" + end + + depends_on "llvm" => [:build, :test] + depends_on "lld" => :test + depends_on "wasm-micro-runtime" => :test + + # Needs clang + fails_with :gcc + + def install + resource("WASI").stage buildpath/"tools/wasi-headers/WASI" if build.stable? + + # We don't want to use superenv here, since we are targeting WASM. + ENV.remove_cc_etc + ENV.remove "PATH", Superenv.shims_path + + # Flags taken from Arch: + # https://gitlab.archlinux.org/archlinux/packaging/packages/wasi-libc/-/blob/main/PKGBUILD + make_args = [ + "WASM_CC=#{Formula["llvm"].opt_bin}/clang", + "WASM_AR=#{Formula["llvm"].opt_bin}/llvm-ar", + "WASM_NM=#{Formula["llvm"].opt_bin}/llvm-nm", + "INSTALL_DIR=#{share}/wasi-sysroot", + ] + + # See targets at: + # https://github.com/WebAssembly/wasi-sdk/blob/5e04cd81eb749edb5642537d150ab1ab7aedabe9/CMakeLists.txt#L14-L15 + targets = %w[ + wasm32-wasi + wasm32-wasip1 + wasm32-wasip2 + wasm32-wasip1-threads + wasm32-wasi-threads + ] + + # See target flags at: + # https://github.com/WebAssembly/wasi-sdk/blob/5e04cd81eb749edb5642537d150ab1ab7aedabe9/cmake/wasi-sdk-sysroot.cmake#L117-L135 + target_flags = Hash.new { |h, k| h[k] = [] } + targets.each { |target| target_flags[target] << "THREAD_MODEL=posix" if target.end_with?("-threads") } + target_flags["wasm32-wasip2"] << "WASI_SNAPSHOT=p2" + + targets.each do |target| + system "make", *make_args, "TARGET_TRIPLE=#{target}", "install", *target_flags[target] + end + end + + test do + # TODO: We should probably build this from source and package it as a formula. + resource "builtins" do + url "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/libclang_rt.builtins-wasm32-wasi-24.0.tar.gz" + sha256 "7e33c0df758b90469b1de3ca158e2d0a7f71934d5884525ba6a372de0b3b0ec7" + end + + ENV.remove_macosxsdk if OS.mac? + ENV.remove_cc_etc + + (testpath/"test.c").write <<~C + #include + volatile int x = 42; + int main(void) { + printf("the answer is %d", x); + return 0; + } + C + clang = Formula["llvm"].opt_bin/"clang" + clang_resource_dir = Pathname.new(shell_output("#{clang} --print-resource-dir").chomp) + testpath.install_symlink clang_resource_dir/"include" + resource("builtins").stage testpath/"lib/wasm32-unknown-wasi" + (testpath/"lib/wasm32-unknown-wasi").install_symlink "libclang_rt.builtins-wasm32.a" => "libclang_rt.builtins.a" + wasm_args = %W[--target=wasm32-wasi --sysroot=#{share}/wasi-sysroot] + system clang, *wasm_args, "-v", "test.c", "-o", "test", "-resource-dir=#{testpath}" + assert_equal "the answer is 42", shell_output("iwasm #{testpath}/test") + end +end diff --git a/Formula/w/wasi-runtimes.rb b/Formula/w/wasi-runtimes.rb new file mode 100644 index 0000000000000..9f0540c7325db --- /dev/null +++ b/Formula/w/wasi-runtimes.rb @@ -0,0 +1,226 @@ +class WasiRuntimes < Formula + desc "Compiler-RT and libc++ runtimes for WASI" + homepage "https://wasi.dev" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.4/llvm-project-21.1.4.src.tar.xz" + sha256 "a01ad7e5167780c945871d75c0413081d12067607a6de5cf71dc3e8d1a82112c" + license "Apache-2.0" => { with: "LLVM-exception" } + head "https://github.com/llvm/llvm-project.git", branch: "main" + + livecheck do + formula "llvm" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d31a025f56b9d695875a1e39b33c51cda863c4bfc51c76d0fd82605a72b965b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cc62b31f0978d14aa2fe4eef4c82fcac0943af072479240c0db031437e382a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f9b738cd1572576217565a40b7a82eac9b6535b3db136e07f98ed6d456969e6" + sha256 cellar: :any_skip_relocation, sonoma: "0fab5b51c72b7854c10d8554758ef44922b5a1615aa8c5718686330cd722446b" + sha256 cellar: :any_skip_relocation, arm64_linux: "abba8b4693897cd235ae690cefaeb079b76700af532d2d4bdb6ac53cf01ccf01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc412efe2b9593e920f226199cc42a64719f8ee2435f9a6e00a3b57122fcb5d3" + end + + depends_on "cmake" => :build + depends_on "wasi-libc" => [:build, :test] + depends_on "lld" => :test + depends_on "wasm-component-ld" => :test + depends_on "wasmtime" => :test + depends_on "llvm" + + def targets + # See targets at: + # https://github.com/WebAssembly/wasi-sdk/blob/5e04cd81eb749edb5642537d150ab1ab7aedabe9/CMakeLists.txt#L14-L15 + %w[ + wasm32-wasi + wasm32-wasip1 + wasm32-wasip2 + wasm32-wasip1-threads + wasm32-wasi-threads + ] + end + + def install + wasi_libc = Formula["wasi-libc"] + llvm = Formula["llvm"] + # Compiler flags taken from: + # https://github.com/WebAssembly/wasi-sdk/blob/5e04cd81eb749edb5642537d150ab1ab7aedabe9/cmake/wasi-sdk-sysroot.cmake#L37-L50 + common_cmake_args = %W[ + -DCMAKE_SYSTEM_NAME=WASI + -DCMAKE_SYSTEM_VERSION=1 + -DCMAKE_SYSTEM_PROCESSOR=wasm32 + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_AR=#{llvm.opt_bin}/llvm-ar + -DCMAKE_C_COMPILER=#{llvm.opt_bin}/clang + -DCMAKE_CXX_COMPILER=#{llvm.opt_bin}/clang++ + -DCMAKE_C_COMPILER_WORKS=ON + -DCMAKE_CXX_COMPILER_WORKS=ON + -DCMAKE_SYSROOT=#{wasi_libc.opt_share}/wasi-sysroot + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + -DCMAKE_FIND_FRAMEWORK=NEVER + -DCMAKE_VERBOSE_MAKEFILE=ON + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=#{HOMEBREW_LIBRARY_PATH}/cmake/trap_fetchcontent_provider.cmake + ] + # Compiler flags taken from: + # https://github.com/WebAssembly/wasi-sdk/blob/53551e59438641b25e63bf304869ab4da6d512d9/cmake/wasi-sdk-sysroot.cmake#L71-L88 + compiler_rt_args = %W[ + -DCMAKE_INSTALL_PREFIX=#{pkgshare} + -DCOMPILER_RT_BAREMETAL_BUILD=ON + -DCOMPILER_RT_BUILD_XRAY=OFF + -DCOMPILER_RT_INCLUDE_TESTS=OFF + -DCOMPILER_RT_HAS_FPIC_FLAG=OFF + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON + -DCOMPILER_RT_BUILD_SANITIZERS=OFF + -DCOMPILER_RT_BUILD_XRAY=OFF + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF + -DCOMPILER_RT_BUILD_PROFILE=OFF + -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF + -DCOMPILER_RT_BUILD_MEMPROF=OFF + -DCOMPILER_RT_BUILD_ORC=OFF + -DCOMPILER_RT_BUILD_GWP_ASAN=OFF + -DCMAKE_C_COMPILER_TARGET=wasm32-wasi + -DCOMPILER_RT_OS_DIR=wasi + ] + ENV.append_to_cflags "-fdebug-prefix-map=#{buildpath}=wasisdk://v#{wasi_libc.version}" + ENV.append_to_cflags "-mcpu=lime1" + # Don't use `std_cmake_args`. It sets things like `CMAKE_OSX_SYSROOT`. + system "cmake", "-S", "compiler-rt", "-B", "build-compiler-rt", *compiler_rt_args, *common_cmake_args + system "cmake", "--build", "build-compiler-rt" + system "cmake", "--install", "build-compiler-rt" + (pkgshare/"lib").install_symlink "wasi" => "wasip1" + (pkgshare/"lib").install_symlink "wasi" => "wasip2" + + clang_resource_dir = Utils.safe_popen_read(llvm.opt_bin/"clang", "-print-resource-dir").chomp + clang_resource_dir.sub! llvm.prefix.realpath, llvm.opt_prefix + clang_resource_dir = Pathname.new(clang_resource_dir) + + clang_resource_include_dir = clang_resource_dir/"include" + clang_resource_include_dir.find do |pn| + next unless pn.file? + + relative_path = pn.relative_path_from(clang_resource_dir) + target = pkgshare/relative_path + next if target.exist? + + target.parent.mkpath + ln_s pn, target + end + + target_configuration = Hash.new { |h, k| h[k] = {} } + + targets.each do |target| + # Configuration taken from: + # https://github.com/WebAssembly/wasi-sdk/blob/5e04cd81eb749edb5642537d150ab1ab7aedabe9/cmake/wasi-sdk-sysroot.cmake#L227-L271 + configuration = target_configuration[target] + configuration[:pic] = target.end_with?("-threads") ? "OFF" : "ON" + configuration[:flags] = target.end_with?("-threads") ? ["-pthread"] : [] + + cflags = ENV.cflags&.split || [] + cxxflags = ENV.cxxflags&.split || [] + + extra_flags = configuration.fetch(:flags) + extra_flags += %W[ + --target=#{target} + --sysroot=#{wasi_libc.opt_share}/wasi-sysroot + -resource-dir=#{pkgshare} + ] + cflags += extra_flags + cxxflags += extra_flags + + # FIXME: Upstream sets the equivalent of + # `-DLIBCXX_ENABLE_SHARED=#{configuration.fetch(:pic)}` + # `-DLIBCXXABI_ENABLE_SHARED=#{configuration.fetch(:pic)}` + # but the build fails with linking errors. + # See: https://github.com/WebAssembly/wasi-sdk/blob/5e04cd81eb749edb5642537d150ab1ab7aedabe9/cmake/wasi-sdk-sysroot.cmake#L227-L271 + target_cmake_args = %W[ + -DCMAKE_INSTALL_INCLUDEDIR=#{share}/wasi-sysroot/include/#{target} + -DCMAKE_STAGING_PREFIX=#{share}/wasi-sysroot + -DCMAKE_POSITION_INDEPENDENT_CODE=#{configuration.fetch(:pic)} + -DCXX_SUPPORTS_CXX11=ON + -DLIBCXX_ENABLE_THREADS:BOOL=ON + -DLIBCXX_HAS_PTHREAD_API:BOOL=ON + -DLIBCXX_HAS_EXTERNAL_THREAD_API:BOOL=OFF + -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF + -DLIBCXX_HAS_WIN32_THREAD_API:BOOL=OFF + -DLLVM_COMPILER_CHECKED=ON + -DLIBCXX_ENABLE_SHARED:BOOL=OFF + -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL=OFF + -DLIBCXX_ENABLE_EXCEPTIONS:BOOL=OFF + -DLIBCXX_ENABLE_FILESYSTEM:BOOL=ON + -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT:BOOL=OFF + -DLIBCXX_USE_COMPILER_RT:BOOL=ON + -DLIBCXXABI_USE_COMPILER_RT:BOOL=ON + -DLIBCXX_CXX_ABI=libcxxabi + -DLIBCXX_CXX_ABI_INCLUDE_PATHS=#{buildpath}/libcxxabi/include + -DLIBCXX_HAS_MUSL_LIBC:BOOL=ON + -DLIBCXX_ABI_VERSION=2 + -DLIBCXXABI_ENABLE_EXCEPTIONS:BOOL=OFF + -DLIBCXXABI_ENABLE_SHARED:BOOL=OFF + -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON + -DLIBCXXABI_ENABLE_THREADS:BOOL=ON + -DLIBCXXABI_HAS_PTHREAD_API:BOOL=ON + -DLIBCXXABI_HAS_EXTERNAL_THREAD_API:BOOL=OFF + -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF + -DLIBCXXABI_HAS_WIN32_THREAD_API:BOOL=OFF + -DLIBCXXABI_ENABLE_PIC:BOOL=#{configuration.fetch(:pic)} + -DLIBCXXABI_USE_LLVM_UNWINDER:BOOL=OFF + -DUNIX:BOOL=ON + -DCMAKE_C_FLAGS=#{cflags.join(" ")} + -DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")} + -DLIBCXX_LIBDIR_SUFFIX=/#{target} + -DLIBCXXABI_LIBDIR_SUFFIX=/#{target} + -DLIBCXX_INCLUDE_TESTS=OFF + -DLIBCXX_INCLUDE_BENCHMARKS=OFF + -DLLVM_ENABLE_RUNTIMES:STRING=libcxx;libcxxabi + ] + + # Don't use `std_cmake_args`. It sets things like `CMAKE_OSX_SYSROOT`. + system "cmake", "-S", "runtimes", "-B", "runtimes-#{target}", *target_cmake_args, *common_cmake_args + system "cmake", "--build", "runtimes-#{target}" + system "cmake", "--install", "runtimes-#{target}" + + triple = Utils.safe_popen_read(llvm.opt_bin/"clang", "--target=#{target}", "--print-target-triple").chomp + config_file = "#{triple}.cfg" + + (buildpath/config_file).write <<~CONFIG + --sysroot=#{HOMEBREW_PREFIX}/share/wasi-sysroot + -resource-dir=#{HOMEBREW_PREFIX}/share/wasi-runtimes + CONFIG + + (etc/"clang").install config_file + end + (share/"wasi-sysroot/include/c++/v1").mkpath + touch share/"wasi-sysroot/include/c++/v1/.keepme" + end + + test do + ENV.remove_macosxsdk if OS.mac? + ENV.remove_cc_etc + + (testpath/"test.c").write <<~C + #include + volatile int x = 42; + int main(void) { + printf("the answer is %d", x); + return 0; + } + C + (testpath/"test.cc").write <<~CPP + #include + + int main() { + std::cout << "hello from C++ main with cout!" << std::endl; + return 0; + } + CPP + + clang = Formula["llvm"].opt_bin/"clang" + targets.each do |target| + system clang, "--target=#{target}", "-v", "test.c", "-o", "test-#{target}" + assert_equal "the answer is 42", shell_output("wasmtime #{testpath}/test-#{target}") + + pthread_flags = target.end_with?("-threads") ? ["-pthread"] : [] + system "#{clang}++", "--target=#{target}", "-v", "test.cc", "-o", "test-cxx-#{target}", *pthread_flags + assert_equal "hello from C++ main with cout!", shell_output("wasmtime #{testpath}/test-cxx-#{target}").chomp + end + end +end diff --git a/Formula/w/wasm-component-ld.rb b/Formula/w/wasm-component-ld.rb new file mode 100644 index 0000000000000..16ced327e895d --- /dev/null +++ b/Formula/w/wasm-component-ld.rb @@ -0,0 +1,55 @@ +class WasmComponentLd < Formula + desc "Linker for creating WebAssembly components" + homepage "https://wasi.dev" + url "https://github.com/bytecodealliance/wasm-component-ld/archive/refs/tags/v0.5.18.tar.gz" + sha256 "27fd97d775a20737e5ee55b345200d23ae381f437886a54fe3a7a374e291e744" + license "Apache-2.0" + head "https://github.com/bytecodealliance/wasm-component-ld.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "995c04ef4663bcdc178d24631e04dfa83e92d8d459e9162700eedf691461bc8c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "647e8093a9605f0880fbfa931c23869f1ec2a8690a6b2dbe75d0eecdf102d0ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "731ffda684bee29d33ed9fcf70d84f42e311dca6af7d9b7cbbf2e4b2e385aca2" + sha256 cellar: :any_skip_relocation, sonoma: "a2537c20f99cb9a25f1d4a310b4ad4a6b5a8bcb4511625f8482c445529b05704" + sha256 cellar: :any_skip_relocation, arm64_linux: "65294a444ed484adceeab0e12a2f2697f482fba2d1321855dff319fb1cd3be25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42a5128674eda3deed28c4acacdf07c58d5385435f806713b5ff51c7b2abca81" + end + + depends_on "rust" => :build + depends_on "lld" => :test + depends_on "llvm" => :test + depends_on "wasi-libc" => :test + depends_on "wasmtime" => :test + + def install + system "cargo", "install", *std_cargo_args + end + + test do + resource "builtins" do + url "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/libclang_rt.builtins-wasm32-wasi-24.0.tar.gz" + sha256 "7e33c0df758b90469b1de3ca158e2d0a7f71934d5884525ba6a372de0b3b0ec7" + end + + ENV.remove_macosxsdk if OS.mac? + ENV.remove_cc_etc + + (testpath/"test.c").write <<~C + #include + volatile int x = 42; + int main(void) { + printf("the answer is %d", x); + return 0; + } + C + + clang = Formula["llvm"].opt_bin/"clang" + clang_resource_dir = Pathname.new(shell_output("#{clang} --print-resource-dir").chomp) + testpath.install_symlink clang_resource_dir/"include" + resource("builtins").stage testpath/"lib/wasm32-unknown-wasip2" + (testpath/"lib/wasm32-unknown-wasip2").install_symlink "libclang_rt.builtins-wasm32.a" => "libclang_rt.builtins.a" + wasm_args = %W[--target=wasm32-wasip2 --sysroot=#{Formula["wasi-libc"].opt_share}/wasi-sysroot] + system clang, *wasm_args, "-v", "test.c", "-o", "test", "-resource-dir=#{testpath}" + assert_equal "the answer is 42", shell_output("wasmtime #{testpath}/test") + end +end diff --git a/Formula/w/wasm-micro-runtime.rb b/Formula/w/wasm-micro-runtime.rb new file mode 100644 index 0000000000000..69fe530a98b23 --- /dev/null +++ b/Formula/w/wasm-micro-runtime.rb @@ -0,0 +1,66 @@ +class WasmMicroRuntime < Formula + desc "WebAssembly Micro Runtime (WAMR)" + homepage "https://github.com/bytecodealliance/wasm-micro-runtime" + url "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-2.4.3.tar.gz" + sha256 "4ac27e697a3e64959756624d68ec18ce5fc54a2d3f31f1b3f702be6fcd48a7d8" + license "Apache-2.0" => { with: "LLVM-exception" } + head "https://github.com/bytecodealliance/wasm-micro-runtime.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "813abc6b66e97f8b07b4513831a6f2ce0d649d9cafb2a34bf6b68f1eb0117a42" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f24a396d0a48d07d77f7afcc570b8da6ab9a3b69baaec5efe0ea929b0cdb061" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "20a4dca96df6eeff3a08822169839c9b62043b4a7216236424cdaa8dbfe30d45" + sha256 cellar: :any_skip_relocation, sonoma: "3a30eb9519310b933486e2b03f0f5733eca3d865061e51e522d5fc44c60f32f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd0735a1ef01e09504202bd529143fc37945512de0a87a736bf90dc17769952a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10d759a5ac9d54f7b5975357e647aad6f04967a0e6260b077bb12c9c0e0146ca" + end + + depends_on "cmake" => :build + + def install + # Prevent CMake from downloading and building things on its own. + buildpath.glob("**/build_llvm*").map(&:unlink) + buildpath.glob("**/libc_uvwasi.cmake").map(&:unlink) + cmake_args = %w[ + -DWAMR_BUILD_MULTI_MODULE=1 + -DWAMR_BUILD_DUMP_CALL_STACK=1 + -DWAMR_BUILD_JIT=0 + -DWAMR_BUILD_LIBC_UVWASI=0 + -DCMAKE_STRIP=0 + -DWAMR_BUILD_SIMD=0 + ] + cmake_source = buildpath/"product-mini/platforms"/OS.kernel_name.downcase + + # First build the CLI which has its own CMake build configuration + system "cmake", "-S", cmake_source, "-B", "platform_build", *cmake_args, *std_cmake_args + system "cmake", "--build", "platform_build" + system "cmake", "--install", "platform_build" + + # As a second step build and install the shared library and the C headers + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-fib_wasm" do + url "https://github.com/wasm3/wasm3/raw/main/test/lang/fib.c.wasm" + sha256 "e6fafc5913921693101307569fc1159d4355998249ca8d42d540015433d25664" + end + + resource("homebrew-fib_wasm").stage testpath + + output = shell_output("#{bin}/iwasm -f fib #{testpath}/fib.c.wasm 2>&1", 1) + assert_match "Exception: invalid input argument count", output + + assert_match version.to_s, shell_output("#{bin}/iwasm --version") + end +end diff --git a/Formula/w/wasm-pack.rb b/Formula/w/wasm-pack.rb new file mode 100644 index 0000000000000..3f8be33e5a061 --- /dev/null +++ b/Formula/w/wasm-pack.rb @@ -0,0 +1,48 @@ +class WasmPack < Formula + desc "Your favorite rust -> wasm workflow tool!" + homepage "https://rustwasm.github.io/wasm-pack/" + url "https://github.com/rustwasm/wasm-pack/archive/refs/tags/v0.13.1.tar.gz" + sha256 "3c28be53174fd12a6f3c3a018f14c8383b2eec6c6699c74751c1f3c51a2346c0" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rustwasm/wasm-pack.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "015d79bf605e1c7210d9662f663bd625d5ffb198b4b05f057ff96aeda01c4157" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "747c2699cacc93a426a98bab721cf4fcf70d04f041b9f985c5c28351823a3179" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5efb6426299ccfea3127cb7132c7583fd54d88072e623cb02f11532da201f243" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4721dbfd0281026391ea9d413a1e23c0bfecf803f370305a1c2e209234c1326" + sha256 cellar: :any_skip_relocation, sonoma: "05ad5721098c7a62a35a817ca06af6a249d02d102e3739ce029809b6946824f4" + sha256 cellar: :any_skip_relocation, ventura: "e42e4af8958a1593cbf06ed54a645512e1fd3f51e447b5c12882bd67f6fe0528" + sha256 cellar: :any_skip_relocation, arm64_linux: "a30ccc8550215b641f2203ce5375b53b5167f6368421243fd549fa68a4920a2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ddf3a9d0f664911152c681c589f4751b92c4ac1c172b0f366b275a4dabfd5ff" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + depends_on "rustup" + + def install + # We hit a segfault in test using pre-built cargo-generate < 0.21.2 on arm64 linux. + # The logic to use a global copy from PATH is broken[^1] and a PR[^2] to fix stalled. + # There is another PR[^3] to provide an environment variable to bypass version check. + # + # [^1]: https://github.com/rustwasm/wasm-pack/issues/1457 + # [^2]: https://github.com/rustwasm/wasm-pack/pull/1330 + # [^3]: https://github.com/rustwasm/wasm-pack/pull/1482 + inreplace "src/install/mod.rs", '"0.18.2"', '"0.21.3"' if OS.linux? && Hardware::CPU.arm? + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "wasm-pack #{version}", shell_output("#{bin}/wasm-pack --version") + + ENV.prepend_path "PATH", Formula["rustup"].bin + system "rustup", "set", "profile", "minimal" + system "rustup", "default", "stable" + + system bin/"wasm-pack", "new", "hello-wasm" + system bin/"wasm-pack", "build", "hello-wasm" + assert_path_exists testpath/"hello-wasm/pkg/hello_wasm_bg.wasm" + end +end diff --git a/Formula/w/wasm-tools.rb b/Formula/w/wasm-tools.rb new file mode 100644 index 0000000000000..5b8a272f61168 --- /dev/null +++ b/Formula/w/wasm-tools.rb @@ -0,0 +1,47 @@ +class WasmTools < Formula + desc "Low level tooling for WebAssembly in Rust" + homepage "https://github.com/bytecodealliance/wasm-tools" + url "https://github.com/bytecodealliance/wasm-tools/archive/refs/tags/v1.240.0.tar.gz" + sha256 "be7c6eab474a40684a997b85fc608ce7a3ce172848a7fcbcecf3b68534a44cf5" + license "Apache-2.0" => { with: "LLVM-exception" } + head "https://github.com/bytecodealliance/wasm-tools.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e0da05ed9b6bb5ab308fc3f5c35ecefc7419830dbe266c78919b4f38f34e7401" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8b4968383d3b4a9b21e8d519d72f13f55f2d47f1ae6f3f02e7d1d695f9f5806" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad3b29ece01cb3596378c533cadc50d86ec575db68117b414c4b21ea07e5285b" + sha256 cellar: :any_skip_relocation, sonoma: "cd08a822f26480e64624e500af7a74d0a9accf70201e432bb3e5c6bde39626bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "3183d512d8728c445307cacf428410d50a1c7d043ea33c2547b6b75f9e67393f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6768f3a6f860a956d871bb495ea667f668acd0323790d1b9c78d39bcd71a4c7" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") + (testpath/"sum.wasm").write(wasm) + system bin/"wasm-tools", "validate", testpath/"sum.wasm" + + expected = <<~EOS + (module + (type (;0;) (func (param i32 i32) (result i32))) + (export "sum" (func 0)) + (func (;0;) (type 0) (param i32 i32) (result i32) + local.get 0 + local.get 1 + i32.add + ) + ) + EOS + assert_equal expected, shell_output("#{bin}/wasm-tools print #{testpath}/sum.wasm") + end +end diff --git a/Formula/w/wasm3.rb b/Formula/w/wasm3.rb new file mode 100644 index 0000000000000..434a9fb0c7b63 --- /dev/null +++ b/Formula/w/wasm3.rb @@ -0,0 +1,55 @@ +class Wasm3 < Formula + desc "High performance WebAssembly interpreter" + homepage "https://github.com/wasm3/wasm3" + url "https://github.com/wasm3/wasm3/archive/refs/tags/v0.5.0.tar.gz" + sha256 "b778dd72ee2251f4fe9e2666ee3fe1c26f06f517c3ffce572416db067546536c" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "67558c58d6f3470d32cc63b037032141ef9d5333b140266449b61ce990b0e5f0" + sha256 cellar: :any, arm64_sequoia: "8cbba5eaf9cb8d51d1b3f736027239a2982316e1019fa3cc6f1fa2b368c2c0ca" + sha256 cellar: :any, arm64_sonoma: "1ce007a2ef41fb969587a79186545562851c847df980b9d9c5e240126dd7c680" + sha256 cellar: :any, sonoma: "b73049c21f9f23a48183a202350067d97499166bc56645b724f04a41549e37b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ecffe5df21d1f012c6a2139c8cb57e5673a390e0352b1250deef8a1004c171e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81583583d30963a9a92c39f2dad088571eff6ae11b3617bc8b39f585475161a0" + end + + depends_on "cmake" => :build + depends_on "uvwasi" + + def install + # Unbundled uvwasi and link to shared library + inreplace "CMakeLists.txt" do |s| + s.gsub! "FetchContent_GetProperties(uvwasi)", + "FetchContent_MakeAvailable(uvwasi)" + s.gsub! "target_link_libraries(${OUT_FILE} uvwasi_a uv_a)", + "target_link_libraries(${OUT_FILE} uvwasi::uvwasi)" + end + + # We bypass brew's dependency provider to set `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` + # which redirects FetchContent_Declare() to find_package() and helps find our `uvwasi`. + # To re-block fetches, we use the not-recommended `FETCHCONTENT_FULLY_DISCONNECTED`. + system "cmake", "-S", ".", "-B", "build", + "-DHOMEBREW_ALLOW_FETCHCONTENT=ON", + "-DFETCHCONTENT_FULLY_DISCONNECTED=ON", + "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS", + *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/wasm3" + end + + test do + resource "homebrew-fib32.wasm" do + url "https://github.com/wasm3/wasm3/raw/ae7b69b6d2f4d8561c907d1714d7e68b48cddd9e/test/lang/fib32.wasm" + sha256 "80073d9035c403b6caf62252600c5bda29cf2fb5e3f814ba723640fe047a6b87" + end + + testpath.install resource("homebrew-fib32.wasm") + + # Run function fib(24) and check the result is 46368 + assert_equal "Result: 46368", shell_output("#{bin}/wasm3 --func fib fib32.wasm 24 2>&1").strip + end +end diff --git a/Formula/w/wasmedge.rb b/Formula/w/wasmedge.rb new file mode 100644 index 0000000000000..832c67f7b7bf8 --- /dev/null +++ b/Formula/w/wasmedge.rb @@ -0,0 +1,50 @@ +class Wasmedge < Formula + desc "Lightweight, high-performance, and extensible WebAssembly runtime" + homepage "https://WasmEdge.org/" + license "Apache-2.0" + revision 3 + head "https://github.com/WasmEdge/WasmEdge.git", branch: "master" + + stable do + url "https://github.com/WasmEdge/WasmEdge/releases/download/0.15.0/WasmEdge-0.15.0-src.tar.gz" + sha256 "17915c4d047bc7a02aca862f4852101ec8d35baab7b659593687ab8c84b00938" + + # Backport support for LLVM 21 + patch do + url "https://github.com/WasmEdge/WasmEdge/commit/b11791e4312445e3fd2d6c56acc9c2e36e12ef34.patch?full_index=1" + sha256 "f9d3b39ca9871ca3d2c87f7e107651d36e9eedeccc79925879671ff552aec99b" + end + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c6a8bc60386545e6a945f76fee81f095c33f57d1f2c75bca756a38158843a44" + sha256 cellar: :any, arm64_sequoia: "6f7b13da240b4605b6f33e0b969b6ac3b3ce26c9ee02b3bacc83a77ecd192c7b" + sha256 cellar: :any, arm64_sonoma: "a20c30f91a0846db3de784348bcff62c807d56f74fdd492d2cda29bb53fc2412" + sha256 cellar: :any, sonoma: "2b6c66b23637ef0815e63954ff032734e7b44cf35d682045e8e4207569e13ddc" + sha256 cellar: :any_skip_relocation, arm64_linux: "afd779ff4bd06efcca2d1b13a7321fb7f7148b580e7e5f8f201f39121c4926ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31b7e307f8938878a7db41931767ab52955739cc26315c3289de73eea692fcfc" + end + + depends_on "cmake" => :build + depends_on "fmt" + depends_on "lld" + depends_on "llvm" + depends_on "spdlog" + + def install + # Use CMAKE_BUILD_WITH_INSTALL_RPATH to keep versioned LLVM in RPATH on Linux + args = ["-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"] if OS.linux? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # sum.wasm was taken from wasmer.rb + wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") + (testpath/"sum.wasm").write(wasm) + assert_equal "3\n", + shell_output("#{bin}/wasmedge --reactor #{testpath/"sum.wasm"} sum 1 2") + end +end diff --git a/Formula/w/wasmer.rb b/Formula/w/wasmer.rb new file mode 100644 index 0000000000000..b389534d3cd04 --- /dev/null +++ b/Formula/w/wasmer.rb @@ -0,0 +1,39 @@ +class Wasmer < Formula + desc "Universal WebAssembly Runtime" + homepage "https://wasmer.io" + url "https://github.com/wasmerio/wasmer/archive/refs/tags/v6.1.0.tar.gz" + sha256 "7bccb5b86724ea35ca9373fb81092080a615c1baa6129a8eeee9ed3e3f74b9b1" + license "MIT" + head "https://github.com/wasmerio/wasmer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "834c65f05099fcf4e9b897cf65c0fa095e0109ef4f67b33f5fcd17447d06f24d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b91d9d0d03bbc7ff78747b82f6f996486d895024556fff2099136ca14390dec5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a853a4998fd7d3e45628f3e64d35cc1229131f6523167bcf87ebc1e892e41274" + sha256 cellar: :any_skip_relocation, sonoma: "2c331e3bf88d7d716b539bcf1c8138a811012409800d1e32a30f905a76e575f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9a70e8e4b18be1a2a740f6f640cb0bf416ad7083d49acb0bcb799b31d08233d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f7d7cc3e60c85166620e66d9a172dcce02a0f3115dfb64cadac458cddd85fe1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "wabt" => :build + + on_linux do + depends_on "libxkbcommon" + end + + def install + system "cargo", "install", "--features", "cranelift", *std_cargo_args(path: "lib/cli") + + generate_completions_from_executable(bin/"wasmer", "gen-completions") + end + + test do + wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") + (testpath/"sum.wasm").write(wasm) + assert_equal "3\n", + shell_output("#{bin}/wasmer run #{testpath/"sum.wasm"} --invoke sum 1 2") + end +end diff --git a/Formula/w/wasmtime.rb b/Formula/w/wasmtime.rb new file mode 100644 index 0000000000000..c4430f09b0be5 --- /dev/null +++ b/Formula/w/wasmtime.rb @@ -0,0 +1,175 @@ +class Wasmtime < Formula + desc "Standalone JIT-style runtime for WebAssembly, using Cranelift" + homepage "https://wasmtime.dev/" + url "https://github.com/bytecodealliance/wasmtime.git", + tag: "v38.0.3", + revision: "d9dc16b28c36609f9f1e08be3f9e8b799eafd59c" + license "Apache-2.0" => { with: "LLVM-exception" } + head "https://github.com/bytecodealliance/wasmtime.git", branch: "main" + + # Upstream maintains multiple major versions and the "latest" release may be + # for a lower version, so we have to check multiple releases to identify the + # highest version. + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "db8f4d73db18c0dbf6680a00eb4115e013924bd585f4788fad054d8bfc85586f" + sha256 cellar: :any, arm64_sequoia: "8d36c83dfa78ae2ff14579b884de56a27f8c9d5e91a37243e87849cac7e38220" + sha256 cellar: :any, arm64_sonoma: "236efae76541cccd754a2a3d46bd9adf88df78895fd3b70d2605586e7c4f3a06" + sha256 cellar: :any, sonoma: "4c105d7c1d5904023627917c1a636ef459ee35e77db8271c6f5f169894887759" + sha256 cellar: :any_skip_relocation, arm64_linux: "45a418235da6ed50914981af561a87fde47b310901bf66105bec65244e156179" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b88a70cb4088276707b5ebd1e47da97e859803e43cf5b12b2f70124d8e92c34c" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args, "--profile=fastest-runtime" + + system "cmake", "-S", "crates/c-api", "-B", "build", "-DWASMTIME_FASTEST_RUNTIME=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + generate_completions_from_executable(bin/"wasmtime", "completion") + end + + test do + wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") + (testpath/"sum.wasm").write(wasm) + assert_equal "3\n", + shell_output("#{bin}/wasmtime --invoke sum #{testpath/"sum.wasm"} 1 2") + + (testpath/"hello.wat").write <<~EOS + (module + (func $hello (import "" "hello")) + (func (export "run") (call $hello)) + ) + EOS + + # Example from https://docs.wasmtime.dev/examples-c-hello-world.html to test C library API, + # with comments removed for brevity + (testpath/"hello.c").write <<~C + #include + #include + #include + #include + #include + + static void exit_with_error(const char *message, wasmtime_error_t *error, wasm_trap_t *trap); + + static wasm_trap_t* hello_callback( + void *env, + wasmtime_caller_t *caller, + const wasmtime_val_t *args, + size_t nargs, + wasmtime_val_t *results, + size_t nresults + ) { + printf("Calling back...\\n"); + printf("> Hello World!\\n"); + return NULL; + } + + int main() { + int ret = 0; + printf("Initializing...\\n"); + wasm_engine_t *engine = wasm_engine_new(); + assert(engine != NULL); + + wasmtime_store_t *store = wasmtime_store_new(engine, NULL, NULL); + assert(store != NULL); + wasmtime_context_t *context = wasmtime_store_context(store); + + FILE* file = fopen("./hello.wat", "r"); + assert(file != NULL); + fseek(file, 0L, SEEK_END); + size_t file_size = ftell(file); + fseek(file, 0L, SEEK_SET); + wasm_byte_vec_t wat; + wasm_byte_vec_new_uninitialized(&wat, file_size); + assert(fread(wat.data, file_size, 1, file) == 1); + fclose(file); + + wasm_byte_vec_t wasm; + wasmtime_error_t *error = wasmtime_wat2wasm(wat.data, wat.size, &wasm); + if (error != NULL) + exit_with_error("failed to parse wat", error, NULL); + wasm_byte_vec_delete(&wat); + + printf("Compiling module...\\n"); + wasmtime_module_t *module = NULL; + error = wasmtime_module_new(engine, (uint8_t*) wasm.data, wasm.size, &module); + wasm_byte_vec_delete(&wasm); + if (error != NULL) + exit_with_error("failed to compile module", error, NULL); + + printf("Creating callback...\\n"); + wasm_functype_t *hello_ty = wasm_functype_new_0_0(); + wasmtime_func_t hello; + wasmtime_func_new(context, hello_ty, hello_callback, NULL, NULL, &hello); + + printf("Instantiating module...\\n"); + wasm_trap_t *trap = NULL; + wasmtime_instance_t instance; + wasmtime_extern_t import; + import.kind = WASMTIME_EXTERN_FUNC; + import.of.func = hello; + error = wasmtime_instance_new(context, module, &import, 1, &instance, &trap); + if (error != NULL || trap != NULL) + exit_with_error("failed to instantiate", error, trap); + + printf("Extracting export...\\n"); + wasmtime_extern_t run; + bool ok = wasmtime_instance_export_get(context, &instance, "run", 3, &run); + assert(ok); + assert(run.kind == WASMTIME_EXTERN_FUNC); + + printf("Calling export...\\n"); + error = wasmtime_func_call(context, &run.of.func, NULL, 0, NULL, 0, &trap); + if (error != NULL || trap != NULL) + exit_with_error("failed to call function", error, trap); + + printf("All finished!\\n"); + ret = 0; + + wasmtime_module_delete(module); + wasmtime_store_delete(store); + wasm_engine_delete(engine); + return ret; + } + + static void exit_with_error(const char *message, wasmtime_error_t *error, wasm_trap_t *trap) { + fprintf(stderr, "error: %s\\n", message); + wasm_byte_vec_t error_message; + if (error != NULL) { + wasmtime_error_message(error, &error_message); + wasmtime_error_delete(error); + } else { + wasm_trap_message(trap, &error_message); + wasm_trap_delete(trap); + } + fprintf(stderr, "%.*s\\n", (int) error_message.size, error_message.data); + wasm_byte_vec_delete(&error_message); + exit(1); + } + C + + system ENV.cc, "hello.c", "-I#{include}", "-L#{lib}", "-lwasmtime", "-o", "hello" + expected = <<~EOS + Initializing... + Compiling module... + Creating callback... + Instantiating module... + Extracting export... + Calling export... + Calling back... + > Hello World! + All finished! + EOS + assert_equal expected, shell_output("./hello") + end +end diff --git a/Formula/w/wassette.rb b/Formula/w/wassette.rb new file mode 100644 index 0000000000000..e0a1bdf18eb29 --- /dev/null +++ b/Formula/w/wassette.rb @@ -0,0 +1,35 @@ +class Wassette < Formula + desc "Security-oriented runtime that runs WebAssembly Components via MCP" + homepage "https://github.com/microsoft/wassette" + url "https://github.com/microsoft/wassette/archive/refs/tags/v0.3.4.tar.gz" + sha256 "7eee8ad6b10e693007ea148a96268c974df90b69262dadf0e6ef3e39eb83b412" + license "MIT" + head "https://github.com/microsoft/wassette.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d6dc0309b190be507bb09c5782c388704ac42ec54b871fd94b142ee1351263d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a30d40172b5706ac74f0405afc8bf265ce4c90aa8229f558d7a828530dc8c5eb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "929c294ae3b67142901ac405e46b90698c17af21a0894a8497b3d83eca183492" + sha256 cellar: :any_skip_relocation, sonoma: "27f17ed257248c0d675879ecf86f0b37766ed8bb140efaf871c6f87c3c259a8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "05562a30e674e53d0f482b58ea18d0c2f4e7addbcca91369e258815b4ccba6c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3a04545887eee5996961ab226b0fd2a668ccb00e5fc41a058921f75a88907dc" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/wassette --version") + + output = shell_output("#{bin}/wassette component list") + assert_equal "0", JSON.parse(output)["total"].to_s + end +end diff --git a/Formula/w/watch-sim.rb b/Formula/w/watch-sim.rb new file mode 100644 index 0000000000000..3b1899e9fef98 --- /dev/null +++ b/Formula/w/watch-sim.rb @@ -0,0 +1,37 @@ +class WatchSim < Formula + desc "Command-line WatchKit application launcher" + homepage "https://github.com/alloy/watch-sim" + url "https://github.com/alloy/watch-sim/archive/refs/tags/1.0.0.tar.gz" + sha256 "138616472e980276999fee47072a24501ea53ce3f7095a3de940e683341b7cba" + license "MIT" + head "https://github.com/alloy/watch-sim.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cf8bd59511daa7a7bf5bbe7d8a1c50503df5ba0bdc0047df7de6736ccc7bbd3d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef6e2048bbcb961e59e3e5f25602fd685222f49c4cad51da8bbb12bc3de3d7c4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2551be702d19489b5bc7224b2312c132df7a5090fda12c5c0e305b4982e828b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0bfc458d4d6388c5a56247f39d543f46a28ec27031a2c28da38d29a729ff74d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c5ce9e4c33120183ab5666c3a33b4c98550d4dbfa2da0f8aa8c0b265ce6e985e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9a615d042db08236fe150fc21ecc8ac12979007f851b90aa85faa4f7ba75474b" + sha256 cellar: :any_skip_relocation, sonoma: "4f68ab095c38433474978faed7b16e61cea41fae11d285828ae2c88727f8dd0e" + sha256 cellar: :any_skip_relocation, ventura: "0acbe748d776213a08f8ebbd082a12649edc1f848d7db02133df2edb36974376" + sha256 cellar: :any_skip_relocation, monterey: "6b1c014eff643254d48164c4aa1c1289d0bb4f30879f267982c3871f65437cb9" + sha256 cellar: :any_skip_relocation, big_sur: "4dc3e4f2872aeb25d3d4bcb22aac1012730b468543d351d0114498d8211b7f0c" + sha256 cellar: :any_skip_relocation, catalina: "bee9797e2c3a52b7dea9b6c5158bb78485b7ee10af530f84d81f31e20babf894" + end + + depends_on :macos + depends_on xcode: "6.2" + + def install + system "make" + bin.install "watch-sim" + end + + test do + assert_match(/Usage: watch-sim/, + shell_output("#{bin}/watch-sim 2>&1", 1)) + end +end diff --git a/Formula/w/watch.rb b/Formula/w/watch.rb new file mode 100644 index 0000000000000..c4ca435f0a70f --- /dev/null +++ b/Formula/w/watch.rb @@ -0,0 +1,59 @@ +class Watch < Formula + desc "Executes a program periodically, showing output fullscreen" + homepage "https://gitlab.com/procps-ng/procps" + url "https://gitlab.com/procps-ng/procps.git", + tag: "v4.0.5", + revision: "f46b2f7929cdfe2913ed0a7f585b09d6adbf994e" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + head "https://gitlab.com/procps-ng/procps.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "9c5d3d966dd480ec6c0db515cbc01609736ece1123e1069d1b99d5199431f143" + sha256 cellar: :any, arm64_sequoia: "a2c77480716cdd27593a8a81fcbb7b1f8c19b9f1d82847e4328efb98703e2045" + sha256 cellar: :any, arm64_sonoma: "6bb0691e3d38e625b5842646d8a0c2439d5889a63dbf6a45a1455fd6c900dae2" + sha256 cellar: :any, arm64_ventura: "e5b2fe0f325b928c9a448b350e626fe254e0c313e2dbcc69a582f231cf5bb0f4" + sha256 cellar: :any, sonoma: "bed3496e896be3b00ef559bf3bafbc0fc0bc94c2fc0383e72bb45dc9a714200d" + sha256 cellar: :any, ventura: "658ca1a1a072b329b96e394ff3b7640883dc5e0ad1e02a3b3f5fa3afc88f8a09" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1bae7ca78aebb0707c57f82ae5609f900f3e9ff14ce6e5810d6998883575d08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6bb244d3c65a2710ac9922b4cd7d2bf25c22ebd7a865f26b7e32d512291efff" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "ncurses" + + conflicts_with "visionmedia-watch" + + # guard `SIGPOLL` to fix build on macOS, upstream pr ref, https://gitlab.com/procps-ng/procps/-/merge_requests/246 + patch do + url "https://gitlab.com/procps-ng/procps/-/commit/2dc340e47669e0b0df7f71ff082e05ac5fa36615.diff" + sha256 "a6ae69b3aff57491835935e973b52c8b309d3943535537ff33a24c78d18d11aa" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + + args = %w[ + --disable-nls + --enable-watch8bit + ] + args << "--disable-pidwait" if OS.mac? + system "./configure", *args, *std_configure_args + system "make", "src/watch" + bin.install "src/watch" + man1.install "man/watch.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/watch --version") + + # Fails in Linux CI with "getchar(): Inappropriate ioctl for device" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"watch", "--errexit", "--chgexit", "--interval", "1", "date" + end +end diff --git a/Formula/w/watcher.rb b/Formula/w/watcher.rb new file mode 100644 index 0000000000000..8e33121ef58cb --- /dev/null +++ b/Formula/w/watcher.rb @@ -0,0 +1,61 @@ +class Watcher < Formula + desc "Filesystem watcher, works anywhere, simple, efficient and friendly" + homepage "https://github.com/e-dant/watcher" + url "https://github.com/e-dant/watcher/archive/refs/tags/0.13.8.tar.gz" + sha256 "8e1ac50617bed910be829da3701f42d8419038703db934a09e5ec896e6ef679c" + license "MIT" + head "https://github.com/e-dant/watcher.git", branch: "release" + + bottle do + sha256 cellar: :any, arm64_tahoe: "933c075dff274fe0d3a21c14476a89a90ee5c02d62ba8cf8fafefa4378f693a6" + sha256 cellar: :any, arm64_sequoia: "20b33693f334149c635b8f5728e5fbf0b446056ed3db39b881468eeb09f5eef6" + sha256 cellar: :any, arm64_sonoma: "40b85eb988949b29d9221599d31b1d75b84123fc7c3c4fd1c855e5816cc07732" + sha256 cellar: :any, arm64_ventura: "b81047fe12b12668f4995b5ce66edbe9034e9520f8e3ca2ffc5a97ebaf769c58" + sha256 cellar: :any, sonoma: "04b6b6b787f2fe84d3d6e48fc608fd953873e35379f5cf9f44160611d3efb8d5" + sha256 cellar: :any, ventura: "fb2bf1f28202895c0905046f2aaa825eb1fd207b323f9914d67b34f72cb03b34" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad964ec883244cafea19d922bef735b6cb4c11c96ed9b534858a4392978cb422" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eada47cfd7b6ce4eb100cc7f0efc37cc159bf3cd8db66d1960b9b75f3843613b" + end + + depends_on "cmake" => :build + + conflicts_with "tabiew", because: "both install `tw` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/wtr.watcher . -ms 1") + assert_match "create", output + assert_match "destroy", output + + (testpath/"test.c").write <<~C + #include + #include + + void callback(struct wtr_watcher_event event, void* _ctx) { + printf( + "path name: %s, effect type: %d path type: %d, effect time: %lld, associated path name: %s\\n", + event.path_name, + event.effect_type, + event.path_type, + event.effect_time, + event.associated_path_name ? event.associated_path_name : "" + ); + } + + int main() { + void* watcher = wtr_watcher_open(".", callback, NULL); + wtr_watcher_close(watcher); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lwatcher-c", "-o", "test" + system "./test" + end +end diff --git a/Formula/w/watchexec.rb b/Formula/w/watchexec.rb new file mode 100644 index 0000000000000..ce25d210214cb --- /dev/null +++ b/Formula/w/watchexec.rb @@ -0,0 +1,46 @@ +class Watchexec < Formula + desc "Execute commands when watched files change" + homepage "https://watchexec.github.io/" + url "https://github.com/watchexec/watchexec/archive/refs/tags/v2.3.2.tar.gz" + sha256 "52201822ab00bfaf6757f953f667870b3aada52f887813e94b4f322f239ff8fb" + license "Apache-2.0" + head "https://github.com/watchexec/watchexec.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:cli[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "423334539a1268d82b70ad4dec1b78e1bfea6bcc882d6e69be9cceb22f525927" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d44b907cdb9d86013f5babef6630af9cde63b1b5c82351c09ef1be9896ed09c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af528680ef4aad89b586bcb983730f309a22679416fc24547bdb23260802df74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c49fae4ca20c900082e02cf04abae83e1ac7de54c9c15e9f2f713bb1bf20e616" + sha256 cellar: :any_skip_relocation, sonoma: "c26e55deac8cc1b2b257789dc5651716fb70b06f8b803c02418f172912cfd16a" + sha256 cellar: :any_skip_relocation, ventura: "9f3948eeb908d473788ac19ac5c8565890bac51de3d0c14eb96daf71ecfb843b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebd1913aa10427b3c7c0a61d40449dedf6a9bc3f7f3b53354f7530f564ea3f4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6672077573dcfc793f50053879b75e7e7c30f7e81e05b1b7350c105183398c92" + end + + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args(path: "crates/cli") + + generate_completions_from_executable(bin/"watchexec", "--completions") + man1.install "doc/watchexec.1" + end + + test do + o = IO.popen("#{bin}/watchexec -1 --postpone -- echo 'saw file change'") + sleep 15 + touch "test" + sleep 15 + Process.kill("TERM", o.pid) + assert_match "saw file change", o.read + + assert_match version.to_s, shell_output("#{bin}/watchexec --version") + end +end diff --git a/Formula/w/watchman.rb b/Formula/w/watchman.rb new file mode 100644 index 0000000000000..b3f0e716e411b --- /dev/null +++ b/Formula/w/watchman.rb @@ -0,0 +1,78 @@ +class Watchman < Formula + include Language::Python::Shebang + + desc "Watch files and take action when they change" + homepage "https://github.com/facebook/watchman" + url "https://github.com/facebook/watchman/archive/refs/tags/v2025.11.03.00.tar.gz" + sha256 "00e69087eeffb67c46e4e36372b753668397a8070c3df8dd9e603e819ae8da0c" + license "MIT" + head "https://github.com/facebook/watchman.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "286dec28b06dc78285bf72c8443b4a4f082a6ce20dc6a75fe1d6ebc4666bb31a" + sha256 cellar: :any, arm64_sequoia: "033725bc76e19aee632a0255e5c06b8cf4cc72beff92f72f35ed5d8226f4b9f4" + sha256 cellar: :any, arm64_sonoma: "cccb6846b6126696597ae353412e1e74103d028449f47478b84e77cc056a08e8" + sha256 cellar: :any, sonoma: "3dc2c99d17ced846898b46babbf0ae362f32935fbc3fdbeaf83a707888f19893" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6d184a798aacf0d9a7cb503e82bc30324861d57d6a45db980c802b94383da19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8baa42b9b68dfd996d8fd786d0704e2207ef42e58d25093d25272b1c8824e8dc" + end + + depends_on "cmake" => :build + depends_on "cpptoml" => :build + depends_on "googletest" => :build + depends_on "mvfst" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "rust" => :build + depends_on "edencommon" + depends_on "fb303" + depends_on "fbthrift" + depends_on "fmt" + depends_on "folly" + depends_on "gflags" + depends_on "glog" + depends_on "libevent" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "python@3.14" + + on_linux do + depends_on "boost" + depends_on "libunwind" + end + + def install + # NOTE: Setting `BUILD_SHARED_LIBS=ON` will generate DSOs for Eden libraries. + # These libraries are not part of any install targets and have the wrong + # RPATHs configured, so will need to be installed and relocated manually + # if they are built as shared libraries. They're not used by any other + # formulae, so let's link them statically instead. This is done by default. + # + # Use the upstream default for WATCHMAN_STATE_DIR by unsetting it. + args = %W[ + -DENABLE_EDEN_SUPPORT=ON + -DPython3_EXECUTABLE=#{which("python3.14")} + -DWATCHMAN_VERSION_OVERRIDE=#{version} + -DWATCHMAN_BUILDINFO_OVERRIDE=#{tap&.user || "Homebrew"} + -DWATCHMAN_STATE_DIR= + -DCMAKE_CXX_STANDARD=20 + ] + # Avoid overlinking with libsodium and mvfst + args << "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + path = Pathname.new(File.join(prefix, HOMEBREW_PREFIX)) + bin.install (path/"bin").children + lib.install (path/"lib").children + rm_r(path) + + rewrite_shebang detected_python_shebang, *bin.children + end + + test do + assert_equal(version.to_s, shell_output("#{bin}/watchman -v").chomp) + end +end diff --git a/Formula/w/watson.rb b/Formula/w/watson.rb new file mode 100644 index 0000000000000..3aec27f271ca4 --- /dev/null +++ b/Formula/w/watson.rb @@ -0,0 +1,94 @@ +class Watson < Formula + include Language::Python::Virtualenv + + desc "Command-line tool to track (your) time" + homepage "https://jazzband.github.io/Watson/" + url "https://files.pythonhosted.org/packages/a9/61/868892a19ad9f7e74f9821c259702c3630138ece45bab271e876b24bb381/td-watson-2.1.0.tar.gz" + sha256 "204384dc04653e0dbe8f833243bb833beda3d79b387fe173bfd33faecdd087c8" + license "MIT" + revision 8 + head "https://github.com/jazzband/Watson.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "44162a7872ef5789f0f711844258b2702be9bf674b417fb136210e484a73fc2d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10ec2d4c0992ba0824884972227dd85f4de93e0f920a62679f6ad77586becedf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "535ebf26a193fcf6b47fe3a032fef2ee15aad34a10d5477f4700a322c2a7e1c0" + sha256 cellar: :any_skip_relocation, sonoma: "daaabc1f550cab442b1549cded493eea071a74f15052e2273888196a6e139eeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "754c43cca43a0d38167bf11f450a3506f79c3d37c7d9015e807dbc39030751df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74a856fc91c7183ef637d9303f7241e40f6da5a0ba288f7903bcc8af69d09e98" + end + + depends_on "certifi" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-didyoumean" do + url "https://files.pythonhosted.org/packages/30/ce/217289b77c590ea1e7c24242d9ddd6e249e52c795ff10fac2c50062c48cb/click_didyoumean-0.3.1.tar.gz" + sha256 "4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/fc/83/24ed25dd0c6277a1a170c180ad9eef5879ecc9a4745b58d7905a4588c80d/types_python_dateutil-2.9.0.20251008.tar.gz" + sha256 "c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + # Fix to TypeError: argument of type 'NoneType' for `if 'json' in output_format:` + # Issue ref: https://github.com/jazzband/Watson/issues/512 + inreplace "watson/cli.py", "in output_format:", "in (output_format or ''):" + + virtualenv_install_with_resources + + bash_completion.install "watson.completion" => "watson" + zsh_completion.install "watson.zsh-completion" => "_watson" + end + + test do + system bin/"watson", "start", "foo", "+bar" + system bin/"watson", "status" + system bin/"watson", "stop" + system bin/"watson", "log" + end +end diff --git a/Formula/w/wavpack.rb b/Formula/w/wavpack.rb new file mode 100644 index 0000000000000..06de8aee7735a --- /dev/null +++ b/Formula/w/wavpack.rb @@ -0,0 +1,53 @@ +class Wavpack < Formula + desc "Hybrid lossless audio compression" + homepage "https://www.wavpack.com/" + url "https://www.wavpack.com/wavpack-5.8.1.tar.bz2" + sha256 "7bd540ed92d2d1bf412213858a9e4f1dfaf6d9a614f189b0622060a432e77bbf" + license "BSD-3-Clause" + + # The first-party download page also links to `xmms-wavpack` releases, so + # we have to avoid those versions. + livecheck do + url "https://www.wavpack.com/downloads.html" + regex(%r{href=(?:["']/?|.*?/)wavpack[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b34310b35fa948f6710ffb6ea0da7df8ce665eb993f4fd6a9c674440e8927360" + sha256 cellar: :any, arm64_sequoia: "7a3c71972558779ba65c5333c17b5032577623b5695465cd0fc3fa62b43fe9d4" + sha256 cellar: :any, arm64_sonoma: "9f2cdfe3f3a442474eb944bcc1ca76878944a16cf89d7c6378f09716ecb7d613" + sha256 cellar: :any, arm64_ventura: "885ff22f136e5db9b1b5fb4ddd578cc8715f958b8e7c02fa177f5b8e3550523a" + sha256 cellar: :any, sonoma: "db86d639bbac1a81d89399fdaf1f540c2176eaa37843045ca1b342b05cd821ac" + sha256 cellar: :any, ventura: "1166057de1b8298cf43af6c40e3bf12675179f43a8da756dfce3a04fc1790af5" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd64ae0ca071579ada44ea6eae97f3ab97f84c6e4f3b2d8c97995937091958f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fbe02a0b9e22e0628253a9ae6bb85a9195108cd2469a0623c66f41fb0464e25" + end + + head do + url "https://github.com/dbry/WavPack.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + args = %W[--prefix=#{prefix} --disable-dependency-tracking] + + # ARM assembly not currently supported + # https://github.com/dbry/WavPack/issues/93 + args << "--disable-asm" if Hardware::CPU.arm? + + if build.head? + system "./autogen.sh", *args + else + system "./configure", *args + end + + system "make", "install" + end + + test do + system bin/"wavpack", test_fixtures("test.wav"), "-o", testpath/"test.wv" + assert_path_exists testpath/"test.wv" + end +end diff --git a/Formula/w/wayback.rb b/Formula/w/wayback.rb new file mode 100644 index 0000000000000..3b78cd44d0ec9 --- /dev/null +++ b/Formula/w/wayback.rb @@ -0,0 +1,37 @@ +class Wayback < Formula + desc "Archiving tool integrated with various archival services" + homepage "https://docs.wabarc.eu.org" + url "https://github.com/wabarc/wayback/archive/refs/tags/v0.20.1.tar.gz" + sha256 "b65833d8aa5c19ab8971c0b97bd96bdda235a6e420259aabe0daa5adf098d972" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fe100d437e6f95b6b155fa8dd323d29a4a301c6343480f4191cbd44a674bb564" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0684a17257ce53249c7e55249bc6e66aeccb68958f5697cfd5434fb70efc63f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0684a17257ce53249c7e55249bc6e66aeccb68958f5697cfd5434fb70efc63f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0684a17257ce53249c7e55249bc6e66aeccb68958f5697cfd5434fb70efc63f" + sha256 cellar: :any_skip_relocation, sonoma: "774972e3cf80db6e0a99bb29997108faa51cab0a713874425cbeb9b30756c41c" + sha256 cellar: :any_skip_relocation, ventura: "774972e3cf80db6e0a99bb29997108faa51cab0a713874425cbeb9b30756c41c" + sha256 cellar: :any_skip_relocation, arm64_linux: "461f5975a3cd35c91ef71f73115fb5d08f3b392c2a33d88aa882cefb651f41cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fe1fcf1dcb7230f7399e58a45cc4e5e4e80c5dccca06d40469d2d23a4b772e9" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/wabarc/wayback/version.Version=#{version} + -X github.com/wabarc/wayback/version.Commit=#{tap.user} + -X github.com/wabarc/wayback/version.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/wayback" + end + + test do + assert_match version.to_s, shell_output("#{bin}/wayback --version") + + output = shell_output("#{bin}/wayback --ia https://brew.sh 2>&1") + assert_match(%r{https://web\.archive\.org/web/\d{14}/https://brew\.sh/}, output) + end +end diff --git a/Formula/w/waybackpy.rb b/Formula/w/waybackpy.rb new file mode 100644 index 0000000000000..72f3a0d796b90 --- /dev/null +++ b/Formula/w/waybackpy.rb @@ -0,0 +1,56 @@ +class Waybackpy < Formula + include Language::Python::Virtualenv + + desc "Wayback Machine API interface & command-line tool" + homepage "https://pypi.org/project/waybackpy/" + url "https://files.pythonhosted.org/packages/34/ab/90085feb81e7fad7d00c736f98e74ec315159ebef2180a77c85a06b2f0aa/waybackpy-3.0.6.tar.gz" + sha256 "497a371756aba7644eb7ada0ebd4edb15cb8c53bc134cc973bf023a12caff83f" + license "MIT" + revision 8 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "f6673cd10763f043abc56210eafdf1512c4fe5016179ce2a4043d02463723e0e" + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"waybackpy", shell_parameter_format: :click) + end + + test do + output = shell_output("#{bin}/waybackpy -o --url https://brew.sh") + assert_match "20130328163936", output + end +end diff --git a/Formula/w/wayland-protocols.rb b/Formula/w/wayland-protocols.rb new file mode 100644 index 0000000000000..fe72a0d0e1f13 --- /dev/null +++ b/Formula/w/wayland-protocols.rb @@ -0,0 +1,33 @@ +class WaylandProtocols < Formula + desc "Additional Wayland protocols" + homepage "https://wayland.freedesktop.org" + url "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.45/downloads/wayland-protocols-1.45.tar.xz" + sha256 "4d2b2a9e3e099d017dc8107bf1c334d27bb87d9e4aff19a0c8d856d17cd41ef0" + license "MIT" + + livecheck do + url "https://wayland.freedesktop.org/releases.html" + regex(/href=.*?wayland-protocols[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "afe1730248430bc5c6c687baac7a08ad0c093d7e03aa4252d9aab7190f24a0a4" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on :linux + depends_on "wayland" + + def install + system "meson", "setup", "build", "-Dtests=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system "pkg-config", "--exists", "wayland-protocols" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/w/wayland.rb b/Formula/w/wayland.rb new file mode 100644 index 0000000000000..463cade3e551f --- /dev/null +++ b/Formula/w/wayland.rb @@ -0,0 +1,48 @@ +class Wayland < Formula + desc "Protocol for a compositor to talk to its clients" + homepage "https://wayland.freedesktop.org" + url "https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.24.0/downloads/wayland-1.24.0.tar.xz" + sha256 "82892487a01ad67b334eca83b54317a7c86a03a89cfadacfef5211f11a5d0536" + license "MIT" + + # Versions with a 90+ patch are unstable (e.g., 1.21.91 is an alpha release) + # and this regex should only match the stable versions. + livecheck do + url "https://wayland.freedesktop.org/releases.html" + regex(/href=.*?wayland[._-]v?(\d+\.\d+(?:\.(?:\d|[1-8]\d+)(?:\.\d+)*)?)\.t/i) + end + + bottle do + sha256 arm64_linux: "9a73dcb69876109613e1600769b212cc38b75e86845984ce28d3cdf018e5f0d7" + sha256 x86_64_linux: "f4c8b2eb5f7f99e5ed8dfb3a3df173d1df5ddd53437f23d9d147a6ee0f09c111" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "expat" + depends_on "libffi" + depends_on "libxml2" + depends_on :linux + + def install + system "meson", "setup", "build", "-Dtests=false", "-Ddocumentation=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "wayland-server.h" + #include "wayland-client.h" + + int main(int argc, char* argv[]) { + const char *socket; + struct wl_protocol_logger *logger; + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}" + system "./test" + end +end diff --git a/Formula/w/wazero.rb b/Formula/w/wazero.rb new file mode 100644 index 0000000000000..e35147d5ac984 --- /dev/null +++ b/Formula/w/wazero.rb @@ -0,0 +1,85 @@ +class Wazero < Formula + desc "Zero dependency WebAssembly runtime" + homepage "https://wazero.io" + url "https://github.com/tetratelabs/wazero/archive/refs/tags/v1.9.0.tar.gz" + sha256 "b294ef32baf69cb7ef9be85ecdfa13b0e59a4bac2f1ad58ec21231e7e0d592e0" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "092ce8494add69259f2ee01880ea68feb5e699aa64b4aa1d3d48765feca7c55d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6c3e483291dbea6101c7498979e8f1186e5a3eeb71c594b4230d65a59599f27" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6c3e483291dbea6101c7498979e8f1186e5a3eeb71c594b4230d65a59599f27" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6c3e483291dbea6101c7498979e8f1186e5a3eeb71c594b4230d65a59599f27" + sha256 cellar: :any_skip_relocation, sonoma: "0047c80bd8e21271e33bd11ccd8f245b5c5ea63aebf33cabcd32e1cc8757330b" + sha256 cellar: :any_skip_relocation, ventura: "0047c80bd8e21271e33bd11ccd8f245b5c5ea63aebf33cabcd32e1cc8757330b" + sha256 cellar: :any_skip_relocation, arm64_linux: "437258bd10dbff1b11593eeef4fbbd3621624a4881e49e79502428a4fdb74c1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff1579937c7bc3110eb9c001456a6d16dce670eb805e1492546dfedf05127391" + end + + depends_on "go" => :build + depends_on "wabt" => :test + + def install + ldflags = %W[ + -s -w + -X github.com/tetratelabs/wazero/internal/version.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/wazero" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/wazero version").chomp + + (testpath/"mount.wat").write <<~EOS + ;; print the preopen directory path (guest side of the mount). + (module + (import "wasi_snapshot_preview1" "fd_prestat_get" + (func $wasi.fd_prestat_get (param i32 i32) (result i32))) + + (import "wasi_snapshot_preview1" "fd_prestat_dir_name" + (func $wasi.fd_prestat_dir_name (param i32 i32 i32) (result i32))) + + (import "wasi_snapshot_preview1" "fd_write" + (func $wasi.fd_write (param i32 i32 i32 i32) (result i32))) + + (memory (export "memory") 1 1) + + (func $main (export "_start") + ;; First, we need to know the size of the prestat dir name. + (call $wasi.fd_prestat_get + (i32.const 3) ;; preopen FD + (i32.const 0)) ;; where to write prestat + (drop) ;; ignore the errno returned + + ;; Next, write the dir name to offset 8 (past the prestat). + (call $wasi.fd_prestat_dir_name + (i32.const 3) ;; preopen FD + (i32.const 8) ;; where to write dir_name + (i32.load (i32.const 4))) ;; length is the last part of the prestat + (drop) ;; ignore the errno returned + + ;; Now, convert the prestat to an iovec [offset, len] writing offset=8. + (i32.store (i32.const 0) (i32.const 8)) + + ;; Finally, copy the dirname to stdout via its iovec [offset, len]. + (call $wasi.fd_write + (i32.const 1) ;; stdout + (i32.const 0) ;; where's the iovec + (i32.const 1) ;; only one iovec + (i32.const 0)) ;; overwrite the iovec with the ignored result. + (drop) ;; ignore the errno returned + ) + ) + EOS + + system "wat2wasm", testpath/"mount.wat", "-o", testpath/"mount.wasm" + + assert_equal "/homebrew", + shell_output("#{bin}/wazero run -mount=/tmp:/homebrew #{testpath/"mount.wasm"}") + end +end diff --git a/Formula/w/wb32-dfu-updater_cli.rb b/Formula/w/wb32-dfu-updater_cli.rb new file mode 100644 index 0000000000000..d17da6f7b62a9 --- /dev/null +++ b/Formula/w/wb32-dfu-updater_cli.rb @@ -0,0 +1,47 @@ +class Wb32DfuUpdaterCli < Formula + desc "USB programmer for downloading and uploading firmware to/from USB devices" + homepage "https://github.com/WestberryTech/wb32-dfu-updater" + url "https://github.com/WestberryTech/wb32-dfu-updater/archive/refs/tags/1.0.0.tar.gz" + sha256 "2b1c5b5627723067168af9740cb25c5c179634e133e4ced06028462096de5699" + license "Apache-2.0" + head "https://github.com/WestberryTech/wb32-dfu-updater.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "934c190218de4e881ed04b18bf537a15710600e07055dec9a0adbca436afab65" + sha256 cellar: :any, arm64_sequoia: "ac239ddaa16c7c73763bb0e7fccf0e832ba3dde536d90115ac65fb1ac58da4eb" + sha256 cellar: :any, arm64_sonoma: "d661a663c75316e1523b6fa0407cebda2ea86788a3fbf23ac6657af815d1c2b9" + sha256 cellar: :any, arm64_ventura: "87370e3838ab6edf46fd33ffe58ab53222dc519d6fcf849228461d994cf0c4f2" + sha256 cellar: :any, arm64_monterey: "7e2f160501bb9541e72aaa421804bbd39036b758d76d1ba597f0e4be1146f0df" + sha256 cellar: :any, arm64_big_sur: "7bfb9b1814a0a3d0c7e861add90ecf2957e9a5dbd16a08582ef4c9dd0eda5a75" + sha256 cellar: :any, sonoma: "7b286ba7e7d2bd622870689fc34fe6e0903624ebb811ddbeb49139a1203d3513" + sha256 cellar: :any, ventura: "b8580af9836f71c45a43029a65a3373e9583de4ba3d18a60fec9c686581fcd6d" + sha256 cellar: :any, monterey: "5500f504311ae7403129ecef45590f500bdf35a5a0e89a037aaf5f661c9b1bc9" + sha256 cellar: :any, big_sur: "ec1cb55399fe6198944db099424b96f8c6138cd309d3a9ff52d0206c5b295221" + sha256 cellar: :any, catalina: "a9a3f5950019c27a9a022c07af2859240987d1c93acd751e741c6a320535c6e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2d90c6c2b6c8c7ad35af63a0fd3ad9706eaa9eacb58263b431b859ad5ad03d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bd5b556320a3df8117e4215c78b24686e0d4751b80d3ebb4ed280950bf6d2e8" + end + + depends_on "cmake" => :build + depends_on "libusb" + + # Fix compatibility with cmake 4+ + # PR ref: https://github.com/WestberryTech/wb32-dfu-updater/pull/17 + patch do + url "https://github.com/WestberryTech/wb32-dfu-updater/commit/34725776e4b21be89e5d4eb0ea83346f26fc5d1f.patch?full_index=1" + sha256 "bfcc362f17c3063b90531e2795e7d33743dc754cce5dac2a93582994f9a88479" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "No DFU capable USB device available\n", + shell_output("#{bin}/wb32-dfu-updater_cli -U 111.bin 2>&1", 74) + end +end diff --git a/Formula/w/wcslib.rb b/Formula/w/wcslib.rb new file mode 100644 index 0000000000000..71f99480fc570 --- /dev/null +++ b/Formula/w/wcslib.rb @@ -0,0 +1,41 @@ +class Wcslib < Formula + desc "Library and utilities for the FITS World Coordinate System" + homepage "https://www.atnf.csiro.au/computing/software/wcs/" + url "https://www.atnf.csiro.au/computing/software/wcs/wcslib-8.4.tar.bz2" + sha256 "960b844426d14a8b53cdeed78258aa9288cded99a7732c0667c64fa6a50126dc" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?wcslib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6d54f21bc3eef658e481d55ae6fc5c84faf09b8313282a2d52b0ba6041f43ca2" + sha256 cellar: :any, arm64_sequoia: "9b4c893d06fdc0f35e6d0068cd2c0f8e310bcc21fcd80242c8096895ef6bbdc5" + sha256 cellar: :any, arm64_sonoma: "9d19f46e3c4eccaf8a8f0e47b15650a0d597fb7b1a0e41523f98c225733f79cd" + sha256 cellar: :any, arm64_ventura: "a8a2219881ba618ed874d2d8e398c6014e0acc2a8116f2786fa44354950d0050" + sha256 cellar: :any, sonoma: "1e11d5347b5aabd5a8be7b58f255b296b32a27daea37dd6f1c96d58e05a099f9" + sha256 cellar: :any, ventura: "7ad6caa1fcc73ee40853218467f7c69063672b81c9f57168c2fc3fe36a352581" + sha256 cellar: :any_skip_relocation, arm64_linux: "37620e6e7dea1408c2655d1f978f89186948f15b708109d33ca091c8f4cd0fc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b4796b96042e9131506aaacb702c1e6cb372fddc463b0e328b5f46ea49bf342" + end + + depends_on "cfitsio" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-cfitsiolib=#{Formula["cfitsio"].opt_lib}", + "--with-cfitsioinc=#{Formula["cfitsio"].opt_include}", + "--without-pgplot", + "--disable-fortran" + system "make", "install" + end + + test do + piped = "SIMPLE =" + (" "*20) + "T / comment" + (" "*40) + "END" + (" "*2797) + pipe_output("#{bin}/fitshdr", piped, 0) + end +end diff --git a/Formula/w/wcstools.rb b/Formula/w/wcstools.rb new file mode 100644 index 0000000000000..888a027e71ca0 --- /dev/null +++ b/Formula/w/wcstools.rb @@ -0,0 +1,43 @@ +class Wcstools < Formula + desc "Tools for using World Coordinate Systems (WCS) in astronomical images" + homepage "http://tdc-www.harvard.edu/wcstools/" + url "http://tdc-www.harvard.edu/software/wcstools/wcstools-3.9.7.tar.gz" + sha256 "525f6970eb818f822db75c1526b3122b1af078affa572dce303de37df5c7b088" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?wcstools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "77a31db1617c161a3b9b32c79738444ee90e0493eae441dc5782b790331a37a0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "71c2d28775be44e3d583d1058fc42b7ed1facc6d2a47fa0f51a6c4be76642bf9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "62c6a1ee4cba5821d4f08ad5996140118ec774432766fde5394a755e3f737b7d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "36f13821bae6872cf2a0efb838b16848747e7a08b9f862696c545c62c571d3e3" + sha256 cellar: :any_skip_relocation, sonoma: "1455e3bd5761a326b1d3e9bdce635dbfc10ade55f9e271ac59df798c89bf44be" + sha256 cellar: :any_skip_relocation, ventura: "5e8230a3193b604603bdbb35d323ee3161fe96fda6912d4c00d9d67ac7052384" + sha256 cellar: :any_skip_relocation, arm64_linux: "788c9065153fc7d13d24d8154a61cf067f2fceba1c5333f9d0946f3d52e74cf2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cbcde8f555ee9b4399110632e784cadb293066619453e7519b8cd27aa547181" + end + + def install + inreplace "Makefile" do |s| + cflags = s.get_make_var("CFLAGS").split + cflags.delete("-g") + cflags.each { |flag| ENV.append_to_cflags flag } + s.change_make_var!("CFLAGS", ENV.cflags) + end + + bin.mkpath + system "make", "BIN=#{bin}", "all" + bin.install "wcstools" + man1.install buildpath.glob("man/man1/*.1") + end + + test do + assert_match "IMHEAD", shell_output("#{bin}/imhead 2>&1", 1) + end +end diff --git a/Formula/w/wdc.rb b/Formula/w/wdc.rb new file mode 100644 index 0000000000000..9f33483ccd8be --- /dev/null +++ b/Formula/w/wdc.rb @@ -0,0 +1,75 @@ +class Wdc < Formula + desc "WebDAV Client provides easy and convenient to work with WebDAV-servers" + homepage "https://cloudpolis.github.io/webdav-client-cpp" + url "https://github.com/CloudPolis/webdav-client-cpp/archive/refs/tags/v1.1.5.tar.gz" + sha256 "3c45341521da9c68328c5fa8909d838915e8a768e7652ff1bcc2fbbd46ab9f64" + license "curl" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "6b30e7b5d8ab33c0831c6a217a4f1ec5b28745ba8f068a8fb81e714b6ca75287" + sha256 cellar: :any, arm64_sequoia: "88067ae5f0b55bc266ee7ad8b64e5d6fb4f445965cbfc6b2e212be792f9af9f9" + sha256 cellar: :any, arm64_sonoma: "e64bd5d5a196023df1f0e99be1501a36a12261cfeafa8674af3605b5f6e0337d" + sha256 cellar: :any, arm64_ventura: "144bf99589283a042b25507aecc6b2865341a806fb9f35436b9ba4aa272476f7" + sha256 cellar: :any, sonoma: "a5a1823e37f7aced3a355008f7b85768d1c37600c2da80cf385d2efdf5c2543d" + sha256 cellar: :any, ventura: "253521687c9eb9ef2a8367d1bcbb193617cbce57005ba4fb75558474f2272d20" + sha256 cellar: :any_skip_relocation, arm64_linux: "6027f317ac27ca1e4769b2c7337215d1e81354d627d55ade164b359b1092f524" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68eb8337eee2c79f2892966a4311e56a5af9c24e32c07795f7dd8c5089474c8b" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "pugixml" + + uses_from_macos "curl" + + def install + inreplace "CMakeLists.txt", "CURL CONFIG REQUIRED", "CURL REQUIRED" + + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DHUNTER_ENABLED=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + int main(int argc, char *argv[]) { + std::map options = + { + {"webdav_hostname", "https://webdav.example.com"}, + {"webdav_login", "webdav_login"}, + {"webdav_password", "webdav_password"} + }; + std::unique_ptr client{ new WebDAV::Client{ options } }; + auto check_connection = client->check(); + assert(!check_connection); + } + CPP + pugixml = Formula["pugixml"] + curl_args = ["-lcurl"] + if OS.linux? + curl = Formula["curl"] + curl_args << "-L#{curl.opt_lib}" + curl_args << "-I#{curl.opt_include}" + end + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", "-pthread", + "-L#{lib}", "-lwdc", "-I#{include}", + "-L#{pugixml.opt_lib}", "-lpugixml", + "-I#{pugixml.opt_include}", + *curl_args + system "./test" + end +end diff --git a/Formula/w/wdfs.rb b/Formula/w/wdfs.rb new file mode 100644 index 0000000000000..36d471b7bf994 --- /dev/null +++ b/Formula/w/wdfs.rb @@ -0,0 +1,32 @@ +class Wdfs < Formula + desc "Webdav file system" + homepage "http://noedler.de/projekte/wdfs/" + url "http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz" + sha256 "fcf2e1584568b07c7f3683a983a9be26fae6534b8109e09167e5dff9114ba2e5" + license "GPL-2.0-or-later" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "d5bef8c1e794e7fb184f7a04210de8a0e1d4e409ef20317d091abc2e6d4db08b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e9e8b67d2d470f355a46983ac2a52cb2c34a6ebd63e1720e5ceb010c7bd9298" + end + + # Also needs `libfuse@2` and had 0 installs in 90 days on deprecation date + deprecate! date: "2025-03-06", because: :unmaintained + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libfuse@2" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "neon" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"wdfs", "-v" + end +end diff --git a/Formula/w/wdiff.rb b/Formula/w/wdiff.rb new file mode 100644 index 0000000000000..e1a74036f4281 --- /dev/null +++ b/Formula/w/wdiff.rb @@ -0,0 +1,55 @@ +class Wdiff < Formula + desc "Display word differences between text files" + homepage "https://www.gnu.org/software/wdiff/" + url "https://ftpmirror.gnu.org/gnu/wdiff/wdiff-1.2.2.tar.gz" + mirror "https://ftp.gnu.org/gnu/wdiff/wdiff-1.2.2.tar.gz" + sha256 "34ff698c870c87e6e47a838eeaaae729fa73349139fc8db12211d2a22b78af6b" + license "GPL-3.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4f7f90aa9ea87d7e897ac17039054345a41bd830322a44ffae5b53dbac412037" + sha256 arm64_sequoia: "3080690e641baa84f2f9e6099d27827911ae38604baf1eec25d49f22bf8f0cd8" + sha256 arm64_sonoma: "0a0159cb5c9fa9a0d97a14533d8bee020988815ed6c6b8f46650876cded83611" + sha256 arm64_ventura: "4e8e8de9f66bdb3734ab9087a59528e2a0f7a27f2b3bd9ab853858c2ee928c41" + sha256 arm64_monterey: "b7349e744630b6db059c3d1ee542404eafab86aeb97382fca5e3a746d008ee73" + sha256 arm64_big_sur: "b9464ee06d7329a996f8546ee21a90847b3db438967f241d4c9adc8708ef6a21" + sha256 sonoma: "c89e5767f5622001959dd19ea9ab369622f3674ffed87efcb9b4305014326eab" + sha256 ventura: "b1a390b9eedcb428e27b948eb6bb73292570be55125dedf707e53e4732d2a0a6" + sha256 monterey: "6d3edf52d29a1bf269e7238effb3a1941a4e6de214df8fe7ad536a69097f072d" + sha256 big_sur: "154c6f2169ae3406c43ef7373271499c15cb1954111dfa950ae809f2677ec9de" + sha256 catalina: "cd316e673c68a54b9be013a7a0fb96beba13648bd0048f7f1fd8b7a8b07ab821" + sha256 arm64_linux: "67a8199b4a46eb788b48cd52e139416a6171a349e9ac50ba76637b436552bcf5" + sha256 x86_64_linux: "f627f458d7e201ad95a07bfc91fbd1aa0e676e695d8002415a02f4b74734e1a4" + end + + depends_on "gettext" + + uses_from_macos "ncurses" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + conflicts_with "montage", because: "both install an `mdiff` executable" + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-experimental" + system "make", "install" + end + + test do + a = testpath/"a.txt" + a.write "The missing package manager for OS X" + + b = testpath/"b.txt" + b.write "The package manager for OS X" + + output = shell_output("#{bin}/wdiff #{a} #{b}", 1) + assert_equal "The [-missing-] package manager for OS X", output + end +end diff --git a/Formula/w/weasyprint.rb b/Formula/w/weasyprint.rb new file mode 100644 index 0000000000000..ca1de65c4a186 --- /dev/null +++ b/Formula/w/weasyprint.rb @@ -0,0 +1,98 @@ +class Weasyprint < Formula + include Language::Python::Virtualenv + + desc "Convert HTML to PDF" + homepage "https://www.courtbouillon.org/weasyprint" + url "https://files.pythonhosted.org/packages/32/99/480b5430b7eb0916e7d5df1bee7d9508b28b48fee28da894d0a050e0e930/weasyprint-66.0.tar.gz" + sha256 "da71dc87dc129ac9cffdc65e5477e90365ab9dbae45c744014ec1d06303dde40" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2e12a7ce2edcd992271db1c34e4a53061731cb8aa713d72dde856133f1169ce4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46744c9889959e477218d51919f3d76363ea14e04111fd4d45f81dc969b2bc82" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "741287a66c414acf1cdfb2d50027124e04c38f080bbbde8ee4449a30c0a391d7" + sha256 cellar: :any_skip_relocation, sonoma: "0d57d4cd119c98f2a2e8d6c68025173c89b6eeefab088772eda071b5a0552aff" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bcaa886bf7a57f63b4bd5ed585304baf09f2ed929a32c5246e080f09475f8b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9708fc002e135e84879652653c3f39813e510e6c385a61a6736c642bc960410e" + end + + depends_on "pango" + depends_on "pillow" + depends_on "python@3.14" + + uses_from_macos "libffi" + + pypi_packages exclude_packages: "pillow" + + resource "brotli" do + url "https://files.pythonhosted.org/packages/2f/c2/f9e977608bdf958650638c3f1e28f85a1b075f075ebbe77db8555463787b/Brotli-1.1.0.tar.gz" + sha256 "81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz" + sha256 "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" + end + + resource "cssselect2" do + url "https://files.pythonhosted.org/packages/9f/86/fd7f58fc498b3166f3a7e8e0cddb6e620fe1da35b02248b1bd59e95dbaaa/cssselect2-0.8.0.tar.gz" + sha256 "7674ffb954a3b46162392aee2a3a0aedb2e14ecf99fcc28644900f4e6e3e9d3a" + end + + resource "fonttools" do + url "https://files.pythonhosted.org/packages/4b/42/97a13e47a1e51a5a7142475bbcf5107fe3a68fc34aef331c897d5fb98ad0/fonttools-4.60.1.tar.gz" + sha256 "ef00af0439ebfee806b25f24c8f92109157ff3fac5731dc7867957812e87b8d9" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz" + sha256 "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2" + end + + resource "pydyf" do + url "https://files.pythonhosted.org/packages/2e/c2/97fc6ce4ce0045080dc99446def812081b57750ed8aa67bfdfafa4561fe5/pydyf-0.11.0.tar.gz" + sha256 "394dddf619cca9d0c55715e3c55ea121a9bf9cbc780cdc1201a2427917b86b64" + end + + resource "pyphen" do + url "https://files.pythonhosted.org/packages/69/56/e4d7e1bd70d997713649c5ce530b2d15a5fc2245a74ca820fc2d51d89d4d/pyphen-0.17.2.tar.gz" + sha256 "f60647a9c9b30ec6c59910097af82bc5dd2d36576b918e44148d8b07ef3b4aa3" + end + + resource "tinycss2" do + url "https://files.pythonhosted.org/packages/7a/fd/7a5ee21fd08ff70d3d33a5781c255cbe779659bd03278feb98b19ee550f4/tinycss2-1.4.0.tar.gz" + sha256 "10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7" + end + + resource "tinyhtml5" do + url "https://files.pythonhosted.org/packages/fd/03/6111ed99e9bf7dfa1c30baeef0e0fb7e0bd387bd07f8e5b270776fe1de3f/tinyhtml5-2.0.0.tar.gz" + sha256 "086f998833da24c300c414d9fe81d9b368fd04cb9d2596a008421cbc705fcfcc" + end + + resource "webencodings" do + url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" + sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + end + + resource "zopfli" do + url "https://files.pythonhosted.org/packages/5e/7c/a8f6696e694709e2abcbccd27d05ef761e9b6efae217e11d977471555b62/zopfli-0.2.3.post1.tar.gz" + sha256 "96484dc0f48be1c5d7ae9f38ed1ce41e3675fd506b27c11a6607f14b49101e99" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"example.html").write <<~HTML +

    This is a PDF

    + HTML + system bin/"weasyprint", "example.html", "example.pdf" + assert_path_exists testpath/"example.pdf" + File.open(testpath/"example.pdf", encoding: "iso-8859-1") do |f| + contents = f.read + assert_match(/^%PDF-1.7\n/, contents) + end + end +end diff --git a/Formula/w/weaver.rb b/Formula/w/weaver.rb new file mode 100644 index 0000000000000..328852b6ef8dd --- /dev/null +++ b/Formula/w/weaver.rb @@ -0,0 +1,34 @@ +class Weaver < Formula + desc "Command-line tool for Weaver" + homepage "https://github.com/scribd/Weaver" + url "https://github.com/scribd/Weaver/archive/refs/tags/1.1.7.tar.gz" + sha256 "8d53fbcd1283cea93532d8b301f11353bd7634d865c8148df3bc3f65d0447a19" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9cf53f642dde97db220e7bff17a8d7660c230416fea7ab058af0aab8ff20ebfe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b2c94574fbf1393924f73651ea3276ccc59168872c2e23cced5a2844a895a68" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c09fc8fbe98be3de2104a764b2a061ae395268fce3dbbe9720aa41fe601ef830" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c713370dc58cfbc20047ad65231048f4195297dd9f351d10551cb9f3e4381e7a" + sha256 cellar: :any_skip_relocation, sonoma: "46ec011fe16385d889653c9e3eb7c6ed689107cb92c8c7d6482e3f3b72d7ec27" + sha256 cellar: :any_skip_relocation, ventura: "0cf043e6335d98a3024183b86305c5375b2b1311637f76a062883cf37d9f6309" + end + + depends_on xcode: ["11.2", :build] + depends_on :macos # needs macOS CommonCrypto + + uses_from_macos "swift" + + conflicts_with "service-weaver", because: "both install a `weaver` binary" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # Weaver uses Sourcekitten and thus, has the same sandbox issues. + # Rewrite test after sandbox issues investigated. + # https://github.com/Homebrew/homebrew/pull/50211 + system bin/"weaver", "version" + end +end diff --git a/Formula/w/weaviate-cli.rb b/Formula/w/weaviate-cli.rb new file mode 100644 index 0000000000000..31033830d579b --- /dev/null +++ b/Formula/w/weaviate-cli.rb @@ -0,0 +1,162 @@ +class WeaviateCli < Formula + include Language::Python::Virtualenv + + desc "Command-line interface for managing and interacting with Weaviate" + homepage "https://pypi.org/project/weaviate-cli/" + url "https://files.pythonhosted.org/packages/da/8a/c756f576e3d80f7441d284898fce0a4516381c7ba6fa75a8908b63d6ad27/weaviate_cli-3.2.4.tar.gz" + sha256 "14499e4bdf6d4a9e66565d8bf2ecdf1de4478932123983213c7ca341ad66ab45" + license "BSD-3-Clause" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e13698b37e68ec1a41b4f7dc2172256fa644e5e144630862be2eedfcc798a16d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "829d696e5e013eb210964e65bc01f7bccad1d4b279baa7f6b2820a25ec30511f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e65b0ed2b54efe3479376959295422022e12e98b78c9af818dffd2e1ef0b0efe" + sha256 cellar: :any_skip_relocation, sonoma: "b578a157b23ad90551c98bcc87a4ca33a9e9acf58496aa7fc509265f1bdad8b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe3ab07f8cc7c06adabfe87d1b1db55332680bc34fdfe206cf751488b5b1de86" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31f8745e155e2ddff01f9e890a1fcf57a2522aae28c3a3dd0295b63b2b3c4cd0" + end + + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "certifi" => :no_linkage + depends_on "cryptography" => :no_linkage + depends_on "numpy" + depends_on "openssl@3" + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + uses_from_macos "libffi" + + on_linux do + depends_on "patchelf" => :build + end + + pypi_packages exclude_packages: %w[certifi cryptography numpy pydantic-core] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/cd/3f/1d3bbd0bf23bdd99276d4def22f29c27a914067b4cf66f753ff9b8bbd0f3/authlib-1.6.5.tar.gz" + sha256 "6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "deprecation" do + url "https://files.pythonhosted.org/packages/5a/d3/8ae2869247df154b64c1884d7346d412fed0c49df84db635aab2d1c40e62/deprecation-2.1.0.tar.gz" + sha256 "72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff" + end + + resource "faker" do + url "https://files.pythonhosted.org/packages/3d/84/e95acaa848b855e15c83331d0401ee5f84b2f60889255c2e055cb4fb6bdf/faker-37.12.0.tar.gz" + sha256 "7505e59a7e02fa9010f06c3e1e92f8250d4cfbb30632296140c2d6dbef09b0fa" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz" + sha256 "7be78388d6da1a25c0d5ec506523db58b18be22d9c37d8d3a32c08be4987bd73" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "importlib-resources" do + url "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz" + sha256 "185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/99/b1/85e18ac92afd08c533603e3393977b6bc1443043115a47bb094f3b98f94f/prettytable-3.16.0.tar.gz" + sha256 "3c64b31719d961bf69c9a7e03d0c1e477320906a98da63952bc6698d6164ff57" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz" + sha256 "140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz" + sha256 "b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9" + end + + resource "validators" do + url "https://files.pythonhosted.org/packages/53/66/a435d9ae49850b2f071f7ebd8119dd4e84872b01630d6736761e6e7fd847/validators-0.35.0.tar.gz" + sha256 "992d6c48a4e77c81f1b4daba10d16c3a9bb0dbb79b3a19ea847ff0928e70497a" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + resource "weaviate-client" do + url "https://files.pythonhosted.org/packages/bd/0e/e4582b007427187a9fde55fa575db4b766c81929d2b43a3dd8becce50567/weaviate_client-4.17.0.tar.gz" + sha256 "731d58d84b0989df4db399b686357ed285fb95971a492ccca8dec90bb2343c51" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"weaviate-cli", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/weaviate-cli --version") + assert_match "Error: Connection to Weaviate failed.", shell_output("#{bin}/weaviate-cli get collection", 1) + end +end diff --git a/Formula/w/weaviate.rb b/Formula/w/weaviate.rb new file mode 100644 index 0000000000000..37033603175d0 --- /dev/null +++ b/Formula/w/weaviate.rb @@ -0,0 +1,38 @@ +class Weaviate < Formula + desc "Open-source vector database that stores both objects and vectors" + homepage "https://weaviate.io/developers/weaviate/" + url "https://github.com/weaviate/weaviate/archive/refs/tags/v1.33.4.tar.gz" + sha256 "51af532973c942560235977840b78f5b2693f1a8db1079472467c24cb2514137" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5e726e5a8b80276f780e4943ee6a502f4f9a22a7f92992038e6a845aa8ee239e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e726e5a8b80276f780e4943ee6a502f4f9a22a7f92992038e6a845aa8ee239e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e726e5a8b80276f780e4943ee6a502f4f9a22a7f92992038e6a845aa8ee239e" + sha256 cellar: :any_skip_relocation, sonoma: "43aba757db578e79c8ebbaa1d7238f6e20ee4a2154ed5c5cf2f96dd546670868" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa177f3a2e5ec507639ec6300be94ed67f3561ad54e6eccff8f06bd00eb345ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bec95b5acfeb7b5bfd2851cc185744b45f857eb634e452856e688c49cd75d1bf" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/weaviate/weaviate/usecases/build.Version=#{version} + -X github.com/weaviate/weaviate/usecases/build.BuildUser=#{tap.user} + -X github.com/weaviate/weaviate/usecases/build.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/weaviate-server" + end + + test do + port = free_port + pid = spawn bin/"weaviate", "--host", "0.0.0.0", "--port", port.to_s, "--scheme", "http" + sleep 10 + assert_match version.to_s, shell_output("curl localhost:#{port}/v1/meta") + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/w/web-ext.rb b/Formula/w/web-ext.rb new file mode 100644 index 0000000000000..53b0c0881f44c --- /dev/null +++ b/Formula/w/web-ext.rb @@ -0,0 +1,60 @@ +class WebExt < Formula + desc "Command-line tool to help build, run, and test web extensions" + homepage "https://github.com/mozilla/web-ext" + url "https://registry.npmjs.org/web-ext/-/web-ext-9.1.0.tgz" + sha256 "de34d5e83a75de907549b5e87d37cc81c36bce896f8183afdbbcaee687a08aa1" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "653ac137aee1a766521f82256e332077c603866080d6f2a62c3150fcc7a52f03" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "653ac137aee1a766521f82256e332077c603866080d6f2a62c3150fcc7a52f03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "653ac137aee1a766521f82256e332077c603866080d6f2a62c3150fcc7a52f03" + sha256 cellar: :any_skip_relocation, sonoma: "653ac137aee1a766521f82256e332077c603866080d6f2a62c3150fcc7a52f03" + sha256 cellar: :any_skip_relocation, arm64_linux: "70d2137d5ff6288bce7b3a03185b3a1a3c2077b561389f8f7d4d186e6686c791" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70d2137d5ff6288bce7b3a03185b3a1a3c2077b561389f8f7d4d186e6686c791" + end + + depends_on "node" + + on_macos do + depends_on "terminal-notifier" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove vendored pre-built binary `terminal-notifier` + node_notifier_vendor_dir = libexec/"lib/node_modules/web-ext/node_modules/node-notifier/vendor" + rm_r(node_notifier_vendor_dir) # remove vendored pre-built binaries + + if OS.mac? + terminal_notifier_dir = node_notifier_vendor_dir/"mac.noindex" + terminal_notifier_dir.mkpath + + # replace vendored `terminal-notifier` with our own + terminal_notifier_app = Formula["terminal-notifier"].opt_prefix/"terminal-notifier.app" + ln_sf terminal_notifier_app.relative_path_from(terminal_notifier_dir), terminal_notifier_dir + end + end + + test do + (testpath/"manifest.json").write <<~JSON + { + "manifest_version": 2, + "name": "minimal web extension", + "version": "0.0.1" + } + JSON + assert_match <<~EOF, shell_output("#{bin}/web-ext lint").gsub(/ +$/, "") + Validation Summary: + + errors 0 + notices 0 + warnings 2 + + EOF + + assert_match version.to_s, shell_output("#{bin}/web-ext --version") + end +end diff --git a/Formula/w/webarchiver.rb b/Formula/w/webarchiver.rb new file mode 100644 index 0000000000000..aa323e02694e6 --- /dev/null +++ b/Formula/w/webarchiver.rb @@ -0,0 +1,32 @@ +class Webarchiver < Formula + desc "Allows you to create Safari .webarchive files" + homepage "https://github.com/newzealandpaul/webarchiver" + url "https://github.com/newzealandpaul/webarchiver/archive/refs/tags/0.13.tar.gz" + sha256 "bbb81adb809a2817e6febdcf801af805b9f4d3080127411e544ac00ee4575242" + license "GPL-3.0-only" + head "https://github.com/newzealandpaul/webarchiver.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1335d4184a0607f3a7ec9c5b9e1b95d7332e7c0f89fee407219150975c78646b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "050531ce286b76faa0a3c831e5f9a070c0723b0bfe839e68f0f35f2829c34884" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "050531ce286b76faa0a3c831e5f9a070c0723b0bfe839e68f0f35f2829c34884" + sha256 cellar: :any_skip_relocation, arm64_ventura: "249899f8ee0514281af8b45bf56fb65941ead5ad3adcbaf56513b5e7eea39233" + sha256 cellar: :any_skip_relocation, sonoma: "a8cb6227264b831514bb69badfc3ab0ebc70729b4dca1aecf77d3d81118b4be4" + sha256 cellar: :any_skip_relocation, ventura: "acab94c734634d21e854afe226e619321df5a0ba31c3435e24651cdecd7d8e0b" + end + + depends_on xcode: ["6.0.1", :build] + depends_on :macos + + def install + # Force 64 bit-only build, otherwise it fails on Mojave + xcodebuild "SYMROOT=build", "-arch", Hardware::CPU.arch + + bin.install "./build/Release/webarchiver" + end + + test do + system bin/"webarchiver", "-url", "https://www.google.com", "-output", "foo.webarchive" + assert_match "Apple binary property list", shell_output("file foo.webarchive") + end +end diff --git a/Formula/w/webdav.rb b/Formula/w/webdav.rb new file mode 100644 index 0000000000000..41b6a00f38505 --- /dev/null +++ b/Formula/w/webdav.rb @@ -0,0 +1,48 @@ +class Webdav < Formula + desc "Simple and standalone WebDAV server" + homepage "https://github.com/hacdias/webdav" + url "https://github.com/hacdias/webdav/archive/refs/tags/v5.9.0.tar.gz" + sha256 "a52ef8bf27f15074d645c4040152fc46e497bc44a03361e19fbd84f813a36f4b" + license "MIT" + head "https://github.com/hacdias/webdav.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6d0e6e2ef1a49261ff77b6d642ac14d8d47eaf320cc5a933ab5c8177cdba45ff" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d0e6e2ef1a49261ff77b6d642ac14d8d47eaf320cc5a933ab5c8177cdba45ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d0e6e2ef1a49261ff77b6d642ac14d8d47eaf320cc5a933ab5c8177cdba45ff" + sha256 cellar: :any_skip_relocation, sonoma: "dbbd4ab99bf8fe2b66a6e9bfde11c877e61a3c988b01df2c391d03e8fd3b6895" + sha256 cellar: :any_skip_relocation, arm64_linux: "20d35f0667489c7b9592ecc1532d6df640357d03f2dda6f53320c35a2d1b03c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfb40930cdfd8de966e9a865539a4f7a7a35d989a7d7dad810e6969408bf4451" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/hacdias/webdav/v5/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"webdav", "completion") + end + + test do + port = free_port + (testpath/"config.yaml").write <<~YAML + address: 127.0.0.1 + port: #{port} + directory: #{testpath} + YAML + + (testpath/"hello").write "World!" + + begin + pid = spawn bin/"webdav", "--config", testpath/"config.yaml" + sleep 2 + + assert_match "World!", shell_output("curl -s http://127.0.0.1:#{port}/hello") + assert_match version.to_s, shell_output("#{bin}/webdav version") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/w/webdis.rb b/Formula/w/webdis.rb new file mode 100644 index 0000000000000..c0e70a2f596b3 --- /dev/null +++ b/Formula/w/webdis.rb @@ -0,0 +1,58 @@ +class Webdis < Formula + desc "Redis HTTP interface with JSON output" + homepage "https://webd.is/" + url "https://github.com/nicolasff/webdis/archive/refs/tags/0.1.23.tar.gz" + sha256 "e482e7eb2f7ba453df87a893791948b1f7921e51c14838179bc680a5d1a2018c" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "db31ae23c2925f9c3a8ecfccb92a8d9f02b5f3bf2fcdaaf44bfe60f895c2ca5a" + sha256 cellar: :any, arm64_sequoia: "c95a32da381c41544226dc1fd87657235858a07f03ff55e593749eb0f8ab57b0" + sha256 cellar: :any, arm64_sonoma: "0a6778e26839e3df4ebdb775d33b9d6298dedadf96ef4f086b7e64b58ae14908" + sha256 cellar: :any, arm64_ventura: "2831f7de16d9180de3842c6ecf9ae9a544c43b98d6d0a907a5328e140512f825" + sha256 cellar: :any, sonoma: "5aff42161b96307719332e86c69d1040a81dc9379d241a3e98f5b96fb70f1191" + sha256 cellar: :any, ventura: "02d02d3df326ee2c8862901d5cd044879f790fc297b9e0781d957e2218b0848f" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b8ef81d4472b731a184ada0e2ce7536a2a41fd732cb4f84b925629d067b4380" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66888ace6f4c47250c02fbd671f06c0269779d5f2fae00ce9e6a2cb02ee72937" + end + + depends_on "libevent" + + def install + system "make" + bin.install "webdis" + + inreplace "webdis.prod.json" do |s| + s.gsub! "/var/log/webdis.log", "#{var}/log/webdis.log" + s.gsub!(/daemonize":\s*true/, "daemonize\":\tfalse") + end + + etc.install "webdis.json", "webdis.prod.json" + end + + def post_install + (var/"log").mkpath + end + + service do + run [opt_bin/"webdis", etc/"webdis.prod.json"] + keep_alive true + working_dir var + end + + test do + port = free_port + cp etc/"webdis.json", testpath/"webdis.json" + inreplace "webdis.json", "7379", port.to_s + + server = fork do + exec bin/"webdis", "webdis.json" + end + sleep 2 + # Test that the response is from webdis + assert_match(/Server: Webdis/, shell_output("curl --silent -XGET -I http://localhost:#{port}/PING")) + ensure + Process.kill "TERM", server + Process.wait server + end +end diff --git a/Formula/w/webfs.rb b/Formula/w/webfs.rb new file mode 100644 index 0000000000000..fde4a6c1c1d76 --- /dev/null +++ b/Formula/w/webfs.rb @@ -0,0 +1,57 @@ +class Webfs < Formula + desc "HTTP server for purely static content" + homepage "https://linux.bytesex.org/misc/webfs.html" + url "https://www.kraxel.org/releases/webfs/webfs-1.21.tar.gz" + sha256 "98c1cb93473df08e166e848e549f86402e94a2f727366925b1c54ab31064a62a" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://www.kraxel.org/releases/webfs/" + regex(/href=.*?webfs[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "f24eb50960a9e004fa3c769dcf977fc0582134669c439405884ceaad2b7ec18f" + sha256 arm64_sequoia: "3291625be9eb1abecfaf361089d2cfcd6ae76f8123cd08280b2e8d41d176686c" + sha256 arm64_sonoma: "ef56fd774bdf47267b3247e82de6c75e875afdb0e1afab06169c16434dca2cc6" + sha256 arm64_ventura: "49156fc8ba3a476cf63f719f17e679ad66b96f1494ccf387ce7c0c6007150a56" + sha256 arm64_monterey: "047b4b7404e97147da732a96019fa8e1bfb5f7e541ac9cc7178492ac12653b65" + sha256 arm64_big_sur: "56124768f91253664d4e30becdf5da71303e99cb26f3a0053c0707bde08c9889" + sha256 sonoma: "13ecbf81676a75692f1c5a4375a7510a42e0445c6f1bed71a750fda9bd286fb6" + sha256 ventura: "65ebbb49cd4a93f5abb177d97e737e5cd1f5b08a33ffad4fa6ddfc647f79066b" + sha256 monterey: "d5e072f43509860bf1720573e0da3762e734aeb450dabe4e2e8ae4cd96dff185" + sha256 big_sur: "3d7288254445f01e83e1950144448608501a91897b793cc8c173657d8d17ac2d" + sha256 catalina: "0b85fe4886d6c3e04d1f96fdfb39bc70dea3a4e75aa5e943c2b8bf4dde3e17aa" + sha256 arm64_linux: "b797c9b3bda23e449f53975e905232df8010c9301d3117101167f82701a00d75" + sha256 x86_64_linux: "3656131d83b5affd389f147cc542fa0c5717aa0cd7aec1b03e05603f3a4ac06e" + end + + depends_on "httpd" => :build + depends_on "openssl@3" + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/webfs/patch-ls.c" + sha256 "8ddb6cb1a15f0020bbb14ef54a8ae5c6748a109564fa461219901e7e34826170" + end + + def install + ENV["prefix"]=prefix + args = ["mimefile=#{etc}/httpd/mime.types"] + args << "SHELL=bash" unless OS.mac? + system "make", "install", *args + end + + test do + port = free_port + pid = fork { exec bin/"webfsd", "-F", "-p", port.to_s } + sleep 5 + assert_match %r{webfs/1.21}, shell_output("curl localhost:#{port}") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end +end diff --git a/Formula/w/webhook.rb b/Formula/w/webhook.rb new file mode 100644 index 0000000000000..0f24ea06812f2 --- /dev/null +++ b/Formula/w/webhook.rb @@ -0,0 +1,49 @@ +class Webhook < Formula + desc "Lightweight, configurable incoming webhook server" + homepage "https://github.com/adnanh/webhook" + url "https://github.com/adnanh/webhook/archive/refs/tags/2.8.2.tar.gz" + sha256 "c233a810effc24b5ed5653f4fa82152f288ec937d5744a339f7066a6cbccc565" + license "MIT" + head "https://github.com/adnanh/webhook.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1ec4d1eb42708a59188bb28e1ec6b5183d2a76c18e9f526750be6a8fc892f9ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "353fae094f87012e6168a3c05d23775364567e9b77e23dadaddc6934de132687" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "353fae094f87012e6168a3c05d23775364567e9b77e23dadaddc6934de132687" + sha256 cellar: :any_skip_relocation, arm64_ventura: "353fae094f87012e6168a3c05d23775364567e9b77e23dadaddc6934de132687" + sha256 cellar: :any_skip_relocation, sonoma: "93093d997e626387ef2ca21b6e854d2b04f3a974c144d316db61f924f2eb4546" + sha256 cellar: :any_skip_relocation, ventura: "93093d997e626387ef2ca21b6e854d2b04f3a974c144d316db61f924f2eb4546" + sha256 cellar: :any_skip_relocation, arm64_linux: "da202cab5da63306d628f326b11ed92fef18b96b031d1a6648f9d47dc0648a3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9041e5e55f02a911e3203d13432b83aa72bfe5fc3869b1f81ac4639a1976c31c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"hooks.yaml").write <<~YAML + - id: test + execute-command: /bin/sh + command-working-directory: "#{testpath}" + pass-arguments-to-command: + - source: string + name: -c + - source: string + name: "pwd > out.txt" + YAML + + port = free_port + fork do + exec bin/"webhook", "-hooks", "hooks.yaml", "-port", port.to_s + end + sleep 1 + + system "curl", "localhost:#{port}/hooks/test" + sleep 1 + assert_equal testpath.to_s, (testpath/"out.txt").read.chomp + end +end diff --git a/Formula/w/webify.rb b/Formula/w/webify.rb new file mode 100644 index 0000000000000..6e36b4f14a259 --- /dev/null +++ b/Formula/w/webify.rb @@ -0,0 +1,41 @@ +class Webify < Formula + desc "Wrapper for shell commands as web services" + homepage "https://github.com/beefsack/webify" + url "https://github.com/beefsack/webify/archive/refs/tags/v1.5.0.tar.gz" + sha256 "66805a4aef4ed0e9c49e711efc038e2cd4e74aa2dc179ea93b31dc3aa76e6d7b" + license "MIT" + head "https://github.com/beefsack/webify.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "58f65712d5c510614847dbcd64d5e96fa1728a35de3f3a31438aa644ed02afe6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "73fc38e24f8531f3ce47ffe71e79edee8f691a0f7c936263c4c32bc4a873ded3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f776cc31325713ba672231fa075d461e4efbeaff7f10ff49b15671c9003ae0e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4eada7fc709a5269b78b9f1c002a74e192be12631223a288be54e3fb64e0bbe6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9a80b61c908b93e32695c8aa4cd4a3a1bfba81364cd8db7dff8dc5d46792240b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2e846193c20d268355845e6d7e8e05dfc6f505749f6560d5ea6b4c8b1e4daf0f" + sha256 cellar: :any_skip_relocation, sonoma: "ee516a9a392724609863042f96c8bf2ff8a8ad0ac941f89813a02ce746348765" + sha256 cellar: :any_skip_relocation, ventura: "99d3f367eb9e00999b733e1aff3ab1d8000b4e36885a5e74ca1faf44e96274b8" + sha256 cellar: :any_skip_relocation, monterey: "fa86b0d119e772525b310e2074115745dfcd4791ab9a8401d43674b5d7d09b43" + sha256 cellar: :any_skip_relocation, big_sur: "284df018b49ddc0c2a3b8e0800c1997abebee41d198edbd7d725be2f88a8c5e4" + sha256 cellar: :any_skip_relocation, catalina: "7b6543358b1c92e8e8cc71584ed52802a039c9327edc839dcc75216fbd23558c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec575d86612a39bd2e879f5bc7d6ae16e8787670d66c8c23da15df7d09f8d378" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bfcea38ac0326979bfc1c189dd9bf3c19437a5d92c8cade9a41f3c1fe976d83" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + port = free_port + fork do + exec bin/"webify", "-addr=:#{port}", "cat" + end + sleep 1 + assert_equal "Homebrew", shell_output("curl -s -d Homebrew http://localhost:#{port}") + end +end diff --git a/Formula/w/webkit2png.rb b/Formula/w/webkit2png.rb new file mode 100644 index 0000000000000..0b60be634a703 --- /dev/null +++ b/Formula/w/webkit2png.rb @@ -0,0 +1,25 @@ +class Webkit2png < Formula + desc "Create screenshots of webpages from the terminal" + homepage "https://www.paulhammond.org/webkit2png/" + url "https://github.com/paulhammond/webkit2png/archive/refs/tags/v0.7.tar.gz" + sha256 "9b810edb6f54cc23ba86b0212f203e6c3bbafc3cbdb62b9c33887548c91015bf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ad209d841f88f9b5d3a969e2493d853237c89234bd09dfc3d1aa2106832d2d7d" + end + + # requires Python 2, see https://github.com/paulhammond/webkit2png/issues/108 + deprecate! date: "2025-03-21", because: :unsupported + + # Requires Quartz, as well as other potentially Mac-only libraries + depends_on :macos + + def install + bin.install "webkit2png" + end + + test do + system bin/"webkit2png", "--version" + end +end diff --git a/Formula/w/webkitgtk.rb b/Formula/w/webkitgtk.rb new file mode 100644 index 0000000000000..d5c459e8754e4 --- /dev/null +++ b/Formula/w/webkitgtk.rb @@ -0,0 +1,156 @@ +class Webkitgtk < Formula + desc "GTK interface to WebKit" + homepage "https://webkitgtk.org" + url "https://webkitgtk.org/releases/webkitgtk-2.50.1.tar.xz" + sha256 "33e912ee6e3cdb4b9803715f50686af85a60af47f1cf72a6acc6a2db1bb3d9fe" + license "GPL-3.0-or-later" + + livecheck do + url "https://webkitgtk.org/releases/" + regex(/webkitgtk[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_linux: "795d3ce1aa2a886eec47c9bc22a0dffdb780c6a41edeca1767b058a15f82fa6e" + sha256 x86_64_linux: "810651d36f48190e8110095e08860341885794b1994238700d51eb8a54bc0125" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "gperf" => :build + depends_on "perl" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => :build + depends_on "ruby" => :build + depends_on "unifdef" => :build + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "enchant" + depends_on "expat" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gstreamer" + depends_on "gtk+3" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libavif" + depends_on "libdrm" + depends_on "libepoxy" + depends_on "libgcrypt" + depends_on "libnotify" + depends_on "libpng" + depends_on "libsecret" + depends_on "libsoup" + depends_on "libtasn1" + depends_on "libwpe" + depends_on "libx11" + depends_on "libxcomposite" + depends_on "libxml2" + depends_on "libxslt" + depends_on "libxt" + depends_on :linux # Use JavaScriptCore.Framework on macOS. + depends_on "little-cms2" + depends_on "mesa" + depends_on "openjpeg" + depends_on "pango" + depends_on "sqlite" + depends_on "sysprof" + depends_on "systemd" + depends_on "wayland" + depends_on "webp" + depends_on "woff2" + depends_on "wpebackend-fdo" + depends_on "zlib" + + def install + args = %W[ + -DPORT=GTK + -DENABLE_BUBBLEWRAP_SANDBOX=OFF + -DENABLE_DOCUMENTATION=OFF + -DENABLE_GAMEPAD=OFF + -DENABLE_MINIBROWSER=ON + -DENABLE_SPEECH_SYNTHESIS=OFF + -DUSE_AVIF=ON + -DUSE_GTK4=OFF + -DUSE_JPEGXL=ON + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBHYPHEN=OFF + -DPython_EXECUTABLE=#{which("python3.14")} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + static void destroyWindowCb(GtkWidget* widget, GtkWidget* window); + static gboolean closeWebViewCb(WebKitWebView* webView, GtkWidget* window); + + int main(int argc, char* argv[]) + { + // Initialize GTK+ + gtk_init(&argc, &argv); + + // Create an 800x600 window that will contain the browser instance + GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_default_size(GTK_WINDOW(main_window), 800, 600); + + // Create a browser instance + WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + + // Put the browser area into the main window + gtk_container_add(GTK_CONTAINER(main_window), GTK_WIDGET(webView)); + + // Set up callbacks so that if either the main window or the browser instance is + // closed, the program will exit + g_signal_connect(main_window, "destroy", G_CALLBACK(destroyWindowCb), NULL); + g_signal_connect(webView, "close", G_CALLBACK(closeWebViewCb), main_window); + + // Load a web page into the browser instance + webkit_web_view_load_uri(webView, "https://www.webkitgtk.org/"); + + // Make sure that when the browser area becomes visible, it will get mouse + // and keyboard events + gtk_widget_grab_focus(GTK_WIDGET(webView)); + + // Make sure the main window and all its contents are visible + gtk_widget_show_all(main_window); + + // Run the main GTK+ event loop + gtk_main(); + + return 0; + } + + static void destroyWindowCb(GtkWidget* widget, GtkWidget* window) + { + gtk_main_quit(); + } + + static gboolean closeWebViewCb(WebKitWebView* webView, GtkWidget* window) + { + gtk_widget_destroy(window); + return TRUE; + } + C + + pkg_config_flags = shell_output("pkgconf --cflags --libs gtk+-3.0 webkit2gtk-4.1").chomp.split + system ENV.cc, "test.c", *pkg_config_flags, "-o", "test" + # While we cannot open a browser window in CI, we can make sure that the test binary runs + # and produces the expected warning. + assert_match "cannot open display", shell_output("#{testpath}/test 2>&1", 1) + + # Test the JavaScriptCore interpreter. + assert_match "Hello World", shell_output("#{libexec}/webkit2gtk-4.1/jsc -e \"debug('Hello World');\" 2>&1") + end +end diff --git a/Formula/w/webp-pixbuf-loader.rb b/Formula/w/webp-pixbuf-loader.rb new file mode 100644 index 0000000000000..71054abe7517a --- /dev/null +++ b/Formula/w/webp-pixbuf-loader.rb @@ -0,0 +1,84 @@ +class WebpPixbufLoader < Formula + desc "WebP Image format GdkPixbuf loader" + homepage "https://github.com/aruiz/webp-pixbuf-loader" + url "https://github.com/aruiz/webp-pixbuf-loader/archive/refs/tags/0.2.7.tar.gz" + sha256 "61ce5e8e036043f9d0e78c1596a621788e879c52aedf72ab5e78a8c44849411a" + license "LGPL-2.0-or-later" + head "https://github.com/aruiz/webp-pixbuf-loader.git", branch: "mainline" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "e3a73f1544d69019b2b351dfe0d77e7d43267dbe80fa5f74afe35f88f1f99618" + sha256 cellar: :any, arm64_sequoia: "7416b43e99db50887259c1e57bfa9bf9a63fc087ad56b0c8bdc50f8aeabbc8a0" + sha256 cellar: :any, arm64_sonoma: "2d6760c39d49f2f829631ff7d94e69b08d80fe6e54d1c21c658abb036ee5c7e3" + sha256 cellar: :any, arm64_ventura: "aa2f49cc24d6fd4cc3126807ecf76cadc3e46108171fdeb064a52c628b82f780" + sha256 cellar: :any, sonoma: "841913a93d467056a49f176338a660069c6998a4c2e07d04d668569b4f0a6ddf" + sha256 cellar: :any, ventura: "db417e25ee2371e7e22cb11a70e2423e897d79c56826243942894a1456bac099" + sha256 arm64_linux: "11d831a6753d21c518cac32cdc6d67e8f3751cf08bc3cb4f1d887fc6dc1bf44f" + sha256 x86_64_linux: "623c54e77f46a6687ba4662cbec44fde554ea84a43b1bea5432ec759f4e2367a" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "webp" + + # Constants for gdk-pixbuf's multiple version numbers, which are the same as + # the constants in the gdk-pixbuf formula. + def gdk_so_ver + Formula["gdk-pixbuf"].gdk_so_ver + end + + def gdk_module_ver + Formula["gdk-pixbuf"].gdk_module_ver + end + + # Subfolder that pixbuf loaders are installed into. + def module_subdir + "lib/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}/loaders" + end + + def install + system "meson", "setup", "build", "-Dgdk_pixbuf_moduledir=#{prefix}/#{module_subdir}", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + # After the loader is linked in, update the global cache of pixbuf loaders + def post_install + ENV["GDK_PIXBUF_MODULEDIR"] = "#{HOMEBREW_PREFIX}/#{module_subdir}" + system Formula["gdk-pixbuf"].opt_bin/"gdk-pixbuf-query-loaders", "--update-cache" + end + + test do + # Generate a .webp file to test with. + system Formula["webp"].opt_bin/"cwebp", test_fixtures("test.png"), "-o", "test.webp" + + # Sample program to load a .webp file via gdk-pixbuf. + (testpath/"test.c").write <<~C + #include + + gint main (gint argc, gchar **argv) { + GError *error = NULL; + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (argv[1], &error); + if (error) { + g_error("%s", error->message); + return 1; + }; + + g_assert(gdk_pixbuf_get_width(pixbuf) == 8); + g_assert(gdk_pixbuf_get_height(pixbuf) == 8); + g_object_unref(pixbuf); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gdk-pixbuf-#{gdk_so_ver}").chomp.split + system ENV.cc, "test.c", "-o", "test_loader", *flags + system "./test_loader", "test.webp" + end +end diff --git a/Formula/w/webp.rb b/Formula/w/webp.rb new file mode 100644 index 0000000000000..94ac6014300ac --- /dev/null +++ b/Formula/w/webp.rb @@ -0,0 +1,51 @@ +class Webp < Formula + desc "Image format providing lossless and lossy compression for web images" + homepage "https://developers.google.com/speed/webp/" + url "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.6.0.tar.gz" + sha256 "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564" + license "BSD-3-Clause" + head "https://chromium.googlesource.com/webm/libwebp.git", branch: "main" + + livecheck do + url "https://developers.google.com/speed/webp/docs/compiling" + regex(/libwebp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "11a19ac5db13a8485d4d6f712d65d48531f99e8d7237407ab42718777eefacb3" + sha256 cellar: :any, arm64_sequoia: "ad74e4538a799bc21e85fb2899c2267f7b6c8761212d195ec3cb3583062ad19e" + sha256 cellar: :any, arm64_sonoma: "2c0172632efa4d17103aad0d82dd27addce7db290b5cf52cd9afcbff3c39a497" + sha256 cellar: :any, arm64_ventura: "984de8caf92ff3492d12b9c0afabd97e07139f212222021a6813a2c99f66855d" + sha256 cellar: :any, sonoma: "ea4e1ab3ff7e848a8b26a6e851e032887c0a5853d4586e77e98ca586b7f96a35" + sha256 cellar: :any, ventura: "f5fa0476d932c52eedee49bdfc95d49514a6816f38c479cd8732a866e44ee3b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d8b90c79d3e912e86136a88e49295f76fe2b67803b299c5fbe7ab12f01f4faf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5520d52bce6d837491accd768420cb44e9c64b6bcd4063817668fd5245fc9cfc" + end + + depends_on "cmake" => :build + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON", *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "static", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF", *args + system "cmake", "--build", "static" + lib.install buildpath.glob("static/*.a") + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace (lib/"pkgconfig").glob("*.pc"), prefix, opt_prefix + end + + test do + system bin/"cwebp", test_fixtures("test.png"), "-o", "webp_test.png" + system bin/"dwebp", "webp_test.png", "-o", "webp_test.webp" + assert_path_exists testpath/"webp_test.webp" + end +end diff --git a/Formula/w/webpack.rb b/Formula/w/webpack.rb new file mode 100644 index 0000000000000..188fbda7afa49 --- /dev/null +++ b/Formula/w/webpack.rb @@ -0,0 +1,56 @@ +require "json" + +class Webpack < Formula + desc "Bundler for JavaScript and friends" + homepage "https://webpack.js.org/" + url "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz" + sha256 "344ad825f1ac087c5f730bfc558c1a7c066e156a8b9a619b8d4b4d99597913a8" + license "MIT" + head "https://github.com/webpack/webpack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "bade1c6f9e45f6f3e106fbdf967d35bc649cae41c0dea307fe120515cd7abf1f" + end + + depends_on "node" + + resource "webpack-cli" do + url "https://registry.npmjs.org/webpack-cli/-/webpack-cli-6.0.1.tgz" + sha256 "f407788079854b0d48fb750da496c59cf00762dce3731520a4b375a377dec183" + end + + def install + (buildpath/"node_modules/webpack").install Dir["*"] + buildpath.install resource("webpack-cli") + + cd buildpath/"node_modules/webpack" do + system "npm", "install", *std_npm_args(prefix: false), "--force" + end + + # declare webpack as a bundledDependency of webpack-cli + pkg_json = JSON.parse(File.read("package.json")) + pkg_json["dependencies"]["webpack"] = version + pkg_json["bundleDependencies"] = ["webpack"] + File.write("package.json", JSON.pretty_generate(pkg_json)) + + system "npm", "install", *std_npm_args + + bin.install_symlink libexec.glob("bin/*") + bin.install_symlink libexec/"bin/webpack-cli" => "webpack" + end + + test do + (testpath/"index.js").write <<~JS + function component() { + const element = document.createElement('div'); + element.innerHTML = 'Hello webpack'; + return element; + } + + document.body.appendChild(component()); + JS + + system bin/"webpack", "bundle", "--mode=production", testpath/"index.js" + assert_match 'const e=document.createElement("div");', (testpath/"dist/main.js").read + end +end diff --git a/Formula/w/webpod.rb b/Formula/w/webpod.rb new file mode 100644 index 0000000000000..121be9cfe8d4d --- /dev/null +++ b/Formula/w/webpod.rb @@ -0,0 +1,28 @@ +class Webpod < Formula + desc "Deploy websites and apps anywhere" + homepage "https://webpod.dev" + url "https://registry.npmjs.org/webpod/-/webpod-1.0.0.tgz" + sha256 "99b123e8d9f49b06d2dd0b886b81d2c2c64e510ba50eac2ba229e60b36719a7e" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ef076e7974529c853c352407873ff5cd53c23fccd374510778b508983995bd3a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/webpod --version") + + status_output = shell_output("#{bin}/webpod fakehost 2>&1", 1) + assert_match "Webpod cannot connect to root@fakehost", status_output + end +end diff --git a/Formula/w/websocat.rb b/Formula/w/websocat.rb new file mode 100644 index 0000000000000..6a96fc3849f0a --- /dev/null +++ b/Formula/w/websocat.rb @@ -0,0 +1,44 @@ +class Websocat < Formula + desc "Command-line client for WebSockets" + homepage "https://github.com/vi/websocat" + url "https://github.com/vi/websocat/archive/refs/tags/v1.14.0.tar.gz" + sha256 "919ee83c961074c176a129874a77c02889401f3548c2536a84c4427f97cfeb26" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a364bf89f3b9a3db00b322e8649792ee1d00af374dbb7f48f630acabefbd75a2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43528315c386262e6d11036b016fc7ddab24c362e1a38e036b31133c3bf194af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e1c06621d0e8448803752f47c35f13a56a16e118de637aa6c19c20f1c954abe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eeecfce3377a6c4093b50d964f083b4b03dc39f13b933e2b57a38eed3d957066" + sha256 cellar: :any_skip_relocation, sonoma: "54a9d377c6bfa1776e72631b6a2599a1b45f409d2307b2c3dd36db86dfb8a778" + sha256 cellar: :any_skip_relocation, ventura: "60b160dbc0fcb8ac2ffd81f9b27cc912ce15ba52b091897fe5d7ff0ff2e2cdd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bed9942cd5ce9dc488d0e14ff99e38874568aba619f37a6f6c70b6aed1b34b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47743949aee1665357d781c961840c97f3d781650995f7b0c9cb541f898c756f" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "openssl@3" + end + + # bump traitobject to build against rust 1.87 + patch do + url "https://github.com/vi/websocat/commit/d4455623e777231d69b029d69d7a17c0de2bafe7.patch?full_index=1" + sha256 "505f8fa7311ef11c60f9e665aa1479fbdf4b666e9eae01db56567a3f25866c05" + end + + def install + system "cargo", "install", "--features", "ssl", *std_cargo_args + end + + test do + system bin/"websocat", "-t", "literal:qwe", "assert:qwe" + end +end diff --git a/Formula/w/websocketd.rb b/Formula/w/websocketd.rb new file mode 100644 index 0000000000000..422b265f2ee97 --- /dev/null +++ b/Formula/w/websocketd.rb @@ -0,0 +1,46 @@ +class Websocketd < Formula + desc "WebSockets the Unix way" + homepage "http://websocketd.com" + url "https://github.com/joewalnes/websocketd/archive/refs/tags/v0.4.1.tar.gz" + sha256 "6b8fe0fad586d794e002340ee597059b2cfc734ba7579933263aef4743138fe5" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "be906b57564f8192370b7cdbe3febd1feff0c77ef06e84a4a56470d3af071ee9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3b32f5cb8758b74b70de5a6f552ddf5aef4cae18908df4b0d42e9c999a9b851" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7ba51607007665381a1a42a51f888536174c3aa31264951aac1460e0aa00853" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b7d6fde3236364942816c8578c1a5d6e436b562d2db34b9d0fb0fa9d501e8dde" + sha256 cellar: :any_skip_relocation, arm64_monterey: "256933f91abb70b0974f791cbbd8158f4399c27ed2ce99438f7ac566a560003e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8d9e5282df6737a6870a2a750570ab79909fb4463411797b0bf5d20cb269162d" + sha256 cellar: :any_skip_relocation, sonoma: "3da7e9916ce61c0d78db8922d45937c631286400daad6493ebac334dd731c07f" + sha256 cellar: :any_skip_relocation, ventura: "302d431c2759cde95803ec57e9001ec22367b7b3c18a55693aa61547d47bac8d" + sha256 cellar: :any_skip_relocation, monterey: "5a769dfeb3f3062af01fb6ba0703e1d416dc648736e20103c1e0a31489796ddf" + sha256 cellar: :any_skip_relocation, big_sur: "cbdc36c8c64cb2b0f1f149242a4c82e5d3eebff521e45bdfc88aa7dced9d2440" + sha256 cellar: :any_skip_relocation, catalina: "944c9e728f5f1a7ba098207a0acf50b1e19209010c9d87c8cdd18758ec9c71b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "adb13dc1219a6097b858acc72220eeba2500ef475b975062538cc2034d7ef49a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74fdd936d2632aaf2e484ef2f796d8d2f4f281f643ab23c414708363116ca9b8" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:) + man1.install "release/websocketd.man" => "websocketd.1" + end + + test do + port = free_port + pid = Process.fork { exec bin/"websocketd", "--port=#{port}", "echo", "ok" } + sleep 2 + + begin + assert_equal("404 page not found\n", shell_output("curl -s http://localhost:#{port}")) + ensure + Process.kill 9, pid + Process.wait pid + end + end +end diff --git a/Formula/w/websocketpp.rb b/Formula/w/websocketpp.rb new file mode 100644 index 0000000000000..7432223fdaedf --- /dev/null +++ b/Formula/w/websocketpp.rb @@ -0,0 +1,49 @@ +class Websocketpp < Formula + desc "WebSocket++ is a cross platform header only C++ library" + homepage "https://www.zaphoyd.com/websocketpp" + url "https://github.com/zaphoyd/websocketpp/archive/refs/tags/0.8.2.tar.gz" + sha256 "6ce889d85ecdc2d8fa07408d6787e7352510750daa66b5ad44aacb47bea76755" + license "BSD-3-Clause" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "782e6a1f87776d26f0aa59cecb2413a4e1b69291cfe5feadb07614138280ef11" + end + + # cannot run with asio 1.34.2, upstream issue, https://github.com/zaphoyd/websocketpp/issues/1169 + # no commits in the past five years + deprecate! date: "2025-04-10", because: :unmaintained + + depends_on "cmake" => :build + depends_on "asio" + + def install + # cmake 4.0 support PR, https://github.com/zaphoyd/websocketpp/pull/1168 + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #define ASIO_STANDALONE + #include + #include + typedef websocketpp::client client; + int main(int argc, char ** argv) + { + client c; + try { + c.init_asio(); + return 0; + } catch (websocketpp::exception const & e) { + std::cout << e.what() << std::endl; + return 1; + } + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-pthread", "-o", "test" + system "./test" + end +end diff --git a/Formula/w/webtorrent-cli.rb b/Formula/w/webtorrent-cli.rb new file mode 100644 index 0000000000000..e37fe06850714 --- /dev/null +++ b/Formula/w/webtorrent-cli.rb @@ -0,0 +1,93 @@ +class WebtorrentCli < Formula + desc "Command-line streaming torrent client" + homepage "https://webtorrent.io/" + url "https://registry.npmjs.org/webtorrent-cli/-/webtorrent-cli-5.1.3.tgz" + sha256 "54a53ecdacbccf0f6855bd4ef18f4f154576f8346e3b7aef3792b66dd5aaaa1b" + license "MIT" + + bottle do + rebuild 2 + sha256 arm64_tahoe: "4f3bda6aa26bcf929db135e31c3fb3822ef250a7738438b4256c0706abc736b6" + sha256 arm64_sequoia: "2455bfe4e4762ecf6d4110b6e3db3160d6b6f7ed455062fea983f230b127b127" + sha256 arm64_sonoma: "89c52aa581dbbf5676cb8fd1e7837f9e7830b35ee33fda3b1dba4b37484b33d7" + sha256 sonoma: "6ba628acde26d8a0b2c90c235cbb4b55739c860781a3974160556e5bfc4169f6" + sha256 arm64_linux: "a44f21e2d862608a8087a7ec516b56d181ebdf61246c2ac7c21d92af9a3b38db" + sha256 x86_64_linux: "9760ecc99259186588ceccdfa3e25a12296ba01b852c2c3411c2c7eeadc3e0ee" + end + + deprecate! date: "2025-10-28", because: "uses deprecated node@20" + + depends_on "cmake" => :build + depends_on "ninja" => :build + # Using Node 20 due to issue with N-API 10 https://github.com/murat-dogan/node-datachannel/issues/333 + # and unable to use newer node-datachannel https://github.com/ThaUnknown/webrtc-polyfill/issues/9 + depends_on "node@20" + + def install + # Workaround for CMake 4 until node-datachannel -> libdatachannel -> plog is updated + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + nm = libexec/"lib/node_modules/webtorrent-cli/node_modules" + + # Remove node-datachannel dev dependencies which were installed via + # `npm install --ignore-scripts --production=false` to build node-datachannel.node + # Also remove prebuild-install which was needed at install time due to install script + node_domexception = nm/"node-datachannel/node_modules/node-domexception" + rm_r(nm.glob("node-datachannel/node_modules/*") - [node_domexception]) + odie "node-domexception not found! Check if it is still a dependency." unless node_domexception.exist? + + # Remove node-datachannel CMake build directory other than the final binary + node_datachannel_release_dir = nm/"node-datachannel/build/Release" + rm_r(nm.glob("node-datachannel/build/*") - [node_datachannel_release_dir]) + odie "node-datachannel.node not found!" if node_datachannel_release_dir.glob("*.node").empty? + + # Remove incompatible pre-built binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + platforms = ["#{os}-#{arch}"] + platforms << "#{os}-x64+arm64" if OS.mac? + pb = nm/"{bare-fs,bare-os,bare-url,bufferutil,fs-native-extensions,utp-native,utf-8-validate}" + libexec.glob(pb/"prebuilds/*").each do |dir| + rm_r(dir) if platforms.exclude?(dir.basename.to_s) + dir.glob("*.musl.node").map(&:unlink) if OS.linux? + end + + # Replace universal binaries with native slices + deuniversalize_machos + end + + test do + magnet_uri = <<~EOS.gsub(/\s+/, "").strip + magnet:?xt=urn:btih:9eae210fe47a073f991c83561e75d439887be3f3 + &dn=archlinux-2017.02.01-x86_64.iso + &tr=udp://tracker.archlinux.org:6969 + &tr=https://tracker.archlinux.org:443/announce + EOS + + expected_output_raw = <<~JSON + { + "xt": "urn:btih:9eae210fe47a073f991c83561e75d439887be3f3", + "dn": "archlinux-2017.02.01-x86_64.iso", + "tr": [ + "https://tracker.archlinux.org:443/announce", + "udp://tracker.archlinux.org:6969" + ], + "infoHash": "9eae210fe47a073f991c83561e75d439887be3f3", + "name": "archlinux-2017.02.01-x86_64.iso", + "announce": [ + "https://tracker.archlinux.org:443/announce", + "udp://tracker.archlinux.org:6969" + ], + "urlList": [] + } + JSON + expected_json = JSON.parse(expected_output_raw) + actual_output_raw = shell_output("#{bin}/webtorrent info '#{magnet_uri}'") + actual_json = JSON.parse(actual_output_raw) + assert_equal expected_json["tr"].to_set, actual_json["tr"].to_set + assert_equal expected_json["announce"].to_set, actual_json["announce"].to_set + end +end diff --git a/Formula/w/weechat.rb b/Formula/w/weechat.rb new file mode 100644 index 0000000000000..5692c36079cdb --- /dev/null +++ b/Formula/w/weechat.rb @@ -0,0 +1,65 @@ +class Weechat < Formula + desc "Extensible IRC client" + homepage "https://weechat.org/" + url "https://weechat.org/files/src/weechat-4.7.1.tar.xz" + sha256 "e83fb71ca251c5dd74bd9c5a6bd3f85dc2eb8ecec0955f43c07f3e0911edb7d3" + license "GPL-3.0-or-later" + head "https://github.com/weechat/weechat.git", branch: "main" + + bottle do + rebuild 2 + sha256 arm64_tahoe: "fe6fb4efbc0764836f935f9674f3862680b2bd12f6bace6ee4e30b3194f208c8" + sha256 arm64_sequoia: "18bca2597fe1656b6ce052100e48aa8d1407639d3929be7abf0c71660e0741a3" + sha256 arm64_sonoma: "cba7ea407e89e6bb935dd5f10b07effc98a5e5ebff117e4ea04b8295c3b9bc3e" + sha256 sonoma: "9cd8969995a1431bf6a5ca25a1e8650ba78d14fe166f65edc78b80a3a622df04" + sha256 arm64_linux: "daf430902f3c7a1a46696f127fb36330b64cf628fdf40a049d1811607d12af31" + sha256 x86_64_linux: "8e0eae0c7cddd2d0080d4e8606b03f326df81b323221721b2f149604dc0fe39b" + end + + depends_on "asciidoctor" => :build + depends_on "cmake" => :build + depends_on "gettext" => :build # for xgettext + depends_on "pkgconf" => :build + depends_on "aspell" + depends_on "cjson" + depends_on "gnutls" + depends_on "libgcrypt" + depends_on "lua" + depends_on "ncurses" + depends_on "perl" + depends_on "python@3.14" + depends_on "ruby" + depends_on "tcl-tk" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "libgpg-error" + end + + def install + tcltk = Formula["tcl-tk"] + args = %W[ + -DENABLE_MAN=ON + -DENABLE_GUILE=OFF + -DCA_FILE=#{Formula["gnutls"].pkgetc}/cert.pem + -DENABLE_JAVASCRIPT=OFF + -DENABLE_PHP=OFF + -DTCL_INCLUDE_PATH=#{tcltk.opt_include}/tcl-tk + -DTCL_LIBRARY=#{tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major_minor}")} + -DTK_INCLUDE_PATH=#{tcltk.opt_include}/tcl-tk + -DTK_LIBRARY=#{tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major}tk#{tcltk.version.major_minor}")} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"weechat", "-r", "/quit" + end +end diff --git a/Formula/w/weggli.rb b/Formula/w/weggli.rb new file mode 100644 index 0000000000000..08b129463e518 --- /dev/null +++ b/Formula/w/weggli.rb @@ -0,0 +1,38 @@ +class Weggli < Formula + desc "Fast and robust semantic search tool for C and C++ codebases" + homepage "https://github.com/weggli-rs/weggli" + url "https://github.com/weggli-rs/weggli/archive/refs/tags/v0.2.4.tar.gz" + sha256 "12fde9a0dca2852d5f819eeb9de85c4d11c5c384822f93ac66b2b7b166c3af78" + license "Apache-2.0" + head "https://github.com/weggli-rs/weggli.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3fc8c3f005f10421cca236fb2992ff2d7a8fa9470be9fd5e30d51d667a95971f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab791d77777007ec1ce49438d30a79c424b97fd64434b8f42f439cffaf439bc7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "64c0f26ea39b8458017d80fffa9e632650b9fdb97ce8ae1cc69128ba68898308" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b85863bb8393ee053190a070ec0fcc44d7d7c78709df4f50e4811301edcf7652" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1d71e7a726a9745ad22a4a7db9beec29730d0147b49088614a4dda3ad16da59f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7035dc61b7193c31af0c5e50e655b73b219e67accb597eb937f8bcada03e770b" + sha256 cellar: :any_skip_relocation, sonoma: "1977c0e4e4ba9d419f965e47555703b4fa371eafc5e19e7ba4fe1b300345d434" + sha256 cellar: :any_skip_relocation, ventura: "b2ec4a783dad5f1169dc0b1f70ecb6038632297e82ffea4e70c94d07ec1a1c7f" + sha256 cellar: :any_skip_relocation, monterey: "58fd6b690d5a4a5a92660d701c2e6627e9e9076a5c935e24298d2123227ce723" + sha256 cellar: :any_skip_relocation, big_sur: "f4f54dbc53220583652199f660a9cf93abcb084042b5e6a9744cd6fe5fdefb95" + sha256 cellar: :any_skip_relocation, catalina: "7b448b48f07b5666060ac479e17315929c0cac62da574a9a0807728e189231ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "22d412eca6bf9763cd1ceb157f093c5c36b8edd18744eb4fa3f9d34df36d44bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "070a5c12e89cdbd218bb7a07903f58718bbd83abeb6dfeb58f6b8d7cdd1077ff" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.c").write("void foo() {int bar=10+foo+bar;}") + system bin/"weggli", "{int $a = _+foo+$a;}", testpath/"test.c" + end +end diff --git a/Formula/w/wego.rb b/Formula/w/wego.rb new file mode 100644 index 0000000000000..61e8ded367558 --- /dev/null +++ b/Formula/w/wego.rb @@ -0,0 +1,32 @@ +class Wego < Formula + desc "Weather app for the terminal" + homepage "https://github.com/schachmat/wego" + url "https://github.com/schachmat/wego/archive/refs/tags/2.3.tar.gz" + sha256 "6a7501ab537709d1d9fc04f14e5a2c5a8f99309591a8dae75260caf4a74ce567" + license "ISC" + head "https://github.com/schachmat/wego.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2c85e758198c227e569544729dfc874fab8662528cd969a9634deeff13b24438" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c018b940e572be3adf5d7813f7bef94a36ffe8733bd8afadb53e115de28b7a2c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a72b006e5227806f20935e88d2f8eb85617f32fe1c56904acb986305157885c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a72b006e5227806f20935e88d2f8eb85617f32fe1c56904acb986305157885c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3a72b006e5227806f20935e88d2f8eb85617f32fe1c56904acb986305157885c" + sha256 cellar: :any_skip_relocation, sonoma: "b6d7829893896b8576788a0d7df2f95c59c4ca98df57af9a66f87547a14d01a3" + sha256 cellar: :any_skip_relocation, ventura: "b6d7829893896b8576788a0d7df2f95c59c4ca98df57af9a66f87547a14d01a3" + sha256 cellar: :any_skip_relocation, monterey: "b6d7829893896b8576788a0d7df2f95c59c4ca98df57af9a66f87547a14d01a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "de837fb971e18f6b3763b0be2178b476699c76697e83b83156d857208650bf97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5028e25c825625552b1788d3ce16572f52eeff6837c983279b1f5c10b44ff74e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + ENV["WEGORC"] = testpath/".wegorc" + assert_match(/No .*API key specified./, shell_output("#{bin}/wego 2>&1", 1)) + end +end diff --git a/Formula/w/weighttp.rb b/Formula/w/weighttp.rb new file mode 100644 index 0000000000000..fc71c5cdb5e95 --- /dev/null +++ b/Formula/w/weighttp.rb @@ -0,0 +1,35 @@ +class Weighttp < Formula + desc "Webserver benchmarking tool that supports multithreading" + homepage "https://redmine.lighttpd.net/projects/weighttp/wiki" + url "https://github.com/lighttpd/weighttp/archive/refs/tags/weighttp-0.5.tar.gz" + sha256 "5900600cc108041d0e38abd02354d7d3b14649c827c4266c0d550b87904f1141" + license "MIT" + head "https://git.lighttpd.net/lighttpd/weighttp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5a9431eb7d71f87319baec3ba54e3d6e9bcb971d0356ed14928fb382593c1a9d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "747f42a474d5c96eb75aa6d3f26dd2871d4df6f4d81b183331fd884fa3494548" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed5486cf450787db1c33a75595384abb0be250d3f7f1e72acca58f2a917dd653" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6598256aa773c154c7d1583f35350c8e79bda87113d10010560f026b4f71dbb8" + sha256 cellar: :any_skip_relocation, sonoma: "29aa4d4033b8d42c0d19775341bb677ed2ad36a76c63560b5f30f6c14a92a6e2" + sha256 cellar: :any_skip_relocation, ventura: "f8b15a0b7e333586d24a4b6dd1993bfa45b0b95a173b620210016e13aba538da" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a163f9c93a97ef7facda6ceb7e353d18d4467bba6649c7ec5ea99659f53559c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07a8f6aaec0a3cd34539dc74acb30d4ca3d392b70e1ca89342545ee7830aa343" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libev" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # Stick with HTTP to avoid 'error: no ssl support yet' + system bin/"weighttp", "-n", "1", "http://redmine.lighttpd.net/projects/weighttp/wiki" + end +end diff --git a/Formula/w/wemux.rb b/Formula/w/wemux.rb new file mode 100644 index 0000000000000..153fccc7b171f --- /dev/null +++ b/Formula/w/wemux.rb @@ -0,0 +1,45 @@ +class Wemux < Formula + desc "Enhances tmux's to provide multiuser terminal multiplexing" + homepage "https://github.com/zolrath/wemux" + url "https://github.com/zolrath/wemux/archive/refs/tags/v3.2.0.tar.gz" + sha256 "8de6607df116b86e2efddfe3740fc5eef002674e551668e5dde23e21b469b06c" + license "MIT" + head "https://github.com/zolrath/wemux.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "41e9a8eaac236f236653d1867f1b5de10a03d5de49e1764628284742dc27bc24" + end + + depends_on "tmux" + + def install + inreplace "wemux", "/usr/local/etc", etc + bin.install "wemux" + man1.install "man/wemux.1" + etc.install "wemux.conf.example" => "wemux.conf" + end + + def post_install + inreplace etc/"wemux.conf", "change_this", ENV["USER"], audit_result: false + end + + def caveats + <<~EOS + Your current user account has been automatically added as a wemux host. + + To give a user the ability to host wemux sessions add them to the + host_list array in: + #{etc}/wemux.conf + + Either edit the file in your text editor of choice or run `wemux conf` to + open the file in your $EDITOR. + EOS + end + + test do + system bin/"wemux", "help" + end +end diff --git a/Formula/w/werf.rb b/Formula/w/werf.rb new file mode 100644 index 0000000000000..43eb5d8e913a5 --- /dev/null +++ b/Formula/w/werf.rb @@ -0,0 +1,92 @@ +class Werf < Formula + desc "Consistent delivery tool for Kubernetes" + homepage "https://werf.io/" + url "https://github.com/werf/werf/archive/refs/tags/v2.48.3.tar.gz" + sha256 "c92980c17443afbe893a49c83c6d43e9fd03eaecbeae9b8610d8fbac4aba7958" + license "Apache-2.0" + head "https://github.com/werf/werf.git", branch: "main" + + # This repository has some tagged versions that are higher than the newest + # stable release (e.g., `v1.5.2`) and the `GithubLatest` strategy is + # currently necessary to identify the correct latest version. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b6fb2cc3e9c3e4bbc5480b77d99161280833281f5e222b3bd18d82d9cd681473" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f32c9203307ac16f68826bd12c0c73671ea1953a768135a3cd80352699c910a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f847b07775afebf06dba98312177f104fc566796e178ccad32099cb8744fb1f" + sha256 cellar: :any_skip_relocation, sonoma: "6ce3a6895c9e397b5617308d9ff99609c7d74949a1512d4369cbd4f9caf18c97" + sha256 cellar: :any_skip_relocation, arm64_linux: "24a6d0b9e3c5d7b7798f5377b720dd182deb377b9fef4d954742b9670486316b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22c8edb345d9f1fa4f5559b859ed33b3c2ef640a44cbe31a73aac025921ec40d" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "btrfs-progs" + depends_on "device-mapper" + end + + def install + ENV["CGO_ENABLED"] = "1" + + if OS.linux? + ldflags = %W[ + -linkmode external + -extldflags=-static + -s -w + -X github.com/werf/werf/v2/pkg/werf.Version=#{version} + ] + tags = %w[ + dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp + osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build + ] + else + ldflags = "-s -w -X github.com/werf/werf/v2/pkg/werf.Version=#{version}" + tags = "dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp" + end + + system "go", "build", *std_go_args(ldflags:, tags:), "./cmd/werf" + + generate_completions_from_executable(bin/"werf", "completion") + end + + test do + werf_config = testpath/"werf.yaml" + werf_config.write <<~YAML + configVersion: 1 + project: quickstart-application + --- + image: vote + dockerfile: Dockerfile + context: vote + --- + image: result + dockerfile: Dockerfile + context: result + --- + image: worker + dockerfile: Dockerfile + context: worker + YAML + + output = <<~YAML + - image: result + - image: vote + - image: worker + YAML + + system "git", "init" + system "git", "add", werf_config + system "git", "commit", "-m", "Initial commit" + + assert_equal output, + shell_output("#{bin}/werf config graph").lines.sort.join + + assert_match version.to_s, shell_output("#{bin}/werf version") + end +end diff --git a/Formula/w/west.rb b/Formula/w/west.rb new file mode 100644 index 0000000000000..dcb148d42b5c6 --- /dev/null +++ b/Formula/w/west.rb @@ -0,0 +1,80 @@ +class West < Formula + include Language::Python::Virtualenv + + desc "Zephyr meta-tool" + homepage "https://github.com/zephyrproject-rtos/west" + url "https://files.pythonhosted.org/packages/54/8e/ddb81e2635e58d156092556934a2cffe245978c91e4a08e11d72591f46e4/west-1.5.0.tar.gz" + sha256 "7088fe0e9afe0719ebee95c51c529149f7bcfc919d83a8206d35fa9c683ed0a5" + license "Apache-2.0" + head "https://github.com/zephyrproject-rtos/west.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f870725d0d96ad5062cedb8513fd3ba49aaa38cae49d98dbf54610bbe61ca460" + sha256 cellar: :any, arm64_sequoia: "9b43c9ab44bcf6038552240e59c14530451e3b6a39fa36ba6bd83cb1e2859842" + sha256 cellar: :any, arm64_sonoma: "22dd84e3fe1cad6e81fe1e333212ef5eb28c6dce4d9de0c7234255714cb24e78" + sha256 cellar: :any, sonoma: "b00b0d9a49752f758cb38f4a38503f927c545f5e330557299f3ca7d3d14ee491" + sha256 cellar: :any_skip_relocation, arm64_linux: "aebbd91683301166bb13c402192372c33949595503c00afc1ee93b4f0b27920d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95330775a87e799568bbb903db4c95534fd1ff4c6f3335aa0c06c4244a5b104a" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pykwalify" do + url "https://files.pythonhosted.org/packages/d5/77/2d6849510dbfce5f74f1f69768763630ad0385ad7bb0a4f39b55de3920c7/pykwalify-1.8.0.tar.gz" + sha256 "796b2ad3ed4cb99b88308b533fb2f559c30fa6efb4fa9fda11347f483d245884" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz" + sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + def install + virtualenv_install_with_resources + end + + test do + mkdir testpath/"west" do + mkdir "test-project" + (testpath/"west/test-project/west.yml").write <<~YAML + manifest: + self: + path: test-project + YAML + system bin/"west", "init", "-l", testpath/"west/test-project" + assert_path_exists testpath/"west/.west" + end + end +end diff --git a/Formula/w/wfa2-lib.rb b/Formula/w/wfa2-lib.rb new file mode 100644 index 0000000000000..058881456ef40 --- /dev/null +++ b/Formula/w/wfa2-lib.rb @@ -0,0 +1,38 @@ +class Wfa2Lib < Formula + desc "Wavefront alignment algorithm library v2" + homepage "https://github.com/smarco/WFA2-lib" + url "https://github.com/smarco/WFA2-lib/archive/refs/tags/v2.3.5.tar.gz" + sha256 "2609d5f267f4dd91dce1776385b5a24a2f1aa625ac844ce0c3571c69178afe6e" + license "MIT" + head "https://github.com/smarco/WFA2-lib.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b0b6df4465be30f02a3550699339f680c3820ab31214f5134e1aacb3ac3939e0" + sha256 cellar: :any, arm64_sequoia: "1b837b83b531386b7c1812a251f2eb030761e51799f4c812b8428844219cc670" + sha256 cellar: :any, arm64_sonoma: "fa2570af22fdf64cd38c65d1835596370dee30ca4f8c93beae65082d171ad0d0" + sha256 cellar: :any, arm64_ventura: "c2b2cd3b72cad2bc5f8444f748310bd3ea87c2b8f5fc7d61892e9afb82991bc3" + sha256 cellar: :any, sonoma: "19a6a9bcef73e9d4ab9499360046695c51e256e45f34aa20509aa67672ebd38d" + sha256 cellar: :any, ventura: "22063cfd7b43825c734ed23deecc19193774a819ea75e29d3b27b84e8b67f905" + sha256 cellar: :any_skip_relocation, arm64_linux: "353ef4fd445ba3aa0fc83ead45dcdf670e8d864fbbe594bdd15794f638b2c53e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f2df560ffb8551153a89a0c9ee9be215798c7adbac8f075ca8650538f7b20a7" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + on_macos do + depends_on "libomp" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", "-DOPENMP=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + system ENV.cc, pkgshare/"examples/wfa_basic.c", "-o", "test", "-I#{include}/wfa2lib", "-L#{lib}", "-lwfa2", "-lm" + assert_match "WFA-Alignment returns score -24", shell_output("./test 2>&1") + end +end diff --git a/Formula/w/wgcf.rb b/Formula/w/wgcf.rb new file mode 100644 index 0000000000000..d1f8dd961b896 --- /dev/null +++ b/Formula/w/wgcf.rb @@ -0,0 +1,31 @@ +class Wgcf < Formula + desc "Generate WireGuard profile from Cloudflare Warp account" + homepage "https://github.com/ViRb3/wgcf" + url "https://github.com/ViRb3/wgcf/archive/refs/tags/v2.2.29.tar.gz" + sha256 "25bd436c3d0919c8e76a2e31806520c401c9561663946951746d4027a7fab96a" + license "MIT" + head "https://github.com/ViRb3/wgcf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ba799c69141d00580e0b958f56c0a3af8b1dc8e0ce8951e40dd3bc634af35574" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2d96ee5fd4aa174e7b9359a066fd9debdfcd3a7f6a02530fe30d35a410d1530" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c2d96ee5fd4aa174e7b9359a066fd9debdfcd3a7f6a02530fe30d35a410d1530" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c2d96ee5fd4aa174e7b9359a066fd9debdfcd3a7f6a02530fe30d35a410d1530" + sha256 cellar: :any_skip_relocation, sonoma: "47628a8d27650cbb1bf170fe9483c572e720e92aaefd8c0eab5e5b73afa573b2" + sha256 cellar: :any_skip_relocation, ventura: "47628a8d27650cbb1bf170fe9483c572e720e92aaefd8c0eab5e5b73afa573b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d66b38508019bc88af75c9ae9080316ecbd6755b8bb7041eab3746774543abe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c71ca47de68b992c0f2db9643994547cdaf63fa15810098257552cae6ee747e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"wgcf", "completion") + end + + test do + system bin/"wgcf", "trace" + end +end diff --git a/Formula/w/wget.rb b/Formula/w/wget.rb new file mode 100644 index 0000000000000..536663bd94eca --- /dev/null +++ b/Formula/w/wget.rb @@ -0,0 +1,60 @@ +class Wget < Formula + desc "Internet file retriever" + homepage "https://www.gnu.org/software/wget/" + url "https://ftpmirror.gnu.org/gnu/wget/wget-1.25.0.tar.gz" + sha256 "766e48423e79359ea31e41db9e5c289675947a7fcf2efdcedb726ac9d0da3784" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "8cbb5d277cd207e543c9b2e75953e89c7cc89105b2322f3ce652616c5d0f62fe" + sha256 arm64_sequoia: "a93dd95c5d63036e026b526e000d33fae7fb44d9a8fda5afc89bff112438c6b3" + sha256 arm64_sonoma: "4d180cd4ead91a34e2c2672189fc366b87ae86e6caa3acbf4845b272f57c859a" + sha256 arm64_ventura: "7fce09705a52a2aff61c4bdd81b9d2a1a110539718ded2ad45562254ef0f5c22" + sha256 sonoma: "5650778a8e7a60c2dea9412dd21d2f5e8ff4f224dbefbdf54924b99012062edc" + sha256 ventura: "78cee523a9b58a7b824b51767935f68c9838e9f673e70d001982858001e766ff" + sha256 arm64_linux: "2f06529fc47fa99e9d4a5ebd19f25c046dda236278c7c5979e080ad7e5387236" + sha256 x86_64_linux: "ab5f3c1c60bef4e2a4781e9b29af8afb48ead837136c419edd7febdf44b59058" + end + + head do + url "https://git.savannah.gnu.org/git/wget.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "xz" => :build + end + + depends_on "pkgconf" => :build + depends_on "libidn2" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "libunistring" + end + + on_linux do + depends_on "util-linux" + end + + def install + system "./bootstrap", "--skip-po" if build.head? + system "./configure", "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--with-ssl=openssl", + "--with-libssl-prefix=#{Formula["openssl@3"].opt_prefix}", + "--disable-pcre", + "--disable-pcre2", + "--without-libpsl", + "--without-included-regex" + system "make", "install" + end + + test do + system bin/"wget", "-O", File::NULL, "https://google.com" + end +end diff --git a/Formula/w/wget2.rb b/Formula/w/wget2.rb new file mode 100644 index 0000000000000..211bc495df35e --- /dev/null +++ b/Formula/w/wget2.rb @@ -0,0 +1,72 @@ +class Wget2 < Formula + desc "Successor of GNU Wget, a file and recursive website downloader" + homepage "https://gitlab.com/gnuwget/wget2" + url "https://ftpmirror.gnu.org/gnu/wget/wget2-2.2.0.tar.gz" + sha256 "2b3b9c85b7fb26d33ca5f41f1f8daca71838d869a19b406063aa5c655294d357" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url :stable + regex(/href=.*?wget2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "02f865ef13cd93291ae12b59dac0eb9c883c9078430e63ba1176bc82b27c911b" + sha256 arm64_sequoia: "b863537174ece79da6195e2ac5707cd31488d58088bdccb573e189aa75153bff" + sha256 arm64_sonoma: "99190ec35480c9addfc7d84e5a026eceb272213914048503ec9c21c5385990cf" + sha256 arm64_ventura: "c707efb734c4e2338ec805111837642cf423a7aab4439f4743bdcb9bccfd46e7" + sha256 sonoma: "fb4276bbc11f84ce2d2b98daf426fd4a1b1aa5ffd10973f3f07d868429059ab3" + sha256 ventura: "b0ef99e0d7383df8316c5284d7ff38d02415f6cae006aad83ffe21e078262069" + sha256 arm64_linux: "7c20c1db23e50bdc5fdb67333ea80ed932235f79b2a82c28afe92e621a5667d2" + sha256 x86_64_linux: "a6580c39554f67d8db6d5817945792dc48c0c9e648d39043aa9bb4fc314e171c" + end + + depends_on "doxygen" => :build + depends_on "graphviz" => :build + depends_on "lzlib" => :build # static lib + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + depends_on "texinfo" => :build # Build fails with macOS-provided `texinfo` + + depends_on "brotli" + depends_on "gnutls" + depends_on "gpgme" + depends_on "libidn2" + depends_on "libnghttp2" + depends_on "libpsl" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "gnu-sed" => :build + depends_on "gettext" + end + + def install + # The pattern used in 'docs/wget2_md2man.sh.in' doesn't work with system sed + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + lzlib = Formula["lzlib"] + ENV.append "LZIP_CFLAGS", "-I#{lzlib.include}" + ENV.append "LZIP_LIBS", "-L#{lzlib.lib} -llz" + + args = %w[ + --disable-silent-rules + --with-bzip2 + --with-lzma + ] + args << "--with-libintl-prefix=#{Formula["gettext"].prefix}" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/wget2 --version") + end +end diff --git a/Formula/w/wgetpaste.rb b/Formula/w/wgetpaste.rb new file mode 100644 index 0000000000000..a787922e89f7b --- /dev/null +++ b/Formula/w/wgetpaste.rb @@ -0,0 +1,24 @@ +class Wgetpaste < Formula + desc "Automate pasting to a number of pastebin services" + homepage "https://wgetpaste.zlin.dk/" + url "https://github.com/zlin/wgetpaste/releases/download/2.34/wgetpaste-2.34.tar.xz" + sha256 "bd6d06ed901a3d63c9c8c57126084ff0994f09901bfb1638b87953eac1e9433f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "19eda68054f097182aff7eefd0edd7cb34b02d1e380b74c01cc6523d5bbcd137" + end + + depends_on "wget" + + def install + bin.install "wgetpaste" + zsh_completion.install "_wgetpaste" + end + + test do + system bin/"wgetpaste", "-S" + end +end diff --git a/Formula/w/wgo.rb b/Formula/w/wgo.rb new file mode 100644 index 0000000000000..8bb5fbd001563 --- /dev/null +++ b/Formula/w/wgo.rb @@ -0,0 +1,27 @@ +class Wgo < Formula + desc "Watch arbitrary files and respond with arbitrary commands" + homepage "https://github.com/bokwoon95/wgo" + url "https://github.com/bokwoon95/wgo/archive/refs/tags/v0.6.2.tar.gz" + sha256 "7ed3ac185905dad49f7e042369070e9e4c98681334c940d15b5774125bf6a64a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6863cc6d3ff05e1803b438f841c4cf8be619571911f2c81939af1c4526ac5a09" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6863cc6d3ff05e1803b438f841c4cf8be619571911f2c81939af1c4526ac5a09" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6863cc6d3ff05e1803b438f841c4cf8be619571911f2c81939af1c4526ac5a09" + sha256 cellar: :any_skip_relocation, sonoma: "de09ebfaa1f43c99d398967abf460982b7ea9b9e437140e1d26cb40d4418de13" + sha256 cellar: :any_skip_relocation, arm64_linux: "c22551f6173f90689f0069fbc5951e0f0b8d89312e5258c7de43b1dea83f9cbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54476182719c2e80813478eba5dd13ab443a74f792b9922a730e5afeffb6b46e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/wgo -exit echo testing") + assert_match "testing", output + end +end diff --git a/Formula/w/wgpu-native.rb b/Formula/w/wgpu-native.rb new file mode 100644 index 0000000000000..dcd5fa8fa2186 --- /dev/null +++ b/Formula/w/wgpu-native.rb @@ -0,0 +1,55 @@ +class WgpuNative < Formula + desc "Native WebGPU implementation based on wgpu-core" + homepage "https://github.com/gfx-rs/wgpu-native" + url "https://github.com/gfx-rs/wgpu-native.git", + tag: "v27.0.2.0", + revision: "74f8c24c903b6352d09f1928c56962ce06f77a4d" + license "Apache-2.0" + head "https://github.com/gfx-rs/wgpu-native.git", branch: "trunk" + + bottle do + sha256 cellar: :any, arm64_tahoe: "cc3cc51cefc8f7e27d4c3f7b590cb424c9fb45955ebba0e95dcd3f885efd8d3f" + sha256 cellar: :any, arm64_sequoia: "6583720163db34f650f9fe5ec6030a176b3bc416c8f426ed86ee266e6ae9f74e" + sha256 cellar: :any, arm64_sonoma: "143cfac873e263e3842b6d76ec3a28c317eef445e11843e738d769c840ba5d38" + sha256 cellar: :any, sonoma: "c24675a336757b536c01bab7e763fa3af001f9354e2a622dfab4d9a8c673cfe2" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac6f17226a9bc9fa18bbb9bfedf8653bdc1f97121eabaf4575bf969264c6d900" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff6832fbda2bdacd4f36411bd4007b9c19b600b60011e0a0fd0da0487174dbfa" + end + + depends_on "rust" => :build + depends_on "cmake" => :test + depends_on "ninja" => :test + uses_from_macos "llvm" => :build + + def install + ENV["LIBCLANG_PATH"] = Formula["llvm"].opt_lib.to_s if OS.linux? + # Not using `cargo install` because wgpu-native doesn't ship binaries + system "cargo", "build", "--jobs", ENV.make_jobs, "--lib", "--release", "--locked" + + # Manually install artifacts + include.install "ffi/webgpu-headers/webgpu.h" + include.install "ffi/wgpu.h" + (include/"webgpu-headers").install_symlink "../webgpu.h" => "webgpu.h" + + lib.install "target/release/#{shared_library("libwgpu_native")}" + lib.install "target/release/libwgpu_native.a" + + # Install examples for sake of testing + rm_r "examples/vendor" + inreplace "examples/CMakeLists.txt", "add_subdirectory(vendor/glfw)", "" + pkgshare.install "examples" + end + + test do + system "cmake", "-G", "Ninja", + "-S", pkgshare/"examples", + "-B", "build", + "-DCMAKE_BUILD_TYPE=Release" + system "cmake", "--build", "build", "--target", "compute" + # Running the built example fails in CI. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] && (OS.linux? || Hardware::CPU.intel?) + + cp pkgshare/"examples/compute/shader.wgsl", "." + assert_match "times: [0, 1, 7, 2]", shell_output("./build/compute/compute") + end +end diff --git a/Formula/w/whalebrew.rb b/Formula/w/whalebrew.rb new file mode 100644 index 0000000000000..49b8b02661836 --- /dev/null +++ b/Formula/w/whalebrew.rb @@ -0,0 +1,48 @@ +class Whalebrew < Formula + desc "Homebrew, but with Docker images" + homepage "https://github.com/whalebrew/whalebrew" + url "https://github.com/whalebrew/whalebrew/archive/refs/tags/0.5.0.tar.gz" + sha256 "2abea4171dbdca429b6476cffdfe7c94ce27028dc5d96e0f3a9a4fdeab77c4fb" + license "Apache-2.0" + head "https://github.com/whalebrew/whalebrew.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb728eba208967ac3e5cf1b32b986f117a2bc3e919e5e5a1544b6227e221f87a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "301d2f38ace71c39fa8acff98d09b240b469a64c71e0a2105f0632ca2795b950" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b20f0a59b4ddca952293210217096767bbf3641eeaf8a20d783479ec2d23029" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b9a806bb5c88d5074e037c34d4f1070b24a3c709a6c12997c256a68c12eaf44" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e3afe9d7ab8ff22f8e394da65c9f58bc4b495dd758a19c27a6d0b5961f017885" + sha256 cellar: :any_skip_relocation, sonoma: "e73f77883a8b321bcebdf5829211ae1d62c89633d760ec77cdfee6010665b681" + sha256 cellar: :any_skip_relocation, ventura: "0cf1db6078f81c0139448aa53137190bb3396da6b1645632b04031e102d141e3" + sha256 cellar: :any_skip_relocation, monterey: "ed592d731941336ccb5c3200f54e4557af185839a883dbe38f3882eb8e7f34b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a3e3fd5d504cfcb096087e8bb99e955f02d5c971b26a984a0051f51deb52aa0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afe4b4c69e9b76da440101b3fc26cf623bf391ba23d1e5d64394f770a7776b86" + end + + depends_on "go" => :build + depends_on "docker" => :test + + # Run "go mod tidy": https://github.com/whalebrew/whalebrew/pull/299 + patch do + url "https://github.com/whalebrew/whalebrew/commit/f64b9db9a5f1c91571a622a58eb93233f8c59642.patch?full_index=1" + sha256 "62d5cb208d60ed123a5be234a1c3d48aeead703a83eb262408a101aec66bd0d6" + end + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = %W[ + -s -w + -X github.com/whalebrew/whalebrew/version.Version=#{version}+homebrew + ] + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"whalebrew", "completion") + end + + test do + assert_match "Whalebrew #{version}+homebrew", shell_output("#{bin}/whalebrew version") + assert_match "whalebrew/whalesay", shell_output("#{bin}/whalebrew search whalesay") + + output = shell_output("#{bin}/whalebrew install whalebrew/whalesay -y 2>&1", 255) + assert_match(/connect to the Docker daemon|operation not permitted/, output) + end +end diff --git a/Formula/w/whatmask.rb b/Formula/w/whatmask.rb new file mode 100644 index 0000000000000..dc133a2597775 --- /dev/null +++ b/Formula/w/whatmask.rb @@ -0,0 +1,50 @@ +class Whatmask < Formula + desc "Network settings helper" + homepage "http://www.laffeycomputer.com/whatmask.html" + url "https://web.archive.org/web/20170107110521/downloads.laffeycomputer.com/current_builds/whatmask/whatmask-1.2.tar.gz" + sha256 "7dca0389e22e90ec1b1c199a29838803a1ae9ab34c086a926379b79edb069d89" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a035d42b3734e84e406d28c3bcb1bddfb63f8551c4aaec6bfe3c9e049928e45e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e13cae4bd5bb9c3c7c907b83a0f614f39b7170f7b46c28ce9f63785585f9c7d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "106997f1c14a81903f0c3078308437938af0fded133488f5c7de9fd90cc4cbdc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "93e5d651f3376c9194a94a3afa5dc7860bbe55ac675339e6c2d9951f57d1b075" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a5bf6f569bef04d197a6eb0c097450e65dcb5082b65ecc82201e15eb873ae755" + sha256 cellar: :any_skip_relocation, sonoma: "8f66009407001342b73c1c144b306fdef7c0aa92affb9cd2e16729c199e30781" + sha256 cellar: :any_skip_relocation, ventura: "3a4ce45700a842a5db81df3403ddeac637a368cb6a0ddd514975fa9cb53381bb" + sha256 cellar: :any_skip_relocation, monterey: "dedc8e95cb750f18d6b8f03505387a17cc88753810f4e052b30b33126d9a8b8b" + sha256 cellar: :any_skip_relocation, big_sur: "55789adc6a9326b814965c6c0fcf41f912638f2e7d55d4167cbe404ec1a6938d" + sha256 cellar: :any_skip_relocation, catalina: "89a44972f8d27003b4c91f04a294f0be9a0d00628fb8db21faf46a55a0720cb2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bb2ab87b646751414698bd1bae28cbea1eecf7c147ae6a38fd02e9f3857a1c9" + end + + deprecate! date: "2024-02-29", because: :repo_removed + disable! date: "2025-03-04", because: :repo_removed + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + # The included ./configure file is too old to work with Xcode 12 + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + assert_equal <<~EOS, shell_output("#{bin}/whatmask /24") + + --------------------------------------------- + TCP/IP SUBNET MASK EQUIVALENTS + --------------------------------------------- + CIDR = .....................: /24 + Netmask = ..................: 255.255.255.0 + Netmask (hex) = ............: 0xffffff00 + Wildcard Bits = ............: 0.0.0.255 + Usable IP Addresses = ......: 254 + + EOS + end +end diff --git a/Formula/w/whatmp3.rb b/Formula/w/whatmp3.rb new file mode 100644 index 0000000000000..709985f921940 --- /dev/null +++ b/Formula/w/whatmp3.rb @@ -0,0 +1,33 @@ +class Whatmp3 < Formula + include Language::Python::Shebang + + desc "Small script to create mp3 torrents out of FLACs" + homepage "https://github.com/RecursiveForest/whatmp3" + url "https://github.com/RecursiveForest/whatmp3/archive/refs/tags/v3.9.tar.gz" + sha256 "4ee468ff5a380c3ee4dbfadfd25ac76797ac63203b21588a997f339e124559f4" + license "MIT" + head "https://github.com/RecursiveForest/whatmp3.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d2a7f02319c285fdb7f1ecd703b2ac07721c727bb2611cef1767d8c36115dfa2" + end + + depends_on "flac" + depends_on "lame" + depends_on "mktorrent" + + uses_from_macos "python" + + def install + system "make", "PREFIX=#{prefix}", "install" + + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"whatmp3" + end + + test do + (testpath/"flac").mkpath + cp test_fixtures("test.flac"), "flac" + system bin/"whatmp3", "--notorrent", "--V0", "flac" + assert_path_exists testpath/"V0/test.mp3" + end +end diff --git a/Formula/w/when.rb b/Formula/w/when.rb new file mode 100644 index 0000000000000..be8202a86a645 --- /dev/null +++ b/Formula/w/when.rb @@ -0,0 +1,38 @@ +class When < Formula + desc "Tiny personal calendar" + homepage "https://www.lightandmatter.com/when/when.html" + url "https://bitbucket.org/ben-crowell/when/get/1.1.45.tar.bz2" + sha256 "fd614afe891b6e8e7b131041176e958fe00583c8300a3523ddfb7d65692a68df" + license "GPL-2.0-only" + head "https://bitbucket.org/ben-crowell/when.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fb5fab0bd5a3c23aaac7bc49bed557d69c6e71e9691d9f855c6a30386dbe7002" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0731698fde0d9766deb700635985822f9a76e1fe3f2a18ba74f4d8badafc785" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe1d8aaf972d667b218d7698246ae443830139cb7bed81719a5c8a0bba8ed799" + sha256 cellar: :any_skip_relocation, arm64_ventura: "932e4d3a5887293dc38afaf08f11ffb073784eeaaab09828608278c0e3dd5a3a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "932e4d3a5887293dc38afaf08f11ffb073784eeaaab09828608278c0e3dd5a3a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "932e4d3a5887293dc38afaf08f11ffb073784eeaaab09828608278c0e3dd5a3a" + sha256 cellar: :any_skip_relocation, sonoma: "fe1d8aaf972d667b218d7698246ae443830139cb7bed81719a5c8a0bba8ed799" + sha256 cellar: :any_skip_relocation, ventura: "932e4d3a5887293dc38afaf08f11ffb073784eeaaab09828608278c0e3dd5a3a" + sha256 cellar: :any_skip_relocation, monterey: "932e4d3a5887293dc38afaf08f11ffb073784eeaaab09828608278c0e3dd5a3a" + sha256 cellar: :any_skip_relocation, big_sur: "932e4d3a5887293dc38afaf08f11ffb073784eeaaab09828608278c0e3dd5a3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c2be1a18694aca6968ccdba5d11fb8f6923a66c91f208ccec902b4bf51219c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d49cbde109823dc26ff8f009d3ea47ec366f0fe459e3e36373797c486fc5ab08" + end + + def install + system "make", "prefix=#{prefix}", "install" + end + + test do + (testpath/".when/preferences").write <<~EOS + calendar = #{testpath}/calendar + EOS + + (testpath/"calendar").write "2015 April 1, stay off the internet" + system bin/"when", "i" + end +end diff --git a/Formula/w/whisper-cpp.rb b/Formula/w/whisper-cpp.rb new file mode 100644 index 0000000000000..c1cd1fad15844 --- /dev/null +++ b/Formula/w/whisper-cpp.rb @@ -0,0 +1,86 @@ +class WhisperCpp < Formula + desc "Port of OpenAI's Whisper model in C/C++" + homepage "https://github.com/ggml-org/whisper.cpp" + url "https://github.com/ggml-org/whisper.cpp/archive/refs/tags/v1.8.2.tar.gz" + sha256 "bcee25589bb8052d9e155369f6759a05729a2022d2a8085c1aa4345108523077" + license "MIT" + head "https://github.com/ggml-org/whisper.cpp.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8cb50399576f2aa6a88de95f5bb7635065b0235619f8d3f196753d8009aabfd3" + sha256 cellar: :any, arm64_sequoia: "a5ae48613187e5607b0d3338e7fea58ae1107a14de85d6adb5a3f07fc49c9724" + sha256 cellar: :any, arm64_sonoma: "5d70c696e7a8e20375915f7565745d07c5d8cd2725595f172bf6cf6b46318b2e" + sha256 cellar: :any, sonoma: "48518a1190475e02f7e1f5fe9adbd813f73ff91b3fb55b1834c0ce8ac4f94ea9" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b2df7c96d567867f3114a3a4326c6d08cc37c98588cb58a0c8d6188ca296297" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4847bfe03f4be61bd1a364e6bddb259160d09de148cc870ab06058412359b57" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "sdl2" + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DGGML_METAL=#{(OS.mac? && !Hardware::CPU.intel?) ? "ON" : "OFF"} + -DGGML_METAL_EMBED_LIBRARY=#{OS.mac? ? "ON" : "OFF"} + -DGGML_NATIVE=#{build.bottle? ? "OFF" : "ON"} + -DWHISPER_SDL2=ON + -DWHISPER_BUILD_EXAMPLES=ON + -DWHISPER_BUILD_TESTS=OFF + -DWHISPER_BUILD_SERVER=OFF + ] + + # avoid installing into prefix as ggml libraries/headers would conflict with llama.cpp + # TODO: change this once ggml has releases, https://github.com/ggml-org/ggml/issues/1333 + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Expose executables and pkgconfig files + bin.install_symlink libexec.glob("bin/*") + (lib/"pkgconfig").install_symlink libexec.glob("lib/pkgconfig/*") + + pkgshare.install "models/for-tests-ggml-tiny.bin", "samples/jfk.wav" + end + + def caveats + <<~EOS + whisper-cpp requires GGML model files to work. These are not downloaded by default. + To obtain model files (.bin), visit one of these locations: + + https://huggingface.co/ggerganov/whisper.cpp/tree/main + https://ggml.ggerganov.com/ + EOS + end + + test do + model = pkgshare/"for-tests-ggml-tiny.bin" + output = shell_output("#{bin}/whisper-cli --model #{model} #{pkgshare}/jfk.wav 2>&1") + assert_match "processing '#{pkgshare}/jfk.wav' (176000 samples, 11.0 sec)", output + + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + ggml_backend_load_all(); + struct whisper_context_params cparams = whisper_context_default_params(); + struct whisper_context * ctx = whisper_init_from_file_with_params("#{model}", cparams); + assert(ctx != nullptr); + whisper_free(ctx); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs whisper").chomp.split + flags << "-Wl,-rpath,#{libexec}/lib" if OS.linux? + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/w/whisperkit-cli.rb b/Formula/w/whisperkit-cli.rb new file mode 100644 index 0000000000000..2901da1159533 --- /dev/null +++ b/Formula/w/whisperkit-cli.rb @@ -0,0 +1,39 @@ +class WhisperkitCli < Formula + desc "Swift native on-device speech recognition with Whisper for Apple Silicon" + homepage "https://github.com/argmaxinc/WhisperKit" + url "https://github.com/argmaxinc/WhisperKit/archive/refs/tags/v0.14.1.tar.gz" + sha256 "7078b55be09ef4b4c1d6274fe5a533afc3327572553f5069ff08c55ef30146b7" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "14e8eb98c98b0baf9f0359d813158894895832e9b0f8457cd53d5b95f3ceae98" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a2ad5e3f32ffff068ff94a906d52642dc2aeb360ca8472f1aaf312708b55aa4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f192a742700595743f7788d99389970f85c4127d57a90de7c5de3e778d4dbfc1" + end + + depends_on xcode: ["15.0", :build] + depends_on arch: :arm64 + depends_on :macos + depends_on macos: :ventura + + uses_from_macos "swift" + + def install + ENV["BUILD_ALL"] = "1" + system "swift", "build", "-c", "release", "--product", "whisperkit-cli", "--disable-sandbox" + bin.install ".build/release/whisperkit-cli" + generate_completions_from_executable(bin/"whisperkit-cli", "--generate-completion-script") + end + + test do + mkdir_p "#{testpath}/tokenizer" + mkdir_p "#{testpath}/model" + + test_file = test_fixtures("test.mp3") + output = shell_output("#{bin}/whisperkit-cli transcribe --model tiny --download-model-path #{testpath}/model " \ + "--download-tokenizer-path #{testpath}/tokenizer --audio-path #{test_file} --verbose") + assert_match "Transcription of test.mp3", output + end +end diff --git a/Formula/w/whistle.rb b/Formula/w/whistle.rb new file mode 100644 index 0000000000000..727001f9815c8 --- /dev/null +++ b/Formula/w/whistle.rb @@ -0,0 +1,24 @@ +class Whistle < Formula + desc "HTTP, HTTP2, HTTPS, Websocket debugging proxy" + homepage "https://github.com/avwo/whistle" + url "https://registry.npmjs.org/whistle/-/whistle-2.9.103.tgz" + sha256 "392da88ff566d7843daf80158a3d52004f8a09b7a6c656d9a9a1f3ec3a317e92" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1bf19b5fa547f48ce9837ea29c611a73bdfee5bb5e35c5bdc3eb9404ffe86233" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"package.json").write('{"name": "test"}') + system bin/"whistle", "start" + system bin/"whistle", "stop" + end +end diff --git a/Formula/w/whois.rb b/Formula/w/whois.rb new file mode 100644 index 0000000000000..897871a85e6e6 --- /dev/null +++ b/Formula/w/whois.rb @@ -0,0 +1,41 @@ +class Whois < Formula + desc "Lookup tool for domain names and other internet resources" + homepage "https://github.com/rfc1036/whois" + url "https://github.com/rfc1036/whois/archive/refs/tags/v5.6.5.tar.gz" + sha256 "99510048033408eae5cc3f1f421121a1f33147196b7017ebaace6e56352680f5" + license "GPL-2.0-or-later" + head "https://github.com/rfc1036/whois.git", branch: "next" + + bottle do + sha256 cellar: :any, arm64_tahoe: "3f7eecdec4dc6dec07980e2908f451df7a3e778fab47785fc6615c7b8db3ea72" + sha256 cellar: :any, arm64_sequoia: "46f6549d331ea0d7b316d4bdee34afc953d3b7c9e3a35bece1089d63c767f4c7" + sha256 cellar: :any, arm64_sonoma: "fdb9bc05c21e38b8121c7bb387cad4d2725f95d863b3dcbeef81d80a5ada58c9" + sha256 cellar: :any, sonoma: "fdf27190150b9938875bb51cc555559b19581cf54852275f6c014de3e5ae3432" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2f57c068b7e808b997cfbad518cd35f9543908165a29212c9c1570e3eb58cdc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4337035ef19d8e7c73f9abb7f4bbb775e888a71ad08352bd7d9450dbdaaa155" + end + + keg_only :provided_by_macos + + depends_on "pkgconf" => :build + depends_on "libidn2" + + def install + ENV.append "LDFLAGS", "-L/usr/lib -liconv" if OS.mac? + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + have_iconv = if OS.mac? + "HAVE_ICONV=1" + else + "HAVE_ICONV=0" + end + + system "make", "install-whois", "prefix=#{prefix}", have_iconv + end + + test do + system bin/"whois", "brew.sh" + end +end diff --git a/Formula/w/widelands.rb b/Formula/w/widelands.rb new file mode 100644 index 0000000000000..8ca690e960014 --- /dev/null +++ b/Formula/w/widelands.rb @@ -0,0 +1,83 @@ +class Widelands < Formula + desc "Free real-time strategy game like Settlers II" + homepage "https://www.widelands.org/" + url "https://github.com/widelands/widelands/archive/refs/tags/v1.2.1.tar.gz" + sha256 "799bfd32048ef20118c48e21f3fc843ae0451c42bb8bf2eabcb9b26bf6fe54b4" + license "GPL-2.0-or-later" + revision 1 + version_scheme 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "cc47a850f8b8fb5f406bad266b74999dc53f3c2caa04b764eb7a10b4dfd54c2f" + sha256 arm64_sequoia: "4579bc3c41f00266fe1e3a50b4f23febf356ffe7e658becd1340a9c9fb9c2b9f" + sha256 arm64_sonoma: "d795ec6cfe18efe730a1ee729d28ce329f03905c5e476fa56d01545bbc324d86" + sha256 arm64_ventura: "cc89f8628d9dbc446a7a5d4f65269eb2e720c4b0f69a922fc05f62532f8a2e04" + sha256 sonoma: "f6572c7feb4e4713414d27692883553a637aadf95ed03958f27a10bf5d0625fd" + sha256 ventura: "181a93b0acd13093356cf0d919a013dbe4ffc00019f8f3e6ae1772d5c5a24749" + sha256 arm64_linux: "6dc0a351fdca77d0ad76a78519f0582a2d452dabef0d20569daa98a420101585" + sha256 x86_64_linux: "f2d1782fc0592643d470a43c5f269bc3172e5faa05f9f83bf97e609cb6ef8e57" + end + + depends_on "asio" => :build + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + + depends_on "glew" + depends_on "icu4c@77" + depends_on "libpng" + depends_on "lua" + depends_on "minizip" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_mixer" + depends_on "sdl2_ttf" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "mesa" + end + + # Backport fix for newer asio + patch do + url "https://github.com/widelands/widelands/commit/c0b44ccc04df35a9a23ca9be3e05f5d3a5428f6f.patch?full_index=1" + sha256 "8db8447ab83e10031e0903cc0accec962f30f5b9fa31a8ce68db788efa7756b4" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DWL_INSTALL_BASEDIR=#{pkgshare}", + "-DWL_INSTALL_BINDIR=#{bin}", + "-DWL_INSTALL_DATADIR=#{pkgshare}/data", + "-DOPTION_BUILD_CODECHECK=OFF", + "-DOPTION_BUILD_TESTS=OFF", + "-DOPTION_BUILD_WEBSITE_TOOLS=OFF", + "-DPYTHON_EXECUTABLE=#{which("python3")}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + if OS.linux? + # Unable to start Widelands, because we were unable to add the home directory: + # RealFSImpl::make_directory: No such file or directory: /tmp/widelands-test/.local/share/widelands + mkdir_p ".local/share/widelands" + mkdir_p ".config/widelands" + end + + system bin/"widelands", "--version" + end +end diff --git a/Formula/w/wifi-password.rb b/Formula/w/wifi-password.rb new file mode 100644 index 0000000000000..e5611fb4a1cb0 --- /dev/null +++ b/Formula/w/wifi-password.rb @@ -0,0 +1,24 @@ +class WifiPassword < Formula + desc "Show the current WiFi network password" + homepage "https://github.com/rauchg/wifi-password" + url "https://github.com/rauchg/wifi-password/archive/refs/tags/0.1.0.tar.gz" + sha256 "6af6a34a579063eb21c067f10b7c2eb5995995eceb70e6a1f571dc78d4f3651b" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a253b554c4b811b489e3a487f6472ab8c5b4f8df34d203ed5deab3776cd4ec1f" + end + + depends_on :macos + + def install + bin.install "wifi-password.sh" => "wifi-password" + end + + test do + system bin/"wifi-password", "--version" + end +end diff --git a/Formula/w/wiggle.rb b/Formula/w/wiggle.rb new file mode 100644 index 0000000000000..454d80e9d8798 --- /dev/null +++ b/Formula/w/wiggle.rb @@ -0,0 +1,35 @@ +class Wiggle < Formula + desc "Program for applying patches with conflicting changes" + homepage "https://github.com/neilbrown/wiggle" + url "https://github.com/neilbrown/wiggle/archive/refs/tags/v1.3.tar.gz" + sha256 "ff92cf0133c1f4dce33563e263cb30e7ddb6f4abdf86d427b1ec1490bec25afa" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "87190c54a3ffa3b6212f17c7183d42f8a6615a1da033a9c22175b93363c23e8d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8887ecafbe844cb6e671f1b2d74668d28ee8116ad5efe005853c96f4bbe1255c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f756d49aaee957607f8578ae60fb771362fa3c97ed675c40d48b3165fbd3cbf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af2e82816a399f7da15006e81343855ef0c205ddc22bbc2a90047d0f99ac4339" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2340430acf70ad6cff33fb034eda572c80f359b3847b90ebcce1c732cc2bb792" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f585911f982b406255e79f0c3b6a4a71b7e438b0d102f1d9c39d1fdb806fe40e" + sha256 cellar: :any_skip_relocation, sonoma: "a6828506a4fc233b7a5bee6d5d1bac1bc9ff21f3ab1b24a0de1f5a1d614ca6c3" + sha256 cellar: :any_skip_relocation, ventura: "0b66da10e6bd799da3b4a24c0571fb62dc3b22d2f9c2a748c9d61f00eb82a087" + sha256 cellar: :any_skip_relocation, monterey: "6ef8230cd01f245db7718475da9c898919bc52b9729b2a603e797dce13d796fc" + sha256 cellar: :any_skip_relocation, big_sur: "233a538ebdde21f7038aafd73fb4a20afb0dbb6715f54f4fc305ad7ca4966672" + sha256 cellar: :any_skip_relocation, catalina: "e50353191b0368db9dd898d730b74ea3612c1cff728717fc8b5904a6d44e2015" + sha256 cellar: :any_skip_relocation, arm64_linux: "438ac64e4bd413955808e8a1a98a1569f7e266ff3d0d46efc715cb978b67d062" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9181d60a846d40b7850bb1647b1dcfba43a56f46d26bda4965df7e6f9857900" + end + + uses_from_macos "ncurses" + + def install + system "make", "OptDbg=#{ENV.cflags}", "PREFIX=#{prefix}", "test", "install" + end + + test do + system bin/"wiggle", "--version" + end +end diff --git a/Formula/w/wiiuse.rb b/Formula/w/wiiuse.rb new file mode 100644 index 0000000000000..bdf306007b20b --- /dev/null +++ b/Formula/w/wiiuse.rb @@ -0,0 +1,56 @@ +class Wiiuse < Formula + desc "Connect Nintendo Wii Remotes" + homepage "https://github.com/wiiuse/wiiuse" + url "https://github.com/wiiuse/wiiuse/archive/refs/tags/0.15.6.tar.gz" + sha256 "a3babe5eb284606090af706b356f1a0476123598f680094b1799670ec1780a44" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "a4bf56429e997f9499a8966ab71e338be19e17918a5ff113bd3dee17ef3a370d" + sha256 cellar: :any, arm64_sequoia: "d195756409e861db5fe17343c412d3ba38f06723e59854596fc22f44df843ddd" + sha256 cellar: :any, arm64_sonoma: "064957c4b98791d37e374c115eda18ab973c3fb28121e2c21948249b28101def" + sha256 cellar: :any, arm64_ventura: "d28f310e6c24c3e2edc8f21831ccedf4a0db4b3460a0efb62ad0824edce82dc0" + sha256 cellar: :any, arm64_monterey: "0f4fb0dc5bb825e093e2122ec79b3bfcc581977139084a76342fd84313e945f6" + sha256 cellar: :any, sonoma: "e8690ae4966a02202b43a7286d566b38ce4b0cc8f41e9be2741035514606f6fe" + sha256 cellar: :any, ventura: "76a3830992fa1357910d51d27a55cb0d80380da12d66940260bb33c4580b816a" + sha256 cellar: :any, monterey: "1456cece746747961b930550f319b1a2985d15afeadb4be526ae4d4b9260614a" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b96eaabc99ef5a85f9a908bc3997acb5a65fc88efc0bfa95b132731f26dbd91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c4b00c264565984ad37ebc29999601cc7780303f7015ee7575c21d03e5ba7c5" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "bluez" + end + + def install + args = %w[ + -DBUILD_EXAMPLE=NO + -DBUILD_EXAMPLE_SDL=NO + -DBUILD_SHARED_LIBS=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + int wiimoteCount = 1; + wiimote** wiimotes = wiiuse_init(wiimoteCount); + wiiuse_cleanup(wiimotes, wiimoteCount); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-l", "wiiuse", "-o", "test" + system "./test" + end +end diff --git a/Formula/w/wiki.rb b/Formula/w/wiki.rb new file mode 100644 index 0000000000000..916852c79754e --- /dev/null +++ b/Formula/w/wiki.rb @@ -0,0 +1,55 @@ +class Wiki < Formula + desc "Fetch summaries from MediaWiki wikis, like Wikipedia" + homepage "https://github.com/walle/wiki" + url "https://github.com/walle/wiki/archive/refs/tags/v1.4.1.tar.gz" + sha256 "529c6a58b3b5c5eb3faab07f2bf752155868b912e4f753e432d14040ff4f4262" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "599b6bc13279811f7950b1ac2a170292f250aef8b5d3917254163b516984278c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "599b6bc13279811f7950b1ac2a170292f250aef8b5d3917254163b516984278c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "599b6bc13279811f7950b1ac2a170292f250aef8b5d3917254163b516984278c" + sha256 cellar: :any_skip_relocation, sonoma: "f1fb505814ff97dc285f4c587344383290a2ea9a17865cdb97f0a62b3d1d89ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "eca2c5fde9cc0c01fdab8accc0a333b4ba6e713f8b1226b8b5e10dde71220d72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9ab56294402a19bbdd03974ad3f685720da32d1c8676411b771941343fb5089" + end + + deprecate! date: "2025-09-12", because: :unmaintained + + depends_on "go" => :build + + # Add a User-Agent header to requests to avoid an error + patch :DATA + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/wiki" + end + + test do + assert_match version.to_s, shell_output("#{bin}/wiki --version") + + assert_match "Read more: https://en.wikipedia.org/wiki/Go", shell_output("#{bin}/wiki golang") + end +end + +__END__ +diff --git a/request.go b/request.go +index a365760..be8e9cb 100644 +--- a/request.go ++++ b/request.go +@@ -54,7 +54,13 @@ func (r *Request) Execute(noCheckCert bool) (*Response, error) { + client = &http.Client{Transport: tr} + } + +- response, err := client.Get(r.String()) ++ req, err := http.NewRequest("GET", r.String(), nil) ++ if err != nil { ++ return nil, err ++ } ++ req.Header.Set("User-Agent", "wiki-cli/1.4.1") ++ ++ response, err := client.Do(req) + if err != nil { + return nil, err + } diff --git a/Formula/w/wikibase-cli.rb b/Formula/w/wikibase-cli.rb new file mode 100644 index 0000000000000..0eb6da1d02426 --- /dev/null +++ b/Formula/w/wikibase-cli.rb @@ -0,0 +1,29 @@ +class WikibaseCli < Formula + desc "Command-line interface to Wikibase" + homepage "https://github.com/maxlath/wikibase-cli" + url "https://registry.npmjs.org/wikibase-cli/-/wikibase-cli-19.1.0.tgz" + sha256 "5045fcd5863d424123dfd83132f70814c8278591a177931e9b472bd1e590d805" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fcf11b3dd4b724f6e6885c2050927e6f5913c76b165fd605582a94e2722c2bfb" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + config_file = testpath/".wikibase-cli.json" + config_file.write "{\"instance\":\"https://www.wikidata.org\"}" + + ENV["WB_CONFIG"] = config_file + + assert_equal "human", shell_output("#{bin}/wd label Q5 --lang en").strip + + assert_match version.to_s, shell_output("#{bin}/wd --version") + end +end diff --git a/Formula/w/wildfly-as.rb b/Formula/w/wildfly-as.rb new file mode 100644 index 0000000000000..56eba83b36e85 --- /dev/null +++ b/Formula/w/wildfly-as.rb @@ -0,0 +1,89 @@ +class WildflyAs < Formula + desc "Managed application runtime for building applications" + homepage "https://www.wildfly.org/" + url "https://github.com/wildfly/wildfly/releases/download/38.0.0.Final/wildfly-38.0.0.Final.tar.gz" + sha256 "f6dddf4338a6cf872e057dccefbf88285d34a090262eb9b664ce79b13a56c2d0" + license "Apache-2.0" + + livecheck do + url "https://www.wildfly.org/downloads/" + regex(/href=.*?wildfly[._-]v?(\d+(?:\.\d+)+)\.Final\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "c6a6fd5ccbbeefe61cd2f2e8ddf87657e159ad0482ca1dd97e6506ba3e7cc300" + sha256 cellar: :any, arm64_sequoia: "6d54dd12de1bf7277939e7a21ded5365d77ec08020ec3b0559d8bf58b2a283f0" + sha256 cellar: :any, arm64_sonoma: "6d54dd12de1bf7277939e7a21ded5365d77ec08020ec3b0559d8bf58b2a283f0" + sha256 cellar: :any, sonoma: "fe3ad0511d3167cbe85a3c519dda2030aa294f2468e062efd901fe05295ae8a5" + end + + # Installs a pre-built `libartemis-native-64.so` file with linkage to libaio.so.1 + depends_on :macos + depends_on "openjdk" + + def install + buildpath.glob("bin/*.{bat,ps1}").map(&:unlink) + rm_r buildpath.glob("**/win-x86_64") + rm_r buildpath.glob("**/linux-i686") + rm_r buildpath.glob("**/linux-s390x") + rm_r buildpath.glob("**/linux-x86_64") + rm_r buildpath.glob("**/netty-transport-native-epoll/**/native") + if Hardware::CPU.intel? + buildpath.glob("**/*_aarch_64.jnilib").map(&:unlink) + else + rm_r buildpath.glob("**/macosx-x86_64") + buildpath.glob("**/*_x86_64.jnilib").map(&:unlink) + end + + inreplace "bin/standalone.sh", /JAVA="[^"]*"/, "JAVA='#{Formula["openjdk"].opt_bin}/java'" + + libexec.install Dir["*"] + mkdir_p libexec/"standalone/log" + end + + def caveats + <<~EOS + The home of WildFly Application Server #{version} is: + #{opt_libexec} + You may want to add the following to your .bash_profile: + export JBOSS_HOME=#{opt_libexec} + export PATH=${PATH}:${JBOSS_HOME}/bin + EOS + end + + service do + run [opt_libexec/"bin/standalone.sh", "--server-config=standalone.xml"] + environment_variables JBOSS_HOME: opt_libexec, WILDFLY_HOME: opt_libexec + keep_alive successful_exit: false, crashed: true + end + + test do + ENV["JBOSS_HOME"] = opt_libexec + ENV["JBOSS_LOG_DIR"] = testpath + + port = free_port + + pidfile = testpath/"pidfile" + ENV["LAUNCH_JBOSS_IN_BACKGROUND"] = "true" + ENV["JBOSS_PIDFILE"] = pidfile + + mkdir testpath/"standalone" + mkdir testpath/"standalone/deployments" + cp_r libexec/"standalone/configuration", testpath/"standalone" + fork do + exec opt_libexec/"bin/standalone.sh", "--server-config=standalone.xml", + "-Djboss.http.port=#{port}", + "-Djboss.server.base.dir=#{testpath}/standalone" + end + sleep 10 + sleep 10 if Hardware::CPU.intel? + + begin + system "curl", "-X", "GET", "localhost:#{port}/" + output = shell_output("curl -s -X GET localhost:#{port}") + assert_match "Welcome to WildFly", output + ensure + Process.kill "SIGTERM", pidfile.read.to_i + end + end +end diff --git a/Formula/w/wildmidi.rb b/Formula/w/wildmidi.rb new file mode 100644 index 0000000000000..4a8d0fac47535 --- /dev/null +++ b/Formula/w/wildmidi.rb @@ -0,0 +1,48 @@ +class Wildmidi < Formula + desc "Simple software midi player" + homepage "https://github.com/Mindwerks/wildmidi" + url "https://github.com/Mindwerks/wildmidi/archive/refs/tags/wildmidi-0.4.6.tar.gz" + sha256 "051b8c51699af594ddd3e4e3b06bad3564e9499c3c6b9e6f880cb2f92bcfa9c8" + license all_of: ["GPL-3.0-only", "LGPL-3.0-only"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "fec3c0e1391b9ddce5df2c213ace4a11edf804189f70699e4f333fcd1e642abb" + sha256 cellar: :any, arm64_sequoia: "bb7178ae28716d1596dc04796b86318c2b96c3d5fc19a013fb63f3755aeccf7f" + sha256 cellar: :any, arm64_sonoma: "1957eaf82b32edbcd7efb37a209ccd6e2ceee82ec576e29b6d1666fc5e05945b" + sha256 cellar: :any, arm64_ventura: "5bda39b9e4b7c069bc80baa25a31dba900a78f2cc79f47d798a554e2670fe9e0" + sha256 cellar: :any, arm64_monterey: "6dfb03870142cd1ca7496d24056f3dd6b501bf58c395e270b0261391fcc7ca40" + sha256 cellar: :any, sonoma: "42a524ea0a68475608e63e99e3d2c975f17c5d79d680fadafd17b371acba84ed" + sha256 cellar: :any, ventura: "8578920cfff7dc9afb7deecd7397922ebcbd8092cba2bdb55aa830593c56f9de" + sha256 cellar: :any, monterey: "eb9ba5cb84a6a5105da658c4f3930f0d3d2c22e4caf39790c261912b48b7cc21" + sha256 cellar: :any_skip_relocation, arm64_linux: "c0e66dee3078f0f1c1fa2c727d2af4194da035eb0fb80e9b8be240fd8665a30a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "440af3c41c5ff0b321a6508dc0e531e2518cd78bad6b8ba5467ff65c25d5eb73" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "alsa-lib" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + int main() { + long version = WildMidi_GetVersion(); + assert(version != 0); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lWildMidi" + system "./a.out" + end +end diff --git a/Formula/w/willgit.rb b/Formula/w/willgit.rb new file mode 100644 index 0000000000000..f371719e1671c --- /dev/null +++ b/Formula/w/willgit.rb @@ -0,0 +1,29 @@ +class Willgit < Formula + desc "William's miscellaneous git tools" + homepage "https://github.com/DanielVartanov/willgit" + url "https://github.com/DanielVartanov/willgit/archive/refs/tags/1.0.0.tar.gz" + sha256 "3bb99d6ec2614a90f40962311daf51f393b3d0abfdb0f9e0a14ba7340b33a2c8" + license "MIT" + head "https://github.com/DanielVartanov/willgit.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "50393beba0d169140488b806a2b4635dbd02a81f93bddb654e367f040b57f570" + end + + uses_from_macos "ruby" + + def install + prefix.install "bin" + end + + test do + system "git", "init", "--initial-branch=main" + (testpath/"README.md").write "# BrewTest" + system "git", "add", "README.md" + system "git", "commit", "-m", "init" + assert_equal "Local branch: main", shell_output("git wtf").chomp + end +end diff --git a/Formula/w/wimlib.rb b/Formula/w/wimlib.rb new file mode 100644 index 0000000000000..e96db506a54a8 --- /dev/null +++ b/Formula/w/wimlib.rb @@ -0,0 +1,55 @@ +class Wimlib < Formula + desc "Library to create, extract, and modify Windows Imaging files" + homepage "https://wimlib.net/" + url "https://wimlib.net/downloads/wimlib-1.14.4.tar.gz" + sha256 "3633db2b6c8b255eb86d3bf3df3059796bd1f08e50b8c9728c7eb66662e51300" + license "GPL-3.0-or-later" + + livecheck do + url "https://wimlib.net/downloads/" + regex(/href=.*?wimlib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "0e65ded347adda5fda6167017ee666f76dea3257916600281531ba9913fa14fe" + sha256 cellar: :any, arm64_sequoia: "a5ea3961385c62f66efecd74eb8cb16533a12214b638b2dcc3bc552c3666a072" + sha256 cellar: :any, arm64_sonoma: "cd90cbc5afd8825d5693a3a15b6728392eadb8d17620fefec7418521b117a90d" + sha256 cellar: :any, sonoma: "9fcea2765f909283a7eecf6386b2f01909ef01bfcc350bc598c7e5a4fd03faf8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c05433a61d83381856df0ca35cc8691136d48d9122a9423235e66acb2faab0f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87a79bfe8b23309c2d5de2cec6e353ff2da0b1010f609c2b0555151d2c531520" + end + + depends_on "pkgconf" => :build + + on_linux do + depends_on "libfuse" + depends_on "ntfs-3g" + end + + def install + args = %w[--disable-silent-rules] + args += %w[--without-fuse --without-ntfs-3g] if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # make a directory containing a dummy 1M file + mkdir("foo") + size = if OS.mac? + "1m" + else + "1M" + end + system "dd", "if=/dev/random", "of=foo/bar", "bs=#{size}", "count=1" + # capture an image + ENV.append "WIMLIB_IMAGEX_USE_UTF8", "1" + system bin/"wimcapture", "foo", "bar.wim" + assert_path_exists testpath/"bar.wim" + + # get info on the image + system bin/"wiminfo", "bar.wim" + end +end diff --git a/Formula/w/winetricks.rb b/Formula/w/winetricks.rb new file mode 100644 index 0000000000000..0dbbf567c789a --- /dev/null +++ b/Formula/w/winetricks.rb @@ -0,0 +1,30 @@ +class Winetricks < Formula + desc "Automatic workarounds for problems in Wine" + homepage "https://github.com/Winetricks/winetricks" + url "https://github.com/Winetricks/winetricks/archive/refs/tags/20250102.tar.gz" + sha256 "24d339806e3309274ee70743d76ff7b965fef5a534c001916d387c924eebe42e" + license "LGPL-2.1-or-later" + head "https://github.com/Winetricks/winetricks.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d{6,8})$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "8206662a0e6dc4617ffb4b6c6c3688dd39e019291e95e91eec0e0c2a49b4fcf1" + end + + depends_on "cabextract" + depends_on "p7zip" + depends_on "unzip" + + def install + bin.install "src/winetricks" + man1.install "src/winetricks.1" + end + + test do + system bin/"winetricks", "--version" + end +end diff --git a/Formula/w/wiredtiger.rb b/Formula/w/wiredtiger.rb new file mode 100644 index 0000000000000..473d7d3ae557d --- /dev/null +++ b/Formula/w/wiredtiger.rb @@ -0,0 +1,53 @@ +class Wiredtiger < Formula + desc "High performance NoSQL extensible platform for data management" + homepage "https://source.wiredtiger.com/" + url "https://github.com/wiredtiger/wiredtiger/archive/refs/tags/11.3.1.tar.gz" + sha256 "ac0417c10cecc686baff5fdc00a7872003fc007993163bafba387fad903d5091" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "63fefdf4715c6dd504e69d3f5ca1ca38d81f4bcb343007eab4f25f0d205f5f6a" + sha256 cellar: :any, arm64_sequoia: "fe94103be40ac4d1f2030cf28f3bd93dda5f65f45196884e18e21dc48825a502" + sha256 cellar: :any, arm64_sonoma: "6f46b39b9ad85313b1cbcb81e9b86204a15a017b859bbbafac05094a994a5284" + sha256 cellar: :any, arm64_ventura: "0333748feb3a4d7939b945a6e24dda5a73f7a9fcc7497e21b8af17ce6197e666" + sha256 cellar: :any, sonoma: "2c6472b714776076789ecdab468016f3c4b25ebcd84695ca70a67d463537c4a6" + sha256 cellar: :any, ventura: "4085e3bbb32627b3dac06760f86dfb6e28a7d580dfa9cbeaab94a3126a4f11da" + sha256 cellar: :any_skip_relocation, arm64_linux: "18d06663d840ca7f85f41444dc1ffce4571bed81429217d3937e6990c22287ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "100e4051caa78dbd63c57f3e0a3be5f0272676e187c191d040068cbaf5c67aa4" + end + + depends_on "cmake" => :build + depends_on "swig" => :build + depends_on "lz4" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + def install + # CRC32 hardware detection: https://github.com/wiredtiger/wiredtiger/tree/develop/src/checksum + ENV.runtime_cpu_detection + + args = %W[ + -DCCACHE_FOUND=CCACHE_FOUND-NOTFOUND + -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 + -DHAVE_BUILTIN_EXTENSION_ZLIB=1 + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + args << "-DCMAKE_C_FLAGS=-Wno-maybe-uninitialized" if OS.linux? + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"wt", "create", "table:test" + system bin/"wt", "drop", "table:test" + end +end diff --git a/Formula/w/wireguard-go.rb b/Formula/w/wireguard-go.rb new file mode 100644 index 0000000000000..d1ea7a5b671b4 --- /dev/null +++ b/Formula/w/wireguard-go.rb @@ -0,0 +1,35 @@ +class WireguardGo < Formula + desc "Userspace Go implementation of WireGuard" + homepage "https://www.wireguard.com/" + url "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-0.0.20250522.tar.xz" + sha256 "c698fb9fd09d48e8cf5c1eee3e5f0170f1916a7eed09ba025aa025cd5e721a20" + license "MIT" + head "https://git.zx2c4.com/wireguard-go.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2ae096c9cefaf2ddf1d4c1eebf19ed71a02adf9c9b020b538f6216244fe3a2fa" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1c19618a231e9ca6c62dd268de8ab8905256d96540a252f0cebf05548a3939c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1c19618a231e9ca6c62dd268de8ab8905256d96540a252f0cebf05548a3939c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1c19618a231e9ca6c62dd268de8ab8905256d96540a252f0cebf05548a3939c" + sha256 cellar: :any_skip_relocation, sonoma: "db6d403f493b281677d95e79448776275d37b728b966fe23f80f1079ecf35d61" + sha256 cellar: :any_skip_relocation, ventura: "db6d403f493b281677d95e79448776275d37b728b966fe23f80f1079ecf35d61" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfba7916b334b184cde873b2fb11f67369ca88c1a55d176e3bee0811b679a53f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0fa36967d0cf07ae25e5af14c9b136de29cf5d53f6bfc4f58e66574d3a5aa61" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + expected = OS.mac? ? "name must be utun" : "Running wireguard-go is not required" + assert_match expected, shell_output("#{bin}/wireguard-go -f notrealutun 2>&1", 1) + end +end diff --git a/Formula/w/wireguard-tools.rb b/Formula/w/wireguard-tools.rb new file mode 100644 index 0000000000000..ef22f4d237603 --- /dev/null +++ b/Formula/w/wireguard-tools.rb @@ -0,0 +1,47 @@ +class WireguardTools < Formula + desc "Tools for the WireGuard secure network tunnel" + homepage "https://www.wireguard.com/" + url "https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-1.0.20250521.tar.xz" + sha256 "b6f2628b85b1b23cc06517ec9c74f82d52c4cdbd020f3dd2f00c972a1782950e" + license "GPL-2.0-only" + head "https://git.zx2c4.com/wireguard-tools.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4e3d904340a19633b44d7bf599d7c9080bc2a529a91538ad39125c2d5559ee0a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00b25ef39b29bdf6cbe554ca3bab3b4945f0a70f857c698e6cc3a8434a8dc820" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d351a25ffcbfca3d2ad403515f98a8deee82e97b0e60825c425e6dda9854b9f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e638f445c242aede06a5384dc14d9aa78905068564938e79a62d5684df991ded" + sha256 cellar: :any_skip_relocation, sonoma: "4c929b929c9ad42228c7c63c091f96e2746150614c36c80003084831b836c996" + sha256 cellar: :any_skip_relocation, ventura: "8a326265f11c815949dcfd4405dd0521be943b65177f48d9e0ff59edd52ada6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8acd137b889d5ff4a545cc4b1d5a8aec5f4fad7335ef5c399cf2cf9cbb9d852d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3fedbb5c19ec7126a3bc9e47c3f73e39fc790c38cda09d65dd4aca8d7632aea" + end + + depends_on "bash" + depends_on "wireguard-go" + + def install + if HOMEBREW_PREFIX.to_s != HOMEBREW_DEFAULT_PREFIX + inreplace ["src/completion/wg-quick.bash-completion", "src/wg-quick/darwin.bash"], + " /usr/local/etc/wireguard", "\\0 #{etc}/wireguard" + end + + system "make", "-C", "src", + "BASHCOMPDIR=#{bash_completion}", + "WITH_BASHCOMPLETION=yes", + "WITH_WGQUICK=yes", + "WITH_SYSTEMDUNITS=no", + "PREFIX=#{prefix}", + "SYSCONFDIR=#{etc}", + "install" + end + + test do + system bin/"wg", "help" + end +end diff --git a/Formula/w/wiremock-standalone.rb b/Formula/w/wiremock-standalone.rb new file mode 100644 index 0000000000000..610535ad349f5 --- /dev/null +++ b/Formula/w/wiremock-standalone.rb @@ -0,0 +1,40 @@ +class WiremockStandalone < Formula + desc "Simulator for HTTP-based APIs" + homepage "https://wiremock.org/docs/running-standalone/" + url "https://search.maven.org/remotecontent?filepath=org/wiremock/wiremock-standalone/3.13.1/wiremock-standalone-3.13.1.jar" + sha256 "bdf4c705e7fd61c778e59a19f75396eac4520efeabfac97643a53979bd4d5716" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/wiremock/wiremock-standalone/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "ccd5f98ad31ec4796d4b0d51073ead937cefb1e638e08b602f7332708ec8db31" + end + + depends_on "openjdk" + + def install + libexec.install "wiremock-standalone-#{version}.jar" + bin.write_jar_script libexec/"wiremock-standalone-#{version}.jar", "wiremock" + end + + test do + port = free_port + + wiremock = fork do + exec "#{bin}/wiremock", "-port", port.to_s + end + + loop do + Utils.popen_read("curl", "-s", "http://localhost:#{port}/__admin/", "-X", "GET") + break if $CHILD_STATUS.exitstatus.zero? + end + + system "curl", "-s", "http://localhost:#{port}/__admin/shutdown", "-X", "POST" + + Process.wait(wiremock) + end +end diff --git a/Formula/w/wireshark.rb b/Formula/w/wireshark.rb new file mode 100644 index 0000000000000..f5c7acc7e95bf --- /dev/null +++ b/Formula/w/wireshark.rb @@ -0,0 +1,105 @@ +class Wireshark < Formula + desc "Network analyzer and capture tool - without graphical user interface" + homepage "https://www.wireshark.org" + url "https://www.wireshark.org/download/src/all-versions/wireshark-4.6.0.tar.xz" + mirror "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-4.6.0.tar.xz" + sha256 "ab016463062bb635285b9678dd45ddd84c65938911fd40b3cca9a903a08ad8d9" + license "GPL-2.0-or-later" + head "https://gitlab.com/wireshark/wireshark.git", branch: "master" + + # Upstream indicates stable releases with an even-numbered minor (see: + # https://wiki.wireshark.org/Development/ReleaseNumbers). + livecheck do + url "https://www.wireshark.org/download.html" + regex(/href=.*?wireshark[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0be567a2410a1943f6aa48f6d7ebd41785b8742b9a2a7e52263e7404fe0d21ae" + sha256 arm64_sequoia: "cd775354ae62c51a2d70c1778fc2478632ab51309b71a25dcd0404e1ee6cfbd0" + sha256 arm64_sonoma: "0b5b2f45a6513bcabea5a638d8fc0eb21fee00bfa8ffd17a29c6999267687b6c" + sha256 sonoma: "ac57ba34a566fa522e22c8a0693ce6d780e0a6a91034883462bf694dd62c2d5c" + sha256 arm64_linux: "093f5cfb0f3d7512c9a85956e971e8660ac3d88aaf9d4dcb0b8463154340a3c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cad6a7c06dca4c74ddc501e432d1d1ccf7d905d51d5da70e292edc5f6ef6ef9" + end + + depends_on "cmake" => :build + depends_on "c-ares" + depends_on "glib" + depends_on "gnutls" + depends_on "libgcrypt" + depends_on "libmaxminddb" + depends_on "libnghttp2" + depends_on "libnghttp3" + depends_on "libsmi" + depends_on "libssh" + depends_on "lua" + depends_on "pcre2" + depends_on "speexdsp" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "python" => :build + uses_from_macos "krb5" + uses_from_macos "libpcap" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "libgpg-error" + end + + conflicts_with cask: "wireshark-app" + + def install + args = %W[ + -DLUA_INCLUDE_DIR=#{Formula["lua"].opt_include}/lua + -DLUA_LIBRARY=#{Formula["lua"].opt_lib/shared_library("liblua")} + -DCARES_INCLUDE_DIR=#{Formula["c-ares"].opt_include} + -DGCRYPT_INCLUDE_DIR=#{Formula["libgcrypt"].opt_include} + -DGNUTLS_INCLUDE_DIR=#{Formula["gnutls"].opt_include} + -DMAXMINDDB_INCLUDE_DIR=#{Formula["libmaxminddb"].opt_include} + -DBUILD_wireshark=OFF + -DBUILD_logray=OFF + -DENABLE_APPLICATION_BUNDLE=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "--install", "build", "--component", "Development" + end + + def caveats + <<~EOS + This formula only installs the command-line utilities by default. + + Install Wireshark.app with Homebrew Cask: + brew install wireshark-app + + If your list of available capture interfaces is empty + (default macOS behavior), install ChmodBPF: + brew install --cask wireshark-chmodbpf + EOS + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + printf("%d.%d.%d", WIRESHARK_VERSION_MAJOR, WIRESHARK_VERSION_MINOR, + WIRESHARK_VERSION_MICRO); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}/wireshark", "-o", "test" + output = shell_output("./test") + assert_equal version.to_s, output + system bin/"randpkt", "-b", "100", "-c", "2", "capture.pcap" + output = shell_output("#{bin}/capinfos -Tmc capture.pcap") + assert_equal "File name,Number of packets\ncapture.pcap,2\n", output + end +end diff --git a/Formula/w/wirouter_keyrec.rb b/Formula/w/wirouter_keyrec.rb new file mode 100644 index 0000000000000..171485edf195e --- /dev/null +++ b/Formula/w/wirouter_keyrec.rb @@ -0,0 +1,49 @@ +class WirouterKeyrec < Formula + desc "Recover the default WPA passphrases from supported routers" + homepage "https://www.salvatorefresta.net/tools/" + url "https://www.mirrorservice.org/sites/distfiles.macports.org/wirouterkeyrec/WiRouter_KeyRec_1.1.2.zip" + mirror "https://distfiles.macports.org/wirouterkeyrec/WiRouter_KeyRec_1.1.2.zip" + sha256 "3e59138f35502b32b47bd91fe18c0c232921c08d32525a2ae3c14daec09058d4" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(%r{href=.*?/WiRouter_KeyRec[._-]v?(\d+(?:\.\d+)+)\.zip}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "34e5fd2a6a9e60936a2618fd84b435911d6ec1f1f53bb66180ec884077b482cb" + sha256 arm64_sequoia: "cccb46ddcd0b30219ed24a351f2dfb1dacf796da3fdabe377b2d9300db62bf1d" + sha256 arm64_sonoma: "86c53e8b3f2532c768bb13ae50bd272e3b55866a674c3bf7aa9c370c80ab6084" + sha256 arm64_ventura: "d0f76ae3936a32cc3be17614e325503686400bd1c38abf3a072d0f0de9444628" + sha256 arm64_monterey: "43c8cb4e4f1389c6a584c27b0407c11e31422cdb2802706f316a93f7e5d8c7a5" + sha256 arm64_big_sur: "e3cfa2752a3957af0fcc474d4ad24ab76f026ee4479e0fa74d84222d16c02812" + sha256 sonoma: "768f3df3b16cbd2bc7ecd3eb65b5d7da4d302d21f78076657af195b36a5c7e81" + sha256 ventura: "e0334033e6d6ac7f366a556d8e89d3394bc85968180e52ef7bc5ad4edcfa2548" + sha256 monterey: "0b4c56b39f76881732a5afd3a4fc490e35e05145efb71845d938555d1173168d" + sha256 big_sur: "f5a1ec8cb71d5240eb01a3dbd0cbfa8f09c4b76cae27cacd2fea058ccb8c9f78" + sha256 catalina: "907d4ed63f0f9c13217a9120749b12521ad773d310d554534a507ca9714d2dd7" + sha256 arm64_linux: "2fe4fe43878fd795923cf6577d4ac268e26c7d1612ed6700e201592bb9878fb0" + sha256 x86_64_linux: "1d3f91f6d9f53dda66211c8d0f01081e92a1b43dbbb98b2cabfb63d337cb7eea" + end + + def install + inreplace "src/agpf.h", %r{/etc}, "#{prefix}/etc" + inreplace "src/teletu.h", %r{/etc}, "#{prefix}/etc" + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--sysconfdir=#{prefix}", + "--exec-prefix=#{prefix}" + system "make", "prefix=#{prefix}" + system "make", "install", "DESTDIR=#{prefix}", "BIN_DIR=bin/" + end + + test do + system bin/"wirouterkeyrec", "-s", "Alice-12345678" + end +end diff --git a/Formula/w/wishlist.rb b/Formula/w/wishlist.rb new file mode 100644 index 0000000000000..1d3c7e9597889 --- /dev/null +++ b/Formula/w/wishlist.rb @@ -0,0 +1,40 @@ +class Wishlist < Formula + desc "Single entrypoint for multiple SSH endpoints" + homepage "https://github.com/charmbracelet/wishlist" + url "https://github.com/charmbracelet/wishlist/archive/refs/tags/v0.15.2.tar.gz" + sha256 "ba1a9bbd1925e2793d5eb97e38351faf5f9efdc89921af1f1322d9b88b94bdba" + license "MIT" + head "https://github.com/charmbracelet/wishlist.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7d701b7e532275ccddcde513950176e79743e50a2e4c602b24848d573418308d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e77986d045c2b98710bb331b52d217aa06b058d71a6708ebdda71032633beff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e77986d045c2b98710bb331b52d217aa06b058d71a6708ebdda71032633beff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e77986d045c2b98710bb331b52d217aa06b058d71a6708ebdda71032633beff" + sha256 cellar: :any_skip_relocation, sonoma: "6ac28340cfa526431d73fa37c72eeef3c8da7847ae85034edfbd9f6686728ff9" + sha256 cellar: :any_skip_relocation, ventura: "6ac28340cfa526431d73fa37c72eeef3c8da7847ae85034edfbd9f6686728ff9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a07f7dc954c52c5eb7728c4e32e223cc23bb6756ad7b60fe9ec314e105830037" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb48dabd9a636100ec378e63bbda9ad471a14b742f323556143db04942fe2f04" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/wishlist" + end + + test do + assert_match version.to_s, shell_output("#{bin}/wishlist --version") + + output_log = testpath/"output.log" + pid = spawn bin/"wishlist", "serve", [:out, :err] => output_log.to_s + sleep 1 + begin + assert_match "Starting SSH server", output_log.read + assert_path_exists testpath/".wishlist" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/w/with-readline.rb b/Formula/w/with-readline.rb new file mode 100644 index 0000000000000..52ec2798693a9 --- /dev/null +++ b/Formula/w/with-readline.rb @@ -0,0 +1,45 @@ +class WithReadline < Formula + desc "Allow GNU Readline to be used with arbitrary programs" + homepage "https://www.greenend.org.uk/rjk/sw/withreadline.html" + url "https://www.greenend.org.uk/rjk/sw/with-readline-0.1.1.tar.gz" + sha256 "d12c71eb57ef1dbe35e7bd7a1cc470a4cb309c63644116dbd9c88762eb31b55d" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?with-readline[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ea58369604289993c9794f0da96a40acea67e31660a6cd5f2b1ee0c86c5cde07" + sha256 cellar: :any, arm64_sequoia: "64699e89e796bf016bb6754677c5a76f881111becdbbea0ae532de8e9f398932" + sha256 cellar: :any, arm64_sonoma: "5aeb8225f4f4897af246a0e1b4042375539336d0b80721968d50f4760157b5e2" + sha256 cellar: :any, arm64_ventura: "b3277d7237d984e25ce8eea7a479b7ac6c68c929fbcfcee627d68e2748eb955d" + sha256 cellar: :any, arm64_monterey: "d0fbb8e109734765f470ff267c0c45f3ae958615bc162f3e541b9e4f219d7ec9" + sha256 cellar: :any, arm64_big_sur: "7a8f7ff1d33453d059ac6ac6b23883fa3f86d720cb25415e590e81ca2e6255dd" + sha256 cellar: :any, sonoma: "04cd5b6bff3d1ae6daddbd45dfdc42864b84a2061191573561b35bf001dd57b0" + sha256 cellar: :any, ventura: "e4a501c322f47879d36712e61bb9dc2885b2b3ec66e5e44b8f44c3fbdbb53b25" + sha256 cellar: :any, monterey: "96e916f5b1f84b40c4aca915dce1731428e4fadf69269932098a8ffa87168554" + sha256 cellar: :any, big_sur: "0700f15130da53328bff304e2cfdb422ad2bc4fff64a0377063af94cf46d3655" + sha256 cellar: :any, catalina: "b0ba2ed66eff2c432234e5885ebeca2a671bb556024ad038563883b3c14a64b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "13a2d06bb7d6b22f037485e8e59d402cd10c20ade9be3919a1ca8d98511ce796" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa9469fdae3e63ea2e6bba4850d405878c6a782b703f978ee04e28a49285e39b" + end + + depends_on "readline" + + uses_from_macos "tcl-tk" => :test + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + tclsh = OS.mac? ? "/usr/bin/tclsh" : Formula["tcl-tk"].bin/"tclsh" + pipe_output("#{bin}/with-readline #{tclsh}", "exit", 0) + end +end diff --git a/Formula/w/witness.rb b/Formula/w/witness.rb new file mode 100644 index 0000000000000..f7736ae03e832 --- /dev/null +++ b/Formula/w/witness.rb @@ -0,0 +1,46 @@ +class Witness < Formula + desc "Automates, normalizes, and verifies software artifact provenance" + homepage "https://witness.dev" + url "https://github.com/in-toto/witness/archive/refs/tags/v0.10.1.tar.gz" + sha256 "5c4702a0b15380f82c1e421c15582671321c5c0a406093129bcfe288c68693dc" + license "Apache-2.0" + head "https://github.com/in-toto/witness.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "25cde82fc6d757d7c1fbe61260802d1b190f010f2f49dee717cb52e541a89aab" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "97c4bc5582063c24500d7af959fb9bf248257c7c95a37304339246231198b252" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d359e467d168a50f63771f5e6f9d059e45b173f05ee88356760d0faa94e6cd8f" + sha256 cellar: :any_skip_relocation, sonoma: "93f926c0660d154aa6949728142111e098848fd0566a670719046a57cea0f4e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "e215d4e64d94ac2a28724181a3214f7b80ae777639f4cb43da1393ea3bf85bb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9e5f7f1f01c8f867e553fa0ea1dea63aca985e33bb5317b51d21147e3520799" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/in-toto/witness/cmd.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"witness", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/witness version") + + system "openssl", "genrsa", "-out", "buildkey.pem", "2048" + system "openssl", "rsa", "-in", "buildkey.pem", "-outform", "PEM", "-pubout", "-out", "buildpublic.pem" + system bin/"witness", "run", "-s", "build", "-a", "environment", "-k", "buildkey.pem", "-o", + "build-attestation.json" + + output = Base64.decode64(JSON.parse((testpath/"build-attestation.json").read)["payload"]) + assert_match "\"type\":\"https://witness.dev/attestations/product/v0.1\",", output + end +end diff --git a/Formula/w/wla-dx.rb b/Formula/w/wla-dx.rb new file mode 100644 index 0000000000000..a9a619bd04f58 --- /dev/null +++ b/Formula/w/wla-dx.rb @@ -0,0 +1,76 @@ +class WlaDx < Formula + desc "Yet another crossassembler package" + homepage "https://github.com/vhelin/wla-dx" + url "https://github.com/vhelin/wla-dx/archive/refs/tags/v10.6.tar.gz" + sha256 "010c4d426fd1733b978cbca7530a5e68bdfb6f62976c0d5ff7bff447894e19a8" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+)(?:-fix)*/i) + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "11d1d2d3fdc767d15e21dd37a176fe35438cf438c8ff05e9344e69da674acac2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f89cc32f88279298a841ee744557214695dffdc76c35f43f28610715c38b35d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "01e0f38cf29c205e76cb0950a41847867d3ee007e877f6607e5e5c352fe222da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d86083d1dd34ccbb5f8309052d57e9b5ee52de04f7382510f41ba82e19d3b1ff" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3ca9f57e6ed396fd20774c44c4619e4b9583a772d3d0751ea90751e3ddb06545" + sha256 cellar: :any_skip_relocation, sonoma: "9ff72ea731a055cf23c426ab45fe5e33169ba1a4979c74ac90a9edd84a04730b" + sha256 cellar: :any_skip_relocation, ventura: "db9b75eba0fe4403c2c41faaa0fc7d49bf173e32c8240718d18413aee0609d35" + sha256 cellar: :any_skip_relocation, monterey: "6397fad5d0f3bbdb81022766ca0784206cb611dd7db402fb7eff80bb703860b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "08c9e8db294a9c53c600dc9ed33dad82e58783710f679c3961dafe5c7f04d41b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e5860c11c5bbbdb62949e01df2af3d006f8315f5d30a2d4f4c25740a57ef883" + end + + depends_on "cmake" => :build + + # Backport support for CMake 4 + patch do + url "https://github.com/vhelin/wla-dx/commit/6fa1f673f010e4fa4571c40929019cd7e67d1bbd.patch?full_index=1" + sha256 "08ba18fe27c6b0ff0bad4e9ce15a4e76be5626407e03ffdf1c19228902e02493" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test-gb-asm.s").write <<~ASM + .MEMORYMAP + DEFAULTSLOT 1.01 + SLOT 0.001 $0000 $2000 + SLOT 1.2 STArT $2000 sIzE $6000 + .ENDME + + .ROMBANKMAP + BANKSTOTAL 2 + BANKSIZE $2000 + BANKS 1 + BANKSIZE $6000 + BANKS 1 + .ENDRO + + .BANK 1 SLOT 1 + + .ORGA $2000 + + + ld hl, sp+127 + ld hl, sp-128 + add sp, -128 + add sp, 127 + adc 200 + jr -128 + jr 127 + jr nc, 127 + ASM + + system bin/"wla-gb", "-o", testpath/"test-gb-asm.s" + end +end diff --git a/Formula/w/wllvm.rb b/Formula/w/wllvm.rb new file mode 100644 index 0000000000000..8ffa47555548c --- /dev/null +++ b/Formula/w/wllvm.rb @@ -0,0 +1,36 @@ +class Wllvm < Formula + include Language::Python::Virtualenv + + desc "Toolkit for building whole-program LLVM bitcode files" + homepage "https://pypi.org/project/wllvm/" + url "https://files.pythonhosted.org/packages/4b/df/31d7519052bc21d0e9771e9a6540d6310bfb13bae7dacde060d8f647b8d3/wllvm-1.3.1.tar.gz" + sha256 "3e057a575f05c9ecc8669a8c4046f2bfdf0c69533b87b4fbfcabe0df230cc331" + license "MIT" + revision 1 + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "34b9e23ff00414b2329a09ea3e9820175aa07881d236a218aeebd5abec34d9c6" + end + + depends_on "llvm" => :test + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + ENV.prepend_path "PATH", Formula["llvm"].opt_bin + (testpath/"test.c").write "int main() { return 0; }" + + with_env(LLVM_COMPILER: "clang") do + system bin/"wllvm", testpath/"test.c", "-o", testpath/"test" + end + assert_path_exists testpath/".test.o" + assert_path_exists testpath/".test.o.bc" + + system bin/"extract-bc", testpath/"test" + assert_path_exists testpath/"test.bc" + end +end diff --git a/Formula/w/wmctrl.rb b/Formula/w/wmctrl.rb new file mode 100644 index 0000000000000..3dfeeba143673 --- /dev/null +++ b/Formula/w/wmctrl.rb @@ -0,0 +1,58 @@ +class Wmctrl < Formula + desc "UNIX/Linux command-line tool to interact with an EWMH/NetWM" + homepage "https://packages.debian.org/sid/wmctrl" + url "https://deb.debian.org/debian/pool/main/w/wmctrl/wmctrl_1.07.orig.tar.gz" + sha256 "d78a1efdb62f18674298ad039c5cbdb1edb6e8e149bb3a8e3a01a4750aa3cca9" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url "https://deb.debian.org/debian/pool/main/w/wmctrl/" + regex(/href=.*?wmctrl[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "39edb4ef55820d995ac4b636c4215cee31e25c958f59f1d843cc85ee38e690e8" + sha256 cellar: :any, arm64_sequoia: "76d0afbd8d8a925bf3d2137457f49f03f9550733358079820150adc2976010c3" + sha256 cellar: :any, arm64_sonoma: "6a1a692f4cb4c2246cb4e1f3e53dfe9e6c56486dd706a7910704e9a09def7cb9" + sha256 cellar: :any, arm64_ventura: "388c8eb49eeca6f9ced7eb9d3c7418e7b2f6a5f4cc4a77263e4ddb92ae135b8b" + sha256 cellar: :any, arm64_monterey: "fb8c3a7dcd11a32b075ba4181f5825bfd9b55a8ee1453f4ad8454c7dd56cf6cf" + sha256 cellar: :any, arm64_big_sur: "83b97edb3df52830587f710abc9bbfc53c0a7b3567a18f94c2161be6b988980a" + sha256 cellar: :any, sonoma: "2deab4d4326107696a376b85a27c9417b59727513f99b9b5b336f72fb2ac2dcf" + sha256 cellar: :any, ventura: "f4b9bdf79af82a76f5cec5db96d01bb48d2c321d96c7b09e8794a1937243ba56" + sha256 cellar: :any, monterey: "a5d76fe085cc3ca15ab736376b8250c82fde97e364117bbc7f7050e599dda640" + sha256 cellar: :any, big_sur: "90c60692d669660d4d8037d2c6fa94cc13f14b6bb85e6909d0707f30644edde5" + sha256 cellar: :any, catalina: "d585a38070e3343da1be66819f7d3f840140acee8dde1d3912542d682466ee48" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2f47127d88a26b2522b3948371f2152de9e0ca35bb7a4a33d4feb2a2424ea6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f35104a632334a639f0c7d233baea5a9177a2d43fe78cd563870c97b394d78bc" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + depends_on "libxmu" + + on_macos do + depends_on "gettext" + end + + # Fix for 64-bit arch. See: + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=362068 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/wmctrl/1.07.patch" + sha256 "8599f75e07cc45ed45384481117b0e0fa6932d1fce1cf2932bf7a7cf884979ee" + end + + def install + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"wmctrl", "--version" + end +end diff --git a/Formula/w/woff2.rb b/Formula/w/woff2.rb new file mode 100644 index 0000000000000..a21e795baee16 --- /dev/null +++ b/Formula/w/woff2.rb @@ -0,0 +1,69 @@ +class Woff2 < Formula + desc "Utilities to create and convert Web Open Font File (WOFF) files" + homepage "https://github.com/google/woff2" + url "https://github.com/google/woff2/archive/refs/tags/v1.0.2.tar.gz" + sha256 "add272bb09e6384a4833ffca4896350fdb16e0ca22df68c0384773c67a175594" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "909e53d8bfc53e5f3f8a696caf90d3a2a950614f5590215b3ce6121ec1af3d40" + sha256 cellar: :any, arm64_sequoia: "f451e27be673ee74d5cdbbb50fa6d818ac48b0800f9daf0c27bb5995c27f8b9b" + sha256 cellar: :any, arm64_sonoma: "d410b566576b56a9659f6318591722b2c000d788be86e4c65cd28631ecd485a0" + sha256 cellar: :any, arm64_ventura: "fb62fd8c1f19bf0eabbc4e82ea9db15cb8fd74b158bc137a6e4da08a95c57759" + sha256 cellar: :any, arm64_monterey: "1108c65b488acc65da207d66d8cb1c6964f4bcc23cfd29de4563d783a174d639" + sha256 cellar: :any, arm64_big_sur: "7ca5f49e0a75c2e9935606e2d065104bf7e29f48d767cdcd373e2f84a8a322b6" + sha256 cellar: :any, sonoma: "c0251f8aefd2a85acc108c31942c788b6e8b7c7dc76b39f91ece021f6e1393c2" + sha256 cellar: :any, ventura: "3583be57fecbc4f9c17c9bee38c9c484637bcb7b4868ff948811cdbe679a53c7" + sha256 cellar: :any, monterey: "04a13902818b9dfb1e5c82a8f5b50fae9681c058b6786a2bc86328543ed9c397" + sha256 cellar: :any, big_sur: "1f49de0effd6a13416745b3b9329aa42cefb0801eaa4740931b9c6669d18e1c9" + sha256 cellar: :any, catalina: "7df9b4ada2d8a72546c5395fc92a7c5071f68be2fa12d336a194cee44adad5a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7da30c0a9c4dfa9f52943749d7ec8bb8f25af1734a162015c009c422463fbb37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc6bb16039075d8610786f74387551da3a4852d0d6227ebefe1c5ef9add29d43" + end + + depends_on "cmake" => :build + depends_on "brotli" + + def install + args = %W[ + -DCMAKE_INSTALL_NAME_DIR=#{opt_lib} + -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON + ] + # Workaround to build with CMake 4 + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Manually install binaries not handled by `make install` + bin.install "build/woff2_info", "build/woff2_decompress", "build/woff2_compress" + end + + test do + resource "homebrew-roboto_1" do + url "https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf" + sha256 "466989fd178ca6ed13641893b7003e5d6ec36e42c2a816dee71f87b775ea097f" + end + + resource "homebrew-roboto_2" do + url "https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2" + sha256 "90a0ad0b48861588a6e33a5905b17e1219ea87ab6f07ccc41e7c2cddf38967a8" + end + + # Convert a TTF to WOFF2 + resource("homebrew-roboto_1").stage testpath + system bin/"woff2_compress", "KFOmCnqEu92Fr1Mu4mxP.ttf" + output = shell_output("#{bin}/woff2_info KFOmCnqEu92Fr1Mu4mxP.woff2") + assert_match "WOFF2Header", output + + # Convert a WOFF2 to TTF + resource("homebrew-roboto_2").stage testpath + system bin/"woff2_decompress", "KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2" + output = shell_output("file --brief KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.ttf") + assert_match(/TrueType font data/i, output) + end +end diff --git a/Formula/w/wolfmqtt.rb b/Formula/w/wolfmqtt.rb new file mode 100644 index 0000000000000..21f79237c1857 --- /dev/null +++ b/Formula/w/wolfmqtt.rb @@ -0,0 +1,58 @@ +class Wolfmqtt < Formula + desc "Small, fast, portable MQTT client C implementation" + homepage "https://github.com/wolfSSL/wolfMQTT" + url "https://github.com/wolfSSL/wolfMQTT/archive/refs/tags/v1.20.0.tar.gz" + sha256 "3550e04e271cf6c0b8374a9ef8c26e6979a9a3d7473b48023394408e3a0e5bd8" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/wolfSSL/wolfMQTT.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "fad21d70156e12dbc52eb02a1468f874e89a628cb9ef76dbb65e098dd2991170" + sha256 cellar: :any, arm64_sequoia: "b9897c68597eeeba48187bb4b3ca743529a406ce70b5013174fdc6f79f675ea2" + sha256 cellar: :any, arm64_sonoma: "cc5f1af1eb3409e61ff3e8a807e3cabf0e631d878756b361eaee19bc85c87dbc" + sha256 cellar: :any, arm64_ventura: "ee4e1d293bc7c0514fe200e90cf4c5239b10683ae6131891761dbf559233a8a0" + sha256 cellar: :any, sonoma: "e08de62b1f3379411cf925bc0f0f3250519d027c32c16c00482136b4c1a66bc4" + sha256 cellar: :any, ventura: "e50a9d03d02a3ffcb2a3b9bc46526769ef826c01fc8a204f7bdb35ee594e538b" + sha256 cellar: :any_skip_relocation, arm64_linux: "705eb7f13a8c3c4571adcf7ec806bba4fffaaf9e56e62c50db093d2dbc0b58e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4638115b6a7755f4a496b3e22f5c0308c10636c1c9aaf59a5ebe67623a4e5c8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "wolfssl" + + def install + args = %W[ + --disable-silent-rules + --disable-dependency-tracking + --infodir=#{info} + --mandir=#{man} + --prefix=#{prefix} + --sysconfdir=#{etc} + --enable-nonblock + --enable-mt + --enable-mqtt5 + --enable-propcb + --enable-sn + ] + + system "./autogen.sh" + system "./configure", *args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + MqttClient mqttClient; + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lwolfmqtt", "-o", "test" + system "./test" + end +end diff --git a/Formula/w/wolfssl.rb b/Formula/w/wolfssl.rb new file mode 100644 index 0000000000000..f272f9b2ff354 --- /dev/null +++ b/Formula/w/wolfssl.rb @@ -0,0 +1,68 @@ +class Wolfssl < Formula + desc "Embedded SSL Library written in C" + homepage "https://www.wolfssl.com" + # Git checkout automatically enables extra hardening flags + # Ref: https://github.com/wolfSSL/wolfssl/blob/master/m4/ax_harden_compiler_flags.m4#L71 + url "https://github.com/wolfSSL/wolfssl.git", + tag: "v5.8.2-stable", + revision: "decea12e223869c8f8f3ab5a53dc90b69f436eb2" + license "GPL-3.0-or-later" + head "https://github.com/wolfSSL/wolfssl.git", branch: "master" + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+)[._-]stable/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "6bcacaa9f6c73e3cf3186dffe29276a66039f99c73d69d5df8225a0dbe3410ad" + sha256 cellar: :any, arm64_sequoia: "44c8763615d5c0b67f49b16e0d7789329e84fd573277a9dc0c56bc6068917ed8" + sha256 cellar: :any, arm64_sonoma: "9e0676d21cb03b5fa391c1764ca008cd12f8190b217d94e7cf27f8ae68699210" + sha256 cellar: :any, arm64_ventura: "c9e58662829671584d8cfc2c047bcabacd30ef33cdef940c607adcafae651421" + sha256 cellar: :any, sonoma: "45c38bf6c1fca774e0efe0c1789cd74a0a1259d0f199bf3c5f9bd78ba23147a1" + sha256 cellar: :any, ventura: "b1b087f768878b139a39e161b202270b21a7175767a4e65434b62d5c068662da" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9ede4cdae63c6acea1f3a02ac00e640b5cde98a40f466a975d86e0323d8d685" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f83fa4dbec5dab24d91a3e1113a3c6a582cf9cf82249bd4d712d1629389ec264" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + args = %W[ + --infodir=#{info} + --mandir=#{man} + --sysconfdir=#{etc} + --disable-bump + --disable-earlydata + --disable-examples + --disable-fortress + --disable-md5 + --disable-silent-rules + --disable-sniffer + --disable-webserver + --enable-all + --enable-reproducible-build + ] + + # https://github.com/wolfSSL/wolfssl/issues/8148 + args << "--disable-armasm" if OS.linux? && Hardware::CPU.arm? + + # Extra flag is stated as a needed for the Mac platform. + # https://www.wolfssl.com/docs/wolfssl-manual/ch2/ + # Also, only applies if fastmath is enabled. + ENV.append_to_cflags "-mdynamic-no-pic" if OS.mac? + + system "./autogen.sh" + system "./configure", *args, *std_configure_args + system "make" + system "make", "check" + system "make", "install" + end + + test do + system bin/"wolfssl-config", "--cflags", "--libs", "--prefix" + end +end diff --git a/Formula/w/woob.rb b/Formula/w/woob.rb new file mode 100644 index 0000000000000..08481efe17b9f --- /dev/null +++ b/Formula/w/woob.rb @@ -0,0 +1,129 @@ +class Woob < Formula + include Language::Python::Virtualenv + + desc "Web Outside of Browsers" + homepage "https://woob.tech/" + url "https://files.pythonhosted.org/packages/85/f3/a2dc1bb679de004aa1e48c8b77b5d5b9bca3007b2f25e0c39f850a009186/woob-3.7.tar.gz" + sha256 "b1d7113ba87a9b947c13a1e3b4bb4fa616ba3037092b54912fc3fee2647d1b2f" + license "LGPL-3.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "02fe81dedf2bf80816e4b6d92603d515cf3f6e1672861ed3123cee3e56485513" + sha256 cellar: :any, arm64_sequoia: "d80a72b294f9514f7cc3e92616ddbc40515d4a2fb44f16d41b8993e119de6eea" + sha256 cellar: :any, arm64_sonoma: "daf27d15b07a42c37f7f164f98ba0c5caa5f2036a777051ba963373efb8a4006" + sha256 cellar: :any, sonoma: "1ad538cfd73dd7d2ea3f506c3bcd04826d0fa26511bd9cd29f1622e75626957e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1d19015c67bc642556573549da49ec4a61e0f4fcae0393d1c75b670e9536b14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81563926c012d47e4878c4d88c25e49a22570df1704722a67f311ced71b9e017" + end + + depends_on "certifi" + depends_on "gnupg" + depends_on "libyaml" + depends_on "pillow" + depends_on "python@3.14" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: %w[certifi pillow] + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "html2text" do + url "https://files.pythonhosted.org/packages/f8/27/e158d86ba1e82967cc2f790b0cb02030d4a8bef58e0c79a8590e9678107f/html2text-2025.4.15.tar.gz" + sha256 "948a645f8f0bc3abe7fd587019a2197a12436cd73d0d4908af95bfc8da337588" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "pycountry" do + url "https://files.pythonhosted.org/packages/76/57/c389fa68c50590881a75b7883eeb3dc15e9e73a0fdc001cdd45c13290c92/pycountry-24.6.1.tar.gz" + sha256 "b61b3faccea67f87d10c1f2b0fc0be714409e8fcdcc1315613174f6466c10221" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dateutil" do + url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" + sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" + sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz" + sha256 "ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"woob", "config", "modules" + end +end diff --git a/Formula/w/woodpecker-cli.rb b/Formula/w/woodpecker-cli.rb new file mode 100644 index 0000000000000..231648e07c23d --- /dev/null +++ b/Formula/w/woodpecker-cli.rb @@ -0,0 +1,34 @@ +class WoodpeckerCli < Formula + desc "CLI client for the Woodpecker Continuous Integration server" + homepage "https://woodpecker-ci.org/" + url "https://github.com/woodpecker-ci/woodpecker/archive/refs/tags/v3.11.0.tar.gz" + sha256 "0e7edcae7da55be976d138ed34675be69198d24ee337b9d0588f4c0ec495c63d" + license "Apache-2.0" + head "https://github.com/woodpecker-ci/woodpecker.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cfadd32b5b7d7400d85eec147ab57127cdd6055baebe48eb4a4103565c5a3873" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cfadd32b5b7d7400d85eec147ab57127cdd6055baebe48eb4a4103565c5a3873" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfadd32b5b7d7400d85eec147ab57127cdd6055baebe48eb4a4103565c5a3873" + sha256 cellar: :any_skip_relocation, sonoma: "c54c6887778be066c8fc50d45c869af71fac80f24a11e66530f7356ef77c6889" + sha256 cellar: :any_skip_relocation, arm64_linux: "002c4c521c6f6efbac906113a27aa45f7c2fa785b5b9baa8372b7678e5cddc51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f68cb2f8584a01657c26dfb49b58149e2a93c3c263d33bf51ca8b0afce3da509" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X go.woodpecker-ci.org/woodpecker/v#{version.major}/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/cli" + end + + test do + output = shell_output("#{bin}/woodpecker-cli info 2>&1", 1) + assert_match "woodpecker-cli is not set up", output + + output = shell_output("#{bin}/woodpecker-cli lint 2>&1", 1) + assert_match "could not detect pipeline config", output + + assert_match version.to_s, shell_output("#{bin}/woodpecker-cli --version") + end +end diff --git a/Formula/w/woof-doom.rb b/Formula/w/woof-doom.rb new file mode 100644 index 0000000000000..fdd47c21716fd --- /dev/null +++ b/Formula/w/woof-doom.rb @@ -0,0 +1,52 @@ +class WoofDoom < Formula + desc "Woof! is a continuation of the Boom/MBF bloodline of Doom source ports" + homepage "https://github.com/fabiangreffrath/woof" + url "https://github.com/fabiangreffrath/woof/archive/refs/tags/woof_15.2.0.tar.gz" + sha256 "aa2842c2897b1a8c733a79db190c2e6c17cef10651c5cd5105c7bf1360799932" + license "GPL-2.0-only" + head "https://github.com/fabiangreffrath/woof.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e4f6a2d1ff1092cd0277ffcb92e41b6759b80b3ddfc14be7b53cd29448f2fcb0" + sha256 cellar: :any, arm64_sequoia: "9f0b9979cbb09840542e15f524abb725a5531e1c10b7d4bbcfc9333096acd39d" + sha256 cellar: :any, arm64_sonoma: "5cbd903199d7c932b11e369c48ed666f975f54f7e0095d8d282827a16215f370" + sha256 cellar: :any, arm64_ventura: "ecb8f5469dc35e84049fa7ba8fe21548f16c12374fd883503fe301dc8d69e5bc" + sha256 cellar: :any, sonoma: "1a0bb7a3fc9683e6d515d68e18132f7cab5e1b5815e75adf7144869e6078a4c0" + sha256 cellar: :any, ventura: "9bd1b3c7acae2ef026e6d701aaf6daff8037ee9f4477c7a2d207b0403f7e3dd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "dacc4a1a6f973620fc386939b682a9727ddbc26759d8484cfa1a56fe5c815d92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65ec9fc0998e63cc399282a54cc1cdd7f3dd4c676907cc6ed377ad0af0bbd898" + end + + depends_on "cmake" => :build + depends_on "fluid-synth" + depends_on "libebur128" + depends_on "libsndfile" + depends_on "libxmp" + depends_on "openal-soft" + depends_on "sdl2" + depends_on "sdl2_net" + + on_linux do + depends_on "alsa-lib" + end + + conflicts_with "woof", because: "both install `woof` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + testdata = <<~EOS + Invalid IWAD file + EOS + (testpath/"test_invalid.wad").write testdata + + expected_output = "Error: Failed to load test_invalid.wad" + assert_match expected_output, shell_output("#{bin}/woof -nogui -iwad test_invalid.wad 2>&1", 255) + + assert_match version.to_s, shell_output("#{bin}/woof -version") + end +end diff --git a/Formula/w/woof.rb b/Formula/w/woof.rb new file mode 100644 index 0000000000000..f8f1f75d85fc6 --- /dev/null +++ b/Formula/w/woof.rb @@ -0,0 +1,45 @@ +class Woof < Formula + include Language::Python::Shebang + + desc "Ad-hoc single-file webserver" + homepage "https://www.home.unix-ag.org/simon/woof.html" + url "https://github.com/simon-budig/woof/archive/refs/tags/woof-20220202.tar.gz" + sha256 "cf29214aca196a1778e2f5df1f5cc653da9bee8fc2b19f01439c750c41ae83c1" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/simon-budig/woof.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "fb77732fb7843685c636e191145e82994a84ee7eecad8b7c18cc09308eac8362" + end + + uses_from_macos "python" + + conflicts_with "woof-doom", because: "both install `woof` binaries" + + # patch to not use cgi module (removed in python 3.13) + patch do + url "https://github.com/simon-budig/woof/commit/f501798350f98338678832010a26d53f9c33e9d6.patch?full_index=1" + sha256 "8f4b895081cb177ae9aa9b0acee0c42775d2072495eb31c1a2ae9bccd97cce47" + end + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "woof" + bin.install "woof" + end + + test do + port = free_port + pid = spawn bin/"woof", "-s", "-p", port.to_s + sleep 15 + + begin + read = (bin/"woof").read + assert_equal read, shell_output("curl localhost:#{port}/woof") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/w/wordgrinder.rb b/Formula/w/wordgrinder.rb new file mode 100644 index 0000000000000..985d37938edd3 --- /dev/null +++ b/Formula/w/wordgrinder.rb @@ -0,0 +1,47 @@ +class Wordgrinder < Formula + desc "Unicode-aware word processor that runs in a terminal" + homepage "https://cowlark.com/wordgrinder" + url "https://github.com/davidgiven/wordgrinder/archive/refs/tags/0.8.tar.gz" + sha256 "856cbed2b4ccd5127f61c4997a30e642d414247970f69932f25b4b5a81b18d3f" + license "MIT" + revision 1 + head "https://github.com/davidgiven/wordgrinder.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c547d9112c5e07a735c6adb27d6df7c5f82005f5cfd095d0d4beeafd48ced0fd" + sha256 cellar: :any, arm64_sequoia: "281cb8b0ac7c49861af74607ffa9ff36aed7f7899a46bbd18d686cf958c90c1f" + sha256 cellar: :any, arm64_sonoma: "01e1ab04fb507afd5e62ddfee96e629ae7405671a3a6ad107eca9f30771b76b8" + sha256 cellar: :any, arm64_ventura: "b89498bd5c54678e5460ccf146084abdde90853f465f17775657298fe1ba5c91" + sha256 cellar: :any, arm64_monterey: "3eb4bf8cff526d9a6e6c9e285ba2a63879eb157a6ba091dff6be7ad49da749b3" + sha256 cellar: :any, arm64_big_sur: "370093b3705f72a5d6b87bacd2e64e229f3d6ac82e52e92fe147c037d65f210b" + sha256 cellar: :any, sonoma: "47819e0bc05f370758760d534a0f3e5012ad02abad4ec78427f4191439888211" + sha256 cellar: :any, ventura: "1a575a0eff9cd74e4a48a4ede1694349892f5a07c089d9e5bd1be74560eaf5ac" + sha256 cellar: :any, monterey: "2ab17d2541132790b1b134a5d33e5e9178ce96b7afeadf28819a9694f87712da" + sha256 cellar: :any, big_sur: "d2cb8d569e0a7a02abae8deb32adf8a564042cfd6cddaeef4bc1dc16ab05e53b" + sha256 cellar: :any, catalina: "e084da6193fd984ac541e7c21044f80927b60b85ab69512d3824255be1c54d17" + sha256 cellar: :any_skip_relocation, arm64_linux: "761d5901adbb5d8c732f4b1cadf91c9902fe0d30db0188a93b1648efe1a0b886" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07fdfa2bd3da72697fbd54cc93a8bc59b2c3afc3ddbfd55a46cde0e557011ca4" + end + + depends_on "lua" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "ncurses" + + uses_from_macos "zlib" + + def install + ENV["CURSES_PACKAGE"] = "ncursesw" + system "make", "OBJDIR=#{buildpath}/wg-build" + bin.install "bin/wordgrinder-builtin-curses-release" => "wordgrinder" + man1.install "bin/wordgrinder.1" + doc.install "README.wg" + end + + test do + system bin/"wordgrinder", "--convert", "#{doc}/README.wg", "#{testpath}/converted.txt" + assert_path_exists testpath/"converted.txt" + end +end diff --git a/Formula/w/wordle.rb b/Formula/w/wordle.rb new file mode 100644 index 0000000000000..075511b91afd5 --- /dev/null +++ b/Formula/w/wordle.rb @@ -0,0 +1,40 @@ +class Wordle < Formula + desc "Play wordle in command-line" + homepage "https://git.hanabi.in/wordle-cli" + url "https://git.hanabi.in/repos/wordle-cli.git", + tag: "v2.0.0", + revision: "757ede5453457f58b5299fec0b6a0e79fbb27fa9" + license "AGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f6332474a053c58c236812202429c2b5685e581276b067efbccc785278ab5fdd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8186eac18fc030dd6a97de477d2fe257a9824dd542b917a57398bb5ef0fd7acd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b89d59b09b23910b03bd3e7f6ad9e976043ad50202a79aeee9ea43037451e6bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a9db0e2f7b058f74ca8098312cdffa5d5cf60e5f9de7feb115e9eb43be2eb62" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e488788ecd598f500999af6b5ea4f30a026302b1cd0378cfac67c92e361a8ee9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8cb2a9a3f1a194601e659bc9ee54bca569c1a8a6d0915f2d93e6c00f2ba5d5d3" + sha256 cellar: :any_skip_relocation, sonoma: "53572b02a428d5a73c6a0f645f61a6f2a62c15406254c4d8d54c7409b8e1348f" + sha256 cellar: :any_skip_relocation, ventura: "8aa6128d0a94b33dfcb4551e0ed16cdfd5bcf092d7e9e823688b70a32fb7d307" + sha256 cellar: :any_skip_relocation, monterey: "629c70f19e09643f02fe8469d09431e2750f43035133195b048d55ce5538452a" + sha256 cellar: :any_skip_relocation, big_sur: "5d5f3906a8ae79361f3b872af994a0352156aa5ed63a85bbc879631c55e02935" + sha256 cellar: :any_skip_relocation, catalina: "4695e1205537e4f9838111d28acf5b00df5606511237ae271a278f6ab565a332" + sha256 cellar: :any_skip_relocation, arm64_linux: "08089c943e688b6d6ba8ce8574b289cbc29e8b21d08654b294e495104b483535" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30e3260ce269c6e96713e1b0d4f67b8111c7552293c3e37988b6bd59c0a8a6b3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "src/main.go" + end + + test do + require "pty" + stdout, _stdin, _pid = PTY.spawn(bin/"wordle") + prompt_first_line = stdout.readline + striped_line = prompt_first_line.strip + assert_equal striped_line, "Guess a 5-letter word. You have 6 tries." + end +end diff --git a/Formula/w/wordnet.rb b/Formula/w/wordnet.rb new file mode 100644 index 0000000000000..f74b4e387329b --- /dev/null +++ b/Formula/w/wordnet.rb @@ -0,0 +1,58 @@ +class Wordnet < Formula + desc "Lexical database for the English language" + homepage "https://wordnet.princeton.edu/" + url "https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.bz2" + # Version 3.1 is version 3.0 with the 3.1 dictionary. + version "3.1" + sha256 "6c492d0c7b4a40e7674d088191d3aa11f373bb1da60762e098b8ee2dda96ef22" + license :cannot_represent + revision 2 + + # From homepage: "Princeton WordNet is no longer developed, though the + # database and all tools are freely available on the download page." + livecheck do + skip "No longer developed or maintained" + end + + bottle do + sha256 arm64_tahoe: "c76614f1a228d94b2470a7b931ae833377ae13d1214cff36d6a93b5fb7da4ae5" + sha256 arm64_sequoia: "13c3f71489c21a26e9ccab1c57d9021c705fe548ac756787e2641b90a1eadfb9" + sha256 arm64_sonoma: "3189324a36718d3838b41231d17611873cc112740c6179f1672b66a5f7f02530" + sha256 arm64_ventura: "2bce686ad3f16170016ca525ec1908fb76693909f86e7393650e8a411574601a" + sha256 sonoma: "3997310820375bfe93b6cf3512aa70993d47a2a67e54df6140ccbaf736486ada" + sha256 ventura: "323f706e54cc2cb19f4bde6dd703c462337f25763ff8bf9fa52498a10c2a78c7" + sha256 arm64_linux: "3a67f8e72a2b2c2b3119386adefe9ccf353c45bb05598aef4970be2bbe64da1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5090e0ee1251e6d13e6c77024a0d1f18e0b6d563a4ced176d3c2cd1fffb52b7" + end + + depends_on "tcl-tk@8" + + resource "dict" do + url "https://wordnetcode.princeton.edu/wn3.1.dict.tar.gz" + sha256 "3f7d8be8ef6ecc7167d39b10d66954ec734280b5bdcd57f7d9eafe429d11c22a" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + (prefix/"dict").install resource("dict") + + # Disable calling deprecated fields within the Tcl_Interp during compilation. + # https://bugzilla.redhat.com/show_bug.cgi?id=902561 + ENV.append_to_cflags "-DUSE_INTERP_RESULT" + tcltk_lib = Formula["tcl-tk@8"].opt_lib + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-tcl=#{tcltk_lib}", + "--with-tk=#{tcltk_lib}" + ENV.deparallelize + system "make", "install" + end + + test do + output = pipe_output("#{bin}/wn homebrew -synsn") + assert_match "alcoholic beverage", output + end +end diff --git a/Formula/w/wordplay.rb b/Formula/w/wordplay.rb new file mode 100644 index 0000000000000..853f3e48d9bcd --- /dev/null +++ b/Formula/w/wordplay.rb @@ -0,0 +1,60 @@ +class Wordplay < Formula + desc "Anagram generator" + homepage "http://hsvmovies.com/static_subpages/personal_orig/wordplay/" + url "http://hsvmovies.com/static_subpages/personal_orig/wordplay/wordplay722.tar.Z" + version "7.22" + sha256 "9436a8c801144ab32e38b1e168130ef43e7494f4b4939fcd510c7c5bf7f4eb6d" + # From readme: + # This program was written for fun and is free. Distribute it as you please, + # but please distribute the entire package, with the original words721.txt and + # the readme file. If you modify the code, please mention my name in it as the + # original author. Please send me a copy of improvements you make, because I + # may include them in a future version. + license :cannot_represent + + livecheck do + url :homepage + regex(/href=.*?wordplay[._-]?v?(\d+(?:\.\d+)*)\.t/i) + strategy :page_match do |page, regex| + # Naively convert a version string like `722` to `7.22` + page.scan(regex).map { |match| match.first.sub(/^(\d)(\d+)$/, '\1.\2') } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 arm64_tahoe: "52b1abdbfd94ea465505779f4c4b74e5cedc8729f60e2ba8ed5d598082d907d2" + sha256 arm64_sequoia: "7117e25ad1d78a133f0ad6f3e68c7f203cf83387903e27d6346852b97b3c409a" + sha256 arm64_sonoma: "9377c6a3b8e7db879c1cafa0a53eb303fe65e81259c2b99a912c5080fe1834fd" + sha256 arm64_ventura: "e5046dfd7e922872308efed4f745399220ddc5f7f62f4d200748700d136e956a" + sha256 arm64_monterey: "28dcc7b1dd3d809b79e3b331309d2f3ebd4b23383e76813b0397dcc617527e48" + sha256 arm64_big_sur: "5ce75cc234b4d54de31124443d207bae75ed01211cdb23770363efc0b984bc75" + sha256 sonoma: "f2fb80006fb5b7fd74712bdbab04cf8ad2efbfdd17c7b023146a168f560e8570" + sha256 ventura: "1074a6a9d010d50bfe73cea4fbafb6a2d7d90155057e1c25e90394533c9eba83" + sha256 monterey: "f456578ef358b10b91008a83f42e6877a4daa32615588fbb3ac629d9db804c5a" + sha256 big_sur: "086d078ef82bce278ad9bc25d901f1ffd3bd539aef410c7e81466b0616ef2c32" + sha256 catalina: "bf3847365e1920baf313fc0286116de59fee392ccde5182173ed7198b9883626" + sha256 arm64_linux: "40b8d661df34ff03a28922e62a862fa037d3b66925cd51528018f7f45de587d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7e8e9383f4bbbe56afbd9d2c400867ecf0f229a3aa3431c5b809dd95ffd6a30" + end + + # Fixes compiler warnings on Darwin, via MacPorts. + # Point to words file in share. + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/wordplay/patch-wordplay.c" + sha256 "45d356c4908e0c69b9a7ac666c85f3de46a8a83aee028c8567eeea74d364ff89" + end + + def install + inreplace "wordplay.c", "@PREFIX@", prefix + system "make", "CC=#{ENV.cc}" + bin.install "wordplay" + pkgshare.install "words721.txt" + end + + test do + assert_equal "BREW", shell_output("#{bin}/wordplay -s ERWB").strip + end +end diff --git a/Formula/w/wormhole-william.rb b/Formula/w/wormhole-william.rb new file mode 100644 index 0000000000000..2d854a1fa1a0b --- /dev/null +++ b/Formula/w/wormhole-william.rb @@ -0,0 +1,43 @@ +class WormholeWilliam < Formula + desc "End-to-end encrypted file transfer" + homepage "https://github.com/psanford/wormhole-william" + url "https://github.com/psanford/wormhole-william/archive/refs/tags/v1.0.8.tar.gz" + sha256 "42490f3c7e383d7d410e68a83fc18de1a5e9373934a9d71064e10948197759d1" + license "MIT" + head "https://github.com/psanford/wormhole-william.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "34739b2a39653c214c26da30f0d05f88ac8dc70b21f2d35d9d9381fea1bb3f14" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "842582898b124a66cc3f7881433e1a156a9c92b843984b0e74b94d586600fb71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "842582898b124a66cc3f7881433e1a156a9c92b843984b0e74b94d586600fb71" + sha256 cellar: :any_skip_relocation, arm64_ventura: "842582898b124a66cc3f7881433e1a156a9c92b843984b0e74b94d586600fb71" + sha256 cellar: :any_skip_relocation, sonoma: "1c3d2757a23dca9a5f86854b325569056e4627163474d405a6b4a3d68b2ac843" + sha256 cellar: :any_skip_relocation, ventura: "1c3d2757a23dca9a5f86854b325569056e4627163474d405a6b4a3d68b2ac843" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9fc6e936553af437919b8695ddd3e071e38756dea706aea3dc736e1328aac56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "329792c9ade8805ae88177f9c1f47f4fc25d8781df4601a90c3cc17c7957b704" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"wormhole-william", "shell-completion") + end + + test do + # Send "foo" over the wire + code = "#{rand(1e12)}-test" + pid = fork do + exec bin/"wormhole-william", "send", "--code", code, "--text", "foo" + end + + # Give it some time + sleep 2 + + # Receive the text back + assert_match "foo\n", shell_output("#{bin}/wormhole-william receive #{code}") + ensure + Process.wait(pid) + end +end diff --git a/Formula/w/wownero.rb b/Formula/w/wownero.rb new file mode 100644 index 0000000000000..a83e5ad720f00 --- /dev/null +++ b/Formula/w/wownero.rb @@ -0,0 +1,79 @@ +class Wownero < Formula + desc "Official wallet and node software for the Wownero cryptocurrency" + homepage "https://wownero.org" + # TODO: Check if we can use unversioned `protobuf` at version bump + url "https://codeberg.org/wownero/wownero.git", + tag: "v0.11.3.0", + revision: "3e302be710f4e6b4f58642989c8e47711362fa56" + license "BSD-3-Clause" + + # The `strategy` code below can be removed if/when this software exceeds + # version 10.0.0. Until then, it's used to omit a malformed tag that would + # always be treated as newest. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :git do |tags, regex| + malformed_tags = ["10.0.0"].freeze + tags.map do |tag| + next if malformed_tags.include?(tag) + + tag[regex, 1] + end + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e853a94c2180d3369de8bb4f5d04cf7ffea7736b3d1d53f17c69b7bfc3275982" + sha256 cellar: :any, arm64_sonoma: "89cc4a6b275adf3f8e97f36e8cbfa545bf7b892f6e0f26575e47f936cc816fa9" + sha256 cellar: :any, arm64_ventura: "a7573258aa7a6c1aa62858fabdd590b4546d57e3c1c569ba5355361d7e9d7a47" + sha256 cellar: :any, sonoma: "6f1149d4459630ab60f67a3d84a75e73d933b2dd2885ec215e2dbf05a37fbecf" + sha256 cellar: :any, ventura: "b31910c666b6bba034ed47c3a6100f6b42ab5e15ab9f5213e4b831ffc2883d1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c99746fadcd9c5542b9559676cb78175550a5fb77df7ca024e59c9439a98a6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b579603a0d8d4e8f796ef7efb40e6ff5ceab8272bb585b95914991cc2538f720" + end + + disable! date: "2025-05-11", because: "needs to use unmaintained `boost@1.85` and `protobuf@21`" + + depends_on "cmake" => :build + depends_on "miniupnpc" => :build + depends_on "pkgconf" => :build + depends_on "boost@1.85" + depends_on "hidapi" + depends_on "libsodium" + depends_on "libusb" + depends_on "openssl@3" + depends_on "protobuf@21" + depends_on "readline" + depends_on "unbound" + depends_on "zeromq" + + def install + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + # Need to help CMake find `readline` when not using /usr/local prefix + args = %W[-DReadline_ROOT_DIR=#{Formula["readline"].opt_prefix}] + + # Build a portable binary (don't set -march=native) + args << "-DARCH=default" if build.bottle? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + service do + run [opt_bin/"wownerod", "--non-interactive"] + end + + test do + cmd = "yes '' | #{bin}/wownero-wallet-cli --restore-deterministic-wallet " \ + "--password brew-test --restore-height 238084 --generate-new-wallet wallet " \ + "--electrum-seed 'maze vixen spiders luggage vibrate western nugget older " \ + "emails oozed frown isolated ledge business vaults budget " \ + "saucepan faxed aloof down emulate younger jump legion saucepan'" \ + "--command address" + address = "Wo3YLuTzJLTQjSkyNKPQxQYz5JzR6xi2CTS1PPDJD6nQAZ1ZCk1TDEHHx8CRjHNQ9JDmwCDGhvGF3CZXmmX1sM9a1YhmcQPJM" + assert_equal address, shell_output(cmd).lines.last.split[1] + end +end diff --git a/Formula/w/wp-cli-completion.rb b/Formula/w/wp-cli-completion.rb new file mode 100644 index 0000000000000..3f07beaa32419 --- /dev/null +++ b/Formula/w/wp-cli-completion.rb @@ -0,0 +1,23 @@ +class WpCliCompletion < Formula + desc "Bash completion for Wpcli" + homepage "https://github.com/wp-cli/wp-cli" + url "https://github.com/wp-cli/wp-cli/archive/refs/tags/v2.12.0.tar.gz" + sha256 "5edf426895cad99c7fd6486de6618e7360ebcdbdda0684b78d587d67b4749345" + license "MIT" + head "https://github.com/wp-cli/wp-cli.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "157dc6d8f92431bf3084c0ce8b8f78149299ad308b17ca23df5235622213565c" + end + + def install + bash_completion.install "utils/wp-completion.bash" => "wp" + end + + test do + assert_match "-F _wp_complete", + shell_output("bash -c 'source #{bash_completion}/wp && complete -p wp'") + end +end diff --git a/Formula/w/wp-cli.rb b/Formula/w/wp-cli.rb new file mode 100644 index 0000000000000..18eb62fa0c40f --- /dev/null +++ b/Formula/w/wp-cli.rb @@ -0,0 +1,47 @@ +class WpCli < Formula + desc "Command-line interface for WordPress" + homepage "https://wp-cli.org/" + url "https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar" + sha256 "ce34ddd838f7351d6759068d09793f26755463b4a4610a5a5c0a97b68220d85c" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55c3a86b500e2a5c96b7ab4a7c67c6099c379a4b3e8c8ac4ca908cb33a65cf45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "087f15d5afa17ba4483aec086b2945d0dcd477a55987775862fcabe5902ce8ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "087f15d5afa17ba4483aec086b2945d0dcd477a55987775862fcabe5902ce8ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "087f15d5afa17ba4483aec086b2945d0dcd477a55987775862fcabe5902ce8ab" + sha256 cellar: :any_skip_relocation, sonoma: "fe158bfc51b92aeac10cb0d009dd3c44a1e8c1cb0ae60ea9cf9a1b67869e7fa8" + sha256 cellar: :any_skip_relocation, ventura: "fe158bfc51b92aeac10cb0d009dd3c44a1e8c1cb0ae60ea9cf9a1b67869e7fa8" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e1e3cfab199c3600caad543c0f2ea97c676536b37aa0eba544ab34434755f7d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e1e3cfab199c3600caad543c0f2ea97c676536b37aa0eba544ab34434755f7d" + end + + depends_on "php" + + # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix + on_macos do + on_intel do + pour_bottle? only_if: :default_prefix + end + end + + def install + bin.install "wp-cli-#{version}.phar" => "wp" + end + + test do + assert_match version.to_s, shell_output("#{bin}/wp --version") + + # workaround to fix memory exhaustion error + # see https://make.wordpress.org/cli/handbook/guides/common-issues/#php-fatal-error-allowed-memory-size-of-999999-bytes-exhausted-tried-to-allocate-99-bytes + output = shell_output("php -d memory_limit=512M #{bin}/wp core download --path=wptest") + assert_match "Success: WordPress downloaded.", output + end +end diff --git a/Formula/w/wpebackend-fdo.rb b/Formula/w/wpebackend-fdo.rb new file mode 100644 index 0000000000000..5406f1b8d9932 --- /dev/null +++ b/Formula/w/wpebackend-fdo.rb @@ -0,0 +1,49 @@ +class WpebackendFdo < Formula + desc "Freedesktop.org backend for WPE WebKit" + homepage "https://wpewebkit.org/" + url "https://github.com/Igalia/WPEBackend-fdo/releases/download/1.16.0/wpebackend-fdo-1.16.0.tar.xz" + sha256 "beddf321232d5bd08106c179dbc600f8ce88eb3620b4a59a6329063b78f64635" + license "BSD-2-Clause" + head "https://github.com/Igalia/WPEBackend-fdo.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_linux: "3ee140a8b47dcd6cd4e3b108a26efbabe73721258518d8f6725d97e03786a277" + sha256 x86_64_linux: "a1a62d1c3651a0e4cc927c5277c6174702776116108f42d6691507e7bdca6e75" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libepoxy" + depends_on "libwpe" + depends_on :linux + depends_on "mesa" + depends_on "wayland" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"wpe-fdo-test.c").write <<~C + #include "wpe/fdo.h" + #include + int main() { + printf("%u.%u.%u", wpe_fdo_get_major_version(), wpe_fdo_get_minor_version(), wpe_fdo_get_micro_version()); + } + C + ENV.append_to_cflags "-I#{include}/wpe-fdo-1.0 -I#{Formula["libwpe"].opt_include}/wpe-1.0" + ENV.append "LDFLAGS", "-L#{lib}" + ENV.append "LDLIBS", "-lWPEBackend-fdo-1.0" + system "make", "wpe-fdo-test" + assert_equal version.to_s, shell_output("./wpe-fdo-test") + end +end diff --git a/Formula/w/wput.rb b/Formula/w/wput.rb new file mode 100644 index 0000000000000..83a0197b523f4 --- /dev/null +++ b/Formula/w/wput.rb @@ -0,0 +1,55 @@ +class Wput < Formula + desc "Tiny, wget-like FTP client for uploading files" + homepage "https://wput.sourceforge.net/" + url "https://downloads.sourceforge.net/project/wput/wput/0.6.2/wput-0.6.2.tgz" + sha256 "229d8bb7d045ca1f54d68de23f1bc8016690dc0027a16586712594fbc7fad8c7" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "228f7a8a4bc5246862d4ccdd64c22f11ae8fc5400f1a5a923ca999ad308a5919" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7b895351c316eeb37308ac163b54d36c997c2909a00b7ecf3837081af4a1e4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "396180470ace5f8d7640f2097bded1f66af50bac01ba8470ea3023968bc39d6b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f892df6bfff0d575edbbd428c2decb1005b7c8faac2a709976c6489fc7e6719" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0899932c8dc9e51846277c672a4e4a9dcc36c1d999cb460d2e337a927b702a76" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a3456f7990bc7b2caa2d5a3afbff6bb921ee346030a07f4be9a31166c28609bd" + sha256 cellar: :any_skip_relocation, sonoma: "3300e6e7bbc43adc8f1525c8badcf307029b63127163912115555b7b5e99525f" + sha256 cellar: :any_skip_relocation, ventura: "40cca9132e6826d07f8237bbb27419b55012b3e45aee55c39e1e0945f8201afc" + sha256 cellar: :any_skip_relocation, monterey: "39c0ebbfc7502644b9df207fae398036caef7cfcee63d340776d036893964610" + sha256 cellar: :any_skip_relocation, big_sur: "2a5d49be96808777f249d96b6f86e2e0e0e301be0e929ba1eaea99cf79cacf42" + sha256 cellar: :any_skip_relocation, catalina: "77703d5dfb1bde183ccc207ee5e3f14b1a677acc697806a2b16f00c56cc0595e" + sha256 arm64_linux: "ec9a4b8e069c941c18e07b232a30c5e5daf926003d9ff6120b0ac1e21d1f0e5b" + sha256 x86_64_linux: "0fb27e180b9a6f8ef2b3508530874b467449fdac55a347c63f2e86ca360db073" + end + + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + + # The patch is to skip inclusion of malloc.h only on OSX. Upstream: + # https://sourceforge.net/p/wput/patches/22/ + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/wput/0.6.2.patch" + sha256 "a3c47a12344b6f67a5120dd4f838172e2af04f4d97765cc35d22570bcf6ab727" + end + + def install + if Hardware::CPU.arm? + # Workaround for ancient config files not recognizing aarch64 macos. + %w[config.guess config.sub].each do |fn| + cp Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}"/fn, fn + end + end + ENV.append_to_cflags "-fcommon" if OS.linux? + system "./configure", *std_configure_args + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + system bin/"wput", "--version" + end +end diff --git a/Formula/w/wrangler.rb b/Formula/w/wrangler.rb new file mode 100644 index 0000000000000..9aedb6505ba25 --- /dev/null +++ b/Formula/w/wrangler.rb @@ -0,0 +1,59 @@ +class Wrangler < Formula + desc "Refactoring tool for Erlang with emacs and Eclipse integration" + homepage "https://refactoringtools.github.io/docs/wrangler/" + license all_of: ["BSD-3-Clause", "ErlPL-1.1", "GPL-2.0-or-later", "GPL-3.0-or-later"] + revision 5 + head "https://github.com/RefactoringTools/wrangler.git", branch: "master" + + stable do + url "https://github.com/RefactoringTools/wrangler/archive/refs/tags/wrangler1.2.tar.gz" + sha256 "a6a87ad0513b95bf208c660d112b77ae1951266b7b4b60d8a2a6da7159310b87" + + # upstream commit "Fix -spec's to compile in Erlang/OTP 19" + patch do + url "https://github.com/RefactoringTools/wrangler/commit/d81b888fd200dda17d341ec457d6786ef912b25d.patch?full_index=1" + sha256 "b7911206315c32ee08fc89776015cf5b26c97b6cb4f6eff0b73dcf2d583cfe31" + end + + # upstream commit "fixes to make wrangler compile with R21" + patch do + url "https://github.com/RefactoringTools/wrangler/commit/1149d6150eb92dcfefb91445179e7566952e184f.patch?full_index=1" + sha256 "e84cba2ead98f47a16d9bb50182bbf3edf3ea27afefa36b78adc5afdf4aeabd5" + end + + # upstream commit "Update to work with newest OTP" + patch do + url "https://github.com/RefactoringTools/wrangler/commit/d3d84879b4269759b26d009013edc5bcff49a1af.patch?full_index=1" + sha256 "cc37f3042433d2c862f4cd4caa0d5a6b0716bdcb8f4840098ba1b46bca52f24b" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4765b14d43dcbbd7362daed20ef277ee4f07e2d7a1c44abe9c3a87ba9eb61440" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "104fedfdf25f93ef4f3c304d79c9b98f99f0e40b5dee425374b98cf70d355995" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1bd08eb2e81427427c19961ea491968529f2a9a083329effc81763d75cb53978" + sha256 cellar: :any_skip_relocation, sonoma: "123c4474665a332b371cf4e1b0277ab632424d7d2a3ca5a78dc23a27aa2387c9" + sha256 cellar: :any_skip_relocation, ventura: "23bcf0e9f30302473b550eb90ab8ac96d4b1f5afd51a1da33ccd0902cca4e044" + sha256 cellar: :any_skip_relocation, arm64_linux: "272b96bf2e4ef8cfb303bc93246b839f18557c3633584c509353f952ae4de13c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "309087fe8204a4c9ba1a954a159e81c5a89f6538f228068b27c36b8de4f1f97f" + end + + disable! date: "2025-07-01", because: :unmaintained + + depends_on "erlang@24" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # suffix_tree.o:(.bss+0x10): multiple definition of `ST_ERROR'; main.o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + suffixtree = Dir.glob("#{lib}/erlang/*/*/*/suffixtree").shift + assert_predicate Pathname.new(suffixtree), :executable?, "suffixtree must be executable" + end +end diff --git a/Formula/w/wren-cli.rb b/Formula/w/wren-cli.rb new file mode 100644 index 0000000000000..2f9337a4f0f63 --- /dev/null +++ b/Formula/w/wren-cli.rb @@ -0,0 +1,46 @@ +class WrenCli < Formula + desc "Simple REPL and CLI tool for running Wren scripts" + homepage "https://github.com/wren-lang/wren-cli" + url "https://github.com/wren-lang/wren-cli/archive/refs/tags/0.4.0.tar.gz" + sha256 "fafdc5d6615114d40de3956cd3a255e8737dadf8bd758b48bac00db61563cb4c" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "94398558d4e785bfeaf83be6aeec15896129441f07d3226003521bf882a1a200" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09debbe79f6af18ccbb0f2a4aabf117cfa7b3a33fb455fdd7b943ab8c8e399ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "228ccca95d81d073708b4b53278b5fa8a2d4a070c4a0c613cf3eb7181d26ba64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b957b7b11199a05f30c2b5fcaea97cdb2cc2ac212b3e6633e51e2f4b5820a53" + sha256 cellar: :any_skip_relocation, arm64_monterey: "72841b4f7f8562ee72899224e0c1d04c72047be6f86ae00df7aed6c3370320e4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b2f527af8074dda364da8571385473dcaee9b3034d30cd1407ef6a4057e0e4a0" + sha256 cellar: :any_skip_relocation, sonoma: "26e8aa2bdb4bd752760649c2bdb0be3446a6ef032dde08e12be8be9148f0cdcc" + sha256 cellar: :any_skip_relocation, ventura: "2ed8a9779e0eb400fb4ae0c6aa4db564e0ba996b449b267ea054d8220438a756" + sha256 cellar: :any_skip_relocation, monterey: "c4abf9f5a795361333ee735c25c0c72754b69c974f1a910af64414ff7912f398" + sha256 cellar: :any_skip_relocation, big_sur: "1eb3fa798b1204360be58481e36921299678ac6da63ab4f30009b2f452fc6baa" + sha256 cellar: :any_skip_relocation, catalina: "726fa674e71292e1474d7f7d68b7b477f797112a1348cdb4a2240e5d48776a95" + sha256 cellar: :any_skip_relocation, arm64_linux: "c0103413af78077f54ef210d0bb3ef707bfcc9301868252685ec6fb133087d36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2014cc9da16b381e355b12f19a020eaba1cc182c41f07fcb4a17dab5597f6a61" + end + + # Backport fix for glibc >= 2.34 + patch do + url "https://github.com/wren-lang/wren-cli/commit/18553636618a4d33f10af9b5ab92da6431784a8c.patch?full_index=1" + sha256 "ee10f762901cecd897702aa5397868e880d64cfaded95ac76653ee1e01892eec" + end + + def install + if OS.mac? + system "make", "-C", "projects/make.mac" + else + system "make", "-C", "projects/make" + end + bin.install "bin/wren_cli" + pkgshare.install "example" + end + + test do + cp pkgshare/"example/hello.wren", testpath + assert_equal "Hello, world!\n", shell_output("#{bin}/wren_cli hello.wren") + end +end diff --git a/Formula/w/wren.rb b/Formula/w/wren.rb new file mode 100644 index 0000000000000..856a8c5f3f379 --- /dev/null +++ b/Formula/w/wren.rb @@ -0,0 +1,64 @@ +class Wren < Formula + desc "Small, fast, class-based concurrent scripting language" + homepage "https://wren.io" + url "https://github.com/wren-lang/wren/archive/refs/tags/0.4.0.tar.gz" + sha256 "23c0ddeb6c67a4ed9285bded49f7c91714922c2e7bb88f42428386bf1cf7b339" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "8c4291a4d7ced18176f129c62108b7a2f0286501d05b23ba5f3edcc3016f69c9" + sha256 cellar: :any, arm64_sequoia: "32ef27315c3c2718071ccbe516fbdc91934eb94d2a0e5f91ec63c215efb8aea0" + sha256 cellar: :any, arm64_sonoma: "a3100038802e99ce273976dec06b8cd2239cc9146523664938107d867ad9ba60" + sha256 cellar: :any, arm64_ventura: "a56a102a2a2e336cae95c2df5bec5ddc48dcb53dd7c922ae6f19380637f6c759" + sha256 cellar: :any, arm64_monterey: "c3e1412d38068f8218c7753b55468289c1602c0bc60ab2d60f45fb2bb7547dbf" + sha256 cellar: :any, arm64_big_sur: "cbe4d9028c361a3e725091eb9d15b9b040160f03508d674de3052df405691e24" + sha256 cellar: :any, sonoma: "126f8d26f864a6efb1bcddf49d492c5c9246bf3aff05b7cd58b8479e1eba83d8" + sha256 cellar: :any, ventura: "9404afe9b05d7f6c8453162417624aa4c67c1bdd13bc296353c7b3b65aec1329" + sha256 cellar: :any, monterey: "64f267fae9c817599741fa6f00121de14f18c1287df743b33c7c7567e2d5cda0" + sha256 cellar: :any, big_sur: "c54db478f8ec48d08dc4992bb8efe1308d478f20f3177513d0154460e26ad1f0" + sha256 cellar: :any, catalina: "afa48d4ceca7e0e2227bf6fd6204194de239c3b67436a46485a7563673fb4fed" + sha256 cellar: :any_skip_relocation, arm64_linux: "33182bdc7645b09e96f4fdc1b7bc949b9b521e15bd6a3b78569966ba0ad132c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9129580dd56d4ad4ad66ac59e1d43533b54816936fc18d0216a445d576598e0" + end + + def install + if OS.mac? + system "make", "-C", "projects/make.mac" + else + system "make", "-C", "projects/make" + end + lib.install Dir["lib/*"] + include.install Dir["src/include/*"] + pkgshare.install "example" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "wren.h" + + int main() + { + WrenConfiguration config; + wrenInitConfiguration(&config); + WrenVM* vm = wrenNewVM(&config); + WrenInterpretResult result = wrenInterpret(vm, "test", "var result = 1 + 2"); + assert(result == WREN_RESULT_SUCCESS); + wrenEnsureSlots(vm, 0); + wrenGetVariable(vm, "test", "result", 0); + printf("1 + 2 = %d\\n", (int) wrenGetSlotDouble(vm, 0)); + wrenFreeVM(vm); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lwren", "-o", "test" + assert_equal "1 + 2 = 3", shell_output("./test").strip + end +end diff --git a/Formula/w/write-good.rb b/Formula/w/write-good.rb new file mode 100644 index 0000000000000..67703d7d0956e --- /dev/null +++ b/Formula/w/write-good.rb @@ -0,0 +1,26 @@ +class WriteGood < Formula + desc "Naive linter for English prose" + homepage "https://github.com/btford/write-good" + url "https://registry.npmjs.org/write-good/-/write-good-1.0.8.tgz" + sha256 "f54db3db8db0076fd1c05411c7f3923f055176632c51dc4046ab216e51130221" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ce08c97d8a8666ed1721ab835d166e1ff865e2ee2ab23c58018021baf89cf360" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.txt").write "So the cat was stolen." + assert_match "passive voice", shell_output("#{bin}/write-good test.txt", 2) + end +end diff --git a/Formula/w/writerperfect.rb b/Formula/w/writerperfect.rb new file mode 100644 index 0000000000000..b08e96c93d97e --- /dev/null +++ b/Formula/w/writerperfect.rb @@ -0,0 +1,43 @@ +class Writerperfect < Formula + desc "Library for importing WordPerfect documents" + homepage "https://sourceforge.net/p/libwpd/wiki/writerperfect/" + url "https://downloads.sourceforge.net/project/libwpd/writerperfect/writerperfect-0.9.6/writerperfect-0.9.6.tar.xz" + sha256 "1fe162145013a9786b201cb69724b2d55ff2bf2354c3cd188fd4466e7fc324e6" + license any_of: ["LGPL-2.1-or-later", "MPL-2.0"] + + livecheck do + url :stable + regex(%r{url=.*?/writerperfect[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "019f7df6196f57ac72fef8f42879191724bbd71243f5d55df485b5aa7b583eec" + sha256 cellar: :any, arm64_sequoia: "1bcef69c7269aac0ca31db30c82ca222f1ae0a9a9d4e19cb55d3bd7f28974327" + sha256 cellar: :any, arm64_sonoma: "ed3b788e7dfc919303efa063cf9a46553e132339c36016af524e4b5e021f6ec8" + sha256 cellar: :any, arm64_ventura: "27bbb6aa97e00bc78675eebde04a4b08754fca44b466df2f1c8dda4180293c6c" + sha256 cellar: :any, arm64_monterey: "e5cbdebbad8e36cc2cd59a140c2eb4a8a5fd914b4ed9360fa3f1a4042cd74efe" + sha256 cellar: :any, arm64_big_sur: "00f00e38b26c51048a374d8becec3fbc1c1b1c05105710761575ae4906194920" + sha256 cellar: :any, sonoma: "7748782d562017ce5a6acaa24d6f9609aec50c65899f5c0bd983e9b997851c48" + sha256 cellar: :any, ventura: "1411634e211f31dd5ea7d9b6dee254337eb61a68a540104310d7f5ccc1f01ee3" + sha256 cellar: :any, monterey: "bcebaf60ba257cf542554dae36548c5fb0d7b8f1ef7a7c85b55637c1e8bc28aa" + sha256 cellar: :any, big_sur: "434788af114e54153fe89b17ff3c0ddfd879ffd0e59ac822821ede791a33d145" + sha256 cellar: :any, catalina: "d9a391e73e78b29ced39f355c8d52fbba4198af66c578b9d41257422a969cd17" + sha256 cellar: :any_skip_relocation, arm64_linux: "1880e89aea024d9aeb907f7aca699b2e6f4f6913ad2aa7c5cd8757e06cb80ec4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ba99fa8423726871a3437205306e9cec03cc3715ed8630f1e29acd7ae74be14" + end + + depends_on "pkgconf" => :build + depends_on "libodfgen" + depends_on "librevenge" + depends_on "libwpd" + depends_on "libwpg" + depends_on "libwps" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/w/wrk.rb b/Formula/w/wrk.rb new file mode 100644 index 0000000000000..fe128b6b3ae31 --- /dev/null +++ b/Formula/w/wrk.rb @@ -0,0 +1,54 @@ +class Wrk < Formula + desc "HTTP benchmarking tool" + homepage "https://github.com/wg/wrk" + url "https://github.com/wg/wrk/archive/refs/tags/4.2.0.tar.gz" + sha256 "e255f696bff6e329f5d19091da6b06164b8d59d62cb9e673625bdcd27fe7bdad" + # License is modified Apache 2.0 with addition to Section 4 Redistribution: + # + # (e) If the Derivative Work includes substantial changes to features + # or functionality of the Work, then you must remove the name of + # the Work, and any derivation thereof, from all copies that you + # distribute, whether in Source or Object form, except as required + # in copyright, patent, trademark, and attribution notices. + license :cannot_represent + revision 1 + head "https://github.com/wg/wrk.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "006efeee8686cc28a2c7a52afc6e1d21593ff274a6c5a206cc7aec60a756a097" + sha256 cellar: :any, arm64_sequoia: "4c5610d7241ae72132fbeeebfea6b912c4f1c7d71a9cb55f523c07bef1d53ee5" + sha256 cellar: :any, arm64_sonoma: "89a17214695f28852b9be47589b1f8788b7209201c163b2bf39b608c1ba2bacd" + sha256 cellar: :any, arm64_ventura: "f1838e262aaea9a48cd54b0e33c25e39131a9732d5e9b9748498ef37cf468699" + sha256 cellar: :any, arm64_monterey: "dff2f475aaebf54bf90ca442ed041fb857b43249e9c8c7f4503018bb3970a4e3" + sha256 cellar: :any, arm64_big_sur: "8a60990dd837067cc883e28fa18500ed86125cf054f2d4030098423b879b97f6" + sha256 cellar: :any, sonoma: "11ddc1b8dfc48bd2c8bb3b2b96f4b01b5356f5b8d0702d7ee287bf56a96b3b55" + sha256 cellar: :any, ventura: "cd319593d2f5ad2d1335cac14ebbf192af7502a63e83d4b8d1cb6e80fede99e4" + sha256 cellar: :any, monterey: "86b756396151c118e4a2e419b692923a6c8d71a02f355f5c1390fe11659125ab" + sha256 cellar: :any, big_sur: "fcb1b19c7ec424642d0dc7cf0a9a1dde8872a64a4e91fdf07a16f0b64ba10e4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "09305386a05c3e9f9370c7add8c05415c21593b46366db083464acdaf98a9779" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4295514a73470421b9cadc29d0f2873de383cc7b9d31523028d2310ef6e437b" + end + + depends_on "luajit" + depends_on "openssl@3" + + def install + ENV.deparallelize + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? + ENV.append_to_cflags "-I#{Formula["luajit"].opt_include}/luajit-2.1" + args = %W[ + WITH_LUAJIT=#{Formula["luajit"].opt_prefix} + WITH_OPENSSL=#{Formula["openssl@3"].opt_prefix} + ] + args << "VER=#{version}" if build.stable? + system "make", *args + bin.install "wrk" + end + + test do + system bin/"wrk", "-c", "1", "-t", "1", "-d", "1", "https://example.com/" + end +end diff --git a/Formula/w/wrkflw.rb b/Formula/w/wrkflw.rb new file mode 100644 index 0000000000000..3d72b62722b09 --- /dev/null +++ b/Formula/w/wrkflw.rb @@ -0,0 +1,50 @@ +class Wrkflw < Formula + desc "Validate and execute GitHub Actions workflows locally" + homepage "https://github.com/bahdotsh/wrkflw" + url "https://github.com/bahdotsh/wrkflw/archive/refs/tags/v0.7.3.tar.gz" + sha256 "475acd61bff0b6ee4ec58aa566b442355e88d9efe18267c58c1501f3fb93f4bc" + license "MIT" + head "https://github.com/bahdotsh/wrkflw.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "69a89d22d620589197a0d171fcfd9f43fc051bf5c9327d6d6b30f3cb1ed37e1d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d28b3cab440b33149ce174545b7452a7913896b09ff1875cea6a2f4114a74df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "705408d42ef5cebc82f325123dcf12cf11b574d8b8cc0fef54522109e78a0074" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b3306cee6b182cc2fd1655b10f1cf19c92105acd1fff6e317d2e15f1878ce9b" + sha256 cellar: :any_skip_relocation, sonoma: "534d9bca4bc47cfa794bc3baac97d1dea93bccbf3b2ed9289e2dff07f6f17b25" + sha256 cellar: :any_skip_relocation, ventura: "ab659bce1bca4efd0e3abccdfddf515f5126f3ce94bdf8b41121aa0a7b6dc236" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e2f551f4f916d0435ecea589571f991a0b0a2b0701a39b93cb2fc857b05e54a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "118191fdc4326752d6e790f341c440199d09e3ae431f58c0d865a1a5c5dc0572" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args(path: "crates/wrkflw") + end + + test do + assert_match version.to_s, shell_output("#{bin}/wrkflw --version") + + test_action_config = testpath/".github/workflows/test.yml" + test_action_config.write <<~YAML + name: test + + on: [push] + + jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + YAML + + output = shell_output("#{bin}/wrkflw validate #{test_action_config}") + assert_match "Summary: 1 valid, 0 invalid", output + end +end diff --git a/Formula/w/wsk.rb b/Formula/w/wsk.rb new file mode 100644 index 0000000000000..6829040720b42 --- /dev/null +++ b/Formula/w/wsk.rb @@ -0,0 +1,43 @@ +class Wsk < Formula + desc "OpenWhisk Command-Line Interface (CLI)" + homepage "https://openwhisk.apache.org/" + url "https://github.com/apache/openwhisk-cli/archive/refs/tags/1.2.0.tar.gz" + sha256 "cafc57b2f2e29f204c00842541691038abcc4e639dd78485f9c042c93335f286" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b614420f313bdc3e60321943dec593d6baea0d75dff36d25a6152d283f5f5f5b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d021a20a2281bc21cc5e1512fc566d655403d2e807b65108998766d9f2439db5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45818d930ab0aa766ddfbea6a15857d3e39c19dd78e86618cfd891ea30695d8d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3289f914e422c1ada3312a27103e11a726b22ad5e1a473171f8aa4abe798be04" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b1e31bfc35f96c00b8baad80a700475f277a1882d7cf888708eaab2f2cf01651" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "935d6a0ac05fc9c2eba6252a8d229bfcfacc45a0ced4350adf6012f1028228ca" + sha256 cellar: :any_skip_relocation, sonoma: "ede908c9c08b0034f3fef47e62c35dd0ae12581a531f6abc67b03c7de92d348c" + sha256 cellar: :any_skip_relocation, ventura: "67d3ff596d0ca68ace4e880793c592a62b372766672b5da54f5303a5c252213f" + sha256 cellar: :any_skip_relocation, monterey: "d03bbe56e6700b88bc9f7d2ffb645ce14195f104dfb3bfaa3bed3588bd67af4d" + sha256 cellar: :any_skip_relocation, big_sur: "2d325dac127e93392312f4a8a765cd01f5a7cfa31ac393e8fadfb8b68208d1a4" + sha256 cellar: :any_skip_relocation, catalina: "2e9b7418c6896b4adb3bc3f38d6d9884dc2c48dc1570a3c28f5339a62b094bc5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d79b7999699bf03a08e0ba35efeb5bb712c78c2543ca88f8a61a539e337cee9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96a83da4a02e7c018ce5f87968d5d786ddecd6c6f1e1f44a38f5df7c1e12d574" + end + + depends_on "go" => :build + depends_on "go-bindata" => :build + + def install + system "go-bindata", "-pkg", "wski18n", "-o", + "wski18n/i18n_resources.go", "wski18n/resources" + + system "go", "build", *std_go_args + + generate_completions_from_executable(bin/"wsk", "sdk", "install", "bashauto", "--stdout", + shells: [:bash], shell_parameter_format: :none) + end + + test do + system bin/"wsk", "property", "set", "--apihost", "https://127.0.0.1" + end +end diff --git a/Formula/w/wskdeploy.rb b/Formula/w/wskdeploy.rb new file mode 100644 index 0000000000000..614aa114a572e --- /dev/null +++ b/Formula/w/wskdeploy.rb @@ -0,0 +1,49 @@ +class Wskdeploy < Formula + desc "Apache OpenWhisk project deployment utility" + homepage "https://openwhisk.apache.org/" + url "https://github.com/apache/openwhisk-wskdeploy/archive/refs/tags/1.2.0.tar.gz" + sha256 "bffe6f6ef2167189fc38893943a391aaf7327e9e6b8d27be1cc1c26535c06e86" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b62f6e49c4bc8484a1da38511cef47eff090660658b6b284d0a75c0f2b00adcd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0c0e4b40c6a0e7f4a5b07424402fcade78732f3c3c9b190ed6c603a3172044db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dee1aeb56b815b07c277e5e74954c803135b729586eaf82cc78365494a3909e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08cf43fae8646a2da12684d40c5271ea647950788125e7e896d5641984ec98f4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4b42f8375e4d73e6fc92323e40b2c12f98227b4293e0e948cdfc514e698207fe" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "87364286a37d26de6a051ba1d0244de932de11058e041e969ea20400560df8e5" + sha256 cellar: :any_skip_relocation, sonoma: "7cff7f54d9f9a600e9f8871f921f105b2ceebef547433f39dbf9c13529519a60" + sha256 cellar: :any_skip_relocation, ventura: "9a5292f9f476d5fcde994572952c3e1c454367e0a95ec6ac13e416eb37eede43" + sha256 cellar: :any_skip_relocation, monterey: "e3d3c61f5b230af2a2a5776448d06985cee14f9c7aa5b51dc40179922d655df1" + sha256 cellar: :any_skip_relocation, big_sur: "c77d6ad2c5fa8acec45bf9507d840f3de1a125edb5759f6de49427efb454fd38" + sha256 cellar: :any_skip_relocation, catalina: "17ff44da88c60d8c8c3a17fd4e2844c90d1bf7fe460928ae21731da5a7f52740" + sha256 cellar: :any_skip_relocation, arm64_linux: "64612b924eacd2f375233837be737190dce67172247069d910ca354dd00c60b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eabf999a20dc7a3ce1b521b85e4a60731b740413ea133e5299ea534b0c44764a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/wskdeploy version") + + (testpath/"manifest.yaml").write <<~YAML + packages: + hello_world_package: + version: 1.0 + license: Apache-2.0 + YAML + + system bin/"wskdeploy", "-v", + "--apihost", "openwhisk.ng.bluemix.net", + "--preview", + "-m", testpath/"manifest.yaml", + "-u", "abcd" + end +end diff --git a/Formula/w/wslay.rb b/Formula/w/wslay.rb new file mode 100644 index 0000000000000..6b312cdb02dac --- /dev/null +++ b/Formula/w/wslay.rb @@ -0,0 +1,44 @@ +class Wslay < Formula + desc "C websocket library" + homepage "https://wslay.sourceforge.net/" + url "https://github.com/tatsuhiro-t/wslay/releases/download/release-1.1.1/wslay-1.1.1.tar.xz" + sha256 "166cfa9e3971f868470057ed924ae1b53f428db061b361b9a17c0508719d2cb5" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "25dba65b78dad270fd7ac6f2b7324354a528bc5d3d7c68cbcc296b9740905c10" + sha256 cellar: :any, arm64_sequoia: "695e27c926b9cba4a774c0bead3c924fe34f11e9d151e203ee82f83c3be1ae20" + sha256 cellar: :any, arm64_sonoma: "a589896e5f7fce349934f90cee721270752c65cfb58dfca69ce9d13f6bfc52e7" + sha256 cellar: :any, arm64_ventura: "696c0681644905529efaaa30ab237023dc12c9a726af0bd7c700302308401a2a" + sha256 cellar: :any, arm64_monterey: "f09d67afcce3498de58ebcb20cf0c5478ff9cd909fa3841a9545e526c31f9b34" + sha256 cellar: :any, arm64_big_sur: "3921e0d42b7388dd8229d2019d67319330b7c53e862c120612b72565a7eff37f" + sha256 cellar: :any, sonoma: "8215cb7e32c441a1f92c93ede616c06c12eb1b70817185e8d7f606737522aa71" + sha256 cellar: :any, ventura: "643367160b3009f918296e97316bb9e353cca450e0e10e79db7053ba5e563afb" + sha256 cellar: :any, monterey: "9d44bad51a861ee84b5cbdf755d7f786b4b54b49441cc5e424b1921983de0d7d" + sha256 cellar: :any, big_sur: "aa3c50a846b0e72238f22dc55ff1d158e2d2845c75997f6d508383be122d4f8f" + sha256 cellar: :any, catalina: "b0c31393b4065ddad22d079252f4310ccafee1c26d5ea56a58c2bc3bfa728b46" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4d236a3f3f420ec499cb1ff460838a2e64995c6b8127dfc657582452e9bd232" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eee1f87dcfd142d6131fdb354f5aacdfc22991d8666e267dc5ff7fcc6df57eff" + end + + head do + url "https://github.com/tatsuhiro-t/wslay.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "cunit" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "check" + system "make", "install" + end +end diff --git a/Formula/w/wstunnel.rb b/Formula/w/wstunnel.rb new file mode 100644 index 0000000000000..1e975018bc6e1 --- /dev/null +++ b/Formula/w/wstunnel.rb @@ -0,0 +1,48 @@ +class Wstunnel < Formula + desc "Tunnel all your traffic over Websocket or HTTP2" + homepage "https://github.com/erebe/wstunnel" + url "https://github.com/erebe/wstunnel/archive/refs/tags/v10.5.0.tar.gz" + sha256 "e83a4fe2fe17f7e26098b95bbb5d0efa5c02e6fc6f951aa14e697bb7698e683e" + license "BSD-3-Clause" + head "https://github.com/erebe/wstunnel.git", branch: "main" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8d9d492ce7eb4cb8dda20f66e8e18f53e8da3ac05800cc4ffcb466b0df18dae9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e49a22b39aea2e1193b977b301b672917e49e4beaa2a28554b93c357c1a9fd94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15e3855c7b63768eb29937779fd29b20d11f20a28ceb146db3c49e8d2914c8fe" + sha256 cellar: :any_skip_relocation, sonoma: "96bf0f007cf659ae1318e4df7a375add8f9105089571d29abc96a256d33c8f15" + sha256 cellar: :any_skip_relocation, arm64_linux: "bab1f0247a0fe4c34704921aad7f094e02ba6c42d1e9177bad9d2ac28b24e75b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49ec47b615d818dc32837c7955940d76e2079c5a253a1c3a67b639943071a56d" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "wstunnel-cli") + end + + test do + ENV["NO_COLOR"] = "1" + + port = free_port + + pid = fork { exec bin/"wstunnel", "server", "ws://[::]:#{port}" } + sleep 2 + + output = shell_output("curl -sI http://localhost:#{port}") + assert_match "HTTP/1.1 400 Bad Request", output + + assert_match version.to_s, shell_output("#{bin}/wstunnel --version") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end +end diff --git a/Formula/w/wtf.rb b/Formula/w/wtf.rb new file mode 100644 index 0000000000000..ce2f4f7b1da23 --- /dev/null +++ b/Formula/w/wtf.rb @@ -0,0 +1,31 @@ +class Wtf < Formula + desc "Translate common Internet acronyms" + homepage "https://sourceforge.net/projects/bsdwtf/" + url "https://downloads.sourceforge.net/project/bsdwtf/wtf-20230906.tar.gz" + sha256 "ed9c1fa927fcd878cce955fb0bdc586876ee1ae234666be75c3bbd6e5b2a094b" + license :public_domain + + livecheck do + url :stable + regex(%r{url=.*?/wtf[._-]v?(\d{6,8})\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "bc34952388539647f56ffd984f795b2fdea730d0ba466a6bd6ec9aedea6a74cf" + end + + def install + inreplace %w[wtf wtf.6], "/usr/share", share + bin.install "wtf" + man6.install "wtf.6" + (share/"misc").install %w[acronyms acronyms.comp] + (share/"misc").install "acronyms-o.real" => "acronyms-o" + end + + test do + assert_match "where's the food", shell_output("#{bin}/wtf wtf") + end +end diff --git a/Formula/w/wtfis.rb b/Formula/w/wtfis.rb new file mode 100644 index 0000000000000..1bfce2e002610 --- /dev/null +++ b/Formula/w/wtfis.rb @@ -0,0 +1,132 @@ +class Wtfis < Formula + include Language::Python::Virtualenv + + desc "Passive hostname, domain, and IP lookup tool" + homepage "https://github.com/pirxthepilot/wtfis" + url "https://files.pythonhosted.org/packages/52/ca/d0d14844dbb54444318843b8e346ba3b8aa3fc6f8d2f4fcd474e7d5f3291/wtfis-0.13.0.tar.gz" + sha256 "44169d937373e8f34d919c86c3ad71c1fc08b5e06a02a853f6fe5990aba99cff" + license "MIT" + head "https://github.com/pirxthepilot/wtfis.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "9b6a4a8976dbb4749c0647c81eba578041c97589031650c0f746d649d02507f5" + end + + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: ["certifi", "pydantic-core"] + + # `pydantic` is manually updated to support Python 3.14 + # Issue ref: https://github.com/pirxthepilot/wtfis/issues/116 + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz" + sha256 "d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz" + sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz" + sha256 "42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "requests-file" do + url "https://files.pythonhosted.org/packages/3c/f8/5dc70102e4d337063452c82e1f0d95e39abfe67aa222ed8a5ddeb9df8de8/requests_file-3.0.1.tar.gz" + sha256 "f14243d7796c588f3521bd423c5dea2ee4cc730e54a3cac9574d78aca1272576" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shodan" do + url "https://files.pythonhosted.org/packages/c5/06/c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28/shodan-1.31.0.tar.gz" + sha256 "c73275386ea02390e196c35c660706a28dd4d537c5a21eb387ab6236fac251f6" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/97/78/182641ea38e3cfd56e9c7b3c0d48a53d432eea755003aa544af96403d4ac/tldextract-5.3.0.tar.gz" + sha256 "b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/46/2c/c06ef49dc36e7954e55b802a8b231770d286a9758b3d936bd1e04ce5ba88/xlsxwriter-3.2.9.tar.gz" + sha256 "254b1c37a368c444eac6e2f867405cc9e461b0ed97a3233b2ac1e574efb4140c" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Error: Environment variable VT_API_KEY not set", shell_output("#{bin}/wtfis 2>&1", 1) + end +end diff --git a/Formula/w/wtfutil.rb b/Formula/w/wtfutil.rb new file mode 100644 index 0000000000000..cee0b1423ffce --- /dev/null +++ b/Formula/w/wtfutil.rb @@ -0,0 +1,70 @@ +class Wtfutil < Formula + desc "Personal information dashboard for your terminal" + homepage "https://wtfutil.com" + url "https://github.com/wtfutil/wtf/archive/refs/tags/v0.47.0.tar.gz" + sha256 "b6c02be79bd6f9a69da612e5a4b99b43d010859f0144085ddfea6a1c60b5bc60" + license "MPL-2.0" + head "https://github.com/wtfutil/wtf.git", branch: "trunk" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1314c570c7f004cfc9bb67b942b82e785ce062067a988bd7a3c37c856650758c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f397471eb6934abda16cf404c98088e717a71cdf0c83c231e2f44f68a2521fe9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aba2168c6318ff5795f5613d1bd5dbeb5f159d087a36448b71fccd139dccd5c4" + sha256 cellar: :any_skip_relocation, sonoma: "15eaa4978e579e485758fc5a90c44624412d6a7a7a5a87bbb2999f236e59253a" + sha256 cellar: :any_skip_relocation, arm64_linux: "71f4eb01e6245224c034170c4bc778e8ddbf90619bfb60c0d13249b85aa133c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "faf3449b4f21e79186ef45cd5ac086c40bce69bd51667771855dbdea18aa0851" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + testconfig = testpath/"config.yml" + testconfig.write <<~YAML + wtf: + colors: + background: "red" + border: + focusable: "darkslateblue" + focused: "orange" + normal: "gray" + checked: "gray" + highlight: + fore: "black" + back: "green" + text: "white" + title: "white" + grid: + # How _wide_ the columns are, in terminal characters. In this case we have + # six columns, each of which are 35 characters wide + columns: [35, 35, 35, 35, 35, 35] + + # How _high_ the rows are, in terminal lines. In this case we have five rows + # that support ten line of text, one of three lines, and one of four + rows: [10, 10, 10, 10, 10, 3, 4] + navigation: + shortcuts: true + openFileUtil: "open" + sigils: + checkbox: + checked: "x" + unchecked: " " + paging: + normal: "*" + selected: "_" + term: "xterm-256color" + YAML + + begin + pid = fork do + exec bin/"wtfutil", "--config=#{testconfig}" + end + ensure + Process.kill("HUP", pid) + end + end +end diff --git a/Formula/w/wthrr.rb b/Formula/w/wthrr.rb new file mode 100644 index 0000000000000..da70f144c769d --- /dev/null +++ b/Formula/w/wthrr.rb @@ -0,0 +1,44 @@ +class Wthrr < Formula + desc "Weather Companion for the Terminal" + homepage "https://github.com/ttytm/wthrr-the-weathercrab" + url "https://github.com/ttytm/wthrr-the-weathercrab/archive/refs/tags/v1.2.1.tar.gz" + sha256 "ff5b47f2046ebefa9ff28cb52ece49a06f7b89230578801c338c77802aa721e0" + license "MIT" + head "https://github.com/ttytm/wthrr-the-weathercrab.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "374e60034ee75ae89b1ed428b0fccd1af6283c04579823105c05da9edf09b77e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "762cc039b08678cc91207e5aba373a9926b4d7f6bd14b154080ec4c9f0144778" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "423b5d934ed4948e6f91ff46bb6122fe3ef4801357cbe1323abe055e63a4bac4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5c71252f0517231d9b7ea64314591586df9419d5529029c4ef1d7b6ca73b315" + sha256 cellar: :any_skip_relocation, sonoma: "c0a81d0cd757022468358c46c11db2ed9e34baefce396c4403ded61b65088f6e" + sha256 cellar: :any_skip_relocation, ventura: "6b4fdbcd8131123e488055b26f86a6ef912445e4a200b915a9ae4f561a45a753" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2a3a3a1958b67645f20100308854792cc55ddf067a31f403bb251ccb5c2e28f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0d8bda45cf33d2ec34c043302a42b9551d9d7c33dbdc0421c80ccb599db8219" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/wthrr --version") + system bin/"wthrr", "-h" + + require "pty" + + PTY.spawn(bin/"wthrr", "-l", "en_US", "Kyoto") do |r, _w, pid| + output = r.gets + assert_match "Hey friend. I'm glad you are asking.", output + ensure + Process.kill("TERM", pid) + end + end +end diff --git a/Formula/w/wumpus.rb b/Formula/w/wumpus.rb new file mode 100644 index 0000000000000..a1a37f5b3b4d6 --- /dev/null +++ b/Formula/w/wumpus.rb @@ -0,0 +1,44 @@ +class Wumpus < Formula + desc "Exact clone of the ancient BASIC Hunt the Wumpus game" + homepage "http://www.catb.org/~esr/wumpus/" + url "http://www.catb.org/~esr/wumpus/wumpus-1.10.tar.gz" + sha256 "aa059e163b4f516580b83931ae29fbd5796302e854da283b85cc7fc887677d7c" + license "BSD-2-Clause" + + # The homepage links to the `stable` tarball but it can take longer than the + # ten second livecheck timeout, so we check the Git tags as a workaround. + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e06701869c21c2e18ef131477db256df8f876160dcc67eb17d216546f658cba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "418502a95f4ba4577d30f5e48699cb2c434b64cb63bc34bda4d28f8525d3b3b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fb4c854f4a9ca5952140e121567c502f46af0e6ced51b8916bc9fb3147b9a085" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f37eece81c8fdacbd791f7f8365364e2de6630c5ed93bbaffb9624c347b53f8e" + sha256 cellar: :any_skip_relocation, sonoma: "a59c6e421b3d461bfcfdd91b85fcba05a205df3eca4eaf0e0611f83e749f8fcb" + sha256 cellar: :any_skip_relocation, ventura: "6e1866abf23ccf0920311248107cfacd4da35d2081903ade4bde1c7879c4f711" + sha256 cellar: :any_skip_relocation, monterey: "1ceb6248fd61580bb9c99ab1833503cad88c84daf4816771cfdc96f087755fa0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63f9a87dd8a82fc0bf2969cedfca5dd336e0e3575d6792bf3d8e19e6f3506332" + end + + head do + url "https://gitlab.com/esr/wumpus.git", branch: "master" + depends_on "asciidoctor" => :build + end + + # checksum got changed and no response from upstream, https://gitlab.com/esr/wumpus/-/issues/2 + deprecate! date: "2025-09-12", because: :does_not_build + disable! date: "2026-09-12", because: :does_not_build + + def install + system "make" + system "make", "prefix=#{prefix}", "install" + end + + test do + assert_match("HUNT THE WUMPUS", + pipe_output(bin/"wumpus", "^C")) + end +end diff --git a/Formula/w/wuppiefuzz.rb b/Formula/w/wuppiefuzz.rb new file mode 100644 index 0000000000000..0d5db1ab351c1 --- /dev/null +++ b/Formula/w/wuppiefuzz.rb @@ -0,0 +1,44 @@ +class Wuppiefuzz < Formula + desc "Coverage-guided REST API fuzzer developed on top of LibAFL" + homepage "https://github.com/TNO-S3/WuppieFuzz" + url "https://github.com/TNO-S3/WuppieFuzz/releases/download/v1.3.0/source.tar.gz" + sha256 "45d112673c633684459651976119fcb4d8a7f1a74b974ad05de61481b686f49b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "31d3ac521302f3eb809fced503becb69569f12d51f23c9eaf772370d2075ee45" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6fa5391cc83fb00c73315e855bf90da244702f32b9edba1b8f9b74c81df56b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4a1279ae32e5a36b8cf01a567cebda90642bdd7ee946507a545aa77807629a6" + sha256 cellar: :any_skip_relocation, sonoma: "c5b744520db48662e2e061c6934462fd4e4f509bba4d5b7612ed23c0e0bb3b11" + sha256 cellar: :any_skip_relocation, arm64_linux: "b26c23bcd612a6265c81b03255a309f9507ce938e36892c33a06432dc812d85d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbb8158f0378edfb4a61860668181e720fd4366640ec44305929a0b5018e7f87" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "z3" + + uses_from_macos "llvm" => :build # for libclang + + on_linux do + depends_on "openssl@3" + end + + def install + ENV["Z3_LIBRARY_PATH_OVERRIDE"] = Formula["z3"].opt_lib + ENV["Z3_SYS_Z3_HEADER"] = Formula["z3"].opt_include + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/wuppiefuzz version") + + (testpath/"openapi.yaml").write <<~YAML + openapi: 3.0.0 + YAML + + output = shell_output("#{bin}/wuppiefuzz fuzz openapi.yaml 2>&1", 1) + assert_match "Error: Error parsing OpenAPI-file at openapi.yaml", output + end +end diff --git a/Formula/w/wush.rb b/Formula/w/wush.rb new file mode 100644 index 0000000000000..419800f9fcf3b --- /dev/null +++ b/Formula/w/wush.rb @@ -0,0 +1,38 @@ +class Wush < Formula + desc "Transfer files between computers via WireGuard" + homepage "https://github.com/coder/wush" + url "https://github.com/coder/wush/archive/refs/tags/v0.4.1.tar.gz" + sha256 "77d5a912465d1e8ec478252a9a69a04d39af75a126ac9ed94823f33a60b3d8f9" + license "CC0-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5bcff816d0e78213a49c749a5053ad752b2d3c5bec1d8f3ac838352251c167d0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f21f69d5bc1c8bba9a85150bece42c5a97fbf473e39e3dc7c5dc5570e65e2c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0ed64c9cde89d6a856e98bcb0509660ada93f676254560d12df8065e127de7c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c2320aac31be8d68acc3218db510cd3f91be381a695c01e5e8b6f9046e7569e4" + sha256 cellar: :any_skip_relocation, sonoma: "4ed8074f45bf38496a93c58f184b791b36e47363fda9c79d10cbd9bd8f36235b" + sha256 cellar: :any_skip_relocation, ventura: "d3e82478484e85ab52dcd10f1ec7cda04fb09f4e3f67d6a497c2ba3d50ebdfef" + sha256 cellar: :any_skip_relocation, arm64_linux: "260356e6d21223007286d84011a0ec629ae7b18b9be356cc1f67a4175183467e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef23622648237ddf0eb3829977a5137e06d4741d953754bb55029d2855ad96bf" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/wush" + end + + test do + read, write = IO.pipe + + pid = fork do + exec bin/"wush", "serve", out: write, err: write + end + + output = read.gets + assert_includes output, "Picked DERP region" + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/w/wv.rb b/Formula/w/wv.rb new file mode 100644 index 0000000000000..b1fd769ee61c3 --- /dev/null +++ b/Formula/w/wv.rb @@ -0,0 +1,72 @@ +class Wv < Formula + desc "Programs for accessing Microsoft Word documents" + homepage "https://wvware.sourceforge.net/" + url "https://deb.debian.org/debian/pool/main/w/wv/wv_1.2.9.orig.tar.gz" + mirror "https://abisource.com/downloads/wv/1.2.9/wv-1.2.9.tar.gz" + sha256 "4c730d3b325c0785450dd3a043eeb53e1518598c4f41f155558385dd2635c19d" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "95bd09313abe228dca9c215d69041a8781c4ba93da901c8583877fcdc1598304" + sha256 arm64_sequoia: "f43fdf4000603806925c2d0e26fdb5d3f5d6be5c435478964c8dce92484784a3" + sha256 arm64_sonoma: "99b64967c38d1f679aabfad54fa6412939af4e571a4b467541d69be0b3e42bad" + sha256 arm64_ventura: "c121d0e251c7b6a83cef08a85ec05cb2a0c9afc2ea72adc9b70a0bb9f399417c" + sha256 sonoma: "d6cae767da3de4f93a2e601054882abfa09899cb71ba6d6cb3e1735e29a36fd9" + sha256 ventura: "40c5aabe6aa0fd8f5e9f91050d788ece1dfa777e0359f652b2c085edf8d60bb5" + sha256 arm64_linux: "15690cfa4f200e96488ba2bbeb4186f0b9776b402011668a974abf6bf16416c9" + sha256 x86_64_linux: "2ea81d55829b98259a212af78e40fb74d6ab9a83be165a3d7f2c6e6cc91f753d" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libgsf" + depends_on "libpng" + depends_on "libwmf" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + # Work around build errors with newer Clang + if DevelopmentTools.clang_build_version >= 1500 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types -Wno-int-conversion" + end + + args = ["--mandir=#{man}"] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make" + ENV.deparallelize + # the makefile generated does not create the file structure when installing + # till it is fixed upstream, create the target directories here. + # https://www.abisource.com/mailinglists/abiword-dev/2011/Jun/0108.html + + bin.mkpath + (lib/"pkgconfig").mkpath + (include/"wv").mkpath + man1.mkpath + (pkgshare/"wingdingfont").mkpath + (pkgshare/"patterns").mkpath + + system "make", "install" + end + + test do + output = shell_output("#{bin}/wvSummary #{test_fixtures("test.pdf")} 2>&1") + assert_match "No OLE2 signature", output + + assert_match version.to_s, shell_output("#{bin}/wvHtml --version") + end +end diff --git a/Formula/w/wv2.rb b/Formula/w/wv2.rb new file mode 100644 index 0000000000000..8a012741649f4 --- /dev/null +++ b/Formula/w/wv2.rb @@ -0,0 +1,173 @@ +class Wv2 < Formula + desc "Programs for accessing Microsoft Word documents" + homepage "https://wvware.sourceforge.net/" + url "https://downloads.sourceforge.net/project/wvware/wv2-0.4.2.tar.bz2" + sha256 "9f2b6d3910cb0e29c9ff432f935a594ceec0101bca46ba2fc251aff251ee38dc" + license all_of: [ + "LGPL-2.0-only", + "LGPL-2.0-or-later", # ustring files from KDE project + "LGPL-2.1-only", # zcodec files + ] + + livecheck do + url :stable + regex(%r{url=.*?/wv2[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab51a5126a4df61b38dd41445e5d456b7878326d9c4f9fec306abf45f3989730" + sha256 cellar: :any, arm64_sequoia: "0b9e9d8d06ee14ba09ec9f467e24aba00ecc63966bb877fc88a3868a2fb2041c" + sha256 cellar: :any, arm64_sonoma: "ab4eca06cc176e58df0a6d57de60929427e68ce2d8dc1fc9f71b2a15a88c59d3" + sha256 cellar: :any, arm64_ventura: "590dea1f89ca9fe964215ad6b338aa92ca782157d77bb867a568c380cf9259f0" + sha256 cellar: :any, arm64_monterey: "dda217f7db1f6f78199bb54741c836013f9bc563641925be66e76fee4f001738" + sha256 cellar: :any, arm64_big_sur: "e757d5cf4bd8db93cd2b4383b38c748ea78f0f301d1740aa661ec35ee9e9ea1d" + sha256 cellar: :any, sonoma: "4e7812b4c35074f80f86a7357e6b2d065fe69c6a7fc45395d8c54748d742171e" + sha256 cellar: :any, ventura: "f9dec0774e036ac09259037d18e036fa27098f72e5ce2f4ce0386e484e3a19eb" + sha256 cellar: :any, monterey: "2ad3a28d44f4fbdfc073a3de3cb1067497d718478eb33d678dbe12cad6c905ef" + sha256 cellar: :any, big_sur: "097b7d4e10b4ef00d8298ef897acb9baa3c9b84aa0b7416e4e561700e8ab408b" + sha256 cellar: :any, catalina: "944451190aa61c6ea3dd74fffbc9e92e999b8eeb559a46f4c4708d5f9b4f154f" + sha256 cellar: :any_skip_relocation, arm64_linux: "518a054d34f8325f987b1ff4fbc61ad9d2966c61f880f9ead78d461927dec15d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bd22b4bd66ddf417a1ee0882ca0dfc3b4bcb218d50e890a28a1752d5e4c546b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "libgsf" + + uses_from_macos "zlib" + + # Temporary test resource for bottles built before testole.doc was added. + resource "testole.doc" do + url "https://sourceforge.net/p/wvware/svn/2/tree/wv2-trunk/tests/testole.doc?format=raw" + sha256 "fd3a5e28d96655fa320c3118f5ccdc6435034513779b1f59f88e8d8892e78954" + end + + # Remove .la file creation logic it does not work with CMake 4, and .la files + # are cleaned up post-build. + patch :DATA + + def install + ENV.append "LDFLAGS", "-lgobject-2.0" # work around broken detection + ENV.append "LDFLAGS", "-liconv" if OS.mac? + # Help libgsf find its libxml2 dependency. It is not directly used by wv2 + ENV.append "CXXFLAGS", "-I#{Formula["libxml2"].include}/libxml2" unless OS.mac? + + # Workaround to build with CMake 4 + args = %w[-DCMAKE_POLICY_VERSION_MINIMUM=3.5] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (pkgshare/"test").install "tests/testole.doc" + end + + test do + testpath.install resource("testole.doc") + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + #include + #include + #include + #include + + using namespace wvWare; + + void test( bool result, const std::string& failureMessage, const std::string& successMessage = "" ) + { + if ( result ) { + if ( !successMessage.empty() ) + std::cerr << successMessage << std::endl; + } + else { + std::cerr << failureMessage << std::endl; + std::cerr << "Test NOT finished successfully." << std::endl; + ::exit( 1 ); + } + } + + void test( bool result ) + { + test( result, "Failed", "Passed" ); + } + + // A small testcase for the parser (Word97) + int main( int argc, char** argv ) + { + std::string file; + file = "testole.doc"; + + std::cerr << "Testing the parser with " << file << "..." << std::endl; + + SharedPtr parser( ParserFactory::createParser( file ) ); + std::cerr << "Trying... " << std::endl; + if ( parser ) + test ( parser->parse() ); + std::cerr << "Done." << std::endl; + + return 0; + } + CPP + + wv2_flags = shell_output("#{bin}/wv2-config --cflags --libs").chomp.split + system ENV.cxx, "test.cpp", "-L#{Formula["libgsf"].lib}", + "-L#{Formula["glib"].lib}", *wv2_flags, "-o", "test" + assert_match "Done", shell_output("#{testpath}/test 2>&1 testole.doc") + end +end + +__END__ +--- a/cmake/MacroCreateLibtoolFile.cmake ++++ b/cmake/MacroCreateLibtoolFile.cmake +@@ -9,45 +9,4 @@ MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_valu + ENDMACRO (GET_TARGET_PROPERTY_WITH_DEFAULT) + + MACRO(CREATE_LIBTOOL_FILE _target _install_DIR) +- GET_TARGET_PROPERTY(_target_location ${_target} LOCATION) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_static_lib ${_target} STATIC_LIB "") +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dependency_libs ${_target} LT_DEPENDENCY_LIBS "") +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_current ${_target} LT_VERSION_CURRENT 0) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_age ${_target} LT_VERSION_AGE 0) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_revision ${_target} LT_VERSION_REVISION 0) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_installed ${_target} LT_INSTALLED yes) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_shouldnotlink ${_target} LT_SHOULDNOTLINK yes) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlopen ${_target} LT_DLOPEN "") +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlpreopen ${_target} LT_DLPREOPEN "") +- GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE) +- GET_FILENAME_COMPONENT(_soname ${_target_location} NAME) +- SET(_laname ${PROJECT_BINARY_DIR}/${_laname}.la) +- FILE(WRITE ${_laname} "# ${_laname} - a libtool library file\n") +- FILE(WRITE ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n") +- FILE(WRITE ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" ) +- FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n") +- FILE(APPEND ${_laname} "dlname='${_soname}'\n\n") +- FILE(APPEND ${_laname} "# Names of this library.\n") +- FILE(APPEND ${_laname} "library_names='${_soname}.${_target_current}.${_target_age}.${_target_revision} ${_soname}.${_target_current} ${_soname}'\n\n") +- FILE(APPEND ${_laname} "# The name of the static archive.\n") +- FILE(APPEND ${_laname} "old_library='${_target_static_lib}'\n\n") +- FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n") +- FILE(APPEND ${_laname} "dependency_libs='${_target_dependency_libs}'\n\n") +- FILE(APPEND ${_laname} "# Names of additional weak libraries provided by this library\n") +- FILE(APPEND ${_laname} "weak_library_names=''\n\n") +- FILE(APPEND ${_laname} "# Version information for ${_laname}.\n") +- FILE(APPEND ${_laname} "current=${_target_current}\n") +- FILE(APPEND ${_laname} "age=${_target_age}\n") +- FILE(APPEND ${_laname} "revision=${_target_revision}\n\n") +- FILE(APPEND ${_laname} "# Is this an already installed library?\n") +- FILE(APPEND ${_laname} "installed=${_target_installed}\n\n") +- FILE(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\n") +- FILE(APPEND ${_laname} "shouldnotlink=${_target_shouldnotlink}\n\n") +- FILE(APPEND ${_laname} "# Files to dlopen/dlpreopen\n") +- FILE(APPEND ${_laname} "dlopen='${_target_dlopen}'\n") +- FILE(APPEND ${_laname} "dlpreopen='${_target_dlpreopen}'\n\n") +- FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n") +- FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}${_install_DIR}'\n") +-# INSTALL( FILES ${_laname} ${_soname} DESTINATION ${CMAKE_INSTALL_PREFIX}${_install_DIR}) +- INSTALL( FILES ${_laname} DESTINATION ${CMAKE_INSTALL_PREFIX}${_install_DIR}) + ENDMACRO(CREATE_LIBTOOL_FILE) diff --git a/Formula/w/wwwoffle.rb b/Formula/w/wwwoffle.rb new file mode 100644 index 0000000000000..ff8cc7cd1d47c --- /dev/null +++ b/Formula/w/wwwoffle.rb @@ -0,0 +1,46 @@ +class Wwwoffle < Formula + desc "Better browsing for computers with intermittent connections" + homepage "https://www.gedanken.org.uk/software/wwwoffle/" + url "https://www.gedanken.org.uk/software/wwwoffle/download/wwwoffle-2.9j.tgz" + sha256 "b16dd2549dd47834805343025638c06a0d67f8ea7022101c0ce2b6847ba011c6" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.gedanken.org.uk/software/wwwoffle/download/" + regex(/href=.*?wwwoffle[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a7047aea7ece9dfdee1b2f1ed3c8fe41c90a51c6411e523b63105e49d80857ca" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "114a59c443772a746833b3431d2cd275755ae5f8eed92326c7763e2097eca980" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dba1da001f686548a7ba1ecb2bb6a2fe34a5fb6c821846c3f47c3d6bf461ca1a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f20e830e259aeb9fabef5702a220934f688385a47a91d90dd8fffdb09f79f1b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eb1c21a7a1850d20ea78fbf76ee08b7b2341b3f37c23ea0f1a298416b18b613c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "539834a9911070c87d6c34d0b12a16ab29d58fa4688f74ca1103c90c58364db1" + sha256 cellar: :any_skip_relocation, sonoma: "80adf385afba9d02106863608c488a5d0e385fb1b444dea3d5416a59b51e9283" + sha256 cellar: :any_skip_relocation, ventura: "69e42ae01329c558154b980a98a590d65c70adb3ab97732c02ced755c24bce06" + sha256 cellar: :any_skip_relocation, monterey: "c9d09ae17f69d7f18e421b2ab893a1dccd64d15ad9a41f0d987c1c9c81bfaf86" + sha256 cellar: :any_skip_relocation, big_sur: "46fe1104b067d2e6c93edf3f4d3ca12e82e2e6b3db5ba99b3b94d3d4ce23fc6a" + sha256 cellar: :any_skip_relocation, catalina: "5e01196bd5b95300b944ac6c5bd7cf10999a3ec9cb24f2f2a09b97b0256b87f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "364d7e80791686aea7174f34a719f858612c73c1e9e7d99dccb6a70b13a7f6e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddd784479bb56270b0d643cb2cccbc9e48264423c4190c1a1b251988dd503b68" + end + + uses_from_macos "flex" => :build + uses_from_macos "zlib" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"wwwoffle", "--version" + end +end diff --git a/Formula/w/wxlua.rb b/Formula/w/wxlua.rb new file mode 100644 index 0000000000000..15b8cad82df4e --- /dev/null +++ b/Formula/w/wxlua.rb @@ -0,0 +1,74 @@ +class Wxlua < Formula + desc "Lua bindings for wxWidgets cross-platform GUI toolkit" + homepage "https://github.com/pkulchenko/wxlua" + url "https://github.com/pkulchenko/wxlua/archive/refs/tags/v3.2.0.2.tar.gz" + sha256 "62abe571803a9748e19e86e39cb0e254fd90a5925dc5f0e35669e693cbdb129e" + license "LGPL-2.0-or-later" => { with: "WxWindows-exception-3.1" } + revision 2 + head "https://github.com/pkulchenko/wxlua.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0f63c60c406c9dae244b02faed0197cac05750d67d8b8cce6b7ef409552375d2" + sha256 cellar: :any, arm64_sequoia: "bab4b714917c8eaa227c442ec73933b7a7366a9a0b12194775f5d5ed51afad32" + sha256 cellar: :any, arm64_sonoma: "c5fad089244f71343cbb95de5a40af99d9bfaa9d74eea565945794c0a6b3a9fd" + sha256 cellar: :any, arm64_ventura: "850b90ff67e8cf4d2ff3c4be320a639e289a5a89edc0f0e2835baab13a5ece9c" + sha256 cellar: :any, sonoma: "3c3912fba2919d8b041b502c10f077c54cba423e30c2d055606d341077d693bf" + sha256 cellar: :any, ventura: "f2edee1dfc8cc68afa93490705f6250dbc688a0a004e723fa8e6429b6614da39" + sha256 cellar: :any_skip_relocation, arm64_linux: "148fb602637b776ef7e3d48eae4c4289de06f3985166176e9d8eee98ff86f6c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7f08d50a654d1506fd6e0212b629e49a1b8bd3ff910b0317826540ff4a03832" + end + + depends_on "cmake" => :build + depends_on "lua" + depends_on "wxwidgets@3.2" + + on_linux do + depends_on "xorg-server" => :test + end + + def install + lua = Formula["lua"] + lua_version = lua.version.major_minor + wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)*)?$/) }.to_formula + wx_config = wxwidgets.opt_bin/"wx-config-#{wxwidgets.version.major_minor}" + + args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DwxLua_LUA_LIBRARY_VERSION=#{lua_version} + -DwxLua_LUA_INCLUDE_DIR=#{lua.opt_include}/lua + -DwxLua_LUA_LIBRARY=#{lua.opt_lib/shared_library("liblua")} + -DwxWidgets_CONFIG_EXECUTABLE=#{wx_config} + -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE + ] + # Some components are not enabled in brew `wxwidgets`: + # * webview - needs `webkitgtk` dependency + # * media - needs `gstreamer` dependency + args << "-DwxWidgets_COMPONENTS=gl;stc;xrc;richtext;propgrid;html;aui;adv;core;xml;net;base" if OS.linux? + + system "cmake", "-S", "wxLua", "-B", "build-wxlua", *args, *std_cmake_args + system "cmake", "--build", "build-wxlua" + system "cmake", "--install", "build-wxlua" + + (lib/"lua"/lua_version).install lib/shared_library("libwx") => "wx.so" + prefix.install bin.glob("*.app") + end + + test do + (testpath/"example.wx.lua").write <<~LUA + require('wx') + print(wxlua.wxLUA_VERSION_STRING) + LUA + + if OS.linux? + xvfb_pid = spawn Formula["xorg-server"].bin/"Xvfb", ":1" + ENV["DISPLAY"] = ":1" + sleep 10 + end + + assert_match "wxLua #{version}", shell_output("lua example.wx.lua") + ensure + Process.kill("TERM", xvfb_pid) if xvfb_pid + end +end diff --git a/Formula/w/wxmaxima.rb b/Formula/w/wxmaxima.rb new file mode 100644 index 0000000000000..dd65069ab6262 --- /dev/null +++ b/Formula/w/wxmaxima.rb @@ -0,0 +1,95 @@ +class Wxmaxima < Formula + desc "Cross platform GUI for Maxima" + homepage "https://wxmaxima-developers.github.io/wxmaxima/" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/wxMaxima-developers/wxmaxima.git", branch: "main" + + stable do + url "https://github.com/wxMaxima-developers/wxmaxima/archive/refs/tags/Version-25.04.0.tar.gz" + sha256 "ec0b3005c3663f1bb86b0cc5028c2ba121e1563e3d5b671afcb9774895f4191b" + + # Backport fix for wxWidgets 3.3 + patch do + url "https://github.com/wxMaxima-developers/wxmaxima/commit/0449b7e42809db16df87c3fbe95c37a756c04587.patch?full_index=1" + sha256 "9784a43c08ec0b57c6ba710943a0665bbcdfc16bd4ab59fb4dc7c26586291c34" + end + end + + livecheck do + url :stable + regex(/^Version[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "cc11b4097517d7f5703e8f68fce4584e1e0bc54608d734c8d1d0375635dad68c" + sha256 arm64_sequoia: "ec8ca3fae6f7edc7593eb84c6c4216f9ae2dd4a3c014dbb7553acd78e3302e3d" + sha256 arm64_sonoma: "7d82d9ec873119248214f833fb7029eac8875aa57c5701a57370b44f76e3cd58" + sha256 arm64_ventura: "d557599c3b3eefd79b147758ca60611e9b6d57e57c1e41c004140e418d2205d4" + sha256 sonoma: "24fa662cd77d0dd9f745942e8c1b74467b3711e03f13b9dae6f087687abaec69" + sha256 ventura: "b66e7b2778a0b7588bebac86db1f4b3aaa7726b40f5acb606fc36a5e096b2ffe" + sha256 arm64_linux: "4bb515d654a2f26fc2b3ca0f8482970c48d475ab3329e262504ca6a24e2a51d0" + sha256 x86_64_linux: "e321b5e9522666e570bcdbec80ab1573bdc874933adbdcc4ce324393dae553ee" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "ninja" => :build + + depends_on "maxima" + depends_on "wxwidgets" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1300 + end + + fails_with :clang do + build 1300 + cause <<~EOS + .../src/MathParser.cpp:1239:10: error: no viable conversion from returned value + of type 'CellListBuilder<>' to function return type 'std::unique_ptr' + return tree; + ^~~~ + EOS + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1300) + + # Disable CMake fixup_bundle to prevent copying dylibs + inreplace "src/CMakeLists.txt", "fixup_bundle(", "# \\0" + + # https://github.com/wxMaxima-developers/wxmaxima/blob/main/Compiling.md#wxwidgets-isnt-found + args = OS.mac? ? [] : ["-DWXM_DISABLE_WEBVIEW=ON"] + + system "cmake", "-S", ".", "-B", "build-wxm", "-G", "Ninja", *args, *std_cmake_args + system "cmake", "--build", "build-wxm" + system "cmake", "--install", "build-wxm" + bash_completion.install "data/wxmaxima" + + return unless OS.mac? + + bin.write_exec_script prefix/"wxmaxima.app/Contents/MacOS/wxmaxima" + end + + def caveats + <<~EOS + When you start wxMaxima the first time, set the path to Maxima + (e.g. #{HOMEBREW_PREFIX}/bin/maxima) in the Preferences. + + Enable gnuplot functionality by setting the following variables + in ~/.maxima/maxima-init.mac: + gnuplot_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ + draw_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ + EOS + end + + test do + # Error: Unable to initialize GTK+, is DISPLAY set properly + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_equal "wxMaxima #{version}", shell_output("#{bin}/wxmaxima --version 2>&1").chomp + assert_match "extra Maxima arguments", shell_output("#{bin}/wxmaxima --help 2>&1", 1) + end +end diff --git a/Formula/w/wxpython.rb b/Formula/w/wxpython.rb new file mode 100644 index 0000000000000..a4e185b4e1b1b --- /dev/null +++ b/Formula/w/wxpython.rb @@ -0,0 +1,62 @@ +class Wxpython < Formula + desc "Python bindings for wxWidgets" + homepage "https://www.wxpython.org/" + url "https://files.pythonhosted.org/packages/4c/d9/4451392d3d6ba45aa23aa77a6f1a9970b43351b956bf61e10fd513a1dc38/wxPython-4.2.3.tar.gz" + sha256 "20d6e0c927e27ced85643719bd63e9f7fd501df6e9a8aab1489b039897fd7c01" + license "LGPL-2.0-or-later" => { with: "WxWindows-exception-3.1" } + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "8a416da81b00e340aedfb70409dd2756892f131e254487fbf9156a71b72f7e53" + sha256 cellar: :any, arm64_sequoia: "8fa76752837630fc7e483766625cd7d971374cb41cdf28e778f2acd098fb57f8" + sha256 cellar: :any, arm64_sonoma: "5be8e6d76dcd20efb79201245869740e05ad04335765c8eca0a7c51b5794f3ab" + sha256 cellar: :any, sonoma: "fc5a08d8e273c66763ba05448229a20ce65f5c514cf8fa59a5c2c9c8366c008b" + sha256 arm64_linux: "6c49edde10b7f4471fa1396045a114d68e084b9f9e64c2af4aef2439bccf47de" + sha256 x86_64_linux: "d9dece9868196fa78b4270172e955c87b04fa856ec02ede6bcfb1868e95cdb7b" + end + + depends_on "doxygen" => :build + depends_on "python-setuptools" => :build + depends_on "sip" => :build + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.14" + depends_on "wxwidgets@3.2" # issue ref: https://github.com/wxWidgets/Phoenix/issues/2764 + + on_linux do + depends_on "pkgconf" => :build + depends_on "gtk+3" + end + + pypi_packages exclude_packages: %w[numpy pillow] + + def python + "python3.14" + end + + def install + # Avoid requests build dependency which is used to download pre-builts + inreplace "build.py", /^(import|from) requests/, "#\\0" + + wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)*)?$/) }.to_formula + wx_config = wxwidgets.opt_bin/"wx-config-#{wxwidgets.version.major_minor}" + ENV["WX_CONFIG"] = wx_config.to_s + + ENV.cxx11 + ENV["DOXYGEN"] = Formula["doxygen"].opt_bin/"doxygen" + system python, "-u", "build.py", "dox", "touch", "etg", "sip", "build_py", + "--release", + "--use_syswx", + "--prefix=#{prefix}", + "--jobs=#{ENV.make_jobs}", + "--verbose", + "--nodoc" + system python, "-m", "pip", "install", "--config-settings=--build-option=--skip-build", *std_pip_args, "." + end + + test do + output = shell_output("#{python} -c 'import wx ; print(wx.__version__)'") + assert_match version.to_s, output + end +end diff --git a/Formula/w/wxwidgets.rb b/Formula/w/wxwidgets.rb new file mode 100644 index 0000000000000..dfad6597b19dd --- /dev/null +++ b/Formula/w/wxwidgets.rb @@ -0,0 +1,107 @@ +class Wxwidgets < Formula + desc "Cross-platform C++ GUI toolkit" + homepage "https://www.wxwidgets.org" + url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.3.1/wxWidgets-3.3.1.tar.bz2" + sha256 "f936c8d694f9c49a367a376f99c751467150a4ed7cbf8f4723ef19b2d2d9998d" + license "LGPL-2.0-or-later" => { with: "WxWindows-exception-3.1" } + head "https://github.com/wxWidgets/wxWidgets.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "2e0e49d77a50fae093ba05fbb33dd7e7f85904e41d19d183a0d1d0536259a781" + sha256 cellar: :any, arm64_sequoia: "68e7b48517034aee17f6dd2a01e0bc187eb8bb3134eef1a8e21d1aa1588dccc7" + sha256 cellar: :any, arm64_sonoma: "5c0ef73e591ab78fd499d70c1c3d2c9c7075235e1d0b58cbdebdce1d9d9e07a3" + sha256 cellar: :any, arm64_ventura: "cbe903ce43449aab311c9bf986bcffb088ce140b92e9d48aaa27029e25710089" + sha256 cellar: :any, sonoma: "2ccc3efe4545d4427d9d05babebec32412b373922b32a4449c7ac1016ea8fbd2" + sha256 cellar: :any, ventura: "a75c5640475ea3d3de76bd1a6c94f500bd563424db049572b77b46923a01d14c" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbbcc4091bd5549e44971ccd98d3c7b9c331e2b902fb3f4ed63d8045f62a1b73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21d22b573549d66b83d46cc784fcdc3bb092098c0ce12b6c5a5a32700c1beb01" + end + + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "pcre2" + depends_on "webp" + + uses_from_macos "expat" + uses_from_macos "zlib" + + on_linux do + depends_on "cairo" + depends_on "fontconfig" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "libsm" + depends_on "libx11" + depends_on "libxkbcommon" + depends_on "libxtst" + depends_on "libxxf86vm" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "pango" + depends_on "wayland" + end + + def install + # Remove all bundled libraries excluding `nanosvg` which isn't available as formula + %w[catch pcre libwebp].each { |l| rm_r(buildpath/"3rdparty"/l) } + %w[expat jpeg png tiff zlib].each { |l| rm_r(buildpath/"src"/l) } + + # Work around removal of AGL in Tahoe + inreplace "configure", "-framework AGL", "" + + args = [ + "--enable-clipboard", + "--enable-controls", + "--enable-dataviewctrl", + "--enable-display", + "--enable-dnd", + "--enable-graphics_ctx", + "--enable-svg", + "--enable-webviewwebkit", + "--with-expat", + "--with-libjpeg", + "--with-libpng", + "--with-libtiff", + "--with-libwebp", + "--with-opengl", + "--with-zlib", + "--disable-tests", + "--disable-precomp-headers", + # This is the default option, but be explicit + "--disable-monolithic", + ] + + if OS.mac? + # Set with-macosx-version-min to avoid configure defaulting to 10.5 + args << "--with-macosx-version-min=#{MacOS.version}" + args << "--with-osx_cocoa" + args << "--with-libiconv" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + + # wx-config should reference the public prefix, not wxwidgets's keg + # this ensures that Python software trying to locate wxpython headers + # using wx-config can find both wxwidgets and wxpython headers, + # which are linked to the same place + inreplace bin/"wx-config", prefix, HOMEBREW_PREFIX + + # For consistency with the versioned wxwidgets formulae + bin.install_symlink bin/"wx-config" => "wx-config-#{version.major_minor}" + (share/"wx"/version.major_minor).install share/"aclocal", share/"bakefile" + end + + test do + system bin/"wx-config", "--libs" + end +end diff --git a/Formula/w/wxwidgets@3.2.rb b/Formula/w/wxwidgets@3.2.rb new file mode 100644 index 0000000000000..d16d8e2c21228 --- /dev/null +++ b/Formula/w/wxwidgets@3.2.rb @@ -0,0 +1,114 @@ +class WxwidgetsAT32 < Formula + desc "Cross-platform C++ GUI toolkit" + homepage "https://www.wxwidgets.org" + url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.8.1/wxWidgets-3.2.8.1.tar.bz2" + sha256 "ad0cf6c18815dcf1a6a89ad3c3d21a306cd7b5d99a602f77372ef1d92cb7d756" + license "LGPL-2.0-or-later" => { with: "WxWindows-exception-3.1" } + + livecheck do + url :stable + regex(/^v?(3\.2(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "cd33f7af0dcb20beb90aacf4f7d9945e7739c689b31821a69e9eef088ef3bc3b" + sha256 cellar: :any, arm64_sequoia: "c11bad8fce2b1b905e6b9e9dd67738f4576931725e5b15a35efea59f6134cd82" + sha256 cellar: :any, arm64_sonoma: "df003b80251db48b7a37f47c36fae426ebdbdaf167709eea66cf77b497a14739" + sha256 cellar: :any, arm64_ventura: "bef52303b87c67ce3dc08b5f4493f31e0b00137df6f9bacf8bbd952d37ee6915" + sha256 cellar: :any, sonoma: "8fc6ebee377f04e35bf3f31b1c03fe7560d5044ad600e85a1250a3c293c5b67a" + sha256 cellar: :any, ventura: "e9c85776e9917d705f8cd0d6eae928baca1afcf9c603b9b8ab5ce1dd049952c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "010072339b9063e6a92be9001c330606dfe520e9671a7c9f4dba0582532241b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be9ecb99906f780193393b15622fb1fe5d13b941dbbfe4676d0a8a7750d9957a" + end + + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "pcre2" + + uses_from_macos "expat" + uses_from_macos "zlib" + + on_linux do + depends_on "cairo" + depends_on "fontconfig" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "libsm" + depends_on "libx11" + depends_on "libxkbcommon" + depends_on "libxtst" + depends_on "libxxf86vm" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "pango" + depends_on "wayland" + end + + def install + # Remove all bundled libraries excluding `nanosvg` which isn't available as formula + %w[catch pcre].each { |l| rm_r(buildpath/"3rdparty"/l) } + %w[expat jpeg png tiff zlib].each { |l| rm_r(buildpath/"src"/l) } + + # Work around removal of AGL in Tahoe + inreplace "configure", "-framework AGL", "" + + args = [ + "--enable-clipboard", + "--enable-controls", + "--enable-dataviewctrl", + "--enable-display", + "--enable-dnd", + "--enable-graphics_ctx", + "--enable-std_string", + "--enable-svg", + "--enable-unicode", + "--enable-webviewwebkit", + "--with-expat", + "--with-libjpeg", + "--with-libpng", + "--with-libtiff", + "--with-opengl", + "--with-zlib", + "--disable-tests", + "--disable-precomp-headers", + # This is the default option, but be explicit + "--disable-monolithic", + ] + + if OS.mac? + # Set with-macosx-version-min to avoid configure defaulting to 10.5 + args << "--with-macosx-version-min=#{MacOS.version}" + args << "--with-osx_cocoa" + args << "--with-libiconv" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + + # wx-config should reference the public prefix, not wxwidgets's keg + # this ensures that Python software trying to locate wxpython headers + # using wx-config can find both wxwidgets and wxpython headers, + # which are linked to the same place + inreplace bin/"wx-config", prefix, HOMEBREW_PREFIX + + # Move some files out of the way to prevent conflict with `wxwidgets` + (bin/"wxrc").unlink + bin.install bin/"wx-config" => "wx-config-#{version.major_minor}" + (share/"wx"/version.major_minor).install share/"aclocal", share/"bakefile" + end + + def caveats + <<~EOS + To avoid conflicts with the wxwidgets formula, `wx-config` and `wxrc` + have been installed as `wx-config-#{version.major_minor}` and `wxrc-#{version.major_minor}`. + EOS + end + + test do + system bin/"wx-config-#{version.major_minor}", "--libs" + end +end diff --git a/Formula/w/wy60.rb b/Formula/w/wy60.rb new file mode 100644 index 0000000000000..2cbbc396400c4 --- /dev/null +++ b/Formula/w/wy60.rb @@ -0,0 +1,36 @@ +class Wy60 < Formula + desc "Wyse 60 compatible terminal emulator" + homepage "https://code.google.com/archive/p/wy60/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wy60/wy60-2.0.9.tar.gz" + sha256 "f7379404f0baf38faba48af7b05f9e0df65266ab75071b2ca56195b63fc05ed0" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "27074202271ebad114a776e830498514e56da281471bdd05eed3d4eb00dbee09" + sha256 arm64_sequoia: "6e8b275623922f42137e8d90712e41890ac44f9218dc7ff8d8476068d7497f01" + sha256 arm64_sonoma: "e40096fbc12217c535cf856513e7a659c5e496f0a03ac1f3cbbc2c82782dbb5f" + sha256 arm64_ventura: "4416be14e5f87f206fd75dca1e15f6b2a1ec3a0fc2e1264c3d242c57dadf1217" + sha256 arm64_monterey: "af9022e78bcd0a863d72bcc0c7ddeb5fa004318e7d3e39f17f630b0e6d3f25cc" + sha256 arm64_big_sur: "700b80eb03a92465ae6a0860bf3c3eb572c9bc97799eec577e2fcb694c050148" + sha256 sonoma: "fdfd9a3863cbb38a5d87eeeb04de4ccab9e503243848d7384173b47a7b7075cb" + sha256 ventura: "9274cf2e7bf58a7ae51ddc8d96634ad46c185bd177098b332069e5d8c3f545e0" + sha256 monterey: "8ca95f2514f7950df479ab89844c07038fdfed5b8b730a26a938be0e85bd4c41" + sha256 big_sur: "d9f755155083e888e0c001dc6590e88f90c5c1ae7868d7ec36865e127f60e066" + sha256 catalina: "29247a3617870bdb8364f9ce1b6d167b6029b016683dc5da39816b0a637bf5ef" + sha256 arm64_linux: "49410228b9210e6f2cfb22d8cf47ec007ce53b63ce2ad77980696efa5ea5f61f" + sha256 x86_64_linux: "a6e03720948c91ccddf6881bf9770a13ff9b1560b52e4ab007da15257c1bb3c1" + end + + uses_from_macos "ncurses" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"wy60", "--version" + end +end diff --git a/Formula/w/wzprof.rb b/Formula/w/wzprof.rb new file mode 100644 index 0000000000000..48d3641628ca6 --- /dev/null +++ b/Formula/w/wzprof.rb @@ -0,0 +1,50 @@ +class Wzprof < Formula + desc "Profiling for Wazero" + homepage "https://github.com/dispatchrun/wzprof" + url "https://github.com/dispatchrun/wzprof/archive/refs/tags/v0.2.0.tar.gz" + sha256 "20223095b6b0bcb7ee655e755d2979f743a1bd03bf4fb09928856356caa9d463" + license "Apache-2.0" + head "https://github.com/dispatchrun/wzprof.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1730b8de6730863c0725a3468613f2d9c5ad5165da36a44b134b1f30ccbe2012" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09412fe4df2eeb2fa3e05a8da39a192f7bb5e38b98ef5c6924f93dd50b8c6abe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "75f3a9f0120d54457ee0a116bcfb52147831bb466ef1b7cba2db1bdda93401ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e5cd9073cd439d27d735796f4f88ca53e320d00767202195df23a151cd207f7e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e5cd9073cd439d27d735796f4f88ca53e320d00767202195df23a151cd207f7e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e5cd9073cd439d27d735796f4f88ca53e320d00767202195df23a151cd207f7e" + sha256 cellar: :any_skip_relocation, sonoma: "e81bdeda7ca477bd619d663d733abf9a551a50c684e9a3f41967617160067428" + sha256 cellar: :any_skip_relocation, ventura: "38d8f01a22a239c240d6e00db065fc8036f5ae039501925ec0df0a0366983bba" + sha256 cellar: :any_skip_relocation, monterey: "38d8f01a22a239c240d6e00db065fc8036f5ae039501925ec0df0a0366983bba" + sha256 cellar: :any_skip_relocation, big_sur: "38d8f01a22a239c240d6e00db065fc8036f5ae039501925ec0df0a0366983bba" + sha256 cellar: :any_skip_relocation, arm64_linux: "1387c049a3862b7cf8daee964ed611fb4a6c4a77756b91d1e9d538447c6f70ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a163de238c1aa3233c725104f4a523cc26d6fd30c5c132d4e408415bdce3ac1d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/wzprof" + end + + test do + resource "simple.wasm" do + url "https://github.com/dispatchrun/wzprof/raw/c2e9f22/testdata/c/simple.wasm" + sha256 "f838a6edabfc830177f10f8cba0a07f36bb1d81209d4300f6d41ad2305756b3a" + end + + testpath.install resource("simple.wasm") + expected = <<~EOS + start + func1 malloc(10): 0x11500 + func21 malloc(20): 0x11510 + func31 malloc(30): 0x11530 + end + EOS + assert_equal expected, shell_output("#{bin}/wzprof -sample 1 #{testpath}/simple.wasm 2>&1") + + assert_match "wzprof version #{version}", shell_output("#{bin}/wzprof -version") + end +end diff --git a/Formula/w3m.rb b/Formula/w3m.rb deleted file mode 100644 index 7b5f4cf4666e5..0000000000000 --- a/Formula/w3m.rb +++ /dev/null @@ -1,43 +0,0 @@ -class W3m < Formula - desc "Pager/text based browser" - homepage "https://w3m.sourceforge.io/" - revision 5 - head "https://github.com/tats/w3m.git" - - stable do - url "https://downloads.sourceforge.net/project/w3m/w3m/w3m-0.5.3/w3m-0.5.3.tar.gz" - sha256 "e994d263f2fd2c22febfbe45103526e00145a7674a0fda79c822b97c2770a9e3" - - # Upstream is effectively Debian https://github.com/tats/w3m at this point. - # The patches fix a pile of CVEs - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/w/w3m/w3m_0.5.3-36.debian.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/w/w3m/w3m_0.5.3-36.debian.tar.xz" - sha256 "e7f41ac222c55830ce121e1c50e67ab04b292837b9bb1ece2eae2689c82147ec" - apply "patches/010_upstream.patch", - "patches/020_debian.patch" - end - end - - bottle do - sha256 "e8aa7de4835538616cd9902bb49cbc1bf5c897969c9fdcc8aed9ecd42175e376" => :mojave - sha256 "4b0be4259e778c1c7df97d43b9e176e019e6de5d7bdeceec89baa34bdc0392db" => :high_sierra - sha256 "1e2305cc1e1e717648d331a44d3f0867ad20e63a50fbdd0d824e4482e4d8a6f7" => :sierra - sha256 "745f4a07f511c4a9ecbf4cb12bba58eac9c36a92291945134cbebe4fe03dc747" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "bdw-gc" - depends_on "openssl" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-image", - "--with-ssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - test do - assert_match /DuckDuckGo/, shell_output("#{bin}/w3m -dump https://duckduckgo.com") - end -end diff --git a/Formula/wabt.rb b/Formula/wabt.rb deleted file mode 100644 index 4401dbf718d3e..0000000000000 --- a/Formula/wabt.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Wabt < Formula - desc "Web Assembly Binary Toolkit" - homepage "https://github.com/WebAssembly/wabt" - url "https://github.com/WebAssembly/wabt/archive/1.0.6.tar.gz" - sha256 "62c04fe50404b494a5d8f78e9a991c72c97ab87c558b5ca1a52508b313a19178" - - bottle do - cellar :any_skip_relocation - sha256 "53fa692681e9730178bdd2cbfa6efeab8b2d7b589c239fa676ab6c32a93e6f7d" => :mojave - sha256 "025c2420c8f8dcc85ce1114f652fd186c797ca4fb7f1c0027dd464a922d45d81" => :high_sierra - sha256 "b4ff2cf3e9d106b4b3a1a4d77c3f662aa0c94c1dbd48d4aeefec8e9ec5c55e23" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DBUILD_TESTS=OFF", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"sample.wast").write("(module (memory 1) (func))") - system "#{bin}/wat2wasm", testpath/"sample.wast" - end -end diff --git a/Formula/wait_on.rb b/Formula/wait_on.rb deleted file mode 100644 index aadbc10da2361..0000000000000 --- a/Formula/wait_on.rb +++ /dev/null @@ -1,29 +0,0 @@ -class WaitOn < Formula - desc "Provides shell scripts with access to kqueue(3)" - homepage "https://www.freshports.org/sysutils/wait_on/" - url "https://pkg.freebsd.org/ports-distfiles/wait_on-1.1.tar.gz" - mirror "https://mirrorservice.org/sites/distfiles.macports.org/wait_on/wait_on-1.1.tar.gz" - sha256 "d7f40655f5c11e882890340826d1163050e2748de66b292c15b10d32feb6490f" - - bottle do - cellar :any_skip_relocation - sha256 "500c8192d5cc65f906844fcca12f837d1e498d396ac60f368c195cf773bb6d4d" => :mojave - sha256 "ca2dfaf2a1449ae1066826846cbdc9963efb837277f258c57304669f8615ad0f" => :high_sierra - sha256 "31a21b915c4f8d901ed5d51d14f3f2f81993ed07891832fdbfb314b7cc8599e5" => :sierra - sha256 "f362694f30021c32557e23b5add36ac4bdfbcabc6056996c5d23fc125527d85d" => :el_capitan - sha256 "1719c6f8843af24cc8a985ee3e246fd10c6fe7b08297a1086e0636ed437199fd" => :yosemite - sha256 "91acf6c588980ddfa44f17778a82eac20e0b1cc8401f21d2c145060a83fae97b" => :mavericks - end - - depends_on "bsdmake" => :build - - def install - system "bsdmake" - bin.install "wait_on" - man1.install "wait_on.1.gz" - end - - test do - system "#{bin}/wait_on", "-v" - end -end diff --git a/Formula/wakatime-cli.rb b/Formula/wakatime-cli.rb deleted file mode 100644 index 7a5acfe03c421..0000000000000 --- a/Formula/wakatime-cli.rb +++ /dev/null @@ -1,28 +0,0 @@ -class WakatimeCli < Formula - desc "Command-line interface to the WakaTime api" - homepage "https://wakatime.com/" - url "https://files.pythonhosted.org/packages/04/db/9917533f8fd503f636f8c5655d9055f2fbef6f90a12a0210b92994f6f823/wakatime-10.4.1.tar.gz" - sha256 "8acef3ab83dbf9b5cc7592510b9dea1b75f20f4bdf60650329431b81e7f125a9" - - bottle do - cellar :any_skip_relocation - sha256 "de1250de51e5a98e72a6719ab36ec7ff27d5cfe073bf2977e407dbede12fd92e" => :mojave - sha256 "21070f5a585ac2b80bcd97c28a6edfcf24a1225bc9fd92b8fbe02de904e66d44" => :high_sierra - sha256 "21070f5a585ac2b80bcd97c28a6edfcf24a1225bc9fd92b8fbe02de904e66d44" => :sierra - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - ENV["PYTHONPATH"] = libexec/"lib/python#{xy}/site-packages" - - system "python3", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/wakatime", "--help" - end -end diff --git a/Formula/wakeonlan.rb b/Formula/wakeonlan.rb deleted file mode 100644 index 88d07c33c2035..0000000000000 --- a/Formula/wakeonlan.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Wakeonlan < Formula - desc "Sends magic packets to wake up network-devices" - homepage "https://github.com/jpoliv/wakeonlan" - url "https://github.com/jpoliv/wakeonlan/archive/wakeonlan-0.41.tar.gz" - sha256 "1d8c3cd106f515167e49134abb8209af891ca152a00ee94a8c5137f654e079bc" - - bottle do - cellar :any_skip_relocation - sha256 "5fc2054a08a4ce9d08b5d004917acb1b57b198611f693503fca252550778a90b" => :mojave - sha256 "876e4fd4919523eb2db07159a7c7d82fa30bec74972f0ef69c55588831db8a4d" => :high_sierra - sha256 "2cb19ca9617f87fc2c14536434f17b44174336a739fed3ad83404ccfb412ee31" => :sierra - sha256 "7da7f512ae921016be21fa3899d4f01841e3da5bc96570fcd85b530e4e720c06" => :el_capitan - sha256 "78a5d905b250ddb09cc3fa4296f2ffc8c925788a7d8e5d05e96f5581e81a7e9d" => :yosemite - sha256 "0669ec3967a728dd2962727896711f418556491ad172483240e84110843998e0" => :mavericks - end - - def install - system "perl", "Makefile.PL" - system "make" - bin.install "blib/script/wakeonlan" - man1.install "blib/man1/wakeonlan.1" - end - - test do - system "#{bin}/wakeonlan", "--version" - end -end diff --git a/Formula/walkmod.rb b/Formula/walkmod.rb deleted file mode 100644 index 5b075caf633ec..0000000000000 --- a/Formula/walkmod.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Walkmod < Formula - desc "Java-based open source tool to apply and share code conventions" - homepage "http://www.walkmod.com" - url "https://bitbucket.org/rpau/walkmod/downloads/walkmod-3.0.0-installer.zip" - sha256 "7d83564b8b11ce02b5a0924e552a8f006524003a03749e5fe901c937cff3d544" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - bin.install_symlink libexec+"bin/walkmod" - end - - test do - system "git", "clone", "--depth", "1", "https://github.com/walkmod/walkmod-core.git" - cd "walkmod-core" - system bin/"walkmod", "chains" - end -end diff --git a/Formula/wallpaper.rb b/Formula/wallpaper.rb deleted file mode 100644 index 95853e55e8aaa..0000000000000 --- a/Formula/wallpaper.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Wallpaper < Formula - desc "Manage the desktop wallpaper" - homepage "https://github.com/sindresorhus/macos-wallpaper" - url "https://github.com/sindresorhus/macos-wallpaper/archive/v2.0.0.tar.gz" - sha256 "49ab6121dcc78d17aae3219ceeeb1846792855179f11021192e5c42e500b166c" - head "https://github.com/sindresorhus/macos-wallpaper.git" - - bottle do - cellar :any_skip_relocation - sha256 "08a90adb9ccb0c522b09b801f25d018529d0ec1b40dfcd0bf457a4533e9bcf47" => :mojave - sha256 "bdf9b70a15c4060ba202631c2a3e803ff37369d2d3994d913b67dd840c124f1e" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - depends_on :macos => :sierra - - def install - system "swift", "build", "-c", "release", "-Xswiftc", "-static-stdlib", "--disable-sandbox" - bin.install ".build/release/wallpaper" - end - - test do - system "#{bin}/wallpaper", "get" - end -end diff --git a/Formula/wandio.rb b/Formula/wandio.rb deleted file mode 100644 index 50cecbfd20abd..0000000000000 --- a/Formula/wandio.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Wandio < Formula - desc "Transparently read from and write to zip, bzip2, lzma or zstd archives" - homepage "https://research.wand.net.nz/software/libwandio.php" - url "https://research.wand.net.nz/software/wandio/wandio-4.0.0.tar.gz" - sha256 "f6d9c81c1ad0b7a99696c057fb02e5c04a9c240effd6bf587a5b02352ce86a9f" - - bottle do - cellar :any - sha256 "9964682cfb6e23baace99a67c86e821e1af876639abdc8da2f547a9af22cd1b2" => :mojave - sha256 "758e3f124fa77a0c52431746e7a75da699c6717697662f696a70381050e0aa66" => :high_sierra - sha256 "e0c976e9684b3cd990c21bc50fdb6c6bbc3a4bd77f0641e26f8741e0783fd999" => :sierra - sha256 "921de26a27560963d4b4c92ce7e7afa852ad7e1a949184933245d8404a48f1ed" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--with-http", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/wandiocat", "-h" - end -end diff --git a/Formula/waon.rb b/Formula/waon.rb deleted file mode 100644 index 0d313d64b49b0..0000000000000 --- a/Formula/waon.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Waon < Formula - desc "Wave-to-notes transcriber" - homepage "https://kichiki.github.io/WaoN/" - url "https://github.com/kichiki/WaoN/archive/v0.11.tar.gz" - sha256 "75d5c1721632afee55a54bcbba1a444e53b03f4224b03da29317e98aa223c30b" - - bottle do - cellar :any - sha256 "22b3f3cc1a0796db2bf6b808b7157a2e1cacf30b6437998a9f5bdc9482bbfbf8" => :mojave - sha256 "5c3c49f0740bfcf9d34fd9468af3d9caa8f19c53ee1d25f8d69442d63859c9ab" => :high_sierra - sha256 "d7fd9859544bf3ccb739942f0db00928469356f4d82ab7848cdba2ae5c5e99e9" => :sierra - sha256 "6f09559eaf287022f280991b44b5f4e86435fafda167c97a78239602183a3758" => :el_capitan - sha256 "a16c4df918f59a71396d7c4a5806bafe4bda4a89d3aeb2a52d8dfd41ce6c0432" => :yosemite - sha256 "7469ec9aa8f549c1294ddb362f8ec2473466c5b027007f3c14fb49984353d813" => :mavericks - sha256 "bccba5b437852618f1d67fb521dfc2684bb4d70461c61966e97cdd286be40842" => :mountain_lion - end - - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "libsndfile" - - def install - system "make", "-f", "Makefile.waon", "waon" - bin.install "waon" - man1.install "waon.1" - end - - test do - system "say", "check one two", "-o", testpath/"test.aiff" - system "#{bin}/waon", "-i", testpath/"test.aiff", "-o", testpath/"output.midi" - assert_predicate testpath/"output.midi", :exist? - end -end diff --git a/Formula/warp.rb b/Formula/warp.rb deleted file mode 100644 index 51f81d5bdd45e..0000000000000 --- a/Formula/warp.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Warp < Formula - desc "Secure terminal sharing with one simple command" - homepage "https://github.com/spolu/warp" - url "https://github.com/spolu/warp/archive/v0.0.3.tar.gz" - sha256 "9079899099b63ee470e693b7f2723cbf8d75cafe880b4329cf9f516c2669e8ca" - - bottle do - cellar :any_skip_relocation - sha256 "0d48b2519458f997d8591c1f3bc645e9877486b95849656651865376450bf2d0" => :mojave - sha256 "214fdbd64070317a1a5026b54a590d1783c295ac7240ac442092314ab861a252" => :high_sierra - sha256 "562aed9e482aa4423476a0a83e9ecb36822ac19968f4440362a3b273bdcaf4dc" => :sierra - sha256 "cc33305d446538db611f039f585648afed84268b1c98fc9a0c5ded76185eee0e" => :el_capitan - sha256 "7bad4e1c81ee20c9908e7317bf8d8b71c807df95355e1e232ac055769b56a9c4" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - mkdir_p buildpath/"src/github.com/spolu/" - ln_sf buildpath, buildpath/"src/github.com/spolu/warp" - - system "go", "build", "-o", "#{bin}/warp", "github.com/spolu/warp/client/cmd/warp" - end - - test do - rand_id = (0...16).map { ("a".."z").to_a[rand(26)] }.join - out = shell_output("#{bin}/warp connect test-#{rand_id}") - - assert_match /Connected to warp:/, out - assert_match /(Received warp_unknown|Not running in a terminal)/, out - end -end diff --git a/Formula/wartremover.rb b/Formula/wartremover.rb deleted file mode 100644 index adf6c797d217b..0000000000000 --- a/Formula/wartremover.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Wartremover < Formula - desc "Flexible Scala code linting tool" - homepage "https://github.com/wartremover/wartremover" - url "https://github.com/wartremover/wartremover/archive/v2.3.7.tar.gz" - sha256 "7a418ec9cd5fddb8499b6e1551071be0553cd66c63378107e3e561c47ce421ca" - head "https://github.com/wartremover/wartremover.git" - - bottle do - cellar :any_skip_relocation - sha256 "7be61c2a96a178c4cdafc761bd72e04a24d5e12c1dc4ad6d5b8432c23de751f9" => :mojave - sha256 "dfa2c1fc983b25b25dac84a17bc0616ed830f2e90dd103f07c4256c9e088ea9a" => :high_sierra - sha256 "69bae9cedcd33931a7eeb9154069550930f9d25546f9e6be9e69a6ee68163d31" => :sierra - end - - depends_on "sbt" => :build - depends_on :java => "1.8" - - def install - system "./sbt", "-sbt-jar", Formula["sbt"].opt_libexec/"bin/sbt-launch.jar", - "core/assembly" - libexec.install "wartremover-assembly.jar" - bin.write_jar_script libexec/"wartremover-assembly.jar", "wartremover", :java_version => "1.8" - end - - test do - (testpath/"foo").write <<~EOS - object Foo { - def foo() { - var msg = "Hello World" - println(msg) - } - } - EOS - cmd = "#{bin}/wartremover -traverser org.wartremover.warts.Unsafe foo 2>&1" - assert_match "var is disabled", shell_output(cmd, 1) - end -end diff --git a/Formula/watch-sim.rb b/Formula/watch-sim.rb deleted file mode 100644 index c1e0fe4179336..0000000000000 --- a/Formula/watch-sim.rb +++ /dev/null @@ -1,29 +0,0 @@ -class WatchSim < Formula - desc "Command-line WatchKit application launcher" - homepage "https://github.com/alloy/watch-sim" - url "https://github.com/alloy/watch-sim/archive/1.0.0.tar.gz" - sha256 "138616472e980276999fee47072a24501ea53ce3f7095a3de940e683341b7cba" - head "https://github.com/alloy/watch-sim.git" - - bottle do - cellar :any_skip_relocation - sha256 "c4f22fd7f296de0c9ace463d4a6b292212178e45a5c483201ee247cc9d33be75" => :mojave - sha256 "79348a2b95cd3ad0398977a30e46a379cff2b7319941061eebd394342f90d8b2" => :high_sierra - sha256 "4c0b4b9cf453585d826f3950eba375d8dea80194c50c8d5ab3a014dec9a49c0d" => :sierra - sha256 "1a7666cc09ecf2228350ea766d0f8e3bd32ab545ac44d9b17b7dc42107c6f15d" => :el_capitan - sha256 "06d95de04920d991ee1ee5a9e8035fb12ef103aa072382cef82cab683797e8d9" => :yosemite - sha256 "b04846befdb378679cdd93bdf182784a8ed0da3957cb0b4a124576b3cd06e54c" => :mavericks - end - - depends_on :xcode => "6.2" - - def install - system "make" - bin.install "watch-sim" - end - - test do - assert_match(/Usage: watch-sim/, - shell_output("#{bin}/watch-sim 2>&1", 1)) - end -end diff --git a/Formula/watch.rb b/Formula/watch.rb deleted file mode 100644 index f11f2c97b907f..0000000000000 --- a/Formula/watch.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Watch < Formula - desc "Executes a program periodically, showing output fullscreen" - homepage "https://gitlab.com/procps-ng/procps" - url "https://gitlab.com/procps-ng/procps.git", - :tag => "v3.3.15", - :revision => "7bb949bcba13c107fa0f45d2d0298b1ad6b6d6cc" - head "https://gitlab.com/procps-ng/procps.git" - - bottle do - cellar :any_skip_relocation - sha256 "bdb4f8a1feed527be937eb0f470444c93643b3dc72943387fcd7584c2b96baf6" => :mojave - sha256 "9fceef6cae551481726f86f9a0e5e79ca2bf27e0f41d0feb0800ab25e9161342" => :high_sierra - sha256 "010375a88535763436571b3140bacd5733e8176621d663464a8ae3c57ed7813f" => :sierra - sha256 "d89d82028efa1586bd6f6b05fba3f7c15259e6a9fedffa5e36d8a900514b0ecb" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "gettext" - - conflicts_with "visionmedia-watch" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-nls" - system "make", "watch" - bin.install "watch" - man1.install "watch.1" - end - - test do - system bin/"watch", "--errexit", "--chgexit", "--interval", "1", "date" - end -end diff --git a/Formula/watchexec.rb b/Formula/watchexec.rb deleted file mode 100644 index 1d60a84b05fb3..0000000000000 --- a/Formula/watchexec.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Watchexec < Formula - desc "Execute commands when watched files change" - homepage "https://github.com/watchexec/watchexec" - url "https://github.com/watchexec/watchexec/archive/1.9.2.tar.gz" - sha256 "dcb41cf075d1f07a7274a3b1138dfc585368d1a55595424290988804b58fdb96" - - bottle do - sha256 "48cda48ee0e5b26728764c35f1a21bb8e6cbef5aa34067deae20a48f0a8a5a68" => :mojave - sha256 "db7cdbf5129c247378278b41f231bc88f44224134b28a0049e91eea6d5f3ee31" => :high_sierra - sha256 "c653234a0a182b6d973211c728687485977de5740f6f6bddd474bf7429b220b7" => :sierra - sha256 "5c8b4d95cdabf5136cc74e564e10b0bea7975e36b197126a73ed88c46006871b" => :el_capitan - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - man1.install "doc/watchexec.1" - end - - test do - o = IO.popen("#{bin}/watchexec -- echo 'saw file change'") - sleep 0.1 - Process.kill("INT", o.pid) - assert_match "saw file change", o.read - end -end diff --git a/Formula/watchman.rb b/Formula/watchman.rb deleted file mode 100644 index 7fd453a13be36..0000000000000 --- a/Formula/watchman.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Watchman < Formula - desc "Watch files and take action when they change" - homepage "https://github.com/facebook/watchman" - revision 2 - head "https://github.com/facebook/watchman.git" - - stable do - url "https://github.com/facebook/watchman/archive/v4.9.0.tar.gz" - sha256 "1f6402dc70b1d056fffc3748f2fdcecff730d8843bb6936de395b3443ce05322" - - # Upstream commit from 1 Sep 2017: "Have bin scripts use iter() method for python3" - patch do - url "https://github.com/facebook/watchman/commit/17958f7d.diff?full_index=1" - sha256 "edad4971fceed2aecfa2b9c3e8e22c455bfa073732a3a0c77b030e506ee860af" - end - end - - bottle do - sha256 "fd932d78fec199bbd71e7f192eb16deb728d0d7aeb26127fd0827221de2d92cb" => :mojave - sha256 "83e3c11bdb57ba39b51c4d9e17fb38638f541a17343be51106f7409df17c7bf3" => :high_sierra - sha256 "a6ae3a7240b6427a44a032fa2d1d23743bdcc4a8cf3ee80276eac895028b470b" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on :macos => :yosemite # older versions don't support fstatat(2) - depends_on "openssl" - depends_on "pcre" - depends_on "python" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-pcre", - # Do homebrew specific Python installation below - "--without-python", - "--enable-statedir=#{var}/run/watchman" - system "make" - system "make", "install" - - # Homebrew specific python application installation - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - cd "python" do - system "python3", *Language::Python.setup_install_args(libexec) - end - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - def post_install - (var/"run/watchman").mkpath - chmod 042777, var/"run/watchman" - # Older versions would use socket activation in the launchd.plist, and since - # the homebrew paths are versioned, this meant that launchd would continue - # to reference the old version of the binary after upgrading. - # https://github.com/facebook/watchman/issues/358 - # To help swing folks from an older version to newer versions, force unloading - # the plist here. This is needed even if someone wanted to add brew services - # support; while there are still folks with watchman <4.8 this is still an - # upgrade concern. - home = ENV["HOME"] - system "launchctl", "unload", - "-F", "#{home}/Library/LaunchAgents/com.github.facebook.watchman.plist" - end - - test do - assert_equal /(\d+\.\d+\.\d+)/.match(version)[0], shell_output("#{bin}/watchman -v").chomp - end -end diff --git a/Formula/watson.rb b/Formula/watson.rb deleted file mode 100644 index 22a2edb457b69..0000000000000 --- a/Formula/watson.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Watson < Formula - include Language::Python::Virtualenv - - desc "Command-line tool to track (your) time" - homepage "https://tailordev.github.io/Watson/" - url "https://files.pythonhosted.org/packages/a6/c4/bb84f25803a8f03388e4ce68fc635beb6be8735a27397c00cf14ff26d948/td-watson-1.6.0.tar.gz" - sha256 "3315586da2c4c77ea4af94ad2812d780a11eacada84e37ab32c2688beba89451" - revision 1 - head "https://github.com/TailorDev/Watson.git" - - bottle do - cellar :any_skip_relocation - sha256 "cbb14dc96d673da36be260e9e2b88fd1c94b675da9e24cb7ad7f314711c99b63" => :mojave - sha256 "d465f6398a9f3b052273fed8a0045b71c45673f1ea1870b38225df18d701b48b" => :high_sierra - sha256 "580cc616ca27a1f338027a7951fe054ecf3388527a329700210ca0e311ee3307" => :sierra - end - - depends_on "python" - - resource "arrow" do - url "https://files.pythonhosted.org/packages/e0/86/4eb5228a43042e9a80fe8c84093a8a36f5db34a3767ebd5e1e7729864e7b/arrow-0.12.1.tar.gz" - sha256 "a558d3b7b6ce7ffc74206a86c147052de23d3d4ef0e17c210dd478c53575c4cd" - end - - resource "backports.functools_lru_cache" do - url "https://files.pythonhosted.org/packages/57/d4/156eb5fbb08d2e85ab0a632e2bebdad355798dece07d4752f66a8d02d1ea/backports.functools_lru_cache-1.5.tar.gz" - sha256 "9d98697f088eb1b0fa451391f91afb5e3ebde16bbdb272819fd091151fda4f1a" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d/certifi-2018.4.16.tar.gz" - sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/c5/39/4da7c2dbc4f023fba5fb2325febcadf0d0ce0efdc8bd12083a0f65d20653/python-dateutil-2.7.2.tar.gz" - sha256 "9d8074be4c993fbe4947878ce593052f71dac82932a677d49194d8ce9778002e" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - def install - virtualenv_install_with_resources - - bash_completion.install "watson.completion" => "watson" - zsh_completion.install "watson.zsh-completion" => "_watson" - end - - test do - system "#{bin}/watson", "start", "foo", "+bar" - system "#{bin}/watson", "status" - system "#{bin}/watson", "stop" - system "#{bin}/watson", "log" - end -end diff --git a/Formula/wavpack.rb b/Formula/wavpack.rb deleted file mode 100644 index a9eb15ecac10d..0000000000000 --- a/Formula/wavpack.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Wavpack < Formula - desc "Hybrid lossless audio compression" - homepage "http://www.wavpack.com/" - url "http://www.wavpack.com/wavpack-5.1.0.tar.bz2" - sha256 "1939627d5358d1da62bc6158d63f7ed12905552f3a799c799ee90296a7612944" - - bottle do - cellar :any - sha256 "d3e4d68fb79133858eda5a35db5e3d92cbc40fc96d2ee414b92c9502792e641d" => :mojave - sha256 "3c474a8b2b524f596888089a374aa733c09615e4a861a11b7317204ef42c8c25" => :high_sierra - sha256 "caaf7a9f778270e2f445c4a4f864afbdbc5c410531866c06a5bfe9d0b10dbc36" => :sierra - sha256 "5ad0e936fa7f53926838964c434e34c303bb540f676fb42b03d37845ace86940" => :el_capitan - sha256 "14d36c9f2f704d8d1181f63ad965690a4594444394ce42d2cfaf63cbfc981051" => :yosemite - end - - head do - url "https://github.com/dbry/WavPack.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - args = %W[--prefix=#{prefix} --disable-dependency-tracking] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - - system "make", "install" - end - - test do - system bin/"wavpack", test_fixtures("test.wav"), "-o", testpath/"test.wv" - assert_predicate testpath/"test.wv", :exist? - end -end diff --git a/Formula/wbox.rb b/Formula/wbox.rb deleted file mode 100644 index 9a7b86bf9ed61..0000000000000 --- a/Formula/wbox.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Wbox < Formula - desc "HTTP testing tool and configuration-less HTTP server" - homepage "http://hping.org/wbox/" - url "http://www.hping.org/wbox/wbox-5.tar.gz" - sha256 "1589d85e83c8ee78383a491d89e768ab9aab9f433c5f5e035cfb5eed17efaa19" - - bottle do - cellar :any_skip_relocation - sha256 "bce72c30f26da03ab104082abaccd775fa721b4db98a0ae6e16e2946f59a8bed" => :mojave - sha256 "6e8b41d8caf8ae84cf5ff0d7fe9bdb7d83b9c7afae9a746fe319e67fe145cf2c" => :high_sierra - sha256 "241edb51af197d72022a48cb8444506188269b335b057ceaa7bf952db86777d8" => :sierra - sha256 "0e813a0982d6b9228217f14352812d9e6880cce44757f8af9a0447bf5e4a1e63" => :el_capitan - sha256 "ee2bd7599a73c3a9f3fe9f8c2d441d753914981b2420e591050780d436bbf011" => :yosemite - sha256 "35b640ce39cd36f75ec595215099f121feb517672fb11abf30b36a1e567fc117" => :mavericks - end - - def install - system "make" - bin.install "wbox" - end - - test do - system "#{bin}/wbox", "www.google.com", "1" - end -end diff --git a/Formula/wcslib.rb b/Formula/wcslib.rb deleted file mode 100644 index bbed59a001d80..0000000000000 --- a/Formula/wcslib.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Wcslib < Formula - desc "Library and utilities for the FITS World Coordinate System" - homepage "https://www.atnf.csiro.au/people/mcalabre/WCS/" - url "https://www.atnf.csiro.au/pub/software/wcslib/wcslib-6.2.tar.bz2" - sha256 "bb4dfe242959bc4e5540890e0475754ad4a027dba971903dc4d82df8d564d805" - - bottle do - cellar :any - sha256 "791f633e087db6056f23904df39a7b0489a7c18c2fea5e3e25c71bf7365518e1" => :mojave - sha256 "313a28f2170b0622ea7f72fe4371894be0ffb79663541bfeb5ed51c6a02571df" => :high_sierra - sha256 "98ce5c443e70f687b3754f7ab01fca8248ab760d76145da546a46132e67bd7de" => :sierra - end - - depends_on "cfitsio" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-cfitsiolib=#{Formula["cfitsio"].opt_lib}", - "--with-cfitsioinc=#{Formula["cfitsio"].opt_include}", - "--without-pgplot", - "--disable-fortran" - - # Currently doesn't support parallel make. Patch sent to author 2018/08/31. - # Author (mcalabre@atnf.csiro.au) expects to integrate by end of 2018/09. - # Patch: https://gist.github.com/dstndstn/0492f69eb27a11cdd622d01105643dd0 - ENV.deparallelize - system "make" - system "make", "install" - end - - test do - piped = "SIMPLE =" + " "*20 + "T / comment" + " "*40 + "END" + " "*2797 - pipe_output("#{bin}/fitshdr", piped, 0) - end -end diff --git a/Formula/wdc.rb b/Formula/wdc.rb deleted file mode 100644 index 357bef7aac8d0..0000000000000 --- a/Formula/wdc.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Wdc < Formula - desc "WebDAV Client provides easy and convenient to work with WebDAV-servers" - homepage "https://designerror.github.io/webdav-client-cpp" - url "https://github.com/designerror/webdav-client-cpp/archive/v1.0.1.tar.gz" - sha256 "64b01de188032cb9e09f5060965bd90ed264e7c0b4ceb62bfc036d0caec9fd82" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "032a33394e17f8815884d95b723081a059b6ff67c2dede3399782531ca239efa" => :mojave - sha256 "8bccdfeac8fe563d940504f4674ea55443cc9a34fbd87411a5a14037e720f47d" => :high_sierra - sha256 "de61e873a1a9eb37c29778ccbc7c0f8ceae61ca7b19cf98c45ec1a4569a842df" => :sierra - sha256 "6ede103d6893034ebd55d00f47d00056a081bfa0ca0a7dd51e06330896dbb743" => :el_capitan - sha256 "9bf61a23f849c5f60314ef58bdf3f988ed98618601eea67a65949e89f52593eb" => :yosemite - end - - depends_on "cmake" => :build - depends_on "openssl" - depends_on "pugixml" - - def install - pugixml = Formula["pugixml"] - ENV.prepend "CXXFLAGS", "-I#{pugixml.opt_include.children.first}" - system "cmake", ".", "-DPUGIXML_INCLUDE_DIR=#{pugixml.opt_include}", - "-DPUGIXML_LIBRARY=#{pugixml.opt_lib}", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - #include - int main(int argc, char *argv[]) { - std::map options = - { - {"webdav_hostname", "https://webdav.example.com"}, - {"webdav_login", "webdav_login"}, - {"webdav_password", "webdav_password"} - }; - std::shared_ptr client(WebDAV::Client::Init(options)); - auto check_connection = client->check(); - assert(!check_connection); - } - EOS - pugixml = Formula["pugixml"] - openssl = Formula["openssl"] - system ENV.cc, "test.cpp", "-o", "test", "-lcurl", "-lstdc++", "-std=c++11", - "-L#{lib}", "-lwdc", "-I#{include}", - "-L#{openssl.opt_lib}", "-lssl", "-lcrypto", - "-I#{openssl.opt_include}", - "-L#{Dir["#{pugixml.opt_lib}/pug*"].first}", "-lpugixml", - "-I#{pugixml.opt_include.children.first}" - system "./test" - end -end diff --git a/Formula/wdfs.rb b/Formula/wdfs.rb deleted file mode 100644 index 992d630542397..0000000000000 --- a/Formula/wdfs.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Wdfs < Formula - desc "Webdav file system" - homepage "http://noedler.de/projekte/wdfs/" - url "http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz" - sha256 "fcf2e1584568b07c7f3683a983a9be26fae6534b8109e09167e5dff9114ba2e5" - - bottle do - cellar :any - sha256 "5c94bbb0f8a8139bcedce08d8cdc80cf796c3d801103f1688b415c570be3c298" => :mojave - sha256 "204b9c0227c3ccf14444259fea4e26cedc42eb2e461ce02952bf4d7f2802fb66" => :high_sierra - sha256 "d88bd5f277e42a04048c6641e764c919b71b4cec554440ddb590b608c7d02955" => :sierra - sha256 "7133df159d9ca995fd982a7ffc2e3213112113e740c6ed5a5c48458d1f1bd1c3" => :el_capitan - sha256 "f427e5e1cde130dc890db1f27e7bbc8600ae9a22dfbb3fcdc8ada9eb73686f51" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "neon" - depends_on :osxfuse - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/wdfs", "-v" - end -end diff --git a/Formula/wdiff.rb b/Formula/wdiff.rb deleted file mode 100644 index cacc826dea19d..0000000000000 --- a/Formula/wdiff.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Wdiff < Formula - desc "Display word differences between text files" - homepage "https://www.gnu.org/software/wdiff/" - url "https://ftp.gnu.org/gnu/wdiff/wdiff-1.2.2.tar.gz" - mirror "https://ftpmirror.gnu.org/wdiff/wdiff-1.2.2.tar.gz" - sha256 "34ff698c870c87e6e47a838eeaaae729fa73349139fc8db12211d2a22b78af6b" - revision 1 - - bottle do - sha256 "5f949893137314b6b2f75f4c168b361d0b10a8da76c9d3e31f505bb086315fee" => :mojave - sha256 "c11b3eecc5edb376ff46d09ac5206bfb05e6b16842535a236a0b19d08dd96295" => :high_sierra - sha256 "5fc339bce086c8780d7588a27b959d02ce079403166af2f5fd541c44ef4a29c8" => :sierra - sha256 "51b0625f3708ecfc74c613fdd2cd11cfb706d08da20206ddb5e628e6aedfb62f" => :el_capitan - end - - depends_on "gettext" - - conflicts_with "montage", :because => "Both install an mdiff executable" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-experimental" - system "make", "install" - end - - test do - a = testpath/"a.txt" - a.write "The missing package manager for OS X" - - b = testpath/"b.txt" - b.write "The package manager for OS X" - - output = shell_output("#{bin}/wdiff #{a} #{b}", 1) - assert_equal "The [-missing-] package manager for OS X", output - end -end diff --git a/Formula/weaver.rb b/Formula/weaver.rb deleted file mode 100644 index 8530b891dcc82..0000000000000 --- a/Formula/weaver.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Weaver < Formula - desc "Command-line tool for Weaver" - homepage "https://github.com/scribd/Weaver" - url "https://github.com/scribd/Weaver/archive/0.11.1.tar.gz" - sha256 "1d39ffbc1003905120e5be3cbb362d7fdbd963e944f8d44ca21ea4c2756631bd" - - bottle do - cellar :any_skip_relocation - sha256 "c04574bbb8dd4ac91dc7fd68f6b2424e360042643877631aba8d91d3979fae1a" => :mojave - sha256 "5a408783400f54f6aaa9fefd4e6c00e878b85d5b21dfd893feabfab0d413f1ee" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Weaver uses Sourcekitten and thus, has the same sandbox issues. - # Rewrite test after sandbox issues investigated. - # https://github.com/Homebrew/homebrew/pull/50211 - system "#{bin}/weaver", "--version" - end -end diff --git a/Formula/web100clt.rb b/Formula/web100clt.rb deleted file mode 100644 index bb132cf96beb3..0000000000000 --- a/Formula/web100clt.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Web100clt < Formula - desc "Command-line version of NDT diagnostic client" - homepage "https://software.internet2.edu/ndt/" - url "https://software.internet2.edu/sources/ndt/ndt-3.7.0.2.tar.gz" - sha256 "bd298eb333d4c13f191ce3e9386162dd0de07cddde8fe39e9a74fde4e072cdd9" - revision 1 - - bottle do - sha256 "2b37669adf9e8248295fc31e95659697dcc4b47db89e9db11cea506f02863dfe" => :mojave - sha256 "93f6e31d1b28eea6a6f64d6bcacf39db135725bd6130a88173a724c6968c8c62" => :high_sierra - sha256 "be444b693ab664de5d521242702bf91a1518cd8945d7d6db1b03126f8a2638bb" => :sierra - sha256 "d0998cd6fb89d689aeb6f88bcd92039ad88daa3aef8b718bbcb8be6a3c4a7e39" => :el_capitan - sha256 "e2acae1966b2897ef89dcec1610e164f4c8bee054369d2012e1619853c6674d0" => :yosemite - sha256 "86b6d51af3d9e33db8220d8834d04aeed0241872a28aeac697b4357d2afbcc2e" => :mavericks - end - - depends_on "i2util" - depends_on "jansson" - depends_on "openssl" - - # fixes issue with new default secure strlcpy/strlcat functions in 10.9 - # https://github.com/ndt-project/ndt/issues/106 - if MacOS.version >= :mavericks - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/37aa64888341/web100clt/ndt-3.6.5.2-osx-10.9.patch" - sha256 "86d2399e3d139c02108ce2afb45193d8c1f5782996714743ec673c7921095e8e" - end - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - - # we only want to build the web100clt client so we need - # to change to the src directory before installing. - system "make", "-C", "src", "install" - man1.install "doc/web100clt.man" => "web100clt.1" - end - - test do - assert_match version.to_s, shell_output("#{bin}/web100clt -v") - end -end diff --git a/Formula/webalizer.rb b/Formula/webalizer.rb deleted file mode 100644 index 1710bb2f58a0a..0000000000000 --- a/Formula/webalizer.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Webalizer < Formula - desc "Web server log file analysis" - homepage "http://www.webalizer.org" - url "ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.23-08-src.tgz" - mirror "https://mirrors.kernel.org/debian/pool/main/w/webalizer/webalizer_2.23.08.orig.tar.gz" - sha256 "edaddb5aa41cc4a081a1500e3fa96615d4b41bc12086bcedf9938018ce79ed8d" - revision 2 - - bottle do - sha256 "525c739550139303d96d823e9f50aca6255bb77eac70d45f2c1259aa59755f6b" => :mojave - sha256 "e27c0dd7038a5a82e6fa127428c0b98750801e343b1b973b05bb08f38b055cdd" => :high_sierra - sha256 "cb42abb300bb5dc9639c811a13e24cca1be2cceee01d02eabb1ec149414569d4" => :sierra - sha256 "2bae3de97730aa72807cadcfda25ac395f3e30608d865df998fb474e75d4c780" => :el_capitan - end - - depends_on "berkeley-db" - depends_on "gd" - depends_on "libpng" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.log").write "127.0.0.1 user-identifier homebrew [10/Oct/2000:13:55:36 -0700] \"GET /beer.gif HTTP/1.0\" 200 2326" - system "#{bin}/webalizer", "-c", etc/"webalizer.conf.sample", testpath/"test.log" - assert_predicate testpath/"usage.png", :exist? - assert_predicate testpath/"index.html", :exist? - end -end diff --git a/Formula/webarchiver.rb b/Formula/webarchiver.rb deleted file mode 100644 index 03935e94d1163..0000000000000 --- a/Formula/webarchiver.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Webarchiver < Formula - desc "Allows you to create Safari .webarchive files" - homepage "https://github.com/newzealandpaul/webarchiver" - url "https://github.com/newzealandpaul/webarchiver/archive/0.9.tar.gz" - sha256 "8ea826038e923c72e75a4bbb1416910368140a675421f6aaa51fd0dea703f75c" - head "https://github.com/newzealandpaul/webarchiver.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "92e1e8c98a3290a9653c827bee0ffa2cd153241fa69a27c1a7ed12bba9c497f6" => :mojave - sha256 "9e5fc94fce8dce5c085a99e14ba6ded678bf381297716fb99790c18cde27067a" => :high_sierra - sha256 "73c16d1980c3faef25f9a869c342890504eff94e29c36b2819236448b3433e2f" => :sierra - sha256 "4b8f78ddd15e234ae0d5c1842a8ccd7e6a9c5b18bd8626ef7b1d8d88d23b6014" => :el_capitan - end - - depends_on :xcode => ["6.0.1", :build] - - def install - # Force 64 bit-only build, otherwise it fails on Mojave - xcodebuild "SYMROOT=build", "-arch", "x86_64" - - bin.install "./build/Release/webarchiver" - end - - test do - system "#{bin}/webarchiver", "-url", "https://www.google.com", "-output", "foo.webarchive" - assert_match /Apple binary property list/, shell_output("file foo.webarchive") - end -end diff --git a/Formula/webdis.rb b/Formula/webdis.rb deleted file mode 100644 index a483703f3a180..0000000000000 --- a/Formula/webdis.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Webdis < Formula - desc "Redis HTTP interface with JSON output" - homepage "https://webd.is/" - url "https://github.com/nicolasff/webdis/archive/0.1.4.tar.gz" - sha256 "2e384eae48cfc2e4503e3311c61d4790e5d3b3ab5cf82ec554c0bef5d84c6807" - - bottle do - cellar :any - sha256 "212a9557b0dc359e000c970e6d7810f5511fc9da3e207adcec92e80c349bed02" => :mojave - sha256 "6d657c81a720f4891f8d04e3f7d575cfe1df10c70a30047ce06de33ff8fd57fc" => :high_sierra - sha256 "3d8b342f5638b134799bd307af578c0d95a28ccd3ecb8060749a6c026140510e" => :sierra - sha256 "2b8ba2575cd03917af7362218324fbefa38336306565875565f40daa20b0f050" => :el_capitan - end - - depends_on "libevent" - - def install - system "make" - bin.install "webdis" - - inreplace "webdis.prod.json" do |s| - s.gsub! "/var/log/webdis.log", "#{var}/log/webdis.log" - s.gsub! /daemonize":\s*true/, "daemonize\":\tfalse" - end - - etc.install "webdis.json", "webdis.prod.json" - end - - def post_install - (var/"log").mkpath - end - - plist_options :manual => "webdis #{HOMEBREW_PREFIX}/etc/webdis.json" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/webdis - #{etc}/webdis.prod.json - - RunAtLoad - - KeepAlive - - SuccessfulExit - - - WorkingDirectory - #{var} - - - EOS - end - - test do - begin - server = fork do - exec "#{bin}/webdis", "#{etc}/webdis.json" - end - sleep 0.5 - # Test that the response is from webdis - assert_match(/Server: Webdis/, shell_output("curl --silent -XGET -I http://localhost:7379/PING")) - ensure - Process.kill "TERM", server - Process.wait server - end - end -end diff --git a/Formula/webfs.rb b/Formula/webfs.rb deleted file mode 100644 index d4eb5d3149fea..0000000000000 --- a/Formula/webfs.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Webfs < Formula - desc "HTTP server for purely static content" - homepage "https://linux.bytesex.org/misc/webfs.html" - url "https://www.kraxel.org/releases/webfs/webfs-1.21.tar.gz" - sha256 "98c1cb93473df08e166e848e549f86402e94a2f727366925b1c54ab31064a62a" - revision 1 - - bottle do - cellar :any - sha256 "867fbe1f213380efb695d89fe6d4cc3e5197d2d303b3d70da72a45814aacc669" => :mojave - sha256 "bd713d90ce0e67a1cddf2b3274ddc7467e4b7b5c8ad8b80382e5c0c955c383c3" => :high_sierra - sha256 "cbdc088ed6befb87ecda08bf4a23a9eff3bf3d61932d98aa1f8441bb1c0fd3b5" => :sierra - sha256 "63755af9ac88711d4eb2e80016ef541ed40a1422f2fb2de3ded5c72b362cb39e" => :el_capitan - sha256 "51985bfb7ca68d15261a296886cf0c6b317d870bc79aadf881429101b9a11e09" => :yosemite - sha256 "79c670478aeb8f97d702a5112fde2dab07c92145ea836c12bfdf9a1acfca4232" => :mavericks - sha256 "bced78e19fe50e4b1191fb41cd7aeecf50b1a5d946a13c89d211159553cbd637" => :mountain_lion - end - - depends_on "openssl" - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/0518a6d1/webfs/patch-ls.c" - sha256 "8ddb6cb1a15f0020bbb14ef54a8ae5c6748a109564fa461219901e7e34826170" - end - - def install - ENV["prefix"]=prefix - system "make", "install", "mimefile=/etc/apache2/mime.types" - end - - test do - begin - pid = fork { exec bin/"webfsd", "-F" } - sleep 2 - assert_match %r{webfs\/1.21}, shell_output("curl localhost:8000") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/webkit2png.rb b/Formula/webkit2png.rb deleted file mode 100644 index 695659553913c..0000000000000 --- a/Formula/webkit2png.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Webkit2png < Formula - desc "Create screenshots of webpages from the terminal" - homepage "http://www.paulhammond.org/webkit2png/" - url "https://github.com/paulhammond/webkit2png/archive/v0.7.tar.gz" - sha256 "9b810edb6f54cc23ba86b0212f203e6c3bbafc3cbdb62b9c33887548c91015bf" - - bottle :unneeded - - def install - bin.install "webkit2png" - end - - test do - system "#{bin}/webkit2png", "--version" - end -end diff --git a/Formula/weboob.rb b/Formula/weboob.rb deleted file mode 100644 index 7fd54055b6def..0000000000000 --- a/Formula/weboob.rb +++ /dev/null @@ -1,130 +0,0 @@ -class Weboob < Formula - include Language::Python::Virtualenv - - desc "Web Outside of Browsers" - homepage "https://weboob.org/" - url "https://git.weboob.org/weboob/weboob/uploads/e8c77b143e84c97fca354579575d18e9/weboob-1.3.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/w/weboob/weboob_1.3.orig.tar.gz" - sha256 "c991785c889877c76f18d19e372ed4ae0c3f8b819fd1e8da296bd34b1381be54" - revision 2 - - bottle do - cellar :any - sha256 "6f50d281d1b2a53ffce3ce422dfb01e3320e8b2ec290da2f3d8d52367fb6a776" => :mojave - sha256 "3cc293034da6fe1174369bb1edada48ab28e85a36de7f775a9733fdb56bd27b1" => :high_sierra - sha256 "6f31cee27f68613ef44d669439da689895ee4d72829b1095989bd64852a9da40" => :sierra - end - - depends_on "freetype" - depends_on "gnupg" - depends_on "jpeg" - depends_on "libyaml" - depends_on "python" - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/e0/82/ec499c78bfe4ecaa91c2f3000040451d187ed0a816d58b8543e29c48827f/Pillow-4.3.0.tar.gz" - sha256 "a97c715d44efd5b4aa8d739b8fad88b93ed79f1b33fc2822d5802043f3b1b527" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/23/3f/8be01c50ed24a4bd6b8da799839066ce0288f66f5e11f0367323467f0cbc/certifi-2017.11.5.tar.gz" - sha256 "5ec74291ca1136b40f0379e1128ff80e866597e4e2c1e755739a913bbc3613c0" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cssselect" do - url "https://files.pythonhosted.org/packages/77/ff/9c865275cd19290feba56344eba570e719efb7ca5b34d67ed12b22ebbb0d/cssselect-1.0.1.tar.gz" - sha256 "73db1c054b9348409e2862fc6c0dde5c4e4fbe4da64c5c5a9e05fbea45744077" - end - - resource "html2text" do - url "https://files.pythonhosted.org/packages/dd/10/d257bb28d08b3e8a864ed28829508564cc4a864ba0a79fda42e4393f6842/html2text-2017.10.4.tar.gz" - sha256 "02ab8df206e90a395b7e188e26eb1906680439ce4a636a00217851cef58c1fad" - end - - resource "html5lib" do - url "https://files.pythonhosted.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz" - sha256 "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz" - sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/e1/4c/d83979fbc66a2154850f472e69405572d89d2e6a6daee30d18e83e39ef3a/lxml-4.1.1.tar.gz" - sha256 "940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e" - end - - resource "olefile" do - url "https://files.pythonhosted.org/packages/35/17/c15d41d5a8f8b98cc3df25eb00c5cee76193114c78e5674df6ef4ac92647/olefile-0.44.zip" - sha256 "61f2ca0cd0aa77279eb943c07f607438edf374096b66332fae1ee64a6f0f73ad" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-2.6.1.tar.gz" - sha256 "891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz" - sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz" - sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - def install - venv = virtualenv_create(libexec, "python3") - - resource("Pillow").stage do - inreplace "setup.py" do |s| - sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" - s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" - s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" - s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')" - end - - ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" unless MacOS::CLT.installed? - venv.pip_install Pathname.pwd - end - - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - res = resources.map(&:name).to_set - ["Pillow"] - - res.each do |r| - venv.pip_install resource(r) - end - - venv.pip_install_and_link buildpath - end - - test do - system bin/"weboob-config", "update" - end -end diff --git a/Formula/webp.rb b/Formula/webp.rb deleted file mode 100644 index 2c30eb54fe10b..0000000000000 --- a/Formula/webp.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Webp < Formula - desc "Image format providing lossless and lossy compression for web images" - homepage "https://developers.google.com/speed/webp/" - url "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.1.tar.gz" - sha256 "8c744a5422dbffa0d1f92e90b34186fb8ed44db93fbacb55abd751ac8808d922" - - bottle do - cellar :any - sha256 "2c4121390441467ced55577aa10552ac3a5fbfe8deff280d487a61ff7bb2d3f8" => :mojave - sha256 "516715778a85358459a7214b2d1bd64185642d8a3e974cdfbc2f122e24459b73" => :sierra - end - - head do - url "https://chromium.googlesource.com/webm/libwebp.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "jpeg" - depends_on "libpng" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-gif", - "--disable-gl", - "--enable-libwebpdecoder", - "--enable-libwebpdemux", - "--enable-libwebpmux" - system "make", "install" - end - - test do - system bin/"cwebp", test_fixtures("test.png"), "-o", "webp_test.png" - system bin/"dwebp", "webp_test.png", "-o", "webp_test.webp" - assert_predicate testpath/"webp_test.webp", :exist? - end -end diff --git a/Formula/webpack.rb b/Formula/webpack.rb deleted file mode 100644 index 9b5dbe135e08e..0000000000000 --- a/Formula/webpack.rb +++ /dev/null @@ -1,54 +0,0 @@ -require "language/node" -require "json" - -class Webpack < Formula - desc "Bundler for JavaScript and friends" - homepage "https://webpack.js.org/" - url "https://registry.npmjs.org/webpack/-/webpack-4.28.1.tgz" - sha256 "d319e4a0c24baf2daf5efa195bcc13daf5dcd5346b0803e44bcfd3ea14c7745e" - head "https://github.com/webpack/webpack.git" - - bottle do - sha256 "6a1e3f5ff141ca9a21142673c3c02204804114e52641a8e9fafd5216550ee349" => :mojave - sha256 "9e21021cb905b24cd1a393469e838ec7f5e1aa2e353b2f7758410005cbd7e519" => :high_sierra - sha256 "8bf6eb79ffc211ef3a03238b363e7245fac0e35ae90cd89123f0e2a773a4b9e1" => :sierra - end - - depends_on "node" - - resource "webpack-cli" do - url "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz" - sha256 "135962a43cdec4d24f68925c32e4daea600d6433d7b8fb912a9709a65712411e" - end - - def install - (buildpath/"node_modules/webpack").install Dir["*"] - buildpath.install resource("webpack-cli") - - # declare webpack as a bundledDependency of webpack-cli - pkg_json = JSON.parse(IO.read("package.json")) - pkg_json["dependencies"]["webpack"] = version - pkg_json["bundledDependencies"] = ["webpack"] - IO.write("package.json", JSON.pretty_generate(pkg_json)) - - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - - bin.install_symlink libexec/"bin/webpack-cli" - bin.install_symlink libexec/"bin/webpack-cli" => "webpack" - end - - test do - (testpath/"index.js").write <<~EOS - function component () { - var element = document.createElement('div'); - element.innerHTML = 'Hello' + ' ' + 'webpack'; - return element; - } - - document.body.appendChild(component()); - EOS - - system bin/"webpack", "index.js", "--output=bundle.js" - assert_predicate testpath/"bundle.js", :exist?, "bundle.js was not generated" - end -end diff --git a/Formula/websocat.rb b/Formula/websocat.rb deleted file mode 100644 index 8a18e68a07e32..0000000000000 --- a/Formula/websocat.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Websocat < Formula - desc "Command-line client for WebSockets" - homepage "https://github.com/vi/websocat" - url "https://github.com/vi/websocat/archive/v1.2.0.tar.gz" - sha256 "e1a6021770c9ae5b364eaa74b7435f259c5d84bf5c7210cab7f0c775fa2158a5" - - bottle do - sha256 "e828460237de4ad4607fec9e703037f349e9e70b5437fb0bd7744aa779a971b4" => :mojave - sha256 "b8ba671d1582b57bdc9b4f691e68221179ebf6d50b1c3b3c259a6451c185ad47" => :high_sierra - sha256 "2561c8003b59997794008f409290fc719906437baf001494d48b31967ef4184c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, - "--path", ".", - "--features", "ssl" - end - - test do - system "#{bin}/websocat", "-t", "literal:qwe", "assert:qwe" - end -end diff --git a/Formula/websocketd.rb b/Formula/websocketd.rb deleted file mode 100644 index dc8417ecd4a0e..0000000000000 --- a/Formula/websocketd.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "language/go" - -class Websocketd < Formula - desc "WebSockets the Unix way" - homepage "http://websocketd.com" - url "https://github.com/joewalnes/websocketd/archive/v0.3.0.tar.gz" - sha256 "f59fefdf79d6b99140027b3c58ca77d59bb3c1fa2f15969d7239538b04042b3d" - - bottle do - cellar :any_skip_relocation - sha256 "7e060ae07f4fcb9cfc4ff0eb8c3bfdd11135966957f4d2dcb84de0f4fbe15de2" => :mojave - sha256 "69523ab9efd2f2b8f595b4ae4d282f6af64fbbe24fd3b16b7011210b8d1ea87b" => :high_sierra - sha256 "38ebd8e10260501352e81966e3bba46bf00d38e00b408f763ef8042a418099e3" => :sierra - sha256 "eec1080e0a40bf336ea48950c1c21e0ab50e038ee46874cb59bd6b16791309a3" => :el_capitan - end - - depends_on "go" => :build - - go_resource "github.com/gorilla/websocket" do - url "https://github.com/gorilla/websocket.git", - :revision => "cdedf21e585dae942951e34d6defc3215b4280fa" - end - - def install - ENV["GOPATH"] = buildpath - - mkdir_p buildpath/"src/github.com/joewalnes/" - ln_sf buildpath, buildpath/"src/github.com/joewalnes/websocketd" - Language::Go.stage_deps resources, buildpath/"src" - - system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"websocketd", - "main.go", "config.go", "help.go", "version.go" - man1.install "release/websocketd.man" => "websocketd.1" - end - - test do - pid = Process.fork { exec "#{bin}/websocketd", "--port=8080", "echo", "ok" } - sleep 2 - - begin - assert_equal("404 page not found\n", shell_output("curl -s http://localhost:8080")) - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/webtorrent-cli.rb b/Formula/webtorrent-cli.rb deleted file mode 100644 index 71c3445014dcf..0000000000000 --- a/Formula/webtorrent-cli.rb +++ /dev/null @@ -1,51 +0,0 @@ -require "language/node" - -class WebtorrentCli < Formula - desc "Command-line streaming torrent client" - homepage "https://webtorrent.io/" - url "https://registry.npmjs.org/webtorrent-cli/-/webtorrent-cli-1.12.3.tgz" - sha256 "e3e1db7e1d57d322e9263be1454e6af31e9713295fef0edb242d9ac0d97bf71b" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b36cb12217855e7f846904787edff56b262191c3027dc80f695152197d877158" => :mojave - sha256 "f742fef76f23303d2e3f00aecc58f0e330151395827b0c1e86965aea15de86fb" => :high_sierra - sha256 "684233d167eda9cd325ea50016c1000ac4c4a19764a65da4810bebaa5f49a156" => :sierra - sha256 "5fccaa04d58abeed5146887b970264758a3aff86a048766e9d40386bb5ad3dff" => :el_capitan - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - magnet_uri = <<~EOS.gsub(/\s+/, "").strip - magnet:?xt=urn:btih:9eae210fe47a073f991c83561e75d439887be3f3 - &dn=archlinux-2017.02.01-x86_64.iso - &tr=udp://tracker.archlinux.org:6969 - &tr=https://tracker.archlinux.org:443/announce - EOS - - assert_equal <<~EOS.chomp, shell_output("#{bin}/webtorrent info '#{magnet_uri}'") - { - "xt": "urn:btih:9eae210fe47a073f991c83561e75d439887be3f3", - "dn": "archlinux-2017.02.01-x86_64.iso", - "tr": [ - "https://tracker.archlinux.org:443/announce", - "udp://tracker.archlinux.org:6969" - ], - "infoHash": "9eae210fe47a073f991c83561e75d439887be3f3", - "name": "archlinux-2017.02.01-x86_64.iso", - "announce": [ - "https://tracker.archlinux.org:443/announce", - "udp://tracker.archlinux.org:6969" - ], - "urlList": [] - } - EOS - end -end diff --git a/Formula/weechat.rb b/Formula/weechat.rb deleted file mode 100644 index 04201931af8f0..0000000000000 --- a/Formula/weechat.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Weechat < Formula - desc "Extensible IRC client" - homepage "https://www.weechat.org" - url "https://weechat.org/files/src/weechat-2.3.tar.xz" - sha256 "ef8654313bfb0ca92e27cf579efb2d9b17e53505e615bf3d71a51aef44e56a5f" - revision 1 - head "https://github.com/weechat/weechat.git" - - bottle do - sha256 "bd6340bac1555785aeff6584ab61d104402297b78a67d424517c4e6c613074d8" => :mojave - sha256 "e97739b3e529fce08adb86b86cc4b2c660528ee9b2929ba783ab2ecf4b7acf42" => :high_sierra - sha256 "630b354c0f7dc8c814a3d1d7c5c369c61f8111763e339d878ce5ebf0a2b7ad40" => :sierra - end - - option "with-perl", "Build the perl module" - option "with-ruby", "Build the ruby module" - option "with-curl", "Build with brewed curl" - - depends_on "asciidoctor" => :build - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnutls" - depends_on "libgcrypt" - depends_on "ncurses" - depends_on "aspell" => :optional - depends_on "curl" => :optional - depends_on "lua" => :optional - depends_on "perl" => :optional - depends_on "python@2" => :optional - depends_on "ruby" => :optional if MacOS.version <= :sierra - - def install - args = std_cmake_args + %W[ - -DENABLE_MAN=ON - -DENABLE_GUILE=OFF - -DCA_FILE=#{etc}/openssl/cert.pem - -DENABLE_JAVASCRIPT=OFF - ] - - if build.without? "ruby" - args << "-DENABLE_RUBY=OFF" - elsif build.with?("ruby") && MacOS.version >= :sierra - args << "-DRUBY_EXECUTABLE=/usr/bin/ruby" - args << "-DRUBY_LIB=/usr/lib/libruby.dylib" - end - - args << "-DENABLE_LUA=OFF" if build.without? "lua" - args << "-DENABLE_PERL=OFF" if build.without? "perl" - args << "-DENABLE_ASPELL=OFF" if build.without? "aspell" - args << "-DENABLE_PYTHON=OFF" if build.without? "python@2" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install", "VERBOSE=1" - end - end - - def caveats - <<~EOS - Weechat can depend on Aspell if you choose the --with-aspell option, but - Aspell should be installed manually before installing Weechat so that - you can choose the dictionaries you want. If Aspell was installed - automatically as part of weechat, there won't be any dictionaries. - EOS - end - - test do - system "#{bin}/weechat", "-r", "/quit" - end -end diff --git a/Formula/wego.rb b/Formula/wego.rb deleted file mode 100644 index 1f674066a7d8c..0000000000000 --- a/Formula/wego.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "language/go" - -class Wego < Formula - desc "Weather app for the terminal" - homepage "https://github.com/schachmat/wego" - url "https://github.com/schachmat/wego/archive/2.0.tar.gz" - sha256 "d63d79520b385c4ed921c7decc37a0b85c40af66600f8a5733514e04d3048075" - head "https://github.com/schachmat/wego.git" - - bottle do - cellar :any_skip_relocation - sha256 "436dbf3a2dd0f517635078c987d95985941be4aaae3efc65b5fb2e3562af87cd" => :mojave - sha256 "dc3714d72fde13770cec00100aa1ee843b944512c454e00ad131c822e868cedb" => :high_sierra - sha256 "504d831a34c22ec006a610f7af4d11000708570513e5391e2077d021ca6b3758" => :sierra - sha256 "ccdba75878ffe9b62b49265f6f4b375da80f44e6c5b7c5a40294501fda8903b1" => :el_capitan - sha256 "97e7c2edfa9b1a312a0f4f4bce9553b1c8e884409aca3f7acfed2dc99fcef05d" => :yosemite - sha256 "6bc11cdcd939b5361704f1575f297a152da2e3de79e94392c33cf5e22ec40715" => :mavericks - end - - depends_on "go" => :build - - go_resource "github.com/mattn/go-colorable" do - url "https://github.com/mattn/go-colorable.git", - :revision => "ed8eb9e318d7a84ce5915b495b7d35e0cfe7b5a8" - end - - go_resource "github.com/mattn/go-runewidth" do - url "https://github.com/mattn/go-runewidth.git", - :revision => "d6bea18f789704b5f83375793155289da36a3c7f" - end - - go_resource "github.com/schachmat/ingo" do - url "https://github.com/schachmat/ingo.git", - :revision => "b1887f863beaeb31b3924e839dfed3cf3a981ea8" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/schachmat").mkpath - ln_sf buildpath, buildpath/"src/github.com/schachmat/wego" - Language::Go.stage_deps resources, buildpath/"src" - system "go", "build", "-o", bin/"wego" - end - - test do - ENV["WEGORC"] = testpath/".wegorc" - assert_match /No .*API key specified./, shell_output("#{bin}/wego 2>&1", 1) - end -end diff --git a/Formula/weighttp.rb b/Formula/weighttp.rb deleted file mode 100644 index 34db8598325fb..0000000000000 --- a/Formula/weighttp.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Weighttp < Formula - desc "Webserver benchmarking tool that supports multithreading" - homepage "https://redmine.lighttpd.net/projects/weighttp/wiki" - url "https://github.com/lighttpd/weighttp/archive/weighttp-0.4.tar.gz" - sha256 "b4954f2a1eca118260ffd503a8e3504dd32942e2e61d0fa18ccb6b8166594447" - head "https://git.lighttpd.net/weighttp.git" - - bottle do - cellar :any - sha256 "2ab4f5e31f9411d55c4a4653f78bb381b70f53f49d07efaf6e99b5a86281b62a" => :mojave - sha256 "4225f653fe64067e3330c33202a15ad65a6b194ce23619ae045cbe50528a9b02" => :high_sierra - sha256 "242f14d7a7fb477e4722a3818a98ad25ffedd5d2c80e7c97d67c80fe2a20366c" => :sierra - sha256 "e96be0135f552ddde0547ca914c2bc6635dcc59ce4bdeb803ab9412100d8d15b" => :el_capitan - sha256 "e83c9f99b524b57ba31571dc673ab6d2d2a5e38a5374ce45130f11a51c063662" => :yosemite - sha256 "914e5fbf3f6c4fd42c532fa32a741c0558b7b16a71d773722c92c64f0b42a2f3" => :mavericks - end - - depends_on "libev" - - def install - system "./waf", "configure" - system "./waf", "build" - bin.install "build/default/weighttp" - end - - test do - # Stick with HTTP to avoid 'error: no ssl support yet' - system "#{bin}/weighttp", "-n", "1", "http://redmine.lighttpd.net/projects/weighttp/wiki" - end -end diff --git a/Formula/wellington.rb b/Formula/wellington.rb deleted file mode 100644 index c2937984da69f..0000000000000 --- a/Formula/wellington.rb +++ /dev/null @@ -1,54 +0,0 @@ -require "language/go" - -class Wellington < Formula - desc "Project-focused tool to manage Sass and spriting" - homepage "https://getwt.io/" - url "https://github.com/wellington/wellington/archive/v1.0.4.tar.gz" - sha256 "ef92d6c2b11fe36f66b88612e7a9cfff3ea6f81f29f4c21481d358f474a191d6" - head "https://github.com/wellington/wellington.git" - - bottle do - cellar :any_skip_relocation - sha256 "df25c2ccd2a972ba8e208168552d97fab66aedda36eb34df7b52b16f8db0d386" => :high_sierra - sha256 "a0ba1b9d9b495bf840140087276b501c0458b0d9d64a7bd83d19208e5787a569" => :sierra - sha256 "f681adb615a82377c1855000ac57c26c7403df8f8a1371646630afaddb922e63" => :el_capitan - sha256 "224a5a7d40b14cbd89e6cec80c73fd775aaf660c94fba53d651b70aab56524e9" => :yosemite - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - - go_resource "golang.org/x/net" do - url "https://github.com/golang/net.git", - :revision => "f09c4662a0bd6bd8943ac7b4931e185df9471da4" - end - - needs :cxx11 - - def install - ENV.cxx11 if MacOS.version < :mavericks - - ENV["GOPATH"] = buildpath - - dir = buildpath/"src/github.com/wellington/wellington" - dir.install buildpath.children - Language::Go.stage_deps resources, buildpath/"src" - - cd dir do - system "go", "build", "-ldflags", - "-X github.com/wellington/wellington/version.Version=#{version}", - "-o", bin/"wt", "wt/main.go" - prefix.install_metafiles - end - end - - test do - s = "div { p { color: red; } }" - expected = <<~EOS - /* line 1, stdin */ - div p { - color: red; } - EOS - assert_equal expected, pipe_output("#{bin}/wt --comment", s, 0) - end -end diff --git a/Formula/wemux.rb b/Formula/wemux.rb deleted file mode 100644 index 372410008d1a0..0000000000000 --- a/Formula/wemux.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Wemux < Formula - desc "Enhances tmux's to provide multiuser terminal multiplexing" - homepage "https://github.com/zolrath/wemux" - url "https://github.com/zolrath/wemux/archive/v3.2.0.tar.gz" - sha256 "8de6607df116b86e2efddfe3740fc5eef002674e551668e5dde23e21b469b06c" - head "https://github.com/zolrath/wemux.git" - - bottle do - rebuild 2 - sha256 "d2abdfef10f58397bd2432229ad301f75f1f2f615aca6151165c93822ed208be" => :mojave - sha256 "4da7fcb0ac46c071491e9c8a3946ae4515414b64a5513c75acde7d71650daa4d" => :high_sierra - sha256 "4da7fcb0ac46c071491e9c8a3946ae4515414b64a5513c75acde7d71650daa4d" => :sierra - sha256 "4da7fcb0ac46c071491e9c8a3946ae4515414b64a5513c75acde7d71650daa4d" => :el_capitan - end - - depends_on "tmux" - - def install - inreplace "wemux", "/usr/local/etc", etc - bin.install "wemux" - man1.install "man/wemux.1" - - inreplace "wemux.conf.example", "change_this", ENV["USER"] - etc.install "wemux.conf.example" => "wemux.conf" - end - - def caveats; <<~EOS - Your current user account has been automatically added as a wemux host. - - To give a user the ability to host wemux sessions add them to the - host_list array in: - #{etc}/wemux.conf - - Either edit the file in your text editor of choice or run `wemux conf` to - open the file in your $EDITOR. - EOS - end - - test do - system "#{bin}/wemux", "help" - end -end diff --git a/Formula/wesnoth.rb b/Formula/wesnoth.rb deleted file mode 100644 index bacfaf4e077d6..0000000000000 --- a/Formula/wesnoth.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Wesnoth < Formula - desc "Single- and multi-player turn-based strategy game" - homepage "https://www.wesnoth.org/" - url "https://downloads.sourceforge.net/project/wesnoth/wesnoth-1.12/wesnoth-1.12.6/wesnoth-1.12.6.tar.bz2" - sha256 "a50f384cead15f68f31cfa1a311e76a12098428702cb674d3521eb169eb92e4e" - revision 8 - head "https://github.com/wesnoth/wesnoth.git" - - bottle do - sha256 "c1e57e9db734dae8894f25fbb2ca6668abec294af98033558e047e76c47db873" => :mojave - sha256 "ea1c1b9370dc86ac25a846958ecac6a731f82d79b1743de3b541fdb9111c32c6" => :high_sierra - sha256 "824680767e435b633e49a7ede3a4115babace30298a5c1842ee782c686ff7d74" => :sierra - end - - depends_on "gettext" => :build - depends_on "scons" => :build - depends_on "boost" - depends_on "cairo" - depends_on "fontconfig" - depends_on "fribidi" - depends_on "libpng" - depends_on "pango" - depends_on "sdl" - depends_on "sdl_image" # Must have png support - depends_on "sdl_mixer" # The music is in .ogg format - depends_on "sdl_net" - depends_on "sdl_ttf" - - def install - mv "scons/gettext.py", "scons/gettext_tool.py" - inreplace "SConstruct", ", \"gettext\",", ", \"gettext_tool\"," - - args = %W[prefix=#{prefix} docdir=#{doc} mandir=#{man} fifodir=#{var}/run/wesnothd gettextdir=#{Formula["gettext"].opt_prefix}] - args << "OS_ENV=true" - args << "install" - args << "wesnoth" - args << "wesnothd" - args << "-j#{ENV.make_jobs}" - - scons *args - end - - test do - system bin/"wesnoth", "-p", pkgshare/"data/campaigns/tutorial/", testpath - end -end diff --git a/Formula/wget.rb b/Formula/wget.rb deleted file mode 100644 index 1c9e7c87377b5..0000000000000 --- a/Formula/wget.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Wget < Formula - desc "Internet file retriever" - homepage "https://www.gnu.org/software/wget/" - url "https://ftp.gnu.org/gnu/wget/wget-1.20.1.tar.gz" - mirror "https://ftpmirror.gnu.org/wget/wget-1.20.1.tar.gz" - sha256 "b783b390cb571c837b392857945f5a1f00ec6b043177cc42abb8ee1b542ee1b3" - revision 1 - - bottle do - sha256 "cf0015a7ddf079f83c5938b8724cb1a45472be5eddffd917fbb9d398f2c33873" => :mojave - sha256 "bec2cf88b421a1d2759111054f98df21caa6602282897f81473c18b9c14ed0e4" => :high_sierra - sha256 "39383f48327c93865b7f199e306f8f9e0e3051235a2f432e1e65493780df58df" => :sierra - end - - head do - url "https://git.savannah.gnu.org/git/wget.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "xz" => :build - depends_on "gettext" - end - - depends_on "pkg-config" => :build - depends_on "pod2man" => :build if MacOS.version <= :snow_leopard - depends_on "libidn2" - depends_on "openssl" - - def install - system "./bootstrap", "--skip-po" if build.head? - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--with-ssl=openssl", - "--with-libssl-prefix=#{Formula["openssl"].opt_prefix}", - "--disable-debug" - system "make", "install" - end - - test do - system bin/"wget", "-O", "/dev/null", "https://google.com" - end -end diff --git a/Formula/wgetpaste.rb b/Formula/wgetpaste.rb deleted file mode 100644 index 9880dc976ba1d..0000000000000 --- a/Formula/wgetpaste.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Wgetpaste < Formula - desc "Automate pasting to a number of pastebin services" - homepage "https://wgetpaste.zlin.dk/" - url "https://wgetpaste.zlin.dk/wgetpaste-2.28.tar.bz2" - sha256 "538d38bab491544bdf6f05f7a38f83d4c3dfee77de7759cb6b9be1ebfdd609c2" - - bottle :unneeded - - depends_on "wget" - - def install - bin.install "wgetpaste" - zsh_completion.install "_wgetpaste" - end - - test do - system bin/"wgetpaste", "-S" - end -end diff --git a/Formula/whatmask.rb b/Formula/whatmask.rb deleted file mode 100644 index 2a968cc5d2fb1..0000000000000 --- a/Formula/whatmask.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Whatmask < Formula - desc "Network settings helper" - homepage "http://www.laffeycomputer.com/whatmask.html" - url "https://web.archive.org/web/20170107110521/downloads.laffeycomputer.com/current_builds/whatmask/whatmask-1.2.tar.gz" - sha256 "7dca0389e22e90ec1b1c199a29838803a1ae9ab34c086a926379b79edb069d89" - - bottle do - cellar :any_skip_relocation - sha256 "acfac14343f3a746de062b9cbe300bcfb6287df43fd2c4ec5395f7c49e51e7ad" => :mojave - sha256 "a46f984a59776d23efc00fbae9841026547f5c4f3884c31007c06acae51d4881" => :high_sierra - sha256 "7d9c8318c69271c9b7774a4f84cd315f28986bd7dacc1f1c9a5451880a415a8b" => :sierra - sha256 "acf751e4893268ccbee1e48e9f7a147cc38f64a9d178fc50c810d65c0466a648" => :el_capitan - sha256 "428a92b2ba5a3f6f39009a7d3a7fc503b4308fadaeddc287b39fd6b5bdddef74" => :yosemite - sha256 "c07eb39e586dbc2b78b4c8cf8173c701ac654e4db0fd5fe12b3c7f80ee3ef577" => :mavericks - sha256 "1af978f489425defa0d2c700a50fb140a6ce62274f4ab76530f553b2fba2f6a5" => :mountain_lion - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--mandir=#{man}", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal <<~EOS, shell_output("#{bin}/whatmask /24") - - --------------------------------------------- - TCP/IP SUBNET MASK EQUIVALENTS - --------------------------------------------- - CIDR = .....................: /24 - Netmask = ..................: 255.255.255.0 - Netmask (hex) = ............: 0xffffff00 - Wildcard Bits = ............: 0.0.0.255 - Usable IP Addresses = ......: 254 - - EOS - end -end diff --git a/Formula/whatmp3.rb b/Formula/whatmp3.rb deleted file mode 100644 index 3c2536a06d8a2..0000000000000 --- a/Formula/whatmp3.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Whatmp3 < Formula - desc "Small script to create mp3 torrents out of FLACs" - homepage "https://github.com/RecursiveForest/whatmp3" - url "https://github.com/RecursiveForest/whatmp3/archive/v3.8.tar.gz" - sha256 "0d8ba70a1c72835663a3fde9ba8df0ff7007268ec0a2efac76c896dea4fcf489" - revision 2 - head "https://github.com/RecursiveForest/whatmp3.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6b36c6382c121ba067270c41d336af706df2f2a531e02703f629557aaa8206d7" => :mojave - sha256 "976769c7868f672a9a5bd625b1c6d4e557dbbaf74f9d4274ebac0a1b0afe920a" => :high_sierra - sha256 "976769c7868f672a9a5bd625b1c6d4e557dbbaf74f9d4274ebac0a1b0afe920a" => :sierra - sha256 "976769c7868f672a9a5bd625b1c6d4e557dbbaf74f9d4274ebac0a1b0afe920a" => :el_capitan - end - - depends_on "flac" - depends_on "lame" - depends_on "mktorrent" - depends_on "python" - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - (testpath/"flac").mkpath - cp test_fixtures("test.flac"), "flac" - system "#{bin}/whatmp3", "--notorrent", "--V0", "flac" - assert_predicate testpath/"V0/test.mp3", :exist? - end -end diff --git a/Formula/when.rb b/Formula/when.rb deleted file mode 100644 index d6920965d65b6..0000000000000 --- a/Formula/when.rb +++ /dev/null @@ -1,28 +0,0 @@ -class When < Formula - desc "Tiny personal calendar" - homepage "http://www.lightandmatter.com/when/when.html" - url "https://deb.debian.org/debian/pool/main/w/when/when_1.1.38.orig.tar.gz" - sha256 "139834945142f5e3ea6b20f43ba740d30b4a87b42ce5767026094e633dca999f" - head "https://github.com/bcrowell/when.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6d9163386a8a6648be9cbb9059d08d81fc87cd28503f7ae55883afb497990d68" => :mojave - sha256 "07fe70f0124a3efbf0a2119ff407aa5089316e3504ca7b9eda7a38f619fff7ae" => :high_sierra - sha256 "07fe70f0124a3efbf0a2119ff407aa5089316e3504ca7b9eda7a38f619fff7ae" => :sierra - end - - def install - system "make", "prefix=#{prefix}", "install" - end - - test do - (testpath/".when/preferences").write <<~EOS - calendar = #{testpath}/calendar - EOS - - (testpath/"calendar").write "2015 April 1, stay off the internet" - system bin/"when", "i" - end -end diff --git a/Formula/whirr.rb b/Formula/whirr.rb deleted file mode 100644 index c006ad63b8306..0000000000000 --- a/Formula/whirr.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Whirr < Formula - desc "Set of libraries for running cloud services" - homepage "https://whirr.apache.org/" - url "https://archive.apache.org/dist/whirr/whirr-0.8.2/whirr-0.8.2.tar.gz" - sha256 "d5ec36c4a6928079118065e3d918679870a42c844e47924b1cd4d7be00a4aca5" - - bottle :unneeded - - def install - libexec.install %w[bin conf lib] - bin.write_exec_script libexec/"bin/whirr" - end - - test do - system "#{bin}/whirr", "help", "help" - end -end diff --git a/Formula/whitedb.rb b/Formula/whitedb.rb deleted file mode 100644 index 0d09db628a8a9..0000000000000 --- a/Formula/whitedb.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Whitedb < Formula - desc "Lightweight in-memory NoSQL database library" - homepage "http://whitedb.org/" - url "http://whitedb.org/whitedb-0.7.3.tar.gz" - sha256 "10c4ccd754ed2d53dbdef9ec16c88c732aa73d923fc0ee114e7e3a78a812849d" - - bottle do - cellar :any - sha256 "05673924ef2226616618002bcbcee6241db8f1ce34339ff38785fd4fe82cda43" => :mojave - sha256 "3dc724386650bbbf608c4742d954c338e1927427e4c4f1a9c0d6255cc8deee5d" => :high_sierra - sha256 "44639bc83668def2e81b68318dbdb5347f9262937ddb6cfdfd7303aae1ce05a6" => :sierra - sha256 "c0f4e666e9cc755bbff0711a1494c9705928a34a565701147bae31793f505163" => :el_capitan - sha256 "0fa38dca524c08f51fa724fb49df5a3ebdde46a3251b2a282d5343b36c4c249f" => :yosemite - sha256 "ba756975f0dbdfa4259a5a4271414765644b0abe8c771d0c091238909f0968d2" => :mavericks - sha256 "aa86b2acca68b9999ecb4cb9da7c64f659a97ffbd50d7aeb78c021df13866474" => :mountain_lion - end - - def install - # https://github.com/priitj/whitedb/issues/15 - ENV.append "CFLAGS", "-std=gnu89" - - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/wgdb", "create", "512k" - system "#{bin}/wgdb", "add", "42" - system "#{bin}/wgdb", "select", "1" - system "#{bin}/wgdb", "free" - end -end diff --git a/Formula/whohas.rb b/Formula/whohas.rb deleted file mode 100644 index d3be6da224327..0000000000000 --- a/Formula/whohas.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Whohas < Formula - desc "Query multiple distributions' package archives" - homepage "http://www.philippwesche.org/200811/whohas/intro.html" - url "https://github.com/whohas/whohas/releases/download/0.29.1/whohas-0.29.1.tar.gz" - sha256 "dbf2396838cb0f97726041213c04426b818d48cc510bd529faf30a8411682878" - - bottle do - cellar :any_skip_relocation - sha256 "9d2750cb7494536df98d8df50d3ae9d6e3e48e8f12aebe4bb38c5fd8219b7f62" => :mojave - sha256 "ad57fdefa6da7a779c1bd503f336634dc55b8f524f8e59cfa74fb2a6eba42ebd" => :high_sierra - sha256 "0fc69ababba028f6408233021f0dfbbe6b1d29abcbce8416b8eb109c24a570d1" => :sierra - sha256 "5b879543999158c4f55a52fdb9e643267ac1ad46aa69e56448f43799f1cce771" => :el_capitan - end - - resource "Acme::Damn" do - url "https://cpan.metacpan.org/authors/id/I/IB/IBB/Acme-Damn-0.08.tar.gz" - sha256 "310d2d03ff912dcd42e4d946174099f41fe3a2dd57a497d6bd65baf1759b7e0e" - end - - resource "forks" do - url "https://cpan.metacpan.org/authors/id/R/RY/RYBSKEJ/forks-0.36.tar.gz" - sha256 "61be24e44f4c6fea230e8354678beb5b7adcfefd909a47db8f0a251b0ab65993" - end - - resource "Sys::SigAction" do - url "https://cpan.metacpan.org/authors/id/L/LB/LBAXTER/Sys-SigAction-0.23.tar.gz" - sha256 "c4ef6c9345534031fcbbe2adc347fc7194d47afc945e7a44fac7e9563095d353" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - bin.install "whohas" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - - man1.install "usr/share/man/man1/whohas.1" - doc.install "html_assets", "intro.html" - end - - test do - assert_match "NetBSD", shell_output("#{bin}/whohas whohas 2>&1") - end -end diff --git a/Formula/whois.rb b/Formula/whois.rb deleted file mode 100644 index 9ee5249a4716d..0000000000000 --- a/Formula/whois.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Whois < Formula - desc "Lookup tool for domain names and other internet resources" - homepage "https://packages.debian.org/sid/whois" - url "https://deb.debian.org/debian/pool/main/w/whois/whois_5.4.0.tar.xz" - sha256 "3775ae0cfaa6dd8d886e5233c4826225cddcb88c99c2a08130d14e15fe58e378" - revision 2 - head "https://github.com/rfc1036/whois.git" - - bottle do - cellar :any - sha256 "e932ffe0a27c3c9178ee3aff41f0bebdfcc3e3ffc7b0049cdece6f9612056d48" => :mojave - sha256 "7954ae0228a28a018d674d524679314e5f43c9b6ef01f78c49cb243ceae45dcf" => :high_sierra - sha256 "7d9dc40a7db1cb00ba681772339c404fed21d1ef16475be390946187375525ae" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libidn2" - - def install - ENV.append "LDFLAGS", "-L/usr/lib -liconv" - - system "make", "whois", "HAVE_ICONV=1" - bin.install "whois" - man1.install "whois.1" - man5.install "whois.conf.5" - end - - def caveats; <<~EOS - Debian whois has been installed as `whois` and may shadow the - system binary of the same name. - EOS - end - - test do - system "#{bin}/whois", "brew.sh" - end -end diff --git a/Formula/widelands.rb b/Formula/widelands.rb deleted file mode 100644 index 9aabade692e4b..0000000000000 --- a/Formula/widelands.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Widelands < Formula - desc "Free real-time strategy game like Settlers II" - homepage "https://wl.widelands.org/" - url "https://launchpad.net/widelands/build19/build19/+download/widelands-build19-src.tar.bz2" - sha256 "e511f9d26828a2b71b64cdfc6674e6e847543b2da73961ab882acca36c7c01a6" - revision 13 - - bottle do - sha256 "1f47eacc59619797f3609a71460e6f8e25d3e19fcfcecb8cdec41dae621e020f" => :mojave - sha256 "33f630588ed1f396056e9dfe71004bd0fa8f1567082bacbfd94e882253622df4" => :high_sierra - sha256 "02c4096b565587cca30d721d936cf243dd5c92800a7b7693a3b7f40877ddca2e" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "doxygen" - depends_on "gettext" - depends_on "glew" - depends_on "icu4c" - depends_on "libpng" - depends_on "lua" - depends_on "minizip" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - depends_on "sdl2_net" - depends_on "sdl2_ttf" - - needs :cxx11 - - def install - # icu4c 61.1 compatability - ENV.append "CXXFLAGS", "-DU_USING_ICU_NAMESPACE=1" - - ENV.cxx11 - mkdir "build" do - system "cmake", "..", - # Without the following option, Cmake intend to use the library of MONO framework. - "-DPNG_PNG_INCLUDE_DIR:PATH=#{Formula["libpng"].opt_include}", - "-DWL_INSTALL_DATADIR=#{pkgshare}/data", - *std_cmake_args - system "make", "install" - - (bin/"widelands").write <<~EOS - #!/bin/sh - exec #{prefix}/widelands "$@" - EOS - end - end - - test do - system bin/"widelands", "--version" - end -end diff --git a/Formula/wifi-password.rb b/Formula/wifi-password.rb deleted file mode 100644 index 8f5c3b414a18d..0000000000000 --- a/Formula/wifi-password.rb +++ /dev/null @@ -1,16 +0,0 @@ -class WifiPassword < Formula - desc "Show the current WiFi network password" - homepage "https://github.com/rauchg/wifi-password" - url "https://github.com/rauchg/wifi-password/archive/0.1.0.tar.gz" - sha256 "6af6a34a579063eb21c067f10b7c2eb5995995eceb70e6a1f571dc78d4f3651b" - - bottle :unneeded - - def install - bin.install "wifi-password.sh" => "wifi-password" - end - - test do - system "#{bin}/wifi-password", "--version" - end -end diff --git a/Formula/wiggle.rb b/Formula/wiggle.rb deleted file mode 100644 index 6a158537e69e5..0000000000000 --- a/Formula/wiggle.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Wiggle < Formula - desc "Program for applying patches with conflicting changes" - homepage "https://neil.brown.name/blog/20100324064620" - url "https://neil.brown.name/wiggle/wiggle-1.1.tar.gz" - sha256 "3da3cf6a456dd1415d2644e345f9831eb2912c6fa8dfa5d63d9bf49d744abff3" - - bottle do - cellar :any_skip_relocation - sha256 "df5814acd5dac0b0acaa7b6f19234c44187f3d3026f31bf1785c54bf0471d4d1" => :mojave - sha256 "e9b7905c9b7cf53030b67255642b58bdf671702783278409a7c6059eb88ed9b5" => :high_sierra - sha256 "38ae96a5c3bb1ce68376f8e17ddf915fc7d667bbbd973db54a385085946da16b" => :sierra - sha256 "f2b73f0db1e85e3ac79e06eb6407fd1fcd63ca6dbf34b707db78207bcfc59e7a" => :el_capitan - end - - def install - system "make", "OptDbg=#{ENV.cflags}", "wiggle", "wiggle.man", "test" - bin.install "wiggle" - man1.install "wiggle.1" - end - - test do - system "#{bin}/wiggle", "--version" - end -end diff --git a/Formula/wiki.rb b/Formula/wiki.rb deleted file mode 100644 index 1f6c16a658908..0000000000000 --- a/Formula/wiki.rb +++ /dev/null @@ -1,42 +0,0 @@ -require "language/go" - -class Wiki < Formula - desc "Fetch summaries from MediaWiki wikis, like Wikipedia" - homepage "https://github.com/walle/wiki" - url "https://github.com/walle/wiki/archive/1.4.0.tar.gz" - sha256 "b9adb27485feba68574e3abf5564577f2fcec1bf2176fc8f80b09b6f8ca6ffff" - - bottle do - cellar :any_skip_relocation - sha256 "c2356b595d2c4b9a6ade9f569b0186de56c016121cb28c5e525353ad3b74c7c0" => :mojave - sha256 "b659c9bc28a5468e61a7af026f20fe8a9233b852e1165e5d900755db68fa85f6" => :high_sierra - sha256 "0f3302cb5063486d6cb1beb1a25c771b50c03f0318f05e7d3520b1a2d05a445b" => :sierra - sha256 "6e6d9036b7943ef08cbf92c5aec72b214599aa83bd0a038f4d7a0d19a90a70b0" => :el_capitan - sha256 "b7f224cc011a63259a7ef24b2709a4fb3ba053b15f1861a6c3f03d29925251f8" => :yosemite - end - - depends_on "go" => :build - - go_resource "github.com/mattn/go-colorable" do - url "https://github.com/mattn/go-colorable.git", - :revision => "40e4aedc8fabf8c23e040057540867186712faa5" - end - - def install - ENV["GOPATH"] = buildpath - wikipath = buildpath/"src/github.com/walle/wiki" - wikipath.install Dir["{*,.git}"] - Language::Go.stage_deps resources, buildpath/"src" - - cd "src/github.com/walle/wiki" do - system "go", "build", "-o", "build/wiki", "cmd/wiki/main.go" - bin.install "build/wiki" - man1.install "_doc/wiki.1" - prefix.install_metafiles - end - end - - test do - assert_match "Read more: https://en.wikipedia.org/wiki/Go", shell_output("#{bin}/wiki golang") - end -end diff --git a/Formula/wildfly-as.rb b/Formula/wildfly-as.rb deleted file mode 100644 index b1ea4b282e4e7..0000000000000 --- a/Formula/wildfly-as.rb +++ /dev/null @@ -1,64 +0,0 @@ -class WildflyAs < Formula - desc "Managed application runtime for building applications" - homepage "http://wildfly.org/" - url "https://download.jboss.org/wildfly/14.0.0.Final/wildfly-14.0.0.Final.tar.gz" - sha256 "5fdd1f8d8d3a1c7ab76b0cd7b0d4e1d8dc2bb8e38e82d4ed1f08f8d018aa511a" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - rm_f Dir["bin/*.bat"] - rm_f Dir["bin/*.ps1"] - libexec.install Dir["*"] - mkdir_p libexec/"standalone/log" - end - - def caveats; <<~EOS - The home of WildFly Application Server #{version} is: - #{opt_libexec} - You may want to add the following to your .bash_profile: - export JBOSS_HOME=#{opt_libexec} - export PATH=${PATH}:${JBOSS_HOME}/bin - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/wildfly-as/libexec/bin/standalone.sh --server-config=standalone.xml" - - def plist; <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - SuccessfulExit - - Crashed - - - ProgramArguments - - #{opt_libexec}/bin/standalone.sh - --server-config=standalone.xml - - EnvironmentVariables - - JBOSS_HOME - #{opt_libexec} - WILDFLY_HOME - #{opt_libexec} - - - - EOS - end - - test do - ENV["JBOSS_HOME"] = opt_libexec - system "#{opt_libexec}/bin/standalone.sh --version | grep #{version}" - end -end diff --git a/Formula/willgit.rb b/Formula/willgit.rb deleted file mode 100644 index 6b94f52a9df13..0000000000000 --- a/Formula/willgit.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Willgit < Formula - desc "William's miscellaneous git tools" - homepage "https://github.com/DanielVartanov/willgit" - url "https://github.com/DanielVartanov/willgit/archive/1.0.0.tar.gz" - sha256 "3bb99d6ec2614a90f40962311daf51f393b3d0abfdb0f9e0a14ba7340b33a2c8" - head "https://github.com/DanielVartanov/willgit.git" - - bottle :unneeded - - conflicts_with "git-utils", - :because => "both install a `git-rank-contributors` script" - - def install - prefix.install "bin" - end - - test do - system "git", "init" - (testpath/"README.md").write "# My Awesome Project" - system "git", "add", "README.md" - system "git", "commit", "-m", "init" - assert_equal "Local branch: master", - shell_output("git wtf").chomp - end -end diff --git a/Formula/wimlib.rb b/Formula/wimlib.rb deleted file mode 100644 index 7411bee0967fa..0000000000000 --- a/Formula/wimlib.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Wimlib < Formula - desc "Library to create, extract, and modify Windows Imaging files" - homepage "https://wimlib.net/" - url "https://wimlib.net/downloads/wimlib-1.12.0.tar.gz" - sha256 "852cf59d682a91974f715f09fa98cab621b740226adcfea7a42360be0f86464f" - - bottle do - cellar :any - sha256 "90885cd4c036828bdeee29a9f68d2c33e7c80a644599cc0a797a502ec82fefbc" => :mojave - sha256 "bf98257d6f32313b3a57713ae6b2ad7c3f72ddd5b1e1ed609436fb337ba51d63" => :high_sierra - sha256 "32a00c25f98932b84ac5304df29eb5f6edea0a2fc3a2b33ee83938e92c488549" => :sierra - sha256 "6a2b65020b31dbda4499bffbe773e5596dbc130d6f91ee84c9a7c532dd858594" => :el_capitan - sha256 "c26d19bd6a6994fae60000f329d136c991b6a1172141c6c047792175a2c79439" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - # fuse requires librt, unavailable on OSX - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --without-fuse - --without-ntfs-3g - ] - - system "./configure", *args - system "make", "install" - end - - test do - # make a directory containing a dummy 1M file - mkdir("foo") - system "dd", "if=/dev/random", "of=foo/bar", "bs=1m", "count=1" - - # capture an image - ENV.append "WIMLIB_IMAGEX_USE_UTF8", "1" - system "#{bin}/wimcapture", "foo", "bar.wim" - assert_predicate testpath/"bar.wim", :exist? - - # get info on the image - system "#{bin}/wiminfo", "bar.wim" - end -end diff --git a/Formula/wine.rb b/Formula/wine.rb deleted file mode 100644 index dbacfe89c5709..0000000000000 --- a/Formula/wine.rb +++ /dev/null @@ -1,471 +0,0 @@ -# NOTE: When updating Wine, please make sure to match Wine-Gecko and Wine-Mono -# versions: -# - https://wiki.winehq.org/Gecko -# - https://wiki.winehq.org/Mono -# with `GECKO_VERSION` and `MONO_VERSION`, as in: -# https://source.winehq.org/git/wine.git/blob/refs/tags/wine-3.0:/dlls/appwiz.cpl/addons.c -class Wine < Formula - desc "Run Windows applications without a copy of Microsoft Windows" - homepage "https://www.winehq.org/" - - stable do - url "https://dl.winehq.org/wine/source/3.0/wine-3.0.4.tar.xz" - mirror "https://downloads.sourceforge.net/project/wine/Source/wine-3.0.4.tar.xz" - sha256 "d45a88edbe7db363e297cacedc94e66df3464504a01c2eccf04f518066a6fb0c" - - # Patch to fix screen-flickering issues. Still relevant on 3.0. - # https://bugs.winehq.org/show_bug.cgi?id=34166 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/74c2566/wine/2.14.patch" - sha256 "6907471d18996ada60cc0cbc8462a1698e90720c0882846dfbfb163e5d3899b8" - end - - resource "mono" do - url "https://dl.winehq.org/wine/wine-mono/4.7.3/wine-mono-4.7.3.msi" - sha256 "d24a8017371c7e8224a1778bb43a113ed7ed9720efd9d0cda175d42db6106d3a" - end - end - - bottle do - sha256 "b136fdb2205db4e492e36c5ce1c6cf672517dc362af68bc475268bc4877ee98b" => :sierra - end - - head do - url "https://source.winehq.org/git/wine.git" - - resource "mono" do - url "https://dl.winehq.org/wine/wine-mono/4.7.3/wine-mono-4.7.3.msi" - sha256 "d24a8017371c7e8224a1778bb43a113ed7ed9720efd9d0cda175d42db6106d3a" - end - - # Does not build with Xcode 10, used on High Sierra and Mojave - depends_on :maximum_macos => :sierra - end - - depends_on "cmake" => :build - depends_on "makedepend" => :build - - # High Sierra doesn't support 32-bit builds, and thus wine fails to compile. - # This will only be safe to remove when upstream support 64-bit builds. - depends_on :maximum_macos => [:sierra, :build] - - depends_on "pkg-config" => :build - depends_on :macos => :el_capitan - - resource "gecko-x86" do - url "https://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86.msi" - sha256 "3b8a361f5d63952d21caafd74e849a774994822fb96c5922b01d554f1677643a" - end - - resource "gecko-x86_64" do - url "https://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86_64.msi" - sha256 "c565ea25e50ea953937d4ab01299e4306da4a556946327d253ea9b28357e4a7d" - end - - resource "openssl" do - url "https://www.openssl.org/source/openssl-1.0.2q.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/openssl--1.0.2p.tar.gz" - sha256 "5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684" - end - - resource "libtool" do - url "https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz" - mirror "https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.xz" - sha256 "7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f" - end - - resource "jpeg" do - url "https://www.ijg.org/files/jpegsrc.v9c.tar.gz" - mirror "https://fossies.org/linux/misc/jpegsrc.v9c.tar.gz" - sha256 "650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122" - end - - resource "libtiff" do - url "https://download.osgeo.org/libtiff/tiff-4.0.10.tar.gz" - mirror "https://fossies.org/linux/misc/tiff-4.0.10.tar.gz" - sha256 "2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4" - end - - resource "little-cms2" do - url "https://downloads.sourceforge.net/project/lcms/lcms/2.9/lcms2-2.9.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/l/lcms2/lcms2_2.9.orig.tar.gz" - sha256 "48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20" - end - - resource "libpng" do - url "https://downloads.sourceforge.net/libpng/libpng-1.6.35.tar.xz" - mirror "https://sourceforge.mirrorservice.org/l/li/libpng/libpng16/1.6.35/libpng-1.6.35.tar.xz" - sha256 "23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7" - end - - resource "freetype" do - url "https://downloads.sourceforge.net/project/freetype/freetype2/2.9.1/freetype-2.9.1.tar.bz2" - mirror "https://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.bz2" - sha256 "db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d" - end - - resource "libusb" do - url "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2" - mirror "https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.22/libusb-1.0.22.tar.bz2" - sha256 "75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157" - end - - resource "webp" do - url "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.1.tar.gz" - sha256 "8c744a5422dbffa0d1f92e90b34186fb8ed44db93fbacb55abd751ac8808d922" - end - - resource "fontconfig" do - url "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.1.tar.bz2" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/fontconfig/fontconfig-2.13.1.tar.bz2" - sha256 "f655dd2a986d7aa97e052261b36aa67b0a64989496361eca8d604e6414006741" - end - - resource "gd" do - url "https://github.com/libgd/libgd/releases/download/gd-2.2.5/libgd-2.2.5.tar.xz" - mirror "https://src.fedoraproject.org/repo/pkgs/gd/libgd-2.2.5.tar.xz/sha512/946675b0a9dbecdee3dda927d496a35d6b5b071d3252a82cd649db0d959a82fcc65ce067ec34d07eed0e0497cd92cc0d93803609a4854f42d284e950764044d0/libgd-2.2.5.tar.xz" - sha256 "8c302ccbf467faec732f0741a859eef4ecae22fea2d2ab87467be940842bde51" - end - - resource "libgphoto2" do - url "https://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.19/libgphoto2-2.5.19.tar.bz2" - sha256 "62523e52e3b8542301e072635b518387f2bd0948347775cf10cb2da9a6612c63" - end - - resource "net-snmp" do - url "https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.8/net-snmp-5.8.tar.gz" - sha256 "b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf" - end - - resource "sane-backends" do - url "https://deb.debian.org/debian/pool/main/s/sane-backends/sane-backends_1.0.27.orig.tar.gz" - mirror "https://fossies.org/linux/misc/sane-backends-1.0.27.tar.gz" - sha256 "293747bf37275c424ebb2c833f8588601a60b2f9653945d5a3194875355e36c9" - end - - resource "mpg123" do - url "https://downloads.sourceforge.net/project/mpg123/mpg123/1.25.10/mpg123-1.25.10.tar.bz2" - mirror "https://www.mpg123.de/download/mpg123-1.25.10.tar.bz2" - sha256 "6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023" - end - - def openssl_arch_args - { - :x86_64 => %w[darwin64-x86_64-cc enable-ec_nistp_64_gcc_128], - :i386 => %w[darwin-i386-cc], - } - end - - # Store and restore some of our environment - def save_env - saved_cflags = ENV["CFLAGS"] - saved_ldflags = ENV["LDFLAGS"] - saved_homebrew_archflags = ENV["HOMEBREW_ARCHFLAGS"] - saved_homebrew_cccfg = ENV["HOMEBREW_CCCFG"] - saved_makeflags = ENV["MAKEFLAGS"] - saved_homebrew_optflags = ENV["HOMEBREW_OPTFLAGS"] - begin - yield - ensure - ENV["CFLAGS"] = saved_cflags - ENV["LDFLAGS"] = saved_ldflags - ENV["HOMEBREW_ARCHFLAGS"] = saved_homebrew_archflags - ENV["HOMEBREW_CCCFG"] = saved_homebrew_cccfg - ENV["MAKEFLAGS"] = saved_makeflags - ENV["HOMEBREW_OPTFLAGS"] = saved_homebrew_optflags - end - end - - def install - # 32-bit support has been removed by Apple. - if DevelopmentTools.clang_build_version >= 1000 - odie <<~EOS - Wine cannot currently be installed from source on - macOS #{MacOS.version}. - You may wish to try: - brew install wine --force-bottle - EOS - end - - ENV.prepend_create_path "PATH", "#{libexec}/bin" - ENV.prepend_create_path "PKG_CONFIG_PATH", "#{libexec}/lib/pkgconfig" - - resource("openssl").stage do - save_env do - ENV.deparallelize - ENV.permit_arch_flags - - # OpenSSL will prefer the PERL environment variable if set over $PATH - # which can cause some odd edge cases & isn't intended. Unset for safety, - # along with perl modules in PERL5LIB. - ENV.delete("PERL") - ENV.delete("PERL5LIB") - - archs = Hardware::CPU.universal_archs - - dirs = [] - archs.each do |arch| - dir = "build-#{arch}" - dirs << dir - mkdir_p "#{dir}/engines" - system "make", "clean" - system "perl", "./Configure", "--prefix=#{libexec}", - "no-ssl2", - "no-ssl3", - "no-zlib", - "shared", - "enable-cms", - *openssl_arch_args[arch] - system "make", "depend" - system "make" - cp "include/openssl/opensslconf.h", dir - cp Dir["*.?.?.?.dylib", "*.a", "apps/openssl"], dir - cp Dir["engines/**/*.dylib"], "#{dir}/engines" - end - - system "make", "install" - - %w[libcrypto libssl].each do |libname| - rm_f libexec/"lib/#{libname}.1.0.0.dylib" - MachO::Tools.merge_machos("#{libexec}/lib/#{libname}.1.0.0.dylib", - "#{dirs.first}/#{libname}.1.0.0.dylib", - "#{dirs.last}/#{libname}.1.0.0.dylib") - rm_f libexec/"lib/#{libname}.a" - end - - Dir.glob("#{dirs.first}/engines/*.dylib") do |engine| - libname = File.basename(engine) - rm_f libexec/"lib/engines/#{libname}" - MachO::Tools.merge_machos("#{libexec}/lib/engines/#{libname}", - "#{dirs.first}/engines/#{libname}", - "#{dirs.last}/engines/#{libname}") - end - - MachO::Tools.merge_machos("#{libexec}/bin/openssl", - "#{dirs.first}/openssl", - "#{dirs.last}/openssl") - - confs = archs.map do |arch| - <<~EOS - #ifdef __#{arch}__ - #{(Pathname.pwd/"build-#{arch}/opensslconf.h").read} - #endif - EOS - end - (libexec/"include/openssl/opensslconf.h").atomic_write confs.join("\n") - end - end - - depflags = ["CPPFLAGS=-I#{libexec}/include", "LDFLAGS=-L#{libexec}/lib"] - - # All other resources use ENV.universal_binary - save_env do - ENV.universal_binary - - resource("libtool").stage do - ENV["SED"] = "sed" # prevent libtool from hardcoding sed path from superenv - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static", - "--program-prefix=g", - "--enable-ltdl-install" - system "make", "install" - end - - resource("jpeg").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static" - system "make", "install" - end - - resource("libtiff").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static", - "--disable-lzma", - "--without-x", - "--with-jpeg-lib-dir=#{libexec}/lib", - "--with-jpeg-include-dir=#{libexec}/include" - system "make", "install" - end - - resource("little-cms2").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static", - "--with-jpeg=#{libexec}", - "--with-tiff=#{libexec}" - system "make", "install" - end - - resource("libpng").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static" - system "make", "install" - end - - resource("freetype").stage do - system "./configure", "--prefix=#{libexec}", - "--disable-static", - "--without-harfbuzz", - *depflags - system "make", "install" - end - - resource("libusb").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static" - system "make", "install" - end - - resource("webp").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static", - "--disable-gl", - "--enable-libwebpmux", - "--enable-libwebpdemux", - "--enable-libwebpdecoder", - *depflags - system "make", "install" - end - - resource("fontconfig").stage do - font_dirs = %w[/System/Library/Fonts /Library/Fonts ~/Library/Fonts] - if MacOS.version >= :sierra - font_dirs << Dir["/System/Library/Assets/com_apple_MobileAsset_Font*"].max - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static", - "--with-add-fonts=#{font_dirs.join(",")}", - "--localstatedir=#{var}/vendored_wine_fontconfig", - "--sysconfdir=#{prefix}", - *depflags - system "make", "install", "RUN_FC_CACHE_TEST=false" - end - - resource("gd").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--disable-static", - "--without-x", - "--without-xpm", - "--with-png=#{libexec}", - "--with-fontconfig=#{libexec}", - "--with-freetype=#{libexec}", - "--with-jpeg=#{libexec}", - "--with-tiff=#{libexec}", - "--with-webp=#{libexec}" - system "make", "install" - end - - resource("libgphoto2").stage do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - *depflags - system "make", "install" - end - - resource("net-snmp").stage do - # https://sourceforge.net/p/net-snmp/bugs/2504/ - ln_s "darwin13.h", "include/net-snmp/system/darwin18.h" - - system "./configure", "--disable-debugging", - "--prefix=#{libexec}", - "--disable-static", - "--enable-ipv6", - "--with-defaults", - "--with-persistent-directory=#{var}/db/net-snmp_vendored_wine", - "--with-logfile=#{var}/log/snmpd_vendored_wine.log", - "--with-mib-modules=host\ ucd-snmp/diskio", - "--without-rpm", - "--without-kmem-usage", - "--disable-embedded-perl", - "--without-perl-modules", - "--with-openssl=#{libexec}", - *depflags - system "make" - system "make", "install" - end - - resource("sane-backends").stage do - save_env do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--localstatedir=#{var}", - "--without-gphoto2", - "--enable-local-backends", - "--with-usb=yes", - *depflags - # Remove for > 1.0.27 - # Workaround for bug in Makefile.am described here: - # https://lists.alioth.debian.org/pipermail/sane-devel/2017-August/035576.html. - # Fixed in https://anonscm.debian.org/cgit/sane/sane-backends.git/commit/?id=519ff57 - system "make" - system "make", "install" - end - end - - resource("mpg123").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{libexec}", - "--with-default-audio=coreaudio", - "--with-module-suffix=.so", - "--with-cpu=generic" - system "make", "install" - end - end - - # Help wine find our libraries at runtime - %w[freetype jpeg png sane tiff].each do |dep| - ENV["ac_cv_lib_soname_#{dep}"] = (libexec/"lib/lib#{dep}.dylib").realpath - end - - mkdir "wine-64-build" do - system "../configure", "--prefix=#{prefix}", - "--enable-win64", - "--without-x", - *depflags - system "make", "install" - end - - mkdir "wine-32-build" do - ENV.m32 - system "../configure", "--prefix=#{prefix}", - "--with-wine64=../wine-64-build", - "--without-x", - *depflags - system "make", "install" - end - (pkgshare/"gecko").install resource("gecko-x86") - (pkgshare/"gecko").install resource("gecko-x86_64") - (pkgshare/"mono").install resource("mono") - end - - def post_install - # For fontconfig - ohai "Regenerating font cache, this may take a while" - system "#{libexec}/bin/fc-cache", "-frv" - - # For net-snmp - (var/"db/net-snmp_vendored_wine").mkpath - (var/"log").mkpath - end - - def caveats; <<~EOS - You may also want winetricks: - brew install winetricks - EOS - end - - test do - assert_equal shell_output("hostname").chomp, shell_output("#{bin}/wine hostname.exe 2>/dev/null").chomp - assert_equal shell_output("hostname").chomp, shell_output("#{bin}/wine64 hostname.exe 2>/dev/null").chomp - end -end diff --git a/Formula/winetricks.rb b/Formula/winetricks.rb deleted file mode 100644 index a09e81c1c56dd..0000000000000 --- a/Formula/winetricks.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Winetricks < Formula - desc "Download and install various runtime libraries" - homepage "https://github.com/Winetricks/winetricks" - url "https://github.com/Winetricks/winetricks/archive/20181203.tar.gz" - sha256 "7144b86b499a4db733efd1f8c360555c64a1ec60af6b1049be06ee88decfcb91" - head "https://github.com/Winetricks/winetricks.git" - - bottle :unneeded - - depends_on "cabextract" - depends_on "p7zip" - depends_on "unrar" - - def install - bin.install "src/winetricks" - man1.install "src/winetricks.1" - end - - def caveats; <<~EOS - winetricks is a set of utilities for wine, which is installed separately: - brew install wine - EOS - end - - test do - system "#{bin}/winetricks", "--version" - end -end diff --git a/Formula/winexe.rb b/Formula/winexe.rb deleted file mode 100644 index 8901622f35be2..0000000000000 --- a/Formula/winexe.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Winexe < Formula - desc "Remote Windows-command executor" - homepage "https://sourceforge.net/projects/winexe/" - url "https://downloads.sourceforge.net/project/winexe/winexe-1.00.tar.gz" - sha256 "99238bd3e1c0637041c737c86a05bd73a9375abc9794dca71d2765e22d87537e" - - bottle do - cellar :any_skip_relocation - sha256 "43444e53e90a4f739a533e4a865952369874d9386460205e501631fa2b3ad2bb" => :mojave - sha256 "765ad670de08f86b8c9b11ec43493148d1368e6c3ffa5e65d1bca898480996c2" => :high_sierra - sha256 "e9594f927f9ef58608951175c0bd118b82cf7b25d5b829453195b66f45c2cbc1" => :sierra - sha256 "58080b3729c9b261a65c7db2072ec867176bfd6a802c23f9b343feb44592789a" => :el_capitan - sha256 "fa7654ed5641e517a658fe8852a9ee5459acca047518c433d989f1aef69a7a6d" => :yosemite - sha256 "32261fefc9c9fd32e91ddb0776d6e43dcdda32b958f9382a8d784972ba09eb3e" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "pkg-config" => :build - - # This Winexe uses "getopts.pl" that is no longer supplied with newer - # versions of Perl - resource "Perl4::CoreLibs" do - url "https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/Perl4-CoreLibs-0.003.tar.gz" - sha256 "55c9b2b032944406dbaa2fd97aa3692a1ebce558effc457b4e800dabfaad9ade" - end - - # This patch removes second definition of event context, which *should* break the build - # virtually everywhere, but for some reason it only breaks it on macOS. - # https://miskstuf.tumblr.com/post/6840077505/winexe-1-00-linux-macos-windows-7-finally-working - # Added by @vspy - patch :DATA - - def install - if MacOS.version >= :mavericks - ENV.prepend_create_path "PERL5LIB", libexec+"lib/perl5" - resource("Perl4::CoreLibs").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - end - - cd "source4" do - system "./autogen.sh" - system "./configure", "--enable-fhs" - system "make", "basics", "idl", "bin/winexe" - bin.install "bin/winexe" - end - end - - test do - system "#{bin}/winexe", "--version" - end -end - -__END__ -diff -Naur winexe-1.00-orig/source4/winexe/winexe.h winexe-1.00/source4/winexe/winexe.h ---- winexe-1.00-orig/source4/winexe/winexe.h 2011-06-18 00:00:00.000000000 +0000 -+++ winexe-1.00/source4/winexe/winexe.h 2011-06-18 00:00:00.000000000 +0000 -@@ -63,7 +63,7 @@ - int async_write(struct async_context *c, const void *buf, int len); - int async_close(struct async_context *c); - --struct tevent_context *ev_ctx; -+extern struct tevent_context *ev_ctx; - - /* winexesvc32_exe.c */ - extern unsigned int winexesvc32_exe_len; diff --git a/Formula/wiredtiger.rb b/Formula/wiredtiger.rb deleted file mode 100644 index 292afce188e56..0000000000000 --- a/Formula/wiredtiger.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Wiredtiger < Formula - desc "High performance NoSQL extensible platform for data management" - homepage "http://www.wiredtiger.com" - url "https://github.com/wiredtiger/wiredtiger/releases/download/3.1.0/wiredtiger-3.1.0.tar.bz2" - sha256 "5da6119ccb1d9eec7ffedea753cf188d72219bbda42f491ed32a9db2afe78a04" - - bottle do - cellar :any - sha256 "1d595522272e3c03534ca4299f214b76d65d3712fdceadd341cb0386ab0b42a3" => :mojave - sha256 "4afe18e05ee55cf263b57026e8fecaba3084ef76dd92b5aa1620c6eca85948e2" => :high_sierra - sha256 "e040bb1adc571f9f8d0929898dcf326bb97572fbe4bc9c52810e70b9d7e75afa" => :sierra - sha256 "b141f6e07a7f6d0a1e1b7db637eb12fe908ded0a75b2415ed5f1b90a937959f6" => :el_capitan - end - - depends_on "snappy" - - def install - system "./configure", "--with-builtins=snappy,zlib", - "--with-python", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/wt", "create", "table:test" - system "#{bin}/wt", "drop", "table:test" - end -end diff --git a/Formula/wireguard-go.rb b/Formula/wireguard-go.rb deleted file mode 100644 index 4dc7569f59e48..0000000000000 --- a/Formula/wireguard-go.rb +++ /dev/null @@ -1,26 +0,0 @@ -class WireguardGo < Formula - desc "Userspace Go implementation of WireGuard" - homepage "https://www.wireguard.com/" - url "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-0.0.20181222.tar.xz" - sha256 "53dc611524c40cddd242c972a9559f9793e128a0ce772483f12a2704c9f48c54" - head "https://git.zx2c4.com/wireguard-go", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "25839f9caa700b230ecaf2d8ad47a81a2dd1b181e8a360859bdbc9446d9c4cc7" => :mojave - sha256 "edc96f16ab774090b850d5f54394046280d1f92c0c1f5c6b0d5dfab66c7ca22b" => :high_sierra - sha256 "4f5c2e94d6f2ffca021618908cd6100157550c361ab97b0e5d3701d9d2d32132" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - - system "make", "PREFIX=#{prefix}", "install" - end - - test do - assert_match "be utun", pipe_output("WG_PROCESS_FOREGROUND=1 #{bin}/wireguard-go notrealutun") - end -end diff --git a/Formula/wireguard-tools.rb b/Formula/wireguard-tools.rb deleted file mode 100644 index 781e0619ffdb1..0000000000000 --- a/Formula/wireguard-tools.rb +++ /dev/null @@ -1,29 +0,0 @@ -class WireguardTools < Formula - desc "Tools for the WireGuard secure network tunnel" - homepage "https://www.wireguard.com/" - # Please only update version when the tools have been modified/updated, - # since the Linux module aspect isn't of utility for us. - url "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-0.0.20181218.tar.xz" - sha256 "2e9f86acefa49dbfb7fa6f5e10d543f1885a2d5460cd5e102696901107675735" - head "https://git.zx2c4.com/WireGuard", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "5c9ea074d7580408a8845c17a226444415202dfba862ef4f06957f2f6f8084dc" => :mojave - sha256 "67a8e139153ccf564663df45a89022ef2a31094c004fdf0f86b3a80ed730d159" => :high_sierra - sha256 "09d0a57161d1ce11c1a5556a2c42b1e6bc68a79e70853d3471701569a8210182" => :sierra - end - - depends_on "bash" - depends_on "wireguard-go" - - def install - system "make", "BASHCOMPDIR=#{bash_completion}", "WITH_BASHCOMPLETION=yes", "WITH_WGQUICK=yes", - "WITH_SYSTEMDUNITS=no", "PREFIX=#{prefix}", "SYSCONFDIR=#{prefix}/etc", - "-C", "src/tools", "install" - end - - test do - system "#{bin}/wg", "help" - end -end diff --git a/Formula/wiremock-standalone.rb b/Formula/wiremock-standalone.rb deleted file mode 100644 index a6b8bee15a1db..0000000000000 --- a/Formula/wiremock-standalone.rb +++ /dev/null @@ -1,36 +0,0 @@ -class WiremockStandalone < Formula - desc "Simulator for HTTP-based APIs" - homepage "http://wiremock.org/docs/running-standalone/" - url "https://search.maven.org/remotecontent?filepath=com/github/tomakehurst/wiremock-standalone/2.18.0/wiremock-standalone-2.18.0.jar" - sha256 "b6ca6b6c9e0dbbf8ec6d6752f93f61beb99325c88fe067377e4250fd390c03c9" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - libexec.install "wiremock-standalone-#{version}.jar" - bin.write_jar_script libexec/"wiremock-standalone-#{version}.jar", "wiremock" - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - wiremock = fork do - exec "#{bin}/wiremock", "-port", port.to_s - end - - loop do - Utils.popen_read("curl", "-s", "http://localhost:#{port}/__admin/", "-X", "GET") - break if $CHILD_STATUS.exitstatus.zero? - end - - system "curl", "-s", "http://localhost:#{port}/__admin/shutdown", "-X", "POST" - - Process.wait(wiremock) - end -end diff --git a/Formula/wireshark.rb b/Formula/wireshark.rb deleted file mode 100644 index 4ec48ca20b78f..0000000000000 --- a/Formula/wireshark.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Wireshark < Formula - desc "Graphical network analyzer and capture tool" - homepage "https://www.wireshark.org" - url "https://www.wireshark.org/download/src/all-versions/wireshark-2.6.5.tar.xz" - mirror "https://1.eu.dl.wireshark.org/src/wireshark-2.6.5.tar.xz" - sha256 "93155b798544b2f07693920f4ac1b531c952965ee4eb1d98419961240177438a" - head "https://code.wireshark.org/review/wireshark", :using => :git - - bottle do - sha256 "14930696b3d8b186abb0d76fcc8ce2e77a81bce1974f977cb7fe72a2d57dcfb5" => :mojave - sha256 "f67946bde540a9373dc8cd5f5dc92cc294c7085f27815e6994470c248d39884d" => :high_sierra - sha256 "b8eb1a5cfa08703cd2389f3f74e3dadd6ede6c9f9fd80476c8b06f46d3a27ef0" => :sierra - end - - option "with-qt", "Build the wireshark command with Qt" - - deprecated_option "with-qt5" => "with-qt" - - depends_on "cmake" => :build - depends_on "c-ares" - depends_on "glib" - depends_on "gnutls" - depends_on "libgcrypt" - depends_on "libmaxminddb" - depends_on "libsmi" - depends_on "libssh" - depends_on "lua@5.1" - depends_on "nghttp2" - depends_on "qt" => :optional - - def install - args = std_cmake_args + %W[ - -DENABLE_CARES=ON - -DENABLE_GNUTLS=ON - -DENABLE_MAXMINDDB=ON - -DBUILD_wireshark_gtk=OFF - -DENABLE_PORTAUDIO=OFF - -DENABLE_LUA=ON - -DLUA_INCLUDE_DIR=#{Formula["lua@5.1"].opt_include}/lua-5.1 - -DLUA_LIBRARY=#{Formula["lua@5.1"].opt_lib}/liblua5.1.dylib - -DCARES_INCLUDE_DIR=#{Formula["c-ares"].opt_include} - -DGCRYPT_INCLUDE_DIR=#{Formula["libgcrypt"].opt_include} - -DGNUTLS_INCLUDE_DIR=#{Formula["gnutls"].opt_include} - -DMAXMINDDB_INCLUDE_DIR=#{Formula["libmaxminddb"].opt_include} - -DENABLE_SMI=ON - -DBUILD_sshdump=ON - -DBUILD_ciscodump=ON - -DENABLE_NGHTTP2=ON - ] - - if build.with? "qt" - args << "-DBUILD_wireshark=ON" - args << "-DENABLE_APPLICATION_BUNDLE=ON" - args << "-DENABLE_QT5=ON" - else - args << "-DBUILD_wireshark=OFF" - args << "-DENABLE_APPLICATION_BUNDLE=OFF" - args << "-DENABLE_QT5=OFF" - end - - system "cmake", *args - system "make", "install" - - if build.with? "qt" - prefix.install bin/"Wireshark.app" - bin.install_symlink prefix/"Wireshark.app/Contents/MacOS/Wireshark" => "wireshark" - end - - # Install headers - (include/"wireshark").install Dir["*.h"] - (include/"wireshark/epan").install Dir["epan/*.h"] - (include/"wireshark/epan/crypt").install Dir["epan/crypt/*.h"] - (include/"wireshark/epan/dfilter").install Dir["epan/dfilter/*.h"] - (include/"wireshark/epan/dissectors").install Dir["epan/dissectors/*.h"] - (include/"wireshark/epan/ftypes").install Dir["epan/ftypes/*.h"] - (include/"wireshark/epan/wmem").install Dir["epan/wmem/*.h"] - (include/"wireshark/wiretap").install Dir["wiretap/*.h"] - (include/"wireshark/wsutil").install Dir["wsutil/*.h"] - end - - def caveats; <<~EOS - This formula only installs the command-line utilities by default. - - Wireshark.app can be downloaded directly from the website: - https://www.wireshark.org/ - - Alternatively, install with Homebrew Cask: - brew cask install wireshark - - If your list of available capture interfaces is empty - (default macOS behavior), install ChmodBPF: - - brew cask install wireshark-chmodbpf - EOS - end - - test do - system bin/"randpkt", "-b", "100", "-c", "2", "capture.pcap" - output = shell_output("#{bin}/capinfos -Tmc capture.pcap") - assert_equal "File name,Number of packets\ncapture.pcap,2\n", output - end -end diff --git a/Formula/wirouter_keyrec.rb b/Formula/wirouter_keyrec.rb deleted file mode 100644 index da014ab588f52..0000000000000 --- a/Formula/wirouter_keyrec.rb +++ /dev/null @@ -1,35 +0,0 @@ -class WirouterKeyrec < Formula - desc "Recover the default WPA passphrases from supported routers" - homepage "https://www.salvatorefresta.net/tools/" - url "https://www.mirrorservice.org/sites/distfiles.macports.org/wirouterkeyrec/WiRouter_KeyRec_1.1.2.zip" - mirror "https://distfiles.macports.org/wirouterkeyrec/WiRouter_KeyRec_1.1.2.zip" - sha256 "3e59138f35502b32b47bd91fe18c0c232921c08d32525a2ae3c14daec09058d4" - - bottle do - sha256 "ca8371cae9a6a4ce5ce4541a811d17260d877695426b16777e4b89d0fb912332" => :mojave - sha256 "60a9b2a5fffe6027b296ad5b320377dd98a28658b628d6b3acbe94126e54ff3e" => :high_sierra - sha256 "2accae4664406559e45909d53eaf6a8a8569773c8e0d932e2d3a8090706f8f18" => :sierra - sha256 "3982522d8e15ced547c4f1d3019fe3ca6ddaa88d33fad03d2c97a53c849ec217" => :el_capitan - sha256 "65d21ba4cb167dd2cca395dd5b51edc1ddd0df06fc65843cd2d2eba9e307ea11" => :yosemite - sha256 "b5740e7929fc911881e007103921c712483971accb581bd5fdb86357f65b8312" => :mavericks - sha256 "fb6bc3066b31fde62280752b2795e13d8850011f5910ad28dbb1c9e15208af74" => :mountain_lion - end - - def install - inreplace "src/agpf.h", %r{/etc}, "#{prefix}/etc" - inreplace "src/teletu.h", %r{/etc}, "#{prefix}/etc" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{prefix}", - "--exec-prefix=#{prefix}" - system "make", "prefix=#{prefix}" - system "make", "install", "DESTDIR=#{prefix}", "BIN_DIR=bin/" - end - - test do - system "#{bin}/wirouterkeyrec", "-s", "Alice-12345678" - end -end diff --git a/Formula/with-readline.rb b/Formula/with-readline.rb deleted file mode 100644 index 56ab78c29a2c4..0000000000000 --- a/Formula/with-readline.rb +++ /dev/null @@ -1,29 +0,0 @@ -class WithReadline < Formula - desc "Allow GNU Readline to be used with arbitrary programs" - homepage "https://www.greenend.org.uk/rjk/sw/withreadline.html" - url "https://www.greenend.org.uk/rjk/sw/with-readline-0.1.1.tar.gz" - sha256 "d12c71eb57ef1dbe35e7bd7a1cc470a4cb309c63644116dbd9c88762eb31b55d" - revision 1 - - bottle do - cellar :any - sha256 "e506a5122a3e7ee13444f56886e966484fb68aa293d2ebeea46d4762f020fb37" => :mojave - sha256 "5db12ee438dc08ac90196940f9ff868c3169f3e77fbbd0b5ae1c6cde21dd96cf" => :high_sierra - sha256 "2f1e93e551ea44fbd5594fe734e8dd68d0cd741747a770bf2725be05bd00db04" => :sierra - sha256 "692f55b5ea8d97d2f19edea8c5ab6041b5efb3242aedb43feee0e5956e1e590b" => :el_capitan - sha256 "05cd5dac85256b656838e839a81cd5abdc22caa3d916e7316f7ce517d17f6059" => :yosemite - end - - depends_on "readline" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - pipe_output("#{bin}/with-readline /usr/bin/expect", "exit", 0) - end -end diff --git a/Formula/wla-dx.rb b/Formula/wla-dx.rb deleted file mode 100644 index c94f5a3d44a71..0000000000000 --- a/Formula/wla-dx.rb +++ /dev/null @@ -1,54 +0,0 @@ -class WlaDx < Formula - desc "Yet another crossassembler package" - homepage "https://github.com/vhelin/wla-dx" - url "https://github.com/vhelin/wla-dx/archive/v9.7.tar.gz" - sha256 "22d544ab9f596df7f4141c26bec9735de790213d22e18d11c9b4bd12253e1420" - - bottle do - cellar :any_skip_relocation - sha256 "8d0dfce3510dbeb60d876cfa9d470453c7e2a48e49d691683e5b03def051a788" => :mojave - sha256 "227175578a34d7e37a67c7a1d54f578880b9d433168f2863e8550ea0e8b4dfd5" => :high_sierra - sha256 "831b9f5f6b67d9f51ee41d6b9b582506c93a5a677631ca8c996401bffb58961a" => :sierra - sha256 "f9f5a3c5e03f4145b30f09b42d8d247aae1f13b86dceee53efeb9f2b16ec0b00" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test-gb-asm.s").write <<~EOS - .MEMORYMAP - DEFAULTSLOT 1.01 - SLOT 0.001 $0000 $2000 - SLOT 1.2 STArT $2000 sIzE $6000 - .ENDME - - .ROMBANKMAP - BANKSTOTAL 2 - BANKSIZE $2000 - BANKS 1 - BANKSIZE $6000 - BANKS 1 - .ENDRO - - .BANK 1 SLOT 1 - - .ORGA $2000 - - - ld hl, sp+127 - ld hl, sp-128 - add sp, -128 - add sp, 127 - adc 200 - jr -128 - jr 127 - jr nc, 127 - EOS - system bin/"wla-gb", "-o", testpath/"test-gb-asm.s" - end -end diff --git a/Formula/wmctrl.rb b/Formula/wmctrl.rb deleted file mode 100644 index cf2aec281adbf..0000000000000 --- a/Formula/wmctrl.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Wmctrl < Formula - desc "UNIX/Linux command-line tool to interact with an EWMH/NetWM" - homepage "https://sites.google.com/site/tstyblo/wmctrl" - url "https://sites.google.com/site/tstyblo/wmctrl/wmctrl-1.07.tar.gz" - sha256 "d78a1efdb62f18674298ad039c5cbdb1edb6e8e149bb3a8e3a01a4750aa3cca9" - - bottle do - cellar :any - sha256 "6e8a03f71ac01f44545a25687de39e859b7d540e4d150b77497f09c08a95d9b0" => :mojave - sha256 "b799fe4295b063ef09600bd8dbd8a8da4b7a5b047221d1c3ba67da672bff8f12" => :high_sierra - sha256 "968c76a341ff4ef21ebe8f850e4de4301adaefd8ff8402b3373c80255adecbc7" => :sierra - sha256 "bc752b0214893066214d649b108d69b08b50729f029581b332e93780525ee204" => :el_capitan - sha256 "0bc70cf2f7d8c90401364d8c1f9533423034941bfc375f60991c0940ae562e5b" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on :x11 - - # Fix for 64-bit arch. See: - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=362068 - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/wmctrl", "--version" - end -end - -__END__ ---- wmctrl-1.07.orig/main.c -+++ wmctrl-1.07/main.c -@@ -1425,6 +1425,16 @@ - * - * long_length = Specifies the length in 32-bit multiples of the - * data to be retrieved. -+ * -+ * NOTE: see -+ * https://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html -+ * In particular: -+ * -+ * When the X window system was ported to 64-bit architectures, a -+ * rather peculiar design decision was made. 32-bit quantities such -+ * as Window IDs, atoms, etc, were kept as longs in the client side -+ * APIs, even when long was changed to 64 bits. -+ * - */ - if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False, - xa_prop_type, &xa_ret_type, &ret_format, -@@ -1440,7 +1450,18 @@ static gchar *get_property (Display *disp, Window win, /*{{{*/ - } - - /* null terminate the result to make string handling easier */ -- tmp_size = (ret_format / 8) * ret_nitems; -+ switch (ret_format) { -+ case 8: -+ tmp_size = sizeof(char) * ret_nitems; -+ break; -+ case 16: -+ tmp_size = sizeof(short) * ret_nitems; -+ break; -+ case 32: -+ default: -+ tmp_size = sizeof(long) * ret_nitems; -+ break; -+ } - ret = g_malloc(tmp_size + 1); - memcpy(ret, ret_prop, tmp_size); - ret[tmp_size] = '\0'; diff --git a/Formula/woboq_codebrowser.rb b/Formula/woboq_codebrowser.rb deleted file mode 100644 index 1f37c706eb127..0000000000000 --- a/Formula/woboq_codebrowser.rb +++ /dev/null @@ -1,47 +0,0 @@ -class WoboqCodebrowser < Formula - desc "Generate HTML from C++ Code" - homepage "https://code.woboq.org/" - url "https://github.com/woboq/woboq_codebrowser/archive/2.1.tar.gz" - sha256 "f7c803260a9a79405c4c2c561443c49702811f38dcf1081238ef024a6654caa0" - revision 3 - - bottle do - cellar :any - sha256 "f8aa32aaefa2b3ed4c1d6867d0b4b1945429a09043c5a6649801a3cf62d99a10" => :mojave - sha256 "6aca9d134daeb173b56d1d3b0122c21b461c119add8feca1c52bef0ad91c267d" => :high_sierra - sha256 "6dccc1dbb8c14362b3df29dc93bdfa010ad5de7e734d99a34918f28dc9f8035c" => :sierra - end - - depends_on "cmake" => :build - depends_on "llvm@6" - - def install - args = std_cmake_args + %W[ - -DLLVM_CONFIG_EXECUTABLE=#{Formula["llvm@6"].opt_bin}/llvm-config - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - ] - system "cmake", ".", *args - system "make" - bin.install "indexgenerator/codebrowser_indexgenerator", - "generator/codebrowser_generator" - prefix.install "data" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - printf(\"hi!\"); - } - EOS - system "#{bin}/codebrowser_generator", "-o=#{testpath}", "-p", - "test:#{testpath}", - "#{testpath}/test.c", - "--", "clang", "#{testpath}/test.c" - - assert_predicate testpath/"test/test.c.html", :exist? - assert_predicate testpath/"refs/printf", :exist? - assert_predicate testpath/"fnSearch", :exist? - assert_predicate testpath/"fileIndex", :exist? - end -end diff --git a/Formula/woff2.rb b/Formula/woff2.rb deleted file mode 100644 index 0215f929d3bc4..0000000000000 --- a/Formula/woff2.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Woff2 < Formula - desc "Utilities to create and convert Web Open Font File (WOFF) files" - homepage "https://github.com/google/woff2" - url "https://github.com/google/woff2/archive/v1.0.2.tar.gz" - sha256 "add272bb09e6384a4833ffca4896350fdb16e0ca22df68c0384773c67a175594" - - bottle do - cellar :any - rebuild 1 - sha256 "d3ccc0d5d910483c5fa385cf213bb352bfe886f1b824f8c182d050ae96e77fdd" => :mojave - sha256 "f0a9cba72030b62b02336c277f2688ad96bf45c1720e58205cfa597be9860296" => :high_sierra - sha256 "965310f79a417663d33d4917880b4dd2a9654ca85f5a9a243465e3e0e86a394d" => :sierra - sha256 "59d4f6c77ae933445a0fde4b1445208a094169fa5dac784889dd6c8d4947c997" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "brotli" - - resource "roboto_1" do - url "https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf" - sha256 "466989fd178ca6ed13641893b7003e5d6ec36e42c2a816dee71f87b775ea097f" - end - - resource "roboto_2" do - url "https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2" - sha256 "90a0ad0b48861588a6e33a5905b17e1219ea87ab6f07ccc41e7c2cddf38967a8" - end - - def install - args = std_cmake_args + %W[ - -DCMAKE_INSTALL_NAME_DIR=#{opt_lib} - -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON - ] - - system "cmake", ".", *args - system "make", "install" - - # make install does not install binaries - bin.install "woff2_info", "woff2_decompress", "woff2_compress" - end - - test do - # Convert a TTF to WOFF2 - resource("roboto_1").stage testpath - system "#{bin}/woff2_compress", "KFOmCnqEu92Fr1Mu4mxP.ttf" - output = shell_output("#{bin}/woff2_info KFOmCnqEu92Fr1Mu4mxP.woff2") - assert_match "WOFF2Header", output - - # Convert a WOFF2 to TTF - resource("roboto_2").stage testpath - system "#{bin}/woff2_decompress", "KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2" - output = shell_output("file --brief KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.ttf") - assert_match(/TrueType font data/i, output) - end -end diff --git a/Formula/wolfssl.rb b/Formula/wolfssl.rb deleted file mode 100644 index 3da44924442d2..0000000000000 --- a/Formula/wolfssl.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Wolfssl < Formula - desc "Embedded SSL Library written in C" - homepage "https://www.wolfssl.com/wolfSSL/Home.html" - url "https://github.com/wolfSSL/wolfssl.git", - :tag => "v3.15.7-stable", - :revision => "a7350b7d2ed15648443253cb39ad9195df184139" - sha256 "4e15f494604e41725499f8b708798f8ddc2fcaa8f39b4369bcd000b3cab482d8" - head "https://github.com/wolfSSL/wolfssl.git" - - bottle do - cellar :any - sha256 "d34e3fc6fbe662b9b03e07cbdc57808f10fa24f1b93108a2d5afb1047d77965f" => :mojave - sha256 "d9efcf36b72442a4284baacf92fbb22a559a4b775e5e35da6843ce86ca6ea15f" => :high_sierra - sha256 "646439cffbf0099aaa255f1a643061559f426b3868f7bd11c53042771c4a152d" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - # https://github.com/Homebrew/homebrew-core/pull/1046 - # https://github.com/Homebrew/brew/pull/251 - ENV.delete("SDKROOT") - - args = %W[ - --disable-silent-rules - --disable-dependency-tracking - --infodir=#{info} - --mandir=#{man} - --prefix=#{prefix} - --sysconfdir=#{etc} - --disable-bump - --disable-examples - --disable-fortress - --disable-md5 - --disable-sniffer - --disable-webserver - --enable-aesccm - --enable-aesgcm - --enable-alpn - --enable-blake2 - --enable-camellia - --enable-certgen - --enable-certreq - --enable-chacha - --enable-crl - --enable-crl-monitor - --enable-curve25519 - --enable-dtls - --enable-dh - --enable-ecc - --enable-eccencrypt - --enable-ed25519 - --enable-filesystem - --enable-hc128 - --enable-hkdf - --enable-inline - --enable-ipv6 - --enable-jni - --enable-keygen - --enable-ocsp - --enable-opensslextra - --enable-poly1305 - --enable-psk - --enable-rabbit - --enable-ripemd - --enable-savesession - --enable-savecert - --enable-sessioncerts - --enable-sha512 - --enable-sni - --enable-supportedcurves - --enable-tls13 - --enable-sp - --enable-fastmath - --enable-fasthugemath - ] - - args << "--enable-aesni" if Hardware::CPU.aes? && !build.bottle? - - # Extra flag is stated as a needed for the Mac platform. - # https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-2-building-wolfssl.html - # Also, only applies if fastmath is enabled. - ENV.append_to_cflags "-mdynamic-no-pic" - - system "./autogen.sh" - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - end - - test do - system bin/"wolfssl-config", "--cflags", "--libs", "--prefix" - end -end diff --git a/Formula/woof.rb b/Formula/woof.rb deleted file mode 100644 index 15d00d796b8d8..0000000000000 --- a/Formula/woof.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Woof < Formula - desc "Ad-hoc single-file webserver" - homepage "http://www.home.unix-ag.org/simon/woof.html" - url "http://www.home.unix-ag.org/simon/woof-2012-05-31.py" - version "20120531" - sha256 "d84353d07f768321a1921a67193510bf292cf0213295e8c7689176f32e945572" - - bottle :unneeded - - def install - bin.install "woof-2012-05-31.py" => "woof" - end - - test do - require "socket" - - server = TCPServer.new(0) - port = server.addr[1] - server.close - - pid = fork do - exec "#{bin}/woof", "-s", "-p", port.to_s - end - - sleep 2 - - begin - read = (bin/"woof").read - assert_equal read, shell_output("curl localhost:#{port}/woof") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/wordnet.rb b/Formula/wordnet.rb deleted file mode 100644 index 09d79c6f7e555..0000000000000 --- a/Formula/wordnet.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Wordnet < Formula - desc "Lexical database for the English language" - homepage "https://wordnet.princeton.edu/" - url "http://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.bz2" - # Version 3.1 is version 3.0 with the 3.1 dictionary. - version "3.1" - sha256 "6c492d0c7b4a40e7674d088191d3aa11f373bb1da60762e098b8ee2dda96ef22" - - bottle do - sha256 "142195600ccc68f0140352b71e9976e61758b9212d84c69dedd759cdd7a450ac" => :mojave - sha256 "307362dabf35eb3deb0c75154245df65a166655973a822d901a20fcad3a01f5a" => :high_sierra - sha256 "873bcb33510b3211fc34bb986f9527ab554f01177fb765c7db48509291a6f7cb" => :sierra - sha256 "412b4cc4b65d5083176aa69647ab5a15b96b63b758fa8900c80b402c5a9d2cb6" => :el_capitan - sha256 "876de343c8e2d508af818a7aacdcc8015f7e662edf8f08e068ca7800f48d50d4" => :yosemite - sha256 "786bc9b811d958b71888cc87e0ef75a6cd66ebc05202278b7827f847f6b4dfe5" => :mavericks - end - - depends_on :x11 - - resource "dict" do - url "http://wordnetcode.princeton.edu/wn3.1.dict.tar.gz" - sha256 "3f7d8be8ef6ecc7167d39b10d66954ec734280b5bdcd57f7d9eafe429d11c22a" - end - - def install - (prefix/"dict").install resource("dict") - - # Disable calling deprecated fields within the Tcl_Interp during compilation. - # https://bugzilla.redhat.com/show_bug.cgi?id=902561 - ENV.append_to_cflags "-DUSE_INTERP_RESULT" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-tcl=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework", - "--with-tk=#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework" - ENV.deparallelize - system "make", "install" - end - - test do - output = pipe_output("#{bin}/wn homebrew -synsn") - assert_match /alcoholic beverage/, output - end -end diff --git a/Formula/wordplay.rb b/Formula/wordplay.rb deleted file mode 100644 index e5286bc488b85..0000000000000 --- a/Formula/wordplay.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Wordplay < Formula - desc "Anagram generator" - homepage "http://hsvmovies.com/static_subpages/personal_orig/wordplay/index.html" - url "http://hsvmovies.com/static_subpages/personal_orig/wordplay/wordplay722.tar.Z" - version "7.22" - sha256 "9436a8c801144ab32e38b1e168130ef43e7494f4b4939fcd510c7c5bf7f4eb6d" - - bottle do - rebuild 1 - sha256 "d98d89abff244c21cf2ad4eb651ed39afea5b3146bf0ec3277483b813c4e8d89" => :mojave - sha256 "9056fb79657b3be7ba8a97f4a13b1777e72447b717bd9fd1b7830023bda964a6" => :high_sierra - sha256 "5141a8f5456e5a685b65c5d9f3100029c6f42b3f0c80aa3d6a4736d3028a6a6b" => :sierra - end - - # Fixes compiler warnings on Darwin, via MacPorts. - # Point to words file in share. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/5de9072/wordplay/patch-wordplay.c" - sha256 "45d356c4908e0c69b9a7ac666c85f3de46a8a83aee028c8567eeea74d364ff89" - end - - def install - inreplace "wordplay.c", "@PREFIX@", prefix - system "make", "CC=#{ENV.cc}" - bin.install "wordplay" - pkgshare.install "words721.txt" - end - - test do - assert_equal "BREW", shell_output("#{bin}/wordplay -s ERWB").strip - end -end diff --git a/Formula/wp-cli-completion.rb b/Formula/wp-cli-completion.rb deleted file mode 100644 index 7c7884762a027..0000000000000 --- a/Formula/wp-cli-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class WpCliCompletion < Formula - desc "Bash completion for Wpcli" - homepage "https://github.com/wp-cli/wp-cli" - url "https://github.com/wp-cli/wp-cli/archive/v2.1.0.tar.gz" - sha256 "0e0a94244a233e4cb75fcbbc60abb9b18b475c23d1f27c5b9d76b17fb534c358" - head "https://github.com/wp-cli/wp-cli.git" - - bottle :unneeded - - def install - bash_completion.install "utils/wp-completion.bash" => "wp" - end - - test do - assert_match "-F _wp_complete", - shell_output("source #{bash_completion}/wp && complete -p wp") - end -end diff --git a/Formula/wp-cli.rb b/Formula/wp-cli.rb deleted file mode 100644 index 2b4c20ed2f24f..0000000000000 --- a/Formula/wp-cli.rb +++ /dev/null @@ -1,17 +0,0 @@ -class WpCli < Formula - desc "Command-line interface for WordPress" - homepage "https://wp-cli.org/" - url "https://github.com/wp-cli/wp-cli/releases/download/v2.1.0/wp-cli-2.1.0.phar" - sha256 "44f54cca06f9d87cdb2a55129bf3dbe468b224a7d9ac87e1620b075b2711bb28" - - bottle :unneeded - - def install - bin.install "wp-cli-#{version}.phar" => "wp" - end - - test do - output = shell_output("#{bin}/wp core download --path=wptest") - assert_match "Success: WordPress downloaded.", output - end -end diff --git a/Formula/wpscan.rb b/Formula/wpscan.rb deleted file mode 100644 index 1543d8684be83..0000000000000 --- a/Formula/wpscan.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Wpscan < Formula - desc "Black box WordPress vulnerability scanner" - homepage "https://wpscan.org" - url "https://github.com/wpscanteam/wpscan/archive/2.9.4.tar.gz" - sha256 "ad066b48565e82208d5e0451891366f6a9b9a3648d149d14c83d00f4712094d3" - revision 1 - head "https://github.com/wpscanteam/wpscan.git" - - bottle do - cellar :any - sha256 "e26e73927d6b65a6ea754407b398afc408737585281840304f6fdca40e32af66" => :mojave - sha256 "3b73076297580ca90725175015d8ac4ce26caa557f0f2cbbe0392b67ec090905" => :high_sierra - sha256 "7289430447efb7be22a729ef3d2147702c770984e4b96b61607a06aea8e40ef3" => :sierra - end - - depends_on "ruby" - - def install - inreplace "lib/common/common_helper.rb" do |s| - s.gsub! "File.join(USER_DIR, '.wpscan/cache')", "'#{var}/cache/wpscan'" - s.gsub! "File.join(USER_DIR, '.wpscan/data')", "'#{var}/wpscan/data'" - s.gsub! "File.join(USER_DIR, '.wpscan/log.txt')", "'#{var}/log/wpscan/log.txt'" - end - - system "unzip", "-o", "data.zip" - libexec.install "data", "lib", "spec", "Gemfile", "Gemfile.lock", "wpscan.rb" - - ENV["GEM_HOME"] = libexec - ENV["BUNDLE_PATH"] = libexec - ENV["BUNDLE_GEMFILE"] = libexec/"Gemfile" - system "gem", "install", "bundler" - bundle = Dir["#{libexec}/**/bundle"].last - system bundle, "install", "--without", "test" - - (bin/"wpscan").write <<~EOS - #!/bin/bash - GEM_HOME="#{libexec}" BUNDLE_GEMFILE="#{libexec}/Gemfile" \\ - exec "#{bundle}" exec "#{Formula["ruby"].opt_bin}/ruby" \\ - "#{libexec}/wpscan.rb" "$@" - EOS - end - - def post_install - (var/"log/wpscan").mkpath - # Update database - system bin/"wpscan", "--update" - end - - def caveats; <<~EOS - Logs are saved to #{var}/cache/wpscan/log.txt by default. - EOS - end - - test do - assert_match "URL: https://wordpress.org/", - pipe_output("#{bin}/wpscan --url https://wordpress.org/") - end -end diff --git a/Formula/wput.rb b/Formula/wput.rb deleted file mode 100644 index 5efc1db10092f..0000000000000 --- a/Formula/wput.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Wput < Formula - desc "Tiny, wget-like FTP client for uploading files" - homepage "https://wput.sourceforge.io/" - url "https://downloads.sourceforge.net/project/wput/wput/0.6.2/wput-0.6.2.tgz" - sha256 "229d8bb7d045ca1f54d68de23f1bc8016690dc0027a16586712594fbc7fad8c7" - - bottle do - cellar :any_skip_relocation - sha256 "563c5204880172786cbbfc75dafa818e670ac5d1a67fdbe8bea1dd2588587eab" => :mojave - sha256 "e01d35805cd00e8f4d9ba1ab989104d66dc4150648a2288f5f49eea5c17b5025" => :high_sierra - sha256 "0a8c4296a3e14d8b420f65464293b000dd1bd2e33a802c92e1812f0c267d3f0f" => :sierra - sha256 "8e4eeb941d98dc0313b87682b7ae659bbceac59426cf0483c2ae2676cf5b924b" => :el_capitan - sha256 "97bc045a03ddd01106304530a453a47693fbd5f3419090310c91a187e1d23931" => :yosemite - sha256 "3e9c649d134fff0d79d23a2eb575e440354e938b0f261c5fed53efe9d6f3f8c9" => :mavericks - end - - # The patch is to skip inclusion of malloc.h only on OSX. Upstream: - # https://sourceforge.net/p/wput/patches/22/ - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - system "#{bin}/wput", "--version" - end -end - -__END__ -diff --git a/src/memdbg.c b/src/memdbg.c -index 560bd7c..9e69eef 100644 ---- a/src/memdbg.c -+++ b/src/memdbg.c -@@ -1,5 +1,7 @@ - #include -+#ifndef __APPLE__ - #include -+#endif - #include - #ifndef WIN32 - #include -diff --git a/src/socketlib.c b/src/socketlib.c -index ab77d2b..c728ed9 100644 ---- a/src/socketlib.c -+++ b/src/socketlib.c -@@ -20,7 +20,9 @@ - * It is meant to provide some library functions. The only required external depency - * the printip function that is provided in utils.c */ - -+#ifndef __APPLE__ - #include -+#endif - #include - #include - #include diff --git a/Formula/wrangler.rb b/Formula/wrangler.rb deleted file mode 100644 index 00efede7d505f..0000000000000 --- a/Formula/wrangler.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Wrangler < Formula - desc "Refactoring tool for Erlang with emacs and Eclipse integration" - homepage "https://www.cs.kent.ac.uk/projects/wrangler/Wrangler/" - revision 1 - head "https://github.com/RefactoringTools/wrangler.git" - - stable do - url "https://github.com/RefactoringTools/wrangler/archive/wrangler1.2.tar.gz" - sha256 "a6a87ad0513b95bf208c660d112b77ae1951266b7b4b60d8a2a6da7159310b87" - - # upstream commit "Fix -spec's to compile in Erlang/OTP 19" - patch do - url "https://github.com/RefactoringTools/wrangler/commit/d81b888f.patch?full_index=1" - sha256 "b7911206315c32ee08fc89776015cf5b26c97b6cb4f6eff0b73dcf2d583cfe31" - end - end - - bottle do - sha256 "529f9eaef03fd452c23ffe017a40b4d7a3b6b0916c8bf703a2dcde5928e0b172" => :mojave - sha256 "a28a2a7468aa9a3f058efaa22dd0f62e54288b19c4b6bae894e036354eb14eba" => :high_sierra - sha256 "82c65deab497486889357ba5c68cd184bea168bc91a12de58f5aac9b17ea2b68" => :sierra - sha256 "fa0957e38733763091ee1e4bee98d7b2fab221fff49416d6eb7950374ce5df3d" => :el_capitan - end - - depends_on "erlang@20" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - suffixtree = Dir.glob("#{lib}/erlang/*/*/*/suffixtree").shift - assert_predicate Pathname.new(suffixtree), :executable?, "suffixtree must be executable" - end -end diff --git a/Formula/write-good.rb b/Formula/write-good.rb deleted file mode 100644 index 694593edf9de8..0000000000000 --- a/Formula/write-good.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/node" - -class WriteGood < Formula - desc "Naive linter for English prose" - homepage "https://github.com/btford/write-good" - url "https://github.com/btford/write-good/archive/v0.10.0.tar.gz" - sha256 "1800b456b8838b98045192aed1fe51255282007786a211141de4db7f70d5e13c" - - bottle do - cellar :any_skip_relocation - sha256 "c9793f3718f3fb1e3ff668427e62356825b60c263dd4a8db60b3e437bcb8cdde" => :mojave - sha256 "9f8ad372e5eeb289fdb436c64c17cf69b360f18a0442c1eec3a6c01672f413ee" => :high_sierra - sha256 "24e7a9e9bd36b2b42760876bfacd3eb1a963291cf8ec19a4f4569358bba3c578" => :sierra - sha256 "5e184f772e79b219537e6bb327c73b2e64506754a1fa7b64f19cca1695dcdd41" => :el_capitan - sha256 "37d206e7ac96493aa2cfb2424dc62f75765ae509f66fac44b6472e74ee02f4e7" => :yosemite - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.txt").write "So the cat was stolen." - assert_match "passive voice", shell_output("#{bin}/write-good test.txt", 2) - end -end diff --git a/Formula/writerperfect.rb b/Formula/writerperfect.rb deleted file mode 100644 index 2b1e47f7df7ad..0000000000000 --- a/Formula/writerperfect.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Writerperfect < Formula - desc "Library for importing WordPerfect documents" - homepage "https://sourceforge.net/p/libwpd/wiki/writerperfect/" - url "https://downloads.sourceforge.net/project/libwpd/writerperfect/writerperfect-0.9.6/writerperfect-0.9.6.tar.xz" - sha256 "1fe162145013a9786b201cb69724b2d55ff2bf2354c3cd188fd4466e7fc324e6" - - bottle do - cellar :any - rebuild 1 - sha256 "5e8658459f44238800ff490331d50aa6a71b48115157893c78901a4441a34dd3" => :mojave - sha256 "12f30a1f15f5887da7675026656f59dd74b7fbffdf4129a2c1778578dbf4cc4a" => :high_sierra - sha256 "36981e968c146d8aeca47d96327b3f3e909a3f58ca15bed17202e93fef6e17db" => :sierra - sha256 "549f41525d1a5cf4cad493650ea0f8daae0208246f36984d6a56a4af533fc881" => :el_capitan - end - - depends_on "boost" => :build - depends_on "pkg-config" => :build - depends_on "libodfgen" - depends_on "libwpd" - depends_on "libwpg" - depends_on "libwps" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/wrk-trello.rb b/Formula/wrk-trello.rb deleted file mode 100644 index 7e0153ce1e0d4..0000000000000 --- a/Formula/wrk-trello.rb +++ /dev/null @@ -1,30 +0,0 @@ -class WrkTrello < Formula - desc "Command-line interface to Trello" - homepage "https://github.com/blangel/wrk" - url "https://github.s3.amazonaws.com/downloads/blangel/wrk/wrk-1.0.1.tar.gz" - sha256 "85aea066c49fd52ad3e30f3399ba1a5e60ec18c10909c5061f68b09d80f5befe" - - bottle :unneeded - - conflicts_with "wrk", :because => "both install `wrk` binaries" - - def script; <<~EOS - #!/bin/sh - export WRK_HOME="#{libexec}" - exec "#{libexec}/bin/wrk" "$@" - EOS - end - - def install - libexec.install Dir["*"] - (bin/"wrk").write script - end - - def caveats; <<~EOS - To get your token go here: - https://trello.com/1/authorize?key=8d56bbd601877abfd13150a999a840d0&name=Wrk&expiration=never&response_type=token&scope=read,write - and save it to ~/.wrk/token - Start `wrk` for more information. - EOS - end -end diff --git a/Formula/wrk.rb b/Formula/wrk.rb deleted file mode 100644 index 6c491c07d2f93..0000000000000 --- a/Formula/wrk.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Wrk < Formula - desc "HTTP benchmarking tool" - homepage "https://github.com/wg/wrk" - url "https://github.com/wg/wrk/archive/4.1.0.tar.gz" - sha256 "6fa1020494de8c337913fd139d7aa1acb9a020de6f7eb9190753aa4b1e74271e" - head "https://github.com/wg/wrk.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "bf22b23f21ae787e2a114f0138519710f5f1e3069ba7480c5c1c0217cac62873" => :mojave - sha256 "1366e8330c9013002d43984b4a80dfc16e73fa23b91b72eb0c8ee2df512628e1" => :high_sierra - sha256 "8aece2b0e05cfce8f9e1bc408bc043c8340e999cb175c2396ec94d9a8ead2221" => :sierra - end - - depends_on "openssl" - - conflicts_with "wrk-trello", :because => "both install `wrk` binaries" - - def install - ENV.deparallelize - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - system "make" - bin.install "wrk" - end - - test do - system "#{bin}/wrk", "-c", "1", "-t", "1", "-d", "1", "https://example.com/" - end -end diff --git a/Formula/wsk.rb b/Formula/wsk.rb deleted file mode 100644 index aeb2447864e5f..0000000000000 --- a/Formula/wsk.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Wsk < Formula - desc "OpenWhisk Command-Line Interface (CLI)" - homepage "https://openwhisk.apache.org/" - url "https://github.com/apache/incubator-openwhisk-cli/archive/0.9.0-incubating.tar.gz" - version "0.9.0-incubating" - sha256 "76ec64d1a505c88f7d13df898b07cdea7b13b9799747d432e0bde55f7dc2c8b9" - - bottle do - cellar :any_skip_relocation - sha256 "01efb1cc64b33be3d77aa477638179d75b159be1d956f95a84d04b7586175214" => :mojave - sha256 "3a0e83ba6602152b582acc334c71a7aaf375dcc46730bc66aad3212fd840a348" => :high_sierra - sha256 "f80044426ee56b6e70bb9eb8f63c95772e3d60f9aa579572e17bbf168ea91eca" => :sierra - sha256 "12b2a1282a36a66f9abc148dcc6dd93cce4e34e381088d0f3b519132776a43e8" => :el_capitan - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - depends_on "govendor" => :build - - # Add govendor support. Remove both of these on next release. - patch do - url "https://github.com/apache/incubator-openwhisk-cli/pull/362.patch?full_index=1" - sha256 "5f8dba945cc6684846f77a2c628ca295755b97231e5ae4a7d3d870e8a2933ad6" - end - - patch do - url "https://github.com/apache/incubator-openwhisk-cli/pull/363.patch?full_index=1" - sha256 "eef2bc85a8a8581baba590284c47eee6c033e53e0e93d1a65608f9faad9ba0d2" - end - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/apache/incubator-openwhisk-cli" - dir.install buildpath.children - cd dir do - system "go-bindata", "-pkg", "wski18n", "-o", - "wski18n/i18n_resources.go", "wski18n/resources" - system "govendor", "sync" - - system "go", "build", "-o", bin/"wsk" - prefix.install_metafiles - end - end - - test do - system "#{bin}/wsk", "property", "set", "--apihost", "https://127.0.0.1" - end -end diff --git a/Formula/wskdeploy.rb b/Formula/wskdeploy.rb deleted file mode 100644 index 6d52e47de2ebb..0000000000000 --- a/Formula/wskdeploy.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Wskdeploy < Formula - desc "Apache OpenWhisk project deployment utility" - homepage "https://openwhisk.apache.org/" - url "https://github.com/apache/incubator-openwhisk-wskdeploy/archive/0.9.9.tar.gz" - sha256 "fa0164b9262b90c57cee868de000459ae8461042c0984d40ce22bf0c0ce4a49f" - - bottle do - cellar :any_skip_relocation - sha256 "c8d5674fda8507a62dd30b0b26c382bccdc48945c405758c8b805d5350e565aa" => :mojave - sha256 "3569a4127a3503f8507d5b437d0d35c4c5a259055f84984553d83a6ad9be42e0" => :high_sierra - sha256 "0cd26ef2912f60d108795fb7588a81edf6a1c937e90a2f8ba4987926376c0cab" => :sierra - end - - depends_on "go" => :build - depends_on "godep" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/apache/incubator-openwhisk-wskdeploy").install buildpath.children - cd "src/github.com/apache/incubator-openwhisk-wskdeploy" do - system "godep", "restore" - system "go", "build", "-o", bin/"wskdeploy", - "-ldflags", "-X main.Version=#{version}" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/wskdeploy version") - - (testpath/"manifest.yaml").write <<~EOS - packages: - hello_world_package: - version: 1.0 - license: Apache-2.0 - EOS - - system bin/"wskdeploy", "-v", - "--apihost", "openwhisk.ng.bluemix.net", - "--preview", - "-m", testpath/"manifest.yaml", - "-u", "abcd" - end -end diff --git a/Formula/wslay.rb b/Formula/wslay.rb deleted file mode 100644 index a1bdbf37d86fa..0000000000000 --- a/Formula/wslay.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Wslay < Formula - desc "C websocket library" - homepage "https://wslay.sourceforge.io/" - url "https://github.com/tatsuhiro-t/wslay/releases/download/release-1.1.0/wslay-1.1.0.tar.xz" - sha256 "0d82d247b847cc08e798ee2f28ee22b331d54e5900b3e1bef184945770185e17" - - bottle do - cellar :any - sha256 "abebf8b1210e19530f0446ce3b2e873bc2f960d259ad5a4b9a930c1f4221969e" => :mojave - sha256 "f2537bdaf7a5fd083e21f034fc6fb18ffe36f7dc16b589b8ef1a29cfbfd58286" => :high_sierra - sha256 "004c25402d835de2c7c067ee04f64c7cc84207f47483f2b1fcbbcd8c2e3f3a59" => :sierra - sha256 "518238850151cd6a73a2ac1896b671105bf6160ce043ba2afbe62b71816267b2" => :el_capitan - end - - head do - url "https://github.com/tatsuhiro-t/wslay.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "cunit" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules" - system "make", "check" - system "make", "install" - end -end diff --git a/Formula/wtf.rb b/Formula/wtf.rb deleted file mode 100644 index a5cf18599c07c..0000000000000 --- a/Formula/wtf.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Wtf < Formula - desc "Translate common Internet acronyms" - homepage "https://sourceforge.net/projects/bsdwtf/" - url "https://downloads.sourceforge.net/project/bsdwtf/wtf-20181230.tar.gz" - sha256 "010dcf266dd00800dc7e22bb463a74ae6b84d869038e806c0a13045d78c64f22" - - bottle :unneeded - - def install - inreplace %w[wtf wtf.6], "/usr/share", share - bin.install "wtf" - man6.install "wtf.6" - (share+"misc").install %w[acronyms acronyms.comp] - (share+"misc").install "acronyms-o.real" => "acronyms-o" - end - - test do - system bin/"wtf", "needle" - end -end diff --git a/Formula/wu.rb b/Formula/wu.rb deleted file mode 100644 index ce9f9ea5c98a1..0000000000000 --- a/Formula/wu.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Wu < Formula - desc "CLI that retrieves weather data from Weather Underground" - homepage "https://github.com/sramsay/wu" - url "https://github.com/sramsay/wu/archive/3.10.0.tar.gz" - sha256 "0934771cdd04cb4c38b45190dbfa97fa8b3aafaf53ea75152f070c97de850223" - - bottle do - cellar :any_skip_relocation - sha256 "e1363be0c7a7e85ba3dbea34dad7d495df8939783fd4b8afd4f076981781e7de" => :mojave - sha256 "994a58ca1396928ba5a30189ca784417c510d1563ce64d3866e99f5fdc46c7cf" => :high_sierra - sha256 "5efc0cdf39ff0d7ce0cb70be665118459cea9f8523f9a01bf67a341e1330fb56" => :sierra - sha256 "bd297452f33d081c7720190bc9ef17f1c8b247de5a27c64e78fede64bd871050" => :el_capitan - sha256 "61b96421517b20e4d6090e37ffe3b52a93ee0934ecc06e8282fd06d0bb457883" => :yosemite - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/sramsay" - ln_sf buildpath, buildpath/"src/github.com/sramsay/wu" - - cd "src/github.com/sramsay/wu" do - system "go", "build", "-o", bin/"wu", "-ldflags", "-X main.Version=#{version}" - end - end - - test do - assert_match "You must create a .condrc file in $HOME.", shell_output("#{bin}/wu -all") - end -end diff --git a/Formula/wumpus.rb b/Formula/wumpus.rb deleted file mode 100644 index 384ae03c78b52..0000000000000 --- a/Formula/wumpus.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Wumpus < Formula - desc "Exact clone of the ancient BASIC Hunt the Wumpus game" - homepage "http://www.catb.org/~esr/wumpus/" - url "http://www.catb.org/~esr/wumpus/wumpus-1.6.tar.gz" - sha256 "965e49b3e53f44023994b42b3aa568ad79d3a2287bb0a07460b601500c9ae16d" - - bottle do - cellar :any_skip_relocation - sha256 "e8e59a1fc042fdcaf087f8330b3c7083707892d8bed1f9317f5ab20777461576" => :mojave - sha256 "5a1435e4545eea1ab436a0fba4844ac2236ea6e49e045f3b59d19adcff5de97c" => :high_sierra - sha256 "fa693e01a17d31e9e5a5b51f27ea18b69e30f5613615c95ddb89c7dbc4bbe75d" => :sierra - sha256 "3b6751d8a871e44c033e4a6d83009bb8b499952385d8c1743be3d26bfe37b312" => :el_capitan - sha256 "d292048f1869507766d60e6931bffbf402f99d8fe36711ed6d9dbb060407a4a6" => :yosemite - end - - # Patches to allow `make install` to specify a prefix; both patches - # can be removed in the next release - patch do - url "https://gitlab.com/esr/wumpus/commit/ea272d4786a55dbaa493d016324b7a05b4f165b9.diff" - sha256 "7b95a5e12447b69d0958cf00bb6413a42612ffea47cdf483c6225a1980f97fb0" - end - patch do - url "https://gitlab.com/esr/wumpus/commit/99022db86e54c3338d6a670f219a0845fd531530.diff" - sha256 "143cba3992b27addb8e25e245624902b935b29cc5465cbe947dd5ae573dafdca" - end - - def install - system "make" - system "make", "prefix=#{prefix}", "install" - end - - test do - assert_match("HUNT THE WUMPUS", - pipe_output(bin/"wumpus", "^C")) - end -end diff --git a/Formula/wv.rb b/Formula/wv.rb deleted file mode 100644 index 9e4f8c6c64ccc..0000000000000 --- a/Formula/wv.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Wv < Formula - desc "Programs for accessing Microsoft Word documents" - homepage "https://wvware.sourceforge.io/" - url "https://abisource.com/downloads/wv/1.2.9/wv-1.2.9.tar.gz" - sha256 "4c730d3b325c0785450dd3a043eeb53e1518598c4f41f155558385dd2635c19d" - - bottle do - sha256 "ccef7d779d4138475c9eea9d0e1e6174787c79f6ab244327b86a40c76c1a7acc" => :mojave - sha256 "66081b31ef3906844afa215ad038f80b353bd49bb36f075c0fd5ce4951cd68cd" => :high_sierra - sha256 "b9ae25d64690436f441057dfa9aa3789deed460c743b3444642eefff761c76f5" => :sierra - sha256 "9b9e70a5e3bb7e6d29c5af4eed803a7fcbe31df03deafaf35cba1cfc949f35fa" => :el_capitan - sha256 "9924b96a1c67c774976b40de2083717a833d4dcaf801fba100f98677af01051c" => :yosemite - sha256 "5076c41e62ea86c638b482904ca0e30cffb2cbd3eb3acfe7b105cb4b28766838" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libgsf" - depends_on "libpng" - depends_on "libwmf" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - ENV.deparallelize - # the makefile generated does not create the file structure when installing - # till it is fixed upstream, create the target directories here. - # https://www.abisource.com/mailinglists/abiword-dev/2011/Jun/0108.html - - bin.mkpath - (lib/"pkgconfig").mkpath - (include/"wv").mkpath - man1.mkpath - (pkgshare/"wingdingfont").mkpath - (pkgshare/"patterns").mkpath - - system "make", "install" - end -end diff --git a/Formula/wv2.rb b/Formula/wv2.rb deleted file mode 100644 index f86bfc6f8f25c..0000000000000 --- a/Formula/wv2.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Wv2 < Formula - desc "Programs for accessing Microsoft Word documents" - homepage "https://wvware.sourceforge.io/" - url "https://downloads.sourceforge.net/project/wvware/wv2-0.4.2.tar.bz2" - sha256 "9f2b6d3910cb0e29c9ff432f935a594ceec0101bca46ba2fc251aff251ee38dc" - - bottle do - cellar :any - sha256 "7bda8de476777410ab350ceca0e089e20169f17a3d9cb31d313653c906766a85" => :mojave - sha256 "35120de253c5dcfd6da711f7529bd8e4a0ffd45eed540057ef57d1a9d2ab0091" => :high_sierra - sha256 "cd0856f53f0a143f5b0ea7dd61a0d23613db6de84538fa222e2819217a3ed3af" => :sierra - sha256 "b3a07e873f69b90ed83d47ccedb6bc5fefcb5dc5c9ffd1ecfd38c03dd094afea" => :el_capitan - sha256 "51ea82d6630ceee1739d0f252462ef8c4394ffaf0fb81b0a5141990f865f1427" => :yosemite - sha256 "e91c85bf622d483194ab85c78c7b8131de245f54f64ee61a961c0b24d31545cc" => :mavericks - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libgsf" - - def install - ENV.append "LDFLAGS", "-liconv -lgobject-2.0" # work around broken detection - system "cmake", ".", *std_cmake_args - system "make", "install" - end -end diff --git a/Formula/wwwoffle.rb b/Formula/wwwoffle.rb deleted file mode 100644 index f3058863a39ed..0000000000000 --- a/Formula/wwwoffle.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Wwwoffle < Formula - desc "Better browsing for computers with intermittent connections" - homepage "https://www.gedanken.org.uk/software/wwwoffle/" - url "https://www.gedanken.org.uk/software/wwwoffle/download/wwwoffle-2.9j.tgz" - sha256 "b16dd2549dd47834805343025638c06a0d67f8ea7022101c0ce2b6847ba011c6" - - bottle do - cellar :any_skip_relocation - sha256 "503407c9e3e1cdfe8382b25e8709d5f92675ac04f7d9b42bb4ab08b02a6f5818" => :mojave - sha256 "090085b4a39e90929744310494ef3157dfc77f7c2910047dfbdc75c75fe7c8f7" => :high_sierra - sha256 "9310fffe992916bf09700c8d6fd018943a14c73c27f28e3c61548f56b7f301d2" => :sierra - sha256 "0877d44d105e2ec35e38e2d2e760f6c2973f53f98d784ccf16bed6d47e37db38" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/wwwoffle", "--version" - end -end diff --git a/Formula/wxmac.rb b/Formula/wxmac.rb deleted file mode 100644 index 106241a90db77..0000000000000 --- a/Formula/wxmac.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Wxmac < Formula - desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)" - homepage "https://www.wxwidgets.org" - url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.4/wxWidgets-3.0.4.tar.bz2" - sha256 "96157f988d261b7368e5340afa1a0cad943768f35929c22841f62c25b17bf7f0" - revision 1 - head "https://github.com/wxWidgets/wxWidgets.git" - - bottle do - cellar :any - sha256 "1ddeb111fc0519d87dbdb4cf3887c0976ea4e077bb6e6c26493b7d1ec930b048" => :mojave - sha256 "32357b2ab1590b209e89c02fd36c54b5378fe79d32e82abc4047ab4fbae2663c" => :high_sierra - sha256 "666f423fdee434b4e4f91d6035678f658cf149df8077dae01151c0ebe781445a" => :sierra - sha256 "6acfa572e370c0f9c2f48f89ab8807a42d81726151e8ebddccca48aa634514de" => :el_capitan - end - - option "with-stl", "use standard C++ classes for everything" - option "with-static", "build static libraries" - - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - def install - args = [ - "--prefix=#{prefix}", - "--enable-clipboard", - "--enable-controls", - "--enable-dataviewctrl", - "--enable-display", - "--enable-dnd", - "--enable-graphics_ctx", - "--enable-std_string", - "--enable-svg", - "--enable-unicode", - "--enable-webkit", - "--with-expat", - "--with-libjpeg", - "--with-libpng", - "--with-libtiff", - "--with-opengl", - "--with-osx_cocoa", - "--with-zlib", - "--disable-precomp-headers", - # This is the default option, but be explicit - "--disable-monolithic", - # Set with-macosx-version-min to avoid configure defaulting to 10.5 - "--with-macosx-version-min=#{MacOS.version}", - ] - - args << "--enable-stl" if build.with? "stl" - args << (build.with?("static") ? "--disable-shared" : "--enable-shared") - - system "./configure", *args - system "make", "install" - - # wx-config should reference the public prefix, not wxmac's keg - # this ensures that Python software trying to locate wxpython headers - # using wx-config can find both wxmac and wxpython headers, - # which are linked to the same place - inreplace "#{bin}/wx-config", prefix, HOMEBREW_PREFIX - end - - test do - system bin/"wx-config", "--libs" - end -end diff --git a/Formula/wxmaxima.rb b/Formula/wxmaxima.rb deleted file mode 100644 index 48f096ca60d4e..0000000000000 --- a/Formula/wxmaxima.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Wxmaxima < Formula - desc "Cross platform GUI for Maxima" - homepage "https://wxmaxima-developers.github.io/wxmaxima/" - url "https://github.com/wxMaxima-developers/wxmaxima/archive/Version-18.12.0.tar.gz" - sha256 "7098bacce2023bf0c14f17f6bc5368d0732770437e5cff3ef4d65b026f432e5c" - head "https://github.com/wxMaxima-developers/wxmaxima.git" - - bottle do - cellar :any - sha256 "cdf9cc0a4b71f763fdacf3cddafc52e70258cc855c86dad4144f0bf2523b027d" => :mojave - sha256 "1d1809d0f19180e1c7f1eb55c54a0b09c859589a20fd72591f2437d0a1802437" => :high_sierra - sha256 "3cdeacd53880490bce5f9d7c4498c1fdf778ddef7d21f4fa3905c317202b6985" => :sierra - end - - depends_on "cmake" => :build - depends_on "gettext" => :build - depends_on "wxmac" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - prefix.install "wxMaxima.app" - end - - def caveats; <<~EOS - When you start wxMaxima the first time, set the path to Maxima - (e.g. #{HOMEBREW_PREFIX}/bin/maxima) in the Preferences. - - Enable gnuplot functionality by setting the following variables - in ~/.maxima/maxima-init.mac: - gnuplot_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ - draw_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ - EOS - end - - test do - assert_match "algebra", shell_output("#{bin}/wxmaxima --help 2>&1", 255) - end -end diff --git a/Formula/wxpython.rb b/Formula/wxpython.rb deleted file mode 100644 index c618ba320e453..0000000000000 --- a/Formula/wxpython.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Wxpython < Formula - desc "Python bindings for wxWidgets" - homepage "https://www.wxwidgets.org/" - url "https://downloads.sourceforge.net/project/wxpython/wxPython/3.0.2.0/wxPython-src-3.0.2.0.tar.bz2" - sha256 "d54129e5fbea4fb8091c87b2980760b72c22a386cb3b9dd2eebc928ef5e8df61" - revision 1 - - bottle do - cellar :any - sha256 "e4d26479673fb7ada6601f4fc67525f843b13a68c03d15e3c793481398fcfef3" => :mojave - sha256 "b3ed6dbe3c7b58b55d98025a7e2799137eeb78ec6260d18cd1b4e2057fb969f5" => :high_sierra - sha256 "2ada5517b6cb456d65ad6849a65355893676d09f6c7a997b03325f0079a849f4" => :sierra - sha256 "073777ade162a654d43d5866f69e6a857a7cedc677d7115200972e91261d9e0f" => :el_capitan - end - - depends_on "python@2" - depends_on "wxmac" - - def install - ENV["WXWIN"] = buildpath - ENV.append_to_cflags "-arch #{MacOS.preferred_arch}" - - # wxPython is hardcoded to install headers in wx's prefix; - # set it to use wxPython's prefix instead - # See #47187. - inreplace %w[wxPython/config.py wxPython/wx/build/config.py], - "WXPREFIX +", "'#{prefix}' +" - - args = [ - "WXPORT=osx_cocoa", - # Reference our wx-config - "WX_CONFIG=#{Formula["wxmac"].opt_bin}/wx-config", - # At this time Wxmac is installed Unicode only - "UNICODE=1", - # Some scripts (e.g. matplotlib) expect to `import wxversion`, which is - # only available on a multiversion build. - "INSTALL_MULTIVERSION=1", - # OpenGL and stuff - "BUILD_GLCANVAS=1", - "BUILD_GIZMOS=1", - "BUILD_STC=1", - ] - - cd "wxPython" do - system "python", "setup.py", "install", "--prefix=#{prefix}", *args - end - end - - test do - output = shell_output("python -c 'import wx ; print wx.version()'") - assert_match version.to_s, output - end -end diff --git a/Formula/wy60.rb b/Formula/wy60.rb deleted file mode 100644 index 90a08b6429f51..0000000000000 --- a/Formula/wy60.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Wy60 < Formula - desc "Wyse 60 compatible terminal emulator" - homepage "https://code.google.com/archive/p/wy60/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wy60/wy60-2.0.9.tar.gz" - sha256 "f7379404f0baf38faba48af7b05f9e0df65266ab75071b2ca56195b63fc05ed0" - - bottle do - sha256 "04e34b5cc12f3c130454dec804ff989e999fe6fb043c66f44976fc710fdce62a" => :mojave - sha256 "77fb48cc35956863e1f685b41c885337ca770185edffb250cbed8bd8c5a3070b" => :high_sierra - sha256 "f03706d166cfcc0679e696493bd13df30ad0617a92b602b79e3494ba3b1f46fb" => :sierra - sha256 "84d3bfa45582f2816808006f192c7580cedad24de3941a0786b5b36ce29e469c" => :el_capitan - sha256 "80508e33f12142eec20ff0e8866ed191b03facea5b6653a6f5331cb017ff78af" => :yosemite - sha256 "7257f9a9c49d867114209be3d4b4b8537da65f34302fa15266f7ead044947331" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/wy60", "--version" - end -end diff --git a/Formula/x/x-cmd.rb b/Formula/x/x-cmd.rb new file mode 100644 index 0000000000000..faa6481c758ba --- /dev/null +++ b/Formula/x/x-cmd.rb @@ -0,0 +1,35 @@ +class XCmd < Formula + desc "Bootstrap 1000+ command-line tools in seconds" + homepage "https://x-cmd.com" + url "https://github.com/x-cmd/x-cmd/archive/refs/tags/v0.7.2.tar.gz" + sha256 "851e3df9ee3113a340a82d85e4fff8d758878010de2916c5ccfa34a613d2bcb1" + license all_of: ["AGPL-3.0-only", "MIT", "BSD-3-Clause"] + + head "https://github.com/x-cmd/x-cmd.git", branch: "X" + + livecheck do + url :stable + strategy :github_releases + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "adea7e7933b0896793fbb068f6e48995d8f405c2ac60e0fd5521089902670247" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "adea7e7933b0896793fbb068f6e48995d8f405c2ac60e0fd5521089902670247" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "adea7e7933b0896793fbb068f6e48995d8f405c2ac60e0fd5521089902670247" + sha256 cellar: :any_skip_relocation, sonoma: "ff7c46cc57ba01fd49627d73a96d2cb89860b2e01d31ed394acf18acc525b7a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "97a187c542d247a92328963550d7f683715e51f3ce459ddcbd827f6307fb151d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97a187c542d247a92328963550d7f683715e51f3ce459ddcbd827f6307fb151d" + end + + def install + prefix.install Dir.glob("*") + prefix.install Dir.glob(".x-cmd") + inreplace prefix/"mod/x-cmd/lib/bin/x-cmd", "/opt/homebrew/Cellar/x-cmd/latest", prefix.to_s + bin.install prefix/"mod/x-cmd/lib/bin/x-cmd" + end + + test do + assert_match "Welcome to x-cmd", shell_output("#{bin}/x-cmd 2>&1") + assert_match "hello", shell_output("#{bin}/x-cmd cowsay hello") + end +end diff --git a/Formula/x/x11vnc.rb b/Formula/x/x11vnc.rb new file mode 100644 index 0000000000000..b4fa31c91ee45 --- /dev/null +++ b/Formula/x/x11vnc.rb @@ -0,0 +1,45 @@ +class X11vnc < Formula + desc "VNC server for real X displays" + homepage "https://github.com/LibVNC/x11vnc" + url "https://github.com/LibVNC/x11vnc/archive/refs/tags/0.9.17.tar.gz" + sha256 "3ab47c042bc1c33f00c7e9273ab674665b85ab10592a8e0425589fe7f3eb1a69" + license "GPL-2.0-or-later" => { with: "x11vnc-openssl-exception" } + head "https://github.com/LibVNC/x11vnc.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f1a4ed13ffea08fefdfaed2e5b5405a29d302c3e1dfe0ea8f8be69bee9cb4d9c" + sha256 cellar: :any, arm64_sequoia: "04683ae07f04702dffa93bf7fda5c4019e61d64505539c712559ed4dbe82a41d" + sha256 cellar: :any, arm64_sonoma: "dd9d309ac45e10b7fd969b4dd4d08a63612728ef746c3efffee2317b4c996425" + sha256 cellar: :any, arm64_ventura: "54c171880e9966130ce503f32af1ad3fb48175a86cfe7d07f05bb21a37fca4db" + sha256 cellar: :any, sonoma: "88e64a8742c4ade347ddc88ccf385b94b02da30b6be1f90cfd9793ff4cfe421b" + sha256 cellar: :any, ventura: "1a49795ee32fa6a062d2106375a0fc639c3498ab14042e5dd3a8e2af462b574e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0f7c9f45cf87d7609f58dd039c0f0a8ef1c3cfe2eec0afcb5a6d817829b3f82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "676b00ad2fdec853d0f1e29c3b31f33ec88be24b1ec75f1bbf05b4449d9146f4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libvncserver" + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1500 + + system "./autogen.sh", "--disable-silent-rules", + "--mandir=#{man}", + "--without-x", + *std_configure_args + system "make", "install" + end + + test do + system bin/"x11vnc", "--version" + end +end diff --git a/Formula/x/x264.rb b/Formula/x/x264.rb new file mode 100644 index 0000000000000..15201440b70b1 --- /dev/null +++ b/Formula/x/x264.rb @@ -0,0 +1,91 @@ +class X264 < Formula + desc "H.264/AVC encoder" + homepage "https://www.videolan.org/developers/x264.html" + # the latest commit on the stable branch + url "https://code.videolan.org/videolan/x264.git", + revision: "b35605ace3ddf7c1a5d67a2eb553f034aef41d55" + version "r3222" + license "GPL-2.0-or-later" + head "https://code.videolan.org/videolan/x264.git", branch: "master" + + # Cross-check the abbreviated commit hashes from the release filenames with + # the latest commits in the `stable` Git branch: + # https://code.videolan.org/videolan/x264/-/commits/stable + livecheck do + url "https://artifacts.videolan.org/x264/release-macos-arm64/" + regex(%r{href=.*?x264[._-](r\d+)[._-]([\da-z]+)/?["' >]}i) + strategy :page_match do |page, regex| + # Match the version and abbreviated commit hash in filenames + matches = page.scan(regex) + + # Fetch the `stable` Git branch Atom feed + stable_page_data = Homebrew::Livecheck::Strategy.page_content("https://code.videolan.org/videolan/x264/-/commits/stable?format=atom") + next if stable_page_data[:content].blank? + + # Extract commit hashes from the feed content + commit_hashes = stable_page_data[:content].scan(%r{/commit/([\da-z]+)}i).flatten + next if commit_hashes.blank? + + # Only keep versions with a matching commit hash in the `stable` branch + matches.map do |match| + release_hash = match[1] + commit_in_stable = commit_hashes.any? do |commit_hash| + commit_hash.start_with?(release_hash) + end + + match[0] if commit_in_stable + end + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_tahoe: "b631667b5ad55c6c3ae383484f658c5b4ba14da8a2fbb1d537975695852529ca" + sha256 cellar: :any, arm64_sequoia: "a613d44ead5d3999270970f41283eadfad8001061faf063945def6b8fb5145f4" + sha256 cellar: :any, arm64_sonoma: "6a932a218451e42a2678ea041e7453e7836249eb6b7013f8d2a3e8bfbb80a574" + sha256 cellar: :any, arm64_ventura: "2f620df0464c5bce04ab31c0ad8a4c0ecc8a2684b94815b41795125ba3a62415" + sha256 cellar: :any, sonoma: "3a260293e96e74afe7c763841d42085092f66711b6cec8aa693a1458e26eae3a" + sha256 cellar: :any, ventura: "ae46d51d6cfe33e0af6dae3b8e71e622903f2cce96000abda646e5a37d0f2fb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebafe98d77b8826fcf5412762db4dfce34bb491e4bd658eedc25a1e49f18f040" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ec18379e16e4e5fd740518dd8964472392725b10dcde1e726f02a34bcba813e" + end + + on_intel do + depends_on "nasm" => :build + end + + def install + args = %W[ + --prefix=#{prefix} + --disable-lsmash + --disable-swscale + --disable-ffms + --enable-shared + --enable-static + --enable-strip + ] + + system "./configure", *args + system "make", "install" + end + + test do + assert_match version.to_s.delete("r"), shell_output("#{bin}/x264 --version").lines.first + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + x264_picture_t pic; + x264_picture_init(&pic); + x264_picture_alloc(&pic, 1, 1, 1); + x264_picture_clean(&pic); + return 0; + } + C + system ENV.cc, "-L#{lib}", "test.c", "-lx264", "-o", "test" + system "./test" + end +end diff --git a/Formula/x/x265.rb b/Formula/x/x265.rb new file mode 100644 index 0000000000000..090d6c52f213f --- /dev/null +++ b/Formula/x/x265.rb @@ -0,0 +1,105 @@ +class X265 < Formula + desc "H.265/HEVC encoder" + homepage "https://bitbucket.org/multicoreware/x265_git" + url "https://bitbucket.org/multicoreware/x265_git/downloads/x265_4.1.tar.gz" + sha256 "a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29" + license "GPL-2.0-or-later" + head "https://bitbucket.org/multicoreware/x265_git.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "cb6b299c4a9e8f90422a1fe2b531ded532133f94ba45590abe73c5a27231072a" + sha256 cellar: :any, arm64_sequoia: "a2270c67fc2ea5a74824435cd72a9ad1441f9052d8490ab3e56ab5781bd7ad3c" + sha256 cellar: :any, arm64_sonoma: "c8d3df545085b8f60e7c00a147ccbd90f4f9cb46a3cd275e2474d8e71648207a" + sha256 cellar: :any, arm64_ventura: "aa56445287b9782addb79abe348821ecd198170b17ffb6cc74735d7ed60b9bac" + sha256 cellar: :any, sonoma: "303948272d75e643cbe4465e5ac39fee0b2f1f38c8b56763b62e6652fa257c1a" + sha256 cellar: :any, ventura: "1d120ed18c3c98cefffd108236ffb658f4022827b5dbc434666ffa9568d80ed2" + sha256 cellar: :any_skip_relocation, arm64_linux: "84411e12f00238bb69bb1e383c6b6959c4cd3a7e417075ab81d7101eebf145de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b24399f347c1ad1f1981a711ce9a60cd2f87da01e998f5dcd1d04e62e7fd121" + end + + depends_on "cmake" => :build + + on_intel do + depends_on "nasm" => :build + end + + # cmake 4 workaround, remove in next release + patch do + url "https://api.bitbucket.org/2.0/repositories/multicoreware/x265_git/diff/b354c009a60bcd6d7fc04014e200a1ee9c45c167" + sha256 "f7d3ce261c4b0cd461b55ad00de38ffa6a7cc2fa13ae6f034b3e46d8bb3cb6a8" + end + patch do + url "https://api.bitbucket.org/2.0/repositories/multicoreware/x265_git/diff/51ae8e922bcc4586ad4710812072289af91492a8" + sha256 "56c78f60cbaac61a44cb6e9889ece3380f9b60d32a4b704e274d9a636a16379d" + end + + def install + ENV.runtime_cpu_detection + # Build based off the script at ./build/linux/multilib.sh + args = %W[ + -DLINKED_10BIT=ON + -DLINKED_12BIT=ON + -DEXTRA_LINK_FLAGS=-L. + -DEXTRA_LIB=x265_main10.a;x265_main12.a + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + args << "-DENABLE_SVE2=OFF" if OS.linux? && Hardware::CPU.arm? + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" # FIXME: Workaround for CMake 4. + high_bit_depth_args = %w[ + -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF + -DENABLE_SHARED=OFF -DENABLE_CLI=OFF + ] + high_bit_depth_args << "-DENABLE_SVE2=OFF" if OS.linux? && Hardware::CPU.arm? + high_bit_depth_args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" # FIXME: Workaround for CMake 4. + + (buildpath/"8bit").mkpath + system "cmake", "-S", buildpath/"source", "-B", "10bit", + "-DENABLE_HDR10_PLUS=ON", + *high_bit_depth_args, + *std_cmake_args + system "cmake", "--build", "10bit" + mv "10bit/libx265.a", buildpath/"8bit/libx265_main10.a" + + system "cmake", "-S", buildpath/"source", "-B", "12bit", + "-DMAIN12=ON", + *high_bit_depth_args, + *std_cmake_args + system "cmake", "--build", "12bit" + mv "12bit/libx265.a", buildpath/"8bit/libx265_main12.a" + + system "cmake", "-S", buildpath/"source", "-B", "8bit", *args, *std_cmake_args + system "cmake", "--build", "8bit" + + cd "8bit" do + mv "libx265.a", "libx265_main.a" + + if OS.mac? + system "libtool", "-static", "-o", "libx265.a", "libx265_main.a", + "libx265_main10.a", "libx265_main12.a" + else + system "ar", "cr", "libx265.a", "libx265_main.a", "libx265_main10.a", + "libx265_main12.a" + system "ranlib", "libx265.a" + end + + system "make", "install" + end + end + + test do + resource "homebrew-test_video" do + url "https://raw.githubusercontent.com/fraunhoferhhi/vvenc/master/test/data/RTn23_80x44p15_f15.yuv" + sha256 "ecd2ef466dd2975f4facc889e0ca128a6bea6645df61493a96d8e7763b6f3ae9" + end + + resource("homebrew-test_video").stage testpath + yuv_path = testpath/"RTn23_80x44p15_f15.yuv" + x265_path = testpath/"x265.265" + system bin/"x265", "--input-res", "360x640", "--fps", "60", "--input", yuv_path, "-o", x265_path + header = "AAAAAUABDAH//w==" + assert_equal header.unpack("m"), [x265_path.read(10)] + + assert_match "version #{version}", shell_output("#{bin}/x265 -V 2>&1") + end +end diff --git a/Formula/x/x3270.rb b/Formula/x/x3270.rb new file mode 100644 index 0000000000000..bcbfd9f496944 --- /dev/null +++ b/Formula/x/x3270.rb @@ -0,0 +1,53 @@ +class X3270 < Formula + desc "IBM 3270 terminal emulator for the X Window System and Windows" + homepage "https://x3270.bgp.nu/" + url "https://x3270.bgp.nu/download/04.04/suite3270-4.4ga6-src.tgz" + sha256 "8438eee59795cd3bfbf1963053369b9aa30af6b85e4d927b7254d24e992433b1" + license "BSD-3-Clause" + + livecheck do + url "https://x3270.miraheze.org/wiki/Downloads" + regex(/href=.*?suite3270[._-]v?(\d+(?:\.\d+)+(?:ga\d+)?)(?:-src)?\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c6607f88ba719c972e9727b57b4b9765cda8a3cf82f0ee3589fbdc5d1f27ebf9" + sha256 arm64_sequoia: "41caa1c7a64de9870b59c7e4b834841ef3d65a211781a87d97edba44e8a1cd47" + sha256 arm64_sonoma: "c90a271931ac61368c956348a59b652bc4f984940d6841f5bbf59e75a8f52f57" + sha256 arm64_ventura: "f6ca96db4ce44adea40987d324ef4f06b4e397675412bdd8826b2b7eca40d724" + sha256 sonoma: "c210a811cce3df9b27bae0f8053651004c72591af1fb56b045939330c461a134" + sha256 ventura: "bc355d6abd6ebaf5b7010ad6cbdbc65307e64398b0fa1282c48dd33230fce56f" + sha256 arm64_linux: "84d0e04798231f71fcc7c9a41811a56d2384ee1057946d4ef36a33483ee95d9a" + sha256 x86_64_linux: "2e4b13cca8d704575596f0a9f0161cda483e1af7f60ac18e3576d59b8673cff6" + end + + depends_on "openssl@3" + depends_on "readline" + depends_on "tcl-tk@8" + + uses_from_macos "python" => :build + uses_from_macos "ncurses" + + def install + # Fix to read SOURCE_DATE_EPOCH as an unix timestamp not a date string + inreplace "Common/mkversion.py", "strptime(os.environ['SOURCE_DATE_EPOCH'], '%a %b %d %H:%M:%S %Z %Y')", + "fromtimestamp(int(os.environ['SOURCE_DATE_EPOCH']))" + + ENV.append "CPPFLAGS", "-I#{Formula["tcl-tk@8"].opt_include}/tcl-tk" + + args = %w[ + --enable-c3270 + --enable-pr3287 + --enable-s3270 + --enable-tcl3270 + ] + system "./configure", *args, *std_configure_args + system "make", "install" + system "make", "install.man" + end + + test do + system bin/"c3270", "--version" + end +end diff --git a/Formula/x/x86_64-elf-binutils.rb b/Formula/x/x86_64-elf-binutils.rb new file mode 100644 index 0000000000000..01720ce8d04f4 --- /dev/null +++ b/Formula/x/x86_64-elf-binutils.rb @@ -0,0 +1,62 @@ +class X8664ElfBinutils < Formula + desc "GNU Binutils for x86_64-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_tahoe: "0d79ce39624e7c9037d41f95acc84fd886777ddcd01c071de121cf0f83aa5bdc" + sha256 arm64_sequoia: "7ac8f5424c60ba0558083e0278ffa09a28a20210eac18ba2b45bcc500d600796" + sha256 arm64_sonoma: "646898a98d4d195fe03e4c5443584ba940b21068b92a004dc1273e9a50fc46cd" + sha256 arm64_ventura: "1dd965f9429b5d1ece2c1ce3fb30f8bca190e051ae25006cffb16fc41ac4fdbf" + sha256 sonoma: "28028a70c8a0a893a0f2055a14ab0bd69a7e467d18861219f44f6cc7f708a38b" + sha256 ventura: "998e1cc524b609dc43a0b66c78b74cf170cced84b6f6f56bd3500a59ea358768" + sha256 arm64_linux: "1769474ec01f828f92d506c47ae26bf6a31159015953318941fc69f2fe3994a1" + sha256 x86_64_linux: "5e0c35754c97ded783b562e61727aa3b717aced1d6f43a7a766dc2e0df45c284" + end + + depends_on "pkgconf" => :build + depends_on "zstd" + + uses_from_macos "zlib" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "x86_64-elf" + system "./configure", "--target=#{target}", + "--enable-targets=x86_64-pep", + "--prefix=#{prefix}", + "--libdir=#{lib}/#{target}", + "--infodir=#{info}/#{target}", + "--with-system-zlib", + "--with-zstd", + "--disable-nls" + system "make" + system "make", "install" + end + + test do + (testpath/"test-s.s").write <<~ASM + .section .data + .section .text + .globl _start + _start: + movl $1, %eax + movl $4, %ebx + int $0x80 + ASM + + system bin/"x86_64-elf-as", "--64", "-o", "test-s.o", "test-s.s" + assert_match "file format elf64-x86-64", + shell_output("#{bin}/x86_64-elf-objdump -a test-s.o") + end +end diff --git a/Formula/x/x86_64-elf-gcc.rb b/Formula/x/x86_64-elf-gcc.rb new file mode 100644 index 0000000000000..69805e1b0c945 --- /dev/null +++ b/Formula/x/x86_64-elf-gcc.rb @@ -0,0 +1,69 @@ +class X8664ElfGcc < Formula + desc "GNU compiler collection for x86_64-elf" + homepage "https://gcc.gnu.org" + url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + mirror "https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" + sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_tahoe: "079157c1db32ec1cb662610b44206fb3da875c7d29bebb5e3035a9169109aab1" + sha256 arm64_sequoia: "52a4380323261ec7529b819696d5599c327d1efc19f135c8b2749ce35e7e4cfa" + sha256 arm64_sonoma: "9f2df1b8a4a476b5b1b513dc9622910a8e4de57122acd79551c443ec632f1440" + sha256 arm64_ventura: "82e44af6926993fe3a51ab305e1f82e0080e6f44db0d3cbbb861290711095bcd" + sha256 sonoma: "ccb5d01c00355812264ba5942ce37c6bcb79a2ee3b5b8a5fe177f47516af070e" + sha256 ventura: "cca64053df220e3966dd7c2695c77e65f5f5395fa5b889ffb8c5ac9933f065f5" + sha256 arm64_linux: "443b7eef61d681d7b1231f7ebc3ecf85893a7da3a2047ef1dbda2fc909a11e5c" + sha256 x86_64_linux: "f8d1ad01fc135fed522a178bf2fecb8efb47cdf080c4bf7d7e851c3deada1c80" + end + + depends_on "gmp" + depends_on "libmpc" + depends_on "mpfr" + depends_on "x86_64-elf-binutils" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + target = "x86_64-elf" + mkdir "x86_64-elf-gcc-build" do + system "../configure", "--target=#{target}", + "--prefix=#{prefix}", + "--infodir=#{info}/#{target}", + "--disable-nls", + "--without-isl", + "--without-headers", + "--with-as=#{Formula["x86_64-elf-binutils"].bin}/x86_64-elf-as", + "--with-ld=#{Formula["x86_64-elf-binutils"].bin}/x86_64-elf-ld", + "--with-system-zlib", + "--enable-languages=c,c++" + system "make", "all-gcc" + system "make", "install-gcc" + system "make", "all-target-libgcc" + system "make", "install-target-libgcc" + + # FSF-related man pages may conflict with native gcc + rm_r(share/"man/man7") + end + end + + test do + (testpath/"test-c.c").write <<~C + int main(void) + { + int i=0; + while(i<10) i++; + return i; + } + C + + system bin/"x86_64-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" + output = shell_output("#{Formula["x86_64-elf-binutils"].bin}/x86_64-elf-objdump -a test-c.o") + assert_match "file format elf64-x86-64", output + end +end diff --git a/Formula/x/x86_64-elf-gdb.rb b/Formula/x/x86_64-elf-gdb.rb new file mode 100644 index 0000000000000..9c80c40d080c6 --- /dev/null +++ b/Formula/x/x86_64-elf-gdb.rb @@ -0,0 +1,87 @@ +class X8664ElfGdb < Formula + desc "GNU debugger for x86_64-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + sha256 "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5" + license "GPL-3.0-or-later" + head "https://sourceware.org/git/binutils-gdb.git", branch: "master" + + livecheck do + formula "gdb" + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 arm64_tahoe: "e72da4190ccdb7bc20ef20fad3942d167e8b4a2159307a9b006c2375ba1fef9d" + sha256 arm64_sequoia: "d80b494b5a25e9c226db68e12d75645e78afa66ca14c62277d5f2030cadc3d23" + sha256 arm64_sonoma: "2ec2504e8ca26f0be6f7a7f60a1e8c08d86b68c13dc14e7672099249dbd5f107" + sha256 sonoma: "70819e6628766fc0c471dd00741f2df5cfb1b5aaa4568c2c794bc894d3fc3144" + sha256 arm64_linux: "0c692e0bf14e0c8af444888d9d7028608f9e5b178ca027c06a35ebd2b4173388" + sha256 x86_64_linux: "78ed256c672948dde8139e3ddf80b47d70b3b74ece3a67a9ea7c710825443985" + end + + depends_on "pkgconf" => :build + depends_on "x86_64-elf-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "ncurses" # https://github.com/Homebrew/homebrew-core/issues/224294 + depends_on "python@3.14" + depends_on "readline" + depends_on "xz" # required for lzma support + depends_on "zstd" + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "zlib" + + # Workaround for https://github.com/Homebrew/brew/issues/19315 + on_sequoia :or_newer do + on_intel do + depends_on "expat" + end + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + target = "x86_64-elf" + args = %W[ + --target=#{target} + --datarootdir=#{share}/#{target} + --includedir=#{include}/#{target} + --infodir=#{info}/#{target} + --mandir=#{man} + --disable-binutils + --disable-nls + --enable-tui + --with-curses + --with-expat + --with-lzma + --with-python=#{which("python3.14")} + --with-system-readline + --with-system-zlib + --with-zstd + ] + + mkdir "build" do + system "../configure", *args, *std_configure_args + ENV.deparallelize # Error: common/version.c-stamp.tmp: No such file or directory + system "make" + + # Don't install bfd or opcodes, as they are provided by binutils + system "make", "install-gdb" + end + end + + test do + (testpath/"test.c").write "void _start(void) {}" + system Formula["x86_64-elf-gcc"].bin/"x86_64-elf-gcc", "-g", "-nostdlib", "test.c" + + output = shell_output("#{bin}/x86_64-elf-gdb -batch -ex 'info address _start' a.out") + assert_match "Symbol \"_start\" is a function at address 0x", output + end +end diff --git a/Formula/x/x86_64-elf-grub.rb b/Formula/x/x86_64-elf-grub.rb new file mode 100644 index 0000000000000..73b288dee50f6 --- /dev/null +++ b/Formula/x/x86_64-elf-grub.rb @@ -0,0 +1,94 @@ +class X8664ElfGrub < Formula + desc "GNU GRUB bootloader for x86_64-elf" + homepage "https://savannah.gnu.org/projects/grub" + url "https://ftpmirror.gnu.org/gnu/grub/grub-2.12.tar.xz" + mirror "https://mirrors.ocf.berkeley.edu/gnu/grub/grub-2.12.tar.xz" + sha256 "f3c97391f7c4eaa677a78e090c7e97e6dc47b16f655f04683ebd37bef7fe0faa" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a3bfac9b34a745e29d7ee88e5e148d6a4327b5b3b742db5be069adb39bcc1032" + sha256 arm64_sequoia: "9e7f8e4ae40110b6b2ef9610497ecc11612f2c28c399ac3addf7587ddcb88284" + sha256 arm64_sonoma: "66784aa8aecb9d70cab2eefb31b6f21cd0a2e29b3325c958abed5288c257b2e0" + sha256 arm64_ventura: "d5e9b928e26082ce63928c69575178c6deb912d36100ce95580b211c788b7f31" + sha256 sonoma: "ee6afc8a7dd71bded334efa01e9df5aa578093bde953a392939175e4092b83b2" + sha256 ventura: "6e256eb718661e554414730235ed267d15b10f928eaf8d47c27280a672321e48" + sha256 arm64_linux: "ad44fcab75cc08c82da70dc089b4a085dc2abf8c06dff9f8164fc16d98c239f3" + sha256 x86_64_linux: "e164e802fcb5d850632334568f4af43abd00561bc635f54f207aad940cb04362" + end + + depends_on "gawk" => :build + depends_on "help2man" => :build + depends_on "objconv" => :build + depends_on "pkgconf" => :build + depends_on "texinfo" => :build + depends_on "x86_64-elf-binutils" => :build + depends_on "x86_64-elf-gcc" => [:build, :test] + depends_on "freetype" + depends_on "gettext" + depends_on "mtools" + depends_on "xorriso" + depends_on "xz" + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "python" => :build + + resource "unifont" do + url "https://ftpmirror.gnu.org/gnu/unifont/unifont-16.0.02/unifont-16.0.02.pcf.gz", using: :nounzip + mirror "https://mirrors.ocf.berkeley.edu/gnu/unifont/unifont-16.0.02/unifont-16.0.02.pcf.gz" + version "16.0.02" + sha256 "02a3fe11994d3cdaf1d4bd5d2b6b609735e6823e01764ae83b704e02ec2f640d" + end + + def target + "x86_64-elf" + end + + def install + ENV.append_to_cflags "-Wno-error=incompatible-pointer-types" + ENV["PATH"]=prefix/"opt/gawk/libexec/gnubin:#{ENV["PATH"]}" + + touch buildpath/"grub-core/extra_deps.lst" + + resource("unifont").stage do |r| + buildpath.install "unifont-#{r.version}.pcf.gz" => "unifont.pcf.gz" + end + ENV["UNIFONT"] = buildpath/"unifont.pcf.gz" + + mkdir "build" do + args = %W[ + --disable-werror + --enable-grub-mkfont + --target=#{target} + --prefix=#{prefix/target} + --bindir=#{bin} + --libdir=#{lib/target} + --with-platform=efi + --program-prefix=#{target}- + ] + + system "../configure", *args + system "make" + system "make", "install" + + (prefix/target/"share/grub").mkpath + + system "./grub-mkfont", "--output=#{prefix/target}/share/grub/unicode.pf2", ENV["UNIFONT"] + end + end + + test do + (testpath/"boot.c").write <<~C + __asm__( + ".align 4\\n" + ".long 0x1BADB002\\n" + ".long 0x0\\n" + ".long -(0x1BADB002 + 0x0)\\n" + ); + C + system Formula["#{target}-gcc"].bin/"#{target}-gcc", "-c", "-o", "boot", "boot.c" + system bin/"#{target}-grub-file", "--is-x86-multiboot", "boot" + end +end diff --git a/Formula/x/x86_64-linux-gnu-binutils.rb b/Formula/x/x86_64-linux-gnu-binutils.rb new file mode 100644 index 0000000000000..60ea8c6f5e46c --- /dev/null +++ b/Formula/x/x86_64-linux-gnu-binutils.rb @@ -0,0 +1,96 @@ +class X8664LinuxGnuBinutils < Formula + desc "GNU Binutils for x86_64-linux-gnu cross development" + homepage "https://www.gnu.org/software/binutils/binutils.html" + url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + mirror "https://ftp.gnu.org/gnu/binutils/binutils-2.45.tar.bz2" + sha256 "1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_tahoe: "8bcd14fdc5deb4656227cbde3cac9386641b21e644e2358347141fba6fecdcf1" + sha256 arm64_sequoia: "268ee37eba6e05f6be4f51f5e95920bf3cea41523c1cab284ab09f52ac6c3f74" + sha256 arm64_sonoma: "a9b8aa0c3caa2151731989630391b53720210e91ff44bee17d5037b597e2dd6e" + sha256 arm64_ventura: "fa11644983812158c2e314b59cf7dec333b535e8172f0e9d917fee8ba65e46b1" + sha256 sonoma: "28f9353635715f839ae5868f1dab58ff6cc374877090fe5ef3f6ce8787d12774" + sha256 ventura: "d352c4509d7f504679a887f289214a13b1e22c78790d817f99a409fec24de610" + sha256 arm64_linux: "046752ea89c86cf164c16c62f98c0b4c7244e41351f0bb0d968dd02e68ad87de" + sha256 x86_64_linux: "cbd3db60259e28fe23d0682e5d0d6424be817a214e9b745c06676d4bfa0ca790" + end + + depends_on "pkgconf" => :build + # Requires the header + # https://sourceware.org/bugzilla/show_bug.cgi?id=31320 + depends_on macos: :ventura + depends_on "zstd" + + uses_from_macos "llvm" => :test + uses_from_macos "zlib" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + on_linux do + on_intel do + keg_only "it conflicts with `binutils`" + end + end + + def install + ENV.cxx11 + + # Avoid build failure: https://sourceware.org/bugzilla/show_bug.cgi?id=23424 + ENV.append "CXXFLAGS", "-Wno-c++11-narrowing" + + target = "x86_64-linux-gnu" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--enable-deterministic-archives", + "--prefix=#{prefix}", + "--libdir=#{lib/target}", + "--infodir=#{info/target}", + "--disable-werror", + "--target=#{target}", + "--enable-gold=yes", + "--enable-ld=yes", + "--enable-interwork", + "--with-system-zlib", + "--with-zstd", + "--disable-nls", + "--disable-gprofng" # Fails to build on Linux + system "make" + system "make", "install" + end + + test do + resource "homebrew-sysroot" do + url "https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2028cdaf24259d23adcff95393b8cc4f0eef714b/debian_bullseye_amd64_sysroot.tar.xz" + sha256 "1be60e7c456abc590a613c64fab4eac7632c81ec6f22734a61b53669a4407346" + end + + assert_match "f()", shell_output("#{bin}/x86_64-linux-gnu-c++filt _Z1fv") + + (testpath/"sysroot").install resource("homebrew-sysroot") + (testpath/"hello.c").write <<~C + #include + int main() { printf("hello!\\n"); } + C + + ENV.clang + ENV.remove_macosxsdk if OS.mac? + system ENV.cc, "-v", "--target=x86_64-pc-linux-gnu", "--sysroot=#{testpath}/sysroot", "-c", "hello.c" + assert_match "main", shell_output("#{bin}/x86_64-linux-gnu-nm hello.o") + + system ENV.cc, "-v", "--target=x86_64-pc-linux-gnu", "--sysroot=#{testpath}/sysroot", + "-fuse-ld=#{bin}/x86_64-linux-gnu-ld", "hello.o", "-o", "hello" + file_output = shell_output("file ./hello") + assert_match "ELF", file_output + assert_match "x86-64", file_output + assert_match "libc.so", shell_output("#{bin}/x86_64-linux-gnu-readelf -d ./hello") + system bin/"x86_64-linux-gnu-strip", "./hello" + end +end diff --git a/Formula/x/xa.rb b/Formula/x/xa.rb new file mode 100644 index 0000000000000..16ce1964f255e --- /dev/null +++ b/Formula/x/xa.rb @@ -0,0 +1,40 @@ +class Xa < Formula + desc "6502 cross assembler" + homepage "https://www.floodgap.com/retrotech/xa/" + url "https://www.floodgap.com/retrotech/xa/dists/xa-2.4.1.tar.gz" + sha256 "63c12a6a32a8e364f34f049d8b2477f4656021418f08b8d6b462be0ed3be3ac3" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href\s*?=.*?xa[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dc108ff2d50d93bfab68fa7e95a6968a5adb2dcc3a8a8fa2fcb4ad1f6c500517" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e7cb61c60ee5fc683a25d3b2569089a26d4cb1fad041c31c42c9bcfd738ff4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4faf66bc33b40db687358b44c1e3e20c1c6c0bb4d5b524a3cce3071907fb573e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fca7bd74aa55cd1f8ac78ae44ecb698c2c79e3226aea4c5c59a24bf9677c0ba7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "15866623bc504d49b48f87805ce45b3812b0cf1e063a144d9c41ba967cd26f70" + sha256 cellar: :any_skip_relocation, sonoma: "fd9d22c1fce31ad677470ef11937c660ed9ff4c852b57e232f1b09cd1ad19d38" + sha256 cellar: :any_skip_relocation, ventura: "e7aa2f3a2f025247bf99f94effbaac96b06949b604baa03d8777160cacb782d5" + sha256 cellar: :any_skip_relocation, monterey: "52344939bcd8aa7e47a27f2bce0b0f2b0f4d94145dd5bd1ae11a01bcf513e5d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "988caaf9671af8cb7f041f4ef6380bf738ee75080321c41f4e45a391bf984a26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e35f6c603bbc9e5a84d41c3b9980f572989c8573139ff3438e36304745a5950" + end + + def install + system "make", "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "DESTDIR=#{prefix}", + "install" + end + + test do + (testpath/"foo.a").write "jsr $ffd2\n" + + system bin/"xa", "foo.a" + code = File.open("a.o65", "rb") { |f| f.read.unpack("C*") } + assert_equal [0x20, 0xd2, 0xff], code + end +end diff --git a/Formula/x/xan.rb b/Formula/x/xan.rb new file mode 100644 index 0000000000000..269af8cbcf16d --- /dev/null +++ b/Formula/x/xan.rb @@ -0,0 +1,29 @@ +class Xan < Formula + desc "CSV CLI magician written in Rust" + homepage "https://github.com/medialab/xan" + url "https://github.com/medialab/xan/archive/refs/tags/0.53.0.tar.gz" + sha256 "0b7bdea4cf18ea6dcaeaffb64fa2b7f7dca07760af3c89ac6955c338e94ad49b" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/medialab/xan.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2bf89650138614d38e0962c8858103b4f225f2895ffb06f759f32ab152e3088b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba8a4c76aff40b59fd45a74ddb33d2373456f9c071908cab372a2a40d3d75539" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9c1612a8feb580475fb7f088c56bbb7fb1c2151512d75ee6cffa9e87afa1de7" + sha256 cellar: :any_skip_relocation, sonoma: "2dd49107ec25e6ad035d24953803fa04fc86f319bd6cdcca6ef7347e8efbef22" + sha256 cellar: :any_skip_relocation, arm64_linux: "6670d3d2023ca665a6d2f1ab1dbb36b9f71550e10ec50e0198e311e895c1a1ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e36a5d2b7440de015286d933a34ef350b50191e3357ac3b6bbbf23e383c4b51" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.csv").write("first header,second header") + system bin/"xan", "stats", "test.csv" + assert_match version.to_s, shell_output("#{bin}/xan --version").chomp + end +end diff --git a/Formula/x/xapian.rb b/Formula/x/xapian.rb new file mode 100644 index 0000000000000..13dd2397f034d --- /dev/null +++ b/Formula/x/xapian.rb @@ -0,0 +1,74 @@ +class Xapian < Formula + desc "C++ search engine library" + homepage "https://xapian.org/" + url "https://oligarchy.co.uk/xapian/1.4.29/xapian-core-1.4.29.tar.xz" + sha256 "c55c9bc8613ad3ec2c218eafca088c218ab7cddcba7ef08f3af0e542f4e521bc" + license "GPL-2.0-or-later" + version_scheme 1 + + livecheck do + url "https://xapian.org/download" + regex(/href=.*?xapian-core[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "529da91065d00808e836e7ab0700d5344d58bed36dfb88109831b16370cf9582" + sha256 cellar: :any, arm64_sequoia: "014927707879ba359a2045d1f19ac3cfc96e3948a91729d51b6ec4bb38d221f7" + sha256 cellar: :any, arm64_sonoma: "3fc2adca698ac9a8896ae7993284350fb05903306d434b82dfda72ce94df30a5" + sha256 cellar: :any, sonoma: "f703e5658e96de70094b07bad06e40ec11a2361b56e3c2f6dd46855f647ccc9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "70c6bae9ae2fee7cdf558e6f9d88c9f2180510f072b60065871ef76a12e3ebc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eef2cd6c921c2a77443d79757e912be5f1d519e9dfa3b39e23bc7666203236eb" + end + + depends_on "python@3.14" => [:build, :test] + depends_on "sphinx-doc" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "util-linux" + end + + skip_clean :la + + resource "bindings" do + url "https://oligarchy.co.uk/xapian/1.4.29/xapian-bindings-1.4.29.tar.xz" + sha256 "1740e927bb6850ef67d99a0b808a1b7c9af3f16c15577e0261bbd3fc016fc8ce" + + livecheck do + formula :parent + end + end + + def python3 + "python3.14" + end + + def install + odie "bindings resource needs to be updated" if version != resource("bindings").version + + ENV["PYTHON"] = which(python3) + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + + resource("bindings").stage do + ENV["XAPIAN_CONFIG"] = bin/"xapian-config" + ENV.delete "PYTHONDONTWRITEBYTECODE" # makefile relies on install .pyc files + + site_packages = Language::Python.site_packages(python3) + ENV.prepend_create_path "PYTHON3_LIB", prefix/site_packages + + ENV.append_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/site_packages + ENV.append_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"vendor"/site_packages + + system "./configure", *std_configure_args, "--disable-silent-rules", "--with-python3" + system "make", "install" + end + end + + test do + system bin/"xapian-config", "--libs" + system python3, "-c", "import xapian" + end +end diff --git a/Formula/x/xaric.rb b/Formula/x/xaric.rb new file mode 100644 index 0000000000000..650c0a488e142 --- /dev/null +++ b/Formula/x/xaric.rb @@ -0,0 +1,67 @@ +class Xaric < Formula + desc "IRC client" + homepage "https://xaric.org/" + url "https://xaric.org/software/xaric/releases/xaric-0.13.9.tar.gz" + sha256 "cb6c23fd20b9f54e663fff7cab22e8c11088319c95c90904175accf125d2fc11" + license "GPL-2.0-or-later" + + livecheck do + url "https://xaric.org/software/xaric/releases/" + regex(/href=.*?xaric[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c6912be695b886211e28a85bc88a76e468102a70cf3a251181dcb98a7915ce0f" + sha256 arm64_sequoia: "4ba45ac925f747831ac9bcee52f9c4e45e91b6d10d66181c801ec247dd1d70dd" + sha256 arm64_sonoma: "411539ba49d2249cbde5b3e98bef79d227783d540891f5fcd8fa5cf51bf966f6" + sha256 arm64_ventura: "38088b4ae12add10906e733b77f6fc7c7ce0482af1bbd71e6e03db6351c934b7" + sha256 arm64_monterey: "448f66a8156857d38d4050fc9f062d8a6bc9f9267b85a063acc776095635bc19" + sha256 arm64_big_sur: "9f38a153d2c80701856c14b0bbdc776c9d50ab1f0930b668f2e3f7c377b4ecac" + sha256 sonoma: "f2a0e5f1c26055646e3f999ecb00a0a3ca1ab91e4e2dc20ed7836f213a9fc046" + sha256 ventura: "b46f72b6bad580eeb6583455155d8427e8c2812a5e87fe88975fdf5261e10982" + sha256 monterey: "d71030b64a334132691fae5896e5924428138fa2de5bed1634cbcf22d625bedf" + sha256 big_sur: "98a7bcefda0b4262da3bfbb45fe6985fae25db911cc60ea33b503be4e4598bed" + sha256 catalina: "74bf2f31d52f8057a22fd38858314668cd62b89adad5a299209890a717718856" + sha256 arm64_linux: "fcad340e8b719ea6a033f341a272696912a178f0945000ba90ccbf103ef5f041" + sha256 x86_64_linux: "633be739d85e31a8d4e7af822a11a8c07f30c0491035fb76cd68f3b81145940b" + end + + depends_on "openssl@3" + + uses_from_macos "ncurses" + + # Fix ODR violations (waiting for the PR accepted) + patch do + url "https://github.com/laeos/xaric/commit/a6fa3936918098fd00ebcfb845360a6110ac4505.patch?full_index=1" + sha256 "353ef73a5a408a876f99d4884a7d5c74d06759c60a786ef7c041ca7d8e0abcd3" + end + + # Fix ODR violations pt.2 (waiting for the PR accepted) + patch do + url "https://github.com/laeos/xaric/commit/c365b700a5525cf0a38091c833096c179ee2e40f.patch?full_index=1" + sha256 "9e82b5df90b96b096a3556afc3520e7b3e8d649eed4b8b42be622bc428f0ca73" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + require "pty" + output = "" + PTY.spawn(bin/"xaric", "-v") do |r, _w, _pid| + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + assert_match "Xaric #{version}", output + end +end diff --git a/Formula/x/xauth.rb b/Formula/x/xauth.rb new file mode 100644 index 0000000000000..7dca11e6a97e4 --- /dev/null +++ b/Formula/x/xauth.rb @@ -0,0 +1,50 @@ +class Xauth < Formula + desc "X.Org Applications: xauth" + homepage "https://www.x.org/" + url "https://www.x.org/pub/individual/app/xauth-1.1.4.tar.xz" + sha256 "e9318141464ad7b4dc0f8564a580f0d20f977c85a388cc40d5a766206151c690" + license "MIT-open-group" + + bottle do + sha256 cellar: :any, arm64_tahoe: "482732473b597b69803aa752a8b3e81727ef704ea114afaba8189ec8f8174b5d" + sha256 cellar: :any, arm64_sequoia: "5a9d8f5e963c19c5245d33ea579cc87384a2e0d6e50d34979dccabd027efc3c1" + sha256 cellar: :any, arm64_sonoma: "8a24eae57487dfa2e9eea59f32f921da0f80e6d5cf6cae52683b0d1da150c4f2" + sha256 cellar: :any, arm64_ventura: "1c8d12d20eec9be0585b8c6bd44b36929c4cd2b6f1598148e490d3a388d36edc" + sha256 cellar: :any, sonoma: "9dde39c14d1fad1e94571a181c8fa62f1a944c9ff332873a8e149a179a93f6dc" + sha256 cellar: :any, ventura: "69af4439e0d66e4f233a1eb679754c388e3bc0ab79912e15760bddb6648fde31" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e192fd49a6a232b2002d8835654499c2a01a34332f157e127c6b5269fb3b05f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a562860d2d2ed8bec6fd14a4929e3be833423fb707ae79fdab37c190ed97e5ff" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "libx11" + depends_on "libxau" + depends_on "libxext" + depends_on "libxmu" + + on_linux do + depends_on "libxcb" + depends_on "libxdmcp" + end + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-unix-transport + --enable-tcp-transport + --enable-ipv6 + --enable-local-transport + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "unable to open display", shell_output("#{bin}/xauth generate :0 2>&1", 1) + end +end diff --git a/Formula/x/xbee-comm.rb b/Formula/x/xbee-comm.rb new file mode 100644 index 0000000000000..64d1abc64fb6e --- /dev/null +++ b/Formula/x/xbee-comm.rb @@ -0,0 +1,43 @@ +# This fork contains macOS patches. +# Original project: https://github.com/roysjosh/xbee-comm + +class XbeeComm < Formula + desc "XBee communication libraries and utilities" + homepage "https://github.com/guyzmo/xbee-comm" + url "https://github.com/guyzmo/xbee-comm/archive/refs/tags/v1.5.tar.gz" + sha256 "c474d22feae5d9c05b3ec167b839c8fded512587da0f020ca682d60db174f24a" + license "GPL-3.0-or-later" + head "https://github.com/guyzmo/xbee-comm.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "49a7355172da267afee94bb366bcb090a0473aab8784b0b26b24b21f6b0b9c48" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a9eedfd657cad6df2ac1df6c320df225e7b9c14add897b1044fecd21d161aee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b50fa055f4f542eab3a06ef487bf7eab058d592c1b27eec56344e09e17bf9093" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19861ec3a7e655a1371000d05898e0b7d1f169139d9e70dc0fc42943a685514f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f01389dc2aeb100a4114568be24c53b755633ef965fd9098564d439902790d3d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a4dda0f81a92b04ac242a71d3b233da85abdcc767b8c5ec956e3285565eef994" + sha256 cellar: :any_skip_relocation, sonoma: "f38c951e887ac6f38bafdd455fe95607aba4add5ffbfe2c0b722d5060408272e" + sha256 cellar: :any_skip_relocation, ventura: "ad8ec612f36bcbac63cd1aa11f43880f7d98357246d96798e773849359638066" + sha256 cellar: :any_skip_relocation, monterey: "aa2839fdb06e6b425afc91ae417293ac500893f8963b88acb35153034d3e1ee4" + sha256 cellar: :any_skip_relocation, big_sur: "9d163cd9e888a337b0bc39bc3af871a0ed0b8efadb75933e4a4273fbccdfd90d" + sha256 cellar: :any_skip_relocation, catalina: "4c4eb5e75f59ac2527ec72d41e5e11ae156243278b7c92186fdccec62435a783" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc58db4ba36c437b60007679bc67881898167c5f2fb490fd1c71c9707b1338c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf23d16b599dc5427dd3552004d307bacd82b77b89ac2bd0a018bf1f986fc720" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "aclocal" + system "autoconf" + system "autoheader" + system "automake", "-a", "-c" + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end +end diff --git a/Formula/x/xbitmaps.rb b/Formula/x/xbitmaps.rb new file mode 100644 index 0000000000000..5baa7a03391d0 --- /dev/null +++ b/Formula/x/xbitmaps.rb @@ -0,0 +1,41 @@ +class Xbitmaps < Formula + desc "Bitmap images used by multiple X11 applications" + homepage "https://xcb.freedesktop.org" + url "https://xorg.freedesktop.org/archive/individual/data/xbitmaps-1.1.3.tar.xz" + sha256 "ad6cad54887832a17d86c2ccfc5e52a1dfab090f8307b152c78b0e1529cd0f7a" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a2d50475647c9d98e3822fbbf383231d0757fcbfd429d6999ad263ff692dcfb2" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~'C' + #include + #include + int main() { + printf("gray_width = %d\n", gray_width); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}" + assert_equal "gray_width = 2", shell_output("./test").strip + end +end diff --git a/Formula/x/xboard.rb b/Formula/x/xboard.rb new file mode 100644 index 0000000000000..2eac3ad1d4fbe --- /dev/null +++ b/Formula/x/xboard.rb @@ -0,0 +1,68 @@ +class Xboard < Formula + desc "Graphical user interface for chess" + homepage "https://www.gnu.org/software/xboard/" + url "https://ftpmirror.gnu.org/gnu/xboard/xboard-4.9.1.tar.gz" + mirror "https://ftp.gnu.org/gnu/xboard/xboard-4.9.1.tar.gz" + sha256 "2b2e53e8428ad9b6e8dc8a55b3a5183381911a4dae2c0072fa96296bbb1970d6" + license "GPL-3.0-or-later" + revision 4 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "49fb2045c979c8788ec25bbba4416f8f5a38729d9018d610ea1dd41f2595263b" + sha256 arm64_sequoia: "a3b2d95bd28d0e7034e8c740bb5daf60ebd131dec5586eda4c8caa491b96f99b" + sha256 arm64_sonoma: "286ed707d8d03708c836b4ac6a00777425e5984b6fe5be083ae571cfcfccb877" + sha256 arm64_ventura: "50cd0e9fe8b8c1e1cafca11ab050238c046b037db55561204c25bd238438cdd4" + sha256 arm64_monterey: "90dd23652bb03fee8b0ff31fba73ad979861fcefc17602a19d9197d0eee77170" + sha256 sonoma: "e03a15e4427bb343a6f1bdfbae67eb899542e0b9b78bb9bd70c8b3fe8efa1bee" + sha256 ventura: "144abeb78c31d18571fe410dbb0759657566bb9162013102bdb5c59fb95e1aae" + sha256 monterey: "983ceebe82b7abeb9c0126c06e9d8954302431c2de2f47e3a05b40423633be98" + sha256 arm64_linux: "a3c183cb0e434de3eec05adddb804c87f92d93c892d908cfcbd47d25a92ecfea" + sha256 x86_64_linux: "fa58bc09398cf9c5fcfe470ee69366d7d2e07b8e369475f54ca6d0c7426281fb" + end + + head do + url "https://git.savannah.gnu.org/git/xboard.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + end + + depends_on "pkgconf" => :build + depends_on "cairo" + depends_on "fairymax" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+" + depends_on "librsvg" + depends_on "pango" + depends_on "polyglot" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--disable-zippy", + "--with-gtk", + "--without-Xaw", + *std_configure_args + system "make", "install" + end + + test do + system bin/"xboard", "--help" + end +end diff --git a/Formula/x/xbyak.rb b/Formula/x/xbyak.rb new file mode 100644 index 0000000000000..0b9cfd825a764 --- /dev/null +++ b/Formula/x/xbyak.rb @@ -0,0 +1,38 @@ +class Xbyak < Formula + desc "C++ JIT assembler for x86 (IA32), x64 (AMD64, x86-64)" + homepage "https://github.com/herumi/xbyak" + url "https://github.com/herumi/xbyak/archive/refs/tags/v7.30.tar.gz" + sha256 "aec5ae746051fa8b6b34a543ddda0dc0d33d33a06410110af6cdebdafddb6eb9" + license "BSD-3-Clause" + head "https://github.com/herumi/xbyak.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7c453b15fc95aaa8727c66eb8d8e19c4d94cd5ed2d83790acd0c86c6b116e560" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + Xbyak::util::Cpu cpu; + cpu.has(Xbyak::util::Cpu::tSSE42); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-c", "-I#{include}" + end +end diff --git a/Formula/x/xc.rb b/Formula/x/xc.rb new file mode 100644 index 0000000000000..24e94b2f93bf0 --- /dev/null +++ b/Formula/x/xc.rb @@ -0,0 +1,41 @@ +class Xc < Formula + desc "Markdown defined task runner" + homepage "https://xcfile.dev/" + url "https://github.com/joerdav/xc/archive/refs/tags/v0.8.6.tar.gz" + sha256 "142c28aafa454b461b2950d980f0a8a5d89b59fb9032bbe23ca1015472bff691" + license "MIT" + head "https://github.com/joerdav/xc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "03d65a6b086162b16edbf2c1fdd19712b0d82396c17e6ce51c66f65bbcbad2f1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd1805689cb9420c2b7e6430f9f7365e9b58cf815cacc77f6f651d94aced9789" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd1805689cb9420c2b7e6430f9f7365e9b58cf815cacc77f6f651d94aced9789" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd1805689cb9420c2b7e6430f9f7365e9b58cf815cacc77f6f651d94aced9789" + sha256 cellar: :any_skip_relocation, sonoma: "53e4ba82822edc0b6fd7644a9671f18a9936db0daa8e021367bbf4dda8f602ba" + sha256 cellar: :any_skip_relocation, ventura: "53e4ba82822edc0b6fd7644a9671f18a9936db0daa8e021367bbf4dda8f602ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1399a1f09e5a6191cace90c94185a077f1f22ec82e2a83e4ec7ea5702e0ca56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8a043102c801801a4a603a0aa813513a40d32f957fbfe0355e7c13cb9ede630" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/xc" + end + + test do + assert_match version.to_s, shell_output("#{bin}/xc --version") + + (testpath/"README.md").write <<~MARKDOWN + # Tasks + + ## hello + ```sh + echo "Hello, world!" + ``` + MARKDOWN + + output = shell_output("#{bin}/xc hello") + assert_match "Hello, world!", output + end +end diff --git a/Formula/x/xcb-proto.rb b/Formula/x/xcb-proto.rb new file mode 100644 index 0000000000000..f6963ce795f0c --- /dev/null +++ b/Formula/x/xcb-proto.rb @@ -0,0 +1,44 @@ +class XcbProto < Formula + desc "X.Org: XML-XCB protocol descriptions for libxcb code generation" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-1.17.0.tar.xz" + sha256 "2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd22562148c" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "1907041d187bef23a433c472482195a2cd8a4db3787f9da47db1ae5e5d47894a" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => [:build, :test] + + def python3 + "python3.14" + end + + def install + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + PYTHON=#{python3} + ] + + system "./configure", *args + system "make" + system "make", "install" + end + + test do + assert_match "#{share}/xcb", shell_output("pkg-config --variable=xcbincludedir xcb-proto").chomp + system python3, "-c", <<~PYTHON + import collections + output = collections.defaultdict(int) + from xcbgen import xtypes + PYTHON + end +end diff --git a/Formula/x/xcb-util-cursor.rb b/Formula/x/xcb-util-cursor.rb new file mode 100644 index 0000000000000..82ceee8559034 --- /dev/null +++ b/Formula/x/xcb-util-cursor.rb @@ -0,0 +1,72 @@ +class XcbUtilCursor < Formula + desc "XCB cursor library (replacement for libXcursor)" + homepage "https://xcb.freedesktop.org" + url "https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.5.tar.xz" + sha256 "0caf99b0d60970f81ce41c7ba694e5eaaf833227bb2cbcdb2f6dc9666a663c57" + license "X11" + + bottle do + sha256 cellar: :any, arm64_tahoe: "6f17d08f701f067aaf8f5fa248ab7b4ffaf2530a2c97691903a3f197438e6769" + sha256 cellar: :any, arm64_sequoia: "19c5ff7d0db3e131eb4c145926254e627ca111c110f952dc1a204c3f147f306d" + sha256 cellar: :any, arm64_sonoma: "730c2f3ba7845fee762962b468a1133927ebf5046914e688882dbe47cf83d134" + sha256 cellar: :any, arm64_ventura: "b3f9ad96caebf02b0d9f66776513a37146893b9b7bddf1c738b760fac9cf2390" + sha256 cellar: :any, sonoma: "5fdd9e55026cd483efb869e4f0a7deac3cd5d3ea667325a89263d427327039b5" + sha256 cellar: :any, ventura: "a2a5cc32e692dec55f60a89c3e30367ff239094814816a039110451b77e2ec3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8ea56d5b51359e143c7738a6b7849813012eb26b15acc256d7d82f4b9fd649d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "537558ddd8dacf1bed15c92d867d26dc82f6e047294d6cc7b70daac909e7b0b4" + end + + head do + url "https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "util-macros" => :build + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libxcb" + depends_on "xcb-util" + depends_on "xcb-util-image" + depends_on "xcb-util-renderutil" + + uses_from_macos "m4" => :build + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + flags = shell_output("pkg-config --cflags --libs xcb-util xcb-cursor").chomp.split + assert_includes flags, "-I#{include}" + assert_includes flags, "-L#{lib}" + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char *argv[]) { + int screennr; + xcb_connection_t *conn = xcb_connect(NULL, &screennr); + if (conn == NULL || xcb_connection_has_error(conn)) + return 1; + + xcb_screen_t *screen = xcb_aux_get_screen(conn, screennr); + xcb_cursor_context_t *ctx; + if (xcb_cursor_context_new(conn, screen, &ctx) < 0) + return 1; + + xcb_cursor_t cid = xcb_cursor_load_cursor(ctx, "watch"); + return 0; + } + C + system ENV.cc, "test.c", *flags + end +end diff --git a/Formula/x/xcb-util-image.rb b/Formula/x/xcb-util-image.rb new file mode 100644 index 0000000000000..e3a04d9ae9cbb --- /dev/null +++ b/Formula/x/xcb-util-image.rb @@ -0,0 +1,51 @@ +class XcbUtilImage < Formula + desc "XCB port of Xlib's XImage and XShmImage" + homepage "https://xcb.freedesktop.org" + url "https://xcb.freedesktop.org/dist/xcb-util-image-0.4.1.tar.gz" + sha256 "0ebd4cf809043fdeb4f980d58cdcf2b527035018924f8c14da76d1c81001293b" + license "X11" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6f1af8fedcf855ff37794ed6fb607be0a4d560afee79e3fa5ba79ec6bd877d29" + sha256 cellar: :any, arm64_sequoia: "e7ebd7a81c36003239f80b1fdd67650d6eee527482e2f2f70edc14b631f77224" + sha256 cellar: :any, arm64_sonoma: "237ce9305294166d1dbd5348b95e75c577511c7b4e69d0203905c86ff5b1ed48" + sha256 cellar: :any, arm64_ventura: "29c75ea3f0424141fefe9b962c4e8a0ce362c23ef650a905e5118e6833040a85" + sha256 cellar: :any, arm64_monterey: "a4e026015349c95cc815a4875b5b9aa1149888e0f8f3d1bd7075de107e09f524" + sha256 cellar: :any, arm64_big_sur: "fd3852b6c3b6b93d835cc2f67f60ceb69a2bba35ff61b290e40a55bd325a3b85" + sha256 cellar: :any, sonoma: "9fb54a1443ff6bd3b08f8a2b2b9724924d60c25ec65383e4949e47ed98456f68" + sha256 cellar: :any, ventura: "d2c334555a803e4c1df1c5f61482aebe3916600e68ecdaf888f7ed049650b300" + sha256 cellar: :any, monterey: "f92b6aa70eb06235ba8288bad7b15ad7f02bc718904b84500b6b3372872c6603" + sha256 cellar: :any, big_sur: "bb01ed34a0c656065eeebf407b5e014f5ecd8a23b0caf231dfeb79e733aa1136" + sha256 cellar: :any, catalina: "814b9a0c7d70118ee2da43f32311121b9da52f995c790fe4b4143e701a443c8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a97fcf25d84f03c1114e588464768ef38160faf0beadbbd816c92a25a914bb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edac92f05202f6a66955b860ff1a3cf65e851568f6ad6ffce0237af6833c5087" + end + + head do + url "https://gitlab.freedesktop.org/xorg/lib/libxcb-image.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libxcb" + depends_on "xcb-util" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkg-config --cflags xcb-image") + end +end diff --git a/Formula/x/xcb-util-keysyms.rb b/Formula/x/xcb-util-keysyms.rb new file mode 100644 index 0000000000000..62128c4da7bf2 --- /dev/null +++ b/Formula/x/xcb-util-keysyms.rb @@ -0,0 +1,50 @@ +class XcbUtilKeysyms < Formula + desc "Standard X constants and conversion to/from keycodes" + homepage "https://xcb.freedesktop.org" + url "https://xcb.freedesktop.org/dist/xcb-util-keysyms-0.4.1.tar.gz" + sha256 "1fa21c0cea3060caee7612b6577c1730da470b88cbdf846fa4e3e0ff78948e54" + license "X11" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "53daefbc9047587b5a2f2e41bd1ef7381593ee69e66193d4464041f45fe24429" + sha256 cellar: :any, arm64_sequoia: "bf1324e90b7abdb41f7a6dfa41ce477627ad5d069a09dcfeb51491c5a559b274" + sha256 cellar: :any, arm64_sonoma: "71f2367c5777c07deb7cf6edda8a7b7a0d9bf162a467b8ae930c2ad0cdb6c450" + sha256 cellar: :any, arm64_ventura: "4d62cd700f85b3ba39740bd2dd9872d45aef018e603db2907f9bd1c3e6213d88" + sha256 cellar: :any, arm64_monterey: "8f81bf9c5f646f94ab25dfc84953ae28fc166316263eea913b00cf9e569d455a" + sha256 cellar: :any, arm64_big_sur: "fab1de02f3c8f6ca3b93921678f2c5c7317f230b05b27790b805d8e2585a1901" + sha256 cellar: :any, sonoma: "bbbd83881b3b35058415b32a952b4124e11dcfc48e6a6680920efef22c07fd36" + sha256 cellar: :any, ventura: "1d54ce19d60722d3b41fe752c4703876c8a17fa62d1be1d8840c8a943374afd7" + sha256 cellar: :any, monterey: "246f9361f2802f7dac2fdc20c762c2cb50a86c0393b519529b52201e69fff053" + sha256 cellar: :any, big_sur: "0e25691158d5d28c473634d285e0fbb7ae59eeca5ec55305ea814536e03cd069" + sha256 cellar: :any, catalina: "9b08f8c1ee577cea420903ab5593ed8367eedd92da4cddc0d4c6ef2235dd7c76" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bd06b66ac056a9d7defd40425046fd621bcc86d1b1a7ee73a6f5ada247f17df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "269947922f6128006e0201a6972c1cf622dc93200268c0dfa5801b8899902c35" + end + + head do + url "https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libxcb" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkg-config --cflags xcb-keysyms") + end +end diff --git a/Formula/x/xcb-util-renderutil.rb b/Formula/x/xcb-util-renderutil.rb new file mode 100644 index 0000000000000..3128798fefec5 --- /dev/null +++ b/Formula/x/xcb-util-renderutil.rb @@ -0,0 +1,50 @@ +class XcbUtilRenderutil < Formula + desc "Convenience functions for the X Render extension" + homepage "https://xcb.freedesktop.org" + url "https://xcb.freedesktop.org/dist/xcb-util-renderutil-0.3.10.tar.gz" + sha256 "e04143c48e1644c5e074243fa293d88f99005b3c50d1d54358954404e635128a" + license all_of: ["X11", "HPND-sell-variant"] + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4f0545144b6e7c459497ebb586c522a1d3b3b5eef1160987fbe5b45e275a026c" + sha256 cellar: :any, arm64_sequoia: "098b22877ee1d5c2c16b1827117f13f95566c1bf06d042943170c6590a06e379" + sha256 cellar: :any, arm64_sonoma: "f2533358b260aa2fb9f819e75a259123791bb4838b2bd1a2986f756e248c3109" + sha256 cellar: :any, arm64_ventura: "2ed461a699bf32016f2a95f313ed16c492dfedd98249dd86b2b6e558374fb0ae" + sha256 cellar: :any, arm64_monterey: "295e5e58b68d75ee1938c78dda67904e0ba42ed6173357ea357f22140069b7dd" + sha256 cellar: :any, arm64_big_sur: "e9b427a9928e8cf63481ecb3a3d1bbc9ac4091df0229c6bfde4735a723e0e073" + sha256 cellar: :any, sonoma: "e774fa85f56ee12251edbf29a61b54f4d82715939b8fb9127b62a134cdd1f1be" + sha256 cellar: :any, ventura: "825d17209bb9384ae1f65cf1e909653151e2ba290c39a4ca20021f6a732133ef" + sha256 cellar: :any, monterey: "2f416f529c5764d88b98ea0c29d1afad765affb466aa69e465d998b7bd042fba" + sha256 cellar: :any, big_sur: "3a61dcebbe56e1dcff526e7ea2fe39007bf8bc1b40900f230ab4d3d318e40211" + sha256 cellar: :any, catalina: "444c4008a4d37a2a687b13316302e1fc67a1794f9bcb83f91d23e9e4ba532ad8" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e290a280c48d596dd1946a5d3d8670ce85b6d24ecdd565d2c46106fdaa8128f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9de153c6d1351a146e6cd98c7b8b0b5dddc413dbbc5baa739d3310813186839d" + end + + head do + url "https://gitlab.freedesktop.org/xorg/lib/libxcb-render-util.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libxcb" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkg-config --cflags xcb-renderutil") + end +end diff --git a/Formula/x/xcb-util-wm.rb b/Formula/x/xcb-util-wm.rb new file mode 100644 index 0000000000000..4c9b7eade03fd --- /dev/null +++ b/Formula/x/xcb-util-wm.rb @@ -0,0 +1,53 @@ +class XcbUtilWm < Formula + desc "Client and window-manager helpers for EWMH and ICCCM" + homepage "https://xcb.freedesktop.org" + url "https://xcb.freedesktop.org/dist/xcb-util-wm-0.4.2.tar.gz" + sha256 "dcecaaa535802fd57c84cceeff50c64efe7f2326bf752e16d2b77945649c8cd7" + license "X11" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "e0dff8d281d331ac4088b195cef01ccd933f8f6c655452e3825c0a18f7be97fa" + sha256 cellar: :any, arm64_sequoia: "78b8c05d6a387da472f24f9b4fa8a60eb3c1815a2b013a5cd9c379d54362f058" + sha256 cellar: :any, arm64_sonoma: "f2e885b4eefb54d3e9b5f2d4a8dbf4fd93141e8b3c12fbcaa99b318a3dfdad1e" + sha256 cellar: :any, arm64_ventura: "e8b4f5a806743173240d8259ac7f8ac502e945df8f9269aa40d5f35fc2140291" + sha256 cellar: :any, arm64_monterey: "1774d0e39c97fc328e73411c8ad083d1bc0592576c427c2f6cea4ae9f1f7ba1b" + sha256 cellar: :any, arm64_big_sur: "92ea8e6f41fca2b1bf1a4e25783a0c1cf45e93f3ce99e4bffa078f9ef54b81d4" + sha256 cellar: :any, sonoma: "b489feeec0cf557cb44928ca8e805b7c25a86754dde295abc9795108b17d800c" + sha256 cellar: :any, ventura: "7526c01904f1a9a658e1ec38f1ecc3d20c14e8a164e5ce891fe9f0b5df5d93d4" + sha256 cellar: :any, monterey: "a6cd012acf4ff3199b3866e93c3b930e399f33eea2a5e49220f4214c31e8d15f" + sha256 cellar: :any, big_sur: "7bad0c4c7883daaba35df770a5a544d935d6531292c02a6df2c956ef3e8a2b42" + sha256 cellar: :any, catalina: "aa6fc4ef555883fac180c46b4e6d5e03096bd9369640fbe8f6ec8fa9f63c70c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "f11f34a4be29819b423e16998acd71c598b901090252da96b7d7a6b554edb9bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1045d2418ab117484c0645ced40c1c7dfe9751443b56e1fdff639a2591732acb" + end + + head do + url "https://gitlab.freedesktop.org/xorg/lib/libxcb-wm.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libxcb" + + uses_from_macos "m4" => :build + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkg-config --cflags xcb-ewmh") + assert_match "-I#{include}", shell_output("pkg-config --cflags xcb-icccm") + end +end diff --git a/Formula/x/xcb-util.rb b/Formula/x/xcb-util.rb new file mode 100644 index 0000000000000..0dfb686f3421f --- /dev/null +++ b/Formula/x/xcb-util.rb @@ -0,0 +1,43 @@ +class XcbUtil < Formula + desc "Additional extensions to the XCB library" + homepage "https://xcb.freedesktop.org" + url "https://xcb.freedesktop.org/dist/xcb-util-0.4.1.tar.xz" + sha256 "5abe3bbbd8e54f0fa3ec945291b7e8fa8cfd3cccc43718f8758430f94126e512" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "325a22ce66ff9fd565932b080bdb02e5bdbafd6240e5664fb8a22c1ee87b29ff" + sha256 cellar: :any, arm64_sequoia: "f23b606bbe08c4b9fc5ce87f19db91cec6fc152298157af1632cb109f669a83b" + sha256 cellar: :any, arm64_sonoma: "f29e26409668f49cdebd9f07f926deb60775d4d937ad688ea1676b138e2ac3ec" + sha256 cellar: :any, arm64_ventura: "9ccd3441ee24d90d2f4d8d62cf74d6d8bb0879b60d7b56b325b72ae0854459ee" + sha256 cellar: :any, arm64_monterey: "215d383f16158649c221e28f4c4d3c1ceac50c38ec36acad63dcb95a8ae76373" + sha256 cellar: :any, arm64_big_sur: "8052d4df2e15613046722b788d9e4665a9886974e9fc4cc20a6c740ff8e2d08f" + sha256 cellar: :any, sonoma: "d51d1ab192eeb49eb7a333fdf1b34b20a5f35059b0436d2d664683a732ae3776" + sha256 cellar: :any, ventura: "d075d423178430bc500bf16be08e20b20a06ae6a24ba581cd105a3b078af6d18" + sha256 cellar: :any, monterey: "57035a7c42a40246ea3d5ac12906e2832a4ea0aded7000b977a9d6b581e8b5b0" + sha256 cellar: :any, big_sur: "f42650c534ec07d5c17e612ae9f738c46ddf9fba07623eacbf28865a93eb65df" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9f845b0c76c96c28ae201d82574694cd56ce41f3b4244a4ca6cb369b5c43d06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2808f955e6ac8cb3d1262e4a01b589c5148b125eec6c57a6ccf02902cf01b182" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libxcb" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkg-config --cflags xcb-util").chomp + end +end diff --git a/Formula/x/xcbeautify.rb b/Formula/x/xcbeautify.rb new file mode 100644 index 0000000000000..6a77d620395fa --- /dev/null +++ b/Formula/x/xcbeautify.rb @@ -0,0 +1,45 @@ +class Xcbeautify < Formula + desc "Little beautifier tool for xcodebuild" + homepage "https://github.com/cpisciotta/xcbeautify" + url "https://github.com/cpisciotta/xcbeautify/archive/refs/tags/3.1.0.tar.gz" + sha256 "3b96197098efc79a855f8f5950bc25142f3fe4e561e15f311fc018479f90d5ee" + license "MIT" + head "https://github.com/cpisciotta/xcbeautify.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "079fe5b9f9bc7f06751790e7deba241128bf638a315ac0061a4024e5da2def8d" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91eed8c305ebe1dca3edf8946657efef481f315932a84bdaf6aa1bd3e534d13c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a1ee2ce174564e663ed57ef161598d5707a3edc3ad219d1235e5b75c9d6b50f3" + sha256 cellar: :any_skip_relocation, sonoma: "189bd8c5bca42521c18d210ae848b37db7a5515955434dd0480d04ff9677d7e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3c2750a7b5034492b496c59b9364bc22420447f1041e1e574bfda302824d0fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "581fb133f3b7c65089cb77730e59fbc79bedd8594d51d3db1f41623c7488b003" + end + + # needs Swift tools version 6.1.0 + uses_from_macos "swift" => :build, since: :sequoia + uses_from_macos "libxml2" + + def install + if OS.mac? + args = %w[--disable-sandbox] + else + libxml2_lib = Formula["libxml2"].opt_lib + args = %W[ + --static-swift-stdlib + -Xlinker -L#{libxml2_lib} + ] + ENV.prepend_path "LD_LIBRARY_PATH", libxml2_lib + end + system "swift", "build", *args, "--configuration", "release" + bin.install ".build/release/xcbeautify" + generate_completions_from_executable(bin/"xcbeautify", "--generate-completion-script") + end + + test do + log = "CompileStoryboard /Users/admin/MyApp/MyApp/Main.storyboard (in target: MyApp)" + assert_match "[MyApp] Compiling Main.storyboard", + pipe_output("#{bin}/xcbeautify --disable-colored-output", log).chomp + assert_match version.to_s, + shell_output("#{bin}/xcbeautify --version").chomp + end +end diff --git a/Formula/x/xcdiff.rb b/Formula/x/xcdiff.rb new file mode 100644 index 0000000000000..f55d9fee8e6c5 --- /dev/null +++ b/Formula/x/xcdiff.rb @@ -0,0 +1,47 @@ +class Xcdiff < Formula + desc "Tool to diff xcodeproj files" + homepage "https://github.com/bloomberg/xcdiff" + url "https://github.com/bloomberg/xcdiff.git", + tag: "0.14.0", + revision: "c2b9cab9f85fe1f1e96ce51d3678f565d3aa8c96" + license "Apache-2.0" + head "https://github.com/bloomberg/xcdiff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "45974f7dfe74e248ed515fdb45601a02b49dfc321fd1efe77d7776bc2e8116b7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8706d53ae848bb3c00fce56616e28bfb919c1ac9ae168801bf534730514bfd0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0940788f0145652c0abd75ff03e072da9e4bab46db07582e507c0d40f4616bca" + sha256 cellar: :any, arm64_ventura: "0b0365e447f7d64621488112f3d880b54a7847a895ceb5fe021b67e6a4502a45" + sha256 cellar: :any_skip_relocation, sonoma: "26fb6391a35202291acd4f0efa394b943934863bda1f1fdb948c570b3fd017ab" + sha256 cellar: :any, ventura: "9e9bb668faa2c46294c7bc18b2287adc1e1a48adf81a8c41cad869d6ca023949" + end + + depends_on :macos + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + + def install + system "make", "update_version" + system "make", "update_hash" + system "swift", "build", "--disable-sandbox", "--configuration", "release" + bin.install ".build/release/xcdiff" + generate_completions_from_executable(bin/"xcdiff", "--generate-completion-script") + end + + test do + resource "homebrew-testdata" do + url "https://github.com/bloomberg/xcdiff/archive/refs/tags/0.10.0.tar.gz" + sha256 "c093e128873f1bb2605b14bf9100c5ad7855be17b14f2cad36668153110b1265" + end + + assert_match version.to_s, shell_output("#{bin}/xcdiff --version").chomp + project = "Fixtures/ios_project_1/Project.xcodeproj" + diff_args = "-p1 #{project} -p2 #{project}" + resource("homebrew-testdata").stage do + # assert no difference between projects + assert_equal "\n", shell_output("#{bin}/xcdiff #{diff_args} -d") + out = shell_output("#{bin}/xcdiff #{diff_args} -g BUILD_PHASES -t Project -v") + assert_match "✅ BUILD_PHASES > \"Project\" target\n", out + end + end +end diff --git a/Formula/x/xcenv.rb b/Formula/x/xcenv.rb new file mode 100644 index 0000000000000..5ded395e71f57 --- /dev/null +++ b/Formula/x/xcenv.rb @@ -0,0 +1,25 @@ +class Xcenv < Formula + desc "Xcode version manager" + homepage "https://github.com/xcenv/xcenv" + url "https://github.com/xcenv/xcenv/archive/refs/tags/v1.2.0.tar.gz" + sha256 "bbb47394f9edbdabba886e5ca0155f0ef6aeae07b8a7564c652c8e260fac6d9f" + license "MIT" + head "https://github.com/xcenv/xcenv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "65bfc4db841df3001acc419d3d784768a955462fe78faa85c7674132aeb78bb4" + end + + depends_on :macos + + def install + prefix.install ["bin", "libexec"] + end + + test do + shell_output("eval \"$(#{bin}/xcenv init -)\" && xcenv versions") + end +end diff --git a/Formula/x/xcinfo.rb b/Formula/x/xcinfo.rb new file mode 100644 index 0000000000000..3abcab114c2a0 --- /dev/null +++ b/Formula/x/xcinfo.rb @@ -0,0 +1,37 @@ +class Xcinfo < Formula + desc "Tool to get information about and install available Xcode versions" + homepage "https://github.com/xcodereleases/xcinfo" + license "MIT" + head "https://github.com/xcodereleases/xcinfo.git", branch: "master" + + stable do + # TODO: Remove maximum_macos on the next release and update license + url "https://github.com/xcodereleases/xcinfo/archive/refs/tags/1.0.3.tar.gz" + sha256 "b22f56193e4de8b71bbdaf99c17cec03f291d333d095311ad7aab74b5fb50c5a" + depends_on maximum_macos: [:sonoma, :build] + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3df6418afc61ae23e1f303b405cdf6c24dff3a0fed304e1a0a7ba9e59be44e84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f8d2172793446ab5a5a0e67c2257a6e7037223c9321e0f1db04dec6c84d16ac" + sha256 cellar: :any_skip_relocation, sonoma: "209fabe73333978156fc9bf344645a62b1eaeaa5c9fa872ce52993f4b1717533" + sha256 cellar: :any_skip_relocation, ventura: "f3b5b7c1fa92151ca33febdc63092f6af054f3c8bd7f9b5fb668157bf139b19d" + end + + depends_on xcode: ["14.2", :build] + depends_on macos: :ventura + depends_on :macos + + def install + system "swift", "build", + "--configuration", "release", + "--disable-sandbox" + bin.install ".build/release/xcinfo" + end + + test do + assert_match "12.3 RC 1 (12C33)", shell_output("#{bin}/xcinfo list --all --no-ansi") + end +end diff --git a/Formula/x/xclip.rb b/Formula/x/xclip.rb new file mode 100644 index 0000000000000..ed9e0e6389959 --- /dev/null +++ b/Formula/x/xclip.rb @@ -0,0 +1,41 @@ +class Xclip < Formula + desc "Access X11 clipboards from the command-line" + homepage "https://github.com/astrand/xclip" + url "https://github.com/astrand/xclip/archive/refs/tags/0.13.tar.gz" + sha256 "ca5b8804e3c910a66423a882d79bf3c9450b875ac8528791fb60ec9de667f758" + license "GPL-2.0-or-later" + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d3179fb90856af5401a1104cf9317c4f6da846e0bb54781d43b1b24f2518c8c7" + sha256 cellar: :any, arm64_sequoia: "74cc7bc3e57ae35a2f0a1880ece87d5b3e10b25e11a898f7684defbfac3d4a37" + sha256 cellar: :any, arm64_sonoma: "c6bd5e4a94069253d31ed2ccbdb50ae870148ee2b48dc8d2d09e0ade83721c70" + sha256 cellar: :any, arm64_ventura: "e335771d3bb8f072b25c2cf6404f12540cfbd8692d97cd678a086a08b76f2771" + sha256 cellar: :any, arm64_monterey: "ebf047556b2d594089b26ea72250eb9ea3c4a4c1f779642e08d1cfd0d131f631" + sha256 cellar: :any, arm64_big_sur: "2a9e42621fbc329856454f299e2da20b8776de9136cf1233a97ec4662ef2b5fe" + sha256 cellar: :any, sonoma: "f0b19adc2c73932facc1b1ad253546c88466ad5e04e0dea7fbe37901d9d03a1f" + sha256 cellar: :any, ventura: "b1641761e78f6f9ca7d89ca8999e8ad04b2116ca28cee87d0f1d609b50fce4b5" + sha256 cellar: :any, monterey: "47b1812c7d1e2aa7f70f2721693b3e2ddb89761886e4432009240d4349369da0" + sha256 cellar: :any, big_sur: "4b3d034f8770dd75585b98910ce1ad1c0bbe010f91f61c814f9b655cc978e122" + sha256 cellar: :any, catalina: "2229de2d3139a5a916be1d7e6c3227ef989ff20ce4322f0881eaeb22ee34caf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "5df75814f42bb4834946dc46d5a8c2f50366ec3f1d96251ebd0deedc9d320803" + sha256 cellar: :any_skip_relocation, x86_64_linux: "532e6b67cb0b23908b5c0d4df6157810fdb4ce8c7268e289df9cce2578230f21" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libx11" + depends_on "libxmu" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"xclip", "-version" + end +end diff --git a/Formula/x/xclogparser.rb b/Formula/x/xclogparser.rb new file mode 100644 index 0000000000000..2e8c8960ef347 --- /dev/null +++ b/Formula/x/xclogparser.rb @@ -0,0 +1,91 @@ +class Xclogparser < Formula + desc "Tool to parse the SLF serialization format used by Xcode" + homepage "https://github.com/MobileNativeFoundation/XCLogParser" + url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.42.tar.gz" + sha256 "38f02fc3359b557b4eddb1bd0c12e063858bad19f65171a50c61d7b393b9ec17" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf0a53497d81f86bcc4e8d75452886563da61dcf6e6e93a678675f3d401bdce6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "622e5798fe8768788e485edcedfec11f6e0fd57e9afbb38e2704d115ff89286b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f12e89a162b46b953fe975af664deb83e59bb554a8b8661bc0390bc0870d778" + sha256 cellar: :any_skip_relocation, arm64_ventura: "64bddc1054c263b9a69055fd4f6979af194928fc8c2da52d6e5a26aa1d29ca88" + sha256 cellar: :any_skip_relocation, sonoma: "6449046ee960ec4033bb7ea5d021d25967c6a494bfa4d8fccd8e236c748ca0ec" + sha256 cellar: :any_skip_relocation, ventura: "2912ff1525c5e8ecd29fc66c01ea0b0b792e8550b56089d014364351a1dbe3c7" + sha256 arm64_linux: "958f12eaebc195dce784e46c2518e9d71918476f20caefe2928c0b4b2ffaed09" + sha256 x86_64_linux: "1a636c81a4dccdf9f84f74eff4abda9baf5da3e3bbd660e961f39a9b1f932a45" + end + + depends_on xcode: "13.0" + + uses_from_macos "swift" + uses_from_macos "zlib" + + # patch to use linuxbrew zlib, upstream pr ref, https://github.com/1024jp/GzipSwift/pull/71 + on_linux do + patch :DATA + end + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "--configuration", "release" + bin.install ".build/release/xclogparser" + generate_completions_from_executable(bin/"xclogparser", "--generate-completion-script") + end + + test do + assert_match version.to_s, shell_output("#{bin}/xclogparser version") + + # skip tests for linux build and sequoia macos build due to the test file issue + return if OS.linux? || (OS.mac? && MacOS.version == :sequoia) + + resource "homebrew-test_log" do + url "https://github.com/chenrui333/github-action-test/releases/download/2024.04.14/test.xcactivitylog" + sha256 "3ac25e3160e867cc2f4bdeb06043ff951d8f54418d877a9dd7ad858c09cfa017" + end + + resource("homebrew-test_log").stage(testpath) + output = shell_output("#{bin}/xclogparser dump --file #{testpath}/test.xcactivitylog") + assert_match "Target 'helloworldTests' in project 'helloworld'", output + end +end + +__END__ +diff --git a/Package.resolved b/Package.resolved +index 900fb44..cc4b2bc 100644 +--- a/Package.resolved ++++ b/Package.resolved +@@ -11,12 +11,12 @@ + } + }, + { +- "package": "Gzip", ++ "package": "GzipSwift", + "repositoryURL": "https://github.com/1024jp/GzipSwift", + "state": { + "branch": null, +- "revision": "ba0b6cb51cc6202f896e469b87d2889a46b10d1b", +- "version": "5.1.1" ++ "revision": "29f62534648e6334678b6d7b14c6f7e618715944", ++ "version": null + } + }, + { +diff --git a/Package.swift b/Package.swift +index 98f46e7..068b3db 100644 +--- a/Package.swift ++++ b/Package.swift +@@ -11,7 +11,7 @@ let package = Package( + .library(name: "XCLogParser", targets: ["XCLogParser"]) + ], + dependencies: [ +- .package(url: "https://github.com/1024jp/GzipSwift", from: "5.1.0"), ++ .package(url: "https://github.com/1024jp/GzipSwift", revision: "29f62534648e6334678b6d7b14c6f7e618715944"), + .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .exact("1.3.3")), + .package(url: "https://github.com/kylef/PathKit.git", from: "1.0.1"), + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.0"), diff --git a/Formula/x/xcode-build-server.rb b/Formula/x/xcode-build-server.rb new file mode 100644 index 0000000000000..895a811436393 --- /dev/null +++ b/Formula/x/xcode-build-server.rb @@ -0,0 +1,32 @@ +class XcodeBuildServer < Formula + include Language::Python::Shebang + + desc "Build server protocol implementation for integrating Xcode with sourcekit-lsp" + homepage "https://github.com/SolaWing/xcode-build-server" + url "https://github.com/SolaWing/xcode-build-server/archive/refs/tags/v1.2.0.tar.gz" + sha256 "dc2a7019e00ff0d2b0d8c2761900395b39fb69543b9278285d2e85bd57382531" + license "MIT" + head "https://github.com/SolaWing/xcode-build-server.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "3ac127101dc6e3887a1d9baebf97452cf19b129c4ab75667c16719484fd38a37" + end + + depends_on "gzip" + depends_on :macos + + uses_from_macos "python" + + def install + libexec.install Dir["*"] + + rewrite_shebang detected_python_shebang(use_python_from_path: true), libexec/"xcode-build-server" + bin.install_symlink libexec/"xcode-build-server" + end + + test do + system bin/"xcode-build-server", "--help" + end +end diff --git a/Formula/x/xcode-kotlin.rb b/Formula/x/xcode-kotlin.rb new file mode 100644 index 0000000000000..91b7a3222dd7f --- /dev/null +++ b/Formula/x/xcode-kotlin.rb @@ -0,0 +1,39 @@ +class XcodeKotlin < Formula + desc "Kotlin Native Xcode Plugin" + homepage "https://github.com/touchlab/xcode-kotlin" + url "https://github.com/touchlab/xcode-kotlin/archive/refs/tags/2.2.1.tar.gz" + sha256 "3789d886022509cb232616679835a7dd67e4adb4983a24f1ce268aa244978aa8" + license "Apache-2.0" + head "https://github.com/touchlab/xcode-kotlin.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c8432e2d622a06bacb457053e063480f63879c3e73abf22fe40b3114291ad881" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d3b032937ee2f5e72a80cff85d9bb0b257178e6498b050f3f45919910c7bc77" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e21566ddcf5a53e5f3320fe660a0b6c67d70a6ed3e6fc5ca82b72087ed80d7db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "693d8c42c635a9560ceb4ca9e6a9512123fbada905b3068deef8e38f4340a355" + sha256 cellar: :any_skip_relocation, sonoma: "95af928c785a49d772eef8755d4854e7a89f5f8179a65dd0a5b2e512c63d0eb6" + sha256 cellar: :any_skip_relocation, ventura: "2386514c4fbb8166b6e9ed4f016abecef6a69a8684ad84d890db0f9b66b36021" + end + + depends_on "gradle" => :build + depends_on xcode: ["12.5", :build] + depends_on :macos + + def install + suffix = Hardware::CPU.intel? ? "X64" : "Arm64" + system "gradle", "--no-daemon", "linkReleaseExecutableMacos#{suffix}", "preparePlugin" + bin.install "build/bin/macos#{suffix}/releaseExecutable/xcode-kotlin.kexe" => "xcode-kotlin" + share.install Dir["build/share/*"] + end + + test do + output = shell_output("#{bin}/xcode-kotlin info --only") + assert_match(/Bundled plugin version:\s*#{version}/, output) + assert_match(/Installed plugin version:\s*(?:(?:\d+)\.(?:\d+)\.(?:\d+)|none)/, output) + assert_match(/Language spec installed:\s*(?:Yes|No)/, output) + assert_match(/LLDB init installed:\s*(?:Yes|No)/, output) + assert_match(/LLDB Xcode init sources main LLDB init:\s*(?:Yes|No)/, output) + end +end diff --git a/Formula/x/xcodegen.rb b/Formula/x/xcodegen.rb new file mode 100644 index 0000000000000..9f7b70128e613 --- /dev/null +++ b/Formula/x/xcodegen.rb @@ -0,0 +1,46 @@ +class Xcodegen < Formula + desc "Generate your Xcode project from a spec file and your folder structure" + homepage "https://github.com/yonaskolb/XcodeGen" + url "https://github.com/yonaskolb/XcodeGen/archive/refs/tags/2.44.1.tar.gz" + sha256 "995e2251345d9cef46a027351a3b86a92ceea81702449eb03e1aafa45869133d" + license "MIT" + head "https://github.com/yonaskolb/XcodeGen.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "50d0730465d1f56f1ab931ba18e213b2d906a4bc16024fc697f32a8e28249fbe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "840226c324d2dccfd94794908bf80e34afbfdce0a014e69b4cefd42671f310a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb57b2b779fdab389d7c8975749bbaab6cecd75227b8bd45d6c6f8121b953fd6" + sha256 cellar: :any_skip_relocation, sonoma: "02995cc931f1364127444756c9a34c75ca3f1d7a6e949ab6a1b3c44fe057e981" + end + + depends_on xcode: ["15.3", :build] + depends_on :macos + + uses_from_macos "swift" + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/#{name}" + pkgshare.install "SettingPresets" + end + + test do + (testpath/"xcodegen.yml").write <<~YAML + name: GeneratedProject + options: + bundleIdPrefix: com.project + targets: + TestProject: + type: application + platform: iOS + sources: TestProject + YAML + (testpath/"TestProject").mkpath + system bin/"xcodegen", "--spec", testpath/"xcodegen.yml" + assert_path_exists testpath/"GeneratedProject.xcodeproj" + assert_path_exists testpath/"GeneratedProject.xcodeproj/project.pbxproj" + output = (testpath/"GeneratedProject.xcodeproj/project.pbxproj").read + assert_match "name = TestProject", output + assert_match "isa = PBXNativeTarget", output + end +end diff --git a/Formula/x/xcodes.rb b/Formula/x/xcodes.rb new file mode 100644 index 0000000000000..cb7f621728f00 --- /dev/null +++ b/Formula/x/xcodes.rb @@ -0,0 +1,32 @@ +class Xcodes < Formula + desc "Best command-line tool to install and switch between multiple versions of Xcode" + homepage "https://github.com/XcodesOrg/xcodes" + url "https://github.com/XcodesOrg/xcodes/archive/refs/tags/1.6.2.tar.gz" + sha256 "0c38a39ecd527d15c3343da9b9bc57c9f0d5217f4c9d36fc3879c3ae423b1295" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dfc27a53e26ae6745593dbf7acb43f6165ddf918cfa1a2bac73666f974c7ba3c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6f0d1d4136c44d6bce3a29a6161d91282397175b811d8346486ff281267106f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2cb68620e49151d770433566d23d52a2605a0b9783d0f957c9fa3deda6825cdf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "79aea527da63cec15cc7e775b1a380f446ac096b425915e281f8dee6ba60ac74" + sha256 cellar: :any_skip_relocation, sonoma: "147e32b89cab5d9e267170902e4a858b00fd45f0cb8b2f2b43ae98a5c3e3a1ae" + sha256 cellar: :any_skip_relocation, ventura: "c374aa5034bb5d66ec537b6096318472a9f49f584e4a727647c44962fb504183" + end + + depends_on xcode: ["13.3", :build] + depends_on :macos + uses_from_macos "swift" + + def install + system "swift", "build", "--disable-sandbox", "--configuration", "release" + bin.install ".build/release/xcodes" + generate_completions_from_executable(bin/"xcodes", "--generate-completion-script") + end + + test do + assert_match "1.0", shell_output("#{bin}/xcodes list") + end +end diff --git a/Formula/x/xcresultparser.rb b/Formula/x/xcresultparser.rb new file mode 100644 index 0000000000000..279b37ff83d26 --- /dev/null +++ b/Formula/x/xcresultparser.rb @@ -0,0 +1,34 @@ +class Xcresultparser < Formula + desc "Parse binary .xcresult bundles from Xcode builds and test runs" + homepage "https://github.com/a7ex/xcresultparser" + url "https://github.com/a7ex/xcresultparser/archive/refs/tags/1.9.3.tar.gz" + sha256 "7573d3554ea0d73deb8b13e5b524a70be3f5fa43a9cc4f3aea52c3927020a533" + license "MIT" + head "https://github.com/a7ex/xcresultparser.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2c528dc057085d48aee2dddb4cc81d0486e18576528c50a4937334b1f564c2d7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b81e88a15fa6ee3fc68959d08f377c52a482ba062d5b675cbd4671e7c22a583" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "90f6d67425d45cf32a369404ecf0f391116110d60f3cdd9fd748a4c63132bfe2" + sha256 cellar: :any_skip_relocation, sonoma: "83e8e7f6f38f764df196992c6096afec7185979abcc2e26ba53398e52441fc57" + end + + depends_on xcode: ["15.0", :build] + depends_on :macos + uses_from_macos "swift" + + def install + system "swift", "build", "--disable-sandbox", "--configuration", "release" + bin.install ".build/release/xcresultparser" + pkgshare.install "Tests/XcresultparserTests/TestAssets/test.xcresult" + generate_completions_from_executable(bin/"xcresultparser", "--generate-completion-script") + end + + test do + assert_match version.to_s, shell_output("#{bin}/xcresultparser -v") + + cp_r pkgshare/"test.xcresult", testpath + assert_match "Number of failed tests = 1", + shell_output("#{bin}/xcresultparser #{testpath}/test.xcresult") + end +end diff --git a/Formula/x/xctesthtmlreport.rb b/Formula/x/xctesthtmlreport.rb new file mode 100644 index 0000000000000..ecc246662ca63 --- /dev/null +++ b/Formula/x/xctesthtmlreport.rb @@ -0,0 +1,40 @@ +class Xctesthtmlreport < Formula + desc "Xcode-like HTML report for Unit and UI Tests" + homepage "https://github.com/XCTestHTMLReport/XCTestHTMLReport" + url "https://github.com/XCTestHTMLReport/XCTestHTMLReport/archive/refs/tags/2.5.1.tar.gz" + sha256 "8d5a35bb8eccd8eb49f923c8169e46dc3a669aa274bbdb75cc92d97ae1e76b36" + license "MIT" + head "https://github.com/XCTestHTMLReport/XCTestHTMLReport.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "6e248b63e1d364801b27aea0d7a709b36d36f56567de68797d21e18c2b072042" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a6befa1b9ad7d3002a8f90f25c0387d6fd95b03f923891d29a759d3ae0119a81" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3580d4f15dd4fa8865db0f53ed950dfcab35f55070a3888fce5563d2d1a3e139" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9137f28799e7c82a8f3f6662dd1196c7ceadd780ab6acf2223cddf99de3b6d2b" + sha256 cellar: :any_skip_relocation, sonoma: "79a84112939771f88b58c8f7ef61c7689716ae29bde3bc07061d458b6974b322" + sha256 cellar: :any_skip_relocation, ventura: "03127ae2494f3dcbf1af0c87578aeb1e4fe4a0d04df39262db4b868dbf5754c6" + end + + depends_on :macos + depends_on xcode: "14.0" + uses_from_macos "swift" + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/xchtmlreport" + generate_completions_from_executable(bin/"xchtmlreport", "--generate-completion-script") + end + + test do + resource "homebrew-testdata" do + url "https://pub-0b56a3a43f5b4adc91c743afc384fe1a.r2.dev/SanityResults.xcresult.tar.gz" + sha256 "e04a42a99dc05910aa31e6819016e5a481553d27d0dde121840f36fdb58e57b7" + end + + resource("homebrew-testdata").stage("SanityResult.xcresult") + # It will generate an index.html file + system bin/"xchtmlreport", "-r", "SanityResult.xcresult" + assert_path_exists testpath/"index.html" + end +end diff --git a/Formula/x/xcv.rb b/Formula/x/xcv.rb new file mode 100644 index 0000000000000..e94d6aef847aa --- /dev/null +++ b/Formula/x/xcv.rb @@ -0,0 +1,23 @@ +class Xcv < Formula + desc "Cut, copy and paste files with Bash" + homepage "https://github.com/busterc/xcv" + url "https://github.com/busterc/xcv/archive/refs/tags/v1.0.1.tar.gz" + sha256 "f2898f78bb05f4334073adb8cdb36de0f91869636a7770c8e955cee8758c0644" + license "ISC" + head "https://github.com/busterc/xcv.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d9e0dfc790cbc0a90240e2964f439260ea656a826d7688730bd9c304232e733d" + end + + def install + bin.install "xcv" + end + + test do + system bin/"xcv" + end +end diff --git a/Formula/x/xdelta.rb b/Formula/x/xdelta.rb new file mode 100644 index 0000000000000..8d38745ab22c4 --- /dev/null +++ b/Formula/x/xdelta.rb @@ -0,0 +1,42 @@ +class Xdelta < Formula + desc "Binary diff, differential compression tools" + homepage "https://github.com/jmacd/xdelta" + url "https://github.com/jmacd/xdelta/archive/refs/tags/v3.1.0.tar.gz" + sha256 "7515cf5378fca287a57f4e2fee1094aabc79569cfe60d91e06021a8fd7bae29d" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ee37900b3dc66de43cbffbd9fc486d9532f519cf36a10c66a198c64ae7a94e07" + sha256 cellar: :any, arm64_sequoia: "2a4d522dbb3bd2fb960b11396eb6f2f2cb5525acab75a5fc949676b261c8468b" + sha256 cellar: :any, arm64_sonoma: "aa71b9bbaa25a30a189c6f2c1772f3cbe44146eae104a830e5fee0d544a56d79" + sha256 cellar: :any, arm64_ventura: "63a96424b3e3b7c2c501fdb0b10ae2847cec321daeda40e0bfc1c4125cafd22a" + sha256 cellar: :any, arm64_monterey: "18018770f5aec11098c6a02b6a88eb7db07edffb5e04d947b3e82de41925af8a" + sha256 cellar: :any, arm64_big_sur: "4bf8a2d96c0ee4e20beafd81762a80e21bbb9fe400796e02392cb18777f0c6a9" + sha256 cellar: :any, sonoma: "cab53d9abbfb5e25e8401c04b68402f5678f0dbd731cee77aa089203768adbc2" + sha256 cellar: :any, ventura: "84d6c37a23ea9ad421cb934be9b559351beffc348ad56a1395ca4e514934c205" + sha256 cellar: :any, monterey: "cead50bfce3fa3e6dba28a28804b2741748f30f1baafd1bf3fe192bb4d34e6c2" + sha256 cellar: :any, big_sur: "98fa35dfab2175bb199d3878788734096430e118f3f17cdde9c74ea99af62538" + sha256 cellar: :any, catalina: "5b5eae08cf9d1d5e37dc42f0d557670477bae10adf28278bbb4f88ec83a5a2c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "07505153f0433a184f123e5f0d9468511854f2fc10b811bc45cf9628b9da14d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4015bbc1061c1ac1ba9b56e9465b2b18bd22f1557e79651f1cf9feaf5e37c486" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "xz" + + def install + cd "xdelta3" do + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-liblzma", *std_configure_args + system "make", "install" + end + end + + test do + system bin/"xdelta3", "config" + end +end diff --git a/Formula/x/xdg-ninja.rb b/Formula/x/xdg-ninja.rb new file mode 100644 index 0000000000000..0f283c49b44ef --- /dev/null +++ b/Formula/x/xdg-ninja.rb @@ -0,0 +1,30 @@ +class XdgNinja < Formula + desc "Check your $HOME for unwanted files and directories" + homepage "https://github.com/b3nj5m1n/xdg-ninja" + url "https://github.com/b3nj5m1n/xdg-ninja/archive/refs/tags/v0.2.0.2.tar.gz" + sha256 "6adfe289821b6b5e3778130e0d1fd1851398e3bce51ddeed6c73e3eddcb806c6" + license "MIT" + head "https://github.com/b3nj5m1n/xdg-ninja.git", branch: "main" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "1fe099d79ef105b5a0272c820ccc1c774807c554c3e5e3bf180205afa50703ec" + end + + depends_on "glow" + depends_on "jq" + + def install + pkgshare.install "programs/" + pkgshare.install "xdg-ninja.sh" => "xdg-ninja" + (bin/"xdg-ninja").write_env_script( + pkgshare/"xdg-ninja", + XN_PROGRAMS_DIR: "${XN_PROGRAMS_DIR:-#{pkgshare}/programs}", + ) + man1.install "man/xdg-ninja.1" + end + + test do + system bin/"xdg-ninja" + end +end diff --git a/Formula/x/xdot.rb b/Formula/x/xdot.rb new file mode 100644 index 0000000000000..24a6f96d702da --- /dev/null +++ b/Formula/x/xdot.rb @@ -0,0 +1,50 @@ +class Xdot < Formula + include Language::Python::Virtualenv + + desc "Interactive viewer for graphs written in Graphviz's dot language" + homepage "https://github.com/jrfonseca/xdot.py" + url "https://files.pythonhosted.org/packages/38/76/0503dddc3100e25135d1380f89cfa5d729b7d113a851804aa98dc4f19888/xdot-1.4.tar.gz" + sha256 "fb029dab92b3c188ad5479108014edccb6c7df54f689ce7f1bd1c699010b7781" + license "LGPL-3.0-or-later" + head "https://github.com/jrfonseca/xdot.py.git", branch: "main" + + no_autobump! because: "`update-python-resources` cannot determine dependencies" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "31da3f49cb2d321330f9caf9ead425cc46dfb18b4bb9b85b572a4b985131dfa9" + end + + depends_on "adwaita-icon-theme" + depends_on "graphviz" + depends_on "gtk+3" + depends_on "numpy" + depends_on "py3cairo" + depends_on "pygobject3" + depends_on "python@3.14" + + pypi_packages exclude_packages: ["numpy", "pygobject"], + extra_packages: "graphviz" + + resource "graphviz" do + url "https://files.pythonhosted.org/packages/fa/83/5a40d19b8347f017e417710907f824915fba411a9befd092e52746b63e9f/graphviz-0.20.3.zip" + sha256 "09d6bc81e6a9fa392e7ba52135a9d49f1ed62526f96499325930e87ca1b5925d" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + def install + virtualenv_install_with_resources + end + + test do + # Disable test on Linux because it fails with this error: + # Gtk couldn't be initialized. Use Gtk.init_check() if you want to handle this case. + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"xdot", "--help" + end +end diff --git a/Formula/x/xdotool.rb b/Formula/x/xdotool.rb new file mode 100644 index 0000000000000..b2c063656af67 --- /dev/null +++ b/Formula/x/xdotool.rb @@ -0,0 +1,61 @@ +class Xdotool < Formula + desc "Fake keyboard/mouse input and window management for X" + homepage "https://www.semicomplete.com/projects/xdotool/" + url "https://github.com/jordansissel/xdotool/releases/download/v3.20211022.1/xdotool-3.20211022.1.tar.gz" + sha256 "96f0facfde6d78eacad35b91b0f46fecd0b35e474c03e00e30da3fdd345f9ada" + license "BSD-3-Clause" + head "https://github.com/jordansissel/xdotool.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "bb7c865d434ca1bb3ec4f8967c7ae6877f6e352256e87d2bd4d65323359d5efb" + sha256 cellar: :any, arm64_sequoia: "53cc99835729d36906840e2c26f1229415781d2cad0d3119982468af1251ceb3" + sha256 cellar: :any, arm64_sonoma: "51bfd88ef26a8667eafaa54e8f3069ef96c283b453bdced7bbbf2921e35d89cf" + sha256 cellar: :any, arm64_ventura: "be8926b87350891af7a3434138a1971d988ab392f4ba73ec56565ac3a99184db" + sha256 cellar: :any, sonoma: "402a4980252ac8c70fbc2c50de00b1f094b70ba77922d9e2ac7a723e51882431" + sha256 cellar: :any, ventura: "fa28d8124531edd29ce76a708b4a73541a414129800321b21c5dd906d2a3dc27" + sha256 cellar: :any_skip_relocation, arm64_linux: "3618c884a204cfc5cf79b020941d59cf0e1eb6dc6e34290fbdadfcdbee4b8f3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e68d654dbff76e0681960e10fcc79139cbb39316d29bd5d920c95c6db9e89e3" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxkbcommon" + depends_on "libxtst" + + # Disable clock_gettime() workaround since the real API is available on macOS >= 10.12 + # Note that the PR from this patch was actually closed originally because of problems + # caused on pre-10.12 environments, but that is no longer a concern. + patch do + url "https://github.com/jordansissel/xdotool/commit/dffc9a1597bd96c522a2b71c20301f97c130b7a8.patch?full_index=1" + sha256 "447fa42ec274eb7488bb4aeeccfaaba0df5ae747f1a7d818191698035169a5ef" + end + + def install + # Work-around for build issue with Xcode 15.3 + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1500 + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "PREFIX=#{prefix}", "INSTALLMAN=#{man}", "install" + end + + def caveats + <<~EOS + You will probably want to enable XTEST in your X11 server now by running: + defaults write org.x.X11 enable_test_extensions -boolean true + + For the source of this useful hint: + https://stackoverflow.com/questions/1264210/does-mac-x11-have-the-xtest-extension + EOS + end + + test do + system bin/"xdotool", "--version" + end +end diff --git a/Formula/x/xdpyinfo.rb b/Formula/x/xdpyinfo.rb new file mode 100644 index 0000000000000..ee07d6366040f --- /dev/null +++ b/Formula/x/xdpyinfo.rb @@ -0,0 +1,43 @@ +class Xdpyinfo < Formula + desc "X.Org: Utility for displaying information about an X server" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/app/xdpyinfo-1.4.0.tar.xz" + sha256 "dc1de6e6e091ed46c4837b0ae9811e8182f7be0d2af638cab3e530ff081a48b6" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7fcb8183733daa8e2ef8e35810c377ff385422aca8b10d37d0c85adcf99c2f2f" + sha256 cellar: :any, arm64_sequoia: "79e093122b8553c8317273bdf277575d67e0293d9c483d3f87fca8b0abe53974" + sha256 cellar: :any, arm64_sonoma: "357e14ef300086891542206e948319a56440f052d4068ea1a886735745086e0d" + sha256 cellar: :any, arm64_ventura: "b36050b820cbc15b83fbbb34b59a3bca787f66acc1a8b2d9b14cd3cef0411379" + sha256 cellar: :any, sonoma: "7158d0c65b17a0b8aeb992070734e5739d1c9790d176a34a873cdb441aa60fad" + sha256 cellar: :any, ventura: "bfe63004977cd29e1da8b180ae2ef3542f60b5efb7ac208eda3840b48af8d30a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f29ec68f0bb272eb3e7da43584532558306edf67e933c19dc0dcc534226b17ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38be82e4609b9b2900c19ad01c9fa0353b8ef6e477eb93a0e113eaec2ead5141" + end + + depends_on "pkgconf" => :build + + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "libxi" + depends_on "libxtst" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + # xdpyinfo: unable to open display "". + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + assert_match("xdpyinfo #{version}", shell_output("DISPLAY= xdpyinfo -version")) + end +end diff --git a/Formula/x/xe.rb b/Formula/x/xe.rb new file mode 100644 index 0000000000000..37471c737097a --- /dev/null +++ b/Formula/x/xe.rb @@ -0,0 +1,34 @@ +class Xe < Formula + desc "Simple xargs and apply replacement" + homepage "https://github.com/leahneukirchen/xe" + url "https://github.com/leahneukirchen/xe/archive/refs/tags/v1.0.tar.gz" + sha256 "1e2484c6295f4eb1c1b789d8edab4b728cf9ea7e4c40ef52a56073f9a273ce30" + license :public_domain + head "https://github.com/leahneukirchen/xe.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a86047483f4a438ba53a00fbff31112bcb4b3919e860427384a067d7e2c106e5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41b532af620346e9afe4665a07ffe03f81110990f9fa032ddc4b7a84926bf36f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16095f122ae4444d568eea11511c33f99c7b0760655af5b245d6f21bfad2f1d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "02cf3b1d7b641be3ca3c2c468663a922b031e6348edef5e4a498cf3ccf578e10" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f15ffcac383f2223add8727e887be74af895b347cbecc4dc185745d21a86ed5d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2a81ab4f43492a5ad82225d579046c114ede2140390395fc62241f7d0bcb50af" + sha256 cellar: :any_skip_relocation, sonoma: "d94d2967cbbf062a92c28fe08bcef51c17eee159dbf2d029c1523815e99a1a69" + sha256 cellar: :any_skip_relocation, ventura: "fa22ab803e09d78b5aca3d0b4c9773b3a1db1bcd4f5f254a39f1af6a2daf578b" + sha256 cellar: :any_skip_relocation, monterey: "fe9fe7ccd998c7030b507f8e382986b7a4c599fdcc7dad851f1dbca173317333" + sha256 cellar: :any_skip_relocation, big_sur: "f2eb0cdecdd23ec242f05977a913055d8170c8cf9d793641c7633f54599e52d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd2b69d64dbad650050a09b32d026d15b07da7997e4c9af9f905501a7de30f32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b67d52094aa34b8882194aa6fa429b13ed8866abbc33ae906d3f0253b52ff61" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"input").write "a\nb\nc\nd\n" + assert_equal "b a\nd c\n", shell_output("#{bin}/xe -f #{testpath}/input -N2 -s 'echo $2 $1'") + end +end diff --git a/Formula/x/xeol.rb b/Formula/x/xeol.rb new file mode 100644 index 0000000000000..4f0e6058aa996 --- /dev/null +++ b/Formula/x/xeol.rb @@ -0,0 +1,50 @@ +class Xeol < Formula + desc "Xcanner for end-of-life software in container images, filesystems, and SBOMs" + homepage "https://github.com/xeol-io/xeol" + url "https://github.com/xeol-io/xeol/archive/refs/tags/v0.10.8.tar.gz" + sha256 "d26842a3ef75feef22270db4250d16d106e7f9d3ac5f4300ede1b6fc795cdaeb" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "80151377a0e570445e58a123fc9256fefdd756fe7bf8ab102de37ca67df34437" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "24658c7b39059111b71cfb881708de816018d13145e3c4e4603267c072e944fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d967d219f6d7a044a13dd6e2efaa495947d68e0344699d013c6ad3942f7e1d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3689cdfc20e5b62ed6853f8d71ef4695ba9a9e0884f5965ce5b5f4aafb5a24d9" + sha256 cellar: :any_skip_relocation, sonoma: "504c4e3d827048d30f47dcab2d2717d13ba99e9a8d90e1775b99bfd5f85881d4" + sha256 cellar: :any_skip_relocation, ventura: "3ee6c78f1c51e03f2d26121218c815959e2e7287b0825dbd56f92b7ffd0b0403" + sha256 cellar: :any_skip_relocation, arm64_linux: "87ad9b0ee49109813a35ee1d7030457a1bf8a72cf75938562722389dfa1d26ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "386c785c6a49becb1da6ae31414ceb1d95b9ad8299d9ebb34afe0c10a6d98dbd" + end + + depends_on "go" => :build + + def install + # Turn off homebrew specific database checks + # Issue ref: https://github.com/xeol-io/xeol/issues/568 + inreplace "xeol/db/curator.go", "isBrewTest == \"1\"", "isBrewTest == \"999\"" + + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.gitCommit=#{tap.user} + -X main.buildDate=#{time.iso8601} + -X main.gitDescription=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/xeol" + + generate_completions_from_executable(bin/"xeol", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/xeol version") + + output = shell_output("#{bin}/xeol db update 2>&1") + assert_match "EOL database updated to latest version!", output + + output = shell_output("#{bin}/xeol db status 2>&1") + assert_match "Status: valid", output + + output = shell_output("#{bin}/xeol alpine:latest 2>&1") + assert_match "no EOL software has been found", output + end +end diff --git a/Formula/x/xerces-c.rb b/Formula/x/xerces-c.rb new file mode 100644 index 0000000000000..1d5f6cb208148 --- /dev/null +++ b/Formula/x/xerces-c.rb @@ -0,0 +1,60 @@ +class XercesC < Formula + desc "Validating XML parser" + homepage "https://xerces.apache.org/xerces-c/" + url "https://www.apache.org/dyn/closer.lua?path=xerces/c/3/sources/xerces-c-3.3.0.tar.gz" + mirror "https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.3.0.tar.gz" + sha256 "9555f1d06f82987fbb4658862705515740414fd34b4db6ad2ed76a2dc08d3bde" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7ab8833ee127bece071bc754e4865e181a1d77cba6351b71f6bd9a87f3765434" + sha256 cellar: :any, arm64_sequoia: "8b648a8f8375fa85bf3bbdcbe82ac8b9f362fbc53303e9832f24f8afbe683eec" + sha256 cellar: :any, arm64_sonoma: "3be22ab76376131bdc5534556eb209ad1a63a9e67d0feeb5adde1746e3af455c" + sha256 cellar: :any, arm64_ventura: "925ebabdd24526e5e9e91ced09983deb480189eae3e1fce43aef08204fcc21c3" + sha256 cellar: :any, sonoma: "eed44cffc9b1ab90c33025a5c3c6b30905bf1d97c290ffa18d4bdfe1233a718e" + sha256 cellar: :any, ventura: "9ed96c4d74c313eb545ea3d04c6f1973fc81cbf5001bf8707c89a48dcbfb93d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "f069b3149aedf577b3e2e766d242c7167ce472390335dd8b2a2722ec527f9d13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "992f70652b3a78f54ed931bdb482c88a2fb32422cc13aacc0e09975ca8cd6e38" + end + + depends_on "cmake" => :build + + uses_from_macos "curl" + + def install + # Prevent opportunistic linkage to `icu4c` + args = std_cmake_args + %W[ + -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build_shared", "-DBUILD_SHARED_LIBS=ON", *args + system "cmake", "--build", "build_shared" + system "ctest", "--test-dir", "build_shared", "--verbose" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", "-DBUILD_SHARED_LIBS=OFF", *args + system "cmake", "--build", "build_static" + lib.install Dir["build_static/src/*.a"] + + # Remove a sample program that conflicts with libmemcached + # on case-insensitive file systems + (bin/"MemParse").unlink + end + + test do + (testpath/"ducks.xml").write <<~XML + + + + + Duck One + duck@foo.com + + + XML + + output = shell_output("#{bin}/SAXCount #{testpath}/ducks.xml") + assert_match "(6 elems, 1 attrs, 0 spaces, 37 chars)", output + end +end diff --git a/Formula/x/xeyes.rb b/Formula/x/xeyes.rb new file mode 100644 index 0000000000000..7bfb28aa97a1b --- /dev/null +++ b/Formula/x/xeyes.rb @@ -0,0 +1,37 @@ +class Xeyes < Formula + desc "Follow the mouse X demo using the X SHAPE extension" + homepage "https://gitlab.freedesktop.org/xorg/app/xeyes" + url "https://www.x.org/archive/individual/app/xeyes-1.3.1.tar.xz" + sha256 "5608d76b7b1aac5ed7f22f1b6b5ad74ef98c8693220f32b4b87dccee4a956eaa" + license "X11" + + bottle do + sha256 cellar: :any, arm64_tahoe: "a2b13dcf572f13c49a10369bdf760d82aa9474adfcc1cc64ec8db6c82f14da84" + sha256 cellar: :any, arm64_sequoia: "84fc3b8bdb3491d1c49ac6259c3c2987cbe9892ddff9fad7e591afdc93ebc8b2" + sha256 cellar: :any, arm64_sonoma: "b7319f0874bbe05866305455f5cbd6178d63b9456a2554a256fafcdbd547f58a" + sha256 cellar: :any, arm64_ventura: "d2cad64fd04a12b745586168365af90c5b8ad72199f03b62606b1840bd0ab3af" + sha256 cellar: :any, sonoma: "fbaad1c75696ee92be647f7b596c22ec71b343ffea58b66d781e4b00792bc4b5" + sha256 cellar: :any, ventura: "6ed962d16505a510957f3c90d023a3c867fe647cdd07578fad20e9162e9c0551" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e35e123562991f7b060ee22e52df8d8b0908a608876c749438a30142be86776" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d470f3855fad43d746e4cd968d432e06bc2926f1847199c8ed5aee2c9f86f81e" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "libxi" + depends_on "libxmu" + depends_on "libxrender" + depends_on "libxt" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/xeyes -display :100 2>&1", 1) + assert_match "Error: Can't open display:", output + end +end diff --git a/Formula/x/xfig.rb b/Formula/x/xfig.rb new file mode 100644 index 0000000000000..dca282c3ccdeb --- /dev/null +++ b/Formula/x/xfig.rb @@ -0,0 +1,70 @@ +class Xfig < Formula + desc "Facility for interactive generation of figures" + homepage "https://mcj.sourceforge.net/" + url "https://downloads.sourceforge.net/mcj/xfig-3.2.9a.tar.xz" + sha256 "bc572a1881e5e20987ac590158b041ab7803845a9691036d3ba5e982f66d9ca3" + license "MIT" + + livecheck do + url :stable + regex(%r{url=.*?/xfig[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "c847f3f5d301242e39854aaa5a240f927fe20f54ea5122933de39b7fc67ce5e0" + sha256 arm64_sequoia: "161b47e43d5412e6277eff6ba8f2884e0a345c238db8ed1601ece4501f05ee5c" + sha256 arm64_sonoma: "a8acd5f5d17d4bbef98332d6ece0de046b023c8485a1ce713bc183f10110db5e" + sha256 arm64_ventura: "e5ae9151e1f3e865317d32e0355445922d46e080e60d583b65df77591322b54b" + sha256 sonoma: "9ed33c2acaeb19e8826d4e82057ffccd949e7de53334d924b3005a02b50baf78" + sha256 ventura: "1cfeb80f07bbdd495c33c152b606f352e2785c421b50ba0816470ae99cc7676a" + sha256 arm64_linux: "ffa26e011fab5d5d529bab92892b47c4911b9126bf1a0d8f7f62de152e6d7c56" + sha256 x86_64_linux: "f4faa9ef548b215a82a5098c94bfcb09ad1acd51eebfa0539818f1a5fd20a112" + end + + depends_on "fig2dev" + depends_on "fontconfig" + depends_on "freetype" + depends_on "ghostscript" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "libx11" + depends_on "libxaw3d" + depends_on "libxft" + depends_on "libxpm" + depends_on "libxt" + + on_macos do + depends_on "gnu-sed" => :build + end + + def install + # Use GNU sed on macOS to avoid this build failure: + # `sed: 1: " /^[ \t]*\(!\|$\)/ d; s ...": bad flag in substitute command: '}'` + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + # Xft #includes , not , hence freetype2 + # must be put into the search path. + ENV.append "CFLAGS", "-I#{Formula["freetype"].opt_include}/freetype2" + + system "./configure", "--with-appdefaultdir=#{etc}/X11/app-defaults", + "--disable-silent-rules", + *std_configure_args + system "make", "install-strip" + + if OS.mac? + (etc/"X11/app-defaults/Fig").append_lines <<~X11_DEFAULTS + ! Disable internationalization to stop segfaults + ! https://github.com/Homebrew/homebrew-core/issues/221146 + ! https://sourceforge.net/p/mcj/tickets/177/#7c23 + Fig.international: False + X11_DEFAULTS + end + end + + test do + assert_equal "Xfig #{version}", shell_output("#{bin}/xfig -V 2>&1").strip + assert_equal "Error: Can't open display:", shell_output("DISPLAY= #{bin}/xfig 2>&1", 1).strip + end +end diff --git a/Formula/x/xgboost.rb b/Formula/x/xgboost.rb new file mode 100644 index 0000000000000..f498b8cb329d0 --- /dev/null +++ b/Formula/x/xgboost.rb @@ -0,0 +1,103 @@ +class Xgboost < Formula + desc "Scalable, Portable and Distributed Gradient Boosting Library" + homepage "https://xgboost.ai/" + url "https://github.com/dmlc/xgboost/releases/download/v3.1.1/xgboost-src-3.1.1.tar.gz" + sha256 "b2bb9c93f28fe7e401dbe592eb7990f5382baa712b02301eb8fd4cdb6c676731" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "7c0f640db107022b4d002c42809f6cf0a626aa215a3dffd96100980ed49b1f5a" + sha256 cellar: :any, arm64_sequoia: "1339f216f2fb7297e97434ecd101102f314ba9e7d9aefbd0073bbcd0da45ca7c" + sha256 cellar: :any, arm64_sonoma: "61a07a3112f0d7759a9963e816146dcfbb08f96bf30aeb1c0755fd52f59f8dd2" + sha256 cellar: :any, sonoma: "2334f59aa986eeb42c1eeb8fe53519b6b8eaa20bfbed9916d42b2ebf2db8a7c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "89749cd336ae9751c0afa6b9cc9b664f11d489bcbd829e957c5fe4116eabbddd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2308ed167d7bf1701d546f36c4e4db0452fa3a3ec1651bfe065db5826a6c9ed" + end + + depends_on "cmake" => :build + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100 + depends_on "libomp" + end + + fails_with :clang do + build 1100 + cause <<~EOS + clang: error: unable to execute command: Segmentation fault: 11 + clang: error: clang frontend command failed due to signal (use -v to see invocation) + make[2]: *** [src/CMakeFiles/objxgboost.dir/tree/updater_quantile_hist.cc.o] Error 254 + EOS + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "demo" + end + + test do + cp_r (pkgshare/"demo"), testpath + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + std::string train_data = "#{testpath}/demo/data/agaricus.txt.train?format=libsvm"; + + DMatrixHandle dtrain; + if (XGDMatrixCreateFromFile(train_data.c_str(), 0, &dtrain) != 0) { + std::cerr << "Failed to load training data: " << train_data << std::endl; + std::cerr << "Last error message: " << XGBGetLastError() << std::endl; + return 1; + } + + // Create booster and set parameters + BoosterHandle booster; + if (XGBoosterCreate(&dtrain, 1, &booster) != 0) { + std::cerr << "Failed to create booster" << std::endl; + return 1; + } + if (XGBoosterSetParam(booster, "max_depth", "2") != 0) { + std::cerr << "Failed to set parameter" << std::endl; + return 1; + } + if (XGBoosterSetParam(booster, "eta", "1") != 0) { + std::cerr << "Failed to set parameter" << std::endl; + return 1; + } + if (XGBoosterSetParam(booster, "objective", "binary:logistic") != 0) { + std::cerr << "Failed to set parameter" << std::endl; + return 1; + } + + // Train the model + for (int iter = 0; iter < 10; ++iter) { + if (XGBoosterUpdateOneIter(booster, iter, dtrain) != 0) { + std::cerr << "Failed to update booster" << std::endl; + return 1; + } + } + + // Free resources + XGBoosterFree(booster); + XGDMatrixFree(dtrain); + + std::cout << "Test completed successfully" << std::endl; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lxgboost", "-o", "test" + system "./test" + end +end diff --git a/Formula/x/xgo.rb b/Formula/x/xgo.rb new file mode 100644 index 0000000000000..7b5d4aaf61c41 --- /dev/null +++ b/Formula/x/xgo.rb @@ -0,0 +1,43 @@ +class Xgo < Formula + desc "AI-native programming language that integrates software engineering" + homepage "https://xgo.dev/" + url "https://github.com/goplus/xgo/archive/refs/tags/v1.5.2.tar.gz" + sha256 "68ef472acd5853f69d5378845d92619c51834a637092e2bf0924ad1cea2dd1ac" + license "Apache-2.0" + head "https://github.com/goplus/xgo.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "0d2439d10b2769a8ca3b81cacf494e9fd98596b99d29e6cac83901e2c5fefe3c" + sha256 arm64_sequoia: "4004acc7824bea575549e73756fc5918629db7a38d6654927809a16b6ef8eaac" + sha256 arm64_sonoma: "4ef69fb9a842f7666c6c62eb4a4fc677ec44b0daf1fadcb977c9946d274a74ce" + sha256 sonoma: "cc3f7445ca52dfd59501eba5223fd7265b9bc2e66891387d97ba1a00e70f0010" + sha256 arm64_linux: "35c47421c795df91c1eb0a104570f489569037f29195a04f2bbe488a2a9a487d" + sha256 x86_64_linux: "d2aa92ae84fae8c0819461437a377e33527e8e8632333b0c80004d4b8f3d6b05" + end + + depends_on "go" + + def install + ENV["GOPROOT_FINAL"] = libexec + system "go", "run", "cmd/make.go", "--install" + + libexec.install Dir["*"] - Dir[".*"] + bin.install_symlink Dir[libexec/"bin/*"] + + generate_completions_from_executable(bin/"xgo", "completion") + end + + test do + system bin/"xgo", "mod", "init", "hello" + (testpath/"hello.xgo").write <<~XGO + println("Hello World") + XGO + + # Run xgo fmt, run, build + assert_equal "v#{version}", shell_output("#{bin}/xgo env XGOVERSION").chomp + system bin/"xgo", "fmt", "hello.xgo" + assert_equal "Hello World\n", shell_output("#{bin}/xgo run hello.xgo 2>&1") + system bin/"xgo", "build", "-o", "hello" + assert_equal "Hello World\n", shell_output("./hello 2>&1") + end +end diff --git a/Formula/x/xh.rb b/Formula/x/xh.rb new file mode 100644 index 0000000000000..cb28746c80a68 --- /dev/null +++ b/Formula/x/xh.rb @@ -0,0 +1,34 @@ +class Xh < Formula + desc "Friendly and fast tool for sending HTTP requests" + homepage "https://github.com/ducaale/xh" + url "https://github.com/ducaale/xh/archive/refs/tags/v0.25.0.tar.gz" + sha256 "6145f48cbefbb2bd1aa97ebcc8528d15ada1303e6e80fdd6a4637014f0f1df1c" + license "MIT" + head "https://github.com/ducaale/xh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a09bdf3126de1a518733e1469e53a377efb81845544b1d5f0d08e62f4d938b94" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b7f289a04a724821774f6530ac83519177605025c484584ebda45962bcc76d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7569e9f2fe3e014f148ea72b33e58e496e017e79f490497110d26c4b5018e18b" + sha256 cellar: :any_skip_relocation, sonoma: "d9cfede6039da74ace5b5753f5387128b9444644f7f0dac3126960f7958e9fa6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c381b9c1a70f9140d746e9fb7b655c84066e0dec1184d1b619e54ece3827ee18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8690ff2328408ffe9a1a6fc5b0d91ec951d0b9ab4b47a3239aaf53bd93f8ce2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + bin.install_symlink bin/"xh" => "xhs" + + man1.install "doc/xh.1" + bash_completion.install "completions/xh.bash" => "xh" + fish_completion.install "completions/xh.fish" + zsh_completion.install "completions/_xh" + end + + test do + hash = JSON.parse(shell_output("#{bin}/xh -I -f POST https://httpbin.org/post foo=bar")) + assert_equal hash["form"]["foo"], "bar" + end +end diff --git a/Formula/x/xidel.rb b/Formula/x/xidel.rb new file mode 100644 index 0000000000000..a558dcfe4ad01 --- /dev/null +++ b/Formula/x/xidel.rb @@ -0,0 +1,59 @@ +class Xidel < Formula + desc "XPath/XQuery 3.0, JSONiq interpreter to extract data from HTML/XML/JSON" + homepage "https://www.videlibri.de/xidel.html" + url "https://github.com/benibela/xidel/releases/download/Xidel_0.9.8/xidel-0.9.8.src.tar.gz" + sha256 "72b5b1a2fc44a0a61831e268c45bc6a6c28e3533b5445151bfbdeaf1562af39c" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url :stable + regex(/^(?:Xidel[-_])?v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "ab0881d178eb07b3b22246dea5ded4a0c5380084001b85a602aa38cbadd6e8b5" + sha256 cellar: :any, arm64_sequoia: "22631f3ff23b3aebea5c18af4df873ba77d28b46b62a9ca681dc98890d6a95da" + sha256 cellar: :any, arm64_sonoma: "466555de8b7e479e1f4a49ec52a15559c44f05820e1810e9a0965efd2ab3d751" + sha256 cellar: :any, arm64_ventura: "1c90b748fa5f9087602a8d8670c25b706c24c3be99c11758300604fbac9a3eea" + sha256 cellar: :any, arm64_monterey: "73f305dc1833d8ebdea3236df50cb4de5f52bdbefa2a37d3b682cf1cd73c8dd5" + sha256 cellar: :any, arm64_big_sur: "b9758092865f250399c41f7eb2c22d8a85d3a6f201abd87cf8bcc2df9f5ce72e" + sha256 cellar: :any, sonoma: "94a17492216d780afa50e763dd25057985439cbbbf28363fe1b9a1444becbdd7" + sha256 cellar: :any, ventura: "287aa987ef7a181f654506c15c24e58ed1e265118d8932f5bff259be79e76c70" + sha256 cellar: :any, monterey: "aecd66d3be7b4ab3ba13a57dab9f70988e9cf271e818ee0a06a2aebe0a62da4e" + sha256 cellar: :any, big_sur: "e0a2b032e2ad48fa616a29a3249a9c5fbee970832dac267f8430c67f6abc2895" + sha256 cellar: :any, catalina: "b3f68c54bd0e368870f81873cefe84d90249ec4d7cf2dfb68aae648d3fabb1ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "da15ea47a8f2f01ecd1bbfdbbf0d29f44e8fe68093c78df36b1dab3ba08adc98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a486375fd54f408102f37ffc3071fa806d318b56cdb03d6d0eeecc9f45f0b32" + end + + head do + url "https://github.com/benibela/xidel.git", branch: "master" + resource("flre") { url "https://github.com/benibela/flre.git", branch: "master" } + resource("internettools") { url "https://github.com/benibela/internettools.git", branch: "master" } + resource("pasdblstrutils") { url "https://github.com/BeRo1985/pasdblstrutils.git", branch: "master" } + resource("rcmdline") { url "https://github.com/benibela/rcmdline.git", branch: "master" } + resource("synapse") { url "https://svn.code.sf.net/p/synalist/code/synapse/40/" } + end + + depends_on "fpc" => :build + depends_on "openssl@3" + + def install + resources.each do |r| + r.stage buildpath/"import"/r.name + end + + cd "programs/internet/xidel" if build.stable? + inreplace "build.sh", "$fpc ", "$fpc -k-rpath -k#{sh_quote Formula["openssl@3"].opt_lib.to_s} " + system "./build.sh" + bin.install "xidel" + man1.install "meta/xidel.1" + end + + test do + assert_equal "123\n", shell_output("#{bin}/xidel -e 123") + end +end diff --git a/Formula/x/xinit.rb b/Formula/x/xinit.rb new file mode 100644 index 0000000000000..f55b0934034e9 --- /dev/null +++ b/Formula/x/xinit.rb @@ -0,0 +1,124 @@ +class Xinit < Formula + desc "Start the X Window System server" + homepage "https://gitlab.freedesktop.org/xorg/app/xinit" + url "https://www.x.org/releases/individual/app/xinit-1.4.4.tar.xz" + sha256 "40a47c7a164c7f981ce3787b4b37f7e411fb43231dcde543d70094075dacfef9" + license all_of: ["MIT", "APSL-2.0"] + + bottle do + sha256 arm64_tahoe: "dd3c7693b0185d79555d1f91e559612ad865688fe779f1c4986f86493058ba6b" + sha256 arm64_sequoia: "f032d2ee9b34ba1ee42d99701266d51e3dcbdcb30d66883ec8f05033894356bb" + sha256 arm64_sonoma: "12231945f0af6967b64ea1e6f992caedcc760a7ed13d142590dab52ae7fc3e96" + sha256 arm64_ventura: "6f5350a1fceed943594b743212e2ae40e37559e1daa82c31e617311a706ee25a" + sha256 sonoma: "14ad40b8e7143eb60fd252ecadaa4012428a33d9572920fc7e4968ac52904d38" + sha256 ventura: "caf7be003b70bc8a6a0a2c0fd64df3b6f1479ecb437ecbb00b4675660bf15319" + sha256 arm64_linux: "5afccb26823574faa9cc8e322ffa73ba0f5466862dd88ca5a8a4c828ab0d95cc" + sha256 x86_64_linux: "8b8186133c32e00a1411809fa7b2569bffacaa9fd2ddbd575605abd3555c6316" + end + + depends_on "pkgconf" => :build + depends_on "tradcpp" => :build + depends_on "xorg-server" => :test + + depends_on "libx11" + depends_on "xauth" + depends_on "xmodmap" + depends_on "xrdb" + depends_on "xterm" + + on_macos do + depends_on "lndir" => :build + depends_on "mkfontscale" => :build + + depends_on "quartz-wm" + + resource "xquartz" do + url "https://github.com/XQuartz/XQuartz/archive/refs/tags/XQuartz-2.8.5.tar.gz" + sha256 "5c8c4f48d5e30fdabfba3543174ea67e53f334650b4cfd637714e559eec102d4" + end + end + + on_linux do + depends_on "twm" + depends_on "util-linux" + end + + def install_xquartz_resource + resource("xquartz").stage do + prefix.install Dir["base/opt/X11/*"] + (share/"fonts/X11").install share/"fonts/TTF" + + (prefix.glob "**/*").each do |f| + inreplace f, "/opt/X11", HOMEBREW_PREFIX, audit_result: false if f.file? + end + + inreplace bin/"font_cache" do |s| + # provided by formula `procmail` + s.gsub! %r{/usr/bin(?=/lockfile)}, HOMEBREW_PREFIX + # set `X11FONTDIR`, align with formula `font-util` + s.gsub! "share/fonts", "share/fonts/X11" + end + + # align with formula `font-util` + font_paths = %w[misc TTF OTF Type1 75dpi 100dpi].map do |f| + p = HOMEBREW_PREFIX/"share/fonts/X11"/f + %Q( [ -e #{p}/fonts.dir ] && fontpath="$fontpath,#{p}#{",#{p}/:unscaled" if /\d+dpi/.match? p}"\n) + end + lines = File.readlines prefix/"etc/X11/xinit/xinitrc.d/10-fontdir.sh" + lines[1] = %Q( fontpath="built-ins"\n) + font_paths.join + File.write(prefix/"etc/X11/xinit/xinitrc.d/10-fontdir.sh", lines.join) + + # /System/Library/Fonts is protected by SIP + mkdir_p share/"system_fonts" + system Formula["lndir"].bin/"lndir", "/System/Library/Fonts", share/"system_fonts" + system Formula["mkfontscale"].bin/"mkfontdir", share/"system_fonts" + end + end + + def install + install_xquartz_resource if OS.mac? + + configure_args = %W[ + --bindir=#{HOMEBREW_PREFIX}/bin + --sysconfdir=#{etc} + --with-bundle-id-prefix=#{plist_name.chomp ".startx"} + --with-launchagents-dir=#{prefix} + --with-launchdaemons-dir=#{prefix} + ] + + system "./configure", *configure_args, *std_configure_args + system "make", "RAWCPP=tradcpp" + system "make", "XINITDIR=#{prefix}/etc/X11/xinit", + "sysconfdir=#{prefix}/etc", + "bindir=#{bin}", "install" + end + + def caveats + <<~EOS + To start privileged xinit now and restart at login: + sudo brew services start xinit --file=#{opt_prefix}/#{plist_name.chomp "startx"}privileged_startx.plist + EOS + end + + service do + name macos: "homebrew.mxcl.startx" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + xcb_connection_t *connection = xcb_connect(NULL, NULL); + int has_err = xcb_connection_has_error(connection); + assert(has_err == 0); + xcb_disconnect(connection); + return 0; + } + C + xcb = Formula["libxcb"] + system ENV.cc, "./test.c", "-o", "test", "-I#{xcb.include}", "-L#{xcb.lib}", "-lxcb" + exec bin/"xinit", "./test", "--", Formula["xorg-server"].bin/"Xvfb", ":1" + end +end diff --git a/Formula/x/xinput.rb b/Formula/x/xinput.rb new file mode 100644 index 0000000000000..5d1f6bc50eaa0 --- /dev/null +++ b/Formula/x/xinput.rb @@ -0,0 +1,50 @@ +class Xinput < Formula + desc "Utility to configure and test X input devices" + homepage "https://gitlab.freedesktop.org/xorg/app/xinput" + url "https://www.x.org/pub/individual/app/xinput-1.6.4.tar.xz" + sha256 "ad04d00d656884d133110eeddc34e9c69e626ebebbbab04dc95791c2907057c8" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c8e2d341b5603fdbf07d9ec892b235a61f69ab54e0b6911969064766a6b1976a" + sha256 cellar: :any, arm64_sequoia: "c70d8603d13e94505f514890678cef419551a0ac6688356fdd28e6ecaad1fffd" + sha256 cellar: :any, arm64_sonoma: "2f027d634882891977ee75bdd55f1cd68a7498cf32b036cbd551c8e9a42f4d81" + sha256 cellar: :any, arm64_ventura: "751c32f1673020bda208c9885345be27da828cc2028e90e76e6ccc26f7d30d39" + sha256 cellar: :any, arm64_monterey: "44bad70ccc176511f7a5d965d028b3ff27b66b820fec7d46c40bf8f72d0d14cd" + sha256 cellar: :any, arm64_big_sur: "0cc93fd8d5b16c85a027871ddaeb81d25e72eea433f4bd16ea60d30ea75ecac6" + sha256 cellar: :any, sonoma: "b63fde9b48bc4477a6a4606ffb121f6ea86c9d388d6723ad1a46f5cd80656d62" + sha256 cellar: :any, ventura: "fc941b892085cf448f2fb8f560d0f7bf4b1ae9d50bd3fde91c09618cfb38ddbc" + sha256 cellar: :any, monterey: "dfc3f16159f75487037348ee85a29d539376fd3e168417174403b4a3c0942a13" + sha256 cellar: :any, big_sur: "e21d1963e880afe1acc8001912fc0d091797e664a5dce9d8e9738700139aea3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec5a8a49c566256840876bb3ffe0d4748343b7ba863c30b3c045c7cd39f59dbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48811518afc1be944c7f11606493feeffa4acd7653ad98f80e2dd583e6144bf0" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxrandr" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_path_exists bin/"xinput" + assert_equal %Q(.TH xinput 1 "xinput #{version}" "X Version 11"), + shell_output("head -n 1 #{man1}/xinput.1").chomp + end +end diff --git a/Formula/x/xk6.rb b/Formula/x/xk6.rb new file mode 100644 index 0000000000000..0fdf8e79b5879 --- /dev/null +++ b/Formula/x/xk6.rb @@ -0,0 +1,46 @@ +class Xk6 < Formula + desc "Build k6 with extensions" + homepage "https://k6.io" + url "https://github.com/grafana/xk6/archive/refs/tags/v1.2.3.tar.gz" + sha256 "a901215215836e3a22e9f9b828550a51e1c4e7690de79b53131cb4f9ecc5b8d0" + license "Apache-2.0" + head "https://github.com/grafana/xk6.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "384558572eb2329b65c7576ed9f87eb6fa36036b53ba09dfd05d4bc0e88163c3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "384558572eb2329b65c7576ed9f87eb6fa36036b53ba09dfd05d4bc0e88163c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "384558572eb2329b65c7576ed9f87eb6fa36036b53ba09dfd05d4bc0e88163c3" + sha256 cellar: :any_skip_relocation, sonoma: "f849dfcaa93d0eeace38db3a48680f4cd0499d3db727b450ef3f62ad89611acb" + sha256 cellar: :any_skip_relocation, arm64_linux: "450338752344057561d3b9eee87b97da26cf3e71158a76bde264989a8e304e31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6acdf056c68992d4d8417994d84fe4a891b058a4c8b75ae49e32582c711a0d73" + end + + depends_on "go" + depends_on "gosec" + depends_on "govulncheck" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X go.k6.io/xk6/internal/cmd.version=#{version}") + end + + test do + assert_match "xk6 version #{version}", shell_output("#{bin}/xk6 version") + assert_match "xk6 has now produced a new k6 binary", shell_output("#{bin}/xk6 build") + system bin/"xk6", "new", "github.com/grafana/xk6-testing" + cd "xk6-testing" do + system "git", "init" + system "git", "add", "." + system "git", "commit", "-m", "init commit" + system "git", "tag", "v0.0.1" + + lint_output = shell_output("#{bin}/xk6 lint") + assert_match "✔ security", lint_output + assert_match "✔ vulnerability", lint_output + end + end +end diff --git a/Formula/x/xkbcomp.rb b/Formula/x/xkbcomp.rb new file mode 100644 index 0000000000000..17908b9f5cc78 --- /dev/null +++ b/Formula/x/xkbcomp.rb @@ -0,0 +1,51 @@ +class Xkbcomp < Formula + desc "XKB keyboard description compiler" + homepage "https://www.x.org" + url "https://www.x.org/releases/individual/app/xkbcomp-1.4.7.tar.xz" + sha256 "0a288114e5f44e31987042c79aecff1ffad53a8154b8ec971c24a69a80f81f77" + license all_of: ["HPND", "MIT-open-group"] + + bottle do + sha256 cellar: :any, arm64_tahoe: "3eed6169b9426b62dffe9623dfa9d1664f3efe9013bae806fb1cac758ac83f14" + sha256 cellar: :any, arm64_sequoia: "a0b770e6a7ef934ac5b4fc86d683013e9ec4b1813852884b27362129357ffc57" + sha256 cellar: :any, arm64_sonoma: "21f807d7ff040f4f919aa8b785e84589013a24e492618fb2f68867a20b83ff85" + sha256 cellar: :any, arm64_ventura: "fac529997c4a64e907d0bbfa31c5d7b4223bcb978f139de89a5a57d904280279" + sha256 cellar: :any, arm64_monterey: "8005d7a24f88589b10d4b305668a0daf00c3262096cf2824b33b9ee2b820cb57" + sha256 cellar: :any, sonoma: "748bc8b2b4367a4a2a429939d866cad1d3f2c39827d817dcc8005677decfdec4" + sha256 cellar: :any, ventura: "64d4dd5de94b681390d9488addba6c89d1d2cfdc64fc84d3daa7c308868bf3d7" + sha256 cellar: :any, monterey: "4bf88bfe3df2a85e6a4e16cb61b92f7a1e91b4e7b1f526014912fc789de34205" + sha256 cellar: :any_skip_relocation, arm64_linux: "e96e612b7dabac0251953af322c5045f238c702df84100378d3ebc6e0d4ec6fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6be95ca9ca5cb1c2afaa4e0d2cf31d75f5daa5e543a824c3c9cb9f6d895c25e2" + end + + depends_on "pkgconf" => :build + + depends_on "libx11" + depends_on "libxkbfile" + + def install + system "./configure", "--with-xkb-config-root=#{HOMEBREW_PREFIX}/share/X11/xkb", *std_configure_args + system "make" + system "make", "install" + # avoid cellar in bindir + inreplace lib/"pkgconfig/xkbcomp.pc", prefix, opt_prefix + end + + test do + (testpath/"test.xkb").write <<~EOS + xkb_keymap { + xkb_keycodes "empty+aliases(qwerty)" { + minimum = 8; + maximum = 255; + virtual indicator 1 = "Caps Lock"; + }; + xkb_types "complete" {}; + xkb_symbols "unknown" {}; + xkb_compatibility "complete" {}; + }; + EOS + + system bin/"xkbcomp", "./test.xkb" + assert_path_exists testpath/"test.xkm" + end +end diff --git a/Formula/x/xkcd.rb b/Formula/x/xkcd.rb new file mode 100644 index 0000000000000..9faad2deee2f6 --- /dev/null +++ b/Formula/x/xkcd.rb @@ -0,0 +1,40 @@ +class Xkcd < Formula + desc "Fetch latest, random or any particular xkcd comic right in your terminal" + homepage "https://git.hanabi.in/xkcd-go" + url "https://git.hanabi.in/repos/xkcd-go.git", + tag: "v2.0.0", + revision: "5e68ef5b2e7e6806dd57586e9b7ed4f97f64dba0" + license "AGPL-3.0-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "12b749bea35ff4bdf2e22379ecbaf6fe1932dbed2ad24593fec9991690eb1802" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78fd0f7eb254f594cc5600317b385bcfa759d68b118d6be7ff71385ef1816bb2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "781fa4a629feafbf0ff10ee3c99a956ee59464ae909018b5d619946e48a23fcb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "395611b46f90c37e740d47e696f641cb2e4e9fbcd36404f29cc70e7d71fdc5dc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a1402d9b256ef081a1667c1e26c6e53d3b8429bd1e58e831555ee27f235b3cde" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c944fe024e4943fbf35e6b0c47de882f49b67815741dfd0a3a7b008500af213c" + sha256 cellar: :any_skip_relocation, sonoma: "96e9f2ab8f605303a09f88e6daa4536e03aeefa6b258b2495b13eccedff96b4c" + sha256 cellar: :any_skip_relocation, ventura: "c4812ea46d75e562008a2389a93e77c04814c8de8468570d748ab46d05f4c597" + sha256 cellar: :any_skip_relocation, monterey: "9010a3bec1ae4b24be2bc9c6b2b335456b8f7817a56823a1d69782d4c93dbb9c" + sha256 cellar: :any_skip_relocation, big_sur: "c70df4015231c9955bc1d67d3a55a0d70f8486a2444051feaf5997db19893f4f" + sha256 cellar: :any_skip_relocation, catalina: "7ce9eb7408f0d114c84be128b66b5654a32552b8489b8159d4e3cfe3c60178da" + sha256 cellar: :any_skip_relocation, arm64_linux: "4add881c8653e7f3ac3b9282cbd7a334ee3e90c68c71081a4fe4f6d9d76466ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7748cc8d6d3651b22cd1960ccf30ca9b52314540fdbe5655888dfeee6c33bc0b" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "src/main.go" + end + + test do + require "pty" + stdout, _stdin, _pid = PTY.spawn("#{bin}/xkcd explain 404") + op = stdout.readline + striped_op = op.strip + assert_equal striped_op, "https://www.explainxkcd.com/wiki/index.php/404" + end +end diff --git a/Formula/x/xkeyboard-config.rb b/Formula/x/xkeyboard-config.rb new file mode 100644 index 0000000000000..617b2f95f8ffe --- /dev/null +++ b/Formula/x/xkeyboard-config.rb @@ -0,0 +1,34 @@ +class XkeyboardConfig < Formula + desc "Keyboard configuration database for the X Window System" + homepage "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/" + url "https://xorg.freedesktop.org/archive/individual/data/xkeyboard-config/xkeyboard-config-2.46.tar.xz" + sha256 "10c58218fb60d08fb1f7b30304deb3ba47613195aa8a08a81f1972775ccc3640" + license "MIT" + head "https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "96ab2e0245a4008b841d479738e243ded39b1f2e4e88677d45c800fa246b5808" + end + + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.14" => :build + + uses_from_macos "libxslt" => :build + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_path_exists man7/"xkeyboard-config.7" + assert_equal "#{share}/X11/xkb", shell_output("pkg-config --variable=xkb_base xkeyboard-config").chomp + assert_match "Language-Team: English", + shell_output("strings #{share}/locale/en_GB/LC_MESSAGES/xkeyboard-config.mo") + end +end diff --git a/Formula/x/xlearn.rb b/Formula/x/xlearn.rb new file mode 100644 index 0000000000000..e64dfb9309ba5 --- /dev/null +++ b/Formula/x/xlearn.rb @@ -0,0 +1,48 @@ +class Xlearn < Formula + desc "High performance, easy-to-use, and scalable machine learning package" + homepage "https://xlearn-doc.readthedocs.io/en/latest/index.html" + url "https://github.com/aksnzhy/xlearn/archive/refs/tags/v0.4.4.tar.gz" + sha256 "7b0e9db901c0e6feda4dfb793748ec959b2b56188fc2a80de5983c37e2b9f7d2" + license "Apache-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, sonoma: "7ec1cd645264843122f75e157e366c1cc0ef84be1b8a4a0d3705d9e04619d256" + sha256 cellar: :any, ventura: "c0ecafbd0f8f1103d6a01ff267bb86a11ad8515a4421acda57ff9b2c0d33250a" + sha256 cellar: :any, monterey: "36bbe9dd0cc0deb15f9bca3a0f8db3da4e57cf4c62f3cfb2138b5bb88f7f4587" + sha256 cellar: :any, big_sur: "a28e91b107a782fe4bfa9894ba647a36ed7669f25978bc0cec1ce25627d19b6d" + sha256 cellar: :any, catalina: "4edeafacfb2f12dabd7fa08bb60d62186912c6e000a496fd5bf31523ecaa3557" + sha256 cellar: :any_skip_relocation, x86_64_linux: "988336d4ee9d33798bc18e46135225033cbbf083aada8ba0e7bdbfa968718229" + end + + depends_on "cmake" => :build + depends_on arch: :x86_64 # https://github.com/aksnzhy/xlearn/issues/354 + + on_macos do + # Can be undeprecated if upstream decides to support arm64 macOS + # https://docs.brew.sh/Support-Tiers#future-macos-support + deprecate! date: "2025-09-25", because: :unsupported + disable! date: "2026-09-25", because: :unsupported + end + + def install + inreplace "CMakeLists.txt", "set(CMAKE_INSTALL_PREFIX \"xLearn\")", "" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_MACOSX_RPATH=TRUE", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bin.install "build/xlearn_train" + bin.install "build/xlearn_predict" + lib.install "build/lib/#{shared_library("libxlearn_api")}" + + pkgshare.install "demo" + end + + test do + cp_r (pkgshare/"demo/classification/criteo_ctr/small_train.txt"), testpath + system bin/"xlearn_train", "small_train.txt" + end +end diff --git a/Formula/x/xlispstat.rb b/Formula/x/xlispstat.rb new file mode 100644 index 0000000000000..bede7087683d1 --- /dev/null +++ b/Formula/x/xlispstat.rb @@ -0,0 +1,55 @@ +class Xlispstat < Formula + desc "Statistical data science environment based on Lisp" + homepage "https://homepage.stat.uiowa.edu/~luke/xls/xlsinfo/" + url "https://homepage.cs.uiowa.edu/~luke/xls/xlispstat/current/xlispstat-3-52-23.tar.gz" + version "3.52.23" + sha256 "9bf165eb3f92384373dab34f9a56ec8455ff9e2bf7dff6485e807767e6ce6cf4" + license "HPND-sell-variant" + revision 1 + + livecheck do + url "https://homepage.cs.uiowa.edu/~luke/xls/xlispstat/current/" + regex(/href=.*?xlispstat[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + strategy :page_match do |page, regex| + page.scan(regex).map { |match| match[0].tr("-", ".") } + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "cf23b57eb4e3246a8456d4243f04d704a3a2128d763021876a9b5777010888e5" + sha256 cellar: :any, arm64_sequoia: "455b2e247dd57ef595e2576a56d707ec8ced866ec15d808fc2cf93089aff07b6" + sha256 cellar: :any, arm64_sonoma: "10e7f44257e5722b9d044d17e1797df027796f291010ea9ccb5a4c3999424208" + sha256 cellar: :any, arm64_ventura: "3b11acb44e728fb2b1707b8700d5b0be9a68ff522884827fe824d44d6333ca33" + sha256 cellar: :any, arm64_monterey: "e11e76582f1aa365ed04b44c6caac0a786b63f12b612399e27ed909803c1bdcf" + sha256 cellar: :any, arm64_big_sur: "1c7230181f7447fb264b14c84d8a6a2e3396faec78af73174ed6543f19536a8a" + sha256 cellar: :any, sonoma: "fcfee4172bf01f3bf39432e7c7e12b8f73e67d5d36de47e74dbff16d5ece3012" + sha256 cellar: :any, ventura: "03fc5d039c560d5d3cab884da3911ca4752b5686ca5e9399e8a3417f44da7fdf" + sha256 cellar: :any, monterey: "9d418608c03816945f00a2ccbf93def9a54e6f8b9c00c93b7835a287cf7c2305" + sha256 cellar: :any, big_sur: "30bde68dbe2eada5b7646e5ef4b6fc0f804be39f37ae75244955b3befe803036" + sha256 cellar: :any, catalina: "d2e8f57e8dc13c6b1aaa38af29d291b5974b642626599cf478f3997e2981643a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9ce0920180e4cab96fc3e9b55a0fe5e95bee6b4de40a7ca7121f2068daaea2b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45f4149aaf05fa78c789492de2867074891abc4816a5b6abbf04d06433c135d6" + end + + depends_on "libx11" + + def install + # Fix compile with newer Clang + ENV.append "CC", "-Wno-implicit-int -Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + ENV.deparallelize # Or make fails bytecompiling lisp code + system "make" + system "make", "install" + end + + test do + assert_equal "> 50.5\n> ", pipe_output("#{bin}/xlispstat | tail -2", "(median (iseq 1 100))") + end +end diff --git a/Formula/x/xlsclients.rb b/Formula/x/xlsclients.rb new file mode 100644 index 0000000000000..160feccf26d85 --- /dev/null +++ b/Formula/x/xlsclients.rb @@ -0,0 +1,33 @@ +class Xlsclients < Formula + desc "List client applications running on a display" + homepage "https://gitlab.freedesktop.org/xorg/app/xlsclients" + url "https://www.x.org/archive/individual/app/xlsclients-1.1.5.tar.xz" + sha256 "68baee57e70250ac4a7759fb78221831f97d88bc8e51dcc2e64eb3f8ca56bae3" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "7845c576ced4a3065eac6aa6d86619c19650b8f1d894f3ab3ec954ba14697b33" + sha256 cellar: :any, arm64_sequoia: "f232c88f33a86c8c9c4f660d5b1102f7a91f26d9b9565d41e6a1bbd5e282b3d2" + sha256 cellar: :any, arm64_sonoma: "be45e2812020b6a380b6c7affa69859d6563e79087308382ef6b30cc6bdaae1a" + sha256 cellar: :any, arm64_ventura: "e9cab1de3e8ebc016baf33dddca3a6846c1f97b2cb5092f1e2124e45761adf2d" + sha256 cellar: :any, sonoma: "022fdaa226764ac119faa1a3a7fb00a48e6551100dce9557e217fb6f815a640c" + sha256 cellar: :any, ventura: "8883d8f93bacc5461d48d9a0cc979699582eea0ac790c0a84ae2a7106718d852" + sha256 cellar: :any_skip_relocation, arm64_linux: "43acf15e78b649f48c13d8d9b44bd427ccd1e2f8b7943f73b1103c3aff5ccdb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdb67879482e31bc17326a25a77645f1ccf875f7455bd29d12f8b16f41fd7453" + end + + depends_on "pkgconf" => :build + depends_on "libxcb" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/xlsclients -display :100 2>&1", 1) + assert_match "xlsclients: unable to open display", output + end +end diff --git a/Formula/x/xlslib.rb b/Formula/x/xlslib.rb new file mode 100644 index 0000000000000..00eb8a5d15fbb --- /dev/null +++ b/Formula/x/xlslib.rb @@ -0,0 +1,48 @@ +class Xlslib < Formula + desc "C++/C library to construct Excel .xls files in code" + homepage "https://sourceforge.net/projects/xlslib/" + url "https://downloads.sourceforge.net/project/xlslib/xlslib-package-2.5.0.zip" + sha256 "05a5d052ffdd6590755949d80d16a56285561557bc9a5e887e3b8b3fef92a3f3" + license "BSD-2-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "0aceee9730d6524acd094d61efcf3b89387d79c7e10dc3bbbac4cf52ccb133ac" + sha256 cellar: :any, arm64_sequoia: "67eee141556944e992f338143289b2021e22023d5f205f571e56bca3a8c2b1f3" + sha256 cellar: :any, arm64_sonoma: "f3ac523156480b0b00cf8ef98e2687e7ca0ac2b6107186f14349a0566c57de76" + sha256 cellar: :any, arm64_ventura: "8a846a14e97ca4104d9d56be6ba54c6159a798b334b8172d1c941848bb3581aa" + sha256 cellar: :any, arm64_monterey: "6aa0abeea10e22729ad231d42c44b194eff33d203c786f05fdbc72e6a62a590d" + sha256 cellar: :any, arm64_big_sur: "7e4fb2b977db04da50bae5952609b346fb2fd3b2687f2226747c1ff3401f9450" + sha256 cellar: :any, sonoma: "86148ddd46d4a6c9a4170b0d97c7abb6726e5210ccead20325350c434f3a4d4c" + sha256 cellar: :any, ventura: "cf8a30118932104eb0e9a53bf3ca590356a6c4a8ab9b87229b9b3fc58df860ec" + sha256 cellar: :any, monterey: "f40738098dfd10961f28deb59266aa468165ca9011658852a3d8a97f51742175" + sha256 cellar: :any, big_sur: "a4b1d70f77f5cab84266761845d3910821315696114c3c19250660d4a9bd18a0" + sha256 cellar: :any, catalina: "9db0f101930faf04be3a8c7cccfafefeb82efc3009e88ab7494296b371631bc3" + sha256 cellar: :any_skip_relocation, arm64_linux: "40d32ca11dd587663402feb5883cddb2db289ec21b807ed6d462658fe1650cf7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5be639eb5da6af885ea1d8c549b8cf4a40aba417b550ea64b29caf6f9600bc4a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + ENV.append "LIBS", "-lstdc++" if OS.linux? + + cd "xlslib" + system "autoreconf", "--force", "--install", "--verbose" # shipped configure hardcodes automake-1.13 + system "./configure", *std_configure_args + system "make", "install" + + (pkgshare/"test").install Dir["targets/test/*.{cpp,c,h,md5}"] + end + + test do + cp_r (pkgshare/"test").children, testpath + system ENV.cxx, "mainCPP.cpp", "md5cpp.cpp", "-o", "test", "-I#{include}/xlslib", "-L#{lib}", "-lxls" + assert_match "# Test finished", shell_output("./test 2>&1") + end +end diff --git a/Formula/x/xlsxio.rb b/Formula/x/xlsxio.rb new file mode 100644 index 0000000000000..0773a3c5505b6 --- /dev/null +++ b/Formula/x/xlsxio.rb @@ -0,0 +1,46 @@ +class Xlsxio < Formula + desc "C library for reading values from and writing values to .xlsx files" + homepage "https://github.com/brechtsanders/xlsxio" + url "https://github.com/brechtsanders/xlsxio/archive/refs/tags/0.2.36.tar.gz" + sha256 "80d3df95a7a108a41f83f0ce4c6706873fd2afafd92424fcccea475a8acbd044" + license "MIT" + head "https://github.com/brechtsanders/xlsxio.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "5dcc3ae7f8963c3ee9f56bb2117d666d089e40b801edd882f77d5281ca5c7001" + sha256 cellar: :any, arm64_sequoia: "9181031f8b1370139f5cd5c40698ad29e63d2e907181385c237be46c6a7789e6" + sha256 cellar: :any, arm64_sonoma: "309fd1194f2edab285b7e492816f61e8fbb342c5ccade5d2613220f6118d48a0" + sha256 cellar: :any, sonoma: "20a7d4de3d612257ef01593a42db2609dedb3a6e883b65f7cf7b49019bbc9341" + sha256 cellar: :any_skip_relocation, arm64_linux: "bed81fdea13430eae538e69af3e1d984e0a275b71aaacf904abf8f8a1d810dd2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a8fe52036112b2ed8497ea996965894e3be4eab10c17dbcf106ff46a0f116a0" + end + + depends_on "libzip" + uses_from_macos "expat" + + def install + system "make", "install", "PREFIX=#{prefix}", "V=1", "WITH_LIBZIP=1" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + int main() { + xlsxiowriter handle; + if ((handle = xlsxiowrite_open("myexcel.xlsx", "MySheet")) == NULL) { + return 1; + } + return xlsxiowrite_close(handle); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lxlsxio_read", "-lxlsxio_write", "-o", "test" + system "./test" + assert_path_exists testpath/"myexcel.xlsx", "Failed to create xlsx file" + end +end diff --git a/Formula/x/xmake.rb b/Formula/x/xmake.rb new file mode 100644 index 0000000000000..ee2315e9e2577 --- /dev/null +++ b/Formula/x/xmake.rb @@ -0,0 +1,38 @@ +class Xmake < Formula + desc "Cross-platform build utility based on Lua" + homepage "https://xmake.io/" + url "https://github.com/xmake-io/xmake/releases/download/v3.0.4/xmake-v3.0.4.tar.gz" + sha256 "b6968dbe266029987bee0a389175f8898042c0bd38f279befc40adaf8e67ce04" + license "Apache-2.0" + head "https://github.com/xmake-io/xmake.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "01dc01361c4cfc17376c214e683f5891d0209218a57d58e611ee57c53a9f0fa0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83bc61a29e6c23c44d62adc7c8706522d1f48cc9cd9dc90d3cbbb75db39fa92e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42e55fa3397900ac95d2ccb30380045e0dfe17ef5ff9436d46344f7112d50c83" + sha256 cellar: :any_skip_relocation, sonoma: "04ff3cf92a32fade36a76f8f8e98a42544ae05ac0a20504c73a83823e8a22add" + sha256 cellar: :any_skip_relocation, arm64_linux: "9340d26e9ad89d242c35eeb67b0abdf3e8346f9c1c2edac916e623eefa6a1b95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a63c23de7fb79c9e22639f794f781ec952cec10e2857698b62db206bb0e2e69a" + end + + uses_from_macos "ncurses" + + on_linux do + depends_on "readline" + end + + def install + system "./configure" + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + ENV.delete "CPATH" + system bin/"xmake", "create", "test" + cd "test" do + system bin/"xmake" + assert_equal "hello world!", shell_output("#{bin}/xmake run").chomp + end + end +end diff --git a/Formula/x/xml-coreutils.rb b/Formula/x/xml-coreutils.rb new file mode 100644 index 0000000000000..7e7b559ebf0e9 --- /dev/null +++ b/Formula/x/xml-coreutils.rb @@ -0,0 +1,47 @@ +class XmlCoreutils < Formula + desc "Powerful interactive system for text processing" + homepage "https://xml-coreutils.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xml-coreutils/xml-coreutils-0.8.1.tar.gz" + sha256 "7fb26d57bb17fa770452ccd33caf288deee1d757a0e0a484b90c109610d1b7df" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "22c2ae517628eda8490bcd905104f86b4007e93617ba053f985fcfe54af1aebc" + sha256 cellar: :any, arm64_sequoia: "f0416be37c963bcfec7ccdab87e91272d03f68a314ceda3b287f154397e9481c" + sha256 cellar: :any, arm64_sonoma: "790f661b91e380a378cd57afab0a102398fd23bb51f08cd793bdcb8a84806716" + sha256 cellar: :any, arm64_ventura: "0074dde2a0a868040ad32a09cba6947f7e27e0b69dcf95c9f05a478764e3a858" + sha256 cellar: :any, arm64_monterey: "27121488a3c491191c025a484e1f76d0ad162f19ba6cddf733a5826cdddf05a9" + sha256 cellar: :any, arm64_big_sur: "7094a5673f2ab6ba2fa45c587397650f4d9b2ccea1ab66925f58ef776683298d" + sha256 cellar: :any, sonoma: "156febc90b868053572dc3f5899c058603b05ec857253bfb1e20911fe753f3a7" + sha256 cellar: :any, ventura: "9a121bba70de700e46049e302ce80bb9ae45ffda8f1007cabbc0169b6e2c085a" + sha256 cellar: :any, monterey: "80d3c4547a1f1a152c3f37477430b6d1628cba725ac191d28f4c024cf064dcfa" + sha256 cellar: :any, big_sur: "6e5400968229c313cab973cffdbb77b88c30a5301066626b34b96e0a46578fc8" + sha256 cellar: :any, catalina: "e098f5b2d9af801bb12c65044668091b175dcca43cec7251acb0d3e1ccad4fed" + sha256 cellar: :any_skip_relocation, arm64_linux: "2af316536161edd2476615f846b91b467e30f0bc5abcec74f0f71516b3c79202" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e62450955a07231a3334f3972e3ea93e622ca55c54ca3e0eae04db5df6d8fc69" + end + + depends_on "s-lang" + + uses_from_macos "expat" + uses_from_macos "ncurses" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.xml").write <<~XML + world! + XML + assert_match(/0\s+1\s+1/, shell_output("#{bin}/xml-wc test.xml")) + end +end diff --git a/Formula/x/xml-security-c.rb b/Formula/x/xml-security-c.rb new file mode 100644 index 0000000000000..79a8694855724 --- /dev/null +++ b/Formula/x/xml-security-c.rb @@ -0,0 +1,44 @@ +class XmlSecurityC < Formula + desc "Implementation of primary security standards for XML" + homepage "https://santuario.apache.org/" + url "https://shibboleth.net/downloads/xml-security-c/3.0.0/xml-security-c-3.0.0.tar.bz2" + sha256 "a4c9e1ae3ed3e8dab5d82f4dbdb8414bcbd0199a562ad66cd7c0cd750804ff32" + license "Apache-2.0" + + livecheck do + url "https://shibboleth.net/downloads/xml-security-c/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "da245352f56c05ef6603edff2f3ce8cd0831aeac2fe02b38ce11e56523fff2e9" + sha256 cellar: :any, arm64_sequoia: "7f42a4e63dc531c44888737938b0e97780bb25053f42f5cd35671294251a9f6d" + sha256 cellar: :any, arm64_sonoma: "82490b87ef4a44db821acf34f13bffcf99fd52a3ff372886ee1f001f6d22433a" + sha256 cellar: :any, arm64_ventura: "b4431f1f09c66f1dc9c73eb72cc78c724e0b0a072f93e26917a114b4eae88ccc" + sha256 cellar: :any, sonoma: "58c0752a0c3a1aa6b51dd7c48058661c0d5c56e7d336412a47db907b851d6451" + sha256 cellar: :any, ventura: "abc08033a4513a659e7938e3708dabc82fd26451d46ea6f400292e4bef28ff98" + sha256 cellar: :any_skip_relocation, arm64_linux: "649bcd04da8d6bf105dab88cc9de4c1b6efb55e4b20a75371e7f4a4b96b47761" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2cce7dc9da8984c26b39b9e203162782902841d2ca55b40299c846522ba17407" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "xerces-c" + + # Apply Debian patch to avoid segfault in test + patch do + url "https://sources.debian.org/data/main/x/xml-security-c/3.0.0-2/debian/patches/Provide-the-Xerces-URI-Resolver-for-the-tests.patch" + sha256 "585938480165026990e874fecfae42601dde368f345f1e6ee54b189dbcd01734" + end + + def install + system "./configure", "--with-openssl=#{Formula["openssl@3"].opt_prefix}", *std_configure_args + system "make", "install" + end + + test do + assert_match "All tests passed", pipe_output("#{bin}/xsec-xtest 2>&1") + end +end diff --git a/Formula/x/xml-tooling-c.rb b/Formula/x/xml-tooling-c.rb new file mode 100644 index 0000000000000..7f823513181de --- /dev/null +++ b/Formula/x/xml-tooling-c.rb @@ -0,0 +1,59 @@ +class XmlToolingC < Formula + desc "Provides a higher level interface to XML processing" + homepage "https://wiki.shibboleth.net/confluence/display/OpenSAML/XMLTooling-C" + url "https://shibboleth.net/downloads/c++-opensaml/3.3.0/xmltooling-3.3.0.tar.bz2" + sha256 "0a2c421be976f3a44b876d6b06ba1f6a2ffbc404f4622f8a65a66c3ba77cb047" + license "Apache-2.0" + revision 1 + + livecheck do + url "https://shibboleth.net/downloads/c++-opensaml/latest/" + regex(/href=.*?xmltooling[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "30aff8b38565a8ff0f556546fa40157724e1413bd98dbb8add9b51434495f88e" + sha256 cellar: :any, arm64_sequoia: "43c77b2eb3b489049fe4a1923c12ad380f85a8817029da1bc9bfd98a6e7accdf" + sha256 cellar: :any, arm64_sonoma: "b28b7d9e5601ecfd757a2fe9c5a19e47d859af11a26b8eb39c83b7917ada9060" + sha256 cellar: :any, arm64_ventura: "95b9dfadcc9aa4a18ae2459d7b79c3a12506d4b036f6fbe3cd03c7fa3c2bdeb7" + sha256 cellar: :any, sonoma: "2e4883f70650b2c17c5e946d67d439926c3cdfc9372d2c63f0dafb99206b0b00" + sha256 cellar: :any, ventura: "5a302d62d4b80b032df08c5f5089996eb67fcfc069532ede784d678aa5cbad1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "de426f7944b9e73ed9281fa8f38c9d75c41c7774aacb57cd29850bb1d36e06e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92ba2dd5fcc658ebf719b038445a0a576b03feb3079ac7cba9c9822b04d8516b" + end + + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "curl" + depends_on "log4shib" + depends_on "openssl@3" + depends_on "xerces-c" + depends_on "xml-security-c" + + uses_from_macos "zlib" + + def install + ENV.cxx11 + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + xmltooling::XMLToolingConfig::getConfig().log_config("CRIT"); + xmltooling::XMLToolingConfig::getConfig().init(); + xmltooling::XMLToolingConfig::getConfig().getPathResolver(); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-L#{lib}", "-lxmltooling", "-L#{Formula["xerces-c"].opt_lib}", "-lxerces-c" + output = shell_output("./test 2>&1") + refute_match("libcurl lacks OpenSSL-specific options", output) + end +end diff --git a/Formula/x/xml2rfc.rb b/Formula/x/xml2rfc.rb new file mode 100644 index 0000000000000..6a50b5120d7b1 --- /dev/null +++ b/Formula/x/xml2rfc.rb @@ -0,0 +1,164 @@ +class Xml2rfc < Formula + include Language::Python::Virtualenv + + desc "Tool to convert XML RFC7749 to the original ASCII or the new HTML look-and-feel" + homepage "https://xml2rfc.tools.ietf.org/" + url "https://files.pythonhosted.org/packages/e5/bf/958badb4a48c9a91abf1e4896f81a2164127f86b53b0b099fc024c849584/xml2rfc-3.31.0.tar.gz" + sha256 "0a1d4ccc4425aed39b5f0f833a8eb1e0f9e8f1897d3441c3a15877dee36cf484" + license "BSD-3-Clause" + head "https://github.com/ietf-tools/xml2rfc.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "cc0e3717a648d36434887e28b1f0efd99ac2b65c7492a6001f75e7ffa4809e87" + sha256 cellar: :any, arm64_sequoia: "c2d946772cdc683607584b14d0a10617b3035c17ad1570606186b2074ed8bd30" + sha256 cellar: :any, arm64_sonoma: "d2b15b0c5389ae4b8bc105e21e94b411646946d7e19250b898adc6668d24ea70" + sha256 cellar: :any, sonoma: "67736a7b67a57e46b185fbdfcd4e85b3f31783b487cb2d8969c95842b019ee23" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b8ea54680a7ccde27e73e92e3b1669a3df2d8f414dff76027db3902f2fd72d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43a237933650d6433443b04abb1e005b83fb49e410bca08c2183d8d208df078b" + end + + depends_on "certifi" => :no_linkage + depends_on "libyaml" + depends_on "python@3.14" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_linux do + depends_on "libxslt" + end + + pypi_packages exclude_packages: "certifi" + + # Keep none-any.whl for `google-i18n-address`, + # if not then there will be an ModuleNotFoundError: No module named 'i18naddress' + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "google-i18n-address" do + url "https://files.pythonhosted.org/packages/37/75/c4dadb4845c8c930b94c8ff9d2dfa9855c0a005366af539fee8095e30765/google_i18n_address-3.1.1-py2.py3-none-any.whl" + sha256 "f66f4fd2b75d1cd371fc0a7678a1d656da4aa3b32932279e78dd6cae776fc23d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "intervaltree" do + url "https://files.pythonhosted.org/packages/50/fb/396d568039d21344639db96d940d40eb62befe704ef849b27949ded5c3bb/intervaltree-3.1.0.tar.gz" + sha256 "902b1b88936918f9b2a19e0e5eb7ccb430ae45cde4f39ea4b36932920d33952d" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz" + sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pycountry" do + url "https://files.pythonhosted.org/packages/76/57/c389fa68c50590881a75b7883eeb3dc15e9e73a0fdc001cdd45c13290c92/pycountry-24.6.1.tar.gz" + sha256 "b61b3faccea67f87d10c1f2b0fc0be714409e8fcdcc1315613174f6466c10221" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "sortedcontainers" do + url "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" + sha256 "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/xml2rfc --version") + + (testpath/"test.xml").write <<~XML + + + + + Put Your Internet Draft Title + + Company +
    + + + Springfield + IL + US + + jdoe@example.com +
    +
    + + + Insert an abstract: MANDATORY. This template is for creating an + Internet-Draft. With some out of scope characters + in Chinese, by Xing Xing, 这里是中文译本 + + +
    + +
    + Text body needs to deal with ‘funny’ characters + Pure out of scope 这里是中文译本 + Some re-mapped characters are ¢ or © + More re-mapped characters are ˜ and € and ^ +
    +
    +
    + XML + + system bin/"xml2rfc", "test.xml", "--text", "--out", "out.txt" + + output = (testpath/"out.txt").read + assert_match "Put Your Internet Draft Title", output + assert_match "J. Doe", output + assert_match "Text body needs to deal with", output + assert_match "这里是中文译本", output + end +end diff --git a/Formula/x/xmlcatmgr.rb b/Formula/x/xmlcatmgr.rb new file mode 100644 index 0000000000000..0e1e9d2dd79c7 --- /dev/null +++ b/Formula/x/xmlcatmgr.rb @@ -0,0 +1,38 @@ +class Xmlcatmgr < Formula + desc "Manipulate SGML and XML catalogs" + homepage "https://xmlcatmgr.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xmlcatmgr/xmlcatmgr/2.2/xmlcatmgr-2.2.tar.gz" + sha256 "ea1142b6aef40fbd624fc3e2130cf10cf081b5fa88e5229c92b8f515779d6fdc" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0fa2f9f885678ab72041ddd5e883d176ffccad39304fcf62c1eacedcdad5c972" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5001b714208e85e53c79584088d9f1d710f82e450119e27ab4a4cd037f914b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2173a5a30ce2c4d47c35e9fef2eb19bc08e50203d59d4728d18ece3209cb2118" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ab7701704b492dcdb3b27fba5423a0d45fd572188cb51461dbe344d83b10909a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "919144de2d285295b51f2fd50c480a89700c746ffcb3430ee8bb8c2dd6a12338" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "27cda943918a3d692517e971f92a8e855d6b93c84eaf0646baff75a9f1f16c63" + sha256 cellar: :any_skip_relocation, sonoma: "4e7b47b8b9d4fa78f3337c1da5a2e10ccbb3cac8237bc0f9444335d4f740bc6d" + sha256 cellar: :any_skip_relocation, ventura: "a363b397c78ed54867c5982f801f9c67307fff26d96905a93f7c22aa1be81733" + sha256 cellar: :any_skip_relocation, monterey: "c401c527f4babe7caee6af925027fb07d300961351548e9ccfed20c6be1ed6a7" + sha256 cellar: :any_skip_relocation, big_sur: "cf19153b0ce232b3fe88cd0d2288a4d94056b3092a8c64483fec2634dc821605" + sha256 cellar: :any_skip_relocation, catalina: "ae788970290574145fa3ca20e389469f1a8582c8b604a50e3e506b7ffcb9faa4" + sha256 cellar: :any_skip_relocation, arm64_linux: "9194b26f616899f7d7edc8db1534c8e5f91fc46231d6e2aa0be1ea9374ff71d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52185546f22943c4a693619db91532acbac6e555e8d747156515af72542c0c43" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + system bin/"xmlcatmgr", "-v" + end +end diff --git a/Formula/x/xmlformat.rb b/Formula/x/xmlformat.rb new file mode 100644 index 0000000000000..033d79faa7d2f --- /dev/null +++ b/Formula/x/xmlformat.rb @@ -0,0 +1,23 @@ +class Xmlformat < Formula + desc "Format XML documents" + homepage "https://web.archive.org/web/20160929174540/http://www.kitebird.com/software/xmlformat/" + url "https://web.archive.org/web/20161110001923/http://www.kitebird.com/software/xmlformat/xmlformat-1.04.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/x/xmlformat/xmlformat_1.04.orig.tar.gz" + sha256 "71a70397e44760d67645007ad85fea99736f4b6f8679067a3b5f010589fd8fef" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cd9bb59ed3d0a6d32cbf62cf15a6fde64801d7ef21fd5d73070b1f3991dbef50" + end + + disable! date: "2025-01-10", because: :repo_removed + + def install + bin.install "xmlformat.pl" => "xmlformat" + end + + test do + system bin/"xmlformat", "--version" + end +end diff --git a/Formula/x/xmlrpc-c.rb b/Formula/x/xmlrpc-c.rb new file mode 100644 index 0000000000000..d14d863e473ff --- /dev/null +++ b/Formula/x/xmlrpc-c.rb @@ -0,0 +1,42 @@ +class XmlrpcC < Formula + desc "Lightweight RPC library (based on XML and HTTP)" + homepage "https://xmlrpc-c.sourceforge.io/" + url "https://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/1.60.05/xmlrpc-c-1.60.05.tgz" + sha256 "67d860062459ea2784c07b4d7913319d9539fa729f534378e8e41c8918f2adf6" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_tahoe: "b6237e79f4ac49f6fa6c1e573c46368d5c6c02f1591e29f2dc991694afff23ba" + sha256 cellar: :any, arm64_sequoia: "c618884cc42669b7cdd4147ffa1897b487ba9c1022c54c048cf0c40cc14ca1a4" + sha256 cellar: :any, arm64_sonoma: "c5322ce6f4b0d23b9c3b30dec56598faf7b9f6a880f679d9e1fb691e39caf5b8" + sha256 cellar: :any, arm64_ventura: "1777fac56090d27fcd30b36e3d650da992bf6ba89e5898c87fa8ca38d34352e5" + sha256 cellar: :any, sonoma: "73add0f6405a8d62a7b76c0538c548a6ae8abc73669c50655f150fa7b35b7aaf" + sha256 cellar: :any, ventura: "e93fdf25ead371a86ef0f61d0af71ed63118f15387dd5e6c5902cfb9dec57df2" + sha256 cellar: :any_skip_relocation, arm64_linux: "7fc68a4419b803d9e9f6badf6966d955e15bbf81bad146d68f0b6be25fbce2d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8abc661587c2c0aa4f4fe5cb086c812b448e4cc59ec388f492d7e871a1ce77dc" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "libxml2" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV.deparallelize + # --enable-libxml2-backend to lose some weight and not statically link in expat + system "./configure", "--enable-libxml2-backend", + "--prefix=#{prefix}" + + # xmlrpc-config.h cannot be found if only calling make install + system "make" + system "make", "install" + end + + test do + system bin/"xmlrpc-c-config", "--features" + end +end diff --git a/Formula/x/xmlsectool.rb b/Formula/x/xmlsectool.rb new file mode 100644 index 0000000000000..5c99c9b6d0a30 --- /dev/null +++ b/Formula/x/xmlsectool.rb @@ -0,0 +1,29 @@ +class Xmlsectool < Formula + desc "Check schema validity and signature of an XML document" + homepage "https://wiki.shibboleth.net/confluence/display/XSTJ3/xmlsectool+V3+Home" + url "https://shibboleth.net/downloads/tools/xmlsectool/4.0.0/xmlsectool-4.0.0-bin.zip" + sha256 "32a5fd3c92cddb7833249e22c97253fbbf02ae2dc0a385896e6e7ac1d1a77de4" + license "Apache-2.0" + + livecheck do + url "https://shibboleth.net/downloads/tools/xmlsectool/latest/" + regex(/href=.*?xmlsectool[._-]v?(\d+(?:\.\d+)+)(?:-bin)?\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "8c96a42cbce1a2f648e740c9b81d868009eccd90cb83ef3cfd74a2cdcf06c6f3" + end + + depends_on "openjdk" + + def install + prefix.install "doc/LICENSE.txt" + rm_r("doc") + libexec.install Dir["*"] + (bin/"xmlsectool").write_env_script "#{libexec}/xmlsectool.sh", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + system bin/"xmlsectool", "--listAlgorithms" + end +end diff --git a/Formula/x/xmlstarlet.rb b/Formula/x/xmlstarlet.rb new file mode 100644 index 0000000000000..40eb9a8fda67c --- /dev/null +++ b/Formula/x/xmlstarlet.rb @@ -0,0 +1,42 @@ +class Xmlstarlet < Formula + desc "XML command-line utilities" + homepage "https://xmlstar.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xmlstar/xmlstarlet/1.6.1/xmlstarlet-1.6.1.tar.gz" + sha256 "15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ba7f4194cacbb498274e5b24f9d04513f5bfc11ccb6c8b517a66e1988527b4f2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4adaaf3c7da18a5c7349ccf69fadf95ea8cd878f5cac627a2b9f90b89c519f4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5e323357004f390e9362f5949b0e396b2436c0ed66a4c81603f79eee1d8eeea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0c3177bfbd5b1a22f17a4088a81dc5826960f4df15347d975e4facbc1883a6e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "86e4e8bd44e5a7c143dd2a4395c535ddcac9c08bb6e910688ab0138ad3151d1e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d654b90521d07ffc1304253fd2b927f9813effa5a65c3f6c43b67838077c009d" + sha256 cellar: :any_skip_relocation, sonoma: "ff6274bea23b8762c233101fc3cecab85dc85c666a1b05d24b5b4cdcbd41e053" + sha256 cellar: :any_skip_relocation, ventura: "7d3f48d20afe2d69a9577d645c2da9add1e64c1044e9848509807be5af213715" + sha256 cellar: :any_skip_relocation, monterey: "5af39f6a67faf86069e1bf504a000ed321b18ad5d2cf5fe90978dc00fb32c1dd" + sha256 cellar: :any_skip_relocation, big_sur: "bc3baa847a617f3d67000ff14e96126f9bbdf54e916b6c693a2c8bf633ca0bfa" + sha256 cellar: :any_skip_relocation, catalina: "2a679570811f553e345748516fa37c2d4b529a75533bdb73316077aaed5ab8f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4a4b4274a5bc46c0e1daf5662194f2f66b1d8906031e1eb2be972f3158f2da8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c682deca05e96d3b8d42c2ab783a36cf06f6a6e3733cc4830395f9db26d51b3" + end + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + def install + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make" + system "make", "install" + bin.install_symlink "xml" => "xmlstarlet" + end + + test do + system bin/"xmlstarlet", "--version" + end +end diff --git a/Formula/x/xmlto.rb b/Formula/x/xmlto.rb new file mode 100644 index 0000000000000..6c92423ae110e --- /dev/null +++ b/Formula/x/xmlto.rb @@ -0,0 +1,62 @@ +class Xmlto < Formula + desc "Convert XML to another format (based on XSL or other tools)" + homepage "https://pagure.io/xmlto/" + url "https://pagure.io/xmlto/archive/0.0.29/xmlto-0.0.29.tar.gz" + sha256 "40504db68718385a4eaa9154a28f59e51e59d006d1aa14f5bc9d6fded1d6017a" + license "GPL-2.0-or-later" + + livecheck do + url "https://pagure.io/xmlto.git" + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "91da6f2fe6817daf5c455fe6c5c63b01188c71d017d16b37dbb49ee5bf4355d4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a131d56e2e03b70f96c405262bf31ab9944de622d799b7341c1fe9b07ea0e34a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aeeb037d079947e51c9e743fd1c87dcf4eaa6db340afeceb880fa1e91fe86129" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a3a8cc72243b732191e706c96bf4e9a827300d529a3226f6a4ca26ee5fef5ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "479938c37c2f5bda455b31dddc2a587f464b731cc887a698f0a90f89de3cd6ac" + sha256 cellar: :any_skip_relocation, sonoma: "94b2d369c743d833b9e4fa2f6658c47f4a85fa8c94202ddcd6db88244f27e7d4" + sha256 cellar: :any_skip_relocation, ventura: "fbcc16655585b93b6c3598bd2e712551f88e48bc6062f045914e7f22b4c6bf38" + sha256 cellar: :any_skip_relocation, monterey: "6c44cf87fbed1ee9587e74be7fa06d5a8cc392509a05d9f6a37f69d99e765822" + sha256 cellar: :any_skip_relocation, arm64_linux: "f699cf8ced80aa5aa63079d7f44b35a12445b5df94923ba64843596832ca8757" + sha256 cellar: :any_skip_relocation, x86_64_linux: "350a0d789e034e3717a5e03ce2110787ded5b6b9a4582b38152c670b10909e0e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + depends_on "docbook" + depends_on "docbook-xsl" + + uses_from_macos "libxslt" + + on_macos do + # Doesn't strictly depend on GNU getopt, but macOS system getopt(1) + # does not support longopts in the optstring, so use GNU getopt. + depends_on "gnu-getopt" + end + + def install + # GNU getopt is keg-only, so point configure to it + ENV["GETOPT"] = Formula["gnu-getopt"].opt_bin/"getopt" if OS.mac? + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + ENV.deparallelize + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test").write <<~EOS + + Passing test. + + EOS + assert_equal "Passing test.", pipe_output("#{bin}/xmlif foo=bar", (testpath/"test").read).strip + end +end diff --git a/Formula/x/xmltoman.rb b/Formula/x/xmltoman.rb new file mode 100644 index 0000000000000..18acc87022654 --- /dev/null +++ b/Formula/x/xmltoman.rb @@ -0,0 +1,65 @@ +require "language/perl" + +class Xmltoman < Formula + include Language::Perl::Shebang + + desc "XML to manpage converter" + homepage "https://sourceforge.net/projects/xmltoman/" + url "https://downloads.sourceforge.net/project/xmltoman/xmltoman/xmltoman-0.4.tar.gz/xmltoman-0.4.tar.gz" + sha256 "948794a316aaecd13add60e17e476beae86644d066cb60171fc6b779f2df14b0" + license "GPL-2.0-or-later" + revision 2 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "31d84ea84ef79d74cd713bcbcfae3b30ed1ad0b1ea82c1a76e6f76be9fba5827" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "89d762e0509fc153a86b20d8071f20b86514f079eed038ae78c44bf47d33c53b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89d762e0509fc153a86b20d8071f20b86514f079eed038ae78c44bf47d33c53b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89d762e0509fc153a86b20d8071f20b86514f079eed038ae78c44bf47d33c53b" + sha256 cellar: :any_skip_relocation, sonoma: "50221d09be7e7840727a931f8d771b2ee35c587870a070ac0b71115ac8636eb7" + sha256 cellar: :any_skip_relocation, ventura: "50221d09be7e7840727a931f8d771b2ee35c587870a070ac0b71115ac8636eb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "60ce2ada67d84c2b37d2e48ef5ca6ef0c51116194f4d10cea80d4210dba84d05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44f936fff8828e2d4766a273f91521c76e87e3895d43d0a8cc823a18b214f910" + end + + uses_from_macos "perl" + + resource "XML::Parser" do + on_linux do + url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz" + sha256 "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216" + end + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |res| + res.stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "PERL5LIB=#{ENV["PERL5LIB"]}" + system "make", "install" + end + end + + inreplace "xmltoman", "#!/usr/bin/perl -w", "#!/usr/bin/env perl" + rewrite_shebang detected_perl_shebang, "xmlmantohtml" + end + + # generate the man files from their original XML sources + system "./xmltoman xml/xmltoman.1.xml > xmltoman.1" + system "./xmltoman xml/xmlmantohtml.1.xml > xmlmantohtml.1" + + man1.install %w[xmltoman.1 xmlmantohtml.1] + bin.install %w[xmltoman xmlmantohtml] + pkgshare.install %w[xmltoman.xsl xmltoman.dtd xmltoman.css] + + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) if OS.linux? + end + + test do + assert_match "You need to specify a file to parse", shell_output("#{bin}/xmltoman 2>&1", 1).strip + end +end diff --git a/Formula/x/xmodmap.rb b/Formula/x/xmodmap.rb new file mode 100644 index 0000000000000..900a32514a796 --- /dev/null +++ b/Formula/x/xmodmap.rb @@ -0,0 +1,46 @@ +class Xmodmap < Formula + desc "Modify keymaps and pointer button mappings in X" + homepage "https://gitlab.freedesktop.org/xorg/app/xmodmap" + url "https://www.x.org/releases/individual/app/xmodmap-1.0.11.tar.xz" + sha256 "9a2f8168f7b0bc382828847403902cb6bf175e17658b36189eac87edda877e81" + license "MIT-open-group" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "3729b90bb68b33194e9a4ce31e854ecb2070ba5e5af11953f7c289cca5f17868" + sha256 cellar: :any, arm64_sequoia: "1a71168c6e5ae767004d75967ece8e8f41971b5e89072e05d1f68072c8857486" + sha256 cellar: :any, arm64_sonoma: "735be4fae3324a706814ab035dd4c7dbb9bf1a5095e15b00fed401376bab18cc" + sha256 cellar: :any, arm64_ventura: "7b0cf54bc0c8a2698037c366636a34d77fa31d3ae73e6024a51a5d6196e6a6e6" + sha256 cellar: :any, arm64_monterey: "60bf2e38a007c44f962abaea1a1021c5c2fda7af694cebf2d5b0cafeec95f117" + sha256 cellar: :any, arm64_big_sur: "60a4ba16980f59c46bd94b18ede68b80fe9ed792375aaef1e7a4f317fb30859a" + sha256 cellar: :any, sonoma: "0a6d9f46dfc724b3e19dd881676f5ef2911aa52c13c2ebf901e3edca3c862667" + sha256 cellar: :any, ventura: "c6c74699c3c0f00941f5d7efc899ceaa34c7649b1722800665d1b3bcaa0b0afc" + sha256 cellar: :any, monterey: "93d72a0e4ba5b24d81acee6f9432fb008f0ca0cb265708ada4a0f338978c29fe" + sha256 cellar: :any, big_sur: "3971a72f9a768b7d3648af48750db8fc25f89733b0824d2695cd2022b00ca0db" + sha256 cellar: :any_skip_relocation, arm64_linux: "b49840b06e245234d26698932373881179ff1763e348dfb3dfb22fd993f45371" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8866422cea1dfecb73e767819e793be7d9f6acf91c1f21611809126c54985c4" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + depends_on "xorg-server" => :test + + depends_on "libx11" + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + fork do + exec Formula["xorg-server"].bin/"Xvfb", ":1" + end + ENV["DISPLAY"] = ":1" + sleep 10 + sleep 10 if OS.mac? && Hardware::CPU.intel? + assert_match "pointer buttons defined", shell_output("#{bin}/xmodmap -pp") + end +end diff --git a/Formula/x/xmount.rb b/Formula/x/xmount.rb new file mode 100644 index 0000000000000..8fb73d1cdd6ac --- /dev/null +++ b/Formula/x/xmount.rb @@ -0,0 +1,30 @@ +class Xmount < Formula + desc "Convert between multiple input & output disk image types" + homepage "https://www.sits.lu/xmount" + url "https://code.sits.lu/foss/xmount/-/archive/1.2.1/xmount-1.2.1.tar.bz2" + sha256 "14cbbbebcdf1a540d79f64ac24b37882a694292e60afdee1c6923b8baf3eb877" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_linux: "3e4054ba9bd6912e191450e8579069e009b7564c95981ae563a97a4362cf7d22" + sha256 x86_64_linux: "5b56b805ee90090f81f39d5825499557e7fbf4073b9e7d11f7265ac3ad15bf09" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "afflib" + depends_on "libewf" + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"xmount", "--version" + end +end diff --git a/Formula/x/xmp.rb b/Formula/x/xmp.rb new file mode 100644 index 0000000000000..b6525a4757ab9 --- /dev/null +++ b/Formula/x/xmp.rb @@ -0,0 +1,52 @@ +class Xmp < Formula + desc "Command-line player for module music formats (MOD, S3M, IT, etc)" + homepage "https://xmp.sourceforge.net/" + url "https://github.com/libxmp/xmp-cli/releases/download/xmp-4.2.0/xmp-4.2.0.tar.gz" + sha256 "dc54513af9a4681029a1243fd0c9cdf153d813a1125de6c782926674285bc5ae" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "36e826302cd05a73582ffc6d1a196b64c71aa256069b9a605da25ab1692cb2d4" + sha256 arm64_sequoia: "656fb3759733a4e097ca973439b9ed791ddfeb768bbbe8203b9aa5684bb5883b" + sha256 arm64_sonoma: "95c30bbd87a818cdc81a4a90f27ba11585c5e11ddebfa5bc552e20246a4ab26c" + sha256 arm64_ventura: "0281add88058d565b3265efce120612e0602ba1b91b6a40f4334638917bb699f" + sha256 arm64_monterey: "4701d7463ddc87e673d22631004939224605bb24c30b6054795d2844f514cabe" + sha256 arm64_big_sur: "3213693148aa35b597cdcc6ef098e3934663b37dc5beb1c88d3a5d65ebadac5e" + sha256 sonoma: "9ba602fd8dd7bf63d5aa794f5b3e265cca8b851107bae5db9dbb40396cb47eb8" + sha256 ventura: "f6b3bd880711583a9412817d663c83d05c64e70bde3fc17a20e050af70b9cb8c" + sha256 monterey: "151f11955e3f9db1c51ebde5e40ec1af12a3856ab50940f585983a3d59ff186f" + sha256 big_sur: "43193a0619e22f454184a1427ce8b306a22327b807f3f8d81fdb726357bc9842" + sha256 arm64_linux: "43d7f8abecadad5b2730da6399bce8db70e7f27289be34a5fc404afccfda33c5" + sha256 x86_64_linux: "bfa9f0f48823e7861c008d89c25cd43bdbe3553196b6684d15d962c8ca7087b4" + end + + head do + url "https://github.com/libxmp/xmp-cli.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libxmp" + + def install + if build.head? + system "glibtoolize" + system "aclocal" + system "autoconf" + system "automake", "--add-missing" + end + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "Fast Tracker II", shell_output("#{bin}/xmp --list-formats") + assert_match "Extended Module Player #{version}", shell_output("#{bin}/xmp --version") + end +end diff --git a/Formula/x/xmq.rb b/Formula/x/xmq.rb new file mode 100644 index 0000000000000..2b86894738613 --- /dev/null +++ b/Formula/x/xmq.rb @@ -0,0 +1,49 @@ +class Xmq < Formula + desc "Tool and language to work with xml/html/json" + homepage "https://libxmq.org" + url "https://github.com/libxmq/xmq/archive/refs/tags/4.0.1.tar.gz" + sha256 "846cdd078209ee15189420c1ec47e6ffcf97fc5b196cd78b9952dc5de6c3e50e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7e8e71d92b11f5e3ec1b5b5a863c3d173c967286d301006af555b6b9ecfb6a23" + sha256 cellar: :any, arm64_sequoia: "42095874ba74ca331ada2c067d2fbcd6e19efe70413c5f718bb4b09aef313e5d" + sha256 cellar: :any, arm64_sonoma: "d57deede2a93c04f0f14906dd26b227cf4a155f3cbbbfec8f8907058bf0c5fc3" + sha256 cellar: :any, arm64_ventura: "8aca1bdd68bd3920d5849df45614c55c38af154ee1dd40e28cd4828ca614eb6a" + sha256 cellar: :any, sonoma: "bf5db137f33a6b09d401804efd10ce28710a2143d8adb482a56dc24b275e26ad" + sha256 cellar: :any, ventura: "12e55f6db9480dc671c5d23f603b88c9adac0051391b9fcbdc37116974f84918" + sha256 cellar: :any_skip_relocation, arm64_linux: "165b86a489c050cdfedb74e27c16ef77d3bfb90c0f1d8e73cde376b6552531e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "abaff1f72a7abb52ae8a84f576fae750c4322345327209ad996c363709fc3363" + end + + head do + url "https://github.com/libxmq/xmq.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.xml").write <<~XML + + Hello Homebrew! + + XML + output = shell_output("#{bin}/xmq test.xml select //child") + assert_match "Hello Homebrew!", output + end +end diff --git a/Formula/x/xmrig.rb b/Formula/x/xmrig.rb new file mode 100644 index 0000000000000..aab1e5c7109b7 --- /dev/null +++ b/Formula/x/xmrig.rb @@ -0,0 +1,76 @@ +class Xmrig < Formula + desc "Monero (XMR) CPU miner" + homepage "https://github.com/xmrig/xmrig" + url "https://github.com/xmrig/xmrig/archive/refs/tags/v6.24.0.tar.gz" + sha256 "3521c592a18ada781d79c919ea6c1b7e5a8bcfe2ec666789bc55fd88a2aee8d3" + license "GPL-3.0-or-later" + head "https://github.com/xmrig/xmrig.git", branch: "dev" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "48cd8a81cd2082dc4f23a93171c1046d704c7bb6c914d5edd2045de584f329ee" + sha256 cellar: :any, arm64_sequoia: "f84460bc7617a39bbd1d1cc7f2fa93d0cdd692bd935ca313ff482fa81d8175da" + sha256 cellar: :any, arm64_sonoma: "76050f2e875de91d54caeb895b385f60a324515b359b314d2d0e303d5aa2d808" + sha256 cellar: :any, arm64_ventura: "499692d0ece7d0207b23e6f11a77d55f4cd96e99a57ebe787ff995232753bf3e" + sha256 cellar: :any, sonoma: "523eedc13a5e34ca81d8ab372449b633af5945c827cd74b826feed152b2bc5d3" + sha256 cellar: :any, ventura: "496fb01300b5ac730090858b2ec0bcb680935262c04964b0b0c6a066ef22ab31" + sha256 cellar: :any_skip_relocation, arm64_linux: "38467683be8b9ba68eab0fe01caa3a4fc03bcd4d758f4235d4002bae52f067c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5adb790b5d9a38b7348293fbce85964cee1396abfb68da54f18af699b88c1138" + end + + depends_on "cmake" => :build + depends_on "hwloc" + depends_on "libuv" + depends_on "openssl@3" + + def install + # Use shared OpenSSL on macOS. In cmake/OpenSSL.cmake: + # elseif (APPLE) + # set(OPENSSL_USE_STATIC_LIBS TRUE) + # endif() + inreplace "cmake/OpenSSL.cmake", "OPENSSL_USE_STATIC_LIBS TRUE", "OPENSSL_USE_STATIC_LIBS FALSE" + + # Allow using shared libuv. In cmake/FindUV.cmake: + # find_library(UV_LIBRARY NAMES libuv.a uv libuv ...) + inreplace "cmake/FindUV.cmake", "libuv.a", "" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/xmrig" + pkgshare.install "src/config.json" + end + + test do + require "pty" + assert_match version.to_s, shell_output("#{bin}/xmrig -V") + test_server = "donotexist.localhost:65535" + output = "" + args = %W[ + --no-color + --max-cpu-usage=1 + --print-time=1 + --threads=1 + --retries=1 + --url=#{test_server} + ] + PTY.spawn(bin/"xmrig", *args) do |r, _w, pid| + sleep 5 + Process.kill("SIGINT", pid) + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + assert_match(/POOL #1\s+#{Regexp.escape(test_server)} algo auto/, output) + + match = output.match? "#{test_server} DNS error: \"unknown node or service\"" + match ||= output.match?(/#{Regexp.escape(test_server)} (?:::1|127\.0\.0\.1) connect error: "connection refused"/) + assert match, "Expected error message not found in output" + end +end diff --git a/Formula/x/xnvme.rb b/Formula/x/xnvme.rb new file mode 100644 index 0000000000000..0d2449804bcee --- /dev/null +++ b/Formula/x/xnvme.rb @@ -0,0 +1,85 @@ +class Xnvme < Formula + desc "Cross-platform libraries and tools for efficient I/O and low-level control" + homepage "https://xnvme.io/" + url "https://github.com/xnvme/xnvme/releases/download/v0.7.5/xnvme-fat-0.7.5.tar.gz" + sha256 "67e1e55966f150c68cbe386112202cb3d1af8831b7202a251986b7e63cf34f3a" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f5a3ced6f2d26e622f6a619c2f8606916aafb9c6704cb58a52a7b976f9f00fdc" + sha256 cellar: :any, arm64_sequoia: "669d2c6ac4f5091f07ec36cd8376e6dde81e8c38d20154efa1b038e7b1d2b391" + sha256 cellar: :any, arm64_sonoma: "387a8c914b0348bda2aa34f3d15292f649f768ff8a4a4baa329659200b903681" + sha256 cellar: :any, arm64_ventura: "98be4270d703ba24e95af9714302b41bf45346a3ecc69220889a889381210c9d" + sha256 cellar: :any, sonoma: "ab2c11503d96c5d333b599ce0c2a18a4f25712bb8c7c53c681b34de481d8c6b4" + sha256 cellar: :any, ventura: "f91938361da2f149e42e493be2702bafbc55221854f92c40cc5a7b3ffef7639b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9d905badf1945c4991a143fb6d817d510998578f76afe30130894b1eae8a07e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f6f44f9a1deeec057afbff777aa156acf353fbf02f6c85ecb858a4d741baf69" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + def install + # We do not have SPDK nor libvfn on macOS, thus disabling these + # The examples and tests are also a bit superfluous, so disable those as well + args = %w[ + -Dwith-spdk=disabled + -Dwith-libvfn=disabled + -Dtests=false + -Dexamples=false + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + # Verify cli usage using a "ramdisk" of 1GB + output = shell_output("#{bin}/xnvme library-info") + assert_match "XNVME_BE_RAMDISK_ENABLED", output + + output = shell_output("#{bin}/xnvme info 1GB --be ramdisk") + assert_match "uri: '1GB'", output + assert_match "type: XNVME_GEO_CONVENTIONAL", output + assert_match "tbytes: 1073741824", output + + # Verify library usage using a ramdisk of 1GB + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char **argv) { + struct xnvme_opts opts = xnvme_opts_default(); + struct xnvme_dev *dev; + + dev = xnvme_dev_open("1GB", &opts); + if (!dev) { + perror("xnvme_dev_open()"); + return 1; + } + + xnvme_dev_pr(dev, XNVME_PR_DEF); + xnvme_dev_close(dev); + + return 0; + } + C + + # Build the example using pkg-config for build-options + flags = shell_output("pkg-config xnvme --libs --cflags").strip + system ENV.cc, "test.c", "-o", "test", *flags.split + + # Run it and check the output, this should produce the same output as the + # 'xnvme library-info' command, thus the output-assertion is the same + output = shell_output("./test info 1GB --be ramdisk") + assert_match "uri: '1GB'", output + assert_match "type: XNVME_GEO_UNKNOWN", output + assert_match "tbytes: 0", output + end +end diff --git a/Formula/x/xonsh.rb b/Formula/x/xonsh.rb new file mode 100644 index 0000000000000..50b877b922524 --- /dev/null +++ b/Formula/x/xonsh.rb @@ -0,0 +1,57 @@ +class Xonsh < Formula + include Language::Python::Virtualenv + + desc "Python-powered, cross-platform, Unix-gazing shell language and command prompt" + homepage "https://xon.sh/" + url "https://files.pythonhosted.org/packages/ea/eb/8f544caca583c5f9f0ae7d852769fdb8ed5f63b67646a3c66a2d19357d56/xonsh-0.19.9.tar.gz" + sha256 "4cab4c4d7a98aab7477a296f12bc008beccf3d090c6944f0b3375d80a574c37d" + license "BSD-2-Clause-Views" + head "https://github.com/xonsh/xonsh.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "cb4d66b56fd882428f592e56d9d6078a44448fb7083bcc54197794dbb88580b2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2a308a8f33cac144dac27e389a8845601cccdc083362ee01bc15a793336023e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a910846d425f9eb8c6dc3822d12889689a63e31d517d2da79e828b9f2e2248c4" + sha256 cellar: :any_skip_relocation, sonoma: "107df7f91e3045034b010e6a61fa77892adefa2c619df58d8b7adcd55995a778" + sha256 cellar: :any_skip_relocation, arm64_linux: "41e18f6c2baf3d3a7bc9fc6ff7ee26e92493adc83fbee7a57bfc2b4c803ca8e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68d93dc0ff21fd4dbe5b48cabd8709d340f45ac2710b8b1c09a6e0f4c98603e7" + end + + depends_on "python@3.14" + + pypi_packages package_name: "xonsh[ptk,pygments,proctitle]" + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz" + sha256 "244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/8d/48/49393a96a2eef1ab418b17475fb92b8fcfad83d099e678751b05472e69de/setproctitle-1.3.7.tar.gz" + sha256 "bc2bc917691c1537d5b9bca1468437176809c7e11e5694ca79a9ca12345dcb9e" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "4", shell_output("#{bin}/xonsh -c 2+2") + end +end diff --git a/Formula/x/xorg-server.rb b/Formula/x/xorg-server.rb new file mode 100644 index 0000000000000..3c0750bb59116 --- /dev/null +++ b/Formula/x/xorg-server.rb @@ -0,0 +1,142 @@ +class XorgServer < Formula + desc "X Window System display server" + homepage "https://www.x.org" + url "https://www.x.org/releases/individual/xserver/xorg-server-21.1.20.tar.xz" + sha256 "7695bc61824b3a81b6bad2f78b05400ca015003de402d1b322117105b702e937" + license all_of: ["MIT", "APSL-2.0"] + + bottle do + sha256 arm64_tahoe: "edcc8f7f93c9c7b94ce3b60df6a876a360b2b9a47c930a06a1c04333485f7920" + sha256 arm64_sequoia: "2ccb44fb003a0fb78d1cf76cedb487b257c02bef41e7e2971123b94263a3b35e" + sha256 arm64_sonoma: "4564943dd94458bfaa7600510b739d05a317b716fb0b3fae36e1645d4596d719" + sha256 sonoma: "dcd00cf2a3d45b9694155b31cab6b4546677e872ea2bdfa36b0dfd4647451e4b" + sha256 arm64_linux: "fc2d46cd50faac24dcc2469f612e33f70f3811f903de31405e4f2389201484b3" + sha256 x86_64_linux: "787b07cc6724a0f34855566d8fdb2b63dd77ec9520469536c818af9a98406fb2" + end + + depends_on "font-util" => :build + depends_on "libxkbfile" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" => :build + depends_on "xtrans" => :build + + depends_on "libx11" + depends_on "libxau" + depends_on "libxcb" + depends_on "libxdmcp" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxfont2" + depends_on "mesa" + depends_on "pixman" + depends_on "xauth" + depends_on "xcb-util" + depends_on "xcb-util-image" + depends_on "xcb-util-keysyms" + depends_on "xcb-util-renderutil" + depends_on "xcb-util-wm" + depends_on "xkbcomp" + depends_on "xkeyboard-config" + + on_macos do + depends_on "libapplewm" + end + + on_linux do + depends_on "dbus" + depends_on "libdrm" + depends_on "libepoxy" + depends_on "libpciaccess" + depends_on "libtirpc" + depends_on "libxcvt" + depends_on "libxshmfence" + depends_on "nettle" + depends_on "systemd" + + resource "xvfb-run" do + url "https://salsa.debian.org/xorg-team/xserver/xorg-server/-/raw/xorg-server-2_21.1.13-3/debian/local/xvfb-run" + sha256 "fd05e0f8e6207c3984b980a0f037381c9c4a6f22a6dd94fdcfa995318db2a0a4" + end + + resource "xvfb-run.1" do + url "https://salsa.debian.org/xorg-team/xserver/xorg-server/-/raw/xorg-server-2_21.1.13-3/debian/local/xvfb-run.1" + sha256 "08f14f55e14e52e5d98713c4d8f25ae68d67e2ee188dc0247770c6ada6e27c05" + end + end + + def install + # ChangeLog contains some non relocatable strings + rm "ChangeLog" + meson_args = std_meson_args.map { |s| s.sub prefix, HOMEBREW_PREFIX } + %W[ + -Dxephyr=true + -Dxf86bigfont=true + -Dxcsecurity=true + + -Dbundle-id-prefix=#{Formula["xinit"].plist_name.chomp ".startx"} + -Dbuilder_addr=#{tap.remote} + -Dbuilder_string=#{tap.name} + ] + # macOS doesn't provide `authdes_cred` so `secure-rpc=false` + # glamor needs GLX with `libepoxy` on macOS + if OS.mac? + meson_args += %w[ + -Dsecure-rpc=false + -Dapple-applications-dir=libexec + ] + end + + # X11.app need startx etc. in the same directory + destdir = buildpath/"dest" + system "meson", "setup", *meson_args, "build" + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build", "--destdir", destdir + prefix.install Dir["#{destdir}#{HOMEBREW_PREFIX}/*"] + # follow https://github.com/XQuartz/XQuartz/blob/main/compile.sh#L955 + bin.install_symlink bin/"Xquartz" => "X" if OS.mac? + + if OS.linux? + bin.install resource("xvfb-run") + man1.install resource("xvfb-run.1") + end + end + + def caveats + <<~EOS + To launch X server, it is recommend to install xinit, + especially on macOS, otherwise X11.app will not work: + brew install xinit + If cask xquartz is installed, this link may be helpful: + https://www.xquartz.org/FAQs.html#want-another-x11app-server + EOS + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + xcb_connection_t *connection = xcb_connect(NULL, NULL); + int has_err = xcb_connection_has_error(connection); + assert(has_err == 0); + xcb_disconnect(connection); + return 0; + } + C + xcb = Formula["libxcb"] + system ENV.cc, "./test.c", "-o", "test", "-I#{xcb.include}", "-L#{xcb.lib}", "-lxcb" + + xvfb_pid = spawn bin/"Xvfb", ":1" + with_env(DISPLAY: ":1") do + sleep 10 + sleep 30 if OS.mac? && Hardware::CPU.intel? + system "./test" + system bin/"xvfb-run", "./test" if OS.linux? + ensure + Process.kill("TERM", xvfb_pid) + end + end +end diff --git a/Formula/x/xorgproto.rb b/Formula/x/xorgproto.rb new file mode 100644 index 0000000000000..1e28671b5084e --- /dev/null +++ b/Formula/x/xorgproto.rb @@ -0,0 +1,44 @@ +class Xorgproto < Formula + desc "X.Org: Protocol Headers" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/proto/xorgproto-2024.1.tar.gz" + sha256 "4f6b9b4faf91e5df8265b71843a91fc73dc895be6210c84117a996545df296ce" + license "MIT" + + livecheck do + url :stable + regex(/href=.*?xorgproto[._-]v?(\d+\.\d+(?:\.([0-8]\d*?)?\d(?:\.\d+)*)?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b657ca11743e2fa56088464f5eaceeae524af6eb3b5c0f6e916678209f25a6af" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91066363512e4a3b01644398886815eb370bc8f62611f7ee20c23c7350b4422e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3307601f0a03f6c51b640fb11064ef2c2264cc9c20de0604a255370edee3f7f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3307601f0a03f6c51b640fb11064ef2c2264cc9c20de0604a255370edee3f7f4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3307601f0a03f6c51b640fb11064ef2c2264cc9c20de0604a255370edee3f7f4" + sha256 cellar: :any_skip_relocation, sonoma: "3307601f0a03f6c51b640fb11064ef2c2264cc9c20de0604a255370edee3f7f4" + sha256 cellar: :any_skip_relocation, ventura: "3307601f0a03f6c51b640fb11064ef2c2264cc9c20de0604a255370edee3f7f4" + sha256 cellar: :any_skip_relocation, monterey: "3307601f0a03f6c51b640fb11064ef2c2264cc9c20de0604a255370edee3f7f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e87b7448405526b6fdb83a082b5cf4696f4042f7cf5c2c2195f94f8faa04e67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc1ef8db0fe244a7a47541fe8494131a281814a4110d3af41d76226274601df7" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "util-macros" => :build + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_equal "-I#{include}", shell_output("pkg-config --cflags xproto").chomp + assert_equal "-I#{include}/X11/dri", shell_output("pkg-config --cflags xf86driproto").chomp + end +end diff --git a/Formula/x/xorgrgb.rb b/Formula/x/xorgrgb.rb new file mode 100644 index 0000000000000..23c05a63ae70f --- /dev/null +++ b/Formula/x/xorgrgb.rb @@ -0,0 +1,44 @@ +class Xorgrgb < Formula + desc "X.Org: color names database" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/app/rgb-1.1.0.tar.gz" + sha256 "77142e3d6f06cfbfbe440e29596765259988a22db40b1e706e14b8ba4c962aa5" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b4c43ac48800387feaa8d8d91d20977069578a7a13efdf0f4198b9a2eb763062" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4cc8217eee8a4df6d597f4f6ab26718712256edd2bb0c5babcd646719ef052c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4148ce78e43c9aae8e75e639f5ebab603d20cd3aabd2e6421b71d967ac92aab7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25ddac19c5361bd478b8c9ac4fab8210be7b8811f9b2edf586156604badfce23" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8d9bb5c41b1ef76f04324db74b789330210d48be78c751ce4d0439e3b24a8b49" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "30ee14ffdbb2418cc39884775ba8b61ab19452cd3e4e95609d5c67ac2bf56013" + sha256 cellar: :any_skip_relocation, sonoma: "f65ce4c85f3617949dcb191a098b6fcf70c1815a76831753953734504ed3f6b0" + sha256 cellar: :any_skip_relocation, ventura: "39d8b12e69f0c07bfa6c78f682ed3160b81e0a986871821ec8871772f01bb5af" + sha256 cellar: :any_skip_relocation, monterey: "8a5606f9cdba7608ebc27042ced7920658ed39593a0338a0d02ccdd067290fe4" + sha256 cellar: :any_skip_relocation, big_sur: "db4fb9cf83a6fcc75036c4c3b3fdac6ac0fe47108311a1f83a35ebbe97e7f1e7" + sha256 cellar: :any_skip_relocation, catalina: "4f39373ce62247b2a47ff8f0a02fbdcb9af7e280aa7b1fa7443865024a0f561c" + sha256 cellar: :any_skip_relocation, arm64_linux: "99fca7eae8c246f93d1f36f833c7031caf3d10a1f6273a556054396847f23679" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6c3eca82aa9624b8b521d9d0e5cec68b9391538717c36c4d438edc75bb0085f" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" => :build + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match "gray100", shell_output("#{bin}/showrgb").chomp + end +end diff --git a/Formula/x/xorriso.rb b/Formula/x/xorriso.rb new file mode 100644 index 0000000000000..12e3b376d5d3b --- /dev/null +++ b/Formula/x/xorriso.rb @@ -0,0 +1,45 @@ +class Xorriso < Formula + desc "ISO9660+RR manipulation tool" + homepage "https://www.gnu.org/software/xorriso/" + url "https://ftpmirror.gnu.org/gnu/xorriso/xorriso-1.5.6.pl02.tar.gz" + mirror "https://ftp.gnu.org/gnu/xorriso/xorriso-1.5.6.pl02.tar.gz" + version "1.5.6.pl02" + sha256 "786f9f5df9865cc5b0c1fecee3d2c0f5e04cab8c9a859bd1c9c7ccd4964fdae1" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/href=.*?xorriso[._-]v?(\d+(?:\.\d+)+(?:\.pl\d+)?)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ec2aac72e501138766c226d4983498f05536f216da04286b8457aec12f20bf7a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ce9aa17c62698d61ba30175e05e730cdbfb45c00f414728e344912d8f533e50" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c0d17d1c03669586c4d7f5e10c915ff46e0448b65838ad8f4b4b9cda589f0b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cb072e208fba6a3d7e100b173dabba79aad125900499366ae5c876223d51589e" + sha256 cellar: :any_skip_relocation, sonoma: "d4c500ee979adcd61b5f7fd5790992ebd1209d7d778244d39e5b070ad317b62e" + sha256 cellar: :any_skip_relocation, ventura: "6d06e4c85a3b819c1b0f6209de9ff66be94464f5f7ffc6e54987c1a9808417d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e2de74c4a0f1472e99be18ad1810410378eb0597aad77e666657ee80ec932c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db3610de57dbb6a1b2bf32776acc9803efe9a951791101692eb65dc6df1226bd" + end + + uses_from_macos "zlib" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + + # `make install` has to be deparallelized due to the following error: + # mkdir: /usr/local/Cellar/xorriso/1.4.2/bin: File exists + # make[1]: *** [install-binPROGRAMS] Error 1 + # Reported 14 Jun 2016: https://lists.gnu.org/archive/html/bug-xorriso/2016-06/msg00003.html + ENV.deparallelize { system "make", "install" } + end + + test do + assert_match "List of xorriso extra features", shell_output("#{bin}/xorriso -list_extras") + assert_match version.to_s, shell_output("#{bin}/xorriso -version") + end +end diff --git a/Formula/x/xpdf.rb b/Formula/x/xpdf.rb new file mode 100644 index 0000000000000..ca8ead93f2402 --- /dev/null +++ b/Formula/x/xpdf.rb @@ -0,0 +1,51 @@ +class Xpdf < Formula + desc "PDF viewer" + homepage "https://www.xpdfreader.com/" + url "https://dl.xpdfreader.com/xpdf-4.05.tar.gz" + sha256 "92707ed5acb6584fbd73f34091fda91365654ded1f31ba72f0970022cf2a5cea" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + + livecheck do + url "https://www.xpdfreader.com/download.html" + regex(/href=.*?xpdf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "cb4be570e78e5683aa5f8d1cd38863940ceff5c450841611b8c869cb2438a9e7" + sha256 cellar: :any, arm64_sequoia: "a427e2fdfcf6d7941ee319dc9dc483104177a6460cc8d198d5905934a4b5c1c7" + sha256 cellar: :any, arm64_sonoma: "2fcac810f853552814f046a8c9121237cf1d6e2962e09977cc6e57e5b1bf26b8" + sha256 cellar: :any, sonoma: "c7c880aa82976bfd35833f8a2cb71cfab406a15f293b09b38119ec5a95f1769a" + sha256 cellar: :any_skip_relocation, arm64_linux: "192177145fa3698a7180404e21393799c506fdd206caf5ec3735732c9d0e94e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be1968ec32654250b756e84e6dce636b032d6c439cb05ec58903f6b48b265aea" + end + + depends_on "cmake" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "libpng" + depends_on "qtbase" + depends_on "qtsvg" => :no_linkage # for svg icons + + uses_from_macos "cups" + + conflicts_with "pdf2image", "pdftohtml", "poppler", + because: "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" + + def install + args = %W[-DSYSTEM_XPDFRC=#{etc}/xpdfrc] + # Workaround for CMake 4 compatibility + args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + cp test_fixtures("test.pdf"), testpath + assert_match "Pages:", shell_output("#{bin}/pdfinfo #{testpath}/test.pdf") + end +end diff --git a/Formula/x/xpipe.rb b/Formula/x/xpipe.rb new file mode 100644 index 0000000000000..8628ddd4a6191 --- /dev/null +++ b/Formula/x/xpipe.rb @@ -0,0 +1,46 @@ +class Xpipe < Formula + desc "Split input and feed it into the given utility" + homepage "https://www.netmeister.org/apps/xpipe.html" + url "https://www.netmeister.org/apps/xpipe-2.2.tar.gz" + sha256 "a381be1047adcfa937072dffa6b463455d1f0777db6bc5ea2682cd6321dc5add" + license "BSD-2-Clause" + + livecheck do + url "https://www.netmeister.org/apps/" + regex(/href=.*?xpipe[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0e886c34608112f333f208e802b5e9fd4f40b336db9cb14629a7e0c6142891e4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d889986ca2f5379e8f1d22e5add2ce9a3295b5625a93e4416bc737625ded5ea4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "98fdb15f477e02081958ff3a24be3d78c9d4387fce7ccba7107fbf5aa9debdac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a3575ecac45489a48910ea50fcba01e11128b12f761f8a123edbda73967482c1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "67c0fd303c2cf6076676cacd1efb20db78ba3de9282d57b901c0cfdf550bd742" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1ce7b92989b8db7377383649d3bda4615dfc76c978d53ccbf526b8329729ed2b" + sha256 cellar: :any_skip_relocation, sonoma: "1ce4bd5f2579c4c6c65e18b54f4ccc0a20bb95ad3cb1d76126300f709f67a50e" + sha256 cellar: :any_skip_relocation, ventura: "449fe37a5a028c9335f6750c41c60be9118b58ea4a5932e5244406eac6074974" + sha256 cellar: :any_skip_relocation, monterey: "f7b7d07da19d055e33168745cc88dc681bf8122bfc42a69baed6af85182b3f8e" + sha256 cellar: :any_skip_relocation, big_sur: "be1f56555c5846777c0a963cbf01f71f2b7fe5c6ca7fb17240fbcaf7937ccfdd" + sha256 cellar: :any_skip_relocation, catalina: "06e9e1e3cb21acd053c218d5c0e34eb591bb54f7031b98b27116b302512cfc3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb963f6a0f7bd758bc4ade850635c64cad0c8955455d4aa8f3ad600fff8c1895" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85269e2a82a5296f82eaba5e4fc1004ac1176cb1d2f672a7865480fcde33a452" + end + + on_linux do + depends_on "libbsd" + end + + def install + inreplace "Makefile", "${PREFIX}/include/bsd", "#{Formula["libbsd"].opt_include}/bsd" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system "echo foo | xpipe -b 1 -J % /bin/sh -c 'cat >%'" + assert_path_exists testpath/"1" + assert_path_exists testpath/"2" + assert_path_exists testpath/"3" + end +end diff --git a/Formula/x/xplanet.rb b/Formula/x/xplanet.rb new file mode 100644 index 0000000000000..d8414163c61ed --- /dev/null +++ b/Formula/x/xplanet.rb @@ -0,0 +1,188 @@ +class Xplanet < Formula + desc "Create HQ wallpapers of planet Earth" + homepage "https://xplanet.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xplanet/xplanet/1.3.1/xplanet-1.3.1.tar.gz" + sha256 "4380d570a8bf27b81fb629c97a636c1673407f4ac4989ce931720078a90aece7" + license "GPL-2.0-or-later" + revision 6 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "7496e485b462de4b286f4128d145dfc58aaba93237aafc36ec1c0138a740be46" + sha256 arm64_sequoia: "1c5fb1f5235c56e1aa7f84415b49428ed1c92532b47697800982f01dcfb4d842" + sha256 arm64_sonoma: "1092db3b7841f3a9e16d41baa7b4370ab212ec0523275e2b96cad8f2235873e7" + sha256 arm64_ventura: "aa69c74fc48645353401ccfeb35f7bf0527b696f34523754e2c81077459bbc64" + sha256 arm64_monterey: "07924721350d8ca211611b26b4e78729062cb040cb1031f88d9fb621106cbf60" + sha256 arm64_big_sur: "a1c93cfbcb085731799a2e3d94c0f4f14b5ef962dbf3f001660c17790faa5a29" + sha256 sonoma: "3a688306c871799a9ec418677bcd9b38bf3ed7eefa80b0433f681cb59c5fadc4" + sha256 ventura: "e567fd98fcd6d0f8903ee632f21b6658756eaff80d46de2730a91d0e600289dc" + sha256 monterey: "0d4fd995ed8518e11c0e7072dba0364b8d9db777625a114aab6696ab927fadf7" + sha256 big_sur: "227cbd44a9be2502a24f459725881e7705263af1a00ae53e38a8cc9b111b87b0" + sha256 arm64_linux: "e4c5d2d7f3a186e8094fe3b0e8ab2502b48c7d6811cca6c024ac4ac771d49b92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff1ddc436b45234444d121e117b299ec702da829391200dfae26547114834d02" + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + + # Added automake as a build dependency to update config files for ARM support. + # Please remove in the future if there is a patch upstream which recognises aarch64 macOS. + on_arm do + depends_on "automake" => :build + end + + # patches bug in 1.3.1 with flag -num_times=2 (1.3.2 will contain fix, when released) + # https://sourceforge.net/p/xplanet/code/208/tree/trunk/src/libdisplay/DisplayOutput.cpp?diff=5056482efd48f8457fc7910a:207 + patch :p2 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/xplanet/xplanet-1.3.1-ntimes.patch" + sha256 "3f95ba8d5886703afffdd61ac2a0cd147f8d659650e291979f26130d81b18433" + end + + # Fix compilation with giflib 5 + # https://xplanet.sourceforge.net/FUDforum2/index.php?t=msg&th=592 + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/xplanet/xplanet-1.3.1-giflib5.patch" + sha256 "0a88a9c984462659da37db58d003da18a4c21c0f4cd8c5c52f5da2b118576d6e" + end + + # Fix build with C++11 using Arch Linux patch. Remove in the next release. + # There is an upstream commit but SourceForge doesn't provide a way to get raw patch. + # Commit ref: https://sourceforge.net/p/xplanet/code/207/ + patch do + url "https://raw.githubusercontent.com/archlinux/svntogit-community/040965e32860345ca2d744239b6e257da33460a2/trunk/xplanet-c%2B%2B11.patch" + sha256 "e651c7081c43ea48090186580b5a2a5d5039ab3ffbf34f7dd970037a16081454" + end + + # Backport https://sourceforge.net/p/xplanet/code/222/ + patch :p0, :DATA + + def install + # Workaround for ancient config files not recognizing aarch64 macos. + if Hardware::CPU.arm? + %w[config.guess config.sub].each do |fn| + cp Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}"/fn, fn + end + end + + args = %w[ + --without-cspice + --without-cygwin + --with-gif + --with-jpeg + --with-libtiff + --without-pango + --without-pnm + --without-x + --without-xscreensaver + ] + args << "--with-aqua" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + # Test all the supported image formats, jpg, png, gif and tiff, as well as the -num_times 2 patch + test do + system bin/"xplanet", "-target", "earth", "-output", "#{testpath}/test.jpg", + "-radius", "30", "-num_times", "2", "-random", "-wait", "1" + system bin/"xplanet", "-target", "earth", "--transpng", "#{testpath}/test.png", + "-radius", "30", "-num_times", "2", "-random", "-wait", "1" + system bin/"xplanet", "-target", "earth", "--output", "#{testpath}/test.gif", + "-radius", "30", "-num_times", "2", "-random", "-wait", "1" + system bin/"xplanet", "-target", "earth", "--output", "#{testpath}/test.tiff", + "-radius", "30", "-num_times", "2", "-random", "-wait", "1" + end +end + +__END__ +--- src/readConfig.cpp (revision 221) ++++ src/readConfig.cpp (revision 222) +@@ -46,10 +46,10 @@ + { + case ARC_COLOR: + { +- int r, g, b; +- if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) ++ unsigned char r, g, b; ++ if (sscanf(returnString, "%hhu,%hhu,%hhu", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { r, g, b }; + currentProperties->ArcColor(color); + } + else +@@ -176,10 +176,10 @@ + break; + case COLOR: + { +- int r, g, b; +- if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) ++ unsigned char r, g, b; ++ if (sscanf(returnString, "%hhu,%hhu,%hhu", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { r, g, b }; + currentProperties->Color(color); + } + else +@@ -241,10 +241,10 @@ + break; + case GRID_COLOR: + { +- int r, g, b; +- if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) ++ unsigned char r, g, b; ++ if (sscanf(returnString, "%hhu,%hhu,%hhu", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { r, g, b }; + currentProperties->GridColor(color); + } + else +@@ -293,10 +293,10 @@ + break; + case MARKER_COLOR: + { +- int r, g, b; +- if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) ++ unsigned char r, g, b; ++ if (sscanf(returnString, "%hhu,%hhu,%hhu", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { r, g, b }; + currentProperties->MarkerColor(color); + } + else +@@ -400,10 +400,10 @@ + break; + case ORBIT_COLOR: + { +- int r, g, b; +- if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) ++ unsigned char r, g, b; ++ if (sscanf(returnString, "%hhu,%hhu,%hhu", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { r, g, b }; + currentProperties->OrbitColor(color); + } + else +@@ -470,10 +470,10 @@ + break; + case TEXT_COLOR: + { +- int r, g, b; +- if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) ++ unsigned char r, g, b; ++ if (sscanf(returnString, "%hhu,%hhu,%hhu", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { r, g, b }; + currentProperties->TextColor(color); + } + else diff --git a/Formula/x/xplr.rb b/Formula/x/xplr.rb new file mode 100644 index 0000000000000..404ef8ffaf3ce --- /dev/null +++ b/Formula/x/xplr.rb @@ -0,0 +1,47 @@ +class Xplr < Formula + desc "Hackable, minimal, fast TUI file explorer" + homepage "https://github.com/sayanarijit/xplr" + url "https://github.com/sayanarijit/xplr/archive/refs/tags/v1.0.1.tar.gz" + sha256 "6d766bc52c49782e3ca8ba7130f1cab95c69e42ff3c15eec2b0ac823ab7a36b3" + license "MIT" + head "https://github.com/sayanarijit/xplr.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "4158e4d58b4114360c13aec3f9f2b2f89679dcfc9af1def273c1611404367479" + sha256 cellar: :any, arm64_sequoia: "8e2af53ed70887dd5ff966adf2612259865c6db17c485ee9233dedf2f184df1b" + sha256 cellar: :any, arm64_sonoma: "c628e2c6d435b8765c2880dfe98dfbdd4a54705e04668d5aeac389bab23d6471" + sha256 cellar: :any, arm64_ventura: "b1942b6c9b832b987ef777bf1454a805df69b3a5ef2a3be7771c3344a3fe5ba6" + sha256 cellar: :any, sonoma: "3792494258c3c05d1724666298be0ff8d9fa5f81fe3213b3a89419353f2cf920" + sha256 cellar: :any, ventura: "3cdb674789239cc18e01fd5d1863a3e4fd8f9510608706cc90d08402fca7080a" + sha256 cellar: :any_skip_relocation, arm64_linux: "940a502af128cb6dadf797a2cf6d4a6acc002bc4c9bbd3f4588a17a80069d0e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c025d45df5cdf7e0a3a292d914745099b8a9854a4a61b8316aab72c32e7df22" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "luajit" + + def install + system "cargo", "install", "--no-default-features", *std_cargo_args + end + + test do + require "utils/linkage" + + input, = Open3.popen2 "SHELL=/bin/sh script -q output.txt" + input.puts "stty rows 80 cols 130" + input.puts bin/"xplr" + input.putc "q" + input.puts "exit" + + sleep 5 + File.open(testpath/"output.txt", "r:ISO-8859-7") do |f| + contents = f.read + assert_match testpath.to_s, contents + end + + assert Utils.binary_linked_to_library?(bin/"xplr", + Formula["luajit"].opt_lib/shared_library("libluajit")), + "No linkage with libluajit! Cargo is likely using a vendored version." + end +end diff --git a/Formula/x/xprop.rb b/Formula/x/xprop.rb new file mode 100644 index 0000000000000..d4f5229c4309d --- /dev/null +++ b/Formula/x/xprop.rb @@ -0,0 +1,33 @@ +class Xprop < Formula + desc "Property displayer for X" + homepage "https://gitlab.freedesktop.org/xorg/app/xprop" + url "https://www.x.org/archive/individual/app/xprop-1.2.8.tar.xz" + sha256 "d689e2adb7ef7b439f6469b51cda8a7daefc83243854c2a3b8f84d0f029d67ee" + license "MIT-open-group" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "16498c5be35fa49d3fb077e47270d30e791d045f9ad1a6ec52b5e375168b56aa" + sha256 cellar: :any, arm64_sequoia: "cdec0acd7bb65c8b5c8817d838fdfa701a0320d87eeb34297641c87c91724bf7" + sha256 cellar: :any, arm64_sonoma: "9a8151c37776a1282ef79d084ea8243b5c99cd2da8c48621f989126b8e9ef204" + sha256 cellar: :any, arm64_ventura: "7d3563c7d7f8e2956fd53176cde7778a1fc5e1a5faf740980c5edfcff200684a" + sha256 cellar: :any, sonoma: "1c66f81bd54f83a640e7f6e6a7ec95232f8d18715d7b9bf0b5c3b3b618b093f5" + sha256 cellar: :any, ventura: "1cdeb1e7acddc588e6d06bc905e546d8a6ce07a93f2b31b4a6c681b238e7eb5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9365e5e98c06c4d155393e2e152ed39a61dfde7a5c74c3b470e978fbcf7712c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14cddb19c4fd84f405036ecbdcf37e3d030840b3d21a81bff0ceec4da68a4a0a" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/xprop -display :100 2>&1", 1) + assert_match "xprop: unable to open display", output + end +end diff --git a/Formula/x/xq.rb b/Formula/x/xq.rb new file mode 100644 index 0000000000000..b26dadff9c6a6 --- /dev/null +++ b/Formula/x/xq.rb @@ -0,0 +1,44 @@ +class Xq < Formula + desc "Command-line XML and HTML beautifier and content extractor" + homepage "https://github.com/sibprogrammer/xq" + url "https://github.com/sibprogrammer/xq.git", + tag: "v1.3.0", + revision: "86a755578f7bfb82fddc1f712c96db2f0bf36076" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "130ed5ae491d4df66e01950178196471a2c0aee6ecf92cfe547f505e096928fe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acee76fdd23d919d0c9e3bee5ff519742be43f958833f8949972a48f222fb253" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "acee76fdd23d919d0c9e3bee5ff519742be43f958833f8949972a48f222fb253" + sha256 cellar: :any_skip_relocation, arm64_ventura: "acee76fdd23d919d0c9e3bee5ff519742be43f958833f8949972a48f222fb253" + sha256 cellar: :any_skip_relocation, sonoma: "3f27afa855799f0e43c3d7d878349dba62998d23a2504a3e0979998183b410e0" + sha256 cellar: :any_skip_relocation, ventura: "3f27afa855799f0e43c3d7d878349dba62998d23a2504a3e0979998183b410e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc8b386eb396c296d682edd48979979464ff7143b7d247fad0cd07e7c08e1954" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3bfe60511be1ea50e381c53d56e8b7125315c189e3e7c23809c8eefa73df627" + end + + depends_on "go" => :build + + conflicts_with "python-yq", because: "both install `xq` binaries" + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = %W[ + -s -w + -X main.commit=#{Utils.git_head} + -X main.version=#{version} + -X main.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + man1.install "docs/xq.man" => "xq.1" + end + + test do + version_output = shell_output("#{bin}/xq --version 2>&1") + assert_match "xq version #{version}", version_output + + run_output = pipe_output(bin/"xq", "") + assert_match("", run_output) + end +end diff --git a/Formula/x/xqilla.rb b/Formula/x/xqilla.rb new file mode 100644 index 0000000000000..5c2942954b15b --- /dev/null +++ b/Formula/x/xqilla.rb @@ -0,0 +1,63 @@ +class Xqilla < Formula + desc "XQuery and XPath 2 command-line interpreter" + homepage "https://xqilla.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xqilla/XQilla-2.3.4.tar.gz" + sha256 "292631791631fe2e7eb9727377335063a48f12611d641d0296697e0c075902eb" + license "Apache-2.0" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/XQilla[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b34e7fa213e9280c6343d21d71355f5ac4e115540d2c81b31027172af5de305f" + sha256 cellar: :any, arm64_sequoia: "83e21758a4570293176969d68d027817a4cabbda27702a1f17df9d21256ef45d" + sha256 cellar: :any, arm64_sonoma: "d010a25cbbc379829f8782fe13daab681386d79611ba03db8f6be10d5a592a52" + sha256 cellar: :any, arm64_ventura: "f84208fd263e7d62474d60496b0476bd1b6cd11c79192353a32cfb6561fc0e90" + sha256 cellar: :any, sonoma: "a7f37c4ddffd21e21c56b485ae2cb8be6b7e67c994299f44cf9f0ad8220ac464" + sha256 cellar: :any, ventura: "b06f8a2ebcdddce0def3f89ab47d8c76667e79aaca0768501c0fb4f6ef43fdcb" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebb978097af7e4608586c10076f7e4431bdf19d727c4652ffbfa2fad6249e6d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cb7468c61618269082f2d77bb318e021fac14df13e818019fb1ea4e87cef35d" + end + + depends_on "xerces-c" + + def install + ENV.cxx11 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", "--with-xerces=#{HOMEBREW_PREFIX}", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(int argc, char *argv[]) { + XQilla xqilla; + AutoDelete query(xqilla.parse(X("1 to 100"))); + AutoDelete context(query->createDynamicContext()); + Result result = query->execute(context); + Item::Ptr item; + while(item == result->next(context)) { + std::cout << UTF8(item->asString(context)) << std::endl; + } + return 0; + } + CPP + system ENV.cxx, "-std=c++11", testpath/"test.cpp", "-o", testpath/"test", + "-I#{include}", "-I#{Formula["xerces-c"].opt_include}", + "-L#{lib}", "-lxqilla", + "-L#{Formula["xerces-c"].opt_lib}", "-lxerces-c" + system testpath/"test" + end +end diff --git a/Formula/x/xray.rb b/Formula/x/xray.rb new file mode 100644 index 0000000000000..0a8d621235747 --- /dev/null +++ b/Formula/x/xray.rb @@ -0,0 +1,108 @@ +class Xray < Formula + desc "Platform for building proxies to bypass network restrictions" + homepage "https://xtls.github.io/" + url "https://github.com/XTLS/Xray-core/archive/refs/tags/v25.10.15.tar.gz" + sha256 "5df030f456db58b682110545e19da9b971303387955562ec408f484580450736" + license all_of: ["MPL-2.0", "CC-BY-SA-4.0"] + head "https://github.com/XTLS/Xray-core.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "37dd6170eaac307d4a2497ac0e9c0d89f5a1be09a7b520fe22c094972ece8a92" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37dd6170eaac307d4a2497ac0e9c0d89f5a1be09a7b520fe22c094972ece8a92" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37dd6170eaac307d4a2497ac0e9c0d89f5a1be09a7b520fe22c094972ece8a92" + sha256 cellar: :any_skip_relocation, sonoma: "6787776cb6deb987d7d7613682deb7baf65a959eeec4dbeb4dbcf70b2c58bc72" + sha256 cellar: :any_skip_relocation, arm64_linux: "d343d6a400127221f4c0b53d5ac5eb7366d2eea263dff056bc564ad850bf78c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d518053d707c0dbac24a937d0de3cca85e800a0fc5b173872254ad8c2bb9cfb" + end + + depends_on "go" => :build + + resource "geoip" do + url "https://github.com/v2fly/geoip/releases/download/202510050144/geoip.dat" + sha256 "c23ac8343e9796f8cc8b670c3aeb6df6d03d4e8914437a409961477f6b226098" + end + + resource "geosite" do + url "https://github.com/v2fly/domain-list-community/releases/download/20250916122507/dlc.dat" + sha256 "1a7dad0ceaaf1f6d12fef585576789699bd1c6ea014c887c04b94cb9609350e9" + end + + resource "example_config" do + # borrow v2ray example config + url "https://raw.githubusercontent.com/v2fly/v2ray-core/v5.40.0/release/config/config.json" + sha256 "15a66415d72df4cd77fcd037121f36604db244dcfa7d45d82a0c33de065c6a87" + + livecheck do + url "https://github.com/v2fly/v2ray-core.git" + end + end + + def install + ldflags = "-s -w -buildid=" + execpath = libexec/name + system "go", "build", *std_go_args(output: execpath, ldflags:), "./main" + (bin/"xray").write_env_script execpath, + XRAY_LOCATION_ASSET: "${XRAY_LOCATION_ASSET:-#{pkgshare}}" + + pkgshare.install resource("geoip") + resource("geosite").stage do + pkgshare.install "dlc.dat" => "geosite.dat" + end + pkgetc.install resource("example_config") + end + + def caveats + <<~EOS + An example config is installed to #{etc}/xray/config.json + EOS + end + + service do + run [opt_bin/"xray", "run", "--config", "#{etc}/xray/config.json"] + run_type :immediate + keep_alive true + end + + test do + (testpath/"config.json").write <<~JSON + { + "log": { + "access": "#{testpath}/log" + }, + "outbounds": [ + { + "protocol": "freedom", + "tag": "direct" + } + ], + "routing": { + "rules": [ + { + "ip": [ + "geoip:private" + ], + "outboundTag": "direct", + "type": "field" + }, + { + "domains": [ + "geosite:private" + ], + "outboundTag": "direct", + "type": "field" + } + ] + } + } + JSON + output = shell_output "#{bin}/xray -c #{testpath}/config.json -test" + + assert_match "Configuration OK", output + assert_path_exists testpath/"log" + end +end diff --git a/Formula/x/xrdb.rb b/Formula/x/xrdb.rb new file mode 100644 index 0000000000000..aa151be84958f --- /dev/null +++ b/Formula/x/xrdb.rb @@ -0,0 +1,42 @@ +class Xrdb < Formula + desc "X resource database utility" + homepage "https://gitlab.freedesktop.org/xorg/app/xrdb" + url "https://www.x.org/releases/individual/app/xrdb-1.2.2.tar.xz" + sha256 "31f5fcab231b38f255b00b066cf7ea3b496df712c9eb2d0d50c670b63e5033f4" + license "MIT-open-group" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "c4b0e238c08eae84fdc82bf3f4cfbb3ef02301126c875565a50ac269fe69b170" + sha256 cellar: :any, arm64_sequoia: "c623fd441390eaf1e39523477efd40c69f906eecc0e298db015fad002828a707" + sha256 cellar: :any, arm64_sonoma: "dd6633e16b4d7304c613cc88b59930d98bfc8bddf4e575e161c06fd74200d89a" + sha256 cellar: :any, arm64_ventura: "1b32536870feb4f744ec01f9b09dcc2b5a612b742ab527563ba5661f1f1777ee" + sha256 cellar: :any, arm64_monterey: "dcb8e3ddd3e7c5fb5d362c5b761477029956d6ab1f2a7952e7a3e6e1112dc70b" + sha256 cellar: :any, arm64_big_sur: "c7aeb1ca86ab70fd43c32152c2200677446f7e7b0f376c118c7642cf5aa218bf" + sha256 cellar: :any, sonoma: "65f65a99c1a3f04506cdf86fcfbbf3ab49da907cbd60b62351ba9a9ef200290e" + sha256 cellar: :any, ventura: "7ef65e0a0e3951b600d7587ef5015ca44606cd5f225ca2c33735979633176fc3" + sha256 cellar: :any, monterey: "0681e2deb75be4bcf436002d036f7dafbdabc2401f571255c0c8f225e2cf7728" + sha256 cellar: :any, big_sur: "ea5920dfb84ff9ff1d35090dfcd39aa4995163a0bbb515f0396be1137c2d20be" + sha256 cellar: :any_skip_relocation, arm64_linux: "428c35b84b33e5a752e8804297b8d6be1db36ca40068018d9db68d8bb18aad8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b387dbe59b86aad4b9e297ed43cb2bfc07b7a5c893fa22cf36e8e8712cb722fa" + end + + depends_on "pkgconf" => :build + depends_on "xorg-server" => :test + + depends_on "libx11" + depends_on "libxmu" + + def install + system "./configure", "--with-cpp=/usr/bin/cpp", *std_configure_args + system "make", "install" + end + + test do + spawn Formula["xorg-server"].bin/"Xvfb", ":1" + ENV["DISPLAY"] = ":1" + sleep 10 + system bin/"xrdb", "-query" + end +end diff --git a/Formula/x/xroar.rb b/Formula/x/xroar.rb new file mode 100644 index 0000000000000..6745a6493a937 --- /dev/null +++ b/Formula/x/xroar.rb @@ -0,0 +1,66 @@ +class Xroar < Formula + desc "Dragon and Tandy 8-bit computer emulator" + homepage "https://www.6809.org.uk/xroar/" + url "https://www.6809.org.uk/xroar/dl/xroar-1.8.2.tar.gz" + sha256 "34431cc352bad47f70570243644a96bce54e877a6f7e348208fcae259835ae31" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_tahoe: "ce94dba11a1339fb90d37e11881a5b8c1e276c863c839d80736ce5772e5dfc00" + sha256 cellar: :any, arm64_sequoia: "66d251d967c3745b9aa87eb67a82222fbc0fceec7f9610fc348226c86846b1d2" + sha256 cellar: :any, arm64_sonoma: "04fc798fa46ba0d83518a8fe26bf80e77b19afff2c41a9d4b7b739a6c8e9ac00" + sha256 cellar: :any, arm64_ventura: "24372127bc5875450dca9f8508e7ae1ee523519f46e2503ddf584e833e213cab" + sha256 cellar: :any, sonoma: "c0bf5c651a318a9a23f4f97e76f7e6e4205f4b7557a14f58e56993e65a97a7d1" + sha256 cellar: :any, ventura: "6c32e3d2690b479ae90aaed59f9b035d458b78a0abffea17544a4a1115492cf2" + sha256 cellar: :any_skip_relocation, arm64_linux: "5499a115ff0ca98c9e01b4e08b99088b07c761cc8bae761f5b7b8c58e616e2ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "baf6d0b2ca8c7764f489bf159b86d9c9f0acf473968e11dd68a4ee67f59d599e" + end + + head do + url "https://www.6809.org.uk/git/xroar.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "texinfo" => :build + end + + depends_on "libpng" + depends_on "libsndfile" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + depends_on "pulseaudio" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", "--without-x", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/xroar -config-print") + + assert_match(/machine dragon32/, output) + assert_match(/machine dragon64/, output) + assert_match(/machine tano/, output) + assert_match(/machine dragon200e/, output) + assert_match(/machine coco/, output) + assert_match(/machine cocous/, output) + assert_match(/machine coco2b/, output) + assert_match(/machine coco2bus/, output) + assert_match(/machine coco3/, output) + assert_match(/machine coco3p/, output) + assert_match(/machine mx1600/, output) + assert_match(/machine mc10/, output) + assert_match(/machine alice/, output) + end +end diff --git a/Formula/x/xrootd.rb b/Formula/x/xrootd.rb new file mode 100644 index 0000000000000..0fae7ffdd1263 --- /dev/null +++ b/Formula/x/xrootd.rb @@ -0,0 +1,75 @@ +class Xrootd < Formula + desc "High performance, scalable, fault-tolerant access to data" + homepage "https://xrootd.slac.stanford.edu/" + url "https://github.com/xrootd/xrootd/releases/download/v5.9.0/xrootd-5.9.0.tar.gz" + mirror "https://xrootd.slac.stanford.edu/download/v5.9.0/xrootd-5.9.0.tar.gz" + sha256 "e08e6fc73aeab08e56f716adafa9476cdfd293e28c14d0af5b1a67c06b1e6831" + license "LGPL-3.0-or-later" + head "https://github.com/xrootd/xrootd.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3c1bd70828213956662a25df2ad7fcc7fdda2a53c2d94b60065f2e6e3ca7e302" + sha256 cellar: :any, arm64_sequoia: "6e0505dddd88bc2133641506ee5db0326366bea061e5b7ed4005e2ee7e369aa2" + sha256 cellar: :any, arm64_sonoma: "2bbe7b565d73a18f075d9f4cdb31aab74dabbe2a845dc8cfb196002270ce96ea" + sha256 cellar: :any, sonoma: "7a50482ab6d748f862034fbb40fb871c304955c061b0314d9adf6d1abdb58d6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "affd7d3ddcb18bf3c7548823cf9805a6f498f837ea9ea526d688d6c1fbdd1a0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4426026838084d73ab75b25b12c498b3e68268b4b525cff8250a14b0616b900a" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.14" => [:build, :test] + depends_on "davix" + depends_on "krb5" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "curl" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_linux do + depends_on "util-linux" # for libuuid + end + + def python3 + "python3.14" + end + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DFORCE_ENABLED=ON + -DENABLE_FUSE=OFF + -DENABLE_HTTP=ON + -DENABLE_KRB5=ON + -DENABLE_MACAROONS=OFF + -DENABLE_PYTHON=ON + -DPython_EXECUTABLE=#{which(python3)} + -DENABLE_READLINE=ON + -DENABLE_SCITOKENS=OFF + -DENABLE_TESTS=OFF + -DENABLE_VOMS=OFF + -DENABLE_XRDCL=ON + -DENABLE_XRDCLHTTP=ON + -DENABLE_XRDEC=OFF + -DXRDCL_LIB_ONLY=OFF + -DXRDCL_ONLY=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match version.to_s, shell_output("#{bin}/xrootd -v 2>&1") + + system python3, "-c", <<~PYTHON + import XRootD + from XRootD import client + PYTHON + end +end diff --git a/Formula/x/xsane.rb b/Formula/x/xsane.rb new file mode 100644 index 0000000000000..22161a05240da --- /dev/null +++ b/Formula/x/xsane.rb @@ -0,0 +1,91 @@ +class Xsane < Formula + desc "Graphical scanning frontend" + homepage "https://gitlab.com/sane-project/frontend/xsane" + license "GPL-2.0-or-later" + revision 7 + + stable do + # TODO: Switch to `gtk+3` on next release + url "https://ftp.osuosl.org/pub/blfs/conglomeration/xsane/xsane-0.999.tar.gz" + mirror "https://fossies.org/linux/misc/xsane-0.999.tar.gz" + sha256 "5782d23e67dc961c81eef13a87b17eb0144cae3d1ffc5cf7e0322da751482b4b" + + depends_on "gtk+" + + # Backport support for libpng 1.5+ + patch do + url "https://gitlab.com/sane-project/frontend/xsane/-/commit/c2b5b530347af80cb192b30a4bd6039e7714a4fb.diff" + sha256 "9a94caf7fee69e047eca8d947c4f275473a2fa6d1ee2f0fb116bc2efdd9ea7e8" + end + end + + livecheck do + url "https://ftp.osuosl.org/pub/blfs/conglomeration/xsane/" + regex(/href=.*?xsane[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "4dca3c238d407fc9c1a7f0f1b7c270f0cffefc2f7955a4af932193b8313e0164" + sha256 arm64_sequoia: "e1bc40a49753404b609fce74f94ae755ef6ed1c6ca575703ecd167ff2c26d8b2" + sha256 arm64_sonoma: "5532780b9dd6f8768a38d4fa9a845df83367ef96d0514ac41a7f3d337b4a20b5" + sha256 arm64_ventura: "937f1a294ababd5e2c7815c599a185b83e67bb07ef6f86da4773bfcfcead1876" + sha256 arm64_monterey: "c7fc7231fcb5d959fc393a50388e7fa2bd152d6dde8dd0b2cb5530e2b9aa29c0" + sha256 sonoma: "13df5fed03ac7d42542000ac00160e78ccb95e79877426719f51c27d38d888e4" + sha256 ventura: "7f62506c8cdd4ed11beaaa735d3d9d49b034fd9b22595b58c1437bca0fb44390" + sha256 monterey: "be01888247a3d7e510e17a484822c170dd3b7159eb97a73c2dd635a017a199be" + sha256 arm64_linux: "7b14c66ec45e121d52e56aa03b84ad17e05537e1b7946f24cd0ea77124b3ef2e" + sha256 x86_64_linux: "38f48e2fb08a821089e4419e0b0a6d6994a9e3d1faa009e3319107a4b393af03" + end + + head do + url "https://gitlab.com/sane-project/frontend/xsane.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk+3" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "sane-backends" + + uses_from_macos "zlib" + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + end + + def install + if build.head? + # Work around https://gitlab.com/sane-project/frontend/xsane/-/issues/74 + inreplace "src/Makefile.am", "$(GIMP_LIBS)", "\\0 $(ZLIB_LIBS)" + + system "autoreconf", "--force", "--install", "--verbose" + elsif version > "0.999" + odie "Remove `-Wno-implicit-function-declaration` workaround" + elsif DevelopmentTools.clang_build_version >= 1200 + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" + end + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + # (xsane:27015): Gtk-WARNING **: 12:58:53.105: cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"xsane", "--version" + end +end diff --git a/Formula/x/xsd.rb b/Formula/x/xsd.rb new file mode 100644 index 0000000000000..738ce07453b8c --- /dev/null +++ b/Formula/x/xsd.rb @@ -0,0 +1,90 @@ +class Xsd < Formula + desc "XML Data Binding for C++" + homepage "https://www.codesynthesis.com/products/xsd/" + url "https://www.codesynthesis.com/download/xsd/4.2/xsd-4.2.0.tar.gz" + sha256 "2bed17c601cfb984f9a7501fd5c672f4f18eac678f5bdef6016971966add9145" + license "GPL-2.0-only" => { with: "Classpath-exception-2.0" } + + livecheck do + url "https://www.codesynthesis.com/products/xsd/download.xhtml" + regex(/href=.*?xsd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9beb0bcaa0a49b5de1613b0ce1424a3f1ba33d0697860103c4a93ec4b7f4e748" + sha256 cellar: :any, arm64_sequoia: "9bab1b8a054ae9b32e68d6c0ab9ee59435715bcedbdc1206de8b54a5c8210ce5" + sha256 cellar: :any, arm64_sonoma: "b095172797b397ec3afe2c05033aa138ef2449d982aa8e77b9b26b484cd7fbc9" + sha256 cellar: :any, arm64_ventura: "515effcddd5163ba8ac3fc30f2daf51d5c9380209b376cd4fbbffc54eb823b9e" + sha256 cellar: :any, sonoma: "dcd70b1bada26e56ead16eaceeced482d7e8c4b84a8894d34073d46ad0c2f57e" + sha256 cellar: :any, ventura: "d6d34d7402ae33a991c7817a34d6f8bdec2f55bc68ec922b5e112d639f308dd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b203c546a627a452e99687209c707b56a69334aa9dd509bcf80f2e9e2e0c055" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d2ce6cba3e04b1e0239789b2c57ab98fbf8b465dc8477fb43c184da992002322" + end + + depends_on "build2" => :build + depends_on "libcutl" + depends_on "libxsd-frontend" + depends_on "xerces-c" + + conflicts_with "mono", because: "both install `xsd` binaries" + + resource "libxsd" do + url "https://www.codesynthesis.com/download/xsd/4.2/libxsd-4.2.0.tar.gz" + sha256 "55caf0038603883eb39ac4caeaacda23a09cf81cffc8eb55a854b6b06ef2c52e" + + livecheck do + formula :parent + end + end + + def install + odie "`libxsd` resource needs to be updated!" if version != resource("libxsd").version + + system "b", "configure", "config.cc.loptions=-L#{HOMEBREW_PREFIX}/lib", "config.install.root=#{prefix}" + system "b", "install", "--jobs=#{ENV.make_jobs}", "-V" + + resource("libxsd").stage do + system "b", "configure", "config.install.root=#{prefix}" + system "b", "install", "--jobs=#{ENV.make_jobs}", "-V" + end + end + + test do + (testpath/"meaningoflife.xsd").write <<~XSD + + + + + XSD + + (testpath/"meaningoflife.xml").write <<~XML + + + 42 + + XML + + (testpath/"xsdtest.cxx").write <<~CPP + #include + #include "meaningoflife.hxx" + int main (int argc, char *argv[]) { + assert(2==argc); + std::unique_ptr<::xml_schema::positive_integer> x = XSDTest::MeaningOfLife(argv[1]); + assert(42==*x); + return 0; + } + CPP + + system bin/"xsd", "cxx-tree", "meaningoflife.xsd" + assert_path_exists testpath/"meaningoflife.hxx" + assert_path_exists testpath/"meaningoflife.cxx" + + system ENV.cxx, "-std=c++11", "xsdtest.cxx", "meaningoflife.cxx", "-o", "xsdtest", + "-L#{Formula["xerces-c"].opt_lib}", "-lxerces-c" + system "./xsdtest", "meaningoflife.xml" + end +end diff --git a/Formula/x/xsel.rb b/Formula/x/xsel.rb new file mode 100644 index 0000000000000..372d1827b250e --- /dev/null +++ b/Formula/x/xsel.rb @@ -0,0 +1,43 @@ +class Xsel < Formula + desc "Command-line program for getting and setting the contents of the X selection" + homepage "https://www.vergenet.net/~conrad/software/xsel/" + url "https://github.com/kfish/xsel/archive/refs/tags/1.2.1.tar.gz" + sha256 "18487761f5ca626a036d65ef2db8ad9923bf61685e06e7533676c56d7d60eb14" + license "MIT" + head "https://github.com/kfish/xsel.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "4b77e0f9695c3024acfae203e697084bd2dc38dedfa687df634a44edff53b570" + sha256 cellar: :any, arm64_sequoia: "b4ef9c989ee8e286f69314d95de96579f0a33336fb5b673b494c27f764c25998" + sha256 cellar: :any, arm64_sonoma: "7a9deb3b1b185ac5194306be64ddffe8d129d9fb7bd0821eb1ad81fa264d790a" + sha256 cellar: :any, arm64_ventura: "29489463a6b648ef30fbc0e363941121d979bac946ed00592c0d2f513717554f" + sha256 cellar: :any, arm64_monterey: "bc9e0c0ca69e907dfa5b3416a57300bc7aa1a5a1f08d313175cebb4d0a00b401" + sha256 cellar: :any, arm64_big_sur: "8d46290837243fe999ac0f72b739104dbc8eb05b2ad78282bc4f2398c9bda4c5" + sha256 cellar: :any, sonoma: "30b8b58e19c546b6719381fc5e24dbef2e8cc57d0e07c504b35e6f84b7e2879f" + sha256 cellar: :any, ventura: "46abd92de37296f5be3201a7d4b50e92e10c42a63a4bfd29cf51055cd81d099f" + sha256 cellar: :any, monterey: "6258269b70ace163a73341c5acb23161660f2bc0b1605086d93540845b926373" + sha256 cellar: :any, big_sur: "b52227ff66ee16f9e91938370c77e2658ceff2ec2f13ac812ba2920861322450" + sha256 cellar: :any_skip_relocation, arm64_linux: "13f84b482a58030b9f25ce9dc75bf06a10328963ea7a95eab43484e859ed4a1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "508a55a542e6d8fbc46e3d5b0356bab11270e898353dada474a76f6ea1369891" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libxt" => :build + depends_on "pkgconf" => :build + depends_on "libx11" + + def install + system "./autogen.sh", *std_configure_args + system "make", "install" + end + + test do + assert_match "Usage: xsel [options]", shell_output("#{bin}/xsel --help") + assert_match "xsel version #{version} ", shell_output("#{bin}/xsel --version") + assert_match "xsel: Can't open display", shell_output("DISPLAY= #{bin}/xsel -o 2>&1", 1) + end +end diff --git a/Formula/x/xsimd.rb b/Formula/x/xsimd.rb new file mode 100644 index 0000000000000..7f210df2b7197 --- /dev/null +++ b/Formula/x/xsimd.rb @@ -0,0 +1,50 @@ +class Xsimd < Formula + desc "Modern, portable C++ wrappers for SIMD intrinsics" + homepage "https://xsimd.readthedocs.io/en/latest/" + url "https://github.com/xtensor-stack/xsimd/archive/refs/tags/13.2.0.tar.gz" + sha256 "edd8cd3d548c185adc70321c53c36df41abe64c1fe2c67bc6d93c3ecda82447a" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b2e11ecb6ae8b97519e15cb24e49e246b38d01d6f699f62714e96a1d6abd5c63" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + #include "xsimd/config/xsimd_inline.hpp" + #include "xsimd/memory/xsimd_alignment.hpp" + + using namespace xsimd; + + struct mock_container {}; + + int main(void) { + using u_vector_type = std::vector; + using a_vector_type = std::vector>; + + using u_vector_align = container_alignment_t; + using a_vector_align = container_alignment_t; + using mock_align = container_alignment_t; + + if(!std::is_same::value) abort(); + if(!std::is_same::value) abort(); + if(!std::is_same::value) abort(); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++14", "-I#{include}", "-o", "test" + system "./test" + end +end diff --git a/Formula/x/xsv.rb b/Formula/x/xsv.rb new file mode 100644 index 0000000000000..9266150e50288 --- /dev/null +++ b/Formula/x/xsv.rb @@ -0,0 +1,38 @@ +class Xsv < Formula + desc "Fast CSV toolkit written in Rust" + homepage "https://github.com/BurntSushi/xsv" + url "https://github.com/BurntSushi/xsv/archive/refs/tags/0.13.0.tar.gz" + sha256 "2b75309b764c9f2f3fdc1dd31eeea5a74498f7da21ae757b3ffd6fd537ec5345" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/BurntSushi/xsv.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a372cb2219b14b253d163e31b9a173a11242c11af0168e696a69ae78c5cdfd19" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8ba12f789a98e3a3e81ef93360446b18b6b228bfce275b622cf8568a7e8cf63" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e1851aa7da108f20034e0507616b2f2259d0211c522f0d0446b596181d10dae9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e3782f25035444ff4b65770eddc8598a1908e1538d1d338954fc22a928846db4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "410eeb772d867d03a7e80276ceb83d4eb7a7784b28d0087ed8ad49d69e8fbeb6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6084d9e55244c876bbe7b833f5c7e27a19f09993f8b48f30076bd3c689f56b46" + sha256 cellar: :any_skip_relocation, sonoma: "7ba92e0a053afcf8f5468e34c67c9a366eeaadd42b6387a6ab19e656774afc8c" + sha256 cellar: :any_skip_relocation, ventura: "5c38a15fdf937d239bba53b098ea98d71fc05652123c09a56f3dfb17babb7298" + sha256 cellar: :any_skip_relocation, monterey: "69ffb9f95356c1bc35999511f5ee4f2d31b9ec08f3dcd3b831476f75396d63a5" + sha256 cellar: :any_skip_relocation, big_sur: "e0b4b23b91d31f0375fc425352a11ef551a1f2c75664d3b266c7cd9d8fc57f10" + sha256 cellar: :any_skip_relocation, catalina: "03926e8c78a90a6ad209dbd61d312e6d70d929e84a9f3fd325aa8fa81b8ccec6" + sha256 cellar: :any_skip_relocation, arm64_linux: "02e2a58f3b402c91ecd421ec35060208a3a8b35d45349ac0537fc6b770f2da59" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2e6982514f6800be13fbbe4d1e2512023baa2f3bb2dc9e4bad87c0699bb911f" + end + + deprecate! date: "2025-04-27", because: :repo_archived + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.csv").write("first header,second header") + system bin/"xsv", "stats", "test.csv" + end +end diff --git a/Formula/x/xtensor.rb b/Formula/x/xtensor.rb new file mode 100644 index 0000000000000..069695c686933 --- /dev/null +++ b/Formula/x/xtensor.rb @@ -0,0 +1,47 @@ +class Xtensor < Formula + desc "Multi-dimensional arrays with broadcasting and lazy computing" + homepage "https://xtensor.readthedocs.io/en/latest/" + url "https://github.com/xtensor-stack/xtensor/archive/refs/tags/0.27.1.tar.gz" + sha256 "117c192ae3b7c37c0156dedaa88038e0599a6b264666c3c6c2553154b500fe23" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "32d293bf0e95a4ffff6423ace30f560f26da6092bf29a08186b7c70ac3a5b7e6" + end + + depends_on "cmake" => :build + depends_on "xtl" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include "xtensor/containers/xarray.hpp" + #include "xtensor/io/xio.hpp" + #include "xtensor/views/xview.hpp" + + int main() { + xt::xarray arr1 + {{11.0, 12.0, 13.0}, + {21.0, 22.0, 23.0}, + {31.0, 32.0, 33.0}}; + + xt::xarray arr2 + {100.0, 200.0, 300.0}; + + xt::xarray res = xt::view(arr1, 1) + arr2; + + std::cout << res(2) << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++20", "test.cc", "-o", "test", "-I#{include}" + assert_equal "323", shell_output("./test").chomp + end +end diff --git a/Formula/x/xterm.rb b/Formula/x/xterm.rb new file mode 100644 index 0000000000000..66ca1b3d92f65 --- /dev/null +++ b/Formula/x/xterm.rb @@ -0,0 +1,52 @@ +class Xterm < Formula + desc "Terminal emulator for the X Window System" + homepage "https://invisible-island.net/xterm/" + url "https://invisible-mirror.net/archives/xterm/xterm-403.tgz" + mirror "https://deb.debian.org/debian/pool/main/x/xterm/xterm_403.orig.tar.gz" + sha256 "1331b0df5919cb243ffe326dc6ff10a291e683a262f70cdf964a664be733ad83" + license "X11" + + livecheck do + url "https://invisible-mirror.net/archives/xterm/" + regex(/href=.*?xterm[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "c778ddfc075942b963255d2bfbb9a30e373447f309a02ec1d8f3a9d4cd8f82c2" + sha256 arm64_sequoia: "07b85bd73ba37391d6769adcbb76945e3dfefac72a0598c104e87aaa788d1635" + sha256 arm64_sonoma: "1a4b645c4f49f0b7425a254553a7fb80c8a159bb5e89a0b600808975c59931e7" + sha256 sonoma: "7866feacb67ad0b6eedded4175b7253d413de008f98b4a57aa8135ffa356fdc3" + sha256 arm64_linux: "139a96b853e7ca0f4923f0858bcecae0e4a2f28beb4cb842e6791d26c0d30d79" + sha256 x86_64_linux: "0cdd5352028604b98337d54147a3e322a4c5ba58ba8fa3fbd342f48a0320b45a" + end + + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "libice" + depends_on "libx11" + depends_on "libxaw" + depends_on "libxext" + depends_on "libxft" + depends_on "libxinerama" + depends_on "libxmu" + depends_on "libxpm" + depends_on "libxt" + + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + %w[koi8rxterm resize uxterm xterm].each do |exe| + assert_path_exists bin/exe + assert_predicate bin/exe, :executable? + end + end +end diff --git a/Formula/x/xtermcontrol.rb b/Formula/x/xtermcontrol.rb new file mode 100644 index 0000000000000..2ed4d0dd251a3 --- /dev/null +++ b/Formula/x/xtermcontrol.rb @@ -0,0 +1,43 @@ +class Xtermcontrol < Formula + desc "Control xterm properties such as colors, title, font and geometry" + homepage "https://thrysoee.dk/xtermcontrol/" + url "https://thrysoee.dk/xtermcontrol/xtermcontrol-3.10.tar.gz" + sha256 "3eb97b1d9d8aae1bad4fe2c41ca3a3dbb10d2d67e6ca4599aa1f631a40503dee" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?xtermcontrol[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3d4a267b1c10ee1076e61d3d07f3145f6162f85f8105aa40c5f637a24372d61f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91e3dd1b814e1b6fb24ddff2fbc094d1126e9c88e156e8f66291dd0c25a84aa9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1631d01a3eee1cf04f37e7d01dcdb6d7066221ea94990b6a429f322acabcc5db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "816846a55ddf739e1d3f34f7e11c7280fd3ecca79c51a65a42e749bda0e80f0c" + sha256 cellar: :any_skip_relocation, sonoma: "9f3d0725dc8f0531f83b61cf552c46db71c3bcf63fb0580e9e4682d6fe63eb44" + sha256 cellar: :any_skip_relocation, ventura: "678d0bb992613a535f7381fb59483f893dac21057bace98338fbbdd9102c1cb7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd86332aa4be9f0a12c74cc5c5998a522828586e107fbdc8a46862d14f2ed53f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10810f15d508c5a29c6df7ff1b757d6c2bac3d332772bb0ba142aa7e687fc1d8" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/xtermcontrol --version") + + expected = if OS.mac? + "--get-fg is unsupported or disallowed by this terminal" + else + "failed to get controlling terminal" + end + + ret_code = OS.mac? ? 0 : 1 + assert_match expected, shell_output("#{bin}/xtermcontrol --force --get-fg 2>&1", ret_code) + end +end diff --git a/Formula/x/xtitle.rb b/Formula/x/xtitle.rb new file mode 100644 index 0000000000000..84f24754d503e --- /dev/null +++ b/Formula/x/xtitle.rb @@ -0,0 +1,29 @@ +class Xtitle < Formula + desc "Set window title and icon for your X terminal" + homepage "https://kinzler.com/me/xtitle/" + url "https://kinzler.com/me/xtitle/xtitle-1.0.4.tgz" + sha256 "cadddef1389ba1c5e1dc7dd861545a5fe11cb397a3f692cd63881671340fcc15" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?xtitle[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "62511b7ce2a8440cd64bdf6fb05a1015920d610f254f95d01fb020c1c58c819e" + end + + def install + bin.install "xtitle.sh" => "xtitle" + bin.install "xtctl.sh" => "xtctl" + man1.install "xtitle.man" => "xtitle.1" + end + + test do + assert_match version.to_s, shell_output("#{bin}/xtitle --version") + end +end diff --git a/Formula/x/xtl.rb b/Formula/x/xtl.rb new file mode 100644 index 0000000000000..d37cccbbdde61 --- /dev/null +++ b/Formula/x/xtl.rb @@ -0,0 +1,40 @@ +class Xtl < Formula + desc "X template library" + homepage "https://github.com/xtensor-stack/xtl" + url "https://github.com/xtensor-stack/xtl/archive/refs/tags/0.8.1.tar.gz" + sha256 "e69a696068ccffd2b435539d583665981b6c6abed596a72832bffbe3e13e1f49" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7ac3927ae041762e37a0b008b1456a41f116e698c8f1e09e65926ff43d3c582e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "nlohmann-json" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include "xtl/xcomplex.hpp" + + using complex_type = xtl::xcomplex; + + int main() { + complex_type vc0(1., 2.); + complex_type vc1(2., 4.); + complex_type c2 = vc0 * vc1; + std::cout << c2.real() << "," << c2.imag() << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-I#{include}" + assert_equal "-6,8", shell_output("./test").strip + end +end diff --git a/Formula/x/xtrans.rb b/Formula/x/xtrans.rb new file mode 100644 index 0000000000000..9baa44e905160 --- /dev/null +++ b/Formula/x/xtrans.rb @@ -0,0 +1,40 @@ +class Xtrans < Formula + desc "X.Org: X Network Transport layer shared code" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/xtrans-1.6.0.tar.xz" + sha256 "faafea166bf2451a173d9d593352940ec6404145c5d1da5c213423ce4d359e92" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "eac4f242f00e4216244a9da8f9470bd0bfd9af02ee9d305d4e5be8bc35aa5143" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" => :test + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-docs=no + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xtrans/Xtrans.h" + + int main(int argc, char* argv[]) { + Xtransaddr addr; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/x/xurls.rb b/Formula/x/xurls.rb new file mode 100644 index 0000000000000..cd17a8009c4a6 --- /dev/null +++ b/Formula/x/xurls.rb @@ -0,0 +1,33 @@ +class Xurls < Formula + desc "Extract urls from text" + homepage "https://github.com/mvdan/xurls" + url "https://github.com/mvdan/xurls/archive/refs/tags/v2.6.0.tar.gz" + sha256 "476d92a0416fee965f928180a950691b85dbb8d11efc3dc7f795ecc106c76075" + license "BSD-3-Clause" + head "https://github.com/mvdan/xurls.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "22c2b64793e739cc7e0f4c74200696d92dbb5844beb0cdcbab647c770991ee02" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5b5a4fca9fccb9162ae07c8d883401d049a1823faf90766628480cebba4aa1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5b5a4fca9fccb9162ae07c8d883401d049a1823faf90766628480cebba4aa1e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b5b5a4fca9fccb9162ae07c8d883401d049a1823faf90766628480cebba4aa1e" + sha256 cellar: :any_skip_relocation, sonoma: "984597d394db29ff5f590173452dfa7333a90aec571508c292f5d7d2cc322edf" + sha256 cellar: :any_skip_relocation, ventura: "984597d394db29ff5f590173452dfa7333a90aec571508c292f5d7d2cc322edf" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f5192b2f2074758f78e7b48523611b30496e269da961abdeadf017c3afe57fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff7c2bd2e39eda3aa3d5fcf116a62ce740d594e4408a3166c9f6c66157ace5db" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/xurls" + end + + test do + output = pipe_output(bin/"xurls", "Brew test with https://brew.sh.") + assert_equal "https://brew.sh", output.chomp + + output = pipe_output("#{bin}/xurls --fix", "Brew test with http://brew.sh.") + assert_equal "Brew test with https://brew.sh/.", output.chomp + end +end diff --git a/Formula/x/xvid.rb b/Formula/x/xvid.rb new file mode 100644 index 0000000000000..a0833347cfcbc --- /dev/null +++ b/Formula/x/xvid.rb @@ -0,0 +1,53 @@ +class Xvid < Formula + desc "High-performance, high-quality MPEG-4 video library" + homepage "https://labs.xvid.com/" + url "https://downloads.xvid.com/downloads/xvidcore-1.3.7.tar.bz2" + sha256 "aeeaae952d4db395249839a3bd03841d6844843f5a4f84c271ff88f7aa1acff7" + license "GPL-2.0-or-later" + + livecheck do + url "https://downloads.xvid.com/downloads/" + regex(/href=.*?xvidcore[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "21251c2f572311e1e1dc610bc763596ae8e3a4a181fdfca98ba168a545df4151" + sha256 cellar: :any, arm64_sequoia: "c3bf171815c62e62be978f5d1913e7ce2e045cdb3e33012499e06197775ff4bd" + sha256 cellar: :any, arm64_sonoma: "8062840ad8e79ae9c733f5d8f4b822e70d962c243e7c9eceee95bb100e016743" + sha256 cellar: :any, arm64_ventura: "58aa3f757ca260fb922ee623240b710ef7e1cc75dea00c314d6d5ecd98289cbf" + sha256 cellar: :any, arm64_monterey: "ccf0c5b732d140dce8c595ff6bad287ed5be49a2c6a05912a1dbfdedfcb232bf" + sha256 cellar: :any, arm64_big_sur: "8974d7b8f816f7d5e8d9ae967b94922e0ed212f22f6475b7fa4c80c7a95d6582" + sha256 cellar: :any, sonoma: "1ed739249685549c93ef3f8b4ed04c065ea69d814e5c7404487e113776bcee9f" + sha256 cellar: :any, ventura: "4726e597ea39861c53660614ebba7270095f12e99d76085f4bf0956408e91e38" + sha256 cellar: :any, monterey: "57aae7b7565705fdd83b0c2996cf0d2e3569546e9691197d175431b89a9599b9" + sha256 cellar: :any, big_sur: "feabfa1a3df3b916654ba5eef30193b65cdba70a7a49cca6406ec0c214b50338" + sha256 cellar: :any, catalina: "ace5fea6272f3594b5c8fca6f1fe03c41c50a14af8599751571c5e44a49a5a53" + sha256 cellar: :any_skip_relocation, arm64_linux: "e475555bb33107d071edd20bd02e1934ead3c91afc51b36c6f0bf9b61477dc88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93bd40f313f5a6656ce1ca70cfeacf67deacd647beaf204ab3fd610a2d92c5a7" + end + + def install + cd "build/generic" do + system "./configure", "--disable-assembly", "--prefix=#{prefix}" + ENV.deparallelize # Work around error: install: mkdir =build: File exists + system "make" + system "make", "install" + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #define NULL 0 + int main() { + xvid_gbl_init_t xvid_gbl_init; + xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lxvidcore", "-o", "test" + system "./test" + end +end diff --git a/Formula/x/xwin.rb b/Formula/x/xwin.rb new file mode 100644 index 0000000000000..4655f1344a1f7 --- /dev/null +++ b/Formula/x/xwin.rb @@ -0,0 +1,29 @@ +class Xwin < Formula + desc "Microsoft CRT and Windows SDK headers and libraries loader" + homepage "https://github.com/Jake-Shadle/xwin" + url "https://github.com/Jake-Shadle/xwin/archive/refs/tags/0.6.7.tar.gz" + sha256 "daab92c9c25acc54c8ccbbad22aed8fa0726fa0935dde0aa01a6a9ce10d439ee" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d4489a121e4d82ff0e69d85d3f5c137a5b28777bbb1cdb15a384190a1b3addc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0573062f217fcccb1f570e78b3b135d5209a42b35d54395ddbd21c09c0194daf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ed3b641edaebcc7db4efd1510da83f3bce8e53b57a7114994546c4eb6866dc7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fb2016cef3c7caedb4dbf1f5cd80206fb3d088288f5ad4d2c4e6b521862499fc" + sha256 cellar: :any_skip_relocation, sonoma: "a6d5b7d5ddd85d0b0ef3e3639a88d87dca35db99af32d85c3cfd2dc3901b6a19" + sha256 cellar: :any_skip_relocation, ventura: "09332a83b86db6f25994813fe0335339963ceb332a9af00fea03171d158a415c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5af872f7083155a3aacde6d1abb1bb5e0a7e2dccc618fa7efd1105e3b9fff5b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "043043fed05eafbad11e99902f4f766a36b9469a9c2a5af791f0701132e482fd" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"xwin", "--accept-license", "splat", "--disable-symlinks" + assert_path_exists testpath/".xwin-cache/splat" + end +end diff --git a/Formula/x/xwininfo.rb b/Formula/x/xwininfo.rb new file mode 100644 index 0000000000000..0d7cd6772c29a --- /dev/null +++ b/Formula/x/xwininfo.rb @@ -0,0 +1,34 @@ +class Xwininfo < Formula + desc "Print information about windows on an X server" + homepage "https://gitlab.freedesktop.org/xorg/app/xwininfo" + url "https://www.x.org/archive/individual/app/xwininfo-1.1.6.tar.xz" + sha256 "3518897c17448df9ba99ad6d9bb1ca0f17bc0ed7c0fd61281b34ceed29a9253f" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "96d34d4f1087c1eafa6c74937b5b0df87ee49e80762ed24023e89e0c78878931" + sha256 cellar: :any, arm64_sequoia: "de81136f2da87e8553dbabd1ef911279447842a5d9a03cdf9b05830ed464fca0" + sha256 cellar: :any, arm64_sonoma: "c990cacb2c672ffeef97ce1e9e6bf07a62de68b31e0c844a374c6ea4330caddc" + sha256 cellar: :any, arm64_ventura: "16c77dd94be1ff317276e082156a1e9d28456e832c30aa41c0320ea320d51e85" + sha256 cellar: :any, sonoma: "1d472ba18ecda4f5179eb264dd065876d1db5671c7b400302394e2014e70105a" + sha256 cellar: :any, ventura: "5573df075228169227184182f804a0991056d0e517c5cba11916554b1bf44f1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "145243b1c9fcf322bbd5815d6dd2a968d3332d3281ef899fbf385aadb92dc1e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0eec07b0f162130654bb10cfa0911bd34c3e7f32a92b35454a1ffbf70a41c0d1" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxcb" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/xwininfo -display :100 2>&1", 1) + assert_match "xwininfo: error: unable to open display", output + end +end diff --git a/Formula/x/xxh.rb b/Formula/x/xxh.rb new file mode 100644 index 0000000000000..18099915114bd --- /dev/null +++ b/Formula/x/xxh.rb @@ -0,0 +1,80 @@ +class Xxh < Formula + include Language::Python::Virtualenv + + desc "Bring your favorite shell wherever you go through the ssh" + homepage "https://github.com/xxh/xxh" + url "https://files.pythonhosted.org/packages/d6/ac/fb40368ff37fbdd00d041e241cc0d7a50cdac7bc6ae54dcb9f1349acdde6/xxh-xxh-0.8.14.tar.gz" + sha256 "7904c35efdff0a6f50f76b30879d3fbfe726cc765db47a1306ab2f19c03fdfae" + license "BSD-2-Clause" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_tahoe: "07ed49c087bd4b82099ff25d213a71627a53d0c86bce7f95938a0072cf1e05ac" + sha256 cellar: :any, arm64_sequoia: "9d00fc1786130a6714ae9b87c8d2477b4487605bc921fe37666c22d2794a73d1" + sha256 cellar: :any, arm64_sonoma: "15847d147ad2cc7806d50a69f2df443ca95a081a99222eac211d809047e57583" + sha256 cellar: :any, sonoma: "8a1313dff05fbd4a04345cc3c5782d2142eb07ad9ba0dfa21761d58363ac76c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f69ba9f8e23d52efd349c6d51cdfcd2dec59c8828b76589ba2a2a94765b58301" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fe168ea7da7ddf85fba4193337c1c4e60d52f0005fdc48c3510de8c35cef67b" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/xxh --version") + + (testpath/"config.xxhc").write <<~YAML + hosts: + test.localhost: + -o: HostName=127.0.0.1 + +s: xxh-shell-zsh + YAML + begin + port = free_port + server = TCPServer.new(port) + server_pid = fork do + msg = server.accept.gets + server.close + assert_match "SSH", msg + end + + stdout, stderr, = Open3.capture3( + bin/"xxh", "test.localhost", + "-p", port.to_s, + "+xc", "#{testpath}/config.xxhc", + "+v" + ) + + argv = stdout.lines.grep(/^Final arguments list:/).first.split(":").second + args = JSON.parse argv.tr("'", "\"") + assert_includes args, "xxh-shell-zsh" + + ssh_argv = stderr.lines.grep(/^ssh arguments:/).first.split(":").second + ssh_args = JSON.parse ssh_argv.tr("'", "\"") + assert_includes ssh_args, "Port=#{port}" + assert_includes ssh_args, "HostName=127.0.0.1" + assert_match "Connection closed", stderr + ensure + Process.kill("TERM", server_pid) + end + end +end diff --git a/Formula/x/xxhash.rb b/Formula/x/xxhash.rb new file mode 100644 index 0000000000000..390b494ca85f6 --- /dev/null +++ b/Formula/x/xxhash.rb @@ -0,0 +1,85 @@ +class Xxhash < Formula + desc "Extremely fast non-cryptographic hash algorithm" + homepage "https://xxhash.com" + url "https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.3.tar.gz" + sha256 "aae608dfe8213dfd05d909a57718ef82f30722c392344583d3f39050c7f29a80" + license all_of: [ + "BSD-2-Clause", # library + "GPL-2.0-or-later", # `xxhsum` command line utility + ] + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "60aa4eca9aa378cbaa79fb2ffc0d1b4a142fd32c0aaf7371b09c291530fb85d2" + sha256 cellar: :any, arm64_sequoia: "89bd0369c7033c364428cf03daad6f58ca5e5defd8dc585b8f0bc6a111714013" + sha256 cellar: :any, arm64_sonoma: "32a8ae9615395368644020266663a1758cd4b32b15cdf8c547c9b5a3a3bc3016" + sha256 cellar: :any, arm64_ventura: "60dfb4150b26f590cb36561262a3bf0d845bacb2e26ec7d4bf5f619be9ddce5a" + sha256 cellar: :any, sonoma: "e2355ea12831286d6858820e7fedcc3a044904f510ecc47d988698cd629a7ab0" + sha256 cellar: :any, ventura: "b48f20a3ccf572377aa01bc280f66692e43c94b26d1eac4ac5493ce576c5cd3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f094838a4f796f2314aa813a8e254d6d6582920fef2e0071a9f0c94ce538e350" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18dc2081164fec96866d5f6300bde1e3c3a80c0d7659183195e5810a8e438470" + end + + depends_on "cmake" => [:build, :test] + + def install + ENV.O3 + + args = ["PREFIX=#{prefix}"] + if Hardware::CPU.intel? + args << "DISPATCH=1" + ENV.runtime_cpu_detection + end + + system "make", "install", *args + prefix.install "cli/COPYING" + + # We use CMake for package configuration files which are needed by `manticoresearch`. + # The Makefile is used for everything else as it is the only officially supported way. + ENV["DESTDIR"] = buildpath + system "cmake", "-S", "cmake_unofficial", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" # needed to run `--install` which rewrites build path in .cmake file + system "cmake", "--install", "build" + lib.install File.join(buildpath, lib, "cmake") + end + + test do + (testpath/"leaflet.txt").write "No computer should be without one!" + assert_match(/^67bc7cc242ebc50a/, shell_output("#{bin}/xxhsum leaflet.txt")) + + # Simplified snippet of https://github.com/Cyan4973/xxHash/blob/dev/cli/xsum_sanity_check.c + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + size_t len = 0; + uint64_t seed = 2654435761U; + uint64_t Nresult = 0xAC75FDA2929B17EFULL; + + XXH64_state_t *state = XXH64_createState(); + assert(state != NULL); + assert(XXH64(NULL, len, seed) == Nresult); + XXH64_freeState(state); + return 0; + } + C + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(test LANGUAGES C) + find_package(xxHash CONFIG REQUIRED) + add_executable(test test.c) + target_link_libraries(test PRIVATE xxHash::xxhash) + CMAKE + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + system "./build/test" + end +end diff --git a/Formula/x/xz.rb b/Formula/x/xz.rb new file mode 100644 index 0000000000000..be5c43ae43ee8 --- /dev/null +++ b/Formula/x/xz.rb @@ -0,0 +1,60 @@ +class Xz < Formula + desc "General-purpose data compression with high compression ratio" + homepage "https://tukaani.org/xz/" + url "https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.gz" + mirror "https://downloads.sourceforge.net/project/lzmautils/xz-5.8.1.tar.gz" + mirror "http://downloads.sourceforge.net/project/lzmautils/xz-5.8.1.tar.gz" + sha256 "507825b599356c10dca1cd720c9d0d0c9d5400b9de300af00e4d1ea150795543" + license all_of: [ + "0BSD", + "GPL-2.0-or-later", + ] + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_tahoe: "a9ee5b57b2c49e1a8e1c637f44adaf3632e5b3e79385326f93a162457b36d7b3" + sha256 cellar: :any, arm64_sequoia: "dcd7823f2624cbcd08f55c232097a79300c7d76ab5969004db1a4785c6c0cd87" + sha256 cellar: :any, arm64_sonoma: "3bcdfeaa8b5bd910ac1cf1e7aec7e0fd82fd69f2f09c6ac682eca92725ad9e6c" + sha256 cellar: :any, arm64_ventura: "82fef9b66eea967b55cd0f26fd7356d60a0b926c5d9eaaf9c300a46f21391af5" + sha256 cellar: :any, tahoe: "ce65e4c93e377bef7e6fc7df69689f157dc1bc4fcbda1c8108ace99b9e88970c" + sha256 cellar: :any, sequoia: "6558e19cb2f13893677ec1fe075d268a69ce242a064ce1dc53940234da4b2c5f" + sha256 cellar: :any, sonoma: "87c3638621021437d470c7f650336da533fa41222dfe54b94473bbea2acf6bbd" + sha256 cellar: :any, ventura: "c0aedd30a078e08c7e67107506c61348d8259a2dce40697b77ff76f8c0dfc6d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "b246348ec4cc8643918e3c13b9f554e5ddede3d07e7e1c60eaba5b97120d473a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ee1ff38fcc213fdefd262be65a06669f3e0118a2bd5fb387147ebe884f94413" + end + + deny_network_access! [:build, :postinstall] + + def install + system "./configure", *std_configure_args, "--disable-silent-rules", "--disable-nls" + system "make", "check" + system "make", "install" + end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.xz + system bin/"xz", path + refute_path_exists path + + # decompress: data.txt.xz -> data.txt + system bin/"xz", "-d", "#{path}.xz" + assert_equal original_contents, path.read + + # Check that http mirror works + xz_tar = testpath/"xz.tar.gz" + stable.mirrors.each do |mirror| + next if mirror.start_with?("https") + + xz_tar.unlink if xz_tar.exist? + + # Set fake CA Cert to block any HTTPS redirects. + system "curl", "--location", mirror, "--cacert", "/fake", "--output", xz_tar + assert_equal stable.checksum.hexdigest, xz_tar.sha256 + end + end +end diff --git a/Formula/x11vnc.rb b/Formula/x11vnc.rb deleted file mode 100644 index 157026210e9a3..0000000000000 --- a/Formula/x11vnc.rb +++ /dev/null @@ -1,62 +0,0 @@ -class X11vnc < Formula - desc "VNC server for real X displays" - homepage "http://www.karlrunge.com/x11vnc/" - url "https://downloads.sourceforge.net/project/libvncserver/x11vnc/0.9.13/x11vnc-0.9.13.tar.gz" - sha256 "f6829f2e629667a5284de62b080b13126a0736499fe47cdb447aedb07a59f13b" - revision 1 - - bottle do - cellar :any - sha256 "388752257323e1376251e32dea385830afd3a11215b3661dc928111442cb2b5c" => :mojave - sha256 "3ed573fd3d02c34f407858af3f6e01386d1af2fc9fee16258eea94a4b2c19137" => :high_sierra - sha256 "3f840749807f57b4248c9ae202a214209c4bf4c4e7386d47da83b424153abe2a" => :sierra - sha256 "f4a33301592ef159be8f999fce086875bf88afd6ad2b48d6709c2f32d4ab3be1" => :el_capitan - sha256 "38e07e6c3a26cf1e8d60f1a4e7061da400afb9bb2803f0dd79566c5a3bfd0d22" => :yosemite - end - - depends_on "jpeg" - depends_on "openssl" - depends_on :x11 => :optional - - # Patch solid.c so a non-void function returns a NULL instead of a void. - # An email has been sent to the maintainers about this issue. - patch :DATA - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - ] - - if build.with? "x11" - args << "--with-x" - else - args << "--without-x" - end - - system "./configure", *args - system "make" - system "make", "MKDIRPROG=mkdir -p", "install" - end - - test do - system bin/"x11vnc", "--version" - end -end - -__END__ -diff --git a/x11vnc/solid.c b/x11vnc/solid.c -index d6b0bda..0b2cfa9 100644 ---- a/x11vnc/solid.c -+++ b/x11vnc/solid.c -@@ -177,7 +177,7 @@ unsigned long get_pixel(char *color) { - - XImage *solid_root(char *color) { - #if NO_X11 -- RAWFB_RET_VOID -+ RAWFB_RET(NULL) - if (!color) {} - return NULL; - #else diff --git a/Formula/x264.rb b/Formula/x264.rb deleted file mode 100644 index 85dea71b5ca0c..0000000000000 --- a/Formula/x264.rb +++ /dev/null @@ -1,52 +0,0 @@ -class X264 < Formula - desc "H.264/AVC encoder" - homepage "https://www.videolan.org/developers/x264.html" - head "https://git.videolan.org/git/x264.git" - - stable do - # the latest commit on the stable branch - url "https://git.videolan.org/git/x264.git", - :revision => "0a84d986e7020f8344f00752e3600b9769cc1e85" - version "r2917" - end - - bottle do - cellar :any - sha256 "474593a6930921e1668ff97daaa211d6b0da6c48a08f928496d76b45542afafe" => :mojave - sha256 "0aad96ccfbf09fbb4cbbaa708c9ff6b46829bd92873f482b05582ee0f7389624" => :high_sierra - sha256 "845455c25e8966fd2a1dc9c08b78df6c9a28d73848c187b411ef5d34de6094d0" => :sierra - end - - depends_on "nasm" => :build - - def install - args = %W[ - --prefix=#{prefix} - --disable-lsmash - --enable-shared - --enable-static - --enable-strip - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - x264_picture_t pic; - x264_picture_init(&pic); - x264_picture_alloc(&pic, 1, 1, 1); - x264_picture_clean(&pic); - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lx264", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/x265.rb b/Formula/x265.rb deleted file mode 100644 index 26ac6b2f62d05..0000000000000 --- a/Formula/x265.rb +++ /dev/null @@ -1,63 +0,0 @@ -class X265 < Formula - desc "H.265/HEVC encoder" - homepage "http://x265.org" - url "https://bitbucket.org/multicoreware/x265/downloads/x265_2.9.tar.gz" - sha256 "ebae687c84a39f54b995417c52a2fdde65a4e2e7ebac5730d251471304b91024" - head "https://bitbucket.org/multicoreware/x265", :using => :hg - - bottle do - cellar :any - sha256 "982f8dece959c9c038221760d17d2dd178724e34e111d19493553829dd87b980" => :mojave - sha256 "bd0fd78068d55876865a3d0d8425538f6936b55e9de970bf32ef389635ca7c16" => :high_sierra - sha256 "81634b022f895e6a06959d18a26f7b4ce3266091493f907cb1bff290458b0492" => :sierra - end - - depends_on "cmake" => :build - depends_on "nasm" => :build - depends_on :macos => :lion - - def install - # Build based off the script at ./build/linux/multilib.sh - args = std_cmake_args + %w[ - -DLINKED_10BIT=ON - -DLINKED_12BIT=ON - -DEXTRA_LINK_FLAGS=-L. - -DEXTRA_LIB=x265_main10.a;x265_main12.a - ] - high_bit_depth_args = std_cmake_args + %w[ - -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF - -DENABLE_SHARED=OFF -DENABLE_CLI=OFF - ] - (buildpath/"8bit").mkpath - - mkdir "10bit" do - system "cmake", buildpath/"source", *high_bit_depth_args - system "make" - mv "libx265.a", buildpath/"8bit/libx265_main10.a" - end - - mkdir "12bit" do - system "cmake", buildpath/"source", "-DMAIN12=ON", *high_bit_depth_args - system "make" - mv "libx265.a", buildpath/"8bit/libx265_main12.a" - end - - cd "8bit" do - system "cmake", buildpath/"source", *args - system "make" - mv "libx265.a", "libx265_main.a" - system "libtool", "-static", "-o", "libx265.a", "libx265_main.a", - "libx265_main10.a", "libx265_main12.a" - system "make", "install" - end - end - - test do - yuv_path = testpath/"raw.yuv" - x265_path = testpath/"x265.265" - yuv_path.binwrite "\xCO\xFF\xEE" * 3200 - system bin/"x265", "--input-res", "80x80", "--fps", "1", yuv_path, x265_path - header = "AAAAAUABDAH//w==" - assert_equal header.unpack("m"), [x265_path.read(10)] - end -end diff --git a/Formula/x3270.rb b/Formula/x3270.rb deleted file mode 100644 index a930487e3faf2..0000000000000 --- a/Formula/x3270.rb +++ /dev/null @@ -1,38 +0,0 @@ -class X3270 < Formula - desc "IBM 3270 terminal emulator for the X Window System and Windows" - homepage "http://x3270.bgp.nu/" - url "https://downloads.sourceforge.net/project/x3270/x3270/3.6ga5/suite3270-3.6ga5-src.tgz" - sha256 "bebd0770e23a87997fe1d2353e4f1473aabe461fdddedccbb41fd241e8b5b424" - - bottle do - sha256 "910ce0d5e1b99a3bf06f74da9a73bca06478e2b18a719b1b9b7d2f45d50eeda4" => :mojave - sha256 "f67129f6e0d14448939953d4c8966a5770d8a65aecdf42108f43dd4914dda9d8" => :high_sierra - sha256 "08de119ad4c2626d8f8b5da84976601b89f1428af4274c2f5e1ed48b3805254d" => :sierra - sha256 "c82c4f5ceb379a44acab4592f3d1d9cd05d499541b806397bd656e2152474815" => :el_capitan - end - - option "with-x11", "Include x3270 (X11-based version)" - - depends_on "openssl" - depends_on :x11 => :optional - - def install - args = %W[ - --prefix=#{prefix} - --enable-c3270 - --enable-pr3287 - --enable-s3270 - --enable-tcl3270 - ] - - args << "--enable-x3270" if build.with? "x11" - - system "./configure", *args - system "make", "install" - system "make", "install.man" - end - - test do - system bin/"c3270", "--version" - end -end diff --git a/Formula/xa.rb b/Formula/xa.rb deleted file mode 100644 index 41900f03a0bfd..0000000000000 --- a/Formula/xa.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xa < Formula - desc "6502 cross assembler" - homepage "https://www.floodgap.com/retrotech/xa/" - url "https://www.floodgap.com/retrotech/xa/dists/xa-2.3.8.tar.gz" - sha256 "3b97d2fe8891336676ca28ff127b69e997f0b5accf2c7009b4517496929b462a" - - bottle do - cellar :any_skip_relocation - sha256 "3efcb7fa86b3cf417f239ad749d5a3c6ec5d7c12aac08f5619917fb8e7c24335" => :mojave - sha256 "8b72ad60db64443a0f7a821059221573e258e4a3e99621e5defebe71bda1d322" => :high_sierra - sha256 "c3148f1d7318b3e1757bdae5c7cca5d0f5cd15d1dbb3fbf33880c0b22ee525f1" => :sierra - sha256 "937cdf0951ddd716ff654d3d959f862bb838c830a5194de220c3c60c118895c5" => :el_capitan - end - - def install - system "make", "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "DESTDIR=#{prefix}", - "install" - end - - test do - (testpath/"foo.a").write "jsr $ffd2\n" - - system "#{bin}/xa", "foo.a" - code = File.open("a.o65", "rb") { |f| f.read.unpack("C*") } - assert_equal [0x20, 0xd2, 0xff], code - end -end diff --git a/Formula/xalan-c.rb b/Formula/xalan-c.rb deleted file mode 100644 index f6a28ebd2ae14..0000000000000 --- a/Formula/xalan-c.rb +++ /dev/null @@ -1,80 +0,0 @@ -class XalanC < Formula - desc "XSLT processor" - homepage "https://xalan.apache.org/xalan-c/" - url "https://www.apache.org/dyn/closer.cgi?path=xalan/xalan-c/sources/xalan_c-1.11-src.tar.gz" - sha256 "4f5e7f75733d72e30a2165f9fdb9371831cf6ff0d1997b1fb64cdd5dc2126a28" - revision 1 - - bottle do - cellar :any - sha256 "5b00fab72d4db7db40495ff5331e6cd9539b30f21d6b1357d9dcc2e7275421ae" => :mojave - sha256 "24ddfd8ff41dbe54a5570db2a004247f92ef4bc1c897554ea83dfe7c138a172f" => :high_sierra - sha256 "dfe6413a8d4cba234c105d0936a671a34742d2ac0103db863a644bf78538c28c" => :sierra - sha256 "0b99ebef6e23b1c0d1e67d4ed8130130ad5c7b6af03f43ea9248c2d78e19a5cc" => :el_capitan - end - - depends_on "xerces-c" - - # Fix segfault. See https://issues.apache.org/jira/browse/XALANC-751 - # Build with char16_t casts. See https://issues.apache.org/jira/browse/XALANC-773 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/master/xalan-c/xerces-char16.patch" - sha256 "ebd4ded1f6ee002351e082dee1dcd5887809b94c6263bbe4e8e5599f56774ebf" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/master/xalan-c/locator-system-id.patch" - sha256 "7c317c6b99cb5fb44da700e954e6b3e8c5eda07bef667f74a42b0099d038d767" - end - - needs :cxx11 - - def install - ENV.cxx11 - ENV.deparallelize # See https://issues.apache.org/jira/browse/XALANC-696 - ENV["XALANCROOT"] = "#{buildpath}/c" - ENV["XALAN_LOCALE_SYSTEM"] = "inmem" - ENV["XALAN_LOCALE"] = "en_US" - - cd "c" do - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - # Clean up links - rm Dir["#{lib}/*.dylib.*"] - end - end - - test do - (testpath/"input.xml").write <<~EOS - -
    - An XSLT test-case - - Roger Leigh - Open Microscopy Environment - - This example article is used to verify the functionality - of Xalan-C++ in applying XSLT transforms to XML documents -
    - EOS - - (testpath/"transform.xsl").write <<~EOS - - - - Article: - Authors: - - - * - - - EOS - - assert_match "Article: An XSLT test-case\nAuthors: \n* Roger Leigh\n* Open Microscopy Environment", - shell_output("#{bin}/Xalan #{testpath}/input.xml #{testpath}/transform.xsl") - end -end diff --git a/Formula/xapian.rb b/Formula/xapian.rb deleted file mode 100644 index 62401b54930fb..0000000000000 --- a/Formula/xapian.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Xapian < Formula - desc "C++ search engine library with many bindings" - homepage "https://xapian.org/" - url "https://oligarchy.co.uk/xapian/1.4.7/xapian-core-1.4.7.tar.xz" - mirror "https://fossies.org/linux/www/xapian-core-1.4.7.tar.xz" - sha256 "13f08a0b649c7afa804fa0e85678d693fd6069dd394c9b9e7d41973d74a3b5d3" - - bottle do - cellar :any - sha256 "72404e4891d872f5e80d4af61f6692c62457673ae888c89190c0c13de022ead6" => :mojave - sha256 "088f14bc829dbafed8e02666e7f6a276c7013c6b04d0e3eb0a9602c2605aaec8" => :high_sierra - sha256 "95e3a0b7950ef9b51ed0c385f9431f1f99a883fef3790de851fca3ea741e051b" => :sierra - sha256 "1ee62f239e87de8a4ba26c7f74eaefff7ec4841e83a01dbcf14d4a2c712781c0" => :el_capitan - end - - option "with-ruby", "Ruby bindings" - - deprecated_option "ruby" => "with-ruby" - deprecated_option "with-python" => "with-python@2" - - depends_on "python@2" => :optional - depends_on "sphinx-doc" => :build if build.with? "python@2" - depends_on "ruby" => :optional if MacOS.version <= :sierra - - skip_clean :la - - resource "bindings" do - url "https://oligarchy.co.uk/xapian/1.4.7/xapian-bindings-1.4.7.tar.xz" - sha256 "4519751376dc5b59893b812495e6004fd80eb4a10970829aede71a35264b4e6a" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - if build.with?("ruby") || build.with?("python@2") - resource("bindings").stage do - ENV["XAPIAN_CONFIG"] = bin/"xapian-config" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - ] - - if build.with? "ruby" - ruby_site = lib/"ruby/site_ruby" - ENV["RUBY_LIB"] = ENV["RUBY_LIB_ARCH"] = ruby_site - args << "--with-ruby" - end - - if build.with? "python@2" - # https://github.com/Homebrew/homebrew-core/issues/2422 - ENV.delete("PYTHONDONTWRITEBYTECODE") - - (lib/"python2.7/site-packages").mkpath - ENV["PYTHON_LIB"] = lib/"python2.7/site-packages" - - ENV.append_path "PYTHONPATH", - Formula["sphinx-doc"].opt_libexec/"lib/python2.7/site-packages" - ENV.append_path "PYTHONPATH", - Formula["sphinx-doc"].opt_libexec/"vendor/lib/python2.7/site-packages" - - args << "--with-python" - end - - system "./configure", *args - system "make", "install" - end - end - end - - def caveats - if build.with? "ruby" - <<~EOS - You may need to add the Ruby bindings to your RUBYLIB from: - #{HOMEBREW_PREFIX}/lib/ruby/site_ruby - - EOS - end - end - - test do - system bin/"xapian-config", "--libs" - end -end diff --git a/Formula/xar-mackyle.rb b/Formula/xar-mackyle.rb deleted file mode 100644 index 362088fc8f8d6..0000000000000 --- a/Formula/xar-mackyle.rb +++ /dev/null @@ -1,35 +0,0 @@ -class XarMackyle < Formula - desc "eXtensible ARchiver" - homepage "https://mackyle.github.io/xar/" - url "https://github.com/downloads/mackyle/xar/xar-1.6.1.tar.gz" - sha256 "ee46089968457cf710b8cf1bdeb98b7ef232eb8a4cdeb34502e1f16ef4d2153e" - - bottle do - cellar :any - rebuild 1 - sha256 "75fda2bbc38449b34578325d64c2427786a5f39e8dac598e002bdee648f57735" => :mojave - sha256 "fcca4c13a2fcaade1a8be7ea395849fc2578f466527b7dfc75c7dea97f7bc796" => :high_sierra - sha256 "192cc85dd14c2f3fcf7900135f3f29363f895f568b07f569a15e1894530d113f" => :sierra - sha256 "5b81069ab3ea6d376c675affcee92a4809af67c4e7644ea83d8cf7f56134578c" => :el_capitan - sha256 "498ace8868904d6fdc7f1a74eef8a22e487a2e7178d79b401edb5b00e20cca44" => :yosemite - end - - depends_on "openssl" - depends_on "xz" - - def install - system "./configure", "--prefix=#{libexec}" - system "make" - ENV.deparallelize { system "make", "install" } - - bin.install_symlink libexec/"bin/xar" => "xar-mackyle" - man1.install_symlink libexec/"share/man/man1/xar.1" => "xar-mackyle.1" - end - - test do - touch "testfile.txt" - system libexec/"bin/xar", "-cv", "testfile.txt", "-f", "test.xar" - assert_predicate testpath/"test.xar", :exist? - assert_match /testfile.txt/, shell_output("#{libexec}/bin/xar -tv -f test.xar") - end -end diff --git a/Formula/xaric.rb b/Formula/xaric.rb deleted file mode 100644 index 0096cefb7521b..0000000000000 --- a/Formula/xaric.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xaric < Formula - desc "IRC client" - homepage "https://xaric.org/" - url "https://xaric.org/software/xaric/releases/xaric-0.13.7.tar.gz" - sha256 "fd8cd677e2403e44ff525eac7c239cd8d64b7448aaf56a1272d1b0c53df1140c" - - bottle do - rebuild 1 - sha256 "80e5230b07073263a0e38e537c823adda12735240c49e18d206b17cd1471cd4f" => :mojave - sha256 "c9071a891ade585a6ce04f759ba8fa95ef786126071f1cd9f80863f1c295aed6" => :high_sierra - sha256 "e3d4b5dd228aee7f9f81801e7696543983efb5df0239048adb035d984046f95d" => :sierra - sha256 "9ddfb8878904f92a7281f5611a11b72b81ebed0ef6ac7af9c10588cb717b9317" => :el_capitan - sha256 "f29d234ec8065f976ce8f14e21374871e5b8b2d092a26ad163d9cac32988bb9b" => :yosemite - sha256 "3b8f2a6b837e43ff57ef626b4d46142562c1eda120ac5889124eab11d8b46b86" => :mavericks - end - - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - test do - assert_match(/Xaric #{version}/, shell_output("script -q /dev/null xaric -v")) - end -end diff --git a/Formula/xbee-comm.rb b/Formula/xbee-comm.rb deleted file mode 100644 index 8cd2975496901..0000000000000 --- a/Formula/xbee-comm.rb +++ /dev/null @@ -1,34 +0,0 @@ -# This fork contains macOS patches. -# Original project: https://github.com/roysjosh/xbee-comm - -class XbeeComm < Formula - desc "XBee communication libraries and utilities" - homepage "https://github.com/guyzmo/xbee-comm.git" - url "https://github.com/guyzmo/xbee-comm/archive/v1.5.tar.gz" - sha256 "c474d22feae5d9c05b3ec167b839c8fded512587da0f020ca682d60db174f24a" - head "https://github.com/guyzmo/xbee-comm.git" - - bottle do - cellar :any_skip_relocation - sha256 "c5358f469073875537f489d59525c3c9022cebbd3fb77f418b4abba96cd24bf4" => :mojave - sha256 "935948849935f3f11e6cf8992b1c6ad79e92716583c6b5685bf55cc6c4bd2d7a" => :high_sierra - sha256 "9f6d626176e06f69934f3a3a3c56ddfa6a02be4f49d2e53dbce9d92b17f9eeb0" => :sierra - sha256 "64b15ac79da143e2b092db702fd22c92ef064093be1c4c81cb60fd5b08f44075" => :el_capitan - sha256 "805e99d4e700a2e9993f26fbc48cae17c1bf16e6ff9ce63b5c7195358fcb052c" => :yosemite - sha256 "06cb9c96c880a55763dbb58c1b1a60cba19ec89be9c6995955e235d10b6cb47d" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "aclocal" - system "autoconf" - system "autoheader" - system "automake", "-a", "-c" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/xboard.rb b/Formula/xboard.rb deleted file mode 100644 index 6685fce0dccad..0000000000000 --- a/Formula/xboard.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Xboard < Formula - desc "Graphical user interface for chess" - homepage "https://www.gnu.org/software/xboard/" - url "https://ftp.gnu.org/gnu/xboard/xboard-4.9.1.tar.gz" - mirror "https://ftpmirror.gnu.org/xboard/xboard-4.9.1.tar.gz" - sha256 "2b2e53e8428ad9b6e8dc8a55b3a5183381911a4dae2c0072fa96296bbb1970d6" - revision 2 - - bottle do - sha256 "68471e095e3cd698e3e461d1072a8bbfbcb63da8fc6edaa4d9d8bc0f46618758" => :mojave - sha256 "00118aebe71d62daeb3b57f2112dc8f86dcc94cb885e7087b10f609a0307b73b" => :high_sierra - sha256 "4a50ceee531601a9a920ca1a2d099113993b0369e5b76fe4125ba43563c2b04a" => :sierra - sha256 "47d20242d82c9223754908ec0a7443ea5f7774a82eaf43bfbeaacbda5c750ce8" => :el_capitan - end - - head do - url "https://git.savannah.gnu.org/git/xboard.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "fairymax" - depends_on "gettext" - depends_on "gtk+" - depends_on "librsvg" - depends_on "polyglot" - - def install - system "./autogen.sh" if build.head? - args = ["--prefix=#{prefix}", - "--with-gtk", - "--without-Xaw", - "--disable-zippy"] - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - system bin/"xboard", "--help" - end -end diff --git a/Formula/xcenv.rb b/Formula/xcenv.rb deleted file mode 100644 index a53e26944f4b1..0000000000000 --- a/Formula/xcenv.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Xcenv < Formula - desc "Xcode version manager" - homepage "https://github.com/xcenv/xcenv" - url "https://github.com/xcenv/xcenv/archive/v1.1.1.tar.gz" - sha256 "9426dc1fa50fba7f31a2867c543751428768e0592e499fb7724da8dae45a32ec" - head "https://github.com/xcenv/xcenv.git" - - bottle :unneeded - - def install - prefix.install ["bin", "libexec"] - end - - test do - shell_output("eval \"$(#{bin}/xcenv init -)\" && xcenv versions") - end -end diff --git a/Formula/xclip.rb b/Formula/xclip.rb deleted file mode 100644 index 27dc893b5b0ad..0000000000000 --- a/Formula/xclip.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Xclip < Formula - desc "Command-line utility that is designed to run on any system with an X11" - homepage "https://github.com/astrand/xclip" - url "https://github.com/astrand/xclip/archive/0.13.tar.gz" - sha256 "ca5b8804e3c910a66423a882d79bf3c9450b875ac8528791fb60ec9de667f758" - - bottle do - cellar :any_skip_relocation - sha256 "7bb1acc9b968eba155874f614dbfea960e883121321b063faf81f106f2521014" => :mojave - sha256 "0963015158b7d4ae2981503edc18427737a0586b7155da5cd2ddaa93fb3b92bd" => :high_sierra - sha256 "bb26c2bb6d7ce8f15ab50144f38d11ddde113bb400326ccea990ca9a5d0a9c69" => :sierra - sha256 "9e17790e9a94ae1e29317f013a65f2d639ae9063db48ed7fa0aed7449f221abb" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on :x11 - - def install - system "autoreconf", "-fiv" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/xclip", "-version" - end -end diff --git a/Formula/xcodegen.rb b/Formula/xcodegen.rb deleted file mode 100644 index bf077bd906b87..0000000000000 --- a/Formula/xcodegen.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Xcodegen < Formula - desc "Generate your Xcode project from a spec file and your folder structure" - homepage "https://github.com/yonaskolb/XcodeGen" - url "https://github.com/yonaskolb/XcodeGen/archive/2.1.0.tar.gz" - sha256 "b7895b8daacb7cef19e8dd3518ac060e9d9ba99479aff4a5b6ca44f7326099da" - - bottle do - cellar :any_skip_relocation - sha256 "54f33196d44130372f813b734afa3a9a124be465b513a53aab21f0d97784e366" => :mojave - sha256 "f96423eaaf0d3ccf5cc8a779fc98e6090339d751cc23e1e3b3c5f4e6ec4417bb" => :high_sierra - end - - depends_on :xcode => ["9.3", :build] - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"xcodegen.yml").write <<~EOS - name: GeneratedProject - options: - bundleIdPrefix: com.project - targets: - TestProject: - type: application - platform: iOS - sources: TestProject - EOS - (testpath/"TestProject").mkpath - system bin/"XcodeGen", "--spec", testpath/"xcodegen.yml" - assert_predicate testpath/"GeneratedProject.xcodeproj", :exist? - assert_predicate testpath/"GeneratedProject.xcodeproj/project.pbxproj", :exist? - output = (testpath/"GeneratedProject.xcodeproj/project.pbxproj").read - assert_match "name = TestProject", output - assert_match "isa = PBXNativeTarget", output - end -end diff --git a/Formula/xcproj.rb b/Formula/xcproj.rb deleted file mode 100644 index ef0e63118522f..0000000000000 --- a/Formula/xcproj.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Xcproj < Formula - desc "Manipulate Xcode project files" - homepage "https://github.com/0xced/xcproj" - url "https://github.com/0xced/xcproj/archive/0.2.1.tar.gz" - sha256 "8c31f85d57945cd5bb306d7a0ff7912f2a0d53fa3c888657e0a69ca5d27348cb" - head "https://github.com/0xced/xcproj.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "7efa30f2f581bbcc0962605710b1125965b6b8d13ca8e5fab8517adfe1c9334d" => :mojave - sha256 "d34b031444c1122392afb789036d3197a0d333ae11447c819509f1f31de30c9f" => :high_sierra - sha256 "f21fe7b203fbee383f502d66ac8471c7798d74dae7d4ad4491e933fcd1de22d5" => :sierra - sha256 "c7a6b18a500b28fbd9cba8939423b7a9c480be98e09883ef90e4b605023b451f" => :el_capitan - sha256 "8e20d277d1927c425544654cd8613765460f0b9bbbb8133b0ac04ebdff5d6f0e" => :yosemite - end - - depends_on :macos => :mountain_lion - depends_on :xcode - - def install - xcodebuild "-project", "xcproj.xcodeproj", - "-scheme", "xcproj", - "SYMROOT=build", - "DSTROOT=#{prefix}", - "INSTALL_PATH=/bin", - "-verbose", - "install" - end - - def caveats - <<~EOS - The xcproj binary is bound to the Xcode version that compiled it. If you delete, move or - rename the Xcode version that compiled the binary, xcproj will fail with the following error: - - DVTFoundation.framework not found. It probably means that you have deleted, moved or - renamed the Xcode copy that compiled `xcproj`. - Simply recompiling `xcproj` should fix this problem. - - In which case you will have to remove and rebuild the installed xcproj version. - EOS - end - - test do - system "#{bin}/xcproj", "--version" - end -end diff --git a/Formula/xctool.rb b/Formula/xctool.rb deleted file mode 100644 index b49b99bd1117a..0000000000000 --- a/Formula/xctool.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Xctool < Formula - desc "Drop-in replacement for xcodebuild with a few extra features" - homepage "https://github.com/facebook/xctool" - url "https://github.com/facebook/xctool/archive/0.3.5.tar.gz" - sha256 "100df971e106709b07046a16917ae8b052eb1e250ecab305fe65c8d0a50141ef" - head "https://github.com/facebook/xctool.git" - - bottle do - cellar :any - sha256 "b2693944c691e1ae53a14bd3b3cae22432a763d42d5cc84ce7487439f1de53fa" => :mojave - sha256 "b7f05ca2bc15cbdc6f715bc8e53774c9faa3c7c21ffe91a1a8d4e78101f3634c" => :high_sierra - sha256 "193c2940c85153bfffed60c0f572f3fa26ee6e7e4781d8c0e3b477a0a9bd2f80" => :sierra - end - - depends_on :xcode => "7.0" - - def install - xcodebuild "-workspace", "xctool.xcworkspace", - "-scheme", "xctool", - "-configuration", "Release", - "SYMROOT=build", - "-IDEBuildLocationStyle=Custom", - "-IDECustomDerivedDataLocation=#{buildpath}", - "XT_INSTALL_ROOT=#{libexec}" - bin.install_symlink "#{libexec}/bin/xctool" - end - - def post_install - # all libraries need to be signed to avoid codesign errors when - # injecting them into xcodebuild or Simulator.app. - Dir.glob("#{libexec}/lib/*.dylib") do |lib_file| - system "/usr/bin/codesign", "-f", "-s", "-", lib_file - end - end - - test do - system "(#{bin}/xctool -help; true)" - end -end diff --git a/Formula/xcv.rb b/Formula/xcv.rb deleted file mode 100644 index 87b9f0382cad0..0000000000000 --- a/Formula/xcv.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Xcv < Formula - desc "Cut, copy and paste files with Bash" - homepage "https://github.com/busterc/xcv" - url "https://github.com/busterc/xcv/archive/v1.0.1.tar.gz" - sha256 "f2898f78bb05f4334073adb8cdb36de0f91869636a7770c8e955cee8758c0644" - head "https://github.com/busterc/xcv.git" - - bottle :unneeded - - def install - bin.install "xcv" - end - - test do - system "#{bin}/xcv" - end -end diff --git a/Formula/xdelta.rb b/Formula/xdelta.rb deleted file mode 100644 index f94ba3fbd3261..0000000000000 --- a/Formula/xdelta.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Xdelta < Formula - desc "Binary diff, differential compression tools" - homepage "http://xdelta.org" - url "https://github.com/jmacd/xdelta/archive/v3.1.0.tar.gz" - sha256 "7515cf5378fca287a57f4e2fee1094aabc79569cfe60d91e06021a8fd7bae29d" - - bottle do - cellar :any - sha256 "29a63934406537a96b023609a87998574d41943ed2cfe816b3febc24b7cc7db1" => :mojave - sha256 "a65a726ce73eeebb9abfdf8069b08658dc4fad13527d4d162d1119cc32702b11" => :high_sierra - sha256 "7f51b76d06a6ac8aae36c10b41776a374d5fafa6b55c4908a885be7a88194676" => :sierra - sha256 "e07f928aadf6a9d8beb8a19fb72cb673cf0ae13c339ccd75c5df134cb3bc5c09" => :el_capitan - sha256 "2581a9d0aabf6f6b34d35aae4d7ab07b6aaebdb70fd3b00ef14eff3bd96aa6c7" => :yosemite - sha256 "a0801a8bd9796d03d8c031905e28a6e5f50b155da3102337070ec787ccb5cee9" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "xz" - - def install - cd "xdelta3" do - system "autoreconf", "--install" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-liblzma" - system "make", "install" - end - end - - test do - system bin/"xdelta3", "config" - end -end diff --git a/Formula/xdot.rb b/Formula/xdot.rb deleted file mode 100644 index daf8ff3021bfb..0000000000000 --- a/Formula/xdot.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Xdot < Formula - desc "Interactive viewer for graphs written in Graphviz's dot language" - homepage "https://github.com/jrfonseca/xdot.py" - url "https://files.pythonhosted.org/packages/75/d3/89151e5c24f59ac5577368651f9d2a5db3cdd870e8f96896e505cb876187/xdot-0.9.tar.gz" - sha256 "a33701664ecfefe7c7313a120a587e87334f3a566409bc451538fcde5edd6907" - revision 3 - head "https://github.com/jrfonseca/xdot.py.git" - - bottle do - cellar :any_skip_relocation - sha256 "1560cba7af323eff64cf012d50d64f9c55548337a0867549b2361693ef9e21cf" => :mojave - sha256 "5650061231c76ff5d4d36da3eef76224bbb9a9bcf7b4a4b6037364782fa99ba4" => :high_sierra - sha256 "271c4ec69d982e73f0a9594dead0e8428076c1ecd84e8787ec687ba6981455f7" => :sierra - sha256 "5650061231c76ff5d4d36da3eef76224bbb9a9bcf7b4a4b6037364782fa99ba4" => :el_capitan - end - - depends_on "gtk+3" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python" - - resource "graphviz" do - url "https://files.pythonhosted.org/packages/fa/d1/63b62dee9e55368f60b5ea445e6afb361bb47e692fc27553f3672e16efb8/graphviz-0.8.2.zip" - sha256 "606741c028acc54b1a065b33045f8c89ee0927ea77273ec409ac988f2c3d1091" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resource("graphviz").stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system "#{bin}/xdot", "--help" - end -end diff --git a/Formula/xdotool.rb b/Formula/xdotool.rb deleted file mode 100644 index c69212042c5cc..0000000000000 --- a/Formula/xdotool.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Xdotool < Formula - desc "Fake keyboard/mouse input and window management for X" - homepage "https://www.semicomplete.com/projects/xdotool/" - url "https://github.com/jordansissel/xdotool/archive/v3.20160805.1.tar.gz" - sha256 "ddafca1239075c203769c17a5a184587731e56fbe0438c09d08f8af1704e117a" - - bottle do - sha256 "02edb6e55146177191ec888e7886878b2bf93defb20a2e6a01546bce111859b8" => :mojave - sha256 "2f949fc70d828db23364beed16bdbd15c728d790601e5e0a59b110f8f6eb3826" => :high_sierra - sha256 "13b1b017e94c76bde510b06427cf517c0d78028994e3b1bb8501ec2cbd5c7ef1" => :sierra - sha256 "d7fad4610977a3a5f8879b4f51d35e08e4ef3e65cfbc04353e67bdc14b279867" => :el_capitan - sha256 "037a599194a39189e8d8397c358dce21c1425065fdeeb29e59db26b696425f63" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libxkbcommon" - - depends_on :x11 - - def install - # Work around an issue with Xcode 8 on El Capitan, which - # errors out with `typedef redefinition with different types` - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && - MacOS::Xcode.version >= "8.0" - ENV.delete("SDKROOT") - end - - system "make", "PREFIX=#{prefix}", "INSTALLMAN=#{man}", "install" - end - - def caveats; <<~EOS - You will probably want to enable XTEST in your X11 server now by running: - defaults write org.x.X11 enable_test_extensions -boolean true - - For the source of this useful hint: - https://stackoverflow.com/questions/1264210/does-mac-x11-have-the-xtest-extension - EOS - end - - test do - system "#{bin}/xdotool", "--version" - end -end diff --git a/Formula/xerces-c.rb b/Formula/xerces-c.rb deleted file mode 100644 index 35a4af6901870..0000000000000 --- a/Formula/xerces-c.rb +++ /dev/null @@ -1,48 +0,0 @@ -class XercesC < Formula - desc "Validating XML parser" - homepage "https://xerces.apache.org/xerces-c/" - url "https://www.apache.org/dyn/closer.cgi?path=xerces/c/3/sources/xerces-c-3.2.2.tar.gz" - sha256 "dd6191f8aa256d3b4686b64b0544eea2b450d98b4254996ffdfe630e0c610413" - - bottle do - cellar :any - sha256 "771f01c9ce075308908902181a5e157f3b4d47d6844d619e2df81f6c936b89fe" => :mojave - sha256 "a0e99437d0b12ce946b34a71ab008abeefa139a1abd7c7603c4fc5ad6829f414" => :high_sierra - sha256 "3ea12573e166b772836cd4daa98810ba4ce785f8a988d0974aa44d5a08bd74fb" => :sierra - sha256 "acbba9a978fd03c8fc23b015e6c1537ea7d411248cce14505aeb6ce30c0e1092" => :el_capitan - end - - depends_on "cmake" => :build - - needs :cxx11 - - def install - ENV.cxx11 - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "ctest", "-V" - system "make", "install" - end - # Remove a sample program that conflicts with libmemcached - # on case-insensitive file systems - (bin/"MemParse").unlink - end - - test do - (testpath/"ducks.xml").write <<~EOS - - - - - Duck One - duck@foo.com - - - EOS - - output = shell_output("#{bin}/SAXCount #{testpath}/ducks.xml") - assert_match "(6 elems, 1 attrs, 0 spaces, 37 chars)", output - end -end diff --git a/Formula/xhyve.rb b/Formula/xhyve.rb deleted file mode 100644 index d3761e7e93dea..0000000000000 --- a/Formula/xhyve.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Xhyve < Formula - desc "Lightweight macOS virtualization solution based on FreeBSD's bhyve" - homepage "https://github.com/machyve/xhyve" - url "https://github.com/machyve/xhyve/archive/v0.2.0.tar.gz" - sha256 "32c390529a73c8eb33dbc1aede7baab5100c314f726cac14627d2204ad9d3b3c" - head "https://github.com/machyve/xhyve.git" - - bottle do - cellar :any - rebuild 1 - sha256 "babcee304193c68f484434c551732e5657878095f00c4149fc88867317f9252e" => :mojave - sha256 "9643b72b869ec57653668f1ed2db0c3a2c7fad77d8000931933824622032d476" => :high_sierra - sha256 "edc2e17147d4ae9333033e7317590a48b752b418df689a6dae45bd29a12eaca8" => :sierra - sha256 "b0a94f72b09c71aa3bfbbf55669cd9e64ea309d6be8c838f6bc98aeaf8a6895c" => :el_capitan - sha256 "e61ee4b3d2d3b5bba47f4288af54980f5de7991cadf6aa83dc058cb36854c789" => :yosemite - end - - depends_on :macos => :yosemite - - def install - args = [] - args << "GIT_VERSION=#{version}" if build.stable? - system "make", *args - bin.install "build/xhyve" - pkgshare.install "test/" - pkgshare.install "xhyverun.sh" - man1.install "xhyve.1" if build.head? - end - - test do - system "#{bin}/xhyve", "-v" - end -end diff --git a/Formula/xidel.rb b/Formula/xidel.rb deleted file mode 100644 index 4e794f5da7263..0000000000000 --- a/Formula/xidel.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xidel < Formula - desc "XPath/XQuery 3.0, JSONiq interpreter to extract data from HTML/XML/JSON" - homepage "http://www.videlibri.de/xidel.html" - url "https://github.com/benibela/xidel/releases/download/Xidel_0.9.8/xidel-0.9.8.src.tar.gz" - sha256 "72b5b1a2fc44a0a61831e268c45bc6a6c28e3533b5445151bfbdeaf1562af39c" - - bottle do - cellar :any_skip_relocation - sha256 "fba738ca2b8b7c98770f15ac37fe824c440de248d271a4a3544ed7f7730f2a3a" => :mojave - sha256 "20450073b91be33a6f863b5057952317d579c5835974c29bb6bee939d68dda5c" => :high_sierra - sha256 "13c10cdbe9158109ab5f4099805b6003fbe430a960b9956957717482651378d4" => :sierra - sha256 "62878dce5345f0b69db3102548e754be300063164f6dec7075d3402b73b3bc0b" => :el_capitan - end - - depends_on "fpc" - depends_on "openssl" - - def install - cd "programs/internet/xidel" do - system "./build.sh" - bin.install "xidel" - man1.install "meta/xidel.1" - end - end - - test do - assert_equal "123\n", shell_output("#{bin}/xidel -e 123") - end -end diff --git a/Formula/xlispstat.rb b/Formula/xlispstat.rb deleted file mode 100644 index a95218c04ebaa..0000000000000 --- a/Formula/xlispstat.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xlispstat < Formula - desc "Statistical data science environment based on Lisp" - homepage "https://homepage.stat.uiowa.edu/~luke/xls/xlsinfo/" - url "https://homepage.cs.uiowa.edu/~luke/xls/xlispstat/current/xlispstat-3-52-23.tar.gz" - version "3.52.23" - sha256 "9bf165eb3f92384373dab34f9a56ec8455ff9e2bf7dff6485e807767e6ce6cf4" - - bottle do - cellar :any_skip_relocation - sha256 "c9b40607436fb010b8c7bdbf20a9bc377f18c5958eca6a8a1439bf29c2721810" => :mojave - sha256 "a2847ae5a3820e85b826117f59a809981fcbfe325abd2f38760cf8003ab9814b" => :high_sierra - sha256 "0180be9b973a87ff7feb72dbaebed8a46f857e1f670e864276e43cc294515870" => :sierra - sha256 "f83a1cc043c82daf6bf4fa9717f090e10e04388544d79771ce8b6848c880b757" => :el_capitan - sha256 "c4004c8fc128a187c35923eff3cb0c5a641f7928aff558559279d5d98abe849d" => :yosemite - end - - depends_on :x11 - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - ENV.deparallelize # Or make fails bytecompiling lisp code - system "make" - system "make", "install" - end - - test do - assert_equal "> 50.5\n> ", pipe_output("#{bin}/xlispstat | tail -2", "(median (iseq 1 100))") - end -end diff --git a/Formula/xlslib.rb b/Formula/xlslib.rb deleted file mode 100644 index 6461cdca5dd82..0000000000000 --- a/Formula/xlslib.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xlslib < Formula - desc "C++/C library to construct Excel .xls files in code" - homepage "https://sourceforge.net/projects/xlslib" - url "https://downloads.sourceforge.net/project/xlslib/xlslib-package-2.5.0.zip" - mirror "https://dl.bintray.com/homebrew/mirror/xlslib-package-2.5.0.zip" - sha256 "05a5d052ffdd6590755949d80d16a56285561557bc9a5e887e3b8b3fef92a3f3" - - bottle do - cellar :any - sha256 "4cb1f1572aabd2918427724158ef6361390ee0f5268a3c14cb8ecf09a9f7c00d" => :mojave - sha256 "bb4b5aa643155d211af17a47b5337d65431b1ade0e233af9770d62dbb7ab1448" => :high_sierra - sha256 "bcdef576e03aa1cad74d341f6fcc72a1e7944a54542941f96cb8ef8063c2190e" => :sierra - sha256 "a4d5714e19c1d4e44d67bbe9cda064120dc01e9cf207771ae5ef208e76ed2cd9" => :el_capitan - sha256 "cfd77ea71da12276124cb9cb08bb9ad51ab38b17e912d4dd8c4fec8a428714a1" => :yosemite - sha256 "b23da4149e9db9bf4152cfc8943ac83d254796d88741592949c3928ae7988149" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - cd "xlslib" - system "autoreconf", "-i" # shipped configure hardcodes automake-1.13 - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/xmake.rb b/Formula/xmake.rb deleted file mode 100644 index 141812fc5982a..0000000000000 --- a/Formula/xmake.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Xmake < Formula - desc "Make-like build utility based on Lua" - homepage "https://xmake.io/" - url "https://github.com/tboox/xmake/archive/v2.2.3.tar.gz" - sha256 "c73d34805ab26d214f22fee74bf033942f91ce43bfc028663ffb910ad22c2c5d" - head "https://github.com/waruqi/xmake.git" - - bottle do - cellar :any_skip_relocation - sha256 "252b15004aaaf198350a928094b4f88ecbbe9dc431ba2f88681719f21259c3f8" => :mojave - sha256 "2812210a1873035a649b38ae7f9cff89da845cbe4ee4a65d028a4060c1b59d48" => :high_sierra - sha256 "f098eda2f87fcd2d5b2d6837d93b94213f6bbf20dc655f819d84e93cdcd181a8" => :sierra - end - - def install - system "./install", "output" - pkgshare.install Dir["xmake/*"] - bin.install "output/share/xmake/xmake" - bin.env_script_all_files(libexec, :XMAKE_PROGRAM_DIR => pkgshare) - end - - test do - system bin/"xmake", "create", "-P", testpath - system bin/"xmake" - assert_equal "hello world!", shell_output("#{bin}/xmake run").chomp - end -end diff --git a/Formula/xml-coreutils.rb b/Formula/xml-coreutils.rb deleted file mode 100644 index f953f42922721..0000000000000 --- a/Formula/xml-coreutils.rb +++ /dev/null @@ -1,32 +0,0 @@ -class XmlCoreutils < Formula - desc "Powerful interactive system for text processing" - homepage "https://www.lbreyer.com/xml-coreutils.html" - url "https://www.lbreyer.com/gpl/xml-coreutils-0.8.1.tar.gz" - sha256 "7fb26d57bb17fa770452ccd33caf288deee1d757a0e0a484b90c109610d1b7df" - - bottle do - cellar :any - rebuild 1 - sha256 "9be4dcb20fd773296a26df8495c5097b273a2a0d89f6abc1545a713ba94e1b07" => :mojave - sha256 "83023841339cb02ad53de64e30aa0c491e4acd4ae4602bd84847aca42ac02e00" => :high_sierra - sha256 "5f7519c9be40f731b0dca6238b3bedf4070f0663fc47ab8e4b0eff02d187718c" => :sierra - sha256 "19bdcacd49657e78f82fd7743a50266ff4945e644b069ac2c39a8787a57911a5" => :el_capitan - sha256 "1342c807e5ddc23a72e750f07258864fdf2fc1a8ce9072cb7797955fdd0e3656" => :yosemite - sha256 "6bada2b9690d698b77f9293cf7f1066e77d36c8c07ba2892b2869ddb0516bc6d" => :mavericks - end - - depends_on "s-lang" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.xml").write <<~EOS - world! - EOS - assert_match /0\s+1\s+1/, shell_output("#{bin}/xml-wc test.xml") - end -end diff --git a/Formula/xml-security-c.rb b/Formula/xml-security-c.rb deleted file mode 100644 index 508d47072406a..0000000000000 --- a/Formula/xml-security-c.rb +++ /dev/null @@ -1,32 +0,0 @@ -class XmlSecurityC < Formula - desc "Implementation of primary security standards for XML" - homepage "https://santuario.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=/santuario/c-library/xml-security-c-2.0.2.tar.bz2" - mirror "https://archive.apache.org/dist/santuario/c-library/xml-security-c-2.0.2.tar.bz2" - sha256 "39e963ab4da477b7bda058f06db37228664c68fe68902d86e334614dd06e046b" - - bottle do - cellar :any - sha256 "b2749de079a163a5e8c00850c3aaa459e772e615641c9fa4766d7352d836414a" => :mojave - sha256 "ea397178085b69d9068c0d484443233f9450ed3493aa9ee5f769c37c6e422d8a" => :high_sierra - sha256 "9e677246828b986d73457de275d9c6afe5dd2705aa01445d49a1c1b90e3245de" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl" - depends_on "xerces-c" - - needs :cxx11 - - def install - ENV.cxx11 - - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", - "--with-openssl=#{Formula["openssl"].opt_prefix}" - system "make", "install" - end - - test do - assert_match /All tests passed/, pipe_output("#{bin}/xsec-xtest 2>&1") - end -end diff --git a/Formula/xml-tooling-c.rb b/Formula/xml-tooling-c.rb deleted file mode 100644 index df6025bb5d257..0000000000000 --- a/Formula/xml-tooling-c.rb +++ /dev/null @@ -1,58 +0,0 @@ -class XmlToolingC < Formula - desc "Provides a higher level interface to XML processing" - homepage "https://wiki.shibboleth.net/confluence/display/OpenSAML/XMLTooling-C" - url "https://shibboleth.net/downloads/c++-opensaml/3.0.0/xmltooling-3.0.2.tar.bz2" - sha256 "5709cf30c9d7cfc786599ac2433653fac8cc64d425781068af86019c8ce8d689" - revision 4 - - bottle do - sha256 "c71643dd020081cd500bb47c4011b20874dd7868f6180bc496fbf30a81bb67d7" => :mojave - sha256 "09fbdd6a424ef05937bc50d00a2f8a7f63e72f76168f8ecf78c5bdd3a0f39c16" => :high_sierra - sha256 "86b7c8b265263d2cb02195d83ebdcb5f8d00686eebce7208dbdedbe9f508cc8a" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "log4shib" - depends_on "openssl" - depends_on "xerces-c" - depends_on "xml-security-c" - - resource "curl" do - url "https://curl.haxx.se/download/curl-7.62.0.tar.bz2" - mirror "https://curl.askapache.com/download/curl-7.62.0.tar.bz2" - sha256 "7802c54076500be500b171fde786258579d60547a3a35b8c5a23d8c88e8f9620" - end - - needs :cxx11 - - def install - ENV.O2 # Os breaks the build - ENV.cxx11 - - ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["openssl"].opt_lib}/pkgconfig" - - resource("curl").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}/curl", - "--with-ssl=#{Formula["openssl"].opt_prefix}", - "--with-ca-bundle=#{etc}/openssl/cert.pem", - "--with-ca-path=#{etc}/openssl/certs", - "--without-libssh2", - "--without-libmetalink", - "--without-gssapi", - "--without-librtmp", - "--disable-ares" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", libexec/"curl/lib/pkgconfig" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/xml2.rb b/Formula/xml2.rb deleted file mode 100644 index 9700516896b69..0000000000000 --- a/Formula/xml2.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Xml2 < Formula - desc "Makes XML and HTML more amenable to classic UNIX text tools" - homepage "https://web.archive.org/web/20160730094113/www.ofb.net/~egnor/xml2/" - url "https://web.archive.org/web/20160427221603/download.ofb.net/gale/xml2-0.5.tar.gz" - sha256 "e3203a5d3e5d4c634374e229acdbbe03fea41e8ccdef6a594a3ea50a50d29705" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "63b136beee1c47726c6756f3c57bf55fcff4e660cd280d090aa35640138465b6" => :mojave - sha256 "548421fe00487faa136c700e4d18f48b6bc349956044e2aa0f65667c3856883d" => :high_sierra - sha256 "d8d4bb9ceb9d97b648d3fd3cffb1e2fad2e4d82aa6aa3397c22f53fe5468ac56" => :sierra - sha256 "85e939873edbb3dd1b072437992a0c404534a5084cccd6f9f76d99b09ddda695" => :el_capitan - sha256 "3883d5997021b3a5bd57d8830906cb9b370da0f6e1927b6c7e9dcd6740e05c5c" => :yosemite - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "/test", pipe_output("#{bin}/xml2", "", 0).chomp - end -end diff --git a/Formula/xmlcatmgr.rb b/Formula/xmlcatmgr.rb deleted file mode 100644 index 0613fa4641c8b..0000000000000 --- a/Formula/xmlcatmgr.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Xmlcatmgr < Formula - desc "Manipulate SGML and XML catalogs" - homepage "https://xmlcatmgr.sourceforge.io" - url "https://downloads.sourceforge.net/project/xmlcatmgr/xmlcatmgr/2.2/xmlcatmgr-2.2.tar.gz" - sha256 "ea1142b6aef40fbd624fc3e2130cf10cf081b5fa88e5229c92b8f515779d6fdc" - - bottle do - sha256 "93f887d556a0853ae208b2775c232fae453bbd436616849d6d97156ca56cd3f3" => :mojave - sha256 "c21d6a7e434563de3235dd7045e51933568428eefc2fa6d959e8040413c5bab0" => :high_sierra - sha256 "ed6376a26e59f66eccad7e0db6e0d111c8d93697fbee1e748e8c18e53035b4f2" => :sierra - sha256 "b55ae55a25d8ddc6ed88b2c7cb0c5aa77588ecd668684a592632a1addd5de22e" => :el_capitan - sha256 "4515f7fa360ed92348a6325f26645609110f18eb74111b1bd9d2717ee7600f2f" => :yosemite - sha256 "3e09fe17a25bca20447863f19093209824871f2bb3635a0ab1fc9dcbb7d94967" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/xmlcatmgr", "-v" - end -end diff --git a/Formula/xmlformat.rb b/Formula/xmlformat.rb deleted file mode 100644 index e7393895b5369..0000000000000 --- a/Formula/xmlformat.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Xmlformat < Formula - desc "Format XML documents" - homepage "http://www.kitebird.com/software/xmlformat/" - url "http://www.kitebird.com/software/xmlformat/xmlformat-1.04.tar.gz" - sha256 "71a70397e44760d67645007ad85fea99736f4b6f8679067a3b5f010589fd8fef" - - bottle :unneeded - - def install - bin.install "xmlformat.pl" => "xmlformat" - end - - test do - system "#{bin}/xmlformat", "--version" - end -end diff --git a/Formula/xmlrpc-c.rb b/Formula/xmlrpc-c.rb deleted file mode 100644 index 0e98da831422d..0000000000000 --- a/Formula/xmlrpc-c.rb +++ /dev/null @@ -1,30 +0,0 @@ -class XmlrpcC < Formula - desc "Lightweight RPC library (based on XML and HTTP)" - homepage "https://xmlrpc-c.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/1.39.12/xmlrpc-c-1.39.12.tgz" - sha256 "d830f3264a832dfe09f629cc64036acfd08121692526d0fabe090f7ff881ce08" - - bottle do - cellar :any - sha256 "c49b16bd3cf25e03b498474c56e19f374589ac81b787c5aa9dc16e4fd99fb6dc" => :mojave - sha256 "c6c39ccd6891e1e9ce07f153a2e16d843cc8c5a0ec9eace09c84a34543115933" => :high_sierra - sha256 "19784c94e65b73ea524331452a28458eaa29b78419955805226a50f1632ce6d1" => :sierra - sha256 "503a064edf4638c671b6377d91045c7f0990203b9b8d6f873d84415c8c98b614" => :el_capitan - sha256 "6fb643c4bc7e7fdef6c276f533eedafe77d325fd505218bdbd8244af5577db31" => :yosemite - end - - def install - ENV.deparallelize - # --enable-libxml2-backend to lose some weight and not statically link in expat - system "./configure", "--enable-libxml2-backend", - "--prefix=#{prefix}" - - # xmlrpc-config.h cannot be found if only calling make install - system "make" - system "make", "install" - end - - test do - system "#{bin}/xmlrpc-c-config", "--features" - end -end diff --git a/Formula/xmlsectool.rb b/Formula/xmlsectool.rb deleted file mode 100644 index 03deb9bd73152..0000000000000 --- a/Formula/xmlsectool.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Xmlsectool < Formula - desc "Check schema validity and signature of an XML document" - homepage "https://wiki.shibboleth.net/confluence/display/XSTJ2/xmlsectool+V2+Home" - url "https://shibboleth.net/downloads/tools/xmlsectool/latest/xmlsectool-2.0.0-bin.zip" - sha256 "83ea1e977d947dd5f2f5600a3280bc5d372a4913f0dbce1ddf2c0ca1c869ca57" - - bottle :unneeded - - depends_on :java => "1.7+" - - def install - prefix.install "doc/LICENSE.TXT" - rm_rf "doc" - libexec.install Dir["*"] - (bin/"xmlsectool").write_env_script "#{libexec}/xmlsectool.sh", Language::Java.java_home_env - end - - test do - system "#{bin}/xmlsectool", "--listBlacklist" - end -end diff --git a/Formula/xmlsh.rb b/Formula/xmlsh.rb deleted file mode 100644 index bbb030e95b41f..0000000000000 --- a/Formula/xmlsh.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Xmlsh < Formula - desc "XML shell" - homepage "http://www.xmlsh.org" - url "https://downloads.sourceforge.net/project/xmlsh/xmlsh/1.2.5/xmlsh_1_2_5.zip" - sha256 "489df45f19a6bb586fdb5abd1f8ba9397048597895cb25def747b0118b02b1c8" - - bottle :unneeded - - def install - rm_rf %w[win32 cygwin] - libexec.install Dir["*"] - chmod 0755, "#{libexec}/unix/xmlsh" - (bin/"xmlsh").write <<~EOS - #!/bin/bash - export XMLSH=#{libexec} - exec #{libexec}/unix/xmlsh "$@" - EOS - end - - test do - output = shell_output("#{bin}/xmlsh -c 'x=<[]> && echo <[$x/@bar]>'") - assert_equal "baz\n", output - end -end diff --git a/Formula/xmlstarlet.rb b/Formula/xmlstarlet.rb deleted file mode 100644 index e2264415db4d7..0000000000000 --- a/Formula/xmlstarlet.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xmlstarlet < Formula - desc "XML command-line utilities" - homepage "https://xmlstar.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xmlstar/xmlstarlet/1.6.1/xmlstarlet-1.6.1.tar.gz" - sha256 "15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca" - - bottle do - cellar :any_skip_relocation - sha256 "6e5d11ee1419a61a9f043663c1236d064ee692fd187ae15bf2114b42d8f0889e" => :mojave - sha256 "56ce0e3190080e6e1111ebb31aa06aea53f16cde50359a356c24ff86a4df72b3" => :high_sierra - sha256 "4958bf868beefb9a2b391c0fe05f5289b67a4cded708d71c4cc5fced130bac55" => :sierra - sha256 "2d9a9b5f875b91c78378e7f3df12595528d8e4b9ec9e321131b7f9f78f30acd8" => :el_capitan - sha256 "525eafe6cab96cc6e04fef756e25316119b3c96cb61e5f7f51770cd062ad1bec" => :yosemite - sha256 "7004b98b4dd9195a35f736ba3f6282369a2c63397a710056c5d1ae71d149fa3a" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - bin.install_symlink "xml" => "xmlstarlet" - end - - test do - system "#{bin}/xmlstarlet", "--version" - end -end diff --git a/Formula/xmlto.rb b/Formula/xmlto.rb deleted file mode 100644 index 16b7f28e90129..0000000000000 --- a/Formula/xmlto.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Xmlto < Formula - desc "Convert XML to another format (based on XSL or other tools)" - homepage "https://pagure.io/xmlto/" - url "https://releases.pagure.org/xmlto/xmlto-0.0.28.tar.bz2" - sha256 "1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "95e53e70ba98917fc455d3e602d7e610f9d3df41564714eef77eb9c7ad858972" => :mojave - sha256 "924329e251704206fb5fecafbe78d0445e014d401f5184ea3b5f2f9c6ae8adc6" => :high_sierra - sha256 "e6c35d8216b36e13a890d839296f51989d58fbf6e35666ee161dcae6f1e5fcd3" => :sierra - sha256 "7b12ea43ff42eb5acdf91a1b2390af62cb95abd80e0a651581653c3d2b470b60" => :el_capitan - sha256 "b0042227a7b6f00c5e4f7eb0e9b0ce6959ff401035d0914a8be60d685929c4a4" => :yosemite - end - - depends_on "docbook" - depends_on "docbook-xsl" - # Doesn't strictly depend on GNU getopt, but macOS system getopt(1) - # does not support longopts in the optstring, so use GNU getopt. - depends_on "gnu-getopt" - - # xmlto forces --nonet on xsltproc, which causes it to fail when - # DTDs/entities aren't available locally. - patch :DATA - - def install - # GNU getopt is keg-only, so point configure to it - ENV["GETOPT"] = Formula["gnu-getopt"].opt_bin/"getopt" - # Find our docbook catalog - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - ENV.deparallelize - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test").write <<~EOS - - Passing test. - - EOS - assert_equal "Passing test.", shell_output("cat test | #{bin}/xmlif foo=bar").strip - end -end - - -__END__ ---- xmlto-0.0.25/xmlto.in.orig -+++ xmlto-0.0.25/xmlto.in -@@ -209,7 +209,7 @@ - export VERBOSE - - # Disable network entities --XSLTOPTS="$XSLTOPTS --nonet" -+#XSLTOPTS="$XSLTOPTS --nonet" - - # The names parameter for the XSLT stylesheet - XSLTPARAMS="" diff --git a/Formula/xmltoman.rb b/Formula/xmltoman.rb deleted file mode 100644 index a14f1909064be..0000000000000 --- a/Formula/xmltoman.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Xmltoman < Formula - desc "XML to manpage converter" - homepage "https://sourceforge.net/projects/xmltoman/" - url "https://downloads.sourceforge.net/project/xmltoman/xmltoman/xmltoman-0.4.tar.gz/xmltoman-0.4.tar.gz" - sha256 "948794a316aaecd13add60e17e476beae86644d066cb60171fc6b779f2df14b0" - - bottle do - cellar :any_skip_relocation - sha256 "3e302a54f0f28d8e560d7015acef0f395f75a209a94401b8f8d01aa73d2b578a" => :mojave - sha256 "029c288b1f70c0dc7711304b9b1af40a95f8f343a3af29f25dabb5dbc1cbad67" => :high_sierra - sha256 "06a29d1545388d2111008cc244733f36971638e05408e1a7353fe9e142f91b76" => :sierra - sha256 "010af030c01ebe6528bbdecfa1153fac5f6e082fa088e1803d0768bb268a509b" => :el_capitan - sha256 "6345ec17095eeec7fde97b609c0c88f07fcdd1e911fa7fd3b8db7f3e5b081b9c" => :yosemite - sha256 "9330b2e39919f745009122679a1e4f42ff818c55950fd7b462af86de644c0a45" => :mavericks - end - - def install - # generate the man files from their original XML sources - system "./xmltoman xml/xmltoman.1.xml > xmltoman.1" - system "./xmltoman xml/xmlmantohtml.1.xml > xmlmantohtml.1" - - man1.install %w[xmltoman.1 xmlmantohtml.1] - bin.install %w[xmltoman xmlmantohtml] - pkgshare.install %w[xmltoman.xsl xmltoman.dtd xmltoman.css] - end -end diff --git a/Formula/xmoto.rb b/Formula/xmoto.rb deleted file mode 100644 index 4659862e7642a..0000000000000 --- a/Formula/xmoto.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Xmoto < Formula - desc "2D motocross platform game" - homepage "https://xmoto.tuxfamily.org/" - url "https://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz" - sha256 "a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2" - revision 2 - - bottle do - sha256 "7bccb7306789c62b620ee83a0adf494744c96894eba69dd1536575cffb1f1a42" => :high_sierra - sha256 "5b8e90cc8c4f88b7f189b5ef4d5e213af984bdb4ad6f378cdbbab0b7a2b5a462" => :sierra - sha256 "42bfe9707509681912b5ab0d08d715edbc7d1b15f779a569e99e0edab26734cb" => :el_capitan - end - - head do - url "svn://svn.tuxfamily.org/svnroot/xmoto/xmoto/trunk" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "gettext" - depends_on "jpeg" - depends_on "libpng" - depends_on "libxdg-basedir" - depends_on "libxml2" - depends_on "lua@5.1" - depends_on "ode" - depends_on "sdl" - depends_on "sdl_mixer" - depends_on "sdl_net" - depends_on "sdl_ttf" - - def install - # Fix issues reported upstream - # https://todo.xmoto.tuxfamily.org/index.php?do=details&task_id=812 - - # Set up single precision ODE - ENV.append_to_cflags "-DdSINGLE" - - ENV.prepend "CPPFLAGS", "-I#{Formula["lua@5.1"].opt_include}/lua-5.1" - ENV.append "LDFLAGS", "-L#{Formula["lua@5.1"].opt_lib} -llua.5.1" - - # Use same type as Apple OpenGL.framework - inreplace "src/glext.h", "unsigned int GLhandleARB", "void *GLhandleARB" - - # Handle quirks of C++ hash_map - inreplace "src/include/xm_hashmap.h" do |s| - if build.head? - s.gsub! "tr1/", "" - s.gsub! "::tr1", "" - else - s.gsub! "s2) {", "s2) const {" - end - end - - system "./bootstrap" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-xmltest", - "--disable-sdltest", - "--with-apple-opengl-framework", - "--with-asian-ttf-file=" - system "make", "install" - end - - test do - system "#{bin}/xmoto", "-h" - end -end diff --git a/Formula/xmount.rb b/Formula/xmount.rb deleted file mode 100644 index 61df76683d80c..0000000000000 --- a/Formula/xmount.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Xmount < Formula - desc "Convert between multiple input & output disk image types" - homepage "https://www.pinguin.lu/xmount/" - url "https://code.pinguin.lu/diffusion/XMOUNT/xmount.git", - :tag => "v0.7.6", - :revision => "d0f67c46632a69ff1b608e90ed2fba8344ab7f3d" - revision 1 - - bottle do - sha256 "3cbc70ba1ced45797f95030b0509b0b2e3b2ad6d85cd1f4acdc362651d5e6ade" => :mojave - sha256 "79b616ecf3e76ae690945cccd66b04b716aadaa61a82e34917be86c6ac4a367c" => :high_sierra - sha256 "9fce7eb9aef96aaab3584783fedb7cece191cc9a218aba2ccc4ea7aefe38eb91" => :sierra - sha256 "07295242dc494ee0f5612f2fb542011170725c0839f003fb876d3dc6eff6ac48" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "afflib" - depends_on "libewf" - depends_on "openssl" - depends_on :osxfuse - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl"].opt_lib/"pkgconfig" - - Dir.chdir "trunk" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"xmount", "--version" - end -end diff --git a/Formula/xmp.rb b/Formula/xmp.rb deleted file mode 100644 index 1be5c564eea7a..0000000000000 --- a/Formula/xmp.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Xmp < Formula - desc "Command-line player for module music formats (MOD, S3M, IT, etc)" - homepage "https://xmp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xmp/xmp/4.1.0/xmp-4.1.0.tar.gz" - sha256 "1dbd61074783545ac7bef5b5daa772fd2110764cb70f937af8c3fad30f73289e" - - bottle do - sha256 "9765cf4aca60e17e46524d625b1d92655c1182851c3b408c9f2e4fb7c62e4ae1" => :mojave - sha256 "f399d4668b512d45d1019264c4968af84060d138380d5743a0eb483dfdd53578" => :high_sierra - sha256 "4eb53e6f831785a5bbe084be7be3c83c7942392c06a00608f8d4d29e0d0d735a" => :sierra - sha256 "2412ab978ad3562876d8078a6e588f8617b5507df33aecee84ada484f1ec33b8" => :el_capitan - sha256 "a0ee59b4a71a7cda6a59e7b06a9c0b54dc04e3bf77b97f0b4e2336c16afc8d57" => :yosemite - sha256 "289fbcb9393539a355bf163dce53562afd29981c2fd0de3491133c7105a5bc06" => :mavericks - end - - head do - url "https://git.code.sf.net/p/xmp/xmp-cli.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libxmp" - - def install - if build.head? - system "glibtoolize" - system "aclocal" - system "autoconf" - system "automake", "--add-missing" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/xmrig.rb b/Formula/xmrig.rb deleted file mode 100644 index bb5cfe97ab4fd..0000000000000 --- a/Formula/xmrig.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Xmrig < Formula - desc "Monero (XMR) CPU miner" - homepage "https://github.com/xmrig/xmrig" - url "https://github.com/xmrig/xmrig/archive/v2.8.3.tar.gz" - sha256 "ddf0c273fcf71889989c971c2a27b81a05aa2352a4bc03481730576583de4696" - - bottle do - cellar :any - sha256 "e70f6f9e32b7be3cf7785024086965a9075f8a4151dfb096205b97b0feb8c4a7" => :mojave - sha256 "c9f0cbbb7c761cdedca58ab34aef55b40351da79165583cb068071a3e35b9411" => :high_sierra - sha256 "294fbd5986b573c9246102aa25f4c5f9b28c91a94c7182be4d65a8221519109c" => :sierra - end - - depends_on "cmake" => :build - depends_on "libmicrohttpd" - depends_on "libuv" - depends_on "openssl" - - def install - mkdir "build" do - system "cmake", "..", "-DUV_LIBRARY=#{Formula["libuv"].opt_lib}/libuv.dylib", - *std_cmake_args - system "make" - bin.install "xmrig" - end - pkgshare.install "src/config.json" - end - - test do - assert_match version.to_s, shell_output("#{bin}/xmrig -V", 2) - test_server="donotexist.localhost:65535" - timeout=10 - begin - read, write = IO.pipe - pid = fork do - exec "#{bin}/xmrig", "--no-color", "--max-cpu-usage=1", "--print-time=1", - "--threads=1", "--retries=1", "--url=#{test_server}", :out => write - end - start_time=Time.now - loop do - assert (Time.now - start_time <= timeout), "No server connect after timeout" - break if read.gets.include? "\] \[#{test_server}\] DNS error: \"unknown node or service\"" - end - ensure - Process.kill("SIGINT", pid) - end - end -end diff --git a/Formula/xonsh.rb b/Formula/xonsh.rb deleted file mode 100644 index 112097d18327b..0000000000000 --- a/Formula/xonsh.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Xonsh < Formula - include Language::Python::Virtualenv - - desc "Python-ish, BASHwards-compatible shell language and command prompt" - homepage "https://xon.sh/" - url "https://github.com/xonsh/xonsh/archive/0.8.7.tar.gz" - sha256 "875aebb1f09463c36c3bd8cb958d4272839d687c6c5ab997518140f5610faf23" - head "https://github.com/xonsh/xonsh.git" - - bottle do - cellar :any_skip_relocation - sha256 "3dc26c9a3b40828076809c096da943e7026233ab1858553ec23967399b75604d" => :mojave - sha256 "506cb0649b5c2421a960cb8596252372a0653fbd49198b61dac74e8f8b279439" => :high_sierra - sha256 "1347036951ee05629fcd65d240f9e28ee1bc303a3ba3a7b55c8f91da61f25306" => :sierra - end - - depends_on "python" - - # Resources based on `pip3 install xonsh[ptk,pygments,proctitle]` - # See https://xon.sh/osx.html#dependencies - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/d9/a5/4b2dd1a05403e34c3ba0d9c00f237c01967c0a4f59a427c9b241129cdfe4/prompt_toolkit-2.0.7.tar.gz" - sha256 "fd17048d8335c1e6d5ee403c3569953ba3eb8555d710bfc548faf0712666ea39" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/64/69/413708eaf3a64a6abb8972644e0f20891a55e621c6759e2c3f3891e05d63/Pygments-2.3.1.tar.gz" - sha256 "5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a" - end - - resource "setproctitle" do - url "https://files.pythonhosted.org/packages/5a/0d/dc0d2234aacba6cf1a729964383e3452c52096dc695581248b548786f2b3/setproctitle-1.1.10.tar.gz" - sha256 "6283b7a58477dd8478fbb9e76defb37968ee4ba47b05ec1c053cb39638bd7398" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz" - sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match "4", shell_output("#{bin}/xonsh -c 2+2") - end -end diff --git a/Formula/xorriso.rb b/Formula/xorriso.rb deleted file mode 100644 index 0e991a47bb0af..0000000000000 --- a/Formula/xorriso.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Xorriso < Formula - desc "ISO9660+RR manipulation tool" - homepage "https://www.gnu.org/software/xorriso/" - url "https://ftp.gnu.org/gnu/xorriso/xorriso-1.4.8.tar.gz" - mirror "https://ftpmirror.gnu.org/xorriso/xorriso-1.4.8.tar.gz" - sha256 "ec82069e04096cd9c18be9b12b87b750ade0b5e37508978feabcde36b2278481" - - bottle do - rebuild 1 - sha256 "3bf163215648c9e63a6fa03746ebff1dec15c9aff6204788db2a43e24ab9cb28" => :mojave - sha256 "45f3af489e20189f73248b0c5444cc0a986f1028c23959aeaf240173bebabeee" => :high_sierra - sha256 "e7ddc12178ac466d7aceaa3786b070829582b6c5adeb59ca383eeab3fa866e89" => :sierra - sha256 "dd920cbec3a5d95504763a4129aa915031bc124285ddb16d7ff76c15cecb9724" => :el_capitan - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - - # `make install` has to be deparallelized due to the following error: - # mkdir: /usr/local/Cellar/xorriso/1.4.2/bin: File exists - # make[1]: *** [install-binPROGRAMS] Error 1 - # Reported 14 Jun 2016: https://lists.gnu.org/archive/html/bug-xorriso/2016-06/msg00003.html - ENV.deparallelize { system "make", "install" } - end - - test do - system bin/"xorriso", "--help" - end -end diff --git a/Formula/xpa.rb b/Formula/xpa.rb deleted file mode 100644 index 62757aad45121..0000000000000 --- a/Formula/xpa.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Xpa < Formula - desc "Seamless communication between Unix programs" - homepage "https://hea-www.harvard.edu/RD/xpa/" - url "https://github.com/ericmandel/xpa/archive/v2.1.18.tar.gz" - sha256 "a8c9055b913204babce2de4fa037bc3a5849941dcb888f57368fd04af0aa787b" - - bottle do - cellar :any_skip_relocation - sha256 "c73a6afbb9764d9b7d6b5199b45bc5ed39edf5778c81f01a17b7dcd6e6c2e621" => :mojave - sha256 "c9163ee736fde3dd56d4420121fc61a710bf88feab805e5b2c9cc31630a3be1f" => :high_sierra - sha256 "6aa70ab2200ded59d1bbd466b915311c52313bf07f2c398362ce8f5bbb29c597" => :sierra - sha256 "f8b188638f71cecd974279f07d55b932be7c657f83c7e55634c011df7cb44a63" => :el_capitan - sha256 "2c79a17701b6c38017eb1e02954302912d6618fc7666b46bd7f1d7019632c318" => :yosemite - end - - depends_on :x11 - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - - # relocate man, since --mandir is ignored - mv "#{prefix}/man", man - end -end diff --git a/Formula/xpdf.rb b/Formula/xpdf.rb deleted file mode 100644 index 6169cdf5f9db3..0000000000000 --- a/Formula/xpdf.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Xpdf < Formula - desc "PDF viewer" - homepage "https://www.xpdfreader.com/" - url "https://xpdfreader-dl.s3.amazonaws.com/xpdf-4.00.tar.gz" - mirror "https://fossies.org/linux/misc/xpdf-4.00.tar.gz" - sha256 "ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6" - - bottle do - cellar :any - sha256 "5e9b256817f4a4050cbed7d914cde590c66f989588f250983dbff80059df9670" => :mojave - sha256 "9d27d28c52d120d30c6d2293da42a96d993171f2d68febc00c406a0e5bbe4cb9" => :high_sierra - sha256 "e747937587f1ba1acd33b7caf1f407b1baa3951c8b31e091ea0ae6f00ccc9d79" => :sierra - sha256 "1013c1a0224961955bed42d33a37748ac899b6f3a07f87809865974b760d59e0" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "freetype" - depends_on "qt" - - conflicts_with "pdf2image", "poppler", - :because => "xpdf, pdf2image, and poppler install conflicting executables" - - def install - # Reported 6 Feb 2018 to xpdf AT xpdfreader DOT com - inreplace ["xpdf/CMakeLists.txt", "xpdf-qt/CMakeLists.txt"], " man/", - " share/man/" - - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - cp test_fixtures("test.pdf"), testpath - assert_match "Pages:", shell_output("#{bin}/pdfinfo #{testpath}/test.pdf") - end -end diff --git a/Formula/xplanet.rb b/Formula/xplanet.rb deleted file mode 100644 index 8dbbf585c16b4..0000000000000 --- a/Formula/xplanet.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Xplanet < Formula - desc "Create HQ wallpapers of planet Earth" - homepage "https://xplanet.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xplanet/xplanet/1.3.1/xplanet-1.3.1.tar.gz" - sha256 "4380d570a8bf27b81fb629c97a636c1673407f4ac4989ce931720078a90aece7" - revision 2 - - bottle do - sha256 "08b96065da38ab4b0783d6b49cdba670276690a1024557ec3d1aff2de475c3b0" => :mojave - sha256 "bd4d0b8ed3bf33f6c6da0b43574fb08d054603d0b36b228a87d1ae070274ac7c" => :high_sierra - sha256 "eedbdc803d69fa1635e763eafa90ffd071b537e994a5fbdbe9eb84e69c0fc645" => :sierra - sha256 "6d37f0965bc1b1f1aa438fec8ea9e57a096681336dba25dc880f25cb752f3910" => :el_capitan - sha256 "4c0e0c1b025079129f808e85d3d5e76280799929fa6e9d119000e94283769a8d" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "giflib" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - # patches bug in 1.3.1 with flag -num_times=2 (1.3.2 will contain fix, when released) - # https://sourceforge.net/p/xplanet/code/208/tree/trunk/src/libdisplay/DisplayOutput.cpp?diff=5056482efd48f8457fc7910a:207 - patch :p2 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/f952f1d/xplanet/xplanet-1.3.1-ntimes.patch" - sha256 "3f95ba8d5886703afffdd61ac2a0cd147f8d659650e291979f26130d81b18433" - end - - # Fix compilation with giflib 5 - # https://xplanet.sourceforge.io/FUDforum2/index.php?t=msg&th=592 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/master/xplanet/xplanet-1.3.1-giflib5.patch" - sha256 "0a88a9c984462659da37db58d003da18a4c21c0f4cd8c5c52f5da2b118576d6e" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-aqua", - "--without-cspice", - "--without-cygwin", - "--without-gif", - "--without-jpeg", - "--without-libpng", - "--without-libtiff", - "--without-pango", - "--without-pnm", - "--without-x", - "--without-xscreensaver" - - system "make", "install" - end - - test do - system "#{bin}/xplanet", "-geometry", "4096x2160", "-projection", "mercator", "-gmtlabel", "-num_times", "1", "-output", "#{testpath}/xp-test.png" - end -end diff --git a/Formula/xqilla.rb b/Formula/xqilla.rb deleted file mode 100644 index 63c58304f0664..0000000000000 --- a/Formula/xqilla.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Xqilla < Formula - desc "XQuery and XPath 2 command-line interpreter" - homepage "https://xqilla.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xqilla/XQilla-2.3.4.tar.gz" - sha256 "292631791631fe2e7eb9727377335063a48f12611d641d0296697e0c075902eb" - - bottle do - cellar :any - rebuild 1 - sha256 "93ae09129c45ee7b1a4ecfe996c305791e06833c1e73b604b33282e5ea90248a" => :mojave - sha256 "38579e6ab1b6f6801ca5404cc79fcd972f395b9dd2e981672889b3eac5441c86" => :high_sierra - sha256 "0f1ef8f2aa1349b723062426a3e44fba2821bcf93316bacabf4c5e2948093bc4" => :sierra - sha256 "4326ec876d3e05647320c4ab55824c37531af997cc723f303fac4c4b40153753" => :el_capitan - end - - depends_on "xerces-c" - - conflicts_with "zorba", :because => "Both supply xqc.h" - - needs :cxx11 - - def install - ENV.cxx11 - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--with-xerces=#{HOMEBREW_PREFIX}", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) { - XQilla xqilla; - AutoDelete query(xqilla.parse(X("1 to 100"))); - AutoDelete context(query->createDynamicContext()); - Result result = query->execute(context); - Item::Ptr item; - while(item == result->next(context)) { - std::cout << UTF8(item->asString(context)) << std::endl; - } - return 0; - } - EOS - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lxqilla", - "-I#{Formula["xerces-c"].opt_include}", - "-L#{Formula["xerces-c"].opt_lib}", "-lxerces-c", - testpath/"test.cpp", "-o", testpath/"test" - system testpath/"test" - end -end diff --git a/Formula/xrick.rb b/Formula/xrick.rb deleted file mode 100644 index 630463fcb1d32..0000000000000 --- a/Formula/xrick.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Xrick < Formula - desc "Clone of Rick Dangerous" - homepage "https://www.bigorno.net/xrick/" - url "https://www.bigorno.net/xrick/xrick-021212.tgz" - sha256 "aa8542120bec97a730258027a294bd16196eb8b3d66134483d085f698588fc2b" - - bottle do - sha256 "632c310d5834fd968c2d908e3721ff62b3a7c01ee97e4b1587b0dad33067674c" => :mojave - sha256 "a45d9b27ee02a21aa81ecc8b7eaf2718521388972559003c46fc428d15584f15" => :high_sierra - sha256 "03e69c34042ffa8849aaa653f06ae889a6d404797a42c6549ce7de8d3de72dce" => :sierra - sha256 "772f6718786e66657b0647dc7233b3680903a2e16d06fa59a9f804dd33d5096a" => :el_capitan - sha256 "2d4e9e140f15692acd4d0e9f4a9da08d1a3e6f3d3fdbc8d4d799e6d2bde91e8f" => :yosemite - end - - depends_on "sdl" - - def install - inreplace "src/xrick.c", "data.zip", "#{pkgshare}/data.zip" - system "make" - bin.install "xrick" - man6.install "xrick.6.gz" - pkgshare.install "data.zip" - end - - test do - assert_match "xrick [version ##{version}]", shell_output("#{bin}/xrick --help", 1) - end -end diff --git a/Formula/xrootd.rb b/Formula/xrootd.rb deleted file mode 100644 index 0c2e85a367d05..0000000000000 --- a/Formula/xrootd.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xrootd < Formula - desc "High performance, scalable, fault-tolerant access to data" - homepage "http://xrootd.org" - url "http://xrootd.org/download/v4.8.3/xrootd-4.8.3.tar.gz" - sha256 "9cd30a343758b8f50aea4916fa7bd37de3c37c5b670fe059ae77a8b2bbabf299" - head "https://github.com/xrootd/xrootd.git" - - bottle do - cellar :any - sha256 "114e764f63d15b02ddd6091f7d28f126584f5abbe493b6684bdcb1d39bc91f1d" => :mojave - sha256 "9d0c1ebbf9d77d4afcd96aa8e12562a9678297306a000f2e1ac6d5a4fc5c2ad4" => :high_sierra - sha256 "6c27e086bfab2dfda91e34814d588fd294c18f0cede4240b69582abc693f0a99" => :sierra - sha256 "70bdb9f69fcda66b1ea863d55360ac65657cc6bfafb3adafef07115bd7fe0cfa" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "openssl" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system "#{bin}/xrootd", "-H" - end -end diff --git a/Formula/xsane.rb b/Formula/xsane.rb deleted file mode 100644 index 76cd705823a1c..0000000000000 --- a/Formula/xsane.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Xsane < Formula - desc "Graphical scanning frontend" - homepage "http://www.xsane.org" - url "https://ftp.osuosl.org/pub/blfs/conglomeration/xsane/xsane-0.999.tar.gz" - mirror "https://fossies.org/linux/misc/xsane-0.999.tar.gz" - sha256 "5782d23e67dc961c81eef13a87b17eb0144cae3d1ffc5cf7e0322da751482b4b" - revision 3 - - bottle do - sha256 "028fa4b1496e6e0a0d6f0443bff7157b5bb70e56b1a9fd1e1b83072aa076f6a1" => :mojave - sha256 "197b36716d2df9e81581650549571ce379ce74290fb45c703e6173c190024dad" => :high_sierra - sha256 "cb6cd9fabadf727b9414d4a252fa648f579bfe168eb44dd25fb2cb18a84395ed" => :sierra - sha256 "4346e2b40f260128b2ac562cff15be61c96bcc31b04457f44e41d28aeb7d6be2" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "sane-backends" - - # Needed to compile against libpng 1.5, Project appears to be dead. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e1a592d/xsane/patch-src__xsane-save.c-libpng15-compat.diff" - sha256 "404b963b30081bfc64020179be7b1a85668f6f16e608c741369e39114af46e27" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/xsane", "--version" - end -end diff --git a/Formula/xsd.rb b/Formula/xsd.rb deleted file mode 100644 index 73fd8935d97b1..0000000000000 --- a/Formula/xsd.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Xsd < Formula - desc "XML Data Binding for C++" - homepage "https://www.codesynthesis.com/products/xsd/" - url "https://www.codesynthesis.com/download/xsd/4.0/xsd-4.0.0+dep.tar.bz2" - version "4.0.0" - sha256 "eca52a9c8f52cdbe2ae4e364e4a909503493a0d51ea388fc6c9734565a859817" - revision 1 - - bottle do - cellar :any - sha256 "cb064aa81b48f1777f14888e4c6df4ae3782159f5a315944df49882bce06b231" => :mojave - sha256 "25dfd3dbcbe7f6f442bf6d45adaa849b5fbc4e7360ca4d9084bb1910252f992d" => :high_sierra - sha256 "935d1bcd6d9cf35cdd42e68ddb9931ad29df0834b76d6f4b9cdaa743176d7bae" => :sierra - sha256 "4e4a26fc0a99b11e8a740b6f5041964b682048de7ff0a9cbfd15ffea263f0c62" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "xerces-c" - - conflicts_with "mono", :because => "both install `xsd` binaries" - - # Patches: - # 1. As of version 4.0.0, Clang fails to compile if the header is - # not explicitly included. The developers are aware of this problem, see: - # https://www.codesynthesis.com/pipermail/xsd-users/2015-February/004522.html - # 2. As of version 4.0.0, building fails because this makefile invokes find - # with action -printf, which GNU find supports but BSD find does not. There - # is no place to file a bug report upstream other than the xsd-users mailing - # list (xsd-users@codesynthesis.com). I have sent this patch there but have - # received no response (yet). - patch :DATA - - needs :cxx11 - - def install - ENV.append "LDFLAGS", `pkg-config --libs --static xerces-c`.chomp - ENV.cxx11 - system "make", "install", "install_prefix=#{prefix}" - end - - test do - schema = testpath/"meaningoflife.xsd" - schema.write <<~EOS - - - - - EOS - instance = testpath/"meaningoflife.xml" - instance.write <<~EOS - - - 42 - - EOS - xsdtest = testpath/"xsdtest.cxx" - xsdtest.write <<~EOS - #include - #include "meaningoflife.hxx" - int main (int argc, char *argv[]) { - assert(2==argc); - std::auto_ptr< ::xml_schema::positive_integer> x = XSDTest::MeaningOfLife(argv[1]); - assert(42==*x); - return 0; - } - EOS - system "#{bin}/xsd", "cxx-tree", schema - assert_predicate testpath/"meaningoflife.hxx", :exist? - assert_predicate testpath/"meaningoflife.cxx", :exist? - system "c++", "-o", "xsdtest", "xsdtest.cxx", "meaningoflife.cxx", - "-L#{Formula["xerces-c"].opt_lib}", "-lxerces-c" - assert_predicate testpath/"xsdtest", :exist? - system testpath/"xsdtest", instance - end -end - -__END__ -diff --git a/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx b/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx -index fa48a9a..59994ae 100644 ---- a/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx -+++ b/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx -@@ -2,6 +2,7 @@ - // copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC - // license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -+#include - #include - - #include -diff --git a/xsd/examples/cxx/tree/makefile b/xsd/examples/cxx/tree/makefile -index 172195a..d8c8198 100644 ---- a/xsd/examples/cxx/tree/makefile -+++ b/xsd/examples/cxx/tree/makefile -@@ -39,7 +39,7 @@ $(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(all_examples))) - $(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples))) - $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) - --$(dist-win): export dirs := $(shell find $(src_base) -type d -exec test -f {}/driver.cxx ';' -printf '%P ') -+$(dist-win): export dirs := $(shell find "$(src_base)" -type d -exec test -f {}/driver.cxx ';' -exec bash -c 'd="{}"; printf "%s " "${d#'"$(src_base)"'/}"' ";") - $(dist-win): |$(out_root)/.dist-pre - $(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples))) - $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) diff --git a/Formula/xshogi.rb b/Formula/xshogi.rb deleted file mode 100644 index c4a4d30a638dc..0000000000000 --- a/Formula/xshogi.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Xshogi < Formula - desc "X11 interface for GNU Shogi" - homepage "https://www.gnu.org/software/gnushogi/" - url "https://ftp.gnu.org/gnu/gnushogi/xshogi-1.4.2.tar.gz" - mirror "https://ftpmirror.gnu.org/gnushogi/xshogi-1.4.2.tar.gz" - sha256 "2e2f1145e3317143615a764411178f538bd54945646b14fc2264aaeaa105dab6" - - bottle do - cellar :any_skip_relocation - sha256 "dab2f19b43434783e84f86e0bc3dd293e49bfd8a036117be63225f82c0e92692" => :mojave - sha256 "c78625da6cc10502df9274bff0680a1af6316c125b6ce482ab9d79ad745e6e55" => :high_sierra - sha256 "4877493db0e9536a1282b9aa79d3cd38357a4b8e767533cfb6c4dce941faed23" => :sierra - sha256 "a4bfc78e6d2f10e6bf4c813a2e847963d6dd6d939a522934717ff6d35acafcc9" => :el_capitan - sha256 "62c11f796225f439e5698ad87abafbfe55d2184d895b86fd13abe3dc924b2030" => :yosemite - end - - depends_on "gnu-shogi" - depends_on :x11 - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/xsimd.rb b/Formula/xsimd.rb deleted file mode 100644 index c4e385526fec6..0000000000000 --- a/Formula/xsimd.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Xsimd < Formula - desc "Modern, portable C++ wrappers for SIMD intrinsics" - homepage "https://xsimd.readthedocs.io/en/latest/" - url "https://github.com/QuantStack/xsimd/archive/7.1.2.tar.gz" - sha256 "58bf70a20d88325732de6f0a00198af63f55a12bca86a33ddd86e4fb145f4e21" - - bottle do - cellar :any_skip_relocation - sha256 "005309d1c8a751f481f873d12ca07662e0b053fd50923b4028359d9c09c324d5" => :mojave - sha256 "b261f7a370c6e989b940ebb61b12aacc7c3576a96def9247e027587978b9871b" => :high_sierra - sha256 "b261f7a370c6e989b940ebb61b12aacc7c3576a96def9247e027587978b9871b" => :sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args - args << "-DBUILD_TESTS=OFF" - - system "cmake", ".", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - #include "xsimd/memory/xsimd_alignment.hpp" - - using namespace xsimd; - - struct mock_container {}; - - int main(void) { - using u_vector_type = std::vector; - using a_vector_type = std::vector>; - - using u_vector_align = container_alignment_t; - using a_vector_align = container_alignment_t; - using mock_align = container_alignment_t; - - if(!std::is_same::value) abort(); - if(!std::is_same::value) abort(); - if(!std::is_same::value) abort(); - return 0; - } - EOS - system ENV.cxx, "test.c", "-std=c++14", "-I#{include}", "-o", "test" - system "./test" - end -end diff --git a/Formula/xspin.rb b/Formula/xspin.rb deleted file mode 100644 index cc751d17b4aa4..0000000000000 --- a/Formula/xspin.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Xspin < Formula - desc "Software verification tool (developed at Bell Labs)" - homepage "https://spinroot.com/spin/Src/index.html" - url "https://spinroot.com/spin/Src/xspin525.tcl" - version "5.2.5" - sha256 "e23d8d562e39db6fe73570e52ee895cd806d15c3e52e638299cbc1eb61289eb6" - - bottle do - cellar :any_skip_relocation - sha256 "e268eebef598b8df39bcd1bb2daaf5ea7b13975532f4dcba6426659fecf47482" => :mojave - sha256 "f35ea74745fac858274f01c76d879c3713a9ca35e8282ced5c080276f2934580" => :high_sierra - sha256 "493d8bfac9052ece7d96eaed9b70792d7fe41b7566de2a523dd86664e3a3debb" => :sierra - sha256 "896d3acc7e60648410ff86b1f8e744059bb71015900360fc18b3a75537e2c13e" => :el_capitan - sha256 "2ff10f844a1c09cc99bf8e630bde4e191a450697ab6ea286c85bfb66670db405" => :yosemite - sha256 "a1b19b1227fc19b6ea00cfea5a49955a82d180521e8df29d68842b465e5b4b89" => :mavericks - end - - depends_on "spin" - - patch :DATA - - def install - inreplace "xspin525.tcl", "CELLAR", prefix - bin.install "xspin525.tcl" => "xspin" - end -end - -# manual patching is required by the spin install process -__END__ -diff --git a/xspin525.tcl b/xspin525.tcl -old mode 100644 -new mode 100755 -index 73fc6bf..444b0ad ---- a/xspin525.tcl -+++ b/xspin525.tcl -@@ -1,8 +1,9 @@ --#!/bin/sh -+#!/usr/bin/wish -f - # the next line restarts using wish \ --exec wish c:/cygwin/bin/xspin -- $* -+exec wish CELLAR/bin/xspin -- $* -+ -+ cd ;# enable to cd to home directory by default - --# cd ;# enable to cd to home directory by default - - # on PCs: - # adjust the first argument to wish above with the name and diff --git a/Formula/xsv.rb b/Formula/xsv.rb deleted file mode 100644 index 95edea727f18d..0000000000000 --- a/Formula/xsv.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Xsv < Formula - desc "Fast CSV toolkit written in Rust" - homepage "https://github.com/BurntSushi/xsv" - url "https://github.com/BurntSushi/xsv/archive/0.13.0.tar.gz" - sha256 "2b75309b764c9f2f3fdc1dd31eeea5a74498f7da21ae757b3ffd6fd537ec5345" - head "https://github.com/BurntSushi/xsv.git" - - bottle do - sha256 "e55868cc4f9f6284ef7aecdff580dcc93699a8ceb03beb7ed27d29ad9ee23707" => :mojave - sha256 "9837a63d7a48c82a723294a24e66e64920c0b0ead2bc92c408e502d76cd482c7" => :high_sierra - sha256 "c909a6c8c825a231d0148fd3776d764bf6c0a67663f2944e6b66ae492b206387" => :sierra - sha256 "34848a92e9e392a942e31cb8af2c725e80742c27ecd6f0579a7242015b50259a" => :el_capitan - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - end - - test do - (testpath/"test.csv").write("first header,second header") - system "#{bin}/xsv", "stats", "test.csv" - end -end diff --git a/Formula/xsw.rb b/Formula/xsw.rb deleted file mode 100644 index 6925f22feff4f..0000000000000 --- a/Formula/xsw.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Xsw < Formula - desc "Slide show presentation tool" - homepage "https://code.google.com/archive/p/xsw/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xsw/xsw-0.3.5.tar.gz" - sha256 "d7f86047716d9c4d7b2d98543952d59ce871c7d11c63653f2e21a90bcd7a6085" - - bottle do - sha256 "ea85521cec4aed7642dd1c5c4e1d44532292064c4ea1ca4d3bfd4a779484b428" => :mojave - sha256 "09e57751cad18711cdc71cf47442366fda1bdb0adf6d156605c0ad2cc49be4fd" => :high_sierra - sha256 "02e0d7c1f309b1743d11555af5601ddbf462c835e81f6188dd3f46835978a86a" => :sierra - sha256 "b7a6391cf0df4a4d514a33188dc67a8fac551a3f66e82da626c4d4877cfe5274" => :el_capitan - sha256 "8652e603fa053db1bfedeebad3699f6c77158a7133b55b37cea9ac33981aec8f" => :yosemite - sha256 "3bd5da94a5c179f2cb40fdb8f385d0baeaed2a88aceb0f7a3839a9c6c605549f" => :mavericks - end - - depends_on "sdl" - depends_on "sdl_gfx" - depends_on "sdl_image" - depends_on "sdl_ttf" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"xsw", "-v" - end -end diff --git a/Formula/xtail.rb b/Formula/xtail.rb deleted file mode 100644 index e584f1e73c604..0000000000000 --- a/Formula/xtail.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Xtail < Formula - desc "Watch growth of multiple files or directories (like `tail -f`)" - homepage "https://www.unicom.com/sw/xtail" - url "https://www.unicom.com/files/xtail-2.1.tar.gz" - sha256 "75184926dffd89e9405769b24f01c8ed3b25d3c4a8eac60271fc5bb11f6c2d53" - - bottle do - cellar :any_skip_relocation - sha256 "1c50e24a2e599f9adc556452e3d1493cbfc5bc665858363d7c0f956acf6136a8" => :mojave - sha256 "483c983bc4d4c15a2d157c700d91cbe801f383956ea5e554a5d96e4a8f476ba5" => :high_sierra - sha256 "d230b5111c213e9294f86f01c651501a87c42f60ed30929144e21ed4bbef4ecb" => :sierra - sha256 "a579041c4d693dd444464228dcd0175e79f31708b62ad3ccf55a8f545ce67ed7" => :el_capitan - sha256 "60a2bcabfb83e8ab4df95b2417ccf5c49c5ca242853ff16e2a106f3e37f6005e" => :yosemite - sha256 "939117402a33f5037aa7e49f5228e0d0b852e0e39e85d81357b8955864bd26eb" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - man1.mkpath - bin.mkpath - system "make", "install" - end - - test do - file1 = testpath/"file1" - file2 = testpath/"file2" - touch file1 - touch file2 - - begin - p = IO.popen("#{bin}/xtail file1 file2") - # Give xtail a couple seconds before and after so that it could - # relatively reliably pick up the changes. - sleep 2 - file1.append_lines "hello\n" - file2.append_lines "world\n" - sleep 2 - ensure - Process.kill "QUIT", p.pid - Process.wait p.pid - end - - output = p.read - assert_match "hello", output - assert_match "world", output - end -end diff --git a/Formula/xtensor.rb b/Formula/xtensor.rb deleted file mode 100644 index 1b4fc9d0eeff2..0000000000000 --- a/Formula/xtensor.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Xtensor < Formula - desc "Multi-dimensional arrays with broadcasting and lazy computing" - homepage "http://quantstack.net/xtensor" - url "https://github.com/QuantStack/xtensor/archive/0.19.1.tar.gz" - sha256 "52ac9081138d413485b9bf70376722f109ab32e5ed2ed3311257f5d7e9a88bc7" - - bottle do - cellar :any_skip_relocation - sha256 "fc74f983037ca4a758d78dbde45f15c23a23bef89121445e9d34e333da0ba85d" => :mojave - sha256 "12699f58693e800205659da72af462965efb3d305823df255b23d9b7e01bc7fb" => :high_sierra - sha256 "12699f58693e800205659da72af462965efb3d305823df255b23d9b7e01bc7fb" => :sierra - end - - depends_on "cmake" => :build - - resource "xtl" do - url "https://github.com/QuantStack/xtl/archive/0.5.2.tar.gz" - sha256 "6f9d2f849e4dd8a36db1e62648ed1855a691991739119b0a73cd55084c6d28b2" - end - - needs :cxx14 - - def install - resource("xtl").stage do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - system "cmake", ".", "-Dxtl_DIR=#{lib}/cmake/xtl", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cc").write <<~EOS - #include - #include "xtensor/xarray.hpp" - #include "xtensor/xio.hpp" - #include "xtensor/xview.hpp" - - int main() { - xt::xarray arr1 - {{11.0, 12.0, 13.0}, - {21.0, 22.0, 23.0}, - {31.0, 32.0, 33.0}}; - - xt::xarray arr2 - {100.0, 200.0, 300.0}; - - xt::xarray res = xt::view(arr1, 1) + arr2; - - std::cout << res(2) << std::endl; - return 0; - } - EOS - system ENV.cxx, "-std=c++14", "test.cc", "-o", "test", "-I#{include}" - assert_equal "323", shell_output("./test").chomp - end -end diff --git a/Formula/xtitle.rb b/Formula/xtitle.rb deleted file mode 100644 index c29f71b796ab1..0000000000000 --- a/Formula/xtitle.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Xtitle < Formula - desc "Set window title and icon for your X terminal" - homepage "https://www.cs.indiana.edu/~kinzler/xtitle/" - url "https://www.cs.indiana.edu/~kinzler/xtitle/xtitle-1.0.4.tgz" - sha256 "cadddef1389ba1c5e1dc7dd861545a5fe11cb397a3f692cd63881671340fcc15" - - bottle :unneeded - - def install - bin.install "xtitle.sh" => "xtitle" - bin.install "xtctl.sh" => "xtctl" - man1.install "xtitle.man" => "xtitle.1" - end - - test do - assert_match version.to_s, shell_output("#{bin}/xtitle --version") - end -end diff --git a/Formula/xu4.rb b/Formula/xu4.rb deleted file mode 100644 index 886e260574c6d..0000000000000 --- a/Formula/xu4.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Xu4 < Formula - desc "Remake of Ultima IV" - homepage "https://xu4.sourceforge.io/" - url "http://svn.code.sf.net/p/xu4/code/trunk/u4", :revision => "3088" - version "1.0beta4+r3088" - head "http://svn.code.sf.net/p/xu4/code/trunk/u4" - - bottle do - cellar :any - sha256 "0454e0ccdb0c16122e0acaaf34e7ff256d6f8fa8c5f3860c97d68217ad1d1aaf" => :mojave - sha256 "e7aac43710b9180710c9af0dcd80a955aa095d6264f92eb482cbe2322c01146d" => :high_sierra - sha256 "9d490768b07abfa8c105c88dc0d2a6be97e175f6535afcee0a4c63e37d976f6f" => :sierra - sha256 "47700a341c1dc6a700d5a0f2925846b2457e3f470b25c2288c8c0c132202d027" => :el_capitan - sha256 "aab6d22274a345209ff25516b2dd11b715088ccab2d31588b8253f65e29f0e96" => :yosemite - end - - depends_on "libpng" - depends_on "sdl" - depends_on "sdl_mixer" - - resource "ultima4" do - url "https://www.thatfleminggent.com/ultima/ultima4.zip", :using => :nounzip - sha256 "94aa748cfa1d0e7aa2e518abebb994f3c18acf7edb78c3bd37cd0a4404e6ba74" - end - - resource "u4upgrad" do - url "https://downloads.sourceforge.net/project/xu4/Ultima%204%20VGA%20Upgrade/1.3/u4upgrad.zip", - :using => :nounzip - sha256 "400ac37311f3be74c1b2d7836561b2ead2b146f5162586865b0f4881225cca58" - end - - def install - (buildpath/"src").install resource("ultima4") - (buildpath/"src").install resource("u4upgrad") - - cd "src" do - # Include ultima4.zip in the bundle - inreplace "Makefile.macosx", /# (cp \$\(ULTIMA4\))/, '\1' - - # Copy over SDL's ObjC main files - cp_r Dir[Formula["sdl"].libexec/"*"], "macosx" - - system "make", "bundle", - "-f", "Makefile.macosx", - "CC=#{ENV.cc}", - "CXX=#{ENV.cxx}", - "PREFIX=#{HOMEBREW_PREFIX}", - "UILIBS=-framework Cocoa -L#{Formula["sdl"].lib} -lSDL " \ - "-L#{Formula["sdl_mixer"].lib} -lSDL_mixer " \ - "-L#{Formula["libpng"].lib} -lpng", - "UIFLAGS=-I#{Formula["sdl"].include}/SDL " \ - "-I#{Formula["sdl_mixer"].include}/SDL " \ - "-I#{Formula["libpng"].include}" - prefix.install "XU4.app" - bin.write_exec_script "#{prefix}/XU4.app/Contents/MacOS/u4" - end - end - - test do - system "#{bin}/u4", "-help" - end -end diff --git a/Formula/xvid.rb b/Formula/xvid.rb deleted file mode 100644 index 202e7d48b411c..0000000000000 --- a/Formula/xvid.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Xvid < Formula - desc "High-performance, high-quality MPEG-4 video library" - homepage "https://labs.xvid.com/" - url "https://downloads.xvid.com/downloads/xvidcore-1.3.5.tar.bz2" - mirror "https://fossies.org/linux/misc/xvidcore-1.3.5.tar.bz2" - sha256 "7c20f279f9d8e89042e85465d2bcb1b3130ceb1ecec33d5448c4589d78f010b4" - - bottle do - cellar :any - sha256 "c1c30c17a4715958fa2fa27fb060b2835c02818b46342d6534131af8729ebd65" => :mojave - sha256 "618a58566676d49621cafc2278f1d94e5eaa443a57b1621ea4b040f49972ff94" => :high_sierra - sha256 "6e62d9ca4544df9545b7bffbadd3c80a609d49ce12a94886f3310578ea2aaf88" => :sierra - sha256 "1161fb4826f77c79deb33c494c31d934b9f46eac60d61ec3e5ea5c56b018d614" => :el_capitan - end - - def install - cd "build/generic" do - system "./configure", "--disable-assembly", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #define NULL 0 - int main() { - xvid_gbl_init_t xvid_gbl_init; - xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lxvidcore", "-o", "test" - system "./test" - end -end diff --git a/Formula/xxhash.rb b/Formula/xxhash.rb deleted file mode 100644 index 1afbfe0c9cd2d..0000000000000 --- a/Formula/xxhash.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Xxhash < Formula - desc "Extremely fast non-cryptographic hash algorithm" - homepage "https://github.com/Cyan4973/xxHash" - url "https://github.com/Cyan4973/xxHash/archive/v0.6.5.tar.gz" - sha256 "19030315f4fc1b4b2cdb9d7a317069a109f90e39d1fe4c9159b7aaa39030eb95" - - bottle do - cellar :any - sha256 "00e30f371e2ca836cecfe3efabe4a488fbf3ddfa61f9aef6b2725f95f39dcd32" => :mojave - sha256 "283532f22d512db5c2266a64f84a425a0fa3f6048aeb751fcb159df191b70763" => :high_sierra - sha256 "fedfdf613f1d60af81bb1bc5bbc125249a5ae0d8c6fe0863d677e641b5cad52f" => :sierra - sha256 "7cbdee7d1220206000efe718a6c599d70142f2ce006e9d6743e1f447cd2d3dbd" => :el_capitan - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"leaflet.txt").write "No computer should be without one!" - assert_match /^67bc7cc242ebc50a/, shell_output("#{bin}/xxhsum leaflet.txt") - end -end diff --git a/Formula/xz.rb b/Formula/xz.rb deleted file mode 100644 index 618ddc582731a..0000000000000 --- a/Formula/xz.rb +++ /dev/null @@ -1,40 +0,0 @@ -# Upstream project has requested we use a mirror as the main URL -# https://github.com/Homebrew/homebrew/pull/21419 -class Xz < Formula - desc "General-purpose data compression with high compression ratio" - homepage "https://tukaani.org/xz/" - url "https://downloads.sourceforge.net/project/lzmautils/xz-5.2.4.tar.gz" - mirror "https://tukaani.org/xz/xz-5.2.4.tar.gz" - sha256 "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" - - bottle do - cellar :any - sha256 "010667293df282c8bceede3bcd36953dd57c56cef608d09a5b50694ab7d4b96b" => :mojave - sha256 "e7be50f4ee00e35887f3957263334eb3baba59e8c061919060f9259351be6880" => :high_sierra - sha256 "bcc71ee69e2c43bf56b9c9ece5a53dc3439652f355620a25b020f794cd447fb7" => :sierra - sha256 "974aae83ba7ceb62040c5bf02b1fb277a919212714c8da2a4c5eb3d1d119a465" => :el_capitan - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - test do - path = testpath/"data.txt" - original_contents = "." * 1000 - path.write original_contents - - # compress: data.txt -> data.txt.xz - system bin/"xz", path - refute_predicate path, :exist? - - # decompress: data.txt.xz -> data.txt - system bin/"xz", "-d", "#{path}.xz" - assert_equal original_contents, path.read - end -end diff --git a/Formula/y/yacas.rb b/Formula/y/yacas.rb new file mode 100644 index 0000000000000..ca871e5328d9b --- /dev/null +++ b/Formula/y/yacas.rb @@ -0,0 +1,45 @@ +class Yacas < Formula + desc "General purpose computer algebra system" + homepage "https://www.yacas.org/" + url "https://github.com/grzegorzmazur/yacas/archive/refs/tags/v1.9.1.tar.gz" + sha256 "36333e9627a0ed27def7a3d14628ecaab25df350036e274b37f7af1d1ff7ef5b" + license "LGPL-2.1-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8a8b658cbf16d46fc9c8284203475de7487cdd16120d1e32af3334a71b9cbb31" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc6a29cf051c3fe413734f62fe49f1e06cbc42e8243e79ed514848dea52304a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e69c83a63df9eca3faea3eb16d4da83777c516946634f11010218cfe3880e8e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae76071faf78ed8f1587d59f8c0824e1b2771441b74f0ec407eec3dee48d4e8b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bd6b1d30d48f91c16cf3ca17747ca75fc7c1b12a3f01a6403ba1cf91cca898a5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "143e5dae60ab7011781c9b6f3ce1be4e90f8b1f6914736a8d6ab941a1bacdaf0" + sha256 cellar: :any_skip_relocation, sonoma: "4db9a0ab3d4901693dace66c15c4cc089057e23a589cee0174e7926fd07dc27e" + sha256 cellar: :any_skip_relocation, ventura: "545dfeabd4103387c097ac475250b0dc63d03eaf5f552a5f846e621dc2b166d1" + sha256 cellar: :any_skip_relocation, monterey: "bb3448a3fa65b7a2f59240f7d434354e1a4c353ac37721e3c9490e6ce9067b7e" + sha256 cellar: :any_skip_relocation, big_sur: "3a0cccf6e345290321cf12858a60f9fd3ccbc3e7f05ad30f544d61b2946566b5" + sha256 cellar: :any_skip_relocation, catalina: "304721aa2947579ecf84d13afca543a252a6ee6ec5d3efe1490d598988116497" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f451d69b6a8e395921daba81adfa55b8bb7230c4a4ea1b6e524b9ba1fadcc14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a754ab2fbf89ee984bdca70f8cdfec48f2323a8d4acba7813d7b7aa621df99d9" + end + + depends_on "cmake" => :build + + def install + cmake_args = [ + "-DENABLE_CYACAS_GUI=OFF", + "-DENABLE_CYACAS_KERNEL=OFF", + "-DCMAKE_C_COMPILER=#{ENV.cc}", + "-DCMAKE_CXX_COMPILER=#{ENV.cxx}", + ] + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "scripts" + end + + test do + assert_match version.to_s, shell_output("#{bin}/yacas -v") + end +end diff --git a/Formula/y/yadm.rb b/Formula/y/yadm.rb new file mode 100644 index 0000000000000..a4aab8e19b194 --- /dev/null +++ b/Formula/y/yadm.rb @@ -0,0 +1,38 @@ +class Yadm < Formula + desc "Yet Another Dotfiles Manager" + homepage "https://yadm.io/" + url "https://github.com/yadm-dev/yadm/archive/refs/tags/3.5.0.tar.gz" + sha256 "2a15ed91238dd2f15db9905eb56702272c079ad9c37c505dfee69c6b5e9054b6" + license "GPL-3.0-or-later" + head "https://github.com/yadm-dev/yadm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "323e01bb5b2d4578628cf24afdd1446f6b858927b62cc461da626339f5c053f0" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + bash_completion.install "completion/bash/yadm" + fish_completion.install "completion/fish/yadm.fish" + zsh_completion.install "completion/zsh/_yadm" + end + + test do + system bin/"yadm", "init" + assert_path_exists testpath/".local/share/yadm/repo.git/config", "Failed to init repository." + assert_match testpath.to_s, shell_output("#{bin}/yadm gitconfig core.worktree") + + # disable auto-alt + system bin/"yadm", "config", "yadm.auto-alt", "false" + assert_match "false", shell_output("#{bin}/yadm config yadm.auto-alt") + + (testpath/"testfile").write "test" + system bin/"yadm", "add", "#{testpath}/testfile" + + system bin/"yadm", "gitconfig", "user.email", "test@test.org" + system bin/"yadm", "gitconfig", "user.name", "Test User" + + system bin/"yadm", "commit", "-m", "test commit" + assert_match "test commit", shell_output("#{bin}/yadm log --pretty=oneline 2>&1") + end +end diff --git a/Formula/y/yaegi.rb b/Formula/y/yaegi.rb new file mode 100644 index 0000000000000..279e4d26ce2bf --- /dev/null +++ b/Formula/y/yaegi.rb @@ -0,0 +1,30 @@ +class Yaegi < Formula + desc "Yet another elegant Go interpreter" + homepage "https://github.com/traefik/yaegi" + url "https://github.com/traefik/yaegi/archive/refs/tags/v0.16.1.tar.gz" + sha256 "872ceac063a8abfa71ecdeb56b1b960ca02abd5e9b6c926ae1bd3eb097cad44b" + license "Apache-2.0" + head "https://github.com/traefik/yaegi.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "a1b6aa50f88c249b67a801d000919fae39cc280bc0bdf873ca9da5b0d6bd8df9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "596a9506904a37aeb5a6118af68fbf7a4f316ae8baf70ac3e0d22a14b9bf9831" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "596a9506904a37aeb5a6118af68fbf7a4f316ae8baf70ac3e0d22a14b9bf9831" + sha256 cellar: :any_skip_relocation, arm64_ventura: "596a9506904a37aeb5a6118af68fbf7a4f316ae8baf70ac3e0d22a14b9bf9831" + sha256 cellar: :any_skip_relocation, sonoma: "bd0481cb3feb07c198f773d117a5153a60b91c126f88d99fcf178dbf5f0bd542" + sha256 cellar: :any_skip_relocation, ventura: "bd0481cb3feb07c198f773d117a5153a60b91c126f88d99fcf178dbf5f0bd542" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d9c2fc672532d05981a633e0cfed9cffb5978c6ccec6df79275302bde86ba4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a431dd9b644a57c9fdf96231d53ddbd7f1f8ac9047d87c633e1677b4d9cbf89" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X=main.version=#{version}"), "./cmd/yaegi" + end + + test do + assert_match "4", pipe_output(bin/"yaegi", "println(3 + 1)", 0) + end +end diff --git a/Formula/y/yaf.rb b/Formula/y/yaf.rb new file mode 100644 index 0000000000000..b4dd11a558b85 --- /dev/null +++ b/Formula/y/yaf.rb @@ -0,0 +1,54 @@ +class Yaf < Formula + desc "Yet another flowmeter: processes packet data from pcap(3)" + homepage "https://tools.netsa.cert.org/yaf/" + url "https://tools.netsa.cert.org/releases/yaf-2.17.1.tar.gz" + sha256 "2d361f602d04ff16cb4c6ffca31f0ba32a55ee4bf87e30a2d2d64fc13b81442e" + license "GPL-2.0-only" + + # NOTE: This should be updated to check the main `/yaf/download.html` + # page when it links to a stable version again in the future. + livecheck do + url "https://tools.netsa.cert.org/yaf2/download.html" + regex(/".*?yaf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "4543484b45766bfcb44645966b556e12a1baa0faa4f1e347a0252af7ea964f45" + sha256 cellar: :any, arm64_sequoia: "fc69d836a75aece50ed5b5f719d6f289d6c1c34966d1ea10fa9d126ade80b37d" + sha256 cellar: :any, arm64_sonoma: "18f3dcb2267a39b9a3919d4432b06305ca5e6011b19982bfda9026cbf71b277f" + sha256 cellar: :any, arm64_ventura: "a6e1377b16dcaf787188bc6e6a3a19602ab6eca18be77a864d43f0d73191d75f" + sha256 cellar: :any, sonoma: "e8121e901e9a9851e0b44bf6f88572896b91303fb1a161a634052cc884348e2c" + sha256 cellar: :any, ventura: "8eeb39210480ed56eeef7c6f2cd1427dc49356f813653c348678e263f853b7d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b1980c07ee8762cb0432079dd2cb9ffaf4effd11129257b40b812c6213a2b37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc484b56a155b04d2633aac0ed45fa8e164c2b9696a31ab6b286bed5b19611a1" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libfixbuf" + depends_on "libtool" + depends_on "pcre" + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "openssl@3" + end + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + input = test_fixtures("test.pcap") + output = pipe_output("#{bin}/yafscii", shell_output("#{bin}/yaf --in #{input}")) + expected = "2014-10-02 10:29:06.168497 - 10:29:06.169875 (0.001378 sec) tcp " \ + "192.168.1.115:51613 => 192.168.1.118:80 71487608:98fc8ced " \ + "S/APF:AS/APF (7/453 <-> 5/578) rtt 451 us" + assert_equal expected, output.strip + end +end diff --git a/Formula/y/yafc.rb b/Formula/y/yafc.rb new file mode 100644 index 0000000000000..e53cabbc7de25 --- /dev/null +++ b/Formula/y/yafc.rb @@ -0,0 +1,53 @@ +class Yafc < Formula + desc "Command-line FTP client" + homepage "https://github.com/sebastinas/yafc" + url "https://deb.debian.org/debian/pool/main/y/yafc/yafc_1.3.7.orig.tar.xz" + sha256 "4b3ebf62423f21bdaa2449b66d15e8d0bb04215472cb63a31d473c3c3912c1e0" + license "GPL-2.0-or-later" + revision 5 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "f97a84b632e61a767359e627ebefeb33eaa48dc3a3acc7fcb971fd18ae313228" + sha256 cellar: :any, arm64_sequoia: "2f0f7381029703774be13824194784dc2e84478fbb5680abd7d856366de3db57" + sha256 cellar: :any, arm64_sonoma: "f2c0733bdc6d9842bc5dd1400fa1e9a4a2d5af3f0ca8578caf32bca5b46ae2ec" + sha256 cellar: :any, arm64_ventura: "79f180267773ebe99148b9e55e1fce873dfe7b1b8aa14050191a5cab8ad93145" + sha256 cellar: :any, arm64_monterey: "0b779fe68332dfaf1182fd343aad750a2346f95c9d5019e0e9245ae60a2fc4e1" + sha256 cellar: :any, arm64_big_sur: "bd86e141e4c5f328f59bffa84490e988d6996acfd631988103da5be103539689" + sha256 cellar: :any, sonoma: "a16e93692fe9cf919c6ed4432be40f3e9aeebc81ff4498e4ec1179b055d457aa" + sha256 cellar: :any, ventura: "6ad15e0287643c6e1157b51762e21443e2c15e8b88610903676316b6b1bd10d9" + sha256 cellar: :any, monterey: "428ecc7f65e46aaf484032777245e9aee40b1c4290efb5f1c5ac0abd4511a698" + sha256 cellar: :any, big_sur: "d7212a2284b1cdd5bbebf59e8e1dcefe6073d8e29eb1574d7ed6e80249723160" + sha256 cellar: :any_skip_relocation, arm64_linux: "691a0d3182e75189070359564be4883374cb49366dee2b2baf3de8e1eab8bf6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dc9c9ee718893b94e236db36df97740b59378591bd881a95fec98c9da8bdf88" + end + + depends_on "pkgconf" => :build + depends_on "libssh" + depends_on "openssl@3" + depends_on "readline" + + on_linux do + depends_on "libbsd" + end + + def install + args = %W[ + --prefix=#{prefix} + --with-readline=#{Formula["readline"].opt_prefix} + ] + + system "./configure", *args + system "make", "install" + end + + test do + download_file = testpath/"gcc-10.2.0.tar.xz.sig" + expected_checksum = Checksum.new("8e271266e0e3312bb1c384c48b01374e9c97305df781599760944e0a093fad38") + output = pipe_output("#{bin}/yafc -W #{testpath} -a ftp://ftp.gnu.org/gnu/gcc/gcc-10.2.0/", + "get #{download_file.basename}", 0) + assert_match version.to_s, output + download_file.verify_checksum expected_checksum + end +end diff --git a/Formula/y/yajl.rb b/Formula/y/yajl.rb new file mode 100644 index 0000000000000..72d832886cf99 --- /dev/null +++ b/Formula/y/yajl.rb @@ -0,0 +1,48 @@ +class Yajl < Formula + desc "Yet Another JSON Library" + homepage "https://lloyd.github.io/yajl/" + url "https://github.com/lloyd/yajl/archive/refs/tags/2.1.0.tar.gz" + sha256 "3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a" + license "ISC" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 4 + sha256 cellar: :any, arm64_tahoe: "ee1d81b4f6c8e21b07003ba2057aa1c0edc24acde0aea4f0570295227fb36ae6" + sha256 cellar: :any, arm64_sequoia: "dba63b344e3308d17991f4a71f5ac5dcdc12099cd1d64e1d32f2492a44562709" + sha256 cellar: :any, arm64_sonoma: "971639e642d5f2531ab6159ee96e86c159a9015fad89cc28eee10a3fc91eb9ef" + sha256 cellar: :any, arm64_ventura: "fe07a22a18a3172092b2b2163bceff50f423c142484f9a62687dcf2a8ee6e330" + sha256 cellar: :any, arm64_monterey: "95735cd614157ed2756dac69c80d81b83d305f0dcb54c3299c00e5f0528ddd0e" + sha256 cellar: :any, arm64_big_sur: "baefc7dc955217c4bdefd8dc798a6ad432131f449370a6249e31be6604842942" + sha256 cellar: :any, sonoma: "d3669145f9a916ca3c1ec00e787e2bfb9be62f822d69f7cac414355692406d5b" + sha256 cellar: :any, ventura: "9a161cb8262cbcfabcd1559498d22ab1a5ba80f037a00149efbcbd88305ba91b" + sha256 cellar: :any, monterey: "af69d2c0088d874cbd0fa3fb534fb971943c81a8e49574758d8bfcfa4504ca5c" + sha256 cellar: :any, big_sur: "18bd8c54e847441959876cc9580db5ddcb7e3b92f2fc37ca49ce27d17c050df3" + sha256 cellar: :any, catalina: "65975afbeddbbd919282c04e53fccda191501eb4fa8992a2b4ab1b2be2e10151" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b1df8e59b01fee163b184e36bf7f607c8ff83be33f94361f9bdf67ce5b8e636" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c206281370fe7277f21d17ff50fe9511233aff74501238516918027006c9cbf3" + end + + depends_on "cmake" => :build + + # Workaround to build with CMake 4 + patch do + url "https://github.com/lloyd/yajl/commit/6fe59ca50dfd65bdb3d1c87a27245b2dd1a072f9.patch?full_index=1" + sha256 "b059e4181aca7c50c71924632b5e1dc263ea05a2e7fc6def095c0cc65398282c" + end + + def install + ENV.deparallelize + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (include/"yajl").install Dir["src/api/*.h"] + end + + test do + output = pipe_output("#{bin}/json_verify", "[0,1,2,3]").strip + assert_equal "JSON is valid", output + end +end diff --git a/Formula/y/yalantinglibs.rb b/Formula/y/yalantinglibs.rb new file mode 100644 index 0000000000000..5acda81385115 --- /dev/null +++ b/Formula/y/yalantinglibs.rb @@ -0,0 +1,62 @@ +class Yalantinglibs < Formula + desc "Collection of modern C++ libraries" + homepage "https://alibaba.github.io/yalantinglibs/en/" + license "Apache-2.0" + head "https://github.com/alibaba/yalantinglibs.git", branch: "main" + + stable do + url "https://github.com/alibaba/yalantinglibs/archive/refs/tags/lts1.2.1.tar.gz" + sha256 "0e1bc99dae186024b7f2472fc850e8b01429cbbae6ba14414dee0f56ca93dca1" + + # fix clang compilation error, upstream pr ref, https://github.com/alibaba/yalantinglibs/pull/947 + patch do + url "https://github.com/alibaba/yalantinglibs/commit/a9c55e6e24e38d2a640a67c0d6ae96095d973b41.patch?full_index=1" + sha256 "4435b0d9e68942477d312acca6bba080ac908d05f46eee4292f247ab4217c32d" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "26ec266b1cb421f569be3ddb50509a07e13f504f37f87c8d9bb3d77f8f5400ee" + end + + depends_on "cmake" => :build + depends_on "asio" + depends_on "async_simple" + depends_on "frozen" + depends_on "iguana" + + def install + args = %w[ + -DINSTALL_INDEPENDENT_STANDALONE=OFF + -DINSTALL_INDEPENDENT_THIRDPARTY=OFF + -DINSTALL_STANDALONE=OFF + -DINSTALL_THIRDPARTY=OFF + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "ylt/struct_json/json_reader.h" + #include "ylt/struct_json/json_writer.h" + struct person { + std::string name; + int age; + }; + YLT_REFL(person, name, age); + + int main() { + person p{.name = "tom", .age = 20}; + std::string str; + struct_json::to_json(p, str); // {"name":"tom","age":20} + person p1; + struct_json::from_json(p1, str); + } + CPP + system ENV.cxx, "test.cpp", "-std=c++20", "-o", "test" + system "./test" + end +end diff --git a/Formula/y/yamale.rb b/Formula/y/yamale.rb new file mode 100644 index 0000000000000..d52347fb4e429 --- /dev/null +++ b/Formula/y/yamale.rb @@ -0,0 +1,61 @@ +class Yamale < Formula + include Language::Python::Virtualenv + + desc "Schema and validator for YAML" + homepage "https://github.com/23andMe/Yamale" + url "https://files.pythonhosted.org/packages/37/27/da3742a358015f3c2a069ccdaf7e5766ac358e8200319f640755db3128ae/yamale-6.0.0.tar.gz" + sha256 "60be681f35e4939320b89de0d6f187ee0e5479ae7f7286b7f17f0859ddee4a66" + license "MIT" + head "https://github.com/23andMe/Yamale.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f9d30005e80962e774c7e09dadc03714a7d1dc9739a0b03dd4db55c868a00038" + sha256 cellar: :any, arm64_sequoia: "381732e435c618369a90c067a4849f93a050deb6b2560859dd8a505aa7328a56" + sha256 cellar: :any, arm64_sonoma: "41f6168a4aad718a78cb334ead86b3ddf1ac580743405b2a6c95a7f031b052f7" + sha256 cellar: :any, sonoma: "badfaa6f0181fe03e824dc5e58e8175595ea994e6ac10cad8758ecf4d263b8ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "338157f7ebe70a91901b5ee3b813108d07d95f29eec95abfaf8b1fb0bff903c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8701f790dc3291171d806a101ff4dbeca5d359905921efd3de7a39012faf449c" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"schema.yaml").write <<~YAML + string: str() + number: num(required=False) + datetime: timestamp(min='2010-01-01 0:0:0') + YAML + (testpath/"data1.yaml").write <<~YAML + string: bo is awesome + datetime: 2011-01-01 00:00:00 + YAML + (testpath/"some_data.yaml").write <<~YAML + string: one + number: 3 + datetime: 2015-01-01 00:00:00 + YAML + output = shell_output("#{bin}/yamale -s schema.yaml data1.yaml") + assert_match "Validation success!", output + + output = shell_output("#{bin}/yamale -s schema.yaml some_data.yaml") + assert_match "Validation success!", output + + (testpath/"good.yaml").write <<~YAML + --- + foo: bar + YAML + output = shell_output("#{bin}/yamale -s schema.yaml schema.yaml", 1) + assert_match "Validation failed!", output + end +end diff --git a/Formula/y/yamcha.rb b/Formula/y/yamcha.rb new file mode 100644 index 0000000000000..1a602b3688e11 --- /dev/null +++ b/Formula/y/yamcha.rb @@ -0,0 +1,122 @@ +class Yamcha < Formula + desc "NLP text chunker using Support Vector Machines" + homepage "http://chasen.org/~taku/software/yamcha/" + url "http://chasen.org/~taku/software/yamcha/src/yamcha-0.33.tar.gz" + sha256 "413d4fc0a4c13895f5eb1468e15c9d2828151882f27aea4daf2399c876be27d5" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?yamcha[._-]v?(\d+(?:\.\d+)+)\.t/im) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "f79875ac74e46f3087379d783513f73971707f8d0ff059e050f1256d5535a827" + sha256 cellar: :any, arm64_sequoia: "1291bdd640d66cfbbe073862038e660ada3fe9377d3386db32dd56967ee23d5f" + sha256 cellar: :any, arm64_sonoma: "d71664644d8b49088b1de03d5f5edfa3dbbdde0a45bcd88b50c50e003e44e191" + sha256 cellar: :any, arm64_ventura: "2302fc8b966f2d6cd48fdffdf765d577844e571a7f7de14aa1fe4091f960e329" + sha256 cellar: :any, arm64_monterey: "f3b51abc7335c21295ed08c9142d9c8fe2b48a74d8d632b5bc7812079938ba80" + sha256 cellar: :any, arm64_big_sur: "69a10b712ef5d0d47b50623eba38fe14207b046e6b55156cfc5f5595d0983161" + sha256 cellar: :any, sonoma: "aec22c106760679ed09434e1105fd60311162b2a8e6d6f5bf06b8fa88caff47f" + sha256 cellar: :any, ventura: "f8db88401507cec60953241a6ea12bc3945dcb68db85366bc597f466664badb7" + sha256 cellar: :any, monterey: "31ace70fbbf4e2da60850ccc2cea0bd4131e6acc98560cb3230d38c334ec2d2d" + sha256 cellar: :any, big_sur: "18f032ddd520debefef3e67422089660c9222e1a8098d4c9b5128cb7a517e87a" + sha256 cellar: :any, catalina: "703da9d88502c3e8ede9d567a816f7b7856112175f07f8b4c720bc7b0f540e64" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ebf9b1d45af65bd57c866ec89a3ebe280571edb16d6a1d971c55c5ed3228ae1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ce0b05c30bff796b1ed14c7732670d3fd9b96a20f3b48e1f4953b3e8c9d745c" + end + + depends_on "tinysvm" + + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + + # Use Debian patch to fix error: no matching function for call to 'make_pair' + patch do + url "https://sources.debian.org/data/main/y/yamcha/0.33-2/debian/patches/1011_fix_gcc7_compilation.patch" + sha256 "9edb656063290379f640ec772851ec3f559993bf469612a45d5a141277fe3d5b" + end + + # Fix build failure because of missing #include /"stdlib.h" on Linux. + # Patch submitted to author by email. + patch :DATA + + def install + if Hardware::CPU.arm? + # Workaround for ancient config files not recognizing aarch64 macos. + %w[config.guess config.sub].each do |fn| + cp Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}"/fn, fn + end + end + ENV.append "CPPFLAGS", "-std=c++03" if OS.linux? + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + libexecdir = shell_output("#{bin}/yamcha-config --libexecdir").chomp + assert_equal libexecdir, "#{libexec}/yamcha" + + (testpath/"train.data").write <<~EOS + He PRP B-NP + reckons VBZ B-VP + the DT B-NP + current JJ I-NP + account NN I-NP + deficit NN I-NP + will MD B-VP + narrow VB I-VP + to TO B-PP + only RB B-NP + # # I-NP + 1.8 CD I-NP + billion CD I-NP + in IN B-PP + September NNP B-NP + . . O + + He PRP B-NP + reckons VBZ B-VP + .. + EOS + + system "make", "-j", "1", + "-f", "#{libexecdir}/Makefile", + "CORPUS=train.data", "MODEL=case_study", "train" + + %w[log model se svmdata txtmodel.gz].each do |ext| + assert_path_exists testpath/"case_study.#{ext}" + end + end +end + +__END__ +diff --git a/libexec/mkdarts.cpp b/libexec/mkdarts.cpp +index c012fec..b88bdff 100644 +--- a/libexec/mkdarts.cpp ++++ b/libexec/mkdarts.cpp +@@ -23,6 +23,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/src/param.cpp b/src/param.cpp +index bbf7761..053e3c8 100644 +--- a/src/param.cpp ++++ b/src/param.cpp +@@ -26,6 +26,7 @@ + #include + #include "param.h" + #include "common.h" ++#include "string.h" + + #ifdef HAVE_CONFIG_H + #include "config.h" diff --git a/Formula/y/yamdi.rb b/Formula/y/yamdi.rb new file mode 100644 index 0000000000000..636b974964700 --- /dev/null +++ b/Formula/y/yamdi.rb @@ -0,0 +1,32 @@ +class Yamdi < Formula + desc "Add metadata to Flash video" + homepage "https://yamdi.sourceforge.net/" + url "https://downloads.sourceforge.net/project/yamdi/yamdi/1.9/yamdi-1.9.tar.gz" + sha256 "4a6630f27f6c22bcd95982bf3357747d19f40bd98297a569e9c77468b756f715" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5bedaf2bee4c5fc9401b576f4e56848eb0b81fc9ce6ae9174009572dda490738" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d1682a7424cf30298588c37aa36158d5d39ec11729cd7dae34303d244b1ad15a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "423627352b9bd50656cb38b57ddd40faad37c001d52f9cf941a62f6d0fd0b997" + sha256 cellar: :any_skip_relocation, arm64_ventura: "385b4af3db0b7f734f690539553c250c0e08fb8a472c7bef07e31fb273f20fbd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b50a1157642d1cf0bca8199e5da07b8a71788775d3d1425642cfd3739ee2db26" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f6796b10d1af7ae38ed559313b5646047cb1456c66428d9c32f5e3a0981f1f4c" + sha256 cellar: :any_skip_relocation, sonoma: "0adf5636aa77f2f15fe9c7c1d5e97f92562c22be96cefd8a180a8e3b4886cfab" + sha256 cellar: :any_skip_relocation, ventura: "6a318c89f3e6924e58b9ed87ee9611260eb226a1a6ed924b176742eac2900854" + sha256 cellar: :any_skip_relocation, monterey: "2bbf1bbbc7bb411fe09900dbe61093834ffb41f314ba241deee6ff764c285232" + sha256 cellar: :any_skip_relocation, big_sur: "375c99c3793fe45e70a76ef708f9d1b8d5f4e9a7c7f64eca0f7f522926432d82" + sha256 cellar: :any_skip_relocation, catalina: "6a3483a957ef3a480f5391d9483b0d3cf8adfce2ec2f6b48289f16733ce29771" + sha256 cellar: :any_skip_relocation, arm64_linux: "04279d34401c1e4eccc81bbd8889cf79efcdf61a2a8c228ab22497ab6b200e53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4a7cf29beb52e599c9d245d550d00848b935a8d8e5c0b9f3d46fd362e28a32b" + end + + # adobe flash player EOL 12/31/2020, https://www.adobe.com/products/flashplayer/end-of-life-alternative.html + deprecate! date: "2025-03-21", because: :unmaintained + + def install + system ENV.cc, "yamdi.c", "-o", "yamdi", *ENV.cflags.to_s.split + bin.install "yamdi" + man1.install "man1/yamdi.1" + end +end diff --git a/Formula/y/yaml-cpp.rb b/Formula/y/yaml-cpp.rb new file mode 100644 index 0000000000000..597a5104a2fca --- /dev/null +++ b/Formula/y/yaml-cpp.rb @@ -0,0 +1,49 @@ +class YamlCpp < Formula + desc "C++ YAML parser and emitter for YAML 1.2 spec" + homepage "https://github.com/jbeder/yaml-cpp" + url "https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz" + sha256 "fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "2568a74c90066c521d45bfd6057d55e52a1cf170b87d24321ed39a91a8013c31" + sha256 cellar: :any, arm64_sequoia: "b453cb98bf2c4dc253c3523f587a0af606e5a682bcd7b7bd0f69013e95cfe418" + sha256 cellar: :any, arm64_sonoma: "778720c980df7e2e5ed7a971eea721ecd6a21069f927279809496164c3248f69" + sha256 cellar: :any, arm64_ventura: "a257981f293174574400a08830c9edb3fef18a1d27d9c7a8f2a8ec0a6450a15f" + sha256 cellar: :any, arm64_monterey: "5590ca844620d1eec096d947cd88d77acd0cec2094ea6558c56802f2960f3a80" + sha256 cellar: :any, arm64_big_sur: "2106ac96acedc1d4ee2d8e086b5408a8fc3cd67cea199234f91dcef2f1980fa3" + sha256 cellar: :any, sonoma: "2c0cc13d8e696a316db54c6d4ad4093c30c839c6677782968bcc59912207e1fd" + sha256 cellar: :any, ventura: "6df59a455c4312b58a636ea26c0f7b07a98e2718b7702f9c9a6603a3d18db540" + sha256 cellar: :any, monterey: "ed2271a45db27da472a35762a95ec0e36ee8be8a193593637b289eaa40d34e68" + sha256 cellar: :any, big_sur: "34e2ea6e7e4c5db76bdbe1eb799025c0143c3cda82ad561bf6354ba79e014427" + sha256 cellar: :any_skip_relocation, arm64_linux: "124cab38c648ba776e8ae2af5b978c3bb74bc0c938fd922f0bb24976781d79d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eea8c23888c9026a8994e5b7b3b62e65b89da4d08db764c340900ecbe190f36d" + end + + depends_on "cmake" => :build + + def install + # Workaround to build with CMake 4 + inreplace "CMakeLists.txt", "cmake_minimum_required(VERSION 3.4)", + "cmake_minimum_required(VERSION 3.10)" + args = ["-DYAML_BUILD_SHARED_LIBS=ON", "-DYAML_CPP_BUILD_TESTS=OFF"] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + YAML::Node node = YAML::Load("[0, 0, 0]"); + node[0] = 1; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-lyaml-cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/y/yaml-language-server.rb b/Formula/y/yaml-language-server.rb new file mode 100644 index 0000000000000..7e88bf22f76ee --- /dev/null +++ b/Formula/y/yaml-language-server.rb @@ -0,0 +1,40 @@ +class YamlLanguageServer < Formula + desc "Language Server for Yaml Files" + homepage "https://github.com/redhat-developer/yaml-language-server" + url "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-1.19.2.tgz" + sha256 "1b2c10f1acb09a87551d54ad666b8f7e16023ceb5c7270489a67c206025614f1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a7f711394c0d4737c7a81dac1da400867b4f55be7854f6309f41ebf68ac2d51c" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"yaml-language-server", "--stdio") do |stdin, stdout| + stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}" + sleep 3 + assert_match(/^Content-Length: \d+/i, stdout.readline) + end + end +end diff --git a/Formula/y/yaml2json.rb b/Formula/y/yaml2json.rb new file mode 100644 index 0000000000000..f1405deb68559 --- /dev/null +++ b/Formula/y/yaml2json.rb @@ -0,0 +1,65 @@ +class Yaml2json < Formula + desc "Command-line tool convert from YAML to JSON" + homepage "https://github.com/bronze1man/yaml2json" + url "https://github.com/bronze1man/yaml2json/archive/refs/tags/v1.3.5.tar.gz" + sha256 "efde12ca8b3ab7df3d3eaef35ecfb6e0d54baed33c8d553e7fd611a79c4cee04" + license "MIT" + head "https://github.com/bronze1man/yaml2json.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4c8f34dd512a3f098cf8a17a3272e81c0b3431babe075795ec2ca02966e01d5e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "81fdf8b90dfbef0a48912f42db8742d4ee5542d87a3f709504821ba7c4aae7f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81fdf8b90dfbef0a48912f42db8742d4ee5542d87a3f709504821ba7c4aae7f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81fdf8b90dfbef0a48912f42db8742d4ee5542d87a3f709504821ba7c4aae7f4" + sha256 cellar: :any_skip_relocation, sonoma: "3d2dd72115aaa4fc3e4cc60dc285c2d76f58283ea90241687ff3bd55fafdbe9d" + sha256 cellar: :any_skip_relocation, ventura: "3d2dd72115aaa4fc3e4cc60dc285c2d76f58283ea90241687ff3bd55fafdbe9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0fb799728cbc565f86a7bf1d30f4abef6d91234237653f3d209ef65c54c68a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d1ad585751d061cdf59a0b4722b31fb48c34f92159426cb2e74d313db63d0b1" + end + + depends_on "go" => :build + + conflicts_with "remarshal", because: "both install `yaml2json` binaries" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/yaml2json --version 2>&1", 1) + + (testpath/"test.yaml").write <<~YAML + firstname: John + lastname: Doe + age: 25 + + items: + - item: Desk + color: black + + - item: Chair + color: brown + YAML + + (testpath/"expected.json").write <<~JSON + { + "age": 25, + "firstname": "John", + "lastname": "Doe", + "items": [ + { + "item": "Desk", + "color": "black" + }, + { + "item": "Chair", + "color": "brown" + } + ] + } + JSON + + assert_equal JSON.parse((testpath/"expected.json").read), + JSON.parse(shell_output("#{bin}/yaml2json < #{testpath}/test.yaml")) + end +end diff --git a/Formula/y/yamlfix.rb b/Formula/y/yamlfix.rb new file mode 100644 index 0000000000000..5904adfe780ed --- /dev/null +++ b/Formula/y/yamlfix.rb @@ -0,0 +1,131 @@ +class Yamlfix < Formula + include Language::Python::Virtualenv + + desc "Simple and configurable YAML formatter that keeps comments" + homepage "https://lyz-code.github.io/yamlfix/" + url "https://files.pythonhosted.org/packages/e8/5f/cea9f9a9027f3f7ac6b5345e654255518013e94d5c3146746a139be5c865/yamlfix-1.19.0.tar.gz" + sha256 "22f95ed2a5b88f46f06cf7922c616b6706d3596f23a0553138796ab909e5fa96" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b8851fd9cd546d4cb2371c0e90771cd633a478d0505f3ca2f5253a21fbc539ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8851fd9cd546d4cb2371c0e90771cd633a478d0505f3ca2f5253a21fbc539ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8851fd9cd546d4cb2371c0e90771cd633a478d0505f3ca2f5253a21fbc539ed" + sha256 cellar: :any_skip_relocation, sonoma: "7ef664d82e27b7ddb6c8605eb21962c8836f57234d0927cf07e7b24ea165cc48" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ef664d82e27b7ddb6c8605eb21962c8836f57234d0927cf07e7b24ea165cc48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ef664d82e27b7ddb6c8605eb21962c8836f57234d0927cf07e7b24ea165cc48" + end + + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages exclude_packages: "pydantic-core" + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "loguru" do + url "https://files.pythonhosted.org/packages/3a/05/a1dae3dffd1116099471c643b8924f5aa6524411dc6c63fdae648c4f1aca/loguru-0.7.3.tar.gz" + sha256 "19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6" + end + + resource "maison" do + url "https://files.pythonhosted.org/packages/24/45/7cb1d08b6b5674c381b6e0232d35f417a1eba8bb66cdc18edff2b9c80b68/maison-2.0.2.tar.gz" + sha256 "476f2bf414a20f5abf5a9856bd4db78b5a33c695654a0fc49c3c4abed78c2efc" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "ruyaml" do + url "https://files.pythonhosted.org/packages/4b/75/abbc7eab08bad7f47887a0555d3ac9e3947f89d2416678c08e025e449fdc/ruyaml-0.91.0.tar.gz" + sha256 "6ce9de9f4d082d696d3bde264664d1bcdca8f5a9dff9d1a1f1a127969ab871ab" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/yamlfix --version") + + (testpath/"test.yaml").write <<~YAML + foo: bar + baz: qux + YAML + + assert_match <<~EOS, shell_output("#{bin}/yamlfix test.yaml 2>&1").gsub(/\e\[\d+m/, "") + [+] YamlFix: Fixing files + [+] Fixed test.yaml + [+] Checked 1 files: 1 fixed, 0 left unchanged + EOS + + expected_content = <<~YAML + --- + foo: bar + baz: qux + YAML + + assert_equal expected_content, (testpath/"test.yaml").read + end +end diff --git a/Formula/y/yamlfmt.rb b/Formula/y/yamlfmt.rb new file mode 100644 index 0000000000000..01e479de44e96 --- /dev/null +++ b/Formula/y/yamlfmt.rb @@ -0,0 +1,33 @@ +class Yamlfmt < Formula + desc "Extensible command-line tool to format YAML files" + homepage "https://github.com/google/yamlfmt" + url "https://github.com/google/yamlfmt/archive/refs/tags/v0.20.0.tar.gz" + sha256 "de6bc4373ba46c520d936dd4b60395868ec17aba338b9fd849594c1f41b6c057" + license "Apache-2.0" + head "https://github.com/google/yamlfmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "b14f51773eedb24ea8e469fb629ae71b1a48a7f8028a9c988281d9181ef80380" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b14f51773eedb24ea8e469fb629ae71b1a48a7f8028a9c988281d9181ef80380" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b14f51773eedb24ea8e469fb629ae71b1a48a7f8028a9c988281d9181ef80380" + sha256 cellar: :any_skip_relocation, sonoma: "49184c42f7a6694749b9598719c4a00f71b7f5243c4745ef804cbad35b2be2c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "501eedb3398b4e7ea7214a70263e9ead25141ba7fe26d52ca3a9be7a7eb84a67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f07ba36a80227cbe3998f89efd76308bd3415873b491151f40d96483d9243f24" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:), "./cmd/yamlfmt" + end + + test do + assert_match version.to_s, shell_output("#{bin}/yamlfmt -version") + + (testpath/"test.yml").write <<~YAML + foo: bar + YAML + system bin/"yamlfmt", "-lint", "test.yml" + end +end diff --git a/Formula/y/yamllint.rb b/Formula/y/yamllint.rb new file mode 100644 index 0000000000000..597f20852ada5 --- /dev/null +++ b/Formula/y/yamllint.rb @@ -0,0 +1,52 @@ +class Yamllint < Formula + include Language::Python::Virtualenv + + desc "Linter for YAML files" + homepage "https://github.com/adrienverge/yamllint" + url "https://files.pythonhosted.org/packages/46/f2/cd8b7584a48ee83f0bc94f8a32fea38734cefcdc6f7324c4d3bfc699457b/yamllint-1.37.1.tar.gz" + sha256 "81f7c0c5559becc8049470d86046b36e96113637bcbe4753ecef06977c00245d" + license "GPL-3.0-or-later" + head "https://github.com/adrienverge/yamllint.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "b47462e8eab9f22ab1768d1d86018e1df02aa972b8c67163b2b34e4c6959d671" + sha256 cellar: :any, arm64_sequoia: "ea04f0dafe4271e07c7f44863b9a964c87710137cf0fed479e2e3101403a1365" + sha256 cellar: :any, arm64_sonoma: "9220591106b4eeb94899f1f5c071fa0ac30e609e0b2907b19a60db12d4cdfa0f" + sha256 cellar: :any, sonoma: "ba48a03d10464d37ca4e116a9e50f4479967b8683b324cf3951817a31f2587df" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea18bdce2239ed653fae04f914e43dd3eb5da910f49a32277a62dc3b1652df8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56e2093dc7b6b03151e46cb5060eb234bae9e182a35a8742b0bcdd41f3f9f8b4" + end + + depends_on "libyaml" + depends_on "python@3.14" + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" + sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"bad.yaml").write <<~YAML + --- + foo: bar: gee + YAML + output = shell_output("#{bin}/yamllint -f parsable -s bad.yaml", 1) + assert_match "syntax error: mapping values are not allowed here", output + + (testpath/"good.yaml").write <<~YAML + --- + foo: bar + YAML + assert_empty shell_output("#{bin}/yamllint -f parsable -s good.yaml") + end +end diff --git a/Formula/y/yamlresume.rb b/Formula/y/yamlresume.rb new file mode 100644 index 0000000000000..192c608105e85 --- /dev/null +++ b/Formula/y/yamlresume.rb @@ -0,0 +1,28 @@ +class Yamlresume < Formula + desc "Resumes as code in YAML" + homepage "https://github.com/yamlresume/yamlresume" + url "https://registry.npmjs.org/yamlresume/-/yamlresume-0.7.5.tgz" + sha256 "77a1ff0ffa031a3e335d0eb453c12439c90dd54273889ef3434667b5539e52d3" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "da9c94b4ee2b7916a0f249f4fb5207fe14577b9a840f34cf2c1fa7fdbc32910a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/yamlresume --version") + + system bin/"yamlresume", "new" + assert_match "YAMLResume provides a builtin schema", (testpath/"resume.yml").read + + output = shell_output("#{bin}/yamlresume validate resume.yml") + assert_match "Resume validation passed", output + end +end diff --git a/Formula/y/yank.rb b/Formula/y/yank.rb new file mode 100644 index 0000000000000..dab527a75e11b --- /dev/null +++ b/Formula/y/yank.rb @@ -0,0 +1,42 @@ +class Yank < Formula + desc "Copy terminal output to clipboard" + homepage "https://github.com/mptre/yank" + url "https://github.com/mptre/yank/archive/refs/tags/v1.3.0.tar.gz" + sha256 "40f5472df5f6356a4d6f48862a19091bd4de3f802b3444891b3bc4b710fb35ca" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "ff19077c89bbaed4baab592cc2fd196a8c0d3ab781afa4a45a8365ca9a6af40a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c0296212716734c1aa848c53307e2c7650c884be26a7b725fac7177df7d6c844" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "826894f992a241194151200adbbe897b0ec8ab6b9edea895196c1f3f73a0860d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d8a82c47af7166beacbec8c91d49ec5f9f4b2a4575782be062f89e39ebb58c19" + sha256 cellar: :any_skip_relocation, sonoma: "5ed9023f906bb2ce8b1c52f95ee427b8309b3582ab53972179abcc2311efb193" + sha256 cellar: :any_skip_relocation, ventura: "958524a5a0349f5ef1f9fd704b057a64228c5f240df7635a25bf7d8b41c984a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe39b7828600d9a73fbb7b9c587cf9676c8ca3479d88efd883b148fc9d11ea5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15b6185fe4d08cba98dcabd29a327037a96c9872cadc0048bc60eb40ede9ba3b" + end + + on_linux do + depends_on "xsel" + end + + def install + yankcmd = OS.mac? ? "pbcopy" : "xsel" + system "make", "install", "PREFIX=#{prefix}", "YANKCMD=#{yankcmd}" + end + + test do + require "pty" + PTY.spawn("echo key=value | #{bin}/yank -d = >#{testpath}/result") do |r, w, _pid| + r.winsize = [80, 43] + w.write "\016" + sleep 1 + w.write "\r" + sleep 1 + end + assert_equal "value", (testpath/"result").read + end +end diff --git a/Formula/y/yapf.rb b/Formula/y/yapf.rb new file mode 100644 index 0000000000000..7502706bc36c6 --- /dev/null +++ b/Formula/y/yapf.rb @@ -0,0 +1,31 @@ +class Yapf < Formula + include Language::Python::Virtualenv + + desc "Formatter for python code" + homepage "https://github.com/google/yapf" + url "https://files.pythonhosted.org/packages/23/97/b6f296d1e9cc1ec25c7604178b48532fa5901f721bcf1b8d8148b13e5588/yapf-0.43.0.tar.gz" + sha256 "00d3aa24bfedff9420b2e0d5d9f5ab6d9d4268e72afbf59bb3fa542781d5218e" + license "Apache-2.0" + head "https://github.com/google/yapf.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "55fb914de2771f27f304ac0b8fcdd5da19472f19ab59f9eacd8431e8dbaa4ec7" + end + + depends_on "python@3.14" + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + def install + virtualenv_install_with_resources + end + + test do + output = pipe_output(bin/"yapf", "x='homebrew'") + assert_equal "x = 'homebrew'", output.strip + end +end diff --git a/Formula/y/yara-x.rb b/Formula/y/yara-x.rb new file mode 100644 index 0000000000000..31db8b411dbc3 --- /dev/null +++ b/Formula/y/yara-x.rb @@ -0,0 +1,58 @@ +class YaraX < Formula + desc "Tool to do pattern matching for malware research" + homepage "https://virustotal.github.io/yara-x/" + url "https://github.com/VirusTotal/yara-x/archive/refs/tags/v1.9.0.tar.gz" + sha256 "e4a2227cb0aa7b189549da36474d579230c791e66a02213636269284704b757b" + license "BSD-3-Clause" + head "https://github.com/VirusTotal/yara-x.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "315c032f97b278dad711b65d2be894e56f2ab5c5ed56117f4fa216aa08bcc391" + sha256 cellar: :any, arm64_sequoia: "8470b7cb7e208be0b6d3dfbfc86b7da3190fa718d239ba9342249af48deec00f" + sha256 cellar: :any, arm64_sonoma: "ea2227534bc4cebc5f4810170519d9c86e56a91ca68fe5611d673d07fa9d671c" + sha256 cellar: :any, sonoma: "c1fb463503e1868ce24e30d2dcc060492ea54a82ffa878f839f5f95ca2e951bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "885e22f6540458ec5702a0448d8d34ca3a5bd3767488f1998e5fca91743c1d74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b62bba2fd19300be0cb65015e49b303cf8e468a4625054006be2489815c0b18" + end + + depends_on "cargo-c" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + system "cargo", "cinstall", "-p", "yara-x-capi", "--jobs", ENV.make_jobs.to_s, "--release", + "--prefix", prefix, "--libdir", lib + + generate_completions_from_executable(bin/"yr", "completion") + end + + test do + # test flow similar to yara + rules = testpath/"commodore.yara" + rules.write <<~EOS + rule chrout { + meta: + description = "Calls CBM KERNEL routine CHROUT" + strings: + $jsr_chrout = {20 D2 FF} + $jmp_chrout = {4C D2 FF} + condition: + $jsr_chrout or $jmp_chrout + } + EOS + + program = testpath/"zero.prg" + program.binwrite [0x00, 0xc0, 0xa9, 0x30, 0x4c, 0xd2, 0xff].pack("C*") + + assert_equal <<~EOS.strip, shell_output("#{bin}/yr scan #{rules} #{program}").strip + chrout #{program} + EOS + + assert_match version.to_s, shell_output("#{bin}/yr --version") + end +end diff --git a/Formula/y/yara.rb b/Formula/y/yara.rb new file mode 100644 index 0000000000000..647b5eae11ffe --- /dev/null +++ b/Formula/y/yara.rb @@ -0,0 +1,67 @@ +class Yara < Formula + desc "Malware identification and classification tool" + homepage "https://github.com/VirusTotal/yara/" + url "https://github.com/VirusTotal/yara/archive/refs/tags/v4.5.5.tar.gz" + sha256 "d38e30fd9c1e1c7921d1c4568262d94f5c2d6b5da139fe49572a43ffbc5c53f6" + license "BSD-3-Clause" + head "https://github.com/VirusTotal/yara.git", branch: "master" + + # Upstream sometimes creates releases that use a stable tag (e.g., `v1.2.3`) + # but are labeled as "pre-release" on GitHub, so it's necessary to use the + # `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "f50c08d6d468502fb468d9401c8087a31ed6e2193b518d9f2497e5306dac3df5" + sha256 cellar: :any, arm64_sequoia: "bed2c8becb6623fc30f867d7399b9b1c8847a0ec40c740cf041ed99adc249aa0" + sha256 cellar: :any, arm64_sonoma: "320fd862a8a32c5ad2ed2b58c6db1dba4ff1869cab0b9f5b0998a1d8b255c4e7" + sha256 cellar: :any, sonoma: "df647efb738f895f459dce114d2f5cd2add6b0013ef1b754256fcd695064ed1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd2508d80b2e65d4e31548677fc7376e225498b09928b1ef3938bc08fc39f801" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b76a81e19bf1ca4a3f073e9c1811107b61b341e4d3bbd7ed2002cbb9c106c13c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "jansson" + depends_on "libmagic" + depends_on "openssl@3" + depends_on "protobuf-c" + + def install + system "./bootstrap.sh" + system "./configure", "--disable-silent-rules", + "--enable-dotnet", + "--enable-cuckoo", + "--enable-magic", + "--enable-macho", + "--enable-dex", + "--with-crypto", + *std_configure_args + system "make", "install" + end + + test do + rules = testpath/"commodore.yara" + rules.write <<~YARA + rule chrout { + meta: + description = "Calls CBM KERNEL routine CHROUT" + strings: + $jsr_chrout = {20 D2 FF} + $jmp_chrout = {4C D2 FF} + condition: + $jsr_chrout or $jmp_chrout + } + YARA + + program = testpath/"zero.prg" + program.binwrite [0x00, 0xc0, 0xa9, 0x30, 0x4c, 0xd2, 0xff].pack("C*") + + assert_equal "chrout #{program}", shell_output("#{bin}/yara #{rules} #{program}").strip + end +end diff --git a/Formula/y/yarn-completion.rb b/Formula/y/yarn-completion.rb new file mode 100644 index 0000000000000..03a62ed02f719 --- /dev/null +++ b/Formula/y/yarn-completion.rb @@ -0,0 +1,25 @@ +class YarnCompletion < Formula + desc "Bash completion for Yarn" + homepage "https://github.com/dsifford/yarn-completion" + url "https://github.com/dsifford/yarn-completion/archive/refs/tags/v0.17.0.tar.gz" + sha256 "cc9d86bd8d4c662833424f86f1f86cfa0516c0835874768d9cf84aaf79fb8b21" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e743fe4680eb970207cd4a05ec2f2482f1c3baf96ae04827b75bffb29afd78be" + end + + depends_on "bash" + + def install + bash_completion.install "yarn-completion.bash" => "yarn" + end + + test do + assert_match "complete -F _yarn yarn", + shell_output("#{Formula["bash"].opt_bin}/bash -c 'source #{bash_completion}/yarn && complete -p yarn'") + end +end diff --git a/Formula/y/yarn.rb b/Formula/y/yarn.rb new file mode 100644 index 0000000000000..5a223b0e2ceb5 --- /dev/null +++ b/Formula/y/yarn.rb @@ -0,0 +1,43 @@ +class Yarn < Formula + desc "JavaScript package manager" + homepage "https://yarnpkg.com/" + url "https://yarnpkg.com/downloads/1.22.22/yarn-v1.22.22.tar.gz" + sha256 "88268464199d1611fcf73ce9c0a6c4d44c7d5363682720d8506f6508addf36a0" + license "BSD-2-Clause" + + livecheck do + skip("1.x line is frozen and features/bugfixes only happen on 2+") + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "edb63a1b15d560263270324b63bee4c2aa8145197636a755436cc14424fc1e12" + end + + depends_on "node" => :test + + conflicts_with "hadoop", because: "both install `yarn` binaries" + + def install + libexec.install buildpath.glob("*") + (bin/"yarn").write_env_script libexec/"bin/yarn.js", PREFIX: HOMEBREW_PREFIX + bin.install_symlink bin/"yarn" => "yarnpkg" + inreplace libexec/"lib/cli.js", "/usr/local", HOMEBREW_PREFIX + inreplace libexec/"package.json", '"installationMethod": "tar"', + "\"installationMethod\": \"#{tap.user.downcase}\"" + end + + def caveats + <<~EOS + yarn requires a Node installation to function. You can install one with: + brew install node + EOS + end + + test do + (testpath/"package.json").write('{"name": "test"}') + system bin/"yarn", "add", "jquery" + # macOS specific package + system bin/"yarn", "add", "fsevents", "--build-from-source=true" if OS.mac? + end +end diff --git a/Formula/y/yash.rb b/Formula/y/yash.rb new file mode 100644 index 0000000000000..2e6557c6442de --- /dev/null +++ b/Formula/y/yash.rb @@ -0,0 +1,40 @@ +class Yash < Formula + desc "Yet another shell: a POSIX-compliant command-line shell" + homepage "https://magicant.github.io/yash/" + url "https://github.com/magicant/yash/releases/download/2.60/yash-2.60.tar.xz" + sha256 "cc152f65221916c508e3ec013edda40028d1f77a9ca3dcf2489ee825fd746f75" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_tahoe: "d057067e099311aa17e39e27de5b8d427560c5f18c21841e1e56dfe6e05194ef" + sha256 arm64_sequoia: "d07182c50d63b77312201b83e672d9c1c8f39510418412a77f8265baf482a222" + sha256 arm64_sonoma: "e0fe15a78087f63f05930f2e4d859b808c847e4481c8b1803d28e0876add8810" + sha256 sonoma: "4e116e5a3c4c45758dfac37d5f18703bb433bc3c67825dfd6f8ba48b69b0553f" + sha256 arm64_linux: "3891c2d9f393df01e31934ae653ca9b3c1d83af9a2ebe6dd685267ecfff85847" + sha256 x86_64_linux: "cbdb21f17951377d4b82635098a78be1489913077cc90a7d43da54a674f99747" + end + + head do + url "https://github.com/magicant/yash.git", branch: "trunk" + + depends_on "asciidoc" => :build + end + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" if build.head? + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"yash", "-c", "echo hello world" + assert_match version.to_s, shell_output("#{bin}/yash --version") + end +end diff --git a/Formula/y/yasm.rb b/Formula/y/yasm.rb new file mode 100644 index 0000000000000..6975425438556 --- /dev/null +++ b/Formula/y/yasm.rb @@ -0,0 +1,119 @@ +class Yasm < Formula + desc "Modular BSD reimplementation of NASM" + # Actual homepage shown below, but currently unreachable: + # homepage "https://yasm.tortall.net/" + homepage "https://www.tortall.net/projects/yasm/manual/html/" + url "https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" + mirror "https://ftp.openbsd.org/pub/OpenBSD/distfiles/yasm-1.3.0.tar.gz" + sha256 "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f" + license all_of: [ + "BSD-2-Clause", + "BSD-3-Clause", + :public_domain, + any_of: ["Artistic-1.0-Perl", "GPL-2.0-or-later", "LGPL-2.0-or-later"], # libyasm/bitvect.c + ] + revision 2 + + livecheck do + url "https://www.tortall.net/projects/yasm/releases/" + regex(/href=["']?yasm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "356cc23650d159d2f22aef89c9f7542efba9297e424a9d2ce1c822f69b352d9f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45b7744e4f66670c270ac4aa64836625a1806db9ac97920476620d340cbbdd96" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8201d94c49a9f010d7b7fa185eb2658484ed9d063b0334baff12659bebb22246" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b59763588b57923ad20c8090a7382aa361efc2503ad788dae648c95f24f410a4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6d1a844ce9a26db6d2a5c72dbced52b7fbfc8491bfde95a2f026eaa1e46433be" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "398b7f3d8a22e43b5af2335fe2d39448a3e9cc7a769ef1faf60c25fda0873d50" + sha256 cellar: :any_skip_relocation, sonoma: "8a459b8a128c82d79a253c164b213a4483c81ded729a4958be000da17b64b893" + sha256 cellar: :any_skip_relocation, ventura: "2cfb5f1ab641c6537a73570eef6ec14bf9f5bbd31d8c1dcc3f8a7233b880df09" + sha256 cellar: :any_skip_relocation, monterey: "8348a13c38c499aa114f71e4d46f311105b68dbafbf0e92f6c19d5b492eed569" + sha256 cellar: :any_skip_relocation, big_sur: "ca95cb3c02508796ff4e60d54146b03016b93e80837916359912ebf737a37562" + sha256 cellar: :any_skip_relocation, catalina: "9aa61930f25fe305dc5364e72f539b0a225702b5f1dc222a9dde1216e901f7ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "915dcddbe7d3b6c170b8055d3f1fbea22fb80fa1a6ca1f0c2876d52cabb2b4d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6d46adb6213bba936b7d62ef9564f752cc5b4268e19e91f0b67e136408ab30e" + end + + head do + url "https://github.com/yasm/yasm.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" + end + + def install + args = %W[ + --disable-debug + --prefix=#{prefix} + --disable-python + ] + + # https://github.com/Homebrew/legacy-homebrew/pull/19593 + ENV.deparallelize + + system "./autogen.sh" if build.head? + system "./configure", *args + system "make", "install" + end + + test do + (testpath/"foo.s").write <<~ASM + mov eax, 0 + mov ebx, 0 + int 0x80 + ASM + system bin/"yasm", "foo.s" + code = File.open("foo", "rb") { |f| f.read.unpack("C*") } + expected = [0x66, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x66, 0xbb, + 0x00, 0x00, 0x00, 0x00, 0xcd, 0x80] + assert_equal expected, code + + if OS.mac? + (testpath/"test.asm").write <<~ASM + global start + section .text + start: + mov rax, 0x2000004 ; write + mov rdi, 1 ; stdout + mov rsi, qword msg + mov rdx, msg.len + syscall + mov rax, 0x2000001 ; exit + mov rdi, 0 + syscall + section .data + msg: db "Hello, world!", 10 + .len: equ $ - msg + ASM + system bin/"yasm", "-f", "macho64", "test.asm" + system "/usr/bin/ld", "-macosx_version_min", "10.8.0", "-static", "-o", "test", "test.o" + assert_match "Mach-O 64-bit object x86_64", shell_output("file test.o") + assert_match "Mach-O 64-bit executable x86_64", shell_output("file test") + else + (testpath/"test.asm").write <<~ASM + global _start + section .text + _start: + mov rax, 1 + mov rdi, 1 + mov rsi, msg + mov rdx, msg.len + syscall + mov rax, 60 + mov rdi, 0 + syscall + section .data + msg: db "Hello, world!", 10 + .len: equ $ - msg + ASM + system bin/"yasm", "-f", "elf64", "test.asm" + system "/usr/bin/ld", "-static", "-o", "test", "test.o" if Hardware::CPU.intel? + end + assert_equal "Hello, world!\n", shell_output("./test") if Hardware::CPU.intel? + end +end diff --git a/Formula/y/yatas.rb b/Formula/y/yatas.rb new file mode 100644 index 0000000000000..3a1f97b2f83f0 --- /dev/null +++ b/Formula/y/yatas.rb @@ -0,0 +1,35 @@ +class Yatas < Formula + desc "Tool to audit AWS/GCP infrastructure for misconfiguration or security issues" + homepage "https://github.com/padok-team/yatas" + url "https://github.com/padok-team/yatas/archive/refs/tags/v1.5.1.tar.gz" + sha256 "53abe26a7025aabf73918e3153c66d91cc5567e2fcd6df388e7c82e36704bd0e" + license "Apache-2.0" + head "https://github.com/padok-team/yatas.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "38a23bdfc24c39424fae9ad0c654b18805b54f7ab481c42161700a55a74cf670" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6e5ba8ff412e6b856410c206db19c24ddbb66ddcaf3ef3052d47b63e11d16974" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e1e7442a54bc2fb49b02ccdffc667bc6a7b1a08d6a16972d694d35d67835f25" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4db5b9d8b52eff80c2c3b6ef4e8ebdd2f206692804b961b1245074c4c0f1dfd8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "219b31d30c3bee4f44eba3fed594d225f548b49b0c2bf9d296903bc5e34d6c32" + sha256 cellar: :any_skip_relocation, sonoma: "0e7132974c379b09fb4fb6f6cce468a97a70864b64b6e8e4783a1065984af1df" + sha256 cellar: :any_skip_relocation, ventura: "42d9961c8cb3b440eec7d5d9cb0d611ac7ec5dde3c1a845aed8a2ba68cd06aee" + sha256 cellar: :any_skip_relocation, monterey: "38b5fbfb98ec19de1f03514fb8f0a6282579590fa2870025bd242bdb9908a490" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd2adbf69a9d5840e85f72f11e8e22fd351251cb6a6ccda1a9d7b9aaa7119cd2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2ca56303f4479b8b29e123412cc62fabe88b188443466e7281f62eeab43d674" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"yatas", "--init" + output = shell_output("#{bin}/yatas --install 2>&1") + assert_match "failed to refresh cached credentials, no EC2 IMDS role found", output + end +end diff --git a/Formula/y/yaws.rb b/Formula/y/yaws.rb new file mode 100644 index 0000000000000..a9dbe649e76ad --- /dev/null +++ b/Formula/y/yaws.rb @@ -0,0 +1,109 @@ +class Yaws < Formula + desc "Webserver for dynamic content (written in Erlang)" + homepage "https://erlyaws.github.io/" + url "https://github.com/erlyaws/yaws/archive/refs/tags/yaws-2.2.0.tar.gz" + sha256 "39318736472c165d4aec769c89ac4edfe3cab7ff7759f32de0a4e699ef6c88e8" + license "BSD-3-Clause" + head "https://github.com/erlyaws/yaws.git", branch: "master" + + livecheck do + url :stable + regex(/yaws[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf81646ec0eecf981a68a3a3f5bab0eeb1f3f9ca5cea5b72ce7186798832d1ef" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a1fbc355b338fa7065c584443271e285bb58a97f06f6ecee0d56463f8ae49c1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f466561d44b576cba8fe45a1005e3ca5cd145c56847b412ee7dfc469941247a0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a98edfa26642f6927f31550e15dc17998536e6642487794f9a8dac03dcdfb5e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e1215945f0993a225b510eec874c9e9422977fadab87ccd69c9f00964145bd31" + sha256 cellar: :any_skip_relocation, sonoma: "78f9aeed03048a8ee5694bb72eeaf63722051ba849262b692f9a280202f4cb7d" + sha256 cellar: :any_skip_relocation, ventura: "46107a726d6a380084466ba19a082db129dc5deee526ac9a0801240e4385bb33" + sha256 cellar: :any_skip_relocation, monterey: "f9a6516efc7a805c785d2a2080dce0bf4c2fc7df5ee7650433d50d97c94acf55" + sha256 cellar: :any_skip_relocation, arm64_linux: "645fba5f0f938d597c54f3341742e6e7f62c56e88b39be42456038625fef62bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf623679c1cb98ce64347d7cd92cb3ebcbfd01c16a149632581da989d112cd26" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "erlang" + + on_linux do + depends_on "linux-pam" + end + + # the default config expects these folders to exist + skip_clean "var/log/yaws" + skip_clean "lib/yaws/examples/ebin" + skip_clean "lib/yaws/examples/include" + + def install + extra_args = if OS.mac? + # Ensure pam headers are found on Xcode-only installs + %W[ + --with-extrainclude=#{MacOS.sdk_path}/usr/include/security + ] + else + %W[ + --with-extrainclude=#{Formula["linux-pam"].opt_include}/security + ] + end + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *extra_args, *std_configure_args + system "make", "install", "WARNINGS_AS_ERRORS=" + + cd "applications/yapp" do + system "make" + system "make", "install" + end + + # the default config expects these folders to exist + (lib/"yaws/examples/ebin").mkpath + (lib/"yaws/examples/include").mkpath + + # Remove Homebrew shims references on Linux + inreplace Dir["#{prefix}/var/yaws/www/*/Makefile"], Superenv.shims_path, "/usr/bin" if OS.linux? + end + + def post_install + (var/"log/yaws").mkpath + (var/"yaws/www").mkpath + end + + test do + user = "user" + password = "password" + port = free_port + + (testpath/"www/example.txt").write <<~EOS + Hello World! + EOS + + (testpath/"yaws.conf").write <<~EOS + logdir = #{mkdir(testpath/"log").first} + ebin_dir = #{mkdir(testpath/"ebin").first} + include_dir = #{mkdir(testpath/"include").first} + + + port = #{port} + listen = 127.0.0.1 + docroot = #{testpath}/www + + realm = foobar + dir = / + user = #{user}:#{password} + + + EOS + spawn bin/"yaws", "-c", testpath/"yaws.conf", "--erlarg", "-noshell" + sleep 6 + + output = shell_output("curl --silent localhost:#{port}/example.txt") + assert_match "401 authentication needed", output + + output = shell_output("curl --user #{user}:#{password} --silent localhost:#{port}/example.txt") + assert_equal "Hello World!\n", output + end +end diff --git a/Formula/y/yaz.rb b/Formula/y/yaz.rb new file mode 100644 index 0000000000000..4713d90ecf12b --- /dev/null +++ b/Formula/y/yaz.rb @@ -0,0 +1,110 @@ +class Yaz < Formula + desc "Toolkit for Z39.50/SRW/SRU clients/servers" + homepage "https://www.indexdata.com/resources/software/yaz/" + url "https://ftp.indexdata.com/pub/yaz/yaz-5.35.1.tar.gz" + sha256 "db030d6d66880398a44215e26132630ee94f5e462d838809e43f97e6399c1353" + license "BSD-3-Clause" + + # The latest version text is currently omitted from the homepage for this + # software, so we have to check the related directory listing page. + livecheck do + url "https://ftp.indexdata.com/pub/yaz/" + regex(/href=.*?yaz[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "8a51c6c51d70b5dfa34a4c634fb1361b26dbc4830760d505dc81b52035733bee" + sha256 cellar: :any, arm64_sequoia: "24497a672f546f23ee52b7ff9b83863795545bd58a0c1561f3f634dcf220da7f" + sha256 cellar: :any, arm64_sonoma: "e37f1921f43470a9a19b506b89f16e8f9b75a9965b8787dd5cf0e4ac28108555" + sha256 cellar: :any, arm64_ventura: "3ea0e0e6977e0a3bf1808e954386310246bdbc908051d9b653687cdd0b64e13b" + sha256 cellar: :any, sonoma: "88022627e10356d887045d2d1be55bde3d09065ece5cbaec875047c748c7598c" + sha256 cellar: :any, ventura: "280d60697fd3cb7fd04fdfb3ee24bd4df75e1de94408db54042d66786a7736a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "403a708cb2e5a97a3702dea76a7b43ef8b23a1974aa6d6eebd8aaf3a07c37dad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b26f737c242d969fa3a4c151fe73e72949af1e049a9f0fefae57533e2db44fe6" + end + + head do + url "https://github.com/indexdata/yaz.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docbook-xsl" => :build + depends_on "libtool" => :build + + uses_from_macos "bison" => :build + uses_from_macos "tcl-tk" => :build + end + + depends_on "pkgconf" => :build + depends_on "gnutls" + depends_on "icu4c@77" + depends_on "readline" # Possible opportunistic linkage. TODO: Check if this can be removed. + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + def install + if build.head? + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "./buildconf.sh" + end + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + system "./configure", "--with-gnutls", + "--with-icu=#{icu4c.opt_prefix}", + "--with-xml2", + "--with-xslt", + *std_configure_args + system "make", "install" + + # Replace dependencies' cellar paths, which can break build for dependents + # (like `metaproxy` and `zebra`) after a dependency is version/revision bumped + inreplace bin/"yaz-config" do |s| + s.gsub! Formula["gnutls"].prefix.realpath, Formula["gnutls"].opt_prefix + s.gsub! icu4c.prefix.realpath, icu4c.opt_prefix + end + unless OS.mac? + inreplace [bin/"yaz-config", lib/"pkgconfig/yaz.pc"] do |s| + s.gsub! Formula["libxslt"].prefix.realpath, Formula["libxslt"].opt_prefix + end + end + end + + test do + # This test converts between MARC8, an obscure mostly-obsolete library + # text encoding supported by yaz-iconv, and UTF8. + marc8file = testpath/"marc8.txt" + marc8file.write "$1!0-!L,i$3i$si$Ki$Ai$O!+=(B" + result = shell_output("#{bin}/yaz-iconv -f marc8 -t utf8 #{marc8file}") + result.force_encoding(Encoding::UTF_8) if result.respond_to?(:force_encoding) + assert_equal "世界こんにちは!", result + + # Test ICU support by running yaz-icu with the example icu_chain + # from its man page. + configfile = testpath/"icu-chain.xml" + configfile.write <<~XML + + + + + + + + + + XML + + inputfile = testpath/"icu-test.txt" + inputfile.write "yaz-ICU xy!" + + expectedresult = <<~EOS + 1 1 'yaz' 'yaz' + 2 1 '' '' + 3 1 'icuz' 'ICUz' + 4 1 '' '' + EOS + + result = shell_output("#{bin}/yaz-icu -c #{configfile} #{inputfile}") + assert_equal expectedresult, result + end +end diff --git a/Formula/y/yaze-ag.rb b/Formula/y/yaze-ag.rb new file mode 100644 index 0000000000000..0624736e02f16 --- /dev/null +++ b/Formula/y/yaze-ag.rb @@ -0,0 +1,51 @@ +class YazeAg < Formula + desc "Yet Another Z80 Emulator (by AG)" + homepage "https://agl.yaze-ag.de/" + url "https://agl.yaze-ag.de/devel/yaze-ag-2.51.3.tar.gz" + sha256 "2b0a90c3bf3a27574b0427cf4579dc2347b371bec3fea5739e1527edf74b2809" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?yaze-ag[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "6e9592d8cca859c7bf9b18bb4adb4a00a24a9476091bb813739b4234897a6edd" + sha256 arm64_sequoia: "bfd9c7701ebbea4917f2874690b38b6c1cf129bc228305dfd64d5e56222d69e3" + sha256 arm64_sonoma: "7c92d3d3d2b899192243ca7951d22183d4f2ebdcc5ab999c51742797b5f52d7d" + sha256 arm64_ventura: "dfde75b6e01c854c6e368e7c0b1e6ad1041595c7f7c3c4564aee651a3db1e239" + sha256 arm64_monterey: "e16e79f90ea2bc48a220d2e4d3ce8e72acefe6a3f6382709d1d69b0cc4e0f221" + sha256 arm64_big_sur: "51ce224af28b3929a4b8563aa0cc740cbb43e7e2b5a31c6c0cfa502b52e200b3" + sha256 sonoma: "88b88954163db83c780d9c7ffcde401ed9b4e5d14a492fb61565c17ea7ba3a32" + sha256 ventura: "ecf38a592bc940d4e02215feb31d7525600d86cbdc526c9830dcbb30ad64b9f4" + sha256 monterey: "0b4e934e85cea0db946cf6df95393be56e2e330665786fde9437e091197379d9" + sha256 big_sur: "32ef5add9479aef13177444a6a148e1fb2ae9719f2b043b1c235804b461f3e84" + sha256 catalina: "4954f1099ce8a6ed84a8f074221f4bd75a7abcc8e6303c733ff02221651f36bd" + sha256 arm64_linux: "fe1573637f8de598f6aa135717d263ddbb580d7a5ab5e8295e7bef85ce5b8109" + sha256 x86_64_linux: "7a3cfeda8e67249ed33bdc5c6d37c037895967530f1f416cb8dbe908cfb922fe" + end + + conflicts_with "cpm", because: "both install `cpm` binaries" + + def install + if OS.mac? + inreplace "Makefile_solaris_gcc-x86_64", "md5sum -b", "md5" + inreplace "Makefile_solaris_gcc-x86_64", /(LIBS\s+=\s+-lrt)/, '#\1' + end + + bin.mkpath + system "make", "-f", "Makefile_solaris_gcc-x86_64", + "BINDIR=#{bin}", + "MANDIR=#{man1}", + "LIBDIR=#{lib}/yaze", + "install" + end + + test do + (testpath/"cpm").mkpath + assert_match "yazerc", shell_output("#{bin}/yaze -v", 1) + end +end diff --git a/Formula/y/yazi.rb b/Formula/y/yazi.rb new file mode 100644 index 0000000000000..a89a7d14d449e --- /dev/null +++ b/Formula/y/yazi.rb @@ -0,0 +1,49 @@ +class Yazi < Formula + desc "Blazing fast terminal file manager written in Rust, based on async I/O" + homepage "https://github.com/sxyazi/yazi" + url "https://github.com/sxyazi/yazi/archive/refs/tags/v25.5.31.tar.gz" + sha256 "4d005e7c3f32b5574d51ab105597f3da3a4be2f7b5cd1bcb284143ad38253ed4" + license "MIT" + head "https://github.com/sxyazi/yazi.git", branch: "main" + + # There can be a notable gap between when a version is tagged and a + # corresponding release is created, so we check the "latest" release instead + # of the Git tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "17380d2a5e88efbc19f9b0ce24f82abd130d524faceaeb7ea66df68a1c0787e4" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "55ae93d2fd850112f783f4052e4246bdc0d978717bf128afffaee1386c367fbe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f068f0631c6431fd36de113d88875a0ac10875f6cabc08f19251cab578a6fa97" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66a6dd96dd47205f720454d129eb74bd483137f7aef9c166f4b041cbf045345d" + sha256 cellar: :any_skip_relocation, sonoma: "4cba596dd9ee6335a7424596fab979a3845877c87fb3bd7b3259b30f11e17517" + sha256 cellar: :any_skip_relocation, ventura: "1b00c00a1d6ebb2f02badd0a37610674ea71e7f954fcecdec2568e58e3374709" + sha256 cellar: :any_skip_relocation, arm64_linux: "8abea4a36aaa705edd6ef655ce3d24fc58346ac1ddf041e85589b2ce352ed23f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "961112614f3d0ec7052085aa2208e299cdf00002454c04777ef703fd5eb38837" + end + + depends_on "rust" => :build + + def install + ENV["VERGEN_GIT_SHA"] = tap.user + ENV["YAZI_GEN_COMPLETIONS"] = "1" + system "cargo", "install", *std_cargo_args(path: "yazi-fm") + system "cargo", "install", *std_cargo_args(path: "yazi-cli") + + bash_completion.install "yazi-boot/completions/yazi.bash" => "yazi" + zsh_completion.install "yazi-boot/completions/_yazi" + fish_completion.install "yazi-boot/completions/yazi.fish" + + bash_completion.install "yazi-cli/completions/ya.bash" => "ya" + zsh_completion.install "yazi-cli/completions/_ya" + fish_completion.install "yazi-cli/completions/ya.fish" + end + + test do + # yazi is a GUI application + assert_match "Yazi #{version}", shell_output("#{bin}/yazi --version").strip + end +end diff --git a/Formula/y/yazpp.rb b/Formula/y/yazpp.rb new file mode 100644 index 0000000000000..776fe9718aa34 --- /dev/null +++ b/Formula/y/yazpp.rb @@ -0,0 +1,62 @@ +class Yazpp < Formula + desc "C++ API for the Yaz toolkit" + homepage "https://www.indexdata.com/resources/software/yazpp/" + url "https://ftp.indexdata.com/pub/yazpp/yazpp-1.9.0.tar.gz" + sha256 "17aa0f5b45edbfa9ee0363cb3b684e895d3d05e74024384d6c8707875621dcfc" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.indexdata.com/pub/yazpp/" + regex(/href=.*?yazpp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "1282e706247f55d29fd6ae7db1132e0360339d64b7641d7a539cba08b6474532" + sha256 cellar: :any, arm64_sequoia: "3db462397a75847cfe8f47b63a8e72357aeb56c3e6ad39f1e56f961fa6c67031" + sha256 cellar: :any, arm64_sonoma: "8a0413a93b0784924650e2e642e5044b3547361916ca81e4231828ce24ce3322" + sha256 cellar: :any, arm64_ventura: "de090b1f94e5f04a32d266054df63e033d664af6baf02d70be02ee13ca2d2736" + sha256 cellar: :any, sonoma: "9a5bc3ac4c69833f33f9712a26d823c1f99348fec776a63eb04c1bf1b9cdc5d9" + sha256 cellar: :any, ventura: "41e4fc7540a5215ad4e4eff87779f604723adefc05223b4f16041fabdfe0723d" + sha256 cellar: :any_skip_relocation, arm64_linux: "90e01abea34f80017b98c621560c31326b42fc4abb0668b84e943117918e1ce6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fadea04212654ddcc34aa0a5bf5127f6c53a652c21d98a52b168c584e3a3fccc" + end + + depends_on "yaz" + + def install + ENV.cxx11 if OS.linux? # due to `icu4c` dependency in `libxml2` + system "./configure", *std_configure_args + system "make", "install" + + # Replace `yaz` cellar paths, which break on `yaz` version or revision bumps + inreplace bin/"yazpp-config", Formula["yaz"].prefix.realpath, Formula["yaz"].opt_prefix + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + using namespace ZOOM; + + int main(int argc, char **argv){ + try + { + connection conn("wrong-example.xyz", 210); + } + catch (exception &e) + { + std::cout << "Exception caught"; + } + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}/src", + "-L#{lib}", "-lzoompp", "-o", "test" + output = shell_output("./test") + assert_match "Exception caught", output + end +end diff --git a/Formula/y/yconalyzer.rb b/Formula/y/yconalyzer.rb new file mode 100644 index 0000000000000..cbc24439f9d45 --- /dev/null +++ b/Formula/y/yconalyzer.rb @@ -0,0 +1,44 @@ +class Yconalyzer < Formula + desc "TCP traffic analyzer" + homepage "https://sourceforge.net/projects/yconalyzer/" + url "https://downloads.sourceforge.net/project/yconalyzer/yconalyzer-1.0.4.tar.bz2" + sha256 "3b2bd33ffa9f6de707c91deeb32d9e9a56c51e232be5002fbed7e7a6373b4d5b" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f8e293d34a2bfead5ac9adc620c89fa89f551e4ece73f6a1df952b7f6ab960b5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f09a5c77a631fe4cf72c038f9196324faa22a94e9bf1513a864f65a6ef6eea54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4b3b2df279f4e0c6670d7c297de869f270b195a3911d2d7887920150be40dcd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4b34ab4323a8d42637c2b41ee0f30f76200bc29070a31db211f36d96e2522e4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cc908152c7c95c1f6849997b3f3ef3ea58dd1f4093b03a6d043ddaf0ed272156" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "58d53e3cef900391c6b010c6e5e7a8643630155947068b9755bed061b46c94c7" + sha256 cellar: :any_skip_relocation, sonoma: "afb4f1f6d116174d7345045938dada5ab9f81910c7ac39d663c7308b1cdfc3ae" + sha256 cellar: :any_skip_relocation, ventura: "91f17d0dc4ebdef21e2905a8f6ba20d465fd42b923904ff7ef86ff65a2f4c335" + sha256 cellar: :any_skip_relocation, monterey: "b44aa7bbb2dafbe58a1db1f4dfe228fc2cf7719e79f449185577817090d3a1a7" + sha256 cellar: :any_skip_relocation, big_sur: "2e6c3b8964a0feb62dc624f9359bd48e44c07929b1952c36fbc4d05be76ef871" + sha256 cellar: :any_skip_relocation, catalina: "2e834b5134e7670fc97cb45131b732a7dc7a6f41598dacb20dd65b575713dc16" + sha256 cellar: :any_skip_relocation, arm64_linux: "ceb7984dedb18edb2dcd60885d5cb626ce8217ebc2b11246ed47af4eeb5bdee5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c416d91d76c10a6331d9703d23597b5e03fb67c97155247cb6e5e3f852f89953" + end + + uses_from_macos "libpcap" + + # Fix build issues issue on OS X 10.9/clang + # Patch reported to upstream - https://sourceforge.net/p/yconalyzer/bugs/3/ + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/yconalyzer/1.0.4.patch" + sha256 "a4e87fc310565d91496adac9343ba72841bde3b54b4996e774fa3f919c903f33" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make" + chmod 0755, "./install-sh" + system "make", "install" + end +end diff --git a/Formula/y/yder.rb b/Formula/y/yder.rb new file mode 100644 index 0000000000000..a73bb921a9690 --- /dev/null +++ b/Formula/y/yder.rb @@ -0,0 +1,62 @@ +class Yder < Formula + desc "Logging library for C applications" + homepage "https://babelouest.github.io/yder/" + url "https://github.com/babelouest/yder/archive/refs/tags/v1.4.20.tar.gz" + sha256 "c1a7f2281514d0d0bba912b6b70f371d8c127ccfd644b8c438c9301a0fd4c5f2" + license "LGPL-2.1-only" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "9f885260fb16abe855f8334ab2c1b6bddaf032e7e19e1a119bf9ba6280b8e784" + sha256 cellar: :any, arm64_sequoia: "742de6bb638644e32ac9153a26fb2cecbaa8575b765ab4166221389efc71b80e" + sha256 cellar: :any, arm64_sonoma: "17f19f57371282f824f622fbc956fbdb620cc2f41558e2b7a046ee80afab7594" + sha256 cellar: :any, arm64_ventura: "1a40a4adeff343167112cb5887cf8e91bfdcad589eb56197d4b3ceffa38ac6c0" + sha256 cellar: :any, arm64_monterey: "4619ff198f36c61f6f6602cb33ef2f440eb69d694fcd9cad88f8f9d82db9d028" + sha256 cellar: :any, arm64_big_sur: "e51598adfcc0c641c45d1e607273facdb5bc0e5cc094433e65fe572d9f94a324" + sha256 cellar: :any, sonoma: "699d2dad4ab3e4ee74be1e3a65e31cfa803efda441726b7f246ce7f77c69b647" + sha256 cellar: :any, ventura: "b97d5bf7aed879840df320ee2882d84553578332e362cb21cc1e84d178c1da66" + sha256 cellar: :any, monterey: "87580769714792e35280df4f0980713d5ddf488df13255ce7622e1f99b7549b0" + sha256 cellar: :any, big_sur: "03aad7c58b6f0986ff11160e37bca013eabcf67673f01d4c667b603e1820ebf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "94e170cd9620c2ca378cd7e30d6638c2a7dad5c662757cf6121f5810f1f4b3df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1b907e430a7ac5a0b6c610655f0254943c3c3f4b0e1a31e59bb787223d4872b" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "orcania" + + on_linux do + depends_on "systemd" + end + + def install + args = %w[ + -DDINSTALL_HEADER=ON + -DDBUILD_YDER_DOCUMENTATION=ON + ] + + args << "-DWITH_JOURNALD=OFF" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + y_init_logs("HelloYder", Y_LOG_MODE_CONSOLE, Y_LOG_LEVEL_DEBUG, NULL, "Starting Hello World with Yder"); + y_log_message(Y_LOG_LEVEL_INFO, "Hello, World!"); + y_close_logs(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lyder", "-o", "test" + system "./test" + end +end diff --git a/Formula/y/ydiff.rb b/Formula/y/ydiff.rb new file mode 100644 index 0000000000000..7e09467c2f38c --- /dev/null +++ b/Formula/y/ydiff.rb @@ -0,0 +1,26 @@ +class Ydiff < Formula + include Language::Python::Virtualenv + + desc "View colored diff with side by side and auto pager support" + homepage "https://github.com/ymattw/ydiff" + url "https://files.pythonhosted.org/packages/63/d4/578eb2bf5ba1ce874a854d0f926fdce8c413ba29c973e53ea60b48fdced6/ydiff-1.4.2.tar.gz" + sha256 "369be623dcde7954d98973fb9db1780d64f0353982bf3ac85818f3d62ff452b0" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "83b7473ff6a65ac5ee2e026018a0c4f0a997886362ebbf9a075dab857ab15433" + end + + depends_on "python@3.14" + + def install + virtualenv_install_with_resources + end + + test do + diff_fixture = test_fixtures("test.diff").read + assert_equal diff_fixture, + pipe_output("#{bin}/ydiff -cnever", diff_fixture) + end +end diff --git a/Formula/y/yeet.rb b/Formula/y/yeet.rb new file mode 100644 index 0000000000000..6ca5768866d37 --- /dev/null +++ b/Formula/y/yeet.rb @@ -0,0 +1,36 @@ +class Yeet < Formula + desc "Packaging tool that lets you declare build instructions in JavaScript" + homepage "https://github.com/TecharoHQ/yeet" + url "https://github.com/TecharoHQ/yeet/archive/refs/tags/v0.6.3.tar.gz" + sha256 "0612a087867ef79e0737fcba46e2e87074a9520d5dba57e5e906b8a00594f518" + license "MIT" + head "https://github.com/TecharoHQ/yeet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e3e5f2b58c00ec6b5eb907a1ac8d60f79a408fd7fe61973d4b81263b9a4aa0e2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3dc5b3f4ea0d5edbf1dac8696a9d9e11bd334dcc3c9e7ae5b5f152e8f8d601fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3dc5b3f4ea0d5edbf1dac8696a9d9e11bd334dcc3c9e7ae5b5f152e8f8d601fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3dc5b3f4ea0d5edbf1dac8696a9d9e11bd334dcc3c9e7ae5b5f152e8f8d601fc" + sha256 cellar: :any_skip_relocation, sonoma: "18f56dcbe60a642672a190b31beb9ae884b0bbdb040998582a008241b209eab3" + sha256 cellar: :any_skip_relocation, ventura: "18f56dcbe60a642672a190b31beb9ae884b0bbdb040998582a008241b209eab3" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bf582062d141f02da51264b318b0920976f37489ee22375f34fa931aa7f9a84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc534d2cf20d04fd6db81eff080e71c3457bf1e95d8c3d1b56363941de6a3ec0" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/TecharoHQ/yeet.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/yeet" + end + + test do + assert_match version.to_s, shell_output("#{bin}/yeet -version") + + output = "open yeetfile.js: no such file or directory" + assert_match output, shell_output("#{bin}/yeet 2>&1", 1) + end +end diff --git a/Formula/y/yek.rb b/Formula/y/yek.rb new file mode 100644 index 0000000000000..64febc83477f6 --- /dev/null +++ b/Formula/y/yek.rb @@ -0,0 +1,51 @@ +class Yek < Formula + desc "Fast Rust based tool to serialize text-based files for LLM consumption" + homepage "https://github.com/bodo-run/yek" + url "https://github.com/bodo-run/yek/archive/refs/tags/v0.25.0.tar.gz" + sha256 "ecbdf29ba2955fc33c4e43b3177577a08b05435523b1849924ec10605d2632bf" + license "MIT" + head "https://github.com/bodo-run/yek.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ac829ae377e2e7b82f3bc006de4466d2d772d3f9acbe78c4af3b69cd5ce59972" + sha256 cellar: :any, arm64_sequoia: "855b82000b222556ebcfe76a601a01947556d00d02cbd6174284ac428dd83af1" + sha256 cellar: :any, arm64_sonoma: "16ad7af378996899494b182ca0dfa80b208c9d74e91518eceaddad2f602996f1" + sha256 cellar: :any, sonoma: "ead185f22c47d3c306f5c3caee1f8d8a495d68ac2fa4d82d2e67c4283c4611b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "8475649002f88a15bac8a83587e8e704d5e5a657de823886f6b46727c2a61a9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92e9ac6bee5dff5a363d8e19c6973a335381ee65a999612094d9adcc844ec5a5" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "openssl@3" + uses_from_macos "zlib" + + def install + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/yek --version") + + (testpath/"main.c").write <<~C + #include + #include + + int main(void) { + printf("%s\n", "Hello, world!"); + return EXIT_SUCCESS; + } + C + expected_file = shell_output("#{bin}/yek --output-dir #{testpath}") + assert_match ">>>> main.c", expected_file + end +end diff --git a/Formula/y/yelp-tools.rb b/Formula/y/yelp-tools.rb new file mode 100644 index 0000000000000..a6b882f388415 --- /dev/null +++ b/Formula/y/yelp-tools.rb @@ -0,0 +1,78 @@ +class YelpTools < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Tools that help create and edit Mallard or DocBook documentation" + homepage "https://gitlab.gnome.org/GNOME/yelp-tools" + url "https://download.gnome.org/sources/yelp-tools/42/yelp-tools-42.1.tar.xz" + sha256 "3e496a4020d4145b99fd508a25fa09336a503a4e8900028421e72c6a4b11f905" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 6 + sha256 cellar: :any, arm64_tahoe: "7cc5521c969220f384b20411deb90d5e05f1d178d8203a52303ce5a89d38ab82" + sha256 cellar: :any, arm64_sequoia: "772ad45116fc15ae25475b985b6248b4c3c18c78116f012864c62aec91fca64f" + sha256 cellar: :any, arm64_sonoma: "5a3a6c2a52bbae96adc5eaebe69181fd4b4451d2626deca6008dd012b1e54ca8" + sha256 cellar: :any, sonoma: "2afea63853c934f240b83e6a48e83a107259c812a13e2725b033cc98ae0618f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "8186b8958c98951dade64261639e1964cd136c2e806bd9eebce23fd6d0bef8a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9d7a219224a7171620bf7f88e571a7c2af1bf887601012691817c420f2f7361" + end + + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "itstool" + depends_on "libxml2" + depends_on "python@3.14" + + uses_from_macos "libxslt" + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "yelp-xsl" do + url "https://download.gnome.org/sources/yelp-xsl/42/yelp-xsl-42.1.tar.xz" + sha256 "238be150b1653080ce139971330fd36d3a26595e0d6a040a2c030bf3d2005bcd" + end + + resource "mallard-rng" do + url "https://deb.debian.org/debian/pool/main/m/mallard-rng/mallard-rng_1.1.0.orig.tar.bz2" + sha256 "66bc8c38758801d5a1330588589b6e81f4d7272a6fbdad0cd4cfcd266848e160" + end + + def install + resource("mallard-rng").stage do + system "./configure", "--disable-silent-rules", *std_configure_args(prefix: libexec) + system "make", "install" + end + + resource("yelp-xsl").stage do + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + ENV.append_path "PKG_CONFIG_PATH", share/"pkgconfig" + end + + venv = virtualenv_create(libexec, "python3.14") + venv.pip_install resource("lxml") + ENV.prepend_path "PATH", venv.root/"bin" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children + + xml_catalog_files = libexec/"etc/xml/mallard/catalog" + bin.env_script_all_files(libexec/"bin", XML_CATALOG_FILES: "${XML_CATALOG_FILES:-#{xml_catalog_files}}") + end + + test do + system bin/"yelp-new", "task", "ducksinarow" + system bin/"yelp-build", "html", "ducksinarow.page" + system bin/"yelp-check", "validate", "ducksinarow.page" + end +end diff --git a/Formula/y/yetris.rb b/Formula/y/yetris.rb new file mode 100644 index 0000000000000..3567a8ded567c --- /dev/null +++ b/Formula/y/yetris.rb @@ -0,0 +1,35 @@ +class Yetris < Formula + desc "Customizable Tetris for the terminal" + homepage "https://github.com/alexdantas/yetris" + url "https://github.com/alexdantas/yetris/archive/refs/tags/v2.3.0.tar.gz" + sha256 "720c222325361e855e2dcfec34f8f0ae61dd418867a87f7af03c9a59d723b919" + license "GPL-3.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20e107c4ccac64993e5c8f794bc50299d759df2b0b9badab5d0a5ec2708cfc04" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5358a7a07d701232e1a75a4b28f2e66879d973ef3eb9c848552347505f16ea2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c29c804faf6d9d78ecec1eeccc4ffe85e94550c222bba9e793e307f805c1d97" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bde6f3b8d260bc2b35e850b59223578400c2fda5e97e1ef4b425eb446f9b68b3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0aa127e1a907e08cf4b65d83fe0de8c59785457f744ecc2c1e91fd37310037b5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bcaafa1c4c02615a805d252ce93cf8c38a60876b575867cc280795a00a1f2848" + sha256 cellar: :any_skip_relocation, sonoma: "7ccd8bfcdeb653c72ebfb085887255edba5547412e29462eb72b9c395257e4a7" + sha256 cellar: :any_skip_relocation, ventura: "c1d76e812f2a403dd078b3a0b075b48a21721c629b94b4be83874147b3f4b787" + sha256 cellar: :any_skip_relocation, monterey: "78e274470e8eb080f6d8c7d0051f4e7f0ee7f7969c88c725a114b39b7f926778" + sha256 cellar: :any_skip_relocation, big_sur: "d0d9c0ddd6f7f825024cb4e96978ad43919eb77a216e8788943f1c8d7bfa80bb" + sha256 cellar: :any_skip_relocation, catalina: "a43b346adc20fc7d4f84ec1300e839bb4e615ab40ccf8e1a591f099092ad6078" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f5e4bda0d6d949df4cb5b4fa0bd5adb552ec9752e34cbf9f7c106342877f108" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0d2652ce4673ff9e663dba05e742ff8d0eff4366216c49a051d94df041498a2" + end + + uses_from_macos "ncurses" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match "v#{version}", shell_output("#{bin}/yetris --version") + end +end diff --git a/Formula/y/yewtube.rb b/Formula/y/yewtube.rb new file mode 100644 index 0000000000000..bef86d02731ff --- /dev/null +++ b/Formula/y/yewtube.rb @@ -0,0 +1,110 @@ +class Yewtube < Formula + include Language::Python::Virtualenv + + desc "Terminal based YouTube player and downloader" + homepage "https://github.com/mps-youtube/yewtube" + url "https://github.com/mps-youtube/yewtube/archive/refs/tags/v2.12.1.tar.gz" + sha256 "012c1a8a185dd4ef81074631bca91e327ac4e634b36301a50ffbcd67838b847f" + license "GPL-3.0-or-later" + revision 3 + head "https://github.com/mps-youtube/yewtube.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "64faa795f0284318e4f8b3a21f2af5cb756aa66c8b4323e408923793ffe8dab2" + end + + depends_on "certifi" + depends_on "ffmpeg" + depends_on "mplayer" + depends_on "python@3.14" + + pypi_packages exclude_packages: "certifi" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/f1/b4/636b3b65173d3ce9a38ef5f0522789614e590dab6a8d505340a4efe4c567/anyio-4.10.0.tar.gz" + sha256 "3f3fae35c96039744587aa5b8371e7e8e603c0702999535961dd336026973ba6" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/78/82/08f8c936781f67d9e6b9eeb8a0c8b4e406136ea4c3d1f89a5db71d42e0e6/httpx-0.27.2.tar.gz" + sha256 "f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "pylast" do + url "https://files.pythonhosted.org/packages/44/f1/bfd2cc8d67fcc0870e729e1e223fe0359ef94c9b9b98fdb78710d523464c/pylast-5.5.0.tar.gz" + sha256 "b6e95cf11fb99779cd451afd5dd68c4036c44f88733cf2346ba27317c1869da4" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "youtube-search-python" do + url "https://files.pythonhosted.org/packages/91/3c/dc669b0308e49f294df67bddbb16ff3eefe5b5da6fa37ead922a8301926b/youtube-search-python-1.6.6.tar.gz" + sha256 "4568d1d769ecd7eb4bb8365f04eec6e364c5f70eec7b3765f543daebb135fcf5" + end + + resource "yt-dlp" do + url "https://files.pythonhosted.org/packages/40/98/b077bebdc5c759a3f7af3ed3a2a5345ad1145c61963b476469b840ac84ce/yt_dlp-2025.8.22.tar.gz" + sha256 "d1846bbb7edbcd2a0d4a2d76c7a2124868de9ea3b3959a8cb8219e3f7cb5c335" + end + + def install + virtualenv_install_with_resources + + # Build an `:all` bottle by adding a file only used in linux to macos + (libexec/"share/applications").install "yewtube.desktop" if OS.mac? + end + + def caveats + <<~EOS + Install the optional mpv app with Homebrew Cask: + brew install --cask mpv + EOS + end + + test do + console = fork do + assert_match "checkupdate set to False", shell_output("#{bin}/yt set checkupdate false") + end + sleep 1 + Process.kill("TERM", console) + end +end diff --git a/Formula/y/yh.rb b/Formula/y/yh.rb new file mode 100644 index 0000000000000..2c25df2a91852 --- /dev/null +++ b/Formula/y/yh.rb @@ -0,0 +1,36 @@ +class Yh < Formula + desc "YAML syntax highlighter to bring colours where only jq could" + homepage "https://github.com/andreazorzetto/yh" + url "https://github.com/andreazorzetto/yh/archive/refs/tags/v0.4.0.tar.gz" + sha256 "78ef799c500c00164ea05aacafc5c34dccc565e364285f05636c920c2c356d73" + license "Apache-2.0" + head "https://github.com/andreazorzetto/yh.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "e86e1650543e20f82c853e9f33f44dfa71ff7856fed04e03d9b40db36991546a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37b637b99befa6608662694e5100828cf4ad50a9513e57cae75febfd04e9fc96" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4719f7e1a8166248cf84ac5efe7d8bf0df277a08ed4cba8e1b071f87622dfb67" + sha256 cellar: :any_skip_relocation, arm64_ventura: "676027b73d92187c5394037264a16c8b1e5c175e0619db4d26b4eef92ea224d7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d48312b6e67ee8a4bd548dcbb392a296310bc7100cda5072fdd85cf700defc87" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1c7d591013f9ba22f605f81f1f058c3377f4125ef1d0f990651e9cdd12805cdc" + sha256 cellar: :any_skip_relocation, sonoma: "9a65aaf84b0fb6c01d149ac73bc527f00317c716f472b650d3d1515b0ae5fa71" + sha256 cellar: :any_skip_relocation, ventura: "26c0d39a156eb0dfe843e5fe5a70ff7d6e83caa2198fcb6b9f9c859829504ed3" + sha256 cellar: :any_skip_relocation, monterey: "ea039f653c085836860511f1f626f9d9be4848b455b7019f8a52556721cfbfe0" + sha256 cellar: :any_skip_relocation, big_sur: "e8165967a843d90d96ed71a41b303b7b434cf855e1e456d428c694aeceeee737" + sha256 cellar: :any_skip_relocation, catalina: "1a2425d399a63df18758dfabf9d50da2559fb489c32bfb4462d7437f64fc0817" + sha256 cellar: :any_skip_relocation, arm64_linux: "a31f46802b6d13d9e654ceef943f861c8c06d44a5c92385df91f942f0e610d43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d24c1a925e08cc62ccb741d0587e59fb79c76a34b4b5b23599c51fa58ad6dd2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + assert_equal "\e[91mfoo\e[0m: \e[33mbar\e[0m\n", pipe_output(bin/"yh", "foo: bar") + end +end diff --git a/Formula/y/yices2.rb b/Formula/y/yices2.rb new file mode 100644 index 0000000000000..739abcdeb251a --- /dev/null +++ b/Formula/y/yices2.rb @@ -0,0 +1,54 @@ +class Yices2 < Formula + desc "Yices SMT Solver" + homepage "https://yices.csl.sri.com/" + url "https://github.com/SRI-CSL/yices2/archive/refs/tags/yices-2.7.0.tar.gz" + sha256 "584db72abf6643927b2c3ba98ff793f602216b452b8ff2f34a8851d35904804a" + license "GPL-3.0-only" + head "https://github.com/SRI-CSL/yices2.git", branch: "master" + + livecheck do + url :stable + regex(/^Yices[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "2df989805c717cb45574f0bf1d84eabdec50cf4d5748a9f1f8bdbf0cde5c9fa2" + sha256 cellar: :any, arm64_sequoia: "d94ae8d40c3a882393d36e3f868f9dde59c24beb2202b483063a5185075139ee" + sha256 cellar: :any, arm64_sonoma: "c250094bd74818ddb24ea16c6ebe228f2b096e2cfad0823e81c15968cd8bb915" + sha256 cellar: :any, arm64_ventura: "acb1d683ad88ff73884a8763b4be8a6a8ef2191e1e0c9bb4f1148ad567b6fe9f" + sha256 cellar: :any, sonoma: "a96677d6a211fad706027741156659a27248c92cfdc551af54320447b60c6541" + sha256 cellar: :any, ventura: "43e43decf3e87e3f9d0dea527de3716dfe4bebeae53f284770febd4e999a5d1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c7c20fd75460a7097c96078649acb02fce6c2d0a51612e87c2f2471840358c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2509483f7fa18241b1a4005a408ec700e5c4e5c567e0e63d6f7f1f783b179bbc" + end + + depends_on "autoconf" => :build + depends_on "gperf" => :build + depends_on "gmp" + + def install + system "autoconf" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"lra.smt2").write <<~EOF + ;; QF_LRA = Quantifier-Free Linear Real Arithmetic + (set-logic QF_LRA) + ;; Declare variables x, y + (declare-fun x () Real) + (declare-fun y () Real) + ;; Find solution to (x + y > 0), ((x < 0) || (y < 0)) + (assert (> (+ x y) 0)) + (assert (or (< x 0) (< y 0))) + ;; Run a satisfiability check + (check-sat) + ;; Print the model + (get-model) + EOF + output = shell_output("#{bin}/yices-smt2 #{testpath}/lra.smt2") + assert_match "sat\n((define-fun x () Real 2.0)\n (define-fun y () Real (- 1.0)))\n", output + end +end diff --git a/Formula/y/yj.rb b/Formula/y/yj.rb new file mode 100644 index 0000000000000..86bfe41f3f3ad --- /dev/null +++ b/Formula/y/yj.rb @@ -0,0 +1,37 @@ +class Yj < Formula + desc "CLI to convert between YAML, TOML, JSON and HCL" + homepage "https://github.com/sclevine/yj" + url "https://github.com/sclevine/yj/archive/refs/tags/v5.1.0.tar.gz" + sha256 "9a3e9895181d1cbd436a1b02ccf47579afacd181c73f341e697a8fe74f74f99d" + license "Apache-2.0" + head "https://github.com/sclevine/yj.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c01fa70288a168e3dbe1226d319751eca7fe9a8246c51259f3b4f76ae067a5bc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "71786086bcb09233fdf3ac0df85662d4bc72a897a96456f170e69b047042f56d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b768047213c8d89fbf913d6a7558bc7375b2bb212c3de790dc818f4b5220886" + sha256 cellar: :any_skip_relocation, arm64_ventura: "629640c9e3caf08148948158d044817e212a3274ec40af248d2cd14151ecfe7c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6006ef14b2246ac63c166b0c2e7ddd59265ab3e38d46d3f6373e4a9c33897000" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6006ef14b2246ac63c166b0c2e7ddd59265ab3e38d46d3f6373e4a9c33897000" + sha256 cellar: :any_skip_relocation, sonoma: "885d25edb0f227eb7eaf5093a187fd46f98a082b131a27e9953c6e1f19cbef81" + sha256 cellar: :any_skip_relocation, ventura: "568b374d40bd5a4826fad11c89c40f0fded5a14aedfac2d7d5fc85a90770e530" + sha256 cellar: :any_skip_relocation, monterey: "5171d044ed87a081eaa9cf71a7acad2bede581c9b451a0f21b3908e4d2e45105" + sha256 cellar: :any_skip_relocation, big_sur: "5171d044ed87a081eaa9cf71a7acad2bede581c9b451a0f21b3908e4d2e45105" + sha256 cellar: :any_skip_relocation, catalina: "5171d044ed87a081eaa9cf71a7acad2bede581c9b451a0f21b3908e4d2e45105" + sha256 cellar: :any_skip_relocation, arm64_linux: "61d9ed575a78bd459f308817a76f8078a6d1e5742609e8ea8d7d2d921309c6fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca06f08696b263564c3f22ad114cca8863eb06f805a83c6b5fbf4134854a0413" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match '{"a":1}', pipe_output("#{bin}/yj -t", "a=1") + end +end diff --git a/Formula/y/ykdl.rb b/Formula/y/ykdl.rb new file mode 100644 index 0000000000000..45b796cb7362f --- /dev/null +++ b/Formula/y/ykdl.rb @@ -0,0 +1,46 @@ +class Ykdl < Formula + include Language::Python::Virtualenv + + desc "Video downloader that focus on China mainland video sites" + homepage "https://github.com/LifeActor/ykdl" + url "https://files.pythonhosted.org/packages/f2/27/f4e7616a139c84a04edb7778db2b3cfb77348ab73020ff232b6551fa8bdd/ykdl-1.8.2.tar.gz" + sha256 "c689b8e4bf303d1582e40d5039539a1a754f7cf897bce73ec57c7e874e354b19" + license "MIT" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "dcfdd44c710a9891af4829313a096befb361c2708ede5fede7569a7b3f74c7c5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "064f73209fcb6b73b9cc7fbb53b6b50af4a409c07f8ae1cf4ec03b625ecea5fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e596fdb73331b055055570d42b4199feeb9591dc7ad6b2052abe1ac0141b828" + sha256 cellar: :any_skip_relocation, sonoma: "064f73209fcb6b73b9cc7fbb53b6b50af4a409c07f8ae1cf4ec03b625ecea5fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "064f73209fcb6b73b9cc7fbb53b6b50af4a409c07f8ae1cf4ec03b625ecea5fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcfdd44c710a9891af4829313a096befb361c2708ede5fede7569a7b3f74c7c5" + end + + depends_on "python@3.14" + + resource "jsengine" do + url "https://files.pythonhosted.org/packages/bc/0a/1321515de90de02f9c98ac12dfa9763ae93d658ed662261758dc5e902986/jsengine-1.0.7.post1.tar.gz" + sha256 "2d0d0dcb46d5cb621f21ea1686bdc26a7dc4775607fc85818dd524ba95e0a0fd" + end + + resource "m3u8" do + url "https://files.pythonhosted.org/packages/9b/a5/73697aaa99bb32b610adc1f11d46a0c0c370351292e9b271755084a145e6/m3u8-6.0.0.tar.gz" + sha256 "7ade990a1667d7a653bcaf9413b16c3eb5cd618982ff46aaff57fe6d9fa9c0fd" + end + + def install + virtualenv_install_with_resources + end + + def caveats + "To merge video slides, run `brew install ffmpeg`." + end + + test do + video_url = "https://v.youku.com/v_show/id_XNTAwNjY3MjU3Mg==.html" + output = shell_output("#{bin}/ykdl --info #{video_url} 2>&1", 1) + assert_match "CRITICAL:YKDL", output + assert_match version.to_s, shell_output("#{bin}/ykdl -h") + end +end diff --git a/Formula/y/ykman.rb b/Formula/y/ykman.rb new file mode 100644 index 0000000000000..42938e573c9c0 --- /dev/null +++ b/Formula/y/ykman.rb @@ -0,0 +1,101 @@ +class Ykman < Formula + include Language::Python::Virtualenv + + desc "Tool for managing your YubiKey configuration" + homepage "https://developers.yubico.com/yubikey-manager/" + url "https://files.pythonhosted.org/packages/b3/09/ba3ca95ed3c8adfb7f8288a33048a963dcc5741eb3e819a8451b65e36a59/yubikey_manager-5.8.0.tar.gz" + sha256 "3af0da65e1fdd46763c94ee74e2da55a4b6e7771da776c197f5f4b4581738560" + license "BSD-2-Clause" + head "https://github.com/Yubico/yubikey-manager.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fbe7882af1ba4b5a251c58e775f405382e4d19e7ac86d6d1abdd39023f0948fc" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14991f7289929523e9cceeaed383a0047cf94f728730a5e0b29313c72c5d990f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "002ba3444d9cc43ca195f51eb9f44ea4a9073923355887cbf3e1850e60e8d98a" + sha256 cellar: :any_skip_relocation, sonoma: "194c3b50e319727301c199ebc1652b6ad1085649c2e6abb26fa6d24fc922ed5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a7fc0d787f903feac1306c4eb0de99f5e04a90360c445654cfd5299c70604d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5665d529fb05f130d4aae2e888e37dd23fa500579875c81c9de6d83fe91b9e0" + end + + depends_on "cmake" => :build # for more-itertools + depends_on "swig" => :build + depends_on "cryptography" + depends_on "python@3.14" + + uses_from_macos "pcsc-lite" + + pypi_packages exclude_packages: "cryptography", + extra_packages: %w[jeepney secretstorage] + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "fido2" do + url "https://files.pythonhosted.org/packages/8d/b9/6ec8d8ec5715efc6ae39e8694bd48d57c189906f0628558f56688d0447b2/fido2-2.0.0.tar.gz" + sha256 "3061cd05e73b3a0ef6afc3b803d57c826aa2d6a9732d16abd7277361f58e7964" + end + + resource "jaraco-classes" do + url "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" + sha256 "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + end + + resource "jaraco-context" do + url "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz" + sha256 "9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz" + sha256 "cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" + sha256 "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz" + sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + end + + resource "pyscard" do + url "https://files.pythonhosted.org/packages/c1/d9/02085a08c61a8d7330a77d25884b0fb39b1057f14e5f1d660ea5368f0b80/pyscard-2.3.0.tar.gz" + sha256 "621928e217e3b1d3c791086bf0c9f307fc4ae004a9b1a430536acc1a6eb50003" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz" + sha256 "c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c" + end + + def install + # Fixes: smartcard/scard/helpers.c:28:22: fatal error: winscard.h: No such file or directory + ENV.append "CFLAGS", "-I#{Formula["pcsc-lite"].opt_include}/PCSC" if OS.linux? + + venv = virtualenv_install_with_resources without: "pyscard" + # Use brewed swig + # https://github.com/Homebrew/homebrew-core/pull/176069#issuecomment-2200583084 + # https://github.com/LudovicRousseau/pyscard/issues/169#issuecomment-2200632337 + resource("pyscard").stage do + inreplace "pyproject.toml", 'requires = ["setuptools","swig"]', 'requires = ["setuptools"]' + venv.pip_install Pathname.pwd + end + + man1.install "man/ykman.1" + generate_completions_from_executable(bin/"ykman", shell_parameter_format: :click) + end + + test do + assert_match version.to_s, shell_output("#{bin}/ykman --version") + end +end diff --git a/Formula/y/ykpers.rb b/Formula/y/ykpers.rb new file mode 100644 index 0000000000000..b0540d90255c9 --- /dev/null +++ b/Formula/y/ykpers.rb @@ -0,0 +1,72 @@ +class Ykpers < Formula + desc "YubiKey personalization library and tool" + homepage "https://developers.yubico.com/yubikey-personalization/" + url "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0.tar.gz" + sha256 "0ec84d0ea862f45a7d85a1a3afe5e60b8da42df211bb7d27a50f486e31a79b93" + license "BSD-2-Clause" + revision 2 + + livecheck do + url "https://developers.yubico.com/yubikey-personalization/Releases/" + regex(/href=.*?ykpers[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "d7ff46bee401db439de4f88382d2efcbb74cdda8555434f9ea1728a73be55648" + sha256 cellar: :any, arm64_sequoia: "b1a84b25eb98c3a81bb369743de29418fc21af87cc28e6596ee38a4595c793df" + sha256 cellar: :any, arm64_sonoma: "e62f960d0e8851938c674e31e768bcc4bee8ed0e87a13430a9d59c5fba4d95da" + sha256 cellar: :any, arm64_ventura: "ad5b67da47a110797570919026e4c78ec2220f858f804cca466ced27382170ca" + sha256 cellar: :any, arm64_monterey: "a244acc561a3c5e5d5b67ccc25b9b24ea16b037e10acd8e01510a4a34f96ec15" + sha256 cellar: :any, arm64_big_sur: "512484b795857fd09d61e2fb5c186ff771295c90b809bdcc82fdcf76835b71a0" + sha256 cellar: :any, sonoma: "f92a685ae27314905b9388e043cdf8d0e0068068a0a03446ef1d2154057d4f6c" + sha256 cellar: :any, ventura: "0f4e3087830e58adda6999b618bc2ab80e90906f6d29dbbb5349adbbabcb9785" + sha256 cellar: :any, monterey: "e45fba4f54b6e285c38879635f3b13588783cced19ded02b3899c8da282fb353" + sha256 cellar: :any, big_sur: "31b2bafcc829e3cc6e85f5e1021075088a909ba4db51ec8f20b23db93f59d802" + sha256 cellar: :any, catalina: "8c5ed1924d1059265589a221b8e2bb26a2bcd59f91ede210e3a1267412867f47" + sha256 cellar: :any_skip_relocation, arm64_linux: "975467c8f02063b77d1d990642731133866564da4bb1d3537ecde9bec8387959" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eee945e8cc748d69622f20b470e327fee279b356b78be2df9a75dc10ab945f1d" + end + + depends_on "pkgconf" => :build + depends_on "json-c" + depends_on "libyubikey" + + on_linux do + depends_on "libusb" + end + + # Compatibility with json-c 0.14. Remove with the next release. + patch do + url "https://github.com/Yubico/yubikey-personalization/commit/0aa2e2cae2e1777863993a10c809bb50f4cde7f8.patch?full_index=1" + sha256 "349064c582689087ad1f092e95520421562c70ff4a45e411e86878b63cf8f8bd" + end + # Fix device access issues on macOS Catalina and later. Remove with the next release. + patch do + url "https://github.com/Yubico/yubikey-personalization/commit/7ee7b1131dd7c64848cbb6e459185f29e7ae1502.patch?full_index=1" + sha256 "bf3efe66c3ef10a576400534c54fc7bf68e90d79332f7f4d99ef7c1286267d22" + end + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + ENV.append_to_cflags "-fcommon" if ENV.compiler.to_s.start_with?("gcc") + + args = %W[ + --disable-silent-rules + --with-libyubikey-prefix=#{Formula["libyubikey"].opt_prefix} + ] + args << if OS.mac? + "--with-backend=osx" + else + "--with-backend=libusb-1.0" + end + system "./configure", *args, *std_configure_args + system "make", "check" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ykinfo -V 2>&1") + end +end diff --git a/Formula/y/yle-dl.rb b/Formula/y/yle-dl.rb new file mode 100644 index 0000000000000..08a6d4e224201 --- /dev/null +++ b/Formula/y/yle-dl.rb @@ -0,0 +1,70 @@ +class YleDl < Formula + include Language::Python::Virtualenv + + desc "Download Yle videos from the command-line" + homepage "https://aajanki.github.io/yle-dl/index-en.html" + url "https://files.pythonhosted.org/packages/a1/92/f2c10d7390899c9f26e08102143d9c0a8d375a7d7a7314e17913ddfa162e/yle_dl-20250730.tar.gz" + sha256 "2122741f515d5829eff28b2f6b96c251f4f7434412ea6c3ca60e526e60563c89" + license "GPL-3.0-or-later" + head "https://github.com/aajanki/yle-dl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0630fd9edc03fa57d574116c12b8494f05e0ec3e1564c879f6431bc131bebdd1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f021f22baa3cdceec01432ab2c72409f95e20448c3609a611e1a7f39803e12f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8558f705675ed2a44797ffb4fc5a32c02e445e6ec2cdc3aa613f60c961e7ba9" + sha256 cellar: :any_skip_relocation, sonoma: "ef70ee57200f5a42bcc5339adc3fce6c17e7b9097ca89a2bc1c45b3d61b1328f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b47a3be2e2f9efdb3c4db29d7f790470e05439871b9cc252602e1c5dee69c28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87e8aa9962fbe6a87839626f227e55e12ebba3a87dc903c4f5cd3a223ccc0c7b" + end + + depends_on "certifi" + depends_on "ffmpeg" + depends_on "python@3.14" + depends_on "rtmpdump" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + pypi_packages exclude_packages: "certifi" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz" + sha256 "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz" + sha256 "79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz" + sha256 "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/yle-dl --showtitle https://areena.yle.fi/1-1570236") + assert_match "Traileri:", output + assert_match "2012-05-30T10:51", output + end +end diff --git a/Formula/y/yo.rb b/Formula/y/yo.rb new file mode 100644 index 0000000000000..4475a910810c5 --- /dev/null +++ b/Formula/y/yo.rb @@ -0,0 +1,25 @@ +class Yo < Formula + desc "CLI tool for running Yeoman generators" + homepage "https://yeoman.io" + url "https://registry.npmjs.org/yo/-/yo-5.1.0.tgz" + sha256 "b3b2abe646c47d8e60b93394ed219779dce26347c59d8ba337a62ea4226e1ec5" + license "BSD-2-Clause" + head "https://github.com/yeoman/yo.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "77fd73f75ed33e9578034e848c34266cabcc4db3fee4146d0901ab8977b64a2b" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/yo --version") + assert_match "Everything looks all right!", shell_output("#{bin}/yo doctor") + end +end diff --git a/Formula/y/yoke.rb b/Formula/y/yoke.rb new file mode 100644 index 0000000000000..4ae3a9d26aae1 --- /dev/null +++ b/Formula/y/yoke.rb @@ -0,0 +1,31 @@ +class Yoke < Formula + desc "Helm-inspired infrastructure-as-code package deployer" + homepage "https://yokecd.github.io/docs/" + # We use a git checkout since the build relies on tags for the version + url "https://github.com/yokecd/yoke.git", + tag: "v0.17.3", + revision: "aa9be9de70460b7f416a20ce616c4b59e1d30354" + license "MIT" + head "https://github.com/yokecd/yoke.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "01a7ad7cfe133d883663b33643c0d16c6b7070fc558629fd46d3ef4159a44ec0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fe4af2d55e14f8ca2631cedb70481cedc106ad7b2ff4e3b0674e1fba95c10b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59f662c162313332cec872323ebe14ff6e411fe03e420c579e3d398ba1340430" + sha256 cellar: :any_skip_relocation, sonoma: "92078c7209aaf3b3d2ba9b5c994cc94a3deac50e6216ff380f92b042cf16e8e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd84b20e924e26b441ff78e8e244080a27cdf612d47da356b089223f3bab7e61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40a2457a84e9cbf19516743803e83543a7c8035cdd16a01cd00307132950a6ea" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/yoke" + end + + test do + assert_match version.to_s, shell_output("#{bin}/yoke version") + + assert_match "failed to build k8 config", shell_output("#{bin}/yoke inspect 2>&1", 1) + end +end diff --git a/Formula/y/yor.rb b/Formula/y/yor.rb new file mode 100644 index 0000000000000..960e7a55b9925 --- /dev/null +++ b/Formula/y/yor.rb @@ -0,0 +1,33 @@ +class Yor < Formula + desc "Extensible auto-tagger for your IaC files" + homepage "https://yor.io/" + url "https://github.com/bridgecrewio/yor/archive/refs/tags/0.1.200.tar.gz" + sha256 "157f2fc97aafa815dc5efaf1b398950181678953beff5e7736943b73b618b96a" + license "Apache-2.0" + head "https://github.com/bridgecrewio/yor.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5093c27de138a131d29e9b82498757aaea499bdaed28051c8267349ab14e9214" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bec81b4e0759d619616eecc9f20be5c595c59a4a3d54d2931048317a6ce32a7b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc53606bf732f1838b233ea2a92f3550accf86204ebfe9e4020abcb77931cb2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5292c622765f09f2c292a85bf3a74738aca1f1d39a3ca0f368d18c62803ec2c3" + sha256 cellar: :any_skip_relocation, sonoma: "a2d75e2772ffaf1f6f57a6dedf7c535543e373d7dc640e2a9b2cb1c3671504a4" + sha256 cellar: :any_skip_relocation, ventura: "a8d04551bd36e0df696da02646ef12f9cf2baecfb15b83a88f191f6a82b8c77e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae580ba85dee0c2690c2055c86eea3834afe7dcd7fb10795c95218c32bff2874" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f04dc74ea3f0833efc5b250eec99459aea5d626f7ce9d08845fb30878919fcdc" + end + + depends_on "go" => :build + + def install + inreplace "src/common/version.go", "Version = \"9.9.9\"", "Version = \"#{version}\"" + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match version.to_s, shell_output("#{bin}/yor --version") + + assert_match "yor_trace", shell_output("#{bin}/yor list-tags") + assert_match "code2cloud", shell_output("#{bin}/yor list-tag-groups") + end +end diff --git a/Formula/y/yorkie.rb b/Formula/y/yorkie.rb new file mode 100644 index 0000000000000..934ae599abb30 --- /dev/null +++ b/Formula/y/yorkie.rb @@ -0,0 +1,58 @@ +class Yorkie < Formula + desc "Document store for collaborative applications" + homepage "https://yorkie.dev/" + url "https://github.com/yorkie-team/yorkie/archive/refs/tags/v0.6.35.tar.gz" + sha256 "a24886e773c244297c6f970b6f3c5cf5010dd5d285616f30611cf32934d4a7e9" + license "Apache-2.0" + head "https://github.com/yorkie-team/yorkie.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "36f0fed8bb957c7bee43945bb3c28a1a01ac08c1a49d1c806d700be22593f5ed" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a70df1d2f39041e59aa83b44966158a449c5bb7f5ba94f434f86ff17f24beed4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5760321a0a7c5e835ed51c1f1fe850c215226e550a271af0c55039e1b437e1cf" + sha256 cellar: :any_skip_relocation, sonoma: "ff1c7cb00b57c5c31e3543c27c30aaef4a78262951d65a5771371041fb9e514e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7146cfaa0df70e6bda85c4be7d9b860d98941bddb99a0e9ce608800bf8e3670" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d242eb2bc89e50964ca3358c17d23e3a3702c5eb66cd249a03497f4130974fda" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/yorkie-team/yorkie/internal/version.Version=#{version} + -X github.com/yorkie-team/yorkie/internal/version.BuildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/yorkie" + + generate_completions_from_executable(bin/"yorkie", "completion") + end + + service do + run opt_bin/"yorkie" + run_type :immediate + keep_alive true + working_dir var + end + + test do + yorkie_pid = spawn bin/"yorkie", "server" + # sleep to let yorkie get ready + sleep 3 + system bin/"yorkie", "login", "-u", "admin", "-p", "admin", "--insecure" + + test_project = "test" + output = shell_output("#{bin}/yorkie project create #{test_project} 2>&1") + project_info = JSON.parse(output) + assert_equal test_project, project_info.fetch("name") + ensure + # clean up the process before we leave + Process.kill("HUP", yorkie_pid) + end +end diff --git a/Formula/y/yosys.rb b/Formula/y/yosys.rb new file mode 100644 index 0000000000000..3b8036527eeeb --- /dev/null +++ b/Formula/y/yosys.rb @@ -0,0 +1,37 @@ +class Yosys < Formula + desc "Framework for Verilog RTL synthesis" + homepage "https://yosyshq.net/yosys/" + url "https://github.com/YosysHQ/yosys/releases/download/v0.58/yosys.tar.gz" + sha256 "c67f35c0d3c6946b7bce6eb168180edfda7f1ce295bf4c3ac1b7cd7ccd81cb4b" + license "ISC" + head "https://github.com/YosysHQ/yosys.git", branch: "main" + + bottle do + sha256 arm64_tahoe: "18392fe1527aa0660d8238711c8a127c0cab6d2e3511450102598aa136969ed1" + sha256 arm64_sequoia: "6c5caa17e472bc26d46573e99f3e61a550287c5f97ee3baea2b235af841e4d30" + sha256 arm64_sonoma: "293b4aceb772bda99a60493b23b5ba9b816d7cad249eb31ee2ef360ef9f6038f" + sha256 sonoma: "e4ff1452d36e55ec1c7999b169339191b77ad2dd408829ece31dea6930f707ce" + sha256 arm64_linux: "cac7d9c91ad93812cfa3e52cdccdad1f818fc5a7b7820d3c68c3053b363c8a81" + sha256 x86_64_linux: "e33ceaed105cdc58f7004938a3f4ee1655d991ebbcbfc6a49ff1040eecc36a9c" + end + + depends_on "bison" => :build + depends_on "flex" => :build + depends_on "pkgconf" => :build + depends_on "libtommath" + depends_on "readline" + depends_on "tcl-tk" + + uses_from_macos "libffi" + uses_from_macos "python" + uses_from_macos "zlib" + + def install + ENV.append "LINKFLAGS", "-L#{Formula["readline"].opt_lib}" + system "make", "install", "PREFIX=#{prefix}", "PRETTY=0" + end + + test do + system bin/"yosys", "-p", "hierarchy; proc; opt; techmap; opt;", "-o", "synth.v", pkgshare/"adff2dff.v" + end +end diff --git a/Formula/y/you-get.rb b/Formula/y/you-get.rb new file mode 100644 index 0000000000000..91cbc633123cb --- /dev/null +++ b/Formula/y/you-get.rb @@ -0,0 +1,44 @@ +class YouGet < Formula + include Language::Python::Virtualenv + + desc "Dumb downloader that scrapes the web" + homepage "https://you-get.org/" + url "https://files.pythonhosted.org/packages/2d/85/f4a22b842bc0e0f57dc56ae54266dbc451547cee90bae9480131100ad92a/you_get-0.4.1743.tar.gz" + sha256 "cbc1250d577246ec9d422cef113882844c80d8729f32d3183a5fa76648a20741" + license "MIT" + head "https://github.com/soimort/you-get.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "353172e5d59bb80ba8649ae0df6a338afdd45be4337da36d1361bd83a525d0c6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0ce30b54400af7fade21a7e10840f1a96908f42410410b89d9fec60fc4d577ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d847407c34d58b17732d03aee26d1697cd0267b433c50a7a2e441bfbc5b22f2f" + sha256 cellar: :any_skip_relocation, sonoma: "b9d7f293864afb731ac05e2459b3999f30e686ec0038df1424a3157690f2a29d" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ef649b713d146c3be808bdc771b6425b8f94fa242994add6b89a1cc9e562369" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64940795ad6349d12f2b11f1f7657b10bc9471573f4858eb57f5dc9759392387" + end + + depends_on "python@3.14" + depends_on "rtmpdump" + + resource "dukpy" do + url "https://files.pythonhosted.org/packages/dd/fe/8cef39f269aed53e940c238bf9ceb3ca0f80d7f5be6df2c00a84d87ac5d8/dukpy-0.5.0.tar.gz" + sha256 "079fe2d65ac5e24df56806c6b4e1a26f92bb7f13dc764f4fb230a6746744c1ad" + end + + def install + virtualenv_install_with_resources + bash_completion.install "contrib/completion/you-get-completion.bash" => "you-get" + fish_completion.install "contrib/completion/you-get.fish" + zsh_completion.install "contrib/completion/_you-get" + end + + def caveats + "To use post-processing options, run `brew install ffmpeg` or `brew install libav`." + end + + test do + assert_match version.to_s, shell_output("#{bin}/you-get --version 2>&1") + assert_match "82 bytes", shell_output("#{bin}/you-get --info https://imgur.com/ZTZ6Xy1") + end +end diff --git a/Formula/y/youplot.rb b/Formula/y/youplot.rb new file mode 100644 index 0000000000000..450d80f59f570 --- /dev/null +++ b/Formula/y/youplot.rb @@ -0,0 +1,70 @@ +class Youplot < Formula + desc "Command-line tool that draw plots on the terminal" + homepage "https://github.com/red-data-tools/YouPlot/" + url "https://github.com/red-data-tools/YouPlot/archive/refs/tags/v0.4.6.tar.gz" + sha256 "126278103f6dbc4e28983b9e90a4e593f17e78b38d925a7df16965b5d3c145a4" + license "MIT" + revision 1 + + bottle do + sha256 arm64_tahoe: "d29e20bfabf80a960825bb2f5eb22b697d946e019683e2844d5a96df3e4c76b5" + sha256 arm64_sequoia: "f4f7a0b1d99fc9472d007745a96456a2d87626a21f9e2f1d781b81713904bc71" + sha256 arm64_sonoma: "0154fece0c0a8ddb10acbac21c168b33bacb2839ecc8f0f28d6d7dcf0ebe7047" + sha256 arm64_ventura: "4bb2dff5ad2c3ed7d664ef15b09ce44f03b2ec9cb01fa538b6420b9aba56d5c1" + sha256 sonoma: "3373ffb2e43529719160f9be85457e89a87eb20648ca158c4b369b38d762b39c" + sha256 ventura: "b642704f1c8f283ef82b61ece8ee89f5bc758949d36c0f66b3bacd192843b223" + sha256 cellar: :any_skip_relocation, arm64_linux: "563fd220cab701dd4db2819903e74fea7059cd91963169fafe06518fa4e50535" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c6afa1c010330d42e76bd3430040c5f289cea496fa805d0fb27a8494a33fd43" + end + + uses_from_macos "ruby" + + resource "enumerable-statistics" do + url "https://rubygems.org/downloads/enumerable-statistics-2.0.8.gem" + sha256 "1e0d69fcdec1d188dd529e6e5b2c27e8f88029c862f6094663c93806f6d313b3" + end + + resource "unicode_plot" do + url "https://rubygems.org/downloads/unicode_plot-0.0.5.gem" + sha256 "91ce6237bca67a3b969655accef91024c78ec6aad470fcddeb29b81f7f78f73b" + end + + resource "csv" do + url "https://rubygems.org/downloads/csv-3.3.0.gem" + sha256 "0bbd1defdc31134abefed027a639b3723c2753862150f4c3ee61cab71b20d67d" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + system "gem", "install", r.cached_download, "--ignore-dependencies", + "--no-document", "--install-dir", libexec + end + system "gem", "build", "youplot.gemspec" + system "gem", "install", "--ignore-dependencies", "youplot-#{version}.gem" + bin.install libexec/"bin/youplot", libexec/"bin/uplot" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + (testpath/"test.csv").write <<~CSV + A,20 + B,30 + C,40 + D,50 + CSV + expected_output = [ + " ┌ ┐ ", + " A ┤■■ 20.0 ", + " B ┤■■■ 30.0 ", + " C ┤■■■■ 40.0 ", + " D ┤■■■■■ 50.0 ", + " └ ┘ ", + "", + ].join("\n") + output_youplot = shell_output("#{bin}/youplot bar -o -w 10 -d, #{testpath}/test.csv") + assert_equal expected_output, output_youplot + output_uplot = shell_output("#{bin}/youplot bar -o -w 10 -d, #{testpath}/test.csv") + assert_equal expected_output, output_uplot + end +end diff --git a/Formula/y/youtube-dl.rb b/Formula/y/youtube-dl.rb new file mode 100644 index 0000000000000..ffa05bc681595 --- /dev/null +++ b/Formula/y/youtube-dl.rb @@ -0,0 +1,79 @@ +class YoutubeDl < Formula + include Language::Python::Virtualenv + + desc "Download YouTube videos from the command-line" + homepage "https://ytdl-org.github.io/youtube-dl/" + license "Unlicense" + + stable do + url "https://files.pythonhosted.org/packages/01/4f/ab0d0806f4d818168d0ec833df14078c9d1ddddb5c42fa7bfb6f15ecbfa7/youtube_dl-2021.12.17.tar.gz" + sha256 "bc59e86c5d15d887ac590454511f08ce2c47698d5a82c27bfe27b5d814bbaed2" + + # Backport fix for extractor handling consent + patch do + url "https://github.com/ytdl-org/youtube-dl/commit/aaed4884ed9954b8b69c3ca5254418ec578ed0b9.patch?full_index=1" + sha256 "3078402768839f4ad611bcb7ab3b221d1a97626c62c4f1bdb2f85598fa45fa96" + end + end + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f3b77e4e5dc244e6e1e85f307083798af83134824e30977936acedf014b58cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f3b77e4e5dc244e6e1e85f307083798af83134824e30977936acedf014b58cc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0f3b77e4e5dc244e6e1e85f307083798af83134824e30977936acedf014b58cc" + sha256 cellar: :any_skip_relocation, sonoma: "71f792a632398bd152e07f7f46b36b841de4687915c9a4cd502b3d3893e35562" + sha256 cellar: :any_skip_relocation, ventura: "71f792a632398bd152e07f7f46b36b841de4687915c9a4cd502b3d3893e35562" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f3b77e4e5dc244e6e1e85f307083798af83134824e30977936acedf014b58cc" + end + + head do + url "https://github.com/ytdl-org/youtube-dl.git", branch: "master" + depends_on "pandoc" => :build + end + + # https://github.com/ytdl-org/youtube-dl/issues/31585 + # https://github.com/ytdl-org/youtube-dl/issues/31067 + disable! date: "2024-11-23", because: :unmaintained, replacement_formula: "yt-dlp" + + depends_on "python@3.13" + + def install + python3 = which("python3.13") + if build.head? + system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "PYTHON=#{python3}", "install" + fish_completion.install prefix/"etc/fish/completions/youtube-dl.fish" + rm_r(prefix/"etc/fish") + else + virtualenv_install_with_resources + # Handle "ERROR: Unable to extract uploader id" until new release + # https://github.com/ytdl-org/youtube-dl/issues/31530 + inreplace libexec/Language::Python.site_packages(python3)/"youtube_dl/extractor/youtube.py", + "owner_profile_url, 'uploader id')", + "owner_profile_url, 'uploader id', fatal=False)" + man1.install_symlink libexec/"share/man/man1/youtube-dl.1" => "youtube-dl.1" + bash_completion.install libexec/"etc/bash_completion.d/youtube-dl.bash-completion" + fish_completion.install libexec/"etc/fish/completions/youtube-dl.fish" + end + end + + def caveats + <<~EOS + The current youtube-dl version has many unresolved issues. + Upstream have not tagged a new release since 2021. + + Please use yt-dlp instead. + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/youtube-dl --version") + + # Tests fail with bot detection + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # commit history of homebrew-core repo + system bin/"youtube-dl", "--simulate", "https://www.youtube.com/watch?v=pOtd1cbOP7k" + # homebrew playlist + system bin/"youtube-dl", "--simulate", "--yes-playlist", "https://www.youtube.com/watch?v=pOtd1cbOP7k&list=PLMsZ739TZDoLj9u_nob8jBKSC-mZb0Nhj" + end +end diff --git a/Formula/y/youtubedr.rb b/Formula/y/youtubedr.rb new file mode 100644 index 0000000000000..b932cc9f20d17 --- /dev/null +++ b/Formula/y/youtubedr.rb @@ -0,0 +1,40 @@ +class Youtubedr < Formula + desc "Download Youtube Video in Golang" + homepage "https://github.com/kkdai/youtube" + url "https://github.com/kkdai/youtube/archive/refs/tags/v2.10.4.tar.gz" + sha256 "c1c282ae902d84f65ea3e891bb8da48525b5d9b0cc9662c277312d5cc402ea66" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2230647851abf4b669a42defe9ea364de4b09dbe1de30891d2b41a3ab36b641e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "908db821e0a543801517fa6195aabf2ae9a688ed7037e89d629f5723b509f141" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "908db821e0a543801517fa6195aabf2ae9a688ed7037e89d629f5723b509f141" + sha256 cellar: :any_skip_relocation, arm64_ventura: "908db821e0a543801517fa6195aabf2ae9a688ed7037e89d629f5723b509f141" + sha256 cellar: :any_skip_relocation, sonoma: "812303cccd71ab7bd988ee97428eab75afa80d562f939f5021491609d27333fd" + sha256 cellar: :any_skip_relocation, ventura: "812303cccd71ab7bd988ee97428eab75afa80d562f939f5021491609d27333fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b9102423d46b6569d63538fd6f4f7366623d1c5e2912e42d361f975a02e7132" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfd738a7fb08baf4d5c4f6bd2c561ce742c4f99288f6dd1c078565aae27591e0" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/youtubedr" + + generate_completions_from_executable(bin/"youtubedr", "completion") + end + + test do + version_output = pipe_output("#{bin}/youtubedr version").split("\n") + assert_match(/Version:\s+#{version}/, version_output[0]) + + # Fails in Linux CI with "can't bypass age restriction: login required" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + info_output = pipe_output("#{bin}/youtubedr info https://www.youtube.com/watch?v=pOtd1cbOP7k").split("\n") + assert_match "Title: History of homebrew-core", info_output[0] + assert_match "Author: Rui Chen", info_output[1] + assert_match "Duration: 13m15s", info_output[2] + end +end diff --git a/Formula/y/youtubeuploader.rb b/Formula/y/youtubeuploader.rb new file mode 100644 index 0000000000000..64e303ef31a9c --- /dev/null +++ b/Formula/y/youtubeuploader.rb @@ -0,0 +1,69 @@ +class Youtubeuploader < Formula + desc "Scripted uploads to Youtube" + homepage "https://github.com/porjo/youtubeuploader" + url "https://github.com/porjo/youtubeuploader/archive/refs/tags/v1.25.5.tar.gz" + sha256 "b6475f3c7553b83ac1e61d4e9ab2a4c7bec502a15675a504d87323d2cf1c3884" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/porjo/youtubeuploader.git", branch: "master" + + # Upstream creates stable version tags (e.g., `23.03`) before a release but + # the version isn't considered to be released until a corresponding release + # is created on GitHub, so it's necessary to use the `GithubLatest` strategy. + # https://github.com/porjo/youtubeuploader/issues/169 + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3748a5d2beaafce8110971addbdb5d62a6a59867d283a88bd6672e6a5fff6622" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a21f5ff5cd30df2a734ce17d67634b114fdf9261465f27531d1b31bd402c870e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a21f5ff5cd30df2a734ce17d67634b114fdf9261465f27531d1b31bd402c870e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a21f5ff5cd30df2a734ce17d67634b114fdf9261465f27531d1b31bd402c870e" + sha256 cellar: :any_skip_relocation, sonoma: "94dcbcc952e28af9f60fc95201c0be744a9552f1e8ca408445801a3d8d9c7c99" + sha256 cellar: :any_skip_relocation, ventura: "94dcbcc952e28af9f60fc95201c0be744a9552f1e8ca408445801a3d8d9c7c99" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b1fafe8f133cec0e3edb03685b3f7ca8bee3544941075d46dfb333745ea8044" + sha256 cellar: :any_skip_relocation, x86_64_linux: "612d71e27119ecb79aaa4460ec721cb19b08c925e2e045730f0b6468c86e3265" + end + + depends_on "go" => :build + + def install + ldflags = "-s -X main.appVersion=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/youtubeuploader" + end + + test do + # Version + assert_match version.to_s, shell_output("#{bin}/youtubeuploader -version") + + # OAuth + (testpath/"client_secrets.json").write <<~JSON + { + "installed": { + "client_id": "foo_client_id", + "client_secret": "foo_client_secret", + "redirect_uris": [ + "http://localhost:8080/oauth2callback", + "https://localhost:8080/oauth2callback" + ], + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://accounts.google.com/o/oauth2/token" + } + } + JSON + + (testpath/"request.token").write <<~JSON + { + "access_token": "test", + "token_type": "Bearer", + "refresh_token": "test", + "expiry": "2020-01-01T00:00:00.000000+00:00" + } + JSON + + output = shell_output("#{bin}/youtubeuploader -filename #{test_fixtures("test.m4a")} 2>&1", 1) + assert_match 'oauth2: \"invalid_client\" \"The OAuth client was not found.\"', output + end +end diff --git a/Formula/y/yozefu.rb b/Formula/y/yozefu.rb new file mode 100644 index 0000000000000..5e7bb294d672c --- /dev/null +++ b/Formula/y/yozefu.rb @@ -0,0 +1,49 @@ +class Yozefu < Formula + desc "TUI for exploring data in a Kafka cluster" + homepage "https://github.com/MAIF/yozefu" + url "https://github.com/MAIF/yozefu/archive/refs/tags/v0.0.18.tar.gz" + sha256 "f1f2e40926352154d79d2526cded915dbfb4c99713a31f3bfe52b094bf586e2f" + license "Apache-2.0" + head "https://github.com/MAIF/yozefu.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "54734348fa9e511d1d070a64f41bc64921f632210439e97a58ad7dc07b2a8694" + sha256 cellar: :any, arm64_sequoia: "d932ebb8bf2118d4b2d25eadb268e2fd9a159a8f62ce2f458d01e22d2a788805" + sha256 cellar: :any, arm64_sonoma: "7a5dc98e43043e4e71e99e4890685f96a72d851d7f59d6e4f0a6534668804f53" + sha256 cellar: :any, sonoma: "009cf958827cdb5d50fce29c607bc93d8cd55f54e3850a7fcbf8188929f6f725" + sha256 cellar: :any_skip_relocation, arm64_linux: "77b74299f71094a9a189dc3764a3027b2816f52006c6aa88d674fd0f9e8b80ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b2a8c9ad7a377ea66e2bd0de2a6c403e3b1ce8c7fee149e606d29a8546b51b6" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "llvm" => :build # for libclang + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "crates/bin") + end + + test do + require "utils/linkage" + + assert_match version.to_s, shell_output("#{bin}/yozf --version") + + output = shell_output("#{bin}/yozf config get a 2>&1", 1) + assert_match "Error: There is no 'a' property in the config file", output + + [ + Formula["openssl@3"].opt_lib/shared_library("libssl"), + Formula["openssl@3"].opt_lib/shared_library("libcrypto"), + ].each do |library| + assert Utils.binary_linked_to_library?(bin/"yozf", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/y/yq.rb b/Formula/y/yq.rb new file mode 100644 index 0000000000000..196084d078ecc --- /dev/null +++ b/Formula/y/yq.rb @@ -0,0 +1,45 @@ +class Yq < Formula + desc "Process YAML, JSON, XML, CSV and properties documents from the CLI" + homepage "https://github.com/mikefarah/yq" + url "https://github.com/mikefarah/yq/archive/refs/tags/v4.48.1.tar.gz" + sha256 "591158368f8155421bd8821754a67b4478ee2cde205b7abfbf2d50f90769cf0e" + license "MIT" + head "https://github.com/mikefarah/yq.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4fa80ae6438de0ccabfbd8759a6902df0c51c42e015785e362ae3cea7af950a7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4fa80ae6438de0ccabfbd8759a6902df0c51c42e015785e362ae3cea7af950a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fa80ae6438de0ccabfbd8759a6902df0c51c42e015785e362ae3cea7af950a7" + sha256 cellar: :any_skip_relocation, sonoma: "a583726ae07c0fa05b53d5377630538bdf0c98fb5e3abdd36f5ec5417b05ab27" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d6a77108dd8ee100c2176f2b49938140c05842400b9c90f41407342ffdfd92a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1bf167eb9c36e2652c95b48ffb6f44ea8be0c8bcec9e93c2fbc59f64e87d40c" + end + + depends_on "go" => :build + depends_on "pandoc" => :build + + conflicts_with "python-yq", because: "both install `yq` executables" + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + system "go", "build", *std_go_args(ldflags: "-s -w") + + # Install shell completions + generate_completions_from_executable(bin/"yq", "shell-completion") + + # Install man pages + system "./scripts/generate-man-page-md.sh" + system "./scripts/generate-man-page.sh" + man1.install "yq.1" + end + + test do + assert_equal "key: cat", shell_output("#{bin}/yq eval --null-input --no-colors '.key = \"cat\"'").chomp + assert_equal "cat", pipe_output("#{bin}/yq eval .key -", "key: cat", 0).chomp + end +end diff --git a/Formula/y/yt-dlp.rb b/Formula/y/yt-dlp.rb new file mode 100644 index 0000000000000..d2869aad15e27 --- /dev/null +++ b/Formula/y/yt-dlp.rb @@ -0,0 +1,88 @@ +class YtDlp < Formula + include Language::Python::Virtualenv + + desc "Feature-rich command-line audio/video downloader" + homepage "https://github.com/yt-dlp/yt-dlp" + url "https://files.pythonhosted.org/packages/08/70/cf4bd6c837ab0a709040888caa70d166aa2dfbb5018d1d5c983bf0b50254/yt_dlp-2025.10.22.tar.gz" + sha256 "db2d48133222b1d9508c6de757859c24b5cefb9568cf68ccad85dac20b07f77b" + license "Unlicense" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "55304a4d7f4ac88bf3e92f0561d28fca74ed697bf6aafcc233edec89f9f37750" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88e89442fd6aa48f9d4a8cc3437d1fbc2c5ea681a7bae2fcc44d3d2133e5d312" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d4d029b46c4864700f294a7d630f4d0175da7935a590758a1c103127ee1939f" + sha256 cellar: :any_skip_relocation, sonoma: "49d629b79aea365a4c31642d632d1b21088ed5d146b57bdc1ebce0fb691dc25f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b1b0b209224a63ba010969f69c2e915d53ebee72fdaa9a0ef80bd97b7a6618d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02d5106c0294c1c1f99d9786bee678a557a8a1b72dcc7a761ac673e16d8b2704" + end + + head do + url "https://github.com/yt-dlp/yt-dlp.git", branch: "master" + + depends_on "pandoc" => :build + + on_macos do + depends_on "make" => :build + end + end + + depends_on "certifi" + depends_on "python@3.14" + + pypi_packages package_name: "yt-dlp[default]", + exclude_packages: "certifi" + + resource "brotli" do + url "https://files.pythonhosted.org/packages/2f/c2/f9e977608bdf958650638c3f1e28f85a1b075f075ebbe77db8555463787b/Brotli-1.1.0.tar.gz" + sha256 "81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" + sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" + sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz" + sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee" + end + + def install + system "gmake", "lazy-extractors", "pypi-files" if build.head? + virtualenv_install_with_resources + bash_completion.install libexec/"share/bash-completion/completions/yt-dlp" + zsh_completion.install libexec/"share/zsh/site-functions/_yt-dlp" + fish_completion.install libexec/"share/fish/vendor_completions.d/yt-dlp.fish" + end + + test do + system bin/"yt-dlp", "https://raw.githubusercontent.com/Homebrew/brew/refs/heads/master/Library/Homebrew/test/support/fixtures/test.gif" + + system bin/"yt-dlp", "--simulate", "https://x.com/X/status/1922008207133671652" + end +end diff --git a/Formula/y/ytt.rb b/Formula/y/ytt.rb new file mode 100644 index 0000000000000..cc156f47fe267 --- /dev/null +++ b/Formula/y/ytt.rb @@ -0,0 +1,63 @@ +class Ytt < Formula + desc "YAML templating tool that works on YAML structure instead of text" + homepage "https://carvel.dev/ytt/" + url "https://github.com/carvel-dev/ytt/archive/refs/tags/v0.52.1.tar.gz" + sha256 "c02a8dbcff7f7cf3a92ac6a210d299dd5df13946625e092fa2da48622a8e2fec" + license "Apache-2.0" + head "https://github.com/carvel-dev/ytt.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "df0049384c4b323958071878cb575eb05b8f4ed31d318bc3e2d721752bd3b2e9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df0049384c4b323958071878cb575eb05b8f4ed31d318bc3e2d721752bd3b2e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df0049384c4b323958071878cb575eb05b8f4ed31d318bc3e2d721752bd3b2e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df0049384c4b323958071878cb575eb05b8f4ed31d318bc3e2d721752bd3b2e9" + sha256 cellar: :any_skip_relocation, sonoma: "551e538f70010d174fe740c7fb952a2a4c5e65c842b7cbb8ff35bfa05124de43" + sha256 cellar: :any_skip_relocation, ventura: "551e538f70010d174fe740c7fb952a2a4c5e65c842b7cbb8ff35bfa05124de43" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0ef1bf1260bd779d5f9bf9583cccdcaa354fd0f38e87f2442e93cfdd72579a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5387c59c39c72bdd4425f8d0d54b338b5c0b4f4f5fa642f618a824285a490faa" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X carvel.dev/ytt/pkg/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/ytt" + + generate_completions_from_executable(bin/"ytt", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ytt version") + + (testpath/"values.lib.yml").write <<~YAML + #@ def func1(): + name: max + cities: + - SF + - LA + #@ end + + #@ def func2(): + name: joanna + cities: + - SF + #@ end + YAML + + (testpath/"template.yml").write <<~YAML + #! YAML library files must be named *.lib.yml + #@ load("values.lib.yml", "func1", "func2") + + func1_key: #@ func1() + func2_key: #@ func2() + YAML + + assert_match <<~YAML, shell_output("#{bin}/ytt -f values.lib.yml -f template.yml") + func1_key: + name: max + cities: + - SF + - LA + YAML + end +end diff --git a/Formula/y/yubico-piv-tool.rb b/Formula/y/yubico-piv-tool.rb new file mode 100644 index 0000000000000..e10f5c8366736 --- /dev/null +++ b/Formula/y/yubico-piv-tool.rb @@ -0,0 +1,45 @@ +class YubicoPivTool < Formula + desc "Command-line tool for the YubiKey PIV application" + homepage "https://developers.yubico.com/yubico-piv-tool/" + url "https://developers.yubico.com/yubico-piv-tool/Releases/yubico-piv-tool-2.7.2.tar.gz" + sha256 "b84ade3c35d4949db008e6cda7b6cc70ff98858598b3f09bc46fd24a3d5f7461" + license "BSD-2-Clause" + + livecheck do + url "https://developers.yubico.com/yubico-piv-tool/Releases/" + regex(/href=.*?yubico-piv-tool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "fc4d38540be3670e46f3869649b5e146ce4f4349eb89f4e9970e4e06535b7667" + sha256 cellar: :any, arm64_sequoia: "32cb4be3a8571a7383f46bd6886512be9cf152607629687a618fe6afa5ddc7e8" + sha256 cellar: :any, arm64_sonoma: "3f98f5e7d8cce1c8c28e6864baafc1d954db729e2a3532cb24d81f5078962ff8" + sha256 cellar: :any, arm64_ventura: "107365d2ab19a689ee6e1fcca4e668e421cbdf34827cc60ae8cfc40a4b169914" + sha256 cellar: :any, sonoma: "6ac3d8eaacd71de131b103772a686dc99faf1b788f520b0ae8a55b3c670ded29" + sha256 cellar: :any, ventura: "ae1d85e46113176a51fb3d45659083282a276d993eea0de0bf22097152c28e2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0a9a36684962a27b66fca9a0785f9559351caee558610c516134518556bc00b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1faebfd4902a9927f7ffac93ee3396a4ca9fcb257585c87ccea3ad40b2197b4" + end + + depends_on "check" => :build + depends_on "cmake" => :build + depends_on "gengetopt" => :build + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "pcsc-lite" + uses_from_macos "zlib" + + def install + ENV.append_to_cflags "-I#{Formula["pcsc-lite"].opt_include}/PCSC" unless OS.mac? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "yubico-piv-tool #{version}", shell_output("#{bin}/yubico-piv-tool --version") + end +end diff --git a/Formula/y/yubikey-agent.rb b/Formula/y/yubikey-agent.rb new file mode 100644 index 0000000000000..4ff2b47ec18a7 --- /dev/null +++ b/Formula/y/yubikey-agent.rb @@ -0,0 +1,64 @@ +class YubikeyAgent < Formula + desc "Seamless ssh-agent for YubiKeys and other PIV tokens" + homepage "https://github.com/FiloSottile/yubikey-agent" + url "https://github.com/FiloSottile/yubikey-agent/archive/refs/tags/v0.1.6.tar.gz" + sha256 "f156d089376772a34d2995f8261d821369a96a248ab586d27e3be0d9b72d7426" + license "BSD-3-Clause" + head "https://github.com/FiloSottile/yubikey-agent.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "66a71b8033de1b4951cb9b7249d9bd4c8b75d1271a9e234dc73e625282b9d32f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ce973f7cd1e1b5252f039e2fe2154bea75ce4b7439f49ec908774e57e6d15031" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68bef9f91a8d57edc11813ae0261a1a7c18a9a37afd7b376cb29c5e0b836bd69" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16fbb36f3bab79726c96cfc94dfda3aaabe290a8c72f5a73dba3d76cee916ee1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "028f45f8152045bbb98ddcac5ad41a554ee3a809e6e89cf76519b7b61e049243" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "408049a241d52174c985883c037422d9deac1596072a8aa6afdc59a1e4e8e437" + sha256 cellar: :any_skip_relocation, sonoma: "366ed6e74c186624edfb5fc808071b025c4e89d0b4d56dfea2fc3781b4daf865" + sha256 cellar: :any_skip_relocation, ventura: "9f4df13a79a921345e33da19009cd6a15c0371cfbec2a69875072ecc14ad116a" + sha256 cellar: :any_skip_relocation, monterey: "0908727c1be05e84776c37cbabdc38519882a1ddc9fe5faddfe60ecf9442bdc2" + sha256 cellar: :any_skip_relocation, big_sur: "16270ab84fc500f9ca17817fd35f783c5b272266e4abfaba79c8bc40e0a36cee" + sha256 cellar: :any_skip_relocation, arm64_linux: "380ebc52140afe17dee61e6cf3fe76452f9c8968c54c1fb0df8de705dbd02808" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee44c531db48e87a1f5fdd6f06159d37b4ae2877d80440ca3e437fdb4ec80e58" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + uses_from_macos "pcsc-lite" + + on_linux do + depends_on "pinentry" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=v#{version}") + end + + def post_install + (var/"run").mkpath + (var/"log").mkpath + end + + def caveats + <<~EOS + To use this SSH agent, set this variable in your ~/.zshrc and/or ~/.bashrc: + export SSH_AUTH_SOCK="#{var}/run/yubikey-agent.sock" + EOS + end + + service do + run [opt_bin/"yubikey-agent", "-l", var/"run/yubikey-agent.sock"] + keep_alive true + log_path var/"log/yubikey-agent.log" + error_log_path var/"log/yubikey-agent.log" + end + + test do + socket = testpath/"yubikey-agent.sock" + spawn bin/"yubikey-agent", "-l", socket + sleep 1 + assert_path_exists socket + end +end diff --git a/Formula/y/yuicompressor.rb b/Formula/y/yuicompressor.rb new file mode 100644 index 0000000000000..6661bfb2ae340 --- /dev/null +++ b/Formula/y/yuicompressor.rb @@ -0,0 +1,38 @@ +class Yuicompressor < Formula + desc "Yahoo! JavaScript and CSS compressor" + homepage "https://yui.github.io/yuicompressor/" + url "https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip" + sha256 "3243fd79cb68cc61a5278a8ff67a0ad6a2d825c36464594b66900ad8426a6a6e" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "85fa9d1169b77f59259088ebe086f6611f7d14b87216c4e3ed0090f3c04f34cd" + end + + depends_on "openjdk" + + def install + libexec.install "yuicompressor-#{version}.jar" + bin.write_jar_script libexec/"yuicompressor-#{version}.jar", "yuicompressor" + end + + test do + path = testpath/"test.js" + path.write <<~JAVASCRIPT + var i = 1; // foo + console.log(i); // bar + JAVASCRIPT + + output = shell_output("#{bin}/yuicompressor --nomunge --preserve-semi #{path}").strip + assert_equal "var i=1;console.log(i);", output + end +end diff --git a/Formula/y/yuque-dl.rb b/Formula/y/yuque-dl.rb new file mode 100644 index 0000000000000..cfb8446b88e56 --- /dev/null +++ b/Formula/y/yuque-dl.rb @@ -0,0 +1,29 @@ +class YuqueDl < Formula + desc "Knowledge base downloader for Yuque" + homepage "https://github.com/gxr404/yuque-dl" + url "https://registry.npmjs.org/yuque-dl/-/yuque-dl-1.0.81.tgz" + sha256 "41039640509fd213938a7c412fec8a43492d52d30bf3fbdcf5f34c905c7a5b8c" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_tahoe: "41436c29a4665958f28a894c089416172431d55f781ba6211901e97de4a177a8" + sha256 cellar: :any, arm64_sequoia: "d226c087bc29796c3d6fa3064f93c7afd0b547b274dc7facaefa4102437462e7" + sha256 cellar: :any, arm64_sonoma: "d226c087bc29796c3d6fa3064f93c7afd0b547b274dc7facaefa4102437462e7" + sha256 cellar: :any, sonoma: "000953329ce9afabd28ab3de15ee079a3f6e0f36bbdde017d95d9236e8c9f30d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba5fe4834fec519d47a46ae1dd53bce11a4403b783bb8df10c8c810b1fdc8476" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7237877d2337be79ddfb00999acd2aa3e02ac17ba8d46e07fa812930e0507bba" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match version.to_s, shell_output("#{bin}/yuque-dl --version") + + assert_match "Please enter a valid URL", shell_output("#{bin}/yuque-dl test 2>&1", 1) + end +end diff --git a/Formula/y/yutu.rb b/Formula/y/yutu.rb new file mode 100644 index 0000000000000..09e81e174094a --- /dev/null +++ b/Formula/y/yutu.rb @@ -0,0 +1,45 @@ +class Yutu < Formula + desc "MCP server and CLI for YouTube" + homepage "https://github.com/eat-pray-ai/yutu" + url "https://github.com/eat-pray-ai/yutu/archive/refs/tags/v0.10.3.tar.gz" + sha256 "00c4ee6850705ae4557733580d9ebbd9f378a28eb39f3a261fb5df10e8764423" + license "Apache-2.0" + head "https://github.com/eat-pray-ai/yutu.git", branch: "main" + + livecheck do + url :stable + regex(/^v(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9d33cf0182cf6ff04a769a81a44bb0945a1dd624411e7481602effd6b70020db" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d33cf0182cf6ff04a769a81a44bb0945a1dd624411e7481602effd6b70020db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9d33cf0182cf6ff04a769a81a44bb0945a1dd624411e7481602effd6b70020db" + sha256 cellar: :any_skip_relocation, sonoma: "fd3c7e56880e904d1837b2ce878f7282f0a7a8fc1b665bcc25ba636ade375eb1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fd8a1d662ef8836fc99240dddab3edb5955719ec36d9465dc9432819454dffc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3e5c22981d232278c70dc658e0c12218ae1e20482c7cb6cdfc5177b50078564" + end + + depends_on "go" => :build + + def install + mod = "github.com/eat-pray-ai/yutu/cmd" + ldflags = %W[ + -s -w + -X #{mod}.Os=#{OS.mac? ? "darwin" : "linux"} + -X #{mod}.Arch=#{Hardware::CPU.arch} + -X #{mod}.Version=v#{version} + -X #{mod}.CommitDate=#{time.iso8601} + -X #{mod}.Builder=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"yutu", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/yutu version 2>&1") + + assert_match "failed to parse client secret", shell_output("#{bin}/yutu auth 2>&1", 1) + end +end diff --git a/Formula/y/yydecode.rb b/Formula/y/yydecode.rb new file mode 100644 index 0000000000000..36f82bc2ece08 --- /dev/null +++ b/Formula/y/yydecode.rb @@ -0,0 +1,40 @@ +class Yydecode < Formula + desc "Decode yEnc archives" + homepage "https://yydecode.sourceforge.net/" + url "https://downloads.sourceforge.net/project/yydecode/yydecode/0.2.10/yydecode-0.2.10.tar.gz" + sha256 "bd4879643f6539770fd23d1a51dc6a91ba3de2823cf14d047a40c630b3c7ba66" + license "GPL-2.0-or-later" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "054034a4990c7dab07cc32767d6d851fef67b58993c276573c8d510fd59698fe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b24e0faa262eecd027d92d536e2975069785ddbb69be173b74091903c6066af2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1194156e2ec7b87746123e20fc848784605d1270e8764d9868a35dd7bea55e99" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f42ef32de3ecc81a603e7b8643a321bcf7af9f564224756d8544479b2df6be7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a2b69a15d8d9928ae09b77b310408111186ee22fea50ce4d06a563f1b61cb1fa" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "83fcf98a8fbf68bf2ce8c5847b53730856f65f8139bda8506a912e4650020e8d" + sha256 cellar: :any_skip_relocation, sonoma: "ef2573d29ca6a691e1fc860b765b08c0955d1be74ab29bf63dba51f62860f30c" + sha256 cellar: :any_skip_relocation, ventura: "0874c4fcf0259dbb8ee3fa756cd77f1ddd4a777d66b9bdef00591749bb791298" + sha256 cellar: :any_skip_relocation, monterey: "851194515f4b14bdcd0c7e2849b1e8f68222e9fd90494ae16281b9967355ff1a" + sha256 cellar: :any_skip_relocation, big_sur: "4700a77bb5b4bbce8b34f92662661cf13f9560c1637256fd8dc9581ec7caf077" + sha256 cellar: :any_skip_relocation, catalina: "206152a71458e053c332c7ca52f6db716b146e993c08384afb98e56a43c043b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ce7595e4ff21d9847be7d4ed031f11144a86dc19222edcbad7a1539ba1e8e32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2bc48318a8c556b45209f4c7a8bb41c638767ba44166f219f8cc67b94b7be8a2" + end + + def install + # Redefinition of type found in 10.13 system headers + # https://sourceforge.net/p/yydecode/bugs/5/ + inreplace "src/crc32.h", "typedef unsigned long int u_int32_t;", "" if DevelopmentTools.clang_build_version >= 900 + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end +end diff --git a/Formula/y/yyjson.rb b/Formula/y/yyjson.rb new file mode 100644 index 0000000000000..d5963289af4bf --- /dev/null +++ b/Formula/y/yyjson.rb @@ -0,0 +1,68 @@ +class Yyjson < Formula + desc "High performance JSON library written in ANSI C" + homepage "https://github.com/ibireme/yyjson" + url "https://github.com/ibireme/yyjson/archive/refs/tags/0.12.0.tar.gz" + sha256 "b16246f617b2a136c78d73e5e2647c6f1de1313e46678062985bdcf1f40bb75d" + license "MIT" + head "https://github.com/ibireme/yyjson.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "d416441b16b8711e09fc69b58bd20996d5e89c1d79bfeee6a38056b3fe860d84" + sha256 cellar: :any, arm64_sequoia: "10404c0fedca884468cb47b57e185ee54e21f0f9010a18047123f717970dc28a" + sha256 cellar: :any, arm64_sonoma: "0a16ceb0708e9ca44bb42c7d7dd5190984d5b83b7c7627148ecb607089e695e4" + sha256 cellar: :any, arm64_ventura: "cbd69152fd22ccd9b9de97251c1c2f7243283f7cef0174f51a26eec878f5e687" + sha256 cellar: :any, sonoma: "474db0266ef4054ad4cfe009ecc297a36085383f27b64099f7f98f3eca54b1be" + sha256 cellar: :any, ventura: "27ed6f49a4b4ec723e016576595bc05b09023ea1a2d431ce99d96b0fcf8fa2a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e8f897689182345192194e1ee03c735d41694c43183814123d7c25f6190d084" + sha256 cellar: :any_skip_relocation, x86_64_linux: "add1ef7d14987dd39a1a1404ed435db18a4d12e56fe9e09772e857623749f630" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + const char *json = "{\\"name\\":\\"John\\",\\"star\\":4,\\"hits\\":[2,2,1,3]}"; + yyjson_doc *doc = yyjson_read(json, strlen(json), 0); + yyjson_val *root = yyjson_doc_get_root(doc); + + yyjson_val *name = yyjson_obj_get(root, "name"); + printf("name: %s\\n", yyjson_get_str(name)); + printf("name length: %d\\n", (int)yyjson_get_len(name)); + + yyjson_val *star = yyjson_obj_get(root, "star"); + printf("star: %d\\n", (int)yyjson_get_int(star)); + + yyjson_val *hits = yyjson_obj_get(root, "hits"); + size_t idx, max; + yyjson_val *hit; + yyjson_arr_foreach(hits, idx, max, hit) { + printf("hit[%d]: %d\\n", (int)idx, (int)yyjson_get_int(hit)); + } + + yyjson_doc_free(doc); + } + C + + expected_output = <<~EOS + name: John + name length: 4 + star: 4 + hit[0]: 2 + hit[1]: 2 + hit[2]: 1 + hit[3]: 3 + EOS + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lyyjson", "-o", "test" + assert_equal expected_output, shell_output(testpath/"test") + end +end diff --git a/Formula/yacas.rb b/Formula/yacas.rb deleted file mode 100644 index 1506232f8c121..0000000000000 --- a/Formula/yacas.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Yacas < Formula - desc "General purpose computer algebra system" - homepage "https://www.yacas.org/" - url "https://github.com/grzegorzmazur/yacas/archive/v1.6.1.tar.gz" - sha256 "6b94394f705bed70a9d104967073efd6c23e9eb1a832805c4d805ef875555ae5" - - bottle do - cellar :any - sha256 "33d32dbda388df190fa352f24cd6792f8d98a8af0a36fdd2f9d8951ae9c4e03a" => :high_sierra - sha256 "6aef11d42795146a35f9f3b374dfdfbe79b89b5a57c15a7fb3510d27b522c251" => :sierra - sha256 "807fafec64ac4c3589f5b760299d3b8fd42b29a66a914a5e6c119337a63bb6ab" => :el_capitan - sha256 "c7fb1eb19bdb219645ed2bc94cfed491de1c2eb1f770dfd7a7b4cc63871f0dab" => :yosemite - end - - depends_on "cmake" => :build - depends_on :xcode => :build - - def install - mkdir "build" do - system "cmake", "..", "-G", "Xcode", "-DENABLE_CYACAS_GUI=OFF", - "-DENABLE_CYACAS_KERNEL=OFF", *std_cmake_args - xcodebuild "-target", "ALL_BUILD", "-project", "YACAS.xcodeproj", - "-configuration", "Release", "SYMROOT=build/cyacas/libyacas" - end - bin.install "build/cyacas/libyacas/Release/yacas" - lib.install Dir["build/cyacas/libyacas/Release/{libyacas.a,yacas.framework}"] - pkgshare.install "scripts" - end - - test do - assert_match version.to_s, shell_output("#{bin}/yacas -v") - end -end diff --git a/Formula/yadm.rb b/Formula/yadm.rb deleted file mode 100644 index d833d9074cd35..0000000000000 --- a/Formula/yadm.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Yadm < Formula - desc "Yet Another Dotfiles Manager" - homepage "https://thelocehiliosan.github.io/yadm/" - url "https://github.com/TheLocehiliosan/yadm/archive/1.12.0.tar.gz" - sha256 "c3d612d01e2027d5f457e0f7d120bc67251b716c373d99fe70638bd86edf107f" - - bottle :unneeded - - def install - bin.install "yadm" - man1.install "yadm.1" - bash_completion.install "completion/yadm.bash_completion" - zsh_completion.install "completion/yadm.zsh_completion" => "_yadm" - end - - test do - system bin/"yadm", "init" - assert_predicate testpath/".yadm/repo.git/config", :exist?, "Failed to init repository." - assert_match testpath.to_s, shell_output("#{bin}/yadm gitconfig core.worktree") - - # disable auto-alt - system bin/"yadm", "config", "yadm.auto-alt", "false" - assert_match "false", shell_output("#{bin}/yadm config yadm.auto-alt") - - (testpath/"testfile").write "test" - system bin/"yadm", "add", "#{testpath}/testfile" - - system bin/"yadm", "gitconfig", "user.email", "test@test.org" - system bin/"yadm", "gitconfig", "user.name", "Test User" - - system bin/"yadm", "commit", "-m", "test commit" - assert_match "test commit", shell_output("#{bin}/yadm log --pretty=oneline 2>&1") - end -end diff --git a/Formula/yaf.rb b/Formula/yaf.rb deleted file mode 100644 index 624b57156a204..0000000000000 --- a/Formula/yaf.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Yaf < Formula - desc "Yet another flowmeter: processes packet data from pcap(3)" - homepage "https://tools.netsa.cert.org/yaf/" - url "https://tools.netsa.cert.org/releases/yaf-2.10.0.tar.gz" - sha256 "ed13a5d9f4cbbe6e82e2ee894cf3c324b2bb209df7eb95f2be10619bbf13d805" - - bottle do - cellar :any - sha256 "78030c3f91bb5d32077551d79312dc3d6afa7c7ca8d4c408085e49de57f322cc" => :mojave - sha256 "73abcfccad6c16bfbc84add0d00976cc14ea37334d8115a07c6e50a033976eb5" => :high_sierra - sha256 "d5bb7f21d52b91f6c646b6e3418e8b5a48eaf3fd2573788bc72ced80d64dcf31" => :sierra - sha256 "68b68bdf4ae89e1bbe047fe39bab0d7d09b138bf12091378689f100b286d899e" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libfixbuf" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - input = test_fixtures("test.pcap") - output = `#{bin}/yaf --in #{input} | #{bin}/yafscii` - expected = "2014-10-02 10:29:06.168 - 10:29:06.169 (0.001 sec) tcp " \ - "192.168.1.115:51613 => 192.168.1.118:80 71487608:98fc8ced " \ - "S/APF:AS/APF (7/453 <-> 5/578) rtt 0 ms" - assert_equal expected, output.strip - end -end diff --git a/Formula/yafc.rb b/Formula/yafc.rb deleted file mode 100644 index 9b887d06e3614..0000000000000 --- a/Formula/yafc.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Yafc < Formula - desc "Command-line FTP client" - homepage "https://github.com/sebastinas/yafc" - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/y/yafc/yafc_1.3.7.orig.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/y/yafc/yafc_1.3.7.orig.tar.xz" - sha256 "4b3ebf62423f21bdaa2449b66d15e8d0bb04215472cb63a31d473c3c3912c1e0" - revision 2 - - bottle do - sha256 "0f008ef8835a41818a9134d5acf03e0832feb7d52a463f005279c10e745a4d15" => :mojave - sha256 "a94fb7d29a96a322dad97aa8370c54036e792a593043b3ddf2e3536e59433af7" => :high_sierra - sha256 "4a53da30ad16393321ca6e7b23afe335190b798045e9fa78a0ba8fe116e99718" => :sierra - sha256 "ab8dc2d5aa90802d38bbc27344803a84bcce37df8854f7fe19035d3de77b12a2" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libssh" - depends_on "readline" - - def install - args = %W[ - --prefix=#{prefix} - --with-readline=#{Formula["readline"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - download_file = testpath/"512KB.zip" - expected_checksum = Checksum.new("sha256", "07854d2fef297a06ba81685e660c332de36d5d18d546927d30daad6d7fda1541") - output = pipe_output("#{bin}/yafc -W #{testpath} -a ftp://speedtest.tele2.net/", "get #{download_file.basename}", 0) - assert_match version.to_s, output - download_file.verify_checksum expected_checksum - end -end diff --git a/Formula/yajl.rb b/Formula/yajl.rb deleted file mode 100644 index cec5ea409d718..0000000000000 --- a/Formula/yajl.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Yajl < Formula - desc "Yet Another JSON Library" - homepage "https://lloyd.github.io/yajl/" - url "https://github.com/lloyd/yajl/archive/2.1.0.tar.gz" - sha256 "3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a" - - bottle do - cellar :any - rebuild 4 - sha256 "ab562be70a8ff64861d52b170585f52af91a275e6b5974241eaabd0997b990f2" => :mojave - sha256 "3213f11462b3c60a33209c4f5d36c96caf1a9409103012ffb427dd51770ac120" => :high_sierra - sha256 "1f97e0bbc6680ad4735f0c7ecac20ec87531456c3ab1c93c480c5c5a93a33e1c" => :sierra - sha256 "5cfd83bfdbd7c92402f1cecc6b66788e6db0c195880a40263365d8130e47db2f" => :el_capitan - sha256 "600fec6352ac23a66795cce22cb0a555df43eb464c87693299cb4fc2a1307833" => :yosemite - sha256 "d44363e381f2f353387374167520ed166f3c0c756887dab6e015961bd9ba5ff3" => :mavericks - sha256 "d35963d9d40c22e83a878a98a470f88405abf13efa61c7a3a999d7d79724b525" => :mountain_lion - end - - # Configure uses cmake internally - depends_on "cmake" => :build - - def install - ENV.deparallelize - - system "cmake", ".", *std_cmake_args - system "make", "install" - (include/"yajl").install Dir["src/api/*.h"] - end - - test do - output = pipe_output("#{bin}/json_verify", "[0,1,2,3]").strip - assert_equal "JSON is valid", output - end -end diff --git a/Formula/yamcha.rb b/Formula/yamcha.rb deleted file mode 100644 index c56a7d3a54e81..0000000000000 --- a/Formula/yamcha.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Yamcha < Formula - desc "NLP text chunker using Support Vector Machines" - homepage "http://chasen.org/~taku/software/yamcha/" - url "http://chasen.org/~taku/software/yamcha/src/yamcha-0.33.tar.gz" - sha256 "413d4fc0a4c13895f5eb1468e15c9d2828151882f27aea4daf2399c876be27d5" - - bottle do - cellar :any - rebuild 1 - sha256 "37ce1ca98c2de4978de9d8877752570680fffae4c41026c5e560c83b5f4b3473" => :mojave - sha256 "003ba175b22691b3ced58178504a83bda7455cfd599685c0e002ccbf91efb88d" => :high_sierra - sha256 "b9f2e9521d25dafc70617857f32b1742b8bb29046b3ea930eafb3261a0727e36" => :sierra - sha256 "b65fade9c6ddcced1d3c3fc6700f18ed2ddd16b62437fc71f9a85a3568851520" => :el_capitan - sha256 "b038ddce247b7f56041c4325fd01c0ab0b32399d1ca602df37b65739a09b74e0" => :yosemite - sha256 "6b43b01d7d2385706e3259a49e8944368edef3a20755ea4093f4e3ebbf56eb27" => :mavericks - end - - depends_on "tinysvm" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - libexecdir = shell_output("#{bin}/yamcha-config --libexecdir").chomp - assert_equal libexecdir, "#{libexec}/yamcha" - - (testpath/"train.data").write <<~EOS - He PRP B-NP - reckons VBZ B-VP - the DT B-NP - current JJ I-NP - account NN I-NP - deficit NN I-NP - will MD B-VP - narrow VB I-VP - to TO B-PP - only RB B-NP - # # I-NP - 1.8 CD I-NP - billion CD I-NP - in IN B-PP - September NNP B-NP - . . O - - He PRP B-NP - reckons VBZ B-VP - .. - EOS - - system "make", "-j", "1", - "-f", "#{libexecdir}/Makefile", - "CORPUS=train.data", "MODEL=case_study", "train" - - %w[log model se svmdata txtmodel.gz].each do |ext| - assert_predicate testpath/"case_study.#{ext}", :exist? - end - end -end diff --git a/Formula/yamdi.rb b/Formula/yamdi.rb deleted file mode 100644 index 5e671c9fa8e78..0000000000000 --- a/Formula/yamdi.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Yamdi < Formula - desc "Add metadata to Flash video" - homepage "https://yamdi.sourceforge.io/" - url "https://downloads.sourceforge.net/project/yamdi/yamdi/1.9/yamdi-1.9.tar.gz" - sha256 "4a6630f27f6c22bcd95982bf3357747d19f40bd98297a569e9c77468b756f715" - - bottle do - cellar :any_skip_relocation - sha256 "228b23059d21ed0a540d3b19c87f3319bb8f99ff57465b8b313d2063660a8567" => :mojave - sha256 "1c524b6c2d791792b27d15941ecd179b487fbdcd299640f06cbf17bd5f8cf434" => :high_sierra - sha256 "546a4c5400ef75431ecd3a39dbabda5e5599d82ac3f65f6dafc5d3745a90d8e2" => :sierra - sha256 "cfaf451a985b0a8cba24a0131c8e0e9a6102eb4b6c315e045ce258999cb19494" => :el_capitan - sha256 "7041c6dcf877e8e003e2acae68a75ae6a461e92df63fde374157884b52cf2d82" => :yosemite - sha256 "f0a2a40d6667893a51fb5082a3c09685b688a06df2df8d8b42c350c1dd0f6e16" => :mavericks - end - - def install - system ENV.cc, ENV.cflags, "yamdi.c", "-o", "yamdi" - bin.install "yamdi" - man1.install "man1/yamdi.1" - end -end diff --git a/Formula/yaml-cpp.rb b/Formula/yaml-cpp.rb deleted file mode 100644 index ef05d0ebbd1d7..0000000000000 --- a/Formula/yaml-cpp.rb +++ /dev/null @@ -1,44 +0,0 @@ -class YamlCpp < Formula - desc "C++ YAML parser and emitter for YAML 1.2 spec" - homepage "https://github.com/jbeder/yaml-cpp" - url "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.2.tar.gz" - sha256 "e4d8560e163c3d875fd5d9e5542b5fd5bec810febdcba61481fe5fc4e6b1fd05" - revision 1 - - bottle do - cellar :any - sha256 "0ce658deb59e0d2fc5268fbc4f02923770b5be7867ab10e2d2bba339d71bd593" => :mojave - sha256 "cbcedc236b8ec1dbd389de60327e59fc546cf116cccd5d7d5da786fe52a4e7c0" => :high_sierra - sha256 "b332f87fbdda1324e819dd9e4c4f388b58e9c19159b97afe92b2992a17add1b9" => :sierra - end - - depends_on "cmake" => :build - - # Upstream commit from Sep 3 2018 "Improvements to CMake buildsystem" - # which fixes the unexpected installation of Google Test. - # See https://github.com/jbeder/yaml-cpp/issues/539 - patch do - url "https://github.com/jbeder/yaml-cpp/commit/5e79f5eed3d86125468681116e92814d2cf40067.patch?full_index=1" - sha256 "52da989f0dcaca68ae9ee6334155954639506e16cbe3b9bd007dace9e171e4bd" - end - - needs :cxx11 - - def install - system "cmake", ".", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - YAML::Node node = YAML::Load("[0, 0, 0]"); - node[0] = 1; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-lyaml-cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/yamllint.rb b/Formula/yamllint.rb deleted file mode 100644 index a6dd3975bc1fc..0000000000000 --- a/Formula/yamllint.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Yamllint < Formula - include Language::Python::Virtualenv - - desc "Linter for YAML files" - homepage "https://github.com/adrienverge/yamllint" - url "https://github.com/adrienverge/yamllint/archive/v1.13.0.tar.gz" - sha256 "9ead13bb88146703d7856a14ebb3bcd25ef95eacded865236f407f0cbb298c22" - - bottle do - cellar :any - sha256 "4e9977192ece0a101c444370bdcfe3b64c63537fb9eb047ee24725da7b14f693" => :mojave - sha256 "8411e05f14a1027ae18f1ae7eaeddd6b1a8c06225e79b0be51f7230d79c6f614" => :high_sierra - sha256 "1b90ff33ba25db6d6e0a5252df65cda70f12d1e0d183b32c83d941559e9583e3" => :sierra - end - - depends_on "libyaml" - depends_on "python" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "pathspec" do - url "https://files.pythonhosted.org/packages/84/2a/bfee636b1e2f7d6e30dd74f49201ccfa5c3cf322d44929ecc6c137c486c5/pathspec-0.5.9.tar.gz" - sha256 "54a5eab895d89f342b52ba2bffe70930ef9f8d96e398cccf530d21fa0516a873" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"bad.yaml").write <<~EOS - --- - foo: bar: gee - EOS - output = shell_output("#{bin}/yamllint -f parsable -s bad.yaml", 1) - assert_match "syntax error: mapping values are not allowed here", output - - (testpath/"good.yaml").write <<~EOS - --- - foo: bar - EOS - assert_equal "", shell_output("#{bin}/yamllint -f parsable -s good.yaml") - end -end diff --git a/Formula/yank.rb b/Formula/yank.rb deleted file mode 100644 index de7bb57ec17e2..0000000000000 --- a/Formula/yank.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Yank < Formula - desc "Copy terminal output to clipboard" - homepage "https://github.com/mptre/yank" - url "https://github.com/mptre/yank/archive/v1.1.0.tar.gz" - sha256 "7135e8faac75f28e83b8098bcc7a5c36fc430e7c4e17729e785392ad365dfd7d" - - bottle do - cellar :any_skip_relocation - sha256 "fd34ce68912ccb856a143f314080dec53992714d956cc05546dd94552b58d5b2" => :mojave - sha256 "1518adfd6aa39659841fc6193b298e4571c7a6e588f7f15e73dd1f12d7e5cb4f" => :high_sierra - sha256 "ea6abac30a504eadac6017fde6c26272f4bcc39baf44ae78d1b69a1f2e1ac99c" => :sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}", "YANKCMD=pbcopy" - end - - test do - (testpath/"test.exp").write <<~EOS - spawn sh - set timeout 1 - send "echo key=value | #{bin}/yank -d = | cat" - send "\r" - send "\016" - send "\r" - expect { - "value" { send "exit\r"; exit 0 } - timeout { send "exit\r"; exit 1 } - } - EOS - system "expect", "-f", "test.exp" - end -end diff --git a/Formula/yara.rb b/Formula/yara.rb deleted file mode 100644 index 33429fe0d2dc0..0000000000000 --- a/Formula/yara.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Yara < Formula - desc "Malware identification and classification tool" - homepage "https://github.com/VirusTotal/yara/" - url "https://github.com/VirusTotal/yara/archive/v3.8.1.tar.gz" - sha256 "283527711269354d3c60e2705f7f74b1f769d2d35ddba8f7f9ce97d0fd5cb1ca" - revision 1 - head "https://github.com/VirusTotal/yara.git" - - bottle do - cellar :any - sha256 "4c3626f044e8883aeec924eb86a3f911c066dec08a27e3942cd42740dc1d437c" => :mojave - sha256 "33a367347f06bebdac1538402fc1ecebb86658f4aec70c764c8aa98bbc81d7fd" => :high_sierra - sha256 "334989f4b87c6b28b9e5258dab53b5617a11cc096d788f794039e48c40425e26" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl" - - def install - system "./bootstrap.sh" - system "./configure", "--disable-silent-rules", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-dotnet" - system "make", "install" - end - - test do - rules = testpath/"commodore.yara" - rules.write <<~EOS - rule chrout { - meta: - description = "Calls CBM KERNAL routine CHROUT" - strings: - $jsr_chrout = {20 D2 FF} - $jmp_chrout = {4C D2 FF} - condition: - $jsr_chrout or $jmp_chrout - } - EOS - - program = testpath/"zero.prg" - program.binwrite [0x00, 0xc0, 0xa9, 0x30, 0x4c, 0xd2, 0xff].pack("C*") - - assert_equal "chrout #{program}", shell_output("#{bin}/yara #{rules} #{program}").strip - end -end diff --git a/Formula/yarn-completion.rb b/Formula/yarn-completion.rb deleted file mode 100644 index ed43b7bbb31da..0000000000000 --- a/Formula/yarn-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class YarnCompletion < Formula - desc "Bash completion for Yarn" - homepage "https://github.com/dsifford/yarn-completion" - url "https://github.com/dsifford/yarn-completion/archive/v0.8.0.tar.gz" - sha256 "f359dbfd4d9dd28e231e81da16f308e73662fd586546672569a0eac994f2bcd6" - - bottle :unneeded - - def install - bash_completion.install "yarn-completion.bash" => "yarn" - end - - test do - assert_match "complete -F _yarn yarn", - shell_output("source #{bash_completion}/yarn && complete -p yarn") - end -end diff --git a/Formula/yarn.rb b/Formula/yarn.rb deleted file mode 100644 index 1ad5026eea881..0000000000000 --- a/Formula/yarn.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Yarn < Formula - desc "JavaScript package manager" - homepage "https://yarnpkg.com/" - # Should only be updated if the new version is listed as a stable release on the homepage - url "https://yarnpkg.com/downloads/1.12.3/yarn-v1.12.3.tar.gz" - sha256 "02cd4b589ec22c4bdbd2bc5ebbfd99c5e99b07242ad68a539cb37896b93a24f2" - - bottle :unneeded - - depends_on "node" => :recommended - - conflicts_with "hadoop", :because => "both install `yarn` binaries" - - def install - libexec.install Dir["*"] - (bin/"yarn").write_env_script "#{libexec}/bin/yarn.js", :PREFIX => HOMEBREW_PREFIX, :NPM_CONFIG_PYTHON => "/usr/bin/python" - (bin/"yarnpkg").write_env_script "#{libexec}/bin/yarn.js", :PREFIX => HOMEBREW_PREFIX, :NPM_CONFIG_PYTHON => "/usr/bin/python" - inreplace "#{libexec}/package.json", '"installationMethod": "tar"', '"installationMethod": "homebrew"' - end - - test do - (testpath/"package.json").write('{"name": "test"}') - system bin/"yarn", "add", "jquery" - system bin/"yarn", "add", "fsevents", "--build-from-source=true" - end -end diff --git a/Formula/yash.rb b/Formula/yash.rb deleted file mode 100644 index 4b7a782619353..0000000000000 --- a/Formula/yash.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Yash < Formula - desc "Yet another shell: a POSIX-compliant command-line shell" - homepage "https://yash.osdn.jp/" - # Canonical: https://osdn.net/dl/yash/yash-* - url "https://dotsrc.dl.osdn.net/osdn/yash/69353/yash-2.47.tar.xz" - sha256 "931f2e7451d8b1eca2a98caeef7eda0527d96376f9f2c9bec90bc5938e39992e" - - bottle do - sha256 "a80b7e4adc5bb6bbfdb85ad01c761889026617455eb686eca20849c26bfbc159" => :mojave - sha256 "8ceb88372ff9dbf2461994e646b7743c3fb927115fbd540fdd8a163a9c929916" => :high_sierra - sha256 "3b13c76147e4835eeff1b1794eb534deedaf6e787d3871a233f8dd34b9003fe9" => :sierra - sha256 "9fc6669b72248884e4274f695b9188745e5ae8fac359862373efa9a6f98b7469" => :el_capitan - end - - depends_on "gettext" - - def install - system "sh", "./configure", - "--prefix=#{prefix}", - "--enable-array", - "--enable-dirstack", - "--enable-help", - "--enable-history", - "--enable-lineedit", - "--enable-nls", - "--enable-printf", - "--enable-socket", - "--enable-test", - "--enable-ulimit" - system "make", "install" - end - - test do - system "#{bin}/yash", "-c", "echo hello world" - end -end diff --git a/Formula/yasm.rb b/Formula/yasm.rb deleted file mode 100644 index dca6c8627772d..0000000000000 --- a/Formula/yasm.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Yasm < Formula - desc "Modular BSD reimplementation of NASM" - homepage "https://yasm.tortall.net/" - url "https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" - mirror "https://ftp.openbsd.org/pub/OpenBSD/distfiles/yasm-1.3.0.tar.gz" - sha256 "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "a3b57d242cdd13967472fbb5badd774d677428b6f730438d18fd153920dd3620" => :mojave - sha256 "aa12e2f4b22a402405553706681d5c6bde592a1958a7c1e2594a365c29834625" => :high_sierra - sha256 "49aa187cc261f03269c7036f1c39d6ff58d6748a25b247a0c51f8f3ecbf032cd" => :sierra - end - - head do - url "https://github.com/yasm/yasm.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" - end - - def install - args = %W[ - --disable-debug - --prefix=#{prefix} - --disable-python - ] - - # https://github.com/Homebrew/legacy-homebrew/pull/19593 - ENV.deparallelize - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.asm").write <<~EOS - global start - section .text - start: - mov rax, 0x2000004 ; write - mov rdi, 1 ; stdout - mov rsi, qword msg - mov rdx, msg.len - syscall - mov rax, 0x2000001 ; exit - mov rdi, 0 - syscall - section .data - msg: db "Hello, world!", 10 - .len: equ $ - msg - EOS - system "#{bin}/yasm", "-f", "macho64", "test.asm" - system "/usr/bin/ld", "-macosx_version_min", "10.7.0", "-lSystem", "-o", "test", "test.o" - system "./test" - end -end diff --git a/Formula/yaws.rb b/Formula/yaws.rb deleted file mode 100644 index 8a89719a530bb..0000000000000 --- a/Formula/yaws.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Yaws < Formula - desc "Webserver for dynamic content (written in Erlang)" - homepage "http://yaws.hyber.org" - url "http://yaws.hyber.org/download/yaws-2.0.6.tar.gz" - sha256 "69f96f8b9bb574b129b0f258fb8437fdfd8369d55aabc2b5a94f577dde49d00e" - - bottle do - cellar :any_skip_relocation - sha256 "68a2f3e85c7cac4a6377c5eb58bd0a3ae5dc6fb7a72a682e507dbcddf5fa4c48" => :mojave - sha256 "6dddeec2cbce08b47d7b14e31d04b6e2e803965c47f44258dfd136b23f2e531c" => :high_sierra - sha256 "5eb3a9b15641e43e00b9ffb4626d32fa2931a57b1f492c2b2a641036005d6f1e" => :sierra - sha256 "f04163aed1bfe0397bc639d9903f80de457ca4391789049fc13e4f8a6410c798" => :el_capitan - end - - head do - url "https://github.com/klacke/yaws.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "erlang@20" - - # the default config expects these folders to exist - skip_clean "var/log/yaws" - skip_clean "lib/yaws/examples/ebin" - skip_clean "lib/yaws/examples/include" - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}", - # Ensure pam headers are found on Xcode-only installs - "--with-extrainclude=#{MacOS.sdk_path}/usr/include/security" - system "make", "install" - - cd "applications/yapp" do - system "make" - system "make", "install" - end - - # the default config expects these folders to exist - (lib/"yaws/examples/ebin").mkpath - (lib/"yaws/examples/include").mkpath - end - - def post_install - (var/"log/yaws").mkpath - (var/"yaws/www").mkpath - end - - test do - system bin/"yaws", "--version" - end -end diff --git a/Formula/yaz.rb b/Formula/yaz.rb deleted file mode 100644 index 99522177f3d07..0000000000000 --- a/Formula/yaz.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Yaz < Formula - desc "Toolkit for Z39.50/SRW/SRU clients/servers" - homepage "https://www.indexdata.com/yaz" - url "http://ftp.indexdata.dk/pub/yaz/yaz-5.27.0.tar.gz" - sha256 "3db834b30aad941aaee67a3daf0cfc33d6f81e724dd8d54227be201ad93c18f3" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "17be855cdb17f76e27d3cd1af9d6e315dc95551d080a87840395e99552e72847" => :mojave - sha256 "a0c3b60f1af7e578e50bd7a06a01df81d56f17e593ba87417a4876aac142b69c" => :high_sierra - sha256 "de2f2c337ec5beb31c7002d178c8247111817019dede1371a5769ee72f00255b" => :sierra - end - - head do - url "https://github.com/indexdata/yaz.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "icu4c" - - def install - system "./buildconf.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-xml2" - system "make", "install" - end - - test do - # This test converts between MARC8, an obscure mostly-obsolete library - # text encoding supported by yaz-iconv, and UTF8. - marc8file = testpath/"marc8.txt" - marc8file.write "$1!0-!L,i$3i$si$Ki$Ai$O!+=(B" - result = shell_output("#{bin}/yaz-iconv -f marc8 -t utf8 #{marc8file}") - result.force_encoding(Encoding::UTF_8) if result.respond_to?(:force_encoding) - assert_equal "世界こんにちは!", result - - # Test ICU support by running yaz-icu with the example icu_chain - # from its man page. - configfile = testpath/"icu-chain.xml" - configfile.write <<~EOS - - - - - - - - - - EOS - - inputfile = testpath/"icu-test.txt" - inputfile.write "yaz-ICU xy!" - - expectedresult = <<~EOS - 1 1 'yaz' 'yaz' - 2 1 '' '' - 3 1 'icuz' 'ICUz' - 4 1 '' '' - EOS - - result = shell_output("#{bin}/yaz-icu -c #{configfile} #{inputfile}") - assert_equal expectedresult, result - end -end diff --git a/Formula/yaze-ag.rb b/Formula/yaze-ag.rb deleted file mode 100644 index 80a619ebf0e44..0000000000000 --- a/Formula/yaze-ag.rb +++ /dev/null @@ -1,29 +0,0 @@ -class YazeAg < Formula - desc "Yet Another Z80 Emulator (by AG)" - homepage "http://www.mathematik.uni-ulm.de/users/ag/yaze-ag/" - url "http://www.mathematik.uni-ulm.de/users/ag/yaze-ag/devel/yaze-ag-2.40.5_with_keytrans.tar.gz" - version "2.40.5" - sha256 "d46c861eb0725b87dd5567062f277860b98d538fca477d8686f17b36ef39d9bd" - - bottle do - sha256 "86fb203ac02bad9477b7d3c7b78022df5feb126ae08df3ff93238d766f08a362" => :mojave - sha256 "9f3e2a6e51423a97f03e99ed2bca0c7778fcf4f6b223332a824743bdbad20e09" => :high_sierra - sha256 "daa83753710abc22b99dcdb20761673e9022e4205b5ddf225d7a6fdfdf47ed79" => :sierra - sha256 "7df38aea48a13d73f0a040f1775d915b6bc543d7f7daafbb3eda0b77ee4fdbf6" => :el_capitan - end - - def install - inreplace "Makefile_solaris_gcc", "md5sum -b", "md5" - bin.mkpath - system "make", "-f", "Makefile_solaris_gcc", - "BINDIR=#{bin}", - "MANDIR=#{man1}", - "LIBDIR=#{lib}/yaze", - "install" - end - - test do - (testpath/"cpm").mkpath - assert_match "yazerc", shell_output("#{bin}/yaze -v", 1) - end -end diff --git a/Formula/yazpp.rb b/Formula/yazpp.rb deleted file mode 100644 index 3ef8feffca4dc..0000000000000 --- a/Formula/yazpp.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Yazpp < Formula - desc "C++ API for the Yaz toolkit" - homepage "https://www.indexdata.com/yazpp" - url "http://ftp.indexdata.dk/pub/yazpp/yazpp-1.6.5.tar.gz" - sha256 "802537484d4247706f31c121df78b29fc2f26126995963102e19ef378f3c39d2" - - bottle do - cellar :any - sha256 "ad3ae23deb4f16249fbfc8794a30116911a211c76adbc024948cf9b8842a55b4" => :mojave - sha256 "870f730cc4ee76700749f4091d111cb0e9a529d43c1ba7cb40b36807e49d9b76" => :high_sierra - sha256 "794e2e265413005b3c26a0fa38e1ab8957bd1ec13cf4abb63730070181d9beb4" => :sierra - sha256 "292447a86953bb10361130542d2db9e0c0fc410e9be3b13b8c80891fbfaeec20" => :el_capitan - sha256 "6f769c30797af9cb98bf02491706f96b7085eed2d5d05c377e51ca5e0bf8541a" => :yosemite - end - - depends_on "yaz" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/yconalyzer.rb b/Formula/yconalyzer.rb deleted file mode 100644 index 2f80de7084228..0000000000000 --- a/Formula/yconalyzer.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Yconalyzer < Formula - desc "TCP traffic analyzer" - homepage "https://sourceforge.net/projects/yconalyzer/" - url "https://downloads.sourceforge.net/project/yconalyzer/yconalyzer-1.0.4.tar.bz2" - sha256 "3b2bd33ffa9f6de707c91deeb32d9e9a56c51e232be5002fbed7e7a6373b4d5b" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d5b2345a94b2590f9f533f30d3770cc2008ce294fd8c56015f025181ba951b35" => :mojave - sha256 "4341ba620cc2724608dea783a2ddbd3bde93fd2017cc675e906f233941fb4ab3" => :high_sierra - sha256 "3bf190ad069a4ee9423e79415907a684320e8e776916329f46d7620274a03434" => :sierra - sha256 "918ca6d2bca328923ec3ff6e5612e9a0336aad666e993cfb0d1bc42a99758f1c" => :el_capitan - sha256 "e3e3fcebfdd0d25fbdad33c8f2aa13976c70ab4ff4bb81ed1fbae5cb8a7c2ffd" => :yosemite - sha256 "c2c6d2a81a8b13515192b716bac7df7db078e986f8306d37d3b4da5a2f05ccd6" => :mavericks - end - - # Fix build issues issue on OS X 10.9/clang - # Patch reported to upstream - https://sourceforge.net/p/yconalyzer/bugs/3/ - patch :p0, :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - chmod 0755, "./install-sh" - system "make", "install" - end -end -__END__ ---- yconalyzer.cc.orig 2014-01-12 14:15:17.000000000 +0800 -+++ yconalyzer.cc 2014-01-12 14:17:49.000000000 +0800 -@@ -76,19 +76,11 @@ - - #include - --#if __GNUC__ > 2 - #include --using namespace _GLIBCXX_STD; -+using namespace std; - // Linux gcc-3 is not too happy with the format strings we use in BSD. - #define KEY_FMT_STRING "%#8x%#4x" - --#else /* We are using gnu-c <= 2 */ -- --#include --#define KEY_FMT_STRING "%8ux%4hx" -- --#endif -- - static int debug = 0; - static u_short port = 0; - static int nbuckets; diff --git a/Formula/ydcv.rb b/Formula/ydcv.rb deleted file mode 100644 index 3c8bf41369d66..0000000000000 --- a/Formula/ydcv.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Ydcv < Formula - desc "YouDao Console Version" - homepage "https://github.com/felixonmars/ydcv" - url "https://github.com/felixonmars/ydcv/archive/0.6.1.tar.gz" - sha256 "0a01fed567a1045cf6c81da9532ed07852f99dc93c862f59255fda74aab05714" - - bottle :unneeded - - def install - bin.install "src/ydcv.py" => "ydcv" - zsh_completion.install "contrib/zsh_completion" => "_ydcv" - end - - test do - assert_match "hello", shell_output("#{bin}/ydcv 你好") - assert_match "你好", shell_output("#{bin}/ydcv hello") - end -end diff --git a/Formula/ydiff.rb b/Formula/ydiff.rb deleted file mode 100644 index 4eafd24d57163..0000000000000 --- a/Formula/ydiff.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Ydiff < Formula - desc "View colored diff with side by side and auto pager support" - homepage "https://github.com/ymattw/ydiff" - url "https://github.com/ymattw/ydiff/archive/1.1.tar.gz" - sha256 "4c749204d1368557e74392845de22155201484edb2fdb5f97730cd6282c2dcca" - - bottle :unneeded - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", *Language::Python.setup_install_args(libexec) - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - diff_fixture = test_fixtures("test.diff").read - assert_equal diff_fixture, - pipe_output("#{bin}/ydiff -cnever", diff_fixture) - end -end diff --git a/Formula/yelp-tools.rb b/Formula/yelp-tools.rb deleted file mode 100644 index 912bbdc5314e1..0000000000000 --- a/Formula/yelp-tools.rb +++ /dev/null @@ -1,52 +0,0 @@ -class YelpTools < Formula - desc "Tools that help create and edit Mallard or DocBook documentation" - homepage "https://github.com/GNOME/yelp-tools" - url "https://download.gnome.org/sources/yelp-tools/3.28/yelp-tools-3.28.0.tar.xz" - sha256 "82dbfeea2359dfef8ee92c7580c7f03768d12f9bf67d839f03a5e9b0686dc1ac" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "c3f99713403a1529bad9dde8936073d9a28c42a5b1e37d0cd4bf11d5c28257c0" => :mojave - sha256 "10a1f9d0412ea9371a10fe0d8a792e57c345a7ec732c6b6662469ddd57325fc1" => :high_sierra - sha256 "10a1f9d0412ea9371a10fe0d8a792e57c345a7ec732c6b6662469ddd57325fc1" => :sierra - end - - depends_on "gettext" => :build - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "libxml2" => :build - depends_on "libxslt" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - - resource "yelp-xsl" do - url "https://download.gnome.org/sources/yelp-xsl/3.30/yelp-xsl-3.30.1.tar.xz" - sha256 "fcef31c5938c6654976bbabb8b5d0d9e49fa2ce79136db74ca213056fdb8cf39" - end - - def install - resource("yelp-xsl").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - ENV.append_path "PKG_CONFIG_PATH", "#{share}/pkgconfig" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def post_install - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", - "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - end - - test do - system "#{bin}/yelp-new", "task", "ducksinarow" - system "#{bin}/yelp-build", "html", "ducksinarow.page" - system "#{bin}/yelp-check", "validate", "ducksinarow.page" - end -end diff --git a/Formula/yeti.rb b/Formula/yeti.rb deleted file mode 100644 index 09a829fadfe20..0000000000000 --- a/Formula/yeti.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Yeti < Formula - desc "ML-style functional programming language that runs on the JVM" - homepage "https://mth.github.io/yeti/" - url "https://github.com/mth/yeti/archive/v0.9.9.1.tar.gz" - sha256 "c552018993570724313fc0624d225e266cd95e993d121850b34aa706f04e3dfe" - head "https://github.com/mth/yeti.git" - - bottle do - cellar :any_skip_relocation - sha256 "5945caa7c11f1424c971fbd1df5c0e904526dc69b35897bab7c34fcd1a2895e9" => :mojave - sha256 "b9d0083c8220cb02f5b994998149904613bceb589b7fb265bb9964e5af7dbb18" => :high_sierra - sha256 "5298c83ec842d28b26bf4d1cec151e2ae674509c27778de0aeacaf365711e7b9" => :sierra - sha256 "268781d28a766896e5ef40dc5c364b8a40617e6c28a3c96b693eba473c56e660" => :el_capitan - sha256 "a1ef95834d3631f7d04e18fd90786b0c8b0f4e492abe6f665a64d0d31ee768c5" => :yosemite - sha256 "9dd1a7662b45c454c47075ee029c554bf2655423376bd373cde6e15e716e7677" => :mavericks - end - - depends_on "ant" => :build - depends_on :java => "1.8" - - def install - system "ant", "jar" - libexec.install "yeti.jar" - bin.write_jar_script libexec/"yeti.jar", "yeti", "-server" - end - - test do - assert_equal "3\n", shell_output("#{bin}/yeti -e 'do x: x+1 done 2'") - end -end diff --git a/Formula/yetris.rb b/Formula/yetris.rb deleted file mode 100644 index 906e628686342..0000000000000 --- a/Formula/yetris.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Yetris < Formula - desc "Customizable Tetris for the terminal" - homepage "https://github.com/alexdantas/yetris" - url "https://github.com/alexdantas/yetris/archive/v2.3.0.tar.gz" - sha256 "720c222325361e855e2dcfec34f8f0ae61dd418867a87f7af03c9a59d723b919" - - bottle do - cellar :any_skip_relocation - sha256 "ace31e89cefd33d38a65864d7343baad6dbda23aee0ba2a10f6b19480b9708e0" => :mojave - sha256 "21537f5957c5ce90281195e6d962363920bda756a6c965ca107c329ec712f126" => :high_sierra - sha256 "cf350d8daaf62f863b7466477aebea02145abf1f14e50ee56ad324c99dcee018" => :sierra - sha256 "fd08bc62fc0c4687ed7e76fe604c345a647fb52a348c55cf446fcbf52c7af8dd" => :el_capitan - sha256 "a14c5327ab931d7394b3f617422916eafbc76a936ac77e81a959b38aa223dd5e" => :yosemite - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_match "v#{version}", shell_output("#{bin}/yetris --version") - end -end diff --git a/Formula/ykclient.rb b/Formula/ykclient.rb deleted file mode 100644 index 0118a99cdf312..0000000000000 --- a/Formula/ykclient.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ykclient < Formula - desc "Library to validate YubiKey OTPs against YubiCloud" - homepage "https://developers.yubico.com/yubico-c-client/" - url "https://developers.yubico.com/yubico-c-client/Releases/ykclient-2.15.tar.gz" - sha256 "f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016" - - bottle do - rebuild 2 - sha256 "73b153bb1d9f5df3aa3a4ffed206c60bd1f207946b9cb43116985ed0cf76de8e" => :mojave - sha256 "3e1459f192f7f1df756e2071c78ee41fd163b3dee1f09254e8e5ffc0442a2205" => :high_sierra - sha256 "aec1bc9640c8a84089b1d749d689b59862fce858478d180cd6a34a93a34eb370" => :sierra - sha256 "deee73fbd68f44bd86fb07d1f2179313dac4679395d861b821ccf218745ab1c8" => :el_capitan - end - - head do - url "https://github.com/Yubico/yubico-c-client.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "help2man" => :build - depends_on "pkg-config" => :build - - def install - system "autoreconf", "-iv" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - system "make", "check" - end - - test do - assert_equal version.to_s, shell_output("#{bin}/ykclient --version").chomp - end -end diff --git a/Formula/ykman.rb b/Formula/ykman.rb deleted file mode 100644 index ac8c6758e5fc1..0000000000000 --- a/Formula/ykman.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Ykman < Formula - include Language::Python::Virtualenv - - desc "Tool for managing your YubiKey configuration" - homepage "https://developers.yubico.com/yubikey-manager/" - url "https://developers.yubico.com/yubikey-manager/Releases/yubikey-manager-1.0.1.tar.gz" - sha256 "1f915d8899dbcf85b6b9879f5664953ce1edcd5a503a00d03b9c6298900bfc44" - head "https://github.com/Yubico/yubikey-manager.git" - - bottle do - cellar :any - sha256 "d0f7bb3507e7c4f14a8d125e189a3789a7eb2b7febd0965699449b3596dfa75e" => :mojave - sha256 "69fba1dbbe9208d29eb6cdc77aa3d4e34cb617e6d1975e9893d55e856581c6ed" => :high_sierra - sha256 "a4c492c37bec49144c5d93575d0822f3702a91f4316d1bcbe770e71510c9a97c" => :sierra - end - - depends_on "swig" => :build - depends_on "libusb" - depends_on "openssl" - depends_on "python" - depends_on "ykpers" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz" - sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz" - sha256 "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "fido2" do - url "https://files.pythonhosted.org/packages/58/0d/655ef526ab14b8eecc70f773294f15b23402d5184da290c4f23d5d893048/fido2-0.4.0.tar.gz" - sha256 "f8d84aef5b54cccfb5558f399f196d540f8dcba458862214c14f7f66c22a4488" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/97/8d/77b8cedcfbf93676148518036c6b1ce7f8e14bf07e95d7fd4ddcb8cc052f/ipaddress-1.0.22.tar.gz" - sha256 "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz" - sha256 "6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580" - end - - resource "pyscard" do - url "https://files.pythonhosted.org/packages/17/f3/e6e52e3dab39b26450d9fb6385c4a40f883180d6f1ee26ad4567dd243edc/pyscard-1.9.7.tar.gz" - sha256 "412c74c83e7401566e9d3d7b8b5ca965e74582a1f33179b3c1fabf1da73ebf80" - end - - resource "pyusb" do - url "https://files.pythonhosted.org/packages/5f/34/2095e821c01225377dda4ebdbd53d8316d6abb243c9bee43d3888fa91dd6/pyusb-1.0.2.tar.gz" - sha256 "4e9b72cc4a4205ca64fbf1f3fff39a335512166c151ad103e55c8223ac147362" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("#{bin}/ykman --version") - end -end diff --git a/Formula/ykneomgr.rb b/Formula/ykneomgr.rb deleted file mode 100644 index 26001968173c9..0000000000000 --- a/Formula/ykneomgr.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Ykneomgr < Formula - desc "CLI and C library to interact with the CCID-part of the YubiKey NEO" - homepage "https://developers.yubico.com/libykneomgr/" - url "https://developers.yubico.com/libykneomgr/Releases/libykneomgr-0.1.8.tar.gz" - sha256 "2749ef299a1772818e63c0ff5276f18f1694f9de2137176a087902403e5df889" - revision 2 - - bottle do - cellar :any - sha256 "42dbcc5c2c3f33b3c6cfa6a87be4a37153ef68d361374d2cec410cb406a62bb9" => :mojave - sha256 "256291cea42d30f95754e2203cec73a7acef9436be3ad0040ce7d966fc9d8470" => :high_sierra - sha256 "7917d4068d2c68d3309b32ff443622c0540829a9e3cf0053913697c321c74067" => :sierra - sha256 "4ee15391465d785920dde2347b716af4f9c2aa9b38faf8021d7d18f041b7c277" => :el_capitan - end - - head do - url "https://github.com/Yubico/libykneomgr.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gengetopt" => :build - depends_on "libtool" => :build - end - - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "libzip" - - def install - system "make", "autoreconf" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - test do - assert_match "0.1.8", shell_output("#{bin}/ykneomgr --version") - end -end diff --git a/Formula/ykpers.rb b/Formula/ykpers.rb deleted file mode 100644 index 2a199d8545e7b..0000000000000 --- a/Formula/ykpers.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Ykpers < Formula - desc "YubiKey personalization library and tool" - homepage "https://developers.yubico.com/yubikey-personalization/" - url "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.19.0.tar.gz" - sha256 "2bc8afa16d495a486582bad916d16de1f67c0cce9bb0a35c3123376c2d609480" - revision 1 - - bottle do - cellar :any - sha256 "1f4b630767994b8dd587c19a1a29bc09f95333a1a5b0c55a09b49d6cc6686e00" => :mojave - sha256 "cafe1f694f16a7b8d6f4f9f264f57bfa98a6cd99b68bf1bd12f7be2468078b7e" => :high_sierra - sha256 "b2c86248fbf8dee9eb4ddf1fe5394606d821d8b8950b709a7a1499a22a3b2f4a" => :sierra - sha256 "4917acf9815efca0407441ac895478bfba0abc611bb143d65f8c5400b17787c0" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "libyubikey" - - def install - libyubikey_prefix = Formula["libyubikey"].opt_prefix - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-libyubikey-prefix=#{libyubikey_prefix}", - "--with-backend=osx" - system "make", "check" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ykinfo -V 2>&1") - end -end diff --git a/Formula/yle-dl.rb b/Formula/yle-dl.rb deleted file mode 100644 index 012a7fa535321..0000000000000 --- a/Formula/yle-dl.rb +++ /dev/null @@ -1,120 +0,0 @@ -class YleDl < Formula - desc "Download Yle videos from the command-line" - homepage "https://aajanki.github.io/yle-dl/index-en.html" - url "https://github.com/aajanki/yle-dl/archive/20181221.tar.gz" - sha256 "6f9e2813c3af3061cbbb7014e9bbdbdd3994d07cc17b27661f5f972d220a41fc" - head "https://github.com/aajanki/yle-dl.git" - - bottle do - cellar :any_skip_relocation - sha256 "bc968a62ebc8c8ae6ccd63f16a89848eb702ca69fce3c812fcf0516e8361d1e1" => :mojave - sha256 "43c63391413472fe27bcb59edf94ba75c1b4fa0d2e2fa1fb38fb0b0b7d931cfb" => :high_sierra - sha256 "bfdaa520481f92f5aa85adf4809846b669d612fbfe4e8f57816ed7e50a84baca" => :sierra - end - - depends_on "python" - depends_on "rtmpdump" - - resource "AdobeHDS.php" do - # NOTE: yle-dl always installs the HEAD version of AdobeHDS.php. We use a specific commit. - # Check if there are bugfixes at https://github.com/K-S-V/Scripts/commits/master/AdobeHDS.php - url "https://raw.githubusercontent.com/K-S-V/Scripts/7fea932cb012cba8c203d5b46b891167b0f609a6/AdobeHDS.php" - sha256 "b79e8a4c8544953c39b79a622049c4deced57354adb9697e8c73420c12547229" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/0f/9e/26b1d194aab960063b266170e53c39f73ea0d0d3f5ce23313e0ec8ee9bdf/attrs-18.2.0.tar.gz" - sha256 "10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/e1/0f/f8d5e939184547b3bdc6128551b831a62832713aa98c2ccdf8c47ecc7f17/certifi-2018.8.24.tar.gz" - sha256 "376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "defusedxml" do - url "https://files.pythonhosted.org/packages/74/ba/4ba4e89e21b5a2e267d80736ea674609a0a33cc4435a6d748ef04f1f9374/defusedxml-0.5.0.tar.gz" - sha256 "24d7f2f94f7f3cb6061acb215685e5125fbcdc40a857eff9de22518820b0a4f4" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz" - sha256 "67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/4b/20/ddf5eb3bd5c57582d2b4652b4bbcf8da301bdfe5d805cb94e805f4d7464d/lxml-4.2.5.tar.gz" - sha256 "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f" - end - - resource "Mini-AMF" do - url "https://files.pythonhosted.org/packages/c9/a1/153af98d9ca4ae24fb67ab5cb8e4de8ad44fd991739f32d12b9321d6955d/Mini-AMF-0.9.1.tar.gz" - sha256 "0c7839dc843b738cdcf5548e85558e7ebd89a9f6fd029751b0bb4d8b0ca4275b" - end - - resource "pycryptodomex" do - url "https://files.pythonhosted.org/packages/69/e7/5c50af65e3d46a161181089aed939bce185ad61f6cc86779994e9d8280d0/pycryptodomex-3.7.0.tar.gz" - sha256 "9f11823636128acbe4e17c35ff668f4d0a9f3133450753a0675525b6413aa1b0" - end - - resource "PySocks" do - url "https://files.pythonhosted.org/packages/53/12/6bf1d764f128636cef7408e8156b7235b150ea31650d0260969215bb8e7d/PySocks-1.6.8.tar.gz" - sha256 "3fe52c55890a248676fd69dc9e3c4e811718b777834bcaab7a8125cf9deac672" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/40/35/298c36d839547b50822985a2cf0611b3b978a5ab7a5af5562b8ebe3e1369/requests-2.20.1.tar.gz" - sha256 "ea881206e59f41dbd0bd445437d792e43906703fff75ca8ff43ccdb11f33f263" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz" - sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" - end - - resource "configargparse" do - url "https://files.pythonhosted.org/packages/77/61/ae928ce6ab85d4479ea198488cf5ffa371bd4ece2030c0ee85ff668deac5/ConfigArgParse-0.13.0.tar.gz" - sha256 "e6441aa58e23d3d122055808e5e2220fd742dff6e1e51082d2a4e4ed145dd788" - end - - def install - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - (resources - [resource("AdobeHDS.php")]).each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - resource("AdobeHDS.php").stage(pkgshare) - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system "python3", *Language::Python.setup_install_args(libexec) - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - assert_equal "Traileri: 3 minuuttia-2012-05-30T10:51\n", - shell_output("#{bin}/yle-dl --showtitle https://areena.yle.fi/1-1570236") - end -end diff --git a/Formula/yosys.rb b/Formula/yosys.rb deleted file mode 100644 index 99bb019132e01..0000000000000 --- a/Formula/yosys.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Yosys < Formula - desc "Framework for Verilog RTL synthesis" - homepage "http://www.clifford.at/yosys/" - url "https://github.com/cliffordwolf/yosys/archive/yosys-0.8.tar.gz" - sha256 "07760fe732003585b26d97f9e02bcddf242ff7fc33dbd415446ac7c70e85c66f" - - bottle do - sha256 "cf9c8664f16f9dcca779337065b667d1bac5a8787810a3bb354c9fe477ed9629" => :mojave - sha256 "e1b4bf8b03f9afdb4963d860c1a6c4f696373b707aea6ee4eec28399f3b51b1d" => :high_sierra - sha256 "55acf76216af2d941ce39e3a66dbad97a378fba28a55c1818e0ac49867aa2fa8" => :sierra - end - - depends_on "bison" => :build - depends_on "pkg-config" => :build - depends_on "libffi" - depends_on "python" - depends_on "readline" - - def install - system "make", "install", "PREFIX=#{prefix}", "PRETTY=0" - end - - test do - system "#{bin}/yosys", "-p", "hierarchy; proc; opt; techmap; opt;", "-o", "synth.v", "#{pkgshare}/adff2dff.v" - end -end diff --git a/Formula/you-get.rb b/Formula/you-get.rb deleted file mode 100644 index a4be49f8045f2..0000000000000 --- a/Formula/you-get.rb +++ /dev/null @@ -1,31 +0,0 @@ -class YouGet < Formula - include Language::Python::Virtualenv - - desc "Dumb downloader that scrapes the web" - homepage "https://you-get.org/" - url "https://github.com/soimort/you-get/archive/v0.4.1193.tar.gz" - sha256 "74046ba4994630db7f66145f318d76c5c7bc8802a42b8c6e393909b1c86326e8" - head "https://github.com/soimort/you-get.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "9aeefd7b5ecf629880ca3a751573cf413e766daa773543a4242773f20c9144ee" => :mojave - sha256 "46307345a7c375192c370f1b52ca1909fd40a990eb1fa4a0c03784b0ffc4ac20" => :high_sierra - sha256 "27c66dbbe2f8b5d4d3210068e1f36847bff7cf9db320380bf88dcfc547ff1f63" => :sierra - end - - depends_on "python" - depends_on "rtmpdump" - - def install - virtualenv_install_with_resources - end - - def caveats - "To use post-processing options, `brew install ffmpeg` or `brew install libav`." - end - - test do - system bin/"you-get", "--info", "https://youtu.be/he2a4xK8ctk" - end -end diff --git a/Formula/youtube-dl.rb b/Formula/youtube-dl.rb deleted file mode 100644 index 634d70fbe0953..0000000000000 --- a/Formula/youtube-dl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class YoutubeDl < Formula - desc "Download YouTube videos from the command-line" - homepage "https://rg3.github.io/youtube-dl/" - url "https://github.com/rg3/youtube-dl/releases/download/2019.01.02/youtube-dl-2019.01.02.tar.gz" - sha256 "cba43fd3f37d427d90586e94221a46087adf478596e7510f167d42f8be638847" - - head do - url "https://github.com/rg3/youtube-dl.git" - depends_on "pandoc" => :build - end - - bottle :unneeded - - def install - system "make", "PREFIX=#{prefix}" if build.head? - bin.install "youtube-dl" - man1.install "youtube-dl.1" - bash_completion.install "youtube-dl.bash-completion" - zsh_completion.install "youtube-dl.zsh" => "_youtube-dl" - fish_completion.install "youtube-dl.fish" - end - - test do - system "#{bin}/youtube-dl", "--simulate", "https://www.youtube.com/watch?v=he2a4xK8ctk" - system "#{bin}/youtube-dl", "--simulate", "--yes-playlist", "https://www.youtube.com/watch?v=AEhULv4ruL4&list=PLZdCLR02grLrl5ie970A24kvti21hGiOf" - end -end diff --git a/Formula/yq.rb b/Formula/yq.rb deleted file mode 100644 index 4f3244b1d2c25..0000000000000 --- a/Formula/yq.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Yq < Formula - desc "Process YAML documents from the CLI" - homepage "https://github.com/mikefarah/yq" - url "https://github.com/mikefarah/yq/archive/v2.2.0.tar.gz" - sha256 "cae447da53393bc7a61cf7a6411f6c9b9a9a82b4f6bb366a98dca233ef9ac42e" - - bottle do - cellar :any_skip_relocation - sha256 "cad5b210852e4beece0c46eff349de57c62fd2ed2e8a4ac2b9283fb054e2f6fe" => :mojave - sha256 "532b7c852ca3c5468daaf75ef0158a74768639169609fb55f3f735955a877901" => :high_sierra - sha256 "810cc2ebcae5f46ef60cceac883ec1db0695d76b51563471e288f6fdc93ed414" => :sierra - end - - depends_on "go" => :build - depends_on "govendor" => :build - - conflicts_with "python-yq", :because => "both install `yq` executables" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/mikefarah/yq").install buildpath.children - - cd "src/github.com/mikefarah/yq" do - system "govendor", "sync" - system "go", "build", "-o", bin/"yq" - prefix.install_metafiles - end - end - - test do - assert_equal "key: cat", shell_output("#{bin}/yq n key cat").chomp - assert_equal "cat", pipe_output("#{bin}/yq r - key", "key: cat", 0).chomp - end -end diff --git a/Formula/yubico-piv-tool.rb b/Formula/yubico-piv-tool.rb deleted file mode 100644 index 3f106678f3780..0000000000000 --- a/Formula/yubico-piv-tool.rb +++ /dev/null @@ -1,28 +0,0 @@ -class YubicoPivTool < Formula - desc "Command-line tool for the YubiKey PIV application" - homepage "https://developers.yubico.com/yubico-piv-tool/" - url "https://developers.yubico.com/yubico-piv-tool/Releases/yubico-piv-tool-1.6.2.tar.gz" - sha256 "ea61bcd5c75471ed21903967d0121fb090aa4d325ec279a24633e3235fdf231b" - - bottle do - cellar :any - sha256 "6acce9035255fc4cc53f517709704c3300a1f0052bba2d96416b9dfc70c5cbc6" => :mojave - sha256 "4d8f95198ef3fcd9b8f20ec251f74ebac64c7b1c5306e33c4d09750fe0fe67b1" => :high_sierra - sha256 "8a687ec5093815f876df56284c463d32f33d3950f41e81c36c3d1a1d98570e91" => :sierra - end - - depends_on "check" => :build - depends_on "pkg-config" => :build - depends_on "openssl" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "yubico-piv-tool #{version}", shell_output("#{bin}/yubico-piv-tool --version") - end -end diff --git a/Formula/yuicompressor.rb b/Formula/yuicompressor.rb deleted file mode 100644 index 2ff94c827acc9..0000000000000 --- a/Formula/yuicompressor.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Yuicompressor < Formula - desc "Yahoo! JavaScript and CSS compressor" - homepage "https://yui.github.io/yuicompressor/" - url "https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip" - sha256 "3243fd79cb68cc61a5278a8ff67a0ad6a2d825c36464594b66900ad8426a6a6e" - - bottle :unneeded - - def install - libexec.install "yuicompressor-#{version}.jar" - bin.write_jar_script libexec/"yuicompressor-#{version}.jar", "yuicompressor" - end - - test do - path = testpath/"test.js" - path.write <<~EOS - var i = 1; // foo - console.log(i); // bar - EOS - - output = `#{bin}/yuicompressor --nomunge --preserve-semi #{path}`.strip - assert_equal "var i=1;console.log(i);", output - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/yydecode.rb b/Formula/yydecode.rb deleted file mode 100644 index 1232d66412104..0000000000000 --- a/Formula/yydecode.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Yydecode < Formula - desc "Decode yEnc archives" - homepage "https://yydecode.sourceforge.io" - url "https://downloads.sourceforge.net/project/yydecode/yydecode/0.2.10/yydecode-0.2.10.tar.gz" - sha256 "bd4879643f6539770fd23d1a51dc6a91ba3de2823cf14d047a40c630b3c7ba66" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "18d815befe31bcdeaac8edff43cb878f53c34a608fa946c13a14143139bf887a" => :mojave - sha256 "e2e7285f1f2b18b4b99800602d15932dba435f6480c5776e5b57b734727f652f" => :high_sierra - sha256 "91dc4fe34931d45fcebaead39ce505116322c7866e786cf86a7065f9e57b42ac" => :sierra - sha256 "07aa31cabc4f2533df3b5670beed1ba99e3e7dcc3ffb3cf55fff56866e7bf11e" => :el_capitan - end - - def install - # Redefinition of type found in 10.13 system headers - # https://sourceforge.net/p/yydecode/bugs/5/ - if DevelopmentTools.clang_build_version >= 900 - inreplace "src/crc32.h", "typedef unsigned long int u_int32_t;", "" - end - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/z.rb b/Formula/z.rb deleted file mode 100644 index 5255518abda1d..0000000000000 --- a/Formula/z.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Z < Formula - desc "Tracks most-used directories to make cd smarter" - homepage "https://github.com/rupa/z" - url "https://github.com/rupa/z/archive/v1.9.tar.gz" - sha256 "e2860e4f65770e02297ca4ca08ec1ee623a658bd9cc1acddbbe5ad22e1de70a7" - head "https://github.com/rupa/z.git" - - bottle :unneeded - - def install - (prefix/"etc/profile.d").install "z.sh" - man1.install "z.1" - end - - def caveats; <<~EOS - For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc: - . #{etc}/profile.d/z.sh - EOS - end - - test do - (testpath/"zindex").write("/usr/local|1|1491427986\n") - testcmd = "/bin/bash -c '_Z_DATA=#{testpath}/zindex; . #{etc}/profile.d/z.sh; _z -l 2>&1'" - assert_match "/usr/local", pipe_output(testcmd) - end -end diff --git a/Formula/z/z.lua.rb b/Formula/z/z.lua.rb new file mode 100644 index 0000000000000..61c61dc536fb1 --- /dev/null +++ b/Formula/z/z.lua.rb @@ -0,0 +1,35 @@ +class ZLua < Formula + desc "New cd command that helps you navigate faster by learning your habits" + homepage "https://github.com/skywind3000/z.lua" + url "https://github.com/skywind3000/z.lua/archive/refs/tags/1.8.24.tar.gz" + sha256 "ed749f4cdc9ca4315a74dca0918b1e12d5961b9c16754907ef492c4ae0bfccd3" + license "MIT" + head "https://github.com/skywind3000/z.lua.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "66504ee0f41ff9a6094a3fe33f1ebaf4bc57be6d7f1b6dfe7340c0b5bf962c57" + end + + depends_on "lua" + + def install + # Avoid using Cellar paths at runtime. This breaks when z.lua is upgraded. + inreplace "z.lua.plugin.zsh", /^(ZLUA_SCRIPT=").*"$/, "\\1#{opt_pkgshare}/z.lua\"" + pkgshare.install "z.lua", "z.lua.plugin.zsh", "init.fish" + doc.install "README.md", "LICENSE" + end + + def caveats + <<~EOS + Zsh users: add line below to your ~/.zshrc + eval "$(lua $(brew --prefix z.lua)/share/z.lua/z.lua --init zsh)" + + Bash users: add line below to your ~/.bashrc + eval "$(lua $(brew --prefix z.lua)/share/z.lua/z.lua --init bash)" + EOS + end + + test do + system "lua", "#{opt_pkgshare}/z.lua", "." + end +end diff --git a/Formula/z/z.rb b/Formula/z/z.rb new file mode 100644 index 0000000000000..5d4338b672c95 --- /dev/null +++ b/Formula/z/z.rb @@ -0,0 +1,39 @@ +class Z < Formula + desc "Tracks most-used directories to make cd smarter" + homepage "https://github.com/rupa/z" + url "https://github.com/rupa/z/archive/refs/tags/v1.12.tar.gz" + sha256 "7d8695f2f5af6805f0db231e6ed571899b8b375936a8bfca81a522b7082b574e" + license "WTFPL" + version_scheme 1 + head "https://github.com/rupa/z.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "8d048cdf7dd88dfdfe1e89e73a842fb91e743d6e0ec6c60fc99607e0c3d511b0" + end + + def install + (prefix/"etc/profile.d").install "z.sh" + man1.install "z.1" + end + + def caveats + <<~EOS + For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc: + . #{etc}/profile.d/z.sh + EOS + end + + test do + (testpath/"zindex").write("/usr/local|1|1491427986\n") + output = shell_output("/bin/bash -c '_Z_DATA=#{testpath}/zindex; . #{etc}/profile.d/z.sh; _z -l 2>&1'") + assert_match "/usr/local", output + end +end diff --git a/Formula/z/z3.rb b/Formula/z/z3.rb new file mode 100644 index 0000000000000..d4c85e317412f --- /dev/null +++ b/Formula/z/z3.rb @@ -0,0 +1,65 @@ +class Z3 < Formula + desc "High-performance theorem prover" + homepage "https://github.com/Z3Prover/z3" + url "https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.15.4.tar.gz" + sha256 "dae526252cb0585c8c863292ebec84cace4901a014b190a73f14087dd08d252b" + license "MIT" + head "https://github.com/Z3Prover/z3.git", branch: "master" + + livecheck do + url :stable + regex(/z3[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "9f57f90f63a0995a9b56b6f4c94a1c29bd8fd9a474e09f78cba7f64aaf25708c" + sha256 cellar: :any, arm64_sequoia: "df9a167ac9c51be88180cbe464e09c46315c6145e775ca8da76de4d4e261354c" + sha256 cellar: :any, arm64_sonoma: "734ca95d3bcb87f5c62e27294ea3485698ac160a8bc0cb6eafa68ca73f792ce0" + sha256 cellar: :any, sonoma: "daa3779a2ee08f218dd714c80ce78e9451b81340c65efee8a1f44f16dee8aa07" + sha256 cellar: :any_skip_relocation, arm64_linux: "02148c88d3b6adc67f7cb43fc1eb3f8a1a7317838a567e7de95c60cffc4fd208" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aecd2a8e5cc6512f5ad5cc3ba78602236642ac02d4471fc9635383976012236d" + end + + depends_on "cmake" => :build + # Has Python bindings but are supplementary to the main library + # which does not need Python. + depends_on "python@3.14" => [:build, :test] + + def python3 + which("python3.14") + end + + def install + args = %W[ + -DZ3_LINK_TIME_OPTIMIZATION=ON + -DZ3_INCLUDE_GIT_DESCRIBE=OFF + -DZ3_INCLUDE_GIT_HASH=OFF + -DZ3_INSTALL_PYTHON_BINDINGS=ON + -DZ3_BUILD_EXECUTABLE=ON + -DZ3_BUILD_TEST_EXECUTABLES=OFF + -DZ3_BUILD_PYTHON_BINDINGS=ON + -DZ3_BUILD_DOTNET_BINDINGS=OFF + -DZ3_BUILD_JAVA_BINDINGS=OFF + -DZ3_USE_LIB_GMP=OFF + -DPYTHON_EXECUTABLE=#{python3} + -DCMAKE_INSTALL_PYTHON_PKG_DIR=#{Language::Python.site_packages(python3)} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system "make", "-C", "contrib/qprofdiff" + bin.install "contrib/qprofdiff/qprofdiff" + + pkgshare.install "examples" + end + + test do + system ENV.cc, pkgshare/"examples/c/test_capi.c", "-I#{include}", + "-L#{lib}", "-lz3", "-o", testpath/"test" + system "./test" + assert_equal version.to_s, shell_output("#{python3} -c 'import z3; print(z3.get_version_string())'").strip + end +end diff --git a/Formula/z/z80asm.rb b/Formula/z/z80asm.rb new file mode 100644 index 0000000000000..92bfd4a646ae5 --- /dev/null +++ b/Formula/z/z80asm.rb @@ -0,0 +1,46 @@ +class Z80asm < Formula + desc "Assembler for the Zilog Z80 microprcessor and compatibles" + homepage "https://www.nongnu.org/z80asm/" + url "https://download.savannah.gnu.org/releases/z80asm/z80asm-1.8.tar.gz" + sha256 "67fba9940582cddfa70113235818fb52d81e5be3db483dfb0816acb330515f64" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/z80asm/" + regex(/href=.*?z80asm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "196ce6ca6e3dc40b4cc7a96be32fd22c7addc3d411eb227bb8a67407f749810f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ce392c70bff0caa5fd981cb09caca7a54d579c4e1f12c4f4e5644d2934e199fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84f96f8b6e4797f885d8922150ff0faeb5994bf37e851d81941c0070a38aaada" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea09a44bb614b9dd6ed3ccdafc33b517a745a7f51274d2e557ad3f9dc5f2a034" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1b34635e2c41ccbd32935bc104c11a9899a49d9e235c96cfe50ea58ae4423671" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6640cd351024a204230edd8cdb5746ab3ff9aa8c325a5e9515380fa07d8ced84" + sha256 cellar: :any_skip_relocation, sonoma: "e85b48f45856da17f20fdecd98d28067bc6734788615ed640aa55c17fcc53627" + sha256 cellar: :any_skip_relocation, ventura: "b4b724e61c1a4ac3f1d9067635de307fc16ae9a6f2ac0cc3939603a1c0b9ab21" + sha256 cellar: :any_skip_relocation, monterey: "bc9bd7e0dfbbdad344386a242b47e72e67c820d90925c59a600770704416a71f" + sha256 cellar: :any_skip_relocation, big_sur: "ca1a1ffc5104cdbb1914469122c38ecc13ebe60222bab9a3b57d926cf1c68743" + sha256 cellar: :any_skip_relocation, catalina: "0e7b29aa5927fcf70d1f704cdc4d0b73477c39d2f624fff4264ab08a6675959d" + sha256 cellar: :any_skip_relocation, arm64_linux: "eee5efb31003cfb93f245c5135ab4d22e8172474051397733327a942908240e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17f78a08a62f5d5c322080e89ad6fb0d2887c5479b481e816c5253a5898df62d" + end + + def install + system "make" + + bin.install "z80asm" + man1.install "z80asm.1" + end + + test do + path = testpath/"a.asm" + path.write "call 1234h\n" + + system bin/"z80asm", path + code = File.open(testpath/"a.bin", "rb") { |f| f.read.unpack("C*") } + assert_equal [0xcd, 0x34, 0x12], code + end +end diff --git a/Formula/z/z80dasm.rb b/Formula/z/z80dasm.rb new file mode 100644 index 0000000000000..9a847915911e6 --- /dev/null +++ b/Formula/z/z80dasm.rb @@ -0,0 +1,42 @@ +class Z80dasm < Formula + desc "Disassembler for the Zilog Z80 microprocessor and compatibles" + # use debian site for now, cannot use debian mirror as it is still with 1.1.6 + homepage "https://packages.debian.org/sid/z80dasm" + url "https://www.tablix.org/~avian/z80dasm/z80dasm-1.2.0.tar.gz" + mirror "https://geeklan.co.uk/files/z80dasm-1.2.0.tar.gz" + sha256 "8da2c4a58a3917a8229dec0da97e718f90ede84985424d74456575bf5acfeec8" + license "GPL-2.0-or-later" + + livecheck do + url "https://geeklan.co.uk/files/" + regex(/href=.*?z80dasm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "04a71156a5cbb4a8ea20743f25864bb447004f6aabfda1ef23cafede9a5d36ae" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49cc209ae7b34afcfe58fd310bdcb228f6d35cadeee692049a61202bed11176f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a83c07ded5a4004a80cd9fbd9554f2a4395412279c43f50bc8482060c978a6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b7c9cd6783586e4b42b3e23a608fa20e232a70ae2d5754bad8bf317a2f125359" + sha256 cellar: :any_skip_relocation, arm64_monterey: "33d28a1075ff42df7f06221f652dea247c1da6c94eeae6df9169160b3bcfc0a2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "607c7d0bbff5d35b8ddeb6cabaf4a13a3983582409c52cabe875caa29031d8cf" + sha256 cellar: :any_skip_relocation, sonoma: "79f08c8c5e2fd4fcb863fd7717ba083c5e59ef3e63b0009dd7fbd54a782cd93e" + sha256 cellar: :any_skip_relocation, ventura: "f47879873a19e8c08153ae4981bf3b80073a46b0cb898f21207d764434c6a649" + sha256 cellar: :any_skip_relocation, monterey: "3593f87e2f01e8754f88014b5cdbe2875deea710b547390f69edf0412fbe6014" + sha256 cellar: :any_skip_relocation, big_sur: "b6a79ae13c2cbebebc1d511dc11707c466fbab7737483d2665433c6e4484802d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f804e92b96102101c261303a335651172b29e3ee2fd033b0524e2aec3ca1b27b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3974fe69ab6b1bfddf25cdad7ff5e7c462b8df8c6605ef528a067aa5cffbb3ec" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + path = testpath/"a.bin" + path.binwrite [0xcd, 0x34, 0x12].pack("c*") + assert_match "call 01234h", shell_output("#{bin}/z80dasm #{path}") + end +end diff --git a/Formula/z/zabbix-cli.rb b/Formula/z/zabbix-cli.rb new file mode 100644 index 0000000000000..18d4a99306fac --- /dev/null +++ b/Formula/z/zabbix-cli.rb @@ -0,0 +1,171 @@ +class ZabbixCli < Formula + include Language::Python::Virtualenv + + desc "CLI tool for interacting with Zabbix monitoring system" + homepage "https://unioslo.github.io/zabbix-cli/" + url "https://files.pythonhosted.org/packages/5e/91/01eedf8a88792429aaf18e9d35cf7b605bf1643bd9da3c88002d2d0dd4c1/zabbix_cli_uio-3.5.3.tar.gz" + sha256 "691812facae62901a267c8a3c1be6526a22ebe3ef4627fb4a4d0062ea3008158" + license "GPL-3.0-or-later" + head "https://github.com/unioslo/zabbix-cli.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5a309b87d3e491786dcf346775e4835b6a34fd0cb56c4794d656bf01150e8dd2" + end + + depends_on "certifi" => :no_linkage + depends_on "pydantic-core" => :no_linkage + depends_on "python@3.14" + + pypi_packages package_name: "zabbix_cli_uio", + exclude_packages: ["certifi", "pydantic-core"] + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz" + sha256 "82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz" + sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz" + sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz" + sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" + sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + end + + resource "markdown-it-py" do + url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" + sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz" + sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz" + sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/f3/1e/4f0a3233767010308f2fd6bd0814597e3f63f1dc98304a9112b8759df4ff/pydantic-2.12.3.tar.gz" + sha256 "1da1c82b0fc140bb0103bc1441ffe062154c8d38491189751ee00fd8ca65ce74" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz" + sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz" + sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4" + end + + resource "shellingham" do + url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz" + sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + end + + resource "socksio" do + url "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz" + sha256 "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac" + + # Unpin flit-core<3 to support 3.14+ + patch do + url "https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1.patch?full_index=1" + sha256 "7aefa906b62e2c9a8df255ea742ca97e155ac2e1238e49ce11e3e56e37ee1f8b" + end + end + + resource "strenum" do + url "https://files.pythonhosted.org/packages/85/ad/430fb60d90e1d112a62ff57bdd1f286ec73a2a0331272febfddd21f330e1/StrEnum-0.4.15.tar.gz" + sha256 "878fb5ab705442070e4dd1929bb5e2249511c0bcf2b0eeacf3bcd80875c82eff" + + # py3.12 build patch, upstream pr ref, https://github.com/irgeek/StrEnum/pull/34 + patch do + url "https://github.com/irgeek/StrEnum/commit/896bef1b7e4a50c8b53d90c8d2fb5c0164f08ecd.patch?full_index=1" + sha256 "1d74618b970b04d5548e9efa9134010812c20a941e26381d71bc21b06cfc667b" + end + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz" + sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz" + sha256 "ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz" + sha256 "4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605" + end + + def install + # `shellingham` auto-detection doesn't work in Homebrew CI build environment so + # defer installation to allow `typer` to use argument as shell for completions + # Ref: https://typer.tiangolo.com/features/#user-friendly-cli-apps + venv = virtualenv_install_with_resources without: "shellingham" + generate_completions_from_executable(bin/"zabbix-cli", "--show-completion") + venv.pip_install resource("shellingham") + end + + test do + assert_match <<~TOML, shell_output("#{bin}/zabbix-cli sample_config") + [api] + url = "https://zabbix.example.com" + username = "Admin" + password = "" + auth_token = "" + verify_ssl = true + TOML + + assert_match version.to_s, shell_output("#{bin}/zabbix-cli --version") + end +end diff --git a/Formula/z/zabbix.rb b/Formula/z/zabbix.rb new file mode 100644 index 0000000000000..29ba75a2cd0de --- /dev/null +++ b/Formula/z/zabbix.rb @@ -0,0 +1,48 @@ +class Zabbix < Formula + desc "Availability and monitoring solution" + homepage "https://www.zabbix.com/" + url "https://cdn.zabbix.com/zabbix/sources/stable/7.4/zabbix-7.4.5.tar.gz" + sha256 "3eae4bc712f530b2df6624cba03ce23e29b2a11aefac0b6d4c27a64d425fdfc8" + license "AGPL-3.0-only" + head "https://github.com/zabbix/zabbix.git", branch: "master" + + livecheck do + url "https://www.zabbix.com/download_sources" + regex(/href=.*?zabbix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "cdf3b7bfc84c7868c562ce989528e29df6ac0b24bd55c3582ea7e35aec8ba255" + sha256 arm64_sequoia: "a58fdf6c6cdb25731a7c9f33d81575c874c1dbe3caa2d977c75118c29e051e05" + sha256 arm64_sonoma: "7d0e4ee0dd180b439988a9b5dd7186dc67eb788cea976248ee729a5d60ca6db0" + sha256 sonoma: "88187174c74addb3e7dc6aed67d8295f25cca2d418121bd5b6f119fcc37ee819" + sha256 arm64_linux: "5468734596704cc537ca3775a42526ac0d4bc5672106539a009cd0b2b275abc9" + sha256 x86_64_linux: "91608df7612293680de2d0662eb67cdfee576c96ad3b67282bdb67ee8b4cc953" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "pcre2" + + def install + args = %W[ + --enable-agent + --enable-ipv6 + --with-libpcre2 + --sysconfdir=#{pkgetc} + --with-openssl=#{Formula["openssl@3"].opt_prefix} + ] + + if OS.mac? + sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path + args << "--with-iconv=#{sdk}/usr" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system sbin/"zabbix_agentd", "--print" + end +end diff --git a/Formula/z/zanata-client.rb b/Formula/z/zanata-client.rb new file mode 100644 index 0000000000000..aee400ee40283 --- /dev/null +++ b/Formula/z/zanata-client.rb @@ -0,0 +1,43 @@ +class ZanataClient < Formula + desc "Zanata translation system command-line client" + homepage "http://zanata.org/" + url "https://search.maven.org/remotecontent?filepath=org/zanata/zanata-cli/4.6.2/zanata-cli-4.6.2-dist.tar.gz" + sha256 "6d4bac8c5b908abf734ff23e0aca9b05f4bc13e66588c526448f241d90473132" + license "LGPL-2.1-or-later" + revision 2 + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/zanata/zanata-cli/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4e9a444168ef8759f044a71501e69d0d5f5d8e22dd29038bc8f784751341aa8d" + end + + # Deprecated since: + # * No arm64 macOS support: https://docs.brew.sh/Support-Tiers#future-macos-support + # * Still needs OpenJDK 8 + deprecate! date: "2025-09-25", because: :unmaintained + disable! date: "2026-09-25", because: :unmaintained + + depends_on "openjdk@8" # https://github.com/Homebrew/homebrew-core/issues/33480 + + on_macos do + depends_on arch: :x86_64 # openjdk@8 is not supported on ARM + end + + def install + libexec.install Dir["*"] + (bin/"zanata-cli").write_env_script libexec/"bin/zanata-cli", Language::Java.java_home_env("1.8") + bash_completion.install libexec/"bin/zanata-cli-completion" + end + + test do + output = shell_output("#{bin}/zanata-cli --help") + assert_match "Zanata Java command-line client", output + end +end diff --git a/Formula/z/zbar.rb b/Formula/z/zbar.rb new file mode 100644 index 0000000000000..c1958eab7f2fb --- /dev/null +++ b/Formula/z/zbar.rb @@ -0,0 +1,75 @@ +class Zbar < Formula + desc "Suite of barcodes-reading tools" + homepage "https://github.com/mchehab/zbar" + url "https://linuxtv.org/downloads/zbar/zbar-0.23.93.tar.bz2" + sha256 "83be8f85fc7c288fd91f98d52fc55db7eedbddcf10a83d9221d7034636683fa0" + license "LGPL-2.1-only" + revision 2 + + livecheck do + url "https://linuxtv.org/downloads/zbar/" + regex(/href=.*?zbar[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "cc7a5ed357e5cbfed0707cbaf736d9519473252cffa52dff1a449640be47a9af" + sha256 arm64_sequoia: "fe42da9d30318b93a75645b76806c1ffe684db56c7f6c0e608c718f9cc7f8f37" + sha256 arm64_sonoma: "c6a2988931330f8b9330b259d53096e58b25c9c54a3dc167688774412f885993" + sha256 arm64_ventura: "22dcfaed8be4e8e396d6e7f6ca5b9dafc04d83e16c78674a665c0742ba9c0c67" + sha256 sonoma: "63ecefc21c58f41dcc73346b81fd1defabf3f2db855ec4a18fd0b63ec0cd5326" + sha256 ventura: "420f056fecb135dd17684d4f7c62825368e2a0a52df6aabbaaf9823c819d6ba6" + sha256 arm64_linux: "53a60318800d01d8d5571cd82ada66c60dc14a7c739c5f4810358dbbbcbcd649" + sha256 x86_64_linux: "ecb7269a350f91339a4c6c05d014e27f38311431e54e948fa575aacb2056f03e" + end + + head do + url "https://github.com/mchehab/zbar.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + + depends_on "imagemagick" + depends_on "jpeg-turbo" + + on_macos do + depends_on "fontconfig" + depends_on "freetype" + depends_on "gettext" + depends_on "glib" + depends_on "liblqr" + depends_on "libomp" + depends_on "libtool" + depends_on "little-cms2" + end + + on_linux do + depends_on "dbus" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + system "./configure", "--disable-silent-rules", + "--disable-video", + "--without-python", + "--without-qt", + "--without-gtk", + "--without-x", + *std_configure_args + system "make", "install" + end + + test do + system bin/"zbarimg", "-h" + end +end diff --git a/Formula/z/zbctl.rb b/Formula/z/zbctl.rb new file mode 100644 index 0000000000000..bc08fb9dbb0ff --- /dev/null +++ b/Formula/z/zbctl.rb @@ -0,0 +1,41 @@ +class Zbctl < Formula + desc "Zeebe CLI client" + homepage "https://docs.camunda.io/docs/apis-tools/community-clients/cli-client/" + url "https://github.com/camunda-community-hub/zeebe-client-go/archive/refs/tags/v8.6.0.tar.gz" + sha256 "849c3f951b923dfa2bd34443d47bc06b705cb8faa10d2be5e0d411c238dc1f72" + license "Apache-2.0" + head "https://github.com/camunda-community-hub/zeebe-client-go.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "d9815d342170bcaf637c8063e3414537074b11e7c058d2e8f674b57b928ea036" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1489e5d2afe5a0243c62c1387ba42bdd12bceb5882ee85b8f86acea85efb1a7b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1489e5d2afe5a0243c62c1387ba42bdd12bceb5882ee85b8f86acea85efb1a7b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1489e5d2afe5a0243c62c1387ba42bdd12bceb5882ee85b8f86acea85efb1a7b" + sha256 cellar: :any_skip_relocation, sonoma: "4245328e2a26df964fcf9afe06ee3859950aaacdb7e1fdcb3e77971188c74c3e" + sha256 cellar: :any_skip_relocation, ventura: "4245328e2a26df964fcf9afe06ee3859950aaacdb7e1fdcb3e77971188c74c3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a4691f4d70ecc1d630ae132bcb7f32179197ee2d4b156dc11abfa8045db7b95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93dc50b3cfafaf9fd2fe26864fa7e92fb603d8c097a167c40910a3bef58d3ba3" + end + + depends_on "go" => :build + + def install + project = "github.com/camunda-community-hub/zeebe-client-go/v8/cmd/zbctl/internal/commands" + ldflags = "-s -w -X #{project}.Version=#{version} -X #{project}.Commit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:, tags: "netgo"), "./cmd/zbctl" + + generate_completions_from_executable(bin/"zbctl", "completion") + end + + test do + # Check status for a nonexistent cluster + status_error_message = + "Error: rpc error: code = " \ + "Unavailable desc = connection error: " \ + "desc = \"transport: Error while dialing: dial tcp 127.0.0.1:26500: connect: connection refused\"" + output = shell_output("#{bin}/zbctl status 2>&1", 1) + assert_match status_error_message, output + + assert_match version.to_s, shell_output("#{bin}/zbctl version") + end +end diff --git a/Formula/z/zboy.rb b/Formula/z/zboy.rb new file mode 100644 index 0000000000000..3857681475992 --- /dev/null +++ b/Formula/z/zboy.rb @@ -0,0 +1,45 @@ +class Zboy < Formula + desc "GameBoy emulator" + homepage "https://zboy.sourceforge.net/" + url "https://downloads.sourceforge.net/project/zboy/zBoy%20v0.71/zboy-0.71.tar.xz" + sha256 "d359b87e3149418fbe1599247c9ca71e870d213b64a912616ffc6e77d1dff506" + license "GPL-3.0-or-later" + head "https://svn.code.sf.net/p/zboy/code/trunk" + + livecheck do + url :stable + regex(%r{url=.*?/zboy[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "6a88b48f0f07f47bea0da0a31aee45ba535c2f9afc3a612a859c68b322db3e0d" + sha256 cellar: :any, arm64_sequoia: "cb8335a141f8e9a964288509aa204bee9b9a1672286ce0c97e236af7c8afc6a6" + sha256 cellar: :any, arm64_sonoma: "16735e77d0184557a36d147ba19935ef2ddf048a6cad3d63efe90c72065a8c4c" + sha256 cellar: :any, arm64_ventura: "4c1255995acd35d950d0625b1c505b32feeb5f92ba8428e5a91405aca49f5841" + sha256 cellar: :any, arm64_monterey: "19932605bd410edb2aa29dca7ee24442f62323f35118faee2132434a68cf891f" + sha256 cellar: :any, arm64_big_sur: "3ca2df4138ab68a6124473e973ac17161cbb8850388c21cf768008f204361eb6" + sha256 cellar: :any, sonoma: "e0b8bbd2f090406aa2c67b4b3dd1ade28c8007f1b5b96552134e534d50652e37" + sha256 cellar: :any, ventura: "1770fc751708bba11c935142cf5d51ebcda11a816b9d183c270df6b11b52601f" + sha256 cellar: :any, monterey: "e2f20de36150fd9ebb743bf9302083bc75960b6b2760f90b07071475bedc0ba2" + sha256 cellar: :any, big_sur: "932d9411d6f5119849d230a6747e7bd65cade0d64c80128ea2ffee8096797dd2" + sha256 cellar: :any, catalina: "9e143e9227bc22e48d66f7e9f3239374d4d22edc4d0867ffe50f8f60180d27db" + sha256 cellar: :any_skip_relocation, arm64_linux: "21f25a5ddc14d43b31ce8bbceff130e74252568f856359be2e99d3179b1cee8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2baaf6491fe70279c22f669b2a64bd5467506ea9be7aa86807a06519f0b9311" + end + + depends_on "sdl2" + + def install + sdl2 = Formula["sdl2"] + ENV.append_to_cflags "-std=gnu89 -D__zboy4linux__ -DNETPLAY -DLFNAVAIL -I#{sdl2.include} -L#{sdl2.lib}" + inreplace "Makefile.linux", "zboy.o", "zboy.o drv_sdl2.o" + system "make", "-f", "Makefile.linux", "CFLAGS=#{ENV.cflags}" + bin.install "zboy" + end + + test do + system bin/"zboy", "--help" + end +end diff --git a/Formula/z/zchunk.rb b/Formula/z/zchunk.rb new file mode 100644 index 0000000000000..55310bb1e9cea --- /dev/null +++ b/Formula/z/zchunk.rb @@ -0,0 +1,43 @@ +class Zchunk < Formula + desc "Compressed file format for efficient deltas" + homepage "https://github.com/zchunk/zchunk" + url "https://github.com/zchunk/zchunk/archive/refs/tags/1.5.2.tar.gz" + sha256 "b7346d950fec2e0c72761f2a9148b0ece84574c49076585abf4bebd369cd4c60" + license "BSD-2-Clause" + head "https://github.com/zchunk/zchunk.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "7ad04cb097008ae33793a2afb1e575888dc864f848e2e83b901b8b521384549a" + sha256 cellar: :any, arm64_sequoia: "7ba1ba091cf32d2fec41700a1ae975eabc1c3eda4e5684cccb70d243ce83cc9d" + sha256 cellar: :any, arm64_sonoma: "d0aa8e360b30d237429b605947e252d638e46c3f722760fbe519c21befa21fb8" + sha256 cellar: :any, arm64_ventura: "1e582ed4fa32ad63ac2790a6c81eebb1bbc5ab0d0b1b14f942e5f2167206e91e" + sha256 cellar: :any, sonoma: "d491778e21bdcece2786642b5e4eba001ad0d81bbcc98b7dc0f36eb904f71493" + sha256 cellar: :any, ventura: "974a31be8b1069d4b33ef670f97b2c35a4ad17b6c53e7da68815597fbfe3de46" + sha256 arm64_linux: "2e1736d60f357935e2657b2a11f2ac10136d13b9939bfabd4cde4dd296c399c8" + sha256 x86_64_linux: "51c196e07700120f8f76042fc6a9b1ace0ad354813985cd5410eed24e01801b9" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "zstd" + + uses_from_macos "curl" + + on_macos do + depends_on "argp-standalone" => :build + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"zck", test_fixtures("test.png") + system bin/"unzck", testpath/"test.png.zck" + assert_equal test_fixtures("test.png").read, (testpath/"test.png").read + end +end diff --git a/Formula/z/zebra.rb b/Formula/z/zebra.rb new file mode 100644 index 0000000000000..a8dfe6738361a --- /dev/null +++ b/Formula/z/zebra.rb @@ -0,0 +1,53 @@ +class Zebra < Formula + desc "Information management system" + homepage "https://www.indexdata.com/resources/software/zebra/" + url "https://ftp.indexdata.com/pub/zebra/idzebra-2.2.8.tar.gz" + sha256 "879e402b91912e9074275753f24408ed2ac06b3b7c30b2a2d5a70718c869a542" + license "GPL-2.0-or-later" + + livecheck do + url "https://ftp.indexdata.com/pub/zebra/" + regex(/href=.*?idzebra[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_tahoe: "0b1250a55212c784e3de8cd73fd942272815ab6328737c52ff06fc8177a0a2c8" + sha256 arm64_sequoia: "2aa244713add7f2e0e9e28955dc2403c08b79097cbb85fae1ee7d414324eec39" + sha256 arm64_sonoma: "28d8199235458e3a14f907308dfd9c61c1573ce9567d00e15c5d6cd874647660" + sha256 arm64_ventura: "96f2db9df1abc507135f0fbdce0abb6e1083b3e904f0f63da138aa975f26b63e" + sha256 sonoma: "df5e67af2052f424ff930012ccea2688714b433631b054cda2dba1b342815ac9" + sha256 ventura: "ceaa8d50e44bf81722f851f447aef180dfb7b817c496aca1c75c918c5b4dcbe0" + sha256 arm64_linux: "9a09903d831dcaf5a8f0292d08f882ae8162820571f3614fe9247afe2a2fa4d6" + sha256 x86_64_linux: "80fa4c353aa9cb8223576e8a43f4d627051a78a68ede72d8876f93607c2d89e9" + end + + depends_on "icu4c@77" + depends_on "yaz" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "zlib" + + def install + system "./configure", "--disable-silent-rules", + "--enable-mod-text", + "--enable-mod-grs-regx", + "--enable-mod-grs-marc", + "--enable-mod-grs-xml", + "--enable-mod-dom", + "--enable-mod-alvis", + "--enable-mod-safari", + *std_configure_args + system "make", "install" + end + + test do + cd share/"idzebra-2.0-examples/oai-pmh/" do + system bin/"zebraidx-2.0", "-c", "conf/zebra.cfg", "init" + system bin/"zebraidx-2.0", "-c", "conf/zebra.cfg", "commit" + end + end +end diff --git a/Formula/z/zeek.rb b/Formula/z/zeek.rb new file mode 100644 index 0000000000000..62d911167b5cf --- /dev/null +++ b/Formula/z/zeek.rb @@ -0,0 +1,78 @@ +class Zeek < Formula + desc "Network security monitor" + homepage "https://zeek.org/" + url "https://github.com/zeek/zeek/releases/download/v8.0.3/zeek-8.0.3.tar.gz" + sha256 "c178a85e502835cef9584e9a5cb049b4a6abc00bd2bd3c07d4bc3466e5df6eee" + license "BSD-3-Clause" + head "https://github.com/zeek/zeek.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "0edeaf58eb15735700f7f217f7936e9010e314a4724fc8daf742a55688c407b8" + sha256 arm64_sequoia: "aafd8012564786d628a5ca85331f9c718d22750b08c5b7447c1e37a41d629fc9" + sha256 arm64_sonoma: "7cb65983bcc8dd5ff3d4befff4f9ed220f43ce1b39d83fe95e61c4e481f0ad1e" + sha256 sonoma: "c9dc47e1b8d67104ff0f66c3875b06a378ec65f1e1cf9d00459a2d48bb1e2072" + sha256 arm64_linux: "571dff895d843946edcfc9978aa1eaab5410c7584489072aa0b16e22e1657253" + sha256 x86_64_linux: "df23e195c111cae0dc726efc6b695b0885ea22060655a75013f93905078aeb9c" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "flex" => :build + depends_on "swig" => :build + depends_on "c-ares" + depends_on "libmaxminddb" + depends_on "openssl@3" + depends_on "python@3.14" + depends_on "zeromq" + + uses_from_macos "krb5" + uses_from_macos "libpcap" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def install + # Remove SDK paths from zeek-config. This breaks usage with other SDKs. + # https://github.com/Homebrew/homebrew-core/pull/74932 + inreplace "cmake_templates/zeek-config.in" do |s| + s.gsub! "@ZEEK_CONFIG_PCAP_INCLUDE_DIR@", "" + s.gsub! "@ZEEK_CONFIG_ZLIB_INCLUDE_DIR@", "" + end + + # Avoid references to the Homebrew shims directory + inreplace "auxil/spicy/hilti/toolchain/src/config.cc.in", "${CMAKE_CXX_COMPILER}", ENV.cxx + + system "cmake", "-S", ".", "-B", "build", + "-DBROKER_DISABLE_TESTS=on", + "-DINSTALL_AUX_TOOLS=on", + "-DINSTALL_ZEEKCTL=on", + "-DUSE_GEOIP=on", + "-DCARES_ROOT_DIR=#{Formula["c-ares"].opt_prefix}", + "-DCARES_LIBRARIES=#{Formula["c-ares"].opt_lib/shared_library("libcares")}", + "-DLibMMDB_LIBRARY=#{Formula["libmaxminddb"].opt_lib/shared_library("libmaxminddb")}", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + "-DPYTHON_EXECUTABLE=#{which("python3.14")}", + "-DZEEK_ETC_INSTALL_DIR=#{etc}", + "-DZEEK_LOCAL_STATE_DIR=#{var}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "version #{version}", shell_output("#{bin}/zeek --version") + assert_match "ARP packet analyzer", shell_output("#{bin}/zeek --print-plugins") + system bin/"zeek", "-C", "-r", test_fixtures("test.pcap") + assert_path_exists testpath/"conn.log" + refute_empty (testpath/"conn.log").read + assert_path_exists testpath/"http.log" + refute_empty (testpath/"http.log").read + # For bottling MacOS SDK paths must not be part of the public include directories, see zeek/zeek#1468. + refute_includes shell_output("#{bin}/zeek-config --include_dir").chomp, "MacOSX" + end +end diff --git a/Formula/z/zelda-roth-se.rb b/Formula/z/zelda-roth-se.rb new file mode 100644 index 0000000000000..ffd805c8e68d2 --- /dev/null +++ b/Formula/z/zelda-roth-se.rb @@ -0,0 +1,50 @@ +class ZeldaRothSe < Formula + desc "Zelda Return of the Hylian SE" + homepage "https://www.solarus-games.org/games/the-legend-of-zelda-return-of-the-hylian-se/" + url "https://gitlab.com/solarus-games/games/zelda-roth-se/-/archive/v1.2.1/zelda-roth-se-v1.2.1.tar.bz2" + sha256 "1cff44fe97eab1327a0c0d11107ca10ea983a652c4780487f00f2660a6ab23c0" + license all_of: [ + "GPL-3.0-only", # lua scripts + "CC-BY-SA-4.0", # data files + ] + head "https://gitlab.com/solarus-games/games/zelda-roth-se.git", branch: "dev" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "3bf751b6f5b6313d54d4c4356a07dbad2134d30574d18706a761272ad4fef7c7" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b160b73bd9daf53b08f48c16e6642a054c2823114f7651d83270ab468694064" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac1a274fde9642cae0d2b67f7d4589a57f91d5229c83293be45f612fc75b2553" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f6f18d2ea37dd7ddd63d5a050a9944e184d0db94f89fe54c6ad376a0464b65b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f1f9b1fadb798f87d38698f31a0bc8cfb36c21c272087a25fc50256de704d379" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5e526691edaef39b1c1d1ab41b09bf2d821d156c89d7ca6dd585e8599024742f" + sha256 cellar: :any_skip_relocation, sonoma: "b2f38f89648a88d61b5b087e1902175fb208f94764ea1cbd2783ed732d1332c9" + sha256 cellar: :any_skip_relocation, ventura: "2bff31ad635bfa2e8a1b135e3f100b1c24d70682ad915af130e5af9c70d5f873" + sha256 cellar: :any_skip_relocation, monterey: "bd2099609e574fa6b5703c40455f7d7187eda55f938d7418bf4eb2dd68a1dd66" + sha256 cellar: :any_skip_relocation, big_sur: "28b1bd5308092389db177a9b277a29f1da892c1a4a71dd9b12e483a045e52808" + sha256 cellar: :any_skip_relocation, catalina: "1531cd6fc89cca4cc08287e569cdd8b86e41a52bb8c66fb10f6a74bb5006bc24" + sha256 cellar: :any_skip_relocation, arm64_linux: "77a60187f3e237fcdb9b1bfa6346d90cb2db5a4a07a3a74488432c94c84389c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f752b830f0e4e894b560e50ee2418fb889c938ddcdfc85fe9011a528647173e8" + end + + depends_on "cmake" => :build + depends_on "solarus" + + uses_from_macos "zip" => :build + uses_from_macos "unzip" => :test + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DSOLARUS_INSTALL_DATADIR=#{share}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system Formula["solarus"].bin/"solarus-run", "-help" + system "unzip", share/"zelda_roth_se/data.solarus" + end +end diff --git a/Formula/z/zellij.rb b/Formula/z/zellij.rb new file mode 100644 index 0000000000000..8fe38234512c9 --- /dev/null +++ b/Formula/z/zellij.rb @@ -0,0 +1,39 @@ +class Zellij < Formula + desc "Pluggable terminal workspace, with terminal multiplexer as the base feature" + homepage "https://zellij.dev" + url "https://github.com/zellij-org/zellij/archive/refs/tags/v0.43.1.tar.gz" + sha256 "e9fd24190869be6e9e8d731df2ccd0b3b1dd368ae9dbb9d620ec905b83e325ec" + license "MIT" + head "https://github.com/zellij-org/zellij.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f2bd83eaf5758491245bad2de7b8c419052fdbeb6a88cf211376ad36ef6ee564" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9adef9ca8d8f602aa6fc8235a7819782f62763cb25d73bae2ad07275fcf5241" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "872cdd13e33851be3228d5439a58a2660d7eb4e352fcefa0907224009fc8e1cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "36332dd95508a9a366627930f1d0046cb64d146e1cde27fcd29d59ddb79a1627" + sha256 cellar: :any_skip_relocation, sonoma: "3105542ca9a5c013c712429ac137b40311f688028475e9fc098f7ec4be27d65e" + sha256 cellar: :any_skip_relocation, ventura: "54588e7796ad074ba96752ad696178c3424c36a1d9b7fcf7d5a0706a3940a7f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "b22bc4639dffd8290662403848742f65984dc26f17704f34eeef02b03e6a9748" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f4dd025402c9ad4ee3168b8d57c08a9657761343a3eef7fd93c91921a3bac3c" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"zellij", "setup", "--generate-completion") + end + + test do + assert_match("keybinds", shell_output("#{bin}/zellij setup --dump-config")) + assert_match("zellij #{version}", shell_output("#{bin}/zellij --version")) + end +end diff --git a/Formula/z/zenith.rb b/Formula/z/zenith.rb new file mode 100644 index 0000000000000..3f8a62fe165ab --- /dev/null +++ b/Formula/z/zenith.rb @@ -0,0 +1,52 @@ +class Zenith < Formula + desc "In terminal graphical metrics for your *nix system" + homepage "https://github.com/bvaisvil/zenith/" + url "https://github.com/bvaisvil/zenith/archive/refs/tags/0.14.1.tar.gz" + sha256 "73d704b3cbf93506c22f3a7d98ae1a75011434a27a978dd0a7b6b30c7794423b" + license "MIT" + version_scheme 1 + head "https://github.com/bvaisvil/zenith.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2774e00fb53ed4446adc9916a1ffc4a2fd639e862b73fca0b4efde11651b14e9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27a11d6590b2e48b771af993c0b39a3bdfcbc629f97837fb633a199203d1a013" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a756e7ce1451f19ff41f5d41207cb6d7638b081399c365ef5d9ffd0c8beb3794" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b52ba65cef2bd5122e967f6115e83aaf94c7f0016f1005c45614bbf790184ecc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "436fde6c104ba8f224fc7076df51b652f3ff3d9031cfcb08cd5884cde42e4125" + sha256 cellar: :any_skip_relocation, sonoma: "d4172d5c72a51ab8aebba7d4c47070b0a8cefdb40a8b73b928ddd02475dbef81" + sha256 cellar: :any_skip_relocation, ventura: "f177e534fc869dea3f2dc14f4ac29689c646991afd43b7e918b57b55d4a50395" + sha256 cellar: :any_skip_relocation, monterey: "9027e600ac7437f36f97ac6712c0d0183448b11929dc2cde6fb14153a029408c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a63fd0f8939e226783ff561e979b63f40e4c0d6b77cba2fdd4cafc0eb2662abb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4c7423ab047dead7279b56bd10dea35d14b07a58f26f97fef4dd065a8c0b8e5" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + require "pty" + require "io/console" + + (testpath/"zenith").mkdir + cmd = "#{bin}/zenith --db zenith" + cmd += " | tee #{testpath}/out.log" unless OS.mac? # output not showing on PTY IO + r, w, pid = PTY.spawn cmd + r.winsize = [80, 43] + sleep 1 + w.write "q" + output = OS.mac? ? r.read : (testpath/"out.log").read + assert_match(/PID\s+USER\s+P\s+N\s+↓CPU%\s+MEM%/, output.gsub(/\e\[[;\d]*m/, "")) + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/z/zenity.rb b/Formula/z/zenity.rb new file mode 100644 index 0000000000000..00c28e068ed29 --- /dev/null +++ b/Formula/z/zenity.rb @@ -0,0 +1,51 @@ +class Zenity < Formula + desc "GTK+ dialog boxes for the command-line" + homepage "https://wiki.gnome.org/Projects/Zenity" + url "https://download.gnome.org/sources/zenity/4.2/zenity-4.2.0.tar.xz" + sha256 "5f983340c6fa55f4fab5a9769d0771b2cdf1365e2c158ac11cc16ffd892f6bcd" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_tahoe: "52f29d134b4bf09038c3b7f4f0f1379bd21ee829afb440ab584d4042fd3cf67b" + sha256 arm64_sequoia: "6c3c72a9d37c5f11a47a007834398ba25fd8ab52c7b4557df0fa5d296b84a5cb" + sha256 arm64_sonoma: "bc4a0c294fd50b6d8df21d76b263a98a2af53028ae7395e20290acb8ddf072f9" + sha256 sonoma: "570c7c835edc871f19f4d8f02f9873ab7cd1f6f4b294dc5f3a27935a759ca33b" + sha256 arm64_linux: "13e22a75ce878137f853b79c62979fa4a97d06dac6800a8790e2ca5559d5b53f" + sha256 x86_64_linux: "795093321177960a0ce270c95951aae4fcfcd8cfd338b883af34e07cac444e27" + end + + depends_on "gettext" => :build + depends_on "help2man" => :build + depends_on "itstool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "gtk4" + depends_on "libadwaita" + depends_on "pango" + + on_macos do + depends_on "gettext" + end + + def install + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + system Formula["gtk4"].opt_bin/"gtk4-update-icon-cache", "-f", "-t", HOMEBREW_PREFIX/"share/icons/hicolor" + end + + test do + # (zenity:30889): Gtk-WARNING **: 13:12:26.818: cannot open display + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"zenity", "--help" + end +end diff --git a/Formula/z/zero-install.rb b/Formula/z/zero-install.rb new file mode 100644 index 0000000000000..1aef2d556f715 --- /dev/null +++ b/Formula/z/zero-install.rb @@ -0,0 +1,75 @@ +class ZeroInstall < Formula + desc "Decentralised cross-platform software installation system" + homepage "https://0install.net/" + url "https://github.com/0install/0install/releases/download/v2.18/0install-2.18.tbz" + sha256 "648c4b318c1a26dfcb44065c226ab8ca723795924ad80a3bf39ae1ce0e9920c3" + license "LGPL-2.1-or-later" + head "https://github.com/0install/0install.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "72363e55fe980db764f061a8963c2e9fe3fb58370b1daa7fa48ce4bb2729990f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c693f4d80b111a0a5358f8b473320134c026a20d87febc6f827bab257876baff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b751e193e9b5105e46de557b3d09b57dac2e36457358c66d5af441955c98b6b1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "29193da44165014972823b152963e10f4b016964418842bf24e944d9e29d47ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e681ef011946eee260f580f0faaf250803ffe7df97875db1560f24d26de68e44" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ba5899e357c4e98c2116230eee9cad756f51564250471b950503f936f5951306" + sha256 cellar: :any_skip_relocation, sonoma: "813a1b599f5fc67cab8418cd70ddf64a0c7c8f62e78520cb221bf58ea0a54df8" + sha256 cellar: :any_skip_relocation, ventura: "66092ce622c03dda83c74e9d4c92c2241cc43485001c70885450ff0bcc8476f4" + sha256 cellar: :any_skip_relocation, monterey: "f293e6e5c07b33cebf63f868e2582e3dc390c0e2305fcefb7e7b17c5eb6d57fb" + sha256 cellar: :any_skip_relocation, big_sur: "0f4761b5bf5adce56f3a0084b110aa51026cdbd85a152112481484a30878a13b" + sha256 cellar: :any_skip_relocation, catalina: "66a2d596f829de3bab7abf5558b0c4e9e922983ee146930b3755c38f4a593e02" + sha256 arm64_linux: "eaa97baccdef4813578e7a9bd8ad445a65358b1ebd48598ceddf53b0a156859e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcc1fe5759e42d2757f7ab28cdd33eecc9339ef83bf8aebb60cba6d8b5dd94d6" + end + + depends_on "ocaml" => :build + depends_on "opam" => :build + depends_on "pkgconf" => :build + depends_on "gnupg" + + uses_from_macos "python" => :build + uses_from_macos "unzip" => :build + uses_from_macos "curl" + + def install + ENV["OPAMROOT"] = buildpath/".opam" + ENV["OPAMYES"] = "1" + ENV["OPAMVERBOSE"] = "1" + packages = ["./0install.opam", "./0install-solver.opam"] + + system "opam", "init", "--compiler=ocaml-system", "--disable-sandboxing", "--no-setup" + system "opam", "install", *packages, "--deps-only", "--yes", "--no-depexts" + system "opam", "exec", "--", "make", "all" + system "opam", "exec", "--", "dist/install.sh", prefix + end + + test do + (testpath/"hello.sh").write <<~SH + #!/bin/sh + echo "hello world" + SH + chmod 0755, testpath/"hello.sh" + (testpath/"hello.xml").write <<~XML + + + hello-bash + template source package for a bash program + This package demonstrates how to create a simple program that uses bash. + + + + + + + + XML + assert_equal "hello world\n", shell_output("#{bin}/0launch --console hello.xml") + end +end diff --git a/Formula/z/zeromq.rb b/Formula/z/zeromq.rb new file mode 100644 index 0000000000000..818f731bf8a79 --- /dev/null +++ b/Formula/z/zeromq.rb @@ -0,0 +1,68 @@ +class Zeromq < Formula + desc "High-performance, asynchronous messaging library" + homepage "https://zeromq.org/" + url "https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz" + sha256 "6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43" + license "MPL-2.0" + revision 2 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "76e3d40941eb6d5d2ea5f94c017fd3503b68aee2aefc017291ab38b729fbcf08" + sha256 cellar: :any, arm64_sequoia: "03990812828803732fe5253d9940e1a769012068f9af165804d2dd30255aa3c4" + sha256 cellar: :any, arm64_sonoma: "b8cce7aefa5cfeb55f94c81b7f707f1f7f7f7c24da3d91a4dab65fbf6a58cfcf" + sha256 cellar: :any, arm64_ventura: "c02ef7aff4dbf4bb16896ef097ff8aad9ed7fefbb6daf84f7ae244d4e0f5b1ce" + sha256 cellar: :any, sonoma: "d605668191163ba70b7298653eab755dc07cf378244f0795c432cff918069008" + sha256 cellar: :any, ventura: "486b7daf69d76ef858c14fb822ee84d870d6f0c2a012eeaf13690915ce0e370b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1839d81ada31e9622a60dbd0617c9d12709ad290d3b3d2c7d83690e6da756802" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f98a86b96ff8acd27fe0d06f651f376a392a5aa25fd61e084cd26718e241df30" + end + + head do + url "https://github.com/zeromq/libzmq.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "asciidoc" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "xmlto" => :build + + depends_on "libsodium" + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + # Disable libunwind support due to pkg-config problem + # https://github.com/Homebrew/homebrew-core/pull/35940#issuecomment-454177261 + + system "./autogen.sh" if build.head? + system "./configure", "--with-libsodium", "--enable-drafts", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + zmq_msg_t query; + assert(0 == zmq_msg_init_size(&query, 1)); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lzmq", "-o", "test" + system "./test" + system "pkg-config", "libzmq", "--cflags" + system "pkg-config", "libzmq", "--libs" + end +end diff --git a/Formula/z/zet.rb b/Formula/z/zet.rb new file mode 100644 index 0000000000000..a5d7700f03511 --- /dev/null +++ b/Formula/z/zet.rb @@ -0,0 +1,41 @@ +class Zet < Formula + desc "CLI utility to find the union, intersection, and set difference of files" + homepage "https://github.com/yarrow/zet" + url "https://github.com/yarrow/zet/archive/refs/tags/v2.0.1.tar.gz" + sha256 "a6f431927c16b22516e78a9ec7864d99e2676abae3acb46101df1c287e16f267" + license any_of: ["Apache-2.0", "MIT"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "969859a7af56ff259df9c72e15a45dc0fb7ac11a7e0d70264a5f14dcf9efe80f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43ee895f1a866c5279689ea67039f268f036126cdaa95fce89ef694c67c9d469" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eaf4041c27353f5278d0b7f232040a91cd8d87e9a6eb0d6dd6417186f3ab121d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b42203cb1f07a7f436b7c6ba9a98667ca1e55dd65157fe8fb445a3de4b3c9e0" + sha256 cellar: :any_skip_relocation, sonoma: "4f7359f71bb633a4dca674758356c976b74cb8c9b0a78d705c07d33cbd157414" + sha256 cellar: :any_skip_relocation, ventura: "7155960676e9ea9a1e323e80cf7dd1191a63951c097d1339d179873218519677" + sha256 cellar: :any_skip_relocation, arm64_linux: "72716b50cfa1d1d51899f91f61ddf848b6f164e93082f2300a9088ef463921db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85c0892b0c2723950c55e1df613854ef10c21b708392084176ab0917c8a0ba7c" + end + + depends_on "rust" => :build + + # Backport fix for newer Rust + patch do + url "https://github.com/yarrow/zet/commit/7aba3b6016ede0b0a6b8aaff292bd7f6a0d7ac86.patch?full_index=1" + sha256 "9fca853d07ac5a81aafe8513b64ce1ef338f1ff106d7ad2eb16add777ba2e897" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"foo.txt").write("1\n2\n3\n4\n5\n") + (testpath/"bar.txt").write("1\n2\n4\n") + assert_equal "3\n5\n", shell_output("#{bin}/zet diff foo.txt bar.txt") + end +end diff --git a/Formula/z/zf.rb b/Formula/z/zf.rb new file mode 100644 index 0000000000000..1c2ad483c4859 --- /dev/null +++ b/Formula/z/zf.rb @@ -0,0 +1,32 @@ +class Zf < Formula + desc "Command-line fuzzy finder that prioritizes matches on filenames" + homepage "https://github.com/natecraddock/zf" + url "https://github.com/natecraddock/zf/archive/refs/tags/0.10.3.tar.gz" + sha256 "ae8f088dd25a10406e8f7a27d9ddc555d28d746950fd653f4cfe42ab0b903f58" + license "MIT" + head "https://github.com/natecraddock/zf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f605e11345ec11c1b7a06ddb36aed7d62aed6de226427816760b5852f2d432ff" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f697369a780a2b658a20061d85844fabedd36c4473a4b6898c7081399cc8339f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33bb84c18c4c908e3e1940c6ec5206eda1e840dce602b18d1f6d01fe69ffa206" + sha256 cellar: :any_skip_relocation, sonoma: "460904b2df3f8cebf62efe86e5d9092a10f398837e22a40083fc63d54fd8211a" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a0c7534938199aea466bb7bc65e52a3504a01c76126d675daeb0ca1fb564be7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28fadb3d696d45a2c3f1656a5a7e45ecb60054f3a201a6188e33762e1c5a562e" + end + + depends_on "zig" => :build + + def install + system "zig", "build", *std_zig_args + + man1.install "doc/zf.1" + bash_completion.install "complete/zf" + fish_completion.install "complete/zf.fish" + zsh_completion.install "complete/_zf" + end + + test do + assert_equal "zig", pipe_output("#{bin}/zf -f zg", "take\off\every\nzig").chomp + end +end diff --git a/Formula/z/zfind.rb b/Formula/z/zfind.rb new file mode 100644 index 0000000000000..522d8340e8570 --- /dev/null +++ b/Formula/z/zfind.rb @@ -0,0 +1,33 @@ +class Zfind < Formula + desc "Search for files (even inside tar/zip/7z/rar) using a SQL-WHERE filter" + homepage "https://github.com/laktak/zfind" + url "https://github.com/laktak/zfind/archive/refs/tags/v0.4.7.tar.gz" + sha256 "49bc01da8446c8a97182f9794032d851614f0efc75b4f4810a114491a08d3bd4" + license "MIT" + head "https://github.com/laktak/zfind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "9484b12aa34aabcad72ece4f46b0dd3bd97591c180a40363116d3e3f31c6244b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42a14d6e1ee0eb40c0309c893b877c1e7440796eaf7209db195c576362f096e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42a14d6e1ee0eb40c0309c893b877c1e7440796eaf7209db195c576362f096e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "42a14d6e1ee0eb40c0309c893b877c1e7440796eaf7209db195c576362f096e3" + sha256 cellar: :any_skip_relocation, sonoma: "f91bac0d8be49b7de9c64e288c9e8ce3430202d7fa6f258255fa97242dc52786" + sha256 cellar: :any_skip_relocation, ventura: "f91bac0d8be49b7de9c64e288c9e8ce3430202d7fa6f258255fa97242dc52786" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac0501815e21e830c29c41970de83f98ae716601343d65e94a61aa56e4963d0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f07a3ba2af17209191e615c27b235be99fc748fba24f932b15d6005b588a6fb" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.appVersion=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/zfind" + end + + test do + output = shell_output("#{bin}/zfind --csv") + assert_match "name,path,container,size,date,time,ext,ext2,type,archive", output + + assert_match version.to_s, shell_output("#{bin}/zfind --version") + end +end diff --git a/Formula/z/zig.rb b/Formula/z/zig.rb new file mode 100644 index 0000000000000..cbd0ff13b9be7 --- /dev/null +++ b/Formula/z/zig.rb @@ -0,0 +1,176 @@ +class Zig < Formula + desc "Programming language designed for robustness, optimality, and clarity" + homepage "https://ziglang.org/" + url "https://ziglang.org/download/0.15.2/zig-0.15.2.tar.xz" + sha256 "d9b30c7aa983fcff5eed2084d54ae83eaafe7ff3a84d8fb754d854165a6e521c" + license "MIT" + + livecheck do + url "https://ziglang.org/download/" + regex(/href=.*?zig[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "dd70b8ff8c60139a550cf147c62385db650f0a78f6a0886d64e5d3a23300fedf" + sha256 cellar: :any, arm64_sequoia: "57cef8bf8e91f4883be988370fbe8e48c301ded0e578907d73ace9c325f17448" + sha256 cellar: :any, arm64_sonoma: "1f4b7e532d85d0b552fbc7c6434e2dc3da4322630823989ee07665b11f1a3fa9" + sha256 cellar: :any, sonoma: "a6214bdefd13c3f08072d2104480c977925ecb4160b3528b097761d8a2f0fe10" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd03697749a4dbeec55258d7fd5170b2dd73ca29b1510a001a021d5469287197" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87d7f340a2db08d1274e7d7915252db7880705426fc0b592147cde1f0009935e" + end + + depends_on "cmake" => :build + depends_on "lld@20" + depends_on "llvm@20" + depends_on macos: :big_sur # https://github.com/ziglang/zig/issues/13313 + + # NOTE: `z3` should be macOS-only dependency whenever we need to re-add + on_macos do + depends_on "zstd" + end + + conflicts_with "anyzig", because: "both install `zig` binaries" + + # https://github.com/Homebrew/homebrew-core/issues/209483 + skip_clean "lib/zig/libc/darwin/libSystem.tbd" + + # Fix linkage with libc++. + # https://github.com/ziglang/zig/pull/23264 + # Fix max_rss + # https://github.com/Homebrew/homebrew-core/issues/252365 + patch :DATA + + def install + llvm = deps.find { |dep| dep.name.match?(/^llvm(@\d+)?$/) } + .to_formula + if llvm.versioned_formula? && deps.any? { |dep| dep.name == "z3" } + # Don't remove this check even if we're using a versioned LLVM + # to avoid accidentally keeping it when not needed in the future. + odie "`z3` dependency should be removed!" + end + + # Workaround for https://github.com/Homebrew/homebrew-core/pull/141453#discussion_r1320821081. + # This will likely be fixed upstream by https://github.com/ziglang/zig/pull/16062. + if OS.linux? + ENV["NIX_LDFLAGS"] = ENV["HOMEBREW_RPATH_PATHS"].split(":") + .map { |p| "-rpath #{p}" } + .join(" ") + end + + cpu = case Hardware.oldest_cpu # See `zig targets`. + # Cortex A-53 seems to be the oldest available ARMv8-A processor. + # https://en.wikipedia.org/wiki/ARM_Cortex-A53 + when :armv8 then "cortex_a53" + when :arm_vortex_tempest then "apple_m1" + else Hardware.oldest_cpu + end + + args = ["-DZIG_SHARED_LLVM=ON"] + args << "-DZIG_TARGET_MCPU=#{cpu}" if build.bottle? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"hello.zig").write <<~ZIG + const std = @import("std"); + pub fn main() !void { + try std.fs.File.stdout().writeAll("Hello, world!"); + } + ZIG + system bin/"zig", "build-exe", "hello.zig" + assert_equal "Hello, world!", shell_output("./hello") + + arches = ["aarch64", "x86_64"] + systems = ["macos", "linux"] + arches.each do |arch| + systems.each do |os| + system bin/"zig", "build-exe", "hello.zig", "-target", "#{arch}-#{os}", "--name", "hello-#{arch}-#{os}" + assert_path_exists testpath/"hello-#{arch}-#{os}" + file_output = shell_output("file --brief hello-#{arch}-#{os}").strip + if os == "linux" + assert_match(/\bELF\b/, file_output) + assert_match(/\b#{arch.tr("_", "-")}\b/, file_output) + else + assert_match(/\bMach-O\b/, file_output) + expected_arch = (arch == "aarch64") ? "arm64" : arch + assert_match(/\b#{expected_arch}\b/, file_output) + end + end + end + + native_os = OS.mac? ? "macos" : OS.kernel_name.downcase + native_arch = Hardware::CPU.arm? ? "aarch64" : Hardware::CPU.arch + assert_equal "Hello, world!", shell_output("./hello-#{native_arch}-#{native_os}") + + # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 + # https://github.com/ziglang/zig/issues/10377 + ENV.delete "CPATH" + (testpath/"hello.c").write <<~C + #include + int main() { + fprintf(stdout, "Hello, world!"); + return 0; + } + C + system bin/"zig", "cc", "hello.c", "-o", "hello-c" + assert_equal "Hello, world!", shell_output("./hello-c") + + return unless OS.mac? + + # See https://github.com/Homebrew/homebrew-core/pull/211129 + assert_includes (bin/"zig").dynamically_linked_libraries, "/usr/lib/libc++.1.dylib" + end +end + +__END__ +From 8f9216e7d10970c21fcda9e8fe6af91a7e0f7db9 Mon Sep 17 00:00:00 2001 +From: Michael Dusan +Date: Mon, 10 Mar 2025 17:32:00 -0400 +Subject: [PATCH] macos stage3: add link support for system libc++ + +- activates when -DZIG_SHARED_LLVM=ON +- activates when llvm_config is used and --shared-mode is shared +- otherwise vendored libc++ is used + +closes #23189 +--- + build.zig | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/build.zig b/build.zig +index 15762f0ae881..ea729f408f74 100644 +--- a/build.zig ++++ b/build.zig +@@ -782,7 +782,13 @@ fn addCmakeCfgOptionsToExe( + mod.linkSystemLibrary("unwind", .{}); + }, + .ios, .macos, .watchos, .tvos, .visionos => { +- mod.link_libcpp = true; ++ if (static or !std.zig.system.darwin.isSdkInstalled(b.allocator)) { ++ mod.link_libcpp = true; ++ } else { ++ const sdk = std.zig.system.darwin.getSdk(b.allocator, &b.graph.host.result) orelse return error.SdkDetectFailed; ++ const @"libc++" = b.pathJoin(&.{ sdk, "usr/lib/libc++.tbd" }); ++ exe.root_module.addObjectFile(.{ .cwd_relative = @"libc++" }); ++ } + }, + .windows => { + if (target.abi != .msvc) mod.link_libcpp = true; + +-------------------------------------------------------------------------------- +diff --git a/build.zig b/build.zig +index 9e672a4ca7..77959757f7 100644 +--- a/build.zig ++++ b/build.zig +@@ -738,7 +738,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu + fn addCompilerStep(b: *std.Build, options: AddCompilerModOptions) *std.Build.Step.Compile { + const exe = b.addExecutable(.{ + .name = "zig", +- .max_rss = 7_800_000_000, ++ .max_rss = 6_900_000_000, + .root_module = addCompilerMod(b, options), + }); + exe.stack_size = stack_size; diff --git a/Formula/z/zig@0.14.rb b/Formula/z/zig@0.14.rb new file mode 100644 index 0000000000000..bce657ff49830 --- /dev/null +++ b/Formula/z/zig@0.14.rb @@ -0,0 +1,156 @@ +class ZigAT014 < Formula + desc "Programming language designed for robustness, optimality, and clarity" + homepage "https://ziglang.org/" + url "https://ziglang.org/download/0.14.1/zig-0.14.1.tar.xz" + sha256 "237f8abcc8c3fd68c70c66cdbf63dce4fb5ad4a2e6225ac925e3d5b4c388f203" + license "MIT" + + livecheck do + url "https://ziglang.org/download/" + regex(/href=.*?zig[._-]v?(0\.14(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "ed459b4f22e43748e723704ba25ed2019707082ecc27fffb9b2772c7ec8a6d56" + sha256 cellar: :any, arm64_sequoia: "03851d2d9118608f887d97b3674d5a8929699855c73fa7bcf6f6dc7c72fdf70b" + sha256 cellar: :any, arm64_sonoma: "01f5813d555a56abab6d5076bfc93048b7c792336d9839513df1ccef355644d9" + sha256 cellar: :any, arm64_ventura: "bf2bb8d09f1eb6c311609f6d5699206199e06d4d60924e1d19c9e72ba0537b6a" + sha256 cellar: :any, sonoma: "2e77847e273785c7db555a9f563eaeb2cfe65c0d2310862ef404933c28ee6828" + sha256 cellar: :any, ventura: "c7ac8f1ea8b09c4c9706597da2eef4317c56f46801be7fb699b11fde357dfb1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8c0ee0e04b687903f8ee93cf9d2c294dd41b872edbb0ff6938db0a888cad051" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f53b11bf84acc90c55d583801bd50470ac2532bffbb977d8e47401bf38a5679" + end + + keg_only :versioned_formula + + # Unsupported since Zig 0.15 was released on 2025-08-19, but we are + # giving an extra 6 months for dependents to migrate to newer Zig + deprecate! date: "2026-02-19", because: :unsupported + # disable! date: "2026-08-19", because: :unsupported + + depends_on "cmake" => :build + depends_on "lld@19" + depends_on "llvm@19" + depends_on macos: :big_sur # https://github.com/ziglang/zig/issues/13313 + + on_macos do + depends_on "zstd" + end + + # https://github.com/Homebrew/homebrew-core/issues/209483 + skip_clean "lib/zig/libc/darwin/libSystem.tbd" + + # Fix linkage with libc++. + # https://github.com/ziglang/zig/pull/23264 + patch :DATA + + def install + # Workaround for https://github.com/Homebrew/homebrew-core/pull/141453#discussion_r1320821081. + # This will likely be fixed upstream by https://github.com/ziglang/zig/pull/16062. + if OS.linux? + ENV["NIX_LDFLAGS"] = ENV["HOMEBREW_RPATH_PATHS"].split(":") + .map { |p| "-rpath #{p}" } + .join(" ") + end + + cpu = case ENV.effective_arch # See `zig targets`. + when :arm_vortex_tempest then "apple_m1" + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else ENV.effective_arch + end + + args = ["-DZIG_SHARED_LLVM=ON"] + args << "-DZIG_TARGET_MCPU=#{cpu}" if build.bottle? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"hello.zig").write <<~ZIG + const std = @import("std"); + pub fn main() !void { + const stdout = std.io.getStdOut().writer(); + try stdout.print("Hello, world!", .{}); + } + ZIG + system bin/"zig", "build-exe", "hello.zig" + assert_equal "Hello, world!", shell_output("./hello") + + arches = ["aarch64", "x86_64"] + systems = ["macos", "linux"] + arches.each do |arch| + systems.each do |os| + system bin/"zig", "build-exe", "hello.zig", "-target", "#{arch}-#{os}", "--name", "hello-#{arch}-#{os}" + assert_path_exists testpath/"hello-#{arch}-#{os}" + file_output = shell_output("file --brief hello-#{arch}-#{os}").strip + if os == "linux" + assert_match(/\bELF\b/, file_output) + assert_match(/\b#{arch.tr("_", "-")}\b/, file_output) + else + assert_match(/\bMach-O\b/, file_output) + expected_arch = (arch == "aarch64") ? "arm64" : arch + assert_match(/\b#{expected_arch}\b/, file_output) + end + end + end + + native_os = OS.mac? ? "macos" : OS.kernel_name.downcase + native_arch = Hardware::CPU.arm? ? "aarch64" : Hardware::CPU.arch + assert_equal "Hello, world!", shell_output("./hello-#{native_arch}-#{native_os}") + + # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 + # https://github.com/ziglang/zig/issues/10377 + ENV.delete "CPATH" + (testpath/"hello.c").write <<~C + #include + int main() { + fprintf(stdout, "Hello, world!"); + return 0; + } + C + system bin/"zig", "cc", "hello.c", "-o", "hello-c" + assert_equal "Hello, world!", shell_output("./hello-c") + + return unless OS.mac? + + # See https://github.com/Homebrew/homebrew-core/pull/211129 + assert_includes (bin/"zig").dynamically_linked_libraries, "/usr/lib/libc++.1.dylib" + end +end + +__END__ +From 8f9216e7d10970c21fcda9e8fe6af91a7e0f7db9 Mon Sep 17 00:00:00 2001 +From: Michael Dusan +Date: Mon, 10 Mar 2025 17:32:00 -0400 +Subject: [PATCH] macos stage3: add link support for system libc++ + +- activates when -DZIG_SHARED_LLVM=ON +- activates when llvm_config is used and --shared-mode is shared +- otherwise vendored libc++ is used + +closes #23189 +--- + build.zig | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/build.zig b/build.zig +index 15762f0ae881..ea729f408f74 100644 +--- a/build.zig ++++ b/build.zig +@@ -782,7 +782,13 @@ fn addCmakeCfgOptionsToExe( + mod.linkSystemLibrary("unwind", .{}); + }, + .ios, .macos, .watchos, .tvos, .visionos => { +- mod.link_libcpp = true; ++ if (static or !std.zig.system.darwin.isSdkInstalled(b.allocator)) { ++ mod.link_libcpp = true; ++ } else { ++ const sdk = std.zig.system.darwin.getSdk(b.allocator, b.graph.host.result) orelse return error.SdkDetectFailed; ++ const @"libc++" = b.pathJoin(&.{ sdk, "usr/lib/libc++.tbd" }); ++ exe.root_module.addObjectFile(.{ .cwd_relative = @"libc++" }); ++ } + }, + .windows => { + if (target.abi != .msvc) mod.link_libcpp = true; diff --git a/Formula/z/zigmod.rb b/Formula/z/zigmod.rb new file mode 100644 index 0000000000000..48a83ca2d7fe4 --- /dev/null +++ b/Formula/z/zigmod.rb @@ -0,0 +1,75 @@ +class Zigmod < Formula + desc "Package manager for the Zig programming language" + homepage "https://nektro.github.io/zigmod/" + url "https://github.com/nektro/zigmod/archive/refs/tags/r98.tar.gz" + sha256 "a7fc24e2784bf35660e7736b92f63049cbd6c98693724c930a1755284c20cabc" + license "MIT" + + livecheck do + url :stable + regex(/^r(\d+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4e8ed85856fc8f7d8947e41faa35e63bc8f63cd2b8cac1a09ad349107ef663f3" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ff38379c6544b1c8d59e7f8859a8b0f525e28641daf2169cc678dfadf7e08da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81e04b9abb26106139fc02dd432eb6414765fb628fcc94cb438eca21d546b300" + sha256 cellar: :any_skip_relocation, arm64_ventura: "452789666788c8fc49734e0b45e2387766129a7df577680375419299f45a1b23" + sha256 cellar: :any_skip_relocation, sonoma: "59088c6d7e3d66a9831c094a37a2f5cef94f41efdb795c32ff28b158f470a66f" + sha256 cellar: :any_skip_relocation, ventura: "1a50f4a916744e595d706c2981e2de16945ecc0b2b783d98fde78a39bc34f16e" + sha256 cellar: :any_skip_relocation, arm64_linux: "321a231d3ff12fe33ad5fc4056b9e006d16e53e47c8a7d7ac7f0314eaaa87310" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e666d0c5fe0d8de4c76617fd9dbf0584470919b89946b730f637b303ef45ed00" + end + + depends_on "pkgconf" => :build + depends_on "zig@0.14" + + def install + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case Hardware.oldest_cpu + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else Hardware.oldest_cpu + end + + # do not use std_zig_args + # https://github.com/nektro/zigmod/pull/109 + args = %W[ + --prefix #{prefix} + -Dtag=#{version} + -Dmode=ReleaseSafe + -Dstrip=true + -fno-rosetta + ] + + args << "-Dcpu=#{cpu}" if build.bottle? + system "zig", "build", *args + end + + test do + (testpath/"zigmod.yml").write <<~YAML + id: 89ujp8gq842x6mzok8feypwze138n2d96zpugw44hcq7406r + name: zigmod + main: src/lib.zig + license: MIT + description: Test zig.mod + min_zig_version: 0.11.0 + dependencies: + - src: git https://github.com/nektro/zig-yaml + YAML + + (testpath/"src/lib.zig").write <<~ZIG + const std = @import("std"); + pub fn main() !void { + std.log.info("Hello, world!"); + } + ZIG + + system bin/"zigmod", "fetch" + assert_path_exists testpath/"deps.zig" + assert_path_exists testpath/"zigmod.lock" + + assert_match version.to_s, shell_output("#{bin}/zigmod version") + end +end diff --git a/Formula/z/zigup.rb b/Formula/z/zigup.rb new file mode 100644 index 0000000000000..5f170351f7db4 --- /dev/null +++ b/Formula/z/zigup.rb @@ -0,0 +1,54 @@ +class Zigup < Formula + desc "Download and manage zig compilers" + homepage "https://github.com/marler8997/zigup" + url "https://github.com/marler8997/zigup/archive/refs/tags/v2025_05_24.tar.gz" + sha256 "d88e6d9c9629c88aba78c3bae2fb89ae4bea11f2818911f6d5559e7e79bcae69" + license "MIT-0" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + no_autobump! because: :incompatible_version_format + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "50aaa33ea1e56a31d29c250dca2e9b0996a6d6ac61b80371dc29206764291574" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "775c5aa1aef28d3f2894d23725e54b6a34dd710c0eaae2d19cf9bb4aca2f6bf4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e917b9c89562ea0129c9b17120e4043aea935170d243a2c8f8ded2a18761960f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f6692ad6a0d59da6540e3da49f84c7ea37a10ed56009aab4a925d90a039aaf5b" + sha256 cellar: :any_skip_relocation, sonoma: "0e81b978cea25b90e8719244f50e0c4fca8aa4b7681154aaa864d2482f650337" + sha256 cellar: :any_skip_relocation, ventura: "af65106ea1dd8d3f526897bd1d15111773ef20a4ab1d9633a6882a1e825014bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "452d30fb9c7f491fcfa34fb38b47f7b2134887bee6e5a5767e0a9a905030fe26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec4689d639d16b0ddc595eeecf71a24209d8d91bd8a4ffbcdbe2b18e6025715a" + end + + depends_on "zig@0.14" => :build + + def install + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case Hardware.oldest_cpu + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else Hardware.oldest_cpu + end + + args = %W[ + --prefix #{prefix} + --summary all + -fno-rosetta + ] + args << "-Dcpu=#{cpu}" if build.bottle? + system "zig", "build", *args + end + + test do + system bin/"zigup", "fetch-index" + assert_match "install directory", shell_output("#{bin}/zigup list 2>&1") + end +end diff --git a/Formula/z/zile.rb b/Formula/z/zile.rb new file mode 100644 index 0000000000000..7552a083c03b6 --- /dev/null +++ b/Formula/z/zile.rb @@ -0,0 +1,48 @@ +class Zile < Formula + desc "Text editor development kit" + homepage "https://www.gnu.org/software/zile/" + # Before bumping to a new version, check the NEWS file to make sure it is a + # stable release: https://git.savannah.gnu.org/cgit/zile.git/plain/NEWS + # For context, see: https://github.com/Homebrew/homebrew-core/issues/67379 + url "https://ftpmirror.gnu.org/gnu/zile/zile-2.6.4.tar.gz" + mirror "https://ftp.gnu.org/gnu/zile/zile-2.6.4.tar.gz" + sha256 "d5d44b85cb490643d0707e1a2186f3a32998c2f6eabaa9481479b65caeee57c0" + license "GPL-3.0-or-later" + version_scheme 1 + + bottle do + sha256 arm64_tahoe: "efce10489a93b24ac8a9312e993a57b981b38fc3decfc9f36e37ca7cfa49cff5" + sha256 arm64_sequoia: "0d218900aa4e2a8504325c958be05c5e888d83b319dd7f69c4a47d6bd8ad4c2b" + sha256 arm64_sonoma: "64b800f85f1370a2a560b128b16b767dae780c8adfac7384ec8c493c1e998374" + sha256 arm64_ventura: "93a981404b8329b697eaa73bc973bfcac3b941e22ce378c267d8dc4d8b413e7f" + sha256 sonoma: "e2026f3432e32618c9627439100db48f8a36654cf90dbf22c2baa25edc2bb1f5" + sha256 ventura: "c029f82ef50328547756ce4932f995994f42a6c262fd286e596862df8fa22a64" + sha256 arm64_linux: "da6586cbaebf99b3e2656fcd87abaf64f021bf14c9f9f9208acbc8819bc0ec26" + sha256 x86_64_linux: "b580ca192a5f2714cb7cb91ac4d101794c4ae98b1c799c87f73c9970be2bcb93" + end + + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "glib" + depends_on "libgee" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + def install + # Work around Vala issue https://gitlab.gnome.org/GNOME/vala/-/issues/1408 + # which causes src/eval.vala:87:32: error: incompatible function pointer types passing + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/zile --version") + end +end diff --git a/Formula/z/zim.rb b/Formula/z/zim.rb new file mode 100644 index 0000000000000..eb33aef1097f7 --- /dev/null +++ b/Formula/z/zim.rb @@ -0,0 +1,74 @@ +class Zim < Formula + include Language::Python::Virtualenv + + desc "Graphical text editor used to maintain a collection of wiki pages" + homepage "https://zim-wiki.org/" + url "https://github.com/zim-desktop-wiki/zim-desktop-wiki/archive/refs/tags/0.76.3.tar.gz" + sha256 "cb97c48740c140fb851c0ac16a93db9f8df54fcf307bf9e2a948043df8fce479" + license "GPL-2.0-or-later" + head "https://github.com/zim-desktop-wiki/zim-desktop-wiki.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4b5dfda95163282632e88bac3bb1036219b7441add7534048769bb2dc36e1e1f" + end + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "adwaita-icon-theme" + depends_on "graphviz" + depends_on "gtk+3" + depends_on "gtksourceview4" + depends_on "pygobject3" + depends_on "python@3.14" + + pypi_packages package_name: "", + extra_packages: "pyxdg" + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + def python3 + "python3.14" + end + + def install + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + venv.pip_install buildpath, build_isolation: false + + (bin/"zim").write_env_script libexec/"bin/zim", + XDG_DATA_DIRS: [opt_share, libexec/"share"].join(":") + share.install (libexec/"share").children + pkgshare.install "zim" + + # Make the bottles uniform + inreplace [ + venv.site_packages/"zim/config/basedirs.py", + venv.site_packages/"xdg/BaseDirectory.py", + pkgshare/"zim/config/basedirs.py", + ], "/usr/local/share", opt_share + end + + test do + # Workaround for https://github.com/zim-desktop-wiki/zim-desktop-wiki/issues/2665 + ENV["LC_ALL"] = (OS.mac? && MacOS.version >= :sequoia) ? "C" : "en_US.UTF-8" + ENV["LANG"] = "en_US.UTF-8" + + mkdir_p %w[Notes/Homebrew HTML] + # Equivalent of (except doesn't require user interaction): + # zim --plugin quicknote --notebook ./Notes --page Homebrew --basename Homebrew + # --text "[[https://brew.sh|Homebrew]]" + File.write( + "Notes/Homebrew/Homebrew.txt", + "Content-Type: text/x-zim-wiki\nWiki-Format: zim 0.4\n" \ + "Creation-Date: 2020-03-02T07:17:51+02:00\n\n[[https://brew.sh|Homebrew]]", + ) + system bin/"zim", "--index", "./Notes" + system bin/"zim", "--export", "-r", "-o", "HTML", "./Notes" + assert_match "Homebrew:Homebrew", (testpath/"HTML/Homebrew/Homebrew.html").read + assert_match "https://brew.sh|Homebrew", (testpath/"Notes/Homebrew/Homebrew.txt").read + end +end diff --git a/Formula/z/zimfw.rb b/Formula/z/zimfw.rb new file mode 100644 index 0000000000000..61d349cf3cdfb --- /dev/null +++ b/Formula/z/zimfw.rb @@ -0,0 +1,35 @@ +class Zimfw < Formula + desc "Zsh plugin manager" + homepage "https://zimfw.sh" + url "https://github.com/zimfw/zimfw/releases/download/v1.18.0/zimfw.zsh.gz" + sha256 "ec1a6a5b89fa1ab9262c6614f8fb14432483817e9a572608791a861995f15c46" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "da833b86e814243b438d819009dcf738fd6f7ef8fa2dc18fd0107e648cccacd0" + end + + uses_from_macos "zsh" => :test + + def install + share.install "zimfw.zsh" + end + + def caveats + <<~EOS + zimfw.zsh lives in #{opt_share}/zimfw.zsh to source in your .zshrc. + EOS + end + + test do + assert_match version.to_s, + shell_output("zsh -c 'ZIM_HOME=#{testpath}/.zim source #{share}/zimfw.zsh version'") + + (testpath/".zimrc").write("zmodule test --use mkdir --on-pull '>init.zsh <<<\"print test\"'") + system "zsh -c 'ZIM_HOME=#{testpath}/.zim source #{share}/zimfw.zsh init -q'" + assert_path_exists testpath/".zim/modules/test/init.zsh" + assert_path_exists testpath/".zim/init.zsh" + end +end diff --git a/Formula/z/zimg.rb b/Formula/z/zimg.rb new file mode 100644 index 0000000000000..3160678d0eea9 --- /dev/null +++ b/Formula/z/zimg.rb @@ -0,0 +1,46 @@ +class Zimg < Formula + desc "Scaling, colorspace conversion, and dithering library" + homepage "https://github.com/sekrit-twc/zimg" + url "https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.6.tar.gz" + sha256 "be89390f13a5c9b2388ce0f44a5e89364a20c1c57ce46d382b1fcc3967057577" + license "WTFPL" + head "https://github.com/sekrit-twc/zimg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_tahoe: "2beb74e61904dd631d9dfc8e43ae710572041e93058d759b77c37b20c6a9a431" + sha256 cellar: :any, arm64_sequoia: "ee8314ce01c48102e3f977540d6095a444ceb8bce71f1868199c47cad4ce12e4" + sha256 cellar: :any, arm64_sonoma: "57899a223aa26a32842ddf3a76c4b2c3a8473ddb3537fec7ee07db54812d0425" + sha256 cellar: :any, arm64_ventura: "95caade5b153801f19564ba0ea9fbf093b0881ee44a6c68c87b834ea9b3e341b" + sha256 cellar: :any, sonoma: "354ba1f7b397e045e605cec5fc47abee64523b66b93e1cf7bab14e7aa92886f2" + sha256 cellar: :any, ventura: "3dcc05ade0f1a0269b03a6d8725ba8e7bf94d2366727ac270fb84d40160ea1eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca819fe840f4ca92cf5fd514a1617215da500f76051a5c26f14c261329989e64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1586618acff0317dbdcc0e93f56a1a3cc8fc64ab9f59d1f4f4afbfaf4ba9581e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + zimg_image_format format; + zimg_image_format_default(&format, ZIMG_API_VERSION); + assert(ZIMG_MATRIX_UNSPECIFIED == format.matrix_coefficients); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lzimg", "-o", "test" + system "./test" + end +end diff --git a/Formula/z/zinit.rb b/Formula/z/zinit.rb new file mode 100644 index 0000000000000..28f78bfb389c3 --- /dev/null +++ b/Formula/z/zinit.rb @@ -0,0 +1,33 @@ +class Zinit < Formula + desc "Flexible and fast Zsh plugin manager" + homepage "https://zdharma-continuum.github.io/zinit/wiki/" + url "https://github.com/zdharma-continuum/zinit/archive/refs/tags/v3.14.0.tar.gz" + sha256 "4707baaad983d2ea911b4c2fddde9e7876593b3dc969a5efd9d387c9e3d03bb3" + license "MIT" + head "https://github.com/zdharma-continuum/zinit.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9f9174dded2850c1d15edeca007e47336e44cff977a7aeb62470ffa29598914a" + end + + uses_from_macos "zsh" + + def install + prefix.install Dir["*"] + man1.install_symlink prefix/"doc/zinit.1" + end + + def caveats + <<~EOS + To activate zinit, add the following to your ~/.zshrc: + source #{opt_prefix}/zinit.zsh + EOS + end + + test do + system "zsh", "-c", "source #{opt_prefix}/zinit.zsh && zinit load zsh-users/zsh-autosuggestions" + end +end diff --git a/Formula/z/zint.rb b/Formula/z/zint.rb new file mode 100644 index 0000000000000..1cc7ca93aa4d6 --- /dev/null +++ b/Formula/z/zint.rb @@ -0,0 +1,64 @@ +class Zint < Formula + desc "Barcode encoding library supporting over 50 symbologies" + homepage "https://www.zint.org.uk/" + url "https://downloads.sourceforge.net/project/zint/zint/2.15.0/zint-2.15.0-src.tar.gz" + sha256 "bce37d9b86e6127cac63c8b6267ac421116d4ac086519d726eb724f5462d98c7" + license "GPL-3.0-or-later" + head "https://git.code.sf.net/p/zint/code.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/zint[._-]v?(\d+(?:\.\d+)+)(?:-src)?\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "78ee74be96b821a40bd3ae74e02a8648b8b44ebcf3ca77f4253318715129a6c5" + sha256 cellar: :any, arm64_sequoia: "c5d7f8040c04a1c080f2e6bbfe80eb2fdf78d92871cd39c9b1e9ad3ff25ba12e" + sha256 cellar: :any, arm64_sonoma: "7d8b21def98c08bac6c057bad1f0e1e46c0f31cc50d55ea3eb6a0dc272f57693" + sha256 cellar: :any, arm64_ventura: "ae1fe857c6cb02ccdc61ac948f55a0bc4e1cd40a0185b6fdb4df2eac5a79e741" + sha256 cellar: :any, sonoma: "6758e30095b4f04942810c3cbfc9d70ea8d80091d9cb7292fcbc4dfa9821ab12" + sha256 cellar: :any, ventura: "8c644792c866b56195e2d3ffcf2014c0543e6deb06018fdf17288f91d356ab75" + sha256 cellar: :any_skip_relocation, arm64_linux: "18ac58ed7f5da5a5e3ae10b6d33a9c9e2437506d46067a9c4452dfa6c68c841e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa3c1b905b3ec72b674dbe41efe695a000f9db414d05f9bf0def635f3a9b0105" + end + + depends_on "cmake" => :build + depends_on "libpng" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + struct zint_symbol *my_symbol; + + my_symbol = ZBarcode_Create(); + my_symbol->symbology = BARCODE_CODE128; + ZBarcode_Encode(my_symbol, (unsigned char *)"Test123", 7); + ZBarcode_Print(my_symbol, 0); + + printf("Barcode successfully saved to out.png\\n"); + ZBarcode_Delete(my_symbol); + + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lzint" + system "./test" + assert_path_exists testpath/"out.png", "Failed to create barcode PNG" + + system bin/"zint", "-o", "test-zing.png", "-d", "This Text" + assert_path_exists testpath/"test-zing.png", "Failed to create barcode PNG" + + assert_match version.to_s, shell_output("#{bin}/zint --version") + end +end diff --git a/Formula/z/zip.rb b/Formula/z/zip.rb new file mode 100644 index 0000000000000..bfe884506a88b --- /dev/null +++ b/Formula/z/zip.rb @@ -0,0 +1,83 @@ +class Zip < Formula + desc "Compression and file packaging/archive utility" + homepage "https://infozip.sourceforge.net/Zip.html" + url "https://downloads.sourceforge.net/project/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz" + version "3.0" + sha256 "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369" + license "Info-ZIP" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/v?(\d+(?:\.\d+)+)/zip\d+\.(?:t|zip)}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "83ba2b2ec5dae0c7d6b804ee92e433ed035b1350d679592280c7421d15bd5a8a" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7cdb35f0192184dbe0c83432f61cb35d2f640925b750bd8d07ea3de8ae1c2a71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "775099eb3b1a0f85dddef4df4ef0a596bf5224d9d715a5555c5009fdb55f95e8" + sha256 cellar: :any_skip_relocation, sonoma: "be38fc0beefdd3c6f662e57bd31f997ddba8cfbce7bf8137128fe2865b06529c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e80a18894a12fc1771711c709cc20da6ac1d532d9fb10fbca79eb4165b026da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "526d0c20fa500e2440569e83d02643be31facbd1e788a2efceca7041a00f24d3" + end + + keg_only :provided_by_macos + + uses_from_macos "bzip2" + + # Upstream is unmaintained so we use the Debian patchset: + # https://packages.debian.org/sid/zip + # Skipping 12-fix-build-with-gcc-14.patch as may be glibc-only + patch do + url "https://deb.debian.org/debian/pool/main/z/zip/zip_3.0-15.debian.tar.xz" + sha256 "6dc1711c67640e8d1dee867ff53e84387ddb980c40885bd088ac98c330bffce9" + apply %w[ + patches/01-typo-it-is-transferring-not-transfering.patch + patches/02-typo-it-is-privileges-not-priviliges.patch + patches/03-manpages-in-section-1-not-in-section-1l.patch + patches/04-do-not-set-unwanted-cflags.patch + patches/05-typo-it-is-preceding-not-preceeding.patch + patches/06-stack-markings-to-avoid-executable-stack.patch + patches/07-fclose-in-file-not-fclose-x.patch + patches/08-hardening-build-fix-1.patch + patches/09-hardening-build-fix-2.patch + patches/10-remove-build-date.patch + patches/11-typo-it-is-ambiguities-not-amgibuities.patch + patches/13-typo-it-is-os-2-not-risc-os-2.patch + patches/14-buffer-overflow-unicode-filename.patch + patches/15-buffer-overflow-cve-2018-13410.patch + patches/16-fix-symlink-update-detection.patch + ] + end + + # Fix compile with newer Clang + # Otherwise configure thinks memset() and others are missing + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/zip/xcode15.diff" + sha256 "99cb7eeeb6fdb8df700f40bfffbc30516c94774cbf585f725d81c3224a2c530c" + end + + def install + system "make", "-f", "unix/Makefile", "CC=#{ENV.cc}", "generic" + system "make", "-f", "unix/Makefile", "BINDIR=#{bin}", "MANDIR=#{man1}", "install" + end + + test do + (testpath/"test1").write "Hello!" + (testpath/"test2").write "Bonjour!" + (testpath/"test3").write "Moien!" + + system bin/"zip", "test.zip", "test1", "test2", "test3" + assert_path_exists testpath/"test.zip" + # zip -T needs unzip, disabled under Linux to avoid a circular dependency + assert_match "test of test.zip OK", shell_output("#{bin}/zip -T test.zip") if OS.mac? + + # test bzip2 support that should be automatically linked in using the bzip2 library in macOS + system bin/"zip", "-Z", "bzip2", "test2.zip", "test1", "test2", "test3" + assert_path_exists testpath/"test2.zip" + # zip -T needs unzip, disabled under Linux to avoid a circular dependency + assert_match "test of test2.zip OK", shell_output("#{bin}/zip -T test2.zip") if OS.mac? + end +end diff --git a/Formula/z/zipkin.rb b/Formula/z/zipkin.rb new file mode 100644 index 0000000000000..616cb09d69588 --- /dev/null +++ b/Formula/z/zipkin.rb @@ -0,0 +1,39 @@ +class Zipkin < Formula + desc "Collect and visualize traces written in Zipkin format" + homepage "https://zipkin.io" + url "https://search.maven.org/remotecontent?filepath=io/zipkin/zipkin-server/3.5.1/zipkin-server-3.5.1-exec.jar" + sha256 "7ac633a6832647e71e50012a5e3e91fbc7054414955261724526030faf271d8d" + license "Apache-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=io/zipkin/zipkin-server/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b98f9e0bd540f9675cfb0c9770856b1b8acd8b4d9ee00b9aa03732ea3dafd7bc" + end + + depends_on "openjdk" + + def install + (libexec/"bin").install "zipkin-server-#{version}-exec.jar" + bin.write_jar_script libexec/"bin/zipkin-server-#{version}-exec.jar", "zipkin" + end + + service do + run opt_bin/"zipkin" + keep_alive true + log_path var/"log/zipkin.log" + error_log_path var/"log/zipkin.log" + end + + test do + port = free_port + ENV["QUERY_PORT"] = port.to_s + + spawn bin/"zipkin" + sleep 20 + assert_match "UP", shell_output("curl -s 127.0.0.1:#{port}/health") + end +end diff --git a/Formula/z/zita-convolver.rb b/Formula/z/zita-convolver.rb new file mode 100644 index 0000000000000..3a22251c4eb2d --- /dev/null +++ b/Formula/z/zita-convolver.rb @@ -0,0 +1,52 @@ +class ZitaConvolver < Formula + desc "Fast, partitioned convolution engine library" + homepage "https://kokkinizita.linuxaudio.org/linuxaudio/" + url "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-convolver-4.0.3.tar.bz2" + sha256 "9aa11484fb30b4e6ef00c8a3281eebcfad9221e3937b1beb5fe21b748d89325f" + license "GPL-3.0-or-later" + + livecheck do + url "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html" + regex(/href=.*?zita-convolver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "27ab1f512bc3b1f0eec036f702eb55b9f0d14d720229f2eae6b029c827185624" + sha256 cellar: :any, arm64_sequoia: "4426fc8a54e7e24fa6227c1b38a0f0a8ad3d0957244ea5e29e1092b28f7cade5" + sha256 cellar: :any, arm64_sonoma: "5b3e06cb4fc6b39c91d964d8a5f960aa7c8a2715907978b26d6d6ab25c4705bf" + sha256 cellar: :any, arm64_ventura: "b080f0a633296bb349fb9c06858f0327c789113fd3b84c6b31a5ce213a67a0f9" + sha256 cellar: :any, arm64_monterey: "0db7b44d8a6d714e4cdbc04121ab1df685469175bf30b42355122b87b8fa16bb" + sha256 cellar: :any, arm64_big_sur: "dd52351558f1a7d5860d8227ee71fb2fa28abf751adb4193dc63c8cb72f076ae" + sha256 cellar: :any, sonoma: "95aafd5ff8d7905f664c95046c2a0cf7f9d3490f941ac549f0d333d6354ca1fe" + sha256 cellar: :any, ventura: "f6d2fece841444ec39fa17717fc732f75feaf3e05b24fcfa1203abfdc89ec391" + sha256 cellar: :any, monterey: "b1eb48a11c3a0c13bcbbd30af63190fbec40e6ac97679d31c1fca4a7eb210a12" + sha256 cellar: :any, big_sur: "0e712ab784293d338e277912151e068c7117f902165e7e4dcdd231ba8b3767fd" + sha256 cellar: :any, catalina: "a616c118732c9f2c3775348e598a972abab7ae67b7cb0f283884cddaa55ce93d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4756b908b348d2b18c80ad68a255021c9545aa0d8dee560c7139b21b0185c15b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3eb63c0ffaffec4c0e2f1798d73119eb4d124f97e421aa350ad8da0722ca5225" + end + + depends_on "fftw" + + def install + cd "source" do + inreplace "Makefile", "-Wl,-soname,", "-Wl,-install_name," if OS.mac? + inreplace "Makefile", "ldconfig", "ln -sf $(ZITA-CONVOLVER_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-CONVOLVER_MAJ)" + system "make", "install", "PREFIX=#{prefix}", "SUFFIX=" + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + return zita_convolver_major_version () != ZITA_CONVOLVER_MAJOR_VERSION; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lzita-convolver", "-o", "test" + system "./test" + end +end diff --git a/Formula/z/zix.rb b/Formula/z/zix.rb new file mode 100644 index 0000000000000..c692e8c38d64b --- /dev/null +++ b/Formula/z/zix.rb @@ -0,0 +1,82 @@ +class Zix < Formula + desc "C99 portability and data structure library" + homepage "https://gitlab.com/drobilla/zix" + url "https://gitlab.com/drobilla/zix/-/archive/v0.6.2/zix-v0.6.2.tar.gz" + sha256 "caa1435c870767e12f71454e8b17e878fa9b4bb35730b8f570934fb7cb74031c" + license "ISC" + head "https://gitlab.com/drobilla/zix.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "39c8ed1239b3f3cbc1e85f45e5bf97afd6c39a11a496da2040065b81fe0c9494" + sha256 cellar: :any, arm64_sequoia: "c6efcf45aaec03ed33102d16b0c877c274e1161fbd1e506ab031543aec03a8f2" + sha256 cellar: :any, arm64_sonoma: "cfd378e7408c1888de5bd8212e1d0e89a59cb44de25d4c783e75d311bbbc8f3b" + sha256 cellar: :any, arm64_ventura: "b8c3832ec02675aab399184719cee2875f180499de50384dd22b49a725458e28" + sha256 cellar: :any, sonoma: "36f4526e82d1f62246b84b8237752be4d9931cc2490704b8a99cd88fe47fd487" + sha256 cellar: :any, ventura: "8150b763b4d195e8f6a891ec43780af77851c7c7abd516b856177570323452ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "aeae53fce7afe265ce9ea5a32dfe62f64c937e534273f6cb6b6d199a490b47df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d635d3fd06b65cff8b6d49c9a78e33b214937b63c4a0c43b0df6ace47e2ecedd" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "glib" + + def install + args = %w[ + -Dbenchmarks=disabled + -Dtests=disabled + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "zix/attributes.h" + #include "zix/string_view.h" + + #if defined(__GNUC__) + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wunused-variable" + #endif + + static void + string_views(void) + { + const char* const string_pointer = "some string"; + + // begin make-empty-string + ZixStringView empty = zix_empty_string(); + // end make-empty-string + + // begin make-static-string + static const ZixStringView hello = ZIX_STATIC_STRING("hello"); + // end make-static-string + (void)hello; + + // begin measure-string + ZixStringView view = zix_string(string_pointer); + // end measure-string + + // begin make-string-view + ZixStringView slice = zix_substring(string_pointer, 4); + // end make-string-view + } + + ZIX_CONST_FUNC + int + main(void) + { + string_views(); + return 0; + } + + #if defined(__GNUC__) + # pragma GCC diagnostic pop + #endif + C + system ENV.cc, "test.c", "-I#{include}/zix-0", "-o", "test" + system "./test" + end +end diff --git a/Formula/z/zizmor.rb b/Formula/z/zizmor.rb new file mode 100644 index 0000000000000..1dd323fa652da --- /dev/null +++ b/Formula/z/zizmor.rb @@ -0,0 +1,41 @@ +class Zizmor < Formula + desc "Find security issues in GitHub Actions setups" + homepage "https://docs.zizmor.sh/" + url "https://github.com/zizmorcore/zizmor/archive/refs/tags/v1.16.2.tar.gz" + sha256 "a5c606b31a9b78a4cc7053f498ba0d7b76289378e8f4d4ef09f1226fa6f4e8d6" + license "MIT" + head "https://github.com/zizmorcore/zizmor.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "fc131cb9416bec559a9d14a6c558dad8997854e95ce4fa8a51c06e364e3378f9" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc5af8d51572f794a3ebbbcd8f4bf03c98cbe94f6e73985fcd5b175f35bdb5c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "384ff1a7f2a6a1985e69f7d145901e1c73fe17ac3ccc5cfa1b13653c37b7fdc6" + sha256 cellar: :any_skip_relocation, sonoma: "0216dfabca1513349d61b15536a5e785ba156154cc0c114e03e20426ac1ab69c" + sha256 cellar: :any_skip_relocation, arm64_linux: "17049db990f4053963cedb4d380bb4be2f7bd971ec05baee32be86c6fb8a705f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f0c84ac080f72435959100f40ac04019b241c6e0b3a439ad75e9b8b0d8256de" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/zizmor") + + generate_completions_from_executable(bin/"zizmor", shell_parameter_format: "--completions=") + end + + test do + (testpath/"workflow.yaml").write <<~YAML + on: push + jobs: + vulnerable: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + YAML + + output = shell_output("#{bin}/zizmor --format plain #{testpath}/workflow.yaml", 13) + assert_match "does not set persist-credentials: false", output + end +end diff --git a/Formula/z/zk.rb b/Formula/z/zk.rb new file mode 100644 index 0000000000000..1b0d5d13af01a --- /dev/null +++ b/Formula/z/zk.rb @@ -0,0 +1,48 @@ +class Zk < Formula + desc "Plain text note-taking assistant" + homepage "https://zk-org.github.io/zk/" + url "https://github.com/zk-org/zk/archive/refs/tags/v0.15.1.tar.gz" + sha256 "1f30aae497476342203b3cecb63edd92faf4d837860a894fdee4b372184e9ec4" + license "GPL-3.0-only" + head "https://github.com/zk-org/zk.git", branch: "dev" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "5a40e136ac85f0901858ab4a235f1929416dfb6de1dbc7277f05f300264425e5" + sha256 cellar: :any, arm64_sequoia: "e650bbd888c32d8bb28e2c2d2ae09499c4709f96001a3951df0b9e91437a659a" + sha256 cellar: :any, arm64_sonoma: "239224f8f97ad8577bbb05c2960e5dbbca09ee785e77113a86ddb0cc07ca02e1" + sha256 cellar: :any, arm64_ventura: "d2fa155687a35473b7194340e0f2af26fdd2e65d08b34f9e047ca826d8cacbd4" + sha256 cellar: :any, sonoma: "0370023af2526cce4d2b2a6a34be2fbcef84ca0c268cd16424e9bc60e04bf723" + sha256 cellar: :any, ventura: "9bb03c28b2e2e21f33c12a9be43b6f00725d996fe4a6bafce68efebc1dc4a94b" + sha256 cellar: :any_skip_relocation, arm64_linux: "fae5f1442ce7541f33cdfe8d629f630317819e05718d0a981c40aff92ef2c28e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f37a821a7e156bc2c688a7fb144772eb0373476fee7e489a65d1eb80f009ab7a" + end + + depends_on "go" => :build + + depends_on "icu4c@77" + uses_from_macos "sqlite" + + def install + ldflags = "-s -w -X main.Version=#{version} -X main.Build=#{tap.user}" + tags = %w[fts5 icu] + system "go", "build", *std_go_args(ldflags:, tags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/zk --version") + + system bin/"zk", "init", "--no-input" + system bin/"zk", "index", "--no-input" + (testpath/"testnote.md").write "note content" + (testpath/"anothernote.md").write "todolist" + + output = pipe_output("#{bin}/zk list --quiet").chomp + assert_match "note content", output + assert_match "todolist", output + end +end diff --git a/Formula/z/zlib-ng-compat.rb b/Formula/z/zlib-ng-compat.rb new file mode 100644 index 0000000000000..9e5e4c6949137 --- /dev/null +++ b/Formula/z/zlib-ng-compat.rb @@ -0,0 +1,57 @@ +class ZlibNgCompat < Formula + desc "Zlib replacement with optimizations for next generation systems" + homepage "https://github.com/zlib-ng/zlib-ng" + url "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.5.tar.gz" + sha256 "5b3b022489f3ced82384f06db1e13ba148cbce38c7941e424d6cb414416acd18" + license "Zlib" + head "https://github.com/zlib-ng/zlib-ng.git", branch: "develop" + + livecheck do + formula "zlib-ng" + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "da58c82380d51a5ac285132e8888610cc14476e95e6280445fd335ef4cbc572c" + sha256 cellar: :any, arm64_sequoia: "de2b7d5bc1e09399d31f45e1fe5bcec8a7ec2f3981061cd6c8a123925f38dcf7" + sha256 cellar: :any, arm64_sonoma: "85aa982fe79a27defd05121af49c64166d89fb1e82ada3d9f2928e1d96121466" + sha256 cellar: :any, sonoma: "8ced5ab346a3717bef52de72772277eaf7592906345035fa63aaffaeecfe7e44" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c3b8ff2996ea3df499d16c1438248eec572cc6da8ddd00b5aab359756fd1b94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f2a5ba2917c2e7e97ab4cb5e5a4f56139474ba441ca808ac30915bcfe7aea44" + end + + keg_only :shadowed_by_macos, "macOS provides zlib" + + depends_on "cmake" => :build + + on_linux do + keg_only "it conflicts with zlib" + end + + def install + ENV.runtime_cpu_detection + args = %w[ + -DZLIB_COMPAT=ON + -DWITH_NEW_STRATEGIES=OFF + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # https://zlib.net/zlib_how.html + resource "homebrew-test_artifact" do + url "https://zlib.net/zpipe.c" + version "20051211" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + end + + testpath.install resource("homebrew-test_artifact") + system ENV.cc, "zpipe.c", "-I#{include}", lib/shared_library("libz"), "-o", "zpipe" + + text = "Hello, Homebrew!" + compressed = pipe_output("./zpipe", text) + assert_equal text, pipe_output("./zpipe -d", compressed) + end +end diff --git a/Formula/z/zlib-ng.rb b/Formula/z/zlib-ng.rb new file mode 100644 index 0000000000000..12f1e54138de8 --- /dev/null +++ b/Formula/z/zlib-ng.rb @@ -0,0 +1,60 @@ +class ZlibNg < Formula + desc "Zlib replacement with optimizations for next generation systems" + homepage "https://github.com/zlib-ng/zlib-ng" + url "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.5.tar.gz" + sha256 "5b3b022489f3ced82384f06db1e13ba148cbce38c7941e424d6cb414416acd18" + license "Zlib" + + # Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are + # labeled as "pre-release" on GitHub before the version is released, so it's + # necessary to use the `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "707d202777a8492d9743d2c7e382bf62449c7e4ca8ae998d395a1d261c37975d" + sha256 cellar: :any, arm64_sequoia: "543ae48a252d60483bde45bdc98212d746453a2281af43dda8e86b092bc90a21" + sha256 cellar: :any, arm64_sonoma: "9b4dadbd1478ed59de80242758e4593fe3203e9e97463902b1dfb1481046f51e" + sha256 cellar: :any, sonoma: "5124c7b8b06709281d92c4e44840e7f9d3e31f32943447f71218fec0e5c6f719" + sha256 cellar: :any_skip_relocation, arm64_linux: "a87cb7f8f09e1ebf2030e7739aa89174b518a945f467d81ea68d0a5d22ed25b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "876d5f20cbe79e39872673ef215e41c6a7fe21da7600d49dde5052ef3b2a7a7f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # https://zlib.net/zlib_how.html + resource "homebrew-test_artifact" do + url "https://zlib.net/zpipe.c" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + end + + # Test uses an example of code for zlib and overwrites its API with zlib-ng API + testpath.install resource("homebrew-test_artifact") + inreplace "zpipe.c", "#include \"zlib.h\"", <<~C + #include "zlib-ng.h" + #define inflate zng_inflate + #define inflateInit zng_inflateInit + #define inflateEnd zng_inflateEnd + #define deflate zng_deflate + #define deflateEnd zng_deflateEnd + #define deflateInit zng_deflateInit + #define z_stream zng_stream + C + + system ENV.cc, "zpipe.c", "-I#{include}", "-L#{lib}", "-lz-ng", "-o", "zpipe" + + content = "Hello, Homebrew!" + compressed = pipe_output("./zpipe", content) + assert_equal content, pipe_output("./zpipe -d", compressed) + end +end diff --git a/Formula/z/zlib-rs.rb b/Formula/z/zlib-rs.rb new file mode 100644 index 0000000000000..4651236ae10c8 --- /dev/null +++ b/Formula/z/zlib-rs.rb @@ -0,0 +1,50 @@ +class ZlibRs < Formula + desc "C API for zlib-rs" + homepage "https://github.com/trifectatechfoundation/zlib-rs/tree/main/libz-rs-sys-cdylib#libz-rs-sys-cdylib" + url "https://github.com/trifectatechfoundation/zlib-rs/archive/refs/tags/v0.5.2.tar.gz" + sha256 "38f6d0ebc0e00fe4df696af049d70de99cb79a781611167ff1f0fd2b78feb0c4" + license "Zlib" + head "https://github.com/trifectatechfoundation/zlib-rs.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_tahoe: "859ac57d9978301b445b61052eecf2109c7ade9e333a6765b5b5e3a8807b73d9" + sha256 cellar: :any, arm64_sequoia: "4a51ae18c3fc7fb801cbb64a391e28e5dc022383fc412f890f3385897a3cd512" + sha256 cellar: :any, arm64_sonoma: "8829610f18363a0665da0b4c01a4ecc547846bdf2cc013b85490c93d37def924" + sha256 cellar: :any, arm64_ventura: "337ddb0376831e118ffbc5b95c206fdf848e0bf92b4e4031dd30540901aa34e2" + sha256 cellar: :any, sonoma: "83ed86d834273ce4b8979995ac678020467166326f3cc1e4a5bb28a6c3f3625a" + sha256 cellar: :any, ventura: "cec9dd6565a31440586ca06006c3c79077d7f45d578080434ea90897037cccda" + sha256 cellar: :any_skip_relocation, arm64_linux: "f33a4e39b5f3eaa80dd6062299cb83afe3620c78371b2c73322bfaf45723d326" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6f8c82d180bd8925166564577cc77347b984f160a147e9b59199ebbcb2aeb36" + end + + depends_on "cargo-c" => :build + depends_on "rust" => :build + uses_from_macos "zlib" => :test + + def install + # https://github.com/trifectatechfoundation/zlib-rs/tree/main/libz-rs-sys-cdylib#-cllvm-args-enable-dfa-jump-thread + ENV.append_to_rustflags "-Cllvm-args=-enable-dfa-jump-thread" + cd "libz-rs-sys-cdylib" do + system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--prefix", prefix, "--libdir", lib, "--release" + end + end + + test do + # https://zlib.net/zlib_how.html + resource "test_artifact" do + url "https://zlib.net/zpipe.c" + version "20051211" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + end + + testpath.install resource("test_artifact") + ENV.append_to_cflags "-I#{Formula["zlib"].opt_include}" if OS.linux? + ENV.append "LDFLAGS", "-L#{lib}" + ENV.append "LDLIBS", "-lz_rs" + system "make", "zpipe" + + text = "Hello, Homebrew!" + compressed = pipe_output("./zpipe", text) + assert_equal text, pipe_output("./zpipe -d", compressed) + end +end diff --git a/Formula/z/zlib.rb b/Formula/z/zlib.rb new file mode 100644 index 0000000000000..cbd66b168036d --- /dev/null +++ b/Formula/z/zlib.rb @@ -0,0 +1,56 @@ +class Zlib < Formula + desc "General-purpose lossless data-compression library" + homepage "https://zlib.net/" + url "https://zlib.net/zlib-1.3.1.tar.gz" + mirror "https://downloads.sourceforge.net/project/libpng/zlib/1.3.1/zlib-1.3.1.tar.gz" + mirror "http://fresh-center.net/linux/misc/zlib-1.3.1.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/zlib-1.3.1.tar.gz" + sha256 "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" + license "Zlib" + head "https://github.com/madler/zlib.git", branch: "develop" + + livecheck do + url :homepage + regex(/href=.*?zlib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_tahoe: "b1f6105bc71a21cad7eb7015d9d363ec1097bf80f91fd3c0d56bc0bece086364" + sha256 cellar: :any, arm64_sequoia: "a801a93f88dba4df7319e46cd9ea5939351e73f7aa62a5153a2f7a0b0d79404d" + sha256 cellar: :any, arm64_sonoma: "f867540472a59ab3fb1201625df546593e5fae2e98948c4c16c6154b0468b682" + sha256 cellar: :any, arm64_ventura: "9033eedbd240076116fea9fa181882e75edee7fe0c5d2e3850258a185c52792f" + sha256 cellar: :any, arm64_monterey: "ebf10e203575beb64d6a8637ec2dc31774fa3141cfccab8ae7039f88b9efa7f6" + sha256 cellar: :any, sonoma: "217f4245cd1da65a3388f512530089f526cd63a38d49ee5f29a90576dfeb3bb7" + sha256 cellar: :any, ventura: "6012d7831245716d8507da3d1eb14ad274f8aa0b71b59275fe6bbbd6cebd787f" + sha256 cellar: :any, monterey: "56bbfa3d7bd6a5ccf17ffa53ab926e67f24e74bd64b4740b56fd96c312e37c44" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f5d3038615e17d8de3a4b92895a151388e7adfe608f295f89aa669604541f39" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38f2469db2ce63b70855a98e5ee27b5b5a92874e52542cbdc0b230bba1e7195f" + end + + keg_only :provided_by_macos + + # https://zlib.net/zlib_how.html + resource "test_artifact" do + url "https://zlib.net/zpipe.c" + mirror "http://zlib.net/zpipe.c" + version "20051211" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + + # Avoid rebuilds of dependents that hardcode this path. + inreplace lib/"pkgconfig/zlib.pc", prefix, opt_prefix + end + + test do + testpath.install resource("test_artifact") + system ENV.cc, "zpipe.c", "-I#{include}", "-L#{lib}", "-lz", "-o", "zpipe" + + text = "Hello, Homebrew!" + compressed = pipe_output("./zpipe", text) + assert_equal text, pipe_output("./zpipe -d", compressed) + end +end diff --git a/Formula/z/zlint.rb b/Formula/z/zlint.rb new file mode 100644 index 0000000000000..bb4ed1800f536 --- /dev/null +++ b/Formula/z/zlint.rb @@ -0,0 +1,54 @@ +class Zlint < Formula + desc "X.509 Certificate Linter focused on Web PKI standards and requirements" + homepage "https://zmap.io/" + url "https://github.com/zmap/zlint/archive/refs/tags/v3.6.8.tar.gz" + sha256 "9d977980e69aedde7deb93417e75bba44fa8ebee421ffbc7c9f949a827e8f55e" + license "Apache-2.0" + head "https://github.com/zmap/zlint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8b781117436a005df46e97e231b46343698cb213b713e39fa8ff43c30420fed2" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b781117436a005df46e97e231b46343698cb213b713e39fa8ff43c30420fed2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b781117436a005df46e97e231b46343698cb213b713e39fa8ff43c30420fed2" + sha256 cellar: :any_skip_relocation, sonoma: "962ca2709da99e3ba3bd1ff33e7ebc0e2b10480777dd6ace31e84d8557f2b41a" + sha256 cellar: :any_skip_relocation, arm64_linux: "09c132f7afb529f7a67e67826d078fb2320a6d72d53ba60691c4f4defc09106e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c31014388fd3bfbb30ecfc594d06912c04b41ae88b68249715d3c4aabd7523a" + end + + depends_on "go" => :build + + def install + cd "v3" do + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/zlint" + end + end + + test do + assert_match "ZLint version #{version}", shell_output("#{bin}/zlint -version") + + (testpath/"cert.pem").write <<~PEM + -----BEGIN CERTIFICATE----- + MIIB3jCCAWSgAwIBAgIUU3hxzxSDV5V1DeRyZjgzdPKatBEwCgYIKoZIzj0EAwMw + HjEcMBoGA1UEAwwTaG9tZWJyZXctemxpbnQtdGVzdDAeFw0yMjAxMDEwMDAwMDBa + Fw0yMzAxMDEwMDAwMDBaMB4xHDAaBgNVBAMME2hvbWVicmV3LXpsaW50LXRlc3Qw + djAQBgcqhkjOPQIBBgUrgQQAIgNiAASn3DDorzrDQiWnnXv0uS722si9zx1HK6Va + CXQpHm/8t1SmMEYdVIU4j5UzbVKpoMIkk9twC3AiDUVZwdBNL2rqO8smZiKOh0Tz + BnRf8OBu55C7fsCHRayljjW0IpyZCjCjYzBhMB0GA1UdDgQWBBRIDxULqVXg4e4Z + +3QzKRG4UpfiFjAfBgNVHSMEGDAWgBRIDxULqVXg4e4Z+3QzKRG4UpfiFjAPBgNV + HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAKBggqhkjOPQQDAwNoADBlAjBO + c1zwDbnya5VkmlROFco5TpcZM7w1L4eRFdJ/q7rZF5udqVuy4vtu0dJaazwiMusC + MQDEMciPyBdrKwnJilT2kVwIMdMmxAjcmV048Ai0CImT5iRERKdBa7QeydMcJo3Z + 7zs= + -----END CERTIFICATE----- + PEM + + output = shell_output("#{bin}/zlint -longSummary cert.pem") + %w[ + e_ca_organization_name_missing + e_ca_country_name_missing + ].each do |err| + assert_match err, output + end + end +end diff --git a/Formula/z/zlog.rb b/Formula/z/zlog.rb new file mode 100644 index 0000000000000..189db19a6e2ff --- /dev/null +++ b/Formula/z/zlog.rb @@ -0,0 +1,62 @@ +class Zlog < Formula + desc "High-performance C logging library" + homepage "https://github.com/HardySimpson/zlog" + url "https://github.com/HardySimpson/zlog/archive/refs/tags/1.2.18.tar.gz" + sha256 "3977dc8ea0069139816ec4025b320d9a7fc2035398775ea91429e83cb0d1ce4e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_tahoe: "e71ea809671f98c7c971dd32bb10b6277631f2216ad5c47b3742449c07f0c2f0" + sha256 cellar: :any, arm64_sequoia: "048b4b3e71147569f94ac5a81fcaabe259d313f81bc0634617737fbb3c38e98e" + sha256 cellar: :any, arm64_sonoma: "37e945fe1dd889750af896e816c0790db9b18f3a534772cac3d2be22e720b637" + sha256 cellar: :any, arm64_ventura: "5553716576ac0457c4fb359f1f5a68304ee9801b7741a29d14d20ef7d2f45791" + sha256 cellar: :any, arm64_monterey: "d88d92564bd205190476a208b4bf684f20e6f4c8390c050a42a4e8acf31cc0b1" + sha256 cellar: :any, sonoma: "fd76e9b11c931478c0106c32c4f67feb6f5c1ddfd10cdf985278ececff977aa6" + sha256 cellar: :any, ventura: "3a641c10f7447de85a8b04d1c283aa0b9804efd9feb73115b68afd2cd06f13cf" + sha256 cellar: :any, monterey: "84cded237749c8ffb59d04d0426765cf86f42beefe415e54fb6ad99508c7f247" + sha256 cellar: :any_skip_relocation, arm64_linux: "2262180dca42195cb202e911f78dff3225ca41768ab9ea44c99854f8c34baa8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "868ff2416cf589e55963163d173f2b30515350a114b0dc70183f6b0183c62191" + end + + def install + system "make", "PREFIX=#{prefix}" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + (testpath/"zlog.conf").write <<~INI + [formats] + simple = "%m%n" + [rules] + my_cat.DEBUG >stdout; simple + INI + (testpath/"test.c").write <<~C + #include + #include + int main() { + int rc; + zlog_category_t *c; + + rc = zlog_init("zlog.conf"); + if (rc) { + printf("init failed!"); + return -1; + } + + c = zlog_get_category("my_cat"); + if (!c) { + printf("get cat failed!"); + zlog_fini(); + return -2; + } + + zlog_info(c, "hello, zlog!"); + zlog_fini(); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lzlog", "-pthread", "-o", "test" + assert_equal "hello, zlog!\n", shell_output("./test") + end +end diff --git a/Formula/z/zls.rb b/Formula/z/zls.rb new file mode 100644 index 0000000000000..446a5a7f4b611 --- /dev/null +++ b/Formula/z/zls.rb @@ -0,0 +1,63 @@ +class Zls < Formula + desc "Language Server for Zig" + homepage "https://zigtools.org/zls/" + url "https://github.com/zigtools/zls/archive/refs/tags/0.15.0.tar.gz" + sha256 "337d478ca90bab965070ed139408909f1968ad709afb61594b6368dbacc0b631" + license "MIT" + head "https://github.com/zigtools/zls.git", branch: "master" + + bottle do + sha256 arm64_tahoe: "8fddec79c658908cbf4794ea01ab4b8d10a396cf439212e42896305a8de63229" + sha256 arm64_sequoia: "38274d9f3cef277b88d3c636617dee89116a83d4548af550952745ec5a7ca8d2" + sha256 arm64_sonoma: "c4a13d39282994fc19ed778b10a5bb46f530a7ba5c492fd0421e716998b8029c" + sha256 arm64_ventura: "06745c6f0fd395ab05cb47098cb0203eb7230c984e1bc4f529c0d4e77d8168fc" + sha256 sonoma: "90216dea1bf825e145c2c2bee714fb8f911b5e1e7980bafb64d1e4e57b4d3f64" + sha256 ventura: "a4049fab19d8e9b8f3638d2c4ff1d85742fcf93c60884eaf5d26a3ba863daf38" + sha256 arm64_linux: "77b5ba24e47f3df03aa0cc8d7d1f47d1e88987fe2aecd9c2da5117422cfbc7e5" + sha256 x86_64_linux: "adf7d9b4b52da29abf507a1536b7e30c28f96cf53998cf8ab1ce13bdc54cde98" + end + + depends_on "zig" + + def install + # Fix illegal instruction errors when using bottles on older CPUs. + # https://github.com/Homebrew/homebrew-core/issues/92282 + cpu = case ENV.effective_arch + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + when :armv8 then "xgene1" # Closest to `-march=armv8-a` + else ENV.effective_arch + end + + args = [] + args << "-Dcpu=#{cpu}" if build.bottle? + + system "zig", "build", *args, *std_zig_args + end + + test do + test_config = testpath/"zls.json" + test_config.write <<~JSON + { + "enable_semantic_tokens": true + } + JSON + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + input = "Content-Length: #{json.size}\r\n\r\n#{json}" + output = pipe_output("#{bin}/zls --config-path #{test_config}", input, 1) + assert_match(/^Content-Length: \d+/i, output) + + assert_match version.to_s, shell_output("#{bin}/zls --version") + end +end diff --git a/Formula/z/zmap.rb b/Formula/z/zmap.rb new file mode 100644 index 0000000000000..87be70bb6b023 --- /dev/null +++ b/Formula/z/zmap.rb @@ -0,0 +1,56 @@ +class Zmap < Formula + desc "Network scanner for Internet-wide network studies" + homepage "https://zmap.io" + url "https://github.com/zmap/zmap/archive/refs/tags/v4.3.4.tar.gz" + sha256 "b5936bf5b5390fb50203140e81beac28866374371b1c68329cbbe932cc5ee1d3" + license "Apache-2.0" + head "https://github.com/zmap/zmap.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_tahoe: "0f8b31f9fcda17ba66605ca6761f8497ef1217b3ecc8d31d8cdd8af8ce8b7357" + sha256 arm64_sequoia: "297abfb8c655871cda8e7957710c352f4010c09ec19adb07bea3c4b235fdd957" + sha256 arm64_sonoma: "45170d73fe6d3ae15919833d77f9c30ceff889e44dd40bf293f5bd6df4418ab8" + sha256 arm64_ventura: "c3628c8ae1ae1bb500fe770668a61b4be782a5e659a68c8cf3ec238c4e22f35e" + sha256 sonoma: "daefd0ba4f61064f028ded544912b684c1b0c399a81b4f99b8ba45af4fd5fa80" + sha256 ventura: "d96bdbf89a92db63caa5c453ad350a470d32cc1c3d2bf0ccc5d6c56d20911018" + sha256 arm64_linux: "7282a45a8902c4e6a32797d7001c24f6c6d3d0e928d3cb1f1e32a6dd4953d470" + sha256 x86_64_linux: "39f86237f9e1c880b41751e79f3407e9614a1ba7aba5db2d06268d7d08323b3d" + end + + depends_on "byacc" => :build + depends_on "cmake" => :build + depends_on "gengetopt" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "json-c" + depends_on "judy" + depends_on "libdnet" + depends_on "libunistring" # for unistr.h + + uses_from_macos "flex" => :build + uses_from_macos "libpcap" + + def install + inreplace ["conf/zmap.conf", "src/constants.h", "src/zopt.ggo.in"], "/etc", etc + args = %w[-DENABLE_DEVELOPMENT=OFF -DRESPECT_INSTALL_PREFIX_CONFIG=ON] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{sbin}/zmap -p 80 -N 1 8.8.8.8 2>&1", 1) + assert_match "[INFO] zmap: By default, ZMap will output the unique IP addresses " \ + "of hosts that respond successfully (e.g., SYN-ACK packet)", output + # need sudo permission + assert_match "[FATAL] recv: could not open device", output + + system sbin/"zmap", "--version" + end +end diff --git a/Formula/z/zmqpp.rb b/Formula/z/zmqpp.rb new file mode 100644 index 0000000000000..39d1fe51e9c42 --- /dev/null +++ b/Formula/z/zmqpp.rb @@ -0,0 +1,50 @@ +class Zmqpp < Formula + desc "High-level C++ binding for zeromq" + homepage "https://zeromq.github.io/zmqpp/" + url "https://github.com/zeromq/zmqpp/archive/refs/tags/4.2.0.tar.gz" + sha256 "c1d4587df3562f73849d9e5f8c932ca7dcfc7d8bec31f62d7f35073ef81f4d29" + license "MPL-2.0" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "39907cc6b73b2e45317f6a339f58914602cd3a42b36f601252e440ab4106f4e8" + sha256 cellar: :any, arm64_sequoia: "9fa8e84d3f7cdd481639d63079b3ff25804d464cdf1107397bcde6fe4950726a" + sha256 cellar: :any, arm64_sonoma: "574b288b419ea2c184b6720d566a15dd75554bc252379a86cefc173794866a7d" + sha256 cellar: :any, arm64_ventura: "79259180cd88ddb59497fbb3075a02c19ac854e5a57f1ff33f53c328789b4dd5" + sha256 cellar: :any, arm64_monterey: "ce6be56e7c768bc4c35b43d78a7938b5bf415293ce42e47230a47dc17d05e091" + sha256 cellar: :any, arm64_big_sur: "8784a9ab7929336cc1677315a134b8d379491e9980f1e2fc0c705bb0adf7c904" + sha256 cellar: :any, sonoma: "11a46057f1f31e68d13696542b6fa161601f531e06fadde4e246991c425834d1" + sha256 cellar: :any, ventura: "13235aadbe1f01545aa68211914aca2ee5c209121db4eb1964129476b515eb80" + sha256 cellar: :any, monterey: "7b68028743e0b92d94b1eb8a486901944d5bb77d1fb1e49b76bcfabea4f86caa" + sha256 cellar: :any, big_sur: "f85d36f077eab8c580e4e22411a9c2d89bff47a14f6b53c42eb6544c4e4250e6" + sha256 cellar: :any, catalina: "6ff257636778c3cb51a42ec7fd41d701ebb311dcbdca7fb0e63772078b59123c" + sha256 cellar: :any_skip_relocation, arm64_linux: "93f20e52dd105b35681cb16f0a68b3df968a80b03b87f9ea707e7fcd18ea0578" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18d5c7351051f713c13173e058151ea828788e3851c761d04c4c1d1a1d384f08" + end + + depends_on "doxygen" => :build + depends_on "zeromq" + + def install + ENV.cxx11 + + system "make" + system "make", "install", "PREFIX=#{prefix}" + + system "doxygen" + (doc/"html").install Dir["docs/html/*.html"] + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + zmqpp::frame frame; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lzmqpp", "-o", "test", "-std=c++11" + system "./test" + end +end diff --git a/Formula/z/znapzend.rb b/Formula/z/znapzend.rb new file mode 100644 index 0000000000000..2a2ce4de13f8f --- /dev/null +++ b/Formula/z/znapzend.rb @@ -0,0 +1,69 @@ +class Znapzend < Formula + desc "ZFS backup with remote capabilities and mbuffer integration" + homepage "https://www.znapzend.org/" + url "https://github.com/oetiker/znapzend/releases/download/v0.23.2/znapzend-0.23.2.tar.gz" + sha256 "69928caacde7468e5154d81197e257cd0c85ee3eedb3192be67fdfe486defefe" + license "GPL-3.0-or-later" + head "https://github.com/oetiker/znapzend.git", branch: "master" + + # The `stable` URL uses a download from the GitHub release, so the release + # needs to exist before the formula can be version bumped. It's more + # appropriate to check the GitHub releases instead of tags in this context. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "0f04b481b943342f0ffe5a58835319c20820041f31311f29547f16e6ef72366e" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "405bbba19b8422e333e11f67f73eb0c61a66150e551428f0c04b12aca2c1db99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd97162625dcc01bf084c870bdf6fd3ba45e3e0967c9b5108fec6cef9f11919b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d72402cd84c52f88fe2fcd86892efdd79f379ac886ef71fcf4143651d1e190db" + sha256 cellar: :any_skip_relocation, sonoma: "4c9f4aaa841ce75048b37c4c1c54a6860f40903f2e2463c8bbb5f95c1994d3b2" + sha256 cellar: :any_skip_relocation, ventura: "f6273d56bb1e0c20ded2d6f4079cf7548dfd99bbab933ab4fc0b4cffae136869" + sha256 cellar: :any_skip_relocation, arm64_linux: "e713956866b46b71f518756ae9590023be91a54fa339a80fa05b30b6989ed43c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b66995be03c18d0b108924cc165fc08c19eb6ac27c4810669af9187ef16d7c99" + end + + uses_from_macos "perl", since: :big_sur + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + (var/"log/znapzend").mkpath + (var/"run/znapzend").mkpath + end + + service do + run [opt_bin/"znapzend", "--connectTimeout=120", "--logto=#{var}/log/znapzend/znapzend.log"] + environment_variables PATH: std_service_path_env + keep_alive true + require_root true + error_log_path var/"log/znapzend.err.log" + log_path var/"log/znapzend.out.log" + working_dir var/"run/znapzend" + end + + test do + fake_zfs = testpath/"zfs" + fake_zfs.write <<~SH + #!/bin/sh + for word in "$@"; do echo $word; done >> znapzendzetup_said.txt + exit 0 + SH + chmod 0755, fake_zfs + ENV.prepend_path "PATH", testpath + + system bin/"znapzendzetup", "list" + + assert_equal <<~EOS, (testpath/"znapzendzetup_said.txt").read + list + -H + -o + name + -t + filesystem,volume + EOS + end +end diff --git a/Formula/z/znc.rb b/Formula/z/znc.rb new file mode 100644 index 0000000000000..6ab37765b1ab4 --- /dev/null +++ b/Formula/z/znc.rb @@ -0,0 +1,70 @@ +class Znc < Formula + desc "Advanced IRC bouncer" + homepage "https://wiki.znc.in/ZNC" + url "https://znc.in/releases/znc-1.10.1.tar.gz" + sha256 "4e6e76851dbf2606185972b53ec5decad68fe53b63a56e4df8b8b3c0a6c46800" + license "Apache-2.0" + revision 1 + + livecheck do + url "https://znc.in/releases/" + regex(/href=.*?znc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_tahoe: "f3e591d177d67dfcf9862e28263c2a7e41bed67e068851e49bbaff9002dfadf2" + sha256 arm64_sequoia: "b94c29f33a1caac275da0e4b696e17dca30a2a72ff7fe076aad048288ab90075" + sha256 arm64_sonoma: "4e10a3064792c123a98d2187233c3b0bb912e6374fc437b45848f6b66964bbe3" + sha256 sonoma: "0d63b728adcbfd850910495cd802a75fd88b7c5a807f317dc4167b676a7829b3" + sha256 arm64_linux: "8e7499140c420629555642ffb7c1d2da60176e1c0f2fee2b29540c0abd10fd1f" + sha256 x86_64_linux: "bf43c9ddc619177585d80befefb1cb090fc72baf95066caae45e0e80c3633ea7" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "cctz" + depends_on "icu4c@77" + depends_on "openssl@3" + depends_on "python@3.14" + + uses_from_macos "zlib" + + def install + rm_r(["third_party/cctz", "third_party/googletest"]) + + python3 = "python3.14" + xy = Language::Python.major_minor_version python3 + + # Fixes: CMake Error: Problem with archive_write_header(): Can't create 'swigpyrun.h' + ENV.deparallelize + + args = %W[ + -DWANT_PYTHON=ON + -DWANT_PYTHON_VERSION=python-#{xy} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Avoid references to Homebrew shims directory + inreplace lib/"pkgconfig/znc.pc", Superenv.shims_path/ENV.cxx, ENV.cxx + end + + service do + run [opt_bin/"znc", "--foreground"] + run_type :interval + interval 300 + log_path var/"log/znc.log" + error_log_path var/"log/znc.log" + end + + test do + mkdir ".znc" + system bin/"znc", "--makepem" + assert_path_exists testpath/".znc/znc.pem" + end +end diff --git a/Formula/z/zns.rb b/Formula/z/zns.rb new file mode 100644 index 0000000000000..907183e6a3f24 --- /dev/null +++ b/Formula/z/zns.rb @@ -0,0 +1,34 @@ +class Zns < Formula + desc "CLI tool for querying DNS records with readable, colored output" + homepage "https://github.com/znscli/zns" + url "https://github.com/znscli/zns/archive/refs/tags/v0.4.0.tar.gz" + sha256 "ae3aebc174ee839168b6b91f37a082d3efe275202927aa87743b04b87a8d13d8" + license "MIT" + head "https://github.com/znscli/zns.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7cc41244bcfbf7df964ebcb5ac7171abbeee3e9935107ed37e008cfc1ec1103b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7cc41244bcfbf7df964ebcb5ac7171abbeee3e9935107ed37e008cfc1ec1103b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7cc41244bcfbf7df964ebcb5ac7171abbeee3e9935107ed37e008cfc1ec1103b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7cc41244bcfbf7df964ebcb5ac7171abbeee3e9935107ed37e008cfc1ec1103b" + sha256 cellar: :any_skip_relocation, sonoma: "039f992e91d42aab450a339cd8ab8426f7f3873d423b06fac2a14a13ff9cd882" + sha256 cellar: :any_skip_relocation, ventura: "039f992e91d42aab450a339cd8ab8426f7f3873d423b06fac2a14a13ff9cd882" + sha256 cellar: :any_skip_relocation, arm64_linux: "8739ac54fb0abed262d78c9bbbe2dfed5af8bb48539439a6ffb9a400ef8a4713" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7497871ad502dca1485cce5d0e5654bd2e989080dd6914ba2efe880df81a707f" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/znscli/zns/cmd.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/zns --version") + assert_match "a.iana-servers.net.", shell_output("#{bin}/zns example.com -q NS --server 1.1.1.1") + end +end diff --git a/Formula/z/zola.rb b/Formula/z/zola.rb new file mode 100644 index 0000000000000..936012778e2c8 --- /dev/null +++ b/Formula/z/zola.rb @@ -0,0 +1,53 @@ +class Zola < Formula + desc "Fast static site generator in a single binary with everything built-in" + homepage "https://www.getzola.org/" + url "https://github.com/getzola/zola/archive/refs/tags/v0.21.0.tar.gz" + sha256 "bbfbc0496cf6612b6030c6d97b0fd2567f5ec41e251f8874b6c9ccda4c8149d4" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_tahoe: "08b28342f63cc3ccd3d6de9a6cab99dea3fecfba6a3a57fd597fcf08d3f63f23" + sha256 cellar: :any, arm64_sequoia: "c71a07f6ae400da7efa06078f253e8fddeb0764a552adcd4997bc5e3d970b541" + sha256 cellar: :any, arm64_sonoma: "8e1da1799c111f7a55d363bb78d19af4b401f0f36d470ec0734fa95ab3a48439" + sha256 cellar: :any, arm64_ventura: "22a3061287a22af643bb6717caa0cf0d0ec3acc3d0fd8eb0d966a707d992d80e" + sha256 cellar: :any, sonoma: "a2518b3d85cd8d05ef050333ba8d130513d83d08b0324068ce5606a510294bf4" + sha256 cellar: :any, ventura: "fcb14116063f863b1efec1ec099091c6f52381373957a64365ddfd26d273712a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1592c72ce75c49bced0ef6e0be212de3c720e78f8a8582bf4f0d6909c60ee4c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d964f4df791aa67dc4fd42514077eae08ef884b3ea55d5aadffc7689d874b72" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" # for onig_sys + + on_linux do + depends_on "openssl@3" # Uses Secure Transport on macOS + end + + def install + ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1" + system "cargo", "install", "--features", "native-tls", *std_cargo_args + + generate_completions_from_executable(bin/"zola", "completion") + end + + test do + system "yes '' | #{bin}/zola init mysite" + (testpath/"mysite/content/blog/_index.md").write <<~MARKDOWN + +++ + +++ + + Hi I'm Homebrew. + MARKDOWN + (testpath/"mysite/templates/section.html").write <<~HTML + {{ section.content | safe }} + HTML + + cd testpath/"mysite" do + system bin/"zola", "build" + end + + assert_equal "

    Hi I'm Homebrew.

    ", + (testpath/"mysite/public/blog/index.html").read.strip + end +end diff --git a/Formula/z/zookeeper.rb b/Formula/z/zookeeper.rb new file mode 100644 index 0000000000000..fc0db0c4ded9b --- /dev/null +++ b/Formula/z/zookeeper.rb @@ -0,0 +1,87 @@ +class Zookeeper < Formula + desc "Centralized server for distributed coordination of services" + homepage "https://zookeeper.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=zookeeper/zookeeper-3.9.4/apache-zookeeper-3.9.4.tar.gz" + mirror "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.4/apache-zookeeper-3.9.4.tar.gz" + sha256 "b84d0847d5b56c984fe3e50fdd28702340e66db5fd00701fa553d9899b09cabe" + license "Apache-2.0" + head "https://gitbox.apache.org/repos/asf/zookeeper.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "3a3e616c0425979bce887bb1877a1c9dbac8f7b1084d1063d0866cceb7e316e3" + sha256 cellar: :any, arm64_sequoia: "c043dd88af99227da093e9ef7a1136c3312aad202434a400b72aaefffdca1ded" + sha256 cellar: :any, arm64_sonoma: "c0589e76ede2fd9ba0e3b72cfc76a8cfaf8a532eb6cc5444a1758de771cdef4d" + sha256 cellar: :any, arm64_ventura: "753fb3e9dc9010f36e650e1314ed958b3e8ffcbf05eaa99c1bb4aa666dc85ca0" + sha256 cellar: :any, sonoma: "7ee73700ab93a4c025d257cd971bda6ef2529d628209f432b2ca14194cc7aa4b" + sha256 cellar: :any, ventura: "3b229907351bb11466ccf04ffa41d92f514d16f155842f5735ba9c4c8d0ada9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccad26bf750b09df6f7f3a4291360a1a3d172e295d7c8360a60a05e6dea8f4b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "241acb246366f78df065cba11917cc41845b185c520ca0632d5bf14d03c505db" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cppunit" => :build + depends_on "libtool" => :build + depends_on "maven" => :build + depends_on "pkgconf" => :build + + depends_on "openjdk" + depends_on "openssl@3" + + def default_zk_env + <<~EOS + [ -z "$ZOOCFGDIR" ] && export ZOOCFGDIR="#{pkgetc}" + EOS + end + + def install + system "mvn", "install", "-Pfull-build", "-DskipTests" + + system "tar", "-xf", "zookeeper-assembly/target/apache-zookeeper-#{version}-bin.tar.gz" + binpfx = "apache-zookeeper-#{version}-bin" + libexec.install binpfx+"/bin", binpfx+"/lib", "zookeeper-contrib" + rm(Dir["build-bin/bin/*.cmd"]) + + system "tar", "-xf", "zookeeper-assembly/target/apache-zookeeper-#{version}-lib.tar.gz" + libpfx = "apache-zookeeper-#{version}-lib" + include.install Dir[libpfx+"/usr/include/*"] + lib.install Dir[libpfx+"/usr/lib/*"] + + (var/"log/zookeeper").mkpath + (var/"run/zookeeper/data").mkpath + + Pathname.glob("#{libexec}/bin/*.sh") do |path| + next if path == libexec/"bin/zkEnv.sh" + + script_name = path.basename + bin_name = path.basename ".sh" + (bin+bin_name).write <<~EOS + #!/bin/bash + export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + . "#{pkgetc}/defaults" + exec "#{libexec}/bin/#{script_name}" "$@" + EOS + end + + (buildpath/"defaults").write(default_zk_env) + cp "conf/logback.xml", "logback.xml" + cp "conf/zoo_sample.cfg", "conf/zoo.cfg" + inreplace "conf/zoo.cfg", + /^dataDir=.*/, "dataDir=#{var}/run/zookeeper/data" + pkgetc.install "conf/zoo.cfg", "defaults", "logback.xml" + (pkgshare/"examples").install "conf/logback.xml", "conf/zoo_sample.cfg" + end + + service do + run [opt_bin/"zkServer", "start-foreground"] + environment_variables SERVER_JVMFLAGS: "-Dapple.awt.UIElement=true" + keep_alive successful_exit: false + working_dir var + end + + test do + output = shell_output("#{bin}/zkServer -h 2>&1") + assert_match "Using config: #{pkgetc}/zoo.cfg", output + end +end diff --git a/Formula/z/zopfli.rb b/Formula/z/zopfli.rb new file mode 100644 index 0000000000000..ad6d2e9d3843e --- /dev/null +++ b/Formula/z/zopfli.rb @@ -0,0 +1,52 @@ +class Zopfli < Formula + desc "New zlib (gzip, deflate) compatible compressor" + homepage "https://github.com/google/zopfli" + url "https://github.com/google/zopfli/archive/refs/tags/zopfli-1.0.3.tar.gz" + sha256 "e955a7739f71af37ef3349c4fa141c648e8775bceb2195be07e86f8e638814bd" + license "Apache-2.0" + revision 1 + head "https://github.com/google/zopfli.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "5b6adb20e537ce4f8fcb5d372c1dc80d42f99bd455ac4d5d9a872dfcfafc5a04" + sha256 cellar: :any, arm64_sequoia: "87b9f0523e7d1233fcaec2d394122f9aab234bf00a026f4f9322b47b1ef8f8ae" + sha256 cellar: :any, arm64_sonoma: "171ca3e9b77ac8ebac1b2c082c4938d845605d599e30c671003ca3b5f8f0f795" + sha256 cellar: :any, arm64_ventura: "68ec999fc21b6ea2e0a44fe4a9cb23dc6fbfac6f51ee153b268fd33408f6d801" + sha256 cellar: :any, arm64_monterey: "31f0023436da6f38a1a1df31ca8b2fd82eaac4a7ce1bc2a2b7cf05a0c4ec2f05" + sha256 cellar: :any, arm64_big_sur: "2f093e34188e4c0b3d7b2acdd913ecc302ba6dafe722f943e579bf70a09ef15a" + sha256 cellar: :any, sonoma: "cee5a9b397978a707970ca5f9caaa4c5c461effcb3c4291ae74d2e40ac769dc2" + sha256 cellar: :any, ventura: "ef2f18c71a1473972602aa28fc2e0c508c89336e42633423804877ab33dc6ccb" + sha256 cellar: :any, monterey: "6f02f39b1b143725890fb1d1a33e6f587daf33ef473ff2991189e2fd1d1a5f85" + sha256 cellar: :any, big_sur: "64f2102bff6163156d073e4554532c990c3a65669b7a52d2cec83a22d5b32d4c" + sha256 cellar: :any, catalina: "288d48544556b28451e536b142dcc2235ea9dfe52dfe79d0b1d5f50db85c16dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "3424c6b2263832ea51f0b089bc7b8d1bbdfe041006847803ec32a7cc348c67c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6994139461f1d64975551091d1254a906a8957c3ce08c0c2b6d8d5c995b66f05" + end + + depends_on "cmake" => :build + + # Backport fix for CMake 4 compatibility + # PR ref: https://github.com/google/zopfli/pull/207 + patch do + url "https://github.com/google/zopfli/commit/8ef44ffde0fd2bb2a658f75887e65b31c9e44985.patch?full_index=1" + sha256 "4a6f0b3dc53ea6de1af245231b821a94389e91eab5bd3056f5735c3de29b0402" + end + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"zopfli" + system bin/"zopflipng", test_fixtures("test.png"), "#{testpath}/out.png" + assert_path_exists testpath/"out.png" + end +end diff --git a/Formula/z/zorba.rb b/Formula/z/zorba.rb new file mode 100644 index 0000000000000..cc08ffb5d3570 --- /dev/null +++ b/Formula/z/zorba.rb @@ -0,0 +1,51 @@ +class Zorba < Formula + desc "NoSQL query processor" + homepage "http://www.zorba.io/" + url "https://github.com/28msec/zorba/archive/refs/tags/3.1.tar.gz" + sha256 "05eed935c0ff3626934a5a70724a42410fd93bc96aba1fa4821736210c7f1dd8" + license "Apache-2.0" + revision 20 + + bottle do + sha256 arm64_sequoia: "531dae378c0007fe5b28d122ad9e03158f87653321070f53fa7a8016125611b7" + sha256 arm64_sonoma: "7bfa2637276cbc0fbade2f450da1b68e88fb7aedd944ce83a658014ac035607e" + sha256 arm64_ventura: "b8760ea3d7df545813b9f333fcf49c6dd9187558b3701e281383336a3e62c674" + sha256 sonoma: "368e4b11f65d08b39c602a001f26719b491d92b03ac98de86719d7a86ddbdcb5" + sha256 ventura: "7b79034310f8f4f18b21d777540d03279dd7de8ba6e9950f722ca2b93439992e" + end + + # https://github.com/28msec/zorba/issues/232 + # no longer build due to `'boost/filesystem/convenience.hpp' file not found` + disable! date: "2025-05-01", because: :does_not_build + + depends_on "cmake" => :build + depends_on "openjdk" => :build + depends_on "flex" + depends_on "icu4c@74" + depends_on "xerces-c" + + uses_from_macos "libxml2" + + # Fixes for missing headers and namespaces from open PR in GitHub repo linked via homepage + # PR ref: https://github.com/zorba-processor/zorba/pull/19 + patch do + url "https://github.com/zorba-processor/zorba/commit/e2fddf7bd618dad9dc1e684a2c1ad61103b6e8d2.patch?full_index=1" + sha256 "2c4f0ade4f83ca2fd1ee8344682326d7e0ab3037d0de89941281c90875fcd914" + end + + def install + # Workaround for error: use of undeclared identifier 'TRUE' + ENV.append "CFLAGS", "-DU_DEFINE_FALSE_AND_TRUE=1" + ENV.append "CXXFLAGS", "-DU_DEFINE_FALSE_AND_TRUE=1" + + ENV.cxx11 + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_equal "\n2", shell_output("#{bin}/zorba -q 1+1").strip + end +end diff --git a/Formula/z/zork.rb b/Formula/z/zork.rb new file mode 100644 index 0000000000000..41b6904dbe7f3 --- /dev/null +++ b/Formula/z/zork.rb @@ -0,0 +1,46 @@ +class Zork < Formula + desc "Dungeon modified from FORTRAN to C" + homepage "https://github.com/devshane/zork" + url "https://github.com/devshane/zork/archive/refs/tags/v1.0.3.tar.gz" + sha256 "929871abae9be902d4fb592f2e76e52b58b386d208f127c826ae1d7b7bade9ef" + license :public_domain + head "https://github.com/devshane/zork.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "fdce85049ae42b1a9be9102f46045e7940a47b15e9a5994f08b954721f0ac242" + sha256 arm64_sequoia: "05e76a8e62d4bb0e55d7aa39d39b01082ac9f6dac9305feaccd466deb3e9b54c" + sha256 arm64_sonoma: "2abffab6441cae3c3ca7247d1f0d313571ae873f536fb647b605bec580688d55" + sha256 arm64_ventura: "ec4836e8f767968119feea70913b248475a549d10f9dc78f1777b0cffc78dde7" + sha256 arm64_monterey: "506debc59ab6d891ce98da1bfe4c8a6e5604dc9a91cf225ed19fe3027544f3ea" + sha256 arm64_big_sur: "3f9f282ff618e0a31976bbae0b95e1fabcab2053cef50e2e54bce7877533bbec" + sha256 sonoma: "1baa8e6b8652a3e2097f4cf7bdd682aefc2257539ba3e2c128b67ead17a2dbe1" + sha256 ventura: "d3bee8f46195e47e19bf1772a6e2bc394f314d1730af2576590a65a24875a10c" + sha256 monterey: "6693bf5507881124657a5cbeb75fc6df3d2f21aafbecce1967212d631924a5cf" + sha256 big_sur: "d8138472c8d3b67db24ce72d03228081118aed98007d5280f6713f556fea337e" + sha256 catalina: "694460ddf13fb4e4f05ef49dde4472dcce56dbc7a945c99307d3e34e35301aa2" + sha256 arm64_linux: "a8c82f78501656b0426865983a27c1c722b5ef39ad4606cd15ee9239a312db82" + sha256 x86_64_linux: "b6205ffff9a5874f180fd92c609e23cbf079799d9c43523b9f05befde770f712" + end + + uses_from_macos "ncurses" + + def install + system "make", "DATADIR=#{share}", "BINDIR=#{bin}" + system "make", "install", "DATADIR=#{share}", "BINDIR=#{bin}", "MANDIR=#{man}" + end + + test do + test_phrase = <<~EOS.chomp + Welcome to Dungeon.\t\t\tThis version created 11-MAR-91. + You are in an open field west of a big white house with a boarded + front door. + There is a small mailbox here. + >Opening the mailbox reveals: + A leaflet. + > + EOS + assert_equal test_phrase, pipe_output(bin/"zork", "open mailbox", 0) + end +end diff --git a/Formula/z/zoro.rb b/Formula/z/zoro.rb new file mode 100644 index 0000000000000..e5c001ff7c08b --- /dev/null +++ b/Formula/z/zoro.rb @@ -0,0 +1,52 @@ +class Zoro < Formula + desc "Expose local server to external network" + homepage "https://github.com/txthinking/zoro" + url "https://github.com/txthinking/zoro/archive/refs/tags/v20240828.tar.gz" + sha256 "8b41550a1d42fa2c0a67d7115978efff126ab6fff30d774ce902febd0b682c5c" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "8cf70a14160538590d696a97a39afbfb1d69d238b808cc0b4392f94313e25b17" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f74a1978da2e5be1134fe0b9dfcaf82794b27b2ed4dec8cabf74e0771a5588d4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df2261266bc3c20e94bf8ccf0611f1b23bc08caf4310dc9c7d1045549bc03dda" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df2261266bc3c20e94bf8ccf0611f1b23bc08caf4310dc9c7d1045549bc03dda" + sha256 cellar: :any_skip_relocation, arm64_monterey: "df2261266bc3c20e94bf8ccf0611f1b23bc08caf4310dc9c7d1045549bc03dda" + sha256 cellar: :any_skip_relocation, sonoma: "b5cfca2c2aec505f459401d026a5a3d38ad66e772c0470f626215719480a4b6d" + sha256 cellar: :any_skip_relocation, ventura: "b5cfca2c2aec505f459401d026a5a3d38ad66e772c0470f626215719480a4b6d" + sha256 cellar: :any_skip_relocation, monterey: "b5cfca2c2aec505f459401d026a5a3d38ad66e772c0470f626215719480a4b6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d47a3d2615ce498757d5ff686cff5e72d2e57a432aa008bc6026669c529450e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd81e60c2c5cd3b30aaa7f8dc372f435a73ff8cb765f77a04c0fb9fc0c3874ec" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cli/zoro" + end + + test do + (testpath/"index.html").write <<~HTML + + + +

    passed

    + + + HTML + zoro_server_port = free_port + server_port = free_port + client_port = free_port + server_pid = spawn bin/"zoro", "server", "-l", ":#{zoro_server_port}", "-p", "password" + sleep 5 + client_pid = spawn bin/"zoro", "client", "-s", "127.0.0.1:#{zoro_server_port}", + "-p", "password", + "--serverport", server_port.to_s, + "--dir", testpath, + "--dirport", client_port.to_s + sleep 3 + output = shell_output "curl 127.0.0.1:#{server_port}" + assert_match "passed", output + ensure + Process.kill "SIGTERM", server_pid, client_pid + end +end diff --git a/Formula/z/zoxide.rb b/Formula/z/zoxide.rb new file mode 100644 index 0000000000000..442deb3f4fe34 --- /dev/null +++ b/Formula/z/zoxide.rb @@ -0,0 +1,33 @@ +class Zoxide < Formula + desc "Shell extension to navigate your filesystem faster" + homepage "https://github.com/ajeetdsouza/zoxide" + url "https://github.com/ajeetdsouza/zoxide/archive/refs/tags/v0.9.8.tar.gz" + sha256 "1b276edbf328aafc86afe1ebce41f45ccba3a3125412e89c8c5d8e825b0c7407" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1467f17fb6fc40689476e7a23c899ce2d7d1973ef3185befbd23bf700cbbc33b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cea8e6116f5dcc487213bc9f1013447ba766967294c091f479858969764ebfa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "414ab1396110a83c89418c22c1b818be4e63e129b9cb62417684af9ee67af857" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e9391352600b9256d830f483a689290bdb037cebb883e9f04c8f1790a8ae8ef" + sha256 cellar: :any_skip_relocation, sonoma: "26b19beed6f0572caef1415bdc74f295410526de07b1f95c345e5a441b26a1ba" + sha256 cellar: :any_skip_relocation, ventura: "dc21a28b1f3959472ffdc6bf60cde72bb1625ab95de744175901d908a98500cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "54f58a6f4e999a643d6b47619906fec2b2aa1b79b98ecaf22d3e70b0128da1f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a37e73f85f229d6e7b83cd61700e4254ef6773c5e6d36f4f69e9535fad5bd0b6" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "contrib/completions/zoxide.bash" => "zoxide" + zsh_completion.install "contrib/completions/_zoxide" + fish_completion.install "contrib/completions/zoxide.fish" + share.install "man" + end + + test do + assert_empty shell_output("#{bin}/zoxide add /").strip + assert_equal "/", shell_output("#{bin}/zoxide query").strip + end +end diff --git a/Formula/z/zpaq.rb b/Formula/z/zpaq.rb new file mode 100644 index 0000000000000..84402e632e877 --- /dev/null +++ b/Formula/z/zpaq.rb @@ -0,0 +1,47 @@ +class Zpaq < Formula + desc "Incremental, journaling command-line archiver" + homepage "https://mattmahoney.net/dc/zpaq.html" + url "https://mattmahoney.net/dc/zpaq715.zip" + version "7.15" + sha256 "e85ec2529eb0ba22ceaeabd461e55357ef099b80f61c14f377b429ea3d49d418" + license all_of: ["Unlicense", "MIT", :public_domain] + revision 1 + head "https://github.com/zpaq/zpaq.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "806e95bf2357903bc8a6a1766850a6030386cef25a672a274315c252dc2b998f" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d82a2ae7e022957f0f0675433d8e01622f3ce1a42c2cc7c76ce902f3685744c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1964b6de47419cc4c995b2f4796afa755213b15efc752b7dadb154bf880599e6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5c2b429eb50442110fb5fa144e72fc23848d876eefd491ca2c04967e8789b21f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fe862e92dd0fc348e0a93891fb863075443841d64aaee4ee5ac56b36ad49e3dc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "743d0714aa93446980dbb496709e64415234c335c8399e55054d1f85ac6b074a" + sha256 cellar: :any_skip_relocation, sonoma: "b4b5c39591e177215ccd6c9ab1c7a406fe87c6861504c64356c65106108db082" + sha256 cellar: :any_skip_relocation, ventura: "e57ff78853946a1310bc0c6ee62d98f3d2c42d5ce52cc597d6f0ce3bf47329f6" + sha256 cellar: :any_skip_relocation, monterey: "a0da31ebe030b392ea21c7d3339becb134b041b8e72ffd2e013e20630dbf2f5d" + sha256 cellar: :any_skip_relocation, big_sur: "2ca2aa378add42b28e3a4513e4176740e013ff9189b7d5d091c998c6ba8ec16f" + sha256 cellar: :any_skip_relocation, catalina: "6bedfd3bff1fa1e98b6a41eedf02aa1f7600943f9081624fb9811e69fd3d9ffa" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa97e3fc826ff8e04382c77af813c2b23dcd5f57a5d336a59043ea7c2ddaaf13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcee2715716cfdbac67ff81332d2cfc39eeae7ff286ff645c3740375b848e8ec" + end + + resource "test" do + url "https://mattmahoney.net/dc/calgarytest2.zpaq" + sha256 "b110688939477bbe62263faff1ce488872c68c0352aa8e55779346f1bd1ed07e" + end + + def install + # When building on non-Intel this is supposed to be manually uncommented + # from the Makefile! (It's also missing "-D" though) + inreplace "Makefile", "# CPPFLAGS+=NOJIT", "CPPFLAGS+=-DNOJIT" unless Hardware::CPU.intel? + system "make" + system "make", "check" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + testpath.install resource("test") + assert_match "all OK", shell_output("#{bin}/zpaq x calgarytest2.zpaq 2>&1") + end +end diff --git a/Formula/z/zpaqfranz.rb b/Formula/z/zpaqfranz.rb new file mode 100644 index 0000000000000..a9ce47c05c088 --- /dev/null +++ b/Formula/z/zpaqfranz.rb @@ -0,0 +1,42 @@ +class Zpaqfranz < Formula + desc "Deduplicating command-line archiver and backup tool" + homepage "https://github.com/fcorbelli/zpaqfranz" + url "https://github.com/fcorbelli/zpaqfranz/archive/refs/tags/63.6.tar.gz" + sha256 "1a78d45756d20d9df3e6c7db4ee2b31e8193e4511a3ca739310a180aaebaea28" + license all_of: [:public_domain, "MIT", "Zlib", "Unlicense", "BSD-2-Clause", "Apache-2.0"] + head "https://github.com/fcorbelli/zpaqfranz.git", branch: "main" + + # Some versions using a stable tag format are marked as pre-release on GitHub, + # so it's necessary to check release versions instead of tags. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "2694a1eb1f31e88d780c2549f2d3403aa877f5126dcad45a253e8f93358db9e1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3088cebc76769be67511da255f5d0c9289f0040e1e17aae1d03701e932fd567" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33f31afe68fb568069eaf4ab0da903703a643ae3e72c3a414a15347eafb058cd" + sha256 cellar: :any_skip_relocation, sonoma: "c5584810863a379ebe832088580cac3735ba8085375ece48b747e78da3976c03" + sha256 cellar: :any_skip_relocation, arm64_linux: "97e6f54909ec97bdfb700904538161d0a583f86fd04b2ccb420a3885b586bcb7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b189a7dc6ba63f68ff27a5820e80616ac5d282fe9162ed3678232d649d3aa80a" + end + + def install + bin.mkdir + + # JIT only works on Intel (might work on Linux aarch64, but not Apple Silicon) + ENV.append_to_cflags "-DNOJIT" unless Hardware::CPU.intel? + + system "make", "install", "-f", "NONWINDOWS/Makefile", "BINDIR=#{bin}/#{name}" + man1.install Utils::Gzip.compress("man/zpaqfranz.1") + end + + test do + system bin/"zpaqfranz", "autotest", "-to", testpath/"archive" + system bin/"zpaqfranz", "extract", testpath/"archive/sha256.zpaq", "-to", testpath/"out/" + testpath.glob("out/*").each do |path| + assert_equal path.basename.to_s.downcase, Digest::SHA256.hexdigest(path.read) + end + end +end diff --git a/Formula/z/zplug.rb b/Formula/z/zplug.rb new file mode 100644 index 0000000000000..45e9d39a5126e --- /dev/null +++ b/Formula/z/zplug.rb @@ -0,0 +1,37 @@ +class Zplug < Formula + desc "Next-generation plugin manager for zsh" + homepage "https://github.com/zplug/zplug/" + url "https://github.com/zplug/zplug/archive/refs/tags/2.4.2.tar.gz" + sha256 "82a51e8c388844acbfb64196623bede07eee2384f1fc30966eac880373aa9030" + license "MIT" + head "https://github.com/zplug/zplug.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c99ea3312515bf7de844cbe43af641afebe319549ff5c8c719ccebff79810999" + end + + uses_from_macos "zsh" + + def install + bin.install Dir["bin/*"] + man1.install "doc/man/man1/zplug.1" + prefix.install Dir["*"] + touch prefix/"packages.zsh" + end + + def caveats + <<~EOS + In order to use zplug, please add the following to your .zshrc: + export ZPLUG_HOME=#{opt_prefix} + source $ZPLUG_HOME/init.zsh + EOS + end + + test do + ENV["ZPLUG_HOME"] = opt_prefix + system "zsh", "-c", "source #{opt_prefix}/init.zsh && (( $+functions[zplug] ))" + end +end diff --git a/Formula/z/zrepl.rb b/Formula/z/zrepl.rb new file mode 100644 index 0000000000000..33a102b223ff6 --- /dev/null +++ b/Formula/z/zrepl.rb @@ -0,0 +1,53 @@ +class Zrepl < Formula + desc "One-stop ZFS backup & replication solution" + homepage "https://zrepl.github.io" + url "https://github.com/zrepl/zrepl/archive/refs/tags/v0.6.1.tar.gz" + sha256 "263c82501b75a1413f8a298c1d67d7e940c1b0cb967979790773237e2a30adbd" + license "MIT" + head "https://github.com/zrepl/zrepl.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "86f94f15cab96087e5f9a17e02756dc1efe8f382635805345d6da7cf4f15a810" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86f94f15cab96087e5f9a17e02756dc1efe8f382635805345d6da7cf4f15a810" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "86f94f15cab96087e5f9a17e02756dc1efe8f382635805345d6da7cf4f15a810" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86f94f15cab96087e5f9a17e02756dc1efe8f382635805345d6da7cf4f15a810" + sha256 cellar: :any_skip_relocation, sonoma: "0f47b589d4c5a01d645191e7963fc4e62a018f1844b22a3acfec0275354a294d" + sha256 cellar: :any_skip_relocation, ventura: "0f47b589d4c5a01d645191e7963fc4e62a018f1844b22a3acfec0275354a294d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d264994b4417c3509cebcfb4b04bc6e2a88e7926d93ab6950fc8e3d5893ded0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2db65d9638d95007c9b4880052f58a08befe29686120bd8fb33d9998a214ce49" + end + + depends_on "go" => :build + + resource "homebrew-sample_config" do + url "https://raw.githubusercontent.com/zrepl/zrepl/refs/tags/v0.6.1/config/samples/local.yml" + sha256 "f27b21716e6efdc208481a8f7399f35fd041183783e00c57f62b3a5520470c05" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/zrepl/zrepl/version.zreplVersion=#{version}") + (var/"log/zrepl").mkpath + (var/"run/zrepl").mkpath + (etc/"zrepl").mkpath + end + + service do + run [opt_bin/"zrepl", "daemon"] + keep_alive true + require_root true + working_dir var/"run/zrepl" + log_path var/"log/zrepl/zrepl.out.log" + error_log_path var/"log/zrepl/zrepl.err.log" + environment_variables PATH: std_service_path_env + end + + test do + resources.each do |r| + r.verify_download_integrity(r.fetch) + assert_empty shell_output("#{bin}/zrepl configcheck --config #{r.cached_download}") + end + end +end diff --git a/Formula/z/zrok.rb b/Formula/z/zrok.rb new file mode 100644 index 0000000000000..04bd17818e039 --- /dev/null +++ b/Formula/z/zrok.rb @@ -0,0 +1,68 @@ +class Zrok < Formula + desc "Geo-scale, next-generation sharing platform built on top of OpenZiti" + homepage "https://zrok.io" + url "https://github.com/openziti/zrok/releases/download/v1.1.10/source-v1.1.10.tar.gz" + sha256 "1e6999f11be37fab066254d080a3593e37835a2f8d7927d13e8524acf5e6073d" + # The main license is Apache-2.0. ACKNOWLEDGEMENTS.md lists licenses for parts of code + license all_of: ["Apache-2.0", "BSD-3-Clause", "MIT"] + head "https://github.com/openziti/zrok.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "f119049ac0ea153167191c0ee9da00a052ee1e7a523fb609820e123f96696e27" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "999818d3fa25c30120a5db6ba5a8dd7ce152593ca017bbf59f18cc7c35b2b1f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af66c3978664de1a290fc71ab5767e48a7caa81376dd59bd7c690593be4c9e72" + sha256 cellar: :any_skip_relocation, sonoma: "fd805e9a12731fefad3b83875236d3c22d2c1fbe8a4c52eed42ba9b35fe48d98" + sha256 cellar: :any_skip_relocation, arm64_linux: "06dd4b43ca1833265863cb58066e3390b7807197df83142fe65bb88cf38f871e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b0c4c54227362d9b43651e76eb09b287fac2106eeece701a6656ca7e7a8fbf5" + end + + depends_on "go" => :build + depends_on "node" => :build + + def install + ["ui", "agent/agentUi"].each do |ui_dir| + cd "#{buildpath}/#{ui_dir}" do + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "build" + end + end + + # Workaround to avoid patchelf corruption when cgo is required (for go-sqlite3) + if OS.linux? && Hardware::CPU.arch == :arm64 + ENV["CGO_ENABLED"] = "1" + ENV["GO_EXTLINK_ENABLED"] = "1" + ENV.append "GOFLAGS", "-buildmode=pie" + end + + ldflags = %W[ + -s -w + -X github.com/openziti/zrok/build.Version=v#{version} + -X github.com/openziti/zrok/build.Hash=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/zrok" + end + + test do + (testpath/"ctrl.yml").write <<~YAML + v: 4 + maintenance: + registration: + expiration_timeout: 24h + check_frequency: 1h + batch_limit: 500 + reset_password: + expiration_timeout: 15m + check_frequency: 15m + batch_limit: 500 + YAML + + version_output = shell_output("#{bin}/zrok version") + assert_match(/\bv#{version}\b/, version_output) + assert_match(/[[a-f0-9]{40}]/, version_output) + + status_output = shell_output("#{bin}/zrok controller validate #{testpath}/ctrl.yml 2>&1") + assert_match("expiration_timeout = 24h0m0s", status_output) + end +end diff --git a/Formula/z/zsdx.rb b/Formula/z/zsdx.rb new file mode 100644 index 0000000000000..b1596a0e7e2cc --- /dev/null +++ b/Formula/z/zsdx.rb @@ -0,0 +1,46 @@ +class Zsdx < Formula + desc "Zelda Mystery of Solarus DX" + homepage "https://www.solarus-games.org/games/the-legend-of-zelda-mystery-of-solarus-dx" + url "https://gitlab.com/solarus-games/games/zsdx/-/archive/v1.12.3/zsdx-v1.12.3.tar.bz2" + sha256 "29065d3280ec03176e8de0a7a26504421d43c5778b566e50c212deb25b45d66a" + license all_of: ["CC-BY-SA-4.0", "GPL-3.0-only"] + head "https://gitlab.com/solarus-games/games/zsdx.git", branch: "dev" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "20ad65e6c82c443373bc1532dd4f69576d433cc5135c00d90978950e6c6a225c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e04d5e80fee6fc551aa5f8107bbc563a5cd8d5a3a4c92a42cdf48673f43f49ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc51b43950a65fbd9e1a3faf0d36eba2dc3495bfb6070b3949440eb38fa894ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf9b6d3f03eea1f2ae50f831fc5df103bcbb16c10b37b19c45cae4a4da5cb2e9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6ed8efab9ad526d5d1f3ae89725e30f4913546a49cb4d752be453365ff99bbce" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "254d66ee2050168bf9dad808272678ae1de6f89d364bf658a38e28f4bc339cf7" + sha256 cellar: :any_skip_relocation, sonoma: "3a6df19f8e50b836f9e8a7523d50f0b3f8809251494fb15e0cdd1b8246eb7b5f" + sha256 cellar: :any_skip_relocation, ventura: "70896743d2a6c62b3660d0917e1f2fad08f878bee765f863234a3d9faf07cf86" + sha256 cellar: :any_skip_relocation, monterey: "bffc5d27e406eb33325bfbb03330bfde3f73dc944958b5218c384167673d5643" + sha256 cellar: :any_skip_relocation, big_sur: "3267503e66537fe829db44b5d36d97200c78911f171659e9c5fc66912beea4fa" + sha256 cellar: :any_skip_relocation, catalina: "bf58b35d61058612b8497abcc7c29930b1b6d6f9ea0aa7b88bc00ae7181b1f35" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1bba51d6059e4d5922550be0ad0f6b3ef4f1f4161421ef2c41483b6fe4cfc49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0c835e5e48efab248d3f5347d04a9ced81d0869c4fd4afa0176e2331b2c8374" + end + + depends_on "cmake" => :build + depends_on "solarus" + + uses_from_macos "zip" => :build + uses_from_macos "unzip" => :test + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DSOLARUS_INSTALL_DATADIR=#{share}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system Formula["solarus"].bin/"solarus-run", "-help" + system "unzip", pkgshare/"data.solarus" + end +end diff --git a/Formula/z/zsh-async.rb b/Formula/z/zsh-async.rb new file mode 100644 index 0000000000000..78ef4ff737953 --- /dev/null +++ b/Formula/z/zsh-async.rb @@ -0,0 +1,53 @@ +class ZshAsync < Formula + desc "Perform tasks asynchronously without external tools" + homepage "https://github.com/mafredri/zsh-async" + url "https://github.com/mafredri/zsh-async/archive/refs/tags/v1.8.6.tar.gz" + sha256 "0f2778cb882b73471569b016bbfa6d9d75572bff40dc7f25ac50b3a8dc94ef47" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d743c80fa4ea6850e397fc6a987f826dc7ed1503c038c5ef9e799fb0ce620b40" + end + + uses_from_macos "zsh" + + def install + zsh_function.install "async.zsh" => "async" + end + + test do + example = <<~ZSH + source #{zsh_function}/async + async_init + + # Initialize a new worker (with notify option) + async_start_worker my_worker -n + + # Create a callback function to process results + COMPLETED=0 + completed_callback() { + COMPLETED=$(( COMPLETED + 1 )) + print $@ + } + + # Register callback function for the workers completed jobs + async_register_callback my_worker completed_callback + + # Give the worker some tasks to perform + async_job my_worker print hello + async_job my_worker sleep 0.3 + + # Wait for the two tasks to be completed + while (( COMPLETED < 2 )); do + print "Waiting..." + sleep 0.1 + done + + print "Completed $COMPLETED tasks!" + ZSH + assert_match "Completed 2 tasks!", shell_output("zsh -c '#{example}'") + end +end diff --git a/Formula/z/zsh-autocomplete.rb b/Formula/z/zsh-autocomplete.rb new file mode 100644 index 0000000000000..7d34fa55291b5 --- /dev/null +++ b/Formula/z/zsh-autocomplete.rb @@ -0,0 +1,45 @@ +class ZshAutocomplete < Formula + desc "Real-time type-ahead completion for Zsh" + homepage "https://github.com/marlonrichert/zsh-autocomplete" + url "https://github.com/marlonrichert/zsh-autocomplete/archive/refs/tags/25.03.19.tar.gz" + sha256 "866451178e35b50f7f86a6b50d8cdb28494bb3a7be02b1c7adf909390a9774fb" + license "MIT" + head "https://github.com/marlonrichert/zsh-autocomplete.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c2293efac410eae4220f21942481793ad9b13376b83f0f3225f90e0d5d8e305b" + end + + depends_on "clitest" => :test + uses_from_macos "zsh" => :test + + def install + pkgshare.install Dir["*"] + end + + def caveats + <<~EOS + Installation + 1. Add at or near the top of your .zshrc file (before any calls to compdef): + source #{HOMEBREW_PREFIX}/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh + 2. Remove any calls to compinit from your .zshrc file. + 3. If you're using Ubuntu, add to your .zshenv file: + skip_global_compinit=1 + Then restart your shell. + For more details, see: + https://github.com/marlonrichert/zsh-autocomplete + EOS + end + test do + (testpath/"run-tests.zsh").write <<~SHELL + #!/bin/zsh -f + + env -i HOME=$HOME PATH=$PATH FPATH=$FPATH zsh -f -- \ + =clitest --progress dot --prompt '%' -- $PWD/Tests/*.md + SHELL + + cd pkgshare do + system "zsh", testpath/"run-tests.zsh" + end + end +end diff --git a/Formula/z/zsh-autopair.rb b/Formula/z/zsh-autopair.rb new file mode 100644 index 0000000000000..4a496a1c70af0 --- /dev/null +++ b/Formula/z/zsh-autopair.rb @@ -0,0 +1,35 @@ +class ZshAutopair < Formula + desc "Auto-close and delete matching delimiters in zsh" + homepage "https://github.com/hlissner/zsh-autopair" + url "https://github.com/hlissner/zsh-autopair/archive/refs/tags/v1.0.tar.gz" + sha256 "4b6f4d20d89ea08fd239089ad4133cff5ebdb71f07f589d5e41d0814d4cf4165" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c9208ef9b9a923475ace7d3c397458eded12a4d8bb3961276d4196cc10329a0d" + end + + uses_from_macos "zsh" => :test + + def install + pkgshare.install "autopair.zsh" + end + + def caveats + <<~EOS + To activate autopair, add the following at the end of your .zshrc: + + source #{HOMEBREW_PREFIX}/share/zsh-autopair/autopair.zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + zsh_command = "source #{pkgshare}/autopair.zsh && echo $AUTOPAIR_PAIRS" + assert_match "\" } ' ) ] `", shell_output("zsh -c '#{zsh_command}'") + end +end diff --git a/Formula/z/zsh-autosuggestions.rb b/Formula/z/zsh-autosuggestions.rb new file mode 100644 index 0000000000000..cceea1970d2bf --- /dev/null +++ b/Formula/z/zsh-autosuggestions.rb @@ -0,0 +1,32 @@ +class ZshAutosuggestions < Formula + desc "Fish-like fast/unobtrusive autosuggestions for zsh" + homepage "https://github.com/zsh-users/zsh-autosuggestions" + url "https://github.com/zsh-users/zsh-autosuggestions/archive/refs/tags/v0.7.1.tar.gz" + sha256 "0df7affff21cd87ed298e6a3970ed08a1dd66a6efa676454ee5b091ad503badf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b81edc29e7e71866042bb3e06be7c23ce5501b6cd72be6cd5f3fdfd14b311c71" + end + + uses_from_macos "zsh" => :test + + def install + pkgshare.install "zsh-autosuggestions.zsh" + end + + def caveats + <<~EOS + To activate the autosuggestions, add the following at the end of your .zshrc: + + source #{HOMEBREW_PREFIX}/share/zsh-autosuggestions/zsh-autosuggestions.zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + assert_match "history", + shell_output("zsh -c '. #{pkgshare}/zsh-autosuggestions.zsh && echo $ZSH_AUTOSUGGEST_STRATEGY'") + end +end diff --git a/Formula/z/zsh-completions.rb b/Formula/z/zsh-completions.rb new file mode 100644 index 0000000000000..0d19613274396 --- /dev/null +++ b/Formula/z/zsh-completions.rb @@ -0,0 +1,67 @@ +class ZshCompletions < Formula + desc "Additional completion definitions for zsh" + homepage "https://github.com/zsh-users/zsh-completions" + url "https://github.com/zsh-users/zsh-completions/archive/refs/tags/0.35.0.tar.gz" + sha256 "811bb4213622720872e08d6e0857f1dd7bc12ff7aa2099a170b76301a53f4fbe" + # The main/default license is the same as Zsh (MIT-Modern-Variant); however, + # the majority of completions are BSD-3-Clause. The remainder is mostly MIT. + # A few completions use other licenses and are specifically noted below. + license all_of: [ + "MIT-Modern-Variant", + "BSD-3-Clause", + "MIT", + "Apache-2.0", # _cf, _hledger + "ISC", # _rfkill + "NCSA", # _include-what-you-use + ] + head "https://github.com/zsh-users/zsh-completions.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "98d3985c4c7883eceb5136fef89f1e169067fe290eb540efeb5fec4ace5396be" + end + + uses_from_macos "zsh" => :test + + def install + inreplace "src/_ghc", "/usr/local", HOMEBREW_PREFIX + # We install this into `pkgshare` to avoid conflicts + # with completions installed by other formulae. See: + # https://github.com/Homebrew/homebrew-core/pull/126586 + pkgshare.install Dir["src/_*"] + end + + def caveats + <<~EOS + To activate these completions, add the following to your .zshrc: + + if type brew &>/dev/null; then + FPATH=$(brew --prefix)/share/zsh-completions:$FPATH + + autoload -Uz compinit + compinit + fi + + You may also need to force rebuild `zcompdump`: + + rm -f ~/.zcompdump; compinit + + Additionally, if you receive "zsh compinit: insecure directories" warnings when attempting + to load these completions, you may need to run these commands: + + chmod go-w '#{HOMEBREW_PREFIX}/share' + chmod -R go-w '#{HOMEBREW_PREFIX}/share/zsh' + EOS + end + + test do + (testpath/"test.zsh").write <<~SHELL + fpath=(#{pkgshare}) + autoload -R _afew + which _afew + SHELL + assert_match(/^_afew/, shell_output("zsh test.zsh")) + end +end diff --git a/Formula/z/zsh-f-sy-h.rb b/Formula/z/zsh-f-sy-h.rb new file mode 100644 index 0000000000000..526273b406b14 --- /dev/null +++ b/Formula/z/zsh-f-sy-h.rb @@ -0,0 +1,33 @@ +class ZshFSyH < Formula + desc "Feature-rich Syntax Highlighting for Zsh" + homepage "https://wiki.zshell.dev/search?q=F-Sy-H" + url "https://github.com/z-shell/F-Sy-H/archive/refs/tags/v1.67.tar.gz" + sha256 "4d8b112b326843443fbbbeb9d8c0694b57c331b91ca6bb1d5f67750f3254e6f5" + license "BSD-3-Clause" + head "https://github.com/z-shell/F-Sy-H.git", branch: "main" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "471a7ee20877bec72b47a50515a8cab4b768ff09ad72560d3d0647a6d0a94be1" + end + + uses_from_macos "zsh" => :test + + def install + pkgshare.install Dir["*"] + end + + def caveats + <<~EOS + To activate the syntax highlighting, add the following at the end of your .zshrc: + source #{HOMEBREW_PREFIX}/share/zsh-f-sy-h/F-Sy-H.plugin.zsh + EOS + end + + test do + assert_match "#{version}\n", + shell_output("zsh -c '. #{pkgshare}/F-Sy-H.plugin.zsh && echo $FAST_HIGHLIGHT_VERSION'") + end +end diff --git a/Formula/z/zsh-fast-syntax-highlighting.rb b/Formula/z/zsh-fast-syntax-highlighting.rb new file mode 100644 index 0000000000000..e51624f5b4a38 --- /dev/null +++ b/Formula/z/zsh-fast-syntax-highlighting.rb @@ -0,0 +1,39 @@ +class ZshFastSyntaxHighlighting < Formula + desc "Feature-rich syntax highlighting for Zsh" + homepage "https://github.com/zdharma-continuum/fast-syntax-highlighting" + url "https://github.com/zdharma-continuum/fast-syntax-highlighting/archive/refs/tags/v1.56.tar.gz" + sha256 "9e5045510ef86beae658b5fcf58e7b6c76f5b63788498b956d54bc1038faa806" + license "BSD-3-Clause" + head "https://github.com/zdharma-continuum/fast-syntax-highlighting.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "548b80e35f30d83768a48dee91e0f3e39ef7a3b1af70d65560fd15a75a5218ba" + end + + uses_from_macos "zsh" => [:build, :test] + + def install + # build an `:all` bottle. + inreplace %w[fast-highlight fast-theme test/parse.zsh test/to-parse.zsh], + "/usr/local", HOMEBREW_PREFIX + pkgshare.install Dir["*", ".fast-*"] + end + + def caveats + <<~EOS + To activate the syntax highlighting, add the following at the end of your .zshrc: + source #{opt_pkgshare}/fast-syntax-highlighting.plugin.zsh + EOS + end + + test do + test_script = testpath/"script.zsh" + test_script.write <<~ZSH + #!/usr/bin/env zsh + source #{pkgshare}/fast-syntax-highlighting.plugin.zsh + printf '%s' ${FAST_HIGHLIGHT_STYLES+yes} + ZSH + assert_match "yes", shell_output("zsh #{test_script}") + end +end diff --git a/Formula/z/zsh-git-prompt.rb b/Formula/z/zsh-git-prompt.rb new file mode 100644 index 0000000000000..9e09054c10bf0 --- /dev/null +++ b/Formula/z/zsh-git-prompt.rb @@ -0,0 +1,30 @@ +class ZshGitPrompt < Formula + desc "Informative git prompt for zsh" + homepage "https://github.com/olivierverdier/zsh-git-prompt" + url "https://github.com/olivierverdier/zsh-git-prompt/archive/refs/tags/v0.5.tar.gz" + sha256 "87e5a908369f402e975426ffd61a8800f1c04c0a293f1d4015a6fb1f4408e77d" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "d4fa3836434d56704bd03f88f3e45557cac6e12cb6e17cc251635ecdcbc431eb" + end + + def install + prefix.install Dir["*.{sh,py}"] + end + + def caveats + <<~EOS + Make sure zsh-git-prompt is loaded from your .zshrc: + source "#{opt_prefix}/zshrc.sh" + EOS + end + + test do + system "git", "init" + zsh_command = ". #{opt_prefix}/zshrc.sh && git_super_status" + assert_match "master", shell_output("zsh -c '#{zsh_command}'") + end +end diff --git a/Formula/z/zsh-history-enquirer.rb b/Formula/z/zsh-history-enquirer.rb new file mode 100644 index 0000000000000..e34960f00d199 --- /dev/null +++ b/Formula/z/zsh-history-enquirer.rb @@ -0,0 +1,36 @@ +class ZshHistoryEnquirer < Formula + desc "Zsh plugin that enhances history search interaction" + homepage "https://zsh-history-enquirer.zthxxx.me" + url "https://registry.npmjs.org/zsh-history-enquirer/-/zsh-history-enquirer-1.3.1.tgz" + sha256 "dab146c955f167089bbe8f24a79b4a6cabe4c9ce2b8b246eb9fca27eca2bc4ae" + license "MIT" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "c61e96873b75859cd6d6a9a634df6f432914b96b893b739a14f8579a637ca81f" + end + + depends_on "node" + + uses_from_macos "zsh" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + zsh_function.install "zsh-history-enquirer.plugin.zsh" => "history_enquire" + end + + def caveats + <<~EOS + To activate zsh-history-enquirer, add the following to your .zshrc: + autoload -U history_enquire + history_enquire + EOS + end + + test do + zsh_command = "autoload -U history_enquire; where history_enquire" + assert_match "history_enquire", shell_output("zsh -ic '#{zsh_command}'") + end +end diff --git a/Formula/z/zsh-history-substring-search.rb b/Formula/z/zsh-history-substring-search.rb new file mode 100644 index 0000000000000..22fbe4f2863de --- /dev/null +++ b/Formula/z/zsh-history-substring-search.rb @@ -0,0 +1,36 @@ +class ZshHistorySubstringSearch < Formula + desc "Zsh port of Fish shell's history search" + homepage "https://github.com/zsh-users/zsh-history-substring-search" + url "https://github.com/zsh-users/zsh-history-substring-search/archive/refs/tags/v1.1.0.tar.gz" + sha256 "9b52eca6c894dd98caa5f07160199f3f3179ff017575d5acc9fdc467b1ac70f8" + license "BSD-3-Clause" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "012cdbf6d326089dee2b8fc6bd194439f4d0df13ca3f01f7a3be0eade9b27030" + end + + uses_from_macos "zsh" + + def install + pkgshare.install "zsh-history-substring-search.zsh" + end + + def caveats + <<~EOS + To activate the history search, add the following at the end of your .zshrc: + + source #{HOMEBREW_PREFIX}/share/zsh-history-substring-search/zsh-history-substring-search.zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + assert_match "i", + shell_output("zsh -c '. #{pkgshare}/zsh-history-substring-search.zsh && " \ + "echo $HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS'") + end +end diff --git a/Formula/z/zsh-lovers.rb b/Formula/z/zsh-lovers.rb new file mode 100644 index 0000000000000..04cd2670baba2 --- /dev/null +++ b/Formula/z/zsh-lovers.rb @@ -0,0 +1,30 @@ +class ZshLovers < Formula + desc "Tips, tricks, and examples for zsh" + homepage "https://grml.org/zsh/#zshlovers" + url "https://deb.grml.org/pool/main/z/zsh-lovers/zsh-lovers_0.11.0_all.deb" + sha256 "893e5785df2c1a2109b364473937ea77d63ddf2ba088b4cd87c8e74c1d26d192" + license "GPL-2.0-only" + + livecheck do + url "https://deb.grml.org/pool/main/z/zsh-lovers/" + regex(/href=.*?zsh-lovers[._-]v?(\d+(?:\.\d+)+)[._-]all/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "78b619a87a59fb167481f7dbca50c19e8f09048faa3a09359d54345b4f503652" + end + + uses_from_macos "xz" => :build + + def install + system "ar", "x", "zsh-lovers_#{version}_all.deb" + system "tar", "xf", "data.tar.xz" + system "gunzip", *Dir["usr/**/*.gz"] + prefix.install_metafiles "usr/share/doc/zsh-lovers" + prefix.install "usr/share" + end + + test do + system "man", "zsh-lovers" + end +end diff --git a/Formula/z/zsh-navigation-tools.rb b/Formula/z/zsh-navigation-tools.rb new file mode 100644 index 0000000000000..c020c34f9a854 --- /dev/null +++ b/Formula/z/zsh-navigation-tools.rb @@ -0,0 +1,39 @@ +class ZshNavigationTools < Formula + desc "Zsh curses-based tools, e.g. multi-word history searcher" + homepage "https://wiki.zshell.dev/ecosystem/plugins/zsh-navigation-tools" + url "https://github.com/z-shell/zsh-navigation-tools/archive/refs/tags/v2.2.7.tar.gz" + sha256 "ee832b81ce678a247b998675111c66aa1873d72aa33c2593a65626296ca685fc" + license any_of: ["GPL-3.0-only", "MIT"] + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7f766c2aecf317bed6dcbbe7e5c2f93dd96789e59831fc19195993fa68258978" + end + + uses_from_macos "zsh" + + def install + # Make the bottles uniform + inreplace [".config/znt/n-cd.conf", "n-panelize"], "/usr/local", HOMEBREW_PREFIX + + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + To run zsh-navigation-tools, add the following at the end of your .zshrc: + source #{HOMEBREW_PREFIX}/share/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + # This compiles package's main file + # Zcompile is very capable of detecting syntax errors + cp pkgshare/"n-list", testpath + system "zsh", "-c", "zcompile n-list" + end +end diff --git a/Formula/z/zsh-syntax-highlighting.rb b/Formula/z/zsh-syntax-highlighting.rb new file mode 100644 index 0000000000000..b6d6093aae8e8 --- /dev/null +++ b/Formula/z/zsh-syntax-highlighting.rb @@ -0,0 +1,40 @@ +class ZshSyntaxHighlighting < Formula + desc "Fish shell like syntax highlighting for zsh" + homepage "https://github.com/zsh-users/zsh-syntax-highlighting" + url "https://github.com/zsh-users/zsh-syntax-highlighting/archive/refs/tags/0.8.0.tar.gz" + sha256 "5981c19ebaab027e356fe1ee5284f7a021b89d4405cc53dc84b476c3aee9cc32" + license "BSD-3-Clause" + head "https://github.com/zsh-users/zsh-syntax-highlighting.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3cfaa693dab68d9a576ad1ad0a018e12b250a057963263733f6fcc9b4c4ce8a6" + end + + uses_from_macos "zsh" => [:build, :test] + + def install + # Make the bottles uniform (modifying a comment with /usr/local path) + inreplace "highlighters/main/main-highlighter.zsh", "/usr/local/bin", "#{HOMEBREW_PREFIX}/bin" + + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats + <<~EOS + To activate the syntax highlighting, add the following at the end of your .zshrc: + source #{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + + If you receive "highlighters directory not found" error message, + you may need to add the following to your .zshenv: + export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=#{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/highlighters + EOS + end + + test do + assert_match "#{version}\n", + shell_output("zsh -c '. #{pkgshare}/zsh-syntax-highlighting.zsh && echo $ZSH_HIGHLIGHT_VERSION'") + end +end diff --git a/Formula/z/zsh-system-clipboard.rb b/Formula/z/zsh-system-clipboard.rb new file mode 100644 index 0000000000000..8d861ac396dab --- /dev/null +++ b/Formula/z/zsh-system-clipboard.rb @@ -0,0 +1,41 @@ +class ZshSystemClipboard < Formula + desc "System clipboard key bindings for Zsh Line Editor with vi mode" + homepage "https://github.com/kutsan/zsh-system-clipboard" + url "https://github.com/kutsan/zsh-system-clipboard/archive/refs/tags/v0.8.0.tar.gz" + sha256 "ff048067f018578c380b026952445d3f625160b70475b48827749fb4abb2c886" + license "GPL-3.0-only" + head "https://github.com/kutsan/zsh-system-clipboard.git", branch: "master" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, all: "0020905311350f9aa13a1a35b0632667fe6d4e3bcbbb69110add37eb2ce83b16" + end + + uses_from_macos "zsh" => [:build, :test] + + on_linux do + depends_on "xclip" => :test + end + + def install + pkgshare.install "zsh-system-clipboard.zsh" + end + + def caveats + <<~EOS + To activate the system clipboard integration, add the following to your .zshrc: + + source #{HOMEBREW_PREFIX}/share/zsh-system-clipboard/zsh-system-clipboard.zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + # zsh-system-clipboard.zsh fails on Linux if $DISPLAY is unset. + # Its value is not further relevant for the test however. + ENV["DISPLAY"] = "mock" if OS.linux? + system("zsh -c 'set -e; . #{pkgshare}/zsh-system-clipboard.zsh'") + end +end diff --git a/Formula/z/zsh-vi-mode.rb b/Formula/z/zsh-vi-mode.rb new file mode 100644 index 0000000000000..a60f86d9ed51f --- /dev/null +++ b/Formula/z/zsh-vi-mode.rb @@ -0,0 +1,31 @@ +class ZshViMode < Formula + desc "Better and friendly vi(vim) mode plugin for ZSH" + homepage "https://github.com/jeffreytse/zsh-vi-mode" + url "https://github.com/jeffreytse/zsh-vi-mode/archive/refs/tags/v0.12.0.tar.gz" + sha256 "28cdbc1803cf5545e5e5e4b29db075dc4d45b8c498bb6118bfff5c7df1b68622" + license "MIT" + head "https://github.com/jeffreytse/zsh-vi-mode.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "640f9ffc4af6c23405417a2076f924ddfa3b07be4eac462470f6521c010841dd" + end + + uses_from_macos "zsh" + + def install + pkgshare.install "zsh-vi-mode.zsh" + pkgshare.install "zsh-vi-mode.plugin.zsh" + end + + def caveats + <<~EOS + To activate the zsh vi mode, add the following line to your .zshrc: + source #{opt_pkgshare}/zsh-vi-mode.plugin.zsh + EOS + end + + test do + assert_match "zsh-vi-mode", + shell_output("zsh -c '. #{pkgshare}/zsh-vi-mode.plugin.zsh && zvm_version'") + end +end diff --git a/Formula/z/zsh-you-should-use.rb b/Formula/z/zsh-you-should-use.rb new file mode 100644 index 0000000000000..b14c4c6cf839a --- /dev/null +++ b/Formula/z/zsh-you-should-use.rb @@ -0,0 +1,33 @@ +class ZshYouShouldUse < Formula + desc "ZSH plugin that reminds you to use existing aliases for commands you just typed" + homepage "https://github.com/MichaelAquilina/zsh-you-should-use" + url "https://github.com/MichaelAquilina/zsh-you-should-use/archive/refs/tags/1.10.0.tar.gz" + sha256 "51aa37bc72aa67ac93fb3881500ea7cb085a28e80fe79228c2436978072b4451" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c8245005cafa46b294b2e4d747322bba4d6c05cdee2c34cda2b8391287ce0855" + end + + uses_from_macos "zsh" + + def install + pkgshare.install "you-should-use.plugin.zsh" + end + + def caveats + <<~EOS + To activate You Should Use, add the following to your .zshrc: + + source #{HOMEBREW_PREFIX}/share/zsh-you-should-use/you-should-use.plugin.zsh + + You will also need to restart your terminal for this change to take effect. + EOS + end + + test do + assert_match version.to_s, + shell_output("zsh -c '. #{pkgshare}/you-should-use.plugin.zsh && " \ + "echo $YSU_VERSION'") + end +end diff --git a/Formula/z/zsh.rb b/Formula/z/zsh.rb new file mode 100644 index 0000000000000..deca48f4c857a --- /dev/null +++ b/Formula/z/zsh.rb @@ -0,0 +1,114 @@ +class Zsh < Formula + desc "UNIX shell (command interpreter)" + homepage "https://www.zsh.org/" + license all_of: [ + "MIT-Modern-Variant", + "GPL-2.0-only", # Completion/Linux/Command/_qdbus, Completion/openSUSE/Command/{_osc,_zypper} + "GPL-2.0-or-later", # Completion/Unix/Command/_darcs + "ISC", # Src/openssh_bsd_setres_id.c + ] + + stable do + url "https://downloads.sourceforge.net/project/zsh/zsh/5.9/zsh-5.9.tar.xz" + mirror "https://www.zsh.org/pub/zsh-5.9.tar.xz" + sha256 "9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5" + + depends_on "autoconf" => :build # TODO: Remove on the next release + + resource "htmldoc" do + url "https://downloads.sourceforge.net/project/zsh/zsh-doc/5.9/zsh-5.9-doc.tar.xz" + mirror "https://www.zsh.org/pub/zsh-5.9-doc.tar.xz" + sha256 "6f7c091249575e68c177c5e8d5c3e9705660d0d3ca1647aea365fd00a0bd3e8a" + end + + # Use Debian patches to backport `pcre2` support: + # * https://github.com/zsh-users/zsh/commit/b62e911341c8ec7446378b477c47da4256053dc0 + # * https://github.com/zsh-users/zsh/commit/10bdbd8b5b0b43445aff23dcd412f25cf6aa328a + patch do + url "https://sources.debian.org/data/main/z/zsh/5.9-8/debian/patches/cherry-pick-b62e91134-51723-migrate-pcre-module-to-pcre2.patch" + sha256 "9bd45e1262856e22f28c5d6ec1e1584e4f8add3270bbf68ee06aabb0ee24d745" + end + patch do + url "https://sources.debian.org/data/main/z/zsh/5.9-8/debian/patches/cherry-pick-10bdbd8b-51877-do-not-build-pcre-module-if-pcre2-config-is-not-found.patch" + sha256 "fe9e2bd42e5405995750b30f32f8dc02135c6cf55c0889018d68af114ffa78da" + end + end + + livecheck do + url "https://sourceforge.net/projects/zsh/rss?path=/zsh" + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 3 + sha256 arm64_tahoe: "785fbc6814796f131a2a176860c07a0d94f62abcd981952c7bfd3a0337f03053" + sha256 arm64_sequoia: "93cacab325d2a9c4ce40a2cebb157b1bf4e062f0d54855d10d2a78f78e2f101f" + sha256 arm64_sonoma: "6fd7134e255c752fca9e8dee3823df44b8ba3303f96bb93c232cd2510edad79d" + sha256 arm64_ventura: "e821a4b4e3bb5c3198b1073cc42550b5eda9705c6957bb10a55c524c8d55a8ed" + sha256 sonoma: "73b9003f3f58e116c9af05de333a8d0fe32ef21f4b189ed1503faf5d8f131130" + sha256 ventura: "d671549769838f9a60961866e6f94d4f9eac71678cb930ad69055aa0812c7d52" + sha256 arm64_linux: "658c86a42c9d113e835d68f90e0ef627c98a67b88f7afc47ad7b9706e230804a" + sha256 x86_64_linux: "7203ae875e4d101cfd8288474ba18dabd4b1469f908f3a11a685b5630cc826ab" + end + + head do + url "https://git.code.sf.net/p/zsh/code.git", branch: "master" + depends_on "autoconf" => :build + end + + depends_on "ncurses" + depends_on "pcre2" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + # Fix compile with newer Clang. Remove in the next release + # Ref: https://sourceforge.net/p/zsh/code/ci/ab4d62eb975a4c4c51dd35822665050e2ddc6918/ + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + odie "Update build to run Utils/preconfig only on HEAD!" if build.stable? && version > "5.9" + system "Util/preconfig" # TODO: if build.head? + + system "./configure", "--prefix=#{prefix}", + "--enable-fndir=#{pkgshare}/functions", + "--enable-scriptdir=#{pkgshare}/scripts", + "--enable-site-fndir=#{HOMEBREW_PREFIX}/share/zsh/site-functions", + "--enable-site-scriptdir=#{HOMEBREW_PREFIX}/share/zsh/site-scripts", + "--enable-runhelpdir=#{pkgshare}/help", + "--enable-cap", + "--enable-maildir-support", + "--enable-multibyte", + "--enable-pcre", + "--enable-zsh-secure-free", + "--enable-unicode9", + "--enable-etcdir=/etc", + "--with-tcsetpgrp", + "DL_EXT=bundle" + + # Do not version installation directories. + inreplace ["Makefile", "Src/Makefile"], + "$(libdir)/$(tzsh)/$(VERSION)", "$(libdir)" + + if build.head? + # disable target install.man, because the required yodl comes neither with macOS nor Homebrew + # also disable install.runhelp and install.info because they would also fail or have no effect + system "make", "install.bin", "install.modules", "install.fns" + else + system "make", "install" + system "make", "install.info" + + resource("htmldoc").stage do + (pkgshare/"htmldoc").install Dir["Doc/*.html"] + end + end + end + + test do + assert_equal "homebrew", shell_output("#{bin}/zsh -c 'echo homebrew'").chomp + system bin/"zsh", "-c", "printf -v hello -- '%s'" + system bin/"zsh", "-c", "zmodload zsh/pcre" + end +end diff --git a/Formula/z/zshdb.rb b/Formula/z/zshdb.rb new file mode 100644 index 0000000000000..6cb08049c14a0 --- /dev/null +++ b/Formula/z/zshdb.rb @@ -0,0 +1,50 @@ +class Zshdb < Formula + desc "Debugger for zsh" + homepage "https://github.com/Trepan-Debuggers/zshdb" + url "https://downloads.sourceforge.net/project/bashdb/zshdb/1.1.4/zshdb-1.1.4.tar.gz" + sha256 "83749450ffe030c28e7b7d1d8b06aea63232504ff61f31f9becc5a5717e69638" + license all_of: [ + "GPL-2.0-or-later", + "GPL-3.0-or-later", # COPYING, lib/term-highlight.py + "HPND-sell-variant", # getopts_long.sh + ] + + # We check the "zshdb" directory page because the bashdb project contains + # various software and zshdb releases may be pushed out of the SourceForge + # RSS feed. + livecheck do + url "https://sourceforge.net/projects/bashdb/files/zshdb/" + regex(%r{href=(?:["']|.*?zshdb/)?v?(\d+(?:[.-]\d+)+)/?["' >]}i) + strategy :page_match + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "642ce820ac874107e1e57211b1ddc3b34df5da556da39706cdd5fb8f3bee9c26" + end + + head do + url "https://github.com/rocky/zshdb.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "zsh" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--with-zsh=#{HOMEBREW_PREFIX}/bin/zsh", + *std_configure_args + system "make", "install" + end + + test do + require "open3" + assert_match <<~EOS, pipe_output("#{bin}/zshdb -c 'echo test'", "exit\n") + echo test + test + Debugged program terminated normally. + EOS + end +end diff --git a/Formula/z/zssh.rb b/Formula/z/zssh.rb new file mode 100644 index 0000000000000..085040a73c8a1 --- /dev/null +++ b/Formula/z/zssh.rb @@ -0,0 +1,52 @@ +class Zssh < Formula + desc "Interactive file transfers over SSH" + homepage "https://zssh.sourceforge.net/" + url "https://downloads.sourceforge.net/project/zssh/zssh/1.5/zssh-1.5c.tgz" + sha256 "a2e840f82590690d27ea1ea1141af509ee34681fede897e58ae8d354701ce71b" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/zssh[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "bf52245597c50c4d6d826e9be5a239ba19ac959c304ef69d75f9240092453128" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f263234cd88fe188d247aaaf24e7d64e8cf990bbf671c0e98b96801710a3c2c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "762936295a2235c95c7a274daaf3e8b86c6154a2c17f272d852c3a951557f4de" + sha256 cellar: :any_skip_relocation, sonoma: "0e88312f111f00dc479f90c1a317f7ceaa0aff00a6d6b7b24114a1952ceca529" + sha256 cellar: :any_skip_relocation, arm64_linux: "da32e62bd2610001f40c5e4e4ea30571f772a5198abebb78df5adbb8378218bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0550b13ce3b5a29c94c0124f03ac8dffbe76455395172d9b35b00f4c8328068" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "lrzsz" + + def install + # Workaround for Xcode 15 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + rm_r "lrzsz-0.12.20" + + # NOTE: readline must be disabled as the license is incompatible with GPL-2.0-only, + # https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility + args = ["--disable-readline"] if OS.linux? + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *args, *std_configure_args + system "make" + + bin.install "zssh", "ztelnet" + man1.install "zssh.1", "ztelnet.1" + end + + test do + require "pty" + PTY.spawn(bin/"zssh", "-V") + end +end diff --git a/Formula/z/zstd.rb b/Formula/z/zstd.rb new file mode 100644 index 0000000000000..96cd5f3b47325 --- /dev/null +++ b/Formula/z/zstd.rb @@ -0,0 +1,77 @@ +class Zstd < Formula + desc "Zstandard is a real-time compression algorithm" + homepage "https://facebook.github.io/zstd/" + url "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz" + mirror "http://fresh-center.net/linux/misc/zstd-1.5.7.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/zstd-1.5.7.tar.gz" + sha256 "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3" + license all_of: [ + { any_of: ["BSD-3-Clause", "GPL-2.0-only"] }, + "BSD-2-Clause", # programs/zstdgrep, lib/libzstd.pc.in + "MIT", # lib/dictBuilder/divsufsort.c + ] + head "https://github.com/facebook/zstd.git", branch: "dev" + + # The upstream repository contains old, one-off tags (5.5.5, 6.6.6) that are + # higher than current versions, so we check the "latest" release instead. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_tahoe: "ddb0c145060bc2366ce5d58d95aa205bb15cb4c66948f20bb85e23fdb5eba7e9" + sha256 cellar: :any, arm64_sequoia: "55a4e0a4a92f5cf4885295214914de4aefad2389884085185e9ce87b4edae946" + sha256 cellar: :any, arm64_sonoma: "60c34a6a3cadf1fc35026cde7598fbe7b59bd2e5996c4baf49640094b4ffeb37" + sha256 cellar: :any, arm64_ventura: "2332527b27c6661bf501980bd71a5b4fe1b417122bf8b37d9f082e47b377b7f9" + sha256 cellar: :any, tahoe: "873feb2d747bb21708c0229bb977364d0794e65bccbf18e33934a424342e83a1" + sha256 cellar: :any, sequoia: "342e64c01287a716615d14d4a71770fc5930871dc0a965fbdda6062f80dc1952" + sha256 cellar: :any, sonoma: "77457805185cd2c70fe81245b9e2d1a3e178a1be55e032eb504391dbd4d4e9ab" + sha256 cellar: :any, ventura: "c7b411aee72bc1e36d9a2647059433da62a0ca9a4cc7baeb44a2226e0a0de8b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2148094d7e41ccbe0ac29f351d6544093d45ff0aa41f0ff90f3e3b0c594d824a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecd3f9ef36c6f9b324a36c33727962c37be5d12fdbe330e9b863112f24c49e11" + end + + depends_on "cmake" => :build + depends_on "lz4" + depends_on "xz" + + uses_from_macos "zlib" + + def install + # Legacy support is the default after + # https://github.com/facebook/zstd/commit/db104f6e839cbef94df4df8268b5fecb58471274 + # Set it to `ON` to be explicit about the configuration. + system "cmake", "-S", "build/cmake", "-B", "builddir", + "-DBUILD_SHARED_LIBS=ON", # set CMake libzstd target to shared + "-DZSTD_PROGRAMS_LINK_SHARED=ON", # link `zstd` to `libzstd` + "-DZSTD_BUILD_CONTRIB=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DZSTD_LEGACY_SUPPORT=ON", + "-DZSTD_ZLIB_SUPPORT=ON", + "-DZSTD_LZMA_SUPPORT=ON", + "-DZSTD_LZ4_SUPPORT=ON", + "-DCMAKE_CXX_STANDARD=11", + *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + + # Prevent dependents from relying on fragile Cellar paths. + # https://github.com/ocaml/ocaml/issues/12431 + inreplace lib/"pkgconfig/libzstd.pc", prefix, opt_prefix + end + + test do + [bin/"zstd", bin/"pzstd", "xz", "lz4", "gzip"].each do |prog| + data = "Hello, #{prog}" + assert_equal data, pipe_output("#{bin}/zstd -d", pipe_output(prog, data)) + if prog.to_s.end_with?("zstd") + # `pzstd` can only decompress zstd-compressed data. + assert_equal data, pipe_output("#{bin}/pzstd -d", pipe_output(prog, data)) + else + assert_equal data, pipe_output("#{prog} -d", pipe_output("#{bin}/zstd --format=#{prog}", data)) + end + end + end +end diff --git a/Formula/z/zsv.rb b/Formula/z/zsv.rb new file mode 100644 index 0000000000000..d80f6be1c7d38 --- /dev/null +++ b/Formula/z/zsv.rb @@ -0,0 +1,36 @@ +class Zsv < Formula + desc "Tabular data swiss-army knife CLI" + homepage "https://github.com/liquidaty/zsv" + url "https://github.com/liquidaty/zsv/archive/refs/tags/v1.0.1.tar.gz" + sha256 "63b4d8221a7e27b7ef7842afb3233e32cd2473d3e3389a0daa86833bfe56b50d" + license "MIT" + head "https://github.com/liquidaty/zsv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "c82ecd50aad012264d4bd49ccbc74935cb8e2162259e783860edaf186e98c30b" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcb86fbd21ce9b4cefccbf90e7c2b29f4c559234e3641c224e1b4d9209737a8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "760bd2a6d92d1548ea7c41d43aebd7cc91945ab08557487ad6458fa515f4b9ad" + sha256 cellar: :any_skip_relocation, sonoma: "76b143bb506116cb65017ce1f068084ff7a9268dc52797e63b18f9e7f3c6255c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bd9c0416d51f73f1e17031dac061d228b23a362e89a5abe076c855643bb2650" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ebcee8626372b956ee5e917d18edeb2887921b6c1b1725f7f4e1ccf1d671a13" + end + + depends_on "jq" + + uses_from_macos "ncurses" + + def install + system "./configure", *std_configure_args + system "make", "install", "VERSION=#{version}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/zsv version") + + input = <<~CSV + a,b,c + 1,2,3 + CSV + assert_equal "1", pipe_output("#{bin}/zsv count", input).strip + end +end diff --git a/Formula/z/zsxd.rb b/Formula/z/zsxd.rb new file mode 100644 index 0000000000000..cd4a8422d3f2e --- /dev/null +++ b/Formula/z/zsxd.rb @@ -0,0 +1,47 @@ +class Zsxd < Formula + desc "Zelda Mystery of Solarus XD" + homepage "https://www.solarus-games.org/games/the-legend-of-zelda-mystery-of-solarus-xd/" + url "https://gitlab.com/solarus-games/games/zsxd/-/archive/v1.12.2/zsxd-v1.12.2.tar.bz2" + sha256 "656ac2033db2aca7ad0cd5c7abb25d88509b312b155ab83546c90abbc8583df1" + license all_of: ["CC-BY-SA-4.0", "GPL-3.0-only"] + head "https://gitlab.com/solarus-games/games/zsxd.git", branch: "dev" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_tahoe: "5f1f3d492a406445db86e75543b26e128ddf690e9c8360362185cbb564319112" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f0acd40f96b33fa5dfb02c86c7c5565d0c02043888ab1824e9c65bc515cbd8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "913089c3f580b340c83ee2a0146e76cc5537d8ace0b27a053413ad130e37e5b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3210e812054b1162800685d3a548822065dbe07053515f4e1185fe8a6c5a7fe" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ee42ed381fd488a0e538e30eeff539346f71c0822fcc899907792fc4acc5988a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4092f599ecb1631608fe3a5109006480d6797bee0ec8b4cd4878b451f4400720" + sha256 cellar: :any_skip_relocation, sonoma: "228f4c7c85f5744241b193de33a84b8eabf7407cd0a4cd856817ec97ebb108e5" + sha256 cellar: :any_skip_relocation, ventura: "f79284e528dd5c8c412dfd90f96fc8d3d6c54ca839a8dd71fd7fb689c8ae7951" + sha256 cellar: :any_skip_relocation, monterey: "5641638453928b8d7dc434051961417e5c3e768c06fc35f9879737640027ece3" + sha256 cellar: :any_skip_relocation, big_sur: "ccae47d22a42e29f9d5d37fdd0be7cfa8f451d3b0f42d2db2b933f6a7ae1d129" + sha256 cellar: :any_skip_relocation, catalina: "aabcc393aae8f00a45ffa24d959ff57a6023caace90a815f8107c579e113b87e" + sha256 cellar: :any_skip_relocation, arm64_linux: "81e1d2d168374d4baedd1ce60c4349439b049bc1d3f20dc3fa6ab2a0bc554297" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b29f50a29f5874e4197504acbc4bd1f0162df77d8e30152a10c4bf82befc446" + end + + depends_on "cmake" => :build + depends_on "solarus" + + uses_from_macos "zip" => :build + uses_from_macos "unzip" => :test + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DSOLARUS_INSTALL_DATADIR=#{share}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system Formula["solarus"].bin/"solarus-run", "-help" + system "unzip", pkgshare/"data.solarus" + end +end diff --git a/Formula/z/zsync.rb b/Formula/z/zsync.rb new file mode 100644 index 0000000000000..b3b7a48bca714 --- /dev/null +++ b/Formula/z/zsync.rb @@ -0,0 +1,56 @@ +class Zsync < Formula + desc "File transfer program" + homepage "https://zsync.moria.org.uk/" + url "https://zsync.moria.org.uk/download/zsync-0.6.3.tar.bz2" + sha256 "293b6191821641d3ed6248206f8f9df0bf46e6ee2cf8b4dd97cfd1d5909edb9a" + license all_of: [ + "Artistic-2.0", + "Zlib", # zlib/ + :public_domain, # librcksum/md4.c, libzsync/sha1.c, zlib/inflate.c + ] + + livecheck do + url "https://zsync.moria.org.uk/downloads" + regex(/href=.*?zsync[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7d4a20e196767857208a02278c4b0d5bf3378ae40402d1a67e948bf58cff27d6" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39991c4aa022ce2fe1b3d62b30e2c7e130be4e4e98bf6dca844f28ec8afdfe8d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "800299bfc82b2ce9970159a2d0efcbe445c74024a357aa4a3c2f8a74c4ed871b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a8fcb43f6827e4c2339a9ec5f365c05372c9d17ca91e9fef076f84b784efcd65" + sha256 cellar: :any_skip_relocation, sonoma: "db75f0fa2e8fd02c11b06fb4a75ac536da7aa768f35df369137bf72d87490c36" + sha256 cellar: :any_skip_relocation, ventura: "54804831f99313425941c41263b6b9e875db47ca171dee2a24d370e335e8fcfc" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b1d6196e007d24f8416604d28391ed198a28f30fe72b98fc8d3623b4952b01c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61c5c7c1ea629dd5b29e60e554bd87b30528abe65e58730a8034c680c4eeb476" + end + + head do + url "https://github.com/cph6/zsync.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + if head? + cd "c" + system "autoreconf", "--force", "--install", "--verbose" + end + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + touch testpath/"foo" + system bin/"zsyncmake", "foo" + sha1 = "da39a3ee5e6b4b0d3255bfef95601890afd80709" + assert_match "SHA-1: #{sha1}", (testpath/"foo.zsync").read + end +end diff --git a/Formula/z/zuban.rb b/Formula/z/zuban.rb new file mode 100644 index 0000000000000..100270ed57609 --- /dev/null +++ b/Formula/z/zuban.rb @@ -0,0 +1,42 @@ +class Zuban < Formula + desc "Python language server and type checker, written in Rust" + homepage "https://zubanls.com/" + url "https://github.com/zubanls/zuban/archive/refs/tags/v0.2.2.tar.gz" + sha256 "03ea108ea7d58eba2a157a381fb235fe7153228a38a4e38674f9a8cd071dfde5" + license "AGPL-3.0-only" + head "https://github.com/zubanls/zuban.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "82779ce4921b7d9949588f53ff7b63987ccf3fda4d2edfe10217f7a23f23aad8" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e774c620b4fb957d2c25f14ed76f913a5fba09b6c3e675af4f08e0a2f99cb2a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da92f064345ba440af0d8f6b304d9230ac594aa72dd158136a6da19c4579fb70" + sha256 cellar: :any_skip_relocation, sonoma: "55c3d95981e71739dc3890a7ceb892a84dbba92b6fceffb0976811da4bea8582" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c80f0e6460e0d2bd2fd14ffc43e16e9c80289d8a0d2bd18bf8fe666d52c6031" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cfd9ab8367b5fe38adc7c931d68fb5fc07895a96572ebd0b5e5efe3c5ccfe4c" + end + + depends_on "mypy" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/zuban") + + # Work around zubanls not reading ZUBAN_TYPESHED (https://github.com/zubanls/zuban/issues/53) + (typeshed = libexec/"lib/python3/site-packages/zuban/typeshed").mkpath + cp_r Formula["mypy"].opt_libexec.glob("lib/python*/site-packages/mypy/typeshed").first.children, typeshed + bin.env_script_all_files libexec/"bin", ZUBAN_TYPESHED: typeshed + end + + test do + %w[zmypy zuban zubanls].each do |cmd| + assert_match version.to_s, shell_output("#{bin}/#{cmd} --version") + end + + (testpath/"t.py").write <<~PY + def f(x: int) -> int: + return "nope" + PY + out = shell_output("#{bin}/zuban check #{testpath}/t.py 2>&1", 1) + assert_match "Incompatible return value type", out + end +end diff --git a/Formula/z/zug.rb b/Formula/z/zug.rb new file mode 100644 index 0000000000000..8aac2572901a9 --- /dev/null +++ b/Formula/z/zug.rb @@ -0,0 +1,42 @@ +class Zug < Formula + desc "C++ library providing transducers" + homepage "https://sinusoid.es/zug/" + url "https://github.com/arximboldi/zug/archive/refs/tags/v0.1.1.tar.gz" + sha256 "1b9c8f962e40baa6f0c6af35f957444850063d550078a3ebd0227727b8ef193c" + license "BSL-1.0" + + no_autobump! because: :requires_manual_review + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "33a7f1d34c98cd5ee378621ce802982e1e74416ace1e10eb9c2c7d48efc8cb17" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -Dzug_BUILD_EXAMPLES=OFF + -Dzug_BUILD_TESTS=OFF + ] + system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args.reject { |s| s["-DBUILD_TESTING=OFF"] } + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() + { + auto xf = zug::filter([](int x) { return x > 0; }) + | zug::map([](int x) { return std::to_string(x); }); + } + CPP + + system ENV.cxx, "-std=c++17", "-I#{include}", "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/z/zurl.rb b/Formula/z/zurl.rb new file mode 100644 index 0000000000000..73c75bf1e7cb4 --- /dev/null +++ b/Formula/z/zurl.rb @@ -0,0 +1,142 @@ +class Zurl < Formula + include Language::Python::Virtualenv + + desc "HTTP and WebSocket client worker with ZeroMQ interface" + homepage "https://github.com/fanout/zurl" + url "https://github.com/fanout/zurl/releases/download/v1.12.0/zurl-1.12.0.tar.bz2" + sha256 "46d13ac60509a1566a4e3ad3eaed5262adf86eb5601ff892dba49affb0b63750" + license all_of: [ + "GPL-3.0-or-later", + "LGPL-2.1-or-later", # src/common/processquit.cpp + "curl", # src/verifyhost.cpp + "MIT", # src/qzmq/ + ] + revision 1 + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "eb2c86141ca65e087181c6d802dad72bb3d0b3ecd75286663077b29ef5ee8ed6" + sha256 cellar: :any, arm64_sequoia: "6b0d185ef6601a9a7feb2712ac0b7d4242e8e35e4572cb8aca3c88109461f1fd" + sha256 cellar: :any, arm64_sonoma: "b75dbe6b4c8eb60c671c68c1adeb4bf0fd4ec011051c34bae3342ee49bb3a1a3" + sha256 cellar: :any, sonoma: "318fd22b894af157b9a54a874d13c805b1474d97a43cd50e0e39f15262472b40" + sha256 cellar: :any_skip_relocation, arm64_linux: "591a82d1ae225eeab0cd35808e860c1b69b9cf84d13ef87962aa4f0b24c0ddfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd9298662889e90ecfc5078599cfeab0862621e9839b92af94a93b32b5db4430" + end + + depends_on "pkgconf" => :build + depends_on "cmake" => :test # for scikit_build_core + depends_on "cython" => :test # use brew cython as building it in test can cause time out + depends_on "python@3.14" => :test + depends_on "qtbase" + depends_on "zeromq" + + uses_from_macos "curl" + + on_linux do + depends_on "openssl@3" + end + + def install + args = ["--qtselect=#{Formula["qtbase"].version.major}"] + args << "--extraconf=QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" if OS.mac? + + system "./configure", "--prefix=#{prefix}", *args + system "make" + system "make", "install" + end + + test do + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/04/0b/3c9baedbdf613ecaa7aa07027780b8867f57b6293b6ee50de316c9f3222b/pyzmq-27.1.0.tar.gz" + sha256 "ac0765e3d44455adb6ddbf4417dcce460fc40a05978c08efdf2948072f6db540" + end + + resource "scikit-build-core" do + url "https://files.pythonhosted.org/packages/34/75/ad5664c8050bbbea46a5f2b6a3dfbc6e6cf284826c0eee0a12f861364b3f/scikit_build_core-0.10.7.tar.gz" + sha256 "04cbb59fe795202a7eeede1849112ee9dcbf3469feebd9b8b36aa541336ac4f8" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz" + sha256 "f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c" + end + + python3 = "python3.14" + + conffile = testpath/"zurl.conf" + ipcfile = testpath/"zurl-req" + runfile = testpath/"test.py" + + ENV.append_path "PYTHONPATH", Formula["cython"].opt_libexec/Language::Python.site_packages(python3) + venv = virtualenv_create(testpath/"vendor", python3) + venv.pip_install resources.reject { |r| r.name == "pyzmq" } + venv.pip_install(resource("pyzmq"), build_isolation: false) + + conffile.write <<~INI + [General] + in_req_spec=ipc://#{ipcfile} + defpolicy=allow + timeout=10 + INI + + port = free_port + runfile.write <<~PYTHON + import json + import threading + from http.server import BaseHTTPRequestHandler, HTTPServer + import zmq + class TestHandler(BaseHTTPRequestHandler): + def do_GET(self): + self.send_response(200) + self.end_headers() + self.wfile.write(b'test response\\n') + def server_worker(c): + server = HTTPServer(('', #{port}), TestHandler) + c.acquire() + c.notify() + c.release() + try: + server.serve_forever() + except: + server.server_close() + c = threading.Condition() + c.acquire() + server_thread = threading.Thread(target=server_worker, args=(c,)) + server_thread.daemon = True + server_thread.start() + c.wait() + c.release() + ctx = zmq.Context() + sock = ctx.socket(zmq.REQ) + sock.connect('ipc://#{ipcfile}') + req = {'id': '1', 'method': 'GET', 'uri': 'http://localhost:#{port}/test'} + sock.send_string('J' + json.dumps(req)) + poller = zmq.Poller() + poller.register(sock, zmq.POLLIN) + socks = dict(poller.poll(15000)) + assert(socks.get(sock) == zmq.POLLIN) + resp = json.loads(sock.recv()[1:]) + assert('type' not in resp) + assert(resp['body'] == 'test response\\n') + PYTHON + + pid = spawn bin/"zurl", "--config=#{conffile}" + begin + system testpath/"vendor/bin"/python3, runfile + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/z/zx.rb b/Formula/z/zx.rb new file mode 100644 index 0000000000000..a8d5909089d80 --- /dev/null +++ b/Formula/z/zx.rb @@ -0,0 +1,34 @@ +class Zx < Formula + desc "Tool for writing better scripts" + homepage "https://google.github.io/zx/" + url "https://registry.npmjs.org/zx/-/zx-8.8.5.tgz" + sha256 "20df3c1b6160372f02bd26176898c9b791690af4599573c99a04b2624a6aaab9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7b9906d0d69c0dcf726b2e8287fc62518b2f4dc08be0cc72cbfd1b92aa79b55e" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.mjs").write <<~JAVASCRIPT + #!/usr/bin/env zx + + let name = YAML.parse('foo: bar').foo + console.log(`name is ${name}`) + await $`touch ${name}` + JAVASCRIPT + + output = shell_output("#{bin}/zx #{testpath}/test.mjs") + assert_match "name is bar", output + assert_path_exists testpath/"bar" + + assert_match version.to_s, shell_output("#{bin}/zx --version") + end +end diff --git a/Formula/z/zxcc.rb b/Formula/z/zxcc.rb new file mode 100644 index 0000000000000..19253ae634f70 --- /dev/null +++ b/Formula/z/zxcc.rb @@ -0,0 +1,57 @@ +class Zxcc < Formula + desc "CP/M 2/3 emulator for cross-compiling and CP/M tools under UNIX" + homepage "https://www.seasip.info/Unix/Zxcc/" + url "https://www.seasip.info/Unix/Zxcc/zxcc-0.5.7.tar.gz" + sha256 "6095119a31a610de84ff8f049d17421dd912c6fd2df18373e5f0a3bc796eb4bf" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] + + livecheck do + url :homepage + regex(/href=.*?zxcc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "e312260a654050c8776f39d0558ab6c5e9b7d62f4f219475a13dcd8e75fbd759" + sha256 arm64_sequoia: "bddad2d64c555a4a13ba9cbc9c0cb6da0f249f6ef360c2274626a8b036c473a3" + sha256 arm64_sonoma: "8c8e1b35ae99069026c14d9cf0d35a14196d7be3e0a1e7bdbc9d6ec5fd6f5b13" + sha256 arm64_ventura: "e2fe6fa77252015a020de63bb4973171a8b9a9c90f866f2835f1e36e4e5714de" + sha256 arm64_monterey: "b72dfe0dda214485bb604b56b731e04109c964d10f45eb3b6fedceffdedf61ca" + sha256 arm64_big_sur: "3f7d36f3115f3dc9310aa01045a455fe7dab1732612421b5451777c140bf952a" + sha256 sonoma: "771d3fa5f8e286a2b0ed1d1e4765a69e348d0352ccadae189cd658a64a5e24b3" + sha256 ventura: "08b4d0233886b19e05fdbe3f3bb90d25146716a354bcf7e07d89396ef6b53397" + sha256 monterey: "015f6a038fa59edef9b58d8edef90d4ad957c1275e581d2d9e645868b37dc9e1" + sha256 big_sur: "55897339c53884d74e51e270e458085e4c1a3c8494b7053d40205d511ae0759a" + sha256 catalina: "748648c861049366a5bab8f7a101274da7bd2d2378237ccc4acd4cbd5b60fde1" + sha256 arm64_linux: "f03ecace625722887a14453a0a0d9c8901b0eb83e5f61e2f8f774a2002f0c225" + sha256 x86_64_linux: "8a5baf11b9060b7aedcf4f25afca690fbad80df406a66a70389ddd32fe2c6075" + end + + uses_from_macos "ncurses" + + def install + args = [] + # Help old config scripts identify arm64 linux + args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + code = [ + 0x11, 0x0b, 0x01, # 0100 ld de,010bh + 0x0e, 0x09, # 0103 ld c,cwritestr + 0xcd, 0x05, 0x00, # 0105 call bdos + 0xc3, 0x00, 0x00, # 0108 jp warm + 0x48, 0x65, 0x6c, # 010b db "Hel" + 0x6c, 0x6f, 0x24 # 010e db "lo$" + ].pack("c*") + + path = testpath/"hello.com" + path.binwrite code + + assert_equal "Hello", shell_output("#{bin}/zxcc #{path}").strip + end +end diff --git a/Formula/z/zydis.rb b/Formula/z/zydis.rb new file mode 100644 index 0000000000000..c6a13cfa927d5 --- /dev/null +++ b/Formula/z/zydis.rb @@ -0,0 +1,34 @@ +class Zydis < Formula + desc "Fast and lightweight x86/x86_64 disassembler library" + homepage "https://zydis.re" + # pull from git tag to get submodules + url "https://github.com/zyantific/zydis.git", + tag: "v4.1.1", + revision: "a2278f1d254e492f6a6b39f6cb5d1f5d515659dc" + license "MIT" + head "https://github.com/zyantific/zydis.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "79b00be9f9a41dc1ba17f76b0b7ad4017db140c44076666d210f1bbd50a6fcc1" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f925b7d0345acb686c8e62409639b866e7a1123e1209508de02393d5e7af0bee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a59d5b51d0d85f0a7d4970e9e1f9c88a4e70d1f2edb032954ef841868ac3e4c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae399b5f60c5d4bda9a1423990471f8dd13f53dafedffcba423fa911d89265d9" + sha256 cellar: :any_skip_relocation, sonoma: "0f1bd1d7a92035759a01a25a9c2e7657e5c7a6a0c64d121ca3821dd0d5bf6c26" + sha256 cellar: :any_skip_relocation, ventura: "9cef22740cd31a9e97983504c80eddfb4201860fccbe6887dd9692577ea7897d" + sha256 cellar: :any_skip_relocation, arm64_linux: "18b2f83673880c27fbbdf90ca73ca1d5cf2777727f188a0d18dd6b2d9849e1e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57fa80a8a5f5de2515de7c9e0ec1df9c29bed0035716ca4abd64fadbc1e868ce" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DZYDIS_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/ZydisInfo -64 66 3E 65 2E F0 F2 F3 48 01 A4 98 2C 01 00 00") + assert_match "xrelease lock add qword ptr gs:[rax+rbx*4+0x12C], rsp", output + end +end diff --git a/Formula/z/zyre.rb b/Formula/z/zyre.rb new file mode 100644 index 0000000000000..9360c10d1883f --- /dev/null +++ b/Formula/z/zyre.rb @@ -0,0 +1,73 @@ +class Zyre < Formula + desc "Local Area Clustering for Peer-to-Peer Applications" + homepage "https://github.com/zeromq/zyre" + license "MPL-2.0" + + stable do + url "https://github.com/zeromq/zyre/releases/download/v2.0.1/zyre-2.0.1.tar.gz" + sha256 "0ba43fcdf70fa1f35b068843a90fdf50b34d65a9be7f2c193924a87a4031a98c" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any, arm64_tahoe: "b97b8410e7d03d6c84387280d17c503707788453fa8016649bcac985509472dd" + sha256 cellar: :any, arm64_sequoia: "94ea60be41bac352236e7e0fe5dedaf16d53e985cb4bf7bc003df2d25565fa85" + sha256 cellar: :any, arm64_sonoma: "11ad219ac17051fbf7f1799a4dc8c371ab861a925639953c42a6879433210a38" + sha256 cellar: :any, arm64_ventura: "1bb9b571c0bc0c5026e0fc411f34f3dd3669c9366e83c7a10ccb64ad039b013e" + sha256 cellar: :any, arm64_monterey: "97e9c9802ff4f1e0b329da1cbe426647bc55af13990e27e03e80dbd13e4a4838" + sha256 cellar: :any, arm64_big_sur: "3b1d36e1f9441e338916cbc75e8701386fbeaa4c23a231061c4d6d08bc35a3f1" + sha256 cellar: :any, sonoma: "5c6bb1deeeaa92251d717d7243e579f912073e0057b1880f793b1def41cd6b7c" + sha256 cellar: :any, ventura: "a1956c77c1c59efd1848f4bb2567163f9715b3d46a0b2bb274453b1b2f9b632a" + sha256 cellar: :any, monterey: "5a85a14ca28dc1d832545421e55cc4e5fc6e1007bbd3bcb8be36266904eacb35" + sha256 cellar: :any, big_sur: "490a76ad5536efec4b40234fd693f67f7f4b0222672e0b0f39c36d2581b0f4ee" + sha256 cellar: :any, catalina: "3fca3e3402fa228c40c3e2263520be64b59c414d1454b7799bb284d711a75d62" + sha256 cellar: :any_skip_relocation, arm64_linux: "12b70df001f17c23de1b0650226e22391ea328ac495ec448b7dcfb407955012b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b873e7ea6e908ca4c97adcf840eaf865e1dc827716a99b2fe8d7b7ea56fc0991" + end + + head do + url "https://github.com/zeromq/zyre.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "czmq" + depends_on "zeromq" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "check-verbose" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + uint64_t version = zyre_version (); + assert(version >= 2); + + zyre_test(true); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lzyre", "-o", "test" + system "./test" + end +end diff --git a/Formula/z/zzuf.rb b/Formula/z/zzuf.rb new file mode 100644 index 0000000000000..f2fd6601f0cfc --- /dev/null +++ b/Formula/z/zzuf.rb @@ -0,0 +1,50 @@ +class Zzuf < Formula + desc "Transparent application input fuzzer" + homepage "http://caca.zoy.org/wiki/zzuf" + url "https://github.com/samhocevar/zzuf/releases/download/v0.15/zzuf-0.15.tar.bz2" + sha256 "04353d94c68391b3945199f100ab47fc5ff7815db1e92581a600d4175e3a6872" + license "WTFPL" + + no_autobump! because: :requires_manual_review + + bottle do + sha256 arm64_tahoe: "a4c4c66658aa63cc815d056e06bce100d7907cfd53179b98b596f440a1d0cd15" + sha256 arm64_sequoia: "6ccb5e6621aa95f4cb62afebe5f4c3aee322b8d207a10d3cbdc16bb073c09aa5" + sha256 arm64_sonoma: "6fce95c82da3ed7282dfbc55f4b276910b78fa5d76b2d5e66ad9b43607828fcf" + sha256 arm64_ventura: "16fc98439ca072e8cf19c129649eff99e63e0cece1c1455e97f04ce7cb4dfd73" + sha256 arm64_monterey: "8cf189e969a94737e6729be772df9f64759b7c33580cee51d571b31365dbddf2" + sha256 arm64_big_sur: "7ff801dd276cdd8f830d07d01c97a83207ed8ac77c6023ff21b29a2ec536637b" + sha256 sonoma: "e6a2bcac4710033bd155592753c6d4446a3771c70a9cdaa86f34a33f968db122" + sha256 ventura: "397eb044876f87b27787679b9a8f965da0aca9251386aa2a6dbbd1b5ef8cd3c9" + sha256 monterey: "2cfa284477cd1e81ac3b248a20f25812083fe7b592a997ecbefee7663cedab91" + sha256 big_sur: "284b235c4c744d7be86fbe6175a8d67a743a429c8021437182a31e6184105437" + sha256 catalina: "809edd89cf9bd285a0f5496500627aca8b4b4cec071bfd747eb7ae3918526ae6" + sha256 arm64_linux: "c7c8ec8267f9b314e98b81cd5bb9a9765b51d1bce2f4dfd00798ac823affd99e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7164c38ad977edfad3d137b9071e22f185effde9165996e847facd20f4df0e65" + end + + head do + url "https://github.com/samhocevar/zzuf.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + end + + def install + system "./bootstrap" if build.head? + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + output = pipe_output("#{bin}/zzuf -i -B 4194304 -r 0.271828 -s 314159 -m < /dev/zero").chomp + assert_equal "zzuf[s=314159,r=0.271828]: 549e1200590e9c013e907039fe535f41", output + end +end diff --git a/Formula/z/zzz.rb b/Formula/z/zzz.rb new file mode 100644 index 0000000000000..4dbcde3aa831b --- /dev/null +++ b/Formula/z/zzz.rb @@ -0,0 +1,45 @@ +class Zzz < Formula + desc "Command-line tool to put Macs to sleep" + homepage "https://github.com/Orc/Zzz" + license :public_domain + head "https://github.com/Orc/Zzz.git", branch: "main" + + stable do + url "https://github.com/Orc/Zzz/archive/refs/tags/v1.tar.gz" + sha256 "8c8958b65a74ab1081ce1a950af6d360166828bdb383d71cc8fe37ddb1702576" + + # Backport fix for C99 + patch do + url "https://github.com/Orc/Zzz/commit/2bf4284ecdbdfd0d629ed00752bcda5d0d0f63f6.patch?full_index=1" + sha256 "b861283f25c6c6f160929c630203861dc9bbaf501d89cb6e6d7a3b383c53bf20" + end + end + + no_autobump! because: :requires_manual_review + + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "1f259a8829cd360183c6aef122efd8def3dd421f1d72f04d13d6416d7fc9d5b0" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fd0ee248946ce362be9296be1706999d0e32f120f86e07923d5f98f58ddd014b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87aded93dd5a70ab018880e46586b6a7c0929414def405edb1db0e1e6b7a5936" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5da5ac10ecb8c990e69702b8c671a701d662ab63755a25b2fd0a90e84790f007" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a1135d50a709f3c6a64316e5a92a6f269bdb865d21fa26e279c38344afde541" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e08914c722e58a5f5a43c70b395a198faf42e08bc31476fcf226ee77bd42195f" + sha256 cellar: :any_skip_relocation, sonoma: "75d43876070b1f6160b4cb6a07f70599a4aa50556fc542c2523397d30ba747bc" + sha256 cellar: :any_skip_relocation, ventura: "0466ce782b6410ac3fd3df809c516c53763a9e4a90d1ed81f48118090dd497d9" + sha256 cellar: :any_skip_relocation, monterey: "086a43f796e1d9630aa6980fcca37971031e37234f065295d55f4de1f72c8c35" + sha256 cellar: :any_skip_relocation, big_sur: "3609040838445e383713a328d0838510d77c3d222f8ecd6892e0e99455668ab1" + sha256 cellar: :any_skip_relocation, catalina: "10b1c9f9822b1cbadaa5774d0ee28c1016fa4477cbe3442475ad9113f0b98dd4" + end + + depends_on :macos + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + # No test is possible: this has no --help or --version, it just + # sleeps the Mac instantly. + test do + assert_path_exists bin/"Zzz" + end +end diff --git a/Formula/z3.rb b/Formula/z3.rb deleted file mode 100644 index 12a8cb9f497a7..0000000000000 --- a/Formula/z3.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Z3 < Formula - desc "High-performance theorem prover" - homepage "https://github.com/Z3Prover/z3" - url "https://github.com/Z3Prover/z3/archive/z3-4.8.4.tar.gz" - sha256 "5a18fe616c2a30b56e5b2f5b9f03f405cdf2435711517ff70b076a01396ef601" - revision 1 - head "https://github.com/Z3Prover/z3.git" - - bottle do - cellar :any - sha256 "120adbe521a09623f9f13357a42eaf50113aafeb8154650cb434287fd18b5c50" => :mojave - sha256 "2e3ca6c8ce76e9e5022f95f83bc30e7251fc55758a3ec7bb973f9887fc219822" => :high_sierra - sha256 "aa69aae9bef9513b46ba964dbeb69104584ec5ab515c4e7a622e4476672187fd" => :sierra - end - - depends_on "python" - - def install - xy = Language::Python.major_minor_version "python3" - system "python3", "scripts/mk_make.py", - "--prefix=#{prefix}", - "--python", - "--pypkgdir=#{lib}/python#{xy}/site-packages", - "--staticlib" - - cd "build" do - system "make" - system "make", "install" - end - - # qprofdiff is not yet part of the source release (it will be as soon as a - # version is released after 4.5.0), so we only include it in HEAD builds - if build.head? - system "make", "-C", "contrib/qprofdiff" - bin.install "contrib/qprofdiff/qprofdiff" - end - - pkgshare.install "examples" - end - - test do - system ENV.cc, "-I#{include}", "-L#{lib}", "-lz3", - pkgshare/"examples/c/test_capi.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/z80asm.rb b/Formula/z80asm.rb deleted file mode 100644 index 8cdcff74515eb..0000000000000 --- a/Formula/z80asm.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Z80asm < Formula - desc "Assembler for the Zilog Z80 microprcessor and compatibles" - homepage "https://www.nongnu.org/z80asm/" - url "https://download.savannah.gnu.org/releases/z80asm/z80asm-1.8.tar.gz" - sha256 "67fba9940582cddfa70113235818fb52d81e5be3db483dfb0816acb330515f64" - - bottle do - cellar :any_skip_relocation - sha256 "564990d37a17d2fe91472212de5f0cff30990e47275a29e69f1061177c2b1fea" => :mojave - sha256 "183abd9c47e5050aa9a3fb4f9ddbd8806f0154aedcc239e2d2b716e234e91ce5" => :high_sierra - sha256 "2bf9a1b8ebae970b16ad7d4644a028ddcb21d8069f2f5d73d18d69881d7eca27" => :sierra - sha256 "46446e7c3644dc58e1c5cc80b904863298f818d15c4aaad721e36cabae75207c" => :el_capitan - sha256 "f52e469f9e8ab4c30c6cce5cde41a52bfbdb06e8db88b8be80fb7c54cbb73a21" => :yosemite - sha256 "ed0e94c25d70c23f537ffbf8440b909b5d652e6000ebacd89be024c7ceee0e3d" => :mavericks - end - - def install - system "make" - - bin.install "z80asm" - man1.install "z80asm.1" - end - - test do - path = testpath/"a.asm" - path.write "call 1234h\n" - - system bin/"z80asm", path - code = File.open(testpath/"a.bin", "rb") { |f| f.read.unpack("C*") } - assert_equal [0xcd, 0x34, 0x12], code - end -end diff --git a/Formula/z80dasm.rb b/Formula/z80dasm.rb deleted file mode 100644 index 71102c7568e4f..0000000000000 --- a/Formula/z80dasm.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Z80dasm < Formula - desc "Disassembler for the Zilog Z80 microprocessor and compatibles" - homepage "https://www.tablix.org/~avian/blog/articles/z80dasm/" - url "https://www.tablix.org/~avian/z80dasm/z80dasm-1.1.5.tar.gz" - sha256 "91ecbfa43e5a9c15665560668fb1a9e3f0455f28a6f7478450bd61ff56d6b96e" - - bottle do - cellar :any_skip_relocation - sha256 "5342a99e093cf751afa8a79420999b21e5c63440a77acf7b485cbab2b4ab567c" => :mojave - sha256 "aa3f2ab337305b4dcbb37e868fcc537e04cac5fd4a2af7c8548347965f26a226" => :high_sierra - sha256 "527e7f1cd02531e634745086a7b74eafa57fa8e1f676c3ad60d552f0d6d9ef20" => :sierra - sha256 "35be0cbdb1c9abc7277c740d7da130bb8b8f7bc50f744ae8a8ea3965a228b9ed" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - path = testpath/"a.bin" - path.binwrite [0xcd, 0x34, 0x12].pack("c*") - assert_match /call 01234h/, shell_output("#{bin}/z80dasm #{path}") - end -end diff --git a/Formula/zabbix.rb b/Formula/zabbix.rb deleted file mode 100644 index 4d6e0c9cf90a6..0000000000000 --- a/Formula/zabbix.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Zabbix < Formula - desc "Availability and monitoring solution" - homepage "https://www.zabbix.com/" - url "https://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.13/zabbix-3.4.13.tar.gz" - sha256 "115b70acc78954aac4da0a91012645a216ee4296a7b538b60c2198cc04b905bd" - - bottle do - sha256 "54c269bc1fcf897d9e31666d29ca67dc8deef7a8d0c9215eba14b157e1f44f2e" => :mojave - sha256 "b27f4d5e4d86e4d39c295e04ec27ba3c128c7315a1f30ba54ff444f23e61654b" => :high_sierra - sha256 "6e5e5950eb72dae5ed3755ec216e088884f9b6bb843300ceeeabff629386f955" => :sierra - sha256 "93c611153ab56ca7f9bb0b18bbd92eee94e08a26c1f555c2cedb6c94271cdf4f" => :el_capitan - end - - option "with-mysql", "Use Zabbix Server with MySQL library instead PostgreSQL." - option "with-sqlite", "Use Zabbix Server with SQLite library instead PostgreSQL." - option "without-server-proxy", "Install only the Zabbix Agent without Server and Proxy." - - deprecated_option "agent-only" => "without-server-proxy" - - depends_on "openssl" - depends_on "pcre" - - if build.with? "server-proxy" - depends_on "mysql" => :optional - depends_on "postgresql" if build.without? "mysql" - depends_on "fping" - depends_on "libevent" - depends_on "libssh2" - end - - def brewed_or_shipped(db_config) - brewed_db_config = "#{HOMEBREW_PREFIX}/bin/#{db_config}" - (File.exist?(brewed_db_config) && brewed_db_config) || which(db_config) - end - - def install - sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --sysconfdir=#{etc}/zabbix - --enable-agent - --with-iconv=#{sdk}/usr - --with-libpcre=#{Formula["pcre"].opt_prefix} - --with-openssl=#{Formula["openssl"].opt_prefix} - ] - - if build.with? "server-proxy" - args += %w[ - --enable-server - --enable-proxy - --enable-ipv6 - --with-net-snmp - --with-libcurl - --with-ssh2 - ] - - if build.with? "mysql" - args << "--with-mysql=#{brewed_or_shipped("mysql_config")}" - elsif build.with? "sqlite" - args << "--with-sqlite3" - else - args << "--with-postgresql=#{brewed_or_shipped("pg_config")}" - end - end - - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - inreplace "configure", "clock_gettime(CLOCK_REALTIME, &tp);", - "undefinedgibberish(CLOCK_REALTIME, &tp);" - end - - system "./configure", *args - system "make", "install" - - if build.with? "server-proxy" - db = build.with?("mysql") ? "mysql" : "postgresql" - pkgshare.install "frontends/php", "database/#{db}" - end - end - - test do - system sbin/"zabbix_agentd", "--print" - end -end diff --git a/Formula/zanata-client.rb b/Formula/zanata-client.rb deleted file mode 100644 index 95ad67163081d..0000000000000 --- a/Formula/zanata-client.rb +++ /dev/null @@ -1,22 +0,0 @@ -class ZanataClient < Formula - desc "Zanata translation system command-line client" - homepage "http://zanata.org/" - url "https://search.maven.org/remotecontent?filepath=org/zanata/zanata-cli/4.6.2/zanata-cli-4.6.2-dist.tar.gz" - sha256 "6d4bac8c5b908abf734ff23e0aca9b05f4bc13e66588c526448f241d90473132" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install Dir["*"] - (bin/"zanata-cli").write_env_script libexec/"bin/zanata-cli", Language::Java.java_home_env("1.8") - bash_completion.install libexec/"bin/zanata-cli-completion" - end - - test do - output = shell_output("#{bin}/zanata-cli --help") - assert_match "Zanata Java command-line client", output - end -end diff --git a/Formula/zbackup.rb b/Formula/zbackup.rb deleted file mode 100644 index e8e25219772d1..0000000000000 --- a/Formula/zbackup.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Zbackup < Formula - desc "Globally-deduplicating backup tool (based on ideas in rsync)" - homepage "http://zbackup.org" - url "https://github.com/zbackup/zbackup/archive/1.4.4.tar.gz" - sha256 "efccccd2a045da91576c591968374379da1dc4ca2e3dec4d3f8f12628fa29a85" - revision 8 - - bottle do - cellar :any - sha256 "07ca77fddf0e9a79bb5923ace0c64a8ea0ea95ef6bb04e744f7b3f82ba0cd79f" => :mojave - sha256 "21d8cad2823234c8c3670e5fb565db3024ca7cc4632786b14f3f4ae2b7ec3f37" => :high_sierra - sha256 "0b89a926af81bb4d7270f8724f7a4e9ec0dd763669603dd480d12f5690c86d96" => :sierra - sha256 "34bbe1ac111fd38719ea48a27bcb84d5563b5b4ca2579e4b15a9ad6ae224fdcd" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "lzo" - depends_on "openssl" - depends_on "protobuf" - depends_on "xz" # get liblzma compression algorithm library from XZutils - - # These fixes are upstream and can be removed in version 1.5+ - patch do - url "https://github.com/zbackup/zbackup/commit/7e6adda6b1df9c7b955fc06be28fe6ed7d8125a2.diff?full_index=1" - sha256 "b33b3693fff6fa89b40a02c8c14f73e2e270e2c5e5f0e27ccb038b0d2fb304d4" - end - - patch do - url "https://github.com/zbackup/zbackup/commit/f4ff7bd8ec63b924a49acbf3a4f9cf194148ce18.diff?full_index=1" - sha256 "060491c216a145d34a8fd3385b138630718579404e1a2ec2adea284a52699672" - end - - needs :cxx11 - - def install - ENV.cxx11 - - # Avoid collision with protobuf 3.x CHECK macro - inreplace [ - "backup_creator.cc", - "check.hh", - "chunk_id.cc", - "chunk_storage.cc", - "compression.cc", - "encrypted_file.cc", - "encryption.cc", - "encryption_key.cc", - "mt.cc", - "tests/bundle/test_bundle.cc", - "tests/encrypted_file/test_encrypted_file.cc", - "unbuffered_file.cc", - ], - /\bCHECK\b/, "ZBCHECK" - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/zbackup", "--non-encrypted", "init", "." - system "echo test | #{bin}/zbackup --non-encrypted backup backups/test.bak" - end -end diff --git a/Formula/zbar.rb b/Formula/zbar.rb deleted file mode 100644 index 894fd66867940..0000000000000 --- a/Formula/zbar.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Zbar < Formula - desc "Suite of barcodes-reading tools" - homepage "https://zbar.sourceforge.io" - revision 9 - - stable do - url "https://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2" - sha256 "234efb39dbbe5cef4189cc76f37afbe3cfcfb45ae52493bfe8e191318bdbadc6" - - # Fix JPEG handling using patch from - # https://sourceforge.net/p/zbar/discussion/664596/thread/58b8d79b#8f67 - # already applied upstream but not present in the 0.10 release - patch :DATA - end - - bottle do - cellar :any - sha256 "e6a6a23bc18fb83aaff6899da45c31cd3e5959eba8cfae4e0bd7a6ba7eba5cb0" => :mojave - sha256 "43b41e062704914a007017d7d35dfb518f6c04141a52eb2c146a5e908a75334c" => :high_sierra - sha256 "64d9816afc8e6fd898c402f152a9847b4e265da078cf27fa6b1fb289ec3d963c" => :sierra - sha256 "8a6c2c77063e98986a8b6d6a5eb19333cd39efccb03af08493d6b5e8a60d57b7" => :el_capitan - end - - head do - url "https://github.com/ZBar/ZBar.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - depends_on "xmlto" => :build - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "imagemagick" - depends_on "jpeg" - depends_on "libtool" - depends_on "ufraw" - depends_on "xz" - depends_on :x11 => :optional - - def install - if build.head? - inreplace "configure.ac", "-Werror", "" - gettext = Formula["gettext"] - system "autoreconf", "-fvi", "-I", "#{gettext.opt_share}/aclocal" - end - - # ImageMagick 7 compatibility - # Reported 20 Jun 2016 https://sourceforge.net/p/zbar/support-requests/156/ - inreplace ["configure", "zbarimg/zbarimg.c"], - "wand/MagickWand.h", - "ImageMagick-7/MagickWand/MagickWand.h" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --without-python - --without-qt - --disable-video - --without-gtk - ] - - if build.with? "x11" - args << "--with-x" - else - args << "--without-x" - end - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"zbarimg", "-h" - end -end - -__END__ -diff --git a/zbar/jpeg.c b/zbar/jpeg.c -index fb566f4..d1c1fb2 100644 ---- a/zbar/jpeg.c -+++ b/zbar/jpeg.c -@@ -79,8 +79,15 @@ int fill_input_buffer (j_decompress_ptr cinfo) - void skip_input_data (j_decompress_ptr cinfo, - long num_bytes) - { -- cinfo->src->next_input_byte = NULL; -- cinfo->src->bytes_in_buffer = 0; -+ if (num_bytes > 0) { -+ if (num_bytes < cinfo->src->bytes_in_buffer) { -+ cinfo->src->next_input_byte += num_bytes; -+ cinfo->src->bytes_in_buffer -= num_bytes; -+ } -+ else { -+ fill_input_buffer(cinfo); -+ } -+ } - } - - void term_source (j_decompress_ptr cinfo) diff --git a/Formula/zboy.rb b/Formula/zboy.rb deleted file mode 100644 index 3dad6df9472f5..0000000000000 --- a/Formula/zboy.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Zboy < Formula - desc "GameBoy emulator" - homepage "https://zboy.sourceforge.io/" - url "https://downloads.sourceforge.net/project/zboy/zBoy%20v0.60/zboy-0.60.tar.gz" - sha256 "f81e61433a5b74c61ab84cac33da598deb03e49699f3d65dcb983151a6f1c749" - head "http://svn.code.sf.net/p/zboy/code/trunk" - - bottle do - cellar :any - sha256 "591314e1270d822230b89e64e7d6b4ca5602e77c10c13ae034e7eed347fb2bb0" => :mojave - sha256 "5eb884e02583dd9b50e554a6dfae805849dbd620bb90d10b721937cb4f35fa50" => :high_sierra - sha256 "85d55fa04126008eb3a72d8cba9afa52b64231807306340c70414649ec56aca1" => :sierra - sha256 "3eada5e4cb665257ea7f4dc244e8fe4dac54f279cc9ab2bd4ccfce486b010356" => :el_capitan - sha256 "ea5ce73b9e6dccb7e96e7a9eb8e7f7c75c54b89d00bded0a0f13bccbc22a7808" => :yosemite - end - - depends_on "sdl2" - - def install - sdl2 = Formula["sdl2"] - ENV.append_to_cflags "-std=gnu89 -D__zboy4linux__ -DNETPLAY -DLFNAVAIL -I#{sdl2.include} -L#{sdl2.lib}" - system "make", "-f", "Makefile.linux", "CFLAGS=#{ENV.cflags}" - bin.install "zboy" - end - - test do - system "#{bin}/zboy", "--help" - end -end diff --git a/Formula/zdelta.rb b/Formula/zdelta.rb deleted file mode 100644 index 6599f9301fe8c..0000000000000 --- a/Formula/zdelta.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Zdelta < Formula - desc "Lossless delta compression library" - homepage "https://web.archive.org/web/20150804051750/cis.poly.edu/zdelta/" - url "https://web.archive.org/web/20150804051752/cis.poly.edu/zdelta/downloads/zdelta-2.1.tar.gz" - sha256 "03e6beb2e1235f2091f0146d7f41dd535aefb6078a48912d7d11973d5306de4c" - head "https://github.com/snej/zdelta.git" - - bottle do - cellar :any_skip_relocation - sha256 "d98c1b4f7a6b63238bacd06d0a5640e7f0d07838bb4b3e15ac7dc9d699a5835a" => :mojave - sha256 "12c977074ebb388cb671b3a996cacda4c5c47fbf96100f73ffddcbf83976824d" => :high_sierra - sha256 "49b891fbf6b6f93796cb3080dcbefc1d873000e84d74a4bf2dd851b625e6a698" => :sierra - sha256 "3a186612374b9b2aca2e56f5dd68049c0b1ef952e4cb0b07263faf2ea62f136a" => :el_capitan - sha256 "2ade2838217be1b9f6bc55be6bf05fa5046ae09a42d17b714b9f2a73f934c993" => :yosemite - sha256 "86f93c2e260d321d3bf30b34c2313d2cec5bc6d23bfb5a86cf99ab6b5f64f157" => :mavericks - end - - def install - system "make", "test", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" - system "make", "install", "prefix=#{prefix}" - bin.install "zdc", "zdu" - end - - test do - msg = "Hello this is Homebrew" - (testpath/"ref").write "Hello I'm a ref file" - - compressed = pipe_output("#{bin}/zdc ref", msg, 0) - - assert_equal msg, pipe_output("#{bin}/zdu ref", compressed, 0) - end -end diff --git a/Formula/zebra.rb b/Formula/zebra.rb deleted file mode 100644 index ee1fa539281cc..0000000000000 --- a/Formula/zebra.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Zebra < Formula - desc "Information management system" - homepage "https://www.indexdata.com/zebra" - url "http://ftp.indexdata.dk/pub/zebra/idzebra-2.1.4.tar.gz" - sha256 "f45b0461cf40fafddd97d447695a087be0ba0981c108bf509d4c11f6d1db1ae2" - revision 1 - - bottle do - sha256 "c2cd8d27e0426422eab75017a53a12635faa8784a9895e86596b59e8e2eb515b" => :mojave - sha256 "10a073b4fd6f48c197029e1bc736c3299d2a8138690389c5c94fda5a7b091601" => :high_sierra - sha256 "7afcb8c211cea6a86800470d3018d165a4e4b82205e788998cde061efa6f8944" => :sierra - end - - depends_on "icu4c" - depends_on "yaz" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-mod-text", - "--enable-mod-grs-regx", - "--enable-mod-grs-marc", - "--enable-mod-grs-xml", - "--enable-mod-dom", - "--enable-mod-alvis", - "--enable-mod-safari" - system "make", "install" - end - - test do - cd share/"idzebra-2.0-examples/oai-pmh/" do - system bin/"zebraidx-2.0", "-c", "conf/zebra.cfg", "init" - system bin/"zebraidx-2.0", "-c", "conf/zebra.cfg", "commit" - end - end -end diff --git a/Formula/zelda-roth-se.rb b/Formula/zelda-roth-se.rb deleted file mode 100644 index 0ccfe8d4dd12b..0000000000000 --- a/Formula/zelda-roth-se.rb +++ /dev/null @@ -1,38 +0,0 @@ -class ZeldaRothSe < Formula - desc "Zelda Return of the Hylian SE" - homepage "http://www.solarus-games.org/games/zelda-return-of-the-hylian-se/" - head "https://github.com/christopho/zelda_roth_se.git" - - stable do - url "https://github.com/christopho/zelda_roth_se/archive/v1.1.0.tar.gz" - sha256 "95baf3ce96372b1ce78d9af8ee9723840474ac8fc51e87eb54cc35777d68f5a8" - - # Support SOLARUS_INSTALL_DATADIR variable for CMake - patch do - url "https://github.com/christopho/zelda_roth_se/commit/e9b5bd907f5b50b17d65ebe2fa50760d322c537c.diff?full_index=1" - sha256 "061b93efdd16c450f7c3483e690099d96280250b159336439ab0da0ad5c2e13d" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "b9f77d702fa6c412eec4b5d1c602ae1bc0ca05d01421d792110057bd79e53742" => :mojave - sha256 "8b76f5c62bca90258a3e0c3d930551befe9fdd0f0814d1f2026f32dae1027998" => :high_sierra - sha256 "2db05a8f1209a0f039c6bea92ffefb362d94497bc9f659e8057eca1539fc132e" => :sierra - sha256 "7aa852ad416766a72aad6b254f86f21a53bd67df29f20b7eaa612ba709f8c0cd" => :el_capitan - sha256 "069a42db0b88121a77233d3860a5191af80ad335270cc4723b1bb4ef1c48ccc3" => :yosemite - end - - depends_on "cmake" => :build - depends_on "solarus" - - def install - system "cmake", ".", *std_cmake_args, "-DSOLARUS_INSTALL_DATADIR=#{share}" - system "make", "install" - end - - test do - system Formula["solarus"].bin/"solarus-run", "-help" - system "/usr/bin/unzip", share/"zelda_roth_se/data.solarus" - end -end diff --git a/Formula/zenity.rb b/Formula/zenity.rb deleted file mode 100644 index e765ee16c959f..0000000000000 --- a/Formula/zenity.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Zenity < Formula - desc "GTK+ dialog boxes for the command-line" - homepage "https://wiki.gnome.org/Projects/Zenity" - url "https://download.gnome.org/sources/zenity/3.30/zenity-3.30.0.tar.xz" - sha256 "995ef696616492c40be6da99919851d41faed6643a97c9d24743b46bc8b537f2" - - bottle do - sha256 "1f45ac15943a7b3493d7833072c253ffa5158aa124fcc734c890f5906496396b" => :mojave - sha256 "ef38b762ac8036cf3055f772b661c856e04a387c5e29b4be9b108e5b19485b17" => :high_sierra - sha256 "6efdbda681d0357aa8da3cd76fb047d2c66745b75b05a388cc56da5e7e0c5b46" => :sierra - end - - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system bin/"zenity", "--help" - end -end diff --git a/Formula/zero-install.rb b/Formula/zero-install.rb deleted file mode 100644 index b7622214475cf..0000000000000 --- a/Formula/zero-install.rb +++ /dev/null @@ -1,75 +0,0 @@ -class ZeroInstall < Formula - desc "Zero Install is a decentralised software installation system" - homepage "https://0install.net/" - url "https://downloads.sourceforge.net/project/zero-install/0install/2.13/0install-2.13.tar.bz2" - sha256 "10726e05ac262c7c5dd1ae109deddf9aa61a146db8fc75c997dd4efc3a4d35ca" - - bottle do - cellar :any_skip_relocation - sha256 "12d16e6e7c193b0525bf783a931e178a43cb2357a6821de8628d5b1945e5b8c0" => :mojave - sha256 "29434cfb80b552cb133e47b6a0a8e4d9929656de096c6fb383ab53dae9d6af5a" => :high_sierra - sha256 "5e6a18d83dc1503a71545506b25de4b0c97efbdf0a4ce6632a30369bc96e0cc2" => :sierra - sha256 "0fa494c5e2852f8ebcadadc9c441302145444da6f580efce516263f9c1b33e4f" => :el_capitan - end - - depends_on "camlp4" => :build - depends_on "ocaml" => :build - depends_on "ocamlbuild" => :build - depends_on "opam" => :build - depends_on "pkg-config" => :build - depends_on "gnupg" - depends_on "gtk+" => :optional - - def install - ENV["OCAMLPARAM"] = "safe-string=0,_" # OCaml 4.06.0 compat - ENV.append_path "PATH", Formula["gnupg"].opt_bin - - opamroot = buildpath/"opamroot" - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - system "opam", "init", "--no-setup" - modules = %w[ - cppo - yojson - xmlm - ounit - lwt_react - ocurl - obus - sha - cppo_ocamlbuild - ] - modules << "lablgtk" << "lwt_glib" if build.with? "gtk+" - system "opam", "config", "exec", "opam", "install", *modules - - # mkdir: /build: File exists. - # https://github.com/0install/0install/issues/87 - ENV.deparallelize { system "opam", "config", "exec", "make" } - - inreplace "dist/install.sh" do |s| - s.gsub! '"/usr/local"', prefix - s.gsub! '"${PREFIX}/man"', man - end - system "make", "install" - end - - test do - (testpath/"hello.py").write <<~EOS - print("hello world") - EOS - (testpath/"hello.xml").write <<~EOS - - - Hello - minimal demonstration program - - - - - - - - EOS - assert_equal "hello world\n", shell_output("#{bin}/0launch --console hello.xml") - end -end diff --git a/Formula/zeromq.rb b/Formula/zeromq.rb deleted file mode 100644 index d292c50d230af..0000000000000 --- a/Formula/zeromq.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Zeromq < Formula - desc "High-performance, asynchronous messaging library" - homepage "http://www.zeromq.org/" - url "https://github.com/zeromq/libzmq/releases/download/v4.3.0/zeromq-4.3.0.tar.gz" - sha256 "8e9c3af6dc5a8540b356697081303be392ade3f014615028b3c896d0148397fd" - - bottle do - cellar :any - sha256 "ca0347dd904380b96c4889b323c9e93aeb845775462ff31f2ab00326be11ce76" => :mojave - sha256 "6e60d979c72767be92d568755e78fe59302dc25f35faf18254e1dee0b0516aef" => :high_sierra - sha256 "81f9934a2e44a726a3165aac985c33abad897657590800f1a9c8424e26ae3b32" => :sierra - end - - head do - url "https://github.com/zeromq/libzmq.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "asciidoc" => :build - depends_on "pkg-config" => :build - depends_on "xmlto" => :build - - def install - # Work around "error: no member named 'signbit' in the global namespace" - if MacOS.version == :high_sierra - ENV.delete("HOMEBREW_SDKROOT") - ENV.delete("SDKROOT") - end - - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - ENV["LIBUNWIND_LIBS"] = "-framework System" - sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path - ENV["LIBUNWIND_CFLAGS"] = "-I#{sdk}/usr/include" - - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - zmq_msg_t query; - assert(0 == zmq_msg_init_size(&query, 1)); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lzmq", "-o", "test" - system "./test" - end -end diff --git a/Formula/zig.rb b/Formula/zig.rb deleted file mode 100644 index 35fad99d489c3..0000000000000 --- a/Formula/zig.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Zig < Formula - desc "Programming language designed for robustness, optimality, and clarity" - homepage "https://ziglang.org/" - url "https://github.com/ziglang/zig/archive/0.3.0.tar.gz" - sha256 "23ebb962823b2c78fd7bb16dd033b189c3050eee9991070debbd79c9b8648772" - head "https://github.com/ziglang/zig.git" - - bottle do - sha256 "93c95a500ebf3a57025a980aabeb47a9ffd93606ef7f67461b457a29f80663cb" => :mojave - sha256 "2debc5e9a4d567b8412aa38645f2bfe485eac79c4e953710d5c05e006b56ff4d" => :high_sierra - sha256 "2d57cb9516cc3d2d5f4c83c33beece104166c348808751d6195054f05858fcb2" => :sierra - end - - depends_on "cmake" => :build - depends_on "llvm" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"hello.zig").write <<~EOS - const std = @import("std"); - pub fn main() !void { - var stdout_file = try std.io.getStdOut(); - try stdout_file.write("Hello, world!"); - } - EOS - system "#{bin}/zig", "build-exe", "hello.zig" - assert_equal "Hello, world!", shell_output("./hello") - end -end diff --git a/Formula/zile.rb b/Formula/zile.rb deleted file mode 100644 index e2545fcde87a8..0000000000000 --- a/Formula/zile.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Zile < Formula - desc "Text editor development kit" - homepage "https://www.gnu.org/software/zile/" - url "https://ftp.gnu.org/gnu/zile/zile-2.4.14.tar.gz" - mirror "https://ftpmirror.gnu.org/zile/zile-2.4.14.tar.gz" - sha256 "7a78742795ca32480f2bab697fd5e328618d9997d6f417cf1b14e9da9af26b74" - revision 2 - - bottle do - sha256 "eb3ccf733c6a85290d419c7098aafd1d844880f689973276decd6bf9c19fe965" => :mojave - sha256 "f17882759df971a7e3184638a13b889576eba380d61a005e3bbd33d3d32cc84e" => :high_sierra - sha256 "5be3657e02aa7dca41fd0432bbff60a3d96623a89179280a31b18cbde1a6b836" => :sierra - sha256 "25330278315a0e2fbc7cd731d69e88ba8205cd4d622ca7a0abbc638f95e6d937" => :el_capitan - end - - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "bdw-gc" - - fails_with :gcc do - cause "src/funcs.c:1128: error: #pragma GCC diagnostic not allowed inside functions" - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/zile --version") - end -end diff --git a/Formula/zim.rb b/Formula/zim.rb deleted file mode 100644 index a5ceb6039f2fa..0000000000000 --- a/Formula/zim.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Zim < Formula - desc "Graphical text editor used to maintain a collection of wiki pages" - homepage "http://zim-wiki.org/" - url "https://github.com/jaap-karssenberg/zim-desktop-wiki/archive/0.69.tar.gz" - sha256 "48205c533f1df4d8b143d5bc5adc09a6cd979c53a5d6b504922d8ac28b57e532" - head "https://github.com/jaap-karssenberg/zim-desktop-wiki.git" - - bottle do - cellar :any_skip_relocation - sha256 "40371c83122357897c923c61ce784a8bc14d08ee5cbfa025caca43ce8ff6b515" => :mojave - sha256 "434beb268dd464539454cf3f523e49628b8b3f6a128ab1a9f1eb9ea373c64fd4" => :high_sierra - sha256 "434beb268dd464539454cf3f523e49628b8b3f6a128ab1a9f1eb9ea373c64fd4" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "pygobject" - depends_on "pygtk" - depends_on "python@2" - depends_on "graphviz" => :optional - depends_on "pygtksourceview" => :optional - - resource "pyxdg" do - url "https://files.pythonhosted.org/packages/source/p/pyxdg/pyxdg-0.25.tar.gz" - sha256 "81e883e0b9517d624e8b0499eb267b82a815c0b7146d5269f364988ae031279d" - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - resource("pyxdg").stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - ENV["XDG_DATA_DIRS"] = libexec/"share" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" - system "python", "./setup.py", "install", "--prefix=#{libexec}", "--skip-xdg-cmd" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"], :XDG_DATA_DIRS => libexec/"share" - pkgshare.install "zim" - end - - test do - system "#{bin}/zim", "--version" - end -end diff --git a/Formula/zimg.rb b/Formula/zimg.rb deleted file mode 100644 index 2cb22120cf6c5..0000000000000 --- a/Formula/zimg.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Zimg < Formula - desc "Scaling, colorspace conversion, and dithering library" - homepage "https://github.com/sekrit-twc/zimg" - url "https://github.com/sekrit-twc/zimg/archive/release-2.8.tar.gz" - sha256 "a8f9d65c95ce6e8050d83d0417b109aabc94d2c7ba65cf2d8039840d162ad876" - head "https://github.com/sekrit-twc/zimg.git" - - bottle do - cellar :any - sha256 "57afa33acbedd31fe42cf1aa48cda0682b985fcbff5536a2b65c0b75a9506879" => :mojave - sha256 "34babb4d3249667e24b3ebc6306a389fc7d432b512383ceedd55518cbb7a5e56" => :high_sierra - sha256 "243c9709bc0b5c0da6392443bfdddb82c30811557f8c344bf64459af05f5ba42" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - # Upstream has decided not to fix https://github.com/sekrit-twc/zimg/issues/52 - depends_on :macos => :el_capitan - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - zimg_image_format format; - zimg_image_format_default(&format, ZIMG_API_VERSION); - assert(ZIMG_MATRIX_UNSPECIFIED == format.matrix_coefficients); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lzimg", "-o", "test" - system "./test" - end -end diff --git a/Formula/zinc.rb b/Formula/zinc.rb deleted file mode 100644 index c43c69699523f..0000000000000 --- a/Formula/zinc.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Zinc < Formula - desc "Stand-alone version of sbt's Scala incremental compiler" - homepage "https://github.com/typesafehub/zinc" - url "https://downloads.typesafe.com/zinc/0.3.15/zinc-0.3.15.tgz" - sha256 "5ec4df3fa2cbb271d65a5b478c940a9da6ef4902aa8c9d41a76dd253e3334ca7" - - bottle :unneeded - - def install - rm_f Dir["bin/ng/{linux,win}*"] - libexec.install Dir["*"] - bin.install_symlink libexec/"bin/zinc" - end - - test do - system "#{bin}/zinc", "-version" - end -end diff --git a/Formula/zint.rb b/Formula/zint.rb deleted file mode 100644 index 48a3eaf6cd121..0000000000000 --- a/Formula/zint.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Zint < Formula - desc "Barcode encoding library supporting over 50 symbologies" - homepage "http://www.zint.org.uk/" - url "https://downloads.sourceforge.net/project/zint/zint/2.6.3/zint-2.6.3.src.tar.gz" - sha256 "adcaebeb2931163a567073644c8e7952430ea31e08060363432d77cc599318d8" - head "https://git.code.sf.net/p/zint/code.git" - - bottle do - cellar :any - sha256 "a6bd9c60632b5959b4f4777d82d9ceaaa9760fad18b27c57b3fa1cdfa859cc1d" => :mojave - sha256 "84fcae80b8ad56b4a4d5666a617a57c9f49afac7783f6298582a3ce053aa157b" => :high_sierra - sha256 "831d734afaa473f891a750799641da15653007ddd0355e8b7b2d1a49c2cc3550" => :sierra - sha256 "ecf62997149cefbc38b5b74ca99eeeab44569525d2ef67a4822a3c706e073ce7" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "libpng" - - def install - # Sandbox fix: install FindZint.cmake in zint's prefix, not cmake's. - inreplace "CMakeLists.txt", "${CMAKE_ROOT}", "#{share}/cmake" - - mkdir "zint-build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system "#{bin}/zint", "-o", "test-zing.png", "-d", "This Text" - end -end diff --git a/Formula/zip.rb b/Formula/zip.rb deleted file mode 100644 index 17bca9db08483..0000000000000 --- a/Formula/zip.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Zip < Formula - desc "Compression and file packaging/archive utility" - homepage "https://infozip.sourceforge.io/Zip.html" - url "https://downloads.sourceforge.net/project/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz" - version "3.0" - sha256 "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b76c061fa0a226fb5b484fc790582bb07e5138648738f35726fa278ab5e8a612" => :mojave - sha256 "d218e0b7d82c7864a1ead12186b5bc09b43c2aa3749651008ac8dbcf32ec0d7c" => :high_sierra - sha256 "be282c3dfde4da608ab090910b3fe3cbec914d435122854f17acc0f718cc3a15" => :sierra - sha256 "54ea09b9be1a8c8a20b94e7cadff551ed243f5762a0d8da79f1aaedc4c9492a9" => :el_capitan - end - - keg_only :provided_by_macos - - # Upstream is unmaintained so we use the Debian patchset: - # https://packages.debian.org/sid/zip - patch do - url "https://mirrors.ocf.berkeley.edu/debian/pool/main/z/zip/zip_3.0-11.debian.tar.xz" - mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/z/zip/zip_3.0-11.debian.tar.xz" - sha256 "c5c0714a88592f9e02146bfe4a8d26cd9bd97e8d33b1efc8b37784997caa40ed" - apply %w[ - patches/01-typo-it-is-transferring-not-transfering - patches/02-typo-it-is-privileges-not-priviliges - patches/03-manpages-in-section-1-not-in-section-1l - patches/04-do-not-set-unwanted-cflags - patches/05-typo-it-is-preceding-not-preceeding - patches/06-stack-markings-to-avoid-executable-stack - patches/07-fclose-in-file-not-fclose-x - patches/08-hardening-build-fix-1 - patches/09-hardening-build-fix-2 - patches/10-remove-build-date - ] - end - - def install - system "make", "-f", "unix/Makefile", "CC=#{ENV.cc}", "generic" - system "make", "-f", "unix/Makefile", "BINDIR=#{bin}", "MANDIR=#{man1}", "install" - end - - test do - (testpath/"test1").write "Hello!" - (testpath/"test2").write "Bonjour!" - (testpath/"test3").write "Moien!" - - system "#{bin}/zip", "test.zip", "test1", "test2", "test3" - assert_predicate testpath/"test.zip", :exist? - assert_match "test of test.zip OK", shell_output("#{bin}/zip -T test.zip") - - # test bzip2 support that should be automatically linked in using the bzip2 library in macOS - system "#{bin}/zip", "-Z", "bzip2", "test2.zip", "test1", "test2", "test3" - assert_predicate testpath/"test2.zip", :exist? - assert_match "test of test2.zip OK", shell_output("#{bin}/zip -T test2.zip") - end -end diff --git a/Formula/zita-convolver.rb b/Formula/zita-convolver.rb deleted file mode 100644 index d5ee97db9598c..0000000000000 --- a/Formula/zita-convolver.rb +++ /dev/null @@ -1,34 +0,0 @@ -class ZitaConvolver < Formula - desc "Fast, partitioned convolution engine library" - homepage "https://kokkinizita.linuxaudio.org/linuxaudio/" - url "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-convolver-4.0.0.tar.bz2" - sha256 "e3186f807dd76befbbb1c009f6bb4f83567b5d3c93b49a71b334034d1171a73b" - - bottle do - cellar :any - sha256 "affeedb6852f411c86d7219df7614a1d308e8d46c703cb2dc914188593a79076" => :mojave - sha256 "d65f312660d0ca92081a0d217a696a8e03a64f604f6924cd95b9e7a4956979f6" => :high_sierra - sha256 "39433124f4b7d8fa9b6eb20f40708ba9ded27322049b09178f3a3ef8e5ce5c1e" => :sierra - sha256 "d040044f83b7cd6d2bc2e4d8625a38c08820723744b9a653fc23fc9e3f33e5d2" => :el_capitan - end - - depends_on "fftw" - - def install - cd "libs" do - system "make", "-f", "Makefile-osx", "install", "PREFIX=#{prefix}", "SUFFIX=" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main() { - return zita_convolver_major_version () != ZITA_CONVOLVER_MAJOR_VERSION; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lzita-convolver", "-o", "test" - system "./test" - end -end diff --git a/Formula/zlib.rb b/Formula/zlib.rb deleted file mode 100644 index 9494f8fd227eb..0000000000000 --- a/Formula/zlib.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Zlib < Formula - desc "General-purpose lossless data-compression library" - homepage "https://zlib.net/" - url "https://zlib.net/zlib-1.2.11.tar.gz" - mirror "https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz" - sha256 "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" - - bottle do - cellar :any - sha256 "245a43a59c57f83848e7382974bb80a46eac1d53bcaefb1bdebd1f85107d4169" => :mojave - sha256 "30548658b43cf66979f2756680fbb32d3c19c967e478ceea22d07f536b22bbce" => :high_sierra - sha256 "f822b4dbab4a15b889316b89248c7b4d15d6af9dc460bf209b9425b0accb7fa3" => :sierra - sha256 "3f912f6f1ce6c586128ebde29756c883b89409e652ca7aa9a29a773c2d4d0915" => :el_capitan - sha256 "5b969eb38b90a3e31869586df9d62e59d359212b16c6a270aee690dd67caa491" => :yosemite - end - - keg_only :provided_by_macos - - # https://zlib.net/zlib_how.html - resource "test_artifact" do - url "https://zlib.net/zpipe.c" - version "20051211" - sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - testpath.install resource("test_artifact") - system ENV.cc, "zpipe.c", "-I#{include}", "-L#{lib}", "-lz", "-o", "zpipe" - - touch "foo.txt" - output = "./zpipe < foo.txt > foo.txt.z" - system output - assert_predicate testpath/"foo.txt.z", :exist? - end -end diff --git a/Formula/zlog.rb b/Formula/zlog.rb deleted file mode 100644 index cdc614f81366d..0000000000000 --- a/Formula/zlog.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Zlog < Formula - desc "High-performance C logging library" - homepage "https://github.com/HardySimpson/zlog" - url "https://github.com/HardySimpson/zlog/archive/1.2.12.tar.gz" - sha256 "9c6014a3f74d136c70255539beba11f30e1d3617d07ce7ea917b35f3e52bac20" - - bottle do - cellar :any - sha256 "10b13197cf780ee263ce305b1d48bb005231110601d7d1e4a3c3e4d1e2e38598" => :mojave - sha256 "8c69d89489366fc6fbb92af4f89ed34dd82e44aea0587591998a52dc2d43392b" => :high_sierra - sha256 "88179deeaf4acb8638c155acc887661da3eb191e05b23ecd6c64757ffaedb6d9" => :sierra - sha256 "c18ad86b3c5f8721f18a1090e6d372564a89ac972d1cfaa8a6819c5ecaec25ee" => :el_capitan - end - - def install - system "make" - system "make", "PREFIX=#{prefix}", "install" - end - - test do - (testpath/"zlog.conf").write <<~EOS - [formats] - simple = "%m%n" - [rules] - my_cat.DEBUG >stdout; simple - EOS - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - int rc; - zlog_category_t *c; - - rc = zlog_init("zlog.conf"); - if (rc) { - printf("init failed!"); - return -1; - } - - c = zlog_get_category("my_cat"); - if (!c) { - printf("get cat failed!"); - zlog_fini(); - return -2; - } - - zlog_info(c, "hello, zlog!"); - zlog_fini(); - - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lzlog", "-lpthread", "-o", "test" - system "./test" - end -end diff --git a/Formula/zmap.rb b/Formula/zmap.rb deleted file mode 100644 index c07c255685173..0000000000000 --- a/Formula/zmap.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Zmap < Formula - desc "Network scanner for Internet-wide network studies" - homepage "https://zmap.io" - url "https://github.com/zmap/zmap/archive/v2.1.1.tar.gz" - sha256 "29627520c81101de01b0213434adb218a9f1210bfd3f2dcfdfc1f975dbce6399" - revision 1 - head "https://github.com/zmap/zmap.git" - - bottle do - sha256 "47d8698c87325c5b3c546d42da897fb093b58e5cc872f47bb968008e05da9d70" => :mojave - sha256 "5bf98e6e2fea460c2b456f7017aff0064590994b47058ae5296738445cc37999" => :high_sierra - sha256 "0f02a61d2563ec4359b90eaa3d637d53e2a5aa8bbbfbc78a8ba76780e3f565d1" => :sierra - sha256 "517ccb75b370f3deee62725a9e74b53a7d3949f3ef214a8769983c7eab72f83e" => :el_capitan - end - - deprecated_option "with-mongo-c" => "with-mongo-c-driver" - - depends_on "byacc" => :build - depends_on "cmake" => :build - depends_on "gengetopt" => :build - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on "json-c" - depends_on "libdnet" - depends_on "hiredis" => :optional - depends_on "mongo-c-driver" => :optional - - def install - inreplace ["conf/zmap.conf", "src/zmap.c", "src/zopt.ggo.in"], "/etc", etc - - args = std_cmake_args - args << "-DENABLE_DEVELOPMENT=OFF" - args << "-DRESPECT_INSTALL_PREFIX_CONFIG=ON" - args << "-DWITH_REDIS=ON" if build.with? "hiredis" - args << "-DWITH_MONGO=ON" if build.with? "mongo-c-driver" - - system "cmake", ".", *args - system "make" - system "make", "install" - end - - test do - system "#{sbin}/zmap", "--version" - assert_match /redis-csv/, `#{sbin}/zmap --list-output-modules` if build.with? "hiredis" - assert_match /mongo/, `#{sbin}/zmap --list-output-modules` if build.with? "mongo-c-driver" - end -end diff --git a/Formula/zmqpp.rb b/Formula/zmqpp.rb deleted file mode 100644 index 6a380f69c79ec..0000000000000 --- a/Formula/zmqpp.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Zmqpp < Formula - desc "High-level C++ binding for zeromq" - homepage "https://zeromq.github.io/zmqpp/" - url "https://github.com/zeromq/zmqpp/archive/4.2.0.tar.gz" - sha256 "c1d4587df3562f73849d9e5f8c932ca7dcfc7d8bec31f62d7f35073ef81f4d29" - - bottle do - cellar :any - sha256 "dd783ca2b0f191c1a78c60f2c13489fef5d743c8720ed26d5cda6bd8bea32ce9" => :mojave - sha256 "02c8a7e0124d22e2c9fde2349179d9340e17203ad252ed9fd56fd6c9ea71a24c" => :high_sierra - sha256 "a1843b77cb53950bcf0b29589071025a48d86f0ecb4420280f7fcff7420f1905" => :sierra - sha256 "58f0301f03f30b314cb31dbbbc9a82163930b5b00a7285e3d279f49c0e1a25d1" => :el_capitan - end - - depends_on "doxygen" => :build - depends_on "zeromq" - - needs :cxx11 - - def install - ENV.cxx11 - - system "make" - system "make", "install", "PREFIX=#{prefix}" - - system "doxygen" - (doc/"html").install Dir["docs/html/*.html"] - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - zmqpp::frame frame; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lzmqpp", "-o", "test", "-std=c++11", "-stdlib=libc++", "-lc++" - system "./test" - end -end diff --git a/Formula/znapzend.rb b/Formula/znapzend.rb deleted file mode 100644 index 29e3492788738..0000000000000 --- a/Formula/znapzend.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Znapzend < Formula - desc "ZFS backup with remote capabilities and mbuffer integration" - homepage "https://www.znapzend.org/" - url "https://github.com/oetiker/znapzend/releases/download/v0.19.1/znapzend-0.19.1.tar.gz" - sha256 "93e3ec3c6f5cdf6973f72a6b764c49dc6545f2a0a2e0267a1382d471b930efea" - head "https://github.com/oetiker/znapzend.git" - - bottle do - cellar :any_skip_relocation - sha256 "7962667b10e7f44b35469d4b5ef1a8e4aeaf75310b34e72840edfc283f1aae16" => :mojave - sha256 "7fca9b0f4b129afbc30bee164b1a73911e4da9e48c4943b1d6e7e8e77a1cec17" => :high_sierra - sha256 "f12ede845017559f77147ceab275fcbb128f3bdec7a1ff0cd72d54029349a419" => :sierra - sha256 "d88080d21fd9def227853fc0d08db6bef5a10d0bca74c16c0207f023aabc8d67" => :el_capitan - end - - depends_on "perl" if MacOS.version <= :mavericks - - def install - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - def post_install - (var/"log/znapzend").mkpath - (var/"run/znapzend").mkpath - end - - plist_options :startup => true, :manual => "sudo znapzend --daemonize" - - def plist; <<~EOS - - - - - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:#{HOMEBREW_PREFIX}/bin - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/znapzend - --connectTimeout=120 - --logto=#{var}/log/znapzend/znapzend.log - - RunAtLoad - - StandardErrorPath - #{var}/log/znapzend/znapzend.err.log - StandardOutPath - #{var}/log/znapzend/znapzend.out.log - ThrottleInterval - 30 - WorkingDirectory - #{var}/run/znapzend - - - EOS - end - - test do - fake_zfs = testpath/"zfs" - fake_zfs.write <<~EOS - #!/bin/sh - for word in "$@"; do echo $word; done >> znapzendzetup_said.txt - exit 0 - EOS - chmod 0755, fake_zfs - ENV.prepend_path "PATH", testpath - system "#{bin}/znapzendzetup", "list" - assert_equal <<~EOS, (testpath/"znapzendzetup_said.txt").read - list - -H - -o - name - -t - filesystem,volume - EOS - end -end diff --git a/Formula/znc.rb b/Formula/znc.rb deleted file mode 100644 index f70c21db61dd9..0000000000000 --- a/Formula/znc.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Znc < Formula - desc "Advanced IRC bouncer" - homepage "https://wiki.znc.in/ZNC" - url "https://znc.in/releases/archive/znc-1.7.1.tar.gz" - sha256 "44cfea7158ea05dc2547c7c6bc22371e66c869def90351de0ab90a9c200d39c4" - revision 1 - - bottle do - sha256 "29762087ad3267dd6b7164aad34e6cbe6316efe0d5d858b6bb20405b89f37e05" => :mojave - sha256 "3fbeaad6f7f86d78aee001eb16f1093fa40a88cc9ccd4da4f29a35b06912d1e1" => :high_sierra - sha256 "b3bd651781f249b40cced788e3322a9ae09fd78d31ebd3bbfba073dd35666793" => :sierra - end - - head do - url "https://github.com/znc/znc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "openssl" - depends_on "python" - - needs :cxx11 - - def install - ENV.cxx11 - # These need to be set in CXXFLAGS, because ZNC will embed them in its - # znc-buildmod script; ZNC's configure script won't add the appropriate - # flags itself if they're set in superenv and not in the environment. - ENV.append "CXXFLAGS", "-std=c++11" - ENV.append "CXXFLAGS", "-stdlib=libc++" if ENV.compiler == :clang - - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}", "--enable-python" - system "make", "install" - end - - plist_options :manual => "znc --foreground" - - def plist; <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/znc - --foreground - - StandardErrorPath - #{var}/log/znc.log - StandardOutPath - #{var}/log/znc.log - RunAtLoad - - StartInterval - 300 - - - EOS - end - - test do - mkdir ".znc" - system bin/"znc", "--makepem" - assert_predicate testpath/".znc/znc.pem", :exist? - end -end diff --git a/Formula/zola.rb b/Formula/zola.rb deleted file mode 100644 index f8b2c6caad854..0000000000000 --- a/Formula/zola.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Zola < Formula - desc "Fast static site generator in a single binary with everything built-in" - homepage "https://www.getzola.org/" - url "https://github.com/getzola/zola/archive/v0.5.1.tar.gz" - sha256 "d4fa5e70a8da2d2b544147508e8d44a081f19c7d6c002c32ee9661c7873d3c7c" - - bottle do - cellar :any_skip_relocation - sha256 "2caa9813654f96fa12a85ef94723fb917480e9492a9ff113401591c5b9496fbf" => :mojave - sha256 "e8e72ad23f0e0be1d2e6834681451e244147b36bb5f98daf80365e6ecb5c7be2" => :high_sierra - sha256 "c46e18dc9827db9339eaf74f49d140d6ec165761ff4158a1579dbe943e32fbad" => :sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - - def install - system "cargo", "install", "--root", prefix, "--path", "." - - bash_completion.install "completions/zola.bash" - zsh_completion.install "completions/_zola" - fish_completion.install "completions/zola.fish" - end - - test do - system "yes '' | #{bin}/zola init mysite" - (testpath/"mysite/content/blog/index.md").write <<~EOS - +++ - +++ - - Hi I'm Homebrew. - EOS - (testpath/"mysite/templates/page.html").write <<~EOS - {{ page.content | safe }} - EOS - - cd testpath/"mysite" do - system bin/"zola", "build" - end - - assert_equal "

    Hi I'm Homebrew.

    ", - (testpath/"mysite/public/blog/index.html").read.strip - end -end diff --git a/Formula/zookeeper.rb b/Formula/zookeeper.rb deleted file mode 100644 index 71b2be3e6423c..0000000000000 --- a/Formula/zookeeper.rb +++ /dev/null @@ -1,137 +0,0 @@ -class Zookeeper < Formula - desc "Centralized server for distributed coordination of services" - homepage "https://zookeeper.apache.org/" - url "https://www.apache.org/dyn/closer.cgi?path=zookeeper/zookeeper-3.4.13/zookeeper-3.4.13.tar.gz" - sha256 "7ced798e41d2027784b8fd55c908605ad5bd94a742d5dab2506be8f94770594d" - - bottle do - cellar :any - sha256 "d1e4e7738cd147dceb3d91b32480c20ac5da27d129905f336ba51c0c01b8a476" => :mojave - sha256 "806ec4f5c3c63387ffa3d1934764b3ebedcacdeffaa26661ae203c71be7d707b" => :high_sierra - sha256 "ea14de526563c5a1d5edd84c40383c75bef5dcf135b80dbc54af14f8b70cc68f" => :sierra - end - - head do - url "https://svn.apache.org/repos/asf/zookeeper/trunk" - - depends_on "ant" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cppunit" => :build - depends_on "libtool" => :build - end - - def shim_script(target) - <<~EOS - #!/usr/bin/env bash - . "#{etc}/zookeeper/defaults" - cd "#{libexec}/bin" - ./#{target} "$@" - EOS - end - - def default_zk_env - <<~EOS - [ -z "$ZOOCFGDIR" ] && export ZOOCFGDIR="#{etc}/zookeeper" - EOS - end - - def default_log4j_properties - <<~EOS - log4j.rootCategory=WARN, zklog - log4j.appender.zklog = org.apache.log4j.RollingFileAppender - log4j.appender.zklog.File = #{var}/log/zookeeper/zookeeper.log - log4j.appender.zklog.Append = true - log4j.appender.zklog.layout = org.apache.log4j.PatternLayout - log4j.appender.zklog.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n - EOS - end - - def install - ENV["ARCHFLAGS"] = Hardware::CPU.universal_archs.as_arch_flags - - if build.head? - system "ant", "compile_jute" - system "autoreconf", "-fvi", "src/c" - end - - cd "src/c" do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-cppunit" - system "make", "install" - end - - rm_f Dir["bin/*.cmd"] - - if build.head? - system "ant" - libexec.install "bin", "src/contrib", "src/java/lib" - libexec.install Dir["build/*.jar"] - else - libexec.install "bin", "contrib", "lib" - libexec.install Dir["*.jar"] - end - - bin.mkpath - (etc/"zookeeper").mkpath - (var/"log/zookeeper").mkpath - (var/"run/zookeeper/data").mkpath - - Pathname.glob("#{libexec}/bin/*.sh") do |path| - next if path == libexec+"bin/zkEnv.sh" - script_name = path.basename - bin_name = path.basename ".sh" - (bin+bin_name).write shim_script(script_name) - end - - defaults = etc/"zookeeper/defaults" - defaults.write(default_zk_env) unless defaults.exist? - - log4j_properties = etc/"zookeeper/log4j.properties" - log4j_properties.write(default_log4j_properties) unless log4j_properties.exist? - - inreplace "conf/zoo_sample.cfg", - /^dataDir=.*/, "dataDir=#{var}/run/zookeeper/data" - cp "conf/zoo_sample.cfg", "conf/zoo.cfg" - (etc/"zookeeper").install ["conf/zoo.cfg", "conf/zoo_sample.cfg"] - end - - plist_options :manual => "zkServer start" - - def plist; <<~EOS - - - - - EnvironmentVariables - - SERVER_JVMFLAGS - -Dapple.awt.UIElement=true - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/zkServer - start-foreground - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - output = shell_output("#{bin}/zkServer -h 2>&1") - assert_match "Using config: #{etc}/zookeeper/zoo.cfg", output - end -end diff --git a/Formula/zopfli.rb b/Formula/zopfli.rb deleted file mode 100644 index c34447c370f8a..0000000000000 --- a/Formula/zopfli.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Zopfli < Formula - desc "New zlib (gzip, deflate) compatible compressor" - homepage "https://github.com/google/zopfli" - url "https://github.com/google/zopfli/archive/zopfli-1.0.2.tar.gz" - sha256 "4a570307c37172d894ec4ef93b6e8e3aacc401e78cbcc51cf85b212dbc379a55" - head "https://github.com/google/zopfli.git" - - bottle do - cellar :any_skip_relocation - sha256 "fa3b428d9f9988230d141736882274a87e559c546e5d8b51ba00ce2f0cc23949" => :mojave - sha256 "7e7fdea7ca5ebb6f9c4208e0d75c015d6d0ae3c715f44c3c1f326c1edb3593ff" => :high_sierra - sha256 "a1256c4c3d2fc456ef2dff647c24dfeadf89fc99775eec17811974d633146ce9" => :sierra - sha256 "13d19096f3489aa512003b175e3568be65b0a855ddd4cffa624e6a76290f3715" => :el_capitan - end - - def install - system "make", "zopfli", "zopflipng" - bin.install "zopfli", "zopflipng" - end - - test do - system "#{bin}/zopfli" - system "#{bin}/zopflipng", test_fixtures("test.png"), "#{testpath}/out.png" - assert_predicate testpath/"out.png", :exist? - end -end diff --git a/Formula/zorba.rb b/Formula/zorba.rb deleted file mode 100644 index fc1fe70f8c9b1..0000000000000 --- a/Formula/zorba.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Zorba < Formula - desc "NoSQL query processor" - homepage "http://www.zorba.io/" - url "https://github.com/28msec/zorba/archive/3.1.tar.gz" - sha256 "05eed935c0ff3626934a5a70724a42410fd93bc96aba1fa4821736210c7f1dd8" - revision 9 - - bottle do - sha256 "cb24e884cb56af293bf9b10e7280aff091e72540d6d67d610674bcd0c5dfcdd9" => :mojave - sha256 "35316a8148a7c4b89be1b2acbfc891541cdd994d535764db5ad88b858b99f8b0" => :high_sierra - sha256 "167fd942d96909452d63be186c76b0f2c9b8d575b9afcb896b6d7ba15c4af798" => :sierra - end - - depends_on "cmake" => :build - depends_on "flex" - depends_on "icu4c" - depends_on :macos => :mavericks - depends_on "xerces-c" - - conflicts_with "xqilla", :because => "Both supply xqc.h" - - needs :cxx11 - - def install - # icu4c 61.1 compatability - ENV.append "CXXFLAGS", "-DU_USING_ICU_NAMESPACE=1" - - ENV.cxx11 - - args = std_cmake_args - - # dyld: lazy symbol binding failed: Symbol not found: _clock_gettime - # usual superenv fix doesn't work since zorba doesn't use HAVE_CLOCK_GETTIME - if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" - args << "-DZORBA_HAVE_CLOCKGETTIME=OFF" - end - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - assert_equal shell_output("#{bin}/zorba -q 1+1").strip, - "\n2" - end -end diff --git a/Formula/zork.rb b/Formula/zork.rb deleted file mode 100644 index dca9a3694ec36..0000000000000 --- a/Formula/zork.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Zork < Formula - desc "The Dungeon modified from FORTRAN to C" - homepage "https://github.com/devshane/zork" - url "https://github.com/devshane/zork/archive/v1.0.2.tar.gz" - sha256 "169e1848b1e3c503591c23ad4e66ce45e1d5ae617831634e1da9c8fca659e283" - head "https://github.com/devshane/zork.git" - - bottle do - sha256 "0290ba47e707b2812ae354672fd59409acd354fe00b445c424e07c2f3ae8133c" => :mojave - sha256 "13e9074fc59bcaeb1dbb5fdeb536da90cd33ef23889109fe20e79429ead56444" => :high_sierra - sha256 "d2fe9ee55de4906a3a99d30070d81f73637f3972a6e0c44eb7ab2461c024c684" => :sierra - sha256 "8dc6fd49cf72dfa69f677eb1cfd7850f781271c35e4adbacdac00bf918ce6fec" => :el_capitan - sha256 "cb1076cd985679e6d9d093f4887c95bc7f0eb046c2799ec5000611703f428d47" => :yosemite - end - - def install - system "make", "DATADIR=#{share}", "BINDIR=#{bin}" - system "make", "install", "DATADIR=#{share}", "BINDIR=#{bin}", "MANDIR=#{man}" - end - - test do - test_phrase = <<~EOS.chomp - Welcome to Dungeon.\t\t\tThis version created 11-MAR-91. - You are in an open field west of a big white house with a boarded - front door. - There is a small mailbox here. - >Opening the mailbox reveals: - A leaflet. - > - EOS - assert_equal test_phrase, pipe_output("#{bin}/zork", "open mailbox", 0) - end -end diff --git a/Formula/zpaq.rb b/Formula/zpaq.rb deleted file mode 100644 index 69d1bcfe53fe1..0000000000000 --- a/Formula/zpaq.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Zpaq < Formula - desc "Incremental, journaling command-line archiver" - homepage "http://mattmahoney.net/dc/zpaq.html" - url "http://mattmahoney.net/dc/zpaq715.zip" - version "7.15" - sha256 "e85ec2529eb0ba22ceaeabd461e55357ef099b80f61c14f377b429ea3d49d418" - head "https://github.com/zpaq/zpaq.git" - - bottle do - cellar :any_skip_relocation - sha256 "bf0cfe4bbed251ea8a8503e310df77fe38d7da0180394e1e0deb313841ba48d2" => :mojave - sha256 "d6f9b354e10afef1ac343485074ec8c3a1379163aa1c57ed91813832b23572ef" => :high_sierra - sha256 "63f132c8cbff5b22daddc07289837ad710c4af7785fa36351a498cc99e77c6ec" => :sierra - sha256 "beafa9e6d0ba28368a77d9ddcbaf3b04a3f02716f08eb4b2a345745c45fcf9d2" => :el_capitan - sha256 "de09d5f93f86f77372ea01b40f23481bc3e6cd33b9b2ac67736c85167a760dbb" => :yosemite - end - - resource "test" do - url "http://mattmahoney.net/dc/calgarytest2.zpaq" - sha256 "b110688939477bbe62263faff1ce488872c68c0352aa8e55779346f1bd1ed07e" - end - - def install - system "make" - system "make", "check" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - testpath.install resource("test") - assert_match "all OK", shell_output("#{bin}/zpaq x calgarytest2.zpaq 2>&1") - end -end diff --git a/Formula/zplug.rb b/Formula/zplug.rb deleted file mode 100644 index 3cd20b75fa9e3..0000000000000 --- a/Formula/zplug.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Zplug < Formula - desc "The next-generation plugin manager for zsh" - homepage "https://zplug.sh/" - url "https://github.com/zplug/zplug/archive/2.4.2.tar.gz" - sha256 "82a51e8c388844acbfb64196623bede07eee2384f1fc30966eac880373aa9030" - head "https://github.com/zplug/zplug.git" - - bottle :unneeded - - depends_on "zsh" => :optional - - def install - bin.install Dir["bin/*"] - man1.install "doc/man/man1/zplug.1" - prefix.install Dir["*"] - touch prefix/"packages.zsh" - end - - def caveats; <<~EOS - In order to use zplug, please add the following to your .zshrc: - export ZPLUG_HOME=#{opt_prefix} - source $ZPLUG_HOME/init.zsh - EOS - end - - test do - ENV["ZPLUG_HOME"] = opt_prefix - system "zsh", "-c", "source #{opt_prefix}/init.zsh && (( $+functions[zplug] ))" - end -end diff --git a/Formula/zpython.rb b/Formula/zpython.rb deleted file mode 100644 index aa27b198dfd45..0000000000000 --- a/Formula/zpython.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Zpython < Formula - desc "Embeds a Python interpreter into zsh" - homepage "https://bitbucket.org/ZyX_I/zsh" - revision 1 - head "https://bitbucket.org/ZyX_I/zsh.git", :branch => "zpython" - - stable do - url "https://downloads.sourceforge.net/project/zsh/zsh/5.0.5/zsh-5.0.5.tar.bz2" - mirror "https://www.zsh.org/pub/old/zsh-5.0.5.tar.bz2" - - # We prepend `00-` for the first version of the zpython module, which is - # itself a patch on top of zsh and does not have own version number yet. - # Hoping that upstream will provide tags that we could download properly. - # Starting here with `00-`, so that once we get tags for the upstream - # repository at https://bitbucket.org/ZyX_I/zsh.git, brew outdated will - # be able to tell us to upgrade zpython. - version "00-5.0.5" - sha256 "6624d2fb6c8fa4e044d2b009f86ed1617fe8583c83acfceba7ec82826cfa8eaf" - - # Note, non-head version is completly implemented in this lengthy patch - # later on, we hope to use https://bitbucket.org/ZyX_I/zsh.git to download a tagged release. - patch do - url "https://gist.githubusercontent.com/felixbuenemann/5790777/raw/cb5ea3b34617174e50fd3972792ec0944959de3c/zpython.patch" - sha256 "73d6565536abe269cc7715e5200ba63000b7fb830c8975db7e5e6db2222e8f09" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "d7416844f4492de9a7301415e7cbaeadd12174a12adbdbc95d79cd078713636a" => :mojave - sha256 "383da8000738fdc3384760da9387755a39cab9a3949b728236b494e0c7b5edd4" => :high_sierra - sha256 "10c9bc1a96a21649687772eb3a1da85155e7d61918c6ba14bca3e838f86c716c" => :sierra - sha256 "6763da884b7a5bc7e8fa01e5888fa07be6fa7a1ecb1d271e6045c8445e91c8db" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "zsh" - - def install - args = %w[ - --disable-gdbm - --enable-zpython - --with-tcsetpgrp - DL_EXT=bundle - ] - - system "autoreconf" - system "./configure", *args - - # Disable building docs due to exotic yodl dependency - inreplace "Makefile", "subdir in Src Doc;", "subdir in Src;" - - system "make" - (lib/"zpython/zsh").install "Src/Modules/zpython.bundle" - end - - def caveats; <<~EOS - To use the zpython module in zsh you need to - add the following line to your .zshrc: - - module_path=($module_path #{HOMEBREW_PREFIX}/lib/zpython) - - If you want to use this with powerline, make sure you set - it early in .zshrc, before your prompt gets initialized. - - After reloading your shell you can test with: - zmodload zsh/zpython && zpython 'print "hello world"' - EOS - end - - test do - system "zsh -c 'MODULE_PATH=#{HOMEBREW_PREFIX}/lib/zpython zmodload zsh/zpython && zpython print'" - end -end diff --git a/Formula/zsdx.rb b/Formula/zsdx.rb deleted file mode 100644 index a100b0bd168ec..0000000000000 --- a/Formula/zsdx.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Zsdx < Formula - desc "Zelda Mystery of Solarus DX" - homepage "http://www.solarus-games.org/games/zelda-mystery-of-solarus-dx/" - url "https://github.com/christopho/zsdx/archive/zsdx-1.11.0.tar.gz" - sha256 "05a5d220bbf2439c9da2e71cd9d104240878123fff5bc702e2405d6d0712f0dc" - head "https://github.com/christopho/zsdx.git" - - bottle do - cellar :any_skip_relocation - sha256 "171880db143d1dd276088e7842503cb2eaa3573b696e77a72a20a5f3863ef9fa" => :mojave - sha256 "0460af05acc1c8beeceb5a6058ac0ad2cb27f423d43a87fb45aaf5b737c49f7b" => :high_sierra - sha256 "2787c78e1b24669a1befa354724f77b6a86abf2aade492fe211c296482855cf8" => :sierra - sha256 "2a1132ca3dc96d98332d99e1a37b1d2f46206fdad88066f96fedcfbf796452b3" => :el_capitan - sha256 "c9fd0e90a1cf311d30a3e5b961e15a2e8a5a2400b1d985fc4f8c4591cca051d4" => :yosemite - end - - depends_on "cmake" => :build - depends_on "solarus" - - def install - system "cmake", ".", *std_cmake_args, "-DSOLARUS_INSTALL_DATADIR=#{share}" - system "make", "install" - end - - test do - system Formula["solarus"].bin/"solarus-run", "-help" - system "/usr/bin/unzip", pkgshare/"data.solarus" - end -end diff --git a/Formula/zsh-autosuggestions.rb b/Formula/zsh-autosuggestions.rb deleted file mode 100644 index cf310152299fb..0000000000000 --- a/Formula/zsh-autosuggestions.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ZshAutosuggestions < Formula - desc "Fish-like fast/unobtrusive autosuggestions for zsh" - homepage "https://github.com/zsh-users/zsh-autosuggestions" - url "https://github.com/zsh-users/zsh-autosuggestions/archive/v0.5.0.tar.gz" - sha256 "3067774d3129fa3220f7010d79ee735d1bbea0a07b6bf32c5b38dd37188538d9" - - bottle :unneeded - - def install - pkgshare.install "zsh-autosuggestions.zsh" - end - - def caveats - <<~EOS - To activate the autosuggestions, add the following at the end of your .zshrc: - - source #{HOMEBREW_PREFIX}/share/zsh-autosuggestions/zsh-autosuggestions.zsh - - You will also need to force reload of your .zshrc: - - source ~/.zshrc - EOS - end - - test do - assert_match "history", - shell_output("zsh -c '. #{pkgshare}/zsh-autosuggestions.zsh && echo $ZSH_AUTOSUGGEST_STRATEGY'") - end -end diff --git a/Formula/zsh-completions.rb b/Formula/zsh-completions.rb deleted file mode 100644 index 3e5f94dee2773..0000000000000 --- a/Formula/zsh-completions.rb +++ /dev/null @@ -1,39 +0,0 @@ -class ZshCompletions < Formula - desc "Additional completion definitions for zsh" - homepage "https://github.com/zsh-users/zsh-completions" - url "https://github.com/zsh-users/zsh-completions/archive/0.30.0.tar.gz" - sha256 "981c386fa01f9bcb0c8a66b0db16af794ab10169d12e2242f83715967b737621" - head "https://github.com/zsh-users/zsh-completions.git" - - bottle :unneeded - - def install - pkgshare.install Dir["src/_*"] - end - - def caveats - <<~EOS - To activate these completions, add the following to your .zshrc: - - fpath=(#{HOMEBREW_PREFIX}/share/zsh-completions $fpath) - - You may also need to force rebuild `zcompdump`: - - rm -f ~/.zcompdump; compinit - - Additionally, if you receive "zsh compinit: insecure directories" warnings when attempting - to load these completions, you may need to run this: - - chmod go-w '#{HOMEBREW_PREFIX}/share' - EOS - end - - test do - (testpath/"test.zsh").write <<~EOS - fpath=(#{pkgshare} $fpath) - autoload _ack - which _ack - EOS - assert_match /^_ack/, shell_output("/bin/zsh test.zsh") - end -end diff --git a/Formula/zsh-git-prompt.rb b/Formula/zsh-git-prompt.rb deleted file mode 100644 index 17fd88d4126d3..0000000000000 --- a/Formula/zsh-git-prompt.rb +++ /dev/null @@ -1,24 +0,0 @@ -class ZshGitPrompt < Formula - desc "Informative git prompt for zsh" - homepage "https://github.com/olivierverdier/zsh-git-prompt" - url "https://github.com/olivierverdier/zsh-git-prompt/archive/v0.5.tar.gz" - sha256 "87e5a908369f402e975426ffd61a8800f1c04c0a293f1d4015a6fb1f4408e77d" - - bottle :unneeded - - def install - prefix.install Dir["*.{sh,py}"] - end - - def caveats; <<~EOS - Make sure zsh-git-prompt is loaded from your .zshrc: - source "#{opt_prefix}/zshrc.sh" - EOS - end - - test do - system "git", "init" - zsh_command = ". #{opt_prefix}/zshrc.sh && git_super_status" - assert_match "master", shell_output("zsh -c '#{zsh_command}'") - end -end diff --git a/Formula/zsh-history-substring-search.rb b/Formula/zsh-history-substring-search.rb deleted file mode 100644 index ac5e12261397f..0000000000000 --- a/Formula/zsh-history-substring-search.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ZshHistorySubstringSearch < Formula - desc "Zsh port of Fish shell's history search" - homepage "https://github.com/zsh-users/zsh-history-substring-search" - url "https://github.com/zsh-users/zsh-history-substring-search/archive/v1.0.1.tar.gz" - sha256 "4de589fe54471f0c3449e74c8297b843ef57ce7d8c19d2cae4171a7d4021d85b" - - bottle :unneeded - - def install - pkgshare.install "zsh-history-substring-search.zsh" - end - - def caveats - <<~EOS - To activate the history search, add the following at the end of your .zshrc: - - source #{HOMEBREW_PREFIX}/share/zsh-history-substring-search/zsh-history-substring-search.zsh - - You will also need to force reload of your .zshrc: - - source ~/.zshrc - EOS - end - - test do - assert_match "i", - shell_output("zsh -c '. #{pkgshare}/zsh-history-substring-search.zsh && echo $HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS'") - end -end diff --git a/Formula/zsh-lovers.rb b/Formula/zsh-lovers.rb deleted file mode 100644 index 533ed61172f0e..0000000000000 --- a/Formula/zsh-lovers.rb +++ /dev/null @@ -1,21 +0,0 @@ -class ZshLovers < Formula - desc "Tips, tricks, and examples for zsh" - homepage "https://grml.org/zsh/#zshlovers" - url "https://deb.grml.org/pool/main/z/zsh-lovers/zsh-lovers_0.9.1_all.deb" - version "0.9.1" - sha256 "011b7931a555c77e98aa9cdd16b3c4670c0e0e3b5355e5fd60188885a6678de8" - - bottle :unneeded - - def install - system "tar", "xf", "zsh-lovers_#{version}_all.deb" - system "tar", "xf", "data.tar.xz" - system "gunzip", *Dir["usr/**/*.gz"] - prefix.install_metafiles "usr/share/doc/zsh-lovers" - prefix.install "usr/share" - end - - test do - system "man", "zsh-lovers" - end -end diff --git a/Formula/zsh-navigation-tools.rb b/Formula/zsh-navigation-tools.rb deleted file mode 100644 index 4bd0c06131b44..0000000000000 --- a/Formula/zsh-navigation-tools.rb +++ /dev/null @@ -1,35 +0,0 @@ -class ZshNavigationTools < Formula - desc "Zsh curses-based tools, e.g. multi-word history searcher" - homepage "https://github.com/psprint/zsh-navigation-tools" - url "https://github.com/psprint/zsh-navigation-tools/archive/v2.2.7.tar.gz" - sha256 "ee832b81ce678a247b998675111c66aa1873d72aa33c2593a65626296ca685fc" - - bottle do - cellar :any_skip_relocation - sha256 "292a200717412253b03f654162da7ce1c0994455c07fdf65fa348189a18217b5" => :mojave - sha256 "5122287e2fb30bde73acb7174e1310ea41ef049d201203bc559edf02555a2e33" => :high_sierra - sha256 "fca68610ba67c19d8516719d03ed5074a5611ba01941dcb135c87d6d561f3cb1" => :sierra - sha256 "fca68610ba67c19d8516719d03ed5074a5611ba01941dcb135c87d6d561f3cb1" => :el_capitan - sha256 "fca68610ba67c19d8516719d03ed5074a5611ba01941dcb135c87d6d561f3cb1" => :yosemite - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - def caveats; <<~EOS - To run zsh-navigation-tools, add the following at the end of your .zshrc: - source #{HOMEBREW_PREFIX}/share/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh - - You will also need to force reload of your .zshrc: - source ~/.zshrc - EOS - end - - test do - # This compiles package's main file - # Zcompile is very capable of detecting syntax errors - cp pkgshare/"n-list", testpath - system "zsh", "-c", "zcompile n-list" - end -end diff --git a/Formula/zsh-syntax-highlighting.rb b/Formula/zsh-syntax-highlighting.rb deleted file mode 100644 index 97a4ce78fe55d..0000000000000 --- a/Formula/zsh-syntax-highlighting.rb +++ /dev/null @@ -1,37 +0,0 @@ -class ZshSyntaxHighlighting < Formula - desc "Fish shell like syntax highlighting for zsh" - homepage "https://github.com/zsh-users/zsh-syntax-highlighting" - url "https://github.com/zsh-users/zsh-syntax-highlighting.git", - :tag => "0.6.0", - :revision => "434af7b11dd33641231f1b48b8432e68eb472e46" - head "https://github.com/zsh-users/zsh-syntax-highlighting.git" - - bottle do - cellar :any_skip_relocation - sha256 "03b91cbda8cbfe4a089ded8cefa4f6e06ad0946851b8fdda7617ab76bb4f5e50" => :mojave - sha256 "97dc3e73da8e3a8cb054a780a28cda23be2bbd33547daa606d71a3c7f1d2821f" => :high_sierra - sha256 "34fff5bf9bcacd1aaf3aad77199fc61a5ca31239236adaef0bab92452b5b4ad3" => :sierra - sha256 "34fff5bf9bcacd1aaf3aad77199fc61a5ca31239236adaef0bab92452b5b4ad3" => :el_capitan - sha256 "34fff5bf9bcacd1aaf3aad77199fc61a5ca31239236adaef0bab92452b5b4ad3" => :yosemite - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - def caveats - <<~EOS - To activate the syntax highlighting, add the following at the end of your .zshrc: - source #{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - - If you receive "highlighters directory not found" error message, - you may need to add the following to your .zshenv: - export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=#{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/highlighters - EOS - end - - test do - assert_match "#{version}\n", - shell_output("zsh -c '. #{pkgshare}/zsh-syntax-highlighting.zsh && echo $ZSH_HIGHLIGHT_VERSION'") - end -end diff --git a/Formula/zsh.rb b/Formula/zsh.rb deleted file mode 100644 index 3f89a1652ddbb..0000000000000 --- a/Formula/zsh.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Zsh < Formula - desc "UNIX shell (command interpreter)" - homepage "https://www.zsh.org/" - url "https://downloads.sourceforge.net/project/zsh/zsh/5.6.2/zsh-5.6.2.tar.xz" - mirror "https://www.zsh.org/pub/zsh-5.6.2.tar.xz" - sha256 "a50bd66c0557e8eca3b8fa24e85d0de533e775d7a22df042da90488623752e9e" - revision 1 - - bottle do - rebuild 1 - sha256 "807b44a6f1c3468cbc853383770384630acb32681ef4a2259f2d4224ec7e280e" => :mojave - sha256 "7c45d08186d58959039441892909a645c36408966f51ed1051b3f00e3fcda8a0" => :high_sierra - sha256 "040db78ee0c3a141f57db8f91c7458f1244c5beb2238a672e792de4304d7a751" => :sierra - end - - head do - url "https://git.code.sf.net/p/zsh/code.git" - depends_on "autoconf" => :build - end - - depends_on "ncurses" - - resource "htmldoc" do - url "https://downloads.sourceforge.net/project/zsh/zsh/5.6.2/zsh-5.6.2-doc.tar.xz" - mirror "https://www.zsh.org/pub/zsh-5.6.2-doc.tar.xz" - sha256 "98973267547cbdd8471b52e3a2bbe415be2c2c473246536ed8914f685e260114" - end - - def install - system "Util/preconfig" if build.head? - - system "./configure", "--prefix=#{prefix}", - "--enable-fndir=#{pkgshare}/functions", - "--enable-scriptdir=#{pkgshare}/scripts", - "--enable-site-fndir=#{HOMEBREW_PREFIX}/share/zsh/site-functions", - "--enable-site-scriptdir=#{HOMEBREW_PREFIX}/share/zsh/site-scripts", - "--enable-runhelpdir=#{pkgshare}/help", - "--enable-cap", - "--enable-maildir-support", - "--enable-multibyte", - "--enable-zsh-secure-free", - "--enable-unicode9", - "--enable-etcdir=/etc", - "--with-tcsetpgrp", - "DL_EXT=bundle" - - # Do not version installation directories. - inreplace ["Makefile", "Src/Makefile"], - "$(libdir)/$(tzsh)/$(VERSION)", "$(libdir)" - - if build.head? - # disable target install.man, because the required yodl comes neither with macOS nor Homebrew - # also disable install.runhelp and install.info because they would also fail or have no effect - system "make", "install.bin", "install.modules", "install.fns" - else - system "make", "install" - system "make", "install.info" - - resource("htmldoc").stage do - (pkgshare/"htmldoc").install Dir["Doc/*.html"] - end - end - end - - test do - assert_equal "homebrew", shell_output("#{bin}/zsh -c 'echo homebrew'").chomp - system bin/"zsh", "-c", "printf -v hello -- '%s'" - end -end diff --git a/Formula/zshdb.rb b/Formula/zshdb.rb deleted file mode 100644 index c58b65173e639..0000000000000 --- a/Formula/zshdb.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Zshdb < Formula - desc "Debugger for zsh" - homepage "https://github.com/rocky/zshdb" - - stable do - url "https://downloads.sourceforge.net/project/bashdb/zshdb/0.92/zshdb-0.92.tar.bz2" - sha256 "faeb75dc12f4eafff195af103fde4fc5aabc258b7ed902b1aad6d4659f3ae744" - - # Fix compilation with zsh >= 5.3 - # Remove in next release - patch do - url "https://github.com/rocky/zshdb/commit/94b389a3.patch?full_index=1" - sha256 "be5d4184dbc51570208fa169d6098e378b513cc699d3e2aa3f2d3bb422216995" - end - end - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "71e90ca151485ad4d11a8b670a2f6abf09b56fdfad6a8e015e80bb8d8e643ba5" => :mojave - sha256 "1cb2482a1e326d2849d1692a871704aafdf2fec05cffd0d22d2193cc1da07caf" => :high_sierra - sha256 "1cb2482a1e326d2849d1692a871704aafdf2fec05cffd0d22d2193cc1da07caf" => :sierra - sha256 "1cb2482a1e326d2849d1692a871704aafdf2fec05cffd0d22d2193cc1da07caf" => :el_capitan - end - - head do - url "https://github.com/rocky/zshdb.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "zsh" - - def install - system "./autogen.sh" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-zsh=#{HOMEBREW_PREFIX}/bin/zsh" - system "make", "install" - end - - test do - require "open3" - Open3.popen3("#{bin}/zshdb -c 'echo test'") do |stdin, stdout, _| - stdin.write "exit\n" - assert_match(/That's all, folks/, stdout.read) - end - end -end diff --git a/Formula/zssh.rb b/Formula/zssh.rb deleted file mode 100644 index bb4332aca0b86..0000000000000 --- a/Formula/zssh.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Zssh < Formula - desc "Interactive file transfers over SSH" - homepage "https://zssh.sourceforge.io/" - url "https://downloads.sourceforge.net/project/zssh/zssh/1.5/zssh-1.5c.tgz" - sha256 "a2e840f82590690d27ea1ea1141af509ee34681fede897e58ae8d354701ce71b" - - bottle do - cellar :any_skip_relocation - sha256 "0b1567c1d4aef681ff463f058a884eead039fb0c50a1c03820a03c9f67786b52" => :mojave - sha256 "9cb26f1bd359977406fae945abd311b2cdc5770570e6350f2ac278bfbe458f5b" => :high_sierra - sha256 "49e01bb86097999f21f3d96b0f9cd63a975d4fd52f6e286d42ceee16ee996eb7" => :sierra - sha256 "04212f19c1d9a6b97fd56ffe937606f1779849fdf04b93e3f285889599845c8f" => :el_capitan - sha256 "94280569f9e1c1deb9d8c3be4256cd501399fd51758f8e2ea6d77fd9f1b6ef2e" => :yosemite - sha256 "94b16bb29616a839134527fd869ac40a8fb5fa88b0048d1a93a828e306c2a270" => :mavericks - sha256 "e81d8a0d4c8107898aff0cda9abbf4a2caaf098f16c37bd92aa168943c7e6554" => :mountain_lion - end - - depends_on "lrzsz" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - - bin.install "zssh", "ztelnet" - man1.install "zssh.1", "ztelnet.1" - end -end diff --git a/Formula/zstd.rb b/Formula/zstd.rb deleted file mode 100644 index 2417f5a5e93b8..0000000000000 --- a/Formula/zstd.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Zstd < Formula - desc "Zstandard is a real-time compression algorithm" - homepage "https://facebook.github.io/zstd/" - url "https://github.com/facebook/zstd/releases/download/v1.3.8/zstd-1.3.8.tar.gz" - sha256 "293fa004dfacfbe90b42660c474920ff27093e3fb6c99f7b76e6083b21d6d48e" - - bottle do - cellar :any - sha256 "da2c2195b3b37a3a769005ad008e82c9a77813cde7a08ea6bc125c237aaea735" => :mojave - sha256 "b8130708753504c0f4e390021c9b6d6c659a286307b8cc2443029db975fda7d7" => :high_sierra - sha256 "4405983483a8257085a1eac35a08de27f1f71a23e66f65e0047723c0cd776852" => :sierra - end - - depends_on "cmake" => :build - - def install - system "make", "install", "PREFIX=#{prefix}/" - - # Build parallel version - system "make", "-C", "contrib/pzstd", "googletest" - system "make", "-C", "contrib/pzstd", "PREFIX=#{prefix}" - bin.install "contrib/pzstd/pzstd" - end - - test do - assert_equal "hello\n", - pipe_output("#{bin}/zstd | #{bin}/zstd -d", "hello\n", 0) - - assert_equal "hello\n", - pipe_output("#{bin}/pzstd | #{bin}/pzstd -d", "hello\n", 0) - end -end diff --git a/Formula/zsxd.rb b/Formula/zsxd.rb deleted file mode 100644 index e556e956d11fe..0000000000000 --- a/Formula/zsxd.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Zsxd < Formula - desc "Zelda Mystery of Solarus XD" - homepage "http://www.solarus-games.org/games/zelda-mystery-of-solarus-xd/" - url "https://github.com/christopho/zsxd/archive/zsxd-1.11.0.tar.gz" - sha256 "4c6e744ecc5b7e123f5e085ed993e8234cbef8046d2717d16121a2b711e0ccde" - head "https://github.com/christopho/zsxd.git" - - bottle do - cellar :any_skip_relocation - sha256 "f98aa8c723cfddb79aead81d9a4c9ede96d2c7d19ea3dba87d8f2ee069f67877" => :mojave - sha256 "771e8ae2db1b6ab59d0ecaceee0265540a9a9d7f46b0be1fc7017842e743158a" => :high_sierra - sha256 "cf2a0976c81fd8e06116d7728804ce266265447ebede2f80182f9f07071ec2da" => :sierra - sha256 "56bd3750bfa55261fc43cb13144d3b81db7ae6743eb14ab0d2efa0783efb7e26" => :el_capitan - sha256 "03135d1568d306d2c7918c643f4cca1071cf463fb62ce1af28b3fcca8ed5b4cb" => :yosemite - end - - depends_on "cmake" => :build - depends_on "solarus" - - def install - system "cmake", ".", *std_cmake_args, "-DSOLARUS_INSTALL_DATADIR=#{share}" - system "make", "install" - end - - test do - system Formula["solarus"].bin/"solarus-run", "-help" - system "/usr/bin/unzip", pkgshare/"data.solarus" - end -end diff --git a/Formula/zsync.rb b/Formula/zsync.rb deleted file mode 100644 index d1e41f19f85cf..0000000000000 --- a/Formula/zsync.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Zsync < Formula - desc "File transfer program" - homepage "http://zsync.moria.org.uk/" - url "http://zsync.moria.org.uk/download/zsync-0.6.2.tar.bz2" - sha256 "0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2" - - bottle do - cellar :any_skip_relocation - sha256 "9fa9f958c45a87c1a4e9b2ccdc95e732bb8ab248843ec3f0554e5b412d7f1ae5" => :mojave - sha256 "b766bfc58f753376213e234d8e0e4238af1be39f77f239370583464040758fd6" => :high_sierra - sha256 "8d6e7eade289c62689e752151021e7bccac7900a5e7217e8885f2c38aec42c2c" => :sierra - sha256 "9bbe0e102ca6a2b7ca57af6b2b29984f7da59ce97d15ce550bbbb206f1ad1815" => :el_capitan - sha256 "b7436466e25e1fe44e2169059d613d9df279a69c31183f6cacce953fc6a47e8b" => :yosemite - sha256 "c44baf1fc7c83e88bb255307121de1546a0b89d43048e6c0f951648a649bc5fd" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - touch "#{testpath}/foo" - system "#{bin}/zsyncmake", "foo" - sha1 = "da39a3ee5e6b4b0d3255bfef95601890afd80709" - File.read("#{testpath}/foo.zsync") =~ /^SHA-1: #{sha1}$/ - end -end diff --git a/Formula/zurl.rb b/Formula/zurl.rb deleted file mode 100644 index b5594724a1be9..0000000000000 --- a/Formula/zurl.rb +++ /dev/null @@ -1,103 +0,0 @@ -class Zurl < Formula - desc "HTTP and WebSocket client worker with ZeroMQ interface" - homepage "https://github.com/fanout/zurl" - url "https://dl.bintray.com/fanout/source/zurl-1.10.0.tar.bz2" - sha256 "027636eb2cf9caaf7dda39031c80bc27dd3d0111990c20eedc355baa52579f4a" - - bottle do - cellar :any - sha256 "9d166e584afba1bcea0e325b284e32b6bc6ee2dc7112a260889c4e4fb80a377c" => :mojave - sha256 "b42c1e5f401a4a4053eacf6e3e4be5100ff6dc62ff5f691b42521a7664b710a6" => :high_sierra - sha256 "2a293ffcf5ec10aef9b35cbb32994d059698cd1e4f1c53ba07374a5ffc0eb6f5" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "python@2" => :test - depends_on "curl" if MacOS.version < :lion - depends_on "qt" - depends_on "zeromq" - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/1e/f9/d0675409c11d11e549e3da000901cfaabd848da117390ee00030e14bfdb6/pyzmq-16.0.3.tar.gz" - sha256 "8a883824147523c0fe76d247dd58994c1c28ef07f1cc5dde595a4fd1c28f2580" - end - - def install - system "./configure", "--prefix=#{prefix}", "--extraconf=QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - conffile = testpath/"zurl.conf" - ipcfile = testpath/"zurl-req" - runfile = testpath/"test.py" - - resource("pyzmq").stage { system "python", *Language::Python.setup_install_args(testpath/"vendor") } - - conffile.write(<<~EOS - [General] - in_req_spec=ipc://#{ipcfile} - defpolicy=allow - timeout=10 - EOS - ) - - runfile.write(<<~EOS - import json - import threading - from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer - import zmq - class TestHandler(BaseHTTPRequestHandler): - def do_GET(self): - self.send_response(200) - self.end_headers() - self.wfile.write('test response\\n') - port = None - def server_worker(c): - global port - server = HTTPServer(('', 0), TestHandler) - port = server.server_address[1] - c.acquire() - c.notify() - c.release() - try: - server.serve_forever() - except: - server.server_close() - c = threading.Condition() - c.acquire() - server_thread = threading.Thread(target=server_worker, args=(c,)) - server_thread.daemon = True - server_thread.start() - c.wait() - c.release() - ctx = zmq.Context() - sock = ctx.socket(zmq.REQ) - sock.connect('ipc://#{ipcfile}') - req = {'id': '1', 'method': 'GET', 'uri': 'http://localhost:%d/test' % port} - sock.send('J' + json.dumps(req)) - poller = zmq.Poller() - poller.register(sock, zmq.POLLIN) - socks = dict(poller.poll(15000)) - assert(socks.get(sock) == zmq.POLLIN) - resp = json.loads(sock.recv()[1:]) - assert('type' not in resp) - assert(resp['body'] == 'test response\\n') - EOS - ) - - pid = fork do - exec "#{bin}/zurl", "--config=#{conffile}" - end - - begin - ENV["PYTHONPATH"] = testpath/"vendor/lib/python2.7/site-packages" - system "python", runfile - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/zxcc.rb b/Formula/zxcc.rb deleted file mode 100644 index 97ecf81007694..0000000000000 --- a/Formula/zxcc.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Zxcc < Formula - desc "CP/M 2/3 emulator for cross-compiling and CP/M tools under UNIX" - homepage "https://www.seasip.info/Unix/Zxcc/" - url "https://www.seasip.info/Unix/Zxcc/zxcc-0.5.7.tar.gz" - sha256 "6095119a31a610de84ff8f049d17421dd912c6fd2df18373e5f0a3bc796eb4bf" - - bottle do - sha256 "3d0cb9741bb9f9ab8f8f6db1452c2c052814b5aa3b37971607e91c5ba40bd9ae" => :mojave - sha256 "0b6a6d166b5b4822b46d8a53b0a2b850619882d9d13080ecdad8b0ae492a5cc0" => :high_sierra - sha256 "79aa0631d52d2d69ae554319db0027ffd59f2baa3d1c35473925f72a5c1965e3" => :sierra - sha256 "11bd1697b8a6b5a3a77ce417d35ad7e1da9e6df18a36ebccfa18a47ce470d3cb" => :el_capitan - sha256 "824c8a2511a55f9fc00b7058247e3e76d9579c14d20f2d17b5e57aaf1388671f" => :yosemite - sha256 "94203911967d0818075168a3734fb1f756e5ba0ecddac30e50dac36319d38f44" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - code = [ - 0x11, 0x0b, 0x01, # 0100 ld de,010bh - 0x0e, 0x09, # 0103 ld c,cwritestr - 0xcd, 0x05, 0x00, # 0105 call bdos - 0xc3, 0x00, 0x00, # 0108 jp warm - 0x48, 0x65, 0x6c, # 010b db "Hel" - 0x6c, 0x6f, 0x24 # 010e db "lo$" - ].pack("c*") - - path = testpath/"hello.com" - path.binwrite code - - assert_equal "Hello", shell_output("#{bin}/zxcc #{path}").strip - end -end diff --git a/Formula/zxing-cpp.rb b/Formula/zxing-cpp.rb deleted file mode 100644 index 840cebdfc7a58..0000000000000 --- a/Formula/zxing-cpp.rb +++ /dev/null @@ -1,62 +0,0 @@ -class ZxingCpp < Formula - desc "C++ port of the ZXing barcode decoder" - homepage "https://github.com/zxing/zxing" - url "https://github.com/zxing/zxing/releases/download/zxing-2.3.0/ZXing-2.3.0.zip" - sha256 "a9b9c7e2cd61c7918dc5f8856c0f91665ab6a109c6cd30ce1795d09bf4baf9c4" - head "https://github.com/glassechidna/zxing-cpp.git" - - bottle do - cellar :any_skip_relocation - sha256 "47ee11475358da3bbb978d1bb8d7962538ce8737053361d6f1c2360e60d3d12b" => :mojave - sha256 "3e97795a3c99d198ed353e23fe34af838c4c564b60c528b66534b4c39c610001" => :high_sierra - sha256 "d7e4ad48851787a6a5d0b13909fc933cc23d3a84b6373537db376d2838ea75b8" => :sierra - sha256 "91fa0ff78f6bb7a12b708ac7d11976386fd74a7e472047697a90d8b9e8c652ee" => :el_capitan - sha256 "e63999fce9edc362a526881e0f40e6cb51d8df0a5f4d22e74f1675c7e344f59e" => :yosemite - end - - depends_on "cmake" => :build - - def install - cd "cpp" if build.stable? - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - - if build.stable? - lib.install "libzxing.a" - bin.install "zxing" - - cd "../core/src/" - Dir.glob "./zxing/**/*.h" do |header| - (include/File.dirname(header)).install header - end - end - - system "make", "install" if build.head? - end - end - - test do - path = testpath/"qr.png" - path.binwrite [ - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x32, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x36, 0x44, 0xb5, 0x1c, 0x00, 0x00, 0x00, - 0x73, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0x74, 0xc5, 0x01, 0x06, 0x04, - 0x40, 0x08, 0x05, 0xd0, 0xe8, 0x00, 0x73, 0x95, 0x08, 0x60, 0xe8, 0xea, - 0x31, 0x00, 0x4b, 0x57, 0x89, 0x00, 0x86, 0xbf, 0x2c, 0xd4, 0x60, 0x1f, - 0x3c, 0xc2, 0x8f, 0xff, 0x3d, 0xc9, 0x82, 0xb8, 0x2f, 0xc8, 0xb1, 0x1a, - 0xf3, 0x0e, 0xd1, 0xb9, 0xd4, 0xbb, 0xad, 0x67, 0x08, 0x5b, 0xf5, 0x49, - 0xaa, 0xc4, 0x3d, 0x00, 0x06, 0xfa, 0x64, 0xf2, 0x4f, 0x8c, 0x23, 0x76, - 0xd6, 0x98, 0xcc, 0x77, 0xf4, 0x60, 0xaf, 0x6b, 0x63, 0x65, 0xb6, 0x1a, - 0x23, 0x97, 0xa3, 0x4f, 0x92, 0x73, 0x57, 0x5f, 0xd8, 0xe2, 0x36, 0x66, - 0x95, 0xc0, 0xb3, 0xe5, 0x9a, 0x4b, 0x5e, 0x1b, 0x43, 0xae, 0x8f, 0x93, - 0x54, 0x22, 0xfa, 0xef, 0x08, 0x84, 0x37, 0x00, 0x26, 0x09, 0xda, 0x71, - 0x35, 0xe5, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, - 0xae, 0x42, 0x60, 0x82 - ].pack("C*") - - assert_equal "Homebrew QR test\n", shell_output("#{bin}/zxing #{path}") - end -end diff --git a/Formula/zyre.rb b/Formula/zyre.rb deleted file mode 100644 index e9c29e1bb2333..0000000000000 --- a/Formula/zyre.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Zyre < Formula - desc "Local Area Clustering for Peer-to-Peer Applications" - homepage "https://github.com/zeromq/zyre" - url "https://github.com/zeromq/zyre/releases/download/v2.0.0/zyre-2.0.0.tar.gz" - sha256 "8735bdf11ad9bcdccd4c4fd05cebfbbaea8511e21376bc7ad22f3cbbc038e263" - - bottle do - cellar :any - sha256 "0bcd7f6da37e2249b2a80b00703064ec2b1332bff9979a40bff84a19c38c1d3f" => :mojave - sha256 "7f9c25da501db588f3268e4f1fe99ec58357b41cd601a61859ebbce2eb875dee" => :high_sierra - sha256 "f8f694368da98cd4781d43b1e4e18db94584ce1f8508b41d492d81194a15db3c" => :sierra - sha256 "1402b11567fa689064366bf9f8fe9527dba8dfe9246e35b02130a344aa879a9b" => :el_capitan - sha256 "1170a594d0eff7a57df26150d92daa37382ca6469d320e84957afb184560f691" => :yosemite - end - - head do - url "https://github.com/zeromq/zyre.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "czmq" - depends_on "zeromq" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "check-verbose" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - uint64_t version = zyre_version (); - assert(version >= 2); - - zyre_test(true); - return 0; - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lzyre", "-o", "test" - system "./test" - end -end diff --git a/Formula/zzuf.rb b/Formula/zzuf.rb deleted file mode 100644 index 6a977ad76d56f..0000000000000 --- a/Formula/zzuf.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Zzuf < Formula - desc "Transparent application input fuzzer" - homepage "http://caca.zoy.org/wiki/zzuf" - url "https://github.com/samhocevar/zzuf/releases/download/v0.15/zzuf-0.15.tar.bz2" - sha256 "04353d94c68391b3945199f100ab47fc5ff7815db1e92581a600d4175e3a6872" - - bottle do - sha256 "43c9049f2ff8d13a585009b43923579c087e0797a8d0258fc891be14f3ce6ce9" => :mojave - sha256 "f13b52915de3bf08ed663b02df0f8b4d8f78d3a623c523a4d5f3c085ae6bafcf" => :high_sierra - sha256 "9f1b2bfb909739bc5dec2e56b520313e30df3384e8a249b575d3664ac6a636be" => :sierra - sha256 "5f0c55658fba6bbf225b6001b5be75c38f7a375322bd4b23944f3c7239dae0c7" => :el_capitan - sha256 "7f260ec41af74aa8b99df4a89f202382c72067e34b4bb3ac0a0e3fb0be6f8ed0" => :yosemite - sha256 "52460ee4dcac540298fa8f0e07225bc01d5592fd4ff558f1cfd129b329e87639" => :mavericks - end - - head do - url "https://github.com/samhocevar/zzuf.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - end - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = pipe_output("#{bin}/zzuf -i -B 4194304 -r 0.271828 -s 314159 -m < /dev/zero").chomp - assert_equal "zzuf[s=314159,r=0.271828]: 549e1200590e9c013e907039fe535f41", output - end -end diff --git a/Formula/zzz.rb b/Formula/zzz.rb deleted file mode 100644 index 0d7c0f5b18fcf..0000000000000 --- a/Formula/zzz.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Zzz < Formula - desc "Command-line tool to put Macs to sleep" - homepage "https://github.com/Orc/Zzz" - url "https://github.com/Orc/Zzz/archive/v1.tar.gz" - sha256 "8c8958b65a74ab1081ce1a950af6d360166828bdb383d71cc8fe37ddb1702576" - head "https://github.com/Orc/Zzz.git" - - bottle :unneeded - - # No test is possible: this has no --help or --version, it just - # sleeps the Mac instantly. - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - assert_predicate bin/"Zzz", :exist? - end -end diff --git a/Patches/LICENSE b/Patches/LICENSE new file mode 100644 index 0000000000000..8a24b04a30b9a --- /dev/null +++ b/Patches/LICENSE @@ -0,0 +1,25 @@ +Copyright 2015-present Homebrew contributors. + +Note not all patches here originate from Homebrew contributors & +this is noted with attribution in commit messages where possible. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Patches/aalib/1.4rc5.patch b/Patches/aalib/1.4rc5.patch new file mode 100644 index 0000000000000..a88d63671a012 --- /dev/null +++ b/Patches/aalib/1.4rc5.patch @@ -0,0 +1,147 @@ +diff --git a/aalib.m4 b/aalib.m4 +index 736ec32..c3faa4a 100644 +--- a/aalib.m4 ++++ b/aalib.m4 +@@ -9,7 +9,7 @@ + dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS + dnl +-AC_DEFUN(AM_PATH_AALIB, ++AC_DEFUN([AM_PATH_AALIB], + [dnl + dnl Get the cflags and libraries from the aalib-config script + dnl +diff --git a/src/aaedit.c b/src/aaedit.c +index 09534d2..2ea52f9 100644 +--- a/src/aaedit.c ++++ b/src/aaedit.c +@@ -1,6 +1,6 @@ + #include + #include +-#include ++#include + #include "aalib.h" + #include "aaint.h" + static void aa_editdisplay(struct aa_edit *e) +diff --git a/src/aafire.c b/src/aafire.c +index 4f36149..a59b5c5 100644 +--- a/src/aafire.c ++++ b/src/aafire.c +@@ -1,4 +1,5 @@ + #include ++#include + #include "aalib.h" + + #define XSIZ aa_imgwidth(context) +diff --git a/src/aainfo.c b/src/aainfo.c +index d3f6d50..e4eb423 100644 +--- a/src/aainfo.c ++++ b/src/aainfo.c +@@ -1,4 +1,4 @@ +- ++#include + #include "aalib.h" + #include "aaint.h" + int main(int argc, char **argv) +diff --git a/src/aakbdreg.c b/src/aakbdreg.c +index def65fe..337a64a 100644 +--- a/src/aakbdreg.c ++++ b/src/aakbdreg.c +@@ -1,4 +1,5 @@ +-#include ++#include ++#include + #include "config.h" + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aalib.c b/src/aalib.c +index 11fecc8..e3063b4 100644 +--- a/src/aalib.c ++++ b/src/aalib.c +@@ -1,6 +1,6 @@ + #include + #include +-#include ++#include + #include "aalib.h" + #include "aaint.h" + +diff --git a/src/aamoureg.c b/src/aamoureg.c +index 0380828..936438d 100644 +--- a/src/aamoureg.c ++++ b/src/aamoureg.c +@@ -1,4 +1,5 @@ +-#include ++#include ++#include + #include "config.h" + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aarec.c b/src/aarec.c +index 70f4ebc..ee43e8a 100644 +--- a/src/aarec.c ++++ b/src/aarec.c +@@ -1,5 +1,5 @@ + #include +-#include ++#include + #include "aalib.h" + #include "aaint.h" + aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL, +diff --git a/src/aaregist.c b/src/aaregist.c +index 54abec0..fcf2505 100644 +--- a/src/aaregist.c ++++ b/src/aaregist.c +@@ -1,4 +1,5 @@ +-#include ++#include ++#include + #include "config.h" + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aasavefont.c b/src/aasavefont.c +index b00e1e6..864ba22 100644 +--- a/src/aasavefont.c ++++ b/src/aasavefont.c +@@ -1,3 +1,4 @@ ++#include + #include "aalib.h" + int main(int argc, char **argv) + { +diff --git a/src/aatest.c b/src/aatest.c +index 9816f5d..89933cf 100644 +--- a/src/aatest.c ++++ b/src/aatest.c +@@ -1,3 +1,5 @@ ++#include ++#include + #include "aalib.h" + int main(int argc, char **argv) + { +diff --git a/src/aax.c b/src/aax.c +index 02797c4..d329564 100644 +--- a/src/aax.c ++++ b/src/aax.c +@@ -1,4 +1,3 @@ +-#include + #include + #include + #include +diff --git a/src/aaxkbd.c b/src/aaxkbd.c +index f16afc6..c331c24 100644 +--- a/src/aaxkbd.c ++++ b/src/aaxkbd.c +@@ -1,4 +1,3 @@ +-#include + #include + #include + #include +diff --git a/src/aaxmouse.c b/src/aaxmouse.c +index 9935b03..7e725ad 100644 +--- a/src/aaxmouse.c ++++ b/src/aaxmouse.c +@@ -1,4 +1,3 @@ +-#include + #include + #include + #include diff --git a/Patches/aamath/0.3.patch b/Patches/aamath/0.3.patch new file mode 100644 index 0000000000000..ec4aa187597fa --- /dev/null +++ b/Patches/aamath/0.3.patch @@ -0,0 +1,62 @@ +diff --git a/expr.cc b/expr.cc +index 7bc0ee3..8f4eaf7 100644 +--- a/expr.cc ++++ b/expr.cc +@@ -1192,7 +1192,7 @@ IntegralOnInterval::render_head() const + + class SumSymbol : public OpSymbol { + public: +- void render(Canvas& c, int r, int c) const; ++ void render(Canvas& canvas, int r, int c) const; + }; + + void +@@ -1208,7 +1208,7 @@ SumSymbol::render(Canvas& canvas, int r, int c) const + + class ProductSymbol : public OpSymbol { + public: +- void render(Canvas& c, int r, int c) const; ++ void render(Canvas& canvas, int r, int c) const; + }; + + void +@@ -1612,7 +1612,7 @@ Matrix::render() const + int cols = num_cols(); + int rows = num_rows(); + +- CanvasPtr ec[cols * rows]; ++ CanvasPtr *ec = new CanvasPtr[cols * rows]; + Size sz[cols * rows]; + + int row_height[rows]; +@@ -1692,6 +1692,8 @@ Matrix::render() const + + canvas->center(); + ++ delete[] ec; ++ + return canvas; + } + +diff --git a/expr.h b/expr.h +index 000ebd4..d233da9 100644 +--- a/expr.h ++++ b/expr.h +@@ -451,7 +451,7 @@ class Integral : public OpOnFunction { + + virtual CanvasPtr render_head() const; + +- void render_symbol(Canvas& c, int r, int c, int h) const; ++ void render_symbol(Canvas& canvas, int r, int c, int h) const; + + virtual CanvasPtr render() const; + }; +@@ -467,7 +467,7 @@ class IntegralOnInterval : public Integral, public OpOverInterval { + + class OpSymbol { + public: +- virtual void render(Canvas& c, int r, int c) const = 0; ++ virtual void render(Canvas& canvas, int r, int c) const = 0; + }; + + class SumOrProduct : public OpOnFunction { diff --git a/Patches/aldo/0.7.7.patch b/Patches/aldo/0.7.7.patch new file mode 100644 index 0000000000000..e8dd89fbb5c10 --- /dev/null +++ b/Patches/aldo/0.7.7.patch @@ -0,0 +1,26 @@ +diff --git a/src/menu.cc b/src/menu.cc +index 483b826..092d604 100644 +--- a/src/menu.cc ++++ b/src/menu.cc +@@ -112,20 +112,17 @@ void Menu::add_item(id_type id, std::string c, Function2 f) + + void Menu::add_item_at(unsigned int pos, id_type id, std::string c, Function1 f) + { +- IT it(&m_its[pos]); +- m_its.insert(it, Item(id,c,f) ); ++ m_its.insert(m_its.begin()+pos, Item(id,c,f) ); + } + + void Menu::add_item_at(unsigned int pos, id_type id, std::string c, Function2 f) + { +- IT it(&m_its[pos]); +- m_its.insert(it, Item(id,c,f) ); ++ m_its.insert(m_its.begin()+pos, Item(id,c,f) ); + } + + void Menu::delete_item_at(unsigned int pos) + { +- IT it(&m_its[pos]); +- m_its.erase(it); ++ m_its.erase(m_its.begin()+pos); + } diff --git a/Patches/alure/unistd.patch b/Patches/alure/unistd.patch new file mode 100644 index 0000000000000..13ea4f3fd3e7a --- /dev/null +++ b/Patches/alure/unistd.patch @@ -0,0 +1,11 @@ +diff -pur a/include/main.h b/include/main.h +--- a/include/main.h 2011-07-29 10:37:48.000000000 +0200 ++++ b/include/main.h 2017-08-25 12:02:22.000000000 +0200 +@@ -36,6 +36,7 @@ + #include + #endif + #include ++#include + + typedef pthread_mutex_t CRITICAL_SECTION; + void EnterCriticalSection(CRITICAL_SECTION *cs); diff --git a/Patches/apophenia/posix-basename.diff b/Patches/apophenia/posix-basename.diff new file mode 100644 index 0000000000000..1bb9f0c7842cf --- /dev/null +++ b/Patches/apophenia/posix-basename.diff @@ -0,0 +1,39 @@ +This patch combines the two commits: + +49923f0017da3ceee1c78d0c79696100204af962 +f9c3f8d1519624810bb75d5940df4c4825564b4a + +These commits do not apply cleanly to the latest release (v1.0), since the +source files were renamed in commit: + +b1237c8f2b4d7fa76727e5db4289bc23aa90c5a1 + +This patch applies the same changes, just in differently named files. + +diff -ur a/apop_conversions.c b/apop_conversions.c +--- a/apop_conversions.c 2015-11-30 12:04:24.000000000 -0500 ++++ b/apop_conversions.c 2023-09-28 16:36:11.000000000 -0400 +@@ -5,6 +5,7 @@ + #include //GSL_NAN + #include + #include ++#include + + /*extend a string. this prevents a minor leak you'd get if you did + asprintf(&q, "%s is a teapot.", q); +@@ -1121,9 +1122,12 @@ + #endif + } + +-char *cut_at_dot(char const *infile){ +- char *out = strdup(basename(infile)); +- for (char *c = out; *c; c++) if (*c=='.') {*c='\0'; return out;} ++static char *cut_at_dot(char const *infile){ ++ char *incopy = strdup(infile); //basename reserves the right to modify its input. ++ char *out = strdup(basename(incopy)); ++ free(incopy); ++ char *dot = strchr(out, '.'); ++ if (dot) *dot='\0'; + return out; + } + diff --git a/Patches/aview/1.3.0rc1.patch b/Patches/aview/1.3.0rc1.patch new file mode 100644 index 0000000000000..a5f62822cdb6b --- /dev/null +++ b/Patches/aview/1.3.0rc1.patch @@ -0,0 +1,25 @@ +diff --git a/image.c b/image.c +index 232b838..9780e61 100644 +--- a/image.c ++++ b/image.c +@@ -1,6 +1,6 @@ + #include + #include +-#include ++#include + #include "config.h" + + int imgwidth, imgheight; +diff --git a/ui.c b/ui.c +index d316f7a..134a4ca 100644 +--- a/ui.c ++++ b/ui.c +@@ -1,6 +1,6 @@ + #include + #include +-#include ++#include + #include + #include + #include "shrink.h" + diff --git a/Patches/bash-completion/bug-740971.patch b/Patches/bash-completion/bug-740971.patch new file mode 100644 index 0000000000000..047e49b3ddb29 --- /dev/null +++ b/Patches/bash-completion/bug-740971.patch @@ -0,0 +1,22 @@ +diff --git a/bash_completion b/bash_completion +index 6601937..5184767 100644 +--- a/bash_completion ++++ b/bash_completion +@@ -640,7 +640,7 @@ + + _quote_readline_by_ref "$cur" quoted + toks=( ${toks[@]-} $( +- compgen -d -- "$quoted" | { ++ compgen -d -- "$cur" | { + while read -r tmp; do + # TODO: I have removed a "[ -n $tmp ] &&" before 'printf ..', + # and everything works again. If this bug suddenly +@@ -1334,7 +1334,7 @@ _known_hosts_real() + + # append any available aliases from config files + if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then +- local hosts=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" ) ++ local hosts=$( sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}[[:blank:]]\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" ) + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -P "$prefix$user" \ + -S "$suffix" -W "$hosts" -- "$cur" ) ) + fi diff --git a/Patches/bedops/2.4.42-debian.patch b/Patches/bedops/2.4.42-debian.patch new file mode 100644 index 0000000000000..56fd85b94da73 --- /dev/null +++ b/Patches/bedops/2.4.42-debian.patch @@ -0,0 +1,215 @@ +Subject: use debian libs +Description: upstream makes use of embedded libs, use debian ones. +Author: Olivier Sallou +Last-Update: 2017-01-13 +Forwarded: no +--- a/system.mk/Makefile.linux ++++ b/system.mk/Makefile.linux +@@ -64,14 +64,14 @@ + + support: $(LIBS) + +-${PARTY3}/jansson/lib/libjansson.a: $(WHICHJANSSON).tar.bz2 +- bzcat $^ | tar -x -C ${PARTY3} +- cd ${PARTY3}/${JANSSONVERSION} && ./configure --prefix=${WDIR}/${PARTY3}/${JANSSONVERSION} && $(MAKE) && $(MAKE) install && cd ${WDIR} && rm -f jansson && ln -sf ${JANSSONVERSION} ${PARTY3}/jansson ++${PARTY3}/jansson/lib/libjansson.a: ++ #bzcat $^ | tar -x -C ${PARTY3} ++ #cd ${PARTY3}/${JANSSONVERSION} && ./configure --prefix=${WDIR}/${PARTY3}/${JANSSONVERSION} && $(MAKE) && $(MAKE) install && cd ${WDIR} && rm -f jansson && ln -sf ${JANSSONVERSION} ${PARTY3}/jansson + +-$(PARTY3)/bzip2/libbz2.a: $(WHICHBZIP2).tar.bz2 +- bzcat $^ | tar -x -C ${PARTY3} +- cd ${PARTY3}/${BZIP2VERSION} && $(MAKE) libbz2.a && cd ${WDIR} && rm -f bzip2 && ln -sf ${BZIP2VERSION} ${PARTY3}/bzip2 ++$(PARTY3)/bzip2/libbz2.a: ++ #bzcat $^ | tar -x -C ${PARTY3} ++ #cd ${PARTY3}/${BZIP2VERSION} && $(MAKE) libbz2.a && cd ${WDIR} && rm -f bzip2 && ln -sf ${BZIP2VERSION} ${PARTY3}/bzip2 + +-${PARTY3}/zlib/libz.a: $(WHICHZLIB).tar.bz2 +- bzcat $^ | tar -x -C ${PARTY3} +- cd ${PARTY3}/${ZLIBVERSION} && ./configure --static && $(MAKE) && cd ${WDIR} && rm -f zlib && ln -sf ${ZLIBVERSION} ${PARTY3}/zlib ++${PARTY3}/zlib/libz.a: ++ #bzcat $^ | tar -x -C ${PARTY3} ++ #cd ${PARTY3}/${ZLIBVERSION} && ./configure --static && $(MAKE) && cd ${WDIR} && rm -f zlib && ln -sf ${ZLIBVERSION} ${PARTY3}/zlib +--- a/applications/bed/conversion/src/Makefile ++++ b/applications/bed/conversion/src/Makefile +@@ -13,7 +13,7 @@ + WRAPPERDIR = wrappers + PROG = convert2bed + SOURCE = convert2bed.c +-SFLAGS = -static ++SFLAGS = + + all: build + +--- a/applications/bed/sort-bed/src/Makefile ++++ b/applications/bed/sort-bed/src/Makefile +@@ -4,7 +4,7 @@ + LIB2 = $(MAIN)/interfaces/src/utility + LIB3 = $(MAIN)/interfaces/src/data/starch + THISDIR = ${shell pwd} +-INCLUDES = -iquote$(HEAD) -I${LOCALJANSSONINCDIR} -I${LOCALBZIP2INCDIR} -I${LOCALZLIBINCDIR} ++INCLUDES = -iquote$(HEAD) + + PARTY3 = ${THISDIR}/$(MAIN)/third-party + LIBJANSSON = libjansson.a +@@ -22,15 +22,15 @@ + LOCALZLIBLIB = ${LOCALZLIBDIR}/${LIBZLIB} + LOCALZLIBINCDIR = ${LOCALZLIBDIR} + +-LIBLOCATION = -L${LOCALJANSSONLIBDIR} -L${LOCALBZIP2LIBDIR} -L${LOCALZLIBDIR} +-LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB} ++LIBLOCATION = ++LIBRARIES = -ljansson -lz -lbz2 + + PROG = sort-bed-${BINARY_TYPE} + BINDIR = ../bin + OBJDIR = objects-${BINARY_TYPE} + WARNINGS = -Wall -Wextra -pedantic + BLDFLAGS = ${WARNINGS} -O3 -std=c++11 ${MEGAFLAGS} +-SFLAGS = -static ++SFLAGS = + + dependency_names = starchConstants starchFileHelpers starchHelpers starchMetadataHelpers unstarchHelpers starchSha1Digest starchBase64Coding SortDetails Sort CheckSort + dependencies = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(dependency_names))) +--- a/applications/bed/starch/src/Makefile ++++ b/applications/bed/starch/src/Makefile +@@ -29,15 +29,15 @@ + LOCALZLIBINCDIR = ${LOCALZLIBDIR} + OBJDIR = ${INTERFACES}/src/data/starch + LOCALOBJDIR = objects${POSTFIX} +-INCLUDES = -iquote${MAIN} -iquote${HEAD} -iquote${PARTY3} -I${LOCALJANSSONINCDIR} -I${LOCALBZIP2INCDIR} -I${LOCALZLIBINCDIR} +-LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB} ++INCLUDES = -iquote${MAIN} -iquote${HEAD} ++LIBRARIES = -ljansson -lz -lbz2 + ARCH_VERSION = v2.2 + BIN_VERSION = v2.4.40 + TEST = ../test + TEST_LINUX_BINDIR = ${TEST}/binaries/linux/${ARCH_VERSION}/bin + TEST_OSX_BINDIR = ${TEST}/binaries/osx/${ARCH_VERSION}/bin + AR = ar +-SFLAGS = -static ++SFLAGS = + STARCH_CXXFLAGS = -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -DUSE_ZLIB -DUSE_BZLIB -O2 -Wformat -Wall -Wextra -Wswitch-enum -std=c++11 ${SFLAGS} -s + STARCH_CXXDFLAGS = -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -DUSE_ZLIB -DUSE_BZLIB -O0 -g -Wformat -Wall -Wextra -Wswitch-enum -std=c++11 -DDEBUG_VERBOSE=1 ${SFLAGS} -DDEBUG=1 + STARCH_CXXGFLAGS = -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -DUSE_ZLIB -DUSE_BZLIB -O -Wformat -Wall -Wextra -Wswitch-enum -std=c++11 -DDEBUG_VERBOSE=1 ${SFLAGS} -DDEBUG=1 -pg +@@ -65,7 +65,7 @@ + starch-diff: $(BINDIR)/starch-diff-$(BINARY_TYPE) + starchstrip: $(BINDIR)/starchstrip-$(BINARY_TYPE) + +-$(BINDIR)/%-$(BINARY_TYPE) : %.c $(LOCALSTARCHLIB) $(LIBRARIES) ++$(BINDIR)/%-$(BINARY_TYPE) : %.c $(LOCALSTARCHLIB) + mkdir -p $(BINDIR) + ${CXX} ${CXXFLAGS} ${STARCH_CXXFLAGS} ${MEGAFLAGS} -c $*.c -o $(LOCALOBJDIR)/$*.o ${INCLUDES} + ${CXX} ${CXXFLAGS} ${STARCH_CXXFLAGS} ${MEGAFLAGS} $(LOCALOBJDIR)/$*.o -o $@ ${LOCALSTARCHLIB} ${LIBRARIES} +@@ -102,7 +102,7 @@ + mkdir -p $(LOCALSTARCHLIBDIR) + ${AR} rcs $@ $^ + +-$(LOCALOBJDIR)/%.o : $(OBJDIR)/%.c $(LIBRARIES) ++$(LOCALOBJDIR)/%.o : $(OBJDIR)/%.c + mkdir -p $(LOCALOBJDIR) + ${CXX} ${CXXFLAGS} ${STARCH_CXXFLAGS} ${MEGAFLAGS} -c $< -o $@ ${INCLUDES} + +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -12,7 +12,6 @@ + # serve to show the default. + + import sys, os +-from better import better_theme_path + + # If extensions (or modules to document with autodoc) are in another directory, + # add these directories to sys.path here. If the directory is relative to the +@@ -96,8 +95,8 @@ + + # The theme to use for HTML and HTML Help pages. See the documentation for + # a list of builtin themes. +-#html_theme = 'default' +-html_theme = 'better' ++html_theme = 'default' ++#html_theme = 'better' + + # Theme options are theme-specific and customize the look and feel of a theme + # further. For a list of options available for each theme, see the +@@ -110,8 +109,8 @@ + } + + # Add any paths that contain custom themes here, relative to this directory. +-#html_theme_path = [] +-html_theme_path = [better_theme_path] ++html_theme_path = [] ++#html_theme_path = [better_theme_path] + + # The name for this set of Sphinx documents. If None, it defaults to + # " v documentation". +--- a/applications/bed/bedops/src/Makefile ++++ b/applications/bed/bedops/src/Makefile +@@ -22,11 +22,11 @@ + LOCALZLIBLIB = ${LOCALZLIBDIR}/${LIBZLIB} + LOCALZLIBINCDIR = ${LOCALZLIBDIR} + OBJDIR = objects_${BINARY_TYPE} +-INCLUDES = -iquote$(HEAD) -I${LOCALJANSSONINCDIR} -I${LOCALBZIP2INCDIR} -I${LOCALZLIBINCDIR} +-LIBLOCATION = -L${LOCALJANSSONLIBDIR} -L${LOCALBZIP2LIBDIR} -L${LOCALZLIBDIR} +-LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB} ++INCLUDES = -iquote$(HEAD) ++LIBLOCATION = ++LIBRARIES = -ljansson -lz -lbz2 + BLDFLAGS = -Wall -pedantic -O3 -std=c++11 +-SFLAGS = -static ++SFLAGS = + + dependency_names = NaN starchConstants starchFileHelpers starchHelpers starchMetadataHelpers unstarchHelpers starchSha1Digest starchBase64Coding + dependencies = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(dependency_names))) +--- a/applications/bed/bedextract/src/Makefile ++++ b/applications/bed/bedextract/src/Makefile +@@ -21,11 +21,11 @@ + LOCALZLIBDIR = ${PARTY3}/zlib + LOCALZLIBLIB = ${LOCALZLIBDIR}/${LIBZLIB} + LOCALZLIBINCDIR = ${LOCALZLIBDIR} +-INCLUDES = -iquote$(HEAD) -I${LOCALJANSSONINCDIR} -I${LOCALBZIP2INCDIR} -I${LOCALZLIBINCDIR} +-LIBLOCATION = -L${LOCALJANSSONLIBDIR} -L${LOCALBZIP2LIBDIR} -L${LOCALZLIBDIR} +-LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB} ++INCLUDES = -iquote$(HEAD) ++LIBLOCATION = ++LIBRARIES = -ljansson -lz -lbz2 + BLDFLAGS = -Wall -pedantic -O3 -std=c++11 +-SFLAGS = -static ${MEGAFLAGS} ++SFLAGS = ${MEGAFLAGS} + + dependency_names = NaN starchConstants starchFileHelpers starchHelpers starchMetadataHelpers unstarchHelpers starchSha1Digest starchBase64Coding + dependencies = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(dependency_names))) +--- a/applications/bed/bedmap/src/Makefile ++++ b/applications/bed/bedmap/src/Makefile +@@ -20,11 +20,11 @@ + LOCALZLIBLIB = ${LOCALZLIBDIR}/${LIBZLIB} + LOCALZLIBINCDIR = ${LOCALZLIBDIR} + OBJDIR = objects_${BINARY_TYPE} +-INCLUDES = -iquote${HEAD} -I${PARTY3} -I${LOCALJANSSONINCDIR} -I${LOCALBZIP2INCDIR} -I${LOCALZLIBINCDIR} +-LIBLOCATION = -L${LOCALJANSSONLIBDIR} -L${LOCALBZIP2LIBDIR} -L${LOCALZLIBDIR} +-LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB} ++INCLUDES = -iquote${HEAD} ++LIBLOCATION = ++LIBRARIES = -ljansson -lz -lbz2 + BLDFLAGS = -Wall -pedantic -O3 -std=c++11 +-SFLAGS = -static ++SFLAGS = + + dependency_names = NaN starchConstants starchFileHelpers starchHelpers starchMetadataHelpers unstarchHelpers starchSha1Digest starchBase64Coding + dependencies = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(dependency_names))) +--- a/applications/bed/closestfeats/src/Makefile ++++ b/applications/bed/closestfeats/src/Makefile +@@ -20,11 +20,11 @@ + LOCALZLIBLIB = ${LOCALZLIBDIR}/${LIBZLIB} + LOCALZLIBINCDIR = ${LOCALZLIBDIR} + OBJDIR = objects_${BINARY_TYPE} +-INCLUDES = -iquote$(HEAD) -I${LOCALJANSSONINCDIR} -I${LOCALBZIP2INCDIR} -I${LOCALZLIBINCDIR} +-LIBLOCATION = -L${LOCALJANSSONLIBDIR} -L${LOCALBZIP2LIBDIR} -L${LOCALZLIBDIR} +-LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB} ++INCLUDES = -iquote$(HEAD) ++LIBLOCATION = ++LIBRARIES = -ljansson -lz -lbz2 + BLDFLAGS = -Wall -pedantic -O3 -std=c++11 +-SFLAGS = -static ++SFLAGS = + + dependency_names = NaN starchConstants starchFileHelpers starchHelpers starchMetadataHelpers unstarchHelpers starchSha1Digest starchBase64Coding + dependencies = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(dependency_names))) diff --git a/Patches/berkeley-db@4/clang.diff b/Patches/berkeley-db@4/clang.diff new file mode 100644 index 0000000000000..adea5255aa9c3 --- /dev/null +++ b/Patches/berkeley-db@4/clang.diff @@ -0,0 +1,141 @@ +diff --git a/dbinc/atomic.h b/dbinc/atomic.h +index 6a858f7..9f338dc 100644 +--- a/dbinc/atomic.h ++++ b/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define atomic_init_db(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __atomic_compare_exchange_db((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __atomic_compare_exchange_db( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was; +@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ atomic_init_db(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) +diff --git a/mp/mp_fget.c b/mp/mp_fget.c +index 16de695..d0dcc29 100644 +--- a/mp/mp_fget.c ++++ b/mp/mp_fget.c +@@ -649,7 +649,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, DB_STR("3025", +@@ -955,7 +955,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c +index 770bad8..e28cce0 100644 +--- a/mp/mp_mvcc.c ++++ b/mp/mp_mvcc.c +@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ atomic_init_db(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/mp/mp_region.c b/mp/mp_region.c +index 4952030..47645f8 100644 +--- a/mp/mp_region.c ++++ b/mp/mp_region.c +@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ atomic_init_db(&htab[i].hash_page_dirty, 0); + } + + /* +@@ -302,7 +302,7 @@ no_prealloc: + } else + hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount); + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ atomic_init_db(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/mutex/mut_method.c b/mutex/mut_method.c +index 09353b0..177353c 100644 +--- a/mutex/mut_method.c ++++ b/mutex/mut_method.c +@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ atomic_init_db(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c +index 106b161..fc4de9d 100644 +--- a/mutex/mut_tas.c ++++ b/mutex/mut_tas.c +@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex) + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); diff --git a/Patches/bitchx/linux.patch b/Patches/bitchx/linux.patch new file mode 100644 index 0000000000000..3595dff2a056f --- /dev/null +++ b/Patches/bitchx/linux.patch @@ -0,0 +1,71 @@ +diff --git a/dll/amp/layer2.c b/dll/amp/layer2.c +index d4c4d95..2b7d412 100644 +--- a/dll/amp/layer2.c ++++ b/dll/amp/layer2.c +@@ -77,7 +77,7 @@ int hsize,fs,mean_frame_size; + nbal=&t_nbal2; + sblimit=8; + break; +- default : /*printf(" bit alloc info no gud ");*/ ++ default : break; + } + break; + case 1 : switch (bitrate) /* 1 = 48 kHz */ +@@ -98,7 +98,7 @@ int hsize,fs,mean_frame_size; + nbal=&t_nbal2; + sblimit=8; + break; +- default : /*printf(" bit alloc info no gud ");*/ ++ default : break; + } + break; + case 2 : switch (bitrate) /* 2 = 32 kHz */ +@@ -122,10 +122,10 @@ int hsize,fs,mean_frame_size; + nbal=&t_nbal3; + sblimit=12; + break; +- default : /*printf("bit alloc info not ok\n");*/ ++ default : break; + } + break; +- default : /*printf("sampling freq. not ok/n");*/ ++ default : break; + } else { + bit_alloc_index=&t_allocMPG2; + nbal=&t_nbalMPG2; +diff --git a/source/commands.c b/source/commands.c +index d140d57..7fd81d6 100644 +--- a/source/commands.c ++++ b/source/commands.c +@@ -118,7 +118,6 @@ extern int doing_notice; + + static void oper_password_received (char *, char *); + +-int no_hook_notify = 0; + int load_depth = -1; + + extern char cx_function[]; +diff --git a/source/modules.c b/source/modules.c +index 52817fc..99d39bb 100644 +--- a/source/modules.c ++++ b/source/modules.c +@@ -77,7 +77,7 @@ extern int BX_read_sockets(); + extern int identd; + extern int doing_notice; + +-int (*serv_open_func) (int, unsigned long, int); ++extern int (*serv_open_func) (int, unsigned long, int); + extern int (*serv_output_func) (int, int, char *, int); + extern int (*serv_input_func) (int, char *, int, int, int); + extern int (*serv_close_func) (int, unsigned long, int); +diff --git a/source/numbers.c b/source/numbers.c +index 741fca9..2f80f22 100644 +--- a/source/numbers.c ++++ b/source/numbers.c +@@ -66,7 +66,6 @@ void show_server_map (void); + int stats_k_grep (char **); + void who_handlekill (char *, char *, char *); + void handle_tracekill (int, char *, char *, char *); +-int no_hook_notify; + extern AJoinList *ajoin_list; + void remove_from_server_list (int); diff --git a/Patches/bloaty/system-abseil.patch b/Patches/bloaty/system-abseil.patch new file mode 100644 index 0000000000000..d755871b664eb --- /dev/null +++ b/Patches/bloaty/system-abseil.patch @@ -0,0 +1,101 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 08965ac..acf6681 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,8 +1,8 @@ +-cmake_minimum_required(VERSION 3.5) ++cmake_minimum_required(VERSION 3.11) + cmake_policy(SET CMP0048 NEW) + project (Bloaty VERSION 1.0) + project (Bloaty VERSION 1.1) +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard used to compile this project") + + # Options we define for users. + option(BLOATY_ENABLE_ASAN "Enable address sanitizer." OFF) +@@ -32,10 +32,17 @@ else(${PROTOBUF_FOUND}) + MESSAGE(STATUS "System protobuf not found, using bundled version") + endif(${PROTOBUF_FOUND}) + else(${PKG_CONFIG_FOUND}) +- MESSAGE(STATUS "pkg-config not found, using bundled dependencies") ++ MESSAGE(STATUS "pkg-config not found, using bundled re2, capstone, protobuf") + endif(${PKG_CONFIG_FOUND}) + endif(UNIX) + ++find_package(absl CONFIG) ++if(${absl_FOUND}) ++ MESSAGE(STATUS "System absl found, using") ++else(${absl_FOUND}) ++ MESSAGE(STATUS "System absl not found, using bundled version") ++endif(${absl_FOUND}) ++ + # Set default build type. + if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") +@@ -89,7 +96,9 @@ endif(UNIX) + + include_directories(.) + include_directories(src) +-include_directories(third_party/abseil-cpp) ++if(NOT absl_FOUND) ++ include_directories(third_party/abseil-cpp) ++endif() + include_directories("${CMAKE_CURRENT_BINARY_DIR}/src") + + # Baseline build flags. +@@ -159,24 +168,6 @@ add_library(libbloaty + src/macho.cc + src/range_map.cc + src/webassembly.cc +- # Until Abseil has a proper CMake build system +- third_party/abseil-cpp/absl/base/internal/raw_logging.cc # Grrrr... +- third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +- third_party/abseil-cpp/absl/numeric/int128.cc +- third_party/abseil-cpp/absl/strings/ascii.cc +- third_party/abseil-cpp/absl/strings/charconv.cc +- third_party/abseil-cpp/absl/strings/escaping.cc +- third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +- third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +- third_party/abseil-cpp/absl/strings/internal/memutil.cc +- third_party/abseil-cpp/absl/strings/internal/utf8.cc +- third_party/abseil-cpp/absl/strings/match.cc +- third_party/abseil-cpp/absl/strings/numbers.cc +- third_party/abseil-cpp/absl/strings/str_cat.cc +- third_party/abseil-cpp/absl/strings/string_view.cc +- third_party/abseil-cpp/absl/strings/str_split.cc +- third_party/abseil-cpp/absl/strings/substitute.cc +- third_party/abseil-cpp/absl/types/bad_optional_access.cc + # One source file, no special build system needed. + third_party/demumble/third_party/libcxxabi/cxa_demangle.cpp + ) +@@ -202,6 +193,30 @@ else(UNIX) + set(LIBBLOATY_LIBS libbloaty libprotoc re2 capstone-static) + endif(UNIX) + ++if(absl_FOUND) ++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} absl::strings absl::optional) ++else(absl_FOUND) ++ target_sources(libbloaty # Until Abseil has a proper CMake build system ++ PRIVATE third_party/abseil-cpp/absl/base/internal/raw_logging.cc # Grrrr... ++ third_party/abseil-cpp/absl/base/internal/throw_delegate.cc ++ third_party/abseil-cpp/absl/numeric/int128.cc ++ third_party/abseil-cpp/absl/strings/ascii.cc ++ third_party/abseil-cpp/absl/strings/charconv.cc ++ third_party/abseil-cpp/absl/strings/escaping.cc ++ third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc ++ third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc ++ third_party/abseil-cpp/absl/strings/internal/memutil.cc ++ third_party/abseil-cpp/absl/strings/internal/utf8.cc ++ third_party/abseil-cpp/absl/strings/match.cc ++ third_party/abseil-cpp/absl/strings/numbers.cc ++ third_party/abseil-cpp/absl/strings/str_cat.cc ++ third_party/abseil-cpp/absl/strings/string_view.cc ++ third_party/abseil-cpp/absl/strings/str_split.cc ++ third_party/abseil-cpp/absl/strings/substitute.cc ++ third_party/abseil-cpp/absl/types/bad_optional_access.cc ++ ) ++endif(absl_FOUND) ++ + if(UNIX) + if(${RE2_FOUND}) + link_directories(${RE2_LIBRARY_DIRS}) diff --git a/Patches/bsdmake/patch-Makefile.diff b/Patches/bsdmake/patch-Makefile.diff new file mode 100644 index 0000000000000..4c2b1714b6d00 --- /dev/null +++ b/Patches/bsdmake/patch-Makefile.diff @@ -0,0 +1,13 @@ +--- Makefile.dist 2012-03-09 23:24:38.000000000 +0100 ++++ Makefile.dist 2012-03-09 23:25:45.000000000 +0100 +@@ -1,7 +1,8 @@ + # $FreeBSD: src/usr.bin/make/Makefile.dist,v 1.4 2005/05/24 13:19:40 harti Exp $ + # a very simple makefile... ++ + pmake: + @echo 'make started.' +- cc -DDEFSHELLNAME=\"sh\" -I. -c *.c +- cc *.o -o pmake ++ ${CC} ${CFLAGS} -DDEFSHELLNAME=\"sh\" -I. -c *.c ++ ${CC} *.o -o pmake + @echo 'make completed.' diff --git a/Patches/bsdmake/patch-mk.diff b/Patches/bsdmake/patch-mk.diff new file mode 100644 index 0000000000000..e4db79801bf1f --- /dev/null +++ b/Patches/bsdmake/patch-mk.diff @@ -0,0 +1,258 @@ +diff -r -u mk/bsd.README mk/bsd.README +--- mk/bsd.README 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.README 2012-03-09 23:50:21.000000000 +0100 +@@ -2,7 +2,7 @@ + # $FreeBSD: src/share/mk/bsd.README,v 1.28 2004/12/21 08:46:54 ru Exp $ + + This is the README file for the "include" files for the FreeBSD +-source tree. The files are installed in /usr/share/mk, and are by ++source tree. The files are installed in @PREFIX@/share/mk, and are by + convention, named with the suffix ".mk". These files store several + build options and should be handled with caution. + +@@ -43,7 +43,7 @@ + This file does not document bsd.port*.mk. They are documented in ports(7). + + See also make(1), mkdep(1), style.Makefile(5) and `PMake - A +-Tutorial', located in /usr/share/doc/psd/12.make. ++Tutorial', located in @PREFIX@/share/doc/bsdmake/tutorial.asc. + + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +diff -r -u mk/bsd.cpu.mk mk/bsd.cpu.mk +--- mk/bsd.cpu.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.cpu.mk 2012-03-09 23:53:55.000000000 +0100 +@@ -21,7 +21,7 @@ + . endif + .else + +-# Handle aliases (not documented in make.conf to avoid user confusion ++# Handle aliases (not documented in bsdmake.conf to avoid user confusion + # between e.g. i586 and pentium) + + . if ${MACHINE_ARCH} == "i386" +@@ -59,7 +59,7 @@ + + ############################################################################### + # Logic to set up correct gcc optimization flag. This must be included +-# after /etc/make.conf so it can react to the local value of CPUTYPE ++# after @PREFIX@/etc/bsdmake.conf so it can react to the local value of CPUTYPE + # defined therein. Consult: + # http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html + # http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html +diff -r -u mk/bsd.doc.mk mk/bsd.doc.mk +--- mk/bsd.doc.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.doc.mk 2012-03-09 23:42:07.000000000 +0100 +@@ -149,8 +149,8 @@ + (cd ${.CURDIR}; spell ${SRCS} ) | sort | \ + comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell + +-BINDIR?= /usr/share/doc +-BINMODE= 444 ++BINDIR?= @PREFIX@/share/doc ++BINMODE= 644 + + SRCDIR?= ${.CURDIR} + +diff -r -u mk/bsd.obj.mk mk/bsd.obj.mk +--- mk/bsd.obj.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.obj.mk 2012-03-09 23:51:14.000000000 +0100 +@@ -16,7 +16,7 @@ + # + # E.g. use `env MAKEOBJDIR=temp-obj make' + # +-# MAKEOBJDIRPREFIX Specifies somewhere other than /usr/obj to root the object ++# MAKEOBJDIRPREFIX Specifies somewhere other than @PREFIX@/obj to root the object + # tree. Note: MAKEOBJDIRPREFIX is an *environment* variable + # and works properly only if set as an environment variable, + # not as a global or command line variable! +@@ -45,7 +45,7 @@ + .if defined(MAKEOBJDIRPREFIX) + CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} + .else +-CANONICALOBJDIR:=/usr/obj${.CURDIR} ++CANONICALOBJDIR:=@PREFIX@/obj${.CURDIR} + .endif + + # +@@ -57,7 +57,7 @@ + # 2. ${MAKEOBJDIR} + # 3. obj.${MACHINE} + # 4. obj +-# 5. /usr/obj/`pwd` ++# 5. @PREFIX@/obj/`pwd` + # 6. ${.CURDIR} + # + # If ${.OBJDIR} is constructed using canonical cases 1 or 5, or +diff -r -u mk/bsd.own.mk mk/bsd.own.mk +--- mk/bsd.own.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.own.mk 2012-03-09 23:40:51.000000000 +0100 +@@ -9,28 +9,28 @@ + # DESTDIR Change the tree where the file gets installed. [not set] + # + # DISTDIR Change the tree where the file for a distribution +-# gets installed (see /usr/src/release/Makefile). [not set] ++# gets installed. [not set] + # + # COMPRESS_CMD Program to compress documents. + # Output is to stdout. [gzip -cn] + # + # COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz] + # +-# BINOWN Binary owner. [root] ++# BINOWN Binary owner. [@INSTALL_USER@] + # +-# BINGRP Binary group. [wheel] ++# BINGRP Binary group. [@INSTALL_GROUP@] + # +-# BINMODE Binary mode. [555] ++# BINMODE Binary mode. [755] + # +-# NOBINMODE Mode for non-executable files. [444] ++# NOBINMODE Mode for non-executable files. [644] + # +-# LIBDIR Base path for libraries. [/usr/lib] ++# LIBDIR Base path for libraries. [@PREFIX@/lib] + # +-# LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat] ++# LIBCOMPATDIR Base path for compat libraries. [@PREFIX@/lib/compat] + # +-# LIBDATADIR Base path for misc. utility data files. [/usr/libdata] ++# LIBDATADIR Base path for misc. utility data files. [@PREFIX@/libdata] + # +-# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] ++# LINTLIBDIR Base path for lint libraries. [@PREFIX@/libdata/lint] + # + # SHLIBDIR Base path for shared libraries. [${LIBDIR}] + # +@@ -42,7 +42,7 @@ + # + # + # KMODDIR Base path for loadable kernel modules +-# (see kld(4)). [/boot/kernel] ++# (see kld(4)). [@PREFIX@/boot/kernel] + # + # KMODOWN KLD owner. [${BINOWN}] + # +@@ -52,11 +52,11 @@ + # + # + # SHAREDIR Base path for architecture-independent ascii +-# text files. [/usr/share] ++# text files. [@PREFIX@/share] + # +-# SHAREOWN ASCII text file owner. [root] ++# SHAREOWN ASCII text file owner. [@INSTALL_USER@] + # +-# SHAREGRP ASCII text file group. [wheel] ++# SHAREGRP ASCII text file group. [@INSTALL_GROUP@] + # + # SHAREMODE ASCII text file mode. [${NOBINMODE}] + # +@@ -99,30 +99,30 @@ + # + # NLSMODE National Language Support files mode. [${NOBINMODE}] + # +-# INCLUDEDIR Base path for standard C include files [/usr/include] ++# INCLUDEDIR Base path for standard C include files [@PREFIX@/include] + + .if !target(____) + ____: + + # Binaries +-BINOWN?= root +-BINGRP?= wheel +-BINMODE?= 555 +-NOBINMODE?= 444 ++BINOWN?= @INSTALL_USER@ ++BINGRP?= @INSTALL_GROUP@ ++BINMODE?= 755 ++NOBINMODE?= 644 + + .if defined(MODULES_WITH_WORLD) +-KMODDIR?= /boot/modules ++KMODDIR?= @PREFIX@/boot/modules + .else +-KMODDIR?= /boot/kernel ++KMODDIR?= @PREFIX@/boot/kernel + .endif + KMODOWN?= ${BINOWN} + KMODGRP?= ${BINGRP} + KMODMODE?= ${BINMODE} + +-LIBDIR?= /usr/lib +-LIBCOMPATDIR?= /usr/lib/compat +-LIBDATADIR?= /usr/libdata +-LINTLIBDIR?= /usr/libdata/lint ++LIBDIR?= @PREFIX@/lib ++LIBCOMPATDIR?= @PREFIX@/lib/compat ++LIBDATADIR?= @PREFIX@/libdata ++LINTLIBDIR?= @PREFIX@/libdata/lint + SHLIBDIR?= ${LIBDIR} + LIBOWN?= ${BINOWN} + LIBGRP?= ${BINGRP} +@@ -130,9 +130,9 @@ + + + # Share files +-SHAREDIR?= /usr/share +-SHAREOWN?= root +-SHAREGRP?= wheel ++SHAREDIR?= @PREFIX@/share ++SHAREOWN?= @INSTALL_USER@ ++SHAREGRP?= @INSTALL_GROUP@ + SHAREMODE?= ${NOBINMODE} + + MANDIR?= ${SHAREDIR}/man/man +@@ -155,7 +155,7 @@ + NLSGRP?= ${SHAREGRP} + NLSMODE?= ${NOBINMODE} + +-INCLUDEDIR?= /usr/include ++INCLUDEDIR?= @PREFIX@/include + + # Common variables + .if !defined(DEBUG_FLAGS) +diff -r -u mk/bsd.port.mk mk/bsd.port.mk +--- mk/bsd.port.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.port.mk 2012-03-09 23:52:49.000000000 +0100 +@@ -1,6 +1,6 @@ + # $FreeBSD: src/share/mk/bsd.port.mk,v 1.307 2004/07/02 20:47:18 eik Exp $ + +-PORTSDIR?= /usr/ports ++PORTSDIR?= @PREFIX@/ports + BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk + + .include +diff -r -u mk/bsd.port.subdir.mk mk/bsd.port.subdir.mk +--- mk/bsd.port.subdir.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/bsd.port.subdir.mk 2012-03-09 23:53:10.000000000 +0100 +@@ -1,6 +1,6 @@ + # $FreeBSD: src/share/mk/bsd.port.subdir.mk,v 1.31 2004/07/02 20:47:18 eik Exp $ + +-PORTSDIR?= /usr/ports ++PORTSDIR?= @PREFIX@/ports + BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk + + .include "${BSDPORTSUBDIRMK}" +diff -r -u mk/sys.mk mk/sys.mk +--- mk/sys.mk 2012-03-09 23:30:48.000000000 +0100 ++++ mk/sys.mk 2012-03-09 23:54:07.000000000 +0100 +@@ -19,7 +19,7 @@ + .SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh + .endif + +-X11BASE ?= /usr/X11R6 ++X11BASE ?= @PREFIX@ + + AR ?= ar + .if defined(%POSIX) +@@ -253,7 +253,7 @@ + rm -f ${.PREFIX}.tmp.c + + # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. +-__MAKE_CONF?=/etc/make.conf ++__MAKE_CONF?=@PREFIX@/etc/bsdmake.conf + .if exists(${__MAKE_CONF}) + .include "${__MAKE_CONF}" + .endif diff --git a/Patches/bsdmake/patch-pathnames.diff b/Patches/bsdmake/patch-pathnames.diff new file mode 100644 index 0000000000000..38ae6ce4431c8 --- /dev/null +++ b/Patches/bsdmake/patch-pathnames.diff @@ -0,0 +1,117 @@ +--- pathnames.h 2012-03-10 01:01:58.000000000 +0100 ++++ pathnames.h 2012-03-10 01:02:31.000000000 +0100 +@@ -38,7 +38,7 @@ + #endif /* ! PATH_OBJDIR */ + + #ifndef PATH_OBJDIRPREFIX +-#define PATH_OBJDIRPREFIX "/usr/obj" ++#define PATH_OBJDIRPREFIX "@PREFIX@/obj" + #endif /* ! PATH_OBJDIRPREFIX */ + + #ifndef PATH_DEFSHELLDIR +@@ -50,7 +50,7 @@ + #endif /* ! PATH_DEFSYSMK */ + + #ifndef PATH_DEFSYSPATH +-#define PATH_DEFSYSPATH "/usr/share/mk" ++#define PATH_DEFSYSPATH "@PREFIX@/share/mk/bsdmake" + #endif /* ! PATH_DEFSYSPATH */ + + #endif /* pathnames_h_235b888a */ +--- dir.c 2012-03-10 01:28:22.000000000 +0100 ++++ dir.c 2012-03-10 01:28:40.000000000 +0100 +@@ -944,24 +944,6 @@ + * read and hashed. + *----------------------------------------------------------------------- + */ +-#ifdef __APPLE__ +-struct Dir * +-Path_AddDirPrefix(struct Path *path, const char *prefix, const char *inname) +-{ +- const char *name; +- char buf[MAXPATHLEN]; +- +- if (prefix && prefix[0] == '/' && prefix[1] != 0) { +- strlcpy(buf, prefix, sizeof(buf)); +- strlcat(buf, inname, sizeof(buf)); +- name = buf; +- } else +- name = inname; +- +- return Path_AddDir(path, name); +-} +- +-#endif /* __APPLE__ */ + struct Dir * + Path_AddDir(struct Path *path, const char *name) + { +--- dir.h 2012-03-10 01:28:54.000000000 +0100 ++++ dir.h 2012-03-10 01:29:03.000000000 +0100 +@@ -60,9 +60,6 @@ + void Dir_PrintDirectories(void); + + struct Dir *Path_AddDir(struct Path *, const char *); +-#ifdef __APPLE__ +-struct Dir *Path_AddDirPrefix(struct Path *, const char *, const char *); +-#endif /* __APPLE__ */ + void Path_Clear(struct Path *); + void Path_Concat(struct Path *, const struct Path *); + void Path_Duplicate(struct Path *, const struct Path *); +--- main.c 2012-03-10 01:25:51.000000000 +0100 ++++ main.c 2012-03-10 01:31:10.000000000 +0100 +@@ -958,55 +958,16 @@ + */ + if (TAILQ_EMPTY(&sysIncPath)) { + char syspath[] = PATH_DEFSYSPATH; +-#ifdef __APPLE__ +- char *prefixes[2] = { NULL, NULL }; +- char *devdir = getenv("DEVELOPER_DIR"); +- char **pf; +- char execpath[MAXPATHLEN]; +- uint32_t execpathsize = sizeof(execpath); +- char *rel; +- +- if (devdir && *devdir != '/') +- devdir = NULL; +- prefixes[0] = devdir; +- if (_NSGetExecutablePath(execpath, &execpathsize) != 0) +- strcpy(execpath, "/usr/bin/bsdmake"); +- /* chop off name to get path */ +- if ((cp = strrchr(execpath, '/')) != NULL) +- *cp = 0; +- /* chop off 'bin' */ +- if ((cp = strrchr(execpath, '/')) != NULL) +- *cp = 0; +- /* chop off 'usr' */ +- if ((cp = strrchr(execpath, '/')) != NULL) +- *cp = 0; +- rel = (cp > execpath) ? execpath : NULL; +- pf = prefixes; +- do { +-#endif /* __APPLE__ */ + for (start = syspath; *start != '\0'; start = cp) { + for (cp = start; *cp != '\0' && *cp != ':'; cp++) + continue; + if (*cp == '\0') { +-#ifdef __APPLE__ +- Path_AddDirPrefix(&sysIncPath, *pf ? *pf : rel, start); +-#else /* !__APPLE__ */ + Path_AddDir(&sysIncPath, start); +-#endif /* __APPLE__ */ + } else { +-#ifdef __APPLE__ +- *cp = '\0'; +- Path_AddDirPrefix(&sysIncPath, *pf ? *pf : rel, start); +- *cp++ = ':'; +-#else /* !__APPLE__ */ + *cp++ = '\0'; + Path_AddDir(&sysIncPath, start); +-#endif /* __APPLE__ */ + } + } +-#ifdef __APPLE__ +- } while(*pf++); +-#endif /* __APPLE__ */ + } + + /* diff --git a/Patches/bsdmake/patch-setrlimit.diff b/Patches/bsdmake/patch-setrlimit.diff new file mode 100644 index 0000000000000..aac7e175df7a3 --- /dev/null +++ b/Patches/bsdmake/patch-setrlimit.diff @@ -0,0 +1,16 @@ +--- main.c.orig 2013-04-10 12:10:17.000000000 +0000 ++++ main.c 2013-04-10 12:22:02.000000000 +0000 +@@ -741,10 +741,9 @@ + err(2, "getrlimit"); + } + #ifdef __APPLE__ +- if (rl.rlim_max != RLIM_INFINITY) +- rl.rlim_cur = rl.rlim_max; +- else +- rl.rlim_cur = OPEN_MAX; ++ if (rl.rlim_max > OPEN_MAX) ++ rl.rlim_max = OPEN_MAX; ++ rl.rlim_cur = rl.rlim_max; + #else /* !__APPLE__ */ + rl.rlim_cur = rl.rlim_max; + #endif /* __APPLE__ */ diff --git a/Patches/cd-discid/1.4.patch b/Patches/cd-discid/1.4.patch new file mode 100644 index 0000000000000..8d4bc35132ae5 --- /dev/null +++ b/Patches/cd-discid/1.4.patch @@ -0,0 +1,38 @@ +diff --git a/cd-discid.c b/cd-discid.c +index 9b0b40a..2c96641 100644 +--- a/cd-discid.c ++++ b/cd-discid.c +@@ -93,7 +93,7 @@ + #define cdth_trk1 lastTrackNumberInLastSessionLSB + #define cdrom_tocentry CDTrackInfo + #define cdte_track_address trackStartAddress +-#define DEVICE_NAME "/dev/disk1" ++#define DEVICE_NAME "/dev/rdisk1" + + #else + #error "Your OS isn't supported yet." +@@ -236,8 +236,7 @@ int main(int argc, char *argv[]) + * TocEntry[last-1].lastRecordedAddress + 1, so we compute the start + * of leadout from the start+length of the last track instead + */ +- TocEntry[last].cdte_track_address = TocEntry[last - 1].trackSize + +- TocEntry[last - 1].trackStartAddress; ++TocEntry[last].cdte_track_address = htonl(ntohl(TocEntry[last-1].trackSize) + ntohl(TocEntry[last-1].trackStartAddress)); + #else /* FreeBSD, Linux, Solaris */ + for (i = 0; i < last; i++) { + /* tracks start with 1, but I must start with 0 on OpenBSD */ +@@ -260,12 +259,12 @@ int main(int argc, char *argv[]) + /* release file handle */ + close(drive); + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) + TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address); + #endif + + for (i = 0; i < last; i++) { +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) + TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address); + #endif + cksum += cddb_sum((TocEntry[i].cdte_track_address + CD_MSF_OFFSET) / CD_FRAMES); diff --git a/Patches/cdargs/1.35.patch b/Patches/cdargs/1.35.patch new file mode 100644 index 0000000000000..bcd88043fb446 --- /dev/null +++ b/Patches/cdargs/1.35.patch @@ -0,0 +1,26 @@ +diff --git a/contrib/cdargs-bash.sh b/contrib/cdargs-bash.sh +index 8a197ef..f3da067 100644 +--- a/contrib/cdargs-bash.sh ++++ b/contrib/cdargs-bash.sh +@@ -11,6 +11,12 @@ + CDARGS_SORT=0 # set to 1 if you want mark to sort the list + CDARGS_NODUPS=1 # set to 1 if you want mark to delete dups + ++# Support ZSH via its BASH completion emulation ++if [ -n "$ZSH_VERSION" ]; then ++ autoload bashcompinit ++ bashcompinit ++fi ++ + # --------------------------------------------- # + # Run the cdargs program to get the target # + # directory to be used in the various context # +@@ -166,7 +172,7 @@ function mark () + local tmpfile + + # first clear any bookmarks with this same alias, if file exists +- if [[ "$CDARGS_NODUPS" && -e "$HOME/.cdargs" ]]; then ++ if [ "$CDARGS_NODUPS" ] && [ -e "$HOME/.cdargs" ]; then + tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e "s/\\/$//"` + tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM + grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs"; diff --git a/Patches/cdb/errno.patch b/Patches/cdb/errno.patch new file mode 100644 index 0000000000000..980030e15d37b --- /dev/null +++ b/Patches/cdb/errno.patch @@ -0,0 +1,103 @@ +diff --git a/alloc.c b/alloc.c +index c661453..c466cc9 100644 +--- a/alloc.c ++++ b/alloc.c +@@ -1,5 +1,6 @@ + #include "alloc.h" + #include "error.h" ++#include "errno.h" + extern char *malloc(); + extern void free(); + +diff --git a/buffer_get.c b/buffer_get.c +index 937b75e..661bd1a 100644 +--- a/buffer_get.c ++++ b/buffer_get.c +@@ -1,6 +1,7 @@ + #include "buffer.h" + #include "byte.h" + #include "error.h" ++#include "errno.h" + + static int oneread(int (*op)(),int fd,char *buf,unsigned int len) + { +diff --git a/buffer_put.c b/buffer_put.c +index a05e1f5..1f07541 100644 +--- a/buffer_put.c ++++ b/buffer_put.c +@@ -2,6 +2,7 @@ + #include "str.h" + #include "byte.h" + #include "error.h" ++#include "errno.h" + + static int allwrite(int (*op)(),int fd,char *buf,unsigned int len) + { +diff --git a/cdb.c b/cdb.c +index b09d3a5..54db474 100644 +--- a/cdb.c ++++ b/cdb.c +@@ -5,6 +5,7 @@ + #include + #include "readwrite.h" + #include "error.h" ++#include "errno.h" + #include "seek.h" + #include "byte.h" + #include "cdb.h" +diff --git a/cdb_make.c b/cdb_make.c +index 6d1bd03..b3f8fc7 100644 +--- a/cdb_make.c ++++ b/cdb_make.c +@@ -3,6 +3,7 @@ + #include "readwrite.h" + #include "seek.h" + #include "error.h" ++#include "errno.h" + #include "alloc.h" + #include "cdb.h" + #include "cdb_make.h" +diff --git a/cdbmake.c b/cdbmake.c +index 3c1c8bd..34a459a 100644 +--- a/cdbmake.c ++++ b/cdbmake.c +@@ -1,4 +1,5 @@ + #include "error.h" ++#include "errno.h" + #include "open.h" + #include "strerr.h" + #include "cdb_make.h" +diff --git a/install.c b/install.c +index 605fed3..9ce1e04 100644 +--- a/install.c ++++ b/install.c +@@ -1,6 +1,7 @@ + #include "buffer.h" + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "open.h" + #include "readwrite.h" + #include "exit.h" +diff --git a/instcheck.c b/instcheck.c +index c945e67..8a69a78 100644 +--- a/instcheck.c ++++ b/instcheck.c +@@ -2,6 +2,7 @@ + #include + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "readwrite.h" + #include "exit.h" + +diff --git a/strerr_sys.c b/strerr_sys.c +index b484197..3e98cfa 100644 +--- a/strerr_sys.c ++++ b/strerr_sys.c +@@ -1,4 +1,5 @@ + #include "error.h" ++#include "errno.h" + #include "strerr.h" + + struct strerr strerr_sys; diff --git a/Patches/cgit/memrchr-impl.patch b/Patches/cgit/memrchr-impl.patch new file mode 100644 index 0000000000000..9396e3c69dd94 --- /dev/null +++ b/Patches/cgit/memrchr-impl.patch @@ -0,0 +1,124 @@ +From 1d2a5664c08f84b0d16a9df4854c1ab357b37db2 Mon Sep 17 00:00:00 2001 +From: Markus Mayer +To: CGIT Mailing List +Date: Mon, 29 Jun 2020 17:17:37 -0700 +Subject: [PATCH] global: provide memrchr implementation for macOS + +macOS doesn't come with a memrchr() of its own, so let's provide an +implementation it can use. + +memrchr.c was taken from Apple's own open source site. + +https://opensource.apple.com/source/sudo/sudo-87.80.2/sudo/lib/util/memrchr.c + +It was minimally modified, so it would work for cgit: + +- Removed #include "sudo_compat.h" +- Renamed function from sudo_memrchr() to memrchr() + +Signed-off-by: Markus Mayer +--- + +I sent this a few days ago already, but it looks like it didn't make it +to the mailig list. Let's give it another shot. + + cgit.h | 4 ++++ + cgit.mk | 9 +++++++++ + memrchr.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 62 insertions(+) + create mode 100644 memrchr.c + +diff --git a/cgit.h b/cgit.h +index 7ec46b4..1b2f712 100644 +--- a/cgit.h ++++ b/cgit.h +@@ -395,4 +395,8 @@ extern char *expand_macros(const char *txt); + + extern char *get_mimetype_for_filename(const char *filename); + ++#ifdef NEED_MEMRCHR ++extern void *memrchr(const void *s, int c, size_t n); ++#endif ++ + #endif /* CGIT_H */ +diff --git a/cgit.mk b/cgit.mk +index 3fcc1ca..f85018c 100644 +--- a/cgit.mk ++++ b/cgit.mk +@@ -63,10 +63,19 @@ ifeq ($(uname_S),Linux) + HAVE_LINUX_SENDFILE = YesPlease + endif + ++ifeq ($(uname_S),Darwin) ++ IS_DARWIN = yes ++endif ++ + ifdef HAVE_LINUX_SENDFILE + CGIT_CFLAGS += -DHAVE_LINUX_SENDFILE + endif + ++ifdef IS_DARWIN ++ CGIT_CFLAGS += -DNEED_MEMRCHR ++ CGIT_OBJ_NAMES += memrchr.o ++endif ++ + CGIT_OBJ_NAMES += cgit.o + CGIT_OBJ_NAMES += cache.o + CGIT_OBJ_NAMES += cmd.o +diff --git a/memrchr.c b/memrchr.c +new file mode 100644 +index 0000000..46ec17f +--- /dev/null ++++ b/memrchr.c +@@ -0,0 +1,49 @@ ++/* ++ * SPDX-License-Identifier: ISC ++ * ++ * Copyright (c) 2007, 2010-2014 ++ * Todd C. Miller ++ * ++ * Permission to use, copy, modify, and distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++/* ++ * This is an open source non-commercial project. Dear PVS-Studio, please check it. ++ * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com ++ */ ++ ++#include ++ ++#ifndef HAVE_MEMRCHR ++ ++#include ++ ++/* ++ * Reverse memchr() ++ * Find the last occurrence of 'c' in the buffer 's' of size 'n'. ++ */ ++void * ++memrchr(const void *s, int c, size_t n) ++{ ++ const unsigned char *cp; ++ ++ if (n != 0) { ++ cp = (unsigned char *)s + n; ++ do { ++ if (*(--cp) == (unsigned char)c) ++ return (void *)cp; ++ } while (--n != 0); ++ } ++ return (void *)0; ++} ++#endif /* HAVE_MEMRCHR */ +-- +2.26.0 diff --git a/Patches/chakra/clang10.patch b/Patches/chakra/clang10.patch new file mode 100644 index 0000000000000..7a7539c2d04b7 --- /dev/null +++ b/Patches/chakra/clang10.patch @@ -0,0 +1,760 @@ +From 3b3aa9ba1ddca0fc2f29681fe78d83aa580aaa1d Mon Sep 17 00:00:00 2001 +From: Petr Penzin +Date: Mon, 8 Feb 2021 22:31:51 -0800 +Subject: [PATCH] Fix Clang 10 and Ubuntu 20.04 compatibility errors + +Drive by cleanup - build all wabt files in the build directory. + +Disambiguate template parameter names. Overloading a template parameter +by a declaration (including in parameters to nested templates) is +treated as an error by Clang 10. + +PAL math and memory API clean up (also for #6404). Remove PAL +redefintions of system functions with incompatible exception +declarations. Remove externally visible redifinitions of math and memory +management functions. Delete corresponding math function +implementations, as they pretty much call their system counterparts. +Hide memory management functions, since they are still used from inside +of PAL. + +[CI] Use Ubuntu 20.04 image for default Linux builds. Change default +Linux image to Ubuntu 20.04. Add two extra build jobs for Ubuntu 18.04. + +Closes #6600 +--- + bin/ch/MessageQueue.h | 11 +- + lib/Common/DataStructures/Comparer.h | 3 +- + lib/Common/DataStructures/List.h | 13 +- + lib/Common/Memory/HeapBucket.h | 5 +- + lib/Common/Memory/SmallLeafHeapBucket.h | 3 +- + lib/Parser/TextbookBoyerMoore.h | 9 +- + lib/Parser/pnodewalk.h | 13 +- + lib/Runtime/Base/jitprofiling.cpp | 3 + + lib/Runtime/Language/EvalMapRecord.h | 7 +- + lib/Runtime/Library/MapOrSetDataList.h | 3 +- + lib/Runtime/Types/DictionaryTypeHandler.h | 3 +- + lib/Runtime/Types/ES5ArrayTypeHandler.h | 5 +- + .../Types/SimpleDictionaryTypeHandler.h | 3 +- + .../SimpleDictionaryUnorderedTypeHandler.h | 5 +- + lib/wabt/CMakeLists.txt | 4 +- + pal/inc/pal.h | 55 +---- + pal/inc/rt/palrt.h | 2 +- + pal/src/cruntime/finite.cpp | 207 ------------------ + 18 files changed, 62 insertions(+), 292 deletions(-) + +diff --git a/bin/ch/MessageQueue.h b/bin/ch/MessageQueue.h +index bc350806ec80827a6bec34413e7541cfdb1fbd2f..ea2c91943f7801020a03e3216ca372dfed5c157e 100644 +--- a/bin/ch/MessageQueue.h ++++ b/bin/ch/MessageQueue.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -28,15 +29,15 @@ class MessageBase + template + class SortedList + { +- template ++ template + struct DListNode + { +- T data; +- DListNode* prev; +- DListNode* next; ++ U data; ++ DListNode* prev; ++ DListNode* next; + + public: +- DListNode(const T& data) : ++ DListNode(const U& data) : + data(data), + prev(nullptr), + next(nullptr) +diff --git a/lib/Common/DataStructures/Comparer.h b/lib/Common/DataStructures/Comparer.h +index c6b3eb19d96bb0e311ef691acd74b5c62db926a8..378f9f26122b0e1e68ac363c03e57cd3cf2239c2 100644 +--- a/lib/Common/DataStructures/Comparer.h ++++ b/lib/Common/DataStructures/Comparer.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -176,7 +177,7 @@ struct DefaultComparer : public StringComparer {}; + template + struct SpecializedComparer + { +- template class TComparerType : public TComparer {}; ++ template class TComparerType : public TComparer {}; + }; + + namespace regex +diff --git a/lib/Common/DataStructures/List.h b/lib/Common/DataStructures/List.h +index 8def4634c3a68046fc67a9426cb7bc1411a01087..dc7f20a3f9184f4c7afb12ae07163c1ad6583fa3 100644 +--- a/lib/Common/DataStructures/List.h ++++ b/lib/Common/DataStructures/List.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -63,10 +64,10 @@ namespace JsUtil + && memcmp(this->buffer, list->GetBuffer(), sizeof(T)* this->Count()) == 0; + } + +- template +- static ReadOnlyList * New(TAllocator* alloc, __in_ecount(count) T* buffer, DECLSPEC_GUARD_OVERFLOW int count) ++ template ++ static ReadOnlyList * New(UAllocator* alloc, __in_ecount(count) T* buffer, DECLSPEC_GUARD_OVERFLOW int count) + { +- return AllocatorNew(TAllocator, alloc, ReadOnlyList, buffer, count, alloc); ++ return AllocatorNew(UAllocator, alloc, ReadOnlyList, buffer, count, alloc); + } + + ReadOnlyList(__in_ecount(count) T* buffer, int count, TAllocator* alloc) +@@ -284,10 +285,10 @@ namespace JsUtil + } + } + +- template +- void Copy(const T* list) ++ template ++ void Copy(const U* list) + { +- CompileAssert(sizeof(TElementType) == sizeof(typename T::TElementType)); ++ CompileAssert(sizeof(TElementType) == sizeof(typename U::TElementType)); + if (list->Count() > 0) + { + this->EnsureArray(list->Count()); +diff --git a/lib/Common/Memory/HeapBucket.h b/lib/Common/Memory/HeapBucket.h +index ea52efefd18e4e5bc62e7c3b04048905292b5d04..377c902190f5c2bf06d85a80d6b5fcbbefebffc5 100644 +--- a/lib/Common/Memory/HeapBucket.h ++++ b/lib/Common/Memory/HeapBucket.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -22,8 +23,8 @@ class GenericRecyclerVerifyListConsistencyData + bool hasSetupVerifyListConsistencyData; + SmallHeapBlockT * nextAllocableBlockHead; + +- template +- void SetupVerifyListConsistencyData(SmallHeapBlockT* block, bool expectFull, bool expectDispose) ++ template ++ void SetupVerifyListConsistencyData(SmallHeapBlockT* block, bool expectFull, bool expectDispose) + { + this->nextAllocableBlockHead = block; + this->expectFull = expectFull; +diff --git a/lib/Common/Memory/SmallLeafHeapBucket.h b/lib/Common/Memory/SmallLeafHeapBucket.h +index 1cf6d27e38a6affc16b853aa4c543430c910b385..eae26539b4e28d03c4e4078ce1c35336e253570d 100644 +--- a/lib/Common/Memory/SmallLeafHeapBucket.h ++++ b/lib/Common/Memory/SmallLeafHeapBucket.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + namespace Memory +@@ -10,7 +11,7 @@ class SmallLeafHeapBucketT : public HeapBucketT> BaseT; + protected: + friend class HeapBucket; +- template ++ template + friend class HeapBucketGroup; + + void Sweep(RecyclerSweep& recyclerSweep); +diff --git a/lib/Parser/TextbookBoyerMoore.h b/lib/Parser/TextbookBoyerMoore.h +index 3871ac926151523d955254b2c228377d28dbf76a..59a4ef8107a6b0f401c1e2ea99bc4ea462ae2474 100644 +--- a/lib/Parser/TextbookBoyerMoore.h ++++ b/lib/Parser/TextbookBoyerMoore.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + // From Cormen, Leiserson and Rivest, ch 34. +@@ -14,9 +15,9 @@ namespace UnifiedRegex + private: + typedef typename Chars::Char Char; + +- template ++ template + friend class TextbookBoyerMoore; +- template ++ template + friend class TextbookBoyerMooreWithLinearMap; + + public: +@@ -46,7 +47,7 @@ namespace UnifiedRegex + template + class TextbookBoyerMooreWithLinearMap : private Chars + { +- template ++ template + friend struct TextbookBoyerMooreSetup; + typedef typename Chars::Char Char; + private: +@@ -95,7 +96,7 @@ namespace UnifiedRegex + template + class TextbookBoyerMoore : private Chars + { +- template ++ template + friend struct TextbookBoyerMooreSetup; + typedef typename Chars::Char Char; + +diff --git a/lib/Parser/pnodewalk.h b/lib/Parser/pnodewalk.h +index 07552ba644e89a1dbfd762c33802eca37c0f02be..a83b121962468f330c9457dc5c084cae9a970eaf 100644 +--- a/lib/Parser/pnodewalk.h ++++ b/lib/Parser/pnodewalk.h +@@ -1,14 +1,15 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once + +-template ++template + struct WalkerPolicyBase + { +- typedef ResultType ResultType; +- typedef Context Context; ++ using ResultType = _ResultType ; ++ using Context = _Context ; + + inline bool ContinueWalk(ResultType) { return true; } + inline ResultType DefaultResult() { return ResultType(); } +@@ -21,11 +22,11 @@ struct WalkerPolicyBase + inline void WalkReference(ParseNode **ppnode, Context context) { } + }; + +-template +-struct WalkerPolicyBase ++template ++struct WalkerPolicyBase + { + typedef bool ResultType; +- typedef Context Context; ++ using Context = _Context ; + + inline bool ContinueWalk(ResultType) { return true; } + inline bool DefaultResult() { return true; } +diff --git a/lib/Runtime/Base/jitprofiling.cpp b/lib/Runtime/Base/jitprofiling.cpp +index f04715dbc15016a677d69dde39d5ef4086dc6959..c330157bf4654c6bb1069ade829f18663ad3c1b1 100644 +--- a/lib/Runtime/Base/jitprofiling.cpp ++++ b/lib/Runtime/Base/jitprofiling.cpp +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft Corporation and contributors. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #include "RuntimeBasePch.h" +@@ -8,12 +9,14 @@ + + #include "ittnotify_config.h" + ++#ifdef ITT_PLATFORM + #if ITT_PLATFORM==ITT_PLATFORM_WIN + #include + #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + #if ITT_PLATFORM != ITT_PLATFORM_MAC && ITT_PLATFORM != ITT_PLATFORM_FREEBSD + #include + #endif ++#endif + #include + + #include "jitprofiling.h" +diff --git a/lib/Runtime/Language/EvalMapRecord.h b/lib/Runtime/Language/EvalMapRecord.h +index 6f63d60c8e06bf889610aa48c3deeca0b6d0e134..fa3b3c4d9e897ba972dc42776b63f75d9c924df4 100644 +--- a/lib/Runtime/Language/EvalMapRecord.h ++++ b/lib/Runtime/Language/EvalMapRecord.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -103,11 +104,11 @@ namespace Js + template + class TwoLevelHashDictionary + { +- template ++ template + class AutoRestoreSetInAdd + { + public: +- AutoRestoreSetInAdd(T* instance, Value value) : ++ AutoRestoreSetInAdd(T* instance, V value) : + instance(instance), value(value) + { + instance->SetIsInAdd(value); +@@ -119,7 +120,7 @@ namespace Js + + private: + T* instance; +- Value value; ++ V value; + }; + + public: +diff --git a/lib/Runtime/Library/MapOrSetDataList.h b/lib/Runtime/Library/MapOrSetDataList.h +index bcd1d89d44505244c94539e9b599960f50bcd998..47cd0543d4f820bda5860984da9ff6bed0e2d6ef 100644 +--- a/lib/Runtime/Library/MapOrSetDataList.h ++++ b/lib/Runtime/Library/MapOrSetDataList.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -25,7 +26,7 @@ namespace Js + class MapOrSetDataNode + { + private: +- template ++ template + friend class MapOrSetDataList; + + Field(MapOrSetDataNode*) next; +diff --git a/lib/Runtime/Types/DictionaryTypeHandler.h b/lib/Runtime/Types/DictionaryTypeHandler.h +index 49320423afadce2a482b7de49a9f14612198dbed..20affc8b09b025b74e6fc451e29cf27334c57c53 100644 +--- a/lib/Runtime/Types/DictionaryTypeHandler.h ++++ b/lib/Runtime/Types/DictionaryTypeHandler.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -20,7 +21,7 @@ namespace Js + friend class DynamicObject; + friend class DynamicTypeHandler; + template friend class SimpleDictionaryTypeHandlerBase; +- template friend class DictionaryTypeHandlerBase; ++ template friend class DictionaryTypeHandlerBase; + + // Explicit non leaf allocator as the key is non-leaf + typedef JsUtil::BaseDictionary, RecyclerNonLeafAllocator, DictionarySizePolicy, PropertyRecordStringHashComparer> +diff --git a/lib/Runtime/Types/ES5ArrayTypeHandler.h b/lib/Runtime/Types/ES5ArrayTypeHandler.h +index e3216329b3b8333d211382c09d4ffd0655cfbb74..1eb1a377a4be891915100bef3e892541764ebd8d 100644 +--- a/lib/Runtime/Types/ES5ArrayTypeHandler.h ++++ b/lib/Runtime/Types/ES5ArrayTypeHandler.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -98,8 +99,8 @@ namespace Js + template + friend class SimpleTypeHandler; + template friend class SimpleDictionaryTypeHandlerBase; +- template friend class DictionaryTypeHandlerBase; +- template friend class ES5ArrayTypeHandlerBase; ++ template friend class DictionaryTypeHandlerBase; ++ template friend class ES5ArrayTypeHandlerBase; + + private: + Field(IndexPropertyDescriptorMap*) indexPropertyMap; +diff --git a/lib/Runtime/Types/SimpleDictionaryTypeHandler.h b/lib/Runtime/Types/SimpleDictionaryTypeHandler.h +index 3594e70a76129b2d19b8956432768ddb92b068f1..fb2e1b2e7e0ff426c6715c58942c463f70cdcd6d 100644 +--- a/lib/Runtime/Types/SimpleDictionaryTypeHandler.h ++++ b/lib/Runtime/Types/SimpleDictionaryTypeHandler.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + // +@@ -55,7 +56,7 @@ namespace Js + template + friend class SimpleTypeHandler; + +- template friend class SimpleDictionaryTypeHandlerBase; ++ template friend class SimpleDictionaryTypeHandlerBase; + + // Explicit non leaf allocator now that the key is non-leaf + typedef JsUtil::BaseDictionary, RecyclerNonLeafAllocator, DictionarySizePolicy, PropertyRecordStringHashComparer, PropertyMapKeyTraits::template Entry> +diff --git a/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h b/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h +index 9a384cfe0fb0cf7e0c2590572cb5107c4042fcb7..f8e23ffc26ab8f0d5a56f64ecda6463f6cd82baf 100644 +--- a/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h ++++ b/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h +@@ -1,5 +1,6 @@ + //------------------------------------------------------------------------------------------------------- + // Copyright (C) Microsoft. All rights reserved. ++// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + //------------------------------------------------------------------------------------------------------- + #pragma once +@@ -22,8 +23,8 @@ namespace Js + template + class SimpleDictionaryUnorderedTypeHandler sealed : public SimpleDictionaryTypeHandlerBase + { +- template friend class SimpleDictionaryUnorderedTypeHandler; +- template friend class SimpleDictionaryTypeHandlerBase; ++ template friend class SimpleDictionaryUnorderedTypeHandler; ++ template friend class SimpleDictionaryTypeHandlerBase; + + private: + // A deleted property ID that will be reused for the next property add. The object's slot corresponding to this property +diff --git a/lib/wabt/CMakeLists.txt b/lib/wabt/CMakeLists.txt +index 8d1fd41b98eec8afdbe7d7577e36da31e465afa7..994533f300e3bd22a20bbc3337da2cdc9131ecc7 100644 +--- a/lib/wabt/CMakeLists.txt ++++ b/lib/wabt/CMakeLists.txt +@@ -40,10 +40,10 @@ check_type_size(size_t SIZEOF_SIZE_T) + + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in +- ${CMAKE_CURRENT_SOURCE_DIR}/built/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h + ) + +-include_directories(chakra ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/built) ++include_directories(chakra ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + + # disable -Wunused-parameter: this is really common when implementing + # interfaces, etc. +diff --git a/pal/inc/pal.h b/pal/inc/pal.h +index 66ec53b516d79a7af27cab91b458a0820fe8bbdb..6415392dad0414de5b93c66227f2e28787414ac4 100644 +--- a/pal/inc/pal.h ++++ b/pal/inc/pal.h +@@ -6089,7 +6089,6 @@ CoCreateGuid(OUT GUID * pguid); + #define towupper PAL_towupper + #define vsprintf PAL_vsprintf + #define vswprintf PAL_vswprintf +-#define realloc PAL_realloc + #define fopen PAL_fopen + #define strtok PAL_strtok + #define strtoul PAL_strtoul +@@ -6122,16 +6121,7 @@ CoCreateGuid(OUT GUID * pguid); + #define ungetc PAL_ungetc + #define setvbuf PAL_setvbuf + #define atol PAL_atol +-#define acos PAL_acos +-#define asin PAL_asin +-#define atan2 PAL_atan2 +-#define exp PAL_exp +-#define labs PAL_labs +-#define log PAL_log +-#define log10 PAL_log10 +-#define malloc PAL_malloc + #define memmove memmove_xplat +-#define free PAL_free + #define mkstemp PAL_mkstemp + #define rename PAL_rename + #define unlink PAL_unlink +@@ -6195,7 +6185,7 @@ PALIMPORT int __cdecl vsprintf(char *, const char *, va_list); + PALIMPORT int __cdecl sscanf(const char *, const char *, ...); + PALIMPORT int __cdecl atoi(const char *); + PALIMPORT LONG __cdecl atol(const char *); +-PALIMPORT long long int __cdecl atoll(const char *); ++//PALIMPORT long long int __cdecl atoll(const char *) __THROW; + PALIMPORT ULONG __cdecl strtoul(const char *, char **, int); + PALIMPORT double __cdecl atof(const char *); + PALIMPORT double __cdecl strtod(const char *, char **); +@@ -6372,39 +6362,6 @@ unsigned long long __cdecl _rotr64(unsigned long long value, int shift) + } + #endif + +-PALIMPORT int __cdecl abs(int); +-PALIMPORT double __cdecl fabs(double); +-#ifndef PAL_STDCPP_COMPAT +-PALIMPORT LONG __cdecl labs(LONG); +-PALIMPORT double __cdecl fabs(double); +-#endif // !PAL_STDCPP_COMPAT +-// clang complains if this is declared with __int64 +-PALIMPORT long long __cdecl llabs(long long); +- +-PALIMPORT double __cdecl sqrt(double); +-PALIMPORT double __cdecl log(double); +-PALIMPORT double __cdecl log10(double); +-PALIMPORT double __cdecl exp(double); +-PALIMPORT double __cdecl acos(double); +-PALIMPORT double __cdecl asin(double); +-PALIMPORT double __cdecl atan(double); +-PALIMPORT double __cdecl atan2(double,double); +-PALIMPORT double __cdecl cos(double); +-PALIMPORT double __cdecl sin(double); +-PALIMPORT double __cdecl tan(double); +-PALIMPORT double __cdecl cosh(double); +-PALIMPORT double __cdecl sinh(double); +-PALIMPORT double __cdecl tanh(double); +-PALIMPORT double __cdecl fmod(double, double); +-PALIMPORT float __cdecl fmodf(float, float); +-PALIMPORT double __cdecl floor(double); +-PALIMPORT float __cdecl floorf(float); +-PALIMPORT double __cdecl ceil(double); +-PALIMPORT float __cdecl ceilf(float); +-PALIMPORT float __cdecl fabsf(float); +-PALIMPORT double __cdecl modf(double, double *); +-PALIMPORT float __cdecl modff(float, float *); +- + PALIMPORT int __cdecl _finite(double); + PALIMPORT int __cdecl _isnan(double); + PALIMPORT double __cdecl _copysign(double, double); +@@ -6424,9 +6381,13 @@ inline __int64 abs(__int64 _X) { + #endif + #endif + +-PALIMPORT void * __cdecl malloc(size_t); +-PALIMPORT void __cdecl free(void *); +-PALIMPORT void * __cdecl realloc(void *, size_t); ++#ifdef INCLUDE_PAL_INTERNAL_ ++/* FIXME remove ++ * PAL wrappers around memory management functions, only used inside PAL */ ++PALIMPORT void * __cdecl PAL_malloc(size_t); ++PALIMPORT void __cdecl PAL_free(void *); ++PALIMPORT void * __cdecl PAL_realloc(void *, size_t); ++#endif + PALIMPORT char * __cdecl _strdup(const char *); + + #if defined(_MSC_VER) +diff --git a/pal/inc/rt/palrt.h b/pal/inc/rt/palrt.h +index 86c5e1b597a4b10d40fe25992b8d4ff9c475266d..0338410e40d893b94e1ee7a2dd5d7f082b0e134a 100644 +--- a/pal/inc/rt/palrt.h ++++ b/pal/inc/rt/palrt.h +@@ -1067,7 +1067,7 @@ _SAFECRT__EXTERN_C + errno_t __cdecl getenv_s(size_t *_ReturnValue, char *_Dst, size_t _SizeInWords, const char *_Name); + + #if defined(__cplusplus) && _SAFECRT_USE_CPP_OVERLOADS +-template ++template + inline + errno_t __cdecl getenv_s(size_t *_ReturnValue, char *_Dst, size_t _SizeInWords, const char *_Name) + { +diff --git a/pal/src/cruntime/finite.cpp b/pal/src/cruntime/finite.cpp +index a7d7cdcb68be6a2ba91a5a4bdef13707846f97d6..54b32279913b5d8d94dc40faa36906b4cf772947 100644 +--- a/pal/src/cruntime/finite.cpp ++++ b/pal/src/cruntime/finite.cpp +@@ -136,210 +136,3 @@ _copysignf( + return ret; + } + +-/*++ +-Function: +- acos +- +-See MSDN. +---*/ +-PALIMPORT double __cdecl PAL_acos(double x) +-{ +- double ret; +- +- PERF_ENTRY(acos); +- ENTRY("acos (x=%f)\n", x); +-#if !HAVE_COMPATIBLE_ACOS +- errno = 0; +-#endif // HAVE_COMPATIBLE_ACOS +- ret = acos(x); +-#if !HAVE_COMPATIBLE_ACOS +- if (errno == EDOM) +- { +- ret = PAL_NAN; // NaN +- } +-#endif // HAVE_COMPATIBLE_ACOS +- LOGEXIT("acos returns double %f\n", ret); +- PERF_EXIT(acos); +- return ret; +-} +- +-/*++ +-Function: +- asin +- +-See MSDN. +---*/ +-PALIMPORT double __cdecl PAL_asin(double x) +-{ +- double ret; +- +- PERF_ENTRY(asin); +- ENTRY("asin (x=%f)\n", x); +-#if !HAVE_COMPATIBLE_ASIN +- errno = 0; +-#endif // HAVE_COMPATIBLE_ASIN +- ret = asin(x); +-#if !HAVE_COMPATIBLE_ASIN +- if (errno == EDOM) +- { +- ret = PAL_NAN; // NaN +- } +-#endif // HAVE_COMPATIBLE_ASIN +- LOGEXIT("asin returns double %f\n", ret); +- PERF_EXIT(asin); +- return ret; +-} +- +-/*++ +-Function: +- atan2 +- +-See MSDN. +---*/ +-PALIMPORT double __cdecl PAL_atan2(double y, double x) +-{ +- double ret; +- +- PERF_ENTRY(atan2); +- ENTRY("atan2 (y=%f, x=%f)\n", y, x); +-#if !HAVE_COMPATIBLE_ATAN2 +- errno = 0; +-#endif // !HAVE_COMPATIBLE_ATAN2 +- ret = atan2(y, x); +-#if !HAVE_COMPATIBLE_ATAN2 +- if (errno == EDOM) +- { +-#if HAVE_COPYSIGN +- if (x == 0.0 && y == 0.0) +- { +- const double sign_x = copysign (1.0, x); +- const double sign_y = copysign (1.0, y); +- if (sign_x > 0) +- { +- ret = copysign (0.0, sign_y); +- } +- else +- { +- ret = copysign (atan2 (0.0, -1.0), sign_y); +- } +- } +-#else // HAVE_COPYSIGN +-#error Missing copysign or equivalent on this platform! +-#endif // HAVE_COPYSIGN +- } +-#endif // !HAVE_COMPATIBLE_ATAN2 +- LOGEXIT("atan2 returns double %f\n", ret); +- PERF_EXIT(atan2); +- return ret; +-} +- +-/*++ +-Function: +- exp +- +-See MSDN. +---*/ +-PALIMPORT double __cdecl PAL_exp(double x) +-{ +- double ret; +- +- PERF_ENTRY(exp); +- ENTRY("exp (x=%f)\n", x); +-#if !HAVE_COMPATIBLE_EXP +- if (x == 1.0) +- { +- ret = M_E; +- } +- else +- { +- ret = exp(x); +- } +-#else // !HAVE_COMPATIBLE_EXP +- ret = exp(x); +-#endif // !HAVE_COMPATIBLE_EXP +- LOGEXIT("exp returns double %f\n", ret); +- PERF_EXIT(exp); +- return ret; +-} +- +-/*++ +-Function: +- labs +- +-See MSDN. +---*/ +-PALIMPORT LONG __cdecl PAL_labs(LONG l) +-{ +- long lRet; +- +- PERF_ENTRY(labs); +- ENTRY("labs (l=%ld)\n", l); +- +- lRet = labs(l); +- +- LOGEXIT("labs returns long %ld\n", lRet); +- PERF_EXIT(labs); +- /* This explicit cast to LONG is used to silence any potential warnings +- due to implicitly casting the native long lRet to LONG when returning. */ +- return (LONG)lRet; +-} +- +-/*++ +-Function: +- log +- +-See MSDN. +---*/ +-PALIMPORT double __cdecl PAL_log(double x) +-{ +- double ret; +- +- PERF_ENTRY(log); +- ENTRY("log (x=%f)\n", x); +-#if !HAVE_COMPATIBLE_LOG +- errno = 0; +-#endif // !HAVE_COMPATIBLE_LOG +- ret = log(x); +-#if !HAVE_COMPATIBLE_LOG +- if (errno == EDOM) +- { +- if (x < 0) +- { +- ret = PAL_NAN; // NaN +- } +- } +-#endif // !HAVE_COMPATIBLE_LOG +- LOGEXIT("log returns double %f\n", ret); +- PERF_EXIT(log); +- return ret; +-} +- +-/*++ +-Function: +- log10 +- +-See MSDN. +---*/ +-PALIMPORT double __cdecl PAL_log10(double x) +-{ +- double ret; +- +- PERF_ENTRY(log10); +- ENTRY("log10 (x=%f)\n", x); +-#if !HAVE_COMPATIBLE_LOG10 +- errno = 0; +-#endif // !HAVE_COMPATIBLE_LOG10 +- ret = log10(x); +-#if !HAVE_COMPATIBLE_LOG10 +- if (errno == EDOM) +- { +- if (x < 0) +- { +- ret = PAL_NAN; // NaN +- } +- } +-#endif // !HAVE_COMPATIBLE_LOG10 +- LOGEXIT("log10 returns double %f\n", ret); +- PERF_EXIT(log10); +- return ret; +-} diff --git a/Patches/chakra/python3.patch b/Patches/chakra/python3.patch new file mode 100644 index 0000000000000..9af3cc275021e --- /dev/null +++ b/Patches/chakra/python3.patch @@ -0,0 +1,60 @@ +From 718af3752dc0dd481dbb1d0e2327b570ff16f097 Mon Sep 17 00:00:00 2001 +From: rhuanjl +Date: Sun, 11 Jul 2021 15:46:53 +0100 +Subject: [PATCH] python version agnostic + +Homebrew edit: backported to 1.11. +--- + build.sh | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/build.sh b/build.sh +index 746666a66..0699198d8 100755 +--- a/build.sh ++++ b/build.sh +@@ -1,6 +1,7 @@ + #!/bin/bash + #------------------------------------------------------------------------------------------------------- + # Copyright (C) Microsoft. All rights reserved. ++# Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. + # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. + #------------------------------------------------------------------------------------------------------- + +@@ -127,7 +128,7 @@ CMAKE_EXPORT_COMPILE_COMMANDS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" + LIBS_ONLY_BUILD= + ALWAYS_YES= + CCACHE_NAME= +-PYTHON2_BINARY=$(which python2.7 || which python2 || which python 2> /dev/null) ++PYTHON_BINARY=$(which python3 || which python || which python2.7 || which python2 || which python 2> /dev/null) + + UNAME_S=`uname -s` + if [[ $UNAME_S =~ 'Linux' ]]; then +@@ -573,7 +574,7 @@ export TARGET_PATH + + if [[ $HAS_LTTNG == 1 ]]; then + CHAKRACORE_ROOT=`dirname $0` +- "$PYTHON2_BINARY" $CHAKRACORE_ROOT/tools/lttng.py --man $CHAKRACORE_ROOT/manifests/Microsoft-Scripting-Chakra-Instrumentation.man --intermediate $TARGET_PATH/intermediate ++ "$PYTHON_BINARY" $CHAKRACORE_ROOT/tools/lttng.py --man $CHAKRACORE_ROOT/manifests/Microsoft-Scripting-Chakra-Instrumentation.man --intermediate $TARGET_PATH/intermediate + mkdir -p $TARGET_PATH/lttng + (diff -q $TARGET_PATH/intermediate/lttng/jscriptEtw.h $TARGET_PATH/lttng/jscriptEtw.h && echo "jscriptEtw.h up to date; skipping") || cp $TARGET_PATH/intermediate/lttng/* $TARGET_PATH/lttng/ + fi +@@ -582,8 +583,8 @@ fi + BUILD_DIRECTORY="${TARGET_PATH}/${BUILD_TYPE:0}" + echo "Build path: ${BUILD_DIRECTORY}" + +-BUILD_RELATIVE_DIRECTORY=$("$PYTHON2_BINARY" -c "import os.path;print \ +- os.path.relpath('${CHAKRACORE_DIR}', '$BUILD_DIRECTORY')") ++BUILD_RELATIVE_DIRECTORY=$("$PYTHON_BINARY" -c "from __future__ import print_function; import os.path;\ ++ print(os.path.relpath('${CHAKRACORE_DIR}', '$BUILD_DIRECTORY'))") + + ################# Write-barrier check/analyze run ################# + WB_FLAG= +@@ -639,7 +640,7 @@ fi + + # prepare DbgController.js.h + CH_DIR="${CHAKRACORE_DIR}/bin/ch" +-"${CH_DIR}/jstoc.py" "${CH_DIR}/DbgController.js" controllerScript ++"$PYTHON_BINARY" "${CH_DIR}/jstoc.py" "${CH_DIR}/DbgController.js" controllerScript + if [[ $? != 0 ]]; then + exit 1 + fi diff --git a/Patches/clickhouse-odbc/1.2.1.20220905-Utf8Proc.patch b/Patches/clickhouse-odbc/1.2.1.20220905-Utf8Proc.patch new file mode 100644 index 0000000000000..51805676fb5b7 --- /dev/null +++ b/Patches/clickhouse-odbc/1.2.1.20220905-Utf8Proc.patch @@ -0,0 +1,101 @@ +From 4973265f5fd18b661dc468bf429c298b8190ceef Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Sun, 1 Dec 2024 21:49:57 -0500 +Subject: [PATCH] wip + +Signed-off-by: Rui Chen +--- + CMakeLists.txt | 1 + + cmake/Modules/FindUtf8Proc.cmake | 68 ++++++++++++++++++++++++++++++++ + 2 files changed, 69 insertions(+) + create mode 100644 cmake/Modules/FindUtf8Proc.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e999a6a..06d4dff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,6 +137,7 @@ if (CH_ODBC_ENABLE_SSL) + endif () + + if (NOT CH_ODBC_PREFER_BUNDLED_POCO) ++ find_package(Utf8Proc REQUIRED) + find_package (Poco COMPONENTS Foundation Net NetSSL) + endif () + +diff --git a/cmake/Modules/FindUtf8Proc.cmake b/cmake/Modules/FindUtf8Proc.cmake +new file mode 100644 +index 0000000..6959031 +--- /dev/null ++++ b/cmake/Modules/FindUtf8Proc.cmake +@@ -0,0 +1,68 @@ ++#.rst: ++# FindUtf8Proc ++# -------- ++# ++# Find utf8proc ++# ++# Find the UTF-8 processing library ++# ++# :: ++# ++# This module defines the following variables: ++# UTF8PROC_FOUND - True if UTF8PROC_INCLUDE_DIR & UTF8PROC_LIBRARY are found ++# UTF8PROC_LIBRARIES - Set when UTF8PROC_LIBRARY is found ++# UTF8PROC_INCLUDE_DIRS - Set when UTF8PROC_INCLUDE_DIR is found ++# ++# ++# ++# :: ++# ++# UTF8PROC_INCLUDE_DIR - where to find utf8proc.h ++# UTF8PROC_LIBRARY - the utf8proc library ++ ++#============================================================================= ++# This module is adapted from FindALSA.cmake. Below are the original license ++# header. ++#============================================================================= ++# Copyright 2009-2011 Kitware, Inc. ++# Copyright 2009-2011 Philip Lowman ++# ++# Distributed under the OSI-approved BSD License (the "License"); ++# see accompanying file Copyright.txt for details. ++# ++# This software is distributed WITHOUT ANY WARRANTY; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# See the License for more information. ++#============================================================================= ++ ++find_path( ++ UTF8PROC_INCLUDE_DIR NAMES utf8proc.h DOC "The utf8proc include directory" ++) ++ ++find_library( ++ UTF8PROC_LIBRARY NAMES utf8proc DOC "The utf8proc library" ++) ++ ++# handle the QUIETLY and REQUIRED arguments and set UTF8PROC_FOUND to TRUE if ++# all listed variables are TRUE ++include(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS( ++ Utf8Proc ++ FOUND_VAR Utf8Proc_FOUND ++ REQUIRED_VARS UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR ++) ++ ++if(Utf8Proc_FOUND) ++ set( UTF8PROC_LIBRARIES ${UTF8PROC_LIBRARY} ) ++ set( UTF8PROC_INCLUDE_DIRS ${UTF8PROC_INCLUDE_DIR} ) ++endif() ++ ++if(Utf8Proc_FOUND AND NOT TARGET Utf8Proc::Utf8Proc) ++ add_library(Utf8Proc::Utf8Proc UNKNOWN IMPORTED) ++ set_target_properties(Utf8Proc::Utf8Proc PROPERTIES ++ IMPORTED_LOCATION "${UTF8PROC_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES "${UTF8PROC_INCLUDE_DIR}" ++ ) ++endif() ++ ++mark_as_advanced(UTF8PROC_INCLUDE_DIR UTF8PROC_LIBRARY) +-- +2.47.1 + diff --git a/Patches/clucene/patch-src-shared-CLucene-LuceneThreads.h.diff b/Patches/clucene/patch-src-shared-CLucene-LuceneThreads.h.diff new file mode 100644 index 0000000000000..eb593bcf3c0f4 --- /dev/null +++ b/Patches/clucene/patch-src-shared-CLucene-LuceneThreads.h.diff @@ -0,0 +1,13 @@ +https://sourceforge.net/p/clucene/bugs/219/ +--- a/src/shared/CLucene/LuceneThreads.h ++++ b/src/shared/CLucene/LuceneThreads.h +@@ -7,6 +7,9 @@ + #ifndef _LuceneThreads_h + #define _LuceneThreads_h + ++#if defined(_CL_HAVE_PTHREAD) ++ #include ++#endif + + CL_NS_DEF(util) + class CLuceneThreadIdCompare; diff --git a/Patches/clucene/patch-src-shared-CLucene-config-repl_tchar.h.diff b/Patches/clucene/patch-src-shared-CLucene-config-repl_tchar.h.diff new file mode 100644 index 0000000000000..9c120bc496ad6 --- /dev/null +++ b/Patches/clucene/patch-src-shared-CLucene-config-repl_tchar.h.diff @@ -0,0 +1,63 @@ +https://sourceforge.net/p/clucene/bugs/219/ +--- a/src/shared/CLucene/config/repl_tchar.h ++++ b/src/shared/CLucene/config/repl_tchar.h +@@ -28,26 +28,26 @@ + #define _istdigit iswdigit //* digit char check + #define _totlower towlower //* convert char to lower case + #define _totupper towupper //* convert char to lower case +- #define _tcslwr wcslwr //* convert string to lower case ++ #define _tcslwr std::wcslwr //* convert string to lower case + + //these are the string handling functions + //we may need to create wide-character/multi-byte replacements for these +- #define _tcscpy wcscpy //copy a string to another string +- #define _tcsncpy wcsncpy //copy a specified amount of one string to another string. +- #define _tcscat wcscat //copy a string onto the end of the other string +- #define _tcsncat wcsncat +- #define _tcschr wcschr //find location of one character +- #define _tcsstr wcsstr //find location of a string +- #define _tcslen wcslen //get length of a string +- #define _tcscmp wcscmp //case sensitive compare two strings +- #define _tcsncmp wcsncmp //case sensitive compare two strings +- #define _tcscspn wcscspn //location of any of a set of character in a string ++ #define _tcscpy std::wcscpy //copy a string to another string ++ #define _tcsncpy std::wcsncpy //copy a specified amount of one string to another string. ++ #define _tcscat std::wcscat //copy a string onto the end of the other string ++ #define _tcsncat std::wcsncat ++ #define _tcschr std::wcschr //find location of one character ++ #define _tcsstr std::wcsstr //find location of a string ++ #define _tcslen std::wcslen //get length of a string ++ #define _tcscmp std::wcscmp //case sensitive compare two strings ++ #define _tcsncmp std::wcsncmp //case sensitive compare two strings ++ #define _tcscspn std::wcscspn //location of any of a set of character in a string + + //string compare + #ifdef _CL_HAVE_FUNCTION_WCSICMP +- #define _tcsicmp wcsicmp //* case insensitive compare two string ++ #define _tcsicmp std::wcsicmp //* case insensitive compare two string + #else +- #define _tcsicmp wcscasecmp //* case insensitive compare two string ++ #define _tcsicmp std::wcscasecmp //* case insensitive compare two string + #endif + #if defined(_CL_HAVE_FUNCTION_WCSDUP) + #define _tcsdup wcsdup +@@ -56,8 +56,8 @@ + #endif + + //conversion functions +- #define _tcstod wcstod //convert a string to a double +- #define _tcstoi64 wcstoll //* convers a string to an 64bit bit integer ++ #define _tcstod std::wcstod //convert a string to a double ++ #define _tcstoi64 std::wcstoll //* convers a string to an 64bit bit integer + #define _itot _i64tot + #define _i64tot lltow //* converts a 64 bit integer to a string (with base) + #else //if defined(_ASCII) +@@ -105,7 +105,7 @@ + //some tchar headers miss these... + #ifndef _tcstoi64 + #if defined(_UCS2) +- #define _tcstoi64 wcstoll //* convers a string to an 64bit bit integer ++ #define _tcstoi64 std::wcstoll //* convers a string to an 64bit bit integer + #else + #define _tcstoi64 strtoll + #endif diff --git a/Patches/cmockery/0.1.2.patch b/Patches/cmockery/0.1.2.patch new file mode 100644 index 0000000000000..6172ed37c0fcd --- /dev/null +++ b/Patches/cmockery/0.1.2.patch @@ -0,0 +1,50 @@ +diff -uNr cmockery-0.1.2.orig/src/cmockery.c cmockery-0.1.2/src/cmockery.c +--- cmockery-0.1.2.orig/src/cmockery.c 2008-08-29 19:55:53.000000000 -0600 ++++ cmockery-0.1.2/src/cmockery.c 2009-05-31 15:29:25.000000000 -0600 +@@ -13,7 +13,12 @@ + * See the License for the specific language governing permissions and + * limitations under the License. + */ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #ifndef _WIN32 + #include +diff -uNr cmockery-0.1.2.orig/src/example/allocate_module.c cmockery-0.1.2/src/example/allocate_module.c +--- cmockery-0.1.2.orig/src/example/allocate_module.c 2008-08-29 16:23:29.000000000 -0600 ++++ cmockery-0.1.2/src/example/allocate_module.c 2009-05-31 15:29:48.000000000 -0600 +@@ -13,7 +13,13 @@ + * See the License for the specific language governing permissions and + * limitations under the License. + */ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++#ifdef HAVE_MALLOC_H + #include ++#endif ++#include + + #if UNIT_TESTING + extern void* _test_malloc(const size_t size, const char* file, const int line); +diff -uNr cmockery-0.1.2.orig/src/example/calculator.c cmockery-0.1.2/src/example/calculator.c +--- cmockery-0.1.2.orig/src/example/calculator.c 2008-08-29 16:23:29.000000000 -0600 ++++ cmockery-0.1.2/src/example/calculator.c 2009-05-31 15:30:08.000000000 -0600 +@@ -16,8 +16,13 @@ + + // A calculator example used to demonstrate the cmockery testing library. + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include + #include diff --git a/Patches/codecov-cli/support-python3.14.patch b/Patches/codecov-cli/support-python3.14.patch new file mode 100644 index 0000000000000..2bcc3e43470bb --- /dev/null +++ b/Patches/codecov-cli/support-python3.14.patch @@ -0,0 +1,117 @@ +diff --git a/Cargo.lock b/Cargo.lock +index fc148c3..acfb5d2 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -26,12 +26,6 @@ dependencies = [ + "serde", + ] + +-[[package]] +-name = "cfg-if" +-version = "1.0.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +- + [[package]] + name = "heck" + version = "0.5.0" +@@ -147,11 +141,10 @@ dependencies = [ + + [[package]] + name = "pyo3" +-version = "0.22.6" ++version = "0.25.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884" ++checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" + dependencies = [ +- "cfg-if", + "indoc", + "libc", + "memoffset", +@@ -165,9 +158,9 @@ dependencies = [ + + [[package]] + name = "pyo3-build-config" +-version = "0.22.6" ++version = "0.25.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38" ++checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" + dependencies = [ + "once_cell", + "target-lexicon", +@@ -175,9 +168,9 @@ dependencies = [ + + [[package]] + name = "pyo3-ffi" +-version = "0.22.6" ++version = "0.25.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636" ++checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" + dependencies = [ + "libc", + "pyo3-build-config", +@@ -185,9 +178,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros" +-version = "0.22.6" ++version = "0.25.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453" ++checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" + dependencies = [ + "proc-macro2", + "pyo3-macros-backend", +@@ -197,9 +190,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros-backend" +-version = "0.22.6" ++version = "0.25.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe" ++checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" + dependencies = [ + "heck", + "proc-macro2", +@@ -353,9 +346,9 @@ dependencies = [ + + [[package]] + name = "target-lexicon" +-version = "0.12.16" ++version = "0.13.3" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" ++checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" + + [[package]] + name = "test_results_parser" +diff --git a/Cargo.toml b/Cargo.toml +index a12ac11..8182dce 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -9,7 +9,7 @@ name = "test_results_parser" + crate-type = ["cdylib"] + + [dependencies] +-pyo3 = "0.22.2" ++pyo3 = "0.25" + quick-xml = "0.36.0" + regex = "1.10.4" + serde = { version = "1.0", features = ["derive"] } +diff --git a/src/lib.rs b/src/lib.rs +index 0d6d365..4868019 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -10,7 +10,7 @@ pyo3::create_exception!(test_results_parser, ParserError, PyException); + /// A Python module implemented in Rust. + #[pymodule] + fn test_results_parser(py: Python, m: &Bound) -> PyResult<()> { +- m.add("ParserError", py.get_type_bound::())?; ++ m.add("ParserError", py.get_type::())?; + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; diff --git a/Patches/ctags/5.8.patch b/Patches/ctags/5.8.patch new file mode 100644 index 0000000000000..2c5dbe250d3fb --- /dev/null +++ b/Patches/ctags/5.8.patch @@ -0,0 +1,47 @@ +diff -ur a/ctags-5.8/read.c b/ctags-5.8/read.c +--- a/ctags-5.8/read.c 2009-07-04 17:29:02.000000000 +1200 ++++ b/ctags-5.8/read.c 2012-11-04 16:19:27.000000000 +1300 +@@ -18,7 +18,6 @@ + #include + #include + +-#define FILE_WRITE + #include "read.h" + #include "debug.h" + #include "entry.h" +diff -ur a/ctags-5.8/read.h b/ctags-5.8/read.h +--- a/ctags-5.8/read.h 2008-04-30 13:45:57.000000000 +1200 ++++ b/ctags-5.8/read.h 2012-11-04 16:19:18.000000000 +1300 +@@ -11,12 +11,6 @@ + #ifndef _READ_H + #define _READ_H + +-#if defined(FILE_WRITE) || defined(VAXC) +-# define CONST_FILE +-#else +-# define CONST_FILE const +-#endif +- + /* + * INCLUDE FILES + */ +@@ -95,7 +89,7 @@ + /* + * GLOBAL VARIABLES + */ +-extern CONST_FILE inputFile File; ++extern inputFile File; + + /* + * FUNCTION PROTOTYPES +--- a/ctags-5.8/general.h 2007-05-02 23:21:08.000000000 -0400 ++++ b/ctags-5.8/general.h 2019-07-18 19:09:43.000000000 -0400 +@@ -56,7 +56,7 @@ + /* This is a helpful internal feature of later versions (> 2.7) of GCC + * to prevent warnings about unused variables. + */ +-#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !defined (__GNUG__) ++#if 0 + # define __unused__ __attribute__((unused)) + # define __printf__(s,f) __attribute__((format (printf, s, f))) + #else diff --git a/Patches/curlpp/curl-8.10.patch b/Patches/curlpp/curl-8.10.patch new file mode 100644 index 0000000000000..a95c027099e1a --- /dev/null +++ b/Patches/curlpp/curl-8.10.patch @@ -0,0 +1,98 @@ +From 7661e79c3442001ae6b616be91630952d18f07e4 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Wed, 5 Feb 2025 13:53:10 -0500 +Subject: [PATCH] curlpp: add build patch for curl 8.10 + +Signed-off-by: Rui Chen +--- + doc/guide.tex | 2 -- + include/curlpp/Options.hpp | 19 ++++++++++--------- + 2 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/doc/guide.tex b/doc/guide.tex +index 12165e7..76b5c59 100644 +--- a/doc/guide.tex ++++ b/doc/guide.tex +@@ -623,8 +623,6 @@ see the ``how to enhance cURLpp'' section. + cURL::CURLOPT_LOW_SPEED_TIME > LowSpeedTime; + typedef cURLpp::OptionTrait< long, + cURL::CURLOPT_MAXCONNECTS > MaxConnects; +- typedef cURLpp::OptionTrait< cURL::curl_closepolicy, +- cURL::CURLOPT_CLOSEPOLICY > ClosePolicy; + typedef cURLpp::OptionTrait< bool, + cURL::CURLOPT_FRESH_CONNECT > FreshConnect; + typedef cURLpp::OptionTrait< bool, +diff --git a/include/curlpp/Options.hpp b/include/curlpp/Options.hpp +index c705c9d..5b83469 100644 +--- a/include/curlpp/Options.hpp ++++ b/include/curlpp/Options.hpp +@@ -209,7 +209,6 @@ namespace options + */ + + typedef curlpp::OptionTrait AutoReferer; +- typedef curlpp::OptionTrait Encoding; + typedef curlpp::OptionTrait FollowLocation; + typedef curlpp::OptionTrait UnrestrictedAuth; + typedef curlpp::OptionTrait MaxRedirs; +@@ -240,13 +239,9 @@ namespace options + typedef curlpp::OptionTrait, CURLOPT_QUOTE> Quote; + typedef curlpp::OptionTrait, CURLOPT_POSTQUOTE> PostQuote; + typedef curlpp::OptionTrait, CURLOPT_PREQUOTE> PreQuote; +- typedef curlpp::OptionTrait FtpListOnly; +- typedef curlpp::OptionTrait FtpAppend; + typedef curlpp::OptionTrait FtpUseEpsv; + typedef curlpp::OptionTrait FtpFileMethod; + typedef curlpp::OptionTrait FtpCreateMissingDirs; +- typedef curlpp::OptionTrait FtpResponseTimeout; +- typedef curlpp::OptionTrait FtpSsl; + typedef curlpp::OptionTrait FtpSslAuth; + + +@@ -278,7 +273,6 @@ namespace options + typedef curlpp::OptionTrait LowSpeedLimit; + typedef curlpp::OptionTrait LowSpeedTime; + typedef curlpp::OptionTrait MaxConnects; +- typedef curlpp::OptionTrait ClosePolicy; + typedef curlpp::OptionTrait FreshConnect; + typedef curlpp::OptionTrait ForbidReuse; + typedef curlpp::OptionTrait ConnectTimeout; +@@ -291,10 +285,8 @@ namespace options + + typedef curlpp::OptionTrait SslCert; + typedef curlpp::OptionTrait SslCertType; +- typedef curlpp::OptionTrait SslCertPasswd; + typedef curlpp::OptionTrait SslKey; + typedef curlpp::OptionTrait SslKeyType; +- typedef curlpp::OptionTrait SslKeyPasswd; + typedef curlpp::OptionTrait SslEngine; + typedef curlpp::NoValueOptionTrait SslEngineDefault; + typedef curlpp::OptionTrait SslVersion; +@@ -305,7 +297,6 @@ namespace options + typedef curlpp::OptionTrait EgdSocket; + typedef curlpp::OptionTrait SslVerifyHost; + typedef curlpp::OptionTrait SslCipherList; +- typedef curlpp::OptionTrait Krb4Level; + + + /** +@@ -313,7 +304,17 @@ namespace options + */ + + typedef curlpp::OptionTrait Private; ++ ++#ifndef CURL_NO_OLDIES + typedef curlpp::OptionTrait Krb4Level; ++ typedef curlpp::OptionTrait SslKeyPasswd; ++ typedef curlpp::OptionTrait SslCertPasswd; ++ typedef curlpp::OptionTrait FtpSsl; ++ typedef curlpp::OptionTrait FtpResponseTimeout; ++ typedef curlpp::OptionTrait FtpAppend; ++ typedef curlpp::OptionTrait FtpListOnly; ++ typedef curlpp::OptionTrait Encoding; ++#endif + + + //Share; +-- +2.48.1 + diff --git a/Patches/cvs/vasnprintf-high-sierra-fix.diff b/Patches/cvs/vasnprintf-high-sierra-fix.diff new file mode 100644 index 0000000000000..acc9e26503af5 --- /dev/null +++ b/Patches/cvs/vasnprintf-high-sierra-fix.diff @@ -0,0 +1,17 @@ +--- a/lib/vasnprintf.c 2017-01-01 00:00:00.000000000 -0000 ++++ b/lib/vasnprintf.c 2017-01-01 00:00:00.000000000 -0000 +@@ -558,11 +558,13 @@ + } + *p = dp->conversion; + #if USE_SNPRINTF ++# if ! (defined __APPLE__ && defined __MACH__) + p[1] = '%'; + p[2] = 'n'; + p[3] = '\0'; +-#else ++# else + p[1] = '\0'; ++# endif + #endif + + /* Construct the arguments for calling snprintf or sprintf. */ diff --git a/Patches/daemontools/errno.patch b/Patches/daemontools/errno.patch new file mode 100644 index 0000000000000..af419d7321432 --- /dev/null +++ b/Patches/daemontools/errno.patch @@ -0,0 +1,203 @@ +diff --git a/daemontools-0.76/src/alloc.c b/daemontools-0.76/src/alloc.c +index c741aa4..418f774 100644 +--- a/daemontools-0.76/src/alloc.c ++++ b/daemontools-0.76/src/alloc.c +@@ -3,6 +3,7 @@ + #include + #include "alloc.h" + #include "error.h" ++#include "errno.h" + + #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */ + #define SPACE 2048 /* must be multiple of ALIGNMENT */ +diff --git a/daemontools-0.76/src/buffer_get.c b/daemontools-0.76/src/buffer_get.c +index 3a6e1b6..1d8b584 100644 +--- a/daemontools-0.76/src/buffer_get.c ++++ b/daemontools-0.76/src/buffer_get.c +@@ -3,6 +3,7 @@ + #include "buffer.h" + #include "byte.h" + #include "error.h" ++#include "errno.h" + + static int oneread(int (*op)(),int fd,char *buf,unsigned int len) + { +diff --git a/daemontools-0.76/src/buffer_put.c b/daemontools-0.76/src/buffer_put.c +index 23164b3..e41940d 100644 +--- a/daemontools-0.76/src/buffer_put.c ++++ b/daemontools-0.76/src/buffer_put.c +@@ -4,6 +4,7 @@ + #include "str.h" + #include "byte.h" + #include "error.h" ++#include "errno.h" + + static int allwrite(int (*op)(),int fd,const char *buf,unsigned int len) + { +diff --git a/daemontools-0.76/src/envdir.c b/daemontools-0.76/src/envdir.c +index beb1b1f..7fd901c 100644 +--- a/daemontools-0.76/src/envdir.c ++++ b/daemontools-0.76/src/envdir.c +@@ -2,6 +2,7 @@ + #include "byte.h" + #include "open.h" + #include "error.h" ++#include "errno.h" + #include "direntry.h" + #include "stralloc.h" + #include "openreadclose.h" +diff --git a/daemontools-0.76/src/fghack.c b/daemontools-0.76/src/fghack.c +index 34ca1db..d692f95 100644 +--- a/daemontools-0.76/src/fghack.c ++++ b/daemontools-0.76/src/fghack.c +@@ -1,6 +1,7 @@ + #include + #include "wait.h" + #include "error.h" ++#include "errno.h" + #include "strerr.h" + #include "buffer.h" + #include "pathexec.h" +diff --git a/daemontools-0.76/src/multilog.c b/daemontools-0.76/src/multilog.c +index be27a6a..e0c8053 100644 +--- a/daemontools-0.76/src/multilog.c ++++ b/daemontools-0.76/src/multilog.c +@@ -6,6 +6,7 @@ + #include "buffer.h" + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "open.h" + #include "lock.h" + #include "scan.h" +diff --git a/daemontools-0.76/src/openreadclose.c b/daemontools-0.76/src/openreadclose.c +index 635933b..5500c61 100644 +--- a/daemontools-0.76/src/openreadclose.c ++++ b/daemontools-0.76/src/openreadclose.c +@@ -1,6 +1,7 @@ + /* Public domain. */ + + #include "error.h" ++#include "errno.h" + #include "open.h" + #include "readclose.h" + #include "openreadclose.h" +diff --git a/daemontools-0.76/src/pathexec_run.c b/daemontools-0.76/src/pathexec_run.c +index 1770ac7..eed116f 100644 +--- a/daemontools-0.76/src/pathexec_run.c ++++ b/daemontools-0.76/src/pathexec_run.c +@@ -1,6 +1,7 @@ + /* Public domain. */ + + #include "error.h" ++#include "errno.h" + #include "stralloc.h" + #include "str.h" + #include "env.h" +diff --git a/daemontools-0.76/src/readclose.c b/daemontools-0.76/src/readclose.c +index 9d83007..8fcf493 100644 +--- a/daemontools-0.76/src/readclose.c ++++ b/daemontools-0.76/src/readclose.c +@@ -2,6 +2,7 @@ + + #include + #include "error.h" ++#include "errno.h" + #include "readclose.h" + + int readclose_append(int fd,stralloc *sa,unsigned int bufsize) +diff --git a/daemontools-0.76/src/readproctitle.c b/daemontools-0.76/src/readproctitle.c +index 82fbffd..b891474 100644 +--- a/daemontools-0.76/src/readproctitle.c ++++ b/daemontools-0.76/src/readproctitle.c +@@ -1,5 +1,6 @@ + #include + #include "error.h" ++#include "errno.h" + + int main(int argc,char **argv) + { +diff --git a/daemontools-0.76/src/strerr_sys.c b/daemontools-0.76/src/strerr_sys.c +index 84b302f..ec47c90 100644 +--- a/daemontools-0.76/src/strerr_sys.c ++++ b/daemontools-0.76/src/strerr_sys.c +@@ -1,6 +1,7 @@ + /* Public domain. */ + + #include "error.h" ++#include "errno.h" + #include "strerr.h" + + struct strerr strerr_sys; +diff --git a/daemontools-0.76/src/supervise.c b/daemontools-0.76/src/supervise.c +index 2482ad2..5adb774 100644 +--- a/daemontools-0.76/src/supervise.c ++++ b/daemontools-0.76/src/supervise.c +@@ -5,6 +5,7 @@ + #include "sig.h" + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "fifo.h" + #include "open.h" + #include "lock.h" +diff --git a/daemontools-0.76/src/svc.c b/daemontools-0.76/src/svc.c +index 4a8c8c1..ff8bfc4 100644 +--- a/daemontools-0.76/src/svc.c ++++ b/daemontools-0.76/src/svc.c +@@ -2,6 +2,7 @@ + #include "ndelay.h" + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "open.h" + #include "sgetopt.h" + #include "buffer.h" +diff --git a/daemontools-0.76/src/svok.c b/daemontools-0.76/src/svok.c +index d29abcc..18c458e 100644 +--- a/daemontools-0.76/src/svok.c ++++ b/daemontools-0.76/src/svok.c +@@ -1,6 +1,7 @@ + #include + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "open.h" + + #define FATAL "svok: fatal: " +diff --git a/daemontools-0.76/src/svscan.c b/daemontools-0.76/src/svscan.c +index 15a8c89..e8bf0e3 100644 +--- a/daemontools-0.76/src/svscan.c ++++ b/daemontools-0.76/src/svscan.c +@@ -4,6 +4,7 @@ + #include "direntry.h" + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "wait.h" + #include "coe.h" + #include "fd.h" +diff --git a/daemontools-0.76/src/svstat.c b/daemontools-0.76/src/svstat.c +index fcc4732..cddbcf7 100644 +--- a/daemontools-0.76/src/svstat.c ++++ b/daemontools-0.76/src/svstat.c +@@ -3,6 +3,7 @@ + #include + #include "strerr.h" + #include "error.h" ++#include "errno.h" + #include "open.h" + #include "fmt.h" + #include "tai.h" +diff --git a/daemontools-0.76/src/wait_pid.c b/daemontools-0.76/src/wait_pid.c +index c2869b8..91c0fb1 100644 +--- a/daemontools-0.76/src/wait_pid.c ++++ b/daemontools-0.76/src/wait_pid.c +@@ -3,6 +3,7 @@ + #include + #include + #include "error.h" ++#include "errno.h" + #include "haswaitp.h" + + #ifdef HASWAITPID diff --git a/Patches/daemontools/posix-headers.patch b/Patches/daemontools/posix-headers.patch new file mode 100644 index 0000000000000..b6427f3fe9573 --- /dev/null +++ b/Patches/daemontools/posix-headers.patch @@ -0,0 +1,81 @@ +diff -u a/daemontools-0.76/src/lock_ex.c b/daemontools-0.76/src/lock_ex.c +--- a/daemontools-0.76/src/lock_ex.c ++++ b/daemontools-0.76/src/lock_ex.c +@@ -1,5 +1,6 @@ + /* Public domain. */ + ++#include + #include + #include + #include +diff -u a/daemontools-0.76/src/lock_exnb.c b/daemontools-0.76/src/lock_exnb.c +--- a/daemontools-0.76/src/lock_exnb.c ++++ b/daemontools-0.76/src/lock_exnb.c +@@ -1,5 +1,6 @@ + /* Public domain. */ + ++#include + #include + #include + #include +diff -u a/daemontools-0.76/src/matchtest.c b/daemontools-0.76/src/matchtest.c +--- a/daemontools-0.76/src/matchtest.c ++++ b/daemontools-0.76/src/matchtest.c +@@ -1,3 +1,4 @@ ++#include + #include "match.h" + #include "buffer.h" + #include "str.h" +diff -u a/daemontools-0.76/src/multilog.c b/daemontools-0.76/src/multilog.c +--- a/daemontools-0.76/src/multilog.c ++++ b/daemontools-0.76/src/multilog.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#include + #include "direntry.h" + #include "alloc.h" + #include "buffer.h" +diff -u a/daemontools-0.76/src/pathexec_run.c b/daemontools-0.76/src/pathexec_run.c +--- a/daemontools-0.76/src/pathexec_run.c ++++ b/daemontools-0.76/src/pathexec_run.c +@@ -1,5 +1,6 @@ + /* Public domain. */ + ++#include + #include "error.h" + #include "stralloc.h" + #include "str.h" +diff -u a/daemontools-0.76/src/prot.c b/daemontools-0.76/src/prot.c +--- a/daemontools-0.76/src/prot.c ++++ b/daemontools-0.76/src/prot.c +@@ -1,5 +1,6 @@ + /* Public domain. */ + ++#include + #include "hasshsgr.h" + #include "prot.h" + +diff -u a/daemontools-0.76/src/seek_set.c b/daemontools-0.76/src/seek_set.c +--- a/daemontools-0.76/src/seek_set.c ++++ b/daemontools-0.76/src/seek_set.c +@@ -1,6 +1,7 @@ + /* Public domain. */ + + #include ++#include + #include "seek.h" + + #define SET 0 /* sigh */ +diff -u a/daemontools-0.76/src/supervise.c b/daemontools-0.76/src/supervise.c +--- a/daemontools-0.76/src/supervise.c ++++ b/daemontools-0.76/src/supervise.c +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include "sig.h" + #include "strerr.h" + #include "error.h" diff --git a/Patches/darkstat/clock_gettime.patch b/Patches/darkstat/clock_gettime.patch new file mode 100644 index 0000000000000..e07f1b134e614 --- /dev/null +++ b/Patches/darkstat/clock_gettime.patch @@ -0,0 +1,14 @@ +--- a/now.c 2015-05-24 09:40:25.000000000 +0200 ++++ b/now.c 2017-10-08 13:02:23.000000000 +0200 +@@ -30,9 +30,11 @@ + # include + # include + ++# if (__MAC_OS_X_VERSION_MAX_ALLOWED < 101200) + typedef int clockid_t; + # define CLOCK_REALTIME 0 + # define CLOCK_MONOTONIC 1 ++# endif + + static uint64_t mono_first = 0; + diff --git a/Patches/datasette/support-python3.14.patch b/Patches/datasette/support-python3.14.patch new file mode 100644 index 0000000000000..8584ce96fcc76 --- /dev/null +++ b/Patches/datasette/support-python3.14.patch @@ -0,0 +1,132 @@ +diff --git a/datasette/app.py b/datasette/app.py +index 999d6aa6..804ab044 100644 +--- a/datasette/app.py ++++ b/datasette/app.py +@@ -7,11 +7,11 @@ import functools + import glob + import hashlib + import httpx ++import importlib.metadata + import inspect + from itsdangerous import BadSignature + import json + import os +-import pkg_resources + import re + import secrets + import sys +@@ -921,9 +921,9 @@ class Datasette: + if using_pysqlite3: + for package in ("pysqlite3", "pysqlite3-binary"): + try: +- info["pysqlite3"] = pkg_resources.get_distribution(package).version ++ info["pysqlite3"] = importlib.metadata.version(package) + break +- except pkg_resources.DistributionNotFound: ++ except importlib.metadata.PackageNotFoundError: + pass + return info + +diff --git a/datasette/cli.py b/datasette/cli.py +index fd65ea94..d1310c46 100644 +--- a/datasette/cli.py ++++ b/datasette/cli.py +@@ -41,6 +41,18 @@ from .utils.sqlite import sqlite3 + from .utils.testing import TestClient + from .version import __version__ + ++ ++def run_sync(coro_func): ++ """Run an async callable to completion on a fresh event loop.""" ++ loop = asyncio.new_event_loop() ++ try: ++ asyncio.set_event_loop(loop) ++ return loop.run_until_complete(coro_func()) ++ finally: ++ asyncio.set_event_loop(None) ++ loop.close() ++ ++ + # Use Rich for tracebacks if it is installed + try: + from rich.traceback import install +@@ -182,8 +194,7 @@ def inspect(files, inspect_file, sqlite_extensions): + operations against immutable database files. + """ + app = Datasette([], immutables=files, sqlite_extensions=sqlite_extensions) +- loop = asyncio.get_event_loop() +- inspect_data = loop.run_until_complete(inspect_(files, sqlite_extensions)) ++ inspect_data = run_sync(lambda: inspect_(files, sqlite_extensions)) + if inspect_file == "-": + sys.stdout.write(json.dumps(inspect_data, indent=2)) + else: +@@ -610,10 +621,10 @@ def serve( + return ds + + # Run the "startup" plugin hooks +- asyncio.get_event_loop().run_until_complete(ds.invoke_startup()) ++ run_sync(lambda: ds.invoke_startup()) + + # Run async soundness checks - but only if we're not under pytest +- asyncio.get_event_loop().run_until_complete(check_databases(ds)) ++ run_sync(lambda: check_databases(ds)) + + if get: + client = TestClient(ds) +@@ -633,9 +644,7 @@ def serve( + if open_browser: + if url is None: + # Figure out most convenient URL - to table, database or homepage +- path = asyncio.get_event_loop().run_until_complete( +- initial_path_for_datasette(ds) +- ) ++ path = run_sync(lambda: initial_path_for_datasette(ds)) + url = f"http://{host}:{port}{path}" + webbrowser.open(url) + uvicorn_kwargs = dict( +diff --git a/datasette/plugins.py b/datasette/plugins.py +index fef0c8e9..29644a92 100644 +--- a/datasette/plugins.py ++++ b/datasette/plugins.py +@@ -1,6 +1,6 @@ +-import importlib ++import importlib.metadata ++import importlib.resources + import pluggy +-import pkg_resources + import sys + from . import hookspecs + +@@ -40,16 +40,16 @@ def get_plugins(): + templates_path = None + if plugin.__name__ not in DEFAULT_PLUGINS: + try: +- if pkg_resources.resource_isdir(plugin.__name__, "static"): +- static_path = pkg_resources.resource_filename( +- plugin.__name__, "static" ++ if (importlib.resources.files(plugin.__name__) / "static").is_dir(): ++ static_path = str( ++ importlib.resources.files(plugin.__name__) / "static" + ) +- if pkg_resources.resource_isdir(plugin.__name__, "templates"): +- templates_path = pkg_resources.resource_filename( +- plugin.__name__, "templates" ++ if (importlib.resources.files(plugin.__name__) / "templates").is_dir(): ++ templates_path = str( ++ importlib.resources.files(plugin.__name__) / "templates" + ) +- except (KeyError, ImportError): +- # Caused by --plugins_dir= plugins - KeyError/ImportError thrown in Py3.5 ++ except (TypeError, ModuleNotFoundError): ++ # Caused by --plugins_dir= plugins + pass + plugin_info = { + "name": plugin.__name__, +@@ -60,6 +60,6 @@ def get_plugins(): + distinfo = plugin_to_distinfo.get(plugin) + if distinfo: + plugin_info["version"] = distinfo.version +- plugin_info["name"] = distinfo.project_name ++ plugin_info["name"] = distinfo.name + plugins.append(plugin_info) + return plugins diff --git a/Patches/dirac/1.0.2.patch b/Patches/dirac/1.0.2.patch new file mode 100644 index 0000000000000..43c75eae57f72 --- /dev/null +++ b/Patches/dirac/1.0.2.patch @@ -0,0 +1,45 @@ +diff --git a/configure b/configure +index 41329b9..8f5ed19 100755 +--- a/configure ++++ b/configure +@@ -15903,30 +15903,8 @@ ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS" + use_msvc=no + + +-case "$CXX" in +- cl*|CL*) +- CXXFLAGS="-nologo -W1 -EHsc -DWIN32" +- if test x"$enable_shared" = "xyes"; then +- LIBEXT=".dll"; +- LIBFLAGS="-DLL -INCREMENTAL:NO" +- CXXFLAGS="$CXXFLAGS -D_WINDLL" +- else +- LIBEXT=".lib"; +- LIBFLAGS="-lib" +- fi +- RANLIB="echo" +- use_msvc=yes +- ;; +- *) +- ;; +-esac +- if test x"$use_msvc" = "xyes"; then +- USE_MSVC_TRUE= +- USE_MSVC_FALSE='#' +-else + USE_MSVC_TRUE='#' + USE_MSVC_FALSE= +-fi + + + +@@ -22678,7 +22656,8 @@ $debug || + if test -n "$CONFIG_FILES"; then + + +-ac_cr=' ' ++ac_cr=' ++' + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' diff --git a/Patches/dmg2img/openssl-3.diff b/Patches/dmg2img/openssl-3.diff new file mode 100644 index 0000000000000..843f42ed01711 --- /dev/null +++ b/Patches/dmg2img/openssl-3.diff @@ -0,0 +1,129 @@ +--- vfdecrypt.c.old 2019-09-11 14:46:50.000000000 +0200 ++++ vfdecrypt.c 2019-09-11 14:46:53.000000000 +0200 +@@ -183,7 +183,7 @@ + pwhdr->encrypted_keyblob_size = htonl(pwhdr->encrypted_keyblob_size); + } + +-HMAC_CTX hmacsha1_ctx; ++HMAC_CTX *hmacsha1_ctx; + AES_KEY aes_decrypt_key; + int CHUNK_SIZE=4096; // default + +@@ -196,9 +196,9 @@ + unsigned int mdLen; + + chunk_no = OSSwapHostToBigInt32(chunk_no); +- HMAC_Init_ex(&hmacsha1_ctx, NULL, 0, NULL, NULL); +- HMAC_Update(&hmacsha1_ctx, (void *) &chunk_no, sizeof(uint32_t)); +- HMAC_Final(&hmacsha1_ctx, mdResult, &mdLen); ++ HMAC_Init_ex(hmacsha1_ctx, NULL, 0, NULL, NULL); ++ HMAC_Update(hmacsha1_ctx, (void *) &chunk_no, sizeof(uint32_t)); ++ HMAC_Final(hmacsha1_ctx, mdResult, &mdLen); + memcpy(iv, mdResult, CIPHER_BLOCKSIZE); + } + +@@ -212,47 +212,45 @@ + /* DES3-EDE unwrap operation loosely based on to RFC 2630, section 12.6 + * wrapped_key has to be 40 bytes in length. */ + int apple_des3_ede_unwrap_key(uint8_t *wrapped_key, int wrapped_key_len, uint8_t *decryptKey, uint8_t *unwrapped_key) { +- EVP_CIPHER_CTX ctx; ++ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); + uint8_t *TEMP1, *TEMP2, *CEKICV; + uint8_t IV[8] = { 0x4a, 0xdd, 0xa2, 0x2c, 0x79, 0xe8, 0x21, 0x05 }; + int outlen, tmplen, i; + +- EVP_CIPHER_CTX_init(&ctx); + /* result of the decryption operation shouldn't be bigger than ciphertext */ + TEMP1 = malloc(wrapped_key_len); + TEMP2 = malloc(wrapped_key_len); + CEKICV = malloc(wrapped_key_len); + /* uses PKCS#7 padding for symmetric key operations by default */ +- EVP_DecryptInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, decryptKey, IV); ++ EVP_DecryptInit_ex(ctx, EVP_des_ede3_cbc(), NULL, decryptKey, IV); + +- if(!EVP_DecryptUpdate(&ctx, TEMP1, &outlen, wrapped_key, wrapped_key_len)) { ++ if(!EVP_DecryptUpdate(ctx, TEMP1, &outlen, wrapped_key, wrapped_key_len)) { + fprintf(stderr, "internal error (1) during key unwrap operation!\n"); + return(-1); + } +- if(!EVP_DecryptFinal_ex(&ctx, TEMP1 + outlen, &tmplen)) { ++ if(!EVP_DecryptFinal_ex(ctx, TEMP1 + outlen, &tmplen)) { + fprintf(stderr, "internal error (2) during key unwrap operation!\n"); + return(-1); + } + outlen += tmplen; +- EVP_CIPHER_CTX_cleanup(&ctx); + + /* reverse order of TEMP3 */ + for(i = 0; i < outlen; i++) TEMP2[i] = TEMP1[outlen - i - 1]; + +- EVP_CIPHER_CTX_init(&ctx); ++ EVP_CIPHER_CTX_reset(ctx); + /* uses PKCS#7 padding for symmetric key operations by default */ +- EVP_DecryptInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, decryptKey, TEMP2); +- if(!EVP_DecryptUpdate(&ctx, CEKICV, &outlen, TEMP2+8, outlen-8)) { ++ EVP_DecryptInit_ex(ctx, EVP_des_ede3_cbc(), NULL, decryptKey, TEMP2); ++ if(!EVP_DecryptUpdate(ctx, CEKICV, &outlen, TEMP2+8, outlen-8)) { + fprintf(stderr, "internal error (3) during key unwrap operation!\n"); + return(-1); + } +- if(!EVP_DecryptFinal_ex(&ctx, CEKICV + outlen, &tmplen)) { ++ if(!EVP_DecryptFinal_ex(ctx, CEKICV + outlen, &tmplen)) { + fprintf(stderr, "internal error (4) during key unwrap operation!\n"); + return(-1); + } + + outlen += tmplen; +- EVP_CIPHER_CTX_cleanup(&ctx); ++ EVP_CIPHER_CTX_free(ctx); + + memcpy(unwrapped_key, CEKICV+4, outlen-4); + free(TEMP1); +@@ -279,7 +277,7 @@ + int unwrap_v2_header(char *passphrase, cencrypted_v2_pwheader *header, uint8_t *aes_key, uint8_t *hmacsha1_key) { + /* derived key is a 3DES-EDE key */ + uint8_t derived_key[192/8]; +- EVP_CIPHER_CTX ctx; ++ EVP_CIPHER_CTX *ctx; + uint8_t *TEMP1; + int outlen, tmplen; + +@@ -288,22 +286,22 @@ + + print_hex(derived_key, 192/8); + +- EVP_CIPHER_CTX_init(&ctx); ++ ctx = EVP_CIPHER_CTX_new(); + /* result of the decryption operation shouldn't be bigger than ciphertext */ + TEMP1 = malloc(header->encrypted_keyblob_size); + /* uses PKCS#7 padding for symmetric key operations by default */ +- EVP_DecryptInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, derived_key, header->blob_enc_iv); ++ EVP_DecryptInit_ex(ctx, EVP_des_ede3_cbc(), NULL, derived_key, header->blob_enc_iv); + +- if(!EVP_DecryptUpdate(&ctx, TEMP1, &outlen, header->encrypted_keyblob, header->encrypted_keyblob_size)) { ++ if(!EVP_DecryptUpdate(ctx, TEMP1, &outlen, header->encrypted_keyblob, header->encrypted_keyblob_size)) { + fprintf(stderr, "internal error (1) during key unwrap operation!\n"); + return(-1); + } +- if(!EVP_DecryptFinal_ex(&ctx, TEMP1 + outlen, &tmplen)) { ++ if(!EVP_DecryptFinal_ex(ctx, TEMP1 + outlen, &tmplen)) { + fprintf(stderr, "internal error (2) during key unwrap operation!\n"); + return(-1); + } + outlen += tmplen; +- EVP_CIPHER_CTX_cleanup(&ctx); ++ EVP_CIPHER_CTX_free(ctx); + memcpy(aes_key, TEMP1, 16); + memcpy(hmacsha1_key, TEMP1, 20); + +@@ -446,8 +444,8 @@ + CHUNK_SIZE = v2header.blocksize; + } + +- HMAC_CTX_init(&hmacsha1_ctx); +- HMAC_Init_ex(&hmacsha1_ctx, hmacsha1_key, sizeof(hmacsha1_key), EVP_sha1(), NULL); ++ hmacsha1_ctx = HMAC_CTX_new(); ++ HMAC_Init_ex(hmacsha1_ctx, hmacsha1_key, sizeof(hmacsha1_key), EVP_sha1(), NULL); + AES_set_decrypt_key(aes_key, CIPHER_KEY_LENGTH * 8, &aes_decrypt_key); + + if (verbose >= 1) { diff --git a/Patches/docbook-xsl/docbook-xsl-nons-1.79.2-stack_fix-1.patch b/Patches/docbook-xsl/docbook-xsl-nons-1.79.2-stack_fix-1.patch new file mode 100644 index 0000000000000..eaba57963f735 --- /dev/null +++ b/Patches/docbook-xsl/docbook-xsl-nons-1.79.2-stack_fix-1.patch @@ -0,0 +1,39 @@ +Submitted By: Bruce Dubbs +Date: 2018-01-01 +Initial Package Version: 1.78.1 +Upstream Status: Unsure +Origin: Peter De Wachter +Description: use EXSLT "replace" function when available + A recursive implementation of string.subst is problematic, + long strings with many matches will cause stack overflows. +Author: Peter De Wachter +Bug-Debian: https://bugs.debian.org/750593 + +Rediffed for 1.79.2 by Bruce Dubbs + +diff -Naur docbook-xsl-1.79.2.orig/lib/lib.xsl docbook-xsl-1.79.2/lib/lib.xsl +--- docbook-xsl-1.79.2.orig/lib/lib.xsl 2016-12-09 16:41:39.000000000 -0600 ++++ docbook-xsl-1.79.2/lib/lib.xsl 2018-01-01 12:54:52.507332514 -0600 +@@ -6,7 +6,11 @@ + + This module implements DTD-independent functions + +- ******************************************************************** --> ++ ******************************************************************** --> ++ + + + +@@ -52,6 +56,9 @@ + + + ++ ++ ++ + + + diff --git a/Patches/dvdbackup/compat.patch b/Patches/dvdbackup/compat.patch new file mode 100644 index 0000000000000..dea8de6e74f55 --- /dev/null +++ b/Patches/dvdbackup/compat.patch @@ -0,0 +1,88 @@ +diff --git a/src/dvdbackup.c b/src/dvdbackup.c +index 5888ce5..b076a76 100644 +--- a/src/dvdbackup.c ++++ b/src/dvdbackup.c +@@ -1132,7 +1132,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in + int size; + + /* DVD handler */ +- ifo_handle_t* ifo_file = NULL; ++ dvd_file_t* ifo_file = NULL; + + + if (title_set_info->number_of_title_sets + 1 < title_set) { +@@ -1181,7 +1181,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in + if ((streamout_ifo = open(targetname_ifo, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) { + fprintf(stderr, _("Error creating %s\n"), targetname_ifo); + perror(PACKAGE); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); +@@ -1191,7 +1191,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in + if ((streamout_bup = open(targetname_bup, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) { + fprintf(stderr, _("Error creating %s\n"), targetname_bup); + perror(PACKAGE); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); +@@ -1200,31 +1200,31 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in + + /* Copy VIDEO_TS.IFO, since it's a small file try to copy it in one shot */ + +- if ((ifo_file = ifoOpen(dvd, title_set))== 0) { ++ if ((ifo_file = DVDOpenFile(dvd, title_set, DVD_READ_INFO_FILE))== 0) { + fprintf(stderr, _("Failed opening IFO for title set %d\n"), title_set); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); + return 1; + } + +- size = DVDFileSize(ifo_file->file) * DVD_VIDEO_LB_LEN; ++ size = DVDFileSize(ifo_file) * DVD_VIDEO_LB_LEN; + + if ((buffer = (unsigned char *)malloc(size * sizeof(unsigned char))) == NULL) { + perror(PACKAGE); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); + return 1; + } + +- DVDFileSeek(ifo_file->file, 0); ++ DVDFileSeek(ifo_file, 0); + +- if (DVDReadBytes(ifo_file->file,buffer,size) != size) { ++ if (DVDReadBytes(ifo_file,buffer,size) != size) { + fprintf(stderr, _("Error reading IFO for title set %d\n"), title_set); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); +@@ -1234,7 +1234,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in + + if (write(streamout_ifo,buffer,size) != size) { + fprintf(stderr, _("Error writing %s\n"),targetname_ifo); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); +@@ -1243,7 +1243,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in + + if (write(streamout_bup,buffer,size) != size) { + fprintf(stderr, _("Error writing %s\n"),targetname_bup); +- ifoClose(ifo_file); ++ DVDCloseFile(ifo_file); + free(buffer); + close(streamout_ifo); + close(streamout_bup); diff --git a/Patches/dvdrtools/patch-cdda2wav-cdda2wav.c b/Patches/dvdrtools/patch-cdda2wav-cdda2wav.c new file mode 100644 index 0000000000000..3840df0233c8f --- /dev/null +++ b/Patches/dvdrtools/patch-cdda2wav-cdda2wav.c @@ -0,0 +1,12 @@ +--- cdda2wav/cdda2wav.c 2005-02-06 00:32:49.000000000 +1100 ++++ ../dvdrtools-0.2.1-patched/cdda2wav/cdda2wav.c 2005-09-15 18:28:59.000000000 +1000 +@@ -958,7 +958,7 @@ + dontneedroot(); + } + #else +-#if defined _POSIX_PRIORITY_SCHEDULING ++#if defined _POSIX_PRIORITY_SCHEDULING && (_POSIX_PRIORITY_SCHEDULING -0 > 0) + #include + + static void + diff --git a/Patches/dvdrtools/patch-cdrecord-cdrecord.c b/Patches/dvdrtools/patch-cdrecord-cdrecord.c new file mode 100644 index 0000000000000..64ff1f5f06753 --- /dev/null +++ b/Patches/dvdrtools/patch-cdrecord-cdrecord.c @@ -0,0 +1,12 @@ +--- cdrecord/cdrecord.c 2005-02-06 07:55:22.000000000 +1100 ++++ ../dvdrtools-0.2.1-patched/cdrecord/cdrecord.c 2005-09-15 18:30:08.000000000 +1000 +@@ -2935,7 +2935,7 @@ + + #else /* HAVE_SYS_PRIOCNTL_H */ + +-#if defined(_POSIX_PRIORITY_SCHEDULING) ++#if defined _POSIX_PRIORITY_SCHEDULING && (_POSIX_PRIORITY_SCHEDULING -0 > 0) + /* + * XXX Ugly but needed because of a typo in /usr/iclude/sched.h on Linux. + * XXX This should be removed as soon as we are sure that Linux-2.0.29 is gone. + diff --git a/Patches/dvdrtools/patch-scsi-mac-iokit.c b/Patches/dvdrtools/patch-scsi-mac-iokit.c new file mode 100644 index 0000000000000..a45792580423f --- /dev/null +++ b/Patches/dvdrtools/patch-scsi-mac-iokit.c @@ -0,0 +1,19 @@ +diff -Naur libscg/scsi-mac-iokit.c libscg-patched/scsi-mac-iokit.c +--- libscg/scsi-mac-iokit.c Sat Feb 5 14:32:50 2005 ++++ libscg-patched/scsi-mac-iokit.c Mon Feb 14 13:48:11 2005 +@@ -55,7 +55,14 @@ + #include + #include + #include +-#include ++ ++/* VERSION is used as an identifier somewhere in the Apple headers. */ ++#define AVOID_COLLISION_SAVE_VERSION VERSION ++#undef VERSION ++#include ++#define VERSION AVOID_COLLISION_SAVE_VERSION ++#undef AVOID_COLLISION_SAVE_VERSION ++ + #include + + struct scg_local { diff --git a/Patches/ekg2/0.3.1.patch b/Patches/ekg2/0.3.1.patch new file mode 100644 index 0000000000000..27826ee4dadaa --- /dev/null +++ b/Patches/ekg2/0.3.1.patch @@ -0,0 +1,72 @@ +diff --git a/compat/strlcat.c b/compat/strlcat.c +index 6077d66..c1c1804 100644 +--- a/compat/strlcat.c ++++ b/compat/strlcat.c +@@ -14,7 +14,7 @@ + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +- ++#ifndef strlcat + #include + + size_t strlcat(char *dst, const char *src, size_t size) +@@ -39,7 +39,7 @@ size_t strlcat(char *dst, const char *src, size_t size) + + return dlen + j; + } +- ++#endif + /* + * Local Variables: + * mode: c +diff --git a/compat/strlcat.h b/compat/strlcat.h +index cb91fcb..df8f4b0 100644 +--- a/compat/strlcat.h ++++ b/compat/strlcat.h +@@ -1,7 +1,8 @@ ++#ifndef strlcat + #include + + size_t strlcat(char *dst, const char *src, size_t size); +- ++#endif + /* + * Local Variables: + * mode: c +diff --git a/compat/strlcpy.c b/compat/strlcpy.c +index 31e41bd..4a40762 100644 +--- a/compat/strlcpy.c ++++ b/compat/strlcpy.c +@@ -14,7 +14,7 @@ + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +- ++#ifndef strlcpy + #include + + size_t strlcpy(char *dst, const char *src, size_t size) +@@ -32,7 +32,7 @@ size_t strlcpy(char *dst, const char *src, size_t size) + + return i; + } +- ++#endif + /* + * Local Variables: + * mode: c +diff --git a/compat/strlcpy.h b/compat/strlcpy.h +index 1c80e20..93340af 100644 +--- a/compat/strlcpy.h ++++ b/compat/strlcpy.h +@@ -1,7 +1,8 @@ ++#ifndef strlcpy + #include + + size_t strlcpy(char *dst, const char *src, size_t size); +- ++#endif + /* + * Local Variables: + * mode: c diff --git a/Patches/ettercap/libmaxminddb-backport.diff b/Patches/ettercap/libmaxminddb-backport.diff new file mode 100644 index 0000000000000..94e02c40cdf87 --- /dev/null +++ b/Patches/ettercap/libmaxminddb-backport.diff @@ -0,0 +1,850 @@ +diff --git a/cmake/Modules/EttercapLibCheck.cmake b/cmake/Modules/EttercapLibCheck.cmake +index 3717e826636b5bb3eea08a4c36f7453b8b2c9832..2bc1dc9ac72a39206742bb2fbb557b92ccc4f078 100644 +--- a/cmake/Modules/EttercapLibCheck.cmake ++++ b/cmake/Modules/EttercapLibCheck.cmake +@@ -205,13 +205,13 @@ else() + endif() + + if(ENABLE_GEOIP) +- message(STATUS "GeoIP support requested. Will look for the legacy GeoIP C library") ++ message(STATUS "GeoIP support requested. Will look for the MaxMind GeoIP C library") + find_package(GEOIP) + if(GEOIP_FOUND) + set(HAVE_GEOIP 1) + set(EC_LIBS ${EC_LIBS} ${GEOIP_LIBRARIES}) + else() +- message(FATAL_ERROR "GeoIP not found!") ++ message(FATAL_ERROR "MaxMind GeoIP not found!") + endif() + endif() + +diff --git a/cmake/Modules/FindGEOIP.cmake b/cmake/Modules/FindGEOIP.cmake +index 96315ea8d32bc4e3bd9940c1bec4012dcc0a9f29..f5cd746737497c6d0a294f7ad3f00dfdb1b835e7 100644 +--- a/cmake/Modules/FindGEOIP.cmake ++++ b/cmake/Modules/FindGEOIP.cmake +@@ -21,10 +21,10 @@ else() + endif() + + find_package(PkgConfig) +-pkg_search_module(GEOIP geoip) ++pkg_search_module(GEOIP libmaxminddb) + + # Find the header +-find_path(GEOIP_INCLUDE_DIR GeoIP.h ++find_path(GEOIP_INCLUDE_DIR maxminddb.h + HINTS + "${GEOIP_INCLUDEDIR}" + "${GEOIP_ROOT}" +@@ -33,7 +33,7 @@ find_path(GEOIP_INCLUDE_DIR GeoIP.h + + # Find the library + find_library(GEOIP_LIBRARY +- NAMES GeoIP libGeoIP-1 ++ NAMES maxminddb + HINTS + "${GEOIP_LIBDIR}" + "${GEOIP_ROOT}" +diff --git a/include/ec_geoip.h b/include/ec_geoip.h +index 345894c48ea0e84836698f71cb1895e715b795c5..45999526d062bb5f9ab0e3b7f8ed2749a92e10a3 100644 +--- a/include/ec_geoip.h ++++ b/include/ec_geoip.h +@@ -6,9 +6,12 @@ + #include + + #ifdef HAVE_GEOIP ++#define MMDB_FILENAME "GeoLite2-Country.mmdb" ++#define MAX_GEOIP_STR_LEN 31 ++#define GEOIP_CCODE 1 ++#define GEOIP_CNAME 2 + EC_API_EXTERN void geoip_init (void); +-EC_API_EXTERN const char* geoip_ccode_by_ip (struct ip_addr *ip); +-EC_API_EXTERN const char* geoip_country_by_ip (struct ip_addr *ip); ++EC_API_EXTERN char* geoip_get_by_ip (struct ip_addr *ip, const int get_type, char* buffer, size_t len); + #endif + + #endif +diff --git a/man/etter.conf.5.in b/man/etter.conf.5.in +index 824c063b53a6b8ca356c8c6272b3dc06c59ecfac..2582eff8bb89df5c74eb3cc3d638f493cc7cc68d 100644 +--- a/man/etter.conf.5.in ++++ b/man/etter.conf.5.in +@@ -317,6 +317,12 @@ However, sniffing can be stopped and started at any time while ettercap runs. + This option controls if GeoIP information shall be processed for IP addresses + whether or not ettercap has been built with GeoIP support. + ++.TP ++.B geoip_data_file ++This option may point to a local GeoLite2 database downloaded from ++Maxmind which might be more recent than the database bundled with Ettercap. ++If the option is left blank, the bundled database file will be used. ++ + .TP + .B gtkui_prefer_dark_theme + This option tries to enforce the dark variant of the applied theme. However +diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt +index 55214ec9c0281cdadb72a55142b8371acefe0c9c..ac4d163fb00f033755f972b967e91f08378fd8be 100644 +--- a/share/CMakeLists.txt ++++ b/share/CMakeLists.txt +@@ -37,6 +37,10 @@ if(NOT NO_INSTALL_LICENSE) + set(EC_DATAFILES ${EC_DATAFILES} ../LICENSE) + endif() + ++if(HAVE_GEOIP) ++ set(EC_DATAFILES ${EC_DATAFILES} GeoLite2-Country.mmdb) ++endif() ++ + foreach(f IN LISTS EC_DATAFILES EC_CONFFILES) + configure_file(${f} ${f} COPYONLY) + endforeach() +diff --git a/share/etter.conf.v4 b/share/etter.conf.v4 +index 13798414e31e2d5362ebfcde843818c803baebc9..f5c3dcb36afb7a58d27173952acc5358c710ec8e 100644 +--- a/share/etter.conf.v4 ++++ b/share/etter.conf.v4 +@@ -149,10 +149,8 @@ utf8_encoding = "ISO-8859-1" + # the command used by the remote_browser plugin + remote_browser = "xdg-open http://%host%url" + +-# location of the GeoIP database file in case it's not the standard location +-# this is mostly necessary on Windows or if libgeoip is manually build +-geoip_data_file = "/usr/local/share/GeoIP/GeoIP.dat" +-geoip_data_file_v6 = "/usr/local/share/GeoIP/GeoIPv6.dat" ++# alternative location of the GeoIP database file ++geoip_data_file = "" + + + ##################################### +diff --git a/share/etter.conf.v6 b/share/etter.conf.v6 +index ccdf0976a9607bfb057f8dc9e13ad9295a24eca7..8664ca3058683095e278eb617ebf1415b8916bb1 100644 +--- a/share/etter.conf.v6 ++++ b/share/etter.conf.v6 +@@ -155,10 +155,8 @@ utf8_encoding = "ISO-8859-1" + # the command used by the remote_browser plugin + remote_browser = "xdg-open http://%host%url" + +-# location of the GeoIP database file in case it's not the standard location +-# this is mostly necessary on Windows or if libgeoip is manually build +-geoip_data_file = "/usr/local/share/GeoIP/GeoIP.dat" +-geoip_data_file_v6 = "/usr/local/share/GeoIP/GeoIPv6.dat" ++# alternative location of the GeoIP database file ++geoip_data_file = "" + + + ##################################### +diff --git a/src/ec_conntrack.c b/src/ec_conntrack.c +index 02af8e9620ed944a55d008d89a39dae6d5d42196..5dd7c15590f6289c3914822bad3e3b5efa2aca44 100644 +--- a/src/ec_conntrack.c ++++ b/src/ec_conntrack.c +@@ -617,6 +617,8 @@ void * conntrack_print(int mode, void *list, char **desc, size_t len) + char proto[2], status[8], flags[2]; + #ifdef HAVE_GEOIP + size_t slen; ++ char src_ccode[3]; ++ char dst_ccode[3]; + #endif + + /* NULL is used to retrieve the first element */ +@@ -650,8 +652,8 @@ void * conntrack_print(int mode, void *list, char **desc, size_t len) + /* check if enough space is available to append the GeoIP info */ + if (len - slen > 14 && EC_GBL_CONF->geoip_support_enable) { + snprintf(*desc + slen, len - slen, ", CC: %2s > %2s", +- geoip_ccode_by_ip(&c->co->L3_addr1), +- geoip_ccode_by_ip(&c->co->L3_addr2)); ++ geoip_get_by_ip(&c->co->L3_addr1, GEOIP_CCODE, src_ccode, 3), ++ geoip_get_by_ip(&c->co->L3_addr2, GEOIP_CCODE, dst_ccode, 3)); + } + #endif + } +@@ -824,7 +826,9 @@ int conntrack_statusstr(struct conn_object *conn, char *pstr, int len) + int conntrack_countrystr(struct conn_object *conn, char *pstr, int len) + { + #ifdef HAVE_GEOIP +- const char *ccode_src, *ccode_dst = NULL; ++ char ccode_src[3]; ++ char ccode_dst[3]; ++ char *src, *dst; + #endif + + if (pstr == NULL || conn == NULL || len < 8) +@@ -834,13 +838,13 @@ int conntrack_countrystr(struct conn_object *conn, char *pstr, int len) + if (!EC_GBL_CONF->geoip_support_enable) + return -E_INITFAIL; + +- if ((ccode_src = geoip_ccode_by_ip(&conn->L3_addr1)) == NULL) ++ if ((src = geoip_get_by_ip(&conn->L3_addr1, GEOIP_CCODE, ccode_src, 3)) == NULL) + return -E_INITFAIL; + +- if ((ccode_dst = geoip_ccode_by_ip(&conn->L3_addr2)) == NULL) ++ if ((dst = geoip_get_by_ip(&conn->L3_addr2, GEOIP_CCODE, ccode_dst, 3)) == NULL) + return -E_INITFAIL; + +- snprintf(pstr, len, "%2s > %2s", ccode_src, ccode_dst); ++ snprintf(pstr, len, "%2s > %2s", src, dst); + #endif + + return E_SUCCESS; +diff --git a/src/ec_geoip.c b/src/ec_geoip.c +index 41b2b68d4e1dcfe447f4bc971e7afc8c1a58470b..5f91f00e76722b632b7a722ad9fee596d08249d1 100644 +--- a/src/ec_geoip.c ++++ b/src/ec_geoip.c +@@ -21,186 +21,183 @@ + + #include + #include ++#include + + #ifdef HAVE_GEOIP + +-#include ++#include + +-static GeoIP *gi = NULL; +-#ifdef WITH_IPV6 +-static GeoIP *gi6 = NULL; +-#endif +- +-static void geoip_exit (void) +-{ +- GeoIP_delete (gi); +- gi = NULL; +-#ifdef WITH_IPV6 +- GeoIP_delete(gi6); +- gi6 = NULL; +-#endif +- GeoIP_cleanup(); +-} ++static MMDB_s* mmdb = NULL; + +-void geoip_init (void) ++static int geoip_open(const char* filename) + { +- char *gi_info; +- +- /* try to find and open it in the default location */ +- gi = GeoIP_open_type(GEOIP_COUNTRY_EDITION, GEOIP_MEMORY_CACHE); ++ int ret; + +- /* not found, fallback in the configuration file value */ +- if(!gi) { ++ ret = MMDB_open(filename, MMDB_MODE_MMAP, mmdb); ++ if (ret != MMDB_SUCCESS) { // Default path to GeoIP Database didn't worked out + +- if (!EC_GBL_CONF->geoip_data_file) +- return; ++ WARN_MSG("geoip_init: MaxMind database file %s cannot be opened: %s", ++ filename, MMDB_strerror(ret)); + +- gi = GeoIP_open (EC_GBL_CONF->geoip_data_file, GEOIP_MEMORY_CACHE); +- if (!gi) +- { +- DEBUG_MSG ("geoip_init: %s not found.", EC_GBL_CONF->geoip_data_file); +- GeoIP_cleanup(); +- return; +- } ++ if (ret == MMDB_IO_ERROR) ++ DEBUG_MSG("geoip_init: IO Error opening database file '%s': %s", ++ filename, strerror(errno)); + } +- gi_info = GeoIP_database_info (gi); + +- DEBUG_MSG ("geoip_init: Description: %s.", +- GeoIPDBDescription[GEOIP_COUNTRY_EDITION]); +- DEBUG_MSG ("geoip_init: Info: %s. Countries: %u", +- gi_info ? gi_info : "", GeoIP_num_countries()); ++ return ret; ++} + +- atexit (geoip_exit); ++static void geoip_exit (void) ++{ ++ MMDB_close(mmdb); ++ SAFE_FREE(mmdb); ++} + +- SAFE_FREE(gi_info); +- gi_info = NULL; ++void geoip_init (void) ++{ ++ int ret; ++ const char* mmdb_default_file; ++ MMDB_description_s* descr; + +-#ifdef WITH_IPV6 ++ SAFE_CALLOC(mmdb, 1, sizeof(MMDB_s)); + +- /* try to find and open it in the default location */ +- gi6 = GeoIP_open_type(GEOIP_COUNTRY_EDITION_V6, GEOIP_MEMORY_CACHE); ++ /* Database file delivered with Ettercap installation */ ++ mmdb_default_file = INSTALL_DATADIR "/" PROGRAM "/" MMDB_FILENAME; + +- /* not found, fallback in the configuration file value */ +- if (!gi6) { +- if (!EC_GBL_CONF->geoip_data_file_v6) +- return; ++ /* First try to open alternative database file if one is provided */ ++ if (EC_GBL_CONF->geoip_data_file && strlen(EC_GBL_CONF->geoip_data_file)) { + +- gi6 = GeoIP_open(EC_GBL_CONF->geoip_data_file_v6, GEOIP_MEMORY_CACHE); +- if (!gi6) { +- DEBUG_MSG("geoip_init: %s not found.\n", +- EC_GBL_CONF->geoip_data_file_v6); +- return; +- } +- } ++ ret = geoip_open(EC_GBL_CONF->geoip_data_file); + +- gi_info = GeoIP_database_info(gi6); ++ /* No success to open alternative database file - fallback to default */ ++ if (ret != MMDB_SUCCESS) ++ ret = geoip_open(mmdb_default_file); ++ } ++ /* No alternative database file set - use default */ ++ else ++ ret = geoip_open(mmdb_default_file); ++ ++ /* No success opening the alternative or the default database file */ ++ if (ret != MMDB_SUCCESS) { ++ SAFE_FREE(mmdb); ++ return; ++ } + +- DEBUG_MSG("geoip_init: Description: %s.", +- GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]); +- DEBUG_MSG("geoip_init: Info: %s. Countries: %u", +- gi_info ? gi_info : "", GeoIP_num_countries()); ++ /* Metainfo of MaxMind DB for debug purpose */ ++ descr = mmdb->metadata.description.descriptions[0]; ++ DEBUG_MSG("geoip_init: Description: %s Lang: %s.", ++ descr->description, descr->language); ++ DEBUG_MSG("geoip_init: Info: IP version: %d, Epoch: %lu", ++ mmdb->metadata.ip_version, mmdb->metadata.build_epoch); + +- SAFE_FREE(gi_info); +- gi_info = NULL; ++ /* Output mandatory attribution for Maxmind Geolite2 database */ ++ USER_MSG("This product includes GeoLite2 Data created by MaxMind, available from https://www.maxmind.com/.\n"); + +-#endif ++ /* Cleanup */ ++ atexit (geoip_exit); + } + + /* +- * returns the country code string for a given IP address ... +- * - the two letter country code from GeoIP database +- * - "00" if ip address is the default or undefined address +- * - "--" if ip address is not global ++ * returns the GeoIP information for a given IP address ... + * return NULL if GeoIP API isn't initialized properly + */ +-const char* geoip_ccode_by_ip (struct ip_addr *ip) ++char* geoip_get_by_ip (struct ip_addr *ip, const int get_type, char* buffer, size_t len) + { +- int id; ++ int ret, mmdb_error; ++ struct sockaddr_storage ss; ++ struct sockaddr* sa; ++ struct sockaddr_in* sa4; + #ifdef WITH_IPV6 +- struct in6_addr geo_ip6; ++ struct sockaddr_in6* sa6; + #endif + char tmp[MAX_ASCII_ADDR_LEN]; + +- /* 0.0.0.0 or :: */ +- if (ip_addr_is_zero(ip)) { +- return "00"; ++ MMDB_lookup_result_s result; ++ MMDB_entry_data_s entry; ++ ++ if (get_type == GEOIP_CCODE) { ++ /* 0.0.0.0 or :: */ ++ if (ip_addr_is_zero(ip)) { ++ return "00"; ++ } ++ ++ /* only global IP addresses can have a location */ ++ if (!ip_addr_is_global(ip)) { ++ return "--"; ++ } + } + +- /* only global IP addresses can have a location */ +- if (!ip_addr_is_global(ip)) { +- return "--"; ++ /* not initialized - database file couldn't be opened */ ++ if (!mmdb) { ++ DEBUG_MSG("geoip_ccode_by_ip: MaxMind API not initialized"); ++ return NULL; + } + +- /* Determine country id by IP address */ ++ /* Convert ip_addr struct to sockaddr struct */ ++ sa = (struct sockaddr *) &ss; + switch (ntohs(ip->addr_type)) { + case AF_INET: +- if (!gi) +- return NULL; +- id = GeoIP_id_by_ipnum(gi, ntohl(*ip->addr32)); ++ sa4 = (struct sockaddr_in *) &ss; ++ sa4->sin_family = ntohs(ip->addr_type); ++ ip_addr_cpy((u_char*)&sa4->sin_addr.s_addr, ip); + break; + #ifdef WITH_IPV6 + case AF_INET6: +- if (!gi6) +- return NULL; +- ip_addr_cpy((u_char *)geo_ip6.s6_addr, ip); +- id = GeoIP_id_by_ipnum_v6(gi6, geo_ip6); ++ sa6 = (struct sockaddr_in6 *) &ss; ++ sa6->sin6_family = ntohs(ip->addr_type); ++ ip_addr_cpy((u_char*)&sa6->sin6_addr.s6_addr, ip); + break; + #endif + default: + return NULL; + } + +- DEBUG_MSG("geoip_ccode_by_ip: GeoIP country code for ip %s: %s", +- ip_addr_ntoa(ip, tmp), GeoIP_code_by_id(id)); +- +- return GeoIP_code_by_id(id); +-} ++ result = MMDB_lookup_sockaddr(mmdb, sa, &mmdb_error); + +-/* +- * returns the country name string for a given IP address +- * return NULL if GeoIP API isn't initialized properly +- */ +-const char* geoip_country_by_ip (struct ip_addr *ip) +-{ +- int id; +-#ifdef WITH_IPV6 +- struct in6_addr geo_ip6; +-#endif +- char tmp[MAX_ASCII_ADDR_LEN]; +- +- /* 0.0.0.0 or :: */ +- if (ip_addr_is_zero(ip)) { +- return "No unique location"; ++ if (mmdb_error != MMDB_SUCCESS) { ++ DEBUG_MSG("geoip_ccode_by_ip: Error looking up IP address %s in maxmind database", ++ ip_addr_ntoa(ip, tmp)); ++ return NULL; + } + +- /* only global IP addresses can have a location */ +- if (!ip_addr_is_global(ip)) { +- return "No unique location"; +- } +- +- /* Determine country id by IP address */ +- switch (ntohs(ip->addr_type)) { +- case AF_INET: +- if (!gi) +- return NULL; +- id = GeoIP_id_by_ipnum(gi, ntohl(*ip->addr32)); +- break; +-#ifdef WITH_IPV6 +- case AF_INET6: +- if (!gi6) ++ if (result.found_entry) { ++ switch (get_type) { ++ case GEOIP_CCODE: ++ ret = MMDB_get_value(&result.entry, &entry, "country", "iso_code", NULL); ++ break; ++ case GEOIP_CNAME: ++ ret = MMDB_get_value(&result.entry, &entry, "country", "names", "en", NULL); ++ break; ++ default: + return NULL; +- ip_addr_cpy((u_char *)geo_ip6.s6_addr, ip); +- id = GeoIP_id_by_ipnum_v6(gi6, geo_ip6); +- break; +-#endif +- default: ++ break; ++ } ++ if (ret != MMDB_SUCCESS) { ++ DEBUG_MSG("Error extracting entry from result: %s", MMDB_strerror(ret)); + return NULL; ++ } ++ if (entry.has_data) { ++ if (entry.type == MMDB_DATA_TYPE_UTF8_STRING) { ++ /* zero buffer */ ++ memset(buffer, 0, len); ++ /* make sure to copy the exact string or less */ ++ if (len <= entry.data_size) ++ len = len-1; ++ else ++ len = entry.data_size; ++ memcpy(buffer, entry.utf8_string, len); ++ } ++ } + } ++ else ++ return "--"; + +- DEBUG_MSG("geoip_country_by_ip: GeoIP country name for ip %s: %s", +- ip_addr_ntoa(ip, tmp), GeoIP_name_by_id(id)); ++ /* Determine country id by IP address */ ++ DEBUG_MSG("geoip_get_by_ip(%d): GeoIP information for ip %s: %s", ++ get_type, ip_addr_ntoa(ip, tmp), buffer); + +- return GeoIP_name_by_id(id); ++ return buffer; + } + ++ + #endif /* HAVE_GEOIP */ +diff --git a/src/ec_passive.c b/src/ec_passive.c +index ac61b694db9ff5c8bb338b38b883d291bcd95003..d2c6bfd0ae11118cd0f60982253ff88781b2ac02 100644 +--- a/src/ec_passive.c ++++ b/src/ec_passive.c +@@ -83,6 +83,9 @@ void print_host(struct host_profile *h) + struct active_user *u; + char tmp[MAX_ASCII_ADDR_LEN]; + char os[OS_LEN+1]; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + memset(os, 0, sizeof(os)); + +@@ -93,7 +96,7 @@ void print_host(struct host_profile *h) + + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) +- fprintf(stdout, " Location : %s \n", geoip_country_by_ip(&h->L3_addr)); ++ fprintf(stdout, " Location : %s \n", geoip_get_by_ip(&h->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN)); + #endif + + fprintf(stdout, "\n"); +@@ -161,6 +164,9 @@ void print_host_xml(struct host_profile *h) + struct active_user *u; + char tmp[MAX_ASCII_ADDR_LEN]; + char os[OS_LEN+1]; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + memset(os, 0, sizeof(os)); + +@@ -171,7 +177,7 @@ void print_host_xml(struct host_profile *h) + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) + fprintf(stdout, "\t\t%s\n", +- geoip_country_by_ip(&h->L3_addr)); ++ geoip_get_by_ip(&h->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN)); + #endif + + if (h->type & FP_HOST_LOCAL || h->type == FP_UNKNOWN) { +diff --git a/src/ec_profiles.c b/src/ec_profiles.c +index ca53ee31a12b2770e9561d17c13b0f0b52c8cd95..342eb54fec96ccc5a5e67102fb7371053b1874ba 100644 +--- a/src/ec_profiles.c ++++ b/src/ec_profiles.c +@@ -643,6 +643,7 @@ void * profile_print(int mode, void *list, char **desc, size_t len) + int found = 0; + #ifdef HAVE_GEOIP + size_t slen; ++ char country[MAX_GEOIP_STR_LEN]; + #endif + + /* search at least one account */ +@@ -663,7 +664,7 @@ void * profile_print(int mode, void *list, char **desc, size_t len) + /* check if enough space is available to append the GeoIP info */ + if (len - slen > 14 && EC_GBL_CONF->geoip_support_enable) { + snprintf(*desc + slen, len - slen, ", %s", +- geoip_country_by_ip(&h->L3_addr)); ++ geoip_get_by_ip(&h->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN)); + } + #endif + +diff --git a/src/interfaces/curses/ec_curses_view_connections.c b/src/interfaces/curses/ec_curses_view_connections.c +index ae2171538dcd340a3428596dc23d304a3347c116..16937863acb4990fcf9576b04c345af0737af7bb 100644 +--- a/src/interfaces/curses/ec_curses_view_connections.c ++++ b/src/interfaces/curses/ec_curses_view_connections.c +@@ -156,6 +156,10 @@ static void curses_connection_detail(void *conn) + char *proto = ""; + char name[MAX_HOSTNAME_LEN]; + unsigned int row = 0; ++#ifdef HAVE_GEOIP ++ char src_country[MAX_GEOIP_STR_LEN]; ++ char dst_country[MAX_GEOIP_STR_LEN]; ++#endif + + DEBUG_MSG("curses_connection_detail"); + +@@ -196,7 +200,7 @@ static void curses_connection_detail(void *conn) + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) + wdg_window_print(wdg_conn_detail, 1, ++row, "Source location : %s", +- geoip_country_by_ip(&c->co->L3_addr1)); ++ geoip_get_by_ip(&c->co->L3_addr1, GEOIP_CNAME, src_country, MAX_GEOIP_STR_LEN)); + #endif + + wdg_window_print(wdg_conn_detail, 1, ++row, "Destination IP address : %s", +@@ -206,7 +210,7 @@ static void curses_connection_detail(void *conn) + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) + wdg_window_print(wdg_conn_detail, 1, ++row, "Destination location : %s", +- geoip_country_by_ip(&c->co->L3_addr2)); ++ geoip_get_by_ip(&c->co->L3_addr2, GEOIP_CNAME, dst_country, MAX_GEOIP_STR_LEN)); + #endif + ++row; + +diff --git a/src/interfaces/curses/ec_curses_view_profiles.c b/src/interfaces/curses/ec_curses_view_profiles.c +index 61e123a82d82b6d7a7fb739fee4dd71ee2126605..5fa5dd1d03582370554ecb76228e076ef64c9283 100644 +--- a/src/interfaces/curses/ec_curses_view_profiles.c ++++ b/src/interfaces/curses/ec_curses_view_profiles.c +@@ -137,6 +137,9 @@ static void curses_profile_detail(void *profile) + struct active_user *u; + char tmp[MAX_ASCII_ADDR_LEN]; + char os[OS_LEN+1]; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + DEBUG_MSG("curses_profile_detail"); + +@@ -170,7 +173,8 @@ static void curses_profile_detail(void *profile) + + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) +- wdg_scroll_print(wdg_pro_detail, EC_COLOR, " Location : %s \n", geoip_country_by_ip(&h->L3_addr)); ++ wdg_scroll_print(wdg_pro_detail, EC_COLOR, " Location : %s \n", ++ geoip_get_by_ip(&h->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN)); + #endif + + wdg_scroll_print(wdg_pro_detail, EC_COLOR, "\n"); +diff --git a/src/interfaces/gtk/ec_gtk.c b/src/interfaces/gtk/ec_gtk.c +index a1a8f94062556220a80b3c96cd10a250df5b61e8..3ace9bf11049cfa89e3df13073d91db9c9a1a7e4 100644 +--- a/src/interfaces/gtk/ec_gtk.c ++++ b/src/interfaces/gtk/ec_gtk.c +@@ -411,6 +411,14 @@ void gtkui_about(void) + label = gtk_label_new("www.ettercap-project.org"); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); ++#ifdef HAVE_GEOIP ++ if (EC_GBL_CONF->geoip_support_enable) { ++ label = gtk_label_new("This product includes GeoLite2 Data created by MaxMind,"); ++ gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); ++ label = gtk_label_new("available from https://www.maxmind.com/."); ++ gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); ++ } ++#endif + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new("General")); + + /* Authors page */ +diff --git a/src/interfaces/gtk/ec_gtk_view_connections.c b/src/interfaces/gtk/ec_gtk_view_connections.c +index a73bff90386f65759fca61f97f648fd45beaf447..7ebd0019f7d445df75cc51ed2a632be617b0fe90 100644 +--- a/src/interfaces/gtk/ec_gtk_view_connections.c ++++ b/src/interfaces/gtk/ec_gtk_view_connections.c +@@ -630,6 +630,10 @@ static void gtkui_connection_detail(void) + char name[MAX_HOSTNAME_LEN]; + gchar *str, *markup; + guint nrows = 14, ncols = 3, row = 0, col = 0; ++#ifdef HAVE_GEOIP ++ char src_country[MAX_GEOIP_STR_LEN]; ++ char dst_country[MAX_GEOIP_STR_LEN]; ++#endif + + DEBUG_MSG("gtk_connection_detail"); + +@@ -742,7 +746,7 @@ static void gtkui_connection_detail(void) + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, GTK_FILL, 0, 0); + +- label = gtk_label_new(geoip_country_by_ip(&c->co->L3_addr1)); ++ label = gtk_label_new(geoip_get_by_ip(&c->co->L3_addr1, GEOIP_CNAME, src_country, MAX_GEOIP_STR_LEN)); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_table_attach_defaults(GTK_TABLE(table), label, col+1, col+3, row, row+1); +@@ -790,7 +794,7 @@ static void gtkui_connection_detail(void) + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, GTK_FILL, 0, 0); + +- label = gtk_label_new(geoip_country_by_ip(&c->co->L3_addr2)); ++ label = gtk_label_new(geoip_get_by_ip(&c->co->L3_addr2, GEOIP_CNAME, dst_country, MAX_GEOIP_STR_LEN)); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_table_attach_defaults(GTK_TABLE(table), label, col+1, col+3, row, row+1); +diff --git a/src/interfaces/gtk/ec_gtk_view_profiles.c b/src/interfaces/gtk/ec_gtk_view_profiles.c +index b6ea41713501c31ff67606bde8c44736c6762be2..9d5ef1b33ff636e5dc19f501caa1ba65350e27cd 100644 +--- a/src/interfaces/gtk/ec_gtk_view_profiles.c ++++ b/src/interfaces/gtk/ec_gtk_view_profiles.c +@@ -192,6 +192,9 @@ static gboolean refresh_profiles(gpointer data) + char tmp[MAX_ASCII_ADDR_LEN]; + char name[MAX_HOSTNAME_LEN]; + int found = 0; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + /* variable not used */ + (void) data; +@@ -271,7 +274,7 @@ static gboolean refresh_profiles(gpointer data) + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) + gtk_list_store_set(ls_profiles, &iter, +- 3, geoip_country_by_ip(&hcurr->L3_addr), -1); ++ 3, geoip_get_by_ip(&hcurr->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN), -1); + #endif + + /* treat hostname resolution differently due to async processing */ +@@ -313,6 +316,9 @@ static void gtkui_profile_detail(void) + char os[OS_LEN+1]; + gchar *str, *markup; + guint nrows = 2, ncols = 3, col = 0, row = 0; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + + DEBUG_MSG("gtkui_profile_detail"); +@@ -392,7 +398,7 @@ static void gtkui_profile_detail(void) + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, GTK_FILL, 0, 0); + +- label = gtk_label_new(geoip_country_by_ip(&h->L3_addr)); ++ label = gtk_label_new(geoip_get_by_ip(&h->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN)); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_table_attach_defaults(GTK_TABLE(table), label, col+1, col+3, row, row+1); +diff --git a/src/interfaces/gtk3/ec_gtk3.c b/src/interfaces/gtk3/ec_gtk3.c +index a3ab2ed6e74d9e00541a8d62a22c03cc6a6ce887..f89618a44b4ca0495235d488aa06f378d76bbd02 100644 +--- a/src/interfaces/gtk3/ec_gtk3.c ++++ b/src/interfaces/gtk3/ec_gtk3.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -433,6 +434,14 @@ void gtkui_about(GSimpleAction *action, GVariant *value, gpointer data) + gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); + label = gtk_label_new("#ettercap on FreeNode IRC"); + gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); ++#ifdef HAVE_GEOIP ++ if (EC_GBL_CONF->geoip_support_enable) { ++ label = gtk_label_new("This product includes GeoLite2 Data created by MaxMind,"); ++ gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); ++ label = gtk_label_new("available from https://www.maxmind.com/."); ++ gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); ++ } ++#endif + label = gtk_label_new(" "); + gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 30); + gtk_stack_add_titled(GTK_STACK(stack), vbox, "general", "General"); +diff --git a/src/interfaces/gtk3/ec_gtk3_view_connections.c b/src/interfaces/gtk3/ec_gtk3_view_connections.c +index 4b8ecad8d10944c16c4f69bfdb28c9eca5782767..ed8617fc73c378e9d53f45fc4aa5257ce7927925 100644 +--- a/src/interfaces/gtk3/ec_gtk3_view_connections.c ++++ b/src/interfaces/gtk3/ec_gtk3_view_connections.c +@@ -641,6 +641,10 @@ static void gtkui_connection_detail(void) + char name[MAX_HOSTNAME_LEN]; + gchar *str, *markup; + guint row = 0, col = 0; ++#ifdef HAVE_GEOIP ++ char src_country[MAX_GEOIP_STR_LEN]; ++ char dst_country[MAX_GEOIP_STR_LEN]; ++#endif + + DEBUG_MSG("gtk_connection_detail"); + +@@ -759,7 +763,7 @@ static void gtkui_connection_detail(void) + gtk_widget_set_halign(label, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(grid), label, col, row, 1, 1); + +- label = gtk_label_new(geoip_country_by_ip(&c->co->L3_addr1)); ++ label = gtk_label_new(geoip_get_by_ip(&c->co->L3_addr1, GEOIP_CNAME, src_country, MAX_GEOIP_STR_LEN)); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_widget_set_halign(label, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(grid), label, col+1, row, 2, 1); +@@ -807,7 +811,7 @@ static void gtkui_connection_detail(void) + gtk_widget_set_halign(label, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(grid), label, col, row, 1, 1); + +- label = gtk_label_new(geoip_country_by_ip(&c->co->L3_addr2)); ++ label = gtk_label_new(geoip_get_by_ip(&c->co->L3_addr2, GEOIP_CNAME, dst_country, MAX_GEOIP_STR_LEN)); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_widget_set_halign(label, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(grid), label, col+1, row, 2, 1); +diff --git a/src/interfaces/gtk3/ec_gtk3_view_profiles.c b/src/interfaces/gtk3/ec_gtk3_view_profiles.c +index 55c7b628202b886d4ad500aa4b74de9907e831d1..b8286387b9fd77717ee2fa3a200825654366fdf8 100644 +--- a/src/interfaces/gtk3/ec_gtk3_view_profiles.c ++++ b/src/interfaces/gtk3/ec_gtk3_view_profiles.c +@@ -205,6 +205,9 @@ static gboolean refresh_profiles(gpointer data) + char tmp[MAX_ASCII_ADDR_LEN]; + char name[MAX_HOSTNAME_LEN]; + int found = 0; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + /* variable not used */ + (void) data; +@@ -284,7 +287,7 @@ static gboolean refresh_profiles(gpointer data) + #ifdef HAVE_GEOIP + if (EC_GBL_CONF->geoip_support_enable) + gtk_list_store_set(ls_profiles, &iter, +- 3, geoip_country_by_ip(&hcurr->L3_addr), -1); ++ 3, geoip_get_by_ip(&hcurr->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN), -1); + #endif + + /* treat hostname resolution differently due to async processing */ +@@ -326,6 +329,9 @@ static void gtkui_profile_detail(void) + char os[OS_LEN+1]; + gchar *str, *markup; + guint col = 0, row = 0; ++#ifdef HAVE_GEOIP ++ char country[MAX_GEOIP_STR_LEN]; ++#endif + + + DEBUG_MSG("gtkui_profile_detail"); +@@ -411,7 +417,7 @@ static void gtkui_profile_detail(void) + gtk_widget_set_halign(label, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(grid), label, col, row, 1, 1); + +- label = gtk_label_new(geoip_country_by_ip(&h->L3_addr)); ++ label = gtk_label_new(geoip_get_by_ip(&h->L3_addr, GEOIP_CNAME, country, MAX_GEOIP_STR_LEN)); + gtk_label_set_selectable(GTK_LABEL(label), TRUE); + gtk_widget_set_halign(label, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(grid), label, col+1, row, 2, 1); +diff --git a/src/lua/share/core/ettercap_ffi.lua b/src/lua/share/core/ettercap_ffi.lua +index eca9754cec7f751709db14c0b21435655bb2efcf..b74beca57b126fcebfd7fc99fb799a2d750f0a72 100644 +--- a/src/lua/share/core/ettercap_ffi.lua ++++ b/src/lua/share/core/ettercap_ffi.lua +@@ -264,6 +264,7 @@ uint16_t ntohs(uint16_t netshort); + size_t tcp_create_ident(void **i, struct packet_object *po); + int tcp_find_direction(void *ids, void *id); + int session_get(struct ec_session **s, void *ident, size_t ident_len); ++char *geoip_get_by_ip(struct ip_addr *ip, const int get_type, char* buffer, size_t len); + ]] + + return ettercap_ffi +diff --git a/src/lua/share/scripts/geoip_demo.lua b/src/lua/share/scripts/geoip_demo.lua +index 08f6b38d6db82598c5afc762e6bdc38f2ff5726b..bf068f4401e2be6e3cac20f498aad16d79f5049c 100644 +--- a/src/lua/share/scripts/geoip_demo.lua ++++ b/src/lua/share/scripts/geoip_demo.lua +@@ -31,13 +31,17 @@ end + -- Here's your action. + -- + action = function (p) ++ local src_ccode = ffi.new("char[3]") ++ local dst_ccode = ffi.new("char[3]") ++ local epoch_sec = tonumber(p.ts.tv_sec) ++ local epoch_usec = tonumber(p.ts.tv_usec) + +- tstamp = os.date ("%X", p.ts.tv_sec) .. string.format (".%06d", p.ts.tv_usec) ++ tstamp = os.date ("%X", epoch_sec) .. string.format (".%06d", epoch_usec) + + src = string.format ("%s:%d", packet.src_ip(p), packet.src_port(p)) + dst = string.format ("%s:%d", packet.dst_ip(p), packet.dst_port(p)) +- src_c = ffi.string (ffi.C.geoip_ccode_by_ip(p.L3.src)) +- dst_c = ffi.string (ffi.C.geoip_ccode_by_ip(p.L3.dst)) ++ src_c = ffi.string (ffi.C.geoip_get_by_ip(p.L3.src, 1, src_ccode, 3)) ++ dst_c = ffi.string (ffi.C.geoip_get_by_ip(p.L3.dst, 1, dst_ccode, 3)) + + ettercap.log("%s: %-20s -> %-20s: %s -> %s", tstamp, src, dst, src_c, dst_c) + end diff --git a/Patches/exiftran/fix-build.diff b/Patches/exiftran/fix-build.diff new file mode 100644 index 0000000000000..1d12e650ef45b --- /dev/null +++ b/Patches/exiftran/fix-build.diff @@ -0,0 +1,21 @@ +diff --git a/mk/Autoconf.mk b/mk/Autoconf.mk +index 45177a2..5d1c527 100644 +--- a/mk/Autoconf.mk ++++ b/mk/Autoconf.mk +@@ -162,7 +162,7 @@ config: Make.config + @true + + Make.config: $(srcdir)/GNUmakefile +- @/bin/echo -e "$(make-config-q)" > $@ ++ @/usr/bin/printf "$(make-config-q)" > $@ + @echo + @echo "Make.config written, edit if needed" + @echo +diff --git a/scripts/jpeg-version.sh b/scripts/jpeg-version.sh +index b59411e..04a39f8 100755 +--- a/scripts/jpeg-version.sh ++++ b/scripts/jpeg-version.sh +@@ -1,2 +1,2 @@ + #!/bin/sh +-echo JPEG_LIB_VERSION | cpp $CFLAGS -include jpeglib.h | tail -1 ++echo JPEG_LIB_VERSION | cpp $CFLAGS -include jpeglib.h | grep '[0-9]' | tail -1 diff --git a/Patches/expect/headers.diff b/Patches/expect/headers.diff new file mode 100644 index 0000000000000..ab9df3a7c0df4 --- /dev/null +++ b/Patches/expect/headers.diff @@ -0,0 +1,299 @@ +diff -pur expect5.45.4-old/configure.in expect5.45.4/configure.in +--- expect5.45.4-old/configure.in 2018-02-04 11:43:58 ++++ expect5.45.4/configure.in 2023-02-18 10:30:19 +@@ -133,6 +133,8 @@ AC_CHECK_HEADER(sys/strpty.h, AC_DEFINE(HAVE_STRPTY + AC_CHECK_HEADER(sys/ptem.h, AC_DEFINE(HAVE_SYS_PTEM_H)) + AC_CHECK_HEADER(sys/strredir.h, AC_DEFINE(HAVE_STRREDIR_H)) + AC_CHECK_HEADER(sys/strpty.h, AC_DEFINE(HAVE_STRPTY_H)) ++AC_CHECK_HEADER(pty.h, AC_DEFINE(HAVE_PTY_H)) ++AC_CHECK_HEADER(util.h, AC_DEFINE(HAVE_UTIL_H)) + + AC_MSG_CHECKING([for sys/bsdtypes.h]) + if test "ISC_${ISC}" = "ISC_1" ; then +@@ -452,7 +454,11 @@ AC_MSG_CHECKING([for memcpy]) + # because Unixware 2.0 handles it specially and refuses to compile + # autoconf's automatic test that is a call with no arguments + AC_MSG_CHECKING([for memcpy]) +-AC_TRY_LINK(,[ ++AC_TRY_LINK([ ++#ifdef HAVE_STRING_H ++#include ++#endif ++],[ + char *s1, *s2; + memcpy(s1,s2,0); + ], +@@ -469,7 +475,7 @@ AC_TRY_RUN([ + AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE]) + AC_TRY_RUN([ + #include +-main() { ++int main() { + #ifndef WNOHANG + return 0; + #else +@@ -489,7 +495,7 @@ AC_TRY_RUN([ + AC_TRY_RUN([ + #include + #include +-main() { ++int main() { + #ifdef WNOHANG + FILE *fp = fopen("wnohang","w"); + fprintf(fp,"%d",WNOHANG); +@@ -536,6 +542,13 @@ AC_TRY_RUN([ + AC_MSG_CHECKING([if signals need to be re-armed]) + AC_TRY_RUN([ + #include ++#ifdef HAVE_UNISTD_H ++#include ++#endif ++#ifndef NO_SYS_WAIT_H ++#include ++#endif ++ + #define RETSIGTYPE $retsigtype + + int signal_rearms = 0; +@@ -553,7 +566,7 @@ signal_rearms++; + signal_rearms++; + } + +-main() ++int main() + { + signal(SIGINT,parent_sigint_handler); + +@@ -567,8 +580,9 @@ main() + + wait(&status); + unlink("core"); +- exit(signal_rearms); ++ return signal_rearms; + } ++ return -1; + }], + AC_MSG_RESULT(yes) + AC_DEFINE(REARM_SIG) +@@ -714,10 +728,10 @@ AC_TRY_RUN([ + AC_MSG_CHECKING([for struct sgttyb]) + AC_TRY_RUN([ + #include +-main() ++int main() + { + struct sgttyb tmp; +- exit(0); ++ return 0; + }], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SGTTYB) +@@ -738,10 +752,10 @@ if test $mach -eq 0 ; then + # pty_termios.c is set up to handle pty_termio. + AC_MSG_CHECKING([for struct termio]) + AC_TRY_RUN([#include +- main() ++ int main() + { + struct termio tmp; +- exit(0); ++ return 0; + }], + AC_DEFINE(HAVE_TERMIO) + PTY_TYPE=termios +@@ -760,10 +774,10 @@ if test $mach -eq 0 ; then + # include + # endif + # include +- main() ++ int main() + { + struct termios tmp; +- exit(0); ++ return 0; + }], + AC_DEFINE(HAVE_TERMIOS) + PTY_TYPE=termios +@@ -782,7 +796,7 @@ AC_TRY_RUN([ + #include + #endif + #include +-main() { ++int main() { + #if defined(TCGETS) || defined(TCGETA) + return 0; + #else +@@ -797,21 +811,18 @@ main() { + AC_MSG_ERROR([Expect can't be cross compiled]) + ) + +-AC_MSG_CHECKING([if TIOCGWINSZ in termios.h]) ++AC_MSG_CHECKING([if termios.h and sys/ioctl.h may both be included]) + AC_TRY_RUN([ + /* including termios.h on Solaris 5.6 fails unless inttypes.h included */ + #ifdef HAVE_INTTYPES_H + #include + #endif + #include +-main() { +-#ifdef TIOCGWINSZ ++#include ++int main() { + return 0; +-#else +- return 1; +-#endif + }], +- AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H) ++ AC_DEFINE(HAVE_TERMIOS_AND_IOCTL_H_TOGETHER) + AC_MSG_RESULT(yes) + , + AC_MSG_RESULT(no) +@@ -823,7 +834,7 @@ AC_TRY_RUN([ + AC_MSG_CHECKING([for Cray-style ptys]) + SETUID=":" + AC_TRY_RUN([ +-main(){ ++int main(){ + #ifdef CRAY + return 0; + #else +@@ -878,12 +889,12 @@ extern int daylight; + AC_TRY_RUN([ + extern char *tzname[2]; + extern int daylight; +-main() ++int main() + { + int *x = &daylight; + char **y = tzname; + +- exit(0); ++ return 0; + }], + AC_DEFINE(HAVE_SV_TIMEZONE) + AC_MSG_RESULT(yes), +diff -pur expect5.45.4-old/exp_chan.c expect5.45.4/exp_chan.c +--- expect5.45.4-old/exp_chan.c 2018-02-02 20:15:52 ++++ expect5.45.4/exp_chan.c 2023-02-18 10:28:14 +@@ -35,6 +35,7 @@ + #include "exp_prog.h" + #include "exp_command.h" + #include "exp_log.h" ++#include "exp_event.h" + #include "tcldbg.h" /* Dbg_StdinMode */ + + extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode)); +diff -pur expect5.45.4-old/exp_clib.c expect5.45.4/exp_clib.c +--- expect5.45.4-old/exp_clib.c 2018-02-02 20:15:52 ++++ expect5.45.4/exp_clib.c 2023-02-18 10:28:14 +@@ -8,6 +8,7 @@ would appreciate credit if this program or parts of it + */ + + #include "expect_cf.h" ++#include "exp_command.h" + #include + #include + #ifdef HAVE_INTTYPES_H +diff -pur expect5.45.4-old/exp_tty.h expect5.45.4/exp_tty.h +--- expect5.45.4-old/exp_tty.h 2018-02-02 20:15:52 ++++ expect5.45.4/exp_tty.h 2023-02-18 10:28:14 +@@ -19,6 +19,7 @@ int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tt + void exp_tty_echo(int set); + void exp_tty_break(Tcl_Interp *interp, int fd); + int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo); ++int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo); + int exp_israw(void); + int exp_isecho(void); + +diff -pur expect5.45.4-old/exp_win.c expect5.45.4/exp_win.c +--- expect5.45.4-old/exp_win.c 2018-02-02 20:15:52 ++++ expect5.45.4/exp_win.c 2023-02-18 10:28:14 +@@ -32,14 +32,10 @@ conflicts with sys/ioctl.h + + #ifdef HAVE_TERMIOS + # include ++# ifdef HAVE_TERMIOS_AND_IOCTL_H_TOGETHER ++# include ++# endif + #else +-# include +-#endif +- +-/* Sigh. On AIX 2.3, termios.h exists but does not define TIOCGWINSZ */ +-/* Instead, it has to come from ioctl.h. However, As I said above, this */ +-/* can't be cavalierly included on all machines, even when it exists. */ +-#if defined(HAVE_TERMIOS) && !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H) + # include + #endif + +diff -pur expect5.45.4-old/pty_termios.c expect5.45.4/pty_termios.c +--- expect5.45.4-old/pty_termios.c 2018-02-02 20:15:52 ++++ expect5.45.4/pty_termios.c 2023-02-18 10:30:10 +@@ -77,6 +77,15 @@ with openpty which supports 4000 while ptmx supports 6 + #include + #endif + ++#ifdef HAVE_OPENPTY ++#ifdef HAVE_UTIL_H ++#include ++#endif ++#ifdef HAVE_PTY_H ++#include ++#endif ++#endif ++ + #ifdef HAVE_PTYTRAP + #include + #endif +@@ -102,6 +111,7 @@ with openpty which supports 4000 while ptmx supports 6 + #include "exp_tty_in.h" + #include "exp_rename.h" + #include "exp_pty.h" ++#include "exp_int.h" + + void expDiagLog(); + void expDiagLogPtr(); +diff -pur expect5.45.4-old/tclconfig/tcl.m4 expect5.45.4/tclconfig/tcl.m4 +--- expect5.45.4-old/tclconfig/tcl.m4 2018-02-04 14:55:43 ++++ expect5.45.4/tclconfig/tcl.m4 2023-02-18 10:28:14 +@@ -2400,7 +2400,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [ + AC_TRY_COMPILE([#include ], + [extern long timezone; + timezone += 1; +- exit (0);], ++ return 0;], + tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) + if test $tcl_cv_timezone_long = yes ; then + AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) +@@ -2412,7 +2412,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [ + AC_TRY_COMPILE([#include ], + [extern time_t timezone; + timezone += 1; +- exit (0);], ++ return 0;], + tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) + if test $tcl_cv_timezone_time = yes ; then + AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) +@@ -2452,17 +2452,17 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [ + double value; + value = strtod(infString, &term); + if ((term != infString) && (term[-1] == 0)) { +- exit(1); ++ return 1; + } + value = strtod(nanString, &term); + if ((term != nanString) && (term[-1] == 0)) { +- exit(1); ++ return 1; + } + value = strtod(spaceString, &term); + if (term == (spaceString+1)) { +- exit(1); ++ return 1; + } +- exit(0); ++ return 0; + }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, + tcl_cv_strtod_buggy=buggy)]) + if test "$tcl_cv_strtod_buggy" = buggy; then diff --git a/Patches/fastbit/xcode9.patch b/Patches/fastbit/xcode9.patch new file mode 100644 index 0000000000000..3e3bd5bbab55e --- /dev/null +++ b/Patches/fastbit/xcode9.patch @@ -0,0 +1,24 @@ +diff -pur fastbit-2.0.3-old/src/array_t.cpp fastbit-2.0.3/src/array_t.cpp +--- fastbit-2.0.3-old/src/array_t.cpp 2016-01-27 06:37:58.000000000 +0100 ++++ fastbit-2.0.3/src/array_t.cpp 2018-03-13 16:20:39.000000000 +0100 +@@ -1694,7 +1694,7 @@ ibis::array_t::insert(typename ibis:: + } + } + else { // need new memory, copy-and-swap +- const difference_type nold = (m_begin > 0 && m_end > m_begin ? ++ const difference_type nold = (m_begin != 0 && m_end > m_begin ? + m_end - m_begin : 0); + size_t nnew = static_cast(nold + (nold>=n ? nold : n)); + if (nnew > 0x7FFFFFFFU) { +diff -pur fastbit-2.0.3-old/src/array_t.h fastbit-2.0.3/src/array_t.h +--- fastbit-2.0.3-old/src/array_t.h 2016-01-27 06:37:58.000000000 +0100 ++++ fastbit-2.0.3/src/array_t.h 2018-03-13 16:20:45.000000000 +0100 +@@ -67,7 +67,7 @@ public: + + bool empty() const {return (m_begin == 0 || m_begin >= m_end);}; + size_t size() const { ///!< Return the number of elements. +- return (m_begin > 0 && m_end > m_begin ? m_end - m_begin : 0); ++ return (m_begin != 0 && m_end > m_begin ? m_end - m_begin : 0); + }; + inline void clear(); + diff --git a/Patches/fceux/2.6.6-arm.patch b/Patches/fceux/2.6.6-arm.patch new file mode 100644 index 0000000000000..7096d5934851c --- /dev/null +++ b/Patches/fceux/2.6.6-arm.patch @@ -0,0 +1,42 @@ +diff --git a/src/utils/timeStamp.cpp b/src/utils/timeStamp.cpp +index f62d019f..efb45aac 100644 +--- a/src/utils/timeStamp.cpp ++++ b/src/utils/timeStamp.cpp +@@ -14,6 +14,7 @@ + //------------------------------------------------------------------------- + //---- Time Stamp Record + //------------------------------------------------------------------------- ++#ifdef __FCEU_X86_TSC_ENABLE + #if defined(WIN32) + #include + #pragma intrinsic(__rdtsc) +@@ -25,6 +26,7 @@ static uint64_t rdtsc() + { + return __rdtsc(); + } ++#endif + + namespace FCEU + { +@@ -36,12 +38,15 @@ uint64_t timeStampRecord::qpcFreq = 0; + + void timeStampRecord::readNew(void) + { +-#if defined(__linux__) || defined(__APPLE__) || defined(__unix__) +- clock_gettime( CLOCK_REALTIME, &ts ); +-#else +- QueryPerformanceCounter((LARGE_INTEGER*)&ts); +-#endif +- tsc = rdtsc(); ++ #ifdef __FCEU_X86_TSC_ENABLE ++ tsc = rdtsc(); ++ #endif ++ ++ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) ++ clock_gettime( CLOCK_REALTIME, &ts ); ++ #else ++ QueryPerformanceCounter((LARGE_INTEGER*)&ts); ++ #endif + } + #if defined(WIN32) + void timeStampRecord::qpcCalibrate(void) diff --git a/Patches/fcp/rust-1.80.patch b/Patches/fcp/rust-1.80.patch new file mode 100644 index 0000000000000..8f5368d12329c --- /dev/null +++ b/Patches/fcp/rust-1.80.patch @@ -0,0 +1,974 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 6829f6f..7adec8a 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -2,6 +2,15 @@ + # It is not intended for manual editing. + version = 3 + ++[[package]] ++name = "aho-corasick" ++version = "1.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" ++dependencies = [ ++ "memchr", ++] ++ + [[package]] + name = "atty" + version = "0.2.14" +@@ -15,48 +24,42 @@ dependencies = [ + + [[package]] + name = "autocfg" +-version = "1.0.1" ++version = "1.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" ++checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + + [[package]] + name = "bitflags" +-version = "1.2.1" ++version = "1.3.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" ++checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + + [[package]] +-name = "bstr" +-version = "0.2.16" ++name = "bumpalo" ++version = "3.16.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +-dependencies = [ +- "lazy_static", +- "memchr", +- "regex-automata", +- "serde", +-] ++checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + + [[package]] +-name = "bumpalo" +-version = "3.7.0" ++name = "byteorder" ++version = "1.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" ++checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + + [[package]] + name = "cast" +-version = "0.2.7" ++version = "0.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" +-dependencies = [ +- "rustc_version", +-] ++checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + + [[package]] + name = "cc" +-version = "1.0.69" ++version = "1.1.18" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" ++checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" ++dependencies = [ ++ "shlex", ++] + + [[package]] + name = "cfg-if" +@@ -66,9 +69,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + + [[package]] + name = "clap" +-version = "2.33.3" ++version = "2.34.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" ++checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" + dependencies = [ + "bitflags", + "textwrap", +@@ -77,16 +80,16 @@ dependencies = [ + + [[package]] + name = "criterion" +-version = "0.3.4" ++version = "0.3.6" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "ab327ed7354547cc2ef43cbe20ef68b988e70b4b593cbd66a2a61733123a3d23" ++checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" + dependencies = [ + "atty", + "cast", + "clap", + "criterion-plot", + "csv", +- "itertools 0.10.1", ++ "itertools", + "lazy_static", + "num-traits", + "oorandom", +@@ -103,65 +106,45 @@ dependencies = [ + + [[package]] + name = "criterion-plot" +-version = "0.4.3" ++version = "0.4.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d" ++checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" + dependencies = [ + "cast", +- "itertools 0.9.0", +-] +- +-[[package]] +-name = "crossbeam-channel" +-version = "0.5.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +-dependencies = [ +- "cfg-if", +- "crossbeam-utils", ++ "itertools", + ] + + [[package]] + name = "crossbeam-deque" +-version = "0.8.0" ++version = "0.8.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" ++checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" + dependencies = [ +- "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", + ] + + [[package]] + name = "crossbeam-epoch" +-version = "0.9.5" ++version = "0.9.18" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" ++checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" + dependencies = [ +- "cfg-if", + "crossbeam-utils", +- "lazy_static", +- "memoffset", +- "scopeguard", + ] + + [[package]] + name = "crossbeam-utils" +-version = "0.8.5" ++version = "0.8.20" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +-dependencies = [ +- "cfg-if", +- "lazy_static", +-] ++checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + + [[package]] + name = "csv" +-version = "1.1.6" ++version = "1.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" ++checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" + dependencies = [ +- "bstr", + "csv-core", + "itoa", + "ryu", +@@ -170,9 +153,9 @@ dependencies = [ + + [[package]] + name = "csv-core" +-version = "0.1.10" ++version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" ++checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" + dependencies = [ + "memchr", + ] +@@ -192,9 +175,9 @@ dependencies = [ + + [[package]] + name = "either" +-version = "1.6.1" ++version = "1.13.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" ++checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + + [[package]] + name = "fcp" +@@ -208,9 +191,9 @@ dependencies = [ + + [[package]] + name = "getrandom" +-version = "0.2.3" ++version = "0.2.15" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" ++checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" + dependencies = [ + "cfg-if", + "libc", +@@ -219,9 +202,9 @@ dependencies = [ + + [[package]] + name = "half" +-version = "1.7.1" ++version = "1.8.3" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "62aca2aba2d62b4a7f5b33f3712cb1b0692779a56fb510499d5c0aa594daeaf3" ++checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + + [[package]] + name = "hermit-abi" +@@ -234,78 +217,66 @@ dependencies = [ + + [[package]] + name = "itertools" +-version = "0.9.0" ++version = "0.10.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +-dependencies = [ +- "either", +-] +- +-[[package]] +-name = "itertools" +-version = "0.10.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" ++checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" + dependencies = [ + "either", + ] + + [[package]] + name = "itoa" +-version = "0.4.7" ++version = "1.0.11" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" ++checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + + [[package]] + name = "js-sys" +-version = "0.3.51" ++version = "0.3.70" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" ++checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" + dependencies = [ + "wasm-bindgen", + ] + + [[package]] + name = "lazy_static" +-version = "1.4.0" ++version = "1.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" ++checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + + [[package]] + name = "libc" +-version = "0.2.98" ++version = "0.2.158" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" ++checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" + + [[package]] + name = "log" +-version = "0.4.14" ++version = "0.4.22" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +-dependencies = [ +- "cfg-if", +-] ++checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + + [[package]] + name = "memchr" +-version = "2.4.0" ++version = "2.7.4" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" ++checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + + [[package]] + name = "memoffset" +-version = "0.6.4" ++version = "0.6.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" ++checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" + dependencies = [ + "autocfg", + ] + + [[package]] + name = "nix" +-version = "0.22.0" ++version = "0.22.3" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cf1e25ee6b412c2a1e3fcb6a4499a5c1bfe7f43e014bdce9a6b6666e5aa2d187" ++checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" + dependencies = [ + "bitflags", + "cc", +@@ -316,34 +287,30 @@ dependencies = [ + + [[package]] + name = "num-traits" +-version = "0.2.14" ++version = "0.2.19" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" ++checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" + dependencies = [ + "autocfg", + ] + + [[package]] +-name = "num_cpus" +-version = "1.13.0" ++name = "once_cell" ++version = "1.19.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +-dependencies = [ +- "hermit-abi", +- "libc", +-] ++checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + + [[package]] + name = "oorandom" +-version = "11.1.3" ++version = "11.1.4" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" ++checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" + + [[package]] + name = "plotters" +-version = "0.3.1" ++version = "0.3.7" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" ++checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" + dependencies = [ + "num-traits", + "plotters-backend", +@@ -354,53 +321,55 @@ dependencies = [ + + [[package]] + name = "plotters-backend" +-version = "0.3.2" ++version = "0.3.7" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" ++checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + + [[package]] + name = "plotters-svg" +-version = "0.3.1" ++version = "0.3.7" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" ++checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" + dependencies = [ + "plotters-backend", + ] + + [[package]] + name = "ppv-lite86" +-version = "0.2.10" ++version = "0.2.20" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" ++checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" ++dependencies = [ ++ "zerocopy", ++] + + [[package]] + name = "proc-macro2" +-version = "1.0.27" ++version = "1.0.86" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" ++checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" + dependencies = [ +- "unicode-xid", ++ "unicode-ident", + ] + + [[package]] + name = "quote" +-version = "1.0.9" ++version = "1.0.37" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" ++checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" + dependencies = [ + "proc-macro2", + ] + + [[package]] + name = "rand" +-version = "0.8.4" ++version = "0.8.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" ++checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" + dependencies = [ + "libc", + "rand_chacha", + "rand_core", +- "rand_hc", + ] + + [[package]] +@@ -415,22 +384,13 @@ dependencies = [ + + [[package]] + name = "rand_core" +-version = "0.6.3" ++version = "0.6.4" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" ++checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + dependencies = [ + "getrandom", + ] + +-[[package]] +-name = "rand_hc" +-version = "0.3.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +-dependencies = [ +- "rand_core", +-] +- + [[package]] + name = "rand_pcg" + version = "0.3.1" +@@ -442,64 +402,58 @@ dependencies = [ + + [[package]] + name = "rayon" +-version = "1.5.1" ++version = "1.10.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" ++checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" + dependencies = [ +- "autocfg", +- "crossbeam-deque", + "either", + "rayon-core", + ] + + [[package]] + name = "rayon-core" +-version = "1.9.1" ++version = "1.12.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" ++checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" + dependencies = [ +- "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", +- "lazy_static", +- "num_cpus", + ] + + [[package]] + name = "regex" +-version = "1.5.4" ++version = "1.10.6" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" ++checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" + dependencies = [ ++ "aho-corasick", ++ "memchr", ++ "regex-automata", + "regex-syntax", + ] + + [[package]] + name = "regex-automata" +-version = "0.1.10" ++version = "0.4.7" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" ++checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" ++dependencies = [ ++ "aho-corasick", ++ "memchr", ++ "regex-syntax", ++] + + [[package]] + name = "regex-syntax" +-version = "0.6.25" ++version = "0.8.4" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +- +-[[package]] +-name = "rustc_version" +-version = "0.4.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +-dependencies = [ +- "semver", +-] ++checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + + [[package]] + name = "ryu" +-version = "1.0.5" ++version = "1.0.18" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" ++checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + + [[package]] + name = "same-file" +@@ -510,32 +464,20 @@ dependencies = [ + "winapi-util", + ] + +-[[package]] +-name = "scopeguard" +-version = "1.1.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +- +-[[package]] +-name = "semver" +-version = "1.0.3" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "5f3aac57ee7f3272d8395c6e4f502f434f0e289fcd62876f70daa008c20dcabe" +- + [[package]] + name = "serde" +-version = "1.0.126" ++version = "1.0.210" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" ++checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" + dependencies = [ + "serde_derive", + ] + + [[package]] + name = "serde_cbor" +-version = "0.11.1" ++version = "0.11.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622" ++checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" + dependencies = [ + "half", + "serde", +@@ -543,9 +485,9 @@ dependencies = [ + + [[package]] + name = "serde_derive" +-version = "1.0.126" ++version = "1.0.210" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" ++checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" + dependencies = [ + "proc-macro2", + "quote", +@@ -554,24 +496,31 @@ dependencies = [ + + [[package]] + name = "serde_json" +-version = "1.0.64" ++version = "1.0.128" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" ++checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" + dependencies = [ + "itoa", ++ "memchr", + "ryu", + "serde", + ] + ++[[package]] ++name = "shlex" ++version = "1.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" ++ + [[package]] + name = "syn" +-version = "1.0.73" ++version = "2.0.77" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" ++checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" + dependencies = [ + "proc-macro2", + "quote", +- "unicode-xid", ++ "unicode-ident", + ] + + [[package]] +@@ -594,53 +543,53 @@ dependencies = [ + ] + + [[package]] +-name = "unicode-width" +-version = "0.1.8" ++name = "unicode-ident" ++version = "1.0.13" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" ++checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + + [[package]] +-name = "unicode-xid" +-version = "0.2.2" ++name = "unicode-width" ++version = "0.1.13" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" ++checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" + + [[package]] + name = "walkdir" +-version = "2.3.2" ++version = "2.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" ++checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" + dependencies = [ + "same-file", +- "winapi", + "winapi-util", + ] + + [[package]] + name = "wasi" +-version = "0.10.2+wasi-snapshot-preview1" ++version = "0.11.0+wasi-snapshot-preview1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" ++checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + + [[package]] + name = "wasm-bindgen" +-version = "0.2.74" ++version = "0.2.93" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" ++checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" + dependencies = [ + "cfg-if", ++ "once_cell", + "wasm-bindgen-macro", + ] + + [[package]] + name = "wasm-bindgen-backend" +-version = "0.2.74" ++version = "0.2.93" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" ++checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" + dependencies = [ + "bumpalo", +- "lazy_static", + "log", ++ "once_cell", + "proc-macro2", + "quote", + "syn", +@@ -649,9 +598,9 @@ dependencies = [ + + [[package]] + name = "wasm-bindgen-macro" +-version = "0.2.74" ++version = "0.2.93" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" ++checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" + dependencies = [ + "quote", + "wasm-bindgen-macro-support", +@@ -659,9 +608,9 @@ dependencies = [ + + [[package]] + name = "wasm-bindgen-macro-support" +-version = "0.2.74" ++version = "0.2.93" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" ++checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" + dependencies = [ + "proc-macro2", + "quote", +@@ -672,15 +621,15 @@ dependencies = [ + + [[package]] + name = "wasm-bindgen-shared" +-version = "0.2.74" ++version = "0.2.93" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" ++checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" + + [[package]] + name = "web-sys" +-version = "0.3.51" ++version = "0.3.70" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" ++checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" + dependencies = [ + "js-sys", + "wasm-bindgen", +@@ -704,11 +653,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + + [[package]] + name = "winapi-util" +-version = "0.1.5" ++version = "0.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" ++checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" + dependencies = [ +- "winapi", ++ "windows-sys", + ] + + [[package]] +@@ -716,3 +665,97 @@ name = "winapi-x86_64-pc-windows-gnu" + version = "0.4.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" ++ ++[[package]] ++name = "windows-sys" ++version = "0.59.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" ++dependencies = [ ++ "windows-targets", ++] ++ ++[[package]] ++name = "windows-targets" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" ++dependencies = [ ++ "windows_aarch64_gnullvm", ++ "windows_aarch64_msvc", ++ "windows_i686_gnu", ++ "windows_i686_gnullvm", ++ "windows_i686_msvc", ++ "windows_x86_64_gnu", ++ "windows_x86_64_gnullvm", ++ "windows_x86_64_msvc", ++] ++ ++[[package]] ++name = "windows_aarch64_gnullvm" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" ++ ++[[package]] ++name = "windows_aarch64_msvc" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" ++ ++[[package]] ++name = "windows_i686_gnu" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" ++ ++[[package]] ++name = "windows_i686_gnullvm" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" ++ ++[[package]] ++name = "windows_i686_msvc" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" ++ ++[[package]] ++name = "windows_x86_64_gnu" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" ++ ++[[package]] ++name = "windows_x86_64_gnullvm" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" ++ ++[[package]] ++name = "windows_x86_64_msvc" ++version = "0.52.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" ++ ++[[package]] ++name = "zerocopy" ++version = "0.7.35" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" ++dependencies = [ ++ "byteorder", ++ "zerocopy-derive", ++] ++ ++[[package]] ++name = "zerocopy-derive" ++version = "0.7.35" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] +diff --git a/benches/fcp_benchmark.rs b/benches/fcp_benchmark.rs +index 1736cdb..8047532 100644 +--- a/benches/fcp_benchmark.rs ++++ b/benches/fcp_benchmark.rs +@@ -27,7 +27,7 @@ fn fcp_benchmark(mut group: BenchmarkGroup, fixture_file: &str) { + || { + remove(&dest_path); + let mut command = Command::new("cp"); +- command.args(&["-R", source, dest]); ++ command.args(["-R", source, dest]); + command + }, + run_command, +@@ -42,7 +42,7 @@ fn fcp_benchmark(mut group: BenchmarkGroup, fixture_file: &str) { + || { + remove(&dest_path); + let mut command = Command::new(executable_path); +- command.args(&[source, dest]); ++ command.args([source, dest]); + command + }, + run_command, +diff --git a/src/lib.rs b/src/lib.rs +index b071a10..a90d8db 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -187,7 +187,7 @@ fn copy_into(sources: &[PathBuf], dest: &Path) -> bool { + .zip(file_names(sources).unwrap_or_else(|err| fatal(err))) + .collect::>() + .into_par_iter() +- .map(|(source, file_name)| copy_file(&source, fs::file_type(source), &dest.join(file_name))) ++ .map(|(source, file_name)| copy_file(source, fs::file_type(source), &dest.join(file_name))) + .reduce(|| false, BitOr::bitor) + } + +diff --git a/src/main.rs b/src/main.rs +index 74e0cbf..2384de5 100644 +--- a/src/main.rs ++++ b/src/main.rs +@@ -24,7 +24,7 @@ OPTIONS: + static VERSION: &str = env!("CARGO_PKG_VERSION"); + + fn main() { +- let args: Box<_> = env::args().skip(1).collect(); ++ let args: Box> = Box::new(env::args().skip(1).collect()); + for arg in args.iter() { + match arg.as_str() { + "-h" | "--help" => fatal(HELP), +diff --git a/tests/tests.rs b/tests/tests.rs +index 64156f2..f54516d 100644 +--- a/tests/tests.rs ++++ b/tests/tests.rs +@@ -30,7 +30,7 @@ use std::string::String; + fn diff(filename: &str) -> ExitStatus { + let filename = filename.strip_suffix(".json").unwrap(); + Command::new("diff") +- .args(&[ ++ .args([ + "-rq", + "--no-dereference", + HYDRATED_DIR.join(filename).to_str().unwrap(), +@@ -123,7 +123,7 @@ fn character_device() { + remove(&destination); + let contents = "Hello world\r"; + let result = Command::new("tests/character_device.exp") +- .args(&[ ++ .args([ + fcp_executable_path().to_str().unwrap(), + destination.to_str().unwrap(), + contents, +@@ -175,7 +175,7 @@ fn partial_directory() { + assert!(result.stderr.contains("partial_directory/two.txt")); + for file in ["one.txt", "three.txt"] { + let result = Command::new("diff") +- .args(&[ ++ .args([ + "-q", + HYDRATED_DIR + .join("partial_directory") +@@ -222,7 +222,7 @@ fn copy_into_symlink() { + assert!(result.success); + assert_eq!(result.stderr, ""); + let result = Command::new("diff") +- .args(&[ ++ .args([ + "-rq", + source.to_str().unwrap(), + destination +@@ -299,7 +299,7 @@ fn copy_many_into_permissions_error() { + assert!(result.stderr.contains("two.txt")); + for file in ["one.txt", "three.txt"] { + let result = Command::new("diff") +- .args(&[ ++ .args([ + "-q", + HYDRATED_DIR.join(fixture_name).join(file).to_str().unwrap(), + COPIES_DIR.join(fixture_name).join(file).to_str().unwrap(), diff --git a/Patches/fdclone/3.01b.patch b/Patches/fdclone/3.01b.patch new file mode 100644 index 0000000000000..99f45bf87db0a --- /dev/null +++ b/Patches/fdclone/3.01b.patch @@ -0,0 +1,164 @@ +diff --git a/machine.h b/machine.h +index 8bc70ab..39b0d28 100644 +--- a/machine.h ++++ b/machine.h +@@ -1449,4 +1449,6 @@ typedef unsigned long u_long; + #define GETTODARGS 2 + #endif + ++#define USEDATADIR ++ + #endif /* !__MACHINE_H_ */ +diff --git a/custom.c b/custom.c +index d7a995f..45b96c6 100644 +--- a/custom.c ++++ b/custom.c +@@ -566,7 +566,7 @@ static CONST envtable envlist[] = { + {"FD_URLKCODE", &urlkcode, DEFVAL(NOCNV), URLKC_E, T_KNAM}, + #endif + #if !defined (_NOENGMES) && !defined (_NOJPNMES) +- {"FD_MESSAGELANG", &messagelang, DEFVAL(NOCNV), MESL_E, T_MESLANG}, ++ {"FD_MESSAGELANG", &messagelang, DEFVAL("C"), MESL_E, T_MESLANG}, + #endif + #ifdef DEP_FILECONV + {"FD_SJISPATH", &sjispath, DEFVAL(SJISPATH), SJSP_E, T_KPATHS}, +@@ -862,7 +862,9 @@ int no; + #if defined (DEP_KCONV) || (!defined (_NOENGMES) && !defined (_NOJPNMES)) + case T_MESLANG: + # ifndef _NOCATALOG ++ if (!cp) cp = def_str(no); + catname = cp; ++ chkcatalog(); + /*FALLTHRU*/ + # endif + case T_KIN: +diff --git a/fd.h b/fd.h +index 08de84b..63cdaeb 100644 +--- a/fd.h ++++ b/fd.h +@@ -104,16 +104,16 @@ extern char *_mtrace_file; + * variables nor run_com file nor command line option * + ****************************************************************/ + #define BASICCUSTOM 0 +-#define SORTTYPE 0 +-#define DISPLAYMODE 0 +-#define SORTTREE 0 ++#define SORTTYPE 1 ++#define DISPLAYMODE 3 ++#define SORTTREE 1 + #define WRITEFS 0 + #define IGNORECASE 0 + #define VERSIONCOMP 0 + #define INHERITCOPY 0 + #define PROGRESSBAR 0 + #define PRECOPYMENU 0 +-#define ADJTTY 0 ++#define ADJTTY 1 + #define USEGETCURSOR 0 + #define DEFCOLUMNS 2 + #define MINFILENAME 12 +@@ -155,7 +155,7 @@ extern char *_mtrace_file; + #define FREQFILE "~/.fd_freq" + #endif /* !MSDOS */ + #define FREQUMASK 022 +-#define ANSICOLOR 0 ++#define ANSICOLOR 1 + #define ANSIPALETTE "" + #define EDITMODE "emacs" + #define LOOPCURSOR 0 +@@ -193,7 +193,7 @@ extern char *_mtrace_file; + #define HTTPPROXY "" + #define HTTPLOGFILE "" + #define HTMLLOGFILE "" +-#define UNICODEBUFFER 0 ++#define UNICODEBUFFER 1 + #define SJISPATH "" + #define EUCPATH "" + #define JISPATH "" +diff --git a/_fdrc b/_fdrc +index 97aec7b..0a81bb9 100644 +--- a/_fdrc ++++ b/_fdrc +@@ -7,8 +7,8 @@ + #BASICCUSTOM=0 + + # default sort type +-# 0: not sort (Default) +-# 1: alphabetical 9: alphabetical (reversal) ++# 0: not sort ++# 1: alphabetical (Default) 9: alphabetical (reversal) + # 2: extension 10: extension (reversal) + # 3: size 11: size (reversal) + # 4: date 12: date (reversal) +@@ -16,23 +16,23 @@ + # 100-113: preserve previous sort type + # 200-213: preserve previous sort type also in the archive browser + # (the least 2 digits are effective just after initialize) +-#SORTTYPE=0 ++#SORTTYPE=1 + + # default display mode +-# 0: normal (Default) ++# 0: normal + # 1: sym-link status + # 2: file type symbol +-# 3: sym-link status & file type symbol ++# 3: sym-link status & file type symbol (Default) + # 4: invisible dot file + # 5: sym-link status & invisible dot file + # 6: file type symbol & invisible dot file + # 7: sym-link status & file type symbol & invisible dot file +-#DISPLAYMODE=0 ++#DISPLAYMODE=3 + + # whether if sort or not in tree mode +-# 0: not sort (Default) +-# >= 1: sort according to SORTTYPE +-#SORTTREE=0 ++# 0: not sort ++# >= 1: sort according to SORTTYPE (Default) ++#SORTTREE=1 + + # behavior about writing over directory on file system + # 0: confirm to write or not, after directory arranged (Default) +@@ -61,9 +61,9 @@ + #PRECOPYMENU=0 + + # whether if adjust tty or not when exiting +-# 0: not adjust (Default) +-# >= 1: adjust +-#ADJTTY=0 ++# 0: not adjust ++# >= 1: adjust (Default) ++#ADJTTY=1 + + # whether if prioritize VT100 escape sequence or not for getting terminal size + # 0: not prioritize (Default) +@@ -179,11 +179,11 @@ + #FREQUMASK=022 + + # whether if support ANSI color escape sequence +-# 0: monochrome (Default) +-# 1: color ++# 0: monochrome ++# 1: color (Default) + # 2: color & force background to blacken + # 3: color & force foreground to blacken +-#ANSICOLOR=0 ++#ANSICOLOR=1 + + # color palette in the ANSI color mode + # Default: none +@@ -374,9 +374,9 @@ + #HTMLLOGFILE="" + + # whether if hold the UNICODE translation table on memory +-# 0: not hold (Default) +-# >= 1: hold +-#UNICODEBUFFER=0 ++# 0: not hold ++# >= 1: hold (Default) ++#UNICODEBUFFER=1 + + # language code to be displayed + # Default: No convert diff --git a/Patches/flactag/jpeg9.patch b/Patches/flactag/jpeg9.patch new file mode 100644 index 0000000000000..928d12c6c4144 --- /dev/null +++ b/Patches/flactag/jpeg9.patch @@ -0,0 +1,13 @@ +diff --git a/CoverArt.cc b/CoverArt.cc +index e730476..a0bd2a8 100644 +--- a/CoverArt.cc ++++ b/CoverArt.cc +@@ -195,7 +195,7 @@ boolean CCoverArt::FillInputBuffer(j_decompress_ptr cinfo) + src->pub.next_input_byte = src->eoi_buffer; + src->pub.bytes_in_buffer = 2; + +- return true; ++ return TRUE; + } + + void CCoverArt::SkipInputData(j_decompress_ptr cinfo, long num_bytes) diff --git a/Patches/fragroute/configure.patch b/Patches/fragroute/configure.patch new file mode 100644 index 0000000000000..80fa4b3789511 --- /dev/null +++ b/Patches/fragroute/configure.patch @@ -0,0 +1,11 @@ +--- configure.orig 2005-12-20 22:35:03.000000000 +0100 ++++ configure 2005-12-20 22:35:27.000000000 +0100 +@@ -2578,7 +2578,7 @@ + + trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +-DEFS=-DHAVE_CONFIG_H ++DEFS="-DHAVE_CONFIG_H -DDNET_TUN_H" + + # Without the "./", some shells look in PATH for config.status. + : ${CONFIG_STATUS=./config.status} diff --git a/Patches/fragroute/fragroute.c.patch b/Patches/fragroute/fragroute.c.patch new file mode 100644 index 0000000000000..742d2efdb5177 --- /dev/null +++ b/Patches/fragroute/fragroute.c.patch @@ -0,0 +1,38 @@ +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/fragroute/files/1.2-libevent.patch +--- fragroute.c.orig 2002-04-08 00:55:20.000000000 +0200 ++++ fragroute.c 2010-02-03 21:23:21.451754240 +0100 +@@ -36,10 +36,6 @@ + + static struct fr_ctx ctx; + +-/* XXX - these should be in event.h */ +-extern int (*event_sigcb)(void); +-extern int event_gotsig; +- + static void + usage(void) + { +@@ -140,7 +136,6 @@ + fragroute_signal(DWORD sig) + { + warnx("exiting at user request"); +- event_gotsig++; + return (TRUE); + } + #else +@@ -148,7 +143,6 @@ + fragroute_signal(int sig) + { + warnx("exiting on signal %d", sig); +- event_gotsig++; + } + #endif + +@@ -178,7 +172,6 @@ + pkt_init(128); + + event_init(); +- event_sigcb = fragroute_close; + + if ((ctx.arp = arp_open()) == NULL || + (ctx.intf = intf_open()) == NULL || diff --git a/Patches/fragroute/pcaputil.c.patch b/Patches/fragroute/pcaputil.c.patch new file mode 100644 index 0000000000000..c68be83335dfa --- /dev/null +++ b/Patches/fragroute/pcaputil.c.patch @@ -0,0 +1,11 @@ +--- pcaputil.c.orig 2005-12-20 22:51:13.000000000 +0100 ++++ pcaputil.c 2005-12-20 22:52:30.000000000 +0100 +@@ -26,6 +26,8 @@ + + #include "pcaputil.h" + ++#define BIOCIMMEDIATE _IOW('B',112, u_int) ++ + pcap_t * + pcap_open(char *device) + { diff --git a/Patches/freeimage/3.17.0-linux.patch b/Patches/freeimage/3.17.0-linux.patch new file mode 100644 index 0000000000000..82b0250955dc8 --- /dev/null +++ b/Patches/freeimage/3.17.0-linux.patch @@ -0,0 +1,82 @@ +diff --git a/Makefile.fip b/Makefile.fip +index b59c419..0aee6e0 100644 +--- a/Makefile.fip ++++ b/Makefile.fip +@@ -5,8 +5,9 @@ include fipMakefile.srcs + + # General configuration variables: + DESTDIR ?= / +-INCDIR ?= $(DESTDIR)/usr/include +-INSTALLDIR ?= $(DESTDIR)/usr/lib ++PREFIX ?= /usr/local ++INCDIR ?= $(PREFIX)/include ++INSTALLDIR ?= $(PREFIX)/lib + + # Converts cr/lf to just lf + DOS2UNIX = dos2unix +@@ -37,7 +38,7 @@ TARGET = freeimageplus + STATICLIB = lib$(TARGET).a + SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so + LIBNAME = lib$(TARGET).so +-VERLIBNAME = $(LIBNAME).$(VER_MAJOR) ++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).so + HEADER = Source/FreeImage.h + HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h + +@@ -72,10 +73,11 @@ $(SHAREDLIB): $(MODULES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ install -m 644 $(HEADER) $(INCDIR) ++ install -m 644 $(HEADERFIP) $(INCDIR) ++ install -m 644 $(STATICLIB) $(INSTALLDIR) ++ install -m 755 $(SHAREDLIB) $(INSTALLDIR) ++ ln -s $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + + + + +diff --git a/Makefile.gnu b/Makefile.gnu +index 92f6358..6a5890f 100644 +--- a/Makefile.gnu ++++ b/Makefile.gnu +@@ -5,8 +5,9 @@ include Makefile.srcs + + # General configuration variables: + DESTDIR ?= / +-INCDIR ?= $(DESTDIR)/usr/include +-INSTALLDIR ?= $(DESTDIR)/usr/lib ++PREFIX ?= /usr/local ++INCDIR ?= $(PREFIX)/include ++INSTALLDIR ?= $(PREFIX)/lib + + # Converts cr/lf to just lf + DOS2UNIX = dos2unix +@@ -37,7 +38,7 @@ TARGET = freeimage + STATICLIB = lib$(TARGET).a + SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so + LIBNAME = lib$(TARGET).so +-VERLIBNAME = $(LIBNAME).$(VER_MAJOR) ++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).so + HEADER = Source/FreeImage.h + + +@@ -71,9 +72,9 @@ $(SHAREDLIB): $(MODULES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ install -m 644 $(HEADER) $(INCDIR) ++ install -m 644 $(STATICLIB) $(INSTALLDIR) ++ install -m 755 $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + # ldconfig \ No newline at end of file diff --git a/Patches/freeimage/3.17.0.patch b/Patches/freeimage/3.17.0.patch new file mode 100644 index 0000000000000..1b9b63990a95b --- /dev/null +++ b/Patches/freeimage/3.17.0.patch @@ -0,0 +1,119 @@ +diff --git a/Makefile.fip b/Makefile.fip +old mode 100755 +new mode 100644 +index b59c419..6e177fc +--- a/Makefile.fip ++++ b/Makefile.fip +@@ -5,8 +5,9 @@ include fipMakefile.srcs + + # General configuration variables: + DESTDIR ?= / +-INCDIR ?= $(DESTDIR)/usr/include +-INSTALLDIR ?= $(DESTDIR)/usr/lib ++PREFIX ?= /usr/local ++INCDIR ?= $(DESTDIR)$(PREFIX)/include ++INSTALLDIR ?= $(DESTDIR)$(PREFIX)/lib + + # Converts cr/lf to just lf + DOS2UNIX = dos2unix +@@ -35,9 +36,9 @@ endif + + TARGET = freeimageplus + STATICLIB = lib$(TARGET).a +-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so +-LIBNAME = lib$(TARGET).so +-VERLIBNAME = $(LIBNAME).$(VER_MAJOR) ++SHAREDLIB = lib$(TARGET).$(VER_MAJOR).$(VER_MINOR).dylib ++LIBNAME = lib$(TARGET).dylib ++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).dylib + HEADER = Source/FreeImage.h + HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h + +@@ -49,7 +50,7 @@ all: dist + dist: FreeImage + mkdir -p Dist + cp *.a Dist/ +- cp *.so Dist/ ++ cp *.dylib Dist/ + cp Source/FreeImage.h Dist/ + cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist/ + +@@ -68,14 +69,15 @@ $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CXX) -dynamiclib -install_name $(LIBNAME) -current_version $(VER_MAJOR).$(VER_MINOR) -compatibility_version $(VER_MAJOR) $(LDFLAGS) -o $@ $(MODULES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ install -m 644 $(HEADER) $(INCDIR) ++ install -m 644 $(HEADERFIP) $(INCDIR) ++ install -m 644 $(STATICLIB) $(INSTALLDIR) ++ install -m 755 $(SHAREDLIB) $(INSTALLDIR) ++ ln -s $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + +diff --git a/Makefile.gnu b/Makefile.gnu +old mode 100755 +new mode 100644 +index 92f6358..264b70f +--- a/Makefile.gnu ++++ b/Makefile.gnu +@@ -5,8 +5,9 @@ include Makefile.srcs + + # General configuration variables: + DESTDIR ?= / +-INCDIR ?= $(DESTDIR)/usr/include +-INSTALLDIR ?= $(DESTDIR)/usr/lib ++PREFIX ?= /usr/local ++INCDIR ?= $(DESTDIR)$(PREFIX)/include ++INSTALLDIR ?= $(DESTDIR)$(PREFIX)/lib + + # Converts cr/lf to just lf + DOS2UNIX = dos2unix +@@ -35,9 +36,9 @@ endif + + TARGET = freeimage + STATICLIB = lib$(TARGET).a +-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so +-LIBNAME = lib$(TARGET).so +-VERLIBNAME = $(LIBNAME).$(VER_MAJOR) ++SHAREDLIB = lib$(TARGET).$(VER_MAJOR).$(VER_MINOR).dylib ++LIBNAME = lib$(TARGET).dylib ++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).dylib + HEADER = Source/FreeImage.h + + +@@ -49,7 +50,7 @@ all: dist + dist: FreeImage + mkdir -p Dist + cp *.a Dist/ +- cp *.so Dist/ ++ cp *.dylib Dist/ + cp Source/FreeImage.h Dist/ + + dos2unix: +@@ -67,13 +68,13 @@ $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CXX) -dynamiclib -install_name $(LIBNAME) -current_version $(VER_MAJOR).$(VER_MINOR) -compatibility_version $(VER_MAJOR) $(LDFLAGS) -o $@ $(MODULES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ install -m 644 $(HEADER) $(INCDIR) ++ install -m 644 $(STATICLIB) $(INSTALLDIR) ++ install -m 755 $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + # ldconfig diff --git a/Patches/gcc/gcc-11.5.0.diff b/Patches/gcc/gcc-11.5.0.diff new file mode 100644 index 0000000000000..3b4c3b14366f9 --- /dev/null +++ b/Patches/gcc/gcc-11.5.0.diff @@ -0,0 +1,32601 @@ +diff --git a/Makefile.def b/Makefile.def +index 7c33a3b1e8c..8ef612176cb 100644 +--- a/Makefile.def ++++ b/Makefile.def +@@ -46,10 +46,11 @@ host_modules= { module= fixincludes; bootstrap=true; + host_modules= { module= flex; no_check_cross= true; }; + host_modules= { module= gas; bootstrap=true; }; + host_modules= { module= gcc; bootstrap=true; +- extra_make_flags="$(EXTRA_GCC_FLAGS)"; }; ++ extra_make_flags="$(EXTRA_GCC_FLAGS)"; ++ extra_configure_flags='@gcc_host_pie@'; }; + host_modules= { module= gmp; lib_path=.libs; bootstrap=true; + // Work around in-tree gmp configure bug with missing flex. +- extra_configure_flags='--disable-shared LEX="touch lex.yy.c"'; ++ extra_configure_flags='--disable-shared LEX="touch lex.yy.c" @host_libs_picflag@'; + extra_make_flags='AM_CFLAGS="-DNO_ASM"'; + no_install= true; + // none-*-* disables asm optimizations, bootstrap-testing +@@ -59,14 +60,14 @@ host_modules= { module= gmp; lib_path=.libs; bootstrap=true; + // different from host for target. + target="none-${host_vendor}-${host_os}"; }; + host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true; +- extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@'; ++ extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@'; + extra_make_flags='AM_CFLAGS="-DNO_ASM"'; + no_install= true; }; + host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true; +- extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode'; ++ extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode'; + no_install= true; }; + host_modules= { module= isl; lib_path=.libs; bootstrap=true; +- extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@'; ++ extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@'; + extra_make_flags='V=1'; + no_install= true; }; + host_modules= { module= libelf; lib_path=.libs; bootstrap=true; +@@ -74,6 +75,7 @@ host_modules= { module= libelf; lib_path=.libs; bootstrap=true; + no_install= true; }; + host_modules= { module= gold; bootstrap=true; }; + host_modules= { module= gprof; }; ++// intl acts on 'host_shared' directly, and does not support --with-pic. + host_modules= { module= intl; bootstrap=true; }; + host_modules= { module= tcl; + missing=mostlyclean; }; +@@ -105,7 +107,7 @@ host_modules= { module= libiberty-linker-plugin; bootstrap=true; + // We abuse missing to avoid installing anything for libiconv. + host_modules= { module= libiconv; + bootstrap=true; +- extra_configure_flags='--disable-shared'; ++ extra_configure_flags='--disable-shared @host_libs_picflag@'; + no_install= true; + missing= pdf; + missing= html; +@@ -120,7 +122,7 @@ host_modules= { module= sim; }; + host_modules= { module= texinfo; no_install= true; }; + host_modules= { module= zlib; no_install=true; no_check=true; + bootstrap=true; +- extra_configure_flags='@extra_host_zlib_configure_flags@';}; ++ extra_configure_flags='@extra_host_zlib_configure_flags@ @host_libs_picflag@';}; + host_modules= { module= gnulib; }; + host_modules= { module= gdbsupport; }; + host_modules= { module= gdbserver; }; +@@ -176,7 +178,8 @@ target_modules = { module= libtermcap; no_check=true; + missing=maintainer-clean; }; + target_modules = { module= winsup; }; + target_modules = { module= libgloss; no_check=true; }; +-target_modules = { module= libffi; no_install=true; }; ++target_modules = { module= libffi; no_install=true; ++ extra_configure_flags='--disable-shared --with-pic'; }; + target_modules = { module= zlib; }; + target_modules = { module= rda; }; + target_modules = { module= libada; }; +@@ -656,6 +659,7 @@ languages = { language=brig; gcc-check-target=check-brig; + lib-check-target=check-target-libhsail-rt; }; + languages = { language=d; gcc-check-target=check-d; + lib-check-target=check-target-libphobos; }; ++languages = { language=jit; gcc-check-target=check-jit; }; + + // Toplevel bootstrap + bootstrap_stage = { id=1 ; }; +diff --git a/Makefile.in b/Makefile.in +index 20cbbe2906d..73b25f13b2f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11581,7 +11581,7 @@ configure-gcc: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} \ ++ --target=${target_alias} @gcc_host_pie@ \ + || exit 1 + @endif gcc + +@@ -11616,7 +11616,8 @@ configure-stage1-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + \ +- $(STAGE1_CONFIGURE_FLAGS) ++ $(STAGE1_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage2-gcc maybe-configure-stage2-gcc +@@ -11649,7 +11650,8 @@ configure-stage2-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE2_CONFIGURE_FLAGS) ++ $(STAGE2_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage3-gcc maybe-configure-stage3-gcc +@@ -11682,7 +11684,8 @@ configure-stage3-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE3_CONFIGURE_FLAGS) ++ $(STAGE3_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage4-gcc maybe-configure-stage4-gcc +@@ -11715,7 +11718,8 @@ configure-stage4-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE4_CONFIGURE_FLAGS) ++ $(STAGE4_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc +@@ -11748,7 +11752,8 @@ configure-stageprofile-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEprofile_CONFIGURE_FLAGS) ++ $(STAGEprofile_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stagetrain-gcc maybe-configure-stagetrain-gcc +@@ -11781,7 +11786,8 @@ configure-stagetrain-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEtrain_CONFIGURE_FLAGS) ++ $(STAGEtrain_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc +@@ -11814,7 +11820,8 @@ configure-stagefeedback-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEfeedback_CONFIGURE_FLAGS) ++ $(STAGEfeedback_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageautoprofile-gcc maybe-configure-stageautoprofile-gcc +@@ -11847,7 +11854,8 @@ configure-stageautoprofile-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEautoprofile_CONFIGURE_FLAGS) ++ $(STAGEautoprofile_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageautofeedback-gcc maybe-configure-stageautofeedback-gcc +@@ -11880,7 +11888,8 @@ configure-stageautofeedback-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEautofeedback_CONFIGURE_FLAGS) ++ $(STAGEautofeedback_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + +@@ -12695,7 +12704,7 @@ configure-gmp: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \ +- --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" \ ++ --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ \ + || exit 1 + @endif gmp + +@@ -12731,7 +12740,7 @@ configure-stage1-gmp: + --target=none-${host_vendor}-${host_os} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stage2-gmp maybe-configure-stage2-gmp +@@ -12765,7 +12774,7 @@ configure-stage2-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stage3-gmp maybe-configure-stage3-gmp +@@ -12799,7 +12808,7 @@ configure-stage3-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stage4-gmp maybe-configure-stage4-gmp +@@ -12833,7 +12842,7 @@ configure-stage4-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stageprofile-gmp maybe-configure-stageprofile-gmp +@@ -12867,7 +12876,7 @@ configure-stageprofile-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stagetrain-gmp maybe-configure-stagetrain-gmp +@@ -12901,7 +12910,7 @@ configure-stagetrain-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stagefeedback-gmp maybe-configure-stagefeedback-gmp +@@ -12935,7 +12944,7 @@ configure-stagefeedback-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stageautoprofile-gmp maybe-configure-stageautoprofile-gmp +@@ -12969,7 +12978,7 @@ configure-stageautoprofile-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stageautofeedback-gmp maybe-configure-stageautofeedback-gmp +@@ -13003,7 +13012,7 @@ configure-stageautofeedback-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + +@@ -13806,7 +13815,7 @@ configure-mpfr: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ \ ++ --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ \ + || exit 1 + @endif mpfr + +@@ -13842,7 +13851,7 @@ configure-stage1-mpfr: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stage2-mpfr maybe-configure-stage2-mpfr +@@ -13876,7 +13885,7 @@ configure-stage2-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr +@@ -13910,7 +13919,7 @@ configure-stage3-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stage4-mpfr maybe-configure-stage4-mpfr +@@ -13944,7 +13953,7 @@ configure-stage4-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stageprofile-mpfr maybe-configure-stageprofile-mpfr +@@ -13978,7 +13987,7 @@ configure-stageprofile-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stagetrain-mpfr maybe-configure-stagetrain-mpfr +@@ -14012,7 +14021,7 @@ configure-stagetrain-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stagefeedback-mpfr maybe-configure-stagefeedback-mpfr +@@ -14046,7 +14055,7 @@ configure-stagefeedback-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stageautoprofile-mpfr maybe-configure-stageautoprofile-mpfr +@@ -14080,7 +14089,7 @@ configure-stageautoprofile-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stageautofeedback-mpfr maybe-configure-stageautofeedback-mpfr +@@ -14114,7 +14123,7 @@ configure-stageautofeedback-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + +@@ -14917,7 +14926,7 @@ configure-mpc: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode \ ++ --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode \ + || exit 1 + @endif mpc + +@@ -14953,7 +14962,7 @@ configure-stage1-mpc: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stage2-mpc maybe-configure-stage2-mpc +@@ -14987,7 +14996,7 @@ configure-stage2-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stage3-mpc maybe-configure-stage3-mpc +@@ -15021,7 +15030,7 @@ configure-stage3-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stage4-mpc maybe-configure-stage4-mpc +@@ -15055,7 +15064,7 @@ configure-stage4-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stageprofile-mpc maybe-configure-stageprofile-mpc +@@ -15089,7 +15098,7 @@ configure-stageprofile-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stagetrain-mpc maybe-configure-stagetrain-mpc +@@ -15123,7 +15132,7 @@ configure-stagetrain-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stagefeedback-mpc maybe-configure-stagefeedback-mpc +@@ -15157,7 +15166,7 @@ configure-stagefeedback-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stageautoprofile-mpc maybe-configure-stageautoprofile-mpc +@@ -15191,7 +15200,7 @@ configure-stageautoprofile-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stageautofeedback-mpc maybe-configure-stageautofeedback-mpc +@@ -15225,7 +15234,7 @@ configure-stageautofeedback-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + +@@ -16028,7 +16037,7 @@ configure-isl: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ \ ++ --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ \ + || exit 1 + @endif isl + +@@ -16064,7 +16073,7 @@ configure-stage1-isl: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stage2-isl maybe-configure-stage2-isl +@@ -16098,7 +16107,7 @@ configure-stage2-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stage3-isl maybe-configure-stage3-isl +@@ -16132,7 +16141,7 @@ configure-stage3-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stage4-isl maybe-configure-stage4-isl +@@ -16166,7 +16175,7 @@ configure-stage4-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stageprofile-isl maybe-configure-stageprofile-isl +@@ -16200,7 +16209,7 @@ configure-stageprofile-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stagetrain-isl maybe-configure-stagetrain-isl +@@ -16234,7 +16243,7 @@ configure-stagetrain-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stagefeedback-isl maybe-configure-stagefeedback-isl +@@ -16268,7 +16277,7 @@ configure-stagefeedback-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stageautoprofile-isl maybe-configure-stageautoprofile-isl +@@ -16302,7 +16311,7 @@ configure-stageautoprofile-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stageautofeedback-isl maybe-configure-stageautofeedback-isl +@@ -16336,7 +16345,7 @@ configure-stageautofeedback-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + +@@ -29938,7 +29947,7 @@ configure-libiconv: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared \ ++ --target=${target_alias} --disable-shared @host_libs_picflag@ \ + || exit 1 + @endif libiconv + +@@ -29974,7 +29983,7 @@ configure-stage1-libiconv: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stage2-libiconv maybe-configure-stage2-libiconv +@@ -30008,7 +30017,7 @@ configure-stage2-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stage3-libiconv maybe-configure-stage3-libiconv +@@ -30042,7 +30051,7 @@ configure-stage3-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stage4-libiconv maybe-configure-stage4-libiconv +@@ -30076,7 +30085,7 @@ configure-stage4-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stageprofile-libiconv maybe-configure-stageprofile-libiconv +@@ -30110,7 +30119,7 @@ configure-stageprofile-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stagetrain-libiconv maybe-configure-stagetrain-libiconv +@@ -30144,7 +30153,7 @@ configure-stagetrain-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stagefeedback-libiconv maybe-configure-stagefeedback-libiconv +@@ -30178,7 +30187,7 @@ configure-stagefeedback-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stageautoprofile-libiconv maybe-configure-stageautoprofile-libiconv +@@ -30212,7 +30221,7 @@ configure-stageautoprofile-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stageautofeedback-libiconv maybe-configure-stageautofeedback-libiconv +@@ -30246,7 +30255,7 @@ configure-stageautofeedback-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + +@@ -33149,7 +33158,7 @@ configure-zlib: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} @extra_host_zlib_configure_flags@ \ ++ --target=${target_alias} @extra_host_zlib_configure_flags@ @host_libs_picflag@ \ + || exit 1 + @endif zlib + +@@ -33185,7 +33194,7 @@ configure-stage1-zlib: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stage2-zlib maybe-configure-stage2-zlib +@@ -33219,7 +33228,7 @@ configure-stage2-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stage3-zlib maybe-configure-stage3-zlib +@@ -33253,7 +33262,7 @@ configure-stage3-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stage4-zlib maybe-configure-stage4-zlib +@@ -33287,7 +33296,7 @@ configure-stage4-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib +@@ -33321,7 +33330,7 @@ configure-stageprofile-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stagetrain-zlib maybe-configure-stagetrain-zlib +@@ -33355,7 +33364,7 @@ configure-stagetrain-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib +@@ -33389,7 +33398,7 @@ configure-stagefeedback-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stageautoprofile-zlib maybe-configure-stageautoprofile-zlib +@@ -33423,7 +33432,7 @@ configure-stageautoprofile-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stageautofeedback-zlib maybe-configure-stageautofeedback-zlib +@@ -33457,7 +33466,7 @@ configure-stageautofeedback-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + +@@ -53025,7 +53034,7 @@ configure-target-libffi: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ +- --target=${target_alias} \ ++ --target=${target_alias} --disable-shared --with-pic \ + || exit 1 + @endif target-libffi + +@@ -57074,6 +57083,14 @@ check-gcc-d: + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-d); + check-d: check-gcc-d check-target-libphobos + ++.PHONY: check-gcc-jit check-jit ++check-gcc-jit: ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-jit); ++check-jit: check-gcc-jit ++ + + # The gcc part of install-no-fixedincludes, which relies on an intimate + # knowledge of how a number of gcc internal targets (inter)operate. Delegate. +diff --git a/c++tools/Makefile.in b/c++tools/Makefile.in +index 9700706206d..d9f3800cde0 100644 +--- a/c++tools/Makefile.in ++++ b/c++tools/Makefile.in +@@ -28,8 +28,9 @@ AUTOCONF := @AUTOCONF@ + AUTOHEADER := @AUTOHEADER@ + CXX := @CXX@ + CXXFLAGS := @CXXFLAGS@ +-PIEFLAG := @PIEFLAG@ +-CXXOPTS := $(CXXFLAGS) $(PIEFLAG) -fno-exceptions -fno-rtti ++PICFLAG := @PICFLAG@ ++LD_PICFLAG := @LD_PICFLAG@ ++CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-exceptions -fno-rtti + LDFLAGS := @LDFLAGS@ + exeext := @EXEEXT@ + LIBIBERTY := ../libiberty/libiberty.a +@@ -87,11 +88,15 @@ ifeq (@CXX_AUX_TOOLS@,yes) + + all::g++-mapper-server$(exeext) + ++ifneq ($(PICFLAG),) ++override LIBIBERTY := ../libiberty/pic/libiberty.a ++endif ++ + MAPPER.O := server.o resolver.o + CODYLIB = ../libcody/libcody.a + CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. + g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB) +- +$(CXX) $(LDFLAGS) $(PIEFLAG) -o $@ $^ $(VERSION.O) $(LIBIBERTY) $(NETLIBS) ++ +$(CXX) $(LDFLAGS) $(PICFLAG) -o $@ $^ $(VERSION.O) $(LIBIBERTY) $(NETLIBS) + + # copy to gcc dir so tests there can run + all::../gcc/g++-mapper-server$(exeext) +diff --git a/c++tools/configure b/c++tools/configure +index 742816e4253..88087009383 100755 +--- a/c++tools/configure ++++ b/c++tools/configure +@@ -627,7 +627,8 @@ get_gcc_base_ver + EGREP + GREP + CXXCPP +-PIEFLAG ++LD_PICFLAG ++PICFLAG + MAINTAINER + CXX_AUX_TOOLS + AUTOHEADER +@@ -700,6 +701,7 @@ enable_c___tools + enable_maintainer_mode + enable_checking + enable_default_pie ++enable_host_pie + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1333,6 +1335,7 @@ Optional Features: + only specific categories of checks. Categories are: + yes,no,all,none,release. + --enable-default-pie enable Position Independent Executable as default ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2990,12 +2993,20 @@ fi + # Check whether --enable-default-pie was given. + # Check whether --enable-default-pie was given. + if test "${enable_default_pie+set}" = set; then : +- enableval=$enable_default_pie; PIEFLAG=-fPIE ++ enableval=$enable_default_pie; PICFLAG=-fPIE + else +- PIEFLAG= ++ PICFLAG= + fi + + ++# Enable --enable-host-pie ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie ++fi ++ ++ ++ + + # Check if O_CLOEXEC is defined by fcntl + +diff --git a/c++tools/configure.ac b/c++tools/configure.ac +index c89ac6a41a4..e77fbbd7090 100644 +--- a/c++tools/configure.ac ++++ b/c++tools/configure.ac +@@ -102,8 +102,15 @@ fi + AC_ARG_ENABLE(default-pie, + [AS_HELP_STRING([--enable-default-pie], + [enable Position Independent Executable as default])], +-[PIEFLAG=-fPIE], [PIEFLAG=]) +-AC_SUBST([PIEFLAG]) ++[PICFLAG=-fPIE], [PICFLAG=]) ++ ++# Enable --enable-host-pie ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])], ++[PICFLAG=-fPIE; LD_PICFLAG=-pie], []) ++AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) + + # Check if O_CLOEXEC is defined by fcntl + AC_CACHE_CHECK(for O_CLOEXEC, ac_cv_o_cloexec, [ +diff --git a/c++tools/resolver.cc b/c++tools/resolver.cc +index ef08de53072..298a7008465 100644 +--- a/c++tools/resolver.cc ++++ b/c++tools/resolver.cc +@@ -307,3 +307,14 @@ module_resolver::IncludeTranslateRequest (Cody::Server *s, Cody::Flags, + return 0; + } + ++/* This handles a client notification to the server that a CMI has been ++ produced for a module. For this simplified server, we just accept ++ the transaction and respond with "OK". */ ++ ++int ++module_resolver::ModuleCompiledRequest (Cody::Server *s, Cody::Flags, ++ std::string &) ++{ ++ s->OKResponse(); ++ return 0; ++} +diff --git a/c++tools/resolver.h b/c++tools/resolver.h +index a9547bf6994..ac4caf0e195 100644 +--- a/c++tools/resolver.h ++++ b/c++tools/resolver.h +@@ -96,6 +96,10 @@ public: + std::string &include) + override; + ++ using parent::ModuleCompiledRequest; ++ virtual int ModuleCompiledRequest (Cody::Server *s, Cody::Flags Flags, ++ std::string &Module) override; ++ + private: + using parent::GetCMISuffix; + virtual char const *GetCMISuffix () override; +diff --git a/c++tools/server.cc b/c++tools/server.cc +index ebc1efbda94..3a52fecdcf5 100644 +--- a/c++tools/server.cc ++++ b/c++tools/server.cc +@@ -360,7 +360,11 @@ accept_from (char *arg ATTRIBUTE_UNUSED) + hints.ai_next = NULL; + + struct addrinfo *addrs = NULL; +- if (int e = getaddrinfo (slash == arg ? NULL : arg, "0", &hints, &addrs)) ++ /* getaddrinfo requires either hostname or servname to be non-null, so that we must ++ set a port number (to cover the case that the string passed contains just /NN). ++ Use an arbitrary in-range port number, but avoiding "0" which triggers a bug on ++ some BSD variants. */ ++ if (int e = getaddrinfo (slash == arg ? NULL : arg, "1", &hints, &addrs)) + { + noisy ("cannot resolve '%s': %s", arg, gai_strerror (e)); + ok = false; +diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 +index 8f278719118..7ee342fe5fe 100644 +--- a/config/gcc-plugin.m4 ++++ b/config/gcc-plugin.m4 +@@ -91,14 +91,18 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], + # Check that we can build shared objects with -fPIC -shared + saved_LDFLAGS="$LDFLAGS" + saved_CFLAGS="$CFLAGS" ++ saved_CXXFLAGS="$CXXFLAGS" + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` + CFLAGS="$CFLAGS -fPIC" ++ CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g` ++ CXXFLAGS="$CXXFLAGS -fPIC" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) + CFLAGS="$CFLAGS -fPIC" ++ CXXFLAGS="$CXXFLAGS -fPIC" + LDFLAGS="$LDFLAGS -fPIC -shared" + ;; + esac +@@ -113,6 +117,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], + fi + LDFLAGS="$saved_LDFLAGS" + CFLAGS="$saved_CFLAGS" ++ CXXFLAGS="$saved_CXXFLAGS" + + # If plugin support had been requested but not available, fail. + if test x"$enable_plugin" = x"no" ; then +diff --git a/configure b/configure +index 74775c31c58..62f5cb2e033 100755 +--- a/configure ++++ b/configure +@@ -682,7 +682,11 @@ get_gcc_base_ver + extra_host_zlib_configure_flags + extra_host_libiberty_configure_flags + stage1_languages ++host_libs_picflag ++PICFLAG + host_shared ++gcc_host_pie ++host_pie + extra_linker_plugin_flags + extra_linker_plugin_configure_flags + islinc +@@ -822,6 +826,7 @@ enable_isl_version_check + enable_lto + enable_linker_plugin_configure_flags + enable_linker_plugin_flags ++enable_host_pie + enable_host_shared + enable_stage1_languages + enable_objc_gc +@@ -1543,6 +1548,7 @@ Optional Features: + --enable-linker-plugin-flags=FLAGS + additional flags for configuring and building linker + plugins [none] ++ --enable-host-pie build position independent host executables + --enable-host-shared build host code as shared libraries + --enable-stage1-languages[=all] + choose additional languages to build during stage1. +@@ -3492,6 +3498,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[3456789]86-*-darwin*) +@@ -8041,6 +8049,20 @@ else + fi + fi + ++case $target in ++ *-darwin2* | *-darwin1[56789]*) ++ # For these versions, we default to using embedded rpaths. ++ if test "x$enable_darwin_at_rpath" != "xno"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++ *-darwin*) ++ # For these versions, we only use embedded rpaths on demand. ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++esac + + + # GCC GRAPHITE dependency isl. +@@ -8272,6 +8294,39 @@ fi + + + ++# Handle --enable-host-pie ++# If host PIE executables are the default (or must be forced on) for some host, ++# we must pass that configuration to the gcc directory. ++gcc_host_pie= ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; host_pie=$enableval ++ case $host in ++ *-*-darwin2*) ++ if test x$host_pie != xyes ; then ++ # for Darwin20+ this is required. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&2;} ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ fi ;; ++ *) ;; ++ esac ++else ++ case $host in ++ *-*-darwin2*) ++ # Default to PIE (mandatory for aarch64). ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ ;; ++ *) host_pie=no ;; ++ esac ++fi ++ ++ ++ ++ ++ + # Enable --enable-host-shared. + # Checked early to determine whether jit is an 'all' language + # Check whether --enable-host-shared was given. +@@ -8281,20 +8336,60 @@ if test "${enable_host_shared+set}" = set; then : + x86_64-*-darwin* | aarch64-*-darwin*) + if test x$host_shared != xyes ; then + # PIC is the default, and actually cannot be switched off. +- echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&2;} ++ host_shared=yes ++ fi ;; ++ *-*-darwin*) ++ if test x$host_pie = xyes -a x$host_shared != xyes ; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&2;} + host_shared=yes + fi ;; + *) ;; + esac + else + case $host in ++ # 64B x86_64 and Aarch64 Darwin default to PIC. + x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; +- *) host_shared=no ;; ++ # 32B and powerpc64 Darwin must use PIC to link PIE exes. ++ *-*-darwin*) host_shared=$host_pie ;; ++ *) host_shared=no;; + esac + fi + + + ++if test x$host_shared = xyes; then ++ case $host in ++ *-*-darwin*) ++ # Since host shared is the default for 64b Darwin, and also enabled for ++ # host_pie, ensure that we present the PIE flag when host_pie is active. ++ if test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++ fi ++ ;; ++ *) ++ PICFLAG=-fPIC ++ ;; ++ esac ++elif test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++ ++ ++# If we are building PIC/PIE host executables, and we are building dependent ++# libs (e.g. GMP) in-tree those libs need to be configured to generate PIC ++# code. ++host_libs_picflag= ++if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then ++host_libs_picflag='--with-pic' ++fi ++ ++ + # By default, C and C++ are the only stage 1 languages. + stage1_languages=,c, + +@@ -9911,8 +10006,6 @@ done + + + +- +- + # Generate default definitions for YACC, M4, LEX and other programs that run + # on the build machine. These are used if the Makefile can't locate these + # programs in objdir. +diff --git a/configure.ac b/configure.ac +index 3613860460e..d310482df7b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -761,6 +761,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[[3456789]]86-*-darwin*) +@@ -1781,6 +1783,20 @@ AC_ARG_WITH(boot-ldflags, + if test "$poststage1_libs" = ""; then + poststage1_ldflags="-static-libstdc++ -static-libgcc" + fi]) ++case $target in ++ *-darwin2* | *-darwin1[[56789]]*) ++ # For these versions, we default to using embedded rpaths. ++ if test "x$enable_darwin_at_rpath" != "xno"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++ *-darwin*) ++ # For these versions, we only use embedded rpaths on demand. ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++esac + AC_SUBST(poststage1_ldflags) + + # GCC GRAPHITE dependency isl. +@@ -1866,6 +1882,36 @@ AC_ARG_ENABLE(linker-plugin-flags, + extra_linker_plugin_flags=) + AC_SUBST(extra_linker_plugin_flags) + ++# Handle --enable-host-pie ++# If host PIE executables are the default (or must be forced on) for some host, ++# we must pass that configuration to the gcc directory. ++gcc_host_pie= ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build position independent host executables])], ++[host_pie=$enableval ++ case $host in ++ *-*-darwin2*) ++ if test x$host_pie != xyes ; then ++ # for Darwin20+ this is required. ++ AC_MSG_WARN([PIE executables are required for the configured host, host-pie setting ignored.]) ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ fi ;; ++ *) ;; ++ esac], ++[case $host in ++ *-*-darwin2*) ++ # Default to PIE (mandatory for aarch64). ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ ;; ++ *) host_pie=no ;; ++ esac]) ++ ++AC_SUBST(host_pie) ++AC_SUBST(gcc_host_pie) ++ + # Enable --enable-host-shared. + # Checked early to determine whether jit is an 'all' language + AC_ARG_ENABLE(host-shared, +@@ -1876,17 +1922,55 @@ AC_ARG_ENABLE(host-shared, + x86_64-*-darwin* | aarch64-*-darwin*) + if test x$host_shared != xyes ; then + # PIC is the default, and actually cannot be switched off. +- echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 ++ AC_MSG_WARN([PIC code is required for the configured host; host-shared setting ignored.]) ++ host_shared=yes ++ fi ;; ++ *-*-darwin*) ++ if test x$host_pie = xyes -a x$host_shared != xyes ; then ++ AC_MSG_WARN([PIC code is required for PIE host executables host-shared setting ignored.]) + host_shared=yes + fi ;; + *) ;; + esac], + [case $host in ++ # 64B x86_64 and Aarch64 Darwin default to PIC. + x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; +- *) host_shared=no ;; ++ # 32B and powerpc64 Darwin must use PIC to link PIE exes. ++ *-*-darwin*) host_shared=$host_pie ;; ++ *) host_shared=no;; + esac]) + AC_SUBST(host_shared) + ++if test x$host_shared = xyes; then ++ case $host in ++ *-*-darwin*) ++ # Since host shared is the default for 64b Darwin, and also enabled for ++ # host_pie, ensure that we present the PIE flag when host_pie is active. ++ if test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++ fi ++ ;; ++ *) ++ PICFLAG=-fPIC ++ ;; ++ esac ++elif test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++AC_SUBST(PICFLAG) ++ ++# If we are building PIC/PIE host executables, and we are building dependent ++# libs (e.g. GMP) in-tree those libs need to be configured to generate PIC ++# code. ++host_libs_picflag= ++if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then ++host_libs_picflag='--with-pic' ++fi ++AC_SUBST(host_libs_picflag) ++ + # By default, C and C++ are the only stage 1 languages. + stage1_languages=,c, + +diff --git a/contrib/compare-debug b/contrib/compare-debug +index cf80ae32695..678a897c931 100755 +--- a/contrib/compare-debug ++++ b/contrib/compare-debug +@@ -60,9 +60,19 @@ trap 'rm -f "$1.$suf1" "$2.$suf2"' 0 1 2 15 + case `uname -s` in + Darwin) + # The strip command on darwin does not remove all debug info. +- # Fortunately, we can use ld to do it instead. +- ld -S -r -no_uuid "$1" -o "$1.$suf1" +- ld -S -r -no_uuid "$2" -o "$2.$suf2" ++ # Fortunately, we can use ld to do it instead, but even ld on earlier ++ # system versions can be fussy about what it finds - make sure we use ++ # a ld that understands coalesced sections. ++ case `uname -r` in ++ 8*) ++ ld64 -S -r -no_uuid "$1" -o "$1.$suf1" ++ ld64 -S -r -no_uuid "$2" -o "$2.$suf2" ++ ;; ++ *) ++ ld -S -r -no_uuid "$1" -o "$1.$suf1" ++ ld -S -r -no_uuid "$2" -o "$2.$suf2" ++ ;; ++ esac + ;; + *) + cp "$1" "$1.$suf1" +diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in +index 1937dcaa32d..e6ce41dba39 100644 +--- a/fixincludes/Makefile.in ++++ b/fixincludes/Makefile.in +@@ -73,7 +73,7 @@ default : all + # Now figure out from those variables how to compile and link. + + .c.o: +- $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $< ++ $(CC) -c $(CFLAGS) $(PICFLAG) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $< + + # The only suffixes we want for implicit rules are .c and .o. + .SUFFIXES: +@@ -87,7 +87,11 @@ default : all + ## + ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + ++ifeq ($(PICFLAG),) + LIBIBERTY=../libiberty/libiberty.a ++else ++LIBIBERTY=../libiberty/pic/libiberty.a ++endif + + ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \ + fixlib.o fixopts.o +@@ -107,15 +111,15 @@ oneprocess : full-stamp + twoprocess : test-stamp $(AF) + + full-stamp : $(ALLOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(ALLOBJ) $(LIBIBERTY) + $(STAMP) $@ + + test-stamp : $(TESTOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(TESTOBJ) $(LIBIBERTY) + $(STAMP) $@ + + $(AF): $(FIXOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $@ $(FIXOBJ) $(LIBIBERTY) + + $(ALLOBJ) : $(HDR) + fixincl.o : fixincl.c $(srcdir)/fixincl.x +diff --git a/fixincludes/configure b/fixincludes/configure +index 6e2d67b655b..2df18ba3bf6 100755 +--- a/fixincludes/configure ++++ b/fixincludes/configure +@@ -623,6 +623,8 @@ ac_subst_vars='LTLIBOBJS + LIBOBJS + get_gcc_base_ver + MAINT ++LD_PICFLAG ++PICFLAG + TARGET + target_noncanonical + WERROR +@@ -695,6 +697,7 @@ enable_option_checking + enable_werror_always + with_local_prefix + enable_twoprocess ++enable_host_pie + enable_maintainer_mode + with_gcc_major_version_only + ' +@@ -1323,6 +1326,7 @@ Optional Features: + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-werror-always enable -Werror despite compiler version + --enable-twoprocess Use a separate process to apply the fixes ++ --enable-host-pie build host code as PIE + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +@@ -3044,7 +3048,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # the compiler configuration to `libtool'. + # _LT_LANG_CXX_CONFIG + +- + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +@@ -4835,6 +4838,15 @@ $as_echo "#define SEPARATE_FIX_PROC 1" >>confdefs.h + + fi + ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie ++fi ++ ++ ++ ++ + case $host in + vax-dec-bsd* ) + +diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac +index 14813b910f1..ec8534f769f 100644 +--- a/fixincludes/configure.ac ++++ b/fixincludes/configure.ac +@@ -68,6 +68,14 @@ if test $TARGET = twoprocess; then + [Define if testing and fixing are done by separate process]) + fi + ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])], ++[PICFLAG=-fPIE; LD_PICFLAG=-pie], []) ++AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) ++ + case $host in + vax-dec-bsd* ) + AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit]) +diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x +index 055a9a03f85..32280c67411 100644 +--- a/fixincludes/fixincl.x ++++ b/fixincludes/fixincl.x +@@ -2,11 +2,11 @@ + * + * DO NOT EDIT THIS FILE (fixincl.x) + * +- * It has been AutoGen-ed April 12, 2024 at 01:20:56 PM by AutoGen 5.18.7 ++ * It has been AutoGen-ed June 9, 2024 at 02:55:17 PM by AutoGen 5.18.7 + * From the definitions inclhack.def + * and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Apr 12 13:20:56 BST 2024 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 9 14:55:17 BST 2024 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 263 fixup descriptions. ++ * This file contains 261 fixup descriptions. + * + * See README for more information. + * +@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { + #endif /* __MATH__ */", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Api_Availability fix +- */ +-tSCC zDarwin_Api_AvailabilityName[] = +- "darwin_api_availability"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_Api_AvailabilityList[] = +- "os/availability.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_Api_AvailabilityMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilitySelect0[] = +- " *#define __API_AVAILABLE.*\n\ +- *#define __API_DEPRECATED.*\n\ +- *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ +- *#define __API_UNAVAILABLE.*\n"; +- +-/* +- * content bypass pattern - skip fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilityBypass0[] = +- "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- +-#define DARWIN_API_AVAILABILITY_TEST_CT 2 +-static tTestDesc aDarwin_Api_AvailabilityTests[] = { +- { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, +- { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Api_Availability +- */ +-static const char* apzDarwin_Api_AvailabilityPatch[] = { +- "format", +- " #define API_AVAILABLE(...)\n\ +- #define API_DEPRECATED(...)\n\ +- #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ +- #define API_UNAVAILABLE(...)\n", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix +@@ -2763,51 +2713,6 @@ extern \"C\" {\n\ + #endif\n", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Availabilityinternal fix +- */ +-tSCC zDarwin_AvailabilityinternalName[] = +- "darwin_availabilityinternal"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_AvailabilityinternalList[] = +- "AvailabilityInternal.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_AvailabilityinternalMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_AvailabilityinternalSelect0[] = +- "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- +-#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1 +-static tTestDesc aDarwin_AvailabilityinternalTests[] = { +- { TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Availabilityinternal +- */ +-static const char* apzDarwin_AvailabilityinternalPatch[] = { +- "format", +- "#if defined(__has_attribute)\n\ +- #if __has_attribute(availability)\n\ +-%0\n\ +- #else\n\ +- #define %1\n\ +- #endif\n\ +-#else\n\ +- #define %1\n\ +-#endif", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_9_Long_Double_Funcs_2 fix +@@ -10684,9 +10589,9 @@ static const char* apzX11_SprintfPatch[] = { + * + * List of all fixes + */ +-#define REGEX_COUNT 301 ++#define REGEX_COUNT 298 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 263 ++#define FIX_COUNT 261 + + /* + * Enumerate the fixes +@@ -10695,7 +10600,6 @@ typedef enum { + AAB_AIX_STDIO_FIXIDX, + AAB_AIX_FCNTL_FIXIDX, + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, +- DARWIN_API_AVAILABILITY_FIXIDX, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, + AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, + AAB_FD_ZERO_SELECTBITS_H_FIXIDX, +@@ -10757,7 +10661,6 @@ typedef enum { + CTRL_QUOTES_DEF_FIXIDX, + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, +- DARWIN_AVAILABILITYINTERNAL_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, + DARWIN_EXTERNC_FIXIDX, + DARWIN_GCC4_BREAKAGE_FIXIDX, +@@ -10973,11 +10876,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + +- { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, +- apzDarwin_Api_AvailabilityMachs, +- DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, +- + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, + apzAab_Fd_Zero_Asm_Posix_Types_HMachs, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, +@@ -11283,11 +11181,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, + +- { zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList, +- apzDarwin_AvailabilityinternalMachs, +- DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 }, +- + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def +index 0782fb05c85..8aa8eebc736 100644 +--- a/fixincludes/inclhack.def ++++ b/fixincludes/inclhack.def +@@ -194,33 +194,6 @@ fix = { + _EndOfHeader_; + }; + +-/* +- * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where +- * __attribute__((availability)) is not supported. +- */ +-fix = { +- hackname = darwin_api_availability; +- mach = "*-*-darwin*"; +- files = os/availability.h; +- bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- select = +- " *#define __API_AVAILABLE.*\n" +- " *#define __API_DEPRECATED.*\n" +- " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" +- " *#define __API_UNAVAILABLE.*\n"; +- c_fix = format; +- c_fix_arg = +- " #define API_AVAILABLE(...)\n" +- " #define API_DEPRECATED(...)\n" +- " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- " #define API_UNAVAILABLE(...)\n"; +- test_text = +- "#define __API_AVAILABLE(...)\n" +- "#define __API_DEPRECATED(...)\n" +- "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- "#define __API_UNAVAILABLE(...)\n"; +-}; +- + /* + * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) + */ +@@ -1350,32 +1323,6 @@ fix = { + test_text = "extern void* malloc( size_t );"; + }; + +-/* +- * macOS 10.12 uses __attribute__((availability)) +- * unconditionally. +- */ +-fix = { +- hackname = darwin_availabilityinternal; +- mach = "*-*-darwin*"; +- files = AvailabilityInternal.h; +- select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- c_fix = format; +- c_fix_arg = <<- _EOFix_ +- #if defined(__has_attribute) +- #if __has_attribute(availability) +- %0 +- #else +- #define %1 +- #endif +- #else +- #define %1 +- #endif +- _EOFix_; +- +- test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n" +- "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))"; +-}; +- + /* + * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) + * to be useful, the main math.h must use <> and not "" includes. +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 7bfd6ce653f..493e6067d63 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -155,6 +155,9 @@ LDFLAGS = @LDFLAGS@ + # Should we build position-independent host code? + PICFLAG = @PICFLAG@ + ++# The linker flag for the above. ++LD_PICFLAG = @LD_PICFLAG@ ++ + # Flags to determine code coverage. When coverage is disabled, this will + # contain the optimization flags, as you normally want code coverage + # without optimization. +@@ -263,18 +266,17 @@ LINKER = $(CC) + LINKER_FLAGS = $(CFLAGS) + endif + ++enable_host_pie = @enable_host_pie@ ++ + # Enable Intel CET on Intel CET enabled host if needed. + CET_HOST_FLAGS = @CET_HOST_FLAGS@ + COMPILER += $(CET_HOST_FLAGS) + +-NO_PIE_CFLAGS = @NO_PIE_CFLAGS@ +-NO_PIE_FLAG = @NO_PIE_FLAG@ +- +-# We don't want to compile the compilers with -fPIE, it make PCH fail. +-COMPILER += $(NO_PIE_CFLAGS) ++# Maybe compile the compilers with -fPIE or -fPIC. ++COMPILER += $(PICFLAG) + +-# Link with -no-pie since we compile the compiler with -fno-PIE. +-LINKER += $(NO_PIE_FLAG) ++# Link with -pie, or -no-pie, depending on the above. ++LINKER += $(LD_PICFLAG) + + # Like LINKER, but use a mutex for serializing front end links. + ifeq (@DO_LINK_MUTEX@,true) +@@ -1032,7 +1034,7 @@ RTL_SSA_H = $(PRETTY_PRINT_H) insn-config.h splay-tree-utils.h \ + # programs built during a bootstrap. + # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a + # cross compiler which does not use the native headers and libraries. +-INTERNAL_CFLAGS = -DIN_GCC $(PICFLAG) @CROSS@ ++INTERNAL_CFLAGS = -DIN_GCC @CROSS@ + + # This is the variable actually used when we compile. If you change this, + # you probably want to update BUILD_CFLAGS in configure.ac +@@ -1050,21 +1052,24 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ + ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) + + # This is the variable to use when using $(COMPILER). +-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) ++ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) $(PICFLAG) + + # This is the variable to use when using $(LINKER). +-ALL_LINKERFLAGS = $(ALL_CXXFLAGS) ++ALL_LINKERFLAGS = $(ALL_CXXFLAGS) $(LD_PICFLAG) + + # Build and host support libraries. + +-# Use the "pic" build of libiberty if --enable-host-shared, unless we are +-# building for mingw. ++# Use the "pic" build of libiberty if --enable-host-shared or --enable-host-pie, ++# unless we are building for mingw. + LIBIBERTY_PICDIR=$(if $(findstring mingw,$(target)),,pic) +-ifeq ($(enable_host_shared),yes) ++ifneq ($(enable_host_shared)$(enable_host_pie),) + LIBIBERTY = ../libiberty/$(LIBIBERTY_PICDIR)/libiberty.a +-BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a + else + LIBIBERTY = ../libiberty/libiberty.a ++endif ++ifeq ($(enable_host_shared),yes) ++BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a ++else + BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a + endif + +@@ -1145,6 +1150,8 @@ LANG_MAKEFRAGS = @all_lang_makefrags@ + # Used by gcc/jit/Make-lang.in + LD_VERSION_SCRIPT_OPTION = @ld_version_script_option@ + LD_SONAME_OPTION = @ld_soname_option@ ++@ENABLE_DARWIN_AT_RPATH_TRUE@DARWIN_RPATH = @rpath ++@ENABLE_DARWIN_AT_RPATH_FALSE@DARWIN_RPATH = ${libdir} + + # Flags to pass to recursive makes. + # CC is set by configure. +@@ -1916,9 +1923,12 @@ cs-tconfig.h: Makefile + $(SHELL) $(srcdir)/mkconfig.sh tconfig.h + + cs-tm.h: Makefile +- TARGET_CPU_DEFAULT="$(target_cpu_default)" \ +- HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ +- $(SHELL) $(srcdir)/mkconfig.sh tm.h ++@ENABLE_DARWIN_AT_RPATH_FALSE@ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ ++@ENABLE_DARWIN_AT_RPATH_FALSE@ HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ ++@ENABLE_DARWIN_AT_RPATH_FALSE@ $(SHELL) $(srcdir)/mkconfig.sh tm.h ++@ENABLE_DARWIN_AT_RPATH_TRUE@ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ HEADERS="$(tm_include_list)" DEFINES="$(tm_defines) DARWIN_AT_RPATH=1" \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ $(SHELL) $(srcdir)/mkconfig.sh tm.h + + cs-tm_p.h: Makefile + TARGET_CPU_DEFAULT="" \ +@@ -4084,6 +4094,9 @@ site.exp: ./config.status Makefile + echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./site.tmp; \ + else true; \ + fi ++ @if test "X@ENABLE_DARWIN_AT_RPATH_TRUE@" != "X#" ; then \ ++ echo "set ENABLE_DARWIN_AT_RPATH 1" >> ./site.tmp; \ ++ fi + @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./site.tmp + @cat ./site.tmp > site.exp + @cat site.bak | sed \ +diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 +index 6be36df5190..126e09bbcd1 100644 +--- a/gcc/aclocal.m4 ++++ b/gcc/aclocal.m4 +@@ -12,6 +12,56 @@ + # PARTICULAR PURPOSE. + + m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) ++# AM_CONDITIONAL -*- Autoconf -*- ++ ++# Copyright (C) 1997-2017 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# AM_CONDITIONAL(NAME, SHELL-CONDITION) ++# ------------------------------------- ++# Define a conditional. ++AC_DEFUN([AM_CONDITIONAL], ++[AC_PREREQ([2.52])dnl ++ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ++ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ++AC_SUBST([$1_TRUE])dnl ++AC_SUBST([$1_FALSE])dnl ++_AM_SUBST_NOTMAKE([$1_TRUE])dnl ++_AM_SUBST_NOTMAKE([$1_FALSE])dnl ++m4_define([_AM_COND_VALUE_$1], [$2])dnl ++if $2; then ++ $1_TRUE= ++ $1_FALSE='#' ++else ++ $1_TRUE='#' ++ $1_FALSE= ++fi ++AC_CONFIG_COMMANDS_PRE( ++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ++ AC_MSG_ERROR([[conditional "$1" was never defined. ++Usually this means the macro was only invoked conditionally.]]) ++fi])]) ++ ++# Copyright (C) 2006-2017 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# _AM_SUBST_NOTMAKE(VARIABLE) ++# --------------------------- ++# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. ++# This macro is traced by Automake. ++AC_DEFUN([_AM_SUBST_NOTMAKE]) ++ ++# AM_SUBST_NOTMAKE(VARIABLE) ++# -------------------------- ++# Public sister of _AM_SUBST_NOTMAKE. ++AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) ++ + m4_include([../libtool.m4]) + m4_include([../ltoptions.m4]) + m4_include([../ltsugar.m4]) +diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl +index b5b8b573ea4..04df78ef3ab 100644 +--- a/gcc/ada/Makefile.rtl ++++ b/gcc/ada/Makefile.rtl +@@ -2911,6 +2911,15 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),) + TOOLS_TARGET_PAIRS = indepsw.adb +diff --git a/gcc/ada/init.c b/gcc/ada/init.c +index 3ceb1a31b02..3ce0f8baf05 100644 +--- a/gcc/ada/init.c ++++ b/gcc/ada/init.c +@@ -2452,7 +2452,10 @@ __gnat_map_signal (int sig, siginfo_t *si, void *mcontext ATTRIBUTE_UNUSED) + /* Reset the use of alt stack, so that the alt stack will be used + for the next signal delivery. + The stack can't be used in case of stack checking. */ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK); ++#pragma GCC diagnostic pop + break; + + case SIGFPE: +diff --git a/gcc/ada/sigtramp-ios.c b/gcc/ada/sigtramp-ios.c +index 7715ddb18d5..f95e6efab61 100644 +--- a/gcc/ada/sigtramp-ios.c ++++ b/gcc/ada/sigtramp-ios.c +@@ -71,6 +71,10 @@ + + /* sigtramp stub providing unwind info for common registers. */ + ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ + extern void __gnat_sigtramp_common + (int signo, void *siginfo, void *sigcontext, + __sigtramphandler_t * handler); +@@ -87,6 +91,10 @@ void __gnat_sigtramp (int signo, void *si, void *ucontext, + __gnat_sigtramp_common (signo, si, mcontext, handler); + } + ++#if defined(__cplusplus) ++} ++#endif ++ + /* asm string construction helpers. */ + + #define STR(TEXT) #TEXT +diff --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-manager.cc +index 443ff058f65..3a383aa7736 100644 +--- a/gcc/analyzer/diagnostic-manager.cc ++++ b/gcc/analyzer/diagnostic-manager.cc +@@ -77,7 +77,7 @@ class epath_finder + public: + epath_finder (const exploded_graph &eg) + : m_eg (eg), +- m_sep (NULL) ++ m_sep (nullptr) + { + /* This is shared by all diagnostics, but only needed if + !flag_analyzer_feasibility. */ +@@ -172,7 +172,7 @@ epath_finder::get_best_epath (const exploded_node *enode, + logger->log ("rejecting %qs at EN: %i, SN: %i (sd: %i)" + " due to not finding feasible path", + desc, enode->m_index, snode_idx, diag_idx); +- return NULL; ++ return nullptr; + } + } + else +@@ -216,7 +216,7 @@ class feasible_worklist + { + public: + feasible_worklist (const shortest_paths &sep) +- : m_queue (key_t (*this, NULL)), ++ : m_queue (key_t (*this, nullptr)), + m_sep (sep) + { + } +@@ -374,7 +374,7 @@ epath_finder::explore_feasible_paths (const exploded_node *target_enode, + a limit. */ + + /* Set this if we find a feasible path to TARGET_ENODE. */ +- exploded_path *best_path = NULL; ++ exploded_path *best_path = nullptr; + + while (process_worklist_item (&worklist, tg, &fg, target_enode, diag_idx, + &best_path)) +@@ -453,10 +453,10 @@ epath_finder::process_worklist_item (feasible_worklist *worklist, + } + + feasibility_state succ_state (fnode->get_state ()); +- rejected_constraint *rc = NULL; ++ rejected_constraint *rc = nullptr; + if (succ_state.maybe_update_for_edge (logger, succ_eedge, &rc)) + { +- gcc_assert (rc == NULL); ++ gcc_assert (rc == nullptr); + feasible_node *succ_fnode + = fg->add_node (succ_eedge->m_dest, + succ_state, +@@ -551,7 +551,7 @@ dump_trimmed_graph (const exploded_node *target_enode, + pp_printf (&pp, "%s.%s.%i.to-en%i.tg.dot", + dump_base_name, desc, diag_idx, target_enode->m_index); + char *filename = xstrdup (pp_formatted_text (&pp)); +- tg.dump_dot (filename, NULL, args); ++ tg.dump_dot (filename, nullptr, args); + free (filename); + } + +@@ -569,7 +569,7 @@ epath_finder::dump_feasible_graph (const exploded_node *target_enode, + pp_printf (&pp, "%s.%s.%i.to-en%i.fg.dot", + dump_base_name, desc, diag_idx, target_enode->m_index); + char *filename = xstrdup (pp_formatted_text (&pp)); +- fg.dump_dot (filename, NULL, args); ++ fg.dump_dot (filename, nullptr, args); + free (filename); + } + +@@ -590,11 +590,11 @@ saved_diagnostic::saved_diagnostic (const state_machine *sm, + : m_sm (sm), m_enode (enode), m_snode (snode), m_stmt (stmt), + /* stmt_finder could be on-stack; we want our own copy that can + outlive that. */ +- m_stmt_finder (stmt_finder ? stmt_finder->clone () : NULL), ++ m_stmt_finder (stmt_finder ? stmt_finder->clone () : nullptr), + m_var (var), m_sval (sval), m_state (state), +- m_d (d), m_trailing_eedge (NULL), ++ m_d (d), m_trailing_eedge (nullptr), + m_idx (idx), +- m_best_epath (NULL), m_problem (NULL) ++ m_best_epath (nullptr), m_problem (nullptr) + { + gcc_assert (m_stmt || m_stmt_finder); + +@@ -680,17 +680,17 @@ saved_diagnostic::calc_best_epath (epath_finder *pf) + LOG_SCOPE (logger); + delete m_best_epath; + delete m_problem; +- m_problem = NULL; ++ m_problem = nullptr; + + m_best_epath = pf->get_best_epath (m_enode, m_d->get_kind (), m_idx, + &m_problem); + + /* Handle failure to find a feasible path. */ +- if (m_best_epath == NULL) ++ if (m_best_epath == nullptr) + return false; + + gcc_assert (m_best_epath); +- if (m_stmt == NULL) ++ if (m_stmt == nullptr) + { + gcc_assert (m_stmt_finder); + m_stmt = m_stmt_finder->find_stmt (*m_best_epath); +@@ -825,7 +825,7 @@ diagnostic_manager::add_diagnostic (exploded_node *enode, + pending_diagnostic *d) + { + gcc_assert (enode); +- add_diagnostic (NULL, enode, snode, stmt, finder, NULL_TREE, NULL, 0, d); ++ add_diagnostic (nullptr, enode, snode, stmt, finder, NULL_TREE, nullptr, 0, d); + } + + /* Return a new json::object of the form +@@ -937,7 +937,7 @@ public: + template + static inline void mark_empty (T &entry) + { +- entry.m_key = NULL; ++ entry.m_key = nullptr; + } + template + static inline bool is_deleted (const T &entry) +@@ -947,7 +947,7 @@ public: + template + static inline bool is_empty (const T &entry) + { +- return entry.m_key == NULL; ++ return entry.m_key == nullptr; + } + static const bool empty_zero_p = true; + }; +@@ -1219,10 +1219,10 @@ public: + stmt, + stack_depth, + sm, +- NULL, ++ nullptr, + src_sm_val, + dst_sm_val, +- NULL, ++ nullptr, + dst_state)); + return false; + } +@@ -1368,7 +1368,7 @@ struct null_assignment_sm_context : public sm_context + tree var) FINAL OVERRIDE + { + const svalue *var_old_sval +- = m_old_state->m_region_model->get_rvalue (var, NULL); ++ = m_old_state->m_region_model->get_rvalue (var, nullptr); + const sm_state_map *old_smap = m_old_state->m_checker_states[m_sm_idx]; + + state_machine::state_t current +@@ -1387,7 +1387,7 @@ struct null_assignment_sm_context : public sm_context + return; + + const svalue *var_new_sval +- = m_new_state->m_region_model->get_rvalue (var, NULL); ++ = m_new_state->m_region_model->get_rvalue (var, nullptr); + const supernode *supernode = m_point->get_supernode (); + int stack_depth = m_point->get_stack_depth (); + +@@ -1397,7 +1397,7 @@ struct null_assignment_sm_context : public sm_context + m_sm, + var_new_sval, + from, to, +- NULL, ++ nullptr, + *m_new_state)); + } + +@@ -1432,7 +1432,7 @@ struct null_assignment_sm_context : public sm_context + if (!assign_stmt) + return NULL_TREE; + if (const svalue *sval +- = m_new_state->m_region_model->get_gassign_result (assign_stmt, NULL)) ++ = m_new_state->m_region_model->get_gassign_result (assign_stmt, nullptr)) + if (tree cst = sval->maybe_get_constant ()) + if (::zerop(cst)) + return gimple_assign_lhs (assign_stmt); +@@ -1551,7 +1551,7 @@ diagnostic_manager::add_events_for_eedge (const path_builder &pb, + { + const extrinsic_state &ext_state = pb.get_ext_state (); + program_state old_state (iter_state); +- iter_state.m_region_model->on_assignment (assign, NULL); ++ iter_state.m_region_model->on_assignment (assign, nullptr); + for (unsigned i = 0; i < ext_state.get_num_checkers (); i++) + { + const state_machine &sm = ext_state.get_sm (i); +@@ -2145,7 +2145,7 @@ same_line_as_p (const expanded_location &ref_exp_loc, + const checker_event *ev = path->get_checker_event (idx); + expanded_location idx_exp_loc = expand_location (ev->get_location ()); + gcc_assert (ref_exp_loc.file); +- if (idx_exp_loc.file == NULL) ++ if (idx_exp_loc.file == nullptr) + return false; + if (strcmp (ref_exp_loc.file, idx_exp_loc.file)) + return false; +@@ -2210,7 +2210,7 @@ diagnostic_manager::consolidate_conditions (checker_path *path) const + = path->get_checker_event (start_idx); + expanded_location start_exp_loc + = expand_location (old_start_ev->get_location ()); +- if (start_exp_loc.file == NULL) ++ if (start_exp_loc.file == nullptr) + continue; + if (!same_line_as_p (start_exp_loc, path, start_idx + 1)) + continue; +diff --git a/gcc/builtins.c b/gcc/builtins.c +index 30e2ebfdffe..bfa12d1ddfb 100644 +--- a/gcc/builtins.c ++++ b/gcc/builtins.c +@@ -7826,6 +7826,12 @@ expand_builtin_trap (void) + static void + expand_builtin_unreachable (void) + { ++ /* If the target wants a trap in place of the fall-through, use that. */ ++ if (targetm.unreachable_should_trap ()) ++ { ++ expand_builtin_trap (); ++ return; ++ } + emit_barrier (); + } + +@@ -10256,6 +10262,10 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, + case BUILT_IN_ADJUST_DESCRIPTOR: + return expand_builtin_adjust_descriptor (exp); + ++ case BUILT_IN_GCC_NESTED_PTR_CREATED: ++ case BUILT_IN_GCC_NESTED_PTR_DELETED: ++ break; /* At present, no expansion, just call the function. */ ++ + case BUILT_IN_FORK: + case BUILT_IN_EXECL: + case BUILT_IN_EXECV: +diff --git a/gcc/builtins.def b/gcc/builtins.def +index b67649a13a9..98aa38320f9 100644 +--- a/gcc/builtins.def ++++ b/gcc/builtins.def +@@ -954,6 +954,8 @@ DEF_BUILTIN_STUB (BUILT_IN_ADJUST_TRAMPOLINE, "__builtin_adjust_trampoline") + DEF_BUILTIN_STUB (BUILT_IN_INIT_DESCRIPTOR, "__builtin_init_descriptor") + DEF_BUILTIN_STUB (BUILT_IN_ADJUST_DESCRIPTOR, "__builtin_adjust_descriptor") + DEF_BUILTIN_STUB (BUILT_IN_NONLOCAL_GOTO, "__builtin_nonlocal_goto") ++DEF_EXT_LIB_BUILTIN (BUILT_IN_GCC_NESTED_PTR_CREATED, "__gcc_nested_func_ptr_created", BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LIST) ++DEF_EXT_LIB_BUILTIN (BUILT_IN_GCC_NESTED_PTR_DELETED, "__gcc_nested_func_ptr_deleted", BT_FN_VOID, ATTR_NOTHROW_LIST) + + /* Implementing __builtin_setjmp. */ + DEF_BUILTIN_STUB (BUILT_IN_SETJMP_SETUP, "__builtin_setjmp_setup") +diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c +index 72c521467ad..562c688c4c9 100644 +--- a/gcc/c-family/c-attribs.c ++++ b/gcc/c-family/c-attribs.c +@@ -121,6 +121,8 @@ static tree handle_pure_attribute (tree *, tree, tree, int, bool *); + static tree handle_tm_attribute (tree *, tree, tree, int, bool *); + static tree handle_tm_wrap_attribute (tree *, tree, tree, int, bool *); + static tree handle_novops_attribute (tree *, tree, tree, int, bool *); ++static tree handle_unavailable_attribute (tree *, tree, tree, int, ++ bool *); + static tree handle_vector_size_attribute (tree *, tree, tree, int, + bool *) ATTRIBUTE_NONNULL(3); + static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); +@@ -404,6 +406,8 @@ const struct attribute_spec c_common_attribute_table[] = + handle_novops_attribute, NULL }, + { "deprecated", 0, 1, false, false, false, false, + handle_deprecated_attribute, NULL }, ++ { "unavailable", 0, 1, false, false, false, false, ++ handle_unavailable_attribute, NULL }, + { "vector_size", 1, 1, false, true, false, true, + handle_vector_size_attribute, NULL }, + { "visibility", 1, 1, false, false, false, false, +@@ -572,6 +576,18 @@ attribute_takes_identifier_p (const_tree attr_id) + return targetm.attribute_takes_identifier_p (attr_id); + } + ++/* Returns TRUE iff the attribute indicated by ATTR_ID needs its ++ arguments converted to string constants. */ ++ ++bool ++attribute_clang_form_p (const_tree attr_id) ++{ ++ const struct attribute_spec *spec = lookup_attribute_spec (attr_id); ++ if (spec && !strcmp ("availability", spec->name)) ++ return true; ++ return false; ++} ++ + /* Verify that argument value POS at position ARGNO to attribute NAME + applied to function TYPE refers to a function parameter at position + POS and the expected type CODE. Treat CODE == INTEGER_TYPE as +@@ -4113,6 +4129,71 @@ handle_deprecated_attribute (tree *node, tree name, + return NULL_TREE; + } + ++/* Handle a "unavailable" attribute; arguments as in ++ struct attribute_spec.handler. */ ++ ++static tree ++handle_unavailable_attribute (tree *node, tree name, ++ tree args, int flags, ++ bool *no_add_attrs) ++{ ++ tree type = NULL_TREE; ++ int warn = 0; ++ tree what = NULL_TREE; ++ ++ if (!args) ++ *no_add_attrs = true; ++ else if (TREE_CODE (TREE_VALUE (args)) != STRING_CST) ++ { ++ error ("the message attached to % is not a string"); ++ *no_add_attrs = true; ++ } ++ ++ if (DECL_P (*node)) ++ { ++ tree decl = *node; ++ type = TREE_TYPE (decl); ++ ++ if (TREE_CODE (decl) == TYPE_DECL ++ || TREE_CODE (decl) == PARM_DECL ++ || VAR_OR_FUNCTION_DECL_P (decl) ++ || TREE_CODE (decl) == FIELD_DECL ++ || TREE_CODE (decl) == CONST_DECL ++ || objc_method_decl (TREE_CODE (decl))) ++ TREE_UNAVAILABLE (decl) = 1; ++ else ++ warn = 1; ++ } ++ else if (TYPE_P (*node)) ++ { ++ if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ *node = build_variant_type_copy (*node); ++ TREE_UNAVAILABLE (*node) = 1; ++ type = *node; ++ } ++ else ++ warn = 1; ++ ++ if (warn) ++ { ++ *no_add_attrs = true; ++ if (type && TYPE_NAME (type)) ++ { ++ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (*node); ++ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (type))) ++ what = DECL_NAME (TYPE_NAME (type)); ++ } ++ if (what) ++ warning (OPT_Wattributes, "%qE attribute ignored for %qE", name, what); ++ else ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ } ++ ++ return NULL_TREE; ++} ++ + /* Return the "base" type from TYPE that is suitable to apply attribute + vector_size to by stripping arrays, function types, etc. */ + static tree +diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c +index ae3ef89b05c..6f91a618f96 100644 +--- a/gcc/c-family/c-common.c ++++ b/gcc/c-family/c-common.c +@@ -307,6 +307,44 @@ const struct fname_var_t fname_vars[] = + {NULL, 0, 0}, + }; + ++/* Flags to restrict availability of generic features that ++ are known to __has_{feature,extension}. */ ++ ++enum ++{ ++ HF_FLAG_NONE = 0, ++ HF_FLAG_EXT = 1, /* Available only as an extension. */ ++ HF_FLAG_SANITIZE = 2, /* Availability depends on sanitizer flags. */ ++}; ++ ++/* Info for generic features which can be queried through ++ __has_{feature,extension}. */ ++ ++struct hf_feature_info ++{ ++ const char *ident; ++ unsigned flags; ++ unsigned mask; ++}; ++ ++/* Table of generic features which can be queried through ++ __has_{feature,extension}. */ ++ ++static constexpr hf_feature_info has_feature_table[] = ++{ ++ { "address_sanitizer", HF_FLAG_SANITIZE, SANITIZE_ADDRESS }, ++ { "thread_sanitizer", HF_FLAG_SANITIZE, SANITIZE_THREAD }, ++ { "leak_sanitizer", HF_FLAG_SANITIZE, SANITIZE_LEAK }, ++ { "hwaddress_sanitizer", HF_FLAG_SANITIZE, SANITIZE_HWADDRESS }, ++ { "undefined_behavior_sanitizer", HF_FLAG_SANITIZE, SANITIZE_UNDEFINED }, ++ { "attribute_deprecated_with_message", HF_FLAG_NONE, 0 }, ++ { "attribute_unavailable_with_message", HF_FLAG_NONE, 0 }, ++ { "enumerator_attributes", HF_FLAG_NONE, 0 }, ++ { "tls", HF_FLAG_NONE, 0 }, ++ { "gnu_asm_goto_with_outputs", HF_FLAG_EXT, 0 }, ++ { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 } ++}; ++ + /* Global visibility options. */ + struct visibility_flags visibility_options; + +@@ -9239,4 +9277,63 @@ c_common_finalize_early_debug (void) + (*debug_hooks->early_global_decl) (cnode->decl); + } + ++/* Map from identifiers to booleans. Value is true for features, and ++ false for extensions. Used to implement __has_{feature,extension}. */ ++ ++using feature_map_t = hash_map ; ++static feature_map_t *feature_map; ++ ++/* Register a feature for __has_{feature,extension}. FEATURE_P is true ++ if the feature identified by NAME is a feature (as opposed to an ++ extension). */ ++ ++void ++c_common_register_feature (const char *name, bool feature_p) ++{ ++ bool dup = feature_map->put (get_identifier (name), feature_p); ++ gcc_checking_assert (!dup); ++} ++ ++/* Lazily initialize hash table for __has_{feature,extension}, ++ dispatching to the appropriate front end to register language-specific ++ features. */ ++ ++static void ++init_has_feature () ++{ ++ gcc_checking_assert (!feature_map); ++ feature_map = new feature_map_t; ++ ++ for (unsigned i = 0; i < ARRAY_SIZE (has_feature_table); i++) ++ { ++ const hf_feature_info *info = has_feature_table + i; ++ ++ if ((info->flags & HF_FLAG_SANITIZE) && !(flag_sanitize & info->mask)) ++ continue; ++ ++ const bool feature_p = !(info->flags & HF_FLAG_EXT); ++ c_common_register_feature (info->ident, feature_p); ++ } ++ ++ /* Register language-specific features. */ ++ c_family_register_lang_features (); ++} ++ ++/* If STRICT_P is true, evaluate __has_feature (IDENT). ++ Otherwise, evaluate __has_extension (IDENT). */ ++ ++bool ++has_feature_p (const char *ident, bool strict_p) ++{ ++ if (!feature_map) ++ init_has_feature (); ++ ++ tree name = canonicalize_attr_name (get_identifier (ident)); ++ bool *feat_p = feature_map->get (name); ++ if (!feat_p) ++ return false; ++ ++ return !strict_p || *feat_p; ++} ++ + #include "gt-c-family-c-common.h" +diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h +index f30b6c6ac33..a4d9f3676f0 100644 +--- a/gcc/c-family/c-common.h ++++ b/gcc/c-family/c-common.h +@@ -1060,6 +1060,14 @@ extern bool c_cpp_diagnostic (cpp_reader *, enum cpp_diagnostic_level, + ATTRIBUTE_GCC_DIAG(5,0); + extern int c_common_has_attribute (cpp_reader *, bool); + extern int c_common_has_builtin (cpp_reader *); ++extern int c_common_has_feature (cpp_reader *, bool); ++ ++/* Implemented by each front end in *-lang.cc. */ ++extern void c_family_register_lang_features (); ++ ++/* Implemented in c-family/c-common.cc. */ ++extern void c_common_register_feature (const char *, bool); ++extern bool has_feature_p (const char *, bool); + + extern bool parse_optimize_options (tree, bool); + +@@ -1439,6 +1447,7 @@ extern void warn_for_multistatement_macros (location_t, location_t, + /* In c-attribs.c. */ + extern bool attribute_takes_identifier_p (const_tree); + extern tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); ++extern bool attribute_clang_form_p (const_tree); + extern tree handle_unused_attribute (tree *, tree, tree, int, bool *); + extern tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *); + extern int parse_tm_stmt_attr (tree, int); +diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c +index 97ddc797a4a..5333428ab9b 100644 +--- a/gcc/c-family/c-lex.c ++++ b/gcc/c-family/c-lex.c +@@ -81,6 +81,7 @@ init_c_lex (void) + cb->read_pch = c_common_read_pch; + cb->has_attribute = c_common_has_attribute; + cb->has_builtin = c_common_has_builtin; ++ cb->has_feature = c_common_has_feature; + cb->get_source_date_epoch = cb_get_source_date_epoch; + cb->get_suggestion = cb_get_suggestion; + cb->remap_filename = remap_macro_filename; +@@ -429,16 +430,16 @@ c_common_has_attribute (cpp_reader *pfile, bool std_syntax) + return result; + } + +-/* Callback for has_builtin. */ ++/* Helper for __has_{builtin,feature,extension}. */ + +-int +-c_common_has_builtin (cpp_reader *pfile) ++static const char * ++c_common_lex_availability_macro (cpp_reader *pfile, const char *builtin) + { + const cpp_token *token = get_token_no_padding (pfile); + if (token->type != CPP_OPEN_PAREN) + { + cpp_error (pfile, CPP_DL_ERROR, +- "missing '(' after \"__has_builtin\""); ++ "missing '(' after \"__has_%s\"", builtin); + return 0; + } + +@@ -458,7 +459,7 @@ c_common_has_builtin (cpp_reader *pfile) + else + { + cpp_error (pfile, CPP_DL_ERROR, +- "macro \"__has_builtin\" requires an identifier"); ++ "macro \"__has_%s\" requires an identifier", builtin); + if (token->type == CPP_CLOSE_PAREN) + return 0; + } +@@ -477,9 +478,38 @@ c_common_has_builtin (cpp_reader *pfile) + break; + } + ++ return name; ++} ++ ++/* Callback for has_builtin. */ ++ ++int ++c_common_has_builtin (cpp_reader *pfile) ++{ ++ const char *name = c_common_lex_availability_macro (pfile, "builtin"); ++ if (!name) ++ return 0; ++ + return names_builtin_p (name); + } + ++/* Callback for has_feature. STRICT_P is true for has_feature and false ++ for has_extension. */ ++ ++int ++c_common_has_feature (cpp_reader *pfile, bool strict_p) ++{ ++ const char *builtin = strict_p ? "feature" : "extension"; ++ const char *name = c_common_lex_availability_macro (pfile, builtin); ++ if (!name) ++ return 0; ++ ++ /* If -pedantic-errors is given, __has_extension is equivalent to ++ __has_feature. */ ++ strict_p |= flag_pedantic_errors; ++ return has_feature_p (name, strict_p); ++} ++ + + /* Read a token and return its type. Fill *VALUE with its value, if + applicable. Fill *CPP_FLAGS with the token's flags, if it is +@@ -511,6 +541,21 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, + + case CPP_NUMBER: + { ++ /* If the user wants number-like entities to be returned as a raw ++ string, then don't try to classify them, which emits unwanted ++ diagnostics. */ ++ if (lex_flags & C_LEX_NUMBER_AS_STRING) ++ { ++ /* build_string adds a trailing NUL at [len]. */ ++ tree num_string = build_string (tok->val.str.len + 1, ++ (const char *) tok->val.str.text); ++ TREE_TYPE (num_string) = char_array_type_node; ++ *value = num_string; ++ /* We will effectively note this as CPP_N_INVALID, because we ++ made no checks here. */ ++ break; ++ } ++ + const char *suffix = NULL; + unsigned int flags = cpp_classify_number (parse_in, tok, &suffix, *loc); + +diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c +index 5bfa239ec0b..193c584a37c 100644 +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -1051,7 +1051,7 @@ c_common_post_options (const char **pfilename) + + if (flag_extern_tls_init) + { +- if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK) ++ if (!SUPPORTS_WEAK) + { + /* Lazy TLS initialization for a variable in another TU requires + alias and weak reference support. */ +diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c +index de72859d943..e87f6f3cb9f 100644 +--- a/gcc/c-family/c-pch.c ++++ b/gcc/c-family/c-pch.c +@@ -54,7 +54,6 @@ struct c_pch_validity + { + unsigned char debug_info_type; + signed char match[MATCH_SIZE]; +- void (*pch_init) (void); + size_t target_data_length; + }; + +@@ -117,7 +116,6 @@ pch_init (void) + gcc_assert (v.match[i] == *pch_matching[i].flag_var); + } + } +- v.pch_init = &pch_init; + target_validity = targetm.get_pch_validity (&v.target_data_length); + + if (fwrite (partial_pch, IDENT_LENGTH, 1, f) != 1 +@@ -275,19 +273,6 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd) + } + } + +- /* If the text segment was not loaded at the same address as it was +- when the PCH file was created, function pointers loaded from the +- PCH will not be valid. We could in theory remap all the function +- pointers, but no support for that exists at present. +- Since we have the same executable, it should only be necessary to +- check one function. */ +- if (v.pch_init != &pch_init) +- { +- cpp_warning (pfile, CPP_W_INVALID_PCH, +- "%s: had text segment at different address", name); +- return 2; +- } +- + /* Check the target-specific validity data. */ + { + void *this_file_data = xmalloc (v.target_data_length); +@@ -386,7 +371,8 @@ c_common_no_more_pch (void) + if (cpp_get_callbacks (parse_in)->valid_pch) + { + cpp_get_callbacks (parse_in)->valid_pch = NULL; +- host_hooks.gt_pch_use_address (NULL, 0, -1, 0); ++ void *addr = NULL; ++ host_hooks.gt_pch_use_address (addr, 0, -1, 0); + } + } + +diff --git a/gcc/c-family/c-ppoutput.c b/gcc/c-family/c-ppoutput.c +index ae33c1ff40f..f11b1c9c992 100644 +--- a/gcc/c-family/c-ppoutput.c ++++ b/gcc/c-family/c-ppoutput.c +@@ -152,6 +152,7 @@ init_pp_output (FILE *out_stream) + + cb->has_attribute = c_common_has_attribute; + cb->has_builtin = c_common_has_builtin; ++ cb->has_feature = c_common_has_feature; + cb->get_source_date_epoch = cb_get_source_date_epoch; + cb->remap_filename = remap_macro_filename; + +diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h +index 6c34ffa5be4..3ad81ea2a21 100644 +--- a/gcc/c-family/c-pragma.h ++++ b/gcc/c-family/c-pragma.h +@@ -244,6 +244,9 @@ extern enum cpp_ttype pragma_lex (tree *, location_t *loc = NULL); + #define C_LEX_STRING_NO_JOIN 2 /* Do not concatenate strings + nor translate them into execution + character set. */ ++#define C_LEX_NUMBER_AS_STRING 4 /* Do not classify a number, but ++ instead return it as a raw ++ string. */ + + /* This is not actually available to pragma parsers. It's merely a + convenient location to declare this function for c-lex, after +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 2005b783c68..3d8b0522a9d 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1359,6 +1359,10 @@ Wsubobject-linkage + C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1) + Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage. + ++Welaborated-enum-base ++C++ ObjC++ Var(warn_elaborated_enum_base) Warning Init(1) ++Warn if an additional enum-base is used in an elaborated-type-specifier. ++ + Wduplicate-decl-specifier + C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall) + Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier. +@@ -1789,7 +1793,7 @@ Implement resolution of DR 150 for matching of template template arguments. + + fnext-runtime + ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime) +-Generate code for NeXT (Apple Mac OS X) runtime environment. ++Generate code for NeXT (Apple macOS) runtime environment. + + fnil-receivers + ObjC ObjC++ Var(flag_nil_receivers) Init(1) +diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c +index 2b567ce7c88..67de9af3eef 100644 +--- a/gcc/c/c-decl.c ++++ b/gcc/c/c-decl.c +@@ -73,13 +73,16 @@ enum decl_context + TYPENAME}; /* Typename (inside cast or sizeof) */ + + /* States indicating how grokdeclarator() should handle declspecs marked +- with __attribute__((deprecated)). An object declared as +- __attribute__((deprecated)) suppresses warnings of uses of other +- deprecated items. */ ++ with __attribute__((deprecated)) or __attribute__((unavailable)). ++ An object declared as __attribute__((unavailable)) should suppress ++ any reports of being declared with unavailable or deprecated items. ++ An object declared as __attribute__((deprecated)) should suppress ++ warnings of uses of other deprecated items. */ + + enum deprecated_states { + DEPRECATED_NORMAL, +- DEPRECATED_SUPPRESS ++ DEPRECATED_SUPPRESS, ++ UNAVAILABLE_DEPRECATED_SUPPRESS + }; + + +@@ -2641,6 +2644,10 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) + if (TREE_DEPRECATED (newdecl)) + TREE_DEPRECATED (olddecl) = 1; + ++ /* Merge unavailability. */ ++ if (TREE_UNAVAILABLE (newdecl)) ++ TREE_UNAVAILABLE (olddecl) = 1; ++ + /* If a decl is in a system header and the other isn't, keep the one on the + system header. Otherwise, keep source location of definition rather than + declaration and of prototype rather than non-prototype unless that +@@ -4878,6 +4885,7 @@ quals_from_declspecs (const struct c_declspecs *specs) + && !specs->typedef_p + && !specs->explicit_signed_p + && !specs->deprecated_p ++ && !specs->unavailable_p + && !specs->long_p + && !specs->long_long_p + && !specs->short_p +@@ -5080,9 +5088,14 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, + tree expr = NULL_TREE; + enum deprecated_states deprecated_state = DEPRECATED_NORMAL; + +- /* An object declared as __attribute__((deprecated)) suppresses ++ /* An object declared as __attribute__((unavailable)) suppresses ++ warnings and errors from __attribute__((deprecated/unavailable)) ++ components. ++ An object declared as __attribute__((deprecated)) suppresses + warnings of uses of other deprecated items. */ +- if (lookup_attribute ("deprecated", attributes)) ++ if (lookup_attribute ("unavailable", attributes)) ++ deprecated_state = UNAVAILABLE_DEPRECATED_SUPPRESS; ++ else if (lookup_attribute ("deprecated", attributes)) + deprecated_state = DEPRECATED_SUPPRESS; + + decl = grokdeclarator (declarator, declspecs, +@@ -6219,7 +6232,7 @@ smallest_type_quals_location (const location_t *locations, + set to indicate whether operands in *EXPR can be used in constant + expressions. + DEPRECATED_STATE is a deprecated_states value indicating whether +- deprecation warnings should be suppressed. ++ deprecation/unavailability warnings should be suppressed. + + In the TYPENAME case, DECLARATOR is really an absolute declarator. + It may also be so in the PARM case, for a prototype where the +@@ -6349,8 +6362,14 @@ grokdeclarator (const struct c_declarator *declarator, + if (decl_context == NORMAL && !funcdef_flag && current_scope->parm_flag) + decl_context = PARM; + +- if (declspecs->deprecated_p && deprecated_state != DEPRECATED_SUPPRESS) +- warn_deprecated_use (declspecs->type, declspecs->decl_attr); ++ if (deprecated_state != UNAVAILABLE_DEPRECATED_SUPPRESS) ++ { ++ if (declspecs->unavailable_p) ++ error_unavailable_use (declspecs->type, declspecs->decl_attr); ++ else if (declspecs->deprecated_p ++ && deprecated_state != DEPRECATED_SUPPRESS) ++ warn_deprecated_use (declspecs->type, declspecs->decl_attr); ++ } + + if ((decl_context == NORMAL || decl_context == FIELD) + && current_scope == file_scope +@@ -9007,8 +9026,8 @@ resort_field_decl_cmp (const void *x_p, const void *y_p) + { + tree d1 = DECL_NAME (*x); + tree d2 = DECL_NAME (*y); +- resort_data.new_value (&d1, resort_data.cookie); +- resort_data.new_value (&d2, resort_data.cookie); ++ resort_data.new_value (&d1, &d1, resort_data.cookie); ++ resort_data.new_value (&d2, &d2, resort_data.cookie); + if (d1 < d2) + return -1; + } +@@ -10800,6 +10819,8 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs, + specs->typespec_kind = spec.kind; + if (TREE_DEPRECATED (type)) + specs->deprecated_p = true; ++ if (TREE_UNAVAILABLE (type)) ++ specs->unavailable_p = true; + + /* Handle type specifier keywords. */ + if (TREE_CODE (type) == IDENTIFIER_NODE +diff --git a/gcc/c/c-lang.c b/gcc/c/c-lang.c +index 778a6f2a076..66782a6407b 100644 +--- a/gcc/c/c-lang.c ++++ b/gcc/c/c-lang.c +@@ -49,6 +49,15 @@ enum c_language_kind c_language = clk_c; + /* Each front end provides its own lang hook initializer. */ + struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + ++/* Implement c-family hook to register language-specific features for ++ __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ c_register_features (); ++} ++ + #if CHECKING_P + + namespace selftest { +diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c +index b945de15ab8..b90f5fa9137 100644 +--- a/gcc/c/c-objc-common.c ++++ b/gcc/c/c-objc-common.c +@@ -34,6 +34,38 @@ along with GCC; see the file COPYING3. If not see + static bool c_tree_printer (pretty_printer *, text_info *, const char *, + int, bool, bool, bool, bool *, const char **); + ++/* Info for C language features which can be queried through ++ __has_{feature,extension}. */ ++ ++struct c_feature_info ++{ ++ const char *ident; ++ const int *enable_flag; ++}; ++ ++static const c_feature_info c_feature_table[] = ++{ ++ { "c_alignas", &flag_isoc11 }, ++ { "c_alignof", &flag_isoc11 }, ++ { "c_atomic", &flag_isoc11 }, ++ { "c_generic_selections", &flag_isoc11 }, ++ { "c_static_assert", &flag_isoc11 }, ++ { "c_thread_local", &flag_isoc11 } ++}; ++ ++/* Register features specific to the C language. */ ++ ++void ++c_register_features () ++{ ++ for (unsigned i = 0; i < ARRAY_SIZE (c_feature_table); i++) ++ { ++ const c_feature_info *info = c_feature_table + i; ++ const bool feat_p = !info->enable_flag || *info->enable_flag; ++ c_common_register_feature (info->ident, feat_p); ++ } ++} ++ + bool + c_missing_noreturn_ok_p (tree decl) + { +diff --git a/gcc/c/c-objc-common.h b/gcc/c/c-objc-common.h +index 7d35a0621e4..7ebaa4183e2 100644 +--- a/gcc/c/c-objc-common.h ++++ b/gcc/c/c-objc-common.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_C_OBJC_COMMON + #define GCC_C_OBJC_COMMON + ++/* Implemented in c-objc-common.cc. */ ++extern void c_register_features (); ++ + /* Lang hooks that are shared between C and ObjC are defined here. Hooks + specific to C or ObjC go in c-lang.c and objc/objc-lang.c, respectively. */ + +diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c +index 407c22afa6f..b78477fbd48 100644 +--- a/gcc/c/c-parser.c ++++ b/gcc/c/c-parser.c +@@ -202,6 +202,9 @@ struct GTY(()) c_parser { + should translate them to the execution character set (false + inside attributes). */ + BOOL_BITFIELD translate_strings_p : 1; ++ /* True if we want to lex arbitrary number-like sequences as their ++ string representation. */ ++ BOOL_BITFIELD lex_number_as_string : 1; + + /* Objective-C specific parser/lexer information. */ + +@@ -276,10 +279,10 @@ c_lex_one_token (c_parser *parser, c_token *token, bool raw = false) + + if (raw || vec_safe_length (parser->raw_tokens) == 0) + { ++ int lex_flags = parser->lex_joined_string ? 0 : C_LEX_STRING_NO_JOIN; ++ lex_flags |= parser->lex_number_as_string ? C_LEX_NUMBER_AS_STRING : 0; + token->type = c_lex_with_flags (&token->value, &token->location, +- &token->flags, +- (parser->lex_joined_string +- ? 0 : C_LEX_STRING_NO_JOIN)); ++ &token->flags, lex_flags); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; +@@ -4553,6 +4556,88 @@ c_parser_gnu_attribute_any_word (c_parser *parser) + return attr_name; + } + ++/* Handle parsing clang-form attribute arguments, where we need to adjust ++ the parsing rules to relate to a specific attribute. */ ++ ++static tree ++c_parser_clang_attribute_arguments (c_parser *parser, tree /*attr_id*/) ++{ ++ /* We can, if required, alter the parsing on the basis of the attribute. ++ At present, we handle the availability attr, where ach entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ tree attr_args = NULL_TREE; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ if (c_parser_next_token_is (parser, CPP_NAME) ++ && c_parser_peek_token (parser)->id_kind == C_ID_ID) ++ { ++ name = c_parser_peek_token (parser)->value; ++ c_parser_consume_token (parser); ++ } ++ else if (c_parser_next_token_is (parser, CPP_COMMA)) ++ name = error_mark_node; /* Comma handled below. */ ++ else ++ { ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected an attribute keyword"); ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_EQ)) ++ { ++ c_parser_consume_token (parser); /* eat the '=' */ ++ /* We need to bludgeon the lexer into not trying to interpret the ++ xx.yy.zz form, since that just looks like a malformed float. ++ Also, as a result of macro processing, we can have strig literals ++ that are in multiple pieces so, for this specific part of the ++ parse, we need to join strings. */ ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ /* So look at the next token, expecting a string, or something that ++ looks initially like a number, but might be a version number. */ ++ c_parser_peek_token (parser); ++ /* Done with the funky number parsing. */ ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ value = c_parser_peek_token (parser)->value; ++ /* ???: check for error mark and early-return? */ ++ c_parser_consume_token (parser); ++ } ++ /* else value is absent. */ ++ } ++ else if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected %<,%> or %<=%>"); ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_COMMA)) ++ c_parser_consume_token (parser); /* Just skip the comma. */ ++ tree t = tree_cons (value, name, NULL); ++ if (!attr_args) ++ attr_args = t; ++ else ++ chainon (attr_args, t); ++ } while (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN)); ++ return attr_args; ++} ++ + /* Parse attribute arguments. This is a common form of syntax + covering all currently valid GNU and standard attributes. + +@@ -4699,9 +4784,13 @@ c_parser_gnu_attribute (c_parser *parser, tree attrs, + attrs = chainon (attrs, attr); + return attrs; + } +- c_parser_consume_token (parser); ++ c_parser_consume_token (parser); /* The '('. */ + +- tree attr_args ++ tree attr_args; ++ if (attribute_clang_form_p (attr_name)) ++ attr_args = c_parser_clang_attribute_arguments (parser, attr_name); ++ else ++ attr_args + = c_parser_attribute_arguments (parser, + attribute_takes_identifier_p (attr_name), + false, true); +diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h +index a671a3eb740..4c1022d58a1 100644 +--- a/gcc/c/c-tree.h ++++ b/gcc/c/c-tree.h +@@ -370,6 +370,8 @@ struct c_declspecs { + BOOL_BITFIELD explicit_signed_p : 1; + /* Whether the specifiers include a deprecated typedef. */ + BOOL_BITFIELD deprecated_p : 1; ++ /* Whether the specifiers include an unavailable typedef. */ ++ BOOL_BITFIELD unavailable_p : 1; + /* Whether the type defaulted to "int" because there were no type + specifiers. */ + BOOL_BITFIELD default_int_p : 1; +diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c +index 84b44081f0e..c5786cf5fce 100644 +--- a/gcc/c/c-typeck.c ++++ b/gcc/c/c-typeck.c +@@ -2561,7 +2561,9 @@ build_component_ref (location_t loc, tree datum, tree component, + || (use_datum_quals && TREE_THIS_VOLATILE (datum))) + TREE_THIS_VOLATILE (ref) = 1; + +- if (TREE_DEPRECATED (subdatum)) ++ if (TREE_UNAVAILABLE (subdatum)) ++ error_unavailable_use (subdatum, NULL_TREE); ++ else if (TREE_DEPRECATED (subdatum)) + warn_deprecated_use (subdatum, NULL_TREE); + + datum = ref; +@@ -2846,7 +2848,9 @@ build_external_ref (location_t loc, tree id, bool fun, tree *type) + if (TREE_TYPE (ref) == error_mark_node) + return error_mark_node; + +- if (TREE_DEPRECATED (ref)) ++ if (TREE_UNAVAILABLE (ref)) ++ error_unavailable_use (ref, NULL_TREE); ++ else if (TREE_DEPRECATED (ref)) + warn_deprecated_use (ref, NULL_TREE); + + /* Recursive call does not count as usage. */ +diff --git a/gcc/calls.c b/gcc/calls.c +index 7d908c6a62b..b9e786e0e3d 100644 +--- a/gcc/calls.c ++++ b/gcc/calls.c +@@ -2390,7 +2390,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + with those made by function.c. */ + + /* See if this argument should be passed by invisible reference. */ +- function_arg_info arg (type, argpos < n_named_args); ++ function_arg_info arg (type, argpos < n_named_args, ++ argpos == n_named_args - 1); + if (pass_by_reference (args_so_far_pnt, arg)) + { + const bool callee_copies +@@ -2509,10 +2510,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + + unsignedp = TYPE_UNSIGNED (type); + arg.type = type; +- arg.mode +- = promote_function_mode (type, TYPE_MODE (type), &unsignedp, +- fndecl ? TREE_TYPE (fndecl) : fntype, 0); +- ++ arg.mode = TYPE_MODE (type); ++// arg.mode ++// = promote_function_mode (type, TYPE_MODE (type), &unsignedp, ++// fndecl ? TREE_TYPE (fndecl) : fntype, 0); ++ arg.mode = promote_function_mode (args_so_far, arg, ++ fndecl ? TREE_TYPE (fndecl) : fntype, ++ &unsignedp, 0); + args[i].unsignedp = unsignedp; + args[i].mode = arg.mode; + +@@ -2565,6 +2569,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + #endif + reg_parm_stack_space, + args[i].pass_on_stack ? 0 : args[i].partial, ++ args_so_far, + fndecl, args_size, &args[i].locate); + #ifdef BLOCK_REG_PADDING + else +@@ -5098,6 +5103,7 @@ split_complex_types (tree types) + return types; + } + ++extern void debug_tree (tree); + /* Output a library call to function ORGFUN (a SYMBOL_REF rtx) + for a value of mode OUTMODE, + with NARGS different arguments, passed as ARGS. +@@ -5283,6 +5289,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, 0, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + + if (argvec[count].reg == 0 || argvec[count].partial != 0 +@@ -5353,8 +5360,16 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + val = force_operand (XEXP (slot, 0), NULL_RTX); + } + +- arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, +- NULL_TREE, 0); ++// arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, ++// NULL_TREE, 0); ++ tree t = arg.type; ++if (t) ++ debug_tree (t); ++gcc_assert (!t); ++ arg.type = NULL_TREE; ++ arg.mode = promote_function_mode (args_so_far, arg, NULL_TREE, ++ &unsigned_p, 0); ++ arg.type = t; + argvec[count].mode = arg.mode; + argvec[count].value = convert_modes (arg.mode, GET_MODE (val), val, + unsigned_p); +@@ -5374,6 +5389,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, argvec[count].partial, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + args_size.constant += argvec[count].locate.size.constant; + gcc_assert (!argvec[count].locate.size.var); +diff --git a/gcc/calls.h b/gcc/calls.h +index 4a018f6ae85..fd920c678dc 100644 +--- a/gcc/calls.h ++++ b/gcc/calls.h +@@ -35,24 +35,43 @@ class function_arg_info + { + public: + function_arg_info () +- : type (NULL_TREE), mode (VOIDmode), named (false), ++ : type (NULL_TREE), mode (VOIDmode), named (false), last_named (false), + pass_by_reference (false) + {} + + /* Initialize an argument of mode MODE, either before or after promotion. */ + function_arg_info (machine_mode mode, bool named) +- : type (NULL_TREE), mode (mode), named (named), pass_by_reference (false) ++ : type (NULL_TREE), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ function_arg_info (machine_mode mode, bool named, bool last_named) ++ : type (NULL_TREE), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Initialize an unpromoted argument of type TYPE. */ + function_arg_info (tree type, bool named) +- : type (type), mode (TYPE_MODE (type)), named (named), ++ : type (type), mode (TYPE_MODE (type)), named (named), last_named (false), + pass_by_reference (false) + {} + ++ /* Initialize an unpromoted argument of type TYPE. */ ++ function_arg_info (tree type, bool named, bool last_named) ++ : type (type), mode (TYPE_MODE (type)), named (named), ++ last_named (last_named), pass_by_reference (false) ++ {} ++ + /* Initialize an argument with explicit properties. */ + function_arg_info (tree type, machine_mode mode, bool named) +- : type (type), mode (mode), named (named), pass_by_reference (false) ++ : type (type), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ /* Initialize an argument with explicit properties. */ ++ function_arg_info (tree type, machine_mode mode, bool named, bool last_named) ++ : type (type), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Return true if the gimple-level type is an aggregate. */ +@@ -105,6 +124,9 @@ public: + "..."). See also TARGET_STRICT_ARGUMENT_NAMING. */ + unsigned int named : 1; + ++ /* True if this is the last named argument. */ ++ unsigned int last_named : 1; ++ + /* True if we have decided to pass the argument by reference, in which case + the function_arg_info describes a pointer to the original argument. */ + unsigned int pass_by_reference : 1; +diff --git a/gcc/collect2.c b/gcc/collect2.c +index 3e212fc75f3..d04d1000214 100644 +--- a/gcc/collect2.c ++++ b/gcc/collect2.c +@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3. If not see + In a cross-compiler, this means you need a cross nm, + but that is not quite as unpleasant as special headers. */ + +-#if !defined (OBJECT_FORMAT_COFF) ++#if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_MACHO) + #define OBJECT_FORMAT_NONE + #endif + +@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see + + #endif /* OBJECT_FORMAT_COFF */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Default flags to pass to nm. */ + #ifndef NM_FLAGS +@@ -534,7 +534,7 @@ static const char *const target_machine = TARGET_MACHINE; + + Return 0 if not found, otherwise return its name, allocated with malloc. */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Add an entry for the object file NAME to object file list LIST. + New entries are added at the end of the list. The original pointer +@@ -773,6 +773,12 @@ do_link (char **ld_argv, const char *atsuffix) + } + } + ++#if defined (OBJECT_FORMAT_MACHO) ++# define LLD_NAME "ld64.lld" ++#else ++# define LLD_NAME "ld.lld" ++#endif ++ + /* Main program. */ + + int +@@ -785,15 +791,18 @@ main (int argc, char **argv) + USE_GOLD_LD, + USE_BFD_LD, + USE_LLD_LD, ++ USE_CLASSIC_LD, + USE_LD_MAX + } selected_linker = USE_DEFAULT_LD; ++ + static const char *const ld_suffixes[USE_LD_MAX] = + { + "ld", + PLUGIN_LD_SUFFIX, + "ld.gold", + "ld.bfd", +- "ld.lld" ++ LLD_NAME, ++ "ld-classic" + }; + static const char *const real_ld_suffix = "real-ld"; + static const char *const collect_ld_suffix = "collect-ld"; +@@ -964,13 +973,21 @@ main (int argc, char **argv) + if (selected_linker == USE_DEFAULT_LD) + selected_linker = USE_PLUGIN_LD; + } ++#if !defined (OBJECT_FORMAT_MACHO) + else if (strcmp (argv[i], "-fuse-ld=bfd") == 0) + selected_linker = USE_BFD_LD; + else if (strcmp (argv[i], "-fuse-ld=gold") == 0) + selected_linker = USE_GOLD_LD; ++#endif + else if (strcmp (argv[i], "-fuse-ld=lld") == 0) + selected_linker = USE_LLD_LD; +- else if (strncmp (argv[i], "-o", 2) == 0) ++#if defined (OBJECT_FORMAT_MACHO) ++ else if (strcmp (argv[i], "-fuse-ld=classic") == 0) ++ selected_linker = USE_CLASSIC_LD; ++#endif ++ else if (strcmp (argv[i], "-fuse-ld=") == 0) ++ selected_linker = USE_DEFAULT_LD; ++ else if (strcmp (argv[i], "-o") == 0) + { + /* Parse the output filename if it's given so that we can make + meaningful temp filenames. */ +@@ -1082,7 +1099,7 @@ main (int argc, char **argv) + ld_file_name = 0; + #ifdef DEFAULT_LINKER + if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || +- selected_linker == USE_LLD_LD) ++ selected_linker == USE_LLD_LD || selected_linker == USE_CLASSIC_LD) + { + char *linker_name; + # ifdef HOST_EXECUTABLE_SUFFIX +@@ -2296,7 +2313,7 @@ write_aix_file (FILE *stream, struct id *list) + } + #endif + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Check to make sure the file is an LTO object file. */ + +diff --git a/gcc/common.opt b/gcc/common.opt +index 4a3f09d9e1f..bc908a13f1c 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -2646,6 +2646,10 @@ fstack-usage + Common RejectNegative Var(flag_stack_usage) + Output stack usage information on a per-function basis. + ++fstack-use-cumulative-args ++Common RejectNegative Var(flag_stack_use_cumulative_args) Init(STACK_USE_CUMULATIVE_ARGS_INIT) ++Use cumulative args-based stack layout hooks. ++ + fstrength-reduce + Common Ignore + Does nothing. Preserved for backward compatibility. +@@ -2714,10 +2718,25 @@ Common Var(flag_tracer) Optimization + Perform superblock formation via tail duplication. + + ftrampolines +-Common Var(flag_trampolines) Init(0) ++Common Var(flag_trampolines) Init(HEAP_TRAMPOLINES_INIT) + For targets that normally need trampolines for nested functions, always + generate them instead of using descriptors. + ++ftrampoline-impl= ++Common Joined RejectNegative Enum(trampoline_impl) Var(flag_trampoline_impl) Init(HEAP_TRAMPOLINES_INIT ? TRAMPOLINE_IMPL_HEAP : TRAMPOLINE_IMPL_STACK) ++Whether trampolines are generated in executable memory rather than ++executable stack. ++ ++Enum ++Name(trampoline_impl) Type(enum trampoline_impl) UnknownError(unknown trampoline implementation %qs) ++ ++EnumValue ++Enum(trampoline_impl) String(stack) Value(TRAMPOLINE_IMPL_STACK) ++ ++EnumValue ++Enum(trampoline_impl) String(heap) Value(TRAMPOLINE_IMPL_HEAP) ++ ++ + ; Zero means that floating-point math operations cannot generate a + ; (user-visible) trap. This is the case, for example, in nonstop + ; IEEE 754 arithmetic. +@@ -2967,6 +2986,10 @@ fuse-ld=lld + Common Driver Negative(fuse-ld=lld) + Use the lld LLVM linker instead of the default linker. + ++fuse-ld=classic ++Common Driver Negative(fuse-ld=classic) ++Use the ld-classic linker instead of the default linker. ++ + fuse-linker-plugin + Common Undocumented Var(flag_use_linker_plugin) + +diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c +index 6763191af36..71b16c18c7c 100644 +--- a/gcc/common/config/aarch64/aarch64-common.c ++++ b/gcc/common/config/aarch64/aarch64-common.c +@@ -421,6 +421,7 @@ aarch64_get_extension_string_for_isa_flags (uint64_t isa_flags, + we just mask all default bits away at the end. */ + isa_flag_bits &= ~default_arch_flags; + ++#ifndef DISABLE_AARCH64_AS_CRC_BUGFIX + /* We now have the smallest set of features we need to process. A subsequent + linear scan of the bits in isa_flag_bits will allow us to print the ext + names. However as a special case if CRC was enabled before, always print +@@ -432,6 +433,7 @@ aarch64_get_extension_string_for_isa_flags (uint64_t isa_flags, + issue, so we don't need this fix when targeting Armv8-R. */ + if ((isa_flags & AARCH64_ISA_CRC) && !AARCH64_ISA_V8_R) + isa_flag_bits |= AARCH64_ISA_CRC; ++#endif + + /* Pass Two: + Print the option names that we're sure we must turn on. These are only +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 6e6ce881d89..995c86853dd 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -749,7 +749,7 @@ case ${target} in + tm_file="${tm_file} ${cpu_type}/darwin.h" + tm_p_file="${tm_p_file} darwin-protos.h" + target_gtfiles="$target_gtfiles \$(srcdir)/config/darwin.c" +- extra_options="${extra_options} darwin.opt" ++ extra_options="${extra_options} rpath.opt darwin.opt" + c_target_objs="${c_target_objs} darwin-c.o" + cxx_target_objs="${cxx_target_objs} darwin-c.o" + d_target_objs="${d_target_objs} darwin-d.o" +@@ -1099,6 +1099,26 @@ case ${target} in + ;; + esac + ++# Figure out if we need to enable heap trampolines ++# and variadic functions handling. ++case ${target} in ++aarch64*-*-darwin2*) ++ # This applies to arm64 Darwin variadic funtions. ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=1" ++ # Executable stack is forbidden. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; ++*-*-darwin2*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" ++ # Currently, we do this for macOS 11 and above. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; ++*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" ++ ;; ++esac ++ + case ${target} in + aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h" +@@ -1137,6 +1157,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + ;; ++aarch64-*-darwin*) ++ tm_file="${tm_file} aarch64/aarch64-errata.h" ++ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-darwin" ++ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" ++ tm_defines="${tm_defines} DISABLE_AARCH64_AS_CRC_BUGFIX=1" ++ # Choose a default CPU version that will work for all current releases. ++ with_cpu=${with_cpu:-apple-m1} ++ ;; + aarch64*-*-freebsd*) + tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h" +@@ -4197,8 +4225,8 @@ case "${target}" in + fi + for which in cpu arch tune; do + eval "val=\$with_$which" +- base_val=`echo $val | sed -e 's/\+.*//'` +- ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'` ++ base_val=`echo $val | sed -E -e 's/\+.*//'` ++ ext_val=`echo $val | sed -E -e 's/[a-z0-9.-]+//'` + + if [ $which = arch ]; then + def=aarch64-arches.def +@@ -4257,9 +4285,9 @@ case "${target}" in + + while [ x"$ext_val" != x ] + do +- ext_val=`echo $ext_val | sed -e 's/\+//'` +- ext=`echo $ext_val | sed -e 's/\+.*//'` +- base_ext=`echo $ext | sed -e 's/^no//'` ++ ext_val=`echo $ext_val | sed -E -e 's/\+//'` ++ ext=`echo $ext_val | sed -E -e 's/\+.*//'` ++ base_ext=`echo $ext | sed -E -e 's/^no//'` + opt_line=`echo -e "$options_parsed" | \ + grep "^\"$base_ext\""` + +@@ -4288,7 +4316,7 @@ case "${target}" in + echo "Unknown extension used in --with-$which=$val" 1>&2 + exit 1 + fi +- ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'` ++ ext_val=`echo $ext_val | sed -E -e 's/[a-z0-9]+//'` + done + + ext_mask="(("$ext_mask") << 6)" +diff --git a/gcc/config.host b/gcc/config.host +index 0a02c33cc80..81ff7ed1043 100644 +--- a/gcc/config.host ++++ b/gcc/config.host +@@ -99,7 +99,8 @@ case ${host} in + esac + + case ${host} in +- aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*) ++ aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* |\ ++ aarch64*-*-darwin*) + case ${target} in + aarch64*-*-*) + host_extra_gcc_objs="driver-aarch64.o" +@@ -251,6 +252,10 @@ case ${host} in + host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o" + host_lto_plugin_soname=liblto_plugin.dll + ;; ++ aarch64*-*-darwin*) ++ out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o" ++ host_xmake_file="${host_xmake_file} aarch64/x-darwin" ++ ;; + i[34567]86-*-darwin* | x86_64-*-darwin*) + out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o" + host_xmake_file="${host_xmake_file} i386/x-darwin" +diff --git a/gcc/config.in b/gcc/config.in +index 6dd0ff010ce..ed21fb6a3a9 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -49,6 +49,19 @@ + #endif + + ++/* Specify a runpath directory, additional to those provided by the compiler ++ */ ++#ifndef USED_FOR_TARGET ++#undef DARWIN_ADD_RPATH ++#endif ++ ++ ++/* Should add an extra runpath directory */ ++#ifndef USED_FOR_TARGET ++#undef DARWIN_DO_EXTRA_RPATH ++#endif ++ ++ + /* Define to enable the use of a default assembler. */ + #ifndef USED_FOR_TARGET + #undef DEFAULT_ASSEMBLER +@@ -622,15 +635,13 @@ + #endif + + +-/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false. +- */ ++/* Define if your macOS assembler supports -mllvm -x86-pad-for-align=false. */ + #ifndef USED_FOR_TARGET + #undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN + #endif + + +-/* Define if your Mac OS X assembler supports the -mmacos-version-min option. +- */ ++/* Define if your macOS assembler supports the -mmacos-version-min option. */ + #ifndef USED_FOR_TARGET + #undef HAVE_AS_MMACOSX_VERSION_MIN_OPTION + #endif +@@ -2207,6 +2218,12 @@ + #endif + + ++/* Define to 1 if ld64 supports '-demangle'. */ ++#ifndef USED_FOR_TARGET ++#undef LD64_HAS_DEMANGLE ++#endif ++ ++ + /* Define to 1 if ld64 supports '-export_dynamic'. */ + #ifndef USED_FOR_TARGET + #undef LD64_HAS_EXPORT_DYNAMIC +diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c +index f9a8c0aa6a0..f0db6a6f433 100644 +--- a/gcc/config/aarch64/aarch64-builtins.c ++++ b/gcc/config/aarch64/aarch64-builtins.c +@@ -529,6 +529,8 @@ enum aarch64_builtins + AARCH64_RBIT, + AARCH64_RBITL, + AARCH64_RBITLL, ++ /* OS-specific */ ++ AARCH64_BUILTIN_CFSTRING, + AARCH64_BUILTIN_MAX + }; + +@@ -645,6 +647,9 @@ tree aarch64_fp16_ptr_type_node = NULL_TREE; + tree aarch64_bf16_type_node = NULL_TREE; + tree aarch64_bf16_ptr_type_node = NULL_TREE; + ++/* Pointer to __float128 on Mach-O, where the 128b float is not long double. */ ++tree aarch64_float128_ptr_type_node = NULL_TREE; ++ + /* Wrapper around add_builtin_function. NAME is the name of the built-in + function, TYPE is the function type, CODE is the function subcode + (relative to AARCH64_BUILTIN_GENERAL), and ATTRS is the function +@@ -1250,6 +1255,29 @@ aarch64_init_bf16_types (void) + aarch64_bf16_ptr_type_node = build_pointer_type (aarch64_bf16_type_node); + } + ++/* Initialize the backend REAL_TYPE type supporting __float128 on Mach-O, ++ as well as the related built-ins. */ ++static void ++aarch64_init_float128_types (void) ++{ ++ /* The __float128 type. The node has already been created as ++ _Float128, so for C we only need to register the __float128 name for ++ it. For C++, we create a distinct type which will mangle differently ++ (g) vs. _Float128 (DF128_) and behave backwards compatibly. */ ++ if (float128_type_node == NULL_TREE) ++ { ++ float128_type_node = make_node (REAL_TYPE); ++ TYPE_PRECISION (float128_type_node) ++ = TYPE_PRECISION (float128_type_node); ++ SET_TYPE_MODE (float128_type_node, TYPE_MODE (float128_type_node)); ++ layout_type (float128_type_node); ++ } ++ lang_hooks.types.register_builtin_type (float128_type_node, "__float128"); ++ ++ aarch64_float128_ptr_type_node = build_pointer_type (float128_type_node); ++} ++ ++ + /* Pointer authentication builtins that will become NOP on legacy platform. + Currently, these builtins are for internal use only (libgcc EH unwinder). */ + +@@ -1466,8 +1494,9 @@ aarch64_general_init_builtins (void) + aarch64_init_fpsr_fpcr_builtins (); + + aarch64_init_fp16_types (); +- + aarch64_init_bf16_types (); ++ if (TARGET_MACHO) ++ aarch64_init_float128_types (); + + if (TARGET_SIMD) + aarch64_init_simd_builtins (); +@@ -1499,6 +1528,14 @@ aarch64_general_init_builtins (void) + aarch64_init_memtag_builtins (); + } + ++void ++aarch64_init_subtarget_builtins (void) ++{ ++#ifdef SUBTARGET_INIT_BUILTINS ++ SUBTARGET_INIT_BUILTINS; ++#endif ++} ++ + /* Implement TARGET_BUILTIN_DECL for the AARCH64_BUILTIN_GENERAL group. */ + tree + aarch64_general_builtin_decl (unsigned code, bool) +diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c +index ba732e4d877..b76f388194f 100644 +--- a/gcc/config/aarch64/aarch64-c.c ++++ b/gcc/config/aarch64/aarch64-c.c +@@ -225,6 +225,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pfile) + { + aarch64_define_unconditional_macros (pfile); + aarch64_update_cpp_builtins (pfile); ++ ++ if (TARGET_MACHO) ++ { ++ builtin_define ("__builtin_copysignq=__builtin_copysignf128"); ++ builtin_define ("__builtin_fabsq=__builtin_fabsf128"); ++ builtin_define ("__builtin_huge_valq=__builtin_huge_valf128"); ++ builtin_define ("__builtin_infq=__builtin_inff128"); ++ builtin_define ("__builtin_nanq=__builtin_nanf128"); ++ builtin_define ("__builtin_nansq=__builtin_nansf128"); ++ } + } + + /* Hook to validate the current #pragma GCC target and set the state, and +@@ -369,4 +379,8 @@ aarch64_register_pragmas (void) + targetm.check_builtin_call = aarch64_check_builtin_call; + + c_register_pragma ("GCC", "aarch64", aarch64_pragma_aarch64); ++ ++#ifdef REGISTER_SUBTARGET_PRAGMAS ++ REGISTER_SUBTARGET_PRAGMAS (); ++#endif + } +diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def +index 0243e3d4d1c..d78cdcbb286 100644 +--- a/gcc/config/aarch64/aarch64-cores.def ++++ b/gcc/config/aarch64/aarch64-cores.def +@@ -167,4 +167,16 @@ AARCH64_CORE("cortex-a76.cortex-a55", cortexa76cortexa55, cortexa53, 8_2A, AAR + /* Armv8-R Architecture Processors. */ + AARCH64_CORE("cortex-r82", cortexr82, cortexa53, 8R, AARCH64_FL_FOR_ARCH8_R, cortexa53, 0x41, 0xd15, -1) + ++/* Apple (A12 and M) cores. ++ Apple implementer ID from xnu, ++ guesses for part #, guesses for scheduler ident, generic_armv8_a for costs. ++ A12 seems mostly 8.3, ++ M1 seems to be 8.4 + extras (see comments in option-extensions about f16fml), ++ M2 mostly 8.5 but with missing mandatory features. ++ M3 is pretty much the same as M2. */ ++AARCH64_CORE("apple-a12", applea12, cortexa53, 8_3A, AARCH64_FL_FOR_ARCH8_3, cortexa53, 0x61, 0x12, -1) ++AARCH64_CORE("apple-m1", applem1, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_F16 | AARCH64_FL_SB | AARCH64_FL_SSBS, cortexa73, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m2", applem2, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_I8MM | AARCH64_FL_BF16 | AARCH64_FL_F16 | AARCH64_FL_SB | AARCH64_FL_SSBS, cortexa73, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m3", applem3, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_I8MM | AARCH64_FL_BF16 | AARCH64_FL_F16 | AARCH64_FL_SB | AARCH64_FL_SSBS, cortexa73, 0x61, 0x23, -1) ++ + #undef AARCH64_CORE +diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h +index fdc79b1dced..7ebf22171f9 100644 +--- a/gcc/config/aarch64/aarch64-protos.h ++++ b/gcc/config/aarch64/aarch64-protos.h +@@ -108,6 +108,14 @@ enum aarch64_symbol_type + SYMBOL_TLSLE24, + SYMBOL_TLSLE32, + SYMBOL_TLSLE48, ++ SYMBOL_MO_SMALL_ABS, ++ SYMBOL_MO_SMALL_PCR, ++ SYMBOL_MO_SMALL_GOT, ++ SYMBOL_MO_SMALL_TLS, ++ SYMBOL_MO_LARGE_ABS, ++ SYMBOL_MO_LARGE_PCR, ++ SYMBOL_MO_LARGE_GOT, ++ SYMBOL_MO_LARGE_TLS, + SYMBOL_FORCE_TO_MEM + }; + +@@ -737,6 +745,7 @@ void aarch64_post_cfi_startproc (void); + poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned); + int aarch64_get_condition_code (rtx); + bool aarch64_address_valid_for_prefetch_p (rtx, bool); ++bool aarch64_address_valid_for_unscaled_prefetch_p (rtx, bool); + bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode); + unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in); + unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in); +@@ -764,7 +773,11 @@ bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx); + bool aarch64_is_long_call_p (rtx); + bool aarch64_is_noplt_call_p (rtx); + bool aarch64_label_mentioned_p (rtx); ++#if TARGET_MACHO ++void aarch64_darwin_declare_function_name (FILE *, const char*, tree ); ++#else + void aarch64_declare_function_name (FILE *, const char*, tree); ++#endif + void aarch64_asm_output_alias (FILE *, const tree, const tree); + void aarch64_asm_output_external (FILE *, tree, const char*); + bool aarch64_legitimate_pic_operand_p (rtx); +@@ -961,6 +974,7 @@ void aarch64_override_options_internal (struct gcc_options *); + + const char *aarch64_general_mangle_builtin_type (const_tree); + void aarch64_general_init_builtins (void); ++void aarch64_init_subtarget_builtins (void); + tree aarch64_general_fold_builtin (unsigned int, tree, unsigned int, tree *); + gimple *aarch64_general_gimple_fold_builtin (unsigned int, gcall *); + rtx aarch64_general_expand_builtin (unsigned int, tree, rtx, int); +diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc +index fcc458af3d6..f773802ba7b 100644 +--- a/gcc/config/aarch64/aarch64-sve-builtins.cc ++++ b/gcc/config/aarch64/aarch64-sve-builtins.cc +@@ -3916,7 +3916,7 @@ gt_pch_nx (function_instance *) + } + + inline void +-gt_pch_nx (function_instance *, void (*) (void *, void *), void *) ++gt_pch_nx (function_instance *, gt_pointer_operator, void *) + { + } + +diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md +index f233a7cce6c..f0a1e9a451c 100644 +--- a/gcc/config/aarch64/aarch64-tune.md ++++ b/gcc/config/aarch64/aarch64-tune.md +@@ -1,5 +1,5 @@ + ;; -*- buffer-read-only: t -*- + ;; Generated automatically by gentune.sh from aarch64-cores.def + (define_attr "tune" +- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,neoverse512tvb,saphira,neoversen2,cobalt100,neoversev2,grace,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82" ++ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,neoverse512tvb,saphira,neoversen2,cobalt100,neoversev2,grace,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,applea12,applem1,applem2,applem3" + (const (symbol_ref "((enum attr_tune) aarch64_tune)"))) +diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c +index 9ec09d94100..ddeabc7a17a 100644 +--- a/gcc/config/aarch64/aarch64.c ++++ b/gcc/config/aarch64/aarch64.c +@@ -291,8 +291,10 @@ static bool aarch64_vfp_is_call_or_return_candidate (machine_mode, + const_tree, + machine_mode *, int *, + bool *, bool); ++#if !TARGET_MACHO + static void aarch64_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED; + static void aarch64_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED; ++#endif + static void aarch64_override_options_after_change (void); + static bool aarch64_vector_mode_supported_p (machine_mode); + static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool); +@@ -2242,6 +2244,9 @@ static const struct attribute_spec aarch64_attribute_table[] = + { "Advanced SIMD type", 1, 1, false, true, false, true, NULL, NULL }, + { "SVE type", 3, 3, false, true, false, true, NULL, NULL }, + { "SVE sizeless type", 0, 0, false, true, false, true, NULL, NULL }, ++#ifdef SUBTARGET_ATTRIBUTE_TABLE ++ SUBTARGET_ATTRIBUTE_TABLE, ++#endif + { NULL, 0, 0, false, false, false, false, NULL, NULL } + }; + +@@ -3341,7 +3346,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode) + if (known_le (GET_MODE_SIZE (mode), 8)) + return true; + if (known_le (GET_MODE_SIZE (mode), 16)) +- return (regno & 1) == 0; ++ return (regno & 1) == 0 || TARGET_MACHO; /* darwinpcs D.4 */ + } + else if (FP_REGNUM_P (regno)) + { +@@ -3387,8 +3392,10 @@ static bool + aarch64_takes_arguments_in_sve_regs_p (const_tree fntype) + { + CUMULATIVE_ARGS args_so_far_v; ++ /* This does not apply to variadic functions, so all the (currently ++ uncounted) arguments must be named. */ + aarch64_init_cumulative_args (&args_so_far_v, NULL_TREE, NULL_RTX, +- NULL_TREE, 0, true); ++ NULL_TREE, -1, true); + cumulative_args_t args_so_far = pack_cumulative_args (&args_so_far_v); + + for (tree chain = TYPE_ARG_TYPES (fntype); +@@ -3769,6 +3776,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + switch (type) + { + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + { + /* In ILP32, the mode of dest can be either SImode or DImode. */ + rtx tmp_reg = dest; +@@ -3779,6 +3787,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + if (can_create_pseudo_p ()) + tmp_reg = gen_reg_rtx (mode); + ++ if (TARGET_MACHO) ++ { ++ rtx sym, off; ++ split_const (imm, &sym, &off); ++ /* Negative offsets don't work, whether by intention is TBD. */ ++ if (INTVAL (off) < 0 || INTVAL (off) > 8 * 1024 * 1024) ++ { ++ emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, sym)); ++ emit_insn (gen_add_losym (dest, tmp_reg, sym)); ++ /* FIXME: add the SI option if/when we support ilp32. */ ++ emit_insn (gen_adddi3 (dest, dest, off)); ++ return; ++ } ++ /* else small enough positive offset is OK. */ ++ } + emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, copy_rtx (imm))); + emit_insn (gen_add_losym (dest, tmp_reg, imm)); + return; +@@ -3862,6 +3885,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + return; + } + ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_SMALL_GOT_4G: + { + /* In ILP32, the mode of dest can be either SImode or DImode, +@@ -5979,6 +6003,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + case SYMBOL_SMALL_TLSIE: + case SYMBOL_SMALL_GOT_28K: + case SYMBOL_SMALL_GOT_4G: ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_TINY_GOT: + case SYMBOL_TINY_TLSIE: + if (const_offset != 0) +@@ -5992,6 +6017,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + /* FALLTHRU */ + + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + case SYMBOL_TINY_ABSOLUTE: + case SYMBOL_TLSLE12: + case SYMBOL_TLSLE24: +@@ -6565,6 +6591,7 @@ aarch64_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) + gcc_unreachable (); + } + ++#if !TARGET_MACHO + static bool + aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + const_tree type, int *nregs) +@@ -6574,6 +6601,7 @@ aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + &pcum->aapcs_vfp_rmode, + nregs, NULL, pcum->silent_p); + } ++#endif + + /* Given MODE and TYPE of a function argument, return the alignment in + bits. The idea is to suppress any stronger alignment requested by +@@ -6593,7 +6621,7 @@ aarch64_function_arg_alignment (machine_mode mode, const_tree type, + if (integer_zerop (TYPE_SIZE (type))) + return 0; + +- gcc_assert (TYPE_MODE (type) == mode); ++ gcc_assert (TARGET_MACHO || TYPE_MODE (type) == mode); + + if (!AGGREGATE_TYPE_P (type)) + return TYPE_ALIGN (TYPE_MAIN_VARIANT (type)); +@@ -6667,6 +6695,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + gcc_assert (!alignment || abi_break < alignment); + + pcum->aapcs_arg_processed = true; ++ if (TARGET_MACHO) ++ { ++ /* Set suitable defaults for queries. */ ++ pcum->darwinpcs_arg_boundary ++ = aarch64_function_arg_alignment (mode, type, &abi_break); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ } + + pure_scalable_type_info pst_info; + if (type && pst_info.analyze_registers (type)) +@@ -6726,13 +6761,29 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* No frontends can create types with variable-sized modes, so we + shouldn't be asked to pass or return them. */ + size = GET_MODE_SIZE (mode).to_constant (); ++ ++ if (TARGET_MACHO) ++ /* Since we can pack things on the stack, we need the unrounded size. */ ++ pcum->darwinpcs_stack_bytes = size; ++ + size = ROUND_UP (size, UNITS_PER_WORD); + + allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode); ++ bool is_ha = false; ++#if !TARGET_MACHO + allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v, + mode, + type, + &nregs); ++#else ++ /* We care if the value is a homogenous aggregate when laying out the stack, ++ so use this call directly. */ ++ allocate_nvrn ++ = aarch64_vfp_is_call_or_return_candidate (mode, type, ++ &pcum->aapcs_vfp_rmode, ++ &nregs, &is_ha, ++ pcum->silent_p); ++#endif + gcc_assert (!sve_p || !allocate_nvrn); + + /* allocate_ncrn may be false-positive, but allocate_nvrn is quite reliable. +@@ -6749,7 +6800,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + if (!pcum->silent_p && !TARGET_FLOAT) + aarch64_err_no_fpadvsimd (mode); + +- if (nvrn + nregs <= NUM_FP_ARG_REGS) ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextnvrn = NUM_FP_ARG_REGS; ++ goto on_stack; ++ } ++ else if (nvrn + nregs <= NUM_FP_ARG_REGS) + { + pcum->aapcs_nextnvrn = nvrn + nregs; + if (!aarch64_composite_type_p (type, mode)) +@@ -6773,6 +6830,7 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + else +@@ -6789,14 +6847,24 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* C6 - C9. though the sign and zero extension semantics are + handled elsewhere. This is the case where the argument fits + entirely general registers. */ ++ + if (allocate_ncrn && (ncrn + nregs <= NUM_ARG_REGS)) + { + gcc_assert (nregs == 0 || nregs == 1 || nregs == 2); + ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextncrn = NUM_ARG_REGS; ++ goto on_stack; ++ } ++ + /* C.8 if the argument has an alignment of 16 then the NGRN is + rounded up to the next even number. */ + if (nregs == 2 + && ncrn % 2 ++ /* Darwin PCS deletes rule C.8. */ ++ && !TARGET_MACHO + /* The == 16 * BITS_PER_UNIT instead of >= 16 * BITS_PER_UNIT + comparison is there because for > 16 * BITS_PER_UNIT + alignment nregs should be > 2 and therefore it should be +@@ -6848,8 +6916,8 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } +- + pcum->aapcs_nextncrn = ncrn + nregs; ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + +@@ -6859,10 +6927,87 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* The argument is passed on stack; record the needed number of words for + this argument and align the total size if necessary. */ + on_stack: +- pcum->aapcs_stack_words = size / UNITS_PER_WORD; + +- if (aarch64_function_arg_alignment (mode, type, &abi_break) +- == 16 * BITS_PER_UNIT) ++ unsigned int align = aarch64_function_arg_alignment (mode, type, &abi_break); ++ ++ if (TARGET_MACHO) ++ { ++ /* Darwin does not round up the allocation for smaller entities to 8 ++ bytes. It only requires the natural alignment for these. ++ ++ but we don't do this for: ++ * unnamed parms in variadic functions ++ * complex types ++ * unions ++ * aggregates (except for homogeneous ones which are handles as the ++ enclosed type). ++ each entry starts a new slot. ++ ++ 16 byte entities are naturally aligned on the stack. ++ There was no darwinpcs for GCC 9, so neither the implementation ++ change nor the warning should fire here (i.e. we do not need to check ++ if 16byte entities alter the stack size). */ ++ ++ gcc_checking_assert (arg.named == pcum->named_p); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ if (!pcum->named_p ++ || TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (pcum->aapcs_vfp_rmode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ { ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = MAX (align, PARM_BOUNDARY); ++ if (!pcum->named_p) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ return; ++ } ++ ++ /* Updated sub-word offset aligned for the new object. ++ We are looking for the case that the new object will fit after some ++ existing object(s) in the same stack slot. In that case, we do not ++ need to add any more stack space for it. */ ++ int new_off ++ = ROUND_UP (pcum->darwinpcs_sub_word_pos, align / BITS_PER_UNIT); ++ ++ if (new_off >= UNITS_PER_WORD) ++ { ++ /* That exceeds a stack slot, start a new one. */ ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ new_off = 0; ++ } ++ /* This is the end of the new object. */ ++ int new_pos = new_off + pcum->darwinpcs_stack_bytes; ++ ++ if (pcum->darwinpcs_sub_word_pos == 0) ++ /* New stack slot, just allocate one or more words, and note where ++ the next arg will start. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ else if (new_pos <= UNITS_PER_WORD) ++ /* Old stack slot, object starts at new_off and goes to new_pos, we do ++ not add any stack space. */ ++ pcum->darwinpcs_sub_word_offset = new_off; ++ pcum->darwinpcs_sub_word_pos = new_pos; ++ pcum->darwinpcs_arg_boundary = align ; ++ if (pcum->last_named_p && new_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (new_pos <= 4) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ else if (new_pos <= 6) ++ pcum->darwinpcs_arg_padding = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ pcum->darwinpcs_arg_padding = 2 * BITS_PER_UNIT; ++ } ++ return; ++ } ++ ++ /* size was already rounded up to PARM_BOUNDARY. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ if (align == 16 * BITS_PER_UNIT) + { + int new_size = ROUND_UP (pcum->aapcs_stack_size, 16 / UNITS_PER_WORD); + if (pcum->aapcs_stack_size != new_size) +@@ -6915,7 +7060,28 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum, + pcum->aapcs_arg_processed = false; + pcum->aapcs_stack_words = 0; + pcum->aapcs_stack_size = 0; ++ pcum->darwinpcs_stack_bytes = 0; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ /* If we have been invoked for incoming args, then n_named will have been ++ set to -1, but we should have a function decl - so pick up the named ++ count from that. If that fails, and we end up with -1, this effectively ++ corresponds to assuming that there is an arbitrary number of named ++ args. */ ++ pcum->darwinpcs_n_named = n_named; ++ if (n_named == (unsigned)-1 && fndecl) ++ { ++ tree fnt = TREE_TYPE (fndecl); ++ if (fnt && TYPE_ARG_TYPES (fnt)) ++ pcum->darwinpcs_n_named = list_length (TYPE_ARG_TYPES (fnt)); ++ } ++ pcum->darwinpcs_n_args_processed = 0; ++ pcum->named_p = pcum->darwinpcs_n_named != 0; ++ pcum->last_named_p = pcum->darwinpcs_n_named == 1; + pcum->silent_p = silent_p; ++ pcum->aapcs_vfp_rmode = VOIDmode; + + if (!silent_p + && !TARGET_FLOAT +@@ -6954,8 +7120,10 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + || pcum->pcs_variant == ARM_PCS_SVE) + { + aarch64_layout_arg (pcum_v, arg); +- gcc_assert ((pcum->aapcs_reg != NULL_RTX) +- != (pcum->aapcs_stack_words != 0)); ++ pcum->darwinpcs_n_args_processed++; ++ gcc_assert (TARGET_MACHO ++ || (pcum->aapcs_reg != NULL_RTX) ++ != (pcum->aapcs_stack_words != 0)); + pcum->aapcs_arg_processed = false; + pcum->aapcs_ncrn = pcum->aapcs_nextncrn; + pcum->aapcs_nvrn = pcum->aapcs_nextnvrn; +@@ -6963,6 +7131,12 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + pcum->aapcs_stack_size += pcum->aapcs_stack_words; + pcum->aapcs_stack_words = 0; + pcum->aapcs_reg = NULL_RTX; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ pcum->named_p ++ = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++ pcum->last_named_p ++ = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; + } + } + +@@ -6973,12 +7147,15 @@ aarch64_function_arg_regno_p (unsigned regno) + || (FP_REGNUM_P (regno) && regno < V0_REGNUM + NUM_FP_ARG_REGS)); + } + +-/* Implement FUNCTION_ARG_BOUNDARY. Every parameter gets at least +- PARM_BOUNDARY bits of alignment, but will be given anything up +- to STACK_BOUNDARY bits if the type requires it. This makes sure +- that both before and after the layout of each argument, the Next +- Stacked Argument Address (NSAA) will have a minimum alignment of +- 8 bytes. */ ++/* Implement FUNCTION_ARG_BOUNDARY. ++ For AAPCS64, Every parameter gets at least PARM_BOUNDARY bits of ++ alignment, but will be given anything up to STACK_BOUNDARY bits ++ if the type requires it. This makes sure that both before and after ++ the layout of each argument, the Next Stacked Argument Address (NSAA) ++ will have a minimum alignment of 8 bytes. ++ ++ For darwinpcs, this is only called to lower va_arg entries which are ++ always aligned as for AAPCS64. */ + + static unsigned int + aarch64_function_arg_boundary (machine_mode mode, const_tree type) +@@ -6986,6 +7163,74 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + unsigned int abi_break; + unsigned int alignment = aarch64_function_arg_alignment (mode, type, + &abi_break); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ /* This can only work for unnamed args. */ ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ if (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return MIN (alignment, STACK_BOUNDARY); ++#else ++ alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ if (abi_break && warn_psabi) ++ { ++ abi_break = MIN (MAX (abi_break, PARM_BOUNDARY), STACK_BOUNDARY); ++ if (alignment != abi_break && !TARGET_MACHO) ++ inform (input_location, "parameter passing for argument of type " ++ "%qT changed in GCC 9.1", type); ++ } ++ return alignment; ++#endif ++} ++ ++/* For Darwin, we want to use the arg boundary computed when laying out the ++ function arg, to cope with items packed on the stack and the different ++ rules applied to unnamed parms. */ ++ ++static unsigned int ++aarch64_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ unsigned int abi_break; ++ unsigned int alignment = aarch64_function_arg_alignment (mode, type, ++ &abi_break); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ bool no_pack = (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE); ++ ++ bool in_regs = (pcum->aapcs_reg != NULL_RTX); ++ ++ if ((named_p && !no_pack) || in_regs) ++ ; /* Leave the alignment as natural. */ ++ else ++ alignment = MAX (alignment, PARM_BOUNDARY); ++gcc_checking_assert (alignment == pcum->darwinpcs_arg_boundary); ++ return MIN (alignment, STACK_BOUNDARY); ++ ++#else + alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); + if (abi_break && warn_psabi) + { +@@ -6995,6 +7240,44 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + "%qT changed in GCC 9.1", type); + } + return alignment; ++#endif ++} ++ ++/* Implement TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA for darwinpcs which allows ++ non-standard passing of byte-aligned items [D.2]. This is done by pulling ++ the values out of the cumulative args struct. */ ++ ++static unsigned int ++aarch64_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca) ++{ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ bool last_named_p = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; ++gcc_checking_assert (last_named_p == pcum->last_named_p); ++ ++ unsigned boundary = BITS_PER_UNIT; ++ if (last_named_p && pcum->darwinpcs_sub_word_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (pcum->darwinpcs_sub_word_pos <= 4) ++ boundary = PARM_BOUNDARY; ++ else if (pcum->darwinpcs_sub_word_pos <= 6) ++ boundary = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ boundary = 2 * BITS_PER_UNIT; ++ } ++ else if (named_p) ++ /* Named args are naturally aligned, but with no rounding. */ ++ ; ++ else ++ /* un-named args are rounded to fill slots. */ ++ boundary = PARM_BOUNDARY; ++gcc_checking_assert (boundary == pcum->darwinpcs_arg_padding); ++ return boundary; + } + + /* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE. */ +@@ -10154,6 +10437,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + /* load literal: pc-relative constant pool entry. Only supported + for SI mode or larger. */ + info->type = ADDRESS_SYMBOLIC; ++ info->offset = NULL_RTX; + + if (!load_store_pair_p + && GET_MODE_SIZE (mode).is_constant (&const_size) +@@ -10161,6 +10445,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + { + poly_int64 offset; + rtx sym = strip_offset_and_salt (x, &offset); ++ + return ((LABEL_REF_P (sym) + || (SYMBOL_REF_P (sym) + && CONSTANT_POOL_ADDRESS_P (sym) +@@ -10178,10 +10463,13 @@ aarch64_classify_address (struct aarch64_address_info *info, + poly_int64 offset; + HOST_WIDE_INT const_offset; + rtx sym = strip_offset_and_salt (info->offset, &offset); ++ + if (SYMBOL_REF_P (sym) + && offset.is_constant (&const_offset) + && (aarch64_classify_symbol (sym, const_offset) +- == SYMBOL_SMALL_ABSOLUTE)) ++ == SYMBOL_SMALL_ABSOLUTE ++ || aarch64_classify_symbol (sym, const_offset) ++ == SYMBOL_MO_SMALL_PCR)) + { + /* The symbol and offset must be aligned to the access size. */ + unsigned int align; +@@ -10231,6 +10519,55 @@ aarch64_address_valid_for_prefetch_p (rtx x, bool strict_p) + if (!res) + return false; + ++ /* For ELF targets using GAS, we emit prfm unconditionally; GAS will alter ++ the instruction to pick the prfum form where possible (i.e. when the ++ offset is in the range -256..255) and fall back to prfm otherwise. ++ We can reject cases where the offset exceeds the range usable by both ++ insns [-256..32760], or for offsets > 255 when the value is not divisible ++ by 8. ++ For Mach-O (Darwin) where the assembler uses the LLVM back end, that does ++ not yet do the substitution, so we must reject all prfum cases. */ ++ if (addr.offset) ++ { ++ HOST_WIDE_INT offs = INTVAL (addr.offset); ++ if (offs < -256) /* Out of range for both prfum and prfm. */ ++ return false; ++ if (offs > 32760) /* Out of range for prfm. */ ++ return false; ++ if (offs & 0x07) /* We cannot use prfm. */ ++ { ++ if (offs > 255) /* Out of range for prfum. */ ++ return false; ++ if (TARGET_MACHO) ++ return false; ++ } ++ if (TARGET_MACHO && offs < 0) ++ return false; ++ } ++ ++ /* ... except writeback forms. */ ++ return addr.type != ADDRESS_REG_WB; ++} ++ ++/* Return true if the address X is valid for a PRFUM instruction. ++ STRICT_P is true if we should do strict checking with ++ aarch64_classify_address. */ ++ ++bool ++aarch64_address_valid_for_unscaled_prefetch_p (rtx x, bool strict_p) ++{ ++ struct aarch64_address_info addr; ++ ++ /* PRFUM accepts the same addresses as DImode, but constrained to a range ++ -256..255. */ ++ bool res = aarch64_classify_address (&addr, x, DImode, strict_p); ++ if (!res) ++ return false; ++ ++ if (addr.offset && ((INTVAL (addr.offset) > 255) ++ || (INTVAL (addr.offset) < -256))) ++ return false; ++ + /* ... except writeback forms. */ + return addr.type != ADDRESS_REG_WB; + } +@@ -10915,6 +11252,144 @@ sizetochar (int size) + } + } + ++static void ++output_macho_postfix_expr (FILE *file, rtx x, const char *postfix) ++{ ++ char buf[256]; ++ ++ restart: ++ switch (GET_CODE (x)) ++ { ++ case PC: ++ putc ('.', file); ++ break; ++ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_DECL (x)) ++ assemble_external (SYMBOL_REF_DECL (x)); ++ assemble_name (file, XSTR (x, 0)); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case LABEL_REF: ++ x = label_ref_label (x); ++ /* Fall through. */ ++ case CODE_LABEL: ++ ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); ++ assemble_name (file, buf); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case CONST_INT: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); ++ break; ++ ++ case CONST: ++ /* This used to output parentheses around the expression, ++ but that does not work on the 386 (either ATT or BSD assembler). */ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ break; ++ ++ case CONST_WIDE_INT: ++ /* We do not know the mode here so we have to use a round about ++ way to build a wide-int to get it printed properly. */ ++ { ++ wide_int w = wide_int::from_array (&CONST_WIDE_INT_ELT (x, 0), ++ CONST_WIDE_INT_NUNITS (x), ++ CONST_WIDE_INT_NUNITS (x) ++ * HOST_BITS_PER_WIDE_INT, ++ false); ++ print_decs (w, file); ++ } ++ break; ++ ++ case CONST_DOUBLE: ++ if (CONST_DOUBLE_AS_INT_P (x)) ++ { ++ /* We can use %d if the number is one word and positive. */ ++ if (CONST_DOUBLE_HIGH (x)) ++ fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x), ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else if (CONST_DOUBLE_LOW (x) < 0) ++ fprintf (file, HOST_WIDE_INT_PRINT_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); ++ } ++ else ++ /* We can't handle floating point constants; ++ PRINT_OPERAND must handle them. */ ++ output_operand_lossage ("floating constant misused"); ++ break; ++ ++ case CONST_FIXED: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_FIXED_VALUE_LOW (x)); ++ break; ++ ++ case PLUS: ++ /* Some assemblers need integer constants to appear last (eg masm). */ ++ if (CONST_INT_P (XEXP (x, 0))) ++ { ++ output_macho_postfix_expr (file, XEXP (x, 1), postfix); ++ if (INTVAL (XEXP (x, 0)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 0)); ++ } ++ else ++ { ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ if (!CONST_INT_P (XEXP (x, 1)) ++ || INTVAL (XEXP (x, 1)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 1)); ++ } ++ break; ++ ++ case MINUS: ++ /* Avoid outputting things like x-x or x+5-x, ++ since some assemblers can't handle that. */ ++ x = simplify_subtraction (x); ++ if (GET_CODE (x) != MINUS) ++ goto restart; ++ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ fprintf (file, "-"); ++ if ((CONST_INT_P (XEXP (x, 1)) && INTVAL (XEXP (x, 1)) >= 0) ++ || GET_CODE (XEXP (x, 1)) == PC ++ || GET_CODE (XEXP (x, 1)) == SYMBOL_REF) ++ output_addr_const (file, XEXP (x, 1)); ++ else ++ { ++ fputs (targetm.asm_out.open_paren, file); ++ output_addr_const (file, XEXP (x, 1)); ++ fputs (targetm.asm_out.close_paren, file); ++ } ++ break; ++ ++ case ZERO_EXTEND: ++ case SIGN_EXTEND: ++ case SUBREG: ++ case TRUNCATE: ++ output_addr_const (file, XEXP (x, 0)); ++ break; ++ ++ case UNSPEC: ++ if (XINT (x, 1) == UNSPEC_SALT_ADDR) ++ { ++ output_macho_postfix_expr (file, XVECEXP (x, 0, 0), postfix); ++ break; ++ } ++ /* FALLTHROUGH */ ++ default: ++ if (targetm.asm_out.output_addr_const_extra (file, x)) ++ break; ++ ++ output_operand_lossage ("invalid expression as operand"); ++ } ++ ++} ++ + /* Print operand X to file F in a target specific manner according to CODE. + The acceptable formatting commands given by CODE are: + 'c': An integer or symbol address without a preceding # +@@ -10983,6 +11458,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + } + break; + ++ case 'J': ++ output_macho_postfix_expr (f, x, "PAGEOFF"); ++ break; ++ case 'O': ++ output_macho_postfix_expr (f, x, "GOTPAGEOFF"); ++ break; + case 'e': + { + x = unwrap_const_vec_duplicate (x); +@@ -11303,7 +11784,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + case 'A': + if (GET_CODE (x) == HIGH) + x = XEXP (x, 0); +- ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -11334,9 +11815,26 @@ aarch64_print_operand (FILE *f, rtx x, int code) + break; + } + output_addr_const (asm_out_file, x); ++#endif ++#if TARGET_MACHO ++ switch (aarch64_classify_symbolic_expression (x)) ++ { ++ case SYMBOL_MO_SMALL_PCR: ++ output_macho_postfix_expr (asm_out_file, x, "PAGE"); ++ break; ++ case SYMBOL_MO_SMALL_GOT: ++ output_macho_postfix_expr (asm_out_file, x, "GOTPAGE"); ++ break; ++ default: ++ /* large code model unimplemented. */ ++ gcc_unreachable (); ++ break; ++ } ++#endif + break; + + case 'L': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -11374,10 +11872,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + + case 'G': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_TLSLE24: +@@ -11386,6 +11886,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + +@@ -11533,8 +12034,13 @@ aarch64_print_address_internal (FILE *f, machine_mode mode, rtx x, + break; + + case ADDRESS_LO_SUM: ++#if TARGET_MACHO ++ asm_fprintf (f, "[%s, #", reg_names [REGNO (addr.base)]); ++ output_macho_postfix_expr (f, addr.offset, "PAGEOFF"); ++#else + asm_fprintf (f, "[%s, #:lo12:", reg_names [REGNO (addr.base)]); + output_addr_const (f, addr.offset); ++#endif + asm_fprintf (f, "]"); + return true; + +@@ -11787,6 +12293,26 @@ aarch64_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x, + return NO_REGS; + } + ++#if TARGET_MACHO ++/* Implement TARGET_FRAME_POINTER_REQUIRED. */ ++ ++static bool ++aarch64_darwin_frame_pointer_required () ++{ ++ if (crtl->calls_eh_return) ++ return true; ++ ++ /* Not used in leaf functions (unless forced). */ ++ if (flag_omit_leaf_frame_pointer && leaf_function_p ()) ++ return false; ++ ++ /* NOTE: We are allowing the user to force omission of the frame ++ pointer, (despite that it is not ABI-compliant). */ ++ ++ return flag_omit_frame_pointer != 1; ++} ++#endif ++ + static bool + aarch64_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to) + { +@@ -12004,6 +12530,8 @@ aarch64_asm_output_labelref (FILE* f, const char *name) + asm_fprintf (f, "%U%s", name); + } + ++#if !TARGET_MACHO ++ + static void + aarch64_elf_asm_constructor (rtx symbol, int priority) + { +@@ -12043,6 +12571,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority) + assemble_aligned_integer (POINTER_BYTES, symbol); + } + } ++#endif + + const char* + aarch64_output_casesi (rtx *operands) +@@ -12146,7 +12675,11 @@ aarch64_select_rtx_section (machine_mode mode, + if (aarch64_can_use_per_function_literal_pools_p ()) + return function_section (current_function_decl); + ++#if TARGET_MACHO ++ return machopic_select_rtx_section (mode, x, align); ++#else + return default_elf_select_rtx_section (mode, x, align); ++#endif + } + + /* Implement ASM_OUTPUT_POOL_EPILOGUE. */ +@@ -14235,15 +14768,17 @@ aarch64_init_builtins () + { + aarch64_general_init_builtins (); + aarch64_sve::init_builtins (); +-#ifdef SUBTARGET_INIT_BUILTINS +- SUBTARGET_INIT_BUILTINS; +-#endif ++ aarch64_init_subtarget_builtins (); + } + + /* Implement TARGET_FOLD_BUILTIN. */ + static tree + aarch64_fold_builtin (tree fndecl, int nargs, tree *args, bool) + { ++#ifdef SUBTARGET_FOLD_BUILTIN ++ if (tree res = SUBTARGET_FOLD_BUILTIN (fndecl, nargs, args, false)) ++ return res; ++#endif + unsigned int code = DECL_MD_FUNCTION_CODE (fndecl); + unsigned int subcode = code >> AARCH64_BUILTIN_SHIFT; + tree type = TREE_TYPE (TREE_TYPE (fndecl)); +@@ -17424,10 +17959,14 @@ initialize_aarch64_code_model (struct gcc_options *opts) + } + break; + case AARCH64_CMODEL_LARGE: +- if (opts->x_flag_pic) ++ if (TARGET_MACHO) ++ /* We need to implement fPIC here (arm64_32 also accepts the large ++ model). */ ++ sorry ("code model %qs not supported yet", "large"); ++ else if (opts->x_flag_pic) + sorry ("code model %qs with %<-f%s%>", "large", + opts->x_flag_pic > 1 ? "PIC" : "pic"); +- if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) ++ else if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) + sorry ("code model %qs not supported in ilp32 mode", "large"); + break; + case AARCH64_CMODEL_TINY_PIC: +@@ -18339,7 +18878,9 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ++ ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + default: + gcc_unreachable (); +@@ -18373,7 +18914,27 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + + return SYMBOL_TINY_ABSOLUTE; + ++ case AARCH64_CMODEL_SMALL_SPIC: ++ case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: ++#if TARGET_MACHO ++ if (TARGET_MACHO) ++ { ++ /* Constant pool addresses are always TU-local and PC- ++ relative. We indirect common, external and weak ++ symbols (but weak only if not hidden). */ ++ if (!CONSTANT_POOL_ADDRESS_P (x) ++ && (MACHO_SYMBOL_MUST_INDIRECT_P (x) ++ || !aarch64_symbol_binds_local_p (x))) ++ return SYMBOL_MO_SMALL_GOT; ++ } ++ else ++#endif ++ if ((flag_pic || SYMBOL_REF_WEAK (x)) ++ && !aarch64_symbol_binds_local_p (x)) ++ return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC ++ ? SYMBOL_SMALL_GOT_28K : SYMBOL_SMALL_GOT_4G; ++ + /* Same reasoning as the tiny code model, but the offset cap here is + 1MB, allowing +/-3.9GB for the offset to the symbol. */ + +@@ -18383,20 +18944,14 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + case AARCH64_CMODEL_TINY_PIC: + if (!aarch64_symbol_binds_local_p (x)) + return SYMBOL_TINY_GOT; + return SYMBOL_TINY_ABSOLUTE; + +- case AARCH64_CMODEL_SMALL_SPIC: +- case AARCH64_CMODEL_SMALL_PIC: +- if (!aarch64_symbol_binds_local_p (x)) +- return (aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC +- ? SYMBOL_SMALL_GOT_28K : SYMBOL_SMALL_GOT_4G); +- return SYMBOL_SMALL_ABSOLUTE; +- + case AARCH64_CMODEL_LARGE: + /* This is alright even in PIC code as the constant + pool reference is always PC relative and within +@@ -18525,7 +19080,10 @@ static GTY(()) tree va_list_type; + void *__vr_top; + int __gr_offs; + int __vr_offs; +- }; */ ++ }; ++ ++ darwinpcs uses 'char *' for the va_list (in common with other platform ++ ports). */ + + static tree + aarch64_build_builtin_va_list (void) +@@ -18533,6 +19091,13 @@ aarch64_build_builtin_va_list (void) + tree va_list_name; + tree f_stack, f_grtop, f_vrtop, f_groff, f_vroff; + ++ /* darwinpcs uses a simple char * for this. */ ++ if (TARGET_MACHO) ++ { ++ va_list_type = build_pointer_type (char_type_node); ++ return va_list_type; ++ } ++ + /* Create the type. */ + va_list_type = lang_hooks.types.make_type (RECORD_TYPE); + /* Give it the required name. */ +@@ -18604,6 +19169,13 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) + int vr_save_area_size = cfun->va_list_fpr_size; + int vr_offset; + ++ /* darwinpcs uses the default, char * va_list impl. */ ++ if (TARGET_MACHO) ++ { ++ std_expand_builtin_va_start (valist, nextarg); ++ return; ++ } ++ + cum = &crtl->args.info; + if (cfun->va_list_gpr_size) + gr_save_area_size = MIN ((NUM_ARG_REGS - cum->aapcs_ncrn) * UNITS_PER_WORD, +@@ -18694,6 +19266,9 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + HOST_WIDE_INT size, rsize, adjust, align; + tree t, u, cond1, cond2; + ++ if (TARGET_MACHO) ++ return std_gimplify_va_arg_expr (valist, type, pre_p, post_p); ++ + indirect_p = pass_va_arg_by_reference (type); + if (indirect_p) + type = build_pointer_type (type); +@@ -18878,8 +19453,18 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + field_ptr_t = double_ptr_type_node; + break; + case E_TFmode: +- field_t = long_double_type_node; +- field_ptr_t = long_double_ptr_type_node; ++ if (TARGET_MACHO) ++ { ++ /* Darwin has __float128, and long double is the same as ++ double. */ ++ field_t = float128_type_node; ++ field_ptr_t = aarch64_float128_ptr_type_node; ++ } ++ else ++ { ++ field_t = long_double_type_node; ++ field_ptr_t = long_double_ptr_type_node; ++ } + break; + case E_HFmode: + field_t = aarch64_fp16_type_node; +@@ -18950,6 +19535,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v, + int gr_saved = cfun->va_list_gpr_size; + int vr_saved = cfun->va_list_fpr_size; + ++ if (TARGET_MACHO) ++ return default_setup_incoming_varargs (cum_v, arg, pretend_size, no_rtl); ++ + /* The caller has advanced CUM up to, but not beyond, the last named + argument. Advance a local copy of CUM past the last "real" named + argument, to find out how many registers are left over. */ +@@ -19733,6 +20321,12 @@ aarch64_autovectorize_vector_modes (vector_modes *modes, bool) + static const char * + aarch64_mangle_type (const_tree type) + { ++ /* The darwinpcs ABI documents say that "__va_list" has to be ++ mangled as char *. */ ++ if (TARGET_MACHO ++ && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) ++ return "Pc"; ++ + /* The AArch64 ABI documents say that "__va_list" has to be + mangled as if it is in the "std" namespace. */ + if (lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) +@@ -19747,6 +20341,12 @@ aarch64_mangle_type (const_tree type) + return "Dh"; + } + ++ /* __float128 is mangled as "g" on darwin. _Float128 is not mangled here, ++ but handled in common code (as "DF128_"). */ ++ if (TARGET_MACHO && TYPE_MODE (type) == TFmode ++ && TYPE_MAIN_VARIANT (type) == float128_type_node) ++ return "g"; ++ + /* Mangle AArch64-specific internal types. TYPE_NAME is non-NULL_TREE for + builtin types. */ + if (TYPE_NAME (type) != NULL) +@@ -20433,6 +21033,7 @@ aarch64_mov_operand_p (rtx x, machine_mode mode) + } + + x = strip_salt (x); ++ + if (SYMBOL_REF_P (x) && mode == DImode && CONSTANT_ADDRESS_P (x)) + return true; + +@@ -21557,12 +22158,8 @@ aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name) + static std::string aarch64_last_printed_arch_string; + static std::string aarch64_last_printed_tune_string; + +-/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used +- by the function fndecl. */ +- +-void +-aarch64_declare_function_name (FILE *stream, const char* name, +- tree fndecl) ++static void ++aarch64_function_options_preamble (tree fndecl) + { + tree target_parts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); + +@@ -21601,15 +22198,60 @@ aarch64_declare_function_name (FILE *stream, const char* name, + this_tune->name); + aarch64_last_printed_tune_string = this_tune->name; + } ++} ++ ++/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used ++ by the function fndecl. */ + ++#if TARGET_MACHO ++void ++aarch64_darwin_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ gcc_checking_assert (TREE_CODE (fndecl) == FUNCTION_DECL); ++ gcc_checking_assert (!DECL_COMMON (fndecl)); ++ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ ++ /* Darwin does not emit pcs variant info. */ ++ ++ rtx decl_rtx = XEXP (DECL_RTL (fndecl), 0); ++ if (GET_CODE (decl_rtx) != SYMBOL_REF) ++ name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); ++ ++ if (! DECL_WEAK (fndecl) ++ && ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl))) ++ machopic_define_symbol (DECL_RTL (fndecl)); ++ if ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl)) ++ (* targetm.encode_section_info) (fndecl, DECL_RTL (fndecl), false); ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); ++ ++ cfun->machine->label_is_assembled = true; ++} ++ ++#else ++ ++void ++aarch64_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ /* Emit any necessary pcs information. */ + aarch64_asm_output_variant_pcs (stream, fndecl, name); + + /* Don't forget the type directive for ELF. */ ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function"); +- ASM_OUTPUT_LABEL (stream, name); ++#endif ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); + + cfun->machine->label_is_assembled = true; + } ++#endif + + /* Implement PRINT_PATCHABLE_FUNCTION_ENTRY. */ + +@@ -21666,12 +22308,17 @@ aarch64_output_patchable_area (unsigned int patch_area_size, bool record_p) + /* Implement ASM_OUTPUT_DEF_FROM_DECLS. Output .variant_pcs for aliases. */ + + void +-aarch64_asm_output_alias (FILE *stream, const tree decl, const tree target) ++aarch64_asm_output_alias (FILE *stream, const tree decl, ++ const tree target ATTRIBUTE_UNUSED) + { + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); ++#ifdef ASM_OUTPUT_DEF + const char *value = IDENTIFIER_POINTER (target); ++#endif + aarch64_asm_output_variant_pcs (stream, decl, name); ++#ifdef ASM_OUTPUT_DEF + ASM_OUTPUT_DEF (stream, name, value); ++#endif + } + + /* Implement ASM_OUTPUT_EXTERNAL. Output .variant_pcs for undefined +@@ -21717,6 +22364,9 @@ aarch64_start_file (void) + aarch64_last_printed_arch_string.c_str ()); + + default_file_start (); ++#if TARGET_MACHO ++ darwin_file_start (); ++#endif + } + + /* Emit load exclusive. */ +@@ -22194,6 +22844,10 @@ aarch64_float_const_representable_p (rtx x) + || REAL_VALUE_MINUS_ZERO (r)) + return false; + ++ /* For BFmode, only handle 0.0. */ ++ if (GET_MODE (x) == BFmode) ++ return r.cl == rvc_zero; ++ + /* Extract exponent. */ + r = real_value_abs (&r); + exponent = REAL_EXP (&r); +@@ -22297,6 +22951,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + } + + gcc_assert (CONST_INT_P (info.u.mov.value)); ++ unsigned HOST_WIDE_INT value = UINTVAL (info.u.mov.value); ++ ++ /* We have signed chars which can result in a sign-extended 8bit value ++ which is then emitted as an unsigned hex value, and the LLVM back end ++ assembler rejects that as being too big. */ ++ if (TARGET_MACHO && (known_eq (GET_MODE_BITSIZE (info.elt_mode), 8))) ++ { ++ unsigned HOST_WIDE_INT mask = (1U << GET_MODE_BITSIZE (info.elt_mode))-1; ++ value &= mask; ++ } + + if (which == AARCH64_CHECK_MOV) + { +@@ -22305,16 +22969,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + ? "msl" : "lsl"); + if (lane_count == 1) + snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX, +- mnemonic, UINTVAL (info.u.mov.value)); ++ mnemonic, value); + else if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX ", %s %d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), shift_op, ++ element_char, value, shift_op, + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + else + { +@@ -22323,12 +22987,12 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC ", %s #%d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), "lsl", ++ element_char, value, "lsl", + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + return templ; + } +@@ -25273,12 +25937,14 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode) + } + + /* Implement TARGET_SCALAR_MODE_SUPPORTED_P - return TRUE +- if MODE is HFmode, and punt to the generic implementation otherwise. */ ++ if MODE is [BH]Fmode, or TFmode on Mach-O, and punt to the generic ++ implementation otherwise. */ + + static bool + aarch64_scalar_mode_supported_p (scalar_mode mode) + { +- return (mode == HFmode ++ ++ return ((mode == HFmode || mode == BFmode || (mode == TFmode && TARGET_MACHO)) + ? true + : default_scalar_mode_supported_p (mode)); + } +@@ -26036,19 +26702,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE *out_file) + continue; + + const char *name = indirect_symbol_names[regnum]; +- switch_to_section (get_named_section (decl, NULL, 0)); ++ /* If the target uses a unique section for this switch to it. */ ++ if (DECL_SECTION_NAME (decl)) ++ switch_to_section (get_named_section (decl, NULL, 0)); ++ else ++ switch_to_section (text_section); + ASM_OUTPUT_ALIGN (out_file, 2); +- targetm.asm_out.globalize_label (out_file, name); ++ if (!TARGET_MACHO) ++ targetm.asm_out.globalize_label (out_file, name); ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE ++ ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); ++#endif ++ if (TARGET_MACHO) ++ { ++#ifdef ASM_WEAKEN_DECL ++ if (DECL_WEAK (decl)) ++ ASM_WEAKEN_DECL (out_file, decl, name, 0); ++ else ++#endif ++ targetm.asm_out.globalize_decl_name (out_file, decl); ++ } + /* Only emits if the compiler is configured for an assembler that can + handle visibility directives. */ + targetm.asm_out.assemble_visibility (decl, VISIBILITY_HIDDEN); +- ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); + ASM_OUTPUT_LABEL (out_file, name); + aarch64_sls_emit_function_stub (out_file, regnum); + /* Use the most conservative target to ensure it can always be used by any + function in the translation unit. */ + asm_fprintf (out_file, "\tdsb\tsy\n\tisb\n"); ++#ifdef ASM_DECLARE_FUNCTION_SIZE + ASM_DECLARE_FUNCTION_SIZE (out_file, name, decl); ++#endif + } + } + +@@ -26079,6 +26763,60 @@ aarch64_indirect_call_asm (rtx addr) + return ""; + } + ++#if TARGET_MACHO ++/* This handles the promotion of function return values. ++ It also handles function args under two specific curcumstances: ++ - called from combine with a register argument ++ - caller for a libcall with type == NULL. ++ The remaining cases for argument promotion are handled with access to ++ cumulative args data, below. */ ++machine_mode ++aarch64_darwin_promote_fn_mode (const_tree type, machine_mode mode, ++ int *punsignedp, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ /* With the amended use of promote using cargs, the only cases that arrive ++ here with for_return == 0 are from combine (where the value is definitely ++ in a register) and for libcalls, where type == NULL. We want to promote ++ function return values in the callee, so this becomes pretty much ++ unconditional now. */ ++ if (type != NULL_TREE) ++ return promote_mode (type, mode, punsignedp); ++ return mode; ++} ++ ++/* Ensure that we only promote the mode of named parms when they are passed in ++ a register. Named values passed on the stack retain their original mode and ++ alignment. */ ++machine_mode ++aarch64_darwin_promote_function_mode_ca (cumulative_args_t ca, ++ function_arg_info arg, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int *punsignedp, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ tree type = arg.type; ++ machine_mode mode = arg.mode; ++ machine_mode new_mode = promote_mode (type, mode, punsignedp); ++ if (new_mode == mode || arg.named == false ++ || GET_MODE_CLASS (new_mode) != MODE_INT ++ || known_gt (GET_MODE_SIZE (new_mode), 4)) ++ return new_mode; ++ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++ /* Make sure that changes in assumption do not get missed. */ ++ gcc_checking_assert (for_return == 0 && new_mode == SImode ++ && !pcum->aapcs_arg_processed); ++ /* We have a named integer value that fits in a reg; if there's one available ++ then promote the value. */ ++ if (pcum->aapcs_ncrn < 8) ++ return new_mode; ++ return mode; ++} ++ ++#endif ++ + /* Target-specific selftests. */ + + #if CHECKING_P +@@ -26241,6 +26979,15 @@ aarch64_run_selftests (void) + #undef TARGET_ASM_ALIGNED_SI_OP + #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" + ++#if TARGET_MACHO ++#undef TARGET_ASM_UNALIGNED_HI_OP ++#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t" ++#undef TARGET_ASM_UNALIGNED_SI_OP ++#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t" ++#undef TARGET_ASM_UNALIGNED_DI_OP ++#define TARGET_ASM_UNALIGNED_DI_OP "\t.quad\t" ++#endif ++ + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ + hook_bool_const_tree_hwi_hwi_const_tree_true +@@ -26327,6 +27074,12 @@ aarch64_run_selftests (void) + #undef TARGET_FUNCTION_ARG_BOUNDARY + #define TARGET_FUNCTION_ARG_BOUNDARY aarch64_function_arg_boundary + ++#undef TARGET_FUNCTION_ARG_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_BOUNDARY_CA aarch64_function_arg_boundary_ca ++ ++#undef TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA aarch64_function_arg_round_boundary_ca ++ + #undef TARGET_FUNCTION_ARG_PADDING + #define TARGET_FUNCTION_ARG_PADDING aarch64_function_arg_padding + +@@ -26663,7 +27416,7 @@ aarch64_libgcc_floating_mode_supported_p + + /* The architecture reserves bits 0 and 1 so use bit 2 for descriptors. */ + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS AARCH64_CUSTOM_FUNCTION_TEST + + #undef TARGET_HARD_REGNO_NREGS + #define TARGET_HARD_REGNO_NREGS aarch64_hard_regno_nregs +@@ -26747,6 +27500,11 @@ aarch64_libgcc_floating_mode_supported_p + #undef TARGET_ASM_FUNCTION_EPILOGUE + #define TARGET_ASM_FUNCTION_EPILOGUE aarch64_sls_emit_blr_function_thunks + ++#if TARGET_MACHO ++#undef TARGET_FRAME_POINTER_REQUIRED ++#define TARGET_FRAME_POINTER_REQUIRED aarch64_darwin_frame_pointer_required ++#endif ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-aarch64.h" +diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h +index 9084b1cfb9d..f0358d6f6f0 100644 +--- a/gcc/config/aarch64/aarch64.h ++++ b/gcc/config/aarch64/aarch64.h +@@ -58,6 +58,10 @@ + #define TARGET_SIMD (!TARGET_GENERAL_REGS_ONLY && AARCH64_ISA_SIMD) + #define TARGET_FLOAT (!TARGET_GENERAL_REGS_ONLY && AARCH64_ISA_FP) + ++/* If this is non-zero then generated code of the object format, ABI and ++ assembler syntax used by Darwin (Mach-O) platforms. */ ++#define TARGET_MACHO 0 ++ + #define UNITS_PER_WORD 8 + + #define UNITS_PER_VREG 16 +@@ -135,6 +139,12 @@ + /* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY). */ + #define MALLOC_ABI_ALIGNMENT 128 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define AARCH64_CUSTOM_FUNCTION_TEST 4 ++ + /* Defined by the ABI */ + #define WCHAR_TYPE "unsigned int" + #define WCHAR_TYPE_SIZE 32 +@@ -984,6 +994,24 @@ typedef struct + aapcs_reg == NULL_RTX. */ + int aapcs_stack_size; /* The total size (in words, per 8 byte) of the + stack arg area so far. */ ++ ++ /* In the darwinpcs, items smaller than one word are packed onto the stack ++ naturally aligned. Unnamed parameters passed in a variadic call are, ++ however, aligned the same way as the AAPCS64. This means that we need to ++ pad the last named arg to the next parm boundary (and hence notice when ++ we are processing that arg). */ ++ int darwinpcs_stack_bytes; /* If the argument is passed on the stack, this ++ the byte-size. */ ++ int darwinpcs_sub_word_offset;/* This is the offset of this arg within a word ++ when placing smaller items for darwinpcs. */ ++ int darwinpcs_sub_word_pos; /* The next byte available within the word for ++ darwinpcs. */ ++ unsigned darwinpcs_arg_boundary; /* The computed argument boundary. */ ++ unsigned darwinpcs_arg_padding; /* The computed argument padding. */ ++ unsigned darwinpcs_n_named; /* Number of named arguments. */ ++ unsigned darwinpcs_n_args_processed; /* Processed so far. */ ++ bool named_p; /* Is this arg named? */ ++ bool last_named_p; /* Is this the last named arg? */ + bool silent_p; /* True if we should act silently, rather than + raise an error for invalid calls. */ + } CUMULATIVE_ARGS; +@@ -1267,8 +1295,13 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + #define ASM_CPU_SPEC \ + MCPU_TO_MARCH_SPEC + ++#ifndef SUBTARGET_EXTRA_SPECS ++#define SUBTARGET_EXTRA_SPECS ++#endif ++ + #define EXTRA_SPECS \ +- { "asm_cpu_spec", ASM_CPU_SPEC } ++ { "asm_cpu_spec", ASM_CPU_SPEC }, \ ++ SUBTARGET_EXTRA_SPECS + + #define ASM_OUTPUT_POOL_EPILOGUE aarch64_asm_output_pool_epilogue + +@@ -1282,6 +1315,10 @@ extern tree aarch64_fp16_ptr_type_node; + extern tree aarch64_bf16_type_node; + extern tree aarch64_bf16_ptr_type_node; + ++/* A pointer to the user-visible __float128 (on Mach-O). Defined in ++ aarch64-builtins.c. */ ++extern GTY(()) tree aarch64_float128_ptr_type_node; ++ + /* The generic unwind code in libgcc does not initialize the frame pointer. + So in order to unwind a function using a frame pointer, the very first + function that is unwound must save the frame pointer. That way the frame +diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md +index 002112d5eea..23a74022e18 100644 +--- a/gcc/config/aarch64/aarch64.md ++++ b/gcc/config/aarch64/aarch64.md +@@ -295,6 +295,7 @@ + UNSPEC_LD1RO + UNSPEC_SALT_ADDR + UNSPECV_PATCHABLE_AREA ++ UNSPEC_MACHOPIC_OFFSET ; Common to Mach-O ports. + ]) + + (define_c_enum "unspecv" [ +@@ -841,6 +842,37 @@ + [(set_attr "type" "load_4")] + ) + ++(define_insn "prefetch_unscaled" ++ [(prefetch (match_operand:DI 0 "aarch64_unscaled_prefetch_operand" "Du") ++ (match_operand:QI 1 "const_int_operand" "") ++ (match_operand:QI 2 "const_int_operand" ""))] ++ "" ++ { ++ const char * pftype[2][4] = ++ { ++ {"prfum\\tPLDL1STRM, %0", ++ "prfum\\tPLDL3KEEP, %0", ++ "prfum\\tPLDL2KEEP, %0", ++ "prfum\\tPLDL1KEEP, %0"}, ++ {"prfum\\tPSTL1STRM, %0", ++ "prfum\\tPSTL3KEEP, %0", ++ "prfum\\tPSTL2KEEP, %0", ++ "prfum\\tPSTL1KEEP, %0"}, ++ }; ++ ++ int locality = INTVAL (operands[2]); ++ ++ gcc_assert (IN_RANGE (locality, 0, 3)); ++ ++ /* PRFUM accepts the same addresses as a 64-bit LDR so wrap ++ the address into a DImode MEM so that aarch64_print_operand knows ++ how to print it. */ ++ operands[0] = gen_rtx_MEM (DImode, operands[0]); ++ return pftype[INTVAL(operands[1])][locality]; ++ } ++ [(set_attr "type" "load_4")] ++) ++ + (define_insn "trap" + [(trap_if (const_int 1) (const_int 8))] + "" +@@ -1640,16 +1672,16 @@ + (set_attr "arch" "*,fp")] + ) + +-(define_insn "load_pair_dw_tftf" +- [(set (match_operand:TF 0 "register_operand" "=w") +- (match_operand:TF 1 "aarch64_mem_pair_operand" "Ump")) +- (set (match_operand:TF 2 "register_operand" "=w") +- (match_operand:TF 3 "memory_operand" "m"))] ++(define_insn "load_pair_dw_" ++ [(set (match_operand:TX 0 "register_operand" "=w") ++ (match_operand:TX 1 "aarch64_mem_pair_operand" "Ump")) ++ (set (match_operand:TX2 2 "register_operand" "=w") ++ (match_operand:TX2 3 "memory_operand" "m"))] + "TARGET_SIMD + && rtx_equal_p (XEXP (operands[3], 0), + plus_constant (Pmode, + XEXP (operands[1], 0), +- GET_MODE_SIZE (TFmode)))" ++ GET_MODE_SIZE (mode)))" + "ldp\\t%q0, %q2, %z1" + [(set_attr "type" "neon_ldp_q") + (set_attr "fp" "yes")] +@@ -1690,11 +1722,11 @@ + (set_attr "arch" "*,fp")] + ) + +-(define_insn "store_pair_dw_tftf" +- [(set (match_operand:TF 0 "aarch64_mem_pair_operand" "=Ump") +- (match_operand:TF 1 "register_operand" "w")) +- (set (match_operand:TF 2 "memory_operand" "=m") +- (match_operand:TF 3 "register_operand" "w"))] ++(define_insn "store_pair_dw_" ++ [(set (match_operand:TX 0 "aarch64_mem_pair_operand" "=Ump") ++ (match_operand:TX 1 "register_operand" "w")) ++ (set (match_operand:TX2 2 "memory_operand" "=m") ++ (match_operand:TX2 3 "register_operand" "w"))] + "TARGET_SIMD && + rtx_equal_p (XEXP (operands[2], 0), + plus_constant (Pmode, +@@ -6709,7 +6741,10 @@ + (lo_sum:P (match_operand:P 1 "register_operand" "r") + (match_operand 2 "aarch64_valid_symref" "S")))] + "" +- "add\\t%0, %1, :lo12:%c2" ++ { return TARGET_MACHO ++ ? "add\\t%0, %1, %J2;" ++ : "add\\t%0, %1, :lo12:%c2"; ++ } + [(set_attr "type" "alu_imm")] + ) + +@@ -6720,7 +6755,10 @@ + (match_operand:PTR 2 "aarch64_valid_symref" "S")))] + UNSPEC_GOTSMALLPIC))] + "" +- "ldr\\t%0, [%1, #:got_lo12:%c2]" ++ { return TARGET_MACHO ++ ? "ldr\\t%0, [%1, %O2]" ++ : "ldr\\t%0, [%1, #:got_lo12:%c2]"; ++ } + [(set_attr "type" "load_")] + ) + +diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt +index 32191cf1acf..2c5c503b3c3 100644 +--- a/gcc/config/aarch64/aarch64.opt ++++ b/gcc/config/aarch64/aarch64.opt +@@ -152,6 +152,13 @@ Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32) + EnumValue + Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64) + ++EnumValue ++Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64) ++ ++m64 ++Target RejectNegative Alias(mabi=, darwinpcs) ++On Darwin for compatibility with other platform variants. ++ + mpc-relative-literal-loads + Target Save Var(pcrelative_literal_loads) Init(2) Save + PC relative literal loads. +diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md +index 3b49b452119..ef399a5ba24 100644 +--- a/gcc/config/aarch64/constraints.md ++++ b/gcc/config/aarch64/constraints.md +@@ -474,6 +474,11 @@ + An address valid for a prefetch instruction." + (match_test "aarch64_address_valid_for_prefetch_p (op, true)")) + ++(define_address_constraint "Du" ++ "@internal ++ An address valid for a prefetch instruction with an unscaled offset." ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, true)")) ++ + (define_constraint "vgb" + "@internal + A constraint that matches an immediate offset valid for SVE LD1B +diff --git a/gcc/config/aarch64/darwin.h b/gcc/config/aarch64/darwin.h +new file mode 100644 +index 00000000000..08febf1401b +--- /dev/null ++++ b/gcc/config/aarch64/darwin.h +@@ -0,0 +1,289 @@ ++/* Target definitions for Arm64/Aarch64 running on macOS/iOS. ++ ++Copyright The GNU Toolchain Authors. ++Contributed by Iain Sandoe. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 3, or (at your option) ++any later version. ++ ++GCC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++/* Enable Mach-O bits in generic Aarch64 code. */ ++#undef TARGET_MACHO ++#define TARGET_MACHO 1 ++ ++#undef DARWIN_ARM64 ++#define DARWIN_ARM64 1 ++ ++/* This is used in generic code in darwin.cc (at present, we have no support ++ for the arm64_32 target). */ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "long int" ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE aarch64_darwin_promote_fn_mode ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE_CA ++#define TARGET_PROMOTE_FUNCTION_MODE_CA aarch64_darwin_promote_function_mode_ca ++ ++/* NOTE that arm64_32 is a valid thing and corresponds to darwinpcs ++ and TARGET_ILP32, but we are not implementing that for now. */ ++#define TARGET_OS_CPP_BUILTINS() \ ++ do { \ ++ builtin_define ("__LITTLE_ENDIAN__"); \ ++ builtin_define ("__arm64"); \ ++ builtin_define ("__arm64__"); \ ++ darwin_cpp_builtins (pfile); \ ++ } while (0) ++ ++/* In Darwin's Arm64 ABI, chars are signed. */ ++ ++#undef DEFAULT_SIGNED_CHAR ++#define DEFAULT_SIGNED_CHAR 1 ++ ++#undef LONG_DOUBLE_TYPE_SIZE ++#define LONG_DOUBLE_TYPE_SIZE 64 ++ ++/* Disable custom function descriptors on Darwin (we use heap-based ++ trampolines). */ ++#undef AARCH64_CUSTOM_FUNCTION_TEST ++#define AARCH64_CUSTOM_FUNCTION_TEST 0 ++ ++/* Non-PIE executables are forbidden by the Arm64-darwin security model; ++ remove the option from link-lines since they just produce a warning from ++ ld64 and are then ignored anyway. */ ++#undef DARWIN_NOPIE_SPEC ++#define DARWIN_NOPIE_SPEC \ ++" % ++# include ++#endif ++ ++ ++#if TARGET_MACHO ++ ++/* Default architecture to use if -mcpu=native did not detect a known CPU. */ ++#define DEFAULT_ARCH "apple-m1" ++ ++/* macOS does not have /proc/cpuinfo and needs a different approach, ++ based on sysctl. It is much simpler. */ ++ ++const char * ++host_detect_local_cpu (ATTRIBUTE_UNUSED int argc, ATTRIBUTE_UNUSED const char **argv) ++{ ++ bool arch = false; ++ bool tune = false; ++ bool cpu = false; ++ const char *res = NULL; ++ uint32_t family; ++ size_t len = sizeof(family); ++ ++ gcc_assert (argc); ++ if (!argv[0]) ++ return NULL; ++ ++ /* Are we processing -march, mtune or mcpu? */ ++ arch = strcmp (argv[0], "arch") == 0; ++ if (!arch) ++ tune = strcmp (argv[0], "tune") == 0; ++ if (!arch && !tune) ++ cpu = strcmp (argv[0], "cpu") == 0; ++ if (!arch && !tune && !cpu) ++ return NULL; ++ ++ sysctlbyname("hw.cpufamily", &family, &len, NULL, 0); ++ ++ switch (family) ++ { ++ case 0x07d34b9f: // Vortex, Tempest ++ res = "apple-a12"; ++ break; ++ case 0x573b5eec: ++ case 0x1b588bb3: // Firestorm, Icestorm ++ res = "apple-m1"; ++ break; ++ case 0xda33d83d: // Blizzard, Avalanche ++ res = "apple-m2"; ++ break; ++ case 0xfa33415e: // Ibiza (M3) ++ case 0x5f4dea93: // Lobos (M3 Pro) ++ case 0x72015832: // Palma (M3 Max) ++ res = "apple-m3"; ++ break; ++ default: ++ res = DEFAULT_ARCH; ++ } ++ ++ if (res) ++ return concat ("-m", argv[0], "=", res, NULL); ++ else ++ return NULL; ++} ++ ++#else ++ + struct aarch64_arch_extension + { + const char *ext; +@@ -458,3 +526,4 @@ not_found: + } + } + ++#endif +diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.c b/gcc/config/aarch64/falkor-tag-collision-avoidance.c +index de214e4a0f7..c3e1d6f10f2 100644 +--- a/gcc/config/aarch64/falkor-tag-collision-avoidance.c ++++ b/gcc/config/aarch64/falkor-tag-collision-avoidance.c +@@ -740,7 +740,7 @@ dump_insn_list (const rtx &t, const insn_info_list_t &insn_info, + void *unused ATTRIBUTE_UNUSED) + { + gcc_assert (dump_file); +- fprintf (dump_file, "Tag 0x%lx ::\n", INTVAL (t)); ++ fprintf (dump_file, "Tag 0x" HOST_WIDE_INT_PRINT_HEX_PURE " ::\n", INTVAL (t)); + + for (unsigned i = 0; i < insn_info.length (); i++) + dump_insn_slim (dump_file, insn_info[i]->insn); +diff --git a/gcc/config/aarch64/host-aarch64-darwin.c b/gcc/config/aarch64/host-aarch64-darwin.c +new file mode 100644 +index 00000000000..d70f2df3bf1 +--- /dev/null ++++ b/gcc/config/aarch64/host-aarch64-darwin.c +@@ -0,0 +1,33 @@ ++/* aarch64/arm64-darwin host-specific hook definitions. ++ ++Copyright The GNU Toolchain Authors. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. ++ ++GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++WARRANTY; without even the implied warranty of MERCHANTABILITY or ++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++#define IN_TARGET_CODE 1 ++ ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" ++#include "config/host-darwin.h" ++ ++/* Darwin doesn't do anything special for arm64/aarch64 hosts; this file ++ exists just to include the generic config/host-darwin.h. */ ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; +diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md +index ad37741aff8..d2a42c7d985 100644 +--- a/gcc/config/aarch64/iterators.md ++++ b/gcc/config/aarch64/iterators.md +@@ -292,6 +292,11 @@ + ;; TX plus V16QImode. + (define_mode_iterator TX_V16QI [TI TF V16QI]) + ++;; Duplicate of TX above ++(define_mode_iterator TX2 [TI TF]) ++ ++(define_mode_iterator VTX [TI TF V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF]) ++ + ;; Advanced SIMD opaque structure modes. + (define_mode_iterator VSTRUCT [OI CI XI]) + +diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md +index 49f02ae0381..e2af7bfc08d 100644 +--- a/gcc/config/aarch64/predicates.md ++++ b/gcc/config/aarch64/predicates.md +@@ -257,9 +257,24 @@ + (define_predicate "aarch64_prefetch_operand" + (match_test "aarch64_address_valid_for_prefetch_p (op, false)")) + ++(define_predicate "aarch64_unscaled_prefetch_operand" ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, false)")) ++ + (define_predicate "aarch64_valid_symref" + (match_code "const, symbol_ref, label_ref") + { ++ if (TARGET_MACHO) ++ { ++ rtx x = op; ++ rtx offset; ++ split_const (x, &x, &offset); ++ if (GET_CODE (x) == CONST) ++ x = XEXP (x, 0); ++ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SALT_ADDR) ++ x = XVECEXP (x, 0, 0); ++ if (SYMBOL_REF_P (x) && INTVAL (offset) < 0) ++ return false; ++ } + return (aarch64_classify_symbolic_expression (op) + != SYMBOL_FORCE_TO_MEM); + }) +diff --git a/gcc/config/aarch64/t-aarch64-darwin b/gcc/config/aarch64/t-aarch64-darwin +new file mode 100644 +index 00000000000..e2b8ad9237f +--- /dev/null ++++ b/gcc/config/aarch64/t-aarch64-darwin +@@ -0,0 +1,25 @@ ++# Machine description for AArch64 architecture. ++# Copyright (C) 2020 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range ++ ++# TODO - figure out what multilib provisions we should make for ++# a) arm64e ++# b) arm64_32 +diff --git a/gcc/config/aarch64/x-darwin b/gcc/config/aarch64/x-darwin +new file mode 100644 +index 00000000000..6d788d5e89c +--- /dev/null ++++ b/gcc/config/aarch64/x-darwin +@@ -0,0 +1,3 @@ ++host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c ++ $(COMPILE) $< ++ $(POSTCOMPILE) +diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c +index 3a250dfb960..4d29e80dcc9 100644 +--- a/gcc/config/avr/avr.c ++++ b/gcc/config/avr/avr.c +@@ -10221,10 +10221,9 @@ avr_output_bss_section_asm_op (const void *data) + /* Unnamed section callback for progmem*.data sections. */ + + static void +-avr_output_progmem_section_asm_op (const void *data) ++avr_output_progmem_section_asm_op (const char *data) + { +- fprintf (asm_out_file, "\t.section\t%s,\"a\",@progbits\n", +- (const char*) data); ++ fprintf (asm_out_file, "\t.section\t%s,\"a\",@progbits\n", data); + } + + +diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c +index 8c9c9171dec..f6b37c62cbb 100644 +--- a/gcc/config/darwin-c.c ++++ b/gcc/config/darwin-c.c +@@ -555,7 +555,7 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp) + return 0; + } + +-/* Given an OS X version VERSION_STR, return it as a statically-allocated array ++/* Given an macOS version VERSION_STR, return it as a statically-allocated array + of three integers. If VERSION_STR is invalid, return NULL. + + VERSION_STR must consist of one, two, or three tokens, each separated by +@@ -612,7 +612,7 @@ parse_version (const char *version_str) + return version_array; + } + +-/* Given VERSION -- a three-component OS X version represented as an array of ++/* Given VERSION -- a three-component macOS version represented as an array of + non-negative integers -- return a statically-allocated string suitable for + the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. If VERSION + is invalid and cannot be coerced into a valid form, return NULL. +@@ -645,7 +645,7 @@ version_as_legacy_macro (const unsigned long *version) + return result; + } + +-/* Given VERSION -- a three-component OS X version represented as an array of ++/* Given VERSION -- a three-component macOS version represented as an array of + non-negative integers -- return a statically-allocated string suitable for + the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. If VERSION + is invalid, return NULL. +@@ -675,7 +675,7 @@ version_as_modern_macro (const unsigned long *version) + + /* Return the value of darwin_macosx_version_min, suitably formatted for the + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. Values representing +- OS X 10.9 and earlier are encoded using the legacy four-character format, ++ macOS 10.9 and earlier are encoded using the legacy four-character format, + while 10.10 and later use a modern six-character format. (For example, + "10.9" produces "1090", and "10.10.1" produces "101001".) If + darwin_macosx_version_min is invalid and cannot be coerced into a valid +diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c +index 61cbdff089f..4e34236b91b 100644 +--- a/gcc/config/darwin-driver.c ++++ b/gcc/config/darwin-driver.c +@@ -144,7 +144,7 @@ darwin_find_version_from_kernel (void) + if (sysctl (osversion_name, ARRAY_SIZE (osversion_name), osversion, + &osversion_len, NULL, 0) == -1) + { +- warning (0, "sysctl for kern.osversion failed: %m"); ++ warning (0, "% for % failed: %m"); + return NULL; + } + +@@ -183,7 +183,7 @@ darwin_find_version_from_kernel (void) + return new_flag; + + parse_failed: +- warning (0, "couldn%'t understand kern.osversion %q.*s", ++ warning (0, "could not understand % %q.*s", + (int) osversion_len, osversion); + return NULL; + } +@@ -223,7 +223,7 @@ darwin_default_min_version (void) + const char *checked = validate_macosx_version_min (new_flag); + if (checked == NULL) + { +- warning (0, "could not understand version %s", new_flag); ++ warning (0, "could not understand version %qs", new_flag); + return NULL; + } + new_flag = xstrndup (checked, strlen (checked)); +@@ -268,10 +268,13 @@ darwin_driver_init (unsigned int *decoded_options_count, + bool seenX86_64 = false; + bool seenPPC = false; + bool seenPPC64 = false; ++#if !DARWIN_ARM64 ++ bool seenArm64 = false; + bool seenM32 = false; + bool seenM64 = false; + bool appendM32 = false; + bool appendM64 = false; ++#endif + const char *vers_string = NULL; + bool seen_version_min = false; + bool seen_sysroot_p = false; +@@ -296,8 +299,14 @@ darwin_driver_init (unsigned int *decoded_options_count, + seenPPC = true; + else if (!strcmp ((*decoded_options)[i].arg, "ppc64")) + seenPPC64 = true; ++ else if (!strcmp ((*decoded_options)[i].arg, "arm64")) ++#if !DARWIN_ARM64 ++ seenArm64 = true; ++#else ++ ; /* We accept the option, but don't need to act on it. */ ++#endif + else +- error ("this compiler does not support %s", ++ error ("this compiler does not support %qs", + (*decoded_options)[i].arg); + /* Now we've examined it, drop the -arch arg. */ + if (*decoded_options_count > i) { +@@ -309,7 +318,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + --i; + --*decoded_options_count; + break; +- ++#if !DARWIN_ARM64 + case OPT_m32: + seenM32 = true; + break; +@@ -317,6 +326,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + case OPT_m64: + seenM64 = true; + break; ++#endif + + case OPT_mmacosx_version_min_: + seen_version_min = true; +@@ -359,53 +369,75 @@ darwin_driver_init (unsigned int *decoded_options_count, + /* Turn -arch xxxx into the appropriate -m32/-m64 flag. + If the User tried to specify multiple arch flags (which is possible with + some Darwin compilers) warn that this mode is not supported by this +- compiler (and ignore the arch flags, which means that the default multi- +- lib will be generated). */ ++ compiler. We take arch specifiers that agree with the default multilib ++ as the first choice and reject others. */ + /* TODO: determine if these warnings would better be errors. */ + #if DARWIN_X86 + if (seenPPC || seenPPC64) +- warning (0, "this compiler does not support PowerPC (arch flags ignored)"); ++ warning (0, "this compiler does not support PowerPC" ++ " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenX86) + { + if (seenX86_64 || seenM64) +- warning (0, "%s conflicts with i386 (arch flags ignored)", +- (seenX86_64? "x86_64": "m64")); +- else if (! seenM32) /* Add -m32 if the User didn't. */ ++ { ++ const char *op = (seenX86_64? "-arch x86_64": "-m64"); ++ warning (0, "%qs conflicts with %<-arch i386%> (%qs ignored)", ++ op, op); ++ } ++ if (! seenM32) /* Add -m32 if the User didn't. */ + appendM32 = true; + } + else if (seenX86_64) + { +- if (seenX86 || seenM32) +- warning (0, "%s conflicts with x86_64 (arch flags ignored)", +- (seenX86? "i386": "m32")); +- else if (! seenM64) /* Add -m64 if the User didn't. */ ++ if (seenM32) ++ warning (0, "%<-m32%> conflicts with %<-arch x86_64%>" ++ " (%<-m32%> ignored)"); ++ if (! seenM64) /* Add -m64 if the User didn't. */ + appendM64 = true; + } + #elif DARWIN_PPC + if (seenX86 || seenX86_64) +- warning (0, "this compiler does not support X86 (arch flags ignored)"); ++ warning (0, "this compiler does not support x86" ++ " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenPPC) + { + if (seenPPC64 || seenM64) +- warning (0, "%s conflicts with ppc (arch flags ignored)", +- (seenPPC64? "ppc64": "m64")); +- else if (! seenM32) /* Add -m32 if the User didn't. */ ++ { ++ const char *op = (seenPPC64? "-arch ppc64": "-m64"); ++ warning (0, "%qs conflicts with %<-arch ppc%> (%qs ignored)", ++ op, op); ++ } ++ if (! seenM32) /* Add -m32 if the User didn't. */ + appendM32 = true; + } + else if (seenPPC64) + { +- if (seenPPC || seenM32) +- warning (0, "%s conflicts with ppc64 (arch flags ignored)", +- (seenPPC? "ppc": "m32")); +- else if (! seenM64) /* Add -m64 if the User didn't. */ ++ if (seenM32) ++ warning (0, "%<-m32%> conflicts with %<-arch ppc64%>" ++ " (%<-m32%> ignored)"); ++ if (! seenM64) /* Add -m64 if the User didn't. */ + appendM64 = true; + } ++#elif DARWIN_ARM64 ++ if (seenPPC || seenPPC64) ++ warning (0, "this compiler does not support PowerPC" ++ " (%<-arch%> option ignored)"); ++ if (seenX86 || seenX86_64) ++ warning (0, "this compiler does not support x86" ++ " (%<-arch%> option ignored)"); + #endif + + /* If there is nothing else on the command line, do not add sysroot etc. */ + if (*decoded_options_count <= 1) + return; + ++#if !DARWIN_ARM64 + if (appendM32 || appendM64) + { + ++*decoded_options_count; +@@ -415,6 +447,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER, + &(*decoded_options)[*decoded_options_count - 1]); + } ++#endif + + if (!seen_sysroot_p) + { +@@ -432,7 +465,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + } + } + +- /* We will need to know the OS X version we're trying to build for here ++ /* We will need to know the macOS version we're trying to build for here + so that we can figure out the mechanism and source for the sysroot to + be used. */ + if (!seen_version_min) +diff --git a/gcc/config/darwin-protos.h b/gcc/config/darwin-protos.h +index 440e76ead42..216b9fb572f 100644 +--- a/gcc/config/darwin-protos.h ++++ b/gcc/config/darwin-protos.h +@@ -86,9 +86,12 @@ extern void darwin_asm_lto_end (void); + extern void darwin_mark_decl_preserved (const char *); + + extern tree darwin_handle_kext_attribute (tree *, tree, tree, int, bool *); +-extern tree darwin_handle_weak_import_attribute (tree *node, tree name, +- tree args, int flags, +- bool * no_add_attrs); ++extern tree darwin_handle_weak_import_attribute (tree *, tree, tree, int, ++ bool *); ++extern tree darwin_handle_availability_attribute (tree *, tree, tree, ++ int, bool *); ++extern bool darwin_attribute_takes_identifier_p (const_tree); ++ + extern void machopic_output_stub (FILE *, const char *, const char *); + extern void darwin_globalize_label (FILE *, const char *); + extern void darwin_assemble_visibility (tree, int); +@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfstring_table (tree); + extern void darwin_asm_output_anchor (rtx symbol); + extern bool darwin_use_anchors_for_symbol_p (const_rtx symbol); + extern bool darwin_kextabi_p (void); ++extern bool darwin_unreachable_traps_p (void); + extern void darwin_override_options (void); + extern void darwin_patch_builtins (void); + extern void darwin_rename_builtins (void); +diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c +index 465e8075dfd..308fb06309b 100644 +--- a/gcc/config/darwin.c ++++ b/gcc/config/darwin.c +@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see + #include "cfghooks.h" + #include "df.h" + #include "memmodel.h" ++#include "c-family/c-common.h" /* enum rid. */ + #include "tm_p.h" + #include "stringpool.h" + #include "attribs.h" +@@ -42,10 +43,14 @@ along with GCC; see the file COPYING3. If not see + #include "explow.h" + #include "expr.h" + #include "langhooks.h" ++#include "targhooks.h" + #include "toplev.h" + #include "lto-section-names.h" + #include "intl.h" + #include "optabs.h" ++#include "flags.h" ++#include "opts.h" ++//#include "c-family/c-objc.h" /* for objc_method_decl(). */ + + /* Fix and Continue. + +@@ -99,6 +104,7 @@ int darwin_running_cxx; + + /* Some code-gen now depends on OS major version numbers (at least). */ + int generating_for_darwin_version ; ++unsigned long current_os_version = 0; + + /* For older linkers we need to emit special sections (marked 'coalesced') for + for weak or single-definition items. */ +@@ -128,7 +134,7 @@ struct { + section * darwin_sections[NUM_DARWIN_SECTIONS]; + + /* While we transition to using in-tests instead of ifdef'd code. */ +-#if !HAVE_lo_sum ++#if !HAVE_lo_sum || DARWIN_ARM64 + #define gen_macho_high(m,a,b) (a) + #define gen_macho_low(m,a,b,c) (a) + #endif +@@ -144,7 +150,7 @@ int emit_aligned_common = false; + DIRECTIVE is as for output_section_asm_op. */ + + static void +-output_objc_section_asm_op (const void *directive) ++output_objc_section_asm_op (const char *directive) + { + static bool been_here = false; + +@@ -268,6 +274,45 @@ name_needs_quotes (const char *name) + return 0; + } + ++DEBUG_FUNCTION void ++dump_machopic_symref_flags (FILE *dump, rtx sym_ref) ++{ ++ unsigned long flags = SYMBOL_REF_FLAGS (sym_ref); ++ ++ fprintf (dump, "flags: %08lx %c%c%c%c%c%c%c", ++ flags, ++ (MACHO_SYMBOL_STATIC_P (sym_ref) ? 's' : '-'), ++ (MACHO_SYMBOL_INDIRECTION_P (sym_ref) ? 'I' : '-'), ++ (MACHO_SYMBOL_LINKER_VIS_P (sym_ref) ? 'l' : '-'), ++ (MACHO_SYMBOL_HIDDEN_VIS_P (sym_ref) ? 'h' : '-'), ++ (MACHO_SYMBOL_DEFINED_P (sym_ref) ? 'd' : '-'), ++ (MACHO_SYMBOL_MUST_INDIRECT_P (sym_ref) ? 'i' : '-'), ++ (MACHO_SYMBOL_VARIABLE_P (sym_ref) ? 'v' : '-')); ++ ++#if (DARWIN_X86) ++ fprintf (dump, "%c%c%c%c", ++ (SYMBOL_REF_STUBVAR_P (sym_ref) ? 'S' : '-'), ++ (SYMBOL_REF_DLLEXPORT_P (sym_ref) ? 'X' : '-'), ++ (SYMBOL_REF_DLLIMPORT_P (sym_ref) ? 'I' : '-'), ++ (SYMBOL_REF_FAR_ADDR_P (sym_ref) ? 'F' : '-')); ++#endif ++ ++ fprintf (dump, "%c%c%c%03u%c%c%c\n", ++ (SYMBOL_REF_ANCHOR_P (sym_ref) ? 'a' : '-'), ++ (SYMBOL_REF_HAS_BLOCK_INFO_P (sym_ref) ? 'b' : '-'), ++ (SYMBOL_REF_EXTERNAL_P (sym_ref) ? 'e' : '-'), ++ (unsigned)SYMBOL_REF_TLS_MODEL (sym_ref), ++ (SYMBOL_REF_SMALL_P (sym_ref) ? 'm' : '-'), ++ (SYMBOL_REF_LOCAL_P (sym_ref) ? 'l' : '-'), ++ (SYMBOL_REF_FUNCTION_P (sym_ref) ? 'f' : '-')); ++} ++ ++DEBUG_FUNCTION void ++debug_machopic_symref_flags (rtx sym_ref) ++{ ++ dump_machopic_symref_flags (stderr, sym_ref); ++} ++ + /* Return true if SYM_REF can be used without an indirection. */ + int + machopic_symbol_defined_p (rtx sym_ref) +@@ -1062,6 +1107,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) + return pic_ref; + } + ++#if !DARWIN_ARM64 + /* Callbacks to output the stub or non-lazy pointers. + Each works on the item in *SLOT,if it has been used. + DATA is the FILE* for assembly output. +@@ -1217,6 +1263,7 @@ machopic_finish (FILE *asm_out_file) + machopic_indirections->traverse_noresize + (asm_out_file); + } ++#endif + + int + machopic_operand_p (rtx op) +@@ -2153,6 +2200,122 @@ darwin_handle_kext_attribute (tree *node, tree name, + return NULL_TREE; + } + ++enum version_components { MAJOR, MINOR, TINY }; ++ ++/* Parse a version number in x.y.z form and validate it as a macOS ++ version. Ideally, we'd put this in a common place usable by the ++ Darwin backend. */ ++ ++static bool ++parse_version (unsigned version_array[3], const char *version_str) ++{ ++ size_t version_len; ++ char *end, last = '\0', delimiter = '.', alt_delim = '_'; ++ ++ if (!version_str) ++ return false; ++ ++ /* Handle the odd situation in which we get STRING_CST which contain the ++ starting and ending quotes. */ ++ if (version_str[0] == '"') ++ { ++ version_str++; ++ version_len = strrchr (&version_str[1], '"') - version_str; ++ last = '"'; ++ } ++ else ++ version_len = strlen (version_str); ++ ++ if (version_len < 1) ++ return false; ++ ++ /* Version string must consist of digits and periods only. */ ++ if (strspn (version_str, "0123456789._") != version_len) ++ return false; ++ ++ if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1])) ++ return false; ++ ++ version_array[MAJOR] = strtoul (version_str, &end, 10); ++ if (*end == '_') ++ { ++ delimiter = '_'; ++ alt_delim = '.'; ++ } ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MAJOR] == 100000) ++ return true; ++ if (version_array[MAJOR] > 99) ++ return false; ++ ++ /* Version string must not contain adjacent delimiters. */ ++ if (*version_str == delimiter || *version_str == alt_delim) ++ return false; ++ ++ version_array[MINOR] = strtoul (version_str, &end, 10); ++ if (*end == alt_delim) ++ return false; ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MINOR] > 99) ++ return false; ++ ++ version_array[TINY] = strtoul (version_str, &end, 10); ++ if (version_array[TINY] > 99) ++ return false; ++ ++ /* Version string must contain no more than three tokens. */ ++ if (*end != last) ++ return false; ++ ++ return true; ++} ++ ++/* Turn a version expressed as maj.min.tiny into an unsigned long ++ integer representing the value used in macOS availability macros. */ ++ ++static unsigned long ++version_from_version_array (unsigned vers[3]) ++{ ++ unsigned long res = 0; ++ /* There seems to be a special "unknown" value. */ ++ if (vers[0] == 100000) ++ return 999999; ++ ++ /* Here, we follow the 'modern' / 'legacy' numbering scheme for versions. */ ++ if (vers[0] > 10 || vers[1] >= 10) ++ res = vers[0] * 10000 + vers[1] * 100 + vers[2]; ++ else ++ { ++ res = vers[0] * 100; ++ if (vers[1] > 9) ++ res += 90; ++ else ++ res += vers[1] * 10; ++ if (vers[2] > 9) ++ res += 9; ++ else ++ res += vers[1]; ++ } ++ return res; ++} ++ ++/* Extract a macOS version from an availability attribute argument. */ ++ ++static unsigned long ++os_version_from_avail_value (tree value) ++{ ++ unsigned long res = 0; ++ unsigned vers[3] = {0,0,0}; ++ if (TREE_CODE (value) == STRING_CST) ++ { ++ if (parse_version (&vers[0], TREE_STRING_POINTER (value))) ++ res = version_from_version_array (&vers[0]); ++ } ++ else ++ gcc_unreachable (); ++ return res; ++} ++ + /* Handle a "weak_import" attribute; arguments as in + struct attribute_spec.handler. */ + +@@ -2174,6 +2337,231 @@ darwin_handle_weak_import_attribute (tree *node, tree name, + return NULL_TREE; + } + ++#define NUM_AV_OSES 13 ++const char *availability_os[NUM_AV_OSES] ++ = { "macos", "macosx", "ios", "tvos", "watchos", "driverkit", "swift", ++ "maccatalyst", "macCatalyst", "xros", "visionos", "android", "zos" }; ++ ++#define NUM_AV_CLAUSES 6 ++const char *availability_clause[NUM_AV_CLAUSES] ++ = { "unavailable", "introduced", "deprecated", "obsoleted", "message", ++ "replacement" }; ++ ++/* Validate and act upon the arguments to an 'availability' attribute. */ ++ ++tree ++darwin_handle_availability_attribute (tree *node, tree name, tree args, ++ int flags, bool * no_add_attrs) ++{ ++ tree decl = *node; ++ *no_add_attrs = true; ++ ++ if (!decl || (!TYPE_P (decl) && !DECL_P (decl))) ++ { ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ else if (decl == error_mark_node) ++ return NULL_TREE; ++ ++ location_t loc = DECL_SOURCE_LOCATION (decl); ++ if (args == NULL_TREE) ++ { ++ error_at (loc, "%qE attribute requires at least one argument", ++ name); ++ return NULL_TREE; ++ } ++ else if (args == error_mark_node) ++ return NULL_TREE; ++ ++ /* The first argument must name a supported OS - although we could choose ++ to ignore any OS we don't recognise. */ ++ gcc_checking_assert (TREE_CODE (args) == TREE_LIST); ++ tree platform = TREE_VALUE (args); ++ if (platform == error_mark_node) ++ return NULL_TREE; ++ ++ gcc_checking_assert (TREE_CODE (platform) == IDENTIFIER_NODE); ++ bool platform_ok = false; ++ unsigned plat_num = 0; ++ for (; plat_num < (unsigned) NUM_AV_OSES; plat_num++) ++ if (strcmp (availability_os[plat_num], IDENTIFIER_POINTER (platform)) == 0) ++ { ++ platform_ok = true; ++ break; ++ } ++ if (!platform_ok) ++ { ++ error_at (input_location, ++ "platform %qE is not recognised for the % " ++ "attribute", platform); ++ return NULL_TREE; ++ } ++ else if (plat_num > 1) /* We only compile for macos so far. */ ++ return NULL_TREE; ++ ++ /* We might be dealing with an object or type. */ ++ tree target_decl = NULL_TREE; ++ tree type = NULL_TREE; ++ bool warn = false; ++ if (DECL_P (*node)) ++ { ++ type = TREE_TYPE (decl); ++ ++ if (TREE_CODE (decl) == TYPE_DECL ++ || TREE_CODE (decl) == PARM_DECL ++ || VAR_OR_FUNCTION_DECL_P (decl) ++ || TREE_CODE (decl) == FIELD_DECL ++ || TREE_CODE (decl) == CONST_DECL ++ /*|| objc_method_decl (TREE_CODE (decl))*/) ++ target_decl = decl; ++ else ++ warn = true; ++ } ++ else if (TYPE_P (*node)) ++ type = target_decl = *node; ++ else ++ warn = true; ++ ++ tree what = NULL_TREE; ++ if (warn) ++ { ++ if (type && TYPE_NAME (type)) ++ { ++ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (*node); ++ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (type))) ++ what = DECL_NAME (TYPE_NAME (type)); ++ } ++ if (what) ++ warning (OPT_Wattributes, "%qE attribute ignored for %qE", name, what); ++ else ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ ++ /* Now we have to parse the availability clauses. */ ++ tree msg = NULL_TREE; ++ tree replacement = NULL_TREE; ++ bool unavailable = false; ++ unsigned introduced = 1000; ++ unsigned deprecated = current_os_version + 1; ++ unsigned obsoleted = current_os_version + 1; ++ for (tree arg = TREE_CHAIN (args); arg; arg = TREE_CHAIN (arg)) ++ { ++ tree clause_name = TREE_VALUE (arg); ++ tree clause_value = TREE_PURPOSE (arg); ++ if (clause_name == error_mark_node ++ || clause_value == error_mark_node) ++ continue; ++ unsigned clause_num = 0; ++ for (; clause_num < (unsigned) NUM_AV_CLAUSES; clause_num++) ++ if (strcmp (availability_clause[clause_num], ++ IDENTIFIER_POINTER (clause_name)) == 0) ++ break; ++ switch (clause_num) ++ { ++ default: ++ error_at (input_location, ++ "clause %qE is not recognised for the % " ++ "attribute", clause_name); ++ break; ++ case 0: ++ unavailable = true; ++ break; ++ case 1: ++ case 2: ++ case 3: ++ if (!clause_value) ++ error_at (input_location, "%<%E=%> requires a value", clause_name); ++ else ++ { ++ unsigned version = os_version_from_avail_value (clause_value); ++ if (version == 0) ++ error_at (input_location, "the value %qE provided to %qE is " ++ "not a valid OS version", clause_value, clause_name); ++ else if (clause_num == 1) ++ introduced = version; ++ else if (clause_num == 2) ++ deprecated = version; ++ else if (clause_num == 3) ++ obsoleted = version; ++ } ++ break; ++ case 4: ++ case 5: ++ if (!clause_value || TREE_CODE (clause_value) != STRING_CST) ++ error_at (input_location, "%<%E=%> requires a string", clause_name); ++ else if (clause_num == 4) ++ msg = clause_value; ++ else ++ replacement = clause_value; ++ break; ++ } ++ } ++ /* Now figure out what to do. */ ++ tree maybe_text = NULL_TREE; ++ if (replacement) ++ maybe_text = tree_cons (NULL_TREE, replacement, NULL_TREE); ++ else if (msg) ++ maybe_text = tree_cons (NULL_TREE, msg, NULL_TREE); ++ ++ if (unavailable || current_os_version >= obsoleted) ++ { ++ TREE_UNAVAILABLE (*node) = true; ++ /* We do not handle the availability attribute at diagnostics-time, so ++ if we want the informational messages, then attach them to additional ++ attributes for the deprecation or unavailability. TODO; maybe we can ++ fabricate the composite here. */ ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("unavailable"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version > deprecated) ++ { ++ TREE_DEPRECATED (*node) = true; ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("deprecated"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version < introduced) ++ *no_add_attrs = false; ++ return NULL_TREE; ++} ++ ++bool ++darwin_attribute_takes_identifier_p (const_tree attr_id) ++{ ++ return is_attribute_p ("availability", attr_id); ++} ++ + /* Emit a label for an FDE, making it global and/or weak if appropriate. + The third parameter is nonzero if this is for exception handling. + The fourth parameter is nonzero if this is just a placeholder for an +@@ -2265,6 +2653,8 @@ darwin_emit_except_table_label (FILE *file) + rtx + darwin_make_eh_symbol_indirect (rtx orig, bool ARG_UNUSED (pubvis)) + { ++ if (DARWIN_ARM64) ++ return orig; + if (DARWIN_PPC == 0 && TARGET_64BIT) + return orig; + +@@ -3113,7 +3503,12 @@ darwin_file_end (void) + fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags); + } + ++#if !DARWIN_ARM64 + machopic_finish (asm_out_file); ++#else ++ gcc_checking_assert (!machopic_indirections); ++#endif ++ + if (flag_apple_kext) + { + /* These sections are only used for kernel code. */ +@@ -3289,6 +3684,13 @@ darwin_kextabi_p (void) { + return flag_apple_kext; + } + ++/* True, iff we want to map __builtin_unreachable to a trap. */ ++ ++bool ++darwin_unreachable_traps_p (void) { ++ return darwin_unreachable_traps; ++} ++ + void + darwin_override_options (void) + { +@@ -3309,7 +3711,14 @@ darwin_override_options (void) + generating_for_darwin_version = 8; + + /* Earlier versions are not specifically accounted, until required. */ ++ unsigned vers[3] = {0,0,0}; ++ if (!parse_version (vers, darwin_macosx_version_min)) ++ error_at (UNKNOWN_LOCATION, "how did we get a bad OS version? (%s)", ++ darwin_macosx_version_min); ++ current_os_version = version_from_version_array (vers); + } ++ else ++ current_os_version = 1058; + + /* Some codegen needs to account for the capabilities of the target + linker. */ +@@ -3423,10 +3832,10 @@ darwin_override_options (void) + + /* Disable -freorder-blocks-and-partition when unwind tables are being + emitted for Darwin < 9 (OSX 10.5). +- The strategy is, "Unless the User has specifically set/unset an unwind ++ The strategy is, "Unless the user has specifically set/unset an unwind + flag we will switch off -freorder-blocks-and-partition when unwind tables +- will be generated". If the User specifically sets flags... we assume +- (s)he knows why... */ ++ will be generated". If the user specifically sets flags, we have to ++ assume they know why. */ + if (generating_for_darwin_version < 9 + && global_options_set.x_flag_reorder_blocks_and_partition + && ((global_options.x_flag_exceptions /* User, c++, java */ +diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h +index 1fded756c60..f75600d6e32 100644 +--- a/gcc/config/darwin.h ++++ b/gcc/config/darwin.h +@@ -1,4 +1,4 @@ +-/* Target definitions for Darwin (Mac OS X) systems. ++/* Target definitions for Darwin (macOS) systems. + Copyright (C) 1989-2021 Free Software Foundation, Inc. + Contributed by Apple Computer Inc. + +@@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define CONFIG_DARWIN_H + + /* The definitions in this file are common to all processor types +- running Darwin, which is the kernel for Mac OS X. Darwin is ++ running Darwin, which is the kernel for macOS. Darwin is + basically a BSD user layer laid over a Mach kernel, then evolved + for many years (at NeXT) in parallel with other Unix systems. So + while the runtime is a somewhat idiosyncratic Mach-based thing, +@@ -42,6 +42,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #define DARWIN_X86 0 + #define DARWIN_PPC 0 ++#define DARWIN_ARM64 0 ++ ++#define OBJECT_FORMAT_MACHO 1 + + /* Suppress g++ attempt to link in the math library automatically. */ + #define MATH_LIBRARY "" +@@ -269,19 +272,37 @@ extern GTY(()) int darwin_ms_struct; + "%= 10.5 mmacosx-version-min= -pie) }} " ++ :%:version-compare(>= 10.5 mmacosx-version-min= -pie) }; \ ++ mdynamic-no-pic:%:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } " + + #define DARWIN_NOPIE_SPEC \ + "%{no-pie|fno-pie|fno-PIE: \ +@@ -290,6 +311,35 @@ extern GTY(()) int darwin_ms_struct; + #define DARWIN_CC1_SPEC \ + "% 10.11 mmacosx-version-min= -lgcc_s.1.1)" ++# define DARWIN_SHARED_WEAK_ADDS \ ++"%{%:version-compare(>= 10.11 mmacosx-version-min= -lemutls_w): \ ++ " DARWIN_HEAP_T_LIB "}" ++#endif ++ ++ ++/* We might elect to add a path even when this compiler does not use embedded ++ run paths, so that we can use libraries from an alternate compiler that is ++ using embedded runpaths. */ ++#if DARWIN_DO_EXTRA_RPATH ++# define DARWIN_EXTRA_RPATH \ ++"%{!r:%{!nostdlib:%{!nodefaultrpaths:\ ++ %:version-compare(>= 10.5 mmacosx-version-min= -rpath) \ ++ %:version-compare(>= 10.5 mmacosx-version-min= " DARWIN_ADD_RPATH ") \ ++ }}}" ++#else ++# define DARWIN_EXTRA_RPATH "" ++#endif ++ + #define SUBSUBTARGET_OVERRIDE_OPTIONS \ + do { \ + darwin_override_options (); \ +@@ -323,7 +373,8 @@ extern GTY(()) int darwin_ms_struct; + */ + + #define DARWIN_NOCOMPACT_UNWIND \ +-" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) " ++"%{!fuse-ld=lld: \ ++ %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}" + + /* In Darwin linker specs we can put -lcrt0.o and ld will search the library + path for crt0.o or -lcrtx.a and it will search for for libcrtx.a. As for +@@ -343,10 +394,14 @@ extern GTY(()) int darwin_ms_struct; + #define LINK_COMMAND_SPEC_A \ + "%{!c:%{!E:%{!S:%{!M:%{!MM:%{!fsyntax-only:%{!fdump=*: \ + %(linker)" \ ++ DARWIN_LD_DEMANGLE \ + LINK_PLUGIN_SPEC \ + "%{flto*:% 10.6 mmacosx-version-min= -lgcc_eh); \ + shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ +- %:version-compare(!> 10.11 mmacosx-version-min= -lgcc_s.1.1) \ ++ " DARWIN_SHARED_LIBGCC " \ + %:version-compare(!> 10.3.9 mmacosx-version-min= -lgcc_eh) \ + %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ +@@ -512,10 +568,11 @@ extern GTY(()) int darwin_ms_struct; + + #define DARWIN_WEAK_CRTS \ + "%{static-libgcc|static: \ +- %:version-compare(>= 10.6 mmacosx-version-min= -lemutls_w) ; \ +- shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ +- %:version-compare(>= 10.11 mmacosx-version-min= -lemutls_w) ; \ +- : -lemutls_w \ ++ %{%:version-compare(>= 10.6 mmacosx-version-min= -lemutls_w): \ ++ " DARWIN_HEAP_T_LIB "} ; \ ++ shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: " \ ++ DARWIN_SHARED_WEAK_ADDS " ; \ ++ : -lemutls_w " DARWIN_HEAP_T_LIB " \ + }" + + /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ +@@ -546,7 +603,8 @@ extern GTY(()) int darwin_ms_struct; + { "darwin_crt2", DARWIN_CRT2_SPEC }, \ + { "darwin_crt3", DARWIN_CRT3_SPEC }, \ + { "darwin_dylib1", DARWIN_DYLIB1_SPEC }, \ +- { "darwin_bundle1", DARWIN_BUNDLE1_SPEC }, ++ { "darwin_bundle1", DARWIN_BUNDLE1_SPEC }, \ ++ { "darwin_rpaths", DARWIN_RPATH_SPEC }, + + #define DARWIN_CRT1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ +@@ -572,6 +630,16 @@ extern GTY(()) int darwin_ms_struct; + "%{!static:%:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \ + %{fgnu-tm: -lcrttms.o}}" + ++#if DARWIN_AT_RPATH ++/* A default rpath, that picks up dependent libraries installed in the same ++ director as one being loaded. */ ++#define DARWIN_RPATH_SPEC \ ++ "%:version-compare(>= 10.5 mmacosx-version-min= -rpath) \ ++ %{%:version-compare(>= 10.5 mmacosx-version-min= @loader_path): %P }" ++#else ++#define DARWIN_RPATH_SPEC "" ++#endif ++ + #ifdef HAVE_AS_MMACOSX_VERSION_MIN_OPTION + /* Emit macosx version (but only major). */ + #define ASM_MMACOSX_VERSION_MIN_SPEC \ +@@ -943,7 +1011,12 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; + { "apple_kext_compatibility", 0, 0, false, true, false, false, \ + darwin_handle_kext_attribute, NULL }, \ + { "weak_import", 0, 0, true, false, false, false, \ +- darwin_handle_weak_import_attribute, NULL } ++ darwin_handle_weak_import_attribute, NULL }, \ ++ { "availability", 0, -1, true, false, false, false, \ ++ darwin_handle_availability_attribute, NULL } ++ ++#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P ++#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P darwin_attribute_takes_identifier_p + + /* Make local constant labels linker-visible, so that if one follows a + weak_global constant, ld64 will be able to separate the atoms. */ +@@ -1191,6 +1264,10 @@ void add_framework_path (char *); + #define TARGET_N_FORMAT_TYPES 1 + #define TARGET_FORMAT_TYPES darwin_additional_format_types + ++/* We want __builtin_unreachable to be expanded as a trap instruction. */ ++#undef TARGET_UNREACHABLE_SHOULD_TRAP ++#define TARGET_UNREACHABLE_SHOULD_TRAP darwin_unreachable_traps_p ++ + #ifndef USED_FOR_TARGET + extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **); + #define GCC_DRIVER_HOST_INITIALIZATION \ +diff --git a/gcc/config/darwin.opt b/gcc/config/darwin.opt +index 91c05166b3e..1f2d7a86938 100644 +--- a/gcc/config/darwin.opt ++++ b/gcc/config/darwin.opt +@@ -91,6 +91,10 @@ mtarget-linker + Target RejectNegative Joined Separate Var(darwin_target_linker) Init(LD64_VERSION) + -mtarget-linker Specify that ld64 is the toolchain linker for the current invocation. + ++munreachable-traps ++Target Var(darwin_unreachable_traps) Init(1) ++When set (the default) this makes __builtin_unreachable render as a trap. ++ + ; Driver options. + + all_load +@@ -241,6 +245,10 @@ nodefaultexport + Driver RejectNegative + Do not add a default symbol exports to modules or dynamic libraries. + ++nodefaultrpaths ++Driver RejectNegative ++Do not add default run paths (for the compiler library directories) to executables, modules or dynamic libraries. ++ + nofixprebinding + Driver RejectNegative + (Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an executable. +diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +index 14a01fe71f2..b5787671545 100644 +--- a/gcc/config/host-darwin.c ++++ b/gcc/config/host-darwin.c +@@ -20,62 +20,164 @@ + #include "config.h" + #include "system.h" + #include "coretypes.h" ++#include "options.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" +- +-/* Yes, this is really supposed to work. */ +-/* This allows for a pagesize of 16384, which we have on Darwin20, but should +- continue to work OK for pagesize 4096 which we have on earlier versions. +- The size is 1 (binary) Gb. */ +-static char pch_address_space[65536*16384] __attribute__((aligned (16384))); +- +-/* Return the address of the PCH address space, if the PCH will fit in it. */ ++#include ++ ++/* For Darwin (macOS only) platforms, without ASLR (PIE) enabled on the ++ binaries, the following VM addresses are expected to be available. ++ NOTE, that for aarch64, ASLR is always enabled - but the VM address ++ mentioned below is available (at least on Darwin20). ++ ++ The spaces should all have 512Mb available c.f. PCH files for large ++ C++ or Objective-C in the range of 150Mb for 64b hosts. ++ ++ We also try to steer clear of places already used for sanitizers. ++ ++ If the allocation fails at the 'ideal' address, we go with what the ++ kernel provides (there is more likelihood that we will need to relocate ++ on read in). */ ++ ++#define PAGE_SZ 4096 ++#if defined(__x86_64) && defined(__LP64__) ++# define TRY_EMPTY_VM_SPACE 0x180000000000ULL ++#elif defined(__x86_64) ++# define TRY_EMPTY_VM_SPACE 0x00006fe00000ULL ++#elif defined(__i386) ++# define TRY_EMPTY_VM_SPACE 0x00006fe00000ULL ++#elif defined(__POWERPC__) && defined(__LP64__) ++# define TRY_EMPTY_VM_SPACE 0x180000000000ULL ++#elif defined(__POWERPC__) ++# define TRY_EMPTY_VM_SPACE 0x00006fe00000ULL ++#elif defined(__aarch64__) ++# undef PAGE_SZ ++# define PAGE_SZ 16384 ++# define TRY_EMPTY_VM_SPACE 0x180000000000ULL ++#else ++# error "unknown Darwin target" ++#endif ++ ++/* Try to map a known position in the VM. The current PCH implementation ++ can adjust values at write-time, but not at read-time thus we need to ++ pick up the same position when reading as we got at write-time. */ + + void * +-darwin_gt_pch_get_address (size_t sz, int fd ATTRIBUTE_UNUSED) ++darwin_gt_pch_get_address (size_t sz, int fd) + { +- if (sz <= sizeof (pch_address_space)) +- return pch_address_space; +- else +- return NULL; ++ /* First try with the constraint that we really want this address... */ ++ void *addr = mmap ((void *)TRY_EMPTY_VM_SPACE, sz, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_FIXED, fd, 0); ++ ++ if (addr != (void *) MAP_FAILED) ++ munmap (addr, sz); ++ ++ /* This ought to be the only alternative to failure, but there are comments ++ that suggest some versions of mmap can be buggy and return a different ++ value. */ ++ if (addr == (void *) TRY_EMPTY_VM_SPACE) ++ return addr; ++ ++ /* OK try to find a space without the constraint. */ ++ addr = mmap ((void *) TRY_EMPTY_VM_SPACE, sz, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE, fd, 0); ++ ++ /* We return whatever the kernel gave us. */ ++ if (addr != (void *) MAP_FAILED) ++ { ++ /* Unmap the area before returning. */ ++ munmap (addr, sz); ++ return addr; ++ } ++ ++ /* Otherwise, try again but put some arbitrary buffer space first. */ ++ size_t buffer_size = 64 * 1024 * 1024; ++ void *buffer = mmap (0, buffer_size, PROT_NONE, ++ MAP_PRIVATE | MAP_ANON, -1, 0); ++ addr = mmap ((void *)TRY_EMPTY_VM_SPACE, sz, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE, fd, 0); ++ ++ if (buffer != (void *) MAP_FAILED) ++ munmap (buffer, buffer_size); ++ ++ /* If we failed this time, that means there is *no* large enough free ++ space. */ ++ if (addr == (void *) MAP_FAILED) ++ { ++ error ("PCH memory not available %m"); ++ return NULL; ++ } ++ ++ munmap (addr, sz); ++ return addr; + } + +-/* Check ADDR and SZ for validity, and deallocate (using munmap) that part of +- pch_address_space beyond SZ. */ ++/* Try to mmap the PCH file at ADDR for SZ bytes at OFF offset in the file. ++ If we succeed return 1, if we cannot mmap the desired address, then we ++ fail with -1. */ + + int +-darwin_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off) ++darwin_gt_pch_use_address (void *&addr, size_t sz, int fd, size_t off) + { +- const size_t pagesize = getpagesize(); +- void *mmap_result; +- int ret; ++ void *mapped_addr; ++ ++ /* We're called with size == 0 if we're not planning to load a PCH ++ file at all. This allows the hook to free any static space that ++ we might have allocated at link time. */ ++ if (sz == 0) ++ return -1; + +- gcc_assert ((size_t)pch_address_space % pagesize == 0 +- && sizeof (pch_address_space) % pagesize == 0); +- +- ret = (addr == pch_address_space && sz <= sizeof (pch_address_space)); +- if (! ret) +- sz = 0; ++ gcc_checking_assert (!(off % PAGE_SZ)); + +- /* Round the size to a whole page size. Normally this is a no-op. */ +- sz = (sz + pagesize - 1) / pagesize * pagesize; ++ /* Try to map the file with MAP_PRIVATE and FIXED. */ ++ mapped_addr = mmap (addr, sz, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_FIXED, fd, (off_t) off); + +- if (munmap (pch_address_space + sz, sizeof (pch_address_space) - sz) != 0) +- fatal_error (input_location, +- "could not unmap %: %m"); ++ /* Hopefully, we succeed. */ ++ if (mapped_addr == addr) ++ return 1; + +- if (ret) ++ /* In theory, the only alternative to success for MAP_FIXED should be FAILED ++ however, there are some buggy earlier implementations that could return ++ an address. */ ++ if (mapped_addr != (void *) MAP_FAILED) ++ munmap (mapped_addr, sz); ++ ++ /* Try to map the file with MAP_PRIVATE but let the kernel move it. */ ++ mapped_addr = mmap (addr, sz, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE, fd, (off_t) off); ++ ++ /* Hopefully, we succeed. */ ++ if (mapped_addr != (void *) MAP_FAILED) + { +- mmap_result = mmap (addr, sz, +- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, +- fd, off); ++ addr = mapped_addr; ++ return 1; ++ } + +- /* The file might not be mmap-able. */ +- ret = mmap_result != (void *) MAP_FAILED; ++ /* Try to make an anonymous private mmap at the desired location in case ++ the problem is in mapping the file. */ ++ mapped_addr = mmap (addr, sz, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_ANON, -1, (off_t)0); ++ ++ /* If this fails, we are out of ideas (and maybe memory). */ ++ if (mapped_addr == (void *) MAP_FAILED) ++ return -1; ++ ++ addr = mapped_addr; ++ ++ if (lseek (fd, off, SEEK_SET) == (off_t) -1) ++ return -1; ++ ++ while (sz) ++ { ++ ssize_t nbytes; + +- /* Sanity check for broken MAP_FIXED. */ +- gcc_assert (!ret || mmap_result == addr); ++ nbytes = read (fd, addr, MIN (sz, (size_t) -1 >> 1)); ++ if (nbytes <= 0) ++ return -1; ++ addr = (char *) addr + nbytes; ++ sz -= nbytes; + } + +- return ret; ++ return 1; + } +diff --git a/gcc/config/host-darwin.h b/gcc/config/host-darwin.h +index 4acae9cf341..f3a477e8837 100644 +--- a/gcc/config/host-darwin.h ++++ b/gcc/config/host-darwin.h +@@ -18,7 +18,7 @@ + . */ + + extern void * darwin_gt_pch_get_address (size_t sz, int fd); +-extern int darwin_gt_pch_use_address (void *addr, size_t sz, int fd, ++extern int darwin_gt_pch_use_address (void *&addr, size_t sz, int fd, + size_t off); + + #undef HOST_HOOKS_GT_PCH_GET_ADDRESS +diff --git a/gcc/config/host-hpux.c b/gcc/config/host-hpux.c +index 6009810d732..796f501ebfb 100644 +--- a/gcc/config/host-hpux.c ++++ b/gcc/config/host-hpux.c +@@ -24,7 +24,7 @@ + #include "hosthooks-def.h" + + static void *hpux_gt_pch_get_address (size_t, int); +-static int hpux_gt_pch_use_address (void *, size_t, int, size_t); ++static int hpux_gt_pch_use_address (void *&, size_t, int, size_t); + + #undef HOST_HOOKS_GT_PCH_GET_ADDRESS + #define HOST_HOOKS_GT_PCH_GET_ADDRESS hpux_gt_pch_get_address +@@ -78,7 +78,7 @@ hpux_gt_pch_get_address (size_t size, int fd) + little else we can do given the current PCH implementation. */ + + static int +-hpux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) ++hpux_gt_pch_use_address (void *&base, size_t size, int fd, size_t offset) + { + void *addr; + +diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c +index 34945f14019..0481ecff3f2 100644 +--- a/gcc/config/host-linux.c ++++ b/gcc/config/host-linux.c +@@ -181,7 +181,7 @@ linux_gt_pch_get_address (size_t size, int fd) + little else we can do given the current PCH implementation. */ + + static int +-linux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) ++linux_gt_pch_use_address (void *&base, size_t size, int fd, size_t offset) + { + void *addr; + +@@ -204,24 +204,22 @@ linux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) + addr = mmap (base, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + +- if (addr != base) +- { +- if (addr != (void *) MAP_FAILED) +- munmap (addr, size); +- return -1; +- } ++ if (addr == (void *) MAP_FAILED) ++ return -1; + + if (lseek (fd, offset, SEEK_SET) == (off_t)-1) + return -1; + ++ base = addr; ++ + while (size) + { + ssize_t nbytes; + +- nbytes = read (fd, base, MIN (size, (size_t)-1 >> 1)); ++ nbytes = read (fd, addr, MIN (size, (size_t)-1 >> 1)); + if (nbytes <= 0) + return -1; +- base = (char *) base + nbytes; ++ addr = (char *) addr + nbytes; + size -= nbytes; + } + +diff --git a/gcc/config/host-netbsd.c b/gcc/config/host-netbsd.c +index 818ecb2d0cb..32f86c83bb2 100644 +--- a/gcc/config/host-netbsd.c ++++ b/gcc/config/host-netbsd.c +@@ -66,7 +66,7 @@ netbsd_gt_pch_get_address (size_t size, int fd) + mapping the data at BASE, -1 if we couldn't. */ + + static int +-netbsd_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) ++netbsd_gt_pch_use_address (void *&base, size_t size, int fd, size_t offset) + { + void *addr; + +diff --git a/gcc/config/host-openbsd.c b/gcc/config/host-openbsd.c +index c5f8944a62c..f7b90432b55 100644 +--- a/gcc/config/host-openbsd.c ++++ b/gcc/config/host-openbsd.c +@@ -66,7 +66,7 @@ openbsd_gt_pch_get_address (size_t size, int fd) + mapping the data at BASE, -1 if we couldn't. */ + + static int +-openbsd_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) ++openbsd_gt_pch_use_address (void *&base, size_t size, int fd, size_t offset) + { + void *addr; + +diff --git a/gcc/config/host-solaris.c b/gcc/config/host-solaris.c +index 556e9cf649c..b08cf513ec5 100644 +--- a/gcc/config/host-solaris.c ++++ b/gcc/config/host-solaris.c +@@ -105,7 +105,7 @@ sol_gt_pch_get_address (size_t size, int fd) + mapping the data at BASE, -1 if we couldn't. */ + + static int +-sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) ++sol_gt_pch_use_address (void *&base, size_t size, int fd, size_t offset) + { + void *addr; + +diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h +index 7c2211ffaff..966499cad6d 100644 +--- a/gcc/config/i386/darwin.h ++++ b/gcc/config/i386/darwin.h +@@ -131,6 +131,9 @@ along with GCC; see the file COPYING3. If not see + /* We default to x86_64 for single-arch builds, bi-arch overrides. */ + #define DARWIN_ARCH_SPEC "x86_64" + ++#undef DARWIN_HEAP_T_LIB ++#define DARWIN_HEAP_T_LIB " -lheapt_w " ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ +@@ -336,3 +339,14 @@ along with GCC; see the file COPYING3. If not see + #undef SUBTARGET_SHADOW_OFFSET + #define SUBTARGET_SHADOW_OFFSET \ + (TARGET_LP64 ? HOST_WIDE_INT_1 << 44 : HOST_WIDE_INT_1 << 29) ++ ++#undef CLEAR_INSN_CACHE ++#define CLEAR_INSN_CACHE(beg, end) \ ++ extern void sys_icache_invalidate(void *start, size_t len); \ ++ sys_icache_invalidate ((beg), (size_t)((end)-(beg))) ++ ++/* Disable custom function descriptors for Darwin when we have off-stack ++ trampolines. */ ++#undef X86_CUSTOM_FUNCTION_TEST ++#define X86_CUSTOM_FUNCTION_TEST \ ++ (flag_trampolines && flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ? 0 : 1 +diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c +index 360a280b23a..a182563bf27 100644 +--- a/gcc/config/i386/host-mingw32.c ++++ b/gcc/config/i386/host-mingw32.c +@@ -32,7 +32,7 @@ + #include + + static void * mingw32_gt_pch_get_address (size_t, int); +-static int mingw32_gt_pch_use_address (void *, size_t, int, size_t); ++static int mingw32_gt_pch_use_address (void *&, size_t, int, size_t); + static size_t mingw32_gt_pch_alloc_granularity (void); + + #undef HOST_HOOKS_GT_PCH_GET_ADDRESS +@@ -118,7 +118,7 @@ mingw32_gt_pch_get_address (size_t size, int) + if the memory is allocated but the data not loaded, return 1 if done. */ + + static int +-mingw32_gt_pch_use_address (void *addr, size_t size, int fd, ++mingw32_gt_pch_use_address (void *&addr, size_t size, int fd, + size_t offset) + { + void * mmap_addr; +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index e2d259d5638..00761004d84 100644 +--- a/gcc/config/i386/i386.c ++++ b/gcc/config/i386/i386.c +@@ -23916,7 +23916,7 @@ ix86_run_selftests (void) + #define TARGET_HARD_REGNO_SCRATCH_OK ix86_hard_regno_scratch_ok + + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 1 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS X86_CUSTOM_FUNCTION_TEST + + #undef TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID + #define TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID ix86_addr_space_zero_address_valid +diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h +index 910994c6dd2..b5eb9896dd3 100644 +--- a/gcc/config/i386/i386.h ++++ b/gcc/config/i386/i386.h +@@ -955,6 +955,12 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + /* Minimum allocation boundary for the code of a function. */ + #define FUNCTION_BOUNDARY 8 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define X86_CUSTOM_FUNCTION_TEST 1 ++ + /* C++ stores the virtual bit in the lowest bit of function pointers. */ + #define TARGET_PTRMEMFUNC_VBIT_LOCATION ptrmemfunc_vbit_in_pfn + +diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c +index dd26e295993..8b61b9ac7e0 100644 +--- a/gcc/config/pa/pa.c ++++ b/gcc/config/pa/pa.c +@@ -10011,7 +10011,7 @@ pa_arg_partial_bytes (cumulative_args_t cum_v, const function_arg_info &arg) + to the default text subspace. */ + + static void +-som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) ++som_output_text_section_asm_op (const char *data ATTRIBUTE_UNUSED) + { + gcc_assert (TARGET_SOM); + if (TARGET_GAS) +@@ -10055,7 +10055,7 @@ som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) + sections. This function is only used with SOM. */ + + static void +-som_output_comdat_data_section_asm_op (const void *data) ++som_output_comdat_data_section_asm_op (const char *data) + { + in_section = NULL; + output_section_asm_op (data); +diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h +index e80dd7c77b6..bd1789791b3 100644 +--- a/gcc/config/rs6000/darwin.h ++++ b/gcc/config/rs6000/darwin.h +@@ -113,6 +113,9 @@ + -lSystem \ + }" + ++#undef DARWIN_HEAP_T_LIB ++#define DARWIN_HEAP_T_LIB " " ++ + /* We want -fPIC by default, unless we're using -static to compile for + the kernel or some such. The "-faltivec" option should have been + called "-maltivec" all along. */ +diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c +index a02f4c1b61e..6b6aff9f0a8 100644 +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -20233,7 +20233,7 @@ rs6000_ms_bitfield_layout_p (const_tree record_type) + /* A get_unnamed_section callback, used for switching to toc_section. */ + + static void +-rs6000_elf_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED) ++rs6000_elf_output_toc_section_asm_op (const char *data ATTRIBUTE_UNUSED) + { + if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2) + && TARGET_MINIMAL_TOC) +@@ -20937,35 +20937,39 @@ rs6000_xcoff_asm_globalize_label (FILE *stream, const char *name) + points to the section string variable. */ + + static void +-rs6000_xcoff_output_readonly_section_asm_op (const void *directive) ++rs6000_xcoff_output_readonly_section_asm_op (const char *directive) + { + fprintf (asm_out_file, "\t.csect %s[RO],%s\n", +- *(const char *const *) directive, ++ directive ++ ? xcoff_private_rodata_section_name ++ : xcoff_read_only_section_name, + XCOFF_CSECT_DEFAULT_ALIGNMENT_STR); + } + + /* Likewise for read-write sections. */ + + static void +-rs6000_xcoff_output_readwrite_section_asm_op (const void *directive) ++rs6000_xcoff_output_readwrite_section_asm_op (const char *) + { + fprintf (asm_out_file, "\t.csect %s[RW],%s\n", +- *(const char *const *) directive, ++ xcoff_private_data_section_name, + XCOFF_CSECT_DEFAULT_ALIGNMENT_STR); + } + + static void +-rs6000_xcoff_output_tls_section_asm_op (const void *directive) ++rs6000_xcoff_output_tls_section_asm_op (const char *directive) + { + fprintf (asm_out_file, "\t.csect %s[TL],%s\n", +- *(const char *const *) directive, ++ directive ++ ? xcoff_private_data_section_name ++ : xcoff_tls_data_section_name, + XCOFF_CSECT_DEFAULT_ALIGNMENT_STR); + } + + /* A get_unnamed_section callback, used for switching to toc_section. */ + + static void +-rs6000_xcoff_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED) ++rs6000_xcoff_output_toc_section_asm_op (const char *data ATTRIBUTE_UNUSED) + { + if (TARGET_MINIMAL_TOC) + { +@@ -20992,26 +20996,26 @@ rs6000_xcoff_asm_init_sections (void) + { + read_only_data_section + = get_unnamed_section (0, rs6000_xcoff_output_readonly_section_asm_op, +- &xcoff_read_only_section_name); ++ NULL); + + private_data_section + = get_unnamed_section (SECTION_WRITE, + rs6000_xcoff_output_readwrite_section_asm_op, +- &xcoff_private_data_section_name); ++ NULL); + + read_only_private_data_section + = get_unnamed_section (0, rs6000_xcoff_output_readonly_section_asm_op, +- &xcoff_private_rodata_section_name); ++ ""); + + tls_data_section + = get_unnamed_section (SECTION_TLS, + rs6000_xcoff_output_tls_section_asm_op, +- &xcoff_tls_data_section_name); ++ NULL); + + tls_private_data_section + = get_unnamed_section (SECTION_TLS, + rs6000_xcoff_output_tls_section_asm_op, +- &xcoff_private_data_section_name); ++ ""); + + toc_section + = get_unnamed_section (0, rs6000_xcoff_output_toc_section_asm_op, NULL); +diff --git a/gcc/configure b/gcc/configure +index 86f44a35f42..614259630cd 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -632,10 +632,10 @@ ac_includes_default="\ + ac_subst_vars='LTLIBOBJS + LIBOBJS + CET_HOST_FLAGS +-NO_PIE_FLAG +-NO_PIE_CFLAGS +-enable_default_pie ++LD_PICFLAG + PICFLAG ++enable_default_pie ++enable_host_pie + enable_host_shared + enable_plugin + pluginlibs +@@ -732,11 +732,15 @@ ORIGINAL_NM_FOR_TARGET + gcc_cv_nm + ORIGINAL_LD_GOLD_FOR_TARGET + ORIGINAL_LD_BFD_FOR_TARGET ++ORIGINAL_CLASSIC_LD_FOR_TARGET ++ORIGINAL_LLD_FOR_TARGET + ORIGINAL_LD_FOR_TARGET + ORIGINAL_PLUGIN_LD_FOR_TARGET + gcc_cv_ld + ORIGINAL_AS_FOR_TARGET + gcc_cv_as ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_fast_install + objdir + OTOOL64 +@@ -996,6 +1000,8 @@ enable_static + with_pic + enable_fast_install + enable_libtool_lock ++enable_darwin_at_rpath ++with_darwin_extra_rpath + enable_ld + enable_gold + with_plugin_ld +@@ -1021,6 +1027,7 @@ enable_link_serialization + enable_version_specific_runtime_libs + enable_plugin + enable_host_shared ++enable_host_pie + enable_libquadmath_support + with_linker_hash_style + with_diagnostics_color +@@ -1729,6 +1736,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-gnu-indirect-function +@@ -1783,6 +1793,7 @@ Optional Features: + in a compiler-specific directory + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --disable-libquadmath-support + disable libquadmath support for Fortran + --enable-default-pie enable Position Independent Executable as default +@@ -1846,6 +1857,9 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-darwin-extra-rpath=[ARG] ++ Specify a runpath directory, additional to those ++ provided by the compiler + --with-plugin-ld=[ARG] specify the plugin linker + --with-glibc-version=M.N + assume GCC used with glibc version M.N or later +@@ -3744,20 +3758,19 @@ gcc_gxx_libcxx_include_dir= + + # Check whether --with-gxx-libcxx-include-dir was given. + if test "${with_gxx_libcxx_include_dir+set}" = set; then : +- withval=$with_gxx_libcxx_include_dir; case "${withval}" in +-yes) as_fn_error $? "bad value ${withval} given for libc++ include directory" "$LINENO" 5 ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac ++ withval=$with_gxx_libcxx_include_dir; gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir + fi + + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -3765,16 +3778,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. + gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. ++ gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[1-9]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -15935,7 +15952,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -17640,6 +17657,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -17657,9 +17717,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -19446,7 +19510,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19449 "configure" ++#line 19513 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -19552,7 +19616,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19555 "configure" ++#line 19619 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -20428,6 +20492,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -20445,12 +20552,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -22801,6 +22916,35 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++DARWIN_DO_EXTRA_RPATH=0 ++ ++# Check whether --with-darwin-extra-rpath was given. ++if test "${with_darwin_extra_rpath+set}" = set; then : ++ withval=$with_darwin_extra_rpath; if test x"$withval" != x; then ++ DARWIN_ADD_RPATH="$withval" ++ DARWIN_DO_EXTRA_RPATH=1 ++ fi ++fi ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define DARWIN_DO_EXTRA_RPATH $DARWIN_DO_EXTRA_RPATH ++_ACEOF ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define DARWIN_ADD_RPATH "$DARWIN_ADD_RPATH" ++_ACEOF ++ ++ + # Identify the assembler which will work hand-in-glove with the newly + # built GCC, so that we can examine its features. This is the assembler + # which will be driven by the driver program. +@@ -23111,6 +23255,14 @@ fi + $as_echo "$gold_non_default" >&6; } + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic ++ ++ + + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; +@@ -30736,6 +30888,7 @@ if test x"$ld64_flag" = x"yes"; then + # Set defaults for possibly untestable items. + gcc_cv_ld64_export_dynamic=0 + gcc_cv_ld64_platform_version=0 ++ gcc_cv_ld64_demangle=0 + + if test "$build" = "$host"; then + darwin_try_test=1 +@@ -30759,6 +30912,9 @@ $as_echo_n "checking ld64 specified version... " >&6; } + gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_major" >&5 + $as_echo "$gcc_cv_ld64_major" >&6; } ++ if test "$gcc_cv_ld64_major" -ge 97; then ++ gcc_cv_ld64_demangle=1 ++ fi + if test "$gcc_cv_ld64_major" -ge 236; then + gcc_cv_ld64_export_dynamic=1 + fi +@@ -30776,6 +30932,15 @@ $as_echo_n "checking linker version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_version" >&5 + $as_echo "$gcc_cv_ld64_version" >&6; } + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -demangle support" >&5 ++$as_echo_n "checking linker for -demangle support... " >&6; } ++ gcc_cv_ld64_demangle=1 ++ if $gcc_cv_ld -demangle < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then ++ gcc_cv_ld64_demangle=0 ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_demangle" >&5 ++$as_echo "$gcc_cv_ld64_demangle" >&6; } ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -export_dynamic support" >&5 + $as_echo_n "checking linker for -export_dynamic support... " >&6; } + gcc_cv_ld64_export_dynamic=1 +@@ -30804,6 +30969,12 @@ _ACEOF + fi + + ++cat >>confdefs.h <<_ACEOF ++#define LD64_HAS_DEMANGLE $gcc_cv_ld64_demangle ++_ACEOF ++ ++ ++ + cat >>confdefs.h <<_ACEOF + #define LD64_HAS_EXPORT_DYNAMIC $gcc_cv_ld64_export_dynamic + _ACEOF +@@ -32254,14 +32425,18 @@ fi + # Check that we can build shared objects with -fPIC -shared + saved_LDFLAGS="$LDFLAGS" + saved_CFLAGS="$CFLAGS" ++ saved_CXXFLAGS="$CXXFLAGS" + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` + CFLAGS="$CFLAGS -fPIC" ++ CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g` ++ CXXFLAGS="$CXXFLAGS -fPIC" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) + CFLAGS="$CFLAGS -fPIC" ++ CXXFLAGS="$CXXFLAGS -fPIC" + LDFLAGS="$LDFLAGS -fPIC -shared" + ;; + esac +@@ -32293,6 +32468,7 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + LDFLAGS="$saved_LDFLAGS" + CFLAGS="$saved_CFLAGS" ++ CXXFLAGS="$saved_CXXFLAGS" + + # If plugin support had been requested but not available, fail. + if test x"$enable_plugin" = x"no" ; then +@@ -32316,13 +32492,17 @@ fi + # Enable --enable-host-shared + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC +-else +- PICFLAG= ++ enableval=$enable_host_shared; + fi + + + ++# Enable --enable-host-pie ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ + + + # Check whether --enable-libquadmath-support was given. +@@ -32476,10 +32656,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_no_fpie" >&5 + $as_echo "$gcc_cv_c_no_fpie" >&6; } +-if test "$gcc_cv_c_no_fpie" = "yes"; then +- NO_PIE_CFLAGS="-fno-PIE" +-fi +- + + # Check if -no-pie works. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -no-pie option" >&5 +@@ -32504,11 +32680,28 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_no_pie" >&5 + $as_echo "$gcc_cv_no_pie" >&6; } +-if test "$gcc_cv_no_pie" = "yes"; then +- NO_PIE_FLAG="-no-pie" ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++elif test x$gcc_cv_c_no_fpie = xyes; then ++ PICFLAG=-fno-PIE ++else ++ PICFLAG= ++fi ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++elif test x$gcc_cv_no_pie = xyes; then ++ LD_PICFLAG=-no-pie ++else ++ LD_PICFLAG= + fi + + ++ ++ + # Enable Intel CET on Intel CET enabled host if jit is enabled. + # Check whether --enable-cet was given. + if test "${enable_cet+set}" = set; then : +@@ -32962,6 +33155,10 @@ LTLIBOBJS=$ac_ltlibobjs + + + ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/gcc/configure.ac b/gcc/configure.ac +index a4d5bdb1b8d..db2f29967db 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -234,18 +234,17 @@ gcc_gxx_libcxx_include_dir= + AC_ARG_WITH(gxx-libcxx-include-dir, + [AS_HELP_STRING([--with-gxx-libcxx-include-dir=DIR], + [specifies directory to find libc++ header files])], +-[case "${withval}" in +-yes) AC_MSG_ERROR(bad value ${withval} given for libc++ include directory) ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac]) ++[gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir]) + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -253,16 +252,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. ++ gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. + gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[[1-9]]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -2543,6 +2546,21 @@ AC_PROG_LIBTOOL + AC_SUBST(objdir) + AC_SUBST(enable_fast_install) + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++DARWIN_DO_EXTRA_RPATH=0 ++AC_ARG_WITH(darwin-extra-rpath, ++[AS_HELP_STRING( ++ [[--with-darwin-extra-rpath=[ARG]]], ++ [Specify a runpath directory, additional to those provided by the compiler])], ++[if test x"$withval" != x; then ++ DARWIN_ADD_RPATH="$withval" ++ DARWIN_DO_EXTRA_RPATH=1 ++ fi]) ++AC_DEFINE_UNQUOTED(DARWIN_DO_EXTRA_RPATH, $DARWIN_DO_EXTRA_RPATH, ++ [Should add an extra runpath directory]) ++AC_DEFINE_UNQUOTED(DARWIN_ADD_RPATH, "$DARWIN_ADD_RPATH", ++ [Specify a runpath directory, additional to those provided by the compiler]) ++ + # Identify the assembler which will work hand-in-glove with the newly + # built GCC, so that we can examine its features. This is the assembler + # which will be driven by the driver program. +@@ -2725,7 +2743,15 @@ fi + AC_MSG_RESULT($gold_non_default) + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic + AC_SUBST(ORIGINAL_LD_FOR_TARGET) ++AC_SUBST(ORIGINAL_LLD_FOR_TARGET) ++AC_SUBST(ORIGINAL_CLASSIC_LD_FOR_TARGET) + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; + *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; +@@ -4807,7 +4833,7 @@ foo: nop + gcc_cv_as_mllvm_x86_pad_for_align,, + [-mllvm -x86-pad-for-align=false], [.text],, + [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1, +- [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])]) ++ [Define if your macOS assembler supports -mllvm -x86-pad-for-align=false.])]) + ;; + esac + +@@ -6360,6 +6386,7 @@ if test x"$ld64_flag" = x"yes"; then + # Set defaults for possibly untestable items. + gcc_cv_ld64_export_dynamic=0 + gcc_cv_ld64_platform_version=0 ++ gcc_cv_ld64_demangle=0 + + if test "$build" = "$host"; then + darwin_try_test=1 +@@ -6381,6 +6408,9 @@ if test x"$ld64_flag" = x"yes"; then + AC_MSG_CHECKING(ld64 specified version) + gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'` + AC_MSG_RESULT($gcc_cv_ld64_major) ++ if test "$gcc_cv_ld64_major" -ge 97; then ++ gcc_cv_ld64_demangle=1 ++ fi + if test "$gcc_cv_ld64_major" -ge 236; then + gcc_cv_ld64_export_dynamic=1 + fi +@@ -6396,6 +6426,13 @@ if test x"$ld64_flag" = x"yes"; then + fi + AC_MSG_RESULT($gcc_cv_ld64_version) + ++ AC_MSG_CHECKING(linker for -demangle support) ++ gcc_cv_ld64_demangle=1 ++ if $gcc_cv_ld -demangle < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then ++ gcc_cv_ld64_demangle=0 ++ fi ++ AC_MSG_RESULT($gcc_cv_ld64_demangle) ++ + AC_MSG_CHECKING(linker for -export_dynamic support) + gcc_cv_ld64_export_dynamic=1 + if $gcc_cv_ld -export_dynamic < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then +@@ -6416,6 +6453,9 @@ if test x"$ld64_flag" = x"yes"; then + [Define to ld64 version.]) + fi + ++ AC_DEFINE_UNQUOTED(LD64_HAS_DEMANGLE, $gcc_cv_ld64_demangle, ++ [Define to 1 if ld64 supports '-demangle'.]) ++ + AC_DEFINE_UNQUOTED(LD64_HAS_EXPORT_DYNAMIC, $gcc_cv_ld64_export_dynamic, + [Define to 1 if ld64 supports '-export_dynamic'.]) + +@@ -7546,11 +7586,14 @@ fi + # Enable --enable-host-shared + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) + AC_SUBST(enable_host_shared) +-AC_SUBST(PICFLAG) + ++# Enable --enable-host-pie ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) + + AC_ARG_ENABLE(libquadmath-support, + [AS_HELP_STRING([--disable-libquadmath-support], +@@ -7672,10 +7715,6 @@ AC_CACHE_CHECK([for -fno-PIE option], + [gcc_cv_c_no_fpie=yes], + [gcc_cv_c_no_fpie=no]) + CXXFLAGS="$saved_CXXFLAGS"]) +-if test "$gcc_cv_c_no_fpie" = "yes"; then +- NO_PIE_CFLAGS="-fno-PIE" +-fi +-AC_SUBST([NO_PIE_CFLAGS]) + + # Check if -no-pie works. + AC_CACHE_CHECK([for -no-pie option], +@@ -7686,10 +7725,27 @@ AC_CACHE_CHECK([for -no-pie option], + [gcc_cv_no_pie=yes], + [gcc_cv_no_pie=no]) + LDFLAGS="$saved_LDFLAGS"]) +-if test "$gcc_cv_no_pie" = "yes"; then +- NO_PIE_FLAG="-no-pie" ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++elif test x$gcc_cv_c_no_fpie = xyes; then ++ PICFLAG=-fno-PIE ++else ++ PICFLAG= + fi +-AC_SUBST([NO_PIE_FLAG]) ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++elif test x$gcc_cv_no_pie = xyes; then ++ LD_PICFLAG=-no-pie ++else ++ LD_PICFLAG= ++fi ++ ++AC_SUBST([PICFLAG]) ++AC_SUBST([LD_PICFLAG]) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. + GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) +diff --git a/gcc/coretypes.h b/gcc/coretypes.h +index 732c76f5cbf..7c7c94c0cea 100644 +--- a/gcc/coretypes.h ++++ b/gcc/coretypes.h +@@ -198,6 +198,12 @@ enum tls_model { + TLS_MODEL_LOCAL_EXEC + }; + ++/* Types of trampoline implementation. */ ++enum trampoline_impl { ++ TRAMPOLINE_IMPL_STACK, ++ TRAMPOLINE_IMPL_HEAP ++}; ++ + /* Types of ABI for an offload compiler. */ + enum offload_abi { + OFFLOAD_ABI_UNSET, +@@ -442,8 +448,10 @@ enum optimize_size_level + }; + + /* Support for user-provided GGC and PCH markers. The first parameter +- is a pointer to a pointer, the second a cookie. */ +-typedef void (*gt_pointer_operator) (void *, void *); ++ is a pointer to a pointer, the second either NULL if the pointer to ++ pointer points into a GC object or the actual pointer address if ++ the first argument points to a temporary and the third a cookie. */ ++typedef void (*gt_pointer_operator) (void *, void *, void *); + + #if !defined (HAVE_UCHAR) + typedef unsigned char uchar; +diff --git a/gcc/cp/call.c b/gcc/cp/call.c +index fbe29f38384..141982b8ee0 100644 +--- a/gcc/cp/call.c ++++ b/gcc/cp/call.c +@@ -9430,7 +9430,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) + already_used = true; + } + else +- cp_warn_deprecated_use (fn, complain); ++ cp_handle_deprecated_or_unavailable (fn, complain); + + if (eliding_temp && DECL_BASE_CONSTRUCTOR_P (fn) + && !make_base_init_ok (arg)) +@@ -9507,7 +9507,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) + TREE_NO_WARNING (val) = 1; + } + +- cp_warn_deprecated_use (fn, complain); ++ cp_handle_deprecated_or_unavailable (fn, complain); + + return val; + } +diff --git a/gcc/cp/class.c b/gcc/cp/class.c +index 32667255a85..1bece8faf7e 100644 +--- a/gcc/cp/class.c ++++ b/gcc/cp/class.c +@@ -5769,6 +5769,7 @@ type_build_ctor_call (tree t) + tree fn = *iter; + if (!DECL_ARTIFICIAL (fn) + || TREE_DEPRECATED (fn) ++ || TREE_UNAVAILABLE (fn) + || DECL_DELETED_FN (fn)) + return true; + } +@@ -5797,6 +5798,7 @@ type_build_dtor_call (tree t) + tree fn = *iter; + if (!DECL_ARTIFICIAL (fn) + || TREE_DEPRECATED (fn) ++ || TREE_UNAVAILABLE (fn) + || DECL_DELETED_FN (fn)) + return true; + } +diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c +index 081b8347697..e2e681c3d49 100644 +--- a/gcc/cp/cp-lang.c ++++ b/gcc/cp/cp-lang.c +@@ -118,6 +118,15 @@ objcp_tsubst_copy_and_build (tree /*t*/, + return NULL_TREE; + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ cp_register_features (); ++} ++ + static const char * + cxx_dwarf_name (tree t, int verbosity) + { +diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c +index 382528341e1..cd1399eaec6 100644 +--- a/gcc/cp/cp-objcp-common.c ++++ b/gcc/cp/cp-objcp-common.c +@@ -23,9 +23,152 @@ along with GCC; see the file COPYING3. If not see + #include "coretypes.h" + #include "cp-tree.h" + #include "cp-objcp-common.h" ++#include "c-family/c-common.h" + #include "dwarf2.h" + #include "stringpool.h" + ++/* Class to determine whether a given C++ language feature is available. ++ Used to implement __has_{feature,extension}. */ ++ ++struct cp_feature_selector ++{ ++ enum ++ { ++ DIALECT, ++ FLAG ++ } kind; ++ ++ enum class result ++ { ++ NONE, ++ EXT, ++ FEAT ++ }; ++ ++ union ++ { ++ const int *enable_flag; ++ struct { ++ enum cxx_dialect feat; ++ enum cxx_dialect ext; ++ } dialect; ++ }; ++ ++ constexpr cp_feature_selector (const int *flag) ++ : kind (FLAG), enable_flag (flag) {} ++ constexpr cp_feature_selector (enum cxx_dialect feat, ++ enum cxx_dialect ext) ++ : kind (DIALECT), dialect{feat, ext} {} ++ constexpr cp_feature_selector (enum cxx_dialect feat) ++ : cp_feature_selector (feat, feat) {} ++ ++ inline result has_feature () const; ++}; ++ ++/* Check whether this language feature is available as a feature, ++ extension, or not at all. */ ++ ++cp_feature_selector::result ++cp_feature_selector::has_feature () const ++{ ++ switch (kind) ++ { ++ case DIALECT: ++ if (cxx_dialect >= dialect.feat) ++ return result::FEAT; ++ else if (cxx_dialect >= dialect.ext) ++ return result::EXT; ++ else ++ return result::NONE; ++ case FLAG: ++ return *enable_flag ? result::FEAT : result::NONE; ++ } ++ ++ gcc_unreachable (); ++} ++ ++/* Information about a C++ language feature which can be queried ++ through __has_{feature,extension}. IDENT is the name of the feature, ++ and SELECTOR encodes how to compute whether the feature is available. */ ++ ++struct cp_feature_info ++{ ++ const char *ident; ++ cp_feature_selector selector; ++}; ++ ++/* Table of features for __has_{feature,extension}. */ ++ ++static constexpr cp_feature_info cp_feature_table[] = ++{ ++ { "cxx_exceptions", &flag_exceptions }, ++ { "cxx_rtti", &flag_rtti }, ++ { "cxx_access_control_sfinae", { cxx11, cxx98 } }, ++ { "cxx_alias_templates", cxx11 }, ++ { "cxx_alignas", cxx11 }, ++ { "cxx_alignof", cxx11 }, ++ { "cxx_attributes", cxx11 }, ++ { "cxx_constexpr", cxx11 }, ++ { "cxx_decltype", cxx11 }, ++ { "cxx_decltype_incomplete_return_types", cxx11 }, ++ { "cxx_default_function_template_args", cxx11 }, ++ { "cxx_defaulted_functions", cxx11 }, ++ { "cxx_delegating_constructors", cxx11 }, ++ { "cxx_deleted_functions", cxx11 }, ++ { "cxx_explicit_conversions", cxx11 }, ++ { "cxx_generalized_initializers", cxx11 }, ++ { "cxx_implicit_moves", cxx11 }, ++ { "cxx_inheriting_constructors", cxx11 }, ++ { "cxx_inline_namespaces", { cxx11, cxx98 } }, ++ { "cxx_lambdas", cxx11 }, ++ { "cxx_local_type_template_args", cxx11 }, ++ { "cxx_noexcept", cxx11 }, ++ { "cxx_nonstatic_member_init", cxx11 }, ++ { "cxx_nullptr", cxx11 }, ++ { "cxx_override_control", cxx11 }, ++ { "cxx_reference_qualified_functions", cxx11 }, ++ { "cxx_range_for", cxx11 }, ++ { "cxx_raw_string_literals", cxx11 }, ++ { "cxx_rvalue_references", cxx11 }, ++ { "cxx_static_assert", cxx11 }, ++ { "cxx_thread_local", cxx11 }, ++ { "cxx_auto_type", cxx11 }, ++ { "cxx_strong_enums", cxx11 }, ++ { "cxx_trailing_return", cxx11 }, ++ { "cxx_unicode_literals", cxx11 }, ++ { "cxx_unrestricted_unions", cxx11 }, ++ { "cxx_user_literals", cxx11 }, ++ { "cxx_variadic_templates", { cxx11, cxx98 } }, ++ { "cxx_binary_literals", { cxx14, cxx98 } }, ++ { "cxx_contextual_conversions", { cxx14, cxx98 } }, ++ { "cxx_decltype_auto", cxx14 }, ++ { "cxx_aggregate_nsdmi", cxx14 }, ++ { "cxx_init_captures", { cxx14, cxx11 } }, ++ { "cxx_generic_lambdas", cxx14 }, ++ { "cxx_relaxed_constexpr", cxx14 }, ++ { "cxx_return_type_deduction", cxx14 }, ++ { "cxx_variable_templates", cxx14 }, ++ { "modules", &flag_modules }, ++}; ++ ++/* Register C++ language features for __has_{feature,extension}. */ ++ ++void ++cp_register_features () ++{ ++ using result = cp_feature_selector::result; ++ ++ for (unsigned i = 0; i < ARRAY_SIZE (cp_feature_table); i++) ++ { ++ const cp_feature_info *info = cp_feature_table + i; ++ const auto res = info->selector.has_feature (); ++ if (res == result::NONE) ++ continue; ++ ++ c_common_register_feature (info->ident, res == result::FEAT); ++ } ++} ++ + /* Special routine to get the alias set for C++. */ + + alias_set_type +diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h +index 53c6e4c2c88..9cf1dab6051 100644 +--- a/gcc/cp/cp-objcp-common.h ++++ b/gcc/cp/cp-objcp-common.h +@@ -34,6 +34,7 @@ extern tree cp_unit_size_without_reusable_padding (tree); + extern tree cp_get_global_decls (); + extern tree cp_pushdecl (tree); + extern void cp_register_dumps (gcc::dump_manager *); ++extern void cp_register_features (); + extern bool cp_handle_option (size_t, const char *, HOST_WIDE_INT, int, + location_t, const struct cl_option_handlers *); + extern tree cxx_make_type_hook (tree_code); +diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h +index 7e04a080f3a..07b5625541e 100644 +--- a/gcc/cp/cp-tree.h ++++ b/gcc/cp/cp-tree.h +@@ -6504,7 +6504,7 @@ extern void validate_conversion_obstack (void); + extern void mark_versions_used (tree); + extern int unsafe_return_slot_p (tree); + extern bool make_safe_copy_elision (tree, tree); +-extern bool cp_warn_deprecated_use (tree, tsubst_flags_t = tf_warning_or_error); ++extern bool cp_handle_deprecated_or_unavailable (tree, tsubst_flags_t = tf_warning_or_error); + extern void cp_warn_deprecated_use_scopes (tree); + extern tree get_function_version_dispatcher (tree); + +diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c +index 52088a480fe..cb3ddff511b 100644 +--- a/gcc/cp/decl.c ++++ b/gcc/cp/decl.c +@@ -2412,6 +2412,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool hiding, bool was_hidden) + if (TREE_DEPRECATED (newdecl)) + TREE_DEPRECATED (olddecl) = 1; + ++ /* Merge unavailability. */ ++ if (TREE_UNAVAILABLE (newdecl)) ++ TREE_UNAVAILABLE (olddecl) = 1; ++ + /* Preserve function specific target and optimization options */ + if (TREE_CODE (newdecl) == FUNCTION_DECL) + { +@@ -11831,20 +11835,24 @@ grokdeclarator (const cp_declarator *declarator, + if (attrlist && *attrlist == error_mark_node) + *attrlist = NULL_TREE; + +- /* An object declared as __attribute__((deprecated)) suppresses +- warnings of uses of other deprecated items. */ ++ /* An object declared as __attribute__((unavailable)) suppresses ++ any reports of being declared with unavailable or deprecated ++ items. An object declared as __attribute__((deprecated)) ++ suppresses warnings of uses of other deprecated items. */ + auto ds = make_temp_override (deprecated_state); +- if (attrlist && lookup_attribute ("deprecated", *attrlist)) ++ if (attrlist && lookup_attribute ("unavailable", *attrlist)) ++ deprecated_state = UNAVAILABLE_DEPRECATED_SUPPRESS; ++ else if (attrlist && lookup_attribute ("deprecated", *attrlist)) + deprecated_state = DEPRECATED_SUPPRESS; + +- cp_warn_deprecated_use (type); ++ cp_handle_deprecated_or_unavailable (type); + if (type && TREE_CODE (type) == TYPE_DECL) + { + cp_warn_deprecated_use_scopes (CP_DECL_CONTEXT (type)); + typedef_decl = type; + type = TREE_TYPE (typedef_decl); + if (DECL_ARTIFICIAL (typedef_decl)) +- cp_warn_deprecated_use (type); ++ cp_handle_deprecated_or_unavailable (type); + } + /* No type at all: default to `int', and set DEFAULTED_INT + because it was not a user-defined typedef. */ +@@ -14490,6 +14498,43 @@ type_is_deprecated (tree type) + return NULL_TREE; + } + ++/* Returns an unavailable type used within TYPE, or NULL_TREE if none. */ ++ ++static tree ++type_is_unavailable (tree type) ++{ ++ enum tree_code code; ++ if (TREE_UNAVAILABLE (type)) ++ return type; ++ if (TYPE_NAME (type)) ++ { ++ if (TREE_UNAVAILABLE (TYPE_NAME (type))) ++ return type; ++ else ++ { ++ cp_warn_deprecated_use_scopes (CP_DECL_CONTEXT (TYPE_NAME (type))); ++ return NULL_TREE; ++ } ++ } ++ ++ /* Do warn about using typedefs to a deprecated class. */ ++ if (OVERLOAD_TYPE_P (type) && type != TYPE_MAIN_VARIANT (type)) ++ return type_is_deprecated (TYPE_MAIN_VARIANT (type)); ++ ++ code = TREE_CODE (type); ++ ++ if (code == POINTER_TYPE || code == REFERENCE_TYPE ++ || code == OFFSET_TYPE || code == FUNCTION_TYPE ++ || code == METHOD_TYPE || code == ARRAY_TYPE) ++ return type_is_unavailable (TREE_TYPE (type)); ++ ++ if (TYPE_PTRMEMFUNC_P (type)) ++ return type_is_unavailable ++ (TREE_TYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (type)))); ++ ++ return NULL_TREE; ++} ++ + /* Decode the list of parameter types for a function type. + Given the list of things declared inside the parens, + return a list of types. +@@ -14549,11 +14594,18 @@ grokparms (tree parmlist, tree *parms) + + if (type != error_mark_node) + { +- if (deprecated_state != DEPRECATED_SUPPRESS) ++ if (deprecated_state != UNAVAILABLE_DEPRECATED_SUPPRESS) ++ { ++ tree unavailtype = type_is_unavailable (type); ++ if (unavailtype) ++ cp_handle_deprecated_or_unavailable (unavailtype); ++ } ++ if (deprecated_state != DEPRECATED_SUPPRESS ++ && deprecated_state != UNAVAILABLE_DEPRECATED_SUPPRESS) + { + tree deptype = type_is_deprecated (type); + if (deptype) +- cp_warn_deprecated_use (deptype); ++ cp_handle_deprecated_or_unavailable (deptype); + } + + /* [dcl.fct] "A parameter with volatile-qualified type is +diff --git a/gcc/cp/decl.h b/gcc/cp/decl.h +index 387d807a5cf..4a9b399730a 100644 +--- a/gcc/cp/decl.h ++++ b/gcc/cp/decl.h +@@ -44,7 +44,8 @@ extern void name_unnamed_type (tree, tree); + + enum deprecated_states { + DEPRECATED_NORMAL, +- DEPRECATED_SUPPRESS ++ DEPRECATED_SUPPRESS, ++ UNAVAILABLE_DEPRECATED_SUPPRESS + }; + + extern enum deprecated_states deprecated_state; +diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c +index 3ea37e0831f..a67d68ce7c7 100644 +--- a/gcc/cp/decl2.c ++++ b/gcc/cp/decl2.c +@@ -1617,6 +1617,17 @@ cplus_decl_attributes (tree *decl, tree attributes, int flags) + if (*decl == pattern) + TREE_DEPRECATED (tmpl) = true; + } ++ ++ /* Likewise, propagate unavailability out to the template. */ ++ if (TREE_UNAVAILABLE (*decl)) ++ if (tree ti = get_template_info (*decl)) ++ { ++ tree tmpl = TI_TEMPLATE (ti); ++ tree pattern = (TYPE_P (*decl) ? TREE_TYPE (tmpl) ++ : DECL_TEMPLATE_RESULT (tmpl)); ++ if (*decl == pattern) ++ TREE_UNAVAILABLE (tmpl) = true; ++ } + } + + /* Walks through the namespace- or function-scope anonymous union +@@ -3498,9 +3509,8 @@ get_tls_init_fn (tree var) + if (!flag_extern_tls_init && DECL_EXTERNAL (var)) + return NULL_TREE; + +- /* If the variable is internal, or if we can't generate aliases, +- call the local init function directly. */ +- if (!TREE_PUBLIC (var) || !TARGET_SUPPORTS_ALIASES) ++ /* If the variable is internal call the local init function directly. */ ++ if (!TREE_PUBLIC (var)) + return get_local_tls_init_fn (DECL_SOURCE_LOCATION (var)); + + tree sname = mangle_tls_init_fn (var); +@@ -3663,6 +3673,25 @@ generate_tls_wrapper (tree fn) + expand_or_defer_fn (finish_function (/*inline_p=*/false)); + } + ++/* A dummy init function to act as a weak placeholder for a (possibly non- ++ existent) dynamic init. */ ++static void ++generate_tls_dummy_init (tree fn) ++{ ++ tree var = DECL_BEFRIENDING_CLASSES (fn); ++ tree init_fn = get_tls_init_fn (var); ++ /* If have no init fn, or it is non-weak, then we do not need to make a ++ dummy. */ ++ if (!init_fn || !lookup_attribute ("weak", DECL_ATTRIBUTES (init_fn))) ++ return; ++ start_preparsed_function (init_fn, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ declare_weak (init_fn); ++ finish_return_stmt (NULL_TREE); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++} ++ + /* Start the process of running a particular set of global constructors + or destructors. Subroutine of do_[cd]tors. Also called from + vtv_start_verification_constructor_init_function. */ +@@ -4646,22 +4675,24 @@ handle_tls_init (void) + finish_expr_stmt (cp_build_modify_expr (loc, guard, NOP_EXPR, + boolean_true_node, + tf_warning_or_error)); ++ auto_vec direct_calls; + for (; vars; vars = TREE_CHAIN (vars)) + { + tree var = TREE_VALUE (vars); + tree init = TREE_PURPOSE (vars); + one_static_initialization_or_destruction (var, init, true); + +- /* Output init aliases even with -fno-extern-tls-init. */ +- if (TARGET_SUPPORTS_ALIASES && TREE_PUBLIC (var)) ++ /* Output inits even with -fno-extern-tls-init. ++ We save the list here and output either an alias or a stub function ++ below. */ ++ if (TREE_PUBLIC (var)) + { +- tree single_init_fn = get_tls_init_fn (var); ++ tree single_init_fn = get_tls_init_fn (var); + if (single_init_fn == NULL_TREE) + continue; +- cgraph_node *alias +- = cgraph_node::get_create (fn)->create_same_body_alias +- (single_init_fn, fn); +- gcc_assert (alias != NULL); ++ if (single_init_fn == fn) ++ continue; ++ direct_calls.safe_push (single_init_fn); + } + } + +@@ -4669,6 +4700,30 @@ handle_tls_init (void) + finish_if_stmt (if_stmt); + finish_function_body (body); + expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ ++ /* For each TLS var that we have an init function, we either emit an alias ++ between that and the tls_init, or a stub function that just calls the ++ tls_init. */ ++ while (!direct_calls.is_empty()) ++ { ++ tree single_init_fn = direct_calls.pop (); ++ if (TARGET_SUPPORTS_ALIASES) ++ { ++ cgraph_node *alias ++ = cgraph_node::get_create (fn)->create_same_body_alias ++ (single_init_fn, fn); ++ gcc_assert (alias != NULL); ++ } ++ else ++ { ++ start_preparsed_function (single_init_fn, NULL_TREE, SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ tree r = build_call_expr (fn, 0); ++ finish_expr_stmt (r); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ } ++ } + } + + /* We're at the end of compilation, so generate any mangling aliases that +@@ -5097,7 +5152,14 @@ c_parse_final_cleanups (void) + } + + if (!DECL_INITIAL (decl) && decl_tls_wrapper_p (decl)) +- generate_tls_wrapper (decl); ++ { ++ generate_tls_wrapper (decl); ++ /* The wrapper might have a weak reference to an init, we provide ++ a dummy function to satisfy that here. The linker/dynamic ++ loader will override this with the actual init, if one is ++ required. */ ++ generate_tls_dummy_init (decl); ++ } + + if (!DECL_SAVED_TREE (decl)) + continue; +@@ -5475,14 +5537,47 @@ maybe_instantiate_decl (tree decl) + } + } + +-/* Maybe warn if DECL is deprecated, subject to COMPLAIN. Returns whether or +- not a warning was emitted. */ ++/* Error if the DECL is unavailable (unless this is currently suppressed). ++ Maybe warn if DECL is deprecated, subject to COMPLAIN. Returns true if ++ an error or warning was emitted. */ + + bool +-cp_warn_deprecated_use (tree decl, tsubst_flags_t complain) ++cp_handle_deprecated_or_unavailable (tree decl, tsubst_flags_t complain) + { +- if (!(complain & tf_warning) || !decl +- || deprecated_state == DEPRECATED_SUPPRESS) ++ if (!decl) ++ return false; ++ ++ if ((complain & tf_error) ++ && deprecated_state != UNAVAILABLE_DEPRECATED_SUPPRESS) ++ { ++ if (TREE_UNAVAILABLE (decl)) ++ { ++ error_unavailable_use (decl, NULL_TREE); ++ return true; ++ } ++ else ++ { ++ /* Perhaps this is an unavailable typedef. */ ++ if (TYPE_P (decl) ++ && TYPE_NAME (decl) ++ && TREE_UNAVAILABLE (TYPE_NAME (decl))) ++ { ++ decl = TYPE_NAME (decl); ++ /* Don't error within members of a unavailable type. */ ++ if (TYPE_P (decl) ++ && currently_open_class (decl)) ++ return false; ++ ++ error_unavailable_use (decl, NULL_TREE); ++ return true; ++ } ++ } ++ /* Carry on to consider deprecatedness. */ ++ } ++ ++ if (!(complain & tf_warning) ++ || deprecated_state == DEPRECATED_SUPPRESS ++ || deprecated_state == UNAVAILABLE_DEPRECATED_SUPPRESS) + return false; + + if (!TREE_DEPRECATED (decl)) +@@ -5542,7 +5637,7 @@ cp_warn_deprecated_use_scopes (tree scope) + && scope != global_namespace) + { + if ((TREE_CODE (scope) == NAMESPACE_DECL || OVERLOAD_TYPE_P (scope)) +- && cp_warn_deprecated_use (scope)) ++ && cp_handle_deprecated_or_unavailable (scope)) + return; + if (TYPE_P (scope)) + scope = CP_TYPE_CONTEXT (scope); +@@ -5655,7 +5750,7 @@ mark_used (tree decl, tsubst_flags_t complain) + TREE_USED (decl) = true; + } + +- cp_warn_deprecated_use (decl, complain); ++ cp_handle_deprecated_or_unavailable (decl, complain); + + /* We can only check DECL_ODR_USED on variables or functions with + DECL_LANG_SPECIFIC set, and these are also the only decls that we +diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc +index 6cb926c044a..83ff54d9627 100644 +--- a/gcc/cp/module.cc ++++ b/gcc/cp/module.cc +@@ -11745,7 +11745,7 @@ trees_out::mark_class_def (tree defn) + /* Nop sorting, needed for resorting the member vec. */ + + static void +-nop (void *, void *) ++nop (void *, void *, void *) + { + } + +diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c +index 98b1993e127..60871fa8113 100644 +--- a/gcc/cp/name-lookup.c ++++ b/gcc/cp/name-lookup.c +@@ -2126,8 +2126,8 @@ resort_member_name_cmp (const void *a_p, const void *b_p) + tree name_a = OVL_NAME (a); + tree name_b = OVL_NAME (b); + +- resort_data.new_value (&name_a, resort_data.cookie); +- resort_data.new_value (&name_b, resort_data.cookie); ++ resort_data.new_value (&name_a, &name_a, resort_data.cookie); ++ resort_data.new_value (&name_b, &name_b, resort_data.cookie); + + gcc_checking_assert (name_a != name_b); + +diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c +index 4f75f19ac50..c74d9dd55a8 100644 +--- a/gcc/cp/parser.c ++++ b/gcc/cp/parser.c +@@ -629,6 +629,91 @@ cp_lexer_alloc (void) + return lexer; + } + ++/* Context-sensitive parse-checking for clang-style attributes. */ ++ ++enum clang_attr_state { ++ CA_NONE = 0, ++ CA_ATTR, ++ CA_BR1, CA_BR2, ++ CA_LIST, ++ CA_LIST_ARGS, ++ CA_IS_CA, ++ CA_CA_ARGS, ++ CA_LIST_CONT ++}; ++ ++/* State machine tracking context of attribute lexing. */ ++ ++static enum clang_attr_state ++cp_lexer_attribute_state (cp_token& token, enum clang_attr_state attr_state) ++{ ++ /* Implement a context-sensitive parser for clang attributes. ++ We detect __attribute__((clang_style_attribute (ARGS))) and lex the ++ args ARGS with the following differences from GNU attributes: ++ (a) number-like values are lexed as strings [this allows lexing XX.YY.ZZ ++ version numbers]. ++ (b) we concatenate strings, since clang attributes allow this too. */ ++ switch (attr_state) ++ { ++ case CA_NONE: ++ if (token.type == CPP_KEYWORD ++ && token.keyword == RID_ATTRIBUTE) ++ attr_state = CA_ATTR; ++ break; ++ case CA_ATTR: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR1; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR1: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR2; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR2: ++ if (token.type == CPP_NAME) ++ { ++ tree identifier = (token.type == CPP_KEYWORD) ++ /* For keywords, use the canonical spelling, not the ++ parsed identifier. */ ++ ? ridpointers[(int) token.keyword] ++ : token.u.value; ++ identifier = canonicalize_attr_name (identifier); ++ if (attribute_clang_form_p (identifier)) ++ attr_state = CA_IS_CA; ++ else ++ attr_state = CA_LIST; ++ } ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_IS_CA: ++ case CA_LIST: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else if (token.type == CPP_OPEN_PAREN) ++ attr_state = attr_state == CA_IS_CA ? CA_CA_ARGS ++ : CA_LIST_ARGS; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_CA_ARGS: /* We will special-case args in this state. */ ++ case CA_LIST_ARGS: ++ if (token.type == CPP_CLOSE_PAREN) ++ attr_state = CA_LIST_CONT; ++ break; ++ case CA_LIST_CONT: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else ++ attr_state = CA_NONE; ++ break; ++ } ++ return attr_state; ++} ++ + /* Create a new main C++ lexer, the lexer that gets tokens from the + preprocessor. */ + +@@ -645,6 +730,8 @@ cp_lexer_new_main (void) + c_common_no_more_pch (); + + cp_lexer *lexer = cp_lexer_alloc (); ++ enum clang_attr_state attr_state = CA_NONE; ++ + /* Put the first token in the buffer. */ + cp_token *tok = lexer->buffer->quick_push (token); + +@@ -659,8 +746,15 @@ cp_lexer_new_main (void) + /* Process the previous token. */ + module_token_lang (tok->type, tok->keyword, tok->u.value, + tok->location, filter); ++ ++ attr_state = cp_lexer_attribute_state (*tok, attr_state); + tok = vec_safe_push (lexer->buffer, cp_token ()); +- cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok); ++ unsigned int flags = C_LEX_STRING_NO_JOIN; ++ /* If we are processing clang-style attribute args, lex numbers as ++ potential version strings; NN .. NN.MM .. NN.MM.OO */ ++ if (attr_state == CA_CA_ARGS) ++ flags |= C_LEX_NUMBER_AS_STRING; ++ cp_lexer_get_preprocessor_token (flags, tok); + } + + lexer->next_token = lexer->buffer->address (); +@@ -859,7 +953,7 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token) + { + static int is_extern_c = 0; + +- /* Get a new token from the preprocessor. */ ++ /* Get a new token from the preprocessor. */ + token->type + = c_lex_with_flags (&token->u.value, &token->location, &token->flags, + flags); +@@ -17772,18 +17866,26 @@ cp_parser_template_name (cp_parser* parser, + /* If DECL is a template, then the name was a template-name. */ + if (TREE_CODE (decl) == TEMPLATE_DECL) + { +- if (TREE_DEPRECATED (decl) +- && deprecated_state != DEPRECATED_SUPPRESS) ++ if ((TREE_DEPRECATED (decl) || TREE_UNAVAILABLE (decl)) ++ && deprecated_state != UNAVAILABLE_DEPRECATED_SUPPRESS) + { + tree d = DECL_TEMPLATE_RESULT (decl); + tree attr; + if (TREE_CODE (d) == TYPE_DECL) +- attr = lookup_attribute ("deprecated", +- TYPE_ATTRIBUTES (TREE_TYPE (d))); ++ attr = TYPE_ATTRIBUTES (TREE_TYPE (d)); + else +- attr = lookup_attribute ("deprecated", +- DECL_ATTRIBUTES (d)); +- warn_deprecated_use (decl, attr); ++ attr = DECL_ATTRIBUTES (d); ++ if (TREE_UNAVAILABLE (decl)) ++ { ++ attr = lookup_attribute ("unavailable", attr); ++ error_unavailable_use (decl, attr); ++ } ++ else if (TREE_DEPRECATED (decl) ++ && deprecated_state != DEPRECATED_SUPPRESS) ++ { ++ attr = lookup_attribute ("deprecated", attr); ++ warn_deprecated_use (decl, attr); ++ } + } + } + else +@@ -18035,7 +18137,9 @@ cp_parser_template_argument (cp_parser* parser) + } + if (cp_parser_parse_definitely (parser)) + { +- if (TREE_DEPRECATED (argument)) ++ if (TREE_UNAVAILABLE (argument)) ++ error_unavailable_use (argument, NULL_TREE); ++ else if (TREE_DEPRECATED (argument)) + warn_deprecated_use (argument, NULL_TREE); + return argument; + } +@@ -19971,11 +20075,13 @@ cp_parser_enum_specifier (cp_parser* parser) + + /* Check for the `:' that denotes a specified underlying type in C++0x. + Note that a ':' could also indicate a bitfield width, however. */ ++ location_t colon_loc = UNKNOWN_LOCATION; + if (cp_lexer_next_token_is (parser->lexer, CPP_COLON)) + { + cp_decl_specifier_seq type_specifiers; + + /* Consume the `:'. */ ++ colon_loc = cp_lexer_peek_token (parser->lexer)->location; + cp_lexer_consume_token (parser->lexer); + + auto tdf +@@ -20024,10 +20130,13 @@ cp_parser_enum_specifier (cp_parser* parser) + && cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)) + { + if (has_underlying_type) +- cp_parser_commit_to_tentative_parse (parser); +- cp_parser_error (parser, "expected %<;%> or %<{%>"); +- if (has_underlying_type) +- return error_mark_node; ++ pedwarn (colon_loc, ++ OPT_Welaborated_enum_base, ++ "declaration of enumeration with " ++ "fixed underlying type and no enumerator list is " ++ "only permitted as a standalone declaration"); ++ else ++ cp_parser_error (parser, "expected %<;%> or %<{%>"); + } + } + +@@ -23638,9 +23747,9 @@ cp_parser_parameter_declaration_list (cp_parser* parser, cp_parser_flags flags) + /*template_parm_p=*/false, + &parenthesized_p); + +- /* We don't know yet if the enclosing context is deprecated, so wait +- and warn in grokparms if appropriate. */ +- deprecated_state = DEPRECATED_SUPPRESS; ++ /* We don't know yet if the enclosing context is unavailable or deprecated, ++ so wait and deal with it in grokparms if appropriate. */ ++ deprecated_state = UNAVAILABLE_DEPRECATED_SUPPRESS; + + if (parameter) + { +@@ -27700,6 +27809,91 @@ cp_parser_gnu_attributes_opt (cp_parser* parser) + return attributes; + } + ++/* Parse the arguments list for a clang attribute. */ ++static tree ++cp_parser_clang_attribute (cp_parser *parser, tree/*attr_id*/) ++{ ++ /* Each entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ matching_parens parens; ++ if (!parens.require_open (parser)) ++ return NULL; ++ ++ bool save_translate_strings_p = parser->translate_strings_p; ++ parser->translate_strings_p = false; ++ tree attr_args = NULL_TREE; ++ cp_token *token; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_NAME) ++ name = token->u.value; ++ else if (token->type == CPP_KEYWORD) ++ name = ridpointers[(int) token->keyword]; ++ else if (token->flags & NAMED_OP) ++ name = get_identifier (cpp_type2name (token->type, token->flags)); ++ else ++ { ++ /* FIXME: context-sensitive for that attrib. */ ++ error_at (token->location, "expected an attribute keyword"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ cp_lexer_consume_token (parser->lexer); ++ ++ if (cp_lexer_next_token_is (parser->lexer, CPP_EQ)) ++ { ++ cp_lexer_consume_token (parser->lexer); /* eat the '=' */ ++ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_STRING) ++ value = cp_parser_string_literal (parser, /*translate=*/false, ++ /*wide_ok=*/false); ++ else ++ { ++ value = token->u.value; ++ cp_lexer_consume_token (parser->lexer); ++ } ++ } ++ /* else value is missing. */ ++ } ++ else if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ error_at (token->location, "expected %<,%>, %<=%> or %<)%>"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) ++ cp_lexer_consume_token (parser->lexer); ++ tree t = tree_cons (value, name, NULL_TREE); ++ attr_args = chainon (attr_args, t); ++ } while (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)); ++ ++ parser->translate_strings_p = save_translate_strings_p; ++ if (!parens.require_close (parser)) ++ return error_mark_node; ++ ++ return attr_args; ++} ++ + /* Parse a GNU attribute-list. + + attribute-list: +@@ -27759,9 +27953,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +- /* If it's an `(', then parse the attribute arguments. */ +- if (token->type == CPP_OPEN_PAREN) ++ if (token->type == CPP_OPEN_PAREN ++ && attribute_clang_form_p (identifier)) ++ arguments = cp_parser_clang_attribute (parser, identifier); ++ else if (token->type == CPP_OPEN_PAREN) + { ++ /* If it's an `(', then parse the attribute arguments. */ + vec *vec; + int attr_flag = (attribute_takes_identifier_p (identifier) + ? id_attr : normal_attr); +@@ -27776,12 +27973,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + arguments = build_tree_list_vec (vec); + release_tree_vector (vec); + } +- /* Save the arguments away. */ +- TREE_VALUE (attribute) = arguments; + } + + if (arguments != error_mark_node) + { ++ /* Save the arguments away. */ ++ TREE_VALUE (attribute) = arguments; + /* Add this attribute to the list. */ + TREE_CHAIN (attribute) = attribute_list; + attribute_list = attribute; +diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c +index 26c65f72eb5..47a48b19b21 100644 +--- a/gcc/cp/typeck.c ++++ b/gcc/cp/typeck.c +@@ -2556,7 +2556,10 @@ build_class_member_access_expr (cp_expr object, tree member, + member_scope = DECL_CLASS_CONTEXT (member); + if (!mark_used (member, complain) && !(complain & tf_error)) + return error_mark_node; +- if (TREE_DEPRECATED (member)) ++ ++ if (TREE_UNAVAILABLE (member)) ++ error_unavailable_use (member, NULL_TREE); ++ else if (TREE_DEPRECATED (member)) + warn_deprecated_use (member, NULL_TREE); + } + else +@@ -3271,7 +3274,9 @@ finish_class_member_access_expr (cp_expr object, tree name, bool template_p, + } + } + +- if (TREE_DEPRECATED (member)) ++ if (TREE_UNAVAILABLE (member)) ++ error_unavailable_use (member, NULL_TREE); ++ else if (TREE_DEPRECATED (member)) + warn_deprecated_use (member, NULL_TREE); + + if (template_p) +diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c +index 8628a5086ce..83fffbf37e8 100644 +--- a/gcc/cp/typeck2.c ++++ b/gcc/cp/typeck2.c +@@ -2198,7 +2198,7 @@ build_functional_cast_1 (location_t loc, tree exp, tree parms, + type = TREE_TYPE (exp); + + if (DECL_ARTIFICIAL (exp)) +- cp_warn_deprecated_use (type); ++ cp_handle_deprecated_or_unavailable (type); + } + else + type = exp; +diff --git a/gcc/cumulative-args.h b/gcc/cumulative-args.h +new file mode 100644 +index 00000000000..b60928e37f9 +--- /dev/null ++++ b/gcc/cumulative-args.h +@@ -0,0 +1,20 @@ ++#ifndef GCC_CUMULATIVE_ARGS_H ++#define GCC_CUMULATIVE_ARGS_H ++ ++#if CHECKING_P ++ ++struct cumulative_args_t { void *magic; void *p; }; ++ ++#else /* !CHECKING_P */ ++ ++/* When using a GCC build compiler, we could use ++ __attribute__((transparent_union)) to get cumulative_args_t function ++ arguments passed like scalars where the ABI would mandate a less ++ efficient way of argument passing otherwise. However, that would come ++ at the cost of less type-safe !CHECKING_P compilation. */ ++ ++union cumulative_args_t { void *p; }; ++ ++#endif /* !CHECKING_P */ ++ ++#endif /* GCC_CUMULATIVE_ARGS_H */ +diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in +index b3c77a08f46..e7af151aba5 100644 +--- a/gcc/d/Make-lang.in ++++ b/gcc/d/Make-lang.in +@@ -52,6 +52,7 @@ d-warn = $(filter-out -pedantic -Woverloaded-virtual, $(STRICT_WARN)) + # Also filter out warnings for missing format attributes in the D Frontend. + DMD_WARN_CXXFLAGS = $(filter-out -Wmissing-format-attribute, $(WARN_CXXFLAGS)) + DMD_COMPILE = $(subst $(WARN_CXXFLAGS), $(DMD_WARN_CXXFLAGS), $(COMPILE)) ++DMD_COMPILE += $(PICFLAG) + + # D Frontend object files. + D_FRONTEND_OBJS = \ +diff --git a/gcc/doc/contrib.texi b/gcc/doc/contrib.texi +index a8d4d5df055..f9f24a16d24 100644 +--- a/gcc/doc/contrib.texi ++++ b/gcc/doc/contrib.texi +@@ -1511,7 +1511,7 @@ Gael Thomas for @code{VMClassLoader} boot packages support suggestions. + + @item + Andreas Tobler for Darwin and Solaris testing and fixing, @code{Qt4} +-support for Darwin/OS X, @code{Graphics2D} support, @code{gtk+} ++support for Darwin / macOS, @code{Graphics2D} support, @code{gtk+} + updates. + + @item +diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi +index 4b065b651b0..d20c43378e4 100644 +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -3173,6 +3173,8 @@ directive}: @samp{#if}, @samp{#ifdef} or @samp{#ifndef}. + * @code{__has_cpp_attribute}:: + * @code{__has_c_attribute}:: + * @code{__has_builtin}:: ++* @code{__has_feature}:: ++* @code{__has_extension}:: + * @code{__has_include}:: + @end menu + +@@ -3535,6 +3537,45 @@ the operator is as follows: + #endif + @end smallexample + ++@node @code{__has_feature} ++@subsection @code{__has_feature} ++@cindex @code{__has_feature} ++ ++The special operator @code{__has_feature (@var{operand})} may be used in ++constant integer contexts and in preprocessor @samp{#if} and @samp{#elif} ++expressions to test whether the identifier given in @var{operand} is recognized ++as a feature supported by GCC given the current options and, in the case of ++standard language features, whether the feature is available in the chosen ++version of the language standard. ++ ++Note that @code{__has_feature} and @code{__has_extension} are not recommended ++for use in new code, and are only provided for compatibility with Clang. For ++details of which identifiers are accepted by these function-like macros, see ++@w{@uref{https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension, ++the Clang documentation}}. ++ ++@node @code{__has_extension} ++@subsection @code{__has_extension} ++@cindex @code{__has_extension} ++ ++The special operator @code{__has_extension (@var{operand})} may be used in ++constant integer contexts and in preprocessor @samp{#if} and @samp{#elif} ++expressions to test whether the identifier given in @var{operand} is recognized ++as an extension supported by GCC given the current options. In any given ++context, the features accepted by @code{__has_extension} are a strict superset ++of those accepted by @code{__has_feature}. Unlike @code{__has_feature}, ++@code{__has_extension} tests whether a given feature is available regardless of ++strict language standards conformance. ++ ++If the @option{-pedantic-errors} flag is given, @code{__has_extension} is ++equivalent to @code{__has_feature}. ++ ++Note that @code{__has_feature} and @code{__has_extension} are not recommended ++for use in new code, and are only provided for compatibility with Clang. For ++details of which identifiers are accepted by these function-like macros, see ++@w{@uref{https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension, ++the Clang documentation}}. ++ + @node @code{__has_include} + @subsection @code{__has_include} + @cindex @code{__has_include} +diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi +index 209341f523d..b69a6ef67a9 100644 +--- a/gcc/doc/extend.texi ++++ b/gcc/doc/extend.texi +@@ -2866,6 +2866,19 @@ types (@pxref{Variable Attributes}, @pxref{Type Attributes}.) + The message attached to the attribute is affected by the setting of + the @option{-fmessage-length} option. + ++@item unavailable ++@itemx unavailable (@var{msg}) ++@cindex @code{unavailable} function attribute ++The @code{unavailable} attribute results in an error if the function ++is used anywhere in the source file. This is useful when identifying ++functions that have been removed from a particular variation of an ++interface. Other than emitting an error rather than a warning, the ++@code{unavailable} attribute behaves in the same manner as ++@code{deprecated}. ++ ++The @code{unavailable} attribute can also be used for variables and ++types (@pxref{Variable Attributes}, @pxref{Type Attributes}.) ++ + @item error ("@var{message}") + @itemx warning ("@var{message}") + @cindex @code{error} function attribute +@@ -7377,6 +7390,22 @@ types (@pxref{Common Function Attributes}, + The message attached to the attribute is affected by the setting of + the @option{-fmessage-length} option. + ++@item unavailable ++@itemx unavailable (@var{msg}) ++@cindex @code{unavailable} variable attribute ++The @code{unavailable} attribute indicates that the variable so marked ++is not available, if it is used anywhere in the source file. It behaves ++in the same manner as the @code{deprecated} attribute except that the ++compiler will emit an error rather than a warning. ++ ++It is expected that items marked as @code{deprecated} will eventually be ++withdrawn from interfaces, and then become unavailable. This attribute ++allows for marking them appropriately. ++ ++The @code{unavailable} attribute can also be used for functions and ++types (@pxref{Common Function Attributes}, ++@pxref{Common Type Attributes}). ++ + @item mode (@var{mode}) + @cindex @code{mode} variable attribute + This attribute specifies the data type for the declaration---whichever +@@ -8436,6 +8465,17 @@ variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.) + The message attached to the attribute is affected by the setting of + the @option{-fmessage-length} option. + ++@item unavailable ++@itemx unavailable (@var{msg}) ++@cindex @code{unavailable} type attribute ++The @code{unavailable} attribute behaves in the same manner as the ++@code{deprecated} one, but emits an error rather than a warning. It is ++used to indicate that a (perhaps previously @code{deprecated}) type is ++no longer usable. ++ ++The @code{unavailable} attribute can also be used for functions and ++variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.) ++ + @item designated_init + @cindex @code{designated_init} type attribute + This attribute may only be applied to structure types. It indicates +@@ -8909,6 +8949,12 @@ of the deprecated enumerator, to enable users to easily find further + information about why the enumerator is deprecated, or what they should + do instead. Note that the warnings only occurs for uses. + ++@item unavailable ++@cindex @code{unavailable} enumerator attribute ++The @code{unavailable} attribute results in an error if the enumerator ++is used anywhere in the source file. In other respects it behaves in the ++same manner as the @code{deprecated} attribute. ++ + @end table + + @node Statement Attributes +@@ -23354,7 +23400,7 @@ attribute, do change the value of preprocessor macros like + + The following pragmas are available for all architectures running the + Darwin operating system. These are useful for compatibility with other +-Mac OS compilers. ++macOS compilers. + + @table @code + @item mark @var{tokens}@dots{} +@@ -24514,7 +24560,7 @@ compiled separately. + @end table + + G++ implements the Borland model on targets where the linker supports it, +-including ELF targets (such as GNU/Linux), Mac OS X and Microsoft Windows. ++including ELF targets (such as GNU/Linux), macOS and Microsoft Windows. + Otherwise G++ implements neither automatic model. + + You have the following options for dealing with template instantiations: +diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi +index aaf97ae9ad5..2c62ab11706 100644 +--- a/gcc/doc/gty.texi ++++ b/gcc/doc/gty.texi +@@ -197,6 +197,15 @@ If @code{skip} is applied to a field, the type machinery will ignore it. + This is somewhat dangerous; the only safe use is in a union when one + field really isn't ever used. + ++@findex callback ++@item callback ++ ++@code{callback} should be applied to fields with pointer to function type ++and causes the field to be ignored similarly to @code{skip}, except when ++writing PCH and the field is non-NULL it will remember the field's address ++for relocation purposes if the process writing PCH has different load base ++from a process reading PCH. ++ + @findex for_user + @item for_user + +@@ -466,7 +475,7 @@ void gt_pch_nx (my_struct *p) + void gt_pch_nx (my_struct *p, gt_pointer_operator op, void *cookie) + @{ + /* For every field 'fld', call the given pointer operator. */ +- op (&(tp->fld), cookie); ++ op (&(tp->fld), NULL, cookie); + @} + @end smallexample + +@@ -519,7 +528,7 @@ void gt_pch_nx (TP *tp, gt_pointer_operator op, void *cookie) + @{ + /* For every field 'fld' of 'tp' with type 'T *', call the given + pointer operator. */ +- op (&(tp->fld), cookie); ++ op (&(tp->fld), NULL, cookie); + @} + + template +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index 68a0f2b04e9..5553e1f51d7 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -975,14 +975,26 @@ code. + + @item --enable-host-shared + Specify that the @emph{host} code should be built into position-independent +-machine code (with -fPIC), allowing it to be used within shared libraries, +-but yielding a slightly slower compiler. ++machine code (with @option{-fPIC}), allowing it to be used within shared ++libraries, but yielding a slightly slower compiler. + + This option is required when building the libgccjit.so library. + + Contrast with @option{--enable-shared}, which affects @emph{target} + libraries. + ++@item --enable-host-pie ++Specify that the @emph{host} executables should be built into ++position-independent executables (with @option{-fPIE} and @option{-pie}), ++yielding a slightly slower compiler (but faster than ++@option{--enable-host-shared}). Position-independent executables are loaded ++at random addresses each time they are executed, therefore provide additional ++protection against Return Oriented Programming (ROP) attacks. ++ ++@option{--enable-host-pie}) may be used with @option{--enable-host-shared}), ++in which case @option{-fPIC} is used when compiling, and @option{-pie} when ++linking. ++ + @item @anchor{with-gnu-as}--with-gnu-as + Specify that the compiler should assume that the + assembler it finds is the GNU assembler. However, this does not modify +@@ -1647,6 +1659,12 @@ particularly useful if you intend to use several versions of GCC in + parallel. The default is @samp{yes} for @samp{libada}, and @samp{no} for + the remaining libraries. + ++@item --with-darwin-extra-rpath ++This is provided to allow distributions to add a single additional ++runpath on Darwin / macOS systems. This allows for cases where the ++installed GCC library directories are then symlinked to a common ++directory outside of the GCC installation. ++ + @item @anchor{WithAixSoname}--with-aix-soname=@samp{aix}, @samp{svr4} or @samp{both} + Traditional AIX shared library versioning (versioned @code{Shared Object} + files as members of unversioned @code{Archive Library} files named +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index ef331d72beb..0f768a874ad 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -251,7 +251,8 @@ in the following sections. + -Wctor-dtor-privacy -Wno-delete-incomplete @gol + -Wdelete-non-virtual-dtor -Wdeprecated-copy -Wdeprecated-copy-dtor @gol + -Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion @gol +--Weffc++ -Wno-exceptions -Wextra-semi -Wno-inaccessible-base @gol ++-Weffc++ -Wno-elaborated-enum-base -Wno-exceptions -Wextra-semi @gol ++-Wno-inaccessible-base @gol + -Wno-inherited-variadic-ctor -Wno-init-list-lifetime @gol + -Winvalid-imported-macros @gol + -Wno-invalid-offsetof -Wno-literal-suffix @gol +@@ -661,7 +662,7 @@ Objective-C and Objective-C++ Dialects}. + -fverbose-asm -fpack-struct[=@var{n}] @gol + -fleading-underscore -ftls-model=@var{model} @gol + -fstack-reuse=@var{reuse_level} @gol +--ftrampolines -ftrapv -fwrapv @gol ++-ftrampolines -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} -ftrapv -fwrapv @gol + -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} @gol + -fstrict-volatile-bitfields -fsync-libcalls} + +@@ -882,7 +883,7 @@ Objective-C and Objective-C++ Dialects}. + -twolevel_namespace -umbrella -undefined @gol + -unexported_symbols_list -weak_reference_mismatches @gol + -whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} @gol +--mkernel -mone-byte-bool} ++-mkernel -mone-byte-bool -munreachable-traps} + + @emph{DEC Alpha Options} + @gccoptlist{-mno-fp-regs -msoft-float @gol +@@ -3523,6 +3524,15 @@ to result in dangling pointers. Since the underlying array for an + it is easy to inadvertently keep a pointer to the array past the end + of the array's lifetime. For example: + ++@item -Wno-elaborated-enum-base ++@opindex Welaborated-enum-base ++@opindex Wno-elaborated-enum-base ++For C++11 and above, warn if an (invalid) additional enum-base is used ++in an elaborated-type-specifier. That is, if an enum with given ++underlying type and no enumerator list is used in a declaration other ++than just a standalone declaration of the enum. Enabled by default. This ++warning is upgraded to an error with -pedantic-errors. ++ + @itemize @bullet + @item + If a function returns a temporary @code{initializer_list}, or a local +@@ -4347,7 +4357,7 @@ Use @var{class-name} as the name of the class to instantiate for each + literal string specified with the syntax @code{@@"@dots{}"}. The default + class name is @code{NXConstantString} if the GNU runtime is being used, and + @code{NSConstantString} if the NeXT runtime is being used (see below). On +-Darwin (macOS, MacOS X) platforms, the @option{-fconstant-cfstrings} option, if ++Darwin / macOS platforms, the @option{-fconstant-cfstrings} option, if + also present, overrides the @option{-fconstant-string-class} setting and cause + @code{@@"@dots{}"} literals to be laid out as constant CoreFoundation strings. + Note that @option{-fconstant-cfstrings} is an alias for the target-specific +@@ -4361,7 +4371,7 @@ runtime. This is the default for most types of systems. + @item -fnext-runtime + @opindex fnext-runtime + Generate output compatible with the NeXT runtime. This is the default +-for NeXT-based systems, including Darwin and Mac OS X@. The macro ++for NeXT-based systems, including Darwin / macOS. The macro + @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is + used. + +@@ -5506,8 +5516,45 @@ Give an error whenever the @dfn{base standard} (see @option{-Wpedantic}) + requires a diagnostic, in some cases where there is undefined behavior + at compile-time and in some other cases that do not prevent compilation + of programs that are valid according to the standard. This is not +-equivalent to @option{-Werror=pedantic}, since there are errors enabled +-by this option and not enabled by the latter and vice versa. ++equivalent to @option{-Werror=pedantic}: the latter option is unlikely to be ++useful, as it only makes errors of the diagnostics that are controlled by ++@option{-Wpedantic}, whereas this option also affects required diagnostics that ++are always enabled or controlled by options other than @option{-Wpedantic}. ++ ++If you want the required diagnostics that are warnings by default to ++be errors instead, but don't also want to enable the @option{-Wpedantic} ++diagnostics, you can specify @option{-pedantic-errors -Wno-pedantic} ++(or @option{-pedantic-errors -Wno-error=pedantic} to enable them but ++only as warnings). ++ ++Some required diagnostics are errors by default, but can be reduced to ++warnings using @option{-fpermissive} or their specific warning option, ++e.g. @option{-Wno-error=narrowing}. ++ ++Some diagnostics for non-ISO practices are controlled by specific ++warning options other than @option{-Wpedantic}, but are also made ++errors by @option{-pedantic-errors}. For instance: ++ ++@gccoptlist{ ++-Wattributes @r{(for standard attributes)} ++-Wchanges-meaning @r{(C++)} ++-Wcomma-subscript @r{(C++23 or later)} ++-Wdeclaration-after-statement @r{(C90 or earlier)} ++-Welaborated-enum-base @r{(C++11 or later)} ++-Wimplicit-int @r{(C99 or later)} ++-Wimplicit-function-declaration @r{(C99 or later)} ++-Wincompatible-pointer-types ++-Wint-conversion ++-Wlong-long @r{(C90 or earlier)} ++-Wmain ++-Wnarrowing @r{(C++11 or later)} ++-Wpointer-arith ++-Wpointer-sign ++-Wincompatible-pointer-types ++-Wregister @r{(C++17 or later)} ++-Wvla @r{(C90 or earlier)} ++-Wwrite-strings @r{(C++11 or later)} ++} + + @item -Wall + @opindex Wall +@@ -9645,7 +9692,7 @@ possible. + Produce debugging information in DWARF format (if that is supported). + The value of @var{version} may be either 2, 3, 4 or 5; the default + version for most targets is 5 (with the exception of VxWorks, TPF and +-Darwin/Mac OS X, which default to version 2, and AIX, which defaults ++Darwin / macOS, which default to version 2, and AIX, which defaults + to version 4). + + Note that with DWARF Version 2, some ports require and always +@@ -16122,6 +16169,17 @@ the behavior of older compilers in which temporaries' stack space is + not reused, the aggressive stack reuse can lead to runtime errors. This + option is used to control the temporary stack reuse optimization. + ++@item -fstack-use-cumulative-args ++@opindex fstack_use_cumulative_args ++This option instructs the compiler to use the ++@code{cumulative_args_t}-based stack layout target hooks, ++@code{TARGET_FUNCTION_ARG_BOUNDARY_CA} and ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA}. If a given target does ++not define these hooks, the default behaviour is to fallback to using ++the standard non-@code{_CA} variants instead. Certain targets (such as ++AArch64 Darwin) require using the more advanced @code{_CA}-based ++hooks: For these targets this option should be enabled by default. ++ + @item -ftrapv + @opindex ftrapv + This option generates traps for signed overflow on addition, subtraction, +@@ -16599,6 +16657,25 @@ Moreover, code compiled with @option{-ftrampolines} and code compiled with + present. This option must therefore be used on a program-wide basis and be + manipulated with extreme care. + ++For languages other than Ada, the @code{-ftrampolines} and ++@code{-fno-trampolines} options currently have no effect, and ++trampolines are always generated on platforms that need them ++for nested functions. ++ ++@item -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} ++@opindex ftrampoline-impl ++By default, trampolines are generated on stack. However, certain platforms ++(such as the Apple M1) do not permit an executable stack. Compiling with ++@option{-ftrampoline-impl=heap} generate calls to ++@code{__gcc_nested_func_ptr_created} and ++@code{__gcc_nested_func_ptr_deleted} in order to allocate and ++deallocate trampoline space on the executable heap. These functions are ++implemented in libgcc, and will only be provided on specific targets: ++x86_64 Darwin, x86_64 and aarch64 Linux. @emph{PLEASE NOTE}: Heap ++trampolines are @emph{not} guaranteed to be correctly deallocated if you ++@code{setjmp}, instantiate nested functions, and then @code{longjmp} back ++to a state prior to having allocated those nested functions. ++ + @item -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} + @opindex fvisibility + Set the default ELF image symbol visibility to the specified option---all +@@ -21858,6 +21935,12 @@ without that switch. Using this switch may require recompiling all + other modules in a program, including system libraries. Use this + switch to conform to a non-default data model. + ++@item -munreachable-traps ++@itemx -munreachable-traps ++@opindex munreachable-traps ++Causes @code{__builtin_unreachable} to be rendered as a trap. This is the ++default for all Darwin architectures. ++ + @item -mfix-and-continue + @itemx -ffix-and-continue + @itemx -findirect-data +@@ -21904,6 +21987,14 @@ an executable when linking, using the Darwin @file{libtool} command. + This causes GCC's output file to have the @samp{ALL} subtype, instead of + one controlled by the @option{-mcpu} or @option{-march} option. + ++@opindex nodefaultrpaths ++@item -nodefaultrpaths ++Do not add default run paths for the compiler library directories to ++executables, modules or dynamic libraries. On macOS 10.5 and later, ++the embedded runpath is added by default unless the user adds ++@option{-nodefaultrpaths} to the link line. Run paths are needed ++(and therefore enforced) to build on macOS version 10.11 or later. ++ + @item -allowable_client @var{client_name} + @itemx -client_name + @itemx -compatibility_version +@@ -27488,7 +27579,7 @@ the same as @option{-mbig}. + + @item -mdynamic-no-pic + @opindex mdynamic-no-pic +-On Darwin and Mac OS X systems, compile code so that it is not ++On Darwin / macOS systems, compile code so that it is not + relocatable, but that its external references are relocatable. The + resulting code is suitable for applications, but not shared + libraries. +diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi +index df46d44accf..2195066a099 100644 +--- a/gcc/doc/plugins.texi ++++ b/gcc/doc/plugins.texi +@@ -44,7 +44,7 @@ Plugins are loaded with + + Where @var{name} is the plugin name and @var{ext} is the platform-specific + dynamic library extension. It should be @code{dll} on Windows/MinGW, +-@code{dylib} on Darwin/Mac OS X, and @code{so} on all other platforms. ++@code{dylib} on Darwin/macOS, and @code{so} on all other platforms. + The plugin arguments are parsed by GCC and passed to respective + plugins as key-value pairs. Multiple plugins can be invoked by + specifying multiple @option{-fplugin} arguments. +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index 602929518ec..77303a6a813 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -978,6 +978,10 @@ also define the hook to @code{default_promote_function_mode_always_promote} + if you would like to apply the same rules given by @code{PROMOTE_MODE}. + @end deftypefn + ++@deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE_CA (cumulative_args_t, @var{function_arg_info}, @var{const_tree}, int *@var{}, @var{int}) ++Like @code{promote_function_mode}, but takes a cumulative_args pointer and a current arg to supply the input. ++@end deftypefn ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -4226,6 +4230,16 @@ with the specified mode and type. The default hook returns + @code{PARM_BOUNDARY} for all arguments. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument alignment, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}. ++@end deftypefn ++ + @deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY (machine_mode @var{mode}, const_tree @var{type}) + Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY}, + which is the default value for this hook. You can define this hook to +@@ -4233,6 +4247,16 @@ return a different value if an argument size must be rounded to a larger + value. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument size rounding, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. ++@end deftypefn ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -5632,7 +5656,7 @@ This hook determines whether a function from a class of functions + Set this macro to 1 to use the "NeXT" Objective-C message sending conventions + by default. This calling convention involves passing the object, the selector + and the method arguments all at once to the method-lookup library function. +-This is the usual setting when targeting Darwin/Mac OS X systems, which have ++This is the usual setting when targeting Darwin / macOS systems, which have + the NeXT runtime installed. + + If the macro is set to 0, the "GNU" Objective-C message sending convention +@@ -12276,6 +12300,11 @@ This target hook can be used to generate a target-specific code + If selftests are enabled, run any selftests for this target. + @end deftypefn + ++@deftypefn {Target Hook} bool TARGET_UNREACHABLE_SHOULD_TRAP (void) ++This hook should return @code{true} if the target wants @code{__builtin_unreachable} to expand to a trap or @code{abort ()}. ++ The default value is false. ++@end deftypefn ++ + @deftypefn {Target Hook} bool TARGET_MEMTAG_CAN_TAG_ADDRESSES () + True if the backend architecture naturally supports ignoring some region + of pointers. This feature means that @option{-fsanitize=hwaddress} can +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index 732396acb6d..fd782264b42 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -932,6 +932,8 @@ Do not define this macro if it would never modify @var{m}. + + @hook TARGET_PROMOTE_FUNCTION_MODE + ++@hook TARGET_PROMOTE_FUNCTION_MODE_CA ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -3334,8 +3336,12 @@ required. + + @hook TARGET_FUNCTION_ARG_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_BOUNDARY_CA ++ + @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -4004,7 +4010,7 @@ macro, a reasonable default is used. + Set this macro to 1 to use the "NeXT" Objective-C message sending conventions + by default. This calling convention involves passing the object, the selector + and the method arguments all at once to the method-lookup library function. +-This is the usual setting when targeting Darwin/Mac OS X systems, which have ++This is the usual setting when targeting Darwin / macOS systems, which have + the NeXT runtime installed. + + If the macro is set to 0, the "GNU" Objective-C message sending convention +@@ -8207,6 +8213,8 @@ maintainer is familiar with. + + @hook TARGET_RUN_TARGET_SELFTESTS + ++@hook TARGET_UNREACHABLE_SHOULD_TRAP ++ + @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES + + @hook TARGET_MEMTAG_TAG_SIZE +diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in +index c206a254d51..d5ca991a860 100644 +--- a/gcc/exec-tool.in ++++ b/gcc/exec-tool.in +@@ -23,6 +23,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" + ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" + ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" + ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ++ORIGINAL_LLD_FOR_TARGET="@ORIGINAL_LLD_FOR_TARGET@" ++ORIGINAL_CLASSIC_LD_FOR_TARGET="@ORIGINAL_CLASSIC_LD_FOR_TARGET@" + ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" + ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" + ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@" +@@ -39,24 +41,41 @@ case "$invoked" in + dir=gas + ;; + collect-ld) +- # Check -fuse-ld=bfd and -fuse-ld=gold +- case " $* " in +- *\ -fuse-ld=bfd\ *) +- original=$ORIGINAL_LD_BFD_FOR_TARGET +- ;; +- *\ -fuse-ld=gold\ *) +- original=$ORIGINAL_LD_GOLD_FOR_TARGET +- ;; +- *) +- # when using a linker plugin, gcc will always pass '-plugin' as the +- # first or second option to the linker. +- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then +- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET +- else +- original=$ORIGINAL_LD_FOR_TARGET +- fi +- ;; +- esac ++ # when using a linker plugin, gcc will always pass '-plugin' as the ++ # first or second option to the linker. ++ if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then ++ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET ++ else ++ original=$ORIGINAL_LD_FOR_TARGET ++ fi ++ # Check -fuse-ld=bfd, -fuse-ld=gold and -fuse-ld=classic ++ # Remove -fuse-ld=classic from the command line ++ for arg do ++ # temporarily, remove the arg. ++ shift ++ case $arg in ++ -fuse-ld=bfd) ++ original=$ORIGINAL_LD_BFD_FOR_TARGET ++ ;; ++ -fuse-ld=gold) ++ original=$ORIGINAL_LD_GOLD_FOR_TARGET ++ ;; ++ -fuse-ld=lld) ++ original=$ORIGINAL_LLD_FOR_TARGET ++ # We want to remove this from the command line; by the slightly ++ # obtuse mechanism of not putting it back. ++ continue ++ ;; ++ -fuse-ld=classic) ++ original=$ORIGINAL_CLASSIC_LD_FOR_TARGET ++ # As for lld. ++ continue ++ ;; ++ *) ;; ++ esac ++ # if we want to keep the arg, put it back. ++ set -- "$@" "$arg" ++ done + prog=ld-new$exeext + if test "$original" = ../gold/ld-new$exeext; then + dir=gold +diff --git a/gcc/explow.c b/gcc/explow.c +index a35423f5d16..ed9c2ada2ac 100644 +--- a/gcc/explow.c ++++ b/gcc/explow.c +@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see + #include "langhooks.h" + #include "except.h" + #include "dojump.h" ++#include "calls.h" + #include "explow.h" + #include "expr.h" + #include "stringpool.h" +@@ -812,6 +813,16 @@ promote_function_mode (const_tree type, machine_mode mode, int *punsignedp, + return mode; + } + } ++ ++machine_mode ++promote_function_mode (cumulative_args_t args_so_far, function_arg_info arg, ++ const_tree funtype, int *punsignedp , int for_return) ++{ ++ return targetm.calls.promote_function_mode_ca (args_so_far, arg, funtype, ++ punsignedp, for_return); ++// return promote_function_mode (arg.type, arg.mode, punsignedp, funtype, for_return); ++} ++ + /* Return the mode to use to store a scalar of TYPE and MODE. + PUNSIGNEDP points to the signedness of the type and may be adjusted + to show what signedness to use on extension operations. */ +diff --git a/gcc/explow.h b/gcc/explow.h +index 698f2a2a21c..f9406380a55 100644 +--- a/gcc/explow.h ++++ b/gcc/explow.h +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_EXPLOW_H + #define GCC_EXPLOW_H + ++#include "calls.h" /* for cummulative args stuff. */ ++ + /* Return a memory reference like MEMREF, but which is known to have a + valid address. */ + extern rtx validize_mem (rtx); +@@ -47,8 +49,13 @@ extern rtx force_not_mem (rtx); + + /* Return mode and signedness to use when an argument or result in the + given mode is promoted. */ +-extern machine_mode promote_function_mode (const_tree, machine_mode, int *, +- const_tree, int); ++machine_mode promote_function_mode (const_tree, machine_mode, int *, ++ const_tree, int); ++ ++/* Return mode and signedness to use when an argument or result in the ++ given mode is promoted. */ ++machine_mode promote_function_mode (cumulative_args_t, function_arg_info, ++ const_tree, int *, int); + + /* Return mode and signedness to use when an object in the given mode + is promoted. */ +diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi +index 60bf257cbf2..ffcfb086318 100644 +--- a/gcc/fortran/gfortran.texi ++++ b/gcc/fortran/gfortran.texi +@@ -1362,7 +1362,7 @@ low level file descriptor corresponding to an open Fortran unit. Then, + using e.g. the @code{ISO_C_BINDING} feature, one can call the + underlying system call to flush dirty data to stable storage, such as + @code{fsync} on POSIX, @code{_commit} on MingW, or @code{fcntl(fd, +-F_FULLSYNC, 0)} on Mac OS X. The following example shows how to call ++F_FULLSYNC, 0)} on macOS. The following example shows how to call + fsync: + + @smallexample +diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c +index b4fc4afdda3..3002ffd115c 100644 +--- a/gcc/fortran/trans-decl.c ++++ b/gcc/fortran/trans-decl.c +@@ -6111,15 +6111,20 @@ generate_local_decl (gfc_symbol * sym) + + if (sym->attr.dummy == 1) + { +- /* Modify the tree type for scalar character dummy arguments of bind(c) +- procedures if they are passed by value. The tree type for them will +- be promoted to INTEGER_TYPE for the middle end, which appears to be +- what C would do with characters passed by-value. The value attribute +- implies the dummy is a scalar. */ ++ /* The tree type for scalar character dummy arguments of BIND(C) ++ procedures, if they are passed by value, should be unsigned char. ++ The value attribute implies the dummy is a scalar. */ + if (sym->attr.value == 1 && sym->backend_decl != NULL + && sym->ts.type == BT_CHARACTER && sym->ts.is_c_interop + && sym->ns->proc_name != NULL && sym->ns->proc_name->attr.is_bind_c) +- gfc_conv_scalar_char_value (sym, NULL, NULL); ++ { ++ /* We used to modify the tree here. Now it is done earlier in ++ the front-end, so we only check it here to avoid regressions. */ ++ gcc_assert (TREE_CODE (TREE_TYPE (sym->backend_decl)) == INTEGER_TYPE); ++ gcc_assert (TYPE_UNSIGNED (TREE_TYPE (sym->backend_decl)) == 1); ++ gcc_assert (TYPE_PRECISION (TREE_TYPE (sym->backend_decl)) == CHAR_TYPE_SIZE); ++ gcc_assert (DECL_BY_REFERENCE (sym->backend_decl) == 0); ++ } + + /* Unused procedure passed as dummy argument. */ + if (sym->attr.flavor == FL_PROCEDURE) +diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c +index 37f16f37e12..89519f0700d 100644 +--- a/gcc/fortran/trans-expr.c ++++ b/gcc/fortran/trans-expr.c +@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see + #include "trans-stmt.h" + #include "dependency.h" + #include "gimplify.h" ++#include "tm.h" /* For CHAR_TYPE_SIZE. */ + + /* Convert a scalar to an array descriptor. To be used for assumed-rank + arrays. */ +@@ -3938,63 +3939,50 @@ gfc_string_to_single_character (tree len, tree str, int kind) + } + + +-void +-gfc_conv_scalar_char_value (gfc_symbol *sym, gfc_se *se, gfc_expr **expr) ++static void ++conv_scalar_char_value (gfc_symbol *sym, gfc_se *se, gfc_expr **expr) + { ++ gcc_assert (expr); + ++ /* We used to modify the tree here. Now it is done earlier in ++ the front-end, so we only check it here to avoid regressions. */ + if (sym->backend_decl) + { +- /* This becomes the nominal_type in +- function.c:assign_parm_find_data_types. */ +- TREE_TYPE (sym->backend_decl) = unsigned_char_type_node; +- /* This becomes the passed_type in +- function.c:assign_parm_find_data_types. C promotes char to +- integer for argument passing. */ +- DECL_ARG_TYPE (sym->backend_decl) = unsigned_type_node; +- +- DECL_BY_REFERENCE (sym->backend_decl) = 0; ++ gcc_assert (TREE_CODE (TREE_TYPE (sym->backend_decl)) == INTEGER_TYPE); ++ gcc_assert (TYPE_UNSIGNED (TREE_TYPE (sym->backend_decl)) == 1); ++ gcc_assert (TYPE_PRECISION (TREE_TYPE (sym->backend_decl)) == CHAR_TYPE_SIZE); ++ gcc_assert (DECL_BY_REFERENCE (sym->backend_decl) == 0); + } + +- if (expr != NULL) ++ /* If we have a constant character expression, make it into an ++ integer of type C char. */ ++ if ((*expr)->expr_type == EXPR_CONSTANT) + { +- /* If we have a constant character expression, make it into an +- integer. */ +- if ((*expr)->expr_type == EXPR_CONSTANT) +- { +- gfc_typespec ts; +- gfc_clear_ts (&ts); ++ gfc_typespec ts; ++ gfc_clear_ts (&ts); + +- *expr = gfc_get_int_expr (gfc_default_integer_kind, NULL, +- (int)(*expr)->value.character.string[0]); +- if ((*expr)->ts.kind != gfc_c_int_kind) +- { +- /* The expr needs to be compatible with a C int. If the +- conversion fails, then the 2 causes an ICE. */ +- ts.type = BT_INTEGER; +- ts.kind = gfc_c_int_kind; +- gfc_convert_type (*expr, &ts, 2); +- } ++ *expr = gfc_get_int_expr (gfc_default_character_kind, NULL, ++ (*expr)->value.character.string[0]); ++ } ++ else if (se != NULL && (*expr)->expr_type == EXPR_VARIABLE) ++ { ++ if ((*expr)->ref == NULL) ++ { ++ se->expr = gfc_string_to_single_character ++ (build_int_cst (integer_type_node, 1), ++ gfc_build_addr_expr (gfc_get_pchar_type ((*expr)->ts.kind), ++ gfc_get_symbol_decl ++ ((*expr)->symtree->n.sym)), ++ (*expr)->ts.kind); + } +- else if (se != NULL && (*expr)->expr_type == EXPR_VARIABLE) +- { +- if ((*expr)->ref == NULL) +- { +- se->expr = gfc_string_to_single_character +- (build_int_cst (integer_type_node, 1), +- gfc_build_addr_expr (gfc_get_pchar_type ((*expr)->ts.kind), +- gfc_get_symbol_decl +- ((*expr)->symtree->n.sym)), +- (*expr)->ts.kind); +- } +- else +- { +- gfc_conv_variable (se, *expr); +- se->expr = gfc_string_to_single_character +- (build_int_cst (integer_type_node, 1), +- gfc_build_addr_expr (gfc_get_pchar_type ((*expr)->ts.kind), +- se->expr), +- (*expr)->ts.kind); +- } ++ else ++ { ++ gfc_conv_variable (se, *expr); ++ se->expr = gfc_string_to_single_character ++ (build_int_cst (integer_type_node, 1), ++ gfc_build_addr_expr (gfc_get_pchar_type ((*expr)->ts.kind), ++ se->expr), ++ (*expr)->ts.kind); + } + } + } +@@ -5986,7 +5974,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, + && fsym->ns->proc_name->attr.is_bind_c) + { + parmse.expr = NULL; +- gfc_conv_scalar_char_value (fsym, &parmse, &e); ++ conv_scalar_char_value (fsym, &parmse, &e); + if (parmse.expr == NULL) + gfc_conv_expr (&parmse, e); + } +diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c +index 96b8b512749..c29f6b73349 100644 +--- a/gcc/fortran/trans-types.c ++++ b/gcc/fortran/trans-types.c +@@ -2245,7 +2245,7 @@ gfc_sym_type (gfc_symbol * sym) + + if (sym->ts.type == BT_CHARACTER + && ((sym->attr.function && sym->attr.is_bind_c) +- || (sym->attr.result ++ || ((sym->attr.result || sym->attr.value) + && sym->ns->proc_name + && sym->ns->proc_name->attr.is_bind_c) + || (sym->ts.deferred && (!sym->ts.u.cl +diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h +index bc032231d3a..fb47377b853 100644 +--- a/gcc/fortran/trans.h ++++ b/gcc/fortran/trans.h +@@ -507,7 +507,6 @@ void gfc_conv_expr_type (gfc_se * se, gfc_expr *, tree); + /* trans-expr.c */ + tree gfc_conv_scalar_to_descriptor (gfc_se *, tree, symbol_attribute); + tree gfc_get_ultimate_alloc_ptr_comps_caf_token (gfc_se *, gfc_expr *); +-void gfc_conv_scalar_char_value (gfc_symbol *sym, gfc_se *se, gfc_expr **expr); + tree gfc_string_to_single_character (tree len, tree str, int kind); + tree gfc_get_tree_for_caf_expr (gfc_expr *); + void gfc_get_caf_token_offset (gfc_se*, tree *, tree *, tree, tree, gfc_expr *); +diff --git a/gcc/function.c b/gcc/function.c +index 1352863acbc..fbf4f02eba8 100644 +--- a/gcc/function.c ++++ b/gcc/function.c +@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3. If not see + #include "varasm.h" + #include "except.h" + #include "dojump.h" +-#include "explow.h" + #include "calls.h" ++#include "explow.h" + #include "expr.h" + #include "optabs-tree.h" + #include "output.h" +@@ -2443,7 +2443,10 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + else if (DECL_CHAIN (parm)) + data->arg.named = 1; /* Not the last non-variadic parm. */ + else if (targetm.calls.strict_argument_naming (all->args_so_far)) +- data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ { ++ data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ data->arg.last_named = 1; ++ } + else + data->arg.named = 0; /* Treat as variadic. */ + +@@ -2485,9 +2488,12 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + + /* Find mode as it is passed by the ABI. */ + unsignedp = TYPE_UNSIGNED (data->arg.type); +- data->arg.mode +- = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, +- TREE_TYPE (current_function_decl), 0); ++// data->arg.mode ++// = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, ++// TREE_TYPE (current_function_decl), 0); ++ data->arg.mode = promote_function_mode (all->args_so_far, data->arg, ++ TREE_TYPE (current_function_decl), ++ &unsignedp, 0); + } + + /* A subroutine of assign_parms. Invoke setup_incoming_varargs. */ +@@ -2500,6 +2506,7 @@ assign_parms_setup_varargs (struct assign_parm_data_all *all, + + function_arg_info last_named_arg = data->arg; + last_named_arg.named = true; ++ last_named_arg.last_named = true; + targetm.calls.setup_incoming_varargs (all->args_so_far, last_named_arg, + &varargs_pretend_bytes, no_rtl); + +@@ -2608,7 +2615,9 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all, + + locate_and_pad_parm (data->arg.mode, data->arg.type, in_regs, + all->reg_parm_stack_space, +- entry_parm ? data->partial : 0, current_function_decl, ++ entry_parm ? data->partial : 0, ++ all->args_so_far, ++ current_function_decl, + &all->stack_args_size, &data->locate); + + /* Update parm_stack_boundary if this parameter is passed in the +@@ -3907,7 +3916,8 @@ gimplify_parameters (gimple_seq *cleanup) + if (data.arg.pass_by_reference) + { + tree type = TREE_TYPE (data.arg.type); +- function_arg_info orig_arg (type, data.arg.named); ++ function_arg_info orig_arg (type, data.arg.named, ++ data.arg.last_named); + if (reference_callee_copied (&all.args_so_far_v, orig_arg)) + { + tree local, t; +@@ -4010,6 +4020,7 @@ gimplify_parameters (gimple_seq *cleanup) + void + locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + int reg_parm_stack_space, int partial, ++ cumulative_args_t ca, + tree fndecl ATTRIBUTE_UNUSED, + struct args_size *initial_offset_ptr, + struct locate_and_pad_arg_data *locate) +@@ -4047,9 +4058,23 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + ? arg_size_in_bytes (type) + : size_int (GET_MODE_SIZE (passed_mode))); + where_pad = targetm.calls.function_arg_padding (passed_mode, type); +- boundary = targetm.calls.function_arg_boundary (passed_mode, type); +- round_boundary = targetm.calls.function_arg_round_boundary (passed_mode, +- type); ++ ++ if (flag_stack_use_cumulative_args) ++ { ++ boundary = targetm.calls.function_arg_boundary_ca (passed_mode, ++ type, ++ ca); ++ round_boundary = targetm.calls.function_arg_round_boundary_ca ++ (passed_mode, type, ca); ++ } ++ else ++ { ++ boundary = targetm.calls.function_arg_boundary (passed_mode, ++ type); ++ round_boundary = targetm.calls.function_arg_round_boundary ++ (passed_mode, type); ++ } ++ + locate->where_pad = where_pad; + + /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */ +diff --git a/gcc/function.h b/gcc/function.h +index a41514acafc..9f2f46e32cb 100644 +--- a/gcc/function.h ++++ b/gcc/function.h +@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_FUNCTION_H + #define GCC_FUNCTION_H + ++#include "cumulative-args.h" + + /* Stack of pending (incomplete) sequences saved by `start_sequence'. + Each element describes one pending sequence. +@@ -654,6 +655,7 @@ extern int aggregate_value_p (const_tree, const_tree); + extern bool use_register_for_decl (const_tree); + extern gimple_seq gimplify_parameters (gimple_seq *); + extern void locate_and_pad_parm (machine_mode, tree, int, int, int, ++ cumulative_args_t, + tree, struct args_size *, + struct locate_and_pad_arg_data *); + extern void generate_setjmp_warnings (void); +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 20a649ea08e..0c4e3d8dbdc 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -567,6 +567,7 @@ or with constant text in a single argument. + %l process LINK_SPEC as a spec. + %L process LIB_SPEC as a spec. + %M Output multilib_os_dir. ++ %P Output a RUNPATH_OPTION for each directory in startfile_prefixes. + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. +@@ -1186,6 +1187,10 @@ proper position among the other output files. */ + # define SYSROOT_HEADERS_SUFFIX_SPEC "" + #endif + ++#ifndef RUNPATH_OPTION ++# define RUNPATH_OPTION "-rpath" ++#endif ++ + static const char *asm_debug = ASM_DEBUG_SPEC; + static const char *asm_debug_option = ASM_DEBUG_OPTION_SPEC; + static const char *cpp_spec = CPP_SPEC; +@@ -5788,6 +5793,7 @@ struct spec_path_info { + size_t append_len; + bool omit_relative; + bool separate_options; ++ bool realpaths; + }; + + static void * +@@ -5797,6 +5803,16 @@ spec_path (char *path, void *data) + size_t len = 0; + char save = 0; + ++ /* The path must exist; we want to resolve it to the realpath so that this ++ can be embedded as a runpath. */ ++ if (info->realpaths) ++ path = lrealpath (path); ++ ++ /* However, if we failed to resolve it - perhaps because there was a bogus ++ -B option on the command line, then punt on this entry. */ ++ if (!path) ++ return NULL; ++ + if (info->omit_relative && !IS_ABSOLUTE_PATH (path)) + return NULL; + +@@ -6031,6 +6047,22 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + info.omit_relative = false; + #endif + info.separate_options = false; ++ info.realpaths = false; ++ ++ for_each_path (&startfile_prefixes, true, 0, spec_path, &info); ++ } ++ break; ++ ++ case 'P': ++ { ++ struct spec_path_info info; ++ ++ info.option = RUNPATH_OPTION; ++ info.append_len = 0; ++ info.omit_relative = false; ++ info.separate_options = true; ++ /* We want to embed the actual paths that have the libraries. */ ++ info.realpaths = true; + + for_each_path (&startfile_prefixes, true, 0, spec_path, &info); + } +@@ -6357,6 +6389,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + info.append_len = strlen (info.append); + info.omit_relative = false; + info.separate_options = true; ++ info.realpaths = false; + + for_each_path (&include_prefixes, false, info.append_len, + spec_path, &info); +diff --git a/gcc/gengtype-state.c b/gcc/gengtype-state.c +index 891f2e18a61..fb99729bc0e 100644 +--- a/gcc/gengtype-state.c ++++ b/gcc/gengtype-state.c +@@ -57,6 +57,7 @@ type_lineloc (const_type_p ty) + case TYPE_STRING: + case TYPE_POINTER: + case TYPE_ARRAY: ++ case TYPE_CALLBACK: + return NULL; + default: + gcc_unreachable (); +@@ -171,6 +172,7 @@ private: + void write_state_version (const char *version); + void write_state_scalar_type (type_p current); + void write_state_string_type (type_p current); ++ void write_state_callback_type (type_p current); + void write_state_undefined_type (type_p current); + void write_state_struct_union_type (type_p current, const char *kindstr); + void write_state_struct_type (type_p current); +@@ -898,6 +900,20 @@ state_writer::write_state_string_type (type_p current) + fatal ("Unexpected type in write_state_string_type"); + } + ++/* Write the callback type. There is only one such thing! */ ++void ++state_writer::write_state_callback_type (type_p current) ++{ ++ if (current == &callback_type) ++ { ++ write_any_indent (0); ++ fprintf (state_file, "callback "); ++ write_state_common_type_content (current); ++ } ++ else ++ fatal ("Unexpected type in write_state_callback_type"); ++} ++ + /* Write an undefined type. */ + void + state_writer::write_state_undefined_type (type_p current) +@@ -1143,6 +1159,9 @@ state_writer::write_state_type (type_p current) + case TYPE_STRING: + write_state_string_type (current); + break; ++ case TYPE_CALLBACK: ++ write_state_callback_type (current); ++ break; + } + } + +@@ -1477,6 +1496,14 @@ read_state_string_type (type_p *type) + read_state_common_type_content (*type); + } + ++/* Read the callback_type. */ ++static void ++read_state_callback_type (type_p *type) ++{ ++ *type = &callback_type; ++ read_state_common_type_content (*type); ++} ++ + + /* Read a lang_bitmap representing a set of GCC front-end languages. */ + static void +@@ -1834,6 +1861,11 @@ read_state_type (type_p *current) + next_state_tokens (1); + read_state_string_type (current); + } ++ else if (state_token_is_name (t0, "callback")) ++ { ++ next_state_tokens (1); ++ read_state_callback_type (current); ++ } + else if (state_token_is_name (t0, "undefined")) + { + *current = XCNEW (struct type); +diff --git a/gcc/gengtype.c b/gcc/gengtype.c +index 98d4626f87e..fdddb6fe6f0 100644 +--- a/gcc/gengtype.c ++++ b/gcc/gengtype.c +@@ -167,6 +167,7 @@ dbgprint_count_type_at (const char *fil, int lin, const char *msg, type_p t) + int nb_struct = 0, nb_union = 0, nb_array = 0, nb_pointer = 0; + int nb_lang_struct = 0; + int nb_user_struct = 0, nb_undefined = 0; ++ int nb_callback = 0; + type_p p = NULL; + for (p = t; p; p = p->next) + { +@@ -197,6 +198,9 @@ dbgprint_count_type_at (const char *fil, int lin, const char *msg, type_p t) + case TYPE_ARRAY: + nb_array++; + break; ++ case TYPE_CALLBACK: ++ nb_callback++; ++ break; + case TYPE_LANG_STRUCT: + nb_lang_struct++; + break; +@@ -212,6 +216,8 @@ dbgprint_count_type_at (const char *fil, int lin, const char *msg, type_p t) + fprintf (stderr, "@@%%@@ %d structs, %d unions\n", nb_struct, nb_union); + if (nb_pointer > 0 || nb_array > 0) + fprintf (stderr, "@@%%@@ %d pointers, %d arrays\n", nb_pointer, nb_array); ++ if (nb_callback > 0) ++ fprintf (stderr, "@@%%@@ %d callbacks\n", nb_callback); + if (nb_lang_struct > 0) + fprintf (stderr, "@@%%@@ %d lang_structs\n", nb_lang_struct); + if (nb_user_struct > 0) +@@ -490,6 +496,10 @@ struct type scalar_char = { + TYPE_SCALAR, 0, 0, 0, GC_USED, {0} + }; + ++struct type callback_type = { ++ TYPE_CALLBACK, 0, 0, 0, GC_USED, {0} ++}; ++ + /* Lists of various things. */ + + pair_p typedefs = NULL; +@@ -1459,7 +1469,7 @@ static void set_gc_used (pair_p); + + static void + process_gc_options (options_p opt, enum gc_used_enum level, int *maybe_undef, +- int *length, int *skip, type_p *nested_ptr) ++ int *length, int *skip, int *callback, type_p *nested_ptr) + { + options_p o; + for (o = opt; o; o = o->next) +@@ -1473,6 +1483,8 @@ process_gc_options (options_p opt, enum gc_used_enum level, int *maybe_undef, + *length = 1; + else if (strcmp (o->name, "skip") == 0) + *skip = 1; ++ else if (strcmp (o->name, "callback") == 0) ++ *callback = 1; + else if (strcmp (o->name, "nested_ptr") == 0 + && o->kind == OPTION_NESTED) + *nested_ptr = ((const struct nested_ptr_data *) o->info.nested)->type; +@@ -1521,7 +1533,7 @@ set_gc_used_type (type_p t, enum gc_used_enum level, + type_p dummy2; + bool allow_undefined_field_types = (t->kind == TYPE_USER_STRUCT); + +- process_gc_options (t->u.s.opt, level, &dummy, &dummy, &dummy, ++ process_gc_options (t->u.s.opt, level, &dummy, &dummy, &dummy, &dummy, + &dummy2); + + if (t->u.s.base_class) +@@ -1537,9 +1549,10 @@ set_gc_used_type (type_p t, enum gc_used_enum level, + int maybe_undef = 0; + int length = 0; + int skip = 0; ++ int callback = 0; + type_p nested_ptr = NULL; + process_gc_options (f->opt, level, &maybe_undef, &length, &skip, +- &nested_ptr); ++ &callback, &nested_ptr); + + if (nested_ptr && f->type->kind == TYPE_POINTER) + set_gc_used_type (nested_ptr, GC_POINTED_TO); +@@ -1549,6 +1562,8 @@ set_gc_used_type (type_p t, enum gc_used_enum level, + set_gc_used_type (f->type->u.p, GC_MAYBE_POINTED_TO); + else if (skip) + ; /* target type is not used through this field */ ++ else if (callback) ++ f->type = &callback_type; + else + set_gc_used_type (f->type, GC_USED, allow_undefined_field_types); + } +@@ -2469,6 +2484,7 @@ struct walk_type_data + int loopcounter; + bool in_ptr_field; + bool have_this_obj; ++ bool in_nested_ptr; + }; + + +@@ -2512,6 +2528,7 @@ output_mangled_typename (outf_p of, const_type_p t) + { + case TYPE_NONE: + case TYPE_UNDEFINED: ++ case TYPE_CALLBACK: + gcc_unreachable (); + break; + case TYPE_POINTER: +@@ -2712,6 +2729,8 @@ walk_type (type_p t, struct walk_type_data *d) + ; + else if (strcmp (oo->name, "for_user") == 0) + ; ++ else if (strcmp (oo->name, "callback") == 0) ++ ; + else + error_at_line (d->line, "unknown option `%s'\n", oo->name); + +@@ -2737,6 +2756,7 @@ walk_type (type_p t, struct walk_type_data *d) + { + case TYPE_SCALAR: + case TYPE_STRING: ++ case TYPE_CALLBACK: + d->process_field (t, d); + break; + +@@ -2781,6 +2801,7 @@ walk_type (type_p t, struct walk_type_data *d) + if (nested_ptr_d) + { + const char *oldprevval2 = d->prev_val[2]; ++ bool old_in_nested_ptr = d->in_nested_ptr; + + if (!union_or_struct_p (nested_ptr_d->type)) + { +@@ -2791,6 +2812,7 @@ walk_type (type_p t, struct walk_type_data *d) + } + + d->prev_val[2] = d->val; ++ d->in_nested_ptr = true; + oprintf (d->of, "%*s{\n", d->indent, ""); + d->indent += 2; + d->val = xasprintf ("x%d", d->counter++); +@@ -2820,6 +2842,7 @@ walk_type (type_p t, struct walk_type_data *d) + oprintf (d->of, "%*s}\n", d->indent, ""); + d->val = d->prev_val[2]; + d->prev_val[2] = oldprevval2; ++ d->in_nested_ptr = old_in_nested_ptr; + } + else + d->process_field (t->u.p, d); +@@ -3268,6 +3291,7 @@ write_types_process_field (type_p f, const struct walk_type_data *d) + break; + + case TYPE_SCALAR: ++ case TYPE_CALLBACK: + break; + + case TYPE_ARRAY: +@@ -3801,18 +3825,24 @@ write_types_local_user_process_field (type_p f, const struct walk_type_data *d) + case TYPE_UNION: + case TYPE_LANG_STRUCT: + case TYPE_STRING: +- oprintf (d->of, "%*s op (&(%s), cookie);\n", d->indent, "", d->val); ++ if (d->in_nested_ptr) ++ oprintf (d->of, "%*s op (&(%s), &(%s), cookie);\n", ++ d->indent, "", d->val, d->prev_val[2]); ++ oprintf (d->of, "%*s op (&(%s), NULL, cookie);\n", ++ d->indent, "", d->val); + break; + + case TYPE_USER_STRUCT: + if (d->in_ptr_field) +- oprintf (d->of, "%*s op (&(%s), cookie);\n", d->indent, "", d->val); ++ oprintf (d->of, "%*s op (&(%s), NULL, cookie);\n", ++ d->indent, "", d->val); + else + oprintf (d->of, "%*s gt_pch_nx (&(%s), op, cookie);\n", + d->indent, "", d->val); + break; + + case TYPE_SCALAR: ++ case TYPE_CALLBACK: + break; + + case TYPE_ARRAY: +@@ -3883,14 +3913,20 @@ write_types_local_process_field (type_p f, const struct walk_type_data *d) + case TYPE_STRING: + oprintf (d->of, "%*sif ((void *)(%s) == this_obj)\n", d->indent, "", + d->prev_val[3]); +- oprintf (d->of, "%*s op (&(%s), cookie);\n", d->indent, "", d->val); ++ if (d->in_nested_ptr) ++ oprintf (d->of, "%*s op (&(%s), &(%s), cookie);\n", ++ d->indent, "", d->val, d->prev_val[2]); ++ else ++ oprintf (d->of, "%*s op (&(%s), NULL, cookie);\n", ++ d->indent, "", d->val); + break; + + case TYPE_USER_STRUCT: + oprintf (d->of, "%*sif ((void *)(%s) == this_obj)\n", d->indent, "", + d->prev_val[3]); + if (d->in_ptr_field) +- oprintf (d->of, "%*s op (&(%s), cookie);\n", d->indent, "", d->val); ++ oprintf (d->of, "%*s op (&(%s), NULL, cookie);\n", ++ d->indent, "", d->val); + else + oprintf (d->of, "%*s gt_pch_nx (&(%s), op, cookie);\n", + d->indent, "", d->val); +@@ -3899,6 +3935,13 @@ write_types_local_process_field (type_p f, const struct walk_type_data *d) + case TYPE_SCALAR: + break; + ++ case TYPE_CALLBACK: ++ oprintf (d->of, "%*sif ((void *)(%s) == this_obj)\n", d->indent, "", ++ d->prev_val[3]); ++ oprintf (d->of, "%*s gt_pch_note_callback (&(%s), this_obj);\n", ++ d->indent, "", d->val); ++ break; ++ + case TYPE_ARRAY: + case TYPE_NONE: + case TYPE_UNDEFINED: +@@ -4427,6 +4470,7 @@ write_root (outf_p f, pair_p v, type_p type, const char *name, int has_length, + case TYPE_UNDEFINED: + case TYPE_UNION: + case TYPE_LANG_STRUCT: ++ case TYPE_CALLBACK: + error_at_line (line, "global `%s' is unimplemented type", name); + } + } +@@ -4721,6 +4765,9 @@ dump_typekind (int indent, enum typekind kind) + case TYPE_ARRAY: + printf ("TYPE_ARRAY"); + break; ++ case TYPE_CALLBACK: ++ printf ("TYPE_CALLBACK"); ++ break; + case TYPE_LANG_STRUCT: + printf ("TYPE_LANG_STRUCT"); + break; +@@ -4887,6 +4934,7 @@ dump_type (int indent, type_p t) + t->u.scalar_is_char ? "true" : "false"); + break; + case TYPE_STRING: ++ case TYPE_CALLBACK: + break; + case TYPE_STRUCT: + case TYPE_UNION: +diff --git a/gcc/gengtype.h b/gcc/gengtype.h +index 4fe8f0f7232..c32faba2995 100644 +--- a/gcc/gengtype.h ++++ b/gcc/gengtype.h +@@ -149,6 +149,9 @@ enum typekind { + TYPE_UNION, /* Type for GTY-ed discriminated unions. */ + TYPE_POINTER, /* Pointer type to GTY-ed type. */ + TYPE_ARRAY, /* Array of GTY-ed types. */ ++ TYPE_CALLBACK, /* A function pointer that needs relocation if ++ the executable has been loaded at a different ++ address. */ + TYPE_LANG_STRUCT, /* GCC front-end language specific structs. + Various languages may have homonymous but + different structs. */ +@@ -326,6 +329,9 @@ extern struct type string_type; + extern struct type scalar_nonchar; + extern struct type scalar_char; + ++/* The one and only TYPE_CALLBACK. */ ++extern struct type callback_type; ++ + /* Test if a type is a union, either a plain one or a language + specific one. */ + #define UNION_P(x) \ +diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c +index 357bda13f97..a130db8b1e9 100644 +--- a/gcc/ggc-common.c ++++ b/gcc/ggc-common.c +@@ -43,7 +43,7 @@ static ggc_statistics *ggc_stats; + struct traversal_state; + + static int compare_ptr_data (const void *, const void *); +-static void relocate_ptrs (void *, void *); ++static void relocate_ptrs (void *, void *, void *); + static void write_pch_globals (const struct ggc_root_tab * const *tab, + struct traversal_state *state); + +@@ -249,6 +249,8 @@ saving_hasher::equal (const ptr_data *p1, const void *p2) + } + + static hash_table *saving_htab; ++static vec callback_vec; ++static vec reloc_addrs_vec; + + /* Register an object in the hash table. */ + +@@ -281,6 +283,23 @@ gt_pch_note_object (void *obj, void *note_ptr_cookie, + return 1; + } + ++/* Register address of a callback pointer. */ ++void ++gt_pch_note_callback (void *obj, void *base) ++{ ++ void *ptr; ++ memcpy (&ptr, obj, sizeof (void *)); ++ if (ptr != NULL) ++ { ++ struct ptr_data *data ++ = (struct ptr_data *) ++ saving_htab->find_with_hash (base, POINTER_HASH (base)); ++ gcc_assert (data); ++ callback_vec.safe_push ((char *) data->new_addr ++ + ((char *) obj - (char *) base)); ++ } ++} ++ + /* Register an object in the hash table. */ + + void +@@ -348,10 +367,10 @@ compare_ptr_data (const void *p1_p, const void *p2_p) + /* Callbacks for note_ptr_fn. */ + + static void +-relocate_ptrs (void *ptr_p, void *state_p) ++relocate_ptrs (void *ptr_p, void *real_ptr_p, void *state_p) + { + void **ptr = (void **)ptr_p; +- struct traversal_state *state ATTRIBUTE_UNUSED ++ struct traversal_state *state + = (struct traversal_state *)state_p; + struct ptr_data *result; + +@@ -362,6 +381,19 @@ relocate_ptrs (void *ptr_p, void *state_p) + saving_htab->find_with_hash (*ptr, POINTER_HASH (*ptr)); + gcc_assert (result); + *ptr = result->new_addr; ++ if (ptr_p == real_ptr_p) ++ return; ++ if (real_ptr_p == NULL) ++ real_ptr_p = ptr_p; ++ gcc_assert (real_ptr_p >= state->ptrs[state->ptrs_i]->obj ++ && ((char *) real_ptr_p + sizeof (void *) ++ <= ((char *) state->ptrs[state->ptrs_i]->obj ++ + state->ptrs[state->ptrs_i]->size))); ++ void *addr ++ = (void *) ((char *) state->ptrs[state->ptrs_i]->new_addr ++ + ((char *) real_ptr_p ++ - (char *) state->ptrs[state->ptrs_i]->obj)); ++ reloc_addrs_vec.safe_push (addr); + } + + /* Write out, after relocation, the pointers in TAB. */ +@@ -396,6 +428,61 @@ write_pch_globals (const struct ggc_root_tab * const *tab, + } + } + ++/* Callback for qsort. */ ++ ++static int ++compare_ptr (const void *p1_p, const void *p2_p) ++{ ++ void *p1 = *(void *const *)p1_p; ++ void *p2 = *(void *const *)p2_p; ++ return (((uintptr_t)p1 > (uintptr_t)p2) ++ - ((uintptr_t)p1 < (uintptr_t)p2)); ++} ++ ++/* Decode one uleb128 from P, return first byte after it, store ++ decoded value into *VAL. */ ++ ++static unsigned char * ++read_uleb128 (unsigned char *p, size_t *val) ++{ ++ unsigned int shift = 0; ++ unsigned char byte; ++ size_t result; ++ ++ result = 0; ++ do ++ { ++ byte = *p++; ++ result |= ((size_t) byte & 0x7f) << shift; ++ shift += 7; ++ } ++ while (byte & 0x80); ++ ++ *val = result; ++ return p; ++} ++ ++/* Store VAL as uleb128 at P, return length in bytes. */ ++ ++static size_t ++write_uleb128 (unsigned char *p, size_t val) ++{ ++ size_t len = 0; ++ do ++ { ++ unsigned char byte = (val & 0x7f); ++ val >>= 7; ++ if (val != 0) ++ /* More bytes to follow. */ ++ byte |= 0x80; ++ ++ *p++ = byte; ++ ++len; ++ } ++ while (val != 0); ++ return len; ++} ++ + /* Hold the information we need to mmap the file back in. */ + + struct mmap_info +@@ -443,6 +530,10 @@ gt_pch_save (FILE *f) + (The extra work goes in HOST_HOOKS_GT_PCH_GET_ADDRESS and + HOST_HOOKS_GT_PCH_USE_ADDRESS.) */ + mmi.preferred_base = host_hooks.gt_pch_get_address (mmi.size, fileno (f)); ++ /* If the host cannot supply any suitable address for this, we are stuck. */ ++ if (mmi.preferred_base == NULL) ++ fatal_error (input_location, ++ "cannot write PCH file: required memory segment unavailable"); + + ggc_pch_this_base (state.d, mmi.preferred_base); + +@@ -492,6 +583,7 @@ gt_pch_save (FILE *f) + /* Actually write out the objects. */ + for (i = 0; i < state.count; i++) + { ++ state.ptrs_i = i; + if (this_object_size < state.ptrs[i]->size) + { + this_object_size = state.ptrs[i]->size; +@@ -572,13 +664,59 @@ gt_pch_save (FILE *f) + vbits.release (); + #endif + ++ reloc_addrs_vec.qsort (compare_ptr); ++ ++ size_t reloc_addrs_size = 0; ++ void *last_addr = NULL; ++ unsigned char uleb128_buf[sizeof (size_t) * 2]; ++ for (void *addr : reloc_addrs_vec) ++ { ++ gcc_assert ((uintptr_t) addr >= (uintptr_t) mmi.preferred_base ++ && ((uintptr_t) addr + sizeof (void *) ++ < (uintptr_t) mmi.preferred_base + mmi.size)); ++ if (addr == last_addr) ++ continue; ++ if (last_addr == NULL) ++ last_addr = mmi.preferred_base; ++ size_t diff = (uintptr_t) addr - (uintptr_t) last_addr; ++ reloc_addrs_size += write_uleb128 (uleb128_buf, diff); ++ last_addr = addr; ++ } ++ if (fwrite (&reloc_addrs_size, sizeof (reloc_addrs_size), 1, f) != 1) ++ fatal_error (input_location, "cannot write PCH file: %m"); ++ last_addr = NULL; ++ for (void *addr : reloc_addrs_vec) ++ { ++ if (addr == last_addr) ++ continue; ++ if (last_addr == NULL) ++ last_addr = mmi.preferred_base; ++ size_t diff = (uintptr_t) addr - (uintptr_t) last_addr; ++ reloc_addrs_size = write_uleb128 (uleb128_buf, diff); ++ if (fwrite (uleb128_buf, 1, reloc_addrs_size, f) != reloc_addrs_size) ++ fatal_error (input_location, "cannot write PCH file: %m"); ++ last_addr = addr; ++ } ++ + ggc_pch_finish (state.d, state.f); ++ + gt_pch_fixup_stringpool (); + ++ unsigned num_callbacks = callback_vec.length (); ++ void (*pch_save) (FILE *) = >_pch_save; ++ if (fwrite (&pch_save, sizeof (pch_save), 1, f) != 1 ++ || fwrite (&num_callbacks, sizeof (num_callbacks), 1, f) != 1 ++ || (num_callbacks ++ && fwrite (callback_vec.address (), sizeof (void *), num_callbacks, ++ f) != num_callbacks)) ++ fatal_error (input_location, "cannot write PCH file: %m"); ++ + XDELETE (state.ptrs); + XDELETE (this_object); + delete saving_htab; + saving_htab = NULL; ++ callback_vec.release (); ++ reloc_addrs_vec.release (); + } + + /* Read the state of the compiler back in from F. */ +@@ -592,6 +730,13 @@ gt_pch_restore (FILE *f) + struct mmap_info mmi; + int result; + ++ /* We are about to reload the line maps along with the rest of the PCH ++ data, which means that the (loaded) ones cannot be guaranteed to be ++ in any valid state for reporting diagnostics that happen during the ++ load. Save the current table (and use it during the loading process ++ below). */ ++ class line_maps *save_line_table = line_table; ++ + /* Delete any deletable objects. This makes ggc_pch_read much + faster, as it can be sure that no GCable objects remain other + than the ones just read in. */ +@@ -606,20 +751,41 @@ gt_pch_restore (FILE *f) + fatal_error (input_location, "cannot read PCH file: %m"); + + /* Read in all the global pointers, in 6 easy loops. */ ++ bool error_reading_pointers = false; + for (rt = gt_ggc_rtab; *rt; rt++) + for (rti = *rt; rti->base != NULL; rti++) + for (i = 0; i < rti->nelt; i++) + if (fread ((char *)rti->base + rti->stride * i, + sizeof (void *), 1, f) != 1) +- fatal_error (input_location, "cannot read PCH file: %m"); ++ error_reading_pointers = true; ++ ++ /* Stash the newly read-in line table pointer - it does not point to ++ anything meaningful yet, so swap the old one back in. */ ++ class line_maps *new_line_table = line_table; ++ line_table = save_line_table; ++ if (error_reading_pointers) ++ fatal_error (input_location, "cannot read PCH file: %m"); + + if (fread (&mmi, sizeof (mmi), 1, f) != 1) + fatal_error (input_location, "cannot read PCH file: %m"); + ++ void *orig_preferred_base = mmi.preferred_base; + result = host_hooks.gt_pch_use_address (mmi.preferred_base, mmi.size, + fileno (f), mmi.offset); ++ ++ /* We could not mmap or otherwise allocate the required memory at the ++ address needed. */ + if (result < 0) +- fatal_error (input_location, "had to relocate PCH"); ++ { ++ sorry_at (input_location, "PCH allocation failure"); ++ /* There is no point in continuing from here, we will only end up ++ with a crashed (most likely hanging) compiler. */ ++ exit (-1); ++ } ++ ++ /* (0) We allocated memory, but did not mmap the file, so we need to read ++ the data in manually. (>0) Otherwise the mmap succeed for the address ++ we wanted. */ + if (result == 0) + { + if (fseek (f, mmi.offset, SEEK_SET) != 0 +@@ -629,9 +795,108 @@ gt_pch_restore (FILE *f) + else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0) + fatal_error (input_location, "cannot read PCH file: %m"); + ++ size_t reloc_addrs_size; ++ if (fread (&reloc_addrs_size, sizeof (reloc_addrs_size), 1, f) != 1) ++ fatal_error (input_location, "cannot read PCH file: %m"); ++ ++ if (orig_preferred_base != mmi.preferred_base) ++ { ++ uintptr_t bias ++ = (uintptr_t) mmi.preferred_base - (uintptr_t) orig_preferred_base; ++ ++ /* Adjust all the global pointers by bias. */ ++ line_table = new_line_table; ++ for (rt = gt_ggc_rtab; *rt; rt++) ++ for (rti = *rt; rti->base != NULL; rti++) ++ for (i = 0; i < rti->nelt; i++) ++ { ++ char *addr = (char *)rti->base + rti->stride * i; ++ char *p; ++ memcpy (&p, addr, sizeof (void *)); ++ if ((uintptr_t) p >= (uintptr_t) orig_preferred_base ++ && (uintptr_t) p < (uintptr_t) orig_preferred_base + mmi.size) ++ { ++ p = (char *) ((uintptr_t) p + bias); ++ memcpy (addr, &p, sizeof (void *)); ++ } ++ } ++ new_line_table = line_table; ++ line_table = save_line_table; ++ ++ /* And adjust all the pointers in the image by bias too. */ ++ char *addr = (char *) mmi.preferred_base; ++ unsigned char uleb128_buf[4096], *uleb128_ptr = uleb128_buf; ++ while (reloc_addrs_size != 0) ++ { ++ size_t this_size ++ = MIN (reloc_addrs_size, ++ (size_t) (4096 - (uleb128_ptr - uleb128_buf))); ++ if (fread (uleb128_ptr, 1, this_size, f) != this_size) ++ fatal_error (input_location, "cannot read PCH file: %m"); ++ unsigned char *uleb128_end = uleb128_ptr + this_size; ++ if (this_size != reloc_addrs_size) ++ uleb128_end -= 2 * sizeof (size_t); ++ uleb128_ptr = uleb128_buf; ++ while (uleb128_ptr < uleb128_end) ++ { ++ size_t diff; ++ uleb128_ptr = read_uleb128 (uleb128_ptr, &diff); ++ addr = (char *) ((uintptr_t) addr + diff); ++ ++ char *p; ++ memcpy (&p, addr, sizeof (void *)); ++ gcc_assert ((uintptr_t) p >= (uintptr_t) orig_preferred_base ++ && ((uintptr_t) p ++ < (uintptr_t) orig_preferred_base + mmi.size)); ++ p = (char *) ((uintptr_t) p + bias); ++ memcpy (addr, &p, sizeof (void *)); ++ } ++ reloc_addrs_size -= this_size; ++ if (reloc_addrs_size == 0) ++ break; ++ this_size = uleb128_end + 2 * sizeof (size_t) - uleb128_ptr; ++ memcpy (uleb128_buf, uleb128_ptr, this_size); ++ uleb128_ptr = uleb128_buf + this_size; ++ } ++ } ++ else if (fseek (f, (mmi.offset + mmi.size + sizeof (reloc_addrs_size) ++ + reloc_addrs_size), SEEK_SET) != 0) ++ fatal_error (input_location, "cannot read PCH file: %m"); ++ + ggc_pch_read (f, mmi.preferred_base); + ++ void (*pch_save) (FILE *); ++ unsigned num_callbacks; ++ if (fread (&pch_save, sizeof (pch_save), 1, f) != 1 ++ || fread (&num_callbacks, sizeof (num_callbacks), 1, f) != 1) ++ fatal_error (input_location, "cannot read PCH file: %m"); ++ if (pch_save != >_pch_save) ++ { ++ uintptr_t binbias = (uintptr_t) >_pch_save - (uintptr_t) pch_save; ++ void **ptrs = XNEWVEC (void *, num_callbacks); ++ unsigned i; ++ uintptr_t bias ++ = (uintptr_t) mmi.preferred_base - (uintptr_t) orig_preferred_base; ++ ++ if (fread (ptrs, sizeof (void *), num_callbacks, f) != num_callbacks) ++ fatal_error (input_location, "cannot read PCH file: %m"); ++ for (i = 0; i < num_callbacks; ++i) ++ { ++ void *ptr = (void *) ((uintptr_t) ptrs[i] + bias); ++ memcpy (&pch_save, ptr, sizeof (pch_save)); ++ pch_save = (void (*) (FILE *)) ((uintptr_t) pch_save + binbias); ++ memcpy (ptr, &pch_save, sizeof (pch_save)); ++ } ++ XDELETE (ptrs); ++ } ++ else if (fseek (f, num_callbacks * sizeof (void *), SEEK_CUR) != 0) ++ fatal_error (input_location, "cannot read PCH file: %m"); ++ + gt_pch_restore_stringpool (); ++ ++ /* Barring corruption of the PCH file, the restored line table should be ++ complete and usable. */ ++ line_table = new_line_table; + } + + /* Default version of HOST_HOOKS_GT_PCH_GET_ADDRESS when mmap is not present. +@@ -652,7 +917,7 @@ default_gt_pch_get_address (size_t size ATTRIBUTE_UNUSED, + of the PCH file would be required. */ + + int +-default_gt_pch_use_address (void *base, size_t size, int fd ATTRIBUTE_UNUSED, ++default_gt_pch_use_address (void *&base, size_t size, int fd ATTRIBUTE_UNUSED, + size_t offset ATTRIBUTE_UNUSED) + { + void *addr = xmalloc (size); +@@ -698,7 +963,7 @@ mmap_gt_pch_get_address (size_t size, int fd) + mapped with something. */ + + int +-mmap_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) ++mmap_gt_pch_use_address (void *&base, size_t size, int fd, size_t offset) + { + void *addr; + +diff --git a/gcc/ggc-tests.c b/gcc/ggc-tests.c +index 4ee95506625..03e6ed34130 100644 +--- a/gcc/ggc-tests.c ++++ b/gcc/ggc-tests.c +@@ -426,7 +426,7 @@ gt_pch_nx (user_struct *p) + static void + gt_pch_nx (user_struct *p, gt_pointer_operator op, void *cookie) + { +- op (&(p->m_ptr), cookie); ++ op (&(p->m_ptr), NULL, cookie); + } + + /* Verify that GTY((user)) works. */ +diff --git a/gcc/ggc.h b/gcc/ggc.h +index 65f6cb4d19d..3339394b547 100644 +--- a/gcc/ggc.h ++++ b/gcc/ggc.h +@@ -46,6 +46,10 @@ typedef void (*gt_handle_reorder) (void *, void *, gt_pointer_operator, + /* Used by the gt_pch_n_* routines. Register an object in the hash table. */ + extern int gt_pch_note_object (void *, void *, gt_note_pointers); + ++/* Used by the gt_pch_p_* routines. Register address of a callback ++ pointer. */ ++extern void gt_pch_note_callback (void *, void *); ++ + /* Used by the gt_pch_n_* routines. Register that an object has a reorder + function. */ + extern void gt_pch_note_reorder (void *, void *, gt_handle_reorder); +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index 66619fe43b1..bc2074a6566 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -418,9 +418,8 @@ typedef struct { + /* _Float128 is defined as a basic type, so max_align_t must be + sufficiently aligned for it. This code must work in C++, so we + use __float128 here; that is only available on some +- architectures, but only on i386 is extra alignment needed for +- __float128. */ +-#ifdef __i386__ ++ architectures. */ ++#if defined(__i386__) || (__APPLE__ && __aarch64__) + __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); + #endif + } max_align_t; +diff --git a/gcc/hash-map.h b/gcc/hash-map.h +index 0779c930f0a..eaf03856c11 100644 +--- a/gcc/hash-map.h ++++ b/gcc/hash-map.h +@@ -126,7 +126,7 @@ class GTY((user)) hash_map + static void + pch_nx_helper (T *&x, gt_pointer_operator op, void *cookie) + { +- op (&x, cookie); ++ op (&x, NULL, cookie); + } + }; + +@@ -326,7 +326,7 @@ template + static inline void + gt_pch_nx (hash_map *h, gt_pointer_operator op, void *cookie) + { +- op (&h->m_table.m_entries, cookie); ++ op (&h->m_table.m_entries, NULL, cookie); + } + + enum hm_alloc { hm_heap = false, hm_ggc = true }; +diff --git a/gcc/hash-set.h b/gcc/hash-set.h +index 85c31efd412..60b3fcbf0c5 100644 +--- a/gcc/hash-set.h ++++ b/gcc/hash-set.h +@@ -206,7 +206,7 @@ template + static inline void + gt_pch_nx (hash_set *h, gt_pointer_operator op, void *cookie) + { +- op (&h->m_table.m_entries, cookie); ++ op (&h->m_table.m_entries, NULL, cookie); + } + + #endif +diff --git a/gcc/hash-table.h b/gcc/hash-table.h +index a6e0ac8eea9..548a9e23822 100644 +--- a/gcc/hash-table.h ++++ b/gcc/hash-table.h +@@ -1203,7 +1203,7 @@ template + static inline void + gt_pch_nx (hash_table *h, gt_pointer_operator op, void *cookie) + { +- op (&h->m_entries, cookie); ++ op (&h->m_entries, NULL, cookie); + } + + template +diff --git a/gcc/hash-traits.h b/gcc/hash-traits.h +index 57c81bfd34e..6f0373ec27f 100644 +--- a/gcc/hash-traits.h ++++ b/gcc/hash-traits.h +@@ -254,7 +254,7 @@ struct ggc_remove + static void + pch_nx (T &p, gt_pointer_operator op, void *cookie) + { +- op (&p, cookie); ++ op (&p, NULL, cookie); + } + }; + +diff --git a/gcc/hosthooks-def.h b/gcc/hosthooks-def.h +index a87b6d3e580..8f50932274b 100644 +--- a/gcc/hosthooks-def.h ++++ b/gcc/hosthooks-def.h +@@ -35,10 +35,10 @@ along with GCC; see the file COPYING3. If not see + default_gt_pch_alloc_granularity + + extern void* default_gt_pch_get_address (size_t, int); +-extern int default_gt_pch_use_address (void *, size_t, int, size_t); ++extern int default_gt_pch_use_address (void *&, size_t, int, size_t); + extern size_t default_gt_pch_alloc_granularity (void); + extern void* mmap_gt_pch_get_address (size_t, int); +-extern int mmap_gt_pch_use_address (void *, size_t, int, size_t); ++extern int mmap_gt_pch_use_address (void *&, size_t, int, size_t); + + /* The structure is defined in hosthooks.h. */ + #define HOST_HOOKS_INITIALIZER { \ +diff --git a/gcc/hosthooks.h b/gcc/hosthooks.h +index 42ed3dcebf6..8241a533905 100644 +--- a/gcc/hosthooks.h ++++ b/gcc/hosthooks.h +@@ -30,10 +30,12 @@ struct host_hooks + void * (*gt_pch_get_address) (size_t size, int fd); + + /* ADDR is an address returned by gt_pch_get_address. Attempt to allocate +- SIZE bytes at the same address and load it with the data from FD at +- OFFSET. Return -1 if we couldn't allocate memory at ADDR, return 0 +- if the memory is allocated but the data not loaded, return 1 if done. */ +- int (*gt_pch_use_address) (void *addr, size_t size, int fd, size_t offset); ++ SIZE bytes at the same address (preferrably) or some other address ++ and load it with the data from FD at OFFSET. Return -1 if we couldn't ++ allocate memory, otherwise update ADDR to the actual address where it got ++ allocated, return 0 if the memory is allocated but the data not loaded, ++ return 1 if done. */ ++ int (*gt_pch_use_address) (void *&addr, size_t size, int fd, size_t offset); + + /* Return the alignment required for allocating virtual memory. Usually + this is the same as pagesize. */ +diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in +index 7030ab51d4a..372fb180b86 100644 +--- a/gcc/jit/Make-lang.in ++++ b/gcc/jit/Make-lang.in +@@ -69,7 +69,7 @@ LIBGCCJIT_COMPAT = 0 + LIBGCCJIT_BASENAME = libgccjit + + LIBGCCJIT_SONAME = \ +- ${libdir}/$(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib ++ $(DARWIN_RPATH)/$(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib + LIBGCCJIT_FILENAME = $(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib + LIBGCCJIT_LINKER_NAME = $(LIBGCCJIT_BASENAME).dylib + +diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c +index cee9daa8220..6a2f87615f9 100644 +--- a/gcc/jit/jit-playback.c ++++ b/gcc/jit/jit-playback.c +@@ -2743,7 +2743,7 @@ invoke_driver (const char *ctxt_progname, + ADD_ARG ("-fno-use-linker-plugin"); + + #if defined (DARWIN_X86) || defined (DARWIN_PPC) +- /* OS X's linker defaults to treating undefined symbols as errors. ++ /* macOS's linker defaults to treating undefined symbols as errors. + If the context has any imported functions or globals they will be + undefined until the .so is dynamically-linked into the process. + Ensure that the driver passes in "-undefined dynamic_lookup" to the +diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h +index 5c722c2c57f..04efa3a6508 100644 +--- a/gcc/jit/libgccjit.h ++++ b/gcc/jit/libgccjit.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #define LIBGCCJIT_H + + #include ++#ifdef __APPLE__ ++# include /* For ssize_t. */ ++#endif + + #ifdef __cplusplus + extern "C" { +diff --git a/gcc/machmode.h b/gcc/machmode.h +index 158351350de..2e5bafd0f96 100644 +--- a/gcc/machmode.h ++++ b/gcc/machmode.h +@@ -1199,7 +1199,7 @@ gt_pch_nx (pod_mode *) + + template + void +-gt_pch_nx (pod_mode *, void (*) (void *, void *), void *) ++gt_pch_nx (pod_mode *, void (*) (void *, void *, void *), void *) + { + } + +diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c +index cb1fcbb2086..31b20e280c4 100644 +--- a/gcc/objc/objc-act.c ++++ b/gcc/objc/objc-act.c +@@ -1305,6 +1305,7 @@ objc_add_property_declaration (location_t location, tree decl, + TREE_TYPE (property_decl) = p_type; + DECL_SOURCE_LOCATION (property_decl) = DECL_SOURCE_LOCATION (decl); + TREE_DEPRECATED (property_decl) = TREE_DEPRECATED (decl); ++ TREE_UNAVAILABLE (property_decl) = TREE_UNAVAILABLE (decl); + + /* Add property-specific information. */ + PROPERTY_NAME (property_decl) = DECL_NAME (decl); +@@ -1442,6 +1443,7 @@ maybe_make_artificial_property_decl (tree interface, tree implementation, + TREE_TYPE (property_decl) = type; + DECL_SOURCE_LOCATION (property_decl) = input_location; + TREE_DEPRECATED (property_decl) = 0; ++ TREE_UNAVAILABLE (property_decl) = 0; + DECL_ARTIFICIAL (property_decl) = 1; + + /* Add property-specific information. Note that one of +@@ -1720,7 +1722,7 @@ objc_maybe_build_component_ref (tree object, tree property_ident) + { + tree expression; + tree getter_call; +- tree deprecated_method_prototype = NULL_TREE; ++ tree method_prototype_avail = NULL_TREE; + + /* We have an additional nasty problem here; if this + PROPERTY_REF needs to become a 'getter', then the conversion +@@ -1754,10 +1756,10 @@ objc_maybe_build_component_ref (tree object, tree property_ident) + is deprecated, but record the fact that the getter is + deprecated by setting PROPERTY_REF_DEPRECATED_GETTER to + the method prototype. */ +- &deprecated_method_prototype); ++ &method_prototype_avail); + + expression = build4 (PROPERTY_REF, TREE_TYPE(x), object, x, getter_call, +- deprecated_method_prototype); ++ method_prototype_avail); + SET_EXPR_LOCATION (expression, input_location); + TREE_SIDE_EFFECTS (expression) = 1; + +@@ -1807,7 +1809,9 @@ objc_build_class_component_ref (tree class_name, tree property_ident) + } + else + { +- if (TREE_DEPRECATED (rtype)) ++ if (TREE_UNAVAILABLE (rtype)) ++ error ("class %qE is unavailable", class_name); ++ else if (TREE_DEPRECATED (rtype)) + warning (OPT_Wdeprecated_declarations, "class %qE is deprecated", class_name); + } + +@@ -1819,17 +1823,17 @@ objc_build_class_component_ref (tree class_name, tree property_ident) + { + tree expression; + tree getter_call; +- tree deprecated_method_prototype = NULL_TREE; ++ tree method_prototype_avail = NULL_TREE; + + if (PROPERTY_HAS_NO_GETTER (x)) + getter_call = NULL_TREE; + else + getter_call = objc_finish_message_expr + (object, PROPERTY_GETTER_NAME (x), NULL_TREE, +- &deprecated_method_prototype); ++ &method_prototype_avail); + + expression = build4 (PROPERTY_REF, TREE_TYPE(x), object, x, getter_call, +- deprecated_method_prototype); ++ method_prototype_avail); + SET_EXPR_LOCATION (expression, input_location); + TREE_SIDE_EFFECTS (expression) = 1; + +@@ -3317,7 +3321,7 @@ objc_build_string_object (tree string) + length = TREE_STRING_LENGTH (string) - 1; + + /* The target may have different ideas on how to construct an ObjC string +- literal. On Darwin (Mac OS X), for example, we may wish to obtain a ++ literal. On Darwin / macOS, for example, we may wish to obtain a + constant CFString reference instead. + At present, this is only supported for the NeXT runtime. */ + if (flag_next_runtime +@@ -4600,6 +4604,8 @@ build_private_template (tree klass) + /* Copy the attributes from the class to the type. */ + if (TREE_DEPRECATED (klass)) + TREE_DEPRECATED (record) = 1; ++ if (TREE_UNAVAILABLE (klass)) ++ TREE_UNAVAILABLE (record) = 1; + } + } + +@@ -5025,6 +5031,7 @@ objc_decl_method_attributes (tree *node, tree attributes, int flags) + tree name = TREE_PURPOSE (attribute); + + if (is_attribute_p ("deprecated", name) ++ || is_attribute_p ("unavailable", name) + || is_attribute_p ("sentinel", name) + || is_attribute_p ("noreturn", name)) + { +@@ -5490,9 +5497,9 @@ lookup_method_in_hash_lists (tree sel_name, int is_class) + C++ template functions, it is called from 'build_expr_from_tree' + (in decl2.c) after RECEIVER and METHOD_PARAMS have been expanded. + +- If the DEPRECATED_METHOD_PROTOTYPE argument is NULL, then we warn ++ If the method_prototype_avail argument is NULL, then we warn + if the method being used is deprecated. If it is not NULL, instead +- of deprecating, we set *DEPRECATED_METHOD_PROTOTYPE to the method ++ of deprecating, we set *method_prototype_avail to the method + prototype that was used and is deprecated. This is useful for + getter calls that are always generated when compiling dot-syntax + expressions, even if they may not be used. In that case, we don't +@@ -5501,7 +5508,7 @@ lookup_method_in_hash_lists (tree sel_name, int is_class) + used. */ + tree + objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, +- tree *deprecated_method_prototype) ++ tree *method_prototype_avail) + { + tree method_prototype = NULL_TREE, rprotos = NULL_TREE, rtype; + tree retval, class_tree; +@@ -5813,10 +5820,17 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, + In practice this makes sense since casting an object to 'id' + is often used precisely to turn off warnings associated with + the object being of a particular class. */ +- if (TREE_DEPRECATED (method_prototype) && rtype != NULL_TREE) ++ if (TREE_UNAVAILABLE (method_prototype) && rtype != NULL_TREE) + { +- if (deprecated_method_prototype) +- *deprecated_method_prototype = method_prototype; ++ if (method_prototype_avail) ++ *method_prototype_avail = method_prototype; ++ else ++ error_unavailable_use (method_prototype, NULL_TREE); ++ } ++ else if (TREE_DEPRECATED (method_prototype) && rtype != NULL_TREE) ++ { ++ if (method_prototype_avail) ++ *method_prototype_avail = method_prototype; + else + warn_deprecated_use (method_prototype, NULL_TREE); + } +@@ -6988,7 +7002,9 @@ start_class (enum tree_code code, tree class_name, tree super_name, + } + else + { +- if (TREE_DEPRECATED (super_interface)) ++ if (TREE_UNAVAILABLE (super_interface)) ++ error ("class %qE is not available", super); ++ else if (TREE_DEPRECATED (super_interface)) + warning (OPT_Wdeprecated_declarations, "class %qE is deprecated", + super); + super_name = super; +@@ -7098,7 +7114,9 @@ start_class (enum tree_code code, tree class_name, tree super_name, + /* TODO: Document what the objc_exception attribute is/does. */ + /* We handle the 'deprecated', 'visibility' and (undocumented) + 'objc_exception' attributes. */ +- if (is_attribute_p ("deprecated", name)) ++ if (is_attribute_p ("unavailable", name)) ++ TREE_UNAVAILABLE (klass) = 1; ++ else if (is_attribute_p ("deprecated", name)) + TREE_DEPRECATED (klass) = 1; + else if (is_attribute_p ("objc_exception", name)) + CLASS_HAS_EXCEPTION_ATTR (klass) = 1; +@@ -7129,7 +7147,9 @@ start_class (enum tree_code code, tree class_name, tree super_name, + } + else + { +- if (TREE_DEPRECATED (class_category_is_assoc_with)) ++ if (TREE_UNAVAILABLE (class_category_is_assoc_with)) ++ error ("class %qE is unavailable", class_name); ++ else if (TREE_DEPRECATED (class_category_is_assoc_with)) + warning (OPT_Wdeprecated_declarations, "class %qE is deprecated", + class_name); + +@@ -8156,6 +8176,7 @@ finish_class (tree klass) + else + objc_add_method (objc_interface_context, getter_decl, false, false); + TREE_DEPRECATED (getter_decl) = TREE_DEPRECATED (x); ++ TREE_UNAVAILABLE (getter_decl) = TREE_UNAVAILABLE (x); + METHOD_PROPERTY_CONTEXT (getter_decl) = x; + } + +@@ -8200,6 +8221,7 @@ finish_class (tree klass) + else + objc_add_method (objc_interface_context, setter_decl, false, false); + TREE_DEPRECATED (setter_decl) = TREE_DEPRECATED (x); ++ TREE_UNAVAILABLE (setter_decl) = TREE_UNAVAILABLE (x); + METHOD_PROPERTY_CONTEXT (setter_decl) = x; + } + } +@@ -8253,7 +8275,9 @@ lookup_protocol (tree ident, bool warn_if_deprecated, bool definition_required) + for (chain = protocol_chain; chain; chain = TREE_CHAIN (chain)) + if (ident == PROTOCOL_NAME (chain)) + { +- if (warn_if_deprecated && TREE_DEPRECATED (chain)) ++ if (TREE_UNAVAILABLE (chain)) ++ error ("protocol %qE is unavailable", PROTOCOL_NAME (chain)); ++ else if (warn_if_deprecated && TREE_DEPRECATED (chain)) + { + /* It would be nice to use warn_deprecated_use() here, but + we are using TREE_CHAIN (which is supposed to be the +@@ -8278,6 +8302,7 @@ void + objc_declare_protocol (tree name, tree attributes) + { + bool deprecated = false; ++ bool unavailable = false; + + #ifdef OBJCPLUS + if (current_namespace != global_namespace) { +@@ -8296,6 +8321,8 @@ objc_declare_protocol (tree name, tree attributes) + + if (is_attribute_p ("deprecated", name)) + deprecated = true; ++ else if (is_attribute_p ("unavailable", name)) ++ unavailable = true; + else + warning (OPT_Wattributes, "%qE attribute directive ignored", name); + } +@@ -8320,6 +8347,8 @@ objc_declare_protocol (tree name, tree attributes) + TYPE_ATTRIBUTES (protocol) = attributes; + if (deprecated) + TREE_DEPRECATED (protocol) = 1; ++ if (unavailable) ++ TREE_UNAVAILABLE (protocol) = 1; + } + } + } +@@ -8329,6 +8358,7 @@ start_protocol (enum tree_code code, tree name, tree list, tree attributes) + { + tree protocol; + bool deprecated = false; ++ bool unavailable = false; + + #ifdef OBJCPLUS + if (current_namespace != global_namespace) { +@@ -8347,6 +8377,8 @@ start_protocol (enum tree_code code, tree name, tree list, tree attributes) + + if (is_attribute_p ("deprecated", name)) + deprecated = true; ++ else if (is_attribute_p ("unavailable", name)) ++ unavailable = true; + else + warning (OPT_Wattributes, "%qE attribute directive ignored", name); + } +@@ -8386,6 +8418,8 @@ start_protocol (enum tree_code code, tree name, tree list, tree attributes) + TYPE_ATTRIBUTES (protocol) = attributes; + if (deprecated) + TREE_DEPRECATED (protocol) = 1; ++ if (unavailable) ++ TREE_UNAVAILABLE (protocol) = 1; + } + + return protocol; +@@ -8915,6 +8949,8 @@ really_start_method (tree method, + warnings are produced), but just in case. */ + if (TREE_DEPRECATED (proto)) + TREE_DEPRECATED (method) = 1; ++ if (TREE_UNAVAILABLE (proto)) ++ TREE_UNAVAILABLE (method) = 1; + + /* If the method in the @interface was marked as + 'noreturn', mark the function implementing the method +@@ -9646,12 +9682,17 @@ objc_gimplify_property_ref (tree *expr_p) + return; + } + ++ /* FIXME, this should be a label indicating availability in general. */ + if (PROPERTY_REF_DEPRECATED_GETTER (*expr_p)) + { +- /* PROPERTY_REF_DEPRECATED_GETTER contains the method prototype ++ if (TREE_UNAVAILABLE (PROPERTY_REF_DEPRECATED_GETTER (*expr_p))) ++ error_unavailable_use (PROPERTY_REF_DEPRECATED_GETTER (*expr_p), ++ NULL_TREE); ++ else ++ /* PROPERTY_REF_DEPRECATED_GETTER contains the method prototype + that is deprecated. */ +- warn_deprecated_use (PROPERTY_REF_DEPRECATED_GETTER (*expr_p), +- NULL_TREE); ++ warn_deprecated_use (PROPERTY_REF_DEPRECATED_GETTER (*expr_p), ++ NULL_TREE); + } + + call_exp = getter; +@@ -10327,5 +10368,51 @@ objc_common_tree_size (enum tree_code code) + } + } + ++/* Information for Objective-C-specific features known to __has_feature. */ ++ ++struct objc_feature_info ++{ ++ typedef bool (*predicate_t) (); ++ ++ const char *ident; ++ predicate_t predicate; ++ ++ constexpr objc_feature_info (const char *name) ++ : ident (name), predicate (nullptr) {} ++ constexpr objc_feature_info (const char *name, predicate_t p) ++ : ident (name), predicate (p) {} ++ ++ bool has_feature () const ++ { ++ return predicate ? predicate () : true; ++ } ++}; ++ ++static bool objc_nonfragile_abi_p () ++{ ++ return flag_next_runtime && flag_objc_abi >= 2; ++} ++ ++static constexpr objc_feature_info objc_features[] = ++{ ++ { "objc_default_synthesize_properties" }, ++ { "objc_instancetype" }, ++ { "objc_nonfragile_abi", objc_nonfragile_abi_p } ++}; ++ ++/* Register Objective-C-specific features for __has_feature. */ ++ ++void ++objc_common_register_features () ++{ ++ for (unsigned i = 0; i < ARRAY_SIZE (objc_features); i++) ++ { ++ const objc_feature_info *info = objc_features + i; ++ if (!info->has_feature ()) ++ continue; ++ ++ c_common_register_feature (info->ident, true); ++ } ++} + + #include "gt-objc-objc-act.h" +diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h +index 282ba40bece..b9f4519fc62 100644 +--- a/gcc/objc/objc-act.h ++++ b/gcc/objc/objc-act.h +@@ -28,6 +28,9 @@ const char *objc_printable_name (tree, int); + int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *); + void objc_common_init_ts (void); + ++/* Register features common to Objective-C and Objective-C++. */ ++void objc_common_register_features (); ++ + /* NB: The remaining public functions are prototyped in c-common.h, for the + benefit of stub-objc.c and objc-act.c. */ + +diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.c +index d1b73dde602..549356450d0 100644 +--- a/gcc/objc/objc-lang.c ++++ b/gcc/objc/objc-lang.c +@@ -50,6 +50,16 @@ enum c_language_kind c_language = clk_objc; + /* Each front end provides its own lang hook initializer. */ + struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ objc_common_register_features (); ++ c_register_features (); ++} ++ + /* Lang hook routines common to C and ObjC appear in c-objc-common.c; + there should be very few (if any) routines below. */ + +diff --git a/gcc/objc/objc-next-metadata-tags.h b/gcc/objc/objc-next-metadata-tags.h +index ceb87832359..aea14558b5c 100644 +--- a/gcc/objc/objc-next-metadata-tags.h ++++ b/gcc/objc/objc-next-metadata-tags.h +@@ -79,6 +79,8 @@ enum objc_runtime_tree_index + OCTI_RT_META_MAX + }; + ++extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; ++ + /* Tags for the META data so that the backend can put them in the correct + sections for targets/runtimes (Darwin/NeXT) that require this. + This information also survives LTO - which might produce mixed language +diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c +index 3ec6e1703c1..3d859963385 100644 +--- a/gcc/objc/objc-next-runtime-abi-01.c ++++ b/gcc/objc/objc-next-runtime-abi-01.c +@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3. If not see + + #include "objc-runtime-hooks.h" + #include "objc-runtime-shared-support.h" ++#include "objc-next-metadata-tags.h" + #include "objc-encoding.h" + + /* NeXT ABI 0 and 1 private definitions. */ +@@ -98,14 +99,6 @@ along with GCC; see the file COPYING3. If not see + + #define CLS_HAS_CXX_STRUCTORS 0x2000L + +-/* rt_trees identifiers - shared between NeXT implementations. These +- allow the FE to tag meta-data in a manner that survives LTO and can +- be used when the runtime requires that certain meta-data items +- appear in particular named sections. */ +- +-#include "objc-next-metadata-tags.h" +-extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; +- + static void next_runtime_01_initialize (void); + + static tree next_runtime_abi_01_super_superclassfield_id (void); +diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c +index 2f79f99c731..e3fffecc070 100644 +--- a/gcc/objc/objc-next-runtime-abi-02.c ++++ b/gcc/objc/objc-next-runtime-abi-02.c +@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3. If not see + + #include "objc-runtime-hooks.h" + #include "objc-runtime-shared-support.h" ++#include "objc-next-metadata-tags.h" + #include "objc-encoding.h" + + /* ABI 2 Private definitions. */ +@@ -180,14 +181,6 @@ enum objc_v2_tree_index + #define objc_rethrow_exception_decl \ + objc_v2_global_trees[OCTI_V2_RETHROW_DECL] + +-/* rt_trees identifiers - shared between NeXT implementations. These allow +- the FE to tag meta-data in a manner that survives LTO and can be used when +- the runtime requires that certain meta-data items appear in particular +- named sections. */ +- +-#include "objc-next-metadata-tags.h" +-extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; +- + /* The OCTI_V2_... enumeration itself is in above. */ + static GTY(()) tree objc_v2_global_trees[OCTI_V2_MAX]; + +diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.c +index e68e98af4dd..8aa1ea2761f 100644 +--- a/gcc/objc/objc-runtime-shared-support.c ++++ b/gcc/objc/objc-runtime-shared-support.c +@@ -44,16 +44,11 @@ along with GCC; see the file COPYING3. If not see + #include "objc-runtime-hooks.h" + + #include "objc-runtime-shared-support.h" +-#include "objc-encoding.h" +- +-/* rt_trees identifiers - shared between NeXT implementations. These allow +- the FE to tag meta-data in a manner that survives LTO and can be used when +- the runtime requires that certain meta-data items appear in particular +- named sections. */ + #include "objc-next-metadata-tags.h" +-extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; ++#include "objc-encoding.h" + + /* Rather than repeatedly looking up the identifiers, we save them here. */ ++extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; + tree objc_rt_trees[OCTI_RT_META_MAX]; + + /* For building an objc struct. These might not be used when this file +diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c +index fa72eabbaec..645ae7787c9 100644 +--- a/gcc/objcp/objcp-lang.c ++++ b/gcc/objcp/objcp-lang.c +@@ -82,6 +82,16 @@ objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain, + #undef RECURSE + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ objc_common_register_features (); ++ cp_register_features (); ++} ++ + static void + objcxx_init_ts (void) + { +diff --git a/gcc/opts.c b/gcc/opts.c +index 24bb64198c8..88439f28b93 100644 +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -2873,6 +2873,7 @@ common_handle_option (struct gcc_options *opts, + break; + + case OPT_fuse_ld_bfd: ++ case OPT_fuse_ld_classic: + case OPT_fuse_ld_gold: + case OPT_fuse_ld_lld: + case OPT_fuse_linker_plugin: +diff --git a/gcc/output.h b/gcc/output.h +index 2bfeed93c56..7412407c2c0 100644 +--- a/gcc/output.h ++++ b/gcc/output.h +@@ -458,7 +458,7 @@ struct GTY(()) named_section { + + /* A callback that writes the assembly code for switching to an unnamed + section. The argument provides callback-specific data. */ +-typedef void (*unnamed_section_callback) (const void *); ++typedef void (*unnamed_section_callback) (const char *); + + /* Information about a SECTION_UNNAMED section. */ + struct GTY(()) unnamed_section { +@@ -466,8 +466,8 @@ struct GTY(()) unnamed_section { + + /* The callback used to switch to the section, and the data that + should be passed to the callback. */ +- unnamed_section_callback GTY ((skip)) callback; +- const void *GTY ((skip)) data; ++ unnamed_section_callback GTY ((callback)) callback; ++ const char *data; + + /* The next entry in the chain of unnamed sections. */ + section *next; +@@ -491,7 +491,7 @@ struct GTY(()) noswitch_section { + struct section_common common; + + /* The callback used to assemble decls in this section. */ +- noswitch_section_callback GTY ((skip)) callback; ++ noswitch_section_callback GTY ((callback)) callback; + }; + + /* Information about a section, which may be named or unnamed. */ +@@ -526,8 +526,8 @@ extern GTY(()) section *bss_noswitch_section; + extern GTY(()) section *in_section; + extern GTY(()) bool in_cold_section_p; + +-extern section *get_unnamed_section (unsigned int, void (*) (const void *), +- const void *); ++extern section *get_unnamed_section (unsigned int, void (*) (const char *), ++ const char *); + extern section *get_section (const char *, unsigned int, tree, + bool not_existing = false); + extern section *get_named_section (tree, const char *, int); +@@ -549,7 +549,7 @@ extern section *get_cdtor_priority_section (int, bool); + + extern bool unlikely_text_section_p (section *); + extern void switch_to_section (section *, tree = nullptr); +-extern void output_section_asm_op (const void *); ++extern void output_section_asm_op (const char *); + + extern void record_tm_clone_pair (tree, tree); + extern void finish_tm_clone_pairs (void); +diff --git a/gcc/plugin.c b/gcc/plugin.c +index d47fa512ac1..ca1be134290 100644 +--- a/gcc/plugin.c ++++ b/gcc/plugin.c +@@ -189,10 +189,10 @@ add_new_plugin (const char* plugin_name) + #if defined(__MINGW32__) + static const char plugin_ext[] = ".dll"; + #elif defined(__APPLE__) +- /* Mac OS has two types of libraries: dynamic libraries (.dylib) and ++ /* macOS has two types of libraries: dynamic libraries (.dylib) and + plugins (.bundle). Both can be used with dlopen()/dlsym() but the + former cannot be linked at build time (i.e., with the -lfoo linker +- option). A GCC plugin is therefore probably a Mac OS plugin but their ++ option). A GCC plugin is therefore probably a macOS plugin but their + use seems to be quite rare and the .bundle extension is more of a + recommendation rather than the rule. This raises the questions of how + well they are supported by tools (e.g., libtool). So to avoid +diff --git a/gcc/poly-int.h b/gcc/poly-int.h +index f47f9e436a8..be5330775ca 100644 +--- a/gcc/poly-int.h ++++ b/gcc/poly-int.h +@@ -2717,7 +2717,7 @@ gt_pch_nx (poly_int_pod *) + + template + void +-gt_pch_nx (poly_int_pod *, void (*) (void *, void *), void *) ++gt_pch_nx (poly_int_pod *, void (*) (void *, void *, void *), void *) + { + } + +diff --git a/gcc/print-tree.c b/gcc/print-tree.c +index 8ad0dcfbbf0..d1fbd044c27 100644 +--- a/gcc/print-tree.c ++++ b/gcc/print-tree.c +@@ -364,6 +364,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent, + fputs (code == CALL_EXPR ? " must-tail-call" : " static", file); + if (TREE_DEPRECATED (node)) + fputs (" deprecated", file); ++ if (TREE_UNAVAILABLE (node)) ++ fputs (" unavailable", file); + if (TREE_VISITED (node)) + fputs (" visited", file); + +diff --git a/gcc/stringpool.c b/gcc/stringpool.c +index e4d79b0dca0..fa4548e93a5 100644 +--- a/gcc/stringpool.c ++++ b/gcc/stringpool.c +@@ -219,7 +219,7 @@ gt_pch_nx (unsigned char& x ATTRIBUTE_UNUSED) + void + gt_pch_nx (unsigned char *x, gt_pointer_operator op, void *cookie) + { +- op (x, cookie); ++ op (x, NULL, cookie); + } + + /* Handle saving and restoring the string pool for PCH. */ +diff --git a/gcc/target.def b/gcc/target.def +index 258b414e230..698c8945d5a 100644 +--- a/gcc/target.def ++++ b/gcc/target.def +@@ -4496,6 +4496,13 @@ if you would like to apply the same rules given by @code{PROMOTE_MODE}.", + const_tree funtype, int for_return), + default_promote_function_mode) + ++DEFHOOK ++(promote_function_mode_ca, ++ "Like @code{promote_function_mode}, but takes a cumulative_args pointer \ ++ and a current arg to supply the input.", ++ machine_mode, (cumulative_args_t, function_arg_info, const_tree, int *, int), ++ default_promote_function_mode_ca) ++ + DEFHOOK + (promote_prototypes, + "This target hook returns @code{true} if an argument declared in a\n\ +@@ -4943,6 +4950,18 @@ with the specified mode and type. The default hook returns\n\ + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_boundary) + ++DEFHOOK ++(function_arg_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument alignment, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_boundary_ca) ++ + DEFHOOK + (function_arg_round_boundary, + "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\ +@@ -4952,6 +4971,18 @@ value.", + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_round_boundary) + ++DEFHOOK ++(function_arg_round_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument size rounding, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_round_boundary_ca) ++ + /* Return the diagnostic message string if function without a prototype + is not allowed for this 'val' argument; NULL otherwise. */ + DEFHOOK +@@ -6990,6 +7021,16 @@ DEFHOOK + void, (void), + NULL) + ++/* This value represents whether __builtin_unreachable should be expanded ++ as a trap instruction (or an abort() if the trap is not available). */ ++DEFHOOK ++(unreachable_should_trap, ++ "This hook should return @code{true} if the target wants \ ++ @code{__builtin_unreachable} to expand to a trap or @code{abort ()}.\n\ ++ The default value is false.", ++ bool, (void), ++ hook_bool_void_false) ++ + /* Close the 'struct gcc_target' definition. */ + HOOK_VECTOR_END (C90_EMPTY_HACK) + +diff --git a/gcc/target.h b/gcc/target.h +index d8f45fb99c3..175d5a09948 100644 +--- a/gcc/target.h ++++ b/gcc/target.h +@@ -51,22 +51,8 @@ + #include "insn-codes.h" + #include "tm.h" + #include "hard-reg-set.h" +- +-#if CHECKING_P +- +-struct cumulative_args_t { void *magic; void *p; }; +- +-#else /* !CHECKING_P */ +- +-/* When using a GCC build compiler, we could use +- __attribute__((transparent_union)) to get cumulative_args_t function +- arguments passed like scalars where the ABI would mandate a less +- efficient way of argument passing otherwise. However, that would come +- at the cost of less type-safe !CHECKING_P compilation. */ +- +-union cumulative_args_t { void *p; }; +- +-#endif /* !CHECKING_P */ ++#include "tree-core.h" ++#include "cumulative-args.h" + + /* Types of memory operation understood by the "by_pieces" infrastructure. + Used by the TARGET_USE_BY_PIECES_INFRASTRUCTURE_P target hook and +diff --git a/gcc/targhooks.c b/gcc/targhooks.c +index 952fad422eb..186ae646f7b 100644 +--- a/gcc/targhooks.c ++++ b/gcc/targhooks.c +@@ -155,6 +155,15 @@ default_promote_function_mode_always_promote (const_tree type, + return promote_mode (type, mode, punsignedp); + } + ++machine_mode ++default_promote_function_mode_ca (cumulative_args_t, function_arg_info arg, ++ const_tree funtype, int *punsignedp, ++ int for_return) ++{ ++ return promote_function_mode (arg.type, arg.mode, punsignedp, ++ funtype, for_return); ++} ++ + machine_mode + default_cc_modes_compatible (machine_mode m1, machine_mode m2) + { +@@ -827,6 +836,14 @@ default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_boundary (mode, type); ++} ++ + unsigned int + default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + const_tree type ATTRIBUTE_UNUSED) +@@ -834,6 +851,14 @@ default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_round_boundary (mode, type); ++} ++ + void + hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED) + { +diff --git a/gcc/targhooks.h b/gcc/targhooks.h +index 9928d064abd..72476117609 100644 +--- a/gcc/targhooks.h ++++ b/gcc/targhooks.h +@@ -34,6 +34,9 @@ extern machine_mode default_promote_function_mode (const_tree, machine_mode, + extern machine_mode default_promote_function_mode_always_promote + (const_tree, machine_mode, int *, const_tree, int); + ++extern machine_mode default_promote_function_mode_ca ++ (cumulative_args_t, function_arg_info, const_tree, int *, int); ++ + extern machine_mode default_cc_modes_compatible (machine_mode, + machine_mode); + +@@ -158,6 +161,12 @@ extern unsigned int default_function_arg_boundary (machine_mode, + const_tree); + extern unsigned int default_function_arg_round_boundary (machine_mode, + const_tree); ++extern unsigned int default_function_arg_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); ++extern unsigned int default_function_arg_round_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); + extern bool hook_bool_const_rtx_commutative_p (const_rtx, int); + extern rtx default_function_value (const_tree, const_tree, bool); + extern HARD_REG_SET default_zero_call_used_regs (HARD_REG_SET); +diff --git a/gcc/toplev.c b/gcc/toplev.c +index d8cc254adef..a88e6981cbf 100644 +--- a/gcc/toplev.c ++++ b/gcc/toplev.c +@@ -1381,7 +1381,7 @@ process_options (void) + option flags in use. */ + if (version_flag) + { +- print_version (stderr, "", true); ++ /* We already printed the version header in main (). */ + if (!quiet_flag) + { + fputs ("options passed: ", stderr); +diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c +index f4ec77f1bb0..ebe8585d034 100644 +--- a/gcc/tree-cfg.c ++++ b/gcc/tree-cfg.c +@@ -9884,13 +9884,13 @@ void + gt_pch_nx (edge_def *e, gt_pointer_operator op, void *cookie) + { + tree block = LOCATION_BLOCK (e->goto_locus); +- op (&(e->src), cookie); +- op (&(e->dest), cookie); ++ op (&(e->src), NULL, cookie); ++ op (&(e->dest), NULL, cookie); + if (current_ir_type () == IR_GIMPLE) +- op (&(e->insns.g), cookie); ++ op (&(e->insns.g), NULL, cookie); + else +- op (&(e->insns.r), cookie); +- op (&(block), cookie); ++ op (&(e->insns.r), NULL, cookie); ++ op (&(block), &(block), cookie); + } + + #if CHECKING_P +diff --git a/gcc/tree-core.h b/gcc/tree-core.h +index c31b8ebf249..2b7adaddbe0 100644 +--- a/gcc/tree-core.h ++++ b/gcc/tree-core.h +@@ -1023,7 +1023,8 @@ struct GTY(()) tree_base { + unsigned user_align : 1; + unsigned nameless_flag : 1; + unsigned atomic_flag : 1; +- unsigned spare0 : 3; ++ unsigned unavailable_flag : 1; ++ unsigned spare0 : 2; + + unsigned spare1 : 8; + +@@ -1345,6 +1346,12 @@ struct GTY(()) tree_base { + SSA_NAME_POINTS_TO_READONLY_MEMORY in + SSA_NAME + ++ unavailable_flag: ++ ++ TREE_UNAVAILABLE in ++ all decls ++ all types ++ + visited: + + TREE_VISITED in +@@ -1392,6 +1399,7 @@ struct GTY(()) tree_base { + + CALL_EXPR_BY_DESCRIPTOR in + CALL_EXPR ++ + */ + + struct GTY(()) tree_typed { +@@ -1927,7 +1935,7 @@ struct GTY(()) tree_function_decl { + struct GTY(()) tree_translation_unit_decl { + struct tree_decl_common common; + /* Source language of this translation unit. Used for DWARF output. */ +- const char * GTY((skip(""))) language; ++ const char *language; + /* TODO: Non-optimization used to build this translation unit. */ + /* TODO: Root of a partial DWARF tree for global types and decls. */ + }; +diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c +index 6cc334e8e5e..2a9a6f233c5 100644 +--- a/gcc/tree-nested.c ++++ b/gcc/tree-nested.c +@@ -611,6 +611,14 @@ get_trampoline_type (struct nesting_info *info) + if (trampoline_type) + return trampoline_type; + ++ /* When trampolines are created off-stack then the only thing we need in the ++ local frame is a single pointer. */ ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ trampoline_type = build_pointer_type (void_type_node); ++ return trampoline_type; ++ } ++ + align = TRAMPOLINE_ALIGNMENT; + size = TRAMPOLINE_SIZE; + +@@ -2761,17 +2769,27 @@ convert_tramp_reference_op (tree *tp, int *walk_subtrees, void *data) + + /* Compute the address of the field holding the trampoline. */ + x = get_frame_field (info, target_context, x, &wi->gsi); +- x = build_addr (x); +- x = gsi_gimplify_val (info, x, &wi->gsi); + +- /* Do machine-specific ugliness. Normally this will involve +- computing extra alignment, but it can really be anything. */ +- if (descr) +- builtin = builtin_decl_implicit (BUILT_IN_ADJUST_DESCRIPTOR); ++ /* APB: We don't need to do the adjustment calls when using off-stack ++ trampolines, any such adjustment will be done when the off-stack ++ trampoline is created. */ ++ if (!descr && flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ x = gsi_gimplify_val (info, x, &wi->gsi); + else +- builtin = builtin_decl_implicit (BUILT_IN_ADJUST_TRAMPOLINE); +- call = gimple_build_call (builtin, 1, x); +- x = init_tmp_var_with_call (info, &wi->gsi, call); ++ { ++ x = build_addr (x); ++ ++ x = gsi_gimplify_val (info, x, &wi->gsi); ++ ++ /* Do machine-specific ugliness. Normally this will involve ++ computing extra alignment, but it can really be anything. */ ++ if (descr) ++ builtin = builtin_decl_implicit (BUILT_IN_ADJUST_DESCRIPTOR); ++ else ++ builtin = builtin_decl_implicit (BUILT_IN_ADJUST_TRAMPOLINE); ++ call = gimple_build_call (builtin, 1, x); ++ x = init_tmp_var_with_call (info, &wi->gsi, call); ++ } + + /* Cast back to the proper function type. */ + x = build1 (NOP_EXPR, TREE_TYPE (t), x); +@@ -3348,6 +3366,7 @@ build_init_call_stmt (struct nesting_info *info, tree decl, tree field, + static void + finalize_nesting_tree_1 (struct nesting_info *root) + { ++ gimple_seq cleanup_list = NULL; + gimple_seq stmt_list = NULL; + gimple *stmt; + tree context = root->context; +@@ -3479,9 +3498,48 @@ finalize_nesting_tree_1 (struct nesting_info *root) + if (!field) + continue; + +- x = builtin_decl_implicit (BUILT_IN_INIT_TRAMPOLINE); +- stmt = build_init_call_stmt (root, i->context, field, x); +- gimple_seq_add_stmt (&stmt_list, stmt); ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ /* We pass a whole bunch of arguments to the builtin function that ++ creates the off-stack trampoline, these are ++ 1. The nested function chain value (that must be passed to the ++ nested function so it can find the function arguments). ++ 2. A pointer to the nested function implementation, ++ 3. The address in the local stack frame where we should write ++ the address of the trampoline. ++ ++ When this code was originally written I just kind of threw ++ everything at the builtin, figuring I'd work out what was ++ actually needed later, I think, the stack pointer could ++ certainly be dropped, arguments #2 and #4 are based off the ++ stack pointer anyway, so #1 doesn't seem to add much value. */ ++ tree arg1, arg2, arg3; ++ ++ gcc_assert (DECL_STATIC_CHAIN (i->context)); ++ arg1 = build_addr (root->frame_decl); ++ arg2 = build_addr (i->context); ++ ++ x = build3 (COMPONENT_REF, TREE_TYPE (field), ++ root->frame_decl, field, NULL_TREE); ++ arg3 = build_addr (x); ++ ++ x = builtin_decl_explicit (BUILT_IN_GCC_NESTED_PTR_CREATED); ++ stmt = gimple_build_call (x, 3, arg1, arg2, arg3); ++ gimple_seq_add_stmt (&stmt_list, stmt); ++ ++ /* This call to delete the nested function trampoline is added to ++ the cleanup list, and called when we exit the current scope. */ ++ x = builtin_decl_explicit (BUILT_IN_GCC_NESTED_PTR_DELETED); ++ stmt = gimple_build_call (x, 0); ++ gimple_seq_add_stmt (&cleanup_list, stmt); ++ } ++ else ++ { ++ /* Original code to initialise the on stack trampoline. */ ++ x = builtin_decl_implicit (BUILT_IN_INIT_TRAMPOLINE); ++ stmt = build_init_call_stmt (root, i->context, field, x); ++ gimple_seq_add_stmt (&stmt_list, stmt); ++ } + } + } + +@@ -3506,11 +3564,40 @@ finalize_nesting_tree_1 (struct nesting_info *root) + /* If we created initialization statements, insert them. */ + if (stmt_list) + { +- gbind *bind; +- annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); +- bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); +- gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); +- gimple_bind_set_body (bind, stmt_list); ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ /* Handle off-stack trampolines. */ ++ gbind *bind; ++ annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); ++ annotate_all_with_location (cleanup_list, DECL_SOURCE_LOCATION (context)); ++ bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); ++ gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); ++ ++ gimple_seq xxx_list = NULL; ++ ++ if (cleanup_list != NULL) ++ { ++ /* Maybe we shouldn't be creating this try/finally if -fno-exceptions is ++ in use. If this is the case, then maybe we should, instead, be ++ inserting the cleanup code onto every path out of this function? Not ++ yet figured out how we would do this. */ ++ gtry *t = gimple_build_try (stmt_list, cleanup_list, GIMPLE_TRY_FINALLY); ++ gimple_seq_add_stmt (&xxx_list, t); ++ } ++ else ++ xxx_list = stmt_list; ++ ++ gimple_bind_set_body (bind, xxx_list); ++ } ++ else ++ { ++ /* The traditional, on stack trampolines. */ ++ gbind *bind; ++ annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); ++ bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); ++ gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); ++ gimple_bind_set_body (bind, stmt_list); ++ } + } + + /* If a chain_decl was created, then it needs to be registered with +diff --git a/gcc/tree.c b/gcc/tree.c +index 2cbdc7b65ba..0d234a172b5 100644 +--- a/gcc/tree.c ++++ b/gcc/tree.c +@@ -10770,6 +10770,28 @@ build_common_builtin_nodes (void) + "__builtin_nonlocal_goto", + ECF_NORETURN | ECF_NOTHROW); + ++ tree ptr_ptr_type_node = build_pointer_type (ptr_type_node); ++ ++ if (!builtin_decl_explicit_p (BUILT_IN_GCC_NESTED_PTR_CREATED)) ++ { ++ ftype = build_function_type_list (void_type_node, ++ ptr_type_node, // void *chain ++ ptr_type_node, // void *func ++ ptr_ptr_type_node, // void **dst ++ NULL_TREE); ++ local_define_builtin ("__builtin___gcc_nested_func_ptr_created", ftype, ++ BUILT_IN_GCC_NESTED_PTR_CREATED, ++ "__gcc_nested_func_ptr_created", ECF_NOTHROW); ++ } ++ ++ if (!builtin_decl_explicit_p (BUILT_IN_GCC_NESTED_PTR_DELETED)) ++ { ++ ftype = build_function_type_list (void_type_node, NULL_TREE); ++ local_define_builtin ("__builtin___gcc_nested_func_ptr_deleted", ftype, ++ BUILT_IN_GCC_NESTED_PTR_DELETED, ++ "__gcc_nested_func_ptr_deleted", ECF_NOTHROW); ++ } ++ + ftype = build_function_type_list (void_type_node, + ptr_type_node, ptr_type_node, NULL_TREE); + local_define_builtin ("__builtin_setjmp_setup", ftype, +@@ -13301,6 +13323,78 @@ warn_deprecated_use (tree node, tree attr) + return w; + } + ++/* Error out with an identifier which was marked 'unavailable'. */ ++void ++error_unavailable_use (tree node, tree attr) ++{ ++ escaped_string msg; ++ ++ if (node == 0) ++ return; ++ ++ if (!attr) ++ { ++ if (DECL_P (node)) ++ attr = DECL_ATTRIBUTES (node); ++ else if (TYPE_P (node)) ++ { ++ tree decl = TYPE_STUB_DECL (node); ++ if (decl) ++ attr = lookup_attribute ("unavailable", ++ TYPE_ATTRIBUTES (TREE_TYPE (decl))); ++ } ++ } ++ ++ if (attr) ++ attr = lookup_attribute ("unavailable", attr); ++ ++ if (attr) ++ msg.escape (TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)))); ++ ++ if (DECL_P (node)) ++ { ++ auto_diagnostic_group d; ++ if (msg) ++ error ("%qD is unavailable: %s", node, (const char *) msg); ++ else ++ error ("%qD is unavailable", node); ++ inform (DECL_SOURCE_LOCATION (node), "declared here"); ++ } ++ else if (TYPE_P (node)) ++ { ++ tree what = NULL_TREE; ++ tree decl = TYPE_STUB_DECL (node); ++ ++ if (TYPE_NAME (node)) ++ { ++ if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (node); ++ else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (node))) ++ what = DECL_NAME (TYPE_NAME (node)); ++ } ++ ++ auto_diagnostic_group d; ++ if (what) ++ { ++ if (msg) ++ error ("%qE is unavailable: %s", what, (const char *) msg); ++ else ++ error ("%qE is unavailable", what); ++ } ++ else ++ { ++ if (msg) ++ error ("type is unavailable: %s", (const char *) msg); ++ else ++ error ("type is unavailable"); ++ } ++ ++ if (decl) ++ inform (DECL_SOURCE_LOCATION (decl), "declared here"); ++ } ++} ++ + /* Return true if REF has a COMPONENT_REF with a bit-field field declaration + somewhere in it. */ + +diff --git a/gcc/tree.h b/gcc/tree.h +index 32e7024ff23..353896b4210 100644 +--- a/gcc/tree.h ++++ b/gcc/tree.h +@@ -955,6 +955,11 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, + #define TREE_DEPRECATED(NODE) \ + ((NODE)->base.deprecated_flag) + ++/* Nonzero in a _DECL if the use of the name is defined as an ++ unavailable feature by __attribute__((unavailable)). */ ++#define TREE_UNAVAILABLE(NODE) \ ++ ((NODE)->base.u.bits.unavailable_flag) ++ + /* Nonzero indicates an IDENTIFIER_NODE that names an anonymous + aggregate, (as created by anon_aggr_name_format). */ + #define IDENTIFIER_ANON_P(NODE) \ +@@ -5162,6 +5167,7 @@ extern const_tree strip_invariant_refs (const_tree); + extern tree lhd_gcc_personality (void); + extern void assign_assembler_name_if_needed (tree); + extern bool warn_deprecated_use (tree, tree); ++extern void error_unavailable_use (tree, tree); + extern tree cache_integer_cst (tree, bool might_duplicate = false); + extern const char *combined_fn_name (combined_fn); + +diff --git a/gcc/value-range.h b/gcc/value-range.h +index 54623b97a1f..3dbc092eed8 100644 +--- a/gcc/value-range.h ++++ b/gcc/value-range.h +@@ -376,8 +376,8 @@ gt_pch_nx (int_range *x, gt_pointer_operator op, void *cookie) + { + for (unsigned i = 0; i < N; ++i) + { +- op (&x->m_ranges[i * 2], cookie); +- op (&x->m_ranges[i * 2 + 1], cookie); ++ op (&x->m_ranges[i * 2], NULL, cookie); ++ op (&x->m_ranges[i * 2 + 1], NULL, cookie); + } + } + +diff --git a/gcc/varasm.c b/gcc/varasm.c +index 8e456576010..872fe68d4f2 100644 +--- a/gcc/varasm.c ++++ b/gcc/varasm.c +@@ -250,8 +250,8 @@ object_block_hasher::hash (object_block *old) + /* Return a new unnamed section with the given fields. */ + + section * +-get_unnamed_section (unsigned int flags, void (*callback) (const void *), +- const void *data) ++get_unnamed_section (unsigned int flags, void (*callback) (const char *), ++ const char *data) + { + section *sect; + +@@ -7759,9 +7759,9 @@ file_end_indicate_split_stack (void) + a get_unnamed_section callback. */ + + void +-output_section_asm_op (const void *directive) ++output_section_asm_op (const char *directive) + { +- fprintf (asm_out_file, "%s\n", (const char *) directive); ++ fprintf (asm_out_file, "%s\n", directive); + } + + /* Emit assembly code to switch to section NEW_SECTION. Do nothing if +diff --git a/gcc/vec.h b/gcc/vec.h +index 24df2db0eeb..4dd4296b006 100644 +--- a/gcc/vec.h ++++ b/gcc/vec.h +@@ -1378,7 +1378,7 @@ void + gt_pch_nx (vec *v, gt_pointer_operator op, void *cookie) + { + for (unsigned i = 0; i < v->length (); i++) +- op (&((*v)[i]), cookie); ++ op (&((*v)[i]), NULL, cookie); + } + + template +diff --git a/gcc/wide-int.h b/gcc/wide-int.h +index 84c8fa36fb8..dfd7ff3328f 100644 +--- a/gcc/wide-int.h ++++ b/gcc/wide-int.h +@@ -3341,7 +3341,7 @@ gt_pch_nx (generic_wide_int *) + + template + void +-gt_pch_nx (generic_wide_int *, void (*) (void *, void *), void *) ++gt_pch_nx (generic_wide_int *, void (*) (void *, void *, void *), void *) + { + } + +@@ -3359,7 +3359,7 @@ gt_pch_nx (trailing_wide_ints *) + + template + void +-gt_pch_nx (trailing_wide_ints *, void (*) (void *, void *), void *) ++gt_pch_nx (trailing_wide_ints *, void (*) (void *, void *, void *), void *) + { + } + +diff --git a/gotools/Makefile.in b/gotools/Makefile.in +index c442686548d..80907eab2fc 100644 +--- a/gotools/Makefile.in ++++ b/gotools/Makefile.in +@@ -703,8 +703,8 @@ distclean-generic: + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +-@NATIVE_FALSE@uninstall-local: + @NATIVE_FALSE@install-exec-local: ++@NATIVE_FALSE@uninstall-local: + clean: clean-am + + clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ +diff --git a/intl/Makefile.in b/intl/Makefile.in +index ec8c648b7a9..5e44efd76b3 100644 +--- a/intl/Makefile.in ++++ b/intl/Makefile.in +@@ -50,7 +50,11 @@ LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ + DEFS = -DHAVE_CONFIG_H + +-COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(DEFS-$@) $(INCLUDES) ++CTAGS = @CTAGS@ ++ETAGS = @ETAGS@ ++MKID = @MKID@ ++ ++COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) @PICFLAG@ $(DEFS) $(DEFS-$@) $(INCLUDES) + + HEADERS = \ + gmo.h \ +diff --git a/intl/configure b/intl/configure +index 1e100395369..db40c5d0af7 100755 +--- a/intl/configure ++++ b/intl/configure +@@ -623,6 +623,8 @@ ac_header_list= + ac_subst_vars='LTLIBOBJS + LIBOBJS + PICFLAG ++enable_host_pie ++enable_host_shared + BISON3_NO + BISON3_YES + INCINTL +@@ -728,6 +730,7 @@ with_libintl_prefix + with_libintl_type + enable_maintainer_mode + enable_host_shared ++enable_host_pie + ' + ac_precious_vars='build_alias + host_alias +@@ -1353,6 +1356,7 @@ Optional Features: + --disable-rpath do not hardcode runtime library paths + --enable-maintainer-mode enable rules only needed by maintainers + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -6818,15 +6822,31 @@ fi + + + ++# Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + + +- + ac_config_files="$ac_config_files Makefile config.intl" + + cat >confcache <<\_ACEOF +diff --git a/intl/configure.ac b/intl/configure.ac +index 72b145958cf..968561c50cd 100644 +--- a/intl/configure.ac ++++ b/intl/configure.ac +@@ -69,10 +69,25 @@ fi + AC_SUBST(BISON3_YES) + AC_SUBST(BISON3_NO) + ++# Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi + AC_SUBST(PICFLAG) + + AC_CONFIG_FILES(Makefile config.intl) +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index ab8c2da24a1..a8a62910064 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -65,8 +65,13 @@ libatomic_version_script = + libatomic_version_dep = + endif + libatomic_version_info = -version-info $(libtool_VERSION) ++if ENABLE_DARWIN_AT_RPATH ++libatomic_darwin_rpath = -Wc,-nodefaultrpaths ++libatomic_darwin_rpath += -Wl,-rpath,@loader_path ++endif + +-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) ++libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ ++ $(lt_host_flags) $(libatomic_darwin_rpath) + libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ + fenv.c fence.c flag.c + +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index 80d25653dc7..47c1e5354bd 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -403,7 +403,12 @@ noinst_LTLIBRARIES = libatomic_convenience.la + @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map + @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun + libatomic_version_info = -version-info $(libtool_VERSION) +-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libatomic_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ ++ $(lt_host_flags) $(libatomic_darwin_rpath) ++ + libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ + fenv.c fence.c flag.c + +diff --git a/libatomic/configure b/libatomic/configure +index 5867e69ac14..f5350707e83 100755 +--- a/libatomic/configure ++++ b/libatomic/configure +@@ -658,6 +658,8 @@ OPT_LDFLAGS + SECTION_LDFLAGS + enable_aarch64_lse + libtool_VERSION ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE +@@ -803,6 +805,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_symvers + enable_cet +@@ -1451,6 +1454,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7601,7 +7607,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9574,6 +9580,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9591,9 +9640,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11380,7 +11433,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11393 "configure" ++#line 11436 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11486,7 +11539,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11499 "configure" ++#line 11542 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11771,6 +11824,15 @@ fi + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=3:0:2 + +@@ -15588,7 +15650,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -15885,6 +15947,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + if test -z "${LIBAT_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBAT_BUILD_VERSIONED_SHLIB_FALSE}"; then + as_fn_error $? "conditional \"LIBAT_BUILD_VERSIONED_SHLIB\" was never defined. +diff --git a/libatomic/configure.ac b/libatomic/configure.ac +index 2a371870c2f..9669da72109 100644 +--- a/libatomic/configure.ac ++++ b/libatomic/configure.ac +@@ -156,6 +156,8 @@ AC_SUBST(enable_shared) + AC_SUBST(enable_static) + AM_MAINTAINER_MODE + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=3:0:2 + AC_SUBST(libtool_VERSION) +diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am +index 8874f41338a..d200e3a9433 100644 +--- a/libbacktrace/Makefile.am ++++ b/libbacktrace/Makefile.am +@@ -145,18 +145,18 @@ endif HAVE_OBJCOPY_DEBUGLINK + endif HAVE_ELF + + elf_%.c: elf.c ++ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \ +- REPLACE='#undef BACKTRACE_ELF_SIZE\ +- #define BACKTRACE_ELF_SIZE'; \ ++ REPLACE="#undef BACKTRACE_ELF_SIZE\\$${nl}#define BACKTRACE_ELF_SIZE"; \ + $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \ + $< \ + > $@.tmp + mv $@.tmp $@ + + xcoff_%.c: xcoff.c ++ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \ +- REPLACE='#undef BACKTRACE_XCOFF_SIZE\ +- #define BACKTRACE_XCOFF_SIZE'; \ ++ REPLACE="#undef BACKTRACE_XCOFF_SIZE\\$${nl}#define BACKTRACE_XCOFF_SIZE"; \ + $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \ + $< \ + > $@.tmp +diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in +index 2ba8dfa8428..08cdd21fb40 100644 +--- a/libbacktrace/Makefile.in ++++ b/libbacktrace/Makefile.in +@@ -2408,18 +2408,18 @@ uninstall-am: + @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ mv $@.tmp $@ + + @NATIVE_TRUE@elf_%.c: elf.c ++@NATIVE_TRUE@ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + @NATIVE_TRUE@ SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \ +-@NATIVE_TRUE@ REPLACE='#undef BACKTRACE_ELF_SIZE\ +-@NATIVE_TRUE@ #define BACKTRACE_ELF_SIZE'; \ ++@NATIVE_TRUE@ REPLACE="#undef BACKTRACE_ELF_SIZE\\$${nl}#define BACKTRACE_ELF_SIZE"; \ + @NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \ + @NATIVE_TRUE@ $< \ + @NATIVE_TRUE@ > $@.tmp + @NATIVE_TRUE@ mv $@.tmp $@ + + @NATIVE_TRUE@xcoff_%.c: xcoff.c ++@NATIVE_TRUE@ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + @NATIVE_TRUE@ SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \ +-@NATIVE_TRUE@ REPLACE='#undef BACKTRACE_XCOFF_SIZE\ +-@NATIVE_TRUE@ #define BACKTRACE_XCOFF_SIZE'; \ ++@NATIVE_TRUE@ REPLACE="#undef BACKTRACE_XCOFF_SIZE\\$${nl}#define BACKTRACE_XCOFF_SIZE"; \ + @NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \ + @NATIVE_TRUE@ $< \ + @NATIVE_TRUE@ > $@.tmp +diff --git a/libbacktrace/backtrace.c b/libbacktrace/backtrace.c +index 7b629008525..63e5e5a8af2 100644 +--- a/libbacktrace/backtrace.c ++++ b/libbacktrace/backtrace.c +@@ -70,6 +70,13 @@ unwind (struct _Unwind_Context *context, void *vdata) + uintptr_t pc; + int ip_before_insn = 0; + ++#ifdef __APPLE__ ++# undef HAVE_GETIPINFO ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 ++# define HAVE_GETIPINFO 1 ++# endif ++#endif ++ + #ifdef HAVE_GETIPINFO + pc = _Unwind_GetIPInfo (context, &ip_before_insn); + #else +diff --git a/libbacktrace/configure b/libbacktrace/configure +index 9b66bf5563a..635812abb29 100755 +--- a/libbacktrace/configure ++++ b/libbacktrace/configure +@@ -675,6 +675,8 @@ PIC_FLAG + WARN_FLAGS + EXTRA_FLAGS + BACKTRACE_FILE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + OTOOL64 + OTOOL + LIPO +@@ -799,6 +801,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_largefile + enable_cet + with_system_libunwind +@@ -1446,6 +1449,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-largefile omit support for large files + --enable-cet enable Intel CET in target libraries [default=auto] + --enable-host-shared build host code as shared libraries +@@ -7997,7 +8003,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9703,6 +9709,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9720,9 +9769,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11509,7 +11562,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11512 "configure" ++#line 11565 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11615,7 +11668,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11618 "configure" ++#line 11671 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11854,6 +11907,15 @@ CC="$lt_save_CC" + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # Check whether --enable-largefile was given. + if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +@@ -14238,6 +14300,10 @@ if test -z "${HAVE_DWZ_TRUE}" && test -z "${HAVE_DWZ_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DWZ\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${HAVE_ELF_TRUE}" && test -z "${HAVE_ELF_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ELF\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac +index 43a33a66b82..7560d1c6c34 100644 +--- a/libbacktrace/configure.ac ++++ b/libbacktrace/configure.ac +@@ -84,6 +84,8 @@ AM_CONDITIONAL(HAVE_DWZ, test "$DWZ" != "") + LT_INIT + AM_PROG_LIBTOOL + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_SYS_LARGEFILE + + backtrace_supported=yes +diff --git a/libbacktrace/simple.c b/libbacktrace/simple.c +index 785e726e6be..c23901bcc9f 100644 +--- a/libbacktrace/simple.c ++++ b/libbacktrace/simple.c +@@ -65,6 +65,13 @@ simple_unwind (struct _Unwind_Context *context, void *vdata) + uintptr_t pc; + int ip_before_insn = 0; + ++#ifdef __APPLE__ ++# undef HAVE_GETIPINFO ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 ++# define HAVE_GETIPINFO 1 ++# endif ++#endif ++ + #ifdef HAVE_GETIPINFO + pc = _Unwind_GetIPInfo (context, &ip_before_insn); + #else +diff --git a/libcc1/configure b/libcc1/configure +index 021ec265526..32a21528372 100755 +--- a/libcc1/configure ++++ b/libcc1/configure +@@ -787,6 +787,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_cet + with_gcc_major_version_only + enable_werror_always +@@ -1439,6 +1440,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in host libraries [default=auto] + --enable-werror-always enable -Werror despite compiler version + --enable-plugin enable plugin support +@@ -7266,7 +7270,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8971,6 +8975,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8988,9 +9035,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10777,7 +10828,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10790 "configure" ++#line 10831 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10883,7 +10934,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10896 "configure" ++#line 10937 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12165,6 +12216,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12182,12 +12276,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14028,16 +14130,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -14159,7 +14251,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15122,14 +15214,18 @@ fi + # Check that we can build shared objects with -fPIC -shared + saved_LDFLAGS="$LDFLAGS" + saved_CFLAGS="$CFLAGS" ++ saved_CXXFLAGS="$CXXFLAGS" + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` + CFLAGS="$CFLAGS -fPIC" ++ CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g` ++ CXXFLAGS="$CXXFLAGS -fPIC" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) + CFLAGS="$CFLAGS -fPIC" ++ CXXFLAGS="$CXXFLAGS -fPIC" + LDFLAGS="$LDFLAGS -fPIC -shared" + ;; + esac +@@ -15161,6 +15257,7 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + LDFLAGS="$saved_LDFLAGS" + CFLAGS="$saved_CFLAGS" ++ CXXFLAGS="$saved_CXXFLAGS" + + # If plugin support had been requested but not available, fail. + if test x"$enable_plugin" = x"no" ; then +diff --git a/libcody/Makefile.in b/libcody/Makefile.in +index b8b45a2e310..64394ea798a 100644 +--- a/libcody/Makefile.in ++++ b/libcody/Makefile.in +@@ -31,7 +31,7 @@ endif + CXXOPTS += $(filter-out -DHAVE_CONFIG_H,@DEFS@) -include config.h + + # Linker options +-LDFLAGS := @LDFLAGS@ ++LDFLAGS := @LDFLAGS@ @LD_PICFLAG@ + LIBS := @LIBS@ + + # Per-source & per-directory compile flags (warning: recursive) +diff --git a/libcody/configure b/libcody/configure +index da52a5cfca5..0e536c0ccb0 100755 +--- a/libcody/configure ++++ b/libcody/configure +@@ -591,7 +591,10 @@ configure_args + AR + RANLIB + EXCEPTIONS ++LD_PICFLAG + PICFLAG ++enable_host_pie ++enable_host_shared + OBJEXT + EXEEXT + ac_ct_CXX +@@ -653,6 +656,7 @@ enable_maintainer_mode + with_compiler + enable_checking + enable_host_shared ++enable_host_pie + enable_exceptions + ' + ac_precious_vars='build_alias +@@ -1286,6 +1290,7 @@ Optional Features: + yes,no,all,none,release. Flags are: misc,valgrind or + other strings + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-exceptions enable exceptions & rtti + + Optional Packages: +@@ -2635,11 +2640,34 @@ fi + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++else ++ LD_PICFLAG= ++fi ++ ++ + + + # Check whether --enable-exceptions was given. +diff --git a/libcody/configure.ac b/libcody/configure.ac +index 960191ecb72..14e8dd4a226 100644 +--- a/libcody/configure.ac ++++ b/libcody/configure.ac +@@ -63,9 +63,31 @@ fi + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++else ++ LD_PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) + + NMS_ENABLE_EXCEPTIONS + +diff --git a/libcody/netclient.cc b/libcody/netclient.cc +index 7f81dd91810..558808be485 100644 +--- a/libcody/netclient.cc ++++ b/libcody/netclient.cc +@@ -93,7 +93,7 @@ int OpenInet6 (char const **e, char const *name, int port) + } + + addrinfo hints; +- hints.ai_flags = AI_NUMERICSERV; ++ hints.ai_flags = 0; + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; +@@ -102,9 +102,7 @@ int OpenInet6 (char const **e, char const *name, int port) + hints.ai_canonname = nullptr; + hints.ai_next = nullptr; + +- /* getaddrinfo requires a port number, but is quite happy to accept +- invalid ones. So don't rely on it. */ +- if (int err = getaddrinfo (name, "0", &hints, &addrs)) ++ if (int err = getaddrinfo (name, nullptr, &hints, &addrs)) + { + errstr = gai_strerror (err); + // What's the best errno to set? +diff --git a/libcpp/configure b/libcpp/configure +index 7e28606f605..1dfec854f8d 100755 +--- a/libcpp/configure ++++ b/libcpp/configure +@@ -625,6 +625,8 @@ ac_includes_default="\ + ac_subst_vars='LTLIBOBJS + CET_HOST_FLAGS + PICFLAG ++enable_host_pie ++enable_host_shared + MAINT + USED_CATALOGS + PACKAGE +@@ -737,6 +739,7 @@ enable_maintainer_mode + enable_checking + enable_canonical_system_headers + enable_host_shared ++enable_host_pie + enable_cet + enable_valgrind_annotations + ' +@@ -1378,6 +1381,7 @@ Optional Features: + --enable-canonical-system-headers + enable or disable system headers canonicalization + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-cet enable Intel CET in host libraries [default=auto] + --enable-valgrind-annotations + enable valgrind runtime interaction +@@ -7532,7 +7536,23 @@ esac + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi +diff --git a/libcpp/configure.ac b/libcpp/configure.ac +index 1efa96f7ca3..605cacb4c47 100644 +--- a/libcpp/configure.ac ++++ b/libcpp/configure.ac +@@ -203,8 +203,23 @@ esac + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. +diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h +index 93cc7c07b02..6d0873e1905 100644 +--- a/libcpp/include/cpplib.h ++++ b/libcpp/include/cpplib.h +@@ -700,6 +700,9 @@ struct cpp_callbacks + /* Callback to determine whether a built-in function is recognized. */ + int (*has_builtin) (cpp_reader *); + ++ /* Callback to determine whether a feature is available. */ ++ int (*has_feature) (cpp_reader *, bool); ++ + /* Callback that can change a user lazy into normal macro. */ + void (*user_lazy_macro) (cpp_reader *, cpp_macro *, unsigned); + +@@ -895,7 +898,9 @@ enum cpp_builtin_type + BT_HAS_STD_ATTRIBUTE, /* `__has_c_attribute(x)' */ + BT_HAS_BUILTIN, /* `__has_builtin(x)' */ + BT_HAS_INCLUDE, /* `__has_include(x)' */ +- BT_HAS_INCLUDE_NEXT /* `__has_include_next(x)' */ ++ BT_HAS_INCLUDE_NEXT, /* `__has_include_next(x)' */ ++ BT_HAS_FEATURE, /* `__has_feature(x)' */ ++ BT_HAS_EXTENSION /* `__has_extension(x)' */ + }; + + #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) +diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h +index 7d964172469..1073542681d 100644 +--- a/libcpp/include/line-map.h ++++ b/libcpp/include/line-map.h +@@ -803,11 +803,11 @@ public: + unsigned int max_column_hint; + + /* The allocator to use when resizing 'maps', defaults to xrealloc. */ +- line_map_realloc reallocator; ++ line_map_realloc GTY((callback)) reallocator; + + /* The allocators' function used to know the actual size it + allocated, for a certain allocation size requested. */ +- line_map_round_alloc_size_func round_alloc_size; ++ line_map_round_alloc_size_func GTY((callback)) round_alloc_size; + + struct location_adhoc_data_map location_adhoc_data_map; + +diff --git a/libcpp/init.c b/libcpp/init.c +index 68ed2c761b9..c3885dac2b1 100644 +--- a/libcpp/init.c ++++ b/libcpp/init.c +@@ -416,6 +416,8 @@ static const struct builtin_macro builtin_array[] = + B("__has_builtin", BT_HAS_BUILTIN, true), + B("__has_include", BT_HAS_INCLUDE, true), + B("__has_include_next",BT_HAS_INCLUDE_NEXT, true), ++ B("__has_feature", BT_HAS_FEATURE, true), ++ B("__has_extension", BT_HAS_EXTENSION, true), + /* Keep builtins not used for -traditional-cpp at the end, and + update init_builtins() if any more are added. */ + B("_Pragma", BT_PRAGMA, true), +diff --git a/libcpp/macro.c b/libcpp/macro.c +index 364d5adc651..40cfed7bdb4 100644 +--- a/libcpp/macro.c ++++ b/libcpp/macro.c +@@ -660,6 +660,12 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, + number = builtin_has_include (pfile, node, + node->value.builtin == BT_HAS_INCLUDE_NEXT); + break; ++ ++ case BT_HAS_FEATURE: ++ case BT_HAS_EXTENSION: ++ number = pfile->cb.has_feature (pfile, ++ node->value.builtin == BT_HAS_FEATURE); ++ break; + } + + if (result == NULL) +diff --git a/libdecnumber/configure b/libdecnumber/configure +index 6b62f8ba665..a76e50a490f 100755 +--- a/libdecnumber/configure ++++ b/libdecnumber/configure +@@ -626,6 +626,8 @@ ac_subst_vars='LTLIBOBJS + LIBOBJS + CET_HOST_FLAGS + PICFLAG ++enable_host_pie ++enable_host_shared + ADDITIONAL_OBJS + enable_decimal_float + target_os +@@ -706,6 +708,7 @@ enable_werror_always + enable_maintainer_mode + enable_decimal_float + enable_host_shared ++enable_host_pie + enable_cet + ' + ac_precious_vars='build_alias +@@ -1338,6 +1341,7 @@ Optional Features: + or 'dpd' choses which decimal floating point format + to use + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-cet enable Intel CET in host libraries [default=auto] + + Some influential environment variables: +@@ -5185,7 +5189,23 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi +diff --git a/libdecnumber/configure.ac b/libdecnumber/configure.ac +index 16b9493dc82..62fba75ec2c 100644 +--- a/libdecnumber/configure.ac ++++ b/libdecnumber/configure.ac +@@ -100,8 +100,23 @@ AC_C_BIGENDIAN + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. +diff --git a/libffi/Makefile.am b/libffi/Makefile.am +index 203b7d10a42..46fa6dce919 100644 +--- a/libffi/Makefile.am ++++ b/libffi/Makefile.am +@@ -233,7 +233,12 @@ libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` + libffi.map: $(top_srcdir)/libffi.map.in + $(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $< + +-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) ++if ENABLE_DARWIN_AT_RPATH ++libffi_darwin_rpath = -Wl,-rpath,@loader_path ++endif ++libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \ ++ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \ ++ $(libffi_darwin_rpath) + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src +diff --git a/libffi/Makefile.in b/libffi/Makefile.in +index 745bdd80777..11ff229e561 100644 +--- a/libffi/Makefile.in ++++ b/libffi/Makefile.in +@@ -612,7 +612,11 @@ AM_CFLAGS = -Wall -g -fexceptions $(am__append_2) + @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map + @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun + libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libffi_darwin_rpath = -Wl,-rpath,@loader_path ++libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \ ++ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \ ++ $(libffi_darwin_rpath) ++ + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src + AM_CCASFLAGS = $(AM_CPPFLAGS) +diff --git a/libffi/configure b/libffi/configure +index 8d52ec4f495..60c49494429 100755 +--- a/libffi/configure ++++ b/libffi/configure +@@ -664,6 +664,8 @@ TESTSUBDIR_TRUE + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CXXCPP + CPP + OTOOL64 +@@ -807,6 +809,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_pax_emutramp + enable_debug +@@ -1460,6 +1463,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7773,7 +7779,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9747,6 +9753,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9764,9 +9813,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11553,7 +11606,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11566 "configure" ++#line 11609 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11659,7 +11712,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11672 "configure" ++#line 11715 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12535,6 +12588,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12552,12 +12648,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14398,16 +14502,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -14529,7 +14623,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -14917,6 +15011,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # Test for 64-bit build. + # The cast to long int works around a bug in the HP C Compiler +@@ -16811,6 +16913,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libffi/configure.ac b/libffi/configure.ac +index 0bf4af410d3..b10afba5602 100644 +--- a/libffi/configure.ac ++++ b/libffi/configure.ac +@@ -57,6 +57,7 @@ AC_SUBST(CFLAGS) + AM_PROG_AS + AM_PROG_CC_C_O + AC_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # Test for 64-bit build. + AC_CHECK_SIZEOF([size_t]) +diff --git a/libgcc/config.host b/libgcc/config.host +index 45f8e19ada4..e3a07e60ff4 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -82,7 +82,7 @@ m32c*-*-*) + cpu_type=m32c + tmake_file=t-fdpbit + ;; +-aarch64*-*-*) ++aarch64*-*-* | arm64*-*-*) + cpu_type=aarch64 + ;; + alpha*-*-*) +@@ -225,9 +225,11 @@ case ${host} in + ;; + esac + tmake_file="$tmake_file t-slibgcc-darwin" +- # newer toolsets produce warnings when building for unsupported versions. + case ${host} in +- *-*-darwin1[89]* | *-*-darwin2* ) ++ *-*-darwin2*) ++ tmake_file="t-darwin-min-11 $tmake_file" ++ ;; ++ *-*-darwin1[89]*) + tmake_file="t-darwin-min-8 $tmake_file" + ;; + *-*-darwin9* | *-*-darwin1[0-7]*) +@@ -243,7 +245,29 @@ case ${host} in + echo "Warning: libgcc configured to support macOS 10.5" 1>&2 + ;; + esac +- extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a" ++ # We are not using libtool to build the libs here, so we need to replicate ++ # a little of the logic around setting Darwin rpaths. Setting an explicit ++ # yes or no is honoured, otherwise we choose a suitable default. ++ # Sadly, this has to be kept in line with the rules in libtool.m4. ++ # This make fragment will override the setting in t-slibgcc-darwin so it ++ # must appear after it. ++ if test "x$enable_darwin_at_rpath" = "x"; then ++ echo "enable_darwin_at_rpath is unset" 1>&2 ++ case ${host} in ++ *-darwin[45678]*) ;; ++ *-darwin9* | *-darwin1[01234]*) ;; # We might default these on later. ++ *-darwin*) ++ echo "but is needed after macOS 10.11 (setting it on)" 1>&2 ++ enable_darwin_at_rpath=yes ++ ;; ++ esac ++ else ++ echo "enable_darwin_at_rpath is '$enable_darwin_at_rpath'" 1>&2 ++ fi ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ tmake_file="$tmake_file t-darwin-rpath " ++ fi ++ extra_parts="crt3.o crttms.o crttme.o libemutls_w.a " + ;; + *-*-dragonfly*) + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" +@@ -392,6 +416,15 @@ aarch64*-*-elf | aarch64*-*-rtems*) + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" + md_unwind_header=aarch64/aarch64-unwind.h + ;; ++aarch64*-*-darwin*) ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} ${cpu_type}/t-aarch64" ++ tmake_file="${tmake_file} ${cpu_type}/t-lse " ++ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp " ++ tmake_file="${tmake_file} t-crtfm" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" ++ md_unwind_header=aarch64/aarch64-unwind.h ++ ;; + aarch64*-*-freebsd*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" +@@ -416,6 +449,7 @@ aarch64*-*-linux*) + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" + ;; + aarch64*-*-vxworks7*) + extra_parts="$extra_parts crtfastmath.o" +@@ -710,12 +744,18 @@ hppa*-*-netbsd*) + i[34567]86-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" +- extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ++ extra_parts="$extra_parts libd10-uwfef.a " ++ extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" +- extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ++ extra_parts="$extra_parts libd10-uwfef.a " ++ extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-elfiamcu) + tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/32/t-iamcu i386/t-softfp t-softfp t-dfprules" +@@ -765,6 +805,7 @@ i[34567]86-*-linux*) + tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules" + tm_file="${tm_file} i386/elf-lib.h" + md_unwind_header=i386/linux-unwind.h ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-kopensolaris*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" +@@ -782,6 +823,7 @@ x86_64-*-linux*) + tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules" + tm_file="${tm_file} i386/elf-lib.h" + md_unwind_header=i386/linux-unwind.h ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-kfreebsd*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" +@@ -1174,12 +1216,14 @@ powerpc-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc64-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc*-*-freebsd*) +diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c +new file mode 100644 +index 00000000000..b2c69aa5892 +--- /dev/null ++++ b/libgcc/config/aarch64/heap-trampoline.c +@@ -0,0 +1,185 @@ ++/* Copyright The GNU Toolchain Authors. */ ++ ++/* libc is required to allocate trampolines. */ ++#ifndef inhibit_libc ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if __APPLE__ ++/* For pthread_jit_write_protect_np */ ++#include ++#endif ++ ++/* HEAP_T_ATTR is provided to allow targets to build the exported functions ++ as weak definitions. */ ++#ifndef HEAP_T_ATTR ++# define HEAP_T_ATTR ++#endif ++ ++void *allocate_trampoline_page (void); ++int get_trampolines_per_page (void); ++struct tramp_ctrl_data *allocate_tramp_ctrl (struct tramp_ctrl_data *parent); ++void *allocate_trampoline_page (void); ++ ++void __gcc_nested_func_ptr_created (void *chain, void *func, void **dst); ++void __gcc_nested_func_ptr_deleted (void); ++ ++#if defined(__linux__) ++static const unsigned char aarch64_trampoline_insns[6][4] = { ++ {0x5f, 0x24, 0x03, 0xd5}, /* hint 34 */ ++ {0xb1, 0x00, 0x00, 0x58}, /* ldr x17, .+20 */ ++ {0xd2, 0x00, 0x00, 0x58}, /* ldr x18, .+24 */ ++ {0x20, 0x02, 0x1f, 0xd6}, /* br x17 */ ++ {0x9f, 0x3f, 0x03, 0xd5}, /* dsb sy */ ++ {0xdf, 0x3f, 0x03, 0xd5} /* isb */ ++}; ++ ++#elif __APPLE__ ++static const unsigned char aarch64_trampoline_insns[6][4] = { ++ {0x5f, 0x24, 0x03, 0xd5}, /* hint 34 */ ++ {0xb1, 0x00, 0x00, 0x58}, /* ldr x17, .+20 */ ++ {0xd0, 0x00, 0x00, 0x58}, /* ldr x16, .+24 */ ++ {0x20, 0x02, 0x1f, 0xd6}, /* br x17 */ ++ {0x9f, 0x3f, 0x03, 0xd5}, /* dsb sy */ ++ {0xdf, 0x3f, 0x03, 0xd5} /* isb */ ++}; ++ ++#else ++#error "Unsupported AArch64 platform for heap trampolines" ++#endif ++ ++struct aarch64_trampoline { ++ unsigned char insns[6][4]; ++ void *func_ptr; ++ void *chain_ptr; ++}; ++ ++struct tramp_ctrl_data ++{ ++ struct tramp_ctrl_data *prev; ++ ++ int free_trampolines; ++ ++ /* This will be pointing to an executable mmap'ed page. */ ++ struct aarch64_trampoline *trampolines; ++}; ++ ++int ++get_trampolines_per_page (void) ++{ ++ return getpagesize() / sizeof(struct aarch64_trampoline); ++} ++ ++static _Thread_local struct tramp_ctrl_data *tramp_ctrl_curr = NULL; ++ ++void * ++allocate_trampoline_page (void) ++{ ++ void *page; ++ ++#if defined(__linux__) ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++#elif __APPLE__ ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE | MAP_JIT, 0, 0); ++#else ++ page = MAP_FAILED; ++#endif ++ ++ return page; ++} ++ ++struct tramp_ctrl_data * ++allocate_tramp_ctrl (struct tramp_ctrl_data *parent) ++{ ++ struct tramp_ctrl_data *p = malloc (sizeof (struct tramp_ctrl_data)); ++ if (p == NULL) ++ return NULL; ++ ++ p->trampolines = allocate_trampoline_page (); ++ ++ if (p->trampolines == MAP_FAILED) ++ return NULL; ++ ++ p->prev = parent; ++ p->free_trampolines = get_trampolines_per_page(); ++ ++ return p; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_created (void *chain, void *func, void **dst) ++{ ++ if (tramp_ctrl_curr == NULL) ++ { ++ tramp_ctrl_curr = allocate_tramp_ctrl (NULL); ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ } ++ ++ if (tramp_ctrl_curr->free_trampolines == 0) ++ { ++ void *tramp_ctrl = allocate_tramp_ctrl (tramp_ctrl_curr); ++ if (!tramp_ctrl) ++ abort (); ++ ++ tramp_ctrl_curr = tramp_ctrl; ++ } ++ ++ struct aarch64_trampoline *trampoline ++ = &tramp_ctrl_curr->trampolines[get_trampolines_per_page () ++ - tramp_ctrl_curr->free_trampolines]; ++ ++#if __APPLE__ ++ /* Disable write protection for the MAP_JIT regions in this thread (see ++ https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) */ ++ pthread_jit_write_protect_np (0); ++#endif ++ ++ memcpy (trampoline->insns, aarch64_trampoline_insns, ++ sizeof(aarch64_trampoline_insns)); ++ trampoline->func_ptr = func; ++ trampoline->chain_ptr = chain; ++ ++#if __APPLE__ ++ /* Re-enable write protection. */ ++ pthread_jit_write_protect_np (1); ++#endif ++ ++ tramp_ctrl_curr->free_trampolines -= 1; ++ ++ __builtin___clear_cache ((void *)trampoline->insns, ++ ((void *)trampoline->insns + sizeof(trampoline->insns))); ++ ++ *dst = &trampoline->insns; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_deleted (void) ++{ ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ ++ tramp_ctrl_curr->free_trampolines += 1; ++ ++ if (tramp_ctrl_curr->free_trampolines == get_trampolines_per_page ()) ++ { ++ if (tramp_ctrl_curr->prev == NULL) ++ return; ++ ++ munmap (tramp_ctrl_curr->trampolines, getpagesize()); ++ struct tramp_ctrl_data *prev = tramp_ctrl_curr->prev; ++ free (tramp_ctrl_curr); ++ tramp_ctrl_curr = prev; ++ } ++} ++ ++#endif /* !inhibit_libc */ +diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S +index 9215873842b..0e65cbcabde 100644 +--- a/libgcc/config/aarch64/lse.S ++++ b/libgcc/config/aarch64/lse.S +@@ -58,7 +58,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #endif + + /* Declare the symbol gating the LSE implementations. */ ++#if __ELF__ + .hidden __aarch64_have_lse_atomics ++#else ++ .private_extern __aarch64_have_lse_atomics ++#endif + + /* Turn size and memory model defines into mnemonic fragments. */ + #if SIZE == 1 +@@ -164,6 +168,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define BTI_C hint 34 + + /* Start and end a function. */ ++#if __ELF__ + .macro STARTFN name + .text + .balign 16 +@@ -187,6 +192,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + cbz w(tmp0), \label + .endm + ++#else ++.macro STARTFN name ++ .text ++ .balign 16 ++ .private_extern _\name ++ .cfi_startproc ++_\name: ++ BTI_C ++.endm ++ ++.macro ENDFN name ++ .cfi_endproc ++.endm ++ ++/* Branch to LABEL if LSE is disabled. */ ++.macro JUMP_IF_NOT_LSE label ++ adrp x(tmp0), ___aarch64_have_lse_atomics@PAGE ++ ldrb w(tmp0), [x(tmp0), ___aarch64_have_lse_atomics@PAGEOFF] ++ cbz w(tmp0), \label ++.endm ++ ++#endif ++ + #ifdef L_cas + + STARTFN NAME(cas) +diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h +index 2d3288ad7d9..9ed1ab7047b 100644 +--- a/libgcc/config/aarch64/sfp-machine.h ++++ b/libgcc/config/aarch64/sfp-machine.h +@@ -122,6 +122,27 @@ void __sfp_handle_exceptions (int); + + + /* Define ALIASNAME as a strong alias for NAME. */ ++#if defined __APPLE__ ++/* Mach-O doesn't support aliasing, so we build a secondary function for ++ the alias - we need to do a bit of a dance to find out what the type of ++ the arguments is and then apply that to the secondary function. ++ If these functions ever return anything but CMPtype we need to revisit ++ this... */ ++typedef float alias_HFtype __attribute__ ((mode (HF))); ++typedef float alias_SFtype __attribute__ ((mode (SF))); ++typedef float alias_DFtype __attribute__ ((mode (DF))); ++typedef float alias_TFtype __attribute__ ((mode (TF))); ++#define ALIAS_SELECTOR \ ++ CMPtype (*) (alias_HFtype, alias_HFtype): (alias_HFtype) 0, \ ++ CMPtype (*) (alias_SFtype, alias_SFtype): (alias_SFtype) 0, \ ++ CMPtype (*) (alias_DFtype, alias_DFtype): (alias_DFtype) 0, \ ++ CMPtype (*) (alias_TFtype, alias_TFtype): (alias_TFtype) 0 ++#define strong_alias(name, aliasname) \ ++ CMPtype aliasname (__typeof (_Generic (name, ALIAS_SELECTOR)) a, \ ++ __typeof (_Generic (name, ALIAS_SELECTOR)) b) \ ++ { return name (a, b); } ++#else + # define strong_alias(name, aliasname) _strong_alias(name, aliasname) + # define _strong_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); ++#endif +diff --git a/libgcc/config/aarch64/t-darwin b/libgcc/config/aarch64/t-darwin +new file mode 100644 +index 00000000000..f6ecda7b608 +--- /dev/null ++++ b/libgcc/config/aarch64/t-darwin +@@ -0,0 +1,7 @@ ++# Ensure we have a suitable minimum OS version. ++ ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=11.0 ++ ++LIB2_SIDITI_CONV_FUNCS = yes ++ ++BUILD_LIBGCCS1 = +diff --git a/libgcc/config/aarch64/t-heap-trampoline b/libgcc/config/aarch64/t-heap-trampoline +new file mode 100644 +index 00000000000..6468fb8704f +--- /dev/null ++++ b/libgcc/config/aarch64/t-heap-trampoline +@@ -0,0 +1,20 @@ ++# Copyright The GNU Toolchain Authors. ++ ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB2ADDEH += $(srcdir)/config/aarch64/heap-trampoline.c ++LIB2ADDEHSHARED += $(srcdir)/config/aarch64/heap-trampoline.c +diff --git a/libgcc/config/i386/heap-trampoline.c b/libgcc/config/i386/heap-trampoline.c +new file mode 100644 +index 00000000000..2e8df1cfbd2 +--- /dev/null ++++ b/libgcc/config/i386/heap-trampoline.c +@@ -0,0 +1,255 @@ ++/* Copyright The GNU Toolchain Authors. */ ++ ++/* libc is required to allocate trampolines. */ ++#ifndef inhibit_libc ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++/* For pthread_jit_write_protect_np */ ++#include ++#endif ++ ++/* HEAP_T_ATTR is provided to allow targets to build the exported functions ++ as weak definitions. */ ++#ifndef HEAP_T_ATTR ++# define HEAP_T_ATTR ++#endif ++ ++void *allocate_trampoline_page (void); ++int get_trampolines_per_page (void); ++struct tramp_ctrl_data *allocate_tramp_ctrl (struct tramp_ctrl_data *parent); ++void *allocate_trampoline_page (void); ++ ++void __gcc_nested_func_ptr_created (void *chain, void *func, void **dst); ++void __gcc_nested_func_ptr_deleted (void); ++ ++#if __x86_64__ ++ ++#ifdef __LP64__ ++static const uint8_t trampoline_insns[] = { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ /* endbr64. */ ++ 0xf3, 0x0f, 0x1e, 0xfa, ++#endif ++ ++ /* movabsq $,%r11 */ ++ 0x49, 0xbb, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ ++ /* movabsq $,%r10 */ ++ 0x49, 0xba, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ ++ /* rex.WB jmpq *%r11 */ ++ 0x41, 0xff, 0xe3, ++ ++ /* Pad to the multiple of 4 bytes. */ ++ 0x90 ++}; ++#else ++static const uint8_t trampoline_insns[] = { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ /* endbr64. */ ++ 0xf3, 0x0f, 0x1e, 0xfa, ++#endif ++ ++ /* movl $,%r11d */ ++ 0x41, 0xbb, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* movl $,%r10d */ ++ 0x41, 0xba, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* rex.WB jmpq *%r11 */ ++ 0x41, 0xff, 0xe3, ++ ++ /* Pad to the multiple of 4 bytes. */ ++ 0x90 ++}; ++#endif ++ ++union ix86_trampoline { ++ uint8_t insns[sizeof(trampoline_insns)]; ++ ++ struct __attribute__((packed)) fields { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ uint8_t endbr64[4]; ++#endif ++ uint8_t insn_0[2]; ++ void *func_ptr; ++ uint8_t insn_1[2]; ++ void *chain_ptr; ++ uint8_t insn_2[3]; ++ uint8_t pad; ++ } fields; ++}; ++ ++#elif __i386__ ++ ++static const uint8_t trampoline_insns[] = { ++ /* movl $,%ecx */ ++ 0xb9, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* jmpl -. */ ++ 0xe9, ++ 0x00, 0x00, 0x00, 0x00, ++}; ++ ++union ix86_trampoline { ++ uint8_t insns[sizeof(trampoline_insns)]; ++ ++ struct __attribute__((packed)) fields { ++ uint8_t insn_0[1]; ++ void *chain_ptr; ++ uint8_t insn_1[1]; ++ uintptr_t func_offset; ++ } fields; ++}; ++ ++#else ++#error unsupported architecture/ABI ++#endif ++ ++struct tramp_ctrl_data ++{ ++ struct tramp_ctrl_data *prev; ++ ++ int free_trampolines; ++ ++ /* This will be pointing to an executable mmap'ed page. */ ++ union ix86_trampoline *trampolines; ++}; ++ ++int ++get_trampolines_per_page (void) ++{ ++ return getpagesize() / sizeof(union ix86_trampoline); ++} ++ ++static _Thread_local struct tramp_ctrl_data *tramp_ctrl_curr = NULL; ++ ++void * ++allocate_trampoline_page (void) ++{ ++ void *page; ++ ++#if defined(__gnu_linux__) ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++#elif __APPLE__ ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE | MAP_JIT, 0, 0); ++# else ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++# endif ++#else ++ page = MAP_FAILED; ++#endif ++ ++ return page; ++} ++ ++struct tramp_ctrl_data * ++allocate_tramp_ctrl (struct tramp_ctrl_data *parent) ++{ ++ struct tramp_ctrl_data *p = malloc (sizeof (struct tramp_ctrl_data)); ++ if (p == NULL) ++ return NULL; ++ ++ p->trampolines = allocate_trampoline_page (); ++ ++ if (p->trampolines == MAP_FAILED) ++ return NULL; ++ ++ p->prev = parent; ++ p->free_trampolines = get_trampolines_per_page(); ++ ++ return p; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_created (void *chain, void *func, void **dst) ++{ ++ if (tramp_ctrl_curr == NULL) ++ { ++ tramp_ctrl_curr = allocate_tramp_ctrl (NULL); ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ } ++ ++ if (tramp_ctrl_curr->free_trampolines == 0) ++ { ++ void *tramp_ctrl = allocate_tramp_ctrl (tramp_ctrl_curr); ++ if (!tramp_ctrl) ++ abort (); ++ ++ tramp_ctrl_curr = tramp_ctrl; ++ } ++ ++ union ix86_trampoline *trampoline ++ = &tramp_ctrl_curr->trampolines[get_trampolines_per_page () ++ - tramp_ctrl_curr->free_trampolines]; ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ /* Disable write protection for the MAP_JIT regions in this thread (see ++ https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) */ ++ pthread_jit_write_protect_np (0); ++#endif ++ ++ memcpy (trampoline->insns, trampoline_insns, ++ sizeof(trampoline_insns)); ++ trampoline->fields.chain_ptr = chain; ++#if __x86_64__ ++ trampoline->fields.func_ptr = func; ++#elif __i386__ ++ uintptr_t off_add = (uintptr_t) &trampoline->fields.func_offset; ++ off_add += 4; ++ trampoline->fields.func_offset = (uintptr_t)func - off_add; ++#endif ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ /* Re-enable write protection. */ ++ pthread_jit_write_protect_np (1); ++#endif ++ ++ tramp_ctrl_curr->free_trampolines -= 1; ++ ++ __builtin___clear_cache ((void *)trampoline->insns, ++ ((void *)trampoline->insns + sizeof(trampoline->insns))); ++ ++ *dst = &trampoline->insns; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_deleted (void) ++{ ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ ++ tramp_ctrl_curr->free_trampolines += 1; ++ ++ if (tramp_ctrl_curr->free_trampolines == get_trampolines_per_page ()) ++ { ++ if (tramp_ctrl_curr->prev == NULL) ++ return; ++ ++ munmap (tramp_ctrl_curr->trampolines, getpagesize()); ++ struct tramp_ctrl_data *prev = tramp_ctrl_curr->prev; ++ free (tramp_ctrl_curr); ++ tramp_ctrl_curr = prev; ++ } ++} ++ ++#endif /* !inhibit_libc */ +diff --git a/libgcc/config/i386/t-heap-trampoline b/libgcc/config/i386/t-heap-trampoline +new file mode 100644 +index 00000000000..5cd11f594ba +--- /dev/null ++++ b/libgcc/config/i386/t-heap-trampoline +@@ -0,0 +1,20 @@ ++# Copyright The GNU Toolchain Authors. ++ ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB2ADDEH += $(srcdir)/config/i386/heap-trampoline.c ++LIB2ADDEHSHARED += $(srcdir)/config/i386/heap-trampoline.c +diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin +index a3bb70c6a0a..0f65b54a230 100644 +--- a/libgcc/config/t-darwin ++++ b/libgcc/config/t-darwin +@@ -51,5 +51,18 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c \ + # Do not build a shared unwind lib by default. + LIBEHSOBJS= + ++# Make heap trampoline helpers weak definitions so that we can merge them from ++# multiple DSOs. ++heap-trampoline.o: HOST_LIBGCC2_CFLAGS += \ ++ -DHEAP_T_ATTR='__attribute__((__weak__,__visibility__("default")))' ++heap-trampoline_s.o: HOST_LIBGCC2_CFLAGS += \ ++ -DHEAP_T_ATTR='__attribute__((__weak__,__visibility__("default")))' ++ ++# Make a heap trampoline support CRT so that it can be linked optionally, use ++# the shared version so that we can link with DSOs. ++libheapt_w.a: heap-trampoline_s.o ++ $(AR_CREATE_FOR_TARGET) $@ $< ++ $(RANLIB_FOR_TARGET) $@ ++ + # Symbols for all the sub-ports. + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/libgcc-libsystem.ver +diff --git a/libgcc/config/t-darwin-min-11 b/libgcc/config/t-darwin-min-11 +new file mode 100644 +index 00000000000..4009d41addb +--- /dev/null ++++ b/libgcc/config/t-darwin-min-11 +@@ -0,0 +1,3 @@ ++# Support building with -mmacosx-version-min back to macOS 11. ++DARWIN_MIN_LIB_VERSION = -mmacosx-version-min=11 ++DARWIN_MIN_CRT_VERSION = -mmacosx-version-min=11 +diff --git a/libgcc/config/t-darwin-rpath b/libgcc/config/t-darwin-rpath +new file mode 100644 +index 00000000000..e73d7f378b0 +--- /dev/null ++++ b/libgcc/config/t-darwin-rpath +@@ -0,0 +1,2 @@ ++# Use @rpath and add a search path to exes and dylibs that depend on this. ++SHLIB_RPATH = @rpath +diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin +index cb0cbbdb1c5..da4886848e8 100644 +--- a/libgcc/config/t-slibgcc-darwin ++++ b/libgcc/config/t-slibgcc-darwin +@@ -1,4 +1,4 @@ +-# Build a shared libgcc library with the darwin linker. ++# Build a shared libgcc library able to use embedded runpaths. + + SHLIB_SOVERSION = 1.1 + SHLIB_SO_MINVERSION = 1 +@@ -6,7 +6,6 @@ SHLIB_VERSTRING = -compatibility_version $(SHLIB_SO_MINVERSION) \ + -current_version $(SHLIB_SOVERSION) + SHLIB_EXT = .dylib + SHLIB_LC = -lSystem +-SHLIB_INSTALL_DIR = $(slibdir) + + SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk + SHLIB_MKMAP_OPTS = -v leading_underscore=1 +@@ -23,11 +22,16 @@ SHLIB_SONAME = @shlib_base_name@$(SHLIB_EXT) + # subdir. The code under MULTIBUILDTOP combines these into a single FAT + # library, that is what we eventually install. + ++# When enable_darwin_at_rpath is true, use @rpath instead of $(slibdir) for ++# this and dylibs that depend on this. So this def must come first and be ++# overridden in a make fragment that depends on the rpath setting. ++SHLIB_RPATH = $(slibdir) ++ + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ +- -install_name $(SHLIB_INSTALL_DIR)/$(SHLIB_INSTALL_NAME) \ ++ -install_name $(SHLIB_RPATH)/$(SHLIB_INSTALL_NAME) \ + -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME) \ + -Wl,-exported_symbols_list,$(SHLIB_MAP) \ +- $(SHLIB_VERSTRING) \ ++ $(SHLIB_VERSTRING) -nodefaultrpaths \ + @multilib_flags@ @shlib_objs@ $(SHLIB_LC) + + # we do our own thing +@@ -63,9 +67,9 @@ EHS_INSTNAME = libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT) + libgcc_ehs$(SHLIB_EXT): $(LIBEHSOBJS) $(extra-parts) + mkdir -p $(MULTIDIR) + $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ +- -install_name $(SHLIB_INSTALL_DIR)/$(EHS_INSTNAME) \ ++ -install_name $(SHLIB_RPATH)/$(EHS_INSTNAME) \ + -o $(MULTIDIR)/libgcc_ehs$(SHLIB_EXT) $(SHLIB_VERSTRING) \ +- $(LIBEHSOBJS) $(SHLIB_LC) ++ -nodefaultrpaths $(LIBEHSOBJS) $(SHLIB_LC) + + all: libgcc_ehs$(SHLIB_EXT) + +@@ -122,12 +126,12 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) \ + cp ../$${mlib}/libgcc/$${mlib}/libgcc_ehs$(SHLIB_EXT) \ + ./libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \ + arch=`$(LIPO) -info libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} | sed -e 's/.*:\ //'` ; \ +- $(CC) -arch $${arch} -nodefaultlibs -dynamiclib \ ++ $(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \ + -o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ +- -install_name $(SHLIB_INSTALL_DIR)/libgcc_s.1.dylib \ +- -compatibility_version 1 -current_version 1 ; \ ++ -install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \ ++ -compatibility_version 1 -current_version 1.1 ; \ + done + $(LIPO) -output libgcc_s.1$(SHLIB_EXT) -create libgcc_s.1$(SHLIB_EXT)_T* + rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T* +@@ -141,13 +145,13 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) + cp ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) \ + ./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \ + arch=`$(LIPO) -info libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} | sed -e 's/.*:\ //'` ; \ +- $(CC) -arch $${arch} -nodefaultlibs -dynamiclib \ ++ $(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \ + -o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ + -lSystem \ + -Wl,-reexported_symbols_list,$(srcdir)/config/darwin-unwind.ver \ +- -install_name $(SHLIB_INSTALL_DIR)/libgcc_s.1.dylib \ +- -compatibility_version 1 -current_version 1 ; \ ++ -install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \ ++ -compatibility_version 1 -current_version 1.1 ; \ + done + $(LIPO) -output libgcc_s.1$(SHLIB_EXT) -create libgcc_s.1$(SHLIB_EXT)_T* + rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T* +diff --git a/libgcc/libgcc-std.ver.in b/libgcc/libgcc-std.ver.in +index cea33267e53..b9da9ed4642 100644 +--- a/libgcc/libgcc-std.ver.in ++++ b/libgcc/libgcc-std.ver.in +@@ -1944,3 +1944,9 @@ GCC_7.0.0 { + __PFX__divmoddi4 + __PFX__divmodti4 + } ++ ++%inherit GCC_14.0.0 GCC_7.0.0 ++GCC_14.0.0 { ++ __gcc_nested_func_ptr_created ++ __gcc_nested_func_ptr_deleted ++} +diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h +index 1819ff3ac3d..3cbc484524c 100644 +--- a/libgcc/libgcc2.h ++++ b/libgcc/libgcc2.h +@@ -29,6 +29,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #pragma GCC visibility push(default) + #endif + ++extern void __gcc_nested_func_ptr_created (void *, void *, void **); ++extern void __gcc_nested_func_ptr_deleted (void); ++ + extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); + extern void __clear_cache (void *, void *); + extern void __eprintf (const char *, const char *, unsigned int, const char *) +diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am +index 61bf05dd40d..d9c9451d568 100644 +--- a/libgfortran/Makefile.am ++++ b/libgfortran/Makefile.am +@@ -1,5 +1,6 @@ + ## Process this file with automake to produce Makefile.in + ++AUTOMAKE_OPTIONS = foreign subdir-objects + + ACLOCAL_AMFLAGS = -I .. -I ../config + +@@ -29,6 +30,11 @@ else + version_arg = + version_dep = + endif ++extra_darwin_ldflags_libgfortran = @extra_ldflags_libgfortran@ ++if ENABLE_DARWIN_AT_RPATH ++extra_darwin_ldflags_libgfortran += -Wc,-nodefaultrpaths ++extra_darwin_ldflags_libgfortran += -Wl,-rpath,@loader_path ++endif + + gfor_c_HEADERS = $(srcdir)/ISO_Fortran_binding.h + gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include +@@ -42,7 +48,7 @@ libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ + $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \ + $(HWCAP_LDFLAGS) \ +- -lm $(extra_ldflags_libgfortran) \ ++ $(LIBM) $(extra_darwin_ldflags_libgfortran) \ + $(version_arg) -Wc,-shared-libgcc + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + +@@ -185,6 +191,8 @@ endif + + if IEEE_SUPPORT + ++gfor_ieee_helper_src=ieee/ieee_helper.c ++ + gfor_helper_src+=ieee/ieee_helper.c + + gfor_ieee_src= \ +@@ -224,575 +232,575 @@ runtime/stop.c + endif + + i_all_c= \ +-$(srcdir)/generated/all_l1.c \ +-$(srcdir)/generated/all_l2.c \ +-$(srcdir)/generated/all_l4.c \ +-$(srcdir)/generated/all_l8.c \ +-$(srcdir)/generated/all_l16.c ++generated/all_l1.c \ ++generated/all_l2.c \ ++generated/all_l4.c \ ++generated/all_l8.c \ ++generated/all_l16.c + + i_any_c= \ +-$(srcdir)/generated/any_l1.c \ +-$(srcdir)/generated/any_l2.c \ +-$(srcdir)/generated/any_l4.c \ +-$(srcdir)/generated/any_l8.c \ +-$(srcdir)/generated/any_l16.c ++generated/any_l1.c \ ++generated/any_l2.c \ ++generated/any_l4.c \ ++generated/any_l8.c \ ++generated/any_l16.c + + i_bessel_c= \ +-$(srcdir)/generated/bessel_r4.c \ +-$(srcdir)/generated/bessel_r8.c \ +-$(srcdir)/generated/bessel_r10.c \ +-$(srcdir)/generated/bessel_r16.c ++generated/bessel_r4.c \ ++generated/bessel_r8.c \ ++generated/bessel_r10.c \ ++generated/bessel_r16.c + + i_count_c= \ +-$(srcdir)/generated/count_1_l.c \ +-$(srcdir)/generated/count_2_l.c \ +-$(srcdir)/generated/count_4_l.c \ +-$(srcdir)/generated/count_8_l.c \ +-$(srcdir)/generated/count_16_l.c ++generated/count_1_l.c \ ++generated/count_2_l.c \ ++generated/count_4_l.c \ ++generated/count_8_l.c \ ++generated/count_16_l.c + + i_iall_c= \ +-$(srcdir)/generated/iall_i1.c \ +-$(srcdir)/generated/iall_i2.c \ +-$(srcdir)/generated/iall_i4.c \ +-$(srcdir)/generated/iall_i8.c \ +-$(srcdir)/generated/iall_i16.c ++generated/iall_i1.c \ ++generated/iall_i2.c \ ++generated/iall_i4.c \ ++generated/iall_i8.c \ ++generated/iall_i16.c + + i_iany_c= \ +-$(srcdir)/generated/iany_i1.c \ +-$(srcdir)/generated/iany_i2.c \ +-$(srcdir)/generated/iany_i4.c \ +-$(srcdir)/generated/iany_i8.c \ +-$(srcdir)/generated/iany_i16.c ++generated/iany_i1.c \ ++generated/iany_i2.c \ ++generated/iany_i4.c \ ++generated/iany_i8.c \ ++generated/iany_i16.c + + i_iparity_c= \ +-$(srcdir)/generated/iparity_i1.c \ +-$(srcdir)/generated/iparity_i2.c \ +-$(srcdir)/generated/iparity_i4.c \ +-$(srcdir)/generated/iparity_i8.c \ +-$(srcdir)/generated/iparity_i16.c ++generated/iparity_i1.c \ ++generated/iparity_i2.c \ ++generated/iparity_i4.c \ ++generated/iparity_i8.c \ ++generated/iparity_i16.c + + i_findloc0_c= \ +-$(srcdir)/generated/findloc0_i1.c \ +-$(srcdir)/generated/findloc0_i2.c \ +-$(srcdir)/generated/findloc0_i4.c \ +-$(srcdir)/generated/findloc0_i8.c \ +-$(srcdir)/generated/findloc0_i16.c \ +-$(srcdir)/generated/findloc0_r4.c \ +-$(srcdir)/generated/findloc0_r8.c \ +-$(srcdir)/generated/findloc0_r10.c \ +-$(srcdir)/generated/findloc0_r16.c \ +-$(srcdir)/generated/findloc0_c4.c \ +-$(srcdir)/generated/findloc0_c8.c \ +-$(srcdir)/generated/findloc0_c10.c \ +-$(srcdir)/generated/findloc0_c16.c ++generated/findloc0_i1.c \ ++generated/findloc0_i2.c \ ++generated/findloc0_i4.c \ ++generated/findloc0_i8.c \ ++generated/findloc0_i16.c \ ++generated/findloc0_r4.c \ ++generated/findloc0_r8.c \ ++generated/findloc0_r10.c \ ++generated/findloc0_r16.c \ ++generated/findloc0_c4.c \ ++generated/findloc0_c8.c \ ++generated/findloc0_c10.c \ ++generated/findloc0_c16.c + + i_findloc0s_c= \ +-$(srcdir)/generated/findloc0_s1.c \ +-$(srcdir)/generated/findloc0_s4.c ++generated/findloc0_s1.c \ ++generated/findloc0_s4.c + + i_findloc1_c= \ +-$(srcdir)/generated/findloc1_i1.c \ +-$(srcdir)/generated/findloc1_i2.c \ +-$(srcdir)/generated/findloc1_i4.c \ +-$(srcdir)/generated/findloc1_i8.c \ +-$(srcdir)/generated/findloc1_i16.c \ +-$(srcdir)/generated/findloc1_r4.c \ +-$(srcdir)/generated/findloc1_r8.c \ +-$(srcdir)/generated/findloc1_r10.c \ +-$(srcdir)/generated/findloc1_r16.c \ +-$(srcdir)/generated/findloc1_c4.c \ +-$(srcdir)/generated/findloc1_c8.c \ +-$(srcdir)/generated/findloc1_c10.c \ +-$(srcdir)/generated/findloc1_c16.c ++generated/findloc1_i1.c \ ++generated/findloc1_i2.c \ ++generated/findloc1_i4.c \ ++generated/findloc1_i8.c \ ++generated/findloc1_i16.c \ ++generated/findloc1_r4.c \ ++generated/findloc1_r8.c \ ++generated/findloc1_r10.c \ ++generated/findloc1_r16.c \ ++generated/findloc1_c4.c \ ++generated/findloc1_c8.c \ ++generated/findloc1_c10.c \ ++generated/findloc1_c16.c + + i_findloc1s_c= \ +-$(srcdir)/generated/findloc1_s1.c \ +-$(srcdir)/generated/findloc1_s4.c ++generated/findloc1_s1.c \ ++generated/findloc1_s4.c + + i_findloc2s_c= \ +-$(srcdir)/generated/findloc2_s1.c \ +-$(srcdir)/generated/findloc2_s4.c ++generated/findloc2_s1.c \ ++generated/findloc2_s4.c + + i_maxloc0_c= \ +-$(srcdir)/generated/maxloc0_4_i1.c \ +-$(srcdir)/generated/maxloc0_8_i1.c \ +-$(srcdir)/generated/maxloc0_16_i1.c \ +-$(srcdir)/generated/maxloc0_4_i2.c \ +-$(srcdir)/generated/maxloc0_8_i2.c \ +-$(srcdir)/generated/maxloc0_16_i2.c \ +-$(srcdir)/generated/maxloc0_4_i4.c \ +-$(srcdir)/generated/maxloc0_8_i4.c \ +-$(srcdir)/generated/maxloc0_16_i4.c \ +-$(srcdir)/generated/maxloc0_4_i8.c \ +-$(srcdir)/generated/maxloc0_8_i8.c \ +-$(srcdir)/generated/maxloc0_16_i8.c \ +-$(srcdir)/generated/maxloc0_4_i16.c \ +-$(srcdir)/generated/maxloc0_8_i16.c \ +-$(srcdir)/generated/maxloc0_16_i16.c \ +-$(srcdir)/generated/maxloc0_4_r4.c \ +-$(srcdir)/generated/maxloc0_8_r4.c \ +-$(srcdir)/generated/maxloc0_16_r4.c \ +-$(srcdir)/generated/maxloc0_4_r8.c \ +-$(srcdir)/generated/maxloc0_8_r8.c \ +-$(srcdir)/generated/maxloc0_16_r8.c \ +-$(srcdir)/generated/maxloc0_4_r10.c \ +-$(srcdir)/generated/maxloc0_8_r10.c \ +-$(srcdir)/generated/maxloc0_16_r10.c \ +-$(srcdir)/generated/maxloc0_4_r16.c \ +-$(srcdir)/generated/maxloc0_8_r16.c \ +-$(srcdir)/generated/maxloc0_16_r16.c ++generated/maxloc0_4_i1.c \ ++generated/maxloc0_8_i1.c \ ++generated/maxloc0_16_i1.c \ ++generated/maxloc0_4_i2.c \ ++generated/maxloc0_8_i2.c \ ++generated/maxloc0_16_i2.c \ ++generated/maxloc0_4_i4.c \ ++generated/maxloc0_8_i4.c \ ++generated/maxloc0_16_i4.c \ ++generated/maxloc0_4_i8.c \ ++generated/maxloc0_8_i8.c \ ++generated/maxloc0_16_i8.c \ ++generated/maxloc0_4_i16.c \ ++generated/maxloc0_8_i16.c \ ++generated/maxloc0_16_i16.c \ ++generated/maxloc0_4_r4.c \ ++generated/maxloc0_8_r4.c \ ++generated/maxloc0_16_r4.c \ ++generated/maxloc0_4_r8.c \ ++generated/maxloc0_8_r8.c \ ++generated/maxloc0_16_r8.c \ ++generated/maxloc0_4_r10.c \ ++generated/maxloc0_8_r10.c \ ++generated/maxloc0_16_r10.c \ ++generated/maxloc0_4_r16.c \ ++generated/maxloc0_8_r16.c \ ++generated/maxloc0_16_r16.c + + i_maxloc0s_c = \ +-$(srcdir)/generated/maxloc0_4_s1.c \ +-$(srcdir)/generated/maxloc0_4_s4.c \ +-$(srcdir)/generated/maxloc0_8_s1.c \ +-$(srcdir)/generated/maxloc0_8_s4.c \ +-$(srcdir)/generated/maxloc0_16_s1.c \ +-$(srcdir)/generated/maxloc0_16_s4.c ++generated/maxloc0_4_s1.c \ ++generated/maxloc0_4_s4.c \ ++generated/maxloc0_8_s1.c \ ++generated/maxloc0_8_s4.c \ ++generated/maxloc0_16_s1.c \ ++generated/maxloc0_16_s4.c + + i_maxloc1_c= \ +-$(srcdir)/generated/maxloc1_4_i1.c \ +-$(srcdir)/generated/maxloc1_8_i1.c \ +-$(srcdir)/generated/maxloc1_16_i1.c \ +-$(srcdir)/generated/maxloc1_4_i2.c \ +-$(srcdir)/generated/maxloc1_8_i2.c \ +-$(srcdir)/generated/maxloc1_16_i2.c \ +-$(srcdir)/generated/maxloc1_4_i4.c \ +-$(srcdir)/generated/maxloc1_8_i4.c \ +-$(srcdir)/generated/maxloc1_16_i4.c \ +-$(srcdir)/generated/maxloc1_4_i8.c \ +-$(srcdir)/generated/maxloc1_8_i8.c \ +-$(srcdir)/generated/maxloc1_16_i8.c \ +-$(srcdir)/generated/maxloc1_4_i16.c \ +-$(srcdir)/generated/maxloc1_8_i16.c \ +-$(srcdir)/generated/maxloc1_16_i16.c \ +-$(srcdir)/generated/maxloc1_4_r4.c \ +-$(srcdir)/generated/maxloc1_8_r4.c \ +-$(srcdir)/generated/maxloc1_16_r4.c \ +-$(srcdir)/generated/maxloc1_4_r8.c \ +-$(srcdir)/generated/maxloc1_8_r8.c \ +-$(srcdir)/generated/maxloc1_16_r8.c \ +-$(srcdir)/generated/maxloc1_4_r10.c \ +-$(srcdir)/generated/maxloc1_8_r10.c \ +-$(srcdir)/generated/maxloc1_16_r10.c \ +-$(srcdir)/generated/maxloc1_4_r16.c \ +-$(srcdir)/generated/maxloc1_8_r16.c \ +-$(srcdir)/generated/maxloc1_16_r16.c ++generated/maxloc1_4_i1.c \ ++generated/maxloc1_8_i1.c \ ++generated/maxloc1_16_i1.c \ ++generated/maxloc1_4_i2.c \ ++generated/maxloc1_8_i2.c \ ++generated/maxloc1_16_i2.c \ ++generated/maxloc1_4_i4.c \ ++generated/maxloc1_8_i4.c \ ++generated/maxloc1_16_i4.c \ ++generated/maxloc1_4_i8.c \ ++generated/maxloc1_8_i8.c \ ++generated/maxloc1_16_i8.c \ ++generated/maxloc1_4_i16.c \ ++generated/maxloc1_8_i16.c \ ++generated/maxloc1_16_i16.c \ ++generated/maxloc1_4_r4.c \ ++generated/maxloc1_8_r4.c \ ++generated/maxloc1_16_r4.c \ ++generated/maxloc1_4_r8.c \ ++generated/maxloc1_8_r8.c \ ++generated/maxloc1_16_r8.c \ ++generated/maxloc1_4_r10.c \ ++generated/maxloc1_8_r10.c \ ++generated/maxloc1_16_r10.c \ ++generated/maxloc1_4_r16.c \ ++generated/maxloc1_8_r16.c \ ++generated/maxloc1_16_r16.c + + i_maxloc1s_c= \ +-$(srcdir)/generated/maxloc1_4_s1.c \ +-$(srcdir)/generated/maxloc1_4_s4.c \ +-$(srcdir)/generated/maxloc1_8_s1.c \ +-$(srcdir)/generated/maxloc1_8_s4.c \ +-$(srcdir)/generated/maxloc1_16_s1.c \ +-$(srcdir)/generated/maxloc1_16_s4.c ++generated/maxloc1_4_s1.c \ ++generated/maxloc1_4_s4.c \ ++generated/maxloc1_8_s1.c \ ++generated/maxloc1_8_s4.c \ ++generated/maxloc1_16_s1.c \ ++generated/maxloc1_16_s4.c + + i_maxloc2s_c= \ +-$(srcdir)/generated/maxloc2_4_s1.c \ +-$(srcdir)/generated/maxloc2_4_s4.c \ +-$(srcdir)/generated/maxloc2_8_s1.c \ +-$(srcdir)/generated/maxloc2_8_s4.c \ +-$(srcdir)/generated/maxloc2_16_s1.c \ +-$(srcdir)/generated/maxloc2_16_s4.c ++generated/maxloc2_4_s1.c \ ++generated/maxloc2_4_s4.c \ ++generated/maxloc2_8_s1.c \ ++generated/maxloc2_8_s4.c \ ++generated/maxloc2_16_s1.c \ ++generated/maxloc2_16_s4.c + + i_maxval_c= \ +-$(srcdir)/generated/maxval_i1.c \ +-$(srcdir)/generated/maxval_i2.c \ +-$(srcdir)/generated/maxval_i4.c \ +-$(srcdir)/generated/maxval_i8.c \ +-$(srcdir)/generated/maxval_i16.c \ +-$(srcdir)/generated/maxval_r4.c \ +-$(srcdir)/generated/maxval_r8.c \ +-$(srcdir)/generated/maxval_r10.c \ +-$(srcdir)/generated/maxval_r16.c ++generated/maxval_i1.c \ ++generated/maxval_i2.c \ ++generated/maxval_i4.c \ ++generated/maxval_i8.c \ ++generated/maxval_i16.c \ ++generated/maxval_r4.c \ ++generated/maxval_r8.c \ ++generated/maxval_r10.c \ ++generated/maxval_r16.c + + i_maxval0s_c=\ +-$(srcdir)/generated/maxval0_s1.c \ +-$(srcdir)/generated/maxval0_s4.c ++generated/maxval0_s1.c \ ++generated/maxval0_s4.c + + i_maxval1s_c=\ +-$(srcdir)/generated/maxval1_s1.c \ +-$(srcdir)/generated/maxval1_s4.c ++generated/maxval1_s1.c \ ++generated/maxval1_s4.c + + i_minloc0_c= \ +-$(srcdir)/generated/minloc0_4_i1.c \ +-$(srcdir)/generated/minloc0_8_i1.c \ +-$(srcdir)/generated/minloc0_16_i1.c \ +-$(srcdir)/generated/minloc0_4_i2.c \ +-$(srcdir)/generated/minloc0_8_i2.c \ +-$(srcdir)/generated/minloc0_16_i2.c \ +-$(srcdir)/generated/minloc0_4_i4.c \ +-$(srcdir)/generated/minloc0_8_i4.c \ +-$(srcdir)/generated/minloc0_16_i4.c \ +-$(srcdir)/generated/minloc0_4_i8.c \ +-$(srcdir)/generated/minloc0_8_i8.c \ +-$(srcdir)/generated/minloc0_16_i8.c \ +-$(srcdir)/generated/minloc0_4_i16.c \ +-$(srcdir)/generated/minloc0_8_i16.c \ +-$(srcdir)/generated/minloc0_16_i16.c \ +-$(srcdir)/generated/minloc0_4_r4.c \ +-$(srcdir)/generated/minloc0_8_r4.c \ +-$(srcdir)/generated/minloc0_16_r4.c \ +-$(srcdir)/generated/minloc0_4_r8.c \ +-$(srcdir)/generated/minloc0_8_r8.c \ +-$(srcdir)/generated/minloc0_16_r8.c \ +-$(srcdir)/generated/minloc0_4_r10.c \ +-$(srcdir)/generated/minloc0_8_r10.c \ +-$(srcdir)/generated/minloc0_16_r10.c \ +-$(srcdir)/generated/minloc0_4_r16.c \ +-$(srcdir)/generated/minloc0_8_r16.c \ +-$(srcdir)/generated/minloc0_16_r16.c ++generated/minloc0_4_i1.c \ ++generated/minloc0_8_i1.c \ ++generated/minloc0_16_i1.c \ ++generated/minloc0_4_i2.c \ ++generated/minloc0_8_i2.c \ ++generated/minloc0_16_i2.c \ ++generated/minloc0_4_i4.c \ ++generated/minloc0_8_i4.c \ ++generated/minloc0_16_i4.c \ ++generated/minloc0_4_i8.c \ ++generated/minloc0_8_i8.c \ ++generated/minloc0_16_i8.c \ ++generated/minloc0_4_i16.c \ ++generated/minloc0_8_i16.c \ ++generated/minloc0_16_i16.c \ ++generated/minloc0_4_r4.c \ ++generated/minloc0_8_r4.c \ ++generated/minloc0_16_r4.c \ ++generated/minloc0_4_r8.c \ ++generated/minloc0_8_r8.c \ ++generated/minloc0_16_r8.c \ ++generated/minloc0_4_r10.c \ ++generated/minloc0_8_r10.c \ ++generated/minloc0_16_r10.c \ ++generated/minloc0_4_r16.c \ ++generated/minloc0_8_r16.c \ ++generated/minloc0_16_r16.c + + i_minloc0s_c = \ +-$(srcdir)/generated/minloc0_4_s1.c \ +-$(srcdir)/generated/minloc0_4_s4.c \ +-$(srcdir)/generated/minloc0_8_s1.c \ +-$(srcdir)/generated/minloc0_8_s4.c \ +-$(srcdir)/generated/minloc0_16_s1.c \ +-$(srcdir)/generated/minloc0_16_s4.c ++generated/minloc0_4_s1.c \ ++generated/minloc0_4_s4.c \ ++generated/minloc0_8_s1.c \ ++generated/minloc0_8_s4.c \ ++generated/minloc0_16_s1.c \ ++generated/minloc0_16_s4.c + + i_minloc1_c= \ +-$(srcdir)/generated/minloc1_4_i1.c \ +-$(srcdir)/generated/minloc1_8_i1.c \ +-$(srcdir)/generated/minloc1_16_i1.c \ +-$(srcdir)/generated/minloc1_4_i2.c \ +-$(srcdir)/generated/minloc1_8_i2.c \ +-$(srcdir)/generated/minloc1_16_i2.c \ +-$(srcdir)/generated/minloc1_4_i4.c \ +-$(srcdir)/generated/minloc1_8_i4.c \ +-$(srcdir)/generated/minloc1_16_i4.c \ +-$(srcdir)/generated/minloc1_4_i8.c \ +-$(srcdir)/generated/minloc1_8_i8.c \ +-$(srcdir)/generated/minloc1_16_i8.c \ +-$(srcdir)/generated/minloc1_4_i16.c \ +-$(srcdir)/generated/minloc1_8_i16.c \ +-$(srcdir)/generated/minloc1_16_i16.c \ +-$(srcdir)/generated/minloc1_4_r4.c \ +-$(srcdir)/generated/minloc1_8_r4.c \ +-$(srcdir)/generated/minloc1_16_r4.c \ +-$(srcdir)/generated/minloc1_4_r8.c \ +-$(srcdir)/generated/minloc1_8_r8.c \ +-$(srcdir)/generated/minloc1_16_r8.c \ +-$(srcdir)/generated/minloc1_4_r10.c \ +-$(srcdir)/generated/minloc1_8_r10.c \ +-$(srcdir)/generated/minloc1_16_r10.c \ +-$(srcdir)/generated/minloc1_4_r16.c \ +-$(srcdir)/generated/minloc1_8_r16.c \ +-$(srcdir)/generated/minloc1_16_r16.c ++generated/minloc1_4_i1.c \ ++generated/minloc1_8_i1.c \ ++generated/minloc1_16_i1.c \ ++generated/minloc1_4_i2.c \ ++generated/minloc1_8_i2.c \ ++generated/minloc1_16_i2.c \ ++generated/minloc1_4_i4.c \ ++generated/minloc1_8_i4.c \ ++generated/minloc1_16_i4.c \ ++generated/minloc1_4_i8.c \ ++generated/minloc1_8_i8.c \ ++generated/minloc1_16_i8.c \ ++generated/minloc1_4_i16.c \ ++generated/minloc1_8_i16.c \ ++generated/minloc1_16_i16.c \ ++generated/minloc1_4_r4.c \ ++generated/minloc1_8_r4.c \ ++generated/minloc1_16_r4.c \ ++generated/minloc1_4_r8.c \ ++generated/minloc1_8_r8.c \ ++generated/minloc1_16_r8.c \ ++generated/minloc1_4_r10.c \ ++generated/minloc1_8_r10.c \ ++generated/minloc1_16_r10.c \ ++generated/minloc1_4_r16.c \ ++generated/minloc1_8_r16.c \ ++generated/minloc1_16_r16.c + + i_minloc1s_c= \ +-$(srcdir)/generated/minloc1_4_s1.c \ +-$(srcdir)/generated/minloc1_4_s4.c \ +-$(srcdir)/generated/minloc1_8_s1.c \ +-$(srcdir)/generated/minloc1_8_s4.c \ +-$(srcdir)/generated/minloc1_16_s1.c \ +-$(srcdir)/generated/minloc1_16_s4.c ++generated/minloc1_4_s1.c \ ++generated/minloc1_4_s4.c \ ++generated/minloc1_8_s1.c \ ++generated/minloc1_8_s4.c \ ++generated/minloc1_16_s1.c \ ++generated/minloc1_16_s4.c + + i_minloc2s_c= \ +-$(srcdir)/generated/minloc2_4_s1.c \ +-$(srcdir)/generated/minloc2_4_s4.c \ +-$(srcdir)/generated/minloc2_8_s1.c \ +-$(srcdir)/generated/minloc2_8_s4.c \ +-$(srcdir)/generated/minloc2_16_s1.c \ +-$(srcdir)/generated/minloc2_16_s4.c ++generated/minloc2_4_s1.c \ ++generated/minloc2_4_s4.c \ ++generated/minloc2_8_s1.c \ ++generated/minloc2_8_s4.c \ ++generated/minloc2_16_s1.c \ ++generated/minloc2_16_s4.c + + i_minval_c= \ +-$(srcdir)/generated/minval_i1.c \ +-$(srcdir)/generated/minval_i2.c \ +-$(srcdir)/generated/minval_i4.c \ +-$(srcdir)/generated/minval_i8.c \ +-$(srcdir)/generated/minval_i16.c \ +-$(srcdir)/generated/minval_r4.c \ +-$(srcdir)/generated/minval_r8.c \ +-$(srcdir)/generated/minval_r10.c \ +-$(srcdir)/generated/minval_r16.c ++generated/minval_i1.c \ ++generated/minval_i2.c \ ++generated/minval_i4.c \ ++generated/minval_i8.c \ ++generated/minval_i16.c \ ++generated/minval_r4.c \ ++generated/minval_r8.c \ ++generated/minval_r10.c \ ++generated/minval_r16.c + + i_minval0s_c=\ +-$(srcdir)/generated/minval0_s1.c \ +-$(srcdir)/generated/minval0_s4.c ++generated/minval0_s1.c \ ++generated/minval0_s4.c + + i_minval1s_c=\ +-$(srcdir)/generated/minval1_s1.c \ +-$(srcdir)/generated/minval1_s4.c ++generated/minval1_s1.c \ ++generated/minval1_s4.c + + i_norm2_c= \ +-$(srcdir)/generated/norm2_r4.c \ +-$(srcdir)/generated/norm2_r8.c \ +-$(srcdir)/generated/norm2_r10.c \ +-$(srcdir)/generated/norm2_r16.c ++generated/norm2_r4.c \ ++generated/norm2_r8.c \ ++generated/norm2_r10.c \ ++generated/norm2_r16.c + + i_parity_c = \ +-$(srcdir)/generated/parity_l1.c \ +-$(srcdir)/generated/parity_l2.c \ +-$(srcdir)/generated/parity_l4.c \ +-$(srcdir)/generated/parity_l8.c \ +-$(srcdir)/generated/parity_l16.c ++generated/parity_l1.c \ ++generated/parity_l2.c \ ++generated/parity_l4.c \ ++generated/parity_l8.c \ ++generated/parity_l16.c + + i_sum_c= \ +-$(srcdir)/generated/sum_i1.c \ +-$(srcdir)/generated/sum_i2.c \ +-$(srcdir)/generated/sum_i4.c \ +-$(srcdir)/generated/sum_i8.c \ +-$(srcdir)/generated/sum_i16.c \ +-$(srcdir)/generated/sum_r4.c \ +-$(srcdir)/generated/sum_r8.c \ +-$(srcdir)/generated/sum_r10.c \ +-$(srcdir)/generated/sum_r16.c \ +-$(srcdir)/generated/sum_c4.c \ +-$(srcdir)/generated/sum_c8.c \ +-$(srcdir)/generated/sum_c10.c \ +-$(srcdir)/generated/sum_c16.c ++generated/sum_i1.c \ ++generated/sum_i2.c \ ++generated/sum_i4.c \ ++generated/sum_i8.c \ ++generated/sum_i16.c \ ++generated/sum_r4.c \ ++generated/sum_r8.c \ ++generated/sum_r10.c \ ++generated/sum_r16.c \ ++generated/sum_c4.c \ ++generated/sum_c8.c \ ++generated/sum_c10.c \ ++generated/sum_c16.c + + i_product_c= \ +-$(srcdir)/generated/product_i1.c \ +-$(srcdir)/generated/product_i2.c \ +-$(srcdir)/generated/product_i4.c \ +-$(srcdir)/generated/product_i8.c \ +-$(srcdir)/generated/product_i16.c \ +-$(srcdir)/generated/product_r4.c \ +-$(srcdir)/generated/product_r8.c \ +-$(srcdir)/generated/product_r10.c \ +-$(srcdir)/generated/product_r16.c \ +-$(srcdir)/generated/product_c4.c \ +-$(srcdir)/generated/product_c8.c \ +-$(srcdir)/generated/product_c10.c \ +-$(srcdir)/generated/product_c16.c ++generated/product_i1.c \ ++generated/product_i2.c \ ++generated/product_i4.c \ ++generated/product_i8.c \ ++generated/product_i16.c \ ++generated/product_r4.c \ ++generated/product_r8.c \ ++generated/product_r10.c \ ++generated/product_r16.c \ ++generated/product_c4.c \ ++generated/product_c8.c \ ++generated/product_c10.c \ ++generated/product_c16.c + + i_matmul_c= \ +-$(srcdir)/generated/matmul_i1.c \ +-$(srcdir)/generated/matmul_i2.c \ +-$(srcdir)/generated/matmul_i4.c \ +-$(srcdir)/generated/matmul_i8.c \ +-$(srcdir)/generated/matmul_i16.c \ +-$(srcdir)/generated/matmul_r4.c \ +-$(srcdir)/generated/matmul_r8.c \ +-$(srcdir)/generated/matmul_r10.c \ +-$(srcdir)/generated/matmul_r16.c \ +-$(srcdir)/generated/matmul_c4.c \ +-$(srcdir)/generated/matmul_c8.c \ +-$(srcdir)/generated/matmul_c10.c \ +-$(srcdir)/generated/matmul_c16.c ++generated/matmul_i1.c \ ++generated/matmul_i2.c \ ++generated/matmul_i4.c \ ++generated/matmul_i8.c \ ++generated/matmul_i16.c \ ++generated/matmul_r4.c \ ++generated/matmul_r8.c \ ++generated/matmul_r10.c \ ++generated/matmul_r16.c \ ++generated/matmul_c4.c \ ++generated/matmul_c8.c \ ++generated/matmul_c10.c \ ++generated/matmul_c16.c + + i_matmulavx128_c= \ +-$(srcdir)/generated/matmulavx128_i1.c \ +-$(srcdir)/generated/matmulavx128_i2.c \ +-$(srcdir)/generated/matmulavx128_i4.c \ +-$(srcdir)/generated/matmulavx128_i8.c \ +-$(srcdir)/generated/matmulavx128_i16.c \ +-$(srcdir)/generated/matmulavx128_r4.c \ +-$(srcdir)/generated/matmulavx128_r8.c \ +-$(srcdir)/generated/matmulavx128_r10.c \ +-$(srcdir)/generated/matmulavx128_r16.c \ +-$(srcdir)/generated/matmulavx128_c4.c \ +-$(srcdir)/generated/matmulavx128_c8.c \ +-$(srcdir)/generated/matmulavx128_c10.c \ +-$(srcdir)/generated/matmulavx128_c16.c ++generated/matmulavx128_i1.c \ ++generated/matmulavx128_i2.c \ ++generated/matmulavx128_i4.c \ ++generated/matmulavx128_i8.c \ ++generated/matmulavx128_i16.c \ ++generated/matmulavx128_r4.c \ ++generated/matmulavx128_r8.c \ ++generated/matmulavx128_r10.c \ ++generated/matmulavx128_r16.c \ ++generated/matmulavx128_c4.c \ ++generated/matmulavx128_c8.c \ ++generated/matmulavx128_c10.c \ ++generated/matmulavx128_c16.c + + i_matmull_c= \ +-$(srcdir)/generated/matmul_l4.c \ +-$(srcdir)/generated/matmul_l8.c \ +-$(srcdir)/generated/matmul_l16.c ++generated/matmul_l4.c \ ++generated/matmul_l8.c \ ++generated/matmul_l16.c + + i_shape_c= \ +-$(srcdir)/generated/shape_i1.c \ +-$(srcdir)/generated/shape_i2.c \ +-$(srcdir)/generated/shape_i4.c \ +-$(srcdir)/generated/shape_i8.c \ +-$(srcdir)/generated/shape_i16.c ++generated/shape_i1.c \ ++generated/shape_i2.c \ ++generated/shape_i4.c \ ++generated/shape_i8.c \ ++generated/shape_i16.c + + i_reshape_c= \ +-$(srcdir)/generated/reshape_i4.c \ +-$(srcdir)/generated/reshape_i8.c \ +-$(srcdir)/generated/reshape_i16.c \ +-$(srcdir)/generated/reshape_r4.c \ +-$(srcdir)/generated/reshape_r8.c \ +-$(srcdir)/generated/reshape_r10.c \ +-$(srcdir)/generated/reshape_r16.c \ +-$(srcdir)/generated/reshape_c4.c \ +-$(srcdir)/generated/reshape_c8.c \ +-$(srcdir)/generated/reshape_c10.c \ +-$(srcdir)/generated/reshape_c16.c ++generated/reshape_i4.c \ ++generated/reshape_i8.c \ ++generated/reshape_i16.c \ ++generated/reshape_r4.c \ ++generated/reshape_r8.c \ ++generated/reshape_r10.c \ ++generated/reshape_r16.c \ ++generated/reshape_c4.c \ ++generated/reshape_c8.c \ ++generated/reshape_c10.c \ ++generated/reshape_c16.c + + i_eoshift1_c= \ +-$(srcdir)/generated/eoshift1_4.c \ +-$(srcdir)/generated/eoshift1_8.c \ +-$(srcdir)/generated/eoshift1_16.c ++generated/eoshift1_4.c \ ++generated/eoshift1_8.c \ ++generated/eoshift1_16.c + + i_eoshift3_c= \ +-$(srcdir)/generated/eoshift3_4.c \ +-$(srcdir)/generated/eoshift3_8.c \ +-$(srcdir)/generated/eoshift3_16.c ++generated/eoshift3_4.c \ ++generated/eoshift3_8.c \ ++generated/eoshift3_16.c + + i_cshift0_c= \ +-$(srcdir)/generated/cshift0_i1.c \ +-$(srcdir)/generated/cshift0_i2.c \ +-$(srcdir)/generated/cshift0_i4.c \ +-$(srcdir)/generated/cshift0_i8.c \ +-$(srcdir)/generated/cshift0_i16.c \ +-$(srcdir)/generated/cshift0_r4.c \ +-$(srcdir)/generated/cshift0_r8.c \ +-$(srcdir)/generated/cshift0_r10.c \ +-$(srcdir)/generated/cshift0_r16.c \ +-$(srcdir)/generated/cshift0_c4.c \ +-$(srcdir)/generated/cshift0_c8.c \ +-$(srcdir)/generated/cshift0_c10.c \ +-$(srcdir)/generated/cshift0_c16.c ++generated/cshift0_i1.c \ ++generated/cshift0_i2.c \ ++generated/cshift0_i4.c \ ++generated/cshift0_i8.c \ ++generated/cshift0_i16.c \ ++generated/cshift0_r4.c \ ++generated/cshift0_r8.c \ ++generated/cshift0_r10.c \ ++generated/cshift0_r16.c \ ++generated/cshift0_c4.c \ ++generated/cshift0_c8.c \ ++generated/cshift0_c10.c \ ++generated/cshift0_c16.c + + i_cshift1_c= \ +-$(srcdir)/generated/cshift1_4.c \ +-$(srcdir)/generated/cshift1_8.c \ +-$(srcdir)/generated/cshift1_16.c ++generated/cshift1_4.c \ ++generated/cshift1_8.c \ ++generated/cshift1_16.c + + i_cshift1a_c = \ +-$(srcdir)/generated/cshift1_4_i1.c \ +-$(srcdir)/generated/cshift1_4_i2.c \ +-$(srcdir)/generated/cshift1_4_i4.c \ +-$(srcdir)/generated/cshift1_4_i8.c \ +-$(srcdir)/generated/cshift1_4_i16.c \ +-$(srcdir)/generated/cshift1_4_r4.c \ +-$(srcdir)/generated/cshift1_4_r8.c \ +-$(srcdir)/generated/cshift1_4_r10.c \ +-$(srcdir)/generated/cshift1_4_r16.c \ +-$(srcdir)/generated/cshift1_4_c4.c \ +-$(srcdir)/generated/cshift1_4_c8.c \ +-$(srcdir)/generated/cshift1_4_c10.c \ +-$(srcdir)/generated/cshift1_4_c16.c \ +-$(srcdir)/generated/cshift1_8_i1.c \ +-$(srcdir)/generated/cshift1_8_i2.c \ +-$(srcdir)/generated/cshift1_8_i4.c \ +-$(srcdir)/generated/cshift1_8_i8.c \ +-$(srcdir)/generated/cshift1_8_i16.c \ +-$(srcdir)/generated/cshift1_8_r4.c \ +-$(srcdir)/generated/cshift1_8_r8.c \ +-$(srcdir)/generated/cshift1_8_r10.c \ +-$(srcdir)/generated/cshift1_8_r16.c \ +-$(srcdir)/generated/cshift1_8_c4.c \ +-$(srcdir)/generated/cshift1_8_c8.c \ +-$(srcdir)/generated/cshift1_8_c10.c \ +-$(srcdir)/generated/cshift1_8_c16.c \ +-$(srcdir)/generated/cshift1_16_i1.c \ +-$(srcdir)/generated/cshift1_16_i2.c \ +-$(srcdir)/generated/cshift1_16_i4.c \ +-$(srcdir)/generated/cshift1_16_i8.c \ +-$(srcdir)/generated/cshift1_16_i16.c \ +-$(srcdir)/generated/cshift1_16_r4.c \ +-$(srcdir)/generated/cshift1_16_r8.c \ +-$(srcdir)/generated/cshift1_16_r10.c \ +-$(srcdir)/generated/cshift1_16_r16.c \ +-$(srcdir)/generated/cshift1_16_c4.c \ +-$(srcdir)/generated/cshift1_16_c8.c \ +-$(srcdir)/generated/cshift1_16_c10.c \ +-$(srcdir)/generated/cshift1_16_c16.c ++generated/cshift1_4_i1.c \ ++generated/cshift1_4_i2.c \ ++generated/cshift1_4_i4.c \ ++generated/cshift1_4_i8.c \ ++generated/cshift1_4_i16.c \ ++generated/cshift1_4_r4.c \ ++generated/cshift1_4_r8.c \ ++generated/cshift1_4_r10.c \ ++generated/cshift1_4_r16.c \ ++generated/cshift1_4_c4.c \ ++generated/cshift1_4_c8.c \ ++generated/cshift1_4_c10.c \ ++generated/cshift1_4_c16.c \ ++generated/cshift1_8_i1.c \ ++generated/cshift1_8_i2.c \ ++generated/cshift1_8_i4.c \ ++generated/cshift1_8_i8.c \ ++generated/cshift1_8_i16.c \ ++generated/cshift1_8_r4.c \ ++generated/cshift1_8_r8.c \ ++generated/cshift1_8_r10.c \ ++generated/cshift1_8_r16.c \ ++generated/cshift1_8_c4.c \ ++generated/cshift1_8_c8.c \ ++generated/cshift1_8_c10.c \ ++generated/cshift1_8_c16.c \ ++generated/cshift1_16_i1.c \ ++generated/cshift1_16_i2.c \ ++generated/cshift1_16_i4.c \ ++generated/cshift1_16_i8.c \ ++generated/cshift1_16_i16.c \ ++generated/cshift1_16_r4.c \ ++generated/cshift1_16_r8.c \ ++generated/cshift1_16_r10.c \ ++generated/cshift1_16_r16.c \ ++generated/cshift1_16_c4.c \ ++generated/cshift1_16_c8.c \ ++generated/cshift1_16_c10.c \ ++generated/cshift1_16_c16.c + + in_pack_c = \ +-$(srcdir)/generated/in_pack_i1.c \ +-$(srcdir)/generated/in_pack_i2.c \ +-$(srcdir)/generated/in_pack_i4.c \ +-$(srcdir)/generated/in_pack_i8.c \ +-$(srcdir)/generated/in_pack_i16.c \ +-$(srcdir)/generated/in_pack_r4.c \ +-$(srcdir)/generated/in_pack_r8.c \ +-$(srcdir)/generated/in_pack_r10.c \ +-$(srcdir)/generated/in_pack_r16.c \ +-$(srcdir)/generated/in_pack_c4.c \ +-$(srcdir)/generated/in_pack_c8.c \ +-$(srcdir)/generated/in_pack_c10.c \ +-$(srcdir)/generated/in_pack_c16.c ++generated/in_pack_i1.c \ ++generated/in_pack_i2.c \ ++generated/in_pack_i4.c \ ++generated/in_pack_i8.c \ ++generated/in_pack_i16.c \ ++generated/in_pack_r4.c \ ++generated/in_pack_r8.c \ ++generated/in_pack_r10.c \ ++generated/in_pack_r16.c \ ++generated/in_pack_c4.c \ ++generated/in_pack_c8.c \ ++generated/in_pack_c10.c \ ++generated/in_pack_c16.c + + in_unpack_c = \ +-$(srcdir)/generated/in_unpack_i1.c \ +-$(srcdir)/generated/in_unpack_i2.c \ +-$(srcdir)/generated/in_unpack_i4.c \ +-$(srcdir)/generated/in_unpack_i8.c \ +-$(srcdir)/generated/in_unpack_i16.c \ +-$(srcdir)/generated/in_unpack_r4.c \ +-$(srcdir)/generated/in_unpack_r8.c \ +-$(srcdir)/generated/in_unpack_r10.c \ +-$(srcdir)/generated/in_unpack_r16.c \ +-$(srcdir)/generated/in_unpack_c4.c \ +-$(srcdir)/generated/in_unpack_c8.c \ +-$(srcdir)/generated/in_unpack_c10.c \ +-$(srcdir)/generated/in_unpack_c16.c ++generated/in_unpack_i1.c \ ++generated/in_unpack_i2.c \ ++generated/in_unpack_i4.c \ ++generated/in_unpack_i8.c \ ++generated/in_unpack_i16.c \ ++generated/in_unpack_r4.c \ ++generated/in_unpack_r8.c \ ++generated/in_unpack_r10.c \ ++generated/in_unpack_r16.c \ ++generated/in_unpack_c4.c \ ++generated/in_unpack_c8.c \ ++generated/in_unpack_c10.c \ ++generated/in_unpack_c16.c + + i_pow_c = \ +-$(srcdir)/generated/pow_i4_i4.c \ +-$(srcdir)/generated/pow_i8_i4.c \ +-$(srcdir)/generated/pow_i16_i4.c \ +-$(srcdir)/generated/pow_r16_i4.c \ +-$(srcdir)/generated/pow_c4_i4.c \ +-$(srcdir)/generated/pow_c8_i4.c \ +-$(srcdir)/generated/pow_c10_i4.c \ +-$(srcdir)/generated/pow_c16_i4.c \ +-$(srcdir)/generated/pow_i4_i8.c \ +-$(srcdir)/generated/pow_i8_i8.c \ +-$(srcdir)/generated/pow_i16_i8.c \ +-$(srcdir)/generated/pow_r4_i8.c \ +-$(srcdir)/generated/pow_r8_i8.c \ +-$(srcdir)/generated/pow_r10_i8.c \ +-$(srcdir)/generated/pow_r16_i8.c \ +-$(srcdir)/generated/pow_c4_i8.c \ +-$(srcdir)/generated/pow_c8_i8.c \ +-$(srcdir)/generated/pow_c10_i8.c \ +-$(srcdir)/generated/pow_c16_i8.c \ +-$(srcdir)/generated/pow_i4_i16.c \ +-$(srcdir)/generated/pow_i8_i16.c \ +-$(srcdir)/generated/pow_i16_i16.c \ +-$(srcdir)/generated/pow_r4_i16.c \ +-$(srcdir)/generated/pow_r8_i16.c \ +-$(srcdir)/generated/pow_r10_i16.c \ +-$(srcdir)/generated/pow_r16_i16.c \ +-$(srcdir)/generated/pow_c4_i16.c \ +-$(srcdir)/generated/pow_c8_i16.c \ +-$(srcdir)/generated/pow_c10_i16.c \ +-$(srcdir)/generated/pow_c16_i16.c ++generated/pow_i4_i4.c \ ++generated/pow_i8_i4.c \ ++generated/pow_i16_i4.c \ ++generated/pow_r16_i4.c \ ++generated/pow_c4_i4.c \ ++generated/pow_c8_i4.c \ ++generated/pow_c10_i4.c \ ++generated/pow_c16_i4.c \ ++generated/pow_i4_i8.c \ ++generated/pow_i8_i8.c \ ++generated/pow_i16_i8.c \ ++generated/pow_r4_i8.c \ ++generated/pow_r8_i8.c \ ++generated/pow_r10_i8.c \ ++generated/pow_r16_i8.c \ ++generated/pow_c4_i8.c \ ++generated/pow_c8_i8.c \ ++generated/pow_c10_i8.c \ ++generated/pow_c16_i8.c \ ++generated/pow_i4_i16.c \ ++generated/pow_i8_i16.c \ ++generated/pow_i16_i16.c \ ++generated/pow_r4_i16.c \ ++generated/pow_r8_i16.c \ ++generated/pow_r10_i16.c \ ++generated/pow_r16_i16.c \ ++generated/pow_c4_i16.c \ ++generated/pow_c8_i16.c \ ++generated/pow_c10_i16.c \ ++generated/pow_c16_i16.c + + i_pack_c = \ +-$(srcdir)/generated/pack_i1.c \ +-$(srcdir)/generated/pack_i2.c \ +-$(srcdir)/generated/pack_i4.c \ +-$(srcdir)/generated/pack_i8.c \ +-$(srcdir)/generated/pack_i16.c \ +-$(srcdir)/generated/pack_r4.c \ +-$(srcdir)/generated/pack_r8.c \ +-$(srcdir)/generated/pack_r10.c \ +-$(srcdir)/generated/pack_r16.c \ +-$(srcdir)/generated/pack_c4.c \ +-$(srcdir)/generated/pack_c8.c \ +-$(srcdir)/generated/pack_c10.c \ +-$(srcdir)/generated/pack_c16.c ++generated/pack_i1.c \ ++generated/pack_i2.c \ ++generated/pack_i4.c \ ++generated/pack_i8.c \ ++generated/pack_i16.c \ ++generated/pack_r4.c \ ++generated/pack_r8.c \ ++generated/pack_r10.c \ ++generated/pack_r16.c \ ++generated/pack_c4.c \ ++generated/pack_c8.c \ ++generated/pack_c10.c \ ++generated/pack_c16.c + + i_unpack_c = \ +-$(srcdir)/generated/unpack_i1.c \ +-$(srcdir)/generated/unpack_i2.c \ +-$(srcdir)/generated/unpack_i4.c \ +-$(srcdir)/generated/unpack_i8.c \ +-$(srcdir)/generated/unpack_i16.c \ +-$(srcdir)/generated/unpack_r4.c \ +-$(srcdir)/generated/unpack_r8.c \ +-$(srcdir)/generated/unpack_r10.c \ +-$(srcdir)/generated/unpack_r16.c \ +-$(srcdir)/generated/unpack_c4.c \ +-$(srcdir)/generated/unpack_c8.c \ +-$(srcdir)/generated/unpack_c10.c \ +-$(srcdir)/generated/unpack_c16.c ++generated/unpack_i1.c \ ++generated/unpack_i2.c \ ++generated/unpack_i4.c \ ++generated/unpack_i8.c \ ++generated/unpack_i16.c \ ++generated/unpack_r4.c \ ++generated/unpack_r8.c \ ++generated/unpack_r10.c \ ++generated/unpack_r16.c \ ++generated/unpack_c4.c \ ++generated/unpack_c8.c \ ++generated/unpack_c10.c \ ++generated/unpack_c16.c + + i_spread_c = \ +-$(srcdir)/generated/spread_i1.c \ +-$(srcdir)/generated/spread_i2.c \ +-$(srcdir)/generated/spread_i4.c \ +-$(srcdir)/generated/spread_i8.c \ +-$(srcdir)/generated/spread_i16.c \ +-$(srcdir)/generated/spread_r4.c \ +-$(srcdir)/generated/spread_r8.c \ +-$(srcdir)/generated/spread_r10.c \ +-$(srcdir)/generated/spread_r16.c \ +-$(srcdir)/generated/spread_c4.c \ +-$(srcdir)/generated/spread_c8.c \ +-$(srcdir)/generated/spread_c10.c \ +-$(srcdir)/generated/spread_c16.c ++generated/spread_i1.c \ ++generated/spread_i2.c \ ++generated/spread_i4.c \ ++generated/spread_i8.c \ ++generated/spread_i16.c \ ++generated/spread_r4.c \ ++generated/spread_r8.c \ ++generated/spread_r10.c \ ++generated/spread_r16.c \ ++generated/spread_c4.c \ ++generated/spread_c8.c \ ++generated/spread_c10.c \ ++generated/spread_c16.c + + i_isobinding_c = \ +-$(srcdir)/runtime/ISO_Fortran_binding.c ++runtime/ISO_Fortran_binding.c + + m4_files= m4/iparm.m4 m4/ifunction.m4 m4/iforeach.m4 m4/all.m4 \ + m4/any.m4 m4/count.m4 m4/maxloc0.m4 m4/maxloc1.m4 m4/maxval.m4 \ +@@ -825,146 +833,146 @@ gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \ + + # Machine generated specifics + gfor_built_specific_src= \ +-$(srcdir)/generated/_abs_c4.F90 \ +-$(srcdir)/generated/_abs_c8.F90 \ +-$(srcdir)/generated/_abs_c10.F90 \ +-$(srcdir)/generated/_abs_c16.F90 \ +-$(srcdir)/generated/_abs_i4.F90 \ +-$(srcdir)/generated/_abs_i8.F90 \ +-$(srcdir)/generated/_abs_i16.F90 \ +-$(srcdir)/generated/_abs_r4.F90 \ +-$(srcdir)/generated/_abs_r8.F90 \ +-$(srcdir)/generated/_abs_r10.F90 \ +-$(srcdir)/generated/_abs_r16.F90 \ +-$(srcdir)/generated/_aimag_c4.F90 \ +-$(srcdir)/generated/_aimag_c8.F90 \ +-$(srcdir)/generated/_aimag_c10.F90 \ +-$(srcdir)/generated/_aimag_c16.F90 \ +-$(srcdir)/generated/_exp_r4.F90 \ +-$(srcdir)/generated/_exp_r8.F90 \ +-$(srcdir)/generated/_exp_r10.F90 \ +-$(srcdir)/generated/_exp_r16.F90 \ +-$(srcdir)/generated/_exp_c4.F90 \ +-$(srcdir)/generated/_exp_c8.F90 \ +-$(srcdir)/generated/_exp_c10.F90 \ +-$(srcdir)/generated/_exp_c16.F90 \ +-$(srcdir)/generated/_log_r4.F90 \ +-$(srcdir)/generated/_log_r8.F90 \ +-$(srcdir)/generated/_log_r10.F90 \ +-$(srcdir)/generated/_log_r16.F90 \ +-$(srcdir)/generated/_log_c4.F90 \ +-$(srcdir)/generated/_log_c8.F90 \ +-$(srcdir)/generated/_log_c10.F90 \ +-$(srcdir)/generated/_log_c16.F90 \ +-$(srcdir)/generated/_log10_r4.F90 \ +-$(srcdir)/generated/_log10_r8.F90 \ +-$(srcdir)/generated/_log10_r10.F90 \ +-$(srcdir)/generated/_log10_r16.F90 \ +-$(srcdir)/generated/_sqrt_r4.F90 \ +-$(srcdir)/generated/_sqrt_r8.F90 \ +-$(srcdir)/generated/_sqrt_r10.F90 \ +-$(srcdir)/generated/_sqrt_r16.F90 \ +-$(srcdir)/generated/_sqrt_c4.F90 \ +-$(srcdir)/generated/_sqrt_c8.F90 \ +-$(srcdir)/generated/_sqrt_c10.F90 \ +-$(srcdir)/generated/_sqrt_c16.F90 \ +-$(srcdir)/generated/_asin_r4.F90 \ +-$(srcdir)/generated/_asin_r8.F90 \ +-$(srcdir)/generated/_asin_r10.F90 \ +-$(srcdir)/generated/_asin_r16.F90 \ +-$(srcdir)/generated/_asinh_r4.F90 \ +-$(srcdir)/generated/_asinh_r8.F90 \ +-$(srcdir)/generated/_asinh_r10.F90 \ +-$(srcdir)/generated/_asinh_r16.F90 \ +-$(srcdir)/generated/_acos_r4.F90 \ +-$(srcdir)/generated/_acos_r8.F90 \ +-$(srcdir)/generated/_acos_r10.F90 \ +-$(srcdir)/generated/_acos_r16.F90 \ +-$(srcdir)/generated/_acosh_r4.F90 \ +-$(srcdir)/generated/_acosh_r8.F90 \ +-$(srcdir)/generated/_acosh_r10.F90 \ +-$(srcdir)/generated/_acosh_r16.F90 \ +-$(srcdir)/generated/_atan_r4.F90 \ +-$(srcdir)/generated/_atan_r8.F90 \ +-$(srcdir)/generated/_atan_r10.F90 \ +-$(srcdir)/generated/_atan_r16.F90 \ +-$(srcdir)/generated/_atanh_r4.F90 \ +-$(srcdir)/generated/_atanh_r8.F90 \ +-$(srcdir)/generated/_atanh_r10.F90 \ +-$(srcdir)/generated/_atanh_r16.F90 \ +-$(srcdir)/generated/_sin_r4.F90 \ +-$(srcdir)/generated/_sin_r8.F90 \ +-$(srcdir)/generated/_sin_r10.F90 \ +-$(srcdir)/generated/_sin_r16.F90 \ +-$(srcdir)/generated/_sin_c4.F90 \ +-$(srcdir)/generated/_sin_c8.F90 \ +-$(srcdir)/generated/_sin_c10.F90 \ +-$(srcdir)/generated/_sin_c16.F90 \ +-$(srcdir)/generated/_cos_r4.F90 \ +-$(srcdir)/generated/_cos_r8.F90 \ +-$(srcdir)/generated/_cos_r10.F90 \ +-$(srcdir)/generated/_cos_r16.F90 \ +-$(srcdir)/generated/_cos_c4.F90 \ +-$(srcdir)/generated/_cos_c8.F90 \ +-$(srcdir)/generated/_cos_c10.F90 \ +-$(srcdir)/generated/_cos_c16.F90 \ +-$(srcdir)/generated/_tan_r4.F90 \ +-$(srcdir)/generated/_tan_r8.F90 \ +-$(srcdir)/generated/_tan_r10.F90 \ +-$(srcdir)/generated/_tan_r16.F90 \ +-$(srcdir)/generated/_sinh_r4.F90 \ +-$(srcdir)/generated/_sinh_r8.F90 \ +-$(srcdir)/generated/_sinh_r10.F90 \ +-$(srcdir)/generated/_sinh_r16.F90 \ +-$(srcdir)/generated/_cosh_r4.F90 \ +-$(srcdir)/generated/_cosh_r8.F90 \ +-$(srcdir)/generated/_cosh_r10.F90 \ +-$(srcdir)/generated/_cosh_r16.F90 \ +-$(srcdir)/generated/_tanh_r4.F90 \ +-$(srcdir)/generated/_tanh_r8.F90 \ +-$(srcdir)/generated/_tanh_r10.F90 \ +-$(srcdir)/generated/_tanh_r16.F90 \ +-$(srcdir)/generated/_conjg_c4.F90 \ +-$(srcdir)/generated/_conjg_c8.F90 \ +-$(srcdir)/generated/_conjg_c10.F90 \ +-$(srcdir)/generated/_conjg_c16.F90 \ +-$(srcdir)/generated/_aint_r4.F90 \ +-$(srcdir)/generated/_aint_r8.F90 \ +-$(srcdir)/generated/_aint_r10.F90 \ +-$(srcdir)/generated/_aint_r16.F90 \ +-$(srcdir)/generated/_anint_r4.F90 \ +-$(srcdir)/generated/_anint_r8.F90 \ +-$(srcdir)/generated/_anint_r10.F90 \ +-$(srcdir)/generated/_anint_r16.F90 ++generated/_abs_c4.F90 \ ++generated/_abs_c8.F90 \ ++generated/_abs_c10.F90 \ ++generated/_abs_c16.F90 \ ++generated/_abs_i4.F90 \ ++generated/_abs_i8.F90 \ ++generated/_abs_i16.F90 \ ++generated/_abs_r4.F90 \ ++generated/_abs_r8.F90 \ ++generated/_abs_r10.F90 \ ++generated/_abs_r16.F90 \ ++generated/_aimag_c4.F90 \ ++generated/_aimag_c8.F90 \ ++generated/_aimag_c10.F90 \ ++generated/_aimag_c16.F90 \ ++generated/_exp_r4.F90 \ ++generated/_exp_r8.F90 \ ++generated/_exp_r10.F90 \ ++generated/_exp_r16.F90 \ ++generated/_exp_c4.F90 \ ++generated/_exp_c8.F90 \ ++generated/_exp_c10.F90 \ ++generated/_exp_c16.F90 \ ++generated/_log_r4.F90 \ ++generated/_log_r8.F90 \ ++generated/_log_r10.F90 \ ++generated/_log_r16.F90 \ ++generated/_log_c4.F90 \ ++generated/_log_c8.F90 \ ++generated/_log_c10.F90 \ ++generated/_log_c16.F90 \ ++generated/_log10_r4.F90 \ ++generated/_log10_r8.F90 \ ++generated/_log10_r10.F90 \ ++generated/_log10_r16.F90 \ ++generated/_sqrt_r4.F90 \ ++generated/_sqrt_r8.F90 \ ++generated/_sqrt_r10.F90 \ ++generated/_sqrt_r16.F90 \ ++generated/_sqrt_c4.F90 \ ++generated/_sqrt_c8.F90 \ ++generated/_sqrt_c10.F90 \ ++generated/_sqrt_c16.F90 \ ++generated/_asin_r4.F90 \ ++generated/_asin_r8.F90 \ ++generated/_asin_r10.F90 \ ++generated/_asin_r16.F90 \ ++generated/_asinh_r4.F90 \ ++generated/_asinh_r8.F90 \ ++generated/_asinh_r10.F90 \ ++generated/_asinh_r16.F90 \ ++generated/_acos_r4.F90 \ ++generated/_acos_r8.F90 \ ++generated/_acos_r10.F90 \ ++generated/_acos_r16.F90 \ ++generated/_acosh_r4.F90 \ ++generated/_acosh_r8.F90 \ ++generated/_acosh_r10.F90 \ ++generated/_acosh_r16.F90 \ ++generated/_atan_r4.F90 \ ++generated/_atan_r8.F90 \ ++generated/_atan_r10.F90 \ ++generated/_atan_r16.F90 \ ++generated/_atanh_r4.F90 \ ++generated/_atanh_r8.F90 \ ++generated/_atanh_r10.F90 \ ++generated/_atanh_r16.F90 \ ++generated/_sin_r4.F90 \ ++generated/_sin_r8.F90 \ ++generated/_sin_r10.F90 \ ++generated/_sin_r16.F90 \ ++generated/_sin_c4.F90 \ ++generated/_sin_c8.F90 \ ++generated/_sin_c10.F90 \ ++generated/_sin_c16.F90 \ ++generated/_cos_r4.F90 \ ++generated/_cos_r8.F90 \ ++generated/_cos_r10.F90 \ ++generated/_cos_r16.F90 \ ++generated/_cos_c4.F90 \ ++generated/_cos_c8.F90 \ ++generated/_cos_c10.F90 \ ++generated/_cos_c16.F90 \ ++generated/_tan_r4.F90 \ ++generated/_tan_r8.F90 \ ++generated/_tan_r10.F90 \ ++generated/_tan_r16.F90 \ ++generated/_sinh_r4.F90 \ ++generated/_sinh_r8.F90 \ ++generated/_sinh_r10.F90 \ ++generated/_sinh_r16.F90 \ ++generated/_cosh_r4.F90 \ ++generated/_cosh_r8.F90 \ ++generated/_cosh_r10.F90 \ ++generated/_cosh_r16.F90 \ ++generated/_tanh_r4.F90 \ ++generated/_tanh_r8.F90 \ ++generated/_tanh_r10.F90 \ ++generated/_tanh_r16.F90 \ ++generated/_conjg_c4.F90 \ ++generated/_conjg_c8.F90 \ ++generated/_conjg_c10.F90 \ ++generated/_conjg_c16.F90 \ ++generated/_aint_r4.F90 \ ++generated/_aint_r8.F90 \ ++generated/_aint_r10.F90 \ ++generated/_aint_r16.F90 \ ++generated/_anint_r4.F90 \ ++generated/_anint_r8.F90 \ ++generated/_anint_r10.F90 \ ++generated/_anint_r16.F90 + + gfor_built_specific2_src= \ +-$(srcdir)/generated/_sign_i4.F90 \ +-$(srcdir)/generated/_sign_i8.F90 \ +-$(srcdir)/generated/_sign_i16.F90 \ +-$(srcdir)/generated/_sign_r4.F90 \ +-$(srcdir)/generated/_sign_r8.F90 \ +-$(srcdir)/generated/_sign_r10.F90 \ +-$(srcdir)/generated/_sign_r16.F90 \ +-$(srcdir)/generated/_dim_i4.F90 \ +-$(srcdir)/generated/_dim_i8.F90 \ +-$(srcdir)/generated/_dim_i16.F90 \ +-$(srcdir)/generated/_dim_r4.F90 \ +-$(srcdir)/generated/_dim_r8.F90 \ +-$(srcdir)/generated/_dim_r10.F90 \ +-$(srcdir)/generated/_dim_r16.F90 \ +-$(srcdir)/generated/_atan2_r4.F90 \ +-$(srcdir)/generated/_atan2_r8.F90 \ +-$(srcdir)/generated/_atan2_r10.F90 \ +-$(srcdir)/generated/_atan2_r16.F90 \ +-$(srcdir)/generated/_mod_i4.F90 \ +-$(srcdir)/generated/_mod_i8.F90 \ +-$(srcdir)/generated/_mod_i16.F90 \ +-$(srcdir)/generated/_mod_r4.F90 \ +-$(srcdir)/generated/_mod_r8.F90 \ +-$(srcdir)/generated/_mod_r10.F90 \ +-$(srcdir)/generated/_mod_r16.F90 +- +-gfor_misc_specifics = $(srcdir)/generated/misc_specifics.F90 ++generated/_sign_i4.F90 \ ++generated/_sign_i8.F90 \ ++generated/_sign_i16.F90 \ ++generated/_sign_r4.F90 \ ++generated/_sign_r8.F90 \ ++generated/_sign_r10.F90 \ ++generated/_sign_r16.F90 \ ++generated/_dim_i4.F90 \ ++generated/_dim_i8.F90 \ ++generated/_dim_i16.F90 \ ++generated/_dim_r4.F90 \ ++generated/_dim_r8.F90 \ ++generated/_dim_r10.F90 \ ++generated/_dim_r16.F90 \ ++generated/_atan2_r4.F90 \ ++generated/_atan2_r8.F90 \ ++generated/_atan2_r10.F90 \ ++generated/_atan2_r16.F90 \ ++generated/_mod_i4.F90 \ ++generated/_mod_i8.F90 \ ++generated/_mod_i16.F90 \ ++generated/_mod_r4.F90 \ ++generated/_mod_r8.F90 \ ++generated/_mod_r10.F90 \ ++generated/_mod_r16.F90 ++ ++gfor_misc_specifics = generated/misc_specifics.F90 + + gfor_specific_src= \ + $(gfor_built_specific_src) \ +@@ -975,33 +983,36 @@ intrinsics/f2c_specifics.F90 \ + intrinsics/random_init.f90 + + # Turn on vectorization and loop unrolling for matmul. +-$(patsubst %.c,%.lo,$(notdir $(i_matmul_c))): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 ++$(patsubst %.c,%.lo,$(i_matmul_c)): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 + + if HAVE_AVX128 + # Turn on AVX128 for AMD-specific matmul, but only if the compiler understands -mprefer-avx128 +-$(patsubst %.c,%.lo,$(notdir $(i_matmulavx128_c))): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mprefer-avx128 ++$(patsubst %.c,%.lo,$(i_matmulavx128_c)): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mprefer-avx128 + endif + # Logical matmul doesn't vectorize. +-$(patsubst %.c,%.lo,$(notdir $(i_matmull_c))): AM_CFLAGS += -funroll-loops ++$(patsubst %.c,%.lo,$(i_matmull_c)): AM_CFLAGS += -funroll-loops + + # Add the -fallow-leading-underscore option when needed +-$(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(notdir $(gfor_specific_src)))): AM_FCFLAGS += -fallow-leading-underscore +-selected_real_kind.lo selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore ++$(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(gfor_specific_src))): AM_FCFLAGS += -fallow-leading-underscore ++intrinsics/selected_real_kind.lo intrinsics/selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore + + if IEEE_SUPPORT + # Add flags for IEEE modules +-$(patsubst %.F90,%.lo,$(notdir $(gfor_ieee_src))): AM_FCFLAGS += -Wno-unused-dummy-argument -Wno-c-binding-type -ffree-line-length-0 -fallow-leading-underscore ++$(patsubst %.F90,%.lo,$(gfor_ieee_src)): AM_FCFLAGS += -Wno-unused-dummy-argument -Wno-c-binding-type -ffree-line-length-0 -fallow-leading-underscore -fsignaling-nans ++ ++# Add flags for IEEE helper code ++$(patsubst %.c,%.lo,$(gfor_ieee_helper_src)): AM_CFLAGS += -fsignaling-nans + endif + + # Dependencies between IEEE_ARITHMETIC and IEEE_EXCEPTIONS +-ieee_arithmetic.lo: ieee/ieee_arithmetic.F90 ieee_exceptions.lo ++ieee/ieee_arithmetic.lo: ieee/ieee_arithmetic.F90 ieee/ieee_exceptions.lo + $(LTPPFCCOMPILE) -c -o $@ $< + +-ieee_features.mod: ieee_features.lo ++ieee_features.mod: ieee/ieee_features.lo + : +-ieee_exceptions.mod: ieee_exceptions.lo ++ieee_exceptions.mod: ieee/ieee_exceptions.lo + : +-ieee_arithmetic.mod: ieee_arithmetic.lo ++ieee_arithmetic.mod: ieee/ieee_arithmetic.lo + : + + BUILT_SOURCES=$(gfor_built_src) $(gfor_built_specific_src) \ +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in +index 3d043aaa924..1f179cf6e0e 100644 +--- a/libgfortran/Makefile.in ++++ b/libgfortran/Makefile.in +@@ -91,8 +91,10 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-@LIBGFOR_MINIMAL_TRUE@am__append_1 = -DLIBGFOR_MINIMAL +-@LIBGFOR_MINIMAL_FALSE@am__append_2 = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++@LIBGFOR_MINIMAL_TRUE@am__append_2 = -DLIBGFOR_MINIMAL ++@LIBGFOR_MINIMAL_FALSE@am__append_3 = \ + @LIBGFOR_MINIMAL_FALSE@io/close.c \ + @LIBGFOR_MINIMAL_FALSE@io/file_pos.c \ + @LIBGFOR_MINIMAL_FALSE@io/format.c \ +@@ -110,7 +112,7 @@ target_triplet = @target@ + @LIBGFOR_MINIMAL_FALSE@io/fbuf.c \ + @LIBGFOR_MINIMAL_FALSE@io/async.c + +-@LIBGFOR_MINIMAL_FALSE@am__append_3 = \ ++@LIBGFOR_MINIMAL_FALSE@am__append_4 = \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/access.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/c99_functions.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/chdir.c \ +@@ -143,9 +145,9 @@ target_triplet = @target@ + @LIBGFOR_MINIMAL_FALSE@intrinsics/umask.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/unlink.c + +-@IEEE_SUPPORT_TRUE@am__append_4 = ieee/ieee_helper.c +-@LIBGFOR_MINIMAL_TRUE@am__append_5 = runtime/minimal.c +-@LIBGFOR_MINIMAL_FALSE@am__append_6 = \ ++@IEEE_SUPPORT_TRUE@am__append_5 = ieee/ieee_helper.c ++@LIBGFOR_MINIMAL_TRUE@am__append_6 = runtime/minimal.c ++@LIBGFOR_MINIMAL_FALSE@am__append_7 = \ + @LIBGFOR_MINIMAL_FALSE@runtime/backtrace.c \ + @LIBGFOR_MINIMAL_FALSE@runtime/convert_char.c \ + @LIBGFOR_MINIMAL_FALSE@runtime/environ.c \ +@@ -157,7 +159,7 @@ target_triplet = @target@ + + + # dummy sources for libtool +-@onestep_TRUE@am__append_7 = libgfortran_c.c libgfortran_f.f90 ++@onestep_TRUE@am__append_8 = libgfortran_c.c libgfortran_f.f90 + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ +@@ -219,169 +221,268 @@ am__installdirs = "$(DESTDIR)$(cafexeclibdir)" \ + "$(DESTDIR)$(gfor_cdir)" "$(DESTDIR)$(fincludedir)" + LTLIBRARIES = $(cafexeclib_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) + libcaf_single_la_LIBADD = +-am_libcaf_single_la_OBJECTS = single.lo ++am__dirstamp = $(am__leading_dot)dirstamp ++am_libcaf_single_la_OBJECTS = caf/single.lo + libcaf_single_la_OBJECTS = $(am_libcaf_single_la_OBJECTS) + libgfortran_la_LIBADD = +-@LIBGFOR_MINIMAL_TRUE@am__objects_1 = minimal.lo +-@LIBGFOR_MINIMAL_FALSE@am__objects_2 = backtrace.lo convert_char.lo \ +-@LIBGFOR_MINIMAL_FALSE@ environ.lo error.lo fpu.lo main.lo \ +-@LIBGFOR_MINIMAL_FALSE@ pause.lo stop.lo +-am__objects_3 = bounds.lo compile_options.lo memory.lo string.lo \ +- select.lo $(am__objects_1) $(am__objects_2) +-am__objects_4 = all_l1.lo all_l2.lo all_l4.lo all_l8.lo all_l16.lo +-am__objects_5 = any_l1.lo any_l2.lo any_l4.lo any_l8.lo any_l16.lo +-am__objects_6 = count_1_l.lo count_2_l.lo count_4_l.lo count_8_l.lo \ +- count_16_l.lo +-am__objects_7 = maxloc0_4_i1.lo maxloc0_8_i1.lo maxloc0_16_i1.lo \ +- maxloc0_4_i2.lo maxloc0_8_i2.lo maxloc0_16_i2.lo \ +- maxloc0_4_i4.lo maxloc0_8_i4.lo maxloc0_16_i4.lo \ +- maxloc0_4_i8.lo maxloc0_8_i8.lo maxloc0_16_i8.lo \ +- maxloc0_4_i16.lo maxloc0_8_i16.lo maxloc0_16_i16.lo \ +- maxloc0_4_r4.lo maxloc0_8_r4.lo maxloc0_16_r4.lo \ +- maxloc0_4_r8.lo maxloc0_8_r8.lo maxloc0_16_r8.lo \ +- maxloc0_4_r10.lo maxloc0_8_r10.lo maxloc0_16_r10.lo \ +- maxloc0_4_r16.lo maxloc0_8_r16.lo maxloc0_16_r16.lo +-am__objects_8 = maxloc1_4_i1.lo maxloc1_8_i1.lo maxloc1_16_i1.lo \ +- maxloc1_4_i2.lo maxloc1_8_i2.lo maxloc1_16_i2.lo \ +- maxloc1_4_i4.lo maxloc1_8_i4.lo maxloc1_16_i4.lo \ +- maxloc1_4_i8.lo maxloc1_8_i8.lo maxloc1_16_i8.lo \ +- maxloc1_4_i16.lo maxloc1_8_i16.lo maxloc1_16_i16.lo \ +- maxloc1_4_r4.lo maxloc1_8_r4.lo maxloc1_16_r4.lo \ +- maxloc1_4_r8.lo maxloc1_8_r8.lo maxloc1_16_r8.lo \ +- maxloc1_4_r10.lo maxloc1_8_r10.lo maxloc1_16_r10.lo \ +- maxloc1_4_r16.lo maxloc1_8_r16.lo maxloc1_16_r16.lo +-am__objects_9 = maxval_i1.lo maxval_i2.lo maxval_i4.lo maxval_i8.lo \ +- maxval_i16.lo maxval_r4.lo maxval_r8.lo maxval_r10.lo \ +- maxval_r16.lo +-am__objects_10 = minloc0_4_i1.lo minloc0_8_i1.lo minloc0_16_i1.lo \ +- minloc0_4_i2.lo minloc0_8_i2.lo minloc0_16_i2.lo \ +- minloc0_4_i4.lo minloc0_8_i4.lo minloc0_16_i4.lo \ +- minloc0_4_i8.lo minloc0_8_i8.lo minloc0_16_i8.lo \ +- minloc0_4_i16.lo minloc0_8_i16.lo minloc0_16_i16.lo \ +- minloc0_4_r4.lo minloc0_8_r4.lo minloc0_16_r4.lo \ +- minloc0_4_r8.lo minloc0_8_r8.lo minloc0_16_r8.lo \ +- minloc0_4_r10.lo minloc0_8_r10.lo minloc0_16_r10.lo \ +- minloc0_4_r16.lo minloc0_8_r16.lo minloc0_16_r16.lo +-am__objects_11 = minloc1_4_i1.lo minloc1_8_i1.lo minloc1_16_i1.lo \ +- minloc1_4_i2.lo minloc1_8_i2.lo minloc1_16_i2.lo \ +- minloc1_4_i4.lo minloc1_8_i4.lo minloc1_16_i4.lo \ +- minloc1_4_i8.lo minloc1_8_i8.lo minloc1_16_i8.lo \ +- minloc1_4_i16.lo minloc1_8_i16.lo minloc1_16_i16.lo \ +- minloc1_4_r4.lo minloc1_8_r4.lo minloc1_16_r4.lo \ +- minloc1_4_r8.lo minloc1_8_r8.lo minloc1_16_r8.lo \ +- minloc1_4_r10.lo minloc1_8_r10.lo minloc1_16_r10.lo \ +- minloc1_4_r16.lo minloc1_8_r16.lo minloc1_16_r16.lo +-am__objects_12 = minval_i1.lo minval_i2.lo minval_i4.lo minval_i8.lo \ +- minval_i16.lo minval_r4.lo minval_r8.lo minval_r10.lo \ +- minval_r16.lo +-am__objects_13 = product_i1.lo product_i2.lo product_i4.lo \ +- product_i8.lo product_i16.lo product_r4.lo product_r8.lo \ +- product_r10.lo product_r16.lo product_c4.lo product_c8.lo \ +- product_c10.lo product_c16.lo +-am__objects_14 = sum_i1.lo sum_i2.lo sum_i4.lo sum_i8.lo sum_i16.lo \ +- sum_r4.lo sum_r8.lo sum_r10.lo sum_r16.lo sum_c4.lo sum_c8.lo \ +- sum_c10.lo sum_c16.lo +-am__objects_15 = bessel_r4.lo bessel_r8.lo bessel_r10.lo bessel_r16.lo +-am__objects_16 = iall_i1.lo iall_i2.lo iall_i4.lo iall_i8.lo \ +- iall_i16.lo +-am__objects_17 = iany_i1.lo iany_i2.lo iany_i4.lo iany_i8.lo \ +- iany_i16.lo +-am__objects_18 = iparity_i1.lo iparity_i2.lo iparity_i4.lo \ +- iparity_i8.lo iparity_i16.lo +-am__objects_19 = norm2_r4.lo norm2_r8.lo norm2_r10.lo norm2_r16.lo +-am__objects_20 = parity_l1.lo parity_l2.lo parity_l4.lo parity_l8.lo \ +- parity_l16.lo +-am__objects_21 = matmul_i1.lo matmul_i2.lo matmul_i4.lo matmul_i8.lo \ +- matmul_i16.lo matmul_r4.lo matmul_r8.lo matmul_r10.lo \ +- matmul_r16.lo matmul_c4.lo matmul_c8.lo matmul_c10.lo \ +- matmul_c16.lo +-am__objects_22 = matmul_l4.lo matmul_l8.lo matmul_l16.lo +-am__objects_23 = shape_i1.lo shape_i2.lo shape_i4.lo shape_i8.lo \ +- shape_i16.lo +-am__objects_24 = eoshift1_4.lo eoshift1_8.lo eoshift1_16.lo +-am__objects_25 = eoshift3_4.lo eoshift3_8.lo eoshift3_16.lo +-am__objects_26 = cshift1_4.lo cshift1_8.lo cshift1_16.lo +-am__objects_27 = reshape_i4.lo reshape_i8.lo reshape_i16.lo \ +- reshape_r4.lo reshape_r8.lo reshape_r10.lo reshape_r16.lo \ +- reshape_c4.lo reshape_c8.lo reshape_c10.lo reshape_c16.lo +-am__objects_28 = in_pack_i1.lo in_pack_i2.lo in_pack_i4.lo \ +- in_pack_i8.lo in_pack_i16.lo in_pack_r4.lo in_pack_r8.lo \ +- in_pack_r10.lo in_pack_r16.lo in_pack_c4.lo in_pack_c8.lo \ +- in_pack_c10.lo in_pack_c16.lo +-am__objects_29 = in_unpack_i1.lo in_unpack_i2.lo in_unpack_i4.lo \ +- in_unpack_i8.lo in_unpack_i16.lo in_unpack_r4.lo \ +- in_unpack_r8.lo in_unpack_r10.lo in_unpack_r16.lo \ +- in_unpack_c4.lo in_unpack_c8.lo in_unpack_c10.lo \ +- in_unpack_c16.lo +-am__objects_30 = pow_i4_i4.lo pow_i8_i4.lo pow_i16_i4.lo pow_r16_i4.lo \ +- pow_c4_i4.lo pow_c8_i4.lo pow_c10_i4.lo pow_c16_i4.lo \ +- pow_i4_i8.lo pow_i8_i8.lo pow_i16_i8.lo pow_r4_i8.lo \ +- pow_r8_i8.lo pow_r10_i8.lo pow_r16_i8.lo pow_c4_i8.lo \ +- pow_c8_i8.lo pow_c10_i8.lo pow_c16_i8.lo pow_i4_i16.lo \ +- pow_i8_i16.lo pow_i16_i16.lo pow_r4_i16.lo pow_r8_i16.lo \ +- pow_r10_i16.lo pow_r16_i16.lo pow_c4_i16.lo pow_c8_i16.lo \ +- pow_c10_i16.lo pow_c16_i16.lo +-am__objects_31 = pack_i1.lo pack_i2.lo pack_i4.lo pack_i8.lo \ +- pack_i16.lo pack_r4.lo pack_r8.lo pack_r10.lo pack_r16.lo \ +- pack_c4.lo pack_c8.lo pack_c10.lo pack_c16.lo +-am__objects_32 = unpack_i1.lo unpack_i2.lo unpack_i4.lo unpack_i8.lo \ +- unpack_i16.lo unpack_r4.lo unpack_r8.lo unpack_r10.lo \ +- unpack_r16.lo unpack_c4.lo unpack_c8.lo unpack_c10.lo \ +- unpack_c16.lo +-am__objects_33 = matmulavx128_i1.lo matmulavx128_i2.lo \ +- matmulavx128_i4.lo matmulavx128_i8.lo matmulavx128_i16.lo \ +- matmulavx128_r4.lo matmulavx128_r8.lo matmulavx128_r10.lo \ +- matmulavx128_r16.lo matmulavx128_c4.lo matmulavx128_c8.lo \ +- matmulavx128_c10.lo matmulavx128_c16.lo +-am__objects_34 = spread_i1.lo spread_i2.lo spread_i4.lo spread_i8.lo \ +- spread_i16.lo spread_r4.lo spread_r8.lo spread_r10.lo \ +- spread_r16.lo spread_c4.lo spread_c8.lo spread_c10.lo \ +- spread_c16.lo +-am__objects_35 = cshift0_i1.lo cshift0_i2.lo cshift0_i4.lo \ +- cshift0_i8.lo cshift0_i16.lo cshift0_r4.lo cshift0_r8.lo \ +- cshift0_r10.lo cshift0_r16.lo cshift0_c4.lo cshift0_c8.lo \ +- cshift0_c10.lo cshift0_c16.lo +-am__objects_36 = cshift1_4_i1.lo cshift1_4_i2.lo cshift1_4_i4.lo \ +- cshift1_4_i8.lo cshift1_4_i16.lo cshift1_4_r4.lo \ +- cshift1_4_r8.lo cshift1_4_r10.lo cshift1_4_r16.lo \ +- cshift1_4_c4.lo cshift1_4_c8.lo cshift1_4_c10.lo \ +- cshift1_4_c16.lo cshift1_8_i1.lo cshift1_8_i2.lo \ +- cshift1_8_i4.lo cshift1_8_i8.lo cshift1_8_i16.lo \ +- cshift1_8_r4.lo cshift1_8_r8.lo cshift1_8_r10.lo \ +- cshift1_8_r16.lo cshift1_8_c4.lo cshift1_8_c8.lo \ +- cshift1_8_c10.lo cshift1_8_c16.lo cshift1_16_i1.lo \ +- cshift1_16_i2.lo cshift1_16_i4.lo cshift1_16_i8.lo \ +- cshift1_16_i16.lo cshift1_16_r4.lo cshift1_16_r8.lo \ +- cshift1_16_r10.lo cshift1_16_r16.lo cshift1_16_c4.lo \ +- cshift1_16_c8.lo cshift1_16_c10.lo cshift1_16_c16.lo +-am__objects_37 = maxloc0_4_s1.lo maxloc0_4_s4.lo maxloc0_8_s1.lo \ +- maxloc0_8_s4.lo maxloc0_16_s1.lo maxloc0_16_s4.lo +-am__objects_38 = minloc0_4_s1.lo minloc0_4_s4.lo minloc0_8_s1.lo \ +- minloc0_8_s4.lo minloc0_16_s1.lo minloc0_16_s4.lo +-am__objects_39 = maxloc1_4_s1.lo maxloc1_4_s4.lo maxloc1_8_s1.lo \ +- maxloc1_8_s4.lo maxloc1_16_s1.lo maxloc1_16_s4.lo +-am__objects_40 = minloc1_4_s1.lo minloc1_4_s4.lo minloc1_8_s1.lo \ +- minloc1_8_s4.lo minloc1_16_s1.lo minloc1_16_s4.lo +-am__objects_41 = maxloc2_4_s1.lo maxloc2_4_s4.lo maxloc2_8_s1.lo \ +- maxloc2_8_s4.lo maxloc2_16_s1.lo maxloc2_16_s4.lo +-am__objects_42 = minloc2_4_s1.lo minloc2_4_s4.lo minloc2_8_s1.lo \ +- minloc2_8_s4.lo minloc2_16_s1.lo minloc2_16_s4.lo +-am__objects_43 = maxval0_s1.lo maxval0_s4.lo +-am__objects_44 = minval0_s1.lo minval0_s4.lo +-am__objects_45 = maxval1_s1.lo maxval1_s4.lo +-am__objects_46 = minval1_s1.lo minval1_s4.lo +-am__objects_47 = findloc0_i1.lo findloc0_i2.lo findloc0_i4.lo \ +- findloc0_i8.lo findloc0_i16.lo findloc0_r4.lo findloc0_r8.lo \ +- findloc0_r10.lo findloc0_r16.lo findloc0_c4.lo findloc0_c8.lo \ +- findloc0_c10.lo findloc0_c16.lo +-am__objects_48 = findloc0_s1.lo findloc0_s4.lo +-am__objects_49 = findloc1_i1.lo findloc1_i2.lo findloc1_i4.lo \ +- findloc1_i8.lo findloc1_i16.lo findloc1_r4.lo findloc1_r8.lo \ +- findloc1_r10.lo findloc1_r16.lo findloc1_c4.lo findloc1_c8.lo \ +- findloc1_c10.lo findloc1_c16.lo +-am__objects_50 = findloc1_s1.lo findloc1_s4.lo +-am__objects_51 = findloc2_s1.lo findloc2_s4.lo +-am__objects_52 = ISO_Fortran_binding.lo ++@LIBGFOR_MINIMAL_TRUE@am__objects_1 = runtime/minimal.lo ++@LIBGFOR_MINIMAL_FALSE@am__objects_2 = runtime/backtrace.lo \ ++@LIBGFOR_MINIMAL_FALSE@ runtime/convert_char.lo \ ++@LIBGFOR_MINIMAL_FALSE@ runtime/environ.lo runtime/error.lo \ ++@LIBGFOR_MINIMAL_FALSE@ runtime/fpu.lo runtime/main.lo \ ++@LIBGFOR_MINIMAL_FALSE@ runtime/pause.lo runtime/stop.lo ++am__objects_3 = runtime/bounds.lo runtime/compile_options.lo \ ++ runtime/memory.lo runtime/string.lo runtime/select.lo \ ++ $(am__objects_1) $(am__objects_2) ++am__objects_4 = generated/all_l1.lo generated/all_l2.lo \ ++ generated/all_l4.lo generated/all_l8.lo generated/all_l16.lo ++am__objects_5 = generated/any_l1.lo generated/any_l2.lo \ ++ generated/any_l4.lo generated/any_l8.lo generated/any_l16.lo ++am__objects_6 = generated/count_1_l.lo generated/count_2_l.lo \ ++ generated/count_4_l.lo generated/count_8_l.lo \ ++ generated/count_16_l.lo ++am__objects_7 = generated/maxloc0_4_i1.lo generated/maxloc0_8_i1.lo \ ++ generated/maxloc0_16_i1.lo generated/maxloc0_4_i2.lo \ ++ generated/maxloc0_8_i2.lo generated/maxloc0_16_i2.lo \ ++ generated/maxloc0_4_i4.lo generated/maxloc0_8_i4.lo \ ++ generated/maxloc0_16_i4.lo generated/maxloc0_4_i8.lo \ ++ generated/maxloc0_8_i8.lo generated/maxloc0_16_i8.lo \ ++ generated/maxloc0_4_i16.lo generated/maxloc0_8_i16.lo \ ++ generated/maxloc0_16_i16.lo generated/maxloc0_4_r4.lo \ ++ generated/maxloc0_8_r4.lo generated/maxloc0_16_r4.lo \ ++ generated/maxloc0_4_r8.lo generated/maxloc0_8_r8.lo \ ++ generated/maxloc0_16_r8.lo generated/maxloc0_4_r10.lo \ ++ generated/maxloc0_8_r10.lo generated/maxloc0_16_r10.lo \ ++ generated/maxloc0_4_r16.lo generated/maxloc0_8_r16.lo \ ++ generated/maxloc0_16_r16.lo ++am__objects_8 = generated/maxloc1_4_i1.lo generated/maxloc1_8_i1.lo \ ++ generated/maxloc1_16_i1.lo generated/maxloc1_4_i2.lo \ ++ generated/maxloc1_8_i2.lo generated/maxloc1_16_i2.lo \ ++ generated/maxloc1_4_i4.lo generated/maxloc1_8_i4.lo \ ++ generated/maxloc1_16_i4.lo generated/maxloc1_4_i8.lo \ ++ generated/maxloc1_8_i8.lo generated/maxloc1_16_i8.lo \ ++ generated/maxloc1_4_i16.lo generated/maxloc1_8_i16.lo \ ++ generated/maxloc1_16_i16.lo generated/maxloc1_4_r4.lo \ ++ generated/maxloc1_8_r4.lo generated/maxloc1_16_r4.lo \ ++ generated/maxloc1_4_r8.lo generated/maxloc1_8_r8.lo \ ++ generated/maxloc1_16_r8.lo generated/maxloc1_4_r10.lo \ ++ generated/maxloc1_8_r10.lo generated/maxloc1_16_r10.lo \ ++ generated/maxloc1_4_r16.lo generated/maxloc1_8_r16.lo \ ++ generated/maxloc1_16_r16.lo ++am__objects_9 = generated/maxval_i1.lo generated/maxval_i2.lo \ ++ generated/maxval_i4.lo generated/maxval_i8.lo \ ++ generated/maxval_i16.lo generated/maxval_r4.lo \ ++ generated/maxval_r8.lo generated/maxval_r10.lo \ ++ generated/maxval_r16.lo ++am__objects_10 = generated/minloc0_4_i1.lo generated/minloc0_8_i1.lo \ ++ generated/minloc0_16_i1.lo generated/minloc0_4_i2.lo \ ++ generated/minloc0_8_i2.lo generated/minloc0_16_i2.lo \ ++ generated/minloc0_4_i4.lo generated/minloc0_8_i4.lo \ ++ generated/minloc0_16_i4.lo generated/minloc0_4_i8.lo \ ++ generated/minloc0_8_i8.lo generated/minloc0_16_i8.lo \ ++ generated/minloc0_4_i16.lo generated/minloc0_8_i16.lo \ ++ generated/minloc0_16_i16.lo generated/minloc0_4_r4.lo \ ++ generated/minloc0_8_r4.lo generated/minloc0_16_r4.lo \ ++ generated/minloc0_4_r8.lo generated/minloc0_8_r8.lo \ ++ generated/minloc0_16_r8.lo generated/minloc0_4_r10.lo \ ++ generated/minloc0_8_r10.lo generated/minloc0_16_r10.lo \ ++ generated/minloc0_4_r16.lo generated/minloc0_8_r16.lo \ ++ generated/minloc0_16_r16.lo ++am__objects_11 = generated/minloc1_4_i1.lo generated/minloc1_8_i1.lo \ ++ generated/minloc1_16_i1.lo generated/minloc1_4_i2.lo \ ++ generated/minloc1_8_i2.lo generated/minloc1_16_i2.lo \ ++ generated/minloc1_4_i4.lo generated/minloc1_8_i4.lo \ ++ generated/minloc1_16_i4.lo generated/minloc1_4_i8.lo \ ++ generated/minloc1_8_i8.lo generated/minloc1_16_i8.lo \ ++ generated/minloc1_4_i16.lo generated/minloc1_8_i16.lo \ ++ generated/minloc1_16_i16.lo generated/minloc1_4_r4.lo \ ++ generated/minloc1_8_r4.lo generated/minloc1_16_r4.lo \ ++ generated/minloc1_4_r8.lo generated/minloc1_8_r8.lo \ ++ generated/minloc1_16_r8.lo generated/minloc1_4_r10.lo \ ++ generated/minloc1_8_r10.lo generated/minloc1_16_r10.lo \ ++ generated/minloc1_4_r16.lo generated/minloc1_8_r16.lo \ ++ generated/minloc1_16_r16.lo ++am__objects_12 = generated/minval_i1.lo generated/minval_i2.lo \ ++ generated/minval_i4.lo generated/minval_i8.lo \ ++ generated/minval_i16.lo generated/minval_r4.lo \ ++ generated/minval_r8.lo generated/minval_r10.lo \ ++ generated/minval_r16.lo ++am__objects_13 = generated/product_i1.lo generated/product_i2.lo \ ++ generated/product_i4.lo generated/product_i8.lo \ ++ generated/product_i16.lo generated/product_r4.lo \ ++ generated/product_r8.lo generated/product_r10.lo \ ++ generated/product_r16.lo generated/product_c4.lo \ ++ generated/product_c8.lo generated/product_c10.lo \ ++ generated/product_c16.lo ++am__objects_14 = generated/sum_i1.lo generated/sum_i2.lo \ ++ generated/sum_i4.lo generated/sum_i8.lo generated/sum_i16.lo \ ++ generated/sum_r4.lo generated/sum_r8.lo generated/sum_r10.lo \ ++ generated/sum_r16.lo generated/sum_c4.lo generated/sum_c8.lo \ ++ generated/sum_c10.lo generated/sum_c16.lo ++am__objects_15 = generated/bessel_r4.lo generated/bessel_r8.lo \ ++ generated/bessel_r10.lo generated/bessel_r16.lo ++am__objects_16 = generated/iall_i1.lo generated/iall_i2.lo \ ++ generated/iall_i4.lo generated/iall_i8.lo \ ++ generated/iall_i16.lo ++am__objects_17 = generated/iany_i1.lo generated/iany_i2.lo \ ++ generated/iany_i4.lo generated/iany_i8.lo \ ++ generated/iany_i16.lo ++am__objects_18 = generated/iparity_i1.lo generated/iparity_i2.lo \ ++ generated/iparity_i4.lo generated/iparity_i8.lo \ ++ generated/iparity_i16.lo ++am__objects_19 = generated/norm2_r4.lo generated/norm2_r8.lo \ ++ generated/norm2_r10.lo generated/norm2_r16.lo ++am__objects_20 = generated/parity_l1.lo generated/parity_l2.lo \ ++ generated/parity_l4.lo generated/parity_l8.lo \ ++ generated/parity_l16.lo ++am__objects_21 = generated/matmul_i1.lo generated/matmul_i2.lo \ ++ generated/matmul_i4.lo generated/matmul_i8.lo \ ++ generated/matmul_i16.lo generated/matmul_r4.lo \ ++ generated/matmul_r8.lo generated/matmul_r10.lo \ ++ generated/matmul_r16.lo generated/matmul_c4.lo \ ++ generated/matmul_c8.lo generated/matmul_c10.lo \ ++ generated/matmul_c16.lo ++am__objects_22 = generated/matmul_l4.lo generated/matmul_l8.lo \ ++ generated/matmul_l16.lo ++am__objects_23 = generated/shape_i1.lo generated/shape_i2.lo \ ++ generated/shape_i4.lo generated/shape_i8.lo \ ++ generated/shape_i16.lo ++am__objects_24 = generated/eoshift1_4.lo generated/eoshift1_8.lo \ ++ generated/eoshift1_16.lo ++am__objects_25 = generated/eoshift3_4.lo generated/eoshift3_8.lo \ ++ generated/eoshift3_16.lo ++am__objects_26 = generated/cshift1_4.lo generated/cshift1_8.lo \ ++ generated/cshift1_16.lo ++am__objects_27 = generated/reshape_i4.lo generated/reshape_i8.lo \ ++ generated/reshape_i16.lo generated/reshape_r4.lo \ ++ generated/reshape_r8.lo generated/reshape_r10.lo \ ++ generated/reshape_r16.lo generated/reshape_c4.lo \ ++ generated/reshape_c8.lo generated/reshape_c10.lo \ ++ generated/reshape_c16.lo ++am__objects_28 = generated/in_pack_i1.lo generated/in_pack_i2.lo \ ++ generated/in_pack_i4.lo generated/in_pack_i8.lo \ ++ generated/in_pack_i16.lo generated/in_pack_r4.lo \ ++ generated/in_pack_r8.lo generated/in_pack_r10.lo \ ++ generated/in_pack_r16.lo generated/in_pack_c4.lo \ ++ generated/in_pack_c8.lo generated/in_pack_c10.lo \ ++ generated/in_pack_c16.lo ++am__objects_29 = generated/in_unpack_i1.lo generated/in_unpack_i2.lo \ ++ generated/in_unpack_i4.lo generated/in_unpack_i8.lo \ ++ generated/in_unpack_i16.lo generated/in_unpack_r4.lo \ ++ generated/in_unpack_r8.lo generated/in_unpack_r10.lo \ ++ generated/in_unpack_r16.lo generated/in_unpack_c4.lo \ ++ generated/in_unpack_c8.lo generated/in_unpack_c10.lo \ ++ generated/in_unpack_c16.lo ++am__objects_30 = generated/pow_i4_i4.lo generated/pow_i8_i4.lo \ ++ generated/pow_i16_i4.lo generated/pow_r16_i4.lo \ ++ generated/pow_c4_i4.lo generated/pow_c8_i4.lo \ ++ generated/pow_c10_i4.lo generated/pow_c16_i4.lo \ ++ generated/pow_i4_i8.lo generated/pow_i8_i8.lo \ ++ generated/pow_i16_i8.lo generated/pow_r4_i8.lo \ ++ generated/pow_r8_i8.lo generated/pow_r10_i8.lo \ ++ generated/pow_r16_i8.lo generated/pow_c4_i8.lo \ ++ generated/pow_c8_i8.lo generated/pow_c10_i8.lo \ ++ generated/pow_c16_i8.lo generated/pow_i4_i16.lo \ ++ generated/pow_i8_i16.lo generated/pow_i16_i16.lo \ ++ generated/pow_r4_i16.lo generated/pow_r8_i16.lo \ ++ generated/pow_r10_i16.lo generated/pow_r16_i16.lo \ ++ generated/pow_c4_i16.lo generated/pow_c8_i16.lo \ ++ generated/pow_c10_i16.lo generated/pow_c16_i16.lo ++am__objects_31 = generated/pack_i1.lo generated/pack_i2.lo \ ++ generated/pack_i4.lo generated/pack_i8.lo \ ++ generated/pack_i16.lo generated/pack_r4.lo \ ++ generated/pack_r8.lo generated/pack_r10.lo \ ++ generated/pack_r16.lo generated/pack_c4.lo \ ++ generated/pack_c8.lo generated/pack_c10.lo \ ++ generated/pack_c16.lo ++am__objects_32 = generated/unpack_i1.lo generated/unpack_i2.lo \ ++ generated/unpack_i4.lo generated/unpack_i8.lo \ ++ generated/unpack_i16.lo generated/unpack_r4.lo \ ++ generated/unpack_r8.lo generated/unpack_r10.lo \ ++ generated/unpack_r16.lo generated/unpack_c4.lo \ ++ generated/unpack_c8.lo generated/unpack_c10.lo \ ++ generated/unpack_c16.lo ++am__objects_33 = generated/matmulavx128_i1.lo \ ++ generated/matmulavx128_i2.lo generated/matmulavx128_i4.lo \ ++ generated/matmulavx128_i8.lo generated/matmulavx128_i16.lo \ ++ generated/matmulavx128_r4.lo generated/matmulavx128_r8.lo \ ++ generated/matmulavx128_r10.lo generated/matmulavx128_r16.lo \ ++ generated/matmulavx128_c4.lo generated/matmulavx128_c8.lo \ ++ generated/matmulavx128_c10.lo generated/matmulavx128_c16.lo ++am__objects_34 = generated/spread_i1.lo generated/spread_i2.lo \ ++ generated/spread_i4.lo generated/spread_i8.lo \ ++ generated/spread_i16.lo generated/spread_r4.lo \ ++ generated/spread_r8.lo generated/spread_r10.lo \ ++ generated/spread_r16.lo generated/spread_c4.lo \ ++ generated/spread_c8.lo generated/spread_c10.lo \ ++ generated/spread_c16.lo ++am__objects_35 = generated/cshift0_i1.lo generated/cshift0_i2.lo \ ++ generated/cshift0_i4.lo generated/cshift0_i8.lo \ ++ generated/cshift0_i16.lo generated/cshift0_r4.lo \ ++ generated/cshift0_r8.lo generated/cshift0_r10.lo \ ++ generated/cshift0_r16.lo generated/cshift0_c4.lo \ ++ generated/cshift0_c8.lo generated/cshift0_c10.lo \ ++ generated/cshift0_c16.lo ++am__objects_36 = generated/cshift1_4_i1.lo generated/cshift1_4_i2.lo \ ++ generated/cshift1_4_i4.lo generated/cshift1_4_i8.lo \ ++ generated/cshift1_4_i16.lo generated/cshift1_4_r4.lo \ ++ generated/cshift1_4_r8.lo generated/cshift1_4_r10.lo \ ++ generated/cshift1_4_r16.lo generated/cshift1_4_c4.lo \ ++ generated/cshift1_4_c8.lo generated/cshift1_4_c10.lo \ ++ generated/cshift1_4_c16.lo generated/cshift1_8_i1.lo \ ++ generated/cshift1_8_i2.lo generated/cshift1_8_i4.lo \ ++ generated/cshift1_8_i8.lo generated/cshift1_8_i16.lo \ ++ generated/cshift1_8_r4.lo generated/cshift1_8_r8.lo \ ++ generated/cshift1_8_r10.lo generated/cshift1_8_r16.lo \ ++ generated/cshift1_8_c4.lo generated/cshift1_8_c8.lo \ ++ generated/cshift1_8_c10.lo generated/cshift1_8_c16.lo \ ++ generated/cshift1_16_i1.lo generated/cshift1_16_i2.lo \ ++ generated/cshift1_16_i4.lo generated/cshift1_16_i8.lo \ ++ generated/cshift1_16_i16.lo generated/cshift1_16_r4.lo \ ++ generated/cshift1_16_r8.lo generated/cshift1_16_r10.lo \ ++ generated/cshift1_16_r16.lo generated/cshift1_16_c4.lo \ ++ generated/cshift1_16_c8.lo generated/cshift1_16_c10.lo \ ++ generated/cshift1_16_c16.lo ++am__objects_37 = generated/maxloc0_4_s1.lo generated/maxloc0_4_s4.lo \ ++ generated/maxloc0_8_s1.lo generated/maxloc0_8_s4.lo \ ++ generated/maxloc0_16_s1.lo generated/maxloc0_16_s4.lo ++am__objects_38 = generated/minloc0_4_s1.lo generated/minloc0_4_s4.lo \ ++ generated/minloc0_8_s1.lo generated/minloc0_8_s4.lo \ ++ generated/minloc0_16_s1.lo generated/minloc0_16_s4.lo ++am__objects_39 = generated/maxloc1_4_s1.lo generated/maxloc1_4_s4.lo \ ++ generated/maxloc1_8_s1.lo generated/maxloc1_8_s4.lo \ ++ generated/maxloc1_16_s1.lo generated/maxloc1_16_s4.lo ++am__objects_40 = generated/minloc1_4_s1.lo generated/minloc1_4_s4.lo \ ++ generated/minloc1_8_s1.lo generated/minloc1_8_s4.lo \ ++ generated/minloc1_16_s1.lo generated/minloc1_16_s4.lo ++am__objects_41 = generated/maxloc2_4_s1.lo generated/maxloc2_4_s4.lo \ ++ generated/maxloc2_8_s1.lo generated/maxloc2_8_s4.lo \ ++ generated/maxloc2_16_s1.lo generated/maxloc2_16_s4.lo ++am__objects_42 = generated/minloc2_4_s1.lo generated/minloc2_4_s4.lo \ ++ generated/minloc2_8_s1.lo generated/minloc2_8_s4.lo \ ++ generated/minloc2_16_s1.lo generated/minloc2_16_s4.lo ++am__objects_43 = generated/maxval0_s1.lo generated/maxval0_s4.lo ++am__objects_44 = generated/minval0_s1.lo generated/minval0_s4.lo ++am__objects_45 = generated/maxval1_s1.lo generated/maxval1_s4.lo ++am__objects_46 = generated/minval1_s1.lo generated/minval1_s4.lo ++am__objects_47 = generated/findloc0_i1.lo generated/findloc0_i2.lo \ ++ generated/findloc0_i4.lo generated/findloc0_i8.lo \ ++ generated/findloc0_i16.lo generated/findloc0_r4.lo \ ++ generated/findloc0_r8.lo generated/findloc0_r10.lo \ ++ generated/findloc0_r16.lo generated/findloc0_c4.lo \ ++ generated/findloc0_c8.lo generated/findloc0_c10.lo \ ++ generated/findloc0_c16.lo ++am__objects_48 = generated/findloc0_s1.lo generated/findloc0_s4.lo ++am__objects_49 = generated/findloc1_i1.lo generated/findloc1_i2.lo \ ++ generated/findloc1_i4.lo generated/findloc1_i8.lo \ ++ generated/findloc1_i16.lo generated/findloc1_r4.lo \ ++ generated/findloc1_r8.lo generated/findloc1_r10.lo \ ++ generated/findloc1_r16.lo generated/findloc1_c4.lo \ ++ generated/findloc1_c8.lo generated/findloc1_c10.lo \ ++ generated/findloc1_c16.lo ++am__objects_50 = generated/findloc1_s1.lo generated/findloc1_s4.lo ++am__objects_51 = generated/findloc2_s1.lo generated/findloc2_s4.lo ++am__objects_52 = runtime/ISO_Fortran_binding.lo + am__objects_53 = $(am__objects_4) $(am__objects_5) $(am__objects_6) \ + $(am__objects_7) $(am__objects_8) $(am__objects_9) \ + $(am__objects_10) $(am__objects_11) $(am__objects_12) \ +@@ -399,68 +500,132 @@ am__objects_53 = $(am__objects_4) $(am__objects_5) $(am__objects_6) \ + $(am__objects_46) $(am__objects_47) $(am__objects_48) \ + $(am__objects_49) $(am__objects_50) $(am__objects_51) \ + $(am__objects_52) +-@LIBGFOR_MINIMAL_FALSE@am__objects_54 = close.lo file_pos.lo format.lo \ +-@LIBGFOR_MINIMAL_FALSE@ inquire.lo intrinsics.lo list_read.lo \ +-@LIBGFOR_MINIMAL_FALSE@ lock.lo open.lo read.lo transfer.lo \ +-@LIBGFOR_MINIMAL_FALSE@ transfer128.lo unit.lo unix.lo write.lo \ +-@LIBGFOR_MINIMAL_FALSE@ fbuf.lo async.lo +-am__objects_55 = size_from_kind.lo $(am__objects_54) +-@LIBGFOR_MINIMAL_FALSE@am__objects_56 = access.lo c99_functions.lo \ +-@LIBGFOR_MINIMAL_FALSE@ chdir.lo chmod.lo clock.lo cpu_time.lo \ +-@LIBGFOR_MINIMAL_FALSE@ ctime.lo date_and_time.lo dtime.lo \ +-@LIBGFOR_MINIMAL_FALSE@ env.lo etime.lo execute_command_line.lo \ +-@LIBGFOR_MINIMAL_FALSE@ exit.lo gerror.lo getcwd.lo getlog.lo \ +-@LIBGFOR_MINIMAL_FALSE@ getXid.lo hostnm.lo kill.lo link.lo \ +-@LIBGFOR_MINIMAL_FALSE@ perror.lo signal.lo sleep.lo system.lo \ +-@LIBGFOR_MINIMAL_FALSE@ rename.lo stat.lo symlnk.lo \ +-@LIBGFOR_MINIMAL_FALSE@ system_clock.lo time.lo umask.lo \ +-@LIBGFOR_MINIMAL_FALSE@ unlink.lo +-@IEEE_SUPPORT_TRUE@am__objects_57 = ieee_helper.lo +-am__objects_58 = associated.lo abort.lo args.lo cshift0.lo eoshift0.lo \ +- eoshift2.lo erfc_scaled.lo extends_type_of.lo fnum.lo \ +- ierrno.lo ishftc.lo is_contiguous.lo mvbits.lo move_alloc.lo \ +- pack_generic.lo selected_char_kind.lo size.lo \ +- spread_generic.lo string_intrinsics.lo rand.lo random.lo \ +- reshape_generic.lo reshape_packed.lo selected_int_kind.lo \ +- selected_real_kind.lo trigd.lo unpack_generic.lo \ +- in_pack_generic.lo in_unpack_generic.lo $(am__objects_56) \ ++@LIBGFOR_MINIMAL_FALSE@am__objects_54 = io/close.lo io/file_pos.lo \ ++@LIBGFOR_MINIMAL_FALSE@ io/format.lo io/inquire.lo \ ++@LIBGFOR_MINIMAL_FALSE@ io/intrinsics.lo io/list_read.lo \ ++@LIBGFOR_MINIMAL_FALSE@ io/lock.lo io/open.lo io/read.lo \ ++@LIBGFOR_MINIMAL_FALSE@ io/transfer.lo io/transfer128.lo \ ++@LIBGFOR_MINIMAL_FALSE@ io/unit.lo io/unix.lo io/write.lo \ ++@LIBGFOR_MINIMAL_FALSE@ io/fbuf.lo io/async.lo ++am__objects_55 = io/size_from_kind.lo $(am__objects_54) ++@LIBGFOR_MINIMAL_FALSE@am__objects_56 = intrinsics/access.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/c99_functions.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/chdir.lo intrinsics/chmod.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/clock.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/cpu_time.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/ctime.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/date_and_time.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/dtime.lo intrinsics/env.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/etime.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/execute_command_line.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/exit.lo intrinsics/gerror.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/getcwd.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/getlog.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/getXid.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/hostnm.lo intrinsics/kill.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/link.lo intrinsics/perror.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/signal.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/sleep.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/system.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/rename.lo intrinsics/stat.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/symlnk.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/system_clock.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/time.lo intrinsics/umask.lo \ ++@LIBGFOR_MINIMAL_FALSE@ intrinsics/unlink.lo ++@IEEE_SUPPORT_TRUE@am__objects_57 = ieee/ieee_helper.lo ++am__objects_58 = intrinsics/associated.lo intrinsics/abort.lo \ ++ intrinsics/args.lo intrinsics/cshift0.lo \ ++ intrinsics/eoshift0.lo intrinsics/eoshift2.lo \ ++ intrinsics/erfc_scaled.lo intrinsics/extends_type_of.lo \ ++ intrinsics/fnum.lo intrinsics/ierrno.lo intrinsics/ishftc.lo \ ++ intrinsics/is_contiguous.lo intrinsics/mvbits.lo \ ++ intrinsics/move_alloc.lo intrinsics/pack_generic.lo \ ++ intrinsics/selected_char_kind.lo intrinsics/size.lo \ ++ intrinsics/spread_generic.lo intrinsics/string_intrinsics.lo \ ++ intrinsics/rand.lo intrinsics/random.lo \ ++ intrinsics/reshape_generic.lo intrinsics/reshape_packed.lo \ ++ intrinsics/selected_int_kind.lo \ ++ intrinsics/selected_real_kind.lo intrinsics/trigd.lo \ ++ intrinsics/unpack_generic.lo runtime/in_pack_generic.lo \ ++ runtime/in_unpack_generic.lo $(am__objects_56) \ + $(am__objects_57) +-@IEEE_SUPPORT_TRUE@am__objects_59 = ieee_arithmetic.lo \ +-@IEEE_SUPPORT_TRUE@ ieee_exceptions.lo ieee_features.lo ++@IEEE_SUPPORT_TRUE@am__objects_59 = ieee/ieee_arithmetic.lo \ ++@IEEE_SUPPORT_TRUE@ ieee/ieee_exceptions.lo \ ++@IEEE_SUPPORT_TRUE@ ieee/ieee_features.lo + am__objects_60 = +-am__objects_61 = _abs_c4.lo _abs_c8.lo _abs_c10.lo _abs_c16.lo \ +- _abs_i4.lo _abs_i8.lo _abs_i16.lo _abs_r4.lo _abs_r8.lo \ +- _abs_r10.lo _abs_r16.lo _aimag_c4.lo _aimag_c8.lo \ +- _aimag_c10.lo _aimag_c16.lo _exp_r4.lo _exp_r8.lo _exp_r10.lo \ +- _exp_r16.lo _exp_c4.lo _exp_c8.lo _exp_c10.lo _exp_c16.lo \ +- _log_r4.lo _log_r8.lo _log_r10.lo _log_r16.lo _log_c4.lo \ +- _log_c8.lo _log_c10.lo _log_c16.lo _log10_r4.lo _log10_r8.lo \ +- _log10_r10.lo _log10_r16.lo _sqrt_r4.lo _sqrt_r8.lo \ +- _sqrt_r10.lo _sqrt_r16.lo _sqrt_c4.lo _sqrt_c8.lo _sqrt_c10.lo \ +- _sqrt_c16.lo _asin_r4.lo _asin_r8.lo _asin_r10.lo _asin_r16.lo \ +- _asinh_r4.lo _asinh_r8.lo _asinh_r10.lo _asinh_r16.lo \ +- _acos_r4.lo _acos_r8.lo _acos_r10.lo _acos_r16.lo _acosh_r4.lo \ +- _acosh_r8.lo _acosh_r10.lo _acosh_r16.lo _atan_r4.lo \ +- _atan_r8.lo _atan_r10.lo _atan_r16.lo _atanh_r4.lo \ +- _atanh_r8.lo _atanh_r10.lo _atanh_r16.lo _sin_r4.lo _sin_r8.lo \ +- _sin_r10.lo _sin_r16.lo _sin_c4.lo _sin_c8.lo _sin_c10.lo \ +- _sin_c16.lo _cos_r4.lo _cos_r8.lo _cos_r10.lo _cos_r16.lo \ +- _cos_c4.lo _cos_c8.lo _cos_c10.lo _cos_c16.lo _tan_r4.lo \ +- _tan_r8.lo _tan_r10.lo _tan_r16.lo _sinh_r4.lo _sinh_r8.lo \ +- _sinh_r10.lo _sinh_r16.lo _cosh_r4.lo _cosh_r8.lo _cosh_r10.lo \ +- _cosh_r16.lo _tanh_r4.lo _tanh_r8.lo _tanh_r10.lo _tanh_r16.lo \ +- _conjg_c4.lo _conjg_c8.lo _conjg_c10.lo _conjg_c16.lo \ +- _aint_r4.lo _aint_r8.lo _aint_r10.lo _aint_r16.lo _anint_r4.lo \ +- _anint_r8.lo _anint_r10.lo _anint_r16.lo +-am__objects_62 = _sign_i4.lo _sign_i8.lo _sign_i16.lo _sign_r4.lo \ +- _sign_r8.lo _sign_r10.lo _sign_r16.lo _dim_i4.lo _dim_i8.lo \ +- _dim_i16.lo _dim_r4.lo _dim_r8.lo _dim_r10.lo _dim_r16.lo \ +- _atan2_r4.lo _atan2_r8.lo _atan2_r10.lo _atan2_r16.lo \ +- _mod_i4.lo _mod_i8.lo _mod_i16.lo _mod_r4.lo _mod_r8.lo \ +- _mod_r10.lo _mod_r16.lo +-am__objects_63 = misc_specifics.lo ++am__objects_61 = generated/_abs_c4.lo generated/_abs_c8.lo \ ++ generated/_abs_c10.lo generated/_abs_c16.lo \ ++ generated/_abs_i4.lo generated/_abs_i8.lo \ ++ generated/_abs_i16.lo generated/_abs_r4.lo \ ++ generated/_abs_r8.lo generated/_abs_r10.lo \ ++ generated/_abs_r16.lo generated/_aimag_c4.lo \ ++ generated/_aimag_c8.lo generated/_aimag_c10.lo \ ++ generated/_aimag_c16.lo generated/_exp_r4.lo \ ++ generated/_exp_r8.lo generated/_exp_r10.lo \ ++ generated/_exp_r16.lo generated/_exp_c4.lo \ ++ generated/_exp_c8.lo generated/_exp_c10.lo \ ++ generated/_exp_c16.lo generated/_log_r4.lo \ ++ generated/_log_r8.lo generated/_log_r10.lo \ ++ generated/_log_r16.lo generated/_log_c4.lo \ ++ generated/_log_c8.lo generated/_log_c10.lo \ ++ generated/_log_c16.lo generated/_log10_r4.lo \ ++ generated/_log10_r8.lo generated/_log10_r10.lo \ ++ generated/_log10_r16.lo generated/_sqrt_r4.lo \ ++ generated/_sqrt_r8.lo generated/_sqrt_r10.lo \ ++ generated/_sqrt_r16.lo generated/_sqrt_c4.lo \ ++ generated/_sqrt_c8.lo generated/_sqrt_c10.lo \ ++ generated/_sqrt_c16.lo generated/_asin_r4.lo \ ++ generated/_asin_r8.lo generated/_asin_r10.lo \ ++ generated/_asin_r16.lo generated/_asinh_r4.lo \ ++ generated/_asinh_r8.lo generated/_asinh_r10.lo \ ++ generated/_asinh_r16.lo generated/_acos_r4.lo \ ++ generated/_acos_r8.lo generated/_acos_r10.lo \ ++ generated/_acos_r16.lo generated/_acosh_r4.lo \ ++ generated/_acosh_r8.lo generated/_acosh_r10.lo \ ++ generated/_acosh_r16.lo generated/_atan_r4.lo \ ++ generated/_atan_r8.lo generated/_atan_r10.lo \ ++ generated/_atan_r16.lo generated/_atanh_r4.lo \ ++ generated/_atanh_r8.lo generated/_atanh_r10.lo \ ++ generated/_atanh_r16.lo generated/_sin_r4.lo \ ++ generated/_sin_r8.lo generated/_sin_r10.lo \ ++ generated/_sin_r16.lo generated/_sin_c4.lo \ ++ generated/_sin_c8.lo generated/_sin_c10.lo \ ++ generated/_sin_c16.lo generated/_cos_r4.lo \ ++ generated/_cos_r8.lo generated/_cos_r10.lo \ ++ generated/_cos_r16.lo generated/_cos_c4.lo \ ++ generated/_cos_c8.lo generated/_cos_c10.lo \ ++ generated/_cos_c16.lo generated/_tan_r4.lo \ ++ generated/_tan_r8.lo generated/_tan_r10.lo \ ++ generated/_tan_r16.lo generated/_sinh_r4.lo \ ++ generated/_sinh_r8.lo generated/_sinh_r10.lo \ ++ generated/_sinh_r16.lo generated/_cosh_r4.lo \ ++ generated/_cosh_r8.lo generated/_cosh_r10.lo \ ++ generated/_cosh_r16.lo generated/_tanh_r4.lo \ ++ generated/_tanh_r8.lo generated/_tanh_r10.lo \ ++ generated/_tanh_r16.lo generated/_conjg_c4.lo \ ++ generated/_conjg_c8.lo generated/_conjg_c10.lo \ ++ generated/_conjg_c16.lo generated/_aint_r4.lo \ ++ generated/_aint_r8.lo generated/_aint_r10.lo \ ++ generated/_aint_r16.lo generated/_anint_r4.lo \ ++ generated/_anint_r8.lo generated/_anint_r10.lo \ ++ generated/_anint_r16.lo ++am__objects_62 = generated/_sign_i4.lo generated/_sign_i8.lo \ ++ generated/_sign_i16.lo generated/_sign_r4.lo \ ++ generated/_sign_r8.lo generated/_sign_r10.lo \ ++ generated/_sign_r16.lo generated/_dim_i4.lo \ ++ generated/_dim_i8.lo generated/_dim_i16.lo \ ++ generated/_dim_r4.lo generated/_dim_r8.lo \ ++ generated/_dim_r10.lo generated/_dim_r16.lo \ ++ generated/_atan2_r4.lo generated/_atan2_r8.lo \ ++ generated/_atan2_r10.lo generated/_atan2_r16.lo \ ++ generated/_mod_i4.lo generated/_mod_i8.lo \ ++ generated/_mod_i16.lo generated/_mod_r4.lo \ ++ generated/_mod_r8.lo generated/_mod_r10.lo \ ++ generated/_mod_r16.lo ++am__objects_63 = generated/misc_specifics.lo + am__objects_64 = $(am__objects_61) $(am__objects_62) $(am__objects_63) \ +- dprod_r8.lo f2c_specifics.lo random_init.lo ++ intrinsics/dprod_r8.lo intrinsics/f2c_specifics.lo \ ++ intrinsics/random_init.lo + am__objects_65 = $(am__objects_3) $(am__objects_53) $(am__objects_55) \ + $(am__objects_58) $(am__objects_59) $(am__objects_60) \ + $(am__objects_64) +@@ -483,12 +648,12 @@ DEFAULT_INCLUDES = -I.@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/../depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f ++PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + am__v_lt_1 = +-PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) + LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +@@ -569,7 +734,7 @@ AMTAR = @AMTAR@ + + # Some targets require additional compiler options for IEEE compatibility. + AM_CFLAGS = @AM_CFLAGS@ -fcx-fortran-rules $(SECTION_FLAGS) \ +- $(IEEE_FLAGS) $(am__append_1) ++ $(IEEE_FLAGS) $(am__append_2) + AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ + AM_FCFLAGS = @AM_FCFLAGS@ $(IEEE_FLAGS) + AR = @AR@ +@@ -610,6 +775,7 @@ LD = @LD@ + LDFLAGS = @LDFLAGS@ + LIBGOMP_CHECKED_INT_KINDS = @LIBGOMP_CHECKED_INT_KINDS@ + LIBGOMP_CHECKED_REAL_KINDS = @LIBGOMP_CHECKED_REAL_KINDS@ ++LIBM = @LIBM@ + LIBOBJS = @LIBOBJS@ + LIBQUADINCLUDE = @LIBQUADINCLUDE@ + LIBQUADLIB = @LIBQUADLIB@ +@@ -715,6 +881,7 @@ toolexeclibdir = @toolexeclibdir@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ ++AUTOMAKE_OPTIONS = foreign subdir-objects + ACLOCAL_AMFLAGS = -I .. -I ../config + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + @LIBGFOR_USE_SYMVER_FALSE@version_arg = +@@ -723,6 +890,8 @@ gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + @LIBGFOR_USE_SYMVER_FALSE@version_dep = + @LIBGFOR_USE_SYMVER_GNU_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = $(srcdir)/gfortran.map + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.map-sun ++extra_darwin_ldflags_libgfortran = @extra_ldflags_libgfortran@ \ ++ $(am__append_1) + gfor_c_HEADERS = $(srcdir)/ISO_Fortran_binding.h + gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include + LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \ +@@ -734,7 +903,7 @@ libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ + $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \ + $(HWCAP_LDFLAGS) \ +- -lm $(extra_ldflags_libgfortran) \ ++ $(LIBM) $(extra_darwin_ldflags_libgfortran) \ + $(version_arg) -Wc,-shared-libgcc + + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) +@@ -755,7 +924,7 @@ AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \ + -I$(MULTIBUILDTOP)../libbacktrace \ + -I../libbacktrace + +-gfor_io_src = io/size_from_kind.c $(am__append_2) ++gfor_io_src = io/size_from_kind.c $(am__append_3) + gfor_io_headers = \ + io/io.h \ + io/fbuf.h \ +@@ -777,7 +946,8 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \ + intrinsics/selected_int_kind.f90 \ + intrinsics/selected_real_kind.f90 intrinsics/trigd.c \ + intrinsics/unpack_generic.c runtime/in_pack_generic.c \ +- runtime/in_unpack_generic.c $(am__append_3) $(am__append_4) ++ runtime/in_unpack_generic.c $(am__append_4) $(am__append_5) ++@IEEE_SUPPORT_TRUE@gfor_ieee_helper_src = ieee/ieee_helper.c + @IEEE_SUPPORT_FALSE@gfor_ieee_src = + @IEEE_SUPPORT_TRUE@gfor_ieee_src = \ + @IEEE_SUPPORT_TRUE@ieee/ieee_arithmetic.F90 \ +@@ -785,578 +955,578 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \ + @IEEE_SUPPORT_TRUE@ieee/ieee_features.F90 + + gfor_src = runtime/bounds.c runtime/compile_options.c runtime/memory.c \ +- runtime/string.c runtime/select.c $(am__append_5) \ +- $(am__append_6) ++ runtime/string.c runtime/select.c $(am__append_6) \ ++ $(am__append_7) + i_all_c = \ +-$(srcdir)/generated/all_l1.c \ +-$(srcdir)/generated/all_l2.c \ +-$(srcdir)/generated/all_l4.c \ +-$(srcdir)/generated/all_l8.c \ +-$(srcdir)/generated/all_l16.c ++generated/all_l1.c \ ++generated/all_l2.c \ ++generated/all_l4.c \ ++generated/all_l8.c \ ++generated/all_l16.c + + i_any_c = \ +-$(srcdir)/generated/any_l1.c \ +-$(srcdir)/generated/any_l2.c \ +-$(srcdir)/generated/any_l4.c \ +-$(srcdir)/generated/any_l8.c \ +-$(srcdir)/generated/any_l16.c ++generated/any_l1.c \ ++generated/any_l2.c \ ++generated/any_l4.c \ ++generated/any_l8.c \ ++generated/any_l16.c + + i_bessel_c = \ +-$(srcdir)/generated/bessel_r4.c \ +-$(srcdir)/generated/bessel_r8.c \ +-$(srcdir)/generated/bessel_r10.c \ +-$(srcdir)/generated/bessel_r16.c ++generated/bessel_r4.c \ ++generated/bessel_r8.c \ ++generated/bessel_r10.c \ ++generated/bessel_r16.c + + i_count_c = \ +-$(srcdir)/generated/count_1_l.c \ +-$(srcdir)/generated/count_2_l.c \ +-$(srcdir)/generated/count_4_l.c \ +-$(srcdir)/generated/count_8_l.c \ +-$(srcdir)/generated/count_16_l.c ++generated/count_1_l.c \ ++generated/count_2_l.c \ ++generated/count_4_l.c \ ++generated/count_8_l.c \ ++generated/count_16_l.c + + i_iall_c = \ +-$(srcdir)/generated/iall_i1.c \ +-$(srcdir)/generated/iall_i2.c \ +-$(srcdir)/generated/iall_i4.c \ +-$(srcdir)/generated/iall_i8.c \ +-$(srcdir)/generated/iall_i16.c ++generated/iall_i1.c \ ++generated/iall_i2.c \ ++generated/iall_i4.c \ ++generated/iall_i8.c \ ++generated/iall_i16.c + + i_iany_c = \ +-$(srcdir)/generated/iany_i1.c \ +-$(srcdir)/generated/iany_i2.c \ +-$(srcdir)/generated/iany_i4.c \ +-$(srcdir)/generated/iany_i8.c \ +-$(srcdir)/generated/iany_i16.c ++generated/iany_i1.c \ ++generated/iany_i2.c \ ++generated/iany_i4.c \ ++generated/iany_i8.c \ ++generated/iany_i16.c + + i_iparity_c = \ +-$(srcdir)/generated/iparity_i1.c \ +-$(srcdir)/generated/iparity_i2.c \ +-$(srcdir)/generated/iparity_i4.c \ +-$(srcdir)/generated/iparity_i8.c \ +-$(srcdir)/generated/iparity_i16.c ++generated/iparity_i1.c \ ++generated/iparity_i2.c \ ++generated/iparity_i4.c \ ++generated/iparity_i8.c \ ++generated/iparity_i16.c + + i_findloc0_c = \ +-$(srcdir)/generated/findloc0_i1.c \ +-$(srcdir)/generated/findloc0_i2.c \ +-$(srcdir)/generated/findloc0_i4.c \ +-$(srcdir)/generated/findloc0_i8.c \ +-$(srcdir)/generated/findloc0_i16.c \ +-$(srcdir)/generated/findloc0_r4.c \ +-$(srcdir)/generated/findloc0_r8.c \ +-$(srcdir)/generated/findloc0_r10.c \ +-$(srcdir)/generated/findloc0_r16.c \ +-$(srcdir)/generated/findloc0_c4.c \ +-$(srcdir)/generated/findloc0_c8.c \ +-$(srcdir)/generated/findloc0_c10.c \ +-$(srcdir)/generated/findloc0_c16.c ++generated/findloc0_i1.c \ ++generated/findloc0_i2.c \ ++generated/findloc0_i4.c \ ++generated/findloc0_i8.c \ ++generated/findloc0_i16.c \ ++generated/findloc0_r4.c \ ++generated/findloc0_r8.c \ ++generated/findloc0_r10.c \ ++generated/findloc0_r16.c \ ++generated/findloc0_c4.c \ ++generated/findloc0_c8.c \ ++generated/findloc0_c10.c \ ++generated/findloc0_c16.c + + i_findloc0s_c = \ +-$(srcdir)/generated/findloc0_s1.c \ +-$(srcdir)/generated/findloc0_s4.c ++generated/findloc0_s1.c \ ++generated/findloc0_s4.c + + i_findloc1_c = \ +-$(srcdir)/generated/findloc1_i1.c \ +-$(srcdir)/generated/findloc1_i2.c \ +-$(srcdir)/generated/findloc1_i4.c \ +-$(srcdir)/generated/findloc1_i8.c \ +-$(srcdir)/generated/findloc1_i16.c \ +-$(srcdir)/generated/findloc1_r4.c \ +-$(srcdir)/generated/findloc1_r8.c \ +-$(srcdir)/generated/findloc1_r10.c \ +-$(srcdir)/generated/findloc1_r16.c \ +-$(srcdir)/generated/findloc1_c4.c \ +-$(srcdir)/generated/findloc1_c8.c \ +-$(srcdir)/generated/findloc1_c10.c \ +-$(srcdir)/generated/findloc1_c16.c ++generated/findloc1_i1.c \ ++generated/findloc1_i2.c \ ++generated/findloc1_i4.c \ ++generated/findloc1_i8.c \ ++generated/findloc1_i16.c \ ++generated/findloc1_r4.c \ ++generated/findloc1_r8.c \ ++generated/findloc1_r10.c \ ++generated/findloc1_r16.c \ ++generated/findloc1_c4.c \ ++generated/findloc1_c8.c \ ++generated/findloc1_c10.c \ ++generated/findloc1_c16.c + + i_findloc1s_c = \ +-$(srcdir)/generated/findloc1_s1.c \ +-$(srcdir)/generated/findloc1_s4.c ++generated/findloc1_s1.c \ ++generated/findloc1_s4.c + + i_findloc2s_c = \ +-$(srcdir)/generated/findloc2_s1.c \ +-$(srcdir)/generated/findloc2_s4.c ++generated/findloc2_s1.c \ ++generated/findloc2_s4.c + + i_maxloc0_c = \ +-$(srcdir)/generated/maxloc0_4_i1.c \ +-$(srcdir)/generated/maxloc0_8_i1.c \ +-$(srcdir)/generated/maxloc0_16_i1.c \ +-$(srcdir)/generated/maxloc0_4_i2.c \ +-$(srcdir)/generated/maxloc0_8_i2.c \ +-$(srcdir)/generated/maxloc0_16_i2.c \ +-$(srcdir)/generated/maxloc0_4_i4.c \ +-$(srcdir)/generated/maxloc0_8_i4.c \ +-$(srcdir)/generated/maxloc0_16_i4.c \ +-$(srcdir)/generated/maxloc0_4_i8.c \ +-$(srcdir)/generated/maxloc0_8_i8.c \ +-$(srcdir)/generated/maxloc0_16_i8.c \ +-$(srcdir)/generated/maxloc0_4_i16.c \ +-$(srcdir)/generated/maxloc0_8_i16.c \ +-$(srcdir)/generated/maxloc0_16_i16.c \ +-$(srcdir)/generated/maxloc0_4_r4.c \ +-$(srcdir)/generated/maxloc0_8_r4.c \ +-$(srcdir)/generated/maxloc0_16_r4.c \ +-$(srcdir)/generated/maxloc0_4_r8.c \ +-$(srcdir)/generated/maxloc0_8_r8.c \ +-$(srcdir)/generated/maxloc0_16_r8.c \ +-$(srcdir)/generated/maxloc0_4_r10.c \ +-$(srcdir)/generated/maxloc0_8_r10.c \ +-$(srcdir)/generated/maxloc0_16_r10.c \ +-$(srcdir)/generated/maxloc0_4_r16.c \ +-$(srcdir)/generated/maxloc0_8_r16.c \ +-$(srcdir)/generated/maxloc0_16_r16.c ++generated/maxloc0_4_i1.c \ ++generated/maxloc0_8_i1.c \ ++generated/maxloc0_16_i1.c \ ++generated/maxloc0_4_i2.c \ ++generated/maxloc0_8_i2.c \ ++generated/maxloc0_16_i2.c \ ++generated/maxloc0_4_i4.c \ ++generated/maxloc0_8_i4.c \ ++generated/maxloc0_16_i4.c \ ++generated/maxloc0_4_i8.c \ ++generated/maxloc0_8_i8.c \ ++generated/maxloc0_16_i8.c \ ++generated/maxloc0_4_i16.c \ ++generated/maxloc0_8_i16.c \ ++generated/maxloc0_16_i16.c \ ++generated/maxloc0_4_r4.c \ ++generated/maxloc0_8_r4.c \ ++generated/maxloc0_16_r4.c \ ++generated/maxloc0_4_r8.c \ ++generated/maxloc0_8_r8.c \ ++generated/maxloc0_16_r8.c \ ++generated/maxloc0_4_r10.c \ ++generated/maxloc0_8_r10.c \ ++generated/maxloc0_16_r10.c \ ++generated/maxloc0_4_r16.c \ ++generated/maxloc0_8_r16.c \ ++generated/maxloc0_16_r16.c + + i_maxloc0s_c = \ +-$(srcdir)/generated/maxloc0_4_s1.c \ +-$(srcdir)/generated/maxloc0_4_s4.c \ +-$(srcdir)/generated/maxloc0_8_s1.c \ +-$(srcdir)/generated/maxloc0_8_s4.c \ +-$(srcdir)/generated/maxloc0_16_s1.c \ +-$(srcdir)/generated/maxloc0_16_s4.c ++generated/maxloc0_4_s1.c \ ++generated/maxloc0_4_s4.c \ ++generated/maxloc0_8_s1.c \ ++generated/maxloc0_8_s4.c \ ++generated/maxloc0_16_s1.c \ ++generated/maxloc0_16_s4.c + + i_maxloc1_c = \ +-$(srcdir)/generated/maxloc1_4_i1.c \ +-$(srcdir)/generated/maxloc1_8_i1.c \ +-$(srcdir)/generated/maxloc1_16_i1.c \ +-$(srcdir)/generated/maxloc1_4_i2.c \ +-$(srcdir)/generated/maxloc1_8_i2.c \ +-$(srcdir)/generated/maxloc1_16_i2.c \ +-$(srcdir)/generated/maxloc1_4_i4.c \ +-$(srcdir)/generated/maxloc1_8_i4.c \ +-$(srcdir)/generated/maxloc1_16_i4.c \ +-$(srcdir)/generated/maxloc1_4_i8.c \ +-$(srcdir)/generated/maxloc1_8_i8.c \ +-$(srcdir)/generated/maxloc1_16_i8.c \ +-$(srcdir)/generated/maxloc1_4_i16.c \ +-$(srcdir)/generated/maxloc1_8_i16.c \ +-$(srcdir)/generated/maxloc1_16_i16.c \ +-$(srcdir)/generated/maxloc1_4_r4.c \ +-$(srcdir)/generated/maxloc1_8_r4.c \ +-$(srcdir)/generated/maxloc1_16_r4.c \ +-$(srcdir)/generated/maxloc1_4_r8.c \ +-$(srcdir)/generated/maxloc1_8_r8.c \ +-$(srcdir)/generated/maxloc1_16_r8.c \ +-$(srcdir)/generated/maxloc1_4_r10.c \ +-$(srcdir)/generated/maxloc1_8_r10.c \ +-$(srcdir)/generated/maxloc1_16_r10.c \ +-$(srcdir)/generated/maxloc1_4_r16.c \ +-$(srcdir)/generated/maxloc1_8_r16.c \ +-$(srcdir)/generated/maxloc1_16_r16.c ++generated/maxloc1_4_i1.c \ ++generated/maxloc1_8_i1.c \ ++generated/maxloc1_16_i1.c \ ++generated/maxloc1_4_i2.c \ ++generated/maxloc1_8_i2.c \ ++generated/maxloc1_16_i2.c \ ++generated/maxloc1_4_i4.c \ ++generated/maxloc1_8_i4.c \ ++generated/maxloc1_16_i4.c \ ++generated/maxloc1_4_i8.c \ ++generated/maxloc1_8_i8.c \ ++generated/maxloc1_16_i8.c \ ++generated/maxloc1_4_i16.c \ ++generated/maxloc1_8_i16.c \ ++generated/maxloc1_16_i16.c \ ++generated/maxloc1_4_r4.c \ ++generated/maxloc1_8_r4.c \ ++generated/maxloc1_16_r4.c \ ++generated/maxloc1_4_r8.c \ ++generated/maxloc1_8_r8.c \ ++generated/maxloc1_16_r8.c \ ++generated/maxloc1_4_r10.c \ ++generated/maxloc1_8_r10.c \ ++generated/maxloc1_16_r10.c \ ++generated/maxloc1_4_r16.c \ ++generated/maxloc1_8_r16.c \ ++generated/maxloc1_16_r16.c + + i_maxloc1s_c = \ +-$(srcdir)/generated/maxloc1_4_s1.c \ +-$(srcdir)/generated/maxloc1_4_s4.c \ +-$(srcdir)/generated/maxloc1_8_s1.c \ +-$(srcdir)/generated/maxloc1_8_s4.c \ +-$(srcdir)/generated/maxloc1_16_s1.c \ +-$(srcdir)/generated/maxloc1_16_s4.c ++generated/maxloc1_4_s1.c \ ++generated/maxloc1_4_s4.c \ ++generated/maxloc1_8_s1.c \ ++generated/maxloc1_8_s4.c \ ++generated/maxloc1_16_s1.c \ ++generated/maxloc1_16_s4.c + + i_maxloc2s_c = \ +-$(srcdir)/generated/maxloc2_4_s1.c \ +-$(srcdir)/generated/maxloc2_4_s4.c \ +-$(srcdir)/generated/maxloc2_8_s1.c \ +-$(srcdir)/generated/maxloc2_8_s4.c \ +-$(srcdir)/generated/maxloc2_16_s1.c \ +-$(srcdir)/generated/maxloc2_16_s4.c ++generated/maxloc2_4_s1.c \ ++generated/maxloc2_4_s4.c \ ++generated/maxloc2_8_s1.c \ ++generated/maxloc2_8_s4.c \ ++generated/maxloc2_16_s1.c \ ++generated/maxloc2_16_s4.c + + i_maxval_c = \ +-$(srcdir)/generated/maxval_i1.c \ +-$(srcdir)/generated/maxval_i2.c \ +-$(srcdir)/generated/maxval_i4.c \ +-$(srcdir)/generated/maxval_i8.c \ +-$(srcdir)/generated/maxval_i16.c \ +-$(srcdir)/generated/maxval_r4.c \ +-$(srcdir)/generated/maxval_r8.c \ +-$(srcdir)/generated/maxval_r10.c \ +-$(srcdir)/generated/maxval_r16.c ++generated/maxval_i1.c \ ++generated/maxval_i2.c \ ++generated/maxval_i4.c \ ++generated/maxval_i8.c \ ++generated/maxval_i16.c \ ++generated/maxval_r4.c \ ++generated/maxval_r8.c \ ++generated/maxval_r10.c \ ++generated/maxval_r16.c + + i_maxval0s_c = \ +-$(srcdir)/generated/maxval0_s1.c \ +-$(srcdir)/generated/maxval0_s4.c ++generated/maxval0_s1.c \ ++generated/maxval0_s4.c + + i_maxval1s_c = \ +-$(srcdir)/generated/maxval1_s1.c \ +-$(srcdir)/generated/maxval1_s4.c ++generated/maxval1_s1.c \ ++generated/maxval1_s4.c + + i_minloc0_c = \ +-$(srcdir)/generated/minloc0_4_i1.c \ +-$(srcdir)/generated/minloc0_8_i1.c \ +-$(srcdir)/generated/minloc0_16_i1.c \ +-$(srcdir)/generated/minloc0_4_i2.c \ +-$(srcdir)/generated/minloc0_8_i2.c \ +-$(srcdir)/generated/minloc0_16_i2.c \ +-$(srcdir)/generated/minloc0_4_i4.c \ +-$(srcdir)/generated/minloc0_8_i4.c \ +-$(srcdir)/generated/minloc0_16_i4.c \ +-$(srcdir)/generated/minloc0_4_i8.c \ +-$(srcdir)/generated/minloc0_8_i8.c \ +-$(srcdir)/generated/minloc0_16_i8.c \ +-$(srcdir)/generated/minloc0_4_i16.c \ +-$(srcdir)/generated/minloc0_8_i16.c \ +-$(srcdir)/generated/minloc0_16_i16.c \ +-$(srcdir)/generated/minloc0_4_r4.c \ +-$(srcdir)/generated/minloc0_8_r4.c \ +-$(srcdir)/generated/minloc0_16_r4.c \ +-$(srcdir)/generated/minloc0_4_r8.c \ +-$(srcdir)/generated/minloc0_8_r8.c \ +-$(srcdir)/generated/minloc0_16_r8.c \ +-$(srcdir)/generated/minloc0_4_r10.c \ +-$(srcdir)/generated/minloc0_8_r10.c \ +-$(srcdir)/generated/minloc0_16_r10.c \ +-$(srcdir)/generated/minloc0_4_r16.c \ +-$(srcdir)/generated/minloc0_8_r16.c \ +-$(srcdir)/generated/minloc0_16_r16.c ++generated/minloc0_4_i1.c \ ++generated/minloc0_8_i1.c \ ++generated/minloc0_16_i1.c \ ++generated/minloc0_4_i2.c \ ++generated/minloc0_8_i2.c \ ++generated/minloc0_16_i2.c \ ++generated/minloc0_4_i4.c \ ++generated/minloc0_8_i4.c \ ++generated/minloc0_16_i4.c \ ++generated/minloc0_4_i8.c \ ++generated/minloc0_8_i8.c \ ++generated/minloc0_16_i8.c \ ++generated/minloc0_4_i16.c \ ++generated/minloc0_8_i16.c \ ++generated/minloc0_16_i16.c \ ++generated/minloc0_4_r4.c \ ++generated/minloc0_8_r4.c \ ++generated/minloc0_16_r4.c \ ++generated/minloc0_4_r8.c \ ++generated/minloc0_8_r8.c \ ++generated/minloc0_16_r8.c \ ++generated/minloc0_4_r10.c \ ++generated/minloc0_8_r10.c \ ++generated/minloc0_16_r10.c \ ++generated/minloc0_4_r16.c \ ++generated/minloc0_8_r16.c \ ++generated/minloc0_16_r16.c + + i_minloc0s_c = \ +-$(srcdir)/generated/minloc0_4_s1.c \ +-$(srcdir)/generated/minloc0_4_s4.c \ +-$(srcdir)/generated/minloc0_8_s1.c \ +-$(srcdir)/generated/minloc0_8_s4.c \ +-$(srcdir)/generated/minloc0_16_s1.c \ +-$(srcdir)/generated/minloc0_16_s4.c ++generated/minloc0_4_s1.c \ ++generated/minloc0_4_s4.c \ ++generated/minloc0_8_s1.c \ ++generated/minloc0_8_s4.c \ ++generated/minloc0_16_s1.c \ ++generated/minloc0_16_s4.c + + i_minloc1_c = \ +-$(srcdir)/generated/minloc1_4_i1.c \ +-$(srcdir)/generated/minloc1_8_i1.c \ +-$(srcdir)/generated/minloc1_16_i1.c \ +-$(srcdir)/generated/minloc1_4_i2.c \ +-$(srcdir)/generated/minloc1_8_i2.c \ +-$(srcdir)/generated/minloc1_16_i2.c \ +-$(srcdir)/generated/minloc1_4_i4.c \ +-$(srcdir)/generated/minloc1_8_i4.c \ +-$(srcdir)/generated/minloc1_16_i4.c \ +-$(srcdir)/generated/minloc1_4_i8.c \ +-$(srcdir)/generated/minloc1_8_i8.c \ +-$(srcdir)/generated/minloc1_16_i8.c \ +-$(srcdir)/generated/minloc1_4_i16.c \ +-$(srcdir)/generated/minloc1_8_i16.c \ +-$(srcdir)/generated/minloc1_16_i16.c \ +-$(srcdir)/generated/minloc1_4_r4.c \ +-$(srcdir)/generated/minloc1_8_r4.c \ +-$(srcdir)/generated/minloc1_16_r4.c \ +-$(srcdir)/generated/minloc1_4_r8.c \ +-$(srcdir)/generated/minloc1_8_r8.c \ +-$(srcdir)/generated/minloc1_16_r8.c \ +-$(srcdir)/generated/minloc1_4_r10.c \ +-$(srcdir)/generated/minloc1_8_r10.c \ +-$(srcdir)/generated/minloc1_16_r10.c \ +-$(srcdir)/generated/minloc1_4_r16.c \ +-$(srcdir)/generated/minloc1_8_r16.c \ +-$(srcdir)/generated/minloc1_16_r16.c ++generated/minloc1_4_i1.c \ ++generated/minloc1_8_i1.c \ ++generated/minloc1_16_i1.c \ ++generated/minloc1_4_i2.c \ ++generated/minloc1_8_i2.c \ ++generated/minloc1_16_i2.c \ ++generated/minloc1_4_i4.c \ ++generated/minloc1_8_i4.c \ ++generated/minloc1_16_i4.c \ ++generated/minloc1_4_i8.c \ ++generated/minloc1_8_i8.c \ ++generated/minloc1_16_i8.c \ ++generated/minloc1_4_i16.c \ ++generated/minloc1_8_i16.c \ ++generated/minloc1_16_i16.c \ ++generated/minloc1_4_r4.c \ ++generated/minloc1_8_r4.c \ ++generated/minloc1_16_r4.c \ ++generated/minloc1_4_r8.c \ ++generated/minloc1_8_r8.c \ ++generated/minloc1_16_r8.c \ ++generated/minloc1_4_r10.c \ ++generated/minloc1_8_r10.c \ ++generated/minloc1_16_r10.c \ ++generated/minloc1_4_r16.c \ ++generated/minloc1_8_r16.c \ ++generated/minloc1_16_r16.c + + i_minloc1s_c = \ +-$(srcdir)/generated/minloc1_4_s1.c \ +-$(srcdir)/generated/minloc1_4_s4.c \ +-$(srcdir)/generated/minloc1_8_s1.c \ +-$(srcdir)/generated/minloc1_8_s4.c \ +-$(srcdir)/generated/minloc1_16_s1.c \ +-$(srcdir)/generated/minloc1_16_s4.c ++generated/minloc1_4_s1.c \ ++generated/minloc1_4_s4.c \ ++generated/minloc1_8_s1.c \ ++generated/minloc1_8_s4.c \ ++generated/minloc1_16_s1.c \ ++generated/minloc1_16_s4.c + + i_minloc2s_c = \ +-$(srcdir)/generated/minloc2_4_s1.c \ +-$(srcdir)/generated/minloc2_4_s4.c \ +-$(srcdir)/generated/minloc2_8_s1.c \ +-$(srcdir)/generated/minloc2_8_s4.c \ +-$(srcdir)/generated/minloc2_16_s1.c \ +-$(srcdir)/generated/minloc2_16_s4.c ++generated/minloc2_4_s1.c \ ++generated/minloc2_4_s4.c \ ++generated/minloc2_8_s1.c \ ++generated/minloc2_8_s4.c \ ++generated/minloc2_16_s1.c \ ++generated/minloc2_16_s4.c + + i_minval_c = \ +-$(srcdir)/generated/minval_i1.c \ +-$(srcdir)/generated/minval_i2.c \ +-$(srcdir)/generated/minval_i4.c \ +-$(srcdir)/generated/minval_i8.c \ +-$(srcdir)/generated/minval_i16.c \ +-$(srcdir)/generated/minval_r4.c \ +-$(srcdir)/generated/minval_r8.c \ +-$(srcdir)/generated/minval_r10.c \ +-$(srcdir)/generated/minval_r16.c ++generated/minval_i1.c \ ++generated/minval_i2.c \ ++generated/minval_i4.c \ ++generated/minval_i8.c \ ++generated/minval_i16.c \ ++generated/minval_r4.c \ ++generated/minval_r8.c \ ++generated/minval_r10.c \ ++generated/minval_r16.c + + i_minval0s_c = \ +-$(srcdir)/generated/minval0_s1.c \ +-$(srcdir)/generated/minval0_s4.c ++generated/minval0_s1.c \ ++generated/minval0_s4.c + + i_minval1s_c = \ +-$(srcdir)/generated/minval1_s1.c \ +-$(srcdir)/generated/minval1_s4.c ++generated/minval1_s1.c \ ++generated/minval1_s4.c + + i_norm2_c = \ +-$(srcdir)/generated/norm2_r4.c \ +-$(srcdir)/generated/norm2_r8.c \ +-$(srcdir)/generated/norm2_r10.c \ +-$(srcdir)/generated/norm2_r16.c ++generated/norm2_r4.c \ ++generated/norm2_r8.c \ ++generated/norm2_r10.c \ ++generated/norm2_r16.c + + i_parity_c = \ +-$(srcdir)/generated/parity_l1.c \ +-$(srcdir)/generated/parity_l2.c \ +-$(srcdir)/generated/parity_l4.c \ +-$(srcdir)/generated/parity_l8.c \ +-$(srcdir)/generated/parity_l16.c ++generated/parity_l1.c \ ++generated/parity_l2.c \ ++generated/parity_l4.c \ ++generated/parity_l8.c \ ++generated/parity_l16.c + + i_sum_c = \ +-$(srcdir)/generated/sum_i1.c \ +-$(srcdir)/generated/sum_i2.c \ +-$(srcdir)/generated/sum_i4.c \ +-$(srcdir)/generated/sum_i8.c \ +-$(srcdir)/generated/sum_i16.c \ +-$(srcdir)/generated/sum_r4.c \ +-$(srcdir)/generated/sum_r8.c \ +-$(srcdir)/generated/sum_r10.c \ +-$(srcdir)/generated/sum_r16.c \ +-$(srcdir)/generated/sum_c4.c \ +-$(srcdir)/generated/sum_c8.c \ +-$(srcdir)/generated/sum_c10.c \ +-$(srcdir)/generated/sum_c16.c ++generated/sum_i1.c \ ++generated/sum_i2.c \ ++generated/sum_i4.c \ ++generated/sum_i8.c \ ++generated/sum_i16.c \ ++generated/sum_r4.c \ ++generated/sum_r8.c \ ++generated/sum_r10.c \ ++generated/sum_r16.c \ ++generated/sum_c4.c \ ++generated/sum_c8.c \ ++generated/sum_c10.c \ ++generated/sum_c16.c + + i_product_c = \ +-$(srcdir)/generated/product_i1.c \ +-$(srcdir)/generated/product_i2.c \ +-$(srcdir)/generated/product_i4.c \ +-$(srcdir)/generated/product_i8.c \ +-$(srcdir)/generated/product_i16.c \ +-$(srcdir)/generated/product_r4.c \ +-$(srcdir)/generated/product_r8.c \ +-$(srcdir)/generated/product_r10.c \ +-$(srcdir)/generated/product_r16.c \ +-$(srcdir)/generated/product_c4.c \ +-$(srcdir)/generated/product_c8.c \ +-$(srcdir)/generated/product_c10.c \ +-$(srcdir)/generated/product_c16.c ++generated/product_i1.c \ ++generated/product_i2.c \ ++generated/product_i4.c \ ++generated/product_i8.c \ ++generated/product_i16.c \ ++generated/product_r4.c \ ++generated/product_r8.c \ ++generated/product_r10.c \ ++generated/product_r16.c \ ++generated/product_c4.c \ ++generated/product_c8.c \ ++generated/product_c10.c \ ++generated/product_c16.c + + i_matmul_c = \ +-$(srcdir)/generated/matmul_i1.c \ +-$(srcdir)/generated/matmul_i2.c \ +-$(srcdir)/generated/matmul_i4.c \ +-$(srcdir)/generated/matmul_i8.c \ +-$(srcdir)/generated/matmul_i16.c \ +-$(srcdir)/generated/matmul_r4.c \ +-$(srcdir)/generated/matmul_r8.c \ +-$(srcdir)/generated/matmul_r10.c \ +-$(srcdir)/generated/matmul_r16.c \ +-$(srcdir)/generated/matmul_c4.c \ +-$(srcdir)/generated/matmul_c8.c \ +-$(srcdir)/generated/matmul_c10.c \ +-$(srcdir)/generated/matmul_c16.c ++generated/matmul_i1.c \ ++generated/matmul_i2.c \ ++generated/matmul_i4.c \ ++generated/matmul_i8.c \ ++generated/matmul_i16.c \ ++generated/matmul_r4.c \ ++generated/matmul_r8.c \ ++generated/matmul_r10.c \ ++generated/matmul_r16.c \ ++generated/matmul_c4.c \ ++generated/matmul_c8.c \ ++generated/matmul_c10.c \ ++generated/matmul_c16.c + + i_matmulavx128_c = \ +-$(srcdir)/generated/matmulavx128_i1.c \ +-$(srcdir)/generated/matmulavx128_i2.c \ +-$(srcdir)/generated/matmulavx128_i4.c \ +-$(srcdir)/generated/matmulavx128_i8.c \ +-$(srcdir)/generated/matmulavx128_i16.c \ +-$(srcdir)/generated/matmulavx128_r4.c \ +-$(srcdir)/generated/matmulavx128_r8.c \ +-$(srcdir)/generated/matmulavx128_r10.c \ +-$(srcdir)/generated/matmulavx128_r16.c \ +-$(srcdir)/generated/matmulavx128_c4.c \ +-$(srcdir)/generated/matmulavx128_c8.c \ +-$(srcdir)/generated/matmulavx128_c10.c \ +-$(srcdir)/generated/matmulavx128_c16.c ++generated/matmulavx128_i1.c \ ++generated/matmulavx128_i2.c \ ++generated/matmulavx128_i4.c \ ++generated/matmulavx128_i8.c \ ++generated/matmulavx128_i16.c \ ++generated/matmulavx128_r4.c \ ++generated/matmulavx128_r8.c \ ++generated/matmulavx128_r10.c \ ++generated/matmulavx128_r16.c \ ++generated/matmulavx128_c4.c \ ++generated/matmulavx128_c8.c \ ++generated/matmulavx128_c10.c \ ++generated/matmulavx128_c16.c + + i_matmull_c = \ +-$(srcdir)/generated/matmul_l4.c \ +-$(srcdir)/generated/matmul_l8.c \ +-$(srcdir)/generated/matmul_l16.c ++generated/matmul_l4.c \ ++generated/matmul_l8.c \ ++generated/matmul_l16.c + + i_shape_c = \ +-$(srcdir)/generated/shape_i1.c \ +-$(srcdir)/generated/shape_i2.c \ +-$(srcdir)/generated/shape_i4.c \ +-$(srcdir)/generated/shape_i8.c \ +-$(srcdir)/generated/shape_i16.c ++generated/shape_i1.c \ ++generated/shape_i2.c \ ++generated/shape_i4.c \ ++generated/shape_i8.c \ ++generated/shape_i16.c + + i_reshape_c = \ +-$(srcdir)/generated/reshape_i4.c \ +-$(srcdir)/generated/reshape_i8.c \ +-$(srcdir)/generated/reshape_i16.c \ +-$(srcdir)/generated/reshape_r4.c \ +-$(srcdir)/generated/reshape_r8.c \ +-$(srcdir)/generated/reshape_r10.c \ +-$(srcdir)/generated/reshape_r16.c \ +-$(srcdir)/generated/reshape_c4.c \ +-$(srcdir)/generated/reshape_c8.c \ +-$(srcdir)/generated/reshape_c10.c \ +-$(srcdir)/generated/reshape_c16.c ++generated/reshape_i4.c \ ++generated/reshape_i8.c \ ++generated/reshape_i16.c \ ++generated/reshape_r4.c \ ++generated/reshape_r8.c \ ++generated/reshape_r10.c \ ++generated/reshape_r16.c \ ++generated/reshape_c4.c \ ++generated/reshape_c8.c \ ++generated/reshape_c10.c \ ++generated/reshape_c16.c + + i_eoshift1_c = \ +-$(srcdir)/generated/eoshift1_4.c \ +-$(srcdir)/generated/eoshift1_8.c \ +-$(srcdir)/generated/eoshift1_16.c ++generated/eoshift1_4.c \ ++generated/eoshift1_8.c \ ++generated/eoshift1_16.c + + i_eoshift3_c = \ +-$(srcdir)/generated/eoshift3_4.c \ +-$(srcdir)/generated/eoshift3_8.c \ +-$(srcdir)/generated/eoshift3_16.c ++generated/eoshift3_4.c \ ++generated/eoshift3_8.c \ ++generated/eoshift3_16.c + + i_cshift0_c = \ +-$(srcdir)/generated/cshift0_i1.c \ +-$(srcdir)/generated/cshift0_i2.c \ +-$(srcdir)/generated/cshift0_i4.c \ +-$(srcdir)/generated/cshift0_i8.c \ +-$(srcdir)/generated/cshift0_i16.c \ +-$(srcdir)/generated/cshift0_r4.c \ +-$(srcdir)/generated/cshift0_r8.c \ +-$(srcdir)/generated/cshift0_r10.c \ +-$(srcdir)/generated/cshift0_r16.c \ +-$(srcdir)/generated/cshift0_c4.c \ +-$(srcdir)/generated/cshift0_c8.c \ +-$(srcdir)/generated/cshift0_c10.c \ +-$(srcdir)/generated/cshift0_c16.c ++generated/cshift0_i1.c \ ++generated/cshift0_i2.c \ ++generated/cshift0_i4.c \ ++generated/cshift0_i8.c \ ++generated/cshift0_i16.c \ ++generated/cshift0_r4.c \ ++generated/cshift0_r8.c \ ++generated/cshift0_r10.c \ ++generated/cshift0_r16.c \ ++generated/cshift0_c4.c \ ++generated/cshift0_c8.c \ ++generated/cshift0_c10.c \ ++generated/cshift0_c16.c + + i_cshift1_c = \ +-$(srcdir)/generated/cshift1_4.c \ +-$(srcdir)/generated/cshift1_8.c \ +-$(srcdir)/generated/cshift1_16.c ++generated/cshift1_4.c \ ++generated/cshift1_8.c \ ++generated/cshift1_16.c + + i_cshift1a_c = \ +-$(srcdir)/generated/cshift1_4_i1.c \ +-$(srcdir)/generated/cshift1_4_i2.c \ +-$(srcdir)/generated/cshift1_4_i4.c \ +-$(srcdir)/generated/cshift1_4_i8.c \ +-$(srcdir)/generated/cshift1_4_i16.c \ +-$(srcdir)/generated/cshift1_4_r4.c \ +-$(srcdir)/generated/cshift1_4_r8.c \ +-$(srcdir)/generated/cshift1_4_r10.c \ +-$(srcdir)/generated/cshift1_4_r16.c \ +-$(srcdir)/generated/cshift1_4_c4.c \ +-$(srcdir)/generated/cshift1_4_c8.c \ +-$(srcdir)/generated/cshift1_4_c10.c \ +-$(srcdir)/generated/cshift1_4_c16.c \ +-$(srcdir)/generated/cshift1_8_i1.c \ +-$(srcdir)/generated/cshift1_8_i2.c \ +-$(srcdir)/generated/cshift1_8_i4.c \ +-$(srcdir)/generated/cshift1_8_i8.c \ +-$(srcdir)/generated/cshift1_8_i16.c \ +-$(srcdir)/generated/cshift1_8_r4.c \ +-$(srcdir)/generated/cshift1_8_r8.c \ +-$(srcdir)/generated/cshift1_8_r10.c \ +-$(srcdir)/generated/cshift1_8_r16.c \ +-$(srcdir)/generated/cshift1_8_c4.c \ +-$(srcdir)/generated/cshift1_8_c8.c \ +-$(srcdir)/generated/cshift1_8_c10.c \ +-$(srcdir)/generated/cshift1_8_c16.c \ +-$(srcdir)/generated/cshift1_16_i1.c \ +-$(srcdir)/generated/cshift1_16_i2.c \ +-$(srcdir)/generated/cshift1_16_i4.c \ +-$(srcdir)/generated/cshift1_16_i8.c \ +-$(srcdir)/generated/cshift1_16_i16.c \ +-$(srcdir)/generated/cshift1_16_r4.c \ +-$(srcdir)/generated/cshift1_16_r8.c \ +-$(srcdir)/generated/cshift1_16_r10.c \ +-$(srcdir)/generated/cshift1_16_r16.c \ +-$(srcdir)/generated/cshift1_16_c4.c \ +-$(srcdir)/generated/cshift1_16_c8.c \ +-$(srcdir)/generated/cshift1_16_c10.c \ +-$(srcdir)/generated/cshift1_16_c16.c ++generated/cshift1_4_i1.c \ ++generated/cshift1_4_i2.c \ ++generated/cshift1_4_i4.c \ ++generated/cshift1_4_i8.c \ ++generated/cshift1_4_i16.c \ ++generated/cshift1_4_r4.c \ ++generated/cshift1_4_r8.c \ ++generated/cshift1_4_r10.c \ ++generated/cshift1_4_r16.c \ ++generated/cshift1_4_c4.c \ ++generated/cshift1_4_c8.c \ ++generated/cshift1_4_c10.c \ ++generated/cshift1_4_c16.c \ ++generated/cshift1_8_i1.c \ ++generated/cshift1_8_i2.c \ ++generated/cshift1_8_i4.c \ ++generated/cshift1_8_i8.c \ ++generated/cshift1_8_i16.c \ ++generated/cshift1_8_r4.c \ ++generated/cshift1_8_r8.c \ ++generated/cshift1_8_r10.c \ ++generated/cshift1_8_r16.c \ ++generated/cshift1_8_c4.c \ ++generated/cshift1_8_c8.c \ ++generated/cshift1_8_c10.c \ ++generated/cshift1_8_c16.c \ ++generated/cshift1_16_i1.c \ ++generated/cshift1_16_i2.c \ ++generated/cshift1_16_i4.c \ ++generated/cshift1_16_i8.c \ ++generated/cshift1_16_i16.c \ ++generated/cshift1_16_r4.c \ ++generated/cshift1_16_r8.c \ ++generated/cshift1_16_r10.c \ ++generated/cshift1_16_r16.c \ ++generated/cshift1_16_c4.c \ ++generated/cshift1_16_c8.c \ ++generated/cshift1_16_c10.c \ ++generated/cshift1_16_c16.c + + in_pack_c = \ +-$(srcdir)/generated/in_pack_i1.c \ +-$(srcdir)/generated/in_pack_i2.c \ +-$(srcdir)/generated/in_pack_i4.c \ +-$(srcdir)/generated/in_pack_i8.c \ +-$(srcdir)/generated/in_pack_i16.c \ +-$(srcdir)/generated/in_pack_r4.c \ +-$(srcdir)/generated/in_pack_r8.c \ +-$(srcdir)/generated/in_pack_r10.c \ +-$(srcdir)/generated/in_pack_r16.c \ +-$(srcdir)/generated/in_pack_c4.c \ +-$(srcdir)/generated/in_pack_c8.c \ +-$(srcdir)/generated/in_pack_c10.c \ +-$(srcdir)/generated/in_pack_c16.c ++generated/in_pack_i1.c \ ++generated/in_pack_i2.c \ ++generated/in_pack_i4.c \ ++generated/in_pack_i8.c \ ++generated/in_pack_i16.c \ ++generated/in_pack_r4.c \ ++generated/in_pack_r8.c \ ++generated/in_pack_r10.c \ ++generated/in_pack_r16.c \ ++generated/in_pack_c4.c \ ++generated/in_pack_c8.c \ ++generated/in_pack_c10.c \ ++generated/in_pack_c16.c + + in_unpack_c = \ +-$(srcdir)/generated/in_unpack_i1.c \ +-$(srcdir)/generated/in_unpack_i2.c \ +-$(srcdir)/generated/in_unpack_i4.c \ +-$(srcdir)/generated/in_unpack_i8.c \ +-$(srcdir)/generated/in_unpack_i16.c \ +-$(srcdir)/generated/in_unpack_r4.c \ +-$(srcdir)/generated/in_unpack_r8.c \ +-$(srcdir)/generated/in_unpack_r10.c \ +-$(srcdir)/generated/in_unpack_r16.c \ +-$(srcdir)/generated/in_unpack_c4.c \ +-$(srcdir)/generated/in_unpack_c8.c \ +-$(srcdir)/generated/in_unpack_c10.c \ +-$(srcdir)/generated/in_unpack_c16.c ++generated/in_unpack_i1.c \ ++generated/in_unpack_i2.c \ ++generated/in_unpack_i4.c \ ++generated/in_unpack_i8.c \ ++generated/in_unpack_i16.c \ ++generated/in_unpack_r4.c \ ++generated/in_unpack_r8.c \ ++generated/in_unpack_r10.c \ ++generated/in_unpack_r16.c \ ++generated/in_unpack_c4.c \ ++generated/in_unpack_c8.c \ ++generated/in_unpack_c10.c \ ++generated/in_unpack_c16.c + + i_pow_c = \ +-$(srcdir)/generated/pow_i4_i4.c \ +-$(srcdir)/generated/pow_i8_i4.c \ +-$(srcdir)/generated/pow_i16_i4.c \ +-$(srcdir)/generated/pow_r16_i4.c \ +-$(srcdir)/generated/pow_c4_i4.c \ +-$(srcdir)/generated/pow_c8_i4.c \ +-$(srcdir)/generated/pow_c10_i4.c \ +-$(srcdir)/generated/pow_c16_i4.c \ +-$(srcdir)/generated/pow_i4_i8.c \ +-$(srcdir)/generated/pow_i8_i8.c \ +-$(srcdir)/generated/pow_i16_i8.c \ +-$(srcdir)/generated/pow_r4_i8.c \ +-$(srcdir)/generated/pow_r8_i8.c \ +-$(srcdir)/generated/pow_r10_i8.c \ +-$(srcdir)/generated/pow_r16_i8.c \ +-$(srcdir)/generated/pow_c4_i8.c \ +-$(srcdir)/generated/pow_c8_i8.c \ +-$(srcdir)/generated/pow_c10_i8.c \ +-$(srcdir)/generated/pow_c16_i8.c \ +-$(srcdir)/generated/pow_i4_i16.c \ +-$(srcdir)/generated/pow_i8_i16.c \ +-$(srcdir)/generated/pow_i16_i16.c \ +-$(srcdir)/generated/pow_r4_i16.c \ +-$(srcdir)/generated/pow_r8_i16.c \ +-$(srcdir)/generated/pow_r10_i16.c \ +-$(srcdir)/generated/pow_r16_i16.c \ +-$(srcdir)/generated/pow_c4_i16.c \ +-$(srcdir)/generated/pow_c8_i16.c \ +-$(srcdir)/generated/pow_c10_i16.c \ +-$(srcdir)/generated/pow_c16_i16.c ++generated/pow_i4_i4.c \ ++generated/pow_i8_i4.c \ ++generated/pow_i16_i4.c \ ++generated/pow_r16_i4.c \ ++generated/pow_c4_i4.c \ ++generated/pow_c8_i4.c \ ++generated/pow_c10_i4.c \ ++generated/pow_c16_i4.c \ ++generated/pow_i4_i8.c \ ++generated/pow_i8_i8.c \ ++generated/pow_i16_i8.c \ ++generated/pow_r4_i8.c \ ++generated/pow_r8_i8.c \ ++generated/pow_r10_i8.c \ ++generated/pow_r16_i8.c \ ++generated/pow_c4_i8.c \ ++generated/pow_c8_i8.c \ ++generated/pow_c10_i8.c \ ++generated/pow_c16_i8.c \ ++generated/pow_i4_i16.c \ ++generated/pow_i8_i16.c \ ++generated/pow_i16_i16.c \ ++generated/pow_r4_i16.c \ ++generated/pow_r8_i16.c \ ++generated/pow_r10_i16.c \ ++generated/pow_r16_i16.c \ ++generated/pow_c4_i16.c \ ++generated/pow_c8_i16.c \ ++generated/pow_c10_i16.c \ ++generated/pow_c16_i16.c + + i_pack_c = \ +-$(srcdir)/generated/pack_i1.c \ +-$(srcdir)/generated/pack_i2.c \ +-$(srcdir)/generated/pack_i4.c \ +-$(srcdir)/generated/pack_i8.c \ +-$(srcdir)/generated/pack_i16.c \ +-$(srcdir)/generated/pack_r4.c \ +-$(srcdir)/generated/pack_r8.c \ +-$(srcdir)/generated/pack_r10.c \ +-$(srcdir)/generated/pack_r16.c \ +-$(srcdir)/generated/pack_c4.c \ +-$(srcdir)/generated/pack_c8.c \ +-$(srcdir)/generated/pack_c10.c \ +-$(srcdir)/generated/pack_c16.c ++generated/pack_i1.c \ ++generated/pack_i2.c \ ++generated/pack_i4.c \ ++generated/pack_i8.c \ ++generated/pack_i16.c \ ++generated/pack_r4.c \ ++generated/pack_r8.c \ ++generated/pack_r10.c \ ++generated/pack_r16.c \ ++generated/pack_c4.c \ ++generated/pack_c8.c \ ++generated/pack_c10.c \ ++generated/pack_c16.c + + i_unpack_c = \ +-$(srcdir)/generated/unpack_i1.c \ +-$(srcdir)/generated/unpack_i2.c \ +-$(srcdir)/generated/unpack_i4.c \ +-$(srcdir)/generated/unpack_i8.c \ +-$(srcdir)/generated/unpack_i16.c \ +-$(srcdir)/generated/unpack_r4.c \ +-$(srcdir)/generated/unpack_r8.c \ +-$(srcdir)/generated/unpack_r10.c \ +-$(srcdir)/generated/unpack_r16.c \ +-$(srcdir)/generated/unpack_c4.c \ +-$(srcdir)/generated/unpack_c8.c \ +-$(srcdir)/generated/unpack_c10.c \ +-$(srcdir)/generated/unpack_c16.c ++generated/unpack_i1.c \ ++generated/unpack_i2.c \ ++generated/unpack_i4.c \ ++generated/unpack_i8.c \ ++generated/unpack_i16.c \ ++generated/unpack_r4.c \ ++generated/unpack_r8.c \ ++generated/unpack_r10.c \ ++generated/unpack_r16.c \ ++generated/unpack_c4.c \ ++generated/unpack_c8.c \ ++generated/unpack_c10.c \ ++generated/unpack_c16.c + + i_spread_c = \ +-$(srcdir)/generated/spread_i1.c \ +-$(srcdir)/generated/spread_i2.c \ +-$(srcdir)/generated/spread_i4.c \ +-$(srcdir)/generated/spread_i8.c \ +-$(srcdir)/generated/spread_i16.c \ +-$(srcdir)/generated/spread_r4.c \ +-$(srcdir)/generated/spread_r8.c \ +-$(srcdir)/generated/spread_r10.c \ +-$(srcdir)/generated/spread_r16.c \ +-$(srcdir)/generated/spread_c4.c \ +-$(srcdir)/generated/spread_c8.c \ +-$(srcdir)/generated/spread_c10.c \ +-$(srcdir)/generated/spread_c16.c ++generated/spread_i1.c \ ++generated/spread_i2.c \ ++generated/spread_i4.c \ ++generated/spread_i8.c \ ++generated/spread_i16.c \ ++generated/spread_r4.c \ ++generated/spread_r8.c \ ++generated/spread_r10.c \ ++generated/spread_r16.c \ ++generated/spread_c4.c \ ++generated/spread_c8.c \ ++generated/spread_c10.c \ ++generated/spread_c16.c + + i_isobinding_c = \ +-$(srcdir)/runtime/ISO_Fortran_binding.c ++runtime/ISO_Fortran_binding.c + + m4_files = m4/iparm.m4 m4/ifunction.m4 m4/iforeach.m4 m4/all.m4 \ + m4/any.m4 m4/count.m4 m4/maxloc0.m4 m4/maxloc1.m4 m4/maxval.m4 \ +@@ -1390,146 +1560,146 @@ gfor_built_src = $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \ + + # Machine generated specifics + gfor_built_specific_src = \ +-$(srcdir)/generated/_abs_c4.F90 \ +-$(srcdir)/generated/_abs_c8.F90 \ +-$(srcdir)/generated/_abs_c10.F90 \ +-$(srcdir)/generated/_abs_c16.F90 \ +-$(srcdir)/generated/_abs_i4.F90 \ +-$(srcdir)/generated/_abs_i8.F90 \ +-$(srcdir)/generated/_abs_i16.F90 \ +-$(srcdir)/generated/_abs_r4.F90 \ +-$(srcdir)/generated/_abs_r8.F90 \ +-$(srcdir)/generated/_abs_r10.F90 \ +-$(srcdir)/generated/_abs_r16.F90 \ +-$(srcdir)/generated/_aimag_c4.F90 \ +-$(srcdir)/generated/_aimag_c8.F90 \ +-$(srcdir)/generated/_aimag_c10.F90 \ +-$(srcdir)/generated/_aimag_c16.F90 \ +-$(srcdir)/generated/_exp_r4.F90 \ +-$(srcdir)/generated/_exp_r8.F90 \ +-$(srcdir)/generated/_exp_r10.F90 \ +-$(srcdir)/generated/_exp_r16.F90 \ +-$(srcdir)/generated/_exp_c4.F90 \ +-$(srcdir)/generated/_exp_c8.F90 \ +-$(srcdir)/generated/_exp_c10.F90 \ +-$(srcdir)/generated/_exp_c16.F90 \ +-$(srcdir)/generated/_log_r4.F90 \ +-$(srcdir)/generated/_log_r8.F90 \ +-$(srcdir)/generated/_log_r10.F90 \ +-$(srcdir)/generated/_log_r16.F90 \ +-$(srcdir)/generated/_log_c4.F90 \ +-$(srcdir)/generated/_log_c8.F90 \ +-$(srcdir)/generated/_log_c10.F90 \ +-$(srcdir)/generated/_log_c16.F90 \ +-$(srcdir)/generated/_log10_r4.F90 \ +-$(srcdir)/generated/_log10_r8.F90 \ +-$(srcdir)/generated/_log10_r10.F90 \ +-$(srcdir)/generated/_log10_r16.F90 \ +-$(srcdir)/generated/_sqrt_r4.F90 \ +-$(srcdir)/generated/_sqrt_r8.F90 \ +-$(srcdir)/generated/_sqrt_r10.F90 \ +-$(srcdir)/generated/_sqrt_r16.F90 \ +-$(srcdir)/generated/_sqrt_c4.F90 \ +-$(srcdir)/generated/_sqrt_c8.F90 \ +-$(srcdir)/generated/_sqrt_c10.F90 \ +-$(srcdir)/generated/_sqrt_c16.F90 \ +-$(srcdir)/generated/_asin_r4.F90 \ +-$(srcdir)/generated/_asin_r8.F90 \ +-$(srcdir)/generated/_asin_r10.F90 \ +-$(srcdir)/generated/_asin_r16.F90 \ +-$(srcdir)/generated/_asinh_r4.F90 \ +-$(srcdir)/generated/_asinh_r8.F90 \ +-$(srcdir)/generated/_asinh_r10.F90 \ +-$(srcdir)/generated/_asinh_r16.F90 \ +-$(srcdir)/generated/_acos_r4.F90 \ +-$(srcdir)/generated/_acos_r8.F90 \ +-$(srcdir)/generated/_acos_r10.F90 \ +-$(srcdir)/generated/_acos_r16.F90 \ +-$(srcdir)/generated/_acosh_r4.F90 \ +-$(srcdir)/generated/_acosh_r8.F90 \ +-$(srcdir)/generated/_acosh_r10.F90 \ +-$(srcdir)/generated/_acosh_r16.F90 \ +-$(srcdir)/generated/_atan_r4.F90 \ +-$(srcdir)/generated/_atan_r8.F90 \ +-$(srcdir)/generated/_atan_r10.F90 \ +-$(srcdir)/generated/_atan_r16.F90 \ +-$(srcdir)/generated/_atanh_r4.F90 \ +-$(srcdir)/generated/_atanh_r8.F90 \ +-$(srcdir)/generated/_atanh_r10.F90 \ +-$(srcdir)/generated/_atanh_r16.F90 \ +-$(srcdir)/generated/_sin_r4.F90 \ +-$(srcdir)/generated/_sin_r8.F90 \ +-$(srcdir)/generated/_sin_r10.F90 \ +-$(srcdir)/generated/_sin_r16.F90 \ +-$(srcdir)/generated/_sin_c4.F90 \ +-$(srcdir)/generated/_sin_c8.F90 \ +-$(srcdir)/generated/_sin_c10.F90 \ +-$(srcdir)/generated/_sin_c16.F90 \ +-$(srcdir)/generated/_cos_r4.F90 \ +-$(srcdir)/generated/_cos_r8.F90 \ +-$(srcdir)/generated/_cos_r10.F90 \ +-$(srcdir)/generated/_cos_r16.F90 \ +-$(srcdir)/generated/_cos_c4.F90 \ +-$(srcdir)/generated/_cos_c8.F90 \ +-$(srcdir)/generated/_cos_c10.F90 \ +-$(srcdir)/generated/_cos_c16.F90 \ +-$(srcdir)/generated/_tan_r4.F90 \ +-$(srcdir)/generated/_tan_r8.F90 \ +-$(srcdir)/generated/_tan_r10.F90 \ +-$(srcdir)/generated/_tan_r16.F90 \ +-$(srcdir)/generated/_sinh_r4.F90 \ +-$(srcdir)/generated/_sinh_r8.F90 \ +-$(srcdir)/generated/_sinh_r10.F90 \ +-$(srcdir)/generated/_sinh_r16.F90 \ +-$(srcdir)/generated/_cosh_r4.F90 \ +-$(srcdir)/generated/_cosh_r8.F90 \ +-$(srcdir)/generated/_cosh_r10.F90 \ +-$(srcdir)/generated/_cosh_r16.F90 \ +-$(srcdir)/generated/_tanh_r4.F90 \ +-$(srcdir)/generated/_tanh_r8.F90 \ +-$(srcdir)/generated/_tanh_r10.F90 \ +-$(srcdir)/generated/_tanh_r16.F90 \ +-$(srcdir)/generated/_conjg_c4.F90 \ +-$(srcdir)/generated/_conjg_c8.F90 \ +-$(srcdir)/generated/_conjg_c10.F90 \ +-$(srcdir)/generated/_conjg_c16.F90 \ +-$(srcdir)/generated/_aint_r4.F90 \ +-$(srcdir)/generated/_aint_r8.F90 \ +-$(srcdir)/generated/_aint_r10.F90 \ +-$(srcdir)/generated/_aint_r16.F90 \ +-$(srcdir)/generated/_anint_r4.F90 \ +-$(srcdir)/generated/_anint_r8.F90 \ +-$(srcdir)/generated/_anint_r10.F90 \ +-$(srcdir)/generated/_anint_r16.F90 ++generated/_abs_c4.F90 \ ++generated/_abs_c8.F90 \ ++generated/_abs_c10.F90 \ ++generated/_abs_c16.F90 \ ++generated/_abs_i4.F90 \ ++generated/_abs_i8.F90 \ ++generated/_abs_i16.F90 \ ++generated/_abs_r4.F90 \ ++generated/_abs_r8.F90 \ ++generated/_abs_r10.F90 \ ++generated/_abs_r16.F90 \ ++generated/_aimag_c4.F90 \ ++generated/_aimag_c8.F90 \ ++generated/_aimag_c10.F90 \ ++generated/_aimag_c16.F90 \ ++generated/_exp_r4.F90 \ ++generated/_exp_r8.F90 \ ++generated/_exp_r10.F90 \ ++generated/_exp_r16.F90 \ ++generated/_exp_c4.F90 \ ++generated/_exp_c8.F90 \ ++generated/_exp_c10.F90 \ ++generated/_exp_c16.F90 \ ++generated/_log_r4.F90 \ ++generated/_log_r8.F90 \ ++generated/_log_r10.F90 \ ++generated/_log_r16.F90 \ ++generated/_log_c4.F90 \ ++generated/_log_c8.F90 \ ++generated/_log_c10.F90 \ ++generated/_log_c16.F90 \ ++generated/_log10_r4.F90 \ ++generated/_log10_r8.F90 \ ++generated/_log10_r10.F90 \ ++generated/_log10_r16.F90 \ ++generated/_sqrt_r4.F90 \ ++generated/_sqrt_r8.F90 \ ++generated/_sqrt_r10.F90 \ ++generated/_sqrt_r16.F90 \ ++generated/_sqrt_c4.F90 \ ++generated/_sqrt_c8.F90 \ ++generated/_sqrt_c10.F90 \ ++generated/_sqrt_c16.F90 \ ++generated/_asin_r4.F90 \ ++generated/_asin_r8.F90 \ ++generated/_asin_r10.F90 \ ++generated/_asin_r16.F90 \ ++generated/_asinh_r4.F90 \ ++generated/_asinh_r8.F90 \ ++generated/_asinh_r10.F90 \ ++generated/_asinh_r16.F90 \ ++generated/_acos_r4.F90 \ ++generated/_acos_r8.F90 \ ++generated/_acos_r10.F90 \ ++generated/_acos_r16.F90 \ ++generated/_acosh_r4.F90 \ ++generated/_acosh_r8.F90 \ ++generated/_acosh_r10.F90 \ ++generated/_acosh_r16.F90 \ ++generated/_atan_r4.F90 \ ++generated/_atan_r8.F90 \ ++generated/_atan_r10.F90 \ ++generated/_atan_r16.F90 \ ++generated/_atanh_r4.F90 \ ++generated/_atanh_r8.F90 \ ++generated/_atanh_r10.F90 \ ++generated/_atanh_r16.F90 \ ++generated/_sin_r4.F90 \ ++generated/_sin_r8.F90 \ ++generated/_sin_r10.F90 \ ++generated/_sin_r16.F90 \ ++generated/_sin_c4.F90 \ ++generated/_sin_c8.F90 \ ++generated/_sin_c10.F90 \ ++generated/_sin_c16.F90 \ ++generated/_cos_r4.F90 \ ++generated/_cos_r8.F90 \ ++generated/_cos_r10.F90 \ ++generated/_cos_r16.F90 \ ++generated/_cos_c4.F90 \ ++generated/_cos_c8.F90 \ ++generated/_cos_c10.F90 \ ++generated/_cos_c16.F90 \ ++generated/_tan_r4.F90 \ ++generated/_tan_r8.F90 \ ++generated/_tan_r10.F90 \ ++generated/_tan_r16.F90 \ ++generated/_sinh_r4.F90 \ ++generated/_sinh_r8.F90 \ ++generated/_sinh_r10.F90 \ ++generated/_sinh_r16.F90 \ ++generated/_cosh_r4.F90 \ ++generated/_cosh_r8.F90 \ ++generated/_cosh_r10.F90 \ ++generated/_cosh_r16.F90 \ ++generated/_tanh_r4.F90 \ ++generated/_tanh_r8.F90 \ ++generated/_tanh_r10.F90 \ ++generated/_tanh_r16.F90 \ ++generated/_conjg_c4.F90 \ ++generated/_conjg_c8.F90 \ ++generated/_conjg_c10.F90 \ ++generated/_conjg_c16.F90 \ ++generated/_aint_r4.F90 \ ++generated/_aint_r8.F90 \ ++generated/_aint_r10.F90 \ ++generated/_aint_r16.F90 \ ++generated/_anint_r4.F90 \ ++generated/_anint_r8.F90 \ ++generated/_anint_r10.F90 \ ++generated/_anint_r16.F90 + + gfor_built_specific2_src = \ +-$(srcdir)/generated/_sign_i4.F90 \ +-$(srcdir)/generated/_sign_i8.F90 \ +-$(srcdir)/generated/_sign_i16.F90 \ +-$(srcdir)/generated/_sign_r4.F90 \ +-$(srcdir)/generated/_sign_r8.F90 \ +-$(srcdir)/generated/_sign_r10.F90 \ +-$(srcdir)/generated/_sign_r16.F90 \ +-$(srcdir)/generated/_dim_i4.F90 \ +-$(srcdir)/generated/_dim_i8.F90 \ +-$(srcdir)/generated/_dim_i16.F90 \ +-$(srcdir)/generated/_dim_r4.F90 \ +-$(srcdir)/generated/_dim_r8.F90 \ +-$(srcdir)/generated/_dim_r10.F90 \ +-$(srcdir)/generated/_dim_r16.F90 \ +-$(srcdir)/generated/_atan2_r4.F90 \ +-$(srcdir)/generated/_atan2_r8.F90 \ +-$(srcdir)/generated/_atan2_r10.F90 \ +-$(srcdir)/generated/_atan2_r16.F90 \ +-$(srcdir)/generated/_mod_i4.F90 \ +-$(srcdir)/generated/_mod_i8.F90 \ +-$(srcdir)/generated/_mod_i16.F90 \ +-$(srcdir)/generated/_mod_r4.F90 \ +-$(srcdir)/generated/_mod_r8.F90 \ +-$(srcdir)/generated/_mod_r10.F90 \ +-$(srcdir)/generated/_mod_r16.F90 +- +-gfor_misc_specifics = $(srcdir)/generated/misc_specifics.F90 ++generated/_sign_i4.F90 \ ++generated/_sign_i8.F90 \ ++generated/_sign_i16.F90 \ ++generated/_sign_r4.F90 \ ++generated/_sign_r8.F90 \ ++generated/_sign_r10.F90 \ ++generated/_sign_r16.F90 \ ++generated/_dim_i4.F90 \ ++generated/_dim_i8.F90 \ ++generated/_dim_i16.F90 \ ++generated/_dim_r4.F90 \ ++generated/_dim_r8.F90 \ ++generated/_dim_r10.F90 \ ++generated/_dim_r16.F90 \ ++generated/_atan2_r4.F90 \ ++generated/_atan2_r8.F90 \ ++generated/_atan2_r10.F90 \ ++generated/_atan2_r16.F90 \ ++generated/_mod_i4.F90 \ ++generated/_mod_i8.F90 \ ++generated/_mod_i16.F90 \ ++generated/_mod_r4.F90 \ ++generated/_mod_r8.F90 \ ++generated/_mod_r10.F90 \ ++generated/_mod_r16.F90 ++ ++gfor_misc_specifics = generated/misc_specifics.F90 + gfor_specific_src = \ + $(gfor_built_specific_src) \ + $(gfor_built_specific2_src) \ +@@ -1540,7 +1710,7 @@ intrinsics/random_init.f90 + + BUILT_SOURCES = $(gfor_built_src) $(gfor_built_specific_src) \ + $(gfor_built_specific2_src) $(gfor_misc_specifics) \ +- $(am__append_7) ++ $(am__append_8) + prereq_SRC = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \ + $(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src) + +@@ -1702,584 +1872,2032 @@ clean-toolexeclibLTLIBRARIES: + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } ++caf/$(am__dirstamp): ++ @$(MKDIR_P) caf ++ @: > caf/$(am__dirstamp) ++caf/$(DEPDIR)/$(am__dirstamp): ++ @$(MKDIR_P) caf/$(DEPDIR) ++ @: > caf/$(DEPDIR)/$(am__dirstamp) ++caf/single.lo: caf/$(am__dirstamp) caf/$(DEPDIR)/$(am__dirstamp) + + libcaf_single.la: $(libcaf_single_la_OBJECTS) $(libcaf_single_la_DEPENDENCIES) $(EXTRA_libcaf_single_la_DEPENDENCIES) + $(AM_V_GEN)$(libcaf_single_la_LINK) -rpath $(cafexeclibdir) $(libcaf_single_la_OBJECTS) $(libcaf_single_la_LIBADD) $(LIBS) ++runtime/$(am__dirstamp): ++ @$(MKDIR_P) runtime ++ @: > runtime/$(am__dirstamp) ++runtime/$(DEPDIR)/$(am__dirstamp): ++ @$(MKDIR_P) runtime/$(DEPDIR) ++ @: > runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/bounds.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/compile_options.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/memory.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/string.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/select.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/minimal.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/backtrace.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/convert_char.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/environ.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/error.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/fpu.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/main.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/pause.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/stop.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++generated/$(am__dirstamp): ++ @$(MKDIR_P) generated ++ @: > generated/$(am__dirstamp) ++generated/$(DEPDIR)/$(am__dirstamp): ++ @$(MKDIR_P) generated/$(DEPDIR) ++ @: > generated/$(DEPDIR)/$(am__dirstamp) ++generated/all_l1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/all_l2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/all_l4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/all_l8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/all_l16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/any_l1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/any_l2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/any_l4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/any_l8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/any_l16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/count_1_l.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/count_2_l.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/count_4_l.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/count_8_l.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/count_16_l.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/product_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/sum_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/bessel_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/bessel_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/bessel_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/bessel_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iall_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iall_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iall_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iall_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iall_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iany_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iany_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iany_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iany_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iany_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iparity_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iparity_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iparity_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iparity_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/iparity_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/norm2_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/norm2_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/norm2_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/norm2_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/parity_l1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/parity_l2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/parity_l4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/parity_l8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/parity_l16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_l4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_l8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmul_l16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/shape_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/shape_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/shape_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/shape_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/shape_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/eoshift1_4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/eoshift1_8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/eoshift1_16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/eoshift3_4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/eoshift3_8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/eoshift3_16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/reshape_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_pack_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/in_unpack_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c10_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r10_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c10_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_i16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r10_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_r16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c10_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pow_c16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/pack_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/unpack_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/matmulavx128_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/spread_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift0_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_4_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_8_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/cshift1_16_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_4_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_8_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc0_16_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_4_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_8_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc0_16_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_4_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_8_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc1_16_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_4_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_8_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc1_16_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc2_4_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc2_4_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc2_8_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc2_8_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc2_16_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxloc2_16_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc2_4_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc2_4_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc2_8_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc2_8_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc2_16_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minloc2_16_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval0_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval0_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval0_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval0_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval1_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/maxval1_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval1_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/minval1_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc0_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_i1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_i2.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc1_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc2_s1.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/findloc2_s4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++runtime/ISO_Fortran_binding.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++io/$(am__dirstamp): ++ @$(MKDIR_P) io ++ @: > io/$(am__dirstamp) ++io/$(DEPDIR)/$(am__dirstamp): ++ @$(MKDIR_P) io/$(DEPDIR) ++ @: > io/$(DEPDIR)/$(am__dirstamp) ++io/size_from_kind.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/close.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/file_pos.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/format.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/inquire.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/intrinsics.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/list_read.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/lock.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/open.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/read.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/transfer.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/transfer128.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/unit.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/unix.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/write.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/fbuf.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++io/async.lo: io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp) ++intrinsics/$(am__dirstamp): ++ @$(MKDIR_P) intrinsics ++ @: > intrinsics/$(am__dirstamp) ++intrinsics/$(DEPDIR)/$(am__dirstamp): ++ @$(MKDIR_P) intrinsics/$(DEPDIR) ++ @: > intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/associated.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/abort.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/args.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/cshift0.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/eoshift0.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/eoshift2.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/erfc_scaled.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/extends_type_of.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/fnum.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/ierrno.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/ishftc.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/is_contiguous.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/mvbits.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/move_alloc.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/pack_generic.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/selected_char_kind.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/size.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/spread_generic.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/string_intrinsics.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/rand.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/random.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/reshape_generic.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/reshape_packed.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/selected_int_kind.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/selected_real_kind.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/trigd.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/unpack_generic.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++runtime/in_pack_generic.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/in_unpack_generic.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) ++intrinsics/access.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/c99_functions.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/chdir.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/chmod.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/clock.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/cpu_time.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/ctime.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/date_and_time.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/dtime.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/env.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/etime.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/execute_command_line.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/exit.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/gerror.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/getcwd.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/getlog.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/getXid.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/hostnm.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/kill.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/link.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/perror.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/signal.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/sleep.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/system.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/rename.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/stat.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/symlnk.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/system_clock.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/time.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/umask.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/unlink.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++ieee/$(am__dirstamp): ++ @$(MKDIR_P) ieee ++ @: > ieee/$(am__dirstamp) ++ieee/$(DEPDIR)/$(am__dirstamp): ++ @$(MKDIR_P) ieee/$(DEPDIR) ++ @: > ieee/$(DEPDIR)/$(am__dirstamp) ++ieee/ieee_helper.lo: ieee/$(am__dirstamp) \ ++ ieee/$(DEPDIR)/$(am__dirstamp) ++ieee/ieee_arithmetic.lo: ieee/$(am__dirstamp) \ ++ ieee/$(DEPDIR)/$(am__dirstamp) ++ieee/ieee_exceptions.lo: ieee/$(am__dirstamp) \ ++ ieee/$(DEPDIR)/$(am__dirstamp) ++ieee/ieee_features.lo: ieee/$(am__dirstamp) \ ++ ieee/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_abs_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aimag_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aimag_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aimag_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aimag_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_exp_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log10_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log10_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log10_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_log10_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sqrt_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asin_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asin_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asin_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asin_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asinh_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asinh_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asinh_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_asinh_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acos_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acos_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acos_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acos_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acosh_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acosh_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acosh_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_acosh_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atanh_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atanh_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atanh_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atanh_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sin_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cos_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tan_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tan_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tan_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tan_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sinh_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sinh_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sinh_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sinh_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cosh_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cosh_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cosh_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_cosh_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tanh_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tanh_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tanh_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_tanh_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_conjg_c4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_conjg_c8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_conjg_c10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_conjg_c16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aint_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aint_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aint_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_aint_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_anint_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_anint_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_anint_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_anint_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_sign_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_dim_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan2_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan2_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan2_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_atan2_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_i4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_i8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_i16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_r4.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_r8.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_r10.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/_mod_r16.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++generated/misc_specifics.lo: generated/$(am__dirstamp) \ ++ generated/$(DEPDIR)/$(am__dirstamp) ++intrinsics/dprod_r8.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/f2c_specifics.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) ++intrinsics/random_init.lo: intrinsics/$(am__dirstamp) \ ++ intrinsics/$(DEPDIR)/$(am__dirstamp) + + libgfortran.la: $(libgfortran_la_OBJECTS) $(libgfortran_la_DEPENDENCIES) $(EXTRA_libgfortran_la_DEPENDENCIES) + $(AM_V_GEN)$(libgfortran_la_LINK) -rpath $(toolexeclibdir) $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) ++ -rm -f caf/*.$(OBJEXT) ++ -rm -f caf/*.lo ++ -rm -f generated/*.$(OBJEXT) ++ -rm -f generated/*.lo ++ -rm -f ieee/*.$(OBJEXT) ++ -rm -f ieee/*.lo ++ -rm -f intrinsics/*.$(OBJEXT) ++ -rm -f intrinsics/*.lo ++ -rm -f io/*.$(OBJEXT) ++ -rm -f io/*.lo ++ -rm -f runtime/*.$(OBJEXT) ++ -rm -f runtime/*.lo + + distclean-compile: + -rm -f *.tab.c + +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ISO_Fortran_binding.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abort.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/all_l1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/all_l16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/all_l2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/all_l4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/all_l8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_l1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_l16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_l2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_l4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_l8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/args.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/associated.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/async.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bounds.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c99_functions.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_options.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert_char.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count_16_l.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count_1_l.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count_2_l.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count_4_l.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count_8_l.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu_time.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift0_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_16_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_4_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshift1_8_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctime.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/date_and_time.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtime.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environ.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift0.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift1_16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift1_4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift1_8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift3_16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift3_4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eoshift3_8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erfc_scaled.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etime.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute_command_line.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exit.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extends_type_of.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbuf.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_pos.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc1_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc2_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc2_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnum.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gerror.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getXid.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlog.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostnm.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iall_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iall_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iall_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iall_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iall_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iany_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iany_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iany_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iany_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iany_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee_helper.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ierrno.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_generic.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_pack_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_generic.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in_unpack_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inquire.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intrinsics.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iparity_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iparity_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iparity_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iparity_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iparity_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/is_contiguous.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ishftc.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgfortran_c.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_read.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_l16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_l4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_l8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmul_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matmulavx128_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_16_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_4_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc0_8_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_16_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_4_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc1_8_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc2_16_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc2_16_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc2_4_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc2_4_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc2_8_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxloc2_8_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval0_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval0_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval1_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval1_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minimal.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_16_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_4_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc0_8_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_16_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_4_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc1_8_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc2_16_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc2_16_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc2_4_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc2_4_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc2_8_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minloc2_8_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval0_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval0_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval1_s1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval1_s4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_alloc.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvbits.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_generic.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parity_l1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parity_l16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parity_l2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parity_l4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parity_l8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c10_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c10_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c10_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_c8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i4_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i8_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_i8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r10_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r10_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r16_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r16_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r16_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r4_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r4_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r8_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_r8_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/product_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rand.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_generic.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_packed.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reshape_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selected_char_kind.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/size.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/size_from_kind.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_generic.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spread_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stop.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string_intrinsics.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlnk.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system_clock.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transfer.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transfer128.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trigd.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_c10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_c16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_c4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_c8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_generic.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_i1.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_i16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_i2.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_i4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_i8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_r10.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_r16.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_r4.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unpack_r8.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@caf/$(DEPDIR)/single.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/all_l1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/all_l16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/all_l2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/all_l4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/all_l8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/any_l1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/any_l16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/any_l2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/any_l4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/any_l8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/bessel_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/bessel_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/bessel_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/bessel_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/count_16_l.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/count_1_l.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/count_2_l.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/count_4_l.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/count_8_l.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift0_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_16_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_4_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/cshift1_8_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/eoshift1_16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/eoshift1_4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/eoshift1_8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/eoshift3_16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/eoshift3_4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/eoshift3_8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc0_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc1_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc2_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/findloc2_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iall_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iall_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iall_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iall_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iall_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iany_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iany_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iany_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iany_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iany_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_pack_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/in_unpack_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iparity_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iparity_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iparity_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iparity_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/iparity_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_l16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_l4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_l8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmul_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/matmulavx128_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_16_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_4_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc0_8_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_16_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_4_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc1_8_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc2_16_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc2_16_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc2_4_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc2_4_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc2_8_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxloc2_8_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval0_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval0_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval1_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval1_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/maxval_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_16_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_4_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc0_8_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_16_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_4_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc1_8_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc2_16_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc2_16_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc2_4_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc2_4_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc2_8_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minloc2_8_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval0_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval0_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval1_s1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval1_s4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/minval_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/norm2_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/norm2_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/norm2_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/norm2_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pack_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/parity_l1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/parity_l16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/parity_l2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/parity_l4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/parity_l8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c10_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c10_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c10_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_c8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i4_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i8_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_i8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r10_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r10_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r16_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r16_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r16_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r4_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r4_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r8_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/pow_r8_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/product_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/reshape_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/shape_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/shape_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/shape_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/shape_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/shape_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/spread_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/sum_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_c10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_c16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_c4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_c8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_i1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_i16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_i2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_i4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_i8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_r10.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_r16.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_r4.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@generated/$(DEPDIR)/unpack_r8.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@ieee/$(DEPDIR)/ieee_helper.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/abort.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/access.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/args.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/associated.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/c99_functions.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/chdir.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/chmod.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/clock.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/cpu_time.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/cshift0.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/ctime.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/date_and_time.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/dtime.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/env.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/eoshift0.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/eoshift2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/erfc_scaled.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/etime.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/execute_command_line.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/exit.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/extends_type_of.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/fnum.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/gerror.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/getXid.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/getcwd.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/getlog.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/hostnm.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/ierrno.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/is_contiguous.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/ishftc.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/kill.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/link.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/move_alloc.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/mvbits.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/pack_generic.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/perror.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/rand.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/random.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/rename.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/reshape_generic.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/reshape_packed.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/selected_char_kind.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/signal.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/size.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/sleep.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/spread_generic.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/stat.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/string_intrinsics.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/symlnk.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/system.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/system_clock.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/time.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/trigd.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/umask.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/unlink.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/unpack_generic.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/async.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/close.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/fbuf.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/file_pos.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/format.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/inquire.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/intrinsics.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/list_read.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/lock.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/open.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/read.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/size_from_kind.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/transfer.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/transfer128.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unit.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unix.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/write.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/ISO_Fortran_binding.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/backtrace.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/bounds.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/compile_options.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/convert_char.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/environ.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/error.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/fpu.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/in_pack_generic.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/in_unpack_generic.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/main.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/memory.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/minimal.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/pause.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/select.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/stop.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/string.Plo@am__quote@ + + .F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< +@@ -2290,4689 +3908,330 @@ distclean-compile: + .F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + +-ieee_exceptions.lo: ieee/ieee_exceptions.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o ieee_exceptions.lo `test -f 'ieee/ieee_exceptions.F90' || echo '$(srcdir)/'`ieee/ieee_exceptions.F90 +- +-ieee_features.lo: ieee/ieee_features.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o ieee_features.lo `test -f 'ieee/ieee_features.F90' || echo '$(srcdir)/'`ieee/ieee_features.F90 +- +-_abs_c4.lo: $(srcdir)/generated/_abs_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_c4.lo `test -f '$(srcdir)/generated/_abs_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_c4.F90 +- +-_abs_c8.lo: $(srcdir)/generated/_abs_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_c8.lo `test -f '$(srcdir)/generated/_abs_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_c8.F90 +- +-_abs_c10.lo: $(srcdir)/generated/_abs_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_c10.lo `test -f '$(srcdir)/generated/_abs_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_c10.F90 +- +-_abs_c16.lo: $(srcdir)/generated/_abs_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_c16.lo `test -f '$(srcdir)/generated/_abs_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_c16.F90 +- +-_abs_i4.lo: $(srcdir)/generated/_abs_i4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_i4.lo `test -f '$(srcdir)/generated/_abs_i4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_i4.F90 +- +-_abs_i8.lo: $(srcdir)/generated/_abs_i8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_i8.lo `test -f '$(srcdir)/generated/_abs_i8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_i8.F90 +- +-_abs_i16.lo: $(srcdir)/generated/_abs_i16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_i16.lo `test -f '$(srcdir)/generated/_abs_i16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_i16.F90 ++.c.o: ++@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ ++@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +-_abs_r4.lo: $(srcdir)/generated/_abs_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_r4.lo `test -f '$(srcdir)/generated/_abs_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_r4.F90 ++.c.obj: ++@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ ++@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +-_abs_r8.lo: $(srcdir)/generated/_abs_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_r8.lo `test -f '$(srcdir)/generated/_abs_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_r8.F90 ++.c.lo: ++@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ ++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ ++@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +-_abs_r10.lo: $(srcdir)/generated/_abs_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_r10.lo `test -f '$(srcdir)/generated/_abs_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_r10.F90 ++.f90.o: ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $< + +-_abs_r16.lo: $(srcdir)/generated/_abs_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _abs_r16.lo `test -f '$(srcdir)/generated/_abs_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_abs_r16.F90 ++.f90.obj: ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +-_aimag_c4.lo: $(srcdir)/generated/_aimag_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aimag_c4.lo `test -f '$(srcdir)/generated/_aimag_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aimag_c4.F90 ++.f90.lo: ++ $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $< + +-_aimag_c8.lo: $(srcdir)/generated/_aimag_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aimag_c8.lo `test -f '$(srcdir)/generated/_aimag_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aimag_c8.F90 ++mostlyclean-libtool: ++ -rm -f *.lo + +-_aimag_c10.lo: $(srcdir)/generated/_aimag_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aimag_c10.lo `test -f '$(srcdir)/generated/_aimag_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aimag_c10.F90 ++clean-libtool: ++ -rm -rf .libs _libs ++ -rm -rf caf/.libs caf/_libs ++ -rm -rf generated/.libs generated/_libs ++ -rm -rf ieee/.libs ieee/_libs ++ -rm -rf intrinsics/.libs intrinsics/_libs ++ -rm -rf io/.libs io/_libs ++ -rm -rf runtime/.libs runtime/_libs + +-_aimag_c16.lo: $(srcdir)/generated/_aimag_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aimag_c16.lo `test -f '$(srcdir)/generated/_aimag_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aimag_c16.F90 ++distclean-libtool: ++ -rm -f libtool config.lt ++install-toolexeclibDATA: $(toolexeclib_DATA) ++ @$(NORMAL_INSTALL) ++ @list='$(toolexeclib_DATA)'; test -n "$(toolexeclibdir)" || list=; \ ++ if test -n "$$list"; then \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ ++ fi; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; \ ++ done | $(am__base_list) | \ ++ while read files; do \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(toolexeclibdir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(toolexeclibdir)" || exit $$?; \ ++ done + +-_exp_r4.lo: $(srcdir)/generated/_exp_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_r4.lo `test -f '$(srcdir)/generated/_exp_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_r4.F90 ++uninstall-toolexeclibDATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(toolexeclib_DATA)'; test -n "$(toolexeclibdir)" || list=; \ ++ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ dir='$(DESTDIR)$(toolexeclibdir)'; $(am__uninstall_files_from_dir) ++install-gfor_cHEADERS: $(gfor_c_HEADERS) ++ @$(NORMAL_INSTALL) ++ @list='$(gfor_c_HEADERS)'; test -n "$(gfor_cdir)" || list=; \ ++ if test -n "$$list"; then \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(gfor_cdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(gfor_cdir)" || exit 1; \ ++ fi; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; \ ++ done | $(am__base_list) | \ ++ while read files; do \ ++ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gfor_cdir)'"; \ ++ $(INSTALL_HEADER) $$files "$(DESTDIR)$(gfor_cdir)" || exit $$?; \ ++ done + +-_exp_r8.lo: $(srcdir)/generated/_exp_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_r8.lo `test -f '$(srcdir)/generated/_exp_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_r8.F90 ++uninstall-gfor_cHEADERS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(gfor_c_HEADERS)'; test -n "$(gfor_cdir)" || list=; \ ++ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ dir='$(DESTDIR)$(gfor_cdir)'; $(am__uninstall_files_from_dir) ++install-nodist_fincludeHEADERS: $(nodist_finclude_HEADERS) ++ @$(NORMAL_INSTALL) ++ @list='$(nodist_finclude_HEADERS)'; test -n "$(fincludedir)" || list=; \ ++ if test -n "$$list"; then \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(fincludedir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(fincludedir)" || exit 1; \ ++ fi; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; \ ++ done | $(am__base_list) | \ ++ while read files; do \ ++ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(fincludedir)'"; \ ++ $(INSTALL_HEADER) $$files "$(DESTDIR)$(fincludedir)" || exit $$?; \ ++ done + +-_exp_r10.lo: $(srcdir)/generated/_exp_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_r10.lo `test -f '$(srcdir)/generated/_exp_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_r10.F90 ++uninstall-nodist_fincludeHEADERS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(nodist_finclude_HEADERS)'; test -n "$(fincludedir)" || list=; \ ++ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ dir='$(DESTDIR)$(fincludedir)'; $(am__uninstall_files_from_dir) + +-_exp_r16.lo: $(srcdir)/generated/_exp_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_r16.lo `test -f '$(srcdir)/generated/_exp_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_r16.F90 ++ID: $(am__tagged_files) ++ $(am__define_uniq_tagged_files); mkid -fID $$unique ++tags: tags-am ++TAGS: tags + +-_exp_c4.lo: $(srcdir)/generated/_exp_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_c4.lo `test -f '$(srcdir)/generated/_exp_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_c4.F90 ++tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) ++ set x; \ ++ here=`pwd`; \ ++ $(am__define_uniq_tagged_files); \ ++ shift; \ ++ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ if test $$# -gt 0; then \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ "$$@" $$unique; \ ++ else \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$unique; \ ++ fi; \ ++ fi ++ctags: ctags-am + +-_exp_c8.lo: $(srcdir)/generated/_exp_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_c8.lo `test -f '$(srcdir)/generated/_exp_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_c8.F90 ++CTAGS: ctags ++ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) ++ $(am__define_uniq_tagged_files); \ ++ test -z "$(CTAGS_ARGS)$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$unique + +-_exp_c10.lo: $(srcdir)/generated/_exp_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_c10.lo `test -f '$(srcdir)/generated/_exp_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_c10.F90 ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && $(am__cd) $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) "$$here" ++cscope: cscope.files ++ test ! -s cscope.files \ ++ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) ++clean-cscope: ++ -rm -f cscope.files ++cscope.files: clean-cscope cscopelist ++cscopelist: cscopelist-am + +-_exp_c16.lo: $(srcdir)/generated/_exp_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _exp_c16.lo `test -f '$(srcdir)/generated/_exp_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_exp_c16.F90 ++cscopelist-am: $(am__tagged_files) ++ list='$(am__tagged_files)'; \ ++ case "$(srcdir)" in \ ++ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ ++ *) sdir=$(subdir)/$(srcdir) ;; \ ++ esac; \ ++ for i in $$list; do \ ++ if test -f "$$i"; then \ ++ echo "$(subdir)/$$i"; \ ++ else \ ++ echo "$$sdir/$$i"; \ ++ fi; \ ++ done >> $(top_builddir)/cscope.files + +-_log_r4.lo: $(srcdir)/generated/_log_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_r4.lo `test -f '$(srcdir)/generated/_log_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_r4.F90 ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files ++check-am: all-am ++check: $(BUILT_SOURCES) ++ $(MAKE) $(AM_MAKEFLAGS) check-am ++all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h all-local ++installdirs: ++ for dir in "$(DESTDIR)$(cafexeclibdir)" "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(gfor_cdir)" "$(DESTDIR)$(fincludedir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done ++install: $(BUILT_SOURCES) ++ $(MAKE) $(AM_MAKEFLAGS) install-am ++install-exec: install-exec-am ++install-data: install-data-am ++uninstall: uninstall-am + +-_log_r8.lo: $(srcdir)/generated/_log_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_r8.lo `test -f '$(srcdir)/generated/_log_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_r8.F90 ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +-_log_r10.lo: $(srcdir)/generated/_log_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_r10.lo `test -f '$(srcdir)/generated/_log_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_r10.F90 ++installcheck: installcheck-am ++install-strip: ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi ++mostlyclean-generic: + +-_log_r16.lo: $(srcdir)/generated/_log_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_r16.lo `test -f '$(srcdir)/generated/_log_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_r16.F90 ++clean-generic: + +-_log_c4.lo: $(srcdir)/generated/_log_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_c4.lo `test -f '$(srcdir)/generated/_log_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_c4.F90 ++distclean-generic: ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) ++ -rm -f caf/$(DEPDIR)/$(am__dirstamp) ++ -rm -f caf/$(am__dirstamp) ++ -rm -f generated/$(DEPDIR)/$(am__dirstamp) ++ -rm -f generated/$(am__dirstamp) ++ -rm -f ieee/$(DEPDIR)/$(am__dirstamp) ++ -rm -f ieee/$(am__dirstamp) ++ -rm -f intrinsics/$(DEPDIR)/$(am__dirstamp) ++ -rm -f intrinsics/$(am__dirstamp) ++ -rm -f io/$(DEPDIR)/$(am__dirstamp) ++ -rm -f io/$(am__dirstamp) ++ -rm -f runtime/$(DEPDIR)/$(am__dirstamp) ++ -rm -f runtime/$(am__dirstamp) + +-_log_c8.lo: $(srcdir)/generated/_log_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_c8.lo `test -f '$(srcdir)/generated/_log_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_c8.F90 ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) ++clean: clean-am + +-_log_c10.lo: $(srcdir)/generated/_log_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_c10.lo `test -f '$(srcdir)/generated/_log_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_c10.F90 ++clean-am: clean-cafexeclibLTLIBRARIES clean-generic clean-libtool \ ++ clean-local clean-toolexeclibLTLIBRARIES mostlyclean-am + +-_log_c16.lo: $(srcdir)/generated/_log_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log_c16.lo `test -f '$(srcdir)/generated/_log_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log_c16.F90 ++distclean: distclean-am ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf ./$(DEPDIR) caf/$(DEPDIR) generated/$(DEPDIR) ieee/$(DEPDIR) intrinsics/$(DEPDIR) io/$(DEPDIR) runtime/$(DEPDIR) ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-hdr distclean-libtool distclean-local distclean-tags + +-_log10_r4.lo: $(srcdir)/generated/_log10_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log10_r4.lo `test -f '$(srcdir)/generated/_log10_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log10_r4.F90 ++dvi: dvi-am + +-_log10_r8.lo: $(srcdir)/generated/_log10_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log10_r8.lo `test -f '$(srcdir)/generated/_log10_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log10_r8.F90 ++dvi-am: + +-_log10_r10.lo: $(srcdir)/generated/_log10_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log10_r10.lo `test -f '$(srcdir)/generated/_log10_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log10_r10.F90 ++html: html-am + +-_log10_r16.lo: $(srcdir)/generated/_log10_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _log10_r16.lo `test -f '$(srcdir)/generated/_log10_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_log10_r16.F90 ++html-am: + +-_sqrt_r4.lo: $(srcdir)/generated/_sqrt_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_r4.lo `test -f '$(srcdir)/generated/_sqrt_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_r4.F90 ++info: info-am + +-_sqrt_r8.lo: $(srcdir)/generated/_sqrt_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_r8.lo `test -f '$(srcdir)/generated/_sqrt_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_r8.F90 ++info-am: + +-_sqrt_r10.lo: $(srcdir)/generated/_sqrt_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_r10.lo `test -f '$(srcdir)/generated/_sqrt_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_r10.F90 ++install-data-am: install-gfor_cHEADERS install-nodist_fincludeHEADERS + +-_sqrt_r16.lo: $(srcdir)/generated/_sqrt_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_r16.lo `test -f '$(srcdir)/generated/_sqrt_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_r16.F90 ++install-dvi: install-dvi-am + +-_sqrt_c4.lo: $(srcdir)/generated/_sqrt_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_c4.lo `test -f '$(srcdir)/generated/_sqrt_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_c4.F90 ++install-dvi-am: + +-_sqrt_c8.lo: $(srcdir)/generated/_sqrt_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_c8.lo `test -f '$(srcdir)/generated/_sqrt_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_c8.F90 ++install-exec-am: install-cafexeclibLTLIBRARIES install-exec-local \ ++ install-toolexeclibDATA install-toolexeclibLTLIBRARIES + +-_sqrt_c10.lo: $(srcdir)/generated/_sqrt_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_c10.lo `test -f '$(srcdir)/generated/_sqrt_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_c10.F90 ++install-html: install-html-am + +-_sqrt_c16.lo: $(srcdir)/generated/_sqrt_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sqrt_c16.lo `test -f '$(srcdir)/generated/_sqrt_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sqrt_c16.F90 ++install-html-am: + +-_asin_r4.lo: $(srcdir)/generated/_asin_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asin_r4.lo `test -f '$(srcdir)/generated/_asin_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asin_r4.F90 ++install-info: install-info-am + +-_asin_r8.lo: $(srcdir)/generated/_asin_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asin_r8.lo `test -f '$(srcdir)/generated/_asin_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asin_r8.F90 ++install-info-am: + +-_asin_r10.lo: $(srcdir)/generated/_asin_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asin_r10.lo `test -f '$(srcdir)/generated/_asin_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asin_r10.F90 ++install-man: + +-_asin_r16.lo: $(srcdir)/generated/_asin_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asin_r16.lo `test -f '$(srcdir)/generated/_asin_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asin_r16.F90 ++install-pdf: install-pdf-am + +-_asinh_r4.lo: $(srcdir)/generated/_asinh_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asinh_r4.lo `test -f '$(srcdir)/generated/_asinh_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asinh_r4.F90 ++install-pdf-am: + +-_asinh_r8.lo: $(srcdir)/generated/_asinh_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asinh_r8.lo `test -f '$(srcdir)/generated/_asinh_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asinh_r8.F90 ++install-ps: install-ps-am + +-_asinh_r10.lo: $(srcdir)/generated/_asinh_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asinh_r10.lo `test -f '$(srcdir)/generated/_asinh_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asinh_r10.F90 ++install-ps-am: + +-_asinh_r16.lo: $(srcdir)/generated/_asinh_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _asinh_r16.lo `test -f '$(srcdir)/generated/_asinh_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_asinh_r16.F90 ++installcheck-am: + +-_acos_r4.lo: $(srcdir)/generated/_acos_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acos_r4.lo `test -f '$(srcdir)/generated/_acos_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acos_r4.F90 ++maintainer-clean: maintainer-clean-am ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -rf ./$(DEPDIR) caf/$(DEPDIR) generated/$(DEPDIR) ieee/$(DEPDIR) intrinsics/$(DEPDIR) io/$(DEPDIR) runtime/$(DEPDIR) ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic \ ++ maintainer-clean-local + +-_acos_r8.lo: $(srcdir)/generated/_acos_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acos_r8.lo `test -f '$(srcdir)/generated/_acos_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acos_r8.F90 ++mostlyclean: mostlyclean-am + +-_acos_r10.lo: $(srcdir)/generated/_acos_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acos_r10.lo `test -f '$(srcdir)/generated/_acos_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acos_r10.F90 ++mostlyclean-am: mostlyclean-compile mostlyclean-generic \ ++ mostlyclean-libtool mostlyclean-local + +-_acos_r16.lo: $(srcdir)/generated/_acos_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acos_r16.lo `test -f '$(srcdir)/generated/_acos_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acos_r16.F90 ++pdf: pdf-am + +-_acosh_r4.lo: $(srcdir)/generated/_acosh_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acosh_r4.lo `test -f '$(srcdir)/generated/_acosh_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acosh_r4.F90 ++pdf-am: + +-_acosh_r8.lo: $(srcdir)/generated/_acosh_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acosh_r8.lo `test -f '$(srcdir)/generated/_acosh_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acosh_r8.F90 ++ps: ps-am + +-_acosh_r10.lo: $(srcdir)/generated/_acosh_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acosh_r10.lo `test -f '$(srcdir)/generated/_acosh_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acosh_r10.F90 ++ps-am: + +-_acosh_r16.lo: $(srcdir)/generated/_acosh_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _acosh_r16.lo `test -f '$(srcdir)/generated/_acosh_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_acosh_r16.F90 ++uninstall-am: uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ ++ uninstall-nodist_fincludeHEADERS uninstall-toolexeclibDATA \ ++ uninstall-toolexeclibLTLIBRARIES + +-_atan_r4.lo: $(srcdir)/generated/_atan_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan_r4.lo `test -f '$(srcdir)/generated/_atan_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan_r4.F90 ++.MAKE: all check install install-am install-strip + +-_atan_r8.lo: $(srcdir)/generated/_atan_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan_r8.lo `test -f '$(srcdir)/generated/_atan_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan_r8.F90 ++.PHONY: CTAGS GTAGS TAGS all all-am all-local am--refresh check \ ++ check-am clean clean-cafexeclibLTLIBRARIES clean-cscope \ ++ clean-generic clean-libtool clean-local \ ++ clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \ ++ ctags-am distclean distclean-compile distclean-generic \ ++ distclean-hdr distclean-libtool distclean-local distclean-tags \ ++ dvi dvi-am html html-am info info-am install install-am \ ++ install-cafexeclibLTLIBRARIES install-data install-data-am \ ++ install-dvi install-dvi-am install-exec install-exec-am \ ++ install-exec-local install-gfor_cHEADERS install-html \ ++ install-html-am install-info install-info-am install-man \ ++ install-nodist_fincludeHEADERS install-pdf install-pdf-am \ ++ install-ps install-ps-am install-strip install-toolexeclibDATA \ ++ install-toolexeclibLTLIBRARIES installcheck installcheck-am \ ++ installdirs maintainer-clean maintainer-clean-generic \ ++ maintainer-clean-local mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ ++ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ ++ uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ ++ uninstall-nodist_fincludeHEADERS uninstall-toolexeclibDATA \ ++ uninstall-toolexeclibLTLIBRARIES + +-_atan_r10.lo: $(srcdir)/generated/_atan_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan_r10.lo `test -f '$(srcdir)/generated/_atan_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan_r10.F90 +- +-_atan_r16.lo: $(srcdir)/generated/_atan_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan_r16.lo `test -f '$(srcdir)/generated/_atan_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan_r16.F90 +- +-_atanh_r4.lo: $(srcdir)/generated/_atanh_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atanh_r4.lo `test -f '$(srcdir)/generated/_atanh_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atanh_r4.F90 +- +-_atanh_r8.lo: $(srcdir)/generated/_atanh_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atanh_r8.lo `test -f '$(srcdir)/generated/_atanh_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atanh_r8.F90 +- +-_atanh_r10.lo: $(srcdir)/generated/_atanh_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atanh_r10.lo `test -f '$(srcdir)/generated/_atanh_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atanh_r10.F90 +- +-_atanh_r16.lo: $(srcdir)/generated/_atanh_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atanh_r16.lo `test -f '$(srcdir)/generated/_atanh_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atanh_r16.F90 +- +-_sin_r4.lo: $(srcdir)/generated/_sin_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_r4.lo `test -f '$(srcdir)/generated/_sin_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_r4.F90 +- +-_sin_r8.lo: $(srcdir)/generated/_sin_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_r8.lo `test -f '$(srcdir)/generated/_sin_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_r8.F90 +- +-_sin_r10.lo: $(srcdir)/generated/_sin_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_r10.lo `test -f '$(srcdir)/generated/_sin_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_r10.F90 +- +-_sin_r16.lo: $(srcdir)/generated/_sin_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_r16.lo `test -f '$(srcdir)/generated/_sin_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_r16.F90 +- +-_sin_c4.lo: $(srcdir)/generated/_sin_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_c4.lo `test -f '$(srcdir)/generated/_sin_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_c4.F90 +- +-_sin_c8.lo: $(srcdir)/generated/_sin_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_c8.lo `test -f '$(srcdir)/generated/_sin_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_c8.F90 +- +-_sin_c10.lo: $(srcdir)/generated/_sin_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_c10.lo `test -f '$(srcdir)/generated/_sin_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_c10.F90 +- +-_sin_c16.lo: $(srcdir)/generated/_sin_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sin_c16.lo `test -f '$(srcdir)/generated/_sin_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sin_c16.F90 +- +-_cos_r4.lo: $(srcdir)/generated/_cos_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_r4.lo `test -f '$(srcdir)/generated/_cos_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_r4.F90 +- +-_cos_r8.lo: $(srcdir)/generated/_cos_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_r8.lo `test -f '$(srcdir)/generated/_cos_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_r8.F90 +- +-_cos_r10.lo: $(srcdir)/generated/_cos_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_r10.lo `test -f '$(srcdir)/generated/_cos_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_r10.F90 +- +-_cos_r16.lo: $(srcdir)/generated/_cos_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_r16.lo `test -f '$(srcdir)/generated/_cos_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_r16.F90 +- +-_cos_c4.lo: $(srcdir)/generated/_cos_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_c4.lo `test -f '$(srcdir)/generated/_cos_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_c4.F90 +- +-_cos_c8.lo: $(srcdir)/generated/_cos_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_c8.lo `test -f '$(srcdir)/generated/_cos_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_c8.F90 +- +-_cos_c10.lo: $(srcdir)/generated/_cos_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_c10.lo `test -f '$(srcdir)/generated/_cos_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_c10.F90 +- +-_cos_c16.lo: $(srcdir)/generated/_cos_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cos_c16.lo `test -f '$(srcdir)/generated/_cos_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cos_c16.F90 +- +-_tan_r4.lo: $(srcdir)/generated/_tan_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tan_r4.lo `test -f '$(srcdir)/generated/_tan_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tan_r4.F90 +- +-_tan_r8.lo: $(srcdir)/generated/_tan_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tan_r8.lo `test -f '$(srcdir)/generated/_tan_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tan_r8.F90 +- +-_tan_r10.lo: $(srcdir)/generated/_tan_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tan_r10.lo `test -f '$(srcdir)/generated/_tan_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tan_r10.F90 +- +-_tan_r16.lo: $(srcdir)/generated/_tan_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tan_r16.lo `test -f '$(srcdir)/generated/_tan_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tan_r16.F90 +- +-_sinh_r4.lo: $(srcdir)/generated/_sinh_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sinh_r4.lo `test -f '$(srcdir)/generated/_sinh_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sinh_r4.F90 +- +-_sinh_r8.lo: $(srcdir)/generated/_sinh_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sinh_r8.lo `test -f '$(srcdir)/generated/_sinh_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sinh_r8.F90 +- +-_sinh_r10.lo: $(srcdir)/generated/_sinh_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sinh_r10.lo `test -f '$(srcdir)/generated/_sinh_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sinh_r10.F90 +- +-_sinh_r16.lo: $(srcdir)/generated/_sinh_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sinh_r16.lo `test -f '$(srcdir)/generated/_sinh_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sinh_r16.F90 +- +-_cosh_r4.lo: $(srcdir)/generated/_cosh_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cosh_r4.lo `test -f '$(srcdir)/generated/_cosh_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cosh_r4.F90 +- +-_cosh_r8.lo: $(srcdir)/generated/_cosh_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cosh_r8.lo `test -f '$(srcdir)/generated/_cosh_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cosh_r8.F90 +- +-_cosh_r10.lo: $(srcdir)/generated/_cosh_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cosh_r10.lo `test -f '$(srcdir)/generated/_cosh_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cosh_r10.F90 +- +-_cosh_r16.lo: $(srcdir)/generated/_cosh_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _cosh_r16.lo `test -f '$(srcdir)/generated/_cosh_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_cosh_r16.F90 +- +-_tanh_r4.lo: $(srcdir)/generated/_tanh_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tanh_r4.lo `test -f '$(srcdir)/generated/_tanh_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tanh_r4.F90 +- +-_tanh_r8.lo: $(srcdir)/generated/_tanh_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tanh_r8.lo `test -f '$(srcdir)/generated/_tanh_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tanh_r8.F90 +- +-_tanh_r10.lo: $(srcdir)/generated/_tanh_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tanh_r10.lo `test -f '$(srcdir)/generated/_tanh_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tanh_r10.F90 +- +-_tanh_r16.lo: $(srcdir)/generated/_tanh_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _tanh_r16.lo `test -f '$(srcdir)/generated/_tanh_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_tanh_r16.F90 +- +-_conjg_c4.lo: $(srcdir)/generated/_conjg_c4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _conjg_c4.lo `test -f '$(srcdir)/generated/_conjg_c4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_conjg_c4.F90 +- +-_conjg_c8.lo: $(srcdir)/generated/_conjg_c8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _conjg_c8.lo `test -f '$(srcdir)/generated/_conjg_c8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_conjg_c8.F90 +- +-_conjg_c10.lo: $(srcdir)/generated/_conjg_c10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _conjg_c10.lo `test -f '$(srcdir)/generated/_conjg_c10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_conjg_c10.F90 +- +-_conjg_c16.lo: $(srcdir)/generated/_conjg_c16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _conjg_c16.lo `test -f '$(srcdir)/generated/_conjg_c16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_conjg_c16.F90 +- +-_aint_r4.lo: $(srcdir)/generated/_aint_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aint_r4.lo `test -f '$(srcdir)/generated/_aint_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aint_r4.F90 +- +-_aint_r8.lo: $(srcdir)/generated/_aint_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aint_r8.lo `test -f '$(srcdir)/generated/_aint_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aint_r8.F90 +- +-_aint_r10.lo: $(srcdir)/generated/_aint_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aint_r10.lo `test -f '$(srcdir)/generated/_aint_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aint_r10.F90 +- +-_aint_r16.lo: $(srcdir)/generated/_aint_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _aint_r16.lo `test -f '$(srcdir)/generated/_aint_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_aint_r16.F90 +- +-_anint_r4.lo: $(srcdir)/generated/_anint_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _anint_r4.lo `test -f '$(srcdir)/generated/_anint_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_anint_r4.F90 +- +-_anint_r8.lo: $(srcdir)/generated/_anint_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _anint_r8.lo `test -f '$(srcdir)/generated/_anint_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_anint_r8.F90 +- +-_anint_r10.lo: $(srcdir)/generated/_anint_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _anint_r10.lo `test -f '$(srcdir)/generated/_anint_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_anint_r10.F90 +- +-_anint_r16.lo: $(srcdir)/generated/_anint_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _anint_r16.lo `test -f '$(srcdir)/generated/_anint_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_anint_r16.F90 +- +-_sign_i4.lo: $(srcdir)/generated/_sign_i4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_i4.lo `test -f '$(srcdir)/generated/_sign_i4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_i4.F90 +- +-_sign_i8.lo: $(srcdir)/generated/_sign_i8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_i8.lo `test -f '$(srcdir)/generated/_sign_i8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_i8.F90 +- +-_sign_i16.lo: $(srcdir)/generated/_sign_i16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_i16.lo `test -f '$(srcdir)/generated/_sign_i16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_i16.F90 +- +-_sign_r4.lo: $(srcdir)/generated/_sign_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_r4.lo `test -f '$(srcdir)/generated/_sign_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_r4.F90 +- +-_sign_r8.lo: $(srcdir)/generated/_sign_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_r8.lo `test -f '$(srcdir)/generated/_sign_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_r8.F90 +- +-_sign_r10.lo: $(srcdir)/generated/_sign_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_r10.lo `test -f '$(srcdir)/generated/_sign_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_r10.F90 +- +-_sign_r16.lo: $(srcdir)/generated/_sign_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _sign_r16.lo `test -f '$(srcdir)/generated/_sign_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_sign_r16.F90 +- +-_dim_i4.lo: $(srcdir)/generated/_dim_i4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_i4.lo `test -f '$(srcdir)/generated/_dim_i4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_i4.F90 +- +-_dim_i8.lo: $(srcdir)/generated/_dim_i8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_i8.lo `test -f '$(srcdir)/generated/_dim_i8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_i8.F90 +- +-_dim_i16.lo: $(srcdir)/generated/_dim_i16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_i16.lo `test -f '$(srcdir)/generated/_dim_i16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_i16.F90 +- +-_dim_r4.lo: $(srcdir)/generated/_dim_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_r4.lo `test -f '$(srcdir)/generated/_dim_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_r4.F90 +- +-_dim_r8.lo: $(srcdir)/generated/_dim_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_r8.lo `test -f '$(srcdir)/generated/_dim_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_r8.F90 +- +-_dim_r10.lo: $(srcdir)/generated/_dim_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_r10.lo `test -f '$(srcdir)/generated/_dim_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_r10.F90 +- +-_dim_r16.lo: $(srcdir)/generated/_dim_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _dim_r16.lo `test -f '$(srcdir)/generated/_dim_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_dim_r16.F90 +- +-_atan2_r4.lo: $(srcdir)/generated/_atan2_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan2_r4.lo `test -f '$(srcdir)/generated/_atan2_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan2_r4.F90 +- +-_atan2_r8.lo: $(srcdir)/generated/_atan2_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan2_r8.lo `test -f '$(srcdir)/generated/_atan2_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan2_r8.F90 +- +-_atan2_r10.lo: $(srcdir)/generated/_atan2_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan2_r10.lo `test -f '$(srcdir)/generated/_atan2_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan2_r10.F90 +- +-_atan2_r16.lo: $(srcdir)/generated/_atan2_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _atan2_r16.lo `test -f '$(srcdir)/generated/_atan2_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_atan2_r16.F90 +- +-_mod_i4.lo: $(srcdir)/generated/_mod_i4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_i4.lo `test -f '$(srcdir)/generated/_mod_i4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_i4.F90 +- +-_mod_i8.lo: $(srcdir)/generated/_mod_i8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_i8.lo `test -f '$(srcdir)/generated/_mod_i8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_i8.F90 +- +-_mod_i16.lo: $(srcdir)/generated/_mod_i16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_i16.lo `test -f '$(srcdir)/generated/_mod_i16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_i16.F90 +- +-_mod_r4.lo: $(srcdir)/generated/_mod_r4.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_r4.lo `test -f '$(srcdir)/generated/_mod_r4.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_r4.F90 +- +-_mod_r8.lo: $(srcdir)/generated/_mod_r8.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_r8.lo `test -f '$(srcdir)/generated/_mod_r8.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_r8.F90 +- +-_mod_r10.lo: $(srcdir)/generated/_mod_r10.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_r10.lo `test -f '$(srcdir)/generated/_mod_r10.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_r10.F90 +- +-_mod_r16.lo: $(srcdir)/generated/_mod_r16.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o _mod_r16.lo `test -f '$(srcdir)/generated/_mod_r16.F90' || echo '$(srcdir)/'`$(srcdir)/generated/_mod_r16.F90 +- +-misc_specifics.lo: $(srcdir)/generated/misc_specifics.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o misc_specifics.lo `test -f '$(srcdir)/generated/misc_specifics.F90' || echo '$(srcdir)/'`$(srcdir)/generated/misc_specifics.F90 +- +-f2c_specifics.lo: intrinsics/f2c_specifics.F90 +- $(AM_V_PPFC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o f2c_specifics.lo `test -f 'intrinsics/f2c_specifics.F90' || echo '$(srcdir)/'`intrinsics/f2c_specifics.F90 +- +-.c.o: +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +- +-.c.obj: +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +- +-.c.lo: +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +- +-single.lo: caf/single.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT single.lo -MD -MP -MF $(DEPDIR)/single.Tpo -c -o single.lo `test -f 'caf/single.c' || echo '$(srcdir)/'`caf/single.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/single.Tpo $(DEPDIR)/single.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='caf/single.c' object='single.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o single.lo `test -f 'caf/single.c' || echo '$(srcdir)/'`caf/single.c +- +-bounds.lo: runtime/bounds.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bounds.lo -MD -MP -MF $(DEPDIR)/bounds.Tpo -c -o bounds.lo `test -f 'runtime/bounds.c' || echo '$(srcdir)/'`runtime/bounds.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bounds.Tpo $(DEPDIR)/bounds.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/bounds.c' object='bounds.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bounds.lo `test -f 'runtime/bounds.c' || echo '$(srcdir)/'`runtime/bounds.c +- +-compile_options.lo: runtime/compile_options.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compile_options.lo -MD -MP -MF $(DEPDIR)/compile_options.Tpo -c -o compile_options.lo `test -f 'runtime/compile_options.c' || echo '$(srcdir)/'`runtime/compile_options.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/compile_options.Tpo $(DEPDIR)/compile_options.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/compile_options.c' object='compile_options.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compile_options.lo `test -f 'runtime/compile_options.c' || echo '$(srcdir)/'`runtime/compile_options.c +- +-memory.lo: runtime/memory.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f 'runtime/memory.c' || echo '$(srcdir)/'`runtime/memory.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f 'runtime/memory.c' || echo '$(srcdir)/'`runtime/memory.c +- +-string.lo: runtime/string.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT string.lo -MD -MP -MF $(DEPDIR)/string.Tpo -c -o string.lo `test -f 'runtime/string.c' || echo '$(srcdir)/'`runtime/string.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/string.Tpo $(DEPDIR)/string.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/string.c' object='string.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o string.lo `test -f 'runtime/string.c' || echo '$(srcdir)/'`runtime/string.c +- +-select.lo: runtime/select.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT select.lo -MD -MP -MF $(DEPDIR)/select.Tpo -c -o select.lo `test -f 'runtime/select.c' || echo '$(srcdir)/'`runtime/select.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/select.Tpo $(DEPDIR)/select.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/select.c' object='select.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o select.lo `test -f 'runtime/select.c' || echo '$(srcdir)/'`runtime/select.c +- +-minimal.lo: runtime/minimal.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minimal.lo -MD -MP -MF $(DEPDIR)/minimal.Tpo -c -o minimal.lo `test -f 'runtime/minimal.c' || echo '$(srcdir)/'`runtime/minimal.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minimal.Tpo $(DEPDIR)/minimal.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/minimal.c' object='minimal.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minimal.lo `test -f 'runtime/minimal.c' || echo '$(srcdir)/'`runtime/minimal.c +- +-backtrace.lo: runtime/backtrace.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace.lo -MD -MP -MF $(DEPDIR)/backtrace.Tpo -c -o backtrace.lo `test -f 'runtime/backtrace.c' || echo '$(srcdir)/'`runtime/backtrace.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace.Tpo $(DEPDIR)/backtrace.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/backtrace.c' object='backtrace.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace.lo `test -f 'runtime/backtrace.c' || echo '$(srcdir)/'`runtime/backtrace.c +- +-convert_char.lo: runtime/convert_char.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT convert_char.lo -MD -MP -MF $(DEPDIR)/convert_char.Tpo -c -o convert_char.lo `test -f 'runtime/convert_char.c' || echo '$(srcdir)/'`runtime/convert_char.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/convert_char.Tpo $(DEPDIR)/convert_char.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/convert_char.c' object='convert_char.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o convert_char.lo `test -f 'runtime/convert_char.c' || echo '$(srcdir)/'`runtime/convert_char.c +- +-environ.lo: runtime/environ.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT environ.lo -MD -MP -MF $(DEPDIR)/environ.Tpo -c -o environ.lo `test -f 'runtime/environ.c' || echo '$(srcdir)/'`runtime/environ.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/environ.Tpo $(DEPDIR)/environ.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/environ.c' object='environ.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o environ.lo `test -f 'runtime/environ.c' || echo '$(srcdir)/'`runtime/environ.c +- +-error.lo: runtime/error.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f 'runtime/error.c' || echo '$(srcdir)/'`runtime/error.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f 'runtime/error.c' || echo '$(srcdir)/'`runtime/error.c +- +-fpu.lo: runtime/fpu.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fpu.lo -MD -MP -MF $(DEPDIR)/fpu.Tpo -c -o fpu.lo `test -f 'runtime/fpu.c' || echo '$(srcdir)/'`runtime/fpu.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fpu.Tpo $(DEPDIR)/fpu.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/fpu.c' object='fpu.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fpu.lo `test -f 'runtime/fpu.c' || echo '$(srcdir)/'`runtime/fpu.c +- +-main.lo: runtime/main.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.lo -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.lo `test -f 'runtime/main.c' || echo '$(srcdir)/'`runtime/main.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main.Tpo $(DEPDIR)/main.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/main.c' object='main.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.lo `test -f 'runtime/main.c' || echo '$(srcdir)/'`runtime/main.c +- +-pause.lo: runtime/pause.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pause.lo -MD -MP -MF $(DEPDIR)/pause.Tpo -c -o pause.lo `test -f 'runtime/pause.c' || echo '$(srcdir)/'`runtime/pause.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pause.Tpo $(DEPDIR)/pause.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/pause.c' object='pause.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pause.lo `test -f 'runtime/pause.c' || echo '$(srcdir)/'`runtime/pause.c +- +-stop.lo: runtime/stop.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stop.lo -MD -MP -MF $(DEPDIR)/stop.Tpo -c -o stop.lo `test -f 'runtime/stop.c' || echo '$(srcdir)/'`runtime/stop.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stop.Tpo $(DEPDIR)/stop.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/stop.c' object='stop.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stop.lo `test -f 'runtime/stop.c' || echo '$(srcdir)/'`runtime/stop.c +- +-all_l1.lo: $(srcdir)/generated/all_l1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT all_l1.lo -MD -MP -MF $(DEPDIR)/all_l1.Tpo -c -o all_l1.lo `test -f '$(srcdir)/generated/all_l1.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/all_l1.Tpo $(DEPDIR)/all_l1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/all_l1.c' object='all_l1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o all_l1.lo `test -f '$(srcdir)/generated/all_l1.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l1.c +- +-all_l2.lo: $(srcdir)/generated/all_l2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT all_l2.lo -MD -MP -MF $(DEPDIR)/all_l2.Tpo -c -o all_l2.lo `test -f '$(srcdir)/generated/all_l2.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/all_l2.Tpo $(DEPDIR)/all_l2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/all_l2.c' object='all_l2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o all_l2.lo `test -f '$(srcdir)/generated/all_l2.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l2.c +- +-all_l4.lo: $(srcdir)/generated/all_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT all_l4.lo -MD -MP -MF $(DEPDIR)/all_l4.Tpo -c -o all_l4.lo `test -f '$(srcdir)/generated/all_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/all_l4.Tpo $(DEPDIR)/all_l4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/all_l4.c' object='all_l4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o all_l4.lo `test -f '$(srcdir)/generated/all_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l4.c +- +-all_l8.lo: $(srcdir)/generated/all_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT all_l8.lo -MD -MP -MF $(DEPDIR)/all_l8.Tpo -c -o all_l8.lo `test -f '$(srcdir)/generated/all_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/all_l8.Tpo $(DEPDIR)/all_l8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/all_l8.c' object='all_l8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o all_l8.lo `test -f '$(srcdir)/generated/all_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l8.c +- +-all_l16.lo: $(srcdir)/generated/all_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT all_l16.lo -MD -MP -MF $(DEPDIR)/all_l16.Tpo -c -o all_l16.lo `test -f '$(srcdir)/generated/all_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/all_l16.Tpo $(DEPDIR)/all_l16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/all_l16.c' object='all_l16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o all_l16.lo `test -f '$(srcdir)/generated/all_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/all_l16.c +- +-any_l1.lo: $(srcdir)/generated/any_l1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT any_l1.lo -MD -MP -MF $(DEPDIR)/any_l1.Tpo -c -o any_l1.lo `test -f '$(srcdir)/generated/any_l1.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/any_l1.Tpo $(DEPDIR)/any_l1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/any_l1.c' object='any_l1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o any_l1.lo `test -f '$(srcdir)/generated/any_l1.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l1.c +- +-any_l2.lo: $(srcdir)/generated/any_l2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT any_l2.lo -MD -MP -MF $(DEPDIR)/any_l2.Tpo -c -o any_l2.lo `test -f '$(srcdir)/generated/any_l2.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/any_l2.Tpo $(DEPDIR)/any_l2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/any_l2.c' object='any_l2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o any_l2.lo `test -f '$(srcdir)/generated/any_l2.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l2.c +- +-any_l4.lo: $(srcdir)/generated/any_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT any_l4.lo -MD -MP -MF $(DEPDIR)/any_l4.Tpo -c -o any_l4.lo `test -f '$(srcdir)/generated/any_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/any_l4.Tpo $(DEPDIR)/any_l4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/any_l4.c' object='any_l4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o any_l4.lo `test -f '$(srcdir)/generated/any_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l4.c +- +-any_l8.lo: $(srcdir)/generated/any_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT any_l8.lo -MD -MP -MF $(DEPDIR)/any_l8.Tpo -c -o any_l8.lo `test -f '$(srcdir)/generated/any_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/any_l8.Tpo $(DEPDIR)/any_l8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/any_l8.c' object='any_l8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o any_l8.lo `test -f '$(srcdir)/generated/any_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l8.c +- +-any_l16.lo: $(srcdir)/generated/any_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT any_l16.lo -MD -MP -MF $(DEPDIR)/any_l16.Tpo -c -o any_l16.lo `test -f '$(srcdir)/generated/any_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/any_l16.Tpo $(DEPDIR)/any_l16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/any_l16.c' object='any_l16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o any_l16.lo `test -f '$(srcdir)/generated/any_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/any_l16.c +- +-count_1_l.lo: $(srcdir)/generated/count_1_l.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT count_1_l.lo -MD -MP -MF $(DEPDIR)/count_1_l.Tpo -c -o count_1_l.lo `test -f '$(srcdir)/generated/count_1_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_1_l.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/count_1_l.Tpo $(DEPDIR)/count_1_l.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/count_1_l.c' object='count_1_l.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o count_1_l.lo `test -f '$(srcdir)/generated/count_1_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_1_l.c +- +-count_2_l.lo: $(srcdir)/generated/count_2_l.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT count_2_l.lo -MD -MP -MF $(DEPDIR)/count_2_l.Tpo -c -o count_2_l.lo `test -f '$(srcdir)/generated/count_2_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_2_l.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/count_2_l.Tpo $(DEPDIR)/count_2_l.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/count_2_l.c' object='count_2_l.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o count_2_l.lo `test -f '$(srcdir)/generated/count_2_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_2_l.c +- +-count_4_l.lo: $(srcdir)/generated/count_4_l.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT count_4_l.lo -MD -MP -MF $(DEPDIR)/count_4_l.Tpo -c -o count_4_l.lo `test -f '$(srcdir)/generated/count_4_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_4_l.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/count_4_l.Tpo $(DEPDIR)/count_4_l.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/count_4_l.c' object='count_4_l.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o count_4_l.lo `test -f '$(srcdir)/generated/count_4_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_4_l.c +- +-count_8_l.lo: $(srcdir)/generated/count_8_l.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT count_8_l.lo -MD -MP -MF $(DEPDIR)/count_8_l.Tpo -c -o count_8_l.lo `test -f '$(srcdir)/generated/count_8_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_8_l.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/count_8_l.Tpo $(DEPDIR)/count_8_l.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/count_8_l.c' object='count_8_l.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o count_8_l.lo `test -f '$(srcdir)/generated/count_8_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_8_l.c +- +-count_16_l.lo: $(srcdir)/generated/count_16_l.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT count_16_l.lo -MD -MP -MF $(DEPDIR)/count_16_l.Tpo -c -o count_16_l.lo `test -f '$(srcdir)/generated/count_16_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_16_l.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/count_16_l.Tpo $(DEPDIR)/count_16_l.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/count_16_l.c' object='count_16_l.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o count_16_l.lo `test -f '$(srcdir)/generated/count_16_l.c' || echo '$(srcdir)/'`$(srcdir)/generated/count_16_l.c +- +-maxloc0_4_i1.lo: $(srcdir)/generated/maxloc0_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_i1.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_i1.Tpo -c -o maxloc0_4_i1.lo `test -f '$(srcdir)/generated/maxloc0_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_i1.Tpo $(DEPDIR)/maxloc0_4_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_i1.c' object='maxloc0_4_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_i1.lo `test -f '$(srcdir)/generated/maxloc0_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i1.c +- +-maxloc0_8_i1.lo: $(srcdir)/generated/maxloc0_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_i1.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_i1.Tpo -c -o maxloc0_8_i1.lo `test -f '$(srcdir)/generated/maxloc0_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_i1.Tpo $(DEPDIR)/maxloc0_8_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_i1.c' object='maxloc0_8_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_i1.lo `test -f '$(srcdir)/generated/maxloc0_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i1.c +- +-maxloc0_16_i1.lo: $(srcdir)/generated/maxloc0_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_i1.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_i1.Tpo -c -o maxloc0_16_i1.lo `test -f '$(srcdir)/generated/maxloc0_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_i1.Tpo $(DEPDIR)/maxloc0_16_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_i1.c' object='maxloc0_16_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_i1.lo `test -f '$(srcdir)/generated/maxloc0_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i1.c +- +-maxloc0_4_i2.lo: $(srcdir)/generated/maxloc0_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_i2.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_i2.Tpo -c -o maxloc0_4_i2.lo `test -f '$(srcdir)/generated/maxloc0_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_i2.Tpo $(DEPDIR)/maxloc0_4_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_i2.c' object='maxloc0_4_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_i2.lo `test -f '$(srcdir)/generated/maxloc0_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i2.c +- +-maxloc0_8_i2.lo: $(srcdir)/generated/maxloc0_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_i2.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_i2.Tpo -c -o maxloc0_8_i2.lo `test -f '$(srcdir)/generated/maxloc0_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_i2.Tpo $(DEPDIR)/maxloc0_8_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_i2.c' object='maxloc0_8_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_i2.lo `test -f '$(srcdir)/generated/maxloc0_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i2.c +- +-maxloc0_16_i2.lo: $(srcdir)/generated/maxloc0_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_i2.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_i2.Tpo -c -o maxloc0_16_i2.lo `test -f '$(srcdir)/generated/maxloc0_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_i2.Tpo $(DEPDIR)/maxloc0_16_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_i2.c' object='maxloc0_16_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_i2.lo `test -f '$(srcdir)/generated/maxloc0_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i2.c +- +-maxloc0_4_i4.lo: $(srcdir)/generated/maxloc0_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_i4.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_i4.Tpo -c -o maxloc0_4_i4.lo `test -f '$(srcdir)/generated/maxloc0_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_i4.Tpo $(DEPDIR)/maxloc0_4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_i4.c' object='maxloc0_4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_i4.lo `test -f '$(srcdir)/generated/maxloc0_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i4.c +- +-maxloc0_8_i4.lo: $(srcdir)/generated/maxloc0_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_i4.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_i4.Tpo -c -o maxloc0_8_i4.lo `test -f '$(srcdir)/generated/maxloc0_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_i4.Tpo $(DEPDIR)/maxloc0_8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_i4.c' object='maxloc0_8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_i4.lo `test -f '$(srcdir)/generated/maxloc0_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i4.c +- +-maxloc0_16_i4.lo: $(srcdir)/generated/maxloc0_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_i4.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_i4.Tpo -c -o maxloc0_16_i4.lo `test -f '$(srcdir)/generated/maxloc0_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_i4.Tpo $(DEPDIR)/maxloc0_16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_i4.c' object='maxloc0_16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_i4.lo `test -f '$(srcdir)/generated/maxloc0_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i4.c +- +-maxloc0_4_i8.lo: $(srcdir)/generated/maxloc0_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_i8.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_i8.Tpo -c -o maxloc0_4_i8.lo `test -f '$(srcdir)/generated/maxloc0_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_i8.Tpo $(DEPDIR)/maxloc0_4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_i8.c' object='maxloc0_4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_i8.lo `test -f '$(srcdir)/generated/maxloc0_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i8.c +- +-maxloc0_8_i8.lo: $(srcdir)/generated/maxloc0_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_i8.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_i8.Tpo -c -o maxloc0_8_i8.lo `test -f '$(srcdir)/generated/maxloc0_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_i8.Tpo $(DEPDIR)/maxloc0_8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_i8.c' object='maxloc0_8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_i8.lo `test -f '$(srcdir)/generated/maxloc0_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i8.c +- +-maxloc0_16_i8.lo: $(srcdir)/generated/maxloc0_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_i8.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_i8.Tpo -c -o maxloc0_16_i8.lo `test -f '$(srcdir)/generated/maxloc0_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_i8.Tpo $(DEPDIR)/maxloc0_16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_i8.c' object='maxloc0_16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_i8.lo `test -f '$(srcdir)/generated/maxloc0_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i8.c +- +-maxloc0_4_i16.lo: $(srcdir)/generated/maxloc0_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_i16.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_i16.Tpo -c -o maxloc0_4_i16.lo `test -f '$(srcdir)/generated/maxloc0_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_i16.Tpo $(DEPDIR)/maxloc0_4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_i16.c' object='maxloc0_4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_i16.lo `test -f '$(srcdir)/generated/maxloc0_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_i16.c +- +-maxloc0_8_i16.lo: $(srcdir)/generated/maxloc0_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_i16.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_i16.Tpo -c -o maxloc0_8_i16.lo `test -f '$(srcdir)/generated/maxloc0_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_i16.Tpo $(DEPDIR)/maxloc0_8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_i16.c' object='maxloc0_8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_i16.lo `test -f '$(srcdir)/generated/maxloc0_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_i16.c +- +-maxloc0_16_i16.lo: $(srcdir)/generated/maxloc0_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_i16.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_i16.Tpo -c -o maxloc0_16_i16.lo `test -f '$(srcdir)/generated/maxloc0_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_i16.Tpo $(DEPDIR)/maxloc0_16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_i16.c' object='maxloc0_16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_i16.lo `test -f '$(srcdir)/generated/maxloc0_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_i16.c +- +-maxloc0_4_r4.lo: $(srcdir)/generated/maxloc0_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_r4.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_r4.Tpo -c -o maxloc0_4_r4.lo `test -f '$(srcdir)/generated/maxloc0_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_r4.Tpo $(DEPDIR)/maxloc0_4_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_r4.c' object='maxloc0_4_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_r4.lo `test -f '$(srcdir)/generated/maxloc0_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r4.c +- +-maxloc0_8_r4.lo: $(srcdir)/generated/maxloc0_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_r4.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_r4.Tpo -c -o maxloc0_8_r4.lo `test -f '$(srcdir)/generated/maxloc0_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_r4.Tpo $(DEPDIR)/maxloc0_8_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_r4.c' object='maxloc0_8_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_r4.lo `test -f '$(srcdir)/generated/maxloc0_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r4.c +- +-maxloc0_16_r4.lo: $(srcdir)/generated/maxloc0_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_r4.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_r4.Tpo -c -o maxloc0_16_r4.lo `test -f '$(srcdir)/generated/maxloc0_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_r4.Tpo $(DEPDIR)/maxloc0_16_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_r4.c' object='maxloc0_16_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_r4.lo `test -f '$(srcdir)/generated/maxloc0_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r4.c +- +-maxloc0_4_r8.lo: $(srcdir)/generated/maxloc0_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_r8.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_r8.Tpo -c -o maxloc0_4_r8.lo `test -f '$(srcdir)/generated/maxloc0_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_r8.Tpo $(DEPDIR)/maxloc0_4_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_r8.c' object='maxloc0_4_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_r8.lo `test -f '$(srcdir)/generated/maxloc0_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r8.c +- +-maxloc0_8_r8.lo: $(srcdir)/generated/maxloc0_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_r8.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_r8.Tpo -c -o maxloc0_8_r8.lo `test -f '$(srcdir)/generated/maxloc0_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_r8.Tpo $(DEPDIR)/maxloc0_8_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_r8.c' object='maxloc0_8_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_r8.lo `test -f '$(srcdir)/generated/maxloc0_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r8.c +- +-maxloc0_16_r8.lo: $(srcdir)/generated/maxloc0_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_r8.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_r8.Tpo -c -o maxloc0_16_r8.lo `test -f '$(srcdir)/generated/maxloc0_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_r8.Tpo $(DEPDIR)/maxloc0_16_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_r8.c' object='maxloc0_16_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_r8.lo `test -f '$(srcdir)/generated/maxloc0_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r8.c +- +-maxloc0_4_r10.lo: $(srcdir)/generated/maxloc0_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_r10.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_r10.Tpo -c -o maxloc0_4_r10.lo `test -f '$(srcdir)/generated/maxloc0_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_r10.Tpo $(DEPDIR)/maxloc0_4_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_r10.c' object='maxloc0_4_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_r10.lo `test -f '$(srcdir)/generated/maxloc0_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r10.c +- +-maxloc0_8_r10.lo: $(srcdir)/generated/maxloc0_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_r10.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_r10.Tpo -c -o maxloc0_8_r10.lo `test -f '$(srcdir)/generated/maxloc0_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_r10.Tpo $(DEPDIR)/maxloc0_8_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_r10.c' object='maxloc0_8_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_r10.lo `test -f '$(srcdir)/generated/maxloc0_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r10.c +- +-maxloc0_16_r10.lo: $(srcdir)/generated/maxloc0_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_r10.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_r10.Tpo -c -o maxloc0_16_r10.lo `test -f '$(srcdir)/generated/maxloc0_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_r10.Tpo $(DEPDIR)/maxloc0_16_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_r10.c' object='maxloc0_16_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_r10.lo `test -f '$(srcdir)/generated/maxloc0_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r10.c +- +-maxloc0_4_r16.lo: $(srcdir)/generated/maxloc0_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_r16.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_r16.Tpo -c -o maxloc0_4_r16.lo `test -f '$(srcdir)/generated/maxloc0_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_r16.Tpo $(DEPDIR)/maxloc0_4_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_r16.c' object='maxloc0_4_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_r16.lo `test -f '$(srcdir)/generated/maxloc0_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_r16.c +- +-maxloc0_8_r16.lo: $(srcdir)/generated/maxloc0_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_r16.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_r16.Tpo -c -o maxloc0_8_r16.lo `test -f '$(srcdir)/generated/maxloc0_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_r16.Tpo $(DEPDIR)/maxloc0_8_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_r16.c' object='maxloc0_8_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_r16.lo `test -f '$(srcdir)/generated/maxloc0_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_r16.c +- +-maxloc0_16_r16.lo: $(srcdir)/generated/maxloc0_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_r16.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_r16.Tpo -c -o maxloc0_16_r16.lo `test -f '$(srcdir)/generated/maxloc0_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_r16.Tpo $(DEPDIR)/maxloc0_16_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_r16.c' object='maxloc0_16_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_r16.lo `test -f '$(srcdir)/generated/maxloc0_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_r16.c +- +-maxloc1_4_i1.lo: $(srcdir)/generated/maxloc1_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_i1.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_i1.Tpo -c -o maxloc1_4_i1.lo `test -f '$(srcdir)/generated/maxloc1_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_i1.Tpo $(DEPDIR)/maxloc1_4_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_i1.c' object='maxloc1_4_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_i1.lo `test -f '$(srcdir)/generated/maxloc1_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i1.c +- +-maxloc1_8_i1.lo: $(srcdir)/generated/maxloc1_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_i1.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_i1.Tpo -c -o maxloc1_8_i1.lo `test -f '$(srcdir)/generated/maxloc1_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_i1.Tpo $(DEPDIR)/maxloc1_8_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_i1.c' object='maxloc1_8_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_i1.lo `test -f '$(srcdir)/generated/maxloc1_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i1.c +- +-maxloc1_16_i1.lo: $(srcdir)/generated/maxloc1_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_i1.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_i1.Tpo -c -o maxloc1_16_i1.lo `test -f '$(srcdir)/generated/maxloc1_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_i1.Tpo $(DEPDIR)/maxloc1_16_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_i1.c' object='maxloc1_16_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_i1.lo `test -f '$(srcdir)/generated/maxloc1_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i1.c +- +-maxloc1_4_i2.lo: $(srcdir)/generated/maxloc1_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_i2.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_i2.Tpo -c -o maxloc1_4_i2.lo `test -f '$(srcdir)/generated/maxloc1_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_i2.Tpo $(DEPDIR)/maxloc1_4_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_i2.c' object='maxloc1_4_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_i2.lo `test -f '$(srcdir)/generated/maxloc1_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i2.c +- +-maxloc1_8_i2.lo: $(srcdir)/generated/maxloc1_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_i2.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_i2.Tpo -c -o maxloc1_8_i2.lo `test -f '$(srcdir)/generated/maxloc1_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_i2.Tpo $(DEPDIR)/maxloc1_8_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_i2.c' object='maxloc1_8_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_i2.lo `test -f '$(srcdir)/generated/maxloc1_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i2.c +- +-maxloc1_16_i2.lo: $(srcdir)/generated/maxloc1_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_i2.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_i2.Tpo -c -o maxloc1_16_i2.lo `test -f '$(srcdir)/generated/maxloc1_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_i2.Tpo $(DEPDIR)/maxloc1_16_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_i2.c' object='maxloc1_16_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_i2.lo `test -f '$(srcdir)/generated/maxloc1_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i2.c +- +-maxloc1_4_i4.lo: $(srcdir)/generated/maxloc1_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_i4.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_i4.Tpo -c -o maxloc1_4_i4.lo `test -f '$(srcdir)/generated/maxloc1_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_i4.Tpo $(DEPDIR)/maxloc1_4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_i4.c' object='maxloc1_4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_i4.lo `test -f '$(srcdir)/generated/maxloc1_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i4.c +- +-maxloc1_8_i4.lo: $(srcdir)/generated/maxloc1_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_i4.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_i4.Tpo -c -o maxloc1_8_i4.lo `test -f '$(srcdir)/generated/maxloc1_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_i4.Tpo $(DEPDIR)/maxloc1_8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_i4.c' object='maxloc1_8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_i4.lo `test -f '$(srcdir)/generated/maxloc1_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i4.c +- +-maxloc1_16_i4.lo: $(srcdir)/generated/maxloc1_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_i4.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_i4.Tpo -c -o maxloc1_16_i4.lo `test -f '$(srcdir)/generated/maxloc1_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_i4.Tpo $(DEPDIR)/maxloc1_16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_i4.c' object='maxloc1_16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_i4.lo `test -f '$(srcdir)/generated/maxloc1_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i4.c +- +-maxloc1_4_i8.lo: $(srcdir)/generated/maxloc1_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_i8.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_i8.Tpo -c -o maxloc1_4_i8.lo `test -f '$(srcdir)/generated/maxloc1_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_i8.Tpo $(DEPDIR)/maxloc1_4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_i8.c' object='maxloc1_4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_i8.lo `test -f '$(srcdir)/generated/maxloc1_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i8.c +- +-maxloc1_8_i8.lo: $(srcdir)/generated/maxloc1_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_i8.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_i8.Tpo -c -o maxloc1_8_i8.lo `test -f '$(srcdir)/generated/maxloc1_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_i8.Tpo $(DEPDIR)/maxloc1_8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_i8.c' object='maxloc1_8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_i8.lo `test -f '$(srcdir)/generated/maxloc1_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i8.c +- +-maxloc1_16_i8.lo: $(srcdir)/generated/maxloc1_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_i8.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_i8.Tpo -c -o maxloc1_16_i8.lo `test -f '$(srcdir)/generated/maxloc1_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_i8.Tpo $(DEPDIR)/maxloc1_16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_i8.c' object='maxloc1_16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_i8.lo `test -f '$(srcdir)/generated/maxloc1_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i8.c +- +-maxloc1_4_i16.lo: $(srcdir)/generated/maxloc1_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_i16.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_i16.Tpo -c -o maxloc1_4_i16.lo `test -f '$(srcdir)/generated/maxloc1_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_i16.Tpo $(DEPDIR)/maxloc1_4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_i16.c' object='maxloc1_4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_i16.lo `test -f '$(srcdir)/generated/maxloc1_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_i16.c +- +-maxloc1_8_i16.lo: $(srcdir)/generated/maxloc1_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_i16.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_i16.Tpo -c -o maxloc1_8_i16.lo `test -f '$(srcdir)/generated/maxloc1_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_i16.Tpo $(DEPDIR)/maxloc1_8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_i16.c' object='maxloc1_8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_i16.lo `test -f '$(srcdir)/generated/maxloc1_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_i16.c +- +-maxloc1_16_i16.lo: $(srcdir)/generated/maxloc1_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_i16.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_i16.Tpo -c -o maxloc1_16_i16.lo `test -f '$(srcdir)/generated/maxloc1_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_i16.Tpo $(DEPDIR)/maxloc1_16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_i16.c' object='maxloc1_16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_i16.lo `test -f '$(srcdir)/generated/maxloc1_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_i16.c +- +-maxloc1_4_r4.lo: $(srcdir)/generated/maxloc1_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_r4.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_r4.Tpo -c -o maxloc1_4_r4.lo `test -f '$(srcdir)/generated/maxloc1_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_r4.Tpo $(DEPDIR)/maxloc1_4_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_r4.c' object='maxloc1_4_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_r4.lo `test -f '$(srcdir)/generated/maxloc1_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r4.c +- +-maxloc1_8_r4.lo: $(srcdir)/generated/maxloc1_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_r4.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_r4.Tpo -c -o maxloc1_8_r4.lo `test -f '$(srcdir)/generated/maxloc1_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_r4.Tpo $(DEPDIR)/maxloc1_8_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_r4.c' object='maxloc1_8_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_r4.lo `test -f '$(srcdir)/generated/maxloc1_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r4.c +- +-maxloc1_16_r4.lo: $(srcdir)/generated/maxloc1_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_r4.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_r4.Tpo -c -o maxloc1_16_r4.lo `test -f '$(srcdir)/generated/maxloc1_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_r4.Tpo $(DEPDIR)/maxloc1_16_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_r4.c' object='maxloc1_16_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_r4.lo `test -f '$(srcdir)/generated/maxloc1_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r4.c +- +-maxloc1_4_r8.lo: $(srcdir)/generated/maxloc1_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_r8.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_r8.Tpo -c -o maxloc1_4_r8.lo `test -f '$(srcdir)/generated/maxloc1_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_r8.Tpo $(DEPDIR)/maxloc1_4_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_r8.c' object='maxloc1_4_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_r8.lo `test -f '$(srcdir)/generated/maxloc1_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r8.c +- +-maxloc1_8_r8.lo: $(srcdir)/generated/maxloc1_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_r8.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_r8.Tpo -c -o maxloc1_8_r8.lo `test -f '$(srcdir)/generated/maxloc1_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_r8.Tpo $(DEPDIR)/maxloc1_8_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_r8.c' object='maxloc1_8_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_r8.lo `test -f '$(srcdir)/generated/maxloc1_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r8.c +- +-maxloc1_16_r8.lo: $(srcdir)/generated/maxloc1_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_r8.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_r8.Tpo -c -o maxloc1_16_r8.lo `test -f '$(srcdir)/generated/maxloc1_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_r8.Tpo $(DEPDIR)/maxloc1_16_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_r8.c' object='maxloc1_16_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_r8.lo `test -f '$(srcdir)/generated/maxloc1_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r8.c +- +-maxloc1_4_r10.lo: $(srcdir)/generated/maxloc1_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_r10.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_r10.Tpo -c -o maxloc1_4_r10.lo `test -f '$(srcdir)/generated/maxloc1_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_r10.Tpo $(DEPDIR)/maxloc1_4_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_r10.c' object='maxloc1_4_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_r10.lo `test -f '$(srcdir)/generated/maxloc1_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r10.c +- +-maxloc1_8_r10.lo: $(srcdir)/generated/maxloc1_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_r10.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_r10.Tpo -c -o maxloc1_8_r10.lo `test -f '$(srcdir)/generated/maxloc1_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_r10.Tpo $(DEPDIR)/maxloc1_8_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_r10.c' object='maxloc1_8_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_r10.lo `test -f '$(srcdir)/generated/maxloc1_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r10.c +- +-maxloc1_16_r10.lo: $(srcdir)/generated/maxloc1_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_r10.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_r10.Tpo -c -o maxloc1_16_r10.lo `test -f '$(srcdir)/generated/maxloc1_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_r10.Tpo $(DEPDIR)/maxloc1_16_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_r10.c' object='maxloc1_16_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_r10.lo `test -f '$(srcdir)/generated/maxloc1_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r10.c +- +-maxloc1_4_r16.lo: $(srcdir)/generated/maxloc1_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_r16.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_r16.Tpo -c -o maxloc1_4_r16.lo `test -f '$(srcdir)/generated/maxloc1_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_r16.Tpo $(DEPDIR)/maxloc1_4_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_r16.c' object='maxloc1_4_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_r16.lo `test -f '$(srcdir)/generated/maxloc1_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_r16.c +- +-maxloc1_8_r16.lo: $(srcdir)/generated/maxloc1_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_r16.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_r16.Tpo -c -o maxloc1_8_r16.lo `test -f '$(srcdir)/generated/maxloc1_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_r16.Tpo $(DEPDIR)/maxloc1_8_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_r16.c' object='maxloc1_8_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_r16.lo `test -f '$(srcdir)/generated/maxloc1_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_r16.c +- +-maxloc1_16_r16.lo: $(srcdir)/generated/maxloc1_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_r16.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_r16.Tpo -c -o maxloc1_16_r16.lo `test -f '$(srcdir)/generated/maxloc1_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_r16.Tpo $(DEPDIR)/maxloc1_16_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_r16.c' object='maxloc1_16_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_r16.lo `test -f '$(srcdir)/generated/maxloc1_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_r16.c +- +-maxval_i1.lo: $(srcdir)/generated/maxval_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_i1.lo -MD -MP -MF $(DEPDIR)/maxval_i1.Tpo -c -o maxval_i1.lo `test -f '$(srcdir)/generated/maxval_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_i1.Tpo $(DEPDIR)/maxval_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_i1.c' object='maxval_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_i1.lo `test -f '$(srcdir)/generated/maxval_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i1.c +- +-maxval_i2.lo: $(srcdir)/generated/maxval_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_i2.lo -MD -MP -MF $(DEPDIR)/maxval_i2.Tpo -c -o maxval_i2.lo `test -f '$(srcdir)/generated/maxval_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_i2.Tpo $(DEPDIR)/maxval_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_i2.c' object='maxval_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_i2.lo `test -f '$(srcdir)/generated/maxval_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i2.c +- +-maxval_i4.lo: $(srcdir)/generated/maxval_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_i4.lo -MD -MP -MF $(DEPDIR)/maxval_i4.Tpo -c -o maxval_i4.lo `test -f '$(srcdir)/generated/maxval_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_i4.Tpo $(DEPDIR)/maxval_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_i4.c' object='maxval_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_i4.lo `test -f '$(srcdir)/generated/maxval_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i4.c +- +-maxval_i8.lo: $(srcdir)/generated/maxval_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_i8.lo -MD -MP -MF $(DEPDIR)/maxval_i8.Tpo -c -o maxval_i8.lo `test -f '$(srcdir)/generated/maxval_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_i8.Tpo $(DEPDIR)/maxval_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_i8.c' object='maxval_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_i8.lo `test -f '$(srcdir)/generated/maxval_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i8.c +- +-maxval_i16.lo: $(srcdir)/generated/maxval_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_i16.lo -MD -MP -MF $(DEPDIR)/maxval_i16.Tpo -c -o maxval_i16.lo `test -f '$(srcdir)/generated/maxval_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_i16.Tpo $(DEPDIR)/maxval_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_i16.c' object='maxval_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_i16.lo `test -f '$(srcdir)/generated/maxval_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_i16.c +- +-maxval_r4.lo: $(srcdir)/generated/maxval_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_r4.lo -MD -MP -MF $(DEPDIR)/maxval_r4.Tpo -c -o maxval_r4.lo `test -f '$(srcdir)/generated/maxval_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_r4.Tpo $(DEPDIR)/maxval_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_r4.c' object='maxval_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_r4.lo `test -f '$(srcdir)/generated/maxval_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r4.c +- +-maxval_r8.lo: $(srcdir)/generated/maxval_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_r8.lo -MD -MP -MF $(DEPDIR)/maxval_r8.Tpo -c -o maxval_r8.lo `test -f '$(srcdir)/generated/maxval_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_r8.Tpo $(DEPDIR)/maxval_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_r8.c' object='maxval_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_r8.lo `test -f '$(srcdir)/generated/maxval_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r8.c +- +-maxval_r10.lo: $(srcdir)/generated/maxval_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_r10.lo -MD -MP -MF $(DEPDIR)/maxval_r10.Tpo -c -o maxval_r10.lo `test -f '$(srcdir)/generated/maxval_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_r10.Tpo $(DEPDIR)/maxval_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_r10.c' object='maxval_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_r10.lo `test -f '$(srcdir)/generated/maxval_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r10.c +- +-maxval_r16.lo: $(srcdir)/generated/maxval_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval_r16.lo -MD -MP -MF $(DEPDIR)/maxval_r16.Tpo -c -o maxval_r16.lo `test -f '$(srcdir)/generated/maxval_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval_r16.Tpo $(DEPDIR)/maxval_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval_r16.c' object='maxval_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval_r16.lo `test -f '$(srcdir)/generated/maxval_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval_r16.c +- +-minloc0_4_i1.lo: $(srcdir)/generated/minloc0_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_i1.lo -MD -MP -MF $(DEPDIR)/minloc0_4_i1.Tpo -c -o minloc0_4_i1.lo `test -f '$(srcdir)/generated/minloc0_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_i1.Tpo $(DEPDIR)/minloc0_4_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_i1.c' object='minloc0_4_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_i1.lo `test -f '$(srcdir)/generated/minloc0_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i1.c +- +-minloc0_8_i1.lo: $(srcdir)/generated/minloc0_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_i1.lo -MD -MP -MF $(DEPDIR)/minloc0_8_i1.Tpo -c -o minloc0_8_i1.lo `test -f '$(srcdir)/generated/minloc0_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_i1.Tpo $(DEPDIR)/minloc0_8_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_i1.c' object='minloc0_8_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_i1.lo `test -f '$(srcdir)/generated/minloc0_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i1.c +- +-minloc0_16_i1.lo: $(srcdir)/generated/minloc0_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_i1.lo -MD -MP -MF $(DEPDIR)/minloc0_16_i1.Tpo -c -o minloc0_16_i1.lo `test -f '$(srcdir)/generated/minloc0_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_i1.Tpo $(DEPDIR)/minloc0_16_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_i1.c' object='minloc0_16_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_i1.lo `test -f '$(srcdir)/generated/minloc0_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i1.c +- +-minloc0_4_i2.lo: $(srcdir)/generated/minloc0_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_i2.lo -MD -MP -MF $(DEPDIR)/minloc0_4_i2.Tpo -c -o minloc0_4_i2.lo `test -f '$(srcdir)/generated/minloc0_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_i2.Tpo $(DEPDIR)/minloc0_4_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_i2.c' object='minloc0_4_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_i2.lo `test -f '$(srcdir)/generated/minloc0_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i2.c +- +-minloc0_8_i2.lo: $(srcdir)/generated/minloc0_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_i2.lo -MD -MP -MF $(DEPDIR)/minloc0_8_i2.Tpo -c -o minloc0_8_i2.lo `test -f '$(srcdir)/generated/minloc0_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_i2.Tpo $(DEPDIR)/minloc0_8_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_i2.c' object='minloc0_8_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_i2.lo `test -f '$(srcdir)/generated/minloc0_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i2.c +- +-minloc0_16_i2.lo: $(srcdir)/generated/minloc0_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_i2.lo -MD -MP -MF $(DEPDIR)/minloc0_16_i2.Tpo -c -o minloc0_16_i2.lo `test -f '$(srcdir)/generated/minloc0_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_i2.Tpo $(DEPDIR)/minloc0_16_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_i2.c' object='minloc0_16_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_i2.lo `test -f '$(srcdir)/generated/minloc0_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i2.c +- +-minloc0_4_i4.lo: $(srcdir)/generated/minloc0_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_i4.lo -MD -MP -MF $(DEPDIR)/minloc0_4_i4.Tpo -c -o minloc0_4_i4.lo `test -f '$(srcdir)/generated/minloc0_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_i4.Tpo $(DEPDIR)/minloc0_4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_i4.c' object='minloc0_4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_i4.lo `test -f '$(srcdir)/generated/minloc0_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i4.c +- +-minloc0_8_i4.lo: $(srcdir)/generated/minloc0_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_i4.lo -MD -MP -MF $(DEPDIR)/minloc0_8_i4.Tpo -c -o minloc0_8_i4.lo `test -f '$(srcdir)/generated/minloc0_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_i4.Tpo $(DEPDIR)/minloc0_8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_i4.c' object='minloc0_8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_i4.lo `test -f '$(srcdir)/generated/minloc0_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i4.c +- +-minloc0_16_i4.lo: $(srcdir)/generated/minloc0_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_i4.lo -MD -MP -MF $(DEPDIR)/minloc0_16_i4.Tpo -c -o minloc0_16_i4.lo `test -f '$(srcdir)/generated/minloc0_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_i4.Tpo $(DEPDIR)/minloc0_16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_i4.c' object='minloc0_16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_i4.lo `test -f '$(srcdir)/generated/minloc0_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i4.c +- +-minloc0_4_i8.lo: $(srcdir)/generated/minloc0_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_i8.lo -MD -MP -MF $(DEPDIR)/minloc0_4_i8.Tpo -c -o minloc0_4_i8.lo `test -f '$(srcdir)/generated/minloc0_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_i8.Tpo $(DEPDIR)/minloc0_4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_i8.c' object='minloc0_4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_i8.lo `test -f '$(srcdir)/generated/minloc0_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i8.c +- +-minloc0_8_i8.lo: $(srcdir)/generated/minloc0_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_i8.lo -MD -MP -MF $(DEPDIR)/minloc0_8_i8.Tpo -c -o minloc0_8_i8.lo `test -f '$(srcdir)/generated/minloc0_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_i8.Tpo $(DEPDIR)/minloc0_8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_i8.c' object='minloc0_8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_i8.lo `test -f '$(srcdir)/generated/minloc0_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i8.c +- +-minloc0_16_i8.lo: $(srcdir)/generated/minloc0_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_i8.lo -MD -MP -MF $(DEPDIR)/minloc0_16_i8.Tpo -c -o minloc0_16_i8.lo `test -f '$(srcdir)/generated/minloc0_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_i8.Tpo $(DEPDIR)/minloc0_16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_i8.c' object='minloc0_16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_i8.lo `test -f '$(srcdir)/generated/minloc0_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i8.c +- +-minloc0_4_i16.lo: $(srcdir)/generated/minloc0_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_i16.lo -MD -MP -MF $(DEPDIR)/minloc0_4_i16.Tpo -c -o minloc0_4_i16.lo `test -f '$(srcdir)/generated/minloc0_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_i16.Tpo $(DEPDIR)/minloc0_4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_i16.c' object='minloc0_4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_i16.lo `test -f '$(srcdir)/generated/minloc0_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_i16.c +- +-minloc0_8_i16.lo: $(srcdir)/generated/minloc0_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_i16.lo -MD -MP -MF $(DEPDIR)/minloc0_8_i16.Tpo -c -o minloc0_8_i16.lo `test -f '$(srcdir)/generated/minloc0_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_i16.Tpo $(DEPDIR)/minloc0_8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_i16.c' object='minloc0_8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_i16.lo `test -f '$(srcdir)/generated/minloc0_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_i16.c +- +-minloc0_16_i16.lo: $(srcdir)/generated/minloc0_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_i16.lo -MD -MP -MF $(DEPDIR)/minloc0_16_i16.Tpo -c -o minloc0_16_i16.lo `test -f '$(srcdir)/generated/minloc0_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_i16.Tpo $(DEPDIR)/minloc0_16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_i16.c' object='minloc0_16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_i16.lo `test -f '$(srcdir)/generated/minloc0_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_i16.c +- +-minloc0_4_r4.lo: $(srcdir)/generated/minloc0_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_r4.lo -MD -MP -MF $(DEPDIR)/minloc0_4_r4.Tpo -c -o minloc0_4_r4.lo `test -f '$(srcdir)/generated/minloc0_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_r4.Tpo $(DEPDIR)/minloc0_4_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_r4.c' object='minloc0_4_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_r4.lo `test -f '$(srcdir)/generated/minloc0_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r4.c +- +-minloc0_8_r4.lo: $(srcdir)/generated/minloc0_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_r4.lo -MD -MP -MF $(DEPDIR)/minloc0_8_r4.Tpo -c -o minloc0_8_r4.lo `test -f '$(srcdir)/generated/minloc0_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_r4.Tpo $(DEPDIR)/minloc0_8_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_r4.c' object='minloc0_8_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_r4.lo `test -f '$(srcdir)/generated/minloc0_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r4.c +- +-minloc0_16_r4.lo: $(srcdir)/generated/minloc0_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_r4.lo -MD -MP -MF $(DEPDIR)/minloc0_16_r4.Tpo -c -o minloc0_16_r4.lo `test -f '$(srcdir)/generated/minloc0_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_r4.Tpo $(DEPDIR)/minloc0_16_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_r4.c' object='minloc0_16_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_r4.lo `test -f '$(srcdir)/generated/minloc0_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r4.c +- +-minloc0_4_r8.lo: $(srcdir)/generated/minloc0_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_r8.lo -MD -MP -MF $(DEPDIR)/minloc0_4_r8.Tpo -c -o minloc0_4_r8.lo `test -f '$(srcdir)/generated/minloc0_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_r8.Tpo $(DEPDIR)/minloc0_4_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_r8.c' object='minloc0_4_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_r8.lo `test -f '$(srcdir)/generated/minloc0_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r8.c +- +-minloc0_8_r8.lo: $(srcdir)/generated/minloc0_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_r8.lo -MD -MP -MF $(DEPDIR)/minloc0_8_r8.Tpo -c -o minloc0_8_r8.lo `test -f '$(srcdir)/generated/minloc0_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_r8.Tpo $(DEPDIR)/minloc0_8_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_r8.c' object='minloc0_8_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_r8.lo `test -f '$(srcdir)/generated/minloc0_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r8.c +- +-minloc0_16_r8.lo: $(srcdir)/generated/minloc0_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_r8.lo -MD -MP -MF $(DEPDIR)/minloc0_16_r8.Tpo -c -o minloc0_16_r8.lo `test -f '$(srcdir)/generated/minloc0_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_r8.Tpo $(DEPDIR)/minloc0_16_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_r8.c' object='minloc0_16_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_r8.lo `test -f '$(srcdir)/generated/minloc0_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r8.c +- +-minloc0_4_r10.lo: $(srcdir)/generated/minloc0_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_r10.lo -MD -MP -MF $(DEPDIR)/minloc0_4_r10.Tpo -c -o minloc0_4_r10.lo `test -f '$(srcdir)/generated/minloc0_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_r10.Tpo $(DEPDIR)/minloc0_4_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_r10.c' object='minloc0_4_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_r10.lo `test -f '$(srcdir)/generated/minloc0_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r10.c +- +-minloc0_8_r10.lo: $(srcdir)/generated/minloc0_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_r10.lo -MD -MP -MF $(DEPDIR)/minloc0_8_r10.Tpo -c -o minloc0_8_r10.lo `test -f '$(srcdir)/generated/minloc0_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_r10.Tpo $(DEPDIR)/minloc0_8_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_r10.c' object='minloc0_8_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_r10.lo `test -f '$(srcdir)/generated/minloc0_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r10.c +- +-minloc0_16_r10.lo: $(srcdir)/generated/minloc0_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_r10.lo -MD -MP -MF $(DEPDIR)/minloc0_16_r10.Tpo -c -o minloc0_16_r10.lo `test -f '$(srcdir)/generated/minloc0_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_r10.Tpo $(DEPDIR)/minloc0_16_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_r10.c' object='minloc0_16_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_r10.lo `test -f '$(srcdir)/generated/minloc0_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r10.c +- +-minloc0_4_r16.lo: $(srcdir)/generated/minloc0_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_r16.lo -MD -MP -MF $(DEPDIR)/minloc0_4_r16.Tpo -c -o minloc0_4_r16.lo `test -f '$(srcdir)/generated/minloc0_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_r16.Tpo $(DEPDIR)/minloc0_4_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_r16.c' object='minloc0_4_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_r16.lo `test -f '$(srcdir)/generated/minloc0_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_r16.c +- +-minloc0_8_r16.lo: $(srcdir)/generated/minloc0_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_r16.lo -MD -MP -MF $(DEPDIR)/minloc0_8_r16.Tpo -c -o minloc0_8_r16.lo `test -f '$(srcdir)/generated/minloc0_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_r16.Tpo $(DEPDIR)/minloc0_8_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_r16.c' object='minloc0_8_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_r16.lo `test -f '$(srcdir)/generated/minloc0_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_r16.c +- +-minloc0_16_r16.lo: $(srcdir)/generated/minloc0_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_r16.lo -MD -MP -MF $(DEPDIR)/minloc0_16_r16.Tpo -c -o minloc0_16_r16.lo `test -f '$(srcdir)/generated/minloc0_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_r16.Tpo $(DEPDIR)/minloc0_16_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_r16.c' object='minloc0_16_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_r16.lo `test -f '$(srcdir)/generated/minloc0_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_r16.c +- +-minloc1_4_i1.lo: $(srcdir)/generated/minloc1_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_i1.lo -MD -MP -MF $(DEPDIR)/minloc1_4_i1.Tpo -c -o minloc1_4_i1.lo `test -f '$(srcdir)/generated/minloc1_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_i1.Tpo $(DEPDIR)/minloc1_4_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_i1.c' object='minloc1_4_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_i1.lo `test -f '$(srcdir)/generated/minloc1_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i1.c +- +-minloc1_8_i1.lo: $(srcdir)/generated/minloc1_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_i1.lo -MD -MP -MF $(DEPDIR)/minloc1_8_i1.Tpo -c -o minloc1_8_i1.lo `test -f '$(srcdir)/generated/minloc1_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_i1.Tpo $(DEPDIR)/minloc1_8_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_i1.c' object='minloc1_8_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_i1.lo `test -f '$(srcdir)/generated/minloc1_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i1.c +- +-minloc1_16_i1.lo: $(srcdir)/generated/minloc1_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_i1.lo -MD -MP -MF $(DEPDIR)/minloc1_16_i1.Tpo -c -o minloc1_16_i1.lo `test -f '$(srcdir)/generated/minloc1_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_i1.Tpo $(DEPDIR)/minloc1_16_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_i1.c' object='minloc1_16_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_i1.lo `test -f '$(srcdir)/generated/minloc1_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i1.c +- +-minloc1_4_i2.lo: $(srcdir)/generated/minloc1_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_i2.lo -MD -MP -MF $(DEPDIR)/minloc1_4_i2.Tpo -c -o minloc1_4_i2.lo `test -f '$(srcdir)/generated/minloc1_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_i2.Tpo $(DEPDIR)/minloc1_4_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_i2.c' object='minloc1_4_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_i2.lo `test -f '$(srcdir)/generated/minloc1_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i2.c +- +-minloc1_8_i2.lo: $(srcdir)/generated/minloc1_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_i2.lo -MD -MP -MF $(DEPDIR)/minloc1_8_i2.Tpo -c -o minloc1_8_i2.lo `test -f '$(srcdir)/generated/minloc1_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_i2.Tpo $(DEPDIR)/minloc1_8_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_i2.c' object='minloc1_8_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_i2.lo `test -f '$(srcdir)/generated/minloc1_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i2.c +- +-minloc1_16_i2.lo: $(srcdir)/generated/minloc1_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_i2.lo -MD -MP -MF $(DEPDIR)/minloc1_16_i2.Tpo -c -o minloc1_16_i2.lo `test -f '$(srcdir)/generated/minloc1_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_i2.Tpo $(DEPDIR)/minloc1_16_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_i2.c' object='minloc1_16_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_i2.lo `test -f '$(srcdir)/generated/minloc1_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i2.c +- +-minloc1_4_i4.lo: $(srcdir)/generated/minloc1_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_i4.lo -MD -MP -MF $(DEPDIR)/minloc1_4_i4.Tpo -c -o minloc1_4_i4.lo `test -f '$(srcdir)/generated/minloc1_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_i4.Tpo $(DEPDIR)/minloc1_4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_i4.c' object='minloc1_4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_i4.lo `test -f '$(srcdir)/generated/minloc1_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i4.c +- +-minloc1_8_i4.lo: $(srcdir)/generated/minloc1_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_i4.lo -MD -MP -MF $(DEPDIR)/minloc1_8_i4.Tpo -c -o minloc1_8_i4.lo `test -f '$(srcdir)/generated/minloc1_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_i4.Tpo $(DEPDIR)/minloc1_8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_i4.c' object='minloc1_8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_i4.lo `test -f '$(srcdir)/generated/minloc1_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i4.c +- +-minloc1_16_i4.lo: $(srcdir)/generated/minloc1_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_i4.lo -MD -MP -MF $(DEPDIR)/minloc1_16_i4.Tpo -c -o minloc1_16_i4.lo `test -f '$(srcdir)/generated/minloc1_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_i4.Tpo $(DEPDIR)/minloc1_16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_i4.c' object='minloc1_16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_i4.lo `test -f '$(srcdir)/generated/minloc1_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i4.c +- +-minloc1_4_i8.lo: $(srcdir)/generated/minloc1_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_i8.lo -MD -MP -MF $(DEPDIR)/minloc1_4_i8.Tpo -c -o minloc1_4_i8.lo `test -f '$(srcdir)/generated/minloc1_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_i8.Tpo $(DEPDIR)/minloc1_4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_i8.c' object='minloc1_4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_i8.lo `test -f '$(srcdir)/generated/minloc1_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i8.c +- +-minloc1_8_i8.lo: $(srcdir)/generated/minloc1_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_i8.lo -MD -MP -MF $(DEPDIR)/minloc1_8_i8.Tpo -c -o minloc1_8_i8.lo `test -f '$(srcdir)/generated/minloc1_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_i8.Tpo $(DEPDIR)/minloc1_8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_i8.c' object='minloc1_8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_i8.lo `test -f '$(srcdir)/generated/minloc1_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i8.c +- +-minloc1_16_i8.lo: $(srcdir)/generated/minloc1_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_i8.lo -MD -MP -MF $(DEPDIR)/minloc1_16_i8.Tpo -c -o minloc1_16_i8.lo `test -f '$(srcdir)/generated/minloc1_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_i8.Tpo $(DEPDIR)/minloc1_16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_i8.c' object='minloc1_16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_i8.lo `test -f '$(srcdir)/generated/minloc1_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i8.c +- +-minloc1_4_i16.lo: $(srcdir)/generated/minloc1_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_i16.lo -MD -MP -MF $(DEPDIR)/minloc1_4_i16.Tpo -c -o minloc1_4_i16.lo `test -f '$(srcdir)/generated/minloc1_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_i16.Tpo $(DEPDIR)/minloc1_4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_i16.c' object='minloc1_4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_i16.lo `test -f '$(srcdir)/generated/minloc1_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_i16.c +- +-minloc1_8_i16.lo: $(srcdir)/generated/minloc1_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_i16.lo -MD -MP -MF $(DEPDIR)/minloc1_8_i16.Tpo -c -o minloc1_8_i16.lo `test -f '$(srcdir)/generated/minloc1_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_i16.Tpo $(DEPDIR)/minloc1_8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_i16.c' object='minloc1_8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_i16.lo `test -f '$(srcdir)/generated/minloc1_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_i16.c +- +-minloc1_16_i16.lo: $(srcdir)/generated/minloc1_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_i16.lo -MD -MP -MF $(DEPDIR)/minloc1_16_i16.Tpo -c -o minloc1_16_i16.lo `test -f '$(srcdir)/generated/minloc1_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_i16.Tpo $(DEPDIR)/minloc1_16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_i16.c' object='minloc1_16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_i16.lo `test -f '$(srcdir)/generated/minloc1_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_i16.c +- +-minloc1_4_r4.lo: $(srcdir)/generated/minloc1_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_r4.lo -MD -MP -MF $(DEPDIR)/minloc1_4_r4.Tpo -c -o minloc1_4_r4.lo `test -f '$(srcdir)/generated/minloc1_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_r4.Tpo $(DEPDIR)/minloc1_4_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_r4.c' object='minloc1_4_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_r4.lo `test -f '$(srcdir)/generated/minloc1_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r4.c +- +-minloc1_8_r4.lo: $(srcdir)/generated/minloc1_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_r4.lo -MD -MP -MF $(DEPDIR)/minloc1_8_r4.Tpo -c -o minloc1_8_r4.lo `test -f '$(srcdir)/generated/minloc1_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_r4.Tpo $(DEPDIR)/minloc1_8_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_r4.c' object='minloc1_8_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_r4.lo `test -f '$(srcdir)/generated/minloc1_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r4.c +- +-minloc1_16_r4.lo: $(srcdir)/generated/minloc1_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_r4.lo -MD -MP -MF $(DEPDIR)/minloc1_16_r4.Tpo -c -o minloc1_16_r4.lo `test -f '$(srcdir)/generated/minloc1_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_r4.Tpo $(DEPDIR)/minloc1_16_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_r4.c' object='minloc1_16_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_r4.lo `test -f '$(srcdir)/generated/minloc1_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r4.c +- +-minloc1_4_r8.lo: $(srcdir)/generated/minloc1_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_r8.lo -MD -MP -MF $(DEPDIR)/minloc1_4_r8.Tpo -c -o minloc1_4_r8.lo `test -f '$(srcdir)/generated/minloc1_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_r8.Tpo $(DEPDIR)/minloc1_4_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_r8.c' object='minloc1_4_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_r8.lo `test -f '$(srcdir)/generated/minloc1_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r8.c +- +-minloc1_8_r8.lo: $(srcdir)/generated/minloc1_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_r8.lo -MD -MP -MF $(DEPDIR)/minloc1_8_r8.Tpo -c -o minloc1_8_r8.lo `test -f '$(srcdir)/generated/minloc1_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_r8.Tpo $(DEPDIR)/minloc1_8_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_r8.c' object='minloc1_8_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_r8.lo `test -f '$(srcdir)/generated/minloc1_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r8.c +- +-minloc1_16_r8.lo: $(srcdir)/generated/minloc1_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_r8.lo -MD -MP -MF $(DEPDIR)/minloc1_16_r8.Tpo -c -o minloc1_16_r8.lo `test -f '$(srcdir)/generated/minloc1_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_r8.Tpo $(DEPDIR)/minloc1_16_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_r8.c' object='minloc1_16_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_r8.lo `test -f '$(srcdir)/generated/minloc1_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r8.c +- +-minloc1_4_r10.lo: $(srcdir)/generated/minloc1_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_r10.lo -MD -MP -MF $(DEPDIR)/minloc1_4_r10.Tpo -c -o minloc1_4_r10.lo `test -f '$(srcdir)/generated/minloc1_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_r10.Tpo $(DEPDIR)/minloc1_4_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_r10.c' object='minloc1_4_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_r10.lo `test -f '$(srcdir)/generated/minloc1_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r10.c +- +-minloc1_8_r10.lo: $(srcdir)/generated/minloc1_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_r10.lo -MD -MP -MF $(DEPDIR)/minloc1_8_r10.Tpo -c -o minloc1_8_r10.lo `test -f '$(srcdir)/generated/minloc1_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_r10.Tpo $(DEPDIR)/minloc1_8_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_r10.c' object='minloc1_8_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_r10.lo `test -f '$(srcdir)/generated/minloc1_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r10.c +- +-minloc1_16_r10.lo: $(srcdir)/generated/minloc1_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_r10.lo -MD -MP -MF $(DEPDIR)/minloc1_16_r10.Tpo -c -o minloc1_16_r10.lo `test -f '$(srcdir)/generated/minloc1_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_r10.Tpo $(DEPDIR)/minloc1_16_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_r10.c' object='minloc1_16_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_r10.lo `test -f '$(srcdir)/generated/minloc1_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r10.c +- +-minloc1_4_r16.lo: $(srcdir)/generated/minloc1_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_r16.lo -MD -MP -MF $(DEPDIR)/minloc1_4_r16.Tpo -c -o minloc1_4_r16.lo `test -f '$(srcdir)/generated/minloc1_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_r16.Tpo $(DEPDIR)/minloc1_4_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_r16.c' object='minloc1_4_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_r16.lo `test -f '$(srcdir)/generated/minloc1_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_r16.c +- +-minloc1_8_r16.lo: $(srcdir)/generated/minloc1_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_r16.lo -MD -MP -MF $(DEPDIR)/minloc1_8_r16.Tpo -c -o minloc1_8_r16.lo `test -f '$(srcdir)/generated/minloc1_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_r16.Tpo $(DEPDIR)/minloc1_8_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_r16.c' object='minloc1_8_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_r16.lo `test -f '$(srcdir)/generated/minloc1_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_r16.c +- +-minloc1_16_r16.lo: $(srcdir)/generated/minloc1_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_r16.lo -MD -MP -MF $(DEPDIR)/minloc1_16_r16.Tpo -c -o minloc1_16_r16.lo `test -f '$(srcdir)/generated/minloc1_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_r16.Tpo $(DEPDIR)/minloc1_16_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_r16.c' object='minloc1_16_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_r16.lo `test -f '$(srcdir)/generated/minloc1_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_r16.c +- +-minval_i1.lo: $(srcdir)/generated/minval_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_i1.lo -MD -MP -MF $(DEPDIR)/minval_i1.Tpo -c -o minval_i1.lo `test -f '$(srcdir)/generated/minval_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_i1.Tpo $(DEPDIR)/minval_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_i1.c' object='minval_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_i1.lo `test -f '$(srcdir)/generated/minval_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i1.c +- +-minval_i2.lo: $(srcdir)/generated/minval_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_i2.lo -MD -MP -MF $(DEPDIR)/minval_i2.Tpo -c -o minval_i2.lo `test -f '$(srcdir)/generated/minval_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_i2.Tpo $(DEPDIR)/minval_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_i2.c' object='minval_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_i2.lo `test -f '$(srcdir)/generated/minval_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i2.c +- +-minval_i4.lo: $(srcdir)/generated/minval_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_i4.lo -MD -MP -MF $(DEPDIR)/minval_i4.Tpo -c -o minval_i4.lo `test -f '$(srcdir)/generated/minval_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_i4.Tpo $(DEPDIR)/minval_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_i4.c' object='minval_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_i4.lo `test -f '$(srcdir)/generated/minval_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i4.c +- +-minval_i8.lo: $(srcdir)/generated/minval_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_i8.lo -MD -MP -MF $(DEPDIR)/minval_i8.Tpo -c -o minval_i8.lo `test -f '$(srcdir)/generated/minval_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_i8.Tpo $(DEPDIR)/minval_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_i8.c' object='minval_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_i8.lo `test -f '$(srcdir)/generated/minval_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i8.c +- +-minval_i16.lo: $(srcdir)/generated/minval_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_i16.lo -MD -MP -MF $(DEPDIR)/minval_i16.Tpo -c -o minval_i16.lo `test -f '$(srcdir)/generated/minval_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_i16.Tpo $(DEPDIR)/minval_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_i16.c' object='minval_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_i16.lo `test -f '$(srcdir)/generated/minval_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_i16.c +- +-minval_r4.lo: $(srcdir)/generated/minval_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_r4.lo -MD -MP -MF $(DEPDIR)/minval_r4.Tpo -c -o minval_r4.lo `test -f '$(srcdir)/generated/minval_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_r4.Tpo $(DEPDIR)/minval_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_r4.c' object='minval_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_r4.lo `test -f '$(srcdir)/generated/minval_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r4.c +- +-minval_r8.lo: $(srcdir)/generated/minval_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_r8.lo -MD -MP -MF $(DEPDIR)/minval_r8.Tpo -c -o minval_r8.lo `test -f '$(srcdir)/generated/minval_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_r8.Tpo $(DEPDIR)/minval_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_r8.c' object='minval_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_r8.lo `test -f '$(srcdir)/generated/minval_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r8.c +- +-minval_r10.lo: $(srcdir)/generated/minval_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_r10.lo -MD -MP -MF $(DEPDIR)/minval_r10.Tpo -c -o minval_r10.lo `test -f '$(srcdir)/generated/minval_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_r10.Tpo $(DEPDIR)/minval_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_r10.c' object='minval_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_r10.lo `test -f '$(srcdir)/generated/minval_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r10.c +- +-minval_r16.lo: $(srcdir)/generated/minval_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval_r16.lo -MD -MP -MF $(DEPDIR)/minval_r16.Tpo -c -o minval_r16.lo `test -f '$(srcdir)/generated/minval_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval_r16.Tpo $(DEPDIR)/minval_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval_r16.c' object='minval_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval_r16.lo `test -f '$(srcdir)/generated/minval_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval_r16.c +- +-product_i1.lo: $(srcdir)/generated/product_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_i1.lo -MD -MP -MF $(DEPDIR)/product_i1.Tpo -c -o product_i1.lo `test -f '$(srcdir)/generated/product_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_i1.Tpo $(DEPDIR)/product_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_i1.c' object='product_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_i1.lo `test -f '$(srcdir)/generated/product_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i1.c +- +-product_i2.lo: $(srcdir)/generated/product_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_i2.lo -MD -MP -MF $(DEPDIR)/product_i2.Tpo -c -o product_i2.lo `test -f '$(srcdir)/generated/product_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_i2.Tpo $(DEPDIR)/product_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_i2.c' object='product_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_i2.lo `test -f '$(srcdir)/generated/product_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i2.c +- +-product_i4.lo: $(srcdir)/generated/product_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_i4.lo -MD -MP -MF $(DEPDIR)/product_i4.Tpo -c -o product_i4.lo `test -f '$(srcdir)/generated/product_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_i4.Tpo $(DEPDIR)/product_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_i4.c' object='product_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_i4.lo `test -f '$(srcdir)/generated/product_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i4.c +- +-product_i8.lo: $(srcdir)/generated/product_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_i8.lo -MD -MP -MF $(DEPDIR)/product_i8.Tpo -c -o product_i8.lo `test -f '$(srcdir)/generated/product_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_i8.Tpo $(DEPDIR)/product_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_i8.c' object='product_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_i8.lo `test -f '$(srcdir)/generated/product_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i8.c +- +-product_i16.lo: $(srcdir)/generated/product_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_i16.lo -MD -MP -MF $(DEPDIR)/product_i16.Tpo -c -o product_i16.lo `test -f '$(srcdir)/generated/product_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_i16.Tpo $(DEPDIR)/product_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_i16.c' object='product_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_i16.lo `test -f '$(srcdir)/generated/product_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_i16.c +- +-product_r4.lo: $(srcdir)/generated/product_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_r4.lo -MD -MP -MF $(DEPDIR)/product_r4.Tpo -c -o product_r4.lo `test -f '$(srcdir)/generated/product_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_r4.Tpo $(DEPDIR)/product_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_r4.c' object='product_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_r4.lo `test -f '$(srcdir)/generated/product_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r4.c +- +-product_r8.lo: $(srcdir)/generated/product_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_r8.lo -MD -MP -MF $(DEPDIR)/product_r8.Tpo -c -o product_r8.lo `test -f '$(srcdir)/generated/product_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_r8.Tpo $(DEPDIR)/product_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_r8.c' object='product_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_r8.lo `test -f '$(srcdir)/generated/product_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r8.c +- +-product_r10.lo: $(srcdir)/generated/product_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_r10.lo -MD -MP -MF $(DEPDIR)/product_r10.Tpo -c -o product_r10.lo `test -f '$(srcdir)/generated/product_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_r10.Tpo $(DEPDIR)/product_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_r10.c' object='product_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_r10.lo `test -f '$(srcdir)/generated/product_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r10.c +- +-product_r16.lo: $(srcdir)/generated/product_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_r16.lo -MD -MP -MF $(DEPDIR)/product_r16.Tpo -c -o product_r16.lo `test -f '$(srcdir)/generated/product_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_r16.Tpo $(DEPDIR)/product_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_r16.c' object='product_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_r16.lo `test -f '$(srcdir)/generated/product_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_r16.c +- +-product_c4.lo: $(srcdir)/generated/product_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_c4.lo -MD -MP -MF $(DEPDIR)/product_c4.Tpo -c -o product_c4.lo `test -f '$(srcdir)/generated/product_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_c4.Tpo $(DEPDIR)/product_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_c4.c' object='product_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_c4.lo `test -f '$(srcdir)/generated/product_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c4.c +- +-product_c8.lo: $(srcdir)/generated/product_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_c8.lo -MD -MP -MF $(DEPDIR)/product_c8.Tpo -c -o product_c8.lo `test -f '$(srcdir)/generated/product_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_c8.Tpo $(DEPDIR)/product_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_c8.c' object='product_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_c8.lo `test -f '$(srcdir)/generated/product_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c8.c +- +-product_c10.lo: $(srcdir)/generated/product_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_c10.lo -MD -MP -MF $(DEPDIR)/product_c10.Tpo -c -o product_c10.lo `test -f '$(srcdir)/generated/product_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_c10.Tpo $(DEPDIR)/product_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_c10.c' object='product_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_c10.lo `test -f '$(srcdir)/generated/product_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c10.c +- +-product_c16.lo: $(srcdir)/generated/product_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT product_c16.lo -MD -MP -MF $(DEPDIR)/product_c16.Tpo -c -o product_c16.lo `test -f '$(srcdir)/generated/product_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/product_c16.Tpo $(DEPDIR)/product_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/product_c16.c' object='product_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o product_c16.lo `test -f '$(srcdir)/generated/product_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/product_c16.c +- +-sum_i1.lo: $(srcdir)/generated/sum_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_i1.lo -MD -MP -MF $(DEPDIR)/sum_i1.Tpo -c -o sum_i1.lo `test -f '$(srcdir)/generated/sum_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_i1.Tpo $(DEPDIR)/sum_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_i1.c' object='sum_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_i1.lo `test -f '$(srcdir)/generated/sum_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i1.c +- +-sum_i2.lo: $(srcdir)/generated/sum_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_i2.lo -MD -MP -MF $(DEPDIR)/sum_i2.Tpo -c -o sum_i2.lo `test -f '$(srcdir)/generated/sum_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_i2.Tpo $(DEPDIR)/sum_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_i2.c' object='sum_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_i2.lo `test -f '$(srcdir)/generated/sum_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i2.c +- +-sum_i4.lo: $(srcdir)/generated/sum_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_i4.lo -MD -MP -MF $(DEPDIR)/sum_i4.Tpo -c -o sum_i4.lo `test -f '$(srcdir)/generated/sum_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_i4.Tpo $(DEPDIR)/sum_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_i4.c' object='sum_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_i4.lo `test -f '$(srcdir)/generated/sum_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i4.c +- +-sum_i8.lo: $(srcdir)/generated/sum_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_i8.lo -MD -MP -MF $(DEPDIR)/sum_i8.Tpo -c -o sum_i8.lo `test -f '$(srcdir)/generated/sum_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_i8.Tpo $(DEPDIR)/sum_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_i8.c' object='sum_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_i8.lo `test -f '$(srcdir)/generated/sum_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i8.c +- +-sum_i16.lo: $(srcdir)/generated/sum_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_i16.lo -MD -MP -MF $(DEPDIR)/sum_i16.Tpo -c -o sum_i16.lo `test -f '$(srcdir)/generated/sum_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_i16.Tpo $(DEPDIR)/sum_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_i16.c' object='sum_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_i16.lo `test -f '$(srcdir)/generated/sum_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_i16.c +- +-sum_r4.lo: $(srcdir)/generated/sum_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_r4.lo -MD -MP -MF $(DEPDIR)/sum_r4.Tpo -c -o sum_r4.lo `test -f '$(srcdir)/generated/sum_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_r4.Tpo $(DEPDIR)/sum_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_r4.c' object='sum_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_r4.lo `test -f '$(srcdir)/generated/sum_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r4.c +- +-sum_r8.lo: $(srcdir)/generated/sum_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_r8.lo -MD -MP -MF $(DEPDIR)/sum_r8.Tpo -c -o sum_r8.lo `test -f '$(srcdir)/generated/sum_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_r8.Tpo $(DEPDIR)/sum_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_r8.c' object='sum_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_r8.lo `test -f '$(srcdir)/generated/sum_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r8.c +- +-sum_r10.lo: $(srcdir)/generated/sum_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_r10.lo -MD -MP -MF $(DEPDIR)/sum_r10.Tpo -c -o sum_r10.lo `test -f '$(srcdir)/generated/sum_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_r10.Tpo $(DEPDIR)/sum_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_r10.c' object='sum_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_r10.lo `test -f '$(srcdir)/generated/sum_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r10.c +- +-sum_r16.lo: $(srcdir)/generated/sum_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_r16.lo -MD -MP -MF $(DEPDIR)/sum_r16.Tpo -c -o sum_r16.lo `test -f '$(srcdir)/generated/sum_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_r16.Tpo $(DEPDIR)/sum_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_r16.c' object='sum_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_r16.lo `test -f '$(srcdir)/generated/sum_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_r16.c +- +-sum_c4.lo: $(srcdir)/generated/sum_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_c4.lo -MD -MP -MF $(DEPDIR)/sum_c4.Tpo -c -o sum_c4.lo `test -f '$(srcdir)/generated/sum_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_c4.Tpo $(DEPDIR)/sum_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_c4.c' object='sum_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_c4.lo `test -f '$(srcdir)/generated/sum_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c4.c +- +-sum_c8.lo: $(srcdir)/generated/sum_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_c8.lo -MD -MP -MF $(DEPDIR)/sum_c8.Tpo -c -o sum_c8.lo `test -f '$(srcdir)/generated/sum_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_c8.Tpo $(DEPDIR)/sum_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_c8.c' object='sum_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_c8.lo `test -f '$(srcdir)/generated/sum_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c8.c +- +-sum_c10.lo: $(srcdir)/generated/sum_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_c10.lo -MD -MP -MF $(DEPDIR)/sum_c10.Tpo -c -o sum_c10.lo `test -f '$(srcdir)/generated/sum_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_c10.Tpo $(DEPDIR)/sum_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_c10.c' object='sum_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_c10.lo `test -f '$(srcdir)/generated/sum_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c10.c +- +-sum_c16.lo: $(srcdir)/generated/sum_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sum_c16.lo -MD -MP -MF $(DEPDIR)/sum_c16.Tpo -c -o sum_c16.lo `test -f '$(srcdir)/generated/sum_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sum_c16.Tpo $(DEPDIR)/sum_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/sum_c16.c' object='sum_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sum_c16.lo `test -f '$(srcdir)/generated/sum_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/sum_c16.c +- +-bessel_r4.lo: $(srcdir)/generated/bessel_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bessel_r4.lo -MD -MP -MF $(DEPDIR)/bessel_r4.Tpo -c -o bessel_r4.lo `test -f '$(srcdir)/generated/bessel_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bessel_r4.Tpo $(DEPDIR)/bessel_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/bessel_r4.c' object='bessel_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bessel_r4.lo `test -f '$(srcdir)/generated/bessel_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r4.c +- +-bessel_r8.lo: $(srcdir)/generated/bessel_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bessel_r8.lo -MD -MP -MF $(DEPDIR)/bessel_r8.Tpo -c -o bessel_r8.lo `test -f '$(srcdir)/generated/bessel_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bessel_r8.Tpo $(DEPDIR)/bessel_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/bessel_r8.c' object='bessel_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bessel_r8.lo `test -f '$(srcdir)/generated/bessel_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r8.c +- +-bessel_r10.lo: $(srcdir)/generated/bessel_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bessel_r10.lo -MD -MP -MF $(DEPDIR)/bessel_r10.Tpo -c -o bessel_r10.lo `test -f '$(srcdir)/generated/bessel_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bessel_r10.Tpo $(DEPDIR)/bessel_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/bessel_r10.c' object='bessel_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bessel_r10.lo `test -f '$(srcdir)/generated/bessel_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r10.c +- +-bessel_r16.lo: $(srcdir)/generated/bessel_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bessel_r16.lo -MD -MP -MF $(DEPDIR)/bessel_r16.Tpo -c -o bessel_r16.lo `test -f '$(srcdir)/generated/bessel_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bessel_r16.Tpo $(DEPDIR)/bessel_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/bessel_r16.c' object='bessel_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bessel_r16.lo `test -f '$(srcdir)/generated/bessel_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/bessel_r16.c +- +-iall_i1.lo: $(srcdir)/generated/iall_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iall_i1.lo -MD -MP -MF $(DEPDIR)/iall_i1.Tpo -c -o iall_i1.lo `test -f '$(srcdir)/generated/iall_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iall_i1.Tpo $(DEPDIR)/iall_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iall_i1.c' object='iall_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iall_i1.lo `test -f '$(srcdir)/generated/iall_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i1.c +- +-iall_i2.lo: $(srcdir)/generated/iall_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iall_i2.lo -MD -MP -MF $(DEPDIR)/iall_i2.Tpo -c -o iall_i2.lo `test -f '$(srcdir)/generated/iall_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iall_i2.Tpo $(DEPDIR)/iall_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iall_i2.c' object='iall_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iall_i2.lo `test -f '$(srcdir)/generated/iall_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i2.c +- +-iall_i4.lo: $(srcdir)/generated/iall_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iall_i4.lo -MD -MP -MF $(DEPDIR)/iall_i4.Tpo -c -o iall_i4.lo `test -f '$(srcdir)/generated/iall_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iall_i4.Tpo $(DEPDIR)/iall_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iall_i4.c' object='iall_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iall_i4.lo `test -f '$(srcdir)/generated/iall_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i4.c +- +-iall_i8.lo: $(srcdir)/generated/iall_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iall_i8.lo -MD -MP -MF $(DEPDIR)/iall_i8.Tpo -c -o iall_i8.lo `test -f '$(srcdir)/generated/iall_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iall_i8.Tpo $(DEPDIR)/iall_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iall_i8.c' object='iall_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iall_i8.lo `test -f '$(srcdir)/generated/iall_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i8.c +- +-iall_i16.lo: $(srcdir)/generated/iall_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iall_i16.lo -MD -MP -MF $(DEPDIR)/iall_i16.Tpo -c -o iall_i16.lo `test -f '$(srcdir)/generated/iall_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iall_i16.Tpo $(DEPDIR)/iall_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iall_i16.c' object='iall_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iall_i16.lo `test -f '$(srcdir)/generated/iall_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/iall_i16.c +- +-iany_i1.lo: $(srcdir)/generated/iany_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iany_i1.lo -MD -MP -MF $(DEPDIR)/iany_i1.Tpo -c -o iany_i1.lo `test -f '$(srcdir)/generated/iany_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iany_i1.Tpo $(DEPDIR)/iany_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iany_i1.c' object='iany_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iany_i1.lo `test -f '$(srcdir)/generated/iany_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i1.c +- +-iany_i2.lo: $(srcdir)/generated/iany_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iany_i2.lo -MD -MP -MF $(DEPDIR)/iany_i2.Tpo -c -o iany_i2.lo `test -f '$(srcdir)/generated/iany_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iany_i2.Tpo $(DEPDIR)/iany_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iany_i2.c' object='iany_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iany_i2.lo `test -f '$(srcdir)/generated/iany_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i2.c +- +-iany_i4.lo: $(srcdir)/generated/iany_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iany_i4.lo -MD -MP -MF $(DEPDIR)/iany_i4.Tpo -c -o iany_i4.lo `test -f '$(srcdir)/generated/iany_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iany_i4.Tpo $(DEPDIR)/iany_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iany_i4.c' object='iany_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iany_i4.lo `test -f '$(srcdir)/generated/iany_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i4.c +- +-iany_i8.lo: $(srcdir)/generated/iany_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iany_i8.lo -MD -MP -MF $(DEPDIR)/iany_i8.Tpo -c -o iany_i8.lo `test -f '$(srcdir)/generated/iany_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iany_i8.Tpo $(DEPDIR)/iany_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iany_i8.c' object='iany_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iany_i8.lo `test -f '$(srcdir)/generated/iany_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i8.c +- +-iany_i16.lo: $(srcdir)/generated/iany_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iany_i16.lo -MD -MP -MF $(DEPDIR)/iany_i16.Tpo -c -o iany_i16.lo `test -f '$(srcdir)/generated/iany_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iany_i16.Tpo $(DEPDIR)/iany_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iany_i16.c' object='iany_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iany_i16.lo `test -f '$(srcdir)/generated/iany_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/iany_i16.c +- +-iparity_i1.lo: $(srcdir)/generated/iparity_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iparity_i1.lo -MD -MP -MF $(DEPDIR)/iparity_i1.Tpo -c -o iparity_i1.lo `test -f '$(srcdir)/generated/iparity_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iparity_i1.Tpo $(DEPDIR)/iparity_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iparity_i1.c' object='iparity_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iparity_i1.lo `test -f '$(srcdir)/generated/iparity_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i1.c +- +-iparity_i2.lo: $(srcdir)/generated/iparity_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iparity_i2.lo -MD -MP -MF $(DEPDIR)/iparity_i2.Tpo -c -o iparity_i2.lo `test -f '$(srcdir)/generated/iparity_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iparity_i2.Tpo $(DEPDIR)/iparity_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iparity_i2.c' object='iparity_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iparity_i2.lo `test -f '$(srcdir)/generated/iparity_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i2.c +- +-iparity_i4.lo: $(srcdir)/generated/iparity_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iparity_i4.lo -MD -MP -MF $(DEPDIR)/iparity_i4.Tpo -c -o iparity_i4.lo `test -f '$(srcdir)/generated/iparity_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iparity_i4.Tpo $(DEPDIR)/iparity_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iparity_i4.c' object='iparity_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iparity_i4.lo `test -f '$(srcdir)/generated/iparity_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i4.c +- +-iparity_i8.lo: $(srcdir)/generated/iparity_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iparity_i8.lo -MD -MP -MF $(DEPDIR)/iparity_i8.Tpo -c -o iparity_i8.lo `test -f '$(srcdir)/generated/iparity_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iparity_i8.Tpo $(DEPDIR)/iparity_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iparity_i8.c' object='iparity_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iparity_i8.lo `test -f '$(srcdir)/generated/iparity_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i8.c +- +-iparity_i16.lo: $(srcdir)/generated/iparity_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iparity_i16.lo -MD -MP -MF $(DEPDIR)/iparity_i16.Tpo -c -o iparity_i16.lo `test -f '$(srcdir)/generated/iparity_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iparity_i16.Tpo $(DEPDIR)/iparity_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/iparity_i16.c' object='iparity_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iparity_i16.lo `test -f '$(srcdir)/generated/iparity_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/iparity_i16.c +- +-norm2_r4.lo: $(srcdir)/generated/norm2_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT norm2_r4.lo -MD -MP -MF $(DEPDIR)/norm2_r4.Tpo -c -o norm2_r4.lo `test -f '$(srcdir)/generated/norm2_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/norm2_r4.Tpo $(DEPDIR)/norm2_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/norm2_r4.c' object='norm2_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o norm2_r4.lo `test -f '$(srcdir)/generated/norm2_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r4.c +- +-norm2_r8.lo: $(srcdir)/generated/norm2_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT norm2_r8.lo -MD -MP -MF $(DEPDIR)/norm2_r8.Tpo -c -o norm2_r8.lo `test -f '$(srcdir)/generated/norm2_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/norm2_r8.Tpo $(DEPDIR)/norm2_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/norm2_r8.c' object='norm2_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o norm2_r8.lo `test -f '$(srcdir)/generated/norm2_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r8.c +- +-norm2_r10.lo: $(srcdir)/generated/norm2_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT norm2_r10.lo -MD -MP -MF $(DEPDIR)/norm2_r10.Tpo -c -o norm2_r10.lo `test -f '$(srcdir)/generated/norm2_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/norm2_r10.Tpo $(DEPDIR)/norm2_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/norm2_r10.c' object='norm2_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o norm2_r10.lo `test -f '$(srcdir)/generated/norm2_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r10.c +- +-norm2_r16.lo: $(srcdir)/generated/norm2_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT norm2_r16.lo -MD -MP -MF $(DEPDIR)/norm2_r16.Tpo -c -o norm2_r16.lo `test -f '$(srcdir)/generated/norm2_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/norm2_r16.Tpo $(DEPDIR)/norm2_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/norm2_r16.c' object='norm2_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o norm2_r16.lo `test -f '$(srcdir)/generated/norm2_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/norm2_r16.c +- +-parity_l1.lo: $(srcdir)/generated/parity_l1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parity_l1.lo -MD -MP -MF $(DEPDIR)/parity_l1.Tpo -c -o parity_l1.lo `test -f '$(srcdir)/generated/parity_l1.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parity_l1.Tpo $(DEPDIR)/parity_l1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/parity_l1.c' object='parity_l1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parity_l1.lo `test -f '$(srcdir)/generated/parity_l1.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l1.c +- +-parity_l2.lo: $(srcdir)/generated/parity_l2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parity_l2.lo -MD -MP -MF $(DEPDIR)/parity_l2.Tpo -c -o parity_l2.lo `test -f '$(srcdir)/generated/parity_l2.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parity_l2.Tpo $(DEPDIR)/parity_l2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/parity_l2.c' object='parity_l2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parity_l2.lo `test -f '$(srcdir)/generated/parity_l2.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l2.c +- +-parity_l4.lo: $(srcdir)/generated/parity_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parity_l4.lo -MD -MP -MF $(DEPDIR)/parity_l4.Tpo -c -o parity_l4.lo `test -f '$(srcdir)/generated/parity_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parity_l4.Tpo $(DEPDIR)/parity_l4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/parity_l4.c' object='parity_l4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parity_l4.lo `test -f '$(srcdir)/generated/parity_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l4.c +- +-parity_l8.lo: $(srcdir)/generated/parity_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parity_l8.lo -MD -MP -MF $(DEPDIR)/parity_l8.Tpo -c -o parity_l8.lo `test -f '$(srcdir)/generated/parity_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parity_l8.Tpo $(DEPDIR)/parity_l8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/parity_l8.c' object='parity_l8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parity_l8.lo `test -f '$(srcdir)/generated/parity_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l8.c +- +-parity_l16.lo: $(srcdir)/generated/parity_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parity_l16.lo -MD -MP -MF $(DEPDIR)/parity_l16.Tpo -c -o parity_l16.lo `test -f '$(srcdir)/generated/parity_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parity_l16.Tpo $(DEPDIR)/parity_l16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/parity_l16.c' object='parity_l16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parity_l16.lo `test -f '$(srcdir)/generated/parity_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/parity_l16.c +- +-matmul_i1.lo: $(srcdir)/generated/matmul_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_i1.lo -MD -MP -MF $(DEPDIR)/matmul_i1.Tpo -c -o matmul_i1.lo `test -f '$(srcdir)/generated/matmul_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_i1.Tpo $(DEPDIR)/matmul_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_i1.c' object='matmul_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_i1.lo `test -f '$(srcdir)/generated/matmul_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i1.c +- +-matmul_i2.lo: $(srcdir)/generated/matmul_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_i2.lo -MD -MP -MF $(DEPDIR)/matmul_i2.Tpo -c -o matmul_i2.lo `test -f '$(srcdir)/generated/matmul_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_i2.Tpo $(DEPDIR)/matmul_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_i2.c' object='matmul_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_i2.lo `test -f '$(srcdir)/generated/matmul_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i2.c +- +-matmul_i4.lo: $(srcdir)/generated/matmul_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_i4.lo -MD -MP -MF $(DEPDIR)/matmul_i4.Tpo -c -o matmul_i4.lo `test -f '$(srcdir)/generated/matmul_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_i4.Tpo $(DEPDIR)/matmul_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_i4.c' object='matmul_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_i4.lo `test -f '$(srcdir)/generated/matmul_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i4.c +- +-matmul_i8.lo: $(srcdir)/generated/matmul_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_i8.lo -MD -MP -MF $(DEPDIR)/matmul_i8.Tpo -c -o matmul_i8.lo `test -f '$(srcdir)/generated/matmul_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_i8.Tpo $(DEPDIR)/matmul_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_i8.c' object='matmul_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_i8.lo `test -f '$(srcdir)/generated/matmul_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i8.c +- +-matmul_i16.lo: $(srcdir)/generated/matmul_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_i16.lo -MD -MP -MF $(DEPDIR)/matmul_i16.Tpo -c -o matmul_i16.lo `test -f '$(srcdir)/generated/matmul_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_i16.Tpo $(DEPDIR)/matmul_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_i16.c' object='matmul_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_i16.lo `test -f '$(srcdir)/generated/matmul_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_i16.c +- +-matmul_r4.lo: $(srcdir)/generated/matmul_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_r4.lo -MD -MP -MF $(DEPDIR)/matmul_r4.Tpo -c -o matmul_r4.lo `test -f '$(srcdir)/generated/matmul_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_r4.Tpo $(DEPDIR)/matmul_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_r4.c' object='matmul_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_r4.lo `test -f '$(srcdir)/generated/matmul_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r4.c +- +-matmul_r8.lo: $(srcdir)/generated/matmul_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_r8.lo -MD -MP -MF $(DEPDIR)/matmul_r8.Tpo -c -o matmul_r8.lo `test -f '$(srcdir)/generated/matmul_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_r8.Tpo $(DEPDIR)/matmul_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_r8.c' object='matmul_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_r8.lo `test -f '$(srcdir)/generated/matmul_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r8.c +- +-matmul_r10.lo: $(srcdir)/generated/matmul_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_r10.lo -MD -MP -MF $(DEPDIR)/matmul_r10.Tpo -c -o matmul_r10.lo `test -f '$(srcdir)/generated/matmul_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_r10.Tpo $(DEPDIR)/matmul_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_r10.c' object='matmul_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_r10.lo `test -f '$(srcdir)/generated/matmul_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r10.c +- +-matmul_r16.lo: $(srcdir)/generated/matmul_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_r16.lo -MD -MP -MF $(DEPDIR)/matmul_r16.Tpo -c -o matmul_r16.lo `test -f '$(srcdir)/generated/matmul_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_r16.Tpo $(DEPDIR)/matmul_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_r16.c' object='matmul_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_r16.lo `test -f '$(srcdir)/generated/matmul_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_r16.c +- +-matmul_c4.lo: $(srcdir)/generated/matmul_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_c4.lo -MD -MP -MF $(DEPDIR)/matmul_c4.Tpo -c -o matmul_c4.lo `test -f '$(srcdir)/generated/matmul_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_c4.Tpo $(DEPDIR)/matmul_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_c4.c' object='matmul_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_c4.lo `test -f '$(srcdir)/generated/matmul_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c4.c +- +-matmul_c8.lo: $(srcdir)/generated/matmul_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_c8.lo -MD -MP -MF $(DEPDIR)/matmul_c8.Tpo -c -o matmul_c8.lo `test -f '$(srcdir)/generated/matmul_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_c8.Tpo $(DEPDIR)/matmul_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_c8.c' object='matmul_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_c8.lo `test -f '$(srcdir)/generated/matmul_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c8.c +- +-matmul_c10.lo: $(srcdir)/generated/matmul_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_c10.lo -MD -MP -MF $(DEPDIR)/matmul_c10.Tpo -c -o matmul_c10.lo `test -f '$(srcdir)/generated/matmul_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_c10.Tpo $(DEPDIR)/matmul_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_c10.c' object='matmul_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_c10.lo `test -f '$(srcdir)/generated/matmul_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c10.c +- +-matmul_c16.lo: $(srcdir)/generated/matmul_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_c16.lo -MD -MP -MF $(DEPDIR)/matmul_c16.Tpo -c -o matmul_c16.lo `test -f '$(srcdir)/generated/matmul_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_c16.Tpo $(DEPDIR)/matmul_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_c16.c' object='matmul_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_c16.lo `test -f '$(srcdir)/generated/matmul_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_c16.c +- +-matmul_l4.lo: $(srcdir)/generated/matmul_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_l4.lo -MD -MP -MF $(DEPDIR)/matmul_l4.Tpo -c -o matmul_l4.lo `test -f '$(srcdir)/generated/matmul_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_l4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_l4.Tpo $(DEPDIR)/matmul_l4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_l4.c' object='matmul_l4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_l4.lo `test -f '$(srcdir)/generated/matmul_l4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_l4.c +- +-matmul_l8.lo: $(srcdir)/generated/matmul_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_l8.lo -MD -MP -MF $(DEPDIR)/matmul_l8.Tpo -c -o matmul_l8.lo `test -f '$(srcdir)/generated/matmul_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_l8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_l8.Tpo $(DEPDIR)/matmul_l8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_l8.c' object='matmul_l8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_l8.lo `test -f '$(srcdir)/generated/matmul_l8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_l8.c +- +-matmul_l16.lo: $(srcdir)/generated/matmul_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmul_l16.lo -MD -MP -MF $(DEPDIR)/matmul_l16.Tpo -c -o matmul_l16.lo `test -f '$(srcdir)/generated/matmul_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_l16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmul_l16.Tpo $(DEPDIR)/matmul_l16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmul_l16.c' object='matmul_l16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmul_l16.lo `test -f '$(srcdir)/generated/matmul_l16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmul_l16.c +- +-shape_i1.lo: $(srcdir)/generated/shape_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shape_i1.lo -MD -MP -MF $(DEPDIR)/shape_i1.Tpo -c -o shape_i1.lo `test -f '$(srcdir)/generated/shape_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shape_i1.Tpo $(DEPDIR)/shape_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/shape_i1.c' object='shape_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shape_i1.lo `test -f '$(srcdir)/generated/shape_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i1.c +- +-shape_i2.lo: $(srcdir)/generated/shape_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shape_i2.lo -MD -MP -MF $(DEPDIR)/shape_i2.Tpo -c -o shape_i2.lo `test -f '$(srcdir)/generated/shape_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shape_i2.Tpo $(DEPDIR)/shape_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/shape_i2.c' object='shape_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shape_i2.lo `test -f '$(srcdir)/generated/shape_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i2.c +- +-shape_i4.lo: $(srcdir)/generated/shape_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shape_i4.lo -MD -MP -MF $(DEPDIR)/shape_i4.Tpo -c -o shape_i4.lo `test -f '$(srcdir)/generated/shape_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shape_i4.Tpo $(DEPDIR)/shape_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/shape_i4.c' object='shape_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shape_i4.lo `test -f '$(srcdir)/generated/shape_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i4.c +- +-shape_i8.lo: $(srcdir)/generated/shape_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shape_i8.lo -MD -MP -MF $(DEPDIR)/shape_i8.Tpo -c -o shape_i8.lo `test -f '$(srcdir)/generated/shape_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shape_i8.Tpo $(DEPDIR)/shape_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/shape_i8.c' object='shape_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shape_i8.lo `test -f '$(srcdir)/generated/shape_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i8.c +- +-shape_i16.lo: $(srcdir)/generated/shape_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shape_i16.lo -MD -MP -MF $(DEPDIR)/shape_i16.Tpo -c -o shape_i16.lo `test -f '$(srcdir)/generated/shape_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shape_i16.Tpo $(DEPDIR)/shape_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/shape_i16.c' object='shape_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shape_i16.lo `test -f '$(srcdir)/generated/shape_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/shape_i16.c +- +-eoshift1_4.lo: $(srcdir)/generated/eoshift1_4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift1_4.lo -MD -MP -MF $(DEPDIR)/eoshift1_4.Tpo -c -o eoshift1_4.lo `test -f '$(srcdir)/generated/eoshift1_4.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift1_4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift1_4.Tpo $(DEPDIR)/eoshift1_4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/eoshift1_4.c' object='eoshift1_4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift1_4.lo `test -f '$(srcdir)/generated/eoshift1_4.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift1_4.c +- +-eoshift1_8.lo: $(srcdir)/generated/eoshift1_8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift1_8.lo -MD -MP -MF $(DEPDIR)/eoshift1_8.Tpo -c -o eoshift1_8.lo `test -f '$(srcdir)/generated/eoshift1_8.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift1_8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift1_8.Tpo $(DEPDIR)/eoshift1_8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/eoshift1_8.c' object='eoshift1_8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift1_8.lo `test -f '$(srcdir)/generated/eoshift1_8.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift1_8.c +- +-eoshift1_16.lo: $(srcdir)/generated/eoshift1_16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift1_16.lo -MD -MP -MF $(DEPDIR)/eoshift1_16.Tpo -c -o eoshift1_16.lo `test -f '$(srcdir)/generated/eoshift1_16.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift1_16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift1_16.Tpo $(DEPDIR)/eoshift1_16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/eoshift1_16.c' object='eoshift1_16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift1_16.lo `test -f '$(srcdir)/generated/eoshift1_16.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift1_16.c +- +-eoshift3_4.lo: $(srcdir)/generated/eoshift3_4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift3_4.lo -MD -MP -MF $(DEPDIR)/eoshift3_4.Tpo -c -o eoshift3_4.lo `test -f '$(srcdir)/generated/eoshift3_4.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift3_4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift3_4.Tpo $(DEPDIR)/eoshift3_4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/eoshift3_4.c' object='eoshift3_4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift3_4.lo `test -f '$(srcdir)/generated/eoshift3_4.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift3_4.c +- +-eoshift3_8.lo: $(srcdir)/generated/eoshift3_8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift3_8.lo -MD -MP -MF $(DEPDIR)/eoshift3_8.Tpo -c -o eoshift3_8.lo `test -f '$(srcdir)/generated/eoshift3_8.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift3_8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift3_8.Tpo $(DEPDIR)/eoshift3_8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/eoshift3_8.c' object='eoshift3_8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift3_8.lo `test -f '$(srcdir)/generated/eoshift3_8.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift3_8.c +- +-eoshift3_16.lo: $(srcdir)/generated/eoshift3_16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift3_16.lo -MD -MP -MF $(DEPDIR)/eoshift3_16.Tpo -c -o eoshift3_16.lo `test -f '$(srcdir)/generated/eoshift3_16.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift3_16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift3_16.Tpo $(DEPDIR)/eoshift3_16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/eoshift3_16.c' object='eoshift3_16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift3_16.lo `test -f '$(srcdir)/generated/eoshift3_16.c' || echo '$(srcdir)/'`$(srcdir)/generated/eoshift3_16.c +- +-cshift1_4.lo: $(srcdir)/generated/cshift1_4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4.lo -MD -MP -MF $(DEPDIR)/cshift1_4.Tpo -c -o cshift1_4.lo `test -f '$(srcdir)/generated/cshift1_4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4.Tpo $(DEPDIR)/cshift1_4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4.c' object='cshift1_4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4.lo `test -f '$(srcdir)/generated/cshift1_4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4.c +- +-cshift1_8.lo: $(srcdir)/generated/cshift1_8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8.lo -MD -MP -MF $(DEPDIR)/cshift1_8.Tpo -c -o cshift1_8.lo `test -f '$(srcdir)/generated/cshift1_8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8.Tpo $(DEPDIR)/cshift1_8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8.c' object='cshift1_8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8.lo `test -f '$(srcdir)/generated/cshift1_8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8.c +- +-cshift1_16.lo: $(srcdir)/generated/cshift1_16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16.lo -MD -MP -MF $(DEPDIR)/cshift1_16.Tpo -c -o cshift1_16.lo `test -f '$(srcdir)/generated/cshift1_16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16.Tpo $(DEPDIR)/cshift1_16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16.c' object='cshift1_16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16.lo `test -f '$(srcdir)/generated/cshift1_16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16.c +- +-reshape_i4.lo: $(srcdir)/generated/reshape_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_i4.lo -MD -MP -MF $(DEPDIR)/reshape_i4.Tpo -c -o reshape_i4.lo `test -f '$(srcdir)/generated/reshape_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_i4.Tpo $(DEPDIR)/reshape_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_i4.c' object='reshape_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_i4.lo `test -f '$(srcdir)/generated/reshape_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_i4.c +- +-reshape_i8.lo: $(srcdir)/generated/reshape_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_i8.lo -MD -MP -MF $(DEPDIR)/reshape_i8.Tpo -c -o reshape_i8.lo `test -f '$(srcdir)/generated/reshape_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_i8.Tpo $(DEPDIR)/reshape_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_i8.c' object='reshape_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_i8.lo `test -f '$(srcdir)/generated/reshape_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_i8.c +- +-reshape_i16.lo: $(srcdir)/generated/reshape_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_i16.lo -MD -MP -MF $(DEPDIR)/reshape_i16.Tpo -c -o reshape_i16.lo `test -f '$(srcdir)/generated/reshape_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_i16.Tpo $(DEPDIR)/reshape_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_i16.c' object='reshape_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_i16.lo `test -f '$(srcdir)/generated/reshape_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_i16.c +- +-reshape_r4.lo: $(srcdir)/generated/reshape_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_r4.lo -MD -MP -MF $(DEPDIR)/reshape_r4.Tpo -c -o reshape_r4.lo `test -f '$(srcdir)/generated/reshape_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_r4.Tpo $(DEPDIR)/reshape_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_r4.c' object='reshape_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_r4.lo `test -f '$(srcdir)/generated/reshape_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r4.c +- +-reshape_r8.lo: $(srcdir)/generated/reshape_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_r8.lo -MD -MP -MF $(DEPDIR)/reshape_r8.Tpo -c -o reshape_r8.lo `test -f '$(srcdir)/generated/reshape_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_r8.Tpo $(DEPDIR)/reshape_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_r8.c' object='reshape_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_r8.lo `test -f '$(srcdir)/generated/reshape_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r8.c +- +-reshape_r10.lo: $(srcdir)/generated/reshape_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_r10.lo -MD -MP -MF $(DEPDIR)/reshape_r10.Tpo -c -o reshape_r10.lo `test -f '$(srcdir)/generated/reshape_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_r10.Tpo $(DEPDIR)/reshape_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_r10.c' object='reshape_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_r10.lo `test -f '$(srcdir)/generated/reshape_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r10.c +- +-reshape_r16.lo: $(srcdir)/generated/reshape_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_r16.lo -MD -MP -MF $(DEPDIR)/reshape_r16.Tpo -c -o reshape_r16.lo `test -f '$(srcdir)/generated/reshape_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_r16.Tpo $(DEPDIR)/reshape_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_r16.c' object='reshape_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_r16.lo `test -f '$(srcdir)/generated/reshape_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_r16.c +- +-reshape_c4.lo: $(srcdir)/generated/reshape_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_c4.lo -MD -MP -MF $(DEPDIR)/reshape_c4.Tpo -c -o reshape_c4.lo `test -f '$(srcdir)/generated/reshape_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_c4.Tpo $(DEPDIR)/reshape_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_c4.c' object='reshape_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_c4.lo `test -f '$(srcdir)/generated/reshape_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c4.c +- +-reshape_c8.lo: $(srcdir)/generated/reshape_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_c8.lo -MD -MP -MF $(DEPDIR)/reshape_c8.Tpo -c -o reshape_c8.lo `test -f '$(srcdir)/generated/reshape_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_c8.Tpo $(DEPDIR)/reshape_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_c8.c' object='reshape_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_c8.lo `test -f '$(srcdir)/generated/reshape_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c8.c +- +-reshape_c10.lo: $(srcdir)/generated/reshape_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_c10.lo -MD -MP -MF $(DEPDIR)/reshape_c10.Tpo -c -o reshape_c10.lo `test -f '$(srcdir)/generated/reshape_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_c10.Tpo $(DEPDIR)/reshape_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_c10.c' object='reshape_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_c10.lo `test -f '$(srcdir)/generated/reshape_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c10.c +- +-reshape_c16.lo: $(srcdir)/generated/reshape_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_c16.lo -MD -MP -MF $(DEPDIR)/reshape_c16.Tpo -c -o reshape_c16.lo `test -f '$(srcdir)/generated/reshape_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_c16.Tpo $(DEPDIR)/reshape_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/reshape_c16.c' object='reshape_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_c16.lo `test -f '$(srcdir)/generated/reshape_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/reshape_c16.c +- +-in_pack_i1.lo: $(srcdir)/generated/in_pack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_i1.lo -MD -MP -MF $(DEPDIR)/in_pack_i1.Tpo -c -o in_pack_i1.lo `test -f '$(srcdir)/generated/in_pack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_i1.Tpo $(DEPDIR)/in_pack_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_i1.c' object='in_pack_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_i1.lo `test -f '$(srcdir)/generated/in_pack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i1.c +- +-in_pack_i2.lo: $(srcdir)/generated/in_pack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_i2.lo -MD -MP -MF $(DEPDIR)/in_pack_i2.Tpo -c -o in_pack_i2.lo `test -f '$(srcdir)/generated/in_pack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_i2.Tpo $(DEPDIR)/in_pack_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_i2.c' object='in_pack_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_i2.lo `test -f '$(srcdir)/generated/in_pack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i2.c +- +-in_pack_i4.lo: $(srcdir)/generated/in_pack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_i4.lo -MD -MP -MF $(DEPDIR)/in_pack_i4.Tpo -c -o in_pack_i4.lo `test -f '$(srcdir)/generated/in_pack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_i4.Tpo $(DEPDIR)/in_pack_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_i4.c' object='in_pack_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_i4.lo `test -f '$(srcdir)/generated/in_pack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i4.c +- +-in_pack_i8.lo: $(srcdir)/generated/in_pack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_i8.lo -MD -MP -MF $(DEPDIR)/in_pack_i8.Tpo -c -o in_pack_i8.lo `test -f '$(srcdir)/generated/in_pack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_i8.Tpo $(DEPDIR)/in_pack_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_i8.c' object='in_pack_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_i8.lo `test -f '$(srcdir)/generated/in_pack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i8.c +- +-in_pack_i16.lo: $(srcdir)/generated/in_pack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_i16.lo -MD -MP -MF $(DEPDIR)/in_pack_i16.Tpo -c -o in_pack_i16.lo `test -f '$(srcdir)/generated/in_pack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_i16.Tpo $(DEPDIR)/in_pack_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_i16.c' object='in_pack_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_i16.lo `test -f '$(srcdir)/generated/in_pack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_i16.c +- +-in_pack_r4.lo: $(srcdir)/generated/in_pack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_r4.lo -MD -MP -MF $(DEPDIR)/in_pack_r4.Tpo -c -o in_pack_r4.lo `test -f '$(srcdir)/generated/in_pack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_r4.Tpo $(DEPDIR)/in_pack_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_r4.c' object='in_pack_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_r4.lo `test -f '$(srcdir)/generated/in_pack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r4.c +- +-in_pack_r8.lo: $(srcdir)/generated/in_pack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_r8.lo -MD -MP -MF $(DEPDIR)/in_pack_r8.Tpo -c -o in_pack_r8.lo `test -f '$(srcdir)/generated/in_pack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_r8.Tpo $(DEPDIR)/in_pack_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_r8.c' object='in_pack_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_r8.lo `test -f '$(srcdir)/generated/in_pack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r8.c +- +-in_pack_r10.lo: $(srcdir)/generated/in_pack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_r10.lo -MD -MP -MF $(DEPDIR)/in_pack_r10.Tpo -c -o in_pack_r10.lo `test -f '$(srcdir)/generated/in_pack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_r10.Tpo $(DEPDIR)/in_pack_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_r10.c' object='in_pack_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_r10.lo `test -f '$(srcdir)/generated/in_pack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r10.c +- +-in_pack_r16.lo: $(srcdir)/generated/in_pack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_r16.lo -MD -MP -MF $(DEPDIR)/in_pack_r16.Tpo -c -o in_pack_r16.lo `test -f '$(srcdir)/generated/in_pack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_r16.Tpo $(DEPDIR)/in_pack_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_r16.c' object='in_pack_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_r16.lo `test -f '$(srcdir)/generated/in_pack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_r16.c +- +-in_pack_c4.lo: $(srcdir)/generated/in_pack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_c4.lo -MD -MP -MF $(DEPDIR)/in_pack_c4.Tpo -c -o in_pack_c4.lo `test -f '$(srcdir)/generated/in_pack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_c4.Tpo $(DEPDIR)/in_pack_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_c4.c' object='in_pack_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_c4.lo `test -f '$(srcdir)/generated/in_pack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c4.c +- +-in_pack_c8.lo: $(srcdir)/generated/in_pack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_c8.lo -MD -MP -MF $(DEPDIR)/in_pack_c8.Tpo -c -o in_pack_c8.lo `test -f '$(srcdir)/generated/in_pack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_c8.Tpo $(DEPDIR)/in_pack_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_c8.c' object='in_pack_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_c8.lo `test -f '$(srcdir)/generated/in_pack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c8.c +- +-in_pack_c10.lo: $(srcdir)/generated/in_pack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_c10.lo -MD -MP -MF $(DEPDIR)/in_pack_c10.Tpo -c -o in_pack_c10.lo `test -f '$(srcdir)/generated/in_pack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_c10.Tpo $(DEPDIR)/in_pack_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_c10.c' object='in_pack_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_c10.lo `test -f '$(srcdir)/generated/in_pack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c10.c +- +-in_pack_c16.lo: $(srcdir)/generated/in_pack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_c16.lo -MD -MP -MF $(DEPDIR)/in_pack_c16.Tpo -c -o in_pack_c16.lo `test -f '$(srcdir)/generated/in_pack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_c16.Tpo $(DEPDIR)/in_pack_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_pack_c16.c' object='in_pack_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_c16.lo `test -f '$(srcdir)/generated/in_pack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_pack_c16.c +- +-in_unpack_i1.lo: $(srcdir)/generated/in_unpack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_i1.lo -MD -MP -MF $(DEPDIR)/in_unpack_i1.Tpo -c -o in_unpack_i1.lo `test -f '$(srcdir)/generated/in_unpack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_i1.Tpo $(DEPDIR)/in_unpack_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_i1.c' object='in_unpack_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_i1.lo `test -f '$(srcdir)/generated/in_unpack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i1.c +- +-in_unpack_i2.lo: $(srcdir)/generated/in_unpack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_i2.lo -MD -MP -MF $(DEPDIR)/in_unpack_i2.Tpo -c -o in_unpack_i2.lo `test -f '$(srcdir)/generated/in_unpack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_i2.Tpo $(DEPDIR)/in_unpack_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_i2.c' object='in_unpack_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_i2.lo `test -f '$(srcdir)/generated/in_unpack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i2.c +- +-in_unpack_i4.lo: $(srcdir)/generated/in_unpack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_i4.lo -MD -MP -MF $(DEPDIR)/in_unpack_i4.Tpo -c -o in_unpack_i4.lo `test -f '$(srcdir)/generated/in_unpack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_i4.Tpo $(DEPDIR)/in_unpack_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_i4.c' object='in_unpack_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_i4.lo `test -f '$(srcdir)/generated/in_unpack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i4.c +- +-in_unpack_i8.lo: $(srcdir)/generated/in_unpack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_i8.lo -MD -MP -MF $(DEPDIR)/in_unpack_i8.Tpo -c -o in_unpack_i8.lo `test -f '$(srcdir)/generated/in_unpack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_i8.Tpo $(DEPDIR)/in_unpack_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_i8.c' object='in_unpack_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_i8.lo `test -f '$(srcdir)/generated/in_unpack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i8.c +- +-in_unpack_i16.lo: $(srcdir)/generated/in_unpack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_i16.lo -MD -MP -MF $(DEPDIR)/in_unpack_i16.Tpo -c -o in_unpack_i16.lo `test -f '$(srcdir)/generated/in_unpack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_i16.Tpo $(DEPDIR)/in_unpack_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_i16.c' object='in_unpack_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_i16.lo `test -f '$(srcdir)/generated/in_unpack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_i16.c +- +-in_unpack_r4.lo: $(srcdir)/generated/in_unpack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_r4.lo -MD -MP -MF $(DEPDIR)/in_unpack_r4.Tpo -c -o in_unpack_r4.lo `test -f '$(srcdir)/generated/in_unpack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_r4.Tpo $(DEPDIR)/in_unpack_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_r4.c' object='in_unpack_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_r4.lo `test -f '$(srcdir)/generated/in_unpack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r4.c +- +-in_unpack_r8.lo: $(srcdir)/generated/in_unpack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_r8.lo -MD -MP -MF $(DEPDIR)/in_unpack_r8.Tpo -c -o in_unpack_r8.lo `test -f '$(srcdir)/generated/in_unpack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_r8.Tpo $(DEPDIR)/in_unpack_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_r8.c' object='in_unpack_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_r8.lo `test -f '$(srcdir)/generated/in_unpack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r8.c +- +-in_unpack_r10.lo: $(srcdir)/generated/in_unpack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_r10.lo -MD -MP -MF $(DEPDIR)/in_unpack_r10.Tpo -c -o in_unpack_r10.lo `test -f '$(srcdir)/generated/in_unpack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_r10.Tpo $(DEPDIR)/in_unpack_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_r10.c' object='in_unpack_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_r10.lo `test -f '$(srcdir)/generated/in_unpack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r10.c +- +-in_unpack_r16.lo: $(srcdir)/generated/in_unpack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_r16.lo -MD -MP -MF $(DEPDIR)/in_unpack_r16.Tpo -c -o in_unpack_r16.lo `test -f '$(srcdir)/generated/in_unpack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_r16.Tpo $(DEPDIR)/in_unpack_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_r16.c' object='in_unpack_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_r16.lo `test -f '$(srcdir)/generated/in_unpack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_r16.c +- +-in_unpack_c4.lo: $(srcdir)/generated/in_unpack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_c4.lo -MD -MP -MF $(DEPDIR)/in_unpack_c4.Tpo -c -o in_unpack_c4.lo `test -f '$(srcdir)/generated/in_unpack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_c4.Tpo $(DEPDIR)/in_unpack_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_c4.c' object='in_unpack_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_c4.lo `test -f '$(srcdir)/generated/in_unpack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c4.c +- +-in_unpack_c8.lo: $(srcdir)/generated/in_unpack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_c8.lo -MD -MP -MF $(DEPDIR)/in_unpack_c8.Tpo -c -o in_unpack_c8.lo `test -f '$(srcdir)/generated/in_unpack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_c8.Tpo $(DEPDIR)/in_unpack_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_c8.c' object='in_unpack_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_c8.lo `test -f '$(srcdir)/generated/in_unpack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c8.c +- +-in_unpack_c10.lo: $(srcdir)/generated/in_unpack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_c10.lo -MD -MP -MF $(DEPDIR)/in_unpack_c10.Tpo -c -o in_unpack_c10.lo `test -f '$(srcdir)/generated/in_unpack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_c10.Tpo $(DEPDIR)/in_unpack_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_c10.c' object='in_unpack_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_c10.lo `test -f '$(srcdir)/generated/in_unpack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c10.c +- +-in_unpack_c16.lo: $(srcdir)/generated/in_unpack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_c16.lo -MD -MP -MF $(DEPDIR)/in_unpack_c16.Tpo -c -o in_unpack_c16.lo `test -f '$(srcdir)/generated/in_unpack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_c16.Tpo $(DEPDIR)/in_unpack_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/in_unpack_c16.c' object='in_unpack_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_c16.lo `test -f '$(srcdir)/generated/in_unpack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/in_unpack_c16.c +- +-pow_i4_i4.lo: $(srcdir)/generated/pow_i4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i4_i4.lo -MD -MP -MF $(DEPDIR)/pow_i4_i4.Tpo -c -o pow_i4_i4.lo `test -f '$(srcdir)/generated/pow_i4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i4_i4.Tpo $(DEPDIR)/pow_i4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i4_i4.c' object='pow_i4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i4_i4.lo `test -f '$(srcdir)/generated/pow_i4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i4_i4.c +- +-pow_i8_i4.lo: $(srcdir)/generated/pow_i8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i8_i4.lo -MD -MP -MF $(DEPDIR)/pow_i8_i4.Tpo -c -o pow_i8_i4.lo `test -f '$(srcdir)/generated/pow_i8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i8_i4.Tpo $(DEPDIR)/pow_i8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i8_i4.c' object='pow_i8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i8_i4.lo `test -f '$(srcdir)/generated/pow_i8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i8_i4.c +- +-pow_i16_i4.lo: $(srcdir)/generated/pow_i16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i16_i4.lo -MD -MP -MF $(DEPDIR)/pow_i16_i4.Tpo -c -o pow_i16_i4.lo `test -f '$(srcdir)/generated/pow_i16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i16_i4.Tpo $(DEPDIR)/pow_i16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i16_i4.c' object='pow_i16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i16_i4.lo `test -f '$(srcdir)/generated/pow_i16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i16_i4.c +- +-pow_r16_i4.lo: $(srcdir)/generated/pow_r16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r16_i4.lo -MD -MP -MF $(DEPDIR)/pow_r16_i4.Tpo -c -o pow_r16_i4.lo `test -f '$(srcdir)/generated/pow_r16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r16_i4.Tpo $(DEPDIR)/pow_r16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r16_i4.c' object='pow_r16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r16_i4.lo `test -f '$(srcdir)/generated/pow_r16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r16_i4.c +- +-pow_c4_i4.lo: $(srcdir)/generated/pow_c4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c4_i4.lo -MD -MP -MF $(DEPDIR)/pow_c4_i4.Tpo -c -o pow_c4_i4.lo `test -f '$(srcdir)/generated/pow_c4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c4_i4.Tpo $(DEPDIR)/pow_c4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c4_i4.c' object='pow_c4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c4_i4.lo `test -f '$(srcdir)/generated/pow_c4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c4_i4.c +- +-pow_c8_i4.lo: $(srcdir)/generated/pow_c8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c8_i4.lo -MD -MP -MF $(DEPDIR)/pow_c8_i4.Tpo -c -o pow_c8_i4.lo `test -f '$(srcdir)/generated/pow_c8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c8_i4.Tpo $(DEPDIR)/pow_c8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c8_i4.c' object='pow_c8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c8_i4.lo `test -f '$(srcdir)/generated/pow_c8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c8_i4.c +- +-pow_c10_i4.lo: $(srcdir)/generated/pow_c10_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c10_i4.lo -MD -MP -MF $(DEPDIR)/pow_c10_i4.Tpo -c -o pow_c10_i4.lo `test -f '$(srcdir)/generated/pow_c10_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c10_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c10_i4.Tpo $(DEPDIR)/pow_c10_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c10_i4.c' object='pow_c10_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c10_i4.lo `test -f '$(srcdir)/generated/pow_c10_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c10_i4.c +- +-pow_c16_i4.lo: $(srcdir)/generated/pow_c16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c16_i4.lo -MD -MP -MF $(DEPDIR)/pow_c16_i4.Tpo -c -o pow_c16_i4.lo `test -f '$(srcdir)/generated/pow_c16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c16_i4.Tpo $(DEPDIR)/pow_c16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c16_i4.c' object='pow_c16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c16_i4.lo `test -f '$(srcdir)/generated/pow_c16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c16_i4.c +- +-pow_i4_i8.lo: $(srcdir)/generated/pow_i4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i4_i8.lo -MD -MP -MF $(DEPDIR)/pow_i4_i8.Tpo -c -o pow_i4_i8.lo `test -f '$(srcdir)/generated/pow_i4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i4_i8.Tpo $(DEPDIR)/pow_i4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i4_i8.c' object='pow_i4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i4_i8.lo `test -f '$(srcdir)/generated/pow_i4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i4_i8.c +- +-pow_i8_i8.lo: $(srcdir)/generated/pow_i8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i8_i8.lo -MD -MP -MF $(DEPDIR)/pow_i8_i8.Tpo -c -o pow_i8_i8.lo `test -f '$(srcdir)/generated/pow_i8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i8_i8.Tpo $(DEPDIR)/pow_i8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i8_i8.c' object='pow_i8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i8_i8.lo `test -f '$(srcdir)/generated/pow_i8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i8_i8.c +- +-pow_i16_i8.lo: $(srcdir)/generated/pow_i16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i16_i8.lo -MD -MP -MF $(DEPDIR)/pow_i16_i8.Tpo -c -o pow_i16_i8.lo `test -f '$(srcdir)/generated/pow_i16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i16_i8.Tpo $(DEPDIR)/pow_i16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i16_i8.c' object='pow_i16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i16_i8.lo `test -f '$(srcdir)/generated/pow_i16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i16_i8.c +- +-pow_r4_i8.lo: $(srcdir)/generated/pow_r4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r4_i8.lo -MD -MP -MF $(DEPDIR)/pow_r4_i8.Tpo -c -o pow_r4_i8.lo `test -f '$(srcdir)/generated/pow_r4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r4_i8.Tpo $(DEPDIR)/pow_r4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r4_i8.c' object='pow_r4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r4_i8.lo `test -f '$(srcdir)/generated/pow_r4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r4_i8.c +- +-pow_r8_i8.lo: $(srcdir)/generated/pow_r8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r8_i8.lo -MD -MP -MF $(DEPDIR)/pow_r8_i8.Tpo -c -o pow_r8_i8.lo `test -f '$(srcdir)/generated/pow_r8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r8_i8.Tpo $(DEPDIR)/pow_r8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r8_i8.c' object='pow_r8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r8_i8.lo `test -f '$(srcdir)/generated/pow_r8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r8_i8.c +- +-pow_r10_i8.lo: $(srcdir)/generated/pow_r10_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r10_i8.lo -MD -MP -MF $(DEPDIR)/pow_r10_i8.Tpo -c -o pow_r10_i8.lo `test -f '$(srcdir)/generated/pow_r10_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r10_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r10_i8.Tpo $(DEPDIR)/pow_r10_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r10_i8.c' object='pow_r10_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r10_i8.lo `test -f '$(srcdir)/generated/pow_r10_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r10_i8.c +- +-pow_r16_i8.lo: $(srcdir)/generated/pow_r16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r16_i8.lo -MD -MP -MF $(DEPDIR)/pow_r16_i8.Tpo -c -o pow_r16_i8.lo `test -f '$(srcdir)/generated/pow_r16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r16_i8.Tpo $(DEPDIR)/pow_r16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r16_i8.c' object='pow_r16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r16_i8.lo `test -f '$(srcdir)/generated/pow_r16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r16_i8.c +- +-pow_c4_i8.lo: $(srcdir)/generated/pow_c4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c4_i8.lo -MD -MP -MF $(DEPDIR)/pow_c4_i8.Tpo -c -o pow_c4_i8.lo `test -f '$(srcdir)/generated/pow_c4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c4_i8.Tpo $(DEPDIR)/pow_c4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c4_i8.c' object='pow_c4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c4_i8.lo `test -f '$(srcdir)/generated/pow_c4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c4_i8.c +- +-pow_c8_i8.lo: $(srcdir)/generated/pow_c8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c8_i8.lo -MD -MP -MF $(DEPDIR)/pow_c8_i8.Tpo -c -o pow_c8_i8.lo `test -f '$(srcdir)/generated/pow_c8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c8_i8.Tpo $(DEPDIR)/pow_c8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c8_i8.c' object='pow_c8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c8_i8.lo `test -f '$(srcdir)/generated/pow_c8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c8_i8.c +- +-pow_c10_i8.lo: $(srcdir)/generated/pow_c10_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c10_i8.lo -MD -MP -MF $(DEPDIR)/pow_c10_i8.Tpo -c -o pow_c10_i8.lo `test -f '$(srcdir)/generated/pow_c10_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c10_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c10_i8.Tpo $(DEPDIR)/pow_c10_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c10_i8.c' object='pow_c10_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c10_i8.lo `test -f '$(srcdir)/generated/pow_c10_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c10_i8.c +- +-pow_c16_i8.lo: $(srcdir)/generated/pow_c16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c16_i8.lo -MD -MP -MF $(DEPDIR)/pow_c16_i8.Tpo -c -o pow_c16_i8.lo `test -f '$(srcdir)/generated/pow_c16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c16_i8.Tpo $(DEPDIR)/pow_c16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c16_i8.c' object='pow_c16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c16_i8.lo `test -f '$(srcdir)/generated/pow_c16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c16_i8.c +- +-pow_i4_i16.lo: $(srcdir)/generated/pow_i4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i4_i16.lo -MD -MP -MF $(DEPDIR)/pow_i4_i16.Tpo -c -o pow_i4_i16.lo `test -f '$(srcdir)/generated/pow_i4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i4_i16.Tpo $(DEPDIR)/pow_i4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i4_i16.c' object='pow_i4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i4_i16.lo `test -f '$(srcdir)/generated/pow_i4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i4_i16.c +- +-pow_i8_i16.lo: $(srcdir)/generated/pow_i8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i8_i16.lo -MD -MP -MF $(DEPDIR)/pow_i8_i16.Tpo -c -o pow_i8_i16.lo `test -f '$(srcdir)/generated/pow_i8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i8_i16.Tpo $(DEPDIR)/pow_i8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i8_i16.c' object='pow_i8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i8_i16.lo `test -f '$(srcdir)/generated/pow_i8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i8_i16.c +- +-pow_i16_i16.lo: $(srcdir)/generated/pow_i16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_i16_i16.lo -MD -MP -MF $(DEPDIR)/pow_i16_i16.Tpo -c -o pow_i16_i16.lo `test -f '$(srcdir)/generated/pow_i16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_i16_i16.Tpo $(DEPDIR)/pow_i16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_i16_i16.c' object='pow_i16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_i16_i16.lo `test -f '$(srcdir)/generated/pow_i16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_i16_i16.c +- +-pow_r4_i16.lo: $(srcdir)/generated/pow_r4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r4_i16.lo -MD -MP -MF $(DEPDIR)/pow_r4_i16.Tpo -c -o pow_r4_i16.lo `test -f '$(srcdir)/generated/pow_r4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r4_i16.Tpo $(DEPDIR)/pow_r4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r4_i16.c' object='pow_r4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r4_i16.lo `test -f '$(srcdir)/generated/pow_r4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r4_i16.c +- +-pow_r8_i16.lo: $(srcdir)/generated/pow_r8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r8_i16.lo -MD -MP -MF $(DEPDIR)/pow_r8_i16.Tpo -c -o pow_r8_i16.lo `test -f '$(srcdir)/generated/pow_r8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r8_i16.Tpo $(DEPDIR)/pow_r8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r8_i16.c' object='pow_r8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r8_i16.lo `test -f '$(srcdir)/generated/pow_r8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r8_i16.c +- +-pow_r10_i16.lo: $(srcdir)/generated/pow_r10_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r10_i16.lo -MD -MP -MF $(DEPDIR)/pow_r10_i16.Tpo -c -o pow_r10_i16.lo `test -f '$(srcdir)/generated/pow_r10_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r10_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r10_i16.Tpo $(DEPDIR)/pow_r10_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r10_i16.c' object='pow_r10_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r10_i16.lo `test -f '$(srcdir)/generated/pow_r10_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r10_i16.c +- +-pow_r16_i16.lo: $(srcdir)/generated/pow_r16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_r16_i16.lo -MD -MP -MF $(DEPDIR)/pow_r16_i16.Tpo -c -o pow_r16_i16.lo `test -f '$(srcdir)/generated/pow_r16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_r16_i16.Tpo $(DEPDIR)/pow_r16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_r16_i16.c' object='pow_r16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_r16_i16.lo `test -f '$(srcdir)/generated/pow_r16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_r16_i16.c +- +-pow_c4_i16.lo: $(srcdir)/generated/pow_c4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c4_i16.lo -MD -MP -MF $(DEPDIR)/pow_c4_i16.Tpo -c -o pow_c4_i16.lo `test -f '$(srcdir)/generated/pow_c4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c4_i16.Tpo $(DEPDIR)/pow_c4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c4_i16.c' object='pow_c4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c4_i16.lo `test -f '$(srcdir)/generated/pow_c4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c4_i16.c +- +-pow_c8_i16.lo: $(srcdir)/generated/pow_c8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c8_i16.lo -MD -MP -MF $(DEPDIR)/pow_c8_i16.Tpo -c -o pow_c8_i16.lo `test -f '$(srcdir)/generated/pow_c8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c8_i16.Tpo $(DEPDIR)/pow_c8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c8_i16.c' object='pow_c8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c8_i16.lo `test -f '$(srcdir)/generated/pow_c8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c8_i16.c +- +-pow_c10_i16.lo: $(srcdir)/generated/pow_c10_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c10_i16.lo -MD -MP -MF $(DEPDIR)/pow_c10_i16.Tpo -c -o pow_c10_i16.lo `test -f '$(srcdir)/generated/pow_c10_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c10_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c10_i16.Tpo $(DEPDIR)/pow_c10_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c10_i16.c' object='pow_c10_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c10_i16.lo `test -f '$(srcdir)/generated/pow_c10_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c10_i16.c +- +-pow_c16_i16.lo: $(srcdir)/generated/pow_c16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pow_c16_i16.lo -MD -MP -MF $(DEPDIR)/pow_c16_i16.Tpo -c -o pow_c16_i16.lo `test -f '$(srcdir)/generated/pow_c16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pow_c16_i16.Tpo $(DEPDIR)/pow_c16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pow_c16_i16.c' object='pow_c16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pow_c16_i16.lo `test -f '$(srcdir)/generated/pow_c16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pow_c16_i16.c +- +-pack_i1.lo: $(srcdir)/generated/pack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_i1.lo -MD -MP -MF $(DEPDIR)/pack_i1.Tpo -c -o pack_i1.lo `test -f '$(srcdir)/generated/pack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_i1.Tpo $(DEPDIR)/pack_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_i1.c' object='pack_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_i1.lo `test -f '$(srcdir)/generated/pack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i1.c +- +-pack_i2.lo: $(srcdir)/generated/pack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_i2.lo -MD -MP -MF $(DEPDIR)/pack_i2.Tpo -c -o pack_i2.lo `test -f '$(srcdir)/generated/pack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_i2.Tpo $(DEPDIR)/pack_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_i2.c' object='pack_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_i2.lo `test -f '$(srcdir)/generated/pack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i2.c +- +-pack_i4.lo: $(srcdir)/generated/pack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_i4.lo -MD -MP -MF $(DEPDIR)/pack_i4.Tpo -c -o pack_i4.lo `test -f '$(srcdir)/generated/pack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_i4.Tpo $(DEPDIR)/pack_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_i4.c' object='pack_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_i4.lo `test -f '$(srcdir)/generated/pack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i4.c +- +-pack_i8.lo: $(srcdir)/generated/pack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_i8.lo -MD -MP -MF $(DEPDIR)/pack_i8.Tpo -c -o pack_i8.lo `test -f '$(srcdir)/generated/pack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_i8.Tpo $(DEPDIR)/pack_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_i8.c' object='pack_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_i8.lo `test -f '$(srcdir)/generated/pack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i8.c +- +-pack_i16.lo: $(srcdir)/generated/pack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_i16.lo -MD -MP -MF $(DEPDIR)/pack_i16.Tpo -c -o pack_i16.lo `test -f '$(srcdir)/generated/pack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_i16.Tpo $(DEPDIR)/pack_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_i16.c' object='pack_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_i16.lo `test -f '$(srcdir)/generated/pack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_i16.c +- +-pack_r4.lo: $(srcdir)/generated/pack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_r4.lo -MD -MP -MF $(DEPDIR)/pack_r4.Tpo -c -o pack_r4.lo `test -f '$(srcdir)/generated/pack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_r4.Tpo $(DEPDIR)/pack_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_r4.c' object='pack_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_r4.lo `test -f '$(srcdir)/generated/pack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r4.c +- +-pack_r8.lo: $(srcdir)/generated/pack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_r8.lo -MD -MP -MF $(DEPDIR)/pack_r8.Tpo -c -o pack_r8.lo `test -f '$(srcdir)/generated/pack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_r8.Tpo $(DEPDIR)/pack_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_r8.c' object='pack_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_r8.lo `test -f '$(srcdir)/generated/pack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r8.c +- +-pack_r10.lo: $(srcdir)/generated/pack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_r10.lo -MD -MP -MF $(DEPDIR)/pack_r10.Tpo -c -o pack_r10.lo `test -f '$(srcdir)/generated/pack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_r10.Tpo $(DEPDIR)/pack_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_r10.c' object='pack_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_r10.lo `test -f '$(srcdir)/generated/pack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r10.c +- +-pack_r16.lo: $(srcdir)/generated/pack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_r16.lo -MD -MP -MF $(DEPDIR)/pack_r16.Tpo -c -o pack_r16.lo `test -f '$(srcdir)/generated/pack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_r16.Tpo $(DEPDIR)/pack_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_r16.c' object='pack_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_r16.lo `test -f '$(srcdir)/generated/pack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_r16.c +- +-pack_c4.lo: $(srcdir)/generated/pack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_c4.lo -MD -MP -MF $(DEPDIR)/pack_c4.Tpo -c -o pack_c4.lo `test -f '$(srcdir)/generated/pack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_c4.Tpo $(DEPDIR)/pack_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_c4.c' object='pack_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_c4.lo `test -f '$(srcdir)/generated/pack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c4.c +- +-pack_c8.lo: $(srcdir)/generated/pack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_c8.lo -MD -MP -MF $(DEPDIR)/pack_c8.Tpo -c -o pack_c8.lo `test -f '$(srcdir)/generated/pack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_c8.Tpo $(DEPDIR)/pack_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_c8.c' object='pack_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_c8.lo `test -f '$(srcdir)/generated/pack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c8.c +- +-pack_c10.lo: $(srcdir)/generated/pack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_c10.lo -MD -MP -MF $(DEPDIR)/pack_c10.Tpo -c -o pack_c10.lo `test -f '$(srcdir)/generated/pack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_c10.Tpo $(DEPDIR)/pack_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_c10.c' object='pack_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_c10.lo `test -f '$(srcdir)/generated/pack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c10.c +- +-pack_c16.lo: $(srcdir)/generated/pack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_c16.lo -MD -MP -MF $(DEPDIR)/pack_c16.Tpo -c -o pack_c16.lo `test -f '$(srcdir)/generated/pack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_c16.Tpo $(DEPDIR)/pack_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/pack_c16.c' object='pack_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_c16.lo `test -f '$(srcdir)/generated/pack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/pack_c16.c +- +-unpack_i1.lo: $(srcdir)/generated/unpack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_i1.lo -MD -MP -MF $(DEPDIR)/unpack_i1.Tpo -c -o unpack_i1.lo `test -f '$(srcdir)/generated/unpack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_i1.Tpo $(DEPDIR)/unpack_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_i1.c' object='unpack_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_i1.lo `test -f '$(srcdir)/generated/unpack_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i1.c +- +-unpack_i2.lo: $(srcdir)/generated/unpack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_i2.lo -MD -MP -MF $(DEPDIR)/unpack_i2.Tpo -c -o unpack_i2.lo `test -f '$(srcdir)/generated/unpack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_i2.Tpo $(DEPDIR)/unpack_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_i2.c' object='unpack_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_i2.lo `test -f '$(srcdir)/generated/unpack_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i2.c +- +-unpack_i4.lo: $(srcdir)/generated/unpack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_i4.lo -MD -MP -MF $(DEPDIR)/unpack_i4.Tpo -c -o unpack_i4.lo `test -f '$(srcdir)/generated/unpack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_i4.Tpo $(DEPDIR)/unpack_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_i4.c' object='unpack_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_i4.lo `test -f '$(srcdir)/generated/unpack_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i4.c +- +-unpack_i8.lo: $(srcdir)/generated/unpack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_i8.lo -MD -MP -MF $(DEPDIR)/unpack_i8.Tpo -c -o unpack_i8.lo `test -f '$(srcdir)/generated/unpack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_i8.Tpo $(DEPDIR)/unpack_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_i8.c' object='unpack_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_i8.lo `test -f '$(srcdir)/generated/unpack_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i8.c +- +-unpack_i16.lo: $(srcdir)/generated/unpack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_i16.lo -MD -MP -MF $(DEPDIR)/unpack_i16.Tpo -c -o unpack_i16.lo `test -f '$(srcdir)/generated/unpack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_i16.Tpo $(DEPDIR)/unpack_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_i16.c' object='unpack_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_i16.lo `test -f '$(srcdir)/generated/unpack_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_i16.c +- +-unpack_r4.lo: $(srcdir)/generated/unpack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_r4.lo -MD -MP -MF $(DEPDIR)/unpack_r4.Tpo -c -o unpack_r4.lo `test -f '$(srcdir)/generated/unpack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_r4.Tpo $(DEPDIR)/unpack_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_r4.c' object='unpack_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_r4.lo `test -f '$(srcdir)/generated/unpack_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r4.c +- +-unpack_r8.lo: $(srcdir)/generated/unpack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_r8.lo -MD -MP -MF $(DEPDIR)/unpack_r8.Tpo -c -o unpack_r8.lo `test -f '$(srcdir)/generated/unpack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_r8.Tpo $(DEPDIR)/unpack_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_r8.c' object='unpack_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_r8.lo `test -f '$(srcdir)/generated/unpack_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r8.c +- +-unpack_r10.lo: $(srcdir)/generated/unpack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_r10.lo -MD -MP -MF $(DEPDIR)/unpack_r10.Tpo -c -o unpack_r10.lo `test -f '$(srcdir)/generated/unpack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_r10.Tpo $(DEPDIR)/unpack_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_r10.c' object='unpack_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_r10.lo `test -f '$(srcdir)/generated/unpack_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r10.c +- +-unpack_r16.lo: $(srcdir)/generated/unpack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_r16.lo -MD -MP -MF $(DEPDIR)/unpack_r16.Tpo -c -o unpack_r16.lo `test -f '$(srcdir)/generated/unpack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_r16.Tpo $(DEPDIR)/unpack_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_r16.c' object='unpack_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_r16.lo `test -f '$(srcdir)/generated/unpack_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_r16.c +- +-unpack_c4.lo: $(srcdir)/generated/unpack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_c4.lo -MD -MP -MF $(DEPDIR)/unpack_c4.Tpo -c -o unpack_c4.lo `test -f '$(srcdir)/generated/unpack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_c4.Tpo $(DEPDIR)/unpack_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_c4.c' object='unpack_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_c4.lo `test -f '$(srcdir)/generated/unpack_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c4.c +- +-unpack_c8.lo: $(srcdir)/generated/unpack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_c8.lo -MD -MP -MF $(DEPDIR)/unpack_c8.Tpo -c -o unpack_c8.lo `test -f '$(srcdir)/generated/unpack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_c8.Tpo $(DEPDIR)/unpack_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_c8.c' object='unpack_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_c8.lo `test -f '$(srcdir)/generated/unpack_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c8.c +- +-unpack_c10.lo: $(srcdir)/generated/unpack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_c10.lo -MD -MP -MF $(DEPDIR)/unpack_c10.Tpo -c -o unpack_c10.lo `test -f '$(srcdir)/generated/unpack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_c10.Tpo $(DEPDIR)/unpack_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_c10.c' object='unpack_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_c10.lo `test -f '$(srcdir)/generated/unpack_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c10.c +- +-unpack_c16.lo: $(srcdir)/generated/unpack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_c16.lo -MD -MP -MF $(DEPDIR)/unpack_c16.Tpo -c -o unpack_c16.lo `test -f '$(srcdir)/generated/unpack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_c16.Tpo $(DEPDIR)/unpack_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/unpack_c16.c' object='unpack_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_c16.lo `test -f '$(srcdir)/generated/unpack_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/unpack_c16.c +- +-matmulavx128_i1.lo: $(srcdir)/generated/matmulavx128_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_i1.lo -MD -MP -MF $(DEPDIR)/matmulavx128_i1.Tpo -c -o matmulavx128_i1.lo `test -f '$(srcdir)/generated/matmulavx128_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_i1.Tpo $(DEPDIR)/matmulavx128_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_i1.c' object='matmulavx128_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_i1.lo `test -f '$(srcdir)/generated/matmulavx128_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i1.c +- +-matmulavx128_i2.lo: $(srcdir)/generated/matmulavx128_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_i2.lo -MD -MP -MF $(DEPDIR)/matmulavx128_i2.Tpo -c -o matmulavx128_i2.lo `test -f '$(srcdir)/generated/matmulavx128_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_i2.Tpo $(DEPDIR)/matmulavx128_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_i2.c' object='matmulavx128_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_i2.lo `test -f '$(srcdir)/generated/matmulavx128_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i2.c +- +-matmulavx128_i4.lo: $(srcdir)/generated/matmulavx128_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_i4.lo -MD -MP -MF $(DEPDIR)/matmulavx128_i4.Tpo -c -o matmulavx128_i4.lo `test -f '$(srcdir)/generated/matmulavx128_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_i4.Tpo $(DEPDIR)/matmulavx128_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_i4.c' object='matmulavx128_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_i4.lo `test -f '$(srcdir)/generated/matmulavx128_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i4.c +- +-matmulavx128_i8.lo: $(srcdir)/generated/matmulavx128_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_i8.lo -MD -MP -MF $(DEPDIR)/matmulavx128_i8.Tpo -c -o matmulavx128_i8.lo `test -f '$(srcdir)/generated/matmulavx128_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_i8.Tpo $(DEPDIR)/matmulavx128_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_i8.c' object='matmulavx128_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_i8.lo `test -f '$(srcdir)/generated/matmulavx128_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i8.c +- +-matmulavx128_i16.lo: $(srcdir)/generated/matmulavx128_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_i16.lo -MD -MP -MF $(DEPDIR)/matmulavx128_i16.Tpo -c -o matmulavx128_i16.lo `test -f '$(srcdir)/generated/matmulavx128_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_i16.Tpo $(DEPDIR)/matmulavx128_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_i16.c' object='matmulavx128_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_i16.lo `test -f '$(srcdir)/generated/matmulavx128_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_i16.c +- +-matmulavx128_r4.lo: $(srcdir)/generated/matmulavx128_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_r4.lo -MD -MP -MF $(DEPDIR)/matmulavx128_r4.Tpo -c -o matmulavx128_r4.lo `test -f '$(srcdir)/generated/matmulavx128_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_r4.Tpo $(DEPDIR)/matmulavx128_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_r4.c' object='matmulavx128_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_r4.lo `test -f '$(srcdir)/generated/matmulavx128_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r4.c +- +-matmulavx128_r8.lo: $(srcdir)/generated/matmulavx128_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_r8.lo -MD -MP -MF $(DEPDIR)/matmulavx128_r8.Tpo -c -o matmulavx128_r8.lo `test -f '$(srcdir)/generated/matmulavx128_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_r8.Tpo $(DEPDIR)/matmulavx128_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_r8.c' object='matmulavx128_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_r8.lo `test -f '$(srcdir)/generated/matmulavx128_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r8.c +- +-matmulavx128_r10.lo: $(srcdir)/generated/matmulavx128_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_r10.lo -MD -MP -MF $(DEPDIR)/matmulavx128_r10.Tpo -c -o matmulavx128_r10.lo `test -f '$(srcdir)/generated/matmulavx128_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_r10.Tpo $(DEPDIR)/matmulavx128_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_r10.c' object='matmulavx128_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_r10.lo `test -f '$(srcdir)/generated/matmulavx128_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r10.c +- +-matmulavx128_r16.lo: $(srcdir)/generated/matmulavx128_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_r16.lo -MD -MP -MF $(DEPDIR)/matmulavx128_r16.Tpo -c -o matmulavx128_r16.lo `test -f '$(srcdir)/generated/matmulavx128_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_r16.Tpo $(DEPDIR)/matmulavx128_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_r16.c' object='matmulavx128_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_r16.lo `test -f '$(srcdir)/generated/matmulavx128_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_r16.c +- +-matmulavx128_c4.lo: $(srcdir)/generated/matmulavx128_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_c4.lo -MD -MP -MF $(DEPDIR)/matmulavx128_c4.Tpo -c -o matmulavx128_c4.lo `test -f '$(srcdir)/generated/matmulavx128_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_c4.Tpo $(DEPDIR)/matmulavx128_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_c4.c' object='matmulavx128_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_c4.lo `test -f '$(srcdir)/generated/matmulavx128_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c4.c +- +-matmulavx128_c8.lo: $(srcdir)/generated/matmulavx128_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_c8.lo -MD -MP -MF $(DEPDIR)/matmulavx128_c8.Tpo -c -o matmulavx128_c8.lo `test -f '$(srcdir)/generated/matmulavx128_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_c8.Tpo $(DEPDIR)/matmulavx128_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_c8.c' object='matmulavx128_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_c8.lo `test -f '$(srcdir)/generated/matmulavx128_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c8.c +- +-matmulavx128_c10.lo: $(srcdir)/generated/matmulavx128_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_c10.lo -MD -MP -MF $(DEPDIR)/matmulavx128_c10.Tpo -c -o matmulavx128_c10.lo `test -f '$(srcdir)/generated/matmulavx128_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_c10.Tpo $(DEPDIR)/matmulavx128_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_c10.c' object='matmulavx128_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_c10.lo `test -f '$(srcdir)/generated/matmulavx128_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c10.c +- +-matmulavx128_c16.lo: $(srcdir)/generated/matmulavx128_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matmulavx128_c16.lo -MD -MP -MF $(DEPDIR)/matmulavx128_c16.Tpo -c -o matmulavx128_c16.lo `test -f '$(srcdir)/generated/matmulavx128_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matmulavx128_c16.Tpo $(DEPDIR)/matmulavx128_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/matmulavx128_c16.c' object='matmulavx128_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matmulavx128_c16.lo `test -f '$(srcdir)/generated/matmulavx128_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/matmulavx128_c16.c +- +-spread_i1.lo: $(srcdir)/generated/spread_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_i1.lo -MD -MP -MF $(DEPDIR)/spread_i1.Tpo -c -o spread_i1.lo `test -f '$(srcdir)/generated/spread_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_i1.Tpo $(DEPDIR)/spread_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_i1.c' object='spread_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_i1.lo `test -f '$(srcdir)/generated/spread_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i1.c +- +-spread_i2.lo: $(srcdir)/generated/spread_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_i2.lo -MD -MP -MF $(DEPDIR)/spread_i2.Tpo -c -o spread_i2.lo `test -f '$(srcdir)/generated/spread_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_i2.Tpo $(DEPDIR)/spread_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_i2.c' object='spread_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_i2.lo `test -f '$(srcdir)/generated/spread_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i2.c +- +-spread_i4.lo: $(srcdir)/generated/spread_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_i4.lo -MD -MP -MF $(DEPDIR)/spread_i4.Tpo -c -o spread_i4.lo `test -f '$(srcdir)/generated/spread_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_i4.Tpo $(DEPDIR)/spread_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_i4.c' object='spread_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_i4.lo `test -f '$(srcdir)/generated/spread_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i4.c +- +-spread_i8.lo: $(srcdir)/generated/spread_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_i8.lo -MD -MP -MF $(DEPDIR)/spread_i8.Tpo -c -o spread_i8.lo `test -f '$(srcdir)/generated/spread_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_i8.Tpo $(DEPDIR)/spread_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_i8.c' object='spread_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_i8.lo `test -f '$(srcdir)/generated/spread_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i8.c +- +-spread_i16.lo: $(srcdir)/generated/spread_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_i16.lo -MD -MP -MF $(DEPDIR)/spread_i16.Tpo -c -o spread_i16.lo `test -f '$(srcdir)/generated/spread_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_i16.Tpo $(DEPDIR)/spread_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_i16.c' object='spread_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_i16.lo `test -f '$(srcdir)/generated/spread_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_i16.c +- +-spread_r4.lo: $(srcdir)/generated/spread_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_r4.lo -MD -MP -MF $(DEPDIR)/spread_r4.Tpo -c -o spread_r4.lo `test -f '$(srcdir)/generated/spread_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_r4.Tpo $(DEPDIR)/spread_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_r4.c' object='spread_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_r4.lo `test -f '$(srcdir)/generated/spread_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r4.c +- +-spread_r8.lo: $(srcdir)/generated/spread_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_r8.lo -MD -MP -MF $(DEPDIR)/spread_r8.Tpo -c -o spread_r8.lo `test -f '$(srcdir)/generated/spread_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_r8.Tpo $(DEPDIR)/spread_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_r8.c' object='spread_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_r8.lo `test -f '$(srcdir)/generated/spread_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r8.c +- +-spread_r10.lo: $(srcdir)/generated/spread_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_r10.lo -MD -MP -MF $(DEPDIR)/spread_r10.Tpo -c -o spread_r10.lo `test -f '$(srcdir)/generated/spread_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_r10.Tpo $(DEPDIR)/spread_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_r10.c' object='spread_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_r10.lo `test -f '$(srcdir)/generated/spread_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r10.c +- +-spread_r16.lo: $(srcdir)/generated/spread_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_r16.lo -MD -MP -MF $(DEPDIR)/spread_r16.Tpo -c -o spread_r16.lo `test -f '$(srcdir)/generated/spread_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_r16.Tpo $(DEPDIR)/spread_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_r16.c' object='spread_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_r16.lo `test -f '$(srcdir)/generated/spread_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_r16.c +- +-spread_c4.lo: $(srcdir)/generated/spread_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_c4.lo -MD -MP -MF $(DEPDIR)/spread_c4.Tpo -c -o spread_c4.lo `test -f '$(srcdir)/generated/spread_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_c4.Tpo $(DEPDIR)/spread_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_c4.c' object='spread_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_c4.lo `test -f '$(srcdir)/generated/spread_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c4.c +- +-spread_c8.lo: $(srcdir)/generated/spread_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_c8.lo -MD -MP -MF $(DEPDIR)/spread_c8.Tpo -c -o spread_c8.lo `test -f '$(srcdir)/generated/spread_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_c8.Tpo $(DEPDIR)/spread_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_c8.c' object='spread_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_c8.lo `test -f '$(srcdir)/generated/spread_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c8.c +- +-spread_c10.lo: $(srcdir)/generated/spread_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_c10.lo -MD -MP -MF $(DEPDIR)/spread_c10.Tpo -c -o spread_c10.lo `test -f '$(srcdir)/generated/spread_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_c10.Tpo $(DEPDIR)/spread_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_c10.c' object='spread_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_c10.lo `test -f '$(srcdir)/generated/spread_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c10.c +- +-spread_c16.lo: $(srcdir)/generated/spread_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_c16.lo -MD -MP -MF $(DEPDIR)/spread_c16.Tpo -c -o spread_c16.lo `test -f '$(srcdir)/generated/spread_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_c16.Tpo $(DEPDIR)/spread_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/spread_c16.c' object='spread_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_c16.lo `test -f '$(srcdir)/generated/spread_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/spread_c16.c +- +-cshift0_i1.lo: $(srcdir)/generated/cshift0_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_i1.lo -MD -MP -MF $(DEPDIR)/cshift0_i1.Tpo -c -o cshift0_i1.lo `test -f '$(srcdir)/generated/cshift0_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_i1.Tpo $(DEPDIR)/cshift0_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_i1.c' object='cshift0_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_i1.lo `test -f '$(srcdir)/generated/cshift0_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i1.c +- +-cshift0_i2.lo: $(srcdir)/generated/cshift0_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_i2.lo -MD -MP -MF $(DEPDIR)/cshift0_i2.Tpo -c -o cshift0_i2.lo `test -f '$(srcdir)/generated/cshift0_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_i2.Tpo $(DEPDIR)/cshift0_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_i2.c' object='cshift0_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_i2.lo `test -f '$(srcdir)/generated/cshift0_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i2.c +- +-cshift0_i4.lo: $(srcdir)/generated/cshift0_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_i4.lo -MD -MP -MF $(DEPDIR)/cshift0_i4.Tpo -c -o cshift0_i4.lo `test -f '$(srcdir)/generated/cshift0_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_i4.Tpo $(DEPDIR)/cshift0_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_i4.c' object='cshift0_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_i4.lo `test -f '$(srcdir)/generated/cshift0_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i4.c +- +-cshift0_i8.lo: $(srcdir)/generated/cshift0_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_i8.lo -MD -MP -MF $(DEPDIR)/cshift0_i8.Tpo -c -o cshift0_i8.lo `test -f '$(srcdir)/generated/cshift0_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_i8.Tpo $(DEPDIR)/cshift0_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_i8.c' object='cshift0_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_i8.lo `test -f '$(srcdir)/generated/cshift0_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i8.c +- +-cshift0_i16.lo: $(srcdir)/generated/cshift0_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_i16.lo -MD -MP -MF $(DEPDIR)/cshift0_i16.Tpo -c -o cshift0_i16.lo `test -f '$(srcdir)/generated/cshift0_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_i16.Tpo $(DEPDIR)/cshift0_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_i16.c' object='cshift0_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_i16.lo `test -f '$(srcdir)/generated/cshift0_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_i16.c +- +-cshift0_r4.lo: $(srcdir)/generated/cshift0_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_r4.lo -MD -MP -MF $(DEPDIR)/cshift0_r4.Tpo -c -o cshift0_r4.lo `test -f '$(srcdir)/generated/cshift0_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_r4.Tpo $(DEPDIR)/cshift0_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_r4.c' object='cshift0_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_r4.lo `test -f '$(srcdir)/generated/cshift0_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r4.c +- +-cshift0_r8.lo: $(srcdir)/generated/cshift0_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_r8.lo -MD -MP -MF $(DEPDIR)/cshift0_r8.Tpo -c -o cshift0_r8.lo `test -f '$(srcdir)/generated/cshift0_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_r8.Tpo $(DEPDIR)/cshift0_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_r8.c' object='cshift0_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_r8.lo `test -f '$(srcdir)/generated/cshift0_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r8.c +- +-cshift0_r10.lo: $(srcdir)/generated/cshift0_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_r10.lo -MD -MP -MF $(DEPDIR)/cshift0_r10.Tpo -c -o cshift0_r10.lo `test -f '$(srcdir)/generated/cshift0_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_r10.Tpo $(DEPDIR)/cshift0_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_r10.c' object='cshift0_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_r10.lo `test -f '$(srcdir)/generated/cshift0_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r10.c +- +-cshift0_r16.lo: $(srcdir)/generated/cshift0_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_r16.lo -MD -MP -MF $(DEPDIR)/cshift0_r16.Tpo -c -o cshift0_r16.lo `test -f '$(srcdir)/generated/cshift0_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_r16.Tpo $(DEPDIR)/cshift0_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_r16.c' object='cshift0_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_r16.lo `test -f '$(srcdir)/generated/cshift0_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_r16.c +- +-cshift0_c4.lo: $(srcdir)/generated/cshift0_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_c4.lo -MD -MP -MF $(DEPDIR)/cshift0_c4.Tpo -c -o cshift0_c4.lo `test -f '$(srcdir)/generated/cshift0_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_c4.Tpo $(DEPDIR)/cshift0_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_c4.c' object='cshift0_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_c4.lo `test -f '$(srcdir)/generated/cshift0_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c4.c +- +-cshift0_c8.lo: $(srcdir)/generated/cshift0_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_c8.lo -MD -MP -MF $(DEPDIR)/cshift0_c8.Tpo -c -o cshift0_c8.lo `test -f '$(srcdir)/generated/cshift0_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_c8.Tpo $(DEPDIR)/cshift0_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_c8.c' object='cshift0_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_c8.lo `test -f '$(srcdir)/generated/cshift0_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c8.c +- +-cshift0_c10.lo: $(srcdir)/generated/cshift0_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_c10.lo -MD -MP -MF $(DEPDIR)/cshift0_c10.Tpo -c -o cshift0_c10.lo `test -f '$(srcdir)/generated/cshift0_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_c10.Tpo $(DEPDIR)/cshift0_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_c10.c' object='cshift0_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_c10.lo `test -f '$(srcdir)/generated/cshift0_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c10.c +- +-cshift0_c16.lo: $(srcdir)/generated/cshift0_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0_c16.lo -MD -MP -MF $(DEPDIR)/cshift0_c16.Tpo -c -o cshift0_c16.lo `test -f '$(srcdir)/generated/cshift0_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0_c16.Tpo $(DEPDIR)/cshift0_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift0_c16.c' object='cshift0_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0_c16.lo `test -f '$(srcdir)/generated/cshift0_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift0_c16.c +- +-cshift1_4_i1.lo: $(srcdir)/generated/cshift1_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_i1.lo -MD -MP -MF $(DEPDIR)/cshift1_4_i1.Tpo -c -o cshift1_4_i1.lo `test -f '$(srcdir)/generated/cshift1_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_i1.Tpo $(DEPDIR)/cshift1_4_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_i1.c' object='cshift1_4_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_i1.lo `test -f '$(srcdir)/generated/cshift1_4_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i1.c +- +-cshift1_4_i2.lo: $(srcdir)/generated/cshift1_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_i2.lo -MD -MP -MF $(DEPDIR)/cshift1_4_i2.Tpo -c -o cshift1_4_i2.lo `test -f '$(srcdir)/generated/cshift1_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_i2.Tpo $(DEPDIR)/cshift1_4_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_i2.c' object='cshift1_4_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_i2.lo `test -f '$(srcdir)/generated/cshift1_4_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i2.c +- +-cshift1_4_i4.lo: $(srcdir)/generated/cshift1_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_i4.lo -MD -MP -MF $(DEPDIR)/cshift1_4_i4.Tpo -c -o cshift1_4_i4.lo `test -f '$(srcdir)/generated/cshift1_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_i4.Tpo $(DEPDIR)/cshift1_4_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_i4.c' object='cshift1_4_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_i4.lo `test -f '$(srcdir)/generated/cshift1_4_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i4.c +- +-cshift1_4_i8.lo: $(srcdir)/generated/cshift1_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_i8.lo -MD -MP -MF $(DEPDIR)/cshift1_4_i8.Tpo -c -o cshift1_4_i8.lo `test -f '$(srcdir)/generated/cshift1_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_i8.Tpo $(DEPDIR)/cshift1_4_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_i8.c' object='cshift1_4_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_i8.lo `test -f '$(srcdir)/generated/cshift1_4_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i8.c +- +-cshift1_4_i16.lo: $(srcdir)/generated/cshift1_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_i16.lo -MD -MP -MF $(DEPDIR)/cshift1_4_i16.Tpo -c -o cshift1_4_i16.lo `test -f '$(srcdir)/generated/cshift1_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_i16.Tpo $(DEPDIR)/cshift1_4_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_i16.c' object='cshift1_4_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_i16.lo `test -f '$(srcdir)/generated/cshift1_4_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_i16.c +- +-cshift1_4_r4.lo: $(srcdir)/generated/cshift1_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_r4.lo -MD -MP -MF $(DEPDIR)/cshift1_4_r4.Tpo -c -o cshift1_4_r4.lo `test -f '$(srcdir)/generated/cshift1_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_r4.Tpo $(DEPDIR)/cshift1_4_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_r4.c' object='cshift1_4_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_r4.lo `test -f '$(srcdir)/generated/cshift1_4_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r4.c +- +-cshift1_4_r8.lo: $(srcdir)/generated/cshift1_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_r8.lo -MD -MP -MF $(DEPDIR)/cshift1_4_r8.Tpo -c -o cshift1_4_r8.lo `test -f '$(srcdir)/generated/cshift1_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_r8.Tpo $(DEPDIR)/cshift1_4_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_r8.c' object='cshift1_4_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_r8.lo `test -f '$(srcdir)/generated/cshift1_4_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r8.c +- +-cshift1_4_r10.lo: $(srcdir)/generated/cshift1_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_r10.lo -MD -MP -MF $(DEPDIR)/cshift1_4_r10.Tpo -c -o cshift1_4_r10.lo `test -f '$(srcdir)/generated/cshift1_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_r10.Tpo $(DEPDIR)/cshift1_4_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_r10.c' object='cshift1_4_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_r10.lo `test -f '$(srcdir)/generated/cshift1_4_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r10.c +- +-cshift1_4_r16.lo: $(srcdir)/generated/cshift1_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_r16.lo -MD -MP -MF $(DEPDIR)/cshift1_4_r16.Tpo -c -o cshift1_4_r16.lo `test -f '$(srcdir)/generated/cshift1_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_r16.Tpo $(DEPDIR)/cshift1_4_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_r16.c' object='cshift1_4_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_r16.lo `test -f '$(srcdir)/generated/cshift1_4_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_r16.c +- +-cshift1_4_c4.lo: $(srcdir)/generated/cshift1_4_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_c4.lo -MD -MP -MF $(DEPDIR)/cshift1_4_c4.Tpo -c -o cshift1_4_c4.lo `test -f '$(srcdir)/generated/cshift1_4_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_c4.Tpo $(DEPDIR)/cshift1_4_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_c4.c' object='cshift1_4_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_c4.lo `test -f '$(srcdir)/generated/cshift1_4_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c4.c +- +-cshift1_4_c8.lo: $(srcdir)/generated/cshift1_4_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_c8.lo -MD -MP -MF $(DEPDIR)/cshift1_4_c8.Tpo -c -o cshift1_4_c8.lo `test -f '$(srcdir)/generated/cshift1_4_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_c8.Tpo $(DEPDIR)/cshift1_4_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_c8.c' object='cshift1_4_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_c8.lo `test -f '$(srcdir)/generated/cshift1_4_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c8.c +- +-cshift1_4_c10.lo: $(srcdir)/generated/cshift1_4_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_c10.lo -MD -MP -MF $(DEPDIR)/cshift1_4_c10.Tpo -c -o cshift1_4_c10.lo `test -f '$(srcdir)/generated/cshift1_4_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_c10.Tpo $(DEPDIR)/cshift1_4_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_c10.c' object='cshift1_4_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_c10.lo `test -f '$(srcdir)/generated/cshift1_4_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c10.c +- +-cshift1_4_c16.lo: $(srcdir)/generated/cshift1_4_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_4_c16.lo -MD -MP -MF $(DEPDIR)/cshift1_4_c16.Tpo -c -o cshift1_4_c16.lo `test -f '$(srcdir)/generated/cshift1_4_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_4_c16.Tpo $(DEPDIR)/cshift1_4_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_4_c16.c' object='cshift1_4_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_4_c16.lo `test -f '$(srcdir)/generated/cshift1_4_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_4_c16.c +- +-cshift1_8_i1.lo: $(srcdir)/generated/cshift1_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_i1.lo -MD -MP -MF $(DEPDIR)/cshift1_8_i1.Tpo -c -o cshift1_8_i1.lo `test -f '$(srcdir)/generated/cshift1_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_i1.Tpo $(DEPDIR)/cshift1_8_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_i1.c' object='cshift1_8_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_i1.lo `test -f '$(srcdir)/generated/cshift1_8_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i1.c +- +-cshift1_8_i2.lo: $(srcdir)/generated/cshift1_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_i2.lo -MD -MP -MF $(DEPDIR)/cshift1_8_i2.Tpo -c -o cshift1_8_i2.lo `test -f '$(srcdir)/generated/cshift1_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_i2.Tpo $(DEPDIR)/cshift1_8_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_i2.c' object='cshift1_8_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_i2.lo `test -f '$(srcdir)/generated/cshift1_8_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i2.c +- +-cshift1_8_i4.lo: $(srcdir)/generated/cshift1_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_i4.lo -MD -MP -MF $(DEPDIR)/cshift1_8_i4.Tpo -c -o cshift1_8_i4.lo `test -f '$(srcdir)/generated/cshift1_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_i4.Tpo $(DEPDIR)/cshift1_8_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_i4.c' object='cshift1_8_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_i4.lo `test -f '$(srcdir)/generated/cshift1_8_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i4.c +- +-cshift1_8_i8.lo: $(srcdir)/generated/cshift1_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_i8.lo -MD -MP -MF $(DEPDIR)/cshift1_8_i8.Tpo -c -o cshift1_8_i8.lo `test -f '$(srcdir)/generated/cshift1_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_i8.Tpo $(DEPDIR)/cshift1_8_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_i8.c' object='cshift1_8_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_i8.lo `test -f '$(srcdir)/generated/cshift1_8_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i8.c +- +-cshift1_8_i16.lo: $(srcdir)/generated/cshift1_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_i16.lo -MD -MP -MF $(DEPDIR)/cshift1_8_i16.Tpo -c -o cshift1_8_i16.lo `test -f '$(srcdir)/generated/cshift1_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_i16.Tpo $(DEPDIR)/cshift1_8_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_i16.c' object='cshift1_8_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_i16.lo `test -f '$(srcdir)/generated/cshift1_8_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_i16.c +- +-cshift1_8_r4.lo: $(srcdir)/generated/cshift1_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_r4.lo -MD -MP -MF $(DEPDIR)/cshift1_8_r4.Tpo -c -o cshift1_8_r4.lo `test -f '$(srcdir)/generated/cshift1_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_r4.Tpo $(DEPDIR)/cshift1_8_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_r4.c' object='cshift1_8_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_r4.lo `test -f '$(srcdir)/generated/cshift1_8_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r4.c +- +-cshift1_8_r8.lo: $(srcdir)/generated/cshift1_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_r8.lo -MD -MP -MF $(DEPDIR)/cshift1_8_r8.Tpo -c -o cshift1_8_r8.lo `test -f '$(srcdir)/generated/cshift1_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_r8.Tpo $(DEPDIR)/cshift1_8_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_r8.c' object='cshift1_8_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_r8.lo `test -f '$(srcdir)/generated/cshift1_8_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r8.c +- +-cshift1_8_r10.lo: $(srcdir)/generated/cshift1_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_r10.lo -MD -MP -MF $(DEPDIR)/cshift1_8_r10.Tpo -c -o cshift1_8_r10.lo `test -f '$(srcdir)/generated/cshift1_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_r10.Tpo $(DEPDIR)/cshift1_8_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_r10.c' object='cshift1_8_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_r10.lo `test -f '$(srcdir)/generated/cshift1_8_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r10.c +- +-cshift1_8_r16.lo: $(srcdir)/generated/cshift1_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_r16.lo -MD -MP -MF $(DEPDIR)/cshift1_8_r16.Tpo -c -o cshift1_8_r16.lo `test -f '$(srcdir)/generated/cshift1_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_r16.Tpo $(DEPDIR)/cshift1_8_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_r16.c' object='cshift1_8_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_r16.lo `test -f '$(srcdir)/generated/cshift1_8_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_r16.c +- +-cshift1_8_c4.lo: $(srcdir)/generated/cshift1_8_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_c4.lo -MD -MP -MF $(DEPDIR)/cshift1_8_c4.Tpo -c -o cshift1_8_c4.lo `test -f '$(srcdir)/generated/cshift1_8_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_c4.Tpo $(DEPDIR)/cshift1_8_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_c4.c' object='cshift1_8_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_c4.lo `test -f '$(srcdir)/generated/cshift1_8_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c4.c +- +-cshift1_8_c8.lo: $(srcdir)/generated/cshift1_8_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_c8.lo -MD -MP -MF $(DEPDIR)/cshift1_8_c8.Tpo -c -o cshift1_8_c8.lo `test -f '$(srcdir)/generated/cshift1_8_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_c8.Tpo $(DEPDIR)/cshift1_8_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_c8.c' object='cshift1_8_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_c8.lo `test -f '$(srcdir)/generated/cshift1_8_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c8.c +- +-cshift1_8_c10.lo: $(srcdir)/generated/cshift1_8_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_c10.lo -MD -MP -MF $(DEPDIR)/cshift1_8_c10.Tpo -c -o cshift1_8_c10.lo `test -f '$(srcdir)/generated/cshift1_8_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_c10.Tpo $(DEPDIR)/cshift1_8_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_c10.c' object='cshift1_8_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_c10.lo `test -f '$(srcdir)/generated/cshift1_8_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c10.c +- +-cshift1_8_c16.lo: $(srcdir)/generated/cshift1_8_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_8_c16.lo -MD -MP -MF $(DEPDIR)/cshift1_8_c16.Tpo -c -o cshift1_8_c16.lo `test -f '$(srcdir)/generated/cshift1_8_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_8_c16.Tpo $(DEPDIR)/cshift1_8_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_8_c16.c' object='cshift1_8_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_8_c16.lo `test -f '$(srcdir)/generated/cshift1_8_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_8_c16.c +- +-cshift1_16_i1.lo: $(srcdir)/generated/cshift1_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_i1.lo -MD -MP -MF $(DEPDIR)/cshift1_16_i1.Tpo -c -o cshift1_16_i1.lo `test -f '$(srcdir)/generated/cshift1_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_i1.Tpo $(DEPDIR)/cshift1_16_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_i1.c' object='cshift1_16_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_i1.lo `test -f '$(srcdir)/generated/cshift1_16_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i1.c +- +-cshift1_16_i2.lo: $(srcdir)/generated/cshift1_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_i2.lo -MD -MP -MF $(DEPDIR)/cshift1_16_i2.Tpo -c -o cshift1_16_i2.lo `test -f '$(srcdir)/generated/cshift1_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_i2.Tpo $(DEPDIR)/cshift1_16_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_i2.c' object='cshift1_16_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_i2.lo `test -f '$(srcdir)/generated/cshift1_16_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i2.c +- +-cshift1_16_i4.lo: $(srcdir)/generated/cshift1_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_i4.lo -MD -MP -MF $(DEPDIR)/cshift1_16_i4.Tpo -c -o cshift1_16_i4.lo `test -f '$(srcdir)/generated/cshift1_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_i4.Tpo $(DEPDIR)/cshift1_16_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_i4.c' object='cshift1_16_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_i4.lo `test -f '$(srcdir)/generated/cshift1_16_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i4.c +- +-cshift1_16_i8.lo: $(srcdir)/generated/cshift1_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_i8.lo -MD -MP -MF $(DEPDIR)/cshift1_16_i8.Tpo -c -o cshift1_16_i8.lo `test -f '$(srcdir)/generated/cshift1_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_i8.Tpo $(DEPDIR)/cshift1_16_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_i8.c' object='cshift1_16_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_i8.lo `test -f '$(srcdir)/generated/cshift1_16_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i8.c +- +-cshift1_16_i16.lo: $(srcdir)/generated/cshift1_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_i16.lo -MD -MP -MF $(DEPDIR)/cshift1_16_i16.Tpo -c -o cshift1_16_i16.lo `test -f '$(srcdir)/generated/cshift1_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_i16.Tpo $(DEPDIR)/cshift1_16_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_i16.c' object='cshift1_16_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_i16.lo `test -f '$(srcdir)/generated/cshift1_16_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_i16.c +- +-cshift1_16_r4.lo: $(srcdir)/generated/cshift1_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_r4.lo -MD -MP -MF $(DEPDIR)/cshift1_16_r4.Tpo -c -o cshift1_16_r4.lo `test -f '$(srcdir)/generated/cshift1_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_r4.Tpo $(DEPDIR)/cshift1_16_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_r4.c' object='cshift1_16_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_r4.lo `test -f '$(srcdir)/generated/cshift1_16_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r4.c +- +-cshift1_16_r8.lo: $(srcdir)/generated/cshift1_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_r8.lo -MD -MP -MF $(DEPDIR)/cshift1_16_r8.Tpo -c -o cshift1_16_r8.lo `test -f '$(srcdir)/generated/cshift1_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_r8.Tpo $(DEPDIR)/cshift1_16_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_r8.c' object='cshift1_16_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_r8.lo `test -f '$(srcdir)/generated/cshift1_16_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r8.c +- +-cshift1_16_r10.lo: $(srcdir)/generated/cshift1_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_r10.lo -MD -MP -MF $(DEPDIR)/cshift1_16_r10.Tpo -c -o cshift1_16_r10.lo `test -f '$(srcdir)/generated/cshift1_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_r10.Tpo $(DEPDIR)/cshift1_16_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_r10.c' object='cshift1_16_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_r10.lo `test -f '$(srcdir)/generated/cshift1_16_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r10.c +- +-cshift1_16_r16.lo: $(srcdir)/generated/cshift1_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_r16.lo -MD -MP -MF $(DEPDIR)/cshift1_16_r16.Tpo -c -o cshift1_16_r16.lo `test -f '$(srcdir)/generated/cshift1_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_r16.Tpo $(DEPDIR)/cshift1_16_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_r16.c' object='cshift1_16_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_r16.lo `test -f '$(srcdir)/generated/cshift1_16_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_r16.c +- +-cshift1_16_c4.lo: $(srcdir)/generated/cshift1_16_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_c4.lo -MD -MP -MF $(DEPDIR)/cshift1_16_c4.Tpo -c -o cshift1_16_c4.lo `test -f '$(srcdir)/generated/cshift1_16_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_c4.Tpo $(DEPDIR)/cshift1_16_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_c4.c' object='cshift1_16_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_c4.lo `test -f '$(srcdir)/generated/cshift1_16_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c4.c +- +-cshift1_16_c8.lo: $(srcdir)/generated/cshift1_16_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_c8.lo -MD -MP -MF $(DEPDIR)/cshift1_16_c8.Tpo -c -o cshift1_16_c8.lo `test -f '$(srcdir)/generated/cshift1_16_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_c8.Tpo $(DEPDIR)/cshift1_16_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_c8.c' object='cshift1_16_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_c8.lo `test -f '$(srcdir)/generated/cshift1_16_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c8.c +- +-cshift1_16_c10.lo: $(srcdir)/generated/cshift1_16_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_c10.lo -MD -MP -MF $(DEPDIR)/cshift1_16_c10.Tpo -c -o cshift1_16_c10.lo `test -f '$(srcdir)/generated/cshift1_16_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_c10.Tpo $(DEPDIR)/cshift1_16_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_c10.c' object='cshift1_16_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_c10.lo `test -f '$(srcdir)/generated/cshift1_16_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c10.c +- +-cshift1_16_c16.lo: $(srcdir)/generated/cshift1_16_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift1_16_c16.lo -MD -MP -MF $(DEPDIR)/cshift1_16_c16.Tpo -c -o cshift1_16_c16.lo `test -f '$(srcdir)/generated/cshift1_16_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift1_16_c16.Tpo $(DEPDIR)/cshift1_16_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/cshift1_16_c16.c' object='cshift1_16_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift1_16_c16.lo `test -f '$(srcdir)/generated/cshift1_16_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/cshift1_16_c16.c +- +-maxloc0_4_s1.lo: $(srcdir)/generated/maxloc0_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_s1.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_s1.Tpo -c -o maxloc0_4_s1.lo `test -f '$(srcdir)/generated/maxloc0_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_s1.Tpo $(DEPDIR)/maxloc0_4_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_s1.c' object='maxloc0_4_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_s1.lo `test -f '$(srcdir)/generated/maxloc0_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_s1.c +- +-maxloc0_4_s4.lo: $(srcdir)/generated/maxloc0_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_4_s4.lo -MD -MP -MF $(DEPDIR)/maxloc0_4_s4.Tpo -c -o maxloc0_4_s4.lo `test -f '$(srcdir)/generated/maxloc0_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_4_s4.Tpo $(DEPDIR)/maxloc0_4_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_4_s4.c' object='maxloc0_4_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_4_s4.lo `test -f '$(srcdir)/generated/maxloc0_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_4_s4.c +- +-maxloc0_8_s1.lo: $(srcdir)/generated/maxloc0_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_s1.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_s1.Tpo -c -o maxloc0_8_s1.lo `test -f '$(srcdir)/generated/maxloc0_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_s1.Tpo $(DEPDIR)/maxloc0_8_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_s1.c' object='maxloc0_8_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_s1.lo `test -f '$(srcdir)/generated/maxloc0_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_s1.c +- +-maxloc0_8_s4.lo: $(srcdir)/generated/maxloc0_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_8_s4.lo -MD -MP -MF $(DEPDIR)/maxloc0_8_s4.Tpo -c -o maxloc0_8_s4.lo `test -f '$(srcdir)/generated/maxloc0_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_8_s4.Tpo $(DEPDIR)/maxloc0_8_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_8_s4.c' object='maxloc0_8_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_8_s4.lo `test -f '$(srcdir)/generated/maxloc0_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_8_s4.c +- +-maxloc0_16_s1.lo: $(srcdir)/generated/maxloc0_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_s1.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_s1.Tpo -c -o maxloc0_16_s1.lo `test -f '$(srcdir)/generated/maxloc0_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_s1.Tpo $(DEPDIR)/maxloc0_16_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_s1.c' object='maxloc0_16_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_s1.lo `test -f '$(srcdir)/generated/maxloc0_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_s1.c +- +-maxloc0_16_s4.lo: $(srcdir)/generated/maxloc0_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc0_16_s4.lo -MD -MP -MF $(DEPDIR)/maxloc0_16_s4.Tpo -c -o maxloc0_16_s4.lo `test -f '$(srcdir)/generated/maxloc0_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc0_16_s4.Tpo $(DEPDIR)/maxloc0_16_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc0_16_s4.c' object='maxloc0_16_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc0_16_s4.lo `test -f '$(srcdir)/generated/maxloc0_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc0_16_s4.c +- +-minloc0_4_s1.lo: $(srcdir)/generated/minloc0_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_s1.lo -MD -MP -MF $(DEPDIR)/minloc0_4_s1.Tpo -c -o minloc0_4_s1.lo `test -f '$(srcdir)/generated/minloc0_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_s1.Tpo $(DEPDIR)/minloc0_4_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_s1.c' object='minloc0_4_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_s1.lo `test -f '$(srcdir)/generated/minloc0_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_s1.c +- +-minloc0_4_s4.lo: $(srcdir)/generated/minloc0_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_4_s4.lo -MD -MP -MF $(DEPDIR)/minloc0_4_s4.Tpo -c -o minloc0_4_s4.lo `test -f '$(srcdir)/generated/minloc0_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_4_s4.Tpo $(DEPDIR)/minloc0_4_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_4_s4.c' object='minloc0_4_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_4_s4.lo `test -f '$(srcdir)/generated/minloc0_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_4_s4.c +- +-minloc0_8_s1.lo: $(srcdir)/generated/minloc0_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_s1.lo -MD -MP -MF $(DEPDIR)/minloc0_8_s1.Tpo -c -o minloc0_8_s1.lo `test -f '$(srcdir)/generated/minloc0_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_s1.Tpo $(DEPDIR)/minloc0_8_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_s1.c' object='minloc0_8_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_s1.lo `test -f '$(srcdir)/generated/minloc0_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_s1.c +- +-minloc0_8_s4.lo: $(srcdir)/generated/minloc0_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_8_s4.lo -MD -MP -MF $(DEPDIR)/minloc0_8_s4.Tpo -c -o minloc0_8_s4.lo `test -f '$(srcdir)/generated/minloc0_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_8_s4.Tpo $(DEPDIR)/minloc0_8_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_8_s4.c' object='minloc0_8_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_8_s4.lo `test -f '$(srcdir)/generated/minloc0_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_8_s4.c +- +-minloc0_16_s1.lo: $(srcdir)/generated/minloc0_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_s1.lo -MD -MP -MF $(DEPDIR)/minloc0_16_s1.Tpo -c -o minloc0_16_s1.lo `test -f '$(srcdir)/generated/minloc0_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_s1.Tpo $(DEPDIR)/minloc0_16_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_s1.c' object='minloc0_16_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_s1.lo `test -f '$(srcdir)/generated/minloc0_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_s1.c +- +-minloc0_16_s4.lo: $(srcdir)/generated/minloc0_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc0_16_s4.lo -MD -MP -MF $(DEPDIR)/minloc0_16_s4.Tpo -c -o minloc0_16_s4.lo `test -f '$(srcdir)/generated/minloc0_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc0_16_s4.Tpo $(DEPDIR)/minloc0_16_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc0_16_s4.c' object='minloc0_16_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc0_16_s4.lo `test -f '$(srcdir)/generated/minloc0_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc0_16_s4.c +- +-maxloc1_4_s1.lo: $(srcdir)/generated/maxloc1_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_s1.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_s1.Tpo -c -o maxloc1_4_s1.lo `test -f '$(srcdir)/generated/maxloc1_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_s1.Tpo $(DEPDIR)/maxloc1_4_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_s1.c' object='maxloc1_4_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_s1.lo `test -f '$(srcdir)/generated/maxloc1_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_s1.c +- +-maxloc1_4_s4.lo: $(srcdir)/generated/maxloc1_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_4_s4.lo -MD -MP -MF $(DEPDIR)/maxloc1_4_s4.Tpo -c -o maxloc1_4_s4.lo `test -f '$(srcdir)/generated/maxloc1_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_4_s4.Tpo $(DEPDIR)/maxloc1_4_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_4_s4.c' object='maxloc1_4_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_4_s4.lo `test -f '$(srcdir)/generated/maxloc1_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_4_s4.c +- +-maxloc1_8_s1.lo: $(srcdir)/generated/maxloc1_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_s1.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_s1.Tpo -c -o maxloc1_8_s1.lo `test -f '$(srcdir)/generated/maxloc1_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_s1.Tpo $(DEPDIR)/maxloc1_8_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_s1.c' object='maxloc1_8_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_s1.lo `test -f '$(srcdir)/generated/maxloc1_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_s1.c +- +-maxloc1_8_s4.lo: $(srcdir)/generated/maxloc1_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_8_s4.lo -MD -MP -MF $(DEPDIR)/maxloc1_8_s4.Tpo -c -o maxloc1_8_s4.lo `test -f '$(srcdir)/generated/maxloc1_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_8_s4.Tpo $(DEPDIR)/maxloc1_8_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_8_s4.c' object='maxloc1_8_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_8_s4.lo `test -f '$(srcdir)/generated/maxloc1_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_8_s4.c +- +-maxloc1_16_s1.lo: $(srcdir)/generated/maxloc1_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_s1.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_s1.Tpo -c -o maxloc1_16_s1.lo `test -f '$(srcdir)/generated/maxloc1_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_s1.Tpo $(DEPDIR)/maxloc1_16_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_s1.c' object='maxloc1_16_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_s1.lo `test -f '$(srcdir)/generated/maxloc1_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_s1.c +- +-maxloc1_16_s4.lo: $(srcdir)/generated/maxloc1_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc1_16_s4.lo -MD -MP -MF $(DEPDIR)/maxloc1_16_s4.Tpo -c -o maxloc1_16_s4.lo `test -f '$(srcdir)/generated/maxloc1_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc1_16_s4.Tpo $(DEPDIR)/maxloc1_16_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc1_16_s4.c' object='maxloc1_16_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc1_16_s4.lo `test -f '$(srcdir)/generated/maxloc1_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc1_16_s4.c +- +-minloc1_4_s1.lo: $(srcdir)/generated/minloc1_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_s1.lo -MD -MP -MF $(DEPDIR)/minloc1_4_s1.Tpo -c -o minloc1_4_s1.lo `test -f '$(srcdir)/generated/minloc1_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_s1.Tpo $(DEPDIR)/minloc1_4_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_s1.c' object='minloc1_4_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_s1.lo `test -f '$(srcdir)/generated/minloc1_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_s1.c +- +-minloc1_4_s4.lo: $(srcdir)/generated/minloc1_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_4_s4.lo -MD -MP -MF $(DEPDIR)/minloc1_4_s4.Tpo -c -o minloc1_4_s4.lo `test -f '$(srcdir)/generated/minloc1_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_4_s4.Tpo $(DEPDIR)/minloc1_4_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_4_s4.c' object='minloc1_4_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_4_s4.lo `test -f '$(srcdir)/generated/minloc1_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_4_s4.c +- +-minloc1_8_s1.lo: $(srcdir)/generated/minloc1_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_s1.lo -MD -MP -MF $(DEPDIR)/minloc1_8_s1.Tpo -c -o minloc1_8_s1.lo `test -f '$(srcdir)/generated/minloc1_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_s1.Tpo $(DEPDIR)/minloc1_8_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_s1.c' object='minloc1_8_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_s1.lo `test -f '$(srcdir)/generated/minloc1_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_s1.c +- +-minloc1_8_s4.lo: $(srcdir)/generated/minloc1_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_8_s4.lo -MD -MP -MF $(DEPDIR)/minloc1_8_s4.Tpo -c -o minloc1_8_s4.lo `test -f '$(srcdir)/generated/minloc1_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_8_s4.Tpo $(DEPDIR)/minloc1_8_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_8_s4.c' object='minloc1_8_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_8_s4.lo `test -f '$(srcdir)/generated/minloc1_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_8_s4.c +- +-minloc1_16_s1.lo: $(srcdir)/generated/minloc1_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_s1.lo -MD -MP -MF $(DEPDIR)/minloc1_16_s1.Tpo -c -o minloc1_16_s1.lo `test -f '$(srcdir)/generated/minloc1_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_s1.Tpo $(DEPDIR)/minloc1_16_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_s1.c' object='minloc1_16_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_s1.lo `test -f '$(srcdir)/generated/minloc1_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_s1.c +- +-minloc1_16_s4.lo: $(srcdir)/generated/minloc1_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc1_16_s4.lo -MD -MP -MF $(DEPDIR)/minloc1_16_s4.Tpo -c -o minloc1_16_s4.lo `test -f '$(srcdir)/generated/minloc1_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc1_16_s4.Tpo $(DEPDIR)/minloc1_16_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc1_16_s4.c' object='minloc1_16_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc1_16_s4.lo `test -f '$(srcdir)/generated/minloc1_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc1_16_s4.c +- +-maxloc2_4_s1.lo: $(srcdir)/generated/maxloc2_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc2_4_s1.lo -MD -MP -MF $(DEPDIR)/maxloc2_4_s1.Tpo -c -o maxloc2_4_s1.lo `test -f '$(srcdir)/generated/maxloc2_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc2_4_s1.Tpo $(DEPDIR)/maxloc2_4_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc2_4_s1.c' object='maxloc2_4_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc2_4_s1.lo `test -f '$(srcdir)/generated/maxloc2_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_4_s1.c +- +-maxloc2_4_s4.lo: $(srcdir)/generated/maxloc2_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc2_4_s4.lo -MD -MP -MF $(DEPDIR)/maxloc2_4_s4.Tpo -c -o maxloc2_4_s4.lo `test -f '$(srcdir)/generated/maxloc2_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc2_4_s4.Tpo $(DEPDIR)/maxloc2_4_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc2_4_s4.c' object='maxloc2_4_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc2_4_s4.lo `test -f '$(srcdir)/generated/maxloc2_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_4_s4.c +- +-maxloc2_8_s1.lo: $(srcdir)/generated/maxloc2_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc2_8_s1.lo -MD -MP -MF $(DEPDIR)/maxloc2_8_s1.Tpo -c -o maxloc2_8_s1.lo `test -f '$(srcdir)/generated/maxloc2_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc2_8_s1.Tpo $(DEPDIR)/maxloc2_8_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc2_8_s1.c' object='maxloc2_8_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc2_8_s1.lo `test -f '$(srcdir)/generated/maxloc2_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_8_s1.c +- +-maxloc2_8_s4.lo: $(srcdir)/generated/maxloc2_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc2_8_s4.lo -MD -MP -MF $(DEPDIR)/maxloc2_8_s4.Tpo -c -o maxloc2_8_s4.lo `test -f '$(srcdir)/generated/maxloc2_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc2_8_s4.Tpo $(DEPDIR)/maxloc2_8_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc2_8_s4.c' object='maxloc2_8_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc2_8_s4.lo `test -f '$(srcdir)/generated/maxloc2_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_8_s4.c +- +-maxloc2_16_s1.lo: $(srcdir)/generated/maxloc2_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc2_16_s1.lo -MD -MP -MF $(DEPDIR)/maxloc2_16_s1.Tpo -c -o maxloc2_16_s1.lo `test -f '$(srcdir)/generated/maxloc2_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc2_16_s1.Tpo $(DEPDIR)/maxloc2_16_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc2_16_s1.c' object='maxloc2_16_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc2_16_s1.lo `test -f '$(srcdir)/generated/maxloc2_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_16_s1.c +- +-maxloc2_16_s4.lo: $(srcdir)/generated/maxloc2_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxloc2_16_s4.lo -MD -MP -MF $(DEPDIR)/maxloc2_16_s4.Tpo -c -o maxloc2_16_s4.lo `test -f '$(srcdir)/generated/maxloc2_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxloc2_16_s4.Tpo $(DEPDIR)/maxloc2_16_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxloc2_16_s4.c' object='maxloc2_16_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxloc2_16_s4.lo `test -f '$(srcdir)/generated/maxloc2_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxloc2_16_s4.c +- +-minloc2_4_s1.lo: $(srcdir)/generated/minloc2_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc2_4_s1.lo -MD -MP -MF $(DEPDIR)/minloc2_4_s1.Tpo -c -o minloc2_4_s1.lo `test -f '$(srcdir)/generated/minloc2_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_4_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc2_4_s1.Tpo $(DEPDIR)/minloc2_4_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc2_4_s1.c' object='minloc2_4_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc2_4_s1.lo `test -f '$(srcdir)/generated/minloc2_4_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_4_s1.c +- +-minloc2_4_s4.lo: $(srcdir)/generated/minloc2_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc2_4_s4.lo -MD -MP -MF $(DEPDIR)/minloc2_4_s4.Tpo -c -o minloc2_4_s4.lo `test -f '$(srcdir)/generated/minloc2_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_4_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc2_4_s4.Tpo $(DEPDIR)/minloc2_4_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc2_4_s4.c' object='minloc2_4_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc2_4_s4.lo `test -f '$(srcdir)/generated/minloc2_4_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_4_s4.c +- +-minloc2_8_s1.lo: $(srcdir)/generated/minloc2_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc2_8_s1.lo -MD -MP -MF $(DEPDIR)/minloc2_8_s1.Tpo -c -o minloc2_8_s1.lo `test -f '$(srcdir)/generated/minloc2_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_8_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc2_8_s1.Tpo $(DEPDIR)/minloc2_8_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc2_8_s1.c' object='minloc2_8_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc2_8_s1.lo `test -f '$(srcdir)/generated/minloc2_8_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_8_s1.c +- +-minloc2_8_s4.lo: $(srcdir)/generated/minloc2_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc2_8_s4.lo -MD -MP -MF $(DEPDIR)/minloc2_8_s4.Tpo -c -o minloc2_8_s4.lo `test -f '$(srcdir)/generated/minloc2_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_8_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc2_8_s4.Tpo $(DEPDIR)/minloc2_8_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc2_8_s4.c' object='minloc2_8_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc2_8_s4.lo `test -f '$(srcdir)/generated/minloc2_8_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_8_s4.c +- +-minloc2_16_s1.lo: $(srcdir)/generated/minloc2_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc2_16_s1.lo -MD -MP -MF $(DEPDIR)/minloc2_16_s1.Tpo -c -o minloc2_16_s1.lo `test -f '$(srcdir)/generated/minloc2_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_16_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc2_16_s1.Tpo $(DEPDIR)/minloc2_16_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc2_16_s1.c' object='minloc2_16_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc2_16_s1.lo `test -f '$(srcdir)/generated/minloc2_16_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_16_s1.c +- +-minloc2_16_s4.lo: $(srcdir)/generated/minloc2_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minloc2_16_s4.lo -MD -MP -MF $(DEPDIR)/minloc2_16_s4.Tpo -c -o minloc2_16_s4.lo `test -f '$(srcdir)/generated/minloc2_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_16_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minloc2_16_s4.Tpo $(DEPDIR)/minloc2_16_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minloc2_16_s4.c' object='minloc2_16_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minloc2_16_s4.lo `test -f '$(srcdir)/generated/minloc2_16_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minloc2_16_s4.c +- +-maxval0_s1.lo: $(srcdir)/generated/maxval0_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval0_s1.lo -MD -MP -MF $(DEPDIR)/maxval0_s1.Tpo -c -o maxval0_s1.lo `test -f '$(srcdir)/generated/maxval0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval0_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval0_s1.Tpo $(DEPDIR)/maxval0_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval0_s1.c' object='maxval0_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval0_s1.lo `test -f '$(srcdir)/generated/maxval0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval0_s1.c +- +-maxval0_s4.lo: $(srcdir)/generated/maxval0_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval0_s4.lo -MD -MP -MF $(DEPDIR)/maxval0_s4.Tpo -c -o maxval0_s4.lo `test -f '$(srcdir)/generated/maxval0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval0_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval0_s4.Tpo $(DEPDIR)/maxval0_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval0_s4.c' object='maxval0_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval0_s4.lo `test -f '$(srcdir)/generated/maxval0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval0_s4.c +- +-minval0_s1.lo: $(srcdir)/generated/minval0_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval0_s1.lo -MD -MP -MF $(DEPDIR)/minval0_s1.Tpo -c -o minval0_s1.lo `test -f '$(srcdir)/generated/minval0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval0_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval0_s1.Tpo $(DEPDIR)/minval0_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval0_s1.c' object='minval0_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval0_s1.lo `test -f '$(srcdir)/generated/minval0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval0_s1.c +- +-minval0_s4.lo: $(srcdir)/generated/minval0_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval0_s4.lo -MD -MP -MF $(DEPDIR)/minval0_s4.Tpo -c -o minval0_s4.lo `test -f '$(srcdir)/generated/minval0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval0_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval0_s4.Tpo $(DEPDIR)/minval0_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval0_s4.c' object='minval0_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval0_s4.lo `test -f '$(srcdir)/generated/minval0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval0_s4.c +- +-maxval1_s1.lo: $(srcdir)/generated/maxval1_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval1_s1.lo -MD -MP -MF $(DEPDIR)/maxval1_s1.Tpo -c -o maxval1_s1.lo `test -f '$(srcdir)/generated/maxval1_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval1_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval1_s1.Tpo $(DEPDIR)/maxval1_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval1_s1.c' object='maxval1_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval1_s1.lo `test -f '$(srcdir)/generated/maxval1_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval1_s1.c +- +-maxval1_s4.lo: $(srcdir)/generated/maxval1_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maxval1_s4.lo -MD -MP -MF $(DEPDIR)/maxval1_s4.Tpo -c -o maxval1_s4.lo `test -f '$(srcdir)/generated/maxval1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval1_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/maxval1_s4.Tpo $(DEPDIR)/maxval1_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/maxval1_s4.c' object='maxval1_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maxval1_s4.lo `test -f '$(srcdir)/generated/maxval1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/maxval1_s4.c +- +-minval1_s1.lo: $(srcdir)/generated/minval1_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval1_s1.lo -MD -MP -MF $(DEPDIR)/minval1_s1.Tpo -c -o minval1_s1.lo `test -f '$(srcdir)/generated/minval1_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval1_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval1_s1.Tpo $(DEPDIR)/minval1_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval1_s1.c' object='minval1_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval1_s1.lo `test -f '$(srcdir)/generated/minval1_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval1_s1.c +- +-minval1_s4.lo: $(srcdir)/generated/minval1_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT minval1_s4.lo -MD -MP -MF $(DEPDIR)/minval1_s4.Tpo -c -o minval1_s4.lo `test -f '$(srcdir)/generated/minval1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval1_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/minval1_s4.Tpo $(DEPDIR)/minval1_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/minval1_s4.c' object='minval1_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval1_s4.lo `test -f '$(srcdir)/generated/minval1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval1_s4.c +- +-findloc0_i1.lo: $(srcdir)/generated/findloc0_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i1.lo -MD -MP -MF $(DEPDIR)/findloc0_i1.Tpo -c -o findloc0_i1.lo `test -f '$(srcdir)/generated/findloc0_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_i1.Tpo $(DEPDIR)/findloc0_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_i1.c' object='findloc0_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i1.lo `test -f '$(srcdir)/generated/findloc0_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i1.c +- +-findloc0_i2.lo: $(srcdir)/generated/findloc0_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i2.lo -MD -MP -MF $(DEPDIR)/findloc0_i2.Tpo -c -o findloc0_i2.lo `test -f '$(srcdir)/generated/findloc0_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_i2.Tpo $(DEPDIR)/findloc0_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_i2.c' object='findloc0_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i2.lo `test -f '$(srcdir)/generated/findloc0_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i2.c +- +-findloc0_i4.lo: $(srcdir)/generated/findloc0_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i4.lo -MD -MP -MF $(DEPDIR)/findloc0_i4.Tpo -c -o findloc0_i4.lo `test -f '$(srcdir)/generated/findloc0_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_i4.Tpo $(DEPDIR)/findloc0_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_i4.c' object='findloc0_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i4.lo `test -f '$(srcdir)/generated/findloc0_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i4.c +- +-findloc0_i8.lo: $(srcdir)/generated/findloc0_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i8.lo -MD -MP -MF $(DEPDIR)/findloc0_i8.Tpo -c -o findloc0_i8.lo `test -f '$(srcdir)/generated/findloc0_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_i8.Tpo $(DEPDIR)/findloc0_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_i8.c' object='findloc0_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i8.lo `test -f '$(srcdir)/generated/findloc0_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i8.c +- +-findloc0_i16.lo: $(srcdir)/generated/findloc0_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i16.lo -MD -MP -MF $(DEPDIR)/findloc0_i16.Tpo -c -o findloc0_i16.lo `test -f '$(srcdir)/generated/findloc0_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_i16.Tpo $(DEPDIR)/findloc0_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_i16.c' object='findloc0_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i16.lo `test -f '$(srcdir)/generated/findloc0_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i16.c +- +-findloc0_r4.lo: $(srcdir)/generated/findloc0_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r4.lo -MD -MP -MF $(DEPDIR)/findloc0_r4.Tpo -c -o findloc0_r4.lo `test -f '$(srcdir)/generated/findloc0_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_r4.Tpo $(DEPDIR)/findloc0_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_r4.c' object='findloc0_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r4.lo `test -f '$(srcdir)/generated/findloc0_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r4.c +- +-findloc0_r8.lo: $(srcdir)/generated/findloc0_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r8.lo -MD -MP -MF $(DEPDIR)/findloc0_r8.Tpo -c -o findloc0_r8.lo `test -f '$(srcdir)/generated/findloc0_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_r8.Tpo $(DEPDIR)/findloc0_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_r8.c' object='findloc0_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r8.lo `test -f '$(srcdir)/generated/findloc0_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r8.c +- +-findloc0_r10.lo: $(srcdir)/generated/findloc0_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r10.lo -MD -MP -MF $(DEPDIR)/findloc0_r10.Tpo -c -o findloc0_r10.lo `test -f '$(srcdir)/generated/findloc0_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_r10.Tpo $(DEPDIR)/findloc0_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_r10.c' object='findloc0_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r10.lo `test -f '$(srcdir)/generated/findloc0_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r10.c +- +-findloc0_r16.lo: $(srcdir)/generated/findloc0_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r16.lo -MD -MP -MF $(DEPDIR)/findloc0_r16.Tpo -c -o findloc0_r16.lo `test -f '$(srcdir)/generated/findloc0_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_r16.Tpo $(DEPDIR)/findloc0_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_r16.c' object='findloc0_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r16.lo `test -f '$(srcdir)/generated/findloc0_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r16.c +- +-findloc0_c4.lo: $(srcdir)/generated/findloc0_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c4.lo -MD -MP -MF $(DEPDIR)/findloc0_c4.Tpo -c -o findloc0_c4.lo `test -f '$(srcdir)/generated/findloc0_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_c4.Tpo $(DEPDIR)/findloc0_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_c4.c' object='findloc0_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c4.lo `test -f '$(srcdir)/generated/findloc0_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c4.c +- +-findloc0_c8.lo: $(srcdir)/generated/findloc0_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c8.lo -MD -MP -MF $(DEPDIR)/findloc0_c8.Tpo -c -o findloc0_c8.lo `test -f '$(srcdir)/generated/findloc0_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_c8.Tpo $(DEPDIR)/findloc0_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_c8.c' object='findloc0_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c8.lo `test -f '$(srcdir)/generated/findloc0_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c8.c +- +-findloc0_c10.lo: $(srcdir)/generated/findloc0_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c10.lo -MD -MP -MF $(DEPDIR)/findloc0_c10.Tpo -c -o findloc0_c10.lo `test -f '$(srcdir)/generated/findloc0_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_c10.Tpo $(DEPDIR)/findloc0_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_c10.c' object='findloc0_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c10.lo `test -f '$(srcdir)/generated/findloc0_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c10.c +- +-findloc0_c16.lo: $(srcdir)/generated/findloc0_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c16.lo -MD -MP -MF $(DEPDIR)/findloc0_c16.Tpo -c -o findloc0_c16.lo `test -f '$(srcdir)/generated/findloc0_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_c16.Tpo $(DEPDIR)/findloc0_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_c16.c' object='findloc0_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c16.lo `test -f '$(srcdir)/generated/findloc0_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c16.c +- +-findloc0_s1.lo: $(srcdir)/generated/findloc0_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_s1.lo -MD -MP -MF $(DEPDIR)/findloc0_s1.Tpo -c -o findloc0_s1.lo `test -f '$(srcdir)/generated/findloc0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_s1.Tpo $(DEPDIR)/findloc0_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_s1.c' object='findloc0_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_s1.lo `test -f '$(srcdir)/generated/findloc0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s1.c +- +-findloc0_s4.lo: $(srcdir)/generated/findloc0_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_s4.lo -MD -MP -MF $(DEPDIR)/findloc0_s4.Tpo -c -o findloc0_s4.lo `test -f '$(srcdir)/generated/findloc0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc0_s4.Tpo $(DEPDIR)/findloc0_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc0_s4.c' object='findloc0_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_s4.lo `test -f '$(srcdir)/generated/findloc0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s4.c +- +-findloc1_i1.lo: $(srcdir)/generated/findloc1_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_i1.lo -MD -MP -MF $(DEPDIR)/findloc1_i1.Tpo -c -o findloc1_i1.lo `test -f '$(srcdir)/generated/findloc1_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_i1.Tpo $(DEPDIR)/findloc1_i1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_i1.c' object='findloc1_i1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_i1.lo `test -f '$(srcdir)/generated/findloc1_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i1.c +- +-findloc1_i2.lo: $(srcdir)/generated/findloc1_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_i2.lo -MD -MP -MF $(DEPDIR)/findloc1_i2.Tpo -c -o findloc1_i2.lo `test -f '$(srcdir)/generated/findloc1_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_i2.Tpo $(DEPDIR)/findloc1_i2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_i2.c' object='findloc1_i2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_i2.lo `test -f '$(srcdir)/generated/findloc1_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i2.c +- +-findloc1_i4.lo: $(srcdir)/generated/findloc1_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_i4.lo -MD -MP -MF $(DEPDIR)/findloc1_i4.Tpo -c -o findloc1_i4.lo `test -f '$(srcdir)/generated/findloc1_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_i4.Tpo $(DEPDIR)/findloc1_i4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_i4.c' object='findloc1_i4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_i4.lo `test -f '$(srcdir)/generated/findloc1_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i4.c +- +-findloc1_i8.lo: $(srcdir)/generated/findloc1_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_i8.lo -MD -MP -MF $(DEPDIR)/findloc1_i8.Tpo -c -o findloc1_i8.lo `test -f '$(srcdir)/generated/findloc1_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_i8.Tpo $(DEPDIR)/findloc1_i8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_i8.c' object='findloc1_i8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_i8.lo `test -f '$(srcdir)/generated/findloc1_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i8.c +- +-findloc1_i16.lo: $(srcdir)/generated/findloc1_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_i16.lo -MD -MP -MF $(DEPDIR)/findloc1_i16.Tpo -c -o findloc1_i16.lo `test -f '$(srcdir)/generated/findloc1_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_i16.Tpo $(DEPDIR)/findloc1_i16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_i16.c' object='findloc1_i16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_i16.lo `test -f '$(srcdir)/generated/findloc1_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_i16.c +- +-findloc1_r4.lo: $(srcdir)/generated/findloc1_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_r4.lo -MD -MP -MF $(DEPDIR)/findloc1_r4.Tpo -c -o findloc1_r4.lo `test -f '$(srcdir)/generated/findloc1_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_r4.Tpo $(DEPDIR)/findloc1_r4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_r4.c' object='findloc1_r4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_r4.lo `test -f '$(srcdir)/generated/findloc1_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r4.c +- +-findloc1_r8.lo: $(srcdir)/generated/findloc1_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_r8.lo -MD -MP -MF $(DEPDIR)/findloc1_r8.Tpo -c -o findloc1_r8.lo `test -f '$(srcdir)/generated/findloc1_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_r8.Tpo $(DEPDIR)/findloc1_r8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_r8.c' object='findloc1_r8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_r8.lo `test -f '$(srcdir)/generated/findloc1_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r8.c +- +-findloc1_r10.lo: $(srcdir)/generated/findloc1_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_r10.lo -MD -MP -MF $(DEPDIR)/findloc1_r10.Tpo -c -o findloc1_r10.lo `test -f '$(srcdir)/generated/findloc1_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_r10.Tpo $(DEPDIR)/findloc1_r10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_r10.c' object='findloc1_r10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_r10.lo `test -f '$(srcdir)/generated/findloc1_r10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r10.c +- +-findloc1_r16.lo: $(srcdir)/generated/findloc1_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_r16.lo -MD -MP -MF $(DEPDIR)/findloc1_r16.Tpo -c -o findloc1_r16.lo `test -f '$(srcdir)/generated/findloc1_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_r16.Tpo $(DEPDIR)/findloc1_r16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_r16.c' object='findloc1_r16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_r16.lo `test -f '$(srcdir)/generated/findloc1_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_r16.c +- +-findloc1_c4.lo: $(srcdir)/generated/findloc1_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_c4.lo -MD -MP -MF $(DEPDIR)/findloc1_c4.Tpo -c -o findloc1_c4.lo `test -f '$(srcdir)/generated/findloc1_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_c4.Tpo $(DEPDIR)/findloc1_c4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_c4.c' object='findloc1_c4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_c4.lo `test -f '$(srcdir)/generated/findloc1_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c4.c +- +-findloc1_c8.lo: $(srcdir)/generated/findloc1_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_c8.lo -MD -MP -MF $(DEPDIR)/findloc1_c8.Tpo -c -o findloc1_c8.lo `test -f '$(srcdir)/generated/findloc1_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c8.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_c8.Tpo $(DEPDIR)/findloc1_c8.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_c8.c' object='findloc1_c8.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_c8.lo `test -f '$(srcdir)/generated/findloc1_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c8.c +- +-findloc1_c10.lo: $(srcdir)/generated/findloc1_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_c10.lo -MD -MP -MF $(DEPDIR)/findloc1_c10.Tpo -c -o findloc1_c10.lo `test -f '$(srcdir)/generated/findloc1_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c10.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_c10.Tpo $(DEPDIR)/findloc1_c10.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_c10.c' object='findloc1_c10.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_c10.lo `test -f '$(srcdir)/generated/findloc1_c10.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c10.c +- +-findloc1_c16.lo: $(srcdir)/generated/findloc1_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_c16.lo -MD -MP -MF $(DEPDIR)/findloc1_c16.Tpo -c -o findloc1_c16.lo `test -f '$(srcdir)/generated/findloc1_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c16.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_c16.Tpo $(DEPDIR)/findloc1_c16.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_c16.c' object='findloc1_c16.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_c16.lo `test -f '$(srcdir)/generated/findloc1_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_c16.c +- +-findloc1_s1.lo: $(srcdir)/generated/findloc1_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_s1.lo -MD -MP -MF $(DEPDIR)/findloc1_s1.Tpo -c -o findloc1_s1.lo `test -f '$(srcdir)/generated/findloc1_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_s1.Tpo $(DEPDIR)/findloc1_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_s1.c' object='findloc1_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_s1.lo `test -f '$(srcdir)/generated/findloc1_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_s1.c +- +-findloc1_s4.lo: $(srcdir)/generated/findloc1_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc1_s4.lo -MD -MP -MF $(DEPDIR)/findloc1_s4.Tpo -c -o findloc1_s4.lo `test -f '$(srcdir)/generated/findloc1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc1_s4.Tpo $(DEPDIR)/findloc1_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc1_s4.c' object='findloc1_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc1_s4.lo `test -f '$(srcdir)/generated/findloc1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc1_s4.c +- +-findloc2_s1.lo: $(srcdir)/generated/findloc2_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc2_s1.lo -MD -MP -MF $(DEPDIR)/findloc2_s1.Tpo -c -o findloc2_s1.lo `test -f '$(srcdir)/generated/findloc2_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc2_s1.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc2_s1.Tpo $(DEPDIR)/findloc2_s1.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc2_s1.c' object='findloc2_s1.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc2_s1.lo `test -f '$(srcdir)/generated/findloc2_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc2_s1.c +- +-findloc2_s4.lo: $(srcdir)/generated/findloc2_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc2_s4.lo -MD -MP -MF $(DEPDIR)/findloc2_s4.Tpo -c -o findloc2_s4.lo `test -f '$(srcdir)/generated/findloc2_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc2_s4.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/findloc2_s4.Tpo $(DEPDIR)/findloc2_s4.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/generated/findloc2_s4.c' object='findloc2_s4.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc2_s4.lo `test -f '$(srcdir)/generated/findloc2_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc2_s4.c +- +-ISO_Fortran_binding.lo: $(srcdir)/runtime/ISO_Fortran_binding.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ISO_Fortran_binding.lo -MD -MP -MF $(DEPDIR)/ISO_Fortran_binding.Tpo -c -o ISO_Fortran_binding.lo `test -f '$(srcdir)/runtime/ISO_Fortran_binding.c' || echo '$(srcdir)/'`$(srcdir)/runtime/ISO_Fortran_binding.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ISO_Fortran_binding.Tpo $(DEPDIR)/ISO_Fortran_binding.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/runtime/ISO_Fortran_binding.c' object='ISO_Fortran_binding.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ISO_Fortran_binding.lo `test -f '$(srcdir)/runtime/ISO_Fortran_binding.c' || echo '$(srcdir)/'`$(srcdir)/runtime/ISO_Fortran_binding.c +- +-size_from_kind.lo: io/size_from_kind.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT size_from_kind.lo -MD -MP -MF $(DEPDIR)/size_from_kind.Tpo -c -o size_from_kind.lo `test -f 'io/size_from_kind.c' || echo '$(srcdir)/'`io/size_from_kind.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/size_from_kind.Tpo $(DEPDIR)/size_from_kind.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/size_from_kind.c' object='size_from_kind.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o size_from_kind.lo `test -f 'io/size_from_kind.c' || echo '$(srcdir)/'`io/size_from_kind.c +- +-close.lo: io/close.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT close.lo -MD -MP -MF $(DEPDIR)/close.Tpo -c -o close.lo `test -f 'io/close.c' || echo '$(srcdir)/'`io/close.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/close.Tpo $(DEPDIR)/close.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/close.c' object='close.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o close.lo `test -f 'io/close.c' || echo '$(srcdir)/'`io/close.c +- +-file_pos.lo: io/file_pos.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file_pos.lo -MD -MP -MF $(DEPDIR)/file_pos.Tpo -c -o file_pos.lo `test -f 'io/file_pos.c' || echo '$(srcdir)/'`io/file_pos.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/file_pos.Tpo $(DEPDIR)/file_pos.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/file_pos.c' object='file_pos.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o file_pos.lo `test -f 'io/file_pos.c' || echo '$(srcdir)/'`io/file_pos.c +- +-format.lo: io/format.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT format.lo -MD -MP -MF $(DEPDIR)/format.Tpo -c -o format.lo `test -f 'io/format.c' || echo '$(srcdir)/'`io/format.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/format.Tpo $(DEPDIR)/format.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/format.c' object='format.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o format.lo `test -f 'io/format.c' || echo '$(srcdir)/'`io/format.c +- +-inquire.lo: io/inquire.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inquire.lo -MD -MP -MF $(DEPDIR)/inquire.Tpo -c -o inquire.lo `test -f 'io/inquire.c' || echo '$(srcdir)/'`io/inquire.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inquire.Tpo $(DEPDIR)/inquire.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/inquire.c' object='inquire.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inquire.lo `test -f 'io/inquire.c' || echo '$(srcdir)/'`io/inquire.c +- +-intrinsics.lo: io/intrinsics.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT intrinsics.lo -MD -MP -MF $(DEPDIR)/intrinsics.Tpo -c -o intrinsics.lo `test -f 'io/intrinsics.c' || echo '$(srcdir)/'`io/intrinsics.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/intrinsics.Tpo $(DEPDIR)/intrinsics.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/intrinsics.c' object='intrinsics.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o intrinsics.lo `test -f 'io/intrinsics.c' || echo '$(srcdir)/'`io/intrinsics.c +- +-list_read.lo: io/list_read.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT list_read.lo -MD -MP -MF $(DEPDIR)/list_read.Tpo -c -o list_read.lo `test -f 'io/list_read.c' || echo '$(srcdir)/'`io/list_read.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/list_read.Tpo $(DEPDIR)/list_read.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/list_read.c' object='list_read.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o list_read.lo `test -f 'io/list_read.c' || echo '$(srcdir)/'`io/list_read.c +- +-lock.lo: io/lock.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lock.lo -MD -MP -MF $(DEPDIR)/lock.Tpo -c -o lock.lo `test -f 'io/lock.c' || echo '$(srcdir)/'`io/lock.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lock.Tpo $(DEPDIR)/lock.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/lock.c' object='lock.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lock.lo `test -f 'io/lock.c' || echo '$(srcdir)/'`io/lock.c +- +-open.lo: io/open.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT open.lo -MD -MP -MF $(DEPDIR)/open.Tpo -c -o open.lo `test -f 'io/open.c' || echo '$(srcdir)/'`io/open.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/open.Tpo $(DEPDIR)/open.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/open.c' object='open.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o open.lo `test -f 'io/open.c' || echo '$(srcdir)/'`io/open.c +- +-read.lo: io/read.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read.lo -MD -MP -MF $(DEPDIR)/read.Tpo -c -o read.lo `test -f 'io/read.c' || echo '$(srcdir)/'`io/read.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/read.Tpo $(DEPDIR)/read.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/read.c' object='read.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read.lo `test -f 'io/read.c' || echo '$(srcdir)/'`io/read.c +- +-transfer.lo: io/transfer.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transfer.lo -MD -MP -MF $(DEPDIR)/transfer.Tpo -c -o transfer.lo `test -f 'io/transfer.c' || echo '$(srcdir)/'`io/transfer.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/transfer.Tpo $(DEPDIR)/transfer.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/transfer.c' object='transfer.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transfer.lo `test -f 'io/transfer.c' || echo '$(srcdir)/'`io/transfer.c +- +-transfer128.lo: io/transfer128.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transfer128.lo -MD -MP -MF $(DEPDIR)/transfer128.Tpo -c -o transfer128.lo `test -f 'io/transfer128.c' || echo '$(srcdir)/'`io/transfer128.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/transfer128.Tpo $(DEPDIR)/transfer128.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/transfer128.c' object='transfer128.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transfer128.lo `test -f 'io/transfer128.c' || echo '$(srcdir)/'`io/transfer128.c +- +-unit.lo: io/unit.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit.lo -MD -MP -MF $(DEPDIR)/unit.Tpo -c -o unit.lo `test -f 'io/unit.c' || echo '$(srcdir)/'`io/unit.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit.Tpo $(DEPDIR)/unit.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/unit.c' object='unit.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit.lo `test -f 'io/unit.c' || echo '$(srcdir)/'`io/unit.c +- +-unix.lo: io/unix.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unix.lo -MD -MP -MF $(DEPDIR)/unix.Tpo -c -o unix.lo `test -f 'io/unix.c' || echo '$(srcdir)/'`io/unix.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unix.Tpo $(DEPDIR)/unix.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/unix.c' object='unix.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unix.lo `test -f 'io/unix.c' || echo '$(srcdir)/'`io/unix.c +- +-write.lo: io/write.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write.lo -MD -MP -MF $(DEPDIR)/write.Tpo -c -o write.lo `test -f 'io/write.c' || echo '$(srcdir)/'`io/write.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/write.Tpo $(DEPDIR)/write.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/write.c' object='write.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write.lo `test -f 'io/write.c' || echo '$(srcdir)/'`io/write.c +- +-fbuf.lo: io/fbuf.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbuf.lo -MD -MP -MF $(DEPDIR)/fbuf.Tpo -c -o fbuf.lo `test -f 'io/fbuf.c' || echo '$(srcdir)/'`io/fbuf.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbuf.Tpo $(DEPDIR)/fbuf.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/fbuf.c' object='fbuf.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbuf.lo `test -f 'io/fbuf.c' || echo '$(srcdir)/'`io/fbuf.c +- +-async.lo: io/async.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT async.lo -MD -MP -MF $(DEPDIR)/async.Tpo -c -o async.lo `test -f 'io/async.c' || echo '$(srcdir)/'`io/async.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/async.Tpo $(DEPDIR)/async.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io/async.c' object='async.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o async.lo `test -f 'io/async.c' || echo '$(srcdir)/'`io/async.c +- +-associated.lo: intrinsics/associated.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT associated.lo -MD -MP -MF $(DEPDIR)/associated.Tpo -c -o associated.lo `test -f 'intrinsics/associated.c' || echo '$(srcdir)/'`intrinsics/associated.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/associated.Tpo $(DEPDIR)/associated.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/associated.c' object='associated.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o associated.lo `test -f 'intrinsics/associated.c' || echo '$(srcdir)/'`intrinsics/associated.c +- +-abort.lo: intrinsics/abort.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT abort.lo -MD -MP -MF $(DEPDIR)/abort.Tpo -c -o abort.lo `test -f 'intrinsics/abort.c' || echo '$(srcdir)/'`intrinsics/abort.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/abort.Tpo $(DEPDIR)/abort.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/abort.c' object='abort.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o abort.lo `test -f 'intrinsics/abort.c' || echo '$(srcdir)/'`intrinsics/abort.c +- +-args.lo: intrinsics/args.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT args.lo -MD -MP -MF $(DEPDIR)/args.Tpo -c -o args.lo `test -f 'intrinsics/args.c' || echo '$(srcdir)/'`intrinsics/args.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/args.Tpo $(DEPDIR)/args.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/args.c' object='args.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o args.lo `test -f 'intrinsics/args.c' || echo '$(srcdir)/'`intrinsics/args.c +- +-cshift0.lo: intrinsics/cshift0.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cshift0.lo -MD -MP -MF $(DEPDIR)/cshift0.Tpo -c -o cshift0.lo `test -f 'intrinsics/cshift0.c' || echo '$(srcdir)/'`intrinsics/cshift0.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cshift0.Tpo $(DEPDIR)/cshift0.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/cshift0.c' object='cshift0.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0.lo `test -f 'intrinsics/cshift0.c' || echo '$(srcdir)/'`intrinsics/cshift0.c +- +-eoshift0.lo: intrinsics/eoshift0.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift0.lo -MD -MP -MF $(DEPDIR)/eoshift0.Tpo -c -o eoshift0.lo `test -f 'intrinsics/eoshift0.c' || echo '$(srcdir)/'`intrinsics/eoshift0.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift0.Tpo $(DEPDIR)/eoshift0.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/eoshift0.c' object='eoshift0.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift0.lo `test -f 'intrinsics/eoshift0.c' || echo '$(srcdir)/'`intrinsics/eoshift0.c +- +-eoshift2.lo: intrinsics/eoshift2.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eoshift2.lo -MD -MP -MF $(DEPDIR)/eoshift2.Tpo -c -o eoshift2.lo `test -f 'intrinsics/eoshift2.c' || echo '$(srcdir)/'`intrinsics/eoshift2.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eoshift2.Tpo $(DEPDIR)/eoshift2.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/eoshift2.c' object='eoshift2.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift2.lo `test -f 'intrinsics/eoshift2.c' || echo '$(srcdir)/'`intrinsics/eoshift2.c +- +-erfc_scaled.lo: intrinsics/erfc_scaled.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT erfc_scaled.lo -MD -MP -MF $(DEPDIR)/erfc_scaled.Tpo -c -o erfc_scaled.lo `test -f 'intrinsics/erfc_scaled.c' || echo '$(srcdir)/'`intrinsics/erfc_scaled.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/erfc_scaled.Tpo $(DEPDIR)/erfc_scaled.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/erfc_scaled.c' object='erfc_scaled.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o erfc_scaled.lo `test -f 'intrinsics/erfc_scaled.c' || echo '$(srcdir)/'`intrinsics/erfc_scaled.c +- +-extends_type_of.lo: intrinsics/extends_type_of.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT extends_type_of.lo -MD -MP -MF $(DEPDIR)/extends_type_of.Tpo -c -o extends_type_of.lo `test -f 'intrinsics/extends_type_of.c' || echo '$(srcdir)/'`intrinsics/extends_type_of.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/extends_type_of.Tpo $(DEPDIR)/extends_type_of.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/extends_type_of.c' object='extends_type_of.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o extends_type_of.lo `test -f 'intrinsics/extends_type_of.c' || echo '$(srcdir)/'`intrinsics/extends_type_of.c +- +-fnum.lo: intrinsics/fnum.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fnum.lo -MD -MP -MF $(DEPDIR)/fnum.Tpo -c -o fnum.lo `test -f 'intrinsics/fnum.c' || echo '$(srcdir)/'`intrinsics/fnum.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fnum.Tpo $(DEPDIR)/fnum.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/fnum.c' object='fnum.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fnum.lo `test -f 'intrinsics/fnum.c' || echo '$(srcdir)/'`intrinsics/fnum.c +- +-ierrno.lo: intrinsics/ierrno.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ierrno.lo -MD -MP -MF $(DEPDIR)/ierrno.Tpo -c -o ierrno.lo `test -f 'intrinsics/ierrno.c' || echo '$(srcdir)/'`intrinsics/ierrno.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ierrno.Tpo $(DEPDIR)/ierrno.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/ierrno.c' object='ierrno.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ierrno.lo `test -f 'intrinsics/ierrno.c' || echo '$(srcdir)/'`intrinsics/ierrno.c +- +-ishftc.lo: intrinsics/ishftc.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ishftc.lo -MD -MP -MF $(DEPDIR)/ishftc.Tpo -c -o ishftc.lo `test -f 'intrinsics/ishftc.c' || echo '$(srcdir)/'`intrinsics/ishftc.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ishftc.Tpo $(DEPDIR)/ishftc.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/ishftc.c' object='ishftc.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ishftc.lo `test -f 'intrinsics/ishftc.c' || echo '$(srcdir)/'`intrinsics/ishftc.c +- +-is_contiguous.lo: intrinsics/is_contiguous.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT is_contiguous.lo -MD -MP -MF $(DEPDIR)/is_contiguous.Tpo -c -o is_contiguous.lo `test -f 'intrinsics/is_contiguous.c' || echo '$(srcdir)/'`intrinsics/is_contiguous.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/is_contiguous.Tpo $(DEPDIR)/is_contiguous.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/is_contiguous.c' object='is_contiguous.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o is_contiguous.lo `test -f 'intrinsics/is_contiguous.c' || echo '$(srcdir)/'`intrinsics/is_contiguous.c +- +-mvbits.lo: intrinsics/mvbits.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mvbits.lo -MD -MP -MF $(DEPDIR)/mvbits.Tpo -c -o mvbits.lo `test -f 'intrinsics/mvbits.c' || echo '$(srcdir)/'`intrinsics/mvbits.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mvbits.Tpo $(DEPDIR)/mvbits.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/mvbits.c' object='mvbits.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mvbits.lo `test -f 'intrinsics/mvbits.c' || echo '$(srcdir)/'`intrinsics/mvbits.c +- +-move_alloc.lo: intrinsics/move_alloc.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT move_alloc.lo -MD -MP -MF $(DEPDIR)/move_alloc.Tpo -c -o move_alloc.lo `test -f 'intrinsics/move_alloc.c' || echo '$(srcdir)/'`intrinsics/move_alloc.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/move_alloc.Tpo $(DEPDIR)/move_alloc.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/move_alloc.c' object='move_alloc.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o move_alloc.lo `test -f 'intrinsics/move_alloc.c' || echo '$(srcdir)/'`intrinsics/move_alloc.c +- +-pack_generic.lo: intrinsics/pack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pack_generic.lo -MD -MP -MF $(DEPDIR)/pack_generic.Tpo -c -o pack_generic.lo `test -f 'intrinsics/pack_generic.c' || echo '$(srcdir)/'`intrinsics/pack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pack_generic.Tpo $(DEPDIR)/pack_generic.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/pack_generic.c' object='pack_generic.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_generic.lo `test -f 'intrinsics/pack_generic.c' || echo '$(srcdir)/'`intrinsics/pack_generic.c +- +-selected_char_kind.lo: intrinsics/selected_char_kind.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT selected_char_kind.lo -MD -MP -MF $(DEPDIR)/selected_char_kind.Tpo -c -o selected_char_kind.lo `test -f 'intrinsics/selected_char_kind.c' || echo '$(srcdir)/'`intrinsics/selected_char_kind.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/selected_char_kind.Tpo $(DEPDIR)/selected_char_kind.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/selected_char_kind.c' object='selected_char_kind.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o selected_char_kind.lo `test -f 'intrinsics/selected_char_kind.c' || echo '$(srcdir)/'`intrinsics/selected_char_kind.c +- +-size.lo: intrinsics/size.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT size.lo -MD -MP -MF $(DEPDIR)/size.Tpo -c -o size.lo `test -f 'intrinsics/size.c' || echo '$(srcdir)/'`intrinsics/size.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/size.Tpo $(DEPDIR)/size.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/size.c' object='size.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o size.lo `test -f 'intrinsics/size.c' || echo '$(srcdir)/'`intrinsics/size.c +- +-spread_generic.lo: intrinsics/spread_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spread_generic.lo -MD -MP -MF $(DEPDIR)/spread_generic.Tpo -c -o spread_generic.lo `test -f 'intrinsics/spread_generic.c' || echo '$(srcdir)/'`intrinsics/spread_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spread_generic.Tpo $(DEPDIR)/spread_generic.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/spread_generic.c' object='spread_generic.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_generic.lo `test -f 'intrinsics/spread_generic.c' || echo '$(srcdir)/'`intrinsics/spread_generic.c +- +-string_intrinsics.lo: intrinsics/string_intrinsics.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT string_intrinsics.lo -MD -MP -MF $(DEPDIR)/string_intrinsics.Tpo -c -o string_intrinsics.lo `test -f 'intrinsics/string_intrinsics.c' || echo '$(srcdir)/'`intrinsics/string_intrinsics.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/string_intrinsics.Tpo $(DEPDIR)/string_intrinsics.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/string_intrinsics.c' object='string_intrinsics.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o string_intrinsics.lo `test -f 'intrinsics/string_intrinsics.c' || echo '$(srcdir)/'`intrinsics/string_intrinsics.c +- +-rand.lo: intrinsics/rand.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rand.lo -MD -MP -MF $(DEPDIR)/rand.Tpo -c -o rand.lo `test -f 'intrinsics/rand.c' || echo '$(srcdir)/'`intrinsics/rand.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rand.Tpo $(DEPDIR)/rand.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/rand.c' object='rand.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rand.lo `test -f 'intrinsics/rand.c' || echo '$(srcdir)/'`intrinsics/rand.c +- +-random.lo: intrinsics/random.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.lo -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.lo `test -f 'intrinsics/random.c' || echo '$(srcdir)/'`intrinsics/random.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/random.c' object='random.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o random.lo `test -f 'intrinsics/random.c' || echo '$(srcdir)/'`intrinsics/random.c +- +-reshape_generic.lo: intrinsics/reshape_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_generic.lo -MD -MP -MF $(DEPDIR)/reshape_generic.Tpo -c -o reshape_generic.lo `test -f 'intrinsics/reshape_generic.c' || echo '$(srcdir)/'`intrinsics/reshape_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_generic.Tpo $(DEPDIR)/reshape_generic.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/reshape_generic.c' object='reshape_generic.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_generic.lo `test -f 'intrinsics/reshape_generic.c' || echo '$(srcdir)/'`intrinsics/reshape_generic.c +- +-reshape_packed.lo: intrinsics/reshape_packed.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reshape_packed.lo -MD -MP -MF $(DEPDIR)/reshape_packed.Tpo -c -o reshape_packed.lo `test -f 'intrinsics/reshape_packed.c' || echo '$(srcdir)/'`intrinsics/reshape_packed.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/reshape_packed.Tpo $(DEPDIR)/reshape_packed.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/reshape_packed.c' object='reshape_packed.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_packed.lo `test -f 'intrinsics/reshape_packed.c' || echo '$(srcdir)/'`intrinsics/reshape_packed.c +- +-trigd.lo: intrinsics/trigd.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trigd.lo -MD -MP -MF $(DEPDIR)/trigd.Tpo -c -o trigd.lo `test -f 'intrinsics/trigd.c' || echo '$(srcdir)/'`intrinsics/trigd.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/trigd.Tpo $(DEPDIR)/trigd.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/trigd.c' object='trigd.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trigd.lo `test -f 'intrinsics/trigd.c' || echo '$(srcdir)/'`intrinsics/trigd.c +- +-unpack_generic.lo: intrinsics/unpack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unpack_generic.lo -MD -MP -MF $(DEPDIR)/unpack_generic.Tpo -c -o unpack_generic.lo `test -f 'intrinsics/unpack_generic.c' || echo '$(srcdir)/'`intrinsics/unpack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unpack_generic.Tpo $(DEPDIR)/unpack_generic.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/unpack_generic.c' object='unpack_generic.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack_generic.lo `test -f 'intrinsics/unpack_generic.c' || echo '$(srcdir)/'`intrinsics/unpack_generic.c +- +-in_pack_generic.lo: runtime/in_pack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_pack_generic.lo -MD -MP -MF $(DEPDIR)/in_pack_generic.Tpo -c -o in_pack_generic.lo `test -f 'runtime/in_pack_generic.c' || echo '$(srcdir)/'`runtime/in_pack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_pack_generic.Tpo $(DEPDIR)/in_pack_generic.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/in_pack_generic.c' object='in_pack_generic.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_pack_generic.lo `test -f 'runtime/in_pack_generic.c' || echo '$(srcdir)/'`runtime/in_pack_generic.c +- +-in_unpack_generic.lo: runtime/in_unpack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT in_unpack_generic.lo -MD -MP -MF $(DEPDIR)/in_unpack_generic.Tpo -c -o in_unpack_generic.lo `test -f 'runtime/in_unpack_generic.c' || echo '$(srcdir)/'`runtime/in_unpack_generic.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/in_unpack_generic.Tpo $(DEPDIR)/in_unpack_generic.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='runtime/in_unpack_generic.c' object='in_unpack_generic.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o in_unpack_generic.lo `test -f 'runtime/in_unpack_generic.c' || echo '$(srcdir)/'`runtime/in_unpack_generic.c +- +-access.lo: intrinsics/access.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT access.lo -MD -MP -MF $(DEPDIR)/access.Tpo -c -o access.lo `test -f 'intrinsics/access.c' || echo '$(srcdir)/'`intrinsics/access.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/access.Tpo $(DEPDIR)/access.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/access.c' object='access.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o access.lo `test -f 'intrinsics/access.c' || echo '$(srcdir)/'`intrinsics/access.c +- +-c99_functions.lo: intrinsics/c99_functions.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT c99_functions.lo -MD -MP -MF $(DEPDIR)/c99_functions.Tpo -c -o c99_functions.lo `test -f 'intrinsics/c99_functions.c' || echo '$(srcdir)/'`intrinsics/c99_functions.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/c99_functions.Tpo $(DEPDIR)/c99_functions.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/c99_functions.c' object='c99_functions.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o c99_functions.lo `test -f 'intrinsics/c99_functions.c' || echo '$(srcdir)/'`intrinsics/c99_functions.c +- +-chdir.lo: intrinsics/chdir.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chdir.lo -MD -MP -MF $(DEPDIR)/chdir.Tpo -c -o chdir.lo `test -f 'intrinsics/chdir.c' || echo '$(srcdir)/'`intrinsics/chdir.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chdir.Tpo $(DEPDIR)/chdir.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/chdir.c' object='chdir.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chdir.lo `test -f 'intrinsics/chdir.c' || echo '$(srcdir)/'`intrinsics/chdir.c +- +-chmod.lo: intrinsics/chmod.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chmod.lo -MD -MP -MF $(DEPDIR)/chmod.Tpo -c -o chmod.lo `test -f 'intrinsics/chmod.c' || echo '$(srcdir)/'`intrinsics/chmod.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chmod.Tpo $(DEPDIR)/chmod.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/chmod.c' object='chmod.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chmod.lo `test -f 'intrinsics/chmod.c' || echo '$(srcdir)/'`intrinsics/chmod.c +- +-clock.lo: intrinsics/clock.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT clock.lo -MD -MP -MF $(DEPDIR)/clock.Tpo -c -o clock.lo `test -f 'intrinsics/clock.c' || echo '$(srcdir)/'`intrinsics/clock.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/clock.Tpo $(DEPDIR)/clock.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/clock.c' object='clock.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o clock.lo `test -f 'intrinsics/clock.c' || echo '$(srcdir)/'`intrinsics/clock.c +- +-cpu_time.lo: intrinsics/cpu_time.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpu_time.lo -MD -MP -MF $(DEPDIR)/cpu_time.Tpo -c -o cpu_time.lo `test -f 'intrinsics/cpu_time.c' || echo '$(srcdir)/'`intrinsics/cpu_time.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cpu_time.Tpo $(DEPDIR)/cpu_time.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/cpu_time.c' object='cpu_time.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpu_time.lo `test -f 'intrinsics/cpu_time.c' || echo '$(srcdir)/'`intrinsics/cpu_time.c +- +-ctime.lo: intrinsics/ctime.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ctime.lo -MD -MP -MF $(DEPDIR)/ctime.Tpo -c -o ctime.lo `test -f 'intrinsics/ctime.c' || echo '$(srcdir)/'`intrinsics/ctime.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ctime.Tpo $(DEPDIR)/ctime.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/ctime.c' object='ctime.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ctime.lo `test -f 'intrinsics/ctime.c' || echo '$(srcdir)/'`intrinsics/ctime.c +- +-date_and_time.lo: intrinsics/date_and_time.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT date_and_time.lo -MD -MP -MF $(DEPDIR)/date_and_time.Tpo -c -o date_and_time.lo `test -f 'intrinsics/date_and_time.c' || echo '$(srcdir)/'`intrinsics/date_and_time.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/date_and_time.Tpo $(DEPDIR)/date_and_time.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/date_and_time.c' object='date_and_time.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o date_and_time.lo `test -f 'intrinsics/date_and_time.c' || echo '$(srcdir)/'`intrinsics/date_and_time.c +- +-dtime.lo: intrinsics/dtime.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dtime.lo -MD -MP -MF $(DEPDIR)/dtime.Tpo -c -o dtime.lo `test -f 'intrinsics/dtime.c' || echo '$(srcdir)/'`intrinsics/dtime.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dtime.Tpo $(DEPDIR)/dtime.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/dtime.c' object='dtime.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dtime.lo `test -f 'intrinsics/dtime.c' || echo '$(srcdir)/'`intrinsics/dtime.c +- +-env.lo: intrinsics/env.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT env.lo -MD -MP -MF $(DEPDIR)/env.Tpo -c -o env.lo `test -f 'intrinsics/env.c' || echo '$(srcdir)/'`intrinsics/env.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/env.Tpo $(DEPDIR)/env.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/env.c' object='env.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env.lo `test -f 'intrinsics/env.c' || echo '$(srcdir)/'`intrinsics/env.c +- +-etime.lo: intrinsics/etime.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT etime.lo -MD -MP -MF $(DEPDIR)/etime.Tpo -c -o etime.lo `test -f 'intrinsics/etime.c' || echo '$(srcdir)/'`intrinsics/etime.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/etime.Tpo $(DEPDIR)/etime.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/etime.c' object='etime.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o etime.lo `test -f 'intrinsics/etime.c' || echo '$(srcdir)/'`intrinsics/etime.c +- +-execute_command_line.lo: intrinsics/execute_command_line.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT execute_command_line.lo -MD -MP -MF $(DEPDIR)/execute_command_line.Tpo -c -o execute_command_line.lo `test -f 'intrinsics/execute_command_line.c' || echo '$(srcdir)/'`intrinsics/execute_command_line.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/execute_command_line.Tpo $(DEPDIR)/execute_command_line.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/execute_command_line.c' object='execute_command_line.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o execute_command_line.lo `test -f 'intrinsics/execute_command_line.c' || echo '$(srcdir)/'`intrinsics/execute_command_line.c +- +-exit.lo: intrinsics/exit.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT exit.lo -MD -MP -MF $(DEPDIR)/exit.Tpo -c -o exit.lo `test -f 'intrinsics/exit.c' || echo '$(srcdir)/'`intrinsics/exit.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/exit.Tpo $(DEPDIR)/exit.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/exit.c' object='exit.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o exit.lo `test -f 'intrinsics/exit.c' || echo '$(srcdir)/'`intrinsics/exit.c +- +-gerror.lo: intrinsics/gerror.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gerror.lo -MD -MP -MF $(DEPDIR)/gerror.Tpo -c -o gerror.lo `test -f 'intrinsics/gerror.c' || echo '$(srcdir)/'`intrinsics/gerror.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gerror.Tpo $(DEPDIR)/gerror.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/gerror.c' object='gerror.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gerror.lo `test -f 'intrinsics/gerror.c' || echo '$(srcdir)/'`intrinsics/gerror.c +- +-getcwd.lo: intrinsics/getcwd.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getcwd.lo -MD -MP -MF $(DEPDIR)/getcwd.Tpo -c -o getcwd.lo `test -f 'intrinsics/getcwd.c' || echo '$(srcdir)/'`intrinsics/getcwd.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/getcwd.Tpo $(DEPDIR)/getcwd.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/getcwd.c' object='getcwd.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getcwd.lo `test -f 'intrinsics/getcwd.c' || echo '$(srcdir)/'`intrinsics/getcwd.c +- +-getlog.lo: intrinsics/getlog.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getlog.lo -MD -MP -MF $(DEPDIR)/getlog.Tpo -c -o getlog.lo `test -f 'intrinsics/getlog.c' || echo '$(srcdir)/'`intrinsics/getlog.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/getlog.Tpo $(DEPDIR)/getlog.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/getlog.c' object='getlog.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getlog.lo `test -f 'intrinsics/getlog.c' || echo '$(srcdir)/'`intrinsics/getlog.c +- +-getXid.lo: intrinsics/getXid.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getXid.lo -MD -MP -MF $(DEPDIR)/getXid.Tpo -c -o getXid.lo `test -f 'intrinsics/getXid.c' || echo '$(srcdir)/'`intrinsics/getXid.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/getXid.Tpo $(DEPDIR)/getXid.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/getXid.c' object='getXid.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getXid.lo `test -f 'intrinsics/getXid.c' || echo '$(srcdir)/'`intrinsics/getXid.c +- +-hostnm.lo: intrinsics/hostnm.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hostnm.lo -MD -MP -MF $(DEPDIR)/hostnm.Tpo -c -o hostnm.lo `test -f 'intrinsics/hostnm.c' || echo '$(srcdir)/'`intrinsics/hostnm.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/hostnm.Tpo $(DEPDIR)/hostnm.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/hostnm.c' object='hostnm.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hostnm.lo `test -f 'intrinsics/hostnm.c' || echo '$(srcdir)/'`intrinsics/hostnm.c +- +-kill.lo: intrinsics/kill.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kill.lo -MD -MP -MF $(DEPDIR)/kill.Tpo -c -o kill.lo `test -f 'intrinsics/kill.c' || echo '$(srcdir)/'`intrinsics/kill.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/kill.Tpo $(DEPDIR)/kill.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/kill.c' object='kill.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kill.lo `test -f 'intrinsics/kill.c' || echo '$(srcdir)/'`intrinsics/kill.c +- +-link.lo: intrinsics/link.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT link.lo -MD -MP -MF $(DEPDIR)/link.Tpo -c -o link.lo `test -f 'intrinsics/link.c' || echo '$(srcdir)/'`intrinsics/link.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/link.Tpo $(DEPDIR)/link.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/link.c' object='link.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o link.lo `test -f 'intrinsics/link.c' || echo '$(srcdir)/'`intrinsics/link.c +- +-perror.lo: intrinsics/perror.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT perror.lo -MD -MP -MF $(DEPDIR)/perror.Tpo -c -o perror.lo `test -f 'intrinsics/perror.c' || echo '$(srcdir)/'`intrinsics/perror.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/perror.Tpo $(DEPDIR)/perror.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/perror.c' object='perror.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o perror.lo `test -f 'intrinsics/perror.c' || echo '$(srcdir)/'`intrinsics/perror.c +- +-signal.lo: intrinsics/signal.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT signal.lo -MD -MP -MF $(DEPDIR)/signal.Tpo -c -o signal.lo `test -f 'intrinsics/signal.c' || echo '$(srcdir)/'`intrinsics/signal.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/signal.Tpo $(DEPDIR)/signal.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/signal.c' object='signal.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o signal.lo `test -f 'intrinsics/signal.c' || echo '$(srcdir)/'`intrinsics/signal.c +- +-sleep.lo: intrinsics/sleep.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sleep.lo -MD -MP -MF $(DEPDIR)/sleep.Tpo -c -o sleep.lo `test -f 'intrinsics/sleep.c' || echo '$(srcdir)/'`intrinsics/sleep.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sleep.Tpo $(DEPDIR)/sleep.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/sleep.c' object='sleep.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sleep.lo `test -f 'intrinsics/sleep.c' || echo '$(srcdir)/'`intrinsics/sleep.c +- +-system.lo: intrinsics/system.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT system.lo -MD -MP -MF $(DEPDIR)/system.Tpo -c -o system.lo `test -f 'intrinsics/system.c' || echo '$(srcdir)/'`intrinsics/system.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/system.Tpo $(DEPDIR)/system.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/system.c' object='system.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o system.lo `test -f 'intrinsics/system.c' || echo '$(srcdir)/'`intrinsics/system.c +- +-rename.lo: intrinsics/rename.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rename.lo -MD -MP -MF $(DEPDIR)/rename.Tpo -c -o rename.lo `test -f 'intrinsics/rename.c' || echo '$(srcdir)/'`intrinsics/rename.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rename.Tpo $(DEPDIR)/rename.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/rename.c' object='rename.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rename.lo `test -f 'intrinsics/rename.c' || echo '$(srcdir)/'`intrinsics/rename.c +- +-stat.lo: intrinsics/stat.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat.lo -MD -MP -MF $(DEPDIR)/stat.Tpo -c -o stat.lo `test -f 'intrinsics/stat.c' || echo '$(srcdir)/'`intrinsics/stat.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat.Tpo $(DEPDIR)/stat.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/stat.c' object='stat.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat.lo `test -f 'intrinsics/stat.c' || echo '$(srcdir)/'`intrinsics/stat.c +- +-symlnk.lo: intrinsics/symlnk.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT symlnk.lo -MD -MP -MF $(DEPDIR)/symlnk.Tpo -c -o symlnk.lo `test -f 'intrinsics/symlnk.c' || echo '$(srcdir)/'`intrinsics/symlnk.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/symlnk.Tpo $(DEPDIR)/symlnk.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/symlnk.c' object='symlnk.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o symlnk.lo `test -f 'intrinsics/symlnk.c' || echo '$(srcdir)/'`intrinsics/symlnk.c +- +-system_clock.lo: intrinsics/system_clock.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT system_clock.lo -MD -MP -MF $(DEPDIR)/system_clock.Tpo -c -o system_clock.lo `test -f 'intrinsics/system_clock.c' || echo '$(srcdir)/'`intrinsics/system_clock.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/system_clock.Tpo $(DEPDIR)/system_clock.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/system_clock.c' object='system_clock.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o system_clock.lo `test -f 'intrinsics/system_clock.c' || echo '$(srcdir)/'`intrinsics/system_clock.c +- +-time.lo: intrinsics/time.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.lo -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.lo `test -f 'intrinsics/time.c' || echo '$(srcdir)/'`intrinsics/time.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/time.c' object='time.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o time.lo `test -f 'intrinsics/time.c' || echo '$(srcdir)/'`intrinsics/time.c +- +-umask.lo: intrinsics/umask.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT umask.lo -MD -MP -MF $(DEPDIR)/umask.Tpo -c -o umask.lo `test -f 'intrinsics/umask.c' || echo '$(srcdir)/'`intrinsics/umask.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/umask.Tpo $(DEPDIR)/umask.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/umask.c' object='umask.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o umask.lo `test -f 'intrinsics/umask.c' || echo '$(srcdir)/'`intrinsics/umask.c +- +-unlink.lo: intrinsics/unlink.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unlink.lo -MD -MP -MF $(DEPDIR)/unlink.Tpo -c -o unlink.lo `test -f 'intrinsics/unlink.c' || echo '$(srcdir)/'`intrinsics/unlink.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unlink.Tpo $(DEPDIR)/unlink.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intrinsics/unlink.c' object='unlink.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unlink.lo `test -f 'intrinsics/unlink.c' || echo '$(srcdir)/'`intrinsics/unlink.c +- +-ieee_helper.lo: ieee/ieee_helper.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ieee_helper.lo -MD -MP -MF $(DEPDIR)/ieee_helper.Tpo -c -o ieee_helper.lo `test -f 'ieee/ieee_helper.c' || echo '$(srcdir)/'`ieee/ieee_helper.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ieee_helper.Tpo $(DEPDIR)/ieee_helper.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ieee/ieee_helper.c' object='ieee_helper.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ieee_helper.lo `test -f 'ieee/ieee_helper.c' || echo '$(srcdir)/'`ieee/ieee_helper.c +- +-.f90.o: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $< +- +-.f90.obj: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +- +-.f90.lo: +- $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $< +- +-selected_int_kind.lo: intrinsics/selected_int_kind.f90 +- $(AM_V_FC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o selected_int_kind.lo `test -f 'intrinsics/selected_int_kind.f90' || echo '$(srcdir)/'`intrinsics/selected_int_kind.f90 +- +-selected_real_kind.lo: intrinsics/selected_real_kind.f90 +- $(AM_V_FC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o selected_real_kind.lo `test -f 'intrinsics/selected_real_kind.f90' || echo '$(srcdir)/'`intrinsics/selected_real_kind.f90 +- +-dprod_r8.lo: intrinsics/dprod_r8.f90 +- $(AM_V_FC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o dprod_r8.lo `test -f 'intrinsics/dprod_r8.f90' || echo '$(srcdir)/'`intrinsics/dprod_r8.f90 +- +-random_init.lo: intrinsics/random_init.f90 +- $(AM_V_FC)$(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o random_init.lo `test -f 'intrinsics/random_init.f90' || echo '$(srcdir)/'`intrinsics/random_init.f90 +- +-mostlyclean-libtool: +- -rm -f *.lo +- +-clean-libtool: +- -rm -rf .libs _libs +- +-distclean-libtool: +- -rm -f libtool config.lt +-install-toolexeclibDATA: $(toolexeclib_DATA) +- @$(NORMAL_INSTALL) +- @list='$(toolexeclib_DATA)'; test -n "$(toolexeclibdir)" || list=; \ +- if test -n "$$list"; then \ +- echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ +- fi; \ +- for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- echo "$$d$$p"; \ +- done | $(am__base_list) | \ +- while read files; do \ +- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(toolexeclibdir)'"; \ +- $(INSTALL_DATA) $$files "$(DESTDIR)$(toolexeclibdir)" || exit $$?; \ +- done +- +-uninstall-toolexeclibDATA: +- @$(NORMAL_UNINSTALL) +- @list='$(toolexeclib_DATA)'; test -n "$(toolexeclibdir)" || list=; \ +- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ +- dir='$(DESTDIR)$(toolexeclibdir)'; $(am__uninstall_files_from_dir) +-install-gfor_cHEADERS: $(gfor_c_HEADERS) +- @$(NORMAL_INSTALL) +- @list='$(gfor_c_HEADERS)'; test -n "$(gfor_cdir)" || list=; \ +- if test -n "$$list"; then \ +- echo " $(MKDIR_P) '$(DESTDIR)$(gfor_cdir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(gfor_cdir)" || exit 1; \ +- fi; \ +- for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- echo "$$d$$p"; \ +- done | $(am__base_list) | \ +- while read files; do \ +- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gfor_cdir)'"; \ +- $(INSTALL_HEADER) $$files "$(DESTDIR)$(gfor_cdir)" || exit $$?; \ +- done +- +-uninstall-gfor_cHEADERS: +- @$(NORMAL_UNINSTALL) +- @list='$(gfor_c_HEADERS)'; test -n "$(gfor_cdir)" || list=; \ +- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ +- dir='$(DESTDIR)$(gfor_cdir)'; $(am__uninstall_files_from_dir) +-install-nodist_fincludeHEADERS: $(nodist_finclude_HEADERS) +- @$(NORMAL_INSTALL) +- @list='$(nodist_finclude_HEADERS)'; test -n "$(fincludedir)" || list=; \ +- if test -n "$$list"; then \ +- echo " $(MKDIR_P) '$(DESTDIR)$(fincludedir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(fincludedir)" || exit 1; \ +- fi; \ +- for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- echo "$$d$$p"; \ +- done | $(am__base_list) | \ +- while read files; do \ +- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(fincludedir)'"; \ +- $(INSTALL_HEADER) $$files "$(DESTDIR)$(fincludedir)" || exit $$?; \ +- done +- +-uninstall-nodist_fincludeHEADERS: +- @$(NORMAL_UNINSTALL) +- @list='$(nodist_finclude_HEADERS)'; test -n "$(fincludedir)" || list=; \ +- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ +- dir='$(DESTDIR)$(fincludedir)'; $(am__uninstall_files_from_dir) +- +-ID: $(am__tagged_files) +- $(am__define_uniq_tagged_files); mkid -fID $$unique +-tags: tags-am +-TAGS: tags +- +-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +- set x; \ +- here=`pwd`; \ +- $(am__define_uniq_tagged_files); \ +- shift; \ +- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ +- test -n "$$unique" || unique=$$empty_fix; \ +- if test $$# -gt 0; then \ +- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- "$$@" $$unique; \ +- else \ +- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$unique; \ +- fi; \ +- fi +-ctags: ctags-am +- +-CTAGS: ctags +-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +- $(am__define_uniq_tagged_files); \ +- test -z "$(CTAGS_ARGS)$$unique" \ +- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ +- $$unique +- +-GTAGS: +- here=`$(am__cd) $(top_builddir) && pwd` \ +- && $(am__cd) $(top_srcdir) \ +- && gtags -i $(GTAGS_ARGS) "$$here" +-cscope: cscope.files +- test ! -s cscope.files \ +- || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +-clean-cscope: +- -rm -f cscope.files +-cscope.files: clean-cscope cscopelist +-cscopelist: cscopelist-am +- +-cscopelist-am: $(am__tagged_files) +- list='$(am__tagged_files)'; \ +- case "$(srcdir)" in \ +- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ +- *) sdir=$(subdir)/$(srcdir) ;; \ +- esac; \ +- for i in $$list; do \ +- if test -f "$$i"; then \ +- echo "$(subdir)/$$i"; \ +- else \ +- echo "$$sdir/$$i"; \ +- fi; \ +- done >> $(top_builddir)/cscope.files +- +-distclean-tags: +- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +- -rm -f cscope.out cscope.in.out cscope.po.out cscope.files +-check-am: all-am +-check: $(BUILT_SOURCES) +- $(MAKE) $(AM_MAKEFLAGS) check-am +-all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h all-local +-installdirs: +- for dir in "$(DESTDIR)$(cafexeclibdir)" "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(gfor_cdir)" "$(DESTDIR)$(fincludedir)"; do \ +- test -z "$$dir" || $(MKDIR_P) "$$dir"; \ +- done +-install: $(BUILT_SOURCES) +- $(MAKE) $(AM_MAKEFLAGS) install-am +-install-exec: install-exec-am +-install-data: install-data-am +-uninstall: uninstall-am +- +-install-am: all-am +- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +- +-installcheck: installcheck-am +-install-strip: +- if test -z '$(STRIP)'; then \ +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- install; \ +- else \ +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ +- fi +-mostlyclean-generic: +- +-clean-generic: +- +-distclean-generic: +- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) +- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) +- +-maintainer-clean-generic: +- @echo "This command is intended for maintainers to use" +- @echo "it deletes files that may require special tools to rebuild." +- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +-clean: clean-am +- +-clean-am: clean-cafexeclibLTLIBRARIES clean-generic clean-libtool \ +- clean-local clean-toolexeclibLTLIBRARIES mostlyclean-am +- +-distclean: distclean-am +- -rm -f $(am__CONFIG_DISTCLEAN_FILES) +- -rm -rf ./$(DEPDIR) +- -rm -f Makefile +-distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-hdr distclean-libtool distclean-local distclean-tags +- +-dvi: dvi-am +- +-dvi-am: +- +-html: html-am +- +-html-am: +- +-info: info-am +- +-info-am: +- +-install-data-am: install-gfor_cHEADERS install-nodist_fincludeHEADERS +- +-install-dvi: install-dvi-am +- +-install-dvi-am: +- +-install-exec-am: install-cafexeclibLTLIBRARIES install-exec-local \ +- install-toolexeclibDATA install-toolexeclibLTLIBRARIES +- +-install-html: install-html-am +- +-install-html-am: +- +-install-info: install-info-am +- +-install-info-am: +- +-install-man: +- +-install-pdf: install-pdf-am +- +-install-pdf-am: +- +-install-ps: install-ps-am +- +-install-ps-am: +- +-installcheck-am: +- +-maintainer-clean: maintainer-clean-am +- -rm -f $(am__CONFIG_DISTCLEAN_FILES) +- -rm -rf $(top_srcdir)/autom4te.cache +- -rm -rf ./$(DEPDIR) +- -rm -f Makefile +-maintainer-clean-am: distclean-am maintainer-clean-generic \ +- maintainer-clean-local +- +-mostlyclean: mostlyclean-am +- +-mostlyclean-am: mostlyclean-compile mostlyclean-generic \ +- mostlyclean-libtool mostlyclean-local +- +-pdf: pdf-am +- +-pdf-am: +- +-ps: ps-am +- +-ps-am: +- +-uninstall-am: uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ +- uninstall-nodist_fincludeHEADERS uninstall-toolexeclibDATA \ +- uninstall-toolexeclibLTLIBRARIES +- +-.MAKE: all check install install-am install-strip +- +-.PHONY: CTAGS GTAGS TAGS all all-am all-local am--refresh check \ +- check-am clean clean-cafexeclibLTLIBRARIES clean-cscope \ +- clean-generic clean-libtool clean-local \ +- clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \ +- ctags-am distclean distclean-compile distclean-generic \ +- distclean-hdr distclean-libtool distclean-local distclean-tags \ +- dvi dvi-am html html-am info info-am install install-am \ +- install-cafexeclibLTLIBRARIES install-data install-data-am \ +- install-dvi install-dvi-am install-exec install-exec-am \ +- install-exec-local install-gfor_cHEADERS install-html \ +- install-html-am install-info install-info-am install-man \ +- install-nodist_fincludeHEADERS install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip install-toolexeclibDATA \ +- install-toolexeclibLTLIBRARIES installcheck installcheck-am \ +- installdirs maintainer-clean maintainer-clean-generic \ +- maintainer-clean-local mostlyclean mostlyclean-compile \ +- mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ +- pdf-am ps ps-am tags tags-am uninstall uninstall-am \ +- uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ +- uninstall-nodist_fincludeHEADERS uninstall-toolexeclibDATA \ +- uninstall-toolexeclibLTLIBRARIES +- +-.PRECIOUS: Makefile ++.PRECIOUS: Makefile + + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@gfortran.map-sun : $(srcdir)/gfortran.map \ + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(top_srcdir)/../contrib/make_sunver.pl \ +@@ -6985,29 +4244,32 @@ uninstall-am: uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ > $@ || (rm -f $@ ; exit 1) + + # Turn on vectorization and loop unrolling for matmul. +-$(patsubst %.c,%.lo,$(notdir $(i_matmul_c))): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 ++$(patsubst %.c,%.lo,$(i_matmul_c)): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 + + # Turn on AVX128 for AMD-specific matmul, but only if the compiler understands -mprefer-avx128 +-@HAVE_AVX128_TRUE@$(patsubst %.c,%.lo,$(notdir $(i_matmulavx128_c))): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mprefer-avx128 ++@HAVE_AVX128_TRUE@$(patsubst %.c,%.lo,$(i_matmulavx128_c)): AM_CFLAGS += -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mprefer-avx128 + # Logical matmul doesn't vectorize. +-$(patsubst %.c,%.lo,$(notdir $(i_matmull_c))): AM_CFLAGS += -funroll-loops ++$(patsubst %.c,%.lo,$(i_matmull_c)): AM_CFLAGS += -funroll-loops + + # Add the -fallow-leading-underscore option when needed +-$(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(notdir $(gfor_specific_src)))): AM_FCFLAGS += -fallow-leading-underscore +-selected_real_kind.lo selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore ++$(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(gfor_specific_src))): AM_FCFLAGS += -fallow-leading-underscore ++intrinsics/selected_real_kind.lo intrinsics/selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore + + # Add flags for IEEE modules +-@IEEE_SUPPORT_TRUE@$(patsubst %.F90,%.lo,$(notdir $(gfor_ieee_src))): AM_FCFLAGS += -Wno-unused-dummy-argument -Wno-c-binding-type -ffree-line-length-0 -fallow-leading-underscore ++@IEEE_SUPPORT_TRUE@$(patsubst %.F90,%.lo,$(gfor_ieee_src)): AM_FCFLAGS += -Wno-unused-dummy-argument -Wno-c-binding-type -ffree-line-length-0 -fallow-leading-underscore -fsignaling-nans ++ ++# Add flags for IEEE helper code ++@IEEE_SUPPORT_TRUE@$(patsubst %.c,%.lo,$(gfor_ieee_helper_src)): AM_CFLAGS += -fsignaling-nans + + # Dependencies between IEEE_ARITHMETIC and IEEE_EXCEPTIONS +-ieee_arithmetic.lo: ieee/ieee_arithmetic.F90 ieee_exceptions.lo ++ieee/ieee_arithmetic.lo: ieee/ieee_arithmetic.F90 ieee/ieee_exceptions.lo + $(LTPPFCCOMPILE) -c -o $@ $< + +-ieee_features.mod: ieee_features.lo ++ieee_features.mod: ieee/ieee_features.lo + : +-ieee_exceptions.mod: ieee_exceptions.lo ++ieee_exceptions.mod: ieee/ieee_exceptions.lo + : +-ieee_arithmetic.mod: ieee_arithmetic.lo ++ieee_arithmetic.mod: ieee/ieee_arithmetic.lo + : + @onestep_TRUE@libgfortran_c.c libgfortran_f.f90 libgfortran_F.F90: + @onestep_TRUE@ echo > $@ +diff --git a/libgfortran/config/fpu-aarch64.h b/libgfortran/config/fpu-aarch64.h +new file mode 100644 +index 00000000000..0746f42938a +--- /dev/null ++++ b/libgfortran/config/fpu-aarch64.h +@@ -0,0 +1,331 @@ ++/* FPU-related code for aarch64. ++ Copyright (C) 2020 Free Software Foundation, Inc. ++ Contributed by Francois-Xavier Coudert ++ ++This file is part of the GNU Fortran runtime library (libgfortran). ++ ++Libgfortran is free software; you can redistribute it and/or ++modify it under the terms of the GNU General Public ++License as published by the Free Software Foundation; either ++version 3 of the License, or (at your option) any later version. ++ ++Libgfortran is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++. */ ++ ++ ++/* Rounding mask and modes */ ++ ++#define FPCR_RM_MASK 0x0c00000 ++#define FE_TONEAREST 0x0000000 ++#define FE_UPWARD 0x0400000 ++#define FE_DOWNWARD 0x0800000 ++#define FE_TOWARDZERO 0x0c00000 ++#define FE_MAP_FZ 0x1000000 ++ ++/* Exceptions */ ++ ++#define FE_INVALID 1 ++#define FE_DIVBYZERO 2 ++#define FE_OVERFLOW 4 ++#define FE_UNDERFLOW 8 ++#define FE_INEXACT 16 ++ ++#define FE_ALL_EXCEPT (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++#define FE_EXCEPT_SHIFT 8 ++ ++ ++ ++/* This structure corresponds to the layout of the block ++ written by FSTENV. */ ++struct fenv ++{ ++ unsigned int __fpcr; ++ unsigned int __fpsr; ++}; ++ ++/* Check we can actually store the FPU state in the allocated size. */ ++_Static_assert (sizeof(struct fenv) <= (size_t) GFC_FPE_STATE_BUFFER_SIZE, ++ "GFC_FPE_STATE_BUFFER_SIZE is too small"); ++ ++ ++ ++void ++set_fpu (void) ++{ ++ if (options.fpe & GFC_FPE_DENORMAL) ++ estr_write ("Fortran runtime warning: Floating point 'denormal operand' " ++ "exception not supported.\n"); ++ ++ set_fpu_trap_exceptions (options.fpe, 0); ++} ++ ++ ++int ++get_fpu_trap_exceptions (void) ++{ ++ unsigned int fpcr, exceptions; ++ int res = 0; ++ ++ fpcr = __builtin_aarch64_get_fpcr(); ++ exceptions = (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; ++ ++ if (exceptions & FE_INVALID) res |= GFC_FPE_INVALID; ++ if (exceptions & FE_DIVBYZERO) res |= GFC_FPE_ZERO; ++ if (exceptions & FE_OVERFLOW) res |= GFC_FPE_OVERFLOW; ++ if (exceptions & FE_UNDERFLOW) res |= GFC_FPE_UNDERFLOW; ++ if (exceptions & FE_INEXACT) res |= GFC_FPE_INEXACT; ++ ++ return res; ++} ++ ++ ++void set_fpu_trap_exceptions (int trap, int notrap) ++{ ++ unsigned int mode_set = 0, mode_clr = 0; ++ unsigned int fpsr, fpsr_new; ++ unsigned int fpcr, fpcr_new; ++ ++ if (trap & GFC_FPE_INVALID) ++ mode_set |= FE_INVALID; ++ if (notrap & GFC_FPE_INVALID) ++ mode_clr |= FE_INVALID; ++ ++ if (trap & GFC_FPE_ZERO) ++ mode_set |= FE_DIVBYZERO; ++ if (notrap & GFC_FPE_ZERO) ++ mode_clr |= FE_DIVBYZERO; ++ ++ if (trap & GFC_FPE_OVERFLOW) ++ mode_set |= FE_OVERFLOW; ++ if (notrap & GFC_FPE_OVERFLOW) ++ mode_clr |= FE_OVERFLOW; ++ ++ if (trap & GFC_FPE_UNDERFLOW) ++ mode_set |= FE_UNDERFLOW; ++ if (notrap & GFC_FPE_UNDERFLOW) ++ mode_clr |= FE_UNDERFLOW; ++ ++ if (trap & GFC_FPE_INEXACT) ++ mode_set |= FE_INEXACT; ++ if (notrap & GFC_FPE_INEXACT) ++ mode_clr |= FE_INEXACT; ++ ++ /* Clear stalled exception flags. */ ++ fpsr = __builtin_aarch64_get_fpsr(); ++ fpsr_new = fpsr & ~FE_ALL_EXCEPT; ++ if (fpsr_new != fpsr) ++ __builtin_aarch64_set_fpsr(fpsr_new); ++ ++ fpcr_new = fpcr = __builtin_aarch64_get_fpcr(); ++ fpcr_new |= (mode_set << FE_EXCEPT_SHIFT); ++ fpcr_new &= ~(mode_clr << FE_EXCEPT_SHIFT); ++ ++ if (fpcr_new != fpcr) ++ __builtin_aarch64_set_fpcr(fpcr_new); ++} ++ ++ ++int ++support_fpu_flag (int flag) ++{ ++ if (flag & GFC_FPE_DENORMAL) ++ return 0; ++ ++ return 1; ++} ++ ++ ++int ++support_fpu_trap (int flag) ++{ ++ if (flag & GFC_FPE_DENORMAL) ++ return 0; ++ ++ return 1; ++} ++ ++ ++int ++get_fpu_except_flags (void) ++{ ++ int result; ++ unsigned int fpsr; ++ ++ result = 0; ++ fpsr = __builtin_aarch64_get_fpsr() & FE_ALL_EXCEPT; ++ ++ if (fpsr & FE_INVALID) ++ result |= GFC_FPE_INVALID; ++ if (fpsr & FE_DIVBYZERO) ++ result |= GFC_FPE_ZERO; ++ if (fpsr & FE_OVERFLOW) ++ result |= GFC_FPE_OVERFLOW; ++ if (fpsr & FE_UNDERFLOW) ++ result |= GFC_FPE_UNDERFLOW; ++ if (fpsr & FE_INEXACT) ++ result |= GFC_FPE_INEXACT; ++ ++ return result; ++} ++ ++ ++void ++set_fpu_except_flags (int set, int clear) ++{ ++ unsigned int exc_set = 0, exc_clr = 0; ++ unsigned int fpsr, fpsr_new; ++ ++ if (set & GFC_FPE_INVALID) ++ exc_set |= FE_INVALID; ++ else if (clear & GFC_FPE_INVALID) ++ exc_clr |= FE_INVALID; ++ ++ if (set & GFC_FPE_ZERO) ++ exc_set |= FE_DIVBYZERO; ++ else if (clear & GFC_FPE_ZERO) ++ exc_clr |= FE_DIVBYZERO; ++ ++ if (set & GFC_FPE_OVERFLOW) ++ exc_set |= FE_OVERFLOW; ++ else if (clear & GFC_FPE_OVERFLOW) ++ exc_clr |= FE_OVERFLOW; ++ ++ if (set & GFC_FPE_UNDERFLOW) ++ exc_set |= FE_UNDERFLOW; ++ else if (clear & GFC_FPE_UNDERFLOW) ++ exc_clr |= FE_UNDERFLOW; ++ ++ if (set & GFC_FPE_INEXACT) ++ exc_set |= FE_INEXACT; ++ else if (clear & GFC_FPE_INEXACT) ++ exc_clr |= FE_INEXACT; ++ ++ fpsr_new = fpsr = __builtin_aarch64_get_fpsr(); ++ fpsr_new &= ~exc_clr; ++ fpsr_new |= exc_set; ++ ++ if (fpsr_new != fpsr) ++ __builtin_aarch64_set_fpsr(fpsr_new); ++} ++ ++ ++void ++get_fpu_state (void *state) ++{ ++ struct fenv *envp = state; ++ envp->__fpcr = __builtin_aarch64_get_fpcr(); ++ envp->__fpsr = __builtin_aarch64_get_fpsr(); ++} ++ ++ ++void ++set_fpu_state (void *state) ++{ ++ struct fenv *envp = state; ++ __builtin_aarch64_set_fpcr(envp->__fpcr); ++ __builtin_aarch64_set_fpsr(envp->__fpsr); ++} ++ ++ ++int ++get_fpu_rounding_mode (void) ++{ ++ unsigned int fpcr = __builtin_aarch64_get_fpcr(); ++ fpcr &= FPCR_RM_MASK; ++ ++ switch (fpcr) ++ { ++ case FE_TONEAREST: ++ return GFC_FPE_TONEAREST; ++ case FE_UPWARD: ++ return GFC_FPE_UPWARD; ++ case FE_DOWNWARD: ++ return GFC_FPE_DOWNWARD; ++ case FE_TOWARDZERO: ++ return GFC_FPE_TOWARDZERO; ++ default: ++ return 0; /* Should be unreachable. */ ++ } ++} ++ ++ ++void ++set_fpu_rounding_mode (int round) ++{ ++ unsigned int fpcr, round_mode; ++ ++ switch (round) ++ { ++ case GFC_FPE_TONEAREST: ++ round_mode = FE_TONEAREST; ++ break; ++ case GFC_FPE_UPWARD: ++ round_mode = FE_UPWARD; ++ break; ++ case GFC_FPE_DOWNWARD: ++ round_mode = FE_DOWNWARD; ++ break; ++ case GFC_FPE_TOWARDZERO: ++ round_mode = FE_TOWARDZERO; ++ break; ++ default: ++ return; /* Should be unreachable. */ ++ } ++ ++ fpcr = __builtin_aarch64_get_fpcr(); ++ ++ /* Only set FPCR if requested mode is different from current. */ ++ round_mode = (fpcr ^ round_mode) & FPCR_RM_MASK; ++ if (round_mode != 0) ++ __builtin_aarch64_set_fpcr(fpcr ^ round_mode); ++} ++ ++ ++int ++support_fpu_rounding_mode (int mode __attribute__((unused))) ++{ ++ return 1; ++} ++ ++ ++int ++support_fpu_underflow_control (int kind __attribute__((unused))) ++{ ++ /* Not supported for binary128. */ ++ return (kind == 4 || kind == 8) ? 1 : 0; ++} ++ ++ ++int ++get_fpu_underflow_mode (void) ++{ ++ unsigned int fpcr = __builtin_aarch64_get_fpcr(); ++ ++ /* Return 0 for abrupt underflow (flush to zero), 1 for gradual underflow. */ ++ return (fpcr & FE_MAP_FZ) ? 0 : 1; ++} ++ ++ ++void ++set_fpu_underflow_mode (int gradual __attribute__((unused))) ++{ ++ unsigned int fpcr = __builtin_aarch64_get_fpcr(); ++ ++ if (gradual) ++ fpcr &= ~FE_MAP_FZ; ++ else ++ fpcr |= FE_MAP_FZ; ++ ++ __builtin_aarch64_set_fpcr(fpcr); ++} +diff --git a/libgfortran/configure b/libgfortran/configure +index f3634389cf8..c15c2c99bda 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -655,9 +655,12 @@ extra_ldflags_libgfortran + ac_ct_FC + FCFLAGS + FC ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags ++LIBM + OTOOL64 + OTOOL + LIPO +@@ -821,6 +824,7 @@ enable_static + with_pic + enable_fast_install + enable_libtool_lock ++enable_darwin_at_rpath + enable_largefile + enable_libquadmath_support + with_gcc_major_version_only +@@ -1476,6 +1480,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-largefile omit support for large files + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -6017,7 +6024,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -9194,7 +9201,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10904,6 +10911,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10921,9 +10971,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12731,7 +12785,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12744 "configure" ++#line 12788 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12837,7 +12891,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12850 "configure" ++#line 12894 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13074,6 +13128,147 @@ CC="$lt_save_CC" + # Only expand once: + + ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*-ncr-sysv4.3*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 ++$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } ++if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lmw $LIBS" ++if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char _mwvalidcheckl (); ++int ++main () ++{ ++return _mwvalidcheckl (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_mw__mwvalidcheckl=yes ++else ++ ac_cv_lib_mw__mwvalidcheckl=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 ++$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } ++if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : ++ LIBM="-lmw" ++fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 ++$as_echo_n "checking for cos in -lm... " >&6; } ++if ${ac_cv_lib_m_cos+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lm $LIBS" ++if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char cos (); ++int ++main () ++{ ++return cos (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_m_cos=yes ++else ++ ac_cv_lib_m_cos=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 ++$as_echo "$ac_cv_lib_m_cos" >&6; } ++if test "x$ac_cv_lib_m_cos" = xyes; then : ++ LIBM="$LIBM -lm" ++fi ++ ++ ;; ++*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 ++$as_echo_n "checking for cos in -lm... " >&6; } ++if ${ac_cv_lib_m_cos+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lm $LIBS" ++if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char cos (); ++int ++main () ++{ ++return cos (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_m_cos=yes ++else ++ ac_cv_lib_m_cos=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 ++$as_echo "$ac_cv_lib_m_cos" >&6; } ++if test "x$ac_cv_lib_m_cos" = xyes; then : ++ LIBM="-lm" ++fi ++ ++ ;; ++esac ++ ++ + + + +@@ -13098,6 +13293,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10 + + # We need gfortran to compile parts of the library +@@ -14741,6 +14944,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes +@@ -14758,9 +15004,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -15532,16 +15782,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -15663,7 +15903,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -16024,9 +16264,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # extra LD Flags which are required for targets ++extra_ldflags_libgfortran= + case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libgfortran ++ *-*-darwin[4567]*) ++ # Earlier Darwin needs -single_module when linking libgfortran + extra_ldflags_libgfortran=-Wl,-single_module + ;; + esac +@@ -27414,6 +27655,10 @@ if test -z "${HAVE_HWCAP_TRUE}" && test -z "${HAVE_HWCAP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_HWCAP\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${LIBGFOR_BUILD_QUAD_TRUE}" && test -z "${LIBGFOR_BUILD_QUAD_FALSE}"; then + as_fn_error $? "conditional \"LIBGFOR_BUILD_QUAD\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index 8961e314d82..75732cde810 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -264,9 +264,11 @@ AC_PROG_INSTALL + #AC_MSG_NOTICE([====== Starting libtool configuration]) + AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL ++LT_LIB_M + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10 + + # We need gfortran to compile parts of the library +@@ -275,9 +277,10 @@ FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets ++extra_ldflags_libgfortran= + case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libgfortran ++ *-*-darwin[[4567]]*) ++ # Earlier Darwin needs -single_module when linking libgfortran + extra_ldflags_libgfortran=-Wl,-single_module + ;; + esac +diff --git a/libgfortran/configure.host b/libgfortran/configure.host +index e9d92c9d34d..3d6c2db7772 100644 +--- a/libgfortran/configure.host ++++ b/libgfortran/configure.host +@@ -39,17 +39,29 @@ if test "x${have_feenableexcept}" = "xyes"; then + ieee_support='yes' + fi + +-# x86 asm should be used instead of glibc, since glibc doesn't support +-# the x86 denormal exception. + case "${host_cpu}" in ++ ++ # x86 asm should be used instead of glibc, since glibc doesn't support ++ # the x86 denormal exception. + i?86 | x86_64) + if test "x${have_soft_float}" = "xyes"; then + fpu_host='fpu-generic' ++ ieee_support='no' + else + fpu_host='fpu-387' ++ ieee_support='yes' + fi +- ieee_support='yes' + ;; ++ ++ # use asm on aarch64-darwin ++ aarch64) ++ case "${host_os}" in ++ darwin*) ++ fpu_host='fpu-aarch64' ++ ieee_support='yes' ++ ;; ++ esac ++ + esac + + # Some targets require additional compiler options for NaN/Inf. +diff --git a/libgfortran/ieee/ieee_arithmetic.F90 b/libgfortran/ieee/ieee_arithmetic.F90 +index 35a16938f8e..23f29726f26 100644 +--- a/libgfortran/ieee/ieee_arithmetic.F90 ++++ b/libgfortran/ieee/ieee_arithmetic.F90 +@@ -915,275 +915,63 @@ contains + ! IEEE_VALUE + + elemental real(kind=4) function IEEE_VALUE_4(X, CLASS) result(res) +- + real(kind=4), intent(in) :: X + type(IEEE_CLASS_TYPE), intent(in) :: CLASS +- logical flag +- +- select case (CLASS%hidden) +- case (1) ! IEEE_SIGNALING_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (2) ! IEEE_QUIET_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (3) ! IEEE_NEGATIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = (-res) * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case (4) ! IEEE_NEGATIVE_NORMAL +- res = -42 +- case (5) ! IEEE_NEGATIVE_DENORMAL +- res = -tiny(res) +- res = res / 2 +- case (6) ! IEEE_NEGATIVE_ZERO +- res = 0 +- res = -res +- case (7) ! IEEE_POSITIVE_ZERO +- res = 0 +- case (8) ! IEEE_POSITIVE_DENORMAL +- res = tiny(res) +- res = res / 2 +- case (9) ! IEEE_POSITIVE_NORMAL +- res = 42 +- case (10) ! IEEE_POSITIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = res * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case default ! IEEE_OTHER_VALUE, should not happen +- res = 0 +- end select ++ ++ interface ++ pure real(kind=4) function _gfortrani_ieee_value_helper_4(x) ++ use ISO_C_BINDING, only: C_INT ++ integer(kind=C_INT), value :: x ++ end function ++ end interface ++ ++ res = _gfortrani_ieee_value_helper_4(CLASS%hidden) + end function + + elemental real(kind=8) function IEEE_VALUE_8(X, CLASS) result(res) +- + real(kind=8), intent(in) :: X + type(IEEE_CLASS_TYPE), intent(in) :: CLASS +- logical flag +- +- select case (CLASS%hidden) +- case (1) ! IEEE_SIGNALING_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (2) ! IEEE_QUIET_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (3) ! IEEE_NEGATIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = (-res) * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case (4) ! IEEE_NEGATIVE_NORMAL +- res = -42 +- case (5) ! IEEE_NEGATIVE_DENORMAL +- res = -tiny(res) +- res = res / 2 +- case (6) ! IEEE_NEGATIVE_ZERO +- res = 0 +- res = -res +- case (7) ! IEEE_POSITIVE_ZERO +- res = 0 +- case (8) ! IEEE_POSITIVE_DENORMAL +- res = tiny(res) +- res = res / 2 +- case (9) ! IEEE_POSITIVE_NORMAL +- res = 42 +- case (10) ! IEEE_POSITIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = res * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case default ! IEEE_OTHER_VALUE, should not happen +- res = 0 +- end select ++ ++ interface ++ pure real(kind=8) function _gfortrani_ieee_value_helper_8(x) ++ use ISO_C_BINDING, only: C_INT ++ integer(kind=C_INT), value :: x ++ end function ++ end interface ++ ++ res = _gfortrani_ieee_value_helper_8(CLASS%hidden) + end function + + #ifdef HAVE_GFC_REAL_10 + elemental real(kind=10) function IEEE_VALUE_10(X, CLASS) result(res) +- + real(kind=10), intent(in) :: X + type(IEEE_CLASS_TYPE), intent(in) :: CLASS +- logical flag +- +- select case (CLASS%hidden) +- case (1) ! IEEE_SIGNALING_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (2) ! IEEE_QUIET_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (3) ! IEEE_NEGATIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = (-res) * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case (4) ! IEEE_NEGATIVE_NORMAL +- res = -42 +- case (5) ! IEEE_NEGATIVE_DENORMAL +- res = -tiny(res) +- res = res / 2 +- case (6) ! IEEE_NEGATIVE_ZERO +- res = 0 +- res = -res +- case (7) ! IEEE_POSITIVE_ZERO +- res = 0 +- case (8) ! IEEE_POSITIVE_DENORMAL +- res = tiny(res) +- res = res / 2 +- case (9) ! IEEE_POSITIVE_NORMAL +- res = 42 +- case (10) ! IEEE_POSITIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = res * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case default ! IEEE_OTHER_VALUE, should not happen +- res = 0 +- end select ++ ++ interface ++ pure real(kind=10) function _gfortrani_ieee_value_helper_10(x) ++ use ISO_C_BINDING, only: C_INT ++ integer(kind=C_INT), value :: x ++ end function ++ end interface ++ ++ res = _gfortrani_ieee_value_helper_10(CLASS%hidden) + end function + + #endif + + #ifdef HAVE_GFC_REAL_16 + elemental real(kind=16) function IEEE_VALUE_16(X, CLASS) result(res) +- + real(kind=16), intent(in) :: X + type(IEEE_CLASS_TYPE), intent(in) :: CLASS +- logical flag +- +- select case (CLASS%hidden) +- case (1) ! IEEE_SIGNALING_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (2) ! IEEE_QUIET_NAN +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_get_halting_mode(ieee_invalid, flag) +- call ieee_set_halting_mode(ieee_invalid, .false.) +- end if +- res = -1 +- res = sqrt(res) +- if (ieee_support_halting(ieee_invalid)) then +- call ieee_set_halting_mode(ieee_invalid, flag) +- end if +- case (3) ! IEEE_NEGATIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = (-res) * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case (4) ! IEEE_NEGATIVE_NORMAL +- res = -42 +- case (5) ! IEEE_NEGATIVE_DENORMAL +- res = -tiny(res) +- res = res / 2 +- case (6) ! IEEE_NEGATIVE_ZERO +- res = 0 +- res = -res +- case (7) ! IEEE_POSITIVE_ZERO +- res = 0 +- case (8) ! IEEE_POSITIVE_DENORMAL +- res = tiny(res) +- res = res / 2 +- case (9) ! IEEE_POSITIVE_NORMAL +- res = 42 +- case (10) ! IEEE_POSITIVE_INF +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_get_halting_mode(ieee_overflow, flag) +- call ieee_set_halting_mode(ieee_overflow, .false.) +- end if +- res = huge(res) +- res = res * res +- if (ieee_support_halting(ieee_overflow)) then +- call ieee_set_halting_mode(ieee_overflow, flag) +- end if +- case default ! IEEE_OTHER_VALUE, should not happen +- res = 0 +- end select ++ ++ interface ++ pure real(kind=16) function _gfortrani_ieee_value_helper_16(x) ++ use ISO_C_BINDING, only: C_INT ++ integer(kind=C_INT), value :: x ++ end function ++ end interface ++ ++ res = _gfortrani_ieee_value_helper_16(CLASS%hidden) + end function + #endif + +diff --git a/libgfortran/ieee/ieee_helper.c b/libgfortran/ieee/ieee_helper.c +index c9236d34139..ac2f4533f89 100644 +--- a/libgfortran/ieee/ieee_helper.c ++++ b/libgfortran/ieee/ieee_helper.c +@@ -25,6 +25,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #include "libgfortran.h" + ++ ++/* Check support for issignaling macro. If not, we include our own ++ fallback implementation. */ ++#ifndef issignaling ++# include "issignaling_fallback.h" ++#endif ++ ++ + /* Prototypes. */ + + extern int ieee_class_helper_4 (GFC_REAL_4 *); +@@ -47,11 +55,22 @@ internal_proto(ieee_class_helper_16); + correspond to the hidden arguments of the IEEE_CLASS_TYPE + derived-type of IEEE_ARITHMETIC. */ + +-enum { IEEE_OTHER_VALUE = 0, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, +- IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL, IEEE_NEGATIVE_DENORMAL, +- IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL, +- IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF, IEEE_SUBNORMAL, +- IEEE_NEGATIVE_SUBNORMAL, IEEE_POSITIVE_SUBNORMAL }; ++enum { ++ IEEE_OTHER_VALUE = 0, ++ IEEE_SIGNALING_NAN, ++ IEEE_QUIET_NAN, ++ IEEE_NEGATIVE_INF, ++ IEEE_NEGATIVE_NORMAL, ++ IEEE_NEGATIVE_DENORMAL, ++ IEEE_NEGATIVE_SUBNORMAL = IEEE_NEGATIVE_DENORMAL, ++ IEEE_NEGATIVE_ZERO, ++ IEEE_POSITIVE_ZERO, ++ IEEE_POSITIVE_DENORMAL, ++ IEEE_POSITIVE_SUBNORMAL = IEEE_POSITIVE_DENORMAL, ++ IEEE_POSITIVE_NORMAL, ++ IEEE_POSITIVE_INF ++}; ++ + + #define CLASSMACRO(TYPE) \ + int ieee_class_helper_ ## TYPE (GFC_REAL_ ## TYPE *value) \ +@@ -75,8 +94,10 @@ enum { IEEE_OTHER_VALUE = 0, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, + \ + if (res == IEEE_QUIET_NAN) \ + { \ +- /* TODO: Handle signaling NaNs */ \ +- return res; \ ++ if (issignaling (*value)) \ ++ return IEEE_SIGNALING_NAN; \ ++ else \ ++ return IEEE_QUIET_NAN; \ + } \ + \ + return res; \ +@@ -94,6 +115,80 @@ CLASSMACRO(16) + #endif + + ++extern GFC_REAL_4 ieee_value_helper_4 (int); ++internal_proto(ieee_value_helper_4); ++ ++extern GFC_REAL_8 ieee_value_helper_8 (int); ++internal_proto(ieee_value_helper_8); ++ ++#ifdef HAVE_GFC_REAL_10 ++extern GFC_REAL_10 ieee_value_helper_10 (int); ++internal_proto(ieee_value_helper_10); ++#endif ++ ++#ifdef HAVE_GFC_REAL_16 ++extern GFC_REAL_16 ieee_value_helper_16 (int); ++internal_proto(ieee_value_helper_16); ++#endif ++ ++ ++#define VALUEMACRO(TYPE, SUFFIX) \ ++ GFC_REAL_ ## TYPE ieee_value_helper_ ## TYPE (int type) \ ++ { \ ++ switch (type) \ ++ { \ ++ case IEEE_SIGNALING_NAN: \ ++ return __builtin_nans ## SUFFIX (""); \ ++ \ ++ case IEEE_QUIET_NAN: \ ++ return __builtin_nan ## SUFFIX (""); \ ++ \ ++ case IEEE_NEGATIVE_INF: \ ++ return - __builtin_inf ## SUFFIX (); \ ++ \ ++ case IEEE_NEGATIVE_NORMAL: \ ++ return -42; \ ++ \ ++ case IEEE_NEGATIVE_DENORMAL: \ ++ return -(GFC_REAL_ ## TYPE ## _TINY) / 2; \ ++ \ ++ case IEEE_NEGATIVE_ZERO: \ ++ return -(GFC_REAL_ ## TYPE) 0; \ ++ \ ++ case IEEE_POSITIVE_ZERO: \ ++ return 0; \ ++ \ ++ case IEEE_POSITIVE_DENORMAL: \ ++ return (GFC_REAL_ ## TYPE ## _TINY) / 2; \ ++ \ ++ case IEEE_POSITIVE_NORMAL: \ ++ return 42; \ ++ \ ++ case IEEE_POSITIVE_INF: \ ++ return __builtin_inf ## SUFFIX (); \ ++ \ ++ default: \ ++ return 0; \ ++ } \ ++ } ++ ++ ++VALUEMACRO(4, f) ++VALUEMACRO(8, ) ++ ++#ifdef HAVE_GFC_REAL_10 ++VALUEMACRO(10, l) ++#endif ++ ++#ifdef HAVE_GFC_REAL_16 ++# ifdef GFC_REAL_16_IS_FLOAT128 ++VALUEMACRO(16, f128) ++# else ++VALUEMACRO(16, l) ++# endif ++#endif ++ ++ + #define GFC_FPE_ALL (GFC_FPE_INVALID | GFC_FPE_DENORMAL | \ + GFC_FPE_ZERO | GFC_FPE_OVERFLOW | \ + GFC_FPE_UNDERFLOW | GFC_FPE_INEXACT) +diff --git a/libgfortran/ieee/issignaling_fallback.h b/libgfortran/ieee/issignaling_fallback.h +new file mode 100644 +index 00000000000..945c3fc510d +--- /dev/null ++++ b/libgfortran/ieee/issignaling_fallback.h +@@ -0,0 +1,238 @@ ++/* Fallback implementation of issignaling macro. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ Contributed by Francois-Xavier Coudert ++ ++This file is part of the GNU Fortran runtime library (libgfortran). ++ ++Libgfortran is free software; you can redistribute it and/or ++modify it under the terms of the GNU General Public ++License as published by the Free Software Foundation; either ++version 3 of the License, or (at your option) any later version. ++ ++Libgfortran is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++. */ ++ ++#include "libgfortran.h" ++ ++/* This header provides an implementation of the type-generic issignaling macro. ++ Some points of note: ++ ++ - This header is only included if the issignaling macro is not defined. ++ - All targets for which Fortran IEEE modules are supported currently have ++ the high-order bit of the NaN mantissa clear for signaling (and set ++ for quiet), as recommended by IEEE. ++ - We use the __*_IS_IEC_60559__ macros to make sure we only deal with formats ++ we know. For other floating-point formats, we consider all NaNs as quiet. ++ ++ */ ++ ++typedef union ++{ ++ float value; ++ uint32_t word; ++} ieee_float_shape_type; ++ ++static inline int ++__issignalingf (float x) ++{ ++#if __FLT_IS_IEC_60559__ ++ uint32_t xi; ++ ieee_float_shape_type u; ++ ++ u.value = x; ++ xi = u.word; ++ ++ xi ^= 0x00400000; ++ return (xi & 0x7fffffff) > 0x7fc00000; ++#else ++ return 0; ++#endif ++} ++ ++ ++typedef union ++{ ++ double value; ++ uint64_t word; ++} ieee_double_shape_type; ++ ++static inline int ++__issignaling (double x) ++{ ++#if __DBL_IS_IEC_60559__ ++ ieee_double_shape_type u; ++ uint64_t xi; ++ ++ u.value = x; ++ xi = u.word; ++ ++ xi ^= UINT64_C (0x0008000000000000); ++ return (xi & UINT64_C (0x7fffffffffffffff)) > UINT64_C (0x7ff8000000000000); ++#else ++ return 0; ++#endif ++} ++ ++ ++#if __LDBL_DIG__ == __DBL_DIG__ ++ ++/* Long double is the same as double. */ ++static inline int ++__issignalingl (long double x) ++{ ++ return __issignaling (x); ++} ++ ++#elif (__LDBL_DIG__ == 18) && __LDBL_IS_IEC_60559__ ++ ++/* Long double is x86 extended type. */ ++ ++typedef union ++{ ++ long double value; ++ struct ++ { ++#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__ ++ int sign_exponent:16; ++ unsigned int empty:16; ++ uint32_t msw; ++ uint32_t lsw; ++#elif __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++ uint32_t lsw; ++ uint32_t msw; ++ int sign_exponent:16; ++ unsigned int empty:16; ++#endif ++ } parts; ++} ieee_long_double_shape_type; ++ ++static inline int ++__issignalingl (long double x) ++{ ++ int ret; ++ uint32_t exi, hxi, lxi; ++ ieee_long_double_shape_type u; ++ ++ u.value = x; ++ exi = u.parts.sign_exponent; ++ hxi = u.parts.msw; ++ lxi = u.parts.lsw; ++ ++ /* Pseudo numbers on x86 are always signaling. */ ++ ret = (exi & 0x7fff) && ((hxi & 0x80000000) == 0); ++ ++ hxi ^= 0x40000000; ++ hxi |= (lxi | -lxi) >> 31; ++ return ret || (((exi & 0x7fff) == 0x7fff) && (hxi > 0xc0000000)); ++} ++ ++#elif (__LDBL_DIG__ == 33) && __LDBL_IS_IEC_60559__ ++ ++/* Long double is 128-bit type. */ ++ ++typedef union ++{ ++ long double value; ++ struct ++ { ++#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__ ++ uint64_t msw; ++ uint64_t lsw; ++#elif __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++ uint64_t lsw; ++ uint64_t msw; ++#endif ++ } parts64; ++} ieee854_long_double_shape_type; ++ ++static inline int ++__issignalingl (long double x) ++{ ++ uint64_t hxi, lxi; ++ ieee854_long_double_shape_type u; ++ ++ u.value = x; ++ hxi = u.parts64.msw; ++ lxi = u.parts64.lsw; ++ ++ hxi ^= UINT64_C (0x0000800000000000); ++ hxi |= (lxi | -lxi) >> 63; ++ return (hxi & UINT64_C (0x7fffffffffffffff)) > UINT64_C (0x7fff800000000000); ++} ++ ++#else ++ ++static inline int ++__issignalingl (long double x) ++{ ++ return 0; ++} ++ ++#endif ++ ++ ++#if defined(GFC_REAL_16_IS_FLOAT128) ++ ++/* We have a __float128 type. */ ++ ++typedef union ++{ ++ __float128 value; ++ struct ++ { ++#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__ ++ uint64_t msw; ++ uint64_t lsw; ++#elif __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++ uint64_t lsw; ++ uint64_t msw; ++#endif ++ } parts64; ++} ieee854_float128_shape_type; ++ ++static inline int ++__issignalingf128 (__float128 x) ++{ ++ uint64_t hxi, lxi; ++ ieee854_float128_shape_type u; ++ ++ u.value = x; ++ hxi = u.parts64.msw; ++ lxi = u.parts64.lsw; ++ ++ hxi ^= UINT64_C (0x0000800000000000); ++ hxi |= (lxi | -lxi) >> 63; ++ return (hxi & UINT64_C (0x7fffffffffffffff)) > UINT64_C (0x7fff800000000000); ++} ++ ++#endif ++ ++ ++/* Define the type-generic macro based on the functions above. */ ++ ++#if defined(GFC_REAL_16_IS_FLOAT128) ++# define issignaling(X) \ ++ _Generic ((X), \ ++ __float128: __issignalingf128, \ ++ float: __issignalingf, \ ++ double: __issignaling, \ ++ long double: __issignalingl)(X) ++#else ++# define issignaling(X) \ ++ _Generic ((X), \ ++ float: __issignalingf, \ ++ double: __issignaling, \ ++ long double: __issignalingl)(X) ++#endif ++ +diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c +index 8213127ec95..de40bbc964e 100644 +--- a/libgfortran/intrinsics/date_and_time.c ++++ b/libgfortran/intrinsics/date_and_time.c +@@ -113,9 +113,6 @@ gmtime_r (const time_t * timep, struct tm * result) + VALUES for INTEGER(kind=4) and INTEGER(kind=8). + + Based on libU77's date_time_.c. +- +- TODO : +- - Check year boundaries. + */ + #define DATE_LEN 8 + #define TIME_LEN 10 +@@ -131,7 +128,7 @@ date_and_time (char *__date, char *__time, char *__zone, + gfc_array_i4 *__values, GFC_INTEGER_4 __date_len, + GFC_INTEGER_4 __time_len, GFC_INTEGER_4 __zone_len) + { +- int i; ++ int i, delta_day; + char date[DATE_LEN + 1]; + char timec[TIME_LEN + 1]; + char zone[ZONE_LEN + 1]; +@@ -154,9 +151,22 @@ date_and_time (char *__date, char *__time, char *__zone, + values[0] = 1900 + local_time.tm_year; + values[1] = 1 + local_time.tm_mon; + values[2] = local_time.tm_mday; +- values[3] = (local_time.tm_min - UTC_time.tm_min + +- 60 * (local_time.tm_hour - UTC_time.tm_hour + +- 24 * (local_time.tm_yday - UTC_time.tm_yday))); ++ ++ /* Day difference with UTC should always be -1, 0 or +1. ++ Near year boundaries, we may obtain a large positive (+364, ++ or +365 on leap years) or negative (-364, or -365 on leap years) ++ number, which we have to handle. ++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98507 ++ */ ++ delta_day = local_time.tm_yday - UTC_time.tm_yday; ++ if (delta_day < -1) ++ delta_day = 1; ++ else if (delta_day > 1) ++ delta_day = -1; ++ ++ values[3] = local_time.tm_min - UTC_time.tm_min ++ + 60 * (local_time.tm_hour - UTC_time.tm_hour + 24 * delta_day); ++ + values[4] = local_time.tm_hour; + values[5] = local_time.tm_min; + values[6] = local_time.tm_sec; +diff --git a/libgfortran/intrinsics/time_1.h b/libgfortran/intrinsics/time_1.h +index 2d238fd075b..b2adca0c5f3 100644 +--- a/libgfortran/intrinsics/time_1.h ++++ b/libgfortran/intrinsics/time_1.h +@@ -213,19 +213,19 @@ gf_cputime (long *user_sec, long *user_usec, long *system_sec, long *system_usec + static inline int + gf_gettime (time_t * secs, long * usecs) + { +-#ifdef HAVE_GETTIMEOFDAY ++#ifdef HAVE_CLOCK_GETTIME ++ struct timespec ts; ++ int err = clock_gettime (CLOCK_REALTIME, &ts); ++ *secs = ts.tv_sec; ++ *usecs = ts.tv_nsec / 1000; ++ return err; ++#elif defined(HAVE_GETTIMEOFDAY) + struct timeval tv; + int err; + err = gettimeofday (&tv, NULL); + *secs = tv.tv_sec; + *usecs = tv.tv_usec; + return err; +-#elif defined(HAVE_CLOCK_GETTIME) +- struct timespec ts; +- int err = clock_gettime (CLOCK_REALTIME, &ts); +- *secs = ts.tv_sec; +- *usecs = ts.tv_nsec / 1000; +- return err; + #else + time_t t = time (NULL); + *secs = t; +diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c +index 7e71ca577e0..4ed1698f17a 100644 +--- a/libgfortran/io/file_pos.c ++++ b/libgfortran/io/file_pos.c +@@ -527,7 +527,7 @@ st_flush (st_parameter_filepos *fpp) + } + else + /* FLUSH on unconnected unit is illegal: F95 std., 9.3.5. */ +- generate_error (&fpp->common, LIBERROR_BAD_OPTION, ++ generate_error (&fpp->common, -LIBERROR_BAD_UNIT, + "Specified UNIT in FLUSH is not connected"); + + if (needs_unlock) +diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c +index 56f8dbd858a..927e3785a34 100644 +--- a/libgfortran/io/format.c ++++ b/libgfortran/io/format.c +@@ -29,7 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #include "io.h" + #include "format.h" +-#include + #include + + +@@ -193,7 +192,7 @@ next_char (format_data *fmt, int literal) + return -1; + + fmt->format_string_len--; +- c = toupper (*fmt->format_string++); ++ c = safe_toupper (*fmt->format_string++); + fmt->error_element = c; + } + while ((c == ' ' || c == '\t') && !literal); +@@ -328,7 +327,7 @@ format_lex (format_data *fmt) + + case '+': + c = next_char (fmt, 0); +- if (!isdigit (c)) ++ if (!safe_isdigit (c)) + { + token = FMT_UNKNOWN; + break; +@@ -339,7 +338,7 @@ format_lex (format_data *fmt) + for (;;) + { + c = next_char (fmt, 0); +- if (!isdigit (c)) ++ if (!safe_isdigit (c)) + break; + + fmt->value = 10 * fmt->value + c - '0'; +@@ -367,7 +366,7 @@ format_lex (format_data *fmt) + for (;;) + { + c = next_char (fmt, 0); +- if (!isdigit (c)) ++ if (!safe_isdigit (c)) + break; + + fmt->value = 10 * fmt->value + c - '0'; +diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c +index 8cc7ddbe8e2..f902ee4fe1d 100644 +--- a/libgfortran/io/list_read.c ++++ b/libgfortran/io/list_read.c +@@ -29,7 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #include "fbuf.h" + #include "unix.h" + #include +-#include + + typedef unsigned char uchar; + +@@ -811,7 +810,7 @@ read_logical (st_parameter_dt *dtp, int length) + if (parse_repeat (dtp)) + return; + +- c = tolower (next_char (dtp)); ++ c = safe_tolower (next_char (dtp)); + l_push_char (dtp, c); + switch (c) + { +@@ -837,7 +836,7 @@ read_logical (st_parameter_dt *dtp, int length) + break; + + case '.': +- c = tolower (next_char (dtp)); ++ c = safe_tolower (next_char (dtp)); + switch (c) + { + case 't': +@@ -1052,7 +1051,7 @@ read_integer (st_parameter_dt *dtp, int length) + } + + get_integer: +- if (!isdigit (c)) ++ if (!safe_isdigit (c)) + goto bad_integer; + push_char (dtp, c); + +@@ -1303,7 +1302,7 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length) + if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA) + c = '.'; + +- if (!isdigit (c) && c != '.') ++ if (!safe_isdigit (c) && c != '.') + { + if (c == 'i' || c == 'I' || c == 'n' || c == 'N') + goto inf_nan; +@@ -1377,7 +1376,7 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length) + } + + exp2: +- if (!isdigit (c)) ++ if (!safe_isdigit (c)) + { + /* Extension: allow default exponent of 0 when omitted. */ + if (dtp->common.flags & IOPARM_DT_DEC_EXT) +@@ -1748,7 +1747,7 @@ read_real (st_parameter_dt *dtp, void *dest, int length) + if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA) + c = '.'; + +- if (!isdigit (c) && c != '.') ++ if (!safe_isdigit (c) && c != '.') + { + if (c == 'i' || c == 'I' || c == 'n' || c == 'N') + goto inf_nan; +@@ -1828,7 +1827,7 @@ read_real (st_parameter_dt *dtp, void *dest, int length) + } + + exp2: +- if (!isdigit (c)) ++ if (!safe_isdigit (c)) + { + /* Extension: allow default exponent of 0 when omitted. */ + if (dtp->common.flags & IOPARM_DT_DEC_EXT) +@@ -2757,7 +2756,7 @@ nml_match_name (st_parameter_dt *dtp, const char *name, index_type len) + for (i = 0; i < len; i++) + { + c = next_char (dtp); +- if (c == EOF || (tolower (c) != tolower (name[i]))) ++ if (c == EOF || (safe_tolower (c) != safe_tolower (name[i]))) + { + dtp->u.p.nml_read_error = 1; + break; +@@ -3286,7 +3285,7 @@ get_name: + do + { + if (!is_separator (c)) +- push_char_default (dtp, tolower(c)); ++ push_char_default (dtp, safe_tolower(c)); + if ((c = next_char (dtp)) == EOF) + goto nml_err_ret; + } +diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c +index 7515d912c51..7b3f137d687 100644 +--- a/libgfortran/io/read.c ++++ b/libgfortran/io/read.c +@@ -28,7 +28,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #include "format.h" + #include "unix.h" + #include +-#include + #include + #include "async.h" + +@@ -959,7 +958,7 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length) + between "NaN" and the optional perenthesis is not permitted. */ + while (w > 0) + { +- *out = tolower (*p); ++ *out = safe_tolower (*p); + switch (*p) + { + case ' ': +@@ -981,7 +980,7 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length) + goto bad_float; + break; + default: +- if (!isalnum (*out)) ++ if (!safe_isalnum (*out)) + goto bad_float; + } + --w; +@@ -1109,7 +1108,7 @@ exponent: + + if (dtp->u.p.blank_status == BLANK_UNSPECIFIED) + { +- while (w > 0 && isdigit (*p)) ++ while (w > 0 && safe_isdigit (*p)) + { + exponent *= 10; + exponent += *p - '0'; +@@ -1137,7 +1136,7 @@ exponent: + else + assert (dtp->u.p.blank_status == BLANK_NULL); + } +- else if (!isdigit (*p)) ++ else if (!safe_isdigit (*p)) + goto bad_float; + else + { +diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c +index 278cd47cabb..41c9162ea4c 100644 +--- a/libgfortran/io/write.c ++++ b/libgfortran/io/write.c +@@ -30,7 +30,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #include "unix.h" + #include + #include +-#include + + #define star_fill(p, n) memset(p, '*', n) + +@@ -796,10 +795,10 @@ write_boz (st_parameter_dt *dtp, const fnode *f, const char *q, int n, int len) + + static void + write_decimal (st_parameter_dt *dtp, const fnode *f, const char *source, +- int len, +- const char *(*conv) (GFC_INTEGER_LARGEST, char *, size_t)) ++ int len) + { + GFC_INTEGER_LARGEST n = 0; ++ GFC_UINTEGER_LARGEST absn; + int w, m, digits, nsign, nzero, nblank; + char *p; + const char *q; +@@ -832,18 +831,14 @@ write_decimal (st_parameter_dt *dtp, const fnode *f, const char *source, + + sign = calculate_sign (dtp, n < 0); + if (n < 0) +- n = -n; ++ /* Use unsigned to protect from overflow. */ ++ absn = -(GFC_UINTEGER_LARGEST) n; ++ else ++ absn = n; + nsign = sign == S_NONE ? 0 : 1; + +- /* conv calls itoa which sets the negative sign needed +- by write_integer. The sign '+' or '-' is set below based on sign +- calculated above, so we just point past the sign in the string +- before proceeding to avoid double signs in corner cases. +- (see PR38504) */ +- q = conv (n, itoa_buf, sizeof (itoa_buf)); +- if (*q == '-') +- q++; +- ++ /* gfc_itoa() converts the nonnegative value to decimal representation. */ ++ q = gfc_itoa (absn, itoa_buf, sizeof (itoa_buf)); + digits = strlen (q); + + /* Select a width if none was specified. The idea here is to always +@@ -946,7 +941,37 @@ write_decimal (st_parameter_dt *dtp, const fnode *f, const char *source, + } + + +-/* Convert unsigned octal to ascii. */ ++/* Convert hexadecimal to ASCII. */ ++ ++static const char * ++xtoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) ++{ ++ int digit; ++ char *p; ++ ++ assert (len >= GFC_XTOA_BUF_SIZE); ++ ++ if (n == 0) ++ return "0"; ++ ++ p = buffer + GFC_XTOA_BUF_SIZE - 1; ++ *p = '\0'; ++ ++ while (n != 0) ++ { ++ digit = n & 0xF; ++ if (digit > 9) ++ digit += 'A' - '0' - 10; ++ ++ *--p = '0' + digit; ++ n >>= 4; ++ } ++ ++ return p; ++} ++ ++ ++/* Convert unsigned octal to ASCII. */ + + static const char * + otoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) +@@ -971,7 +996,7 @@ otoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) + } + + +-/* Convert unsigned binary to ascii. */ ++/* Convert unsigned binary to ASCII. */ + + static const char * + btoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) +@@ -995,7 +1020,7 @@ btoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) + return p; + } + +-/* The following three functions, btoa_big, otoa_big, and ztoa_big, are needed ++/* The following three functions, btoa_big, otoa_big, and xtoa_big, are needed + to convert large reals with kind sizes that exceed the largest integer type + available on certain platforms. In these cases, byte by byte conversion is + performed. Endianess is taken into account. */ +@@ -1133,10 +1158,10 @@ otoa_big (const char *s, char *buffer, int len, GFC_UINTEGER_LARGEST *n) + return q; + } + +-/* Conversion to hexidecimal. */ ++/* Conversion to hexadecimal. */ + + static const char * +-ztoa_big (const char *s, char *buffer, int len, GFC_UINTEGER_LARGEST *n) ++xtoa_big (const char *s, char *buffer, int len, GFC_UINTEGER_LARGEST *n) + { + static char a[16] = {'0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; +@@ -1178,7 +1203,7 @@ ztoa_big (const char *s, char *buffer, int len, GFC_UINTEGER_LARGEST *n) + } + } + +- /* write_z, which calls ztoa_big, is called from transfer.c, ++ /* write_z, which calls xtoa_big, is called from transfer.c, + formatted_transfer_scalar_write. There it is passed the kind as + argument, which means a maximum of 16. The buffer is large + enough, but the compiler does not know that, so shut up the +@@ -1202,7 +1227,7 @@ ztoa_big (const char *s, char *buffer, int len, GFC_UINTEGER_LARGEST *n) + void + write_i (st_parameter_dt *dtp, const fnode *f, const char *p, int len) + { +- write_decimal (dtp, f, p, len, (void *) gfc_itoa); ++ write_decimal (dtp, f, p, len); + } + + +@@ -1259,13 +1284,13 @@ write_z (st_parameter_dt *dtp, const fnode *f, const char *source, int len) + + if (len > (int) sizeof (GFC_UINTEGER_LARGEST)) + { +- p = ztoa_big (source, itoa_buf, len, &n); ++ p = xtoa_big (source, itoa_buf, len, &n); + write_boz (dtp, f, p, n, len); + } + else + { + n = extract_uint (source, len); +- p = gfc_xtoa (n, itoa_buf, sizeof (itoa_buf)); ++ p = xtoa (n, itoa_buf, sizeof (itoa_buf)); + write_boz (dtp, f, p, n, len); + } + } +@@ -1366,7 +1391,7 @@ write_integer (st_parameter_dt *dtp, const char *source, int kind) + f.u.integer.w = width; + f.u.integer.m = -1; + f.format = FMT_NONE; +- write_decimal (dtp, &f, source, kind, (void *) gfc_itoa); ++ write_decimal (dtp, &f, source, kind); + } + + +@@ -2101,14 +2126,14 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info *obj, index_type offset, + base_name_len = strlen (base_name); + for (dim_i = 0; dim_i < base_name_len; dim_i++) + { +- cup = toupper ((int) base_name[dim_i]); ++ cup = safe_toupper (base_name[dim_i]); + write_character (dtp, &cup, 1, 1, NODELIM); + } + } + clen = strlen (obj->var_name); + for (dim_i = len; dim_i < clen; dim_i++) + { +- cup = toupper ((int) obj->var_name[dim_i]); ++ cup = safe_toupper (obj->var_name[dim_i]); + if (cup == '+') + cup = '%'; + write_character (dtp, &cup, 1, 1, NODELIM); +@@ -2426,7 +2451,7 @@ namelist_write (st_parameter_dt *dtp) + /* Write namelist name in upper case - f95 std. */ + for (gfc_charlen_type i = 0; i < dtp->namelist_name_len; i++ ) + { +- c = toupper ((int) dtp->namelist_name[i]); ++ c = safe_toupper (dtp->namelist_name[i]); + write_character (dtp, &c, 1 ,1, NODELIM); + } + +diff --git a/libgfortran/kinds-override.h b/libgfortran/kinds-override.h +index c9e874a3f38..5f7840b0c89 100644 +--- a/libgfortran/kinds-override.h ++++ b/libgfortran/kinds-override.h +@@ -23,24 +23,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + + +-/* What are the C types corresponding to the real(kind=10) and +- real(kind=16) types? We currently rely on the following assumptions: +- -- if real(kind=10) exists, i.e. if HAVE_GFC_REAL_10 is defined, +- then it is necessarily the "long double" type +- -- if real(kind=16) exists, then: +- * if HAVE_GFC_REAL_10, real(kind=16) is "__float128" +- * otherwise, real(kind=16) is "long double" +- To allow to change this in the future, we create the +- GFC_REAL_16_IS_FLOAT128 macro that is used throughout libgfortran. */ +- +-#if defined(HAVE_GFC_REAL_16) +-# if defined(HAVE_GFC_REAL_10) +-# define GFC_REAL_16_IS_FLOAT128 +-# if !defined(HAVE_FLOAT128) +-# error "Where has __float128 gone?" +-# endif +-# else +-# define GFC_REAL_16_IS_LONG_DOUBLE +-# endif ++/* Ensure that TFmode is available under. */ ++ ++#if defined(GFC_REAL_16_IS_FLOAT128) && !defined(HAVE_FLOAT128) ++# error "Where has __float128 gone?" + #endif + +diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h +index 1e92f1a50d3..2999f6cb233 100644 +--- a/libgfortran/libgfortran.h ++++ b/libgfortran/libgfortran.h +@@ -39,6 +39,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + /* config.h MUST be first because it can affect system headers. */ + #include "config.h" + ++#include + #include + #include + #include +@@ -103,6 +104,20 @@ typedef off_t gfc_offset; + #endif + + ++/* These functions from should only be used on values that can be ++ represented as unsigned char, otherwise the behavior is undefined. ++ Some targets have a char type that is signed, so we cast the argument ++ to unsigned char. See: ++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177 ++ https://wiki.sei.cmu.edu/confluence/x/BNcxBQ ++ */ ++ ++#define safe_isalnum(x) isalnum((unsigned char) (x)) ++#define safe_isdigit(x) isdigit((unsigned char) (x)) ++#define safe_tolower(x) tolower((unsigned char) (x)) ++#define safe_toupper(x) toupper((unsigned char) (x)) ++ ++ + /* The following macros can be used to annotate conditions which are likely or + unlikely to be true. Avoid using them when a condition is only slightly + more likely/less unlikely than average to avoid the performance penalties of +@@ -694,7 +709,7 @@ internal_proto(show_backtrace); + #define GFC_LARGEST_BUF (sizeof (GFC_INTEGER_LARGEST)) + #endif + +-#define GFC_ITOA_BUF_SIZE (sizeof (GFC_INTEGER_LARGEST) * 3 + 2) ++#define GFC_ITOA_BUF_SIZE (sizeof (GFC_INTEGER_LARGEST) * 3 + 1) + #define GFC_XTOA_BUF_SIZE (GFC_LARGEST_BUF * 2 + 1) + #define GFC_OTOA_BUF_SIZE (GFC_LARGEST_BUF * 3 + 1) + #define GFC_BTOA_BUF_SIZE (GFC_LARGEST_BUF * 8 + 1) +@@ -722,9 +737,6 @@ extern int st_printf (const char *, ...) + __attribute__((format (gfc_printf, 1, 2))); + internal_proto(st_printf); + +-extern const char *gfc_xtoa (GFC_UINTEGER_LARGEST, char *, size_t); +-internal_proto(gfc_xtoa); +- + extern _Noreturn void os_error (const char *); + iexport_proto(os_error); + +@@ -880,7 +892,7 @@ internal_proto(fc_strdup); + extern char *fc_strdup_notrim(const char *, gfc_charlen_type); + internal_proto(fc_strdup_notrim); + +-extern const char *gfc_itoa(GFC_INTEGER_LARGEST, char *, size_t); ++extern const char *gfc_itoa(GFC_UINTEGER_LARGEST, char *, size_t); + internal_proto(gfc_itoa); + + /* io/intrinsics.c */ +diff --git a/libgfortran/libgfortran.spec.in b/libgfortran/libgfortran.spec.in +index 0ea15950514..058ee5775bf 100644 +--- a/libgfortran/libgfortran.spec.in ++++ b/libgfortran/libgfortran.spec.in +@@ -5,4 +5,4 @@ + # + + %rename lib liborig +-*lib: @LIBQUADSPEC@ -lm %(liborig) ++*lib: @LIBQUADSPEC@ @LIBM@ %(liborig) +diff --git a/libgfortran/mk-kinds-h.sh b/libgfortran/mk-kinds-h.sh +index 249619061c6..fb4232eb954 100755 +--- a/libgfortran/mk-kinds-h.sh ++++ b/libgfortran/mk-kinds-h.sh +@@ -64,15 +64,19 @@ for k in $possible_real_kinds; do + case $k in + 4) ctype="float" ; cplxtype="complex float" ; suffix="f" ;; + 8) ctype="double" ; cplxtype="complex double" ; suffix="" ;; ++ # If we have a REAL(KIND=10), it is always long double + 10) ctype="long double" ; cplxtype="complex long double" ; suffix="l" ;; +- 16) if [ $long_double_kind -eq 10 ]; then ++ # If we have a REAL(KIND=16), it is either long double or __float128 ++ 16) if [ $long_double_kind -ne 16 ]; then + ctype="__float128" + cplxtype="_Complex float __attribute__((mode(TC)))" + suffix="q" ++ echo "#define GFC_REAL_16_IS_FLOAT128" + else + ctype="long double" + cplxtype="complex long double" + suffix="l" ++ echo "#define GFC_REAL_16_IS_LONG_DOUBLE" + fi ;; + *) echo "$0: Unknown type" >&2 ; exit 1 ;; + esac +@@ -83,6 +87,12 @@ for k in $possible_real_kinds; do + | sed 's/ *TRANSFER *//' | sed 's/_.*//'` + rm -f tmq$$.* + ++ # Check for the value of TINY ++ echo "print *, tiny(0._$k) ; end" > tmq$$.f90 ++ tiny=`$compile -S -fdump-parse-tree tmq$$.f90 | grep TRANSFER \ ++ | sed 's/ *TRANSFER *//' | sed 's/_.*//'` ++ rm -f tmq$$.* ++ + # Check for the value of DIGITS + echo "print *, digits(0._$k) ; end" > tmq$$.f90 + digits=`$compile -S -fdump-parse-tree tmq$$.f90 | grep TRANSFER \ +@@ -101,6 +111,7 @@ for k in $possible_real_kinds; do + echo "#define HAVE_GFC_REAL_${k}" + echo "#define HAVE_GFC_COMPLEX_${k}" + echo "#define GFC_REAL_${k}_HUGE ${huge}${suffix}" ++ echo "#define GFC_REAL_${k}_TINY ${tiny}${suffix}" + echo "#define GFC_REAL_${k}_LITERAL_SUFFIX ${suffix}" + if [ "x$suffix" = "x" ]; then + echo "#define GFC_REAL_${k}_LITERAL(X) (X)" +diff --git a/libgfortran/runtime/backtrace.c b/libgfortran/runtime/backtrace.c +index 5ac08316f71..403c7c37f18 100644 +--- a/libgfortran/runtime/backtrace.c ++++ b/libgfortran/runtime/backtrace.c +@@ -97,6 +97,7 @@ error_callback (void *data, const char *msg, int errnum) + iov[1].iov_len = strlen (msg); + iov[2].iov_base = (char*) ", errno: "; + iov[2].iov_len = strlen (iov[2].iov_base); ++ /* Async-signal-safe function, errnum must be positive. */ + const char *p = gfc_itoa (errnum, errbuf, sizeof (errbuf)); + iov[3].iov_base = (char*) p; + iov[3].iov_len = strlen (p); +diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c +index fe16c080797..ce408cf11af 100644 +--- a/libgfortran/runtime/environ.c ++++ b/libgfortran/runtime/environ.c +@@ -26,7 +26,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #include + #include +-#include + + #ifdef HAVE_UNISTD_H + #include +@@ -91,7 +90,7 @@ init_integer (variable * v) + return; + + for (q = p; *q; q++) +- if (!isdigit (*q) && (p != q || *q != '-')) ++ if (!safe_isdigit (*q) && (p != q || *q != '-')) + return; + + *v->var = atoi (p); +@@ -344,7 +343,7 @@ static int + match_integer (void) + { + unit_num = 0; +- while (isdigit (*p)) ++ while (safe_isdigit (*p)) + unit_num = unit_num * 10 + (*p++ - '0'); + return INTEGER; + } +diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c +index b9c75742690..ba6ff866a01 100644 +--- a/libgfortran/runtime/error.c ++++ b/libgfortran/runtime/error.c +@@ -219,37 +219,6 @@ exit_error (int status) + } + + +- +-/* gfc_xtoa()-- Integer to hexadecimal conversion. */ +- +-const char * +-gfc_xtoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) +-{ +- int digit; +- char *p; +- +- assert (len >= GFC_XTOA_BUF_SIZE); +- +- if (n == 0) +- return "0"; +- +- p = buffer + GFC_XTOA_BUF_SIZE - 1; +- *p = '\0'; +- +- while (n != 0) +- { +- digit = n & 0xF; +- if (digit > 9) +- digit += 'A' - '0' - 10; +- +- *--p = '0' + digit; +- n >>= 4; +- } +- +- return p; +-} +- +- + /* Hopefully thread-safe wrapper for a strerror() style function. */ + + char * +diff --git a/libgfortran/runtime/string.c b/libgfortran/runtime/string.c +index 536a9cd3f2b..5bc202320c0 100644 +--- a/libgfortran/runtime/string.c ++++ b/libgfortran/runtime/string.c +@@ -23,6 +23,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + + #include "libgfortran.h" ++#include + #include + #include + +@@ -169,21 +170,54 @@ find_option (st_parameter_common *cmp, const char *s1, gfc_charlen_type s1_len, + } + + +-/* gfc_itoa()-- Integer to decimal conversion. +- The itoa function is a widespread non-standard extension to +- standard C, often declared in . Even though the itoa +- defined here is a static function we take care not to conflict with +- any prior non-static declaration. Hence the 'gfc_' prefix, which +- is normally reserved for functions with external linkage. Notably, +- in contrast to the *printf() family of functions, this ought to be +- async-signal-safe. */ ++/* Fast helper function for a positive value that fits in uint64_t. */ ++ ++static inline char * ++itoa64 (uint64_t n, char *p) ++{ ++ while (n != 0) ++ { ++ *--p = '0' + (n % 10); ++ n /= 10; ++ } ++ return p; ++} ++ ++ ++#if defined(HAVE_GFC_INTEGER_16) ++# define TEN19 ((GFC_UINTEGER_LARGEST) 1000000 * (GFC_UINTEGER_LARGEST) 1000000 * (GFC_UINTEGER_LARGEST) 10000000) ++ ++/* Same as itoa64(), with zero padding of 19 digits. */ ++ ++static inline char * ++itoa64_pad19 (uint64_t n, char *p) ++{ ++ for (int k = 0; k < 19; k++) ++ { ++ *--p = '0' + (n % 10); ++ n /= 10; ++ } ++ return p; ++} ++#endif ++ ++ ++/* Integer to decimal conversion. ++ ++ This function is much more restricted than the widespread (but ++ non-standard) itoa() function. This version has the following ++ characteristics: ++ ++ - it takes only non-negative arguments ++ - it is async-signal-safe (we use it runtime/backtrace.c) ++ - it works in base 10 (see xtoa, otoa, btoa functions ++ in io/write.c for other radices) ++ */ + + const char * +-gfc_itoa (GFC_INTEGER_LARGEST n, char *buffer, size_t len) ++gfc_itoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) + { +- int negative; + char *p; +- GFC_UINTEGER_LARGEST t; + + if (len < GFC_ITOA_BUF_SIZE) + sys_abort (); +@@ -191,24 +225,37 @@ gfc_itoa (GFC_INTEGER_LARGEST n, char *buffer, size_t len) + if (n == 0) + return "0"; + +- negative = 0; +- t = n; +- if (n < 0) +- { +- negative = 1; +- t = -(GFC_UINTEGER_LARGEST) n; /* Must use unsigned to protect from overflow. */ +- } +- + p = buffer + GFC_ITOA_BUF_SIZE - 1; + *p = '\0'; + +- while (t != 0) ++#if defined(HAVE_GFC_INTEGER_16) ++ /* On targets that have a 128-bit integer type, division in that type ++ is slow, because it occurs through a function call. We avoid that. */ ++ ++ if (n <= UINT64_MAX) ++ /* If the value fits in uint64_t, use the fast function. */ ++ return itoa64 (n, p); ++ else + { +- *--p = '0' + (t % 10); +- t /= 10; ++ /* Otherwise, break down into smaller bits by division. Two calls to ++ the uint64_t function are not sufficient for all 128-bit unsigned ++ integers (we would need three calls), but they do suffice for all ++ values up to 2^127, which is the largest that Fortran can produce ++ (-HUGE(0_16)-1) with its signed integer types. */ ++ _Static_assert (sizeof(GFC_UINTEGER_LARGEST) <= 2 * sizeof(uint64_t), ++ "integer too large"); ++ ++ GFC_UINTEGER_LARGEST r; ++ r = n % TEN19; ++ n = n / TEN19; ++ assert (r <= UINT64_MAX); ++ p = itoa64_pad19 (r, p); ++ ++ assert(n <= UINT64_MAX); ++ return itoa64 (n, p); + } +- +- if (negative) +- *--p = '-'; +- return p; ++#else ++ /* On targets where the largest integer is 64-bit, just use that. */ ++ return itoa64 (n, p); ++#endif + } +diff --git a/libgo/configure b/libgo/configure +index 70f64c974fd..a241770b177 100755 +--- a/libgo/configure ++++ b/libgo/configure +@@ -708,6 +708,8 @@ glibgo_toolexecdir + WERROR + WARN_FLAGS + CC_FOR_BUILD ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CPP +@@ -11544,7 +11546,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11557 "configure" ++#line 11549 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11650,7 +11652,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11663 "configure" ++#line 11655 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13779,6 +13781,14 @@ CC="$lt_save_CC" + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} + +@@ -16321,6 +16331,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${USE_LIBFFI_TRUE}" && test -z "${USE_LIBFFI_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBFFI\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgo/configure.ac b/libgo/configure.ac +index ebab9d9de3e..5566460ace1 100644 +--- a/libgo/configure.ac ++++ b/libgo/configure.ac +@@ -53,6 +53,7 @@ AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} + AC_SUBST(CC_FOR_BUILD) +diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am +index 4cf1f581995..1b39421d5c8 100644 +--- a/libgomp/Makefile.am ++++ b/libgomp/Makefile.am +@@ -53,9 +53,14 @@ else + libgomp_version_script = + libgomp_version_dep = + endif ++ + libgomp_version_info = -version-info $(libtool_VERSION) ++if ENABLE_DARWIN_AT_RPATH ++libgomp_darwin_rpath = -Wc,-nodefaultrpaths ++libgomp_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ +- $(lt_host_flags) ++ $(lt_host_flags) $(libgomp_darwin_rpath) + libgomp_la_DEPENDENCIES = $(libgomp_version_dep) + libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) + +diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in +index 0fdfb2fe73f..353c6c1f378 100644 +--- a/libgomp/Makefile.in ++++ b/libgomp/Makefile.in +@@ -16,7 +16,7 @@ + + # Plugins for offload execution, Makefile.am fragment. + # +-# Copyright (C) 2014-2020 Free Software Foundation, Inc. ++# Copyright (C) 2014-2021 Free Software Foundation, Inc. + # + # Contributed by Mentor Embedded. + # +@@ -547,8 +547,11 @@ nodist_toolexeclib_HEADERS = libgomp.spec + @LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver + @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver-sun + libgomp_version_info = -version-info $(libtool_VERSION) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgomp_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ +- $(lt_host_flags) ++ $(lt_host_flags) $(libgomp_darwin_rpath) + + libgomp_la_DEPENDENCIES = $(libgomp_version_dep) + libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) +diff --git a/libgomp/configure b/libgomp/configure +index 07a0efef8ea..696da01f84f 100755 +--- a/libgomp/configure ++++ b/libgomp/configure +@@ -693,6 +693,8 @@ FC + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -832,6 +834,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + with_cuda_driver + with_cuda_driver_include +@@ -1492,6 +1495,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7643,7 +7649,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9616,6 +9622,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9633,9 +9682,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11422,7 +11475,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11425 "configure" ++#line 11478 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11528,7 +11581,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11531 "configure" ++#line 11584 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11789,6 +11842,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -13464,6 +13525,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes +@@ -13481,9 +13585,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -17286,6 +17394,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgomp/configure.ac b/libgomp/configure.ac +index 16860255229..b39f8d48a47 100644 +--- a/libgomp/configure.ac ++++ b/libgomp/configure.ac +@@ -146,6 +146,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +diff --git a/libgomp/env.c b/libgomp/env.c +index a24deabcd58..dc89cb62bc5 100644 +--- a/libgomp/env.c ++++ b/libgomp/env.c +@@ -60,6 +60,7 @@ + #endif /* LIBGOMP_OFFLOADED_ONLY */ + + #include "secure_getenv.h" ++#include "environ.h" + + struct gomp_task_icv gomp_global_icv = { + .nthreads_var = 1, +diff --git a/libiberty/configure b/libiberty/configure +index 26c882e7a97..55557960615 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5248,8 +5248,8 @@ case "${enable_shared}" in + *) shared=yes ;; + esac + +-# ...unless --enable-host-shared was passed from top-level config: +-if [ "${enable_host_shared}" = "yes" ]; then ++# ...unless --enable-host-{shared,pie} was passed from top-level config: ++if [ "${enable_host_shared}" = "yes" ] || [ "${enable_host_pie}" = "yes" ]; then + shared=yes + fi + +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index dd62ce5a0b9..45c93a25396 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -227,8 +227,8 @@ case "${enable_shared}" in + *) shared=yes ;; + esac + +-# ...unless --enable-host-shared was passed from top-level config: +-if [[ "${enable_host_shared}" = "yes" ]]; then ++# ...unless --enable-host-{shared,pie} was passed from top-level config: ++if [[ "${enable_host_shared}" = "yes" ]] || [[ "${enable_host_pie}" = "yes" ]]; then + shared=yes + fi + +diff --git a/libitm/Makefile.am b/libitm/Makefile.am +index 3f31ad30556..a25317b07fe 100644 +--- a/libitm/Makefile.am ++++ b/libitm/Makefile.am +@@ -54,7 +54,12 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++if ENABLE_DARWIN_AT_RPATH ++libitm_darwin_rpath = -Wc,-nodefaultrpaths ++libitm_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \ ++ $(libitm_darwin_rpath) + + libitm_la_SOURCES = \ + aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \ +diff --git a/libitm/Makefile.in b/libitm/Makefile.in +index 7f53ea9b9db..ed28db45057 100644 +--- a/libitm/Makefile.in ++++ b/libitm/Makefile.in +@@ -481,7 +481,12 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libitm_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \ ++ $(libitm_darwin_rpath) ++ + libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \ + barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \ + retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \ +diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S +index 58d7b335782..79251fd6737 100644 +--- a/libitm/config/aarch64/sjlj.S ++++ b/libitm/config/aarch64/sjlj.S +@@ -57,10 +57,19 @@ + + .text + .align 2 ++#if __ELF__ + .global _ITM_beginTransaction + .type _ITM_beginTransaction, %function + + _ITM_beginTransaction: ++ ++#elif __MACH__ ++ .global __ITM_beginTransaction ++ ++__ITM_beginTransaction: ++ ++#endif ++ + cfi_startproc + CFI_PAC_KEY + PAC_AND_BTI +@@ -84,8 +93,13 @@ _ITM_beginTransaction: + + /* Invoke GTM_begin_transaction with the struct we just built. */ + mov x1, sp ++#if __ELF__ + bl GTM_begin_transaction +- ++#elif __MACH__ ++ bl _GTM_begin_transaction ++#else ++#error "unexpected object format" ++#endif + /* Return; we don't need to restore any of the call-saved regs. */ + ldp x29, x30, [sp], 11*16 + cfi_adjust_cfa_offset(-11*16) +@@ -95,14 +109,23 @@ _ITM_beginTransaction: + CFI_PAC_TOGGLE + ret + cfi_endproc ++#if __ELF__ + .size _ITM_beginTransaction, . - _ITM_beginTransaction ++#endif + + .align 2 ++#if __ELF__ + .global GTM_longjmp + .hidden GTM_longjmp + .type GTM_longjmp, %function + + GTM_longjmp: ++ ++#elif __MACH__ ++ .private_extern _GTM_longjmp ++ ++_GTM_longjmp: ++#endif + /* The first parameter becomes the return value (x0). + The third parameter is ignored for now. */ + cfi_startproc +@@ -126,7 +149,9 @@ GTM_longjmp: + CFI_PAC_TOGGLE + br x30 + cfi_endproc ++#if __ELF__ + .size GTM_longjmp, . - GTM_longjmp ++#endif + + /* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ + #define FEATURE_1_AND 0xc0000000 +diff --git a/libitm/configure b/libitm/configure +index b8f1e2360d0..c0b98f93cf1 100755 +--- a/libitm/configure ++++ b/libitm/configure +@@ -660,6 +660,8 @@ libtool_VERSION + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CXXCPP +@@ -810,6 +812,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_linux_futex + enable_tls +@@ -1461,6 +1464,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -8276,7 +8282,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10250,6 +10256,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10267,9 +10316,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12056,7 +12109,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12069 "configure" ++#line 12112 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12162,7 +12215,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12175 "configure" ++#line 12218 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13038,6 +13091,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13055,12 +13151,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14901,16 +15005,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -15032,7 +15126,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15422,6 +15516,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -17882,7 +17984,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -18167,6 +18269,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libitm/configure.ac b/libitm/configure.ac +index 241ec2790dc..f86cdf3b2b5 100644 +--- a/libitm/configure.ac ++++ b/libitm/configure.ac +@@ -157,6 +157,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes") + AM_PROG_LIBTOOL + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +diff --git a/libitm/configure.tgt b/libitm/configure.tgt +index a3d84896cc5..8497dfb9c87 100644 +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -50,7 +50,7 @@ fi + # Map the target cpu to an ARCH sub-directory. At the same time, + # work out any special compilation flags as necessary. + case "${target_cpu}" in +- aarch64*) ARCH=aarch64 ;; ++ aarch64* | arm64*) ARCH=aarch64 ;; + alpha*) ARCH=alpha ;; + rs6000 | powerpc*) + XCFLAGS="${XCFLAGS} -mhtm" +diff --git a/libobjc/configure b/libobjc/configure +index 5d1b424a66d..65054115fd0 100755 +--- a/libobjc/configure ++++ b/libobjc/configure +@@ -636,6 +636,9 @@ OBJC_BOEHM_GC_LIBS + OBJC_BOEHM_GC_INCLUDES + OBJC_BOEHM_GC + OBJC_GCFLAGS ++extra_ldflags_libobjc ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + SET_MAKE + CPP + OTOOL64 +@@ -667,7 +670,6 @@ RANLIB + AR + AS + XCFLAGS +-extra_ldflags_libobjc + lt_host_flags + OBJEXT + EXEEXT +@@ -755,6 +757,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_tls + enable_objc_gc + with_target_bdw_gc +@@ -1392,6 +1395,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-tls Use thread-local storage [default=yes] + --enable-objc-gc enable use of Boehm's garbage collector with the GNU + Objective-C runtime +@@ -3430,17 +3436,6 @@ esac + + + +-case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libobjc +- extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' +- ;; +- *-cygwin*|*-mingw*) +- # Tell libtool to build DLLs on Windows +- extra_ldflags_libobjc='$(lt_host_flags)' +- ;; +-esac +- + + # Add CET specific flags if CET is enabled + +@@ -3466,7 +3461,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -6967,7 +6962,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8944,6 +8939,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8961,9 +8999,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10771,7 +10813,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10784 "configure" ++#line 10816 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10877,7 +10919,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10890 "configure" ++#line 10922 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11149,6 +11191,38 @@ $as_echo "no" >&6; } + fi + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ ++# Must come after libtool is initialized. ++case "${host}" in ++ *-darwin[4567]*) ++ # Earlier Darwin versions need -single_module when linking libobjc; they ++ # do not support @rpath. ++ extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ++ ;; ++ *-darwin*) ++ # Otherwise, single_module is the default and multi-module is ignored and ++ # obsolete. ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wc,-nodefaultrpaths" ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wl,-rpath,@loader_path" ++ fi ++ ;; ++ *-cygwin*|*-mingw*) ++ # Tell libtool to build DLLs on Windows ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ ;; ++esac ++ ++ + # ------- + # Headers + # ------- +@@ -11890,6 +11964,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libobjc/configure.ac b/libobjc/configure.ac +index c1104db85f0..840f4fb6229 100644 +--- a/libobjc/configure.ac ++++ b/libobjc/configure.ac +@@ -147,17 +147,6 @@ m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) + + # extra LD Flags which are required for targets + ACX_LT_HOST_FLAGS +-case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libobjc +- extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' +- ;; +- *-cygwin*|*-mingw*) +- # Tell libtool to build DLLs on Windows +- extra_ldflags_libobjc='$(lt_host_flags)' +- ;; +-esac +-AC_SUBST(extra_ldflags_libobjc) + + # Add CET specific flags if CET is enabled + GCC_CET_FLAGS(CET_FLAGS) +@@ -182,6 +171,31 @@ AM_PROG_CC_C_O + + AC_PROG_MAKE_SET + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ ++# Must come after libtool is initialized. ++case "${host}" in ++ *-darwin[[4567]]*) ++ # Earlier Darwin versions need -single_module when linking libobjc; they ++ # do not support @rpath. ++ extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ++ ;; ++ *-darwin*) ++ # Otherwise, single_module is the default and multi-module is ignored and ++ # obsolete. ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wc,-nodefaultrpaths" ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wl,-rpath,@loader_path" ++ fi ++ ;; ++ *-cygwin*|*-mingw*) ++ # Tell libtool to build DLLs on Windows ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ ;; ++esac ++AC_SUBST(extra_ldflags_libobjc) ++ + # ------- + # Headers + # ------- +diff --git a/liboffloadmic/configure b/liboffloadmic/configure +index dfa8287fd75..995fd94e977 100644 +--- a/liboffloadmic/configure ++++ b/liboffloadmic/configure +@@ -782,6 +782,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1434,6 +1435,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -7900,23 +7904,25 @@ _LT_EOF + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 + $as_echo "$lt_cv_ld_force_load" >&6; } +- case $host_os in +- rhapsody* | darwin1.[012]) ++ # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to ++ # build without first building modern cctools / linker. ++ case $host_cpu-$host_os in ++ *-rhapsody* | *-darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +- darwin1.*) ++ *-darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ *-darwin*) ++ # darwin 5.x (macOS 10.1) onwards we only need to adjust when the ++ # deployment target is forced to an earlier version. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) ++ ;; + 10.[012][,.]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ++ ;; ++ *) ++ ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then +@@ -9614,6 +9620,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9631,9 +9680,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11420,7 +11473,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11433 "configure" ++#line 11476 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11526,7 +11579,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11539 "configure" ++#line 11582 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12402,6 +12455,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12419,12 +12515,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14265,16 +14369,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -14396,7 +14490,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +diff --git a/liboffloadmic/plugin/Makefile.in b/liboffloadmic/plugin/Makefile.in +index 8d5ad0025c2..c53f2d32b3b 100644 +--- a/liboffloadmic/plugin/Makefile.in ++++ b/liboffloadmic/plugin/Makefile.in +@@ -123,10 +123,10 @@ subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../../config/acx.m4 \ + $(top_srcdir)/../../config/depstand.m4 \ +- $(top_srcdir)/../../config/toolexeclibdir.m4 \ + $(top_srcdir)/../../config/lead-dot.m4 \ + $(top_srcdir)/../../config/multi.m4 \ + $(top_srcdir)/../../config/override.m4 \ ++ $(top_srcdir)/../../config/toolexeclibdir.m4 \ + $(top_srcdir)/../../libtool.m4 \ + $(top_srcdir)/../../ltoptions.m4 \ + $(top_srcdir)/../../ltsugar.m4 \ +diff --git a/liboffloadmic/plugin/aclocal.m4 b/liboffloadmic/plugin/aclocal.m4 +index 9fa1d1216c1..1bb91402f66 100644 +--- a/liboffloadmic/plugin/aclocal.m4 ++++ b/liboffloadmic/plugin/aclocal.m4 +@@ -1169,10 +1169,10 @@ AC_SUBST([am__untar]) + + m4_include([../../config/acx.m4]) + m4_include([../../config/depstand.m4]) +-m4_include([../../config/toolexeclibdir.m4]) + m4_include([../../config/lead-dot.m4]) + m4_include([../../config/multi.m4]) + m4_include([../../config/override.m4]) ++m4_include([../../config/toolexeclibdir.m4]) + m4_include([../../libtool.m4]) + m4_include([../../ltoptions.m4]) + m4_include([../../ltsugar.m4]) +diff --git a/liboffloadmic/plugin/configure b/liboffloadmic/plugin/configure +index 0b21d7d4eed..929b7278e8a 100644 +--- a/liboffloadmic/plugin/configure ++++ b/liboffloadmic/plugin/configure +@@ -778,6 +778,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1431,6 +1432,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -7280,23 +7284,25 @@ _LT_EOF + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 + $as_echo "$lt_cv_ld_force_load" >&6; } +- case $host_os in +- rhapsody* | darwin1.[012]) ++ # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to ++ # build without first building modern cctools / linker. ++ case $host_cpu-$host_os in ++ *-rhapsody* | *-darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +- darwin1.*) ++ *-darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ *-darwin*) ++ # darwin 5.x (macOS 10.1) onwards we only need to adjust when the ++ # deployment target is forced to an earlier version. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) ++ ;; + 10.[012][,.]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ++ ;; ++ *) ++ ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then +@@ -9261,6 +9267,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9278,9 +9327,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11067,7 +11120,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11080 "configure" ++#line 11123 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11173,7 +11226,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11186 "configure" ++#line 11229 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12049,6 +12102,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12066,12 +12162,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -13912,16 +14016,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -14043,7 +14137,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +diff --git a/libphobos/configure b/libphobos/configure +index b1c8ecb5673..5624a4ff82d 100755 +--- a/libphobos/configure ++++ b/libphobos/configure +@@ -707,6 +707,8 @@ get_gcc_base_ver + phobos_compiler_shared_flag + phobos_compiler_pic_flag + phobos_lt_pic_flag ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + OTOOL64 +@@ -838,6 +840,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + enable_werror + with_libatomic +@@ -1490,6 +1493,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-werror turns on -Werror [default=no] + --enable-version-specific-runtime-libs + Specify that runtime libraries should be installed +@@ -8239,7 +8245,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9944,6 +9950,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9961,9 +10010,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11750,7 +11803,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11753 "configure" ++#line 11806 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11856,7 +11909,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11859 "configure" ++#line 11912 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13381,6 +13434,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_D=no + hardcode_direct_D=no + hardcode_automatic_D=yes +@@ -13398,9 +13494,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_D="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_D="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_D="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_D="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_D="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_D="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -14002,6 +14102,14 @@ CFLAGS=$lt_save_CFLAGS + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # libtool variables for Phobos shared and position-independent compiles. + # +@@ -15738,6 +15846,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${DRUNTIME_CPU_AARCH64_TRUE}" && test -z "${DRUNTIME_CPU_AARCH64_FALSE}"; then + as_fn_error $? "conditional \"DRUNTIME_CPU_AARCH64\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libphobos/configure.ac b/libphobos/configure.ac +index 3b5a830cccf..b3e5998f962 100644 +--- a/libphobos/configure.ac ++++ b/libphobos/configure.ac +@@ -93,6 +93,7 @@ AM_PROG_LIBTOOL + WITH_LOCAL_DRUNTIME([LT_LANG([D])], []) + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # libtool variables for Phobos shared and position-independent compiles. + # +diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt +index 0643daeb613..5e9dd29bade 100644 +--- a/libphobos/configure.tgt ++++ b/libphobos/configure.tgt +@@ -27,6 +27,9 @@ case "${target}" in + *-*-dragonfly*) + LIBPHOBOS_SUPPORTED=yes + ;; ++ aarch64-*-darwin2*) ++ LIBPHOBOS_SUPPORTED=yes ++ ;; + aarch64*-*-linux*) + LIBPHOBOS_SUPPORTED=yes + ;; +@@ -67,4 +70,10 @@ case "${target}" in + x86_64-*-solaris2.11* | i?86-*-solaris2.11*) + LIBPHOBOS_SUPPORTED=yes + ;; ++ *-*-darwin9* | *-*-darwin1[01]*) ++ LIBDRUNTIME_ONLY=yes ++ ;; ++ x86_64-*-darwin1[2-9]* | x86_64-*-darwin2* | i?86-*-darwin1[2-7]) ++ LIBPHOBOS_SUPPORTED=yes ++ ;; + esac +diff --git a/libphobos/libdruntime/Makefile.am b/libphobos/libdruntime/Makefile.am +index a2e2bff9e44..0c56dda944d 100644 +--- a/libphobos/libdruntime/Makefile.am ++++ b/libphobos/libdruntime/Makefile.am +@@ -126,8 +126,11 @@ ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \ + toolexeclib_LTLIBRARIES = libgdruntime.la + libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES) + libgdruntime_la_LIBTOOLFLAGS = ++if ENABLE_DARWIN_AT_RPATH ++libgdruntime_darwin_rpath = -Wl,-rpath,@loader_path ++endif + libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgdruntime_darwin_rpath) + libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE) + libgdruntime_la_DEPENDENCIES = $(DRTSTUFF) + # Also override library link commands: This is not strictly +diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in +index cb2e372bca0..dd503e4ec17 100644 +--- a/libphobos/libdruntime/Makefile.in ++++ b/libphobos/libdruntime/Makefile.in +@@ -775,8 +775,9 @@ ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \ + toolexeclib_LTLIBRARIES = libgdruntime.la + libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES) + libgdruntime_la_LIBTOOLFLAGS = ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgdruntime_darwin_rpath = -Wl,-rpath,@loader_path + libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgdruntime_darwin_rpath) + + libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE) + libgdruntime_la_DEPENDENCIES = $(DRTSTUFF) +diff --git a/libphobos/libdruntime/config/aarch64/switchcontext.S b/libphobos/libdruntime/config/aarch64/switchcontext.S +index d47f81f32b8..53fe417d185 100644 +--- a/libphobos/libdruntime/config/aarch64/switchcontext.S ++++ b/libphobos/libdruntime/config/aarch64/switchcontext.S +@@ -44,7 +44,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + */ + .text + .global CSYM(fiber_switchContext) ++#ifndef __APPLE__ + .type CSYM(fiber_switchContext), %function ++#endif + .align 4 + CSYM(fiber_switchContext): + .cfi_startproc +@@ -77,8 +79,9 @@ CSYM(fiber_switchContext): + ldp d15, d14, [sp], #20*8 + ret + .cfi_endproc ++#ifndef __APPLE__ + .size CSYM(fiber_switchContext),.-CSYM(fiber_switchContext) +- ++#endif + /** + * When generating any kind of backtrace (gdb, exception handling) for + * a function called in a Fiber, we need to tell the unwinder to stop +@@ -93,11 +96,15 @@ CSYM(fiber_switchContext): + .text + .global CSYM(fiber_trampoline) + .p2align 2 ++#ifndef __APPLE__ + .type CSYM(fiber_trampoline), %function ++#endif + CSYM(fiber_trampoline): + .cfi_startproc + .cfi_undefined x30 + // fiber_entryPoint never returns + bl CSYM(fiber_entryPoint) + .cfi_endproc ++#ifndef __APPLE__ + .size CSYM(fiber_trampoline),.-CSYM(fiber_trampoline) ++#endif +diff --git a/libphobos/libdruntime/config/arm/switchcontext.S b/libphobos/libdruntime/config/arm/switchcontext.S +index 532e3dcc2d2..6ab67b5ef36 100644 +--- a/libphobos/libdruntime/config/arm/switchcontext.S ++++ b/libphobos/libdruntime/config/arm/switchcontext.S +@@ -60,11 +60,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + */ + + .text ++#ifndef __APPLE__ + #if defined(__ARM_PCS_VFP) || (defined(__ARM_PCS) && !defined(__SOFTFP__)) + .fpu vfp + #endif + .global CSYM(fiber_switchContext) + .type CSYM(fiber_switchContext), %function ++#else ++ .global CSYM(fiber_switchContext) ++#endif + .align 4 + CSYM(fiber_switchContext): + .cfi_sections .debug_frame +@@ -111,8 +115,12 @@ CSYM(fiber_switchContext): + mov lr, #0 + // return by writing lr into pc + mov pc, r1 ++#ifndef __APPLE__ + .fnend + .cfi_endproc + .size CSYM(fiber_switchContext),.-CSYM(fiber_switchContext) ++#else ++ .cfi_endproc ++#endif + + #endif +diff --git a/libphobos/libdruntime/core/thread/fiber.d b/libphobos/libdruntime/core/thread/fiber.d +index 2f90f179edb..54c2e6546fd 100644 +--- a/libphobos/libdruntime/core/thread/fiber.d ++++ b/libphobos/libdruntime/core/thread/fiber.d +@@ -1784,6 +1784,7 @@ version (OSX) + { + version (X86) version = UnsafeFiberMigration; + version (X86_64) version = UnsafeFiberMigration; ++ version (AArch64) version = UnsafeFiberMigration; + } + + version (UnsafeFiberMigration) +diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am +index f97ddccaca8..1488f15f522 100644 +--- a/libphobos/src/Makefile.am ++++ b/libphobos/src/Makefile.am +@@ -43,8 +43,11 @@ toolexeclib_DATA = libgphobos.spec + toolexeclib_LTLIBRARIES = libgphobos.la + libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) + libgphobos_la_LIBTOOLFLAGS = ++if ENABLE_DARWIN_AT_RPATH ++libgphobos_darwin_rpath = -Wl,-rpath,@loader_path ++endif + libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgphobos_darwin_rpath) + libgphobos_la_LIBADD = \ + ../libdruntime/libgdruntime_convenience.la $(LIBZ) + libgphobos_la_DEPENDENCIES = \ +diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in +index 4f76e1077d5..bad8b33cd9c 100644 +--- a/libphobos/src/Makefile.in ++++ b/libphobos/src/Makefile.in +@@ -501,8 +501,9 @@ toolexeclib_DATA = libgphobos.spec + toolexeclib_LTLIBRARIES = libgphobos.la + libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) + libgphobos_la_LIBTOOLFLAGS = ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgphobos_darwin_rpath = -Wl,-rpath,@loader_path + libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgphobos_darwin_rpath) + + libgphobos_la_LIBADD = \ + ../libdruntime/libgdruntime_convenience.la $(LIBZ) +diff --git a/libquadmath/Makefile.am b/libquadmath/Makefile.am +index 35dffb46f6e..f199adf4602 100644 +--- a/libquadmath/Makefile.am ++++ b/libquadmath/Makefile.am +@@ -36,8 +36,13 @@ endif + + toolexeclib_LTLIBRARIES = libquadmath.la + libquadmath_la_LIBADD = ++ ++if ENABLE_DARWIN_AT_RPATH ++libquadmath_darwin_rpath = -Wc,-nodefaultrpaths ++libquadmath_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) -lm ++ $(version_arg) $(lt_host_flags) $(LIBM) $(libquadmath_darwin_rpath) + libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + + nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in +index 8c011212258..70025758cd5 100644 +--- a/libquadmath/Makefile.in ++++ b/libquadmath/Makefile.in +@@ -355,6 +355,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LD = @LD@ + LDFLAGS = @LDFLAGS@ ++LIBM = @LIBM@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -463,8 +464,10 @@ AUTOMAKE_OPTIONS = foreign info-in-builddir + @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = quadmath.map-sun + @BUILD_LIBQUADMATH_TRUE@toolexeclib_LTLIBRARIES = libquadmath.la + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LIBADD = ++@BUILD_LIBQUADMATH_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@libquadmath_darwin_rpath = -Wc,-nodefaultrpaths \ ++@BUILD_LIBQUADMATH_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +-@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) -lm ++@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) $(LIBM) $(libquadmath_darwin_rpath) + + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + @BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +diff --git a/libquadmath/configure b/libquadmath/configure +index 31918507f62..32f62083c73 100755 +--- a/libquadmath/configure ++++ b/libquadmath/configure +@@ -644,11 +644,14 @@ LIBQUAD_USE_SYMVER_GNU_FALSE + LIBQUAD_USE_SYMVER_GNU_TRUE + LIBQUAD_USE_SYMVER_FALSE + LIBQUAD_USE_SYMVER_TRUE ++LIBM + toolexeclibdir + toolexecdir + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -785,6 +788,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + with_toolexeclibdir + enable_symvers +@@ -1435,6 +1439,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7267,7 +7274,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8979,6 +8986,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8996,9 +9046,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10806,7 +10860,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10819 "configure" ++#line 10863 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10912,7 +10966,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10925 "configure" ++#line 10969 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11173,6 +11227,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -12137,6 +12199,20 @@ esac + + + ++# AC_CHECK_LIBM variant which avoids AC_CHECK_LIB (that doesn't work ++# on bare metal). In the past we've used -lm in Makefile.am unconditionally, ++# let's use it there unless target knows it doesn't need that. ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*) ++ LIBM=-lm ++ ;; ++esac ++ ++ + for ac_header in fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +@@ -13031,7 +13107,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13373,6 +13449,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac +index f9d745e60ca..315b1eeb082 100644 +--- a/libquadmath/configure.ac ++++ b/libquadmath/configure.ac +@@ -59,6 +59,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +@@ -121,6 +122,20 @@ esac + AC_SUBST(toolexecdir) + AC_SUBST(toolexeclibdir) + ++# AC_CHECK_LIBM variant which avoids AC_CHECK_LIB (that doesn't work ++# on bare metal). In the past we've used -lm in Makefile.am unconditionally, ++# let's use it there unless target knows it doesn't need that. ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*) ++ LIBM=-lm ++ ;; ++esac ++AC_SUBST([LIBM]) ++ + AC_CHECK_HEADERS(fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h) + LIBQUAD_CHECK_MATH_H_SIGNGAM + +diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am +index 2e6385509b4..79dee90c461 100644 +--- a/libsanitizer/asan/Makefile.am ++++ b/libsanitizer/asan/Makefile.am +@@ -60,7 +60,12 @@ libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) + +-libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) ++if ENABLE_DARWIN_AT_RPATH ++libasan_darwin_rpath = -Wc,-nodefaultrpaths ++libasan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libasan) $(libasan_darwin_rpath) + + libasan_preinit.o: asan_preinit.o + cp $< $@ +diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in +index 25c7fd7b759..0619b42805b 100644 +--- a/libsanitizer/asan/Makefile.in ++++ b/libsanitizer/asan/Makefile.in +@@ -463,7 +463,12 @@ libasan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/lsan/libsanitizer_lsan.la $(am__append_2) \ + $(am__append_3) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libasan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libasan) $(libasan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/configure b/libsanitizer/configure +index 8bdde896fe7..4c55b9ccb13 100755 +--- a/libsanitizer/configure ++++ b/libsanitizer/configure +@@ -665,6 +665,8 @@ LSAN_SUPPORTED_FALSE + LSAN_SUPPORTED_TRUE + TSAN_SUPPORTED_FALSE + TSAN_SUPPORTED_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CXXCPP +@@ -816,6 +818,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + enable_cet + ' +@@ -1469,6 +1472,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in target libraries [default=auto] + + Optional Packages: +@@ -8845,7 +8851,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10550,6 +10556,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10567,9 +10616,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12356,7 +12409,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12369 "configure" ++#line 12412 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12462,7 +12515,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12475 "configure" ++#line 12518 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13338,6 +13391,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13355,12 +13451,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15201,16 +15305,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -15332,7 +15426,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15770,6 +15864,15 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # The cast to long int works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +@@ -17091,6 +17194,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TSAN_SUPPORTED_TRUE}" && test -z "${TSAN_SUPPORTED_FALSE}"; then + as_fn_error $? "conditional \"TSAN_SUPPORTED\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac +index ac24b4b593b..91745491ab4 100644 +--- a/libsanitizer/configure.ac ++++ b/libsanitizer/configure.ac +@@ -85,6 +85,8 @@ esac + AC_SUBST(enable_shared) + AC_SUBST(enable_static) + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_CHECK_SIZEOF([void *]) + + if test "${multilib}" = "yes"; then +diff --git a/libsanitizer/hwasan/Makefile.am b/libsanitizer/hwasan/Makefile.am +index 2226f68ab29..be5e42cfcb4 100644 +--- a/libsanitizer/hwasan/Makefile.am ++++ b/libsanitizer/hwasan/Makefile.am +@@ -42,7 +42,11 @@ libhwasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libhwasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) + +-libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) ++if ENABLE_DARWIN_AT_RPATH ++libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libhwasan) $(libhwasan_darwin_rpath) + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/hwasan/Makefile.in b/libsanitizer/hwasan/Makefile.in +index 542af8f193e..5457cb5db1e 100644 +--- a/libsanitizer/hwasan/Makefile.in ++++ b/libsanitizer/hwasan/Makefile.in +@@ -434,7 +434,10 @@ libhwasan_la_SOURCES = $(hwasan_files) + libhwasan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libhwasan) $(libhwasan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/lsan/Makefile.am b/libsanitizer/lsan/Makefile.am +index f4db8e37683..a37cc95c56f 100644 +--- a/libsanitizer/lsan/Makefile.am ++++ b/libsanitizer/lsan/Makefile.am +@@ -40,8 +40,12 @@ if LIBBACKTRACE_SUPPORTED + liblsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + liblsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan) +- ++if ENABLE_DARWIN_AT_RPATH ++liblsan_darwin_rpath = -Wc,-nodefaultrpaths ++liblsan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_liblsan) $(liblsan_darwin_rpath) + liblsan_preinit.o: lsan_preinit.o + cp $< $@ + +diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in +index 01de442637c..c8e9216e4d1 100644 +--- a/libsanitizer/lsan/Makefile.in ++++ b/libsanitizer/lsan/Makefile.in +@@ -410,7 +410,12 @@ liblsan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(am__append_1) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@liblsan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_liblsan) $(liblsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +@@ -785,7 +790,6 @@ uninstall-am: uninstall-nodist_toolexeclibHEADERS \ + + .PRECIOUS: Makefile + +- + liblsan_preinit.o: lsan_preinit.o + cp $< $@ + +diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am +index fb20ff7e311..91837f43eff 100644 +--- a/libsanitizer/tsan/Makefile.am ++++ b/libsanitizer/tsan/Makefile.am +@@ -57,7 +57,11 @@ libtsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + libtsan_la_DEPENDENCIES +=$(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libtsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) ++if ENABLE_DARWIN_AT_RPATH ++libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libtsan) $(libtsan_darwin_rpath) + + libtsan_preinit.o: tsan_preinit.o + cp $< $@ +diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in +index ce11d2497b7..550aae54730 100644 +--- a/libsanitizer/tsan/Makefile.in ++++ b/libsanitizer/tsan/Makefile.in +@@ -462,7 +462,10 @@ libtsan_la_DEPENDENCIES = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(TSAN_TARGET_DEPENDENT_OBJECTS) $(am__append_2) +-libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libtsan) $(libtsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/ubsan/Makefile.am b/libsanitizer/ubsan/Makefile.am +index 9654fb2afc4..bad4ea73f8d 100644 +--- a/libsanitizer/ubsan/Makefile.am ++++ b/libsanitizer/ubsan/Makefile.am +@@ -35,7 +35,12 @@ if LIBBACKTRACE_SUPPORTED + libubsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) ++if ENABLE_DARWIN_AT_RPATH ++libubsan_darwin_rpath = -Wc,-nodefaultrpaths ++libubsan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libubsan) $(libubsan_darwin_rpath) + + # Use special rules for files that require RTTI support. + ubsan_handlers_cxx.% ubsan_type_hash.% ubsan_type_hash_itanium.% : AM_CXXFLAGS += -frtti +diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in +index 2775c142213..6983c008f13 100644 +--- a/libsanitizer/ubsan/Makefile.in ++++ b/libsanitizer/ubsan/Makefile.in +@@ -397,7 +397,12 @@ libubsan_la_SOURCES = $(ubsan_files) + libubsan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libubsan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libubsan) $(libubsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libssp/Makefile.am b/libssp/Makefile.am +index 6045c320cfa..e5c6903767a 100644 +--- a/libssp/Makefile.am ++++ b/libssp/Makefile.am +@@ -49,8 +49,12 @@ libssp_la_SOURCES = \ + vsnprintf-chk.c vsprintf-chk.c + libssp_la_LIBADD = + libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD) ++if ENABLE_DARWIN_AT_RPATH ++libssp_darwin_rpath = -Wc,-nodefaultrpaths ++libssp_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) ++ $(version_arg) $(lt_host_flags) $(libssp_darwin_rpath) + + libssp_nonshared_la_SOURCES = \ + ssp-local.c +diff --git a/libssp/Makefile.in b/libssp/Makefile.in +index bc8a0dc2b28..1cf86361b96 100644 +--- a/libssp/Makefile.in ++++ b/libssp/Makefile.in +@@ -376,8 +376,11 @@ libssp_la_SOURCES = \ + + libssp_la_LIBADD = + libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libssp_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) ++ $(version_arg) $(lt_host_flags) $(libssp_darwin_rpath) + + libssp_nonshared_la_SOURCES = \ + ssp-local.c +diff --git a/libssp/configure b/libssp/configure +index 10ba209bde8..cb0a9a4308a 100755 +--- a/libssp/configure ++++ b/libssp/configure +@@ -636,6 +636,8 @@ LIBOBJS + get_gcc_base_ver + toolexeclibdir + toolexecdir ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -781,6 +783,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_toolexeclibdir + with_gcc_major_version_only + ' +@@ -1426,6 +1429,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -4338,7 +4344,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -7453,7 +7459,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9165,6 +9171,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9182,9 +9231,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10992,7 +11045,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11005 "configure" ++#line 11048 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11098,7 +11151,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11111 "configure" ++#line 11154 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11376,6 +11429,15 @@ fi + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +@@ -11585,6 +11647,10 @@ if test -z "${LIBSSP_USE_SYMVER_SUN_TRUE}" && test -z "${LIBSSP_USE_SYMVER_SUN_F + as_fn_error $? "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libssp/configure.ac b/libssp/configure.ac +index f30f81c54f6..90778e2355d 100644 +--- a/libssp/configure.ac ++++ b/libssp/configure.ac +@@ -165,6 +165,8 @@ AC_SUBST(enable_static) + + GCC_WITH_TOOLEXECLIBDIR + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +diff --git a/libstdc++-v3/config/os/bsd/darwin/os_defines.h b/libstdc++-v3/config/os/bsd/darwin/os_defines.h +index 394d7209711..71f3e7e4182 100644 +--- a/libstdc++-v3/config/os/bsd/darwin/os_defines.h ++++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h +@@ -33,11 +33,11 @@ + links to, so there's no need for weak-ness for that. */ + #define _GLIBCXX_GTHREAD_USE_WEAK 0 + +-// On Darwin, in order to enable overriding of operator new and delete, +-// GCC makes the definition of these functions weak, relies on the +-// loader to implement weak semantics properly, and uses +-// -flat_namespace to work around the way that it doesn't. +-#define _GLIBCXX_WEAK_DEFINITION __attribute__ ((weak)) ++// On Darwin, in order to enable overriding of operator new and delete, the ++// ABI library exports a weak definition. The static linker will override this ++// iff a user-provided implementation is given (providing that the user ++// implementation is not itself a weak definition). ++#define _GLIBCXX_WEAK_DEFINITION __attribute__ ((__weak__)) + + #if defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ + && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1080) +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index 64f2552afe5..8e4b9ff345a 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -778,6 +778,8 @@ glibcxx_compiler_pic_flag + glibcxx_lt_pic_flag + OS_IS_DARWIN_FALSE + OS_IS_DARWIN_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -913,6 +915,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_hosted_libstdcxx + enable_libstdcxx_verbose + enable_libstdcxx_pch +@@ -1599,6 +1602,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-hosted-libstdcxx + only build freestanding C++ runtime support + --disable-libstdcxx-verbose +@@ -8511,7 +8517,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10351,6 +10357,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10368,9 +10417,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12178,7 +12231,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12181 "configure" ++#line 12234 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12284,7 +12337,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12287 "configure" ++#line 12340 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13166,6 +13219,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13183,12 +13279,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15565,6 +15669,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + os_is_darwin=no + case ${host_os} in +@@ -15980,7 +16092,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } + # Fake what AC_TRY_COMPILE does. + + cat > conftest.$ac_ext << EOF +-#line 15983 "configure" ++#line 16095 "configure" + int main() + { + typedef bool atomic_type; +@@ -16015,7 +16127,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16018 "configure" ++#line 16130 "configure" + int main() + { + typedef short atomic_type; +@@ -16050,7 +16162,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16053 "configure" ++#line 16165 "configure" + int main() + { + // NB: _Atomic_word not necessarily int. +@@ -16086,7 +16198,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16089 "configure" ++#line 16201 "configure" + int main() + { + typedef long long atomic_type; +@@ -16239,7 +16351,7 @@ $as_echo "mutex" >&6; } + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 16242 "configure" ++#line 16354 "configure" + int main() + { + _Decimal32 d1; +@@ -16281,7 +16393,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 16284 "configure" ++#line 16396 "configure" + template + struct same + { typedef T2 type; }; +@@ -16315,7 +16427,7 @@ $as_echo "$enable_int128" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16318 "configure" ++#line 16430 "configure" + template + struct same + { typedef T2 type; }; +@@ -78460,6 +78572,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${OS_IS_DARWIN_TRUE}" && test -z "${OS_IS_DARWIN_FALSE}"; then + as_fn_error $? "conditional \"OS_IS_DARWIN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index 6c823efe910..03d5fe93cff 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -97,6 +97,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + os_is_darwin=no + case ${host_os} in +diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host +index ec32980aa0d..da5b1578d91 100644 +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -234,11 +234,6 @@ case "${host_os}" in + darwin8 | darwin8.* ) + # For 8+ compatibility is better if not -flat_namespace. + OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module" +- case "${host_cpu}" in +- i[34567]86 | x86_64) +- OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -fvisibility-inlines-hidden" +- ;; +- esac + os_include_dir="os/bsd/darwin" + ;; + darwin*) +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index f92a52748c5..9f5726c2ca1 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -122,8 +122,13 @@ libstdc___la_DEPENDENCIES = \ + $(top_builddir)/src/c++17/libc++17convenience.la \ + $(top_builddir)/src/c++20/libc++20convenience.la + ++if ENABLE_DARWIN_AT_RPATH ++libstdc___darwin_rpath = -Wc,-nodefaultrpaths ++libstdc___darwin_rpath += -Wl,-rpath,@loader_path ++endif ++ + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm ++ -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index 2fff46209ad..b2f7cb80c0e 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -534,8 +534,11 @@ libstdc___la_DEPENDENCIES = \ + $(top_builddir)/src/c++17/libc++17convenience.la \ + $(top_builddir)/src/c++20/libc++20convenience.la + ++@ENABLE_DARWIN_AT_RPATH_TRUE@libstdc___darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm ++ -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + @GLIBCXX_LDBL_ALT128_COMPAT_FALSE@@GLIBCXX_LDBL_COMPAT_TRUE@LTCXXCOMPILE64 = $(LTCXXCOMPILE) +diff --git a/libtool.m4 b/libtool.m4 +index 17f8e5f3074..1060b698168 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -1005,7 +1005,7 @@ _LT_EOF + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0123456789]]*) ++ UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0-9]]*) + ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -1039,6 +1039,45 @@ _LT_EOF + m4_defun([_LT_DARWIN_LINKER_FEATURES], + [ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ AC_ARG_ENABLE([darwin-at-rpath], ++ AS_HELP_STRING([--enable-darwin-at-rpath], ++ [install libraries with @rpath/library-name, requires rpaths to be added to executables]), ++ [if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*) ++ AC_MSG_WARN([Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)]) ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi], ++ [case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[[5-9]]*|UNSET,darwin2*|10.1[[1-9]][[,.]]*|1[[1-9]].*[[,.]]* ) ++ AC_MSG_NOTICE([@rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)]) ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ]) ++ + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes +@@ -1056,13 +1095,21 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], + [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + ],[]) +@@ -6441,7 +6488,6 @@ fi # test "$_lt_caught_CXX_error" != yes + AC_LANG_POP + ])# _LT_LANG_CXX_CONFIG + +- + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +diff --git a/libvtv/configure b/libvtv/configure +index d64b4af5c6b..3ce65ead30a 100755 +--- a/libvtv/configure ++++ b/libvtv/configure +@@ -640,6 +640,8 @@ VTV_CYGMIN_FALSE + VTV_CYGMIN_TRUE + XCFLAGS + libtool_VERSION ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -797,6 +799,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_cet + with_gcc_major_version_only + ' +@@ -1446,6 +1449,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in target libraries [default=auto] + + Optional Packages: +@@ -8743,7 +8749,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10448,6 +10454,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10465,9 +10514,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12254,7 +12307,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12267 "configure" ++#line 12310 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12360,7 +12413,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12373 "configure" ++#line 12416 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13236,6 +13289,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13253,12 +13349,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15099,16 +15203,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -15230,7 +15324,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15642,6 +15736,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=1:0:0 +@@ -15672,7 +15774,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -15987,6 +16089,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${VTV_CYGMIN_TRUE}" && test -z "${VTV_CYGMIN_FALSE}"; then + as_fn_error $? "conditional \"VTV_CYGMIN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libvtv/configure.ac b/libvtv/configure.ac +index f3b937e4b10..50aaadbb3a3 100644 +--- a/libvtv/configure.ac ++++ b/libvtv/configure.ac +@@ -153,6 +153,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=1:0:0 +diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in +index 20611c6b1e6..b33ffed6e48 100644 +--- a/lto-plugin/Makefile.in ++++ b/lto-plugin/Makefile.in +@@ -350,8 +350,8 @@ libexecsub_LTLIBRARIES = liblto_plugin.la + in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib)) + liblto_plugin_la_SOURCES = lto-plugin.c + # Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS. +-liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module -avoid-version \ +- -bindir $(libexecsubdir) $(if $(wildcard \ ++liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \ ++ -avoid-version -bindir $(libexecsubdir) $(if $(wildcard \ + $(libiberty_noasan)),, $(if $(wildcard \ + $(libiberty_pic)),,-Wc,$(libiberty))) + # Can be simplified when libiberty becomes a normal convenience library. +diff --git a/lto-plugin/configure b/lto-plugin/configure +index baa84adbb6c..80bb1d16db1 100755 +--- a/lto-plugin/configure ++++ b/lto-plugin/configure +@@ -634,6 +634,8 @@ LTLIBOBJS + LIBOBJS + target_noncanonical + lt_host_flags ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + OTOOL64 + OTOOL + LIPO +@@ -779,6 +781,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + ' + ac_precious_vars='build_alias + host_alias +@@ -1424,6 +1427,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -8429,23 +8435,25 @@ _LT_EOF + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 + $as_echo "$lt_cv_ld_force_load" >&6; } +- case $host_os in +- rhapsody* | darwin1.[012]) ++ # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to ++ # build without first building modern cctools / linker. ++ case $host_cpu-$host_os in ++ *-rhapsody* | *-darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +- darwin1.*) ++ *-darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ *-darwin*) ++ # darwin 5.x (macOS 10.1) onwards we only need to adjust when the ++ # deployment target is forced to an earlier version. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) ++ ;; + 10.[012][,.]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ++ ;; ++ *) ++ ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then +@@ -10144,6 +10152,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10161,9 +10212,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11950,7 +12005,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11963 "configure" ++#line 12008 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12056,7 +12111,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12069 "configure" ++#line 12114 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12293,6 +12348,14 @@ CC="$lt_save_CC" + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + +@@ -12527,6 +12590,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac +index 7e6f729e9dc..14a56c1e88e 100644 +--- a/lto-plugin/configure.ac ++++ b/lto-plugin/configure.ac +@@ -51,6 +51,7 @@ AC_SUBST(real_target_noncanonical) + GCC_BASE_VER + + AM_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + ACX_LT_HOST_FLAGS + AC_SUBST(target_noncanonical) + AC_TYPE_INT64_T +diff --git a/zlib/Makefile.in b/zlib/Makefile.in +index 3f5102d1b87..80fe3b69116 100644 +--- a/zlib/Makefile.in ++++ b/zlib/Makefile.in +@@ -353,6 +353,8 @@ datadir = @datadir@ + datarootdir = @datarootdir@ + docdir = @docdir@ + dvidir = @dvidir@ ++enable_host_pie = @enable_host_pie@ ++enable_host_shared = @enable_host_shared@ + exec_prefix = @exec_prefix@ + host = @host@ + host_alias = @host_alias@ +diff --git a/zlib/configure b/zlib/configure +index f489f31bc70..6c76fccc68c 100755 +--- a/zlib/configure ++++ b/zlib/configure +@@ -635,10 +635,14 @@ am__EXEEXT_TRUE + LTLIBOBJS + LIBOBJS + PICFLAG ++enable_host_pie ++enable_host_shared + TARGET_LIBRARY_FALSE + TARGET_LIBRARY_TRUE + toolexeclibdir + toolexecdir ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CPP + OTOOL64 + OTOOL +@@ -776,8 +780,10 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_toolexeclibdir + enable_host_shared ++enable_host_pie + ' + ac_precious_vars='build_alias + host_alias +@@ -1419,7 +1425,11 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -4169,7 +4179,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -6929,7 +6939,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8908,6 +8918,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8925,9 +8978,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10735,7 +10792,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10748 "configure" ++#line 10795 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10841,7 +10898,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10854 "configure" ++#line 10901 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11078,6 +11135,14 @@ CC="$lt_save_CC" + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # Find CPP now so that any conditional tests below won't do it and + # thereby make the resulting definitions conditional. +@@ -11524,15 +11589,31 @@ else + multilib_arg= + fi + ++# Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + + +- + ac_config_files="$ac_config_files Makefile" + + cat >confcache <<\_ACEOF +@@ -11708,6 +11789,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TARGET_LIBRARY_TRUE}" && test -z "${TARGET_LIBRARY_FALSE}"; then + as_fn_error $? "conditional \"TARGET_LIBRARY\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/zlib/configure.ac b/zlib/configure.ac +index be1cfe29651..9501cdfea85 100644 +--- a/zlib/configure.ac ++++ b/zlib/configure.ac +@@ -64,6 +64,7 @@ GCC_CET_FLAGS(CET_FLAGS) + AC_SUBST(CET_FLAGS) + + AC_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # Find CPP now so that any conditional tests below won't do it and + # thereby make the resulting definitions conditional. +@@ -122,11 +123,26 @@ else + multilib_arg= + fi + ++# Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) +-AC_SUBST(PICFLAG) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi + ++AC_SUBST(PICFLAG) + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT diff --git a/Patches/gcc/gcc-12.4.0.diff b/Patches/gcc/gcc-12.4.0.diff new file mode 100644 index 0000000000000..dae9d82450e65 --- /dev/null +++ b/Patches/gcc/gcc-12.4.0.diff @@ -0,0 +1,16840 @@ +diff --git a/Makefile.def b/Makefile.def +index 72d58549645..639cdd78988 100644 +--- a/Makefile.def ++++ b/Makefile.def +@@ -47,10 +47,11 @@ host_modules= { module= fixincludes; bootstrap=true; + host_modules= { module= flex; no_check_cross= true; }; + host_modules= { module= gas; bootstrap=true; }; + host_modules= { module= gcc; bootstrap=true; +- extra_make_flags="$(EXTRA_GCC_FLAGS)"; }; ++ extra_make_flags="$(EXTRA_GCC_FLAGS)"; ++ extra_configure_flags='@gcc_host_pie@'; }; + host_modules= { module= gmp; lib_path=.libs; bootstrap=true; + // Work around in-tree gmp configure bug with missing flex. +- extra_configure_flags='--disable-shared LEX="touch lex.yy.c"'; ++ extra_configure_flags='--disable-shared LEX="touch lex.yy.c" @host_libs_picflag@'; + extra_make_flags='AM_CFLAGS="-DNO_ASM"'; + no_install= true; + // none-*-* disables asm optimizations, bootstrap-testing +@@ -60,14 +61,14 @@ host_modules= { module= gmp; lib_path=.libs; bootstrap=true; + // different from host for target. + target="none-${host_vendor}-${host_os}"; }; + host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true; +- extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@'; ++ extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@'; + extra_make_flags='AM_CFLAGS="-DNO_ASM"'; + no_install= true; }; + host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true; +- extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode'; ++ extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode'; + no_install= true; }; + host_modules= { module= isl; lib_path=.libs; bootstrap=true; +- extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@'; ++ extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@'; + extra_make_flags='V=1'; + no_install= true; }; + host_modules= { module= libelf; lib_path=.libs; bootstrap=true; +@@ -75,6 +76,7 @@ host_modules= { module= libelf; lib_path=.libs; bootstrap=true; + no_install= true; }; + host_modules= { module= gold; bootstrap=true; }; + host_modules= { module= gprof; }; ++// intl acts on 'host_shared' directly, and does not support --with-pic. + host_modules= { module= intl; bootstrap=true; }; + host_modules= { module= tcl; + missing=mostlyclean; }; +@@ -110,7 +112,7 @@ host_modules= { module= libiberty-linker-plugin; bootstrap=true; + // We abuse missing to avoid installing anything for libiconv. + host_modules= { module= libiconv; + bootstrap=true; +- extra_configure_flags='--disable-shared'; ++ extra_configure_flags='--disable-shared @host_libs_picflag@'; + no_install= true; + missing= pdf; + missing= html; +@@ -125,7 +127,7 @@ host_modules= { module= sim; }; + host_modules= { module= texinfo; no_install= true; }; + host_modules= { module= zlib; no_install=true; no_check=true; + bootstrap=true; +- extra_configure_flags='@extra_host_zlib_configure_flags@';}; ++ extra_configure_flags='@extra_host_zlib_configure_flags@ @host_libs_picflag@';}; + host_modules= { module= gnulib; }; + host_modules= { module= gdbsupport; }; + host_modules= { module= gdbserver; }; +diff --git a/Makefile.in b/Makefile.in +index 593495e1650..e3b44f99a7d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -12012,7 +12012,7 @@ configure-gcc: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} \ ++ --target=${target_alias} @gcc_host_pie@ \ + || exit 1 + @endif gcc + +@@ -12047,7 +12047,8 @@ configure-stage1-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + \ +- $(STAGE1_CONFIGURE_FLAGS) ++ $(STAGE1_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage2-gcc maybe-configure-stage2-gcc +@@ -12080,7 +12081,8 @@ configure-stage2-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE2_CONFIGURE_FLAGS) ++ $(STAGE2_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage3-gcc maybe-configure-stage3-gcc +@@ -12113,7 +12115,8 @@ configure-stage3-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE3_CONFIGURE_FLAGS) ++ $(STAGE3_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage4-gcc maybe-configure-stage4-gcc +@@ -12146,7 +12149,8 @@ configure-stage4-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE4_CONFIGURE_FLAGS) ++ $(STAGE4_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc +@@ -12179,7 +12183,8 @@ configure-stageprofile-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEprofile_CONFIGURE_FLAGS) ++ $(STAGEprofile_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stagetrain-gcc maybe-configure-stagetrain-gcc +@@ -12212,7 +12217,8 @@ configure-stagetrain-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEtrain_CONFIGURE_FLAGS) ++ $(STAGEtrain_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc +@@ -12245,7 +12251,8 @@ configure-stagefeedback-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEfeedback_CONFIGURE_FLAGS) ++ $(STAGEfeedback_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageautoprofile-gcc maybe-configure-stageautoprofile-gcc +@@ -12278,7 +12285,8 @@ configure-stageautoprofile-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEautoprofile_CONFIGURE_FLAGS) ++ $(STAGEautoprofile_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageautofeedback-gcc maybe-configure-stageautofeedback-gcc +@@ -12311,7 +12319,8 @@ configure-stageautofeedback-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEautofeedback_CONFIGURE_FLAGS) ++ $(STAGEautofeedback_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + +@@ -13152,7 +13161,7 @@ configure-gmp: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \ +- --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" \ ++ --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ \ + || exit 1 + @endif gmp + +@@ -13188,7 +13197,7 @@ configure-stage1-gmp: + --target=none-${host_vendor}-${host_os} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stage2-gmp maybe-configure-stage2-gmp +@@ -13222,7 +13231,7 @@ configure-stage2-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stage3-gmp maybe-configure-stage3-gmp +@@ -13256,7 +13265,7 @@ configure-stage3-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stage4-gmp maybe-configure-stage4-gmp +@@ -13290,7 +13299,7 @@ configure-stage4-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stageprofile-gmp maybe-configure-stageprofile-gmp +@@ -13324,7 +13333,7 @@ configure-stageprofile-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stagetrain-gmp maybe-configure-stagetrain-gmp +@@ -13358,7 +13367,7 @@ configure-stagetrain-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stagefeedback-gmp maybe-configure-stagefeedback-gmp +@@ -13392,7 +13401,7 @@ configure-stagefeedback-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stageautoprofile-gmp maybe-configure-stageautoprofile-gmp +@@ -13426,7 +13435,7 @@ configure-stageautoprofile-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + .PHONY: configure-stageautofeedback-gmp maybe-configure-stageautofeedback-gmp +@@ -13460,7 +13469,7 @@ configure-stageautofeedback-gmp: + --target=none-${host_vendor}-${host_os} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared LEX="touch lex.yy.c" ++ --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ + @endif gmp-bootstrap + + +@@ -14289,7 +14298,7 @@ configure-mpfr: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ \ ++ --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ \ + || exit 1 + @endif mpfr + +@@ -14325,7 +14334,7 @@ configure-stage1-mpfr: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stage2-mpfr maybe-configure-stage2-mpfr +@@ -14359,7 +14368,7 @@ configure-stage2-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr +@@ -14393,7 +14402,7 @@ configure-stage3-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stage4-mpfr maybe-configure-stage4-mpfr +@@ -14427,7 +14436,7 @@ configure-stage4-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stageprofile-mpfr maybe-configure-stageprofile-mpfr +@@ -14461,7 +14470,7 @@ configure-stageprofile-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stagetrain-mpfr maybe-configure-stagetrain-mpfr +@@ -14495,7 +14504,7 @@ configure-stagetrain-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stagefeedback-mpfr maybe-configure-stagefeedback-mpfr +@@ -14529,7 +14538,7 @@ configure-stagefeedback-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stageautoprofile-mpfr maybe-configure-stageautoprofile-mpfr +@@ -14563,7 +14572,7 @@ configure-stageautoprofile-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + .PHONY: configure-stageautofeedback-mpfr maybe-configure-stageautofeedback-mpfr +@@ -14597,7 +14606,7 @@ configure-stageautofeedback-mpfr: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpfr_configure_flags@ ++ --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ + @endif mpfr-bootstrap + + +@@ -15426,7 +15435,7 @@ configure-mpc: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode \ ++ --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode \ + || exit 1 + @endif mpc + +@@ -15462,7 +15471,7 @@ configure-stage1-mpc: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stage2-mpc maybe-configure-stage2-mpc +@@ -15496,7 +15505,7 @@ configure-stage2-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stage3-mpc maybe-configure-stage3-mpc +@@ -15530,7 +15539,7 @@ configure-stage3-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stage4-mpc maybe-configure-stage4-mpc +@@ -15564,7 +15573,7 @@ configure-stage4-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stageprofile-mpc maybe-configure-stageprofile-mpc +@@ -15598,7 +15607,7 @@ configure-stageprofile-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stagetrain-mpc maybe-configure-stagetrain-mpc +@@ -15632,7 +15641,7 @@ configure-stagetrain-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stagefeedback-mpc maybe-configure-stagefeedback-mpc +@@ -15666,7 +15675,7 @@ configure-stagefeedback-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stageautoprofile-mpc maybe-configure-stageautoprofile-mpc +@@ -15700,7 +15709,7 @@ configure-stageautoprofile-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + .PHONY: configure-stageautofeedback-mpc maybe-configure-stageautofeedback-mpc +@@ -15734,7 +15743,7 @@ configure-stageautofeedback-mpc: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode ++ --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode + @endif mpc-bootstrap + + +@@ -16563,7 +16572,7 @@ configure-isl: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ \ ++ --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ \ + || exit 1 + @endif isl + +@@ -16599,7 +16608,7 @@ configure-stage1-isl: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stage2-isl maybe-configure-stage2-isl +@@ -16633,7 +16642,7 @@ configure-stage2-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stage3-isl maybe-configure-stage3-isl +@@ -16667,7 +16676,7 @@ configure-stage3-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stage4-isl maybe-configure-stage4-isl +@@ -16701,7 +16710,7 @@ configure-stage4-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stageprofile-isl maybe-configure-stageprofile-isl +@@ -16735,7 +16744,7 @@ configure-stageprofile-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stagetrain-isl maybe-configure-stagetrain-isl +@@ -16769,7 +16778,7 @@ configure-stagetrain-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stagefeedback-isl maybe-configure-stagefeedback-isl +@@ -16803,7 +16812,7 @@ configure-stagefeedback-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stageautoprofile-isl maybe-configure-stageautoprofile-isl +@@ -16837,7 +16846,7 @@ configure-stageautoprofile-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + .PHONY: configure-stageautofeedback-isl maybe-configure-stageautofeedback-isl +@@ -16871,7 +16880,7 @@ configure-stageautofeedback-isl: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared @extra_isl_gmp_configure_flags@ ++ --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ + @endif isl-bootstrap + + +@@ -30806,7 +30815,7 @@ configure-libiconv: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} --disable-shared \ ++ --target=${target_alias} --disable-shared @host_libs_picflag@ \ + || exit 1 + @endif libiconv + +@@ -30842,7 +30851,7 @@ configure-stage1-libiconv: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stage2-libiconv maybe-configure-stage2-libiconv +@@ -30876,7 +30885,7 @@ configure-stage2-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stage3-libiconv maybe-configure-stage3-libiconv +@@ -30910,7 +30919,7 @@ configure-stage3-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stage4-libiconv maybe-configure-stage4-libiconv +@@ -30944,7 +30953,7 @@ configure-stage4-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stageprofile-libiconv maybe-configure-stageprofile-libiconv +@@ -30978,7 +30987,7 @@ configure-stageprofile-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stagetrain-libiconv maybe-configure-stagetrain-libiconv +@@ -31012,7 +31021,7 @@ configure-stagetrain-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stagefeedback-libiconv maybe-configure-stagefeedback-libiconv +@@ -31046,7 +31055,7 @@ configure-stagefeedback-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stageautoprofile-libiconv maybe-configure-stageautoprofile-libiconv +@@ -31080,7 +31089,7 @@ configure-stageautoprofile-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + .PHONY: configure-stageautofeedback-libiconv maybe-configure-stageautofeedback-libiconv +@@ -31114,7 +31123,7 @@ configure-stageautofeedback-libiconv: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- --disable-shared ++ --disable-shared @host_libs_picflag@ + @endif libiconv-bootstrap + + +@@ -34178,7 +34187,7 @@ configure-zlib: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} @extra_host_zlib_configure_flags@ \ ++ --target=${target_alias} @extra_host_zlib_configure_flags@ @host_libs_picflag@ \ + || exit 1 + @endif zlib + +@@ -34214,7 +34223,7 @@ configure-stage1-zlib: + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stage2-zlib maybe-configure-stage2-zlib +@@ -34248,7 +34257,7 @@ configure-stage2-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stage3-zlib maybe-configure-stage3-zlib +@@ -34282,7 +34291,7 @@ configure-stage3-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stage4-zlib maybe-configure-stage4-zlib +@@ -34316,7 +34325,7 @@ configure-stage4-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib +@@ -34350,7 +34359,7 @@ configure-stageprofile-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stagetrain-zlib maybe-configure-stagetrain-zlib +@@ -34384,7 +34393,7 @@ configure-stagetrain-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib +@@ -34418,7 +34427,7 @@ configure-stagefeedback-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stageautoprofile-zlib maybe-configure-stageautoprofile-zlib +@@ -34452,7 +34461,7 @@ configure-stageautoprofile-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + .PHONY: configure-stageautofeedback-zlib maybe-configure-stageautofeedback-zlib +@@ -34486,7 +34495,7 @@ configure-stageautofeedback-zlib: + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) \ +- @extra_host_zlib_configure_flags@ ++ @extra_host_zlib_configure_flags@ @host_libs_picflag@ + @endif zlib-bootstrap + + +diff --git a/c++tools/Makefile.in b/c++tools/Makefile.in +index d6a33613732..4d5a5b0522b 100644 +--- a/c++tools/Makefile.in ++++ b/c++tools/Makefile.in +@@ -28,8 +28,9 @@ AUTOCONF := @AUTOCONF@ + AUTOHEADER := @AUTOHEADER@ + CXX := @CXX@ + CXXFLAGS := @CXXFLAGS@ +-PIEFLAG := @PIEFLAG@ +-CXXOPTS := $(CXXFLAGS) $(PIEFLAG) -fno-exceptions -fno-rtti ++PICFLAG := @PICFLAG@ ++LD_PICFLAG := @LD_PICFLAG@ ++CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-exceptions -fno-rtti + LDFLAGS := @LDFLAGS@ + exeext := @EXEEXT@ + LIBIBERTY := ../libiberty/libiberty.a +@@ -88,11 +89,15 @@ ifeq (@CXX_AUX_TOOLS@,yes) + + all::g++-mapper-server$(exeext) + ++ifneq ($(PICFLAG),) ++override LIBIBERTY := ../libiberty/pic/libiberty.a ++endif ++ + MAPPER.O := server.o resolver.o + CODYLIB = ../libcody/libcody.a + CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. -I../gcc + g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB) +- +$(CXX) $(LDFLAGS) $(PIEFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS) ++ +$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS) + + # copy to gcc dir so tests there can run + all::../gcc/g++-mapper-server$(exeext) +diff --git a/c++tools/configure b/c++tools/configure +index 742816e4253..88087009383 100755 +--- a/c++tools/configure ++++ b/c++tools/configure +@@ -627,7 +627,8 @@ get_gcc_base_ver + EGREP + GREP + CXXCPP +-PIEFLAG ++LD_PICFLAG ++PICFLAG + MAINTAINER + CXX_AUX_TOOLS + AUTOHEADER +@@ -700,6 +701,7 @@ enable_c___tools + enable_maintainer_mode + enable_checking + enable_default_pie ++enable_host_pie + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1333,6 +1335,7 @@ Optional Features: + only specific categories of checks. Categories are: + yes,no,all,none,release. + --enable-default-pie enable Position Independent Executable as default ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2990,12 +2993,20 @@ fi + # Check whether --enable-default-pie was given. + # Check whether --enable-default-pie was given. + if test "${enable_default_pie+set}" = set; then : +- enableval=$enable_default_pie; PIEFLAG=-fPIE ++ enableval=$enable_default_pie; PICFLAG=-fPIE + else +- PIEFLAG= ++ PICFLAG= + fi + + ++# Enable --enable-host-pie ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie ++fi ++ ++ ++ + + # Check if O_CLOEXEC is defined by fcntl + +diff --git a/c++tools/configure.ac b/c++tools/configure.ac +index 6662b5ad7c9..1e42689f2eb 100644 +--- a/c++tools/configure.ac ++++ b/c++tools/configure.ac +@@ -102,8 +102,15 @@ fi + AC_ARG_ENABLE(default-pie, + [AS_HELP_STRING([--enable-default-pie], + [enable Position Independent Executable as default])], +-[PIEFLAG=-fPIE], [PIEFLAG=]) +-AC_SUBST([PIEFLAG]) ++[PICFLAG=-fPIE], [PICFLAG=]) ++ ++# Enable --enable-host-pie ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])], ++[PICFLAG=-fPIE; LD_PICFLAG=-pie], []) ++AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) + + # Check if O_CLOEXEC is defined by fcntl + AC_CACHE_CHECK(for O_CLOEXEC, ac_cv_o_cloexec, [ +diff --git a/configure b/configure +index 77638bc84a6..6b5016ac5c2 100755 +--- a/configure ++++ b/configure +@@ -685,7 +685,11 @@ get_gcc_base_ver + extra_host_zlib_configure_flags + extra_host_libiberty_configure_flags + stage1_languages ++host_libs_picflag ++PICFLAG + host_shared ++gcc_host_pie ++host_pie + extra_linker_plugin_flags + extra_linker_plugin_configure_flags + islinc +@@ -829,6 +833,7 @@ enable_isl_version_check + enable_lto + enable_linker_plugin_configure_flags + enable_linker_plugin_flags ++enable_host_pie + enable_host_shared + enable_stage1_languages + enable_objc_gc +@@ -1557,6 +1562,7 @@ Optional Features: + --enable-linker-plugin-flags=FLAGS + additional flags for configuring and building linker + plugins [none] ++ --enable-host-pie build position independent host executables + --enable-host-shared build host code as shared libraries + --enable-stage1-languages[=all] + choose additional languages to build during stage1. +@@ -3488,6 +3494,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[3456789]86-*-darwin*) +@@ -8410,6 +8418,20 @@ else + fi + fi + ++case $target in ++ *-darwin2* | *-darwin1[56789]*) ++ # For these versions, we default to using embedded rpaths. ++ if test "x$enable_darwin_at_rpath" != "xno"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++ *-darwin*) ++ # For these versions, we only use embedded rpaths on demand. ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++esac + + + # GCC GRAPHITE dependency isl. +@@ -8641,6 +8663,39 @@ fi + + + ++# Handle --enable-host-pie ++# If host PIE executables are the default (or must be forced on) for some host, ++# we must pass that configuration to the gcc directory. ++gcc_host_pie= ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; host_pie=$enableval ++ case $host in ++ *-*-darwin2*) ++ if test x$host_pie != xyes ; then ++ # for Darwin20+ this is required. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&2;} ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ fi ;; ++ *) ;; ++ esac ++else ++ case $host in ++ *-*-darwin2*) ++ # Default to PIE (mandatory for aarch64). ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ ;; ++ *) host_pie=no ;; ++ esac ++fi ++ ++ ++ ++ ++ + # Enable --enable-host-shared. + # Checked early to determine whether jit is an 'all' language + # Check whether --enable-host-shared was given. +@@ -8650,20 +8705,60 @@ if test "${enable_host_shared+set}" = set; then : + x86_64-*-darwin* | aarch64-*-darwin*) + if test x$host_shared != xyes ; then + # PIC is the default, and actually cannot be switched off. +- echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&2;} ++ host_shared=yes ++ fi ;; ++ *-*-darwin*) ++ if test x$host_pie = xyes -a x$host_shared != xyes ; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&2;} + host_shared=yes + fi ;; + *) ;; + esac + else +- case $target in ++ case $host in ++ # 64B x86_64 and Aarch64 Darwin default to PIC. + x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; +- *) host_shared=no ;; ++ # 32B and powerpc64 Darwin must use PIC to link PIE exes. ++ *-*-darwin*) host_shared=$host_pie ;; ++ *) host_shared=no;; + esac + fi + + + ++if test x$host_shared = xyes; then ++ case $host in ++ *-*-darwin*) ++ # Since host shared is the default for 64b Darwin, and also enabled for ++ # host_pie, ensure that we present the PIE flag when host_pie is active. ++ if test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++ fi ++ ;; ++ *) ++ PICFLAG=-fPIC ++ ;; ++ esac ++elif test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++ ++ ++# If we are building PIC/PIE host executables, and we are building dependent ++# libs (e.g. GMP) in-tree those libs need to be configured to generate PIC ++# code. ++host_libs_picflag= ++if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then ++host_libs_picflag='--with-pic' ++fi ++ ++ + # By default, C and C++ are the only stage 1 languages. + stage1_languages=,c, + +diff --git a/configure.ac b/configure.ac +index 7abd02f8b56..e8a22fe6dd4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -748,6 +748,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[[3456789]]86-*-darwin*) +@@ -1827,6 +1829,20 @@ AC_ARG_WITH(boot-ldflags, + if test "$poststage1_libs" = ""; then + poststage1_ldflags="-static-libstdc++ -static-libgcc" + fi]) ++case $target in ++ *-darwin2* | *-darwin1[[56789]]*) ++ # For these versions, we default to using embedded rpaths. ++ if test "x$enable_darwin_at_rpath" != "xno"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++ *-darwin*) ++ # For these versions, we only use embedded rpaths on demand. ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++esac + AC_SUBST(poststage1_ldflags) + + # GCC GRAPHITE dependency isl. +@@ -1912,6 +1928,36 @@ AC_ARG_ENABLE(linker-plugin-flags, + extra_linker_plugin_flags=) + AC_SUBST(extra_linker_plugin_flags) + ++# Handle --enable-host-pie ++# If host PIE executables are the default (or must be forced on) for some host, ++# we must pass that configuration to the gcc directory. ++gcc_host_pie= ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build position independent host executables])], ++[host_pie=$enableval ++ case $host in ++ *-*-darwin2*) ++ if test x$host_pie != xyes ; then ++ # for Darwin20+ this is required. ++ AC_MSG_WARN([PIE executables are required for the configured host, host-pie setting ignored.]) ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ fi ;; ++ *) ;; ++ esac], ++[case $host in ++ *-*-darwin2*) ++ # Default to PIE (mandatory for aarch64). ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ ;; ++ *) host_pie=no ;; ++ esac]) ++ ++AC_SUBST(host_pie) ++AC_SUBST(gcc_host_pie) ++ + # Enable --enable-host-shared. + # Checked early to determine whether jit is an 'all' language + AC_ARG_ENABLE(host-shared, +@@ -1922,17 +1968,55 @@ AC_ARG_ENABLE(host-shared, + x86_64-*-darwin* | aarch64-*-darwin*) + if test x$host_shared != xyes ; then + # PIC is the default, and actually cannot be switched off. +- echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 ++ AC_MSG_WARN([PIC code is required for the configured host; host-shared setting ignored.]) ++ host_shared=yes ++ fi ;; ++ *-*-darwin*) ++ if test x$host_pie = xyes -a x$host_shared != xyes ; then ++ AC_MSG_WARN([PIC code is required for PIE host executables host-shared setting ignored.]) + host_shared=yes + fi ;; + *) ;; + esac], +-[case $target in ++[case $host in ++ # 64B x86_64 and Aarch64 Darwin default to PIC. + x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; +- *) host_shared=no ;; ++ # 32B and powerpc64 Darwin must use PIC to link PIE exes. ++ *-*-darwin*) host_shared=$host_pie ;; ++ *) host_shared=no;; + esac]) + AC_SUBST(host_shared) + ++if test x$host_shared = xyes; then ++ case $host in ++ *-*-darwin*) ++ # Since host shared is the default for 64b Darwin, and also enabled for ++ # host_pie, ensure that we present the PIE flag when host_pie is active. ++ if test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++ fi ++ ;; ++ *) ++ PICFLAG=-fPIC ++ ;; ++ esac ++elif test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++AC_SUBST(PICFLAG) ++ ++# If we are building PIC/PIE host executables, and we are building dependent ++# libs (e.g. GMP) in-tree those libs need to be configured to generate PIC ++# code. ++host_libs_picflag= ++if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then ++host_libs_picflag='--with-pic' ++fi ++AC_SUBST(host_libs_picflag) ++ + # By default, C and C++ are the only stage 1 languages. + stage1_languages=,c, + +diff --git a/contrib/compare-debug b/contrib/compare-debug +index cf80ae32695..678a897c931 100755 +--- a/contrib/compare-debug ++++ b/contrib/compare-debug +@@ -60,9 +60,19 @@ trap 'rm -f "$1.$suf1" "$2.$suf2"' 0 1 2 15 + case `uname -s` in + Darwin) + # The strip command on darwin does not remove all debug info. +- # Fortunately, we can use ld to do it instead. +- ld -S -r -no_uuid "$1" -o "$1.$suf1" +- ld -S -r -no_uuid "$2" -o "$2.$suf2" ++ # Fortunately, we can use ld to do it instead, but even ld on earlier ++ # system versions can be fussy about what it finds - make sure we use ++ # a ld that understands coalesced sections. ++ case `uname -r` in ++ 8*) ++ ld64 -S -r -no_uuid "$1" -o "$1.$suf1" ++ ld64 -S -r -no_uuid "$2" -o "$2.$suf2" ++ ;; ++ *) ++ ld -S -r -no_uuid "$1" -o "$1.$suf1" ++ ld -S -r -no_uuid "$2" -o "$2.$suf2" ++ ;; ++ esac + ;; + *) + cp "$1" "$1.$suf1" +diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in +index 1937dcaa32d..e6ce41dba39 100644 +--- a/fixincludes/Makefile.in ++++ b/fixincludes/Makefile.in +@@ -73,7 +73,7 @@ default : all + # Now figure out from those variables how to compile and link. + + .c.o: +- $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $< ++ $(CC) -c $(CFLAGS) $(PICFLAG) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $< + + # The only suffixes we want for implicit rules are .c and .o. + .SUFFIXES: +@@ -87,7 +87,11 @@ default : all + ## + ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + ++ifeq ($(PICFLAG),) + LIBIBERTY=../libiberty/libiberty.a ++else ++LIBIBERTY=../libiberty/pic/libiberty.a ++endif + + ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \ + fixlib.o fixopts.o +@@ -107,15 +111,15 @@ oneprocess : full-stamp + twoprocess : test-stamp $(AF) + + full-stamp : $(ALLOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(ALLOBJ) $(LIBIBERTY) + $(STAMP) $@ + + test-stamp : $(TESTOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(TESTOBJ) $(LIBIBERTY) + $(STAMP) $@ + + $(AF): $(FIXOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $@ $(FIXOBJ) $(LIBIBERTY) + + $(ALLOBJ) : $(HDR) + fixincl.o : fixincl.c $(srcdir)/fixincl.x +diff --git a/fixincludes/configure b/fixincludes/configure +index 0d5cd6967ca..5d1db193a50 100755 +--- a/fixincludes/configure ++++ b/fixincludes/configure +@@ -623,6 +623,8 @@ ac_subst_vars='LTLIBOBJS + LIBOBJS + get_gcc_base_ver + MAINT ++LD_PICFLAG ++PICFLAG + TARGET + target_noncanonical + WERROR +@@ -695,6 +697,7 @@ enable_option_checking + enable_werror_always + with_local_prefix + enable_twoprocess ++enable_host_pie + enable_maintainer_mode + with_gcc_major_version_only + ' +@@ -1323,6 +1326,7 @@ Optional Features: + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-werror-always enable -Werror despite compiler version + --enable-twoprocess Use a separate process to apply the fixes ++ --enable-host-pie build host code as PIE + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +@@ -3044,7 +3048,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # the compiler configuration to `libtool'. + # _LT_LANG_CXX_CONFIG + +- + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +@@ -4835,6 +4838,15 @@ $as_echo "#define SEPARATE_FIX_PROC 1" >>confdefs.h + + fi + ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie ++fi ++ ++ ++ ++ + case $host in + vax-dec-bsd* ) + +diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac +index ef2227e3c93..4e78511d20f 100644 +--- a/fixincludes/configure.ac ++++ b/fixincludes/configure.ac +@@ -68,6 +68,14 @@ if test $TARGET = twoprocess; then + [Define if testing and fixing are done by separate process]) + fi + ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])], ++[PICFLAG=-fPIE; LD_PICFLAG=-pie], []) ++AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) ++ + case $host in + vax-dec-bsd* ) + AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit]) +diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x +index 0bc8eb049a3..2e810ba92e1 100644 +--- a/fixincludes/fixincl.x ++++ b/fixincludes/fixincl.x +@@ -2,11 +2,11 @@ + * + * DO NOT EDIT THIS FILE (fixincl.x) + * +- * It has been AutoGen-ed March 30, 2024 at 04:03:59 PM by AutoGen 5.18.7 ++ * It has been AutoGen-ed June 9, 2024 at 09:57:56 AM by AutoGen 5.18.7 + * From the definitions inclhack.def + * and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Mar 30 16:03:59 GMT 2024 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 9 09:57:56 BST 2024 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 269 fixup descriptions. ++ * This file contains 267 fixup descriptions. + * + * See README for more information. + * +@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { + #endif /* __MATH__ */", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Api_Availability fix +- */ +-tSCC zDarwin_Api_AvailabilityName[] = +- "darwin_api_availability"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_Api_AvailabilityList[] = +- "os/availability.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_Api_AvailabilityMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilitySelect0[] = +- " *#define __API_AVAILABLE.*\n\ +- *#define __API_DEPRECATED.*\n\ +- *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ +- *#define __API_UNAVAILABLE.*\n"; +- +-/* +- * content bypass pattern - skip fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilityBypass0[] = +- "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- +-#define DARWIN_API_AVAILABILITY_TEST_CT 2 +-static tTestDesc aDarwin_Api_AvailabilityTests[] = { +- { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, +- { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Api_Availability +- */ +-static const char* apzDarwin_Api_AvailabilityPatch[] = { +- "format", +- " #define API_AVAILABLE(...)\n\ +- #define API_DEPRECATED(...)\n\ +- #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ +- #define API_UNAVAILABLE(...)\n", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix +@@ -2763,51 +2713,6 @@ extern \"C\" {\n\ + #endif\n", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Availabilityinternal fix +- */ +-tSCC zDarwin_AvailabilityinternalName[] = +- "darwin_availabilityinternal"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_AvailabilityinternalList[] = +- "AvailabilityInternal.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_AvailabilityinternalMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_AvailabilityinternalSelect0[] = +- "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- +-#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1 +-static tTestDesc aDarwin_AvailabilityinternalTests[] = { +- { TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Availabilityinternal +- */ +-static const char* apzDarwin_AvailabilityinternalPatch[] = { +- "format", +- "#if defined(__has_attribute)\n\ +- #if __has_attribute(availability)\n\ +-%0\n\ +- #else\n\ +- #define %1\n\ +- #endif\n\ +-#else\n\ +- #define %1\n\ +-#endif", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_9_Long_Double_Funcs_2 fix +@@ -10959,9 +10864,9 @@ static const char* apzX11_SprintfPatch[] = { + * + * List of all fixes + */ +-#define REGEX_COUNT 307 ++#define REGEX_COUNT 304 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 269 ++#define FIX_COUNT 267 + + /* + * Enumerate the fixes +@@ -10970,7 +10875,6 @@ typedef enum { + AAB_AIX_STDIO_FIXIDX, + AAB_AIX_FCNTL_FIXIDX, + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, +- DARWIN_API_AVAILABILITY_FIXIDX, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, + AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, + AAB_FD_ZERO_SELECTBITS_H_FIXIDX, +@@ -11032,7 +10936,6 @@ typedef enum { + CTRL_QUOTES_DEF_FIXIDX, + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, +- DARWIN_AVAILABILITYINTERNAL_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, + DARWIN_EXTERNC_FIXIDX, + DARWIN_GCC4_BREAKAGE_FIXIDX, +@@ -11254,11 +11157,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + +- { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, +- apzDarwin_Api_AvailabilityMachs, +- DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, +- + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, + apzAab_Fd_Zero_Asm_Posix_Types_HMachs, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, +@@ -11564,11 +11462,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, + +- { zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList, +- apzDarwin_AvailabilityinternalMachs, +- DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 }, +- + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def +index 31a21c2a66d..c4ab0dd4ff6 100644 +--- a/fixincludes/inclhack.def ++++ b/fixincludes/inclhack.def +@@ -194,33 +194,6 @@ fix = { + _EndOfHeader_; + }; + +-/* +- * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where +- * __attribute__((availability)) is not supported. +- */ +-fix = { +- hackname = darwin_api_availability; +- mach = "*-*-darwin*"; +- files = os/availability.h; +- bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- select = +- " *#define __API_AVAILABLE.*\n" +- " *#define __API_DEPRECATED.*\n" +- " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" +- " *#define __API_UNAVAILABLE.*\n"; +- c_fix = format; +- c_fix_arg = +- " #define API_AVAILABLE(...)\n" +- " #define API_DEPRECATED(...)\n" +- " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- " #define API_UNAVAILABLE(...)\n"; +- test_text = +- "#define __API_AVAILABLE(...)\n" +- "#define __API_DEPRECATED(...)\n" +- "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- "#define __API_UNAVAILABLE(...)\n"; +-}; +- + /* + * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) + */ +@@ -1350,32 +1323,6 @@ fix = { + test_text = "extern void* malloc( size_t );"; + }; + +-/* +- * macOS 10.12 uses __attribute__((availability)) +- * unconditionally. +- */ +-fix = { +- hackname = darwin_availabilityinternal; +- mach = "*-*-darwin*"; +- files = AvailabilityInternal.h; +- select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- c_fix = format; +- c_fix_arg = <<- _EOFix_ +- #if defined(__has_attribute) +- #if __has_attribute(availability) +- %0 +- #else +- #define %1 +- #endif +- #else +- #define %1 +- #endif +- _EOFix_; +- +- test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n" +- "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))"; +-}; +- + /* + * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) + * to be useful, the main math.h must use <> and not "" includes. +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 31ff95500c9..3bfaeebdbd2 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -155,6 +155,9 @@ LDFLAGS = @LDFLAGS@ + # Should we build position-independent host code? + PICFLAG = @PICFLAG@ + ++# The linker flag for the above. ++LD_PICFLAG = @LD_PICFLAG@ ++ + # Flags to determine code coverage. When coverage is disabled, this will + # contain the optimization flags, as you normally want code coverage + # without optimization. +@@ -263,18 +266,17 @@ LINKER = $(CC) + LINKER_FLAGS = $(CFLAGS) + endif + ++enable_host_pie = @enable_host_pie@ ++ + # Enable Intel CET on Intel CET enabled host if needed. + CET_HOST_FLAGS = @CET_HOST_FLAGS@ + COMPILER += $(CET_HOST_FLAGS) + +-NO_PIE_CFLAGS = @NO_PIE_CFLAGS@ +-NO_PIE_FLAG = @NO_PIE_FLAG@ +- +-# We don't want to compile the compilers with -fPIE, it make PCH fail. +-COMPILER += $(NO_PIE_CFLAGS) ++# Maybe compile the compilers with -fPIE or -fPIC. ++COMPILER += $(PICFLAG) + +-# Link with -no-pie since we compile the compiler with -fno-PIE. +-LINKER += $(NO_PIE_FLAG) ++# Link with -pie, or -no-pie, depending on the above. ++LINKER += $(LD_PICFLAG) + + # Like LINKER, but use a mutex for serializing front end links. + ifeq (@DO_LINK_MUTEX@,true) +@@ -1036,7 +1038,7 @@ RTL_SSA_H = $(PRETTY_PRINT_H) insn-config.h splay-tree-utils.h \ + # programs built during a bootstrap. + # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a + # cross compiler which does not use the native headers and libraries. +-INTERNAL_CFLAGS = -DIN_GCC $(PICFLAG) @CROSS@ ++INTERNAL_CFLAGS = -DIN_GCC @CROSS@ + + # This is the variable actually used when we compile. If you change this, + # you probably want to update BUILD_CFLAGS in configure.ac +@@ -1054,21 +1056,24 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ + ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) + + # This is the variable to use when using $(COMPILER). +-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) ++ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) $(PICFLAG) + + # This is the variable to use when using $(LINKER). +-ALL_LINKERFLAGS = $(ALL_CXXFLAGS) ++ALL_LINKERFLAGS = $(ALL_CXXFLAGS) $(LD_PICFLAG) + + # Build and host support libraries. + +-# Use the "pic" build of libiberty if --enable-host-shared, unless we are +-# building for mingw. ++# Use the "pic" build of libiberty if --enable-host-shared or --enable-host-pie, ++# unless we are building for mingw. + LIBIBERTY_PICDIR=$(if $(findstring mingw,$(target)),,pic) +-ifeq ($(enable_host_shared),yes) ++ifneq ($(enable_host_shared)$(enable_host_pie),) + LIBIBERTY = ../libiberty/$(LIBIBERTY_PICDIR)/libiberty.a +-BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a + else + LIBIBERTY = ../libiberty/libiberty.a ++endif ++ifeq ($(enable_host_shared),yes) ++BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a ++else + BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a + endif + +@@ -1153,6 +1158,8 @@ LANG_MAKEFRAGS = @all_lang_makefrags@ + # Used by gcc/jit/Make-lang.in + LD_VERSION_SCRIPT_OPTION = @ld_version_script_option@ + LD_SONAME_OPTION = @ld_soname_option@ ++@ENABLE_DARWIN_AT_RPATH_TRUE@DARWIN_RPATH = @rpath ++@ENABLE_DARWIN_AT_RPATH_FALSE@DARWIN_RPATH = ${libdir} + + # Flags to pass to recursive makes. + # CC is set by configure. +@@ -1942,9 +1949,12 @@ cs-tconfig.h: Makefile + $(SHELL) $(srcdir)/mkconfig.sh tconfig.h + + cs-tm.h: Makefile +- TARGET_CPU_DEFAULT="$(target_cpu_default)" \ +- HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ +- $(SHELL) $(srcdir)/mkconfig.sh tm.h ++@ENABLE_DARWIN_AT_RPATH_FALSE@ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ ++@ENABLE_DARWIN_AT_RPATH_FALSE@ HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ ++@ENABLE_DARWIN_AT_RPATH_FALSE@ $(SHELL) $(srcdir)/mkconfig.sh tm.h ++@ENABLE_DARWIN_AT_RPATH_TRUE@ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ HEADERS="$(tm_include_list)" DEFINES="$(tm_defines) DARWIN_AT_RPATH=1" \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ $(SHELL) $(srcdir)/mkconfig.sh tm.h + + cs-tm_p.h: Makefile + TARGET_CPU_DEFAULT="" \ +@@ -4116,6 +4126,9 @@ site.exp: ./config.status Makefile + echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./site.tmp; \ + else true; \ + fi ++ @if test "X@ENABLE_DARWIN_AT_RPATH_TRUE@" != "X#" ; then \ ++ echo "set ENABLE_DARWIN_AT_RPATH 1" >> ./site.tmp; \ ++ fi + @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./site.tmp + @cat ./site.tmp > site.exp + @cat site.bak | sed \ +diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 +index 6be36df5190..126e09bbcd1 100644 +--- a/gcc/aclocal.m4 ++++ b/gcc/aclocal.m4 +@@ -12,6 +12,56 @@ + # PARTICULAR PURPOSE. + + m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) ++# AM_CONDITIONAL -*- Autoconf -*- ++ ++# Copyright (C) 1997-2017 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# AM_CONDITIONAL(NAME, SHELL-CONDITION) ++# ------------------------------------- ++# Define a conditional. ++AC_DEFUN([AM_CONDITIONAL], ++[AC_PREREQ([2.52])dnl ++ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ++ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ++AC_SUBST([$1_TRUE])dnl ++AC_SUBST([$1_FALSE])dnl ++_AM_SUBST_NOTMAKE([$1_TRUE])dnl ++_AM_SUBST_NOTMAKE([$1_FALSE])dnl ++m4_define([_AM_COND_VALUE_$1], [$2])dnl ++if $2; then ++ $1_TRUE= ++ $1_FALSE='#' ++else ++ $1_TRUE='#' ++ $1_FALSE= ++fi ++AC_CONFIG_COMMANDS_PRE( ++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ++ AC_MSG_ERROR([[conditional "$1" was never defined. ++Usually this means the macro was only invoked conditionally.]]) ++fi])]) ++ ++# Copyright (C) 2006-2017 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# _AM_SUBST_NOTMAKE(VARIABLE) ++# --------------------------- ++# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. ++# This macro is traced by Automake. ++AC_DEFUN([_AM_SUBST_NOTMAKE]) ++ ++# AM_SUBST_NOTMAKE(VARIABLE) ++# -------------------------- ++# Public sister of _AM_SUBST_NOTMAKE. ++AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) ++ + m4_include([../libtool.m4]) + m4_include([../ltoptions.m4]) + m4_include([../ltsugar.m4]) +diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl +index aaf853e3a2a..b20218310f3 100644 +--- a/gcc/ada/Makefile.rtl ++++ b/gcc/ada/Makefile.rtl +@@ -2822,6 +2822,15 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),) + TOOLS_TARGET_PAIRS = indepsw.adbname)) ++ return true; ++ return false; ++} ++ + /* Verify that argument value POS at position ARGNO to attribute NAME + applied to function TYPE refers to a function parameter at position + POS and the expected type CODE. Treat CODE == INTEGER_TYPE as +diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc +index 94bef24220b..867cf15412b 100644 +--- a/gcc/c-family/c-common.cc ++++ b/gcc/c-family/c-common.cc +@@ -309,6 +309,44 @@ const struct fname_var_t fname_vars[] = + {NULL, 0, 0}, + }; + ++/* Flags to restrict availability of generic features that ++ are known to __has_{feature,extension}. */ ++ ++enum ++{ ++ HF_FLAG_NONE = 0, ++ HF_FLAG_EXT = 1, /* Available only as an extension. */ ++ HF_FLAG_SANITIZE = 2, /* Availability depends on sanitizer flags. */ ++}; ++ ++/* Info for generic features which can be queried through ++ __has_{feature,extension}. */ ++ ++struct hf_feature_info ++{ ++ const char *ident; ++ unsigned flags; ++ unsigned mask; ++}; ++ ++/* Table of generic features which can be queried through ++ __has_{feature,extension}. */ ++ ++static constexpr hf_feature_info has_feature_table[] = ++{ ++ { "address_sanitizer", HF_FLAG_SANITIZE, SANITIZE_ADDRESS }, ++ { "thread_sanitizer", HF_FLAG_SANITIZE, SANITIZE_THREAD }, ++ { "leak_sanitizer", HF_FLAG_SANITIZE, SANITIZE_LEAK }, ++ { "hwaddress_sanitizer", HF_FLAG_SANITIZE, SANITIZE_HWADDRESS }, ++ { "undefined_behavior_sanitizer", HF_FLAG_SANITIZE, SANITIZE_UNDEFINED }, ++ { "attribute_deprecated_with_message", HF_FLAG_NONE, 0 }, ++ { "attribute_unavailable_with_message", HF_FLAG_NONE, 0 }, ++ { "enumerator_attributes", HF_FLAG_NONE, 0 }, ++ { "tls", HF_FLAG_NONE, 0 }, ++ { "gnu_asm_goto_with_outputs", HF_FLAG_EXT, 0 }, ++ { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 } ++}; ++ + /* Global visibility options. */ + struct visibility_flags visibility_options; + +@@ -9486,4 +9524,63 @@ c_common_finalize_early_debug (void) + (*debug_hooks->early_global_decl) (cnode->decl); + } + ++/* Map from identifiers to booleans. Value is true for features, and ++ false for extensions. Used to implement __has_{feature,extension}. */ ++ ++using feature_map_t = hash_map ; ++static feature_map_t *feature_map; ++ ++/* Register a feature for __has_{feature,extension}. FEATURE_P is true ++ if the feature identified by NAME is a feature (as opposed to an ++ extension). */ ++ ++void ++c_common_register_feature (const char *name, bool feature_p) ++{ ++ bool dup = feature_map->put (get_identifier (name), feature_p); ++ gcc_checking_assert (!dup); ++} ++ ++/* Lazily initialize hash table for __has_{feature,extension}, ++ dispatching to the appropriate front end to register language-specific ++ features. */ ++ ++static void ++init_has_feature () ++{ ++ gcc_checking_assert (!feature_map); ++ feature_map = new feature_map_t; ++ ++ for (unsigned i = 0; i < ARRAY_SIZE (has_feature_table); i++) ++ { ++ const hf_feature_info *info = has_feature_table + i; ++ ++ if ((info->flags & HF_FLAG_SANITIZE) && !(flag_sanitize & info->mask)) ++ continue; ++ ++ const bool feature_p = !(info->flags & HF_FLAG_EXT); ++ c_common_register_feature (info->ident, feature_p); ++ } ++ ++ /* Register language-specific features. */ ++ c_family_register_lang_features (); ++} ++ ++/* If STRICT_P is true, evaluate __has_feature (IDENT). ++ Otherwise, evaluate __has_extension (IDENT). */ ++ ++bool ++has_feature_p (const char *ident, bool strict_p) ++{ ++ if (!feature_map) ++ init_has_feature (); ++ ++ tree name = canonicalize_attr_name (get_identifier (ident)); ++ bool *feat_p = feature_map->get (name); ++ if (!feat_p) ++ return false; ++ ++ return !strict_p || *feat_p; ++} ++ + #include "gt-c-family-c-common.h" +diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h +index 3d5b9c40e6b..dff0d14ecb2 100644 +--- a/gcc/c-family/c-common.h ++++ b/gcc/c-family/c-common.h +@@ -1068,6 +1068,14 @@ extern bool c_cpp_diagnostic (cpp_reader *, enum cpp_diagnostic_level, + ATTRIBUTE_GCC_DIAG(5,0); + extern int c_common_has_attribute (cpp_reader *, bool); + extern int c_common_has_builtin (cpp_reader *); ++extern int c_common_has_feature (cpp_reader *, bool); ++ ++/* Implemented by each front end in *-lang.cc. */ ++extern void c_family_register_lang_features (); ++ ++/* Implemented in c-family/c-common.cc. */ ++extern void c_common_register_feature (const char *, bool); ++extern bool has_feature_p (const char *, bool); + + extern bool parse_optimize_options (tree, bool); + +@@ -1470,6 +1478,7 @@ extern void warn_for_multistatement_macros (location_t, location_t, + /* In c-attribs.cc. */ + extern bool attribute_takes_identifier_p (const_tree); + extern tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); ++extern bool attribute_clang_form_p (const_tree); + extern tree handle_unused_attribute (tree *, tree, tree, int, bool *); + extern tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *); + extern int parse_tm_stmt_attr (tree, int); +diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc +index bd48bfc88e0..62a41f334dd 100644 +--- a/gcc/c-family/c-lex.cc ++++ b/gcc/c-family/c-lex.cc +@@ -82,6 +82,7 @@ init_c_lex (void) + cb->read_pch = c_common_read_pch; + cb->has_attribute = c_common_has_attribute; + cb->has_builtin = c_common_has_builtin; ++ cb->has_feature = c_common_has_feature; + cb->get_source_date_epoch = cb_get_source_date_epoch; + cb->get_suggestion = cb_get_suggestion; + cb->remap_filename = remap_macro_filename; +@@ -441,16 +442,16 @@ c_common_has_attribute (cpp_reader *pfile, bool std_syntax) + return result; + } + +-/* Callback for has_builtin. */ ++/* Helper for __has_{builtin,feature,extension}. */ + +-int +-c_common_has_builtin (cpp_reader *pfile) ++static const char * ++c_common_lex_availability_macro (cpp_reader *pfile, const char *builtin) + { + const cpp_token *token = get_token_no_padding (pfile); + if (token->type != CPP_OPEN_PAREN) + { + cpp_error (pfile, CPP_DL_ERROR, +- "missing '(' after \"__has_builtin\""); ++ "missing '(' after \"__has_%s\"", builtin); + return 0; + } + +@@ -470,7 +471,7 @@ c_common_has_builtin (cpp_reader *pfile) + else + { + cpp_error (pfile, CPP_DL_ERROR, +- "macro \"__has_builtin\" requires an identifier"); ++ "macro \"__has_%s\" requires an identifier", builtin); + if (token->type == CPP_CLOSE_PAREN) + return 0; + } +@@ -489,9 +490,38 @@ c_common_has_builtin (cpp_reader *pfile) + break; + } + ++ return name; ++} ++ ++/* Callback for has_builtin. */ ++ ++int ++c_common_has_builtin (cpp_reader *pfile) ++{ ++ const char *name = c_common_lex_availability_macro (pfile, "builtin"); ++ if (!name) ++ return 0; ++ + return names_builtin_p (name); + } + ++/* Callback for has_feature. STRICT_P is true for has_feature and false ++ for has_extension. */ ++ ++int ++c_common_has_feature (cpp_reader *pfile, bool strict_p) ++{ ++ const char *builtin = strict_p ? "feature" : "extension"; ++ const char *name = c_common_lex_availability_macro (pfile, builtin); ++ if (!name) ++ return 0; ++ ++ /* If -pedantic-errors is given, __has_extension is equivalent to ++ __has_feature. */ ++ strict_p |= flag_pedantic_errors; ++ return has_feature_p (name, strict_p); ++} ++ + + /* Read a token and return its type. Fill *VALUE with its value, if + applicable. Fill *CPP_FLAGS with the token's flags, if it is +@@ -523,6 +553,21 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, + + case CPP_NUMBER: + { ++ /* If the user wants number-like entities to be returned as a raw ++ string, then don't try to classify them, which emits unwanted ++ diagnostics. */ ++ if (lex_flags & C_LEX_NUMBER_AS_STRING) ++ { ++ /* build_string adds a trailing NUL at [len]. */ ++ tree num_string = build_string (tok->val.str.len + 1, ++ (const char *) tok->val.str.text); ++ TREE_TYPE (num_string) = char_array_type_node; ++ *value = num_string; ++ /* We will effectively note this as CPP_N_INVALID, because we ++ made no checks here. */ ++ break; ++ } ++ + const char *suffix = NULL; + unsigned int flags = cpp_classify_number (parse_in, tok, &suffix, *loc); + +diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc +index a341a061758..b584a05c935 100644 +--- a/gcc/c-family/c-opts.cc ++++ b/gcc/c-family/c-opts.cc +@@ -1068,7 +1068,7 @@ c_common_post_options (const char **pfilename) + + if (flag_extern_tls_init) + { +- if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK) ++ if (!SUPPORTS_WEAK) + { + /* Lazy TLS initialization for a variable in another TU requires + alias and weak reference support. */ +diff --git a/gcc/c-family/c-ppoutput.cc b/gcc/c-family/c-ppoutput.cc +index 9de46a9655f..9aa8aeadf9c 100644 +--- a/gcc/c-family/c-ppoutput.cc ++++ b/gcc/c-family/c-ppoutput.cc +@@ -152,6 +152,7 @@ init_pp_output (FILE *out_stream) + + cb->has_attribute = c_common_has_attribute; + cb->has_builtin = c_common_has_builtin; ++ cb->has_feature = c_common_has_feature; + cb->get_source_date_epoch = cb_get_source_date_epoch; + cb->remap_filename = remap_macro_filename; + +diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h +index 54864c2ec41..78bb5fe2943 100644 +--- a/gcc/c-family/c-pragma.h ++++ b/gcc/c-family/c-pragma.h +@@ -256,6 +256,9 @@ extern enum cpp_ttype pragma_lex (tree *, location_t *loc = NULL); + #define C_LEX_STRING_NO_JOIN 2 /* Do not concatenate strings + nor translate them into execution + character set. */ ++#define C_LEX_NUMBER_AS_STRING 4 /* Do not classify a number, but ++ instead return it as a raw ++ string. */ + + /* This is not actually available to pragma parsers. It's merely a + convenient location to declare this function for c-lex, after +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 07da40ef43b..d2c4700e1b6 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1443,6 +1443,10 @@ Wsubobject-linkage + C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1) + Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage. + ++Welaborated-enum-base ++C++ ObjC++ Var(warn_elaborated_enum_base) Warning Init(1) ++Warn if an additional enum-base is used in an elaborated-type-specifier. ++ + Wduplicate-decl-specifier + C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall) + Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier. +@@ -1885,7 +1889,7 @@ Implement resolution of DR 150 for matching of template template arguments. + + fnext-runtime + ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime) +-Generate code for NeXT (Apple Mac OS X) runtime environment. ++Generate code for NeXT (Apple macOS) runtime environment. + + fnil-receivers + ObjC ObjC++ Var(flag_nil_receivers) Init(1) +diff --git a/gcc/c/c-lang.cc b/gcc/c/c-lang.cc +index eecc0a07137..72b5962dbf2 100644 +--- a/gcc/c/c-lang.cc ++++ b/gcc/c/c-lang.cc +@@ -49,6 +49,15 @@ enum c_language_kind c_language = clk_c; + /* Each front end provides its own lang hook initializer. */ + struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + ++/* Implement c-family hook to register language-specific features for ++ __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ c_register_features (); ++} ++ + #if CHECKING_P + + namespace selftest { +diff --git a/gcc/c/c-objc-common.cc b/gcc/c/c-objc-common.cc +index cba01f4d5f3..ecf3a9628f1 100644 +--- a/gcc/c/c-objc-common.cc ++++ b/gcc/c/c-objc-common.cc +@@ -34,6 +34,38 @@ along with GCC; see the file COPYING3. If not see + static bool c_tree_printer (pretty_printer *, text_info *, const char *, + int, bool, bool, bool, bool *, const char **); + ++/* Info for C language features which can be queried through ++ __has_{feature,extension}. */ ++ ++struct c_feature_info ++{ ++ const char *ident; ++ const int *enable_flag; ++}; ++ ++static const c_feature_info c_feature_table[] = ++{ ++ { "c_alignas", &flag_isoc11 }, ++ { "c_alignof", &flag_isoc11 }, ++ { "c_atomic", &flag_isoc11 }, ++ { "c_generic_selections", &flag_isoc11 }, ++ { "c_static_assert", &flag_isoc11 }, ++ { "c_thread_local", &flag_isoc11 } ++}; ++ ++/* Register features specific to the C language. */ ++ ++void ++c_register_features () ++{ ++ for (unsigned i = 0; i < ARRAY_SIZE (c_feature_table); i++) ++ { ++ const c_feature_info *info = c_feature_table + i; ++ const bool feat_p = !info->enable_flag || *info->enable_flag; ++ c_common_register_feature (info->ident, feat_p); ++ } ++} ++ + bool + c_missing_noreturn_ok_p (tree decl) + { +diff --git a/gcc/c/c-objc-common.h b/gcc/c/c-objc-common.h +index 0b60df9750f..6d2f2dd8a09 100644 +--- a/gcc/c/c-objc-common.h ++++ b/gcc/c/c-objc-common.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_C_OBJC_COMMON + #define GCC_C_OBJC_COMMON + ++/* Implemented in c-objc-common.cc. */ ++extern void c_register_features (); ++ + /* Lang hooks that are shared between C and ObjC are defined here. Hooks + specific to C or ObjC go in c-lang.cc and objc/objc-lang.cc, respectively. */ + +diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc +index 78a313fe31e..cf423a964ee 100644 +--- a/gcc/c/c-parser.cc ++++ b/gcc/c/c-parser.cc +@@ -202,6 +202,9 @@ struct GTY(()) c_parser { + should translate them to the execution character set (false + inside attributes). */ + BOOL_BITFIELD translate_strings_p : 1; ++ /* True if we want to lex arbitrary number-like sequences as their ++ string representation. */ ++ BOOL_BITFIELD lex_number_as_string : 1; + + /* Objective-C specific parser/lexer information. */ + +@@ -276,10 +279,10 @@ c_lex_one_token (c_parser *parser, c_token *token, bool raw = false) + + if (raw || vec_safe_length (parser->raw_tokens) == 0) + { ++ int lex_flags = parser->lex_joined_string ? 0 : C_LEX_STRING_NO_JOIN; ++ lex_flags |= parser->lex_number_as_string ? C_LEX_NUMBER_AS_STRING : 0; + token->type = c_lex_with_flags (&token->value, &token->location, +- &token->flags, +- (parser->lex_joined_string +- ? 0 : C_LEX_STRING_NO_JOIN)); ++ &token->flags, lex_flags); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; +@@ -4561,6 +4564,88 @@ c_parser_gnu_attribute_any_word (c_parser *parser) + return attr_name; + } + ++/* Handle parsing clang-form attribute arguments, where we need to adjust ++ the parsing rules to relate to a specific attribute. */ ++ ++static tree ++c_parser_clang_attribute_arguments (c_parser *parser, tree /*attr_id*/) ++{ ++ /* We can, if required, alter the parsing on the basis of the attribute. ++ At present, we handle the availability attr, where ach entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ tree attr_args = NULL_TREE; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ if (c_parser_next_token_is (parser, CPP_NAME) ++ && c_parser_peek_token (parser)->id_kind == C_ID_ID) ++ { ++ name = c_parser_peek_token (parser)->value; ++ c_parser_consume_token (parser); ++ } ++ else if (c_parser_next_token_is (parser, CPP_COMMA)) ++ name = error_mark_node; /* Comma handled below. */ ++ else ++ { ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected an attribute keyword"); ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_EQ)) ++ { ++ c_parser_consume_token (parser); /* eat the '=' */ ++ /* We need to bludgeon the lexer into not trying to interpret the ++ xx.yy.zz form, since that just looks like a malformed float. ++ Also, as a result of macro processing, we can have strig literals ++ that are in multiple pieces so, for this specific part of the ++ parse, we need to join strings. */ ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ /* So look at the next token, expecting a string, or something that ++ looks initially like a number, but might be a version number. */ ++ c_parser_peek_token (parser); ++ /* Done with the funky number parsing. */ ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ value = c_parser_peek_token (parser)->value; ++ /* ???: check for error mark and early-return? */ ++ c_parser_consume_token (parser); ++ } ++ /* else value is absent. */ ++ } ++ else if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected %<,%> or %<=%>"); ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_COMMA)) ++ c_parser_consume_token (parser); /* Just skip the comma. */ ++ tree t = tree_cons (value, name, NULL); ++ if (!attr_args) ++ attr_args = t; ++ else ++ chainon (attr_args, t); ++ } while (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN)); ++ return attr_args; ++} ++ + /* Parse attribute arguments. This is a common form of syntax + covering all currently valid GNU and standard attributes. + +@@ -4707,9 +4792,13 @@ c_parser_gnu_attribute (c_parser *parser, tree attrs, + attrs = chainon (attrs, attr); + return attrs; + } +- c_parser_consume_token (parser); ++ c_parser_consume_token (parser); /* The '('. */ + +- tree attr_args ++ tree attr_args; ++ if (attribute_clang_form_p (attr_name)) ++ attr_args = c_parser_clang_attribute_arguments (parser, attr_name); ++ else ++ attr_args + = c_parser_attribute_arguments (parser, + attribute_takes_identifier_p (attr_name), + false, true); +diff --git a/gcc/calls.cc b/gcc/calls.cc +index 4d0bc45be28..95463b14d23 100644 +--- a/gcc/calls.cc ++++ b/gcc/calls.cc +@@ -1355,7 +1355,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + with those made by function.cc. */ + + /* See if this argument should be passed by invisible reference. */ +- function_arg_info arg (type, argpos < n_named_args); ++ function_arg_info arg (type, argpos < n_named_args, ++ argpos == n_named_args - 1); + if (pass_by_reference (args_so_far_pnt, arg)) + { + const bool callee_copies +@@ -1475,10 +1476,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + + unsignedp = TYPE_UNSIGNED (type); + arg.type = type; +- arg.mode +- = promote_function_mode (type, TYPE_MODE (type), &unsignedp, +- fndecl ? TREE_TYPE (fndecl) : fntype, 0); +- ++ arg.mode = TYPE_MODE (type); ++// arg.mode ++// = promote_function_mode (type, TYPE_MODE (type), &unsignedp, ++// fndecl ? TREE_TYPE (fndecl) : fntype, 0); ++ arg.mode = promote_function_mode (args_so_far, arg, ++ fndecl ? TREE_TYPE (fndecl) : fntype, ++ &unsignedp, 0); + args[i].unsignedp = unsignedp; + args[i].mode = arg.mode; + +@@ -1528,6 +1532,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + #endif + reg_parm_stack_space, + args[i].pass_on_stack ? 0 : args[i].partial, ++ args_so_far, + fndecl, args_size, &args[i].locate); + #ifdef BLOCK_REG_PADDING + else +@@ -4030,6 +4035,7 @@ split_complex_types (tree types) + return types; + } + ++extern void debug_tree (tree); + /* Output a library call to function ORGFUN (a SYMBOL_REF rtx) + for a value of mode OUTMODE, + with NARGS different arguments, passed as ARGS. +@@ -4215,6 +4221,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, 0, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + + if (argvec[count].reg == 0 || argvec[count].partial != 0 +@@ -4285,8 +4292,16 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + val = force_operand (XEXP (slot, 0), NULL_RTX); + } + +- arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, +- NULL_TREE, 0); ++// arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, ++// NULL_TREE, 0); ++ tree t = arg.type; ++if (t) ++ debug_tree (t); ++gcc_assert (!t); ++ arg.type = NULL_TREE; ++ arg.mode = promote_function_mode (args_so_far, arg, NULL_TREE, ++ &unsigned_p, 0); ++ arg.type = t; + argvec[count].mode = arg.mode; + argvec[count].value = convert_modes (arg.mode, GET_MODE (val), val, + unsigned_p); +@@ -4306,6 +4321,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, argvec[count].partial, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + args_size.constant += argvec[count].locate.size.constant; + gcc_assert (!argvec[count].locate.size.var); +diff --git a/gcc/calls.h b/gcc/calls.h +index fd7836e481d..a2a4f85e23e 100644 +--- a/gcc/calls.h ++++ b/gcc/calls.h +@@ -35,24 +35,43 @@ class function_arg_info + { + public: + function_arg_info () +- : type (NULL_TREE), mode (VOIDmode), named (false), ++ : type (NULL_TREE), mode (VOIDmode), named (false), last_named (false), + pass_by_reference (false) + {} + + /* Initialize an argument of mode MODE, either before or after promotion. */ + function_arg_info (machine_mode mode, bool named) +- : type (NULL_TREE), mode (mode), named (named), pass_by_reference (false) ++ : type (NULL_TREE), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ function_arg_info (machine_mode mode, bool named, bool last_named) ++ : type (NULL_TREE), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Initialize an unpromoted argument of type TYPE. */ + function_arg_info (tree type, bool named) +- : type (type), mode (TYPE_MODE (type)), named (named), ++ : type (type), mode (TYPE_MODE (type)), named (named), last_named (false), + pass_by_reference (false) + {} + ++ /* Initialize an unpromoted argument of type TYPE. */ ++ function_arg_info (tree type, bool named, bool last_named) ++ : type (type), mode (TYPE_MODE (type)), named (named), ++ last_named (last_named), pass_by_reference (false) ++ {} ++ + /* Initialize an argument with explicit properties. */ + function_arg_info (tree type, machine_mode mode, bool named) +- : type (type), mode (mode), named (named), pass_by_reference (false) ++ : type (type), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ /* Initialize an argument with explicit properties. */ ++ function_arg_info (tree type, machine_mode mode, bool named, bool last_named) ++ : type (type), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Return true if the gimple-level type is an aggregate. */ +@@ -105,6 +124,9 @@ public: + "..."). See also TARGET_STRICT_ARGUMENT_NAMING. */ + unsigned int named : 1; + ++ /* True if this is the last named argument. */ ++ unsigned int last_named : 1; ++ + /* True if we have decided to pass the argument by reference, in which case + the function_arg_info describes a pointer to the original argument. */ + unsigned int pass_by_reference : 1; +diff --git a/gcc/collect2.cc b/gcc/collect2.cc +index d81c7f28f16..d5af65def40 100644 +--- a/gcc/collect2.cc ++++ b/gcc/collect2.cc +@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3. If not see + In a cross-compiler, this means you need a cross nm, + but that is not quite as unpleasant as special headers. */ + +-#if !defined (OBJECT_FORMAT_COFF) ++#if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_MACHO) + #define OBJECT_FORMAT_NONE + #endif + +@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see + + #endif /* OBJECT_FORMAT_COFF */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Default flags to pass to nm. */ + #ifndef NM_FLAGS +@@ -525,7 +525,7 @@ static const char *const target_machine = TARGET_MACHINE; + + Return 0 if not found, otherwise return its name, allocated with malloc. */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Add an entry for the object file NAME to object file list LIST. + New entries are added at the end of the list. The original pointer +@@ -764,6 +764,12 @@ do_link (char **ld_argv, const char *atsuffix) + } + } + ++#if defined (OBJECT_FORMAT_MACHO) ++# define LLD_NAME "ld64.lld" ++#else ++# define LLD_NAME "ld.lld" ++#endif ++ + /* Main program. */ + + int +@@ -777,16 +783,19 @@ main (int argc, char **argv) + USE_BFD_LD, + USE_LLD_LD, + USE_MOLD_LD, ++ USE_CLASSIC_LD, + USE_LD_MAX + } selected_linker = USE_DEFAULT_LD; ++ + static const char *const ld_suffixes[USE_LD_MAX] = + { + "ld", + PLUGIN_LD_SUFFIX, + "ld.gold", + "ld.bfd", +- "ld.lld", +- "ld.mold" ++ LLD_NAME, ++ "ld.mold", ++ "ld-classic" + }; + static const char *const real_ld_suffix = "real-ld"; + static const char *const collect_ld_suffix = "collect-ld"; +@@ -953,14 +962,22 @@ main (int argc, char **argv) + if (selected_linker == USE_DEFAULT_LD) + selected_linker = USE_PLUGIN_LD; + } ++#if !defined (OBJECT_FORMAT_MACHO) + else if (strcmp (argv[i], "-fuse-ld=bfd") == 0) + selected_linker = USE_BFD_LD; + else if (strcmp (argv[i], "-fuse-ld=gold") == 0) + selected_linker = USE_GOLD_LD; ++#endif + else if (strcmp (argv[i], "-fuse-ld=lld") == 0) + selected_linker = USE_LLD_LD; + else if (strcmp (argv[i], "-fuse-ld=mold") == 0) + selected_linker = USE_MOLD_LD; ++#if defined (OBJECT_FORMAT_MACHO) ++ else if (strcmp (argv[i], "-fuse-ld=classic") == 0) ++ selected_linker = USE_CLASSIC_LD; ++#endif ++ else if (strcmp (argv[i], "-fuse-ld=") == 0) ++ selected_linker = USE_DEFAULT_LD; + else if (startswith (argv[i], "-o")) + { + /* Parse the output filename if it's given so that we can make +@@ -1052,7 +1069,8 @@ main (int argc, char **argv) + ld_file_name = 0; + #ifdef DEFAULT_LINKER + if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || +- selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD) ++ selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD || ++ selected_linker == USE_CLASSIC_LD) + { + char *linker_name; + # ifdef HOST_EXECUTABLE_SUFFIX +@@ -2266,7 +2284,7 @@ write_aix_file (FILE *stream, struct id *list) + } + #endif + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Check to make sure the file is an LTO object file. */ + +diff --git a/gcc/common.opt b/gcc/common.opt +index 8a0dafc522d..fdcfdebd1fb 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -2733,6 +2733,10 @@ fstack-usage + Common RejectNegative Var(flag_stack_usage) + Output stack usage information on a per-function basis. + ++fstack-use-cumulative-args ++Common RejectNegative Var(flag_stack_use_cumulative_args) Init(STACK_USE_CUMULATIVE_ARGS_INIT) ++Use cumulative args-based stack layout hooks. ++ + fstrength-reduce + Common Ignore + Does nothing. Preserved for backward compatibility. +@@ -2801,10 +2805,25 @@ Common Var(flag_tracer) Optimization + Perform superblock formation via tail duplication. + + ftrampolines +-Common Var(flag_trampolines) Init(0) ++Common Var(flag_trampolines) Init(HEAP_TRAMPOLINES_INIT) + For targets that normally need trampolines for nested functions, always + generate them instead of using descriptors. + ++ftrampoline-impl= ++Common Joined RejectNegative Enum(trampoline_impl) Var(flag_trampoline_impl) Init(HEAP_TRAMPOLINES_INIT ? TRAMPOLINE_IMPL_HEAP : TRAMPOLINE_IMPL_STACK) ++Whether trampolines are generated in executable memory rather than ++executable stack. ++ ++Enum ++Name(trampoline_impl) Type(enum trampoline_impl) UnknownError(unknown trampoline implementation %qs) ++ ++EnumValue ++Enum(trampoline_impl) String(stack) Value(TRAMPOLINE_IMPL_STACK) ++ ++EnumValue ++Enum(trampoline_impl) String(heap) Value(TRAMPOLINE_IMPL_HEAP) ++ ++ + ; Zero means that floating-point math operations cannot generate a + ; (user-visible) trap. This is the case, for example, in nonstop + ; IEEE 754 arithmetic. +@@ -3058,6 +3077,10 @@ fuse-ld=mold + Common Driver Negative(fuse-ld=mold) + Use the Modern linker (MOLD) linker instead of the default linker. + ++fuse-ld=classic ++Common Driver Negative(fuse-ld=classic) ++Use the ld-classic linker instead of the default linker. ++ + fuse-linker-plugin + Common Undocumented Var(flag_use_linker_plugin) + +diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc +index dfda5b8372a..074557edd50 100644 +--- a/gcc/common/config/aarch64/aarch64-common.cc ++++ b/gcc/common/config/aarch64/aarch64-common.cc +@@ -421,6 +421,7 @@ aarch64_get_extension_string_for_isa_flags (uint64_t isa_flags, + we just mask all default bits away at the end. */ + isa_flag_bits &= ~default_arch_flags; + ++#ifndef DISABLE_AARCH64_AS_CRC_BUGFIX + /* We now have the smallest set of features we need to process. A subsequent + linear scan of the bits in isa_flag_bits will allow us to print the ext + names. However as a special case if CRC was enabled before, always print +@@ -432,6 +433,7 @@ aarch64_get_extension_string_for_isa_flags (uint64_t isa_flags, + issue, so we don't need this fix when targeting Armv8-R. */ + if ((isa_flags & AARCH64_ISA_CRC) && !AARCH64_ISA_V8_R) + isa_flag_bits |= AARCH64_ISA_CRC; ++#endif + + /* Pass Two: + Print the option names that we're sure we must turn on. These are only +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 5c378c698ff..196225955ba 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1089,6 +1089,26 @@ case ${target} in + ;; + esac + ++# Figure out if we need to enable heap trampolines ++# and variadic functions handling. ++case ${target} in ++aarch64*-*-darwin2*) ++ # This applies to arm64 Darwin variadic funtions. ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=1" ++ # Executable stack is forbidden. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; ++*-*-darwin2*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" ++ # Currently, we do this for macOS 11 and above. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; ++*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" ++ ;; ++esac ++ + case ${target} in + aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h" +@@ -1127,6 +1147,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + ;; ++aarch64-*-darwin*) ++ tm_file="${tm_file} aarch64/aarch64-errata.h" ++ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-darwin" ++ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" ++ tm_defines="${tm_defines} DISABLE_AARCH64_AS_CRC_BUGFIX=1" ++ # Choose a default CPU version that will work for all current releases. ++ with_cpu=${with_cpu:-apple-m1} ++ ;; + aarch64*-*-freebsd*) + tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h" +@@ -4177,8 +4205,8 @@ case "${target}" in + fi + for which in cpu arch tune; do + eval "val=\$with_$which" +- base_val=`echo $val | sed -e 's/\+.*//'` +- ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'` ++ base_val=`echo $val | sed -E -e 's/\+.*//'` ++ ext_val=`echo $val | sed -E -e 's/[a-z0-9.-]+//'` + + if [ $which = arch ]; then + def=aarch64-arches.def +@@ -4237,9 +4265,9 @@ case "${target}" in + + while [ x"$ext_val" != x ] + do +- ext_val=`echo $ext_val | sed -e 's/\+//'` +- ext=`echo $ext_val | sed -e 's/\+.*//'` +- base_ext=`echo $ext | sed -e 's/^no//'` ++ ext_val=`echo $ext_val | sed -E -e 's/\+//'` ++ ext=`echo $ext_val | sed -E -e 's/\+.*//'` ++ base_ext=`echo $ext | sed -E -e 's/^no//'` + opt_line=`echo -e "$options_parsed" | \ + grep "^\"$base_ext\""` + +@@ -4268,7 +4296,7 @@ case "${target}" in + echo "Unknown extension used in --with-$which=$val" 1>&2 + exit 1 + fi +- ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'` ++ ext_val=`echo $ext_val | sed -E -e 's/[a-z0-9]+//'` + done + + ext_mask="(("$ext_mask") << TARGET_CPU_NBITS)" +diff --git a/gcc/config.in b/gcc/config.in +index 52f496ca5de..80dfff17b74 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -49,6 +49,19 @@ + #endif + + ++/* Specify a runpath directory, additional to those provided by the compiler ++ */ ++#ifndef USED_FOR_TARGET ++#undef DARWIN_ADD_RPATH ++#endif ++ ++ ++/* Should add an extra runpath directory */ ++#ifndef USED_FOR_TARGET ++#undef DARWIN_DO_EXTRA_RPATH ++#endif ++ ++ + /* Define to enable the use of a default assembler. */ + #ifndef USED_FOR_TARGET + #undef DEFAULT_ASSEMBLER +@@ -628,15 +641,13 @@ + #endif + + +-/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false. +- */ ++/* Define if your macOS assembler supports -mllvm -x86-pad-for-align=false. */ + #ifndef USED_FOR_TARGET + #undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN + #endif + + +-/* Define if your Mac OS X assembler supports the -mmacos-version-min option. +- */ ++/* Define if your macOS assembler supports the -mmacos-version-min option. */ + #ifndef USED_FOR_TARGET + #undef HAVE_AS_MMACOSX_VERSION_MIN_OPTION + #endif +@@ -2250,6 +2261,12 @@ + #endif + + ++/* Define to 1 if ld64 supports '-demangle'. */ ++#ifndef USED_FOR_TARGET ++#undef LD64_HAS_DEMANGLE ++#endif ++ ++ + /* Define to 1 if ld64 supports '-export_dynamic'. */ + #ifndef USED_FOR_TARGET + #undef LD64_HAS_EXPORT_DYNAMIC +diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc +index 197b763658c..2f78fcf6b6c 100644 +--- a/gcc/config/aarch64/aarch64-builtins.cc ++++ b/gcc/config/aarch64/aarch64-builtins.cc +@@ -619,6 +619,8 @@ enum aarch64_builtins + AARCH64_RBIT, + AARCH64_RBITL, + AARCH64_RBITLL, ++ /* OS-specific */ ++ AARCH64_BUILTIN_CFSTRING, + AARCH64_BUILTIN_MAX + }; + +@@ -738,6 +740,9 @@ tree aarch64_fp16_ptr_type_node = NULL_TREE; + tree aarch64_bf16_type_node = NULL_TREE; + tree aarch64_bf16_ptr_type_node = NULL_TREE; + ++/* Pointer to __float128 on Mach-O, where the 128b float is not long double. */ ++tree aarch64_float128_ptr_type_node = NULL_TREE; ++ + /* Wrapper around add_builtin_function. NAME is the name of the built-in + function, TYPE is the function type, CODE is the function subcode + (relative to AARCH64_BUILTIN_GENERAL), and ATTRS is the function +@@ -1490,6 +1495,29 @@ aarch64_init_bf16_types (void) + aarch64_bf16_ptr_type_node = build_pointer_type (aarch64_bf16_type_node); + } + ++/* Initialize the backend REAL_TYPE type supporting __float128 on Mach-O, ++ as well as the related built-ins. */ ++static void ++aarch64_init_float128_types (void) ++{ ++ /* The __float128 type. The node has already been created as ++ _Float128, so for C we only need to register the __float128 name for ++ it. For C++, we create a distinct type which will mangle differently ++ (g) vs. _Float128 (DF128_) and behave backwards compatibly. */ ++ if (float128_type_node == NULL_TREE) ++ { ++ float128_type_node = make_node (REAL_TYPE); ++ TYPE_PRECISION (float128_type_node) ++ = TYPE_PRECISION (float128_type_node); ++ SET_TYPE_MODE (float128_type_node, TYPE_MODE (float128_type_node)); ++ layout_type (float128_type_node); ++ } ++ lang_hooks.types.register_builtin_type (float128_type_node, "__float128"); ++ ++ aarch64_float128_ptr_type_node = build_pointer_type (float128_type_node); ++} ++ ++ + /* Pointer authentication builtins that will become NOP on legacy platform. + Currently, these builtins are for internal use only (libgcc EH unwinder). */ + +@@ -1778,8 +1806,9 @@ aarch64_general_init_builtins (void) + aarch64_init_fpsr_fpcr_builtins (); + + aarch64_init_fp16_types (); +- + aarch64_init_bf16_types (); ++ if (TARGET_MACHO) ++ aarch64_init_float128_types (); + + { + aarch64_simd_switcher simd; +@@ -1816,6 +1845,14 @@ aarch64_general_init_builtins (void) + handle_arm_acle_h (); + } + ++void ++aarch64_init_subtarget_builtins (void) ++{ ++#ifdef SUBTARGET_INIT_BUILTINS ++ SUBTARGET_INIT_BUILTINS; ++#endif ++} ++ + /* Implement TARGET_BUILTIN_DECL for the AARCH64_BUILTIN_GENERAL group. */ + tree + aarch64_general_builtin_decl (unsigned code, bool) +diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc +index a4c407724a7..fdcb41b272e 100644 +--- a/gcc/config/aarch64/aarch64-c.cc ++++ b/gcc/config/aarch64/aarch64-c.cc +@@ -222,6 +222,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pfile) + { + aarch64_define_unconditional_macros (pfile); + aarch64_update_cpp_builtins (pfile); ++ ++ if (TARGET_MACHO) ++ { ++ builtin_define ("__builtin_copysignq=__builtin_copysignf128"); ++ builtin_define ("__builtin_fabsq=__builtin_fabsf128"); ++ builtin_define ("__builtin_huge_valq=__builtin_huge_valf128"); ++ builtin_define ("__builtin_infq=__builtin_inff128"); ++ builtin_define ("__builtin_nanq=__builtin_nanf128"); ++ builtin_define ("__builtin_nansq=__builtin_nansf128"); ++ } + } + + /* Hook to validate the current #pragma GCC target and set the state, and +@@ -370,4 +380,8 @@ aarch64_register_pragmas (void) + targetm.check_builtin_call = aarch64_check_builtin_call; + + c_register_pragma ("GCC", "aarch64", aarch64_pragma_aarch64); ++ ++#ifdef REGISTER_SUBTARGET_PRAGMAS ++ REGISTER_SUBTARGET_PRAGMAS (); ++#endif + } +diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def +index 956afa70714..ee2d8c57c1e 100644 +--- a/gcc/config/aarch64/aarch64-cores.def ++++ b/gcc/config/aarch64/aarch64-cores.def +@@ -161,6 +161,18 @@ AARCH64_CORE("cortex-a76.cortex-a55", cortexa76cortexa55, cortexa53, 8_2A, AAR + /* Armv8-R Architecture Processors. */ + AARCH64_CORE("cortex-r82", cortexr82, cortexa53, 8R, AARCH64_FL_FOR_ARCH8_R, cortexa53, 0x41, 0xd15, -1) + ++/* Apple (A12 and M) cores. ++ Apple implementer ID from xnu, ++ guesses for part #, guesses for scheduler ident, generic_armv8_a for costs. ++ A12 seems mostly 8.3, ++ M1 seems to be 8.4 + extras (see comments in option-extensions about f16fml), ++ M2 mostly 8.5 but with missing mandatory features. ++ M3 is pretty much the same as M2. */ ++AARCH64_CORE("apple-a12", applea12, cortexa53, 8_3A, AARCH64_FL_FOR_ARCH8_3, cortexa53, 0x61, 0x12, -1) ++AARCH64_CORE("apple-m1", applem1, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_F16 | AARCH64_FL_SB | AARCH64_FL_SSBS, cortexa73, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m2", applem2, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_I8MM | AARCH64_FL_BF16 | AARCH64_FL_F16 | AARCH64_FL_SB | AARCH64_FL_SSBS, cortexa73, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m3", applem3, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_I8MM | AARCH64_FL_BF16 | AARCH64_FL_F16 | AARCH64_FL_SB | AARCH64_FL_SSBS, cortexa73, 0x61, 0x23, -1) ++ + /* Armv9.0-A Architecture Processors. */ + + /* Arm ('A') cores. */ +diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h +index 9d99a021379..6d8dc45ea3d 100644 +--- a/gcc/config/aarch64/aarch64-protos.h ++++ b/gcc/config/aarch64/aarch64-protos.h +@@ -108,6 +108,14 @@ enum aarch64_symbol_type + SYMBOL_TLSLE24, + SYMBOL_TLSLE32, + SYMBOL_TLSLE48, ++ SYMBOL_MO_SMALL_ABS, ++ SYMBOL_MO_SMALL_PCR, ++ SYMBOL_MO_SMALL_GOT, ++ SYMBOL_MO_SMALL_TLS, ++ SYMBOL_MO_LARGE_ABS, ++ SYMBOL_MO_LARGE_PCR, ++ SYMBOL_MO_LARGE_GOT, ++ SYMBOL_MO_LARGE_TLS, + SYMBOL_FORCE_TO_MEM + }; + +@@ -763,6 +771,7 @@ void aarch64_post_cfi_startproc (void); + poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned); + int aarch64_get_condition_code (rtx); + bool aarch64_address_valid_for_prefetch_p (rtx, bool); ++bool aarch64_address_valid_for_unscaled_prefetch_p (rtx, bool); + bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode); + unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in); + unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in); +@@ -793,7 +802,11 @@ bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx); + bool aarch64_is_long_call_p (rtx); + bool aarch64_is_noplt_call_p (rtx); + bool aarch64_label_mentioned_p (rtx); ++#if TARGET_MACHO ++void aarch64_darwin_declare_function_name (FILE *, const char*, tree ); ++#else + void aarch64_declare_function_name (FILE *, const char*, tree); ++#endif + void aarch64_asm_output_alias (FILE *, const tree, const tree); + void aarch64_asm_output_external (FILE *, tree, const char*); + bool aarch64_legitimate_pic_operand_p (rtx); +@@ -990,6 +1003,7 @@ void aarch64_override_options_internal (struct gcc_options *); + + const char *aarch64_general_mangle_builtin_type (const_tree); + void aarch64_general_init_builtins (void); ++void aarch64_init_subtarget_builtins (void); + tree aarch64_general_fold_builtin (unsigned int, tree, unsigned int, tree *); + gimple *aarch64_general_gimple_fold_builtin (unsigned int, gcall *, + gimple_stmt_iterator *); +diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md +index 2c1852c8fe6..859c52d2289 100644 +--- a/gcc/config/aarch64/aarch64-tune.md ++++ b/gcc/config/aarch64/aarch64-tune.md +@@ -1,5 +1,5 @@ + ;; -*- buffer-read-only: t -*- + ;; Generated automatically by gentune.sh from aarch64-cores.def + (define_attr "tune" +- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa710,cortexx2,neoversen2,cobalt100,demeter,neoversev2" ++ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,applea12,applem1,applem2,applem3,cortexa510,cortexa710,cortexx2,neoversen2,cobalt100,demeter,neoversev2" + (const (symbol_ref "((enum attr_tune) aarch64_tune)"))) +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index f8082c4035e..ef13e465ccd 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -292,8 +292,10 @@ static bool aarch64_vfp_is_call_or_return_candidate (machine_mode, + const_tree, + machine_mode *, int *, + bool *, bool); ++#if !TARGET_MACHO + static void aarch64_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED; + static void aarch64_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED; ++#endif + static void aarch64_override_options_after_change (void); + static bool aarch64_vector_mode_supported_p (machine_mode); + static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool); +@@ -2786,6 +2788,9 @@ static const struct attribute_spec aarch64_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, + affects_type_identity, handler, exclude } */ ++#ifdef SUBTARGET_ATTRIBUTE_TABLE ++ SUBTARGET_ATTRIBUTE_TABLE, ++#endif + { "aarch64_vector_pcs", 0, 0, false, true, true, true, + handle_aarch64_vector_pcs_attribute, NULL }, + { "arm_sve_vector_bits", 1, 1, false, true, false, true, +@@ -4010,7 +4015,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode) + if (known_le (GET_MODE_SIZE (mode), 8)) + return true; + if (known_le (GET_MODE_SIZE (mode), 16)) +- return (regno & 1) == 0; ++ return (regno & 1) == 0 || TARGET_MACHO; /* darwinpcs D.4 */ + } + else if (FP_REGNUM_P (regno)) + { +@@ -4056,8 +4061,10 @@ static bool + aarch64_takes_arguments_in_sve_regs_p (const_tree fntype) + { + CUMULATIVE_ARGS args_so_far_v; ++ /* This does not apply to variadic functions, so all the (currently ++ uncounted) arguments must be named. */ + aarch64_init_cumulative_args (&args_so_far_v, NULL_TREE, NULL_RTX, +- NULL_TREE, 0, true); ++ NULL_TREE, -1, true); + cumulative_args_t args_so_far = pack_cumulative_args (&args_so_far_v); + + for (tree chain = TYPE_ARG_TYPES (fntype); +@@ -4542,6 +4549,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + switch (type) + { + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + { + /* In ILP32, the mode of dest can be either SImode or DImode. */ + rtx tmp_reg = dest; +@@ -4552,6 +4560,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + if (can_create_pseudo_p ()) + tmp_reg = gen_reg_rtx (mode); + ++ if (TARGET_MACHO) ++ { ++ rtx sym, off; ++ split_const (imm, &sym, &off); ++ /* Negative offsets don't work, whether by intention is TBD. */ ++ if (INTVAL (off) < 0 || INTVAL (off) > 8 * 1024 * 1024) ++ { ++ emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, sym)); ++ emit_insn (gen_add_losym (dest, tmp_reg, sym)); ++ /* FIXME: add the SI option if/when we support ilp32. */ ++ emit_insn (gen_adddi3 (dest, dest, off)); ++ return; ++ } ++ /* else small enough positive offset is OK. */ ++ } + emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, copy_rtx (imm))); + emit_insn (gen_add_losym (dest, tmp_reg, imm)); + return; +@@ -4635,6 +4658,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + return; + } + ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_SMALL_GOT_4G: + emit_insn (gen_rtx_SET (dest, imm)); + return; +@@ -6696,6 +6720,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + case SYMBOL_SMALL_TLSIE: + case SYMBOL_SMALL_GOT_28K: + case SYMBOL_SMALL_GOT_4G: ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_TINY_GOT: + case SYMBOL_TINY_TLSIE: + if (const_offset != 0) +@@ -6709,6 +6734,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + /* FALLTHRU */ + + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + case SYMBOL_TINY_ABSOLUTE: + case SYMBOL_TLSLE12: + case SYMBOL_TLSLE24: +@@ -7288,6 +7314,7 @@ aarch64_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) + gcc_unreachable (); + } + ++#if !TARGET_MACHO + static bool + aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + const_tree type, int *nregs) +@@ -7297,6 +7324,7 @@ aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + &pcum->aapcs_vfp_rmode, + nregs, NULL, pcum->silent_p); + } ++#endif + + /* Given MODE and TYPE of a function argument, return the alignment in + bits. The idea is to suppress any stronger alignment requested by +@@ -7316,7 +7344,7 @@ aarch64_function_arg_alignment (machine_mode mode, const_tree type, + if (integer_zerop (TYPE_SIZE (type))) + return 0; + +- gcc_assert (TYPE_MODE (type) == mode); ++ gcc_assert (TARGET_MACHO || TYPE_MODE (type) == mode); + + if (!AGGREGATE_TYPE_P (type)) + { +@@ -7402,6 +7430,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + gcc_assert (!alignment || abi_break < alignment); + + pcum->aapcs_arg_processed = true; ++ if (TARGET_MACHO) ++ { ++ /* Set suitable defaults for queries. */ ++ pcum->darwinpcs_arg_boundary ++ = aarch64_function_arg_alignment (mode, type, &abi_break); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ } + + pure_scalable_type_info pst_info; + if (type && pst_info.analyze_registers (type)) +@@ -7461,13 +7496,29 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* No frontends can create types with variable-sized modes, so we + shouldn't be asked to pass or return them. */ + size = GET_MODE_SIZE (mode).to_constant (); ++ ++ if (TARGET_MACHO) ++ /* Since we can pack things on the stack, we need the unrounded size. */ ++ pcum->darwinpcs_stack_bytes = size; ++ + size = ROUND_UP (size, UNITS_PER_WORD); + + allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode); ++ bool is_ha = false; ++#if !TARGET_MACHO + allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v, + mode, + type, + &nregs); ++#else ++ /* We care if the value is a homogenous aggregate when laying out the stack, ++ so use this call directly. */ ++ allocate_nvrn ++ = aarch64_vfp_is_call_or_return_candidate (mode, type, ++ &pcum->aapcs_vfp_rmode, ++ &nregs, &is_ha, ++ pcum->silent_p); ++#endif + gcc_assert (!sve_p || !allocate_nvrn); + + /* allocate_ncrn may be false-positive, but allocate_nvrn is quite reliable. +@@ -7484,7 +7535,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + if (!pcum->silent_p && !TARGET_FLOAT) + aarch64_err_no_fpadvsimd (mode); + +- if (nvrn + nregs <= NUM_FP_ARG_REGS) ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextnvrn = NUM_FP_ARG_REGS; ++ goto on_stack; ++ } ++ else if (nvrn + nregs <= NUM_FP_ARG_REGS) + { + pcum->aapcs_nextnvrn = nvrn + nregs; + if (!aarch64_composite_type_p (type, mode)) +@@ -7514,6 +7571,7 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + else +@@ -7530,14 +7588,24 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* C6 - C9. though the sign and zero extension semantics are + handled elsewhere. This is the case where the argument fits + entirely general registers. */ ++ + if (allocate_ncrn && (ncrn + nregs <= NUM_ARG_REGS)) + { + gcc_assert (nregs == 0 || nregs == 1 || nregs == 2); + ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextncrn = NUM_ARG_REGS; ++ goto on_stack; ++ } ++ + /* C.8 if the argument has an alignment of 16 then the NGRN is + rounded up to the next even number. */ + if (nregs == 2 + && ncrn % 2 ++ /* Darwin PCS deletes rule C.8. */ ++ && !TARGET_MACHO + /* The == 16 * BITS_PER_UNIT instead of >= 16 * BITS_PER_UNIT + comparison is there because for > 16 * BITS_PER_UNIT + alignment nregs should be > 2 and therefore it should be +@@ -7589,8 +7657,8 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } +- + pcum->aapcs_nextncrn = ncrn + nregs; ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + +@@ -7600,10 +7668,87 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* The argument is passed on stack; record the needed number of words for + this argument and align the total size if necessary. */ + on_stack: +- pcum->aapcs_stack_words = size / UNITS_PER_WORD; + +- if (aarch64_function_arg_alignment (mode, type, &abi_break) +- == 16 * BITS_PER_UNIT) ++ unsigned int align = aarch64_function_arg_alignment (mode, type, &abi_break); ++ ++ if (TARGET_MACHO) ++ { ++ /* Darwin does not round up the allocation for smaller entities to 8 ++ bytes. It only requires the natural alignment for these. ++ ++ but we don't do this for: ++ * unnamed parms in variadic functions ++ * complex types ++ * unions ++ * aggregates (except for homogeneous ones which are handles as the ++ enclosed type). ++ each entry starts a new slot. ++ ++ 16 byte entities are naturally aligned on the stack. ++ There was no darwinpcs for GCC 9, so neither the implementation ++ change nor the warning should fire here (i.e. we do not need to check ++ if 16byte entities alter the stack size). */ ++ ++ gcc_checking_assert (arg.named == pcum->named_p); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ if (!pcum->named_p ++ || TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (pcum->aapcs_vfp_rmode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ { ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = MAX (align, PARM_BOUNDARY); ++ if (!pcum->named_p) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ return; ++ } ++ ++ /* Updated sub-word offset aligned for the new object. ++ We are looking for the case that the new object will fit after some ++ existing object(s) in the same stack slot. In that case, we do not ++ need to add any more stack space for it. */ ++ int new_off ++ = ROUND_UP (pcum->darwinpcs_sub_word_pos, align / BITS_PER_UNIT); ++ ++ if (new_off >= UNITS_PER_WORD) ++ { ++ /* That exceeds a stack slot, start a new one. */ ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ new_off = 0; ++ } ++ /* This is the end of the new object. */ ++ int new_pos = new_off + pcum->darwinpcs_stack_bytes; ++ ++ if (pcum->darwinpcs_sub_word_pos == 0) ++ /* New stack slot, just allocate one or more words, and note where ++ the next arg will start. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ else if (new_pos <= UNITS_PER_WORD) ++ /* Old stack slot, object starts at new_off and goes to new_pos, we do ++ not add any stack space. */ ++ pcum->darwinpcs_sub_word_offset = new_off; ++ pcum->darwinpcs_sub_word_pos = new_pos; ++ pcum->darwinpcs_arg_boundary = align ; ++ if (pcum->last_named_p && new_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (new_pos <= 4) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ else if (new_pos <= 6) ++ pcum->darwinpcs_arg_padding = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ pcum->darwinpcs_arg_padding = 2 * BITS_PER_UNIT; ++ } ++ return; ++ } ++ ++ /* size was already rounded up to PARM_BOUNDARY. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ if (align == 16 * BITS_PER_UNIT) + { + int new_size = ROUND_UP (pcum->aapcs_stack_size, 16 / UNITS_PER_WORD); + if (pcum->aapcs_stack_size != new_size) +@@ -7656,7 +7801,28 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum, + pcum->aapcs_arg_processed = false; + pcum->aapcs_stack_words = 0; + pcum->aapcs_stack_size = 0; ++ pcum->darwinpcs_stack_bytes = 0; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ /* If we have been invoked for incoming args, then n_named will have been ++ set to -1, but we should have a function decl - so pick up the named ++ count from that. If that fails, and we end up with -1, this effectively ++ corresponds to assuming that there is an arbitrary number of named ++ args. */ ++ pcum->darwinpcs_n_named = n_named; ++ if (n_named == (unsigned)-1 && fndecl) ++ { ++ tree fnt = TREE_TYPE (fndecl); ++ if (fnt && TYPE_ARG_TYPES (fnt)) ++ pcum->darwinpcs_n_named = list_length (TYPE_ARG_TYPES (fnt)); ++ } ++ pcum->darwinpcs_n_args_processed = 0; ++ pcum->named_p = pcum->darwinpcs_n_named != 0; ++ pcum->last_named_p = pcum->darwinpcs_n_named == 1; + pcum->silent_p = silent_p; ++ pcum->aapcs_vfp_rmode = VOIDmode; + + if (!silent_p + && !TARGET_FLOAT +@@ -7695,8 +7861,10 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + || pcum->pcs_variant == ARM_PCS_SVE) + { + aarch64_layout_arg (pcum_v, arg); +- gcc_assert ((pcum->aapcs_reg != NULL_RTX) +- != (pcum->aapcs_stack_words != 0)); ++ pcum->darwinpcs_n_args_processed++; ++ gcc_assert (TARGET_MACHO ++ || (pcum->aapcs_reg != NULL_RTX) ++ != (pcum->aapcs_stack_words != 0)); + pcum->aapcs_arg_processed = false; + pcum->aapcs_ncrn = pcum->aapcs_nextncrn; + pcum->aapcs_nvrn = pcum->aapcs_nextnvrn; +@@ -7704,6 +7872,12 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + pcum->aapcs_stack_size += pcum->aapcs_stack_words; + pcum->aapcs_stack_words = 0; + pcum->aapcs_reg = NULL_RTX; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ pcum->named_p ++ = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++ pcum->last_named_p ++ = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; + } + } + +@@ -7714,12 +7888,15 @@ aarch64_function_arg_regno_p (unsigned regno) + || (FP_REGNUM_P (regno) && regno < V0_REGNUM + NUM_FP_ARG_REGS)); + } + +-/* Implement FUNCTION_ARG_BOUNDARY. Every parameter gets at least +- PARM_BOUNDARY bits of alignment, but will be given anything up +- to STACK_BOUNDARY bits if the type requires it. This makes sure +- that both before and after the layout of each argument, the Next +- Stacked Argument Address (NSAA) will have a minimum alignment of +- 8 bytes. */ ++/* Implement FUNCTION_ARG_BOUNDARY. ++ For AAPCS64, Every parameter gets at least PARM_BOUNDARY bits of ++ alignment, but will be given anything up to STACK_BOUNDARY bits ++ if the type requires it. This makes sure that both before and after ++ the layout of each argument, the Next Stacked Argument Address (NSAA) ++ will have a minimum alignment of 8 bytes. ++ ++ For darwinpcs, this is only called to lower va_arg entries which are ++ always aligned as for AAPCS64. */ + + static unsigned int + aarch64_function_arg_boundary (machine_mode mode, const_tree type) +@@ -7727,6 +7904,22 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + unsigned int abi_break; + unsigned int alignment = aarch64_function_arg_alignment (mode, type, + &abi_break); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ /* This can only work for unnamed args. */ ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ if (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return MIN (alignment, STACK_BOUNDARY); ++#else + alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); + if (abi_break && warn_psabi) + { +@@ -7736,6 +7929,96 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + "%qT changed in GCC 9.1", type); + } + return alignment; ++#endif ++} ++ ++/* For Darwin, we want to use the arg boundary computed when laying out the ++ function arg, to cope with items packed on the stack and the different ++ rules applied to unnamed parms. */ ++ ++static unsigned int ++aarch64_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ unsigned int abi_break; ++ unsigned int alignment = aarch64_function_arg_alignment (mode, type, ++ &abi_break); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ bool no_pack = (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE); ++ ++ bool in_regs = (pcum->aapcs_reg != NULL_RTX); ++ ++ if ((named_p && !no_pack) || in_regs) ++ ; /* Leave the alignment as natural. */ ++ else ++ alignment = MAX (alignment, PARM_BOUNDARY); ++gcc_checking_assert (alignment == pcum->darwinpcs_arg_boundary); ++ return MIN (alignment, STACK_BOUNDARY); ++ ++#else ++ alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ if (abi_break && warn_psabi) ++ { ++ abi_break = MIN (MAX (abi_break, PARM_BOUNDARY), STACK_BOUNDARY); ++ if (alignment != abi_break) ++ inform (input_location, "parameter passing for argument of type " ++ "%qT changed in GCC 9.1", type); ++ } ++ return alignment; ++#endif ++} ++ ++/* Implement TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA for darwinpcs which allows ++ non-standard passing of byte-aligned items [D.2]. This is done by pulling ++ the values out of the cumulative args struct. */ ++ ++static unsigned int ++aarch64_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca) ++{ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ bool last_named_p = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; ++gcc_checking_assert (last_named_p == pcum->last_named_p); ++ ++ unsigned boundary = BITS_PER_UNIT; ++ if (last_named_p && pcum->darwinpcs_sub_word_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (pcum->darwinpcs_sub_word_pos <= 4) ++ boundary = PARM_BOUNDARY; ++ else if (pcum->darwinpcs_sub_word_pos <= 6) ++ boundary = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ boundary = 2 * BITS_PER_UNIT; ++ } ++ else if (named_p) ++ /* Named args are naturally aligned, but with no rounding. */ ++ ; ++ else ++ /* un-named args are rounded to fill slots. */ ++ boundary = PARM_BOUNDARY; ++gcc_checking_assert (boundary == pcum->darwinpcs_arg_padding); ++ return boundary; + } + + /* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE. */ +@@ -10972,6 +11255,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + /* load literal: pc-relative constant pool entry. Only supported + for SI mode or larger. */ + info->type = ADDRESS_SYMBOLIC; ++ info->offset = NULL_RTX; + + if (!load_store_pair_p + && GET_MODE_SIZE (mode).is_constant (&const_size) +@@ -10979,6 +11263,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + { + poly_int64 offset; + rtx sym = strip_offset_and_salt (x, &offset); ++ + return ((LABEL_REF_P (sym) + || (SYMBOL_REF_P (sym) + && CONSTANT_POOL_ADDRESS_P (sym) +@@ -10996,10 +11281,13 @@ aarch64_classify_address (struct aarch64_address_info *info, + poly_int64 offset; + HOST_WIDE_INT const_offset; + rtx sym = strip_offset_and_salt (info->offset, &offset); ++ + if (SYMBOL_REF_P (sym) + && offset.is_constant (&const_offset) + && (aarch64_classify_symbol (sym, const_offset) +- == SYMBOL_SMALL_ABSOLUTE)) ++ == SYMBOL_SMALL_ABSOLUTE ++ || aarch64_classify_symbol (sym, const_offset) ++ == SYMBOL_MO_SMALL_PCR)) + { + /* The symbol and offset must be aligned to the access size. */ + unsigned int align; +@@ -11049,6 +11337,55 @@ aarch64_address_valid_for_prefetch_p (rtx x, bool strict_p) + if (!res) + return false; + ++ /* For ELF targets using GAS, we emit prfm unconditionally; GAS will alter ++ the instruction to pick the prfum form where possible (i.e. when the ++ offset is in the range -256..255) and fall back to prfm otherwise. ++ We can reject cases where the offset exceeds the range usable by both ++ insns [-256..32760], or for offsets > 255 when the value is not divisible ++ by 8. ++ For Mach-O (Darwin) where the assembler uses the LLVM back end, that does ++ not yet do the substitution, so we must reject all prfum cases. */ ++ if (addr.offset) ++ { ++ HOST_WIDE_INT offs = INTVAL (addr.offset); ++ if (offs < -256) /* Out of range for both prfum and prfm. */ ++ return false; ++ if (offs > 32760) /* Out of range for prfm. */ ++ return false; ++ if (offs & 0x07) /* We cannot use prfm. */ ++ { ++ if (offs > 255) /* Out of range for prfum. */ ++ return false; ++ if (TARGET_MACHO) ++ return false; ++ } ++ if (TARGET_MACHO && offs < 0) ++ return false; ++ } ++ ++ /* ... except writeback forms. */ ++ return addr.type != ADDRESS_REG_WB; ++} ++ ++/* Return true if the address X is valid for a PRFUM instruction. ++ STRICT_P is true if we should do strict checking with ++ aarch64_classify_address. */ ++ ++bool ++aarch64_address_valid_for_unscaled_prefetch_p (rtx x, bool strict_p) ++{ ++ struct aarch64_address_info addr; ++ ++ /* PRFUM accepts the same addresses as DImode, but constrained to a range ++ -256..255. */ ++ bool res = aarch64_classify_address (&addr, x, DImode, strict_p); ++ if (!res) ++ return false; ++ ++ if (addr.offset && ((INTVAL (addr.offset) > 255) ++ || (INTVAL (addr.offset) < -256))) ++ return false; ++ + /* ... except writeback forms. */ + return addr.type != ADDRESS_REG_WB; + } +@@ -11733,6 +12070,144 @@ sizetochar (int size) + } + } + ++static void ++output_macho_postfix_expr (FILE *file, rtx x, const char *postfix) ++{ ++ char buf[256]; ++ ++ restart: ++ switch (GET_CODE (x)) ++ { ++ case PC: ++ putc ('.', file); ++ break; ++ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_DECL (x)) ++ assemble_external (SYMBOL_REF_DECL (x)); ++ assemble_name (file, XSTR (x, 0)); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case LABEL_REF: ++ x = label_ref_label (x); ++ /* Fall through. */ ++ case CODE_LABEL: ++ ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); ++ assemble_name (file, buf); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case CONST_INT: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); ++ break; ++ ++ case CONST: ++ /* This used to output parentheses around the expression, ++ but that does not work on the 386 (either ATT or BSD assembler). */ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ break; ++ ++ case CONST_WIDE_INT: ++ /* We do not know the mode here so we have to use a round about ++ way to build a wide-int to get it printed properly. */ ++ { ++ wide_int w = wide_int::from_array (&CONST_WIDE_INT_ELT (x, 0), ++ CONST_WIDE_INT_NUNITS (x), ++ CONST_WIDE_INT_NUNITS (x) ++ * HOST_BITS_PER_WIDE_INT, ++ false); ++ print_decs (w, file); ++ } ++ break; ++ ++ case CONST_DOUBLE: ++ if (CONST_DOUBLE_AS_INT_P (x)) ++ { ++ /* We can use %d if the number is one word and positive. */ ++ if (CONST_DOUBLE_HIGH (x)) ++ fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x), ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else if (CONST_DOUBLE_LOW (x) < 0) ++ fprintf (file, HOST_WIDE_INT_PRINT_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); ++ } ++ else ++ /* We can't handle floating point constants; ++ PRINT_OPERAND must handle them. */ ++ output_operand_lossage ("floating constant misused"); ++ break; ++ ++ case CONST_FIXED: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_FIXED_VALUE_LOW (x)); ++ break; ++ ++ case PLUS: ++ /* Some assemblers need integer constants to appear last (eg masm). */ ++ if (CONST_INT_P (XEXP (x, 0))) ++ { ++ output_macho_postfix_expr (file, XEXP (x, 1), postfix); ++ if (INTVAL (XEXP (x, 0)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 0)); ++ } ++ else ++ { ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ if (!CONST_INT_P (XEXP (x, 1)) ++ || INTVAL (XEXP (x, 1)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 1)); ++ } ++ break; ++ ++ case MINUS: ++ /* Avoid outputting things like x-x or x+5-x, ++ since some assemblers can't handle that. */ ++ x = simplify_subtraction (x); ++ if (GET_CODE (x) != MINUS) ++ goto restart; ++ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ fprintf (file, "-"); ++ if ((CONST_INT_P (XEXP (x, 1)) && INTVAL (XEXP (x, 1)) >= 0) ++ || GET_CODE (XEXP (x, 1)) == PC ++ || GET_CODE (XEXP (x, 1)) == SYMBOL_REF) ++ output_addr_const (file, XEXP (x, 1)); ++ else ++ { ++ fputs (targetm.asm_out.open_paren, file); ++ output_addr_const (file, XEXP (x, 1)); ++ fputs (targetm.asm_out.close_paren, file); ++ } ++ break; ++ ++ case ZERO_EXTEND: ++ case SIGN_EXTEND: ++ case SUBREG: ++ case TRUNCATE: ++ output_addr_const (file, XEXP (x, 0)); ++ break; ++ ++ case UNSPEC: ++ if (XINT (x, 1) == UNSPEC_SALT_ADDR) ++ { ++ output_macho_postfix_expr (file, XVECEXP (x, 0, 0), postfix); ++ break; ++ } ++ /* FALLTHROUGH */ ++ default: ++ if (targetm.asm_out.output_addr_const_extra (file, x)) ++ break; ++ ++ output_operand_lossage ("invalid expression as operand"); ++ } ++ ++} ++ + /* Print operand X to file F in a target specific manner according to CODE. + The acceptable formatting commands given by CODE are: + 'c': An integer or symbol address without a preceding # +@@ -11801,6 +12276,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + } + break; + ++ case 'J': ++ output_macho_postfix_expr (f, x, "PAGEOFF"); ++ break; ++ case 'O': ++ output_macho_postfix_expr (f, x, "GOTPAGEOFF"); ++ break; + case 'e': + { + x = unwrap_const_vec_duplicate (x); +@@ -12124,7 +12605,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + case 'A': + if (GET_CODE (x) == HIGH) + x = XEXP (x, 0); +- ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12155,9 +12636,26 @@ aarch64_print_operand (FILE *f, rtx x, int code) + break; + } + output_addr_const (asm_out_file, x); ++#endif ++#if TARGET_MACHO ++ switch (aarch64_classify_symbolic_expression (x)) ++ { ++ case SYMBOL_MO_SMALL_PCR: ++ output_macho_postfix_expr (asm_out_file, x, "PAGE"); ++ break; ++ case SYMBOL_MO_SMALL_GOT: ++ output_macho_postfix_expr (asm_out_file, x, "GOTPAGE"); ++ break; ++ default: ++ /* large code model unimplemented. */ ++ gcc_unreachable (); ++ break; ++ } ++#endif + break; + + case 'L': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12195,10 +12693,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + + case 'G': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_TLSLE24: +@@ -12207,6 +12707,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + +@@ -12356,8 +12857,13 @@ aarch64_print_address_internal (FILE *f, machine_mode mode, rtx x, + break; + + case ADDRESS_LO_SUM: ++#if TARGET_MACHO ++ asm_fprintf (f, "[%s, #", reg_names [REGNO (addr.base)]); ++ output_macho_postfix_expr (f, addr.offset, "PAGEOFF"); ++#else + asm_fprintf (f, "[%s, #:lo12:", reg_names [REGNO (addr.base)]); + output_addr_const (f, addr.offset); ++#endif + asm_fprintf (f, "]"); + return true; + +@@ -12610,6 +13116,26 @@ aarch64_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x, + return NO_REGS; + } + ++#if TARGET_MACHO ++/* Implement TARGET_FRAME_POINTER_REQUIRED. */ ++ ++static bool ++aarch64_darwin_frame_pointer_required () ++{ ++ if (crtl->calls_eh_return) ++ return true; ++ ++ /* Not used in leaf functions (unless forced). */ ++ if (flag_omit_leaf_frame_pointer && leaf_function_p ()) ++ return false; ++ ++ /* NOTE: We are allowing the user to force omission of the frame ++ pointer, (despite that it is not ABI-compliant). */ ++ ++ return flag_omit_frame_pointer != 1; ++} ++#endif ++ + static bool + aarch64_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to) + { +@@ -12827,6 +13353,8 @@ aarch64_asm_output_labelref (FILE* f, const char *name) + asm_fprintf (f, "%U%s", name); + } + ++#if !TARGET_MACHO ++ + static void + aarch64_elf_asm_constructor (rtx symbol, int priority) + { +@@ -12866,6 +13394,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority) + assemble_aligned_integer (POINTER_BYTES, symbol); + } + } ++#endif + + const char* + aarch64_output_casesi (rtx *operands) +@@ -12969,7 +13498,11 @@ aarch64_select_rtx_section (machine_mode mode, + if (aarch64_can_use_per_function_literal_pools_p ()) + return function_section (current_function_decl); + ++#if TARGET_MACHO ++ return machopic_select_rtx_section (mode, x, align); ++#else + return default_elf_select_rtx_section (mode, x, align); ++#endif + } + + /* Implement ASM_OUTPUT_POOL_EPILOGUE. */ +@@ -15172,15 +15705,17 @@ aarch64_init_builtins () + { + aarch64_general_init_builtins (); + aarch64_sve::init_builtins (); +-#ifdef SUBTARGET_INIT_BUILTINS +- SUBTARGET_INIT_BUILTINS; +-#endif ++ aarch64_init_subtarget_builtins (); + } + + /* Implement TARGET_FOLD_BUILTIN. */ + static tree + aarch64_fold_builtin (tree fndecl, int nargs, tree *args, bool) + { ++#ifdef SUBTARGET_FOLD_BUILTIN ++ if (tree res = SUBTARGET_FOLD_BUILTIN (fndecl, nargs, args, false)) ++ return res; ++#endif + unsigned int code = DECL_MD_FUNCTION_CODE (fndecl); + unsigned int subcode = code >> AARCH64_BUILTIN_SHIFT; + tree type = TREE_TYPE (TREE_TYPE (fndecl)); +@@ -18513,10 +19048,14 @@ initialize_aarch64_code_model (struct gcc_options *opts) + } + break; + case AARCH64_CMODEL_LARGE: +- if (opts->x_flag_pic) ++ if (TARGET_MACHO) ++ /* We need to implement fPIC here (arm64_32 also accepts the large ++ model). */ ++ sorry ("code model %qs not supported yet", "large"); ++ else if (opts->x_flag_pic) + sorry ("code model %qs with %<-f%s%>", "large", + opts->x_flag_pic > 1 ? "PIC" : "pic"); +- if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) ++ else if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) + sorry ("code model %qs not supported in ilp32 mode", "large"); + break; + case AARCH64_CMODEL_TINY_PIC: +@@ -19439,7 +19978,9 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ++ ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + default: + gcc_unreachable (); +@@ -19475,10 +20016,22 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + + return SYMBOL_TINY_ABSOLUTE; + +- + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: ++#if TARGET_MACHO ++ if (TARGET_MACHO) ++ { ++ /* Constant pool addresses are always TU-local and PC- ++ relative. We indirect common, external and weak ++ symbols (but weak only if not hidden). */ ++ if (!CONSTANT_POOL_ADDRESS_P (x) ++ && (MACHO_SYMBOL_MUST_INDIRECT_P (x) ++ || !aarch64_symbol_binds_local_p (x))) ++ return SYMBOL_MO_SMALL_GOT; ++ } ++ else ++#endif + if ((flag_pic || SYMBOL_REF_WEAK (x)) + && !aarch64_symbol_binds_local_p (x)) + return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC +@@ -19490,7 +20043,8 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + case AARCH64_CMODEL_LARGE: + /* This is alright even in PIC code as the constant +@@ -19620,7 +20174,10 @@ static GTY(()) tree va_list_type; + void *__vr_top; + int __gr_offs; + int __vr_offs; +- }; */ ++ }; ++ ++ darwinpcs uses 'char *' for the va_list (in common with other platform ++ ports). */ + + static tree + aarch64_build_builtin_va_list (void) +@@ -19628,6 +20185,13 @@ aarch64_build_builtin_va_list (void) + tree va_list_name; + tree f_stack, f_grtop, f_vrtop, f_groff, f_vroff; + ++ /* darwinpcs uses a simple char * for this. */ ++ if (TARGET_MACHO) ++ { ++ va_list_type = build_pointer_type (char_type_node); ++ return va_list_type; ++ } ++ + /* Create the type. */ + va_list_type = lang_hooks.types.make_type (RECORD_TYPE); + /* Give it the required name. */ +@@ -19699,6 +20263,13 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) + int vr_save_area_size = cfun->va_list_fpr_size; + int vr_offset; + ++ /* darwinpcs uses the default, char * va_list impl. */ ++ if (TARGET_MACHO) ++ { ++ std_expand_builtin_va_start (valist, nextarg); ++ return; ++ } ++ + cum = &crtl->args.info; + if (cfun->va_list_gpr_size) + gr_save_area_size = MIN ((NUM_ARG_REGS - cum->aapcs_ncrn) * UNITS_PER_WORD, +@@ -19789,6 +20360,9 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + HOST_WIDE_INT size, rsize, adjust, align; + tree t, u, cond1, cond2; + ++ if (TARGET_MACHO) ++ return std_gimplify_va_arg_expr (valist, type, pre_p, post_p); ++ + indirect_p = pass_va_arg_by_reference (type); + if (indirect_p) + type = build_pointer_type (type); +@@ -19973,8 +20547,18 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + field_ptr_t = double_ptr_type_node; + break; + case E_TFmode: +- field_t = long_double_type_node; +- field_ptr_t = long_double_ptr_type_node; ++ if (TARGET_MACHO) ++ { ++ /* Darwin has __float128, and long double is the same as ++ double. */ ++ field_t = float128_type_node; ++ field_ptr_t = aarch64_float128_ptr_type_node; ++ } ++ else ++ { ++ field_t = long_double_type_node; ++ field_ptr_t = long_double_ptr_type_node; ++ } + break; + case E_HFmode: + field_t = aarch64_fp16_type_node; +@@ -20045,6 +20629,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v, + int gr_saved = cfun->va_list_gpr_size; + int vr_saved = cfun->va_list_fpr_size; + ++ if (TARGET_MACHO) ++ return default_setup_incoming_varargs (cum_v, arg, pretend_size, no_rtl); ++ + /* The caller has advanced CUM up to, but not beyond, the last named + argument. Advance a local copy of CUM past the last "real" named + argument, to find out how many registers are left over. */ +@@ -20872,6 +21459,12 @@ aarch64_autovectorize_vector_modes (vector_modes *modes, bool) + static const char * + aarch64_mangle_type (const_tree type) + { ++ /* The darwinpcs ABI documents say that "__va_list" has to be ++ mangled as char *. */ ++ if (TARGET_MACHO ++ && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) ++ return "Pc"; ++ + /* The AArch64 ABI documents say that "__va_list" has to be + mangled as if it is in the "std" namespace. */ + if (lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) +@@ -20886,6 +21479,12 @@ aarch64_mangle_type (const_tree type) + return "Dh"; + } + ++ /* __float128 is mangled as "g" on darwin. _Float128 is not mangled here, ++ but handled in common code (as "DF128_"). */ ++ if (TARGET_MACHO && TYPE_MODE (type) == TFmode ++ && TYPE_MAIN_VARIANT (type) == float128_type_node) ++ return "g"; ++ + /* Mangle AArch64-specific internal types. TYPE_NAME is non-NULL_TREE for + builtin types. */ + if (TYPE_NAME (type) != NULL) +@@ -21576,7 +22175,8 @@ aarch64_mov_operand_p (rtx x, machine_mode mode) + + /* GOT accesses are valid moves. */ + if (SYMBOL_REF_P (x) +- && aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G) ++ && (aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (x) == SYMBOL_MO_SMALL_GOT)) + return true; + + if (SYMBOL_REF_P (x) && mode == DImode && CONSTANT_ADDRESS_P (x)) +@@ -22688,12 +23288,8 @@ aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name) + static std::string aarch64_last_printed_arch_string; + static std::string aarch64_last_printed_tune_string; + +-/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used +- by the function fndecl. */ +- +-void +-aarch64_declare_function_name (FILE *stream, const char* name, +- tree fndecl) ++static void ++aarch64_function_options_preamble (tree fndecl) + { + tree target_parts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); + +@@ -22732,15 +23328,60 @@ aarch64_declare_function_name (FILE *stream, const char* name, + this_tune->name); + aarch64_last_printed_tune_string = this_tune->name; + } ++} ++ ++/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used ++ by the function fndecl. */ ++ ++#if TARGET_MACHO ++void ++aarch64_darwin_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ gcc_checking_assert (TREE_CODE (fndecl) == FUNCTION_DECL); ++ gcc_checking_assert (!DECL_COMMON (fndecl)); ++ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ ++ /* Darwin does not emit pcs variant info. */ ++ ++ rtx decl_rtx = XEXP (DECL_RTL (fndecl), 0); ++ if (GET_CODE (decl_rtx) != SYMBOL_REF) ++ name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); ++ ++ if (! DECL_WEAK (fndecl) ++ && ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl))) ++ machopic_define_symbol (DECL_RTL (fndecl)); ++ if ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl)) ++ (* targetm.encode_section_info) (fndecl, DECL_RTL (fndecl), false); ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); ++ ++ cfun->machine->label_is_assembled = true; ++} + ++#else ++ ++void ++aarch64_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ /* Emit any necessary pcs information. */ + aarch64_asm_output_variant_pcs (stream, fndecl, name); + + /* Don't forget the type directive for ELF. */ ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function"); +- ASM_OUTPUT_LABEL (stream, name); ++#endif ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); + + cfun->machine->label_is_assembled = true; + } ++#endif + + /* Implement PRINT_PATCHABLE_FUNCTION_ENTRY. */ + +@@ -22797,12 +23438,17 @@ aarch64_output_patchable_area (unsigned int patch_area_size, bool record_p) + /* Implement ASM_OUTPUT_DEF_FROM_DECLS. Output .variant_pcs for aliases. */ + + void +-aarch64_asm_output_alias (FILE *stream, const tree decl, const tree target) ++aarch64_asm_output_alias (FILE *stream, const tree decl, ++ const tree target ATTRIBUTE_UNUSED) + { + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); ++#ifdef ASM_OUTPUT_DEF + const char *value = IDENTIFIER_POINTER (target); ++#endif + aarch64_asm_output_variant_pcs (stream, decl, name); ++#ifdef ASM_OUTPUT_DEF + ASM_OUTPUT_DEF (stream, name, value); ++#endif + } + + /* Implement ASM_OUTPUT_EXTERNAL. Output .variant_pcs for undefined +@@ -22848,6 +23494,9 @@ aarch64_start_file (void) + aarch64_last_printed_arch_string.c_str ()); + + default_file_start (); ++#if TARGET_MACHO ++ darwin_file_start (); ++#endif + } + + /* Emit load exclusive. */ +@@ -23325,6 +23974,10 @@ aarch64_float_const_representable_p (rtx x) + || REAL_VALUE_MINUS_ZERO (r)) + return false; + ++ /* For BFmode, only handle 0.0. */ ++ if (GET_MODE (x) == BFmode) ++ return r.cl == rvc_zero; ++ + /* Extract exponent. */ + r = real_value_abs (&r); + exponent = REAL_EXP (&r); +@@ -23428,6 +24081,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + } + + gcc_assert (CONST_INT_P (info.u.mov.value)); ++ unsigned HOST_WIDE_INT value = UINTVAL (info.u.mov.value); ++ ++ /* We have signed chars which can result in a sign-extended 8bit value ++ which is then emitted as an unsigned hex value, and the LLVM back end ++ assembler rejects that as being too big. */ ++ if (TARGET_MACHO && (known_eq (GET_MODE_BITSIZE (info.elt_mode), 8))) ++ { ++ unsigned HOST_WIDE_INT mask = (1U << GET_MODE_BITSIZE (info.elt_mode))-1; ++ value &= mask; ++ } + + if (which == AARCH64_CHECK_MOV) + { +@@ -23436,16 +24099,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + ? "msl" : "lsl"); + if (lane_count == 1) + snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX, +- mnemonic, UINTVAL (info.u.mov.value)); ++ mnemonic, value); + else if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX ", %s %d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), shift_op, ++ element_char, value, shift_op, + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + else + { +@@ -23454,12 +24117,12 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC ", %s #%d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), "lsl", ++ element_char, value, "lsl", + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + return templ; + } +@@ -26605,12 +27268,14 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode) + } + + /* Implement TARGET_SCALAR_MODE_SUPPORTED_P - return TRUE +- if MODE is HFmode, and punt to the generic implementation otherwise. */ ++ if MODE is [BH]Fmode, or TFmode on Mach-O, and punt to the generic ++ implementation otherwise. */ + + static bool + aarch64_scalar_mode_supported_p (scalar_mode mode) + { +- return (mode == HFmode ++ ++ return ((mode == HFmode || mode == BFmode || (mode == TFmode && TARGET_MACHO)) + ? true + : default_scalar_mode_supported_p (mode)); + } +@@ -27378,19 +28043,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE *out_file) + continue; + + const char *name = indirect_symbol_names[regnum]; +- switch_to_section (get_named_section (decl, NULL, 0)); ++ /* If the target uses a unique section for this switch to it. */ ++ if (DECL_SECTION_NAME (decl)) ++ switch_to_section (get_named_section (decl, NULL, 0)); ++ else ++ switch_to_section (text_section); + ASM_OUTPUT_ALIGN (out_file, 2); +- targetm.asm_out.globalize_label (out_file, name); ++ if (!TARGET_MACHO) ++ targetm.asm_out.globalize_label (out_file, name); ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE ++ ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); ++#endif ++ if (TARGET_MACHO) ++ { ++#ifdef ASM_WEAKEN_DECL ++ if (DECL_WEAK (decl)) ++ ASM_WEAKEN_DECL (out_file, decl, name, 0); ++ else ++#endif ++ targetm.asm_out.globalize_decl_name (out_file, decl); ++ } + /* Only emits if the compiler is configured for an assembler that can + handle visibility directives. */ + targetm.asm_out.assemble_visibility (decl, VISIBILITY_HIDDEN); +- ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); + ASM_OUTPUT_LABEL (out_file, name); + aarch64_sls_emit_function_stub (out_file, regnum); + /* Use the most conservative target to ensure it can always be used by any + function in the translation unit. */ + asm_fprintf (out_file, "\tdsb\tsy\n\tisb\n"); ++#ifdef ASM_DECLARE_FUNCTION_SIZE + ASM_DECLARE_FUNCTION_SIZE (out_file, name, decl); ++#endif + } + } + +@@ -27421,6 +28104,60 @@ aarch64_indirect_call_asm (rtx addr) + return ""; + } + ++#if TARGET_MACHO ++/* This handles the promotion of function return values. ++ It also handles function args under two specific curcumstances: ++ - called from combine with a register argument ++ - caller for a libcall with type == NULL. ++ The remaining cases for argument promotion are handled with access to ++ cumulative args data, below. */ ++machine_mode ++aarch64_darwin_promote_fn_mode (const_tree type, machine_mode mode, ++ int *punsignedp, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ /* With the amended use of promote using cargs, the only cases that arrive ++ here with for_return == 0 are from combine (where the value is definitely ++ in a register) and for libcalls, where type == NULL. We want to promote ++ function return values in the callee, so this becomes pretty much ++ unconditional now. */ ++ if (type != NULL_TREE) ++ return promote_mode (type, mode, punsignedp); ++ return mode; ++} ++ ++/* Ensure that we only promote the mode of named parms when they are passed in ++ a register. Named values passed on the stack retain their original mode and ++ alignment. */ ++machine_mode ++aarch64_darwin_promote_function_mode_ca (cumulative_args_t ca, ++ function_arg_info arg, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int *punsignedp, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ tree type = arg.type; ++ machine_mode mode = arg.mode; ++ machine_mode new_mode = promote_mode (type, mode, punsignedp); ++ if (new_mode == mode || arg.named == false ++ || GET_MODE_CLASS (new_mode) != MODE_INT ++ || known_gt (GET_MODE_SIZE (new_mode), 4)) ++ return new_mode; ++ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++ /* Make sure that changes in assumption do not get missed. */ ++ gcc_checking_assert (for_return == 0 && new_mode == SImode ++ && !pcum->aapcs_arg_processed); ++ /* We have a named integer value that fits in a reg; if there's one available ++ then promote the value. */ ++ if (pcum->aapcs_ncrn < 8) ++ return new_mode; ++ return mode; ++} ++ ++#endif ++ + /* Target-specific selftests. */ + + #if CHECKING_P +@@ -27583,6 +28320,15 @@ aarch64_run_selftests (void) + #undef TARGET_ASM_ALIGNED_SI_OP + #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" + ++#if TARGET_MACHO ++#undef TARGET_ASM_UNALIGNED_HI_OP ++#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t" ++#undef TARGET_ASM_UNALIGNED_SI_OP ++#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t" ++#undef TARGET_ASM_UNALIGNED_DI_OP ++#define TARGET_ASM_UNALIGNED_DI_OP "\t.quad\t" ++#endif ++ + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ + hook_bool_const_tree_hwi_hwi_const_tree_true +@@ -27669,6 +28415,12 @@ aarch64_run_selftests (void) + #undef TARGET_FUNCTION_ARG_BOUNDARY + #define TARGET_FUNCTION_ARG_BOUNDARY aarch64_function_arg_boundary + ++#undef TARGET_FUNCTION_ARG_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_BOUNDARY_CA aarch64_function_arg_boundary_ca ++ ++#undef TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA aarch64_function_arg_round_boundary_ca ++ + #undef TARGET_FUNCTION_ARG_PADDING + #define TARGET_FUNCTION_ARG_PADDING aarch64_function_arg_padding + +@@ -27996,7 +28748,7 @@ aarch64_libgcc_floating_mode_supported_p + + /* The architecture reserves bits 0 and 1 so use bit 2 for descriptors. */ + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS AARCH64_CUSTOM_FUNCTION_TEST + + #undef TARGET_HARD_REGNO_NREGS + #define TARGET_HARD_REGNO_NREGS aarch64_hard_regno_nregs +@@ -28083,6 +28835,11 @@ aarch64_libgcc_floating_mode_supported_p + #undef TARGET_HAVE_SHADOW_CALL_STACK + #define TARGET_HAVE_SHADOW_CALL_STACK true + ++#if TARGET_MACHO ++#undef TARGET_FRAME_POINTER_REQUIRED ++#define TARGET_FRAME_POINTER_REQUIRED aarch64_darwin_frame_pointer_required ++#endif ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-aarch64.h" +diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h +index fadcf98b85c..3f85d26b59b 100644 +--- a/gcc/config/aarch64/aarch64.h ++++ b/gcc/config/aarch64/aarch64.h +@@ -54,6 +54,10 @@ + #define TARGET_SIMD (!TARGET_GENERAL_REGS_ONLY && AARCH64_ISA_SIMD) + #define TARGET_FLOAT (!TARGET_GENERAL_REGS_ONLY && AARCH64_ISA_FP) + ++/* If this is non-zero then generated code of the object format, ABI and ++ assembler syntax used by Darwin (Mach-O) platforms. */ ++#define TARGET_MACHO 0 ++ + #define UNITS_PER_WORD 8 + + #define UNITS_PER_VREG 16 +@@ -131,6 +135,12 @@ + /* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY). */ + #define MALLOC_ABI_ALIGNMENT 128 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define AARCH64_CUSTOM_FUNCTION_TEST 4 ++ + /* Defined by the ABI */ + #define WCHAR_TYPE "unsigned int" + #define WCHAR_TYPE_SIZE 32 +@@ -1038,6 +1048,24 @@ typedef struct + aapcs_reg == NULL_RTX. */ + int aapcs_stack_size; /* The total size (in words, per 8 byte) of the + stack arg area so far. */ ++ ++ /* In the darwinpcs, items smaller than one word are packed onto the stack ++ naturally aligned. Unnamed parameters passed in a variadic call are, ++ however, aligned the same way as the AAPCS64. This means that we need to ++ pad the last named arg to the next parm boundary (and hence notice when ++ we are processing that arg). */ ++ int darwinpcs_stack_bytes; /* If the argument is passed on the stack, this ++ the byte-size. */ ++ int darwinpcs_sub_word_offset;/* This is the offset of this arg within a word ++ when placing smaller items for darwinpcs. */ ++ int darwinpcs_sub_word_pos; /* The next byte available within the word for ++ darwinpcs. */ ++ unsigned darwinpcs_arg_boundary; /* The computed argument boundary. */ ++ unsigned darwinpcs_arg_padding; /* The computed argument padding. */ ++ unsigned darwinpcs_n_named; /* Number of named arguments. */ ++ unsigned darwinpcs_n_args_processed; /* Processed so far. */ ++ bool named_p; /* Is this arg named? */ ++ bool last_named_p; /* Is this the last named arg? */ + bool silent_p; /* True if we should act silently, rather than + raise an error for invalid calls. */ + } CUMULATIVE_ARGS; +@@ -1322,8 +1350,13 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + #define ASM_CPU_SPEC \ + MCPU_TO_MARCH_SPEC + ++#ifndef SUBTARGET_EXTRA_SPECS ++#define SUBTARGET_EXTRA_SPECS ++#endif ++ + #define EXTRA_SPECS \ +- { "asm_cpu_spec", ASM_CPU_SPEC } ++ { "asm_cpu_spec", ASM_CPU_SPEC }, \ ++ SUBTARGET_EXTRA_SPECS + + #define ASM_OUTPUT_POOL_EPILOGUE aarch64_asm_output_pool_epilogue + +@@ -1337,6 +1370,10 @@ extern GTY(()) tree aarch64_fp16_ptr_type_node; + extern GTY(()) tree aarch64_bf16_type_node; + extern GTY(()) tree aarch64_bf16_ptr_type_node; + ++/* A pointer to the user-visible __float128 (on Mach-O). Defined in ++ aarch64-builtins.c. */ ++extern GTY(()) tree aarch64_float128_ptr_type_node; ++ + /* The generic unwind code in libgcc does not initialize the frame pointer. + So in order to unwind a function using a frame pointer, the very first + function that is unwound must save the frame pointer. That way the frame +diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md +index 99f185718c9..2c165c6047a 100644 +--- a/gcc/config/aarch64/aarch64.md ++++ b/gcc/config/aarch64/aarch64.md +@@ -304,6 +304,7 @@ + UNSPEC_LD1RO + UNSPEC_SALT_ADDR + UNSPECV_PATCHABLE_AREA ++ UNSPEC_MACHOPIC_OFFSET ; Common to Mach-O ports. + ]) + + (define_c_enum "unspecv" [ +@@ -850,6 +851,37 @@ + [(set_attr "type" "load_4")] + ) + ++(define_insn "prefetch_unscaled" ++ [(prefetch (match_operand:DI 0 "aarch64_unscaled_prefetch_operand" "Du") ++ (match_operand:QI 1 "const_int_operand" "") ++ (match_operand:QI 2 "const_int_operand" ""))] ++ "" ++ { ++ const char * pftype[2][4] = ++ { ++ {"prfum\\tPLDL1STRM, %0", ++ "prfum\\tPLDL3KEEP, %0", ++ "prfum\\tPLDL2KEEP, %0", ++ "prfum\\tPLDL1KEEP, %0"}, ++ {"prfum\\tPSTL1STRM, %0", ++ "prfum\\tPSTL3KEEP, %0", ++ "prfum\\tPSTL2KEEP, %0", ++ "prfum\\tPSTL1KEEP, %0"}, ++ }; ++ ++ int locality = INTVAL (operands[2]); ++ ++ gcc_assert (IN_RANGE (locality, 0, 3)); ++ ++ /* PRFUM accepts the same addresses as a 64-bit LDR so wrap ++ the address into a DImode MEM so that aarch64_print_operand knows ++ how to print it. */ ++ operands[0] = gen_rtx_MEM (DImode, operands[0]); ++ return pftype[INTVAL(operands[1])][locality]; ++ } ++ [(set_attr "type" "load_4")] ++) ++ + (define_insn "trap" + [(trap_if (const_int 1) (const_int 8))] + "" +@@ -1305,7 +1337,7 @@ + ldr\\t%s0, %1 + str\\t%w1, %0 + str\\t%s1, %0 +- adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1] ++ * return TARGET_MACHO ? \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %O1]\" : \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1]\"; + adr\\t%x0, %c1 + adrp\\t%x0, %A1 + fmov\\t%s0, %w1 +@@ -1344,7 +1376,7 @@ + ldr\\t%d0, %1 + str\\t%x1, %0 + str\\t%d1, %0 +- * return TARGET_ILP32 ? \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %L1]\" : \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %L1]\"; ++ * return TARGET_ILP32 ? (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %L1]\") : (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %L1]\"); + adr\\t%x0, %c1 + adrp\\t%x0, %A1 + fmov\\t%d0, %x1 +@@ -1777,16 +1809,16 @@ + (set_attr "arch" "*,fp")] + ) + +-(define_insn "load_pair_dw_tftf" +- [(set (match_operand:TF 0 "register_operand" "=w") +- (match_operand:TF 1 "aarch64_mem_pair_operand" "Ump")) +- (set (match_operand:TF 2 "register_operand" "=w") +- (match_operand:TF 3 "memory_operand" "m"))] ++(define_insn "load_pair_dw_" ++ [(set (match_operand:TX 0 "register_operand" "=w") ++ (match_operand:TX 1 "aarch64_mem_pair_operand" "Ump")) ++ (set (match_operand:TX2 2 "register_operand" "=w") ++ (match_operand:TX2 3 "memory_operand" "m"))] + "TARGET_SIMD + && rtx_equal_p (XEXP (operands[3], 0), + plus_constant (Pmode, + XEXP (operands[1], 0), +- GET_MODE_SIZE (TFmode)))" ++ GET_MODE_SIZE (mode)))" + "ldp\\t%q0, %q2, %z1" + [(set_attr "type" "neon_ldp_q") + (set_attr "fp" "yes")] +@@ -1827,11 +1859,11 @@ + (set_attr "arch" "*,fp")] + ) + +-(define_insn "store_pair_dw_tftf" +- [(set (match_operand:TF 0 "aarch64_mem_pair_operand" "=Ump") +- (match_operand:TF 1 "register_operand" "w")) +- (set (match_operand:TF 2 "memory_operand" "=m") +- (match_operand:TF 3 "register_operand" "w"))] ++(define_insn "store_pair_dw_" ++ [(set (match_operand:TX 0 "aarch64_mem_pair_operand" "=Ump") ++ (match_operand:TX 1 "register_operand" "w")) ++ (set (match_operand:TX2 2 "memory_operand" "=m") ++ (match_operand:TX2 3 "register_operand" "w"))] + "TARGET_SIMD && + rtx_equal_p (XEXP (operands[2], 0), + plus_constant (Pmode, +@@ -6889,7 +6921,10 @@ + (lo_sum:P (match_operand:P 1 "register_operand" "r") + (match_operand 2 "aarch64_valid_symref" "S")))] + "" +- "add\\t%0, %1, :lo12:%c2" ++ { return TARGET_MACHO ++ ? "add\\t%0, %1, %J2;" ++ : "add\\t%0, %1, :lo12:%c2"; ++ } + [(set_attr "type" "alu_imm")] + ) + +diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt +index 92220b26ee2..15ec719ca2d 100644 +--- a/gcc/config/aarch64/aarch64.opt ++++ b/gcc/config/aarch64/aarch64.opt +@@ -152,6 +152,13 @@ Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32) + EnumValue + Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64) + ++EnumValue ++Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64) ++ ++m64 ++Target RejectNegative Alias(mabi=, darwinpcs) ++On Darwin for compatibility with other platform variants. ++ + mpc-relative-literal-loads + Target Save Var(pcrelative_literal_loads) Init(2) Save + PC relative literal loads. +diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md +index ee7587cca16..cb73a2daae8 100644 +--- a/gcc/config/aarch64/constraints.md ++++ b/gcc/config/aarch64/constraints.md +@@ -158,7 +158,9 @@ + A constraint that matches a small GOT access." + (and (match_code "const,symbol_ref") + (match_test "aarch64_classify_symbolic_expression (op) +- == SYMBOL_SMALL_GOT_4G"))) ++ == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (op) ++ == SYMBOL_MO_SMALL_GOT"))) + + (define_constraint "Uss" + "@internal +@@ -490,6 +492,11 @@ + An address valid for a prefetch instruction." + (match_test "aarch64_address_valid_for_prefetch_p (op, true)")) + ++(define_address_constraint "Du" ++ "@internal ++ An address valid for a prefetch instruction with an unscaled offset." ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, true)")) ++ + (define_constraint "vgb" + "@internal + A constraint that matches an immediate offset valid for SVE LD1B +diff --git a/gcc/config/aarch64/darwin.h b/gcc/config/aarch64/darwin.h +new file mode 100644 +index 00000000000..08febf1401b +--- /dev/null ++++ b/gcc/config/aarch64/darwin.h +@@ -0,0 +1,289 @@ ++/* Target definitions for Arm64/Aarch64 running on macOS/iOS. ++ ++Copyright The GNU Toolchain Authors. ++Contributed by Iain Sandoe. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 3, or (at your option) ++any later version. ++ ++GCC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++/* Enable Mach-O bits in generic Aarch64 code. */ ++#undef TARGET_MACHO ++#define TARGET_MACHO 1 ++ ++#undef DARWIN_ARM64 ++#define DARWIN_ARM64 1 ++ ++/* This is used in generic code in darwin.cc (at present, we have no support ++ for the arm64_32 target). */ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "long int" ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE aarch64_darwin_promote_fn_mode ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE_CA ++#define TARGET_PROMOTE_FUNCTION_MODE_CA aarch64_darwin_promote_function_mode_ca ++ ++/* NOTE that arm64_32 is a valid thing and corresponds to darwinpcs ++ and TARGET_ILP32, but we are not implementing that for now. */ ++#define TARGET_OS_CPP_BUILTINS() \ ++ do { \ ++ builtin_define ("__LITTLE_ENDIAN__"); \ ++ builtin_define ("__arm64"); \ ++ builtin_define ("__arm64__"); \ ++ darwin_cpp_builtins (pfile); \ ++ } while (0) ++ ++/* In Darwin's Arm64 ABI, chars are signed. */ ++ ++#undef DEFAULT_SIGNED_CHAR ++#define DEFAULT_SIGNED_CHAR 1 ++ ++#undef LONG_DOUBLE_TYPE_SIZE ++#define LONG_DOUBLE_TYPE_SIZE 64 ++ ++/* Disable custom function descriptors on Darwin (we use heap-based ++ trampolines). */ ++#undef AARCH64_CUSTOM_FUNCTION_TEST ++#define AARCH64_CUSTOM_FUNCTION_TEST 0 ++ ++/* Non-PIE executables are forbidden by the Arm64-darwin security model; ++ remove the option from link-lines since they just produce a warning from ++ ld64 and are then ignored anyway. */ ++#undef DARWIN_NOPIE_SPEC ++#define DARWIN_NOPIE_SPEC \ ++" % ++# include ++#endif ++ ++ ++#if TARGET_MACHO ++ ++/* Default architecture to use if -mcpu=native did not detect a known CPU. */ ++#define DEFAULT_ARCH "apple-m1" ++ ++/* macOS does not have /proc/cpuinfo and needs a different approach, ++ based on sysctl. It is much simpler. */ ++ ++const char * ++host_detect_local_cpu (ATTRIBUTE_UNUSED int argc, ATTRIBUTE_UNUSED const char **argv) ++{ ++ bool arch = false; ++ bool tune = false; ++ bool cpu = false; ++ const char *res = NULL; ++ uint32_t family; ++ size_t len = sizeof(family); ++ ++ gcc_assert (argc); ++ if (!argv[0]) ++ return NULL; ++ ++ /* Are we processing -march, mtune or mcpu? */ ++ arch = strcmp (argv[0], "arch") == 0; ++ if (!arch) ++ tune = strcmp (argv[0], "tune") == 0; ++ if (!arch && !tune) ++ cpu = strcmp (argv[0], "cpu") == 0; ++ if (!arch && !tune && !cpu) ++ return NULL; ++ ++ sysctlbyname("hw.cpufamily", &family, &len, NULL, 0); ++ ++ switch (family) ++ { ++ case 0x07d34b9f: // Vortex, Tempest ++ res = "apple-a12"; ++ break; ++ case 0x573b5eec: ++ case 0x1b588bb3: // Firestorm, Icestorm ++ res = "apple-m1"; ++ break; ++ case 0xda33d83d: // Blizzard, Avalanche ++ res = "apple-m2"; ++ break; ++ case 0xfa33415e: // Ibiza (M3) ++ case 0x5f4dea93: // Lobos (M3 Pro) ++ case 0x72015832: // Palma (M3 Max) ++ res = "apple-m3"; ++ break; ++ default: ++ res = DEFAULT_ARCH; ++ } ++ ++ if (res) ++ return concat ("-m", argv[0], "=", res, NULL); ++ else ++ return NULL; ++} ++ ++#else ++ + struct aarch64_arch_extension + { + const char *ext; +@@ -468,3 +536,4 @@ not_found: + } + } + ++#endif +diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.cc b/gcc/config/aarch64/falkor-tag-collision-avoidance.cc +index 5f198290568..ab881d9abc0 100644 +--- a/gcc/config/aarch64/falkor-tag-collision-avoidance.cc ++++ b/gcc/config/aarch64/falkor-tag-collision-avoidance.cc +@@ -740,7 +740,7 @@ dump_insn_list (const rtx &t, const insn_info_list_t &insn_info, + void *unused ATTRIBUTE_UNUSED) + { + gcc_assert (dump_file); +- fprintf (dump_file, "Tag 0x%lx ::\n", INTVAL (t)); ++ fprintf (dump_file, "Tag 0x" HOST_WIDE_INT_PRINT_HEX_PURE " ::\n", INTVAL (t)); + + for (unsigned i = 0; i < insn_info.length (); i++) + dump_insn_slim (dump_file, insn_info[i]->insn); +diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md +index d49e37893df..b2c507745a8 100644 +--- a/gcc/config/aarch64/iterators.md ++++ b/gcc/config/aarch64/iterators.md +@@ -306,6 +306,11 @@ + ;; TX plus V16QImode. + (define_mode_iterator TX_V16QI [TI TF V16QI]) + ++;; Duplicate of TX above ++(define_mode_iterator TX2 [TI TF]) ++ ++(define_mode_iterator VTX [TI TF V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF]) ++ + ;; Advanced SIMD opaque structure modes. + (define_mode_iterator VSTRUCT [OI CI XI]) + +diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md +index c308015ac2c..cd88f93ca2d 100644 +--- a/gcc/config/aarch64/predicates.md ++++ b/gcc/config/aarch64/predicates.md +@@ -261,9 +261,24 @@ + (define_predicate "aarch64_prefetch_operand" + (match_test "aarch64_address_valid_for_prefetch_p (op, false)")) + ++(define_predicate "aarch64_unscaled_prefetch_operand" ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, false)")) ++ + (define_predicate "aarch64_valid_symref" + (match_code "const, symbol_ref, label_ref") + { ++ if (TARGET_MACHO) ++ { ++ rtx x = op; ++ rtx offset; ++ split_const (x, &x, &offset); ++ if (GET_CODE (x) == CONST) ++ x = XEXP (x, 0); ++ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SALT_ADDR) ++ x = XVECEXP (x, 0, 0); ++ if (SYMBOL_REF_P (x) && INTVAL (offset) < 0) ++ return false; ++ } + return (aarch64_classify_symbolic_expression (op) + != SYMBOL_FORCE_TO_MEM); + }) +diff --git a/gcc/config/aarch64/t-aarch64-darwin b/gcc/config/aarch64/t-aarch64-darwin +new file mode 100644 +index 00000000000..e2b8ad9237f +--- /dev/null ++++ b/gcc/config/aarch64/t-aarch64-darwin +@@ -0,0 +1,25 @@ ++# Machine description for AArch64 architecture. ++# Copyright (C) 2020 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range ++ ++# TODO - figure out what multilib provisions we should make for ++# a) arm64e ++# b) arm64_32 +diff --git a/gcc/config/darwin-c.cc b/gcc/config/darwin-c.cc +index 923434da5b1..fe4b5538a0b 100644 +--- a/gcc/config/darwin-c.cc ++++ b/gcc/config/darwin-c.cc +@@ -555,7 +555,7 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp) + return 0; + } + +-/* Given an OS X version VERSION_STR, return it as a statically-allocated array ++/* Given an macOS version VERSION_STR, return it as a statically-allocated array + of three integers. If VERSION_STR is invalid, return NULL. + + VERSION_STR must consist of one, two, or three tokens, each separated by +@@ -612,7 +612,7 @@ parse_version (const char *version_str) + return version_array; + } + +-/* Given VERSION -- a three-component OS X version represented as an array of ++/* Given VERSION -- a three-component macOS version represented as an array of + non-negative integers -- return a statically-allocated string suitable for + the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. If VERSION + is invalid and cannot be coerced into a valid form, return NULL. +@@ -645,7 +645,7 @@ version_as_legacy_macro (const unsigned long *version) + return result; + } + +-/* Given VERSION -- a three-component OS X version represented as an array of ++/* Given VERSION -- a three-component macOS version represented as an array of + non-negative integers -- return a statically-allocated string suitable for + the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. If VERSION + is invalid, return NULL. +@@ -675,7 +675,7 @@ version_as_modern_macro (const unsigned long *version) + + /* Return the value of darwin_macosx_version_min, suitably formatted for the + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. Values representing +- OS X 10.9 and earlier are encoded using the legacy four-character format, ++ macOS 10.9 and earlier are encoded using the legacy four-character format, + while 10.10 and later use a modern six-character format. (For example, + "10.9" produces "1090", and "10.10.1" produces "101001".) If + darwin_macosx_version_min is invalid and cannot be coerced into a valid +diff --git a/gcc/config/darwin-driver.cc b/gcc/config/darwin-driver.cc +index 00287f3d5ec..98a1ea7b672 100644 +--- a/gcc/config/darwin-driver.cc ++++ b/gcc/config/darwin-driver.cc +@@ -268,10 +268,13 @@ darwin_driver_init (unsigned int *decoded_options_count, + bool seenX86_64 = false; + bool seenPPC = false; + bool seenPPC64 = false; ++#if !DARWIN_ARM64 ++ bool seenArm64 = false; + bool seenM32 = false; + bool seenM64 = false; + bool appendM32 = false; + bool appendM64 = false; ++#endif + const char *vers_string = NULL; + bool seen_version_min = false; + bool seen_sysroot_p = false; +@@ -296,6 +299,12 @@ darwin_driver_init (unsigned int *decoded_options_count, + seenPPC = true; + else if (!strcmp ((*decoded_options)[i].arg, "ppc64")) + seenPPC64 = true; ++ else if (!strcmp ((*decoded_options)[i].arg, "arm64")) ++#if !DARWIN_ARM64 ++ seenArm64 = true; ++#else ++ ; /* We accept the option, but don't need to act on it. */ ++#endif + else + error ("this compiler does not support %qs", + (*decoded_options)[i].arg); +@@ -309,7 +318,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + --i; + --*decoded_options_count; + break; +- ++#if !DARWIN_ARM64 + case OPT_m32: + seenM32 = true; + break; +@@ -317,6 +326,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + case OPT_m64: + seenM64 = true; + break; ++#endif + + case OPT_mmacosx_version_min_: + seen_version_min = true; +@@ -366,6 +376,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenPPC || seenPPC64) + warning (0, "this compiler does not support PowerPC" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenX86) + { + if (seenX86_64 || seenM64) +@@ -389,6 +402,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenX86 || seenX86_64) + warning (0, "this compiler does not support x86" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenPPC) + { + if (seenPPC64 || seenM64) +@@ -408,12 +424,20 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (! seenM64) /* Add -m64 if the User didn't. */ + appendM64 = true; + } ++#elif DARWIN_ARM64 ++ if (seenPPC || seenPPC64) ++ warning (0, "this compiler does not support PowerPC" ++ " (%<-arch%> option ignored)"); ++ if (seenX86 || seenX86_64) ++ warning (0, "this compiler does not support x86" ++ " (%<-arch%> option ignored)"); + #endif + + /* If there is nothing else on the command line, do not add sysroot etc. */ + if (*decoded_options_count <= 1) + return; + ++#if !DARWIN_ARM64 + if (appendM32 || appendM64) + { + ++*decoded_options_count; +@@ -423,6 +447,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER, + &(*decoded_options)[*decoded_options_count - 1]); + } ++#endif + + if (!seen_sysroot_p) + { +@@ -440,7 +465,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + } + } + +- /* We will need to know the OS X version we're trying to build for here ++ /* We will need to know the macOS version we're trying to build for here + so that we can figure out the mechanism and source for the sysroot to + be used. */ + if (!seen_version_min) +diff --git a/gcc/config/darwin-protos.h b/gcc/config/darwin-protos.h +index c7f87098ab9..5dee00fd643 100644 +--- a/gcc/config/darwin-protos.h ++++ b/gcc/config/darwin-protos.h +@@ -86,9 +86,12 @@ extern void darwin_asm_lto_end (void); + extern void darwin_mark_decl_preserved (const char *); + + extern tree darwin_handle_kext_attribute (tree *, tree, tree, int, bool *); +-extern tree darwin_handle_weak_import_attribute (tree *node, tree name, +- tree args, int flags, +- bool * no_add_attrs); ++extern tree darwin_handle_weak_import_attribute (tree *, tree, tree, int, ++ bool *); ++extern tree darwin_handle_availability_attribute (tree *, tree, tree, ++ int, bool *); ++extern bool darwin_attribute_takes_identifier_p (const_tree); ++ + extern void machopic_output_stub (FILE *, const char *, const char *); + extern void darwin_globalize_label (FILE *, const char *); + extern void darwin_assemble_visibility (tree, int); +@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfstring_table (tree); + extern void darwin_asm_output_anchor (rtx symbol); + extern bool darwin_use_anchors_for_symbol_p (const_rtx symbol); + extern bool darwin_kextabi_p (void); ++extern bool darwin_unreachable_traps_p (void); + extern void darwin_override_options (void); + extern void darwin_patch_builtins (void); + extern void darwin_rename_builtins (void); +diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc +index 76feb87a29d..0f45ccfbc16 100644 +--- a/gcc/config/darwin.cc ++++ b/gcc/config/darwin.cc +@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see + #include "cfghooks.h" + #include "df.h" + #include "memmodel.h" ++#include "c-family/c-common.h" /* enum rid. */ + #include "tm_p.h" + #include "stringpool.h" + #include "attribs.h" +@@ -49,6 +50,7 @@ along with GCC; see the file COPYING3. If not see + #include "optabs.h" + #include "flags.h" + #include "opts.h" ++#include "c-family/c-objc.h" /* for objc_method_decl(). */ + + /* Fix and Continue. + +@@ -102,6 +104,7 @@ int darwin_running_cxx; + + /* Some code-gen now depends on OS major version numbers (at least). */ + int generating_for_darwin_version ; ++unsigned long current_os_version = 0; + + /* For older linkers we need to emit special sections (marked 'coalesced') for + for weak or single-definition items. */ +@@ -131,7 +134,7 @@ struct { + section * darwin_sections[NUM_DARWIN_SECTIONS]; + + /* While we transition to using in-tests instead of ifdef'd code. */ +-#if !HAVE_lo_sum ++#if !HAVE_lo_sum || DARWIN_ARM64 + #define gen_macho_high(m,a,b) (a) + #define gen_macho_low(m,a,b,c) (a) + #endif +@@ -1065,6 +1068,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) + return pic_ref; + } + ++#if !DARWIN_ARM64 + /* Callbacks to output the stub or non-lazy pointers. + Each works on the item in *SLOT,if it has been used. + DATA is the FILE* for assembly output. +@@ -1220,6 +1224,7 @@ machopic_finish (FILE *out_file) + machopic_indirections->traverse_noresize + (out_file); + } ++#endif + + int + machopic_operand_p (rtx op) +@@ -2155,6 +2160,122 @@ darwin_handle_kext_attribute (tree *node, tree name, + return NULL_TREE; + } + ++enum version_components { MAJOR, MINOR, TINY }; ++ ++/* Parse a version number in x.y.z form and validate it as a macOS ++ version. Ideally, we'd put this in a common place usable by the ++ Darwin backend. */ ++ ++static bool ++parse_version (unsigned version_array[3], const char *version_str) ++{ ++ size_t version_len; ++ char *end, last = '\0', delimiter = '.', alt_delim = '_'; ++ ++ if (!version_str) ++ return false; ++ ++ /* Handle the odd situation in which we get STRING_CST which contain the ++ starting and ending quotes. */ ++ if (version_str[0] == '"') ++ { ++ version_str++; ++ version_len = strrchr (&version_str[1], '"') - version_str; ++ last = '"'; ++ } ++ else ++ version_len = strlen (version_str); ++ ++ if (version_len < 1) ++ return false; ++ ++ /* Version string must consist of digits and periods only. */ ++ if (strspn (version_str, "0123456789._") != version_len) ++ return false; ++ ++ if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1])) ++ return false; ++ ++ version_array[MAJOR] = strtoul (version_str, &end, 10); ++ if (*end == '_') ++ { ++ delimiter = '_'; ++ alt_delim = '.'; ++ } ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MAJOR] == 100000) ++ return true; ++ if (version_array[MAJOR] > 99) ++ return false; ++ ++ /* Version string must not contain adjacent delimiters. */ ++ if (*version_str == delimiter || *version_str == alt_delim) ++ return false; ++ ++ version_array[MINOR] = strtoul (version_str, &end, 10); ++ if (*end == alt_delim) ++ return false; ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MINOR] > 99) ++ return false; ++ ++ version_array[TINY] = strtoul (version_str, &end, 10); ++ if (version_array[TINY] > 99) ++ return false; ++ ++ /* Version string must contain no more than three tokens. */ ++ if (*end != last) ++ return false; ++ ++ return true; ++} ++ ++/* Turn a version expressed as maj.min.tiny into an unsigned long ++ integer representing the value used in macOS availability macros. */ ++ ++static unsigned long ++version_from_version_array (unsigned vers[3]) ++{ ++ unsigned long res = 0; ++ /* There seems to be a special "unknown" value. */ ++ if (vers[0] == 100000) ++ return 999999; ++ ++ /* Here, we follow the 'modern' / 'legacy' numbering scheme for versions. */ ++ if (vers[0] > 10 || vers[1] >= 10) ++ res = vers[0] * 10000 + vers[1] * 100 + vers[2]; ++ else ++ { ++ res = vers[0] * 100; ++ if (vers[1] > 9) ++ res += 90; ++ else ++ res += vers[1] * 10; ++ if (vers[2] > 9) ++ res += 9; ++ else ++ res += vers[1]; ++ } ++ return res; ++} ++ ++/* Extract a macOS version from an availability attribute argument. */ ++ ++static unsigned long ++os_version_from_avail_value (tree value) ++{ ++ unsigned long res = 0; ++ unsigned vers[3] = {0,0,0}; ++ if (TREE_CODE (value) == STRING_CST) ++ { ++ if (parse_version (&vers[0], TREE_STRING_POINTER (value))) ++ res = version_from_version_array (&vers[0]); ++ } ++ else ++ gcc_unreachable (); ++ return res; ++} ++ + /* Handle a "weak_import" attribute; arguments as in + struct attribute_spec.handler. */ + +@@ -2176,6 +2297,231 @@ darwin_handle_weak_import_attribute (tree *node, tree name, + return NULL_TREE; + } + ++#define NUM_AV_OSES 13 ++const char *availability_os[NUM_AV_OSES] ++ = { "macos", "macosx", "ios", "tvos", "watchos", "driverkit", "swift", ++ "maccatalyst", "macCatalyst", "xros", "visionos", "android", "zos" }; ++ ++#define NUM_AV_CLAUSES 6 ++const char *availability_clause[NUM_AV_CLAUSES] ++ = { "unavailable", "introduced", "deprecated", "obsoleted", "message", ++ "replacement" }; ++ ++/* Validate and act upon the arguments to an 'availability' attribute. */ ++ ++tree ++darwin_handle_availability_attribute (tree *node, tree name, tree args, ++ int flags, bool * no_add_attrs) ++{ ++ tree decl = *node; ++ *no_add_attrs = true; ++ ++ if (!decl || (!TYPE_P (decl) && !DECL_P (decl))) ++ { ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ else if (decl == error_mark_node) ++ return NULL_TREE; ++ ++ location_t loc = DECL_SOURCE_LOCATION (decl); ++ if (args == NULL_TREE) ++ { ++ error_at (loc, "%qE attribute requires at least one argument", ++ name); ++ return NULL_TREE; ++ } ++ else if (args == error_mark_node) ++ return NULL_TREE; ++ ++ /* The first argument must name a supported OS - although we could choose ++ to ignore any OS we don't recognise. */ ++ gcc_checking_assert (TREE_CODE (args) == TREE_LIST); ++ tree platform = TREE_VALUE (args); ++ if (platform == error_mark_node) ++ return NULL_TREE; ++ ++ gcc_checking_assert (TREE_CODE (platform) == IDENTIFIER_NODE); ++ bool platform_ok = false; ++ unsigned plat_num = 0; ++ for (; plat_num < (unsigned) NUM_AV_OSES; plat_num++) ++ if (strcmp (availability_os[plat_num], IDENTIFIER_POINTER (platform)) == 0) ++ { ++ platform_ok = true; ++ break; ++ } ++ if (!platform_ok) ++ { ++ error_at (input_location, ++ "platform %qE is not recognised for the % " ++ "attribute", platform); ++ return NULL_TREE; ++ } ++ else if (plat_num > 1) /* We only compile for macos so far. */ ++ return NULL_TREE; ++ ++ /* We might be dealing with an object or type. */ ++ tree target_decl = NULL_TREE; ++ tree type = NULL_TREE; ++ bool warn = false; ++ if (DECL_P (*node)) ++ { ++ type = TREE_TYPE (decl); ++ ++ if (TREE_CODE (decl) == TYPE_DECL ++ || TREE_CODE (decl) == PARM_DECL ++ || VAR_OR_FUNCTION_DECL_P (decl) ++ || TREE_CODE (decl) == FIELD_DECL ++ || TREE_CODE (decl) == CONST_DECL ++ /*|| objc_method_decl (TREE_CODE (decl))*/) ++ target_decl = decl; ++ else ++ warn = true; ++ } ++ else if (TYPE_P (*node)) ++ type = target_decl = *node; ++ else ++ warn = true; ++ ++ tree what = NULL_TREE; ++ if (warn) ++ { ++ if (type && TYPE_NAME (type)) ++ { ++ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (*node); ++ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (type))) ++ what = DECL_NAME (TYPE_NAME (type)); ++ } ++ if (what) ++ warning (OPT_Wattributes, "%qE attribute ignored for %qE", name, what); ++ else ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ ++ /* Now we have to parse the availability clauses. */ ++ tree msg = NULL_TREE; ++ tree replacement = NULL_TREE; ++ bool unavailable = false; ++ unsigned introduced = 1000; ++ unsigned deprecated = current_os_version + 1; ++ unsigned obsoleted = current_os_version + 1; ++ for (tree arg = TREE_CHAIN (args); arg; arg = TREE_CHAIN (arg)) ++ { ++ tree clause_name = TREE_VALUE (arg); ++ tree clause_value = TREE_PURPOSE (arg); ++ if (clause_name == error_mark_node ++ || clause_value == error_mark_node) ++ continue; ++ unsigned clause_num = 0; ++ for (; clause_num < (unsigned) NUM_AV_CLAUSES; clause_num++) ++ if (strcmp (availability_clause[clause_num], ++ IDENTIFIER_POINTER (clause_name)) == 0) ++ break; ++ switch (clause_num) ++ { ++ default: ++ error_at (input_location, ++ "clause %qE is not recognised for the % " ++ "attribute", clause_name); ++ break; ++ case 0: ++ unavailable = true; ++ break; ++ case 1: ++ case 2: ++ case 3: ++ if (!clause_value) ++ error_at (input_location, "%<%E=%> requires a value", clause_name); ++ else ++ { ++ unsigned version = os_version_from_avail_value (clause_value); ++ if (version == 0) ++ error_at (input_location, "the value %qE provided to %qE is " ++ "not a valid OS version", clause_value, clause_name); ++ else if (clause_num == 1) ++ introduced = version; ++ else if (clause_num == 2) ++ deprecated = version; ++ else if (clause_num == 3) ++ obsoleted = version; ++ } ++ break; ++ case 4: ++ case 5: ++ if (!clause_value || TREE_CODE (clause_value) != STRING_CST) ++ error_at (input_location, "%<%E=%> requires a string", clause_name); ++ else if (clause_num == 4) ++ msg = clause_value; ++ else ++ replacement = clause_value; ++ break; ++ } ++ } ++ /* Now figure out what to do. */ ++ tree maybe_text = NULL_TREE; ++ if (replacement) ++ maybe_text = tree_cons (NULL_TREE, replacement, NULL_TREE); ++ else if (msg) ++ maybe_text = tree_cons (NULL_TREE, msg, NULL_TREE); ++ ++ if (unavailable || current_os_version >= obsoleted) ++ { ++ TREE_UNAVAILABLE (*node) = true; ++ /* We do not handle the availability attribute at diagnostics-time, so ++ if we want the informational messages, then attach them to additional ++ attributes for the deprecation or unavailability. TODO; maybe we can ++ fabricate the composite here. */ ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("unavailable"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version > deprecated) ++ { ++ TREE_DEPRECATED (*node) = true; ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("deprecated"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version < introduced) ++ *no_add_attrs = false; ++ return NULL_TREE; ++} ++ ++bool ++darwin_attribute_takes_identifier_p (const_tree attr_id) ++{ ++ return is_attribute_p ("availability", attr_id); ++} ++ + /* Emit a label for an FDE, making it global and/or weak if appropriate. + The third parameter is nonzero if this is for exception handling. + The fourth parameter is nonzero if this is just a placeholder for an +@@ -2267,6 +2613,8 @@ darwin_emit_except_table_label (FILE *file) + rtx + darwin_make_eh_symbol_indirect (rtx orig, bool ARG_UNUSED (pubvis)) + { ++ if (DARWIN_ARM64) ++ return orig; + if (DARWIN_PPC == 0 && TARGET_64BIT) + return orig; + +@@ -3115,7 +3463,12 @@ darwin_file_end (void) + fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags); + } + ++#if !DARWIN_ARM64 + machopic_finish (asm_out_file); ++#else ++ gcc_checking_assert (!machopic_indirections); ++#endif ++ + if (flag_apple_kext) + { + /* These sections are only used for kernel code. */ +@@ -3291,6 +3644,13 @@ darwin_kextabi_p (void) { + return flag_apple_kext; + } + ++/* True, iff we want to map __builtin_unreachable to a trap. */ ++ ++bool ++darwin_unreachable_traps_p (void) { ++ return darwin_unreachable_traps; ++} ++ + void + darwin_override_options (void) + { +@@ -3311,7 +3671,14 @@ darwin_override_options (void) + generating_for_darwin_version = 8; + + /* Earlier versions are not specifically accounted, until required. */ ++ unsigned vers[3] = {0,0,0}; ++ if (!parse_version (vers, darwin_macosx_version_min)) ++ error_at (UNKNOWN_LOCATION, "how did we get a bad OS version? (%s)", ++ darwin_macosx_version_min); ++ current_os_version = version_from_version_array (vers); + } ++ else ++ current_os_version = 1058; + + /* Some codegen needs to account for the capabilities of the target + linker. */ +diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h +index 6b124601274..8149af6fc5d 100644 +--- a/gcc/config/darwin.h ++++ b/gcc/config/darwin.h +@@ -1,4 +1,4 @@ +-/* Target definitions for Darwin (Mac OS X) systems. ++/* Target definitions for Darwin (macOS) systems. + Copyright (C) 1989-2022 Free Software Foundation, Inc. + Contributed by Apple Computer Inc. + +@@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define CONFIG_DARWIN_H + + /* The definitions in this file are common to all processor types +- running Darwin, which is the kernel for Mac OS X. Darwin is ++ running Darwin, which is the kernel for macOS. Darwin is + basically a BSD user layer laid over a Mach kernel, then evolved + for many years (at NeXT) in parallel with other Unix systems. So + while the runtime is a somewhat idiosyncratic Mach-based thing, +@@ -42,6 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #define DARWIN_X86 0 + #define DARWIN_PPC 0 ++#define DARWIN_ARM64 0 + + #define OBJECT_FORMAT_MACHO 1 + +@@ -271,6 +272,12 @@ extern GTY(()) int darwin_ms_struct; + "% 10.11 mmacosx-version-min= -lgcc_s.1.1)" ++# define DARWIN_SHARED_WEAK_ADDS \ ++"%{%:version-compare(>= 10.11 mmacosx-version-min= -lemutls_w): \ ++ " DARWIN_HEAP_T_LIB "}" ++#endif ++ ++ ++/* We might elect to add a path even when this compiler does not use embedded ++ run paths, so that we can use libraries from an alternate compiler that is ++ using embedded runpaths. */ ++#if DARWIN_DO_EXTRA_RPATH ++# define DARWIN_EXTRA_RPATH \ ++"%{!r:%{!nostdlib:%{!nodefaultrpaths:\ ++ %:version-compare(>= 10.5 mmacosx-version-min= -rpath) \ ++ %:version-compare(>= 10.5 mmacosx-version-min= " DARWIN_ADD_RPATH ") \ ++ }}}" ++#else ++# define DARWIN_EXTRA_RPATH "" ++#endif ++ + #define SUBSUBTARGET_OVERRIDE_OPTIONS \ + do { \ + darwin_override_options (); \ +@@ -337,7 +373,8 @@ extern GTY(()) int darwin_ms_struct; + */ + + #define DARWIN_NOCOMPACT_UNWIND \ +-" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) " ++"%{!fuse-ld=lld: \ ++ %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}" + + /* In Darwin linker specs we can put -lcrt0.o and ld will search the library + path for crt0.o or -lcrtx.a and it will search for libcrtx.a. As for +@@ -357,10 +394,12 @@ extern GTY(()) int darwin_ms_struct; + #define LINK_COMMAND_SPEC_A \ + "%{!c:%{!E:%{!S:%{!M:%{!MM:%{!fsyntax-only:%{!fdump=*: \ + %(linker)" \ ++ DARWIN_LD_DEMANGLE \ + LINK_PLUGIN_SPEC \ + "%{flto*:% 10.6 mmacosx-version-min= -lgcc_eh); \ + shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ +- %:version-compare(!> 10.11 mmacosx-version-min= -lgcc_s.1.1) \ ++ " DARWIN_SHARED_LIBGCC " \ + %:version-compare(!> 10.3.9 mmacosx-version-min= -lgcc_eh) \ + %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ +@@ -527,10 +568,11 @@ extern GTY(()) int darwin_ms_struct; + + #define DARWIN_WEAK_CRTS \ + "%{static-libgcc|static: \ +- %:version-compare(>= 10.6 mmacosx-version-min= -lemutls_w) ; \ +- shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ +- %:version-compare(>= 10.11 mmacosx-version-min= -lemutls_w) ; \ +- : -lemutls_w \ ++ %{%:version-compare(>= 10.6 mmacosx-version-min= -lemutls_w): \ ++ " DARWIN_HEAP_T_LIB "} ; \ ++ shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: " \ ++ DARWIN_SHARED_WEAK_ADDS " ; \ ++ : -lemutls_w " DARWIN_HEAP_T_LIB " \ + }" + + /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ +@@ -561,7 +603,8 @@ extern GTY(()) int darwin_ms_struct; + { "darwin_crt2", DARWIN_CRT2_SPEC }, \ + { "darwin_crt3", DARWIN_CRT3_SPEC }, \ + { "darwin_dylib1", DARWIN_DYLIB1_SPEC }, \ +- { "darwin_bundle1", DARWIN_BUNDLE1_SPEC }, ++ { "darwin_bundle1", DARWIN_BUNDLE1_SPEC }, \ ++ { "darwin_rpaths", DARWIN_RPATH_SPEC }, + + #define DARWIN_CRT1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ +@@ -587,6 +630,16 @@ extern GTY(()) int darwin_ms_struct; + "%{!static:%:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \ + %{fgnu-tm: -lcrttms.o}}" + ++#if DARWIN_AT_RPATH ++/* A default rpath, that picks up dependent libraries installed in the same ++ director as one being loaded. */ ++#define DARWIN_RPATH_SPEC \ ++ "%:version-compare(>= 10.5 mmacosx-version-min= -rpath) \ ++ %{%:version-compare(>= 10.5 mmacosx-version-min= @loader_path): %P }" ++#else ++#define DARWIN_RPATH_SPEC "" ++#endif ++ + #ifdef HAVE_AS_MMACOSX_VERSION_MIN_OPTION + /* Emit macosx version (but only major). */ + #define ASM_MMACOSX_VERSION_MIN_SPEC \ +@@ -957,7 +1010,12 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; + { "apple_kext_compatibility", 0, 0, false, true, false, false, \ + darwin_handle_kext_attribute, NULL }, \ + { "weak_import", 0, 0, true, false, false, false, \ +- darwin_handle_weak_import_attribute, NULL } ++ darwin_handle_weak_import_attribute, NULL }, \ ++ { "availability", 0, -1, true, false, false, false, \ ++ darwin_handle_availability_attribute, NULL } ++ ++#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P ++#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P darwin_attribute_takes_identifier_p + + /* Make local constant labels linker-visible, so that if one follows a + weak_global constant, ld64 will be able to separate the atoms. */ +@@ -1205,6 +1263,10 @@ void add_framework_path (char *); + #define TARGET_N_FORMAT_TYPES 1 + #define TARGET_FORMAT_TYPES darwin_additional_format_types + ++/* We want __builtin_unreachable to be expanded as a trap instruction. */ ++#undef TARGET_UNREACHABLE_SHOULD_TRAP ++#define TARGET_UNREACHABLE_SHOULD_TRAP darwin_unreachable_traps_p ++ + #ifndef USED_FOR_TARGET + extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **); + #define GCC_DRIVER_HOST_INITIALIZATION \ +diff --git a/gcc/config/darwin.opt b/gcc/config/darwin.opt +index 51fe410cb72..80a753e2d38 100644 +--- a/gcc/config/darwin.opt ++++ b/gcc/config/darwin.opt +@@ -91,6 +91,10 @@ mtarget-linker + Target RejectNegative Joined Separate Var(darwin_target_linker) Init(LD64_VERSION) + -mtarget-linker Specify that ld64 is the toolchain linker for the current invocation. + ++munreachable-traps ++Target Var(darwin_unreachable_traps) Init(1) ++When set (the default) this makes __builtin_unreachable render as a trap. ++ + ; Driver options. + + all_load +@@ -241,6 +245,10 @@ nodefaultexport + Driver RejectNegative + Do not add a default symbol exports to modules or dynamic libraries. + ++nodefaultrpaths ++Driver RejectNegative ++Do not add default run paths (for the compiler library directories) to executables, modules or dynamic libraries. ++ + nofixprebinding + Driver RejectNegative + (Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an executable. +diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h +index 12cdc34a19e..e5d6797fe8a 100644 +--- a/gcc/config/i386/darwin.h ++++ b/gcc/config/i386/darwin.h +@@ -121,6 +121,9 @@ along with GCC; see the file COPYING3. If not see + #define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC + #endif + ++#undef DARWIN_HEAP_T_LIB ++#define DARWIN_HEAP_T_LIB " -lheapt_w " ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ +@@ -308,3 +311,9 @@ along with GCC; see the file COPYING3. If not see + #define CLEAR_INSN_CACHE(beg, end) \ + extern void sys_icache_invalidate(void *start, size_t len); \ + sys_icache_invalidate ((beg), (size_t)((end)-(beg))) ++ ++/* Disable custom function descriptors for Darwin when we have off-stack ++ trampolines. */ ++#undef X86_CUSTOM_FUNCTION_TEST ++#define X86_CUSTOM_FUNCTION_TEST \ ++ (flag_trampolines && flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ? 0 : 1 +diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc +index af42e4b9739..872e5203aba 100644 +--- a/gcc/config/i386/i386.cc ++++ b/gcc/config/i386/i386.cc +@@ -24792,7 +24792,7 @@ ix86_libgcc_floating_mode_supported_p + #define TARGET_HARD_REGNO_SCRATCH_OK ix86_hard_regno_scratch_ok + + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 1 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS X86_CUSTOM_FUNCTION_TEST + + #undef TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID + #define TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID ix86_addr_space_zero_address_valid +diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h +index 5cea7157a1c..30a6a1cefe2 100644 +--- a/gcc/config/i386/i386.h ++++ b/gcc/config/i386/i386.h +@@ -749,6 +749,12 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + /* Minimum allocation boundary for the code of a function. */ + #define FUNCTION_BOUNDARY 8 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define X86_CUSTOM_FUNCTION_TEST 1 ++ + /* C++ stores the virtual bit in the lowest bit of function pointers. */ + #define TARGET_PTRMEMFUNC_VBIT_LOCATION ptrmemfunc_vbit_in_pfn + +diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h +index 626b40dab29..aabcbd61e2e 100644 +--- a/gcc/config/rs6000/darwin.h ++++ b/gcc/config/rs6000/darwin.h +@@ -113,6 +113,9 @@ + -lSystem \ + }" + ++#undef DARWIN_HEAP_T_LIB ++#define DARWIN_HEAP_T_LIB " " ++ + /* We want -fPIC by default, unless we're using -static to compile for + the kernel or some such. The "-faltivec" option should have been + called "-maltivec" all along. */ +diff --git a/gcc/configure b/gcc/configure +index f697874f2d8..508c4e01ca6 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -632,10 +632,10 @@ ac_includes_default="\ + ac_subst_vars='LTLIBOBJS + LIBOBJS + CET_HOST_FLAGS +-NO_PIE_FLAG +-NO_PIE_CFLAGS +-enable_default_pie ++LD_PICFLAG + PICFLAG ++enable_default_pie ++enable_host_pie + enable_host_shared + enable_plugin + pluginlibs +@@ -735,11 +735,15 @@ ORIGINAL_NM_FOR_TARGET + gcc_cv_nm + ORIGINAL_LD_GOLD_FOR_TARGET + ORIGINAL_LD_BFD_FOR_TARGET ++ORIGINAL_CLASSIC_LD_FOR_TARGET ++ORIGINAL_LLD_FOR_TARGET + ORIGINAL_LD_FOR_TARGET + ORIGINAL_PLUGIN_LD_FOR_TARGET + gcc_cv_ld + ORIGINAL_AS_FOR_TARGET + gcc_cv_as ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_fast_install + objdir + OTOOL64 +@@ -1000,6 +1004,8 @@ enable_static + with_pic + enable_fast_install + enable_libtool_lock ++enable_darwin_at_rpath ++with_darwin_extra_rpath + enable_ld + enable_gold + with_plugin_ld +@@ -1025,6 +1031,7 @@ enable_link_serialization + enable_version_specific_runtime_libs + enable_plugin + enable_host_shared ++enable_host_pie + enable_libquadmath_support + with_linker_hash_style + with_diagnostics_color +@@ -1733,6 +1740,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-gnu-indirect-function +@@ -1787,6 +1797,7 @@ Optional Features: + in a compiler-specific directory + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --disable-libquadmath-support + disable libquadmath support for Fortran + --enable-default-pie enable Position Independent Executable as default +@@ -1850,6 +1861,9 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-darwin-extra-rpath=[ARG] ++ Specify a runpath directory, additional to those ++ provided by the compiler + --with-plugin-ld=[ARG] specify the plugin linker + --with-glibc-version=M.N + assume GCC used with glibc version M.N or later +@@ -3748,20 +3762,19 @@ gcc_gxx_libcxx_include_dir= + + # Check whether --with-gxx-libcxx-include-dir was given. + if test "${with_gxx_libcxx_include_dir+set}" = set; then : +- withval=$with_gxx_libcxx_include_dir; case "${withval}" in +-yes) as_fn_error $? "bad value ${withval} given for libc++ include directory" "$LINENO" 5 ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac ++ withval=$with_gxx_libcxx_include_dir; gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir + fi + + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -3769,16 +3782,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. + gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. ++ gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[1-9]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -16180,7 +16197,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -17885,6 +17902,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -17902,9 +17962,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -19691,7 +19755,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19694 "configure" ++#line 19758 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -19797,7 +19861,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19800 "configure" ++#line 19864 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -20673,6 +20737,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -20690,12 +20797,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -23046,6 +23161,35 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++DARWIN_DO_EXTRA_RPATH=0 ++ ++# Check whether --with-darwin-extra-rpath was given. ++if test "${with_darwin_extra_rpath+set}" = set; then : ++ withval=$with_darwin_extra_rpath; if test x"$withval" != x; then ++ DARWIN_ADD_RPATH="$withval" ++ DARWIN_DO_EXTRA_RPATH=1 ++ fi ++fi ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define DARWIN_DO_EXTRA_RPATH $DARWIN_DO_EXTRA_RPATH ++_ACEOF ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define DARWIN_ADD_RPATH "$DARWIN_ADD_RPATH" ++_ACEOF ++ ++ + # Identify the assembler which will work hand-in-glove with the newly + # built GCC, so that we can examine its features. This is the assembler + # which will be driven by the driver program. +@@ -23322,6 +23466,14 @@ fi + $as_echo "$gold_non_default" >&6; } + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic ++ ++ + + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; +@@ -30851,6 +31003,7 @@ if test x"$ld64_flag" = x"yes"; then + # Set defaults for possibly untestable items. + gcc_cv_ld64_export_dynamic=0 + gcc_cv_ld64_platform_version=0 ++ gcc_cv_ld64_demangle=0 + + if test "$build" = "$host"; then + darwin_try_test=1 +@@ -30874,6 +31027,9 @@ $as_echo_n "checking ld64 specified version... " >&6; } + gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_major" >&5 + $as_echo "$gcc_cv_ld64_major" >&6; } ++ if test "$gcc_cv_ld64_major" -ge 97; then ++ gcc_cv_ld64_demangle=1 ++ fi + if test "$gcc_cv_ld64_major" -ge 236; then + gcc_cv_ld64_export_dynamic=1 + fi +@@ -30891,6 +31047,15 @@ $as_echo_n "checking linker version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_version" >&5 + $as_echo "$gcc_cv_ld64_version" >&6; } + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -demangle support" >&5 ++$as_echo_n "checking linker for -demangle support... " >&6; } ++ gcc_cv_ld64_demangle=1 ++ if $gcc_cv_ld -demangle < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then ++ gcc_cv_ld64_demangle=0 ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_demangle" >&5 ++$as_echo "$gcc_cv_ld64_demangle" >&6; } ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -export_dynamic support" >&5 + $as_echo_n "checking linker for -export_dynamic support... " >&6; } + gcc_cv_ld64_export_dynamic=1 +@@ -30919,6 +31084,12 @@ _ACEOF + fi + + ++cat >>confdefs.h <<_ACEOF ++#define LD64_HAS_DEMANGLE $gcc_cv_ld64_demangle ++_ACEOF ++ ++ ++ + cat >>confdefs.h <<_ACEOF + #define LD64_HAS_EXPORT_DYNAMIC $gcc_cv_ld64_export_dynamic + _ACEOF +@@ -32452,13 +32623,17 @@ fi + # Enable --enable-host-shared + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC +-else +- PICFLAG= ++ enableval=$enable_host_shared; + fi + + + ++# Enable --enable-host-pie ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ + + + # Check whether --enable-libquadmath-support was given. +@@ -32612,10 +32787,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_no_fpie" >&5 + $as_echo "$gcc_cv_c_no_fpie" >&6; } +-if test "$gcc_cv_c_no_fpie" = "yes"; then +- NO_PIE_CFLAGS="-fno-PIE" +-fi +- + + # Check if -no-pie works. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -no-pie option" >&5 +@@ -32640,11 +32811,28 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_no_pie" >&5 + $as_echo "$gcc_cv_no_pie" >&6; } +-if test "$gcc_cv_no_pie" = "yes"; then +- NO_PIE_FLAG="-no-pie" ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++elif test x$gcc_cv_c_no_fpie = xyes; then ++ PICFLAG=-fno-PIE ++else ++ PICFLAG= ++fi ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++elif test x$gcc_cv_no_pie = xyes; then ++ LD_PICFLAG=-no-pie ++else ++ LD_PICFLAG= + fi + + ++ ++ + # Enable Intel CET on Intel CET enabled host if jit is enabled. + # Check whether --enable-cet was given. + if test "${enable_cet+set}" = set; then : +@@ -33127,6 +33315,10 @@ LTLIBOBJS=$ac_ltlibobjs + + + ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/gcc/configure.ac b/gcc/configure.ac +index fec897c2c08..d7d07c76719 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -234,18 +234,17 @@ gcc_gxx_libcxx_include_dir= + AC_ARG_WITH(gxx-libcxx-include-dir, + [AS_HELP_STRING([--with-gxx-libcxx-include-dir=DIR], + [specifies directory to find libc++ header files])], +-[case "${withval}" in +-yes) AC_MSG_ERROR(bad value ${withval} given for libc++ include directory) ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac]) ++[gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir]) + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -253,16 +252,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. ++ gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. + gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[[1-9]]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -2576,6 +2579,21 @@ AC_PROG_LIBTOOL + AC_SUBST(objdir) + AC_SUBST(enable_fast_install) + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++DARWIN_DO_EXTRA_RPATH=0 ++AC_ARG_WITH(darwin-extra-rpath, ++[AS_HELP_STRING( ++ [[--with-darwin-extra-rpath=[ARG]]], ++ [Specify a runpath directory, additional to those provided by the compiler])], ++[if test x"$withval" != x; then ++ DARWIN_ADD_RPATH="$withval" ++ DARWIN_DO_EXTRA_RPATH=1 ++ fi]) ++AC_DEFINE_UNQUOTED(DARWIN_DO_EXTRA_RPATH, $DARWIN_DO_EXTRA_RPATH, ++ [Should add an extra runpath directory]) ++AC_DEFINE_UNQUOTED(DARWIN_ADD_RPATH, "$DARWIN_ADD_RPATH", ++ [Specify a runpath directory, additional to those provided by the compiler]) ++ + # Identify the assembler which will work hand-in-glove with the newly + # built GCC, so that we can examine its features. This is the assembler + # which will be driven by the driver program. +@@ -2748,7 +2766,15 @@ fi + AC_MSG_RESULT($gold_non_default) + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic + AC_SUBST(ORIGINAL_LD_FOR_TARGET) ++AC_SUBST(ORIGINAL_LLD_FOR_TARGET) ++AC_SUBST(ORIGINAL_CLASSIC_LD_FOR_TARGET) + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; + *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; +@@ -4776,7 +4802,7 @@ foo: nop + gcc_cv_as_mllvm_x86_pad_for_align, + [-mllvm -x86-pad-for-align=false], [.text],, + [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1, +- [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])]) ++ [Define if your macOS assembler supports -mllvm -x86-pad-for-align=false.])]) + ;; + esac + +@@ -6383,6 +6409,7 @@ if test x"$ld64_flag" = x"yes"; then + # Set defaults for possibly untestable items. + gcc_cv_ld64_export_dynamic=0 + gcc_cv_ld64_platform_version=0 ++ gcc_cv_ld64_demangle=0 + + if test "$build" = "$host"; then + darwin_try_test=1 +@@ -6404,6 +6431,9 @@ if test x"$ld64_flag" = x"yes"; then + AC_MSG_CHECKING(ld64 specified version) + gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'` + AC_MSG_RESULT($gcc_cv_ld64_major) ++ if test "$gcc_cv_ld64_major" -ge 97; then ++ gcc_cv_ld64_demangle=1 ++ fi + if test "$gcc_cv_ld64_major" -ge 236; then + gcc_cv_ld64_export_dynamic=1 + fi +@@ -6419,6 +6449,13 @@ if test x"$ld64_flag" = x"yes"; then + fi + AC_MSG_RESULT($gcc_cv_ld64_version) + ++ AC_MSG_CHECKING(linker for -demangle support) ++ gcc_cv_ld64_demangle=1 ++ if $gcc_cv_ld -demangle < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then ++ gcc_cv_ld64_demangle=0 ++ fi ++ AC_MSG_RESULT($gcc_cv_ld64_demangle) ++ + AC_MSG_CHECKING(linker for -export_dynamic support) + gcc_cv_ld64_export_dynamic=1 + if $gcc_cv_ld -export_dynamic < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then +@@ -6439,6 +6476,9 @@ if test x"$ld64_flag" = x"yes"; then + [Define to ld64 version.]) + fi + ++ AC_DEFINE_UNQUOTED(LD64_HAS_DEMANGLE, $gcc_cv_ld64_demangle, ++ [Define to 1 if ld64 supports '-demangle'.]) ++ + AC_DEFINE_UNQUOTED(LD64_HAS_EXPORT_DYNAMIC, $gcc_cv_ld64_export_dynamic, + [Define to 1 if ld64 supports '-export_dynamic'.]) + +@@ -7586,11 +7626,14 @@ fi + # Enable --enable-host-shared + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) + AC_SUBST(enable_host_shared) +-AC_SUBST(PICFLAG) + ++# Enable --enable-host-pie ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) + + AC_ARG_ENABLE(libquadmath-support, + [AS_HELP_STRING([--disable-libquadmath-support], +@@ -7712,10 +7755,6 @@ AC_CACHE_CHECK([for -fno-PIE option], + [gcc_cv_c_no_fpie=yes], + [gcc_cv_c_no_fpie=no]) + CXXFLAGS="$saved_CXXFLAGS"]) +-if test "$gcc_cv_c_no_fpie" = "yes"; then +- NO_PIE_CFLAGS="-fno-PIE" +-fi +-AC_SUBST([NO_PIE_CFLAGS]) + + # Check if -no-pie works. + AC_CACHE_CHECK([for -no-pie option], +@@ -7726,10 +7765,27 @@ AC_CACHE_CHECK([for -no-pie option], + [gcc_cv_no_pie=yes], + [gcc_cv_no_pie=no]) + LDFLAGS="$saved_LDFLAGS"]) +-if test "$gcc_cv_no_pie" = "yes"; then +- NO_PIE_FLAG="-no-pie" ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++elif test x$gcc_cv_c_no_fpie = xyes; then ++ PICFLAG=-fno-PIE ++else ++ PICFLAG= + fi +-AC_SUBST([NO_PIE_FLAG]) ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++elif test x$gcc_cv_no_pie = xyes; then ++ LD_PICFLAG=-no-pie ++else ++ LD_PICFLAG= ++fi ++ ++AC_SUBST([PICFLAG]) ++AC_SUBST([LD_PICFLAG]) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. + GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) +diff --git a/gcc/coretypes.h b/gcc/coretypes.h +index 08b9ac9094c..9885d45ec91 100644 +--- a/gcc/coretypes.h ++++ b/gcc/coretypes.h +@@ -199,6 +199,12 @@ enum tls_model { + TLS_MODEL_LOCAL_EXEC + }; + ++/* Types of trampoline implementation. */ ++enum trampoline_impl { ++ TRAMPOLINE_IMPL_STACK, ++ TRAMPOLINE_IMPL_HEAP ++}; ++ + /* Types of ABI for an offload compiler. */ + enum offload_abi { + OFFLOAD_ABI_UNSET, +diff --git a/gcc/cp/cp-lang.cc b/gcc/cp/cp-lang.cc +index 7c8b94741fa..50a02b19f54 100644 +--- a/gcc/cp/cp-lang.cc ++++ b/gcc/cp/cp-lang.cc +@@ -118,6 +118,15 @@ objcp_tsubst_copy_and_build (tree /*t*/, + return NULL_TREE; + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ cp_register_features (); ++} ++ + static const char * + cxx_dwarf_name (tree t, int verbosity) + { +diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc +index f40fd588176..3557e15333c 100644 +--- a/gcc/cp/cp-objcp-common.cc ++++ b/gcc/cp/cp-objcp-common.cc +@@ -23,9 +23,152 @@ along with GCC; see the file COPYING3. If not see + #include "coretypes.h" + #include "cp-tree.h" + #include "cp-objcp-common.h" ++#include "c-family/c-common.h" + #include "dwarf2.h" + #include "stringpool.h" + ++/* Class to determine whether a given C++ language feature is available. ++ Used to implement __has_{feature,extension}. */ ++ ++struct cp_feature_selector ++{ ++ enum ++ { ++ DIALECT, ++ FLAG ++ } kind; ++ ++ enum class result ++ { ++ NONE, ++ EXT, ++ FEAT ++ }; ++ ++ union ++ { ++ const int *enable_flag; ++ struct { ++ enum cxx_dialect feat; ++ enum cxx_dialect ext; ++ } dialect; ++ }; ++ ++ constexpr cp_feature_selector (const int *flag) ++ : kind (FLAG), enable_flag (flag) {} ++ constexpr cp_feature_selector (enum cxx_dialect feat, ++ enum cxx_dialect ext) ++ : kind (DIALECT), dialect{feat, ext} {} ++ constexpr cp_feature_selector (enum cxx_dialect feat) ++ : cp_feature_selector (feat, feat) {} ++ ++ inline result has_feature () const; ++}; ++ ++/* Check whether this language feature is available as a feature, ++ extension, or not at all. */ ++ ++cp_feature_selector::result ++cp_feature_selector::has_feature () const ++{ ++ switch (kind) ++ { ++ case DIALECT: ++ if (cxx_dialect >= dialect.feat) ++ return result::FEAT; ++ else if (cxx_dialect >= dialect.ext) ++ return result::EXT; ++ else ++ return result::NONE; ++ case FLAG: ++ return *enable_flag ? result::FEAT : result::NONE; ++ } ++ ++ gcc_unreachable (); ++} ++ ++/* Information about a C++ language feature which can be queried ++ through __has_{feature,extension}. IDENT is the name of the feature, ++ and SELECTOR encodes how to compute whether the feature is available. */ ++ ++struct cp_feature_info ++{ ++ const char *ident; ++ cp_feature_selector selector; ++}; ++ ++/* Table of features for __has_{feature,extension}. */ ++ ++static constexpr cp_feature_info cp_feature_table[] = ++{ ++ { "cxx_exceptions", &flag_exceptions }, ++ { "cxx_rtti", &flag_rtti }, ++ { "cxx_access_control_sfinae", { cxx11, cxx98 } }, ++ { "cxx_alias_templates", cxx11 }, ++ { "cxx_alignas", cxx11 }, ++ { "cxx_alignof", cxx11 }, ++ { "cxx_attributes", cxx11 }, ++ { "cxx_constexpr", cxx11 }, ++ { "cxx_decltype", cxx11 }, ++ { "cxx_decltype_incomplete_return_types", cxx11 }, ++ { "cxx_default_function_template_args", cxx11 }, ++ { "cxx_defaulted_functions", cxx11 }, ++ { "cxx_delegating_constructors", cxx11 }, ++ { "cxx_deleted_functions", cxx11 }, ++ { "cxx_explicit_conversions", cxx11 }, ++ { "cxx_generalized_initializers", cxx11 }, ++ { "cxx_implicit_moves", cxx11 }, ++ { "cxx_inheriting_constructors", cxx11 }, ++ { "cxx_inline_namespaces", { cxx11, cxx98 } }, ++ { "cxx_lambdas", cxx11 }, ++ { "cxx_local_type_template_args", cxx11 }, ++ { "cxx_noexcept", cxx11 }, ++ { "cxx_nonstatic_member_init", cxx11 }, ++ { "cxx_nullptr", cxx11 }, ++ { "cxx_override_control", cxx11 }, ++ { "cxx_reference_qualified_functions", cxx11 }, ++ { "cxx_range_for", cxx11 }, ++ { "cxx_raw_string_literals", cxx11 }, ++ { "cxx_rvalue_references", cxx11 }, ++ { "cxx_static_assert", cxx11 }, ++ { "cxx_thread_local", cxx11 }, ++ { "cxx_auto_type", cxx11 }, ++ { "cxx_strong_enums", cxx11 }, ++ { "cxx_trailing_return", cxx11 }, ++ { "cxx_unicode_literals", cxx11 }, ++ { "cxx_unrestricted_unions", cxx11 }, ++ { "cxx_user_literals", cxx11 }, ++ { "cxx_variadic_templates", { cxx11, cxx98 } }, ++ { "cxx_binary_literals", { cxx14, cxx98 } }, ++ { "cxx_contextual_conversions", { cxx14, cxx98 } }, ++ { "cxx_decltype_auto", cxx14 }, ++ { "cxx_aggregate_nsdmi", cxx14 }, ++ { "cxx_init_captures", { cxx14, cxx11 } }, ++ { "cxx_generic_lambdas", cxx14 }, ++ { "cxx_relaxed_constexpr", cxx14 }, ++ { "cxx_return_type_deduction", cxx14 }, ++ { "cxx_variable_templates", cxx14 }, ++ { "modules", &flag_modules }, ++}; ++ ++/* Register C++ language features for __has_{feature,extension}. */ ++ ++void ++cp_register_features () ++{ ++ using result = cp_feature_selector::result; ++ ++ for (unsigned i = 0; i < ARRAY_SIZE (cp_feature_table); i++) ++ { ++ const cp_feature_info *info = cp_feature_table + i; ++ const auto res = info->selector.has_feature (); ++ if (res == result::NONE) ++ continue; ++ ++ c_common_register_feature (info->ident, res == result::FEAT); ++ } ++} ++ + /* Special routine to get the alias set for C++. */ + + alias_set_type +diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h +index 3c04e5c0265..5a61c233303 100644 +--- a/gcc/cp/cp-objcp-common.h ++++ b/gcc/cp/cp-objcp-common.h +@@ -35,6 +35,7 @@ extern tree cp_classtype_as_base (const_tree); + extern tree cp_get_global_decls (); + extern tree cp_pushdecl (tree); + extern void cp_register_dumps (gcc::dump_manager *); ++extern void cp_register_features (); + extern bool cp_handle_option (size_t, const char *, HOST_WIDE_INT, int, + location_t, const struct cl_option_handlers *); + extern tree cxx_make_type_hook (tree_code); +diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc +index c5e5fbfba4a..6eb0a7b3613 100644 +--- a/gcc/cp/decl2.cc ++++ b/gcc/cp/decl2.cc +@@ -3674,9 +3674,8 @@ get_tls_init_fn (tree var) + if (!flag_extern_tls_init && DECL_EXTERNAL (var)) + return NULL_TREE; + +- /* If the variable is internal, or if we can't generate aliases, +- call the local init function directly. */ +- if (!TREE_PUBLIC (var) || !TARGET_SUPPORTS_ALIASES) ++ /* If the variable is internal call the local init function directly. */ ++ if (!TREE_PUBLIC (var)) + return get_local_tls_init_fn (DECL_SOURCE_LOCATION (var)); + + tree sname = mangle_tls_init_fn (var); +@@ -3839,6 +3838,25 @@ generate_tls_wrapper (tree fn) + expand_or_defer_fn (finish_function (/*inline_p=*/false)); + } + ++/* A dummy init function to act as a weak placeholder for a (possibly non- ++ existent) dynamic init. */ ++static void ++generate_tls_dummy_init (tree fn) ++{ ++ tree var = DECL_BEFRIENDING_CLASSES (fn); ++ tree init_fn = get_tls_init_fn (var); ++ /* If have no init fn, or it is non-weak, then we do not need to make a ++ dummy. */ ++ if (!init_fn || !lookup_attribute ("weak", DECL_ATTRIBUTES (init_fn))) ++ return; ++ start_preparsed_function (init_fn, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ declare_weak (init_fn); ++ finish_return_stmt (NULL_TREE); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++} ++ + /* Start the process of running a particular set of global constructors + or destructors. Subroutine of do_[cd]tors. Also called from + vtv_start_verification_constructor_init_function. */ +@@ -4822,22 +4840,24 @@ handle_tls_init (void) + finish_expr_stmt (cp_build_modify_expr (loc, guard, NOP_EXPR, + boolean_true_node, + tf_warning_or_error)); ++ auto_vec direct_calls; + for (; vars; vars = TREE_CHAIN (vars)) + { + tree var = TREE_VALUE (vars); + tree init = TREE_PURPOSE (vars); + one_static_initialization_or_destruction (var, init, true); + +- /* Output init aliases even with -fno-extern-tls-init. */ +- if (TARGET_SUPPORTS_ALIASES && TREE_PUBLIC (var)) ++ /* Output inits even with -fno-extern-tls-init. ++ We save the list here and output either an alias or a stub function ++ below. */ ++ if (TREE_PUBLIC (var)) + { +- tree single_init_fn = get_tls_init_fn (var); ++ tree single_init_fn = get_tls_init_fn (var); + if (single_init_fn == NULL_TREE) + continue; +- cgraph_node *alias +- = cgraph_node::get_create (fn)->create_same_body_alias +- (single_init_fn, fn); +- gcc_assert (alias != NULL); ++ if (single_init_fn == fn) ++ continue; ++ direct_calls.safe_push (single_init_fn); + } + } + +@@ -4845,6 +4865,30 @@ handle_tls_init (void) + finish_if_stmt (if_stmt); + finish_function_body (body); + expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ ++ /* For each TLS var that we have an init function, we either emit an alias ++ between that and the tls_init, or a stub function that just calls the ++ tls_init. */ ++ while (!direct_calls.is_empty()) ++ { ++ tree single_init_fn = direct_calls.pop (); ++ if (TARGET_SUPPORTS_ALIASES) ++ { ++ cgraph_node *alias ++ = cgraph_node::get_create (fn)->create_same_body_alias ++ (single_init_fn, fn); ++ gcc_assert (alias != NULL); ++ } ++ else ++ { ++ start_preparsed_function (single_init_fn, NULL_TREE, SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ tree r = build_call_expr (fn, 0); ++ finish_expr_stmt (r); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ } ++ } + } + + /* We're at the end of compilation, so generate any mangling aliases that +@@ -5273,7 +5317,14 @@ c_parse_final_cleanups (void) + } + + if (!DECL_INITIAL (decl) && decl_tls_wrapper_p (decl)) +- generate_tls_wrapper (decl); ++ { ++ generate_tls_wrapper (decl); ++ /* The wrapper might have a weak reference to an init, we provide ++ a dummy function to satisfy that here. The linker/dynamic ++ loader will override this with the actual init, if one is ++ required. */ ++ generate_tls_dummy_init (decl); ++ } + + if (!DECL_SAVED_TREE (decl)) + continue; +diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc +index 9c1bd32cff1..1ccbcfd3aca 100644 +--- a/gcc/cp/parser.cc ++++ b/gcc/cp/parser.cc +@@ -629,6 +629,91 @@ cp_lexer_alloc (void) + return lexer; + } + ++/* Context-sensitive parse-checking for clang-style attributes. */ ++ ++enum clang_attr_state { ++ CA_NONE = 0, ++ CA_ATTR, ++ CA_BR1, CA_BR2, ++ CA_LIST, ++ CA_LIST_ARGS, ++ CA_IS_CA, ++ CA_CA_ARGS, ++ CA_LIST_CONT ++}; ++ ++/* State machine tracking context of attribute lexing. */ ++ ++static enum clang_attr_state ++cp_lexer_attribute_state (cp_token& token, enum clang_attr_state attr_state) ++{ ++ /* Implement a context-sensitive parser for clang attributes. ++ We detect __attribute__((clang_style_attribute (ARGS))) and lex the ++ args ARGS with the following differences from GNU attributes: ++ (a) number-like values are lexed as strings [this allows lexing XX.YY.ZZ ++ version numbers]. ++ (b) we concatenate strings, since clang attributes allow this too. */ ++ switch (attr_state) ++ { ++ case CA_NONE: ++ if (token.type == CPP_KEYWORD ++ && token.keyword == RID_ATTRIBUTE) ++ attr_state = CA_ATTR; ++ break; ++ case CA_ATTR: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR1; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR1: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR2; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR2: ++ if (token.type == CPP_NAME) ++ { ++ tree identifier = (token.type == CPP_KEYWORD) ++ /* For keywords, use the canonical spelling, not the ++ parsed identifier. */ ++ ? ridpointers[(int) token.keyword] ++ : token.u.value; ++ identifier = canonicalize_attr_name (identifier); ++ if (attribute_clang_form_p (identifier)) ++ attr_state = CA_IS_CA; ++ else ++ attr_state = CA_LIST; ++ } ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_IS_CA: ++ case CA_LIST: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else if (token.type == CPP_OPEN_PAREN) ++ attr_state = attr_state == CA_IS_CA ? CA_CA_ARGS ++ : CA_LIST_ARGS; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_CA_ARGS: /* We will special-case args in this state. */ ++ case CA_LIST_ARGS: ++ if (token.type == CPP_CLOSE_PAREN) ++ attr_state = CA_LIST_CONT; ++ break; ++ case CA_LIST_CONT: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else ++ attr_state = CA_NONE; ++ break; ++ } ++ return attr_state; ++} ++ + /* Create a new main C++ lexer, the lexer that gets tokens from the + preprocessor. */ + +@@ -645,6 +730,8 @@ cp_lexer_new_main (void) + c_common_no_more_pch (); + + cp_lexer *lexer = cp_lexer_alloc (); ++ enum clang_attr_state attr_state = CA_NONE; ++ + /* Put the first token in the buffer. */ + cp_token *tok = lexer->buffer->quick_push (token); + +@@ -659,8 +746,15 @@ cp_lexer_new_main (void) + /* Process the previous token. */ + module_token_lang (tok->type, tok->keyword, tok->u.value, + tok->location, filter); ++ ++ attr_state = cp_lexer_attribute_state (*tok, attr_state); + tok = vec_safe_push (lexer->buffer, cp_token ()); +- cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok); ++ unsigned int flags = C_LEX_STRING_NO_JOIN; ++ /* If we are processing clang-style attribute args, lex numbers as ++ potential version strings; NN .. NN.MM .. NN.MM.OO */ ++ if (attr_state == CA_CA_ARGS) ++ flags |= C_LEX_NUMBER_AS_STRING; ++ cp_lexer_get_preprocessor_token (flags, tok); + } + + lexer->next_token = lexer->buffer->address (); +@@ -859,7 +953,7 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token) + { + static int is_extern_c = 0; + +- /* Get a new token from the preprocessor. */ ++ /* Get a new token from the preprocessor. */ + token->type + = c_lex_with_flags (&token->u.value, &token->location, &token->flags, + flags); +@@ -20831,11 +20925,13 @@ cp_parser_enum_specifier (cp_parser* parser) + + /* Check for the `:' that denotes a specified underlying type in C++0x. + Note that a ':' could also indicate a bitfield width, however. */ ++ location_t colon_loc = UNKNOWN_LOCATION; + if (cp_lexer_next_token_is (parser->lexer, CPP_COLON)) + { + cp_decl_specifier_seq type_specifiers; + + /* Consume the `:'. */ ++ colon_loc = cp_lexer_peek_token (parser->lexer)->location; + cp_lexer_consume_token (parser->lexer); + + auto tdf +@@ -20884,10 +20980,13 @@ cp_parser_enum_specifier (cp_parser* parser) + && cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)) + { + if (has_underlying_type) +- cp_parser_commit_to_tentative_parse (parser); +- cp_parser_error (parser, "expected %<;%> or %<{%>"); +- if (has_underlying_type) +- return error_mark_node; ++ pedwarn (colon_loc, ++ OPT_Welaborated_enum_base, ++ "declaration of enumeration with " ++ "fixed underlying type and no enumerator list is " ++ "only permitted as a standalone declaration"); ++ else ++ cp_parser_error (parser, "expected %<;%> or %<{%>"); + } + } + +@@ -28696,6 +28795,91 @@ cp_parser_gnu_attributes_opt (cp_parser* parser) + return attributes; + } + ++/* Parse the arguments list for a clang attribute. */ ++static tree ++cp_parser_clang_attribute (cp_parser *parser, tree/*attr_id*/) ++{ ++ /* Each entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ matching_parens parens; ++ if (!parens.require_open (parser)) ++ return NULL; ++ ++ bool save_translate_strings_p = parser->translate_strings_p; ++ parser->translate_strings_p = false; ++ tree attr_args = NULL_TREE; ++ cp_token *token; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_NAME) ++ name = token->u.value; ++ else if (token->type == CPP_KEYWORD) ++ name = ridpointers[(int) token->keyword]; ++ else if (token->flags & NAMED_OP) ++ name = get_identifier (cpp_type2name (token->type, token->flags)); ++ else ++ { ++ /* FIXME: context-sensitive for that attrib. */ ++ error_at (token->location, "expected an attribute keyword"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ cp_lexer_consume_token (parser->lexer); ++ ++ if (cp_lexer_next_token_is (parser->lexer, CPP_EQ)) ++ { ++ cp_lexer_consume_token (parser->lexer); /* eat the '=' */ ++ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_STRING) ++ value = cp_parser_string_literal (parser, /*translate=*/false, ++ /*wide_ok=*/false); ++ else ++ { ++ value = token->u.value; ++ cp_lexer_consume_token (parser->lexer); ++ } ++ } ++ /* else value is missing. */ ++ } ++ else if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ error_at (token->location, "expected %<,%>, %<=%> or %<)%>"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) ++ cp_lexer_consume_token (parser->lexer); ++ tree t = tree_cons (value, name, NULL_TREE); ++ attr_args = chainon (attr_args, t); ++ } while (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)); ++ ++ parser->translate_strings_p = save_translate_strings_p; ++ if (!parens.require_close (parser)) ++ return error_mark_node; ++ ++ return attr_args; ++} ++ + /* Parse a GNU attribute-list. + + attribute-list: +@@ -28755,9 +28939,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +- /* If it's an `(', then parse the attribute arguments. */ +- if (token->type == CPP_OPEN_PAREN) ++ if (token->type == CPP_OPEN_PAREN ++ && attribute_clang_form_p (identifier)) ++ arguments = cp_parser_clang_attribute (parser, identifier); ++ else if (token->type == CPP_OPEN_PAREN) + { ++ /* If it's an `(', then parse the attribute arguments. */ + vec *vec; + int attr_flag = (attribute_takes_identifier_p (identifier) + ? id_attr : normal_attr); +@@ -28772,12 +28959,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + arguments = build_tree_list_vec (vec); + release_tree_vector (vec); + } +- /* Save the arguments away. */ +- TREE_VALUE (attribute) = arguments; + } + + if (arguments != error_mark_node) + { ++ /* Save the arguments away. */ ++ TREE_VALUE (attribute) = arguments; + /* Add this attribute to the list. */ + TREE_CHAIN (attribute) = attribute_list; + attribute_list = attribute; +diff --git a/gcc/cumulative-args.h b/gcc/cumulative-args.h +new file mode 100644 +index 00000000000..b60928e37f9 +--- /dev/null ++++ b/gcc/cumulative-args.h +@@ -0,0 +1,20 @@ ++#ifndef GCC_CUMULATIVE_ARGS_H ++#define GCC_CUMULATIVE_ARGS_H ++ ++#if CHECKING_P ++ ++struct cumulative_args_t { void *magic; void *p; }; ++ ++#else /* !CHECKING_P */ ++ ++/* When using a GCC build compiler, we could use ++ __attribute__((transparent_union)) to get cumulative_args_t function ++ arguments passed like scalars where the ABI would mandate a less ++ efficient way of argument passing otherwise. However, that would come ++ at the cost of less type-safe !CHECKING_P compilation. */ ++ ++union cumulative_args_t { void *p; }; ++ ++#endif /* !CHECKING_P */ ++ ++#endif /* GCC_CUMULATIVE_ARGS_H */ +diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in +index f3e34c54015..0801eecfb47 100644 +--- a/gcc/d/Make-lang.in ++++ b/gcc/d/Make-lang.in +@@ -60,7 +60,7 @@ WARN_DFLAGS = -Wall -Wdeprecated $(NOCOMMON_FLAG) + ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \ + $(PICFLAG) $(ALIASING_FLAGS) $(COVERAGE_FLAGS) $(WARN_DFLAGS) + +-DCOMPILE.base = $(GDC) $(NO_PIE_CFLAGS) -c $(ALL_DFLAGS) -o $@ ++DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@ + DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo + DPOSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po + DLINKER = $(GDC) $(NO_PIE_FLAG) -lstdc++ +diff --git a/gcc/d/dmd/aggregate.h b/gcc/d/dmd/aggregate.h +index bdeb38e8b45..92a3dcdc0c6 100644 +--- a/gcc/d/dmd/aggregate.h ++++ b/gcc/d/dmd/aggregate.h +@@ -115,8 +115,8 @@ public: + Expression *getRTInfo; // pointer to GC info generated by object.RTInfo(this) + + Visibility visibility; +- bool noDefaultCtor; // no default construction +- bool disableNew; // disallow allocations using `new` ++ d_bool noDefaultCtor; // no default construction ++ d_bool disableNew; // disallow allocations using `new` + Sizeok sizeok; // set when structsize contains valid data + + virtual Scope *newScope(Scope *sc); +@@ -265,13 +265,13 @@ public: + // (does not include baseClass) + + BaseClasses *vtblInterfaces; // array of base interfaces that have +- // their own vtbl[] ++ // their own vtbl[] + + TypeInfoClassDeclaration *vclassinfo; // the ClassInfo object for this ClassDeclaration +- bool com; // true if this is a COM class (meaning it derives from IUnknown) +- bool stack; // true if this is a scope class ++ d_bool com; // true if this is a COM class (meaning it derives from IUnknown) ++ d_bool stack; // true if this is a scope class + int cppDtorVtblIndex; // slot reserved for the virtual destructor [extern(C++)] +- bool inuse; // to prevent recursive attempts ++ d_bool inuse; // to prevent recursive attempts + + ThreeState isabstract; // if abstract class + Baseok baseok; // set the progress of base classes resolving +diff --git a/gcc/d/dmd/attrib.h b/gcc/d/dmd/attrib.h +index 812729b3f27..0bed3efc814 100644 +--- a/gcc/d/dmd/attrib.h ++++ b/gcc/d/dmd/attrib.h +@@ -133,7 +133,7 @@ public: + class AnonDeclaration : public AttribDeclaration + { + public: +- bool isunion; ++ d_bool isunion; + int sem; // 1 if successful semantic() + unsigned anonoffset; // offset of anonymous struct + unsigned anonstructsize; // size of anonymous struct +@@ -177,8 +177,8 @@ class StaticIfDeclaration : public ConditionalDeclaration + { + public: + ScopeDsymbol *scopesym; +- bool addisdone; +- bool onStack; ++ d_bool addisdone; ++ d_bool onStack; + + StaticIfDeclaration *syntaxCopy(Dsymbol *s); + Dsymbols *include(Scope *sc); +@@ -194,8 +194,8 @@ class StaticForeachDeclaration : public AttribDeclaration + public: + StaticForeach *sfe; + ScopeDsymbol *scopesym; +- bool onStack; +- bool cached; ++ d_bool onStack; ++ d_bool cached; + Dsymbols *cache; + + StaticForeachDeclaration *syntaxCopy(Dsymbol *s); +@@ -228,7 +228,7 @@ public: + Expressions *exps; + + ScopeDsymbol *scopesym; +- bool compiled; ++ d_bool compiled; + + CompileDeclaration *syntaxCopy(Dsymbol *s); + void addMember(Scope *sc, ScopeDsymbol *sds); +diff --git a/gcc/d/dmd/common/outbuffer.h b/gcc/d/dmd/common/outbuffer.h +index fed25c0d030..d7a340da11a 100644 +--- a/gcc/d/dmd/common/outbuffer.h ++++ b/gcc/d/dmd/common/outbuffer.h +@@ -21,11 +21,11 @@ struct OutBuffer + private: + DArray data; + d_size_t offset; +- bool notlinehead; ++ d_bool notlinehead; + void *fileMapping; // pointer to a file mapping object not used on the C++ side + public: +- bool doindent; +- bool spaces; ++ d_bool doindent; ++ d_bool spaces; + int level; + + OutBuffer() +diff --git a/gcc/d/dmd/cond.h b/gcc/d/dmd/cond.h +index d69c13e8101..c45457ef16d 100644 +--- a/gcc/d/dmd/cond.h ++++ b/gcc/d/dmd/cond.h +@@ -50,7 +50,7 @@ public: + ForeachStatement *aggrfe; + ForeachRangeStatement *rangefe; + +- bool needExpansion; ++ d_bool needExpansion; + + StaticForeach *syntaxCopy(); + }; +diff --git a/gcc/d/dmd/declaration.h b/gcc/d/dmd/declaration.h +index 6fe4a221c3b..6679daa8f77 100644 +--- a/gcc/d/dmd/declaration.h ++++ b/gcc/d/dmd/declaration.h +@@ -165,7 +165,7 @@ class TupleDeclaration : public Declaration + { + public: + Objects *objects; +- bool isexp; // true: expression tuple ++ d_bool isexp; // true: expression tuple + + TypeTuple *tupletype; // !=NULL if this is a type tuple + +@@ -598,7 +598,7 @@ public: + + // set if someone took the address of this function + int tookAddressOf; +- bool requiresClosure; // this function needs a closure ++ d_bool requiresClosure; // this function needs a closure + + // local variables in this function which are referenced by nested functions + VarDeclarations closureVars; +@@ -699,7 +699,7 @@ class FuncAliasDeclaration : public FuncDeclaration + { + public: + FuncDeclaration *funcalias; +- bool hasOverloads; ++ d_bool hasOverloads; + + FuncAliasDeclaration *isFuncAliasDeclaration() { return this; } + const char *kind() const; +@@ -715,7 +715,7 @@ public: + Type *treq; // target of return type inference + + // backend +- bool deferToObj; ++ d_bool deferToObj; + + FuncLiteralDeclaration *syntaxCopy(Dsymbol *); + bool isNested() const; +@@ -735,7 +735,7 @@ public: + class CtorDeclaration : public FuncDeclaration + { + public: +- bool isCpCtor; ++ d_bool isCpCtor; + CtorDeclaration *syntaxCopy(Dsymbol *); + const char *kind() const; + const char *toChars() const; +diff --git a/gcc/d/dmd/dsymbol.h b/gcc/d/dmd/dsymbol.h +index 35500af4548..31fc9c8a243 100644 +--- a/gcc/d/dmd/dsymbol.h ++++ b/gcc/d/dmd/dsymbol.h +@@ -164,7 +164,7 @@ struct FieldState + unsigned fieldAlign; + unsigned bitOffset; + +- bool inFlight; ++ d_bool inFlight; + }; + + class Dsymbol : public ASTNode +@@ -178,7 +178,7 @@ public: + Loc loc; // where defined + Scope *_scope; // !=NULL means context to use for semantic() + const utf8_t *prettystring; +- bool errors; // this symbol failed to pass semantic() ++ d_bool errors; // this symbol failed to pass semantic() + PASS semanticRun; + unsigned short localNum; // perturb mangled name to avoid collisions with those in FuncDeclaration.localsymtab + DeprecatedDeclaration *depdecl; // customized deprecation message +diff --git a/gcc/d/dmd/expression.h b/gcc/d/dmd/expression.h +index 330dcdb77ec..c4fcb1b1683 100644 +--- a/gcc/d/dmd/expression.h ++++ b/gcc/d/dmd/expression.h +@@ -326,7 +326,7 @@ class DsymbolExp : public Expression + { + public: + Dsymbol *s; +- bool hasOverloads; ++ d_bool hasOverloads; + + DsymbolExp *syntaxCopy(); + bool isLvalue(); +@@ -470,8 +470,8 @@ public: + */ + int stageflags; + +- bool useStaticInit; // if this is true, use the StructDeclaration's init symbol +- bool isOriginal; // used when moving instances to indicate `this is this.origin` ++ d_bool useStaticInit; // if this is true, use the StructDeclaration's init symbol ++ d_bool isOriginal; // used when moving instances to indicate `this is this.origin` + OwnedBy ownedByCtfe; + + static StructLiteralExp *create(const Loc &loc, StructDeclaration *sd, void *elements, Type *stype = NULL); +@@ -530,8 +530,8 @@ public: + Expression *argprefix; // expression to be evaluated just before arguments[] + + CtorDeclaration *member; // constructor function +- bool onstack; // allocate on stack +- bool thrownew; // this NewExp is the expression of a ThrowStatement ++ d_bool onstack; // allocate on stack ++ d_bool thrownew; // this NewExp is the expression of a ThrowStatement + + static NewExp *create(const Loc &loc, Expression *thisexp, Type *newtype, Expressions *arguments); + NewExp *syntaxCopy(); +@@ -557,7 +557,7 @@ class SymbolExp : public Expression + public: + Declaration *var; + Dsymbol *originalScope; +- bool hasOverloads; ++ d_bool hasOverloads; + + void accept(Visitor *v) { v->visit(this); } + }; +@@ -579,7 +579,7 @@ public: + class VarExp : public SymbolExp + { + public: +- bool delegateWasExtracted; ++ d_bool delegateWasExtracted; + static VarExp *create(const Loc &loc, Declaration *var, bool hasOverloads = true); + bool equals(const RootObject *o) const; + bool isLvalue(); +@@ -755,9 +755,9 @@ class DotIdExp : public UnaExp + { + public: + Identifier *ident; +- bool noderef; // true if the result of the expression will never be dereferenced +- bool wantsym; // do not replace Symbol with its initializer during semantic() +- bool arrow; // ImportC: if -> instead of . ++ d_bool noderef; // true if the result of the expression will never be dereferenced ++ d_bool wantsym; // do not replace Symbol with its initializer during semantic() ++ d_bool arrow; // ImportC: if -> instead of . + + static DotIdExp *create(const Loc &loc, Expression *e, Identifier *ident); + void accept(Visitor *v) { v->visit(this); } +@@ -777,7 +777,7 @@ class DotVarExp : public UnaExp + { + public: + Declaration *var; +- bool hasOverloads; ++ d_bool hasOverloads; + + bool isLvalue(); + Expression *toLvalue(Scope *sc, Expression *e); +@@ -801,7 +801,7 @@ class DelegateExp : public UnaExp + { + public: + FuncDeclaration *func; +- bool hasOverloads; ++ d_bool hasOverloads; + VarDeclaration *vthis2; // container for multi-context + + +@@ -821,9 +821,9 @@ class CallExp : public UnaExp + public: + Expressions *arguments; // function arguments + FuncDeclaration *f; // symbol to call +- bool directcall; // true if a virtual call is devirtualized +- bool inDebugStatement; // true if this was in a debug statement +- bool ignoreAttributes; // don't enforce attributes (e.g. call @gc function in @nogc code) ++ d_bool directcall; // true if a virtual call is devirtualized ++ d_bool inDebugStatement; // true if this was in a debug statement ++ d_bool ignoreAttributes; // don't enforce attributes (e.g. call @gc function in @nogc code) + VarDeclaration *vthis2; // container for multi-context + + static CallExp *create(const Loc &loc, Expression *e, Expressions *exps); +@@ -882,7 +882,7 @@ public: + class DeleteExp : public UnaExp + { + public: +- bool isRAII; ++ d_bool isRAII; + void accept(Visitor *v) { v->visit(this); } + }; + +@@ -927,9 +927,9 @@ public: + Expression *upr; // NULL if implicit 0 + Expression *lwr; // NULL if implicit [length - 1] + VarDeclaration *lengthVar; +- bool upperIsInBounds; // true if upr <= e1.length +- bool lowerIsLessThanUpper; // true if lwr <= upr +- bool arrayop; // an array operation, rather than a slice ++ d_bool upperIsInBounds; // true if upr <= e1.length ++ d_bool lowerIsLessThanUpper; // true if lwr <= upr ++ d_bool arrayop; // an array operation, rather than a slice + + SliceExp *syntaxCopy(); + bool isLvalue(); +@@ -1001,8 +1001,8 @@ public: + class CommaExp : public BinExp + { + public: +- bool isGenerated; +- bool allowCommaExp; ++ d_bool isGenerated; ++ d_bool allowCommaExp; + bool isLvalue(); + Expression *toLvalue(Scope *sc, Expression *e); + Expression *modifiableLvalue(Scope *sc, Expression *e); +@@ -1015,8 +1015,8 @@ class IndexExp : public BinExp + { + public: + VarDeclaration *lengthVar; +- bool modifiable; +- bool indexIsInBounds; // true if 0 <= e2 && e2 <= e1.length - 1 ++ d_bool modifiable; ++ d_bool indexIsInBounds; // true if 0 <= e2 && e2 <= e1.length - 1 + + IndexExp *syntaxCopy(); + bool isLvalue(); +diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h +index 2a33692380e..6f230142770 100644 +--- a/gcc/d/dmd/globals.h ++++ b/gcc/d/dmd/globals.h +@@ -92,78 +92,78 @@ enum class FeatureState : signed char + // Put command line switches in here + struct Param + { +- bool obj; // write object file +- bool link; // perform link +- bool dll; // generate shared dynamic library +- bool lib; // write library file instead of object file(s) +- bool multiobj; // break one object file into multiple ones +- bool oneobj; // write one object file instead of multiple ones +- bool trace; // insert profiling hooks +- bool tracegc; // instrument calls to 'new' +- bool verbose; // verbose compile +- bool vcg_ast; // write-out codegen-ast +- bool showColumns; // print character (column) numbers in diagnostics +- bool vtls; // identify thread local variables +- bool vtemplates; // collect and list statistics on template instantiations +- bool vtemplatesListInstances; // collect and list statistics on template instantiations origins +- bool vgc; // identify gc usage +- bool vfield; // identify non-mutable field variables +- bool vcomplex; // identify complex/imaginary type usage +- bool vin; // identify 'in' parameters ++ d_bool obj; // write object file ++ d_bool link; // perform link ++ d_bool dll; // generate shared dynamic library ++ d_bool lib; // write library file instead of object file(s) ++ d_bool multiobj; // break one object file into multiple ones ++ d_bool oneobj; // write one object file instead of multiple ones ++ d_bool trace; // insert profiling hooks ++ d_bool tracegc; // instrument calls to 'new' ++ d_bool verbose; // verbose compile ++ d_bool vcg_ast; // write-out codegen-ast ++ d_bool showColumns; // print character (column) numbers in diagnostics ++ d_bool vtls; // identify thread local variables ++ d_bool vtemplates; // collect and list statistics on template instantiations ++ d_bool vtemplatesListInstances; // collect and list statistics on template instantiations origins ++ d_bool vgc; // identify gc usage ++ d_bool vfield; // identify non-mutable field variables ++ d_bool vcomplex; // identify complex/imaginary type usage ++ d_bool vin; // identify 'in' parameters + unsigned char symdebug; // insert debug symbolic information +- bool symdebugref; // insert debug information for all referenced types, too +- bool optimize; // run optimizer ++ d_bool symdebugref; // insert debug information for all referenced types, too ++ d_bool optimize; // run optimizer + Diagnostic useDeprecated; +- bool stackstomp; // add stack stomping code +- bool useUnitTests; // generate unittest code +- bool useInline; // inline expand functions ++ d_bool stackstomp; // add stack stomping code ++ d_bool useUnitTests; // generate unittest code ++ d_bool useInline; // inline expand functions + FeatureState useDIP25; // implement https://wiki.dlang.org/DIP25 + FeatureState useDIP1000; // implement https://dlang.org/spec/memory-safe-d.html#scope-return-params +- bool useDIP1021; // implement https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md +- bool release; // build release version +- bool preservePaths; // true means don't strip path from source file ++ d_bool useDIP1021; // implement https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md ++ d_bool release; // build release version ++ d_bool preservePaths; // true means don't strip path from source file + Diagnostic warnings; + unsigned char pic; // generate position-independent-code for shared libs +- bool color; // use ANSI colors in console output +- bool cov; // generate code coverage data ++ d_bool color; // use ANSI colors in console output ++ d_bool cov; // generate code coverage data + unsigned char covPercent; // 0..100 code coverage percentage required +- bool ctfe_cov; // generate coverage data for ctfe +- bool nofloat; // code should not pull in floating point support +- bool ignoreUnsupportedPragmas; // rather than error on them +- bool useModuleInfo; // generate runtime module information +- bool useTypeInfo; // generate runtime type information +- bool useExceptions; // support exception handling +- bool noSharedAccess; // read/write access to shared memory objects +- bool previewIn; // `in` means `scope const`, perhaps `ref`, accepts rvalues +- bool shortenedMethods; // allow => in normal function declarations +- bool betterC; // be a "better C" compiler; no dependency on D runtime +- bool addMain; // add a default main() function +- bool allInst; // generate code for all template instantiations +- bool fix16997; // fix integral promotions for unary + - ~ operators ++ d_bool ctfe_cov; // generate coverage data for ctfe ++ d_bool nofloat; // code should not pull in floating point support ++ d_bool ignoreUnsupportedPragmas; // rather than error on them ++ d_bool useModuleInfo; // generate runtime module information ++ d_bool useTypeInfo; // generate runtime type information ++ d_bool useExceptions; // support exception handling ++ d_bool noSharedAccess; // read/write access to shared memory objects ++ d_bool previewIn; // `in` means `scope const`, perhaps `ref`, accepts rvalues ++ d_bool shortenedMethods; // allow => in normal function declarations ++ d_bool betterC; // be a "better C" compiler; no dependency on D runtime ++ d_bool addMain; // add a default main() function ++ d_bool allInst; // generate code for all template instantiations ++ d_bool fix16997; // fix integral promotions for unary + - ~ operators + // https://issues.dlang.org/show_bug.cgi?id=16997 +- bool fixAliasThis; // if the current scope has an alias this, check it before searching upper scopes +- bool inclusiveInContracts; // 'in' contracts of overridden methods must be a superset of parent contract +- bool ehnogc; // use @nogc exception handling ++ d_bool fixAliasThis; // if the current scope has an alias this, check it before searching upper scopes ++ d_bool inclusiveInContracts; // 'in' contracts of overridden methods must be a superset of parent contract ++ d_bool ehnogc; // use @nogc exception handling + FeatureState dtorFields; // destruct fields of partially constructed objects + // https://issues.dlang.org/show_bug.cgi?id=14246 +- bool fieldwise; // do struct equality testing field-wise rather than by memcmp() ++ d_bool fieldwise; // do struct equality testing field-wise rather than by memcmp() + FeatureState rvalueRefParam; // allow rvalues to be arguments to ref parameters + CppStdRevision cplusplus; // version of C++ name mangling to support +- bool markdown; // enable Markdown replacements in Ddoc +- bool vmarkdown; // list instances of Markdown replacements in Ddoc +- bool showGaggedErrors; // print gagged errors anyway +- bool printErrorContext; // print errors with the error context (the error line in the source file) +- bool manual; // open browser on compiler manual +- bool usage; // print usage and exit +- bool mcpuUsage; // print help on -mcpu switch +- bool transitionUsage; // print help on -transition switch +- bool checkUsage; // print help on -check switch +- bool checkActionUsage; // print help on -checkaction switch +- bool revertUsage; // print help on -revert switch +- bool previewUsage; // print help on -preview switch +- bool externStdUsage; // print help on -extern-std switch +- bool hcUsage; // print help on -HC switch +- bool logo; // print logo; ++ d_bool markdown; // enable Markdown replacements in Ddoc ++ d_bool vmarkdown; // list instances of Markdown replacements in Ddoc ++ d_bool showGaggedErrors; // print gagged errors anyway ++ d_bool printErrorContext; // print errors with the error context (the error line in the source file) ++ d_bool manual; // open browser on compiler manual ++ d_bool usage; // print usage and exit ++ d_bool mcpuUsage; // print help on -mcpu switch ++ d_bool transitionUsage; // print help on -transition switch ++ d_bool checkUsage; // print help on -check switch ++ d_bool checkActionUsage; // print help on -checkaction switch ++ d_bool revertUsage; // print help on -revert switch ++ d_bool previewUsage; // print help on -preview switch ++ d_bool externStdUsage; // print help on -extern-std switch ++ d_bool hcUsage; // print help on -HC switch ++ d_bool logo; // print logo; + + CHECKENABLE useInvariants; // generate class invariant checks + CHECKENABLE useIn; // generate precondition checks +@@ -185,21 +185,21 @@ struct Param + DString objname; // .obj file output name + DString libname; // .lib file output name + +- bool doDocComments; // process embedded documentation comments ++ d_bool doDocComments; // process embedded documentation comments + DString docdir; // write documentation file to docdir directory + DString docname; // write documentation file to docname + Array ddocfiles; // macro include files for Ddoc + +- bool doHdrGeneration; // process embedded documentation comments ++ d_bool doHdrGeneration; // process embedded documentation comments + DString hdrdir; // write 'header' file to docdir directory + DString hdrname; // write 'header' file to docname +- bool hdrStripPlainFunctions; // strip the bodies of plain (non-template) functions ++ d_bool hdrStripPlainFunctions; // strip the bodies of plain (non-template) functions + + CxxHeaderMode doCxxHdrGeneration; // write 'Cxx header' file + DString cxxhdrdir; // write 'header' file to docdir directory + DString cxxhdrname; // write 'header' file to docname + +- bool doJsonGeneration; // write JSON file ++ d_bool doJsonGeneration; // write JSON file + DString jsonfilename; // write JSON file to jsonfilename + unsigned jsonFieldFlags; // JSON field flags to include + +@@ -220,13 +220,13 @@ struct Param + DString moduleDepsFile; // filename for deps output + OutBuffer *moduleDeps; // contents to be written to deps file + +- bool emitMakeDeps; // whether to emit makedeps ++ d_bool emitMakeDeps; // whether to emit makedeps + DString makeDepsFile; // filename for makedeps output + Array makeDeps; // dependencies for makedeps + + MessageStyle messageStyle; // style of file/line annotations on messages + +- bool run; // run resulting executable ++ d_bool run; // run resulting executable + Strings runargs; // arguments for executable + + // Linker stuff +@@ -244,7 +244,7 @@ struct Param + struct structalign_t + { + unsigned short value; +- bool pack; ++ d_bool pack; + + bool isDefault() const; + void setDefault(); +@@ -291,7 +291,7 @@ struct Global + Array* versionids; // command line versions and predefined versions + Array* debugids; // command line debug versions and predefined versions + +- bool hasMainFunction; ++ d_bool hasMainFunction; + unsigned varSequenceNumber; + + FileManager* fileManager; +diff --git a/gcc/d/dmd/identifier.h b/gcc/d/dmd/identifier.h +index 4c748beb5d8..795b0d17157 100644 +--- a/gcc/d/dmd/identifier.h ++++ b/gcc/d/dmd/identifier.h +@@ -17,7 +17,7 @@ class Identifier : public RootObject + { + private: + int value; +- bool isAnonymous_; ++ d_bool isAnonymous_; + DString string; + + public: +diff --git a/gcc/d/dmd/init.h b/gcc/d/dmd/init.h +index 73dc4bba2e4..718c01f8b51 100644 +--- a/gcc/d/dmd/init.h ++++ b/gcc/d/dmd/init.h +@@ -75,7 +75,7 @@ public: + Initializers value; // of Initializer *'s + unsigned dim; // length of array being initialized + Type *type; // type that array will be used to initialize +- bool sem; // true if semantic() is run ++ d_bool sem; // true if semantic() is run + + bool isAssociativeArray() const; + Expression *toAssocArrayLiteral(); +@@ -86,7 +86,7 @@ public: + class ExpInitializer : public Initializer + { + public: +- bool expandTuples; ++ d_bool expandTuples; + Expression *exp; + + void accept(Visitor *v) { v->visit(this); } +@@ -109,7 +109,7 @@ class CInitializer : public Initializer + public: + DesigInits initializerList; + Type *type; // type that array will be used to initialize +- bool sem; // true if semantic() is run ++ d_bool sem; // true if semantic() is run + + void accept(Visitor *v) { v->visit(this); } + }; +diff --git a/gcc/d/dmd/module.h b/gcc/d/dmd/module.h +index 048b3a0452c..539bbbbaae3 100644 +--- a/gcc/d/dmd/module.h ++++ b/gcc/d/dmd/module.h +@@ -75,8 +75,8 @@ public: + unsigned errors; // if any errors in file + unsigned numlines; // number of lines in source file + FileType filetype; // source file type +- bool hasAlwaysInlines; // contains references to functions that must be inlined +- bool isPackageFile; // if it is a package.d ++ d_bool hasAlwaysInlines; // contains references to functions that must be inlined ++ d_bool isPackageFile; // if it is a package.d + Package *pkg; // if isPackageFile is true, the Package that contains this package.d + Strings contentImportedFiles; // array of files whose content was imported + int needmoduleinfo; +@@ -165,7 +165,7 @@ struct ModuleDeclaration + Loc loc; + Identifier *id; + DArray packages; // array of Identifier's representing packages +- bool isdeprecated; // if it is a deprecated module ++ d_bool isdeprecated; // if it is a deprecated module + Expression *msg; + + const char *toChars() const; +diff --git a/gcc/d/dmd/mtype.h b/gcc/d/dmd/mtype.h +index 6ba47dfa34e..781571e8857 100644 +--- a/gcc/d/dmd/mtype.h ++++ b/gcc/d/dmd/mtype.h +@@ -584,7 +584,7 @@ struct ParameterList + Parameters* parameters; + StorageClass stc; + VarArg varargs; +- bool hasIdentifierList; // true if C identifier-list style ++ d_bool hasIdentifierList; // true if C identifier-list style + + size_t length(); + Parameter *operator[](size_t i) { return Parameter::getNth(parameters, i); } +@@ -774,7 +774,7 @@ class TypeStruct : public Type + public: + StructDeclaration *sym; + AliasThisRec att; +- bool inuse; ++ d_bool inuse; + + static TypeStruct *create(StructDeclaration *sym); + const char *kind(); +diff --git a/gcc/d/dmd/objc.h b/gcc/d/dmd/objc.h +index a03015489a4..c27aecbe44a 100644 +--- a/gcc/d/dmd/objc.h ++++ b/gcc/d/dmd/objc.h +@@ -37,8 +37,8 @@ struct ObjcSelector + + struct ObjcClassDeclaration + { +- bool isMeta; +- bool isExtern; ++ d_bool isMeta; ++ d_bool isExtern; + + Identifier* identifier; + ClassDeclaration* classDeclaration; +@@ -52,7 +52,7 @@ struct ObjcFuncDeclaration + { + ObjcSelector* selector; + VarDeclaration* selectorParameter; +- bool isOptional; ++ d_bool isOptional; + }; + + class Objc +diff --git a/gcc/d/dmd/root/dcompat.h b/gcc/d/dmd/root/dcompat.h +index 5823e7c4886..4e73d956034 100644 +--- a/gcc/d/dmd/root/dcompat.h ++++ b/gcc/d/dmd/root/dcompat.h +@@ -36,7 +36,7 @@ struct DString : public DArray + }; + + /// Corresponding C++ type that maps to D size_t +-#if __APPLE__ && __i386__ ++#if __APPLE__ && (__i386__ || __ppc__) + // size_t is 'unsigned long', which makes it mangle differently than D's 'uint' + typedef unsigned d_size_t; + #elif MARS && DMD_VERSION >= 2079 && DMD_VERSION <= 2081 && \ +@@ -49,3 +49,11 @@ typedef unsigned d_size_t; + #else + typedef size_t d_size_t; + #endif ++ ++/// Corresponding C++ type that maps to D bool ++#if __APPLE__ && __ppc__ ++// bool is defined as an 'int', which does not match same size as D ++typedef char d_bool; ++#else ++typedef bool d_bool; ++#endif +diff --git a/gcc/d/dmd/root/optional.h b/gcc/d/dmd/root/optional.h +index e4a41a06100..c28f0685ee4 100644 +--- a/gcc/d/dmd/root/optional.h ++++ b/gcc/d/dmd/root/optional.h +@@ -11,6 +11,8 @@ + * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.h + */ + ++#include "dcompat.h" // for d_bool ++ + /// Optional type that is either `empty` or contains a value of type `T` + template + struct Optional final +@@ -20,7 +22,7 @@ private: + T value; + + /** whether `value` is set **/ +- bool present; ++ d_bool present; + + public: + /** Creates an `Optional` with the given value **/ +diff --git a/gcc/d/dmd/scope.h b/gcc/d/dmd/scope.h +index a163e7577a2..8d1807684e6 100644 +--- a/gcc/d/dmd/scope.h ++++ b/gcc/d/dmd/scope.h +@@ -85,8 +85,8 @@ struct Scope + ForeachStatement *fes; // if nested function for ForeachStatement, this is it + Scope *callsc; // used for __FUNCTION__, __PRETTY_FUNCTION__ and __MODULE__ + Dsymbol *inunion; // !=null if processing members of a union +- bool nofree; // true if shouldn't free it +- bool inLoop; // true if inside a loop (where constructor calls aren't allowed) ++ d_bool nofree; // true if shouldn't free it ++ d_bool inLoop; // true if inside a loop (where constructor calls aren't allowed) + int intypeof; // in typeof(exp) + VarDeclaration *lastVar; // Previous symbol used to prevent goto-skips-init + +diff --git a/gcc/d/dmd/statement.h b/gcc/d/dmd/statement.h +index 66eddd8ab55..670fac1406b 100644 +--- a/gcc/d/dmd/statement.h ++++ b/gcc/d/dmd/statement.h +@@ -430,7 +430,7 @@ class SwitchStatement : public Statement + public: + Expression *condition; + Statement *_body; +- bool isFinal; ++ d_bool isFinal; + + DefaultStatement *sdefault; + Statement *tryBody; // set to TryCatchStatement or TryFinallyStatement if in _body portion +@@ -597,11 +597,11 @@ public: + + VarDeclaration *var; + // set if semantic processing errors +- bool errors; ++ d_bool errors; + + // was generated by the compiler, + // wasn't present in source code +- bool internalCatch; ++ d_bool internalCatch; + + Catch *syntaxCopy(); + }; +@@ -613,7 +613,7 @@ public: + Statement *finalbody; + + Statement *tryBody; // set to enclosing TryCatchStatement or TryFinallyStatement if in _body portion +- bool bodyFallsThru; // true if _body falls through to finally ++ d_bool bodyFallsThru; // true if _body falls through to finally + + static TryFinallyStatement *create(const Loc &loc, Statement *body, Statement *finalbody); + TryFinallyStatement *syntaxCopy(); +@@ -640,7 +640,7 @@ public: + Expression *exp; + // was generated by the compiler, + // wasn't present in source code +- bool internalThrow; ++ d_bool internalThrow; + + ThrowStatement *syntaxCopy(); + +@@ -682,7 +682,7 @@ public: + VarDeclaration *lastVar; + Statement *gotoTarget; // interpret + void* extra; // used by Statement_toIR() +- bool breaks; // someone did a 'break ident' ++ d_bool breaks; // someone did a 'break ident' + + LabelStatement *syntaxCopy(); + +@@ -694,8 +694,8 @@ class LabelDsymbol : public Dsymbol + public: + LabelStatement *statement; + +- bool deleted; // set if rewritten to return in foreach delegate +- bool iasm; // set if used by inline assembler ++ d_bool deleted; // set if rewritten to return in foreach delegate ++ d_bool iasm; // set if used by inline assembler + + static LabelDsymbol *create(Identifier *ident); + LabelDsymbol *isLabel(); +@@ -719,8 +719,8 @@ public: + code *asmcode; + unsigned asmalign; // alignment of this statement + unsigned regs; // mask of registers modified (must match regm_t in back end) +- bool refparam; // true if function parameter is referenced +- bool naked; // true if function is to be naked ++ d_bool refparam; // true if function parameter is referenced ++ d_bool naked; // true if function is to be naked + + InlineAsmStatement *syntaxCopy(); + void accept(Visitor *v) { v->visit(this); } +diff --git a/gcc/d/dmd/target.h b/gcc/d/dmd/target.h +index 096c16fd610..a7b2ff5c03e 100644 +--- a/gcc/d/dmd/target.h ++++ b/gcc/d/dmd/target.h +@@ -89,14 +89,14 @@ struct TargetCPP + Clang, + DigitalMars, + Gcc, +- Microsoft, +- Sun ++ Microsoft, ++ Sun + }; +- bool reverseOverloads; // with dmc and cl, overloaded functions are grouped and in reverse order +- bool exceptions; // set if catching C++ exceptions is supported +- bool twoDtorInVtable; // target C++ ABI puts deleting and non-deleting destructor into vtable +- bool splitVBasetable; // set if C++ ABI uses separate tables for virtual functions and virtual bases +- bool wrapDtorInExternD; // set if C++ dtors require a D wrapper to be callable from runtime ++ d_bool reverseOverloads; // with dmc and cl, overloaded functions are grouped and in reverse order ++ d_bool exceptions; // set if catching C++ exceptions is supported ++ d_bool twoDtorInVtable; // target C++ ABI puts deleting and non-deleting destructor into vtable ++ d_bool splitVBasetable; // set if C++ ABI uses separate tables for virtual functions and virtual bases ++ d_bool wrapDtorInExternD; // set if C++ dtors require a D wrapper to be callable from runtime + Runtime runtime; + + const char *toMangle(Dsymbol *s); +@@ -110,7 +110,7 @@ struct TargetCPP + + struct TargetObjC + { +- bool supported; // set if compiler can interface with Objective-C ++ d_bool supported; // set if compiler can interface with Objective-C + }; + + struct Target +@@ -156,15 +156,15 @@ struct Target + + DString architectureName; // name of the platform architecture (e.g. X86_64) + CPU cpu; // CPU instruction set to target +- bool is64bit; // generate 64 bit code for x86_64; true by default for 64 bit dmd +- bool isLP64; // pointers are 64 bits ++ d_bool is64bit; // generate 64 bit code for x86_64; true by default for 64 bit dmd ++ d_bool isLP64; // pointers are 64 bits + + // Environmental + DString obj_ext; /// extension for object files + DString lib_ext; /// extension for static library files + DString dll_ext; /// extension for dynamic library files +- bool run_noext; /// allow -run sources without extensions +- bool omfobj; /// for Win32: write OMF object files instead of COFF ++ d_bool run_noext; /// allow -run sources without extensions ++ d_bool omfobj; /// for Win32: write OMF object files instead of COFF + + template + struct FPTypeProperties +diff --git a/gcc/d/dmd/template.h b/gcc/d/dmd/template.h +index 86863769141..9c6cc40ea84 100644 +--- a/gcc/d/dmd/template.h ++++ b/gcc/d/dmd/template.h +@@ -63,12 +63,12 @@ public: + + Dsymbol *onemember; // if !=NULL then one member of this template + +- bool literal; // this template declaration is a literal +- bool ismixin; // template declaration is only to be used as a mixin +- bool isstatic; // this is static template declaration +- bool isTrivialAliasSeq; // matches `template AliasSeq(T...) { alias AliasSeq = T; } +- bool isTrivialAlias; // matches pattern `template Alias(T) { alias Alias = qualifiers(T); }` +- bool deprecated_; // this template declaration is deprecated ++ d_bool literal; // this template declaration is a literal ++ d_bool ismixin; // template declaration is only to be used as a mixin ++ d_bool isstatic; // this is static template declaration ++ d_bool isTrivialAliasSeq; // matches `template AliasSeq(T...) { alias AliasSeq = T; } ++ d_bool isTrivialAlias; // matches pattern `template Alias(T) { alias Alias = qualifiers(T); }` ++ d_bool deprecated_; // this template declaration is deprecated + Visibility visibility; + int inuse; // for recursive expansion detection + +@@ -119,7 +119,7 @@ public: + * A dependent template parameter should return MATCHexact in matchArg() + * to respect the match level of the corresponding precedent parameter. + */ +- bool dependent; ++ d_bool dependent; + + virtual TemplateTypeParameter *isTemplateTypeParameter(); + virtual TemplateValueParameter *isTemplateValueParameter(); +diff --git a/gcc/d/dmd/visitor.h b/gcc/d/dmd/visitor.h +index 5d6b94ccd02..da4680ca2fb 100644 +--- a/gcc/d/dmd/visitor.h ++++ b/gcc/d/dmd/visitor.h +@@ -657,6 +657,6 @@ public: + class StoppableVisitor : public Visitor + { + public: +- bool stop; ++ d_bool stop; + StoppableVisitor() : stop(false) {} + }; +diff --git a/gcc/doc/contrib.texi b/gcc/doc/contrib.texi +index e14cf5e4751..342cc8dd079 100644 +--- a/gcc/doc/contrib.texi ++++ b/gcc/doc/contrib.texi +@@ -1511,7 +1511,7 @@ Gael Thomas for @code{VMClassLoader} boot packages support suggestions. + + @item + Andreas Tobler for Darwin and Solaris testing and fixing, @code{Qt4} +-support for Darwin/OS X, @code{Graphics2D} support, @code{gtk+} ++support for Darwin / macOS, @code{Graphics2D} support, @code{gtk+} + updates. + + @item +diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi +index 90b2767e39a..cf36cde4e15 100644 +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -3198,6 +3198,8 @@ directive}: @samp{#if}, @samp{#ifdef} or @samp{#ifndef}. + * @code{__has_cpp_attribute}:: + * @code{__has_c_attribute}:: + * @code{__has_builtin}:: ++* @code{__has_feature}:: ++* @code{__has_extension}:: + * @code{__has_include}:: + @end menu + +@@ -3560,6 +3562,45 @@ the operator is as follows: + #endif + @end smallexample + ++@node @code{__has_feature} ++@subsection @code{__has_feature} ++@cindex @code{__has_feature} ++ ++The special operator @code{__has_feature (@var{operand})} may be used in ++constant integer contexts and in preprocessor @samp{#if} and @samp{#elif} ++expressions to test whether the identifier given in @var{operand} is recognized ++as a feature supported by GCC given the current options and, in the case of ++standard language features, whether the feature is available in the chosen ++version of the language standard. ++ ++Note that @code{__has_feature} and @code{__has_extension} are not recommended ++for use in new code, and are only provided for compatibility with Clang. For ++details of which identifiers are accepted by these function-like macros, see ++@w{@uref{https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension, ++the Clang documentation}}. ++ ++@node @code{__has_extension} ++@subsection @code{__has_extension} ++@cindex @code{__has_extension} ++ ++The special operator @code{__has_extension (@var{operand})} may be used in ++constant integer contexts and in preprocessor @samp{#if} and @samp{#elif} ++expressions to test whether the identifier given in @var{operand} is recognized ++as an extension supported by GCC given the current options. In any given ++context, the features accepted by @code{__has_extension} are a strict superset ++of those accepted by @code{__has_feature}. Unlike @code{__has_feature}, ++@code{__has_extension} tests whether a given feature is available regardless of ++strict language standards conformance. ++ ++If the @option{-pedantic-errors} flag is given, @code{__has_extension} is ++equivalent to @code{__has_feature}. ++ ++Note that @code{__has_feature} and @code{__has_extension} are not recommended ++for use in new code, and are only provided for compatibility with Clang. For ++details of which identifiers are accepted by these function-like macros, see ++@w{@uref{https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension, ++the Clang documentation}}. ++ + @node @code{__has_include} + @subsection @code{__has_include} + @cindex @code{__has_include} +diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi +index 0eb9bdcfac5..1a94cf3b3a2 100644 +--- a/gcc/doc/extend.texi ++++ b/gcc/doc/extend.texi +@@ -23796,7 +23796,7 @@ attribute, do change the value of preprocessor macros like + + The following pragmas are available for all architectures running the + Darwin operating system. These are useful for compatibility with other +-Mac OS compilers. ++macOS compilers. + + @table @code + @item mark @var{tokens}@dots{} +@@ -24975,7 +24975,7 @@ compiled separately. + @end table + + G++ implements the Borland model on targets where the linker supports it, +-including ELF targets (such as GNU/Linux), Mac OS X and Microsoft Windows. ++including ELF targets (such as GNU/Linux), macOS and Microsoft Windows. + Otherwise G++ implements neither automatic model. + + You have the following options for dealing with template instantiations: +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index d488b768987..5f7d1878bca 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -1031,14 +1031,26 @@ code. + + @item --enable-host-shared + Specify that the @emph{host} code should be built into position-independent +-machine code (with -fPIC), allowing it to be used within shared libraries, +-but yielding a slightly slower compiler. ++machine code (with @option{-fPIC}), allowing it to be used within shared ++libraries, but yielding a slightly slower compiler. + + This option is required when building the libgccjit.so library. + + Contrast with @option{--enable-shared}, which affects @emph{target} + libraries. + ++@item --enable-host-pie ++Specify that the @emph{host} executables should be built into ++position-independent executables (with @option{-fPIE} and @option{-pie}), ++yielding a slightly slower compiler (but faster than ++@option{--enable-host-shared}). Position-independent executables are loaded ++at random addresses each time they are executed, therefore provide additional ++protection against Return Oriented Programming (ROP) attacks. ++ ++@option{--enable-host-pie}) may be used with @option{--enable-host-shared}), ++in which case @option{-fPIC} is used when compiling, and @option{-pie} when ++linking. ++ + @item @anchor{with-gnu-as}--with-gnu-as + Specify that the compiler should assume that the + assembler it finds is the GNU assembler. However, this does not modify +@@ -1721,6 +1733,12 @@ particularly useful if you intend to use several versions of GCC in + parallel. The default is @samp{yes} for @samp{libada}, and @samp{no} for + the remaining libraries. + ++@item --with-darwin-extra-rpath ++This is provided to allow distributions to add a single additional ++runpath on Darwin / macOS systems. This allows for cases where the ++installed GCC library directories are then symlinked to a common ++directory outside of the GCC installation. ++ + @item @anchor{WithAixSoname}--with-aix-soname=@samp{aix}, @samp{svr4} or @samp{both} + Traditional AIX shared library versioning (versioned @code{Shared Object} + files as members of unversioned @code{Archive Library} files named +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index c83f667260e..d42de5518b7 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -252,7 +252,8 @@ in the following sections. + -Wdelete-non-virtual-dtor -Wno-deprecated-array-compare @gol + -Wdeprecated-copy -Wdeprecated-copy-dtor @gol + -Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion @gol +--Weffc++ -Wno-exceptions -Wextra-semi -Wno-inaccessible-base @gol ++-Weffc++ -Wno-elaborated-enum-base -Wno-exceptions -Wextra-semi @gol ++-Wno-inaccessible-base @gol + -Wno-inherited-variadic-ctor -Wno-init-list-lifetime @gol + -Winvalid-imported-macros @gol + -Wno-invalid-offsetof -Wno-literal-suffix @gol +@@ -680,7 +681,7 @@ Objective-C and Objective-C++ Dialects}. + -fverbose-asm -fpack-struct[=@var{n}] @gol + -fleading-underscore -ftls-model=@var{model} @gol + -fstack-reuse=@var{reuse_level} @gol +--ftrampolines -ftrapv -fwrapv @gol ++-ftrampolines -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} -ftrapv -fwrapv @gol + -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} @gol + -fstrict-volatile-bitfields -fsync-libcalls} + +@@ -904,7 +905,7 @@ Objective-C and Objective-C++ Dialects}. + -twolevel_namespace -umbrella -undefined @gol + -unexported_symbols_list -weak_reference_mismatches @gol + -whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} @gol +--mkernel -mone-byte-bool} ++-mkernel -mone-byte-bool -munreachable-traps} + + @emph{DEC Alpha Options} + @gccoptlist{-mno-fp-regs -msoft-float @gol +@@ -3637,6 +3638,15 @@ to result in dangling pointers. Since the underlying array for an + it is easy to inadvertently keep a pointer to the array past the end + of the array's lifetime. For example: + ++@item -Wno-elaborated-enum-base ++@opindex Welaborated-enum-base ++@opindex Wno-elaborated-enum-base ++For C++11 and above, warn if an (invalid) additional enum-base is used ++in an elaborated-type-specifier. That is, if an enum with given ++underlying type and no enumerator list is used in a declaration other ++than just a standalone declaration of the enum. Enabled by default. This ++warning is upgraded to an error with -pedantic-errors. ++ + @itemize @bullet + @item + If a function returns a temporary @code{initializer_list}, or a local +@@ -4522,7 +4532,7 @@ Use @var{class-name} as the name of the class to instantiate for each + literal string specified with the syntax @code{@@"@dots{}"}. The default + class name is @code{NXConstantString} if the GNU runtime is being used, and + @code{NSConstantString} if the NeXT runtime is being used (see below). On +-Darwin (macOS, MacOS X) platforms, the @option{-fconstant-cfstrings} option, if ++Darwin / macOS platforms, the @option{-fconstant-cfstrings} option, if + also present, overrides the @option{-fconstant-string-class} setting and cause + @code{@@"@dots{}"} literals to be laid out as constant CoreFoundation strings. + Note that @option{-fconstant-cfstrings} is an alias for the target-specific +@@ -4536,7 +4546,7 @@ runtime. This is the default for most types of systems. + @item -fnext-runtime + @opindex fnext-runtime + Generate output compatible with the NeXT runtime. This is the default +-for NeXT-based systems, including Darwin and Mac OS X@. The macro ++for NeXT-based systems, including Darwin / macOS. The macro + @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is + used. + +@@ -5722,8 +5732,45 @@ Give an error whenever the @dfn{base standard} (see @option{-Wpedantic}) + requires a diagnostic, in some cases where there is undefined behavior + at compile-time and in some other cases that do not prevent compilation + of programs that are valid according to the standard. This is not +-equivalent to @option{-Werror=pedantic}, since there are errors enabled +-by this option and not enabled by the latter and vice versa. ++equivalent to @option{-Werror=pedantic}: the latter option is unlikely to be ++useful, as it only makes errors of the diagnostics that are controlled by ++@option{-Wpedantic}, whereas this option also affects required diagnostics that ++are always enabled or controlled by options other than @option{-Wpedantic}. ++ ++If you want the required diagnostics that are warnings by default to ++be errors instead, but don't also want to enable the @option{-Wpedantic} ++diagnostics, you can specify @option{-pedantic-errors -Wno-pedantic} ++(or @option{-pedantic-errors -Wno-error=pedantic} to enable them but ++only as warnings). ++ ++Some required diagnostics are errors by default, but can be reduced to ++warnings using @option{-fpermissive} or their specific warning option, ++e.g. @option{-Wno-error=narrowing}. ++ ++Some diagnostics for non-ISO practices are controlled by specific ++warning options other than @option{-Wpedantic}, but are also made ++errors by @option{-pedantic-errors}. For instance: ++ ++@gccoptlist{ ++-Wattributes @r{(for standard attributes)} ++-Wchanges-meaning @r{(C++)} ++-Wcomma-subscript @r{(C++23 or later)} ++-Wdeclaration-after-statement @r{(C90 or earlier)} ++-Welaborated-enum-base @r{(C++11 or later)} ++-Wimplicit-int @r{(C99 or later)} ++-Wimplicit-function-declaration @r{(C99 or later)} ++-Wincompatible-pointer-types ++-Wint-conversion ++-Wlong-long @r{(C90 or earlier)} ++-Wmain ++-Wnarrowing @r{(C++11 or later)} ++-Wpointer-arith ++-Wpointer-sign ++-Wincompatible-pointer-types ++-Wregister @r{(C++17 or later)} ++-Wvla @r{(C90 or earlier)} ++-Wwrite-strings @r{(C++11 or later)} ++} + + @item -Wall + @opindex Wall +@@ -10292,7 +10339,7 @@ possible. + Produce debugging information in DWARF format (if that is supported). + The value of @var{version} may be either 2, 3, 4 or 5; the default + version for most targets is 5 (with the exception of VxWorks, TPF and +-Darwin/Mac OS X, which default to version 2, and AIX, which defaults ++Darwin / macOS, which default to version 2, and AIX, which defaults + to version 4). + + Note that with DWARF Version 2, some ports require and always +@@ -17080,6 +17127,17 @@ the behavior of older compilers in which temporaries' stack space is + not reused, the aggressive stack reuse can lead to runtime errors. This + option is used to control the temporary stack reuse optimization. + ++@item -fstack-use-cumulative-args ++@opindex fstack_use_cumulative_args ++This option instructs the compiler to use the ++@code{cumulative_args_t}-based stack layout target hooks, ++@code{TARGET_FUNCTION_ARG_BOUNDARY_CA} and ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA}. If a given target does ++not define these hooks, the default behaviour is to fallback to using ++the standard non-@code{_CA} variants instead. Certain targets (such as ++AArch64 Darwin) require using the more advanced @code{_CA}-based ++hooks: For these targets this option should be enabled by default. ++ + @item -ftrapv + @opindex ftrapv + This option generates traps for signed overflow on addition, subtraction, +@@ -17565,6 +17623,21 @@ For languages other than Ada, the @code{-ftrampolines} and + trampolines are always generated on platforms that need them + for nested functions. + ++@opindex ftrampoline-impl ++@item -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} ++By default, trampolines are generated on stack. However, certain platforms ++(such as the Apple M1) do not permit an executable stack. Compiling with ++@option{-ftrampoline-impl=heap} generate calls to ++@code{__gcc_nested_func_ptr_created} and ++@code{__gcc_nested_func_ptr_deleted} in order to allocate and ++deallocate trampoline space on the executable heap. These functions are ++implemented in libgcc, and will only be provided on specific targets: ++x86_64 Darwin, x86_64 and aarch64 Linux. @emph{PLEASE NOTE}: Heap ++trampolines are @emph{not} guaranteed to be correctly deallocated if you ++@code{setjmp}, instantiate nested functions, and then @code{longjmp} back ++to a state prior to having allocated those nested functions. ++ ++@opindex fvisibility + @item -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} + @opindex fvisibility + Set the default ELF image symbol visibility to the specified option---all +@@ -22850,6 +22923,12 @@ without that switch. Using this switch may require recompiling all + other modules in a program, including system libraries. Use this + switch to conform to a non-default data model. + ++@item -munreachable-traps ++@itemx -munreachable-traps ++@opindex munreachable-traps ++Causes @code{__builtin_unreachable} to be rendered as a trap. This is the ++default for all Darwin architectures. ++ + @item -mfix-and-continue + @itemx -ffix-and-continue + @itemx -findirect-data +@@ -22896,6 +22975,14 @@ an executable when linking, using the Darwin @file{libtool} command. + This causes GCC's output file to have the @samp{ALL} subtype, instead of + one controlled by the @option{-mcpu} or @option{-march} option. + ++@opindex nodefaultrpaths ++@item -nodefaultrpaths ++Do not add default run paths for the compiler library directories to ++executables, modules or dynamic libraries. On macOS 10.5 and later, ++the embedded runpath is added by default unless the user adds ++@option{-nodefaultrpaths} to the link line. Run paths are needed ++(and therefore enforced) to build on macOS version 10.11 or later. ++ + @item -allowable_client @var{client_name} + @itemx -client_name + @itemx -compatibility_version +@@ -28806,7 +28893,7 @@ the same as @option{-mbig}. + + @item -mdynamic-no-pic + @opindex mdynamic-no-pic +-On Darwin and Mac OS X systems, compile code so that it is not ++On Darwin / macOS systems, compile code so that it is not + relocatable, but that its external references are relocatable. The + resulting code is suitable for applications, but not shared + libraries. +diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi +index 6d1a5fa7607..b978fb415c6 100644 +--- a/gcc/doc/plugins.texi ++++ b/gcc/doc/plugins.texi +@@ -44,7 +44,7 @@ Plugins are loaded with + + Where @var{name} is the plugin name and @var{ext} is the platform-specific + dynamic library extension. It should be @code{dll} on Windows/MinGW, +-@code{dylib} on Darwin/Mac OS X, and @code{so} on all other platforms. ++@code{dylib} on Darwin/macOS, and @code{so} on all other platforms. + The plugin arguments are parsed by GCC and passed to respective + plugins as key-value pairs. Multiple plugins can be invoked by + specifying multiple @option{-fplugin} arguments. +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index c5006afc00d..c44c4ff1978 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -1025,6 +1025,10 @@ also define the hook to @code{default_promote_function_mode_always_promote} + if you would like to apply the same rules given by @code{PROMOTE_MODE}. + @end deftypefn + ++@deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE_CA (cumulative_args_t, @var{function_arg_info}, @var{const_tree}, int *@var{}, @var{int}) ++Like @code{promote_function_mode}, but takes a cumulative_args pointer and a current arg to supply the input. ++@end deftypefn ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -4322,6 +4326,16 @@ with the specified mode and type. The default hook returns + @code{PARM_BOUNDARY} for all arguments. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument alignment, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}. ++@end deftypefn ++ + @deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY (machine_mode @var{mode}, const_tree @var{type}) + Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY}, + which is the default value for this hook. You can define this hook to +@@ -4329,6 +4343,16 @@ return a different value if an argument size must be rounded to a larger + value. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument size rounding, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. ++@end deftypefn ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -5728,7 +5752,7 @@ This hook determines whether a function from a class of functions + Set this macro to 1 to use the "NeXT" Objective-C message sending conventions + by default. This calling convention involves passing the object, the selector + and the method arguments all at once to the method-lookup library function. +-This is the usual setting when targeting Darwin/Mac OS X systems, which have ++This is the usual setting when targeting Darwin / macOS systems, which have + the NeXT runtime installed. + + If the macro is set to 0, the "GNU" Objective-C message sending convention +@@ -12527,6 +12551,11 @@ This target hook can be used to generate a target-specific code + If selftests are enabled, run any selftests for this target. + @end deftypefn + ++@deftypefn {Target Hook} bool TARGET_UNREACHABLE_SHOULD_TRAP (void) ++This hook should return @code{true} if the target wants @code{__builtin_unreachable} to expand to a trap or @code{abort ()}. ++ The default value is false. ++@end deftypefn ++ + @deftypefn {Target Hook} bool TARGET_MEMTAG_CAN_TAG_ADDRESSES () + True if the backend architecture naturally supports ignoring some region + of pointers. This feature means that @option{-fsanitize=hwaddress} can +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index f869ddd5e5b..7fb14849efc 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -935,6 +935,8 @@ applied. + + @hook TARGET_PROMOTE_FUNCTION_MODE + ++@hook TARGET_PROMOTE_FUNCTION_MODE_CA ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -3330,8 +3332,12 @@ required. + + @hook TARGET_FUNCTION_ARG_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_BOUNDARY_CA ++ + @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -3997,7 +4003,7 @@ macro, a reasonable default is used. + Set this macro to 1 to use the "NeXT" Objective-C message sending conventions + by default. This calling convention involves passing the object, the selector + and the method arguments all at once to the method-lookup library function. +-This is the usual setting when targeting Darwin/Mac OS X systems, which have ++This is the usual setting when targeting Darwin / macOS systems, which have + the NeXT runtime installed. + + If the macro is set to 0, the "GNU" Objective-C message sending convention +@@ -8164,6 +8170,8 @@ maintainer is familiar with. + + @hook TARGET_RUN_TARGET_SELFTESTS + ++@hook TARGET_UNREACHABLE_SHOULD_TRAP ++ + @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES + + @hook TARGET_MEMTAG_TAG_SIZE +diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in +index cf7222745fb..2b98aa14551 100644 +--- a/gcc/exec-tool.in ++++ b/gcc/exec-tool.in +@@ -23,6 +23,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" + ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" + ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" + ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ++ORIGINAL_LLD_FOR_TARGET="@ORIGINAL_LLD_FOR_TARGET@" ++ORIGINAL_CLASSIC_LD_FOR_TARGET="@ORIGINAL_CLASSIC_LD_FOR_TARGET@" + ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" + ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" + ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@" +@@ -39,24 +41,41 @@ case "$invoked" in + dir=gas + ;; + collect-ld) +- # Check -fuse-ld=bfd and -fuse-ld=gold +- case " $* " in +- *\ -fuse-ld=bfd\ *) +- original=$ORIGINAL_LD_BFD_FOR_TARGET +- ;; +- *\ -fuse-ld=gold\ *) +- original=$ORIGINAL_LD_GOLD_FOR_TARGET +- ;; +- *) +- # when using a linker plugin, gcc will always pass '-plugin' as the +- # first or second option to the linker. +- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then +- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET +- else +- original=$ORIGINAL_LD_FOR_TARGET +- fi +- ;; +- esac ++ # when using a linker plugin, gcc will always pass '-plugin' as the ++ # first or second option to the linker. ++ if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then ++ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET ++ else ++ original=$ORIGINAL_LD_FOR_TARGET ++ fi ++ # Check -fuse-ld=bfd, -fuse-ld=gold and -fuse-ld=classic ++ # Remove -fuse-ld=classic from the command line ++ for arg do ++ # temporarily, remove the arg. ++ shift ++ case $arg in ++ -fuse-ld=bfd) ++ original=$ORIGINAL_LD_BFD_FOR_TARGET ++ ;; ++ -fuse-ld=gold) ++ original=$ORIGINAL_LD_GOLD_FOR_TARGET ++ ;; ++ -fuse-ld=lld) ++ original=$ORIGINAL_LLD_FOR_TARGET ++ # We want to remove this from the command line; by the slightly ++ # obtuse mechanism of not putting it back. ++ continue ++ ;; ++ -fuse-ld=classic) ++ original=$ORIGINAL_CLASSIC_LD_FOR_TARGET ++ # As for lld. ++ continue ++ ;; ++ *) ;; ++ esac ++ # if we want to keep the arg, put it back. ++ set -- "$@" "$arg" ++ done + prog=ld-new$exeext + if test "$original" = ../gold/ld-new$exeext; then + dir=gold +diff --git a/gcc/explow.cc b/gcc/explow.cc +index d8aa75ee9ba..2695b6afc9d 100644 +--- a/gcc/explow.cc ++++ b/gcc/explow.cc +@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see + #include "langhooks.h" + #include "except.h" + #include "dojump.h" ++#include "calls.h" + #include "explow.h" + #include "expr.h" + #include "stringpool.h" +@@ -817,6 +818,16 @@ promote_function_mode (const_tree type, machine_mode mode, int *punsignedp, + return mode; + } + } ++ ++machine_mode ++promote_function_mode (cumulative_args_t args_so_far, function_arg_info arg, ++ const_tree funtype, int *punsignedp , int for_return) ++{ ++ return targetm.calls.promote_function_mode_ca (args_so_far, arg, funtype, ++ punsignedp, for_return); ++// return promote_function_mode (arg.type, arg.mode, punsignedp, funtype, for_return); ++} ++ + /* Return the mode to use to store a scalar of TYPE and MODE. + PUNSIGNEDP points to the signedness of the type and may be adjusted + to show what signedness to use on extension operations. */ +diff --git a/gcc/explow.h b/gcc/explow.h +index 2b9f7e43215..159da9ac642 100644 +--- a/gcc/explow.h ++++ b/gcc/explow.h +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_EXPLOW_H + #define GCC_EXPLOW_H + ++#include "calls.h" /* for cummulative args stuff. */ ++ + /* Return a memory reference like MEMREF, but which is known to have a + valid address. */ + extern rtx validize_mem (rtx); +@@ -47,8 +49,13 @@ extern rtx force_not_mem (rtx); + + /* Return mode and signedness to use when an argument or result in the + given mode is promoted. */ +-extern machine_mode promote_function_mode (const_tree, machine_mode, int *, +- const_tree, int); ++machine_mode promote_function_mode (const_tree, machine_mode, int *, ++ const_tree, int); ++ ++/* Return mode and signedness to use when an argument or result in the ++ given mode is promoted. */ ++machine_mode promote_function_mode (cumulative_args_t, function_arg_info, ++ const_tree, int *, int); + + /* Return mode and signedness to use when an object in the given mode + is promoted. */ +diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi +index d34e0b5e8f9..b895d99be69 100644 +--- a/gcc/fortran/gfortran.texi ++++ b/gcc/fortran/gfortran.texi +@@ -978,7 +978,7 @@ low level file descriptor corresponding to an open Fortran unit. Then, + using e.g. the @code{ISO_C_BINDING} feature, one can call the + underlying system call to flush dirty data to stable storage, such as + @code{fsync} on POSIX, @code{_commit} on MingW, or @code{fcntl(fd, +-F_FULLSYNC, 0)} on Mac OS X. The following example shows how to call ++F_FULLSYNC, 0)} on macOS. The following example shows how to call + fsync: + + @smallexample +diff --git a/gcc/function.cc b/gcc/function.cc +index d84a3240ee1..8ea53c3418e 100644 +--- a/gcc/function.cc ++++ b/gcc/function.cc +@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3. If not see + #include "varasm.h" + #include "except.h" + #include "dojump.h" +-#include "explow.h" + #include "calls.h" ++#include "explow.h" + #include "expr.h" + #include "optabs-tree.h" + #include "output.h" +@@ -2445,7 +2445,10 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + else if (DECL_CHAIN (parm)) + data->arg.named = 1; /* Not the last non-variadic parm. */ + else if (targetm.calls.strict_argument_naming (all->args_so_far)) +- data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ { ++ data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ data->arg.last_named = 1; ++ } + else + data->arg.named = 0; /* Treat as variadic. */ + +@@ -2487,9 +2490,12 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + + /* Find mode as it is passed by the ABI. */ + unsignedp = TYPE_UNSIGNED (data->arg.type); +- data->arg.mode +- = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, +- TREE_TYPE (current_function_decl), 0); ++// data->arg.mode ++// = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, ++// TREE_TYPE (current_function_decl), 0); ++ data->arg.mode = promote_function_mode (all->args_so_far, data->arg, ++ TREE_TYPE (current_function_decl), ++ &unsignedp, 0); + } + + /* A subroutine of assign_parms. Invoke setup_incoming_varargs. */ +@@ -2502,6 +2508,7 @@ assign_parms_setup_varargs (struct assign_parm_data_all *all, + + function_arg_info last_named_arg = data->arg; + last_named_arg.named = true; ++ last_named_arg.last_named = true; + targetm.calls.setup_incoming_varargs (all->args_so_far, last_named_arg, + &varargs_pretend_bytes, no_rtl); + +@@ -2610,7 +2617,9 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all, + + locate_and_pad_parm (data->arg.mode, data->arg.type, in_regs, + all->reg_parm_stack_space, +- entry_parm ? data->partial : 0, current_function_decl, ++ entry_parm ? data->partial : 0, ++ all->args_so_far, ++ current_function_decl, + &all->stack_args_size, &data->locate); + + /* Update parm_stack_boundary if this parameter is passed in the +@@ -3924,7 +3933,8 @@ gimplify_parameters (gimple_seq *cleanup) + if (data.arg.pass_by_reference) + { + tree type = TREE_TYPE (data.arg.type); +- function_arg_info orig_arg (type, data.arg.named); ++ function_arg_info orig_arg (type, data.arg.named, ++ data.arg.last_named); + if (reference_callee_copied (&all.args_so_far_v, orig_arg)) + { + tree local, t; +@@ -4027,6 +4037,7 @@ gimplify_parameters (gimple_seq *cleanup) + void + locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + int reg_parm_stack_space, int partial, ++ cumulative_args_t ca, + tree fndecl ATTRIBUTE_UNUSED, + struct args_size *initial_offset_ptr, + struct locate_and_pad_arg_data *locate) +@@ -4064,9 +4075,23 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + ? arg_size_in_bytes (type) + : size_int (GET_MODE_SIZE (passed_mode))); + where_pad = targetm.calls.function_arg_padding (passed_mode, type); +- boundary = targetm.calls.function_arg_boundary (passed_mode, type); +- round_boundary = targetm.calls.function_arg_round_boundary (passed_mode, +- type); ++ ++ if (flag_stack_use_cumulative_args) ++ { ++ boundary = targetm.calls.function_arg_boundary_ca (passed_mode, ++ type, ++ ca); ++ round_boundary = targetm.calls.function_arg_round_boundary_ca ++ (passed_mode, type, ca); ++ } ++ else ++ { ++ boundary = targetm.calls.function_arg_boundary (passed_mode, ++ type); ++ round_boundary = targetm.calls.function_arg_round_boundary ++ (passed_mode, type); ++ } ++ + locate->where_pad = where_pad; + + /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */ +diff --git a/gcc/function.h b/gcc/function.h +index a53fb24d217..4dc16c64717 100644 +--- a/gcc/function.h ++++ b/gcc/function.h +@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_FUNCTION_H + #define GCC_FUNCTION_H + ++#include "cumulative-args.h" + + /* Stack of pending (incomplete) sequences saved by `start_sequence'. + Each element describes one pending sequence. +@@ -661,6 +662,7 @@ extern int aggregate_value_p (const_tree, const_tree); + extern bool use_register_for_decl (const_tree); + extern gimple_seq gimplify_parameters (gimple_seq *); + extern void locate_and_pad_parm (machine_mode, tree, int, int, int, ++ cumulative_args_t, + tree, struct args_size *, + struct locate_and_pad_arg_data *); + extern void generate_setjmp_warnings (void); +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index fbcc9d03314..bd2b90ce16f 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -574,6 +574,7 @@ or with constant text in a single argument. + %l process LINK_SPEC as a spec. + %L process LIB_SPEC as a spec. + %M Output multilib_os_dir. ++ %P Output a RUNPATH_OPTION for each directory in startfile_prefixes. + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. +@@ -1193,6 +1194,10 @@ proper position among the other output files. */ + # define SYSROOT_HEADERS_SUFFIX_SPEC "" + #endif + ++#ifndef RUNPATH_OPTION ++# define RUNPATH_OPTION "-rpath" ++#endif ++ + static const char *asm_debug = ASM_DEBUG_SPEC; + static const char *asm_debug_option = ASM_DEBUG_OPTION_SPEC; + static const char *cpp_spec = CPP_SPEC; +@@ -5897,6 +5902,7 @@ struct spec_path_info { + size_t append_len; + bool omit_relative; + bool separate_options; ++ bool realpaths; + }; + + static void * +@@ -5906,6 +5912,16 @@ spec_path (char *path, void *data) + size_t len = 0; + char save = 0; + ++ /* The path must exist; we want to resolve it to the realpath so that this ++ can be embedded as a runpath. */ ++ if (info->realpaths) ++ path = lrealpath (path); ++ ++ /* However, if we failed to resolve it - perhaps because there was a bogus ++ -B option on the command line, then punt on this entry. */ ++ if (!path) ++ return NULL; ++ + if (info->omit_relative && !IS_ABSOLUTE_PATH (path)) + return NULL; + +@@ -6137,6 +6153,22 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + info.omit_relative = false; + #endif + info.separate_options = false; ++ info.realpaths = false; ++ ++ for_each_path (&startfile_prefixes, true, 0, spec_path, &info); ++ } ++ break; ++ ++ case 'P': ++ { ++ struct spec_path_info info; ++ ++ info.option = RUNPATH_OPTION; ++ info.append_len = 0; ++ info.omit_relative = false; ++ info.separate_options = true; ++ /* We want to embed the actual paths that have the libraries. */ ++ info.realpaths = true; + + for_each_path (&startfile_prefixes, true, 0, spec_path, &info); + } +@@ -6463,6 +6495,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + info.append_len = strlen (info.append); + info.omit_relative = false; + info.separate_options = true; ++ info.realpaths = false; + + for_each_path (&include_prefixes, false, info.append_len, + spec_path, &info); +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index 79e296d4a66..a9caa0467ba 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -427,9 +427,8 @@ typedef struct { + /* _Float128 is defined as a basic type, so max_align_t must be + sufficiently aligned for it. This code must work in C++, so we + use __float128 here; that is only available on some +- architectures, but only on i386 is extra alignment needed for +- __float128. */ +-#ifdef __i386__ ++ architectures. */ ++#if defined(__i386__) || (__APPLE__ && __aarch64__) + __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); + #endif + } max_align_t; +diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in +index 33ed7e357a2..e78a496de89 100644 +--- a/gcc/jit/Make-lang.in ++++ b/gcc/jit/Make-lang.in +@@ -69,7 +69,7 @@ LIBGCCJIT_COMPAT = 0 + LIBGCCJIT_BASENAME = libgccjit + + LIBGCCJIT_SONAME = \ +- ${libdir}/$(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib ++ $(DARWIN_RPATH)/$(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib + LIBGCCJIT_FILENAME = $(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib + LIBGCCJIT_LINKER_NAME = $(LIBGCCJIT_BASENAME).dylib + +diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc +index 79714132b91..a475379671e 100644 +--- a/gcc/jit/jit-playback.cc ++++ b/gcc/jit/jit-playback.cc +@@ -3000,7 +3000,7 @@ invoke_driver (const char *ctxt_progname, + ADD_ARG ("-fno-use-linker-plugin"); + + #if defined (DARWIN_X86) || defined (DARWIN_PPC) +- /* OS X's linker defaults to treating undefined symbols as errors. ++ /* macOS's linker defaults to treating undefined symbols as errors. + If the context has any imported functions or globals they will be + undefined until the .so is dynamically-linked into the process. + Ensure that the driver passes in "-undefined dynamic_lookup" to the +diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h +index b3c389e93f6..925c5c23c0c 100644 +--- a/gcc/jit/libgccjit.h ++++ b/gcc/jit/libgccjit.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #define LIBGCCJIT_H + + #include ++#ifdef __APPLE__ ++# include /* For ssize_t. */ ++#endif + + #ifdef __cplusplus + extern "C" { +diff --git a/gcc/objc/objc-act.cc b/gcc/objc/objc-act.cc +index 4820c5dbac3..ba98ff0b85d 100644 +--- a/gcc/objc/objc-act.cc ++++ b/gcc/objc/objc-act.cc +@@ -3319,7 +3319,7 @@ objc_build_string_object (tree string) + length = TREE_STRING_LENGTH (string) - 1; + + /* The target may have different ideas on how to construct an ObjC string +- literal. On Darwin (Mac OS X), for example, we may wish to obtain a ++ literal. On Darwin / macOS, for example, we may wish to obtain a + constant CFString reference instead. + At present, this is only supported for the NeXT runtime. */ + if (flag_next_runtime +@@ -10364,5 +10364,51 @@ objc_common_tree_size (enum tree_code code) + } + } + ++/* Information for Objective-C-specific features known to __has_feature. */ ++ ++struct objc_feature_info ++{ ++ typedef bool (*predicate_t) (); ++ ++ const char *ident; ++ predicate_t predicate; ++ ++ constexpr objc_feature_info (const char *name) ++ : ident (name), predicate (nullptr) {} ++ constexpr objc_feature_info (const char *name, predicate_t p) ++ : ident (name), predicate (p) {} ++ ++ bool has_feature () const ++ { ++ return predicate ? predicate () : true; ++ } ++}; ++ ++static bool objc_nonfragile_abi_p () ++{ ++ return flag_next_runtime && flag_objc_abi >= 2; ++} ++ ++static constexpr objc_feature_info objc_features[] = ++{ ++ { "objc_default_synthesize_properties" }, ++ { "objc_instancetype" }, ++ { "objc_nonfragile_abi", objc_nonfragile_abi_p } ++}; ++ ++/* Register Objective-C-specific features for __has_feature. */ ++ ++void ++objc_common_register_features () ++{ ++ for (unsigned i = 0; i < ARRAY_SIZE (objc_features); i++) ++ { ++ const objc_feature_info *info = objc_features + i; ++ if (!info->has_feature ()) ++ continue; ++ ++ c_common_register_feature (info->ident, true); ++ } ++} + + #include "gt-objc-objc-act.h" +diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h +index 7d0c6d5077f..62f0f440cf4 100644 +--- a/gcc/objc/objc-act.h ++++ b/gcc/objc/objc-act.h +@@ -28,6 +28,9 @@ const char *objc_printable_name (tree, int); + int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *); + void objc_common_init_ts (void); + ++/* Register features common to Objective-C and Objective-C++. */ ++void objc_common_register_features (); ++ + /* NB: The remaining public functions are prototyped in c-common.h, for the + benefit of stub-objc.cc and objc-act.cc. */ + +diff --git a/gcc/objc/objc-lang.cc b/gcc/objc/objc-lang.cc +index ef664f555b0..3fd7b0f9265 100644 +--- a/gcc/objc/objc-lang.cc ++++ b/gcc/objc/objc-lang.cc +@@ -50,6 +50,16 @@ enum c_language_kind c_language = clk_objc; + /* Each front end provides its own lang hook initializer. */ + struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ objc_common_register_features (); ++ c_register_features (); ++} ++ + /* Lang hook routines common to C and ObjC appear in c-objc-common.cc; + there should be very few (if any) routines below. */ + +diff --git a/gcc/objcp/objcp-lang.cc b/gcc/objcp/objcp-lang.cc +index 2e8809b865d..6582460e1a9 100644 +--- a/gcc/objcp/objcp-lang.cc ++++ b/gcc/objcp/objcp-lang.cc +@@ -82,6 +82,16 @@ objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain, + #undef RECURSE + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ objc_common_register_features (); ++ cp_register_features (); ++} ++ + static void + objcxx_init_ts (void) + { +diff --git a/gcc/opts.cc b/gcc/opts.cc +index a97630d1c9a..40cf287cc69 100644 +--- a/gcc/opts.cc ++++ b/gcc/opts.cc +@@ -3147,6 +3147,7 @@ common_handle_option (struct gcc_options *opts, + break; + + case OPT_fuse_ld_bfd: ++ case OPT_fuse_ld_classic: + case OPT_fuse_ld_gold: + case OPT_fuse_ld_lld: + case OPT_fuse_ld_mold: +diff --git a/gcc/plugin.cc b/gcc/plugin.cc +index cbe4b7eff60..d30634bde9c 100644 +--- a/gcc/plugin.cc ++++ b/gcc/plugin.cc +@@ -189,10 +189,10 @@ add_new_plugin (const char* plugin_name) + #if defined(__MINGW32__) + static const char plugin_ext[] = ".dll"; + #elif defined(__APPLE__) +- /* Mac OS has two types of libraries: dynamic libraries (.dylib) and ++ /* macOS has two types of libraries: dynamic libraries (.dylib) and + plugins (.bundle). Both can be used with dlopen()/dlsym() but the + former cannot be linked at build time (i.e., with the -lfoo linker +- option). A GCC plugin is therefore probably a Mac OS plugin but their ++ option). A GCC plugin is therefore probably a macOS plugin but their + use seems to be quite rare and the .bundle extension is more of a + recommendation rather than the rule. This raises the questions of how + well they are supported by tools (e.g., libtool). So to avoid +diff --git a/gcc/target.def b/gcc/target.def +index d85adf36a39..0f5667500a4 100644 +--- a/gcc/target.def ++++ b/gcc/target.def +@@ -4551,6 +4551,13 @@ if you would like to apply the same rules given by @code{PROMOTE_MODE}.", + const_tree funtype, int for_return), + default_promote_function_mode) + ++DEFHOOK ++(promote_function_mode_ca, ++ "Like @code{promote_function_mode}, but takes a cumulative_args pointer \ ++ and a current arg to supply the input.", ++ machine_mode, (cumulative_args_t, function_arg_info, const_tree, int *, int), ++ default_promote_function_mode_ca) ++ + DEFHOOK + (promote_prototypes, + "This target hook returns @code{true} if an argument declared in a\n\ +@@ -4967,6 +4974,18 @@ with the specified mode and type. The default hook returns\n\ + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_boundary) + ++DEFHOOK ++(function_arg_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument alignment, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_boundary_ca) ++ + DEFHOOK + (function_arg_round_boundary, + "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\ +@@ -4976,6 +4995,18 @@ value.", + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_round_boundary) + ++DEFHOOK ++(function_arg_round_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument size rounding, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_round_boundary_ca) ++ + /* Return the diagnostic message string if function without a prototype + is not allowed for this 'val' argument; NULL otherwise. */ + DEFHOOK +@@ -7111,6 +7142,16 @@ DEFHOOKPOD + @option{-fsanitize=shadow-call-stack}. The default value is false.", + bool, false) + ++/* This value represents whether __builtin_unreachable should be expanded ++ as a trap instruction (or an abort() if the trap is not available). */ ++DEFHOOK ++(unreachable_should_trap, ++ "This hook should return @code{true} if the target wants \ ++ @code{__builtin_unreachable} to expand to a trap or @code{abort ()}.\n\ ++ The default value is false.", ++ bool, (void), ++ hook_bool_void_false) ++ + /* Close the 'struct gcc_target' definition. */ + HOOK_VECTOR_END (C90_EMPTY_HACK) + +diff --git a/gcc/target.h b/gcc/target.h +index d6fa6931499..7f8f488e154 100644 +--- a/gcc/target.h ++++ b/gcc/target.h +@@ -51,22 +51,8 @@ + #include "insn-codes.h" + #include "tm.h" + #include "hard-reg-set.h" +- +-#if CHECKING_P +- +-struct cumulative_args_t { void *magic; void *p; }; +- +-#else /* !CHECKING_P */ +- +-/* When using a GCC build compiler, we could use +- __attribute__((transparent_union)) to get cumulative_args_t function +- arguments passed like scalars where the ABI would mandate a less +- efficient way of argument passing otherwise. However, that would come +- at the cost of less type-safe !CHECKING_P compilation. */ +- +-union cumulative_args_t { void *p; }; +- +-#endif /* !CHECKING_P */ ++#include "tree-core.h" ++#include "cumulative-args.h" + + /* Types of memory operation understood by the "by_pieces" infrastructure. + Used by the TARGET_USE_BY_PIECES_INFRASTRUCTURE_P target hook and +diff --git a/gcc/targhooks.cc b/gcc/targhooks.cc +index 399d6f874dc..6651ad872aa 100644 +--- a/gcc/targhooks.cc ++++ b/gcc/targhooks.cc +@@ -158,6 +158,15 @@ default_promote_function_mode_always_promote (const_tree type, + return promote_mode (type, mode, punsignedp); + } + ++machine_mode ++default_promote_function_mode_ca (cumulative_args_t, function_arg_info arg, ++ const_tree funtype, int *punsignedp, ++ int for_return) ++{ ++ return promote_function_mode (arg.type, arg.mode, punsignedp, ++ funtype, for_return); ++} ++ + machine_mode + default_cc_modes_compatible (machine_mode m1, machine_mode m2) + { +@@ -850,6 +859,14 @@ default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_boundary (mode, type); ++} ++ + unsigned int + default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + const_tree type ATTRIBUTE_UNUSED) +@@ -857,6 +874,14 @@ default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_round_boundary (mode, type); ++} ++ + void + hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED) + { +diff --git a/gcc/targhooks.h b/gcc/targhooks.h +index ecce55ebe79..5aa565bb3b7 100644 +--- a/gcc/targhooks.h ++++ b/gcc/targhooks.h +@@ -34,6 +34,9 @@ extern machine_mode default_promote_function_mode (const_tree, machine_mode, + extern machine_mode default_promote_function_mode_always_promote + (const_tree, machine_mode, int *, const_tree, int); + ++extern machine_mode default_promote_function_mode_ca ++ (cumulative_args_t, function_arg_info, const_tree, int *, int); ++ + extern machine_mode default_cc_modes_compatible (machine_mode, + machine_mode); + +@@ -154,6 +157,12 @@ extern unsigned int default_function_arg_boundary (machine_mode, + const_tree); + extern unsigned int default_function_arg_round_boundary (machine_mode, + const_tree); ++extern unsigned int default_function_arg_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); ++extern unsigned int default_function_arg_round_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); + extern bool hook_bool_const_rtx_commutative_p (const_rtx, int); + extern rtx default_function_value (const_tree, const_tree, bool); + extern HARD_REG_SET default_zero_call_used_regs (HARD_REG_SET); +diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp +index 8683a2ab435..ee051ea13e1 100644 +--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp ++++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp +@@ -28,6 +28,7 @@ + + # Load procedures from common libraries. + load_lib gfortran-dg.exp ++load_lib atomic-dg.exp + + # If a testcase doesn't have special options, use these. + global DEFAULT_FFLAGS +@@ -47,6 +48,7 @@ global gfortran_test_path + global gfortran_aux_module_flags + set gfortran_test_path $srcdir/$subdir + set gfortran_aux_module_flags $DEFAULT_FFLAGS ++ + proc dg-compile-aux-modules { args } { + global gfortran_test_path + global gfortran_aux_module_flags +@@ -68,12 +70,6 @@ proc dg-compile-aux-modules { args } { + } + } + +-# Add -latomic only where supported. Assume built-in support elsewhere. +-set maybe_atomic_lib "" +-if [check_effective_target_libatomic_available] { +- set maybe_atomic_lib "-latomic" +-} +- + # Main loop. + foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] { + # If we're only testing specific files and this isn't one of them, skip it. +@@ -97,14 +93,14 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] + foreach flags $option_list { + verbose "Testing $nshort (single), $flags" 1 + set gfortran_aux_module_flags "-fcoarray=single $flags" +- dg-test $test "-fcoarray=single $flags $maybe_atomic_lib" "" ++ dg-test $test "-fcoarray=single $flags" {} + cleanup-modules "" + } + + foreach flags $option_list { + verbose "Testing $nshort (libcaf_single), $flags" 1 + set gfortran_aux_module_flags "-fcoarray=lib $flags -lcaf_single" +- dg-test $test "-fcoarray=lib $flags -lcaf_single $maybe_atomic_lib" "" ++ dg-test $test "-fcoarray=lib $flags -lcaf_single" {} + cleanup-modules "" + } + } +diff --git a/gcc/testsuite/gfortran.dg/dg.exp b/gcc/testsuite/gfortran.dg/dg.exp +index bd7ad95ad0d..1b228cc546e 100644 +--- a/gcc/testsuite/gfortran.dg/dg.exp ++++ b/gcc/testsuite/gfortran.dg/dg.exp +@@ -18,6 +18,7 @@ + + # Load support procs. + load_lib gfortran-dg.exp ++load_lib atomic-dg.exp + + # If a testcase doesn't have special options, use these. + global DEFAULT_FFLAGS +@@ -53,13 +54,14 @@ proc dg-compile-aux-modules { args } { + } + } + ++set all_flags $DEFAULT_FFLAGS ++ + # Main loop. + gfortran-dg-runtest [lsort \ +- [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] "" $DEFAULT_FFLAGS ++ [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] "" $all_flags + + gfortran-dg-runtest [lsort \ +- [glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] "" $DEFAULT_FFLAGS +- ++ [glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] "" $all_flags + + # All done. + dg-finish +diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp +index 7e0f85dc9b0..88c6ece8caa 100644 +--- a/gcc/testsuite/lib/asan-dg.exp ++++ b/gcc/testsuite/lib/asan-dg.exp +@@ -78,7 +78,7 @@ proc asan_link_flags_1 { paths lib } { + || [file exists "${gccpath}/libsanitizer/${lib}/.libs/lib${lib}.${shlib_ext}"] } { + append flags " -B${gccpath}/libsanitizer/ " + append flags " -B${gccpath}/libsanitizer/${lib}/ " +- append flags " -L${gccpath}/libsanitizer/${lib}/.libs " ++ append flags " -B${gccpath}/libsanitizer/${lib}/.libs " + append ld_library_path ":${gccpath}/libsanitizer/${lib}/.libs" + } + } else { +diff --git a/gcc/testsuite/lib/atomic-dg.exp b/gcc/testsuite/lib/atomic-dg.exp +index 86dcfa674ea..c9244fb6cac 100644 +--- a/gcc/testsuite/lib/atomic-dg.exp ++++ b/gcc/testsuite/lib/atomic-dg.exp +@@ -33,7 +33,7 @@ proc atomic_link_flags { paths } { + if { [file exists "${gccpath}/libatomic/.libs/libatomic.a"] + || [file exists "${gccpath}/libatomic/.libs/libatomic.${shlib_ext}"] } { + append flags " -B${gccpath}/libatomic/ " +- append flags " -L${gccpath}/libatomic/.libs" ++ append flags " -B${gccpath}/libatomic/.libs" + append ld_library_path ":${gccpath}/libatomic/.libs" + } + } else { +diff --git a/gcc/testsuite/lib/gdc.exp b/gcc/testsuite/lib/gdc.exp +index 73bc61780c8..2ca0dd1fb75 100644 +--- a/gcc/testsuite/lib/gdc.exp ++++ b/gcc/testsuite/lib/gdc.exp +@@ -133,6 +133,28 @@ proc gdc_link_flags { paths } { + set include_cxx_flags 0 + } + ++ # We need to add options to locate libgphobos and libstdc++ ++ # Usually '-L' options are added to point to the relevant directories for ++ # the uninstalled libraries. ++ ++ # In cases where libraries are available as both shared and convenience ++ # some additional checks are made. ++ ++ # For some targets -static-xxxx options are handled by specs substitution ++ # and need a '-B' option rather than '-L'. For Darwin, when embedded ++ # runpaths are in use (the default for all versions after macOS 10.11), ++ # '-B' is also needed to provide the runpath. ++ # When '-B' is used, this results in a '-L' for each path that exists (so ++ # that appending a '-L' as well is a needless duplicate). There are also ++ # cases where tools warn for duplicates, leading to spurious fails. ++ # Therefore the objective of the code below is to add just one '-L' or ++ # '-B' for each of the libraries. ++ ++ set target_wants_B_option 0 ++ if { [istarget *-*-darwin9* ] || [istarget *-*-darwin\[12\]* ] } { ++ set target_wants_B_option 1 ++ } ++ + if { $gccpath != "" } { + # Path to libgphobos.spec. + append flags "-B${gccpath}/libphobos/src " +@@ -143,7 +165,11 @@ proc gdc_link_flags { paths } { + + if { [file exists "${gccpath}/libphobos/src/.libs/libgphobos.a"] \ + || [file exists "${gccpath}/libphobos/src/.libs/libgphobos.${shlib_ext}"] } { +- append flags "-L${gccpath}/libphobos/src/.libs " ++ if { $target_wants_B_option } { ++ append flags "-B${gccpath}/libphobos/src/.libs " ++ } else { ++ append flags "-L${gccpath}/libphobos/src/.libs " ++ } + append ld_library_path ":${gccpath}/libphobos/src/.libs" + } + # Static linking is default. If only the shared lib is available adjust +@@ -163,7 +189,11 @@ proc gdc_link_flags { paths } { + if $include_cxx_flags { + if { [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] \ + || [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.${shlib_ext}"] } { +- append flags "-L${gccpath}/libstdc++-v3/src/.libs " ++ if { $target_wants_B_option } { ++ append flags "-B${gccpath}/libstdc++-v3/src/.libs " ++ } else { ++ append flags "-L${gccpath}/libstdc++-v3/src/.libs " ++ } + append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs" + } + } +@@ -173,7 +203,11 @@ proc gdc_link_flags { paths } { + + set libphobos [lookfor_file ${tool_root_dir} libgphobos] + if { $libphobos != "" } { +- append flags "-B${libphobos} -L${libphobos} " ++ if { $target_wants_B_option } { ++ append flags "-B${libphobos} " ++ } else { ++ append flags " -L${libphobos} " ++ } + append ld_library_path ":${libphobos}" + } + set libiberty [lookfor_file ${tool_root_dir} libiberty] +diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp +index 5f692d8f350..38239f8f8c8 100644 +--- a/gcc/testsuite/lib/gfortran.exp ++++ b/gcc/testsuite/lib/gfortran.exp +@@ -79,6 +79,7 @@ proc gfortran_link_flags { paths } { + global ld_library_path + global GFORTRAN_UNDER_TEST + global shlib_ext ++ global ENABLE_DARWIN_AT_RPATH + + set gccpath ${paths} + set libio_dir "" +@@ -87,39 +88,63 @@ proc gfortran_link_flags { paths } { + set shlib_ext [get_shlib_extension] + verbose "shared lib extension: $shlib_ext" + ++ # We need to add options to locate libgfortran and the dependent libs ++ # libquadmath (supporting REAL*16) and libatomic (supporting operations ++ # used by coarrays). Usually '-L' options are added to point to the ++ # relevant directories for the uninstalled libraries. ++ ++ # In cases where libraries are available as both shared and convenience ++ # some additional checks are made. ++ ++ # For some targets -static-xxxx options are handled by specs substitution ++ # and need a '-B' option rather than '-L'. For Darwin, when embedded ++ # runpaths are in use (the default for all versions after macOS 10.11), ++ # '-B' is also needed to provide the runpath. ++ # When '-B' is used, this results in a '-L' for each path that exists (so ++ # that appending a '-L' as well is a needless duplicate). There are also ++ # cases where tools warn for duplicates, leading to spurious fails. ++ # Therefore the objective of the code below is to add just one '-L' or ++ # '-B' for each of the libraries. ++ ++ set target_wants_B_option 0 ++ if { [istarget *-*-darwin9* ] || [istarget *-*-darwin\[12\]* ] } { ++ set target_wants_B_option 1 ++ } ++ + if { $gccpath != "" } { +- if [file exists "${gccpath}/libgfortran/.libs/libgfortran.a"] { +- # Some targets use libgfortran.a%s in their specs, so they need a -B option +- # for uninstalled testing. +- append flags "-B${gccpath}/libgfortran/.libs " +- append flags "-L${gccpath}/libgfortran/.libs " +- append ld_library_path ":${gccpath}/libgfortran/.libs" +- } +- if [file exists "${gccpath}/libgfortran/.libs/libgfortran.${shlib_ext}"] { +- append flags "-L${gccpath}/libgfortran/.libs " +- append ld_library_path ":${gccpath}/libgfortran/.libs" +- } + if [file exists "${gccpath}/libgfortran/libgforbegin.a"] { + append flags "-L${gccpath}/libgfortran " + } +- if [file exists "${gccpath}/libatomic/.libs/libatomic.${shlib_ext}"] { +- append flags "-L${gccpath}/libatomic/.libs " +- append ld_library_path ":${gccpath}/libatomic/.libs" ++ if { [file exists "${gccpath}/libgfortran/.libs/libgfortran.a"] || ++ [file exists "${gccpath}/libgfortran/.libs/libgfortran.${shlib_ext}"] } { ++ if { $target_wants_B_option } { ++ append flags "-B${gccpath}/libgfortran/.libs " ++ } else { ++ append flags "-L${gccpath}/libgfortran/.libs " ++ } ++ append ld_library_path ":${gccpath}/libgfortran/.libs" + } +- if [file exists "${gccpath}/libatomic/libatomic.a"] { +- append flags "-L${gccpath}/libatomic " ++ ++ if { [file exists "${gccpath}/libatomic/.libs/libatomic.a"] || ++ [file exists "${gccpath}/libatomic/.libs/libatomic.${shlib_ext}"] } { ++ if { $target_wants_B_option } { ++ append flags "-B${gccpath}/libatomic/.libs " ++ } else { ++ append flags "-L${gccpath}/libatomic/.libs " ++ } ++ append ld_library_path ":${gccpath}/libatomic/.libs" + } +- if [file exists "${gccpath}/libquadmath/.libs/libquadmath.a"] { +- # Some targets use libquadmath.a%s in their specs, so they need a -B option +- # for uninstalled testing. ++ ++ if { [file exists "${gccpath}/libquadmath/.libs/libquadmath.a"] || ++ [file exists "${gccpath}/libquadmath/.libs/libquadmath.${shlib_ext}"] } { ++ if { $target_wants_B_option } { + append flags "-B${gccpath}/libquadmath/.libs " ++ } else { + append flags "-L${gccpath}/libquadmath/.libs " +- append ld_library_path ":${gccpath}/libquadmath/.libs" +- } +- if [file exists "${gccpath}/libquadmath/.libs/libquadmath.${shlib_ext}"] { +- append flags "-L${gccpath}/libquadmath/.libs " +- append ld_library_path ":${gccpath}/libquadmath/.libs" ++ } ++ append ld_library_path ":${gccpath}/libquadmath/.libs" + } ++ + if [file exists "${gccpath}/libiberty/libiberty.a"] { + append flags "-L${gccpath}/libiberty " + } +diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp +index d09cd515d20..24f5710396c 100644 +--- a/gcc/testsuite/lib/target-libpath.exp ++++ b/gcc/testsuite/lib/target-libpath.exp +@@ -67,6 +67,7 @@ proc set_ld_library_path_env_vars { } { + global orig_dyld_library_path + global orig_path + global orig_gcc_exec_prefix ++ global ENABLE_DARWIN_AT_RPATH + global env + + # Save the original GCC_EXEC_PREFIX. +@@ -133,6 +134,7 @@ proc set_ld_library_path_env_vars { } { + # + # Doing this is somewhat of a hack as ld_library_path gets repeated in + # SHLIB_PATH and LD_LIBRARY_PATH when unix_load sets these variables. ++ if { ![istarget *-*-darwin*] } { + if { $orig_ld_library_path_saved } { + setenv LD_LIBRARY_PATH "$ld_library_path:$orig_ld_library_path" + } else { +@@ -166,10 +168,22 @@ proc set_ld_library_path_env_vars { } { + } else { + setenv LD_LIBRARY_PATH_64 "$ld_library_path" + } +- if { $orig_dyld_library_path_saved } { +- setenv DYLD_LIBRARY_PATH "$ld_library_path:$orig_dyld_library_path" +- } else { +- setenv DYLD_LIBRARY_PATH "$ld_library_path" ++ } ++ if { [istarget *-*-darwin*] } { ++ if { [info exists ENABLE_DARWIN_AT_RPATH] || [istarget *-*-darwin1\[5-9\]*] ++ || [istarget *-*-darwin20*] } { ++ # Either we are not using DYLD_LIBRARY_PATH or we're on a version of the ++ # OS for which it is not passed through system exes. ++ if [info exists env(DYLD_LIBRARY_PATH)] { ++ unsetenv DYLD_LIBRARY_PATH ++ } ++ } else { ++ if { $orig_dyld_library_path_saved } { ++ setenv DYLD_LIBRARY_PATH "$ld_library_path:$orig_dyld_library_path" ++ } else { ++ setenv DYLD_LIBRARY_PATH "$ld_library_path" ++ } ++ } + } + if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } { + if { $orig_path_saved } { +@@ -179,6 +193,7 @@ proc set_ld_library_path_env_vars { } { + } + } + ++ verbose -log "set paths" + verbose -log "LD_LIBRARY_PATH=[getenv LD_LIBRARY_PATH]" + verbose -log "LD_RUN_PATH=[getenv LD_RUN_PATH]" + verbose -log "SHLIB_PATH=[getenv SHLIB_PATH]" +diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp +index 64216dfbdb2..809bc46fa80 100644 +--- a/gcc/testsuite/lib/target-supports.exp ++++ b/gcc/testsuite/lib/target-supports.exp +@@ -11959,3 +11959,15 @@ main: + .byte 0 + } ""] + } ++ ++# Return 1 if the target supports heap-trampoline, 0 otherwise. ++proc check_effective_target_heap_trampoline {} { ++ if { [istarget aarch64*-*-linux*] ++ || [istarget i?86-*-darwin*] ++ || [istarget x86_64-*-darwin*] ++ || [istarget i?86-*-linux*] ++ || [istarget x86_64-*-linux*] } { ++ return 1 ++ } ++ return 0 ++} +diff --git a/gcc/toplev.cc b/gcc/toplev.cc +index 055e0642f77..8eec63b63d4 100644 +--- a/gcc/toplev.cc ++++ b/gcc/toplev.cc +@@ -1364,7 +1364,7 @@ process_options (bool no_backend) + option flags in use. */ + if (version_flag) + { +- print_version (stderr, "", true); ++ /* We already printed the version header in main (). */ + if (!quiet_flag) + { + fputs ("options passed: ", stderr); +diff --git a/gcc/tree-nested.cc b/gcc/tree-nested.cc +index 3c2cf46e3f4..1bc6c7b546b 100644 +--- a/gcc/tree-nested.cc ++++ b/gcc/tree-nested.cc +@@ -611,6 +611,14 @@ get_trampoline_type (struct nesting_info *info) + if (trampoline_type) + return trampoline_type; + ++ /* When trampolines are created off-stack then the only thing we need in the ++ local frame is a single pointer. */ ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ trampoline_type = build_pointer_type (void_type_node); ++ return trampoline_type; ++ } ++ + align = TRAMPOLINE_ALIGNMENT; + size = TRAMPOLINE_SIZE; + +@@ -2791,17 +2799,27 @@ convert_tramp_reference_op (tree *tp, int *walk_subtrees, void *data) + + /* Compute the address of the field holding the trampoline. */ + x = get_frame_field (info, target_context, x, &wi->gsi); +- x = build_addr (x); +- x = gsi_gimplify_val (info, x, &wi->gsi); + +- /* Do machine-specific ugliness. Normally this will involve +- computing extra alignment, but it can really be anything. */ +- if (descr) +- builtin = builtin_decl_implicit (BUILT_IN_ADJUST_DESCRIPTOR); ++ /* APB: We don't need to do the adjustment calls when using off-stack ++ trampolines, any such adjustment will be done when the off-stack ++ trampoline is created. */ ++ if (!descr && flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ x = gsi_gimplify_val (info, x, &wi->gsi); + else +- builtin = builtin_decl_implicit (BUILT_IN_ADJUST_TRAMPOLINE); +- call = gimple_build_call (builtin, 1, x); +- x = init_tmp_var_with_call (info, &wi->gsi, call); ++ { ++ x = build_addr (x); ++ ++ x = gsi_gimplify_val (info, x, &wi->gsi); ++ ++ /* Do machine-specific ugliness. Normally this will involve ++ computing extra alignment, but it can really be anything. */ ++ if (descr) ++ builtin = builtin_decl_implicit (BUILT_IN_ADJUST_DESCRIPTOR); ++ else ++ builtin = builtin_decl_implicit (BUILT_IN_ADJUST_TRAMPOLINE); ++ call = gimple_build_call (builtin, 1, x); ++ x = init_tmp_var_with_call (info, &wi->gsi, call); ++ } + + /* Cast back to the proper function type. */ + x = build1 (NOP_EXPR, TREE_TYPE (t), x); +@@ -3380,6 +3398,7 @@ build_init_call_stmt (struct nesting_info *info, tree decl, tree field, + static void + finalize_nesting_tree_1 (struct nesting_info *root) + { ++ gimple_seq cleanup_list = NULL; + gimple_seq stmt_list = NULL; + gimple *stmt; + tree context = root->context; +@@ -3511,9 +3530,48 @@ finalize_nesting_tree_1 (struct nesting_info *root) + if (!field) + continue; + +- x = builtin_decl_implicit (BUILT_IN_INIT_TRAMPOLINE); +- stmt = build_init_call_stmt (root, i->context, field, x); +- gimple_seq_add_stmt (&stmt_list, stmt); ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ /* We pass a whole bunch of arguments to the builtin function that ++ creates the off-stack trampoline, these are ++ 1. The nested function chain value (that must be passed to the ++ nested function so it can find the function arguments). ++ 2. A pointer to the nested function implementation, ++ 3. The address in the local stack frame where we should write ++ the address of the trampoline. ++ ++ When this code was originally written I just kind of threw ++ everything at the builtin, figuring I'd work out what was ++ actually needed later, I think, the stack pointer could ++ certainly be dropped, arguments #2 and #4 are based off the ++ stack pointer anyway, so #1 doesn't seem to add much value. */ ++ tree arg1, arg2, arg3; ++ ++ gcc_assert (DECL_STATIC_CHAIN (i->context)); ++ arg1 = build_addr (root->frame_decl); ++ arg2 = build_addr (i->context); ++ ++ x = build3 (COMPONENT_REF, TREE_TYPE (field), ++ root->frame_decl, field, NULL_TREE); ++ arg3 = build_addr (x); ++ ++ x = builtin_decl_explicit (BUILT_IN_GCC_NESTED_PTR_CREATED); ++ stmt = gimple_build_call (x, 3, arg1, arg2, arg3); ++ gimple_seq_add_stmt (&stmt_list, stmt); ++ ++ /* This call to delete the nested function trampoline is added to ++ the cleanup list, and called when we exit the current scope. */ ++ x = builtin_decl_explicit (BUILT_IN_GCC_NESTED_PTR_DELETED); ++ stmt = gimple_build_call (x, 0); ++ gimple_seq_add_stmt (&cleanup_list, stmt); ++ } ++ else ++ { ++ /* Original code to initialise the on stack trampoline. */ ++ x = builtin_decl_implicit (BUILT_IN_INIT_TRAMPOLINE); ++ stmt = build_init_call_stmt (root, i->context, field, x); ++ gimple_seq_add_stmt (&stmt_list, stmt); ++ } + } + } + +@@ -3538,11 +3596,40 @@ finalize_nesting_tree_1 (struct nesting_info *root) + /* If we created initialization statements, insert them. */ + if (stmt_list) + { +- gbind *bind; +- annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); +- bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); +- gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); +- gimple_bind_set_body (bind, stmt_list); ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ /* Handle off-stack trampolines. */ ++ gbind *bind; ++ annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); ++ annotate_all_with_location (cleanup_list, DECL_SOURCE_LOCATION (context)); ++ bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); ++ gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); ++ ++ gimple_seq xxx_list = NULL; ++ ++ if (cleanup_list != NULL) ++ { ++ /* Maybe we shouldn't be creating this try/finally if -fno-exceptions is ++ in use. If this is the case, then maybe we should, instead, be ++ inserting the cleanup code onto every path out of this function? Not ++ yet figured out how we would do this. */ ++ gtry *t = gimple_build_try (stmt_list, cleanup_list, GIMPLE_TRY_FINALLY); ++ gimple_seq_add_stmt (&xxx_list, t); ++ } ++ else ++ xxx_list = stmt_list; ++ ++ gimple_bind_set_body (bind, xxx_list); ++ } ++ else ++ { ++ /* The traditional, on stack trampolines. */ ++ gbind *bind; ++ annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); ++ bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); ++ gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); ++ gimple_bind_set_body (bind, stmt_list); ++ } + } + + /* If a chain_decl was created, then it needs to be registered with +diff --git a/gcc/tree.cc b/gcc/tree.cc +index 6b28eb9f10d..7b0f08fba4e 100644 +--- a/gcc/tree.cc ++++ b/gcc/tree.cc +@@ -9796,6 +9796,28 @@ build_common_builtin_nodes (void) + "__builtin_nonlocal_goto", + ECF_NORETURN | ECF_NOTHROW); + ++ tree ptr_ptr_type_node = build_pointer_type (ptr_type_node); ++ ++ if (!builtin_decl_explicit_p (BUILT_IN_GCC_NESTED_PTR_CREATED)) ++ { ++ ftype = build_function_type_list (void_type_node, ++ ptr_type_node, // void *chain ++ ptr_type_node, // void *func ++ ptr_ptr_type_node, // void **dst ++ NULL_TREE); ++ local_define_builtin ("__builtin___gcc_nested_func_ptr_created", ftype, ++ BUILT_IN_GCC_NESTED_PTR_CREATED, ++ "__gcc_nested_func_ptr_created", ECF_NOTHROW); ++ } ++ ++ if (!builtin_decl_explicit_p (BUILT_IN_GCC_NESTED_PTR_DELETED)) ++ { ++ ftype = build_function_type_list (void_type_node, NULL_TREE); ++ local_define_builtin ("__builtin___gcc_nested_func_ptr_deleted", ftype, ++ BUILT_IN_GCC_NESTED_PTR_DELETED, ++ "__gcc_nested_func_ptr_deleted", ECF_NOTHROW); ++ } ++ + ftype = build_function_type_list (void_type_node, + ptr_type_node, ptr_type_node, NULL_TREE); + local_define_builtin ("__builtin_setjmp_setup", ftype, +diff --git a/intl/Makefile.in b/intl/Makefile.in +index 409d693c48e..5beebdc152c 100644 +--- a/intl/Makefile.in ++++ b/intl/Makefile.in +@@ -54,7 +54,7 @@ CTAGS = @CTAGS@ + ETAGS = @ETAGS@ + MKID = @MKID@ + +-COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(DEFS-$@) $(INCLUDES) ++COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) @PICFLAG@ $(DEFS) $(DEFS-$@) $(INCLUDES) + + HEADERS = \ + gmo.h \ +diff --git a/intl/configure b/intl/configure +index 03f40487a92..79bb5831a47 100755 +--- a/intl/configure ++++ b/intl/configure +@@ -623,6 +623,8 @@ ac_header_list= + ac_subst_vars='LTLIBOBJS + LIBOBJS + PICFLAG ++enable_host_pie ++enable_host_shared + BISON3_NO + BISON3_YES + INCINTL +@@ -731,6 +733,7 @@ with_libintl_prefix + with_libintl_type + enable_maintainer_mode + enable_host_shared ++enable_host_pie + ' + ac_precious_vars='build_alias + host_alias +@@ -1356,6 +1359,7 @@ Optional Features: + --disable-rpath do not hardcode runtime library paths + --enable-maintainer-mode enable rules only needed by maintainers + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -6852,15 +6856,31 @@ fi + + + ++# Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + + +- + ac_config_files="$ac_config_files Makefile config.intl" + + cat >confcache <<\_ACEOF +diff --git a/intl/configure.ac b/intl/configure.ac +index 16a740aa230..81aa831f59f 100644 +--- a/intl/configure.ac ++++ b/intl/configure.ac +@@ -83,10 +83,25 @@ fi + AC_SUBST(BISON3_YES) + AC_SUBST(BISON3_NO) + ++# Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi + AC_SUBST(PICFLAG) + + AC_CONFIG_FILES(Makefile config.intl) +diff --git a/libada/configure b/libada/configure +index 162d9731f26..9c8b133d817 100755 +--- a/libada/configure ++++ b/libada/configure +@@ -3212,6 +3212,9 @@ case "${host}" in + # sets the default TLS model and affects inlining. + PICFLAG=-fPIC + ;; ++ loongarch*-*-*) ++ PICFLAG=-fpic ++ ;; + mips-sgi-irix6*) + # PIC is the default. + ;; +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index d88515e4a03..c45f19251bc 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -65,8 +65,13 @@ libatomic_version_script = + libatomic_version_dep = + endif + libatomic_version_info = -version-info $(libtool_VERSION) ++if ENABLE_DARWIN_AT_RPATH ++libatomic_darwin_rpath = -Wc,-nodefaultrpaths ++libatomic_darwin_rpath += -Wl,-rpath,@loader_path ++endif + +-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) ++libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ ++ $(lt_host_flags) $(libatomic_darwin_rpath) + libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ + fenv.c fence.c flag.c + +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index 80d25653dc7..47c1e5354bd 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -403,7 +403,12 @@ noinst_LTLIBRARIES = libatomic_convenience.la + @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map + @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun + libatomic_version_info = -version-info $(libtool_VERSION) +-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libatomic_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ ++ $(lt_host_flags) $(libatomic_darwin_rpath) ++ + libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ + fenv.c fence.c flag.c + +diff --git a/libatomic/configure b/libatomic/configure +index 92853dd8a45..9871ef4bfb7 100755 +--- a/libatomic/configure ++++ b/libatomic/configure +@@ -658,6 +658,8 @@ OPT_LDFLAGS + SECTION_LDFLAGS + enable_aarch64_lse + libtool_VERSION ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE +@@ -803,6 +805,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_symvers + enable_werror +@@ -1452,6 +1455,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7603,7 +7609,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9576,6 +9582,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9593,9 +9642,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11382,7 +11435,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11385 "configure" ++#line 11438 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11488,7 +11541,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11491 "configure" ++#line 11544 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11773,6 +11826,15 @@ fi + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=3:0:2 + +@@ -15900,6 +15962,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + if test -z "${LIBAT_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBAT_BUILD_VERSIONED_SHLIB_FALSE}"; then + as_fn_error $? "conditional \"LIBAT_BUILD_VERSIONED_SHLIB\" was never defined. +diff --git a/libatomic/configure.ac b/libatomic/configure.ac +index 5563551aaae..6b9d3085806 100644 +--- a/libatomic/configure.ac ++++ b/libatomic/configure.ac +@@ -156,6 +156,8 @@ AC_SUBST(enable_shared) + AC_SUBST(enable_static) + AM_MAINTAINER_MODE + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=3:0:2 + AC_SUBST(libtool_VERSION) +diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in +index 333980ec2c1..8bc70562e5b 100644 +--- a/libatomic/testsuite/Makefile.in ++++ b/libatomic/testsuite/Makefile.in +@@ -262,6 +262,7 @@ target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ ++tmake_file = @tmake_file@ + toolexecdir = @toolexecdir@ + toolexeclibdir = @toolexeclibdir@ + top_build_prefix = @top_build_prefix@ +diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp +index 38f3e5673e2..a2589234a07 100644 +--- a/libatomic/testsuite/lib/libatomic.exp ++++ b/libatomic/testsuite/lib/libatomic.exp +@@ -147,11 +147,15 @@ proc libatomic_init { args } { + if { $blddir != "" } { + lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" + lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" +- lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" ++ if [istarget *-*-darwin*] { ++ lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs" ++ } else { ++ lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" ++ } + } + lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." + +- if [istarget *-*-darwin*] { ++ if [istarget *-*-darwin\[89\]*] { + lappend ALWAYS_CFLAGS "additional_flags=-shared-libgcc" + } + +diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in +index 08cdd21fb40..8898251161d 100644 +--- a/libbacktrace/Makefile.in ++++ b/libbacktrace/Makefile.in +@@ -15,7 +15,7 @@ + @SET_MAKE@ + + # Makefile.am -- Backtrace Makefile. +-# Copyright (C) 2012-2021 Free Software Foundation, Inc. ++# Copyright (C) 2012-2022 Free Software Foundation, Inc. + + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are +diff --git a/libbacktrace/backtrace.c b/libbacktrace/backtrace.c +index d28575ec897..cf6491682a7 100644 +--- a/libbacktrace/backtrace.c ++++ b/libbacktrace/backtrace.c +@@ -70,6 +70,13 @@ unwind (struct _Unwind_Context *context, void *vdata) + uintptr_t pc; + int ip_before_insn = 0; + ++#ifdef __APPLE__ ++# undef HAVE_GETIPINFO ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 ++# define HAVE_GETIPINFO 1 ++# endif ++#endif ++ + #ifdef HAVE_GETIPINFO + pc = _Unwind_GetIPInfo (context, &ip_before_insn); + #else +diff --git a/libbacktrace/configure b/libbacktrace/configure +index 17f470a4bec..6bd8394387e 100755 +--- a/libbacktrace/configure ++++ b/libbacktrace/configure +@@ -675,6 +675,8 @@ PIC_FLAG + WARN_FLAGS + EXTRA_FLAGS + BACKTRACE_FILE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + OTOOL64 + OTOOL + LIPO +@@ -799,6 +801,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_largefile + enable_cet + enable_werror +@@ -1447,6 +1450,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-largefile omit support for large files + --enable-cet enable Intel CET in target libraries [default=auto] + --disable-werror disable building with -Werror +@@ -7999,7 +8005,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9705,6 +9711,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9722,9 +9771,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11511,7 +11564,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11514 "configure" ++#line 11567 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11617,7 +11670,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11620 "configure" ++#line 11673 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11856,6 +11909,15 @@ CC="$lt_save_CC" + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # Check whether --enable-largefile was given. + if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +@@ -14273,6 +14335,10 @@ if test -z "${HAVE_DWZ_TRUE}" && test -z "${HAVE_DWZ_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DWZ\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${HAVE_ELF_TRUE}" && test -z "${HAVE_ELF_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ELF\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac +index 597c9705db8..7f89bf33c6b 100644 +--- a/libbacktrace/configure.ac ++++ b/libbacktrace/configure.ac +@@ -84,6 +84,8 @@ AM_CONDITIONAL(HAVE_DWZ, test "$DWZ" != "") + LT_INIT + AM_PROG_LIBTOOL + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_SYS_LARGEFILE + + backtrace_supported=yes +diff --git a/libbacktrace/simple.c b/libbacktrace/simple.c +index 6a1a1c92a12..811255ab6b5 100644 +--- a/libbacktrace/simple.c ++++ b/libbacktrace/simple.c +@@ -65,6 +65,13 @@ simple_unwind (struct _Unwind_Context *context, void *vdata) + uintptr_t pc; + int ip_before_insn = 0; + ++#ifdef __APPLE__ ++# undef HAVE_GETIPINFO ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 ++# define HAVE_GETIPINFO 1 ++# endif ++#endif ++ + #ifdef HAVE_GETIPINFO + pc = _Unwind_GetIPInfo (context, &ip_before_insn); + #else +diff --git a/libcc1/configure b/libcc1/configure +index 01cfb2806da..78519868102 100755 +--- a/libcc1/configure ++++ b/libcc1/configure +@@ -787,6 +787,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_cet + with_gcc_major_version_only + enable_werror_always +@@ -1439,6 +1440,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in host libraries [default=auto] + --enable-werror-always enable -Werror despite compiler version + --enable-plugin enable plugin support +@@ -7266,7 +7270,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8971,6 +8975,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8988,9 +9035,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10777,7 +10828,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10780 "configure" ++#line 10831 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10883,7 +10934,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10886 "configure" ++#line 10937 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12165,6 +12216,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12182,12 +12276,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +diff --git a/libcody/Makefile.in b/libcody/Makefile.in +index 7eaf8ace8ce..0ff1625a39f 100644 +--- a/libcody/Makefile.in ++++ b/libcody/Makefile.in +@@ -31,7 +31,7 @@ endif + CXXOPTS += $(filter-out -DHAVE_CONFIG_H,@DEFS@) -include config.h + + # Linker options +-LDFLAGS := @LDFLAGS@ ++LDFLAGS := @LDFLAGS@ @LD_PICFLAG@ + LIBS := @LIBS@ + + # Per-source & per-directory compile flags (warning: recursive) +diff --git a/libcody/configure b/libcody/configure +index da52a5cfca5..0e536c0ccb0 100755 +--- a/libcody/configure ++++ b/libcody/configure +@@ -591,7 +591,10 @@ configure_args + AR + RANLIB + EXCEPTIONS ++LD_PICFLAG + PICFLAG ++enable_host_pie ++enable_host_shared + OBJEXT + EXEEXT + ac_ct_CXX +@@ -653,6 +656,7 @@ enable_maintainer_mode + with_compiler + enable_checking + enable_host_shared ++enable_host_pie + enable_exceptions + ' + ac_precious_vars='build_alias +@@ -1286,6 +1290,7 @@ Optional Features: + yes,no,all,none,release. Flags are: misc,valgrind or + other strings + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-exceptions enable exceptions & rtti + + Optional Packages: +@@ -2635,11 +2640,34 @@ fi + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++else ++ LD_PICFLAG= ++fi ++ ++ + + + # Check whether --enable-exceptions was given. +diff --git a/libcody/configure.ac b/libcody/configure.ac +index 960191ecb72..14e8dd4a226 100644 +--- a/libcody/configure.ac ++++ b/libcody/configure.ac +@@ -63,9 +63,31 @@ fi + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++else ++ LD_PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) + + NMS_ENABLE_EXCEPTIONS + +diff --git a/libcpp/configure b/libcpp/configure +index 75145390215..85168273cd1 100755 +--- a/libcpp/configure ++++ b/libcpp/configure +@@ -625,6 +625,8 @@ ac_includes_default="\ + ac_subst_vars='LTLIBOBJS + CET_HOST_FLAGS + PICFLAG ++enable_host_pie ++enable_host_shared + MAINT + USED_CATALOGS + PACKAGE +@@ -738,6 +740,7 @@ enable_maintainer_mode + enable_checking + enable_canonical_system_headers + enable_host_shared ++enable_host_pie + enable_cet + enable_valgrind_annotations + ' +@@ -1379,6 +1382,7 @@ Optional Features: + --enable-canonical-system-headers + enable or disable system headers canonicalization + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-cet enable Intel CET in host libraries [default=auto] + --enable-valgrind-annotations + enable valgrind runtime interaction +@@ -7605,7 +7609,23 @@ esac + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi +diff --git a/libcpp/configure.ac b/libcpp/configure.ac +index 9b6042518e5..d25bf5f414f 100644 +--- a/libcpp/configure.ac ++++ b/libcpp/configure.ac +@@ -211,8 +211,23 @@ esac + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. +diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h +index abdc207d1a1..073c9e8bf2f 100644 +--- a/libcpp/include/cpplib.h ++++ b/libcpp/include/cpplib.h +@@ -721,6 +721,9 @@ struct cpp_callbacks + /* Callback to determine whether a built-in function is recognized. */ + int (*has_builtin) (cpp_reader *); + ++ /* Callback to determine whether a feature is available. */ ++ int (*has_feature) (cpp_reader *, bool); ++ + /* Callback that can change a user lazy into normal macro. */ + void (*user_lazy_macro) (cpp_reader *, cpp_macro *, unsigned); + +@@ -925,7 +928,9 @@ enum cpp_builtin_type + BT_HAS_STD_ATTRIBUTE, /* `__has_c_attribute(x)' */ + BT_HAS_BUILTIN, /* `__has_builtin(x)' */ + BT_HAS_INCLUDE, /* `__has_include(x)' */ +- BT_HAS_INCLUDE_NEXT /* `__has_include_next(x)' */ ++ BT_HAS_INCLUDE_NEXT, /* `__has_include_next(x)' */ ++ BT_HAS_FEATURE, /* `__has_feature(x)' */ ++ BT_HAS_EXTENSION /* `__has_extension(x)' */ + }; + + #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) +diff --git a/libcpp/init.cc b/libcpp/init.cc +index f4ab83d2145..aefaf3706cd 100644 +--- a/libcpp/init.cc ++++ b/libcpp/init.cc +@@ -420,6 +420,8 @@ static const struct builtin_macro builtin_array[] = + B("__has_builtin", BT_HAS_BUILTIN, true), + B("__has_include", BT_HAS_INCLUDE, true), + B("__has_include_next",BT_HAS_INCLUDE_NEXT, true), ++ B("__has_feature", BT_HAS_FEATURE, true), ++ B("__has_extension", BT_HAS_EXTENSION, true), + /* Keep builtins not used for -traditional-cpp at the end, and + update init_builtins() if any more are added. */ + B("_Pragma", BT_PRAGMA, true), +diff --git a/libcpp/macro.cc b/libcpp/macro.cc +index 8ebf360c03c..d8ce51bbbda 100644 +--- a/libcpp/macro.cc ++++ b/libcpp/macro.cc +@@ -677,6 +677,12 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, + number = builtin_has_include (pfile, node, + node->value.builtin == BT_HAS_INCLUDE_NEXT); + break; ++ ++ case BT_HAS_FEATURE: ++ case BT_HAS_EXTENSION: ++ number = pfile->cb.has_feature (pfile, ++ node->value.builtin == BT_HAS_FEATURE); ++ break; + } + + if (result == NULL) +diff --git a/libdecnumber/configure b/libdecnumber/configure +index da5302f9315..d805fdeab5a 100755 +--- a/libdecnumber/configure ++++ b/libdecnumber/configure +@@ -626,6 +626,8 @@ ac_subst_vars='LTLIBOBJS + LIBOBJS + CET_HOST_FLAGS + PICFLAG ++enable_host_pie ++enable_host_shared + ADDITIONAL_OBJS + enable_decimal_float + target_os +@@ -706,6 +708,7 @@ enable_werror_always + enable_maintainer_mode + enable_decimal_float + enable_host_shared ++enable_host_pie + enable_cet + ' + ac_precious_vars='build_alias +@@ -1338,6 +1341,7 @@ Optional Features: + or 'dpd' choses which decimal floating point format + to use + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-cet enable Intel CET in host libraries [default=auto] + + Some influential environment variables: +@@ -5185,7 +5189,23 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi +diff --git a/libdecnumber/configure.ac b/libdecnumber/configure.ac +index 0794031ec83..14f67f926d1 100644 +--- a/libdecnumber/configure.ac ++++ b/libdecnumber/configure.ac +@@ -100,8 +100,23 @@ AC_C_BIGENDIAN + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. +diff --git a/libffi/Makefile.am b/libffi/Makefile.am +index c6d6f849c53..d2ae0c04c7b 100644 +--- a/libffi/Makefile.am ++++ b/libffi/Makefile.am +@@ -214,7 +214,12 @@ libffi.map: $(top_srcdir)/libffi.map.in + $(COMPILE) -D$(TARGET) -DGENERATE_LIBFFI_MAP \ + -E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in + +-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) ++if ENABLE_DARWIN_AT_RPATH ++libffi_darwin_rpath = -Wl,-rpath,@loader_path ++endif ++libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \ ++ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \ ++ $(libffi_darwin_rpath) + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src +diff --git a/libffi/Makefile.in b/libffi/Makefile.in +index 5524a6a571e..34e77a45d1a 100644 +--- a/libffi/Makefile.in ++++ b/libffi/Makefile.in +@@ -597,7 +597,11 @@ AM_CFLAGS = -Wall -g -fexceptions $(CET_FLAGS) $(am__append_2) + @LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map + @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun + libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libffi_darwin_rpath = -Wl,-rpath,@loader_path ++libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \ ++ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \ ++ $(libffi_darwin_rpath) ++ + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src + AM_CCASFLAGS = $(AM_CPPFLAGS) $(CET_FLAGS) +diff --git a/libffi/configure b/libffi/configure +index 575641cca1d..7a68bfdfe51 100755 +--- a/libffi/configure ++++ b/libffi/configure +@@ -667,6 +667,8 @@ MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE + READELF ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CXXCPP + CPP + OTOOL64 +@@ -810,6 +812,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_pax_emutramp + enable_debug +@@ -1465,6 +1468,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7792,7 +7798,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9766,6 +9772,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9783,9 +9832,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11572,7 +11625,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11575 "configure" ++#line 11628 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11678,7 +11731,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11681 "configure" ++#line 11734 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12554,6 +12607,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12571,12 +12667,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14926,6 +15030,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +@@ -17071,6 +17183,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libffi/configure.ac b/libffi/configure.ac +index 014d89d0423..716f20ae313 100644 +--- a/libffi/configure.ac ++++ b/libffi/configure.ac +@@ -55,6 +55,7 @@ AC_SUBST(CET_FLAGS) + AM_PROG_AS + AM_PROG_CC_C_O + AC_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AC_CHECK_TOOL(READELF, readelf) + +diff --git a/libffi/doc/version.texi b/libffi/doc/version.texi +index f2b741e87e4..6261b21fec9 100644 +--- a/libffi/doc/version.texi ++++ b/libffi/doc/version.texi +@@ -1,4 +1,4 @@ +-@set UPDATED 27 June 2021 +-@set UPDATED-MONTH June 2021 ++@set UPDATED 31 August 2022 ++@set UPDATED-MONTH August 2022 + @set EDITION 3.4.2 + @set VERSION 3.4.2 +diff --git a/libffi/testsuite/lib/libffi.exp b/libffi/testsuite/lib/libffi.exp +index 7dc7b5d19a3..46a0796ab4c 100644 +--- a/libffi/testsuite/lib/libffi.exp ++++ b/libffi/testsuite/lib/libffi.exp +@@ -337,8 +337,13 @@ proc libffi-init { args } { + verbose "libffi_dir $libffi_dir" + if { $libffi_dir != "" } { + set libffi_dir [file dirname ${libffi_dir}] +- set libffi_link_flags "-L${libffi_dir}/.libs" +- lappend libffi_link_flags "-L${blddircxx}/src/.libs" ++ if [istarget *-*-darwin*] { ++ set libffi_link_flags "-B${libffi_dir}/.libs" ++ lappend libffi_link_flags "-B${blddircxx}/src/.libs" ++ } else { ++ set libffi_link_flags "-L${libffi_dir}/.libs" ++ lappend libffi_link_flags "-L${blddircxx}/src/.libs" ++ } + } + + set_ld_library_path_env_vars +@@ -382,7 +387,7 @@ proc libffi_target_compile { source dest type options } { + # Darwin needs a stack execution allowed flag. + + if { [istarget "*-*-darwin9*"] || [istarget "*-*-darwin1*"] +- || [istarget "*-*-darwin2*"] } { ++ || [istarget "x86_64-*-darwin2*"] } { + lappend options "additional_flags=-Wl,-allow_stack_execute" + } + +diff --git a/libgcc/config.host b/libgcc/config.host +index 89e3dbc7c8a..96d093bdc9a 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -82,7 +82,7 @@ m32c*-*-*) + cpu_type=m32c + tmake_file=t-fdpbit + ;; +-aarch64*-*-*) ++aarch64*-*-* | arm64*-*-*) + cpu_type=aarch64 + ;; + alpha*-*-*) +@@ -241,9 +241,11 @@ case ${host} in + ;; + esac + tmake_file="$tmake_file t-slibgcc-darwin" +- # newer toolsets produce warnings when building for unsupported versions. + case ${host} in +- *-*-darwin1[89]* | *-*-darwin2* ) ++ *-*-darwin2*) ++ tmake_file="t-darwin-min-11 $tmake_file" ++ ;; ++ *-*-darwin1[89]*) + tmake_file="t-darwin-min-8 $tmake_file" + ;; + *-*-darwin9* | *-*-darwin1[0-7]*) +@@ -259,7 +261,29 @@ case ${host} in + echo "Warning: libgcc configured to support macOS 10.5" 1>&2 + ;; + esac +- extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a" ++ # We are not using libtool to build the libs here, so we need to replicate ++ # a little of the logic around setting Darwin rpaths. Setting an explicit ++ # yes or no is honoured, otherwise we choose a suitable default. ++ # Sadly, this has to be kept in line with the rules in libtool.m4. ++ # This make fragment will override the setting in t-slibgcc-darwin so it ++ # must appear after it. ++ if test "x$enable_darwin_at_rpath" = "x"; then ++ echo "enable_darwin_at_rpath is unset" 1>&2 ++ case ${host} in ++ *-darwin[45678]*) ;; ++ *-darwin9* | *-darwin1[01234]*) ;; # We might default these on later. ++ *-darwin*) ++ echo "but is needed after macOS 10.11 (setting it on)" 1>&2 ++ enable_darwin_at_rpath=yes ++ ;; ++ esac ++ else ++ echo "enable_darwin_at_rpath is '$enable_darwin_at_rpath'" 1>&2 ++ fi ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ tmake_file="$tmake_file t-darwin-rpath " ++ fi ++ extra_parts="crt3.o crttms.o crttme.o libemutls_w.a " + ;; + *-*-dragonfly*) + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" +@@ -402,6 +426,15 @@ aarch64*-*-elf | aarch64*-*-rtems*) + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" + md_unwind_header=aarch64/aarch64-unwind.h + ;; ++aarch64*-*-darwin*) ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} ${cpu_type}/t-aarch64" ++ tmake_file="${tmake_file} ${cpu_type}/t-lse " ++ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp " ++ tmake_file="${tmake_file} t-crtfm" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" ++ md_unwind_header=aarch64/aarch64-unwind.h ++ ;; + aarch64*-*-freebsd*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" +@@ -426,6 +459,7 @@ aarch64*-*-linux*) + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" + ;; + aarch64*-*-vxworks7*) + extra_parts="$extra_parts crtfastmath.o" +@@ -719,12 +753,18 @@ hppa*-*-netbsd*) + i[34567]86-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" +- extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ++ extra_parts="$extra_parts libd10-uwfef.a " ++ extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" +- extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ++ extra_parts="$extra_parts libd10-uwfef.a " ++ extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-elfiamcu) + tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/32/t-iamcu i386/t-softfp t-softfp t-dfprules" +@@ -774,6 +814,7 @@ i[34567]86-*-linux*) + tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules" + tm_file="${tm_file} i386/elf-lib.h" + md_unwind_header=i386/linux-unwind.h ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-kopensolaris*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" +@@ -791,6 +832,7 @@ x86_64-*-linux*) + tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules" + tm_file="${tm_file} i386/elf-lib.h" + md_unwind_header=i386/linux-unwind.h ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-kfreebsd*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" +@@ -1187,12 +1229,14 @@ powerpc-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc64-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc*-*-freebsd*) +diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c +new file mode 100644 +index 00000000000..b2c69aa5892 +--- /dev/null ++++ b/libgcc/config/aarch64/heap-trampoline.c +@@ -0,0 +1,185 @@ ++/* Copyright The GNU Toolchain Authors. */ ++ ++/* libc is required to allocate trampolines. */ ++#ifndef inhibit_libc ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if __APPLE__ ++/* For pthread_jit_write_protect_np */ ++#include ++#endif ++ ++/* HEAP_T_ATTR is provided to allow targets to build the exported functions ++ as weak definitions. */ ++#ifndef HEAP_T_ATTR ++# define HEAP_T_ATTR ++#endif ++ ++void *allocate_trampoline_page (void); ++int get_trampolines_per_page (void); ++struct tramp_ctrl_data *allocate_tramp_ctrl (struct tramp_ctrl_data *parent); ++void *allocate_trampoline_page (void); ++ ++void __gcc_nested_func_ptr_created (void *chain, void *func, void **dst); ++void __gcc_nested_func_ptr_deleted (void); ++ ++#if defined(__linux__) ++static const unsigned char aarch64_trampoline_insns[6][4] = { ++ {0x5f, 0x24, 0x03, 0xd5}, /* hint 34 */ ++ {0xb1, 0x00, 0x00, 0x58}, /* ldr x17, .+20 */ ++ {0xd2, 0x00, 0x00, 0x58}, /* ldr x18, .+24 */ ++ {0x20, 0x02, 0x1f, 0xd6}, /* br x17 */ ++ {0x9f, 0x3f, 0x03, 0xd5}, /* dsb sy */ ++ {0xdf, 0x3f, 0x03, 0xd5} /* isb */ ++}; ++ ++#elif __APPLE__ ++static const unsigned char aarch64_trampoline_insns[6][4] = { ++ {0x5f, 0x24, 0x03, 0xd5}, /* hint 34 */ ++ {0xb1, 0x00, 0x00, 0x58}, /* ldr x17, .+20 */ ++ {0xd0, 0x00, 0x00, 0x58}, /* ldr x16, .+24 */ ++ {0x20, 0x02, 0x1f, 0xd6}, /* br x17 */ ++ {0x9f, 0x3f, 0x03, 0xd5}, /* dsb sy */ ++ {0xdf, 0x3f, 0x03, 0xd5} /* isb */ ++}; ++ ++#else ++#error "Unsupported AArch64 platform for heap trampolines" ++#endif ++ ++struct aarch64_trampoline { ++ unsigned char insns[6][4]; ++ void *func_ptr; ++ void *chain_ptr; ++}; ++ ++struct tramp_ctrl_data ++{ ++ struct tramp_ctrl_data *prev; ++ ++ int free_trampolines; ++ ++ /* This will be pointing to an executable mmap'ed page. */ ++ struct aarch64_trampoline *trampolines; ++}; ++ ++int ++get_trampolines_per_page (void) ++{ ++ return getpagesize() / sizeof(struct aarch64_trampoline); ++} ++ ++static _Thread_local struct tramp_ctrl_data *tramp_ctrl_curr = NULL; ++ ++void * ++allocate_trampoline_page (void) ++{ ++ void *page; ++ ++#if defined(__linux__) ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++#elif __APPLE__ ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE | MAP_JIT, 0, 0); ++#else ++ page = MAP_FAILED; ++#endif ++ ++ return page; ++} ++ ++struct tramp_ctrl_data * ++allocate_tramp_ctrl (struct tramp_ctrl_data *parent) ++{ ++ struct tramp_ctrl_data *p = malloc (sizeof (struct tramp_ctrl_data)); ++ if (p == NULL) ++ return NULL; ++ ++ p->trampolines = allocate_trampoline_page (); ++ ++ if (p->trampolines == MAP_FAILED) ++ return NULL; ++ ++ p->prev = parent; ++ p->free_trampolines = get_trampolines_per_page(); ++ ++ return p; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_created (void *chain, void *func, void **dst) ++{ ++ if (tramp_ctrl_curr == NULL) ++ { ++ tramp_ctrl_curr = allocate_tramp_ctrl (NULL); ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ } ++ ++ if (tramp_ctrl_curr->free_trampolines == 0) ++ { ++ void *tramp_ctrl = allocate_tramp_ctrl (tramp_ctrl_curr); ++ if (!tramp_ctrl) ++ abort (); ++ ++ tramp_ctrl_curr = tramp_ctrl; ++ } ++ ++ struct aarch64_trampoline *trampoline ++ = &tramp_ctrl_curr->trampolines[get_trampolines_per_page () ++ - tramp_ctrl_curr->free_trampolines]; ++ ++#if __APPLE__ ++ /* Disable write protection for the MAP_JIT regions in this thread (see ++ https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) */ ++ pthread_jit_write_protect_np (0); ++#endif ++ ++ memcpy (trampoline->insns, aarch64_trampoline_insns, ++ sizeof(aarch64_trampoline_insns)); ++ trampoline->func_ptr = func; ++ trampoline->chain_ptr = chain; ++ ++#if __APPLE__ ++ /* Re-enable write protection. */ ++ pthread_jit_write_protect_np (1); ++#endif ++ ++ tramp_ctrl_curr->free_trampolines -= 1; ++ ++ __builtin___clear_cache ((void *)trampoline->insns, ++ ((void *)trampoline->insns + sizeof(trampoline->insns))); ++ ++ *dst = &trampoline->insns; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_deleted (void) ++{ ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ ++ tramp_ctrl_curr->free_trampolines += 1; ++ ++ if (tramp_ctrl_curr->free_trampolines == get_trampolines_per_page ()) ++ { ++ if (tramp_ctrl_curr->prev == NULL) ++ return; ++ ++ munmap (tramp_ctrl_curr->trampolines, getpagesize()); ++ struct tramp_ctrl_data *prev = tramp_ctrl_curr->prev; ++ free (tramp_ctrl_curr); ++ tramp_ctrl_curr = prev; ++ } ++} ++ ++#endif /* !inhibit_libc */ +diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S +index 9c29cf08b59..97b68c42cc1 100644 +--- a/libgcc/config/aarch64/lse.S ++++ b/libgcc/config/aarch64/lse.S +@@ -58,7 +58,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #endif + + /* Declare the symbol gating the LSE implementations. */ ++#if __ELF__ + .hidden __aarch64_have_lse_atomics ++#else ++ .private_extern __aarch64_have_lse_atomics ++#endif + + /* Turn size and memory model defines into mnemonic fragments. */ + #if SIZE == 1 +@@ -164,6 +168,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define BTI_C hint 34 + + /* Start and end a function. */ ++#if __ELF__ + .macro STARTFN name + .text + .balign 16 +@@ -187,6 +192,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + cbz w(tmp0), \label + .endm + ++#else ++.macro STARTFN name ++ .text ++ .balign 16 ++ .private_extern _\name ++ .cfi_startproc ++_\name: ++ BTI_C ++.endm ++ ++.macro ENDFN name ++ .cfi_endproc ++.endm ++ ++/* Branch to LABEL if LSE is disabled. */ ++.macro JUMP_IF_NOT_LSE label ++ adrp x(tmp0), ___aarch64_have_lse_atomics@PAGE ++ ldrb w(tmp0), [x(tmp0), ___aarch64_have_lse_atomics@PAGEOFF] ++ cbz w(tmp0), \label ++.endm ++ ++#endif ++ + #ifdef L_cas + + STARTFN NAME(cas) +diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h +index be9b42174c4..5dc1827ee3a 100644 +--- a/libgcc/config/aarch64/sfp-machine.h ++++ b/libgcc/config/aarch64/sfp-machine.h +@@ -122,6 +122,27 @@ void __sfp_handle_exceptions (int); + + + /* Define ALIASNAME as a strong alias for NAME. */ ++#if defined __APPLE__ ++/* Mach-O doesn't support aliasing, so we build a secondary function for ++ the alias - we need to do a bit of a dance to find out what the type of ++ the arguments is and then apply that to the secondary function. ++ If these functions ever return anything but CMPtype we need to revisit ++ this... */ ++typedef float alias_HFtype __attribute__ ((mode (HF))); ++typedef float alias_SFtype __attribute__ ((mode (SF))); ++typedef float alias_DFtype __attribute__ ((mode (DF))); ++typedef float alias_TFtype __attribute__ ((mode (TF))); ++#define ALIAS_SELECTOR \ ++ CMPtype (*) (alias_HFtype, alias_HFtype): (alias_HFtype) 0, \ ++ CMPtype (*) (alias_SFtype, alias_SFtype): (alias_SFtype) 0, \ ++ CMPtype (*) (alias_DFtype, alias_DFtype): (alias_DFtype) 0, \ ++ CMPtype (*) (alias_TFtype, alias_TFtype): (alias_TFtype) 0 ++#define strong_alias(name, aliasname) \ ++ CMPtype aliasname (__typeof (_Generic (name, ALIAS_SELECTOR)) a, \ ++ __typeof (_Generic (name, ALIAS_SELECTOR)) b) \ ++ { return name (a, b); } ++#else + # define strong_alias(name, aliasname) _strong_alias(name, aliasname) + # define _strong_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); ++#endif +diff --git a/libgcc/config/aarch64/t-darwin b/libgcc/config/aarch64/t-darwin +new file mode 100644 +index 00000000000..f6ecda7b608 +--- /dev/null ++++ b/libgcc/config/aarch64/t-darwin +@@ -0,0 +1,7 @@ ++# Ensure we have a suitable minimum OS version. ++ ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=11.0 ++ ++LIB2_SIDITI_CONV_FUNCS = yes ++ ++BUILD_LIBGCCS1 = +diff --git a/libgcc/config/aarch64/t-heap-trampoline b/libgcc/config/aarch64/t-heap-trampoline +new file mode 100644 +index 00000000000..6468fb8704f +--- /dev/null ++++ b/libgcc/config/aarch64/t-heap-trampoline +@@ -0,0 +1,20 @@ ++# Copyright The GNU Toolchain Authors. ++ ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB2ADDEH += $(srcdir)/config/aarch64/heap-trampoline.c ++LIB2ADDEHSHARED += $(srcdir)/config/aarch64/heap-trampoline.c +diff --git a/libgcc/config/i386/heap-trampoline.c b/libgcc/config/i386/heap-trampoline.c +new file mode 100644 +index 00000000000..2e8df1cfbd2 +--- /dev/null ++++ b/libgcc/config/i386/heap-trampoline.c +@@ -0,0 +1,255 @@ ++/* Copyright The GNU Toolchain Authors. */ ++ ++/* libc is required to allocate trampolines. */ ++#ifndef inhibit_libc ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++/* For pthread_jit_write_protect_np */ ++#include ++#endif ++ ++/* HEAP_T_ATTR is provided to allow targets to build the exported functions ++ as weak definitions. */ ++#ifndef HEAP_T_ATTR ++# define HEAP_T_ATTR ++#endif ++ ++void *allocate_trampoline_page (void); ++int get_trampolines_per_page (void); ++struct tramp_ctrl_data *allocate_tramp_ctrl (struct tramp_ctrl_data *parent); ++void *allocate_trampoline_page (void); ++ ++void __gcc_nested_func_ptr_created (void *chain, void *func, void **dst); ++void __gcc_nested_func_ptr_deleted (void); ++ ++#if __x86_64__ ++ ++#ifdef __LP64__ ++static const uint8_t trampoline_insns[] = { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ /* endbr64. */ ++ 0xf3, 0x0f, 0x1e, 0xfa, ++#endif ++ ++ /* movabsq $,%r11 */ ++ 0x49, 0xbb, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ ++ /* movabsq $,%r10 */ ++ 0x49, 0xba, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ ++ /* rex.WB jmpq *%r11 */ ++ 0x41, 0xff, 0xe3, ++ ++ /* Pad to the multiple of 4 bytes. */ ++ 0x90 ++}; ++#else ++static const uint8_t trampoline_insns[] = { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ /* endbr64. */ ++ 0xf3, 0x0f, 0x1e, 0xfa, ++#endif ++ ++ /* movl $,%r11d */ ++ 0x41, 0xbb, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* movl $,%r10d */ ++ 0x41, 0xba, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* rex.WB jmpq *%r11 */ ++ 0x41, 0xff, 0xe3, ++ ++ /* Pad to the multiple of 4 bytes. */ ++ 0x90 ++}; ++#endif ++ ++union ix86_trampoline { ++ uint8_t insns[sizeof(trampoline_insns)]; ++ ++ struct __attribute__((packed)) fields { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ uint8_t endbr64[4]; ++#endif ++ uint8_t insn_0[2]; ++ void *func_ptr; ++ uint8_t insn_1[2]; ++ void *chain_ptr; ++ uint8_t insn_2[3]; ++ uint8_t pad; ++ } fields; ++}; ++ ++#elif __i386__ ++ ++static const uint8_t trampoline_insns[] = { ++ /* movl $,%ecx */ ++ 0xb9, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* jmpl -. */ ++ 0xe9, ++ 0x00, 0x00, 0x00, 0x00, ++}; ++ ++union ix86_trampoline { ++ uint8_t insns[sizeof(trampoline_insns)]; ++ ++ struct __attribute__((packed)) fields { ++ uint8_t insn_0[1]; ++ void *chain_ptr; ++ uint8_t insn_1[1]; ++ uintptr_t func_offset; ++ } fields; ++}; ++ ++#else ++#error unsupported architecture/ABI ++#endif ++ ++struct tramp_ctrl_data ++{ ++ struct tramp_ctrl_data *prev; ++ ++ int free_trampolines; ++ ++ /* This will be pointing to an executable mmap'ed page. */ ++ union ix86_trampoline *trampolines; ++}; ++ ++int ++get_trampolines_per_page (void) ++{ ++ return getpagesize() / sizeof(union ix86_trampoline); ++} ++ ++static _Thread_local struct tramp_ctrl_data *tramp_ctrl_curr = NULL; ++ ++void * ++allocate_trampoline_page (void) ++{ ++ void *page; ++ ++#if defined(__gnu_linux__) ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++#elif __APPLE__ ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE | MAP_JIT, 0, 0); ++# else ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++# endif ++#else ++ page = MAP_FAILED; ++#endif ++ ++ return page; ++} ++ ++struct tramp_ctrl_data * ++allocate_tramp_ctrl (struct tramp_ctrl_data *parent) ++{ ++ struct tramp_ctrl_data *p = malloc (sizeof (struct tramp_ctrl_data)); ++ if (p == NULL) ++ return NULL; ++ ++ p->trampolines = allocate_trampoline_page (); ++ ++ if (p->trampolines == MAP_FAILED) ++ return NULL; ++ ++ p->prev = parent; ++ p->free_trampolines = get_trampolines_per_page(); ++ ++ return p; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_created (void *chain, void *func, void **dst) ++{ ++ if (tramp_ctrl_curr == NULL) ++ { ++ tramp_ctrl_curr = allocate_tramp_ctrl (NULL); ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ } ++ ++ if (tramp_ctrl_curr->free_trampolines == 0) ++ { ++ void *tramp_ctrl = allocate_tramp_ctrl (tramp_ctrl_curr); ++ if (!tramp_ctrl) ++ abort (); ++ ++ tramp_ctrl_curr = tramp_ctrl; ++ } ++ ++ union ix86_trampoline *trampoline ++ = &tramp_ctrl_curr->trampolines[get_trampolines_per_page () ++ - tramp_ctrl_curr->free_trampolines]; ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ /* Disable write protection for the MAP_JIT regions in this thread (see ++ https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) */ ++ pthread_jit_write_protect_np (0); ++#endif ++ ++ memcpy (trampoline->insns, trampoline_insns, ++ sizeof(trampoline_insns)); ++ trampoline->fields.chain_ptr = chain; ++#if __x86_64__ ++ trampoline->fields.func_ptr = func; ++#elif __i386__ ++ uintptr_t off_add = (uintptr_t) &trampoline->fields.func_offset; ++ off_add += 4; ++ trampoline->fields.func_offset = (uintptr_t)func - off_add; ++#endif ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ /* Re-enable write protection. */ ++ pthread_jit_write_protect_np (1); ++#endif ++ ++ tramp_ctrl_curr->free_trampolines -= 1; ++ ++ __builtin___clear_cache ((void *)trampoline->insns, ++ ((void *)trampoline->insns + sizeof(trampoline->insns))); ++ ++ *dst = &trampoline->insns; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_deleted (void) ++{ ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ ++ tramp_ctrl_curr->free_trampolines += 1; ++ ++ if (tramp_ctrl_curr->free_trampolines == get_trampolines_per_page ()) ++ { ++ if (tramp_ctrl_curr->prev == NULL) ++ return; ++ ++ munmap (tramp_ctrl_curr->trampolines, getpagesize()); ++ struct tramp_ctrl_data *prev = tramp_ctrl_curr->prev; ++ free (tramp_ctrl_curr); ++ tramp_ctrl_curr = prev; ++ } ++} ++ ++#endif /* !inhibit_libc */ +diff --git a/libgcc/config/i386/t-heap-trampoline b/libgcc/config/i386/t-heap-trampoline +new file mode 100644 +index 00000000000..5cd11f594ba +--- /dev/null ++++ b/libgcc/config/i386/t-heap-trampoline +@@ -0,0 +1,20 @@ ++# Copyright The GNU Toolchain Authors. ++ ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB2ADDEH += $(srcdir)/config/i386/heap-trampoline.c ++LIB2ADDEHSHARED += $(srcdir)/config/i386/heap-trampoline.c +diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin +index a3bb70c6a0a..0f65b54a230 100644 +--- a/libgcc/config/t-darwin ++++ b/libgcc/config/t-darwin +@@ -51,5 +51,18 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c \ + # Do not build a shared unwind lib by default. + LIBEHSOBJS= + ++# Make heap trampoline helpers weak definitions so that we can merge them from ++# multiple DSOs. ++heap-trampoline.o: HOST_LIBGCC2_CFLAGS += \ ++ -DHEAP_T_ATTR='__attribute__((__weak__,__visibility__("default")))' ++heap-trampoline_s.o: HOST_LIBGCC2_CFLAGS += \ ++ -DHEAP_T_ATTR='__attribute__((__weak__,__visibility__("default")))' ++ ++# Make a heap trampoline support CRT so that it can be linked optionally, use ++# the shared version so that we can link with DSOs. ++libheapt_w.a: heap-trampoline_s.o ++ $(AR_CREATE_FOR_TARGET) $@ $< ++ $(RANLIB_FOR_TARGET) $@ ++ + # Symbols for all the sub-ports. + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/libgcc-libsystem.ver +diff --git a/libgcc/config/t-darwin-min-11 b/libgcc/config/t-darwin-min-11 +new file mode 100644 +index 00000000000..4009d41addb +--- /dev/null ++++ b/libgcc/config/t-darwin-min-11 +@@ -0,0 +1,3 @@ ++# Support building with -mmacosx-version-min back to macOS 11. ++DARWIN_MIN_LIB_VERSION = -mmacosx-version-min=11 ++DARWIN_MIN_CRT_VERSION = -mmacosx-version-min=11 +diff --git a/libgcc/config/t-darwin-rpath b/libgcc/config/t-darwin-rpath +new file mode 100644 +index 00000000000..e73d7f378b0 +--- /dev/null ++++ b/libgcc/config/t-darwin-rpath +@@ -0,0 +1,2 @@ ++# Use @rpath and add a search path to exes and dylibs that depend on this. ++SHLIB_RPATH = @rpath +diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin +index cb0cbbdb1c5..da4886848e8 100644 +--- a/libgcc/config/t-slibgcc-darwin ++++ b/libgcc/config/t-slibgcc-darwin +@@ -1,4 +1,4 @@ +-# Build a shared libgcc library with the darwin linker. ++# Build a shared libgcc library able to use embedded runpaths. + + SHLIB_SOVERSION = 1.1 + SHLIB_SO_MINVERSION = 1 +@@ -6,7 +6,6 @@ SHLIB_VERSTRING = -compatibility_version $(SHLIB_SO_MINVERSION) \ + -current_version $(SHLIB_SOVERSION) + SHLIB_EXT = .dylib + SHLIB_LC = -lSystem +-SHLIB_INSTALL_DIR = $(slibdir) + + SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk + SHLIB_MKMAP_OPTS = -v leading_underscore=1 +@@ -23,11 +22,16 @@ SHLIB_SONAME = @shlib_base_name@$(SHLIB_EXT) + # subdir. The code under MULTIBUILDTOP combines these into a single FAT + # library, that is what we eventually install. + ++# When enable_darwin_at_rpath is true, use @rpath instead of $(slibdir) for ++# this and dylibs that depend on this. So this def must come first and be ++# overridden in a make fragment that depends on the rpath setting. ++SHLIB_RPATH = $(slibdir) ++ + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ +- -install_name $(SHLIB_INSTALL_DIR)/$(SHLIB_INSTALL_NAME) \ ++ -install_name $(SHLIB_RPATH)/$(SHLIB_INSTALL_NAME) \ + -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME) \ + -Wl,-exported_symbols_list,$(SHLIB_MAP) \ +- $(SHLIB_VERSTRING) \ ++ $(SHLIB_VERSTRING) -nodefaultrpaths \ + @multilib_flags@ @shlib_objs@ $(SHLIB_LC) + + # we do our own thing +@@ -63,9 +67,9 @@ EHS_INSTNAME = libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT) + libgcc_ehs$(SHLIB_EXT): $(LIBEHSOBJS) $(extra-parts) + mkdir -p $(MULTIDIR) + $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ +- -install_name $(SHLIB_INSTALL_DIR)/$(EHS_INSTNAME) \ ++ -install_name $(SHLIB_RPATH)/$(EHS_INSTNAME) \ + -o $(MULTIDIR)/libgcc_ehs$(SHLIB_EXT) $(SHLIB_VERSTRING) \ +- $(LIBEHSOBJS) $(SHLIB_LC) ++ -nodefaultrpaths $(LIBEHSOBJS) $(SHLIB_LC) + + all: libgcc_ehs$(SHLIB_EXT) + +@@ -122,12 +126,12 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) \ + cp ../$${mlib}/libgcc/$${mlib}/libgcc_ehs$(SHLIB_EXT) \ + ./libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \ + arch=`$(LIPO) -info libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} | sed -e 's/.*:\ //'` ; \ +- $(CC) -arch $${arch} -nodefaultlibs -dynamiclib \ ++ $(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \ + -o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ +- -install_name $(SHLIB_INSTALL_DIR)/libgcc_s.1.dylib \ +- -compatibility_version 1 -current_version 1 ; \ ++ -install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \ ++ -compatibility_version 1 -current_version 1.1 ; \ + done + $(LIPO) -output libgcc_s.1$(SHLIB_EXT) -create libgcc_s.1$(SHLIB_EXT)_T* + rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T* +@@ -141,13 +145,13 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) + cp ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) \ + ./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \ + arch=`$(LIPO) -info libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} | sed -e 's/.*:\ //'` ; \ +- $(CC) -arch $${arch} -nodefaultlibs -dynamiclib \ ++ $(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \ + -o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ + -lSystem \ + -Wl,-reexported_symbols_list,$(srcdir)/config/darwin-unwind.ver \ +- -install_name $(SHLIB_INSTALL_DIR)/libgcc_s.1.dylib \ +- -compatibility_version 1 -current_version 1 ; \ ++ -install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \ ++ -compatibility_version 1 -current_version 1.1 ; \ + done + $(LIPO) -output libgcc_s.1$(SHLIB_EXT) -create libgcc_s.1$(SHLIB_EXT)_T* + rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T* +diff --git a/libgcc/libgcc-std.ver.in b/libgcc/libgcc-std.ver.in +index 513ddd0bd0d..38d9d53bf77 100644 +--- a/libgcc/libgcc-std.ver.in ++++ b/libgcc/libgcc-std.ver.in +@@ -1944,3 +1944,9 @@ GCC_7.0.0 { + __PFX__divmoddi4 + __PFX__divmodti4 + } ++ ++%inherit GCC_14.0.0 GCC_7.0.0 ++GCC_14.0.0 { ++ __gcc_nested_func_ptr_created ++ __gcc_nested_func_ptr_deleted ++} +diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h +index fc24ac34502..7c90eaacdf8 100644 +--- a/libgcc/libgcc2.h ++++ b/libgcc/libgcc2.h +@@ -29,6 +29,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #pragma GCC visibility push(default) + #endif + ++extern void __gcc_nested_func_ptr_created (void *, void *, void **); ++extern void __gcc_nested_func_ptr_deleted (void); ++ + extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); + extern void __clear_cache (void *, void *); + extern void __eprintf (const char *, const char *, unsigned int, const char *) +diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am +index 5ce0cd7cd05..b1338a201cd 100644 +--- a/libgfortran/Makefile.am ++++ b/libgfortran/Makefile.am +@@ -37,6 +37,11 @@ else + version_arg = + version_dep = + endif ++extra_darwin_ldflags_libgfortran = @extra_ldflags_libgfortran@ ++if ENABLE_DARWIN_AT_RPATH ++extra_darwin_ldflags_libgfortran += -Wc,-nodefaultrpaths ++extra_darwin_ldflags_libgfortran += -Wl,-rpath,@loader_path ++endif + + gfor_c_HEADERS = ISO_Fortran_binding.h + gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include +@@ -50,7 +55,7 @@ libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ + $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \ + $(HWCAP_LDFLAGS) \ +- $(LIBM) $(extra_ldflags_libgfortran) \ ++ $(LIBM) $(extra_darwin_ldflags_libgfortran) \ + $(version_arg) -Wc,-shared-libgcc + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in +index 7ac6bfba657..52dd5f1819e 100644 +--- a/libgfortran/Makefile.in ++++ b/libgfortran/Makefile.in +@@ -91,8 +91,10 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-@LIBGFOR_MINIMAL_TRUE@am__append_1 = -DLIBGFOR_MINIMAL +-@LIBGFOR_MINIMAL_FALSE@am__append_2 = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++@LIBGFOR_MINIMAL_TRUE@am__append_2 = -DLIBGFOR_MINIMAL ++@LIBGFOR_MINIMAL_FALSE@am__append_3 = \ + @LIBGFOR_MINIMAL_FALSE@io/close.c \ + @LIBGFOR_MINIMAL_FALSE@io/file_pos.c \ + @LIBGFOR_MINIMAL_FALSE@io/format.c \ +@@ -110,7 +112,7 @@ target_triplet = @target@ + @LIBGFOR_MINIMAL_FALSE@io/fbuf.c \ + @LIBGFOR_MINIMAL_FALSE@io/async.c + +-@LIBGFOR_MINIMAL_FALSE@am__append_3 = \ ++@LIBGFOR_MINIMAL_FALSE@am__append_4 = \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/access.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/c99_functions.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/chdir.c \ +@@ -143,9 +145,9 @@ target_triplet = @target@ + @LIBGFOR_MINIMAL_FALSE@intrinsics/umask.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/unlink.c + +-@IEEE_SUPPORT_TRUE@am__append_4 = ieee/ieee_helper.c +-@LIBGFOR_MINIMAL_TRUE@am__append_5 = runtime/minimal.c +-@LIBGFOR_MINIMAL_FALSE@am__append_6 = \ ++@IEEE_SUPPORT_TRUE@am__append_5 = ieee/ieee_helper.c ++@LIBGFOR_MINIMAL_TRUE@am__append_6 = runtime/minimal.c ++@LIBGFOR_MINIMAL_FALSE@am__append_7 = \ + @LIBGFOR_MINIMAL_FALSE@runtime/backtrace.c \ + @LIBGFOR_MINIMAL_FALSE@runtime/convert_char.c \ + @LIBGFOR_MINIMAL_FALSE@runtime/environ.c \ +@@ -157,7 +159,7 @@ target_triplet = @target@ + + + # dummy sources for libtool +-@onestep_TRUE@am__append_7 = libgfortran_c.c libgfortran_f.f90 ++@onestep_TRUE@am__append_8 = libgfortran_c.c libgfortran_f.f90 + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ +@@ -589,7 +591,7 @@ AMTAR = @AMTAR@ + + # Some targets require additional compiler options for IEEE compatibility. + AM_CFLAGS = @AM_CFLAGS@ -fcx-fortran-rules $(SECTION_FLAGS) \ +- $(IEEE_FLAGS) $(am__append_1) ++ $(IEEE_FLAGS) $(am__append_2) + AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ + AM_FCFLAGS = @AM_FCFLAGS@ $(IEEE_FLAGS) + AR = @AR@ +@@ -748,6 +750,8 @@ gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + @LIBGFOR_USE_SYMVER_FALSE@version_dep = + @LIBGFOR_USE_SYMVER_GNU_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.ver + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.ver-sun gfortran.ver ++extra_darwin_ldflags_libgfortran = @extra_ldflags_libgfortran@ \ ++ $(am__append_1) + gfor_c_HEADERS = ISO_Fortran_binding.h + gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include + LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \ +@@ -759,7 +763,7 @@ libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ + $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \ + $(HWCAP_LDFLAGS) \ +- $(LIBM) $(extra_ldflags_libgfortran) \ ++ $(LIBM) $(extra_darwin_ldflags_libgfortran) \ + $(version_arg) -Wc,-shared-libgcc + + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) +@@ -780,7 +784,7 @@ AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \ + -I$(MULTIBUILDTOP)../libbacktrace \ + -I../libbacktrace + +-gfor_io_src = io/size_from_kind.c $(am__append_2) ++gfor_io_src = io/size_from_kind.c $(am__append_3) + gfor_io_headers = \ + io/io.h \ + io/fbuf.h \ +@@ -802,7 +806,7 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \ + intrinsics/selected_int_kind.f90 \ + intrinsics/selected_real_kind.f90 intrinsics/trigd.c \ + intrinsics/unpack_generic.c runtime/in_pack_generic.c \ +- runtime/in_unpack_generic.c $(am__append_3) $(am__append_4) ++ runtime/in_unpack_generic.c $(am__append_4) $(am__append_5) + @IEEE_SUPPORT_TRUE@gfor_ieee_helper_src = ieee/ieee_helper.c + @IEEE_SUPPORT_FALSE@gfor_ieee_src = + @IEEE_SUPPORT_TRUE@gfor_ieee_src = \ +@@ -811,8 +815,8 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \ + @IEEE_SUPPORT_TRUE@ieee/ieee_features.F90 + + gfor_src = runtime/bounds.c runtime/compile_options.c runtime/memory.c \ +- runtime/string.c runtime/select.c $(am__append_5) \ +- $(am__append_6) ++ runtime/string.c runtime/select.c $(am__append_6) \ ++ $(am__append_7) + i_all_c = \ + $(srcdir)/generated/all_l1.c \ + $(srcdir)/generated/all_l2.c \ +@@ -1652,7 +1656,7 @@ intrinsics/random_init.f90 + + BUILT_SOURCES = $(gfor_built_src) $(gfor_built_specific_src) \ + $(gfor_built_specific2_src) $(gfor_misc_specifics) \ +- $(am__append_7) ++ $(am__append_8) + prereq_SRC = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \ + $(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src) + +diff --git a/libgfortran/configure b/libgfortran/configure +index ae64dca3114..625269e4924 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -655,6 +655,8 @@ extra_ldflags_libgfortran + ac_ct_FC + FCFLAGS + FC ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -824,6 +826,7 @@ enable_static + with_pic + enable_fast_install + enable_libtool_lock ++enable_darwin_at_rpath + enable_largefile + enable_libquadmath_support + with_gcc_major_version_only +@@ -1479,6 +1482,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-largefile omit support for large files + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -9229,7 +9235,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10939,6 +10945,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10956,9 +11005,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12766,7 +12819,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12769 "configure" ++#line 12822 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12872,7 +12925,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12875 "configure" ++#line 12928 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13274,6 +13327,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10 + + # We need gfortran to compile parts of the library +@@ -14917,6 +14978,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes +@@ -14934,9 +15038,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -16190,9 +16298,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # extra LD Flags which are required for targets ++extra_ldflags_libgfortran= + case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libgfortran ++ *-*-darwin[4567]*) ++ # Earlier Darwin needs -single_module when linking libgfortran + extra_ldflags_libgfortran=-Wl,-single_module + ;; + esac +@@ -28519,6 +28628,10 @@ if test -z "${HAVE_HWCAP_TRUE}" && test -z "${HAVE_HWCAP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_HWCAP\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${LIBGFOR_BUILD_QUAD_TRUE}" && test -z "${LIBGFOR_BUILD_QUAD_FALSE}"; then + as_fn_error $? "conditional \"LIBGFOR_BUILD_QUAD\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index 97cc490cb5e..a21f56648a2 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -282,6 +282,7 @@ LT_LIB_M + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10 + + # We need gfortran to compile parts of the library +@@ -290,9 +291,10 @@ FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets ++extra_ldflags_libgfortran= + case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libgfortran ++ *-*-darwin[[4567]]*) ++ # Earlier Darwin needs -single_module when linking libgfortran + extra_ldflags_libgfortran=-Wl,-single_module + ;; + esac +diff --git a/libgo/configure b/libgo/configure +index ffe17c9be55..de5c1ac9b3d 100755 +--- a/libgo/configure ++++ b/libgo/configure +@@ -708,6 +708,8 @@ glibgo_toolexecdir + WERROR + WARN_FLAGS + CC_FOR_BUILD ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CPP +@@ -11544,7 +11546,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11547 "configure" ++#line 11549 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11650,7 +11652,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11653 "configure" ++#line 11655 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13779,6 +13781,14 @@ CC="$lt_save_CC" + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} + +@@ -16321,6 +16331,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${USE_LIBFFI_TRUE}" && test -z "${USE_LIBFFI_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBFFI\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgo/configure.ac b/libgo/configure.ac +index 7e2b98ba67c..7b0222bb620 100644 +--- a/libgo/configure.ac ++++ b/libgo/configure.ac +@@ -53,6 +53,7 @@ AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} + AC_SUBST(CC_FOR_BUILD) +diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am +index f8b2a06d63e..81ba6c634fa 100644 +--- a/libgomp/Makefile.am ++++ b/libgomp/Makefile.am +@@ -53,9 +53,14 @@ else + libgomp_version_script = + libgomp_version_dep = + endif ++ + libgomp_version_info = -version-info $(libtool_VERSION) ++if ENABLE_DARWIN_AT_RPATH ++libgomp_darwin_rpath = -Wc,-nodefaultrpaths ++libgomp_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ +- $(lt_host_flags) ++ $(lt_host_flags) $(libgomp_darwin_rpath) + libgomp_la_DEPENDENCIES = $(libgomp_version_dep) + libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) + +diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in +index 31ad7aa4b48..aba4c88e97a 100644 +--- a/libgomp/Makefile.in ++++ b/libgomp/Makefile.in +@@ -547,8 +547,11 @@ nodist_toolexeclib_HEADERS = libgomp.spec + @LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver + @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver-sun + libgomp_version_info = -version-info $(libtool_VERSION) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgomp_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ +- $(lt_host_flags) ++ $(lt_host_flags) $(libgomp_darwin_rpath) + + libgomp_la_DEPENDENCIES = $(libgomp_version_dep) + libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) +diff --git a/libgomp/configure b/libgomp/configure +index 67f6b1435a5..5e8e36fee71 100755 +--- a/libgomp/configure ++++ b/libgomp/configure +@@ -693,6 +693,8 @@ FC + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -833,6 +835,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + with_cuda_driver + with_cuda_driver_include +@@ -1494,6 +1497,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7653,7 +7659,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9626,6 +9632,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9643,9 +9692,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11432,7 +11485,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11435 "configure" ++#line 11488 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11538,7 +11591,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11541 "configure" ++#line 11594 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11799,6 +11852,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -13474,6 +13535,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes +@@ -13491,9 +13595,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -17306,6 +17414,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgomp/configure.ac b/libgomp/configure.ac +index dd88f20103a..5deba114027 100644 +--- a/libgomp/configure.ac ++++ b/libgomp/configure.ac +@@ -149,6 +149,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +diff --git a/libgomp/env.c b/libgomp/env.c +index 1c4ee894515..29e7d853559 100644 +--- a/libgomp/env.c ++++ b/libgomp/env.c +@@ -60,6 +60,7 @@ + #endif /* LIBGOMP_OFFLOADED_ONLY */ + + #include "secure_getenv.h" ++#include "environ.h" + + struct gomp_task_icv gomp_global_icv = { + .nthreads_var = 1, +diff --git a/libiberty/configure b/libiberty/configure +index ca83f89da6d..ac7aa950032 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5208,6 +5208,9 @@ case "${host}" in + # sets the default TLS model and affects inlining. + PICFLAG=-fPIC + ;; ++ loongarch*-*-*) ++ PICFLAG=-fpic ++ ;; + mips-sgi-irix6*) + # PIC is the default. + ;; +@@ -5254,8 +5257,8 @@ case "${enable_shared}" in + *) shared=yes ;; + esac + +-# ...unless --enable-host-shared was passed from top-level config: +-if [ "${enable_host_shared}" = "yes" ]; then ++# ...unless --enable-host-{shared,pie} was passed from top-level config: ++if [ "${enable_host_shared}" = "yes" ] || [ "${enable_host_pie}" = "yes" ]; then + shared=yes + fi + +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 84a7b378fad..bf3f9fe77ee 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -232,8 +232,8 @@ case "${enable_shared}" in + *) shared=yes ;; + esac + +-# ...unless --enable-host-shared was passed from top-level config: +-if [[ "${enable_host_shared}" = "yes" ]]; then ++# ...unless --enable-host-{shared,pie} was passed from top-level config: ++if [[ "${enable_host_shared}" = "yes" ]] || [[ "${enable_host_pie}" = "yes" ]]; then + shared=yes + fi + +diff --git a/libitm/Makefile.am b/libitm/Makefile.am +index 3f31ad30556..a25317b07fe 100644 +--- a/libitm/Makefile.am ++++ b/libitm/Makefile.am +@@ -54,7 +54,12 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++if ENABLE_DARWIN_AT_RPATH ++libitm_darwin_rpath = -Wc,-nodefaultrpaths ++libitm_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \ ++ $(libitm_darwin_rpath) + + libitm_la_SOURCES = \ + aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \ +diff --git a/libitm/Makefile.in b/libitm/Makefile.in +index 7f53ea9b9db..ed28db45057 100644 +--- a/libitm/Makefile.in ++++ b/libitm/Makefile.in +@@ -481,7 +481,12 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libitm_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \ ++ $(libitm_darwin_rpath) ++ + libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \ + barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \ + retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \ +diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S +index 296cb683a9f..941e886143e 100644 +--- a/libitm/config/aarch64/sjlj.S ++++ b/libitm/config/aarch64/sjlj.S +@@ -57,10 +57,19 @@ + + .text + .align 2 ++#if __ELF__ + .global _ITM_beginTransaction + .type _ITM_beginTransaction, %function + + _ITM_beginTransaction: ++ ++#elif __MACH__ ++ .global __ITM_beginTransaction ++ ++__ITM_beginTransaction: ++ ++#endif ++ + cfi_startproc + CFI_PAC_KEY + PAC_AND_BTI +@@ -84,8 +93,13 @@ _ITM_beginTransaction: + + /* Invoke GTM_begin_transaction with the struct we just built. */ + mov x1, sp ++#if __ELF__ + bl GTM_begin_transaction +- ++#elif __MACH__ ++ bl _GTM_begin_transaction ++#else ++#error "unexpected object format" ++#endif + /* Return; we don't need to restore any of the call-saved regs. */ + ldp x29, x30, [sp], 11*16 + cfi_adjust_cfa_offset(-11*16) +@@ -95,14 +109,23 @@ _ITM_beginTransaction: + CFI_PAC_TOGGLE + ret + cfi_endproc ++#if __ELF__ + .size _ITM_beginTransaction, . - _ITM_beginTransaction ++#endif + + .align 2 ++#if __ELF__ + .global GTM_longjmp + .hidden GTM_longjmp + .type GTM_longjmp, %function + + GTM_longjmp: ++ ++#elif __MACH__ ++ .private_extern _GTM_longjmp ++ ++_GTM_longjmp: ++#endif + /* The first parameter becomes the return value (x0). + The third parameter is ignored for now. */ + cfi_startproc +@@ -126,7 +149,9 @@ GTM_longjmp: + CFI_PAC_TOGGLE + br x30 + cfi_endproc ++#if __ELF__ + .size GTM_longjmp, . - GTM_longjmp ++#endif + + /* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ + #define FEATURE_1_AND 0xc0000000 +diff --git a/libitm/configure b/libitm/configure +index 18fc2d3a10a..863c588e90c 100755 +--- a/libitm/configure ++++ b/libitm/configure +@@ -660,6 +660,8 @@ libtool_VERSION + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CXXCPP +@@ -810,6 +812,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_linux_futex + enable_tls +@@ -1462,6 +1465,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -8278,7 +8284,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10252,6 +10258,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10269,9 +10318,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12058,7 +12111,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12061 "configure" ++#line 12114 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12164,7 +12217,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12167 "configure" ++#line 12220 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13040,6 +13093,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13057,12 +13153,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15414,6 +15518,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -18172,6 +18284,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libitm/configure.ac b/libitm/configure.ac +index 78a682376d9..209a025a90e 100644 +--- a/libitm/configure.ac ++++ b/libitm/configure.ac +@@ -157,6 +157,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes") + AM_PROG_LIBTOOL + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +diff --git a/libitm/configure.tgt b/libitm/configure.tgt +index 06e90973ef3..acaf4f85712 100644 +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -50,7 +50,7 @@ fi + # Map the target cpu to an ARCH sub-directory. At the same time, + # work out any special compilation flags as necessary. + case "${target_cpu}" in +- aarch64*) ARCH=aarch64 ;; ++ aarch64* | arm64*) ARCH=aarch64 ;; + alpha*) ARCH=alpha ;; + rs6000 | powerpc*) + XCFLAGS="${XCFLAGS} -mhtm" +diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp +index 6d8e3e71310..906534022eb 100644 +--- a/libitm/testsuite/lib/libitm.exp ++++ b/libitm/testsuite/lib/libitm.exp +@@ -158,6 +158,7 @@ proc libitm_init { args } { + } + + if [istarget *-*-darwin*] { ++ lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs" + lappend ALWAYS_CFLAGS "additional_flags=-shared-libgcc" + } + +diff --git a/libitm/testsuite/libitm.c++/c++.exp b/libitm/testsuite/libitm.c++/c++.exp +index f92aa096104..295c5bd4703 100644 +--- a/libitm/testsuite/libitm.c++/c++.exp ++++ b/libitm/testsuite/libitm.c++/c++.exp +@@ -56,8 +56,10 @@ if { $lang_test_file_found } { + # Gather a list of all tests. + set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]] + ++ set stdcxxadder "" + if { $blddir != "" } { + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" ++ set stdcxxadder "-B ${blddir}/${lang_library_path}" + } else { + set ld_library_path "$always_ld_library_path" + } +@@ -72,7 +74,7 @@ if { $lang_test_file_found } { + } + + # Main loop. +- dg-runtest $tests "" $libstdcxx_includes ++ dg-runtest $tests $stdcxxadder $libstdcxx_includes + } + + # All done. +diff --git a/libobjc/configure b/libobjc/configure +index 5d1b424a66d..65054115fd0 100755 +--- a/libobjc/configure ++++ b/libobjc/configure +@@ -636,6 +636,9 @@ OBJC_BOEHM_GC_LIBS + OBJC_BOEHM_GC_INCLUDES + OBJC_BOEHM_GC + OBJC_GCFLAGS ++extra_ldflags_libobjc ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + SET_MAKE + CPP + OTOOL64 +@@ -667,7 +670,6 @@ RANLIB + AR + AS + XCFLAGS +-extra_ldflags_libobjc + lt_host_flags + OBJEXT + EXEEXT +@@ -755,6 +757,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_tls + enable_objc_gc + with_target_bdw_gc +@@ -1392,6 +1395,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-tls Use thread-local storage [default=yes] + --enable-objc-gc enable use of Boehm's garbage collector with the GNU + Objective-C runtime +@@ -3430,17 +3436,6 @@ esac + + + +-case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libobjc +- extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' +- ;; +- *-cygwin*|*-mingw*) +- # Tell libtool to build DLLs on Windows +- extra_ldflags_libobjc='$(lt_host_flags)' +- ;; +-esac +- + + # Add CET specific flags if CET is enabled + +@@ -3466,7 +3461,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -6967,7 +6962,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8944,6 +8939,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8961,9 +8999,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10771,7 +10813,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10784 "configure" ++#line 10816 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10877,7 +10919,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10890 "configure" ++#line 10922 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11149,6 +11191,38 @@ $as_echo "no" >&6; } + fi + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ ++# Must come after libtool is initialized. ++case "${host}" in ++ *-darwin[4567]*) ++ # Earlier Darwin versions need -single_module when linking libobjc; they ++ # do not support @rpath. ++ extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ++ ;; ++ *-darwin*) ++ # Otherwise, single_module is the default and multi-module is ignored and ++ # obsolete. ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wc,-nodefaultrpaths" ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wl,-rpath,@loader_path" ++ fi ++ ;; ++ *-cygwin*|*-mingw*) ++ # Tell libtool to build DLLs on Windows ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ ;; ++esac ++ ++ + # ------- + # Headers + # ------- +@@ -11890,6 +11964,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libobjc/configure.ac b/libobjc/configure.ac +index f8f577cfbef..2a9bf1fed4c 100644 +--- a/libobjc/configure.ac ++++ b/libobjc/configure.ac +@@ -147,17 +147,6 @@ m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) + + # extra LD Flags which are required for targets + ACX_LT_HOST_FLAGS +-case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libobjc +- extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' +- ;; +- *-cygwin*|*-mingw*) +- # Tell libtool to build DLLs on Windows +- extra_ldflags_libobjc='$(lt_host_flags)' +- ;; +-esac +-AC_SUBST(extra_ldflags_libobjc) + + # Add CET specific flags if CET is enabled + GCC_CET_FLAGS(CET_FLAGS) +@@ -182,6 +171,31 @@ AM_PROG_CC_C_O + + AC_PROG_MAKE_SET + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ ++# Must come after libtool is initialized. ++case "${host}" in ++ *-darwin[[4567]]*) ++ # Earlier Darwin versions need -single_module when linking libobjc; they ++ # do not support @rpath. ++ extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ++ ;; ++ *-darwin*) ++ # Otherwise, single_module is the default and multi-module is ignored and ++ # obsolete. ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wc,-nodefaultrpaths" ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wl,-rpath,@loader_path" ++ fi ++ ;; ++ *-cygwin*|*-mingw*) ++ # Tell libtool to build DLLs on Windows ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ ;; ++esac ++AC_SUBST(extra_ldflags_libobjc) ++ + # ------- + # Headers + # ------- +diff --git a/liboffloadmic/configure b/liboffloadmic/configure +index dfa8287fd75..995fd94e977 100755 +--- a/liboffloadmic/configure ++++ b/liboffloadmic/configure +@@ -782,6 +782,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1434,6 +1435,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -7900,23 +7904,25 @@ _LT_EOF + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 + $as_echo "$lt_cv_ld_force_load" >&6; } +- case $host_os in +- rhapsody* | darwin1.[012]) ++ # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to ++ # build without first building modern cctools / linker. ++ case $host_cpu-$host_os in ++ *-rhapsody* | *-darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +- darwin1.*) ++ *-darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ *-darwin*) ++ # darwin 5.x (macOS 10.1) onwards we only need to adjust when the ++ # deployment target is forced to an earlier version. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) ++ ;; + 10.[012][,.]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ++ ;; ++ *) ++ ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then +@@ -9614,6 +9620,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9631,9 +9680,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11420,7 +11473,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11433 "configure" ++#line 11476 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11526,7 +11579,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11539 "configure" ++#line 11582 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12402,6 +12455,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12419,12 +12515,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14265,16 +14369,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -14396,7 +14490,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +diff --git a/liboffloadmic/plugin/Makefile.in b/liboffloadmic/plugin/Makefile.in +index 8d5ad0025c2..c53f2d32b3b 100644 +--- a/liboffloadmic/plugin/Makefile.in ++++ b/liboffloadmic/plugin/Makefile.in +@@ -123,10 +123,10 @@ subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../../config/acx.m4 \ + $(top_srcdir)/../../config/depstand.m4 \ +- $(top_srcdir)/../../config/toolexeclibdir.m4 \ + $(top_srcdir)/../../config/lead-dot.m4 \ + $(top_srcdir)/../../config/multi.m4 \ + $(top_srcdir)/../../config/override.m4 \ ++ $(top_srcdir)/../../config/toolexeclibdir.m4 \ + $(top_srcdir)/../../libtool.m4 \ + $(top_srcdir)/../../ltoptions.m4 \ + $(top_srcdir)/../../ltsugar.m4 \ +diff --git a/liboffloadmic/plugin/aclocal.m4 b/liboffloadmic/plugin/aclocal.m4 +index 9fa1d1216c1..1bb91402f66 100644 +--- a/liboffloadmic/plugin/aclocal.m4 ++++ b/liboffloadmic/plugin/aclocal.m4 +@@ -1169,10 +1169,10 @@ AC_SUBST([am__untar]) + + m4_include([../../config/acx.m4]) + m4_include([../../config/depstand.m4]) +-m4_include([../../config/toolexeclibdir.m4]) + m4_include([../../config/lead-dot.m4]) + m4_include([../../config/multi.m4]) + m4_include([../../config/override.m4]) ++m4_include([../../config/toolexeclibdir.m4]) + m4_include([../../libtool.m4]) + m4_include([../../ltoptions.m4]) + m4_include([../../ltsugar.m4]) +diff --git a/liboffloadmic/plugin/configure b/liboffloadmic/plugin/configure +index 0b21d7d4eed..929b7278e8a 100755 +--- a/liboffloadmic/plugin/configure ++++ b/liboffloadmic/plugin/configure +@@ -778,6 +778,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1431,6 +1432,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -7280,23 +7284,25 @@ _LT_EOF + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 + $as_echo "$lt_cv_ld_force_load" >&6; } +- case $host_os in +- rhapsody* | darwin1.[012]) ++ # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to ++ # build without first building modern cctools / linker. ++ case $host_cpu-$host_os in ++ *-rhapsody* | *-darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +- darwin1.*) ++ *-darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ *-darwin*) ++ # darwin 5.x (macOS 10.1) onwards we only need to adjust when the ++ # deployment target is forced to an earlier version. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) ++ ;; + 10.[012][,.]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- esac ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ++ ;; ++ *) ++ ;; ++ esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then +@@ -9261,6 +9267,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9278,9 +9327,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11067,7 +11120,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11080 "configure" ++#line 11123 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11173,7 +11226,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11186 "configure" ++#line 11229 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12049,6 +12102,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12066,12 +12162,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -13912,16 +14016,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -14043,7 +14137,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +diff --git a/libphobos/configure b/libphobos/configure +index 9da06f087d0..77fd1728549 100755 +--- a/libphobos/configure ++++ b/libphobos/configure +@@ -707,6 +707,8 @@ get_gcc_base_ver + phobos_compiler_shared_flag + phobos_compiler_pic_flag + phobos_lt_pic_flag ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + OTOOL64 +@@ -838,6 +840,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + enable_werror + with_libatomic +@@ -1490,6 +1493,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-werror turns on -Werror [default=no] + --enable-version-specific-runtime-libs + Specify that runtime libraries should be installed +@@ -8239,7 +8245,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9944,6 +9950,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9961,9 +10010,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11750,7 +11803,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11753 "configure" ++#line 11806 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11856,7 +11909,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11859 "configure" ++#line 11912 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13381,6 +13434,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_D=no + hardcode_direct_D=no + hardcode_automatic_D=yes +@@ -13398,9 +13494,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_D="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_D="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_D="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_D="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_D="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_D="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -14002,6 +14102,14 @@ CFLAGS=$lt_save_CFLAGS + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # libtool variables for Phobos shared and position-independent compiles. + # +@@ -15726,6 +15834,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${DRUNTIME_CPU_AARCH64_TRUE}" && test -z "${DRUNTIME_CPU_AARCH64_FALSE}"; then + as_fn_error $? "conditional \"DRUNTIME_CPU_AARCH64\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libphobos/configure.ac b/libphobos/configure.ac +index 31209ba2920..cc372587939 100644 +--- a/libphobos/configure.ac ++++ b/libphobos/configure.ac +@@ -93,6 +93,7 @@ AM_PROG_LIBTOOL + WITH_LOCAL_DRUNTIME([LT_LANG([D])], []) + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # libtool variables for Phobos shared and position-independent compiles. + # +diff --git a/libphobos/libdruntime/Makefile.am b/libphobos/libdruntime/Makefile.am +index 6ca4012b713..861ec0ebc03 100644 +--- a/libphobos/libdruntime/Makefile.am ++++ b/libphobos/libdruntime/Makefile.am +@@ -128,8 +128,11 @@ ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \ + toolexeclib_LTLIBRARIES = libgdruntime.la + libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES) + libgdruntime_la_LIBTOOLFLAGS = ++if ENABLE_DARWIN_AT_RPATH ++libgdruntime_darwin_rpath = -Wl,-rpath,@loader_path ++endif + libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgdruntime_darwin_rpath) + libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE) + libgdruntime_la_DEPENDENCIES = $(DRTSTUFF) + # Also override library link commands: This is not strictly +diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in +index f7f78d71ff7..9f3361c7702 100644 +--- a/libphobos/libdruntime/Makefile.in ++++ b/libphobos/libdruntime/Makefile.in +@@ -805,8 +805,9 @@ ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \ + toolexeclib_LTLIBRARIES = libgdruntime.la + libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES) + libgdruntime_la_LIBTOOLFLAGS = ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgdruntime_darwin_rpath = -Wl,-rpath,@loader_path + libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgdruntime_darwin_rpath) + + libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE) + libgdruntime_la_DEPENDENCIES = $(DRTSTUFF) +diff --git a/libphobos/libdruntime/config/aarch64/switchcontext.S b/libphobos/libdruntime/config/aarch64/switchcontext.S +index cf96e28fb50..3df60947fba 100644 +--- a/libphobos/libdruntime/config/aarch64/switchcontext.S ++++ b/libphobos/libdruntime/config/aarch64/switchcontext.S +@@ -44,7 +44,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + */ + .text + .global CSYM(fiber_switchContext) ++#ifndef __APPLE__ + .type CSYM(fiber_switchContext), %function ++#endif + .align 4 + CSYM(fiber_switchContext): + .cfi_startproc +@@ -77,8 +79,9 @@ CSYM(fiber_switchContext): + ldp d15, d14, [sp], #20*8 + ret + .cfi_endproc ++#ifndef __APPLE__ + .size CSYM(fiber_switchContext),.-CSYM(fiber_switchContext) +- ++#endif + /** + * When generating any kind of backtrace (gdb, exception handling) for + * a function called in a Fiber, we need to tell the unwinder to stop +@@ -93,11 +96,15 @@ CSYM(fiber_switchContext): + .text + .global CSYM(fiber_trampoline) + .p2align 2 ++#ifndef __APPLE__ + .type CSYM(fiber_trampoline), %function ++#endif + CSYM(fiber_trampoline): + .cfi_startproc + .cfi_undefined x30 + // fiber_entryPoint never returns + bl CSYM(fiber_entryPoint) + .cfi_endproc ++#ifndef __APPLE__ + .size CSYM(fiber_trampoline),.-CSYM(fiber_trampoline) ++#endif +diff --git a/libphobos/libdruntime/config/arm/switchcontext.S b/libphobos/libdruntime/config/arm/switchcontext.S +index 562e0c76f42..72b281febb8 100644 +--- a/libphobos/libdruntime/config/arm/switchcontext.S ++++ b/libphobos/libdruntime/config/arm/switchcontext.S +@@ -60,11 +60,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + */ + + .text ++#ifndef __APPLE__ + #if defined(__ARM_PCS_VFP) || (defined(__ARM_PCS) && !defined(__SOFTFP__)) + .fpu vfp + #endif + .global CSYM(fiber_switchContext) + .type CSYM(fiber_switchContext), %function ++#else ++ .global CSYM(fiber_switchContext) ++#endif + .align 4 + CSYM(fiber_switchContext): + .cfi_sections .debug_frame +@@ -111,8 +115,12 @@ CSYM(fiber_switchContext): + mov lr, #0 + // return by writing lr into pc + mov pc, r1 ++#ifndef __APPLE__ + .fnend + .cfi_endproc + .size CSYM(fiber_switchContext),.-CSYM(fiber_switchContext) ++#else ++ .cfi_endproc ++#endif + + #endif +diff --git a/libphobos/libdruntime/core/thread/fiber.d b/libphobos/libdruntime/core/thread/fiber.d +index bd53eed2d10..5a3d4cce216 100644 +--- a/libphobos/libdruntime/core/thread/fiber.d ++++ b/libphobos/libdruntime/core/thread/fiber.d +@@ -1788,6 +1788,7 @@ version (OSX) + { + version (X86) version = UnsafeFiberMigration; + version (X86_64) version = UnsafeFiberMigration; ++ version (AArch64) version = UnsafeFiberMigration; + } + + version (UnsafeFiberMigration) +diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am +index da7a2004ff8..a47d985c5b7 100644 +--- a/libphobos/src/Makefile.am ++++ b/libphobos/src/Makefile.am +@@ -44,8 +44,11 @@ toolexeclib_DATA = libgphobos.spec + toolexeclib_LTLIBRARIES = libgphobos.la + libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) + libgphobos_la_LIBTOOLFLAGS = ++if ENABLE_DARWIN_AT_RPATH ++libgphobos_darwin_rpath = -Wl,-rpath,@loader_path ++endif + libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgphobos_darwin_rpath) + if ENABLE_LIBDRUNTIME_ONLY + libgphobos_la_LIBADD = ../libdruntime/libgdruntime_convenience.la + else +diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in +index 6f58fee01ac..212ea2469f2 100644 +--- a/libphobos/src/Makefile.in ++++ b/libphobos/src/Makefile.in +@@ -528,8 +528,9 @@ toolexeclib_DATA = libgphobos.spec + toolexeclib_LTLIBRARIES = libgphobos.la + libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) + libgphobos_la_LIBTOOLFLAGS = ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgphobos_darwin_rpath = -Wl,-rpath,@loader_path + libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgphobos_darwin_rpath) + + @ENABLE_LIBDRUNTIME_ONLY_FALSE@libgphobos_la_LIBADD = \ + @ENABLE_LIBDRUNTIME_ONLY_FALSE@ ../libdruntime/libgdruntime_convenience.la $(LIBZ) +diff --git a/libquadmath/Makefile.am b/libquadmath/Makefile.am +index 35dffb46f6e..f199adf4602 100644 +--- a/libquadmath/Makefile.am ++++ b/libquadmath/Makefile.am +@@ -36,8 +36,13 @@ endif + + toolexeclib_LTLIBRARIES = libquadmath.la + libquadmath_la_LIBADD = ++ ++if ENABLE_DARWIN_AT_RPATH ++libquadmath_darwin_rpath = -Wc,-nodefaultrpaths ++libquadmath_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) -lm ++ $(version_arg) $(lt_host_flags) $(LIBM) $(libquadmath_darwin_rpath) + libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + + nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in +index 8c011212258..70025758cd5 100644 +--- a/libquadmath/Makefile.in ++++ b/libquadmath/Makefile.in +@@ -355,6 +355,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LD = @LD@ + LDFLAGS = @LDFLAGS@ ++LIBM = @LIBM@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -463,8 +464,10 @@ AUTOMAKE_OPTIONS = foreign info-in-builddir + @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = quadmath.map-sun + @BUILD_LIBQUADMATH_TRUE@toolexeclib_LTLIBRARIES = libquadmath.la + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LIBADD = ++@BUILD_LIBQUADMATH_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@libquadmath_darwin_rpath = -Wc,-nodefaultrpaths \ ++@BUILD_LIBQUADMATH_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +-@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) -lm ++@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) $(LIBM) $(libquadmath_darwin_rpath) + + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + @BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +diff --git a/libquadmath/configure b/libquadmath/configure +index b3ee64f9c7d..735d1e05e68 100755 +--- a/libquadmath/configure ++++ b/libquadmath/configure +@@ -644,11 +644,14 @@ LIBQUAD_USE_SYMVER_GNU_FALSE + LIBQUAD_USE_SYMVER_GNU_TRUE + LIBQUAD_USE_SYMVER_FALSE + LIBQUAD_USE_SYMVER_TRUE ++LIBM + toolexeclibdir + toolexecdir + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -785,6 +788,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + with_toolexeclibdir + enable_symvers +@@ -1435,6 +1439,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7267,7 +7274,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8979,6 +8986,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8996,9 +9046,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10806,7 +10860,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10819 "configure" ++#line 10863 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10912,7 +10966,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10925 "configure" ++#line 10969 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11173,6 +11227,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -12137,6 +12199,20 @@ esac + + + ++# AC_CHECK_LIBM variant which avoids AC_CHECK_LIB (that doesn't work ++# on bare metal). In the past we've used -lm in Makefile.am unconditionally, ++# let's use it there unless target knows it doesn't need that. ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*) ++ LIBM=-lm ++ ;; ++esac ++ ++ + for ac_header in fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +@@ -13031,7 +13107,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13397,6 +13473,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac +index eec4084a45f..349be2607c6 100644 +--- a/libquadmath/configure.ac ++++ b/libquadmath/configure.ac +@@ -59,6 +59,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +@@ -121,6 +122,20 @@ esac + AC_SUBST(toolexecdir) + AC_SUBST(toolexeclibdir) + ++# AC_CHECK_LIBM variant which avoids AC_CHECK_LIB (that doesn't work ++# on bare metal). In the past we've used -lm in Makefile.am unconditionally, ++# let's use it there unless target knows it doesn't need that. ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*) ++ LIBM=-lm ++ ;; ++esac ++AC_SUBST([LIBM]) ++ + AC_CHECK_HEADERS(fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h) + LIBQUAD_CHECK_MATH_H_SIGNGAM + +diff --git a/libsanitizer/Makefile.in b/libsanitizer/Makefile.in +index aab88deb6e8..65e7f2e9553 100644 +--- a/libsanitizer/Makefile.in ++++ b/libsanitizer/Makefile.in +@@ -345,7 +345,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am +index 4f802f723d6..223d3e07816 100644 +--- a/libsanitizer/asan/Makefile.am ++++ b/libsanitizer/asan/Makefile.am +@@ -60,7 +60,12 @@ libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) + +-libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) ++if ENABLE_DARWIN_AT_RPATH ++libasan_darwin_rpath = -Wc,-nodefaultrpaths ++libasan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libasan) $(libasan_darwin_rpath) + + libasan_preinit.o: asan_preinit.o + cp $< $@ +diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in +index 2476fbc5a26..e88e5e0b0a7 100644 +--- a/libsanitizer/asan/Makefile.in ++++ b/libsanitizer/asan/Makefile.in +@@ -399,7 +399,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -466,7 +465,12 @@ libasan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/lsan/libsanitizer_lsan.la $(am__append_2) \ + $(am__append_3) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libasan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libasan) $(libasan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/configure b/libsanitizer/configure +index ae8c1bd7e83..96530d540de 100755 +--- a/libsanitizer/configure ++++ b/libsanitizer/configure +@@ -666,6 +666,8 @@ LSAN_SUPPORTED_FALSE + LSAN_SUPPORTED_TRUE + TSAN_SUPPORTED_FALSE + TSAN_SUPPORTED_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CXXCPP +@@ -817,6 +819,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_werror + with_gcc_major_version_only + enable_cet +@@ -1471,6 +1474,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-werror disable building with -Werror + --enable-cet enable Intel CET in target libraries [default=auto] + +@@ -8848,7 +8854,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10553,6 +10559,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10570,9 +10619,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12359,7 +12412,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12362 "configure" ++#line 12415 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12465,7 +12518,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12468 "configure" ++#line 12521 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13341,6 +13394,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13358,12 +13454,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15763,6 +15867,15 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # The cast to long int works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +@@ -17153,6 +17266,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TSAN_SUPPORTED_TRUE}" && test -z "${TSAN_SUPPORTED_FALSE}"; then + as_fn_error $? "conditional \"TSAN_SUPPORTED\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac +index ad49f29db7e..7115c782c82 100644 +--- a/libsanitizer/configure.ac ++++ b/libsanitizer/configure.ac +@@ -85,6 +85,8 @@ esac + AC_SUBST(enable_shared) + AC_SUBST(enable_static) + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_CHECK_SIZEOF([void *]) + + if test "${multilib}" = "yes"; then +diff --git a/libsanitizer/hwasan/Makefile.am b/libsanitizer/hwasan/Makefile.am +index e12c0a0ce71..4061078c734 100644 +--- a/libsanitizer/hwasan/Makefile.am ++++ b/libsanitizer/hwasan/Makefile.am +@@ -46,7 +46,11 @@ libhwasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libhwasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) + +-libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) ++if ENABLE_DARWIN_AT_RPATH ++libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libhwasan) $(libhwasan_darwin_rpath) + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/hwasan/Makefile.in b/libsanitizer/hwasan/Makefile.in +index 67553f3979d..d20f2dc6eef 100644 +--- a/libsanitizer/hwasan/Makefile.in ++++ b/libsanitizer/hwasan/Makefile.in +@@ -387,7 +387,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -442,7 +441,10 @@ libhwasan_la_SOURCES = $(hwasan_files) + libhwasan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libhwasan) $(libhwasan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/interception/Makefile.in b/libsanitizer/interception/Makefile.in +index bce788aeea7..85dd386de47 100644 +--- a/libsanitizer/interception/Makefile.in ++++ b/libsanitizer/interception/Makefile.in +@@ -317,7 +317,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +diff --git a/libsanitizer/libbacktrace/Makefile.in b/libsanitizer/libbacktrace/Makefile.in +index ece4f11a855..c0243fa4aab 100644 +--- a/libsanitizer/libbacktrace/Makefile.in ++++ b/libsanitizer/libbacktrace/Makefile.in +@@ -367,7 +367,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +diff --git a/libsanitizer/lsan/Makefile.am b/libsanitizer/lsan/Makefile.am +index 6ff28ff5eea..7701b0e18cf 100644 +--- a/libsanitizer/lsan/Makefile.am ++++ b/libsanitizer/lsan/Makefile.am +@@ -41,8 +41,12 @@ if LIBBACKTRACE_SUPPORTED + liblsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + liblsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan) +- ++if ENABLE_DARWIN_AT_RPATH ++liblsan_darwin_rpath = -Wc,-nodefaultrpaths ++liblsan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_liblsan) $(liblsan_darwin_rpath) + liblsan_preinit.o: lsan_preinit.o + cp $< $@ + +diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in +index 857f244cd86..078edf01fda 100644 +--- a/libsanitizer/lsan/Makefile.in ++++ b/libsanitizer/lsan/Makefile.in +@@ -362,7 +362,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -414,7 +413,12 @@ liblsan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(am__append_1) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@liblsan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_liblsan) $(liblsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +@@ -789,7 +793,6 @@ uninstall-am: uninstall-nodist_toolexeclibHEADERS \ + + .PRECIOUS: Makefile + +- + liblsan_preinit.o: lsan_preinit.o + cp $< $@ + +diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in +index c4b009fed83..e5e1c1d51fe 100644 +--- a/libsanitizer/sanitizer_common/Makefile.in ++++ b/libsanitizer/sanitizer_common/Makefile.in +@@ -354,7 +354,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am +index ae588a67df6..47ee50bee1a 100644 +--- a/libsanitizer/tsan/Makefile.am ++++ b/libsanitizer/tsan/Makefile.am +@@ -58,7 +58,11 @@ libtsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + libtsan_la_DEPENDENCIES +=$(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libtsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) ++if ENABLE_DARWIN_AT_RPATH ++libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libtsan) $(libtsan_darwin_rpath) + + libtsan_preinit.o: tsan_preinit.o + cp $< $@ +diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in +index 538d2e8eb68..d6efff71e2f 100644 +--- a/libsanitizer/tsan/Makefile.in ++++ b/libsanitizer/tsan/Makefile.in +@@ -391,7 +391,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -466,7 +465,10 @@ libtsan_la_DEPENDENCIES = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(TSAN_TARGET_DEPENDENT_OBJECTS) $(am__append_2) +-libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libtsan) $(libtsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/ubsan/Makefile.am b/libsanitizer/ubsan/Makefile.am +index d480f26adc0..7769b3437e4 100644 +--- a/libsanitizer/ubsan/Makefile.am ++++ b/libsanitizer/ubsan/Makefile.am +@@ -36,7 +36,12 @@ if LIBBACKTRACE_SUPPORTED + libubsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) ++if ENABLE_DARWIN_AT_RPATH ++libubsan_darwin_rpath = -Wc,-nodefaultrpaths ++libubsan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libubsan) $(libubsan_darwin_rpath) + + # Use special rules for files that require RTTI support. + ubsan_handlers_cxx.% ubsan_type_hash.% ubsan_type_hash_itanium.% : AM_CXXFLAGS += -frtti +diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in +index 497e0338696..7e51480e970 100644 +--- a/libsanitizer/ubsan/Makefile.in ++++ b/libsanitizer/ubsan/Makefile.in +@@ -356,7 +356,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -401,7 +400,12 @@ libubsan_la_SOURCES = $(ubsan_files) + libubsan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libubsan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libubsan) $(libubsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libssp/Makefile.am b/libssp/Makefile.am +index 945dc3c8336..d2a92b3aed1 100644 +--- a/libssp/Makefile.am ++++ b/libssp/Makefile.am +@@ -49,8 +49,12 @@ libssp_la_SOURCES = \ + vsnprintf-chk.c vsprintf-chk.c + libssp_la_LIBADD = + libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD) ++if ENABLE_DARWIN_AT_RPATH ++libssp_darwin_rpath = -Wc,-nodefaultrpaths ++libssp_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) ++ $(version_arg) $(lt_host_flags) $(libssp_darwin_rpath) + + libssp_nonshared_la_SOURCES = \ + ssp-local.c +diff --git a/libssp/Makefile.in b/libssp/Makefile.in +index bc8a0dc2b28..1cf86361b96 100644 +--- a/libssp/Makefile.in ++++ b/libssp/Makefile.in +@@ -376,8 +376,11 @@ libssp_la_SOURCES = \ + + libssp_la_LIBADD = + libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libssp_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) ++ $(version_arg) $(lt_host_flags) $(libssp_darwin_rpath) + + libssp_nonshared_la_SOURCES = \ + ssp-local.c +diff --git a/libssp/configure b/libssp/configure +index 10ba209bde8..cb0a9a4308a 100755 +--- a/libssp/configure ++++ b/libssp/configure +@@ -636,6 +636,8 @@ LIBOBJS + get_gcc_base_ver + toolexeclibdir + toolexecdir ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -781,6 +783,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_toolexeclibdir + with_gcc_major_version_only + ' +@@ -1426,6 +1429,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -4338,7 +4344,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -7453,7 +7459,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9165,6 +9171,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9182,9 +9231,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10992,7 +11045,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11005 "configure" ++#line 11048 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11098,7 +11151,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11111 "configure" ++#line 11154 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11376,6 +11429,15 @@ fi + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +@@ -11585,6 +11647,10 @@ if test -z "${LIBSSP_USE_SYMVER_SUN_TRUE}" && test -z "${LIBSSP_USE_SYMVER_SUN_F + as_fn_error $? "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libssp/configure.ac b/libssp/configure.ac +index f30f81c54f6..90778e2355d 100644 +--- a/libssp/configure.ac ++++ b/libssp/configure.ac +@@ -165,6 +165,8 @@ AC_SUBST(enable_static) + + GCC_WITH_TOOLEXECLIBDIR + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +diff --git a/libstdc++-v3/config/os/bsd/darwin/os_defines.h b/libstdc++-v3/config/os/bsd/darwin/os_defines.h +index f56f31ad2f5..5b611d32e0d 100644 +--- a/libstdc++-v3/config/os/bsd/darwin/os_defines.h ++++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h +@@ -33,11 +33,11 @@ + links to, so there's no need for weak-ness for that. */ + #define _GLIBCXX_GTHREAD_USE_WEAK 0 + +-// On Darwin, in order to enable overriding of operator new and delete, +-// GCC makes the definition of these functions weak, relies on the +-// loader to implement weak semantics properly, and uses +-// -flat_namespace to work around the way that it doesn't. +-#define _GLIBCXX_WEAK_DEFINITION __attribute__ ((weak)) ++// On Darwin, in order to enable overriding of operator new and delete, the ++// ABI library exports a weak definition. The static linker will override this ++// iff a user-provided implementation is given (providing that the user ++// implementation is not itself a weak definition). ++#define _GLIBCXX_WEAK_DEFINITION __attribute__ ((__weak__)) + + #if defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ + && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1080) +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index ccc23f1b352..8c15ae6f9bd 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -788,6 +788,8 @@ glibcxx_compiler_pic_flag + glibcxx_lt_pic_flag + OS_IS_DARWIN_FALSE + OS_IS_DARWIN_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -923,6 +925,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_hosted_libstdcxx + enable_libstdcxx_verbose + enable_libstdcxx_pch +@@ -1610,6 +1613,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-hosted-libstdcxx + only build freestanding C++ runtime support + --disable-libstdcxx-verbose +@@ -8526,7 +8532,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10366,6 +10372,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10383,9 +10432,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12193,7 +12246,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12196 "configure" ++#line 12249 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12299,7 +12352,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12302 "configure" ++#line 12355 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13181,6 +13234,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13198,12 +13294,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15580,6 +15684,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + os_is_darwin=no + case ${host_os} in +@@ -15997,7 +16109,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } + # Fake what AC_TRY_COMPILE does. + + cat > conftest.$ac_ext << EOF +-#line 16000 "configure" ++#line 16112 "configure" + int main() + { + typedef bool atomic_type; +@@ -16032,7 +16144,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16035 "configure" ++#line 16147 "configure" + int main() + { + typedef short atomic_type; +@@ -16067,7 +16179,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16070 "configure" ++#line 16182 "configure" + int main() + { + // NB: _Atomic_word not necessarily int. +@@ -16103,7 +16215,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16106 "configure" ++#line 16218 "configure" + int main() + { + typedef long long atomic_type; +@@ -16259,7 +16371,7 @@ $as_echo "mutex" >&6; } + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 16262 "configure" ++#line 16374 "configure" + int main() + { + _Decimal32 d1; +@@ -16301,7 +16413,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 16304 "configure" ++#line 16416 "configure" + template + struct same + { typedef T2 type; }; +@@ -79309,6 +79421,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${OS_IS_DARWIN_TRUE}" && test -z "${OS_IS_DARWIN_FALSE}"; then + as_fn_error $? "conditional \"OS_IS_DARWIN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index dc0c61973d1..f9c9f959848 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -99,6 +99,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + os_is_darwin=no + case ${host_os} in +diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host +index ec32980aa0d..da5b1578d91 100644 +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -234,11 +234,6 @@ case "${host_os}" in + darwin8 | darwin8.* ) + # For 8+ compatibility is better if not -flat_namespace. + OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module" +- case "${host_cpu}" in +- i[34567]86 | x86_64) +- OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -fvisibility-inlines-hidden" +- ;; +- esac + os_include_dir="os/bsd/darwin" + ;; + darwin*) +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index b83c222d51d..2ff635a7264 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -139,8 +139,13 @@ libstdc___la_DEPENDENCIES = \ + $(top_builddir)/src/c++17/libc++17convenience.la \ + $(top_builddir)/src/c++20/libc++20convenience.la + ++if ENABLE_DARWIN_AT_RPATH ++libstdc___darwin_rpath = -Wc,-nodefaultrpaths ++libstdc___darwin_rpath += -Wl,-rpath,@loader_path ++endif ++ + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm ++ -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index cef290c5d11..3676208223a 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -553,8 +553,11 @@ libstdc___la_DEPENDENCIES = \ + $(top_builddir)/src/c++17/libc++17convenience.la \ + $(top_builddir)/src/c++20/libc++20convenience.la + ++@ENABLE_DARWIN_AT_RPATH_TRUE@libstdc___darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm ++ -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + @GLIBCXX_LDBL_ALT128_COMPAT_FALSE@@GLIBCXX_LDBL_COMPAT_TRUE@LTCXXCOMPILE64 = $(LTCXXCOMPILE) +diff --git a/libtool.m4 b/libtool.m4 +index 17f8e5f3074..1060b698168 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -1005,7 +1005,7 @@ _LT_EOF + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0123456789]]*) ++ UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0-9]]*) + ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -1039,6 +1039,45 @@ _LT_EOF + m4_defun([_LT_DARWIN_LINKER_FEATURES], + [ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ AC_ARG_ENABLE([darwin-at-rpath], ++ AS_HELP_STRING([--enable-darwin-at-rpath], ++ [install libraries with @rpath/library-name, requires rpaths to be added to executables]), ++ [if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*) ++ AC_MSG_WARN([Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)]) ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi], ++ [case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[[5-9]]*|UNSET,darwin2*|10.1[[1-9]][[,.]]*|1[[1-9]].*[[,.]]* ) ++ AC_MSG_NOTICE([@rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)]) ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ]) ++ + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes +@@ -1056,13 +1095,21 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], + [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + ],[]) +@@ -6441,7 +6488,6 @@ fi # test "$_lt_caught_CXX_error" != yes + AC_LANG_POP + ])# _LT_LANG_CXX_CONFIG + +- + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +diff --git a/libvtv/configure b/libvtv/configure +index d64b4af5c6b..3ce65ead30a 100755 +--- a/libvtv/configure ++++ b/libvtv/configure +@@ -640,6 +640,8 @@ VTV_CYGMIN_FALSE + VTV_CYGMIN_TRUE + XCFLAGS + libtool_VERSION ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -797,6 +799,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_cet + with_gcc_major_version_only + ' +@@ -1446,6 +1449,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in target libraries [default=auto] + + Optional Packages: +@@ -8743,7 +8749,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10448,6 +10454,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10465,9 +10514,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12254,7 +12307,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12267 "configure" ++#line 12310 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12360,7 +12413,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12373 "configure" ++#line 12416 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13236,6 +13289,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13253,12 +13349,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15099,16 +15203,6 @@ freebsd* | dragonfly*) + esac + ;; + +-gnu*) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- hardcode_into_libs=yes +- ;; +- + haiku*) + version_type=linux + need_lib_prefix=no +@@ -15230,7 +15324,7 @@ linux*oldld* | linux*aout* | linux*coff*) + # project, but have not yet been accepted: they are GCC-local changes + # for the time being. (See + # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +-linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15642,6 +15736,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=1:0:0 +@@ -15672,7 +15774,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -15987,6 +16089,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${VTV_CYGMIN_TRUE}" && test -z "${VTV_CYGMIN_FALSE}"; then + as_fn_error $? "conditional \"VTV_CYGMIN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libvtv/configure.ac b/libvtv/configure.ac +index f3b937e4b10..50aaadbb3a3 100644 +--- a/libvtv/configure.ac ++++ b/libvtv/configure.ac +@@ -153,6 +153,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=1:0:0 +diff --git a/lto-plugin/configure b/lto-plugin/configure +index b820accfd65..f6c076de88a 100755 +--- a/lto-plugin/configure ++++ b/lto-plugin/configure +@@ -634,6 +634,8 @@ LTLIBOBJS + LIBOBJS + target_noncanonical + lt_host_flags ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + OTOOL64 + OTOOL + LIPO +@@ -785,6 +787,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + ' + ac_precious_vars='build_alias + host_alias +@@ -1430,6 +1433,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -8569,7 +8575,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10275,6 +10281,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10292,9 +10341,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12081,7 +12134,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12084 "configure" ++#line 12137 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12187,7 +12240,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12190 "configure" ++#line 12243 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12424,6 +12477,14 @@ CC="$lt_save_CC" + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + +@@ -12670,6 +12731,10 @@ if test -z "${LTO_PLUGIN_USE_SYMVER_SUN_TRUE}" && test -z "${LTO_PLUGIN_USE_SYMV + as_fn_error $? "conditional \"LTO_PLUGIN_USE_SYMVER_SUN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac +index bc5b618a495..317596288b2 100644 +--- a/lto-plugin/configure.ac ++++ b/lto-plugin/configure.ac +@@ -88,6 +88,7 @@ AM_CONDITIONAL(LTO_PLUGIN_USE_SYMVER_GNU, [test "x$lto_plugin_use_symver" = xgnu + AM_CONDITIONAL(LTO_PLUGIN_USE_SYMVER_SUN, [test "x$lto_plugin_use_symver" = xsun]) + + AM_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + ACX_LT_HOST_FLAGS + AC_SUBST(target_noncanonical) + AC_TYPE_INT64_T +diff --git a/zlib/Makefile.in b/zlib/Makefile.in +index 3f5102d1b87..80fe3b69116 100644 +--- a/zlib/Makefile.in ++++ b/zlib/Makefile.in +@@ -353,6 +353,8 @@ datadir = @datadir@ + datarootdir = @datarootdir@ + docdir = @docdir@ + dvidir = @dvidir@ ++enable_host_pie = @enable_host_pie@ ++enable_host_shared = @enable_host_shared@ + exec_prefix = @exec_prefix@ + host = @host@ + host_alias = @host_alias@ +diff --git a/zlib/configure b/zlib/configure +index f489f31bc70..6c76fccc68c 100755 +--- a/zlib/configure ++++ b/zlib/configure +@@ -635,10 +635,14 @@ am__EXEEXT_TRUE + LTLIBOBJS + LIBOBJS + PICFLAG ++enable_host_pie ++enable_host_shared + TARGET_LIBRARY_FALSE + TARGET_LIBRARY_TRUE + toolexeclibdir + toolexecdir ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CPP + OTOOL64 + OTOOL +@@ -776,8 +780,10 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_toolexeclibdir + enable_host_shared ++enable_host_pie + ' + ac_precious_vars='build_alias + host_alias +@@ -1419,7 +1425,11 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -4169,7 +4179,7 @@ case "$host" in + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs +- # and if assembler supports CET insn. ++ # and if compiler and assembler support CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -6929,7 +6939,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8908,6 +8918,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8925,9 +8978,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10735,7 +10792,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10748 "configure" ++#line 10795 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10841,7 +10898,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10854 "configure" ++#line 10901 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11078,6 +11135,14 @@ CC="$lt_save_CC" + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # Find CPP now so that any conditional tests below won't do it and + # thereby make the resulting definitions conditional. +@@ -11524,15 +11589,31 @@ else + multilib_arg= + fi + ++# Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + + +- + ac_config_files="$ac_config_files Makefile" + + cat >confcache <<\_ACEOF +@@ -11708,6 +11789,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TARGET_LIBRARY_TRUE}" && test -z "${TARGET_LIBRARY_FALSE}"; then + as_fn_error $? "conditional \"TARGET_LIBRARY\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/zlib/configure.ac b/zlib/configure.ac +index be1cfe29651..9501cdfea85 100644 +--- a/zlib/configure.ac ++++ b/zlib/configure.ac +@@ -64,6 +64,7 @@ GCC_CET_FLAGS(CET_FLAGS) + AC_SUBST(CET_FLAGS) + + AC_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # Find CPP now so that any conditional tests below won't do it and + # thereby make the resulting definitions conditional. +@@ -122,11 +123,26 @@ else + multilib_arg= + fi + ++# Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) +-AC_SUBST(PICFLAG) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi + ++AC_SUBST(PICFLAG) + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT diff --git a/Patches/gcc/gcc-13.4.0.diff b/Patches/gcc/gcc-13.4.0.diff new file mode 100644 index 0000000000000..df1be95612ce4 --- /dev/null +++ b/Patches/gcc/gcc-13.4.0.diff @@ -0,0 +1,14995 @@ +diff --git a/Makefile.def b/Makefile.def +index 35e994eb77e..9b4a8a2bf7a 100644 +--- a/Makefile.def ++++ b/Makefile.def +@@ -47,7 +47,8 @@ host_modules= { module= fixincludes; bootstrap=true; + host_modules= { module= flex; no_check_cross= true; }; + host_modules= { module= gas; bootstrap=true; }; + host_modules= { module= gcc; bootstrap=true; +- extra_make_flags="$(EXTRA_GCC_FLAGS)"; }; ++ extra_make_flags="$(EXTRA_GCC_FLAGS)"; ++ extra_configure_flags='@gcc_host_pie@'; }; + host_modules= { module= gmp; lib_path=.libs; bootstrap=true; + // Work around in-tree gmp configure bug with missing flex. + extra_configure_flags='--disable-shared LEX="touch lex.yy.c" @host_libs_picflag@'; +diff --git a/Makefile.in b/Makefile.in +index 205d3c30bde..e4106354c3b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -335,6 +335,7 @@ RAW_CXX_TARGET_EXPORTS = \ + + NORMAL_TARGET_EXPORTS = \ + $(BASE_TARGET_EXPORTS) \ ++ CXX_FOR_TARGET="$(CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; + + # Where to find GMP +@@ -12016,7 +12017,7 @@ configure-gcc: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} \ ++ --target=${target_alias} @gcc_host_pie@ \ + || exit 1 + @endif gcc + +@@ -12051,7 +12052,8 @@ configure-stage1-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + \ +- $(STAGE1_CONFIGURE_FLAGS) ++ $(STAGE1_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage2-gcc maybe-configure-stage2-gcc +@@ -12084,7 +12086,8 @@ configure-stage2-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE2_CONFIGURE_FLAGS) ++ $(STAGE2_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage3-gcc maybe-configure-stage3-gcc +@@ -12117,7 +12120,8 @@ configure-stage3-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE3_CONFIGURE_FLAGS) ++ $(STAGE3_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stage4-gcc maybe-configure-stage4-gcc +@@ -12150,7 +12154,8 @@ configure-stage4-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGE4_CONFIGURE_FLAGS) ++ $(STAGE4_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc +@@ -12183,7 +12188,8 @@ configure-stageprofile-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEprofile_CONFIGURE_FLAGS) ++ $(STAGEprofile_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stagetrain-gcc maybe-configure-stagetrain-gcc +@@ -12216,7 +12222,8 @@ configure-stagetrain-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEtrain_CONFIGURE_FLAGS) ++ $(STAGEtrain_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc +@@ -12249,7 +12256,8 @@ configure-stagefeedback-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEfeedback_CONFIGURE_FLAGS) ++ $(STAGEfeedback_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageautoprofile-gcc maybe-configure-stageautoprofile-gcc +@@ -12282,7 +12290,8 @@ configure-stageautoprofile-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEautoprofile_CONFIGURE_FLAGS) ++ $(STAGEautoprofile_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + .PHONY: configure-stageautofeedback-gcc maybe-configure-stageautofeedback-gcc +@@ -12315,7 +12324,8 @@ configure-stageautofeedback-gcc: + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ +- $(STAGEautofeedback_CONFIGURE_FLAGS) ++ $(STAGEautofeedback_CONFIGURE_FLAGS) \ ++ @gcc_host_pie@ + @endif gcc-bootstrap + + +diff --git a/Makefile.tpl b/Makefile.tpl +index d5f50e9778f..6b3aaabaee1 100644 +--- a/Makefile.tpl ++++ b/Makefile.tpl +@@ -338,6 +338,7 @@ RAW_CXX_TARGET_EXPORTS = \ + + NORMAL_TARGET_EXPORTS = \ + $(BASE_TARGET_EXPORTS) \ ++ CXX_FOR_TARGET="$(CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; + + # Where to find GMP +diff --git a/c++tools/Makefile.in b/c++tools/Makefile.in +index 77bda3d56dc..dcb1029e064 100644 +--- a/c++tools/Makefile.in ++++ b/c++tools/Makefile.in +@@ -29,8 +29,9 @@ AUTOCONF := @AUTOCONF@ + AUTOHEADER := @AUTOHEADER@ + CXX := @CXX@ + CXXFLAGS := @CXXFLAGS@ +-PIEFLAG := @PIEFLAG@ +-CXXOPTS := $(CXXFLAGS) $(PIEFLAG) -fno-exceptions -fno-rtti ++PICFLAG := @PICFLAG@ ++LD_PICFLAG := @LD_PICFLAG@ ++CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-exceptions -fno-rtti + LDFLAGS := @LDFLAGS@ + exeext := @EXEEXT@ + LIBIBERTY := ../libiberty/libiberty.a +@@ -90,11 +91,15 @@ ifeq (@CXX_AUX_TOOLS@,yes) + + all::g++-mapper-server$(exeext) + ++ifneq ($(PICFLAG),) ++override LIBIBERTY := ../libiberty/pic/libiberty.a ++endif ++ + MAPPER.O := server.o resolver.o + CODYLIB = ../libcody/libcody.a + CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. -I../gcc + g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB) +- +$(CXX) $(LDFLAGS) $(PIEFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS) ++ +$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS) + + # copy to gcc dir so tests there can run + all::../gcc/g++-mapper-server$(exeext) +diff --git a/c++tools/configure b/c++tools/configure +index 742816e4253..88087009383 100755 +--- a/c++tools/configure ++++ b/c++tools/configure +@@ -627,7 +627,8 @@ get_gcc_base_ver + EGREP + GREP + CXXCPP +-PIEFLAG ++LD_PICFLAG ++PICFLAG + MAINTAINER + CXX_AUX_TOOLS + AUTOHEADER +@@ -700,6 +701,7 @@ enable_c___tools + enable_maintainer_mode + enable_checking + enable_default_pie ++enable_host_pie + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1333,6 +1335,7 @@ Optional Features: + only specific categories of checks. Categories are: + yes,no,all,none,release. + --enable-default-pie enable Position Independent Executable as default ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2990,12 +2993,20 @@ fi + # Check whether --enable-default-pie was given. + # Check whether --enable-default-pie was given. + if test "${enable_default_pie+set}" = set; then : +- enableval=$enable_default_pie; PIEFLAG=-fPIE ++ enableval=$enable_default_pie; PICFLAG=-fPIE + else +- PIEFLAG= ++ PICFLAG= + fi + + ++# Enable --enable-host-pie ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie ++fi ++ ++ ++ + + # Check if O_CLOEXEC is defined by fcntl + +diff --git a/c++tools/configure.ac b/c++tools/configure.ac +index 23e98c8e721..44dfaccbbfa 100644 +--- a/c++tools/configure.ac ++++ b/c++tools/configure.ac +@@ -102,8 +102,15 @@ fi + AC_ARG_ENABLE(default-pie, + [AS_HELP_STRING([--enable-default-pie], + [enable Position Independent Executable as default])], +-[PIEFLAG=-fPIE], [PIEFLAG=]) +-AC_SUBST([PIEFLAG]) ++[PICFLAG=-fPIE], [PICFLAG=]) ++ ++# Enable --enable-host-pie ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])], ++[PICFLAG=-fPIE; LD_PICFLAG=-pie], []) ++AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) + + # Check if O_CLOEXEC is defined by fcntl + AC_CACHE_CHECK(for O_CLOEXEC, ac_cv_o_cloexec, [ +diff --git a/configure b/configure +index 117a7ef23f2..c721ee4b5b2 100755 +--- a/configure ++++ b/configure +@@ -687,7 +687,10 @@ extra_host_zlib_configure_flags + extra_host_libiberty_configure_flags + stage1_languages + host_libs_picflag ++PICFLAG + host_shared ++gcc_host_pie ++host_pie + extra_linker_plugin_flags + extra_linker_plugin_configure_flags + islinc +@@ -830,6 +833,7 @@ enable_isl_version_check + enable_lto + enable_linker_plugin_configure_flags + enable_linker_plugin_flags ++enable_host_pie + enable_host_shared + enable_stage1_languages + enable_objc_gc +@@ -1558,6 +1562,7 @@ Optional Features: + --enable-linker-plugin-flags=FLAGS + additional flags for configuring and building linker + plugins [none] ++ --enable-host-pie build position independent host executables + --enable-host-shared build host code as shared libraries + --enable-stage1-languages[=all] + choose additional languages to build during stage1. +@@ -3451,6 +3456,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[3456789]86-*-darwin*) +@@ -8414,6 +8421,20 @@ else + fi + fi + ++case $target in ++ *-darwin2* | *-darwin1[56789]*) ++ # For these versions, we default to using embedded rpaths. ++ if test "x$enable_darwin_at_rpath" != "xno"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++ *-darwin*) ++ # For these versions, we only use embedded rpaths on demand. ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++esac + + + # GCC GRAPHITE dependency isl. +@@ -8645,6 +8666,39 @@ fi + + + ++# Handle --enable-host-pie ++# If host PIE executables are the default (or must be forced on) for some host, ++# we must pass that configuration to the gcc directory. ++gcc_host_pie= ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; host_pie=$enableval ++ case $host in ++ *-*-darwin2*) ++ if test x$host_pie != xyes ; then ++ # for Darwin20+ this is required. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&2;} ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ fi ;; ++ *) ;; ++ esac ++else ++ case $host in ++ *-*-darwin2*) ++ # Default to PIE (mandatory for aarch64). ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ ;; ++ *) host_pie=no ;; ++ esac ++fi ++ ++ ++ ++ ++ + # Enable --enable-host-shared. + # Checked early to determine whether jit is an 'all' language + # Check whether --enable-host-shared was given. +@@ -8654,26 +8708,57 @@ if test "${enable_host_shared+set}" = set; then : + x86_64-*-darwin* | aarch64-*-darwin*) + if test x$host_shared != xyes ; then + # PIC is the default, and actually cannot be switched off. +- echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&2;} ++ host_shared=yes ++ fi ;; ++ *-*-darwin*) ++ if test x$host_pie = xyes -a x$host_shared != xyes ; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&5 ++$as_echo "$as_me: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&2;} + host_shared=yes + fi ;; + *) ;; + esac + else + case $host in ++ # 64B x86_64 and Aarch64 Darwin default to PIC. + x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; +- *) host_shared=no ;; ++ # 32B and powerpc64 Darwin must use PIC to link PIE exes. ++ *-*-darwin*) host_shared=$host_pie ;; ++ *) host_shared=no;; + esac + fi + + + + ++if test x$host_shared = xyes; then ++ case $host in ++ *-*-darwin*) ++ # Since host shared is the default for 64b Darwin, and also enabled for ++ # host_pie, ensure that we present the PIE flag when host_pie is active. ++ if test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++ fi ++ ;; ++ *) ++ PICFLAG=-fPIC ++ ;; ++ esac ++elif test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++ ++ + # If we are building PIC/PIE host executables, and we are building dependent + # libs (e.g. GMP) in-tree those libs need to be configured to generate PIC + # code. + host_libs_picflag= +-if test "$host_shared" = "yes";then ++if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then + host_libs_picflag='--with-pic' + fi + +diff --git a/configure.ac b/configure.ac +index b3e9bbd2aa5..a75c9e8850c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -710,6 +710,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[[3456789]]86-*-darwin*) +@@ -1806,6 +1808,20 @@ AC_ARG_WITH(boot-ldflags, + if test "$poststage1_libs" = ""; then + poststage1_ldflags="-static-libstdc++ -static-libgcc" + fi]) ++case $target in ++ *-darwin2* | *-darwin1[[56789]]*) ++ # For these versions, we default to using embedded rpaths. ++ if test "x$enable_darwin_at_rpath" != "xno"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++ *-darwin*) ++ # For these versions, we only use embedded rpaths on demand. ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ poststage1_ldflags="$poststage1_ldflags -nodefaultrpaths" ++ fi ++ ;; ++esac + AC_SUBST(poststage1_ldflags) + + # GCC GRAPHITE dependency isl. +@@ -1891,6 +1907,36 @@ AC_ARG_ENABLE(linker-plugin-flags, + extra_linker_plugin_flags=) + AC_SUBST(extra_linker_plugin_flags) + ++# Handle --enable-host-pie ++# If host PIE executables are the default (or must be forced on) for some host, ++# we must pass that configuration to the gcc directory. ++gcc_host_pie= ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build position independent host executables])], ++[host_pie=$enableval ++ case $host in ++ *-*-darwin2*) ++ if test x$host_pie != xyes ; then ++ # for Darwin20+ this is required. ++ AC_MSG_WARN([PIE executables are required for the configured host, host-pie setting ignored.]) ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ fi ;; ++ *) ;; ++ esac], ++[case $host in ++ *-*-darwin2*) ++ # Default to PIE (mandatory for aarch64). ++ host_pie=yes ++ gcc_host_pie=--enable-host-pie ++ ;; ++ *) host_pie=no ;; ++ esac]) ++ ++AC_SUBST(host_pie) ++AC_SUBST(gcc_host_pie) ++ + # Enable --enable-host-shared. + # Checked early to determine whether jit is an 'all' language + AC_ARG_ENABLE(host-shared, +@@ -1901,23 +1947,52 @@ AC_ARG_ENABLE(host-shared, + x86_64-*-darwin* | aarch64-*-darwin*) + if test x$host_shared != xyes ; then + # PIC is the default, and actually cannot be switched off. +- echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 ++ AC_MSG_WARN([PIC code is required for the configured host; host-shared setting ignored.]) ++ host_shared=yes ++ fi ;; ++ *-*-darwin*) ++ if test x$host_pie = xyes -a x$host_shared != xyes ; then ++ AC_MSG_WARN([PIC code is required for PIE host executables host-shared setting ignored.]) + host_shared=yes + fi ;; + *) ;; + esac], + [case $host in ++ # 64B x86_64 and Aarch64 Darwin default to PIC. + x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; +- *) host_shared=no ;; ++ # 32B and powerpc64 Darwin must use PIC to link PIE exes. ++ *-*-darwin*) host_shared=$host_pie ;; ++ *) host_shared=no;; + esac]) + + AC_SUBST(host_shared) + ++if test x$host_shared = xyes; then ++ case $host in ++ *-*-darwin*) ++ # Since host shared is the default for 64b Darwin, and also enabled for ++ # host_pie, ensure that we present the PIE flag when host_pie is active. ++ if test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++ fi ++ ;; ++ *) ++ PICFLAG=-fPIC ++ ;; ++ esac ++elif test x$host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++AC_SUBST(PICFLAG) ++ + # If we are building PIC/PIE host executables, and we are building dependent + # libs (e.g. GMP) in-tree those libs need to be configured to generate PIC + # code. + host_libs_picflag= +-if test "$host_shared" = "yes";then ++if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then + host_libs_picflag='--with-pic' + fi + AC_SUBST(host_libs_picflag) +diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in +index 1937dcaa32d..e6ce41dba39 100644 +--- a/fixincludes/Makefile.in ++++ b/fixincludes/Makefile.in +@@ -73,7 +73,7 @@ default : all + # Now figure out from those variables how to compile and link. + + .c.o: +- $(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $< ++ $(CC) -c $(CFLAGS) $(PICFLAG) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $< + + # The only suffixes we want for implicit rules are .c and .o. + .SUFFIXES: +@@ -87,7 +87,11 @@ default : all + ## + ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + ++ifeq ($(PICFLAG),) + LIBIBERTY=../libiberty/libiberty.a ++else ++LIBIBERTY=../libiberty/pic/libiberty.a ++endif + + ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \ + fixlib.o fixopts.o +@@ -107,15 +111,15 @@ oneprocess : full-stamp + twoprocess : test-stamp $(AF) + + full-stamp : $(ALLOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(ALLOBJ) $(LIBIBERTY) + $(STAMP) $@ + + test-stamp : $(TESTOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(TESTOBJ) $(LIBIBERTY) + $(STAMP) $@ + + $(AF): $(FIXOBJ) $(LIBIBERTY) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY) ++ $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $@ $(FIXOBJ) $(LIBIBERTY) + + $(ALLOBJ) : $(HDR) + fixincl.o : fixincl.c $(srcdir)/fixincl.x +diff --git a/fixincludes/configure b/fixincludes/configure +index bdcc41f6ddc..b2759ee3b98 100755 +--- a/fixincludes/configure ++++ b/fixincludes/configure +@@ -623,6 +623,8 @@ ac_subst_vars='LTLIBOBJS + LIBOBJS + get_gcc_base_ver + MAINT ++LD_PICFLAG ++PICFLAG + TARGET + target_noncanonical + WERROR +@@ -695,6 +697,7 @@ enable_option_checking + enable_werror_always + with_local_prefix + enable_twoprocess ++enable_host_pie + enable_maintainer_mode + with_gcc_major_version_only + ' +@@ -1323,6 +1326,7 @@ Optional Features: + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-werror-always enable -Werror despite compiler version + --enable-twoprocess Use a separate process to apply the fixes ++ --enable-host-pie build host code as PIE + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +@@ -3044,7 +3048,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # the compiler configuration to `libtool'. + # _LT_LANG_CXX_CONFIG + +- + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +@@ -4835,6 +4838,15 @@ $as_echo "#define SEPARATE_FIX_PROC 1" >>confdefs.h + + fi + ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie ++fi ++ ++ ++ ++ + case $host in + vax-dec-bsd* ) + +diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac +index ef2227e3c93..4e78511d20f 100644 +--- a/fixincludes/configure.ac ++++ b/fixincludes/configure.ac +@@ -68,6 +68,14 @@ if test $TARGET = twoprocess; then + [Define if testing and fixing are done by separate process]) + fi + ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])], ++[PICFLAG=-fPIE; LD_PICFLAG=-pie], []) ++AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) ++ + case $host in + vax-dec-bsd* ) + AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit]) +diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x +index ab86aa383db..368a8ee8c13 100644 +--- a/fixincludes/fixincl.x ++++ b/fixincludes/fixincl.x +@@ -2,11 +2,11 @@ + * + * DO NOT EDIT THIS FILE (fixincl.x) + * +- * It has been AutoGen-ed May 27, 2025 at 10:40:20 AM by AutoGen 5.18.16 ++ * It has been AutoGen-ed June 1, 2025 at 09:50:55 AM by AutoGen 5.18.16 + * From the definitions inclhack.def + * and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Tue May 27 10:40:20 BST 2025 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 1 09:50:55 BST 2025 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 274 fixup descriptions. ++ * This file contains 272 fixup descriptions. + * + * See README for more information. + * +@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { + #endif /* __MATH__ */", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Api_Availability fix +- */ +-tSCC zDarwin_Api_AvailabilityName[] = +- "darwin_api_availability"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_Api_AvailabilityList[] = +- "os/availability.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_Api_AvailabilityMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilitySelect0[] = +- " *#define __API_AVAILABLE.*\n\ +- *#define __API_DEPRECATED.*\n\ +- *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ +- *#define __API_UNAVAILABLE.*\n"; +- +-/* +- * content bypass pattern - skip fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilityBypass0[] = +- "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- +-#define DARWIN_API_AVAILABILITY_TEST_CT 2 +-static tTestDesc aDarwin_Api_AvailabilityTests[] = { +- { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, +- { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Api_Availability +- */ +-static const char* apzDarwin_Api_AvailabilityPatch[] = { +- "format", +- " #define API_AVAILABLE(...)\n\ +- #define API_DEPRECATED(...)\n\ +- #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ +- #define API_UNAVAILABLE(...)\n", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix +@@ -2763,51 +2713,6 @@ extern \"C\" {\n\ + #endif\n", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Availabilityinternal fix +- */ +-tSCC zDarwin_AvailabilityinternalName[] = +- "darwin_availabilityinternal"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_AvailabilityinternalList[] = +- "AvailabilityInternal.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_AvailabilityinternalMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_AvailabilityinternalSelect0[] = +- "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- +-#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1 +-static tTestDesc aDarwin_AvailabilityinternalTests[] = { +- { TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Availabilityinternal +- */ +-static const char* apzDarwin_AvailabilityinternalPatch[] = { +- "format", +- "#if defined(__has_attribute)\n\ +- #if __has_attribute(availability)\n\ +-%0\n\ +- #else\n\ +- #define %1\n\ +- #endif\n\ +-#else\n\ +- #define %1\n\ +-#endif", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_9_Long_Double_Funcs_2 fix +@@ -11169,9 +11074,9 @@ static const char* apzX11_SprintfPatch[] = { + * + * List of all fixes + */ +-#define REGEX_COUNT 313 ++#define REGEX_COUNT 310 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 274 ++#define FIX_COUNT 272 + + /* + * Enumerate the fixes +@@ -11180,7 +11085,6 @@ typedef enum { + AAB_AIX_STDIO_FIXIDX, + AAB_AIX_FCNTL_FIXIDX, + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, +- DARWIN_API_AVAILABILITY_FIXIDX, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, + AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, + AAB_FD_ZERO_SELECTBITS_H_FIXIDX, +@@ -11242,7 +11146,6 @@ typedef enum { + CTRL_QUOTES_DEF_FIXIDX, + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, +- DARWIN_AVAILABILITYINTERNAL_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, + DARWIN_EXTERNC_FIXIDX, + DARWIN_GCC4_BREAKAGE_FIXIDX, +@@ -11469,11 +11372,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + +- { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, +- apzDarwin_Api_AvailabilityMachs, +- DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, +- + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, + apzAab_Fd_Zero_Asm_Posix_Types_HMachs, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, +@@ -11779,11 +11677,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, + +- { zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList, +- apzDarwin_AvailabilityinternalMachs, +- DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 }, +- + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def +index f916a3bebd4..e3f6bbbfd68 100644 +--- a/fixincludes/inclhack.def ++++ b/fixincludes/inclhack.def +@@ -194,33 +194,6 @@ fix = { + _EndOfHeader_; + }; + +-/* +- * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where +- * __attribute__((availability)) is not supported. +- */ +-fix = { +- hackname = darwin_api_availability; +- mach = "*-*-darwin*"; +- files = os/availability.h; +- bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- select = +- " *#define __API_AVAILABLE.*\n" +- " *#define __API_DEPRECATED.*\n" +- " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" +- " *#define __API_UNAVAILABLE.*\n"; +- c_fix = format; +- c_fix_arg = +- " #define API_AVAILABLE(...)\n" +- " #define API_DEPRECATED(...)\n" +- " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- " #define API_UNAVAILABLE(...)\n"; +- test_text = +- "#define __API_AVAILABLE(...)\n" +- "#define __API_DEPRECATED(...)\n" +- "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- "#define __API_UNAVAILABLE(...)\n"; +-}; +- + /* + * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) + */ +@@ -1351,32 +1324,6 @@ fix = { + test_text = "extern void* malloc( size_t );"; + }; + +-/* +- * macOS 10.12 uses __attribute__((availability)) +- * unconditionally. +- */ +-fix = { +- hackname = darwin_availabilityinternal; +- mach = "*-*-darwin*"; +- files = AvailabilityInternal.h; +- select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- c_fix = format; +- c_fix_arg = <<- _EOFix_ +- #if defined(__has_attribute) +- #if __has_attribute(availability) +- %0 +- #else +- #define %1 +- #endif +- #else +- #define %1 +- #endif +- _EOFix_; +- +- test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n" +- "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))"; +-}; +- + /* + * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) + * to be useful, the main math.h must use <> and not "" includes. +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 1d9e10127ca..5cb997f4847 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -158,6 +158,9 @@ LDFLAGS = @LDFLAGS@ + # Should we build position-independent host code? + PICFLAG = @PICFLAG@ + ++# The linker flag for the above. ++LD_PICFLAG = @LD_PICFLAG@ ++ + # Flags to determine code coverage. When coverage is disabled, this will + # contain the optimization flags, as you normally want code coverage + # without optimization. +@@ -266,19 +269,19 @@ LINKER = $(CC) + LINKER_FLAGS = $(CFLAGS) + endif + ++enable_host_pie = @enable_host_pie@ ++ + # Enable Intel CET on Intel CET enabled host if needed. + CET_HOST_FLAGS = @CET_HOST_FLAGS@ + COMPILER += $(CET_HOST_FLAGS) + +-NO_PIE_CFLAGS = @NO_PIE_CFLAGS@ +-NO_PIE_FLAG = @NO_PIE_FLAG@ + DO_LINK_MUTEX = @DO_LINK_MUTEX@ + +-# We don't want to compile the compilers with -fPIE, it make PCH fail. +-COMPILER += $(NO_PIE_CFLAGS) ++# Maybe compile the compilers with -fPIE or -fPIC. ++COMPILER += $(PICFLAG) + +-# Link with -no-pie since we compile the compiler with -fno-PIE. +-LINKER += $(NO_PIE_FLAG) ++# Link with -pie, or -no-pie, depending on the above. ++LINKER += $(LD_PICFLAG) + + # Like LINKER, but use a mutex for serializing front end links. + ifeq (@DO_LINK_MUTEX@,true) +@@ -1050,7 +1053,7 @@ RTL_SSA_H = $(PRETTY_PRINT_H) insn-config.h splay-tree-utils.h \ + # programs built during a bootstrap. + # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a + # cross compiler which does not use the native headers and libraries. +-INTERNAL_CFLAGS = -DIN_GCC $(PICFLAG) @CROSS@ ++INTERNAL_CFLAGS = -DIN_GCC @CROSS@ + + # This is the variable actually used when we compile. If you change this, + # you probably want to update BUILD_CFLAGS in configure.ac +@@ -1068,21 +1071,24 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ + ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) + + # This is the variable to use when using $(COMPILER). +-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) ++ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) $(PICFLAG) + + # This is the variable to use when using $(LINKER). +-ALL_LINKERFLAGS = $(ALL_CXXFLAGS) ++ALL_LINKERFLAGS = $(ALL_CXXFLAGS) $(LD_PICFLAG) + + # Build and host support libraries. + +-# Use the "pic" build of libiberty if --enable-host-shared, unless we are +-# building for mingw. ++# Use the "pic" build of libiberty if --enable-host-shared or --enable-host-pie, ++# unless we are building for mingw. + LIBIBERTY_PICDIR=$(if $(findstring mingw,$(target)),,pic) +-ifeq ($(enable_host_shared),yes) ++ifneq ($(enable_host_shared)$(enable_host_pie),) + LIBIBERTY = ../libiberty/$(LIBIBERTY_PICDIR)/libiberty.a +-BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a + else + LIBIBERTY = ../libiberty/libiberty.a ++endif ++ifeq ($(enable_host_shared),yes) ++BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a ++else + BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a + endif + +@@ -1167,6 +1173,8 @@ LANG_MAKEFRAGS = @all_lang_makefrags@ + # Used by gcc/jit/Make-lang.in + LD_VERSION_SCRIPT_OPTION = @ld_version_script_option@ + LD_SONAME_OPTION = @ld_soname_option@ ++@ENABLE_DARWIN_AT_RPATH_TRUE@DARWIN_RPATH = @rpath ++@ENABLE_DARWIN_AT_RPATH_FALSE@DARWIN_RPATH = ${libdir} + + # Flags to pass to recursive makes. + # CC is set by configure. +@@ -1974,9 +1982,12 @@ cs-tconfig.h: Makefile + $(SHELL) $(srcdir)/mkconfig.sh tconfig.h + + cs-tm.h: Makefile +- TARGET_CPU_DEFAULT="$(target_cpu_default)" \ +- HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ +- $(SHELL) $(srcdir)/mkconfig.sh tm.h ++@ENABLE_DARWIN_AT_RPATH_FALSE@ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ ++@ENABLE_DARWIN_AT_RPATH_FALSE@ HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ ++@ENABLE_DARWIN_AT_RPATH_FALSE@ $(SHELL) $(srcdir)/mkconfig.sh tm.h ++@ENABLE_DARWIN_AT_RPATH_TRUE@ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ HEADERS="$(tm_include_list)" DEFINES="$(tm_defines) DARWIN_AT_RPATH=1" \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ $(SHELL) $(srcdir)/mkconfig.sh tm.h + + cs-tm_p.h: Makefile + TARGET_CPU_DEFAULT="" \ +@@ -4142,6 +4153,9 @@ site.exp: ./config.status Makefile + echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./site.tmp; \ + else true; \ + fi ++ @if test "X@ENABLE_DARWIN_AT_RPATH_TRUE@" != "X#" ; then \ ++ echo "set ENABLE_DARWIN_AT_RPATH 1" >> ./site.tmp; \ ++ fi + @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./site.tmp + @cat ./site.tmp > site.exp + @cat site.bak | sed \ +diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 +index 6be36df5190..126e09bbcd1 100644 +--- a/gcc/aclocal.m4 ++++ b/gcc/aclocal.m4 +@@ -12,6 +12,56 @@ + # PARTICULAR PURPOSE. + + m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) ++# AM_CONDITIONAL -*- Autoconf -*- ++ ++# Copyright (C) 1997-2017 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# AM_CONDITIONAL(NAME, SHELL-CONDITION) ++# ------------------------------------- ++# Define a conditional. ++AC_DEFUN([AM_CONDITIONAL], ++[AC_PREREQ([2.52])dnl ++ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ++ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ++AC_SUBST([$1_TRUE])dnl ++AC_SUBST([$1_FALSE])dnl ++_AM_SUBST_NOTMAKE([$1_TRUE])dnl ++_AM_SUBST_NOTMAKE([$1_FALSE])dnl ++m4_define([_AM_COND_VALUE_$1], [$2])dnl ++if $2; then ++ $1_TRUE= ++ $1_FALSE='#' ++else ++ $1_TRUE='#' ++ $1_FALSE= ++fi ++AC_CONFIG_COMMANDS_PRE( ++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ++ AC_MSG_ERROR([[conditional "$1" was never defined. ++Usually this means the macro was only invoked conditionally.]]) ++fi])]) ++ ++# Copyright (C) 2006-2017 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# _AM_SUBST_NOTMAKE(VARIABLE) ++# --------------------------- ++# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. ++# This macro is traced by Automake. ++AC_DEFUN([_AM_SUBST_NOTMAKE]) ++ ++# AM_SUBST_NOTMAKE(VARIABLE) ++# -------------------------- ++# Public sister of _AM_SUBST_NOTMAKE. ++AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) ++ + m4_include([../libtool.m4]) + m4_include([../ltoptions.m4]) + m4_include([../ltsugar.m4]) +diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in +index 9507f2f0920..2b9b0de8273 100644 +--- a/gcc/ada/gcc-interface/Make-lang.in ++++ b/gcc/ada/gcc-interface/Make-lang.in +@@ -72,7 +72,8 @@ else + endif + + ALL_ADAFLAGS = \ +- $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(CHECKING_ADAFLAGS) $(WARN_ADAFLAGS) ++ $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(CHECKING_ADAFLAGS) \ ++ $(WARN_ADAFLAGS) $(PICFLAG) + FORCE_DEBUG_ADAFLAGS = -g + ADA_CFLAGS = + COMMON_ADA_INCLUDES = -I- -I. -Iada/generated -Iada -I$(srcdir)/ada +@@ -1109,7 +1110,7 @@ ada/b_gnat1.adb : $(GNAT1_ADA_OBJS) + ada/b_gnat1.o : ada/b_gnat1.adb + # Do not use ADAFLAGS to get rid of -gnatg which generates a lot + # of style messages. +- $(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \ ++ $(CC) -c $(CFLAGS) $(ADA_CFLAGS) $(PICFLAG) -gnatp -gnatws $(ADA_INCLUDES) \ + $< $(ADA_OUTPUT_OPTION) + + ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o +@@ -1118,7 +1119,7 @@ ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o + $(MV) b_gnatb.adb b_gnatb.ads ada/ + + ada/b_gnatb.o : ada/b_gnatb.adb +- $(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \ ++ $(CC) -c $(CFLAGS) $(ADA_CFLAGS) $(PICFLAG) -gnatp -gnatws $(ADA_INCLUDES) \ + $< $(ADA_OUTPUT_OPTION) + + include $(srcdir)/ada/Make-generated.in +diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in +index da6a56fcec8..51a4bf17038 100644 +--- a/gcc/ada/gcc-interface/Makefile.in ++++ b/gcc/ada/gcc-interface/Makefile.in +@@ -91,6 +91,7 @@ LS = ls + RANLIB = @RANLIB@ + RANLIB_FLAGS = @ranlib_flags@ + AWK = @AWK@ ++PICFLAG = @PICFLAG@ + + COMPILER = $(CC) + COMPILER_FLAGS = $(CFLAGS) +@@ -239,7 +240,11 @@ ALL_CPPFLAGS = $(CPPFLAGS) + ALL_COMPILERFLAGS = $(ALL_CFLAGS) + + # This is where we get libiberty.a from. ++ifeq ($(PICFLAG),) + LIBIBERTY = ../../libiberty/libiberty.a ++else ++LIBIBERTY = ../../libiberty/pic/libiberty.a ++endif + + # We need to link against libbacktrace because diagnostic.c in + # libcommon.a uses it. +@@ -256,9 +261,6 @@ TOOLS_LIBS = ../version.o ../link.o ../targext.o ../../ggc-none.o \ + $(LIBGNAT) $(LIBINTL) $(LIBICONV) ../$(LIBBACKTRACE) ../$(LIBIBERTY) \ + $(SYSLIBS) $(TGT_LIB) + +-# Add -no-pie to TOOLS_LIBS since some of them are compiled with -fno-PIE. +-TOOLS_LIBS += @NO_PIE_FLAG@ +- + # Specify the directories to be searched for header files. + # Both . and srcdir are used, in that order, + # so that tm.h and config.h will be found in the compilation +@@ -789,12 +791,15 @@ gnatlib-shared-darwin: + $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ + $(SO_OPTS) \ + -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ +- $(MISCLIB) ++ -nodefaultrpaths -Wl,-rpath,@loader_path/,-rpath,@loader_path/.. \ ++ -Wl,-rpath,@loader_path/../../../../ $(MISCLIB) + cd $(RTSDIR); $(GCC_FOR_ADA_RTS) -dynamiclib $(PICFLAG_FOR_TARGET) \ + -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ + $(GNATRTL_TASKING_OBJS) \ + $(SO_OPTS) \ + -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ ++ -nodefaultrpaths -Wl,-rpath,@loader_path/,-rpath,@loader_path/.. \ ++ -Wl,-rpath,@loader_path/../../../../ \ + $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) + cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ + libgnat$(soext) +diff --git a/gcc/ada/init.c b/gcc/ada/init.c +index 5212a38490d..89a409530b9 100644 +--- a/gcc/ada/init.c ++++ b/gcc/ada/init.c +@@ -2479,7 +2479,10 @@ __gnat_map_signal (int sig, siginfo_t *si, void *mcontext ATTRIBUTE_UNUSED) + /* Reset the use of alt stack, so that the alt stack will be used + for the next signal delivery. + The stack can't be used in case of stack checking. */ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK); ++#pragma GCC diagnostic pop + break; + + case SIGFPE: +diff --git a/gcc/analyzer/kf.cc b/gcc/analyzer/kf.cc +index 4389ff917b8..0fe5d2a2e67 100644 +--- a/gcc/analyzer/kf.cc ++++ b/gcc/analyzer/kf.cc +@@ -1081,7 +1081,7 @@ register_known_functions (known_function_manager &kfm) + like this: + extern int *___errno(void) __attribute__((__const__)); + #define errno (*(___errno())) +- and OS X like this: ++ and macOS like this: + extern int * __error(void); + #define errno (*__error()) + and similarly __errno for newlib. +diff --git a/gcc/builtins.cc b/gcc/builtins.cc +index affc8328c0e..6b2780f23ab 100644 +--- a/gcc/builtins.cc ++++ b/gcc/builtins.cc +@@ -5501,6 +5501,13 @@ expand_builtin_trap (void) + static void + expand_builtin_unreachable (void) + { ++ /* If the target wants a trap in place of the fall-through, use that. */ ++ if (targetm.unreachable_should_trap ()) ++ { ++ expand_builtin_trap (); ++ return; ++ } ++ + /* Use gimple_build_builtin_unreachable or builtin_decl_unreachable + to avoid this. */ + gcc_checking_assert (!sanitize_flags_p (SANITIZE_UNREACHABLE)); +@@ -7958,6 +7965,10 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, + case BUILT_IN_ADJUST_DESCRIPTOR: + return expand_builtin_adjust_descriptor (exp); + ++ case BUILT_IN_GCC_NESTED_PTR_CREATED: ++ case BUILT_IN_GCC_NESTED_PTR_DELETED: ++ break; /* At present, no expansion, just call the function. */ ++ + case BUILT_IN_FORK: + case BUILT_IN_EXECL: + case BUILT_IN_EXECV: +diff --git a/gcc/builtins.def b/gcc/builtins.def +index 4ad95a12f83..448cf837ec8 100644 +--- a/gcc/builtins.def ++++ b/gcc/builtins.def +@@ -1067,6 +1067,8 @@ DEF_BUILTIN_STUB (BUILT_IN_ADJUST_TRAMPOLINE, "__builtin_adjust_trampoline") + DEF_BUILTIN_STUB (BUILT_IN_INIT_DESCRIPTOR, "__builtin_init_descriptor") + DEF_BUILTIN_STUB (BUILT_IN_ADJUST_DESCRIPTOR, "__builtin_adjust_descriptor") + DEF_BUILTIN_STUB (BUILT_IN_NONLOCAL_GOTO, "__builtin_nonlocal_goto") ++DEF_EXT_LIB_BUILTIN (BUILT_IN_GCC_NESTED_PTR_CREATED, "__gcc_nested_func_ptr_created", BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LIST) ++DEF_EXT_LIB_BUILTIN (BUILT_IN_GCC_NESTED_PTR_DELETED, "__gcc_nested_func_ptr_deleted", BT_FN_VOID, ATTR_NOTHROW_LIST) + + /* Implementing __builtin_setjmp. */ + DEF_BUILTIN_STUB (BUILT_IN_SETJMP_SETUP, "__builtin_setjmp_setup") +diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc +index 67709912a11..a0adac162e9 100644 +--- a/gcc/c-family/c-attribs.cc ++++ b/gcc/c-family/c-attribs.cc +@@ -607,6 +607,18 @@ attribute_takes_identifier_p (const_tree attr_id) + return targetm.attribute_takes_identifier_p (attr_id); + } + ++/* Returns TRUE iff the attribute indicated by ATTR_ID needs its ++ arguments converted to string constants. */ ++ ++bool ++attribute_clang_form_p (const_tree attr_id) ++{ ++ const struct attribute_spec *spec = lookup_attribute_spec (attr_id); ++ if (spec && !strcmp ("availability", spec->name)) ++ return true; ++ return false; ++} ++ + /* Verify that argument value POS at position ARGNO to attribute NAME + applied to function FN (which is either a function declaration or function + type) refers to a function parameter at position POS and the expected type +diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc +index 303d7f1ef5d..e6a935db993 100644 +--- a/gcc/c-family/c-common.cc ++++ b/gcc/c-family/c-common.cc +@@ -311,6 +311,48 @@ const struct fname_var_t fname_vars[] = + {NULL, 0, 0}, + }; + ++/* Flags to restrict availability of generic features that ++ are known to __has_{feature,extension}. */ ++ ++enum ++{ ++ HF_FLAG_NONE = 0, ++ HF_FLAG_EXT = 1, /* Available only as an extension. */ ++ HF_FLAG_SANITIZE = 2, /* Availability depends on sanitizer flags. */ ++}; ++ ++/* Info for generic features which can be queried through ++ __has_{feature,extension}. */ ++ ++struct hf_feature_info ++{ ++ const char *ident; ++ unsigned flags; ++ unsigned mask; ++}; ++ ++/* Table of generic features which can be queried through ++ __has_{feature,extension}. */ ++ ++static constexpr hf_feature_info has_feature_table[] = ++{ ++ { "address_sanitizer", HF_FLAG_SANITIZE, SANITIZE_ADDRESS }, ++ { "thread_sanitizer", HF_FLAG_SANITIZE, SANITIZE_THREAD }, ++ { "leak_sanitizer", HF_FLAG_SANITIZE, SANITIZE_LEAK }, ++ { "hwaddress_sanitizer", HF_FLAG_SANITIZE, SANITIZE_HWADDRESS }, ++ { "undefined_behavior_sanitizer", HF_FLAG_SANITIZE, SANITIZE_UNDEFINED }, ++ { "attribute_deprecated_with_message", HF_FLAG_NONE, 0 }, ++ { "attribute_unavailable_with_message", HF_FLAG_NONE, 0 }, ++ { "enumerator_attributes", HF_FLAG_NONE, 0 }, ++ { "tls", HF_FLAG_NONE, 0 }, ++ { "gnu_asm_goto_with_outputs", HF_FLAG_EXT, 0 }, ++ { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 }, ++ { "attribute_availability", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_message", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_replacement", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_version_underscores", HF_FLAG_NONE, 0 } ++}; ++ + /* Global visibility options. */ + struct visibility_flags visibility_options; + +@@ -346,8 +388,8 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); + */ + const struct c_common_resword c_common_reswords[] = + { +- { "_Alignas", RID_ALIGNAS, D_CONLY }, +- { "_Alignof", RID_ALIGNOF, D_CONLY }, ++ { "_Alignas", RID_ALIGNAS, D_EXT_C_IN_CXX }, ++ { "_Alignof", RID_ALIGNOF, D_EXT_C_IN_CXX }, + { "_Atomic", RID_ATOMIC, D_CONLY }, + { "_Bool", RID_BOOL, D_CONLY }, + { "_Complex", RID_COMPLEX, 0 }, +@@ -9552,4 +9594,63 @@ c_strict_flex_array_level_of (tree array_field) + return strict_flex_array_level; + } + ++/* Map from identifiers to booleans. Value is true for features, and ++ false for extensions. Used to implement __has_{feature,extension}. */ ++ ++using feature_map_t = hash_map ; ++static feature_map_t *feature_map; ++ ++/* Register a feature for __has_{feature,extension}. FEATURE_P is true ++ if the feature identified by NAME is a feature (as opposed to an ++ extension). */ ++ ++void ++c_common_register_feature (const char *name, bool feature_p) ++{ ++ bool dup = feature_map->put (get_identifier (name), feature_p); ++ gcc_checking_assert (!dup); ++} ++ ++/* Lazily initialize hash table for __has_{feature,extension}, ++ dispatching to the appropriate front end to register language-specific ++ features. */ ++ ++static void ++init_has_feature () ++{ ++ gcc_checking_assert (!feature_map); ++ feature_map = new feature_map_t; ++ ++ for (unsigned i = 0; i < ARRAY_SIZE (has_feature_table); i++) ++ { ++ const hf_feature_info *info = has_feature_table + i; ++ ++ if ((info->flags & HF_FLAG_SANITIZE) && !(flag_sanitize & info->mask)) ++ continue; ++ ++ const bool feature_p = !(info->flags & HF_FLAG_EXT); ++ c_common_register_feature (info->ident, feature_p); ++ } ++ ++ /* Register language-specific features. */ ++ c_family_register_lang_features (); ++} ++ ++/* If STRICT_P is true, evaluate __has_feature (IDENT). ++ Otherwise, evaluate __has_extension (IDENT). */ ++ ++bool ++has_feature_p (const char *ident, bool strict_p) ++{ ++ if (!feature_map) ++ init_has_feature (); ++ ++ tree name = canonicalize_attr_name (get_identifier (ident)); ++ bool *feat_p = feature_map->get (name); ++ if (!feat_p) ++ return false; ++ ++ return !strict_p || *feat_p; ++} ++ + #include "gt-c-family-c-common.h" +diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h +index f96350b64af..9aa7c2c3862 100644 +--- a/gcc/c-family/c-common.h ++++ b/gcc/c-family/c-common.h +@@ -450,6 +450,8 @@ extern machine_mode c_default_pointer_mode; + #define D_CXX20 0x8000 /* In C++, C++20 only. */ + #define D_CXX_COROUTINES 0x10000 /* In C++, only with coroutines. */ + #define D_CXX_MODULES 0x20000 /* In C++, only with modules. */ ++#define D_EXT_C_IN_CXX 0x40000 /* In C++, allow additional C keywords. */ ++#define D_EXT_CXX_IN_C 0x80000 /* In C, allow additional C++ keywords. */ + + #define D_CXX_CONCEPTS_FLAGS D_CXXONLY | D_CXX_CONCEPTS + #define D_CXX_CHAR8_T_FLAGS D_CXXONLY | D_CXX_CHAR8_T +@@ -1121,6 +1123,14 @@ extern bool c_cpp_diagnostic (cpp_reader *, enum cpp_diagnostic_level, + ATTRIBUTE_GCC_DIAG(5,0); + extern int c_common_has_attribute (cpp_reader *, bool); + extern int c_common_has_builtin (cpp_reader *); ++extern int c_common_has_feature (cpp_reader *, bool); ++ ++/* Implemented by each front end in *-lang.cc. */ ++extern void c_family_register_lang_features (); ++ ++/* Implemented in c-family/c-common.cc. */ ++extern void c_common_register_feature (const char *, bool); ++extern bool has_feature_p (const char *, bool); + + extern bool parse_optimize_options (tree, bool); + +@@ -1529,6 +1539,7 @@ extern void check_for_xor_used_as_pow (location_t lhs_loc, tree lhs_val, + /* In c-attribs.cc. */ + extern bool attribute_takes_identifier_p (const_tree); + extern tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); ++extern bool attribute_clang_form_p (const_tree); + extern tree handle_unused_attribute (tree *, tree, tree, int, bool *); + extern tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *); + extern int parse_tm_stmt_attr (tree, int); +diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc +index 0acfdaa95c9..2a504a98edf 100644 +--- a/gcc/c-family/c-lex.cc ++++ b/gcc/c-family/c-lex.cc +@@ -82,6 +82,7 @@ init_c_lex (void) + cb->read_pch = c_common_read_pch; + cb->has_attribute = c_common_has_attribute; + cb->has_builtin = c_common_has_builtin; ++ cb->has_feature = c_common_has_feature; + cb->get_source_date_epoch = cb_get_source_date_epoch; + cb->get_suggestion = cb_get_suggestion; + cb->remap_filename = remap_macro_filename; +@@ -457,16 +458,16 @@ c_common_has_attribute (cpp_reader *pfile, bool std_syntax) + return result; + } + +-/* Callback for has_builtin. */ ++/* Helper for __has_{builtin,feature,extension}. */ + +-int +-c_common_has_builtin (cpp_reader *pfile) ++static const char * ++c_common_lex_availability_macro (cpp_reader *pfile, const char *builtin) + { + const cpp_token *token = get_token_no_padding (pfile); + if (token->type != CPP_OPEN_PAREN) + { + cpp_error (pfile, CPP_DL_ERROR, +- "missing '(' after \"__has_builtin\""); ++ "missing '(' after \"__has_%s\"", builtin); + return 0; + } + +@@ -486,7 +487,7 @@ c_common_has_builtin (cpp_reader *pfile) + else + { + cpp_error (pfile, CPP_DL_ERROR, +- "macro \"__has_builtin\" requires an identifier"); ++ "macro \"__has_%s\" requires an identifier", builtin); + if (token->type == CPP_CLOSE_PAREN) + return 0; + } +@@ -505,9 +506,38 @@ c_common_has_builtin (cpp_reader *pfile) + break; + } + ++ return name; ++} ++ ++/* Callback for has_builtin. */ ++ ++int ++c_common_has_builtin (cpp_reader *pfile) ++{ ++ const char *name = c_common_lex_availability_macro (pfile, "builtin"); ++ if (!name) ++ return 0; ++ + return names_builtin_p (name); + } + ++/* Callback for has_feature. STRICT_P is true for has_feature and false ++ for has_extension. */ ++ ++int ++c_common_has_feature (cpp_reader *pfile, bool strict_p) ++{ ++ const char *builtin = strict_p ? "feature" : "extension"; ++ const char *name = c_common_lex_availability_macro (pfile, builtin); ++ if (!name) ++ return 0; ++ ++ /* If -pedantic-errors is given, __has_extension is equivalent to ++ __has_feature. */ ++ strict_p |= flag_pedantic_errors; ++ return has_feature_p (name, strict_p); ++} ++ + + /* Read a token and return its type. Fill *VALUE with its value, if + applicable. Fill *CPP_FLAGS with the token's flags, if it is +@@ -539,6 +569,21 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, + + case CPP_NUMBER: + { ++ /* If the user wants number-like entities to be returned as a raw ++ string, then don't try to classify them, which emits unwanted ++ diagnostics. */ ++ if (lex_flags & C_LEX_NUMBER_AS_STRING) ++ { ++ /* build_string adds a trailing NUL at [len]. */ ++ tree num_string = build_string (tok->val.str.len + 1, ++ (const char *) tok->val.str.text); ++ TREE_TYPE (num_string) = char_array_type_node; ++ *value = num_string; ++ /* We will effectively note this as CPP_N_INVALID, because we ++ made no checks here. */ ++ break; ++ } ++ + const char *suffix = NULL; + unsigned int flags = cpp_classify_number (parse_in, tok, &suffix, *loc); + +diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc +index c68a2a27469..a600d40c87e 100644 +--- a/gcc/c-family/c-opts.cc ++++ b/gcc/c-family/c-opts.cc +@@ -1070,7 +1070,7 @@ c_common_post_options (const char **pfilename) + + if (flag_extern_tls_init) + { +- if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK) ++ if (!SUPPORTS_WEAK) + { + /* Lazy TLS initialization for a variable in another TU requires + alias and weak reference support. */ +diff --git a/gcc/c-family/c-ppoutput.cc b/gcc/c-family/c-ppoutput.cc +index 4aa2bef2c0f..a1488c6f086 100644 +--- a/gcc/c-family/c-ppoutput.cc ++++ b/gcc/c-family/c-ppoutput.cc +@@ -162,6 +162,7 @@ init_pp_output (FILE *out_stream) + + cb->has_attribute = c_common_has_attribute; + cb->has_builtin = c_common_has_builtin; ++ cb->has_feature = c_common_has_feature; + cb->get_source_date_epoch = cb_get_source_date_epoch; + cb->remap_filename = remap_macro_filename; + +diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h +index 9cc95ab3ee3..3e86a16d4ae 100644 +--- a/gcc/c-family/c-pragma.h ++++ b/gcc/c-family/c-pragma.h +@@ -272,6 +272,9 @@ extern enum cpp_ttype pragma_lex (tree *, location_t *loc = NULL); + #define C_LEX_STRING_NO_JOIN 2 /* Do not concatenate strings + nor translate them into execution + character set. */ ++#define C_LEX_NUMBER_AS_STRING 4 /* Do not classify a number, but ++ instead return it as a raw ++ string. */ + + /* This is not actually available to pragma parsers. It's merely a + convenient location to declare this function for c-lex, after +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index a75038930ae..7d080fa530a 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1484,6 +1484,10 @@ Wsubobject-linkage + C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1) + Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage. + ++Welaborated-enum-base ++C++ ObjC++ Var(warn_elaborated_enum_base) Warning Init(1) ++Warn if an additional enum-base is used in an elaborated-type-specifier. ++ + Wduplicate-decl-specifier + C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall) + Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier. +@@ -1639,6 +1643,18 @@ static-libmpxwrappers + Driver WarnRemoved + Removed in GCC 9. This switch has no effect. + ++fallow-const-var-array-size ++C ObjC C++ ObjC++ LTO Var(flag_allow_const_var_array_size) Init(0) ++Allow arrays sizes to be const-qualified vars in C and Objective-C. ++ ++fallow-extended-attribute-placement ++C ObjC C++ ObjC++ LTO Var(flag_allow_ext_attr_placement) Init(0) ++Allow placement of attributes on function definitions. ++ ++fallow-extra-keywords ++C ObjC C++ ObjC++ LTO Var(flag_allow_extra_keywords) Init(0) ++Allow additional C keywords in C++ and vice versa. ++ + fcilkplus + C ObjC C++ ObjC++ LTO Undocumented Ignore + Removed in GCC 8. This switch has no effect. +@@ -1967,7 +1983,7 @@ Implement resolution of DR 150 for matching of template template arguments. + + fnext-runtime + ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime) +-Generate code for NeXT (Apple Mac OS X) runtime environment. ++Generate code for NeXT (Apple macOS) runtime environment. + + fnil-receivers + ObjC ObjC++ Var(flag_nil_receivers) Init(1) +diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc +index 318e9c5b253..35add585466 100644 +--- a/gcc/c/c-decl.cc ++++ b/gcc/c/c-decl.cc +@@ -7069,6 +7069,25 @@ grokdeclarator (const struct c_declarator *declarator, + } + + size = c_fully_fold (size, false, &size_maybe_const); ++ bool size_const_var = false; ++ if (flag_allow_const_var_array_size) ++ { ++ tree maybe_const_size = TREE_CODE (size) == NOP_EXPR ++ ? TREE_OPERAND (size, 0) : size; ++ size_const_var ++ = (TREE_CODE (maybe_const_size) == VAR_DECL ++ && TREE_READONLY (maybe_const_size) ++ && !TREE_THIS_VOLATILE (maybe_const_size)); ++ if (size_const_var ++ && size_maybe_const ++ && DECL_INITIAL (maybe_const_size)) ++ { ++ size = DECL_INITIAL (maybe_const_size); ++ size = c_fully_fold (size, false, &size_maybe_const); ++ size_int_const = (TREE_CODE (size) == INTEGER_CST ++ && !TREE_OVERFLOW (size)); ++ } ++ } + + if (pedantic && size_maybe_const && integer_zerop (size)) + { +@@ -7110,6 +7129,9 @@ grokdeclarator (const struct c_declarator *declarator, + this_size_varies = size_varies = true; + warn_variable_length_array (name, size); + } ++ if (flag_allow_const_var_array_size && size_const_var) ++ pedwarn (input_location, OPT_Wpedantic, ++ "variably modified %qE at file scope", name); + } + else if ((decl_context == NORMAL || decl_context == FIELD) + && current_scope == file_scope) +diff --git a/gcc/c/c-lang.cc b/gcc/c/c-lang.cc +index b4e0c8cfb8a..11e7aaac2e3 100644 +--- a/gcc/c/c-lang.cc ++++ b/gcc/c/c-lang.cc +@@ -61,6 +61,15 @@ c_get_sarif_source_language (const char *) + return "c"; + } + ++/* Implement c-family hook to register language-specific features for ++ __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ c_register_features (); ++} ++ + #if CHECKING_P + + namespace selftest { +diff --git a/gcc/c/c-objc-common.cc b/gcc/c/c-objc-common.cc +index e4aed61ed00..fad46626570 100644 +--- a/gcc/c/c-objc-common.cc ++++ b/gcc/c/c-objc-common.cc +@@ -34,6 +34,38 @@ along with GCC; see the file COPYING3. If not see + static bool c_tree_printer (pretty_printer *, text_info *, const char *, + int, bool, bool, bool, bool *, const char **); + ++/* Info for C language features which can be queried through ++ __has_{feature,extension}. */ ++ ++struct c_feature_info ++{ ++ const char *ident; ++ const int *enable_flag; ++}; ++ ++static const c_feature_info c_feature_table[] = ++{ ++ { "c_alignas", &flag_isoc11 }, ++ { "c_alignof", &flag_isoc11 }, ++ { "c_atomic", &flag_isoc11 }, ++ { "c_generic_selections", &flag_isoc11 }, ++ { "c_static_assert", &flag_isoc11 }, ++ { "c_thread_local", &flag_isoc11 } ++}; ++ ++/* Register features specific to the C language. */ ++ ++void ++c_register_features () ++{ ++ for (unsigned i = 0; i < ARRAY_SIZE (c_feature_table); i++) ++ { ++ const c_feature_info *info = c_feature_table + i; ++ const bool feat_p = !info->enable_flag || *info->enable_flag; ++ c_common_register_feature (info->ident, feat_p); ++ } ++} ++ + bool + c_missing_noreturn_ok_p (tree decl) + { +diff --git a/gcc/c/c-objc-common.h b/gcc/c/c-objc-common.h +index d31dacb9dd4..34dc23a1bd0 100644 +--- a/gcc/c/c-objc-common.h ++++ b/gcc/c/c-objc-common.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_C_OBJC_COMMON + #define GCC_C_OBJC_COMMON + ++/* Implemented in c-objc-common.cc. */ ++extern void c_register_features (); ++ + /* Lang hooks that are shared between C and ObjC are defined here. Hooks + specific to C or ObjC go in c-lang.cc and objc/objc-lang.cc, respectively. */ + +diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc +index 49c692974f5..8be86e2fe78 100644 +--- a/gcc/c/c-parser.cc ++++ b/gcc/c/c-parser.cc +@@ -217,6 +217,9 @@ struct GTY(()) c_parser { + should translate them to the execution character set (false + inside attributes). */ + BOOL_BITFIELD translate_strings_p : 1; ++ /* True if we want to lex arbitrary number-like sequences as their ++ string representation. */ ++ BOOL_BITFIELD lex_number_as_string : 1; + + /* Objective-C specific parser/lexer information. */ + +@@ -291,10 +294,10 @@ c_lex_one_token (c_parser *parser, c_token *token, bool raw = false) + + if (raw || vec_safe_length (parser->raw_tokens) == 0) + { ++ int lex_flags = parser->lex_joined_string ? 0 : C_LEX_STRING_NO_JOIN; ++ lex_flags |= parser->lex_number_as_string ? C_LEX_NUMBER_AS_STRING : 0; + token->type = c_lex_with_flags (&token->value, &token->location, +- &token->flags, +- (parser->lex_joined_string +- ? 0 : C_LEX_STRING_NO_JOIN)); ++ &token->flags, lex_flags); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; +@@ -2423,15 +2426,28 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, + d = d->declarator; + underspec_name = d->u.id.id; + } ++ tree postfix_attrs = NULL_TREE; ++ if (flag_allow_ext_attr_placement ++ && c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) ++ { ++ postfix_attrs = c_parser_gnu_attributes (parser); ++ /* IF we have a function definition, and we're allowing it then ++ treat these attributes as if they had been prepended. */ ++ if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) ++ { ++ all_prefix_attrs = chainon (all_prefix_attrs, postfix_attrs); ++ postfix_attrs = NULL_TREE; ++ } ++ } + if (c_parser_next_token_is (parser, CPP_EQ) + || c_parser_next_token_is (parser, CPP_COMMA) + || c_parser_next_token_is (parser, CPP_SEMICOLON) + || c_parser_next_token_is_keyword (parser, RID_ASM) + || c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE) ++ || postfix_attrs + || c_parser_next_token_is_keyword (parser, RID_IN)) + { + tree asm_name = NULL_TREE; +- tree postfix_attrs = NULL_TREE; + if (!diagnosed_no_specs && !specs->declspecs_seen_p) + { + diagnosed_no_specs = true; +@@ -2443,8 +2459,9 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, + if (c_parser_next_token_is_keyword (parser, RID_ASM)) + asm_name = c_parser_simple_asm_expr (parser); + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) ++ postfix_attrs = c_parser_gnu_attributes (parser); ++ if (postfix_attrs) + { +- postfix_attrs = c_parser_gnu_attributes (parser); + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + /* This means there is an attribute specifier after +@@ -4993,6 +5010,88 @@ c_parser_gnu_attribute_any_word (c_parser *parser) + return attr_name; + } + ++/* Handle parsing clang-form attribute arguments, where we need to adjust ++ the parsing rules to relate to a specific attribute. */ ++ ++static tree ++c_parser_clang_attribute_arguments (c_parser *parser, tree /*attr_id*/) ++{ ++ /* We can, if required, alter the parsing on the basis of the attribute. ++ At present, we handle the availability attr, where ach entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ tree attr_args = NULL_TREE; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ if (c_parser_next_token_is (parser, CPP_NAME) ++ && c_parser_peek_token (parser)->id_kind == C_ID_ID) ++ { ++ name = c_parser_peek_token (parser)->value; ++ c_parser_consume_token (parser); ++ } ++ else if (c_parser_next_token_is (parser, CPP_COMMA)) ++ name = error_mark_node; /* Comma handled below. */ ++ else ++ { ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected an attribute keyword"); ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_EQ)) ++ { ++ c_parser_consume_token (parser); /* eat the '=' */ ++ /* We need to bludgeon the lexer into not trying to interpret the ++ xx.yy.zz form, since that just looks like a malformed float. ++ Also, as a result of macro processing, we can have strig literals ++ that are in multiple pieces so, for this specific part of the ++ parse, we need to join strings. */ ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ /* So look at the next token, expecting a string, or something that ++ looks initially like a number, but might be a version number. */ ++ c_parser_peek_token (parser); ++ /* Done with the funky number parsing. */ ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ value = c_parser_peek_token (parser)->value; ++ /* ???: check for error mark and early-return? */ ++ c_parser_consume_token (parser); ++ } ++ /* else value is absent. */ ++ } ++ else if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected %<,%> or %<=%>"); ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_COMMA)) ++ c_parser_consume_token (parser); /* Just skip the comma. */ ++ tree t = tree_cons (value, name, NULL); ++ if (!attr_args) ++ attr_args = t; ++ else ++ chainon (attr_args, t); ++ } while (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN)); ++ return attr_args; ++} ++ + /* Parse attribute arguments. This is a common form of syntax + covering all currently valid GNU and standard attributes. + +@@ -5158,9 +5257,13 @@ c_parser_gnu_attribute (c_parser *parser, tree attrs, + attrs = chainon (attrs, attr); + return attrs; + } +- c_parser_consume_token (parser); ++ c_parser_consume_token (parser); /* The '('. */ + +- tree attr_args ++ tree attr_args; ++ if (attribute_clang_form_p (attr_name)) ++ attr_args = c_parser_clang_attribute_arguments (parser, attr_name); ++ else ++ attr_args + = c_parser_attribute_arguments (parser, + attribute_takes_identifier_p (attr_name), + false, +diff --git a/gcc/calls.cc b/gcc/calls.cc +index 53b0f58b709..b58990f1b90 100644 +--- a/gcc/calls.cc ++++ b/gcc/calls.cc +@@ -1367,7 +1367,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + with those made by function.cc. */ + + /* See if this argument should be passed by invisible reference. */ +- function_arg_info arg (type, argpos < n_named_args); ++ function_arg_info arg (type, argpos < n_named_args, ++ argpos == n_named_args - 1); + if (pass_by_reference (args_so_far_pnt, arg)) + { + const bool callee_copies +@@ -1487,10 +1488,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + + unsignedp = TYPE_UNSIGNED (type); + arg.type = type; +- arg.mode +- = promote_function_mode (type, TYPE_MODE (type), &unsignedp, +- fndecl ? TREE_TYPE (fndecl) : fntype, 0); +- ++ arg.mode = TYPE_MODE (type); ++// arg.mode ++// = promote_function_mode (type, TYPE_MODE (type), &unsignedp, ++// fndecl ? TREE_TYPE (fndecl) : fntype, 0); ++ arg.mode = promote_function_mode (args_so_far, arg, ++ fndecl ? TREE_TYPE (fndecl) : fntype, ++ &unsignedp, 0); + args[i].unsignedp = unsignedp; + args[i].mode = arg.mode; + +@@ -1540,6 +1544,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + #endif + reg_parm_stack_space, + args[i].pass_on_stack ? 0 : args[i].partial, ++ args_so_far, + fndecl, args_size, &args[i].locate); + #ifdef BLOCK_REG_PADDING + else +@@ -4076,6 +4081,7 @@ split_complex_types (tree types) + return types; + } + ++extern void debug_tree (tree); + /* Output a library call to function ORGFUN (a SYMBOL_REF rtx) + for a value of mode OUTMODE, + with NARGS different arguments, passed as ARGS. +@@ -4261,6 +4267,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, 0, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + + if (argvec[count].reg == 0 || argvec[count].partial != 0 +@@ -4331,8 +4338,16 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + val = force_operand (XEXP (slot, 0), NULL_RTX); + } + +- arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, +- NULL_TREE, 0); ++// arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, ++// NULL_TREE, 0); ++ tree t = arg.type; ++if (t) ++ debug_tree (t); ++gcc_assert (!t); ++ arg.type = NULL_TREE; ++ arg.mode = promote_function_mode (args_so_far, arg, NULL_TREE, ++ &unsigned_p, 0); ++ arg.type = t; + argvec[count].mode = arg.mode; + argvec[count].value = convert_modes (arg.mode, GET_MODE (val), val, + unsigned_p); +@@ -4352,6 +4367,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, argvec[count].partial, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + args_size.constant += argvec[count].locate.size.constant; + gcc_assert (!argvec[count].locate.size.var); +diff --git a/gcc/calls.h b/gcc/calls.h +index c7f8c5e4b39..42a1774fe84 100644 +--- a/gcc/calls.h ++++ b/gcc/calls.h +@@ -35,24 +35,43 @@ class function_arg_info + { + public: + function_arg_info () +- : type (NULL_TREE), mode (VOIDmode), named (false), ++ : type (NULL_TREE), mode (VOIDmode), named (false), last_named (false), + pass_by_reference (false) + {} + + /* Initialize an argument of mode MODE, either before or after promotion. */ + function_arg_info (machine_mode mode, bool named) +- : type (NULL_TREE), mode (mode), named (named), pass_by_reference (false) ++ : type (NULL_TREE), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ function_arg_info (machine_mode mode, bool named, bool last_named) ++ : type (NULL_TREE), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Initialize an unpromoted argument of type TYPE. */ + function_arg_info (tree type, bool named) +- : type (type), mode (TYPE_MODE (type)), named (named), ++ : type (type), mode (TYPE_MODE (type)), named (named), last_named (false), + pass_by_reference (false) + {} + ++ /* Initialize an unpromoted argument of type TYPE. */ ++ function_arg_info (tree type, bool named, bool last_named) ++ : type (type), mode (TYPE_MODE (type)), named (named), ++ last_named (last_named), pass_by_reference (false) ++ {} ++ + /* Initialize an argument with explicit properties. */ + function_arg_info (tree type, machine_mode mode, bool named) +- : type (type), mode (mode), named (named), pass_by_reference (false) ++ : type (type), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ /* Initialize an argument with explicit properties. */ ++ function_arg_info (tree type, machine_mode mode, bool named, bool last_named) ++ : type (type), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Return true if the gimple-level type is an aggregate. */ +@@ -105,6 +124,9 @@ public: + "..."). See also TARGET_STRICT_ARGUMENT_NAMING. */ + unsigned int named : 1; + ++ /* True if this is the last named argument. */ ++ unsigned int last_named : 1; ++ + /* True if we have decided to pass the argument by reference, in which case + the function_arg_info describes a pointer to the original argument. */ + unsigned int pass_by_reference : 1; +diff --git a/gcc/collect2.cc b/gcc/collect2.cc +index 63b9a0c233a..1d7d9a442ac 100644 +--- a/gcc/collect2.cc ++++ b/gcc/collect2.cc +@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3. If not see + In a cross-compiler, this means you need a cross nm, + but that is not quite as unpleasant as special headers. */ + +-#if !defined (OBJECT_FORMAT_COFF) ++#if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_MACHO) + #define OBJECT_FORMAT_NONE + #endif + +@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see + + #endif /* OBJECT_FORMAT_COFF */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Default flags to pass to nm. */ + #ifndef NM_FLAGS +@@ -525,7 +525,7 @@ static const char *const target_machine = TARGET_MACHINE; + + Return 0 if not found, otherwise return its name, allocated with malloc. */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Add an entry for the object file NAME to object file list LIST. + New entries are added at the end of the list. The original pointer +@@ -764,6 +764,12 @@ do_link (char **ld_argv, const char *atsuffix) + } + } + ++#if defined (OBJECT_FORMAT_MACHO) ++# define LLD_NAME "ld64.lld" ++#else ++# define LLD_NAME "ld.lld" ++#endif ++ + /* Main program. */ + + int +@@ -777,16 +783,19 @@ main (int argc, char **argv) + USE_BFD_LD, + USE_LLD_LD, + USE_MOLD_LD, ++ USE_CLASSIC_LD, + USE_LD_MAX + } selected_linker = USE_DEFAULT_LD; ++ + static const char *const ld_suffixes[USE_LD_MAX] = + { + "ld", + PLUGIN_LD_SUFFIX, + "ld.gold", + "ld.bfd", +- "ld.lld", +- "ld.mold" ++ LLD_NAME, ++ "ld.mold", ++ "ld-classic" + }; + static const char *const real_ld_suffix = "real-ld"; + static const char *const collect_ld_suffix = "collect-ld"; +@@ -953,14 +962,22 @@ main (int argc, char **argv) + if (selected_linker == USE_DEFAULT_LD) + selected_linker = USE_PLUGIN_LD; + } ++#if !defined (OBJECT_FORMAT_MACHO) + else if (strcmp (argv[i], "-fuse-ld=bfd") == 0) + selected_linker = USE_BFD_LD; + else if (strcmp (argv[i], "-fuse-ld=gold") == 0) + selected_linker = USE_GOLD_LD; ++#endif + else if (strcmp (argv[i], "-fuse-ld=lld") == 0) + selected_linker = USE_LLD_LD; + else if (strcmp (argv[i], "-fuse-ld=mold") == 0) + selected_linker = USE_MOLD_LD; ++#if defined (OBJECT_FORMAT_MACHO) ++ else if (strcmp (argv[i], "-fuse-ld=classic") == 0) ++ selected_linker = USE_CLASSIC_LD; ++#endif ++ else if (strcmp (argv[i], "-fuse-ld=") == 0) ++ selected_linker = USE_DEFAULT_LD; + else if (startswith (argv[i], "-o")) + { + /* Parse the output filename if it's given so that we can make +@@ -1052,7 +1069,8 @@ main (int argc, char **argv) + ld_file_name = 0; + #ifdef DEFAULT_LINKER + if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || +- selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD) ++ selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD || ++ selected_linker == USE_CLASSIC_LD) + { + char *linker_name; + # ifdef HOST_EXECUTABLE_SUFFIX +@@ -2266,7 +2284,7 @@ write_aix_file (FILE *stream, struct id *list) + } + #endif + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Check to make sure the file is an LTO object file. */ + +diff --git a/gcc/common.opt b/gcc/common.opt +index b055c7bd9ac..cf32af4bbaf 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -2794,6 +2794,10 @@ fstack-usage + Common RejectNegative Var(flag_stack_usage) + Output stack usage information on a per-function basis. + ++fstack-use-cumulative-args ++Common RejectNegative Var(flag_stack_use_cumulative_args) Init(STACK_USE_CUMULATIVE_ARGS_INIT) ++Use cumulative args-based stack layout hooks. ++ + fstrength-reduce + Common Ignore + Does nothing. Preserved for backward compatibility. +@@ -2862,10 +2866,25 @@ Common Var(flag_tracer) Optimization + Perform superblock formation via tail duplication. + + ftrampolines +-Common Var(flag_trampolines) Init(0) ++Common Var(flag_trampolines) Init(HEAP_TRAMPOLINES_INIT) + For targets that normally need trampolines for nested functions, always + generate them instead of using descriptors. + ++ftrampoline-impl= ++Common Joined RejectNegative Enum(trampoline_impl) Var(flag_trampoline_impl) Init(HEAP_TRAMPOLINES_INIT ? TRAMPOLINE_IMPL_HEAP : TRAMPOLINE_IMPL_STACK) ++Whether trampolines are generated in executable memory rather than ++executable stack. ++ ++Enum ++Name(trampoline_impl) Type(enum trampoline_impl) UnknownError(unknown trampoline implementation %qs) ++ ++EnumValue ++Enum(trampoline_impl) String(stack) Value(TRAMPOLINE_IMPL_STACK) ++ ++EnumValue ++Enum(trampoline_impl) String(heap) Value(TRAMPOLINE_IMPL_HEAP) ++ ++ + ; Zero means that floating-point math operations cannot generate a + ; (user-visible) trap. This is the case, for example, in nonstop + ; IEEE 754 arithmetic. +@@ -3123,6 +3142,10 @@ fuse-ld=mold + Common Driver Negative(fuse-ld=mold) + Use the Modern linker (MOLD) linker instead of the default linker. + ++fuse-ld=classic ++Common Driver Negative(fuse-ld=classic) ++Use the ld-classic linker instead of the default linker. ++ + fuse-linker-plugin + Common Undocumented Var(flag_use_linker_plugin) + +diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc +index 673407ca9a8..e764d2fa38c 100644 +--- a/gcc/common/config/aarch64/aarch64-common.cc ++++ b/gcc/common/config/aarch64/aarch64-common.cc +@@ -301,8 +301,12 @@ aarch64_get_extension_string_for_isa_flags + + However, assemblers with Armv8-R AArch64 support should not have this + issue, so we don't need this fix when targeting Armv8-R. */ +- auto explicit_flags = (!(current_flags & AARCH64_FL_V8R) +- ? AARCH64_FL_CRC : 0); ++ aarch64_feature_flags explicit_flags = ++#ifndef DISABLE_AARCH64_AS_CRC_BUGFIX ++ (!(current_flags & AARCH64_ISA_V8R) ? AARCH64_FL_CRC : 0); ++#else ++ 0; ++#endif + + /* Add the features in isa_flags & ~current_flags using the smallest + possible number of extensions. We can do this by iterating over the +@@ -332,7 +336,10 @@ aarch64_get_extension_string_for_isa_flags + if (added & opt.flag_canonical) + { + outstr += "+"; +- outstr += opt.name; ++ if (startswith (opt.name, "rdm")) ++ outstr += "rdm"; ++ else ++ outstr += opt.name; + } + + /* Remove the features in current_flags & ~isa_flags. If the feature does +@@ -362,7 +369,10 @@ aarch64_get_extension_string_for_isa_flags + { + current_flags &= ~opt.flags_off; + outstr += "+no"; +- outstr += opt.name; ++ if (startswith (opt.name, "rdm")) ++ outstr += "rdm"; ++ else ++ outstr += opt.name; + } + } + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index ae332a88768..f6e2bdfac13 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1125,6 +1125,26 @@ case ${target} in + ;; + esac + ++# Figure out if we need to enable heap trampolines ++# and variadic functions handling. ++case ${target} in ++aarch64*-*-darwin2*) ++ # This applies to arm64 Darwin variadic funtions. ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=1" ++ # Executable stack is forbidden. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; ++*-*-darwin2*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" ++ # Currently, we do this for macOS 11 and above. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; ++*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" ++ ;; ++esac ++ + case ${target} in + aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + tm_file="${tm_file} elfos.h newlib-stdint.h" +@@ -1164,6 +1184,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + ;; ++aarch64-*-darwin* ) ++ tm_file="${tm_file} aarch64/aarch64-errata.h" ++ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-darwin" ++ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" ++ tm_defines="${tm_defines} DISABLE_AARCH64_AS_CRC_BUGFIX=1" ++ # Choose a default CPU version that will work for all current releases. ++ with_cpu=${with_cpu:-apple-m1} ++ ;; + aarch64*-*-freebsd*) + tm_file="${tm_file} elfos.h ${fbsd_tm_file}" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h" +@@ -4133,8 +4161,8 @@ case "${target}" in + fi + for which in cpu arch tune; do + eval "val=\$with_$which" +- base_val=`echo $val | sed -e 's/\+.*//'` +- ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'` ++ base_val=`echo $val | sed -E -e 's/\+.*//'` ++ ext_val=`echo $val | sed -E -e 's/[a-z0-9.-]+//'` + + if [ $which = arch ]; then + def=aarch64-arches.def +@@ -4166,9 +4194,9 @@ case "${target}" in + + while [ x"$ext_val" != x ] + do +- ext_val=`echo $ext_val | sed -e 's/\+//'` +- ext=`echo $ext_val | sed -e 's/\+.*//'` +- base_ext=`echo $ext | sed -e 's/^no//'` ++ ext_val=`echo $ext_val | sed -E -e 's/\+//'` ++ ext=`echo $ext_val | sed -E -e 's/\+.*//'` ++ base_ext=`echo $ext | sed -E -e 's/^no//'` + opt_line=`echo -e "$options_parsed" | \ + grep "^\"$base_ext\""` + +@@ -4179,7 +4207,7 @@ case "${target}" in + echo "Unknown extension used in --with-$which=$val" 1>&2 + exit 1 + fi +- ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'` ++ ext_val=`echo $ext_val | sed -E -e 's/[a-z0-9]+//'` + done + + true +diff --git a/gcc/config.in b/gcc/config.in +index 712cae85e4a..47985ba1a0a 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -49,6 +49,19 @@ + #endif + + ++/* Specify a runpath directory, additional to those provided by the compiler ++ */ ++#ifndef USED_FOR_TARGET ++#undef DARWIN_ADD_RPATH ++#endif ++ ++ ++/* Should add an extra runpath directory */ ++#ifndef USED_FOR_TARGET ++#undef DARWIN_DO_EXTRA_RPATH ++#endif ++ ++ + /* Define to enable the use of a default assembler. */ + #ifndef USED_FOR_TARGET + #undef DEFAULT_ASSEMBLER +@@ -634,8 +647,7 @@ + #endif + + +-/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false. +- */ ++/* Define if your macOS assembler supports -mllvm -x86-pad-for-align=false. */ + #ifndef USED_FOR_TARGET + #undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN + #endif +@@ -2208,6 +2220,12 @@ + #endif + + ++/* Define to 1 if ld64 supports '-demangle'. */ ++#ifndef USED_FOR_TARGET ++#undef LD64_HAS_DEMANGLE ++#endif ++ ++ + /* Define to 1 if ld64 supports '-export_dynamic'. */ + #ifndef USED_FOR_TARGET + #undef LD64_HAS_EXPORT_DYNAMIC +diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc +index 8ad82841a4d..567fb10b7fb 100644 +--- a/gcc/config/aarch64/aarch64-builtins.cc ++++ b/gcc/config/aarch64/aarch64-builtins.cc +@@ -785,6 +785,8 @@ enum aarch64_builtins + AARCH64_RBIT, + AARCH64_RBITL, + AARCH64_RBITLL, ++ /* OS-specific */ ++ AARCH64_BUILTIN_CFSTRING, + AARCH64_BUILTIN_MAX + }; + +@@ -920,6 +922,9 @@ tree aarch64_fp16_ptr_type_node = NULL_TREE; + /* Back-end node type for brain float (bfloat) types. */ + tree aarch64_bf16_ptr_type_node = NULL_TREE; + ++/* Pointer to __float128 on Mach-O, where the 128b float is not long double. */ ++tree aarch64_float128_ptr_type_node = NULL_TREE; ++ + /* Wrapper around add_builtin_function. NAME is the name of the built-in + function, TYPE is the function type, CODE is the function subcode + (relative to AARCH64_BUILTIN_GENERAL), and ATTRS is the function +@@ -1695,6 +1700,29 @@ aarch64_init_bf16_types (void) + aarch64_bf16_ptr_type_node = build_pointer_type (bfloat16_type_node); + } + ++/* Initialize the backend REAL_TYPE type supporting __float128 on Mach-O, ++ as well as the related built-ins. */ ++static void ++aarch64_init_float128_types (void) ++{ ++ /* The __float128 type. The node has already been created as ++ _Float128, so for C we only need to register the __float128 name for ++ it. For C++, we create a distinct type which will mangle differently ++ (g) vs. _Float128 (DF128_) and behave backwards compatibly. */ ++ if (float128t_type_node == NULL_TREE) ++ { ++ float128t_type_node = make_node (REAL_TYPE); ++ TYPE_PRECISION (float128t_type_node) ++ = TYPE_PRECISION (float128_type_node); ++ SET_TYPE_MODE (float128t_type_node, TYPE_MODE (float128_type_node)); ++ layout_type (float128t_type_node); ++ } ++ lang_hooks.types.register_builtin_type (float128t_type_node, "__float128"); ++ ++ aarch64_float128_ptr_type_node = build_pointer_type (float128t_type_node); ++} ++ ++ + /* Pointer authentication builtins that will become NOP on legacy platform. + Currently, these builtins are for internal use only (libgcc EH unwinder). */ + +@@ -1983,8 +2011,9 @@ aarch64_general_init_builtins (void) + aarch64_init_fpsr_fpcr_builtins (); + + aarch64_init_fp16_types (); +- + aarch64_init_bf16_types (); ++ if (TARGET_MACHO) ++ aarch64_init_float128_types (); + + { + aarch64_simd_switcher simd; +@@ -2021,6 +2050,14 @@ aarch64_general_init_builtins (void) + handle_arm_acle_h (); + } + ++void ++aarch64_init_subtarget_builtins (void) ++{ ++#ifdef SUBTARGET_INIT_BUILTINS ++ SUBTARGET_INIT_BUILTINS; ++#endif ++} ++ + /* Implement TARGET_BUILTIN_DECL for the AARCH64_BUILTIN_GENERAL group. */ + tree + aarch64_general_builtin_decl (unsigned code, bool) +diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc +index 6ddfcc7ce3e..b2cfd4a0fec 100644 +--- a/gcc/config/aarch64/aarch64-c.cc ++++ b/gcc/config/aarch64/aarch64-c.cc +@@ -229,6 +229,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pfile) + { + aarch64_define_unconditional_macros (pfile); + aarch64_update_cpp_builtins (pfile); ++ ++ if (TARGET_MACHO) ++ { ++ builtin_define ("__builtin_copysignq=__builtin_copysignf128"); ++ builtin_define ("__builtin_fabsq=__builtin_fabsf128"); ++ builtin_define ("__builtin_huge_valq=__builtin_huge_valf128"); ++ builtin_define ("__builtin_infq=__builtin_inff128"); ++ builtin_define ("__builtin_nanq=__builtin_nanf128"); ++ builtin_define ("__builtin_nansq=__builtin_nansf128"); ++ } + } + + /* Hook to validate the current #pragma GCC target and set the state, and +@@ -364,4 +374,8 @@ aarch64_register_pragmas (void) + targetm.check_builtin_call = aarch64_check_builtin_call; + + c_register_pragma ("GCC", "aarch64", aarch64_pragma_aarch64); ++ ++#ifdef REGISTER_SUBTARGET_PRAGMAS ++ REGISTER_SUBTARGET_PRAGMAS (); ++#endif + } +diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def +index bec08ca1910..ff32bf6de6a 100644 +--- a/gcc/config/aarch64/aarch64-cores.def ++++ b/gcc/config/aarch64/aarch64-cores.def +@@ -165,6 +165,18 @@ AARCH64_CORE("cortex-a76.cortex-a55", cortexa76cortexa55, cortexa53, V8_2A, (F + /* Armv8-R Architecture Processors. */ + AARCH64_CORE("cortex-r82", cortexr82, cortexa53, V8R, (), cortexa53, 0x41, 0xd15, -1) + ++/* Apple (A12 and M) cores. ++ Apple implementer ID from xnu, ++ guesses for part #, guesses for scheduler ident, generic_armv8_a for costs. ++ A12 seems mostly 8.3, ++ M1 seems to be 8.4 + extras (see comments in option-extensions about f16fml), ++ M2 mostly 8.5 but with missing mandatory features. ++ M3 is pretty much the same as M2. */ ++AARCH64_CORE("apple-a12", applea12, cortexa53, V8_3A, (), cortexa53, 0x61, 0x12, -1) ++AARCH64_CORE("apple-m1", applem1, cortexa57, V8_4A, (F16, SB, SSBS), cortexa73, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m2", applem2, cortexa57, V8_4A, (I8MM, BF16, F16, SB, SSBS), cortexa73, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m3", applem3, cortexa57, V8_4A, (I8MM, BF16, F16, SB, SSBS), cortexa73, 0x61, 0x23, -1) ++ + /* Armv9.0-A Architecture Processors. */ + + /* Arm ('A') cores. */ +diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h +index 32716f6cb15..a107f9ef069 100644 +--- a/gcc/config/aarch64/aarch64-protos.h ++++ b/gcc/config/aarch64/aarch64-protos.h +@@ -109,6 +109,14 @@ enum aarch64_symbol_type + SYMBOL_TLSLE24, + SYMBOL_TLSLE32, + SYMBOL_TLSLE48, ++ SYMBOL_MO_SMALL_ABS, ++ SYMBOL_MO_SMALL_PCR, ++ SYMBOL_MO_SMALL_GOT, ++ SYMBOL_MO_SMALL_TLS, ++ SYMBOL_MO_LARGE_ABS, ++ SYMBOL_MO_LARGE_PCR, ++ SYMBOL_MO_LARGE_GOT, ++ SYMBOL_MO_LARGE_TLS, + SYMBOL_FORCE_TO_MEM + }; + +@@ -745,6 +753,7 @@ void aarch64_post_cfi_startproc (void); + poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned); + int aarch64_get_condition_code (rtx); + bool aarch64_address_valid_for_prefetch_p (rtx, bool); ++bool aarch64_address_valid_for_unscaled_prefetch_p (rtx, bool); + bool aarch64_bitmask_imm (unsigned HOST_WIDE_INT val, machine_mode); + unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in); + unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in); +@@ -775,7 +784,11 @@ bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx); + bool aarch64_is_long_call_p (rtx); + bool aarch64_is_noplt_call_p (rtx); + bool aarch64_label_mentioned_p (rtx); ++#if TARGET_MACHO ++void aarch64_darwin_declare_function_name (FILE *, const char*, tree ); ++#else + void aarch64_declare_function_name (FILE *, const char*, tree); ++#endif + void aarch64_asm_output_alias (FILE *, const tree, const tree); + void aarch64_asm_output_external (FILE *, tree, const char*); + bool aarch64_legitimate_pic_operand_p (rtx); +@@ -971,6 +984,7 @@ void aarch64_override_options_internal (struct gcc_options *); + + const char *aarch64_general_mangle_builtin_type (const_tree); + void aarch64_general_init_builtins (void); ++void aarch64_init_subtarget_builtins (void); + tree aarch64_general_fold_builtin (unsigned int, tree, unsigned int, tree *); + gimple *aarch64_general_gimple_fold_builtin (unsigned int, gcall *, + gimple_stmt_iterator *); +diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md +index 6eae8522593..cfb7d824e40 100644 +--- a/gcc/config/aarch64/aarch64-tune.md ++++ b/gcc/config/aarch64/aarch64-tune.md +@@ -1,5 +1,5 @@ + ;; -*- buffer-read-only: t -*- + ;; Generated automatically by gentune.sh from aarch64-cores.def + (define_attr "tune" +- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa710,cortexa715,cortexx2,cortexx3,neoversen2,cobalt100,neoversev2,grace,demeter" ++ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,applea12,applem1,applem2,applem3,cortexa510,cortexa710,cortexa715,cortexx2,cortexx3,neoversen2,cobalt100,neoversev2,grace,demeter" + (const (symbol_ref "((enum attr_tune) aarch64_tune)"))) +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index 20b1f249f1d..2d91a4bd4e4 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -295,8 +295,10 @@ static bool aarch64_vfp_is_call_or_return_candidate (machine_mode, + const_tree, + machine_mode *, int *, + bool *, bool); ++#if !TARGET_MACHO + static void aarch64_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED; + static void aarch64_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED; ++#endif + static void aarch64_override_options_after_change (void); + static bool aarch64_vector_mode_supported_p (machine_mode); + static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool); +@@ -2795,6 +2797,9 @@ static const struct attribute_spec aarch64_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, + affects_type_identity, handler, exclude } */ ++#ifdef SUBTARGET_ATTRIBUTE_TABLE ++ SUBTARGET_ATTRIBUTE_TABLE, ++#endif + { "aarch64_vector_pcs", 0, 0, false, true, true, true, + handle_aarch64_vector_pcs_attribute, NULL }, + { "arm_sve_vector_bits", 1, 1, false, true, false, true, +@@ -3949,7 +3954,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode) + if (known_le (GET_MODE_SIZE (mode), 8)) + return true; + if (known_le (GET_MODE_SIZE (mode), 16)) +- return (regno & 1) == 0; ++ return (regno & 1) == 0 || TARGET_MACHO; /* darwinpcs D.4 */ + } + else if (FP_REGNUM_P (regno)) + { +@@ -3995,8 +4000,10 @@ static bool + aarch64_takes_arguments_in_sve_regs_p (const_tree fntype) + { + CUMULATIVE_ARGS args_so_far_v; ++ /* This does not apply to variadic functions, so all the (currently ++ uncounted) arguments must be named. */ + aarch64_init_cumulative_args (&args_so_far_v, NULL_TREE, NULL_RTX, +- NULL_TREE, 0, true); ++ NULL_TREE, -1, true); + cumulative_args_t args_so_far = pack_cumulative_args (&args_so_far_v); + + for (tree chain = TYPE_ARG_TYPES (fntype); +@@ -4482,6 +4489,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + switch (type) + { + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + { + /* In ILP32, the mode of dest can be either SImode or DImode. */ + rtx tmp_reg = dest; +@@ -4492,6 +4500,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + if (can_create_pseudo_p ()) + tmp_reg = gen_reg_rtx (mode); + ++ if (TARGET_MACHO) ++ { ++ rtx sym, off; ++ split_const (imm, &sym, &off); ++ /* Negative offsets don't work, whether by intention is TBD. */ ++ if (INTVAL (off) < 0 || INTVAL (off) > 8 * 1024 * 1024) ++ { ++ emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, sym)); ++ emit_insn (gen_add_losym (dest, tmp_reg, sym)); ++ /* FIXME: add the SI option if/when we support ilp32. */ ++ emit_insn (gen_adddi3 (dest, dest, off)); ++ return; ++ } ++ /* else small enough positive offset is OK. */ ++ } + emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, copy_rtx (imm))); + emit_insn (gen_add_losym (dest, tmp_reg, imm)); + return; +@@ -4575,6 +4598,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + return; + } + ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_SMALL_GOT_4G: + emit_insn (gen_rtx_SET (dest, imm)); + return; +@@ -6856,6 +6880,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + case SYMBOL_SMALL_TLSIE: + case SYMBOL_SMALL_GOT_28K: + case SYMBOL_SMALL_GOT_4G: ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_TINY_GOT: + case SYMBOL_TINY_TLSIE: + if (const_offset != 0) +@@ -6869,6 +6894,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + /* FALLTHRU */ + + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + case SYMBOL_TINY_ABSOLUTE: + case SYMBOL_TLSLE12: + case SYMBOL_TLSLE24: +@@ -7450,6 +7476,7 @@ aarch64_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) + gcc_unreachable (); + } + ++#if !TARGET_MACHO + static bool + aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + const_tree type, int *nregs) +@@ -7459,6 +7486,7 @@ aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + &pcum->aapcs_vfp_rmode, + nregs, NULL, pcum->silent_p); + } ++#endif + + /* Given MODE and TYPE of a function argument, return the alignment in + bits. The idea is to suppress any stronger alignment requested by +@@ -7482,7 +7510,7 @@ aarch64_function_arg_alignment (machine_mode mode, const_tree type, + if (integer_zerop (TYPE_SIZE (type))) + return 0; + +- gcc_assert (TYPE_MODE (type) == mode); ++ gcc_assert (TARGET_MACHO || TYPE_MODE (type) == mode); + + if (!AGGREGATE_TYPE_P (type)) + { +@@ -7642,6 +7670,14 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + Both behaviors were wrong, but in different cases. */ + + pcum->aapcs_arg_processed = true; ++ if (TARGET_MACHO) ++ { ++ /* Set suitable defaults for queries. */ ++ pcum->darwinpcs_arg_boundary ++ = aarch64_function_arg_alignment (mode, type, &abi_break, ++ &abi_break_packed); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ } + + pure_scalable_type_info pst_info; + if (type && pst_info.analyze_registers (type)) +@@ -7701,13 +7737,29 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* No frontends can create types with variable-sized modes, so we + shouldn't be asked to pass or return them. */ + size = GET_MODE_SIZE (mode).to_constant (); ++ ++ if (TARGET_MACHO) ++ /* Since we can pack things on the stack, we need the unrounded size. */ ++ pcum->darwinpcs_stack_bytes = size; ++ + size = ROUND_UP (size, UNITS_PER_WORD); + + allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode); ++ bool is_ha = false; ++#if !TARGET_MACHO + allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v, + mode, + type, + &nregs); ++#else ++ /* We care if the value is a homogenous aggregate when laying out the stack, ++ so use this call directly. */ ++ allocate_nvrn ++ = aarch64_vfp_is_call_or_return_candidate (mode, type, ++ &pcum->aapcs_vfp_rmode, ++ &nregs, &is_ha, ++ pcum->silent_p); ++#endif + gcc_assert (!sve_p || !allocate_nvrn); + + unsigned int alignment +@@ -7728,7 +7780,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + if (!pcum->silent_p && !TARGET_FLOAT) + aarch64_err_no_fpadvsimd (mode); + +- if (nvrn + nregs <= NUM_FP_ARG_REGS) ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextnvrn = NUM_FP_ARG_REGS; ++ goto on_stack; ++ } ++ else if (nvrn + nregs <= NUM_FP_ARG_REGS) + { + pcum->aapcs_nextnvrn = nvrn + nregs; + if (!aarch64_composite_type_p (type, mode)) +@@ -7758,6 +7816,7 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + else +@@ -7774,14 +7833,24 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* C6 - C9. though the sign and zero extension semantics are + handled elsewhere. This is the case where the argument fits + entirely general registers. */ ++ + if (allocate_ncrn && (ncrn + nregs <= NUM_ARG_REGS)) + { + gcc_assert (nregs == 0 || nregs == 1 || nregs == 2); + ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextncrn = NUM_ARG_REGS; ++ goto on_stack; ++ } ++ + /* C.8 if the argument has an alignment of 16 then the NGRN is + rounded up to the next even number. */ + if (nregs == 2 +- && ncrn % 2) ++ && ncrn % 2 ++ /* Darwin PCS deletes rule C.8. */ ++ && !TARGET_MACHO) + { + /* Emit a warning if the alignment changed when taking the + 'packed' attribute into account. */ +@@ -7843,8 +7912,8 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } +- + pcum->aapcs_nextncrn = ncrn + nregs; ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + +@@ -7854,7 +7923,81 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* The argument is passed on stack; record the needed number of words for + this argument and align the total size if necessary. */ + on_stack: +- pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ ++ if (TARGET_MACHO) ++ { ++ /* Darwin does not round up the allocation for smaller entities to 8 ++ bytes. It only requires the natural alignment for these. ++ ++ but we don't do this for: ++ * unnamed parms in variadic functions ++ * complex types ++ * unions ++ * aggregates (except for homogeneous ones which are handles as the ++ enclosed type). ++ each entry starts a new slot. ++ ++ 16 byte entities are naturally aligned on the stack. ++ There was no darwinpcs for GCC 9, so neither the implementation ++ change nor the warning should fire here (i.e. we do not need to check ++ if 16byte entities alter the stack size). */ ++ ++ gcc_checking_assert (arg.named == pcum->named_p); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ if (!pcum->named_p ++ || TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (pcum->aapcs_vfp_rmode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ { ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = MAX (alignment, PARM_BOUNDARY); ++ if (!pcum->named_p) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ return; ++ } ++ ++ /* Updated sub-word offset aligned for the new object. ++ We are looking for the case that the new object will fit after some ++ existing object(s) in the same stack slot. In that case, we do not ++ need to add any more stack space for it. */ ++ int new_off ++ = ROUND_UP (pcum->darwinpcs_sub_word_pos, alignment / BITS_PER_UNIT); ++ ++ if (new_off >= UNITS_PER_WORD) ++ { ++ /* That exceeds a stack slot, start a new one. */ ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ new_off = 0; ++ } ++ /* This is the end of the new object. */ ++ int new_pos = new_off + pcum->darwinpcs_stack_bytes; ++ ++ if (pcum->darwinpcs_sub_word_pos == 0) ++ /* New stack slot, just allocate one or more words, and note where ++ the next arg will start. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ else if (new_pos <= UNITS_PER_WORD) ++ /* Old stack slot, object starts at new_off and goes to new_pos, we do ++ not add any stack space. */ ++ pcum->darwinpcs_sub_word_offset = new_off; ++ pcum->darwinpcs_sub_word_pos = new_pos; ++ pcum->darwinpcs_arg_boundary = alignment ; ++ if (pcum->last_named_p && new_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (new_pos <= 4) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ else if (new_pos <= 6) ++ pcum->darwinpcs_arg_padding = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ pcum->darwinpcs_arg_padding = 2 * BITS_PER_UNIT; ++ } ++ return; ++ } + + if (warn_pcs_change + && abi_break_packed +@@ -7863,6 +8006,8 @@ on_stack: + inform (input_location, "parameter passing for argument of type " + "%qT changed in GCC 13.1", type); + ++ /* size was already rounded up to PARM_BOUNDARY. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; + if (alignment == 16 * BITS_PER_UNIT) + { + int new_size = ROUND_UP (pcum->aapcs_stack_size, 16 / UNITS_PER_WORD); +@@ -7916,7 +8061,28 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum, + pcum->aapcs_arg_processed = false; + pcum->aapcs_stack_words = 0; + pcum->aapcs_stack_size = 0; ++ pcum->darwinpcs_stack_bytes = 0; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ /* If we have been invoked for incoming args, then n_named will have been ++ set to -1, but we should have a function decl - so pick up the named ++ count from that. If that fails, and we end up with -1, this effectively ++ corresponds to assuming that there is an arbitrary number of named ++ args. */ ++ pcum->darwinpcs_n_named = n_named; ++ if (n_named == (unsigned)-1 && fndecl) ++ { ++ tree fnt = TREE_TYPE (fndecl); ++ if (fnt && TYPE_ARG_TYPES (fnt)) ++ pcum->darwinpcs_n_named = list_length (TYPE_ARG_TYPES (fnt)); ++ } ++ pcum->darwinpcs_n_args_processed = 0; ++ pcum->named_p = pcum->darwinpcs_n_named != 0; ++ pcum->last_named_p = pcum->darwinpcs_n_named == 1; + pcum->silent_p = silent_p; ++ pcum->aapcs_vfp_rmode = VOIDmode; + + if (!silent_p + && !TARGET_FLOAT +@@ -7955,8 +8121,10 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + || pcum->pcs_variant == ARM_PCS_SVE) + { + aarch64_layout_arg (pcum_v, arg); +- gcc_assert ((pcum->aapcs_reg != NULL_RTX) +- != (pcum->aapcs_stack_words != 0)); ++ pcum->darwinpcs_n_args_processed++; ++ gcc_assert (TARGET_MACHO ++ || (pcum->aapcs_reg != NULL_RTX) ++ != (pcum->aapcs_stack_words != 0)); + pcum->aapcs_arg_processed = false; + pcum->aapcs_ncrn = pcum->aapcs_nextncrn; + pcum->aapcs_nvrn = pcum->aapcs_nextnvrn; +@@ -7964,6 +8132,12 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + pcum->aapcs_stack_size += pcum->aapcs_stack_words; + pcum->aapcs_stack_words = 0; + pcum->aapcs_reg = NULL_RTX; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ pcum->named_p ++ = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++ pcum->last_named_p ++ = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; + } + } + +@@ -7975,12 +8149,15 @@ aarch64_function_arg_regno_p (unsigned regno) + || (PR_REGNUM_P (regno) && regno < P0_REGNUM + NUM_PR_ARG_REGS)); + } + +-/* Implement FUNCTION_ARG_BOUNDARY. Every parameter gets at least +- PARM_BOUNDARY bits of alignment, but will be given anything up +- to STACK_BOUNDARY bits if the type requires it. This makes sure +- that both before and after the layout of each argument, the Next +- Stacked Argument Address (NSAA) will have a minimum alignment of +- 8 bytes. */ ++/* Implement FUNCTION_ARG_BOUNDARY. ++ For AAPCS64, Every parameter gets at least PARM_BOUNDARY bits of ++ alignment, but will be given anything up to STACK_BOUNDARY bits ++ if the type requires it. This makes sure that both before and after ++ the layout of each argument, the Next Stacked Argument Address (NSAA) ++ will have a minimum alignment of 8 bytes. ++ ++ For darwinpcs, this is only called to lower va_arg entries which are ++ always aligned as for AAPCS64. */ + + static unsigned int + aarch64_function_arg_boundary (machine_mode mode, const_tree type) +@@ -7992,8 +8169,107 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + &abi_break_packed); + /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr + to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ /* This can only work for unnamed args. */ ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ if (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return MIN (alignment, STACK_BOUNDARY); ++#else + alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); + return alignment; ++#endif ++} ++ ++/* For Darwin, we want to use the arg boundary computed when laying out the ++ function arg, to cope with items packed on the stack and the different ++ rules applied to unnamed parms. */ ++ ++static unsigned int ++aarch64_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ unsigned int abi_break; ++ unsigned int abi_break_packed; ++ unsigned int alignment = aarch64_function_arg_alignment (mode, type, ++ &abi_break, ++ &abi_break_packed); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ bool no_pack = (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE); ++ ++ bool in_regs = (pcum->aapcs_reg != NULL_RTX); ++ ++ if ((named_p && !no_pack) || in_regs) ++ ; /* Leave the alignment as natural. */ ++ else ++ alignment = MAX (alignment, PARM_BOUNDARY); ++gcc_checking_assert (alignment == pcum->darwinpcs_arg_boundary); ++ return MIN (alignment, STACK_BOUNDARY); ++ ++#else ++ alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return alignment; ++#endif ++} ++ ++/* Implement TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA for darwinpcs which allows ++ non-standard passing of byte-aligned items [D.2]. This is done by pulling ++ the values out of the cumulative args struct. */ ++ ++static unsigned int ++aarch64_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca) ++{ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ bool last_named_p = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; ++gcc_checking_assert (last_named_p == pcum->last_named_p); ++ ++ unsigned boundary = BITS_PER_UNIT; ++ if (last_named_p && pcum->darwinpcs_sub_word_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (pcum->darwinpcs_sub_word_pos <= 4) ++ boundary = PARM_BOUNDARY; ++ else if (pcum->darwinpcs_sub_word_pos <= 6) ++ boundary = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ boundary = 2 * BITS_PER_UNIT; ++ } ++ else if (named_p) ++ /* Named args are naturally aligned, but with no rounding. */ ++ ; ++ else ++ /* un-named args are rounded to fill slots. */ ++ boundary = PARM_BOUNDARY; ++gcc_checking_assert (boundary == pcum->darwinpcs_arg_padding); ++ return boundary; + } + + /* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE. */ +@@ -11107,6 +11383,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + /* load literal: pc-relative constant pool entry. Only supported + for SI mode or larger. */ + info->type = ADDRESS_SYMBOLIC; ++ info->offset = NULL_RTX; + + if (!load_store_pair_p + && GET_MODE_SIZE (mode).is_constant (&const_size) +@@ -11114,6 +11391,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + { + poly_int64 offset; + rtx sym = strip_offset_and_salt (x, &offset); ++ + return ((LABEL_REF_P (sym) + || (SYMBOL_REF_P (sym) + && CONSTANT_POOL_ADDRESS_P (sym) +@@ -11131,10 +11409,13 @@ aarch64_classify_address (struct aarch64_address_info *info, + poly_int64 offset; + HOST_WIDE_INT const_offset; + rtx sym = strip_offset_and_salt (info->offset, &offset); ++ + if (SYMBOL_REF_P (sym) + && offset.is_constant (&const_offset) + && (aarch64_classify_symbol (sym, const_offset) +- == SYMBOL_SMALL_ABSOLUTE)) ++ == SYMBOL_SMALL_ABSOLUTE ++ || aarch64_classify_symbol (sym, const_offset) ++ == SYMBOL_MO_SMALL_PCR)) + { + /* The symbol and offset must be aligned to the access size. */ + unsigned int align; +@@ -11184,6 +11465,55 @@ aarch64_address_valid_for_prefetch_p (rtx x, bool strict_p) + if (!res) + return false; + ++ /* For ELF targets using GAS, we emit prfm unconditionally; GAS will alter ++ the instruction to pick the prfum form where possible (i.e. when the ++ offset is in the range -256..255) and fall back to prfm otherwise. ++ We can reject cases where the offset exceeds the range usable by both ++ insns [-256..32760], or for offsets > 255 when the value is not divisible ++ by 8. ++ For Mach-O (Darwin) where the assembler uses the LLVM back end, that does ++ not yet do the substitution, so we must reject all prfum cases. */ ++ if (addr.offset) ++ { ++ HOST_WIDE_INT offs = INTVAL (addr.offset); ++ if (offs < -256) /* Out of range for both prfum and prfm. */ ++ return false; ++ if (offs > 32760) /* Out of range for prfm. */ ++ return false; ++ if (offs & 0x07) /* We cannot use prfm. */ ++ { ++ if (offs > 255) /* Out of range for prfum. */ ++ return false; ++ if (TARGET_MACHO) ++ return false; ++ } ++ if (TARGET_MACHO && offs < 0) ++ return false; ++ } ++ ++ /* ... except writeback forms. */ ++ return addr.type != ADDRESS_REG_WB; ++} ++ ++/* Return true if the address X is valid for a PRFUM instruction. ++ STRICT_P is true if we should do strict checking with ++ aarch64_classify_address. */ ++ ++bool ++aarch64_address_valid_for_unscaled_prefetch_p (rtx x, bool strict_p) ++{ ++ struct aarch64_address_info addr; ++ ++ /* PRFUM accepts the same addresses as DImode, but constrained to a range ++ -256..255. */ ++ bool res = aarch64_classify_address (&addr, x, DImode, strict_p); ++ if (!res) ++ return false; ++ ++ if (addr.offset && ((INTVAL (addr.offset) > 255) ++ || (INTVAL (addr.offset) < -256))) ++ return false; ++ + /* ... except writeback forms. */ + return addr.type != ADDRESS_REG_WB; + } +@@ -11897,6 +12227,144 @@ sizetochar (int size) + } + } + ++static void ++output_macho_postfix_expr (FILE *file, rtx x, const char *postfix) ++{ ++ char buf[256]; ++ ++ restart: ++ switch (GET_CODE (x)) ++ { ++ case PC: ++ putc ('.', file); ++ break; ++ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_DECL (x)) ++ assemble_external (SYMBOL_REF_DECL (x)); ++ assemble_name (file, XSTR (x, 0)); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case LABEL_REF: ++ x = label_ref_label (x); ++ /* Fall through. */ ++ case CODE_LABEL: ++ ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); ++ assemble_name (file, buf); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case CONST_INT: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); ++ break; ++ ++ case CONST: ++ /* This used to output parentheses around the expression, ++ but that does not work on the 386 (either ATT or BSD assembler). */ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ break; ++ ++ case CONST_WIDE_INT: ++ /* We do not know the mode here so we have to use a round about ++ way to build a wide-int to get it printed properly. */ ++ { ++ wide_int w = wide_int::from_array (&CONST_WIDE_INT_ELT (x, 0), ++ CONST_WIDE_INT_NUNITS (x), ++ CONST_WIDE_INT_NUNITS (x) ++ * HOST_BITS_PER_WIDE_INT, ++ false); ++ print_decs (w, file); ++ } ++ break; ++ ++ case CONST_DOUBLE: ++ if (CONST_DOUBLE_AS_INT_P (x)) ++ { ++ /* We can use %d if the number is one word and positive. */ ++ if (CONST_DOUBLE_HIGH (x)) ++ fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x), ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else if (CONST_DOUBLE_LOW (x) < 0) ++ fprintf (file, HOST_WIDE_INT_PRINT_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); ++ } ++ else ++ /* We can't handle floating point constants; ++ PRINT_OPERAND must handle them. */ ++ output_operand_lossage ("floating constant misused"); ++ break; ++ ++ case CONST_FIXED: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_FIXED_VALUE_LOW (x)); ++ break; ++ ++ case PLUS: ++ /* Some assemblers need integer constants to appear last (eg masm). */ ++ if (CONST_INT_P (XEXP (x, 0))) ++ { ++ output_macho_postfix_expr (file, XEXP (x, 1), postfix); ++ if (INTVAL (XEXP (x, 0)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 0)); ++ } ++ else ++ { ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ if (!CONST_INT_P (XEXP (x, 1)) ++ || INTVAL (XEXP (x, 1)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 1)); ++ } ++ break; ++ ++ case MINUS: ++ /* Avoid outputting things like x-x or x+5-x, ++ since some assemblers can't handle that. */ ++ x = simplify_subtraction (x); ++ if (GET_CODE (x) != MINUS) ++ goto restart; ++ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ fprintf (file, "-"); ++ if ((CONST_INT_P (XEXP (x, 1)) && INTVAL (XEXP (x, 1)) >= 0) ++ || GET_CODE (XEXP (x, 1)) == PC ++ || GET_CODE (XEXP (x, 1)) == SYMBOL_REF) ++ output_addr_const (file, XEXP (x, 1)); ++ else ++ { ++ fputs (targetm.asm_out.open_paren, file); ++ output_addr_const (file, XEXP (x, 1)); ++ fputs (targetm.asm_out.close_paren, file); ++ } ++ break; ++ ++ case ZERO_EXTEND: ++ case SIGN_EXTEND: ++ case SUBREG: ++ case TRUNCATE: ++ output_addr_const (file, XEXP (x, 0)); ++ break; ++ ++ case UNSPEC: ++ if (XINT (x, 1) == UNSPEC_SALT_ADDR) ++ { ++ output_macho_postfix_expr (file, XVECEXP (x, 0, 0), postfix); ++ break; ++ } ++ /* FALLTHROUGH */ ++ default: ++ if (targetm.asm_out.output_addr_const_extra (file, x)) ++ break; ++ ++ output_operand_lossage ("invalid expression as operand"); ++ } ++ ++} ++ + /* Print operand X to file F in a target specific manner according to CODE. + The acceptable formatting commands given by CODE are: + 'c': An integer or symbol address without a preceding # +@@ -11965,6 +12433,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + } + break; + ++ case 'J': ++ output_macho_postfix_expr (f, x, "PAGEOFF"); ++ break; ++ case 'O': ++ output_macho_postfix_expr (f, x, "GOTPAGEOFF"); ++ break; + case 'e': + { + x = unwrap_const_vec_duplicate (x); +@@ -12288,7 +12762,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + case 'A': + if (GET_CODE (x) == HIGH) + x = XEXP (x, 0); +- ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12319,9 +12793,26 @@ aarch64_print_operand (FILE *f, rtx x, int code) + break; + } + output_addr_const (asm_out_file, x); ++#endif ++#if TARGET_MACHO ++ switch (aarch64_classify_symbolic_expression (x)) ++ { ++ case SYMBOL_MO_SMALL_PCR: ++ output_macho_postfix_expr (asm_out_file, x, "PAGE"); ++ break; ++ case SYMBOL_MO_SMALL_GOT: ++ output_macho_postfix_expr (asm_out_file, x, "GOTPAGE"); ++ break; ++ default: ++ /* large code model unimplemented. */ ++ gcc_unreachable (); ++ break; ++ } ++#endif + break; + + case 'L': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12359,10 +12850,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + + case 'G': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_TLSLE24: +@@ -12371,6 +12864,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + +@@ -12520,8 +13014,13 @@ aarch64_print_address_internal (FILE *f, machine_mode mode, rtx x, + break; + + case ADDRESS_LO_SUM: ++#if TARGET_MACHO ++ asm_fprintf (f, "[%s, #", reg_names [REGNO (addr.base)]); ++ output_macho_postfix_expr (f, addr.offset, "PAGEOFF"); ++#else + asm_fprintf (f, "[%s, #:lo12:", reg_names [REGNO (addr.base)]); + output_addr_const (f, addr.offset); ++#endif + asm_fprintf (f, "]"); + return true; + +@@ -12802,6 +13301,26 @@ aarch64_secondary_memory_needed (machine_mode mode, reg_class_t class1, + return false; + } + ++#if TARGET_MACHO ++/* Implement TARGET_FRAME_POINTER_REQUIRED. */ ++ ++static bool ++aarch64_darwin_frame_pointer_required () ++{ ++ if (crtl->calls_eh_return) ++ return true; ++ ++ /* Not used in leaf functions (unless forced). */ ++ if (flag_omit_leaf_frame_pointer && leaf_function_p ()) ++ return false; ++ ++ /* NOTE: We are allowing the user to force omission of the frame ++ pointer, (despite that it is not ABI-compliant). */ ++ ++ return flag_omit_frame_pointer != 1; ++} ++#endif ++ + static bool + aarch64_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to) + { +@@ -13019,6 +13538,8 @@ aarch64_asm_output_labelref (FILE* f, const char *name) + asm_fprintf (f, "%U%s", name); + } + ++#if !TARGET_MACHO ++ + static void + aarch64_elf_asm_constructor (rtx symbol, int priority) + { +@@ -13058,6 +13579,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority) + assemble_aligned_integer (POINTER_BYTES, symbol); + } + } ++#endif + + const char* + aarch64_output_casesi (rtx *operands) +@@ -13161,7 +13683,11 @@ aarch64_select_rtx_section (machine_mode mode, + if (aarch64_can_use_per_function_literal_pools_p ()) + return function_section (current_function_decl); + ++#if TARGET_MACHO ++ return machopic_select_rtx_section (mode, x, align); ++#else + return default_elf_select_rtx_section (mode, x, align); ++#endif + } + + /* Implement ASM_OUTPUT_POOL_EPILOGUE. */ +@@ -15385,15 +15911,17 @@ aarch64_init_builtins () + { + aarch64_general_init_builtins (); + aarch64_sve::init_builtins (); +-#ifdef SUBTARGET_INIT_BUILTINS +- SUBTARGET_INIT_BUILTINS; +-#endif ++ aarch64_init_subtarget_builtins (); + } + + /* Implement TARGET_FOLD_BUILTIN. */ + static tree + aarch64_fold_builtin (tree fndecl, int nargs, tree *args, bool) + { ++#ifdef SUBTARGET_FOLD_BUILTIN ++ if (tree res = SUBTARGET_FOLD_BUILTIN (fndecl, nargs, args, false)) ++ return res; ++#endif + unsigned int code = DECL_MD_FUNCTION_CODE (fndecl); + unsigned int subcode = code >> AARCH64_BUILTIN_SHIFT; + tree type = TREE_TYPE (TREE_TYPE (fndecl)); +@@ -18577,10 +19105,14 @@ initialize_aarch64_code_model (struct gcc_options *opts) + } + break; + case AARCH64_CMODEL_LARGE: +- if (opts->x_flag_pic) ++ if (TARGET_MACHO) ++ /* We need to implement fPIC here (arm64_32 also accepts the large ++ model). */ ++ sorry ("code model %qs not supported yet", "large"); ++ else if (opts->x_flag_pic) + sorry ("code model %qs with %<-f%s%>", "large", + opts->x_flag_pic > 1 ? "PIC" : "pic"); +- if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) ++ else if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) + sorry ("code model %qs not supported in ilp32 mode", "large"); + break; + case AARCH64_CMODEL_TINY_PIC: +@@ -19466,7 +19998,9 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ++ ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + default: + gcc_unreachable (); +@@ -19502,10 +20036,22 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + + return SYMBOL_TINY_ABSOLUTE; + +- + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: ++#if TARGET_MACHO ++ if (TARGET_MACHO) ++ { ++ /* Constant pool addresses are always TU-local and PC- ++ relative. We indirect common, external and weak ++ symbols (but weak only if not hidden). */ ++ if (!CONSTANT_POOL_ADDRESS_P (x) ++ && (MACHO_SYMBOL_MUST_INDIRECT_P (x) ++ || !aarch64_symbol_binds_local_p (x))) ++ return SYMBOL_MO_SMALL_GOT; ++ } ++ else ++#endif + if ((flag_pic || SYMBOL_REF_WEAK (x)) + && !aarch64_symbol_binds_local_p (x)) + return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC +@@ -19517,7 +20063,8 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + case AARCH64_CMODEL_LARGE: + /* This is alright even in PIC code as the constant +@@ -19647,7 +20194,10 @@ static GTY(()) tree va_list_type; + void *__vr_top; + int __gr_offs; + int __vr_offs; +- }; */ ++ }; ++ ++ darwinpcs uses 'char *' for the va_list (in common with other platform ++ ports). */ + + static tree + aarch64_build_builtin_va_list (void) +@@ -19655,6 +20205,13 @@ aarch64_build_builtin_va_list (void) + tree va_list_name; + tree f_stack, f_grtop, f_vrtop, f_groff, f_vroff; + ++ /* darwinpcs uses a simple char * for this. */ ++ if (TARGET_MACHO) ++ { ++ va_list_type = build_pointer_type (char_type_node); ++ return va_list_type; ++ } ++ + /* Create the type. */ + va_list_type = lang_hooks.types.make_type (RECORD_TYPE); + /* Give it the required name. */ +@@ -19726,6 +20283,13 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) + int vr_save_area_size = cfun->va_list_fpr_size; + int vr_offset; + ++ /* darwinpcs uses the default, char * va_list impl. */ ++ if (TARGET_MACHO) ++ { ++ std_expand_builtin_va_start (valist, nextarg); ++ return; ++ } ++ + cum = &crtl->args.info; + if (cfun->va_list_gpr_size) + gr_save_area_size = MIN ((NUM_ARG_REGS - cum->aapcs_ncrn) * UNITS_PER_WORD, +@@ -19816,6 +20380,9 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + HOST_WIDE_INT size, rsize, adjust, align; + tree t, u, cond1, cond2; + ++ if (TARGET_MACHO) ++ return std_gimplify_va_arg_expr (valist, type, pre_p, post_p); ++ + indirect_p = pass_va_arg_by_reference (type); + if (indirect_p) + type = build_pointer_type (type); +@@ -20006,8 +20573,18 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + field_ptr_t = double_ptr_type_node; + break; + case E_TFmode: +- field_t = long_double_type_node; +- field_ptr_t = long_double_ptr_type_node; ++ if (TARGET_MACHO) ++ { ++ /* Darwin has __float128, and long double is the same as ++ double. */ ++ field_t = float128_type_node; ++ field_ptr_t = aarch64_float128_ptr_type_node; ++ } ++ else ++ { ++ field_t = long_double_type_node; ++ field_ptr_t = long_double_ptr_type_node; ++ } + break; + case E_SDmode: + field_t = dfloat32_type_node; +@@ -20090,6 +20667,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v, + int gr_saved = cfun->va_list_gpr_size; + int vr_saved = cfun->va_list_fpr_size; + ++ if (TARGET_MACHO) ++ return default_setup_incoming_varargs (cum_v, arg, pretend_size, no_rtl); ++ + /* The caller has advanced CUM up to, but not beyond, the last named + argument. Advance a local copy of CUM past the last "real" named + argument, to find out how many registers are left over. */ +@@ -20922,6 +21502,12 @@ aarch64_autovectorize_vector_modes (vector_modes *modes, bool) + static const char * + aarch64_mangle_type (const_tree type) + { ++ /* The darwinpcs ABI documents say that "__va_list" has to be ++ mangled as char *. */ ++ if (TARGET_MACHO ++ && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) ++ return "Pc"; ++ + /* The AArch64 ABI documents say that "__va_list" has to be + mangled as if it is in the "std" namespace. */ + if (lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) +@@ -20938,6 +21524,12 @@ aarch64_mangle_type (const_tree type) + return "Dh"; + } + ++ /* __float128 is mangled as "g" on darwin. _Float128 is not mangled here, ++ but handled in common code (as "DF128_"). */ ++ if (TARGET_MACHO && TYPE_MODE (type) == TFmode ++ && TYPE_MAIN_VARIANT (type) == float128t_type_node) ++ return "g"; ++ + /* Mangle AArch64-specific internal types. TYPE_NAME is non-NULL_TREE for + builtin types. */ + if (TYPE_NAME (type) != NULL) +@@ -21631,7 +22223,8 @@ aarch64_mov_operand_p (rtx x, machine_mode mode) + + /* GOT accesses are valid moves. */ + if (SYMBOL_REF_P (x) +- && aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G) ++ && (aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (x) == SYMBOL_MO_SMALL_GOT)) + return true; + + if (SYMBOL_REF_P (x) && mode == DImode && CONSTANT_ADDRESS_P (x)) +@@ -22775,12 +23368,8 @@ aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name) + static std::string aarch64_last_printed_arch_string; + static std::string aarch64_last_printed_tune_string; + +-/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used +- by the function fndecl. */ +- +-void +-aarch64_declare_function_name (FILE *stream, const char* name, +- tree fndecl) ++static void ++aarch64_function_options_preamble (tree fndecl) + { + tree target_parts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); + +@@ -22819,15 +23408,60 @@ aarch64_declare_function_name (FILE *stream, const char* name, + this_tune->name); + aarch64_last_printed_tune_string = this_tune->name; + } ++} ++ ++/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used ++ by the function fndecl. */ ++ ++#if TARGET_MACHO ++void ++aarch64_darwin_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ gcc_checking_assert (TREE_CODE (fndecl) == FUNCTION_DECL); ++ gcc_checking_assert (!DECL_COMMON (fndecl)); ++ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); + ++ /* Darwin does not emit pcs variant info. */ ++ ++ rtx decl_rtx = XEXP (DECL_RTL (fndecl), 0); ++ if (GET_CODE (decl_rtx) != SYMBOL_REF) ++ name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); ++ ++ if (! DECL_WEAK (fndecl) ++ && ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl))) ++ machopic_define_symbol (DECL_RTL (fndecl)); ++ if ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl)) ++ (* targetm.encode_section_info) (fndecl, DECL_RTL (fndecl), false); ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); ++ ++ cfun->machine->label_is_assembled = true; ++} ++ ++#else ++ ++void ++aarch64_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ /* Emit any necessary pcs information. */ + aarch64_asm_output_variant_pcs (stream, fndecl, name); + + /* Don't forget the type directive for ELF. */ ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function"); +- ASM_OUTPUT_LABEL (stream, name); ++#endif ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); + + cfun->machine->label_is_assembled = true; + } ++#endif + + /* Implement PRINT_PATCHABLE_FUNCTION_ENTRY. */ + +@@ -22884,12 +23518,17 @@ aarch64_output_patchable_area (unsigned int patch_area_size, bool record_p) + /* Implement ASM_OUTPUT_DEF_FROM_DECLS. Output .variant_pcs for aliases. */ + + void +-aarch64_asm_output_alias (FILE *stream, const tree decl, const tree target) ++aarch64_asm_output_alias (FILE *stream, const tree decl, ++ const tree target ATTRIBUTE_UNUSED) + { + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); ++#ifdef ASM_OUTPUT_DEF + const char *value = IDENTIFIER_POINTER (target); ++#endif + aarch64_asm_output_variant_pcs (stream, decl, name); ++#ifdef ASM_OUTPUT_DEF + ASM_OUTPUT_DEF (stream, name, value); ++#endif + } + + /* Implement ASM_OUTPUT_EXTERNAL. Output .variant_pcs for undefined +@@ -22935,6 +23574,9 @@ aarch64_start_file (void) + aarch64_last_printed_arch_string.c_str ()); + + default_file_start (); ++#if TARGET_MACHO ++ darwin_file_start (); ++#endif + } + + /* Emit load exclusive. */ +@@ -23412,6 +24054,10 @@ aarch64_float_const_representable_p (rtx x) + || REAL_VALUE_MINUS_ZERO (r)) + return false; + ++ /* For BFmode, only handle 0.0. */ ++ if (GET_MODE (x) == BFmode) ++ return real_iszero (&r, false); ++ + /* Extract exponent. */ + r = real_value_abs (&r); + exponent = REAL_EXP (&r); +@@ -23515,6 +24161,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + } + + gcc_assert (CONST_INT_P (info.u.mov.value)); ++ unsigned HOST_WIDE_INT value = UINTVAL (info.u.mov.value); ++ ++ /* We have signed chars which can result in a sign-extended 8bit value ++ which is then emitted as an unsigned hex value, and the LLVM back end ++ assembler rejects that as being too big. */ ++ if (TARGET_MACHO && (known_eq (GET_MODE_BITSIZE (info.elt_mode), 8))) ++ { ++ unsigned HOST_WIDE_INT mask = (1U << GET_MODE_BITSIZE (info.elt_mode))-1; ++ value &= mask; ++ } + + if (which == AARCH64_CHECK_MOV) + { +@@ -23523,16 +24179,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + ? "msl" : "lsl"); + if (lane_count == 1) + snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX, +- mnemonic, UINTVAL (info.u.mov.value)); ++ mnemonic, value); + else if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX ", %s %d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), shift_op, ++ element_char, value, shift_op, + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + else + { +@@ -23541,12 +24197,12 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC ", %s #%d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), "lsl", ++ element_char, value, "lsl", + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + return templ; + } +@@ -26736,7 +27392,8 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode) + } + + /* Implement TARGET_SCALAR_MODE_SUPPORTED_P - return TRUE +- if MODE is [BH]Fmode, and punt to the generic implementation otherwise. */ ++ if MODE is [BH]Fmode, or TFmode on Mach-O, and punt to the generic ++ implementation otherwise. */ + + static bool + aarch64_scalar_mode_supported_p (scalar_mode mode) +@@ -26744,7 +27401,7 @@ aarch64_scalar_mode_supported_p (scalar_mode mode) + if (DECIMAL_FLOAT_MODE_P (mode)) + return default_decimal_float_supported_p (); + +- return ((mode == HFmode || mode == BFmode) ++ return ((mode == HFmode || mode == BFmode || (mode == TFmode && TARGET_MACHO)) + ? true + : default_scalar_mode_supported_p (mode)); + } +@@ -27484,19 +28141,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE *out_file) + continue; + + const char *name = indirect_symbol_names[regnum]; +- switch_to_section (get_named_section (decl, NULL, 0)); ++ /* If the target uses a unique section for this switch to it. */ ++ if (DECL_SECTION_NAME (decl)) ++ switch_to_section (get_named_section (decl, NULL, 0)); ++ else ++ switch_to_section (text_section); + ASM_OUTPUT_ALIGN (out_file, 2); +- targetm.asm_out.globalize_label (out_file, name); ++ if (!TARGET_MACHO) ++ targetm.asm_out.globalize_label (out_file, name); ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE ++ ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); ++#endif ++ if (TARGET_MACHO) ++ { ++#ifdef ASM_WEAKEN_DECL ++ if (DECL_WEAK (decl)) ++ ASM_WEAKEN_DECL (out_file, decl, name, 0); ++ else ++#endif ++ targetm.asm_out.globalize_decl_name (out_file, decl); ++ } + /* Only emits if the compiler is configured for an assembler that can + handle visibility directives. */ + targetm.asm_out.assemble_visibility (decl, VISIBILITY_HIDDEN); +- ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); + ASM_OUTPUT_LABEL (out_file, name); + aarch64_sls_emit_function_stub (out_file, regnum); + /* Use the most conservative target to ensure it can always be used by any + function in the translation unit. */ + asm_fprintf (out_file, "\tdsb\tsy\n\tisb\n"); ++#ifdef ASM_DECLARE_FUNCTION_SIZE + ASM_DECLARE_FUNCTION_SIZE (out_file, name, decl); ++#endif + } + } + +@@ -27527,6 +28202,60 @@ aarch64_indirect_call_asm (rtx addr) + return ""; + } + ++#if TARGET_MACHO ++/* This handles the promotion of function return values. ++ It also handles function args under two specific curcumstances: ++ - called from combine with a register argument ++ - caller for a libcall with type == NULL. ++ The remaining cases for argument promotion are handled with access to ++ cumulative args data, below. */ ++machine_mode ++aarch64_darwin_promote_fn_mode (const_tree type, machine_mode mode, ++ int *punsignedp, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ /* With the amended use of promote using cargs, the only cases that arrive ++ here with for_return == 0 are from combine (where the value is definitely ++ in a register) and for libcalls, where type == NULL. We want to promote ++ function return values in the callee, so this becomes pretty much ++ unconditional now. */ ++ if (type != NULL_TREE) ++ return promote_mode (type, mode, punsignedp); ++ return mode; ++} ++ ++/* Ensure that we only promote the mode of named parms when they are passed in ++ a register. Named values passed on the stack retain their original mode and ++ alignment. */ ++machine_mode ++aarch64_darwin_promote_function_mode_ca (cumulative_args_t ca, ++ function_arg_info arg, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int *punsignedp, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ tree type = arg.type; ++ machine_mode mode = arg.mode; ++ machine_mode new_mode = promote_mode (type, mode, punsignedp); ++ if (new_mode == mode || arg.named == false ++ || GET_MODE_CLASS (new_mode) != MODE_INT ++ || known_gt (GET_MODE_SIZE (new_mode), 4)) ++ return new_mode; ++ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++ /* Make sure that changes in assumption do not get missed. */ ++ gcc_checking_assert (for_return == 0 && new_mode == SImode ++ && !pcum->aapcs_arg_processed); ++ /* We have a named integer value that fits in a reg; if there's one available ++ then promote the value. */ ++ if (pcum->aapcs_ncrn < 8) ++ return new_mode; ++ return mode; ++} ++ ++#endif ++ + /* Target-specific selftests. */ + + #if CHECKING_P +@@ -27700,6 +28429,15 @@ aarch64_run_selftests (void) + #undef TARGET_ASM_ALIGNED_SI_OP + #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" + ++#if TARGET_MACHO ++#undef TARGET_ASM_UNALIGNED_HI_OP ++#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t" ++#undef TARGET_ASM_UNALIGNED_SI_OP ++#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t" ++#undef TARGET_ASM_UNALIGNED_DI_OP ++#define TARGET_ASM_UNALIGNED_DI_OP "\t.quad\t" ++#endif ++ + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ + hook_bool_const_tree_hwi_hwi_const_tree_true +@@ -27786,6 +28524,12 @@ aarch64_run_selftests (void) + #undef TARGET_FUNCTION_ARG_BOUNDARY + #define TARGET_FUNCTION_ARG_BOUNDARY aarch64_function_arg_boundary + ++#undef TARGET_FUNCTION_ARG_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_BOUNDARY_CA aarch64_function_arg_boundary_ca ++ ++#undef TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA aarch64_function_arg_round_boundary_ca ++ + #undef TARGET_FUNCTION_ARG_PADDING + #define TARGET_FUNCTION_ARG_PADDING aarch64_function_arg_padding + +@@ -28110,7 +28854,7 @@ aarch64_libgcc_floating_mode_supported_p + + /* The architecture reserves bits 0 and 1 so use bit 2 for descriptors. */ + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS AARCH64_CUSTOM_FUNCTION_TEST + + #undef TARGET_HARD_REGNO_NREGS + #define TARGET_HARD_REGNO_NREGS aarch64_hard_regno_nregs +@@ -28200,6 +28944,11 @@ aarch64_libgcc_floating_mode_supported_p + #undef TARGET_CONST_ANCHOR + #define TARGET_CONST_ANCHOR 0x1000000 + ++#if TARGET_MACHO ++#undef TARGET_FRAME_POINTER_REQUIRED ++#define TARGET_FRAME_POINTER_REQUIRED aarch64_darwin_frame_pointer_required ++#endif ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-aarch64.h" +diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h +index 77e40c17e35..e51780e2f90 100644 +--- a/gcc/config/aarch64/aarch64.h ++++ b/gcc/config/aarch64/aarch64.h +@@ -65,6 +65,10 @@ + #define TARGET_SIMD (AARCH64_ISA_SIMD) + #define TARGET_FLOAT (AARCH64_ISA_FP) + ++/* If this is non-zero then generated code of the object format, ABI and ++ assembler syntax used by Darwin (Mach-O) platforms. */ ++#define TARGET_MACHO 0 ++ + #define UNITS_PER_WORD 8 + + #define UNITS_PER_VREG 16 +@@ -142,6 +146,12 @@ + /* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY). */ + #define MALLOC_ABI_ALIGNMENT 128 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define AARCH64_CUSTOM_FUNCTION_TEST 4 ++ + /* Defined by the ABI */ + #define WCHAR_TYPE "unsigned int" + #define WCHAR_TYPE_SIZE 32 +@@ -944,6 +954,24 @@ typedef struct + aapcs_reg == NULL_RTX. */ + int aapcs_stack_size; /* The total size (in words, per 8 byte) of the + stack arg area so far. */ ++ ++ /* In the darwinpcs, items smaller than one word are packed onto the stack ++ naturally aligned. Unnamed parameters passed in a variadic call are, ++ however, aligned the same way as the AAPCS64. This means that we need to ++ pad the last named arg to the next parm boundary (and hence notice when ++ we are processing that arg). */ ++ int darwinpcs_stack_bytes; /* If the argument is passed on the stack, this ++ the byte-size. */ ++ int darwinpcs_sub_word_offset;/* This is the offset of this arg within a word ++ when placing smaller items for darwinpcs. */ ++ int darwinpcs_sub_word_pos; /* The next byte available within the word for ++ darwinpcs. */ ++ unsigned darwinpcs_arg_boundary; /* The computed argument boundary. */ ++ unsigned darwinpcs_arg_padding; /* The computed argument padding. */ ++ unsigned darwinpcs_n_named; /* Number of named arguments. */ ++ unsigned darwinpcs_n_args_processed; /* Processed so far. */ ++ bool named_p; /* Is this arg named? */ ++ bool last_named_p; /* Is this the last named arg? */ + bool silent_p; /* True if we should act silently, rather than + raise an error for invalid calls. */ + } CUMULATIVE_ARGS; +@@ -1242,8 +1270,13 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); + #define ASM_CPU_SPEC \ + MCPU_TO_MARCH_SPEC + ++#ifndef SUBTARGET_EXTRA_SPECS ++#define SUBTARGET_EXTRA_SPECS ++#endif ++ + #define EXTRA_SPECS \ +- { "asm_cpu_spec", ASM_CPU_SPEC } ++ { "asm_cpu_spec", ASM_CPU_SPEC }, \ ++ SUBTARGET_EXTRA_SPECS + + #define ASM_OUTPUT_POOL_EPILOGUE aarch64_asm_output_pool_epilogue + +@@ -1256,6 +1289,10 @@ extern GTY(()) tree aarch64_fp16_ptr_type_node; + bfloat16_type_node. Defined in aarch64-builtins.cc. */ + extern GTY(()) tree aarch64_bf16_ptr_type_node; + ++/* A pointer to the user-visible __float128 (on Mach-O). Defined in ++ aarch64-builtins.c. */ ++extern GTY(()) tree aarch64_float128_ptr_type_node; ++ + /* The generic unwind code in libgcc does not initialize the frame pointer. + So in order to unwind a function using a frame pointer, the very first + function that is unwound must save the frame pointer. That way the frame +diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md +index ff74e7dcef6..604469fce23 100644 +--- a/gcc/config/aarch64/aarch64.md ++++ b/gcc/config/aarch64/aarch64.md +@@ -304,6 +304,7 @@ + UNSPEC_LD1RO + UNSPEC_SALT_ADDR + UNSPECV_PATCHABLE_AREA ++ UNSPEC_MACHOPIC_OFFSET ; Common to Mach-O ports. + ]) + + (define_c_enum "unspecv" [ +@@ -850,6 +851,37 @@ + [(set_attr "type" "load_4")] + ) + ++(define_insn "prefetch_unscaled" ++ [(prefetch (match_operand:DI 0 "aarch64_unscaled_prefetch_operand" "Du") ++ (match_operand:QI 1 "const_int_operand" "") ++ (match_operand:QI 2 "const_int_operand" ""))] ++ "" ++ { ++ const char * pftype[2][4] = ++ { ++ {"prfum\\tPLDL1STRM, %0", ++ "prfum\\tPLDL3KEEP, %0", ++ "prfum\\tPLDL2KEEP, %0", ++ "prfum\\tPLDL1KEEP, %0"}, ++ {"prfum\\tPSTL1STRM, %0", ++ "prfum\\tPSTL3KEEP, %0", ++ "prfum\\tPSTL2KEEP, %0", ++ "prfum\\tPSTL1KEEP, %0"}, ++ }; ++ ++ int locality = INTVAL (operands[2]); ++ ++ gcc_assert (IN_RANGE (locality, 0, 3)); ++ ++ /* PRFUM accepts the same addresses as a 64-bit LDR so wrap ++ the address into a DImode MEM so that aarch64_print_operand knows ++ how to print it. */ ++ operands[0] = gen_rtx_MEM (DImode, operands[0]); ++ return pftype[INTVAL(operands[1])][locality]; ++ } ++ [(set_attr "type" "load_4")] ++) ++ + (define_insn "trap" + [(trap_if (const_int 1) (const_int 8))] + "" +@@ -1322,7 +1354,7 @@ + ldr\\t%s0, %1 + str\\t%w1, %0 + str\\t%s1, %0 +- adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1] ++ * return TARGET_MACHO ? \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %O1]\" : \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1]\"; + adr\\t%x0, %c1 + adrp\\t%x0, %A1 + fmov\\t%s0, %w1 +@@ -1360,7 +1392,7 @@ + ldr\\t%d0, %1 + str\\t%x1, %0 + str\\t%d1, %0 +- * return TARGET_ILP32 ? \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %L1]\" : \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %L1]\"; ++ * return TARGET_ILP32 ? (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %L1]\") : (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %L1]\"); + adr\\t%x0, %c1 + adrp\\t%x0, %A1 + fmov\\t%d0, %x1 +@@ -1799,16 +1831,16 @@ + (set_attr "arch" "*,fp")] + ) + +-(define_insn "load_pair_dw_tftf" +- [(set (match_operand:TF 0 "register_operand" "=w") +- (match_operand:TF 1 "aarch64_mem_pair_operand" "Ump")) +- (set (match_operand:TF 2 "register_operand" "=w") +- (match_operand:TF 3 "memory_operand" "m"))] ++(define_insn "load_pair_dw_" ++ [(set (match_operand:TX 0 "register_operand" "=w") ++ (match_operand:TX 1 "aarch64_mem_pair_operand" "Ump")) ++ (set (match_operand:TX2 2 "register_operand" "=w") ++ (match_operand:TX2 3 "memory_operand" "m"))] + "TARGET_SIMD + && rtx_equal_p (XEXP (operands[3], 0), + plus_constant (Pmode, + XEXP (operands[1], 0), +- GET_MODE_SIZE (TFmode)))" ++ GET_MODE_SIZE (mode)))" + "ldp\\t%q0, %q2, %z1" + [(set_attr "type" "neon_ldp_q") + (set_attr "fp" "yes")] +@@ -1849,11 +1881,11 @@ + (set_attr "arch" "*,fp")] + ) + +-(define_insn "store_pair_dw_tftf" +- [(set (match_operand:TF 0 "aarch64_mem_pair_operand" "=Ump") +- (match_operand:TF 1 "register_operand" "w")) +- (set (match_operand:TF 2 "memory_operand" "=m") +- (match_operand:TF 3 "register_operand" "w"))] ++(define_insn "store_pair_dw_" ++ [(set (match_operand:TX 0 "aarch64_mem_pair_operand" "=Ump") ++ (match_operand:TX 1 "register_operand" "w")) ++ (set (match_operand:TX2 2 "memory_operand" "=m") ++ (match_operand:TX2 3 "register_operand" "w"))] + "TARGET_SIMD && + rtx_equal_p (XEXP (operands[2], 0), + plus_constant (Pmode, +@@ -7045,7 +7077,10 @@ + (lo_sum:P (match_operand:P 1 "register_operand" "r") + (match_operand 2 "aarch64_valid_symref" "S")))] + "" +- "add\\t%0, %1, :lo12:%c2" ++ { return TARGET_MACHO ++ ? "add\\t%0, %1, %J2;" ++ : "add\\t%0, %1, :lo12:%c2"; ++ } + [(set_attr "type" "alu_imm")] + ) + +diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt +index 1d7967db9c0..cc97d7263ba 100644 +--- a/gcc/config/aarch64/aarch64.opt ++++ b/gcc/config/aarch64/aarch64.opt +@@ -158,6 +158,13 @@ Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32) + EnumValue + Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64) + ++EnumValue ++Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64) ++ ++m64 ++Target RejectNegative Alias(mabi=, darwinpcs) ++On Darwin for compatibility with other platform variants. ++ + mpc-relative-literal-loads + Target Save Var(pcrelative_literal_loads) Init(2) Save + PC relative literal loads. +diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md +index 5b20abc27e5..9c6a631c6fb 100644 +--- a/gcc/config/aarch64/constraints.md ++++ b/gcc/config/aarch64/constraints.md +@@ -168,7 +168,9 @@ + A constraint that matches a small GOT access." + (and (match_code "const,symbol_ref") + (match_test "aarch64_classify_symbolic_expression (op) +- == SYMBOL_SMALL_GOT_4G"))) ++ == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (op) ++ == SYMBOL_MO_SMALL_GOT"))) + + (define_constraint "Uss" + "@internal +@@ -505,6 +507,11 @@ + An address valid for a prefetch instruction." + (match_test "aarch64_address_valid_for_prefetch_p (op, true)")) + ++(define_address_constraint "Du" ++ "@internal ++ An address valid for a prefetch instruction with an unscaled offset." ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, true)")) ++ + (define_constraint "vgb" + "@internal + A constraint that matches an immediate offset valid for SVE LD1B +diff --git a/gcc/config/aarch64/darwin.h b/gcc/config/aarch64/darwin.h +new file mode 100644 +index 00000000000..08febf1401b +--- /dev/null ++++ b/gcc/config/aarch64/darwin.h +@@ -0,0 +1,289 @@ ++/* Target definitions for Arm64/Aarch64 running on macOS/iOS. ++ ++Copyright The GNU Toolchain Authors. ++Contributed by Iain Sandoe. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 3, or (at your option) ++any later version. ++ ++GCC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++/* Enable Mach-O bits in generic Aarch64 code. */ ++#undef TARGET_MACHO ++#define TARGET_MACHO 1 ++ ++#undef DARWIN_ARM64 ++#define DARWIN_ARM64 1 ++ ++/* This is used in generic code in darwin.cc (at present, we have no support ++ for the arm64_32 target). */ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "long int" ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE aarch64_darwin_promote_fn_mode ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE_CA ++#define TARGET_PROMOTE_FUNCTION_MODE_CA aarch64_darwin_promote_function_mode_ca ++ ++/* NOTE that arm64_32 is a valid thing and corresponds to darwinpcs ++ and TARGET_ILP32, but we are not implementing that for now. */ ++#define TARGET_OS_CPP_BUILTINS() \ ++ do { \ ++ builtin_define ("__LITTLE_ENDIAN__"); \ ++ builtin_define ("__arm64"); \ ++ builtin_define ("__arm64__"); \ ++ darwin_cpp_builtins (pfile); \ ++ } while (0) ++ ++/* In Darwin's Arm64 ABI, chars are signed. */ ++ ++#undef DEFAULT_SIGNED_CHAR ++#define DEFAULT_SIGNED_CHAR 1 ++ ++#undef LONG_DOUBLE_TYPE_SIZE ++#define LONG_DOUBLE_TYPE_SIZE 64 ++ ++/* Disable custom function descriptors on Darwin (we use heap-based ++ trampolines). */ ++#undef AARCH64_CUSTOM_FUNCTION_TEST ++#define AARCH64_CUSTOM_FUNCTION_TEST 0 ++ ++/* Non-PIE executables are forbidden by the Arm64-darwin security model; ++ remove the option from link-lines since they just produce a warning from ++ ld64 and are then ignored anyway. */ ++#undef DARWIN_NOPIE_SPEC ++#define DARWIN_NOPIE_SPEC \ ++" % ++# include ++#endif ++ ++ ++#if TARGET_MACHO ++ ++/* Default architecture to use if -mcpu=native did not detect a known CPU. */ ++#define DEFAULT_ARCH "apple-m1" ++ ++/* macOS does not have /proc/cpuinfo and needs a different approach, ++ based on sysctl. It is much simpler. */ ++ ++const char * ++host_detect_local_cpu (ATTRIBUTE_UNUSED int argc, ATTRIBUTE_UNUSED const char **argv) ++{ ++ bool arch = false; ++ bool tune = false; ++ bool cpu = false; ++ const char *res = NULL; ++ uint32_t family; ++ size_t len = sizeof(family); ++ ++ gcc_assert (argc); ++ if (!argv[0]) ++ return NULL; ++ ++ /* Are we processing -march, mtune or mcpu? */ ++ arch = strcmp (argv[0], "arch") == 0; ++ if (!arch) ++ tune = strcmp (argv[0], "tune") == 0; ++ if (!arch && !tune) ++ cpu = strcmp (argv[0], "cpu") == 0; ++ if (!arch && !tune && !cpu) ++ return NULL; ++ ++ sysctlbyname("hw.cpufamily", &family, &len, NULL, 0); ++ ++ switch (family) ++ { ++ case 0x07d34b9f: // Vortex, Tempest ++ res = "apple-a12"; ++ break; ++ case 0x573b5eec: ++ case 0x1b588bb3: // Firestorm, Icestorm ++ res = "apple-m1"; ++ break; ++ case 0xda33d83d: // Blizzard, Avalanche ++ res = "apple-m2"; ++ break; ++ case 0xfa33415e: // Ibiza (M3) ++ case 0x5f4dea93: // Lobos (M3 Pro) ++ case 0x72015832: // Palma (M3 Max) ++ res = "apple-m3"; ++ break; ++ default: ++ res = DEFAULT_ARCH; ++ } ++ ++ if (res) ++ return concat ("-m", argv[0], "=", res, NULL); ++ else ++ return NULL; ++} ++ ++#else ++ + struct aarch64_arch_extension + { + const char *ext; +@@ -493,3 +561,4 @@ not_found: + } + } + ++#endif +diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.cc b/gcc/config/aarch64/falkor-tag-collision-avoidance.cc +index 39e3f5c2d1b..9b3357f5952 100644 +--- a/gcc/config/aarch64/falkor-tag-collision-avoidance.cc ++++ b/gcc/config/aarch64/falkor-tag-collision-avoidance.cc +@@ -740,7 +740,7 @@ dump_insn_list (const rtx &t, const insn_info_list_t &insn_info, + void *unused ATTRIBUTE_UNUSED) + { + gcc_assert (dump_file); +- fprintf (dump_file, "Tag 0x%lx ::\n", INTVAL (t)); ++ fprintf (dump_file, "Tag 0x" HOST_WIDE_INT_PRINT_HEX_PURE " ::\n", INTVAL (t)); + + for (unsigned i = 0; i < insn_info.length (); i++) + dump_insn_slim (dump_file, insn_info[i]->insn); +diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md +index 86a196d3536..0708a924745 100644 +--- a/gcc/config/aarch64/iterators.md ++++ b/gcc/config/aarch64/iterators.md +@@ -316,6 +316,9 @@ + ;; TX plus V16QImode. + (define_mode_iterator TX_V16QI [TI TF TD V16QI]) + ++;; Duplicate of TX above ++(define_mode_iterator TX2 [TI TF TD]) ++ + (define_mode_iterator VTX [TI TF TD V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF]) + + ;; Advanced SIMD opaque structure modes. +diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md +index 3f5f4df8c46..4c3498dfe2c 100644 +--- a/gcc/config/aarch64/predicates.md ++++ b/gcc/config/aarch64/predicates.md +@@ -277,9 +277,24 @@ + (define_predicate "aarch64_prefetch_operand" + (match_test "aarch64_address_valid_for_prefetch_p (op, false)")) + ++(define_predicate "aarch64_unscaled_prefetch_operand" ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, false)")) ++ + (define_predicate "aarch64_valid_symref" + (match_code "const, symbol_ref, label_ref") + { ++ if (TARGET_MACHO) ++ { ++ rtx x = op; ++ rtx offset; ++ split_const (x, &x, &offset); ++ if (GET_CODE (x) == CONST) ++ x = XEXP (x, 0); ++ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SALT_ADDR) ++ x = XVECEXP (x, 0, 0); ++ if (SYMBOL_REF_P (x) && INTVAL (offset) < 0) ++ return false; ++ } + return (aarch64_classify_symbolic_expression (op) + != SYMBOL_FORCE_TO_MEM); + }) +diff --git a/gcc/config/aarch64/t-aarch64-darwin b/gcc/config/aarch64/t-aarch64-darwin +new file mode 100644 +index 00000000000..e2b8ad9237f +--- /dev/null ++++ b/gcc/config/aarch64/t-aarch64-darwin +@@ -0,0 +1,25 @@ ++# Machine description for AArch64 architecture. ++# Copyright (C) 2020 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range ++ ++# TODO - figure out what multilib provisions we should make for ++# a) arm64e ++# b) arm64_32 +diff --git a/gcc/config/darwin-c.cc b/gcc/config/darwin-c.cc +index 579b9fa9317..10d5fb12d9b 100644 +--- a/gcc/config/darwin-c.cc ++++ b/gcc/config/darwin-c.cc +@@ -555,7 +555,7 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp) + return 0; + } + +-/* Given an OS X version VERSION_STR, return it as a statically-allocated array ++/* Given an macOS version VERSION_STR, return it as a statically-allocated array + of three integers. If VERSION_STR is invalid, return NULL. + + VERSION_STR must consist of one, two, or three tokens, each separated by +@@ -612,7 +612,7 @@ parse_version (const char *version_str) + return version_array; + } + +-/* Given VERSION -- a three-component OS X version represented as an array of ++/* Given VERSION -- a three-component macOS version represented as an array of + non-negative integers -- return a statically-allocated string suitable for + the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. If VERSION + is invalid and cannot be coerced into a valid form, return NULL. +@@ -645,7 +645,7 @@ version_as_legacy_macro (const unsigned long *version) + return result; + } + +-/* Given VERSION -- a three-component OS X version represented as an array of ++/* Given VERSION -- a three-component macOS version represented as an array of + non-negative integers -- return a statically-allocated string suitable for + the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. If VERSION + is invalid, return NULL. +@@ -675,7 +675,7 @@ version_as_modern_macro (const unsigned long *version) + + /* Return the value of darwin_macosx_version_min, suitably formatted for the + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro. Values representing +- OS X 10.9 and earlier are encoded using the legacy four-character format, ++ macOS 10.9 and earlier are encoded using the legacy four-character format, + while 10.10 and later use a modern six-character format. (For example, + "10.9" produces "1090", and "10.10.1" produces "101001".) If + darwin_macosx_version_min is invalid and cannot be coerced into a valid +diff --git a/gcc/config/darwin-driver.cc b/gcc/config/darwin-driver.cc +index 9c1dcc3d794..b2f39af9f68 100644 +--- a/gcc/config/darwin-driver.cc ++++ b/gcc/config/darwin-driver.cc +@@ -268,10 +268,13 @@ darwin_driver_init (unsigned int *decoded_options_count, + bool seenX86_64 = false; + bool seenPPC = false; + bool seenPPC64 = false; ++#if !DARWIN_ARM64 ++ bool seenArm64 = false; + bool seenM32 = false; + bool seenM64 = false; + bool appendM32 = false; + bool appendM64 = false; ++#endif + const char *vers_string = NULL; + bool seen_version_min = false; + bool seen_sysroot_p = false; +@@ -296,6 +299,12 @@ darwin_driver_init (unsigned int *decoded_options_count, + seenPPC = true; + else if (!strcmp ((*decoded_options)[i].arg, "ppc64")) + seenPPC64 = true; ++ else if (!strcmp ((*decoded_options)[i].arg, "arm64")) ++#if !DARWIN_ARM64 ++ seenArm64 = true; ++#else ++ ; /* We accept the option, but don't need to act on it. */ ++#endif + else + error ("this compiler does not support %qs", + (*decoded_options)[i].arg); +@@ -309,7 +318,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + --i; + --*decoded_options_count; + break; +- ++#if !DARWIN_ARM64 + case OPT_m32: + seenM32 = true; + break; +@@ -317,6 +326,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + case OPT_m64: + seenM64 = true; + break; ++#endif + + case OPT_mmacosx_version_min_: + seen_version_min = true; +@@ -366,6 +376,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenPPC || seenPPC64) + warning (0, "this compiler does not support PowerPC" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenX86) + { + if (seenX86_64 || seenM64) +@@ -389,6 +402,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenX86 || seenX86_64) + warning (0, "this compiler does not support x86" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenPPC) + { + if (seenPPC64 || seenM64) +@@ -408,12 +424,20 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (! seenM64) /* Add -m64 if the User didn't. */ + appendM64 = true; + } ++#elif DARWIN_ARM64 ++ if (seenPPC || seenPPC64) ++ warning (0, "this compiler does not support PowerPC" ++ " (%<-arch%> option ignored)"); ++ if (seenX86 || seenX86_64) ++ warning (0, "this compiler does not support x86" ++ " (%<-arch%> option ignored)"); + #endif + + /* If there is nothing else on the command line, do not add sysroot etc. */ + if (*decoded_options_count <= 1) + return; + ++#if !DARWIN_ARM64 + if (appendM32 || appendM64) + { + ++*decoded_options_count; +@@ -423,6 +447,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER, + &(*decoded_options)[*decoded_options_count - 1]); + } ++#endif + + if (!seen_sysroot_p) + { +@@ -440,7 +465,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + } + } + +- /* We will need to know the OS X version we're trying to build for here ++ /* We will need to know the macOS version we're trying to build for here + so that we can figure out the mechanism and source for the sysroot to + be used. */ + if (!seen_version_min) +diff --git a/gcc/config/darwin-protos.h b/gcc/config/darwin-protos.h +index 9df358ee7d3..babc8883b6e 100644 +--- a/gcc/config/darwin-protos.h ++++ b/gcc/config/darwin-protos.h +@@ -86,9 +86,12 @@ extern void darwin_asm_lto_end (void); + extern void darwin_mark_decl_preserved (const char *); + + extern tree darwin_handle_kext_attribute (tree *, tree, tree, int, bool *); +-extern tree darwin_handle_weak_import_attribute (tree *node, tree name, +- tree args, int flags, +- bool * no_add_attrs); ++extern tree darwin_handle_weak_import_attribute (tree *, tree, tree, int, ++ bool *); ++extern tree darwin_handle_availability_attribute (tree *, tree, tree, ++ int, bool *); ++extern bool darwin_attribute_takes_identifier_p (const_tree); ++ + extern void machopic_output_stub (FILE *, const char *, const char *); + extern void darwin_globalize_label (FILE *, const char *); + extern void darwin_assemble_visibility (tree, int); +@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfstring_table (tree); + extern void darwin_asm_output_anchor (rtx symbol); + extern bool darwin_use_anchors_for_symbol_p (const_rtx symbol); + extern bool darwin_kextabi_p (void); ++extern bool darwin_unreachable_traps_p (void); + extern void darwin_override_options (void); + extern void darwin_patch_builtins (void); + extern void darwin_rename_builtins (void); +diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc +index 1471dbb6046..ea74ed5d7f5 100644 +--- a/gcc/config/darwin.cc ++++ b/gcc/config/darwin.cc +@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see + #include "cfghooks.h" + #include "df.h" + #include "memmodel.h" ++#include "c-family/c-common.h" /* enum rid. */ + #include "tm_p.h" + #include "stringpool.h" + #include "attribs.h" +@@ -49,6 +50,7 @@ along with GCC; see the file COPYING3. If not see + #include "optabs.h" + #include "flags.h" + #include "opts.h" ++#include "c-family/c-objc.h" /* for objc_method_decl(). */ + + /* Fix and Continue. + +@@ -102,6 +104,7 @@ int darwin_running_cxx; + + /* Some code-gen now depends on OS major version numbers (at least). */ + int generating_for_darwin_version ; ++unsigned long current_os_version = 0; + + /* For older linkers we need to emit special sections (marked 'coalesced') for + for weak or single-definition items. */ +@@ -131,7 +134,7 @@ struct { + section * darwin_sections[NUM_DARWIN_SECTIONS]; + + /* While we transition to using in-tests instead of ifdef'd code. */ +-#if !HAVE_lo_sum ++#if !HAVE_lo_sum || DARWIN_ARM64 + #define gen_macho_high(m,a,b) (a) + #define gen_macho_low(m,a,b,c) (a) + #endif +@@ -1065,6 +1068,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) + return pic_ref; + } + ++#if !DARWIN_ARM64 + /* Callbacks to output the stub or non-lazy pointers. + Each works on the item in *SLOT,if it has been used. + DATA is the FILE* for assembly output. +@@ -1220,6 +1224,7 @@ machopic_finish (FILE *out_file) + machopic_indirections->traverse_noresize + (out_file); + } ++#endif + + int + machopic_operand_p (rtx op) +@@ -2155,6 +2160,122 @@ darwin_handle_kext_attribute (tree *node, tree name, + return NULL_TREE; + } + ++enum version_components { MAJOR, MINOR, TINY }; ++ ++/* Parse a version number in x.y.z form and validate it as a macOS ++ version. Ideally, we'd put this in a common place usable by the ++ Darwin backend. */ ++ ++static bool ++parse_version (unsigned version_array[3], const char *version_str) ++{ ++ size_t version_len; ++ char *end, last = '\0', delimiter = '.', alt_delim = '_'; ++ ++ if (!version_str) ++ return false; ++ ++ /* Handle the odd situation in which we get STRING_CST which contain the ++ starting and ending quotes. */ ++ if (version_str[0] == '"') ++ { ++ version_str++; ++ version_len = strrchr (&version_str[1], '"') - version_str; ++ last = '"'; ++ } ++ else ++ version_len = strlen (version_str); ++ ++ if (version_len < 1) ++ return false; ++ ++ /* Version string must consist of digits and periods only. */ ++ if (strspn (version_str, "0123456789._") != version_len) ++ return false; ++ ++ if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1])) ++ return false; ++ ++ version_array[MAJOR] = strtoul (version_str, &end, 10); ++ if (*end == '_') ++ { ++ delimiter = '_'; ++ alt_delim = '.'; ++ } ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MAJOR] == 100000) ++ return true; ++ if (version_array[MAJOR] > 99) ++ return false; ++ ++ /* Version string must not contain adjacent delimiters. */ ++ if (*version_str == delimiter || *version_str == alt_delim) ++ return false; ++ ++ version_array[MINOR] = strtoul (version_str, &end, 10); ++ if (*end == alt_delim) ++ return false; ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MINOR] > 99) ++ return false; ++ ++ version_array[TINY] = strtoul (version_str, &end, 10); ++ if (version_array[TINY] > 99) ++ return false; ++ ++ /* Version string must contain no more than three tokens. */ ++ if (*end != last) ++ return false; ++ ++ return true; ++} ++ ++/* Turn a version expressed as maj.min.tiny into an unsigned long ++ integer representing the value used in macOS availability macros. */ ++ ++static unsigned long ++version_from_version_array (unsigned vers[3]) ++{ ++ unsigned long res = 0; ++ /* There seems to be a special "unknown" value. */ ++ if (vers[0] == 100000) ++ return 999999; ++ ++ /* Here, we follow the 'modern' / 'legacy' numbering scheme for versions. */ ++ if (vers[0] > 10 || vers[1] >= 10) ++ res = vers[0] * 10000 + vers[1] * 100 + vers[2]; ++ else ++ { ++ res = vers[0] * 100; ++ if (vers[1] > 9) ++ res += 90; ++ else ++ res += vers[1] * 10; ++ if (vers[2] > 9) ++ res += 9; ++ else ++ res += vers[1]; ++ } ++ return res; ++} ++ ++/* Extract a macOS version from an availability attribute argument. */ ++ ++static unsigned long ++os_version_from_avail_value (tree value) ++{ ++ unsigned long res = 0; ++ unsigned vers[3] = {0,0,0}; ++ if (TREE_CODE (value) == STRING_CST) ++ { ++ if (parse_version (&vers[0], TREE_STRING_POINTER (value))) ++ res = version_from_version_array (&vers[0]); ++ } ++ else ++ gcc_unreachable (); ++ return res; ++} ++ + /* Handle a "weak_import" attribute; arguments as in + struct attribute_spec.handler. */ + +@@ -2176,6 +2297,231 @@ darwin_handle_weak_import_attribute (tree *node, tree name, + return NULL_TREE; + } + ++#define NUM_AV_OSES 13 ++const char *availability_os[NUM_AV_OSES] ++ = { "macos", "macosx", "ios", "tvos", "watchos", "driverkit", "swift", ++ "maccatalyst", "macCatalyst", "xros", "visionos", "android", "zos" }; ++ ++#define NUM_AV_CLAUSES 6 ++const char *availability_clause[NUM_AV_CLAUSES] ++ = { "unavailable", "introduced", "deprecated", "obsoleted", "message", ++ "replacement" }; ++ ++/* Validate and act upon the arguments to an 'availability' attribute. */ ++ ++tree ++darwin_handle_availability_attribute (tree *node, tree name, tree args, ++ int flags, bool * no_add_attrs) ++{ ++ tree decl = *node; ++ *no_add_attrs = true; ++ ++ if (!decl || (!TYPE_P (decl) && !DECL_P (decl))) ++ { ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ else if (decl == error_mark_node) ++ return NULL_TREE; ++ ++ location_t loc = DECL_SOURCE_LOCATION (decl); ++ if (args == NULL_TREE) ++ { ++ error_at (loc, "%qE attribute requires at least one argument", ++ name); ++ return NULL_TREE; ++ } ++ else if (args == error_mark_node) ++ return NULL_TREE; ++ ++ /* The first argument must name a supported OS - although we could choose ++ to ignore any OS we don't recognise. */ ++ gcc_checking_assert (TREE_CODE (args) == TREE_LIST); ++ tree platform = TREE_VALUE (args); ++ if (platform == error_mark_node) ++ return NULL_TREE; ++ ++ gcc_checking_assert (TREE_CODE (platform) == IDENTIFIER_NODE); ++ bool platform_ok = false; ++ unsigned plat_num = 0; ++ for (; plat_num < (unsigned) NUM_AV_OSES; plat_num++) ++ if (strcmp (availability_os[plat_num], IDENTIFIER_POINTER (platform)) == 0) ++ { ++ platform_ok = true; ++ break; ++ } ++ if (!platform_ok) ++ { ++ error_at (input_location, ++ "platform %qE is not recognised for the % " ++ "attribute", platform); ++ return NULL_TREE; ++ } ++ else if (plat_num > 1) /* We only compile for macos so far. */ ++ return NULL_TREE; ++ ++ /* We might be dealing with an object or type. */ ++ tree target_decl = NULL_TREE; ++ tree type = NULL_TREE; ++ bool warn = false; ++ if (DECL_P (*node)) ++ { ++ type = TREE_TYPE (decl); ++ ++ if (TREE_CODE (decl) == TYPE_DECL ++ || TREE_CODE (decl) == PARM_DECL ++ || VAR_OR_FUNCTION_DECL_P (decl) ++ || TREE_CODE (decl) == FIELD_DECL ++ || TREE_CODE (decl) == CONST_DECL ++ /*|| objc_method_decl (TREE_CODE (decl))*/) ++ target_decl = decl; ++ else ++ warn = true; ++ } ++ else if (TYPE_P (*node)) ++ type = target_decl = *node; ++ else ++ warn = true; ++ ++ tree what = NULL_TREE; ++ if (warn) ++ { ++ if (type && TYPE_NAME (type)) ++ { ++ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (*node); ++ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (type))) ++ what = DECL_NAME (TYPE_NAME (type)); ++ } ++ if (what) ++ warning (OPT_Wattributes, "%qE attribute ignored for %qE", name, what); ++ else ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ ++ /* Now we have to parse the availability clauses. */ ++ tree msg = NULL_TREE; ++ tree replacement = NULL_TREE; ++ bool unavailable = false; ++ unsigned introduced = 1000; ++ unsigned deprecated = current_os_version + 1; ++ unsigned obsoleted = current_os_version + 1; ++ for (tree arg = TREE_CHAIN (args); arg; arg = TREE_CHAIN (arg)) ++ { ++ tree clause_name = TREE_VALUE (arg); ++ tree clause_value = TREE_PURPOSE (arg); ++ if (clause_name == error_mark_node ++ || clause_value == error_mark_node) ++ continue; ++ unsigned clause_num = 0; ++ for (; clause_num < (unsigned) NUM_AV_CLAUSES; clause_num++) ++ if (strcmp (availability_clause[clause_num], ++ IDENTIFIER_POINTER (clause_name)) == 0) ++ break; ++ switch (clause_num) ++ { ++ default: ++ error_at (input_location, ++ "clause %qE is not recognised for the % " ++ "attribute", clause_name); ++ break; ++ case 0: ++ unavailable = true; ++ break; ++ case 1: ++ case 2: ++ case 3: ++ if (!clause_value) ++ error_at (input_location, "%<%E=%> requires a value", clause_name); ++ else ++ { ++ unsigned version = os_version_from_avail_value (clause_value); ++ if (version == 0) ++ error_at (input_location, "the value %qE provided to %qE is " ++ "not a valid OS version", clause_value, clause_name); ++ else if (clause_num == 1) ++ introduced = version; ++ else if (clause_num == 2) ++ deprecated = version; ++ else if (clause_num == 3) ++ obsoleted = version; ++ } ++ break; ++ case 4: ++ case 5: ++ if (!clause_value || TREE_CODE (clause_value) != STRING_CST) ++ error_at (input_location, "%<%E=%> requires a string", clause_name); ++ else if (clause_num == 4) ++ msg = clause_value; ++ else ++ replacement = clause_value; ++ break; ++ } ++ } ++ /* Now figure out what to do. */ ++ tree maybe_text = NULL_TREE; ++ if (replacement) ++ maybe_text = tree_cons (NULL_TREE, replacement, NULL_TREE); ++ else if (msg) ++ maybe_text = tree_cons (NULL_TREE, msg, NULL_TREE); ++ ++ if (unavailable || current_os_version >= obsoleted) ++ { ++ TREE_UNAVAILABLE (*node) = true; ++ /* We do not handle the availability attribute at diagnostics-time, so ++ if we want the informational messages, then attach them to additional ++ attributes for the deprecation or unavailability. TODO; maybe we can ++ fabricate the composite here. */ ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("unavailable"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version > deprecated) ++ { ++ TREE_DEPRECATED (*node) = true; ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("deprecated"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version < introduced) ++ *no_add_attrs = false; ++ return NULL_TREE; ++} ++ ++bool ++darwin_attribute_takes_identifier_p (const_tree attr_id) ++{ ++ return is_attribute_p ("availability", attr_id); ++} ++ + /* Emit a label for an FDE, making it global and/or weak if appropriate. + The third parameter is nonzero if this is for exception handling. + The fourth parameter is nonzero if this is just a placeholder for an +@@ -2267,6 +2613,8 @@ darwin_emit_except_table_label (FILE *file) + rtx + darwin_make_eh_symbol_indirect (rtx orig, bool ARG_UNUSED (pubvis)) + { ++ if (DARWIN_ARM64) ++ return orig; + if (DARWIN_PPC == 0 && TARGET_64BIT) + return orig; + +@@ -3115,7 +3463,12 @@ darwin_file_end (void) + fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags); + } + ++#if !DARWIN_ARM64 + machopic_finish (asm_out_file); ++#else ++ gcc_checking_assert (!machopic_indirections); ++#endif ++ + if (flag_apple_kext) + { + /* These sections are only used for kernel code. */ +@@ -3291,6 +3644,13 @@ darwin_kextabi_p (void) { + return flag_apple_kext; + } + ++/* True, iff we want to map __builtin_unreachable to a trap. */ ++ ++bool ++darwin_unreachable_traps_p (void) { ++ return darwin_unreachable_traps; ++} ++ + void + darwin_override_options (void) + { +@@ -3311,7 +3671,14 @@ darwin_override_options (void) + generating_for_darwin_version = 8; + + /* Earlier versions are not specifically accounted, until required. */ ++ unsigned vers[3] = {0,0,0}; ++ if (!parse_version (vers, darwin_macosx_version_min)) ++ error_at (UNKNOWN_LOCATION, "how did we get a bad OS version? (%s)", ++ darwin_macosx_version_min); ++ current_os_version = version_from_version_array (vers); + } ++ else ++ current_os_version = 1058; + + /* Some codegen needs to account for the capabilities of the target + linker. */ +@@ -3554,6 +3921,19 @@ darwin_override_options (void) + + /* The c_dialect...() macros are not available to us here. */ + darwin_running_cxx = (strstr (lang_hooks.name, "C++") != 0); ++ ++ /* Allow the clang extension to permit const vars used in array sizes. */ ++ if (!OPTION_SET_P (flag_allow_const_var_array_size)) ++ flag_allow_const_var_array_size = true; ++ ++ /* We need to consume attributes on function definitions from the the SDK ++ headers. */ ++ if (!OPTION_SET_P (flag_allow_ext_attr_placement)) ++ flag_allow_ext_attr_placement = true; ++ ++ /* We need to consume some C keywords in C++. */ ++ if (!OPTION_SET_P (flag_allow_extra_keywords)) ++ flag_allow_extra_keywords = true; + } + + #if DARWIN_PPC +diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h +index 2ea034c06d8..0cc6f021365 100644 +--- a/gcc/config/darwin.h ++++ b/gcc/config/darwin.h +@@ -1,4 +1,4 @@ +-/* Target definitions for Darwin (Mac OS X) systems. ++/* Target definitions for Darwin (macOS) systems. + Copyright (C) 1989-2023 Free Software Foundation, Inc. + Contributed by Apple Computer Inc. + +@@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define CONFIG_DARWIN_H + + /* The definitions in this file are common to all processor types +- running Darwin, which is the kernel for Mac OS X. Darwin is ++ running Darwin, which is the kernel for macOS. Darwin is + basically a BSD user layer laid over a Mach kernel, then evolved + for many years (at NeXT) in parallel with other Unix systems. So + while the runtime is a somewhat idiosyncratic Mach-based thing, +@@ -42,6 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #define DARWIN_X86 0 + #define DARWIN_PPC 0 ++#define DARWIN_ARM64 0 + + #define OBJECT_FORMAT_MACHO 1 + +@@ -133,10 +134,9 @@ extern GTY(()) int darwin_ms_struct; + cases where these driver opts are used multiple times, or to control + operations on more than one command (e.g. dynamiclib). These are handled + specially and we then add %= 10.7 mmacosx-version-min= -no_pie) }" + + #define DARWIN_CC1_SPEC \ +- "% 10.11 mmacosx-version-min= -lgcc_s.1.1)" ++# define DARWIN_SHARED_WEAK_ADDS \ ++"%{%:version-compare(>= 10.11 mmacosx-version-min= -lemutls_w): \ ++ " DARWIN_HEAP_T_LIB "}" ++#endif ++ ++ ++/* We might elect to add a path even when this compiler does not use embedded ++ run paths, so that we can use libraries from an alternate compiler that is ++ using embedded runpaths. */ ++#if DARWIN_DO_EXTRA_RPATH ++# define DARWIN_EXTRA_RPATH \ ++"%{!r:%{!nostdlib:%{!nodefaultrpaths:\ ++ %:version-compare(>= 10.5 mmacosx-version-min= -rpath) \ ++ %:version-compare(>= 10.5 mmacosx-version-min= " DARWIN_ADD_RPATH ") \ ++ }}}" ++#else ++# define DARWIN_EXTRA_RPATH "" ++#endif + + #define SUBSUBTARGET_OVERRIDE_OPTIONS \ + do { \ +@@ -341,7 +379,8 @@ extern GTY(()) int darwin_ms_struct; + */ + + #define DARWIN_NOCOMPACT_UNWIND \ +-" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) " ++"%{!fuse-ld=lld: \ ++ %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}" + + /* In Darwin linker specs we can put -lcrt0.o and ld will search the library + path for crt0.o or -lcrtx.a and it will search for libcrtx.a. As for +@@ -361,10 +400,12 @@ extern GTY(()) int darwin_ms_struct; + #define LINK_COMMAND_SPEC_A \ + "%{!c:%{!E:%{!S:%{!M:%{!MM:%{!fsyntax-only:%{!fdump=*: \ + %(linker)" \ ++ DARWIN_LD_DEMANGLE \ + LINK_PLUGIN_SPEC \ + "%{flto*:% 10.6 mmacosx-version-min= -lgcc_eh); \ + shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ +- %:version-compare(!> 10.11 mmacosx-version-min= -lgcc_s.1.1) \ ++ " DARWIN_SHARED_LIBGCC " \ + %:version-compare(!> 10.3.9 mmacosx-version-min= -lgcc_eh) \ + %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ +@@ -525,18 +568,19 @@ extern GTY(()) int darwin_ms_struct; + + #define DARWIN_WEAK_CRTS \ + "%{static-libgcc|static: \ +- %:version-compare(>= 10.6 mmacosx-version-min= -lemutls_w) ; \ +- shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ +- %:version-compare(>= 10.11 mmacosx-version-min= -lemutls_w) ; \ +- : -lemutls_w \ ++ %{%:version-compare(>= 10.6 mmacosx-version-min= -lemutls_w): \ ++ " DARWIN_HEAP_T_LIB "} ; \ ++ shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: " \ ++ DARWIN_SHARED_WEAK_ADDS " ; \ ++ : -lemutls_w " DARWIN_HEAP_T_LIB " \ + }" + + /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ +-"%{dynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \ +- %{!dynamiclib:%{bundle:%(darwin_bundle1)} \ ++"%{dynamiclib|shared: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \ ++ %{!dynamiclib:%{!shared:%{bundle:%(darwin_bundle1)} \ + %{!bundle:%{pg:%{static:-lgcrt0.o} \ + %{!static:%{object:-lgcrt0.o} \ + %{!object:%{preload:-lgcrt0.o} \ +@@ -547,8 +591,8 @@ extern GTY(()) int darwin_ms_struct; + %{!static:%{object:-lcrt0.o} \ + %{!object:%{preload:-lcrt0.o} \ + %{!preload: %(darwin_crt1) \ +- %(darwin_crt2)}}}}}} \ +- %(darwin_crt3) % 10.5 mmacosx-version-min= -lcrt1.o) \ +@@ -585,6 +630,16 @@ extern GTY(()) int darwin_ms_struct; + "%{!static:%:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \ + %{fgnu-tm: -lcrttms.o}}" + ++#if DARWIN_AT_RPATH ++/* A default rpath, that picks up dependent libraries installed in the same ++ director as one being loaded. */ ++#define DARWIN_RPATH_SPEC \ ++ "%:version-compare(>= 10.5 mmacosx-version-min= -rpath) \ ++ %{%:version-compare(>= 10.5 mmacosx-version-min= @loader_path): %P }" ++#else ++#define DARWIN_RPATH_SPEC "" ++#endif ++ + #ifdef HAVE_AS_MMACOSX_VERSION_MIN_OPTION + /* Emit macosx version (but only major). */ + #define ASM_MMACOSX_VERSION_MIN_SPEC \ +@@ -603,6 +658,8 @@ extern GTY(()) int darwin_ms_struct; + #define ASM_OPTIONS "%{v} %{w:-W} %{I*}" + #endif + ++#define AS_NEEDS_DASH_FOR_PIPED_INPUT ++ + /* Default Darwin ASM_SPEC, very simple. */ + #define ASM_SPEC \ + "%{static} -arch %(darwin_arch) " \ +@@ -932,7 +989,12 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; + { "apple_kext_compatibility", 0, 0, false, true, false, false, \ + darwin_handle_kext_attribute, NULL }, \ + { "weak_import", 0, 0, true, false, false, false, \ +- darwin_handle_weak_import_attribute, NULL } ++ darwin_handle_weak_import_attribute, NULL }, \ ++ { "availability", 0, -1, true, false, false, false, \ ++ darwin_handle_availability_attribute, NULL } ++ ++#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P ++#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P darwin_attribute_takes_identifier_p + + /* Make local constant labels linker-visible, so that if one follows a + weak_global constant, ld64 will be able to separate the atoms. */ +@@ -1180,6 +1242,10 @@ void add_framework_path (char *); + #define TARGET_N_FORMAT_TYPES 1 + #define TARGET_FORMAT_TYPES darwin_additional_format_types + ++/* We want __builtin_unreachable to be expanded as a trap instruction. */ ++#undef TARGET_UNREACHABLE_SHOULD_TRAP ++#define TARGET_UNREACHABLE_SHOULD_TRAP darwin_unreachable_traps_p ++ + #ifndef USED_FOR_TARGET + extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **); + #define GCC_DRIVER_HOST_INITIALIZATION \ +diff --git a/gcc/config/darwin.opt b/gcc/config/darwin.opt +index d655aaef2fb..501a53b349e 100644 +--- a/gcc/config/darwin.opt ++++ b/gcc/config/darwin.opt +@@ -91,6 +91,10 @@ mtarget-linker + Target RejectNegative Joined Separate Var(darwin_target_linker) Init(LD64_VERSION) + -mtarget-linker Specify that ld64 is the toolchain linker for the current invocation. + ++munreachable-traps ++Target Var(darwin_unreachable_traps) Init(1) ++When set (the default) this makes __builtin_unreachable render as a trap. ++ + ; Driver options. + + all_load +@@ -241,6 +245,10 @@ nodefaultexport + Driver RejectNegative + Do not add a default symbol exports to modules or dynamic libraries. + ++nodefaultrpaths ++Driver RejectNegative ++Do not add default run paths (for the compiler library directories) to executables, modules or dynamic libraries. ++ + nofixprebinding + Driver RejectNegative + (Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an executable. +@@ -377,6 +385,10 @@ unexported_symbols_list + Driver RejectNegative Separate + -unexported_symbols_list Do not export the global symbols listed in . + ++weak_framework ++Driver RejectNegative Separate ++-weak_framework Make a weak link to the specified framework. ++ + weak_reference_mismatches + Driver RejectNegative Separate + -weak_reference_mismatches Specifies what to do if a symbol import conflicts between file (weak in one and not in another) the default is to treat the symbol as non-weak. +diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h +index 588bd669bdd..657ea470683 100644 +--- a/gcc/config/i386/darwin.h ++++ b/gcc/config/i386/darwin.h +@@ -121,6 +121,9 @@ along with GCC; see the file COPYING3. If not see + #define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC + #endif + ++#undef DARWIN_HEAP_T_LIB ++#define DARWIN_HEAP_T_LIB " -lheapt_w " ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ +@@ -308,3 +311,9 @@ along with GCC; see the file COPYING3. If not see + #define CLEAR_INSN_CACHE(beg, end) \ + extern void sys_icache_invalidate(void *start, size_t len); \ + sys_icache_invalidate ((beg), (size_t)((end)-(beg))) ++ ++/* Disable custom function descriptors for Darwin when we have off-stack ++ trampolines. */ ++#undef X86_CUSTOM_FUNCTION_TEST ++#define X86_CUSTOM_FUNCTION_TEST \ ++ (flag_trampolines && flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ? 0 : 1 +diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc +index 395eeab7006..9b8ad8aa6c8 100644 +--- a/gcc/config/i386/i386.cc ++++ b/gcc/config/i386/i386.cc +@@ -25305,7 +25305,7 @@ ix86_libgcc_floating_mode_supported_p + #define TARGET_HARD_REGNO_SCRATCH_OK ix86_hard_regno_scratch_ok + + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 1 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS X86_CUSTOM_FUNCTION_TEST + + #undef TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID + #define TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID ix86_addr_space_zero_address_valid +diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h +index c147ff8732c..e07345727cc 100644 +--- a/gcc/config/i386/i386.h ++++ b/gcc/config/i386/i386.h +@@ -760,6 +760,12 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + /* Minimum allocation boundary for the code of a function. */ + #define FUNCTION_BOUNDARY 8 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define X86_CUSTOM_FUNCTION_TEST 1 ++ + /* C++ stores the virtual bit in the lowest bit of function pointers. */ + #define TARGET_PTRMEMFUNC_VBIT_LOCATION ptrmemfunc_vbit_in_pfn + +diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h +index 4d5d6f6d5a8..3a2e480ace6 100644 +--- a/gcc/config/rs6000/darwin.h ++++ b/gcc/config/rs6000/darwin.h +@@ -98,7 +98,7 @@ + Include libmx when targeting Darwin 7.0 and above, but before libSystem, + since the functions are actually in libSystem but for 7.x compatibility + we want them to be looked for in libmx first. +- Include libSystemStubs when compiling against 10.3 - 10.5 SDKs (we assume ++ Include libSystemStubs when compiling against 10.3 - 10.6 SDKs (we assume + this is the case when targetting these) - but not for 64-bit long double. + Don't do either for m64, the library is either a dummy or non-existent. + */ +@@ -107,12 +107,15 @@ + #define LIB_SPEC \ + "%{!static: \ + %{!m64:%{!mlong-double-64: \ +- %{pg:%:version-compare(>< 10.3 10.5 mmacosx-version-min= -lSystemStubs_profile)} \ +- %{!pg:%:version-compare(>< 10.3 10.5 mmacosx-version-min= -lSystemStubs)} \ ++ %{pg:%:version-compare(>< 10.3 10.7 mmacosx-version-min= -lSystemStubs_profile)} \ ++ %{!pg:%:version-compare(>< 10.3 10.7 mmacosx-version-min= -lSystemStubs)} \ + %:version-compare(>< 10.3 10.4 mmacosx-version-min= -lmx)}} \ + -lSystem \ + }" + ++#undef DARWIN_HEAP_T_LIB ++#define DARWIN_HEAP_T_LIB " " ++ + /* We want -fPIC by default, unless we're using -static to compile for + the kernel or some such. The "-faltivec" option should have been + called "-maltivec" all along. */ +diff --git a/gcc/configure b/gcc/configure +index 6cb58cd6ec6..8f954fab9f7 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -632,10 +632,10 @@ ac_includes_default="\ + ac_subst_vars='LTLIBOBJS + LIBOBJS + CET_HOST_FLAGS +-NO_PIE_FLAG +-NO_PIE_CFLAGS +-enable_default_pie ++LD_PICFLAG + PICFLAG ++enable_default_pie ++enable_host_pie + enable_host_shared + enable_plugin + pluginlibs +@@ -735,11 +735,15 @@ ORIGINAL_NM_FOR_TARGET + gcc_cv_nm + ORIGINAL_LD_GOLD_FOR_TARGET + ORIGINAL_LD_BFD_FOR_TARGET ++ORIGINAL_CLASSIC_LD_FOR_TARGET ++ORIGINAL_LLD_FOR_TARGET + ORIGINAL_LD_FOR_TARGET + ORIGINAL_PLUGIN_LD_FOR_TARGET + gcc_cv_ld + ORIGINAL_AS_FOR_TARGET + gcc_cv_as ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_fast_install + objdir + OTOOL64 +@@ -1004,6 +1008,8 @@ enable_static + with_pic + enable_fast_install + enable_libtool_lock ++enable_darwin_at_rpath ++with_darwin_extra_rpath + enable_ld + enable_gold + with_plugin_ld +@@ -1029,6 +1035,7 @@ enable_link_serialization + enable_version_specific_runtime_libs + enable_plugin + enable_host_shared ++enable_host_pie + enable_libquadmath_support + with_linker_hash_style + with_diagnostics_color +@@ -1742,6 +1749,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-gnu-indirect-function +@@ -1796,6 +1806,7 @@ Optional Features: + in a compiler-specific directory + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --disable-libquadmath-support + disable libquadmath support for Fortran + --enable-default-pie enable Position Independent Executable as default +@@ -1860,6 +1871,9 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-darwin-extra-rpath=[ARG] ++ Specify a runpath directory, additional to those ++ provided by the compiler + --with-plugin-ld=[ARG] specify the plugin linker + --with-glibc-version=M.N + assume GCC used with glibc version M.N or later +@@ -3759,20 +3773,19 @@ gcc_gxx_libcxx_include_dir= + + # Check whether --with-gxx-libcxx-include-dir was given. + if test "${with_gxx_libcxx_include_dir+set}" = set; then : +- withval=$with_gxx_libcxx_include_dir; case "${withval}" in +-yes) as_fn_error $? "bad value ${withval} given for libc++ include directory" "$LINENO" 5 ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac ++ withval=$with_gxx_libcxx_include_dir; gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir + fi + + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -3780,16 +3793,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. + gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. ++ gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[1-9]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -16377,7 +16394,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -18082,6 +18099,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -18099,9 +18159,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -19907,7 +19971,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19910 "configure" ++#line 19974 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -20013,7 +20077,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 20016 "configure" ++#line 20080 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -20889,6 +20953,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -20906,12 +21013,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -23282,6 +23397,35 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++DARWIN_DO_EXTRA_RPATH=0 ++ ++# Check whether --with-darwin-extra-rpath was given. ++if test "${with_darwin_extra_rpath+set}" = set; then : ++ withval=$with_darwin_extra_rpath; if test x"$withval" != x; then ++ DARWIN_ADD_RPATH="$withval" ++ DARWIN_DO_EXTRA_RPATH=1 ++ fi ++fi ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define DARWIN_DO_EXTRA_RPATH $DARWIN_DO_EXTRA_RPATH ++_ACEOF ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define DARWIN_ADD_RPATH "$DARWIN_ADD_RPATH" ++_ACEOF ++ ++ + # Identify the assembler which will work hand-in-glove with the newly + # built GCC, so that we can examine its features. This is the assembler + # which will be driven by the driver program. +@@ -23558,6 +23702,14 @@ fi + $as_echo "$gold_non_default" >&6; } + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic ++ ++ + + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; +@@ -30675,6 +30827,7 @@ if test x"$ld64_flag" = x"yes"; then + gcc_cv_ld64_export_dynamic=0 + gcc_cv_ld64_platform_version=0 + gcc_cv_ld64_macos_version_min=0 ++ gcc_cv_ld64_demangle=0 + + if test "$build" = "$host"; then + darwin_try_test=1 +@@ -30698,6 +30851,9 @@ $as_echo_n "checking ld64 specified version... " >&6; } + gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_major" >&5 + $as_echo "$gcc_cv_ld64_major" >&6; } ++ if test "$gcc_cv_ld64_major" -ge 97; then ++ gcc_cv_ld64_demangle=1 ++ fi + if test "$gcc_cv_ld64_major" -ge 236; then + gcc_cv_ld64_export_dynamic=1 + fi +@@ -30717,6 +30873,15 @@ $as_echo_n "checking linker version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_version" >&5 + $as_echo "$gcc_cv_ld64_version" >&6; } + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -demangle support" >&5 ++$as_echo_n "checking linker for -demangle support... " >&6; } ++ gcc_cv_ld64_demangle=1 ++ if $gcc_cv_ld -demangle < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then ++ gcc_cv_ld64_demangle=0 ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_demangle" >&5 ++$as_echo "$gcc_cv_ld64_demangle" >&6; } ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -export_dynamic support" >&5 + $as_echo_n "checking linker for -export_dynamic support... " >&6; } + gcc_cv_ld64_export_dynamic=1 +@@ -30754,6 +30919,12 @@ _ACEOF + fi + + ++cat >>confdefs.h <<_ACEOF ++#define LD64_HAS_DEMANGLE $gcc_cv_ld64_demangle ++_ACEOF ++ ++ ++ + cat >>confdefs.h <<_ACEOF + #define LD64_HAS_EXPORT_DYNAMIC $gcc_cv_ld64_export_dynamic + _ACEOF +@@ -32305,13 +32476,17 @@ fi + # Enable --enable-host-shared + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC +-else +- PICFLAG= ++ enableval=$enable_host_shared; + fi + + + ++# Enable --enable-host-pie ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ + + + # Check whether --enable-libquadmath-support was given. +@@ -32465,10 +32640,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_no_fpie" >&5 + $as_echo "$gcc_cv_c_no_fpie" >&6; } +-if test "$gcc_cv_c_no_fpie" = "yes"; then +- NO_PIE_CFLAGS="-fno-PIE" +-fi +- + + # Check if -no-pie works. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -no-pie option" >&5 +@@ -32493,11 +32664,28 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_no_pie" >&5 + $as_echo "$gcc_cv_no_pie" >&6; } +-if test "$gcc_cv_no_pie" = "yes"; then +- NO_PIE_FLAG="-no-pie" ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++elif test x$gcc_cv_c_no_fpie = xyes; then ++ PICFLAG=-fno-PIE ++else ++ PICFLAG= ++fi ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++elif test x$gcc_cv_no_pie = xyes; then ++ LD_PICFLAG=-no-pie ++else ++ LD_PICFLAG= + fi + + ++ ++ + # Enable Intel CET on Intel CET enabled host if jit is enabled. + # Check whether --enable-cet was given. + if test "${enable_cet+set}" = set; then : +@@ -32980,6 +33168,10 @@ LTLIBOBJS=$ac_ltlibobjs + + + ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 8382b4e7b3f..a4e7dcedb2e 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -235,18 +235,17 @@ gcc_gxx_libcxx_include_dir= + AC_ARG_WITH(gxx-libcxx-include-dir, + [AS_HELP_STRING([--with-gxx-libcxx-include-dir=DIR], + [specifies directory to find libc++ header files])], +-[case "${withval}" in +-yes) AC_MSG_ERROR(bad value ${withval} given for libc++ include directory) ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac]) ++[gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir]) + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -254,16 +253,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. ++ gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. + gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[[1-9]]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -2640,6 +2643,21 @@ AC_PROG_LIBTOOL + AC_SUBST(objdir) + AC_SUBST(enable_fast_install) + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++DARWIN_DO_EXTRA_RPATH=0 ++AC_ARG_WITH(darwin-extra-rpath, ++[AS_HELP_STRING( ++ [[--with-darwin-extra-rpath=[ARG]]], ++ [Specify a runpath directory, additional to those provided by the compiler])], ++[if test x"$withval" != x; then ++ DARWIN_ADD_RPATH="$withval" ++ DARWIN_DO_EXTRA_RPATH=1 ++ fi]) ++AC_DEFINE_UNQUOTED(DARWIN_DO_EXTRA_RPATH, $DARWIN_DO_EXTRA_RPATH, ++ [Should add an extra runpath directory]) ++AC_DEFINE_UNQUOTED(DARWIN_ADD_RPATH, "$DARWIN_ADD_RPATH", ++ [Specify a runpath directory, additional to those provided by the compiler]) ++ + # Identify the assembler which will work hand-in-glove with the newly + # built GCC, so that we can examine its features. This is the assembler + # which will be driven by the driver program. +@@ -2812,7 +2830,15 @@ fi + AC_MSG_RESULT($gold_non_default) + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic + AC_SUBST(ORIGINAL_LD_FOR_TARGET) ++AC_SUBST(ORIGINAL_LLD_FOR_TARGET) ++AC_SUBST(ORIGINAL_CLASSIC_LD_FOR_TARGET) + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; + *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; +@@ -4808,7 +4834,7 @@ foo: nop + gcc_cv_as_mllvm_x86_pad_for_align, + [-mllvm -x86-pad-for-align=false], [.text],, + [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1, +- [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])]) ++ [Define if your macOS assembler supports -mllvm -x86-pad-for-align=false.])]) + ;; + esac + +@@ -6289,6 +6315,7 @@ if test x"$ld64_flag" = x"yes"; then + gcc_cv_ld64_export_dynamic=0 + gcc_cv_ld64_platform_version=0 + gcc_cv_ld64_macos_version_min=0 ++ gcc_cv_ld64_demangle=0 + + if test "$build" = "$host"; then + darwin_try_test=1 +@@ -6310,6 +6337,9 @@ if test x"$ld64_flag" = x"yes"; then + AC_MSG_CHECKING(ld64 specified version) + gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'` + AC_MSG_RESULT($gcc_cv_ld64_major) ++ if test "$gcc_cv_ld64_major" -ge 97; then ++ gcc_cv_ld64_demangle=1 ++ fi + if test "$gcc_cv_ld64_major" -ge 236; then + gcc_cv_ld64_export_dynamic=1 + fi +@@ -6327,6 +6357,13 @@ if test x"$ld64_flag" = x"yes"; then + fi + AC_MSG_RESULT($gcc_cv_ld64_version) + ++ AC_MSG_CHECKING(linker for -demangle support) ++ gcc_cv_ld64_demangle=1 ++ if $gcc_cv_ld -demangle < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then ++ gcc_cv_ld64_demangle=0 ++ fi ++ AC_MSG_RESULT($gcc_cv_ld64_demangle) ++ + AC_MSG_CHECKING(linker for -export_dynamic support) + gcc_cv_ld64_export_dynamic=1 + if $gcc_cv_ld -export_dynamic < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then +@@ -6354,6 +6391,9 @@ if test x"$ld64_flag" = x"yes"; then + [Define to ld64 version.]) + fi + ++ AC_DEFINE_UNQUOTED(LD64_HAS_DEMANGLE, $gcc_cv_ld64_demangle, ++ [Define to 1 if ld64 supports '-demangle'.]) ++ + AC_DEFINE_UNQUOTED(LD64_HAS_EXPORT_DYNAMIC, $gcc_cv_ld64_export_dynamic, + [Define to 1 if ld64 supports '-export_dynamic'.]) + +@@ -7507,11 +7547,14 @@ fi + # Enable --enable-host-shared + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) + AC_SUBST(enable_host_shared) +-AC_SUBST(PICFLAG) + ++# Enable --enable-host-pie ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) + + AC_ARG_ENABLE(libquadmath-support, + [AS_HELP_STRING([--disable-libquadmath-support], +@@ -7633,10 +7676,6 @@ AC_CACHE_CHECK([for -fno-PIE option], + [gcc_cv_c_no_fpie=yes], + [gcc_cv_c_no_fpie=no]) + CXXFLAGS="$saved_CXXFLAGS"]) +-if test "$gcc_cv_c_no_fpie" = "yes"; then +- NO_PIE_CFLAGS="-fno-PIE" +-fi +-AC_SUBST([NO_PIE_CFLAGS]) + + # Check if -no-pie works. + AC_CACHE_CHECK([for -no-pie option], +@@ -7647,10 +7686,27 @@ AC_CACHE_CHECK([for -no-pie option], + [gcc_cv_no_pie=yes], + [gcc_cv_no_pie=no]) + LDFLAGS="$saved_LDFLAGS"]) +-if test "$gcc_cv_no_pie" = "yes"; then +- NO_PIE_FLAG="-no-pie" ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++elif test x$gcc_cv_c_no_fpie = xyes; then ++ PICFLAG=-fno-PIE ++else ++ PICFLAG= + fi +-AC_SUBST([NO_PIE_FLAG]) ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++elif test x$gcc_cv_no_pie = xyes; then ++ LD_PICFLAG=-no-pie ++else ++ LD_PICFLAG= ++fi ++ ++AC_SUBST([PICFLAG]) ++AC_SUBST([LD_PICFLAG]) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. + GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) +diff --git a/gcc/coretypes.h b/gcc/coretypes.h +index ca8837cef67..7e022a427c4 100644 +--- a/gcc/coretypes.h ++++ b/gcc/coretypes.h +@@ -199,6 +199,12 @@ enum tls_model { + TLS_MODEL_LOCAL_EXEC + }; + ++/* Types of trampoline implementation. */ ++enum trampoline_impl { ++ TRAMPOLINE_IMPL_STACK, ++ TRAMPOLINE_IMPL_HEAP ++}; ++ + /* Types of ABI for an offload compiler. */ + enum offload_abi { + OFFLOAD_ABI_UNSET, +diff --git a/gcc/cp/cp-lang.cc b/gcc/cp/cp-lang.cc +index 2f541460c4a..84200a9a04a 100644 +--- a/gcc/cp/cp-lang.cc ++++ b/gcc/cp/cp-lang.cc +@@ -121,6 +121,15 @@ objcp_tsubst_copy_and_build (tree /*t*/, + return NULL_TREE; + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ cp_register_features (); ++} ++ + static const char * + cxx_dwarf_name (tree t, int verbosity) + { +diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc +index 93b027b80ce..10b9b35a1c0 100644 +--- a/gcc/cp/cp-objcp-common.cc ++++ b/gcc/cp/cp-objcp-common.cc +@@ -23,10 +23,153 @@ along with GCC; see the file COPYING3. If not see + #include "coretypes.h" + #include "cp-tree.h" + #include "cp-objcp-common.h" ++#include "c-family/c-common.h" + #include "dwarf2.h" + #include "stringpool.h" + #include "contracts.h" + ++/* Class to determine whether a given C++ language feature is available. ++ Used to implement __has_{feature,extension}. */ ++ ++struct cp_feature_selector ++{ ++ enum ++ { ++ DIALECT, ++ FLAG ++ } kind; ++ ++ enum class result ++ { ++ NONE, ++ EXT, ++ FEAT ++ }; ++ ++ union ++ { ++ const int *enable_flag; ++ struct { ++ enum cxx_dialect feat; ++ enum cxx_dialect ext; ++ } dialect; ++ }; ++ ++ constexpr cp_feature_selector (const int *flag) ++ : kind (FLAG), enable_flag (flag) {} ++ constexpr cp_feature_selector (enum cxx_dialect feat, ++ enum cxx_dialect ext) ++ : kind (DIALECT), dialect{feat, ext} {} ++ constexpr cp_feature_selector (enum cxx_dialect feat) ++ : cp_feature_selector (feat, feat) {} ++ ++ inline result has_feature () const; ++}; ++ ++/* Check whether this language feature is available as a feature, ++ extension, or not at all. */ ++ ++cp_feature_selector::result ++cp_feature_selector::has_feature () const ++{ ++ switch (kind) ++ { ++ case DIALECT: ++ if (cxx_dialect >= dialect.feat) ++ return result::FEAT; ++ else if (cxx_dialect >= dialect.ext) ++ return result::EXT; ++ else ++ return result::NONE; ++ case FLAG: ++ return *enable_flag ? result::FEAT : result::NONE; ++ } ++ ++ gcc_unreachable (); ++} ++ ++/* Information about a C++ language feature which can be queried ++ through __has_{feature,extension}. IDENT is the name of the feature, ++ and SELECTOR encodes how to compute whether the feature is available. */ ++ ++struct cp_feature_info ++{ ++ const char *ident; ++ cp_feature_selector selector; ++}; ++ ++/* Table of features for __has_{feature,extension}. */ ++ ++static constexpr cp_feature_info cp_feature_table[] = ++{ ++ { "cxx_exceptions", &flag_exceptions }, ++ { "cxx_rtti", &flag_rtti }, ++ { "cxx_access_control_sfinae", { cxx11, cxx98 } }, ++ { "cxx_alias_templates", cxx11 }, ++ { "cxx_alignas", cxx11 }, ++ { "cxx_alignof", cxx11 }, ++ { "cxx_attributes", cxx11 }, ++ { "cxx_constexpr", cxx11 }, ++ { "cxx_decltype", cxx11 }, ++ { "cxx_decltype_incomplete_return_types", cxx11 }, ++ { "cxx_default_function_template_args", cxx11 }, ++ { "cxx_defaulted_functions", cxx11 }, ++ { "cxx_delegating_constructors", cxx11 }, ++ { "cxx_deleted_functions", cxx11 }, ++ { "cxx_explicit_conversions", cxx11 }, ++ { "cxx_generalized_initializers", cxx11 }, ++ { "cxx_implicit_moves", cxx11 }, ++ { "cxx_inheriting_constructors", cxx11 }, ++ { "cxx_inline_namespaces", { cxx11, cxx98 } }, ++ { "cxx_lambdas", cxx11 }, ++ { "cxx_local_type_template_args", cxx11 }, ++ { "cxx_noexcept", cxx11 }, ++ { "cxx_nonstatic_member_init", cxx11 }, ++ { "cxx_nullptr", cxx11 }, ++ { "cxx_override_control", cxx11 }, ++ { "cxx_reference_qualified_functions", cxx11 }, ++ { "cxx_range_for", cxx11 }, ++ { "cxx_raw_string_literals", cxx11 }, ++ { "cxx_rvalue_references", cxx11 }, ++ { "cxx_static_assert", cxx11 }, ++ { "cxx_thread_local", cxx11 }, ++ { "cxx_auto_type", cxx11 }, ++ { "cxx_strong_enums", cxx11 }, ++ { "cxx_trailing_return", cxx11 }, ++ { "cxx_unicode_literals", cxx11 }, ++ { "cxx_unrestricted_unions", cxx11 }, ++ { "cxx_user_literals", cxx11 }, ++ { "cxx_variadic_templates", { cxx11, cxx98 } }, ++ { "cxx_binary_literals", { cxx14, cxx98 } }, ++ { "cxx_contextual_conversions", { cxx14, cxx98 } }, ++ { "cxx_decltype_auto", cxx14 }, ++ { "cxx_aggregate_nsdmi", cxx14 }, ++ { "cxx_init_captures", { cxx14, cxx11 } }, ++ { "cxx_generic_lambdas", cxx14 }, ++ { "cxx_relaxed_constexpr", cxx14 }, ++ { "cxx_return_type_deduction", cxx14 }, ++ { "cxx_variable_templates", cxx14 }, ++ { "modules", &flag_modules }, ++}; ++ ++/* Register C++ language features for __has_{feature,extension}. */ ++ ++void ++cp_register_features () ++{ ++ using result = cp_feature_selector::result; ++ ++ for (unsigned i = 0; i < ARRAY_SIZE (cp_feature_table); i++) ++ { ++ const cp_feature_info *info = cp_feature_table + i; ++ const auto res = info->selector.has_feature (); ++ if (res == result::NONE) ++ continue; ++ ++ c_common_register_feature (info->ident, res == result::FEAT); ++ } ++} ++ + /* Special routine to get the alias set for C++. */ + + alias_set_type +diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h +index 80893aa1752..9d4d873deb7 100644 +--- a/gcc/cp/cp-objcp-common.h ++++ b/gcc/cp/cp-objcp-common.h +@@ -34,6 +34,7 @@ extern tree cp_classtype_as_base (const_tree); + extern tree cp_get_global_decls (); + extern tree cp_pushdecl (tree); + extern void cp_register_dumps (gcc::dump_manager *); ++extern void cp_register_features (); + extern bool cp_handle_option (size_t, const char *, HOST_WIDE_INT, int, + location_t, const struct cl_option_handlers *); + extern tree cxx_make_type_hook (tree_code); +diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc +index df0eebdbb74..39c94eb2f4c 100644 +--- a/gcc/cp/decl2.cc ++++ b/gcc/cp/decl2.cc +@@ -3713,9 +3713,8 @@ get_tls_init_fn (tree var) + if (!flag_extern_tls_init && DECL_EXTERNAL (var)) + return NULL_TREE; + +- /* If the variable is internal, or if we can't generate aliases, +- call the local init function directly. */ +- if (!TREE_PUBLIC (var) || !TARGET_SUPPORTS_ALIASES) ++ /* If the variable is internal call the local init function directly. */ ++ if (!TREE_PUBLIC (var)) + return get_local_tls_init_fn (DECL_SOURCE_LOCATION (var)); + + tree sname = mangle_tls_init_fn (var); +@@ -3878,6 +3877,25 @@ generate_tls_wrapper (tree fn) + expand_or_defer_fn (finish_function (/*inline_p=*/false)); + } + ++/* A dummy init function to act as a weak placeholder for a (possibly non- ++ existent) dynamic init. */ ++static void ++generate_tls_dummy_init (tree fn) ++{ ++ tree var = DECL_BEFRIENDING_CLASSES (fn); ++ tree init_fn = get_tls_init_fn (var); ++ /* If have no init fn, or it is non-weak, then we do not need to make a ++ dummy. */ ++ if (!init_fn || !lookup_attribute ("weak", DECL_ATTRIBUTES (init_fn))) ++ return; ++ start_preparsed_function (init_fn, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ declare_weak (init_fn); ++ finish_return_stmt (NULL_TREE); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++} ++ + /* Start a global constructor or destructor function. */ + + static tree +@@ -4668,22 +4686,24 @@ handle_tls_init (void) + finish_expr_stmt (cp_build_modify_expr (loc, guard, NOP_EXPR, + boolean_true_node, + tf_warning_or_error)); ++ auto_vec direct_calls; + for (; vars; vars = TREE_CHAIN (vars)) + { + tree var = TREE_VALUE (vars); + tree init = TREE_PURPOSE (vars); + one_static_initialization_or_destruction (/*initp=*/true, var, init); + +- /* Output init aliases even with -fno-extern-tls-init. */ +- if (TARGET_SUPPORTS_ALIASES && TREE_PUBLIC (var)) ++ /* Output inits even with -fno-extern-tls-init. ++ We save the list here and output either an alias or a stub function ++ below. */ ++ if (TREE_PUBLIC (var)) + { +- tree single_init_fn = get_tls_init_fn (var); ++ tree single_init_fn = get_tls_init_fn (var); + if (single_init_fn == NULL_TREE) + continue; +- cgraph_node *alias +- = cgraph_node::get_create (fn)->create_same_body_alias +- (single_init_fn, fn); +- gcc_assert (alias != NULL); ++ if (single_init_fn == fn) ++ continue; ++ direct_calls.safe_push (single_init_fn); + } + } + +@@ -4691,6 +4711,30 @@ handle_tls_init (void) + finish_if_stmt (if_stmt); + finish_function_body (body); + expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ ++ /* For each TLS var that we have an init function, we either emit an alias ++ between that and the tls_init, or a stub function that just calls the ++ tls_init. */ ++ while (!direct_calls.is_empty()) ++ { ++ tree single_init_fn = direct_calls.pop (); ++ if (TARGET_SUPPORTS_ALIASES) ++ { ++ cgraph_node *alias ++ = cgraph_node::get_create (fn)->create_same_body_alias ++ (single_init_fn, fn); ++ gcc_assert (alias != NULL); ++ } ++ else ++ { ++ start_preparsed_function (single_init_fn, NULL_TREE, SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ tree r = build_call_expr (fn, 0); ++ finish_expr_stmt (r); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ } ++ } + } + + /* We're at the end of compilation, so generate any mangling aliases that +@@ -5109,7 +5153,14 @@ c_parse_final_cleanups (void) + } + + if (!DECL_INITIAL (decl) && decl_tls_wrapper_p (decl)) +- generate_tls_wrapper (decl); ++ { ++ generate_tls_wrapper (decl); ++ /* The wrapper might have a weak reference to an init, we provide ++ a dummy function to satisfy that here. The linker/dynamic ++ loader will override this with the actual init, if one is ++ required. */ ++ generate_tls_dummy_init (decl); ++ } + + if (!DECL_SAVED_TREE (decl)) + continue; +diff --git a/gcc/cp/lex.cc b/gcc/cp/lex.cc +index 64bcfb18196..ee40c229e86 100644 +--- a/gcc/cp/lex.cc ++++ b/gcc/cp/lex.cc +@@ -253,6 +253,9 @@ init_reswords (void) + { + if (c_common_reswords[i].disable & D_CONLY) + continue; ++ if (!flag_allow_extra_keywords ++ && c_common_reswords[i].disable & D_EXT_C_IN_CXX) ++ continue; + id = get_identifier (c_common_reswords[i].word); + C_SET_RID_CODE (id, c_common_reswords[i].rid); + ridpointers [(int) c_common_reswords[i].rid] = id; +diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc +index 53c2d6116f3..c8f7e4dbfa5 100644 +--- a/gcc/cp/parser.cc ++++ b/gcc/cp/parser.cc +@@ -694,6 +694,91 @@ cp_lexer_handle_early_pragma (cp_lexer *lexer) + static cp_parser *cp_parser_new (cp_lexer *); + static GTY (()) cp_parser *the_parser; + ++/* Context-sensitive parse-checking for clang-style attributes. */ ++ ++enum clang_attr_state { ++ CA_NONE = 0, ++ CA_ATTR, ++ CA_BR1, CA_BR2, ++ CA_LIST, ++ CA_LIST_ARGS, ++ CA_IS_CA, ++ CA_CA_ARGS, ++ CA_LIST_CONT ++}; ++ ++/* State machine tracking context of attribute lexing. */ ++ ++static enum clang_attr_state ++cp_lexer_attribute_state (cp_token& token, enum clang_attr_state attr_state) ++{ ++ /* Implement a context-sensitive parser for clang attributes. ++ We detect __attribute__((clang_style_attribute (ARGS))) and lex the ++ args ARGS with the following differences from GNU attributes: ++ (a) number-like values are lexed as strings [this allows lexing XX.YY.ZZ ++ version numbers]. ++ (b) we concatenate strings, since clang attributes allow this too. */ ++ switch (attr_state) ++ { ++ case CA_NONE: ++ if (token.type == CPP_KEYWORD ++ && token.keyword == RID_ATTRIBUTE) ++ attr_state = CA_ATTR; ++ break; ++ case CA_ATTR: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR1; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR1: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR2; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR2: ++ if (token.type == CPP_NAME) ++ { ++ tree identifier = (token.type == CPP_KEYWORD) ++ /* For keywords, use the canonical spelling, not the ++ parsed identifier. */ ++ ? ridpointers[(int) token.keyword] ++ : token.u.value; ++ identifier = canonicalize_attr_name (identifier); ++ if (attribute_clang_form_p (identifier)) ++ attr_state = CA_IS_CA; ++ else ++ attr_state = CA_LIST; ++ } ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_IS_CA: ++ case CA_LIST: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else if (token.type == CPP_OPEN_PAREN) ++ attr_state = attr_state == CA_IS_CA ? CA_CA_ARGS ++ : CA_LIST_ARGS; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_CA_ARGS: /* We will special-case args in this state. */ ++ case CA_LIST_ARGS: ++ if (token.type == CPP_CLOSE_PAREN) ++ attr_state = CA_LIST_CONT; ++ break; ++ case CA_LIST_CONT: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else ++ attr_state = CA_NONE; ++ break; ++ } ++ return attr_state; ++} ++ + /* Create a new main C++ lexer, the lexer that gets tokens from the + preprocessor, and also create the main parser. */ + +@@ -710,6 +795,8 @@ cp_lexer_new_main (void) + c_common_no_more_pch (); + + cp_lexer *lexer = cp_lexer_alloc (); ++ enum clang_attr_state attr_state = CA_NONE; ++ + /* Put the first token in the buffer. */ + cp_token *tok = lexer->buffer->quick_push (token); + +@@ -733,8 +820,14 @@ cp_lexer_new_main (void) + if (tok->type == CPP_PRAGMA_EOL) + cp_lexer_handle_early_pragma (lexer); + ++ attr_state = cp_lexer_attribute_state (*tok, attr_state); + tok = vec_safe_push (lexer->buffer, cp_token ()); +- cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok); ++ unsigned int flags = C_LEX_STRING_NO_JOIN; ++ /* If we are processing clang-style attribute args, lex numbers as ++ potential version strings; NN .. NN.MM .. NN.MM.OO */ ++ if (attr_state == CA_CA_ARGS) ++ flags |= C_LEX_NUMBER_AS_STRING; ++ cp_lexer_get_preprocessor_token (flags, tok); + } + + lexer->next_token = lexer->buffer->address (); +@@ -936,7 +1029,7 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token) + { + static int is_extern_c = 0; + +- /* Get a new token from the preprocessor. */ ++ /* Get a new token from the preprocessor. */ + token->type + = c_lex_with_flags (&token->u.value, &token->location, &token->flags, + flags); +@@ -20995,11 +21088,13 @@ cp_parser_enum_specifier (cp_parser* parser) + + /* Check for the `:' that denotes a specified underlying type in C++0x. + Note that a ':' could also indicate a bitfield width, however. */ ++ location_t colon_loc = UNKNOWN_LOCATION; + if (cp_lexer_next_token_is (parser->lexer, CPP_COLON)) + { + cp_decl_specifier_seq type_specifiers; + + /* Consume the `:'. */ ++ colon_loc = cp_lexer_peek_token (parser->lexer)->location; + cp_lexer_consume_token (parser->lexer); + + auto tdf +@@ -21048,10 +21143,13 @@ cp_parser_enum_specifier (cp_parser* parser) + && cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)) + { + if (has_underlying_type) +- cp_parser_commit_to_tentative_parse (parser); +- cp_parser_error (parser, "expected %<;%> or %<{%>"); +- if (has_underlying_type) +- return error_mark_node; ++ pedwarn (colon_loc, ++ OPT_Welaborated_enum_base, ++ "declaration of enumeration with " ++ "fixed underlying type and no enumerator list is " ++ "only permitted as a standalone declaration"); ++ else ++ cp_parser_error (parser, "expected %<;%> or %<{%>"); + } + } + +@@ -22775,9 +22873,16 @@ cp_parser_init_declarator (cp_parser* parser, + "an % specification is not allowed " + "on a function-definition"); + if (attributes) +- error_at (attributes_start_token->location, +- "attributes are not allowed " +- "on a function-definition"); ++ { ++ /* When we are allowing attributes in this position, then add ++ them to the prefix ones. */ ++ if (flag_allow_ext_attr_placement) ++ prefix_attributes = chainon (prefix_attributes, attributes); ++ else ++ error_at (attributes_start_token->location, ++ "attributes are not allowed " ++ "on a function-definition"); ++ } + /* This is a function-definition. */ + *function_definition_p = true; + +@@ -29057,6 +29162,91 @@ cp_parser_gnu_attributes_opt (cp_parser* parser) + return attributes; + } + ++/* Parse the arguments list for a clang attribute. */ ++static tree ++cp_parser_clang_attribute (cp_parser *parser, tree/*attr_id*/) ++{ ++ /* Each entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ matching_parens parens; ++ if (!parens.require_open (parser)) ++ return NULL; ++ ++ bool save_translate_strings_p = parser->translate_strings_p; ++ parser->translate_strings_p = false; ++ tree attr_args = NULL_TREE; ++ cp_token *token; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_NAME) ++ name = token->u.value; ++ else if (token->type == CPP_KEYWORD) ++ name = ridpointers[(int) token->keyword]; ++ else if (token->flags & NAMED_OP) ++ name = get_identifier (cpp_type2name (token->type, token->flags)); ++ else ++ { ++ /* FIXME: context-sensitive for that attrib. */ ++ error_at (token->location, "expected an attribute keyword"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ cp_lexer_consume_token (parser->lexer); ++ ++ if (cp_lexer_next_token_is (parser->lexer, CPP_EQ)) ++ { ++ cp_lexer_consume_token (parser->lexer); /* eat the '=' */ ++ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_STRING) ++ value = cp_parser_string_literal (parser, /*translate=*/false, ++ /*wide_ok=*/false); ++ else ++ { ++ value = token->u.value; ++ cp_lexer_consume_token (parser->lexer); ++ } ++ } ++ /* else value is missing. */ ++ } ++ else if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ error_at (token->location, "expected %<,%>, %<=%> or %<)%>"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) ++ cp_lexer_consume_token (parser->lexer); ++ tree t = tree_cons (value, name, NULL_TREE); ++ attr_args = chainon (attr_args, t); ++ } while (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)); ++ ++ parser->translate_strings_p = save_translate_strings_p; ++ if (!parens.require_close (parser)) ++ return error_mark_node; ++ ++ return attr_args; ++} ++ + /* Parse a GNU attribute-list. + + attribute-list: +@@ -29116,9 +29306,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +- /* If it's an `(', then parse the attribute arguments. */ +- if (token->type == CPP_OPEN_PAREN) ++ if (token->type == CPP_OPEN_PAREN ++ && attribute_clang_form_p (identifier)) ++ arguments = cp_parser_clang_attribute (parser, identifier); ++ else if (token->type == CPP_OPEN_PAREN) + { ++ /* If it's an `(', then parse the attribute arguments. */ + vec *vec; + int attr_flag = (attribute_takes_identifier_p (identifier) + ? id_attr : normal_attr); +@@ -29135,12 +29328,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + arguments = build_tree_list_vec (vec); + release_tree_vector (vec); + } +- /* Save the arguments away. */ +- TREE_VALUE (attribute) = arguments; + } + + if (arguments != error_mark_node) + { ++ /* Save the arguments away. */ ++ TREE_VALUE (attribute) = arguments; + /* Add this attribute to the list. */ + TREE_CHAIN (attribute) = attribute_list; + attribute_list = attribute; +diff --git a/gcc/cumulative-args.h b/gcc/cumulative-args.h +new file mode 100644 +index 00000000000..b60928e37f9 +--- /dev/null ++++ b/gcc/cumulative-args.h +@@ -0,0 +1,20 @@ ++#ifndef GCC_CUMULATIVE_ARGS_H ++#define GCC_CUMULATIVE_ARGS_H ++ ++#if CHECKING_P ++ ++struct cumulative_args_t { void *magic; void *p; }; ++ ++#else /* !CHECKING_P */ ++ ++/* When using a GCC build compiler, we could use ++ __attribute__((transparent_union)) to get cumulative_args_t function ++ arguments passed like scalars where the ABI would mandate a less ++ efficient way of argument passing otherwise. However, that would come ++ at the cost of less type-safe !CHECKING_P compilation. */ ++ ++union cumulative_args_t { void *p; }; ++ ++#endif /* !CHECKING_P */ ++ ++#endif /* GCC_CUMULATIVE_ARGS_H */ +diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in +index f8885bbcfe3..4fbf2096416 100644 +--- a/gcc/d/Make-lang.in ++++ b/gcc/d/Make-lang.in +@@ -64,9 +64,9 @@ ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \ + $(PICFLAG) $(ALIASING_FLAGS) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \ + $(WARN_DFLAGS) + +-DCOMPILE.base = $(GDC) $(NO_PIE_CFLAGS) -c $(ALL_DFLAGS) -o $@ +-DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).TPo +-DPOSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).TPo $(@D)/$(DEPDIR)/$(basename $(@F)).Po ++DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@ ++DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo ++DPOSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po + DLINKER = $(GDC) $(NO_PIE_FLAG) -lstdc++ + + # Like LINKER, but use a mutex for serializing front end links. +diff --git a/gcc/doc/contrib.texi b/gcc/doc/contrib.texi +index 758805dc5db..f8f002cdc8e 100644 +--- a/gcc/doc/contrib.texi ++++ b/gcc/doc/contrib.texi +@@ -1515,7 +1515,7 @@ Gael Thomas for @code{VMClassLoader} boot packages support suggestions. + + @item + Andreas Tobler for Darwin and Solaris testing and fixing, @code{Qt4} +-support for Darwin/OS X, @code{Graphics2D} support, @code{gtk+} ++support for Darwin / macOS, @code{Graphics2D} support, @code{gtk+} + updates. + + @item +diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi +index 48a877e6fd3..e2e16d7e95e 100644 +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -3198,6 +3198,8 @@ directive}: @samp{#if}, @samp{#ifdef} or @samp{#ifndef}. + * @code{__has_cpp_attribute}:: + * @code{__has_c_attribute}:: + * @code{__has_builtin}:: ++* @code{__has_feature}:: ++* @code{__has_extension}:: + * @code{__has_include}:: + @end menu + +@@ -3560,6 +3562,45 @@ the operator is as follows: + #endif + @end smallexample + ++@node @code{__has_feature} ++@subsection @code{__has_feature} ++@cindex @code{__has_feature} ++ ++The special operator @code{__has_feature (@var{operand})} may be used in ++constant integer contexts and in preprocessor @samp{#if} and @samp{#elif} ++expressions to test whether the identifier given in @var{operand} is recognized ++as a feature supported by GCC given the current options and, in the case of ++standard language features, whether the feature is available in the chosen ++version of the language standard. ++ ++Note that @code{__has_feature} and @code{__has_extension} are not recommended ++for use in new code, and are only provided for compatibility with Clang. For ++details of which identifiers are accepted by these function-like macros, see ++@w{@uref{https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension, ++the Clang documentation}}. ++ ++@node @code{__has_extension} ++@subsection @code{__has_extension} ++@cindex @code{__has_extension} ++ ++The special operator @code{__has_extension (@var{operand})} may be used in ++constant integer contexts and in preprocessor @samp{#if} and @samp{#elif} ++expressions to test whether the identifier given in @var{operand} is recognized ++as an extension supported by GCC given the current options. In any given ++context, the features accepted by @code{__has_extension} are a strict superset ++of those accepted by @code{__has_feature}. Unlike @code{__has_feature}, ++@code{__has_extension} tests whether a given feature is available regardless of ++strict language standards conformance. ++ ++If the @option{-pedantic-errors} flag is given, @code{__has_extension} is ++equivalent to @code{__has_feature}. ++ ++Note that @code{__has_feature} and @code{__has_extension} are not recommended ++for use in new code, and are only provided for compatibility with Clang. For ++details of which identifiers are accepted by these function-like macros, see ++@w{@uref{https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension, ++the Clang documentation}}. ++ + @node @code{__has_include} + @subsection @code{__has_include} + @cindex @code{__has_include} +diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi +index d68d387e0a6..a132b82ac7e 100644 +--- a/gcc/doc/extend.texi ++++ b/gcc/doc/extend.texi +@@ -23795,7 +23795,7 @@ attribute, do change the value of preprocessor macros like + + The following pragmas are available for all architectures running the + Darwin operating system. These are useful for compatibility with other +-Mac OS compilers. ++macOS compilers. + + @table @code + @cindex pragma, mark +@@ -24974,7 +24974,7 @@ compiled separately. + @end table + + G++ implements the Borland model on targets where the linker supports it, +-including ELF targets (such as GNU/Linux), Mac OS X and Microsoft Windows. ++including ELF targets (such as GNU/Linux), macOS and Microsoft Windows. + Otherwise G++ implements neither automatic model. + + You have the following options for dealing with template instantiations: +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index b30d3691fe6..de05d1c42da 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -1075,14 +1075,26 @@ code. + + @item --enable-host-shared + Specify that the @emph{host} code should be built into position-independent +-machine code (with -fPIC), allowing it to be used within shared libraries, +-but yielding a slightly slower compiler. ++machine code (with @option{-fPIC}), allowing it to be used within shared ++libraries, but yielding a slightly slower compiler. + + This option is required when building the libgccjit.so library. + + Contrast with @option{--enable-shared}, which affects @emph{target} + libraries. + ++@item --enable-host-pie ++Specify that the @emph{host} executables should be built into ++position-independent executables (with @option{-fPIE} and @option{-pie}), ++yielding a slightly slower compiler (but faster than ++@option{--enable-host-shared}). Position-independent executables are loaded ++at random addresses each time they are executed, therefore provide additional ++protection against Return Oriented Programming (ROP) attacks. ++ ++@option{--enable-host-pie}) may be used with @option{--enable-host-shared}), ++in which case @option{-fPIC} is used when compiling, and @option{-pie} when ++linking. ++ + @item @anchor{with-gnu-as}--with-gnu-as + Specify that the compiler should assume that the + assembler it finds is the GNU assembler. However, this does not modify +@@ -1790,6 +1802,12 @@ particularly useful if you intend to use several versions of GCC in + parallel. The default is @samp{yes} for @samp{libada}, and @samp{no} for + the remaining libraries. + ++@item --with-darwin-extra-rpath ++This is provided to allow distributions to add a single additional ++runpath on Darwin / macOS systems. This allows for cases where the ++installed GCC library directories are then symlinked to a common ++directory outside of the GCC installation. ++ + @item @anchor{WithAixSoname}--with-aix-soname=@samp{aix}, @samp{svr4} or @samp{both} + Traditional AIX shared library versioning (versioned @code{Shared Object} + files as members of unversioned @code{Archive Library} files named +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index b80966e1353..8f82ba0ecfa 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -254,7 +254,8 @@ in the following sections. + -Wdelete-non-virtual-dtor -Wno-deprecated-array-compare + -Wdeprecated-copy -Wdeprecated-copy-dtor + -Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion +--Weffc++ -Wno-exceptions -Wextra-semi -Wno-inaccessible-base ++-Weffc++ -Wno-elaborated-enum-base ++-Wno-exceptions -Wextra-semi -Wno-inaccessible-base + -Wno-inherited-variadic-ctor -Wno-init-list-lifetime + -Winvalid-constexpr -Winvalid-imported-macros + -Wno-invalid-offsetof -Wno-literal-suffix +@@ -706,8 +707,9 @@ Objective-C and Objective-C++ Dialects}. + -freg-struct-return -fshort-enums -fshort-wchar + -fverbose-asm -fpack-struct[=@var{n}] + -fleading-underscore -ftls-model=@var{model} +--fstack-reuse=@var{reuse_level} +--ftrampolines -ftrapv -fwrapv ++-fstack-reuse=@var{reuse_level} -fstack-use-cumulative-args ++-ftrampolines -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} ++-ftrapv -fwrapv + -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} + -fstrict-volatile-bitfields -fsync-libcalls} + +@@ -914,7 +916,7 @@ Objective-C and Objective-C++ Dialects}. + -iframework + -image_base -init -install_name -keep_private_externs + -multi_module -multiply_defined -multiply_defined_unused +--noall_load -no_dead_strip_inits_and_terms ++-noall_load -no_dead_strip_inits_and_terms -nodefaultrpaths + -nofixprebinding -nomultidefs -noprebind -noseglinkedit + -pagezero_size -prebind -prebind_all_twolevel_modules + -private_bundle -read_only_relocs -sectalign +@@ -927,7 +929,7 @@ Objective-C and Objective-C++ Dialects}. + -twolevel_namespace -umbrella -undefined + -unexported_symbols_list -weak_reference_mismatches + -whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} +--mkernel -mone-byte-bool} ++-mkernel -mone-byte-bool -munreachable-traps} + + @emph{DEC Alpha Options} + @gccoptlist{-mno-fp-regs -msoft-float +@@ -3839,6 +3841,15 @@ bool b = e <= 3.7; + @option{-std=c++20}. In pre-C++20 dialects, this warning can be enabled + by @option{-Wenum-conversion}. + ++@opindex Welaborated-enum-base ++@opindex Wno-elaborated-enum-base ++@item -Wno-elaborated-enum-base ++For C++11 and above, warn if an (invalid) additional enum-base is used ++in an elaborated-type-specifier. That is, if an enum with given ++underlying type and no enumerator list is used in a declaration other ++than just a standalone declaration of the enum. Enabled by default. This ++warning is upgraded to an error with -pedantic-errors. ++ + @opindex Winit-list-lifetime + @opindex Wno-init-list-lifetime + @item -Wno-init-list-lifetime @r{(C++ and Objective-C++ only)} +@@ -4802,7 +4813,7 @@ Use @var{class-name} as the name of the class to instantiate for each + literal string specified with the syntax @code{@@"@dots{}"}. The default + class name is @code{NXConstantString} if the GNU runtime is being used, and + @code{NSConstantString} if the NeXT runtime is being used (see below). On +-Darwin (macOS, MacOS X) platforms, the @option{-fconstant-cfstrings} option, if ++Darwin / macOS platforms, the @option{-fconstant-cfstrings} option, if + also present, overrides the @option{-fconstant-string-class} setting and cause + @code{@@"@dots{}"} literals to be laid out as constant CoreFoundation strings. + Note that @option{-fconstant-cfstrings} is an alias for the target-specific +@@ -4816,7 +4827,7 @@ runtime. This is the default for most types of systems. + @opindex fnext-runtime + @item -fnext-runtime + Generate output compatible with the NeXT runtime. This is the default +-for NeXT-based systems, including Darwin and Mac OS X@. The macro ++for NeXT-based systems, including Darwin / macOS. The macro + @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is + used. + +@@ -6031,8 +6042,45 @@ Give an error whenever the @dfn{base standard} (see @option{-Wpedantic}) + requires a diagnostic, in some cases where there is undefined behavior + at compile-time and in some other cases that do not prevent compilation + of programs that are valid according to the standard. This is not +-equivalent to @option{-Werror=pedantic}, since there are errors enabled +-by this option and not enabled by the latter and vice versa. ++equivalent to @option{-Werror=pedantic}: the latter option is unlikely to be ++useful, as it only makes errors of the diagnostics that are controlled by ++@option{-Wpedantic}, whereas this option also affects required diagnostics that ++are always enabled or controlled by options other than @option{-Wpedantic}. ++ ++If you want the required diagnostics that are warnings by default to ++be errors instead, but don't also want to enable the @option{-Wpedantic} ++diagnostics, you can specify @option{-pedantic-errors -Wno-pedantic} ++(or @option{-pedantic-errors -Wno-error=pedantic} to enable them but ++only as warnings). ++ ++Some required diagnostics are errors by default, but can be reduced to ++warnings using @option{-fpermissive} or their specific warning option, ++e.g. @option{-Wno-error=narrowing}. ++ ++Some diagnostics for non-ISO practices are controlled by specific ++warning options other than @option{-Wpedantic}, but are also made ++errors by @option{-pedantic-errors}. For instance: ++ ++@gccoptlist{ ++-Wattributes @r{(for standard attributes)} ++-Wchanges-meaning @r{(C++)} ++-Wcomma-subscript @r{(C++23 or later)} ++-Wdeclaration-after-statement @r{(C90 or earlier)} ++-Welaborated-enum-base @r{(C++11 or later)} ++-Wimplicit-int @r{(C99 or later)} ++-Wimplicit-function-declaration @r{(C99 or later)} ++-Wincompatible-pointer-types ++-Wint-conversion ++-Wlong-long @r{(C90 or earlier)} ++-Wmain ++-Wnarrowing @r{(C++11 or later)} ++-Wpointer-arith ++-Wpointer-sign ++-Wincompatible-pointer-types ++-Wregister @r{(C++17 or later)} ++-Wvla @r{(C90 or earlier)} ++-Wwrite-strings @r{(C++11 or later)} ++} + + @opindex Wall + @opindex Wno-all +@@ -11285,7 +11333,7 @@ possible. + Produce debugging information in DWARF format (if that is supported). + The value of @var{version} may be either 2, 3, 4 or 5; the default + version for most targets is 5 (with the exception of VxWorks, TPF and +-Darwin/Mac OS X, which default to version 2, and AIX, which defaults ++Darwin / macOS, which default to version 2, and AIX, which defaults + to version 4). + + Note that with DWARF Version 2, some ports require and always +@@ -18169,6 +18217,17 @@ the behavior of older compilers in which temporaries' stack space is + not reused, the aggressive stack reuse can lead to runtime errors. This + option is used to control the temporary stack reuse optimization. + ++@opindex fstack_use_cumulative_args ++@item -fstack-use-cumulative-args ++This option instructs the compiler to use the ++@code{cumulative_args_t}-based stack layout target hooks, ++@code{TARGET_FUNCTION_ARG_BOUNDARY_CA} and ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA}. If a given target does ++not define these hooks, the default behaviour is to fallback to using ++the standard non-@code{_CA} variants instead. Certain targets (such as ++AArch64 Darwin) require using the more advanced @code{_CA}-based ++hooks: For these targets this option should be enabled by default. ++ + @opindex ftrapv + @item -ftrapv + This option generates traps for signed overflow on addition, subtraction, +@@ -18654,6 +18713,20 @@ For languages other than Ada, the @code{-ftrampolines} and + trampolines are always generated on platforms that need them + for nested functions. + ++@opindex ftrampoline-impl ++@item -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} ++By default, trampolines are generated on stack. However, certain platforms ++(such as the Apple M1) do not permit an executable stack. Compiling with ++@option{-ftrampoline-impl=heap} generate calls to ++@code{__gcc_nested_func_ptr_created} and ++@code{__gcc_nested_func_ptr_deleted} in order to allocate and ++deallocate trampoline space on the executable heap. These functions are ++implemented in libgcc, and will only be provided on specific targets: ++x86_64 Darwin, x86_64 and aarch64 Linux. @emph{PLEASE NOTE}: Heap ++trampolines are @emph{not} guaranteed to be correctly deallocated if you ++@code{setjmp}, instantiate nested functions, and then @code{longjmp} back ++to a state prior to having allocated those nested functions. ++ + @opindex fvisibility + @item -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} + Set the default ELF image symbol visibility to the specified option---all +@@ -24113,6 +24186,11 @@ without that switch. Using this switch may require recompiling all + other modules in a program, including system libraries. Use this + switch to conform to a non-default data model. + ++@opindex munreachable-traps ++@item -munreachable-traps ++Causes @code{__builtin_unreachable} to be rendered as a trap. This is the ++default for all Darwin architectures. ++ + @opindex mfix-and-continue + @opindex ffix-and-continue + @opindex findirect-data +@@ -24159,6 +24237,14 @@ an executable when linking, using the Darwin @file{libtool} command. + This causes GCC's output file to have the @samp{ALL} subtype, instead of + one controlled by the @option{-mcpu} or @option{-march} option. + ++@opindex nodefaultrpaths ++@item -nodefaultrpaths ++Do not add default run paths for the compiler library directories to ++executables, modules or dynamic libraries. On macOS 10.5 and later, ++the embedded runpath is added by default unless the user adds ++@option{-nodefaultrpaths} to the link line. Run paths are needed ++(and therefore enforced) to build on macOS version 10.11 or later. ++ + @item -allowable_client @var{client_name} + @itemx -client_name + @itemx -compatibility_version +@@ -29912,7 +29998,7 @@ the same as @option{-mbig}. + + @opindex mdynamic-no-pic + @item -mdynamic-no-pic +-On Darwin and Mac OS X systems, compile code so that it is not ++On Darwin / macOS systems, compile code so that it is not + relocatable, but that its external references are relocatable. The + resulting code is suitable for applications, but not shared + libraries. +diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi +index 26df8b490df..f9a23180ed8 100644 +--- a/gcc/doc/plugins.texi ++++ b/gcc/doc/plugins.texi +@@ -44,7 +44,7 @@ Plugins are loaded with + + Where @var{name} is the plugin name and @var{ext} is the platform-specific + dynamic library extension. It should be @code{dll} on Windows/MinGW, +-@code{dylib} on Darwin/Mac OS X, and @code{so} on all other platforms. ++@code{dylib} on Darwin/macOS, and @code{so} on all other platforms. + The plugin arguments are parsed by GCC and passed to respective + plugins as key-value pairs. Multiple plugins can be invoked by + specifying multiple @option{-fplugin} arguments. +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index a660e33739b..1080f85dfa1 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -1042,6 +1042,10 @@ also define the hook to @code{default_promote_function_mode_always_promote} + if you would like to apply the same rules given by @code{PROMOTE_MODE}. + @end deftypefn + ++@deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE_CA (cumulative_args_t, @var{function_arg_info}, @var{const_tree}, int *@var{}, @var{int}) ++Like @code{promote_function_mode}, but takes a cumulative_args pointer and a current arg to supply the input. ++@end deftypefn ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -4354,6 +4358,16 @@ with the specified mode and type. The default hook returns + @code{PARM_BOUNDARY} for all arguments. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument alignment, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}. ++@end deftypefn ++ + @deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY (machine_mode @var{mode}, const_tree @var{type}) + Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY}, + which is the default value for this hook. You can define this hook to +@@ -4361,6 +4375,16 @@ return a different value if an argument size must be rounded to a larger + value. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument size rounding, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. ++@end deftypefn ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -5764,7 +5788,7 @@ This hook determines whether a function from a class of functions + Set this macro to 1 to use the "NeXT" Objective-C message sending conventions + by default. This calling convention involves passing the object, the selector + and the method arguments all at once to the method-lookup library function. +-This is the usual setting when targeting Darwin/Mac OS X systems, which have ++This is the usual setting when targeting Darwin / macOS systems, which have + the NeXT runtime installed. + + If the macro is set to 0, the "GNU" Objective-C message sending convention +@@ -12365,6 +12389,11 @@ This target hook can be used to generate a target-specific code + If selftests are enabled, run any selftests for this target. + @end deftypefn + ++@deftypefn {Target Hook} bool TARGET_UNREACHABLE_SHOULD_TRAP (void) ++This hook should return @code{true} if the target wants @code{__builtin_unreachable} to expand to a trap or @code{abort ()}. ++ The default value is false. ++@end deftypefn ++ + @deftypefn {Target Hook} bool TARGET_MEMTAG_CAN_TAG_ADDRESSES () + True if the backend architecture naturally supports ignoring some region + of pointers. This feature means that @option{-fsanitize=hwaddress} can +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index f7ab5d48a63..7f82c02bf33 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -938,6 +938,8 @@ applied. + + @hook TARGET_PROMOTE_FUNCTION_MODE + ++@hook TARGET_PROMOTE_FUNCTION_MODE_CA ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -3341,8 +3343,12 @@ required. + + @hook TARGET_FUNCTION_ARG_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_BOUNDARY_CA ++ + @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -4008,7 +4014,7 @@ macro, a reasonable default is used. + Set this macro to 1 to use the "NeXT" Objective-C message sending conventions + by default. This calling convention involves passing the object, the selector + and the method arguments all at once to the method-lookup library function. +-This is the usual setting when targeting Darwin/Mac OS X systems, which have ++This is the usual setting when targeting Darwin / macOS systems, which have + the NeXT runtime installed. + + If the macro is set to 0, the "GNU" Objective-C message sending convention +@@ -7965,6 +7971,8 @@ maintainer is familiar with. + + @hook TARGET_RUN_TARGET_SELFTESTS + ++@hook TARGET_UNREACHABLE_SHOULD_TRAP ++ + @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES + + @hook TARGET_MEMTAG_TAG_SIZE +diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in +index bddf46ab70a..a9120f36e19 100644 +--- a/gcc/exec-tool.in ++++ b/gcc/exec-tool.in +@@ -23,6 +23,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" + ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" + ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" + ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ++ORIGINAL_LLD_FOR_TARGET="@ORIGINAL_LLD_FOR_TARGET@" ++ORIGINAL_CLASSIC_LD_FOR_TARGET="@ORIGINAL_CLASSIC_LD_FOR_TARGET@" + ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" + ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" + ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@" +@@ -39,24 +41,41 @@ case "$invoked" in + dir=gas + ;; + collect-ld) +- # Check -fuse-ld=bfd and -fuse-ld=gold +- case " $* " in +- *\ -fuse-ld=bfd\ *) +- original=$ORIGINAL_LD_BFD_FOR_TARGET +- ;; +- *\ -fuse-ld=gold\ *) +- original=$ORIGINAL_LD_GOLD_FOR_TARGET +- ;; +- *) +- # when using a linker plugin, gcc will always pass '-plugin' as the +- # first or second option to the linker. +- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then +- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET +- else +- original=$ORIGINAL_LD_FOR_TARGET +- fi +- ;; +- esac ++ # when using a linker plugin, gcc will always pass '-plugin' as the ++ # first or second option to the linker. ++ if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then ++ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET ++ else ++ original=$ORIGINAL_LD_FOR_TARGET ++ fi ++ # Check -fuse-ld=bfd, -fuse-ld=gold and -fuse-ld=classic ++ # Remove -fuse-ld=classic from the command line ++ for arg do ++ # temporarily, remove the arg. ++ shift ++ case $arg in ++ -fuse-ld=bfd) ++ original=$ORIGINAL_LD_BFD_FOR_TARGET ++ ;; ++ -fuse-ld=gold) ++ original=$ORIGINAL_LD_GOLD_FOR_TARGET ++ ;; ++ -fuse-ld=lld) ++ original=$ORIGINAL_LLD_FOR_TARGET ++ # We want to remove this from the command line; by the slightly ++ # obtuse mechanism of not putting it back. ++ continue ++ ;; ++ -fuse-ld=classic) ++ original=$ORIGINAL_CLASSIC_LD_FOR_TARGET ++ # As for lld. ++ continue ++ ;; ++ *) ;; ++ esac ++ # if we want to keep the arg, put it back. ++ set -- "$@" "$arg" ++ done + prog=ld-new$exeext + if test "$original" = ../gold/ld-new$exeext; then + dir=gold +diff --git a/gcc/explow.cc b/gcc/explow.cc +index 6424c0802f0..7c2973a9602 100644 +--- a/gcc/explow.cc ++++ b/gcc/explow.cc +@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see + #include "langhooks.h" + #include "except.h" + #include "dojump.h" ++#include "calls.h" + #include "explow.h" + #include "expr.h" + #include "stringpool.h" +@@ -817,6 +818,16 @@ promote_function_mode (const_tree type, machine_mode mode, int *punsignedp, + return mode; + } + } ++ ++machine_mode ++promote_function_mode (cumulative_args_t args_so_far, function_arg_info arg, ++ const_tree funtype, int *punsignedp , int for_return) ++{ ++ return targetm.calls.promote_function_mode_ca (args_so_far, arg, funtype, ++ punsignedp, for_return); ++// return promote_function_mode (arg.type, arg.mode, punsignedp, funtype, for_return); ++} ++ + /* Return the mode to use to store a scalar of TYPE and MODE. + PUNSIGNEDP points to the signedness of the type and may be adjusted + to show what signedness to use on extension operations. */ +diff --git a/gcc/explow.h b/gcc/explow.h +index 2db4f5c0de0..c7d22862187 100644 +--- a/gcc/explow.h ++++ b/gcc/explow.h +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_EXPLOW_H + #define GCC_EXPLOW_H + ++#include "calls.h" /* for cummulative args stuff. */ ++ + /* Return a memory reference like MEMREF, but which is known to have a + valid address. */ + extern rtx validize_mem (rtx); +@@ -47,8 +49,13 @@ extern rtx force_not_mem (rtx); + + /* Return mode and signedness to use when an argument or result in the + given mode is promoted. */ +-extern machine_mode promote_function_mode (const_tree, machine_mode, int *, +- const_tree, int); ++machine_mode promote_function_mode (const_tree, machine_mode, int *, ++ const_tree, int); ++ ++/* Return mode and signedness to use when an argument or result in the ++ given mode is promoted. */ ++machine_mode promote_function_mode (cumulative_args_t, function_arg_info, ++ const_tree, int *, int); + + /* Return mode and signedness to use when an object in the given mode + is promoted. */ +diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi +index 87baf5ac9a1..908f2b7a344 100644 +--- a/gcc/fortran/gfortran.texi ++++ b/gcc/fortran/gfortran.texi +@@ -978,7 +978,7 @@ low level file descriptor corresponding to an open Fortran unit. Then, + using e.g. the @code{ISO_C_BINDING} feature, one can call the + underlying system call to flush dirty data to stable storage, such as + @code{fsync} on POSIX, @code{_commit} on MingW, or @code{fcntl(fd, +-F_FULLSYNC, 0)} on Mac OS X. The following example shows how to call ++F_FULLSYNC, 0)} on macOS. The following example shows how to call + fsync: + + @smallexample +diff --git a/gcc/function.cc b/gcc/function.cc +index 55daf1172c3..339ff9ab5ef 100644 +--- a/gcc/function.cc ++++ b/gcc/function.cc +@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3. If not see + #include "varasm.h" + #include "except.h" + #include "dojump.h" +-#include "explow.h" + #include "calls.h" ++#include "explow.h" + #include "expr.h" + #include "optabs-tree.h" + #include "output.h" +@@ -2448,7 +2448,10 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + else if (DECL_CHAIN (parm)) + data->arg.named = 1; /* Not the last non-variadic parm. */ + else if (targetm.calls.strict_argument_naming (all->args_so_far)) +- data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ { ++ data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ data->arg.last_named = 1; ++ } + else + data->arg.named = 0; /* Treat as variadic. */ + +@@ -2490,9 +2493,12 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + + /* Find mode as it is passed by the ABI. */ + unsignedp = TYPE_UNSIGNED (data->arg.type); +- data->arg.mode +- = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, +- TREE_TYPE (current_function_decl), 0); ++// data->arg.mode ++// = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, ++// TREE_TYPE (current_function_decl), 0); ++ data->arg.mode = promote_function_mode (all->args_so_far, data->arg, ++ TREE_TYPE (current_function_decl), ++ &unsignedp, 0); + } + + /* A subroutine of assign_parms. Invoke setup_incoming_varargs. */ +@@ -2505,6 +2511,7 @@ assign_parms_setup_varargs (struct assign_parm_data_all *all, + + function_arg_info last_named_arg = data->arg; + last_named_arg.named = true; ++ last_named_arg.last_named = true; + targetm.calls.setup_incoming_varargs (all->args_so_far, last_named_arg, + &varargs_pretend_bytes, no_rtl); + +@@ -2613,7 +2620,9 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all, + + locate_and_pad_parm (data->arg.mode, data->arg.type, in_regs, + all->reg_parm_stack_space, +- entry_parm ? data->partial : 0, current_function_decl, ++ entry_parm ? data->partial : 0, ++ all->args_so_far, ++ current_function_decl, + &all->stack_args_size, &data->locate); + + /* Update parm_stack_boundary if this parameter is passed in the +@@ -3947,7 +3956,8 @@ gimplify_parameters (gimple_seq *cleanup) + if (data.arg.pass_by_reference) + { + tree type = TREE_TYPE (data.arg.type); +- function_arg_info orig_arg (type, data.arg.named); ++ function_arg_info orig_arg (type, data.arg.named, ++ data.arg.last_named); + if (reference_callee_copied (&all.args_so_far_v, orig_arg)) + { + tree local, t; +@@ -4050,6 +4060,7 @@ gimplify_parameters (gimple_seq *cleanup) + void + locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + int reg_parm_stack_space, int partial, ++ cumulative_args_t ca, + tree fndecl ATTRIBUTE_UNUSED, + struct args_size *initial_offset_ptr, + struct locate_and_pad_arg_data *locate) +@@ -4087,9 +4098,23 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + ? arg_size_in_bytes (type) + : size_int (GET_MODE_SIZE (passed_mode))); + where_pad = targetm.calls.function_arg_padding (passed_mode, type); +- boundary = targetm.calls.function_arg_boundary (passed_mode, type); +- round_boundary = targetm.calls.function_arg_round_boundary (passed_mode, +- type); ++ ++ if (flag_stack_use_cumulative_args) ++ { ++ boundary = targetm.calls.function_arg_boundary_ca (passed_mode, ++ type, ++ ca); ++ round_boundary = targetm.calls.function_arg_round_boundary_ca ++ (passed_mode, type, ca); ++ } ++ else ++ { ++ boundary = targetm.calls.function_arg_boundary (passed_mode, ++ type); ++ round_boundary = targetm.calls.function_arg_round_boundary ++ (passed_mode, type); ++ } ++ + locate->where_pad = where_pad; + + /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */ +diff --git a/gcc/function.h b/gcc/function.h +index d4ce8a7c6c6..09ab17e66c1 100644 +--- a/gcc/function.h ++++ b/gcc/function.h +@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_FUNCTION_H + #define GCC_FUNCTION_H + ++#include "cumulative-args.h" + + /* Stack of pending (incomplete) sequences saved by `start_sequence'. + Each element describes one pending sequence. +@@ -665,6 +666,7 @@ extern int aggregate_value_p (const_tree, const_tree); + extern bool use_register_for_decl (const_tree); + extern gimple_seq gimplify_parameters (gimple_seq *); + extern void locate_and_pad_parm (machine_mode, tree, int, int, int, ++ cumulative_args_t, + tree, struct args_size *, + struct locate_and_pad_arg_data *); + extern void generate_setjmp_warnings (void); +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index 319a045c285..72a86cbdd13 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -578,6 +578,7 @@ or with constant text in a single argument. + %l process LINK_SPEC as a spec. + %L process LIB_SPEC as a spec. + %M Output multilib_os_dir. ++ %P Output a RUNPATH_OPTION for each directory in startfile_prefixes. + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. +@@ -1181,6 +1182,10 @@ proper position among the other output files. */ + # define SYSROOT_HEADERS_SUFFIX_SPEC "" + #endif + ++#ifndef RUNPATH_OPTION ++# define RUNPATH_OPTION "-rpath" ++#endif ++ + static const char *asm_debug = ASM_DEBUG_SPEC; + static const char *asm_debug_option = ASM_DEBUG_OPTION_SPEC; + static const char *cpp_spec = CPP_SPEC; +@@ -5862,6 +5867,7 @@ struct spec_path_info { + size_t append_len; + bool omit_relative; + bool separate_options; ++ bool realpaths; + }; + + static void * +@@ -5871,6 +5877,16 @@ spec_path (char *path, void *data) + size_t len = 0; + char save = 0; + ++ /* The path must exist; we want to resolve it to the realpath so that this ++ can be embedded as a runpath. */ ++ if (info->realpaths) ++ path = lrealpath (path); ++ ++ /* However, if we failed to resolve it - perhaps because there was a bogus ++ -B option on the command line, then punt on this entry. */ ++ if (!path) ++ return NULL; ++ + if (info->omit_relative && !IS_ABSOLUTE_PATH (path)) + return NULL; + +@@ -6102,6 +6118,22 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + info.omit_relative = false; + #endif + info.separate_options = false; ++ info.realpaths = false; ++ ++ for_each_path (&startfile_prefixes, true, 0, spec_path, &info); ++ } ++ break; ++ ++ case 'P': ++ { ++ struct spec_path_info info; ++ ++ info.option = RUNPATH_OPTION; ++ info.append_len = 0; ++ info.omit_relative = false; ++ info.separate_options = true; ++ /* We want to embed the actual paths that have the libraries. */ ++ info.realpaths = true; + + for_each_path (&startfile_prefixes, true, 0, spec_path, &info); + } +@@ -6428,6 +6460,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + info.append_len = strlen (info.append); + info.omit_relative = false; + info.separate_options = true; ++ info.realpaths = false; + + for_each_path (&include_prefixes, false, info.append_len, + spec_path, &info); +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index dc7a66ca1be..74990688793 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -89,6 +89,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #undef _PTRDIFF_T_ + #endif + ++#if defined (__APPLE__) ++# if defined(__has_feature) && __has_feature(modules) ++# if defined (__need_ptrdiff_t) ++# undef __PTRDIFF_T ++# endif ++# if defined (__need_size_t) ++# undef __SIZE_T ++# endif ++# endif ++#endif ++ + /* On VxWorks, may have defined macros like + _TYPE_size_t which will typedef size_t. fixincludes patched the + vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +@@ -428,9 +439,8 @@ typedef struct { + /* _Float128 is defined as a basic type, so max_align_t must be + sufficiently aligned for it. This code must work in C++, so we + use __float128 here; that is only available on some +- architectures, but only on i386 is extra alignment needed for +- __float128. */ +-#ifdef __i386__ ++ architectures. */ ++#if defined(__i386__) || (__APPLE__ && __aarch64__) + __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); + #endif + } max_align_t; +diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in +index 55079209264..5bdba6c6a4c 100644 +--- a/gcc/jit/Make-lang.in ++++ b/gcc/jit/Make-lang.in +@@ -69,7 +69,7 @@ LIBGCCJIT_COMPAT = 0 + LIBGCCJIT_BASENAME = libgccjit + + LIBGCCJIT_SONAME = \ +- ${libdir}/$(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib ++ $(DARWIN_RPATH)/$(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib + LIBGCCJIT_FILENAME = $(LIBGCCJIT_BASENAME).$(LIBGCCJIT_VERSION_NUM).dylib + LIBGCCJIT_LINKER_NAME = $(LIBGCCJIT_BASENAME).dylib + +diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc +index 74903186622..23bd9890047 100644 +--- a/gcc/jit/jit-playback.cc ++++ b/gcc/jit/jit-playback.cc +@@ -3026,7 +3026,7 @@ invoke_driver (const char *ctxt_progname, + ADD_ARG ("-fno-use-linker-plugin"); + + #if defined (DARWIN_X86) || defined (DARWIN_PPC) +- /* OS X's linker defaults to treating undefined symbols as errors. ++ /* macOS's linker defaults to treating undefined symbols as errors. + If the context has any imported functions or globals they will be + undefined until the .so is dynamically-linked into the process. + Ensure that the driver passes in "-undefined dynamic_lookup" to the +diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h +index 057d3e58e73..04545e4c6f6 100644 +--- a/gcc/jit/libgccjit.h ++++ b/gcc/jit/libgccjit.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #define LIBGCCJIT_H + + #include ++#ifdef __APPLE__ ++# include /* For ssize_t. */ ++#endif + + #ifdef __cplusplus + extern "C" { +diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in +index c8916d24bda..3eabcc2a2fe 100644 +--- a/gcc/m2/Make-lang.in ++++ b/gcc/m2/Make-lang.in +@@ -501,6 +501,11 @@ GM2_MIN_FLAGS=$(GM2_G) $(GM2_OS) \ + -Wpedantic-cast -Wpedantic-param-names -fno-exceptions \ + -ffunction-sections -fdata-sections $(GM2_CPP) + ++# ALL_LINKERFLAGS may include -pie (when GCC is configured with ++# --enable-host-pie), so use -fPIE if needed. (It would not be ++# a good idea to override CFLAGS.) ++GM2_PICFLAGS = $(PICFLAG) ++ + O2=-O2 -g + SO_O2=-O2 -g -fPIC + SO=-O0 -g -fPIC +@@ -1397,7 +1402,7 @@ m2/mc-boot-ch/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.c m2/gm2-libs/gm2-l + + m2/mc-boot-ch/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.cc m2/gm2-libs/gm2-libs-host.h + -test -d $(@D) || $(mkinstalldirs) $(@D) +- $(CXX) $(CXXFLAGS) -DHAVE_CONFIG_H -g -c -I. -Im2/gm2-libs -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) -Im2/gm2-libs $< -o $@ ++ $(CXX) $(CXXFLAGS) $(GM2_PICFLAGS) -DHAVE_CONFIG_H -g -c -I. -Im2/gm2-libs -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) -Im2/gm2-libs $< -o $@ + + m2/mc-boot/main.o: $(M2LINK) $(srcdir)/m2/init/mcinit + -test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) +diff --git a/gcc/objc/objc-act.cc b/gcc/objc/objc-act.cc +index fe2d2b595b4..85580592803 100644 +--- a/gcc/objc/objc-act.cc ++++ b/gcc/objc/objc-act.cc +@@ -3317,7 +3317,7 @@ objc_build_string_object (tree string) + length = TREE_STRING_LENGTH (string) - 1; + + /* The target may have different ideas on how to construct an ObjC string +- literal. On Darwin (Mac OS X), for example, we may wish to obtain a ++ literal. On Darwin / macOS, for example, we may wish to obtain a + constant CFString reference instead. + At present, this is only supported for the NeXT runtime. */ + if (flag_next_runtime +@@ -10362,5 +10362,51 @@ objc_common_tree_size (enum tree_code code) + } + } + ++/* Information for Objective-C-specific features known to __has_feature. */ ++ ++struct objc_feature_info ++{ ++ typedef bool (*predicate_t) (); ++ ++ const char *ident; ++ predicate_t predicate; ++ ++ constexpr objc_feature_info (const char *name) ++ : ident (name), predicate (nullptr) {} ++ constexpr objc_feature_info (const char *name, predicate_t p) ++ : ident (name), predicate (p) {} ++ ++ bool has_feature () const ++ { ++ return predicate ? predicate () : true; ++ } ++}; ++ ++static bool objc_nonfragile_abi_p () ++{ ++ return flag_next_runtime && flag_objc_abi >= 2; ++} ++ ++static constexpr objc_feature_info objc_features[] = ++{ ++ { "objc_default_synthesize_properties" }, ++ { "objc_instancetype" }, ++ { "objc_nonfragile_abi", objc_nonfragile_abi_p } ++}; ++ ++/* Register Objective-C-specific features for __has_feature. */ ++ ++void ++objc_common_register_features () ++{ ++ for (unsigned i = 0; i < ARRAY_SIZE (objc_features); i++) ++ { ++ const objc_feature_info *info = objc_features + i; ++ if (!info->has_feature ()) ++ continue; ++ ++ c_common_register_feature (info->ident, true); ++ } ++} + + #include "gt-objc-objc-act.h" +diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h +index e21ab52d8ca..bcf0249515a 100644 +--- a/gcc/objc/objc-act.h ++++ b/gcc/objc/objc-act.h +@@ -29,6 +29,9 @@ int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *); + void objc_common_init_ts (void); + const char *objc_get_sarif_source_language (const char *); + ++/* Register features common to Objective-C and Objective-C++. */ ++void objc_common_register_features (); ++ + /* NB: The remaining public functions are prototyped in c-common.h, for the + benefit of stub-objc.cc and objc-act.cc. */ + +diff --git a/gcc/objc/objc-lang.cc b/gcc/objc/objc-lang.cc +index 89b3be48b9e..7568248ba13 100644 +--- a/gcc/objc/objc-lang.cc ++++ b/gcc/objc/objc-lang.cc +@@ -58,6 +58,16 @@ objc_get_sarif_source_language (const char *) + return "objectivec"; + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ objc_common_register_features (); ++ c_register_features (); ++} ++ + /* Lang hook routines common to C and ObjC appear in c-objc-common.cc; + there should be very few (if any) routines below. */ + +diff --git a/gcc/objcp/objcp-lang.cc b/gcc/objcp/objcp-lang.cc +index 9887209b9c8..ede59a69d13 100644 +--- a/gcc/objcp/objcp-lang.cc ++++ b/gcc/objcp/objcp-lang.cc +@@ -80,6 +80,16 @@ objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain, + #undef RECURSE + } + ++/* Implement c-family hook to add language-specific features ++ for __has_{feature,extension}. */ ++ ++void ++c_family_register_lang_features () ++{ ++ objc_common_register_features (); ++ cp_register_features (); ++} ++ + static void + objcxx_init_ts (void) + { +diff --git a/gcc/opts.cc b/gcc/opts.cc +index e0ba89ffe51..71371e23cf1 100644 +--- a/gcc/opts.cc ++++ b/gcc/opts.cc +@@ -3215,6 +3215,7 @@ common_handle_option (struct gcc_options *opts, + break; + + case OPT_fuse_ld_bfd: ++ case OPT_fuse_ld_classic: + case OPT_fuse_ld_gold: + case OPT_fuse_ld_lld: + case OPT_fuse_ld_mold: +diff --git a/gcc/plugin.cc b/gcc/plugin.cc +index 045c18f1a68..a3c6cd702fd 100644 +--- a/gcc/plugin.cc ++++ b/gcc/plugin.cc +@@ -191,10 +191,10 @@ add_new_plugin (const char* plugin_name) + #if defined(__MINGW32__) + static const char plugin_ext[] = ".dll"; + #elif defined(__APPLE__) +- /* Mac OS has two types of libraries: dynamic libraries (.dylib) and ++ /* macOS has two types of libraries: dynamic libraries (.dylib) and + plugins (.bundle). Both can be used with dlopen()/dlsym() but the + former cannot be linked at build time (i.e., with the -lfoo linker +- option). A GCC plugin is therefore probably a Mac OS plugin but their ++ option). A GCC plugin is therefore probably a macOS plugin but their + use seems to be quite rare and the .bundle extension is more of a + recommendation rather than the rule. This raises the questions of how + well they are supported by tools (e.g., libtool). So to avoid +diff --git a/gcc/target.def b/gcc/target.def +index 171bbd1caf1..75b51d26074 100644 +--- a/gcc/target.def ++++ b/gcc/target.def +@@ -4574,6 +4574,13 @@ if you would like to apply the same rules given by @code{PROMOTE_MODE}.", + const_tree funtype, int for_return), + default_promote_function_mode) + ++DEFHOOK ++(promote_function_mode_ca, ++ "Like @code{promote_function_mode}, but takes a cumulative_args pointer \ ++ and a current arg to supply the input.", ++ machine_mode, (cumulative_args_t, function_arg_info, const_tree, int *, int), ++ default_promote_function_mode_ca) ++ + DEFHOOK + (promote_prototypes, + "This target hook returns @code{true} if an argument declared in a\n\ +@@ -4992,6 +4999,18 @@ with the specified mode and type. The default hook returns\n\ + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_boundary) + ++DEFHOOK ++(function_arg_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument alignment, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_boundary_ca) ++ + DEFHOOK + (function_arg_round_boundary, + "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\ +@@ -5001,6 +5020,18 @@ value.", + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_round_boundary) + ++DEFHOOK ++(function_arg_round_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument size rounding, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_round_boundary_ca) ++ + /* Return the diagnostic message string if function without a prototype + is not allowed for this 'val' argument; NULL otherwise. */ + DEFHOOK +@@ -7138,6 +7169,16 @@ DEFHOOKPOD + @option{-fsanitize=shadow-call-stack}. The default value is false.", + bool, false) + ++/* This value represents whether __builtin_unreachable should be expanded ++ as a trap instruction (or an abort() if the trap is not available). */ ++DEFHOOK ++(unreachable_should_trap, ++ "This hook should return @code{true} if the target wants \ ++ @code{__builtin_unreachable} to expand to a trap or @code{abort ()}.\n\ ++ The default value is false.", ++ bool, (void), ++ hook_bool_void_false) ++ + /* Close the 'struct gcc_target' definition. */ + HOOK_VECTOR_END (C90_EMPTY_HACK) + +diff --git a/gcc/target.h b/gcc/target.h +index cd448e4b7ab..064523f2a2e 100644 +--- a/gcc/target.h ++++ b/gcc/target.h +@@ -51,22 +51,8 @@ + #include "insn-codes.h" + #include "tm.h" + #include "hard-reg-set.h" +- +-#if CHECKING_P +- +-struct cumulative_args_t { void *magic; void *p; }; +- +-#else /* !CHECKING_P */ +- +-/* When using a GCC build compiler, we could use +- __attribute__((transparent_union)) to get cumulative_args_t function +- arguments passed like scalars where the ABI would mandate a less +- efficient way of argument passing otherwise. However, that would come +- at the cost of less type-safe !CHECKING_P compilation. */ +- +-union cumulative_args_t { void *p; }; +- +-#endif /* !CHECKING_P */ ++#include "tree-core.h" ++#include "cumulative-args.h" + + /* Types of memory operation understood by the "by_pieces" infrastructure. + Used by the TARGET_USE_BY_PIECES_INFRASTRUCTURE_P target hook and +diff --git a/gcc/targhooks.cc b/gcc/targhooks.cc +index 51bf3fb7a82..13a7c206cc5 100644 +--- a/gcc/targhooks.cc ++++ b/gcc/targhooks.cc +@@ -159,6 +159,15 @@ default_promote_function_mode_always_promote (const_tree type, + return promote_mode (type, mode, punsignedp); + } + ++machine_mode ++default_promote_function_mode_ca (cumulative_args_t, function_arg_info arg, ++ const_tree funtype, int *punsignedp, ++ int for_return) ++{ ++ return promote_function_mode (arg.type, arg.mode, punsignedp, ++ funtype, for_return); ++} ++ + machine_mode + default_cc_modes_compatible (machine_mode m1, machine_mode m2) + { +@@ -856,6 +865,14 @@ default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_boundary (mode, type); ++} ++ + unsigned int + default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + const_tree type ATTRIBUTE_UNUSED) +@@ -863,6 +880,14 @@ default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_round_boundary (mode, type); ++} ++ + void + hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED) + { +diff --git a/gcc/targhooks.h b/gcc/targhooks.h +index cf3d3107a0d..cd4e830b2f3 100644 +--- a/gcc/targhooks.h ++++ b/gcc/targhooks.h +@@ -34,6 +34,9 @@ extern machine_mode default_promote_function_mode (const_tree, machine_mode, + extern machine_mode default_promote_function_mode_always_promote + (const_tree, machine_mode, int *, const_tree, int); + ++extern machine_mode default_promote_function_mode_ca ++ (cumulative_args_t, function_arg_info, const_tree, int *, int); ++ + extern machine_mode default_cc_modes_compatible (machine_mode, + machine_mode); + +@@ -158,6 +161,12 @@ extern unsigned int default_function_arg_boundary (machine_mode, + const_tree); + extern unsigned int default_function_arg_round_boundary (machine_mode, + const_tree); ++extern unsigned int default_function_arg_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); ++extern unsigned int default_function_arg_round_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); + extern bool hook_bool_const_rtx_commutative_p (const_rtx, int); + extern rtx default_function_value (const_tree, const_tree, bool); + extern HARD_REG_SET default_zero_call_used_regs (HARD_REG_SET); +diff --git a/gcc/tree-nested.cc b/gcc/tree-nested.cc +index 0f44b3dc735..8355425f0d1 100644 +--- a/gcc/tree-nested.cc ++++ b/gcc/tree-nested.cc +@@ -611,6 +611,14 @@ get_trampoline_type (struct nesting_info *info) + if (trampoline_type) + return trampoline_type; + ++ /* When trampolines are created off-stack then the only thing we need in the ++ local frame is a single pointer. */ ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ trampoline_type = build_pointer_type (void_type_node); ++ return trampoline_type; ++ } ++ + align = TRAMPOLINE_ALIGNMENT; + size = TRAMPOLINE_SIZE; + +@@ -2793,17 +2801,27 @@ convert_tramp_reference_op (tree *tp, int *walk_subtrees, void *data) + + /* Compute the address of the field holding the trampoline. */ + x = get_frame_field (info, target_context, x, &wi->gsi); +- x = build_addr (x); +- x = gsi_gimplify_val (info, x, &wi->gsi); + +- /* Do machine-specific ugliness. Normally this will involve +- computing extra alignment, but it can really be anything. */ +- if (descr) +- builtin = builtin_decl_implicit (BUILT_IN_ADJUST_DESCRIPTOR); ++ /* APB: We don't need to do the adjustment calls when using off-stack ++ trampolines, any such adjustment will be done when the off-stack ++ trampoline is created. */ ++ if (!descr && flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ x = gsi_gimplify_val (info, x, &wi->gsi); + else +- builtin = builtin_decl_implicit (BUILT_IN_ADJUST_TRAMPOLINE); +- call = gimple_build_call (builtin, 1, x); +- x = init_tmp_var_with_call (info, &wi->gsi, call); ++ { ++ x = build_addr (x); ++ ++ x = gsi_gimplify_val (info, x, &wi->gsi); ++ ++ /* Do machine-specific ugliness. Normally this will involve ++ computing extra alignment, but it can really be anything. */ ++ if (descr) ++ builtin = builtin_decl_implicit (BUILT_IN_ADJUST_DESCRIPTOR); ++ else ++ builtin = builtin_decl_implicit (BUILT_IN_ADJUST_TRAMPOLINE); ++ call = gimple_build_call (builtin, 1, x); ++ x = init_tmp_var_with_call (info, &wi->gsi, call); ++ } + + /* Cast back to the proper function type. */ + x = build1 (NOP_EXPR, TREE_TYPE (t), x); +@@ -3382,6 +3400,7 @@ build_init_call_stmt (struct nesting_info *info, tree decl, tree field, + static void + finalize_nesting_tree_1 (struct nesting_info *root) + { ++ gimple_seq cleanup_list = NULL; + gimple_seq stmt_list = NULL; + gimple *stmt; + tree context = root->context; +@@ -3513,9 +3532,48 @@ finalize_nesting_tree_1 (struct nesting_info *root) + if (!field) + continue; + +- x = builtin_decl_implicit (BUILT_IN_INIT_TRAMPOLINE); +- stmt = build_init_call_stmt (root, i->context, field, x); +- gimple_seq_add_stmt (&stmt_list, stmt); ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ /* We pass a whole bunch of arguments to the builtin function that ++ creates the off-stack trampoline, these are ++ 1. The nested function chain value (that must be passed to the ++ nested function so it can find the function arguments). ++ 2. A pointer to the nested function implementation, ++ 3. The address in the local stack frame where we should write ++ the address of the trampoline. ++ ++ When this code was originally written I just kind of threw ++ everything at the builtin, figuring I'd work out what was ++ actually needed later, I think, the stack pointer could ++ certainly be dropped, arguments #2 and #4 are based off the ++ stack pointer anyway, so #1 doesn't seem to add much value. */ ++ tree arg1, arg2, arg3; ++ ++ gcc_assert (DECL_STATIC_CHAIN (i->context)); ++ arg1 = build_addr (root->frame_decl); ++ arg2 = build_addr (i->context); ++ ++ x = build3 (COMPONENT_REF, TREE_TYPE (field), ++ root->frame_decl, field, NULL_TREE); ++ arg3 = build_addr (x); ++ ++ x = builtin_decl_explicit (BUILT_IN_GCC_NESTED_PTR_CREATED); ++ stmt = gimple_build_call (x, 3, arg1, arg2, arg3); ++ gimple_seq_add_stmt (&stmt_list, stmt); ++ ++ /* This call to delete the nested function trampoline is added to ++ the cleanup list, and called when we exit the current scope. */ ++ x = builtin_decl_explicit (BUILT_IN_GCC_NESTED_PTR_DELETED); ++ stmt = gimple_build_call (x, 0); ++ gimple_seq_add_stmt (&cleanup_list, stmt); ++ } ++ else ++ { ++ /* Original code to initialise the on stack trampoline. */ ++ x = builtin_decl_implicit (BUILT_IN_INIT_TRAMPOLINE); ++ stmt = build_init_call_stmt (root, i->context, field, x); ++ gimple_seq_add_stmt (&stmt_list, stmt); ++ } + } + } + +@@ -3540,11 +3598,40 @@ finalize_nesting_tree_1 (struct nesting_info *root) + /* If we created initialization statements, insert them. */ + if (stmt_list) + { +- gbind *bind; +- annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); +- bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); +- gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); +- gimple_bind_set_body (bind, stmt_list); ++ if (flag_trampoline_impl == TRAMPOLINE_IMPL_HEAP) ++ { ++ /* Handle off-stack trampolines. */ ++ gbind *bind; ++ annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); ++ annotate_all_with_location (cleanup_list, DECL_SOURCE_LOCATION (context)); ++ bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); ++ gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); ++ ++ gimple_seq xxx_list = NULL; ++ ++ if (cleanup_list != NULL) ++ { ++ /* Maybe we shouldn't be creating this try/finally if -fno-exceptions is ++ in use. If this is the case, then maybe we should, instead, be ++ inserting the cleanup code onto every path out of this function? Not ++ yet figured out how we would do this. */ ++ gtry *t = gimple_build_try (stmt_list, cleanup_list, GIMPLE_TRY_FINALLY); ++ gimple_seq_add_stmt (&xxx_list, t); ++ } ++ else ++ xxx_list = stmt_list; ++ ++ gimple_bind_set_body (bind, xxx_list); ++ } ++ else ++ { ++ /* The traditional, on stack trampolines. */ ++ gbind *bind; ++ annotate_all_with_location (stmt_list, DECL_SOURCE_LOCATION (context)); ++ bind = gimple_seq_first_stmt_as_a_bind (gimple_body (context)); ++ gimple_seq_add_seq (&stmt_list, gimple_bind_body (bind)); ++ gimple_bind_set_body (bind, stmt_list); ++ } + } + + /* If a chain_decl was created, then it needs to be registered with +diff --git a/gcc/tree.cc b/gcc/tree.cc +index 9c54c2926a5..032b87ee1c8 100644 +--- a/gcc/tree.cc ++++ b/gcc/tree.cc +@@ -9865,6 +9865,28 @@ build_common_builtin_nodes (void) + "__builtin_nonlocal_goto", + ECF_NORETURN | ECF_NOTHROW); + ++ tree ptr_ptr_type_node = build_pointer_type (ptr_type_node); ++ ++ if (!builtin_decl_explicit_p (BUILT_IN_GCC_NESTED_PTR_CREATED)) ++ { ++ ftype = build_function_type_list (void_type_node, ++ ptr_type_node, // void *chain ++ ptr_type_node, // void *func ++ ptr_ptr_type_node, // void **dst ++ NULL_TREE); ++ local_define_builtin ("__builtin___gcc_nested_func_ptr_created", ftype, ++ BUILT_IN_GCC_NESTED_PTR_CREATED, ++ "__gcc_nested_func_ptr_created", ECF_NOTHROW); ++ } ++ ++ if (!builtin_decl_explicit_p (BUILT_IN_GCC_NESTED_PTR_DELETED)) ++ { ++ ftype = build_function_type_list (void_type_node, NULL_TREE); ++ local_define_builtin ("__builtin___gcc_nested_func_ptr_deleted", ftype, ++ BUILT_IN_GCC_NESTED_PTR_DELETED, ++ "__gcc_nested_func_ptr_deleted", ECF_NOTHROW); ++ } ++ + ftype = build_function_type_list (void_type_node, + ptr_type_node, ptr_type_node, NULL_TREE); + local_define_builtin ("__builtin_setjmp_setup", ftype, +diff --git a/intl/Makefile.in b/intl/Makefile.in +index 409d693c48e..5beebdc152c 100644 +--- a/intl/Makefile.in ++++ b/intl/Makefile.in +@@ -54,7 +54,7 @@ CTAGS = @CTAGS@ + ETAGS = @ETAGS@ + MKID = @MKID@ + +-COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(DEFS-$@) $(INCLUDES) ++COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) @PICFLAG@ $(DEFS) $(DEFS-$@) $(INCLUDES) + + HEADERS = \ + gmo.h \ +diff --git a/intl/configure b/intl/configure +index 03f40487a92..79bb5831a47 100755 +--- a/intl/configure ++++ b/intl/configure +@@ -623,6 +623,8 @@ ac_header_list= + ac_subst_vars='LTLIBOBJS + LIBOBJS + PICFLAG ++enable_host_pie ++enable_host_shared + BISON3_NO + BISON3_YES + INCINTL +@@ -731,6 +733,7 @@ with_libintl_prefix + with_libintl_type + enable_maintainer_mode + enable_host_shared ++enable_host_pie + ' + ac_precious_vars='build_alias + host_alias +@@ -1356,6 +1359,7 @@ Optional Features: + --disable-rpath do not hardcode runtime library paths + --enable-maintainer-mode enable rules only needed by maintainers + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -6852,15 +6856,31 @@ fi + + + ++# Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + + +- + ac_config_files="$ac_config_files Makefile config.intl" + + cat >confcache <<\_ACEOF +diff --git a/intl/configure.ac b/intl/configure.ac +index 16a740aa230..81aa831f59f 100644 +--- a/intl/configure.ac ++++ b/intl/configure.ac +@@ -83,10 +83,25 @@ fi + AC_SUBST(BISON3_YES) + AC_SUBST(BISON3_NO) + ++# Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi + AC_SUBST(PICFLAG) + + AC_CONFIG_FILES(Makefile config.intl) +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index c6c8d81c56a..3bb32f32ebf 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -65,8 +65,13 @@ libatomic_version_script = + libatomic_version_dep = + endif + libatomic_version_info = -version-info $(libtool_VERSION) ++if ENABLE_DARWIN_AT_RPATH ++libatomic_darwin_rpath = -Wc,-nodefaultrpaths ++libatomic_darwin_rpath += -Wl,-rpath,@loader_path ++endif + +-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) ++libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ ++ $(lt_host_flags) $(libatomic_darwin_rpath) + libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ + fenv.c fence.c flag.c + +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index a0fa3dfc8cc..ef7ef451751 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -417,7 +417,12 @@ noinst_LTLIBRARIES = libatomic_convenience.la + @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map + @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun + libatomic_version_info = -version-info $(libtool_VERSION) +-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libatomic_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ ++ $(lt_host_flags) $(libatomic_darwin_rpath) ++ + libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c \ + init.c fenv.c fence.c flag.c $(am__append_2) + SIZEOBJS = load store cas exch fadd fsub fand fior fxor fnand tas +diff --git a/libatomic/configure b/libatomic/configure +index e47d2d7fb35..7c1d46b6762 100755 +--- a/libatomic/configure ++++ b/libatomic/configure +@@ -658,6 +658,8 @@ OPT_LDFLAGS + SECTION_LDFLAGS + enable_aarch64_lse + libtool_VERSION ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE +@@ -803,6 +805,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_symvers + enable_werror +@@ -1452,6 +1455,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7608,7 +7614,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9581,6 +9587,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9598,9 +9647,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11406,7 +11459,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11409 "configure" ++#line 11462 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11512,7 +11565,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11515 "configure" ++#line 11568 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11797,6 +11850,15 @@ fi + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=3:0:2 + +@@ -15924,6 +15986,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + if test -z "${LIBAT_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBAT_BUILD_VERSIONED_SHLIB_FALSE}"; then + as_fn_error $? "conditional \"LIBAT_BUILD_VERSIONED_SHLIB\" was never defined. +diff --git a/libatomic/configure.ac b/libatomic/configure.ac +index 31304685dbd..20981f16f70 100644 +--- a/libatomic/configure.ac ++++ b/libatomic/configure.ac +@@ -156,6 +156,8 @@ AC_SUBST(enable_shared) + AC_SUBST(enable_static) + AM_MAINTAINER_MODE + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=3:0:2 + AC_SUBST(libtool_VERSION) +diff --git a/libbacktrace/configure b/libbacktrace/configure +index 6af2c04c81a..4a25e38a2dc 100755 +--- a/libbacktrace/configure ++++ b/libbacktrace/configure +@@ -681,6 +681,8 @@ PIC_FLAG + WARN_FLAGS + EXTRA_FLAGS + BACKTRACE_FILE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + OTOOL64 + OTOOL + LIPO +@@ -805,6 +807,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_largefile + enable_cet + enable_werror +@@ -1453,6 +1456,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-largefile omit support for large files + --enable-cet enable Intel CET in target libraries [default=auto] + --disable-werror disable building with -Werror +@@ -8010,7 +8016,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9716,6 +9722,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9733,9 +9782,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11541,7 +11594,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11544 "configure" ++#line 11597 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11647,7 +11700,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11650 "configure" ++#line 11703 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11886,6 +11939,15 @@ CC="$lt_save_CC" + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # Check whether --enable-largefile was given. + if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +@@ -14435,6 +14497,10 @@ if test -z "${HAVE_DWZ_TRUE}" && test -z "${HAVE_DWZ_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DWZ\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${HAVE_ELF_TRUE}" && test -z "${HAVE_ELF_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ELF\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac +index 39e6bf41e35..98b96fcb86f 100644 +--- a/libbacktrace/configure.ac ++++ b/libbacktrace/configure.ac +@@ -84,6 +84,8 @@ AM_CONDITIONAL(HAVE_DWZ, test "$DWZ" != "") + LT_INIT + AM_PROG_LIBTOOL + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_SYS_LARGEFILE + + backtrace_supported=yes +diff --git a/libcc1/configure b/libcc1/configure +index bae3b8712b6..cd9acc3bf13 100755 +--- a/libcc1/configure ++++ b/libcc1/configure +@@ -787,6 +787,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_cet + with_gcc_major_version_only + enable_werror_always +@@ -1439,6 +1440,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in host libraries [default=auto] + --enable-werror-always enable -Werror despite compiler version + --enable-plugin enable plugin support +@@ -7271,7 +7275,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8976,6 +8980,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8993,9 +9040,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10801,7 +10852,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10804 "configure" ++#line 10855 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10907,7 +10958,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10910 "configure" ++#line 10961 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12189,6 +12240,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12206,12 +12300,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +diff --git a/libcody/Makefile.in b/libcody/Makefile.in +index bb87468cb9a..cb01b0092d8 100644 +--- a/libcody/Makefile.in ++++ b/libcody/Makefile.in +@@ -31,7 +31,7 @@ endif + CXXOPTS += $(filter-out -DHAVE_CONFIG_H,@DEFS@) -include config.h + + # Linker options +-LDFLAGS := @LDFLAGS@ ++LDFLAGS := @LDFLAGS@ @LD_PICFLAG@ + LIBS := @LIBS@ + + # Per-source & per-directory compile flags (warning: recursive) +diff --git a/libcody/configure b/libcody/configure +index da52a5cfca5..0e536c0ccb0 100755 +--- a/libcody/configure ++++ b/libcody/configure +@@ -591,7 +591,10 @@ configure_args + AR + RANLIB + EXCEPTIONS ++LD_PICFLAG + PICFLAG ++enable_host_pie ++enable_host_shared + OBJEXT + EXEEXT + ac_ct_CXX +@@ -653,6 +656,7 @@ enable_maintainer_mode + with_compiler + enable_checking + enable_host_shared ++enable_host_pie + enable_exceptions + ' + ac_precious_vars='build_alias +@@ -1286,6 +1290,7 @@ Optional Features: + yes,no,all,none,release. Flags are: misc,valgrind or + other strings + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-exceptions enable exceptions & rtti + + Optional Packages: +@@ -2635,11 +2640,34 @@ fi + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++else ++ LD_PICFLAG= ++fi ++ ++ + + + # Check whether --enable-exceptions was given. +diff --git a/libcody/configure.ac b/libcody/configure.ac +index 960191ecb72..14e8dd4a226 100644 +--- a/libcody/configure.ac ++++ b/libcody/configure.ac +@@ -63,9 +63,31 @@ fi + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ ++if test x$enable_host_pie = xyes; then ++ LD_PICFLAG=-pie ++else ++ LD_PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) ++AC_SUBST(LD_PICFLAG) + + NMS_ENABLE_EXCEPTIONS + +diff --git a/libcpp/configure b/libcpp/configure +index e9937cde330..1389ddab544 100755 +--- a/libcpp/configure ++++ b/libcpp/configure +@@ -625,6 +625,8 @@ ac_includes_default="\ + ac_subst_vars='LTLIBOBJS + CET_HOST_FLAGS + PICFLAG ++enable_host_pie ++enable_host_shared + MAINT + USED_CATALOGS + PACKAGE +@@ -738,6 +740,7 @@ enable_maintainer_mode + enable_checking + enable_canonical_system_headers + enable_host_shared ++enable_host_pie + enable_cet + enable_valgrind_annotations + ' +@@ -1379,6 +1382,7 @@ Optional Features: + --enable-canonical-system-headers + enable or disable system headers canonicalization + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-cet enable Intel CET in host libraries [default=auto] + --enable-valgrind-annotations + enable valgrind runtime interaction +@@ -7605,7 +7609,23 @@ esac + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi +diff --git a/libcpp/configure.ac b/libcpp/configure.ac +index 89ac99b04bd..b29b4d6acf1 100644 +--- a/libcpp/configure.ac ++++ b/libcpp/configure.ac +@@ -211,8 +211,23 @@ esac + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. +diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h +index b8e50ae15bb..26474a470ac 100644 +--- a/libcpp/include/cpplib.h ++++ b/libcpp/include/cpplib.h +@@ -756,6 +756,9 @@ struct cpp_callbacks + /* Callback to determine whether a built-in function is recognized. */ + int (*has_builtin) (cpp_reader *); + ++ /* Callback to determine whether a feature is available. */ ++ int (*has_feature) (cpp_reader *, bool); ++ + /* Callback that can change a user lazy into normal macro. */ + void (*user_lazy_macro) (cpp_reader *, cpp_macro *, unsigned); + +@@ -960,7 +963,9 @@ enum cpp_builtin_type + BT_HAS_STD_ATTRIBUTE, /* `__has_c_attribute(x)' */ + BT_HAS_BUILTIN, /* `__has_builtin(x)' */ + BT_HAS_INCLUDE, /* `__has_include(x)' */ +- BT_HAS_INCLUDE_NEXT /* `__has_include_next(x)' */ ++ BT_HAS_INCLUDE_NEXT, /* `__has_include_next(x)' */ ++ BT_HAS_FEATURE, /* `__has_feature(x)' */ ++ BT_HAS_EXTENSION /* `__has_extension(x)' */ + }; + + #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) +diff --git a/libcpp/init.cc b/libcpp/init.cc +index c508f06112a..465dafefe9d 100644 +--- a/libcpp/init.cc ++++ b/libcpp/init.cc +@@ -433,6 +433,8 @@ static const struct builtin_macro builtin_array[] = + B("__has_builtin", BT_HAS_BUILTIN, true), + B("__has_include", BT_HAS_INCLUDE, true), + B("__has_include_next",BT_HAS_INCLUDE_NEXT, true), ++ B("__has_feature", BT_HAS_FEATURE, true), ++ B("__has_extension", BT_HAS_EXTENSION, true), + /* Keep builtins not used for -traditional-cpp at the end, and + update init_builtins() if any more are added. */ + B("_Pragma", BT_PRAGMA, true), +diff --git a/libcpp/macro.cc b/libcpp/macro.cc +index d4238d4f621..d2e8f9bd411 100644 +--- a/libcpp/macro.cc ++++ b/libcpp/macro.cc +@@ -677,6 +677,12 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, + number = builtin_has_include (pfile, node, + node->value.builtin == BT_HAS_INCLUDE_NEXT); + break; ++ ++ case BT_HAS_FEATURE: ++ case BT_HAS_EXTENSION: ++ number = pfile->cb.has_feature (pfile, ++ node->value.builtin == BT_HAS_FEATURE); ++ break; + } + + if (result == NULL) +diff --git a/libdecnumber/configure b/libdecnumber/configure +index fb6db05565a..84bc4ffc767 100755 +--- a/libdecnumber/configure ++++ b/libdecnumber/configure +@@ -626,6 +626,8 @@ ac_subst_vars='LTLIBOBJS + LIBOBJS + CET_HOST_FLAGS + PICFLAG ++enable_host_pie ++enable_host_shared + ADDITIONAL_OBJS + enable_decimal_float + target_os +@@ -706,6 +708,7 @@ enable_werror_always + enable_maintainer_mode + enable_decimal_float + enable_host_shared ++enable_host_pie + enable_cet + ' + ac_precious_vars='build_alias +@@ -1338,6 +1341,7 @@ Optional Features: + or 'dpd' choses which decimal floating point format + to use + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + --enable-cet enable Intel CET in host libraries [default=auto] + + Some influential environment variables: +@@ -5186,7 +5190,23 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + # Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi +diff --git a/libdecnumber/configure.ac b/libdecnumber/configure.ac +index aafd06f8a64..30a51ca410b 100644 +--- a/libdecnumber/configure.ac ++++ b/libdecnumber/configure.ac +@@ -100,8 +100,23 @@ AC_C_BIGENDIAN + # Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi ++ + AC_SUBST(PICFLAG) + + # Enable Intel CET on Intel CET enabled host if jit is enabled. +diff --git a/libffi/Makefile.am b/libffi/Makefile.am +index c6d6f849c53..d2ae0c04c7b 100644 +--- a/libffi/Makefile.am ++++ b/libffi/Makefile.am +@@ -214,7 +214,12 @@ libffi.map: $(top_srcdir)/libffi.map.in + $(COMPILE) -D$(TARGET) -DGENERATE_LIBFFI_MAP \ + -E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in + +-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) ++if ENABLE_DARWIN_AT_RPATH ++libffi_darwin_rpath = -Wl,-rpath,@loader_path ++endif ++libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \ ++ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \ ++ $(libffi_darwin_rpath) + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src +diff --git a/libffi/Makefile.in b/libffi/Makefile.in +index 5524a6a571e..34e77a45d1a 100644 +--- a/libffi/Makefile.in ++++ b/libffi/Makefile.in +@@ -597,7 +597,11 @@ AM_CFLAGS = -Wall -g -fexceptions $(CET_FLAGS) $(am__append_2) + @LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map + @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun + libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libffi_darwin_rpath = -Wl,-rpath,@loader_path ++libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \ ++ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \ ++ $(libffi_darwin_rpath) ++ + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src + AM_CCASFLAGS = $(AM_CPPFLAGS) $(CET_FLAGS) +diff --git a/libffi/configure b/libffi/configure +index 2bb9f8d83d6..0fae8b5c96d 100755 +--- a/libffi/configure ++++ b/libffi/configure +@@ -667,6 +667,8 @@ MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE + READELF ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CXXCPP + CPP + OTOOL64 +@@ -810,6 +812,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_pax_emutramp + enable_debug +@@ -1465,6 +1468,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7797,7 +7803,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9771,6 +9777,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9788,9 +9837,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11596,7 +11649,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11599 "configure" ++#line 11652 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11702,7 +11755,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11705 "configure" ++#line 11758 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12578,6 +12631,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -12595,12 +12691,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -14970,6 +15074,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +@@ -17115,6 +17227,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libffi/configure.ac b/libffi/configure.ac +index 014d89d0423..716f20ae313 100644 +--- a/libffi/configure.ac ++++ b/libffi/configure.ac +@@ -55,6 +55,7 @@ AC_SUBST(CET_FLAGS) + AM_PROG_AS + AM_PROG_CC_C_O + AC_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AC_CHECK_TOOL(READELF, readelf) + +diff --git a/libffi/doc/version.texi b/libffi/doc/version.texi +index f2b741e87e4..6261b21fec9 100644 +--- a/libffi/doc/version.texi ++++ b/libffi/doc/version.texi +@@ -1,4 +1,4 @@ +-@set UPDATED 27 June 2021 +-@set UPDATED-MONTH June 2021 ++@set UPDATED 31 August 2022 ++@set UPDATED-MONTH August 2022 + @set EDITION 3.4.2 + @set VERSION 3.4.2 +diff --git a/libgcc/config.host b/libgcc/config.host +index 9aa36bf2210..761340364c4 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -82,7 +82,7 @@ m32c*-*-*) + cpu_type=m32c + tmake_file=t-fdpbit + ;; +-aarch64*-*-*) ++aarch64*-*-* | arm64*-*-*) + cpu_type=aarch64 + ;; + alpha*-*-*) +@@ -233,9 +233,11 @@ case ${host} in + ;; + esac + tmake_file="$tmake_file t-slibgcc-darwin" +- # newer toolsets produce warnings when building for unsupported versions. + case ${host} in +- *-*-darwin1[89]* | *-*-darwin2* ) ++ *-*-darwin2*) ++ tmake_file="t-darwin-min-11 $tmake_file" ++ ;; ++ *-*-darwin1[89]*) + tmake_file="t-darwin-min-8 $tmake_file" + ;; + *-*-darwin1[67]]*) +@@ -254,7 +256,29 @@ case ${host} in + echo "Warning: libgcc configured to support macOS 10.5" 1>&2 + ;; + esac +- extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a" ++ # We are not using libtool to build the libs here, so we need to replicate ++ # a little of the logic around setting Darwin rpaths. Setting an explicit ++ # yes or no is honoured, otherwise we choose a suitable default. ++ # Sadly, this has to be kept in line with the rules in libtool.m4. ++ # This make fragment will override the setting in t-slibgcc-darwin so it ++ # must appear after it. ++ if test "x$enable_darwin_at_rpath" = "x"; then ++ echo "enable_darwin_at_rpath is unset" 1>&2 ++ case ${host} in ++ *-darwin[45678]*) ;; ++ *-darwin9* | *-darwin1[01234]*) ;; # We might default these on later. ++ *-darwin*) ++ echo "but is needed after macOS 10.11 (setting it on)" 1>&2 ++ enable_darwin_at_rpath=yes ++ ;; ++ esac ++ else ++ echo "enable_darwin_at_rpath is '$enable_darwin_at_rpath'" 1>&2 ++ fi ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ tmake_file="$tmake_file t-darwin-rpath " ++ fi ++ extra_parts="crt3.o crttms.o crttme.o libemutls_w.a " + ;; + *-*-dragonfly*) + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" +@@ -398,6 +422,15 @@ aarch64*-*-elf | aarch64*-*-rtems*) + tmake_file="${tmake_file} t-dfprules" + md_unwind_header=aarch64/aarch64-unwind.h + ;; ++aarch64*-*-darwin*) ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} ${cpu_type}/t-aarch64" ++ tmake_file="${tmake_file} ${cpu_type}/t-lse " ++ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp " ++ tmake_file="${tmake_file} t-crtfm t-dfprules" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" ++ md_unwind_header=aarch64/aarch64-unwind.h ++ ;; + aarch64*-*-freebsd*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" +@@ -426,6 +459,7 @@ aarch64*-*-linux*) + tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" + tmake_file="${tmake_file} t-dfprules" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" + ;; + aarch64*-*-vxworks7*) + extra_parts="$extra_parts crtfastmath.o" +@@ -694,12 +728,18 @@ hppa*-*-netbsd*) + i[34567]86-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" +- extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ++ extra_parts="$extra_parts libd10-uwfef.a " ++ extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" +- extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ++ extra_parts="$extra_parts libd10-uwfef.a " ++ extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-elfiamcu) + tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/32/t-iamcu i386/t-softfp t-softfp t-dfprules" +@@ -749,6 +789,7 @@ i[34567]86-*-linux*) + tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules" + tm_file="${tm_file} i386/elf-lib.h" + md_unwind_header=i386/linux-unwind.h ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-kopensolaris*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" +@@ -766,6 +807,7 @@ x86_64-*-linux*) + tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules" + tm_file="${tm_file} i386/elf-lib.h" + md_unwind_header=i386/linux-unwind.h ++ tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-kfreebsd*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" +@@ -1174,12 +1216,14 @@ powerpc-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc64-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc*-*-freebsd*) +diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c +new file mode 100644 +index 00000000000..b2c69aa5892 +--- /dev/null ++++ b/libgcc/config/aarch64/heap-trampoline.c +@@ -0,0 +1,185 @@ ++/* Copyright The GNU Toolchain Authors. */ ++ ++/* libc is required to allocate trampolines. */ ++#ifndef inhibit_libc ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if __APPLE__ ++/* For pthread_jit_write_protect_np */ ++#include ++#endif ++ ++/* HEAP_T_ATTR is provided to allow targets to build the exported functions ++ as weak definitions. */ ++#ifndef HEAP_T_ATTR ++# define HEAP_T_ATTR ++#endif ++ ++void *allocate_trampoline_page (void); ++int get_trampolines_per_page (void); ++struct tramp_ctrl_data *allocate_tramp_ctrl (struct tramp_ctrl_data *parent); ++void *allocate_trampoline_page (void); ++ ++void __gcc_nested_func_ptr_created (void *chain, void *func, void **dst); ++void __gcc_nested_func_ptr_deleted (void); ++ ++#if defined(__linux__) ++static const unsigned char aarch64_trampoline_insns[6][4] = { ++ {0x5f, 0x24, 0x03, 0xd5}, /* hint 34 */ ++ {0xb1, 0x00, 0x00, 0x58}, /* ldr x17, .+20 */ ++ {0xd2, 0x00, 0x00, 0x58}, /* ldr x18, .+24 */ ++ {0x20, 0x02, 0x1f, 0xd6}, /* br x17 */ ++ {0x9f, 0x3f, 0x03, 0xd5}, /* dsb sy */ ++ {0xdf, 0x3f, 0x03, 0xd5} /* isb */ ++}; ++ ++#elif __APPLE__ ++static const unsigned char aarch64_trampoline_insns[6][4] = { ++ {0x5f, 0x24, 0x03, 0xd5}, /* hint 34 */ ++ {0xb1, 0x00, 0x00, 0x58}, /* ldr x17, .+20 */ ++ {0xd0, 0x00, 0x00, 0x58}, /* ldr x16, .+24 */ ++ {0x20, 0x02, 0x1f, 0xd6}, /* br x17 */ ++ {0x9f, 0x3f, 0x03, 0xd5}, /* dsb sy */ ++ {0xdf, 0x3f, 0x03, 0xd5} /* isb */ ++}; ++ ++#else ++#error "Unsupported AArch64 platform for heap trampolines" ++#endif ++ ++struct aarch64_trampoline { ++ unsigned char insns[6][4]; ++ void *func_ptr; ++ void *chain_ptr; ++}; ++ ++struct tramp_ctrl_data ++{ ++ struct tramp_ctrl_data *prev; ++ ++ int free_trampolines; ++ ++ /* This will be pointing to an executable mmap'ed page. */ ++ struct aarch64_trampoline *trampolines; ++}; ++ ++int ++get_trampolines_per_page (void) ++{ ++ return getpagesize() / sizeof(struct aarch64_trampoline); ++} ++ ++static _Thread_local struct tramp_ctrl_data *tramp_ctrl_curr = NULL; ++ ++void * ++allocate_trampoline_page (void) ++{ ++ void *page; ++ ++#if defined(__linux__) ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++#elif __APPLE__ ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE | MAP_JIT, 0, 0); ++#else ++ page = MAP_FAILED; ++#endif ++ ++ return page; ++} ++ ++struct tramp_ctrl_data * ++allocate_tramp_ctrl (struct tramp_ctrl_data *parent) ++{ ++ struct tramp_ctrl_data *p = malloc (sizeof (struct tramp_ctrl_data)); ++ if (p == NULL) ++ return NULL; ++ ++ p->trampolines = allocate_trampoline_page (); ++ ++ if (p->trampolines == MAP_FAILED) ++ return NULL; ++ ++ p->prev = parent; ++ p->free_trampolines = get_trampolines_per_page(); ++ ++ return p; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_created (void *chain, void *func, void **dst) ++{ ++ if (tramp_ctrl_curr == NULL) ++ { ++ tramp_ctrl_curr = allocate_tramp_ctrl (NULL); ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ } ++ ++ if (tramp_ctrl_curr->free_trampolines == 0) ++ { ++ void *tramp_ctrl = allocate_tramp_ctrl (tramp_ctrl_curr); ++ if (!tramp_ctrl) ++ abort (); ++ ++ tramp_ctrl_curr = tramp_ctrl; ++ } ++ ++ struct aarch64_trampoline *trampoline ++ = &tramp_ctrl_curr->trampolines[get_trampolines_per_page () ++ - tramp_ctrl_curr->free_trampolines]; ++ ++#if __APPLE__ ++ /* Disable write protection for the MAP_JIT regions in this thread (see ++ https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) */ ++ pthread_jit_write_protect_np (0); ++#endif ++ ++ memcpy (trampoline->insns, aarch64_trampoline_insns, ++ sizeof(aarch64_trampoline_insns)); ++ trampoline->func_ptr = func; ++ trampoline->chain_ptr = chain; ++ ++#if __APPLE__ ++ /* Re-enable write protection. */ ++ pthread_jit_write_protect_np (1); ++#endif ++ ++ tramp_ctrl_curr->free_trampolines -= 1; ++ ++ __builtin___clear_cache ((void *)trampoline->insns, ++ ((void *)trampoline->insns + sizeof(trampoline->insns))); ++ ++ *dst = &trampoline->insns; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_deleted (void) ++{ ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ ++ tramp_ctrl_curr->free_trampolines += 1; ++ ++ if (tramp_ctrl_curr->free_trampolines == get_trampolines_per_page ()) ++ { ++ if (tramp_ctrl_curr->prev == NULL) ++ return; ++ ++ munmap (tramp_ctrl_curr->trampolines, getpagesize()); ++ struct tramp_ctrl_data *prev = tramp_ctrl_curr->prev; ++ free (tramp_ctrl_curr); ++ tramp_ctrl_curr = prev; ++ } ++} ++ ++#endif /* !inhibit_libc */ +diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S +index dde3a28e07b..c392ca27419 100644 +--- a/libgcc/config/aarch64/lse.S ++++ b/libgcc/config/aarch64/lse.S +@@ -58,7 +58,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #endif + + /* Declare the symbol gating the LSE implementations. */ ++#if __ELF__ + .hidden __aarch64_have_lse_atomics ++#else ++ .private_extern __aarch64_have_lse_atomics ++#endif + + /* Turn size and memory model defines into mnemonic fragments. */ + #if SIZE == 1 +@@ -164,6 +168,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define BTI_C hint 34 + + /* Start and end a function. */ ++#if __ELF__ + .macro STARTFN name + .text + .balign 16 +@@ -187,6 +192,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + cbz w(tmp0), \label + .endm + ++#else ++.macro STARTFN name ++ .text ++ .balign 16 ++ .private_extern _\name ++_\name: ++ BTI_C ++ .cfi_startproc ++.endm ++ ++.macro ENDFN name ++ .cfi_endproc ++.endm ++ ++/* Branch to LABEL if LSE is disabled. */ ++.macro JUMP_IF_NOT_LSE label ++ adrp x(tmp0), ___aarch64_have_lse_atomics@PAGE ++ ldrb w(tmp0), [x(tmp0), ___aarch64_have_lse_atomics@PAGEOFF] ++ cbz w(tmp0), \label ++.endm ++ ++#endif ++ + #ifdef L_cas + + STARTFN NAME(cas) +diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h +index 97c38a34c86..b35e2c5e29a 100644 +--- a/libgcc/config/aarch64/sfp-machine.h ++++ b/libgcc/config/aarch64/sfp-machine.h +@@ -124,6 +124,27 @@ void __sfp_handle_exceptions (int); + + + /* Define ALIASNAME as a strong alias for NAME. */ ++#if defined __APPLE__ ++/* Mach-O doesn't support aliasing, so we build a secondary function for ++ the alias - we need to do a bit of a dance to find out what the type of ++ the arguments is and then apply that to the secondary function. ++ If these functions ever return anything but CMPtype we need to revisit ++ this... */ ++typedef float alias_HFtype __attribute__ ((mode (HF))); ++typedef float alias_SFtype __attribute__ ((mode (SF))); ++typedef float alias_DFtype __attribute__ ((mode (DF))); ++typedef float alias_TFtype __attribute__ ((mode (TF))); ++#define ALIAS_SELECTOR \ ++ CMPtype (*) (alias_HFtype, alias_HFtype): (alias_HFtype) 0, \ ++ CMPtype (*) (alias_SFtype, alias_SFtype): (alias_SFtype) 0, \ ++ CMPtype (*) (alias_DFtype, alias_DFtype): (alias_DFtype) 0, \ ++ CMPtype (*) (alias_TFtype, alias_TFtype): (alias_TFtype) 0 ++#define strong_alias(name, aliasname) \ ++ CMPtype aliasname (__typeof (_Generic (name, ALIAS_SELECTOR)) a, \ ++ __typeof (_Generic (name, ALIAS_SELECTOR)) b) \ ++ { return name (a, b); } ++#else + # define strong_alias(name, aliasname) _strong_alias(name, aliasname) + # define _strong_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); ++#endif +diff --git a/libgcc/config/aarch64/t-darwin b/libgcc/config/aarch64/t-darwin +new file mode 100644 +index 00000000000..f6ecda7b608 +--- /dev/null ++++ b/libgcc/config/aarch64/t-darwin +@@ -0,0 +1,7 @@ ++# Ensure we have a suitable minimum OS version. ++ ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=11.0 ++ ++LIB2_SIDITI_CONV_FUNCS = yes ++ ++BUILD_LIBGCCS1 = +diff --git a/libgcc/config/aarch64/t-heap-trampoline b/libgcc/config/aarch64/t-heap-trampoline +new file mode 100644 +index 00000000000..6468fb8704f +--- /dev/null ++++ b/libgcc/config/aarch64/t-heap-trampoline +@@ -0,0 +1,20 @@ ++# Copyright The GNU Toolchain Authors. ++ ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB2ADDEH += $(srcdir)/config/aarch64/heap-trampoline.c ++LIB2ADDEHSHARED += $(srcdir)/config/aarch64/heap-trampoline.c +diff --git a/libgcc/config/i386/heap-trampoline.c b/libgcc/config/i386/heap-trampoline.c +new file mode 100644 +index 00000000000..2e8df1cfbd2 +--- /dev/null ++++ b/libgcc/config/i386/heap-trampoline.c +@@ -0,0 +1,255 @@ ++/* Copyright The GNU Toolchain Authors. */ ++ ++/* libc is required to allocate trampolines. */ ++#ifndef inhibit_libc ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++/* For pthread_jit_write_protect_np */ ++#include ++#endif ++ ++/* HEAP_T_ATTR is provided to allow targets to build the exported functions ++ as weak definitions. */ ++#ifndef HEAP_T_ATTR ++# define HEAP_T_ATTR ++#endif ++ ++void *allocate_trampoline_page (void); ++int get_trampolines_per_page (void); ++struct tramp_ctrl_data *allocate_tramp_ctrl (struct tramp_ctrl_data *parent); ++void *allocate_trampoline_page (void); ++ ++void __gcc_nested_func_ptr_created (void *chain, void *func, void **dst); ++void __gcc_nested_func_ptr_deleted (void); ++ ++#if __x86_64__ ++ ++#ifdef __LP64__ ++static const uint8_t trampoline_insns[] = { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ /* endbr64. */ ++ 0xf3, 0x0f, 0x1e, 0xfa, ++#endif ++ ++ /* movabsq $,%r11 */ ++ 0x49, 0xbb, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ ++ /* movabsq $,%r10 */ ++ 0x49, 0xba, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ ++ /* rex.WB jmpq *%r11 */ ++ 0x41, 0xff, 0xe3, ++ ++ /* Pad to the multiple of 4 bytes. */ ++ 0x90 ++}; ++#else ++static const uint8_t trampoline_insns[] = { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ /* endbr64. */ ++ 0xf3, 0x0f, 0x1e, 0xfa, ++#endif ++ ++ /* movl $,%r11d */ ++ 0x41, 0xbb, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* movl $,%r10d */ ++ 0x41, 0xba, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* rex.WB jmpq *%r11 */ ++ 0x41, 0xff, 0xe3, ++ ++ /* Pad to the multiple of 4 bytes. */ ++ 0x90 ++}; ++#endif ++ ++union ix86_trampoline { ++ uint8_t insns[sizeof(trampoline_insns)]; ++ ++ struct __attribute__((packed)) fields { ++#if defined __CET__ && (__CET__ & 1) != 0 ++ uint8_t endbr64[4]; ++#endif ++ uint8_t insn_0[2]; ++ void *func_ptr; ++ uint8_t insn_1[2]; ++ void *chain_ptr; ++ uint8_t insn_2[3]; ++ uint8_t pad; ++ } fields; ++}; ++ ++#elif __i386__ ++ ++static const uint8_t trampoline_insns[] = { ++ /* movl $,%ecx */ ++ 0xb9, ++ 0x00, 0x00, 0x00, 0x00, ++ ++ /* jmpl -. */ ++ 0xe9, ++ 0x00, 0x00, 0x00, 0x00, ++}; ++ ++union ix86_trampoline { ++ uint8_t insns[sizeof(trampoline_insns)]; ++ ++ struct __attribute__((packed)) fields { ++ uint8_t insn_0[1]; ++ void *chain_ptr; ++ uint8_t insn_1[1]; ++ uintptr_t func_offset; ++ } fields; ++}; ++ ++#else ++#error unsupported architecture/ABI ++#endif ++ ++struct tramp_ctrl_data ++{ ++ struct tramp_ctrl_data *prev; ++ ++ int free_trampolines; ++ ++ /* This will be pointing to an executable mmap'ed page. */ ++ union ix86_trampoline *trampolines; ++}; ++ ++int ++get_trampolines_per_page (void) ++{ ++ return getpagesize() / sizeof(union ix86_trampoline); ++} ++ ++static _Thread_local struct tramp_ctrl_data *tramp_ctrl_curr = NULL; ++ ++void * ++allocate_trampoline_page (void) ++{ ++ void *page; ++ ++#if defined(__gnu_linux__) ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++#elif __APPLE__ ++# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE | MAP_JIT, 0, 0); ++# else ++ page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC, ++ MAP_ANON | MAP_PRIVATE, 0, 0); ++# endif ++#else ++ page = MAP_FAILED; ++#endif ++ ++ return page; ++} ++ ++struct tramp_ctrl_data * ++allocate_tramp_ctrl (struct tramp_ctrl_data *parent) ++{ ++ struct tramp_ctrl_data *p = malloc (sizeof (struct tramp_ctrl_data)); ++ if (p == NULL) ++ return NULL; ++ ++ p->trampolines = allocate_trampoline_page (); ++ ++ if (p->trampolines == MAP_FAILED) ++ return NULL; ++ ++ p->prev = parent; ++ p->free_trampolines = get_trampolines_per_page(); ++ ++ return p; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_created (void *chain, void *func, void **dst) ++{ ++ if (tramp_ctrl_curr == NULL) ++ { ++ tramp_ctrl_curr = allocate_tramp_ctrl (NULL); ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ } ++ ++ if (tramp_ctrl_curr->free_trampolines == 0) ++ { ++ void *tramp_ctrl = allocate_tramp_ctrl (tramp_ctrl_curr); ++ if (!tramp_ctrl) ++ abort (); ++ ++ tramp_ctrl_curr = tramp_ctrl; ++ } ++ ++ union ix86_trampoline *trampoline ++ = &tramp_ctrl_curr->trampolines[get_trampolines_per_page () ++ - tramp_ctrl_curr->free_trampolines]; ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ /* Disable write protection for the MAP_JIT regions in this thread (see ++ https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) */ ++ pthread_jit_write_protect_np (0); ++#endif ++ ++ memcpy (trampoline->insns, trampoline_insns, ++ sizeof(trampoline_insns)); ++ trampoline->fields.chain_ptr = chain; ++#if __x86_64__ ++ trampoline->fields.func_ptr = func; ++#elif __i386__ ++ uintptr_t off_add = (uintptr_t) &trampoline->fields.func_offset; ++ off_add += 4; ++ trampoline->fields.func_offset = (uintptr_t)func - off_add; ++#endif ++ ++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400 ++ /* Re-enable write protection. */ ++ pthread_jit_write_protect_np (1); ++#endif ++ ++ tramp_ctrl_curr->free_trampolines -= 1; ++ ++ __builtin___clear_cache ((void *)trampoline->insns, ++ ((void *)trampoline->insns + sizeof(trampoline->insns))); ++ ++ *dst = &trampoline->insns; ++} ++ ++HEAP_T_ATTR ++void ++__gcc_nested_func_ptr_deleted (void) ++{ ++ if (tramp_ctrl_curr == NULL) ++ abort (); ++ ++ tramp_ctrl_curr->free_trampolines += 1; ++ ++ if (tramp_ctrl_curr->free_trampolines == get_trampolines_per_page ()) ++ { ++ if (tramp_ctrl_curr->prev == NULL) ++ return; ++ ++ munmap (tramp_ctrl_curr->trampolines, getpagesize()); ++ struct tramp_ctrl_data *prev = tramp_ctrl_curr->prev; ++ free (tramp_ctrl_curr); ++ tramp_ctrl_curr = prev; ++ } ++} ++ ++#endif /* !inhibit_libc */ +diff --git a/libgcc/config/i386/t-heap-trampoline b/libgcc/config/i386/t-heap-trampoline +new file mode 100644 +index 00000000000..5cd11f594ba +--- /dev/null ++++ b/libgcc/config/i386/t-heap-trampoline +@@ -0,0 +1,20 @@ ++# Copyright The GNU Toolchain Authors. ++ ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB2ADDEH += $(srcdir)/config/i386/heap-trampoline.c ++LIB2ADDEHSHARED += $(srcdir)/config/i386/heap-trampoline.c +diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin +index a3bb70c6a0a..0f65b54a230 100644 +--- a/libgcc/config/t-darwin ++++ b/libgcc/config/t-darwin +@@ -51,5 +51,18 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c \ + # Do not build a shared unwind lib by default. + LIBEHSOBJS= + ++# Make heap trampoline helpers weak definitions so that we can merge them from ++# multiple DSOs. ++heap-trampoline.o: HOST_LIBGCC2_CFLAGS += \ ++ -DHEAP_T_ATTR='__attribute__((__weak__,__visibility__("default")))' ++heap-trampoline_s.o: HOST_LIBGCC2_CFLAGS += \ ++ -DHEAP_T_ATTR='__attribute__((__weak__,__visibility__("default")))' ++ ++# Make a heap trampoline support CRT so that it can be linked optionally, use ++# the shared version so that we can link with DSOs. ++libheapt_w.a: heap-trampoline_s.o ++ $(AR_CREATE_FOR_TARGET) $@ $< ++ $(RANLIB_FOR_TARGET) $@ ++ + # Symbols for all the sub-ports. + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/libgcc-libsystem.ver +diff --git a/libgcc/config/t-darwin-min-11 b/libgcc/config/t-darwin-min-11 +new file mode 100644 +index 00000000000..4009d41addb +--- /dev/null ++++ b/libgcc/config/t-darwin-min-11 +@@ -0,0 +1,3 @@ ++# Support building with -mmacosx-version-min back to macOS 11. ++DARWIN_MIN_LIB_VERSION = -mmacosx-version-min=11 ++DARWIN_MIN_CRT_VERSION = -mmacosx-version-min=11 +diff --git a/libgcc/config/t-darwin-rpath b/libgcc/config/t-darwin-rpath +new file mode 100644 +index 00000000000..e73d7f378b0 +--- /dev/null ++++ b/libgcc/config/t-darwin-rpath +@@ -0,0 +1,2 @@ ++# Use @rpath and add a search path to exes and dylibs that depend on this. ++SHLIB_RPATH = @rpath +diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin +index cb0cbbdb1c5..da4886848e8 100644 +--- a/libgcc/config/t-slibgcc-darwin ++++ b/libgcc/config/t-slibgcc-darwin +@@ -1,4 +1,4 @@ +-# Build a shared libgcc library with the darwin linker. ++# Build a shared libgcc library able to use embedded runpaths. + + SHLIB_SOVERSION = 1.1 + SHLIB_SO_MINVERSION = 1 +@@ -6,7 +6,6 @@ SHLIB_VERSTRING = -compatibility_version $(SHLIB_SO_MINVERSION) \ + -current_version $(SHLIB_SOVERSION) + SHLIB_EXT = .dylib + SHLIB_LC = -lSystem +-SHLIB_INSTALL_DIR = $(slibdir) + + SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk + SHLIB_MKMAP_OPTS = -v leading_underscore=1 +@@ -23,11 +22,16 @@ SHLIB_SONAME = @shlib_base_name@$(SHLIB_EXT) + # subdir. The code under MULTIBUILDTOP combines these into a single FAT + # library, that is what we eventually install. + ++# When enable_darwin_at_rpath is true, use @rpath instead of $(slibdir) for ++# this and dylibs that depend on this. So this def must come first and be ++# overridden in a make fragment that depends on the rpath setting. ++SHLIB_RPATH = $(slibdir) ++ + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ +- -install_name $(SHLIB_INSTALL_DIR)/$(SHLIB_INSTALL_NAME) \ ++ -install_name $(SHLIB_RPATH)/$(SHLIB_INSTALL_NAME) \ + -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME) \ + -Wl,-exported_symbols_list,$(SHLIB_MAP) \ +- $(SHLIB_VERSTRING) \ ++ $(SHLIB_VERSTRING) -nodefaultrpaths \ + @multilib_flags@ @shlib_objs@ $(SHLIB_LC) + + # we do our own thing +@@ -63,9 +67,9 @@ EHS_INSTNAME = libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT) + libgcc_ehs$(SHLIB_EXT): $(LIBEHSOBJS) $(extra-parts) + mkdir -p $(MULTIDIR) + $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ +- -install_name $(SHLIB_INSTALL_DIR)/$(EHS_INSTNAME) \ ++ -install_name $(SHLIB_RPATH)/$(EHS_INSTNAME) \ + -o $(MULTIDIR)/libgcc_ehs$(SHLIB_EXT) $(SHLIB_VERSTRING) \ +- $(LIBEHSOBJS) $(SHLIB_LC) ++ -nodefaultrpaths $(LIBEHSOBJS) $(SHLIB_LC) + + all: libgcc_ehs$(SHLIB_EXT) + +@@ -122,12 +126,12 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) \ + cp ../$${mlib}/libgcc/$${mlib}/libgcc_ehs$(SHLIB_EXT) \ + ./libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \ + arch=`$(LIPO) -info libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} | sed -e 's/.*:\ //'` ; \ +- $(CC) -arch $${arch} -nodefaultlibs -dynamiclib \ ++ $(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \ + -o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ +- -install_name $(SHLIB_INSTALL_DIR)/libgcc_s.1.dylib \ +- -compatibility_version 1 -current_version 1 ; \ ++ -install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \ ++ -compatibility_version 1 -current_version 1.1 ; \ + done + $(LIPO) -output libgcc_s.1$(SHLIB_EXT) -create libgcc_s.1$(SHLIB_EXT)_T* + rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T* +@@ -141,13 +145,13 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) + cp ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) \ + ./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \ + arch=`$(LIPO) -info libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} | sed -e 's/.*:\ //'` ; \ +- $(CC) -arch $${arch} -nodefaultlibs -dynamiclib \ ++ $(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \ + -o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \ + -Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \ + -lSystem \ + -Wl,-reexported_symbols_list,$(srcdir)/config/darwin-unwind.ver \ +- -install_name $(SHLIB_INSTALL_DIR)/libgcc_s.1.dylib \ +- -compatibility_version 1 -current_version 1 ; \ ++ -install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \ ++ -compatibility_version 1 -current_version 1.1 ; \ + done + $(LIPO) -output libgcc_s.1$(SHLIB_EXT) -create libgcc_s.1$(SHLIB_EXT)_T* + rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T* +diff --git a/libgcc/libgcc-std.ver.in b/libgcc/libgcc-std.ver.in +index c4f87a50e70..ad854bf0ded 100644 +--- a/libgcc/libgcc-std.ver.in ++++ b/libgcc/libgcc-std.ver.in +@@ -1944,3 +1944,9 @@ GCC_7.0.0 { + __PFX__divmoddi4 + __PFX__divmodti4 + } ++ ++%inherit GCC_14.0.0 GCC_7.0.0 ++GCC_14.0.0 { ++ __gcc_nested_func_ptr_created ++ __gcc_nested_func_ptr_deleted ++} +diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h +index 3ec9bbd8164..a7a5dff0184 100644 +--- a/libgcc/libgcc2.h ++++ b/libgcc/libgcc2.h +@@ -29,6 +29,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #pragma GCC visibility push(default) + #endif + ++extern void __gcc_nested_func_ptr_created (void *, void *, void **); ++extern void __gcc_nested_func_ptr_deleted (void); ++ + extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); + extern void __clear_cache (void *, void *); + extern void __eprintf (const char *, const char *, unsigned int, const char *) +diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am +index 454ad12e701..3d21373ae82 100644 +--- a/libgfortran/Makefile.am ++++ b/libgfortran/Makefile.am +@@ -37,6 +37,11 @@ else + version_arg = + version_dep = + endif ++extra_darwin_ldflags_libgfortran = @extra_ldflags_libgfortran@ ++if ENABLE_DARWIN_AT_RPATH ++extra_darwin_ldflags_libgfortran += -Wc,-nodefaultrpaths ++extra_darwin_ldflags_libgfortran += -Wl,-rpath,@loader_path ++endif + + gfor_c_HEADERS = ISO_Fortran_binding.h + gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include +@@ -50,7 +55,7 @@ libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ + $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \ + $(HWCAP_LDFLAGS) \ +- $(LIBM) $(extra_ldflags_libgfortran) \ ++ $(LIBM) $(extra_darwin_ldflags_libgfortran) \ + $(version_arg) -Wc,-shared-libgcc + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in +index 23df0761096..ed0d05f502a 100644 +--- a/libgfortran/Makefile.in ++++ b/libgfortran/Makefile.in +@@ -91,8 +91,10 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-@LIBGFOR_MINIMAL_TRUE@am__append_1 = -DLIBGFOR_MINIMAL +-@LIBGFOR_MINIMAL_FALSE@am__append_2 = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++@LIBGFOR_MINIMAL_TRUE@am__append_2 = -DLIBGFOR_MINIMAL ++@LIBGFOR_MINIMAL_FALSE@am__append_3 = \ + @LIBGFOR_MINIMAL_FALSE@io/close.c \ + @LIBGFOR_MINIMAL_FALSE@io/file_pos.c \ + @LIBGFOR_MINIMAL_FALSE@io/format.c \ +@@ -110,7 +112,7 @@ target_triplet = @target@ + @LIBGFOR_MINIMAL_FALSE@io/fbuf.c \ + @LIBGFOR_MINIMAL_FALSE@io/async.c + +-@LIBGFOR_MINIMAL_FALSE@am__append_3 = \ ++@LIBGFOR_MINIMAL_FALSE@am__append_4 = \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/access.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/c99_functions.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/chdir.c \ +@@ -143,9 +145,9 @@ target_triplet = @target@ + @LIBGFOR_MINIMAL_FALSE@intrinsics/umask.c \ + @LIBGFOR_MINIMAL_FALSE@intrinsics/unlink.c + +-@IEEE_SUPPORT_TRUE@am__append_4 = ieee/ieee_helper.c +-@LIBGFOR_MINIMAL_TRUE@am__append_5 = runtime/minimal.c +-@LIBGFOR_MINIMAL_FALSE@am__append_6 = \ ++@IEEE_SUPPORT_TRUE@am__append_5 = ieee/ieee_helper.c ++@LIBGFOR_MINIMAL_TRUE@am__append_6 = runtime/minimal.c ++@LIBGFOR_MINIMAL_FALSE@am__append_7 = \ + @LIBGFOR_MINIMAL_FALSE@runtime/backtrace.c \ + @LIBGFOR_MINIMAL_FALSE@runtime/convert_char.c \ + @LIBGFOR_MINIMAL_FALSE@runtime/environ.c \ +@@ -157,7 +159,7 @@ target_triplet = @target@ + + + # dummy sources for libtool +-@onestep_TRUE@am__append_7 = libgfortran_c.c libgfortran_f.f90 ++@onestep_TRUE@am__append_8 = libgfortran_c.c libgfortran_f.f90 + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ +@@ -589,7 +591,7 @@ AMTAR = @AMTAR@ + + # Some targets require additional compiler options for IEEE compatibility. + AM_CFLAGS = @AM_CFLAGS@ -fcx-fortran-rules $(SECTION_FLAGS) \ +- $(IEEE_FLAGS) $(am__append_1) ++ $(IEEE_FLAGS) $(am__append_2) + AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ + AM_FCFLAGS = @AM_FCFLAGS@ $(IEEE_FLAGS) + AR = @AR@ +@@ -749,6 +751,8 @@ gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + @LIBGFOR_USE_SYMVER_FALSE@version_dep = + @LIBGFOR_USE_SYMVER_GNU_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.ver + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.ver-sun gfortran.ver ++extra_darwin_ldflags_libgfortran = @extra_ldflags_libgfortran@ \ ++ $(am__append_1) + gfor_c_HEADERS = ISO_Fortran_binding.h + gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include + LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \ +@@ -760,7 +764,7 @@ libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ + $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \ + $(HWCAP_LDFLAGS) \ +- $(LIBM) $(extra_ldflags_libgfortran) \ ++ $(LIBM) $(extra_darwin_ldflags_libgfortran) \ + $(version_arg) -Wc,-shared-libgcc + + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) +@@ -781,7 +785,7 @@ AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \ + -I$(MULTIBUILDTOP)../libbacktrace \ + -I../libbacktrace + +-gfor_io_src = io/size_from_kind.c $(am__append_2) ++gfor_io_src = io/size_from_kind.c $(am__append_3) + gfor_io_headers = \ + io/io.h \ + io/fbuf.h \ +@@ -803,7 +807,7 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \ + intrinsics/selected_int_kind.f90 \ + intrinsics/selected_real_kind.f90 intrinsics/trigd.c \ + intrinsics/unpack_generic.c runtime/in_pack_generic.c \ +- runtime/in_unpack_generic.c $(am__append_3) $(am__append_4) ++ runtime/in_unpack_generic.c $(am__append_4) $(am__append_5) + @IEEE_SUPPORT_TRUE@gfor_ieee_helper_src = ieee/ieee_helper.c + @IEEE_SUPPORT_FALSE@gfor_ieee_src = + @IEEE_SUPPORT_TRUE@gfor_ieee_src = \ +@@ -812,8 +816,8 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \ + @IEEE_SUPPORT_TRUE@ieee/ieee_features.F90 + + gfor_src = runtime/bounds.c runtime/compile_options.c runtime/memory.c \ +- runtime/string.c runtime/select.c $(am__append_5) \ +- $(am__append_6) ++ runtime/string.c runtime/select.c $(am__append_6) \ ++ $(am__append_7) + i_all_c = \ + $(srcdir)/generated/all_l1.c \ + $(srcdir)/generated/all_l2.c \ +@@ -1653,7 +1657,7 @@ intrinsics/random_init.f90 + + BUILT_SOURCES = $(gfor_built_src) $(gfor_built_specific_src) \ + $(gfor_built_specific2_src) $(gfor_misc_specifics) \ +- $(am__append_7) ++ $(am__append_8) + prereq_SRC = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \ + $(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src) + +diff --git a/libgfortran/configure b/libgfortran/configure +index d7c3a5e27a0..feb75f6e55e 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -654,6 +654,8 @@ extra_ldflags_libgfortran + ac_ct_FC + FCFLAGS + FC ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -823,6 +825,7 @@ enable_static + with_pic + enable_fast_install + enable_libtool_lock ++enable_darwin_at_rpath + enable_largefile + enable_libquadmath_support + with_gcc_major_version_only +@@ -1478,6 +1481,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-largefile omit support for large files + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -9235,7 +9241,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10945,6 +10951,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10962,9 +11011,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12791,7 +12844,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12794 "configure" ++#line 12847 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12897,7 +12950,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12900 "configure" ++#line 12953 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13299,6 +13352,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10 + + # We need gfortran to compile parts of the library +@@ -14942,6 +15003,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes +@@ -14959,9 +15063,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -16234,9 +16342,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # extra LD Flags which are required for targets ++extra_ldflags_libgfortran= + case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libgfortran ++ *-*-darwin[4567]*) ++ # Earlier Darwin needs -single_module when linking libgfortran + extra_ldflags_libgfortran=-Wl,-single_module + ;; + esac +@@ -31597,6 +31706,10 @@ if test -z "${HAVE_HWCAP_TRUE}" && test -z "${HAVE_HWCAP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_HWCAP\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${IEEE_SUPPORT_TRUE}" && test -z "${IEEE_SUPPORT_FALSE}"; then + as_fn_error $? "conditional \"IEEE_SUPPORT\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index 07b9a48a19f..4ee63cf723e 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -282,6 +282,7 @@ LT_LIB_M + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10 + + # We need gfortran to compile parts of the library +@@ -290,9 +291,10 @@ FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets ++extra_ldflags_libgfortran= + case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libgfortran ++ *-*-darwin[[4567]]*) ++ # Earlier Darwin needs -single_module when linking libgfortran + extra_ldflags_libgfortran=-Wl,-single_module + ;; + esac +diff --git a/libgm2/Makefile.am b/libgm2/Makefile.am +index 95df3ed7a30..aa35e747c9a 100644 +--- a/libgm2/Makefile.am ++++ b/libgm2/Makefile.am +@@ -46,6 +46,12 @@ SUBDIRS = libm2min libm2log libm2cor libm2iso libm2pim + GM2_BUILDDIR := $(shell pwd) + gm2_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include + ++if ENABLE_DARWIN_AT_RPATH ++DARWIN_AT_RPATH=yes ++else ++DARWIN_AT_RPATH=yes ++endif ++ + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and + # friends when we are called from the top level Makefile. +@@ -91,7 +97,8 @@ AM_MAKEFLAGS = \ + "WERROR=$(WERROR)" \ + "TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ + "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" \ +- "LIBTOOL=$(GM2_BUILDDIR)/libtool" ++ "LIBTOOL=$(GM2_BUILDDIR)/libtool" \ ++ "DARWIN_AT_RPATH=$(DARWIN_AT_RPATH)" + + # Subdir rules rely on $(FLAGS_TO_PASS) + FLAGS_TO_PASS = $(AM_MAKEFLAGS) +diff --git a/libgm2/Makefile.in b/libgm2/Makefile.in +index 2b9592b3490..f97f6d0812d 100644 +--- a/libgm2/Makefile.in ++++ b/libgm2/Makefile.in +@@ -90,15 +90,15 @@ host_triplet = @host@ + target_triplet = @target@ + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ +- $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ +- $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ +- $(top_srcdir)/../config/acx.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ +- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ +@@ -344,6 +344,8 @@ GM2_SRC = $(GCC_DIR)/m2 + SUBDIRS = libm2min libm2log libm2cor libm2iso libm2pim + GM2_BUILDDIR := $(shell pwd) + gm2_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++@ENABLE_DARWIN_AT_RPATH_FALSE@DARWIN_AT_RPATH = yes ++@ENABLE_DARWIN_AT_RPATH_TRUE@DARWIN_AT_RPATH = yes + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +@@ -390,7 +392,8 @@ AM_MAKEFLAGS = \ + "WERROR=$(WERROR)" \ + "TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ + "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" \ +- "LIBTOOL=$(GM2_BUILDDIR)/libtool" ++ "LIBTOOL=$(GM2_BUILDDIR)/libtool" \ ++ "DARWIN_AT_RPATH=$(DARWIN_AT_RPATH)" + + + # Subdir rules rely on $(FLAGS_TO_PASS) +diff --git a/libgm2/aclocal.m4 b/libgm2/aclocal.m4 +index c352303012d..832065fbb9b 100644 +--- a/libgm2/aclocal.m4 ++++ b/libgm2/aclocal.m4 +@@ -1187,14 +1187,14 @@ AC_SUBST([am__tar]) + AC_SUBST([am__untar]) + ]) # _AM_PROG_TAR + +-m4_include([../libtool.m4]) +-m4_include([../ltoptions.m4]) +-m4_include([../ltsugar.m4]) +-m4_include([../ltversion.m4]) +-m4_include([../lt~obsolete.m4]) + m4_include([../config/acx.m4]) + m4_include([../config/depstand.m4]) + m4_include([../config/lead-dot.m4]) + m4_include([../config/multi.m4]) + m4_include([../config/no-executables.m4]) + m4_include([../config/override.m4]) ++m4_include([../libtool.m4]) ++m4_include([../ltoptions.m4]) ++m4_include([../ltsugar.m4]) ++m4_include([../ltversion.m4]) ++m4_include([../lt~obsolete.m4]) +diff --git a/libgm2/configure b/libgm2/configure +index bf35b403a20..64f4f8034ce 100755 +--- a/libgm2/configure ++++ b/libgm2/configure +@@ -649,6 +649,8 @@ GM2_FOR_TARGET + CC_FOR_BUILD + enable_static + enable_shared ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CXXCPP + OTOOL64 + OTOOL +@@ -806,6 +808,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1456,6 +1459,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -6611,10 +6617,6 @@ fi + + + +-enable_dlopen=yes +- +- +- + case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +@@ -9185,7 +9187,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9233,6 +9235,8 @@ done + + + ++ enable_dlopen=no ++ + + enable_win32_dll=no + +@@ -10896,6 +10900,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10913,9 +10960,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12742,7 +12793,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12745 "configure" ++#line 12796 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12848,7 +12899,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12851 "configure" ++#line 12902 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13730,6 +13781,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13747,12 +13841,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -16126,6 +16228,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++enable_dlopen=yes ++ ++ ++ ++ ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ ++ + + + if test "${multilib}" = "yes"; then +@@ -20314,6 +20431,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${BUILD_PIMLIB_TRUE}" && test -z "${BUILD_PIMLIB_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PIMLIB\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgm2/configure.ac b/libgm2/configure.ac +index 9386bbfe5ec..305d2dc4319 100644 +--- a/libgm2/configure.ac ++++ b/libgm2/configure.ac +@@ -213,8 +213,12 @@ AC_PATH_PROG(PERL, perl, perl-not-found-in-path-error) + AC_PROG_MAKE_SET + AC_PROG_INSTALL + +-AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL ++LT_INIT ++AC_LIBTOOL_DLOPEN ++ ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_SUBST(enable_shared) + AC_SUBST(enable_static) + +diff --git a/libgm2/libm2cor/Makefile.am b/libgm2/libm2cor/Makefile.am +index ae96b4bfe78..a08e6a949e0 100644 +--- a/libgm2/libm2cor/Makefile.am ++++ b/libgm2/libm2cor/Makefile.am +@@ -123,6 +123,10 @@ libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup + else + libm2cor_la_link_flags = + endif ++if ENABLE_DARWIN_AT_RPATH ++libm2cor_la_link_flags += -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++ + libm2cor_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2cor_la_link_flags) + BUILT_SOURCES = SYSTEM.def + CLEANFILES = SYSTEM.def +diff --git a/libgm2/libm2cor/Makefile.in b/libgm2/libm2cor/Makefile.in +index 8daf0eaa054..9e14c90ae7f 100644 +--- a/libgm2/libm2cor/Makefile.in ++++ b/libgm2/libm2cor/Makefile.in +@@ -105,17 +105,18 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++@BUILD_CORLIB_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -nodefaultrpaths -Wl,-rpath,@loader_path/ + subdir = libm2cor + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ +- $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ +- $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ +- $(top_srcdir)/../config/acx.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ +- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am +@@ -469,8 +470,10 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + @BUILD_CORLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ + @BUILD_CORLIB_TRUE@ -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2cor + +-@BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@libm2cor_la_link_flags = +-@BUILD_CORLIB_TRUE@@TARGET_DARWIN_TRUE@libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup ++@BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@libm2cor_la_link_flags = \ ++@BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) ++@BUILD_CORLIB_TRUE@@TARGET_DARWIN_TRUE@libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup \ ++@BUILD_CORLIB_TRUE@@TARGET_DARWIN_TRUE@ $(am__append_1) + @BUILD_CORLIB_TRUE@libm2cor_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2cor_la_link_flags) + @BUILD_CORLIB_TRUE@BUILT_SOURCES = SYSTEM.def + @BUILD_CORLIB_TRUE@CLEANFILES = SYSTEM.def +diff --git a/libgm2/libm2iso/Makefile.am b/libgm2/libm2iso/Makefile.am +index 90d344f0fa8..e88c4b68e4f 100644 +--- a/libgm2/libm2iso/Makefile.am ++++ b/libgm2/libm2iso/Makefile.am +@@ -197,6 +197,10 @@ libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup + else + libm2iso_la_link_flags = + endif ++if ENABLE_DARWIN_AT_RPATH ++libm2iso_la_link_flags += -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++ + libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags) + CLEANFILES = SYSTEM.def + BUILT_SOURCES = SYSTEM.def +diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in +index 8d6443d3946..7be5ad1d601 100644 +--- a/libgm2/libm2iso/Makefile.in ++++ b/libgm2/libm2iso/Makefile.in +@@ -105,17 +105,18 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++@BUILD_ISOLIB_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -nodefaultrpaths -Wl,-rpath,@loader_path/ + subdir = libm2iso + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ +- $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ +- $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ +- $(top_srcdir)/../config/acx.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ +- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am +@@ -570,8 +571,10 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + @BUILD_ISOLIB_TRUE@ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ + @BUILD_ISOLIB_TRUE@ -fiso -fextended-opaque -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2iso + +-@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@libm2iso_la_link_flags = +-@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_TRUE@libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup ++@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@libm2iso_la_link_flags = \ ++@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) ++@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_TRUE@libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup \ ++@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_TRUE@ $(am__append_1) + @BUILD_ISOLIB_TRUE@libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags) + @BUILD_ISOLIB_TRUE@CLEANFILES = SYSTEM.def + @BUILD_ISOLIB_TRUE@BUILT_SOURCES = SYSTEM.def +diff --git a/libgm2/libm2log/Makefile.am b/libgm2/libm2log/Makefile.am +index 27f38406b07..25f5f9b0916 100644 +--- a/libgm2/libm2log/Makefile.am ++++ b/libgm2/libm2log/Makefile.am +@@ -142,6 +142,9 @@ libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup + else + libm2log_la_link_flags = + endif ++if ENABLE_DARWIN_AT_RPATH ++libm2log_la_link_flags += -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif + libm2log_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2log_la_link_flags) + BUILT_SOURCES = ../libm2pim/SYSTEM.def + +diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in +index 2188f9ec0c5..f82ddb61842 100644 +--- a/libgm2/libm2log/Makefile.in ++++ b/libgm2/libm2log/Makefile.in +@@ -105,17 +105,18 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++@BUILD_LOGLIB_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -nodefaultrpaths -Wl,-rpath,@loader_path/ + subdir = libm2log + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ +- $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ +- $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ +- $(top_srcdir)/../config/acx.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ +- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am +@@ -478,8 +479,10 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + @BUILD_LOGLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ + @BUILD_LOGLIB_TRUE@ -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2log + +-@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@libm2log_la_link_flags = +-@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_TRUE@libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup ++@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@libm2log_la_link_flags = \ ++@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) ++@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_TRUE@libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup \ ++@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_TRUE@ $(am__append_1) + @BUILD_LOGLIB_TRUE@libm2log_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2log_la_link_flags) + @BUILD_LOGLIB_TRUE@BUILT_SOURCES = ../libm2pim/SYSTEM.def + @BUILD_LOGLIB_TRUE@M2LIBDIR = /m2/m2log/ +diff --git a/libgm2/libm2min/Makefile.am b/libgm2/libm2min/Makefile.am +index 1ff160028f6..21411769505 100644 +--- a/libgm2/libm2min/Makefile.am ++++ b/libgm2/libm2min/Makefile.am +@@ -113,6 +113,9 @@ libm2min_la_link_flags = -Wl,-undefined,dynamic_lookup + else + libm2min_la_link_flags = + endif ++if ENABLE_DARWIN_AT_RPATH ++libm2min_la_link_flags += -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif + libm2min_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2min_la_link_flags) + BUILT_SOURCES = SYSTEM.def + CLEANFILES = SYSTEM.def +diff --git a/libgm2/libm2min/Makefile.in b/libgm2/libm2min/Makefile.in +index 42cba0e37b9..ed3312deb0f 100644 +--- a/libgm2/libm2min/Makefile.in ++++ b/libgm2/libm2min/Makefile.in +@@ -105,17 +105,18 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -nodefaultrpaths -Wl,-rpath,@loader_path/ + subdir = libm2min + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ +- $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ +- $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ +- $(top_srcdir)/../config/acx.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ +- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am +@@ -442,8 +443,10 @@ libm2min_la_M2FLAGS = \ + -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs -fno-exceptions \ + -fno-m2-plugin -fno-scaffold-dynamic -fno-scaffold-main -fm2-prefix=m2min + +-@TARGET_DARWIN_FALSE@libm2min_la_link_flags = +-@TARGET_DARWIN_TRUE@libm2min_la_link_flags = -Wl,-undefined,dynamic_lookup ++@TARGET_DARWIN_FALSE@libm2min_la_link_flags = $(am__append_1) ++@TARGET_DARWIN_TRUE@libm2min_la_link_flags = \ ++@TARGET_DARWIN_TRUE@ -Wl,-undefined,dynamic_lookup \ ++@TARGET_DARWIN_TRUE@ $(am__append_1) + libm2min_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2min_la_link_flags) + BUILT_SOURCES = SYSTEM.def + CLEANFILES = SYSTEM.def +diff --git a/libgm2/libm2pim/Makefile.am b/libgm2/libm2pim/Makefile.am +index ac172b93337..61d6c814cc4 100644 +--- a/libgm2/libm2pim/Makefile.am ++++ b/libgm2/libm2pim/Makefile.am +@@ -175,6 +175,9 @@ libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup + else + libm2pim_la_link_flags = + endif ++if ENABLE_DARWIN_AT_RPATH ++libm2pim_la_link_flags += -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif + libm2pim_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2pim_la_link_flags) + BUILT_SOURCES = SYSTEM.def + CLEANFILES = SYSTEM.def +diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in +index 4c2d574392b..0f3a6fe940e 100644 +--- a/libgm2/libm2pim/Makefile.in ++++ b/libgm2/libm2pim/Makefile.in +@@ -105,17 +105,18 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++@BUILD_PIMLIB_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_1 = -nodefaultrpaths -Wl,-rpath,@loader_path/ + subdir = libm2pim + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ +- $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ +- $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ +- $(top_srcdir)/../config/acx.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ +- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + DIST_COMMON = $(srcdir)/Makefile.am +@@ -539,8 +540,10 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + @BUILD_PIMLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ + @BUILD_PIMLIB_TRUE@ -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2pim + +-@BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@libm2pim_la_link_flags = +-@BUILD_PIMLIB_TRUE@@TARGET_DARWIN_TRUE@libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup ++@BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@libm2pim_la_link_flags = \ ++@BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) ++@BUILD_PIMLIB_TRUE@@TARGET_DARWIN_TRUE@libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup \ ++@BUILD_PIMLIB_TRUE@@TARGET_DARWIN_TRUE@ $(am__append_1) + @BUILD_PIMLIB_TRUE@libm2pim_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2pim_la_link_flags) + @BUILD_PIMLIB_TRUE@BUILT_SOURCES = SYSTEM.def + @BUILD_PIMLIB_TRUE@CLEANFILES = SYSTEM.def +diff --git a/libgo/configure b/libgo/configure +index a607dbff68e..72d46c3eec3 100755 +--- a/libgo/configure ++++ b/libgo/configure +@@ -708,6 +708,8 @@ glibgo_toolexecdir + WERROR + WARN_FLAGS + CC_FOR_BUILD ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CPP +@@ -11544,7 +11546,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11547 "configure" ++#line 11549 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11650,7 +11652,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11653 "configure" ++#line 11655 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13779,6 +13781,14 @@ CC="$lt_save_CC" + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} + +@@ -16386,6 +16396,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${USE_LIBFFI_TRUE}" && test -z "${USE_LIBFFI_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBFFI\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgo/configure.ac b/libgo/configure.ac +index a59aa091d1d..6f1ac32660b 100644 +--- a/libgo/configure.ac ++++ b/libgo/configure.ac +@@ -53,6 +53,7 @@ AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} + AC_SUBST(CC_FOR_BUILD) +diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am +index 428f7a9dab5..ceb8c910abd 100644 +--- a/libgomp/Makefile.am ++++ b/libgomp/Makefile.am +@@ -53,9 +53,14 @@ else + libgomp_version_script = + libgomp_version_dep = + endif ++ + libgomp_version_info = -version-info $(libtool_VERSION) ++if ENABLE_DARWIN_AT_RPATH ++libgomp_darwin_rpath = -Wc,-nodefaultrpaths ++libgomp_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ +- $(lt_host_flags) ++ $(lt_host_flags) $(libgomp_darwin_rpath) + libgomp_la_LIBADD = + libgomp_la_DEPENDENCIES = $(libgomp_version_dep) + libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) +diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in +index f1afb5ef57f..ef97186e68d 100644 +--- a/libgomp/Makefile.in ++++ b/libgomp/Makefile.in +@@ -535,8 +535,11 @@ nodist_toolexeclib_HEADERS = libgomp.spec + @LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver + @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver-sun + libgomp_version_info = -version-info $(libtool_VERSION) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgomp_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ +- $(lt_host_flags) ++ $(lt_host_flags) $(libgomp_darwin_rpath) + + libgomp_la_LIBADD = $(DL_LIBS) + libgomp_la_DEPENDENCIES = $(libgomp_version_dep) +diff --git a/libgomp/configure b/libgomp/configure +index 389500df738..1c219c29f5e 100755 +--- a/libgomp/configure ++++ b/libgomp/configure +@@ -682,6 +682,8 @@ FC + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -822,6 +824,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_linux_futex + enable_tls +@@ -1477,6 +1480,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7621,7 +7627,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9594,6 +9600,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9611,9 +9660,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11419,7 +11472,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11422 "configure" ++#line 11475 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11525,7 +11578,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11528 "configure" ++#line 11581 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11786,6 +11839,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -13461,6 +13522,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes +@@ -13478,9 +13582,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -17129,6 +17237,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libgomp/configure.ac b/libgomp/configure.ac +index dd88f20103a..5deba114027 100644 +--- a/libgomp/configure.ac ++++ b/libgomp/configure.ac +@@ -149,6 +149,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +diff --git a/libiberty/configure b/libiberty/configure +index 860f981fa18..b8a19c42110 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5258,8 +5258,8 @@ case "${enable_shared}" in + *) shared=yes ;; + esac + +-# ...unless --enable-host-shared was passed from top-level config: +-if [ "${enable_host_shared}" = "yes" ]; then ++# ...unless --enable-host-{shared,pie} was passed from top-level config: ++if [ "${enable_host_shared}" = "yes" ] || [ "${enable_host_pie}" = "yes" ]; then + shared=yes + fi + +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 28d996f9cf7..6747a7b5cff 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -233,8 +233,8 @@ case "${enable_shared}" in + *) shared=yes ;; + esac + +-# ...unless --enable-host-shared was passed from top-level config: +-if [[ "${enable_host_shared}" = "yes" ]]; then ++# ...unless --enable-host-{shared,pie} was passed from top-level config: ++if [[ "${enable_host_shared}" = "yes" ]] || [[ "${enable_host_pie}" = "yes" ]]; then + shared=yes + fi + +diff --git a/libitm/Makefile.am b/libitm/Makefile.am +index 3f31ad30556..a25317b07fe 100644 +--- a/libitm/Makefile.am ++++ b/libitm/Makefile.am +@@ -54,7 +54,12 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++if ENABLE_DARWIN_AT_RPATH ++libitm_darwin_rpath = -Wc,-nodefaultrpaths ++libitm_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \ ++ $(libitm_darwin_rpath) + + libitm_la_SOURCES = \ + aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \ +diff --git a/libitm/Makefile.in b/libitm/Makefile.in +index 7f53ea9b9db..ed28db45057 100644 +--- a/libitm/Makefile.in ++++ b/libitm/Makefile.in +@@ -481,7 +481,12 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libitm_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \ ++ $(libitm_darwin_rpath) ++ + libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \ + barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \ + retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \ +diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S +index 0342516cdc8..2c27f46dc43 100644 +--- a/libitm/config/aarch64/sjlj.S ++++ b/libitm/config/aarch64/sjlj.S +@@ -57,10 +57,19 @@ + + .text + .align 2 ++#if __ELF__ + .global _ITM_beginTransaction + .type _ITM_beginTransaction, %function + + _ITM_beginTransaction: ++ ++#elif __MACH__ ++ .global __ITM_beginTransaction ++ ++__ITM_beginTransaction: ++ ++#endif ++ + cfi_startproc + CFI_PAC_KEY + PAC_AND_BTI +@@ -84,8 +93,13 @@ _ITM_beginTransaction: + + /* Invoke GTM_begin_transaction with the struct we just built. */ + mov x1, sp ++#if __ELF__ + bl GTM_begin_transaction +- ++#elif __MACH__ ++ bl _GTM_begin_transaction ++#else ++#error "unexpected object format" ++#endif + /* Return; we don't need to restore any of the call-saved regs. */ + ldp x29, x30, [sp], 11*16 + cfi_adjust_cfa_offset(-11*16) +@@ -95,14 +109,23 @@ _ITM_beginTransaction: + CFI_PAC_TOGGLE + ret + cfi_endproc ++#if __ELF__ + .size _ITM_beginTransaction, . - _ITM_beginTransaction ++#endif + + .align 2 ++#if __ELF__ + .global GTM_longjmp + .hidden GTM_longjmp + .type GTM_longjmp, %function + + GTM_longjmp: ++ ++#elif __MACH__ ++ .private_extern _GTM_longjmp ++ ++_GTM_longjmp: ++#endif + /* The first parameter becomes the return value (x0). + The third parameter is ignored for now. */ + cfi_startproc +@@ -126,7 +149,9 @@ GTM_longjmp: + CFI_PAC_TOGGLE + br x30 + cfi_endproc ++#if __ELF__ + .size GTM_longjmp, . - GTM_longjmp ++#endif + + /* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ + #define FEATURE_1_AND 0xc0000000 +diff --git a/libitm/configure b/libitm/configure +index 6230c04dd24..b941ecf83f9 100755 +--- a/libitm/configure ++++ b/libitm/configure +@@ -660,6 +660,8 @@ libtool_VERSION + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CXXCPP +@@ -810,6 +812,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + enable_linux_futex + enable_tls +@@ -1462,6 +1465,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -8283,7 +8289,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10257,6 +10263,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10274,9 +10323,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12082,7 +12135,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12085 "configure" ++#line 12138 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12188,7 +12241,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12191 "configure" ++#line 12244 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13064,6 +13117,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13081,12 +13177,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15458,6 +15562,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -18216,6 +18328,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libitm/configure.ac b/libitm/configure.ac +index 050d6b23e18..d0d108e1737 100644 +--- a/libitm/configure.ac ++++ b/libitm/configure.ac +@@ -157,6 +157,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes") + AM_PROG_LIBTOOL + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +diff --git a/libitm/configure.tgt b/libitm/configure.tgt +index 0362e61570a..2818a587ebf 100644 +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -50,7 +50,7 @@ fi + # Map the target cpu to an ARCH sub-directory. At the same time, + # work out any special compilation flags as necessary. + case "${target_cpu}" in +- aarch64*) ARCH=aarch64 ;; ++ aarch64* | arm64*) ARCH=aarch64 ;; + alpha*) ARCH=alpha ;; + rs6000 | powerpc*) + XCFLAGS="${XCFLAGS} -mhtm" +diff --git a/libobjc/configure b/libobjc/configure +index 6da20b8e4ff..ce18c249b66 100755 +--- a/libobjc/configure ++++ b/libobjc/configure +@@ -636,6 +636,9 @@ OBJC_BOEHM_GC_LIBS + OBJC_BOEHM_GC_INCLUDES + OBJC_BOEHM_GC + OBJC_GCFLAGS ++extra_ldflags_libobjc ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + SET_MAKE + CPP + OTOOL64 +@@ -667,7 +670,6 @@ RANLIB + AR + AS + XCFLAGS +-extra_ldflags_libobjc + lt_host_flags + OBJEXT + EXEEXT +@@ -755,6 +757,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_tls + enable_objc_gc + with_target_bdw_gc +@@ -1392,6 +1395,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-tls Use thread-local storage [default=yes] + --enable-objc-gc enable use of Boehm's garbage collector with the GNU + Objective-C runtime +@@ -3431,17 +3437,6 @@ esac + + + +-case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libobjc +- extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' +- ;; +- *-cygwin*|*-mingw*) +- # Tell libtool to build DLLs on Windows +- extra_ldflags_libobjc='$(lt_host_flags)' +- ;; +-esac +- + + # Add CET specific flags if CET is enabled + +@@ -6973,7 +6968,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8950,6 +8945,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8967,9 +9005,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10796,7 +10838,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10799 "configure" ++#line 10841 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10902,7 +10944,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10905 "configure" ++#line 10947 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11174,6 +11216,38 @@ $as_echo "no" >&6; } + fi + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ ++# Must come after libtool is initialized. ++case "${host}" in ++ *-darwin[4567]*) ++ # Earlier Darwin versions need -single_module when linking libobjc; they ++ # do not support @rpath. ++ extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ++ ;; ++ *-darwin*) ++ # Otherwise, single_module is the default and multi-module is ignored and ++ # obsolete. ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wc,-nodefaultrpaths" ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wl,-rpath,@loader_path" ++ fi ++ ;; ++ *-cygwin*|*-mingw*) ++ # Tell libtool to build DLLs on Windows ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ ;; ++esac ++ ++ + # ------- + # Headers + # ------- +@@ -11915,6 +11989,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libobjc/configure.ac b/libobjc/configure.ac +index 9bd7d59d597..cb21ebbfcc7 100644 +--- a/libobjc/configure.ac ++++ b/libobjc/configure.ac +@@ -148,17 +148,6 @@ m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) + + # extra LD Flags which are required for targets + ACX_LT_HOST_FLAGS +-case "${host}" in +- *-darwin*) +- # Darwin needs -single_module when linking libobjc +- extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' +- ;; +- *-cygwin*|*-mingw*) +- # Tell libtool to build DLLs on Windows +- extra_ldflags_libobjc='$(lt_host_flags)' +- ;; +-esac +-AC_SUBST(extra_ldflags_libobjc) + + # Add CET specific flags if CET is enabled + GCC_CET_FLAGS(CET_FLAGS) +@@ -183,6 +172,31 @@ AM_PROG_CC_C_O + + AC_PROG_MAKE_SET + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ ++# Must come after libtool is initialized. ++case "${host}" in ++ *-darwin[[4567]]*) ++ # Earlier Darwin versions need -single_module when linking libobjc; they ++ # do not support @rpath. ++ extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ++ ;; ++ *-darwin*) ++ # Otherwise, single_module is the default and multi-module is ignored and ++ # obsolete. ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wc,-nodefaultrpaths" ++ extra_ldflags_libobjc="${extra_ldflags_libobjc} -Wl,-rpath,@loader_path" ++ fi ++ ;; ++ *-cygwin*|*-mingw*) ++ # Tell libtool to build DLLs on Windows ++ extra_ldflags_libobjc='$(lt_host_flags)' ++ ;; ++esac ++AC_SUBST(extra_ldflags_libobjc) ++ + # ------- + # Headers + # ------- +diff --git a/libphobos/configure b/libphobos/configure +index 925c53c5f5e..2e8c06d4d48 100755 +--- a/libphobos/configure ++++ b/libphobos/configure +@@ -707,6 +707,8 @@ get_gcc_base_ver + phobos_compiler_shared_flag + phobos_compiler_pic_flag + phobos_lt_pic_flag ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + OTOOL64 +@@ -838,6 +840,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_gcc_major_version_only + enable_werror + with_libatomic +@@ -1490,6 +1493,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-werror turns on -Werror [default=no] + --enable-version-specific-runtime-libs + Specify that runtime libraries should be installed +@@ -8244,7 +8250,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9949,6 +9955,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9966,9 +10015,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11774,7 +11827,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11777 "configure" ++#line 11830 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11880,7 +11933,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11883 "configure" ++#line 11936 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13405,6 +13458,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_D=no + hardcode_direct_D=no + hardcode_automatic_D=yes +@@ -13422,9 +13518,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_D="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_D="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_D="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_D="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_D="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_D="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -14026,6 +14126,14 @@ CFLAGS=$lt_save_CFLAGS + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # libtool variables for Phobos shared and position-independent compiles. + # +@@ -15750,6 +15858,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${DRUNTIME_CPU_AARCH64_TRUE}" && test -z "${DRUNTIME_CPU_AARCH64_FALSE}"; then + as_fn_error $? "conditional \"DRUNTIME_CPU_AARCH64\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libphobos/configure.ac b/libphobos/configure.ac +index 464f4105430..ba8b5ecd65b 100644 +--- a/libphobos/configure.ac ++++ b/libphobos/configure.ac +@@ -93,6 +93,7 @@ AM_PROG_LIBTOOL + WITH_LOCAL_DRUNTIME([LT_LANG([D])], []) + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # libtool variables for Phobos shared and position-independent compiles. + # +diff --git a/libphobos/libdruntime/Makefile.am b/libphobos/libdruntime/Makefile.am +index 8225ba4a028..186948806d5 100644 +--- a/libphobos/libdruntime/Makefile.am ++++ b/libphobos/libdruntime/Makefile.am +@@ -128,8 +128,11 @@ ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \ + toolexeclib_LTLIBRARIES = libgdruntime.la + libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES) + libgdruntime_la_LIBTOOLFLAGS = ++if ENABLE_DARWIN_AT_RPATH ++libgdruntime_darwin_rpath = -Wl,-rpath,@loader_path ++endif + libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgdruntime_darwin_rpath) + libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE) + libgdruntime_la_DEPENDENCIES = $(DRTSTUFF) + # Also override library link commands: This is not strictly +diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in +index 797d6435a7c..cd13090010f 100644 +--- a/libphobos/libdruntime/Makefile.in ++++ b/libphobos/libdruntime/Makefile.in +@@ -810,8 +810,9 @@ ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \ + toolexeclib_LTLIBRARIES = libgdruntime.la + libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES) + libgdruntime_la_LIBTOOLFLAGS = ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgdruntime_darwin_rpath = -Wl,-rpath,@loader_path + libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgdruntime_darwin_rpath) + + libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE) + libgdruntime_la_DEPENDENCIES = $(DRTSTUFF) +diff --git a/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d b/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d +index 6d19247fbe0..4239d1942ab 100644 +--- a/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d ++++ b/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d +@@ -29,8 +29,13 @@ module core.internal.gc.impl.conservative.gc; + + /***************************************************/ + version = COLLECT_PARALLEL; // parallel scanning +-version (Posix) +- version = COLLECT_FORK; ++version (GNU) ++{ ++ version (linux) ++ version = COLLECT_FORK; // uses clone(), battle tested and reliable ++} ++else version (Posix) ++ version = COLLECT_FORK; + + import core.internal.gc.bits; + import core.internal.gc.os; +diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am +index 6474fca5eb5..f6521ed5860 100644 +--- a/libphobos/src/Makefile.am ++++ b/libphobos/src/Makefile.am +@@ -44,8 +44,11 @@ toolexeclib_DATA = libgphobos.spec + toolexeclib_LTLIBRARIES = libgphobos.la + libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) + libgphobos_la_LIBTOOLFLAGS = ++if ENABLE_DARWIN_AT_RPATH ++libgphobos_darwin_rpath = -Wl,-rpath,@loader_path ++endif + libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgphobos_darwin_rpath) + if ENABLE_LIBDRUNTIME_ONLY + libgphobos_la_LIBADD = ../libdruntime/libgdruntime_convenience.la + else +diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in +index a6229587e7b..cc3358b437e 100644 +--- a/libphobos/src/Makefile.in ++++ b/libphobos/src/Makefile.in +@@ -529,8 +529,9 @@ toolexeclib_DATA = libgphobos.spec + toolexeclib_LTLIBRARIES = libgphobos.la + libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) + libgphobos_la_LIBTOOLFLAGS = ++@ENABLE_DARWIN_AT_RPATH_TRUE@libgphobos_darwin_rpath = -Wl,-rpath,@loader_path + libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ +- -version-info $(libtool_VERSION) ++ -version-info $(libtool_VERSION) $(libgphobos_darwin_rpath) + + @ENABLE_LIBDRUNTIME_ONLY_FALSE@libgphobos_la_LIBADD = \ + @ENABLE_LIBDRUNTIME_ONLY_FALSE@ ../libdruntime/libgdruntime_convenience.la $(LIBZ) +diff --git a/libquadmath/Makefile.am b/libquadmath/Makefile.am +index 35dffb46f6e..f199adf4602 100644 +--- a/libquadmath/Makefile.am ++++ b/libquadmath/Makefile.am +@@ -36,8 +36,13 @@ endif + + toolexeclib_LTLIBRARIES = libquadmath.la + libquadmath_la_LIBADD = ++ ++if ENABLE_DARWIN_AT_RPATH ++libquadmath_darwin_rpath = -Wc,-nodefaultrpaths ++libquadmath_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) -lm ++ $(version_arg) $(lt_host_flags) $(LIBM) $(libquadmath_darwin_rpath) + libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + + nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in +index 8c011212258..70025758cd5 100644 +--- a/libquadmath/Makefile.in ++++ b/libquadmath/Makefile.in +@@ -355,6 +355,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LD = @LD@ + LDFLAGS = @LDFLAGS@ ++LIBM = @LIBM@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -463,8 +464,10 @@ AUTOMAKE_OPTIONS = foreign info-in-builddir + @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = quadmath.map-sun + @BUILD_LIBQUADMATH_TRUE@toolexeclib_LTLIBRARIES = libquadmath.la + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LIBADD = ++@BUILD_LIBQUADMATH_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@libquadmath_darwin_rpath = -Wc,-nodefaultrpaths \ ++@BUILD_LIBQUADMATH_TRUE@@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +-@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) -lm ++@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) $(LIBM) $(libquadmath_darwin_rpath) + + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + @BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +diff --git a/libquadmath/configure b/libquadmath/configure +index 958fb876c5b..c51d4f3776c 100755 +--- a/libquadmath/configure ++++ b/libquadmath/configure +@@ -644,11 +644,14 @@ LIBQUAD_USE_SYMVER_GNU_FALSE + LIBQUAD_USE_SYMVER_GNU_TRUE + LIBQUAD_USE_SYMVER_FALSE + LIBQUAD_USE_SYMVER_TRUE ++LIBM + toolexeclibdir + toolexecdir + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -785,6 +788,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_maintainer_mode + with_toolexeclibdir + enable_symvers +@@ -1435,6 +1439,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +@@ -7272,7 +7279,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8984,6 +8991,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9001,9 +9051,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10830,7 +10884,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10833 "configure" ++#line 10887 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10936,7 +10990,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10939 "configure" ++#line 10993 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11197,6 +11251,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +@@ -12161,6 +12223,20 @@ esac + + + ++# AC_CHECK_LIBM variant which avoids AC_CHECK_LIB (that doesn't work ++# on bare metal). In the past we've used -lm in Makefile.am unconditionally, ++# let's use it there unless target knows it doesn't need that. ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*) ++ LIBM=-lm ++ ;; ++esac ++ ++ + for ac_header in fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +@@ -13421,6 +13497,10 @@ if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac +index eec4084a45f..349be2607c6 100644 +--- a/libquadmath/configure.ac ++++ b/libquadmath/configure.ac +@@ -59,6 +59,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + AM_MAINTAINER_MODE + +@@ -121,6 +122,20 @@ esac + AC_SUBST(toolexecdir) + AC_SUBST(toolexeclibdir) + ++# AC_CHECK_LIBM variant which avoids AC_CHECK_LIB (that doesn't work ++# on bare metal). In the past we've used -lm in Makefile.am unconditionally, ++# let's use it there unless target knows it doesn't need that. ++LIBM= ++case $host in ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++ # These system don't have libm, or don't need it ++ ;; ++*) ++ LIBM=-lm ++ ;; ++esac ++AC_SUBST([LIBM]) ++ + AC_CHECK_HEADERS(fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h) + LIBQUAD_CHECK_MATH_H_SIGNGAM + +diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am +index 4f802f723d6..223d3e07816 100644 +--- a/libsanitizer/asan/Makefile.am ++++ b/libsanitizer/asan/Makefile.am +@@ -60,7 +60,12 @@ libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) + +-libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) ++if ENABLE_DARWIN_AT_RPATH ++libasan_darwin_rpath = -Wc,-nodefaultrpaths ++libasan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libasan) $(libasan_darwin_rpath) + + libasan_preinit.o: asan_preinit.o + cp $< $@ +diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in +index 7833a9a4c3f..e88e5e0b0a7 100644 +--- a/libsanitizer/asan/Makefile.in ++++ b/libsanitizer/asan/Makefile.in +@@ -465,7 +465,12 @@ libasan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/lsan/libsanitizer_lsan.la $(am__append_2) \ + $(am__append_3) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libasan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libasan) $(libasan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/configure b/libsanitizer/configure +index e7984f96615..dac83083e30 100755 +--- a/libsanitizer/configure ++++ b/libsanitizer/configure +@@ -666,6 +666,8 @@ LSAN_SUPPORTED_FALSE + LSAN_SUPPORTED_TRUE + TSAN_SUPPORTED_FALSE + TSAN_SUPPORTED_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + CXXCPP +@@ -817,6 +819,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_werror + with_gcc_major_version_only + enable_cet +@@ -1471,6 +1474,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-werror disable building with -Werror + --enable-cet enable Intel CET in target libraries [default=auto] + +@@ -8853,7 +8859,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10558,6 +10564,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10575,9 +10624,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12383,7 +12436,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12386 "configure" ++#line 12439 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12489,7 +12542,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12492 "configure" ++#line 12545 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13365,6 +13418,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13382,12 +13478,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15807,6 +15911,15 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # The cast to long int works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +@@ -17205,6 +17318,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TSAN_SUPPORTED_TRUE}" && test -z "${TSAN_SUPPORTED_FALSE}"; then + as_fn_error $? "conditional \"TSAN_SUPPORTED\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac +index 04cd8910ed6..5906c8d4887 100644 +--- a/libsanitizer/configure.ac ++++ b/libsanitizer/configure.ac +@@ -85,6 +85,8 @@ esac + AC_SUBST(enable_shared) + AC_SUBST(enable_static) + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + AC_CHECK_SIZEOF([void *]) + + if test "${multilib}" = "yes"; then +diff --git a/libsanitizer/hwasan/Makefile.am b/libsanitizer/hwasan/Makefile.am +index 5a89189f6d8..11b1a9c5c57 100644 +--- a/libsanitizer/hwasan/Makefile.am ++++ b/libsanitizer/hwasan/Makefile.am +@@ -47,7 +47,11 @@ libhwasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libhwasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) + +-libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) ++if ENABLE_DARWIN_AT_RPATH ++libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libhwasan) $(libhwasan_darwin_rpath) + + libhwasan_preinit.o: hwasan_preinit.o + cp $< $@ +diff --git a/libsanitizer/hwasan/Makefile.in b/libsanitizer/hwasan/Makefile.in +index 4240aa90147..f9ec8f9c177 100644 +--- a/libsanitizer/hwasan/Makefile.in ++++ b/libsanitizer/hwasan/Makefile.in +@@ -445,7 +445,10 @@ libhwasan_la_SOURCES = $(hwasan_files) + libhwasan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libhwasan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libhwasan) $(libhwasan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/lsan/Makefile.am b/libsanitizer/lsan/Makefile.am +index 6ff28ff5eea..7701b0e18cf 100644 +--- a/libsanitizer/lsan/Makefile.am ++++ b/libsanitizer/lsan/Makefile.am +@@ -41,8 +41,12 @@ if LIBBACKTRACE_SUPPORTED + liblsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + liblsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan) +- ++if ENABLE_DARWIN_AT_RPATH ++liblsan_darwin_rpath = -Wc,-nodefaultrpaths ++liblsan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_liblsan) $(liblsan_darwin_rpath) + liblsan_preinit.o: lsan_preinit.o + cp $< $@ + +diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in +index d8fd4ee9557..078edf01fda 100644 +--- a/libsanitizer/lsan/Makefile.in ++++ b/libsanitizer/lsan/Makefile.in +@@ -413,7 +413,12 @@ liblsan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(am__append_1) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_liblsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@liblsan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_liblsan) $(liblsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +@@ -788,7 +793,6 @@ uninstall-am: uninstall-nodist_toolexeclibHEADERS \ + + .PRECIOUS: Makefile + +- + liblsan_preinit.o: lsan_preinit.o + cp $< $@ + +diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am +index da80743da9d..01290b0313d 100644 +--- a/libsanitizer/tsan/Makefile.am ++++ b/libsanitizer/tsan/Makefile.am +@@ -57,7 +57,11 @@ libtsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + libtsan_la_DEPENDENCIES +=$(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libtsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) ++if ENABLE_DARWIN_AT_RPATH ++libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++endif ++libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libtsan) $(libtsan_darwin_rpath) + + libtsan_preinit.o: tsan_preinit.o + cp $< $@ +diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in +index 36498832bb8..95011584bcb 100644 +--- a/libsanitizer/tsan/Makefile.in ++++ b/libsanitizer/tsan/Makefile.in +@@ -464,7 +464,10 @@ libtsan_la_DEPENDENCIES = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(TSAN_TARGET_DEPENDENT_OBJECTS) $(am__append_2) +-libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libtsan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/ ++libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libtsan) $(libtsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libsanitizer/ubsan/Makefile.am b/libsanitizer/ubsan/Makefile.am +index d480f26adc0..7769b3437e4 100644 +--- a/libsanitizer/ubsan/Makefile.am ++++ b/libsanitizer/ubsan/Makefile.am +@@ -36,7 +36,12 @@ if LIBBACKTRACE_SUPPORTED + libubsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la + endif + libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) ++if ENABLE_DARWIN_AT_RPATH ++libubsan_darwin_rpath = -Wc,-nodefaultrpaths ++libubsan_darwin_rpath += -Wl,-rpath,@loader_path ++endif ++libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libubsan) $(libubsan_darwin_rpath) + + # Use special rules for files that require RTTI support. + ubsan_handlers_cxx.% ubsan_type_hash.% ubsan_type_hash_itanium.% : AM_CXXFLAGS += -frtti +diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in +index 92a8e387fd7..7e51480e970 100644 +--- a/libsanitizer/ubsan/Makefile.in ++++ b/libsanitizer/ubsan/Makefile.in +@@ -400,7 +400,12 @@ libubsan_la_SOURCES = $(ubsan_files) + libubsan_la_LIBADD = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(am__append_1) $(am__append_2) $(LIBSTDCXX_RAW_CXX_LDFLAGS) +-libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libubsan_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path ++libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++ $(link_libubsan) $(libubsan_darwin_rpath) ++ + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and +diff --git a/libssp/Makefile.am b/libssp/Makefile.am +index 1636e43b369..f7ed2aa6043 100644 +--- a/libssp/Makefile.am ++++ b/libssp/Makefile.am +@@ -49,8 +49,12 @@ libssp_la_SOURCES = \ + vsnprintf-chk.c vsprintf-chk.c + libssp_la_LIBADD = + libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD) ++if ENABLE_DARWIN_AT_RPATH ++libssp_darwin_rpath = -Wc,-nodefaultrpaths ++libssp_darwin_rpath += -Wl,-rpath,@loader_path ++endif + libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) ++ $(version_arg) $(lt_host_flags) $(libssp_darwin_rpath) + + libssp_nonshared_la_SOURCES = \ + ssp-local.c +diff --git a/libssp/Makefile.in b/libssp/Makefile.in +index bc8a0dc2b28..1cf86361b96 100644 +--- a/libssp/Makefile.in ++++ b/libssp/Makefile.in +@@ -376,8 +376,11 @@ libssp_la_SOURCES = \ + + libssp_la_LIBADD = + libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD) ++@ENABLE_DARWIN_AT_RPATH_TRUE@libssp_darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) ++ $(version_arg) $(lt_host_flags) $(libssp_darwin_rpath) + + libssp_nonshared_la_SOURCES = \ + ssp-local.c +diff --git a/libssp/configure b/libssp/configure +index 492915d2ce0..72102be1742 100755 +--- a/libssp/configure ++++ b/libssp/configure +@@ -636,6 +636,8 @@ LIBOBJS + get_gcc_base_ver + toolexeclibdir + toolexecdir ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -781,6 +783,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_toolexeclibdir + with_gcc_major_version_only + ' +@@ -1426,6 +1429,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -7458,7 +7464,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -9170,6 +9176,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -9187,9 +9236,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -11016,7 +11069,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11019 "configure" ++#line 11072 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11122,7 +11175,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11125 "configure" ++#line 11178 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11400,6 +11453,15 @@ fi + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +@@ -11609,6 +11671,10 @@ if test -z "${LIBSSP_USE_SYMVER_SUN_TRUE}" && test -z "${LIBSSP_USE_SYMVER_SUN_F + as_fn_error $? "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libssp/configure.ac b/libssp/configure.ac +index f30f81c54f6..90778e2355d 100644 +--- a/libssp/configure.ac ++++ b/libssp/configure.ac +@@ -165,6 +165,8 @@ AC_SUBST(enable_static) + + GCC_WITH_TOOLEXECLIBDIR + ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index 81329bba8e5..0fe1ef6d328 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -791,6 +791,8 @@ glibcxx_compiler_pic_flag + glibcxx_lt_pic_flag + OS_IS_DARWIN_FALSE + OS_IS_DARWIN_TRUE ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -926,6 +928,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_hosted_libstdcxx + enable_libstdcxx_hosted + enable_libstdcxx_verbose +@@ -1617,6 +1620,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --disable-hosted-libstdcxx + only build freestanding C++ runtime support + --disable-libstdcxx-hosted +@@ -8503,7 +8509,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10343,6 +10349,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10360,9 +10409,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12189,7 +12242,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12192 "configure" ++#line 12245 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12295,7 +12348,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12298 "configure" ++#line 12351 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13177,6 +13230,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13194,12 +13290,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15596,6 +15700,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + os_is_darwin=no + case ${host_os} in +@@ -16033,7 +16145,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } + # Fake what AC_TRY_COMPILE does. + + cat > conftest.$ac_ext << EOF +-#line 16036 "configure" ++#line 16148 "configure" + int main() + { + typedef bool atomic_type; +@@ -16068,7 +16180,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16071 "configure" ++#line 16183 "configure" + int main() + { + typedef short atomic_type; +@@ -16103,7 +16215,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16106 "configure" ++#line 16218 "configure" + int main() + { + // NB: _Atomic_word not necessarily int. +@@ -16139,7 +16251,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 16142 "configure" ++#line 16254 "configure" + int main() + { + typedef long long atomic_type; +@@ -16295,7 +16407,7 @@ $as_echo "mutex" >&6; } + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 16298 "configure" ++#line 16410 "configure" + int main() + { + _Decimal32 d1; +@@ -16337,7 +16449,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 16340 "configure" ++#line 16452 "configure" + template + struct same + { typedef T2 type; }; +@@ -73311,6 +73423,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${OS_IS_DARWIN_TRUE}" && test -z "${OS_IS_DARWIN_FALSE}"; then + as_fn_error $? "conditional \"OS_IS_DARWIN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index 7b13f37bd5b..35a65536802 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -108,6 +108,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + os_is_darwin=no + case ${host_os} in +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index 5b9af41cdb9..925137c2ccc 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -152,8 +152,13 @@ libstdc___la_DEPENDENCIES = \ + $(top_builddir)/src/c++17/libc++17convenience.la \ + $(top_builddir)/src/c++20/libc++20convenience.la + ++if ENABLE_DARWIN_AT_RPATH ++libstdc___darwin_rpath = -Wc,-nodefaultrpaths ++libstdc___darwin_rpath += -Wl,-rpath,@loader_path ++endif ++ + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm ++ -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index f42d957af36..0ce75f30708 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -560,8 +560,11 @@ libstdc___la_DEPENDENCIES = \ + $(top_builddir)/src/c++17/libc++17convenience.la \ + $(top_builddir)/src/c++20/libc++20convenience.la + ++@ENABLE_DARWIN_AT_RPATH_TRUE@libstdc___darwin_rpath = \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ ++@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm ++ -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + @GLIBCXX_LDBL_ALT128_COMPAT_FALSE@@GLIBCXX_LDBL_COMPAT_TRUE@LTCXXCOMPILE64 = $(LTCXXCOMPILE) +diff --git a/libtool.m4 b/libtool.m4 +index b92e284d9f9..5361f2619cc 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -1005,7 +1005,7 @@ _LT_EOF + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0123456789]]*) ++ UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0-9]]*) + ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -1039,6 +1039,45 @@ _LT_EOF + m4_defun([_LT_DARWIN_LINKER_FEATURES], + [ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ AC_ARG_ENABLE([darwin-at-rpath], ++ AS_HELP_STRING([--enable-darwin-at-rpath], ++ [install libraries with @rpath/library-name, requires rpaths to be added to executables]), ++ [if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*) ++ AC_MSG_WARN([Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)]) ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi], ++ [case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[[5-9]]*|UNSET,darwin2*|10.1[[1-9]][[,.]]*|1[[1-9]].*[[,.]]* ) ++ AC_MSG_NOTICE([@rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)]) ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ]) ++ + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes +@@ -1056,13 +1095,21 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], + [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + ],[]) +@@ -6466,7 +6513,6 @@ fi # test "$_lt_caught_CXX_error" != yes + AC_LANG_POP + ])# _LT_LANG_CXX_CONFIG + +- + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +diff --git a/libvtv/configure b/libvtv/configure +index e7e490d8b3e..da4fe61d0cf 100755 +--- a/libvtv/configure ++++ b/libvtv/configure +@@ -640,6 +640,8 @@ VTV_CYGMIN_FALSE + VTV_CYGMIN_TRUE + XCFLAGS + libtool_VERSION ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + enable_static + enable_shared + lt_host_flags +@@ -797,6 +799,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + enable_cet + with_gcc_major_version_only + ' +@@ -1446,6 +1449,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-cet enable Intel CET in target libraries [default=auto] + + Optional Packages: +@@ -8748,7 +8754,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10453,6 +10459,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10470,9 +10519,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12278,7 +12331,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12281 "configure" ++#line 12334 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12384,7 +12437,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12387 "configure" ++#line 12440 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13260,6 +13313,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes +@@ -13277,12 +13373,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + +@@ -15676,6 +15780,14 @@ esac + + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=1:0:0 +@@ -16021,6 +16133,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${VTV_CYGMIN_TRUE}" && test -z "${VTV_CYGMIN_FALSE}"; then + as_fn_error $? "conditional \"VTV_CYGMIN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/libvtv/configure.ac b/libvtv/configure.ac +index f3b937e4b10..50aaadbb3a3 100644 +--- a/libvtv/configure.ac ++++ b/libvtv/configure.ac +@@ -153,6 +153,7 @@ AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # For libtool versioning info, format is CURRENT:REVISION:AGE + libtool_VERSION=1:0:0 +diff --git a/lto-plugin/configure b/lto-plugin/configure +index d522bd24c95..c3b1b5fe0b5 100755 +--- a/lto-plugin/configure ++++ b/lto-plugin/configure +@@ -634,6 +634,8 @@ LTLIBOBJS + LIBOBJS + target_noncanonical + lt_host_flags ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + OTOOL64 + OTOOL + LIPO +@@ -786,6 +788,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + ' + ac_precious_vars='build_alias + host_alias +@@ -1431,6 +1434,9 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -8603,7 +8609,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -10309,6 +10315,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -10326,9 +10375,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -12134,7 +12187,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12137 "configure" ++#line 12190 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12240,7 +12293,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12243 "configure" ++#line 12296 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12477,6 +12530,14 @@ CC="$lt_save_CC" + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + + +@@ -12723,6 +12784,10 @@ if test -z "${LTO_PLUGIN_USE_SYMVER_SUN_TRUE}" && test -z "${LTO_PLUGIN_USE_SYMV + as_fn_error $? "conditional \"LTO_PLUGIN_USE_SYMVER_SUN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac +index 0a7202782ae..5812bbbfc08 100644 +--- a/lto-plugin/configure.ac ++++ b/lto-plugin/configure.ac +@@ -110,6 +110,7 @@ fi + AC_SUBST(ac_lto_plugin_extra_ldflags) + + AM_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + ACX_LT_HOST_FLAGS + AC_SUBST(target_noncanonical) + AC_TYPE_INT64_T +diff --git a/zlib/Makefile.in b/zlib/Makefile.in +index 3f5102d1b87..80fe3b69116 100644 +--- a/zlib/Makefile.in ++++ b/zlib/Makefile.in +@@ -353,6 +353,8 @@ datadir = @datadir@ + datarootdir = @datarootdir@ + docdir = @docdir@ + dvidir = @dvidir@ ++enable_host_pie = @enable_host_pie@ ++enable_host_shared = @enable_host_shared@ + exec_prefix = @exec_prefix@ + host = @host@ + host_alias = @host_alias@ +diff --git a/zlib/configure b/zlib/configure +index e35ac6e7e17..a7673a840ab 100755 +--- a/zlib/configure ++++ b/zlib/configure +@@ -635,10 +635,14 @@ am__EXEEXT_TRUE + LTLIBOBJS + LIBOBJS + PICFLAG ++enable_host_pie ++enable_host_shared + TARGET_LIBRARY_FALSE + TARGET_LIBRARY_TRUE + toolexeclibdir + toolexecdir ++ENABLE_DARWIN_AT_RPATH_FALSE ++ENABLE_DARWIN_AT_RPATH_TRUE + CPP + OTOOL64 + OTOOL +@@ -776,8 +780,10 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++enable_darwin_at_rpath + with_toolexeclibdir + enable_host_shared ++enable_host_pie + ' + ac_precious_vars='build_alias + host_alias +@@ -1419,7 +1425,11 @@ Optional Features: + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) ++ --enable-darwin-at-rpath ++ install libraries with @rpath/library-name, requires ++ rpaths to be added to executables + --enable-host-shared build host code as shared libraries ++ --enable-host-pie build host code as PIE + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -6934,7 +6944,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in +- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) ++ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*) + ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +@@ -8913,6 +8923,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + + ++ ++ # Publish an arg to allow the user to select that Darwin host (and target) ++ # libraries should be given install-names like @rpath/libfoo.dylib. This ++ # requires that the user of the library then adds an 'rpath' to the DSO that ++ # needs access. ++ # NOTE: there are defaults below, for systems that support rpaths. The person ++ # configuring can override the defaults for any system version that supports ++ # them - they are, however, forced off for system versions without support. ++ # Check whether --enable-darwin-at-rpath was given. ++if test "${enable_darwin_at_rpath+set}" = set; then : ++ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then ++ # This is not supported before macOS 10.5 / Darwin9. ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5 ++$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;} ++ enable_darwin_at_rpath=no ++ ;; ++ esac ++ fi ++else ++ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in ++ # As above, before 10.5 / Darwin9 this does not work. ++ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*) ++ enable_darwin_at_rpath=no ++ ;; ++ ++ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use ++ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key ++ # system executables (e.g. /bin/sh). Force rpaths on for these systems. ++ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5 ++$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;} ++ enable_darwin_at_rpath=yes ++ ;; ++ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can ++ # work with either DYLD_LIBRARY_PATH or embedded rpaths. ++ ++ esac ++ ++fi ++ ++ + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes +@@ -8930,9 +8983,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all +- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ _lt_install_name='\$rpath/\$soname' ++ if test "x$enable_darwin_at_rpath" = "xyes"; then ++ _lt_install_name='@rpath/\$soname' ++ fi ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else +@@ -10759,7 +10816,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10762 "configure" ++#line 10819 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10865,7 +10922,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10868 "configure" ++#line 10925 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11102,6 +11159,14 @@ CC="$lt_save_CC" + # Only expand once: + + ++ if test x$enable_darwin_at_rpath = xyes; then ++ ENABLE_DARWIN_AT_RPATH_TRUE= ++ ENABLE_DARWIN_AT_RPATH_FALSE='#' ++else ++ ENABLE_DARWIN_AT_RPATH_TRUE='#' ++ ENABLE_DARWIN_AT_RPATH_FALSE= ++fi ++ + + # Find CPP now so that any conditional tests below won't do it and + # thereby make the resulting definitions conditional. +@@ -11548,15 +11613,31 @@ else + multilib_arg= + fi + ++# Enable --enable-host-shared. + # Check whether --enable-host-shared was given. + if test "${enable_host_shared+set}" = set; then : +- enableval=$enable_host_shared; PICFLAG=-fPIC ++ enableval=$enable_host_shared; ++fi ++ ++ ++ ++# Enable --enable-host-pie. ++# Check whether --enable-host-pie was given. ++if test "${enable_host_pie+set}" = set; then : ++ enableval=$enable_host_pie; ++fi ++ ++ ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE + else + PICFLAG= + fi + + +- + ac_config_files="$ac_config_files Makefile" + + cat >confcache <<\_ACEOF +@@ -11732,6 +11813,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then ++ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TARGET_LIBRARY_TRUE}" && test -z "${TARGET_LIBRARY_FALSE}"; then + as_fn_error $? "conditional \"TARGET_LIBRARY\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/zlib/configure.ac b/zlib/configure.ac +index be1cfe29651..9501cdfea85 100644 +--- a/zlib/configure.ac ++++ b/zlib/configure.ac +@@ -64,6 +64,7 @@ GCC_CET_FLAGS(CET_FLAGS) + AC_SUBST(CET_FLAGS) + + AC_PROG_LIBTOOL ++AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes]) + + # Find CPP now so that any conditional tests below won't do it and + # thereby make the resulting definitions conditional. +@@ -122,11 +123,26 @@ else + multilib_arg= + fi + ++# Enable --enable-host-shared. + AC_ARG_ENABLE(host-shared, + [AS_HELP_STRING([--enable-host-shared], +- [build host code as shared libraries])], +-[PICFLAG=-fPIC], [PICFLAG=]) +-AC_SUBST(PICFLAG) ++ [build host code as shared libraries])]) ++AC_SUBST(enable_host_shared) ++ ++# Enable --enable-host-pie. ++AC_ARG_ENABLE(host-pie, ++[AS_HELP_STRING([--enable-host-pie], ++ [build host code as PIE])]) ++AC_SUBST(enable_host_pie) ++ ++if test x$enable_host_shared = xyes; then ++ PICFLAG=-fPIC ++elif test x$enable_host_pie = xyes; then ++ PICFLAG=-fPIE ++else ++ PICFLAG= ++fi + ++AC_SUBST(PICFLAG) + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT diff --git a/Patches/gcc/gcc-14.3.0.diff b/Patches/gcc/gcc-14.3.0.diff new file mode 100644 index 0000000000000..10eff957b2c64 --- /dev/null +++ b/Patches/gcc/gcc-14.3.0.diff @@ -0,0 +1,5813 @@ +diff --git a/Makefile.in b/Makefile.in +index db4fa6c6260..9d91d1d8efa 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -338,6 +338,7 @@ RAW_CXX_TARGET_EXPORTS = \ + + NORMAL_TARGET_EXPORTS = \ + $(BASE_TARGET_EXPORTS) \ ++ CXX_FOR_TARGET="$(CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; + + # Where to find GMP +diff --git a/Makefile.tpl b/Makefile.tpl +index 1d5813cd569..1ebadce64f9 100644 +--- a/Makefile.tpl ++++ b/Makefile.tpl +@@ -341,6 +341,7 @@ RAW_CXX_TARGET_EXPORTS = \ + + NORMAL_TARGET_EXPORTS = \ + $(BASE_TARGET_EXPORTS) \ ++ CXX_FOR_TARGET="$(CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; + + # Where to find GMP +diff --git a/configure b/configure +index 3b0abeb8b2e..f7a7da118cc 100755 +--- a/configure ++++ b/configure +@@ -3518,6 +3518,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[3456789]86-*-darwin*) +diff --git a/configure.ac b/configure.ac +index 042681c27be..21218446587 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -747,6 +747,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[[3456789]]86-*-darwin*) +diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x +index 45d65f4872a..7b2cde88854 100644 +--- a/fixincludes/fixincl.x ++++ b/fixincludes/fixincl.x +@@ -2,11 +2,11 @@ + * + * DO NOT EDIT THIS FILE (fixincl.x) + * +- * It has been AutoGen-ed April 1, 2025 at 03:28:07 PM by AutoGen 5.18.16 ++ * It has been AutoGen-ed May 15, 2025 at 08:18:24 PM by AutoGen 5.18.16 + * From the definitions inclhack.def + * and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Apr 1 15:28:07 BST 2025 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 15 20:18:24 BST 2025 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 274 fixup descriptions. ++ * This file contains 272 fixup descriptions. + * + * See README for more information. + * +@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { + #endif /* __MATH__ */", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Api_Availability fix +- */ +-tSCC zDarwin_Api_AvailabilityName[] = +- "darwin_api_availability"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_Api_AvailabilityList[] = +- "os/availability.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_Api_AvailabilityMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilitySelect0[] = +- " *#define __API_AVAILABLE.*\n\ +- *#define __API_DEPRECATED.*\n\ +- *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ +- *#define __API_UNAVAILABLE.*\n"; +- +-/* +- * content bypass pattern - skip fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilityBypass0[] = +- "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- +-#define DARWIN_API_AVAILABILITY_TEST_CT 2 +-static tTestDesc aDarwin_Api_AvailabilityTests[] = { +- { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, +- { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Api_Availability +- */ +-static const char* apzDarwin_Api_AvailabilityPatch[] = { +- "format", +- " #define API_AVAILABLE(...)\n\ +- #define API_DEPRECATED(...)\n\ +- #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ +- #define API_UNAVAILABLE(...)\n", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix +@@ -2763,51 +2713,6 @@ extern \"C\" {\n\ + #endif\n", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Availabilityinternal fix +- */ +-tSCC zDarwin_AvailabilityinternalName[] = +- "darwin_availabilityinternal"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_AvailabilityinternalList[] = +- "AvailabilityInternal.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_AvailabilityinternalMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_AvailabilityinternalSelect0[] = +- "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- +-#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1 +-static tTestDesc aDarwin_AvailabilityinternalTests[] = { +- { TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Availabilityinternal +- */ +-static const char* apzDarwin_AvailabilityinternalPatch[] = { +- "format", +- "#if defined(__has_attribute)\n\ +- #if __has_attribute(availability)\n\ +-%0\n\ +- #else\n\ +- #define %1\n\ +- #endif\n\ +-#else\n\ +- #define %1\n\ +-#endif", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_9_Long_Double_Funcs_2 fix +@@ -11169,9 +11074,9 @@ static const char* apzX11_SprintfPatch[] = { + * + * List of all fixes + */ +-#define REGEX_COUNT 313 ++#define REGEX_COUNT 310 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 274 ++#define FIX_COUNT 272 + + /* + * Enumerate the fixes +@@ -11180,7 +11085,6 @@ typedef enum { + AAB_AIX_STDIO_FIXIDX, + AAB_AIX_FCNTL_FIXIDX, + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, +- DARWIN_API_AVAILABILITY_FIXIDX, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, + AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, + AAB_FD_ZERO_SELECTBITS_H_FIXIDX, +@@ -11242,7 +11146,6 @@ typedef enum { + CTRL_QUOTES_DEF_FIXIDX, + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, +- DARWIN_AVAILABILITYINTERNAL_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, + DARWIN_EXTERNC_FIXIDX, + DARWIN_GCC4_BREAKAGE_FIXIDX, +@@ -11469,11 +11372,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + +- { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, +- apzDarwin_Api_AvailabilityMachs, +- DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, +- + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, + apzAab_Fd_Zero_Asm_Posix_Types_HMachs, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, +@@ -11779,11 +11677,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, + +- { zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList, +- apzDarwin_AvailabilityinternalMachs, +- DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 }, +- + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def +index 67a1082f926..560b455717e 100644 +--- a/fixincludes/inclhack.def ++++ b/fixincludes/inclhack.def +@@ -194,33 +194,6 @@ fix = { + _EndOfHeader_; + }; + +-/* +- * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where +- * __attribute__((availability)) is not supported. +- */ +-fix = { +- hackname = darwin_api_availability; +- mach = "*-*-darwin*"; +- files = os/availability.h; +- bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- select = +- " *#define __API_AVAILABLE.*\n" +- " *#define __API_DEPRECATED.*\n" +- " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" +- " *#define __API_UNAVAILABLE.*\n"; +- c_fix = format; +- c_fix_arg = +- " #define API_AVAILABLE(...)\n" +- " #define API_DEPRECATED(...)\n" +- " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- " #define API_UNAVAILABLE(...)\n"; +- test_text = +- "#define __API_AVAILABLE(...)\n" +- "#define __API_DEPRECATED(...)\n" +- "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- "#define __API_UNAVAILABLE(...)\n"; +-}; +- + /* + * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) + */ +@@ -1351,32 +1324,6 @@ fix = { + test_text = "extern void* malloc( size_t );"; + }; + +-/* +- * macOS 10.12 uses __attribute__((availability)) +- * unconditionally. +- */ +-fix = { +- hackname = darwin_availabilityinternal; +- mach = "*-*-darwin*"; +- files = AvailabilityInternal.h; +- select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- c_fix = format; +- c_fix_arg = <<- _EOFix_ +- #if defined(__has_attribute) +- #if __has_attribute(availability) +- %0 +- #else +- #define %1 +- #endif +- #else +- #define %1 +- #endif +- _EOFix_; +- +- test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n" +- "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))"; +-}; +- + /* + * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) + * to be useful, the main math.h must use <> and not "" includes. +diff --git a/gcc/ada/init.c b/gcc/ada/init.c +index 7cf77471f1d..8d5acdd6fb6 100644 +--- a/gcc/ada/init.c ++++ b/gcc/ada/init.c +@@ -2479,7 +2479,10 @@ __gnat_map_signal (int sig, siginfo_t *si, void *mcontext ATTRIBUTE_UNUSED) + /* Reset the use of alt stack, so that the alt stack will be used + for the next signal delivery. + The stack can't be used in case of stack checking. */ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK); ++#pragma GCC diagnostic pop + break; + + case SIGFPE: +diff --git a/gcc/builtins.cc b/gcc/builtins.cc +index 3e0b590039f..73fa5bf84ee 100644 +--- a/gcc/builtins.cc ++++ b/gcc/builtins.cc +@@ -5929,6 +5929,13 @@ expand_builtin_trap (void) + static void + expand_builtin_unreachable (void) + { ++ /* If the target wants a trap in place of the fall-through, use that. */ ++ if (targetm.unreachable_should_trap ()) ++ { ++ expand_builtin_trap (); ++ return; ++ } ++ + /* Use gimple_build_builtin_unreachable or builtin_decl_unreachable + to avoid this. */ + gcc_checking_assert (!sanitize_flags_p (SANITIZE_UNREACHABLE)); +diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc +index 04e39b41bdf..6cb2637f3cf 100644 +--- a/gcc/c-family/c-attribs.cc ++++ b/gcc/c-family/c-attribs.cc +@@ -665,6 +665,18 @@ attribute_takes_identifier_p (const_tree attr_id) + return targetm.attribute_takes_identifier_p (attr_id); + } + ++/* Returns TRUE iff the attribute indicated by ATTR_ID needs its ++ arguments converted to string constants. */ ++ ++bool ++attribute_clang_form_p (const_tree attr_id) ++{ ++ const struct attribute_spec *spec = lookup_attribute_spec (attr_id); ++ if (spec && !strcmp ("availability", spec->name)) ++ return true; ++ return false; ++} ++ + /* Verify that argument value POS at position ARGNO to attribute NAME + applied to function FN (which is either a function declaration or function + type) refers to a function parameter at position POS and the expected type +diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc +index 0d05694b6d0..11e35647c18 100644 +--- a/gcc/c-family/c-common.cc ++++ b/gcc/c-family/c-common.cc +@@ -346,7 +346,11 @@ static constexpr hf_feature_info has_feature_table[] = + { "enumerator_attributes", HF_FLAG_NONE, 0 }, + { "tls", HF_FLAG_NONE, 0 }, + { "gnu_asm_goto_with_outputs", HF_FLAG_EXT, 0 }, +- { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 } ++ { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 }, ++ { "attribute_availability", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_message", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_replacement", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_version_underscores", HF_FLAG_NONE, 0 } + }; + + /* Global visibility options. */ +@@ -384,8 +388,8 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); + */ + const struct c_common_resword c_common_reswords[] = + { +- { "_Alignas", RID_ALIGNAS, D_CONLY }, +- { "_Alignof", RID_ALIGNOF, D_CONLY }, ++ { "_Alignas", RID_ALIGNAS, D_EXT_C_IN_CXX }, ++ { "_Alignof", RID_ALIGNOF, D_EXT_C_IN_CXX }, + { "_Atomic", RID_ATOMIC, D_CONLY }, + { "_BitInt", RID_BITINT, D_CONLY }, + { "_Bool", RID_BOOL, D_CONLY }, +diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h +index 8d8bead5030..325b2eca611 100644 +--- a/gcc/c-family/c-common.h ++++ b/gcc/c-family/c-common.h +@@ -445,6 +445,8 @@ extern machine_mode c_default_pointer_mode; + #define D_CXX20 0x8000 /* In C++, C++20 only. */ + #define D_CXX_COROUTINES 0x10000 /* In C++, only with coroutines. */ + #define D_CXX_MODULES 0x20000 /* In C++, only with modules. */ ++#define D_EXT_C_IN_CXX 0x40000 /* In C++, allow additional C keywords. */ ++#define D_EXT_CXX_IN_C 0x80000 /* In C, allow additional C++ keywords. */ + + #define D_CXX_CONCEPTS_FLAGS D_CXXONLY | D_CXX_CONCEPTS + #define D_CXX_CHAR8_T_FLAGS D_CXXONLY | D_CXX_CHAR8_T +@@ -1635,6 +1637,7 @@ extern void check_for_xor_used_as_pow (location_t lhs_loc, tree lhs_val, + /* In c-attribs.cc. */ + extern bool attribute_takes_identifier_p (const_tree); + extern tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); ++extern bool attribute_clang_form_p (const_tree); + extern tree handle_unused_attribute (tree *, tree, tree, int, bool *); + extern tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *); + extern int parse_tm_stmt_attr (tree, int); +diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc +index ff5ce2bf729..d5cc6fa43a9 100644 +--- a/gcc/c-family/c-lex.cc ++++ b/gcc/c-family/c-lex.cc +@@ -584,6 +584,21 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, + + case CPP_NUMBER: + { ++ /* If the user wants number-like entities to be returned as a raw ++ string, then don't try to classify them, which emits unwanted ++ diagnostics. */ ++ if (lex_flags & C_LEX_NUMBER_AS_STRING) ++ { ++ /* build_string adds a trailing NUL at [len]. */ ++ tree num_string = build_string (tok->val.str.len + 1, ++ (const char *) tok->val.str.text); ++ TREE_TYPE (num_string) = char_array_type_node; ++ *value = num_string; ++ /* We will effectively note this as CPP_N_INVALID, because we ++ made no checks here. */ ++ break; ++ } ++ + const char *suffix = NULL; + unsigned int flags = cpp_classify_number (parse_in, tok, &suffix, *loc); + +diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc +index f4dced8d826..4b45f83ca05 100644 +--- a/gcc/c-family/c-opts.cc ++++ b/gcc/c-family/c-opts.cc +@@ -1119,7 +1119,7 @@ c_common_post_options (const char **pfilename) + + if (flag_extern_tls_init) + { +- if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK) ++ if (!SUPPORTS_WEAK) + { + /* Lazy TLS initialization for a variable in another TU requires + alias and weak reference support. */ +diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h +index ce93a52fa57..95828547713 100644 +--- a/gcc/c-family/c-pragma.h ++++ b/gcc/c-family/c-pragma.h +@@ -276,6 +276,9 @@ extern void pragma_lex_discard_to_eol (); + #define C_LEX_STRING_NO_JOIN 2 /* Do not concatenate strings + nor translate them into execution + character set. */ ++#define C_LEX_NUMBER_AS_STRING 4 /* Do not classify a number, but ++ instead return it as a raw ++ string. */ + + /* This is not actually available to pragma parsers. It's merely a + convenient location to declare this function for c-lex, after +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index b310b40d857..5969b53a7dc 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1708,6 +1708,18 @@ static-libmpxwrappers + Driver WarnRemoved + Removed in GCC 9. This switch has no effect. + ++fallow-const-var-array-size ++C ObjC C++ ObjC++ LTO Var(flag_allow_const_var_array_size) Init(0) ++Allow arrays sizes to be const-qualified vars in C and Objective-C. ++ ++fallow-extended-attribute-placement ++C ObjC C++ ObjC++ LTO Var(flag_allow_ext_attr_placement) Init(0) ++Allow placement of attributes on function definitions. ++ ++fallow-extra-keywords ++C ObjC C++ ObjC++ LTO Var(flag_allow_extra_keywords) Init(0) ++Allow additional C keywords in C++ and vice versa. ++ + fcilkplus + C ObjC C++ ObjC++ LTO Undocumented Ignore + Removed in GCC 8. This switch has no effect. +diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc +index 70f3faf6d68..b18b129e2c5 100644 +--- a/gcc/c/c-decl.cc ++++ b/gcc/c/c-decl.cc +@@ -7273,6 +7273,25 @@ grokdeclarator (const struct c_declarator *declarator, + } + + size = c_fully_fold (size, false, &size_maybe_const); ++ bool size_const_var = false; ++ if (flag_allow_const_var_array_size) ++ { ++ tree maybe_const_size = TREE_CODE (size) == NOP_EXPR ++ ? TREE_OPERAND (size, 0) : size; ++ size_const_var ++ = (TREE_CODE (maybe_const_size) == VAR_DECL ++ && TREE_READONLY (maybe_const_size) ++ && !TREE_THIS_VOLATILE (maybe_const_size)); ++ if (size_const_var ++ && size_maybe_const ++ && DECL_INITIAL (maybe_const_size)) ++ { ++ size = DECL_INITIAL (maybe_const_size); ++ size = c_fully_fold (size, false, &size_maybe_const); ++ size_int_const = (TREE_CODE (size) == INTEGER_CST ++ && !TREE_OVERFLOW (size)); ++ } ++ } + + if (pedantic && size_maybe_const && integer_zerop (size)) + { +@@ -7314,6 +7333,9 @@ grokdeclarator (const struct c_declarator *declarator, + this_size_varies = size_varies = true; + warn_variable_length_array (name, size); + } ++ if (flag_allow_const_var_array_size && size_const_var) ++ pedwarn (input_location, OPT_Wpedantic, ++ "variably modified %qE at file scope", name); + } + else if ((decl_context == NORMAL || decl_context == FIELD) + && current_scope == file_scope) +diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc +index dccceb7a478..73205c24a47 100644 +--- a/gcc/c/c-parser.cc ++++ b/gcc/c/c-parser.cc +@@ -217,6 +217,9 @@ struct GTY(()) c_parser { + should translate them to the execution character set (false + inside attributes). */ + BOOL_BITFIELD translate_strings_p : 1; ++ /* True if we want to lex arbitrary number-like sequences as their ++ string representation. */ ++ BOOL_BITFIELD lex_number_as_string : 1; + + /* Objective-C specific parser/lexer information. */ + +@@ -308,10 +311,10 @@ c_lex_one_token (c_parser *parser, c_token *token, bool raw = false) + + if (raw || vec_safe_length (parser->raw_tokens) == 0) + { ++ int lex_flags = parser->lex_joined_string ? 0 : C_LEX_STRING_NO_JOIN; ++ lex_flags |= parser->lex_number_as_string ? C_LEX_NUMBER_AS_STRING : 0; + token->type = c_lex_with_flags (&token->value, &token->location, +- &token->flags, +- (parser->lex_joined_string +- ? 0 : C_LEX_STRING_NO_JOIN)); ++ &token->flags, lex_flags); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; +@@ -2579,15 +2582,28 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, + d = d->declarator; + underspec_name = d->u.id.id; + } ++ tree postfix_attrs = NULL_TREE; ++ if (flag_allow_ext_attr_placement ++ && c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) ++ { ++ postfix_attrs = c_parser_gnu_attributes (parser); ++ /* IF we have a function definition, and we're allowing it then ++ treat these attributes as if they had been prepended. */ ++ if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) ++ { ++ all_prefix_attrs = chainon (all_prefix_attrs, postfix_attrs); ++ postfix_attrs = NULL_TREE; ++ } ++ } + if (c_parser_next_token_is (parser, CPP_EQ) + || c_parser_next_token_is (parser, CPP_COMMA) + || c_parser_next_token_is (parser, CPP_SEMICOLON) + || c_parser_next_token_is_keyword (parser, RID_ASM) + || c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE) ++ || postfix_attrs + || c_parser_next_token_is_keyword (parser, RID_IN)) + { + tree asm_name = NULL_TREE; +- tree postfix_attrs = NULL_TREE; + if (!diagnosed_no_specs && !specs->declspecs_seen_p) + { + diagnosed_no_specs = true; +@@ -2599,8 +2615,9 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, + if (c_parser_next_token_is_keyword (parser, RID_ASM)) + asm_name = c_parser_simple_asm_expr (parser); + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) ++ postfix_attrs = c_parser_gnu_attributes (parser); ++ if (postfix_attrs) + { +- postfix_attrs = c_parser_gnu_attributes (parser); + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + /* This means there is an attribute specifier after +@@ -5213,6 +5230,88 @@ c_parser_gnu_attribute_any_word (c_parser *parser) + return attr_name; + } + ++/* Handle parsing clang-form attribute arguments, where we need to adjust ++ the parsing rules to relate to a specific attribute. */ ++ ++static tree ++c_parser_clang_attribute_arguments (c_parser *parser, tree /*attr_id*/) ++{ ++ /* We can, if required, alter the parsing on the basis of the attribute. ++ At present, we handle the availability attr, where ach entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ tree attr_args = NULL_TREE; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ if (c_parser_next_token_is (parser, CPP_NAME) ++ && c_parser_peek_token (parser)->id_kind == C_ID_ID) ++ { ++ name = c_parser_peek_token (parser)->value; ++ c_parser_consume_token (parser); ++ } ++ else if (c_parser_next_token_is (parser, CPP_COMMA)) ++ name = error_mark_node; /* Comma handled below. */ ++ else ++ { ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected an attribute keyword"); ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_EQ)) ++ { ++ c_parser_consume_token (parser); /* eat the '=' */ ++ /* We need to bludgeon the lexer into not trying to interpret the ++ xx.yy.zz form, since that just looks like a malformed float. ++ Also, as a result of macro processing, we can have strig literals ++ that are in multiple pieces so, for this specific part of the ++ parse, we need to join strings. */ ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ /* So look at the next token, expecting a string, or something that ++ looks initially like a number, but might be a version number. */ ++ c_parser_peek_token (parser); ++ /* Done with the funky number parsing. */ ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ value = c_parser_peek_token (parser)->value; ++ /* ???: check for error mark and early-return? */ ++ c_parser_consume_token (parser); ++ } ++ /* else value is absent. */ ++ } ++ else if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected %<,%> or %<=%>"); ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_COMMA)) ++ c_parser_consume_token (parser); /* Just skip the comma. */ ++ tree t = tree_cons (value, name, NULL); ++ if (!attr_args) ++ attr_args = t; ++ else ++ chainon (attr_args, t); ++ } while (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN)); ++ return attr_args; ++} ++ + /* Parse attribute arguments. This is a common form of syntax + covering all currently valid GNU and standard attributes. + +@@ -5378,9 +5477,13 @@ c_parser_gnu_attribute (c_parser *parser, tree attrs, + attrs = chainon (attrs, attr); + return attrs; + } +- c_parser_consume_token (parser); ++ c_parser_consume_token (parser); /* The '('. */ + +- tree attr_args ++ tree attr_args; ++ if (attribute_clang_form_p (attr_name)) ++ attr_args = c_parser_clang_attribute_arguments (parser, attr_name); ++ else ++ attr_args + = c_parser_attribute_arguments (parser, + attribute_takes_identifier_p (attr_name), + false, +diff --git a/gcc/calls.cc b/gcc/calls.cc +index 21d78f9779f..d84998668a4 100644 +--- a/gcc/calls.cc ++++ b/gcc/calls.cc +@@ -1376,7 +1376,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + with those made by function.cc. */ + + /* See if this argument should be passed by invisible reference. */ +- function_arg_info arg (type, argpos < n_named_args); ++ function_arg_info arg (type, argpos < n_named_args, ++ argpos == n_named_args - 1); + if (pass_by_reference (args_so_far_pnt, arg)) + { + const bool callee_copies +@@ -1496,10 +1497,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + + unsignedp = TYPE_UNSIGNED (type); + arg.type = type; +- arg.mode +- = promote_function_mode (type, TYPE_MODE (type), &unsignedp, +- fndecl ? TREE_TYPE (fndecl) : fntype, 0); +- ++ arg.mode = TYPE_MODE (type); ++// arg.mode ++// = promote_function_mode (type, TYPE_MODE (type), &unsignedp, ++// fndecl ? TREE_TYPE (fndecl) : fntype, 0); ++ arg.mode = promote_function_mode (args_so_far, arg, ++ fndecl ? TREE_TYPE (fndecl) : fntype, ++ &unsignedp, 0); + args[i].unsignedp = unsignedp; + args[i].mode = arg.mode; + +@@ -1549,6 +1553,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + #endif + reg_parm_stack_space, + args[i].pass_on_stack ? 0 : args[i].partial, ++ args_so_far, + fndecl, args_size, &args[i].locate); + #ifdef BLOCK_REG_PADDING + else +@@ -4096,6 +4101,7 @@ split_complex_types (tree types) + return types; + } + ++extern void debug_tree (tree); + /* Output a library call to function ORGFUN (a SYMBOL_REF rtx) + for a value of mode OUTMODE, + with NARGS different arguments, passed as ARGS. +@@ -4281,6 +4287,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, 0, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + + if (argvec[count].reg == 0 || argvec[count].partial != 0 +@@ -4351,8 +4358,16 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + val = force_operand (XEXP (slot, 0), NULL_RTX); + } + +- arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, +- NULL_TREE, 0); ++// arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, ++// NULL_TREE, 0); ++ tree t = arg.type; ++if (t) ++ debug_tree (t); ++gcc_assert (!t); ++ arg.type = NULL_TREE; ++ arg.mode = promote_function_mode (args_so_far, arg, NULL_TREE, ++ &unsigned_p, 0); ++ arg.type = t; + argvec[count].mode = arg.mode; + argvec[count].value = convert_modes (arg.mode, GET_MODE (val), val, + unsigned_p); +@@ -4372,6 +4387,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, argvec[count].partial, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + args_size.constant += argvec[count].locate.size.constant; + gcc_assert (!argvec[count].locate.size.var); +diff --git a/gcc/calls.h b/gcc/calls.h +index 464a4e34e33..499f7560ee8 100644 +--- a/gcc/calls.h ++++ b/gcc/calls.h +@@ -35,24 +35,43 @@ class function_arg_info + { + public: + function_arg_info () +- : type (NULL_TREE), mode (VOIDmode), named (false), ++ : type (NULL_TREE), mode (VOIDmode), named (false), last_named (false), + pass_by_reference (false) + {} + + /* Initialize an argument of mode MODE, either before or after promotion. */ + function_arg_info (machine_mode mode, bool named) +- : type (NULL_TREE), mode (mode), named (named), pass_by_reference (false) ++ : type (NULL_TREE), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ function_arg_info (machine_mode mode, bool named, bool last_named) ++ : type (NULL_TREE), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Initialize an unpromoted argument of type TYPE. */ + function_arg_info (tree type, bool named) +- : type (type), mode (TYPE_MODE (type)), named (named), ++ : type (type), mode (TYPE_MODE (type)), named (named), last_named (false), + pass_by_reference (false) + {} + ++ /* Initialize an unpromoted argument of type TYPE. */ ++ function_arg_info (tree type, bool named, bool last_named) ++ : type (type), mode (TYPE_MODE (type)), named (named), ++ last_named (last_named), pass_by_reference (false) ++ {} ++ + /* Initialize an argument with explicit properties. */ + function_arg_info (tree type, machine_mode mode, bool named) +- : type (type), mode (mode), named (named), pass_by_reference (false) ++ : type (type), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ /* Initialize an argument with explicit properties. */ ++ function_arg_info (tree type, machine_mode mode, bool named, bool last_named) ++ : type (type), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Return true if the gimple-level type is an aggregate. */ +@@ -105,6 +124,9 @@ public: + "..."). See also TARGET_STRICT_ARGUMENT_NAMING. */ + unsigned int named : 1; + ++ /* True if this is the last named argument. */ ++ unsigned int last_named : 1; ++ + /* True if we have decided to pass the argument by reference, in which case + the function_arg_info describes a pointer to the original argument. */ + unsigned int pass_by_reference : 1; +diff --git a/gcc/collect2.cc b/gcc/collect2.cc +index 902014a9cc1..a7ca609334a 100644 +--- a/gcc/collect2.cc ++++ b/gcc/collect2.cc +@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3. If not see + In a cross-compiler, this means you need a cross nm, + but that is not quite as unpleasant as special headers. */ + +-#if !defined (OBJECT_FORMAT_COFF) ++#if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_MACHO) + #define OBJECT_FORMAT_NONE + #endif + +@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see + + #endif /* OBJECT_FORMAT_COFF */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Default flags to pass to nm. */ + #ifndef NM_FLAGS +@@ -525,7 +525,7 @@ static const char *const target_machine = TARGET_MACHINE; + + Return 0 if not found, otherwise return its name, allocated with malloc. */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Add an entry for the object file NAME to object file list LIST. + New entries are added at the end of the list. The original pointer +@@ -764,6 +764,12 @@ do_link (char **ld_argv, const char *atsuffix) + } + } + ++#if defined (OBJECT_FORMAT_MACHO) ++# define LLD_NAME "ld64.lld" ++#else ++# define LLD_NAME "ld.lld" ++#endif ++ + /* Main program. */ + + int +@@ -777,16 +783,19 @@ main (int argc, char **argv) + USE_BFD_LD, + USE_LLD_LD, + USE_MOLD_LD, ++ USE_CLASSIC_LD, + USE_LD_MAX + } selected_linker = USE_DEFAULT_LD; ++ + static const char *const ld_suffixes[USE_LD_MAX] = + { + "ld", + PLUGIN_LD_SUFFIX, + "ld.gold", + "ld.bfd", +- "ld.lld", +- "ld.mold" ++ LLD_NAME, ++ "ld.mold", ++ "ld-classic" + }; + static const char *const real_ld_suffix = "real-ld"; + static const char *const collect_ld_suffix = "collect-ld"; +@@ -868,7 +877,7 @@ main (int argc, char **argv) + #ifdef CROSS_DIRECTORY_STRUCTURE + /* lld and mold are platform-agnostic and not prefixed with target + triple. */ +- if (!(i == USE_LLD_LD || i == USE_MOLD_LD)) ++ if (!(i == USE_LLD_LD || i == USE_MOLD_LD || i == USE_CLASSIC_LD)) + full_ld_suffixes[i] = concat (target_machine, "-", ld_suffixes[i], + NULL); + else +@@ -956,14 +965,22 @@ main (int argc, char **argv) + if (selected_linker == USE_DEFAULT_LD) + selected_linker = USE_PLUGIN_LD; + } ++#if !defined (OBJECT_FORMAT_MACHO) + else if (strcmp (argv[i], "-fuse-ld=bfd") == 0) + selected_linker = USE_BFD_LD; + else if (strcmp (argv[i], "-fuse-ld=gold") == 0) + selected_linker = USE_GOLD_LD; ++#endif + else if (strcmp (argv[i], "-fuse-ld=lld") == 0) + selected_linker = USE_LLD_LD; + else if (strcmp (argv[i], "-fuse-ld=mold") == 0) + selected_linker = USE_MOLD_LD; ++#if defined (OBJECT_FORMAT_MACHO) ++ else if (strcmp (argv[i], "-fuse-ld=classic") == 0) ++ selected_linker = USE_CLASSIC_LD; ++#endif ++ else if (strcmp (argv[i], "-fuse-ld=") == 0) ++ selected_linker = USE_DEFAULT_LD; + else if (startswith (argv[i], "-o")) + { + /* Parse the output filename if it's given so that we can make +@@ -1055,7 +1072,8 @@ main (int argc, char **argv) + ld_file_name = 0; + #ifdef DEFAULT_LINKER + if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || +- selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD) ++ selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD || ++ selected_linker == USE_CLASSIC_LD) + { + char *linker_name; + # ifdef HOST_EXECUTABLE_SUFFIX +@@ -2270,7 +2288,7 @@ write_aix_file (FILE *stream, struct id *list) + } + #endif + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Check to make sure the file is an LTO object file. */ + +diff --git a/gcc/common.opt b/gcc/common.opt +index ad348844775..cde259257b7 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -2919,6 +2919,10 @@ fstack-usage + Common RejectNegative Var(flag_stack_usage) + Output stack usage information on a per-function basis. + ++fstack-use-cumulative-args ++Common RejectNegative Var(flag_stack_use_cumulative_args) Init(STACK_USE_CUMULATIVE_ARGS_INIT) ++Use cumulative args-based stack layout hooks. ++ + fstrength-reduce + Common Ignore + Does nothing. Preserved for backward compatibility. +@@ -3292,6 +3296,10 @@ fuse-ld=mold + Common Driver Negative(fuse-ld=mold) + Use the Modern linker (MOLD) linker instead of the default linker. + ++fuse-ld=classic ++Common Driver Negative(fuse-ld=classic) ++Use the ld-classic linker instead of the default linker. ++ + fuse-linker-plugin + Common Undocumented Var(flag_use_linker_plugin) + +diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc +index 951d041d310..496d0d82e05 100644 +--- a/gcc/common/config/aarch64/aarch64-common.cc ++++ b/gcc/common/config/aarch64/aarch64-common.cc +@@ -298,8 +298,12 @@ aarch64_get_extension_string_for_isa_flags + + However, assemblers with Armv8-R AArch64 support should not have this + issue, so we don't need this fix when targeting Armv8-R. */ +- auto explicit_flags = (!(current_flags & AARCH64_FL_V8R) +- ? AARCH64_FL_CRC : 0); ++ aarch64_feature_flags explicit_flags = ++#ifndef DISABLE_AARCH64_AS_CRC_BUGFIX ++ (!(current_flags & AARCH64_ISA_V8R) ? AARCH64_FL_CRC : 0); ++#else ++ 0; ++#endif + + /* Add the features in isa_flags & ~current_flags using the smallest + possible number of extensions. We can do this by iterating over the +@@ -329,7 +333,10 @@ aarch64_get_extension_string_for_isa_flags + if (added & opt.flag_canonical) + { + outstr += "+"; +- outstr += opt.name; ++ if (startswith (opt.name, "rdm")) ++ outstr += "rdm"; ++ else ++ outstr += opt.name; + } + + /* Remove the features in current_flags & ~isa_flags. If the feature does +@@ -358,7 +365,10 @@ aarch64_get_extension_string_for_isa_flags + { + current_flags &= ~opt.flags_off; + outstr += "+no"; +- outstr += opt.name; ++ if (startswith (opt.name, "rdm")) ++ outstr += "rdm"; ++ else ++ outstr += opt.name; + } + } + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index a3566f5c77d..6337fb0f839 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1177,13 +1177,22 @@ case ${target} in + ;; + esac + +-# Figure out if we need to enable heap trampolines by default ++# Figure out if we need to enable heap trampolines ++# and variadic functions handling. + case ${target} in ++aarch64*-*-darwin2*) ++ # This applies to arm64 Darwin variadic funtions. ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=1" ++ # Executable stack is forbidden. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; + *-*-darwin2*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" + # Currently, we do this for macOS 11 and above. + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" + ;; + *) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" + ;; + esac +@@ -1227,6 +1236,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + ;; ++aarch64-*-darwin* ) ++ tm_file="${tm_file} aarch64/aarch64-errata.h" ++ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-darwin" ++ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" ++ tm_defines="${tm_defines} DISABLE_AARCH64_AS_CRC_BUGFIX=1" ++ # Choose a default CPU version that will work for all current releases. ++ with_cpu=${with_cpu:-apple-m1} ++ ;; + aarch64*-*-freebsd*) + tm_file="${tm_file} elfos.h ${fbsd_tm_file}" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h" +diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc +index d5b5700d25d..97fe6d4caed 100644 +--- a/gcc/config/aarch64/aarch64-builtins.cc ++++ b/gcc/config/aarch64/aarch64-builtins.cc +@@ -788,6 +788,8 @@ enum aarch64_builtins + AARCH64_PLDX, + AARCH64_PLI, + AARCH64_PLIX, ++ /* OS-specific */ ++ AARCH64_BUILTIN_CFSTRING, + AARCH64_BUILTIN_MAX + }; + +@@ -887,6 +889,9 @@ tree aarch64_fp16_ptr_type_node = NULL_TREE; + /* Back-end node type for brain float (bfloat) types. */ + tree aarch64_bf16_ptr_type_node = NULL_TREE; + ++/* Pointer to __float128 on Mach-O, where the 128b float is not long double. */ ++tree aarch64_float128_ptr_type_node = NULL_TREE; ++ + /* Wrapper around add_builtin_function. NAME is the name of the built-in + function, TYPE is the function type, CODE is the function subcode + (relative to AARCH64_BUILTIN_GENERAL), and ATTRS is the function +@@ -1662,6 +1667,29 @@ aarch64_init_bf16_types (void) + aarch64_bf16_ptr_type_node = build_pointer_type (bfloat16_type_node); + } + ++/* Initialize the backend REAL_TYPE type supporting __float128 on Mach-O, ++ as well as the related built-ins. */ ++static void ++aarch64_init_float128_types (void) ++{ ++ /* The __float128 type. The node has already been created as ++ _Float128, so for C we only need to register the __float128 name for ++ it. For C++, we create a distinct type which will mangle differently ++ (g) vs. _Float128 (DF128_) and behave backwards compatibly. */ ++ if (float128t_type_node == NULL_TREE) ++ { ++ float128t_type_node = make_node (REAL_TYPE); ++ TYPE_PRECISION (float128t_type_node) ++ = TYPE_PRECISION (float128_type_node); ++ SET_TYPE_MODE (float128t_type_node, TYPE_MODE (float128_type_node)); ++ layout_type (float128t_type_node); ++ } ++ lang_hooks.types.register_builtin_type (float128t_type_node, "__float128"); ++ ++ aarch64_float128_ptr_type_node = build_pointer_type (float128t_type_node); ++} ++ ++ + /* Pointer authentication builtins that will become NOP on legacy platform. + Currently, these builtins are for internal use only (libgcc EH unwinder). */ + +@@ -2044,8 +2072,9 @@ aarch64_general_init_builtins (void) + aarch64_init_fpsr_fpcr_builtins (); + + aarch64_init_fp16_types (); +- + aarch64_init_bf16_types (); ++ if (TARGET_MACHO) ++ aarch64_init_float128_types (); + + { + aarch64_simd_switcher simd; +@@ -2079,6 +2108,14 @@ aarch64_general_init_builtins (void) + handle_arm_acle_h (); + } + ++void ++aarch64_init_subtarget_builtins (void) ++{ ++#ifdef SUBTARGET_INIT_BUILTINS ++ SUBTARGET_INIT_BUILTINS; ++#endif ++} ++ + /* Implement TARGET_BUILTIN_DECL for the AARCH64_BUILTIN_GENERAL group. */ + tree + aarch64_general_builtin_decl (unsigned code, bool) +diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc +index 2aff097dd33..2ebaa1554a0 100644 +--- a/gcc/config/aarch64/aarch64-c.cc ++++ b/gcc/config/aarch64/aarch64-c.cc +@@ -285,6 +285,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pfile) + { + aarch64_define_unconditional_macros (pfile); + aarch64_update_cpp_builtins (pfile); ++ ++ if (TARGET_MACHO) ++ { ++ builtin_define ("__builtin_copysignq=__builtin_copysignf128"); ++ builtin_define ("__builtin_fabsq=__builtin_fabsf128"); ++ builtin_define ("__builtin_huge_valq=__builtin_huge_valf128"); ++ builtin_define ("__builtin_infq=__builtin_inff128"); ++ builtin_define ("__builtin_nanq=__builtin_nanf128"); ++ builtin_define ("__builtin_nansq=__builtin_nansf128"); ++ } + } + + /* Hook to validate the current #pragma GCC target and set the state, and +@@ -424,4 +434,8 @@ aarch64_register_pragmas (void) + targetm.check_builtin_call = aarch64_check_builtin_call; + + c_register_pragma ("GCC", "aarch64", aarch64_pragma_aarch64); ++ ++#ifdef REGISTER_SUBTARGET_PRAGMAS ++ REGISTER_SUBTARGET_PRAGMAS (); ++#endif + } +diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def +index b1eaf5512b5..af4436ae3fe 100644 +--- a/gcc/config/aarch64/aarch64-cores.def ++++ b/gcc/config/aarch64/aarch64-cores.def +@@ -167,6 +167,17 @@ AARCH64_CORE("cortex-a76.cortex-a55", cortexa76cortexa55, cortexa53, V8_2A, (F + /* Armv8-R Architecture Processors. */ + AARCH64_CORE("cortex-r82", cortexr82, cortexa53, V8R, (), cortexa53, 0x41, 0xd15, -1) + ++/* Apple (A12 and M) cores. ++ Apple implementer ID from xnu, ++ guesses for part #, guesses for scheduler ident, generic_armv8_a for costs. ++ A12 seems mostly 8.3, ++ M1 seems to be 8.4 + extras (see comments in option-extensions about f16fml), ++ M2 mostly 8.5 but with missing mandatory features. */ ++AARCH64_CORE("apple-a12", applea12, cortexa53, V8_3A, (), generic_armv8_a, 0x61, 0x12, -1) ++AARCH64_CORE("apple-m1", applem1, cortexa57, V8_4A, (F16, SB, SSBS), generic_armv8_a, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m2", applem2, cortexa57, V8_4A, (I8MM, BF16, F16, SB, SSBS), generic_armv8_a, 0x61, 0x23, -1) ++AARCH64_CORE("apple-m3", applem3, cortexa57, V8_4A, (I8MM, BF16, F16, SB, SSBS), generic_armv8_a, 0x61, 0x23, -1) ++ + /* Armv9.0-A Architecture Processors. */ + + /* Arm ('A') cores. */ +diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h +index 5d067cb64b4..a5550bf941a 100644 +--- a/gcc/config/aarch64/aarch64-protos.h ++++ b/gcc/config/aarch64/aarch64-protos.h +@@ -109,6 +109,14 @@ enum aarch64_symbol_type + SYMBOL_TLSLE24, + SYMBOL_TLSLE32, + SYMBOL_TLSLE48, ++ SYMBOL_MO_SMALL_ABS, ++ SYMBOL_MO_SMALL_PCR, ++ SYMBOL_MO_SMALL_GOT, ++ SYMBOL_MO_SMALL_TLS, ++ SYMBOL_MO_LARGE_ABS, ++ SYMBOL_MO_LARGE_PCR, ++ SYMBOL_MO_LARGE_GOT, ++ SYMBOL_MO_LARGE_TLS, + SYMBOL_FORCE_TO_MEM + }; + +@@ -748,6 +756,7 @@ void aarch64_post_cfi_startproc (void); + poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned); + int aarch64_get_condition_code (rtx); + bool aarch64_address_valid_for_prefetch_p (rtx, bool); ++bool aarch64_address_valid_for_unscaled_prefetch_p (rtx, bool); + bool aarch64_bitmask_imm (unsigned HOST_WIDE_INT val, machine_mode); + unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in); + unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in); +@@ -782,7 +791,11 @@ bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx); + bool aarch64_is_long_call_p (rtx); + bool aarch64_is_noplt_call_p (rtx); + bool aarch64_label_mentioned_p (rtx); ++#if TARGET_MACHO ++void aarch64_darwin_declare_function_name (FILE *, const char*, tree ); ++#else + void aarch64_declare_function_name (FILE *, const char*, tree); ++#endif + void aarch64_asm_output_alias (FILE *, const tree, const tree); + void aarch64_asm_output_external (FILE *, tree, const char*); + bool aarch64_legitimate_pic_operand_p (rtx); +@@ -999,6 +1012,7 @@ void aarch64_override_options_internal (struct gcc_options *); + + const char *aarch64_general_mangle_builtin_type (const_tree); + void aarch64_general_init_builtins (void); ++void aarch64_init_subtarget_builtins (void); + tree aarch64_general_fold_builtin (unsigned int, tree, unsigned int, tree *); + gimple *aarch64_general_gimple_fold_builtin (unsigned int, gcall *, + gimple_stmt_iterator *); +diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md +index 35b27ddb883..8ce2a93168c 100644 +--- a/gcc/config/aarch64/aarch64-tune.md ++++ b/gcc/config/aarch64/aarch64-tune.md +@@ -1,5 +1,5 @@ + ;; -*- buffer-read-only: t -*- + ;; Generated automatically by gentune.sh from aarch64-cores.def + (define_attr "tune" +- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,generic,generic_armv8_a,generic_armv9_a" ++ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,applea12,applem1,applem2,applem3,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,generic,generic_armv8_a,generic_armv9_a" + (const (symbol_ref "((enum attr_tune) aarch64_tune)"))) +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index b28ebc96b1d..0ce19808bda 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -329,8 +329,10 @@ static bool aarch64_vfp_is_call_or_return_candidate (machine_mode, + const_tree, + machine_mode *, int *, + bool *, bool); ++#if !TARGET_MACHO + static void aarch64_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED; + static void aarch64_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED; ++#endif + static void aarch64_override_options_after_change (void); + static bool aarch64_vector_mode_supported_p (machine_mode); + static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool); +@@ -849,6 +851,9 @@ static const attribute_spec aarch64_gnu_attributes[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, + affects_type_identity, handler, exclude } */ ++#ifdef SUBTARGET_ATTRIBUTE_TABLE ++ SUBTARGET_ATTRIBUTE_TABLE, ++#endif + { "aarch64_vector_pcs", 0, 0, false, true, true, true, + handle_aarch64_vector_pcs_attribute, NULL }, + { "arm_sve_vector_bits", 1, 1, false, true, false, true, +@@ -2068,7 +2073,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode) + if (known_le (GET_MODE_SIZE (mode), 8)) + return true; + if (known_le (GET_MODE_SIZE (mode), 16)) +- return (regno & 1) == 0; ++ return (regno & 1) == 0 || TARGET_MACHO; /* darwinpcs D.4 */ + } + else if (FP_REGNUM_P (regno)) + { +@@ -2114,8 +2119,10 @@ static bool + aarch64_takes_arguments_in_sve_regs_p (const_tree fntype) + { + CUMULATIVE_ARGS args_so_far_v; ++ /* This does not apply to variadic functions, so all the (currently ++ uncounted) arguments must be named. */ + aarch64_init_cumulative_args (&args_so_far_v, NULL_TREE, NULL_RTX, +- NULL_TREE, 0, true); ++ NULL_TREE, -1, true); + cumulative_args_t args_so_far = pack_cumulative_args (&args_so_far_v); + + for (tree chain = TYPE_ARG_TYPES (fntype); +@@ -2863,6 +2870,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + switch (type) + { + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + { + /* In ILP32, the mode of dest can be either SImode or DImode. */ + rtx tmp_reg = dest; +@@ -2873,6 +2881,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + if (can_create_pseudo_p ()) + tmp_reg = gen_reg_rtx (mode); + ++ if (TARGET_MACHO) ++ { ++ rtx sym, off; ++ split_const (imm, &sym, &off); ++ /* Negative offsets don't work, whether by intention is TBD. */ ++ if (INTVAL (off) < 0 || INTVAL (off) > 8 * 1024 * 1024) ++ { ++ emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, sym)); ++ emit_insn (gen_add_losym (dest, tmp_reg, sym)); ++ /* FIXME: add the SI option if/when we support ilp32. */ ++ emit_insn (gen_adddi3 (dest, dest, off)); ++ return; ++ } ++ /* else small enough positive offset is OK. */ ++ } + emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, copy_rtx (imm))); + emit_insn (gen_add_losym (dest, tmp_reg, imm)); + return; +@@ -2956,6 +2979,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + return; + } + ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_SMALL_GOT_4G: + emit_insn (gen_rtx_SET (dest, imm)); + return; +@@ -6028,6 +6052,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + case SYMBOL_SMALL_TLSIE: + case SYMBOL_SMALL_GOT_28K: + case SYMBOL_SMALL_GOT_4G: ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_TINY_GOT: + case SYMBOL_TINY_TLSIE: + if (const_offset != 0) +@@ -6041,6 +6066,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + /* FALLTHRU */ + + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + case SYMBOL_TINY_ABSOLUTE: + case SYMBOL_TLSLE12: + case SYMBOL_TLSLE24: +@@ -6630,6 +6656,7 @@ aarch64_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) + gcc_unreachable (); + } + ++#if !TARGET_MACHO + static bool + aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + const_tree type, int *nregs) +@@ -6639,6 +6666,7 @@ aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + &pcum->aapcs_vfp_rmode, + nregs, NULL, pcum->silent_p); + } ++#endif + + /* Given MODE and TYPE of a function argument, return the alignment in + bits. The idea is to suppress any stronger alignment requested by +@@ -6667,7 +6695,7 @@ aarch64_function_arg_alignment (machine_mode mode, const_tree type, + if (integer_zerop (TYPE_SIZE (type))) + return 0; + +- gcc_assert (TYPE_MODE (type) == mode); ++ gcc_assert (TARGET_MACHO || TYPE_MODE (type) == mode); + + if (!AGGREGATE_TYPE_P (type)) + { +@@ -6865,6 +6893,14 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + Both behaviors were wrong, but in different cases. */ + + pcum->aapcs_arg_processed = true; ++ if (TARGET_MACHO) ++ { ++ /* Set suitable defaults for queries. */ ++ pcum->darwinpcs_arg_boundary ++ = aarch64_function_arg_alignment (mode, type, &abi_break_gcc_9, ++ &abi_break_gcc_13, &abi_break_gcc_14); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ } + + pure_scalable_type_info pst_info; + if (type && pst_info.analyze_registers (type)) +@@ -6924,13 +6960,29 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* No frontends can create types with variable-sized modes, so we + shouldn't be asked to pass or return them. */ + size = GET_MODE_SIZE (mode).to_constant (); ++ ++ if (TARGET_MACHO) ++ /* Since we can pack things on the stack, we need the unrounded size. */ ++ pcum->darwinpcs_stack_bytes = size; ++ + size = ROUND_UP (size, UNITS_PER_WORD); + + allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode); ++ bool is_ha = false; ++#if !TARGET_MACHO + allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v, + mode, + type, + &nregs); ++#else ++ /* We care if the value is a homogenous aggregate when laying out the stack, ++ so use this call directly. */ ++ allocate_nvrn ++ = aarch64_vfp_is_call_or_return_candidate (mode, type, ++ &pcum->aapcs_vfp_rmode, ++ &nregs, &is_ha, ++ pcum->silent_p); ++#endif + gcc_assert (!sve_p || !allocate_nvrn); + + unsigned int alignment +@@ -6959,7 +7011,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + if (!pcum->silent_p && !TARGET_FLOAT) + aarch64_err_no_fpadvsimd (mode); + +- if (nvrn + nregs <= NUM_FP_ARG_REGS) ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextnvrn = NUM_FP_ARG_REGS; ++ goto on_stack; ++ } ++ else if (nvrn + nregs <= NUM_FP_ARG_REGS) + { + pcum->aapcs_nextnvrn = nvrn + nregs; + if (!aarch64_composite_type_p (type, mode)) +@@ -6989,6 +7047,7 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + else +@@ -7005,14 +7064,24 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* C6 - C9. though the sign and zero extension semantics are + handled elsewhere. This is the case where the argument fits + entirely general registers. */ ++ + if (allocate_ncrn && (ncrn + nregs <= NUM_ARG_REGS)) + { + gcc_assert (nregs == 0 || nregs == 1 || nregs == 2); + ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextncrn = NUM_ARG_REGS; ++ goto on_stack; ++ } ++ + /* C.8 if the argument has an alignment of 16 then the NGRN is + rounded up to the next even number. */ + if (nregs == 2 +- && ncrn % 2) ++ && ncrn % 2 ++ /* Darwin PCS deletes rule C.8. */ ++ && !TARGET_MACHO) + { + /* Emit a warning if the alignment changed when taking the + 'packed' attribute into account. */ +@@ -7082,8 +7151,8 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } +- + pcum->aapcs_nextncrn = ncrn + nregs; ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + +@@ -7093,7 +7162,81 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* The argument is passed on stack; record the needed number of words for + this argument and align the total size if necessary. */ + on_stack: +- pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ ++ if (TARGET_MACHO) ++ { ++ /* Darwin does not round up the allocation for smaller entities to 8 ++ bytes. It only requires the natural alignment for these. ++ ++ but we don't do this for: ++ * unnamed parms in variadic functions ++ * complex types ++ * unions ++ * aggregates (except for homogeneous ones which are handles as the ++ enclosed type). ++ each entry starts a new slot. ++ ++ 16 byte entities are naturally aligned on the stack. ++ There was no darwinpcs for GCC 9, so neither the implementation ++ change nor the warning should fire here (i.e. we do not need to check ++ if 16byte entities alter the stack size). */ ++ ++ gcc_checking_assert (arg.named == pcum->named_p); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ if (!pcum->named_p ++ || TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (pcum->aapcs_vfp_rmode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ { ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = MAX (alignment, PARM_BOUNDARY); ++ if (!pcum->named_p) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ return; ++ } ++ ++ /* Updated sub-word offset aligned for the new object. ++ We are looking for the case that the new object will fit after some ++ existing object(s) in the same stack slot. In that case, we do not ++ need to add any more stack space for it. */ ++ int new_off ++ = ROUND_UP (pcum->darwinpcs_sub_word_pos, alignment / BITS_PER_UNIT); ++ ++ if (new_off >= UNITS_PER_WORD) ++ { ++ /* That exceeds a stack slot, start a new one. */ ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ new_off = 0; ++ } ++ /* This is the end of the new object. */ ++ int new_pos = new_off + pcum->darwinpcs_stack_bytes; ++ ++ if (pcum->darwinpcs_sub_word_pos == 0) ++ /* New stack slot, just allocate one or more words, and note where ++ the next arg will start. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ else if (new_pos <= UNITS_PER_WORD) ++ /* Old stack slot, object starts at new_off and goes to new_pos, we do ++ not add any stack space. */ ++ pcum->darwinpcs_sub_word_offset = new_off; ++ pcum->darwinpcs_sub_word_pos = new_pos; ++ pcum->darwinpcs_arg_boundary = alignment ; ++ if (pcum->last_named_p && new_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (new_pos <= 4) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ else if (new_pos <= 6) ++ pcum->darwinpcs_arg_padding = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ pcum->darwinpcs_arg_padding = 2 * BITS_PER_UNIT; ++ } ++ return; ++ } + + if (warn_pcs_change_le_gcc14 + && abi_break_gcc_13 +@@ -7109,6 +7252,8 @@ on_stack: + inform (input_location, "parameter passing for argument of type " + "%qT changed in GCC 14.1", type); + ++ /* size was already rounded up to PARM_BOUNDARY. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; + if (alignment == 16 * BITS_PER_UNIT) + { + int new_size = ROUND_UP (pcum->aapcs_stack_size, 16 / UNITS_PER_WORD); +@@ -7213,12 +7358,33 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum, + pcum->aapcs_arg_processed = false; + pcum->aapcs_stack_words = 0; + pcum->aapcs_stack_size = 0; ++ pcum->darwinpcs_stack_bytes = 0; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ /* If we have been invoked for incoming args, then n_named will have been ++ set to -1, but we should have a function decl - so pick up the named ++ count from that. If that fails, and we end up with -1, this effectively ++ corresponds to assuming that there is an arbitrary number of named ++ args. */ ++ pcum->darwinpcs_n_named = n_named; ++ if (n_named == (unsigned)-1 && fndecl) ++ { ++ tree fnt = TREE_TYPE (fndecl); ++ if (fnt && TYPE_ARG_TYPES (fnt)) ++ pcum->darwinpcs_n_named = list_length (TYPE_ARG_TYPES (fnt)); ++ } ++ pcum->darwinpcs_n_args_processed = 0; ++ pcum->named_p = pcum->darwinpcs_n_named != 0; ++ pcum->last_named_p = pcum->darwinpcs_n_named == 1; + pcum->silent_p = silent_p; + pcum->shared_za_flags + = (fntype ? aarch64_fntype_shared_flags (fntype, "za") : 0U); + pcum->shared_zt0_flags + = (fntype ? aarch64_fntype_shared_flags (fntype, "zt0") : 0U); + pcum->num_sme_mode_switch_args = 0; ++ pcum->aapcs_vfp_rmode = VOIDmode; + + if (!silent_p + && !TARGET_FLOAT +@@ -7257,9 +7423,11 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + || pcum->pcs_variant == ARM_PCS_SVE) + { + aarch64_layout_arg (pcum_v, arg); +- gcc_assert ((pcum->aapcs_reg != NULL_RTX) +- != (pcum->aapcs_stack_words != 0)); +- if (pcum->aapcs_reg ++ pcum->darwinpcs_n_args_processed++; ++ gcc_assert (TARGET_MACHO ++ || (pcum->aapcs_reg != NULL_RTX) ++ != (pcum->aapcs_stack_words != 0)); ++ if (pcum->aapcs_reg + && aarch64_call_switches_pstate_sm (pcum->isa_mode)) + aarch64_record_sme_mode_switch_args (pcum); + +@@ -7270,6 +7438,12 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + pcum->aapcs_stack_size += pcum->aapcs_stack_words; + pcum->aapcs_stack_words = 0; + pcum->aapcs_reg = NULL_RTX; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ pcum->named_p ++ = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++ pcum->last_named_p ++ = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; + } + } + +@@ -7281,12 +7455,15 @@ aarch64_function_arg_regno_p (unsigned regno) + || (PR_REGNUM_P (regno) && regno < P0_REGNUM + NUM_PR_ARG_REGS)); + } + +-/* Implement FUNCTION_ARG_BOUNDARY. Every parameter gets at least +- PARM_BOUNDARY bits of alignment, but will be given anything up +- to STACK_BOUNDARY bits if the type requires it. This makes sure +- that both before and after the layout of each argument, the Next +- Stacked Argument Address (NSAA) will have a minimum alignment of +- 8 bytes. */ ++/* Implement FUNCTION_ARG_BOUNDARY. ++ For AAPCS64, Every parameter gets at least PARM_BOUNDARY bits of ++ alignment, but will be given anything up to STACK_BOUNDARY bits ++ if the type requires it. This makes sure that both before and after ++ the layout of each argument, the Next Stacked Argument Address (NSAA) ++ will have a minimum alignment of 8 bytes. ++ ++ For darwinpcs, this is only called to lower va_arg entries which are ++ always aligned as for AAPCS64. */ + + static unsigned int + aarch64_function_arg_boundary (machine_mode mode, const_tree type) +@@ -7300,8 +7477,108 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + &abi_break_gcc_14); + /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr + to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ /* This can only work for unnamed args. */ ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ if (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return MIN (alignment, STACK_BOUNDARY); ++#else ++ alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return alignment; ++#endif ++} ++ ++/* For Darwin, we want to use the arg boundary computed when laying out the ++ function arg, to cope with items packed on the stack and the different ++ rules applied to unnamed parms. */ ++ ++static unsigned int ++aarch64_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ unsigned int abi_break_gcc_9; ++ unsigned int abi_break_gcc_13; ++ unsigned int abi_break_gcc_14; ++ unsigned int alignment ++ = aarch64_function_arg_alignment (mode, type, &abi_break_gcc_9, ++ &abi_break_gcc_13, &abi_break_gcc_14); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ bool no_pack = (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE); ++ ++ bool in_regs = (pcum->aapcs_reg != NULL_RTX); ++ ++ if ((named_p && !no_pack) || in_regs) ++ ; /* Leave the alignment as natural. */ ++ else ++ alignment = MAX (alignment, PARM_BOUNDARY); ++gcc_checking_assert (alignment == pcum->darwinpcs_arg_boundary); ++ return MIN (alignment, STACK_BOUNDARY); ++ ++#else + alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); + return alignment; ++#endif ++} ++ ++/* Implement TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA for darwinpcs which allows ++ non-standard passing of byte-aligned items [D.2]. This is done by pulling ++ the values out of the cumulative args struct. */ ++ ++static unsigned int ++aarch64_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca) ++{ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ bool last_named_p = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; ++gcc_checking_assert (last_named_p == pcum->last_named_p); ++ ++ unsigned boundary = BITS_PER_UNIT; ++ if (last_named_p && pcum->darwinpcs_sub_word_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (pcum->darwinpcs_sub_word_pos <= 4) ++ boundary = PARM_BOUNDARY; ++ else if (pcum->darwinpcs_sub_word_pos <= 6) ++ boundary = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ boundary = 2 * BITS_PER_UNIT; ++ } ++ else if (named_p) ++ /* Named args are naturally aligned, but with no rounding. */ ++ ; ++ else ++ /* un-named args are rounded to fill slots. */ ++ boundary = PARM_BOUNDARY; ++gcc_checking_assert (boundary == pcum->darwinpcs_arg_padding); ++ return boundary; + } + + /* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE. */ +@@ -10714,6 +10991,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + /* load literal: pc-relative constant pool entry. Only supported + for SI mode or larger. */ + info->type = ADDRESS_SYMBOLIC; ++ info->offset = NULL_RTX; + + if (!load_store_pair_p + && GET_MODE_SIZE (mode).is_constant (&const_size) +@@ -10721,6 +10999,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + { + poly_int64 offset; + rtx sym = strip_offset_and_salt (x, &offset); ++ + return ((LABEL_REF_P (sym) + || (SYMBOL_REF_P (sym) + && CONSTANT_POOL_ADDRESS_P (sym) +@@ -10738,10 +11017,13 @@ aarch64_classify_address (struct aarch64_address_info *info, + poly_int64 offset; + HOST_WIDE_INT const_offset; + rtx sym = strip_offset_and_salt (info->offset, &offset); ++ + if (SYMBOL_REF_P (sym) + && offset.is_constant (&const_offset) + && (aarch64_classify_symbol (sym, const_offset) +- == SYMBOL_SMALL_ABSOLUTE)) ++ == SYMBOL_SMALL_ABSOLUTE ++ || aarch64_classify_symbol (sym, const_offset) ++ == SYMBOL_MO_SMALL_PCR)) + { + /* The symbol and offset must be aligned to the access size. */ + unsigned int align; +@@ -10791,6 +11073,55 @@ aarch64_address_valid_for_prefetch_p (rtx x, bool strict_p) + if (!res) + return false; + ++ /* For ELF targets using GAS, we emit prfm unconditionally; GAS will alter ++ the instruction to pick the prfum form where possible (i.e. when the ++ offset is in the range -256..255) and fall back to prfm otherwise. ++ We can reject cases where the offset exceeds the range usable by both ++ insns [-256..32760], or for offsets > 255 when the value is not divisible ++ by 8. ++ For Mach-O (Darwin) where the assembler uses the LLVM back end, that does ++ not yet do the substitution, so we must reject all prfum cases. */ ++ if (addr.offset) ++ { ++ HOST_WIDE_INT offs = INTVAL (addr.offset); ++ if (offs < -256) /* Out of range for both prfum and prfm. */ ++ return false; ++ if (offs > 32760) /* Out of range for prfm. */ ++ return false; ++ if (offs & 0x07) /* We cannot use prfm. */ ++ { ++ if (offs > 255) /* Out of range for prfum. */ ++ return false; ++ if (TARGET_MACHO) ++ return false; ++ } ++ if (TARGET_MACHO && offs < 0) ++ return false; ++ } ++ ++ /* ... except writeback forms. */ ++ return addr.type != ADDRESS_REG_WB; ++} ++ ++/* Return true if the address X is valid for a PRFUM instruction. ++ STRICT_P is true if we should do strict checking with ++ aarch64_classify_address. */ ++ ++bool ++aarch64_address_valid_for_unscaled_prefetch_p (rtx x, bool strict_p) ++{ ++ struct aarch64_address_info addr; ++ ++ /* PRFUM accepts the same addresses as DImode, but constrained to a range ++ -256..255. */ ++ bool res = aarch64_classify_address (&addr, x, DImode, strict_p); ++ if (!res) ++ return false; ++ ++ if (addr.offset && ((INTVAL (addr.offset) > 255) ++ || (INTVAL (addr.offset) < -256))) ++ return false; ++ + /* ... except writeback forms. */ + return addr.type != ADDRESS_REG_WB; + } +@@ -11924,6 +12255,144 @@ sizetochar (int size) + } + } + ++static void ++output_macho_postfix_expr (FILE *file, rtx x, const char *postfix) ++{ ++ char buf[256]; ++ ++ restart: ++ switch (GET_CODE (x)) ++ { ++ case PC: ++ putc ('.', file); ++ break; ++ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_DECL (x)) ++ assemble_external (SYMBOL_REF_DECL (x)); ++ assemble_name (file, XSTR (x, 0)); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case LABEL_REF: ++ x = label_ref_label (x); ++ /* Fall through. */ ++ case CODE_LABEL: ++ ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); ++ assemble_name (file, buf); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case CONST_INT: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); ++ break; ++ ++ case CONST: ++ /* This used to output parentheses around the expression, ++ but that does not work on the 386 (either ATT or BSD assembler). */ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ break; ++ ++ case CONST_WIDE_INT: ++ /* We do not know the mode here so we have to use a round about ++ way to build a wide-int to get it printed properly. */ ++ { ++ wide_int w = wide_int::from_array (&CONST_WIDE_INT_ELT (x, 0), ++ CONST_WIDE_INT_NUNITS (x), ++ CONST_WIDE_INT_NUNITS (x) ++ * HOST_BITS_PER_WIDE_INT, ++ false); ++ print_decs (w, file); ++ } ++ break; ++ ++ case CONST_DOUBLE: ++ if (CONST_DOUBLE_AS_INT_P (x)) ++ { ++ /* We can use %d if the number is one word and positive. */ ++ if (CONST_DOUBLE_HIGH (x)) ++ fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x), ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else if (CONST_DOUBLE_LOW (x) < 0) ++ fprintf (file, HOST_WIDE_INT_PRINT_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); ++ } ++ else ++ /* We can't handle floating point constants; ++ PRINT_OPERAND must handle them. */ ++ output_operand_lossage ("floating constant misused"); ++ break; ++ ++ case CONST_FIXED: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_FIXED_VALUE_LOW (x)); ++ break; ++ ++ case PLUS: ++ /* Some assemblers need integer constants to appear last (eg masm). */ ++ if (CONST_INT_P (XEXP (x, 0))) ++ { ++ output_macho_postfix_expr (file, XEXP (x, 1), postfix); ++ if (INTVAL (XEXP (x, 0)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 0)); ++ } ++ else ++ { ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ if (!CONST_INT_P (XEXP (x, 1)) ++ || INTVAL (XEXP (x, 1)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 1)); ++ } ++ break; ++ ++ case MINUS: ++ /* Avoid outputting things like x-x or x+5-x, ++ since some assemblers can't handle that. */ ++ x = simplify_subtraction (x); ++ if (GET_CODE (x) != MINUS) ++ goto restart; ++ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ fprintf (file, "-"); ++ if ((CONST_INT_P (XEXP (x, 1)) && INTVAL (XEXP (x, 1)) >= 0) ++ || GET_CODE (XEXP (x, 1)) == PC ++ || GET_CODE (XEXP (x, 1)) == SYMBOL_REF) ++ output_addr_const (file, XEXP (x, 1)); ++ else ++ { ++ fputs (targetm.asm_out.open_paren, file); ++ output_addr_const (file, XEXP (x, 1)); ++ fputs (targetm.asm_out.close_paren, file); ++ } ++ break; ++ ++ case ZERO_EXTEND: ++ case SIGN_EXTEND: ++ case SUBREG: ++ case TRUNCATE: ++ output_addr_const (file, XEXP (x, 0)); ++ break; ++ ++ case UNSPEC: ++ if (XINT (x, 1) == UNSPEC_SALT_ADDR) ++ { ++ output_macho_postfix_expr (file, XVECEXP (x, 0, 0), postfix); ++ break; ++ } ++ /* FALLTHROUGH */ ++ default: ++ if (targetm.asm_out.output_addr_const_extra (file, x)) ++ break; ++ ++ output_operand_lossage ("invalid expression as operand"); ++ } ++ ++} ++ + /* Print operand X to file F in a target specific manner according to CODE. + The acceptable formatting commands given by CODE are: + 'c': An integer or symbol address without a preceding # +@@ -11997,6 +12466,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + } + break; + ++ case 'J': ++ output_macho_postfix_expr (f, x, "PAGEOFF"); ++ break; ++ case 'O': ++ output_macho_postfix_expr (f, x, "GOTPAGEOFF"); ++ break; + case 'e': + { + x = unwrap_const_vec_duplicate (x); +@@ -12329,7 +12804,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + case 'A': + if (GET_CODE (x) == HIGH) + x = XEXP (x, 0); +- ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12360,9 +12835,26 @@ aarch64_print_operand (FILE *f, rtx x, int code) + break; + } + output_addr_const (asm_out_file, x); ++#endif ++#if TARGET_MACHO ++ switch (aarch64_classify_symbolic_expression (x)) ++ { ++ case SYMBOL_MO_SMALL_PCR: ++ output_macho_postfix_expr (asm_out_file, x, "PAGE"); ++ break; ++ case SYMBOL_MO_SMALL_GOT: ++ output_macho_postfix_expr (asm_out_file, x, "GOTPAGE"); ++ break; ++ default: ++ /* large code model unimplemented. */ ++ gcc_unreachable (); ++ break; ++ } ++#endif + break; + + case 'L': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12400,10 +12892,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + + case 'G': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_TLSLE24: +@@ -12412,6 +12906,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + +@@ -12577,8 +13072,13 @@ aarch64_print_address_internal (FILE *f, machine_mode mode, rtx x, + break; + + case ADDRESS_LO_SUM: ++#if TARGET_MACHO ++ asm_fprintf (f, "[%s, #", reg_names [REGNO (addr.base)]); ++ output_macho_postfix_expr (f, addr.offset, "PAGEOFF"); ++#else + asm_fprintf (f, "[%s, #:lo12:", reg_names [REGNO (addr.base)]); + output_addr_const (f, addr.offset); ++#endif + asm_fprintf (f, "]"); + return true; + +@@ -12886,7 +13386,23 @@ aarch64_frame_pointer_required () + { + /* If the function needs to record the incoming value of PSTATE.SM, + make sure that the slot is accessible from the frame pointer. */ +- return aarch64_need_old_pstate_sm (); ++ if (!TARGET_MACHO) ++ return aarch64_need_old_pstate_sm (); ++ ++ /* We could do with some more general test. ++ gcc_checking_assert (!aarch64_need_old_pstate_sm ());*/ ++ ++ if (crtl->calls_eh_return || aarch64_need_old_pstate_sm ()) ++ return true; ++ ++ /* Not used in leaf functions (unless forced). */ ++ if (flag_omit_leaf_frame_pointer && leaf_function_p ()) ++ return false; ++ ++ /* NOTE: We are allowing the user to force omission of the frame ++ pointer, (despite that it is not ABI-compliant). */ ++ ++ return flag_omit_frame_pointer != 1; + } + + static bool +@@ -13114,6 +13630,8 @@ aarch64_asm_output_labelref (FILE* f, const char *name) + asm_fprintf (f, "%U%s", name); + } + ++#if !TARGET_MACHO ++ + static void + aarch64_elf_asm_constructor (rtx symbol, int priority) + { +@@ -13153,6 +13671,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority) + assemble_aligned_integer (POINTER_BYTES, symbol); + } + } ++#endif + + const char* + aarch64_output_casesi (rtx *operands) +@@ -13305,7 +13824,11 @@ aarch64_select_rtx_section (machine_mode mode, + if (aarch64_can_use_per_function_literal_pools_p ()) + return function_section (current_function_decl); + ++#if TARGET_MACHO ++ return machopic_select_rtx_section (mode, x, align); ++#else + return default_elf_select_rtx_section (mode, x, align); ++#endif + } + + /* Implement ASM_OUTPUT_POOL_EPILOGUE. */ +@@ -15575,15 +16098,17 @@ aarch64_init_builtins () + { + aarch64_general_init_builtins (); + aarch64_sve::init_builtins (); +-#ifdef SUBTARGET_INIT_BUILTINS +- SUBTARGET_INIT_BUILTINS; +-#endif ++ aarch64_init_subtarget_builtins (); + } + + /* Implement TARGET_FOLD_BUILTIN. */ + static tree + aarch64_fold_builtin (tree fndecl, int nargs, tree *args, bool) + { ++#ifdef SUBTARGET_FOLD_BUILTIN ++ if (tree res = SUBTARGET_FOLD_BUILTIN (fndecl, nargs, args, false)) ++ return res; ++#endif + unsigned int code = DECL_MD_FUNCTION_CODE (fndecl); + unsigned int subcode = code >> AARCH64_BUILTIN_SHIFT; + tree type = TREE_TYPE (TREE_TYPE (fndecl)); +@@ -18995,10 +19520,14 @@ initialize_aarch64_code_model (struct gcc_options *opts) + } + break; + case AARCH64_CMODEL_LARGE: +- if (opts->x_flag_pic) ++ if (TARGET_MACHO) ++ /* We need to implement fPIC here (arm64_32 also accepts the large ++ model). */ ++ sorry ("code model %qs not supported yet", "large"); ++ else if (opts->x_flag_pic) + sorry ("code model %qs with %<-f%s%>", "large", + opts->x_flag_pic > 1 ? "PIC" : "pic"); +- if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) ++ else if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) + sorry ("code model %qs not supported in ilp32 mode", "large"); + break; + case AARCH64_CMODEL_TINY_PIC: +@@ -20922,7 +21451,9 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ++ ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + default: + gcc_unreachable (); +@@ -20958,10 +21489,22 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + + return SYMBOL_TINY_ABSOLUTE; + +- + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: ++#if TARGET_MACHO ++ if (TARGET_MACHO) ++ { ++ /* Constant pool addresses are always TU-local and PC- ++ relative. We indirect common, external and weak ++ symbols (but weak only if not hidden). */ ++ if (!CONSTANT_POOL_ADDRESS_P (x) ++ && (MACHO_SYMBOL_MUST_INDIRECT_P (x) ++ || !aarch64_symbol_binds_local_p (x))) ++ return SYMBOL_MO_SMALL_GOT; ++ } ++ else ++#endif + if ((flag_pic || SYMBOL_REF_WEAK (x)) + && !aarch64_symbol_binds_local_p (x)) + return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC +@@ -20973,7 +21516,8 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + case AARCH64_CMODEL_LARGE: + /* This is alright even in PIC code as the constant +@@ -21103,7 +21647,10 @@ static GTY(()) tree va_list_type; + void *__vr_top; + int __gr_offs; + int __vr_offs; +- }; */ ++ }; ++ ++ darwinpcs uses 'char *' for the va_list (in common with other platform ++ ports). */ + + static tree + aarch64_build_builtin_va_list (void) +@@ -21111,6 +21658,13 @@ aarch64_build_builtin_va_list (void) + tree va_list_name; + tree f_stack, f_grtop, f_vrtop, f_groff, f_vroff; + ++ /* darwinpcs uses a simple char * for this. */ ++ if (TARGET_MACHO) ++ { ++ va_list_type = build_pointer_type (char_type_node); ++ return va_list_type; ++ } ++ + /* Create the type. */ + va_list_type = lang_hooks.types.make_type (RECORD_TYPE); + /* Give it the required name. */ +@@ -21182,6 +21736,13 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) + int vr_save_area_size = cfun->va_list_fpr_size; + int vr_offset; + ++ /* darwinpcs uses the default, char * va_list impl. */ ++ if (TARGET_MACHO) ++ { ++ std_expand_builtin_va_start (valist, nextarg); ++ return; ++ } ++ + cum = &crtl->args.info; + if (cfun->va_list_gpr_size) + gr_save_area_size = MIN ((NUM_ARG_REGS - cum->aapcs_ncrn) * UNITS_PER_WORD, +@@ -21272,6 +21833,9 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + HOST_WIDE_INT size, rsize, adjust, align; + tree t, u, cond1, cond2; + ++ if (TARGET_MACHO) ++ return std_gimplify_va_arg_expr (valist, type, pre_p, post_p); ++ + indirect_p = pass_va_arg_by_reference (type); + if (indirect_p) + type = build_pointer_type (type); +@@ -21476,8 +22040,18 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + field_ptr_t = double_ptr_type_node; + break; + case E_TFmode: +- field_t = long_double_type_node; +- field_ptr_t = long_double_ptr_type_node; ++ if (TARGET_MACHO) ++ { ++ /* Darwin has __float128, and long double is the same as ++ double. */ ++ field_t = float128_type_node; ++ field_ptr_t = aarch64_float128_ptr_type_node; ++ } ++ else ++ { ++ field_t = long_double_type_node; ++ field_ptr_t = long_double_ptr_type_node; ++ } + break; + case E_SDmode: + field_t = dfloat32_type_node; +@@ -21560,6 +22134,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v, + int gr_saved = cfun->va_list_gpr_size; + int vr_saved = cfun->va_list_fpr_size; + ++ if (TARGET_MACHO) ++ return default_setup_incoming_varargs (cum_v, arg, pretend_size, no_rtl); ++ + /* The caller has advanced CUM up to, but not beyond, the last named + argument. Advance a local copy of CUM past the last "real" named + argument, to find out how many registers are left over. */ +@@ -22403,6 +22980,12 @@ aarch64_autovectorize_vector_modes (vector_modes *modes, bool) + static const char * + aarch64_mangle_type (const_tree type) + { ++ /* The darwinpcs ABI documents say that "__va_list" has to be ++ mangled as char *. */ ++ if (TARGET_MACHO ++ && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) ++ return "Pc"; ++ + /* The AArch64 ABI documents say that "__va_list" has to be + mangled as if it is in the "std" namespace. */ + if (lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) +@@ -22419,6 +23002,12 @@ aarch64_mangle_type (const_tree type) + return "Dh"; + } + ++ /* __float128 is mangled as "g" on darwin. _Float128 is not mangled here, ++ but handled in common code (as "DF128_"). */ ++ if (TARGET_MACHO && TYPE_MODE (type) == TFmode ++ && TYPE_MAIN_VARIANT (type) == float128t_type_node) ++ return "g"; ++ + /* Mangle AArch64-specific internal types. TYPE_NAME is non-NULL_TREE for + builtin types. */ + if (TYPE_NAME (type) != NULL) +@@ -23116,7 +23705,8 @@ aarch64_mov_operand_p (rtx x, machine_mode mode) + + /* GOT accesses are valid moves. */ + if (SYMBOL_REF_P (x) +- && aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G) ++ && (aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (x) == SYMBOL_MO_SMALL_GOT)) + return true; + + if (SYMBOL_REF_P (x) && mode == DImode && CONSTANT_ADDRESS_P (x)) +@@ -24453,12 +25043,8 @@ aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name) + static std::string aarch64_last_printed_arch_string; + static std::string aarch64_last_printed_tune_string; + +-/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used +- by the function fndecl. */ +- +-void +-aarch64_declare_function_name (FILE *stream, const char* name, +- tree fndecl) ++static void ++aarch64_function_options_preamble (tree fndecl) + { + tree target_parts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); + +@@ -24497,15 +25083,60 @@ aarch64_declare_function_name (FILE *stream, const char* name, + this_tune->name); + aarch64_last_printed_tune_string = this_tune->name; + } ++} ++ ++/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used ++ by the function fndecl. */ ++ ++#if TARGET_MACHO ++void ++aarch64_darwin_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ gcc_checking_assert (TREE_CODE (fndecl) == FUNCTION_DECL); ++ gcc_checking_assert (!DECL_COMMON (fndecl)); + ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ ++ /* Darwin does not emit pcs variant info. */ ++ ++ rtx decl_rtx = XEXP (DECL_RTL (fndecl), 0); ++ if (GET_CODE (decl_rtx) != SYMBOL_REF) ++ name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); ++ ++ if (! DECL_WEAK (fndecl) ++ && ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl))) ++ machopic_define_symbol (DECL_RTL (fndecl)); ++ if ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl)) ++ (* targetm.encode_section_info) (fndecl, DECL_RTL (fndecl), false); ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); ++ ++ cfun->machine->label_is_assembled = true; ++} ++ ++#else ++ ++void ++aarch64_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ /* Emit any necessary pcs information. */ + aarch64_asm_output_variant_pcs (stream, fndecl, name); + + /* Don't forget the type directive for ELF. */ ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function"); ++#endif + ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); + + cfun->machine->label_is_assembled = true; + } ++#endif + + /* Implement PRINT_PATCHABLE_FUNCTION_ENTRY. */ + +@@ -24562,12 +25193,17 @@ aarch64_output_patchable_area (unsigned int patch_area_size, bool record_p) + /* Implement ASM_OUTPUT_DEF_FROM_DECLS. Output .variant_pcs for aliases. */ + + void +-aarch64_asm_output_alias (FILE *stream, const tree decl, const tree target) ++aarch64_asm_output_alias (FILE *stream, const tree decl, ++ const tree target ATTRIBUTE_UNUSED) + { + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); ++#ifdef ASM_OUTPUT_DEF + const char *value = IDENTIFIER_POINTER (target); ++#endif + aarch64_asm_output_variant_pcs (stream, decl, name); ++#ifdef ASM_OUTPUT_DEF + ASM_OUTPUT_DEF (stream, name, value); ++#endif + } + + /* Implement ASM_OUTPUT_EXTERNAL. Output .variant_pcs for undefined +@@ -24613,6 +25249,9 @@ aarch64_start_file (void) + aarch64_last_printed_arch_string.c_str ()); + + default_file_start (); ++#if TARGET_MACHO ++ darwin_file_start (); ++#endif + } + + /* Emit load exclusive. */ +@@ -25192,6 +25831,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + } + + gcc_assert (CONST_INT_P (info.u.mov.value)); ++ unsigned HOST_WIDE_INT value = UINTVAL (info.u.mov.value); ++ ++ /* We have signed chars which can result in a sign-extended 8bit value ++ which is then emitted as an unsigned hex value, and the LLVM back end ++ assembler rejects that as being too big. */ ++ if (TARGET_MACHO && (known_eq (GET_MODE_BITSIZE (info.elt_mode), 8))) ++ { ++ unsigned HOST_WIDE_INT mask = (1U << GET_MODE_BITSIZE (info.elt_mode))-1; ++ value &= mask; ++ } + + if (which == AARCH64_CHECK_MOV) + { +@@ -25200,16 +25849,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + ? "msl" : "lsl"); + if (lane_count == 1) + snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX, +- mnemonic, UINTVAL (info.u.mov.value)); ++ mnemonic, value); + else if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX ", %s %d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), shift_op, ++ element_char, value, shift_op, + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + else + { +@@ -25218,12 +25867,12 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width, + if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC ", %s #%d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), "lsl", ++ element_char, value, "lsl", + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + return templ; + } +@@ -28459,7 +29108,8 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode) + } + + /* Implement TARGET_SCALAR_MODE_SUPPORTED_P - return TRUE +- if MODE is [BH]Fmode, and punt to the generic implementation otherwise. */ ++ if MODE is [BH]Fmode, or TFmode on Mach-O, and punt to the generic ++ implementation otherwise. */ + + static bool + aarch64_scalar_mode_supported_p (scalar_mode mode) +@@ -28467,7 +29117,7 @@ aarch64_scalar_mode_supported_p (scalar_mode mode) + if (DECIMAL_FLOAT_MODE_P (mode)) + return default_decimal_float_supported_p (); + +- return ((mode == HFmode || mode == BFmode) ++ return ((mode == HFmode || mode == BFmode || (mode == TFmode && TARGET_MACHO)) + ? true + : default_scalar_mode_supported_p (mode)); + } +@@ -29284,19 +29934,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE *out_file) + continue; + + const char *name = indirect_symbol_names[regnum]; +- switch_to_section (get_named_section (decl, NULL, 0)); ++ /* If the target uses a unique section for this switch to it. */ ++ if (DECL_SECTION_NAME (decl)) ++ switch_to_section (get_named_section (decl, NULL, 0)); ++ else ++ switch_to_section (text_section); + ASM_OUTPUT_ALIGN (out_file, 2); +- targetm.asm_out.globalize_label (out_file, name); ++ if (!TARGET_MACHO) ++ targetm.asm_out.globalize_label (out_file, name); ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE ++ ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); ++#endif ++ if (TARGET_MACHO) ++ { ++#ifdef ASM_WEAKEN_DECL ++ if (DECL_WEAK (decl)) ++ ASM_WEAKEN_DECL (out_file, decl, name, 0); ++ else ++#endif ++ targetm.asm_out.globalize_decl_name (out_file, decl); ++ } + /* Only emits if the compiler is configured for an assembler that can + handle visibility directives. */ + targetm.asm_out.assemble_visibility (decl, VISIBILITY_HIDDEN); +- ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); + ASM_OUTPUT_LABEL (out_file, name); + aarch64_sls_emit_function_stub (out_file, regnum); + /* Use the most conservative target to ensure it can always be used by any + function in the translation unit. */ + asm_fprintf (out_file, "\tdsb\tsy\n\tisb\n"); ++#ifdef ASM_DECLARE_FUNCTION_SIZE + ASM_DECLARE_FUNCTION_SIZE (out_file, name, decl); ++#endif + } + } + +@@ -30384,6 +31052,60 @@ aarch64_retrieve_sysreg (const char *regname, bool write_p, bool is128op) + return sysreg->encoding; + } + ++#if TARGET_MACHO ++/* This handles the promotion of function return values. ++ It also handles function args under two specific curcumstances: ++ - called from combine with a register argument ++ - caller for a libcall with type == NULL. ++ The remaining cases for argument promotion are handled with access to ++ cumulative args data, below. */ ++machine_mode ++aarch64_darwin_promote_fn_mode (const_tree type, machine_mode mode, ++ int *punsignedp, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ /* With the amended use of promote using cargs, the only cases that arrive ++ here with for_return == 0 are from combine (where the value is definitely ++ in a register) and for libcalls, where type == NULL. We want to promote ++ function return values in the callee, so this becomes pretty much ++ unconditional now. */ ++ if (type != NULL_TREE) ++ return promote_mode (type, mode, punsignedp); ++ return mode; ++} ++ ++/* Ensure that we only promote the mode of named parms when they are passed in ++ a register. Named values passed on the stack retain their original mode and ++ alignment. */ ++machine_mode ++aarch64_darwin_promote_function_mode_ca (cumulative_args_t ca, ++ function_arg_info arg, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int *punsignedp, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ tree type = arg.type; ++ machine_mode mode = arg.mode; ++ machine_mode new_mode = promote_mode (type, mode, punsignedp); ++ if (new_mode == mode || arg.named == false ++ || GET_MODE_CLASS (new_mode) != MODE_INT ++ || known_gt (GET_MODE_SIZE (new_mode), 4)) ++ return new_mode; ++ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++ /* Make sure that changes in assumption do not get missed. */ ++ gcc_checking_assert (for_return == 0 && new_mode == SImode ++ && !pcum->aapcs_arg_processed); ++ /* We have a named integer value that fits in a reg; if there's one available ++ then promote the value. */ ++ if (pcum->aapcs_ncrn < 8) ++ return new_mode; ++ return mode; ++} ++ ++#endif ++ + /* Target-specific selftests. */ + + #if CHECKING_P +@@ -30600,6 +31322,15 @@ aarch64_run_selftests (void) + #undef TARGET_ASM_ALIGNED_SI_OP + #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" + ++#if TARGET_MACHO ++#undef TARGET_ASM_UNALIGNED_HI_OP ++#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t" ++#undef TARGET_ASM_UNALIGNED_SI_OP ++#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t" ++#undef TARGET_ASM_UNALIGNED_DI_OP ++#define TARGET_ASM_UNALIGNED_DI_OP "\t.quad\t" ++#endif ++ + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ + hook_bool_const_tree_hwi_hwi_const_tree_true +@@ -30702,6 +31433,12 @@ aarch64_run_selftests (void) + #undef TARGET_FUNCTION_ARG_BOUNDARY + #define TARGET_FUNCTION_ARG_BOUNDARY aarch64_function_arg_boundary + ++#undef TARGET_FUNCTION_ARG_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_BOUNDARY_CA aarch64_function_arg_boundary_ca ++ ++#undef TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA aarch64_function_arg_round_boundary_ca ++ + #undef TARGET_FUNCTION_ARG_PADDING + #define TARGET_FUNCTION_ARG_PADDING aarch64_function_arg_padding + +@@ -31042,7 +31779,7 @@ aarch64_libgcc_floating_mode_supported_p + + /* The architecture reserves bits 0 and 1 so use bit 2 for descriptors. */ + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS AARCH64_CUSTOM_FUNCTION_TEST + + #undef TARGET_HARD_REGNO_NREGS + #define TARGET_HARD_REGNO_NREGS aarch64_hard_regno_nregs +diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h +index fe02a02a57b..b486afb795f 100644 +--- a/gcc/config/aarch64/aarch64.h ++++ b/gcc/config/aarch64/aarch64.h +@@ -72,6 +72,10 @@ + #define TARGET_SIMD (AARCH64_ISA_SIMD && AARCH64_ISA_SM_OFF) + #define TARGET_FLOAT (AARCH64_ISA_FP) + ++/* If this is non-zero then generated code of the object format, ABI and ++ assembler syntax used by Darwin (Mach-O) platforms. */ ++#define TARGET_MACHO 0 ++ + #define UNITS_PER_WORD 8 + + #define UNITS_PER_VREG 16 +@@ -149,6 +153,12 @@ + /* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY). */ + #define MALLOC_ABI_ALIGNMENT 128 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define AARCH64_CUSTOM_FUNCTION_TEST 4 ++ + /* Defined by the ABI */ + #define WCHAR_TYPE "unsigned int" + #define WCHAR_TYPE_SIZE 32 +@@ -1146,6 +1156,24 @@ typedef struct + aapcs_reg == NULL_RTX. */ + int aapcs_stack_size; /* The total size (in words, per 8 byte) of the + stack arg area so far. */ ++ ++ /* In the darwinpcs, items smaller than one word are packed onto the stack ++ naturally aligned. Unnamed parameters passed in a variadic call are, ++ however, aligned the same way as the AAPCS64. This means that we need to ++ pad the last named arg to the next parm boundary (and hence notice when ++ we are processing that arg). */ ++ int darwinpcs_stack_bytes; /* If the argument is passed on the stack, this ++ the byte-size. */ ++ int darwinpcs_sub_word_offset;/* This is the offset of this arg within a word ++ when placing smaller items for darwinpcs. */ ++ int darwinpcs_sub_word_pos; /* The next byte available within the word for ++ darwinpcs. */ ++ unsigned darwinpcs_arg_boundary; /* The computed argument boundary. */ ++ unsigned darwinpcs_arg_padding; /* The computed argument padding. */ ++ unsigned darwinpcs_n_named; /* Number of named arguments. */ ++ unsigned darwinpcs_n_args_processed; /* Processed so far. */ ++ bool named_p; /* Is this arg named? */ ++ bool last_named_p; /* Is this the last named arg? */ + bool silent_p; /* True if we should act silently, rather than + raise an error for invalid calls. */ + +@@ -1457,8 +1485,13 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); + #define ASM_CPU_SPEC \ + MCPU_TO_MARCH_SPEC + ++#ifndef SUBTARGET_EXTRA_SPECS ++#define SUBTARGET_EXTRA_SPECS ++#endif ++ + #define EXTRA_SPECS \ +- { "asm_cpu_spec", ASM_CPU_SPEC } ++ { "asm_cpu_spec", ASM_CPU_SPEC }, \ ++ SUBTARGET_EXTRA_SPECS + + #define ASM_OUTPUT_POOL_EPILOGUE aarch64_asm_output_pool_epilogue + +@@ -1471,6 +1504,10 @@ extern GTY(()) tree aarch64_fp16_ptr_type_node; + bfloat16_type_node. Defined in aarch64-builtins.cc. */ + extern GTY(()) tree aarch64_bf16_ptr_type_node; + ++/* A pointer to the user-visible __float128 (on Mach-O). Defined in ++ aarch64-builtins.c. */ ++extern GTY(()) tree aarch64_float128_ptr_type_node; ++ + /* The generic unwind code in libgcc does not initialize the frame pointer. + So in order to unwind a function using a frame pointer, the very first + function that is unwound must save the frame pointer. That way the frame +diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md +index 6a481059bf0..6d62e8ec0dd 100644 +--- a/gcc/config/aarch64/aarch64.md ++++ b/gcc/config/aarch64/aarch64.md +@@ -363,6 +363,7 @@ + ;; Wraps a constant integer that should be multiplied by the number + ;; of quadwords in an SME vector. + UNSPEC_SME_VQ ++ UNSPEC_MACHOPIC_OFFSET ; Common to Mach-O ports. + ]) + + (define_c_enum "unspecv" [ +@@ -995,6 +996,37 @@ + [(set_attr "type" "load_4")] + ) + ++(define_insn "prefetch_unscaled" ++ [(prefetch (match_operand:DI 0 "aarch64_unscaled_prefetch_operand" "Du") ++ (match_operand:QI 1 "const_int_operand" "") ++ (match_operand:QI 2 "const_int_operand" ""))] ++ "" ++ { ++ const char * pftype[2][4] = ++ { ++ {"prfum\\tPLDL1STRM, %0", ++ "prfum\\tPLDL3KEEP, %0", ++ "prfum\\tPLDL2KEEP, %0", ++ "prfum\\tPLDL1KEEP, %0"}, ++ {"prfum\\tPSTL1STRM, %0", ++ "prfum\\tPSTL3KEEP, %0", ++ "prfum\\tPSTL2KEEP, %0", ++ "prfum\\tPSTL1KEEP, %0"}, ++ }; ++ ++ int locality = INTVAL (operands[2]); ++ ++ gcc_assert (IN_RANGE (locality, 0, 3)); ++ ++ /* PRFUM accepts the same addresses as a 64-bit LDR so wrap ++ the address into a DImode MEM so that aarch64_print_operand knows ++ how to print it. */ ++ operands[0] = gen_rtx_MEM (DImode, operands[0]); ++ return pftype[INTVAL(operands[1])][locality]; ++ } ++ [(set_attr "type" "load_4")] ++) ++ + (define_insn "trap" + [(trap_if (const_int 1) (const_int 8))] + "" +@@ -1447,7 +1479,7 @@ + [w , m ; load_4 , fp , 4] ldr\t%s0, %1 + [m , r Z; store_4 , * , 4] str\t%w1, %0 + [m , w ; store_4 , fp , 4] str\t%s1, %0 +- [r , Usw; load_4 , * , 8] adrp\t%x0, %A1;ldr\t%w0, [%x0, %L1] ++ [r , Usw; load_4 , * , 8] << TARGET_MACHO ? \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %O1]\" : \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1]\"; + [r , Usa; adr , * , 4] adr\t%x0, %c1 + [r , Ush; adr , * , 4] adrp\t%x0, %A1 + [w , r Z; f_mcr , fp , 4] fmov\t%s0, %w1 +@@ -1484,7 +1516,7 @@ + [w, m ; load_8 , fp , 4] ldr\t%d0, %1 + [m, r Z; store_8 , * , 4] str\t%x1, %0 + [m, w ; store_8 , fp , 4] str\t%d1, %0 +- [r, Usw; load_8 , * , 8] << TARGET_ILP32 ? "adrp\t%0, %A1;ldr\t%w0, [%0, %L1]" : "adrp\t%0, %A1;ldr\t%0, [%0, %L1]"; ++ [r, Usw; load_8 , * , 8] << TARGET_ILP32 ? (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %L1]\") : (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %L1]\"); + [r, Usa; adr , * , 4] adr\t%x0, %c1 + [r, Ush; adr , * , 4] adrp\t%x0, %A1 + [w, r Z; f_mcr , fp , 4] fmov\t%d0, %x1 +@@ -7390,7 +7422,10 @@ + (lo_sum:P (match_operand:P 1 "register_operand" "r") + (match_operand 2 "aarch64_valid_symref" "S")))] + "" +- "add\\t%0, %1, :lo12:%c2" ++ { return TARGET_MACHO ++ ? "add\\t%0, %1, %J2;" ++ : "add\\t%0, %1, :lo12:%c2"; ++ } + [(set_attr "type" "alu_imm")] + ) + +diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt +index 6356c419399..5c9bb0a9056 100644 +--- a/gcc/config/aarch64/aarch64.opt ++++ b/gcc/config/aarch64/aarch64.opt +@@ -193,6 +193,13 @@ Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32) + EnumValue + Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64) + ++EnumValue ++Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64) ++ ++m64 ++Target RejectNegative Alias(mabi=, darwinpcs) ++On Darwin for compatibility with other platform variants. ++ + mpc-relative-literal-loads + Target Save Var(pcrelative_literal_loads) Init(2) Save + PC relative literal loads. +diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md +index a2569cea510..9ade357cacc 100644 +--- a/gcc/config/aarch64/constraints.md ++++ b/gcc/config/aarch64/constraints.md +@@ -203,7 +203,9 @@ + A constraint that matches a small GOT access." + (and (match_code "const,symbol_ref") + (match_test "aarch64_classify_symbolic_expression (op) +- == SYMBOL_SMALL_GOT_4G"))) ++ == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (op) ++ == SYMBOL_MO_SMALL_GOT"))) + + (define_constraint "Uss" + "@internal +@@ -574,6 +576,11 @@ + An address valid for a prefetch instruction." + (match_test "aarch64_address_valid_for_prefetch_p (op, true)")) + ++(define_address_constraint "Du" ++ "@internal ++ An address valid for a prefetch instruction with an unscaled offset." ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, true)")) ++ + (define_constraint "vgb" + "@internal + A constraint that matches an immediate offset valid for SVE LD1B +diff --git a/gcc/config/aarch64/darwin.h b/gcc/config/aarch64/darwin.h +new file mode 100644 +index 00000000000..4b6bac4cf4b +--- /dev/null ++++ b/gcc/config/aarch64/darwin.h +@@ -0,0 +1,291 @@ ++/* Target definitions for Arm64/Aarch64 running on macOS/iOS. ++ ++Copyright The GNU Toolchain Authors. ++Contributed by Iain Sandoe. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 3, or (at your option) ++any later version. ++ ++GCC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++/* Enable Mach-O bits in generic Aarch64 code. */ ++#undef TARGET_MACHO ++#define TARGET_MACHO 1 ++ ++#undef DARWIN_ARM64 ++#define DARWIN_ARM64 1 ++ ++/* This is used in generic code in darwin.cc (at present, we have no support ++ for the arm64_32 target). */ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "long int" ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE aarch64_darwin_promote_fn_mode ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE_CA ++#define TARGET_PROMOTE_FUNCTION_MODE_CA aarch64_darwin_promote_function_mode_ca ++ ++/* NOTE that arm64_32 is a valid thing and corresponds to darwinpcs ++ and TARGET_ILP32, but we are not implementing that for now. */ ++#define TARGET_OS_CPP_BUILTINS() \ ++ do { \ ++ builtin_define ("__LITTLE_ENDIAN__"); \ ++ builtin_define ("__arm64"); \ ++ builtin_define ("__arm64__"); \ ++ darwin_cpp_builtins (pfile); \ ++ } while (0) ++ ++/* In Darwin's Arm64 ABI, chars are signed. */ ++ ++#undef DEFAULT_SIGNED_CHAR ++#define DEFAULT_SIGNED_CHAR 1 ++ ++#undef LONG_DOUBLE_TYPE_SIZE ++#define LONG_DOUBLE_TYPE_SIZE 64 ++ ++/* Disable custom function descriptors on Darwin (we use heap-based ++ trampolines). */ ++#undef AARCH64_CUSTOM_FUNCTION_TEST ++#define AARCH64_CUSTOM_FUNCTION_TEST 0 ++ ++/* Non-PIE executables are forbidden by the Arm64-darwin security model; ++ remove the option from link-lines since they just produce a warning from ++ ld64 and are then ignored anyway. */ ++#undef DARWIN_NOPIE_SPEC ++#define DARWIN_NOPIE_SPEC \ ++" % ++# include ++#endif ++ ++ ++#if TARGET_MACHO ++ ++/* Default architecture to use if -mcpu=native did not detect a known CPU. */ ++#define DEFAULT_ARCH "apple-m1" ++ ++/* macOS does not have /proc/cpuinfo and needs a different approach, ++ based on sysctl. It is much simpler. */ ++ ++const char * ++host_detect_local_cpu (ATTRIBUTE_UNUSED int argc, ATTRIBUTE_UNUSED const char **argv) ++{ ++ bool arch = false; ++ bool tune = false; ++ bool cpu = false; ++ const char *res = NULL; ++ uint32_t family; ++ size_t len = sizeof(family); ++ ++ gcc_assert (argc); ++ if (!argv[0]) ++ return NULL; ++ ++ /* Are we processing -march, mtune or mcpu? */ ++ arch = strcmp (argv[0], "arch") == 0; ++ if (!arch) ++ tune = strcmp (argv[0], "tune") == 0; ++ if (!arch && !tune) ++ cpu = strcmp (argv[0], "cpu") == 0; ++ if (!arch && !tune && !cpu) ++ return NULL; ++ ++ sysctlbyname("hw.cpufamily", &family, &len, NULL, 0); ++ ++ switch (family) ++ { ++ case 0x07d34b9f: // Vortex, Tempest ++ res = "apple-a12"; ++ break; ++ case 0x573b5eec: ++ case 0x1b588bb3: // Firestorm, Icestorm ++ res = "apple-m1"; ++ break; ++ case 0xda33d83d: // Blizzard, Avalanche ++ res = "apple-m2"; ++ break; ++ case 0xfa33415e: // Ibiza (M3) ++ case 0x5f4dea93: // Lobos (M3 Pro) ++ case 0x72015832: // Palma (M3 Max) ++ res = "apple-m3"; ++ break; ++ default: ++ res = DEFAULT_ARCH; ++ } ++ ++ if (res) ++ return concat ("-m", argv[0], "=", res, NULL); ++ else ++ return NULL; ++} ++ ++#else ++ + struct aarch64_arch_extension + { + const char *ext; +@@ -501,3 +569,4 @@ not_found: + } + } + ++#endif +diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md +index b895f5dcb86..6e7487bcef5 100644 +--- a/gcc/config/aarch64/predicates.md ++++ b/gcc/config/aarch64/predicates.md +@@ -352,9 +352,24 @@ + (define_predicate "aarch64_prefetch_operand" + (match_test "aarch64_address_valid_for_prefetch_p (op, false)")) + ++(define_predicate "aarch64_unscaled_prefetch_operand" ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, false)")) ++ + (define_predicate "aarch64_valid_symref" + (match_code "const, symbol_ref, label_ref") + { ++ if (TARGET_MACHO) ++ { ++ rtx x = op; ++ rtx offset; ++ split_const (x, &x, &offset); ++ if (GET_CODE (x) == CONST) ++ x = XEXP (x, 0); ++ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SALT_ADDR) ++ x = XVECEXP (x, 0, 0); ++ if (SYMBOL_REF_P (x) && INTVAL (offset) < 0) ++ return false; ++ } + return (aarch64_classify_symbolic_expression (op) + != SYMBOL_FORCE_TO_MEM); + }) +diff --git a/gcc/config/aarch64/t-aarch64-darwin b/gcc/config/aarch64/t-aarch64-darwin +new file mode 100644 +index 00000000000..e2b8ad9237f +--- /dev/null ++++ b/gcc/config/aarch64/t-aarch64-darwin +@@ -0,0 +1,25 @@ ++# Machine description for AArch64 architecture. ++# Copyright (C) 2020 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range ++ ++# TODO - figure out what multilib provisions we should make for ++# a) arm64e ++# b) arm64_32 +diff --git a/gcc/config/darwin-driver.cc b/gcc/config/darwin-driver.cc +index eabe9bc970d..176bcfb6843 100644 +--- a/gcc/config/darwin-driver.cc ++++ b/gcc/config/darwin-driver.cc +@@ -268,10 +268,13 @@ darwin_driver_init (unsigned int *decoded_options_count, + bool seenX86_64 = false; + bool seenPPC = false; + bool seenPPC64 = false; ++#if !DARWIN_ARM64 ++ bool seenArm64 = false; + bool seenM32 = false; + bool seenM64 = false; + bool appendM32 = false; + bool appendM64 = false; ++#endif + const char *vers_string = NULL; + bool seen_version_min = false; + bool seen_sysroot_p = false; +@@ -296,6 +299,12 @@ darwin_driver_init (unsigned int *decoded_options_count, + seenPPC = true; + else if (!strcmp ((*decoded_options)[i].arg, "ppc64")) + seenPPC64 = true; ++ else if (!strcmp ((*decoded_options)[i].arg, "arm64")) ++#if !DARWIN_ARM64 ++ seenArm64 = true; ++#else ++ ; /* We accept the option, but don't need to act on it. */ ++#endif + else + error ("this compiler does not support %qs", + (*decoded_options)[i].arg); +@@ -309,7 +318,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + --i; + --*decoded_options_count; + break; +- ++#if !DARWIN_ARM64 + case OPT_m32: + seenM32 = true; + break; +@@ -317,6 +326,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + case OPT_m64: + seenM64 = true; + break; ++#endif + + case OPT_mmacosx_version_min_: + seen_version_min = true; +@@ -366,6 +376,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenPPC || seenPPC64) + warning (0, "this compiler does not support PowerPC" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenX86) + { + if (seenX86_64 || seenM64) +@@ -389,6 +402,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenX86 || seenX86_64) + warning (0, "this compiler does not support x86" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenPPC) + { + if (seenPPC64 || seenM64) +@@ -408,12 +424,20 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (! seenM64) /* Add -m64 if the User didn't. */ + appendM64 = true; + } ++#elif DARWIN_ARM64 ++ if (seenPPC || seenPPC64) ++ warning (0, "this compiler does not support PowerPC" ++ " (%<-arch%> option ignored)"); ++ if (seenX86 || seenX86_64) ++ warning (0, "this compiler does not support x86" ++ " (%<-arch%> option ignored)"); + #endif + + /* If there is nothing else on the command line, do not add sysroot etc. */ + if (*decoded_options_count <= 1) + return; + ++#if !DARWIN_ARM64 + if (appendM32 || appendM64) + { + ++*decoded_options_count; +@@ -423,6 +447,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER, + &(*decoded_options)[*decoded_options_count - 1]); + } ++#endif + + if (!seen_sysroot_p) + { +diff --git a/gcc/config/darwin-protos.h b/gcc/config/darwin-protos.h +index b67e05264e1..35116317b59 100644 +--- a/gcc/config/darwin-protos.h ++++ b/gcc/config/darwin-protos.h +@@ -86,9 +86,12 @@ extern void darwin_asm_lto_end (void); + extern void darwin_mark_decl_preserved (const char *); + + extern tree darwin_handle_kext_attribute (tree *, tree, tree, int, bool *); +-extern tree darwin_handle_weak_import_attribute (tree *node, tree name, +- tree args, int flags, +- bool * no_add_attrs); ++extern tree darwin_handle_weak_import_attribute (tree *, tree, tree, int, ++ bool *); ++extern tree darwin_handle_availability_attribute (tree *, tree, tree, ++ int, bool *); ++extern bool darwin_attribute_takes_identifier_p (const_tree); ++ + extern void machopic_output_stub (FILE *, const char *, const char *); + extern void darwin_globalize_label (FILE *, const char *); + extern void darwin_assemble_visibility (tree, int); +@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfstring_table (tree); + extern void darwin_asm_output_anchor (rtx symbol); + extern bool darwin_use_anchors_for_symbol_p (const_rtx symbol); + extern bool darwin_kextabi_p (void); ++extern bool darwin_unreachable_traps_p (void); + extern void darwin_override_options (void); + extern void darwin_patch_builtins (void); + extern void darwin_rename_builtins (void); +diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc +index 63b8c509405..864c620c308 100644 +--- a/gcc/config/darwin.cc ++++ b/gcc/config/darwin.cc +@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see + #include "cfghooks.h" + #include "df.h" + #include "memmodel.h" ++#include "c-family/c-common.h" /* enum rid. */ + #include "tm_p.h" + #include "stringpool.h" + #include "attribs.h" +@@ -49,6 +50,7 @@ along with GCC; see the file COPYING3. If not see + #include "optabs.h" + #include "flags.h" + #include "opts.h" ++#include "c-family/c-objc.h" /* for objc_method_decl(). */ + + /* Fix and Continue. + +@@ -102,6 +104,7 @@ int darwin_running_cxx; + + /* Some code-gen now depends on OS major version numbers (at least). */ + int generating_for_darwin_version ; ++unsigned long current_os_version = 0; + + /* For older linkers we need to emit special sections (marked 'coalesced') for + for weak or single-definition items. */ +@@ -131,7 +134,7 @@ struct { + section * darwin_sections[NUM_DARWIN_SECTIONS]; + + /* While we transition to using in-tests instead of ifdef'd code. */ +-#if !HAVE_lo_sum ++#if !HAVE_lo_sum || DARWIN_ARM64 + #define gen_macho_high(m,a,b) (a) + #define gen_macho_low(m,a,b,c) (a) + #endif +@@ -1104,6 +1107,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) + return pic_ref; + } + ++#if !DARWIN_ARM64 + /* Callbacks to output the stub or non-lazy pointers. + Each works on the item in *SLOT,if it has been used. + DATA is the FILE* for assembly output. +@@ -1259,6 +1263,7 @@ machopic_finish (FILE *out_file) + machopic_indirections->traverse_noresize + (out_file); + } ++#endif + + int + machopic_operand_p (rtx op) +@@ -2194,6 +2199,122 @@ darwin_handle_kext_attribute (tree *node, tree name, + return NULL_TREE; + } + ++enum version_components { MAJOR, MINOR, TINY }; ++ ++/* Parse a version number in x.y.z form and validate it as a macOS ++ version. Ideally, we'd put this in a common place usable by the ++ Darwin backend. */ ++ ++static bool ++parse_version (unsigned version_array[3], const char *version_str) ++{ ++ size_t version_len; ++ char *end, last = '\0', delimiter = '.', alt_delim = '_'; ++ ++ if (!version_str) ++ return false; ++ ++ /* Handle the odd situation in which we get STRING_CST which contain the ++ starting and ending quotes. */ ++ if (version_str[0] == '"') ++ { ++ version_str++; ++ version_len = strrchr (&version_str[1], '"') - version_str; ++ last = '"'; ++ } ++ else ++ version_len = strlen (version_str); ++ ++ if (version_len < 1) ++ return false; ++ ++ /* Version string must consist of digits and periods only. */ ++ if (strspn (version_str, "0123456789._") != version_len) ++ return false; ++ ++ if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1])) ++ return false; ++ ++ version_array[MAJOR] = strtoul (version_str, &end, 10); ++ if (*end == '_') ++ { ++ delimiter = '_'; ++ alt_delim = '.'; ++ } ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MAJOR] == 100000) ++ return true; ++ if (version_array[MAJOR] > 99) ++ return false; ++ ++ /* Version string must not contain adjacent delimiters. */ ++ if (*version_str == delimiter || *version_str == alt_delim) ++ return false; ++ ++ version_array[MINOR] = strtoul (version_str, &end, 10); ++ if (*end == alt_delim) ++ return false; ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MINOR] > 99) ++ return false; ++ ++ version_array[TINY] = strtoul (version_str, &end, 10); ++ if (version_array[TINY] > 99) ++ return false; ++ ++ /* Version string must contain no more than three tokens. */ ++ if (*end != last) ++ return false; ++ ++ return true; ++} ++ ++/* Turn a version expressed as maj.min.tiny into an unsigned long ++ integer representing the value used in macOS availability macros. */ ++ ++static unsigned long ++version_from_version_array (unsigned vers[3]) ++{ ++ unsigned long res = 0; ++ /* There seems to be a special "unknown" value. */ ++ if (vers[0] == 100000) ++ return 999999; ++ ++ /* Here, we follow the 'modern' / 'legacy' numbering scheme for versions. */ ++ if (vers[0] > 10 || vers[1] >= 10) ++ res = vers[0] * 10000 + vers[1] * 100 + vers[2]; ++ else ++ { ++ res = vers[0] * 100; ++ if (vers[1] > 9) ++ res += 90; ++ else ++ res += vers[1] * 10; ++ if (vers[2] > 9) ++ res += 9; ++ else ++ res += vers[1]; ++ } ++ return res; ++} ++ ++/* Extract a macOS version from an availability attribute argument. */ ++ ++static unsigned long ++os_version_from_avail_value (tree value) ++{ ++ unsigned long res = 0; ++ unsigned vers[3] = {0,0,0}; ++ if (TREE_CODE (value) == STRING_CST) ++ { ++ if (parse_version (&vers[0], TREE_STRING_POINTER (value))) ++ res = version_from_version_array (&vers[0]); ++ } ++ else ++ gcc_unreachable (); ++ return res; ++} ++ + /* Handle a "weak_import" attribute; arguments as in + struct attribute_spec.handler. */ + +@@ -2215,6 +2336,231 @@ darwin_handle_weak_import_attribute (tree *node, tree name, + return NULL_TREE; + } + ++#define NUM_AV_OSES 13 ++const char *availability_os[NUM_AV_OSES] ++ = { "macos", "macosx", "ios", "tvos", "watchos", "driverkit", "swift", ++ "maccatalyst", "macCatalyst", "xros", "visionos", "android", "zos" }; ++ ++#define NUM_AV_CLAUSES 6 ++const char *availability_clause[NUM_AV_CLAUSES] ++ = { "unavailable", "introduced", "deprecated", "obsoleted", "message", ++ "replacement" }; ++ ++/* Validate and act upon the arguments to an 'availability' attribute. */ ++ ++tree ++darwin_handle_availability_attribute (tree *node, tree name, tree args, ++ int flags, bool * no_add_attrs) ++{ ++ tree decl = *node; ++ *no_add_attrs = true; ++ ++ if (!decl || (!TYPE_P (decl) && !DECL_P (decl))) ++ { ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ else if (decl == error_mark_node) ++ return NULL_TREE; ++ ++ location_t loc = DECL_SOURCE_LOCATION (decl); ++ if (args == NULL_TREE) ++ { ++ error_at (loc, "%qE attribute requires at least one argument", ++ name); ++ return NULL_TREE; ++ } ++ else if (args == error_mark_node) ++ return NULL_TREE; ++ ++ /* The first argument must name a supported OS - although we could choose ++ to ignore any OS we don't recognise. */ ++ gcc_checking_assert (TREE_CODE (args) == TREE_LIST); ++ tree platform = TREE_VALUE (args); ++ if (platform == error_mark_node) ++ return NULL_TREE; ++ ++ gcc_checking_assert (TREE_CODE (platform) == IDENTIFIER_NODE); ++ bool platform_ok = false; ++ unsigned plat_num = 0; ++ for (; plat_num < (unsigned) NUM_AV_OSES; plat_num++) ++ if (strcmp (availability_os[plat_num], IDENTIFIER_POINTER (platform)) == 0) ++ { ++ platform_ok = true; ++ break; ++ } ++ if (!platform_ok) ++ { ++ error_at (input_location, ++ "platform %qE is not recognised for the % " ++ "attribute", platform); ++ return NULL_TREE; ++ } ++ else if (plat_num > 1) /* We only compile for macos so far. */ ++ return NULL_TREE; ++ ++ /* We might be dealing with an object or type. */ ++ tree target_decl = NULL_TREE; ++ tree type = NULL_TREE; ++ bool warn = false; ++ if (DECL_P (*node)) ++ { ++ type = TREE_TYPE (decl); ++ ++ if (TREE_CODE (decl) == TYPE_DECL ++ || TREE_CODE (decl) == PARM_DECL ++ || VAR_OR_FUNCTION_DECL_P (decl) ++ || TREE_CODE (decl) == FIELD_DECL ++ || TREE_CODE (decl) == CONST_DECL ++ /*|| objc_method_decl (TREE_CODE (decl))*/) ++ target_decl = decl; ++ else ++ warn = true; ++ } ++ else if (TYPE_P (*node)) ++ type = target_decl = *node; ++ else ++ warn = true; ++ ++ tree what = NULL_TREE; ++ if (warn) ++ { ++ if (type && TYPE_NAME (type)) ++ { ++ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (*node); ++ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (type))) ++ what = DECL_NAME (TYPE_NAME (type)); ++ } ++ if (what) ++ warning (OPT_Wattributes, "%qE attribute ignored for %qE", name, what); ++ else ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ ++ /* Now we have to parse the availability clauses. */ ++ tree msg = NULL_TREE; ++ tree replacement = NULL_TREE; ++ bool unavailable = false; ++ unsigned introduced = 1000; ++ unsigned deprecated = current_os_version + 1; ++ unsigned obsoleted = current_os_version + 1; ++ for (tree arg = TREE_CHAIN (args); arg; arg = TREE_CHAIN (arg)) ++ { ++ tree clause_name = TREE_VALUE (arg); ++ tree clause_value = TREE_PURPOSE (arg); ++ if (clause_name == error_mark_node ++ || clause_value == error_mark_node) ++ continue; ++ unsigned clause_num = 0; ++ for (; clause_num < (unsigned) NUM_AV_CLAUSES; clause_num++) ++ if (strcmp (availability_clause[clause_num], ++ IDENTIFIER_POINTER (clause_name)) == 0) ++ break; ++ switch (clause_num) ++ { ++ default: ++ error_at (input_location, ++ "clause %qE is not recognised for the % " ++ "attribute", clause_name); ++ break; ++ case 0: ++ unavailable = true; ++ break; ++ case 1: ++ case 2: ++ case 3: ++ if (!clause_value) ++ error_at (input_location, "%<%E=%> requires a value", clause_name); ++ else ++ { ++ unsigned version = os_version_from_avail_value (clause_value); ++ if (version == 0) ++ error_at (input_location, "the value %qE provided to %qE is " ++ "not a valid OS version", clause_value, clause_name); ++ else if (clause_num == 1) ++ introduced = version; ++ else if (clause_num == 2) ++ deprecated = version; ++ else if (clause_num == 3) ++ obsoleted = version; ++ } ++ break; ++ case 4: ++ case 5: ++ if (!clause_value || TREE_CODE (clause_value) != STRING_CST) ++ error_at (input_location, "%<%E=%> requires a string", clause_name); ++ else if (clause_num == 4) ++ msg = clause_value; ++ else ++ replacement = clause_value; ++ break; ++ } ++ } ++ /* Now figure out what to do. */ ++ tree maybe_text = NULL_TREE; ++ if (replacement) ++ maybe_text = tree_cons (NULL_TREE, replacement, NULL_TREE); ++ else if (msg) ++ maybe_text = tree_cons (NULL_TREE, msg, NULL_TREE); ++ ++ if (unavailable || current_os_version >= obsoleted) ++ { ++ TREE_UNAVAILABLE (*node) = true; ++ /* We do not handle the availability attribute at diagnostics-time, so ++ if we want the informational messages, then attach them to additional ++ attributes for the deprecation or unavailability. TODO; maybe we can ++ fabricate the composite here. */ ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("unavailable"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version > deprecated) ++ { ++ TREE_DEPRECATED (*node) = true; ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("deprecated"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version < introduced) ++ *no_add_attrs = false; ++ return NULL_TREE; ++} ++ ++bool ++darwin_attribute_takes_identifier_p (const_tree attr_id) ++{ ++ return is_attribute_p ("availability", attr_id); ++} ++ + /* Emit a label for an FDE, making it global and/or weak if appropriate. + The third parameter is nonzero if this is for exception handling. + The fourth parameter is nonzero if this is just a placeholder for an +@@ -2306,6 +2652,8 @@ darwin_emit_except_table_label (FILE *file) + rtx + darwin_make_eh_symbol_indirect (rtx orig, bool ARG_UNUSED (pubvis)) + { ++ if (DARWIN_ARM64) ++ return orig; + if (DARWIN_PPC == 0 && TARGET_64BIT) + return orig; + +@@ -3154,7 +3502,12 @@ darwin_file_end (void) + fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags); + } + ++#if !DARWIN_ARM64 + machopic_finish (asm_out_file); ++#else ++ gcc_checking_assert (!machopic_indirections); ++#endif ++ + if (flag_apple_kext) + { + /* These sections are only used for kernel code. */ +@@ -3330,6 +3683,13 @@ darwin_kextabi_p (void) { + return flag_apple_kext; + } + ++/* True, iff we want to map __builtin_unreachable to a trap. */ ++ ++bool ++darwin_unreachable_traps_p (void) { ++ return darwin_unreachable_traps; ++} ++ + void + darwin_override_options (void) + { +@@ -3350,7 +3710,14 @@ darwin_override_options (void) + generating_for_darwin_version = 8; + + /* Earlier versions are not specifically accounted, until required. */ ++ unsigned vers[3] = {0,0,0}; ++ if (!parse_version (vers, darwin_macosx_version_min)) ++ error_at (UNKNOWN_LOCATION, "how did we get a bad OS version? (%s)", ++ darwin_macosx_version_min); ++ current_os_version = version_from_version_array (vers); + } ++ else ++ current_os_version = 1058; + + /* Some codegen needs to account for the capabilities of the target + linker. */ +@@ -3592,6 +3959,19 @@ darwin_override_options (void) + + /* The c_dialect...() macros are not available to us here. */ + darwin_running_cxx = (strstr (lang_hooks.name, "C++") != 0); ++ ++ /* Allow the clang extension to permit const vars used in array sizes. */ ++ if (!OPTION_SET_P (flag_allow_const_var_array_size)) ++ flag_allow_const_var_array_size = true; ++ ++ /* We need to consume attributes on function definitions from the the SDK ++ headers. */ ++ if (!OPTION_SET_P (flag_allow_ext_attr_placement)) ++ flag_allow_ext_attr_placement = true; ++ ++ /* We need to consume some C keywords in C++. */ ++ if (!OPTION_SET_P (flag_allow_extra_keywords)) ++ flag_allow_extra_keywords = true; + } + + #if DARWIN_PPC +diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h +index e7a6f5433ce..32bf784fc93 100644 +--- a/gcc/config/darwin.h ++++ b/gcc/config/darwin.h +@@ -42,6 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #define DARWIN_X86 0 + #define DARWIN_PPC 0 ++#define DARWIN_ARM64 0 + + #define OBJECT_FORMAT_MACHO 1 + +@@ -378,7 +379,8 @@ extern GTY(()) int darwin_ms_struct; + */ + + #define DARWIN_NOCOMPACT_UNWIND \ +-" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) " ++"%{!fuse-ld=lld: \ ++ %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}" + + /* In Darwin linker specs we can put -lcrt0.o and ld will search the library + path for crt0.o or -lcrtx.a and it will search for libcrtx.a. As for +@@ -402,7 +404,8 @@ extern GTY(()) int darwin_ms_struct; + LINK_PLUGIN_SPEC \ + "%{flto*:% Specify that ld64 is the toolchain linker for the current invocation. + ++munreachable-traps ++Target Var(darwin_unreachable_traps) Init(1) ++When set (the default) this makes __builtin_unreachable render as a trap. ++ + ; Driver options. + + all_load +diff --git a/gcc/configure b/gcc/configure +index a4dcd131783..4eee550a8b4 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -740,6 +740,8 @@ ORIGINAL_NM_FOR_TARGET + gcc_cv_nm + ORIGINAL_LD_GOLD_FOR_TARGET + ORIGINAL_LD_BFD_FOR_TARGET ++ORIGINAL_CLASSIC_LD_FOR_TARGET ++ORIGINAL_LLD_FOR_TARGET + ORIGINAL_LD_FOR_TARGET + ORIGINAL_PLUGIN_LD_FOR_TARGET + gcc_cv_ld +@@ -3803,20 +3805,19 @@ gcc_gxx_libcxx_include_dir= + + # Check whether --with-gxx-libcxx-include-dir was given. + if test "${with_gxx_libcxx_include_dir+set}" = set; then : +- withval=$with_gxx_libcxx_include_dir; case "${withval}" in +-yes) as_fn_error $? "bad value ${withval} given for libc++ include directory" "$LINENO" 5 ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac ++ withval=$with_gxx_libcxx_include_dir; gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir + fi + + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -3824,16 +3825,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. ++ gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. + gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[1-9]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -21611,7 +21616,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 21614 "configure" ++#line 21619 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -21717,7 +21722,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 21720 "configure" ++#line 21725 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -25342,6 +25347,14 @@ fi + $as_echo "$gold_non_default" >&6; } + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic ++ ++ + + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; +diff --git a/gcc/configure.ac b/gcc/configure.ac +index cb743b5a875..a88d9a1295d 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -235,18 +235,17 @@ gcc_gxx_libcxx_include_dir= + AC_ARG_WITH(gxx-libcxx-include-dir, + [AS_HELP_STRING([--with-gxx-libcxx-include-dir=DIR], + [specifies directory to find libc++ header files])], +-[case "${withval}" in +-yes) AC_MSG_ERROR(bad value ${withval} given for libc++ include directory) ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac]) ++[gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir]) + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -254,16 +253,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. + gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. ++ gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[[1-9]]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -2832,7 +2835,15 @@ fi + AC_MSG_RESULT($gold_non_default) + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic + AC_SUBST(ORIGINAL_LD_FOR_TARGET) ++AC_SUBST(ORIGINAL_LLD_FOR_TARGET) ++AC_SUBST(ORIGINAL_CLASSIC_LD_FOR_TARGET) + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; + *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; +diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc +index b54364bebaf..6d5a7e608c6 100644 +--- a/gcc/cp/decl2.cc ++++ b/gcc/cp/decl2.cc +@@ -3858,9 +3858,8 @@ get_tls_init_fn (tree var) + if (!flag_extern_tls_init && DECL_EXTERNAL (var)) + return NULL_TREE; + +- /* If the variable is internal, or if we can't generate aliases, +- call the local init function directly. */ +- if (!TREE_PUBLIC (var) || !TARGET_SUPPORTS_ALIASES) ++ /* If the variable is internal call the local init function directly. */ ++ if (!TREE_PUBLIC (var)) + return get_local_tls_init_fn (DECL_SOURCE_LOCATION (var)); + + tree sname = mangle_tls_init_fn (var); +@@ -4024,6 +4023,25 @@ generate_tls_wrapper (tree fn) + expand_or_defer_fn (finish_function (/*inline_p=*/false)); + } + ++/* A dummy init function to act as a weak placeholder for a (possibly non- ++ existent) dynamic init. */ ++static void ++generate_tls_dummy_init (tree fn) ++{ ++ tree var = DECL_BEFRIENDING_CLASSES (fn); ++ tree init_fn = get_tls_init_fn (var); ++ /* If have no init fn, or it is non-weak, then we do not need to make a ++ dummy. */ ++ if (!init_fn || !lookup_attribute ("weak", DECL_ATTRIBUTES (init_fn))) ++ return; ++ start_preparsed_function (init_fn, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ declare_weak (init_fn); ++ finish_return_stmt (NULL_TREE); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++} ++ + /* Start a global constructor or destructor function. */ + + static tree +@@ -4843,22 +4861,24 @@ handle_tls_init (void) + finish_expr_stmt (cp_build_modify_expr (loc, guard, NOP_EXPR, + boolean_true_node, + tf_warning_or_error)); ++ auto_vec direct_calls; + for (; vars; vars = TREE_CHAIN (vars)) + { + tree var = TREE_VALUE (vars); + tree init = TREE_PURPOSE (vars); + one_static_initialization_or_destruction (/*initp=*/true, var, init); + +- /* Output init aliases even with -fno-extern-tls-init. */ +- if (TARGET_SUPPORTS_ALIASES && TREE_PUBLIC (var)) ++ /* Output inits even with -fno-extern-tls-init. ++ We save the list here and output either an alias or a stub function ++ below. */ ++ if (TREE_PUBLIC (var)) + { +- tree single_init_fn = get_tls_init_fn (var); ++ tree single_init_fn = get_tls_init_fn (var); + if (single_init_fn == NULL_TREE) + continue; +- cgraph_node *alias +- = cgraph_node::get_create (fn)->create_same_body_alias +- (single_init_fn, fn); +- gcc_assert (alias != NULL); ++ if (single_init_fn == fn) ++ continue; ++ direct_calls.safe_push (single_init_fn); + } + } + +@@ -4866,6 +4886,30 @@ handle_tls_init (void) + finish_if_stmt (if_stmt); + finish_function_body (body); + expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ ++ /* For each TLS var that we have an init function, we either emit an alias ++ between that and the tls_init, or a stub function that just calls the ++ tls_init. */ ++ while (!direct_calls.is_empty()) ++ { ++ tree single_init_fn = direct_calls.pop (); ++ if (TARGET_SUPPORTS_ALIASES) ++ { ++ cgraph_node *alias ++ = cgraph_node::get_create (fn)->create_same_body_alias ++ (single_init_fn, fn); ++ gcc_assert (alias != NULL); ++ } ++ else ++ { ++ start_preparsed_function (single_init_fn, NULL_TREE, SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ tree r = build_call_expr (fn, 0); ++ finish_expr_stmt (r); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ } ++ } + } + + /* We're at the end of compilation, so generate any mangling aliases that +@@ -5285,7 +5329,14 @@ c_parse_final_cleanups (void) + } + + if (!DECL_INITIAL (decl) && decl_tls_wrapper_p (decl)) +- generate_tls_wrapper (decl); ++ { ++ generate_tls_wrapper (decl); ++ /* The wrapper might have a weak reference to an init, we provide ++ a dummy function to satisfy that here. The linker/dynamic ++ loader will override this with the actual init, if one is ++ required. */ ++ generate_tls_dummy_init (decl); ++ } + + if (!DECL_SAVED_TREE (decl)) + continue; +diff --git a/gcc/cp/lex.cc b/gcc/cp/lex.cc +index 1110db7f8d0..0c4f93a6787 100644 +--- a/gcc/cp/lex.cc ++++ b/gcc/cp/lex.cc +@@ -267,6 +267,9 @@ init_reswords (void) + { + if (c_common_reswords[i].disable & D_CONLY) + continue; ++ if (!flag_allow_extra_keywords ++ && c_common_reswords[i].disable & D_EXT_C_IN_CXX) ++ continue; + id = get_identifier (c_common_reswords[i].word); + C_SET_RID_CODE (id, c_common_reswords[i].rid); + ridpointers [(int) c_common_reswords[i].rid] = id; +diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc +index 4a2c1f272a3..d917d01a50b 100644 +--- a/gcc/cp/parser.cc ++++ b/gcc/cp/parser.cc +@@ -705,6 +705,91 @@ cp_lexer_handle_early_pragma (cp_lexer *lexer) + static cp_parser *cp_parser_new (cp_lexer *); + static GTY (()) cp_parser *the_parser; + ++/* Context-sensitive parse-checking for clang-style attributes. */ ++ ++enum clang_attr_state { ++ CA_NONE = 0, ++ CA_ATTR, ++ CA_BR1, CA_BR2, ++ CA_LIST, ++ CA_LIST_ARGS, ++ CA_IS_CA, ++ CA_CA_ARGS, ++ CA_LIST_CONT ++}; ++ ++/* State machine tracking context of attribute lexing. */ ++ ++static enum clang_attr_state ++cp_lexer_attribute_state (cp_token& token, enum clang_attr_state attr_state) ++{ ++ /* Implement a context-sensitive parser for clang attributes. ++ We detect __attribute__((clang_style_attribute (ARGS))) and lex the ++ args ARGS with the following differences from GNU attributes: ++ (a) number-like values are lexed as strings [this allows lexing XX.YY.ZZ ++ version numbers]. ++ (b) we concatenate strings, since clang attributes allow this too. */ ++ switch (attr_state) ++ { ++ case CA_NONE: ++ if (token.type == CPP_KEYWORD ++ && token.keyword == RID_ATTRIBUTE) ++ attr_state = CA_ATTR; ++ break; ++ case CA_ATTR: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR1; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR1: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR2; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR2: ++ if (token.type == CPP_NAME) ++ { ++ tree identifier = (token.type == CPP_KEYWORD) ++ /* For keywords, use the canonical spelling, not the ++ parsed identifier. */ ++ ? ridpointers[(int) token.keyword] ++ : token.u.value; ++ identifier = canonicalize_attr_name (identifier); ++ if (attribute_clang_form_p (identifier)) ++ attr_state = CA_IS_CA; ++ else ++ attr_state = CA_LIST; ++ } ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_IS_CA: ++ case CA_LIST: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else if (token.type == CPP_OPEN_PAREN) ++ attr_state = attr_state == CA_IS_CA ? CA_CA_ARGS ++ : CA_LIST_ARGS; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_CA_ARGS: /* We will special-case args in this state. */ ++ case CA_LIST_ARGS: ++ if (token.type == CPP_CLOSE_PAREN) ++ attr_state = CA_LIST_CONT; ++ break; ++ case CA_LIST_CONT: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else ++ attr_state = CA_NONE; ++ break; ++ } ++ return attr_state; ++} ++ + /* Create a new main C++ lexer, the lexer that gets tokens from the + preprocessor, and also create the main parser. */ + +@@ -721,6 +806,8 @@ cp_lexer_new_main (void) + c_common_no_more_pch (); + + cp_lexer *lexer = cp_lexer_alloc (); ++ enum clang_attr_state attr_state = CA_NONE; ++ + /* Put the first token in the buffer. */ + cp_token *tok = lexer->buffer->quick_push (token); + +@@ -744,8 +831,14 @@ cp_lexer_new_main (void) + if (tok->type == CPP_PRAGMA_EOL) + cp_lexer_handle_early_pragma (lexer); + ++ attr_state = cp_lexer_attribute_state (*tok, attr_state); + tok = vec_safe_push (lexer->buffer, cp_token ()); +- cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok); ++ unsigned int flags = C_LEX_STRING_NO_JOIN; ++ /* If we are processing clang-style attribute args, lex numbers as ++ potential version strings; NN .. NN.MM .. NN.MM.OO */ ++ if (attr_state == CA_CA_ARGS) ++ flags |= C_LEX_NUMBER_AS_STRING; ++ cp_lexer_get_preprocessor_token (flags, tok); + } + + lexer->next_token = lexer->buffer->address (); +@@ -962,7 +1055,7 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token) + { + static int is_extern_c = 0; + +- /* Get a new token from the preprocessor. */ ++ /* Get a new token from the preprocessor. */ + token->type + = c_lex_with_flags (&token->u.value, &token->location, &token->flags, + flags); +@@ -23390,9 +23483,16 @@ cp_parser_init_declarator (cp_parser* parser, + "an % specification is not allowed " + "on a function-definition"); + if (attributes) +- error_at (attributes_start_token->location, +- "attributes are not allowed " +- "on a function-definition"); ++ { ++ /* When we are allowing attributes in this position, then add ++ them to the prefix ones. */ ++ if (flag_allow_ext_attr_placement) ++ prefix_attributes = chainon (prefix_attributes, attributes); ++ else ++ error_at (attributes_start_token->location, ++ "attributes are not allowed " ++ "on a function-definition"); ++ } + /* This is a function-definition. */ + *function_definition_p = true; + +@@ -29781,6 +29881,91 @@ cp_parser_gnu_attributes_opt (cp_parser* parser) + return attributes; + } + ++/* Parse the arguments list for a clang attribute. */ ++static tree ++cp_parser_clang_attribute (cp_parser *parser, tree/*attr_id*/) ++{ ++ /* Each entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ matching_parens parens; ++ if (!parens.require_open (parser)) ++ return NULL; ++ ++ bool save_translate_strings_p = parser->translate_strings_p; ++ parser->translate_strings_p = false; ++ tree attr_args = NULL_TREE; ++ cp_token *token; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_NAME) ++ name = token->u.value; ++ else if (token->type == CPP_KEYWORD) ++ name = ridpointers[(int) token->keyword]; ++ else if (token->flags & NAMED_OP) ++ name = get_identifier (cpp_type2name (token->type, token->flags)); ++ else ++ { ++ /* FIXME: context-sensitive for that attrib. */ ++ error_at (token->location, "expected an attribute keyword"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ cp_lexer_consume_token (parser->lexer); ++ ++ if (cp_lexer_next_token_is (parser->lexer, CPP_EQ)) ++ { ++ cp_lexer_consume_token (parser->lexer); /* eat the '=' */ ++ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_STRING) ++ value = cp_parser_string_literal (parser, /*translate=*/false, ++ /*wide_ok=*/false); ++ else ++ { ++ value = token->u.value; ++ cp_lexer_consume_token (parser->lexer); ++ } ++ } ++ /* else value is missing. */ ++ } ++ else if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ error_at (token->location, "expected %<,%>, %<=%> or %<)%>"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) ++ cp_lexer_consume_token (parser->lexer); ++ tree t = tree_cons (value, name, NULL_TREE); ++ attr_args = chainon (attr_args, t); ++ } while (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)); ++ ++ parser->translate_strings_p = save_translate_strings_p; ++ if (!parens.require_close (parser)) ++ return error_mark_node; ++ ++ return attr_args; ++} ++ + /* Parse a GNU attribute-list. + + attribute-list: +@@ -29840,9 +30025,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +- /* If it's an `(', then parse the attribute arguments. */ +- if (token->type == CPP_OPEN_PAREN) ++ if (token->type == CPP_OPEN_PAREN ++ && attribute_clang_form_p (identifier)) ++ arguments = cp_parser_clang_attribute (parser, identifier); ++ else if (token->type == CPP_OPEN_PAREN) + { ++ /* If it's an `(', then parse the attribute arguments. */ + vec *vec; + int attr_flag = (attribute_takes_identifier_p (identifier) + ? id_attr : normal_attr); +@@ -29859,12 +30047,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + arguments = build_tree_list_vec (vec); + release_tree_vector (vec); + } +- /* Save the arguments away. */ +- TREE_VALUE (attribute) = arguments; + } + + if (arguments != error_mark_node) + { ++ /* Save the arguments away. */ ++ TREE_VALUE (attribute) = arguments; + /* Add this attribute to the list. */ + TREE_CHAIN (attribute) = attribute_list; + attribute_list = attribute; +diff --git a/gcc/cumulative-args.h b/gcc/cumulative-args.h +new file mode 100644 +index 00000000000..b60928e37f9 +--- /dev/null ++++ b/gcc/cumulative-args.h +@@ -0,0 +1,20 @@ ++#ifndef GCC_CUMULATIVE_ARGS_H ++#define GCC_CUMULATIVE_ARGS_H ++ ++#if CHECKING_P ++ ++struct cumulative_args_t { void *magic; void *p; }; ++ ++#else /* !CHECKING_P */ ++ ++/* When using a GCC build compiler, we could use ++ __attribute__((transparent_union)) to get cumulative_args_t function ++ arguments passed like scalars where the ABI would mandate a less ++ efficient way of argument passing otherwise. However, that would come ++ at the cost of less type-safe !CHECKING_P compilation. */ ++ ++union cumulative_args_t { void *p; }; ++ ++#endif /* !CHECKING_P */ ++ ++#endif /* GCC_CUMULATIVE_ARGS_H */ +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 64728fead51..1e93f92a4a3 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -732,7 +732,7 @@ Objective-C and Objective-C++ Dialects}. + -freg-struct-return -fshort-enums -fshort-wchar + -fverbose-asm -fpack-struct[=@var{n}] + -fleading-underscore -ftls-model=@var{model} +--fstack-reuse=@var{reuse_level} ++-fstack-reuse=@var{reuse_level} -fstack-use-cumulative-args + -ftrampolines -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} + -ftrapv -fwrapv + -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} +@@ -954,7 +954,7 @@ Objective-C and Objective-C++ Dialects}. + -twolevel_namespace -umbrella -undefined + -unexported_symbols_list -weak_reference_mismatches + -whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} +--mkernel -mone-byte-bool} ++-mkernel -mone-byte-bool -munreachable-traps} + + @emph{DEC Alpha Options} + @gccoptlist{-mno-fp-regs -msoft-float +@@ -19134,6 +19134,17 @@ the behavior of older compilers in which temporaries' stack space is + not reused, the aggressive stack reuse can lead to runtime errors. This + option is used to control the temporary stack reuse optimization. + ++@opindex fstack_use_cumulative_args ++@item -fstack-use-cumulative-args ++This option instructs the compiler to use the ++@code{cumulative_args_t}-based stack layout target hooks, ++@code{TARGET_FUNCTION_ARG_BOUNDARY_CA} and ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA}. If a given target does ++not define these hooks, the default behaviour is to fallback to using ++the standard non-@code{_CA} variants instead. Certain targets (such as ++AArch64 Darwin) require using the more advanced @code{_CA}-based ++hooks: For these targets this option should be enabled by default. ++ + @opindex ftrapv + @item -ftrapv + This option generates traps for signed overflow on addition, subtraction, +@@ -25239,6 +25250,11 @@ without that switch. Using this switch may require recompiling all + other modules in a program, including system libraries. Use this + switch to conform to a non-default data model. + ++@opindex munreachable-traps ++@item -munreachable-traps ++Causes @code{__builtin_unreachable} to be rendered as a trap. This is the ++default for all Darwin architectures. ++ + @opindex mfix-and-continue + @opindex ffix-and-continue + @opindex findirect-data +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index cd50078227d..00df8aeb6b4 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -1066,6 +1066,10 @@ also define the hook to @code{default_promote_function_mode_always_promote} + if you would like to apply the same rules given by @code{PROMOTE_MODE}. + @end deftypefn + ++@deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE_CA (cumulative_args_t, @var{function_arg_info}, @var{const_tree}, int *@var{}, @var{int}) ++Like @code{promote_function_mode}, but takes a cumulative_args pointer and a current arg to supply the input. ++@end deftypefn ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -4471,6 +4475,16 @@ with the specified mode and type. The default hook returns + @code{PARM_BOUNDARY} for all arguments. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument alignment, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}. ++@end deftypefn ++ + @deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY (machine_mode @var{mode}, const_tree @var{type}) + Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY}, + which is the default value for this hook. You can define this hook to +@@ -4478,6 +4492,16 @@ return a different value if an argument size must be rounded to a larger + value. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument size rounding, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. ++@end deftypefn ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -12709,6 +12733,11 @@ This target hook can be used to generate a target-specific code + If selftests are enabled, run any selftests for this target. + @end deftypefn + ++@deftypefn {Target Hook} bool TARGET_UNREACHABLE_SHOULD_TRAP (void) ++This hook should return @code{true} if the target wants @code{__builtin_unreachable} to expand to a trap or @code{abort ()}. ++ The default value is false. ++@end deftypefn ++ + @deftypefn {Target Hook} bool TARGET_MEMTAG_CAN_TAG_ADDRESSES () + True if the backend architecture naturally supports ignoring some region + of pointers. This feature means that @option{-fsanitize=hwaddress} can +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index 058bd56487a..0ded0f992d4 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -949,6 +949,8 @@ applied. + + @hook TARGET_PROMOTE_FUNCTION_MODE + ++@hook TARGET_PROMOTE_FUNCTION_MODE_CA ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -3441,8 +3443,12 @@ required. + + @hook TARGET_FUNCTION_ARG_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_BOUNDARY_CA ++ + @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -8099,6 +8105,8 @@ maintainer is familiar with. + + @hook TARGET_RUN_TARGET_SELFTESTS + ++@hook TARGET_UNREACHABLE_SHOULD_TRAP ++ + @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES + + @hook TARGET_MEMTAG_TAG_SIZE +diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in +index 7d152e083a7..ec1a144e415 100644 +--- a/gcc/exec-tool.in ++++ b/gcc/exec-tool.in +@@ -23,6 +23,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" + ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" + ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" + ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ++ORIGINAL_LLD_FOR_TARGET="@ORIGINAL_LLD_FOR_TARGET@" ++ORIGINAL_CLASSIC_LD_FOR_TARGET="@ORIGINAL_CLASSIC_LD_FOR_TARGET@" + ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" + ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" + ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@" +@@ -39,24 +41,41 @@ case "$invoked" in + dir=gas + ;; + collect-ld) +- # Check -fuse-ld=bfd and -fuse-ld=gold +- case " $* " in +- *\ -fuse-ld=bfd\ *) +- original=$ORIGINAL_LD_BFD_FOR_TARGET +- ;; +- *\ -fuse-ld=gold\ *) +- original=$ORIGINAL_LD_GOLD_FOR_TARGET +- ;; +- *) +- # when using a linker plugin, gcc will always pass '-plugin' as the +- # first or second option to the linker. +- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then +- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET +- else +- original=$ORIGINAL_LD_FOR_TARGET +- fi +- ;; +- esac ++ # when using a linker plugin, gcc will always pass '-plugin' as the ++ # first or second option to the linker. ++ if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then ++ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET ++ else ++ original=$ORIGINAL_LD_FOR_TARGET ++ fi ++ # Check -fuse-ld=bfd, -fuse-ld=gold and -fuse-ld=classic ++ # Remove -fuse-ld=classic from the command line ++ for arg do ++ # temporarily, remove the arg. ++ shift ++ case $arg in ++ -fuse-ld=bfd) ++ original=$ORIGINAL_LD_BFD_FOR_TARGET ++ ;; ++ -fuse-ld=gold) ++ original=$ORIGINAL_LD_GOLD_FOR_TARGET ++ ;; ++ -fuse-ld=lld) ++ original=$ORIGINAL_LLD_FOR_TARGET ++ # We want to remove this from the command line; by the slightly ++ # obtuse mechanism of not putting it back. ++ continue ++ ;; ++ -fuse-ld=classic) ++ original=$ORIGINAL_CLASSIC_LD_FOR_TARGET ++ # As for lld. ++ continue ++ ;; ++ *) ;; ++ esac ++ # if we want to keep the arg, put it back. ++ set -- "$@" "$arg" ++ done + prog=ld-new$exeext + if test "$original" = ../gold/ld-new$exeext; then + dir=gold +diff --git a/gcc/explow.cc b/gcc/explow.cc +index 2a91cf76ea6..d6981888b15 100644 +--- a/gcc/explow.cc ++++ b/gcc/explow.cc +@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see + #include "langhooks.h" + #include "except.h" + #include "dojump.h" ++#include "calls.h" + #include "explow.h" + #include "expr.h" + #include "stringpool.h" +@@ -850,6 +851,16 @@ promote_function_mode (const_tree type, machine_mode mode, int *punsignedp, + return mode; + } + } ++ ++machine_mode ++promote_function_mode (cumulative_args_t args_so_far, function_arg_info arg, ++ const_tree funtype, int *punsignedp , int for_return) ++{ ++ return targetm.calls.promote_function_mode_ca (args_so_far, arg, funtype, ++ punsignedp, for_return); ++// return promote_function_mode (arg.type, arg.mode, punsignedp, funtype, for_return); ++} ++ + /* Return the mode to use to store a scalar of TYPE and MODE. + PUNSIGNEDP points to the signedness of the type and may be adjusted + to show what signedness to use on extension operations. */ +diff --git a/gcc/explow.h b/gcc/explow.h +index dd654649b06..da498430a21 100644 +--- a/gcc/explow.h ++++ b/gcc/explow.h +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_EXPLOW_H + #define GCC_EXPLOW_H + ++#include "calls.h" /* for cummulative args stuff. */ ++ + /* Return a memory reference like MEMREF, but which is known to have a + valid address. */ + extern rtx validize_mem (rtx); +@@ -50,8 +52,13 @@ extern rtx force_not_mem (rtx); + + /* Return mode and signedness to use when an argument or result in the + given mode is promoted. */ +-extern machine_mode promote_function_mode (const_tree, machine_mode, int *, +- const_tree, int); ++machine_mode promote_function_mode (const_tree, machine_mode, int *, ++ const_tree, int); ++ ++/* Return mode and signedness to use when an argument or result in the ++ given mode is promoted. */ ++machine_mode promote_function_mode (cumulative_args_t, function_arg_info, ++ const_tree, int *, int); + + /* Return mode and signedness to use when an object in the given mode + is promoted. */ +diff --git a/gcc/function.cc b/gcc/function.cc +index 05aa52d8f6a..3e893b41a0f 100644 +--- a/gcc/function.cc ++++ b/gcc/function.cc +@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3. If not see + #include "varasm.h" + #include "except.h" + #include "dojump.h" +-#include "explow.h" + #include "calls.h" ++#include "explow.h" + #include "expr.h" + #include "optabs-tree.h" + #include "output.h" +@@ -2449,7 +2449,10 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + else if (DECL_CHAIN (parm)) + data->arg.named = 1; /* Not the last non-variadic parm. */ + else if (targetm.calls.strict_argument_naming (all->args_so_far)) +- data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ { ++ data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ data->arg.last_named = 1; ++ } + else + data->arg.named = 0; /* Treat as variadic. */ + +@@ -2491,9 +2494,12 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + + /* Find mode as it is passed by the ABI. */ + unsignedp = TYPE_UNSIGNED (data->arg.type); +- data->arg.mode +- = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, +- TREE_TYPE (current_function_decl), 0); ++// data->arg.mode ++// = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, ++// TREE_TYPE (current_function_decl), 0); ++ data->arg.mode = promote_function_mode (all->args_so_far, data->arg, ++ TREE_TYPE (current_function_decl), ++ &unsignedp, 0); + } + + /* A subroutine of assign_parms. Invoke setup_incoming_varargs. */ +@@ -2506,6 +2512,7 @@ assign_parms_setup_varargs (struct assign_parm_data_all *all, + + function_arg_info last_named_arg = data->arg; + last_named_arg.named = true; ++ last_named_arg.last_named = true; + targetm.calls.setup_incoming_varargs (all->args_so_far, last_named_arg, + &varargs_pretend_bytes, no_rtl); + +@@ -2614,7 +2621,9 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all, + + locate_and_pad_parm (data->arg.mode, data->arg.type, in_regs, + all->reg_parm_stack_space, +- entry_parm ? data->partial : 0, current_function_decl, ++ entry_parm ? data->partial : 0, ++ all->args_so_far, ++ current_function_decl, + &all->stack_args_size, &data->locate); + + /* Update parm_stack_boundary if this parameter is passed in the +@@ -3923,7 +3932,8 @@ gimplify_parameters (gimple_seq *cleanup) + if (data.arg.pass_by_reference) + { + tree type = TREE_TYPE (data.arg.type); +- function_arg_info orig_arg (type, data.arg.named); ++ function_arg_info orig_arg (type, data.arg.named, ++ data.arg.last_named); + if (reference_callee_copied (&all.args_so_far_v, orig_arg)) + { + tree local, t; +@@ -4026,6 +4036,7 @@ gimplify_parameters (gimple_seq *cleanup) + void + locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + int reg_parm_stack_space, int partial, ++ cumulative_args_t ca, + tree fndecl ATTRIBUTE_UNUSED, + struct args_size *initial_offset_ptr, + struct locate_and_pad_arg_data *locate) +@@ -4063,9 +4074,23 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + ? arg_size_in_bytes (type) + : size_int (GET_MODE_SIZE (passed_mode))); + where_pad = targetm.calls.function_arg_padding (passed_mode, type); +- boundary = targetm.calls.function_arg_boundary (passed_mode, type); +- round_boundary = targetm.calls.function_arg_round_boundary (passed_mode, +- type); ++ ++ if (flag_stack_use_cumulative_args) ++ { ++ boundary = targetm.calls.function_arg_boundary_ca (passed_mode, ++ type, ++ ca); ++ round_boundary = targetm.calls.function_arg_round_boundary_ca ++ (passed_mode, type, ca); ++ } ++ else ++ { ++ boundary = targetm.calls.function_arg_boundary (passed_mode, ++ type); ++ round_boundary = targetm.calls.function_arg_round_boundary ++ (passed_mode, type); ++ } ++ + locate->where_pad = where_pad; + + /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */ +diff --git a/gcc/function.h b/gcc/function.h +index c0ba6cc1531..520fde7694c 100644 +--- a/gcc/function.h ++++ b/gcc/function.h +@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_FUNCTION_H + #define GCC_FUNCTION_H + ++#include "cumulative-args.h" + + /* Stack of pending (incomplete) sequences saved by `start_sequence'. + Each element describes one pending sequence. +@@ -680,6 +681,7 @@ extern bool aggregate_value_p (const_tree, const_tree); + extern bool use_register_for_decl (const_tree); + extern gimple_seq gimplify_parameters (gimple_seq *); + extern void locate_and_pad_parm (machine_mode, tree, int, int, int, ++ cumulative_args_t, + tree, struct args_size *, + struct locate_and_pad_arg_data *); + extern void generate_setjmp_warnings (void); +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index 244397b26c0..931cc5f531f 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -443,9 +443,8 @@ typedef struct { + /* _Float128 is defined as a basic type, so max_align_t must be + sufficiently aligned for it. This code must work in C++, so we + use __float128 here; that is only available on some +- architectures, but only on i386 is extra alignment needed for +- __float128. */ +-#ifdef __i386__ ++ architectures. */ ++#if defined(__i386__) || (__APPLE__ && __aarch64__) + __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); + #endif + } max_align_t; +diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h +index 74e847b2dec..58d282046e8 100644 +--- a/gcc/jit/libgccjit.h ++++ b/gcc/jit/libgccjit.h +@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see + #define LIBGCCJIT_H + + #include ++#ifdef __APPLE__ ++# include /* For ssize_t. */ ++#endif + + #ifdef __cplusplus + extern "C" { +diff --git a/gcc/opts.cc b/gcc/opts.cc +index 3333600e0ea..8355cc4b1de 100644 +--- a/gcc/opts.cc ++++ b/gcc/opts.cc +@@ -3289,6 +3289,7 @@ common_handle_option (struct gcc_options *opts, + break; + + case OPT_fuse_ld_bfd: ++ case OPT_fuse_ld_classic: + case OPT_fuse_ld_gold: + case OPT_fuse_ld_lld: + case OPT_fuse_ld_mold: +diff --git a/gcc/target.def b/gcc/target.def +index c27df8095be..20561fc8060 100644 +--- a/gcc/target.def ++++ b/gcc/target.def +@@ -4680,6 +4680,13 @@ if you would like to apply the same rules given by @code{PROMOTE_MODE}.", + const_tree funtype, int for_return), + default_promote_function_mode) + ++DEFHOOK ++(promote_function_mode_ca, ++ "Like @code{promote_function_mode}, but takes a cumulative_args pointer \ ++ and a current arg to supply the input.", ++ machine_mode, (cumulative_args_t, function_arg_info, const_tree, int *, int), ++ default_promote_function_mode_ca) ++ + DEFHOOK + (promote_prototypes, + "This target hook returns @code{true} if an argument declared in a\n\ +@@ -5133,6 +5140,18 @@ with the specified mode and type. The default hook returns\n\ + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_boundary) + ++DEFHOOK ++(function_arg_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument alignment, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_boundary_ca) ++ + DEFHOOK + (function_arg_round_boundary, + "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\ +@@ -5142,6 +5161,18 @@ value.", + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_round_boundary) + ++DEFHOOK ++(function_arg_round_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument size rounding, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_round_boundary_ca) ++ + /* Return the diagnostic message string if function without a prototype + is not allowed for this 'val' argument; NULL otherwise. */ + DEFHOOK +@@ -7389,6 +7420,16 @@ DEFHOOKPOD + libatomic. The default value is false.", + bool, false) + ++/* This value represents whether __builtin_unreachable should be expanded ++ as a trap instruction (or an abort() if the trap is not available). */ ++DEFHOOK ++(unreachable_should_trap, ++ "This hook should return @code{true} if the target wants \ ++ @code{__builtin_unreachable} to expand to a trap or @code{abort ()}.\n\ ++ The default value is false.", ++ bool, (void), ++ hook_bool_void_false) ++ + /* Close the 'struct gcc_target' definition. */ + HOOK_VECTOR_END (C90_EMPTY_HACK) + +diff --git a/gcc/target.h b/gcc/target.h +index c1f99b97b86..b51630a9782 100644 +--- a/gcc/target.h ++++ b/gcc/target.h +@@ -51,22 +51,8 @@ + #include "insn-codes.h" + #include "tm.h" + #include "hard-reg-set.h" +- +-#if CHECKING_P +- +-struct cumulative_args_t { void *magic; void *p; }; +- +-#else /* !CHECKING_P */ +- +-/* When using a GCC build compiler, we could use +- __attribute__((transparent_union)) to get cumulative_args_t function +- arguments passed like scalars where the ABI would mandate a less +- efficient way of argument passing otherwise. However, that would come +- at the cost of less type-safe !CHECKING_P compilation. */ +- +-union cumulative_args_t { void *p; }; +- +-#endif /* !CHECKING_P */ ++#include "tree-core.h" ++#include "cumulative-args.h" + + /* Target properties of _BitInt(N) type. _BitInt(N) is to be represented + as series of abi_limb_mode CEIL (N, GET_MODE_PRECISION (abi_limb_mode)) +diff --git a/gcc/targhooks.cc b/gcc/targhooks.cc +index fb339bf75dd..a529998f618 100644 +--- a/gcc/targhooks.cc ++++ b/gcc/targhooks.cc +@@ -161,6 +161,15 @@ default_promote_function_mode_always_promote (const_tree type, + return promote_mode (type, mode, punsignedp); + } + ++machine_mode ++default_promote_function_mode_ca (cumulative_args_t, function_arg_info arg, ++ const_tree funtype, int *punsignedp, ++ int for_return) ++{ ++ return promote_function_mode (arg.type, arg.mode, punsignedp, ++ funtype, for_return); ++} ++ + machine_mode + default_cc_modes_compatible (machine_mode m1, machine_mode m2) + { +@@ -876,6 +885,14 @@ default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_boundary (mode, type); ++} ++ + unsigned int + default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + const_tree type ATTRIBUTE_UNUSED) +@@ -883,6 +900,14 @@ default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_round_boundary (mode, type); ++} ++ + void + hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED) + { +diff --git a/gcc/targhooks.h b/gcc/targhooks.h +index 85f3817c176..392fd0d315e 100644 +--- a/gcc/targhooks.h ++++ b/gcc/targhooks.h +@@ -34,6 +34,9 @@ extern machine_mode default_promote_function_mode (const_tree, machine_mode, + extern machine_mode default_promote_function_mode_always_promote + (const_tree, machine_mode, int *, const_tree, int); + ++extern machine_mode default_promote_function_mode_ca ++ (cumulative_args_t, function_arg_info, const_tree, int *, int); ++ + extern machine_mode default_cc_modes_compatible (machine_mode, + machine_mode); + +@@ -160,6 +163,12 @@ extern unsigned int default_function_arg_boundary (machine_mode, + const_tree); + extern unsigned int default_function_arg_round_boundary (machine_mode, + const_tree); ++extern unsigned int default_function_arg_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); ++extern unsigned int default_function_arg_round_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); + extern bool hook_bool_const_rtx_commutative_p (const_rtx, int); + extern rtx default_function_value (const_tree, const_tree, bool); + extern HARD_REG_SET default_zero_call_used_regs (HARD_REG_SET); +diff --git a/libgcc/config.host b/libgcc/config.host +index ee10e99b0a6..585d4ffa08b 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -82,7 +82,7 @@ m32c*-*-*) + cpu_type=m32c + tmake_file=t-fdpbit + ;; +-aarch64*-*-*) ++aarch64*-*-* | arm64*-*-*) + cpu_type=aarch64 + ;; + alpha*-*-*) +@@ -236,11 +236,14 @@ case ${host} in + esac + tmake_file="$tmake_file t-slibgcc-darwin" + case ${host} in ++ x86_64-*-darwin2[0-2]*) ++ tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file" ++ ;; + *-*-darwin2*) + tmake_file="t-darwin-min-11 $tmake_file" + ;; + *-*-darwin1[89]*) +- tmake_file="t-darwin-min-8 $tmake_file" ++ tmake_file="t-darwin-min-8 t-darwin-libgccs1 $tmake_file" + ;; + *-*-darwin1[67]]*) + tmake_file="t-darwin-min-5 $tmake_file" +@@ -280,7 +283,7 @@ case ${host} in + if test "x$enable_darwin_at_rpath" = "xyes"; then + tmake_file="$tmake_file t-darwin-rpath " + fi +- extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a" ++ extra_parts="crt3.o crttms.o crttme.o libemutls_w.a " + ;; + *-*-dragonfly*) + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" +@@ -424,6 +427,15 @@ aarch64*-*-elf | aarch64*-*-rtems*) + tmake_file="${tmake_file} t-dfprules" + md_unwind_header=aarch64/aarch64-unwind.h + ;; ++aarch64*-*-darwin*) ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} ${cpu_type}/t-aarch64" ++ tmake_file="${tmake_file} ${cpu_type}/t-lse" ++ tmake_file="${tmake_file} t-crtfm t-dfprules" ++ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" ++ md_unwind_header=aarch64/aarch64-unwind.h ++ ;; + aarch64*-*-freebsd*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" +@@ -731,14 +743,14 @@ i[34567]86-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" +- extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a" + tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" +- extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a" + tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-elfiamcu) +@@ -1221,12 +1233,14 @@ powerpc-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc64-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc*-*-freebsd*) +diff --git a/libgcc/config/aarch64/__arm_sme_state.S b/libgcc/config/aarch64/__arm_sme_state.S +index 1fbb8c1ff53..b665769004f 100644 +--- a/libgcc/config/aarch64/__arm_sme_state.S ++++ b/libgcc/config/aarch64/__arm_sme_state.S +@@ -30,14 +30,19 @@ + - Takes no argument. + - Returns SME state in x0 and TPIDR2_EL0 in x1. */ + +-HIDDEN (__aarch64_have_sme) ++HIDDEN (ASMNAME (__aarch64_have_sme)) + +-variant_pcs (__arm_sme_state) ++variant_pcs (ASMNAME (__arm_sme_state)) + +-ENTRY (__arm_sme_state) ++ENTRY (ASMNAME (__arm_sme_state)) + /* Check if SME is available. */ +- adrp x1, __aarch64_have_sme +- ldrb w1, [x1, :lo12:__aarch64_have_sme] ++#ifdef __APPLE__ ++ adrp x1, ASMNAME (__aarch64_have_sme)@PAGE ++ ldrb w1, [x1, ASMNAME (__aarch64_have_sme)@PAGEOFF] ++#else ++ adrp x1, ASMNAME (__aarch64_have_sme) ++ ldrb w1, [x1, :lo12:ASMNAME (__aarch64_have_sme)] ++#endif + cbz w1, L(nosme) + + /* Expose the bottom 2 bits of svcr (SM, ZA) in x0 and set the +@@ -52,4 +57,4 @@ L(nosme): + mov x0, 0 + mov x1, 0 + ret +-END (__arm_sme_state) ++ENDm ASMNAME(__arm_sme_state) +diff --git a/libgcc/config/aarch64/__arm_tpidr2_restore.S b/libgcc/config/aarch64/__arm_tpidr2_restore.S +index 5088c86df32..bcfb935bc96 100644 +--- a/libgcc/config/aarch64/__arm_tpidr2_restore.S ++++ b/libgcc/config/aarch64/__arm_tpidr2_restore.S +@@ -31,9 +31,9 @@ + - Does not return a value. + - Can abort on failure (then registers are not preserved). */ + +-variant_pcs (__arm_tpidr2_restore) ++variant_pcs (ASMNAME (__arm_tpidr2_restore)) + +-ENTRY (__arm_tpidr2_restore) ++ENTRY (ASMNAME (__arm_tpidr2_restore)) + .inst 0xd53bd0ae /* mrs x14, tpidr2_el0 */ + cbnz x14, L(fail) + +@@ -85,5 +85,5 @@ L(fail): + str x16, [sp, 16] + .cfi_rel_offset 46, 16 + .inst 0xd503467f /* smstop */ +- bl abort +-END (__arm_tpidr2_restore) ++ bl ASMNAME (abort) ++ENDm ASMNAME (__arm_tpidr2_restore) +diff --git a/libgcc/config/aarch64/__arm_tpidr2_save.S b/libgcc/config/aarch64/__arm_tpidr2_save.S +index 2466b5863e4..28e75ade2d0 100644 +--- a/libgcc/config/aarch64/__arm_tpidr2_save.S ++++ b/libgcc/config/aarch64/__arm_tpidr2_save.S +@@ -35,10 +35,15 @@ HIDDEN (__aarch64_have_sme) + + variant_pcs (__arm_tpidr2_save) + +-ENTRY (__arm_tpidr2_save) ++ENTRY (ASMNAME (__arm_tpidr2_save)) + /* Check if SME is available. */ +- adrp x14, __aarch64_have_sme +- ldrb w14, [x14, :lo12:__aarch64_have_sme] ++#if __APPLE__ ++ adrp x14, ASMNAME (__aarch64_have_sme)@PAGE ++ ldrb w14, [x14, ASMNAME (__aarch64_have_sme)@PAGEOFF] ++#else ++ adrp x14, ASMNAME (__aarch64_have_sme) ++ ldrb w14, [x14, :lo12:ASMNAME (__aarch64_have_sme)] ++#endif + cbz w14, L(end) + + .inst 0xd53bd0ae /* mrs x14, tpidr2_el0 */ +@@ -92,10 +97,18 @@ L(fail): + str x16, [sp, 16] + .cfi_rel_offset 46, 16 + .inst 0xd503467f /* smstop */ +- bl abort +-END (__arm_tpidr2_save) +- ++ bl ASMNAME (abort) ++ENDm ASMNAME (__arm_tpidr2_save) ++ ++ GLOBAL(ASMNAME (__libgcc_arm_tpidr2_save)) ++ HIDDEN (ASMNAME (__libgcc_arm_tpidr2_save)) ++#if __APPLE__ ++ .text ++ .p2align 4 ++ASMNAME (__libgcc_arm_tpidr2_save): ++ b ASMNAME (__arm_tpidr2_save) ++#else + /* Hidden alias used by __arm_za_disable. */ +-.global __libgcc_arm_tpidr2_save +-HIDDEN (__libgcc_arm_tpidr2_save) +-.set __libgcc_arm_tpidr2_save, __arm_tpidr2_save ++.set ASMNAME (__libgcc_arm_tpidr2_save), ASMNAME (__arm_tpidr2_save) ++#endif ++ +diff --git a/libgcc/config/aarch64/__arm_za_disable.S b/libgcc/config/aarch64/__arm_za_disable.S +index c372fcffe18..9aefed6cde7 100644 +--- a/libgcc/config/aarch64/__arm_za_disable.S ++++ b/libgcc/config/aarch64/__arm_za_disable.S +@@ -31,16 +31,33 @@ + - Does not return a value. + - Can abort on failure (then registers are not preserved). */ + +-HIDDEN (__aarch64_have_sme) ++HIDDEN (ASMNAME(__aarch64_have_sme)) + +-HIDDEN (__libgcc_arm_tpidr2_save) ++HIDDEN (ASMNAME(__libgcc_arm_tpidr2_save)) + +-variant_pcs (__arm_za_disable) ++variant_pcs (ASMNAME(__arm_za_disable)) + +-ENTRY (__arm_za_disable) ++GLOBAL (ASMNAME (__libgcc_arm_za_disable)) ++HIDDEN (ASMNAME (__libgcc_arm_za_disable)) ++#if __APPLE__ ++ .text ++ .p2align 4 ++ASMNAME (__libgcc_arm_za_disable): ++ b ASMNAME (__arm_za_disable) ++#else ++/* Hidden alias used by the unwinder. */ ++.set ASMNAME (__libgcc_arm_za_disable), ASMNAME (__arm_za_disable) ++#endif ++ ++ENTRY (ASMNAME (__arm_za_disable)) + /* Check if SME is available. */ +- adrp x14, __aarch64_have_sme +- ldrb w14, [x14, :lo12:__aarch64_have_sme] ++#if __APPLE__ ++ adrp x14, ASMNAME (__aarch64_have_sme)@PAGE ++ ldrb w14, [x14, ASMNAME (__aarch64_have_sme)@PAGEOFF] ++#else ++ adrp x14, ASMNAME (__aarch64_have_sme) ++ ldrb w14, [x14, :lo12:ASMNAME (__aarch64_have_sme)] ++#endif + cbz w14, L(end) + + .inst 0xd53bd0ae /* mrs x14, tpidr2_el0 */ +@@ -52,7 +69,7 @@ ENTRY (__arm_za_disable) + .cfi_rel_offset x29, 0 + .cfi_rel_offset x30, 8 + mov x29, sp +- bl __libgcc_arm_tpidr2_save ++ bl ASMNAME (__libgcc_arm_tpidr2_save) + .inst 0xd51bd0bf /* msr tpidr2_el0, xzr */ + .inst 0xd503447f /* smstop za */ + ldp x29, x30, [sp], 16 +@@ -62,9 +79,5 @@ ENTRY (__arm_za_disable) + AUTIASP + L(end): + ret +-END (__arm_za_disable) ++ENDm ASMNAME(__arm_za_disable) + +-/* Hidden alias used by the unwinder. */ +-.global __libgcc_arm_za_disable +-HIDDEN (__libgcc_arm_za_disable) +-.set __libgcc_arm_za_disable, __arm_za_disable +diff --git a/libgcc/config/aarch64/aarch64-asm.h b/libgcc/config/aarch64/aarch64-asm.h +index 83c2e5944b3..7e41e6eb082 100644 +--- a/libgcc/config/aarch64/aarch64-asm.h ++++ b/libgcc/config/aarch64/aarch64-asm.h +@@ -24,8 +24,6 @@ + + #include "auto-target.h" + +-#define L(label) .L ## label +- + /* Marking variant PCS symbol references is important for PLT calls + otherwise it is for documenting the PCS in the symbol table. */ + #ifdef HAVE_AS_VARIANT_PCS +@@ -58,12 +56,31 @@ + # define AUTIASP + #endif + ++#define PASTE2(a, b) PASTE2a(a, b) ++#define PASTE2a(a, b) a ## b ++ ++#ifdef __USER_LABEL_PREFIX__ ++# define ASMNAME(name) PASTE2(__USER_LABEL_PREFIX__, name) ++#else ++# define ASMNAME(name) name ++#endif ++ + #ifdef __ELF__ ++#define L(label) .L ## label + #define HIDDEN(name) .hidden name ++#define GLOBAL(name) .global name + #define SYMBOL_SIZE(name) .size name, .-name + #define SYMBOL_TYPE(name, _type) .type name, _type ++#elif __APPLE__ ++#define L(label) L ## label ++#define HIDDEN(name) .private_extern name ++#define GLOBAL(name) .globl name ++#define SYMBOL_SIZE(name) ++#define SYMBOL_TYPE(name, _type) + #else ++#define L(label) .L ## label + #define HIDDEN(name) ++#define GLOBAL(name) .global name + #define SYMBOL_SIZE(name) + #define SYMBOL_TYPE(name, _type) + #endif +@@ -93,16 +110,19 @@ GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG) + # endif + #endif + +-#define ENTRY_ALIGN(name, align) \ +- .global name; \ +- SYMBOL_TYPE(name, %function); \ +- .balign align; \ +- name: \ +- .cfi_startproc; \ +- BTI_C +- +-#define ENTRY(name) ENTRY_ALIGN(name, 16) +- +-#define END(name) \ +- .cfi_endproc; \ +- SYMBOL_SIZE(name) ++.macro ENTRY_ALIGNP2m, name, align ++ .text ++ .p2align \align ++ GLOBAL (\name) ++ SYMBOL_TYPE(\name, %function) ++\name: ++ .cfi_startproc ++ BTI_C ++.endm ++ ++#define ENTRY(name) ENTRY_ALIGNP2m name, 4 ++ ++.macro ENDm, name ++ .cfi_endproc ++ SYMBOL_SIZE (\name) ++.endm +diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S +index ecef47086c6..54b85b5ad2a 100644 +--- a/libgcc/config/aarch64/lse.S ++++ b/libgcc/config/aarch64/lse.S +@@ -62,7 +62,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #endif + + /* Declare the symbol gating the LSE implementations. */ +- HIDDEN(__aarch64_have_lse_atomics) ++ HIDDEN (ASMNAME (__aarch64_have_lse_atomics)) + + /* Turn size and memory model defines into mnemonic fragments. */ + #if SIZE == 1 +@@ -85,6 +85,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # error + #endif + ++#undef L + #if MODEL == 1 + # define SUFF _relax + # define A +@@ -167,32 +168,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define tmp3 14 + #define tmp4 13 + +-/* Start and end a function. */ +-.macro STARTFN name +- .text +- .balign 16 +- .globl \name +- HIDDEN(\name) +- SYMBOL_TYPE(\name, %function) +- .cfi_startproc +-\name: +-.endm +- +-.macro ENDFN name +- .cfi_endproc +- SYMBOL_SIZE(\name) +-.endm +- + /* Branch to LABEL if LSE is disabled. */ + .macro JUMP_IF_NOT_LSE label +- adrp x(tmp0), __aarch64_have_lse_atomics +- ldrb w(tmp0), [x(tmp0), :lo12:__aarch64_have_lse_atomics] ++#if __APPLE__ ++ adrp x(tmp0), ASMNAME (__aarch64_have_lse_atomics)@PAGE ++ ldrb w(tmp0), [x(tmp0), ASMNAME (__aarch64_have_lse_atomics)@PAGEOFF] ++#else ++ adrp x(tmp0), ASMNAME (__aarch64_have_lse_atomics) ++ ldrb w(tmp0), [x(tmp0), :lo12:ASMNAME (__aarch64_have_lse_atomics)] ++#endif + cbz w(tmp0), \label + .endm + + #ifdef L_cas + +-STARTFN NAME(cas) ++ENTRY (ASMNAME (NAME(cas))) + JUMP_IF_NOT_LSE 8f + + #if SIZE < 16 +@@ -245,7 +235,7 @@ STARTFN NAME(cas) + + #endif + +-ENDFN NAME(cas) ++ENDm ASMNAME (NAME(cas)) + #endif + + #ifdef L_swp +@@ -255,7 +245,7 @@ ENDFN NAME(cas) + # define SWP .inst 0x38208020 + B + N + #endif + +-STARTFN NAME(swp) ++ENTRY (ASMNAME (NAME (swp))) + JUMP_IF_NOT_LSE 8f + + SWP /* s(0), s(0), [x1] */ +@@ -268,7 +258,7 @@ STARTFN NAME(swp) + BARRIER + ret + +-ENDFN NAME(swp) ++ENDm ASMNAME (NAME (swp)) + #endif + + #if defined(L_ldadd) || defined(L_ldclr) \ +@@ -299,7 +289,7 @@ ENDFN NAME(swp) + # define LDOP .inst 0x38200020 + OPN + B + N + #endif + +-STARTFN NAME(LDNM) ++ENTRY (ASMNAME (NAME (LDNM))) + JUMP_IF_NOT_LSE 8f + + LDOP /* s(0), s(0), [x1] */ +@@ -313,5 +303,5 @@ STARTFN NAME(LDNM) + BARRIER + ret + +-ENDFN NAME(LDNM) ++ENDm ASMNAME (NAME (LDNM)) + #endif +diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h +index 7fbb2a4288a..3ebc1d5fe44 100644 +--- a/libgcc/config/aarch64/sfp-machine.h ++++ b/libgcc/config/aarch64/sfp-machine.h +@@ -124,6 +124,27 @@ void __sfp_handle_exceptions (int); + + + /* Define ALIASNAME as a strong alias for NAME. */ ++#if defined __APPLE__ ++/* Mach-O doesn't support aliasing, so we build a secondary function for ++ the alias - we need to do a bit of a dance to find out what the type of ++ the arguments is and then apply that to the secondary function. ++ If these functions ever return anything but CMPtype we need to revisit ++ this... */ ++typedef float alias_HFtype __attribute__ ((mode (HF))); ++typedef float alias_SFtype __attribute__ ((mode (SF))); ++typedef float alias_DFtype __attribute__ ((mode (DF))); ++typedef float alias_TFtype __attribute__ ((mode (TF))); ++#define ALIAS_SELECTOR \ ++ CMPtype (*) (alias_HFtype, alias_HFtype): (alias_HFtype) 0, \ ++ CMPtype (*) (alias_SFtype, alias_SFtype): (alias_SFtype) 0, \ ++ CMPtype (*) (alias_DFtype, alias_DFtype): (alias_DFtype) 0, \ ++ CMPtype (*) (alias_TFtype, alias_TFtype): (alias_TFtype) 0 ++#define strong_alias(name, aliasname) \ ++ CMPtype aliasname (__typeof (_Generic (name, ALIAS_SELECTOR)) a, \ ++ __typeof (_Generic (name, ALIAS_SELECTOR)) b) \ ++ { return name (a, b); } ++#else + # define strong_alias(name, aliasname) _strong_alias(name, aliasname) + # define _strong_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); ++#endif +diff --git a/libgcc/config/aarch64/t-darwin b/libgcc/config/aarch64/t-darwin +new file mode 100644 +index 00000000000..f6ecda7b608 +--- /dev/null ++++ b/libgcc/config/aarch64/t-darwin +@@ -0,0 +1,7 @@ ++# Ensure we have a suitable minimum OS version. ++ ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=11.0 ++ ++LIB2_SIDITI_CONV_FUNCS = yes ++ ++BUILD_LIBGCCS1 = +diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S +index 6b248f7c040..dd844e8c9d8 100644 +--- a/libitm/config/aarch64/sjlj.S ++++ b/libitm/config/aarch64/sjlj.S +@@ -57,10 +57,19 @@ + + .text + .align 2 ++#if __ELF__ + .global _ITM_beginTransaction + .type _ITM_beginTransaction, %function + + _ITM_beginTransaction: ++ ++#elif __MACH__ ++ .global __ITM_beginTransaction ++ ++__ITM_beginTransaction: ++ ++#endif ++ + cfi_startproc + CFI_PAC_KEY + PAC_AND_BTI +@@ -84,8 +93,13 @@ _ITM_beginTransaction: + + /* Invoke GTM_begin_transaction with the struct we just built. */ + mov x1, sp ++#if __ELF__ + bl GTM_begin_transaction +- ++#elif __MACH__ ++ bl _GTM_begin_transaction ++#else ++#error "unexpected object format" ++#endif + /* Return; we don't need to restore any of the call-saved regs. */ + ldp x29, x30, [sp], 11*16 + cfi_adjust_cfa_offset(-11*16) +@@ -95,14 +109,23 @@ _ITM_beginTransaction: + CFI_PAC_TOGGLE + ret + cfi_endproc ++#if __ELF__ + .size _ITM_beginTransaction, . - _ITM_beginTransaction ++#endif + + .align 2 ++#if __ELF__ + .global GTM_longjmp + .hidden GTM_longjmp + .type GTM_longjmp, %function + + GTM_longjmp: ++ ++#elif __MACH__ ++ .private_extern _GTM_longjmp ++ ++_GTM_longjmp: ++#endif + /* The first parameter becomes the return value (x0). + The third parameter is ignored for now. */ + cfi_startproc +@@ -126,7 +149,9 @@ GTM_longjmp: + CFI_PAC_TOGGLE + br x30 + cfi_endproc ++#if __ELF__ + .size GTM_longjmp, . - GTM_longjmp ++#endif + + /* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ + #define FEATURE_1_AND 0xc0000000 +diff --git a/libitm/configure.tgt b/libitm/configure.tgt +index a8276f05d9b..6fad8534372 100644 +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -50,7 +50,7 @@ fi + # Map the target cpu to an ARCH sub-directory. At the same time, + # work out any special compilation flags as necessary. + case "${target_cpu}" in +- aarch64*) ARCH=aarch64 ;; ++ aarch64* | arm64*) ARCH=aarch64 ;; + alpha*) ARCH=alpha ;; + rs6000 | powerpc*) + XCFLAGS="${XCFLAGS} -mhtm" +diff --git a/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d b/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d +index cb8df47507f..2b70a8cca2b 100644 +--- a/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d ++++ b/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d +@@ -30,8 +30,13 @@ module core.internal.gc.impl.conservative.gc; + + /***************************************************/ + version = COLLECT_PARALLEL; // parallel scanning +-version (Posix) +- version = COLLECT_FORK; ++version (GNU) ++{ ++ version (linux) ++ version = COLLECT_FORK; // uses clone(), battle tested and reliable ++} ++else version (Posix) ++ version = COLLECT_FORK; + + import core.internal.gc.bits; + import core.internal.gc.os; diff --git a/Patches/gcc/gcc-15.1.0.diff b/Patches/gcc/gcc-15.1.0.diff new file mode 100644 index 0000000000000..8b5d6e7691f2d --- /dev/null +++ b/Patches/gcc/gcc-15.1.0.diff @@ -0,0 +1,5797 @@ +diff --git a/configure b/configure +index bf574efd1d8..aca12d23f85 100755 +--- a/configure ++++ b/configure +@@ -3602,6 +3602,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[3456789]86-*-darwin*) +diff --git a/configure.ac b/configure.ac +index 3e120b027e9..ae4c06b6f54 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -822,6 +822,8 @@ esac + + # Disable libffi for some systems. + case "${target}" in ++ aarch64*-*-darwin2*) ++ ;; + powerpc-*-darwin*) + ;; + i[[3456789]]86-*-darwin*) +diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x +index 9dc05ea17f1..14376346f6b 100644 +--- a/fixincludes/fixincl.x ++++ b/fixincludes/fixincl.x +@@ -2,11 +2,11 @@ + * + * DO NOT EDIT THIS FILE (fixincl.x) + * +- * It has been AutoGen-ed July 10, 2024 at 02:49:05 PM by AutoGen 5.18.16 ++ * It has been AutoGen-ed July 13, 2024 at 10:06:04 AM by AutoGen 5.18.7 + * From the definitions inclhack.def + * and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Jul 10 14:49:05 CEST 2024 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 13 10:06:04 BST 2024 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 274 fixup descriptions. ++ * This file contains 272 fixup descriptions. + * + * See README for more information. + * +@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { + #endif /* __MATH__ */", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Api_Availability fix +- */ +-tSCC zDarwin_Api_AvailabilityName[] = +- "darwin_api_availability"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_Api_AvailabilityList[] = +- "os/availability.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_Api_AvailabilityMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilitySelect0[] = +- " *#define __API_AVAILABLE.*\n\ +- *#define __API_DEPRECATED.*\n\ +- *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ +- *#define __API_UNAVAILABLE.*\n"; +- +-/* +- * content bypass pattern - skip fix if pattern found +- */ +-tSCC zDarwin_Api_AvailabilityBypass0[] = +- "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- +-#define DARWIN_API_AVAILABILITY_TEST_CT 2 +-static tTestDesc aDarwin_Api_AvailabilityTests[] = { +- { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, +- { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Api_Availability +- */ +-static const char* apzDarwin_Api_AvailabilityPatch[] = { +- "format", +- " #define API_AVAILABLE(...)\n\ +- #define API_DEPRECATED(...)\n\ +- #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ +- #define API_UNAVAILABLE(...)\n", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix +@@ -2763,51 +2713,6 @@ extern \"C\" {\n\ + #endif\n", + (char*)NULL }; + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * +- * +- * Description of Darwin_Availabilityinternal fix +- */ +-tSCC zDarwin_AvailabilityinternalName[] = +- "darwin_availabilityinternal"; +- +-/* +- * File name selection pattern +- */ +-tSCC zDarwin_AvailabilityinternalList[] = +- "AvailabilityInternal.h\0"; +-/* +- * Machine/OS name selection pattern +- */ +-tSCC* apzDarwin_AvailabilityinternalMachs[] = { +- "*-*-darwin*", +- (const char*)NULL }; +- +-/* +- * content selection pattern - do fix if pattern found +- */ +-tSCC zDarwin_AvailabilityinternalSelect0[] = +- "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- +-#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1 +-static tTestDesc aDarwin_AvailabilityinternalTests[] = { +- { TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, }; +- +-/* +- * Fix Command Arguments for Darwin_Availabilityinternal +- */ +-static const char* apzDarwin_AvailabilityinternalPatch[] = { +- "format", +- "#if defined(__has_attribute)\n\ +- #if __has_attribute(availability)\n\ +-%0\n\ +- #else\n\ +- #define %1\n\ +- #endif\n\ +-#else\n\ +- #define %1\n\ +-#endif", +- (char*)NULL }; +- + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_9_Long_Double_Funcs_2 fix +@@ -11202,9 +11107,9 @@ static const char* apzX11_SprintfPatch[] = { + * + * List of all fixes + */ +-#define REGEX_COUNT 318 ++#define REGEX_COUNT 315 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 274 ++#define FIX_COUNT 272 + + /* + * Enumerate the fixes +@@ -11213,7 +11118,6 @@ typedef enum { + AAB_AIX_STDIO_FIXIDX, + AAB_AIX_FCNTL_FIXIDX, + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, +- DARWIN_API_AVAILABILITY_FIXIDX, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, + AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, + AAB_FD_ZERO_SELECTBITS_H_FIXIDX, +@@ -11275,7 +11179,6 @@ typedef enum { + CTRL_QUOTES_DEF_FIXIDX, + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, +- DARWIN_AVAILABILITYINTERNAL_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, + DARWIN_EXTERNC_FIXIDX, + DARWIN_GCC4_BREAKAGE_FIXIDX, +@@ -11502,11 +11405,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + +- { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, +- apzDarwin_Api_AvailabilityMachs, +- DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, +- + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, + apzAab_Fd_Zero_Asm_Posix_Types_HMachs, + AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, +@@ -11812,11 +11710,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, + +- { zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList, +- apzDarwin_AvailabilityinternalMachs, +- DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +- aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 }, +- + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def +index 1ac8e335419..b37cca85670 100644 +--- a/fixincludes/inclhack.def ++++ b/fixincludes/inclhack.def +@@ -194,33 +194,6 @@ fix = { + _EndOfHeader_; + }; + +-/* +- * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where +- * __attribute__((availability)) is not supported. +- */ +-fix = { +- hackname = darwin_api_availability; +- mach = "*-*-darwin*"; +- files = os/availability.h; +- bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; +- select = +- " *#define __API_AVAILABLE.*\n" +- " *#define __API_DEPRECATED.*\n" +- " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" +- " *#define __API_UNAVAILABLE.*\n"; +- c_fix = format; +- c_fix_arg = +- " #define API_AVAILABLE(...)\n" +- " #define API_DEPRECATED(...)\n" +- " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- " #define API_UNAVAILABLE(...)\n"; +- test_text = +- "#define __API_AVAILABLE(...)\n" +- "#define __API_DEPRECATED(...)\n" +- "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" +- "#define __API_UNAVAILABLE(...)\n"; +-}; +- + /* + * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) + */ +@@ -1351,32 +1324,6 @@ fix = { + test_text = "extern void* malloc( size_t );"; + }; + +-/* +- * macOS 10.12 uses __attribute__((availability)) +- * unconditionally. +- */ +-fix = { +- hackname = darwin_availabilityinternal; +- mach = "*-*-darwin*"; +- files = AvailabilityInternal.h; +- select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; +- c_fix = format; +- c_fix_arg = <<- _EOFix_ +- #if defined(__has_attribute) +- #if __has_attribute(availability) +- %0 +- #else +- #define %1 +- #endif +- #else +- #define %1 +- #endif +- _EOFix_; +- +- test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n" +- "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))"; +-}; +- + /* + * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) + * to be useful, the main math.h must use <> and not "" includes. +diff --git a/gcc/ada/init.c b/gcc/ada/init.c +index c0fb749dc83..f9a66b9cef4 100644 +--- a/gcc/ada/init.c ++++ b/gcc/ada/init.c +@@ -2564,7 +2564,10 @@ __gnat_map_signal (int sig, siginfo_t *si, void *mcontext ATTRIBUTE_UNUSED) + /* Reset the use of alt stack, so that the alt stack will be used + for the next signal delivery. + The stack can't be used in case of stack checking. */ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK); ++#pragma GCC diagnostic pop + break; + + case SIGFPE: +diff --git a/gcc/builtins.cc b/gcc/builtins.cc +index a5f711a7b6a..09e18503ccc 100644 +--- a/gcc/builtins.cc ++++ b/gcc/builtins.cc +@@ -5962,6 +5962,13 @@ expand_builtin_trap (void) + static void + expand_builtin_unreachable (void) + { ++ /* If the target wants a trap in place of the fall-through, use that. */ ++ if (targetm.unreachable_should_trap ()) ++ { ++ expand_builtin_trap (); ++ return; ++ } ++ + /* Use gimple_build_builtin_unreachable or builtin_decl_unreachable + to avoid this. */ + gcc_checking_assert (!sanitize_flags_p (SANITIZE_UNREACHABLE)); +diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc +index 5a0e3d328ba..1d1c6e4d51f 100644 +--- a/gcc/c-family/c-attribs.cc ++++ b/gcc/c-family/c-attribs.cc +@@ -721,6 +721,18 @@ set_musttail_on_return (tree retval, location_t loc, bool musttail_p) + error_at (loc, "cannot tail-call: return value must be a call"); + } + ++/* Returns TRUE iff the attribute indicated by ATTR_ID needs its ++ arguments converted to string constants. */ ++ ++bool ++attribute_clang_form_p (const_tree attr_id) ++{ ++ const struct attribute_spec *spec = lookup_attribute_spec (attr_id); ++ if (spec && !strcmp ("availability", spec->name)) ++ return true; ++ return false; ++} ++ + /* Verify that argument value POS at position ARGNO to attribute NAME + applied to function FN (which is either a function declaration or function + type) refers to a function parameter at position POS and the expected type +diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc +index 587d76461e9..6fb3129639d 100644 +--- a/gcc/c-family/c-common.cc ++++ b/gcc/c-family/c-common.cc +@@ -354,7 +354,11 @@ static constexpr hf_feature_info has_feature_table[] = + { "enumerator_attributes", HF_FLAG_NONE, 0 }, + { "tls", HF_FLAG_NONE, 0 }, + { "gnu_asm_goto_with_outputs", HF_FLAG_EXT, 0 }, +- { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 } ++ { "gnu_asm_goto_with_outputs_full", HF_FLAG_EXT, 0 }, ++ { "attribute_availability", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_message", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_replacement", HF_FLAG_NONE, 0 }, ++ { "attribute_availability_with_version_underscores", HF_FLAG_NONE, 0 } + }; + + /* Global visibility options. */ +@@ -392,8 +396,8 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); + */ + const struct c_common_resword c_common_reswords[] = + { +- { "_Alignas", RID_ALIGNAS, D_CONLY }, +- { "_Alignof", RID_ALIGNOF, D_CONLY }, ++ { "_Alignas", RID_ALIGNAS, D_EXT_C_IN_CXX }, ++ { "_Alignof", RID_ALIGNOF, D_EXT_C_IN_CXX }, + { "_Atomic", RID_ATOMIC, D_CONLY }, + { "_BitInt", RID_BITINT, D_CONLY }, + { "_Bool", RID_BOOL, D_CONLY }, +diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h +index ea6c2975056..30ab3c56fa4 100644 +--- a/gcc/c-family/c-common.h ++++ b/gcc/c-family/c-common.h +@@ -447,6 +447,8 @@ extern machine_mode c_default_pointer_mode; + #define D_CXX20 0x8000 /* In C++, C++20 only. */ + #define D_CXX_COROUTINES 0x10000 /* In C++, only with coroutines. */ + #define D_CXX_MODULES 0x20000 /* In C++, only with modules. */ ++#define D_EXT_C_IN_CXX 0x40000 /* In C++, allow additional C keywords. */ ++#define D_EXT_CXX_IN_C 0x80000 /* In C, allow additional C++ keywords. */ + + #define D_CXX_CONCEPTS_FLAGS D_CXXONLY | D_CXX_CONCEPTS + #define D_CXX_CHAR8_T_FLAGS D_CXXONLY | D_CXX_CHAR8_T +@@ -1671,6 +1673,7 @@ extern void check_for_xor_used_as_pow (location_t lhs_loc, tree lhs_val, + /* In c-attribs.cc. */ + extern bool attribute_takes_identifier_p (const_tree); + extern tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); ++extern bool attribute_clang_form_p (const_tree); + extern tree handle_unused_attribute (tree *, tree, tree, int, bool *); + extern tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *); + extern int parse_tm_stmt_attr (tree, int); +diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc +index e450c9a57f0..52dad4436f7 100644 +--- a/gcc/c-family/c-lex.cc ++++ b/gcc/c-family/c-lex.cc +@@ -586,6 +586,21 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, + + case CPP_NUMBER: + { ++ /* If the user wants number-like entities to be returned as a raw ++ string, then don't try to classify them, which emits unwanted ++ diagnostics. */ ++ if (lex_flags & C_LEX_NUMBER_AS_STRING) ++ { ++ /* build_string adds a trailing NUL at [len]. */ ++ tree num_string = build_string (tok->val.str.len + 1, ++ (const char *) tok->val.str.text); ++ TREE_TYPE (num_string) = char_array_type_node; ++ *value = num_string; ++ /* We will effectively note this as CPP_N_INVALID, because we ++ made no checks here. */ ++ break; ++ } ++ + const char *suffix = NULL; + unsigned int flags = cpp_classify_number (parse_in, tok, &suffix, *loc); + +diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc +index d43b3aef102..fb318abe812 100644 +--- a/gcc/c-family/c-opts.cc ++++ b/gcc/c-family/c-opts.cc +@@ -1190,7 +1190,7 @@ c_common_post_options (const char **pfilename) + + if (flag_extern_tls_init) + { +- if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK) ++ if (!SUPPORTS_WEAK) + { + /* Lazy TLS initialization for a variable in another TU requires + alias and weak reference support. */ +diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h +index 13df9ea490e..bab7ca9c6b1 100644 +--- a/gcc/c-family/c-pragma.h ++++ b/gcc/c-family/c-pragma.h +@@ -289,6 +289,9 @@ extern void pragma_lex_discard_to_eol (); + #define C_LEX_STRING_NO_JOIN 2 /* Do not concatenate strings + nor translate them into execution + character set. */ ++#define C_LEX_NUMBER_AS_STRING 4 /* Do not classify a number, but ++ instead return it as a raw ++ string. */ + + /* This is not actually available to pragma parsers. It's merely a + convenient location to declare this function for c-lex, after +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 75b6531860e..bdc9d6f511f 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1806,6 +1806,18 @@ static-libmpxwrappers + Driver WarnRemoved + Removed in GCC 9. This switch has no effect. + ++fallow-const-var-array-size ++C ObjC C++ ObjC++ LTO Var(flag_allow_const_var_array_size) Init(0) ++Allow arrays sizes to be const-qualified vars in C and Objective-C. ++ ++fallow-extended-attribute-placement ++C ObjC C++ ObjC++ LTO Var(flag_allow_ext_attr_placement) Init(0) ++Allow placement of attributes on function definitions. ++ ++fallow-extra-keywords ++C ObjC C++ ObjC++ LTO Var(flag_allow_extra_keywords) Init(0) ++Allow additional C keywords in C++ and vice versa. ++ + fcilkplus + C ObjC C++ ObjC++ LTO Undocumented Ignore + Removed in GCC 8. This switch has no effect. +diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc +index 8c420f22976..53bd50002a0 100644 +--- a/gcc/c/c-decl.cc ++++ b/gcc/c/c-decl.cc +@@ -7359,6 +7359,25 @@ grokdeclarator (const struct c_declarator *declarator, + } + + size = c_fully_fold (size, false, &size_maybe_const); ++ bool size_const_var = false; ++ if (flag_allow_const_var_array_size) ++ { ++ tree maybe_const_size = TREE_CODE (size) == NOP_EXPR ++ ? TREE_OPERAND (size, 0) : size; ++ size_const_var ++ = (TREE_CODE (maybe_const_size) == VAR_DECL ++ && TREE_READONLY (maybe_const_size) ++ && !TREE_THIS_VOLATILE (maybe_const_size)); ++ if (size_const_var ++ && size_maybe_const ++ && DECL_INITIAL (maybe_const_size)) ++ { ++ size = DECL_INITIAL (maybe_const_size); ++ size = c_fully_fold (size, false, &size_maybe_const); ++ size_int_const = (TREE_CODE (size) == INTEGER_CST ++ && !TREE_OVERFLOW (size)); ++ } ++ } + + if (pedantic && size_maybe_const && integer_zerop (size)) + { +@@ -7400,6 +7419,9 @@ grokdeclarator (const struct c_declarator *declarator, + this_size_varies = size_varies = true; + warn_variable_length_array (name, size); + } ++ if (flag_allow_const_var_array_size && size_const_var) ++ pedwarn (input_location, OPT_Wpedantic, ++ "variably modified %qE at file scope", name); + } + else if ((decl_context == NORMAL || decl_context == FIELD) + && current_scope == file_scope) +diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc +index 22ec0f849b7..954f9d89414 100644 +--- a/gcc/c/c-parser.cc ++++ b/gcc/c/c-parser.cc +@@ -220,6 +220,9 @@ struct GTY(()) c_parser { + should translate them to the execution character set (false + inside attributes). */ + BOOL_BITFIELD translate_strings_p : 1; ++ /* True if we want to lex arbitrary number-like sequences as their ++ string representation. */ ++ BOOL_BITFIELD lex_number_as_string : 1; + + /* Objective-C specific parser/lexer information. */ + +@@ -326,10 +329,10 @@ c_lex_one_token (c_parser *parser, c_token *token, bool raw = false) + + if (raw || vec_safe_length (parser->raw_tokens) == 0) + { ++ int lex_flags = parser->lex_joined_string ? 0 : C_LEX_STRING_NO_JOIN; ++ lex_flags |= parser->lex_number_as_string ? C_LEX_NUMBER_AS_STRING : 0; + token->type = c_lex_with_flags (&token->value, &token->location, +- &token->flags, +- (parser->lex_joined_string +- ? 0 : C_LEX_STRING_NO_JOIN)); ++ &token->flags, lex_flags); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; +@@ -2718,15 +2721,28 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, + d = d->declarator; + underspec_name = d->u.id.id; + } ++ tree postfix_attrs = NULL_TREE; ++ if (flag_allow_ext_attr_placement ++ && c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) ++ { ++ postfix_attrs = c_parser_gnu_attributes (parser); ++ /* IF we have a function definition, and we're allowing it then ++ treat these attributes as if they had been prepended. */ ++ if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) ++ { ++ all_prefix_attrs = chainon (all_prefix_attrs, postfix_attrs); ++ postfix_attrs = NULL_TREE; ++ } ++ } + if (c_parser_next_token_is (parser, CPP_EQ) + || c_parser_next_token_is (parser, CPP_COMMA) + || c_parser_next_token_is (parser, CPP_SEMICOLON) + || c_parser_next_token_is_keyword (parser, RID_ASM) + || c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE) ++ || postfix_attrs + || c_parser_next_token_is_keyword (parser, RID_IN)) + { + tree asm_name = NULL_TREE; +- tree postfix_attrs = NULL_TREE; + if (!diagnosed_no_specs && !specs->declspecs_seen_p) + { + diagnosed_no_specs = true; +@@ -2738,8 +2754,9 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, + if (c_parser_next_token_is_keyword (parser, RID_ASM)) + asm_name = c_parser_simple_asm_expr (parser); + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) ++ postfix_attrs = c_parser_gnu_attributes (parser); ++ if (postfix_attrs) + { +- postfix_attrs = c_parser_gnu_attributes (parser); + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + /* This means there is an attribute specifier after +@@ -5475,6 +5492,88 @@ c_parser_gnu_attribute_any_word (c_parser *parser) + return attr_name; + } + ++/* Handle parsing clang-form attribute arguments, where we need to adjust ++ the parsing rules to relate to a specific attribute. */ ++ ++static tree ++c_parser_clang_attribute_arguments (c_parser *parser, tree /*attr_id*/) ++{ ++ /* We can, if required, alter the parsing on the basis of the attribute. ++ At present, we handle the availability attr, where ach entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ tree attr_args = NULL_TREE; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ if (c_parser_next_token_is (parser, CPP_NAME) ++ && c_parser_peek_token (parser)->id_kind == C_ID_ID) ++ { ++ name = c_parser_peek_token (parser)->value; ++ c_parser_consume_token (parser); ++ } ++ else if (c_parser_next_token_is (parser, CPP_COMMA)) ++ name = error_mark_node; /* Comma handled below. */ ++ else ++ { ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected an attribute keyword"); ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_EQ)) ++ { ++ c_parser_consume_token (parser); /* eat the '=' */ ++ /* We need to bludgeon the lexer into not trying to interpret the ++ xx.yy.zz form, since that just looks like a malformed float. ++ Also, as a result of macro processing, we can have strig literals ++ that are in multiple pieces so, for this specific part of the ++ parse, we need to join strings. */ ++ bool saved_join_state = parser->lex_joined_string; ++ parser->lex_number_as_string = 1; ++ parser->lex_joined_string = 1; ++ /* So look at the next token, expecting a string, or something that ++ looks initially like a number, but might be a version number. */ ++ c_parser_peek_token (parser); ++ /* Done with the funky number parsing. */ ++ parser->lex_number_as_string = 0; ++ parser->lex_joined_string = saved_join_state; ++ if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ value = c_parser_peek_token (parser)->value; ++ /* ???: check for error mark and early-return? */ ++ c_parser_consume_token (parser); ++ } ++ /* else value is absent. */ ++ } ++ else if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN) ++ && c_parser_next_token_is_not (parser, CPP_COMMA)) ++ { ++ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ++ "expected %<,%> or %<=%>"); ++ return error_mark_node; ++ } ++ if (c_parser_next_token_is (parser, CPP_COMMA)) ++ c_parser_consume_token (parser); /* Just skip the comma. */ ++ tree t = tree_cons (value, name, NULL); ++ if (!attr_args) ++ attr_args = t; ++ else ++ chainon (attr_args, t); ++ } while (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN)); ++ return attr_args; ++} ++ + /* Parse attribute arguments. This is a common form of syntax + covering all currently valid GNU and standard attributes. + +@@ -5640,9 +5739,13 @@ c_parser_gnu_attribute (c_parser *parser, tree attrs, + attrs = chainon (attrs, attr); + return attrs; + } +- c_parser_consume_token (parser); ++ c_parser_consume_token (parser); /* The '('. */ + +- tree attr_args ++ tree attr_args; ++ if (attribute_clang_form_p (attr_name)) ++ attr_args = c_parser_clang_attribute_arguments (parser, attr_name); ++ else ++ attr_args + = c_parser_attribute_arguments (parser, + attribute_takes_identifier_p (attr_name), + false, +diff --git a/gcc/calls.cc b/gcc/calls.cc +index 076e046a8ef..f90f8ff67df 100644 +--- a/gcc/calls.cc ++++ b/gcc/calls.cc +@@ -1413,7 +1413,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + with those made by function.cc. */ + + /* See if this argument should be passed by invisible reference. */ +- function_arg_info arg (type, argpos < n_named_args); ++ function_arg_info arg (type, argpos < n_named_args, ++ argpos == n_named_args - 1); + if (pass_by_reference (args_so_far_pnt, arg)) + { + const bool callee_copies +@@ -1533,10 +1534,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + + unsignedp = TYPE_UNSIGNED (type); + arg.type = type; +- arg.mode +- = promote_function_mode (type, TYPE_MODE (type), &unsignedp, +- fndecl ? TREE_TYPE (fndecl) : fntype, 0); +- ++ arg.mode = TYPE_MODE (type); ++// arg.mode ++// = promote_function_mode (type, TYPE_MODE (type), &unsignedp, ++// fndecl ? TREE_TYPE (fndecl) : fntype, 0); ++ arg.mode = promote_function_mode (args_so_far, arg, ++ fndecl ? TREE_TYPE (fndecl) : fntype, ++ &unsignedp, 0); + args[i].unsignedp = unsignedp; + args[i].mode = arg.mode; + +@@ -1586,6 +1590,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, + #endif + reg_parm_stack_space, + args[i].pass_on_stack ? 0 : args[i].partial, ++ args_so_far, + fndecl, args_size, &args[i].locate); + #ifdef BLOCK_REG_PADDING + else +@@ -4148,6 +4153,7 @@ split_complex_types (tree types) + return types; + } + ++extern void debug_tree (tree); + /* Output a library call to function ORGFUN (a SYMBOL_REF rtx) + for a value of mode OUTMODE, + with NARGS different arguments, passed as ARGS. +@@ -4333,6 +4339,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, 0, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + + if (argvec[count].reg == 0 || argvec[count].partial != 0 +@@ -4403,8 +4410,16 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + val = force_operand (XEXP (slot, 0), NULL_RTX); + } + +- arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, +- NULL_TREE, 0); ++// arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p, ++// NULL_TREE, 0); ++ tree t = arg.type; ++if (t) ++ debug_tree (t); ++gcc_assert (!t); ++ arg.type = NULL_TREE; ++ arg.mode = promote_function_mode (args_so_far, arg, NULL_TREE, ++ &unsigned_p, 0); ++ arg.type = t; + argvec[count].mode = arg.mode; + argvec[count].value = convert_modes (arg.mode, GET_MODE (val), val, + unsigned_p); +@@ -4424,6 +4439,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, + argvec[count].reg != 0, + #endif + reg_parm_stack_space, argvec[count].partial, ++ args_so_far, + NULL_TREE, &args_size, &argvec[count].locate); + args_size.constant += argvec[count].locate.size.constant; + gcc_assert (!argvec[count].locate.size.var); +diff --git a/gcc/calls.h b/gcc/calls.h +index e7ec695f015..b15586ecccc 100644 +--- a/gcc/calls.h ++++ b/gcc/calls.h +@@ -35,24 +35,43 @@ class function_arg_info + { + public: + function_arg_info () +- : type (NULL_TREE), mode (VOIDmode), named (false), ++ : type (NULL_TREE), mode (VOIDmode), named (false), last_named (false), + pass_by_reference (false) + {} + + /* Initialize an argument of mode MODE, either before or after promotion. */ + function_arg_info (machine_mode mode, bool named) +- : type (NULL_TREE), mode (mode), named (named), pass_by_reference (false) ++ : type (NULL_TREE), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ function_arg_info (machine_mode mode, bool named, bool last_named) ++ : type (NULL_TREE), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Initialize an unpromoted argument of type TYPE. */ + function_arg_info (tree type, bool named) +- : type (type), mode (TYPE_MODE (type)), named (named), ++ : type (type), mode (TYPE_MODE (type)), named (named), last_named (false), + pass_by_reference (false) + {} + ++ /* Initialize an unpromoted argument of type TYPE. */ ++ function_arg_info (tree type, bool named, bool last_named) ++ : type (type), mode (TYPE_MODE (type)), named (named), ++ last_named (last_named), pass_by_reference (false) ++ {} ++ + /* Initialize an argument with explicit properties. */ + function_arg_info (tree type, machine_mode mode, bool named) +- : type (type), mode (mode), named (named), pass_by_reference (false) ++ : type (type), mode (mode), named (named), last_named (false), ++ pass_by_reference (false) ++ {} ++ ++ /* Initialize an argument with explicit properties. */ ++ function_arg_info (tree type, machine_mode mode, bool named, bool last_named) ++ : type (type), mode (mode), named (named), last_named (last_named), ++ pass_by_reference (false) + {} + + /* Return true if the gimple-level type is an aggregate. */ +@@ -105,6 +124,9 @@ public: + "..."). See also TARGET_STRICT_ARGUMENT_NAMING. */ + unsigned int named : 1; + ++ /* True if this is the last named argument. */ ++ unsigned int last_named : 1; ++ + /* True if we have decided to pass the argument by reference, in which case + the function_arg_info describes a pointer to the original argument. */ + unsigned int pass_by_reference : 1; +diff --git a/gcc/collect2.cc b/gcc/collect2.cc +index 268ac378b9c..60605e6d6a7 100644 +--- a/gcc/collect2.cc ++++ b/gcc/collect2.cc +@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3. If not see + In a cross-compiler, this means you need a cross nm, + but that is not quite as unpleasant as special headers. */ + +-#if !defined (OBJECT_FORMAT_COFF) ++#if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_MACHO) + #define OBJECT_FORMAT_NONE + #endif + +@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see + + #endif /* OBJECT_FORMAT_COFF */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Default flags to pass to nm. */ + #ifndef NM_FLAGS +@@ -525,7 +525,7 @@ static const char *const target_machine = TARGET_MACHINE; + + Return 0 if not found, otherwise return its name, allocated with malloc. */ + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Add an entry for the object file NAME to object file list LIST. + New entries are added at the end of the list. The original pointer +@@ -764,6 +764,12 @@ do_link (char **ld_argv, const char *atsuffix) + } + } + ++#if defined (OBJECT_FORMAT_MACHO) ++# define LLD_NAME "ld64.lld" ++#else ++# define LLD_NAME "ld.lld" ++#endif ++ + /* Main program. */ + + int +@@ -777,16 +783,19 @@ main (int argc, char **argv) + USE_BFD_LD, + USE_LLD_LD, + USE_MOLD_LD, ++ USE_CLASSIC_LD, + USE_LD_MAX + } selected_linker = USE_DEFAULT_LD; ++ + static const char *const ld_suffixes[USE_LD_MAX] = + { + "ld", + PLUGIN_LD_SUFFIX, + "ld.gold", + "ld.bfd", +- "ld.lld", +- "ld.mold" ++ LLD_NAME, ++ "ld.mold", ++ "ld-classic" + }; + static const char *const real_ld_suffix = "real-ld"; + static const char *const collect_ld_suffix = "collect-ld"; +@@ -868,7 +877,7 @@ main (int argc, char **argv) + #ifdef CROSS_DIRECTORY_STRUCTURE + /* lld and mold are platform-agnostic and not prefixed with target + triple. */ +- if (!(i == USE_LLD_LD || i == USE_MOLD_LD)) ++ if (!(i == USE_LLD_LD || i == USE_MOLD_LD || i == USE_CLASSIC_LD)) + full_ld_suffixes[i] = concat (target_machine, "-", ld_suffixes[i], + NULL); + else +@@ -956,14 +965,22 @@ main (int argc, char **argv) + if (selected_linker == USE_DEFAULT_LD) + selected_linker = USE_PLUGIN_LD; + } ++#if !defined (OBJECT_FORMAT_MACHO) + else if (strcmp (argv[i], "-fuse-ld=bfd") == 0) + selected_linker = USE_BFD_LD; + else if (strcmp (argv[i], "-fuse-ld=gold") == 0) + selected_linker = USE_GOLD_LD; ++#endif + else if (strcmp (argv[i], "-fuse-ld=lld") == 0) + selected_linker = USE_LLD_LD; + else if (strcmp (argv[i], "-fuse-ld=mold") == 0) + selected_linker = USE_MOLD_LD; ++#if defined (OBJECT_FORMAT_MACHO) ++ else if (strcmp (argv[i], "-fuse-ld=classic") == 0) ++ selected_linker = USE_CLASSIC_LD; ++#endif ++ else if (strcmp (argv[i], "-fuse-ld=") == 0) ++ selected_linker = USE_DEFAULT_LD; + else if (startswith (argv[i], "-o")) + { + /* Parse the output filename if it's given so that we can make +@@ -1056,7 +1073,8 @@ main (int argc, char **argv) + ld_file_name = 0; + #ifdef DEFAULT_LINKER + if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || +- selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD) ++ selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD || ++ selected_linker == USE_CLASSIC_LD) + { + char *linker_name; + # ifdef HOST_EXECUTABLE_SUFFIX +@@ -2272,7 +2290,7 @@ write_aix_file (FILE *stream, struct id *list) + } + #endif + +-#ifdef OBJECT_FORMAT_NONE ++#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO) + + /* Check to make sure the file is an LTO object file. */ + +diff --git a/gcc/common.opt b/gcc/common.opt +index 88d987e6ab1..a6f11ce33b3 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -3020,6 +3020,10 @@ fstack-usage + Common RejectNegative Var(flag_stack_usage) + Output stack usage information on a per-function basis. + ++fstack-use-cumulative-args ++Common RejectNegative Var(flag_stack_use_cumulative_args) Init(STACK_USE_CUMULATIVE_ARGS_INIT) ++Use cumulative args-based stack layout hooks. ++ + fstrength-reduce + Common Ignore + Does nothing. Preserved for backward compatibility. +@@ -3393,6 +3397,10 @@ fuse-ld=mold + Common Driver Negative(fuse-ld=mold) + Use the Modern linker (MOLD) linker instead of the default linker. + ++fuse-ld=classic ++Common Driver Negative(fuse-ld=classic) ++Use the ld-classic linker instead of the default linker. ++ + fuse-linker-plugin + Common Undocumented Var(flag_use_linker_plugin) + +diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc +index b9ed83642ad..3202601a19d 100644 +--- a/gcc/common/config/aarch64/aarch64-common.cc ++++ b/gcc/common/config/aarch64/aarch64-common.cc +@@ -644,8 +644,12 @@ aarch64_get_extension_string_for_isa_flags + + However, assemblers with Armv8-R AArch64 support should not have this + issue, so we don't need this fix when targeting Armv8-R. */ +- auto explicit_flags = (!(current_flags & AARCH64_FL_V8R) +- ? AARCH64_FL_CRC : 0); ++ aarch64_feature_flags explicit_flags = ++#ifndef DISABLE_AARCH64_AS_CRC_BUGFIX ++ (!(current_flags & AARCH64_FL_V8R) ? AARCH64_FL_CRC : 0); ++#else ++ 0; ++#endif + + /* Add the features in isa_flags & ~current_flags using the smallest + possible number of extensions. We can do this by iterating over the +@@ -675,7 +679,10 @@ aarch64_get_extension_string_for_isa_flags + if (added & opt.flag_canonical) + { + outstr += "+"; +- outstr += opt.name; ++ if (startswith (opt.name, "rdm")) ++ outstr += "rdm"; ++ else ++ outstr += opt.name; + } + + /* Remove the features in current_flags & ~isa_flags. If the feature does +@@ -704,7 +711,10 @@ aarch64_get_extension_string_for_isa_flags + { + current_flags &= ~opt.flags_off; + outstr += "+no"; +- outstr += opt.name; ++ if (startswith (opt.name, "rdm")) ++ outstr += "rdm"; ++ else ++ outstr += opt.name; + } + } + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 40b50dc969e..c07fb8a764d 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1174,13 +1174,22 @@ case ${target} in + ;; + esac + +-# Figure out if we need to enable heap trampolines by default ++# Figure out if we need to enable heap trampolines ++# and variadic functions handling. + case ${target} in ++aarch64*-*-darwin2*) ++ # This applies to arm64 Darwin variadic funtions. ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=1" ++ # Executable stack is forbidden. ++ tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ++ ;; + *-*-darwin2*) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" + # Currently, we do this for macOS 11 and above. + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" + ;; + *) ++ tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" + ;; + esac +@@ -1224,6 +1233,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + ;; ++aarch64-*-darwin* ) ++ tm_file="${tm_file} aarch64/aarch64-errata.h" ++ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-darwin" ++ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" ++ tm_defines="${tm_defines} DISABLE_AARCH64_AS_CRC_BUGFIX=1" ++ # Choose a default CPU version that will work for all current releases. ++ with_cpu=${with_cpu:-apple-m1} ++ ;; + aarch64*-*-freebsd*) + tm_file="${tm_file} elfos.h ${fbsd_tm_file}" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h" +diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc +index 93f939a9c83..09de3c5c621 100644 +--- a/gcc/config/aarch64/aarch64-builtins.cc ++++ b/gcc/config/aarch64/aarch64-builtins.cc +@@ -889,6 +889,8 @@ enum aarch64_builtins + AARCH64_BUILTIN_GCSPR, + AARCH64_BUILTIN_GCSPOPM, + AARCH64_BUILTIN_GCSSS, ++ /* OS-specific */ ++ AARCH64_BUILTIN_CFSTRING, + AARCH64_BUILTIN_MAX + }; + +@@ -1022,6 +1024,9 @@ tree aarch64_fp16_ptr_type_node = NULL_TREE; + /* Back-end node type for brain float (bfloat) types. */ + tree aarch64_bf16_ptr_type_node = NULL_TREE; + ++/* Pointer to __float128 on Mach-O, where the 128b float is not long double. */ ++tree aarch64_float128_ptr_type_node = NULL_TREE; ++ + /* Wrapper around add_builtin_function. NAME is the name of the built-in + function, TYPE is the function type, CODE is the function subcode + (relative to AARCH64_BUILTIN_GENERAL), and ATTRS is the function +@@ -2051,6 +2056,29 @@ aarch64_init_bf16_types (void) + aarch64_bf16_ptr_type_node = build_pointer_type (bfloat16_type_node); + } + ++/* Initialize the backend REAL_TYPE type supporting __float128 on Mach-O, ++ as well as the related built-ins. */ ++static void ++aarch64_init_float128_types (void) ++{ ++ /* The __float128 type. The node has already been created as ++ _Float128, so for C we only need to register the __float128 name for ++ it. For C++, we create a distinct type which will mangle differently ++ (g) vs. _Float128 (DF128_) and behave backwards compatibly. */ ++ if (float128t_type_node == NULL_TREE) ++ { ++ float128t_type_node = make_node (REAL_TYPE); ++ TYPE_PRECISION (float128t_type_node) ++ = TYPE_PRECISION (float128_type_node); ++ SET_TYPE_MODE (float128t_type_node, TYPE_MODE (float128_type_node)); ++ layout_type (float128t_type_node); ++ } ++ lang_hooks.types.register_builtin_type (float128t_type_node, "__float128"); ++ ++ aarch64_float128_ptr_type_node = build_pointer_type (float128t_type_node); ++} ++ ++ + /* Pointer authentication builtins that will become NOP on legacy platform. + Currently, these builtins are for internal use only (libgcc EH unwinder). */ + +@@ -2464,8 +2492,9 @@ aarch64_general_init_builtins (void) + aarch64_init_fp8_types (); + + aarch64_init_fp16_types (); +- + aarch64_init_bf16_types (); ++ if (TARGET_MACHO) ++ aarch64_init_float128_types (); + + { + aarch64_target_switcher switcher (AARCH64_FL_SIMD); +@@ -2507,6 +2536,14 @@ aarch64_general_init_builtins (void) + handle_arm_acle_h (); + } + ++void ++aarch64_init_subtarget_builtins (void) ++{ ++#ifdef SUBTARGET_INIT_BUILTINS ++ SUBTARGET_INIT_BUILTINS; ++#endif ++} ++ + /* Implement TARGET_BUILTIN_DECL for the AARCH64_BUILTIN_GENERAL group. */ + tree + aarch64_general_builtin_decl (unsigned code, bool) +diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc +index d1e2ab9831d..6b62340af90 100644 +--- a/gcc/config/aarch64/aarch64-c.cc ++++ b/gcc/config/aarch64/aarch64-c.cc +@@ -312,6 +312,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pfile) + { + aarch64_define_unconditional_macros (pfile); + aarch64_update_cpp_builtins (pfile); ++ ++ if (TARGET_MACHO) ++ { ++ builtin_define ("__builtin_copysignq=__builtin_copysignf128"); ++ builtin_define ("__builtin_fabsq=__builtin_fabsf128"); ++ builtin_define ("__builtin_huge_valq=__builtin_huge_valf128"); ++ builtin_define ("__builtin_infq=__builtin_inff128"); ++ builtin_define ("__builtin_nanq=__builtin_nanf128"); ++ builtin_define ("__builtin_nansq=__builtin_nansf128"); ++ } + } + + /* Hook to validate the current #pragma GCC target and set the state, and +@@ -450,4 +460,8 @@ aarch64_register_pragmas (void) + targetm.check_builtin_call = aarch64_check_builtin_call; + + c_register_pragma ("GCC", "aarch64", aarch64_pragma_aarch64); ++ ++#ifdef REGISTER_SUBTARGET_PRAGMAS ++ REGISTER_SUBTARGET_PRAGMAS (); ++#endif + } +diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h +index 8f44aea2367..bff0cc74bbe 100644 +--- a/gcc/config/aarch64/aarch64-protos.h ++++ b/gcc/config/aarch64/aarch64-protos.h +@@ -109,6 +109,14 @@ enum aarch64_symbol_type + SYMBOL_TLSLE24, + SYMBOL_TLSLE32, + SYMBOL_TLSLE48, ++ SYMBOL_MO_SMALL_ABS, ++ SYMBOL_MO_SMALL_PCR, ++ SYMBOL_MO_SMALL_GOT, ++ SYMBOL_MO_SMALL_TLS, ++ SYMBOL_MO_LARGE_ABS, ++ SYMBOL_MO_LARGE_PCR, ++ SYMBOL_MO_LARGE_GOT, ++ SYMBOL_MO_LARGE_TLS, + SYMBOL_FORCE_TO_MEM + }; + +@@ -848,6 +856,7 @@ void aarch64_post_cfi_startproc (void); + poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned); + int aarch64_get_condition_code (rtx); + bool aarch64_address_valid_for_prefetch_p (rtx, bool); ++bool aarch64_address_valid_for_unscaled_prefetch_p (rtx, bool); + bool aarch64_bitmask_imm (unsigned HOST_WIDE_INT val, machine_mode); + unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in); + unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in); +@@ -885,7 +894,11 @@ bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx); + bool aarch64_is_long_call_p (rtx); + bool aarch64_is_noplt_call_p (rtx); + bool aarch64_label_mentioned_p (rtx); ++#if TARGET_MACHO ++void aarch64_darwin_declare_function_name (FILE *, const char*, tree ); ++#else + void aarch64_declare_function_name (FILE *, const char*, tree); ++#endif + void aarch64_asm_output_alias (FILE *, const tree, const tree); + void aarch64_asm_output_external (FILE *, tree, const char*); + bool aarch64_legitimate_pic_operand_p (rtx); +@@ -1111,6 +1124,7 @@ void aarch64_override_options_internal (struct gcc_options *); + + const char *aarch64_general_mangle_builtin_type (const_tree); + void aarch64_general_init_builtins (void); ++void aarch64_init_subtarget_builtins (void); + tree aarch64_general_fold_builtin (unsigned int, tree, unsigned int, tree *); + gimple *aarch64_general_gimple_fold_builtin (unsigned int, gcall *, + gimple_stmt_iterator *); +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index 433ec975d7e..813a8e03ec4 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -343,8 +343,10 @@ static bool aarch64_vfp_is_call_or_return_candidate (machine_mode, + const_tree, + machine_mode *, int *, + bool *, bool); ++#if !TARGET_MACHO + static void aarch64_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED; + static void aarch64_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED; ++#endif + static void aarch64_override_options_after_change (void); + static bool aarch64_vector_mode_supported_p (machine_mode); + static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool); +@@ -860,6 +862,9 @@ static const attribute_spec aarch64_gnu_attributes[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, + affects_type_identity, handler, exclude } */ ++#ifdef SUBTARGET_ATTRIBUTE_TABLE ++ SUBTARGET_ATTRIBUTE_TABLE, ++#endif + { "aarch64_vector_pcs", 0, 0, false, true, true, true, + handle_aarch64_vector_pcs_attribute, NULL }, + { "indirect_return", 0, 0, false, true, true, true, NULL, NULL }, +@@ -873,9 +878,6 @@ static const attribute_spec aarch64_gnu_attributes[] = + { "dllimport", 0, 0, false, false, false, false, handle_dll_attribute, NULL }, + { "dllexport", 0, 0, false, false, false, false, handle_dll_attribute, NULL }, + #endif +-#ifdef SUBTARGET_ATTRIBUTE_TABLE +- SUBTARGET_ATTRIBUTE_TABLE +-#endif + }; + + static const scoped_attribute_specs aarch64_gnu_attribute_table = +@@ -2186,7 +2188,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode) + if (known_le (GET_MODE_SIZE (mode), 8)) + return true; + if (known_le (GET_MODE_SIZE (mode), 16)) +- return (regno & 1) == 0; ++ return (regno & 1) == 0 || TARGET_MACHO; /* darwinpcs D.4 */ + } + else if (FP_REGNUM_P (regno)) + { +@@ -2232,8 +2234,10 @@ static bool + aarch64_takes_arguments_in_sve_regs_p (const_tree fntype) + { + CUMULATIVE_ARGS args_so_far_v; ++ /* This does not apply to variadic functions, so all the (currently ++ uncounted) arguments must be named. */ + aarch64_init_cumulative_args (&args_so_far_v, NULL_TREE, NULL_RTX, +- NULL_TREE, 0, true); ++ NULL_TREE, -1, true); + cumulative_args_t args_so_far = pack_cumulative_args (&args_so_far_v); + + for (tree chain = TYPE_ARG_TYPES (fntype); +@@ -2687,7 +2691,11 @@ aarch64_constant_alignment (const_tree exp, HOST_WIDE_INT align) + unsigned + aarch64_data_alignment (const_tree type, unsigned align) + { +- if (optimize_size) ++ /* For now, on Darwin we do not give global entities any extra ++ alignment TODO: determine if we should for some optimisation ++ level. */ ++ ++ if (optimize_size || TARGET_MACHO) + return align; + + if (AGGREGATE_TYPE_P (type)) +@@ -3073,6 +3081,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + switch (type) + { + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + { + /* In ILP32, the mode of dest can be either SImode or DImode. */ + rtx tmp_reg = dest; +@@ -3096,6 +3105,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + } + imm = plus_constant (mode, imm, -mid_const); + ++ if (TARGET_MACHO) ++ { ++ rtx sym, off; ++ split_const (imm, &sym, &off); ++ /* Negative offsets don't work, whether by intention is TBD. */ ++ if (INTVAL (off) < 0 || INTVAL (off) > 8 * 1024 * 1024) ++ { ++ emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, sym)); ++ emit_insn (gen_add_losym (dest, tmp_reg, sym)); ++ /* FIXME: add the SI option if/when we support ilp32. */ ++ emit_insn (gen_adddi3 (dest, dest, off)); ++ return; ++ } ++ /* else small enough positive offset is OK. */ ++ } + emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, copy_rtx (imm))); + if (mid_const) + emit_set_insn (tmp_reg, plus_constant (mode, tmp_reg, mid_const)); +@@ -3181,6 +3205,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, + return; + } + ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_SMALL_GOT_4G: + emit_insn (gen_rtx_SET (dest, imm)); + return; +@@ -6291,6 +6316,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + case SYMBOL_SMALL_TLSIE: + case SYMBOL_SMALL_GOT_28K: + case SYMBOL_SMALL_GOT_4G: ++ case SYMBOL_MO_SMALL_GOT: + case SYMBOL_TINY_GOT: + case SYMBOL_TINY_TLSIE: + if (const_offset != 0) +@@ -6304,6 +6330,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) + /* FALLTHRU */ + + case SYMBOL_SMALL_ABSOLUTE: ++ case SYMBOL_MO_SMALL_PCR: + case SYMBOL_TINY_ABSOLUTE: + case SYMBOL_TLSLE12: + case SYMBOL_TLSLE24: +@@ -6910,6 +6937,7 @@ aarch64_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) + gcc_unreachable (); + } + ++#if !TARGET_MACHO + static bool + aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + const_tree type, int *nregs) +@@ -6919,6 +6947,7 @@ aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode, + &pcum->aapcs_vfp_rmode, + nregs, NULL, pcum->silent_p); + } ++#endif + + /* Given MODE and TYPE of a function argument, return the alignment in + bits. The idea is to suppress any stronger alignment requested by +@@ -6947,7 +6976,7 @@ aarch64_function_arg_alignment (machine_mode mode, const_tree type, + if (integer_zerop (TYPE_SIZE (type))) + return 0; + +- gcc_assert (TYPE_MODE (type) == mode); ++ gcc_assert (TARGET_MACHO || TYPE_MODE (type) == mode); + + if (!AGGREGATE_TYPE_P (type)) + { +@@ -7145,6 +7174,14 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + Both behaviors were wrong, but in different cases. */ + + pcum->aapcs_arg_processed = true; ++ if (TARGET_MACHO) ++ { ++ /* Set suitable defaults for queries. */ ++ pcum->darwinpcs_arg_boundary ++ = aarch64_function_arg_alignment (mode, type, &abi_break_gcc_9, ++ &abi_break_gcc_13, &abi_break_gcc_14); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ } + + pure_scalable_type_info pst_info; + if (type && pst_info.analyze_registers (type)) +@@ -7204,13 +7241,29 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* No frontends can create types with variable-sized modes, so we + shouldn't be asked to pass or return them. */ + size = GET_MODE_SIZE (mode).to_constant (); ++ ++ if (TARGET_MACHO) ++ /* Since we can pack things on the stack, we need the unrounded size. */ ++ pcum->darwinpcs_stack_bytes = size; ++ + size = ROUND_UP (size, UNITS_PER_WORD); + + allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode); ++ bool is_ha = false; ++#if !TARGET_MACHO + allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v, + mode, + type, + &nregs); ++#else ++ /* We care if the value is a homogenous aggregate when laying out the stack, ++ so use this call directly. */ ++ allocate_nvrn ++ = aarch64_vfp_is_call_or_return_candidate (mode, type, ++ &pcum->aapcs_vfp_rmode, ++ &nregs, &is_ha, ++ pcum->silent_p); ++#endif + gcc_assert (!sve_p || !allocate_nvrn); + + unsigned int alignment +@@ -7239,7 +7292,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + if (!pcum->silent_p && !TARGET_FLOAT) + aarch64_err_no_fpadvsimd (mode); + +- if (nvrn + nregs <= NUM_FP_ARG_REGS) ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextnvrn = NUM_FP_ARG_REGS; ++ goto on_stack; ++ } ++ else if (nvrn + nregs <= NUM_FP_ARG_REGS) + { + pcum->aapcs_nextnvrn = nvrn + nregs; + if (!aarch64_composite_type_p (type, mode)) +@@ -7269,6 +7328,7 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + else +@@ -7285,14 +7345,24 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* C6 - C9. though the sign and zero extension semantics are + handled elsewhere. This is the case where the argument fits + entirely general registers. */ ++ + if (allocate_ncrn && (ncrn + nregs <= NUM_ARG_REGS)) + { + gcc_assert (nregs == 0 || nregs == 1 || nregs == 2); + ++ if (TARGET_MACHO ++ && !arg.named) ++ { ++ pcum->aapcs_nextncrn = NUM_ARG_REGS; ++ goto on_stack; ++ } ++ + /* C.8 if the argument has an alignment of 16 then the NGRN is + rounded up to the next even number. */ + if (nregs == 2 +- && ncrn % 2) ++ && ncrn % 2 ++ /* Darwin PCS deletes rule C.8. */ ++ && !TARGET_MACHO) + { + /* Emit a warning if the alignment changed when taking the + 'packed' attribute into account. */ +@@ -7362,8 +7432,8 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + } + pcum->aapcs_reg = par; + } +- + pcum->aapcs_nextncrn = ncrn + nregs; ++ pcum->darwinpcs_stack_bytes = 0; + return; + } + +@@ -7373,7 +7443,81 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg) + /* The argument is passed on stack; record the needed number of words for + this argument and align the total size if necessary. */ + on_stack: +- pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ ++ if (TARGET_MACHO) ++ { ++ /* Darwin does not round up the allocation for smaller entities to 8 ++ bytes. It only requires the natural alignment for these. ++ ++ but we don't do this for: ++ * unnamed parms in variadic functions ++ * complex types ++ * unions ++ * aggregates (except for homogeneous ones which are handles as the ++ enclosed type). ++ each entry starts a new slot. ++ ++ 16 byte entities are naturally aligned on the stack. ++ There was no darwinpcs for GCC 9, so neither the implementation ++ change nor the warning should fire here (i.e. we do not need to check ++ if 16byte entities alter the stack size). */ ++ ++ gcc_checking_assert (arg.named == pcum->named_p); ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ if (!pcum->named_p ++ || TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (pcum->aapcs_vfp_rmode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ { ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = MAX (alignment, PARM_BOUNDARY); ++ if (!pcum->named_p) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ return; ++ } ++ ++ /* Updated sub-word offset aligned for the new object. ++ We are looking for the case that the new object will fit after some ++ existing object(s) in the same stack slot. In that case, we do not ++ need to add any more stack space for it. */ ++ int new_off ++ = ROUND_UP (pcum->darwinpcs_sub_word_pos, alignment / BITS_PER_UNIT); ++ ++ if (new_off >= UNITS_PER_WORD) ++ { ++ /* That exceeds a stack slot, start a new one. */ ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ new_off = 0; ++ } ++ /* This is the end of the new object. */ ++ int new_pos = new_off + pcum->darwinpcs_stack_bytes; ++ ++ if (pcum->darwinpcs_sub_word_pos == 0) ++ /* New stack slot, just allocate one or more words, and note where ++ the next arg will start. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; ++ else if (new_pos <= UNITS_PER_WORD) ++ /* Old stack slot, object starts at new_off and goes to new_pos, we do ++ not add any stack space. */ ++ pcum->darwinpcs_sub_word_offset = new_off; ++ pcum->darwinpcs_sub_word_pos = new_pos; ++ pcum->darwinpcs_arg_boundary = alignment ; ++ if (pcum->last_named_p && new_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (new_pos <= 4) ++ pcum->darwinpcs_arg_padding = PARM_BOUNDARY; ++ else if (new_pos <= 6) ++ pcum->darwinpcs_arg_padding = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ pcum->darwinpcs_arg_padding = 2 * BITS_PER_UNIT; ++ } ++ return; ++ } + + if (warn_pcs_change_le_gcc14 + && abi_break_gcc_13 +@@ -7389,6 +7533,8 @@ on_stack: + inform (input_location, "parameter passing for argument of type " + "%qT changed in GCC 14.1", type); + ++ /* size was already rounded up to PARM_BOUNDARY. */ ++ pcum->aapcs_stack_words = size / UNITS_PER_WORD; + if (alignment == 16 * BITS_PER_UNIT) + { + int new_size = ROUND_UP (pcum->aapcs_stack_size, 16 / UNITS_PER_WORD); +@@ -7497,12 +7643,33 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum, + pcum->aapcs_arg_processed = false; + pcum->aapcs_stack_words = 0; + pcum->aapcs_stack_size = 0; ++ pcum->darwinpcs_stack_bytes = 0; ++ pcum->darwinpcs_sub_word_offset = 0; ++ pcum->darwinpcs_sub_word_pos = 0; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ /* If we have been invoked for incoming args, then n_named will have been ++ set to -1, but we should have a function decl - so pick up the named ++ count from that. If that fails, and we end up with -1, this effectively ++ corresponds to assuming that there is an arbitrary number of named ++ args. */ ++ pcum->darwinpcs_n_named = n_named; ++ if (n_named == (unsigned)-1 && fndecl) ++ { ++ tree fnt = TREE_TYPE (fndecl); ++ if (fnt && TYPE_ARG_TYPES (fnt)) ++ pcum->darwinpcs_n_named = list_length (TYPE_ARG_TYPES (fnt)); ++ } ++ pcum->darwinpcs_n_args_processed = 0; ++ pcum->named_p = pcum->darwinpcs_n_named != 0; ++ pcum->last_named_p = pcum->darwinpcs_n_named == 1; + pcum->silent_p = silent_p; + pcum->shared_za_flags + = (fntype ? aarch64_fntype_shared_flags (fntype, "za") : 0U); + pcum->shared_zt0_flags + = (fntype ? aarch64_fntype_shared_flags (fntype, "zt0") : 0U); + pcum->num_sme_mode_switch_args = 0; ++ pcum->aapcs_vfp_rmode = VOIDmode; + + if (!silent_p + && !TARGET_FLOAT +@@ -7541,9 +7708,11 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + || pcum->pcs_variant == ARM_PCS_SVE) + { + aarch64_layout_arg (pcum_v, arg); +- gcc_assert ((pcum->aapcs_reg != NULL_RTX) +- != (pcum->aapcs_stack_words != 0)); +- if (pcum->aapcs_reg ++ pcum->darwinpcs_n_args_processed++; ++ gcc_assert (TARGET_MACHO ++ || (pcum->aapcs_reg != NULL_RTX) ++ != (pcum->aapcs_stack_words != 0)); ++ if (pcum->aapcs_reg + && aarch64_call_switches_pstate_sm (pcum->isa_mode)) + aarch64_record_sme_mode_switch_args (pcum); + +@@ -7554,6 +7723,12 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v, + pcum->aapcs_stack_size += pcum->aapcs_stack_words; + pcum->aapcs_stack_words = 0; + pcum->aapcs_reg = NULL_RTX; ++ pcum->darwinpcs_arg_boundary = BITS_PER_UNIT; ++ pcum->darwinpcs_arg_padding = BITS_PER_UNIT; ++ pcum->named_p ++ = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++ pcum->last_named_p ++ = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; + } + } + +@@ -7565,12 +7740,15 @@ aarch64_function_arg_regno_p (unsigned regno) + || (PR_REGNUM_P (regno) && regno < P0_REGNUM + NUM_PR_ARG_REGS)); + } + +-/* Implement FUNCTION_ARG_BOUNDARY. Every parameter gets at least +- PARM_BOUNDARY bits of alignment, but will be given anything up +- to STACK_BOUNDARY bits if the type requires it. This makes sure +- that both before and after the layout of each argument, the Next +- Stacked Argument Address (NSAA) will have a minimum alignment of +- 8 bytes. */ ++/* Implement FUNCTION_ARG_BOUNDARY. ++ For AAPCS64, Every parameter gets at least PARM_BOUNDARY bits of ++ alignment, but will be given anything up to STACK_BOUNDARY bits ++ if the type requires it. This makes sure that both before and after ++ the layout of each argument, the Next Stacked Argument Address (NSAA) ++ will have a minimum alignment of 8 bytes. ++ ++ For darwinpcs, this is only called to lower va_arg entries which are ++ always aligned as for AAPCS64. */ + + static unsigned int + aarch64_function_arg_boundary (machine_mode mode, const_tree type) +@@ -7584,8 +7762,108 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type) + &abi_break_gcc_14); + /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr + to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ /* This can only work for unnamed args. */ ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ if (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE) ++ return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return MIN (alignment, STACK_BOUNDARY); ++#else + alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); + return alignment; ++#endif ++} ++ ++/* For Darwin, we want to use the arg boundary computed when laying out the ++ function arg, to cope with items packed on the stack and the different ++ rules applied to unnamed parms. */ ++ ++static unsigned int ++aarch64_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ unsigned int abi_break_gcc_9; ++ unsigned int abi_break_gcc_13; ++ unsigned int abi_break_gcc_14; ++ unsigned int alignment ++ = aarch64_function_arg_alignment (mode, type, &abi_break_gcc_9, ++ &abi_break_gcc_13, &abi_break_gcc_14); ++ /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr ++ to emit warnings about ABI incompatibility. */ ++#if TARGET_MACHO ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ machine_mode comp_mode = VOIDmode; ++ int nregs; ++ bool is_ha; ++ aarch64_vfp_is_call_or_return_candidate (mode, type, &comp_mode, &nregs, ++ &is_ha, /*silent*/true); ++ bool no_pack = (TREE_CODE (type) == COMPLEX_TYPE ++ || (TREE_CODE (type) == RECORD_TYPE ++ && !is_ha && !SCALAR_FLOAT_MODE_P (comp_mode)) ++ || TREE_CODE (type) == UNION_TYPE); ++ ++ bool in_regs = (pcum->aapcs_reg != NULL_RTX); ++ ++ if ((named_p && !no_pack) || in_regs) ++ ; /* Leave the alignment as natural. */ ++ else ++ alignment = MAX (alignment, PARM_BOUNDARY); ++gcc_checking_assert (alignment == pcum->darwinpcs_arg_boundary); ++ return MIN (alignment, STACK_BOUNDARY); ++ ++#else ++ alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY); ++ return alignment; ++#endif ++} ++ ++/* Implement TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA for darwinpcs which allows ++ non-standard passing of byte-aligned items [D.2]. This is done by pulling ++ the values out of the cumulative args struct. */ ++ ++static unsigned int ++aarch64_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca) ++{ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++gcc_checking_assert (pcum->aapcs_arg_processed); ++ bool named_p = pcum->darwinpcs_n_args_processed < pcum->darwinpcs_n_named; ++gcc_checking_assert (named_p == pcum->named_p); ++ bool last_named_p = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named; ++gcc_checking_assert (last_named_p == pcum->last_named_p); ++ ++ unsigned boundary = BITS_PER_UNIT; ++ if (last_named_p && pcum->darwinpcs_sub_word_pos > 0) ++ { ++ /* Round the last named arg to the start of the next stack slot. */ ++ if (pcum->darwinpcs_sub_word_pos <= 4) ++ boundary = PARM_BOUNDARY; ++ else if (pcum->darwinpcs_sub_word_pos <= 6) ++ boundary = 4 * BITS_PER_UNIT; ++ else if (pcum->darwinpcs_sub_word_pos <= 7) ++ boundary = 2 * BITS_PER_UNIT; ++ } ++ else if (named_p) ++ /* Named args are naturally aligned, but with no rounding. */ ++ ; ++ else ++ /* un-named args are rounded to fill slots. */ ++ boundary = PARM_BOUNDARY; ++gcc_checking_assert (boundary == pcum->darwinpcs_arg_padding); ++ return boundary; + } + + /* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE. */ +@@ -10982,6 +11260,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + /* load literal: pc-relative constant pool entry. Only supported + for SI mode or larger. */ + info->type = ADDRESS_SYMBOLIC; ++ info->offset = NULL_RTX; + + if (!load_store_pair_p + && GET_MODE_SIZE (mode).is_constant (&const_size) +@@ -10989,6 +11268,7 @@ aarch64_classify_address (struct aarch64_address_info *info, + { + poly_int64 offset; + rtx sym = strip_offset_and_salt (x, &offset); ++ + return ((LABEL_REF_P (sym) + || (SYMBOL_REF_P (sym) + && CONSTANT_POOL_ADDRESS_P (sym) +@@ -11006,10 +11286,13 @@ aarch64_classify_address (struct aarch64_address_info *info, + poly_int64 offset; + HOST_WIDE_INT const_offset; + rtx sym = strip_offset_and_salt (info->offset, &offset); ++ + if (SYMBOL_REF_P (sym) + && offset.is_constant (&const_offset) + && (aarch64_classify_symbol (sym, const_offset) +- == SYMBOL_SMALL_ABSOLUTE)) ++ == SYMBOL_SMALL_ABSOLUTE ++ || aarch64_classify_symbol (sym, const_offset) ++ == SYMBOL_MO_SMALL_PCR)) + { + /* The symbol and offset must be aligned to the access size. */ + unsigned int align; +@@ -11059,6 +11342,55 @@ aarch64_address_valid_for_prefetch_p (rtx x, bool strict_p) + if (!res) + return false; + ++ /* For ELF targets using GAS, we emit prfm unconditionally; GAS will alter ++ the instruction to pick the prfum form where possible (i.e. when the ++ offset is in the range -256..255) and fall back to prfm otherwise. ++ We can reject cases where the offset exceeds the range usable by both ++ insns [-256..32760], or for offsets > 255 when the value is not divisible ++ by 8. ++ For Mach-O (Darwin) where the assembler uses the LLVM back end, that does ++ not yet do the substitution, so we must reject all prfum cases. */ ++ if (addr.offset) ++ { ++ HOST_WIDE_INT offs = INTVAL (addr.offset); ++ if (offs < -256) /* Out of range for both prfum and prfm. */ ++ return false; ++ if (offs > 32760) /* Out of range for prfm. */ ++ return false; ++ if (offs & 0x07) /* We cannot use prfm. */ ++ { ++ if (offs > 255) /* Out of range for prfum. */ ++ return false; ++ if (TARGET_MACHO) ++ return false; ++ } ++ if (TARGET_MACHO && offs < 0) ++ return false; ++ } ++ ++ /* ... except writeback forms. */ ++ return addr.type != ADDRESS_REG_WB; ++} ++ ++/* Return true if the address X is valid for a PRFUM instruction. ++ STRICT_P is true if we should do strict checking with ++ aarch64_classify_address. */ ++ ++bool ++aarch64_address_valid_for_unscaled_prefetch_p (rtx x, bool strict_p) ++{ ++ struct aarch64_address_info addr; ++ ++ /* PRFUM accepts the same addresses as DImode, but constrained to a range ++ -256..255. */ ++ bool res = aarch64_classify_address (&addr, x, DImode, strict_p); ++ if (!res) ++ return false; ++ ++ if (addr.offset && ((INTVAL (addr.offset) > 255) ++ || (INTVAL (addr.offset) < -256))) ++ return false; ++ + /* ... except writeback forms. */ + return addr.type != ADDRESS_REG_WB; + } +@@ -12226,6 +12558,144 @@ sizetochar (int size) + } + } + ++static void ++output_macho_postfix_expr (FILE *file, rtx x, const char *postfix) ++{ ++ char buf[256]; ++ ++ restart: ++ switch (GET_CODE (x)) ++ { ++ case PC: ++ putc ('.', file); ++ break; ++ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_DECL (x)) ++ assemble_external (SYMBOL_REF_DECL (x)); ++ assemble_name (file, XSTR (x, 0)); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case LABEL_REF: ++ x = label_ref_label (x); ++ /* Fall through. */ ++ case CODE_LABEL: ++ ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); ++ assemble_name (file, buf); ++ fprintf (file, "@%s", postfix); ++ break; ++ ++ case CONST_INT: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); ++ break; ++ ++ case CONST: ++ /* This used to output parentheses around the expression, ++ but that does not work on the 386 (either ATT or BSD assembler). */ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ break; ++ ++ case CONST_WIDE_INT: ++ /* We do not know the mode here so we have to use a round about ++ way to build a wide-int to get it printed properly. */ ++ { ++ wide_int w = wide_int::from_array (&CONST_WIDE_INT_ELT (x, 0), ++ CONST_WIDE_INT_NUNITS (x), ++ CONST_WIDE_INT_NUNITS (x) ++ * HOST_BITS_PER_WIDE_INT, ++ false); ++ print_decs (w, file); ++ } ++ break; ++ ++ case CONST_DOUBLE: ++ if (CONST_DOUBLE_AS_INT_P (x)) ++ { ++ /* We can use %d if the number is one word and positive. */ ++ if (CONST_DOUBLE_HIGH (x)) ++ fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x), ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else if (CONST_DOUBLE_LOW (x) < 0) ++ fprintf (file, HOST_WIDE_INT_PRINT_HEX, ++ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x)); ++ else ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); ++ } ++ else ++ /* We can't handle floating point constants; ++ PRINT_OPERAND must handle them. */ ++ output_operand_lossage ("floating constant misused"); ++ break; ++ ++ case CONST_FIXED: ++ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_FIXED_VALUE_LOW (x)); ++ break; ++ ++ case PLUS: ++ /* Some assemblers need integer constants to appear last (eg masm). */ ++ if (CONST_INT_P (XEXP (x, 0))) ++ { ++ output_macho_postfix_expr (file, XEXP (x, 1), postfix); ++ if (INTVAL (XEXP (x, 0)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 0)); ++ } ++ else ++ { ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ if (!CONST_INT_P (XEXP (x, 1)) ++ || INTVAL (XEXP (x, 1)) >= 0) ++ fprintf (file, "+"); ++ output_addr_const (file, XEXP (x, 1)); ++ } ++ break; ++ ++ case MINUS: ++ /* Avoid outputting things like x-x or x+5-x, ++ since some assemblers can't handle that. */ ++ x = simplify_subtraction (x); ++ if (GET_CODE (x) != MINUS) ++ goto restart; ++ ++ output_macho_postfix_expr (file, XEXP (x, 0), postfix); ++ fprintf (file, "-"); ++ if ((CONST_INT_P (XEXP (x, 1)) && INTVAL (XEXP (x, 1)) >= 0) ++ || GET_CODE (XEXP (x, 1)) == PC ++ || GET_CODE (XEXP (x, 1)) == SYMBOL_REF) ++ output_addr_const (file, XEXP (x, 1)); ++ else ++ { ++ fputs (targetm.asm_out.open_paren, file); ++ output_addr_const (file, XEXP (x, 1)); ++ fputs (targetm.asm_out.close_paren, file); ++ } ++ break; ++ ++ case ZERO_EXTEND: ++ case SIGN_EXTEND: ++ case SUBREG: ++ case TRUNCATE: ++ output_addr_const (file, XEXP (x, 0)); ++ break; ++ ++ case UNSPEC: ++ if (XINT (x, 1) == UNSPEC_SALT_ADDR) ++ { ++ output_macho_postfix_expr (file, XVECEXP (x, 0, 0), postfix); ++ break; ++ } ++ /* FALLTHROUGH */ ++ default: ++ if (targetm.asm_out.output_addr_const_extra (file, x)) ++ break; ++ ++ output_operand_lossage ("invalid expression as operand"); ++ } ++ ++} ++ + /* Print operand X to file F in a target specific manner according to CODE. + The acceptable formatting commands given by CODE are: + 'c': An integer or symbol address without a preceding # +@@ -12299,6 +12769,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + } + break; + ++ case 'J': ++ output_macho_postfix_expr (f, x, "PAGEOFF"); ++ break; ++ case 'O': ++ output_macho_postfix_expr (f, x, "GOTPAGEOFF"); ++ break; + case 'e': + { + x = unwrap_const_vec_duplicate (x); +@@ -12631,7 +13107,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + case 'A': + if (GET_CODE (x) == HIGH) + x = XEXP (x, 0); +- ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12662,9 +13138,26 @@ aarch64_print_operand (FILE *f, rtx x, int code) + break; + } + output_addr_const (asm_out_file, x); ++#endif ++#if TARGET_MACHO ++ switch (aarch64_classify_symbolic_expression (x)) ++ { ++ case SYMBOL_MO_SMALL_PCR: ++ output_macho_postfix_expr (asm_out_file, x, "PAGE"); ++ break; ++ case SYMBOL_MO_SMALL_GOT: ++ output_macho_postfix_expr (asm_out_file, x, "GOTPAGE"); ++ break; ++ default: ++ /* large code model unimplemented. */ ++ gcc_unreachable (); ++ break; ++ } ++#endif + break; + + case 'L': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_SMALL_GOT_4G: +@@ -12702,10 +13195,12 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + + case 'G': ++#if !TARGET_MACHO + switch (aarch64_classify_symbolic_expression (x)) + { + case SYMBOL_TLSLE24: +@@ -12714,6 +13209,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) + default: + break; + } ++#endif + output_addr_const (asm_out_file, x); + break; + +@@ -12879,8 +13375,13 @@ aarch64_print_address_internal (FILE *f, machine_mode mode, rtx x, + break; + + case ADDRESS_LO_SUM: ++#if TARGET_MACHO ++ asm_fprintf (f, "[%s, #", reg_names [REGNO (addr.base)]); ++ output_macho_postfix_expr (f, addr.offset, "PAGEOFF"); ++#else + asm_fprintf (f, "[%s, #:lo12:", reg_names [REGNO (addr.base)]); + output_addr_const (f, addr.offset); ++#endif + asm_fprintf (f, "]"); + return true; + +@@ -13197,7 +13698,23 @@ aarch64_frame_pointer_required () + { + /* If the function needs to record the incoming value of PSTATE.SM, + make sure that the slot is accessible from the frame pointer. */ +- return aarch64_need_old_pstate_sm (); ++ if (!TARGET_MACHO) ++ return aarch64_need_old_pstate_sm (); ++ ++ /* We could do with some more general test. ++ gcc_checking_assert (!aarch64_need_old_pstate_sm ());*/ ++ ++ if (crtl->calls_eh_return || aarch64_need_old_pstate_sm ()) ++ return true; ++ ++ /* Not used in leaf functions (unless forced). */ ++ if (flag_omit_leaf_frame_pointer && leaf_function_p ()) ++ return false; ++ ++ /* NOTE: We are allowing the user to force omission of the frame ++ pointer, (despite that it is not ABI-compliant). */ ++ ++ return flag_omit_frame_pointer != 1; + } + + static bool +@@ -13426,6 +13943,8 @@ aarch64_asm_output_labelref (FILE* f, const char *name) + asm_fprintf (f, "%U%s", name); + } + ++#if !TARGET_MACHO ++ + static void + aarch64_elf_asm_constructor (rtx symbol, int priority) + { +@@ -13465,6 +13984,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority) + assemble_aligned_integer (POINTER_BYTES, symbol); + } + } ++#endif + + const char* + aarch64_output_casesi (rtx *operands) +@@ -13617,7 +14137,11 @@ aarch64_select_rtx_section (machine_mode mode, + if (aarch64_can_use_per_function_literal_pools_p ()) + return function_section (current_function_decl); + ++#if TARGET_MACHO ++ return machopic_select_rtx_section (mode, x, align); ++#else + return default_elf_select_rtx_section (mode, x, align); ++#endif + } + + /* Implement ASM_OUTPUT_POOL_EPILOGUE. */ +@@ -16027,15 +16551,17 @@ aarch64_init_builtins () + { + aarch64_general_init_builtins (); + aarch64_sve::init_builtins (); +-#ifdef SUBTARGET_INIT_BUILTINS +- SUBTARGET_INIT_BUILTINS; +-#endif ++ aarch64_init_subtarget_builtins (); + } + + /* Implement TARGET_FOLD_BUILTIN. */ + static tree + aarch64_fold_builtin (tree fndecl, int nargs, tree *args, bool) + { ++#ifdef SUBTARGET_FOLD_BUILTIN ++ if (tree res = SUBTARGET_FOLD_BUILTIN (fndecl, nargs, args, false)) ++ return res; ++#endif + unsigned int code = DECL_MD_FUNCTION_CODE (fndecl); + unsigned int subcode = code >> AARCH64_BUILTIN_SHIFT; + tree type = TREE_TYPE (TREE_TYPE (fndecl)); +@@ -19272,10 +19798,14 @@ initialize_aarch64_code_model (struct gcc_options *opts) + } + break; + case AARCH64_CMODEL_LARGE: +- if (opts->x_flag_pic) ++ if (TARGET_MACHO) ++ /* We need to implement fPIC here (arm64_32 also accepts the large ++ model). */ ++ sorry ("code model %qs not supported yet", "large"); ++ else if (opts->x_flag_pic) + sorry ("code model %qs with %<-f%s%>", "large", + opts->x_flag_pic > 1 ? "PIC" : "pic"); +- if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) ++ else if (opts->x_aarch64_abi == AARCH64_ABI_ILP32) + sorry ("code model %qs not supported in ilp32 mode", "large"); + break; + case AARCH64_CMODEL_TINY_PIC: +@@ -21215,7 +21745,9 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ++ ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + default: + gcc_unreachable (); +@@ -21252,12 +21784,23 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + + return SYMBOL_TINY_ABSOLUTE; + +- + case AARCH64_CMODEL_SMALL_SPIC: + case AARCH64_CMODEL_SMALL_PIC: + case AARCH64_CMODEL_SMALL: +- if (!TARGET_PECOFF +- && (flag_pic || SYMBOL_REF_WEAK (x)) ++#if TARGET_MACHO ++ if (TARGET_MACHO) ++ { ++ /* Constant pool addresses are always TU-local and PC- ++ relative. We indirect common, external and weak ++ symbols (but weak only if not hidden). */ ++ if (!CONSTANT_POOL_ADDRESS_P (x) ++ && (MACHO_SYMBOL_MUST_INDIRECT_P (x) ++ || !aarch64_symbol_binds_local_p (x))) ++ return SYMBOL_MO_SMALL_GOT; ++ } ++ else ++#endif ++ if (!TARGET_PECOFF && (flag_pic || SYMBOL_REF_WEAK (x)) + && !aarch64_symbol_binds_local_p (x)) + return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC + ? SYMBOL_SMALL_GOT_28K : SYMBOL_SMALL_GOT_4G; +@@ -21268,7 +21811,8 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + +- return SYMBOL_SMALL_ABSOLUTE; ++ return TARGET_MACHO ? SYMBOL_MO_SMALL_PCR ++ : SYMBOL_SMALL_ABSOLUTE; + + case AARCH64_CMODEL_LARGE: + /* This is alright even in PIC code as the constant +@@ -21398,7 +21942,10 @@ static GTY(()) tree va_list_type; + void *__vr_top; + int __gr_offs; + int __vr_offs; +- }; */ ++ }; ++ ++ darwinpcs uses 'char *' for the va_list (in common with other platform ++ ports). */ + + static tree + aarch64_build_builtin_va_list (void) +@@ -21406,6 +21953,13 @@ aarch64_build_builtin_va_list (void) + tree va_list_name; + tree f_stack, f_grtop, f_vrtop, f_groff, f_vroff; + ++ /* darwinpcs uses a simple char * for this. */ ++ if (TARGET_MACHO) ++ { ++ va_list_type = build_pointer_type (char_type_node); ++ return va_list_type; ++ } ++ + /* Create the type. */ + va_list_type = lang_hooks.types.make_type (RECORD_TYPE); + /* Give it the required name. */ +@@ -21478,6 +22032,13 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) + int vr_save_area_size = cfun->va_list_fpr_size; + int vr_offset; + ++ /* darwinpcs uses the default, char * va_list impl. */ ++ if (TARGET_MACHO) ++ { ++ std_expand_builtin_va_start (valist, nextarg); ++ return; ++ } ++ + cum = &crtl->args.info; + if (cfun->va_list_gpr_size) + gr_save_area_size = MIN ((NUM_ARG_REGS - cum->aapcs_ncrn) * UNITS_PER_WORD, +@@ -21568,6 +22129,9 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + HOST_WIDE_INT size, rsize, adjust, align; + tree t, u, cond1, cond2; + ++ if (TARGET_MACHO) ++ return std_gimplify_va_arg_expr (valist, type, pre_p, post_p); ++ + indirect_p = pass_va_arg_by_reference (type); + if (indirect_p) + type = build_pointer_type (type); +@@ -21772,8 +22336,18 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, + field_ptr_t = double_ptr_type_node; + break; + case E_TFmode: +- field_t = long_double_type_node; +- field_ptr_t = long_double_ptr_type_node; ++ if (TARGET_MACHO) ++ { ++ /* Darwin has __float128, and long double is the same as ++ double. */ ++ field_t = float128_type_node; ++ field_ptr_t = aarch64_float128_ptr_type_node; ++ } ++ else ++ { ++ field_t = long_double_type_node; ++ field_ptr_t = long_double_ptr_type_node; ++ } + break; + case E_SDmode: + field_t = dfloat32_type_node; +@@ -21856,6 +22430,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v, + int gr_saved = cfun->va_list_gpr_size; + int vr_saved = cfun->va_list_fpr_size; + ++ if (TARGET_MACHO) ++ return default_setup_incoming_varargs (cum_v, arg, pretend_size, no_rtl); ++ + /* The caller has advanced CUM up to, but not beyond, the last named + argument. Advance a local copy of CUM past the last "real" named + argument, to find out how many registers are left over. */ +@@ -22708,6 +23285,12 @@ aarch64_autovectorize_vector_modes (vector_modes *modes, bool) + static const char * + aarch64_mangle_type (const_tree type) + { ++ /* The darwinpcs ABI documents say that "__va_list" has to be ++ mangled as char *. */ ++ if (TARGET_MACHO ++ && lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) ++ return "Pc"; ++ + /* The AArch64 ABI documents say that "__va_list" has to be + mangled as if it is in the "std" namespace. */ + if (lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type)) +@@ -22728,6 +23311,12 @@ aarch64_mangle_type (const_tree type) + if (TYPE_MAIN_VARIANT (type) == aarch64_mfp8_type_node) + return "u6__mfp8"; + ++ /* __float128 is mangled as "g" on darwin. _Float128 is not mangled here, ++ but handled in common code (as "DF128_"). */ ++ if (TARGET_MACHO && TYPE_MODE (type) == TFmode ++ && TYPE_MAIN_VARIANT (type) == float128t_type_node) ++ return "g"; ++ + /* Mangle AArch64-specific internal types. TYPE_NAME is non-NULL_TREE for + builtin types. */ + if (TYPE_NAME (type) != NULL) +@@ -23594,7 +24183,8 @@ aarch64_mov_operand_p (rtx x, machine_mode mode) + + /* GOT accesses are valid moves. */ + if (SYMBOL_REF_P (x) +- && aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G) ++ && (aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (x) == SYMBOL_MO_SMALL_GOT)) + return true; + + if (SYMBOL_REF_P (x) && mode == DImode && CONSTANT_ADDRESS_P (x)) +@@ -25035,12 +25625,8 @@ aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name) + static std::string aarch64_last_printed_arch_string; + static std::string aarch64_last_printed_tune_string; + +-/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used +- by the function fndecl. */ +- +-void +-aarch64_declare_function_name (FILE *stream, const char* name, +- tree fndecl) ++static void ++aarch64_function_options_preamble (tree fndecl) + { + tree target_parts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); + +@@ -25075,15 +25661,60 @@ aarch64_declare_function_name (FILE *stream, const char* name, + this_tune->name); + aarch64_last_printed_tune_string = this_tune->name; + } ++} ++ ++/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used ++ by the function fndecl. */ ++ ++#if TARGET_MACHO ++void ++aarch64_darwin_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ gcc_checking_assert (TREE_CODE (fndecl) == FUNCTION_DECL); ++ gcc_checking_assert (!DECL_COMMON (fndecl)); ++ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ ++ /* Darwin does not emit pcs variant info. */ + ++ rtx decl_rtx = XEXP (DECL_RTL (fndecl), 0); ++ if (GET_CODE (decl_rtx) != SYMBOL_REF) ++ name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); ++ ++ if (! DECL_WEAK (fndecl) ++ && ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl))) ++ machopic_define_symbol (DECL_RTL (fndecl)); ++ if ((TREE_STATIC (fndecl) && !TREE_PUBLIC (fndecl)) ++ || DECL_INITIAL (fndecl)) ++ (* targetm.encode_section_info) (fndecl, DECL_RTL (fndecl), false); ++ ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); ++ ++ cfun->machine->label_is_assembled = true; ++} ++ ++#else ++ ++void ++aarch64_declare_function_name (FILE *stream, const char* name, ++ tree fndecl) ++{ ++ /* Update .arch and .tune as needed. */ ++ aarch64_function_options_preamble (fndecl); ++ /* Emit any necessary pcs information. */ + aarch64_asm_output_variant_pcs (stream, fndecl, name); + + /* Don't forget the type directive for ELF. */ ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function"); ++#endif + ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); + + cfun->machine->label_is_assembled = true; + } ++#endif + + /* Implement PRINT_PATCHABLE_FUNCTION_ENTRY. */ + +@@ -25140,12 +25771,17 @@ aarch64_output_patchable_area (unsigned int patch_area_size, bool record_p) + /* Implement ASM_OUTPUT_DEF_FROM_DECLS. Output .variant_pcs for aliases. */ + + void +-aarch64_asm_output_alias (FILE *stream, const tree decl, const tree target) ++aarch64_asm_output_alias (FILE *stream, const tree decl, ++ const tree target ATTRIBUTE_UNUSED) + { + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); ++#ifdef ASM_OUTPUT_DEF + const char *value = IDENTIFIER_POINTER (target); ++#endif + aarch64_asm_output_variant_pcs (stream, decl, name); ++#ifdef ASM_OUTPUT_DEF + ASM_OUTPUT_DEF (stream, name, value); ++#endif + } + + /* Implement ASM_OUTPUT_EXTERNAL. Output .variant_pcs for undefined +@@ -25187,7 +25823,10 @@ aarch64_start_file (void) + asm_fprintf (asm_out_file, "\t.arch %s\n", + arch_string.c_str ()); + +- default_file_start (); ++ default_file_start (); ++#if TARGET_MACHO ++ darwin_file_start (); ++#endif + } + + /* Emit load exclusive. */ +@@ -25689,6 +26328,16 @@ aarch64_output_simd_imm (rtx const_vector, unsigned width, + } + + gcc_assert (CONST_INT_P (info.u.mov.value)); ++ unsigned HOST_WIDE_INT value = UINTVAL (info.u.mov.value); ++ ++ /* We have signed chars which can result in a sign-extended 8bit value ++ which is then emitted as an unsigned hex value, and the LLVM back end ++ assembler rejects that as being too big. */ ++ if (TARGET_MACHO && (known_eq (GET_MODE_BITSIZE (info.elt_mode), 8))) ++ { ++ unsigned HOST_WIDE_INT mask = (1U << GET_MODE_BITSIZE (info.elt_mode))-1; ++ value &= mask; ++ } + + if (which == AARCH64_CHECK_MOV) + { +@@ -25715,16 +26364,16 @@ aarch64_output_simd_imm (rtx const_vector, unsigned width, + ? "msl" : "lsl"); + if (lane_count == 1) + snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX, +- mnemonic, UINTVAL (info.u.mov.value)); ++ mnemonic, value); + else if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX ", %s %d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), shift_op, ++ element_char, value, shift_op, + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, " + HOST_WIDE_INT_PRINT_HEX, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + else + { +@@ -25745,12 +26394,12 @@ aarch64_output_simd_imm (rtx const_vector, unsigned width, + else if (info.u.mov.shift) + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC ", %s #%d", mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value), "lsl", ++ element_char, value, "lsl", + info.u.mov.shift); + else + snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #" + HOST_WIDE_INT_PRINT_DEC, mnemonic, lane_count, +- element_char, UINTVAL (info.u.mov.value)); ++ element_char, value); + } + return templ; + } +@@ -29017,7 +29666,8 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode) + } + + /* Implement TARGET_SCALAR_MODE_SUPPORTED_P - return TRUE +- if MODE is [BH]Fmode, and punt to the generic implementation otherwise. */ ++ if MODE is [BH]Fmode, or TFmode on Mach-O, and punt to the generic ++ implementation otherwise. */ + + static bool + aarch64_scalar_mode_supported_p (scalar_mode mode) +@@ -29025,7 +29675,7 @@ aarch64_scalar_mode_supported_p (scalar_mode mode) + if (DECIMAL_FLOAT_MODE_P (mode)) + return default_decimal_float_supported_p (); + +- return ((mode == HFmode || mode == BFmode) ++ return ((mode == HFmode || mode == BFmode || (mode == TFmode && TARGET_MACHO)) + ? true + : default_scalar_mode_supported_p (mode)); + } +@@ -29116,7 +29766,8 @@ static machine_mode + aarch64_c_mode_for_floating_type (enum tree_index ti) + { + if (ti == TI_LONG_DOUBLE_TYPE) +- return TFmode; ++ /* Darwinpcs amends AAPCS S7 to use double as the type for long double. */ ++ return TARGET_MACHO ? DFmode : TFmode; + return default_mode_for_floating_type (ti); + } + +@@ -29999,19 +30650,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE *out_file) + continue; + + const char *name = indirect_symbol_names[regnum]; +- switch_to_section (get_named_section (decl, NULL, 0)); ++ /* If the target uses a unique section for this switch to it. */ ++ if (DECL_SECTION_NAME (decl)) ++ switch_to_section (get_named_section (decl, NULL, 0)); ++ else ++ switch_to_section (text_section); + ASM_OUTPUT_ALIGN (out_file, 2); +- targetm.asm_out.globalize_label (out_file, name); ++ if (!TARGET_MACHO) ++ targetm.asm_out.globalize_label (out_file, name); ++#ifdef ASM_OUTPUT_TYPE_DIRECTIVE ++ ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); ++#endif ++ if (TARGET_MACHO) ++ { ++#ifdef ASM_WEAKEN_DECL ++ if (DECL_WEAK (decl)) ++ ASM_WEAKEN_DECL (out_file, decl, name, 0); ++ else ++#endif ++ targetm.asm_out.globalize_decl_name (out_file, decl); ++ } + /* Only emits if the compiler is configured for an assembler that can + handle visibility directives. */ + targetm.asm_out.assemble_visibility (decl, VISIBILITY_HIDDEN); +- ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function"); + ASM_OUTPUT_LABEL (out_file, name); + aarch64_sls_emit_function_stub (out_file, regnum); + /* Use the most conservative target to ensure it can always be used by any + function in the translation unit. */ + asm_fprintf (out_file, "\tdsb\tsy\n\tisb\n"); ++#ifdef ASM_DECLARE_FUNCTION_SIZE + ASM_DECLARE_FUNCTION_SIZE (out_file, name, decl); ++#endif + } + } + +@@ -31294,6 +31963,59 @@ aarch64_expand_reversed_crc_using_pmull (scalar_mode crc_mode, + } + } + ++#if TARGET_MACHO ++/* This handles the promotion of function return values. ++ It also handles function args under two specific curcumstances: ++ - called from combine with a register argument ++ - caller for a libcall with type == NULL. ++ The remaining cases for argument promotion are handled with access to ++ cumulative args data, below. */ ++machine_mode ++aarch64_darwin_promote_fn_mode (const_tree type, machine_mode mode, ++ int *punsignedp, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ /* With the amended use of promote using cargs, the only cases that arrive ++ here with for_return == 0 are from combine (where the value is definitely ++ in a register) and for libcalls, where type == NULL. We want to promote ++ function return values in the callee, so this becomes pretty much ++ unconditional now. */ ++ if (type != NULL_TREE) ++ return promote_mode (type, mode, punsignedp); ++ return mode; ++} ++ ++/* Ensure that we only promote the mode of named parms when they are passed in ++ a register. Named values passed on the stack retain their original mode and ++ alignment. */ ++machine_mode ++aarch64_darwin_promote_function_mode_ca (cumulative_args_t ca, ++ function_arg_info arg, ++ const_tree funtype ATTRIBUTE_UNUSED, ++ int *punsignedp, ++ int for_return ATTRIBUTE_UNUSED) ++{ ++ tree type = arg.type; ++ machine_mode mode = arg.mode; ++ machine_mode new_mode = promote_mode (type, mode, punsignedp); ++ if (new_mode == mode || arg.named == false ++ || GET_MODE_CLASS (new_mode) != MODE_INT ++ || known_gt (GET_MODE_SIZE (new_mode), 4)) ++ return new_mode; ++ ++ CUMULATIVE_ARGS *pcum = get_cumulative_args (ca); ++ /* Make sure that changes in assumption do not get missed. */ ++ gcc_checking_assert (for_return == 0 && new_mode == SImode ++ && !pcum->aapcs_arg_processed); ++ /* We have a named integer value that fits in a reg; if there's one available ++ then promote the value. */ ++ if (pcum->aapcs_ncrn < 8) ++ return new_mode; ++ return mode; ++} ++#endif ++ + /* Target-specific selftests. */ + + #if CHECKING_P +@@ -31519,6 +32241,15 @@ aarch64_run_selftests (void) + #define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP + #endif + ++#if TARGET_MACHO ++#undef TARGET_ASM_UNALIGNED_HI_OP ++#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t" ++#undef TARGET_ASM_UNALIGNED_SI_OP ++#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t" ++#undef TARGET_ASM_UNALIGNED_DI_OP ++#define TARGET_ASM_UNALIGNED_DI_OP "\t.quad\t" ++#endif ++ + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ + hook_bool_const_tree_hwi_hwi_const_tree_true +@@ -31624,6 +32355,12 @@ aarch64_run_selftests (void) + #undef TARGET_FUNCTION_ARG_BOUNDARY + #define TARGET_FUNCTION_ARG_BOUNDARY aarch64_function_arg_boundary + ++#undef TARGET_FUNCTION_ARG_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_BOUNDARY_CA aarch64_function_arg_boundary_ca ++ ++#undef TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++#define TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA aarch64_function_arg_round_boundary_ca ++ + #undef TARGET_FUNCTION_ARG_PADDING + #define TARGET_FUNCTION_ARG_PADDING aarch64_function_arg_padding + +@@ -31985,7 +32722,7 @@ aarch64_libgcc_floating_mode_supported_p + + /* The architecture reserves bits 0 and 1 so use bit 2 for descriptors. */ + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS +-#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4 ++#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS AARCH64_CUSTOM_FUNCTION_TEST + + #undef TARGET_HARD_REGNO_NREGS + #define TARGET_HARD_REGNO_NREGS aarch64_hard_regno_nregs +diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h +index e8bd8c73c12..c55665921a6 100644 +--- a/gcc/config/aarch64/aarch64.h ++++ b/gcc/config/aarch64/aarch64.h +@@ -72,6 +72,10 @@ + #define BYTES_BIG_ENDIAN (TARGET_BIG_END != 0) + #define WORDS_BIG_ENDIAN (BYTES_BIG_ENDIAN) + ++/* If this is non-zero then generated code of the object format, ABI and ++ assembler syntax used by Darwin (Mach-O) platforms. */ ++#define TARGET_MACHO 0 ++ + #define UNITS_PER_WORD 8 + + #define UNITS_PER_VREG 16 +@@ -132,6 +136,12 @@ + /* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY). */ + #define MALLOC_ABI_ALIGNMENT 128 + ++/* We will and with this value to test if a custom function descriptor needs ++ a static chain. The function boundary must the adjusted so that the bit ++ this represents is no longer part of the address. 0 Disables the custom ++ function descriptors. */ ++#define AARCH64_CUSTOM_FUNCTION_TEST 4 ++ + /* Defined by the ABI */ + #define WCHAR_TYPE "unsigned int" + #define WCHAR_TYPE_SIZE 32 +@@ -1198,6 +1208,24 @@ typedef struct + aapcs_reg == NULL_RTX. */ + int aapcs_stack_size; /* The total size (in words, per 8 byte) of the + stack arg area so far. */ ++ ++ /* In the darwinpcs, items smaller than one word are packed onto the stack ++ naturally aligned. Unnamed parameters passed in a variadic call are, ++ however, aligned the same way as the AAPCS64. This means that we need to ++ pad the last named arg to the next parm boundary (and hence notice when ++ we are processing that arg). */ ++ int darwinpcs_stack_bytes; /* If the argument is passed on the stack, this ++ the byte-size. */ ++ int darwinpcs_sub_word_offset;/* This is the offset of this arg within a word ++ when placing smaller items for darwinpcs. */ ++ int darwinpcs_sub_word_pos; /* The next byte available within the word for ++ darwinpcs. */ ++ unsigned darwinpcs_arg_boundary; /* The computed argument boundary. */ ++ unsigned darwinpcs_arg_padding; /* The computed argument padding. */ ++ unsigned darwinpcs_n_named; /* Number of named arguments. */ ++ unsigned darwinpcs_n_args_processed; /* Processed so far. */ ++ bool named_p; /* Is this arg named? */ ++ bool last_named_p; /* Is this the last named arg? */ + bool silent_p; /* True if we should act silently, rather than + raise an error for invalid calls. */ + +@@ -1522,8 +1550,13 @@ extern const char *is_host_cpu_not_armv8_base (int argc, const char **argv); + #define ASM_CPU_SPEC \ + MARCH_REWRITE_SPEC + ++#ifndef SUBTARGET_EXTRA_SPECS ++#define SUBTARGET_EXTRA_SPECS ++#endif ++ + #define EXTRA_SPECS \ +- { "asm_cpu_spec", ASM_CPU_SPEC } ++ { "asm_cpu_spec", ASM_CPU_SPEC }, \ ++ SUBTARGET_EXTRA_SPECS + + #define ASM_OUTPUT_POOL_EPILOGUE aarch64_asm_output_pool_epilogue + +@@ -1541,6 +1574,10 @@ extern GTY(()) tree aarch64_fp16_ptr_type_node; + bfloat16_type_node. Defined in aarch64-builtins.cc. */ + extern GTY(()) tree aarch64_bf16_ptr_type_node; + ++/* A pointer to the user-visible __float128 (on Mach-O). Defined in ++ aarch64-builtins.c. */ ++extern GTY(()) tree aarch64_float128_ptr_type_node; ++ + /* The generic unwind code in libgcc does not initialize the frame pointer. + So in order to unwind a function using a frame pointer, the very first + function that is unwound must save the frame pointer. That way the frame +diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md +index 031e621c98a..16377690b22 100644 +--- a/gcc/config/aarch64/aarch64.md ++++ b/gcc/config/aarch64/aarch64.md +@@ -383,6 +383,7 @@ + ;; Wraps a constant integer that should be multiplied by the number + ;; of quadwords in an SME vector. + UNSPEC_SME_VQ ++ UNSPEC_MACHOPIC_OFFSET ; Common to Mach-O ports. + ]) + + (define_c_enum "unspecv" [ +@@ -1053,6 +1054,37 @@ + [(set_attr "type" "load_4")] + ) + ++(define_insn "prefetch_unscaled" ++ [(prefetch (match_operand:DI 0 "aarch64_unscaled_prefetch_operand" "Du") ++ (match_operand:QI 1 "const_int_operand" "") ++ (match_operand:QI 2 "const_int_operand" ""))] ++ "" ++ { ++ const char * pftype[2][4] = ++ { ++ {"prfum\\tPLDL1STRM, %0", ++ "prfum\\tPLDL3KEEP, %0", ++ "prfum\\tPLDL2KEEP, %0", ++ "prfum\\tPLDL1KEEP, %0"}, ++ {"prfum\\tPSTL1STRM, %0", ++ "prfum\\tPSTL3KEEP, %0", ++ "prfum\\tPSTL2KEEP, %0", ++ "prfum\\tPSTL1KEEP, %0"}, ++ }; ++ ++ int locality = INTVAL (operands[2]); ++ ++ gcc_assert (IN_RANGE (locality, 0, 3)); ++ ++ /* PRFUM accepts the same addresses as a 64-bit LDR so wrap ++ the address into a DImode MEM so that aarch64_print_operand knows ++ how to print it. */ ++ operands[0] = gen_rtx_MEM (DImode, operands[0]); ++ return pftype[INTVAL(operands[1])][locality]; ++ } ++ [(set_attr "type" "load_4")] ++) ++ + (define_insn "trap" + [(trap_if (const_int 1) (const_int 8))] + "" +@@ -1589,7 +1621,7 @@ + [w , m ; load_4 , fp , 4] ldr\t%s0, %1 + [m , r Z; store_4 , * , 4] str\t%w1, %0 + [m , w ; store_4 , fp , 4] str\t%s1, %0 +- [r , Usw; load_4 , * , 8] adrp\t%x0, %A1\;ldr\t%w0, [%x0, %L1] ++ [r , Usw; load_4 , * , 8] << TARGET_MACHO ? \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %O1]\" : \"adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1]\"; + [r , Usa; adr , * , 4] adr\t%x0, %c1 + [r , Ush; adr , * , 4] adrp\t%x0, %A1 + [w , r Z; f_mcr , fp , 4] fmov\t%s0, %w1 +@@ -1628,7 +1660,7 @@ + [w, m ; load_8 , fp , 4] ldr\t%d0, %1 + [m, r Z ; store_8 , * , 4] str\t%x1, %0 + [m, w ; store_8 , fp , 4] str\t%d1, %0 +- [r, Usw ; load_8 , * , 8] << TARGET_ILP32 ? "adrp\t%0, %A1\;ldr\t%w0, [%0, %L1]" : "adrp\t%0, %A1\;ldr\t%0, [%0, %L1]"; ++ [r, Usw ; load_8 , * , 8] << TARGET_ILP32 ? (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%w0, [%0, %L1]\") : (TARGET_MACHO ? \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %O1]\" : \"adrp\\t%0, %A1\;ldr\\t%0, [%0, %L1]\"); + [r, Usa ; adr , * , 4] adr\t%x0, %c1 + [r, Ush ; adr , * , 4] adrp\t%x0, %A1 + [w, r Z ; f_mcr , fp , 4] fmov\t%d0, %x1 +@@ -7653,7 +7685,10 @@ + (lo_sum:P (match_operand:P 1 "register_operand" "r") + (match_operand 2 "aarch64_valid_symref" "S")))] + "" +- "add\\t%0, %1, :lo12:%c2" ++ { return TARGET_MACHO ++ ? "add\\t%0, %1, %J2;" ++ : "add\\t%0, %1, :lo12:%c2"; ++ } + [(set_attr "type" "alu_imm")] + ) + +diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt +index f32d56d4ffa..7bf81c4c47d 100644 +--- a/gcc/config/aarch64/aarch64.opt ++++ b/gcc/config/aarch64/aarch64.opt +@@ -202,6 +202,13 @@ Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32) + EnumValue + Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64) + ++EnumValue ++Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64) ++ ++m64 ++Target RejectNegative Alias(mabi=, darwinpcs) ++On Darwin for compatibility with other platform variants. ++ + mpc-relative-literal-loads + Target Save Var(pcrelative_literal_loads) Init(2) Save + PC relative literal loads. +diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md +index e8321c4d2fb..7b147c3a660 100644 +--- a/gcc/config/aarch64/constraints.md ++++ b/gcc/config/aarch64/constraints.md +@@ -206,7 +206,9 @@ + A constraint that matches a small GOT access." + (and (match_code "const,symbol_ref") + (match_test "aarch64_classify_symbolic_expression (op) +- == SYMBOL_SMALL_GOT_4G"))) ++ == SYMBOL_SMALL_GOT_4G ++ || aarch64_classify_symbolic_expression (op) ++ == SYMBOL_MO_SMALL_GOT"))) + + (define_constraint "Uss" + "@internal +@@ -581,6 +583,11 @@ + An address valid for a prefetch instruction." + (match_test "aarch64_address_valid_for_prefetch_p (op, true)")) + ++(define_address_constraint "Du" ++ "@internal ++ An address valid for a prefetch instruction with an unscaled offset." ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, true)")) ++ + (define_constraint "vgb" + "@internal + A constraint that matches an immediate offset valid for SVE LD1B +diff --git a/gcc/config/aarch64/darwin.h b/gcc/config/aarch64/darwin.h +new file mode 100644 +index 00000000000..b8f577d4988 +--- /dev/null ++++ b/gcc/config/aarch64/darwin.h +@@ -0,0 +1,268 @@ ++/* Target definitions for Arm64/Aarch64 running on macOS/iOS. ++ ++Copyright The GNU Toolchain Authors. ++Contributed by Iain Sandoe. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 3, or (at your option) ++any later version. ++ ++GCC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++/* Enable Mach-O bits in generic Aarch64 code. */ ++#undef TARGET_MACHO ++#define TARGET_MACHO 1 ++ ++#undef DARWIN_ARM64 ++#define DARWIN_ARM64 1 ++ ++/* This is used in generic code in darwin.cc (at present, we have no support ++ for the arm64_32 target). */ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "long int" ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE aarch64_darwin_promote_fn_mode ++ ++#undef TARGET_PROMOTE_FUNCTION_MODE_CA ++#define TARGET_PROMOTE_FUNCTION_MODE_CA aarch64_darwin_promote_function_mode_ca ++ ++/* NOTE that arm64_32 is a valid thing and corresponds to darwinpcs ++ and TARGET_ILP32, but we are not implementing that for now. */ ++#define TARGET_OS_CPP_BUILTINS() \ ++ do { \ ++ builtin_define ("__LITTLE_ENDIAN__"); \ ++ builtin_define ("__arm64"); \ ++ builtin_define ("__arm64__"); \ ++ darwin_cpp_builtins (pfile); \ ++ } while (0) ++ ++/* In Darwin's Arm64 ABI, chars are signed. */ ++ ++#undef DEFAULT_SIGNED_CHAR ++#define DEFAULT_SIGNED_CHAR 1 ++ ++/* Disable custom function descriptors on Darwin (we use heap-based ++ trampolines). */ ++#undef AARCH64_CUSTOM_FUNCTION_TEST ++#define AARCH64_CUSTOM_FUNCTION_TEST 0 ++ ++/* Non-PIE executables are forbidden by the Arm64-darwin security model; ++ remove the option from link-lines since they just produce a warning from ++ ld64 and are then ignored anyway. */ ++#undef DARWIN_NOPIE_SPEC ++#define DARWIN_NOPIE_SPEC \ ++" % ++#include ++ ++const char * ++host_detect_local_cpu (ATTRIBUTE_UNUSED int argc, ATTRIBUTE_UNUSED const char **argv) ++{ ++ bool arch = false; ++ bool tune = false; ++ bool cpu = false; ++ const char *res = NULL; ++ uint32_t family; ++ size_t len = sizeof(family); ++ ++ gcc_assert (argc); ++ if (!argv[0]) ++ return NULL; ++ ++ /* Are we processing -march, mtune or mcpu? */ ++ arch = strcmp (argv[0], "arch") == 0; ++ if (!arch) ++ tune = strcmp (argv[0], "tune") == 0; ++ if (!arch && !tune) ++ cpu = strcmp (argv[0], "cpu") == 0; ++ if (!arch && !tune && !cpu) ++ return NULL; ++ ++ sysctlbyname("hw.cpufamily", &family, &len, NULL, 0); ++ ++ switch (family) ++ { ++ case 0x07d34b9f: // Vortex, Tempest ++ res = "apple-a12"; ++ break; ++ case 0x573b5eec: ++ case 0x1b588bb3: // Firestorm, Icestorm ++ res = "apple-m1"; ++ break; ++ case 0xda33d83d: // Blizzard, Avalanche ++ res = "apple-m2"; ++ break; ++ case 0xfa33415e: // Ibiza (M3) ++ case 0x5f4dea93: // Lobos (M3 Pro) ++ case 0x72015832: // Palma (M3 Max) ++ res = "apple-m3"; ++ break; ++ default: ++ res = DEFAULT_ARCH; ++ } ++ ++ if (res) ++ return concat ("-m", argv[0], "=", res, NULL); ++ else ++ return NULL; ++} ++ ++#else ++ + struct aarch64_arch_extension + { + const char *ext; +@@ -58,9 +128,6 @@ struct aarch64_core_data + #define INVALID_IMP ((unsigned char) -1) + #define INVALID_CORE ((unsigned)-1) + #define ALL_VARIANTS ((unsigned)-1) +-/* Default architecture to use if -mcpu=native did not detect a known CPU. */ +-#define DEFAULT_ARCH "8A" +-#define DEFAULT_CPU "generic-armv8-a" + + #define AARCH64_CORE(CORE_NAME, CORE_IDENT, SCHED, ARCH, FLAGS, COSTS, IMP, PART, VARIANT) \ + { CORE_NAME, #ARCH, IMP, PART, VARIANT, feature_deps::cpu_##CORE_IDENT }, +@@ -504,3 +571,4 @@ not_found: + return NULL; + } + } ++#endif +diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md +index 1ab1c696c62..612556dc40d 100644 +--- a/gcc/config/aarch64/predicates.md ++++ b/gcc/config/aarch64/predicates.md +@@ -355,9 +355,24 @@ + (define_predicate "aarch64_prefetch_operand" + (match_test "aarch64_address_valid_for_prefetch_p (op, false)")) + ++(define_predicate "aarch64_unscaled_prefetch_operand" ++ (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, false)")) ++ + (define_predicate "aarch64_valid_symref" + (match_code "const, symbol_ref, label_ref") + { ++ if (TARGET_MACHO) ++ { ++ rtx x = op; ++ rtx offset; ++ split_const (x, &x, &offset); ++ if (GET_CODE (x) == CONST) ++ x = XEXP (x, 0); ++ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SALT_ADDR) ++ x = XVECEXP (x, 0, 0); ++ if (SYMBOL_REF_P (x) && INTVAL (offset) < 0) ++ return false; ++ } + return (aarch64_classify_symbolic_expression (op) + != SYMBOL_FORCE_TO_MEM); + }) +diff --git a/gcc/config/aarch64/t-aarch64-darwin b/gcc/config/aarch64/t-aarch64-darwin +new file mode 100644 +index 00000000000..e2b8ad9237f +--- /dev/null ++++ b/gcc/config/aarch64/t-aarch64-darwin +@@ -0,0 +1,25 @@ ++# Machine description for AArch64 architecture. ++# Copyright (C) 2020 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range ++ ++# TODO - figure out what multilib provisions we should make for ++# a) arm64e ++# b) arm64_32 +diff --git a/gcc/config/darwin-driver.cc b/gcc/config/darwin-driver.cc +index 224e0a0de70..81b2142854b 100644 +--- a/gcc/config/darwin-driver.cc ++++ b/gcc/config/darwin-driver.cc +@@ -268,10 +268,13 @@ darwin_driver_init (unsigned int *decoded_options_count, + bool seenX86_64 = false; + bool seenPPC = false; + bool seenPPC64 = false; ++#if !DARWIN_ARM64 ++ bool seenArm64 = false; + bool seenM32 = false; + bool seenM64 = false; + bool appendM32 = false; + bool appendM64 = false; ++#endif + const char *vers_string = NULL; + bool seen_version_min = false; + bool seen_sysroot_p = false; +@@ -296,6 +299,12 @@ darwin_driver_init (unsigned int *decoded_options_count, + seenPPC = true; + else if (!strcmp ((*decoded_options)[i].arg, "ppc64")) + seenPPC64 = true; ++ else if (!strcmp ((*decoded_options)[i].arg, "arm64")) ++#if !DARWIN_ARM64 ++ seenArm64 = true; ++#else ++ ; /* We accept the option, but don't need to act on it. */ ++#endif + else + error ("this compiler does not support %qs", + (*decoded_options)[i].arg); +@@ -309,7 +318,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + --i; + --*decoded_options_count; + break; +- ++#if !DARWIN_ARM64 + case OPT_m32: + seenM32 = true; + break; +@@ -317,6 +326,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + case OPT_m64: + seenM64 = true; + break; ++#endif + + case OPT_mmacosx_version_min_: + seen_version_min = true; +@@ -376,6 +386,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenPPC || seenPPC64) + warning (0, "this compiler does not support PowerPC" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenX86) + { + if (seenX86_64 || seenM64) +@@ -399,6 +412,9 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (seenX86 || seenX86_64) + warning (0, "this compiler does not support x86" + " (%<-arch%> option ignored)"); ++ else if (seenArm64) ++ warning (0, "this compiler does not support Arm64" ++ " (%<-arch%> option ignored)"); + if (seenPPC) + { + if (seenPPC64 || seenM64) +@@ -418,12 +434,20 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (! seenM64) /* Add -m64 if the User didn't. */ + appendM64 = true; + } ++#elif DARWIN_ARM64 ++ if (seenPPC || seenPPC64) ++ warning (0, "this compiler does not support PowerPC" ++ " (%<-arch%> option ignored)"); ++ if (seenX86 || seenX86_64) ++ warning (0, "this compiler does not support x86" ++ " (%<-arch%> option ignored)"); + #endif + + /* If there is nothing else on the command line, do not add sysroot etc. */ + if (*decoded_options_count <= 1) + return; + ++#if !DARWIN_ARM64 + if (appendM32 || appendM64) + { + ++*decoded_options_count; +@@ -433,6 +457,7 @@ darwin_driver_init (unsigned int *decoded_options_count, + generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER, + &(*decoded_options)[*decoded_options_count - 1]); + } ++#endif + + if (!seen_sysroot_p) + { +diff --git a/gcc/config/darwin-protos.h b/gcc/config/darwin-protos.h +index 16ad30fd057..01b2b10aac9 100644 +--- a/gcc/config/darwin-protos.h ++++ b/gcc/config/darwin-protos.h +@@ -86,9 +86,12 @@ extern void darwin_asm_lto_end (void); + extern void darwin_mark_decl_preserved (const char *); + + extern tree darwin_handle_kext_attribute (tree *, tree, tree, int, bool *); +-extern tree darwin_handle_weak_import_attribute (tree *node, tree name, +- tree args, int flags, +- bool * no_add_attrs); ++extern tree darwin_handle_weak_import_attribute (tree *, tree, tree, int, ++ bool *); ++extern tree darwin_handle_availability_attribute (tree *, tree, tree, ++ int, bool *); ++extern bool darwin_attribute_takes_identifier_p (const_tree); ++ + extern void machopic_output_stub (FILE *, const char *, const char *); + extern void darwin_globalize_label (FILE *, const char *); + extern void darwin_assemble_visibility (tree, int); +@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfstring_table (tree); + extern void darwin_asm_output_anchor (rtx symbol); + extern bool darwin_use_anchors_for_symbol_p (const_rtx symbol); + extern bool darwin_kextabi_p (void); ++extern bool darwin_unreachable_traps_p (void); + extern void darwin_override_options (void); + extern void darwin_patch_builtins (void); + extern void darwin_rename_builtins (void); +diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc +index be2daed4f66..e0c8c8001d2 100644 +--- a/gcc/config/darwin.cc ++++ b/gcc/config/darwin.cc +@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see + #include "cfghooks.h" + #include "df.h" + #include "memmodel.h" ++#include "c-family/c-common.h" /* enum rid. */ + #include "tm_p.h" + #include "stringpool.h" + #include "attribs.h" +@@ -49,6 +50,7 @@ along with GCC; see the file COPYING3. If not see + #include "optabs.h" + #include "flags.h" + #include "opts.h" ++#include "c-family/c-objc.h" /* for objc_method_decl(). */ + + /* Fix and Continue. + +@@ -102,6 +104,7 @@ int darwin_running_cxx; + + /* Some code-gen now depends on OS major version numbers (at least). */ + int generating_for_darwin_version ; ++unsigned long current_os_version = 0; + + /* For older linkers we need to emit special sections (marked 'coalesced') for + for weak or single-definition items. */ +@@ -131,7 +134,7 @@ struct { + section * darwin_sections[NUM_DARWIN_SECTIONS]; + + /* While we transition to using in-tests instead of ifdef'd code. */ +-#if !HAVE_lo_sum ++#if !HAVE_lo_sum || DARWIN_ARM64 + #define gen_macho_high(m,a,b) (a) + #define gen_macho_low(m,a,b,c) (a) + #endif +@@ -1104,6 +1107,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) + return pic_ref; + } + ++#if !DARWIN_ARM64 + /* Callbacks to output the stub or non-lazy pointers. + Each works on the item in *SLOT,if it has been used. + DATA is the FILE* for assembly output. +@@ -1259,6 +1263,7 @@ machopic_finish (FILE *out_file) + machopic_indirections->traverse_noresize + (out_file); + } ++#endif + + int + machopic_operand_p (rtx op) +@@ -2194,6 +2199,122 @@ darwin_handle_kext_attribute (tree *node, tree name, + return NULL_TREE; + } + ++enum version_components { MAJOR, MINOR, TINY }; ++ ++/* Parse a version number in x.y.z form and validate it as a macOS ++ version. Ideally, we'd put this in a common place usable by the ++ Darwin backend. */ ++ ++static bool ++parse_version (unsigned version_array[3], const char *version_str) ++{ ++ size_t version_len; ++ char *end, last = '\0', delimiter = '.', alt_delim = '_'; ++ ++ if (!version_str) ++ return false; ++ ++ /* Handle the odd situation in which we get STRING_CST which contain the ++ starting and ending quotes. */ ++ if (version_str[0] == '"') ++ { ++ version_str++; ++ version_len = strrchr (&version_str[1], '"') - version_str; ++ last = '"'; ++ } ++ else ++ version_len = strlen (version_str); ++ ++ if (version_len < 1) ++ return false; ++ ++ /* Version string must consist of digits and periods only. */ ++ if (strspn (version_str, "0123456789._") != version_len) ++ return false; ++ ++ if (!ISDIGIT (version_str[0]) || !ISDIGIT (version_str[version_len - 1])) ++ return false; ++ ++ version_array[MAJOR] = strtoul (version_str, &end, 10); ++ if (*end == '_') ++ { ++ delimiter = '_'; ++ alt_delim = '.'; ++ } ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MAJOR] == 100000) ++ return true; ++ if (version_array[MAJOR] > 99) ++ return false; ++ ++ /* Version string must not contain adjacent delimiters. */ ++ if (*version_str == delimiter || *version_str == alt_delim) ++ return false; ++ ++ version_array[MINOR] = strtoul (version_str, &end, 10); ++ if (*end == alt_delim) ++ return false; ++ version_str = end + ((*end == delimiter) ? 1 : 0); ++ if (version_array[MINOR] > 99) ++ return false; ++ ++ version_array[TINY] = strtoul (version_str, &end, 10); ++ if (version_array[TINY] > 99) ++ return false; ++ ++ /* Version string must contain no more than three tokens. */ ++ if (*end != last) ++ return false; ++ ++ return true; ++} ++ ++/* Turn a version expressed as maj.min.tiny into an unsigned long ++ integer representing the value used in macOS availability macros. */ ++ ++static unsigned long ++version_from_version_array (unsigned vers[3]) ++{ ++ unsigned long res = 0; ++ /* There seems to be a special "unknown" value. */ ++ if (vers[0] == 100000) ++ return 999999; ++ ++ /* Here, we follow the 'modern' / 'legacy' numbering scheme for versions. */ ++ if (vers[0] > 10 || vers[1] >= 10) ++ res = vers[0] * 10000 + vers[1] * 100 + vers[2]; ++ else ++ { ++ res = vers[0] * 100; ++ if (vers[1] > 9) ++ res += 90; ++ else ++ res += vers[1] * 10; ++ if (vers[2] > 9) ++ res += 9; ++ else ++ res += vers[1]; ++ } ++ return res; ++} ++ ++/* Extract a macOS version from an availability attribute argument. */ ++ ++static unsigned long ++os_version_from_avail_value (tree value) ++{ ++ unsigned long res = 0; ++ unsigned vers[3] = {0,0,0}; ++ if (TREE_CODE (value) == STRING_CST) ++ { ++ if (parse_version (&vers[0], TREE_STRING_POINTER (value))) ++ res = version_from_version_array (&vers[0]); ++ } ++ else ++ gcc_unreachable (); ++ return res; ++} ++ + /* Handle a "weak_import" attribute; arguments as in + struct attribute_spec.handler. */ + +@@ -2215,6 +2336,231 @@ darwin_handle_weak_import_attribute (tree *node, tree name, + return NULL_TREE; + } + ++#define NUM_AV_OSES 13 ++const char *availability_os[NUM_AV_OSES] ++ = { "macos", "macosx", "ios", "tvos", "watchos", "driverkit", "swift", ++ "maccatalyst", "macCatalyst", "xros", "visionos", "android", "zos" }; ++ ++#define NUM_AV_CLAUSES 6 ++const char *availability_clause[NUM_AV_CLAUSES] ++ = { "unavailable", "introduced", "deprecated", "obsoleted", "message", ++ "replacement" }; ++ ++/* Validate and act upon the arguments to an 'availability' attribute. */ ++ ++tree ++darwin_handle_availability_attribute (tree *node, tree name, tree args, ++ int flags, bool * no_add_attrs) ++{ ++ tree decl = *node; ++ *no_add_attrs = true; ++ ++ if (!decl || (!TYPE_P (decl) && !DECL_P (decl))) ++ { ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ else if (decl == error_mark_node) ++ return NULL_TREE; ++ ++ location_t loc = DECL_SOURCE_LOCATION (decl); ++ if (args == NULL_TREE) ++ { ++ error_at (loc, "%qE attribute requires at least one argument", ++ name); ++ return NULL_TREE; ++ } ++ else if (args == error_mark_node) ++ return NULL_TREE; ++ ++ /* The first argument must name a supported OS - although we could choose ++ to ignore any OS we don't recognise. */ ++ gcc_checking_assert (TREE_CODE (args) == TREE_LIST); ++ tree platform = TREE_VALUE (args); ++ if (platform == error_mark_node) ++ return NULL_TREE; ++ ++ gcc_checking_assert (TREE_CODE (platform) == IDENTIFIER_NODE); ++ bool platform_ok = false; ++ unsigned plat_num = 0; ++ for (; plat_num < (unsigned) NUM_AV_OSES; plat_num++) ++ if (strcmp (availability_os[plat_num], IDENTIFIER_POINTER (platform)) == 0) ++ { ++ platform_ok = true; ++ break; ++ } ++ if (!platform_ok) ++ { ++ error_at (input_location, ++ "platform %qE is not recognised for the % " ++ "attribute", platform); ++ return NULL_TREE; ++ } ++ else if (plat_num > 1) /* We only compile for macos so far. */ ++ return NULL_TREE; ++ ++ /* We might be dealing with an object or type. */ ++ tree target_decl = NULL_TREE; ++ tree type = NULL_TREE; ++ bool warn = false; ++ if (DECL_P (*node)) ++ { ++ type = TREE_TYPE (decl); ++ ++ if (TREE_CODE (decl) == TYPE_DECL ++ || TREE_CODE (decl) == PARM_DECL ++ || VAR_OR_FUNCTION_DECL_P (decl) ++ || TREE_CODE (decl) == FIELD_DECL ++ || TREE_CODE (decl) == CONST_DECL ++ /*|| objc_method_decl (TREE_CODE (decl))*/) ++ target_decl = decl; ++ else ++ warn = true; ++ } ++ else if (TYPE_P (*node)) ++ type = target_decl = *node; ++ else ++ warn = true; ++ ++ tree what = NULL_TREE; ++ if (warn) ++ { ++ if (type && TYPE_NAME (type)) ++ { ++ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ++ what = TYPE_NAME (*node); ++ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ++ && DECL_NAME (TYPE_NAME (type))) ++ what = DECL_NAME (TYPE_NAME (type)); ++ } ++ if (what) ++ warning (OPT_Wattributes, "%qE attribute ignored for %qE", name, what); ++ else ++ warning (OPT_Wattributes, "%qE attribute ignored", name); ++ return NULL_TREE; ++ } ++ ++ /* Now we have to parse the availability clauses. */ ++ tree msg = NULL_TREE; ++ tree replacement = NULL_TREE; ++ bool unavailable = false; ++ unsigned introduced = 1000; ++ unsigned deprecated = current_os_version + 1; ++ unsigned obsoleted = current_os_version + 1; ++ for (tree arg = TREE_CHAIN (args); arg; arg = TREE_CHAIN (arg)) ++ { ++ tree clause_name = TREE_VALUE (arg); ++ tree clause_value = TREE_PURPOSE (arg); ++ if (clause_name == error_mark_node ++ || clause_value == error_mark_node) ++ continue; ++ unsigned clause_num = 0; ++ for (; clause_num < (unsigned) NUM_AV_CLAUSES; clause_num++) ++ if (strcmp (availability_clause[clause_num], ++ IDENTIFIER_POINTER (clause_name)) == 0) ++ break; ++ switch (clause_num) ++ { ++ default: ++ error_at (input_location, ++ "clause %qE is not recognised for the % " ++ "attribute", clause_name); ++ break; ++ case 0: ++ unavailable = true; ++ break; ++ case 1: ++ case 2: ++ case 3: ++ if (!clause_value) ++ error_at (input_location, "%<%E=%> requires a value", clause_name); ++ else ++ { ++ unsigned version = os_version_from_avail_value (clause_value); ++ if (version == 0) ++ error_at (input_location, "the value %qE provided to %qE is " ++ "not a valid OS version", clause_value, clause_name); ++ else if (clause_num == 1) ++ introduced = version; ++ else if (clause_num == 2) ++ deprecated = version; ++ else if (clause_num == 3) ++ obsoleted = version; ++ } ++ break; ++ case 4: ++ case 5: ++ if (!clause_value || TREE_CODE (clause_value) != STRING_CST) ++ error_at (input_location, "%<%E=%> requires a string", clause_name); ++ else if (clause_num == 4) ++ msg = clause_value; ++ else ++ replacement = clause_value; ++ break; ++ } ++ } ++ /* Now figure out what to do. */ ++ tree maybe_text = NULL_TREE; ++ if (replacement) ++ maybe_text = tree_cons (NULL_TREE, replacement, NULL_TREE); ++ else if (msg) ++ maybe_text = tree_cons (NULL_TREE, msg, NULL_TREE); ++ ++ if (unavailable || current_os_version >= obsoleted) ++ { ++ TREE_UNAVAILABLE (*node) = true; ++ /* We do not handle the availability attribute at diagnostics-time, so ++ if we want the informational messages, then attach them to additional ++ attributes for the deprecation or unavailability. TODO; maybe we can ++ fabricate the composite here. */ ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("unavailable"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version > deprecated) ++ { ++ TREE_DEPRECATED (*node) = true; ++ if (maybe_text) ++ { ++ *no_add_attrs = false; ++ tree new_attr = tree_cons (get_identifier ("deprecated"), ++ maybe_text, NULL_TREE); ++ /* This is the actual consequence of the evaluation. */ ++ if (TYPE_P (target_decl) && !(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) ++ { ++ *node = build_variant_type_copy (*node); ++ TYPE_ATTRIBUTES (*node) = chainon (TYPE_ATTRIBUTES (*node), ++ new_attr); ++ } ++ else ++ DECL_ATTRIBUTES (*node) = chainon (DECL_ATTRIBUTES (*node), ++ new_attr); ++ } ++ } ++ else if (current_os_version < introduced) ++ *no_add_attrs = false; ++ return NULL_TREE; ++} ++ ++bool ++darwin_attribute_takes_identifier_p (const_tree attr_id) ++{ ++ return is_attribute_p ("availability", attr_id); ++} ++ + /* Emit a label for an FDE, making it global and/or weak if appropriate. + The third parameter is nonzero if this is for exception handling. + The fourth parameter is nonzero if this is just a placeholder for an +@@ -2306,6 +2652,8 @@ darwin_emit_except_table_label (FILE *file) + rtx + darwin_make_eh_symbol_indirect (rtx orig, bool ARG_UNUSED (pubvis)) + { ++ if (DARWIN_ARM64) ++ return orig; + if (DARWIN_PPC == 0 && TARGET_64BIT) + return orig; + +@@ -3154,7 +3502,12 @@ darwin_file_end (void) + fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags); + } + ++#if !DARWIN_ARM64 + machopic_finish (asm_out_file); ++#else ++ gcc_checking_assert (!machopic_indirections); ++#endif ++ + if (flag_apple_kext) + { + /* These sections are only used for kernel code. */ +@@ -3330,6 +3683,13 @@ darwin_kextabi_p (void) { + return flag_apple_kext; + } + ++/* True, iff we want to map __builtin_unreachable to a trap. */ ++ ++bool ++darwin_unreachable_traps_p (void) { ++ return darwin_unreachable_traps; ++} ++ + void + darwin_override_options (void) + { +@@ -3350,7 +3710,14 @@ darwin_override_options (void) + generating_for_darwin_version = 8; + + /* Earlier versions are not specifically accounted, until required. */ ++ unsigned vers[3] = {0,0,0}; ++ if (!parse_version (vers, darwin_macosx_version_min)) ++ error_at (UNKNOWN_LOCATION, "how did we get a bad OS version? (%s)", ++ darwin_macosx_version_min); ++ current_os_version = version_from_version_array (vers); + } ++ else ++ current_os_version = 1058; + + /* Some codegen needs to account for the capabilities of the target + linker. */ +@@ -3592,6 +3959,19 @@ darwin_override_options (void) + + /* The c_dialect...() macros are not available to us here. */ + darwin_running_cxx = (strstr (lang_hooks.name, "C++") != 0); ++ ++ /* Allow the clang extension to permit const vars used in array sizes. */ ++ if (!OPTION_SET_P (flag_allow_const_var_array_size)) ++ flag_allow_const_var_array_size = true; ++ ++ /* We need to consume attributes on function definitions from the the SDK ++ headers. */ ++ if (!OPTION_SET_P (flag_allow_ext_attr_placement)) ++ flag_allow_ext_attr_placement = true; ++ ++ /* We need to consume some C keywords in C++. */ ++ if (!OPTION_SET_P (flag_allow_extra_keywords)) ++ flag_allow_extra_keywords = true; + } + + #if DARWIN_PPC +diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h +index 9b9a3fe4038..000db586104 100644 +--- a/gcc/config/darwin.h ++++ b/gcc/config/darwin.h +@@ -42,6 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #define DARWIN_X86 0 + #define DARWIN_PPC 0 ++#define DARWIN_ARM64 0 + + #define OBJECT_FORMAT_MACHO 1 + +@@ -381,7 +382,8 @@ extern GTY(()) int darwin_ms_struct; + */ + + #define DARWIN_NOCOMPACT_UNWIND \ +-" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) " ++"%{!fuse-ld=lld: \ ++ %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}" + + /* In Darwin linker specs we can put -lcrt0.o and ld will search the library + path for crt0.o or -lcrtx.a and it will search for libcrtx.a. As for +@@ -405,7 +407,8 @@ extern GTY(()) int darwin_ms_struct; + LINK_PLUGIN_SPEC \ + "%{flto*:% Specify that ld64 is the toolchain linker for the current invocation. + ++munreachable-traps ++Target Var(darwin_unreachable_traps) Init(1) ++When set (the default) this makes __builtin_unreachable render as a trap. ++ + ; Driver options. + + all_load +diff --git a/gcc/configure b/gcc/configure +index 16965953f05..c513191e236 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -743,6 +743,8 @@ ORIGINAL_NM_FOR_TARGET + gcc_cv_nm + ORIGINAL_LD_GOLD_FOR_TARGET + ORIGINAL_LD_BFD_FOR_TARGET ++ORIGINAL_CLASSIC_LD_FOR_TARGET ++ORIGINAL_LLD_FOR_TARGET + ORIGINAL_LD_FOR_TARGET + ORIGINAL_PLUGIN_LD_FOR_TARGET + gcc_cv_ld +@@ -3811,20 +3813,19 @@ gcc_gxx_libcxx_include_dir= + + # Check whether --with-gxx-libcxx-include-dir was given. + if test "${with_gxx_libcxx_include_dir+set}" = set; then : +- withval=$with_gxx_libcxx_include_dir; case "${withval}" in +-yes) as_fn_error $? "bad value ${withval} given for libc++ include directory" "$LINENO" 5 ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac ++ withval=$with_gxx_libcxx_include_dir; gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir + fi + + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -3832,16 +3833,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. ++ gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. + gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[1-9]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -21520,7 +21525,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 21523 "configure" ++#line 21525 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -21626,7 +21631,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 21629 "configure" ++#line 21631 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -25251,6 +25256,14 @@ fi + $as_echo "$gold_non_default" >&6; } + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic ++ ++ + + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 9f67e62950a..5f5d740e52b 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -235,18 +235,17 @@ gcc_gxx_libcxx_include_dir= + AC_ARG_WITH(gxx-libcxx-include-dir, + [AS_HELP_STRING([--with-gxx-libcxx-include-dir=DIR], + [specifies directory to find libc++ header files])], +-[case "${withval}" in +-yes) AC_MSG_ERROR(bad value ${withval} given for libc++ include directory) ;; +-*) gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;; +-esac]) ++[gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir]) + + # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option. + # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option. ++# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use ++# the default path within the installation. + # if --with-gxx-libcxx-include-dir is unset we enable the stdlib option +-# based on the platform (to be available on platform versions where it is the ++# based on the platform (to be available on platform versions where it is the + # default for the system tools). We also use a default path within the compiler +-# install tree. +-# Otherwise, we use the path provided and enable the stdlib option. ++# install tree. ++# Otherwise, we use the path provided and enable the stdlib option. + # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we + # check to see if the latter starts with the former and, upon success, compute + # gcc_gxx_libcxx_include_dir as relative to the sysroot. +@@ -254,16 +253,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0 + gcc_enable_stdlib_opt=0 + if test x${gcc_gxx_libcxx_include_dir} != x; then + if test x${gcc_gxx_libcxx_include_dir} = xno; then +- # set defaults for the dir, but the option is disabled anyway. ++ # set defaults for the dir, but the option is disabled anyway. + gcc_gxx_libcxx_include_dir= ++ elif test x${gcc_gxx_libcxx_include_dir} = xyes; then ++ # set defaults for the dir, and enable. ++ gcc_gxx_libcxx_include_dir= ++ gcc_enable_stdlib_opt=1 + else + gcc_enable_stdlib_opt=1 + fi + else + case $target in + *-darwin1[[1-9]]* | *-darwin2*) +- # Default this on for Darwin versions which default to libcxx, +- # and embed the path in the compiler install so that we get a ++ # Default this on for Darwin versions which default to libcxx, ++ # and embed the path in the compiler install so that we get a + # self-contained toolchain. + gcc_enable_stdlib_opt=1 + ;; +@@ -2853,7 +2856,15 @@ fi + AC_MSG_RESULT($gold_non_default) + + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld ++if test x"$ld64_flag" = x"yes"; then ++ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld ++else ++ORIGINAL_LLD_FOR_TARGET=$gcc_cv_lld ++fi ++ORIGINAL_CLASSIC_LD_FOR_TARGET=$gcc_cv_ld-classic + AC_SUBST(ORIGINAL_LD_FOR_TARGET) ++AC_SUBST(ORIGINAL_LLD_FOR_TARGET) ++AC_SUBST(ORIGINAL_CLASSIC_LD_FOR_TARGET) + case "$ORIGINAL_LD_FOR_TARGET" in + ./collect-ld | ./collect-ld$build_exeext) ;; + *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; +diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc +index 21156f1dd3b..92cb8d3cfea 100644 +--- a/gcc/cp/decl2.cc ++++ b/gcc/cp/decl2.cc +@@ -4011,9 +4011,8 @@ get_tls_init_fn (tree var) + if (!flag_extern_tls_init && DECL_EXTERNAL (var)) + return NULL_TREE; + +- /* If the variable is internal, or if we can't generate aliases, +- call the local init function directly. */ +- if (!TREE_PUBLIC (var) || !TARGET_SUPPORTS_ALIASES) ++ /* If the variable is internal call the local init function directly. */ ++ if (!TREE_PUBLIC (var)) + return get_local_tls_init_fn (DECL_SOURCE_LOCATION (var)); + + tree sname = mangle_tls_init_fn (var); +@@ -4177,6 +4176,25 @@ generate_tls_wrapper (tree fn) + expand_or_defer_fn (finish_function (/*inline_p=*/false)); + } + ++/* A dummy init function to act as a weak placeholder for a (possibly non- ++ existent) dynamic init. */ ++static void ++generate_tls_dummy_init (tree fn) ++{ ++ tree var = DECL_BEFRIENDING_CLASSES (fn); ++ tree init_fn = get_tls_init_fn (var); ++ /* If have no init fn, or it is non-weak, then we do not need to make a ++ dummy. */ ++ if (!init_fn || !lookup_attribute ("weak", DECL_ATTRIBUTES (init_fn))) ++ return; ++ start_preparsed_function (init_fn, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ declare_weak (init_fn); ++ finish_return_stmt (NULL_TREE); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++} ++ + /* Start a global constructor or destructor function. */ + + static tree +@@ -5229,6 +5247,7 @@ handle_tls_init (void) + tree sl = NULL_TREE; + int save_stmts_are_full_exprs_p = stmts_are_full_exprs_p (); + bool saw_nonbase = false; ++ auto_vec direct_calls; + for (; vars; vars = TREE_CHAIN (vars)) + { + tree var = TREE_VALUE (vars); +@@ -5238,16 +5257,17 @@ handle_tls_init (void) + one_static_initialization_or_destruction (/*initp=*/true, var, init, + false); + +- /* Output init aliases even with -fno-extern-tls-init. */ +- if (TARGET_SUPPORTS_ALIASES && TREE_PUBLIC (var)) ++ /* Output inits even with -fno-extern-tls-init. ++ We save the list here and output either an alias or a stub function ++ below. */ ++ if (TREE_PUBLIC (var)) + { +- tree single_init_fn = get_tls_init_fn (var); ++ tree single_init_fn = get_tls_init_fn (var); + if (single_init_fn == NULL_TREE) + continue; +- cgraph_node *alias +- = cgraph_node::get_create (fn)->create_same_body_alias +- (single_init_fn, fn); +- gcc_assert (alias != NULL); ++ if (single_init_fn == fn) ++ continue; ++ direct_calls.safe_push (single_init_fn); + } + } + decomp_finalize_var_list (sl, save_stmts_are_full_exprs_p); +@@ -5256,6 +5276,30 @@ handle_tls_init (void) + finish_if_stmt (if_stmt); + finish_function_body (body); + expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ ++ /* For each TLS var that we have an init function, we either emit an alias ++ between that and the tls_init, or a stub function that just calls the ++ tls_init. */ ++ while (!direct_calls.is_empty()) ++ { ++ tree single_init_fn = direct_calls.pop (); ++ if (TARGET_SUPPORTS_ALIASES) ++ { ++ cgraph_node *alias ++ = cgraph_node::get_create (fn)->create_same_body_alias ++ (single_init_fn, fn); ++ gcc_assert (alias != NULL); ++ } ++ else ++ { ++ start_preparsed_function (single_init_fn, NULL_TREE, SF_PRE_PARSED); ++ tree body = begin_function_body (); ++ tree r = build_call_expr (fn, 0); ++ finish_expr_stmt (r); ++ finish_function_body (body); ++ expand_or_defer_fn (finish_function (/*inline_p=*/false)); ++ } ++ } + } + + /* We're at the end of compilation, so generate any mangling aliases that +@@ -5699,7 +5743,14 @@ c_parse_final_cleanups (void) + } + + if (!DECL_INITIAL (decl) && decl_tls_wrapper_p (decl)) +- generate_tls_wrapper (decl); ++ { ++ generate_tls_wrapper (decl); ++ /* The wrapper might have a weak reference to an init, we provide ++ a dummy function to satisfy that here. The linker/dynamic ++ loader will override this with the actual init, if one is ++ required. */ ++ generate_tls_dummy_init (decl); ++ } + + if (!DECL_SAVED_TREE (decl)) + continue; +diff --git a/gcc/cp/lex.cc b/gcc/cp/lex.cc +index c12b084aad9..ab271c2dc71 100644 +--- a/gcc/cp/lex.cc ++++ b/gcc/cp/lex.cc +@@ -266,6 +266,9 @@ init_reswords (void) + { + if (c_common_reswords[i].disable & D_CONLY) + continue; ++ if (!flag_allow_extra_keywords ++ && c_common_reswords[i].disable & D_EXT_C_IN_CXX) ++ continue; + id = get_identifier (c_common_reswords[i].word); + C_SET_RID_CODE (id, c_common_reswords[i].rid); + ridpointers [(int) c_common_reswords[i].rid] = id; +diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc +index 3628cfefa07..e4d429d3b3b 100644 +--- a/gcc/cp/parser.cc ++++ b/gcc/cp/parser.cc +@@ -708,6 +708,91 @@ cp_lexer_handle_early_pragma (cp_lexer *lexer) + static cp_parser *cp_parser_new (cp_lexer *); + static GTY (()) cp_parser *the_parser; + ++/* Context-sensitive parse-checking for clang-style attributes. */ ++ ++enum clang_attr_state { ++ CA_NONE = 0, ++ CA_ATTR, ++ CA_BR1, CA_BR2, ++ CA_LIST, ++ CA_LIST_ARGS, ++ CA_IS_CA, ++ CA_CA_ARGS, ++ CA_LIST_CONT ++}; ++ ++/* State machine tracking context of attribute lexing. */ ++ ++static enum clang_attr_state ++cp_lexer_attribute_state (cp_token& token, enum clang_attr_state attr_state) ++{ ++ /* Implement a context-sensitive parser for clang attributes. ++ We detect __attribute__((clang_style_attribute (ARGS))) and lex the ++ args ARGS with the following differences from GNU attributes: ++ (a) number-like values are lexed as strings [this allows lexing XX.YY.ZZ ++ version numbers]. ++ (b) we concatenate strings, since clang attributes allow this too. */ ++ switch (attr_state) ++ { ++ case CA_NONE: ++ if (token.type == CPP_KEYWORD ++ && token.keyword == RID_ATTRIBUTE) ++ attr_state = CA_ATTR; ++ break; ++ case CA_ATTR: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR1; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR1: ++ if (token.type == CPP_OPEN_PAREN) ++ attr_state = CA_BR2; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_BR2: ++ if (token.type == CPP_NAME) ++ { ++ tree identifier = (token.type == CPP_KEYWORD) ++ /* For keywords, use the canonical spelling, not the ++ parsed identifier. */ ++ ? ridpointers[(int) token.keyword] ++ : token.u.value; ++ identifier = canonicalize_attr_name (identifier); ++ if (attribute_clang_form_p (identifier)) ++ attr_state = CA_IS_CA; ++ else ++ attr_state = CA_LIST; ++ } ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_IS_CA: ++ case CA_LIST: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else if (token.type == CPP_OPEN_PAREN) ++ attr_state = attr_state == CA_IS_CA ? CA_CA_ARGS ++ : CA_LIST_ARGS; ++ else ++ attr_state = CA_NONE; ++ break; ++ case CA_CA_ARGS: /* We will special-case args in this state. */ ++ case CA_LIST_ARGS: ++ if (token.type == CPP_CLOSE_PAREN) ++ attr_state = CA_LIST_CONT; ++ break; ++ case CA_LIST_CONT: ++ if (token.type == CPP_COMMA) ++ attr_state = CA_BR2; /* Back to the list outer. */ ++ else ++ attr_state = CA_NONE; ++ break; ++ } ++ return attr_state; ++} ++ + /* Create a new main C++ lexer, the lexer that gets tokens from the + preprocessor, and also create the main parser. */ + +@@ -724,6 +809,8 @@ cp_lexer_new_main (void) + c_common_no_more_pch (); + + cp_lexer *lexer = cp_lexer_alloc (); ++ enum clang_attr_state attr_state = CA_NONE; ++ + /* Put the first token in the buffer. */ + cp_token *tok = lexer->buffer->quick_push (token); + +@@ -846,8 +933,14 @@ cp_lexer_new_main (void) + if (tok->type == CPP_PRAGMA_EOL) + cp_lexer_handle_early_pragma (lexer); + ++ attr_state = cp_lexer_attribute_state (*tok, attr_state); + tok = vec_safe_push (lexer->buffer, cp_token ()); +- cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok); ++ unsigned int flags = C_LEX_STRING_NO_JOIN; ++ /* If we are processing clang-style attribute args, lex numbers as ++ potential version strings; NN .. NN.MM .. NN.MM.OO */ ++ if (attr_state == CA_CA_ARGS) ++ flags |= C_LEX_NUMBER_AS_STRING; ++ cp_lexer_get_preprocessor_token (flags, tok); + } + + XDELETEVEC (raw_data_buf); +@@ -1078,7 +1171,7 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token) + { + static int is_extern_c = 0; + +- /* Get a new token from the preprocessor. */ ++ /* Get a new token from the preprocessor. */ + token->type + = c_lex_with_flags (&token->u.value, &token->location, &token->flags, + flags); +@@ -23991,9 +24084,16 @@ cp_parser_init_declarator (cp_parser* parser, + "an % specification is not allowed " + "on a function-definition"); + if (attributes) +- error_at (attributes_start_token->location, +- "attributes are not allowed " +- "on a function-definition"); ++ { ++ /* When we are allowing attributes in this position, then add ++ them to the prefix ones. */ ++ if (flag_allow_ext_attr_placement) ++ prefix_attributes = chainon (prefix_attributes, attributes); ++ else ++ error_at (attributes_start_token->location, ++ "attributes are not allowed " ++ "on a function-definition"); ++ } + /* This is a function-definition. */ + *function_definition_p = true; + +@@ -30616,6 +30716,91 @@ cp_parser_gnu_attributes_opt (cp_parser* parser) + return attributes; + } + ++/* Parse the arguments list for a clang attribute. */ ++static tree ++cp_parser_clang_attribute (cp_parser *parser, tree/*attr_id*/) ++{ ++ /* Each entry can be : ++ identifier ++ identifier=N.MM.Z ++ identifier="string" ++ followed by ',' or ) for the last entry*/ ++ ++ matching_parens parens; ++ if (!parens.require_open (parser)) ++ return NULL; ++ ++ bool save_translate_strings_p = parser->translate_strings_p; ++ parser->translate_strings_p = false; ++ tree attr_args = NULL_TREE; ++ cp_token *token; ++ do ++ { ++ tree name = NULL_TREE; ++ tree value = NULL_TREE; ++ ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_NAME) ++ name = token->u.value; ++ else if (token->type == CPP_KEYWORD) ++ name = ridpointers[(int) token->keyword]; ++ else if (token->flags & NAMED_OP) ++ name = get_identifier (cpp_type2name (token->type, token->flags)); ++ else ++ { ++ /* FIXME: context-sensitive for that attrib. */ ++ error_at (token->location, "expected an attribute keyword"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ cp_lexer_consume_token (parser->lexer); ++ ++ if (cp_lexer_next_token_is (parser->lexer, CPP_EQ)) ++ { ++ cp_lexer_consume_token (parser->lexer); /* eat the '=' */ ++ if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ token = cp_lexer_peek_token (parser->lexer); ++ if (token->type == CPP_STRING) ++ value = cp_parser_string_literal (parser, /*translate=*/false, ++ /*wide_ok=*/false); ++ else ++ { ++ value = token->u.value; ++ cp_lexer_consume_token (parser->lexer); ++ } ++ } ++ /* else value is missing. */ ++ } ++ else if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) ++ && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ++ { ++ error_at (token->location, "expected %<,%>, %<=%> or %<)%>"); ++ cp_parser_skip_to_closing_parenthesis (parser, ++ /*recovering=*/true, ++ /*or_comma=*/false, ++ /*consume_paren=*/false); ++ attr_args = error_mark_node; ++ break; ++ } ++ if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) ++ cp_lexer_consume_token (parser->lexer); ++ tree t = tree_cons (value, name, NULL_TREE); ++ attr_args = chainon (attr_args, t); ++ } while (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)); ++ ++ parser->translate_strings_p = save_translate_strings_p; ++ if (!parens.require_close (parser)) ++ return error_mark_node; ++ ++ return attr_args; ++} ++ + /* Parse a GNU attribute-list. + + attribute-list: +@@ -30675,9 +30860,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +- /* If it's an `(', then parse the attribute arguments. */ +- if (token->type == CPP_OPEN_PAREN) ++ if (token->type == CPP_OPEN_PAREN ++ && attribute_clang_form_p (identifier)) ++ arguments = cp_parser_clang_attribute (parser, identifier); ++ else if (token->type == CPP_OPEN_PAREN) + { ++ /* If it's an `(', then parse the attribute arguments. */ + vec *vec; + int attr_flag = (attribute_takes_identifier_p (identifier) + ? id_attr : normal_attr); +@@ -30694,12 +30882,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */) + arguments = build_tree_list_vec (vec); + release_tree_vector (vec); + } +- /* Save the arguments away. */ +- TREE_VALUE (attribute) = arguments; + } + + if (arguments != error_mark_node) + { ++ /* Save the arguments away. */ ++ TREE_VALUE (attribute) = arguments; + /* Add this attribute to the list. */ + TREE_CHAIN (attribute) = attribute_list; + attribute_list = attribute; +diff --git a/gcc/cumulative-args.h b/gcc/cumulative-args.h +new file mode 100644 +index 00000000000..b60928e37f9 +--- /dev/null ++++ b/gcc/cumulative-args.h +@@ -0,0 +1,20 @@ ++#ifndef GCC_CUMULATIVE_ARGS_H ++#define GCC_CUMULATIVE_ARGS_H ++ ++#if CHECKING_P ++ ++struct cumulative_args_t { void *magic; void *p; }; ++ ++#else /* !CHECKING_P */ ++ ++/* When using a GCC build compiler, we could use ++ __attribute__((transparent_union)) to get cumulative_args_t function ++ arguments passed like scalars where the ABI would mandate a less ++ efficient way of argument passing otherwise. However, that would come ++ at the cost of less type-safe !CHECKING_P compilation. */ ++ ++union cumulative_args_t { void *p; }; ++ ++#endif /* !CHECKING_P */ ++ ++#endif /* GCC_CUMULATIVE_ARGS_H */ +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 14a78fd236f..c9197eb9bca 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -757,7 +757,7 @@ Objective-C and Objective-C++ Dialects}. + -freg-struct-return -fshort-enums -fshort-wchar + -fverbose-asm -fpack-struct[=@var{n}] + -fleading-underscore -ftls-model=@var{model} +--fstack-reuse=@var{reuse_level} ++-fstack-reuse=@var{reuse_level} -fstack-use-cumulative-args + -ftrampolines -ftrampoline-impl=@r{[}stack@r{|}heap@r{]} + -ftrapv -fwrapv + -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} +@@ -986,7 +986,7 @@ Objective-C and Objective-C++ Dialects}. + -twolevel_namespace -umbrella -undefined + -unexported_symbols_list -weak_reference_mismatches + -whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} +--mkernel -mone-byte-bool} ++-mkernel -mone-byte-bool -munreachable-traps} + + @emph{DEC Alpha Options} (@ref{DEC Alpha Options}) + @gccoptlist{-mno-fp-regs -msoft-float +@@ -19660,6 +19660,17 @@ the behavior of older compilers in which temporaries' stack space is + not reused, the aggressive stack reuse can lead to runtime errors. This + option is used to control the temporary stack reuse optimization. + ++@opindex fstack_use_cumulative_args ++@item -fstack-use-cumulative-args ++This option instructs the compiler to use the ++@code{cumulative_args_t}-based stack layout target hooks, ++@code{TARGET_FUNCTION_ARG_BOUNDARY_CA} and ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA}. If a given target does ++not define these hooks, the default behaviour is to fallback to using ++the standard non-@code{_CA} variants instead. Certain targets (such as ++AArch64 Darwin) require using the more advanced @code{_CA}-based ++hooks: For these targets this option should be enabled by default. ++ + @opindex ftrapv + @item -ftrapv + This option generates traps for signed overflow on addition, subtraction, +@@ -24000,7 +24011,7 @@ Permissible names are: @samp{arm7tdmi}, @samp{arm7tdmi-s}, @samp{arm710t}, + @samp{neoverse-n1}, @samp{neoverse-n2}, @samp{neoverse-v1}, @samp{xscale}, + @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}, @samp{fa526}, @samp{fa626}, + @samp{fa606te}, @samp{fa626te}, @samp{fmp626}, @samp{fa726te}, @samp{star-mc1}, +-@samp{xgene1}. ++@samp{xgene1}, @samp{apple-m1}, @samp{apple-m2}, @samp{apple-m3}. + + Additionally, this option can specify that GCC should tune the performance + of the code for a big.LITTLE system. Permissible names are: +@@ -26060,6 +26071,11 @@ without that switch. Using this switch may require recompiling all + other modules in a program, including system libraries. Use this + switch to conform to a non-default data model. + ++@opindex munreachable-traps ++@item -munreachable-traps ++Causes @code{__builtin_unreachable} to be rendered as a trap. This is the ++default for all Darwin architectures. ++ + @opindex mfix-and-continue + @opindex ffix-and-continue + @opindex findirect-data +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index a96700c0d38..5f37aebc37c 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -1074,6 +1074,10 @@ also define the hook to @code{default_promote_function_mode_always_promote} + if you would like to apply the same rules given by @code{PROMOTE_MODE}. + @end deftypefn + ++@deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE_CA (cumulative_args_t, @var{function_arg_info}, @var{const_tree}, int *@var{}, @var{int}) ++Like @code{promote_function_mode}, but takes a cumulative_args pointer and a current arg to supply the input. ++@end deftypefn ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -4471,6 +4475,16 @@ with the specified mode and type. The default hook returns + @code{PARM_BOUNDARY} for all arguments. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument alignment, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}. ++@end deftypefn ++ + @deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY (machine_mode @var{mode}, const_tree @var{type}) + Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY}, + which is the default value for this hook. You can define this hook to +@@ -4478,6 +4492,16 @@ return a different value if an argument size must be rounded to a larger + value. + @end deftypefn + ++@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca}) ++This is the @code{cumulative_args_t}-based version of ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more ++fine-grained control over argument size rounding, e.g. depending on whether ++it is a named argument or not, or any other criteria that you choose to ++place in the @var{ca} structure. ++ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. ++@end deftypefn ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -12855,6 +12879,11 @@ This target hook can be used to generate a target-specific code + If selftests are enabled, run any selftests for this target. + @end deftypefn + ++@deftypefn {Target Hook} bool TARGET_UNREACHABLE_SHOULD_TRAP (void) ++This hook should return @code{true} if the target wants @code{__builtin_unreachable} to expand to a trap or @code{abort ()}. ++ The default value is false. ++@end deftypefn ++ + @deftypefn {Target Hook} bool TARGET_MEMTAG_CAN_TAG_ADDRESSES () + True if the backend architecture naturally supports ignoring some region + of pointers. This feature means that @option{-fsanitize=hwaddress} can +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index eccc4d88493..d563cc3747f 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -951,6 +951,8 @@ applied. + + @hook TARGET_PROMOTE_FUNCTION_MODE + ++@hook TARGET_PROMOTE_FUNCTION_MODE_CA ++ + @defmac PARM_BOUNDARY + Normal alignment required for function parameters on the stack, in + bits. All stack parameters receive at least this much alignment +@@ -3435,8 +3437,12 @@ required. + + @hook TARGET_FUNCTION_ARG_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_BOUNDARY_CA ++ + @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY + ++@hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA ++ + @defmac FUNCTION_ARG_REGNO_P (@var{regno}) + A C expression that is nonzero if @var{regno} is the number of a hard + register in which function arguments are sometimes passed. This does +@@ -8122,6 +8128,8 @@ maintainer is familiar with. + + @hook TARGET_RUN_TARGET_SELFTESTS + ++@hook TARGET_UNREACHABLE_SHOULD_TRAP ++ + @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES + + @hook TARGET_MEMTAG_TAG_SIZE +diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in +index d748869a2a5..40f4ec0a681 100644 +--- a/gcc/exec-tool.in ++++ b/gcc/exec-tool.in +@@ -23,6 +23,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" + ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" + ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" + ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ++ORIGINAL_LLD_FOR_TARGET="@ORIGINAL_LLD_FOR_TARGET@" ++ORIGINAL_CLASSIC_LD_FOR_TARGET="@ORIGINAL_CLASSIC_LD_FOR_TARGET@" + ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" + ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" + ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@" +@@ -39,24 +41,41 @@ case "$invoked" in + dir=gas + ;; + collect-ld) +- # Check -fuse-ld=bfd and -fuse-ld=gold +- case " $* " in +- *\ -fuse-ld=bfd\ *) +- original=$ORIGINAL_LD_BFD_FOR_TARGET +- ;; +- *\ -fuse-ld=gold\ *) +- original=$ORIGINAL_LD_GOLD_FOR_TARGET +- ;; +- *) +- # when using a linker plugin, gcc will always pass '-plugin' as the +- # first or second option to the linker. +- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then +- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET +- else +- original=$ORIGINAL_LD_FOR_TARGET +- fi +- ;; +- esac ++ # when using a linker plugin, gcc will always pass '-plugin' as the ++ # first or second option to the linker. ++ if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then ++ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET ++ else ++ original=$ORIGINAL_LD_FOR_TARGET ++ fi ++ # Check -fuse-ld=bfd, -fuse-ld=gold and -fuse-ld=classic ++ # Remove -fuse-ld=classic from the command line ++ for arg do ++ # temporarily, remove the arg. ++ shift ++ case $arg in ++ -fuse-ld=bfd) ++ original=$ORIGINAL_LD_BFD_FOR_TARGET ++ ;; ++ -fuse-ld=gold) ++ original=$ORIGINAL_LD_GOLD_FOR_TARGET ++ ;; ++ -fuse-ld=lld) ++ original=$ORIGINAL_LLD_FOR_TARGET ++ # We want to remove this from the command line; by the slightly ++ # obtuse mechanism of not putting it back. ++ continue ++ ;; ++ -fuse-ld=classic) ++ original=$ORIGINAL_CLASSIC_LD_FOR_TARGET ++ # As for lld. ++ continue ++ ;; ++ *) ;; ++ esac ++ # if we want to keep the arg, put it back. ++ set -- "$@" "$arg" ++ done + prog=ld-new$exeext + if test "$original" = ../gold/ld-new$exeext; then + dir=gold +diff --git a/gcc/explow.cc b/gcc/explow.cc +index 7799a98053b..ec51215b924 100644 +--- a/gcc/explow.cc ++++ b/gcc/explow.cc +@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see + #include "langhooks.h" + #include "except.h" + #include "dojump.h" ++#include "calls.h" + #include "explow.h" + #include "expr.h" + #include "stringpool.h" +@@ -864,6 +865,16 @@ promote_function_mode (const_tree type, machine_mode mode, int *punsignedp, + return mode; + } + } ++ ++machine_mode ++promote_function_mode (cumulative_args_t args_so_far, function_arg_info arg, ++ const_tree funtype, int *punsignedp , int for_return) ++{ ++ return targetm.calls.promote_function_mode_ca (args_so_far, arg, funtype, ++ punsignedp, for_return); ++// return promote_function_mode (arg.type, arg.mode, punsignedp, funtype, for_return); ++} ++ + /* Return the mode to use to store a scalar of TYPE and MODE. + PUNSIGNEDP points to the signedness of the type and may be adjusted + to show what signedness to use on extension operations. */ +diff --git a/gcc/explow.h b/gcc/explow.h +index ad8450563eb..772f9e6cdd5 100644 +--- a/gcc/explow.h ++++ b/gcc/explow.h +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_EXPLOW_H + #define GCC_EXPLOW_H + ++#include "calls.h" /* for cummulative args stuff. */ ++ + /* Return a memory reference like MEMREF, but which is known to have a + valid address. */ + extern rtx validize_mem (rtx); +@@ -51,8 +53,13 @@ extern rtx force_not_mem (rtx); + + /* Return mode and signedness to use when an argument or result in the + given mode is promoted. */ +-extern machine_mode promote_function_mode (const_tree, machine_mode, int *, +- const_tree, int); ++machine_mode promote_function_mode (const_tree, machine_mode, int *, ++ const_tree, int); ++ ++/* Return mode and signedness to use when an argument or result in the ++ given mode is promoted. */ ++machine_mode promote_function_mode (cumulative_args_t, function_arg_info, ++ const_tree, int *, int); + + /* Return mode and signedness to use when an object in the given mode + is promoted. */ +diff --git a/gcc/function.cc b/gcc/function.cc +index 2ad430a8013..7d037a9c749 100644 +--- a/gcc/function.cc ++++ b/gcc/function.cc +@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3. If not see + #include "varasm.h" + #include "except.h" + #include "dojump.h" +-#include "explow.h" + #include "calls.h" ++#include "explow.h" + #include "expr.h" + #include "optabs-tree.h" + #include "output.h" +@@ -2450,7 +2450,10 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + else if (DECL_CHAIN (parm)) + data->arg.named = 1; /* Not the last non-variadic parm. */ + else if (targetm.calls.strict_argument_naming (all->args_so_far)) +- data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ { ++ data->arg.named = 1; /* Only variadic ones are unnamed. */ ++ data->arg.last_named = 1; ++ } + else + data->arg.named = 0; /* Treat as variadic. */ + +@@ -2492,9 +2495,12 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, + + /* Find mode as it is passed by the ABI. */ + unsignedp = TYPE_UNSIGNED (data->arg.type); +- data->arg.mode +- = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, +- TREE_TYPE (current_function_decl), 0); ++// data->arg.mode ++// = promote_function_mode (data->arg.type, data->arg.mode, &unsignedp, ++// TREE_TYPE (current_function_decl), 0); ++ data->arg.mode = promote_function_mode (all->args_so_far, data->arg, ++ TREE_TYPE (current_function_decl), ++ &unsignedp, 0); + } + + /* A subroutine of assign_parms. Invoke setup_incoming_varargs. */ +@@ -2507,6 +2513,7 @@ assign_parms_setup_varargs (struct assign_parm_data_all *all, + + function_arg_info last_named_arg = data->arg; + last_named_arg.named = true; ++ last_named_arg.last_named = true; + targetm.calls.setup_incoming_varargs (all->args_so_far, last_named_arg, + &varargs_pretend_bytes, no_rtl); + +@@ -2615,7 +2622,9 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all, + + locate_and_pad_parm (data->arg.mode, data->arg.type, in_regs, + all->reg_parm_stack_space, +- entry_parm ? data->partial : 0, current_function_decl, ++ entry_parm ? data->partial : 0, ++ all->args_so_far, ++ current_function_decl, + &all->stack_args_size, &data->locate); + + /* Update parm_stack_boundary if this parameter is passed in the +@@ -3924,7 +3933,8 @@ gimplify_parameters (gimple_seq *cleanup) + if (data.arg.pass_by_reference) + { + tree type = TREE_TYPE (data.arg.type); +- function_arg_info orig_arg (type, data.arg.named); ++ function_arg_info orig_arg (type, data.arg.named, ++ data.arg.last_named); + if (reference_callee_copied (&all.args_so_far_v, orig_arg)) + { + tree local, t; +@@ -4027,6 +4037,7 @@ gimplify_parameters (gimple_seq *cleanup) + void + locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + int reg_parm_stack_space, int partial, ++ cumulative_args_t ca, + tree fndecl ATTRIBUTE_UNUSED, + struct args_size *initial_offset_ptr, + struct locate_and_pad_arg_data *locate) +@@ -4064,9 +4075,23 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, + ? arg_size_in_bytes (type) + : size_int (GET_MODE_SIZE (passed_mode))); + where_pad = targetm.calls.function_arg_padding (passed_mode, type); +- boundary = targetm.calls.function_arg_boundary (passed_mode, type); +- round_boundary = targetm.calls.function_arg_round_boundary (passed_mode, +- type); ++ ++ if (flag_stack_use_cumulative_args) ++ { ++ boundary = targetm.calls.function_arg_boundary_ca (passed_mode, ++ type, ++ ca); ++ round_boundary = targetm.calls.function_arg_round_boundary_ca ++ (passed_mode, type, ca); ++ } ++ else ++ { ++ boundary = targetm.calls.function_arg_boundary (passed_mode, ++ type); ++ round_boundary = targetm.calls.function_arg_round_boundary ++ (passed_mode, type); ++ } ++ + locate->where_pad = where_pad; + + /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */ +diff --git a/gcc/function.h b/gcc/function.h +index 2260d6704ec..a6230714ef3 100644 +--- a/gcc/function.h ++++ b/gcc/function.h +@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see + #ifndef GCC_FUNCTION_H + #define GCC_FUNCTION_H + ++#include "cumulative-args.h" + + /* Stack of pending (incomplete) sequences saved by `start_sequence'. + Each element describes one pending sequence. +@@ -686,6 +687,7 @@ extern bool aggregate_value_p (const_tree, const_tree); + extern bool use_register_for_decl (const_tree); + extern gimple_seq gimplify_parameters (gimple_seq *); + extern void locate_and_pad_parm (machine_mode, tree, int, int, int, ++ cumulative_args_t, + tree, struct args_size *, + struct locate_and_pad_arg_data *); + extern void generate_setjmp_warnings (void); +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index bacf24d2425..d76baeadaad 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -443,9 +443,8 @@ typedef struct { + /* _Float128 is defined as a basic type, so max_align_t must be + sufficiently aligned for it. This code must work in C++, so we + use __float128 here; that is only available on some +- architectures, but only on i386 is extra alignment needed for +- __float128. */ +-#ifdef __i386__ ++ architectures. */ ++#if defined(__i386__) || (__APPLE__ && __aarch64__) + __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); + #endif + } max_align_t; +diff --git a/gcc/opts.cc b/gcc/opts.cc +index 5e7b77dab2f..9149b72121e 100644 +--- a/gcc/opts.cc ++++ b/gcc/opts.cc +@@ -3349,6 +3349,7 @@ common_handle_option (struct gcc_options *opts, + break; + + case OPT_fuse_ld_bfd: ++ case OPT_fuse_ld_classic: + case OPT_fuse_ld_gold: + case OPT_fuse_ld_lld: + case OPT_fuse_ld_mold: +diff --git a/gcc/target.def b/gcc/target.def +index 6c7cdc8126b..2783eca57b6 100644 +--- a/gcc/target.def ++++ b/gcc/target.def +@@ -4829,6 +4829,13 @@ if you would like to apply the same rules given by @code{PROMOTE_MODE}.", + const_tree funtype, int for_return), + default_promote_function_mode) + ++DEFHOOK ++(promote_function_mode_ca, ++ "Like @code{promote_function_mode}, but takes a cumulative_args pointer \ ++ and a current arg to supply the input.", ++ machine_mode, (cumulative_args_t, function_arg_info, const_tree, int *, int), ++ default_promote_function_mode_ca) ++ + DEFHOOK + (promote_prototypes, + "This target hook returns @code{true} if an argument declared in a\n\ +@@ -5291,6 +5298,18 @@ with the specified mode and type. The default hook returns\n\ + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_boundary) + ++DEFHOOK ++(function_arg_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument alignment, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_boundary_ca) ++ + DEFHOOK + (function_arg_round_boundary, + "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\ +@@ -5300,6 +5319,18 @@ value.", + unsigned int, (machine_mode mode, const_tree type), + default_function_arg_round_boundary) + ++DEFHOOK ++(function_arg_round_boundary_ca, ++ "This is the @code{cumulative_args_t}-based version of\n\ ++@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more\n\ ++fine-grained control over argument size rounding, e.g. depending on whether\n\ ++it is a named argument or not, or any other criteria that you choose to\n\ ++place in the @var{ca} structure.\n\ ++\n\ ++The default hook will call @code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}.", ++ unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca), ++ default_function_arg_round_boundary_ca) ++ + /* Return the diagnostic message string if function without a prototype + is not allowed for this 'val' argument; NULL otherwise. */ + DEFHOOK +@@ -7575,6 +7606,16 @@ DEFHOOKPOD + The default value is NULL.", + const char *, NULL) + ++/* This value represents whether __builtin_unreachable should be expanded ++ as a trap instruction (or an abort() if the trap is not available). */ ++DEFHOOK ++(unreachable_should_trap, ++ "This hook should return @code{true} if the target wants \ ++ @code{__builtin_unreachable} to expand to a trap or @code{abort ()}.\n\ ++ The default value is false.", ++ bool, (void), ++ hook_bool_void_false) ++ + /* Close the 'struct gcc_target' definition. */ + HOOK_VECTOR_END (C90_EMPTY_HACK) + +diff --git a/gcc/target.h b/gcc/target.h +index c9c7b52b40f..3dfe60bef89 100644 +--- a/gcc/target.h ++++ b/gcc/target.h +@@ -51,22 +51,8 @@ + #include "insn-codes.h" + #include "tm.h" + #include "hard-reg-set.h" +- +-#if CHECKING_P +- +-struct cumulative_args_t { void *magic; void *p; }; +- +-#else /* !CHECKING_P */ +- +-/* When using a GCC build compiler, we could use +- __attribute__((transparent_union)) to get cumulative_args_t function +- arguments passed like scalars where the ABI would mandate a less +- efficient way of argument passing otherwise. However, that would come +- at the cost of less type-safe !CHECKING_P compilation. */ +- +-union cumulative_args_t { void *p; }; +- +-#endif /* !CHECKING_P */ ++#include "tree-core.h" ++#include "cumulative-args.h" + + /* Target properties of _BitInt(N) type. _BitInt(N) is to be represented + as series of abi_limb_mode CEIL (N, GET_MODE_PRECISION (abi_limb_mode)) +diff --git a/gcc/targhooks.cc b/gcc/targhooks.cc +index c79458e374e..cca7e3946d0 100644 +--- a/gcc/targhooks.cc ++++ b/gcc/targhooks.cc +@@ -162,6 +162,15 @@ default_promote_function_mode_always_promote (const_tree type, + return promote_mode (type, mode, punsignedp); + } + ++machine_mode ++default_promote_function_mode_ca (cumulative_args_t, function_arg_info arg, ++ const_tree funtype, int *punsignedp, ++ int for_return) ++{ ++ return promote_function_mode (arg.type, arg.mode, punsignedp, ++ funtype, for_return); ++} ++ + machine_mode + default_cc_modes_compatible (machine_mode m1, machine_mode m2) + { +@@ -889,6 +898,14 @@ default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_boundary (mode, type); ++} ++ + unsigned int + default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + const_tree type ATTRIBUTE_UNUSED) +@@ -896,6 +913,14 @@ default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED, + return PARM_BOUNDARY; + } + ++unsigned int ++default_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED, ++ const_tree type ATTRIBUTE_UNUSED, ++ cumulative_args_t ca ATTRIBUTE_UNUSED) ++{ ++ return default_function_arg_round_boundary (mode, type); ++} ++ + void + hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED) + { +diff --git a/gcc/targhooks.h b/gcc/targhooks.h +index f16b58798c2..56f5680abb4 100644 +--- a/gcc/targhooks.h ++++ b/gcc/targhooks.h +@@ -34,6 +34,9 @@ extern machine_mode default_promote_function_mode (const_tree, machine_mode, + extern machine_mode default_promote_function_mode_always_promote + (const_tree, machine_mode, int *, const_tree, int); + ++extern machine_mode default_promote_function_mode_ca ++ (cumulative_args_t, function_arg_info, const_tree, int *, int); ++ + extern machine_mode default_cc_modes_compatible (machine_mode, + machine_mode); + +@@ -161,6 +164,12 @@ extern unsigned int default_function_arg_boundary (machine_mode, + const_tree); + extern unsigned int default_function_arg_round_boundary (machine_mode, + const_tree); ++extern unsigned int default_function_arg_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); ++extern unsigned int default_function_arg_round_boundary_ca (machine_mode, ++ const_tree, ++ cumulative_args_t ca); + extern bool hook_bool_const_rtx_commutative_p (const_rtx, int); + extern rtx default_function_value (const_tree, const_tree, bool); + extern HARD_REG_SET default_zero_call_used_regs (HARD_REG_SET); +diff --git a/libgcc/config.host b/libgcc/config.host +index 6a88ee5a2dd..ae16a6b8da9 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -85,7 +85,7 @@ m32c*-*-*) + cpu_type=m32c + tmake_file=t-fdpbit + ;; +-aarch64*-*-*) ++aarch64*-*-* | arm64*-*-*) + cpu_type=aarch64 + ;; + alpha*-*-*) +@@ -280,7 +280,7 @@ case ${host} in + if test "x$enable_darwin_at_rpath" = "xyes"; then + tmake_file="$tmake_file t-darwin-rpath " + fi +- extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a" ++ extra_parts="crt3.o crttms.o crttme.o libemutls_w.a " + ;; + *-*-dragonfly*) + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" +@@ -386,8 +386,8 @@ case ${host} in + esac + + case ${host} in +-*-*-darwin* | *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | \ +- *-*-solaris2*) ++i[34567]86-*-darwin* | powerpc*-*-darwin* | x86_64-*-darwin* | \ ++*-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2*) + enable_execute_stack=enable-execute-stack-mprotect.c + ;; + i[34567]86-*-mingw* | x86_64-*-mingw*) +@@ -412,6 +412,15 @@ aarch64*-*-elf | aarch64*-*-rtems*) + md_unwind_def_header=aarch64/aarch64-unwind-def.h + md_unwind_header=aarch64/aarch64-unwind.h + ;; ++aarch64*-*-darwin*) ++ extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ tmake_file="${tmake_file} ${cpu_type}/t-aarch64" ++ tmake_file="${tmake_file} ${cpu_type}/t-lse" ++ tmake_file="${tmake_file} t-crtfm t-dfprules" ++ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp" ++ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" ++ tmake_file="${tmake_file} ${cpu_type}/t-no-eh" ++ ;; + aarch64*-*-freebsd*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" +@@ -740,14 +749,14 @@ i[34567]86-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" +- extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a" + tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + x86_64-*-darwin*) + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" + tm_file="$tm_file i386/darwin-lib.h" + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o" +- extra_parts="$extra_parts crtfastmath.o libheapt_w.a" ++ extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a" + tmake_file="${tmake_file} i386/t-heap-trampoline" + ;; + i[34567]86-*-elfiamcu) +@@ -1221,12 +1230,14 @@ powerpc-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc64-*-darwin*) + # We build the darwin10 EH shim for Rosetta (running on x86 machines). + tm_file="$tm_file i386/darwin-lib.h" + tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts libd10-uwfef.a " + extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc*-*-freebsd*) +diff --git a/libgcc/config/aarch64/__arm_sme_state.S b/libgcc/config/aarch64/__arm_sme_state.S +index cf0194008b1..cca5cbd4327 100644 +--- a/libgcc/config/aarch64/__arm_sme_state.S ++++ b/libgcc/config/aarch64/__arm_sme_state.S +@@ -30,14 +30,19 @@ + - Takes no argument. + - Returns SME state in x0 and TPIDR2_EL0 in x1. */ + +-HIDDEN (__aarch64_have_sme) ++HIDDEN (ASMNAME (__aarch64_have_sme)) + +-variant_pcs (__arm_sme_state) ++variant_pcs (ASMNAME (__arm_sme_state)) + +-ENTRY (__arm_sme_state) ++ENTRY (ASMNAME (__arm_sme_state)) + /* Check if SME is available. */ +- adrp x1, __aarch64_have_sme +- ldrb w1, [x1, :lo12:__aarch64_have_sme] ++#ifdef __APPLE__ ++ adrp x1, ASMNAME (__aarch64_have_sme)@PAGE ++ ldrb w1, [x1, ASMNAME (__aarch64_have_sme)@PAGEOFF] ++#else ++ adrp x1, ASMNAME (__aarch64_have_sme) ++ ldrb w1, [x1, :lo12:ASMNAME (__aarch64_have_sme)] ++#endif + cbz w1, L(nosme) + + /* Expose the bottom 2 bits of svcr (SM, ZA) in x0 and set the +@@ -52,4 +57,4 @@ L(nosme): + mov x0, 0 + mov x1, 0 + ret +-END (__arm_sme_state) ++ENDm ASMNAME(__arm_sme_state) +diff --git a/libgcc/config/aarch64/__arm_tpidr2_restore.S b/libgcc/config/aarch64/__arm_tpidr2_restore.S +index 7730c7ef20d..2676ae0a2d1 100644 +--- a/libgcc/config/aarch64/__arm_tpidr2_restore.S ++++ b/libgcc/config/aarch64/__arm_tpidr2_restore.S +@@ -31,9 +31,9 @@ + - Does not return a value. + - Can abort on failure (then registers are not preserved). */ + +-variant_pcs (__arm_tpidr2_restore) ++variant_pcs (ASMNAME (__arm_tpidr2_restore)) + +-ENTRY (__arm_tpidr2_restore) ++ENTRY (ASMNAME (__arm_tpidr2_restore)) + .inst 0xd53bd0ae /* mrs x14, tpidr2_el0 */ + cbnz x14, L(fail) + +@@ -85,5 +85,5 @@ L(fail): + str x16, [sp, 16] + .cfi_rel_offset 46, 16 + .inst 0xd503467f /* smstop */ +- bl abort +-END (__arm_tpidr2_restore) ++ bl ASMNAME (abort) ++ENDm ASMNAME (__arm_tpidr2_restore) +diff --git a/libgcc/config/aarch64/__arm_tpidr2_save.S b/libgcc/config/aarch64/__arm_tpidr2_save.S +index beeedaa98a2..ae5684bc4a2 100644 +--- a/libgcc/config/aarch64/__arm_tpidr2_save.S ++++ b/libgcc/config/aarch64/__arm_tpidr2_save.S +@@ -35,10 +35,15 @@ HIDDEN (__aarch64_have_sme) + + variant_pcs (__arm_tpidr2_save) + +-ENTRY (__arm_tpidr2_save) ++ENTRY (ASMNAME (__arm_tpidr2_save)) + /* Check if SME is available. */ +- adrp x14, __aarch64_have_sme +- ldrb w14, [x14, :lo12:__aarch64_have_sme] ++#if __APPLE__ ++ adrp x14, ASMNAME (__aarch64_have_sme)@PAGE ++ ldrb w14, [x14, ASMNAME (__aarch64_have_sme)@PAGEOFF] ++#else ++ adrp x14, ASMNAME (__aarch64_have_sme) ++ ldrb w14, [x14, :lo12:ASMNAME (__aarch64_have_sme)] ++#endif + cbz w14, L(end) + + .inst 0xd53bd0ae /* mrs x14, tpidr2_el0 */ +@@ -92,10 +97,18 @@ L(fail): + str x16, [sp, 16] + .cfi_rel_offset 46, 16 + .inst 0xd503467f /* smstop */ +- bl abort +-END (__arm_tpidr2_save) +- ++ bl ASMNAME (abort) ++ENDm ASMNAME (__arm_tpidr2_save) ++ ++ GLOBAL(ASMNAME (__libgcc_arm_tpidr2_save)) ++ HIDDEN (ASMNAME (__libgcc_arm_tpidr2_save)) ++#if __APPLE__ ++ .text ++ .p2align 4 ++ASMNAME (__libgcc_arm_tpidr2_save): ++ b ASMNAME (__arm_tpidr2_save) ++#else + /* Hidden alias used by __arm_za_disable. */ +-.global __libgcc_arm_tpidr2_save +-HIDDEN (__libgcc_arm_tpidr2_save) +-.set __libgcc_arm_tpidr2_save, __arm_tpidr2_save ++.set ASMNAME (__libgcc_arm_tpidr2_save), ASMNAME (__arm_tpidr2_save) ++#endif ++ +diff --git a/libgcc/config/aarch64/__arm_za_disable.S b/libgcc/config/aarch64/__arm_za_disable.S +index e223a893634..9201c124ca0 100644 +--- a/libgcc/config/aarch64/__arm_za_disable.S ++++ b/libgcc/config/aarch64/__arm_za_disable.S +@@ -31,16 +31,33 @@ + - Does not return a value. + - Can abort on failure (then registers are not preserved). */ + +-HIDDEN (__aarch64_have_sme) ++HIDDEN (ASMNAME(__aarch64_have_sme)) + +-HIDDEN (__libgcc_arm_tpidr2_save) ++HIDDEN (ASMNAME(__libgcc_arm_tpidr2_save)) + +-variant_pcs (__arm_za_disable) ++variant_pcs (ASMNAME(__arm_za_disable)) + +-ENTRY (__arm_za_disable) ++GLOBAL (ASMNAME (__libgcc_arm_za_disable)) ++HIDDEN (ASMNAME (__libgcc_arm_za_disable)) ++#if __APPLE__ ++ .text ++ .p2align 4 ++ASMNAME (__libgcc_arm_za_disable): ++ b ASMNAME (__arm_za_disable) ++#else ++/* Hidden alias used by the unwinder. */ ++.set ASMNAME (__libgcc_arm_za_disable), ASMNAME (__arm_za_disable) ++#endif ++ ++ENTRY (ASMNAME (__arm_za_disable)) + /* Check if SME is available. */ +- adrp x14, __aarch64_have_sme +- ldrb w14, [x14, :lo12:__aarch64_have_sme] ++#if __APPLE__ ++ adrp x14, ASMNAME (__aarch64_have_sme)@PAGE ++ ldrb w14, [x14, ASMNAME (__aarch64_have_sme)@PAGEOFF] ++#else ++ adrp x14, ASMNAME (__aarch64_have_sme) ++ ldrb w14, [x14, :lo12:ASMNAME (__aarch64_have_sme)] ++#endif + cbz w14, L(end) + + .inst 0xd53bd0ae /* mrs x14, tpidr2_el0 */ +@@ -52,7 +69,7 @@ ENTRY (__arm_za_disable) + .cfi_rel_offset x29, 0 + .cfi_rel_offset x30, 8 + mov x29, sp +- bl __libgcc_arm_tpidr2_save ++ bl ASMNAME (__libgcc_arm_tpidr2_save) + .inst 0xd51bd0bf /* msr tpidr2_el0, xzr */ + .inst 0xd503447f /* smstop za */ + ldp x29, x30, [sp], 16 +@@ -62,9 +79,5 @@ ENTRY (__arm_za_disable) + AUTIASP + L(end): + ret +-END (__arm_za_disable) ++ENDm ASMNAME(__arm_za_disable) + +-/* Hidden alias used by the unwinder. */ +-.global __libgcc_arm_za_disable +-HIDDEN (__libgcc_arm_za_disable) +-.set __libgcc_arm_za_disable, __arm_za_disable +diff --git a/libgcc/config/aarch64/aarch64-asm.h b/libgcc/config/aarch64/aarch64-asm.h +index 346100fec07..b0106ea4d26 100644 +--- a/libgcc/config/aarch64/aarch64-asm.h ++++ b/libgcc/config/aarch64/aarch64-asm.h +@@ -27,8 +27,6 @@ + + #include "auto-target.h" + +-#define L(label) .L ## label +- + /* Marking variant PCS symbol references is important for PLT calls + otherwise it is for documenting the PCS in the symbol table. */ + #ifdef HAVE_AS_VARIANT_PCS +@@ -68,12 +66,31 @@ + # define GCS_FLAG 0 + #endif + ++#define PASTE2(a, b) PASTE2a(a, b) ++#define PASTE2a(a, b) a ## b ++ ++#ifdef __USER_LABEL_PREFIX__ ++# define ASMNAME(name) PASTE2(__USER_LABEL_PREFIX__, name) ++#else ++# define ASMNAME(name) name ++#endif ++ + #ifdef __ELF__ ++#define L(label) .L ## label + #define HIDDEN(name) .hidden name ++#define GLOBAL(name) .global name + #define SYMBOL_SIZE(name) .size name, .-name + #define SYMBOL_TYPE(name, _type) .type name, _type ++#elif __APPLE__ ++#define L(label) L ## label ++#define HIDDEN(name) .private_extern name ++#define GLOBAL(name) .globl name ++#define SYMBOL_SIZE(name) ++#define SYMBOL_TYPE(name, _type) + #else ++#define L(label) .L ## label + #define HIDDEN(name) ++#define GLOBAL(name) .global name + #define SYMBOL_SIZE(name) + #define SYMBOL_TYPE(name, _type) + #endif +@@ -103,18 +120,24 @@ GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG|GCS_FLAG) + # endif + #endif + +-#define ENTRY_ALIGN(name, align) \ +- .global name; \ +- SYMBOL_TYPE(name, %function); \ +- .balign align; \ +- name: \ +- .cfi_startproc; \ +- BTI_C ++.macro ENTRY_ALIGNP2m, name, align ++ .text ++ .p2align \align ++ GLOBAL (\name) ++ SYMBOL_TYPE(\name, %function) ++\name: ++ .cfi_startproc ++ BTI_C ++.endm + +-#define ENTRY(name) ENTRY_ALIGN(name, 16) ++#define ENTRY(name) ENTRY_ALIGNP2m name, 4 + + #define END(name) \ + .cfi_endproc; \ + SYMBOL_SIZE(name) + ++.macro ENDm, name ++ .cfi_endproc ++ SYMBOL_SIZE (\name) ++.endm + #endif +diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S +index cb24011d883..e32ba199095 100644 +--- a/libgcc/config/aarch64/lse.S ++++ b/libgcc/config/aarch64/lse.S +@@ -66,7 +66,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #endif + + /* Declare the symbol gating the LSE implementations. */ +- HIDDEN(__aarch64_have_lse_atomics) ++ HIDDEN (ASMNAME (__aarch64_have_lse_atomics)) + + /* Turn size and memory model defines into mnemonic fragments. */ + #if SIZE == 1 +@@ -89,6 +89,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # error + #endif + ++#undef L + #if MODEL == 1 + # define SUFF _relax + # define A +@@ -171,32 +172,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define tmp3 14 + #define tmp4 13 + +-/* Start and end a function. */ +-.macro STARTFN name +- .text +- .balign 16 +- .globl \name +- HIDDEN(\name) +- SYMBOL_TYPE(\name, %function) +- .cfi_startproc +-\name: +-.endm +- +-.macro ENDFN name +- .cfi_endproc +- SYMBOL_SIZE(\name) +-.endm +- + /* Branch to LABEL if LSE is disabled. */ + .macro JUMP_IF_NOT_LSE label +- adrp x(tmp0), __aarch64_have_lse_atomics +- ldrb w(tmp0), [x(tmp0), :lo12:__aarch64_have_lse_atomics] ++#if __APPLE__ ++ adrp x(tmp0), ASMNAME (__aarch64_have_lse_atomics)@PAGE ++ ldrb w(tmp0), [x(tmp0), ASMNAME (__aarch64_have_lse_atomics)@PAGEOFF] ++#else ++ adrp x(tmp0), ASMNAME (__aarch64_have_lse_atomics) ++ ldrb w(tmp0), [x(tmp0), :lo12:ASMNAME (__aarch64_have_lse_atomics)] ++#endif + cbz w(tmp0), \label + .endm + + #ifdef L_cas + +-STARTFN NAME(cas) ++ENTRY (ASMNAME (NAME(cas))) + JUMP_IF_NOT_LSE 8f + + #if SIZE < 16 +@@ -249,7 +239,7 @@ STARTFN NAME(cas) + + #endif + +-ENDFN NAME(cas) ++ENDm ASMNAME (NAME(cas)) + #endif + + #ifdef L_swp +@@ -259,7 +249,7 @@ ENDFN NAME(cas) + # define SWP .inst 0x38208020 + B + N + #endif + +-STARTFN NAME(swp) ++ENTRY (ASMNAME (NAME (swp))) + JUMP_IF_NOT_LSE 8f + + SWP /* s(0), s(0), [x1] */ +@@ -272,7 +262,7 @@ STARTFN NAME(swp) + BARRIER + ret + +-ENDFN NAME(swp) ++ENDm ASMNAME (NAME (swp)) + #endif + + #if defined(L_ldadd) || defined(L_ldclr) \ +@@ -303,7 +293,7 @@ ENDFN NAME(swp) + # define LDOP .inst 0x38200020 + OPN + B + N + #endif + +-STARTFN NAME(LDNM) ++ENTRY (ASMNAME (NAME (LDNM))) + JUMP_IF_NOT_LSE 8f + + LDOP /* s(0), s(0), [x1] */ +@@ -317,5 +307,5 @@ STARTFN NAME(LDNM) + BARRIER + ret + +-ENDFN NAME(LDNM) ++ENDm ASMNAME (NAME (LDNM)) + #endif +diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h +index cc3116d6366..882b376fcd2 100644 +--- a/libgcc/config/aarch64/sfp-machine.h ++++ b/libgcc/config/aarch64/sfp-machine.h +@@ -124,6 +124,27 @@ void __sfp_handle_exceptions (int); + + + /* Define ALIASNAME as a strong alias for NAME. */ ++#if defined __APPLE__ ++/* Mach-O doesn't support aliasing, so we build a secondary function for ++ the alias - we need to do a bit of a dance to find out what the type of ++ the arguments is and then apply that to the secondary function. ++ If these functions ever return anything but CMPtype we need to revisit ++ this... */ ++typedef float alias_HFtype __attribute__ ((mode (HF))); ++typedef float alias_SFtype __attribute__ ((mode (SF))); ++typedef float alias_DFtype __attribute__ ((mode (DF))); ++typedef float alias_TFtype __attribute__ ((mode (TF))); ++#define ALIAS_SELECTOR \ ++ CMPtype (*) (alias_HFtype, alias_HFtype): (alias_HFtype) 0, \ ++ CMPtype (*) (alias_SFtype, alias_SFtype): (alias_SFtype) 0, \ ++ CMPtype (*) (alias_DFtype, alias_DFtype): (alias_DFtype) 0, \ ++ CMPtype (*) (alias_TFtype, alias_TFtype): (alias_TFtype) 0 ++#define strong_alias(name, aliasname) \ ++ CMPtype aliasname (__typeof (_Generic (name, ALIAS_SELECTOR)) a, \ ++ __typeof (_Generic (name, ALIAS_SELECTOR)) b) \ ++ { return name (a, b); } ++#else + # define strong_alias(name, aliasname) _strong_alias(name, aliasname) + # define _strong_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); ++#endif +diff --git a/libgcc/config/aarch64/t-darwin b/libgcc/config/aarch64/t-darwin +new file mode 100644 +index 00000000000..3f6c3163f48 +--- /dev/null ++++ b/libgcc/config/aarch64/t-darwin +@@ -0,0 +1,5 @@ ++# Ensure we have a suitable minimum OS version. ++ ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=11.0 ++ ++LIB2_SIDITI_CONV_FUNCS = yes +diff --git a/libgcc/config/libbid/bid_binarydecimal.c b/libgcc/config/libbid/bid_binarydecimal.c +index daca2ffe306..fe76e52b4c1 100644 +--- a/libgcc/config/libbid/bid_binarydecimal.c ++++ b/libgcc/config/libbid/bid_binarydecimal.c +@@ -412,7 +412,7 @@ BID_BINARY80LDOUBLE; + } + + #define unpack_binary80(x,s,e,c,t,zero,inf,nan) \ +-{ BID_BINARY80LDOUBLE x_in; \ ++{ BID_BINARY80LDOUBLE x_in = {0}; \ + x_in.f = x; \ + c = x_in.i.lo4 + ((UINT64)x_in.i.lo3 << 16) + \ + ((UINT64)x_in.i.lo2 << 32) + ((UINT64)x_in.i.lo1 << 48); \ +diff --git a/libgcobol/configure.tgt b/libgcobol/configure.tgt +index a23925295b6..10f288d9423 100644 +--- a/libgcobol/configure.tgt ++++ b/libgcobol/configure.tgt +@@ -26,7 +26,7 @@ + LIBGCOBOL_SUPPORTED=no + + case "${target}" in +- aarch64*-*-linux*) ++ aarch64*-*-linux* | aarch64-*-darwin*) + LIBGCOBOL_SUPPORTED=yes + ;; + powerpc64le-*-linux*) +diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S +index 2d73e773065..a29fb26d0fc 100644 +--- a/libitm/config/aarch64/sjlj.S ++++ b/libitm/config/aarch64/sjlj.S +@@ -57,10 +57,19 @@ + + .text + .align 2 ++#if __ELF__ + .global _ITM_beginTransaction + .type _ITM_beginTransaction, %function + + _ITM_beginTransaction: ++ ++#elif __MACH__ ++ .global __ITM_beginTransaction ++ ++__ITM_beginTransaction: ++ ++#endif ++ + cfi_startproc + CFI_PAC_KEY + PAC_AND_BTI +@@ -84,8 +93,13 @@ _ITM_beginTransaction: + + /* Invoke GTM_begin_transaction with the struct we just built. */ + mov x1, sp ++#if __ELF__ + bl GTM_begin_transaction +- ++#elif __MACH__ ++ bl _GTM_begin_transaction ++#else ++#error "unexpected object format" ++#endif + /* Return; we don't need to restore any of the call-saved regs. */ + ldp x29, x30, [sp], 11*16 + cfi_adjust_cfa_offset(-11*16) +@@ -95,14 +109,23 @@ _ITM_beginTransaction: + CFI_PAC_TOGGLE + ret + cfi_endproc ++#if __ELF__ + .size _ITM_beginTransaction, . - _ITM_beginTransaction ++#endif + + .align 2 ++#if __ELF__ + .global GTM_longjmp + .hidden GTM_longjmp + .type GTM_longjmp, %function + + GTM_longjmp: ++ ++#elif __MACH__ ++ .private_extern _GTM_longjmp ++ ++_GTM_longjmp: ++#endif + /* The first parameter becomes the return value (x0). + The third parameter is ignored for now. */ + cfi_startproc +@@ -126,7 +149,9 @@ GTM_longjmp: + CFI_PAC_TOGGLE + br x30 + cfi_endproc ++#if __ELF__ + .size GTM_longjmp, . - GTM_longjmp ++#endif + + /* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ + #define FEATURE_1_AND 0xc0000000 +diff --git a/libitm/configure.tgt b/libitm/configure.tgt +index a929e3f46fc..23cc5917a6e 100644 +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -50,7 +50,7 @@ fi + # Map the target cpu to an ARCH sub-directory. At the same time, + # work out any special compilation flags as necessary. + case "${target_cpu}" in +- aarch64*) ARCH=aarch64 ;; ++ aarch64* | arm64*) ARCH=aarch64 ;; + alpha*) ARCH=alpha ;; + rs6000 | powerpc*) + XCFLAGS="${XCFLAGS} -mhtm" +diff --git a/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d b/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d +index 64b5bed43b1..0cf0a0d9523 100644 +--- a/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d ++++ b/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d +@@ -30,8 +30,13 @@ module core.internal.gc.impl.conservative.gc; + + /***************************************************/ + version = COLLECT_PARALLEL; // parallel scanning +-version (Posix) +- version = COLLECT_FORK; ++version (GNU) ++{ ++ version (linux) ++ version = COLLECT_FORK; // uses clone(), battle tested and reliable ++} ++else version (Posix) ++ version = COLLECT_FORK; + + import core.internal.gc.bits; + import core.internal.gc.os; diff --git a/Patches/git-branchless/0.10.0-build.patch b/Patches/git-branchless/0.10.0-build.patch new file mode 100644 index 0000000000000..e15b6c2df73b5 --- /dev/null +++ b/Patches/git-branchless/0.10.0-build.patch @@ -0,0 +1,1094 @@ +From 98b2c86918044ee50de2c4f85a6adb140912a1c2 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Sun, 14 Sep 2025 22:26:40 -0400 +Subject: [PATCH] fix build issue with rust 1.89.0 and bump git2 to 0.20 + +Signed-off-by: Rui Chen +--- + Cargo.lock | 390 ++++++++++++++------------ + Cargo.toml | 4 +- + flake.lock | 6 +- + git-branchless-invoke/src/lib.rs | 8 +- + git-branchless-lib/Cargo.toml | 2 +- + git-branchless-lib/src/core/dag.rs | 27 +- + git-branchless-lib/src/git/repo.rs | 2 +- + git-branchless-move/src/lib.rs | 4 +- + git-branchless-revset/src/builtins.rs | 2 +- + git-branchless-revset/src/pattern.rs | 4 +- + git-branchless/Cargo.toml | 2 +- + rust-toolchain.toml | 2 +- + 12 files changed, 247 insertions(+), 206 deletions(-) + +diff --git a/Cargo.lock b/Cargo.lock +index ecd3295..d0f7a3a 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -2,6 +2,17 @@ + # It is not intended for manual editing. + version = 3 + ++[[package]] ++name = "abomonation_derive" ++version = "0.5.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e50e2a046af56a864c62d97b7153fda72c596e646be1b0c7963736821f6e1efa" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "synstructure", ++] ++ + [[package]] + name = "addr2line" + version = "0.21.0" +@@ -129,6 +140,12 @@ version = "1.0.86" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + ++[[package]] ++name = "arbitrary" ++version = "1.4.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" ++ + [[package]] + name = "arrayvec" + version = "0.7.4" +@@ -167,7 +184,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -231,9 +248,12 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + + [[package]] + name = "bitflags" +-version = "2.5.0" ++version = "2.9.4" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" ++checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" ++dependencies = [ ++ "serde", ++] + + [[package]] + name = "block-buffer" +@@ -442,7 +462,7 @@ dependencies = [ + "heck", + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -678,7 +698,7 @@ version = "0.27.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" + dependencies = [ +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "crossterm_winapi", + "libc", + "mio", +@@ -810,7 +830,7 @@ dependencies = [ + "ident_case", + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -832,7 +852,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" + dependencies = [ + "darling_core 0.20.8", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -987,7 +1007,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -1008,7 +1028,7 @@ dependencies = [ + "darling 0.20.8", + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -1040,126 +1060,6 @@ dependencies = [ + "windows-sys 0.52.0", + ] + +-[[package]] +-name = "esl01-atomicfile" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "73020f11f072c66f335e7273c3509220c6c06db8e2f27e55f487d484c03c3ae2" +-dependencies = [ +- "tempfile", +- "tracing", +-] +- +-[[package]] +-name = "esl01-dag" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2cf33c6d93aebed1408b6e6379d3083ea0dc48b3256eba858e24ff1ad0910c5c" +-dependencies = [ +- "anyhow", +- "async-trait", +- "bitflags 1.3.2", +- "byteorder", +- "esl01-dag-types", +- "esl01-drawdag", +- "esl01-indexedlog", +- "esl01-mincode", +- "esl01-minibytes", +- "esl01-nonblocking", +- "esl01-renderdag", +- "esl01-vlqencoding", +- "fail", +- "fs2", +- "futures", +- "indexmap 1.9.3", +- "rand 0.8.5", +- "serde", +- "tempfile", +- "thiserror", +- "tracing", +-] +- +-[[package]] +-name = "esl01-dag-types" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cd764f3e0441aa076242c5591e8c70e9250ece9a0298b9a118a636c97121608f" +-dependencies = [ +- "esl01-minibytes", +- "serde", +-] +- +-[[package]] +-name = "esl01-drawdag" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "58614a84fe70f0dcf8e4126950606bbe9339bf931002791e34bae0fab0a8c9a7" +- +-[[package]] +-name = "esl01-indexedlog" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "ca189b77364e351675e0ac8274a8df0be0c88d3e66103d81f9bd265371f49389" +-dependencies = [ +- "byteorder", +- "esl01-atomicfile", +- "esl01-minibytes", +- "esl01-vlqencoding", +- "fs2", +- "hex", +- "libc", +- "memmap", +- "once_cell", +- "rand 0.8.5", +- "tempfile", +- "tracing", +- "twox-hash", +-] +- +-[[package]] +-name = "esl01-mincode" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "238b140f1ced88489a0b3770b3a7613237d73919d6e4c9b8d295c44142264482" +-dependencies = [ +- "byteorder", +- "esl01-vlqencoding", +- "serde", +-] +- +-[[package]] +-name = "esl01-minibytes" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "0068579525ef038377d270f31c6cf5062da1ac99f34c7bc83b31bc61aa701ad1" +-dependencies = [ +- "bytes", +- "memmap", +- "serde", +-] +- +-[[package]] +-name = "esl01-nonblocking" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2a2c37087d9d14a9d6bdf80e61dc7757763839cb528f6b866256b1773dd378ba" +- +-[[package]] +-name = "esl01-renderdag" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3a1840969ab8be31e186bb6d2f672d586dcd203dd4019a80dc1277a14686eca9" +-dependencies = [ +- "bitflags 1.3.2", +- "itertools 0.10.5", +-] +- +-[[package]] +-name = "esl01-vlqencoding" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "0ad8aca6f16078736d5e7762a45125eaa685dfe47155f4a72ec301f13a5f0749" +- + [[package]] + name = "eyre" + version = "0.6.12" +@@ -1257,6 +1157,12 @@ version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + ++[[package]] ++name = "futures" ++version = "0.1.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" ++ + [[package]] + name = "futures" + version = "0.3.30" +@@ -1313,7 +1219,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -1334,6 +1240,7 @@ version = "0.3.31" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" + dependencies = [ ++ "futures 0.1.31", + "futures-channel", + "futures-core", + "futures-io", +@@ -1402,7 +1309,6 @@ dependencies = [ + "color-eyre", + "console", + "cursive_core", +- "esl01-dag", + "eyre", + "fslock", + "git-branchless-hook", +@@ -1430,6 +1336,7 @@ dependencies = [ + "rayon", + "regex", + "rusqlite", ++ "sapling-dag", + "scm-diff-editor", + "thiserror", + "tracing", +@@ -1502,9 +1409,8 @@ dependencies = [ + "console", + "criterion", + "cursive", +- "esl01-dag", + "eyre", +- "futures", ++ "futures 0.3.30", + "git2", + "indicatif", + "insta", +@@ -1515,6 +1421,7 @@ dependencies = [ + "rayon", + "regex", + "rusqlite", ++ "sapling-dag", + "scm-record", + "serde", + "shell-words", +@@ -1532,13 +1439,13 @@ dependencies = [ + name = "git-branchless-move" + version = "0.10.0" + dependencies = [ +- "esl01-dag", + "eyre", + "git-branchless-lib", + "git-branchless-opts", + "git-branchless-revset", + "insta", + "rayon", ++ "sapling-dag", + "tracing", + ] + +@@ -1547,13 +1454,13 @@ name = "git-branchless-navigation" + version = "0.10.0" + dependencies = [ + "cursive", +- "esl01-dag", + "eyre", + "git-branchless-lib", + "git-branchless-opts", + "git-branchless-revset", + "git-branchless-smartlog", + "itertools 0.13.0", ++ "sapling-dag", + "skim", + "tracing", + ] +@@ -1573,7 +1480,6 @@ dependencies = [ + name = "git-branchless-query" + version = "0.10.0" + dependencies = [ +- "esl01-dag", + "eyre", + "git-branchless-invoke", + "git-branchless-lib", +@@ -1581,6 +1487,7 @@ dependencies = [ + "git-branchless-revset", + "insta", + "itertools 0.13.0", ++ "sapling-dag", + "tracing", + ] + +@@ -1590,7 +1497,6 @@ version = "0.10.0" + dependencies = [ + "cursive", + "cursive_buffered_backend", +- "esl01-dag", + "eyre", + "git-branchless-invoke", + "git-branchless-lib", +@@ -1599,6 +1505,7 @@ dependencies = [ + "insta", + "itertools 0.13.0", + "rayon", ++ "sapling-dag", + "scm-record", + "tracing", + ] +@@ -1611,9 +1518,8 @@ dependencies = [ + "chrono", + "chrono-english", + "chronoutil", +- "esl01-dag", + "eyre", +- "futures", ++ "futures 0.3.30", + "git-branchless-lib", + "git-branchless-opts", + "glob", +@@ -1624,6 +1530,7 @@ dependencies = [ + "lazy_static", + "rayon", + "regex", ++ "sapling-dag", + "serde_json", + "thiserror", + "tracing", +@@ -1635,13 +1542,13 @@ version = "0.10.0" + dependencies = [ + "bstr", + "chrono", +- "esl01-dag", + "eyre", + "git-branchless-lib", + "git-branchless-opts", + "git-branchless-revset", + "insta", + "rayon", ++ "sapling-dag", + "shell-words", + "tempfile", + "tracing", +@@ -1652,13 +1559,13 @@ name = "git-branchless-smartlog" + version = "0.10.0" + dependencies = [ + "cursive_core", +- "esl01-dag", + "eyre", + "git-branchless-invoke", + "git-branchless-lib", + "git-branchless-opts", + "git-branchless-revset", + "insta", ++ "sapling-dag", + "tracing", + ] + +@@ -1668,7 +1575,6 @@ version = "0.10.0" + dependencies = [ + "clap 4.5.9", + "cursive_core", +- "esl01-dag", + "eyre", + "git-branchless-invoke", + "git-branchless-lib", +@@ -1681,6 +1587,7 @@ dependencies = [ + "lazy_static", + "rayon", + "regex", ++ "sapling-dag", + "serde", + "serde_json", + "tempfile", +@@ -1697,7 +1604,6 @@ dependencies = [ + "clap 4.5.9", + "crossbeam", + "cursive", +- "esl01-dag", + "eyre", + "fslock", + "git-branchless-invoke", +@@ -1711,6 +1617,7 @@ dependencies = [ + "maplit", + "num_cpus", + "rayon", ++ "sapling-dag", + "scm-bisect", + "serde", + "serde_json", +@@ -1751,16 +1658,16 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] + name = "git2" +-version = "0.19.0" ++version = "0.20.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" ++checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" + dependencies = [ +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "libc", + "libgit2-sys", + "log", +@@ -1902,8 +1809,11 @@ version = "2.2.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" + dependencies = [ ++ "arbitrary", + "equivalent", + "hashbrown 0.14.3", ++ "rayon", ++ "serde", + ] + + [[package]] +@@ -2063,9 +1973,9 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + + [[package]] + name = "libgit2-sys" +-version = "0.17.0+1.8.1" ++version = "0.18.0+1.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" ++checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" + dependencies = [ + "cc", + "libc", +@@ -2085,7 +1995,7 @@ version = "0.1.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" + dependencies = [ +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "libc", + ] + +@@ -2186,13 +2096,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + + [[package]] +-name = "memmap" +-version = "0.7.0" ++name = "memmap2" ++version = "0.5.10" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" ++checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" + dependencies = [ + "libc", +- "winapi", + ] + + [[package]] +@@ -2612,9 +2521,9 @@ dependencies = [ + + [[package]] + name = "proc-macro2" +-version = "1.0.79" ++version = "1.0.101" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" ++checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" + dependencies = [ + "unicode-ident", + ] +@@ -2627,7 +2536,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" + dependencies = [ + "bit-set", + "bit-vec", +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "lazy_static", + "num-traits", + "rand 0.8.5", +@@ -2768,7 +2677,7 @@ version = "0.27.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3" + dependencies = [ +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "cassowary", + "compact_str", + "crossterm 0.27.0", +@@ -2894,7 +2803,7 @@ version = "0.29.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" + dependencies = [ +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", +@@ -2914,7 +2823,7 @@ version = "0.38.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" + dependencies = [ +- "bitflags 2.5.0", ++ "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys", +@@ -2954,6 +2863,127 @@ dependencies = [ + "winapi-util", + ] + ++[[package]] ++name = "sapling-atomicfile" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4d91162bc6659937f86b9c85f0e8c31b605063ac8923b21cac7c482cbfda4407" ++dependencies = [ ++ "tempfile", ++ "tracing", ++] ++ ++[[package]] ++name = "sapling-dag" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c90cc3ba9ec3cfa19cd9125d5b9df37750b3bb3e0e70462c0183ec7747a1702f" ++dependencies = [ ++ "anyhow", ++ "async-trait", ++ "bitflags 2.9.4", ++ "byteorder", ++ "fail", ++ "fs2", ++ "futures 0.3.30", ++ "indexmap 2.2.6", ++ "rand 0.8.5", ++ "sapling-dag-types", ++ "sapling-drawdag", ++ "sapling-indexedlog", ++ "sapling-mincode", ++ "sapling-minibytes", ++ "sapling-nonblocking", ++ "sapling-renderdag", ++ "sapling-vlqencoding", ++ "serde", ++ "tempfile", ++ "thiserror", ++ "tracing", ++] ++ ++[[package]] ++name = "sapling-dag-types" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5ec65200f1f90d5719296a011e45ba61a29942b60fae7c3c5f90ca87656ff68d" ++dependencies = [ ++ "abomonation_derive", ++ "sapling-minibytes", ++ "serde", ++] ++ ++[[package]] ++name = "sapling-drawdag" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "761cba3dfbbbec1ddf1132711df226dd969c8e3620b8849dc3a8bb7be4a2032c" ++ ++[[package]] ++name = "sapling-indexedlog" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7e5f65ae962b8d889abb3db5cc8bf81bde40282055ece4617dac5e74eac0b790" ++dependencies = [ ++ "byteorder", ++ "fs2", ++ "hex", ++ "libc", ++ "memmap2", ++ "once_cell", ++ "rand 0.8.5", ++ "sapling-atomicfile", ++ "sapling-minibytes", ++ "sapling-vlqencoding", ++ "tempfile", ++ "tracing", ++ "twox-hash", ++ "winapi", ++] ++ ++[[package]] ++name = "sapling-mincode" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "172868196a99be4fa7118ad15cedc5c1d0e4a73f29e48b5efdcd5939a683c973" ++dependencies = [ ++ "byteorder", ++ "sapling-vlqencoding", ++ "serde", ++] ++ ++[[package]] ++name = "sapling-minibytes" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "51437efe022fb6d20f0873e99da2d0f856b7be819359988ddb86bc0db3cf5c2e" ++dependencies = [ ++ "bytes", ++ "memmap2", ++ "serde", ++] ++ ++[[package]] ++name = "sapling-nonblocking" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5190595f39a20f732f54e969974aac6840731b20ab85fcac010728f0e1735c69" ++ ++[[package]] ++name = "sapling-renderdag" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "edffb89cab87bd0901c5749d576f5d37a1f34e05160e936f463f4e94cc447b61" ++dependencies = [ ++ "bitflags 2.9.4", ++] ++ ++[[package]] ++name = "sapling-vlqencoding" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0971439fe0def46ccd69141e5f8c23c2b8d6e88606ddda6ea0670b5691686c4d" ++ + [[package]] + name = "scanlex" + version = "0.1.4" +@@ -3028,7 +3058,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -3240,7 +3270,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2ff9eaf853dec4c8802325d8b6d3dffa86cc707fd7a1a4cdbf416e13b061787a" + dependencies = [ + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -3299,7 +3329,7 @@ dependencies = [ + "proc-macro2", + "quote", + "rustversion", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -3315,15 +3345,27 @@ dependencies = [ + + [[package]] + name = "syn" +-version = "2.0.58" ++version = "2.0.106" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" ++checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" + dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", + ] + ++[[package]] ++name = "synstructure" ++version = "0.12.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn 1.0.109", ++ "unicode-xid", ++] ++ + [[package]] + name = "sys-info" + version = "0.9.1" +@@ -3394,22 +3436,22 @@ dependencies = [ + + [[package]] + name = "thiserror" +-version = "1.0.63" ++version = "1.0.69" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" ++checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" + dependencies = [ + "thiserror-impl", + ] + + [[package]] + name = "thiserror-impl" +-version = "1.0.63" ++version = "1.0.69" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" ++checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -3517,7 +3559,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] + + [[package]] +@@ -3799,7 +3841,7 @@ dependencies = [ + "once_cell", + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + "wasm-bindgen-shared", + ] + +@@ -3821,7 +3863,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + "wasm-bindgen-backend", + "wasm-bindgen-shared", + ] +@@ -4119,5 +4161,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" + dependencies = [ + "proc-macro2", + "quote", +- "syn 2.0.58", ++ "syn 2.0.106", + ] +diff --git a/Cargo.toml b/Cargo.toml +index 1c806fa..90f879a 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -51,7 +51,7 @@ cursive = { version = "0.20.0", default-features = false, features = [ + ] } + cursive_buffered_backend = "0.6.1" + cursive_core = "0.3.7" +-eden_dag = { package = "esl01-dag", version = "0.3.0" } ++eden_dag = { package = "sapling-dag", version = "0.1.0" } + eyre = "0.6.12" + fslock = "0.2.1" + futures = "0.3.30" +@@ -69,7 +69,7 @@ git-branchless-smartlog = { version = "0.10.0", path = "git-branchless-smartlog" + git-branchless-submit = { version = "0.10.0", path = "git-branchless-submit" } + git-branchless-test = { version = "0.10.0", path = "git-branchless-test" } + git-branchless-undo = { version = "0.10.0", path = "git-branchless-undo" } +-git2 = { version = "0.19.0", default-features = false } ++git2 = { version = "0.20.0", default-features = false } + glob = "0.3.0" + indexmap = "2.2.6" + indicatif = { version = "0.17.8", features = ["improved_unicode"] } +diff --git a/flake.lock b/flake.lock +index a0bc47e..8f8d5cd 100644 +--- a/flake.lock ++++ b/flake.lock +@@ -2,11 +2,11 @@ + "nodes": { + "nixpkgs": { + "locked": { +- "lastModified": 1708373374, +- "narHash": "sha256-yEyDvDj/YQc4GOZa/cXx6YUzexD8uv1rUvD6SJVr6UI=", ++ "lastModified": 1756636162, ++ "narHash": "sha256-mBecwgUTWRgClJYqcF+y4O1bY8PQHqeDpB+zsAn+/zA=", + "owner": "NixOS", + "repo": "nixpkgs", +- "rev": "93e1c2d08467d1117ebac45689469613a9fe8453", ++ "rev": "37ff64b7108517f8b6ba5705ee5085eac636a249", + "type": "github" + }, + "original": { +diff --git a/git-branchless-invoke/src/lib.rs b/git-branchless-invoke/src/lib.rs +index eee43ff..a6cd973 100644 +--- a/git-branchless-invoke/src/lib.rs ++++ b/git-branchless-invoke/src/lib.rs +@@ -117,12 +117,12 @@ fn install_tracing(effects: Effects) -> eyre::Result { + + #[instrument] + fn install_libgit2_tracing() { +- fn git_trace(level: git2::TraceLevel, msg: &str) { +- info!("[{:?}]: {}", level, msg); ++ fn git_trace(level: git2::TraceLevel, msg: &[u8]) { ++ info!("[{:?}]: {}", level, String::from_utf8_lossy(msg)); + } + +- if !git2::trace_set(git2::TraceLevel::Trace, git_trace) { +- warn!("Failed to install libgit2 tracing"); ++ if let Err(err) = git2::trace_set(git2::TraceLevel::Trace, git_trace) { ++ warn!("Failed to install libgit2 tracing: {err}"); + } + } + +diff --git a/git-branchless-lib/Cargo.toml b/git-branchless-lib/Cargo.toml +index 15d8ee5..968e5be 100644 +--- a/git-branchless-lib/Cargo.toml ++++ b/git-branchless-lib/Cargo.toml +@@ -6,7 +6,7 @@ keywords = ["git"] + license = "MIT OR Apache-2.0" + name = "git-branchless-lib" + repository = "https://github.com/arxanas/git-branchless" +-rust-version = "1.64.0" ++rust-version = "1.82" + version = "0.10.0" + + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +diff --git a/git-branchless-lib/src/core/dag.rs b/git-branchless-lib/src/core/dag.rs +index 8178054..3c1c28c 100644 +--- a/git-branchless-lib/src/core/dag.rs ++++ b/git-branchless-lib/src/core/dag.rs +@@ -8,9 +8,8 @@ use std::future::Future; + use std::sync::{Arc, Mutex}; + + use async_trait::async_trait; +-use eden_dag::namedag::MemNameDag; +-use eden_dag::nameset::hints::Hints; + use eden_dag::ops::{DagPersistent, Parents}; ++use eden_dag::set::hints::Hints; + use eden_dag::{DagAlgorithm, Group, VertexListWithOptions, VertexOptions}; + use eyre::Context; + use futures::{StreamExt, TryStreamExt}; +@@ -24,26 +23,26 @@ use crate::git::{Commit, MaybeZeroOid, NonZeroOid, Repo, Time}; + + use super::repo_ext::RepoReferencesSnapshot; + +-impl From for eden_dag::VertexName { ++impl From for eden_dag::Vertex { + fn from(oid: NonZeroOid) -> Self { +- eden_dag::VertexName::copy_from(oid.as_bytes()) ++ eden_dag::Vertex::copy_from(oid.as_bytes()) + } + } + +-impl TryFrom for MaybeZeroOid { ++impl TryFrom for MaybeZeroOid { + type Error = eyre::Error; + +- fn try_from(value: eden_dag::VertexName) -> Result { ++ fn try_from(value: eden_dag::Vertex) -> Result { + let oid = git2::Oid::from_bytes(value.as_ref())?; + let oid = MaybeZeroOid::from(oid); + Ok(oid) + } + } + +-impl TryFrom for NonZeroOid { ++impl TryFrom for NonZeroOid { + type Error = eyre::Error; + +- fn try_from(value: eden_dag::VertexName) -> Result { ++ fn try_from(value: eden_dag::Vertex) -> Result { + let oid = MaybeZeroOid::try_from(value)?; + let oid = NonZeroOid::try_from(oid)?; + Ok(oid) +@@ -51,10 +50,10 @@ impl TryFrom for NonZeroOid { + } + + /// A compact set of commits, backed by the Eden DAG. +-pub type CommitSet = eden_dag::NameSet; ++pub type CommitSet = eden_dag::Set; + + /// A vertex referring to a single commit in the Eden DAG. +-pub type CommitVertex = eden_dag::VertexName; ++pub type CommitVertex = eden_dag::Vertex; + + impl From for CommitSet { + fn from(oid: NonZeroOid) -> Self { +@@ -123,8 +122,8 @@ impl Parents for GitParentsBlocking { + async fn hint_subdag_for_insertion( + &self, + _heads: &[CommitVertex], +- ) -> Result { +- Ok(MemNameDag::new()) ++ ) -> Result { ++ Ok(eden_dag::MemDag::new()) + } + } + +@@ -290,7 +289,7 @@ impl Dag { + + let master_group_options = { + let mut options = VertexOptions::default(); +- options.highest_group = Group::MASTER; ++ options.desired_group = Group::MASTER; + options + }; + let master_heads = self +@@ -449,7 +448,7 @@ impl Dag { + #[instrument] + pub fn set_count(&self, commit_set: &CommitSet) -> eden_dag::Result { + let result = self.run_blocking(commit_set.count())?; +- Ok(result) ++ Ok(result.try_into().unwrap()) + } + + /// Wrapper around NameSet method. +diff --git a/git-branchless-lib/src/git/repo.rs b/git-branchless-lib/src/git/repo.rs +index eb3ede0..ee6a6e1 100644 +--- a/git-branchless-lib/src/git/repo.rs ++++ b/git-branchless-lib/src/git/repo.rs +@@ -630,7 +630,7 @@ impl Repo { + /// Get the directory where the DAG for the repository is stored. + #[instrument] + pub fn get_dag_dir(&self) -> Result { +- // Updated from `dag` to `dag2` for `esl01-dag==0.3.0`, since it may ++ // Updated from `dag` to `dag2` for `sapling-dag==0.1.0`, since it may + // not be backwards-compatible. + Ok(self.get_branchless_dir()?.join("dag2")) + } +diff --git a/git-branchless-move/src/lib.rs b/git-branchless-move/src/lib.rs +index 86b081d..4dc6a1b 100644 +--- a/git-branchless-move/src/lib.rs ++++ b/git-branchless-move/src/lib.rs +@@ -16,7 +16,7 @@ use std::collections::HashMap; + use std::fmt::Write; + use std::time::SystemTime; + +-use eden_dag::VertexName; ++use eden_dag::Vertex; + use lib::core::repo_ext::RepoExt; + use lib::util::{ExitCode, EyreExitOr}; + use rayon::ThreadPoolBuilder; +@@ -40,7 +40,7 @@ use lib::git::{GitRunInfo, NonZeroOid, Repo}; + #[instrument] + fn resolve_base_commit( + dag: &Dag, +- merge_base_oid: Option, ++ merge_base_oid: Option, + oid: NonZeroOid, + ) -> eyre::Result { + let bases = match merge_base_oid { +diff --git a/git-branchless-revset/src/builtins.rs b/git-branchless-revset/src/builtins.rs +index ec865e6..ccf8bc0 100644 +--- a/git-branchless-revset/src/builtins.rs ++++ b/git-branchless-revset/src/builtins.rs +@@ -1,5 +1,5 @@ + use bstr::ByteSlice; +-use eden_dag::nameset::hints::Hints; ++use eden_dag::set::hints::Hints; + + use lib::core::dag::CommitSet; + use lib::core::eventlog::{EventLogDb, EventReplayer}; +diff --git a/git-branchless-revset/src/pattern.rs b/git-branchless-revset/src/pattern.rs +index 81db346..39769e9 100644 +--- a/git-branchless-revset/src/pattern.rs ++++ b/git-branchless-revset/src/pattern.rs +@@ -4,7 +4,7 @@ use std::sync::{Arc, Mutex}; + use chrono::{Local, NaiveDateTime}; + use chrono_english::{parse_date_string, parse_duration, DateError, Dialect, Interval}; + use chronoutil::RelativeDuration; +-use eden_dag::nameset::hints::{Flags, Hints}; ++use eden_dag::set::hints::{Flags, Hints}; + use futures::StreamExt; + use lib::core::dag::{CommitSet, CommitVertex}; + use lib::core::effects::{Effects, OperationType}; +@@ -153,7 +153,7 @@ pub(super) fn make_pattern_matcher_set( + let _effects = effects; + + let len = self.commits_to_match.count().await?; +- progress.notify_progress(0, len); ++ progress.notify_progress(0, len.try_into().unwrap()); + + let stream = self.commits_to_match.iter().await?; + let commit_oids = stream.collect::>().await; +diff --git a/git-branchless/Cargo.toml b/git-branchless/Cargo.toml +index 830f42c..8e78ace 100644 +--- a/git-branchless/Cargo.toml ++++ b/git-branchless/Cargo.toml +@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0" + name = "git-branchless" + readme = "../README.md" + repository = "https://github.com/arxanas/git-branchless" +-rust-version = "1.74" ++rust-version = "1.82" + version = "0.10.0" + + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +diff --git a/rust-toolchain.toml b/rust-toolchain.toml +index 94ed871..59822bf 100644 +--- a/rust-toolchain.toml ++++ b/rust-toolchain.toml +@@ -1,4 +1,4 @@ + [toolchain] + # Current minimum-supported Rust version +-channel = "1.74" ++channel = "1.82" + profile = "default" +-- +2.51.0 + diff --git a/Patches/glib/hardcoded-paths.diff b/Patches/glib/hardcoded-paths.diff new file mode 100644 index 0000000000000..d5d114a87a2b6 --- /dev/null +++ b/Patches/glib/hardcoded-paths.diff @@ -0,0 +1,39 @@ +diff --git a/gio/xdgmime/xdgmime.c b/gio/xdgmime/xdgmime.c +index 0909581eb..04518ad88 100644 +--- a/gio/xdgmime/xdgmime.c ++++ b/gio/xdgmime/xdgmime.c +@@ -228,7 +228,7 @@ xdg_init_dirs (void) + xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + + if (xdg_data_dirs == NULL) +- xdg_data_dirs = "/usr/local/share/:/usr/share/"; ++ xdg_data_dirs = "@@HOMEBREW_PREFIX@@/share/:/usr/share/"; + + /* Work out how many dirs we’re dealing with. */ + if (xdg_data_home != NULL || home != NULL) +diff --git a/girepository/girepository.c b/girepository/girepository.c +index a6a81716d..63bf2ec9e 100644 +--- a/girepository/girepository.c ++++ b/girepository/girepository.c +@@ -300,6 +300,8 @@ gi_repository_init (GIRepository *repository) + typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL); + + g_ptr_array_add (repository->typelib_search_path, g_steal_pointer (&typelib_dir)); ++ ++ g_ptr_array_add (repository->typelib_search_path, g_strdup ("@@HOMEBREW_PREFIX@@/lib/girepository-1.0")); + } + + repository->library_paths = g_ptr_array_new_null_terminated (1, g_free, TRUE); +diff --git a/glib/gutils.c b/glib/gutils.c +index 8628a568d..6d54f3c7f 100644 +--- a/glib/gutils.c ++++ b/glib/gutils.c +@@ -2698,7 +2698,7 @@ g_build_system_data_dirs (void) + */ + #ifndef G_OS_WIN32 + if (!data_dirs || !data_dirs[0]) +- data_dirs = "/usr/local/share/:/usr/share/"; ++ data_dirs = "@@HOMEBREW_PREFIX@@/share/:/usr/share/"; + + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #else diff --git a/Patches/glibc/2.13-getconf.diff b/Patches/glibc/2.13-getconf.diff new file mode 100644 index 0000000000000..a3bd48fae6afa --- /dev/null +++ b/Patches/glibc/2.13-getconf.diff @@ -0,0 +1,304 @@ +diff --git a/posix/confstr.c b/posix/confstr.c +index 5553f4b28a..7d5a1a08be 100644 +--- a/posix/confstr.c ++++ b/posix/confstr.c +@@ -1,5 +1,4 @@ +-/* Copyright (C) 1991,1996,1997,2000-2004,2009,2010 Free +- Software Foundation, Inc. ++/* Copyright (C) 1991-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -36,6 +35,10 @@ confstr (name, buf, len) + const char *string = ""; + size_t string_len = 1; + ++ /* Note that this buffer must be large enough for the longest strings ++ used below. */ ++ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"]; ++ + switch (name) + { + case _CS_PATH: +@@ -54,59 +57,55 @@ confstr (name, buf, len) + wint_t types are no greater than the width of type long. + + Currently this means all environment which the system allows. */ +- { +- char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"]; +- +- string_len = 0; ++ string_len = 0; + #ifndef _POSIX_V7_ILP32_OFF32 +- if (__sysconf (_SC_V7_ILP32_OFF32) > 0) ++ if (__sysconf (_SC_V7_ILP32_OFF32) > 0) + #endif + #if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0 +- { +- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32", +- sizeof "POSIX_V7_ILP32_OFF32" - 1); +- string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1; +- } ++ { ++ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32", ++ sizeof "POSIX_V7_ILP32_OFF32" - 1); ++ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1; ++ } + #endif + #ifndef _POSIX_V7_ILP32_OFFBIG +- if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0) ++ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0) + #endif + #if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG", +- sizeof "POSIX_V7_ILP32_OFFBIG" - 1); +- string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG", ++ sizeof "POSIX_V7_ILP32_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1; ++ } + #endif + #ifndef _POSIX_V7_LP64_OFF64 +- if (__sysconf (_SC_V7_LP64_OFF64) > 0) ++ if (__sysconf (_SC_V7_LP64_OFF64) > 0) + #endif + #if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64", +- sizeof "POSIX_V7_LP64_OFF64" - 1); +- string_len += sizeof "POSIX_V7_LP64_OFF64" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64", ++ sizeof "POSIX_V7_LP64_OFF64" - 1); ++ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1; ++ } + #endif + #ifndef _POSIX_V7_LPBIG_OFFBIG +- if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0) ++ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0) + #endif + #if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG", +- sizeof "POSIX_V7_LPBIG_OFFBIG" - 1); +- string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1; +- } +-#endif +- restenvs[string_len++] = '\0'; +- string = restenvs; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG", ++ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1; ++ } ++#endif ++ restenvs[string_len++] = '\0'; ++ string = restenvs; + break; + + case _CS_V6_WIDTH_RESTRICTED_ENVS: +@@ -117,59 +116,55 @@ confstr (name, buf, len) + wint_t types are no greater than the width of type long. + + Currently this means all environment which the system allows. */ +- { +- char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"]; +- +- string_len = 0; ++ string_len = 0; + #ifndef _POSIX_V6_ILP32_OFF32 +- if (__sysconf (_SC_V6_ILP32_OFF32) > 0) ++ if (__sysconf (_SC_V6_ILP32_OFF32) > 0) + #endif + #if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0 +- { +- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32", +- sizeof "POSIX_V6_ILP32_OFF32" - 1); +- string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1; +- } ++ { ++ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32", ++ sizeof "POSIX_V6_ILP32_OFF32" - 1); ++ string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1; ++ } + #endif + #ifndef _POSIX_V6_ILP32_OFFBIG +- if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0) ++ if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0) + #endif + #if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG", +- sizeof "POSIX_V6_ILP32_OFFBIG" - 1); +- string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG", ++ sizeof "POSIX_V6_ILP32_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1; ++ } + #endif + #ifndef _POSIX_V6_LP64_OFF64 +- if (__sysconf (_SC_V6_LP64_OFF64) > 0) ++ if (__sysconf (_SC_V6_LP64_OFF64) > 0) + #endif + #if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64", +- sizeof "POSIX_V6_LP64_OFF64" - 1); +- string_len += sizeof "POSIX_V6_LP64_OFF64" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64", ++ sizeof "POSIX_V6_LP64_OFF64" - 1); ++ string_len += sizeof "POSIX_V6_LP64_OFF64" - 1; ++ } + #endif + #ifndef _POSIX_V6_LPBIG_OFFBIG +- if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0) ++ if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0) + #endif + #if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG", +- sizeof "POSIX_V6_LPBIG_OFFBIG" - 1); +- string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1; +- } +-#endif +- restenvs[string_len++] = '\0'; +- string = restenvs; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG", ++ sizeof "POSIX_V6_LPBIG_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1; ++ } ++#endif ++ restenvs[string_len++] = '\0'; ++ string = restenvs; + break; + + case _CS_V5_WIDTH_RESTRICTED_ENVS: +@@ -180,59 +175,55 @@ confstr (name, buf, len) + wint_t types are no greater than the width of type long. + + Currently this means all environment which the system allows. */ +- { +- char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"]; +- +- string_len = 0; ++ string_len = 0; + #ifndef _XBS5_ILP32_OFF32 +- if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0) ++ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0) + #endif + #if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0 +- { +- memcpy (restenvs + string_len, "XBS5_ILP32_OFF32", +- sizeof "XBS5_ILP32_OFF32" - 1); +- string_len += sizeof "XBS5_ILP32_OFF32" - 1; +- } ++ { ++ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32", ++ sizeof "XBS5_ILP32_OFF32" - 1); ++ string_len += sizeof "XBS5_ILP32_OFF32" - 1; ++ } + #endif + #ifndef _XBS5_ILP32_OFFBIG +- if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0) ++ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0) + #endif + #if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG", +- sizeof "XBS5_ILP32_OFFBIG" - 1); +- string_len += sizeof "XBS5_ILP32_OFFBIG" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG", ++ sizeof "XBS5_ILP32_OFFBIG" - 1); ++ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1; ++ } + #endif + #ifndef _XBS5_LP64_OFF64 +- if (__sysconf (_SC_XBS5_LP64_OFF64) > 0) ++ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0) + #endif + #if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "XBS5_LP64_OFF64", +- sizeof "XBS5_LP64_OFF64" - 1); +- string_len += sizeof "XBS5_LP64_OFF64" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "XBS5_LP64_OFF64", ++ sizeof "XBS5_LP64_OFF64" - 1); ++ string_len += sizeof "XBS5_LP64_OFF64" - 1; ++ } + #endif + #ifndef _XBS5_LPBIG_OFFBIG +- if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0) ++ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0) + #endif + #if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG", +- sizeof "XBS5_LPBIG_OFFBIG" - 1); +- string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1; +- } +-#endif +- restenvs[string_len++] = '\0'; +- string = restenvs; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG", ++ sizeof "XBS5_LPBIG_OFFBIG" - 1); ++ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1; ++ } ++#endif ++ restenvs[string_len++] = '\0'; ++ string = restenvs; + break; + + case _CS_XBS5_ILP32_OFF32_CFLAGS: diff --git a/Patches/glibc/2.17-aarch64-dl-machine.diff b/Patches/glibc/2.17-aarch64-dl-machine.diff new file mode 100644 index 0000000000000..4e06c701fb233 --- /dev/null +++ b/Patches/glibc/2.17-aarch64-dl-machine.diff @@ -0,0 +1,78 @@ +commit f6610cf4ec687bd37da8c7ea2664df6545e79bf5 +Author: Fangrui Song +Commit: Ruoyu Zhong + + aarch64: Make elf_machine_{load_address,dynamic} robust [BZ #28203] + + The AArch64 ABI is largely platform agnostic and does not specify + _GLOBAL_OFFSET_TABLE_[0] ([1]). glibc ld.so turns out to be probably the + only user of _GLOBAL_OFFSET_TABLE_[0] and GNU ld defines the value + to the link-time address _DYNAMIC. [2] + + In 2012, __ehdr_start was implemented in GNU ld and gold in binutils + 2.23. Using adrp+add / (-mcmodel=tiny) adr to access + __ehdr_start/_DYNAMIC gives us a robust way to get the load address and + the link-time address of _DYNAMIC. + + [1]: From a psABI maintainer, https://bugs.llvm.org/show_bug.cgi?id=49672#c2 + [2]: LLD's aarch64 port does not set _GLOBAL_OFFSET_TABLE_[0] to the + link-time address _DYNAMIC. + LLD is widely used on aarch64 Android and ChromeOS devices. Software + just works without the need for _GLOBAL_OFFSET_TABLE_[0]. + + Reviewed-by: Szabolcs Nagy + +diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h +index 94f1108e15..3e4fa7f900 100644 +--- a/ports/sysdeps/aarch64/dl-machine.h ++++ b/ports/sysdeps/aarch64/dl-machine.h +@@ -31,40 +31,22 @@ elf_machine_matches_host (const ElfW(Ehdr) *ehdr) + return ehdr->e_machine == EM_AARCH64; + } + +-/* Return the link-time address of _DYNAMIC. Conveniently, this is the +- first element of the GOT. */ ++/* Return the run-time load address of the shared object. */ ++ + static inline ElfW(Addr) __attribute__ ((unused)) +-elf_machine_dynamic (void) ++elf_machine_load_address (void) + { +- ElfW(Addr) addr = (ElfW(Addr)) &_DYNAMIC; +- return addr; ++ extern const ElfW(Ehdr) __ehdr_start attribute_hidden; ++ return (ElfW(Addr)) &__ehdr_start; + } + +-/* Return the run-time load address of the shared object. */ ++/* Return the link-time address of _DYNAMIC. */ + + static inline ElfW(Addr) __attribute__ ((unused)) +-elf_machine_load_address (void) ++elf_machine_dynamic (void) + { +- /* To figure out the load address we use the definition that for any symbol: +- dynamic_addr(symbol) = static_addr(symbol) + load_addr +- +- The choice of symbol is arbitrary. The static address we obtain +- by constructing a non GOT reference to the symbol, the dynamic +- address of the symbol we compute using adrp/add to compute the +- symbol's address relative to the PC. */ +- +- ElfW(Addr) static_addr; +- ElfW(Addr) dynamic_addr; +- +- asm (" \n\ +- adrp %1, _dl_start; \n\ +- add %1, %1, #:lo12:_dl_start \n\ +- ldr %w0, 1f \n\ +- b 2f \n\ +-1: .word _dl_start \n\ +-2: \n\ +- " : "=r" (static_addr), "=r" (dynamic_addr)); +- return dynamic_addr - static_addr; ++ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; ++ return (ElfW(Addr)) _DYNAMIC - elf_machine_load_address (); + } + + /* Set up the loaded object described by L so its unrelocated PLT diff --git a/Patches/glibc/2.35-cve-rollup-sep2025.patch b/Patches/glibc/2.35-cve-rollup-sep2025.patch new file mode 100644 index 0000000000000..25fd53122ba72 --- /dev/null +++ b/Patches/glibc/2.35-cve-rollup-sep2025.patch @@ -0,0 +1,7763 @@ +From 6e867146ee01de3ed1e94e777372093812a578e9 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Thu, 17 Mar 2022 11:44:34 +0530 +Subject: [PATCH] Simplify allocations and fix merge and continue actions [BZ + #28931] + +Allocations for address tuples is currently a bit confusing because of +the pointer chasing through PAT, making it hard to observe the sequence +in which allocations have been made. Narrow scope of the pointer +chasing through PAT so that it is only used where necessary. + +This also tightens actions behaviour with the hosts database in +getaddrinfo to comply with the manual text. The "continue" action +discards previous results and the "merge" action results in an immedate +lookup failure. Consequently, chaining of allocations across modules is +no longer necessary, thus opening up cleanup opportunities. + +A test has been added that checks some combinations to ensure that they +work correctly. + +Resolves: BZ #28931 + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit 1c37b8022e8763fedbb3f79c02e05c6acfe5a215) +--- + nss/Makefile | 3 +- + nss/tst-nss-gai-actions.c | 149 ++++++ + nss/tst-nss-gai-actions.root/etc/host.conf | 1 + + nss/tst-nss-gai-actions.root/etc/hosts | 508 +++++++++++++++++++++ + sysdeps/posix/getaddrinfo.c | 143 +++--- + 5 files changed, 751 insertions(+), 53 deletions(-) + create mode 100644 nss/tst-nss-gai-actions.c + create mode 100644 nss/tst-nss-gai-actions.root/etc/host.conf + create mode 100644 nss/tst-nss-gai-actions.root/etc/hosts + +diff --git a/nss/Makefile b/nss/Makefile +index de439d4911..b2301c4cd7 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -70,7 +70,8 @@ tests-container = \ + tst-nss-files-hosts-long \ + tst-nss-db-endpwent \ + tst-nss-db-endgrent \ +- tst-reload1 tst-reload2 ++ tst-reload1 tst-reload2 \ ++ tst-nss-gai-actions + + # Tests which need libdl + ifeq (yes,$(build-shared)) +diff --git a/nss/tst-nss-gai-actions.c b/nss/tst-nss-gai-actions.c +new file mode 100644 +index 0000000000..efca6cd183 +--- /dev/null ++++ b/nss/tst-nss-gai-actions.c +@@ -0,0 +1,149 @@ ++/* Test continue and merge NSS actions for getaddrinfo. ++ Copyright The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++enum ++{ ++ ACTION_MERGE = 0, ++ ACTION_CONTINUE, ++}; ++ ++static const char * ++family_str (int family) ++{ ++ switch (family) ++ { ++ case AF_UNSPEC: ++ return "AF_UNSPEC"; ++ case AF_INET: ++ return "AF_INET"; ++ default: ++ __builtin_unreachable (); ++ } ++} ++ ++static const char * ++action_str (int action) ++{ ++ switch (action) ++ { ++ case ACTION_MERGE: ++ return "merge"; ++ case ACTION_CONTINUE: ++ return "continue"; ++ default: ++ __builtin_unreachable (); ++ } ++} ++ ++static void ++do_one_test (int action, int family, bool canon) ++{ ++ struct addrinfo hints = ++ { ++ .ai_family = family, ++ }; ++ ++ struct addrinfo *ai; ++ ++ if (canon) ++ hints.ai_flags = AI_CANONNAME; ++ ++ printf ("***** Testing \"files [SUCCESS=%s] files\" for family %s, %s\n", ++ action_str (action), family_str (family), ++ canon ? "AI_CANONNAME" : ""); ++ ++ int ret = getaddrinfo ("example.org", "80", &hints, &ai); ++ ++ switch (action) ++ { ++ case ACTION_MERGE: ++ if (ret == 0) ++ { ++ char *formatted = support_format_addrinfo (ai, ret); ++ ++ printf ("merge unexpectedly succeeded:\n %s\n", formatted); ++ support_record_failure (); ++ free (formatted); ++ } ++ else ++ return; ++ case ACTION_CONTINUE: ++ { ++ char *formatted = support_format_addrinfo (ai, ret); ++ ++ /* Verify that the result appears exactly once. */ ++ const char *expected = "address: STREAM/TCP 192.0.0.1 80\n" ++ "address: DGRAM/UDP 192.0.0.1 80\n" ++ "address: RAW/IP 192.0.0.1 80\n"; ++ ++ const char *contains = strstr (formatted, expected); ++ const char *contains2 = NULL; ++ ++ if (contains != NULL) ++ contains2 = strstr (contains + strlen (expected), expected); ++ ++ if (contains == NULL || contains2 != NULL) ++ { ++ printf ("continue failed:\n%s\n", formatted); ++ support_record_failure (); ++ } ++ ++ free (formatted); ++ break; ++ } ++ default: ++ __builtin_unreachable (); ++ } ++} ++ ++static void ++do_one_test_set (int action) ++{ ++ char buf[32]; ++ ++ snprintf (buf, sizeof (buf), "files [SUCCESS=%s] files", ++ action_str (action)); ++ __nss_configure_lookup ("hosts", buf); ++ ++ do_one_test (action, AF_UNSPEC, false); ++ do_one_test (action, AF_INET, false); ++ do_one_test (action, AF_INET, true); ++} ++ ++static int ++do_test (void) ++{ ++ do_one_test_set (ACTION_CONTINUE); ++ do_one_test_set (ACTION_MERGE); ++ return 0; ++} ++ ++#include +diff --git a/nss/tst-nss-gai-actions.root/etc/host.conf b/nss/tst-nss-gai-actions.root/etc/host.conf +new file mode 100644 +index 0000000000..d1a59f73a9 +--- /dev/null ++++ b/nss/tst-nss-gai-actions.root/etc/host.conf +@@ -0,0 +1 @@ ++multi on +diff --git a/nss/tst-nss-gai-actions.root/etc/hosts b/nss/tst-nss-gai-actions.root/etc/hosts +new file mode 100644 +index 0000000000..50ce9774dc +--- /dev/null ++++ b/nss/tst-nss-gai-actions.root/etc/hosts +@@ -0,0 +1,508 @@ ++192.0.0.1 example.org ++192.0.0.2 example.org ++192.0.0.3 example.org ++192.0.0.4 example.org ++192.0.0.5 example.org ++192.0.0.6 example.org ++192.0.0.7 example.org ++192.0.0.8 example.org ++192.0.0.9 example.org ++192.0.0.10 example.org ++192.0.0.11 example.org ++192.0.0.12 example.org ++192.0.0.13 example.org ++192.0.0.14 example.org ++192.0.0.15 example.org ++192.0.0.16 example.org ++192.0.0.17 example.org ++192.0.0.18 example.org ++192.0.0.19 example.org ++192.0.0.20 example.org ++192.0.0.21 example.org ++192.0.0.22 example.org ++192.0.0.23 example.org ++192.0.0.24 example.org ++192.0.0.25 example.org ++192.0.0.26 example.org ++192.0.0.27 example.org ++192.0.0.28 example.org ++192.0.0.29 example.org ++192.0.0.30 example.org ++192.0.0.31 example.org ++192.0.0.32 example.org ++192.0.0.33 example.org ++192.0.0.34 example.org ++192.0.0.35 example.org ++192.0.0.36 example.org ++192.0.0.37 example.org ++192.0.0.38 example.org ++192.0.0.39 example.org ++192.0.0.40 example.org ++192.0.0.41 example.org ++192.0.0.42 example.org ++192.0.0.43 example.org ++192.0.0.44 example.org ++192.0.0.45 example.org ++192.0.0.46 example.org ++192.0.0.47 example.org ++192.0.0.48 example.org ++192.0.0.49 example.org ++192.0.0.50 example.org ++192.0.0.51 example.org ++192.0.0.52 example.org ++192.0.0.53 example.org ++192.0.0.54 example.org ++192.0.0.55 example.org ++192.0.0.56 example.org ++192.0.0.57 example.org ++192.0.0.58 example.org ++192.0.0.59 example.org ++192.0.0.60 example.org ++192.0.0.61 example.org ++192.0.0.62 example.org ++192.0.0.63 example.org ++192.0.0.64 example.org ++192.0.0.65 example.org ++192.0.0.66 example.org ++192.0.0.67 example.org ++192.0.0.68 example.org ++192.0.0.69 example.org ++192.0.0.70 example.org ++192.0.0.71 example.org ++192.0.0.72 example.org ++192.0.0.73 example.org ++192.0.0.74 example.org ++192.0.0.75 example.org ++192.0.0.76 example.org ++192.0.0.77 example.org ++192.0.0.78 example.org ++192.0.0.79 example.org ++192.0.0.80 example.org ++192.0.0.81 example.org ++192.0.0.82 example.org ++192.0.0.83 example.org ++192.0.0.84 example.org ++192.0.0.85 example.org ++192.0.0.86 example.org ++192.0.0.87 example.org ++192.0.0.88 example.org ++192.0.0.89 example.org ++192.0.0.90 example.org ++192.0.0.91 example.org ++192.0.0.92 example.org ++192.0.0.93 example.org ++192.0.0.94 example.org ++192.0.0.95 example.org ++192.0.0.96 example.org ++192.0.0.97 example.org ++192.0.0.98 example.org ++192.0.0.99 example.org ++192.0.0.100 example.org ++192.0.0.101 example.org ++192.0.0.102 example.org ++192.0.0.103 example.org ++192.0.0.104 example.org ++192.0.0.105 example.org ++192.0.0.106 example.org ++192.0.0.107 example.org ++192.0.0.108 example.org ++192.0.0.109 example.org ++192.0.0.110 example.org ++192.0.0.111 example.org ++192.0.0.112 example.org ++192.0.0.113 example.org ++192.0.0.114 example.org ++192.0.0.115 example.org ++192.0.0.116 example.org ++192.0.0.117 example.org ++192.0.0.118 example.org ++192.0.0.119 example.org ++192.0.0.120 example.org ++192.0.0.121 example.org ++192.0.0.122 example.org ++192.0.0.123 example.org ++192.0.0.124 example.org ++192.0.0.125 example.org ++192.0.0.126 example.org ++192.0.0.127 example.org ++192.0.0.128 example.org ++192.0.0.129 example.org ++192.0.0.130 example.org ++192.0.0.131 example.org ++192.0.0.132 example.org ++192.0.0.133 example.org ++192.0.0.134 example.org ++192.0.0.135 example.org ++192.0.0.136 example.org ++192.0.0.137 example.org ++192.0.0.138 example.org ++192.0.0.139 example.org ++192.0.0.140 example.org ++192.0.0.141 example.org ++192.0.0.142 example.org ++192.0.0.143 example.org ++192.0.0.144 example.org ++192.0.0.145 example.org ++192.0.0.146 example.org ++192.0.0.147 example.org ++192.0.0.148 example.org ++192.0.0.149 example.org ++192.0.0.150 example.org ++192.0.0.151 example.org ++192.0.0.152 example.org ++192.0.0.153 example.org ++192.0.0.154 example.org ++192.0.0.155 example.org ++192.0.0.156 example.org ++192.0.0.157 example.org ++192.0.0.158 example.org ++192.0.0.159 example.org ++192.0.0.160 example.org ++192.0.0.161 example.org ++192.0.0.162 example.org ++192.0.0.163 example.org ++192.0.0.164 example.org ++192.0.0.165 example.org ++192.0.0.166 example.org ++192.0.0.167 example.org ++192.0.0.168 example.org ++192.0.0.169 example.org ++192.0.0.170 example.org ++192.0.0.171 example.org ++192.0.0.172 example.org ++192.0.0.173 example.org ++192.0.0.174 example.org ++192.0.0.175 example.org ++192.0.0.176 example.org ++192.0.0.177 example.org ++192.0.0.178 example.org ++192.0.0.179 example.org ++192.0.0.180 example.org ++192.0.0.181 example.org ++192.0.0.182 example.org ++192.0.0.183 example.org ++192.0.0.184 example.org ++192.0.0.185 example.org ++192.0.0.186 example.org ++192.0.0.187 example.org ++192.0.0.188 example.org ++192.0.0.189 example.org ++192.0.0.190 example.org ++192.0.0.191 example.org ++192.0.0.192 example.org ++192.0.0.193 example.org ++192.0.0.194 example.org ++192.0.0.195 example.org ++192.0.0.196 example.org ++192.0.0.197 example.org ++192.0.0.198 example.org ++192.0.0.199 example.org ++192.0.0.200 example.org ++192.0.0.201 example.org ++192.0.0.202 example.org ++192.0.0.203 example.org ++192.0.0.204 example.org ++192.0.0.205 example.org ++192.0.0.206 example.org ++192.0.0.207 example.org ++192.0.0.208 example.org ++192.0.0.209 example.org ++192.0.0.210 example.org ++192.0.0.211 example.org ++192.0.0.212 example.org ++192.0.0.213 example.org ++192.0.0.214 example.org ++192.0.0.215 example.org ++192.0.0.216 example.org ++192.0.0.217 example.org ++192.0.0.218 example.org ++192.0.0.219 example.org ++192.0.0.220 example.org ++192.0.0.221 example.org ++192.0.0.222 example.org ++192.0.0.223 example.org ++192.0.0.224 example.org ++192.0.0.225 example.org ++192.0.0.226 example.org ++192.0.0.227 example.org ++192.0.0.228 example.org ++192.0.0.229 example.org ++192.0.0.230 example.org ++192.0.0.231 example.org ++192.0.0.232 example.org ++192.0.0.233 example.org ++192.0.0.234 example.org ++192.0.0.235 example.org ++192.0.0.236 example.org ++192.0.0.237 example.org ++192.0.0.238 example.org ++192.0.0.239 example.org ++192.0.0.240 example.org ++192.0.0.241 example.org ++192.0.0.242 example.org ++192.0.0.243 example.org ++192.0.0.244 example.org ++192.0.0.245 example.org ++192.0.0.246 example.org ++192.0.0.247 example.org ++192.0.0.248 example.org ++192.0.0.249 example.org ++192.0.0.250 example.org ++192.0.0.251 example.org ++192.0.0.252 example.org ++192.0.0.253 example.org ++192.0.0.254 example.org ++192.0.1.1 example.org ++192.0.1.2 example.org ++192.0.1.3 example.org ++192.0.1.4 example.org ++192.0.1.5 example.org ++192.0.1.6 example.org ++192.0.1.7 example.org ++192.0.1.8 example.org ++192.0.1.9 example.org ++192.0.1.10 example.org ++192.0.1.11 example.org ++192.0.1.12 example.org ++192.0.1.13 example.org ++192.0.1.14 example.org ++192.0.1.15 example.org ++192.0.1.16 example.org ++192.0.1.17 example.org ++192.0.1.18 example.org ++192.0.1.19 example.org ++192.0.1.20 example.org ++192.0.1.21 example.org ++192.0.1.22 example.org ++192.0.1.23 example.org ++192.0.1.24 example.org ++192.0.1.25 example.org ++192.0.1.26 example.org ++192.0.1.27 example.org ++192.0.1.28 example.org ++192.0.1.29 example.org ++192.0.1.30 example.org ++192.0.1.31 example.org ++192.0.1.32 example.org ++192.0.1.33 example.org ++192.0.1.34 example.org ++192.0.1.35 example.org ++192.0.1.36 example.org ++192.0.1.37 example.org ++192.0.1.38 example.org ++192.0.1.39 example.org ++192.0.1.40 example.org ++192.0.1.41 example.org ++192.0.1.42 example.org ++192.0.1.43 example.org ++192.0.1.44 example.org ++192.0.1.45 example.org ++192.0.1.46 example.org ++192.0.1.47 example.org ++192.0.1.48 example.org ++192.0.1.49 example.org ++192.0.1.50 example.org ++192.0.1.51 example.org ++192.0.1.52 example.org ++192.0.1.53 example.org ++192.0.1.54 example.org ++192.0.1.55 example.org ++192.0.1.56 example.org ++192.0.1.57 example.org ++192.0.1.58 example.org ++192.0.1.59 example.org ++192.0.1.60 example.org ++192.0.1.61 example.org ++192.0.1.62 example.org ++192.0.1.63 example.org ++192.0.1.64 example.org ++192.0.1.65 example.org ++192.0.1.66 example.org ++192.0.1.67 example.org ++192.0.1.68 example.org ++192.0.1.69 example.org ++192.0.1.70 example.org ++192.0.1.71 example.org ++192.0.1.72 example.org ++192.0.1.73 example.org ++192.0.1.74 example.org ++192.0.1.75 example.org ++192.0.1.76 example.org ++192.0.1.77 example.org ++192.0.1.78 example.org ++192.0.1.79 example.org ++192.0.1.80 example.org ++192.0.1.81 example.org ++192.0.1.82 example.org ++192.0.1.83 example.org ++192.0.1.84 example.org ++192.0.1.85 example.org ++192.0.1.86 example.org ++192.0.1.87 example.org ++192.0.1.88 example.org ++192.0.1.89 example.org ++192.0.1.90 example.org ++192.0.1.91 example.org ++192.0.1.92 example.org ++192.0.1.93 example.org ++192.0.1.94 example.org ++192.0.1.95 example.org ++192.0.1.96 example.org ++192.0.1.97 example.org ++192.0.1.98 example.org ++192.0.1.99 example.org ++192.0.1.100 example.org ++192.0.1.101 example.org ++192.0.1.102 example.org ++192.0.1.103 example.org ++192.0.1.104 example.org ++192.0.1.105 example.org ++192.0.1.106 example.org ++192.0.1.107 example.org ++192.0.1.108 example.org ++192.0.1.109 example.org ++192.0.1.110 example.org ++192.0.1.111 example.org ++192.0.1.112 example.org ++192.0.1.113 example.org ++192.0.1.114 example.org ++192.0.1.115 example.org ++192.0.1.116 example.org ++192.0.1.117 example.org ++192.0.1.118 example.org ++192.0.1.119 example.org ++192.0.1.120 example.org ++192.0.1.121 example.org ++192.0.1.122 example.org ++192.0.1.123 example.org ++192.0.1.124 example.org ++192.0.1.125 example.org ++192.0.1.126 example.org ++192.0.1.127 example.org ++192.0.1.128 example.org ++192.0.1.129 example.org ++192.0.1.130 example.org ++192.0.1.131 example.org ++192.0.1.132 example.org ++192.0.1.133 example.org ++192.0.1.134 example.org ++192.0.1.135 example.org ++192.0.1.136 example.org ++192.0.1.137 example.org ++192.0.1.138 example.org ++192.0.1.139 example.org ++192.0.1.140 example.org ++192.0.1.141 example.org ++192.0.1.142 example.org ++192.0.1.143 example.org ++192.0.1.144 example.org ++192.0.1.145 example.org ++192.0.1.146 example.org ++192.0.1.147 example.org ++192.0.1.148 example.org ++192.0.1.149 example.org ++192.0.1.150 example.org ++192.0.1.151 example.org ++192.0.1.152 example.org ++192.0.1.153 example.org ++192.0.1.154 example.org ++192.0.1.155 example.org ++192.0.1.156 example.org ++192.0.1.157 example.org ++192.0.1.158 example.org ++192.0.1.159 example.org ++192.0.1.160 example.org ++192.0.1.161 example.org ++192.0.1.162 example.org ++192.0.1.163 example.org ++192.0.1.164 example.org ++192.0.1.165 example.org ++192.0.1.166 example.org ++192.0.1.167 example.org ++192.0.1.168 example.org ++192.0.1.169 example.org ++192.0.1.170 example.org ++192.0.1.171 example.org ++192.0.1.172 example.org ++192.0.1.173 example.org ++192.0.1.174 example.org ++192.0.1.175 example.org ++192.0.1.176 example.org ++192.0.1.177 example.org ++192.0.1.178 example.org ++192.0.1.179 example.org ++192.0.1.180 example.org ++192.0.1.181 example.org ++192.0.1.182 example.org ++192.0.1.183 example.org ++192.0.1.184 example.org ++192.0.1.185 example.org ++192.0.1.186 example.org ++192.0.1.187 example.org ++192.0.1.188 example.org ++192.0.1.189 example.org ++192.0.1.190 example.org ++192.0.1.191 example.org ++192.0.1.192 example.org ++192.0.1.193 example.org ++192.0.1.194 example.org ++192.0.1.195 example.org ++192.0.1.196 example.org ++192.0.1.197 example.org ++192.0.1.198 example.org ++192.0.1.199 example.org ++192.0.1.200 example.org ++192.0.1.201 example.org ++192.0.1.202 example.org ++192.0.1.203 example.org ++192.0.1.204 example.org ++192.0.1.205 example.org ++192.0.1.206 example.org ++192.0.1.207 example.org ++192.0.1.208 example.org ++192.0.1.209 example.org ++192.0.1.210 example.org ++192.0.1.211 example.org ++192.0.1.212 example.org ++192.0.1.213 example.org ++192.0.1.214 example.org ++192.0.1.215 example.org ++192.0.1.216 example.org ++192.0.1.217 example.org ++192.0.1.218 example.org ++192.0.1.219 example.org ++192.0.1.220 example.org ++192.0.1.221 example.org ++192.0.1.222 example.org ++192.0.1.223 example.org ++192.0.1.224 example.org ++192.0.1.225 example.org ++192.0.1.226 example.org ++192.0.1.227 example.org ++192.0.1.228 example.org ++192.0.1.229 example.org ++192.0.1.230 example.org ++192.0.1.231 example.org ++192.0.1.232 example.org ++192.0.1.233 example.org ++192.0.1.234 example.org ++192.0.1.235 example.org ++192.0.1.236 example.org ++192.0.1.237 example.org ++192.0.1.238 example.org ++192.0.1.239 example.org ++192.0.1.240 example.org ++192.0.1.241 example.org ++192.0.1.242 example.org ++192.0.1.243 example.org ++192.0.1.244 example.org ++192.0.1.245 example.org ++192.0.1.246 example.org ++192.0.1.247 example.org ++192.0.1.248 example.org ++192.0.1.249 example.org ++192.0.1.250 example.org ++192.0.1.251 example.org ++192.0.1.252 example.org ++192.0.1.253 example.org ++192.0.1.254 example.org +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 18dccd5924..3d9bea60c6 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -458,11 +458,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + + if (name != NULL) + { +- at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used); +- at->family = AF_UNSPEC; +- at->scopeid = 0; +- at->next = NULL; +- + if (req->ai_flags & AI_IDN) + { + char *out; +@@ -473,13 +468,21 @@ gaih_inet (const char *name, const struct gaih_service *service, + malloc_name = true; + } + +- if (__inet_aton_exact (name, (struct in_addr *) at->addr) != 0) ++ uint32_t addr[4]; ++ if (__inet_aton_exact (name, (struct in_addr *) addr) != 0) + { ++ at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used); ++ at->scopeid = 0; ++ at->next = NULL; ++ + if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) +- at->family = AF_INET; ++ { ++ memcpy (at->addr, addr, sizeof (at->addr)); ++ at->family = AF_INET; ++ } + else if (req->ai_family == AF_INET6 && (req->ai_flags & AI_V4MAPPED)) + { +- at->addr[3] = at->addr[0]; ++ at->addr[3] = addr[0]; + at->addr[2] = htonl (0xffff); + at->addr[1] = 0; + at->addr[0] = 0; +@@ -493,49 +496,62 @@ gaih_inet (const char *name, const struct gaih_service *service, + + if (req->ai_flags & AI_CANONNAME) + canon = name; ++ ++ goto process_list; + } +- else if (at->family == AF_UNSPEC) ++ ++ char *scope_delim = strchr (name, SCOPE_DELIMITER); ++ int e; ++ ++ if (scope_delim == NULL) ++ e = inet_pton (AF_INET6, name, addr); ++ else ++ e = __inet_pton_length (AF_INET6, name, scope_delim - name, addr); ++ ++ if (e > 0) + { +- char *scope_delim = strchr (name, SCOPE_DELIMITER); +- int e; +- if (scope_delim == NULL) +- e = inet_pton (AF_INET6, name, at->addr); ++ at = alloca_account (sizeof (struct gaih_addrtuple), ++ alloca_used); ++ at->scopeid = 0; ++ at->next = NULL; ++ ++ if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) ++ { ++ memcpy (at->addr, addr, sizeof (at->addr)); ++ at->family = AF_INET6; ++ } ++ else if (req->ai_family == AF_INET ++ && IN6_IS_ADDR_V4MAPPED (addr)) ++ { ++ at->addr[0] = addr[3]; ++ at->addr[1] = addr[1]; ++ at->addr[2] = addr[2]; ++ at->addr[3] = addr[3]; ++ at->family = AF_INET; ++ } + else +- e = __inet_pton_length (AF_INET6, name, scope_delim - name, +- at->addr); +- if (e > 0) + { +- if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) +- at->family = AF_INET6; +- else if (req->ai_family == AF_INET +- && IN6_IS_ADDR_V4MAPPED (at->addr)) +- { +- at->addr[0] = at->addr[3]; +- at->family = AF_INET; +- } +- else +- { +- result = -EAI_ADDRFAMILY; +- goto free_and_return; +- } +- +- if (scope_delim != NULL +- && __inet6_scopeid_pton ((struct in6_addr *) at->addr, +- scope_delim + 1, +- &at->scopeid) != 0) +- { +- result = -EAI_NONAME; +- goto free_and_return; +- } ++ result = -EAI_ADDRFAMILY; ++ goto free_and_return; ++ } + +- if (req->ai_flags & AI_CANONNAME) +- canon = name; ++ if (scope_delim != NULL ++ && __inet6_scopeid_pton ((struct in6_addr *) at->addr, ++ scope_delim + 1, ++ &at->scopeid) != 0) ++ { ++ result = -EAI_NONAME; ++ goto free_and_return; + } ++ ++ if (req->ai_flags & AI_CANONNAME) ++ canon = name; ++ ++ goto process_list; + } + +- if (at->family == AF_UNSPEC && (req->ai_flags & AI_NUMERICHOST) == 0) ++ if ((req->ai_flags & AI_NUMERICHOST) == 0) + { +- struct gaih_addrtuple **pat = &at; + int no_data = 0; + int no_inet6_data = 0; + nss_action_list nip; +@@ -543,6 +559,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + enum nss_status status = NSS_STATUS_UNAVAIL; + int no_more; + struct resolv_context *res_ctx = NULL; ++ bool do_merge = false; + + /* If we do not have to look for IPv6 addresses or the canonical + name, use the simple, old functions, which do not support +@@ -579,7 +596,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + result = -EAI_MEMORY; + goto free_and_return; + } +- *pat = addrmem; ++ at = addrmem; + } + else + { +@@ -632,6 +649,8 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + + struct gaih_addrtuple *addrfree = addrmem; ++ struct gaih_addrtuple **pat = &at; ++ + for (int i = 0; i < air->naddrs; ++i) + { + socklen_t size = (air->family[i] == AF_INET +@@ -695,12 +714,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + + free (air); + +- if (at->family == AF_UNSPEC) +- { +- result = -EAI_NONAME; +- goto free_and_return; +- } +- + goto process_list; + } + else if (err == 0) +@@ -732,6 +745,22 @@ gaih_inet (const char *name, const struct gaih_service *service, + + while (!no_more) + { ++ /* Always start afresh; continue should discard previous results ++ and the hosts database does not support merge. */ ++ at = NULL; ++ free (canonbuf); ++ free (addrmem); ++ canon = canonbuf = NULL; ++ addrmem = NULL; ++ got_ipv6 = false; ++ ++ if (do_merge) ++ { ++ __set_h_errno (NETDB_INTERNAL); ++ __set_errno (EBUSY); ++ break; ++ } ++ + no_data = 0; + nss_gethostbyname4_r *fct4 = NULL; + +@@ -744,12 +773,14 @@ gaih_inet (const char *name, const struct gaih_service *service, + { + while (1) + { +- status = DL_CALL_FCT (fct4, (name, pat, ++ status = DL_CALL_FCT (fct4, (name, &at, + tmpbuf->data, tmpbuf->length, + &errno, &h_errno, + NULL)); + if (status == NSS_STATUS_SUCCESS) + break; ++ /* gethostbyname4_r may write into AT, so reset it. */ ++ at = NULL; + if (status != NSS_STATUS_TRYAGAIN + || errno != ERANGE || h_errno != NETDB_INTERNAL) + { +@@ -774,7 +805,9 @@ gaih_inet (const char *name, const struct gaih_service *service, + no_data = 1; + + if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL) +- canon = (*pat)->name; ++ canon = at->name; ++ ++ struct gaih_addrtuple **pat = &at; + + while (*pat != NULL) + { +@@ -826,6 +859,8 @@ gaih_inet (const char *name, const struct gaih_service *service, + + if (fct != NULL) + { ++ struct gaih_addrtuple **pat = &at; ++ + if (req->ai_family == AF_INET6 + || req->ai_family == AF_UNSPEC) + { +@@ -899,6 +934,10 @@ gaih_inet (const char *name, const struct gaih_service *service, + if (nss_next_action (nip, status) == NSS_ACTION_RETURN) + break; + ++ /* The hosts database does not support MERGE. */ ++ if (nss_next_action (nip, status) == NSS_ACTION_MERGE) ++ do_merge = true; ++ + nip++; + if (nip->module == NULL) + no_more = -1; +@@ -930,7 +969,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + + process_list: +- if (at->family == AF_UNSPEC) ++ if (at == NULL) + { + result = -EAI_NONAME; + goto free_and_return; + +From c54c5cd8e30ef82041b525ca4880685c673357ee Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 11 Mar 2022 08:23:56 +0100 +Subject: [PATCH] nss: Do not mention NSS test modules in + +They are not actually installed. Use the nss_files version instead +in nss/Makefile, similar to how __nss_shlib_revision is derived +from LIBNSS_FILES_SO. + +Reviewed-by: Carlos O'Donell +(cherry picked from commit aefc79ab5ad4bb9feea2876720cec70dca7cd8ed) +--- + nss/Makefile | 13 +++++-------- + shlib-versions | 5 ----- + 2 files changed, 5 insertions(+), 13 deletions(-) + +diff --git a/nss/Makefile b/nss/Makefile +index 552e5d03e1..74e2c2426c 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -171,17 +171,14 @@ $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps) + $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps) + $(build-module) + $(objpfx)nss_test2.os : nss_test1.c +-ifdef libnss_test1.so-version +-$(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so ++# Use the nss_files suffix for these objects as well. ++$(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so + $(make-link) +-endif +-ifdef libnss_test2.so-version +-$(objpfx)/libnss_test2.so$(libnss_test2.so-version): $(objpfx)/libnss_test2.so ++$(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so + $(make-link) +-endif + $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \ +- $(objpfx)/libnss_test1.so$(libnss_test1.so-version) \ +- $(objpfx)/libnss_test2.so$(libnss_test2.so-version) ++ $(objpfx)/libnss_test1.so$(libnss_files.so-version) \ ++ $(objpfx)/libnss_test2.so$(libnss_files.so-version) + + ifeq (yes,$(have-thread-library)) + $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library) +diff --git a/shlib-versions b/shlib-versions +index df6603e699..b87ab50c59 100644 +--- a/shlib-versions ++++ b/shlib-versions +@@ -47,11 +47,6 @@ libnss_ldap=2 + libnss_hesiod=2 + libnss_db=2 + +-# Tests for NSS. They must have the same NSS_SHLIB_REVISION number as +-# the rest. +-libnss_test1=2 +-libnss_test2=2 +- + # Version for libnsl with YP and NIS+ functions. + libnsl=1 + + +From 123bd1ec66d2d7ea4683e9563bd94adc67f41544 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 11 Mar 2022 08:23:56 +0100 +Subject: [PATCH] nss: Protect against errno changes in function lookup (bug + 28953) + +dlopen may clobber errno. The nss_test_errno module uses an ELF +constructor to achieve that, but there could be internal errors +during dlopen that cause this, too. Therefore, the NSS framework +has to guard against such errno clobbers. + +__nss_module_get_function is currently the only function that calls +__nss_module_load, so it is sufficient to save and restore errno +around this call. + +Reviewed-by: Carlos O'Donell +(cherry picked from commit 9bdf92c79d63b42f931101bb6df87129c408b0c4) +--- + nss/Makefile | 15 ++++++++-- + nss/nss_module.c | 12 +++++++- + nss/nss_test_errno.c | 58 ++++++++++++++++++++++++++++++++++++++ + nss/tst-nss-test_errno.c | 61 ++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 142 insertions(+), 4 deletions(-) + create mode 100644 nss/nss_test_errno.c + create mode 100644 nss/tst-nss-test_errno.c + +diff --git a/nss/Makefile b/nss/Makefile +index 74e2c2426c..de439d4911 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -60,7 +60,8 @@ tests = test-netdb test-digits-dots tst-nss-getpwent bug17079 \ + tst-nss-test1 \ + tst-nss-test2 \ + tst-nss-test4 \ +- tst-nss-test5 ++ tst-nss-test5 \ ++ tst-nss-test_errno + xtests = bug-erange + + tests-container = \ +@@ -132,7 +133,7 @@ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) + ifeq ($(build-static-nss),yes) + tests-static += tst-nss-static + endif +-extra-test-objs += nss_test1.os nss_test2.os ++extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os + + include ../Rules + +@@ -166,19 +167,26 @@ rtld-tests-LDFLAGS += -Wl,--dynamic-list=nss_test.ver + + libof-nss_test1 = extramodules + libof-nss_test2 = extramodules ++libof-nss_test_errno = extramodules + $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps) + $(build-module) + $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps) + $(build-module) ++$(objpfx)/libnss_test_errno.so: $(objpfx)nss_test_errno.os $(link-libc-deps) ++ $(build-module) + $(objpfx)nss_test2.os : nss_test1.c + # Use the nss_files suffix for these objects as well. + $(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so + $(make-link) + $(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so + $(make-link) ++$(objpfx)/libnss_test_errno.so$(libnss_files.so-version): \ ++ $(objpfx)/libnss_test_errno.so ++ $(make-link) + $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \ + $(objpfx)/libnss_test1.so$(libnss_files.so-version) \ +- $(objpfx)/libnss_test2.so$(libnss_files.so-version) ++ $(objpfx)/libnss_test2.so$(libnss_files.so-version) \ ++ $(objpfx)/libnss_test_errno.so$(libnss_files.so-version) + + ifeq (yes,$(have-thread-library)) + $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library) +@@ -194,3 +202,4 @@ LDFLAGS-tst-nss-test2 = -Wl,--disable-new-dtags + LDFLAGS-tst-nss-test3 = -Wl,--disable-new-dtags + LDFLAGS-tst-nss-test4 = -Wl,--disable-new-dtags + LDFLAGS-tst-nss-test5 = -Wl,--disable-new-dtags ++LDFLAGS-tst-nss-test_errno = -Wl,--disable-new-dtags +diff --git a/nss/nss_module.c b/nss/nss_module.c +index f9a1263e5a..f00bbd9e1a 100644 +--- a/nss/nss_module.c ++++ b/nss/nss_module.c +@@ -330,8 +330,18 @@ name_search (const void *left, const void *right) + void * + __nss_module_get_function (struct nss_module *module, const char *name) + { ++ /* A successful dlopen might clobber errno. */ ++ int saved_errno = errno; ++ + if (!__nss_module_load (module)) +- return NULL; ++ { ++ /* Reporting module load failure is currently inaccurate. See ++ bug 22041. Not changing errno is the conservative choice. */ ++ __set_errno (saved_errno); ++ return NULL; ++ } ++ ++ __set_errno (saved_errno); + + function_name *name_entry = bsearch (name, nss_function_name_array, + array_length (nss_function_name_array), +diff --git a/nss/nss_test_errno.c b/nss/nss_test_errno.c +new file mode 100644 +index 0000000000..680f8a07b9 +--- /dev/null ++++ b/nss/nss_test_errno.c +@@ -0,0 +1,58 @@ ++/* NSS service provider with errno clobber. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++/* Catch misnamed and functions. */ ++#pragma GCC diagnostic error "-Wmissing-prototypes" ++NSS_DECLARE_MODULE_FUNCTIONS (test_errno) ++ ++static void __attribute__ ((constructor)) ++init (void) ++{ ++ /* An arbitrary error code which is otherwise not used. */ ++ errno = ELIBBAD; ++} ++ ++/* Lookup functions for pwd follow that do not return any data. */ ++ ++/* Catch misnamed function definitions. */ ++ ++enum nss_status ++_nss_test_errno_setpwent (int stayopen) ++{ ++ setenv ("_nss_test_errno_setpwent", "yes", 1); ++ return NSS_STATUS_SUCCESS; ++} ++ ++enum nss_status ++_nss_test_errno_getpwent_r (struct passwd *result, ++ char *buffer, size_t size, int *errnop) ++{ ++ setenv ("_nss_test_errno_getpwent_r", "yes", 1); ++ return NSS_STATUS_NOTFOUND; ++} ++ ++enum nss_status ++_nss_test_errno_endpwent (void) ++{ ++ setenv ("_nss_test_errno_endpwent", "yes", 1); ++ return NSS_STATUS_SUCCESS; ++} +diff --git a/nss/tst-nss-test_errno.c b/nss/tst-nss-test_errno.c +new file mode 100644 +index 0000000000..d2c42dd363 +--- /dev/null ++++ b/nss/tst-nss-test_errno.c +@@ -0,0 +1,61 @@ ++/* getpwent failure when dlopen clobbers errno (bug 28953). ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ __nss_configure_lookup ("passwd", "files test_errno"); ++ ++ errno = 0; ++ setpwent (); ++ TEST_COMPARE (errno, 0); ++ ++ bool root_seen = false; ++ while (true) ++ { ++ errno = 0; ++ struct passwd *e = getpwent (); ++ if (e == NULL) ++ break; ++ if (strcmp (e->pw_name, "root")) ++ root_seen = true; ++ } ++ ++ TEST_COMPARE (errno, 0); ++ TEST_VERIFY (root_seen); ++ ++ errno = 0; ++ endpwent (); ++ TEST_COMPARE (errno, 0); ++ ++ TEST_COMPARE_STRING (getenv ("_nss_test_errno_setpwent"), "yes"); ++ TEST_COMPARE_STRING (getenv ("_nss_test_errno_getpwent_r"), "yes"); ++ TEST_COMPARE_STRING (getenv ("_nss_test_errno_endpwent"), "yes"); ++ ++ return 0; ++} ++ ++#include + +From b126325fc77f65862cddbef024b96dc1e9bb3104 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Thu, 17 Mar 2022 11:16:57 +0530 +Subject: [PATCH] nss: Sort tests and tests-container and put one test per line + +Signed-off-by: Siddhesh Poyarekar +(cherry picked from commit e2f68b54e8052da14680074fc5df03153216f218) +--- + nss/Makefile | 41 +++++++++++++++++++++++++---------------- + 1 file changed, 25 insertions(+), 16 deletions(-) + +diff --git a/nss/Makefile b/nss/Makefile +index b2301c4cd7..d8b06b44fb 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -56,22 +56,31 @@ extra-objs += $(makedb-modules:=.o) + + tests-static = tst-field + tests-internal = tst-field +-tests = test-netdb test-digits-dots tst-nss-getpwent bug17079 \ +- tst-nss-test1 \ +- tst-nss-test2 \ +- tst-nss-test4 \ +- tst-nss-test5 \ +- tst-nss-test_errno +-xtests = bug-erange +- +-tests-container = \ +- tst-nss-compat1 \ +- tst-nss-test3 \ +- tst-nss-files-hosts-long \ +- tst-nss-db-endpwent \ +- tst-nss-db-endgrent \ +- tst-reload1 tst-reload2 \ +- tst-nss-gai-actions ++ ++tests := \ ++ bug17079 \ ++ test-digits-dots \ ++ test-netdb \ ++ tst-nss-getpwent \ ++ tst-nss-test1 \ ++ tst-nss-test2 \ ++ tst-nss-test4 \ ++ tst-nss-test5 \ ++ tst-nss-test_errno \ ++# tests ++ ++xtests = bug-erange ++ ++tests-container := \ ++ tst-nss-compat1 \ ++ tst-nss-db-endgrent \ ++ tst-nss-db-endpwent \ ++ tst-nss-files-hosts-long \ ++ tst-nss-gai-actions \ ++ tst-nss-test3 \ ++ tst-reload1 \ ++ tst-reload2 \ ++# tests-container + + # Tests which need libdl + ifeq (yes,$(build-shared)) + +From f366eaa60819f49e4dbc0792ba136bfda7ada035 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 22:17:36 +0530 +Subject: [PATCH] gaih_inet: Simplify canon name resolution + +Simplify logic for allocation of canon to remove the canonbuf variable; +canon now always points to an allocated block. Also pull the canon name +set into a separate function. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit d01411f6bc61429fc027c38827bf3103b48eef2e) +--- + sysdeps/posix/getaddrinfo.c | 130 +++++++++++++++++++++--------------- + 1 file changed, 75 insertions(+), 55 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 3d9bea60c6..0629fd147b 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -285,7 +285,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + \ + if (localcanon != NULL && canon == NULL) \ + { \ +- canonbuf = __strdup (localcanon); \ ++ char *canonbuf = __strdup (localcanon); \ + if (canonbuf == NULL) \ + { \ + __resolv_context_put (res_ctx); \ +@@ -323,6 +323,41 @@ getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name) + return __strdup (name); + } + ++/* Process looked up canonical name and if necessary, decode to IDNA. Result ++ is a new string written to CANONP and the earlier string is freed. */ ++ ++static int ++process_canonname (const struct addrinfo *req, const char *orig_name, ++ char **canonp) ++{ ++ char *canon = *canonp; ++ ++ if ((req->ai_flags & AI_CANONNAME) != 0) ++ { ++ bool do_idn = req->ai_flags & AI_CANONIDN; ++ if (do_idn) ++ { ++ char *out; ++ int rc = __idna_from_dns_encoding (canon ?: orig_name, &out); ++ if (rc == 0) ++ { ++ free (canon); ++ canon = out; ++ } ++ else if (rc == EAI_IDN_ENCODE) ++ /* Use the punycode name as a fallback. */ ++ do_idn = false; ++ else ++ return -rc; ++ } ++ if (!do_idn && canon == NULL && (canon = __strdup (orig_name)) == NULL) ++ return -EAI_MEMORY; ++ } ++ ++ *canonp = canon; ++ return 0; ++} ++ + static int + gaih_inet (const char *name, const struct gaih_service *service, + const struct addrinfo *req, struct addrinfo **pai, +@@ -332,7 +367,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv; + struct gaih_addrtuple *at = NULL; + bool got_ipv6 = false; +- const char *canon = NULL; ++ char *canon = NULL; + const char *orig_name = name; + + /* Reserve stack memory for the scratch buffer in the getaddrinfo +@@ -453,7 +488,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + + bool malloc_name = false; + struct gaih_addrtuple *addrmem = NULL; +- char *canonbuf = NULL; + int result = 0; + + if (name != NULL) +@@ -495,7 +529,15 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + + if (req->ai_flags & AI_CANONNAME) +- canon = name; ++ { ++ char *canonbuf = __strdup (name); ++ if (canonbuf == NULL) ++ { ++ result = -EAI_MEMORY; ++ goto free_and_return; ++ } ++ canon = canonbuf; ++ } + + goto process_list; + } +@@ -545,7 +587,15 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + + if (req->ai_flags & AI_CANONNAME) +- canon = name; ++ { ++ char *canonbuf = __strdup (name); ++ if (canonbuf == NULL) ++ { ++ result = -EAI_MEMORY; ++ goto free_and_return; ++ } ++ canon = canonbuf; ++ } + + goto process_list; + } +@@ -676,9 +726,9 @@ gaih_inet (const char *name, const struct gaih_service *service, + (*pat)->next = NULL; + if (added_canon || air->canon == NULL) + (*pat)->name = NULL; +- else if (canonbuf == NULL) ++ else if (canon == NULL) + { +- canonbuf = __strdup (air->canon); ++ char *canonbuf = __strdup (air->canon); + if (canonbuf == NULL) + { + result = -EAI_MEMORY; +@@ -748,9 +798,9 @@ gaih_inet (const char *name, const struct gaih_service *service, + /* Always start afresh; continue should discard previous results + and the hosts database does not support merge. */ + at = NULL; +- free (canonbuf); ++ free (canon); + free (addrmem); +- canon = canonbuf = NULL; ++ canon = NULL; + addrmem = NULL; + got_ipv6 = false; + +@@ -805,7 +855,16 @@ gaih_inet (const char *name, const struct gaih_service *service, + no_data = 1; + + if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL) +- canon = at->name; ++ { ++ char *canonbuf = __strdup (at->name); ++ if (canonbuf == NULL) ++ { ++ __resolv_context_put (res_ctx); ++ result = -EAI_MEMORY; ++ goto free_and_return; ++ } ++ canon = canonbuf; ++ } + + struct gaih_addrtuple **pat = &at; + +@@ -893,7 +952,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + if ((req->ai_flags & AI_CANONNAME) != 0 + && canon == NULL) + { +- canonbuf = getcanonname (nip, at, name); ++ char *canonbuf = getcanonname (nip, at, name); + if (canonbuf == NULL) + { + __resolv_context_put (res_ctx); +@@ -1004,6 +1063,10 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + + { ++ /* Set up the canonical name if we need it. */ ++ if ((result = process_canonname (req, orig_name, &canon)) != 0) ++ goto free_and_return; ++ + struct gaih_servtuple *st2; + struct gaih_addrtuple *at2 = at; + size_t socklen; +@@ -1014,48 +1077,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + */ + while (at2 != NULL) + { +- /* Only the first entry gets the canonical name. */ +- if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0) +- { +- if (canon == NULL) +- /* If the canonical name cannot be determined, use +- the passed in string. */ +- canon = orig_name; +- +- bool do_idn = req->ai_flags & AI_CANONIDN; +- if (do_idn) +- { +- char *out; +- int rc = __idna_from_dns_encoding (canon, &out); +- if (rc == 0) +- canon = out; +- else if (rc == EAI_IDN_ENCODE) +- /* Use the punycode name as a fallback. */ +- do_idn = false; +- else +- { +- result = -rc; +- goto free_and_return; +- } +- } +- if (!do_idn) +- { +- if (canonbuf != NULL) +- /* We already allocated the string using malloc, but +- the buffer is now owned by canon. */ +- canonbuf = NULL; +- else +- { +- canon = __strdup (canon); +- if (canon == NULL) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- } +- } +- } +- + family = at2->family; + if (family == AF_INET6) + { +@@ -1078,7 +1099,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + ai = *pai = malloc (sizeof (struct addrinfo) + socklen); + if (ai == NULL) + { +- free ((char *) canon); + result = -EAI_MEMORY; + goto free_and_return; + } +@@ -1138,7 +1158,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + if (malloc_name) + free ((char *) name); + free (addrmem); +- free (canonbuf); ++ free (canon); + + return result; + } + +From d02808dee9f7e7fa950d83c12ecdbc13053e85e5 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Thu, 3 Mar 2022 23:07:42 +0530 +Subject: [PATCH] getaddrinfo: Fix leak with AI_ALL [BZ #28852] + +Use realloc in convert_hostent_to_gaih_addrtuple and fix up pointers in +the result list so that a single block is maintained for +hostbyname3_r/hostbyname2_r and freed in gaih_inet. This result is +never merged with any other results, since the hosts database does not +permit merging. + +Resolves BZ #28852. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit 300460460706ce3ffe29a7df8966e68323ec5bf1) +--- + sysdeps/posix/getaddrinfo.c | 34 +++++++++++++++++++++++++--------- + 1 file changed, 25 insertions(+), 9 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 0629fd147b..e9deb2da6a 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -189,19 +189,16 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, + return 0; + } + +-/* Convert struct hostent to a list of struct gaih_addrtuple objects. +- h_name is not copied, and the struct hostent object must not be +- deallocated prematurely. *RESULT must be NULL or a pointer to a +- linked-list. The new addresses are appended at the end. */ ++/* Convert struct hostent to a list of struct gaih_addrtuple objects. h_name ++ is not copied, and the struct hostent object must not be deallocated ++ prematurely. The new addresses are appended to the tuple array in ++ RESULT. */ + static bool + convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + int family, + struct hostent *h, + struct gaih_addrtuple **result) + { +- while (*result) +- result = &(*result)->next; +- + /* Count the number of addresses in h->h_addr_list. */ + size_t count = 0; + for (char **p = h->h_addr_list; *p != NULL; ++p) +@@ -212,10 +209,30 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + if (count == 0 || h->h_length > sizeof (((struct gaih_addrtuple) {}).addr)) + return true; + +- struct gaih_addrtuple *array = calloc (count, sizeof (*array)); ++ struct gaih_addrtuple *array = *result; ++ size_t old = 0; ++ ++ while (array != NULL) ++ { ++ old++; ++ array = array->next; ++ } ++ ++ array = realloc (*result, (old + count) * sizeof (*array)); ++ + if (array == NULL) + return false; + ++ *result = array; ++ ++ /* Update the next pointers on reallocation. */ ++ for (size_t i = 0; i < old; i++) ++ array[i].next = array + i + 1; ++ ++ array += old; ++ ++ memset (array, 0, count * sizeof (*array)); ++ + for (size_t i = 0; i < count; ++i) + { + if (family == AF_INET && req->ai_family == AF_INET6) +@@ -235,7 +252,6 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + array[0].name = h->h_name; + array[count - 1].next = NULL; + +- *result = array; + return true; + } + + +From 9aad91abe66550541043fe8d4a5171bc53a37418 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Thu, 10 Feb 2022 13:27:11 +0530 +Subject: [PATCH] gaih_inet: Simplify service resolution + +Refactor the code to split out the service resolution code into a +separate function. Allocate the service tuples array just once to the +size of the typeproto array, thus avoiding the unnecessary pointer +chasing and stack allocations. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit 8d6cf99f2fb81a097f9334c125e5c23604af1a98) +--- + sysdeps/posix/getaddrinfo.c | 178 ++++++++++++++++-------------------- + 1 file changed, 78 insertions(+), 100 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index e9deb2da6a..dae5e9f55f 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -100,14 +100,12 @@ struct gaih_service + + struct gaih_servtuple + { +- struct gaih_servtuple *next; + int socktype; + int protocol; + int port; ++ bool set; + }; + +-static const struct gaih_servtuple nullserv; +- + + struct gaih_typeproto + { +@@ -180,11 +178,11 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, + } + while (r); + +- st->next = NULL; + st->socktype = tp->socktype; + st->protocol = ((tp->protoflag & GAI_PROTO_PROTOANY) + ? req->ai_protocol : tp->protocol); + st->port = s->s_port; ++ st->set = true; + + return 0; + } +@@ -375,20 +373,11 @@ process_canonname (const struct addrinfo *req, const char *orig_name, + } + + static int +-gaih_inet (const char *name, const struct gaih_service *service, +- const struct addrinfo *req, struct addrinfo **pai, +- unsigned int *naddrs, struct scratch_buffer *tmpbuf) ++get_servtuples (const struct gaih_service *service, const struct addrinfo *req, ++ struct gaih_servtuple *st, struct scratch_buffer *tmpbuf) + { ++ int i; + const struct gaih_typeproto *tp = gaih_inet_typeproto; +- struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv; +- struct gaih_addrtuple *at = NULL; +- bool got_ipv6 = false; +- char *canon = NULL; +- const char *orig_name = name; +- +- /* Reserve stack memory for the scratch buffer in the getaddrinfo +- function. */ +- size_t alloca_used = sizeof (struct scratch_buffer); + + if (req->ai_protocol || req->ai_socktype) + { +@@ -410,98 +399,88 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + } + +- int port = 0; +- if (service != NULL) ++ if (service != NULL && (tp->protoflag & GAI_PROTO_NOSERVICE) != 0) ++ return -EAI_SERVICE; ++ ++ if (service == NULL || service->num >= 0) + { +- if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0) +- return -EAI_SERVICE; ++ int port = service != NULL ? htons (service->num) : 0; + +- if (service->num < 0) ++ if (req->ai_socktype || req->ai_protocol) + { +- if (tp->name[0]) +- { +- st = (struct gaih_servtuple *) +- alloca_account (sizeof (struct gaih_servtuple), alloca_used); +- +- int rc = gaih_inet_serv (service->name, tp, req, st, tmpbuf); +- if (__glibc_unlikely (rc != 0)) +- return rc; +- } +- else +- { +- struct gaih_servtuple **pst = &st; +- for (tp++; tp->name[0]; tp++) +- { +- struct gaih_servtuple *newp; ++ st[0].socktype = tp->socktype; ++ st[0].protocol = ((tp->protoflag & GAI_PROTO_PROTOANY) ++ ? req->ai_protocol : tp->protocol); ++ st[0].port = port; ++ st[0].set = true; + +- if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0) +- continue; ++ return 0; ++ } + +- if (req->ai_socktype != 0 +- && req->ai_socktype != tp->socktype) +- continue; +- if (req->ai_protocol != 0 +- && !(tp->protoflag & GAI_PROTO_PROTOANY) +- && req->ai_protocol != tp->protocol) +- continue; ++ /* Neither socket type nor protocol is set. Return all socket types ++ we know about. */ ++ for (i = 0, ++tp; tp->name[0]; ++tp) ++ if (tp->defaultflag) ++ { ++ st[i].socktype = tp->socktype; ++ st[i].protocol = tp->protocol; ++ st[i].port = port; ++ st[i++].set = true; ++ } + +- newp = (struct gaih_servtuple *) +- alloca_account (sizeof (struct gaih_servtuple), +- alloca_used); ++ return 0; ++ } + +- if (gaih_inet_serv (service->name, +- tp, req, newp, tmpbuf) != 0) +- continue; ++ if (tp->name[0]) ++ return gaih_inet_serv (service->name, tp, req, st, tmpbuf); + +- *pst = newp; +- pst = &(newp->next); +- } +- if (st == (struct gaih_servtuple *) &nullserv) +- return -EAI_SERVICE; +- } +- } +- else +- { +- port = htons (service->num); +- goto got_port; +- } +- } +- else ++ for (i = 0, tp++; tp->name[0]; tp++) + { +- got_port: ++ if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0) ++ continue; + +- if (req->ai_socktype || req->ai_protocol) +- { +- st = alloca_account (sizeof (struct gaih_servtuple), alloca_used); +- st->next = NULL; +- st->socktype = tp->socktype; +- st->protocol = ((tp->protoflag & GAI_PROTO_PROTOANY) +- ? req->ai_protocol : tp->protocol); +- st->port = port; +- } +- else +- { +- /* Neither socket type nor protocol is set. Return all socket types +- we know about. */ +- struct gaih_servtuple **lastp = &st; +- for (++tp; tp->name[0]; ++tp) +- if (tp->defaultflag) +- { +- struct gaih_servtuple *newp; ++ if (req->ai_socktype != 0 ++ && req->ai_socktype != tp->socktype) ++ continue; ++ if (req->ai_protocol != 0 ++ && !(tp->protoflag & GAI_PROTO_PROTOANY) ++ && req->ai_protocol != tp->protocol) ++ continue; + +- newp = alloca_account (sizeof (struct gaih_servtuple), +- alloca_used); +- newp->next = NULL; +- newp->socktype = tp->socktype; +- newp->protocol = tp->protocol; +- newp->port = port; ++ if (gaih_inet_serv (service->name, ++ tp, req, &st[i], tmpbuf) != 0) ++ continue; + +- *lastp = newp; +- lastp = &newp->next; +- } +- } ++ i++; + } + ++ if (!st[0].set) ++ return -EAI_SERVICE; ++ ++ return 0; ++} ++ ++static int ++gaih_inet (const char *name, const struct gaih_service *service, ++ const struct addrinfo *req, struct addrinfo **pai, ++ unsigned int *naddrs, struct scratch_buffer *tmpbuf) ++{ ++ struct gaih_servtuple st[sizeof (gaih_inet_typeproto) ++ / sizeof (struct gaih_typeproto)] = {0}; ++ ++ struct gaih_addrtuple *at = NULL; ++ bool got_ipv6 = false; ++ char *canon = NULL; ++ const char *orig_name = name; ++ ++ /* Reserve stack memory for the scratch buffer in the getaddrinfo ++ function. */ ++ size_t alloca_used = sizeof (struct scratch_buffer); ++ ++ int rc; ++ if ((rc = get_servtuples (service, req, st, tmpbuf)) != 0) ++ return rc; ++ + bool malloc_name = false; + struct gaih_addrtuple *addrmem = NULL; + int result = 0; +@@ -1083,7 +1062,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + if ((result = process_canonname (req, orig_name, &canon)) != 0) + goto free_and_return; + +- struct gaih_servtuple *st2; + struct gaih_addrtuple *at2 = at; + size_t socklen; + sa_family_t family; +@@ -1109,7 +1087,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + else + socklen = sizeof (struct sockaddr_in); + +- for (st2 = st; st2 != NULL; st2 = st2->next) ++ for (int i = 0; st[i].set; i++) + { + struct addrinfo *ai; + ai = *pai = malloc (sizeof (struct addrinfo) + socklen); +@@ -1121,8 +1099,8 @@ gaih_inet (const char *name, const struct gaih_service *service, + + ai->ai_flags = req->ai_flags; + ai->ai_family = family; +- ai->ai_socktype = st2->socktype; +- ai->ai_protocol = st2->protocol; ++ ai->ai_socktype = st[i].socktype; ++ ai->ai_protocol = st[i].protocol; + ai->ai_addrlen = socklen; + ai->ai_addr = (void *) (ai + 1); + +@@ -1144,7 +1122,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct sockaddr_in6 *sin6p = + (struct sockaddr_in6 *) ai->ai_addr; + +- sin6p->sin6_port = st2->port; ++ sin6p->sin6_port = st[i].port; + sin6p->sin6_flowinfo = 0; + memcpy (&sin6p->sin6_addr, + at2->addr, sizeof (struct in6_addr)); +@@ -1154,7 +1132,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + { + struct sockaddr_in *sinp = + (struct sockaddr_in *) ai->ai_addr; +- sinp->sin_port = st2->port; ++ sinp->sin_port = st[i].port; + memcpy (&sinp->sin_addr, + at2->addr, sizeof (struct in_addr)); + memset (sinp->sin_zero, '\0', sizeof (sinp->sin_zero)); + +From 571c531b3ba5e6ae848992cd4f6e19ab63eb564a Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 14:08:51 +0530 +Subject: [PATCH] gaih_inet: make numeric lookup a separate routine + +Introduce the gaih_result structure and general paradigm for cleanups +that follow to process the lookup request and return a result. A lookup +function (like text_to_binary_address), should return an integer error +code and set members of gaih_result based on what it finds. If the +function does not have a result and no errors have occurred during the +lookup, it should return 0 and res.at should be set to NULL, allowing a +subsequent function to do the lookup until we run out of options. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit 26dea461191cca519b498890a9682fe4bc8e4c2f) +--- + sysdeps/posix/getaddrinfo.c | 891 ++++++++++++++++++------------------ + 1 file changed, 452 insertions(+), 439 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index dae5e9f55f..19bb13db59 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -116,6 +116,12 @@ struct gaih_typeproto + char name[8]; + }; + ++struct gaih_result ++{ ++ struct gaih_addrtuple *at; ++ char *canon; ++}; ++ + /* Values for `protoflag'. */ + #define GAI_PROTO_NOSERVICE 1 + #define GAI_PROTO_PROTOANY 2 +@@ -297,7 +303,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + } \ + *pat = addrmem; \ + \ +- if (localcanon != NULL && canon == NULL) \ ++ if (localcanon != NULL && res.canon == NULL) \ + { \ + char *canonbuf = __strdup (localcanon); \ + if (canonbuf == NULL) \ +@@ -306,7 +312,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + result = -EAI_SYSTEM; \ + goto free_and_return; \ + } \ +- canon = canonbuf; \ ++ res.canon = canonbuf; \ + } \ + if (_family == AF_INET6 && *pat != NULL) \ + got_ipv6 = true; \ +@@ -342,9 +348,9 @@ getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name) + + static int + process_canonname (const struct addrinfo *req, const char *orig_name, +- char **canonp) ++ struct gaih_result *res) + { +- char *canon = *canonp; ++ char *canon = res->canon; + + if ((req->ai_flags & AI_CANONNAME) != 0) + { +@@ -368,7 +374,7 @@ process_canonname (const struct addrinfo *req, const char *orig_name, + return -EAI_MEMORY; + } + +- *canonp = canon; ++ res->canon = canon; + return 0; + } + +@@ -460,6 +466,105 @@ get_servtuples (const struct gaih_service *service, const struct addrinfo *req, + return 0; + } + ++/* Convert numeric addresses to binary into RES. On failure, RES->AT is set to ++ NULL and an error code is returned. If AI_NUMERIC_HOST is not requested and ++ the function cannot determine a result, RES->AT is set to NULL and 0 ++ returned. */ ++ ++static int ++text_to_binary_address (const char *name, const struct addrinfo *req, ++ struct gaih_result *res) ++{ ++ struct gaih_addrtuple *at = res->at; ++ int result = 0; ++ ++ assert (at != NULL); ++ ++ memset (at->addr, 0, sizeof (at->addr)); ++ if (__inet_aton_exact (name, (struct in_addr *) at->addr) != 0) ++ { ++ if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) ++ at->family = AF_INET; ++ else if (req->ai_family == AF_INET6 && (req->ai_flags & AI_V4MAPPED)) ++ { ++ at->addr[3] = at->addr[0]; ++ at->addr[2] = htonl (0xffff); ++ at->addr[1] = 0; ++ at->addr[0] = 0; ++ at->family = AF_INET6; ++ } ++ else ++ { ++ result = -EAI_ADDRFAMILY; ++ goto out; ++ } ++ ++ if (req->ai_flags & AI_CANONNAME) ++ { ++ char *canonbuf = __strdup (name); ++ if (canonbuf == NULL) ++ { ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ res->canon = canonbuf; ++ } ++ return 0; ++ } ++ ++ char *scope_delim = strchr (name, SCOPE_DELIMITER); ++ int e; ++ ++ if (scope_delim == NULL) ++ e = inet_pton (AF_INET6, name, at->addr); ++ else ++ e = __inet_pton_length (AF_INET6, name, scope_delim - name, at->addr); ++ ++ if (e > 0) ++ { ++ if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) ++ at->family = AF_INET6; ++ else if (req->ai_family == AF_INET ++ && IN6_IS_ADDR_V4MAPPED (at->addr)) ++ { ++ at->addr[0] = at->addr[3]; ++ at->family = AF_INET; ++ } ++ else ++ { ++ result = -EAI_ADDRFAMILY; ++ goto out; ++ } ++ ++ if (scope_delim != NULL ++ && __inet6_scopeid_pton ((struct in6_addr *) at->addr, ++ scope_delim + 1, &at->scopeid) != 0) ++ { ++ result = -EAI_NONAME; ++ goto out; ++ } ++ ++ if (req->ai_flags & AI_CANONNAME) ++ { ++ char *canonbuf = __strdup (name); ++ if (canonbuf == NULL) ++ { ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ res->canon = canonbuf; ++ } ++ return 0; ++ } ++ ++ if ((req->ai_flags & AI_NUMERICHOST)) ++ result = -EAI_NONAME; ++ ++out: ++ res->at = NULL; ++ return result; ++} ++ + static int + gaih_inet (const char *name, const struct gaih_service *service, + const struct addrinfo *req, struct addrinfo **pai, +@@ -468,9 +573,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct gaih_servtuple st[sizeof (gaih_inet_typeproto) + / sizeof (struct gaih_typeproto)] = {0}; + +- struct gaih_addrtuple *at = NULL; + bool got_ipv6 = false; +- char *canon = NULL; + const char *orig_name = name; + + /* Reserve stack memory for the scratch buffer in the getaddrinfo +@@ -485,6 +588,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct gaih_addrtuple *addrmem = NULL; + int result = 0; + ++ struct gaih_result res = {0}; + if (name != NULL) + { + if (req->ai_flags & AI_IDN) +@@ -497,533 +601,441 @@ gaih_inet (const char *name, const struct gaih_service *service, + malloc_name = true; + } + +- uint32_t addr[4]; +- if (__inet_aton_exact (name, (struct in_addr *) addr) != 0) ++ res.at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used); ++ res.at->scopeid = 0; ++ res.at->next = NULL; ++ ++ if ((result = text_to_binary_address (name, req, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; ++ ++ int no_data = 0; ++ int no_inet6_data = 0; ++ nss_action_list nip; ++ enum nss_status inet6_status = NSS_STATUS_UNAVAIL; ++ enum nss_status status = NSS_STATUS_UNAVAIL; ++ int no_more; ++ struct resolv_context *res_ctx = NULL; ++ bool do_merge = false; ++ ++ /* If we do not have to look for IPv6 addresses or the canonical ++ name, use the simple, old functions, which do not support ++ IPv6 scope ids, nor retrieving the canonical name. */ ++ if (req->ai_family == AF_INET ++ && (req->ai_flags & AI_CANONNAME) == 0) + { +- at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used); +- at->scopeid = 0; +- at->next = NULL; +- +- if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) +- { +- memcpy (at->addr, addr, sizeof (at->addr)); +- at->family = AF_INET; +- } +- else if (req->ai_family == AF_INET6 && (req->ai_flags & AI_V4MAPPED)) +- { +- at->addr[3] = addr[0]; +- at->addr[2] = htonl (0xffff); +- at->addr[1] = 0; +- at->addr[0] = 0; +- at->family = AF_INET6; +- } +- else +- { +- result = -EAI_ADDRFAMILY; +- goto free_and_return; +- } ++ int rc; ++ struct hostent th; ++ struct hostent *h; + +- if (req->ai_flags & AI_CANONNAME) ++ while (1) + { +- char *canonbuf = __strdup (name); +- if (canonbuf == NULL) ++ rc = __gethostbyname2_r (name, AF_INET, &th, ++ tmpbuf->data, tmpbuf->length, ++ &h, &h_errno); ++ if (rc != ERANGE || h_errno != NETDB_INTERNAL) ++ break; ++ if (!scratch_buffer_grow (tmpbuf)) + { + result = -EAI_MEMORY; + goto free_and_return; + } +- canon = canonbuf; + } + +- goto process_list; +- } +- +- char *scope_delim = strchr (name, SCOPE_DELIMITER); +- int e; +- +- if (scope_delim == NULL) +- e = inet_pton (AF_INET6, name, addr); +- else +- e = __inet_pton_length (AF_INET6, name, scope_delim - name, addr); +- +- if (e > 0) +- { +- at = alloca_account (sizeof (struct gaih_addrtuple), +- alloca_used); +- at->scopeid = 0; +- at->next = NULL; +- +- if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) +- { +- memcpy (at->addr, addr, sizeof (at->addr)); +- at->family = AF_INET6; +- } +- else if (req->ai_family == AF_INET +- && IN6_IS_ADDR_V4MAPPED (addr)) ++ if (rc == 0) + { +- at->addr[0] = addr[3]; +- at->addr[1] = addr[1]; +- at->addr[2] = addr[2]; +- at->addr[3] = addr[3]; +- at->family = AF_INET; ++ if (h != NULL) ++ { ++ /* We found data, convert it. */ ++ if (!convert_hostent_to_gaih_addrtuple ++ (req, AF_INET, h, &addrmem)) ++ { ++ result = -EAI_MEMORY; ++ goto free_and_return; ++ } ++ res.at = addrmem; ++ } ++ else ++ { ++ if (h_errno == NO_DATA) ++ result = -EAI_NODATA; ++ else ++ result = -EAI_NONAME; ++ goto free_and_return; ++ } + } + else + { +- result = -EAI_ADDRFAMILY; +- goto free_and_return; +- } ++ if (h_errno == NETDB_INTERNAL) ++ result = -EAI_SYSTEM; ++ else if (h_errno == TRY_AGAIN) ++ result = -EAI_AGAIN; ++ else ++ /* We made requests but they turned out no data. ++ The name is known, though. */ ++ result = -EAI_NODATA; + +- if (scope_delim != NULL +- && __inet6_scopeid_pton ((struct in6_addr *) at->addr, +- scope_delim + 1, +- &at->scopeid) != 0) +- { +- result = -EAI_NONAME; + goto free_and_return; + } + +- if (req->ai_flags & AI_CANONNAME) ++ goto process_list; ++ } ++ ++#ifdef USE_NSCD ++ if (__nss_not_use_nscd_hosts > 0 ++ && ++__nss_not_use_nscd_hosts > NSS_NSCD_RETRY) ++ __nss_not_use_nscd_hosts = 0; ++ ++ if (!__nss_not_use_nscd_hosts ++ && !__nss_database_custom[NSS_DBSIDX_hosts]) ++ { ++ /* Try to use nscd. */ ++ struct nscd_ai_result *air = NULL; ++ int err = __nscd_getai (name, &air, &h_errno); ++ if (air != NULL) + { +- char *canonbuf = __strdup (name); +- if (canonbuf == NULL) ++ /* Transform into gaih_addrtuple list. */ ++ bool added_canon = (req->ai_flags & AI_CANONNAME) == 0; ++ char *addrs = air->addrs; ++ ++ addrmem = calloc (air->naddrs, sizeof (*addrmem)); ++ if (addrmem == NULL) + { + result = -EAI_MEMORY; + goto free_and_return; + } +- canon = canonbuf; +- } + +- goto process_list; +- } +- +- if ((req->ai_flags & AI_NUMERICHOST) == 0) +- { +- int no_data = 0; +- int no_inet6_data = 0; +- nss_action_list nip; +- enum nss_status inet6_status = NSS_STATUS_UNAVAIL; +- enum nss_status status = NSS_STATUS_UNAVAIL; +- int no_more; +- struct resolv_context *res_ctx = NULL; +- bool do_merge = false; +- +- /* If we do not have to look for IPv6 addresses or the canonical +- name, use the simple, old functions, which do not support +- IPv6 scope ids, nor retrieving the canonical name. */ +- if (req->ai_family == AF_INET +- && (req->ai_flags & AI_CANONNAME) == 0) +- { +- int rc; +- struct hostent th; +- struct hostent *h; ++ struct gaih_addrtuple *addrfree = addrmem; ++ struct gaih_addrtuple **pat = &res.at; + +- while (1) ++ for (int i = 0; i < air->naddrs; ++i) + { +- rc = __gethostbyname2_r (name, AF_INET, &th, +- tmpbuf->data, tmpbuf->length, +- &h, &h_errno); +- if (rc != ERANGE || h_errno != NETDB_INTERNAL) +- break; +- if (!scratch_buffer_grow (tmpbuf)) ++ socklen_t size = (air->family[i] == AF_INET ++ ? INADDRSZ : IN6ADDRSZ); ++ ++ if (!((air->family[i] == AF_INET ++ && req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED) != 0) ++ || req->ai_family == AF_UNSPEC ++ || air->family[i] == req->ai_family)) + { +- result = -EAI_MEMORY; +- goto free_and_return; ++ /* Skip over non-matching result. */ ++ addrs += size; ++ continue; + } +- } + +- if (rc == 0) +- { +- if (h != NULL) ++ if (*pat == NULL) ++ { ++ *pat = addrfree++; ++ (*pat)->scopeid = 0; ++ } ++ uint32_t *pataddr = (*pat)->addr; ++ (*pat)->next = NULL; ++ if (added_canon || air->canon == NULL) ++ (*pat)->name = NULL; ++ else if (res.canon == NULL) + { +- /* We found data, convert it. */ +- if (!convert_hostent_to_gaih_addrtuple +- (req, AF_INET, h, &addrmem)) ++ char *canonbuf = __strdup (air->canon); ++ if (canonbuf == NULL) + { + result = -EAI_MEMORY; + goto free_and_return; + } +- at = addrmem; ++ res.canon = (*pat)->name = canonbuf; + } +- else ++ ++ if (air->family[i] == AF_INET ++ && req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED)) + { +- if (h_errno == NO_DATA) +- result = -EAI_NODATA; +- else +- result = -EAI_NONAME; +- goto free_and_return; ++ (*pat)->family = AF_INET6; ++ pataddr[3] = *(uint32_t *) addrs; ++ pataddr[2] = htonl (0xffff); ++ pataddr[1] = 0; ++ pataddr[0] = 0; ++ pat = &((*pat)->next); ++ added_canon = true; ++ } ++ else if (req->ai_family == AF_UNSPEC ++ || air->family[i] == req->ai_family) ++ { ++ (*pat)->family = air->family[i]; ++ memcpy (pataddr, addrs, size); ++ pat = &((*pat)->next); ++ added_canon = true; ++ if (air->family[i] == AF_INET6) ++ got_ipv6 = true; + } ++ addrs += size; + } +- else +- { +- if (h_errno == NETDB_INTERNAL) +- result = -EAI_SYSTEM; +- else if (h_errno == TRY_AGAIN) +- result = -EAI_AGAIN; +- else +- /* We made requests but they turned out no data. +- The name is known, though. */ +- result = -EAI_NODATA; + +- goto free_and_return; +- } ++ free (air); + + goto process_list; + } ++ else if (err == 0) ++ /* The database contains a negative entry. */ ++ goto free_and_return; ++ else if (__nss_not_use_nscd_hosts == 0) ++ { ++ if (h_errno == NETDB_INTERNAL && errno == ENOMEM) ++ result = -EAI_MEMORY; ++ else if (h_errno == TRY_AGAIN) ++ result = -EAI_AGAIN; ++ else ++ result = -EAI_SYSTEM; + +-#ifdef USE_NSCD +- if (__nss_not_use_nscd_hosts > 0 +- && ++__nss_not_use_nscd_hosts > NSS_NSCD_RETRY) +- __nss_not_use_nscd_hosts = 0; ++ goto free_and_return; ++ } ++ } ++#endif ++ ++ no_more = !__nss_database_get (nss_database_hosts, &nip); + +- if (!__nss_not_use_nscd_hosts +- && !__nss_database_custom[NSS_DBSIDX_hosts]) ++ /* If we are looking for both IPv4 and IPv6 address we don't ++ want the lookup functions to automatically promote IPv4 ++ addresses to IPv6 addresses, so we use the no_inet6 ++ function variant. */ ++ res_ctx = __resolv_context_get (); ++ if (res_ctx == NULL) ++ no_more = 1; ++ ++ while (!no_more) ++ { ++ /* Always start afresh; continue should discard previous results ++ and the hosts database does not support merge. */ ++ res.at = NULL; ++ free (res.canon); ++ free (addrmem); ++ res.canon = NULL; ++ addrmem = NULL; ++ got_ipv6 = false; ++ ++ if (do_merge) + { +- /* Try to use nscd. */ +- struct nscd_ai_result *air = NULL; +- int err = __nscd_getai (name, &air, &h_errno); +- if (air != NULL) ++ __set_h_errno (NETDB_INTERNAL); ++ __set_errno (EBUSY); ++ break; ++ } ++ ++ no_data = 0; ++ nss_gethostbyname4_r *fct4 = NULL; ++ ++ /* gethostbyname4_r sends out parallel A and AAAA queries and ++ is thus only suitable for PF_UNSPEC. */ ++ if (req->ai_family == PF_UNSPEC) ++ fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); ++ ++ if (fct4 != NULL) ++ { ++ while (1) + { +- /* Transform into gaih_addrtuple list. */ +- bool added_canon = (req->ai_flags & AI_CANONNAME) == 0; +- char *addrs = air->addrs; ++ status = DL_CALL_FCT (fct4, (name, &res.at, ++ tmpbuf->data, tmpbuf->length, ++ &errno, &h_errno, ++ NULL)); ++ if (status == NSS_STATUS_SUCCESS) ++ break; ++ /* gethostbyname4_r may write into AT, so reset it. */ ++ res.at = NULL; ++ if (status != NSS_STATUS_TRYAGAIN ++ || errno != ERANGE || h_errno != NETDB_INTERNAL) ++ { ++ if (h_errno == TRY_AGAIN) ++ no_data = EAI_AGAIN; ++ else ++ no_data = h_errno == NO_DATA; ++ break; ++ } + +- addrmem = calloc (air->naddrs, sizeof (*addrmem)); +- if (addrmem == NULL) ++ if (!scratch_buffer_grow (tmpbuf)) + { ++ __resolv_context_put (res_ctx); + result = -EAI_MEMORY; + goto free_and_return; + } ++ } + +- struct gaih_addrtuple *addrfree = addrmem; +- struct gaih_addrtuple **pat = &at; ++ if (status == NSS_STATUS_SUCCESS) ++ { ++ assert (!no_data); ++ no_data = 1; + +- for (int i = 0; i < air->naddrs; ++i) ++ if ((req->ai_flags & AI_CANONNAME) != 0 && res.canon == NULL) + { +- socklen_t size = (air->family[i] == AF_INET +- ? INADDRSZ : IN6ADDRSZ); +- +- if (!((air->family[i] == AF_INET +- && req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) != 0) +- || req->ai_family == AF_UNSPEC +- || air->family[i] == req->ai_family)) ++ char *canonbuf = __strdup (res.at->name); ++ if (canonbuf == NULL) + { +- /* Skip over non-matching result. */ +- addrs += size; +- continue; ++ __resolv_context_put (res_ctx); ++ result = -EAI_MEMORY; ++ goto free_and_return; + } ++ res.canon = canonbuf; ++ } + +- if (*pat == NULL) +- { +- *pat = addrfree++; +- (*pat)->scopeid = 0; +- } +- uint32_t *pataddr = (*pat)->addr; +- (*pat)->next = NULL; +- if (added_canon || air->canon == NULL) +- (*pat)->name = NULL; +- else if (canon == NULL) +- { +- char *canonbuf = __strdup (air->canon); +- if (canonbuf == NULL) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- canon = (*pat)->name = canonbuf; +- } ++ struct gaih_addrtuple **pat = &res.at; + +- if (air->family[i] == AF_INET ++ while (*pat != NULL) ++ { ++ if ((*pat)->family == AF_INET + && req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED)) ++ && (req->ai_flags & AI_V4MAPPED) != 0) + { ++ uint32_t *pataddr = (*pat)->addr; + (*pat)->family = AF_INET6; +- pataddr[3] = *(uint32_t *) addrs; ++ pataddr[3] = pataddr[0]; + pataddr[2] = htonl (0xffff); + pataddr[1] = 0; + pataddr[0] = 0; + pat = &((*pat)->next); +- added_canon = true; ++ no_data = 0; + } + else if (req->ai_family == AF_UNSPEC +- || air->family[i] == req->ai_family) ++ || (*pat)->family == req->ai_family) + { +- (*pat)->family = air->family[i]; +- memcpy (pataddr, addrs, size); + pat = &((*pat)->next); +- added_canon = true; +- if (air->family[i] == AF_INET6) ++ ++ no_data = 0; ++ if (req->ai_family == AF_INET6) + got_ipv6 = true; + } +- addrs += size; ++ else ++ *pat = ((*pat)->next); + } +- +- free (air); +- +- goto process_list; + } +- else if (err == 0) +- /* The database contains a negative entry. */ +- goto free_and_return; +- else if (__nss_not_use_nscd_hosts == 0) +- { +- if (h_errno == NETDB_INTERNAL && errno == ENOMEM) +- result = -EAI_MEMORY; +- else if (h_errno == TRY_AGAIN) +- result = -EAI_AGAIN; +- else +- result = -EAI_SYSTEM; + +- goto free_and_return; +- } ++ no_inet6_data = no_data; + } +-#endif +- +- no_more = !__nss_database_get (nss_database_hosts, &nip); +- +- /* If we are looking for both IPv4 and IPv6 address we don't +- want the lookup functions to automatically promote IPv4 +- addresses to IPv6 addresses, so we use the no_inet6 +- function variant. */ +- res_ctx = __resolv_context_get (); +- if (res_ctx == NULL) +- no_more = 1; +- +- while (!no_more) ++ else + { +- /* Always start afresh; continue should discard previous results +- and the hosts database does not support merge. */ +- at = NULL; +- free (canon); +- free (addrmem); +- canon = NULL; +- addrmem = NULL; +- got_ipv6 = false; +- +- if (do_merge) ++ nss_gethostbyname3_r *fct = NULL; ++ if (req->ai_flags & AI_CANONNAME) ++ /* No need to use this function if we do not look for ++ the canonical name. The function does not exist in ++ all NSS modules and therefore the lookup would ++ often fail. */ ++ fct = __nss_lookup_function (nip, "gethostbyname3_r"); ++ if (fct == NULL) ++ /* We are cheating here. The gethostbyname2_r ++ function does not have the same interface as ++ gethostbyname3_r but the extra arguments the ++ latter takes are added at the end. So the ++ gethostbyname2_r code will just ignore them. */ ++ fct = __nss_lookup_function (nip, "gethostbyname2_r"); ++ ++ if (fct != NULL) + { +- __set_h_errno (NETDB_INTERNAL); +- __set_errno (EBUSY); +- break; +- } +- +- no_data = 0; +- nss_gethostbyname4_r *fct4 = NULL; +- +- /* gethostbyname4_r sends out parallel A and AAAA queries and +- is thus only suitable for PF_UNSPEC. */ +- if (req->ai_family == PF_UNSPEC) +- fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); ++ struct gaih_addrtuple **pat = &res.at; + +- if (fct4 != NULL) +- { +- while (1) ++ if (req->ai_family == AF_INET6 ++ || req->ai_family == AF_UNSPEC) + { +- status = DL_CALL_FCT (fct4, (name, &at, +- tmpbuf->data, tmpbuf->length, +- &errno, &h_errno, +- NULL)); +- if (status == NSS_STATUS_SUCCESS) +- break; +- /* gethostbyname4_r may write into AT, so reset it. */ +- at = NULL; +- if (status != NSS_STATUS_TRYAGAIN +- || errno != ERANGE || h_errno != NETDB_INTERNAL) +- { +- if (h_errno == TRY_AGAIN) +- no_data = EAI_AGAIN; +- else +- no_data = h_errno == NO_DATA; +- break; +- } ++ gethosts (AF_INET6); ++ no_inet6_data = no_data; ++ inet6_status = status; ++ } ++ if (req->ai_family == AF_INET ++ || req->ai_family == AF_UNSPEC ++ || (req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED) ++ /* Avoid generating the mapped addresses if we ++ know we are not going to need them. */ ++ && ((req->ai_flags & AI_ALL) || !got_ipv6))) ++ { ++ gethosts (AF_INET); + +- if (!scratch_buffer_grow (tmpbuf)) ++ if (req->ai_family == AF_INET) + { +- __resolv_context_put (res_ctx); +- result = -EAI_MEMORY; +- goto free_and_return; ++ no_inet6_data = no_data; ++ inet6_status = status; + } + } + +- if (status == NSS_STATUS_SUCCESS) ++ /* If we found one address for AF_INET or AF_INET6, ++ don't continue the search. */ ++ if (inet6_status == NSS_STATUS_SUCCESS ++ || status == NSS_STATUS_SUCCESS) + { +- assert (!no_data); +- no_data = 1; +- +- if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL) ++ if ((req->ai_flags & AI_CANONNAME) != 0 ++ && res.canon == NULL) + { +- char *canonbuf = __strdup (at->name); ++ char *canonbuf = getcanonname (nip, res.at, name); + if (canonbuf == NULL) + { + __resolv_context_put (res_ctx); + result = -EAI_MEMORY; + goto free_and_return; + } +- canon = canonbuf; +- } +- +- struct gaih_addrtuple **pat = &at; +- +- while (*pat != NULL) +- { +- if ((*pat)->family == AF_INET +- && req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) != 0) +- { +- uint32_t *pataddr = (*pat)->addr; +- (*pat)->family = AF_INET6; +- pataddr[3] = pataddr[0]; +- pataddr[2] = htonl (0xffff); +- pataddr[1] = 0; +- pataddr[0] = 0; +- pat = &((*pat)->next); +- no_data = 0; +- } +- else if (req->ai_family == AF_UNSPEC +- || (*pat)->family == req->ai_family) +- { +- pat = &((*pat)->next); +- +- no_data = 0; +- if (req->ai_family == AF_INET6) +- got_ipv6 = true; +- } +- else +- *pat = ((*pat)->next); +- } +- } +- +- no_inet6_data = no_data; +- } +- else +- { +- nss_gethostbyname3_r *fct = NULL; +- if (req->ai_flags & AI_CANONNAME) +- /* No need to use this function if we do not look for +- the canonical name. The function does not exist in +- all NSS modules and therefore the lookup would +- often fail. */ +- fct = __nss_lookup_function (nip, "gethostbyname3_r"); +- if (fct == NULL) +- /* We are cheating here. The gethostbyname2_r +- function does not have the same interface as +- gethostbyname3_r but the extra arguments the +- latter takes are added at the end. So the +- gethostbyname2_r code will just ignore them. */ +- fct = __nss_lookup_function (nip, "gethostbyname2_r"); +- +- if (fct != NULL) +- { +- struct gaih_addrtuple **pat = &at; +- +- if (req->ai_family == AF_INET6 +- || req->ai_family == AF_UNSPEC) +- { +- gethosts (AF_INET6); +- no_inet6_data = no_data; +- inet6_status = status; +- } +- if (req->ai_family == AF_INET +- || req->ai_family == AF_UNSPEC +- || (req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) +- /* Avoid generating the mapped addresses if we +- know we are not going to need them. */ +- && ((req->ai_flags & AI_ALL) || !got_ipv6))) +- { +- gethosts (AF_INET); +- +- if (req->ai_family == AF_INET) +- { +- no_inet6_data = no_data; +- inet6_status = status; +- } +- } +- +- /* If we found one address for AF_INET or AF_INET6, +- don't continue the search. */ +- if (inet6_status == NSS_STATUS_SUCCESS +- || status == NSS_STATUS_SUCCESS) +- { +- if ((req->ai_flags & AI_CANONNAME) != 0 +- && canon == NULL) +- { +- char *canonbuf = getcanonname (nip, at, name); +- if (canonbuf == NULL) +- { +- __resolv_context_put (res_ctx); +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- canon = canonbuf; +- } +- status = NSS_STATUS_SUCCESS; +- } +- else +- { +- /* We can have different states for AF_INET and +- AF_INET6. Try to find a useful one for both. */ +- if (inet6_status == NSS_STATUS_TRYAGAIN) +- status = NSS_STATUS_TRYAGAIN; +- else if (status == NSS_STATUS_UNAVAIL +- && inet6_status != NSS_STATUS_UNAVAIL) +- status = inet6_status; ++ res.canon = canonbuf; + } ++ status = NSS_STATUS_SUCCESS; + } + else + { +- /* Could not locate any of the lookup functions. +- The NSS lookup code does not consistently set +- errno, so we need to supply our own error +- code here. The root cause could either be a +- resource allocation failure, or a missing +- service function in the DSO (so it should not +- be listed in /etc/nsswitch.conf). Assume the +- former, and return EBUSY. */ +- status = NSS_STATUS_UNAVAIL; +- __set_h_errno (NETDB_INTERNAL); +- __set_errno (EBUSY); ++ /* We can have different states for AF_INET and ++ AF_INET6. Try to find a useful one for both. */ ++ if (inet6_status == NSS_STATUS_TRYAGAIN) ++ status = NSS_STATUS_TRYAGAIN; ++ else if (status == NSS_STATUS_UNAVAIL ++ && inet6_status != NSS_STATUS_UNAVAIL) ++ status = inet6_status; + } + } ++ else ++ { ++ /* Could not locate any of the lookup functions. ++ The NSS lookup code does not consistently set ++ errno, so we need to supply our own error ++ code here. The root cause could either be a ++ resource allocation failure, or a missing ++ service function in the DSO (so it should not ++ be listed in /etc/nsswitch.conf). Assume the ++ former, and return EBUSY. */ ++ status = NSS_STATUS_UNAVAIL; ++ __set_h_errno (NETDB_INTERNAL); ++ __set_errno (EBUSY); ++ } ++ } + +- if (nss_next_action (nip, status) == NSS_ACTION_RETURN) +- break; ++ if (nss_next_action (nip, status) == NSS_ACTION_RETURN) ++ break; + +- /* The hosts database does not support MERGE. */ +- if (nss_next_action (nip, status) == NSS_ACTION_MERGE) +- do_merge = true; ++ /* The hosts database does not support MERGE. */ ++ if (nss_next_action (nip, status) == NSS_ACTION_MERGE) ++ do_merge = true; + +- nip++; +- if (nip->module == NULL) +- no_more = -1; +- } ++ nip++; ++ if (nip->module == NULL) ++ no_more = -1; ++ } + +- __resolv_context_put (res_ctx); ++ __resolv_context_put (res_ctx); + +- /* If we have a failure which sets errno, report it using +- EAI_SYSTEM. */ +- if ((status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) +- && h_errno == NETDB_INTERNAL) +- { +- result = -EAI_SYSTEM; +- goto free_and_return; +- } ++ /* If we have a failure which sets errno, report it using ++ EAI_SYSTEM. */ ++ if ((status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) ++ && h_errno == NETDB_INTERNAL) ++ { ++ result = -EAI_SYSTEM; ++ goto free_and_return; ++ } + +- if (no_data != 0 && no_inet6_data != 0) +- { +- /* If both requests timed out report this. */ +- if (no_data == EAI_AGAIN && no_inet6_data == EAI_AGAIN) +- result = -EAI_AGAIN; +- else +- /* We made requests but they turned out no data. The name +- is known, though. */ +- result = -EAI_NODATA; ++ if (no_data != 0 && no_inet6_data != 0) ++ { ++ /* If both requests timed out report this. */ ++ if (no_data == EAI_AGAIN && no_inet6_data == EAI_AGAIN) ++ result = -EAI_AGAIN; ++ else ++ /* We made requests but they turned out no data. The name ++ is known, though. */ ++ result = -EAI_NODATA; + +- goto free_and_return; +- } ++ goto free_and_return; + } + + process_list: +- if (at == NULL) ++ if (res.at == NULL) + { + result = -EAI_NONAME; + goto free_and_return; +@@ -1032,21 +1044,22 @@ gaih_inet (const char *name, const struct gaih_service *service, + else + { + struct gaih_addrtuple *atr; +- atr = at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used); +- memset (at, '\0', sizeof (struct gaih_addrtuple)); ++ atr = res.at = alloca_account (sizeof (struct gaih_addrtuple), ++ alloca_used); ++ memset (res.at, '\0', sizeof (struct gaih_addrtuple)); + + if (req->ai_family == AF_UNSPEC) + { +- at->next = __alloca (sizeof (struct gaih_addrtuple)); +- memset (at->next, '\0', sizeof (struct gaih_addrtuple)); ++ res.at->next = __alloca (sizeof (struct gaih_addrtuple)); ++ memset (res.at->next, '\0', sizeof (struct gaih_addrtuple)); + } + + if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) + { +- at->family = AF_INET6; ++ res.at->family = AF_INET6; + if ((req->ai_flags & AI_PASSIVE) == 0) +- memcpy (at->addr, &in6addr_loopback, sizeof (struct in6_addr)); +- atr = at->next; ++ memcpy (res.at->addr, &in6addr_loopback, sizeof (struct in6_addr)); ++ atr = res.at->next; + } + + if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) +@@ -1059,10 +1072,10 @@ gaih_inet (const char *name, const struct gaih_service *service, + + { + /* Set up the canonical name if we need it. */ +- if ((result = process_canonname (req, orig_name, &canon)) != 0) ++ if ((result = process_canonname (req, orig_name, &res)) != 0) + goto free_and_return; + +- struct gaih_addrtuple *at2 = at; ++ struct gaih_addrtuple *at2 = res.at; + size_t socklen; + sa_family_t family; + +@@ -1105,8 +1118,8 @@ gaih_inet (const char *name, const struct gaih_service *service, + ai->ai_addr = (void *) (ai + 1); + + /* We only add the canonical name once. */ +- ai->ai_canonname = (char *) canon; +- canon = NULL; ++ ai->ai_canonname = res.canon; ++ res.canon = NULL; + + #ifdef _HAVE_SA_LEN + ai->ai_addr->sa_len = socklen; +@@ -1152,7 +1165,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + if (malloc_name) + free ((char *) name); + free (addrmem); +- free (canon); ++ free (res.canon); + + return result; + } + +From 4897bf79689d38bb20a7ee5061ccc8221101c360 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Fri, 4 Mar 2022 14:57:12 +0530 +Subject: [PATCH] gaih_inet: Split simple gethostbyname into its own function + +Add a free_at flag in gaih_result to indicate if res.at needs to be +freed by the caller. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit b44389cb7fa28a59804571dac09cc32ebfac03d1) +--- + sysdeps/posix/getaddrinfo.c | 127 ++++++++++++++++++------------------ + 1 file changed, 64 insertions(+), 63 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 19bb13db59..1137c959ac 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -120,6 +120,7 @@ struct gaih_result + { + struct gaih_addrtuple *at; + char *canon; ++ bool free_at; + }; + + /* Values for `protoflag'. */ +@@ -565,6 +566,62 @@ out: + return result; + } + ++/* If possible, call the simple, old functions, which do not support IPv6 scope ++ ids, nor retrieving the canonical name. */ ++ ++static int ++try_simple_gethostbyname (const char *name, const struct addrinfo *req, ++ struct scratch_buffer *tmpbuf, ++ struct gaih_result *res) ++{ ++ res->at = NULL; ++ ++ if (req->ai_family != AF_INET || (req->ai_flags & AI_CANONNAME) != 0) ++ return 0; ++ ++ int rc; ++ struct hostent th; ++ struct hostent *h; ++ ++ while (1) ++ { ++ rc = __gethostbyname2_r (name, AF_INET, &th, tmpbuf->data, ++ tmpbuf->length, &h, &h_errno); ++ if (rc != ERANGE || h_errno != NETDB_INTERNAL) ++ break; ++ if (!scratch_buffer_grow (tmpbuf)) ++ return -EAI_MEMORY; ++ } ++ ++ if (rc == 0) ++ { ++ if (h != NULL) ++ { ++ /* We found data, convert it. RES->AT from the conversion will ++ either be an allocated block or NULL, both of which are safe to ++ pass to free (). */ ++ if (!convert_hostent_to_gaih_addrtuple (req, AF_INET, h, &res->at)) ++ return -EAI_MEMORY; ++ ++ res->free_at = true; ++ return 0; ++ } ++ if (h_errno == NO_DATA) ++ return -EAI_NODATA; ++ ++ return -EAI_NONAME; ++ } ++ ++ if (h_errno == NETDB_INTERNAL) ++ return -EAI_SYSTEM; ++ if (h_errno == TRY_AGAIN) ++ return -EAI_AGAIN; ++ ++ /* We made requests but they turned out no data. ++ The name is known, though. */ ++ return -EAI_NODATA; ++} ++ + static int + gaih_inet (const char *name, const struct gaih_service *service, + const struct addrinfo *req, struct addrinfo **pai, +@@ -610,6 +667,11 @@ gaih_inet (const char *name, const struct gaih_service *service, + else if (res.at != NULL) + goto process_list; + ++ if ((result = try_simple_gethostbyname (name, req, tmpbuf, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; ++ + int no_data = 0; + int no_inet6_data = 0; + nss_action_list nip; +@@ -619,69 +681,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct resolv_context *res_ctx = NULL; + bool do_merge = false; + +- /* If we do not have to look for IPv6 addresses or the canonical +- name, use the simple, old functions, which do not support +- IPv6 scope ids, nor retrieving the canonical name. */ +- if (req->ai_family == AF_INET +- && (req->ai_flags & AI_CANONNAME) == 0) +- { +- int rc; +- struct hostent th; +- struct hostent *h; +- +- while (1) +- { +- rc = __gethostbyname2_r (name, AF_INET, &th, +- tmpbuf->data, tmpbuf->length, +- &h, &h_errno); +- if (rc != ERANGE || h_errno != NETDB_INTERNAL) +- break; +- if (!scratch_buffer_grow (tmpbuf)) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- } +- +- if (rc == 0) +- { +- if (h != NULL) +- { +- /* We found data, convert it. */ +- if (!convert_hostent_to_gaih_addrtuple +- (req, AF_INET, h, &addrmem)) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- res.at = addrmem; +- } +- else +- { +- if (h_errno == NO_DATA) +- result = -EAI_NODATA; +- else +- result = -EAI_NONAME; +- goto free_and_return; +- } +- } +- else +- { +- if (h_errno == NETDB_INTERNAL) +- result = -EAI_SYSTEM; +- else if (h_errno == TRY_AGAIN) +- result = -EAI_AGAIN; +- else +- /* We made requests but they turned out no data. +- The name is known, though. */ +- result = -EAI_NODATA; +- +- goto free_and_return; +- } +- +- goto process_list; +- } +- + #ifdef USE_NSCD + if (__nss_not_use_nscd_hosts > 0 + && ++__nss_not_use_nscd_hosts > NSS_NSCD_RETRY) +@@ -1165,6 +1164,8 @@ gaih_inet (const char *name, const struct gaih_service *service, + if (malloc_name) + free ((char *) name); + free (addrmem); ++ if (res.free_at) ++ free (res.at); + free (res.canon); + + return result; + +From ce64e72b7da09f97c91a5acf5c36a32778a9fa60 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 15:53:45 +0530 +Subject: [PATCH] gaih_inet: Split nscd lookup code into its own function. + +Add a new member got_ipv6 to indicate if the results have an IPv6 +result and use it instead of the local got_ipv6. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit e7e5315b7fa065a9c8bf525ca9a32f46fa4837e5) +--- + sysdeps/posix/getaddrinfo.c | 248 +++++++++++++++++++----------------- + 1 file changed, 134 insertions(+), 114 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 1137c959ac..01be932b3f 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -121,6 +121,7 @@ struct gaih_result + struct gaih_addrtuple *at; + char *canon; + bool free_at; ++ bool got_ipv6; + }; + + /* Values for `protoflag'. */ +@@ -316,7 +317,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + res.canon = canonbuf; \ + } \ + if (_family == AF_INET6 && *pat != NULL) \ +- got_ipv6 = true; \ ++ res.got_ipv6 = true; \ + } \ + } + +@@ -467,6 +468,128 @@ get_servtuples (const struct gaih_service *service, const struct addrinfo *req, + return 0; + } + ++#ifdef USE_NSCD ++/* Query addresses from nscd cache, returning a non-zero value on error. ++ RES members have the lookup result; RES->AT is NULL if there were no errors ++ but also no results. */ ++ ++static int ++get_nscd_addresses (const char *name, const struct addrinfo *req, ++ struct gaih_result *res) ++{ ++ if (__nss_not_use_nscd_hosts > 0 ++ && ++__nss_not_use_nscd_hosts > NSS_NSCD_RETRY) ++ __nss_not_use_nscd_hosts = 0; ++ ++ res->at = NULL; ++ ++ if (__nss_not_use_nscd_hosts || __nss_database_custom[NSS_DBSIDX_hosts]) ++ return 0; ++ ++ /* Try to use nscd. */ ++ struct nscd_ai_result *air = NULL; ++ int err = __nscd_getai (name, &air, &h_errno); ++ ++ if (__glibc_unlikely (air == NULL)) ++ { ++ /* The database contains a negative entry. */ ++ if (err == 0) ++ return -EAI_NONAME; ++ if (__nss_not_use_nscd_hosts == 0) ++ { ++ if (h_errno == NETDB_INTERNAL && errno == ENOMEM) ++ return -EAI_MEMORY; ++ if (h_errno == TRY_AGAIN) ++ return -EAI_AGAIN; ++ return -EAI_SYSTEM; ++ } ++ return 0; ++ } ++ ++ /* Transform into gaih_addrtuple list. */ ++ int result = 0; ++ char *addrs = air->addrs; ++ ++ struct gaih_addrtuple *addrfree = calloc (air->naddrs, sizeof (*addrfree)); ++ struct gaih_addrtuple *at = calloc (air->naddrs, sizeof (*at)); ++ if (at == NULL) ++ { ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ ++ res->free_at = true; ++ ++ int count = 0; ++ for (int i = 0; i < air->naddrs; ++i) ++ { ++ socklen_t size = (air->family[i] == AF_INET ++ ? INADDRSZ : IN6ADDRSZ); ++ ++ if (!((air->family[i] == AF_INET ++ && req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED) != 0) ++ || req->ai_family == AF_UNSPEC ++ || air->family[i] == req->ai_family)) ++ { ++ /* Skip over non-matching result. */ ++ addrs += size; ++ continue; ++ } ++ ++ if (air->family[i] == AF_INET && req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED)) ++ { ++ at[count].family = AF_INET6; ++ at[count].addr[3] = *(uint32_t *) addrs; ++ at[count].addr[2] = htonl (0xffff); ++ } ++ else if (req->ai_family == AF_UNSPEC ++ || air->family[count] == req->ai_family) ++ { ++ at[count].family = air->family[count]; ++ memcpy (at[count].addr, addrs, size); ++ if (air->family[count] == AF_INET6) ++ res->got_ipv6 = true; ++ } ++ at[count].next = at + count + 1; ++ count++; ++ addrs += size; ++ } ++ ++ if ((req->ai_flags & AI_CANONNAME) && air->canon != NULL) ++ { ++ char *canonbuf = __strdup (air->canon); ++ if (canonbuf == NULL) ++ { ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ res->canon = canonbuf; ++ } ++ ++ if (count == 0) ++ { ++ result = -EAI_NONAME; ++ goto out; ++ } ++ ++ at[count - 1].next = NULL; ++ ++ res->at = at; ++ ++out: ++ free (air); ++ if (result != 0) ++ { ++ free (at); ++ res->free_at = false; ++ } ++ ++ return result; ++} ++#endif ++ + /* Convert numeric addresses to binary into RES. On failure, RES->AT is set to + NULL and an error code is returned. If AI_NUMERIC_HOST is not requested and + the function cannot determine a result, RES->AT is set to NULL and 0 +@@ -630,7 +753,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct gaih_servtuple st[sizeof (gaih_inet_typeproto) + / sizeof (struct gaih_typeproto)] = {0}; + +- bool got_ipv6 = false; + const char *orig_name = name; + + /* Reserve stack memory for the scratch buffer in the getaddrinfo +@@ -672,6 +794,13 @@ gaih_inet (const char *name, const struct gaih_service *service, + else if (res.at != NULL) + goto process_list; + ++#ifdef USE_NSCD ++ if ((result = get_nscd_addresses (name, req, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; ++#endif ++ + int no_data = 0; + int no_inet6_data = 0; + nss_action_list nip; +@@ -681,115 +810,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + struct resolv_context *res_ctx = NULL; + bool do_merge = false; + +-#ifdef USE_NSCD +- if (__nss_not_use_nscd_hosts > 0 +- && ++__nss_not_use_nscd_hosts > NSS_NSCD_RETRY) +- __nss_not_use_nscd_hosts = 0; +- +- if (!__nss_not_use_nscd_hosts +- && !__nss_database_custom[NSS_DBSIDX_hosts]) +- { +- /* Try to use nscd. */ +- struct nscd_ai_result *air = NULL; +- int err = __nscd_getai (name, &air, &h_errno); +- if (air != NULL) +- { +- /* Transform into gaih_addrtuple list. */ +- bool added_canon = (req->ai_flags & AI_CANONNAME) == 0; +- char *addrs = air->addrs; +- +- addrmem = calloc (air->naddrs, sizeof (*addrmem)); +- if (addrmem == NULL) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- +- struct gaih_addrtuple *addrfree = addrmem; +- struct gaih_addrtuple **pat = &res.at; +- +- for (int i = 0; i < air->naddrs; ++i) +- { +- socklen_t size = (air->family[i] == AF_INET +- ? INADDRSZ : IN6ADDRSZ); +- +- if (!((air->family[i] == AF_INET +- && req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) != 0) +- || req->ai_family == AF_UNSPEC +- || air->family[i] == req->ai_family)) +- { +- /* Skip over non-matching result. */ +- addrs += size; +- continue; +- } +- +- if (*pat == NULL) +- { +- *pat = addrfree++; +- (*pat)->scopeid = 0; +- } +- uint32_t *pataddr = (*pat)->addr; +- (*pat)->next = NULL; +- if (added_canon || air->canon == NULL) +- (*pat)->name = NULL; +- else if (res.canon == NULL) +- { +- char *canonbuf = __strdup (air->canon); +- if (canonbuf == NULL) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- res.canon = (*pat)->name = canonbuf; +- } +- +- if (air->family[i] == AF_INET +- && req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED)) +- { +- (*pat)->family = AF_INET6; +- pataddr[3] = *(uint32_t *) addrs; +- pataddr[2] = htonl (0xffff); +- pataddr[1] = 0; +- pataddr[0] = 0; +- pat = &((*pat)->next); +- added_canon = true; +- } +- else if (req->ai_family == AF_UNSPEC +- || air->family[i] == req->ai_family) +- { +- (*pat)->family = air->family[i]; +- memcpy (pataddr, addrs, size); +- pat = &((*pat)->next); +- added_canon = true; +- if (air->family[i] == AF_INET6) +- got_ipv6 = true; +- } +- addrs += size; +- } +- +- free (air); +- +- goto process_list; +- } +- else if (err == 0) +- /* The database contains a negative entry. */ +- goto free_and_return; +- else if (__nss_not_use_nscd_hosts == 0) +- { +- if (h_errno == NETDB_INTERNAL && errno == ENOMEM) +- result = -EAI_MEMORY; +- else if (h_errno == TRY_AGAIN) +- result = -EAI_AGAIN; +- else +- result = -EAI_SYSTEM; +- +- goto free_and_return; +- } +- } +-#endif +- + no_more = !__nss_database_get (nss_database_hosts, &nip); + + /* If we are looking for both IPv4 and IPv6 address we don't +@@ -897,7 +917,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + + no_data = 0; + if (req->ai_family == AF_INET6) +- got_ipv6 = true; ++ res.got_ipv6 = true; + } + else + *pat = ((*pat)->next); +@@ -940,7 +960,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + && (req->ai_flags & AI_V4MAPPED) + /* Avoid generating the mapped addresses if we + know we are not going to need them. */ +- && ((req->ai_flags & AI_ALL) || !got_ipv6))) ++ && ((req->ai_flags & AI_ALL) || !res.got_ipv6))) + { + gethosts (AF_INET); + +@@ -1091,7 +1111,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + /* If we looked up IPv4 mapped address discard them here if + the caller isn't interested in all address and we have + found at least one IPv6 address. */ +- if (got_ipv6 ++ if (res.got_ipv6 + && (req->ai_flags & (AI_V4MAPPED|AI_ALL)) == AI_V4MAPPED + && IN6_IS_ADDR_V4MAPPED (at2->addr)) + goto ignore; + +From 9098deb96a49fdb88ec833b7fa2087f6bd4c6aca Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 15:56:22 +0530 +Subject: [PATCH] gaih_inet: separate nss lookup loop into its own function + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit 906cecbe0889e601c91d9aba738049c73ebe4dd2) +--- + sysdeps/posix/getaddrinfo.c | 563 ++++++++++++++++++------------------ + 1 file changed, 286 insertions(+), 277 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 01be932b3f..f70ce2c76b 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -159,6 +159,14 @@ static const struct addrinfo default_hints = + .ai_next = NULL + }; + ++static void ++gaih_result_reset (struct gaih_result *res) ++{ ++ if (res->free_at) ++ free (res->at); ++ free (res->canon); ++ memset (res, 0, sizeof (*res)); ++} + + static int + gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, +@@ -197,13 +205,10 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, + + /* Convert struct hostent to a list of struct gaih_addrtuple objects. h_name + is not copied, and the struct hostent object must not be deallocated +- prematurely. The new addresses are appended to the tuple array in +- RESULT. */ ++ prematurely. The new addresses are appended to the tuple array in RES. */ + static bool +-convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, +- int family, +- struct hostent *h, +- struct gaih_addrtuple **result) ++convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family, ++ struct hostent *h, struct gaih_result *res) + { + /* Count the number of addresses in h->h_addr_list. */ + size_t count = 0; +@@ -215,7 +220,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + if (count == 0 || h->h_length > sizeof (((struct gaih_addrtuple) {}).addr)) + return true; + +- struct gaih_addrtuple *array = *result; ++ struct gaih_addrtuple *array = res->at; + size_t old = 0; + + while (array != NULL) +@@ -224,12 +229,14 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + array = array->next; + } + +- array = realloc (*result, (old + count) * sizeof (*array)); ++ array = realloc (res->at, (old + count) * sizeof (*array)); + + if (array == NULL) + return false; + +- *result = array; ++ res->got_ipv6 = family == AF_INET6; ++ res->at = array; ++ res->free_at = true; + + /* Update the next pointers on reallocation. */ + for (size_t i = 0; i < old; i++) +@@ -278,7 +285,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + { \ + __resolv_context_put (res_ctx); \ + result = -EAI_MEMORY; \ +- goto free_and_return; \ ++ goto out; \ + } \ + } \ + if (status == NSS_STATUS_NOTFOUND \ +@@ -288,7 +295,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + { \ + __resolv_context_put (res_ctx); \ + result = -EAI_SYSTEM; \ +- goto free_and_return; \ ++ goto out; \ + } \ + if (h_errno == TRY_AGAIN) \ + no_data = EAI_AGAIN; \ +@@ -297,27 +304,24 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, + } \ + else if (status == NSS_STATUS_SUCCESS) \ + { \ +- if (!convert_hostent_to_gaih_addrtuple (req, _family, &th, &addrmem)) \ ++ if (!convert_hostent_to_gaih_addrtuple (req, _family, &th, res)) \ + { \ + __resolv_context_put (res_ctx); \ + result = -EAI_SYSTEM; \ +- goto free_and_return; \ ++ goto out; \ + } \ +- *pat = addrmem; \ + \ +- if (localcanon != NULL && res.canon == NULL) \ ++ if (localcanon != NULL && res->canon == NULL) \ + { \ + char *canonbuf = __strdup (localcanon); \ + if (canonbuf == NULL) \ + { \ + __resolv_context_put (res_ctx); \ + result = -EAI_SYSTEM; \ +- goto free_and_return; \ ++ goto out; \ + } \ +- res.canon = canonbuf; \ ++ res->canon = canonbuf; \ + } \ +- if (_family == AF_INET6 && *pat != NULL) \ +- res.got_ipv6 = true; \ + } \ + } + +@@ -590,6 +594,260 @@ out: + } + #endif + ++static int ++get_nss_addresses (const char *name, const struct addrinfo *req, ++ struct scratch_buffer *tmpbuf, struct gaih_result *res) ++{ ++ int no_data = 0; ++ int no_inet6_data = 0; ++ nss_action_list nip; ++ enum nss_status inet6_status = NSS_STATUS_UNAVAIL; ++ enum nss_status status = NSS_STATUS_UNAVAIL; ++ int no_more; ++ struct resolv_context *res_ctx = NULL; ++ bool do_merge = false; ++ int result = 0; ++ ++ no_more = !__nss_database_get (nss_database_hosts, &nip); ++ ++ /* If we are looking for both IPv4 and IPv6 address we don't ++ want the lookup functions to automatically promote IPv4 ++ addresses to IPv6 addresses, so we use the no_inet6 ++ function variant. */ ++ res_ctx = __resolv_context_get (); ++ if (res_ctx == NULL) ++ no_more = 1; ++ ++ while (!no_more) ++ { ++ /* Always start afresh; continue should discard previous results ++ and the hosts database does not support merge. */ ++ gaih_result_reset (res); ++ ++ if (do_merge) ++ { ++ __set_h_errno (NETDB_INTERNAL); ++ __set_errno (EBUSY); ++ break; ++ } ++ ++ no_data = 0; ++ nss_gethostbyname4_r *fct4 = NULL; ++ ++ /* gethostbyname4_r sends out parallel A and AAAA queries and ++ is thus only suitable for PF_UNSPEC. */ ++ if (req->ai_family == PF_UNSPEC) ++ fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); ++ ++ if (fct4 != NULL) ++ { ++ while (1) ++ { ++ status = DL_CALL_FCT (fct4, (name, &res->at, ++ tmpbuf->data, tmpbuf->length, ++ &errno, &h_errno, ++ NULL)); ++ if (status == NSS_STATUS_SUCCESS) ++ break; ++ /* gethostbyname4_r may write into AT, so reset it. */ ++ res->at = NULL; ++ if (status != NSS_STATUS_TRYAGAIN ++ || errno != ERANGE || h_errno != NETDB_INTERNAL) ++ { ++ if (h_errno == TRY_AGAIN) ++ no_data = EAI_AGAIN; ++ else ++ no_data = h_errno == NO_DATA; ++ break; ++ } ++ ++ if (!scratch_buffer_grow (tmpbuf)) ++ { ++ __resolv_context_put (res_ctx); ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ } ++ ++ if (status == NSS_STATUS_SUCCESS) ++ { ++ assert (!no_data); ++ no_data = 1; ++ ++ if ((req->ai_flags & AI_CANONNAME) != 0 && res->canon == NULL) ++ { ++ char *canonbuf = __strdup (res->at->name); ++ if (canonbuf == NULL) ++ { ++ __resolv_context_put (res_ctx); ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ res->canon = canonbuf; ++ } ++ ++ struct gaih_addrtuple **pat = &res->at; ++ ++ while (*pat != NULL) ++ { ++ if ((*pat)->family == AF_INET ++ && req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED) != 0) ++ { ++ uint32_t *pataddr = (*pat)->addr; ++ (*pat)->family = AF_INET6; ++ pataddr[3] = pataddr[0]; ++ pataddr[2] = htonl (0xffff); ++ pataddr[1] = 0; ++ pataddr[0] = 0; ++ pat = &((*pat)->next); ++ no_data = 0; ++ } ++ else if (req->ai_family == AF_UNSPEC ++ || (*pat)->family == req->ai_family) ++ { ++ pat = &((*pat)->next); ++ ++ no_data = 0; ++ if (req->ai_family == AF_INET6) ++ res->got_ipv6 = true; ++ } ++ else ++ *pat = ((*pat)->next); ++ } ++ } ++ ++ no_inet6_data = no_data; ++ } ++ else ++ { ++ nss_gethostbyname3_r *fct = NULL; ++ if (req->ai_flags & AI_CANONNAME) ++ /* No need to use this function if we do not look for ++ the canonical name. The function does not exist in ++ all NSS modules and therefore the lookup would ++ often fail. */ ++ fct = __nss_lookup_function (nip, "gethostbyname3_r"); ++ if (fct == NULL) ++ /* We are cheating here. The gethostbyname2_r ++ function does not have the same interface as ++ gethostbyname3_r but the extra arguments the ++ latter takes are added at the end. So the ++ gethostbyname2_r code will just ignore them. */ ++ fct = __nss_lookup_function (nip, "gethostbyname2_r"); ++ ++ if (fct != NULL) ++ { ++ if (req->ai_family == AF_INET6 ++ || req->ai_family == AF_UNSPEC) ++ { ++ gethosts (AF_INET6); ++ no_inet6_data = no_data; ++ inet6_status = status; ++ } ++ if (req->ai_family == AF_INET ++ || req->ai_family == AF_UNSPEC ++ || (req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED) ++ /* Avoid generating the mapped addresses if we ++ know we are not going to need them. */ ++ && ((req->ai_flags & AI_ALL) || !res->got_ipv6))) ++ { ++ gethosts (AF_INET); ++ ++ if (req->ai_family == AF_INET) ++ { ++ no_inet6_data = no_data; ++ inet6_status = status; ++ } ++ } ++ ++ /* If we found one address for AF_INET or AF_INET6, ++ don't continue the search. */ ++ if (inet6_status == NSS_STATUS_SUCCESS ++ || status == NSS_STATUS_SUCCESS) ++ { ++ if ((req->ai_flags & AI_CANONNAME) != 0 ++ && res->canon == NULL) ++ { ++ char *canonbuf = getcanonname (nip, res->at, name); ++ if (canonbuf == NULL) ++ { ++ __resolv_context_put (res_ctx); ++ result = -EAI_MEMORY; ++ goto out; ++ } ++ res->canon = canonbuf; ++ } ++ status = NSS_STATUS_SUCCESS; ++ } ++ else ++ { ++ /* We can have different states for AF_INET and ++ AF_INET6. Try to find a useful one for both. */ ++ if (inet6_status == NSS_STATUS_TRYAGAIN) ++ status = NSS_STATUS_TRYAGAIN; ++ else if (status == NSS_STATUS_UNAVAIL ++ && inet6_status != NSS_STATUS_UNAVAIL) ++ status = inet6_status; ++ } ++ } ++ else ++ { ++ /* Could not locate any of the lookup functions. ++ The NSS lookup code does not consistently set ++ errno, so we need to supply our own error ++ code here. The root cause could either be a ++ resource allocation failure, or a missing ++ service function in the DSO (so it should not ++ be listed in /etc/nsswitch.conf). Assume the ++ former, and return EBUSY. */ ++ status = NSS_STATUS_UNAVAIL; ++ __set_h_errno (NETDB_INTERNAL); ++ __set_errno (EBUSY); ++ } ++ } ++ ++ if (nss_next_action (nip, status) == NSS_ACTION_RETURN) ++ break; ++ ++ /* The hosts database does not support MERGE. */ ++ if (nss_next_action (nip, status) == NSS_ACTION_MERGE) ++ do_merge = true; ++ ++ nip++; ++ if (nip->module == NULL) ++ no_more = -1; ++ } ++ ++ __resolv_context_put (res_ctx); ++ ++ /* If we have a failure which sets errno, report it using ++ EAI_SYSTEM. */ ++ if ((status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) ++ && h_errno == NETDB_INTERNAL) ++ { ++ result = -EAI_SYSTEM; ++ goto out; ++ } ++ ++ if (no_data != 0 && no_inet6_data != 0) ++ { ++ /* If both requests timed out report this. */ ++ if (no_data == EAI_AGAIN && no_inet6_data == EAI_AGAIN) ++ result = -EAI_AGAIN; ++ else ++ /* We made requests but they turned out no data. The name ++ is known, though. */ ++ result = -EAI_NODATA; ++ } ++ ++out: ++ if (result != 0) ++ gaih_result_reset (res); ++ return result; ++} ++ + /* Convert numeric addresses to binary into RES. On failure, RES->AT is set to + NULL and an error code is returned. If AI_NUMERIC_HOST is not requested and + the function cannot determine a result, RES->AT is set to NULL and 0 +@@ -723,7 +981,7 @@ try_simple_gethostbyname (const char *name, const struct addrinfo *req, + /* We found data, convert it. RES->AT from the conversion will + either be an allocated block or NULL, both of which are safe to + pass to free (). */ +- if (!convert_hostent_to_gaih_addrtuple (req, AF_INET, h, &res->at)) ++ if (!convert_hostent_to_gaih_addrtuple (req, AF_INET, h, res)) + return -EAI_MEMORY; + + res->free_at = true; +@@ -801,264 +1059,14 @@ gaih_inet (const char *name, const struct gaih_service *service, + goto process_list; + #endif + +- int no_data = 0; +- int no_inet6_data = 0; +- nss_action_list nip; +- enum nss_status inet6_status = NSS_STATUS_UNAVAIL; +- enum nss_status status = NSS_STATUS_UNAVAIL; +- int no_more; +- struct resolv_context *res_ctx = NULL; +- bool do_merge = false; +- +- no_more = !__nss_database_get (nss_database_hosts, &nip); +- +- /* If we are looking for both IPv4 and IPv6 address we don't +- want the lookup functions to automatically promote IPv4 +- addresses to IPv6 addresses, so we use the no_inet6 +- function variant. */ +- res_ctx = __resolv_context_get (); +- if (res_ctx == NULL) +- no_more = 1; +- +- while (!no_more) +- { +- /* Always start afresh; continue should discard previous results +- and the hosts database does not support merge. */ +- res.at = NULL; +- free (res.canon); +- free (addrmem); +- res.canon = NULL; +- addrmem = NULL; +- got_ipv6 = false; +- +- if (do_merge) +- { +- __set_h_errno (NETDB_INTERNAL); +- __set_errno (EBUSY); +- break; +- } +- +- no_data = 0; +- nss_gethostbyname4_r *fct4 = NULL; +- +- /* gethostbyname4_r sends out parallel A and AAAA queries and +- is thus only suitable for PF_UNSPEC. */ +- if (req->ai_family == PF_UNSPEC) +- fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); +- +- if (fct4 != NULL) +- { +- while (1) +- { +- status = DL_CALL_FCT (fct4, (name, &res.at, +- tmpbuf->data, tmpbuf->length, +- &errno, &h_errno, +- NULL)); +- if (status == NSS_STATUS_SUCCESS) +- break; +- /* gethostbyname4_r may write into AT, so reset it. */ +- res.at = NULL; +- if (status != NSS_STATUS_TRYAGAIN +- || errno != ERANGE || h_errno != NETDB_INTERNAL) +- { +- if (h_errno == TRY_AGAIN) +- no_data = EAI_AGAIN; +- else +- no_data = h_errno == NO_DATA; +- break; +- } +- +- if (!scratch_buffer_grow (tmpbuf)) +- { +- __resolv_context_put (res_ctx); +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- } +- +- if (status == NSS_STATUS_SUCCESS) +- { +- assert (!no_data); +- no_data = 1; +- +- if ((req->ai_flags & AI_CANONNAME) != 0 && res.canon == NULL) +- { +- char *canonbuf = __strdup (res.at->name); +- if (canonbuf == NULL) +- { +- __resolv_context_put (res_ctx); +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- res.canon = canonbuf; +- } +- +- struct gaih_addrtuple **pat = &res.at; +- +- while (*pat != NULL) +- { +- if ((*pat)->family == AF_INET +- && req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) != 0) +- { +- uint32_t *pataddr = (*pat)->addr; +- (*pat)->family = AF_INET6; +- pataddr[3] = pataddr[0]; +- pataddr[2] = htonl (0xffff); +- pataddr[1] = 0; +- pataddr[0] = 0; +- pat = &((*pat)->next); +- no_data = 0; +- } +- else if (req->ai_family == AF_UNSPEC +- || (*pat)->family == req->ai_family) +- { +- pat = &((*pat)->next); +- +- no_data = 0; +- if (req->ai_family == AF_INET6) +- res.got_ipv6 = true; +- } +- else +- *pat = ((*pat)->next); +- } +- } +- +- no_inet6_data = no_data; +- } +- else +- { +- nss_gethostbyname3_r *fct = NULL; +- if (req->ai_flags & AI_CANONNAME) +- /* No need to use this function if we do not look for +- the canonical name. The function does not exist in +- all NSS modules and therefore the lookup would +- often fail. */ +- fct = __nss_lookup_function (nip, "gethostbyname3_r"); +- if (fct == NULL) +- /* We are cheating here. The gethostbyname2_r +- function does not have the same interface as +- gethostbyname3_r but the extra arguments the +- latter takes are added at the end. So the +- gethostbyname2_r code will just ignore them. */ +- fct = __nss_lookup_function (nip, "gethostbyname2_r"); +- +- if (fct != NULL) +- { +- struct gaih_addrtuple **pat = &res.at; +- +- if (req->ai_family == AF_INET6 +- || req->ai_family == AF_UNSPEC) +- { +- gethosts (AF_INET6); +- no_inet6_data = no_data; +- inet6_status = status; +- } +- if (req->ai_family == AF_INET +- || req->ai_family == AF_UNSPEC +- || (req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) +- /* Avoid generating the mapped addresses if we +- know we are not going to need them. */ +- && ((req->ai_flags & AI_ALL) || !res.got_ipv6))) +- { +- gethosts (AF_INET); +- +- if (req->ai_family == AF_INET) +- { +- no_inet6_data = no_data; +- inet6_status = status; +- } +- } +- +- /* If we found one address for AF_INET or AF_INET6, +- don't continue the search. */ +- if (inet6_status == NSS_STATUS_SUCCESS +- || status == NSS_STATUS_SUCCESS) +- { +- if ((req->ai_flags & AI_CANONNAME) != 0 +- && res.canon == NULL) +- { +- char *canonbuf = getcanonname (nip, res.at, name); +- if (canonbuf == NULL) +- { +- __resolv_context_put (res_ctx); +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- res.canon = canonbuf; +- } +- status = NSS_STATUS_SUCCESS; +- } +- else +- { +- /* We can have different states for AF_INET and +- AF_INET6. Try to find a useful one for both. */ +- if (inet6_status == NSS_STATUS_TRYAGAIN) +- status = NSS_STATUS_TRYAGAIN; +- else if (status == NSS_STATUS_UNAVAIL +- && inet6_status != NSS_STATUS_UNAVAIL) +- status = inet6_status; +- } +- } +- else +- { +- /* Could not locate any of the lookup functions. +- The NSS lookup code does not consistently set +- errno, so we need to supply our own error +- code here. The root cause could either be a +- resource allocation failure, or a missing +- service function in the DSO (so it should not +- be listed in /etc/nsswitch.conf). Assume the +- former, and return EBUSY. */ +- status = NSS_STATUS_UNAVAIL; +- __set_h_errno (NETDB_INTERNAL); +- __set_errno (EBUSY); +- } +- } +- +- if (nss_next_action (nip, status) == NSS_ACTION_RETURN) +- break; +- +- /* The hosts database does not support MERGE. */ +- if (nss_next_action (nip, status) == NSS_ACTION_MERGE) +- do_merge = true; +- +- nip++; +- if (nip->module == NULL) +- no_more = -1; +- } +- +- __resolv_context_put (res_ctx); +- +- /* If we have a failure which sets errno, report it using +- EAI_SYSTEM. */ +- if ((status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) +- && h_errno == NETDB_INTERNAL) +- { +- result = -EAI_SYSTEM; +- goto free_and_return; +- } +- +- if (no_data != 0 && no_inet6_data != 0) +- { +- /* If both requests timed out report this. */ +- if (no_data == EAI_AGAIN && no_inet6_data == EAI_AGAIN) +- result = -EAI_AGAIN; +- else +- /* We made requests but they turned out no data. The name +- is known, though. */ +- result = -EAI_NODATA; +- +- goto free_and_return; +- } ++ if ((result = get_nss_addresses (name, req, tmpbuf, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; + +- process_list: +- if (res.at == NULL) +- { +- result = -EAI_NONAME; +- goto free_and_return; +- } ++ /* None of the lookups worked, so name not found. */ ++ result = -EAI_NONAME; ++ goto free_and_return; + } + else + { +@@ -1089,6 +1097,7 @@ gaih_inet (const char *name, const struct gaih_service *service, + } + } + ++process_list: + { + /* Set up the canonical name if we need it. */ + if ((result = process_canonname (req, orig_name, &res)) != 0) + +From 8b70d97b0899f457d1ebfe5d17f11cf002fd5a06 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 19:48:48 +0530 +Subject: [PATCH] gaih_inet: make gethosts into a function + +The macro is quite a pain to debug, so make gethosts into a function to +make it easier to maintain. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit cfa3bd48cb19a70e4367a9978dbba09d9df27a72) +--- + sysdeps/posix/getaddrinfo.c | 117 ++++++++++++++++++------------------ + 1 file changed, 59 insertions(+), 58 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index f70ce2c76b..bc385dd322 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -268,63 +268,54 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family, + return true; + } + +-#define gethosts(_family) \ +- { \ +- struct hostent th; \ +- char *localcanon = NULL; \ +- no_data = 0; \ +- while (1) \ +- { \ +- status = DL_CALL_FCT (fct, (name, _family, &th, \ +- tmpbuf->data, tmpbuf->length, \ +- &errno, &h_errno, NULL, &localcanon)); \ +- if (status != NSS_STATUS_TRYAGAIN || h_errno != NETDB_INTERNAL \ +- || errno != ERANGE) \ +- break; \ +- if (!scratch_buffer_grow (tmpbuf)) \ +- { \ +- __resolv_context_put (res_ctx); \ +- result = -EAI_MEMORY; \ +- goto out; \ +- } \ +- } \ +- if (status == NSS_STATUS_NOTFOUND \ +- || status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) \ +- { \ +- if (h_errno == NETDB_INTERNAL) \ +- { \ +- __resolv_context_put (res_ctx); \ +- result = -EAI_SYSTEM; \ +- goto out; \ +- } \ +- if (h_errno == TRY_AGAIN) \ +- no_data = EAI_AGAIN; \ +- else \ +- no_data = h_errno == NO_DATA; \ +- } \ +- else if (status == NSS_STATUS_SUCCESS) \ +- { \ +- if (!convert_hostent_to_gaih_addrtuple (req, _family, &th, res)) \ +- { \ +- __resolv_context_put (res_ctx); \ +- result = -EAI_SYSTEM; \ +- goto out; \ +- } \ +- \ +- if (localcanon != NULL && res->canon == NULL) \ +- { \ +- char *canonbuf = __strdup (localcanon); \ +- if (canonbuf == NULL) \ +- { \ +- __resolv_context_put (res_ctx); \ +- result = -EAI_SYSTEM; \ +- goto out; \ +- } \ +- res->canon = canonbuf; \ +- } \ +- } \ +- } ++static int ++gethosts (nss_gethostbyname3_r fct, int family, const char *name, ++ const struct addrinfo *req, struct scratch_buffer *tmpbuf, ++ struct gaih_result *res, enum nss_status *statusp, int *no_datap) ++{ ++ struct hostent th; ++ char *localcanon = NULL; ++ enum nss_status status; ++ ++ *no_datap = 0; ++ while (1) ++ { ++ *statusp = status = DL_CALL_FCT (fct, (name, family, &th, ++ tmpbuf->data, tmpbuf->length, ++ &errno, &h_errno, NULL, ++ &localcanon)); ++ if (status != NSS_STATUS_TRYAGAIN || h_errno != NETDB_INTERNAL ++ || errno != ERANGE) ++ break; ++ if (!scratch_buffer_grow (tmpbuf)) ++ return -EAI_MEMORY; ++ } ++ if (status == NSS_STATUS_NOTFOUND ++ || status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) ++ { ++ if (h_errno == NETDB_INTERNAL) ++ return -EAI_SYSTEM; ++ if (h_errno == TRY_AGAIN) ++ *no_datap = EAI_AGAIN; ++ else ++ *no_datap = h_errno == NO_DATA; ++ } ++ else if (status == NSS_STATUS_SUCCESS) ++ { ++ if (!convert_hostent_to_gaih_addrtuple (req, family, &th, res)) ++ return -EAI_SYSTEM; ++ ++ if (localcanon != NULL && res->canon == NULL) ++ { ++ char *canonbuf = __strdup (localcanon); ++ if (canonbuf == NULL) ++ return -EAI_SYSTEM; ++ res->canon = canonbuf; ++ } ++ } + ++ return 0; ++} + + /* This function is called if a canonical name is requested, but if + the service function did not provide it. It tries to obtain the +@@ -741,7 +732,12 @@ get_nss_addresses (const char *name, const struct addrinfo *req, + if (req->ai_family == AF_INET6 + || req->ai_family == AF_UNSPEC) + { +- gethosts (AF_INET6); ++ if ((result = gethosts (fct, AF_INET6, name, req, tmpbuf, ++ res, &status, &no_data)) != 0) ++ { ++ __resolv_context_put (res_ctx); ++ goto out; ++ } + no_inet6_data = no_data; + inet6_status = status; + } +@@ -753,7 +749,12 @@ get_nss_addresses (const char *name, const struct addrinfo *req, + know we are not going to need them. */ + && ((req->ai_flags & AI_ALL) || !res->got_ipv6))) + { +- gethosts (AF_INET); ++ if ((result = gethosts (fct, AF_INET, name, req, tmpbuf, ++ res, &status, &no_data)) != 0) ++ { ++ __resolv_context_put (res_ctx); ++ goto out; ++ } + + if (req->ai_family == AF_INET) + { + +From a6da10689237c39dfaa1e50de211e6954f95977f Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 20:24:37 +0530 +Subject: [PATCH] gaih_inet: split loopback lookup into its own function + +Flatten the condition nesting and replace the alloca for RET.AT/ATR with +a single array LOCAL_AT[2]. This gets rid of alloca and alloca +accounting. + +`git diff -b` is probably the best way to view this change since much of +the diff is whitespace changes. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit 657472b2a50f67b12e5bbe5827582c9c2bb82dc3) +--- + sysdeps/posix/getaddrinfo.c | 127 ++++++++++++++++++------------------ + 1 file changed, 62 insertions(+), 65 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index bc385dd322..47c41d332d 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -1004,6 +1004,32 @@ try_simple_gethostbyname (const char *name, const struct addrinfo *req, + return -EAI_NODATA; + } + ++/* Add local address information into RES. RES->AT is assumed to have enough ++ space for two tuples and is zeroed out. */ ++ ++static void ++get_local_addresses (const struct addrinfo *req, struct gaih_result *res) ++{ ++ struct gaih_addrtuple *atr = res->at; ++ if (req->ai_family == AF_UNSPEC) ++ res->at->next = res->at + 1; ++ ++ if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) ++ { ++ res->at->family = AF_INET6; ++ if ((req->ai_flags & AI_PASSIVE) == 0) ++ memcpy (res->at->addr, &in6addr_loopback, sizeof (struct in6_addr)); ++ atr = res->at->next; ++ } ++ ++ if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) ++ { ++ atr->family = AF_INET; ++ if ((req->ai_flags & AI_PASSIVE) == 0) ++ atr->addr[0] = htonl (INADDR_LOOPBACK); ++ } ++} ++ + static int + gaih_inet (const char *name, const struct gaih_service *service, + const struct addrinfo *req, struct addrinfo **pai, +@@ -1014,10 +1040,6 @@ gaih_inet (const char *name, const struct gaih_service *service, + + const char *orig_name = name; + +- /* Reserve stack memory for the scratch buffer in the getaddrinfo +- function. */ +- size_t alloca_used = sizeof (struct scratch_buffer); +- + int rc; + if ((rc = get_servtuples (service, req, st, tmpbuf)) != 0) + return rc; +@@ -1027,76 +1049,51 @@ gaih_inet (const char *name, const struct gaih_service *service, + int result = 0; + + struct gaih_result res = {0}; +- if (name != NULL) ++ struct gaih_addrtuple local_at[2] = {0}; ++ ++ res.at = local_at; ++ ++ if (__glibc_unlikely (name == NULL)) + { +- if (req->ai_flags & AI_IDN) +- { +- char *out; +- result = __idna_to_dns_encoding (name, &out); +- if (result != 0) +- return -result; +- name = out; +- malloc_name = true; +- } ++ get_local_addresses (req, &res); ++ goto process_list; ++ } + +- res.at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used); +- res.at->scopeid = 0; +- res.at->next = NULL; ++ if (req->ai_flags & AI_IDN) ++ { ++ char *out; ++ result = __idna_to_dns_encoding (name, &out); ++ if (result != 0) ++ return -result; ++ name = out; ++ malloc_name = true; ++ } + +- if ((result = text_to_binary_address (name, req, &res)) != 0) +- goto free_and_return; +- else if (res.at != NULL) +- goto process_list; ++ if ((result = text_to_binary_address (name, req, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; + +- if ((result = try_simple_gethostbyname (name, req, tmpbuf, &res)) != 0) +- goto free_and_return; +- else if (res.at != NULL) +- goto process_list; ++ if ((result = try_simple_gethostbyname (name, req, tmpbuf, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; + + #ifdef USE_NSCD +- if ((result = get_nscd_addresses (name, req, &res)) != 0) +- goto free_and_return; +- else if (res.at != NULL) +- goto process_list; ++ if ((result = get_nscd_addresses (name, req, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; + #endif + +- if ((result = get_nss_addresses (name, req, tmpbuf, &res)) != 0) +- goto free_and_return; +- else if (res.at != NULL) +- goto process_list; +- +- /* None of the lookups worked, so name not found. */ +- result = -EAI_NONAME; +- goto free_and_return; +- } +- else +- { +- struct gaih_addrtuple *atr; +- atr = res.at = alloca_account (sizeof (struct gaih_addrtuple), +- alloca_used); +- memset (res.at, '\0', sizeof (struct gaih_addrtuple)); +- +- if (req->ai_family == AF_UNSPEC) +- { +- res.at->next = __alloca (sizeof (struct gaih_addrtuple)); +- memset (res.at->next, '\0', sizeof (struct gaih_addrtuple)); +- } +- +- if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6) +- { +- res.at->family = AF_INET6; +- if ((req->ai_flags & AI_PASSIVE) == 0) +- memcpy (res.at->addr, &in6addr_loopback, sizeof (struct in6_addr)); +- atr = res.at->next; +- } ++ if ((result = get_nss_addresses (name, req, tmpbuf, &res)) != 0) ++ goto free_and_return; ++ else if (res.at != NULL) ++ goto process_list; + +- if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) +- { +- atr->family = AF_INET; +- if ((req->ai_flags & AI_PASSIVE) == 0) +- atr->addr[0] = htonl (INADDR_LOOPBACK); +- } +- } ++ /* None of the lookups worked, so name not found. */ ++ result = -EAI_NONAME; ++ goto free_and_return; + + process_list: + { + +From f5f88f142ae67d45388fd669947ec23e0af8ea37 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Mar 2022 20:38:31 +0530 +Subject: [PATCH] gaih_inet: Split result generation into its own function + +Simplify the loop a wee bit and clean up variable names too. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit ac4653ef503d1e87893d1a6714748a1cdf4bf7ad) +--- + sysdeps/posix/getaddrinfo.c | 176 ++++++++++++++++++------------------ + 1 file changed, 86 insertions(+), 90 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 47c41d332d..f5d4a5cfd9 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -1030,6 +1030,87 @@ get_local_addresses (const struct addrinfo *req, struct gaih_result *res) + } + } + ++/* Generate results in PAI and its count in NADDRS. Return 0 on success or an ++ error code on failure. */ ++ ++static int ++generate_addrinfo (const struct addrinfo *req, struct gaih_result *res, ++ const struct gaih_servtuple *st, struct addrinfo **pai, ++ unsigned int *naddrs) ++{ ++ size_t socklen; ++ sa_family_t family; ++ ++ /* Buffer is the size of an unformatted IPv6 address in printable format. */ ++ for (struct gaih_addrtuple *at = res->at; at != NULL; at = at->next) ++ { ++ family = at->family; ++ if (family == AF_INET6) ++ { ++ socklen = sizeof (struct sockaddr_in6); ++ ++ /* If we looked up IPv4 mapped address discard them here if ++ the caller isn't interested in all address and we have ++ found at least one IPv6 address. */ ++ if (res->got_ipv6 ++ && (req->ai_flags & (AI_V4MAPPED|AI_ALL)) == AI_V4MAPPED ++ && IN6_IS_ADDR_V4MAPPED (at->addr)) ++ continue; ++ } ++ else ++ socklen = sizeof (struct sockaddr_in); ++ ++ for (int i = 0; st[i].set; i++) ++ { ++ struct addrinfo *ai; ++ ai = *pai = malloc (sizeof (struct addrinfo) + socklen); ++ if (ai == NULL) ++ return -EAI_MEMORY; ++ ++ ai->ai_flags = req->ai_flags; ++ ai->ai_family = family; ++ ai->ai_socktype = st[i].socktype; ++ ai->ai_protocol = st[i].protocol; ++ ai->ai_addrlen = socklen; ++ ai->ai_addr = (void *) (ai + 1); ++ ++ /* We only add the canonical name once. */ ++ ai->ai_canonname = res->canon; ++ res->canon = NULL; ++ ++#ifdef _HAVE_SA_LEN ++ ai->ai_addr->sa_len = socklen; ++#endif /* _HAVE_SA_LEN */ ++ ai->ai_addr->sa_family = family; ++ ++ /* In case of an allocation error the list must be NULL ++ terminated. */ ++ ai->ai_next = NULL; ++ ++ if (family == AF_INET6) ++ { ++ struct sockaddr_in6 *sin6p = (struct sockaddr_in6 *) ai->ai_addr; ++ sin6p->sin6_port = st[i].port; ++ sin6p->sin6_flowinfo = 0; ++ memcpy (&sin6p->sin6_addr, at->addr, sizeof (struct in6_addr)); ++ sin6p->sin6_scope_id = at->scopeid; ++ } ++ else ++ { ++ struct sockaddr_in *sinp = (struct sockaddr_in *) ai->ai_addr; ++ sinp->sin_port = st[i].port; ++ memcpy (&sinp->sin_addr, at->addr, sizeof (struct in_addr)); ++ memset (sinp->sin_zero, '\0', sizeof (sinp->sin_zero)); ++ } ++ ++ pai = &(ai->ai_next); ++ } ++ ++ ++*naddrs; ++ } ++ return 0; ++} ++ + static int + gaih_inet (const char *name, const struct gaih_service *service, + const struct addrinfo *req, struct addrinfo **pai, +@@ -1096,98 +1177,13 @@ gaih_inet (const char *name, const struct gaih_service *service, + goto free_and_return; + + process_list: +- { +- /* Set up the canonical name if we need it. */ +- if ((result = process_canonname (req, orig_name, &res)) != 0) +- goto free_and_return; +- +- struct gaih_addrtuple *at2 = res.at; +- size_t socklen; +- sa_family_t family; +- +- /* +- buffer is the size of an unformatted IPv6 address in printable format. +- */ +- while (at2 != NULL) +- { +- family = at2->family; +- if (family == AF_INET6) +- { +- socklen = sizeof (struct sockaddr_in6); +- +- /* If we looked up IPv4 mapped address discard them here if +- the caller isn't interested in all address and we have +- found at least one IPv6 address. */ +- if (res.got_ipv6 +- && (req->ai_flags & (AI_V4MAPPED|AI_ALL)) == AI_V4MAPPED +- && IN6_IS_ADDR_V4MAPPED (at2->addr)) +- goto ignore; +- } +- else +- socklen = sizeof (struct sockaddr_in); +- +- for (int i = 0; st[i].set; i++) +- { +- struct addrinfo *ai; +- ai = *pai = malloc (sizeof (struct addrinfo) + socklen); +- if (ai == NULL) +- { +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- +- ai->ai_flags = req->ai_flags; +- ai->ai_family = family; +- ai->ai_socktype = st[i].socktype; +- ai->ai_protocol = st[i].protocol; +- ai->ai_addrlen = socklen; +- ai->ai_addr = (void *) (ai + 1); +- +- /* We only add the canonical name once. */ +- ai->ai_canonname = res.canon; +- res.canon = NULL; +- +-#ifdef _HAVE_SA_LEN +- ai->ai_addr->sa_len = socklen; +-#endif /* _HAVE_SA_LEN */ +- ai->ai_addr->sa_family = family; +- +- /* In case of an allocation error the list must be NULL +- terminated. */ +- ai->ai_next = NULL; +- +- if (family == AF_INET6) +- { +- struct sockaddr_in6 *sin6p = +- (struct sockaddr_in6 *) ai->ai_addr; +- +- sin6p->sin6_port = st[i].port; +- sin6p->sin6_flowinfo = 0; +- memcpy (&sin6p->sin6_addr, +- at2->addr, sizeof (struct in6_addr)); +- sin6p->sin6_scope_id = at2->scopeid; +- } +- else +- { +- struct sockaddr_in *sinp = +- (struct sockaddr_in *) ai->ai_addr; +- sinp->sin_port = st[i].port; +- memcpy (&sinp->sin_addr, +- at2->addr, sizeof (struct in_addr)); +- memset (sinp->sin_zero, '\0', sizeof (sinp->sin_zero)); +- } +- +- pai = &(ai->ai_next); +- } +- +- ++*naddrs; ++ /* Set up the canonical name if we need it. */ ++ if ((result = process_canonname (req, orig_name, &res)) != 0) ++ goto free_and_return; + +- ignore: +- at2 = at2->next; +- } +- } ++ result = generate_addrinfo (req, &res, st, pai, naddrs); + +- free_and_return: ++free_and_return: + if (malloc_name) + free ((char *) name); + free (addrmem); + +From 1b9087dcec81e2fd5d7c59ae66d04bd2f0bb64ad Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Wed, 2 Mar 2022 11:45:29 +0530 +Subject: [PATCH] gethosts: Return EAI_MEMORY on allocation failure + +All other cases of failures due to lack of memory return EAI_MEMORY, so +it seems wrong to return EAI_SYSTEM here. The only reason +convert_hostent_to_gaih_addrtuple could fail is on calloc failure. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: DJ Delorie +(cherry picked from commit b587456c0e7b59dcfdbd2d44db000a3bc8244e57) +--- + sysdeps/posix/getaddrinfo.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index f5d4a5cfd9..0ece3b46b7 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -303,13 +303,13 @@ gethosts (nss_gethostbyname3_r fct, int family, const char *name, + else if (status == NSS_STATUS_SUCCESS) + { + if (!convert_hostent_to_gaih_addrtuple (req, family, &th, res)) +- return -EAI_SYSTEM; ++ return -EAI_MEMORY; + + if (localcanon != NULL && res->canon == NULL) + { + char *canonbuf = __strdup (localcanon); + if (canonbuf == NULL) +- return -EAI_SYSTEM; ++ return -EAI_MEMORY; + res->canon = canonbuf; + } + } + +From e3ccb230a961b4797510e6a1f5f21fd9021853e7 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Fri, 15 Sep 2023 13:51:12 -0400 +Subject: [PATCH] getaddrinfo: Fix use after free in getcanonname + (CVE-2023-4806) + +When an NSS plugin only implements the _gethostbyname2_r and +_getcanonname_r callbacks, getaddrinfo could use memory that was freed +during tmpbuf resizing, through h_name in a previous query response. + +The backing store for res->at->name when doing a query with +gethostbyname3_r or gethostbyname2_r is tmpbuf, which is reallocated in +gethosts during the query. For AF_INET6 lookup with AI_ALL | +AI_V4MAPPED, gethosts gets called twice, once for a v6 lookup and second +for a v4 lookup. In this case, if the first call reallocates tmpbuf +enough number of times, resulting in a malloc, th->h_name (that +res->at->name refers to) ends up on a heap allocated storage in tmpbuf. +Now if the second call to gethosts also causes the plugin callback to +return NSS_STATUS_TRYAGAIN, tmpbuf will get freed, resulting in a UAF +reference in res->at->name. This then gets dereferenced in the +getcanonname_r plugin call, resulting in the use after free. + +Fix this by copying h_name over and freeing it at the end. This +resolves BZ #30843, which is assigned CVE-2023-4806. + +Signed-off-by: Siddhesh Poyarekar +(cherry picked from commit 973fe93a5675c42798b2161c6f29c01b0e243994) +--- + nss/Makefile | 15 ++++- + nss/nss_test_gai_hv2_canonname.c | 56 +++++++++++++++++ + nss/tst-nss-gai-hv2-canonname.c | 63 +++++++++++++++++++ + nss/tst-nss-gai-hv2-canonname.h | 1 + + .../postclean.req | 0 + .../tst-nss-gai-hv2-canonname.script | 2 + + sysdeps/posix/getaddrinfo.c | 25 +++++--- + 7 files changed, 152 insertions(+), 10 deletions(-) + create mode 100644 nss/nss_test_gai_hv2_canonname.c + create mode 100644 nss/tst-nss-gai-hv2-canonname.c + create mode 100644 nss/tst-nss-gai-hv2-canonname.h + create mode 100644 nss/tst-nss-gai-hv2-canonname.root/postclean.req + create mode 100644 nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script + +diff --git a/nss/Makefile b/nss/Makefile +index d8b06b44fb..ed1c05158e 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -80,6 +80,7 @@ tests-container := \ + tst-nss-test3 \ + tst-reload1 \ + tst-reload2 \ ++ tst-nss-gai-hv2-canonname \ + # tests-container + + # Tests which need libdl +@@ -143,7 +144,8 @@ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) + ifeq ($(build-static-nss),yes) + tests-static += tst-nss-static + endif +-extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os ++extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os \ ++ nss_test_gai_hv2_canonname.os + + include ../Rules + +@@ -178,12 +180,16 @@ rtld-tests-LDFLAGS += -Wl,--dynamic-list=nss_test.ver + libof-nss_test1 = extramodules + libof-nss_test2 = extramodules + libof-nss_test_errno = extramodules ++libof-nss_test_gai_hv2_canonname = extramodules + $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps) + $(build-module) + $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps) + $(build-module) + $(objpfx)/libnss_test_errno.so: $(objpfx)nss_test_errno.os $(link-libc-deps) + $(build-module) ++$(objpfx)/libnss_test_gai_hv2_canonname.so: \ ++ $(objpfx)nss_test_gai_hv2_canonname.os $(link-libc-deps) ++ $(build-module) + $(objpfx)nss_test2.os : nss_test1.c + # Use the nss_files suffix for these objects as well. + $(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so +@@ -193,10 +199,14 @@ $(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so + $(objpfx)/libnss_test_errno.so$(libnss_files.so-version): \ + $(objpfx)/libnss_test_errno.so + $(make-link) ++$(objpfx)/libnss_test_gai_hv2_canonname.so$(libnss_files.so-version): \ ++ $(objpfx)/libnss_test_gai_hv2_canonname.so ++ $(make-link) + $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \ + $(objpfx)/libnss_test1.so$(libnss_files.so-version) \ + $(objpfx)/libnss_test2.so$(libnss_files.so-version) \ +- $(objpfx)/libnss_test_errno.so$(libnss_files.so-version) ++ $(objpfx)/libnss_test_errno.so$(libnss_files.so-version) \ ++ $(objpfx)/libnss_test_gai_hv2_canonname.so$(libnss_files.so-version) + + ifeq (yes,$(have-thread-library)) + $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library) +@@ -213,3 +223,4 @@ LDFLAGS-tst-nss-test3 = -Wl,--disable-new-dtags + LDFLAGS-tst-nss-test4 = -Wl,--disable-new-dtags + LDFLAGS-tst-nss-test5 = -Wl,--disable-new-dtags + LDFLAGS-tst-nss-test_errno = -Wl,--disable-new-dtags ++LDFLAGS-tst-nss-test_gai_hv2_canonname = -Wl,--disable-new-dtags +diff --git a/nss/nss_test_gai_hv2_canonname.c b/nss/nss_test_gai_hv2_canonname.c +new file mode 100644 +index 0000000000..4439c83c9f +--- /dev/null ++++ b/nss/nss_test_gai_hv2_canonname.c +@@ -0,0 +1,56 @@ ++/* NSS service provider that only provides gethostbyname2_r. ++ Copyright The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include "nss/tst-nss-gai-hv2-canonname.h" ++ ++/* Catch misnamed and functions. */ ++#pragma GCC diagnostic error "-Wmissing-prototypes" ++NSS_DECLARE_MODULE_FUNCTIONS (test_gai_hv2_canonname) ++ ++extern enum nss_status _nss_files_gethostbyname2_r (const char *, int, ++ struct hostent *, char *, ++ size_t, int *, int *); ++ ++enum nss_status ++_nss_test_gai_hv2_canonname_gethostbyname2_r (const char *name, int af, ++ struct hostent *result, ++ char *buffer, size_t buflen, ++ int *errnop, int *herrnop) ++{ ++ return _nss_files_gethostbyname2_r (name, af, result, buffer, buflen, errnop, ++ herrnop); ++} ++ ++enum nss_status ++_nss_test_gai_hv2_canonname_getcanonname_r (const char *name, char *buffer, ++ size_t buflen, char **result, ++ int *errnop, int *h_errnop) ++{ ++ /* We expect QUERYNAME, which is a small enough string that it shouldn't fail ++ the test. */ ++ if (memcmp (QUERYNAME, name, sizeof (QUERYNAME)) ++ || buflen < sizeof (QUERYNAME)) ++ abort (); ++ ++ strncpy (buffer, name, buflen); ++ *result = buffer; ++ return NSS_STATUS_SUCCESS; ++} +diff --git a/nss/tst-nss-gai-hv2-canonname.c b/nss/tst-nss-gai-hv2-canonname.c +new file mode 100644 +index 0000000000..d5f10c07d6 +--- /dev/null ++++ b/nss/tst-nss-gai-hv2-canonname.c +@@ -0,0 +1,63 @@ ++/* Test NSS query path for plugins that only implement gethostbyname2 ++ (#30843). ++ Copyright The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "nss/tst-nss-gai-hv2-canonname.h" ++ ++#define PREPARE do_prepare ++ ++static void do_prepare (int a, char **av) ++{ ++ FILE *hosts = xfopen ("/etc/hosts", "w"); ++ for (unsigned i = 2; i < 255; i++) ++ { ++ fprintf (hosts, "ff01::ff02:ff03:%u:2\ttest.example.com\n", i); ++ fprintf (hosts, "192.168.0.%u\ttest.example.com\n", i); ++ } ++ xfclose (hosts); ++} ++ ++static int ++do_test (void) ++{ ++ __nss_configure_lookup ("hosts", "test_gai_hv2_canonname"); ++ ++ struct addrinfo hints = {}; ++ struct addrinfo *result = NULL; ++ ++ hints.ai_family = AF_INET6; ++ hints.ai_flags = AI_ALL | AI_V4MAPPED | AI_CANONNAME; ++ ++ int ret = getaddrinfo (QUERYNAME, NULL, &hints, &result); ++ ++ if (ret != 0) ++ FAIL_EXIT1 ("getaddrinfo failed: %s\n", gai_strerror (ret)); ++ ++ TEST_COMPARE_STRING (result->ai_canonname, QUERYNAME); ++ ++ freeaddrinfo(result); ++ return 0; ++} ++ ++#include +diff --git a/nss/tst-nss-gai-hv2-canonname.h b/nss/tst-nss-gai-hv2-canonname.h +new file mode 100644 +index 0000000000..14f2a9cb08 +--- /dev/null ++++ b/nss/tst-nss-gai-hv2-canonname.h +@@ -0,0 +1 @@ ++#define QUERYNAME "test.example.com" +diff --git a/nss/tst-nss-gai-hv2-canonname.root/postclean.req b/nss/tst-nss-gai-hv2-canonname.root/postclean.req +new file mode 100644 +index 0000000000..e69de29bb2 +diff --git a/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script b/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script +new file mode 100644 +index 0000000000..31848b4a28 +--- /dev/null ++++ b/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script +@@ -0,0 +1,2 @@ ++cp $B/nss/libnss_test_gai_hv2_canonname.so $L/libnss_test_gai_hv2_canonname.so.2 ++su +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 0ece3b46b7..ad7891a953 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -120,6 +120,7 @@ struct gaih_result + { + struct gaih_addrtuple *at; + char *canon; ++ char *h_name; + bool free_at; + bool got_ipv6; + }; +@@ -165,6 +166,7 @@ gaih_result_reset (struct gaih_result *res) + if (res->free_at) + free (res->at); + free (res->canon); ++ free (res->h_name); + memset (res, 0, sizeof (*res)); + } + +@@ -203,9 +205,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, + return 0; + } + +-/* Convert struct hostent to a list of struct gaih_addrtuple objects. h_name +- is not copied, and the struct hostent object must not be deallocated +- prematurely. The new addresses are appended to the tuple array in RES. */ ++/* Convert struct hostent to a list of struct gaih_addrtuple objects. The new ++ addresses are appended to the tuple array in RES. */ + static bool + convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family, + struct hostent *h, struct gaih_result *res) +@@ -238,6 +239,15 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family, + res->at = array; + res->free_at = true; + ++ /* Duplicate h_name because it may get reclaimed when the underlying storage ++ is freed. */ ++ if (res->h_name == NULL) ++ { ++ res->h_name = __strdup (h->h_name); ++ if (res->h_name == NULL) ++ return false; ++ } ++ + /* Update the next pointers on reallocation. */ + for (size_t i = 0; i < old; i++) + array[i].next = array + i + 1; +@@ -262,7 +272,6 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family, + } + array[i].next = array + i + 1; + } +- array[0].name = h->h_name; + array[count - 1].next = NULL; + + return true; +@@ -324,15 +333,15 @@ gethosts (nss_gethostbyname3_r fct, int family, const char *name, + memory allocation failure. The returned string is allocated on the + heap; the caller has to free it. */ + static char * +-getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name) ++getcanonname (nss_action_list nip, const char *hname, const char *name) + { + nss_getcanonname_r *cfct = __nss_lookup_function (nip, "getcanonname_r"); + char *s = (char *) name; + if (cfct != NULL) + { + char buf[256]; +- if (DL_CALL_FCT (cfct, (at->name ?: name, buf, sizeof (buf), +- &s, &errno, &h_errno)) != NSS_STATUS_SUCCESS) ++ if (DL_CALL_FCT (cfct, (hname ?: name, buf, sizeof (buf), &s, &errno, ++ &h_errno)) != NSS_STATUS_SUCCESS) + /* If the canonical name cannot be determined, use the passed + string. */ + s = (char *) name; +@@ -771,7 +780,7 @@ get_nss_addresses (const char *name, const struct addrinfo *req, + if ((req->ai_flags & AI_CANONNAME) != 0 + && res->canon == NULL) + { +- char *canonbuf = getcanonname (nip, res->at, name); ++ char *canonbuf = getcanonname (nip, res->h_name, name); + if (canonbuf == NULL) + { + __resolv_context_put (res_ctx); + +From c84018a05aec80f5ee6f682db0da1130b0196aef Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Tue, 19 Sep 2023 18:39:32 -0400 +Subject: [PATCH] tunables: Terminate if end of input is reached + (CVE-2023-4911) + +The string parsing routine may end up writing beyond bounds of tunestr +if the input tunable string is malformed, of the form name=name=val. +This gets processed twice, first as name=name=val and next as name=val, +resulting in tunestr being name=name=val:name=val, thus overflowing +tunestr. + +Terminate the parsing loop at the first instance itself so that tunestr +does not overflow. + +This also fixes up tst-env-setuid-tunables to actually handle failures +correct and add new tests to validate the fix for this CVE. + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: Carlos O'Donell +(cherry picked from commit 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa) +--- + elf/dl-tunables.c | 17 +++++++++------- + elf/tst-env-setuid-tunables.c | 37 +++++++++++++++++++++++++++-------- + 2 files changed, 39 insertions(+), 15 deletions(-) + +diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c +index 8e7ee9df10..76cf8b9da3 100644 +--- a/elf/dl-tunables.c ++++ b/elf/dl-tunables.c +@@ -187,11 +187,7 @@ parse_tunables (char *tunestr, char *valstring) + /* If we reach the end of the string before getting a valid name-value + pair, bail out. */ + if (p[len] == '\0') +- { +- if (__libc_enable_secure) +- tunestr[off] = '\0'; +- return; +- } ++ break; + + /* We did not find a valid name-value pair before encountering the + colon. */ +@@ -251,9 +247,16 @@ parse_tunables (char *tunestr, char *valstring) + } + } + +- if (p[len] != '\0') +- p += len + 1; ++ /* We reached the end while processing the tunable string. */ ++ if (p[len] == '\0') ++ break; ++ ++ p += len + 1; + } ++ ++ /* Terminate tunestr before we leave. */ ++ if (__libc_enable_secure) ++ tunestr[off] = '\0'; + } + #endif + +diff --git a/elf/tst-env-setuid-tunables.c b/elf/tst-env-setuid-tunables.c +index 88182b7b25..5e9e4c5756 100644 +--- a/elf/tst-env-setuid-tunables.c ++++ b/elf/tst-env-setuid-tunables.c +@@ -52,6 +52,8 @@ const char *teststrings[] = + "glibc.malloc.perturb=0x800:not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", + "glibc.not_valid.check=2:glibc.malloc.mmap_threshold=4096", + "not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.mmap_threshold=glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.check=2", + "glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096:glibc.malloc.check=2", + "glibc.malloc.check=4:glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096", + ":glibc.malloc.garbage=2:glibc.malloc.check=1", +@@ -70,6 +72,8 @@ const char *resultstrings[] = + "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", + "glibc.malloc.mmap_threshold=4096", + "glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.mmap_threshold=glibc.malloc.mmap_threshold=4096", ++ "", + "", + "", + "", +@@ -84,11 +88,18 @@ test_child (int off) + const char *val = getenv ("GLIBC_TUNABLES"); + + #if HAVE_TUNABLES ++ printf (" [%d] GLIBC_TUNABLES is %s\n", off, val); ++ fflush (stdout); + if (val != NULL && strcmp (val, resultstrings[off]) == 0) + return 0; + + if (val != NULL) +- printf ("[%d] Unexpected GLIBC_TUNABLES VALUE %s\n", off, val); ++ printf (" [%d] Unexpected GLIBC_TUNABLES VALUE %s, expected %s\n", ++ off, val, resultstrings[off]); ++ else ++ printf (" [%d] GLIBC_TUNABLES environment variable absent\n", off); ++ ++ fflush (stdout); + + return 1; + #else +@@ -117,21 +128,26 @@ do_test (int argc, char **argv) + if (ret != 0) + exit (1); + +- exit (EXIT_SUCCESS); ++ /* Special return code to make sure that the child executed all the way ++ through. */ ++ exit (42); + } + else + { +- int ret = 0; +- + /* Spawn tests. */ + for (int i = 0; i < array_length (teststrings); i++) + { + char buf[INT_BUFSIZE_BOUND (int)]; + +- printf ("Spawned test for %s (%d)\n", teststrings[i], i); ++ printf ("[%d] Spawned test for %s\n", i, teststrings[i]); + snprintf (buf, sizeof (buf), "%d\n", i); ++ fflush (stdout); + if (setenv ("GLIBC_TUNABLES", teststrings[i], 1) != 0) +- exit (1); ++ { ++ printf (" [%d] Failed to set GLIBC_TUNABLES: %m", i); ++ support_record_failure (); ++ continue; ++ } + + int status = support_capture_subprogram_self_sgid (buf); + +@@ -139,9 +155,14 @@ do_test (int argc, char **argv) + if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) + return EXIT_UNSUPPORTED; + +- ret |= status; ++ if (WEXITSTATUS (status) != 42) ++ { ++ printf (" [%d] child failed with status %d\n", i, ++ WEXITSTATUS (status)); ++ support_record_failure (); ++ } + } +- return ret; ++ return 0; + } + } + + +From 17092c0311f954e6f3c010f73ce3a78c24ac279a Mon Sep 17 00:00:00 2001 +From: Romain Geissler +Date: Mon, 25 Sep 2023 01:21:51 +0100 +Subject: [PATCH] Fix leak in getaddrinfo introduced by the fix for + CVE-2023-4806 [BZ #30843] + +This patch fixes a very recently added leak in getaddrinfo. + +This was assigned CVE-2023-5156. + +Resolves: BZ #30884 +Related: BZ #30842 + +Reviewed-by: Siddhesh Poyarekar +(cherry picked from commit ec6b95c3303c700eb89eebeda2d7264cc184a796) +--- + nss/Makefile | 20 ++++++++++++++++++++ + nss/tst-nss-gai-hv2-canonname.c | 3 +++ + sysdeps/posix/getaddrinfo.c | 4 +--- + 3 files changed, 24 insertions(+), 3 deletions(-) + +diff --git a/nss/Makefile b/nss/Makefile +index ed1c05158e..6cac7dd83b 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -147,6 +147,15 @@ endif + extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os \ + nss_test_gai_hv2_canonname.os + ++ifeq ($(run-built-tests),yes) ++ifneq (no,$(PERL)) ++tests-special += $(objpfx)mtrace-tst-nss-gai-hv2-canonname.out ++endif ++endif ++ ++generated += mtrace-tst-nss-gai-hv2-canonname.out \ ++ tst-nss-gai-hv2-canonname.mtrace ++ + include ../Rules + + ifeq (yes,$(have-selinux)) +@@ -215,6 +224,17 @@ endif + $(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so + $(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so + ++tst-nss-gai-hv2-canonname-ENV = \ ++ MALLOC_TRACE=$(objpfx)tst-nss-gai-hv2-canonname.mtrace \ ++ LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so ++$(objpfx)mtrace-tst-nss-gai-hv2-canonname.out: \ ++ $(objpfx)tst-nss-gai-hv2-canonname.out ++ { test -r $(objpfx)tst-nss-gai-hv2-canonname.mtrace \ ++ || ( echo "tst-nss-gai-hv2-canonname.mtrace does not exist"; exit 77; ) \ ++ && $(common-objpfx)malloc/mtrace \ ++ $(objpfx)tst-nss-gai-hv2-canonname.mtrace; } > $@; \ ++ $(evaluate-test) ++ + # Disable DT_RUNPATH on NSS tests so that the glibc internal NSS + # functions can load testing NSS modules via DT_RPATH. + LDFLAGS-tst-nss-test1 = -Wl,--disable-new-dtags +diff --git a/nss/tst-nss-gai-hv2-canonname.c b/nss/tst-nss-gai-hv2-canonname.c +index d5f10c07d6..7db53cf09d 100644 +--- a/nss/tst-nss-gai-hv2-canonname.c ++++ b/nss/tst-nss-gai-hv2-canonname.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include "nss/tst-nss-gai-hv2-canonname.h" +@@ -41,6 +42,8 @@ static void do_prepare (int a, char **av) + static int + do_test (void) + { ++ mtrace (); ++ + __nss_configure_lookup ("hosts", "test_gai_hv2_canonname"); + + struct addrinfo hints = {}; +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index ad7891a953..f4c08d6e3b 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -1196,9 +1196,7 @@ free_and_return: + if (malloc_name) + free ((char *) name); + free (addrmem); +- if (res.free_at) +- free (res.at); +- free (res.canon); ++ gaih_result_reset (&res); + + return result; + } + +From e9eb987894007cf928a0a31df25a5d0435fb7911 Mon Sep 17 00:00:00 2001 +From: DJ Delorie +Date: Mon, 28 Mar 2022 23:53:33 -0400 +Subject: [PATCH] Allow for unpriviledged nested containers + +If the build itself is run in a container, we may not be able to +fully set up a nested container for test-container testing. +Notably is the mounting of /proc, since it's critical that it +be mounted from within the same PID namespace as its users, and +thus cannot be bind mounted from outside the container like other +mounts. + +This patch defaults to using the parent's PID namespace instead of +creating a new one, as this is more likely to be allowed. + +If the test needs an isolated PID namespace, it should add the "pidns" +command to its init script. + +Reviewed-by: Carlos O'Donell +(cherry picked from commit 2fe64148a81f0d78050c302f34a6853d21f7cae4) +--- + elf/tst-pldd.c | 2 + + nptl/tst-pthread-getattr.c | 4 + + nss/tst-reload2.c | 2 + + support/Makefile | 1 + + support/support.h | 5 ++ + support/support_need_proc.c | 35 +++++++++ + support/test-container.c | 141 +++++++++++++++++++++++++++--------- + 7 files changed, 155 insertions(+), 35 deletions(-) + create mode 100644 support/support_need_proc.c + +diff --git a/elf/tst-pldd.c b/elf/tst-pldd.c +index 8916ce5a2e..0616545b1d 100644 +--- a/elf/tst-pldd.c ++++ b/elf/tst-pldd.c +@@ -85,6 +85,8 @@ in_str_list (const char *libname, const char *const strlist[]) + static int + do_test (void) + { ++ support_need_proc ("needs /proc/sys/kernel/yama/ptrace_scope and /proc/$child"); ++ + /* Check if our subprocess can be debugged with ptrace. */ + { + int ptrace_scope = support_ptrace_scope (); +diff --git a/nptl/tst-pthread-getattr.c b/nptl/tst-pthread-getattr.c +index d2ebf308ae..3f6f76ea83 100644 +--- a/nptl/tst-pthread-getattr.c ++++ b/nptl/tst-pthread-getattr.c +@@ -28,6 +28,8 @@ + #include + #include + ++#include ++ + /* There is an obscure bug in the kernel due to which RLIMIT_STACK is sometimes + returned as unlimited when it is not, which may cause this test to fail. + There is also the other case where RLIMIT_STACK is intentionally set as +@@ -153,6 +155,8 @@ check_stack_top (void) + static int + do_test (void) + { ++ support_need_proc ("Reads /proc/self/maps to get stack size."); ++ + pagesize = sysconf (_SC_PAGESIZE); + return check_stack_top (); + } +diff --git a/nss/tst-reload2.c b/nss/tst-reload2.c +index fb3b94a1fa..7df0ca740b 100644 +--- a/nss/tst-reload2.c ++++ b/nss/tst-reload2.c +@@ -95,6 +95,8 @@ do_test (void) + char buf1[PATH_MAX]; + char buf2[PATH_MAX]; + ++ support_need_proc ("Our xmkdirp fails if we can't map our uid, which requires /proc."); ++ + sprintf (buf1, "/subdir%s", support_slibdir_prefix); + xmkdirp (buf1, 0777); + +diff --git a/support/Makefile b/support/Makefile +index 5ddcb8d158..f036a81304 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -64,6 +64,7 @@ libsupport-routines = \ + support_format_netent \ + support_isolate_in_subprocess \ + support_mutex_pi_monotonic \ ++ support_need_proc \ + support_path_support_time64 \ + support_process_state \ + support_ptrace \ +diff --git a/support/support.h b/support/support.h +index 73b9fc48f0..d20051da4d 100644 +--- a/support/support.h ++++ b/support/support.h +@@ -91,6 +91,11 @@ char *support_quote_string (const char *); + regular file open for writing, and initially empty. */ + int support_descriptor_supports_holes (int fd); + ++/* Predicates that a test requires a working /proc filesystem. This ++ call will exit with UNSUPPORTED if /proc is not available, printing ++ WHY_MSG as part of the diagnostic. */ ++void support_need_proc (const char *why_msg); ++ + /* Error-checking wrapper functions which terminate the process on + error. */ + +diff --git a/support/support_need_proc.c b/support/support_need_proc.c +new file mode 100644 +index 0000000000..9b4eab7539 +--- /dev/null ++++ b/support/support_need_proc.c +@@ -0,0 +1,35 @@ ++/* Indicate that a test requires a working /proc. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++/* We test for /proc/self/maps since that's one of the files that one ++ of our tests actually uses, but the general idea is if Linux's ++ /proc/ (procfs) filesystem is mounted. If not, the process exits ++ with an UNSUPPORTED result code. */ ++ ++void ++support_need_proc (const char *why_msg) ++{ ++#ifdef __linux__ ++ if (access ("/proc/self/maps", R_OK)) ++ FAIL_UNSUPPORTED ("/proc is not available, %s", why_msg); ++#endif ++} +diff --git a/support/test-container.c b/support/test-container.c +index 25e7f14219..c837c4d758 100644 +--- a/support/test-container.c ++++ b/support/test-container.c +@@ -97,6 +97,7 @@ int verbose = 0; + * mytest.root/mytest.script has a list of "commands" to run: + syntax: + # comment ++ pidns + su + mv FILE FILE + cp FILE FILE +@@ -122,6 +123,8 @@ int verbose = 0; + + details: + - '#': A comment. ++ - 'pidns': Require a separate PID namespace, prints comment if it can't ++ (default is a shared pid namespace) + - 'su': Enables running test as root in the container. + - 'mv': A minimal move files command. + - 'cp': A minimal copy files command. +@@ -148,7 +151,7 @@ int verbose = 0; + * Simple, easy to review code (i.e. prefer simple naive code over + complex efficient code) + +- * The current implementation ist parallel-make-safe, but only in ++ * The current implementation is parallel-make-safe, but only in + that it uses a lock to prevent parallel access to the testroot. */ + + +@@ -227,11 +230,37 @@ concat (const char *str, ...) + return bufs[n]; + } + ++/* Like the above, but put spaces between words. Caller frees. */ ++static char * ++concat_words (char **words, int num_words) ++{ ++ int len = 0; ++ int i; ++ char *rv, *p; ++ ++ for (i = 0; i < num_words; i ++) ++ { ++ len += strlen (words[i]); ++ len ++; ++ } ++ ++ p = rv = (char *) xmalloc (len); ++ ++ for (i = 0; i < num_words; i ++) ++ { ++ if (i > 0) ++ p = stpcpy (p, " "); ++ p = stpcpy (p, words[i]); ++ } ++ ++ return rv; ++} ++ + /* Try to mount SRC onto DEST. */ + static void + trymount (const char *src, const char *dest) + { +- if (mount (src, dest, "", MS_BIND, NULL) < 0) ++ if (mount (src, dest, "", MS_BIND | MS_REC, NULL) < 0) + FAIL_EXIT1 ("can't mount %s onto %s\n", src, dest); + } + +@@ -726,6 +755,9 @@ main (int argc, char **argv) + gid_t original_gid; + /* If set, the test runs as root instead of the user running the testsuite. */ + int be_su = 0; ++ int require_pidns = 0; ++ const char *pidns_comment = NULL; ++ int do_proc_mounts = 0; + int UMAP; + int GMAP; + /* Used for "%lld %lld 1" so need not be large. */ +@@ -1011,6 +1043,12 @@ main (int argc, char **argv) + { + be_su = 1; + } ++ else if (nt >= 1 && strcmp (the_words[0], "pidns") == 0) ++ { ++ require_pidns = 1; ++ if (nt > 1) ++ pidns_comment = concat_words (the_words + 1, nt - 1); ++ } + else if (nt == 3 && strcmp (the_words[0], "mkdirp") == 0) + { + long int m; +@@ -1068,7 +1106,8 @@ main (int argc, char **argv) + + #ifdef CLONE_NEWNS + /* The unshare here gives us our own spaces and capabilities. */ +- if (unshare (CLONE_NEWUSER | CLONE_NEWPID | CLONE_NEWNS) < 0) ++ if (unshare (CLONE_NEWUSER | CLONE_NEWNS ++ | (require_pidns ? CLONE_NEWPID : 0)) < 0) + { + /* Older kernels may not support all the options, or security + policy may block this call. */ +@@ -1079,6 +1118,11 @@ main (int argc, char **argv) + check_for_unshare_hints (); + FAIL_UNSUPPORTED ("unable to unshare user/fs: %s", strerror (saved_errno)); + } ++ /* We're about to exit anyway, it's "safe" to call unshare again ++ just to see if the CLONE_NEWPID caused the error. */ ++ else if (require_pidns && unshare (CLONE_NEWUSER | CLONE_NEWNS) >= 0) ++ FAIL_EXIT1 ("unable to unshare pid ns: %s : %s", strerror (errno), ++ pidns_comment ? pidns_comment : "required by test"); + else + FAIL_EXIT1 ("unable to unshare user/fs: %s", strerror (errno)); + } +@@ -1094,6 +1138,15 @@ main (int argc, char **argv) + trymount (support_srcdir_root, new_srcdir_path); + trymount (support_objdir_root, new_objdir_path); + ++ /* It may not be possible to mount /proc directly. */ ++ if (! require_pidns) ++ { ++ char *new_proc = concat (new_root_path, "/proc", NULL); ++ xmkdirp (new_proc, 0755); ++ trymount ("/proc", new_proc); ++ do_proc_mounts = 1; ++ } ++ + xmkdirp (concat (new_root_path, "/dev", NULL), 0755); + devmount (new_root_path, "null"); + devmount (new_root_path, "zero"); +@@ -1163,42 +1216,60 @@ main (int argc, char **argv) + + maybe_xmkdir ("/tmp", 0755); + +- /* Now that we're pid 1 (effectively "root") we can mount /proc */ +- maybe_xmkdir ("/proc", 0777); +- if (mount ("proc", "/proc", "proc", 0, NULL) < 0) +- FAIL_EXIT1 ("Unable to mount /proc: "); +- +- /* We map our original UID to the same UID in the container so we +- can own our own files normally. */ +- UMAP = open ("/proc/self/uid_map", O_WRONLY); +- if (UMAP < 0) +- FAIL_EXIT1 ("can't write to /proc/self/uid_map\n"); +- +- sprintf (tmp, "%lld %lld 1\n", +- (long long) (be_su ? 0 : original_uid), (long long) original_uid); +- write (UMAP, tmp, strlen (tmp)); +- xclose (UMAP); +- +- /* We must disable setgroups () before we can map our groups, else we +- get EPERM. */ +- GMAP = open ("/proc/self/setgroups", O_WRONLY); +- if (GMAP >= 0) ++ if (require_pidns) + { +- /* We support kernels old enough to not have this. */ +- write (GMAP, "deny\n", 5); +- xclose (GMAP); ++ /* Now that we're pid 1 (effectively "root") we can mount /proc */ ++ maybe_xmkdir ("/proc", 0777); ++ if (mount ("proc", "/proc", "proc", 0, NULL) != 0) ++ { ++ /* This happens if we're trying to create a nested container, ++ like if the build is running under podman, and we lack ++ priviledges. ++ ++ Ideally we would WARN here, but that would just add noise to ++ *every* test-container test, and the ones that care should ++ have their own relevent diagnostics. ++ ++ FAIL_EXIT1 ("Unable to mount /proc: "); */ ++ } ++ else ++ do_proc_mounts = 1; + } + +- /* We map our original GID to the same GID in the container so we +- can own our own files normally. */ +- GMAP = open ("/proc/self/gid_map", O_WRONLY); +- if (GMAP < 0) +- FAIL_EXIT1 ("can't write to /proc/self/gid_map\n"); ++ if (do_proc_mounts) ++ { ++ /* We map our original UID to the same UID in the container so we ++ can own our own files normally. */ ++ UMAP = open ("/proc/self/uid_map", O_WRONLY); ++ if (UMAP < 0) ++ FAIL_EXIT1 ("can't write to /proc/self/uid_map\n"); ++ ++ sprintf (tmp, "%lld %lld 1\n", ++ (long long) (be_su ? 0 : original_uid), (long long) original_uid); ++ write (UMAP, tmp, strlen (tmp)); ++ xclose (UMAP); ++ ++ /* We must disable setgroups () before we can map our groups, else we ++ get EPERM. */ ++ GMAP = open ("/proc/self/setgroups", O_WRONLY); ++ if (GMAP >= 0) ++ { ++ /* We support kernels old enough to not have this. */ ++ write (GMAP, "deny\n", 5); ++ xclose (GMAP); ++ } + +- sprintf (tmp, "%lld %lld 1\n", +- (long long) (be_su ? 0 : original_gid), (long long) original_gid); +- write (GMAP, tmp, strlen (tmp)); +- xclose (GMAP); ++ /* We map our original GID to the same GID in the container so we ++ can own our own files normally. */ ++ GMAP = open ("/proc/self/gid_map", O_WRONLY); ++ if (GMAP < 0) ++ FAIL_EXIT1 ("can't write to /proc/self/gid_map\n"); ++ ++ sprintf (tmp, "%lld %lld 1\n", ++ (long long) (be_su ? 0 : original_gid), (long long) original_gid); ++ write (GMAP, tmp, strlen (tmp)); ++ xclose (GMAP); ++ } + + if (change_cwd) + { + +From 36280d1ce5e245aabefb877fe4d3c6cff95dabfa Mon Sep 17 00:00:00 2001 +From: Charles Fol +Date: Thu, 28 Mar 2024 12:25:38 -0300 +Subject: [PATCH] iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing + escape sequence (CVE-2024-2961) + +ISO-2022-CN-EXT uses escape sequences to indicate character set changes +(as specified by RFC 1922). While the SOdesignation has the expected +bounds checks, neither SS2designation nor SS3designation have its; +allowing a write overflow of 1, 2, or 3 bytes with fixed values: +'$+I', '$+J', '$+K', '$+L', '$+M', or '$*H'. + +Checked on aarch64-linux-gnu. + +Co-authored-by: Adhemerval Zanella +Reviewed-by: Carlos O'Donell +Tested-by: Carlos O'Donell + +(cherry picked from commit f9dc609e06b1136bb0408be9605ce7973a767ada) +--- + iconvdata/Makefile | 5 +- + iconvdata/iso-2022-cn-ext.c | 12 +++ + iconvdata/tst-iconv-iso-2022-cn-ext.c | 128 ++++++++++++++++++++++++++ + 3 files changed, 144 insertions(+), 1 deletion(-) + create mode 100644 iconvdata/tst-iconv-iso-2022-cn-ext.c + +diff --git a/iconvdata/Makefile b/iconvdata/Makefile +index f4c089ed5d..d01b3fcab6 100644 +--- a/iconvdata/Makefile ++++ b/iconvdata/Makefile +@@ -75,7 +75,8 @@ ifeq (yes,$(build-shared)) + tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ + tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \ + bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \ +- bug-iconv13 bug-iconv14 bug-iconv15 ++ bug-iconv13 bug-iconv14 bug-iconv15 \ ++ tst-iconv-iso-2022-cn-ext + ifeq ($(have-thread-library),yes) + tests += bug-iconv3 + endif +@@ -330,6 +331,8 @@ $(objpfx)bug-iconv14.out: $(addprefix $(objpfx), $(gconv-modules)) \ + $(addprefix $(objpfx),$(modules.so)) + $(objpfx)bug-iconv15.out: $(addprefix $(objpfx), $(gconv-modules)) \ + $(addprefix $(objpfx),$(modules.so)) ++$(objpfx)tst-iconv-iso-2022-cn-ext.out: $(addprefix $(objpfx), $(gconv-modules)) \ ++ $(addprefix $(objpfx),$(modules.so)) + + $(objpfx)iconv-test.out: run-iconv-test.sh \ + $(addprefix $(objpfx), $(gconv-modules)) \ +diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c +index e09f358cad..2cc478a8c6 100644 +--- a/iconvdata/iso-2022-cn-ext.c ++++ b/iconvdata/iso-2022-cn-ext.c +@@ -574,6 +574,12 @@ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + { \ + const char *escseq; \ + \ ++ if (outptr + 4 > outend) \ ++ { \ ++ result = __GCONV_FULL_OUTPUT; \ ++ break; \ ++ } \ ++ \ + assert (used == CNS11643_2_set); /* XXX */ \ + escseq = "*H"; \ + *outptr++ = ESC; \ +@@ -587,6 +593,12 @@ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + { \ + const char *escseq; \ + \ ++ if (outptr + 4 > outend) \ ++ { \ ++ result = __GCONV_FULL_OUTPUT; \ ++ break; \ ++ } \ ++ \ + assert ((used >> 5) >= 3 && (used >> 5) <= 7); \ + escseq = "+I+J+K+L+M" + ((used >> 5) - 3) * 2; \ + *outptr++ = ESC; \ +diff --git a/iconvdata/tst-iconv-iso-2022-cn-ext.c b/iconvdata/tst-iconv-iso-2022-cn-ext.c +new file mode 100644 +index 0000000000..96a8765fd5 +--- /dev/null ++++ b/iconvdata/tst-iconv-iso-2022-cn-ext.c +@@ -0,0 +1,128 @@ ++/* Verify ISO-2022-CN-EXT does not write out of the bounds. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++/* The test sets up a two memory page buffer with the second page marked ++ PROT_NONE to trigger a fault if the conversion writes beyond the exact ++ expected amount. Then we carry out various conversions and precisely ++ place the start of the output buffer in order to trigger a SIGSEGV if the ++ process writes anywhere between 1 and page sized bytes more (only one ++ PROT_NONE page is setup as a canary) than expected. These tests exercise ++ all three of the cases in ISO-2022-CN-EXT where the converter must switch ++ character sets and may run out of buffer space while doing the ++ operation. */ ++ ++static int ++do_test (void) ++{ ++ iconv_t cd = iconv_open ("ISO-2022-CN-EXT", "UTF-8"); ++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); ++ ++ char *ntf; ++ size_t ntfsize; ++ char *outbufbase; ++ { ++ int pgz = getpagesize (); ++ TEST_VERIFY_EXIT (pgz > 0); ++ ntfsize = 2 * pgz; ++ ++ ntf = xmmap (NULL, ntfsize, PROT_READ | PROT_WRITE, MAP_PRIVATE ++ | MAP_ANONYMOUS, -1); ++ xmprotect (ntf + pgz, pgz, PROT_NONE); ++ ++ outbufbase = ntf + pgz; ++ } ++ ++ /* Check if SOdesignation escape sequence does not trigger an OOB write. */ ++ { ++ char inbuf[] = "\xe4\xba\xa4\xe6\x8d\xa2"; ++ ++ for (int i = 0; i < 9; i++) ++ { ++ char *inp = inbuf; ++ size_t inleft = sizeof (inbuf) - 1; ++ ++ char *outp = outbufbase - i; ++ size_t outleft = i; ++ ++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) ++ == (size_t) -1); ++ TEST_COMPARE (errno, E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); ++ } ++ } ++ ++ /* Same as before for SS2designation. */ ++ { ++ char inbuf[] = "㴽 \xe3\xb4\xbd"; ++ ++ for (int i = 0; i < 14; i++) ++ { ++ char *inp = inbuf; ++ size_t inleft = sizeof (inbuf) - 1; ++ ++ char *outp = outbufbase - i; ++ size_t outleft = i; ++ ++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) ++ == (size_t) -1); ++ TEST_COMPARE (errno, E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); ++ } ++ } ++ ++ /* Same as before for SS3designation. */ ++ { ++ char inbuf[] = "劄 \xe5\x8a\x84"; ++ ++ for (int i = 0; i < 14; i++) ++ { ++ char *inp = inbuf; ++ size_t inleft = sizeof (inbuf) - 1; ++ ++ char *outp = outbufbase - i; ++ size_t outleft = i; ++ ++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) ++ == (size_t) -1); ++ TEST_COMPARE (errno, E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); ++ } ++ } ++ ++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); ++ ++ xmunmap (ntf, ntfsize); ++ ++ return 0; ++} ++ ++#include + +From 7a95873543ce225376faf13bb71c43dea6d24f86 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 25 Apr 2024 15:00:45 +0200 +Subject: [PATCH] CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup + cache (bug 31677) + +Using alloca matches what other caches do. The request length is +bounded by MAXKEYLEN. + +Reviewed-by: Carlos O'Donell +(cherry picked from commit 87801a8fd06db1d654eea3e4f7626ff476a9bdaa) +--- + nscd/netgroupcache.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c +index 85977521a6..f0de064368 100644 +--- a/nscd/netgroupcache.c ++++ b/nscd/netgroupcache.c +@@ -502,12 +502,13 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + = (struct indataset *) mempool_alloc (db, + sizeof (*dataset) + req->key_len, + 1); +- struct indataset dataset_mem; + bool cacheable = true; + if (__glibc_unlikely (dataset == NULL)) + { + cacheable = false; +- dataset = &dataset_mem; ++ /* The alloca is safe because nscd_run_worker verfies that ++ key_len is not larger than MAXKEYLEN. */ ++ dataset = alloca (sizeof (*dataset) + req->key_len); + } + + datahead_init_pos (&dataset->head, sizeof (*dataset) + req->key_len, + +From 4370bef52b0f3f3652c6aa13d7a9bb3ac079746d Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 25 Apr 2024 15:01:07 +0200 +Subject: [PATCH] CVE-2024-33600: nscd: Do not send missing not-found response + in addgetnetgrentX (bug 31678) + +If we failed to add a not-found response to the cache, the dataset +point can be null, resulting in a null pointer dereference. + +Reviewed-by: Siddhesh Poyarekar +(cherry picked from commit 7835b00dbce53c3c87bbbb1754a95fb5e58187aa) +--- + nscd/netgroupcache.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c +index f0de064368..a64b5930d5 100644 +--- a/nscd/netgroupcache.c ++++ b/nscd/netgroupcache.c +@@ -147,7 +147,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + /* No such service. */ + cacheable = do_notfound (db, fd, req, key, &dataset, &total, &timeout, + &key_copy); +- goto writeout; ++ goto maybe_cache_add; + } + + memset (&data, '\0', sizeof (data)); +@@ -348,7 +348,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + { + cacheable = do_notfound (db, fd, req, key, &dataset, &total, &timeout, + &key_copy); +- goto writeout; ++ goto maybe_cache_add; + } + + total = buffilled; +@@ -410,14 +410,12 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + } + + if (he == NULL && fd != -1) +- { +- /* We write the dataset before inserting it to the database +- since while inserting this thread might block and so would +- unnecessarily let the receiver wait. */ +- writeout: ++ /* We write the dataset before inserting it to the database since ++ while inserting this thread might block and so would ++ unnecessarily let the receiver wait. */ + writeall (fd, &dataset->resp, dataset->head.recsize); +- } + ++ maybe_cache_add: + if (cacheable) + { + /* If necessary, we also propagate the data to disk. */ + +From bafadc589fbe21ae330e8c2af74db9da44a17660 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 25 Apr 2024 15:01:07 +0200 +Subject: [PATCH] CVE-2024-33600: nscd: Avoid null pointer crashes after + notfound response (bug 31678) + +The addgetnetgrentX call in addinnetgrX may have failed to produce +a result, so the result variable in addinnetgrX can be NULL. +Use db->negtimeout as the fallback value if there is no result data; +the timeout is also overwritten below. + +Also avoid sending a second not-found response. (The client +disconnects after receiving the first response, so the data stream did +not go out of sync even without this fix.) It is still beneficial to +add the negative response to the mapping, so that the client can get +it from there in the future, instead of going through the socket. + +Reviewed-by: Siddhesh Poyarekar +(cherry picked from commit b048a482f088e53144d26a61c390bed0210f49f2) +--- + nscd/netgroupcache.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c +index a64b5930d5..787e44d851 100644 +--- a/nscd/netgroupcache.c ++++ b/nscd/netgroupcache.c +@@ -511,14 +511,15 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + + datahead_init_pos (&dataset->head, sizeof (*dataset) + req->key_len, + sizeof (innetgroup_response_header), +- he == NULL ? 0 : dh->nreloads + 1, result->head.ttl); ++ he == NULL ? 0 : dh->nreloads + 1, ++ result == NULL ? db->negtimeout : result->head.ttl); + /* Set the notfound status and timeout based on the result from + getnetgrent. */ +- dataset->head.notfound = result->head.notfound; ++ dataset->head.notfound = result == NULL || result->head.notfound; + dataset->head.timeout = timeout; + + dataset->resp.version = NSCD_VERSION; +- dataset->resp.found = result->resp.found; ++ dataset->resp.found = result != NULL && result->resp.found; + /* Until we find a matching entry the result is 0. */ + dataset->resp.result = 0; + +@@ -566,7 +567,9 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + goto out; + } + +- if (he == NULL) ++ /* addgetnetgrentX may have already sent a notfound response. Do ++ not send another one. */ ++ if (he == NULL && dataset->resp.found) + { + /* We write the dataset before inserting it to the database + since while inserting this thread might block and so would + +From 7a5864cac60e06000394128a5a2817b03542f5a3 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 25 Apr 2024 15:01:07 +0200 +Subject: [PATCH] CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two + buffers in addgetnetgrentX (bug 31680) + +This avoids potential memory corruption when the underlying NSS +callback function does not use the buffer space to store all strings +(e.g., for constant strings). + +Instead of custom buffer management, two scratch buffers are used. +This increases stack usage somewhat. + +Scratch buffer allocation failure is handled by return -1 +(an invalid timeout value) instead of terminating the process. +This fixes bug 31679. + +Reviewed-by: Siddhesh Poyarekar +(cherry picked from commit c04a21e050d64a1193a6daab872bca2528bda44b) +--- + nscd/netgroupcache.c | 219 ++++++++++++++++++++++++------------------- + 1 file changed, 121 insertions(+), 98 deletions(-) + +diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c +index 787e44d851..aaabbbb003 100644 +--- a/nscd/netgroupcache.c ++++ b/nscd/netgroupcache.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "../inet/netgroup.h" + #include "nscd.h" +@@ -65,6 +66,16 @@ struct dataset + char strdata[0]; + }; + ++/* Send a notfound response to FD. Always returns -1 to indicate an ++ ephemeral error. */ ++static time_t ++send_notfound (int fd) ++{ ++ if (fd != -1) ++ TEMP_FAILURE_RETRY (send (fd, ¬found, sizeof (notfound), MSG_NOSIGNAL)); ++ return -1; ++} ++ + /* Sends a notfound message and prepares a notfound dataset to write to the + cache. Returns true if there was enough memory to allocate the dataset and + returns the dataset in DATASETP, total bytes to write in TOTALP and the +@@ -83,8 +94,7 @@ do_notfound (struct database_dyn *db, int fd, request_header *req, + total = sizeof (notfound); + timeout = time (NULL) + db->negtimeout; + +- if (fd != -1) +- TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL)); ++ send_notfound (fd); + + dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1); + /* If we cannot permanently store the result, so be it. */ +@@ -109,11 +119,78 @@ do_notfound (struct database_dyn *db, int fd, request_header *req, + return cacheable; + } + ++struct addgetnetgrentX_scratch ++{ ++ /* This is the result that the caller should use. It can be NULL, ++ point into buffer, or it can be in the cache. */ ++ struct dataset *dataset; ++ ++ struct scratch_buffer buffer; ++ ++ /* Used internally in addgetnetgrentX as a staging area. */ ++ struct scratch_buffer tmp; ++ ++ /* Number of bytes in buffer that are actually used. */ ++ size_t buffer_used; ++}; ++ ++static void ++addgetnetgrentX_scratch_init (struct addgetnetgrentX_scratch *scratch) ++{ ++ scratch->dataset = NULL; ++ scratch_buffer_init (&scratch->buffer); ++ scratch_buffer_init (&scratch->tmp); ++ ++ /* Reserve space for the header. */ ++ scratch->buffer_used = sizeof (struct dataset); ++ static_assert (sizeof (struct dataset) < sizeof (scratch->tmp.__space), ++ "initial buffer space"); ++ memset (scratch->tmp.data, 0, sizeof (struct dataset)); ++} ++ ++static void ++addgetnetgrentX_scratch_free (struct addgetnetgrentX_scratch *scratch) ++{ ++ scratch_buffer_free (&scratch->buffer); ++ scratch_buffer_free (&scratch->tmp); ++} ++ ++/* Copy LENGTH bytes from S into SCRATCH. Returns NULL if SCRATCH ++ could not be resized, otherwise a pointer to the copy. */ ++static char * ++addgetnetgrentX_append_n (struct addgetnetgrentX_scratch *scratch, ++ const char *s, size_t length) ++{ ++ while (true) ++ { ++ size_t remaining = scratch->buffer.length - scratch->buffer_used; ++ if (remaining >= length) ++ break; ++ if (!scratch_buffer_grow_preserve (&scratch->buffer)) ++ return NULL; ++ } ++ char *copy = scratch->buffer.data + scratch->buffer_used; ++ memcpy (copy, s, length); ++ scratch->buffer_used += length; ++ return copy; ++} ++ ++/* Copy S into SCRATCH, including its null terminator. Returns false ++ if SCRATCH could not be resized. */ ++static bool ++addgetnetgrentX_append (struct addgetnetgrentX_scratch *scratch, const char *s) ++{ ++ if (s == NULL) ++ s = ""; ++ return addgetnetgrentX_append_n (scratch, s, strlen (s) + 1) != NULL; ++} ++ ++/* Caller must initialize and free *SCRATCH. If the return value is ++ negative, this function has sent a notfound response. */ + static time_t + addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + const char *key, uid_t uid, struct hashentry *he, +- struct datahead *dh, struct dataset **resultp, +- void **tofreep) ++ struct datahead *dh, struct addgetnetgrentX_scratch *scratch) + { + if (__glibc_unlikely (debug_level > 0)) + { +@@ -132,14 +209,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + + char *key_copy = NULL; + struct __netgrent data; +- size_t buflen = MAX (1024, sizeof (*dataset) + req->key_len); +- size_t buffilled = sizeof (*dataset); +- char *buffer = NULL; + size_t nentries = 0; + size_t group_len = strlen (key) + 1; + struct name_list *first_needed + = alloca (sizeof (struct name_list) + group_len); +- *tofreep = NULL; + + if (netgroup_database == NULL + && !__nss_database_get (nss_database_netgroup, &netgroup_database)) +@@ -151,8 +224,6 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + } + + memset (&data, '\0', sizeof (data)); +- buffer = xmalloc (buflen); +- *tofreep = buffer; + first_needed->next = first_needed; + memcpy (first_needed->name, key, group_len); + data.needed_groups = first_needed; +@@ -195,8 +266,8 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + while (1) + { + int e; +- status = getfct.f (&data, buffer + buffilled, +- buflen - buffilled - req->key_len, &e); ++ status = getfct.f (&data, scratch->tmp.data, ++ scratch->tmp.length, &e); + if (status == NSS_STATUS_SUCCESS) + { + if (data.type == triple_val) +@@ -204,68 +275,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + const char *nhost = data.val.triple.host; + const char *nuser = data.val.triple.user; + const char *ndomain = data.val.triple.domain; +- +- size_t hostlen = strlen (nhost ?: "") + 1; +- size_t userlen = strlen (nuser ?: "") + 1; +- size_t domainlen = strlen (ndomain ?: "") + 1; +- +- if (nhost == NULL || nuser == NULL || ndomain == NULL +- || nhost > nuser || nuser > ndomain) +- { +- const char *last = nhost; +- if (last == NULL +- || (nuser != NULL && nuser > last)) +- last = nuser; +- if (last == NULL +- || (ndomain != NULL && ndomain > last)) +- last = ndomain; +- +- size_t bufused +- = (last == NULL +- ? buffilled +- : last + strlen (last) + 1 - buffer); +- +- /* We have to make temporary copies. */ +- size_t needed = hostlen + userlen + domainlen; +- +- if (buflen - req->key_len - bufused < needed) +- { +- buflen += MAX (buflen, 2 * needed); +- /* Save offset in the old buffer. We don't +- bother with the NULL check here since +- we'll do that later anyway. */ +- size_t nhostdiff = nhost - buffer; +- size_t nuserdiff = nuser - buffer; +- size_t ndomaindiff = ndomain - buffer; +- +- char *newbuf = xrealloc (buffer, buflen); +- /* Fix up the triplet pointers into the new +- buffer. */ +- nhost = (nhost ? newbuf + nhostdiff +- : NULL); +- nuser = (nuser ? newbuf + nuserdiff +- : NULL); +- ndomain = (ndomain ? newbuf + ndomaindiff +- : NULL); +- *tofreep = buffer = newbuf; +- } +- +- nhost = memcpy (buffer + bufused, +- nhost ?: "", hostlen); +- nuser = memcpy ((char *) nhost + hostlen, +- nuser ?: "", userlen); +- ndomain = memcpy ((char *) nuser + userlen, +- ndomain ?: "", domainlen); +- } +- +- char *wp = buffer + buffilled; +- wp = memmove (wp, nhost ?: "", hostlen); +- wp += hostlen; +- wp = memmove (wp, nuser ?: "", userlen); +- wp += userlen; +- wp = memmove (wp, ndomain ?: "", domainlen); +- wp += domainlen; +- buffilled = wp - buffer; ++ if (!(addgetnetgrentX_append (scratch, nhost) ++ && addgetnetgrentX_append (scratch, nuser) ++ && addgetnetgrentX_append (scratch, ndomain))) ++ return send_notfound (fd); + ++nentries; + } + else +@@ -317,8 +330,8 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + } + else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE) + { +- buflen *= 2; +- *tofreep = buffer = xrealloc (buffer, buflen); ++ if (!scratch_buffer_grow (&scratch->tmp)) ++ return send_notfound (fd); + } + else if (status == NSS_STATUS_RETURN + || status == NSS_STATUS_NOTFOUND +@@ -351,10 +364,17 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + goto maybe_cache_add; + } + +- total = buffilled; ++ /* Capture the result size without the key appended. */ ++ total = scratch->buffer_used; ++ ++ /* Make a copy of the key. The scratch buffer must not move after ++ this point. */ ++ key_copy = addgetnetgrentX_append_n (scratch, key, req->key_len); ++ if (key_copy == NULL) ++ return send_notfound (fd); + + /* Fill in the dataset. */ +- dataset = (struct dataset *) buffer; ++ dataset = scratch->buffer.data; + timeout = datahead_init_pos (&dataset->head, total + req->key_len, + total - offsetof (struct dataset, resp), + he == NULL ? 0 : dh->nreloads + 1, +@@ -363,11 +383,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + dataset->resp.version = NSCD_VERSION; + dataset->resp.found = 1; + dataset->resp.nresults = nentries; +- dataset->resp.result_len = buffilled - sizeof (*dataset); +- +- assert (buflen - buffilled >= req->key_len); +- key_copy = memcpy (buffer + buffilled, key, req->key_len); +- buffilled += req->key_len; ++ dataset->resp.result_len = total - sizeof (*dataset); + + /* Now we can determine whether on refill we have to create a new + record or not. */ +@@ -398,7 +414,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + if (__glibc_likely (newp != NULL)) + { + /* Adjust pointer into the memory block. */ +- key_copy = (char *) newp + (key_copy - buffer); ++ key_copy = (char *) newp + (key_copy - (char *) dataset); + + dataset = memcpy (newp, dataset, total + req->key_len); + cacheable = true; +@@ -439,7 +455,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, + } + + out: +- *resultp = dataset; ++ scratch->dataset = dataset; + + return timeout; + } +@@ -460,6 +476,9 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + if (user != NULL) + key = (char *) rawmemchr (key, '\0') + 1; + const char *domain = *key++ ? key : NULL; ++ struct addgetnetgrentX_scratch scratch; ++ ++ addgetnetgrentX_scratch_init (&scratch); + + if (__glibc_unlikely (debug_level > 0)) + { +@@ -475,12 +494,8 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + group, group_len, + db, uid); + time_t timeout; +- void *tofree; + if (result != NULL) +- { +- timeout = result->head.timeout; +- tofree = NULL; +- } ++ timeout = result->head.timeout; + else + { + request_header req_get = +@@ -489,7 +504,10 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + .key_len = group_len + }; + timeout = addgetnetgrentX (db, -1, &req_get, group, uid, NULL, NULL, +- &result, &tofree); ++ &scratch); ++ result = scratch.dataset; ++ if (timeout < 0) ++ goto out; + } + + struct indataset +@@ -603,7 +621,7 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, + } + + out: +- free (tofree); ++ addgetnetgrentX_scratch_free (&scratch); + return timeout; + } + +@@ -613,11 +631,12 @@ addgetnetgrentX_ignore (struct database_dyn *db, int fd, request_header *req, + const char *key, uid_t uid, struct hashentry *he, + struct datahead *dh) + { +- struct dataset *ignore; +- void *tofree; +- time_t timeout = addgetnetgrentX (db, fd, req, key, uid, he, dh, +- &ignore, &tofree); +- free (tofree); ++ struct addgetnetgrentX_scratch scratch; ++ addgetnetgrentX_scratch_init (&scratch); ++ time_t timeout = addgetnetgrentX (db, fd, req, key, uid, he, dh, &scratch); ++ addgetnetgrentX_scratch_free (&scratch); ++ if (timeout < 0) ++ timeout = 0; + return timeout; + } + +@@ -661,5 +680,9 @@ readdinnetgr (struct database_dyn *db, struct hashentry *he, + .key_len = he->len + }; + +- return addinnetgrX (db, -1, &req, db->data + he->key, he->owner, he, dh); ++ int timeout = addinnetgrX (db, -1, &req, db->data + he->key, he->owner, ++ he, dh); ++ if (timeout < 0) ++ timeout = 0; ++ return timeout; + } + +From 934ba77add195dde2c922b4ae809968cde62a1ff Mon Sep 17 00:00:00 2001 +From: "Maciej W. Rozycki" +Date: Wed, 7 Aug 2024 19:46:21 +0100 +Subject: [PATCH] nptl: Reorder semaphore release in tst-cancel7 + +Move the release of the semaphore used to synchronize between an extra +copy of the test run as a separate process and the main test process +until after the PID file has been locked. It is so that if the cleanup +function gets called by the test driver due to premature termination of +the main test process, then the function does not get at the PID file +before it has been locked and conclude that the extra copy of the test +has already terminated. This won't usually happen due to a relatively +high amount of time required to elapse before timeout triggers in the +test driver, but it will change with the next change. + +There is still a small time window remaining with this change in place +where the main test process gets killed for some reason between the +extra copy of the test has been already started by pthread_create(3) and +a successful return from the call to sem_wait(3), in which case the +cleanup function can be reached before PID has been written to the PID +file and the file locked. It seems that with the test case structured +as it is now and PID-based process management we have no means to avoid +it. + +Reviewed-by: Adhemerval Zanella +--- + nptl/tst-cancel7.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/nptl/tst-cancel7.c b/nptl/tst-cancel7.c +index d2350bde20..574429098c 100644 +--- a/nptl/tst-cancel7.c ++++ b/nptl/tst-cancel7.c +@@ -57,9 +57,6 @@ sl (void) + fprintf (f, "%lld\n", (long long) getpid ()); + fflush (f); + +- if (sem_post (sem) != 0) +- FAIL_EXIT1 ("sem_post: %m"); +- + struct flock fl = + { + .l_type = F_WRLCK, +@@ -70,6 +67,9 @@ sl (void) + if (fcntl (fileno (f), F_SETLK, &fl) != 0) + FAIL_EXIT1 ("fcntl (F_SETFL): %m"); + ++ if (sem_post (sem) != 0) ++ FAIL_EXIT1 ("sem_post: %m"); ++ + sigset_t ss; + sigfillset (&ss); + sigsuspend (&ss); +@@ -116,7 +116,7 @@ do_test (void) + { + pthread_t th = xpthread_create (NULL, tf, NULL); + +- /* Wait to cancel until after the pid is written. */ ++ /* Wait to cancel until after the pid is written and file locked. */ + if (sem_wait (sem) != 0) + FAIL_EXIT1 ("sem_wait: %m"); + + +From bea2ad022dadae46059de681d902129e56653c85 Mon Sep 17 00:00:00 2001 +From: "Maciej W. Rozycki" +Date: Wed, 7 Aug 2024 19:46:21 +0100 +Subject: [PATCH] nptl: Fix stray process left by tst-cancel7 blocking testing + +Fix an issue with commit b74121ae4bc5 ("Update.") and prevent a stray +process from being left behind by tst-cancel7 (and also tst-cancelx7, +which is the same test built with '-fexceptions' additionally supplied +to the compiler), which then blocks remote testing until the process has +been killed by hand. + +This test case creates a thread that runs an extra copy of the test via +system(3) and using the '--direct' option so that the test wrapper does +not interfere with this instance. This extra copy executes its business +and calls sigsuspend(2) and then never terminates by itself. Instead it +relies on being killed by the main test process directly via a thread +cancellation request or, should that fail, by issuing SIGKILL either at +the conclusion of 'do_test' or by the test driver via 'do_cleanup' where +the test timeout has been hit or the test driver interrupted. + +However if the main test process has been instead killed by a signal, +such as due to incorrect execution, before it had a chance to kill the +extra copy of the test case, then the test wrapper will terminate +without running 'do_cleanup' and consequently the extra copy of the test +case will remain forever in its suspended state, and in the remote case +in particular it means that the remote test wrapper will wait forever +for the SSH command to complete. + +This has been observed with the 'alpha-linux-gnu' target, where the main +test process triggers SIGSEGV and the test wrapper correctly records: + +Didn't expect signal from child: got `Segmentation fault' + +in nptl/tst-cancel7.out and terminates, but then the calling SSH command +continues waiting for the remaining process started in the same session +on the remote target to complete. + +Address this problem by also registering 'do_cleanup' via atexit(3), +observing that 'support_delete_temp_files' is registered by the test +wrapper before the test initializing function 'do_prepare' is called and +that we call all the functions registered in the reverse of the order in +which they were registered, so it is safe to refer to 'pidfilename' in +'do_cleanup' invoked by exit(3) because by that time temporary files +have not yet been deleted. + +A minor inconvenience is that if 'signal_handler' is invoked in the test +wrapper as a result of SIGALRM rather than SIGINT, then 'do_cleanup' +will be called twice, once as a cleanup handler and again by exit(3). +In reality it is harmless though, because issuing SIGKILL is guarded by +a record lock, so if the first call has succeeded in killing the extra +copy of the test case, then the subsequent call will do nothing. + +Reviewed-by: Adhemerval Zanella +--- + nptl/tst-cancel7.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/nptl/tst-cancel7.c b/nptl/tst-cancel7.c +index 574429098c..3f874c2a3c 100644 +--- a/nptl/tst-cancel7.c ++++ b/nptl/tst-cancel7.c +@@ -38,6 +38,8 @@ static char *semfilename; + + static sem_t *sem; + ++static void do_cleanup (void); ++ + static void * + tf (void *arg) + { +@@ -108,6 +110,8 @@ do_prepare (int argc, char *argv[]) + + xwrite (fd, " ", 1); + xclose (fd); ++ ++ atexit (do_cleanup); + } + + + +From 8b5d4be762419c4f6176261c6fea40ac559b88dc Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Wed, 22 Jan 2025 17:22:02 +0100 +Subject: [PATCH] Fix underallocation of abort_msg_s struct (CVE-2025-0395) + +Include the space needed to store the length of the message itself, in +addition to the message string. This resolves BZ #32582. + +Signed-off-by: Siddhesh Poyarekar +Reviewed: Adhemerval Zanella +(cherry picked from commit 68ee0f704cb81e9ad0a78c644a83e1e9cd2ee578) + +Conflict in sysdeps/posix/libc_fatal.c due to missing cleanup after +backtrace removal. +--- + assert/assert.c | 4 +++- + sysdeps/posix/libc_fatal.c | 5 +++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/assert/assert.c b/assert/assert.c +index 133a183bc3..9e55eeb473 100644 +--- a/assert/assert.c ++++ b/assert/assert.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -64,7 +65,8 @@ __assert_fail_base (const char *fmt, const char *assertion, const char *file, + (void) __fxprintf (NULL, "%s", str); + (void) fflush (stderr); + +- total = (total + 1 + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1); ++ total = ALIGN_UP (total + sizeof (struct abort_msg_s) + 1, ++ GLRO(dl_pagesize)); + struct abort_msg_s *buf = __mmap (NULL, total, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + if (__glibc_likely (buf != MAP_FAILED)) +diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c +index 2ee0010b8d..dfa0780514 100644 +--- a/sysdeps/posix/libc_fatal.c ++++ b/sysdeps/posix/libc_fatal.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -125,8 +126,8 @@ __libc_message (enum __libc_message_action action, const char *fmt, ...) + + if ((action & do_abort)) + { +- total = ((total + 1 + GLRO(dl_pagesize) - 1) +- & ~(GLRO(dl_pagesize) - 1)); ++ total = ALIGN_UP (total + sizeof (struct abort_msg_s) + 1, ++ GLRO(dl_pagesize)); + struct abort_msg_s *buf = __mmap (NULL, total, + PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + +From 29d9b1e59e6bea6ae268e2c8ea3173e326288ab0 Mon Sep 17 00:00:00 2001 +From: Carlos O'Donell +Date: Thu, 18 May 2023 12:56:45 -0400 +Subject: [PATCH] assert: Reformat Makefile. + +Reflow all long lines adding comment terminators. +Sort all reflowed text using scripts/sort-makefile-lines.py. + +No code generation changes observed in binary artifacts. +No regressions on x86_64 and i686. + +(cherry picked from commit ebd928224a138d4560dc0be3ef162162d62a9e43) + + # Conflicts: + # assert/Makefile + (Missing __libc_assert_fail) +--- + assert/Makefile | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +diff --git a/assert/Makefile b/assert/Makefile +index f7cf8e9b77..d2deec69a0 100644 +--- a/assert/Makefile ++++ b/assert/Makefile +@@ -22,10 +22,22 @@ subdir := assert + + include ../Makeconfig + +-headers := assert.h +- +-routines := assert assert-perr __assert +-tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++ ++headers := \ ++ assert.h ++ # headers ++ ++routines := \ ++ __assert \ ++ assert \ ++ assert-perr \ ++ # routines ++ ++tests := \ ++ test-assert \ ++ test-assert-perr \ ++ tst-assert-c++ \ ++ tst-assert-g++ \ ++ # tests + + ifeq ($(have-cxx-thread_local),yes) + CFLAGS-tst-assert-c++.o = -std=c++11 +@@ -33,7 +45,10 @@ LDLIBS-tst-assert-c++ = -lstdc++ + CFLAGS-tst-assert-g++.o = -std=gnu++11 + LDLIBS-tst-assert-g++ = -lstdc++ + else +-tests-unsupported += tst-assert-c++ tst-assert-g++ ++tests-unsupported += \ ++ tst-assert-c++ \ ++ tst-assert-g++ \ ++ # tests-unsupported + endif + + include ../Rules + +From 8b3d09dc0d350191985f9d291cc30ce96f034b49 Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Fri, 31 Jan 2025 12:16:30 -0500 +Subject: [PATCH] assert: Add test for CVE-2025-0395 + +Use the __progname symbol to override the program name to induce the +failure that CVE-2025-0395 describes. + +This is related to BZ #32582 + +Signed-off-by: Siddhesh Poyarekar +Reviewed-by: Adhemerval Zanella +(cherry picked from commit cdb9ba84191ce72e86346fb8b1d906e7cd930ea2) +--- + assert/Makefile | 1 + + assert/tst-assert-sa-2025-0001.c | 92 ++++++++++++++++++++++++++++++++ + 2 files changed, 93 insertions(+) + create mode 100644 assert/tst-assert-sa-2025-0001.c + +diff --git a/assert/Makefile b/assert/Makefile +index d2deec69a0..df5a8e6f10 100644 +--- a/assert/Makefile ++++ b/assert/Makefile +@@ -37,6 +37,7 @@ tests := \ + test-assert-perr \ + tst-assert-c++ \ + tst-assert-g++ \ ++ tst-assert-sa-2025-0001 \ + # tests + + ifeq ($(have-cxx-thread_local),yes) +diff --git a/assert/tst-assert-sa-2025-0001.c b/assert/tst-assert-sa-2025-0001.c +new file mode 100644 +index 0000000000..102cb0078d +--- /dev/null ++++ b/assert/tst-assert-sa-2025-0001.c +@@ -0,0 +1,92 @@ ++/* Test for CVE-2025-0395. ++ Copyright The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Test that a large enough __progname does not result in a buffer overflow ++ when printing an assertion failure. This was CVE-2025-0395. */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++extern const char *__progname; ++ ++int ++do_test (int argc, char **argv) ++{ ++ ++ support_need_proc ("Reads /proc/self/maps to add guards to writable maps."); ++ ignore_stderr (); ++ ++ /* XXX assumes that the assert is on a 2 digit line number. */ ++ const char *prompt = ": %s:99: do_test: Assertion `argc < 1' failed.\n"; ++ ++ int ret = fprintf (stderr, prompt, __FILE__); ++ if (ret < 0) ++ FAIL_EXIT1 ("fprintf failed: %m\n"); ++ ++ size_t pagesize = getpagesize (); ++ size_t namesize = pagesize - 1 - ret; ++ ++ /* Alter the progname so that the assert message fills the entire page. */ ++ char progname[namesize]; ++ memset (progname, 'A', namesize - 1); ++ progname[namesize - 1] = '\0'; ++ __progname = progname; ++ ++ FILE *f = xfopen ("/proc/self/maps", "r"); ++ char *line = NULL; ++ size_t len = 0; ++ uintptr_t prev_to = 0; ++ ++ /* Pad the beginning of every writable mapping with a PROT_NONE map. This ++ ensures that the mmap in the assert_fail path never ends up below a ++ writable map and will terminate immediately in case of a buffer ++ overflow. */ ++ while (xgetline (&line, &len, f)) ++ { ++ uintptr_t from, to; ++ char perm[4]; ++ ++ sscanf (line, "%" SCNxPTR "-%" SCNxPTR " %c%c%c%c ", ++ &from, &to, ++ &perm[0], &perm[1], &perm[2], &perm[3]); ++ ++ bool writable = (memchr (perm, 'w', 4) != NULL); ++ ++ if (prev_to != 0 && from - prev_to > pagesize && writable) ++ xmmap ((void *) from - pagesize, pagesize, PROT_NONE, ++ MAP_ANONYMOUS | MAP_PRIVATE, 0); ++ ++ prev_to = to; ++ } ++ ++ xfclose (f); ++ ++ assert (argc < 1); ++ return 0; ++} ++ ++#define EXPECTED_SIGNAL SIGABRT ++#define TEST_FUNCTION_ARGV do_test ++#include + +From 621c65ccf12ddd415ceeb2234423bd1acd0fabb3 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Mon, 6 Nov 2023 17:25:49 -0300 +Subject: [PATCH] elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for + static + +It mimics the ld.so behavior. + +Checked on x86_64-linux-gnu. +Reviewed-by: Siddhesh Poyarekar + +(cherry picked from commit 5451fa962cd0a90a0e2ec1d8910a559ace02bba0) + +Changes: + Keep EXTRA_UNSECURE_ENVVARS support. + Use __rawmemchr instead of strchr. + Keep LD_PROFILE_OUTPUT support. + Make tunables support optional via HAVE_TUNABLES. +--- + elf/dl-support.c | 46 +++++++++++++++++++++++----------------------- + 1 file changed, 23 insertions(+), 23 deletions(-) + +diff --git a/elf/dl-support.c b/elf/dl-support.c +index 09079c124d..c2baed694d 100644 +--- a/elf/dl-support.c ++++ b/elf/dl-support.c +@@ -272,8 +272,6 @@ _dl_non_dynamic_init (void) + _dl_main_map.l_phdr = GL(dl_phdr); + _dl_main_map.l_phnum = GL(dl_phnum); + +- _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; +- + /* Set up the data structures for the system-supplied DSO early, + so they can influence _dl_init_paths. */ + setup_vdso (NULL, NULL); +@@ -281,27 +279,6 @@ _dl_non_dynamic_init (void) + /* With vDSO setup we can initialize the function pointers. */ + setup_vdso_pointers (); + +- /* Initialize the data structures for the search paths for shared +- objects. */ +- _dl_init_paths (getenv ("LD_LIBRARY_PATH"), "LD_LIBRARY_PATH", +- /* No glibc-hwcaps selection support in statically +- linked binaries. */ +- NULL, NULL); +- +- /* Remember the last search directory added at startup. */ +- _dl_init_all_dirs = GL(dl_all_dirs); +- +- _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; +- +- _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; +- +- _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; +- +- _dl_profile_output = getenv ("LD_PROFILE_OUTPUT"); +- if (_dl_profile_output == NULL || _dl_profile_output[0] == '\0') +- _dl_profile_output +- = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; +- + if (__libc_enable_secure) + { + static const char unsecure_envvars[] = +@@ -324,6 +301,29 @@ _dl_non_dynamic_init (void) + #endif + } + ++ _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; ++ ++ /* Initialize the data structures for the search paths for shared ++ objects. */ ++ _dl_init_paths (getenv ("LD_LIBRARY_PATH"), "LD_LIBRARY_PATH", ++ /* No glibc-hwcaps selection support in statically ++ linked binaries. */ ++ NULL, NULL); ++ ++ /* Remember the last search directory added at startup. */ ++ _dl_init_all_dirs = GL(dl_all_dirs); ++ ++ _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; ++ ++ _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; ++ ++ _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; ++ ++ _dl_profile_output = getenv ("LD_PROFILE_OUTPUT"); ++ if (_dl_profile_output == NULL || _dl_profile_output[0] == '\0') ++ _dl_profile_output ++ = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; ++ + #ifdef DL_PLATFORM_INIT + DL_PLATFORM_INIT; + #endif + +From a66bc3941ff298e474d5f02d0c3303401951141f Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Jul 2025 21:43:49 +0200 +Subject: [PATCH] posix: Fix double-free after allocation failure in regcomp + (bug 33185) + +If a memory allocation failure occurs during bracket expression +parsing in regcomp, a double-free error may result. + +Reported-by: Anastasia Belova +Co-authored-by: Paul Eggert +Reviewed-by: Andreas K. Huettel +(cherry picked from commit 7ea06e994093fa0bcca0d0ee2c1db271d8d7885d) +--- + posix/Makefile | 2 +- + posix/regcomp.c | 4 +- + posix/tst-regcomp-bracket-free.c | 176 +++++++++++++++++++++++++++++++ + 4 files changed, 181 insertions(+), 2 deletions(-) + create mode 100644 posix/tst-regcomp-bracket-free.c + +diff --git a/posix/Makefile b/posix/Makefile +index 9b30b53a7c..fcb82a780a 100644 +--- a/posix/Makefile ++++ b/posix/Makefile +@@ -109,7 +109,7 @@ tests := test-errno tstgetopt testfnm runtests runptests \ + tst-glob-tilde test-ssize-max tst-spawn4 bug-regex37 \ + bug-regex38 tst-regcomp-truncated tst-spawn-chdir \ + tst-wordexp-nocmd tst-execveat tst-spawn5 \ +- tst-sched_getaffinity tst-spawn6 ++ tst-sched_getaffinity tst-spawn6 tst-regcomp-bracket-free + + # Test for the glob symbol version that was replaced in glibc 2.27. + ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes) +diff --git a/posix/regcomp.c b/posix/regcomp.c +index 84fc1cc82b..7bd0beeafe 100644 +--- a/posix/regcomp.c ++++ b/posix/regcomp.c +@@ -3383,6 +3383,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, + { + #ifdef RE_ENABLE_I18N + free_charset (mbcset); ++ mbcset = NULL; + #endif + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; +@@ -3398,7 +3399,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, + parse_bracket_exp_free_return: + re_free (sbcset); + #ifdef RE_ENABLE_I18N +- free_charset (mbcset); ++ if (__glibc_likely (mbcset != NULL)) ++ free_charset (mbcset); + #endif /* RE_ENABLE_I18N */ + return NULL; + } +diff --git a/posix/tst-regcomp-bracket-free.c b/posix/tst-regcomp-bracket-free.c +new file mode 100644 +index 0000000000..3c091d8c44 +--- /dev/null ++++ b/posix/tst-regcomp-bracket-free.c +@@ -0,0 +1,176 @@ ++/* Test regcomp bracket parsing with injected allocation failures (bug 33185). ++ Copyright (C) 2025 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This test invokes regcomp multiple times, failing one memory ++ allocation in each call. The function call should fail with ++ REG_ESPACE (or succeed if it can recover from the allocation ++ failure). Previously, there was double-free bug. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Data structure allocated via MAP_SHARED, so that writes from the ++ subprocess are visible. */ ++struct shared_data ++{ ++ /* Number of tracked allocations performed so far. */ ++ volatile unsigned int allocation_count; ++ ++ /* If this number is reached, one allocation fails. */ ++ volatile unsigned int failing_allocation; ++ ++ /* The subprocess stores the expected name here. */ ++ char name[100]; ++}; ++ ++/* Allocation count in shared mapping. */ ++static struct shared_data *shared; ++ ++/* Returns true if a failure should be injected for this allocation. */ ++static bool ++fail_this_allocation (void) ++{ ++ if (shared != NULL) ++ { ++ unsigned int count = shared->allocation_count; ++ shared->allocation_count = count + 1; ++ return count == shared->failing_allocation; ++ } ++ else ++ return false; ++} ++ ++/* Failure-injecting wrappers for allocation functions used by glibc. */ ++ ++void * ++malloc (size_t size) ++{ ++ if (fail_this_allocation ()) ++ { ++ errno = ENOMEM; ++ return NULL; ++ } ++ extern __typeof (malloc) __libc_malloc; ++ return __libc_malloc (size); ++} ++ ++void * ++calloc (size_t a, size_t b) ++{ ++ if (fail_this_allocation ()) ++ { ++ errno = ENOMEM; ++ return NULL; ++ } ++ extern __typeof (calloc) __libc_calloc; ++ return __libc_calloc (a, b); ++} ++ ++void * ++realloc (void *ptr, size_t size) ++{ ++ if (fail_this_allocation ()) ++ { ++ errno = ENOMEM; ++ return NULL; ++ } ++ extern __typeof (realloc) __libc_realloc; ++ return __libc_realloc (ptr, size); ++} ++ ++/* No-op subprocess to verify that support_isolate_in_subprocess does ++ not perform any heap allocations. */ ++static void ++no_op (void *ignored) ++{ ++} ++ ++/* Perform a regcomp call in a subprocess. Used to count its ++ allocations. */ ++static void ++initialize (void *regexp1) ++{ ++ const char *regexp = regexp1; ++ ++ shared->allocation_count = 0; ++ ++ regex_t reg; ++ TEST_COMPARE (regcomp (®, regexp, 0), 0); ++} ++ ++/* Perform regcomp in a subprocess with fault injection. */ ++static void ++test_in_subprocess (void *regexp1) ++{ ++ const char *regexp = regexp1; ++ unsigned int inject_at = shared->failing_allocation; ++ ++ regex_t reg; ++ int ret = regcomp (®, regexp, 0); ++ ++ if (ret != 0) ++ { ++ TEST_COMPARE (ret, REG_ESPACE); ++ printf ("info: allocation %u failure results in return value %d," ++ " error %s (%d)\n", ++ inject_at, ret, strerrorname_np (errno), errno); ++ } ++} ++ ++static int ++do_test (void) ++{ ++ char regexp[] = "[:alpha:]"; ++ ++ shared = support_shared_allocate (sizeof (*shared)); ++ ++ /* Disable fault injection. */ ++ shared->failing_allocation = ~0U; ++ ++ support_isolate_in_subprocess (no_op, NULL); ++ TEST_COMPARE (shared->allocation_count, 0); ++ ++ support_isolate_in_subprocess (initialize, regexp); ++ ++ /* The number of allocations in the successful case, plus some ++ slack. Once the number of expected allocations is exceeded, ++ injecting further failures does not make a difference. */ ++ unsigned int maximum_allocation_count = shared->allocation_count; ++ printf ("info: successful call performs %u allocations\n", ++ maximum_allocation_count); ++ maximum_allocation_count += 10; ++ ++ for (unsigned int inject_at = 0; inject_at <= maximum_allocation_count; ++ ++inject_at) ++ { ++ shared->allocation_count = 0; ++ shared->failing_allocation = inject_at; ++ support_isolate_in_subprocess (test_in_subprocess, regexp); ++ } ++ ++ support_shared_free (shared); ++ ++ return 0; ++} ++ ++#include + +From e3622a8f391deea3b75a577dce70d023dfa3f1c7 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Fri, 2 Jun 2023 14:02:09 -0300 +Subject: [PATCH] time: Also check for EPERM while trying to clock_settime + +Container management default seccomp filter [1] only accepts +clock_settime if process has also CAP_SYS_TIME. So also handle +EPERM as well. + +Also adapt the test to libsupport and add a proper Copyright header. + +Checked on aarch64-linux-gnu. +Reviewed-by: Carlos O'Donell +--- + time/tst-clock2.c | 59 ++++++++++++++++++++++++----------------------- + 1 file changed, 30 insertions(+), 29 deletions(-) + +diff --git a/time/tst-clock2.c b/time/tst-clock2.c +index 4c8fb9f247..9d1980e858 100644 +--- a/time/tst-clock2.c ++++ b/time/tst-clock2.c +@@ -1,43 +1,44 @@ +-/* Test setting the monotonic clock. */ ++/* Test setting the monotonic clock. ++ Copyright (C) 2007-2023 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. + +-#include +-#include ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. + +-#if defined CLOCK_MONOTONIC && defined _POSIX_MONOTONIC_CLOCK ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. + +-# include +-# include ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include + +-static int ++int + do_test (void) + { ++#if defined CLOCK_MONOTONIC && defined _POSIX_MONOTONIC_CLOCK + if (sysconf (_SC_MONOTONIC_CLOCK) <= 0) +- return 0; ++ FAIL_UNSUPPORTED ("_SC_MONOTONIC_CLOCK not supported"); + + struct timespec ts; +- if (clock_gettime (CLOCK_MONOTONIC, &ts) != 0) +- { +- puts ("clock_gettime(CLOCK_MONOTONIC) failed"); +- return 1; +- } ++ TEST_COMPARE (clock_gettime (CLOCK_MONOTONIC, &ts), 0); + + /* Setting the monotonic clock must fail. */ +- if (clock_settime (CLOCK_MONOTONIC, &ts) != -1) +- { +- puts ("clock_settime(CLOCK_MONOTONIC) did not fail"); +- return 1; +- } +- if (errno != EINVAL) +- { +- printf ("clock_settime(CLOCK_MONOTONIC) set errno to %d, expected %d\n", +- errno, EINVAL); +- return 1; +- } +- return 0; +-} +-# define TEST_FUNCTION do_test () ++ TEST_VERIFY (clock_settime (CLOCK_MONOTONIC, &ts) == -1); ++ TEST_VERIFY (errno == EINVAL || errno == EPERM); + ++ return 0; + #else +-# define TEST_FUNCTION 0 ++ return EXIT_UNSUPPORTED; + #endif +-#include "../test-skeleton.c" ++} ++ ++#include + +From d4963a844dc72c4ac14da3395cf511f3d191d689 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Fri, 2 Jun 2023 10:19:48 -0300 +Subject: [PATCH] linux: Fail as unsupported if personality call is filtered + +Container management default seccomp filter [1] only accepts +personality(2) with PER_LINUX, (0x0), UNAME26 (0x20000), +PER_LINUX32 (0x8), UNAME26 | PER_LINUX32, and 0xffffffff (to query +current personality) + +Although the documentation only state it is blocked to prevent +'enabling BSD emulation' (PER_BSD, not implemented by Linux), checking +on repository log the real reason is to block ASLR disable flag +(ADDR_NO_RANDOMIZE) and other poorly support emulations. + +So handle EPERM and fail as UNSUPPORTED if we can really check for +BZ#19408. + +Checked on aarch64-linux-gnu. + +[1] https://github.com/moby/moby/blob/master/profiles/seccomp/default.json + +Reviewed-by: Florian Weimer +--- + sysdeps/unix/sysv/linux/tst-personality.c | 33 ++++++++++++++--------- + 1 file changed, 21 insertions(+), 12 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/tst-personality.c b/sysdeps/unix/sysv/linux/tst-personality.c +index e730650e5b..5e59627826 100644 +--- a/sysdeps/unix/sysv/linux/tst-personality.c ++++ b/sysdeps/unix/sysv/linux/tst-personality.c +@@ -19,27 +19,36 @@ + + #include + #include ++#include + + static int + do_test (void) + { +- int rc = 0; + unsigned int test_persona = -EINVAL; + unsigned int saved_persona; + + errno = 0xdefaced; + saved_persona = personality (0xffffffff); + +- if (personality (test_persona) != saved_persona +- || personality (0xffffffff) == -1 +- || personality (PER_LINUX) == -1 +- || personality (0xffffffff) != PER_LINUX +- || 0xdefaced != errno) +- rc = 1; +- +- (void) personality (saved_persona); +- return rc; ++ unsigned int r = personality (test_persona); ++ if (r == -1) ++ { ++ /* The syscall argument might be filtered by kernel, so the ++ test can not check for the bug issue. */ ++ if (errno == EPERM) ++ FAIL_UNSUPPORTED ("personality syscall argument are filtered"); ++ FAIL_EXIT1 ("personality (%#x) failed: %m", test_persona); ++ } ++ ++ TEST_COMPARE (r, saved_persona); ++ TEST_VERIFY (personality (0xffffffff) != -1); ++ TEST_VERIFY (personality (PER_LINUX) != -1); ++ TEST_COMPARE (personality (0xffffffff), PER_LINUX); ++ TEST_COMPARE (0xdefaced, errno); ++ ++ personality (saved_persona); ++ ++ return 0; + } + +-#define TEST_FUNCTION do_test () +-#include "../test-skeleton.c" ++#include + +From e369114462d4340d1b90e25a2475ed5d7b45d373 Mon Sep 17 00:00:00 2001 +From: Stafford Horne +Date: Wed, 3 Apr 2024 06:40:37 +0100 +Subject: [PATCH] misc: Add support for Linux uio.h RWF_NOAPPEND flag + +In Linux 6.9 a new flag is added to allow for Per-io operations to +disable append mode even if a file was opened with the flag O_APPEND. +This is done with the new RWF_NOAPPEND flag. + +This caused two test failures as these tests expected the flag 0x00000020 +to be unused. Adding the flag definition now fixes these tests on Linux +6.9 (v6.9-rc1). + + FAIL: misc/tst-preadvwritev2 + FAIL: misc/tst-preadvwritev64v2 + +This patch adds the flag, adjusts the test and adds details to +documentation. + +Link: https://lore.kernel.org/all/20200831153207.GO3265@brightrain.aerifal.cx/ +Reviewed-by: Adhemerval Zanella +(cherry picked from commit 3db9d208dd5f30b12900989c6d2214782b8e2011) +--- + manual/llio.texi | 4 ++++ + misc/tst-preadvwritev2-common.c | 5 ++++- + sysdeps/unix/sysv/linux/bits/uio-ext.h | 1 + + 3 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/manual/llio.texi b/manual/llio.texi +index 9ed1437aee..17dabd159e 100644 +--- a/manual/llio.texi ++++ b/manual/llio.texi +@@ -1339,6 +1339,10 @@ will fail and set @code{errno} to @code{EAGAIN} if the operation would block. + + @item RWF_APPEND + Per-IO synchronization as if the file was opened with @code{O_APPEND} flag. ++ ++@item RWF_NOAPPEND ++This flag allows an offset to be honored, even if the file was opened with ++@code{O_APPEND} flag. + @end vtable + + When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the +diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c +index 40b527bdcb..ed3dc04eeb 100644 +--- a/misc/tst-preadvwritev2-common.c ++++ b/misc/tst-preadvwritev2-common.c +@@ -34,8 +34,11 @@ + #ifndef RWF_APPEND + # define RWF_APPEND 0 + #endif ++#ifndef RWF_NOAPPEND ++# define RWF_NOAPPEND 0 ++#endif + #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \ +- | RWF_APPEND) ++ | RWF_APPEND | RWF_NOAPPEND) + + /* Generic uio_lim.h does not define IOV_MAX. */ + #ifndef IOV_MAX +diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h +index 5b0dba08c5..e49b66facd 100644 +--- a/sysdeps/unix/sysv/linux/bits/uio-ext.h ++++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h +@@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, + #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ + #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ + #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ ++#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ + + __END_DECLS + +From 5ffc903216901914dc2ad9715088d3fe9d1ef205 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Tue, 8 Oct 2024 15:45:29 -0300 +Subject: [PATCH] misc: Add support for Linux uio.h RWF_ATOMIC flag + +Linux 6.11 adds the new flag for pwritev2 (commit +c34fc6f26ab86d03a2d47446f42b6cd492dfdc56). + +Checked on x86_64-linux-gnu on 6.11 kernel. + +Reviewed-by: H.J. Lu +--- + manual/llio.texi | 13 +++++++++++++ + misc/tst-preadvwritev2-common.c | 5 ++++- + sysdeps/unix/sysv/linux/bits/uio-ext.h | 2 ++ + 3 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/manual/llio.texi b/manual/llio.texi +index 05ab44c6e7..0eb336f70b 100644 +--- a/manual/llio.texi ++++ b/manual/llio.texi +@@ -1381,6 +1381,19 @@ Per-IO synchronization as if the file was opened with @code{O_APPEND} flag. + @item RWF_NOAPPEND + This flag allows an offset to be honored, even if the file was opened with + @code{O_APPEND} flag. ++ ++@item RWF_ATOMIC ++Indicate that the write is to be issued with torn-write prevention. The ++input buffer should follow some contraints: the total length should be ++power-of-2 in size and also sizes between @code{atomic_write_unit_min} ++and @code{atomic_write_unit_max}, the @code{struct iovec} count should be ++up to @code{atomic_write_segments_max}, and the offset should be ++naturally-aligned with regard to total write length. ++ ++The @code{atomic_*} values can be obtained with @code{statx} along with ++@code{STATX_WRITE_ATOMIC} flag. ++ ++This is a Linux-specific extension. + @end vtable + + When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the +diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c +index 8e04ff7282..4556421a43 100644 +--- a/misc/tst-preadvwritev2-common.c ++++ b/misc/tst-preadvwritev2-common.c +@@ -37,8 +37,11 @@ + #ifndef RWF_NOAPPEND + # define RWF_NOAPPEND 0 + #endif ++#ifndef RWF_ATOMIC ++# define RWF_ATOMIC 0 ++#endif + #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \ +- | RWF_APPEND | RWF_NOAPPEND) ++ | RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC) + + /* Generic uio_lim.h does not define IOV_MAX. */ + #ifndef IOV_MAX +diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h +index ead7a09156..85ed21bac5 100644 +--- a/sysdeps/unix/sysv/linux/bits/uio-ext.h ++++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h +@@ -48,6 +48,8 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, + #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ + #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ + #define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ ++#define RWF_ATOMIC 0x00000040 /* Write is to be issued with torn-write ++ prevention. */ + + __END_DECLS + +From 3b39822a82a2415f92ddbc1503e4a55597034573 Mon Sep 17 00:00:00 2001 +From: Xi Ruoyao +Date: Thu, 28 Aug 2025 13:56:40 +0800 +Subject: [PATCH] misc: Add support for Linux uio.h RWF_DONTCACHE flag + +Linux 6.14 adds the new flag for uncached buffered IO on a filesystem +supporting it. + +This caused two test failures as these tests expected the flag +0x00000080 is unused. Add the flag definition to fix these tests on +Linux >= 6.14: + + FAIL: misc/tst-preadvwritev2 + FAIL: misc/tst-preadvwritev64v2 + +The test failures were not detected in routine test suite runs because +normally we create the test file in /tmp, where a tmpfs is usually +mounted, and tmpfs does not support this flag. But it can be reproduced +with TMPDIR set to some directory in an ext4 file system. + +Link: https://git.kernel.org/torvalds/c/af6505e5745b +Signed-off-by: Xi Ruoyao +Reviewed-by: Adhemerval Zanella +--- + manual/llio.texi | 4 ++++ + misc/tst-preadvwritev2-common.c | 6 +++++- + sysdeps/unix/sysv/linux/bits/uio-ext.h | 1 + + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/manual/llio.texi b/manual/llio.texi +index e7fd6ca0e9..806ff0a27d 100644 +--- a/manual/llio.texi ++++ b/manual/llio.texi +@@ -1414,6 +1414,10 @@ naturally-aligned with regard to total write length. + The @code{atomic_*} values can be obtained with @code{statx} along with + @code{STATX_WRITE_ATOMIC} flag. + ++@item RWF_DONTCACHE ++Use uncached buffered IO. If the file system does not support it, the ++call will fail and set @code{errno} to @code{EOPNOTSUPP}. ++ + This is a Linux-specific extension. + @end vtable + +diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c +index ff1007d6d2..8a59ff2f9d 100644 +--- a/misc/tst-preadvwritev2-common.c ++++ b/misc/tst-preadvwritev2-common.c +@@ -40,8 +40,12 @@ + #ifndef RWF_ATOMIC + # define RWF_ATOMIC 0 + #endif ++#ifndef RWF_DONTCACHE ++# define RWF_DONTCACHE 0 ++#endif + #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \ +- | RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC) ++ | RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC \ ++ | RWF_DONTCACHE) + + /* Generic uio_lim.h does not define IOV_MAX. */ + #ifndef IOV_MAX +diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h +index 040cb8dd48..1b7ab4b495 100644 +--- a/sysdeps/unix/sysv/linux/bits/uio-ext.h ++++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h +@@ -50,6 +50,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, + #define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ + #define RWF_ATOMIC 0x00000040 /* Write is to be issued with torn-write + prevention. */ ++#define RWF_DONTCACHE 0x00000080 /* Uncached buffered IO. */ + + __END_DECLS + + +From 1dd783fafdbc30bd82e078ccab42b9539d3274a5 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Tue, 15 Feb 2022 06:57:11 -0800 +Subject: [PATCH] elf: Check invalid hole in PT_LOAD segments [BZ #28838] + +Changes in v2: + +1. Update commit log. + +commit 163f625cf9becbb82dfec63a29e566324129c0cd +Author: H.J. Lu +Date: Tue Dec 21 12:35:47 2021 -0800 + + elf: Remove excessive p_align check on PT_LOAD segments [BZ #28688] + +removed the p_align check against the page size. It caused the loader +error or crash on elf/tst-p_align3 when loading elf/tst-p_alignmod3.so, +which has the invalid p_align in PT_LOAD segments, added by + +commit d8d94863ef125a392b929732b37e07dc927fbcd1 +Author: H.J. Lu +Date: Tue Dec 21 13:42:28 2021 -0800 + +The loader failure caused by a negative length passed to __mprotect is +random, depending on architecture and toolchain. Update _dl_map_segments +to detect invalid holes. This fixes BZ #28838. + +Reviewed-by: Florian Weimer +(cherry picked from commit 2c0915cbf570cb9c8a65f1d20a55c5a7238e5b63) +--- + elf/dl-map-segments.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/elf/dl-map-segments.h b/elf/dl-map-segments.h +index 172692b120..fd24cf5d01 100644 +--- a/elf/dl-map-segments.h ++++ b/elf/dl-map-segments.h +@@ -113,6 +113,9 @@ _dl_map_segments (struct link_map *l, int fd, + unallocated. Then jump into the normal segment-mapping loop to + handle the portion of the segment past the end of the file + mapping. */ ++ if (__glibc_unlikely (loadcmds[nloadcmds - 1].mapstart < ++ c->mapend)) ++ return N_("ELF load command address/offset not page-aligned"); + if (__glibc_unlikely + (__mprotect ((caddr_t) (l->l_addr + c->mapend), + loadcmds[nloadcmds - 1].mapstart - c->mapend, diff --git a/Patches/gnu-typist/2.10.patch b/Patches/gnu-typist/2.10.patch new file mode 100644 index 0000000000000..1065ddf4ac66b --- /dev/null +++ b/Patches/gnu-typist/2.10.patch @@ -0,0 +1,170 @@ +diff --git a/configure b/configure +index 06a8497..cffea20 100755 +--- a/configure ++++ b/configure +@@ -6380,7 +6380,7 @@ fi + done + + +-# check for libncursesw ++# check for libncurses + case $host_os in + *bsd* | darwin*) + +@@ -6395,14 +6395,14 @@ else + fi + + +- # check for libncursesw ++ # check for libncurses + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for add_wch in -lncursesw" >&5 + $as_echo_n "checking for add_wch in -lncursesw... " >&6; } + if ${ac_cv_lib_ncursesw_add_wch+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lncursesw $LIBS" ++LIBS="-lncurses $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -6437,7 +6437,7 @@ if test "x$ac_cv_lib_ncursesw_add_wch" = xyes; then : + #define HAVE_LIBNCURSESW 1 + _ACEOF + +- LIBS="-lncursesw $LIBS" ++ LIBS="-lncurses $LIBS" + + else + as_fn_error $? "ncursesw library is missing: See INSTALL file for further information" "$LINENO" 5 +@@ -6445,7 +6445,7 @@ fi + + ;; + *) +- ac_fn_c_check_header_mongrel "$LINENO" "ncursesw/ncurses.h" "ac_cv_header_ncursesw_ncurses_h" "$ac_includes_default" ++ ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncursesw_ncurses_h" "$ac_includes_default" + if test "x$ac_cv_header_ncursesw_ncurses_h" = xyes; then : + HAVE_NCURSESW_H=1 + fi +@@ -6457,7 +6457,7 @@ if ${ac_cv_lib_ncursesw_add_wch+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lncursesw $LIBS" ++LIBS="-lncurses $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -6492,7 +6492,7 @@ if test "x$ac_cv_lib_ncursesw_add_wch" = xyes; then : + fi + + if test -n "$HAVE_NCURSESW_H" -a -n "$HAVE_LIBNCURSESW"; then +- LIBS="-lncursesw $LIBS" ++ LIBS="-lncurses $LIBS" + else + echo -e "Error: both library and header files for the ncursesw library\n"\ + "are required to build this package. See INSTALL file for"\ +diff --git a/src/banner.c b/src/banner.c +index 88d6f6f..00d1df4 100644 +--- a/src/banner.c ++++ b/src/banner.c +@@ -32,7 +32,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include "gettext.h" +diff --git a/src/cursmenu.c b/src/cursmenu.c +index 11b2d83..f01a398 100644 +--- a/src/cursmenu.c ++++ b/src/cursmenu.c +@@ -28,7 +28,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include "error.h" +diff --git a/src/error.c b/src/error.c +index 87844e0..fb5e3e7 100644 +--- a/src/error.c ++++ b/src/error.c +@@ -30,7 +30,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include +diff --git a/src/gtypist.c b/src/gtypist.c +index fa46c67..0549fac 100644 +--- a/src/gtypist.c ++++ b/src/gtypist.c +@@ -35,7 +35,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include +diff --git a/src/infoview.c b/src/infoview.c +index fc1c0ea..90470ad 100644 +--- a/src/infoview.c ++++ b/src/infoview.c +@@ -29,7 +29,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include "infoview.h" +diff --git a/src/script.c b/src/script.c +index faae023..a17f943 100644 +--- a/src/script.c ++++ b/src/script.c +@@ -29,7 +29,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include "error.h" +diff --git a/src/speedbox.c b/src/speedbox.c +index 72b8c52..a1a2082 100644 +--- a/src/speedbox.c ++++ b/src/speedbox.c +@@ -26,7 +26,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include "speedbox.h" +diff --git a/src/utf8.c b/src/utf8.c +index 9aa6325..45de2a3 100644 +--- a/src/utf8.c ++++ b/src/utf8.c +@@ -26,7 +26,7 @@ + #if defined(HAVE_PDCURSES) || defined(OS_BSD) + #include + #else +-#include ++#include + #endif + + #include diff --git a/Patches/gocr/0.50.patch b/Patches/gocr/0.50.patch new file mode 100644 index 0000000000000..2ba2d697b6b5b --- /dev/null +++ b/Patches/gocr/0.50.patch @@ -0,0 +1,66 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index bf4181f..883fec2 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -10,7 +10,7 @@ PROGRAM = gocr$(EXEEXT) + PGMASCLIB = Pgm2asc + #LIBPGMASCLIB = lib$(PGMASCLIB).a + # ToDo: need a better pgm2asc.h for lib users +-#INCLUDEFILES = gocr.h ++INCLUDEFILES = pgm2asc.h output.h list.h unicode.h gocr.h pnm.h + # avoid german compiler messages + LANG=C + +@@ -39,8 +39,8 @@ LIBOBJS=pgm2asc.o \ + #VPATH = @srcdir@ + bindir = @bindir@ + # lib removed for simplification +-#libdir = @libdir@ +-#includedir = @includedir@ ++libdir = @libdir@ ++includedir = /include/gocr + + CC=@CC@ + # lib removed for simplification +@@ -89,7 +89,8 @@ $(PROGRAM): $(LIBOBJS) gocr.o + $(CC) -o $@ $(LDFLAGS) gocr.o $(LIBOBJS) $(LIBS) + # if test -r $(PROGRAM); then cp $@ ../bin; fi + +-libs: lib$(PGMASCLIB).a lib$(PGMASCLIB).@PACKAGE_VERSION@.so ++#libs: lib$(PGMASCLIB).a lib$(PGMASCLIB).@PACKAGE_VERSION@.so ++libs: lib$(PGMASCLIB).a + + #lib$(PGMASCLIB).@PACKAGE_VERSION@.so: $(LIBOBJS) + # $(CC) -fPIC -shared -Wl,-h$@ -o $@ $(LIBOBJS) +@@ -109,17 +110,17 @@ $(LIBOBJS): Makefile + # PHONY = don't look at file clean, -rm = start rm and ignore errors + .PHONY : clean proper install uninstall + install: all +- #$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) +- $(INSTALL) -d $(DESTDIR)$(bindir) ++ $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) ++ #$(INSTALL) -d $(DESTDIR)$(bindir) + $(INSTALL) $(PROGRAM) $(DESTDIR)$(bindir) + $(INSTALL) ../bin/gocr.tcl $(DESTDIR)$(bindir) # better X11/bin? + if test -f lib$(PGMASCLIB).a; then\ + $(INSTALL) lib$(PGMASCLIB).a $(DESTDIR)$(libdir);\ + $(INSTALL) lib$(PGMASCLIB).@PACKAGE_VERSION@.so $(DESTDIR)$(libdir);\ + $(INSTALL) lib$(PGMASCLIB).so $(DESTDIR)$(libdir);\ ++ $(INSTALL) $(INCLUDEFILES) $(DESTDIR)$(includedir);\ ++ $(INSTALL) ../include/config.h $(DESTDIR)$(includedir);\ + fi +- # ToDo: not sure that the link will be installed correctly +- #$(INSTALL) $(INCLUDEFILES) $(DESTDIR)$(includedir) + + # directories are not removed + uninstall: +@@ -129,7 +130,8 @@ uninstall: + -rm -f $(DESTDIR)$(libdir)/lib$(PGMASCLIB).@PACKAGE_VERSION@.so + -rm -f $(DESTDIR)$(libdir)/lib$(PGMASCLIB).so + # ToDo: set to old version.so ? +- #for X in $(INCLUDEFILES); do rm -f $(DESTDIR)$(includedir)/$$X; done ++ for X in $(INCLUDEFILES); do rm -f $(DESTDIR)$(includedir)/$$X; done ++ -rm -f $(DESTDIR)$(includedir)/config.h + + clean: + -rm -f *.o *~ diff --git a/Patches/gtkglext/patch-configure.diff b/Patches/gtkglext/patch-configure.diff new file mode 100644 index 0000000000000..bb6e652b90cc6 --- /dev/null +++ b/Patches/gtkglext/patch-configure.diff @@ -0,0 +1,23028 @@ +--- configure.orig 2009-08-24 14:15:39.000000000 +0400 ++++ configure 2009-08-24 16:52:45.000000000 +0400 +@@ -1,27 +1,362 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for gtkglext 1.2.0. ++# Generated by GNU Autoconf 2.61 for gtkglext 1.2.0. + # + # Report bugs to . + # +-# Copyright (C) 2003 Free Software Foundation, Inc. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible ++cd gdk ++QUARTZ_SUBFOLDER=quartz ++if test -d $QUARTZ_SUBFOLDER ++then ++ echo "${QUARTZ_SUBFOLDER} folder already exists"; ++else ++QUARTZ_TBZ=${QUARTZ_SUBFOLDER}.tbz ++BASE64_FILE=${QUARTZ_TBZ}.txt ++ echo "extracting quartz to ${BASE64_FILE}" ++cat << EOT > ${BASE64_FILE} ++QlpoOTFBWSZTWRHupnUAdBB/9///09V///////////////4oAAgEAAwAA5AAAQAA ++CGBI3eaafS2zKFDQe++3rPOb3vPviPd759m5lfdb3Uy7btbbG9gyBUvbeePvuldP ++vffLu7F8ffDd6vvbtTtXezdBtgNHvdq6y+w1tOnDvd09Pd3d43lr757q+3nfVctP ++djp12+49el97z3p97Ojs0e57xx875e+nFe+5ocKczHrCvr73vvd22fNu03D24dap ++7aiE8fVznZbZnp1R5DQ3udLYKRbbVIo++O5tHuSOE8L27iezccty16XMSPbCrMJI ++hATEaNAEAamnpTU9M0keTTVP1R6ntCaj8k009FPU2CaanqeptNQBpp6mgaCU0EEI ++CaAiPVNT0ntNSZiJ7SmnpDeqNGmJptIb1EYE0NAABk0AAlMUQVPKPU00epHoRoG1 ++NNDRoaD1NGgNNqAABoaAAAAAAJNKIQmIRGBT9VPaGlPSflJ6eomn6kx6gyjJo2kA ++ZPSGQbUaZNMACAYIkiCNATImKbSNMJknk1Npok9NKfop+ieKenqoeRNGxBDQ09QA ++ZMQABUUQgIAmRTxMTUxoCp7TBAE1DQDTEG1NA0A0GmgAGgH6jqhOu/fJI/9Qn/f+ ++Z/j74orO20QYxPt/cdxH4561fwQXUb5cgrr/tJJ+H50bXwQTD/qj/X1C6lf/IjIQ ++VPALEU/2CxQPxCw6kdaFoahC+T+v9Py/N8/0fT+r6v1/X/ZZ9l6EAupC6nSEoiTA ++IvwiwX0iwXsSIKdfj8Z7Tx2ryYHtqe3HKxWVF5bDGtRqF8f0nMil5ehwRdarBWZ8 ++Gl3rxwNLaNWjaPRVcJqmjhrl0bSphLbdQu0FYgjrBNFgwQKaqhYgE8AsAUPkFtvw ++SqxFaG2AiQaFplKJhiTBJQpP/iTMRhJYsH8It6CwwXAWgEA/Q/pzf7IqFoIMsXEs ++C3in5yApbCFCMRgf1yRoBwrFij6aLYYS6v9z+8/hYe1s1WDalVVRFVVVEVWAbCKP ++nuEVYBECIMVTpgj7IVFagWgISEXp/EyZWGnz4ZRVqRViR/xYYsV/dLCrhZLCd8wY ++ipH8CwYtLlLIZmCgTikKDFRBEBVgqyI2lRik/tsSyosSMBRDmJ9M7Zg5GRT86pSq ++w2lFsLUFS72JFpLbCiFrZJRUrFJIjOBgpAYkJgZCKstpClslgkOEZDGKCIKIwRik ++UgIKQxLJSMUiCSYY0lD0Jju2df9hgng0MgggYZOM779UZ0ZzIqo76Rz9zAcCv+7h ++xyjbEmcUtKCOaU6CjbrlVWwmiBzZ2dfN5cZruNwIqx3KPGJx4zMWKKaeWl6LDWOB ++o4AwUYYD7RzEzMIcFGPasWKshri5QjrQRU0QM5pESKqyKSb0CkbBM2AyGxFf4g5B ++rsJw1UtjEoUs5D7gzJwmr1aa6/ne/gU1NmCgiG4ZahQ9eh6maRiHG0EGDNGsMJMI ++1h08t0TCQwM4ONYM2Etg1FtB68yEznIywUGGmcYBZJULICKxAYlJRmzC4Atoddpq ++fhoUcRRhN7DAaZMRuXSdAj9aEJJ5TF4s0yGuJbW5Xe0QNH8Kc4rZsOriBRhinfHh ++XaMnfK2Vyd1TbpzPjZdbw/rs/VisZipweu7lx5s+OhhTs7pnVCa6EL3m5ieaOPT+ ++7NpjNeVKjvLDWpll3Qk3+ExD9fU8fjVdnMOpMLi/JWSJLUyLRysVZtSbXLjg36u+ ++bQwiEuASIyMURTE2KHCRyQggR4szN/uJmKgmaeJE1JVMkvwbf1jkRMmG/xt6RHm0 ++HcgAfuyfgQQMUpECtnub7ndoWyf7c4I4wz6uoWepaWHdtkowNaf/fg0CYUYr7qBt ++E28f6cH7ZHtvhexknLq3ilb0oZxKxet3nln7U1pFm+eyfC3d7TVhMPk6/BYt5aTC ++FvRayyO+I5xAgh5pISDL2tDxRoiWknsiHTLcKUgYc7LUkXanipfhy/HCvuvpaw0P ++Bhpx0WMW1WBxfhInmkiDDGsvRpyF5i6i7CxZQSOAxxlxRgxxkUzDIQZ6dZBACQhI ++3oXa7D6Tnr2scKLOR7skwOS57qYcWiRH93meoYmQ7h8WgVUWRQBPC2KqqiqxE+Am ++h0M4Y0Vf5adb3hMukk7qti2WkM54YRxowptToqGaO4WyWCMGUIwCMQYK/xC0FCxJ ++EAXuPz9umbwxExIih8QrAFS8VFDXtyCq9T3FkbKwgB+qtBxCuWBTDvhiYaqKftpM ++Nj+w4KzrR5GlX3hljDA2NXy5axTP6Vtvc9L9JWpwPb+9wn1mpj87EmSzJVUk8HoK ++inI6ji+bX99W8dnwW+fiQueyHhcQNosPmsolHLN8G3HYGIOrRDvHYtqp6UT19SwX ++nARg91D1U+736dDH9z0fW0JEAkkFvnmwzYqgqdwTJQKB4EQmwH7+nLu2bTMHFnHO ++H7PWKY8HhqTZX6mkSjGN0lMF/GwOwNZxjJIc/wImWIvAuhy7+jCaN11ccjqKUnOb ++92YL9hF3dMekzu+mBstX1wdG7/zenPDVH6IFF6JEhMQLOrGhFQO1CY+bMOzwmTWN ++FAV4ZgYsPMFkdOre2mMW5FmaY6oZ6U/Ou1sB6WWwfQLgoEae8h8kxzQmZdw7QykD ++FRH78OaiI2ZmTDqMKT2D7B0niz6uv4fSVV9sLVVeGpMdpPWBkHhQrgwby6HwfOvS ++thPDqqr6fxxDYPQdUitAZby89Mn+194tMKEoQkGPY3iXYlp5jc2wYDWJSRpIpTi0 ++OY1b0ZfnXGSMb9tPh3U0Bx3w+0moHETKH6EJ1HKk6e7Rs26p+zwOBrJVBPHr4BvC ++iyEm+9vxsFBcI62pX4/EtSGs2R24mh4KdG7B0cvHtPqhN3Rx75mLm+OqH4ZZFsgn ++zBnT0RQY173hFsDvCqCHZw/p5OivY191wMzDJjLcet5h95c7O74WmY3VNZiLSsxJ ++vHiy7w7MMzOBeCRoBZ6FWtQzXMgahRZirP8VuB6Axt/vsXDeer3I+J+VwA9LDW9Y ++QPpJPS1SEM/TGZw0qZRA0kjvvNUOva8yEsZ30aG9EBFc4R73p22TF2uTQzv3cOyl ++wM9luEbj2HN1ZOo/PQh7Ct0+9caSWaDNljN3KPF1Q9/bP6ZznZHY64fv4p4zLZZ5 ++pV5QmhghoUEGHXWuy9Kr/f971ey+GETyQfg3neEPE09Z/xRq1U3f6bsOhoqm0lvu ++IeGdaaeHk0VmlNeUXfb/XaEqS/Kra5m/iWnF9DqQd4cern4ewqbzR631VI3/H69J ++E0qDiZHLwcoqdeRiditMdjvI/mXhGSsXAcPGMqQmYdb3W2Ld2Wphra4OV5fsLNU8 ++G4qm585ePtVXR3L8V04yYBBnDlrjulGnLHT2sGpiy2IcJ53hTjFlO9ILBXvaSoks ++p2Ul9SgIEfkTJIPoWH1kA+eFESMVhIRPjqmYUtec+E/ePh+G1zOLJl599Fxu3DMj ++1jwOo0Tdiz5JwSMJM2HSmqX642Uy/swuN0ZUCnAhGLokifcO6GZHl2meMbnRZcu6 ++1AUBWDooWu72mP2kgvmVtrF6pqTLc0NuW3l9MBcTfRE2204dTy9sO6ReHk/UnDUa ++zmdhkUc4DuK18QuoZCFC0ZEUgwwSmEp6BEeiwchiPFymojzrMhYoA4XNp7RfYykG ++RFowwDK38KT3YdEB2s+0pMZ2GMc4hJz36NdovfNh3Gvb3B4wgdtVKHP8ieebt0Jz ++3ZPIxVEAiMDoRly60mabYSD2XHLHs6LxhmJMMhy/JVe5nF7Wd+uTVmU7Pd59C+mA ++XKqvp2r7Giw5cfh5I7ORV0PVbEsgZISWR0RqRY5DtRgRXf3Qf+54EnJ2vyvkq7CU ++IabDfOKqEJHNVmDxVZ+P4BsZDbn+CoIQNbbcZm59eUpJhVseA2Gnuc+bi2ZDM45Y ++QaUVAd4Yp2tvMsxdGdjlEZKE8I0c3tWzrI6rVMRhMW8hj3Ta71HOBHjpGiVIhjMl ++i/SnmHWXDjrqTLx2BSefRLhgWtgJhm72G5+geIPuWjpzbl1qdrBVFJVSoRU0oxb4 ++JqSkHnUjXBUqm6iXCRvIJZ7jyQSTxZOIuXBsucpVdB6cTPFqrDXh0VqdVbVX7aNz ++rjCwLC60rbkXkTt1cbO8Var79EutHdjg0w293ZrdT72i1Tv23et8Lo8I88m2In5B ++z1JtHJDDhqgS6j1qVRNkNwNRIizOPiNxatyu1QmM0cV1Z4plqaA2KWukkO0Qo3tD ++lWyyF8IQJC4T5Flua64emdiAN3GaqGHYNHpRFSYJgp06+PPl2zYurj3V5V8qmUN1 ++blGikpRk+Udyk1vrtN9A8OUlsgrlNg4MSe8e+7TuUwmSbhyJGkr5mSEQ49dgEwON ++mJHV07A4l7M2OujVixsKA23FMZrikbTz6IE1IlcgcbxE5AsA8QYeAgJRYXGrwIuZ ++AqcXSdeSCOhtQSGAmtbLhFXPXwwX+PuCj5hQQlpxbxCKi8nLjZNgmoYxB6vPgW0v ++NOLjDyJxnr93IxHndGGl5K1vGGqH1fpj++25+k+2rUHzo13aRkbtH5LSuy8tOHhE ++bWBuadAOIEtTQ5z0hWLtfETrDBvB0mSjHnyX+svIJZwsMBgHLM+/RIRwiHg/Cz+W ++kJLCQR1wBsMVhCEGQA8p+1/aY97bThyLtpNnISpJCzGmCd+y53H1+W4xsdzc2zh7 ++HPMqEiCZSsvgKHI4ywLJmHMwsK6h/qWjIYLYKRFYe2xPV9zENoozQScEww4DA7uh ++RBkydRwYQAcbpUbCLrfZOvVRRGZolYqrKGqg/SjJxSsrJif+pGizOIRZYFT6hLIN ++IhsIp7sN383J+h9N/ITF5BJIMYyjxwcTvfRv8cVd0PPRJ9tI9t9Md4mFkDuCpgjq ++tsTXQYRpLE/ZKfwnqPAzJH1EMop3SoT2mJ/QXwgLrBCDEiwU0rCSj/Dg6LGWaamY ++TCMxSWWK/XgKyB2MWEFWLMyJ9EDcBQMSJEWZMmozMCk+v53kmM3K+iZjnw+nGUmQ ++tVKSV9NJ+m4cziraTf+rlV+jFew/absU7OLmRTT9ehwQp/Do9mcFEHtoaGGL3DP2 ++Xlm/R1M6fTv6WJgLYEWBD65UakcJNBbkDYKM8sHMEMnaMPZt+IKwnAYIB9GPPpIr ++2mD0JaE6zid4/ZSGMH0RzCfp1NPDTp7wGEM2/8xwefjcjAj4ySE0scDsOnNw/eEI ++7CTa0PGJ7b9MMQKOOZ9Myf82xVmv6BwoGTEEp7DdFKAY4FSjh73B3d3d3e6SSSue ++kw2Ont0QIVFDlVAk1wwEWMbl8DrGMbGNjG78bC+A64cZgGFXCyTZTMfqOIPFCKkW ++B5ck82U85qoliju5FzHYDlBImTE7OxCPF992kLrDF4e4pUF+T/IvYNHu1CBaaYij ++2b+bU3Gg5rFmWEITJMjefEW+s3Udwi5N8pyB2Ey4Mtw7wm5ItU2k5JTtvw6ukz1n ++J+pKQfEhEQqSMgDFhJIQERgIKD4j47YYZ1PJ0yQsD6w+aAgTcgJ/SkSnZrPdMED7 ++7CEnyR+RRsPwf76GA8A84kE2qwKyQfRgx/ME0hjz4/5IHg7y/x/l+j7vvmuz2va+ ++Rl9t0VT43yrLPlN5oYKcHF6nh6v7cR009fbpqlGHydd1piesgeFo/jmzE4QlM1F9 ++zN6rv4YSsC1DrAyHfCPKaPv+/69X659nsUUUUZzutxFOCuSRf64LapyKURlEIL1j ++7D5h5yc8oqSnQHGHvFBX9MpLiPp1m70HjKjd4+MPYHdB3zGhzl6PsQoHSsDAvl7a ++qmQ5hoGmH3LXAWSggvwpGBgowjexchBiQg3Gcjt3g6QZ3QHsSx3FxH5/ngdP7nD8 ++60R/Fb5Se15qir4gq8RfD3vGLWxasMi2TnLceG1D1LgNBgJPtjQwUg2B75QQghm4 ++EQSPLJjimkDt7OvVdvvRFTUzVTUyqRBli5cjlrS0tZkIQsWkIEpEtERgeEJRlUih ++VoPhqUTEokgL819S39duMqOM0ubRBre8NCvZzFcq4wx9Ra53417R1q809z2JPtrm ++epmh8Xi8fsO0/V+gNPCsKNotD9h9Ytl6RcQX7d2b3u+pCRsbn5HUGVTITbtMIRjA ++k0y6JcfaoFMrL3dh7dLVJ9WpMf4T8mfSo3USHkHiR+Wqf3EIp5w0W/M1oRY7kP7w ++j6fdJH+gXV1h87JZBJkhV+esmW01nKUKIzLrMBjxmr5uk7in2Maxkd/4xwt6e6OQ ++uG2NtJIaSBptjrbIZ6jjl6D2DkbeIuKtqhfV9f7vrQV8WCHgCi3x+ugFZEFc/p+Y ++/xz217XCLhr5Z4Z0OcmCwfQ5hRVGkrZEHR1WKqt25DXrybYF2w5RuQTGnkTAvztR ++kYBbNPpjI/a9f82mddTM7RkPt+fcni8vKuN9OdOIzM4F0Mx9H+z+VifJ6TUW5xhH ++pL9TEDCcECgwzvJlNmwm1ecV2C5Z8TEqMtU6Th+/yMsDVInGJsN0AkEms0x3GiOr ++GRxMQhfh9ArrtjNZxFxtNBFGnp4WieN1KCNzsHE2m38fzc7+JnV84FlWZmhlNEBN ++ivCasWedRVoTB0VWBVVnluWw6VYefM8WJC3ONTsNBdROXjRmZnOu03qIsSPCkJNW ++32JlDM2iLPo7u76xmCioL6sM6iihMYC0kXIC0jZ8k5vhISvd9M3sFJDWTBAYvDU/ ++cwzaTqCoZm1MmhLBBR4ZitRYNnzWLkILUVQicqSnxYSLGtgq0iMF8XGZvOXaSi6O ++Jns0hEe1HOpEwRmI/B4nyV2w/jn7P9VNkRRFX710YnL5m6u7e7oFGzi15qpeKZY+ ++ZbJZc/2l1BUCP3PRH7vDMWb9KdMW9El+Lym+JuueK+fo4l6r1xXbxrsvVvVu11LT ++PENq7R2M36ou3Auzt6jMS0Q7T+9tctT4bk3WJk2eGnje0zDVoNbpu5W2U7uEeCqn ++t9AOH1JtHPG4YiUJMueCIy4e0mxvqDomZINrpyUzV0ttPyEaB4uNnKHbN9XIZiRU ++hrJiNB+sE1rOYVuhJv0fmkXjmY2a3CDfEZvWqoRoR4w1VwygSJP2DB0LcUYKNjkY ++C3U+omxugQ91+zDpHU18Xo6KQ/oI9+zzCwNQKCUTlE6ZpG8OUBxC00e8pHTd3902 ++51FOnf8XBQzBzZXyLSBNfWIRwRAiUp7eLzTOk47vSaZZ7rsCmiP2/Hs39v9P1/fv ++dvRiYdU2LOQjpvuJ/Tdkmu1G9vxJuOXz6/9Gm/cKfJiW/GqpNJnDP24SXIqV40L3 ++OKVXJn3eH8+9j3Q9CZHk3Qk+d9m/xv+F+ppdNDR/SgAsDstkBZCSDBUg0EYMKUTD ++KFBeIDIBeIerzFvZr7vjTEekPgZSTJ5o7+KbtEcSFRu9UfvMRX3fnKbeJ3bLpnnz ++t7DO1bRD8piwUWHcfKAatXeYMfZZo+f4X8ntvV9kTrg/1N8Lwh9TT4j26NfuUzv+ ++V0OwoSkqorrYeGdaafS9rRWaU15Rd9vs7QlSXmVtczf6RbwrONTog0BkzU5dWtpl ++v5vuaAvZ9udmjKZ5g5mRv63MQ1VbqpjOYHMkfyxxWfExpeZgj5F9SMEH4CCJ+pil ++oIR/WMGqX6q+5YCaRYSQQiwkMwujnHbb4uYhxiY6kpCn9IEjmQicVtrfWamje+B3 ++QNI+DifLSk5pU6WiFkskkkVjACIGBcpiAeWSkXELqNy7DzIblDrD4Dhbg0RwimsH ++iWPiIdJwduxNxr0oqqCyLrvvKw0cU1qXOZc/nUF4GrPYdIaCh0Abg5h8ihYY6IcC ++Lib38wvEeNSttZmzDyMxQlKSlWEUlIPxYGkHXQHP1KBLvHxHgaKOY0b90nAbDmUH ++qUCl75BsFw4ioTzsnvKwnLRR0fA6nxv23petLx6sHmeJY8ErZTzuyHAuF4DCFSwe ++EFB3qA7iSpRfsQtHUKpw32RvlOFhsochtIu6EoZBwWZjKNIym/0uEt6GkxpWGKSY ++QAP2ap4JETyDiaMNvururolhqNwEhV33GLbbsx8esOiQqep873n0faecoyU+7Hj+ ++zoHvDyn7R8MhoWRKWCUllWkimoihSpnUOo7oGB3h73hfNqL35pa+YXthDsDaPfWh ++e3tJTR21ohsHDBE9Djih290CUA5I60Xxpmu42O0O4TiQ8muJ7ywEr0JF46ySTkW7 ++QFW/RiXDmgHKl2GOP4DEKQvS1GrVsREyiBZAL0CdLHaZA5m0kdJEWJZNJ002JpE0 ++Ll8Mn2SQ10kyCixUSrSyzDc4GbwaYmofJA4ybj4B4eFkklYAFxOoR3jsNhih3GLt ++WAekdNLnpbnOPNvhzfvTyQ85uLsYTqm4JhYR9C9bgb280kNVcoizxnPR3PSezbxY ++jS1ocRLuzkDkNEOgR1lGCmaShHTxNkcQwHZNzLbyW9ns4MHf5WMYyOVTgQ1hKFVH ++W5qd4d7o6TZN0J1txo3INqVQBMpGoIBOoBKByCTUrk0rBqkLdhjwaaa4WIiGOpQx ++QsnN6x4gY69aoZbCJI6jIrgadzyglHNFEDg51Dg7nIrfLwQNROHwg31urk4rvHi2 ++hOp60+w/I/CWD8CyOJ7vAOGwCgQ0pnRZxmy3pjHYjjAK9rm13HdmaBaquC1p3BmQ ++hS2B6RbJKID7SL908Z5JNGQNSr5jFKyayJDKuc2TIZCiwUYjEZuPr3BESKKREj0w ++DQFDDPnTCYV+T8OVg+1nBufQSMJYiEAiMjFEPQKsaVYq3xnpbClnMyEOXKlUKqlX ++FgqHDEOoyAsFvuDrRsdXG8ffbuyB5bBVRVkjFiVtyu1VWK0tVVVVVVVQMAd+k5Fn ++a8joanI1iTZq4RN51GsyRuz/EzKudagdFqqwLUKjavfqbsUGvIXxxnEg6/H8tJBU ++izGo6MiZtYnWnFA6EBZAzWgy2usUCyXhmu2BMTU5pxQOrD2aRNaptTigdUB/PYoy ++2l8Bx9RIvqH7xc+IMDqk8zRrqjYsaTmbw4Rxw4YYTf5sw1pvifS+f6ftF/CgeslG ++R+bo2aGQ7ZJGMD1qhknvk4HhIBcHyN257577uSE4tmPGrh8cDSfA+ri0O9O84lSr ++Zi9nWmFju7ZockHg8SEgVqGKSs1CYWBnVIBy4I7xUyH2HEbDCGsFjqDpLmRVGsgi ++gNBVCCuUbgjc7fc5skkqEqDHIpEKSJSSSEkbcbcJJJJI5I5JJJnOPE+wp7Unvy2+ ++Bmp3/XfXJJ5ink97wtPNIGsPAbARJNVirGKqrAYKxB3tGqfAUaEkKLAeaRzsm/X4 ++M4+9jWQGQMCQDRhhGTmetV2zAFDTXGLtfOge16E5g3OEiSYxb7J7PV7NkJ4RsKZO ++8osDyMjEVbjHeFuqSAadOkBstoOyLeDaxaxRa3DILXXA0N6nQBuoKIJMWsEkxjPe ++yG7j1xvdhydRG4qI1RZCbcTiF3u88ImiXmZ0VdZau+b4dYWAk2leCnNWXNhFlSDB ++XckJTDrYMRowDyz7SmOw0jrlNPh3pxdXUbiDXpOeWDsBKWpG8QEIVH3/T4AsVqSN ++pMQXgMQm8YaU6bDuN51Lk941vaYCbjmKDwwbGQZbGUVUV6knXHlsXazCyr14cXvX ++Wk2cmckvhblwTiTdIzGZDEwsLApsxOpiEYjVRqVhx7PHjM91uxmSTe6CYPIFDunt ++G0PtJnBDMtGLEfiPv4sQzFib4Rgx2Zt6ljkDDL3jU2WQn48GJI3Ndm6ZFKYld5k9 ++bU2+L2P0fF6Y2Zzn06BCfCHQHaLEbTkEdGgypEiRlEqA3jlJEZJ5HGoticWYRhQd ++eHUU4m4mQJwJsCZpgeJD6bSSSd4XK4WVdp1I6bCCAGFWZy8Fo9XrNfBXCDecC1JC ++hJaFkNxohzq5IgUEWLE2qx63lCgd0kkknLNkc+Xyc8m73t+pvB8YsNdMpE85HSKf ++F1I5EOsm/foInCTfL8mMYeZs9RPjO/ZOevNakcKjY2mz2DvYGemRMDBhiJvaPyT2 ++kZOsPnQtjYKFDAMD4yoQ05kLZykJPo3iPwqWkP5vuSZdDpXqdcywzZmqkCimxVFu ++wTj19R51M3vror1I6GefeXieXmYczcymU37GjMco4rI8+JOEsbJGzpjZvNJHE3Mt ++FNjdZaFsJuYxKXXgiLRdAaLhvSFwOaPNHlp0hIRbxun1QVMjQMYkGi/BVdiqaVnI ++0hJR8mcnpEyk3aOFjU8YDkM0utqBoDUiQwJTuiYtREsWBoJtglGZB0LgwIiQRGFg ++tqW9vnnczcyrpcYqiuLxxz54zlZu7k2SpscOsdCyGPL5dZjDJvcTCaeua/q5OC7I ++JIGsU9Y3EozjmMsqOI4moHgUjSjTEI10kpmVu3OP4NI1dVL6mThHoOryunsZjxOp ++nLCpyhNZlhqXvew9h7Fxfynyw8zuzr5YyA1A05X0hAOBz4+dTAdILqZlHt74iO86 ++5nuHwvjk4h8YMTPEJN+p3d9omHl/jQQlm4X1jdOmEdbpY9ssnOQ9SVMGzdQaQmk7 ++YmsxDrlVZ2KdbgbMtB0pDRH75kYgW8DIuT5ReasNAYHNR4CnJNiO4vJ2NUknXISc ++3JG43inJoaSEsxgzKblMtmE1MzCPvcnsSU+2mEvaHm48LK/kkJPBiOcEp3J0Kjqb ++oQjSGVc5EDYgWYKA3hiQrtAaygI30FhNE86O43CcHl6s+0U7TQDwRDzQ1Fy/q5np ++hGoNeXzu3ia2TWvIKdeyShHAIBchglhHLrmqyFOccMJPWrSO749HW7GDDDDGEDdu ++siL1Cbg98wwk4FVJt5nedtVqDmtCrXgOJlcFTcKfNSpbrcOfzBUflKKI3PMeMjij ++i74v6PP/f0/aaIgYkISEWCEUIQgKCgoiDAiO46L5jQ6E2EpfF6PfA/N86dXjVnoR ++P7NSmP0FvueXJvHHpZ6XOKbHM+Ss9IMmfnQvAfkvFwA8nDlthCEI90aAEEOeoDHe ++FE7ZCZKhy57pgHDoP8s93N4jXMGjXcq94i98gGoT8wp9Q1lYb2bdWCSco0Ob8Wky ++c/tLHM6fzVxkbmNxajDk5vub/xaNWsVg6eRct5krrq9T6oac7Vs7eB0wnlPfLGFB ++D0gTmEE2CyINI1BlGhFpGslEJBKUIjSNZAo1AY0jWHPmuwBuKvqyboc2C56eP8Bg ++DBMYRFUVUhJxVHQ6cJJJJJJJJJUqVKkkkkkkkkdaFpzIaQgILCCq03Nw4Qysc+Ds ++TEbLftJdTe8RdXvJodCx0Gw3v8EgszOOJJMPlaD2e4aFi+SrqR4JAN4YGI4pQcTL ++9whORRyir0HYoU9+c2qKiCO3Xbq23ve15yslRwBEkG0m2km9uwT8YwnmZv5Xd3d0 ++uZqi9Wxssancy7Es7InSYNwdSCmN/CqwwapoytgSaTSlEkE1LJCkA45BC1oXkSQ9 ++Xpnped8zxfqytbV8ivlGvDDG8n3zgrH7jOXCwWvznNxEwTcY43876E5wNxhtEsqm ++7GTQYDoGBWTX88kktcjs1VVXupZnqT7CgdmyQhAHNr9gfUrsVuHAG/6TIvzDcaFh ++4Efo+o7zJVVVV8xJVelHIMdXPcEIZ6znZ0LNWe9u3ExvbFb46SmsVHag0xjVAUDF ++AbGoIXcB7DELK6AH8AkhCxDAsbw0kkiTgpJJEkkpJJJE4xTAqqqqqqxiiIqmRFEq ++98KTyFKLNVzgwjyuLeprSV5m527j91ViyVZLV8XFm9E4Q3TinDY1Ie/ZBCGxA3Fw ++DIN9qELJuRCLiHsuh1J16W+Zs7zpOGA1nRIiyw2zOJ0uo2UptJI1SkwVKSwpKRij ++kGZxKtc5JyxOHFvf1+CNTfXkclc1YrDHHqC3ibmY5uibJtDg4JowbHZOHXpBoDUJ ++S4kN6uFSdoRuaC4mBswDcYRAKf4zvY/NbrPyU2heNXulVST8wrmU5j0dv5bl4eAo ++N2VZNA12qeSAg0xCRSQSB/dz9765JJPD7Be+F7ySdfhDZAE3ZJ3P5MW4mjUVcDoM ++Kkm+tjkliTEHCQsMB7u8QoDNEiugJ2p7rOMPej/xVpNw+EV2cIRkhIcoikiJSbAm ++GJkAfd0ntQiMiyHJm0MWScPAKsU7skqAqtVWyRo1WXWcoCCSCoenyAnVwl7SHTZE ++Ypp1jOqvB5vqPF9bmb63/dwBM+YYhJ3pNTZJOMpqZrJJiuAmkPDeMSxDrVVHcXSO ++bHNeAoeA/EB0BcfiIPJAAt3K/j6NREcQ0hT1xHyiE2nQ62iS9kCxv6A26HIsCplb ++VjYjerp4PS+GJ/LbhcdCHORlIYj8TxY3pmAomxIzhJVDYXIV7CSB4qHoIpGdSvAy +++iyh6NZR3MPT+vIKMF1jWRPi+HyXd9KPxqooilkk6EROdSVSkpJRwkjoRM8YeMnj ++LUuEyN7CPrIfx9uA5utLJUd9iYtrs9faxbbauWKhi6OEhT4Z8QfUsTScOnvwylhe ++kC4sbRV0gKegR6iwWsdxMmwXyHn4SbTKVNTKaugwOjyV1YQbm6NbfLP0aYu3q7oS ++ham4zucYB3cDXLA2wQzg4IB9+eG2xsHY2tHE96214ruiTilRzEuCAMeNNcTgoZWt ++BUnZxuRt2UVtTtBRTNKNQUggUxQa02t3PjEouLtI7KhYzYSDIQIAB8HsqnZKUuRi ++prCzQd+w+b66r+E/tv4smxvp4aAqkBYSjLghJyyfWH1PFoHcbfpLFslLKsep7D1j ++2oWCbksJUcm5QA5i+ZBp5qItFMTbcSEUMIpCIaWkpCKG5DpgYxq9L6guUMAL0GEA ++yI3HGnsGZVjZrNjL93iat3CYKsV7nNOacMl3E7c9odoyDDIssSQ4QMEhEVnHAU14 ++OIfEWWwG/q5H6kAnOdXnV8fLm4ahKlau6UljoNoMCgS30ivSpgL0HSQXJ4v4OPfk ++yrDjPZnGc1BldfrxEzq/C+vDrYoskzJKxgdkWHcEOJrih98DWZAhElRA+D2IlJav ++e08OGeGtQKWe26MYxr8p+wMdYTC9JBcymHOIzLMGttLuMzlFdqVvs9R7oIfYqCxE ++FLKYas0sE5HJmkwgnGdArPXfQwFVVhFXCEZRWmlCOWoZmsGayHF6pq5cfcaA9pBu ++QHHlLlTPUJ0Ps9ll2a8aeJctplM1yOCZ/ExWhg7mo1kkZvo45nNDU6enOv2b3Faw ++9+m8aguWIYu94PATODsGARgkVwutRHTeDhUCkBQKhx3Z1kHaBNixDYl7G6NgQWPj ++UQxA74Q9rwcVnYvDaEYkXFSFiw24NdNXQuLYMBvlt5A7NcRN9IYgQMIVIsJngdmm ++GHC8nA4ukF8oGLDWZhZopiIBzZNBIsuhoxQyu0m/dsxNTNcrGbMr5wlZMqM2GpZN ++VLS4jc3GGgZmsTNDDkU0K59eTWTVxiU4SNziaJyMGEy1KpUzmRUi8Il1b2xls4bu +++o601YQ+KUxBFk+ZF1fwJ8XmZjKzPr5pxR9kiN5VoOKp6cnVFKfZGFnV4drh190M ++ZINTDPJi0RlvANwEhinSBnd1TMfK7DYyI1iPKRYGIdTzyYOqI79/M8QXAMjP6rvo ++6tUizepw1DlxTzTYm6EWciCdsSHTg4p7ReMjpJuPinvJO42ibQTkUi9n4wuWD3gJ ++tBT7mG1sek45DgWHWxlXmTBpqx3SazrVlXowbDU2jWJpCZiaTvZ5ao0VwbYyscIO ++KcE9qHl7R0YoVNxBTEhMAydojingBr2DWF5eCwF7apSDViuMU1d6Z1AnFkgK6YQo ++w4lB1uOQA/0YWItLYrekm91TtklCrKjqM/CPn8vWXD5JyUV4kBjAkQfCLBUKALKW ++ZeepZconOPOklPp8ToSZT2I0GCTM0d0zJiNdaurRWUzO3QuRgZie+Ym1sGslTiXd ++XA/K2kmQonETYr85mUrsDA19MmsQfjFdA0EHd4Ph2DrQ1IimicAkLkKFj4t15GEa ++aA9QEDBAPmIVDBzHNFvzX1lOD6/c3HquRiGC+8GqwfGXKNiTq5Ac7lXd+YsWEQkF ++KeGMfufUzAZqRopGHqYTZ1KvZmRlKmWColVR7HpznNlKTwuX4OR2QvvSDoiWYKaK ++OyqrF4WxEXJ0Yw937FwsXW19vS4UcbsG4mZbLYulutv3Gputxa2zGLTa0TCYQS1V ++XaWxdrdrd/vOIybzbZz3azXiF4wOk60FIx1VFvRtnIovDLktpmNMNM58k4HMRKEp ++RERHxfBKcEKhCAyzWdZOKDbIJxMlU4mgasar2Ly5VUWL2cc+wR7IjhrGQetqGtDx ++EBIRRoO1U7l7dwUGWKm0hczeuBRTMysSMZdYzINn8TA2UdsWSSNW00bmTEWFVgzP ++itW1at5B2TROM2NMAbSZEooXUkt0KEyVFklCKF1lqBQwsFxjKhgXRl6EeWtMb4lQ ++wRtjDLS27gdA2zYHuhuFeSBbiTnxo3uegT1gh5PGUVon7ltpUG2WW4AiGIMmUoxc ++oYxKq2WKZeAynuPu0mUk5rgaMXIagIekgkihYcRMczK4d/qNUNEHdIeX0HUYJY8Y ++I8ZIbHa7Qqqjz1nxZziMQVQYwO/sK7Ltt5c+bzm07s6p9UJdJN0miamvt6q/AKdd ++wqKqpZFgfcqrMFRSKyRawUWkWVEYOEA7CoJTB5zlSS6GBLw/lqWM1oRViGCJ501s ++soroh6Ce36WI+nFvkmS5az85mT3Fax65J8hgjV4Td5YymOqER8/WpHqyT5Fcn7xH ++5gQuHdE+iNEIRWEDEiv0nYZnadqP43g9rQryed4MVbdy4q1hhpV1wUMjBjD36+S1 ++r0XhCYriKpd9R8KUhVxRhZcdRH9pH3kRtD9gNa+b0YHOfNn6j+yeFliSoWSFOcDw ++HJOr6MJjFvNbxzxSel5/WZdrghtHl+gZPkhp5eLFrnjAMRGwRBxyEbpJNjVJNkWy ++G9ZdKkY8qSBrOP+50WudjXlft3CQob1Uvd3+hGutFdzCym0N/eiusnyPmVVsqWll ++KWLVliziHgj70SDhRwvpVPpr08lstllttj5KfiF6GFKqz305PV9fCUsNvXpAZRO8 ++p9Tol3k25xz/LUaJbIdaHQ7O3fk8ifHT8F8AS+/pT+BfjBkQjIRAgLGKWVZIWykV ++Enmd5VLT+gUsMMJKOPksi2IjqGB12PqF6FIw0gwtSQToKGJYdKsSDkxEPOstgW2w ++MUiaP5R7BKZcFd/vQ1bNVoUG+dRTaY4TRQDEIdLQsKwZI7DlLsahIZNFQVZJDOw6 ++jjKukNBNAo2guNgsB73x7cgULhj2evaYQwWMVRwViR1LQI3FUgGgkUD1vvA9nbif ++3BHiSj6CUlGCkpgpRSOmXQPHomiKv27+qVBA3nUYhiitw78WADI6qUoAChaGohAj ++BCoo8DIJzltqSPE6K3O5vxJvow04SIZap53ITd8hdfN2fEroXC9NaUTz+Gy2zJpH ++wfGkxOuPErw/TfIC8Qfvr4Q3PiV9Z0gB1Ee9BRN/hiEXge4naHVpJuLhv1WD3ASv ++a9iK22u5gOB4AwHYiJZA98so9wtgXkrwmuyJqhCRiQlC0dG1uroRUCXoxY/m3m4P ++8QxU6rc4QncQh0m6ztH3yPA9/PL0hvZIEVQUkUIKiCkIiEIkk3KbTiB4lTiiHRca ++C+4xIajPgTS3CuYnFeBqOAwxmMqqJVUbhx70U0FA5IoQVS++yk5bcsb+E123i2wK ++wlhxZDC676KSguiYgFiQzgTEc3JkyxlAUHBkBy5xwDSaGAzCNgxNCELIVlS5wFjd ++LVeXopFDAIciwU6gtkrkK8QG8tL2Im/tthwcRxTfERw/Wk3zRNZWBe8RshvEJtoi ++0EgE3QxYAWHe30llwQJhpsEcFRS45kIEECoSOC/A3uKGhGySpjV63XO57Tmsu4e+ ++wmN8mzRGO4LugYWRugXVE2JupEul4sMSYKtFqrLqzJgVQspWRlalhAhgNC3AVcXe ++ZagMi/g90h6xDxseKQpt72R0jxO4+FDFoqm4WtEoJFIat2ujcxJ0p8rXyC6PWZki ++lOuOxk9JiI8dooqOlT1nrSdLh0iyHQ+Yrw4n4JEnfDyI8sPcKWVbLI9PtyidL5Sq ++SQkStVC9sUO4OgJCIloqWOYmwcJvqVIsWyJKUSkWQd7UxB3/jWSrGqMrIS0lVFRb ++JaiqRUWxVgVEmp9ZwR1Il5uvBA9cvIQdkGT9P3J2bgfVORLTwEWQzWLFaQQOhycl ++ODAV3znfCISErxJPqyJbQ21GUFWJfostE2k3gF6InpXR1+mjxDAsWUNhNlSCO1jG ++KcSSMiYGEjmOOLnT1QhlBgWJQ36YhJsFp7K4lLpQdetpD+RIBlETII4xvMruvFW6 ++rocjEOMhW0qSMQWHLclOZ8Zge5xjhx2utvuxXu8STmpI8XxmB0H9WJCkxBzh3bIl ++WdLORam9JflnjFIKXGCQMJmB6oQvD7+WGKo8XUgK15uKBbyiw6yH2jiuhLz+tOLa ++JbBMH4p0WNsy5wYWYF68hZYqYafPDEGo3TOh3ZpnYlWSAMw+YXKGIKa+D+jdshLZ ++UGJfj7wZEJGAyBMwYOnEf+z/5/H/5p/bs/j4fX/7/+/j5rz7eb3iGIzx+E7LOyfv ++h+w8AWGtxoYYripbYx1W5xs0Yzi50aaNLh7IgepE++jV6RoPWoV6L8KSWYLMVW0Z ++KYXFi2BgiWWMQZWRpRJ7NlBGILiCxGSSJSFsKFAyOGCwBJgGFLhS2R8h+g/JVcj7 ++l/JDbifjD8qSKQUsR+GJGZDZr0Zs53o0aMsKwUtkjtHY5Ie09Z87RwjhExvdjsK2 ++ST53fGSTWHwpYM95KCT99KHpXQIrATYljPROY9n8mBQn6yHhJaHmjYijbarBN7oC ++W2A7A61UujGx85ZtdgvI+qwJyC6utNY+2N0BzfcRQxmhEfr1A87lB07TY73VIbOC ++Rxh5li0VYiizmMaSSSJqh6kk1h+PQwiyjVu1Zr0+o6Ey1YI3AgCbE70kZ2SVgKJE ++CcHQaeXnW0SQtBNdMjfrAaI+C5qNBVOxe5kQmcQITT+ZjSuwTf+jXkqzUaMmIS1B ++o1lngGDlYxoe9+GwXY0zhP8BYg2m+sGCmaigQgeRb+pJSdNTz6zudddqbmGxhuEw ++Tubpgzq1mGAiERaN3iiVmKXF1buB1DHHNVEhAaowNQZBIGOXQdhLtkiWHBoLsCNH ++bm1mz1EhrIS2MivamglVqLFBBxOBtNzwYwhcsknLdpfXsfG2S9VYKtlttdEnMfO7 ++2+ZmgYcEMOVk6Elkqzm7v1Mbs9h20FUSWhVIsOHXUxIc8Ooa2TFWMUOpULl2lYNF ++EIET2itlBMhXp80m4eHEIskA3FCr7E0V2qxd3Ypjm3CFblaYDxT6XrnaizSdzhIH ++Phza1Va1nAl0PZM86ndwedTg3P1tmFww3vRtDj5t0zV99tL9/m/Q/nU9fo0yqPcV ++MVe2hqM5enc73grUoEZVJkEYEYpDMJSmTDMTCLilyjw7SldpzKhrM7zUEyFKGTga ++nsmoA+TXDXNcM76l7wSTZ2cLMQOyEsEjl6ilL2DV5CSisFD045W42DFsLRJDuknG ++TgTuxUMRzQGZZlwFqrCjkcJMA4GliibiWpouNJv1mUQQizW05bamB4FoCR3LLKpl ++ZMpZyLIllEqk1DNZrQ065fEzDUZhlqSC6xYKYuSWShbMjgNDV0tlYNSUpllomLFZ ++YjJjWGVhpIxKVIyWalmdVmJVBmWXESgtQNluWLLdyB7uh6BsGIr2l5lq8J5ampHj ++t8hfcBlgGbV0vNor99BuLgA10xg4l7CvRFlFqoeQQjCWqiIxsrS/B3rmE0FIHBe0 ++MqcBKocFJiIpDOCLpSKQ5lET0Q58qlfk1AKvk+CRIQ4FC0SQpKdCGaqFth+bkNy7 ++nkCpcIZE6yVGoh2pqDIJbhE9QK+PARDTr6Ek+xoQQoQ3Z7iov69ghcd50PSCrJVK ++GGJJhIdk9LinDvJP2ipbZZJpqSRiPani8qnInedh9JZeklwgwP1hQcVx2Kqj7+s1 ++nYeOiJ73/7pJCQnV9AUEFCCqxBIIi2clfkc0s6CGpETEjGAwkRJPAiB7QipVa0h7 ++E0+LxnLynX6FGn3Ilmp+/5jx8cYe+mMy+aTGzDoDzHlp5+5Nu0shRrIicAT5yk01 ++kOo6/f8wrr6yN6UO8+EhJ7gr4RXtNTsV9X0fNW8fNAqeUE3hshWzYawomIMZf7ym ++f4uvA25PgSwjCAHaJY0dkVjAURYKvJRjBYIBYKDWsASKqxDCSDL61kqxwHlTDe2n ++gzMjwW+2Z4B5zELxJD3IE2yScaEMVQ5jtMU3hNq809AQEb5pBKVbHGyWUQIIv2RE ++QhEQZAQ++jfJjAhy3zuvtvbCw+XuvkY42jZhiskhAiVAp2i5qV09o7HuUtlLJbDt ++flOJFFQpUTmYYDCEJsd+APpWCB3oqKnSK9Ii0icn5qbnnSyPRDFQmGdH52k1s+6a ++j5Yn0YigyMjP0exTr/ecYbDHn1DkxQ03Jwhnk8RgLjDINsCHItc0u03s+AaE+2ah ++Qu4qgn/8XckU4UJAR7qZ1A== ++EOT ++openssl base64 -d -in ${BASE64_FILE} -out ${QUARTZ_TBZ} ++rm ${BASE64_FILE} ++tar -xvjf ${QUARTZ_TBZ} ++rm ${QUARTZ_TBZ} ++fi ++cd .. ++ ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then +- set -o posix ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ echo "#! /bin/sh" >conf$$.sh ++ echo "exit 0" >>conf$$.sh ++ chmod +x conf$$.sh ++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ++ PATH_SEPARATOR=';' ++ else ++ PATH_SEPARATOR=: ++ fi ++ rm -f conf$$.sh + fi +-DUALCASE=1; export DUALCASE # for MKS sh + + # Support unset when possible. + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -31,8 +366,43 @@ + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++as_nl=' ++' ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# We did not find ourselves, most probably we were run as `sh COMMAND' ++# in which case we are not to be found in the path. ++if test "x$as_myself" = x; then ++ as_myself=$0 ++fi ++if test ! -f "$as_myself"; then ++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' +@@ -46,18 +416,19 @@ + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else +- $as_unset $as_var ++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi + done + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -65,157 +436,388 @@ + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + ++# CDPATH. ++$as_unset CDPATH + +-# PATH needs CR, and LINENO needs CR and PATH. +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits + +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' +- else +- PATH_SEPARATOR=: +- fi +- rm -f conf$$.sh ++if test "x$CONFIG_SHELL" = x; then ++ if (eval ":") 2>/dev/null; then ++ as_have_required=yes ++else ++ as_have_required=no + fi + ++ if test $as_have_required = yes && (eval ": ++(as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" || { +- # Find who we are. Look in the path if we contain no path at all +- # relative or not. +- case $0 in +- *[\\/]* ) as_myself=$0 ;; +- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi + +- ;; +- esac +- # We did not find ourselves, most probably we were run as `sh COMMAND' +- # in which case we are not to be found in the path. +- if test "x$as_myself" = x; then +- as_myself=$0 +- fi +- if test ! -f "$as_myself"; then +- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 +- { (exit 1); exit 1; }; } +- fi +- case $CONFIG_SHELL in +- '') ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0) || { (exit 1); exit 1; } ++ ++( ++ as_lineno_1=\$LINENO ++ as_lineno_2=\$LINENO ++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && ++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ++") 2> /dev/null; then ++ : ++else ++ as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for as_base in sh bash ksh sh5; do +- case $as_dir in ++ case $as_dir in + /*) +- if ("$as_dir/$as_base" -c ' ++ for as_base in sh bash ksh sh5; do ++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base" ++ done;; ++ esac ++done ++IFS=$as_save_IFS ++ ++ ++ for as_shell in $as_candidate_shells $SHELL; do ++ # Try only shells that exist, to save several forks. ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { ("$as_shell") 2> /dev/null <<\_ASEOF ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++_ASEOF ++}; then ++ CONFIG_SHELL=$as_shell ++ as_have_required=yes ++ if { "$as_shell" 2> /dev/null <<\_ASEOF ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++(as_func_return () { ++ (exit $1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = "$1" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test $exitcode = 0) || { (exit 1); exit 1; } ++ ++( + as_lineno_1=$LINENO + as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then +- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } +- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } +- CONFIG_SHELL=$as_dir/$as_base +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$0" ${1+"$@"} +- fi;; +- esac +- done +-done +-;; +- esac ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } ++ ++_ASEOF ++}; then ++ break ++fi ++ ++fi ++ ++ done ++ ++ if test "x$CONFIG_SHELL" != x; then ++ for as_var in BASH_ENV ENV ++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++ done ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++fi ++ ++ ++ if test $as_have_required = no; then ++ echo This script requires a shell more modern than all the ++ echo shells that I found on your system. Please install a ++ echo modern shell, or manually run the script under such a ++ echo shell if you do have one. ++ { (exit 1); exit 1; } ++fi ++ ++ ++fi ++ ++fi ++ ++ ++ ++(eval "as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0") || { ++ echo No shell found that supports shell functions. ++ echo Please tell autoconf@gnu.org about your system, ++ echo including any error possibly output before this ++ echo message ++} ++ ++ ++ ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line before each line; the second 'sed' does the real +- # work. The second script uses 'N' to pair each line-number line +- # with the numbered line, and appends trailing '-' during +- # substitution so that $LINENO is not a special case at line end. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, and appends ++ # trailing '-' during substitution so that $LINENO is not a special ++ # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) +- sed '=' <$as_myself | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || ++ chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensible to this). +- . ./$as_me.lineno ++ # original and so on. Autoconf is especially sensitive to this). ++ . "./$as_me.lineno" + # Exit status is that of the last command. + exit + } + + +-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in +- *c*,-n*) ECHO_N= ECHO_C=' +-' ECHO_T=' ' ;; +- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; +- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir ++fi + echo >conf$$.file + if ln -s conf$$.file conf$$ 2>/dev/null; then +- # We could just check for DJGPP; but this test a) works b) is more generic +- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). +- if test -f conf$$.exe; then +- # Don't use ln at all; we don't have any links ++ as_ln_s='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +- else +- as_ln_s='ln -s' +- fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +-rm -f conf$$ conf$$.exe conf$$.file ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +@@ -224,7 +826,28 @@ + as_mkdir_p=false + fi + +-as_executable_p="test -f" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -233,15 +856,6 @@ + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +-# IFS +-# We need space, tab and new line, in precisely that order. +-as_nl=' +-' +-IFS=" $as_nl" +- +-# CDPATH. +-$as_unset CDPATH +- + + + # Check that we are running under the correct shell. +@@ -397,29 +1011,26 @@ + + tagnames=${tagnames+${tagnames},}F77 + ++exec 7<&0 &1 ++ + # Name of the host. + # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +-exec 6>&1 +- + # + # Initializations. + # + ac_default_prefix=/usr/local ++ac_clean_files= + ac_config_libobj_dir=. ++LIBOBJS= + cross_compiling=no + subdirs= + MFLAGS= + MAKEFLAGS= + SHELL=${CONFIG_SHELL-/bin/sh} + +-# Maximum number of lines to put in a shell here document. +-# This variable seems obsolete. It should probably be removed, and +-# only ac_max_sed_lines should be used. +-: ${ac_max_here_lines=38} +- + # Identity of this package. + PACKAGE_NAME='gtkglext' + PACKAGE_TARNAME='gtkglext' +@@ -431,42 +1042,243 @@ + # Factoring default headers for most tests. + ac_includes_default="\ + #include +-#if HAVE_SYS_TYPES_H ++#ifdef HAVE_SYS_TYPES_H + # include + #endif +-#if HAVE_SYS_STAT_H ++#ifdef HAVE_SYS_STAT_H + # include + #endif +-#if STDC_HEADERS ++#ifdef STDC_HEADERS + # include + # include + #else +-# if HAVE_STDLIB_H ++# ifdef HAVE_STDLIB_H + # include + # endif + #endif +-#if HAVE_STRING_H +-# if !STDC_HEADERS && HAVE_MEMORY_H ++#ifdef HAVE_STRING_H ++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H + # include + # endif + # include + #endif +-#if HAVE_STRINGS_H ++#ifdef HAVE_STRINGS_H + # include + #endif +-#if HAVE_INTTYPES_H ++#ifdef HAVE_INTTYPES_H + # include +-#else +-# if HAVE_STDINT_H +-# include +-# endif + #endif +-#if HAVE_UNISTD_H ++#ifdef HAVE_STDINT_H ++# include ++#endif ++#ifdef HAVE_UNISTD_H + # include + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os GTKGLEXT_MAJOR_VERSION GTKGLEXT_MINOR_VERSION GTKGLEXT_MICRO_VERSION GTKGLEXT_INTERFACE_AGE GTKGLEXT_BINARY_AGE GTKGLEXT_VERSION GTKGLEXT_API_MAJOR_VERSION GTKGLEXT_API_MINOR_VERSION GTKGLEXT_API_VERSION API_MJ API_MI LT_RELEASE LT_CURRENT LT_REVISION LT_AGE LT_CURRENT_MINUS_AGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE OS_WIN32_TRUE OS_WIN32_FALSE MATH_LIB ms_librarian MS_LIB_AVAILABLE_TRUE MS_LIB_AVAILABLE_FALSE gdktarget gdkglext_targetlib gtkglext_targetlib GTKGLEXT_DEBUG_FLAGS LIBTOOL_EXPORT_OPTIONS PERL INDENT REBUILD PKG_CONFIG ac_pt_PKG_CONFIG BASE_DEPENDENCIES_CFLAGS BASE_DEPENDENCIES_LIBS GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS GTK_CFLAGS GTK_LIBS LIBOBJS GDKGLEXT_MULTIHEAD_SUPPORT MULTIHEAD_SUPPORT_TRUE MULTIHEAD_SUPPORT_FALSE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS USE_X11_TRUE USE_X11_FALSE USE_WIN32_TRUE USE_WIN32_FALSE WINDOWING_CFLAGS WINDOWING_LIBS GDKGLEXT_WIN_CFLAGS GDKGLEXT_WIN_LIBS GDKGLEXT_WIN_EXTRA_DEFS GL_CFLAGS GL_LIBS GDKGLEXT_PACKAGES GDKGLEXT_EXTRA_CFLAGS GDKGLEXT_EXTRA_LIBS GDKGLEXT_DEP_CFLAGS GDKGLEXT_DEP_LIBS GTKGLEXT_PACKAGES GTKGLEXT_EXTRA_CFLAGS GTKGLEXT_EXTRA_LIBS GTKGLEXT_DEP_CFLAGS GTKGLEXT_DEP_LIBS EXAMPLES_DEP_CFLAGS GTKGLEXT_DEP_LIBS_WITH_PANGOFT2 HTML_DIR GTKDOC ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE LTLIBOBJS' ++ac_subst_vars='SHELL ++PATH_SEPARATOR ++PACKAGE_NAME ++PACKAGE_TARNAME ++PACKAGE_VERSION ++PACKAGE_STRING ++PACKAGE_BUGREPORT ++exec_prefix ++prefix ++program_transform_name ++bindir ++sbindir ++libexecdir ++datarootdir ++datadir ++sysconfdir ++sharedstatedir ++localstatedir ++includedir ++oldincludedir ++docdir ++infodir ++htmldir ++dvidir ++pdfdir ++psdir ++libdir ++localedir ++mandir ++DEFS ++ECHO_C ++ECHO_N ++ECHO_T ++LIBS ++build_alias ++host_alias ++target_alias ++INSTALL_PROGRAM ++INSTALL_SCRIPT ++INSTALL_DATA ++am__isrc ++CYGPATH_W ++PACKAGE ++VERSION ++ACLOCAL ++AUTOCONF ++AUTOMAKE ++AUTOHEADER ++MAKEINFO ++install_sh ++STRIP ++INSTALL_STRIP_PROGRAM ++mkdir_p ++AWK ++SET_MAKE ++am__leading_dot ++AMTAR ++am__tar ++am__untar ++MAINTAINER_MODE_TRUE ++MAINTAINER_MODE_FALSE ++MAINT ++build ++build_cpu ++build_vendor ++build_os ++host ++host_cpu ++host_vendor ++host_os ++GTKGLEXT_MAJOR_VERSION ++GTKGLEXT_MINOR_VERSION ++GTKGLEXT_MICRO_VERSION ++GTKGLEXT_INTERFACE_AGE ++GTKGLEXT_BINARY_AGE ++GTKGLEXT_VERSION ++GTKGLEXT_API_MAJOR_VERSION ++GTKGLEXT_API_MINOR_VERSION ++GTKGLEXT_API_VERSION ++API_MJ ++API_MI ++LT_RELEASE ++LT_CURRENT ++LT_REVISION ++LT_AGE ++LT_CURRENT_MINUS_AGE ++CC ++CFLAGS ++LDFLAGS ++CPPFLAGS ++ac_ct_CC ++EXEEXT ++OBJEXT ++DEPDIR ++am__include ++am__quote ++AMDEP_TRUE ++AMDEP_FALSE ++AMDEPBACKSLASH ++CCDEPMODE ++am__fastdepCC_TRUE ++am__fastdepCC_FALSE ++CPP ++SED ++GREP ++EGREP ++LN_S ++ECHO ++AR ++RANLIB ++DSYMUTIL ++NMEDIT ++DLLTOOL ++AS ++OBJDUMP ++CXX ++CXXFLAGS ++ac_ct_CXX ++CXXDEPMODE ++am__fastdepCXX_TRUE ++am__fastdepCXX_FALSE ++CXXCPP ++F77 ++FFLAGS ++ac_ct_F77 ++LIBTOOL ++PLATFORM_WIN32_TRUE ++PLATFORM_WIN32_FALSE ++OS_WIN32_TRUE ++OS_WIN32_FALSE ++MATH_LIB ++ms_librarian ++MS_LIB_AVAILABLE_TRUE ++MS_LIB_AVAILABLE_FALSE ++TARGET_QUARTZ_TRUE ++TARGET_QUARTZ_FALSE ++gdktarget ++gdkglext_targetlib ++gtkglext_targetlib ++GTKGLEXT_DEBUG_FLAGS ++LIBTOOL_EXPORT_OPTIONS ++PERL ++REBUILD ++PKG_CONFIG ++BASE_DEPENDENCIES_CFLAGS ++BASE_DEPENDENCIES_LIBS ++LIBOBJS ++GDKGLEXT_MULTIHEAD_SUPPORT ++MULTIHEAD_SUPPORT_TRUE ++MULTIHEAD_SUPPORT_FALSE ++XMKMF ++X_CFLAGS ++X_PRE_LIBS ++X_LIBS ++X_EXTRA_LIBS ++USE_X11_TRUE ++USE_X11_FALSE ++USE_WIN32_TRUE ++USE_WIN32_FALSE ++WINDOWING_CFLAGS ++WINDOWING_LIBS ++GDKGLEXT_WIN_CFLAGS ++GDKGLEXT_WIN_LIBS ++GDKGLEXT_WIN_EXTRA_DEFS ++GL_CFLAGS ++GL_LIBS ++GDKGLEXT_PACKAGES ++GDKGLEXT_EXTRA_CFLAGS ++GDKGLEXT_EXTRA_LIBS ++GDKGLEXT_DEP_CFLAGS ++GDKGLEXT_DEP_LIBS ++GTKGLEXT_PACKAGES ++GTKGLEXT_EXTRA_CFLAGS ++GTKGLEXT_EXTRA_LIBS ++GTKGLEXT_DEP_CFLAGS ++GTKGLEXT_DEP_LIBS ++EXAMPLES_DEP_CFLAGS ++GTKGLEXT_DEP_LIBS_WITH_PANGOFT2 ++HTML_DIR ++GTKDOC ++ENABLE_GTK_DOC_TRUE ++ENABLE_GTK_DOC_FALSE ++LTLIBOBJS' + ac_subst_files='' ++ ac_precious_vars='build_alias ++host_alias ++target_alias ++CC ++CFLAGS ++LDFLAGS ++LIBS ++CPPFLAGS ++CPP ++CXX ++CXXFLAGS ++CCC ++CXXCPP ++F77 ++FFLAGS ++PKG_CONFIG ++BASE_DEPENDENCIES_CFLAGS ++BASE_DEPENDENCIES_LIBS ++XMKMF' ++ + + # Initialize some variables set by options. + ac_init_help= +@@ -493,34 +1305,48 @@ + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. ++# (The list follows the same order as the GNU Coding Standards.) + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' +-datadir='${prefix}/share' ++datarootdir='${prefix}/share' ++datadir='${datarootdir}' + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' +-libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' +-infodir='${prefix}/info' +-mandir='${prefix}/man' ++docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' ++infodir='${datarootdir}/info' ++htmldir='${docdir}' ++dvidir='${docdir}' ++pdfdir='${docdir}' ++psdir='${docdir}' ++libdir='${exec_prefix}/lib' ++localedir='${datarootdir}/locale' ++mandir='${datarootdir}/man' + + ac_prev= ++ac_dashdash= + for ac_option + do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then +- eval "$ac_prev=\$ac_option" ++ eval $ac_prev=\$ac_option + ac_prev= + continue + fi + +- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` ++ case $ac_option in ++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *) ac_optarg=yes ;; ++ esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + +- case $ac_option in ++ case $ac_dashdash$ac_option in ++ --) ++ ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; +@@ -542,33 +1368,45 @@ + --config-cache | -C) + cache_file=config.cache ;; + +- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; +- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ +- | --da=*) ++ -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + ++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ ++ | --dataroo | --dataro | --datar) ++ ac_prev=datarootdir ;; ++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ ++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) ++ datarootdir=$ac_optarg ;; ++ + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/-/_/g'` +- eval "enable_$ac_feature=no" ;; ++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` ++ eval enable_$ac_feature=no ;; ++ ++ -docdir | --docdir | --docdi | --doc | --do) ++ ac_prev=docdir ;; ++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) ++ docdir=$ac_optarg ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) ++ dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/-/_/g'` +- case $ac_option in +- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +- *) ac_optarg=yes ;; +- esac +- eval "enable_$ac_feature='$ac_optarg'" ;; ++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` ++ eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -595,6 +1433,12 @@ + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ ++ | --ht=*) ++ htmldir=$ac_optarg ;; ++ + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; +@@ -619,13 +1463,16 @@ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + ++ -localedir | --localedir | --localedi | --localed | --locale) ++ ac_prev=localedir ;; ++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) ++ localedir=$ac_optarg ;; ++ + -localstatedir | --localstatedir | --localstatedi | --localstated \ +- | --localstate | --localstat | --localsta | --localst \ +- | --locals | --local | --loca | --loc | --lo) ++ | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ +- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ +- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) +@@ -690,6 +1537,16 @@ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + ++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ++ ac_prev=pdfdir ;; ++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) ++ pdfdir=$ac_optarg ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) ++ psdir=$ac_optarg ;; ++ + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; +@@ -742,24 +1599,20 @@ + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package| sed 's/-/_/g'` +- case $ac_option in +- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +- *) ac_optarg=yes ;; +- esac +- eval "with_$ac_package='$ac_optarg'" ;; ++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` ++ eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/-/_/g'` +- eval "with_$ac_package=no" ;; ++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` ++ eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. +@@ -790,8 +1643,7 @@ + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } +- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` +- eval "$ac_envvar='$ac_optarg'" ++ eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) +@@ -811,27 +1663,19 @@ + { (exit 1); exit 1; }; } + fi + +-# Be sure to have absolute paths. +-for ac_var in exec_prefix prefix ++# Be sure to have absolute directory names. ++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ ++ datadir sysconfdir sharedstatedir localstatedir includedir \ ++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ ++ libdir localedir mandir + do +- eval ac_val=$`echo $ac_var` ++ eval ac_val=\$$ac_var + case $ac_val in +- [\\/$]* | ?:[\\/]* | NONE | '' ) ;; +- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; +- esac +-done +- +-# Be sure to have absolute paths. +-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ +- localstatedir libdir includedir oldincludedir infodir mandir +-do +- eval ac_val=$`echo $ac_var` +- case $ac_val in +- [\\/$]* | ?:[\\/]* ) ;; +- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; ++ [\\/$]* | ?:[\\/]* ) continue;; ++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac ++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; } + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -858,106 +1702,76 @@ + test "$silent" = yes && exec 6>/dev/null + + ++ac_pwd=`pwd` && test -n "$ac_pwd" && ++ac_ls_di=`ls -di .` && ++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || ++ { echo "$as_me: error: Working directory cannot be determined" >&2 ++ { (exit 1); exit 1; }; } ++test "X$ac_ls_di" = "X$ac_pwd_ls_di" || ++ { echo "$as_me: error: pwd does not report name of working directory" >&2 ++ { (exit 1); exit 1; }; } ++ ++ + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes +- # Try the directory containing this script, then its parent. +- ac_confdir=`(dirname "$0") 2>/dev/null || ++ # Try the directory containing this script, then the parent directory. ++ ac_confdir=`$as_dirname -- "$0" || + $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X"$0" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + srcdir=$ac_confdir +- if test ! -r $srcdir/$ac_unique_file; then ++ if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi + else + ac_srcdir_defaulted=no + fi +-if test ! -r $srcdir/$ac_unique_file; then +- if test "$ac_srcdir_defaulted" = yes; then +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +- { (exit 1); exit 1; }; } +- else +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ++if test ! -r "$srcdir/$ac_unique_file"; then ++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." ++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +- fi + fi +-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || +- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ++ac_abs_confdir=`( ++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } +-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +-ac_env_build_alias_set=${build_alias+set} +-ac_env_build_alias_value=$build_alias +-ac_cv_env_build_alias_set=${build_alias+set} +-ac_cv_env_build_alias_value=$build_alias +-ac_env_host_alias_set=${host_alias+set} +-ac_env_host_alias_value=$host_alias +-ac_cv_env_host_alias_set=${host_alias+set} +-ac_cv_env_host_alias_value=$host_alias +-ac_env_target_alias_set=${target_alias+set} +-ac_env_target_alias_value=$target_alias +-ac_cv_env_target_alias_set=${target_alias+set} +-ac_cv_env_target_alias_value=$target_alias +-ac_env_CC_set=${CC+set} +-ac_env_CC_value=$CC +-ac_cv_env_CC_set=${CC+set} +-ac_cv_env_CC_value=$CC +-ac_env_CFLAGS_set=${CFLAGS+set} +-ac_env_CFLAGS_value=$CFLAGS +-ac_cv_env_CFLAGS_set=${CFLAGS+set} +-ac_cv_env_CFLAGS_value=$CFLAGS +-ac_env_LDFLAGS_set=${LDFLAGS+set} +-ac_env_LDFLAGS_value=$LDFLAGS +-ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +-ac_cv_env_LDFLAGS_value=$LDFLAGS +-ac_env_CPPFLAGS_set=${CPPFLAGS+set} +-ac_env_CPPFLAGS_value=$CPPFLAGS +-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +-ac_cv_env_CPPFLAGS_value=$CPPFLAGS +-ac_env_CPP_set=${CPP+set} +-ac_env_CPP_value=$CPP +-ac_cv_env_CPP_set=${CPP+set} +-ac_cv_env_CPP_value=$CPP +-ac_env_CXX_set=${CXX+set} +-ac_env_CXX_value=$CXX +-ac_cv_env_CXX_set=${CXX+set} +-ac_cv_env_CXX_value=$CXX +-ac_env_CXXFLAGS_set=${CXXFLAGS+set} +-ac_env_CXXFLAGS_value=$CXXFLAGS +-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +-ac_cv_env_CXXFLAGS_value=$CXXFLAGS +-ac_env_CXXCPP_set=${CXXCPP+set} +-ac_env_CXXCPP_value=$CXXCPP +-ac_cv_env_CXXCPP_set=${CXXCPP+set} +-ac_cv_env_CXXCPP_value=$CXXCPP +-ac_env_F77_set=${F77+set} +-ac_env_F77_value=$F77 +-ac_cv_env_F77_set=${F77+set} +-ac_cv_env_F77_value=$F77 +-ac_env_FFLAGS_set=${FFLAGS+set} +-ac_env_FFLAGS_value=$FFLAGS +-ac_cv_env_FFLAGS_set=${FFLAGS+set} +-ac_cv_env_FFLAGS_value=$FFLAGS +-ac_env_PKG_CONFIG_set=${PKG_CONFIG+set} +-ac_env_PKG_CONFIG_value=$PKG_CONFIG +-ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set} +-ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG +-ac_env_BASE_DEPENDENCIES_CFLAGS_set=${BASE_DEPENDENCIES_CFLAGS+set} +-ac_env_BASE_DEPENDENCIES_CFLAGS_value=$BASE_DEPENDENCIES_CFLAGS +-ac_cv_env_BASE_DEPENDENCIES_CFLAGS_set=${BASE_DEPENDENCIES_CFLAGS+set} +-ac_cv_env_BASE_DEPENDENCIES_CFLAGS_value=$BASE_DEPENDENCIES_CFLAGS +-ac_env_BASE_DEPENDENCIES_LIBS_set=${BASE_DEPENDENCIES_LIBS+set} +-ac_env_BASE_DEPENDENCIES_LIBS_value=$BASE_DEPENDENCIES_LIBS +-ac_cv_env_BASE_DEPENDENCIES_LIBS_set=${BASE_DEPENDENCIES_LIBS+set} +-ac_cv_env_BASE_DEPENDENCIES_LIBS_value=$BASE_DEPENDENCIES_LIBS ++ pwd)` ++# When building in place, set srcdir=. ++if test "$ac_abs_confdir" = "$ac_pwd"; then ++ srcdir=. ++fi ++# Remove unnecessary trailing slashes from srcdir. ++# Double slashes in file names in object file debugging info ++# mess up M-x gdb in Emacs. ++case $srcdir in ++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; ++esac ++for ac_var in $ac_precious_vars; do ++ eval ac_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_env_${ac_var}_value=\$${ac_var} ++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_cv_env_${ac_var}_value=\$${ac_var} ++done + + # + # Report the --help message. +@@ -986,9 +1800,6 @@ + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +-_ACEOF +- +- cat <<_ACEOF + Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] +@@ -1006,15 +1817,22 @@ + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] +- --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] +- --infodir=DIR info documentation [PREFIX/info] +- --mandir=DIR man documentation [PREFIX/man] ++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] ++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] ++ --infodir=DIR info documentation [DATAROOTDIR/info] ++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] ++ --mandir=DIR man documentation [DATAROOTDIR/man] ++ --docdir=DIR documentation root [DATAROOTDIR/doc/gtkglext] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -1043,24 +1861,18 @@ + Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] +- --enable-maintainer-mode enable make rules and dependencies not useful +- (and sometimes confusing) to the casual installer +- --disable-dependency-tracking Speeds up one-time builds +- --enable-dependency-tracking Do not reject slow dependency extractors +- --enable-shared[=PKGS] +- build shared libraries [default=yes] +- --enable-static[=PKGS] +- build static libraries [default=yes] ++ --enable-maintainer-mode enable make rules and dependencies not useful ++ (and sometimes confusing) to the casual installer ++ --disable-dependency-tracking speeds up one-time build ++ --enable-dependency-tracking do not reject slow dependency extractors ++ --enable-shared[=PKGS] build shared libraries [default=yes] ++ --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug=[no/minimum/yes] +- turn on debugging +- [default=minimum] +- --enable-ansi turn on strict ansi [default=no] ++ turn on debugging [default=minimum] + --disable-rebuilds disable all source autogeneration rules +- --disable-glibtest do not try to compile and run a test GLIB program +- --disable-gtktest do not try to compile and run a test GTK+ program + --enable-gtk-doc use gtk-doc to build documentation [default=no] + + Optional Packages: +@@ -1069,9 +1881,8 @@ + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] +- --with-tags[=TAGS] +- include additional configurations [automatic] +- --with-gdktarget=[x11/win32] ++ --with-tags[=TAGS] include additional configurations [automatic] ++ --with-gdktarget=[x11/win32/quartz] + select GDK target + --with-x use the X Window System + --with-gl-prefix=DIR OpenGL (Mesa) is installed in DIR [default=auto] +@@ -1085,8 +1896,9 @@ + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory +- CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have +- headers in a nonstandard directory ++ LIBS libraries to pass to the linker, e.g. -l ++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags +@@ -1098,126 +1910,93 @@ + C compiler flags for BASE_DEPENDENCIES, overriding pkg-config + BASE_DEPENDENCIES_LIBS + linker flags for BASE_DEPENDENCIES, overriding pkg-config ++ XMKMF Path to xmkmf, Makefile generator for X Window System + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. + + Report bugs to . + _ACEOF ++ac_status=$? + fi + + if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. +- ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue +- test -d $ac_dir || continue ++ test -d "$ac_dir" || continue + ac_builddir=. + +-if test "$ac_dir" != .; then ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # We are building in place. + ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; +-esac +- +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + +- cd $ac_dir +- # Check for guested configure; otherwise get Cygnus style configure. +- if test -f $ac_srcdir/configure.gnu; then +- echo +- $SHELL $ac_srcdir/configure.gnu --help=recursive +- elif test -f $ac_srcdir/configure; then +- echo +- $SHELL $ac_srcdir/configure --help=recursive +- elif test -f $ac_srcdir/configure.ac || +- test -f $ac_srcdir/configure.in; then +- echo +- $ac_configure --help ++ cd "$ac_dir" || { ac_status=$?; continue; } ++ # Check for guested configure. ++ if test -f "$ac_srcdir/configure.gnu"; then ++ echo && ++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive ++ elif test -f "$ac_srcdir/configure"; then ++ echo && ++ $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 +- fi +- cd $ac_popdir ++ fi || ac_status=$? ++ cd "$ac_pwd" || { ac_status=$?; break; } + done + fi + +-test -n "$ac_init_help" && exit 0 ++test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF + gtkglext configure 1.2.0 +-generated by GNU Autoconf 2.59 ++generated by GNU Autoconf 2.61 + +-Copyright (C) 2003 Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +- exit 0 ++ exit + fi +-exec 5>config.log +-cat >&5 <<_ACEOF ++cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by gtkglext $as_me 1.2.0, which was +-generated by GNU Autoconf 2.59. Invocation command line was ++generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + + _ACEOF ++exec 5>>config.log + { + cat <<_ASUNAME + ## --------- ## +@@ -1236,7 +2015,7 @@ + /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +-hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` + /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` + /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +@@ -1250,6 +2029,7 @@ + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" + done ++IFS=$as_save_IFS + + } >&5 + +@@ -1271,7 +2051,6 @@ + ac_configure_args= + ac_configure_args0= + ac_configure_args1= +-ac_sep= + ac_must_keep_next=false + for ac_pass in 1 2 + do +@@ -1282,7 +2061,7 @@ + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ++ *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in +@@ -1304,9 +2083,7 @@ + -* ) ac_must_keep_next=true ;; + esac + fi +- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" +- # Get rid of the leading space. +- ac_sep=" " ++ ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +@@ -1317,8 +2094,8 @@ + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there + # would cause problems or look ugly. +-# WARNING: Be sure not to use single quotes in there, as some shells, +-# such as our DU 5.0 friend, will then `close' the trap. ++# WARNING: Use '\'' to represent an apostrophe within the trap. ++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { +@@ -1331,20 +2108,34 @@ + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done + (set) 2>&1 | +- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + sed -n \ +- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; +- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" +- ;; ++ "s/'\''/'\''\\\\'\'''\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ++ ;; #( + *) +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} ++ esac | ++ sort ++) + echo + + cat <<\_ASBOX +@@ -1355,22 +2146,28 @@ + echo + for ac_var in $ac_subst_vars + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +-## ------------- ## +-## Output files. ## +-## ------------- ## ++## ------------------- ## ++## File substitutions. ## ++## ------------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi +@@ -1382,26 +2179,24 @@ + ## ----------- ## + _ASBOX + echo +- sed "/^$/d" confdefs.h | sort ++ cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 +- rm -f core *.core && +- rm -rf conftest* confdefs* conf$$* $ac_clean_files && ++ rm -f core *.core core.conftest.* && ++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +- ' 0 ++' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. +-rm -rf conftest* confdefs.h +-# AIX cpp loses on an empty file, so make sure it contains at least a newline. +-echo >confdefs.h ++rm -f -r conftest* confdefs.h + + # Predefined preprocessor variables. + +@@ -1432,14 +2227,17 @@ + + # Let the site file select an alternate cache file if it wants to. + # Prefer explicitly selected file to automatically selected ones. +-if test -z "$CONFIG_SITE"; then +- if test "x$prefix" != xNONE; then +- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" +- else +- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +- fi ++if test -n "$CONFIG_SITE"; then ++ set x "$CONFIG_SITE" ++elif test "x$prefix" != xNONE; then ++ set x "$prefix/share/config.site" "$prefix/etc/config.site" ++else ++ set x "$ac_default_prefix/share/config.site" \ ++ "$ac_default_prefix/etc/config.site" + fi +-for ac_site_file in $CONFIG_SITE; do ++shift ++for ac_site_file ++do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + echo "$as_me: loading site script $ac_site_file" >&6;} +@@ -1455,8 +2253,8 @@ + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 + echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in +- [\\/]* | ?:[\\/]* ) . $cache_file;; +- *) . ./$cache_file;; ++ [\\/]* | ?:[\\/]* ) . "$cache_file";; ++ *) . "./$cache_file";; + esac + fi + else +@@ -1468,12 +2266,11 @@ + # Check that the precious variables saved in the cache have kept the same + # value. + ac_cache_corrupted=false +-for ac_var in `(set) 2>&1 | +- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ++for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set +- eval ac_old_val="\$ac_cv_env_${ac_var}_value" +- eval ac_new_val="\$ac_env_${ac_var}_value" ++ eval ac_old_val=\$ac_cv_env_${ac_var}_value ++ eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +@@ -1498,8 +2295,7 @@ + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) +- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in +@@ -1516,12 +2312,6 @@ + { (exit 1); exit 1; }; } + fi + +-ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' +-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +-ac_compiler_gnu=$ac_cv_c_compiler_gnu +- + + + +@@ -1546,6 +2336,11 @@ + + + ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +@@ -1555,31 +2350,38 @@ + cflags_set=${CFLAGS+set} + + # Initialize automake stuff +-am__api_version="1.7" ++am__api_version='1.10' ++ + ac_aux_dir= +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +- if test -f $ac_dir/install-sh; then ++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do ++ if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break +- elif test -f $ac_dir/install.sh; then ++ elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break +- elif test -f $ac_dir/shtool; then ++ elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi + done + if test -z "$ac_aux_dir"; then +- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 ++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } + fi +-ac_config_guess="$SHELL $ac_aux_dir/config.guess" +-ac_config_sub="$SHELL $ac_aux_dir/config.sub" +-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ++ ++# These three variables are undocumented and unsupported, ++# and are intended to be withdrawn in a future Autoconf release. ++# They can cause serious problems if a builder's source tree is in a directory ++# whose full name contains unusual characters. ++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ++ + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -1594,8 +2396,8 @@ + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } + if test -z "$INSTALL"; then + if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -1617,7 +2419,7 @@ + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. +@@ -1636,21 +2438,22 @@ + ;; + esac + done ++IFS=$as_save_IFS + + + fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else +- # As a last resort, use the slow shell script. We don't cache a +- # path for INSTALL within a source directory, because that will ++ # As a last resort, use the slow shell script. Don't cache a ++ # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is +- # removed, or if the path is relative. ++ # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi + fi +-echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6 ++{ echo "$as_me:$LINENO: result: $INSTALL" >&5 ++echo "${ECHO_T}$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -1660,8 +2463,8 @@ + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ++echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } + # Just in case + sleep 1 + echo timestamp > conftest.file +@@ -1703,21 +2506,20 @@ + Check your system clock" >&2;} + { (exit 1); exit 1; }; } + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + test "$program_prefix" != NONE && +- program_transform_name="s,^,$program_prefix,;$program_transform_name" ++ program_transform_name="s&^&$program_prefix&;$program_transform_name" + # Use a double $ so make ignores it. + test "$program_suffix" != NONE && +- program_transform_name="s,\$,$program_suffix,;$program_transform_name" ++ program_transform_name="s&\$&$program_suffix&;$program_transform_name" + # Double any \ or $. echo might interpret backslashes. + # By default was `s,x,x', remove it if useless. + cat <<\_ACEOF >conftest.sed + s/[\\$]/&&/g;s/;s,x,x,$// + _ACEOF + program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +-rm conftest.sed +- ++rm -f conftest.sed + + # expand $ac_aux_dir to an absolute path + am_aux_dir=`cd $ac_aux_dir && pwd` +@@ -1732,12 +2534,60 @@ + echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + fi + ++{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 ++echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } ++if test -z "$MKDIR_P"; then ++ if test "${ac_cv_path_mkdir+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in mkdir gmkdir; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue ++ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( ++ 'mkdir (GNU coreutils) '* | \ ++ 'mkdir (coreutils) '* | \ ++ 'mkdir (fileutils) '4.1*) ++ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext ++ break 3;; ++ esac ++ done ++ done ++done ++IFS=$as_save_IFS ++ ++fi ++ ++ if test "${ac_cv_path_mkdir+set}" = set; then ++ MKDIR_P="$ac_cv_path_mkdir -p" ++ else ++ # As a last resort, use the slow shell script. Don't cache a ++ # value for MKDIR_P within a source directory, because that will ++ # break other packages using the cache if that directory is ++ # removed, or if the value is a relative name. ++ test -d ./--version && rmdir ./--version ++ MKDIR_P="$ac_install_sh -d" ++ fi ++fi ++{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 ++echo "${ECHO_T}$MKDIR_P" >&6; } ++ ++mkdir_p="$MKDIR_P" ++case $mkdir_p in ++ [\\/$]* | ?:[\\/]*) ;; ++ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; ++esac ++ + for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1750,54 +2600,57 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- echo "$as_me:$LINENO: result: $AWK" >&5 +-echo "${ECHO_T}$AWK" >&6 ++ { echo "$as_me:$LINENO: result: $AWK" >&5 ++echo "${ECHO_T}$AWK" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$AWK" && break + done + +-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } ++set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` ++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.make <<\_ACEOF ++SHELL = /bin/sh + all: +- @echo 'ac_maketemp="$(MAKE)"' ++ @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +-if test -n "$ac_maketemp"; then +- eval ac_cv_prog_make_${ac_make}_set=yes +-else +- eval ac_cv_prog_make_${ac_make}_set=no +-fi ++case `${MAKE-make} -f conftest.make 2>/dev/null` in ++ *@@@%%%=?*=@@@%%%*) ++ eval ac_cv_prog_make_${ac_make}_set=yes;; ++ *) ++ eval ac_cv_prog_make_${ac_make}_set=no;; ++esac + rm -f conftest.make + fi +-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + SET_MAKE= + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" + fi + +@@ -1810,12 +2663,16 @@ + fi + rmdir .tst 2>/dev/null + +- # test to see if srcdir already configured +-if test "`cd $srcdir && pwd`" != "`pwd`" && +- test -f $srcdir/config.status; then +- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 ++if test "`cd $srcdir && pwd`" != "`pwd`"; then ++ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output ++ # is not polluted with repeated "-I." ++ am__isrc=' -I$(srcdir)' ++ # test to see if srcdir already configured ++ if test -f $srcdir/config.status; then ++ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 + echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } ++ fi + fi + + # test whether we have cygpath +@@ -1849,10 +2706,7 @@ + + MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +- +-AMTAR=${AMTAR-"${am_missing_run}tar"} +- +-install_sh=${install_sh-"$am_aux_dir/install-sh"} ++install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + + # Installed binaries are usually stripped using `strip' when the user + # run `make install-strip'. However `strip' might not be the right +@@ -1862,8 +2716,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1876,32 +2730,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6 ++ { echo "$as_me:$LINENO: result: $STRIP" >&5 ++echo "${ECHO_T}$STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1914,58 +2770,77 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++echo "${ECHO_T}$ac_ct_STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- STRIP=$ac_ct_STRIP ++ if test "x$ac_ct_STRIP" = x; then ++ STRIP=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ STRIP=$ac_ct_STRIP ++ fi + else + STRIP="$ac_cv_prog_STRIP" + fi + + fi +-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + + # We need awk for the "check" target. The system "awk" is bad on + # some platforms. ++# Always define AMTAR for backward compatibility. ++ ++AMTAR=${AMTAR-"${am_missing_run}tar"} ++ ++am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ++ ++ + + + + + # Specify a configuration file +- ac_config_headers="$ac_config_headers config.h" ++ac_config_headers="$ac_config_headers config.h" + + +-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 +- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. ++{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } ++ # Check whether --enable-maintainer-mode was given. + if test "${enable_maintainer_mode+set}" = set; then +- enableval="$enable_maintainer_mode" +- USE_MAINTAINER_MODE=$enableval ++ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval + else + USE_MAINTAINER_MODE=no +-fi; +- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 +- ++fi + +-if test $USE_MAINTAINER_MODE = yes; then ++ { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 ++echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } ++ if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' + else +@@ -1978,57 +2853,86 @@ + + + # Make sure we can run config.sub. +-$ac_config_sub sun4 >/dev/null 2>&1 || +- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +-echo "$as_me: error: cannot run $ac_config_sub" >&2;} ++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || ++ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 ++echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +-echo "$as_me:$LINENO: checking build system type" >&5 +-echo $ECHO_N "checking build system type... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking build system type" >&5 ++echo $ECHO_N "checking build system type... $ECHO_C" >&6; } + if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_cv_build_alias=$build_alias +-test -z "$ac_cv_build_alias" && +- ac_cv_build_alias=`$ac_config_guess` +-test -z "$ac_cv_build_alias" && ++ ac_build_alias=$build_alias ++test "x$ac_build_alias" = x && ++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` ++test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 + echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || +- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} ++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || ++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 ++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + + fi +-echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +-echo "${ECHO_T}$ac_cv_build" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 ++echo "${ECHO_T}$ac_cv_build" >&6; } ++case $ac_cv_build in ++*-*-*) ;; ++*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 ++echo "$as_me: error: invalid value of canonical build" >&2;} ++ { (exit 1); exit 1; }; };; ++esac + build=$ac_cv_build +-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ac_save_IFS=$IFS; IFS='-' ++set x $ac_cv_build ++shift ++build_cpu=$1 ++build_vendor=$2 ++shift; shift ++# Remember, the first character of IFS is used to create $*, ++# except with old shells: ++build_os=$* ++IFS=$ac_save_IFS ++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +-echo "$as_me:$LINENO: checking host system type" >&5 +-echo $ECHO_N "checking host system type... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking host system type" >&5 ++echo $ECHO_N "checking host system type... $ECHO_C" >&6; } + if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_cv_host_alias=$host_alias +-test -z "$ac_cv_host_alias" && +- ac_cv_host_alias=$ac_cv_build_alias +-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || +- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} ++ if test "x$host_alias" = x; then ++ ac_cv_host=$ac_cv_build ++else ++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || ++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 ++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } ++fi + + fi +-echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +-echo "${ECHO_T}$ac_cv_host" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 ++echo "${ECHO_T}$ac_cv_host" >&6; } ++case $ac_cv_host in ++*-*-*) ;; ++*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 ++echo "$as_me: error: invalid value of canonical host" >&2;} ++ { (exit 1); exit 1; }; };; ++esac + host=$ac_cv_host +-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ac_save_IFS=$IFS; IFS='-' ++set x $ac_cv_host ++shift ++host_cpu=$1 ++host_vendor=$2 ++shift; shift ++# Remember, the first character of IFS is used to create $*, ++# except with old shells: ++host_os=$* ++IFS=$ac_save_IFS ++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +@@ -2037,7 +2941,7 @@ + GTKGLEXT_MINOR_VERSION=2 + GTKGLEXT_MICRO_VERSION=0 + GTKGLEXT_INTERFACE_AGE=0 +-GTKGLEXT_BINARY_AGE=0 ++GTKGLEXT_BINARY_AGE=200 + GTKGLEXT_VERSION=1.2.0 + # This is the X.Y used in -lgtkglext-FOO-X.Y + GTKGLEXT_API_MAJOR_VERSION=1 +@@ -2059,9 +2963,9 @@ + + # libtool versioning + LT_RELEASE=1.2 +-LT_CURRENT=0 ++LT_CURRENT=200 + LT_REVISION=0 +-LT_AGE=0 ++LT_AGE=200 + LT_CURRENT_MINUS_AGE=0 + + +@@ -2077,8 +2981,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2091,32 +2995,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2129,36 +3035,51 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + else + CC="$ac_cv_prog_CC" + fi + + if test -z "$CC"; then +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2171,74 +3092,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- +-fi +-if test -z "$ac_cv_prog_CC"; then +- ac_ct_CC=$CC +- # Extract the first word of "cc", so it can be a program name with args. +-set dummy cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- if test -n "$ac_ct_CC"; then +- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +-done +- +-fi +-fi +-ac_ct_CC=$ac_cv_prog_ac_ct_CC +-if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- CC=$ac_ct_CC +-else +- CC="$ac_cv_prog_CC" +-fi + ++ fi + fi + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2252,7 +3133,7 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +@@ -2263,6 +3144,7 @@ + fi + done + done ++IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. +@@ -2280,22 +3162,23 @@ + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then +- for ac_prog in cl ++ for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2308,36 +3191,38 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$CC" && break + done + fi + if test -z "$CC"; then + ac_ct_CC=$CC +- for ac_prog in cl ++ for ac_prog in cl.exe + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2350,29 +3235,45 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$ac_ct_CC" && break + done + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + fi + + fi +@@ -2385,21 +3286,35 @@ + { (exit 1); exit 1; }; } + + # Provide some information about the compiler. +-echo "$as_me:$LINENO:" \ +- "checking for C compiler version" >&5 ++echo "$as_me:$LINENO: checking for C compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +@@ -2424,47 +3339,77 @@ + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 ++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } + ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 +- (eval $ac_link_default) 2>&5 ++# ++# List of possible output files, starting from the most likely. ++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) ++# only as a last resort. b.out is created by i960 compilers. ++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' ++# ++# The IRIX 6 linker writes into existing files which may not be ++# executable, retaining their permissions. Remove them first so a ++# subsequent execution test works. ++ac_rmfiles= ++for ac_file in $ac_files ++do ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; ++ * ) ac_rmfiles="$ac_rmfiles $ac_file";; ++ esac ++done ++rm -f $ac_rmfiles ++ ++if { (ac_try="$ac_link_default" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- # Find the output, starting from the most likely. This scheme is +-# not robust to junk in `.', hence go to wildcards (a.*) only as a last +-# resort. +- +-# Be careful to initialize this variable, since it used to be cached. +-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +-ac_cv_exeext= +-# b.out is created by i960 compilers. +-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. ++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' ++# in a Makefile. We should not override ac_cv_exeext if it was cached, ++# so that the user can short-circuit this test for compilers unknown to ++# Autoconf. ++for ac_file in $ac_files '' + do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) +- ;; +- conftest.$ac_ext ) +- # This is the source file. ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) +- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- # FIXME: I believe we export ac_cv_exeext for Libtool, +- # but it would be cool to find out if it's true. Does anybody +- # maintain Libtool? --akim. +- export ac_cv_exeext ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; ++ then :; else ++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ fi ++ # We set ac_cv_exeext here because the later test for it is not ++ # safe: cross compilers may not add the suffix if given an `-o' ++ # argument, so we may need to know it at that point already. ++ # Even if this section looks crufty: it has the advantage of ++ # actually working. + break;; + * ) + break;; + esac + done ++test "$ac_cv_exeext" = no && ac_cv_exeext= ++ + else ++ ac_file='' ++fi ++ ++{ echo "$as_me:$LINENO: result: $ac_file" >&5 ++echo "${ECHO_T}$ac_file" >&6; } ++if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +@@ -2476,19 +3421,21 @@ + fi + + ac_exeext=$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_file" >&5 +-echo "${ECHO_T}$ac_file" >&6 + +-# Check the compiler produces executables we can run. If not, either ++# Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } + # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 + # If not cross compiling, check that we can run a simple program. + if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -2507,22 +3454,27 @@ + fi + fi + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + + rm -f a.out a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save +-# Check the compiler produces executables we can run. If not, either ++# Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $cross_compiling" >&5 +-echo "${ECHO_T}$cross_compiling" >&6 +- +-echo "$as_me:$LINENO: checking for suffix of executables" >&5 +-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } ++{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 ++echo "${ECHO_T}$cross_compiling" >&6; } ++ ++{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 ++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +@@ -2533,9 +3485,8 @@ + for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- export ac_cv_exeext + break;; + * ) break;; + esac +@@ -2549,14 +3500,14 @@ + fi + + rm -f conftest$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ++echo "${ECHO_T}$ac_cv_exeext" >&6; } + + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT +-echo "$as_me:$LINENO: checking for suffix of object files" >&5 +-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 ++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } + if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2576,14 +3527,20 @@ + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ++ for ac_file in conftest.o conftest.obj conftest.*; do ++ test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +@@ -2601,12 +3558,12 @@ + + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +-echo "${ECHO_T}$ac_cv_objext" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ++echo "${ECHO_T}$ac_cv_objext" >&6; } + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } + if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2629,50 +3586,49 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } + GCC=`test $ac_compiler_gnu = yes && echo yes` + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-CFLAGS="-g" +-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } + if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_save_c_werror_flag=$ac_c_werror_flag ++ ac_c_werror_flag=yes ++ ac_cv_prog_cc_g=no ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2688,38 +3644,118 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_g=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ CFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_c_werror_flag=$ac_save_c_werror_flag ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_cc_g=no ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_c_werror_flag=$ac_save_c_werror_flag + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } + if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then +@@ -2735,12 +3771,12 @@ + CFLAGS= + fi + fi +-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +-if test "${ac_cv_prog_cc_stdc+set}" = set; then ++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_cv_prog_cc_stdc=no ++ ac_cv_prog_cc_c89=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -2774,12 +3810,17 @@ + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated +- as 'x'. The following induces an error, until -std1 is added to get ++ as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something +- that's true only with -std1. */ ++ that's true only with -std. */ + int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + ++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters ++ inside strings and character constants. */ ++#define FOO(x) 'x' ++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; ++ + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; +@@ -2794,205 +3835,57 @@ + return 0; + } + _ACEOF +-# Don't try gcc -ansi; that turns off useful extensions and +-# breaks some systems' header files. +-# AIX -qlanglvl=ansi +-# Ultrix and OSF/1 -std1 +-# HP-UX 10.20 and later -Ae +-# HP-UX older versions -Aa -D_HPUX_SOURCE +-# SVR4 -Xc -D__EXTENSIONS__ +-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ ++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_prog_cc_stdc=$ac_arg +-break ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_c89=$ac_arg + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext ++ ++rm -f core conftest.err conftest.$ac_objext ++ test "x$ac_cv_prog_cc_c89" != "xno" && break + done +-rm -f conftest.$ac_ext conftest.$ac_objext ++rm -f conftest.$ac_ext + CC=$ac_save_CC + + fi +- +-case "x$ac_cv_prog_cc_stdc" in +- x|xno) +- echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6 ;; ++# AC_CACHE_VAL ++case "x$ac_cv_prog_cc_c89" in ++ x) ++ { echo "$as_me:$LINENO: result: none needed" >&5 ++echo "${ECHO_T}none needed" >&6; } ;; ++ xno) ++ { echo "$as_me:$LINENO: result: unsupported" >&5 ++echo "${ECHO_T}unsupported" >&6; } ;; + *) +- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 +- CC="$CC $ac_cv_prog_cc_stdc" ;; ++ CC="$CC $ac_cv_prog_cc_c89" ++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + esac + +-# Some people use a C++ compiler to compile C. Since we use `exit', +-# in C++ we need to declare it. In case someone uses the same compiler +-# for both compiling C and C++ we need to have the C++ compiler decide +-# the declaration of exit, since it's the most demanding environment. +-cat >conftest.$ac_ext <<_ACEOF +-#ifndef __cplusplus +- choke me +-#endif +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-#include +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -3000,7 +3893,7 @@ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" + +- ac_config_commands="$ac_config_commands depfiles" ++ac_config_commands="$ac_config_commands depfiles" + + + am_make=${MAKE-make} +@@ -3010,8 +3903,8 @@ + .PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. +-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 ++echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } + am__include="#" + am__quote= + _am_result=none +@@ -3038,22 +3931,20 @@ + fi + + +-echo "$as_me:$LINENO: result: $_am_result" >&5 +-echo "${ECHO_T}$_am_result" >&6 ++{ echo "$as_me:$LINENO: result: $_am_result" >&5 ++echo "${ECHO_T}$_am_result" >&6; } + rm -f confinc confmf + +-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. ++# Check whether --enable-dependency-tracking was given. + if test "${enable_dependency_tracking+set}" = set; then +- enableval="$enable_dependency_tracking" ++ enableval=$enable_dependency_tracking; ++fi + +-fi; + if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + fi +- +- +-if test "x$enable_dependency_tracking" != xno; then ++ if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' + else +@@ -3063,11 +3954,10 @@ + + + +- + depcc="$CC" am_compiler_list= + +-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } + if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3105,7 +3995,9 @@ + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c +- : > sub/conftst$i.h ++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with ++ # Solaris 8's {/usr,}/bin/sh. ++ touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + +@@ -3129,13 +4021,19 @@ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && ++ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings +- # (even with -Werror). So we grep stderr for any message +- # that says an option was ignored. +- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else ++ # or remarks (even with -Werror). So we grep stderr for any message ++ # that says an option was ignored or not supported. ++ # When given -MP, icc 7.0 and 7.1 complain thusly: ++ # icc: Command line warning: ignoring option '-M'; no argument required ++ # The diagnosis changed in icc 8.0: ++ # icc: Command line remark: option '-MP' not supported ++ if (grep 'ignoring option' conftest.err || ++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi +@@ -3149,13 +4047,11 @@ + fi + + fi +-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 ++{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ++echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + +- +- +-if ++ if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= +@@ -3171,8 +4067,8 @@ + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -3206,24 +4102,22 @@ + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -3232,9 +4126,10 @@ + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3244,24 +4139,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -3272,6 +4165,7 @@ + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -3289,8 +4183,8 @@ + else + ac_cv_prog_CPP=$CPP + fi +-echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6 ++{ echo "$as_me:$LINENO: result: $CPP" >&5 ++echo "${ECHO_T}$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do +@@ -3313,24 +4207,22 @@ + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -3339,9 +4231,10 @@ + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3351,24 +4244,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -3379,6 +4270,7 @@ + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -3400,85 +4292,12 @@ + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- +- +- echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 +-echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 +-if test "${ac_cv_lib_cposix_strerror+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcposix $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-/* Override any gcc2 internal prototype to avoid an error. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char strerror (); +-int +-main () +-{ +-strerror (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_lib_cposix_strerror=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-ac_cv_lib_cposix_strerror=no +-fi +-rm -f conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 +-echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 +-if test $ac_cv_lib_cposix_strerror = yes; then +- LIBS="$LIBS -lcposix" +-fi +- +- +- + #AM_DISABLE_STATIC + + +-# Check whether --enable-shared or --disable-shared was given. ++# Check whether --enable-shared was given. + if test "${enable_shared+set}" = set; then +- enableval="$enable_shared" +- p=${PACKAGE-default} ++ enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; +@@ -3497,12 +4316,12 @@ + esac + else + enable_shared=yes +-fi; ++fi + +-# Check whether --enable-static or --disable-static was given. ++ ++# Check whether --enable-static was given. + if test "${enable_static+set}" = set; then +- enableval="$enable_static" +- p=${PACKAGE-default} ++ enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; +@@ -3521,12 +4340,12 @@ + esac + else + enable_static=yes +-fi; ++fi + +-# Check whether --enable-fast-install or --disable-fast-install was given. ++ ++# Check whether --enable-fast-install was given. + if test "${enable_fast_install+set}" = set; then +- enableval="$enable_fast_install" +- p=${PACKAGE-default} ++ enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; +@@ -3545,10 +4364,11 @@ + esac + else + enable_fast_install=yes +-fi; ++fi + +-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 ++ ++{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 ++echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } + if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3561,12 +4381,13 @@ + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then ++ if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done + done ++IFS=$as_save_IFS + lt_ac_max=0 + lt_ac_count=0 + # Add /usr/xpg4/bin/sed as it is typically found on Solaris +@@ -3601,37 +4422,185 @@ + fi + + SED=$lt_cv_path_SED +-echo "$as_me:$LINENO: result: $SED" >&5 +-echo "${ECHO_T}$SED" >&6 + +-echo "$as_me:$LINENO: checking for egrep" >&5 +-echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +-if test "${ac_cv_prog_egrep+set}" = set; then ++{ echo "$as_me:$LINENO: result: $SED" >&5 ++echo "${ECHO_T}$SED" >&6; } ++ ++{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 ++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } ++if test "${ac_cv_path_GREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ # Extract the first word of "grep ggrep" to use in msg output ++if test -z "$GREP"; then ++set dummy grep ggrep; ac_prog_name=$2 ++if test "${ac_cv_path_GREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_path_GREP_found=false ++# Loop through the user's path and test for each of PROGNAME-LIST ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in grep ggrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++ # Check for GNU ac_path_GREP and select it if it is found. ++ # Check for GNU $ac_path_GREP ++case `"$ac_path_GREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; ++*) ++ ac_count=0 ++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ echo 'GREP' >> "conftest.nl" ++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_GREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_GREP="$ac_path_GREP" ++ ac_path_GREP_max=$ac_count ++ fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ ++ $ac_path_GREP_found && break 3 ++ done ++done ++ ++done ++IFS=$as_save_IFS ++ ++ ++fi ++ ++GREP="$ac_cv_path_GREP" ++if test -z "$GREP"; then ++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++else ++ ac_cv_path_GREP=$GREP ++fi ++ ++ ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 ++echo "${ECHO_T}$ac_cv_path_GREP" >&6; } ++ GREP="$ac_cv_path_GREP" ++ ++ ++{ echo "$as_me:$LINENO: checking for egrep" >&5 ++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } ++if test "${ac_cv_path_EGREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 ++ then ac_cv_path_EGREP="$GREP -E" ++ else ++ # Extract the first word of "egrep" to use in msg output ++if test -z "$EGREP"; then ++set dummy egrep; ac_prog_name=$2 ++if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 +- then ac_cv_prog_egrep='grep -E' +- else ac_cv_prog_egrep='egrep' ++ ac_path_EGREP_found=false ++# Loop through the user's path and test for each of PROGNAME-LIST ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++ # Check for GNU ac_path_EGREP and select it if it is found. ++ # Check for GNU $ac_path_EGREP ++case `"$ac_path_EGREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; ++*) ++ ac_count=0 ++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ echo 'EGREP' >> "conftest.nl" ++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_EGREP="$ac_path_EGREP" ++ ac_path_EGREP_max=$ac_count + fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ ++ $ac_path_EGREP_found && break 3 ++ done ++done ++ ++done ++IFS=$as_save_IFS ++ ++ ++fi ++ ++EGREP="$ac_cv_path_EGREP" ++if test -z "$EGREP"; then ++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++else ++ ac_cv_path_EGREP=$EGREP ++fi ++ ++ ++ fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +-echo "${ECHO_T}$ac_cv_prog_egrep" >&6 +- EGREP=$ac_cv_prog_egrep ++{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 ++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } ++ EGREP="$ac_cv_path_EGREP" + + + +-# Check whether --with-gnu-ld or --without-gnu-ld was given. ++# Check whether --with-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then +- withval="$with_gnu_ld" +- test "$withval" = no || with_gnu_ld=yes ++ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no +-fi; ++fi ++ + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ++echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -3660,11 +4629,11 @@ + ;; + esac + elif test "$with_gnu_ld" = yes; then +- echo "$as_me:$LINENO: checking for GNU ld" >&5 +-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for GNU ld" >&5 ++echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } + else +- echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -3697,17 +4666,17 @@ + + LD="$lt_cv_path_LD" + if test -n "$LD"; then +- echo "$as_me:$LINENO: result: $LD" >&5 +-echo "${ECHO_T}$LD" >&6 ++ { echo "$as_me:$LINENO: result: $LD" >&5 ++echo "${ECHO_T}$LD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 + echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3721,20 +4690,20 @@ + ;; + esac + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ++echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 ++echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_ld_reload_flag='-r' + fi +-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 ++echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } + reload_flag=$lt_cv_ld_reload_flag + case $reload_flag in + "" | " "*) ;; +@@ -3751,8 +4720,8 @@ + ;; + esac + +-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 ++echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } + if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3800,23 +4769,23 @@ + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + fi + fi +-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +-echo "${ECHO_T}$lt_cv_path_NM" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 ++echo "${ECHO_T}$lt_cv_path_NM" >&6; } + NM="$lt_cv_path_NM" + +-echo "$as_me:$LINENO: checking whether ln -s works" >&5 +-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 ++echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } + LN_S=$as_ln_s + if test "$LN_S" = "ln -s"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else +- echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +-echo "${ECHO_T}no, using $LN_S" >&6 ++ { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 ++echo "${ECHO_T}no, using $LN_S" >&6; } + fi + +-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 ++echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } + if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3835,7 +4804,7 @@ + # whether `pass_all' will *always* work, you probably want this one. + + case $host_os in +-aix4* | aix5*) ++aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +@@ -3857,16 +4826,22 @@ + + mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by +- # func_win32_libid shell function, so use a weaker test based on 'objdump'. +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' +- lt_cv_file_magic_cmd='$OBJDUMP -f' ++ # func_win32_libid shell function, so use a weaker test based on 'objdump', ++ # unless we find 'file', for example because we are cross-compiling. ++ if ( file / ) >/dev/null 2>&1; then ++ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' ++ lt_cv_file_magic_cmd='func_win32_libid' ++ else ++ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ lt_cv_file_magic_cmd='$OBJDUMP -f' ++ fi + ;; + + darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +-freebsd* | kfreebsd*-gnu | dragonfly*) ++freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) +@@ -3904,7 +4879,7 @@ + esac + ;; + +-interix3*) ++interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; +@@ -3920,7 +4895,7 @@ + ;; + + # This must be Linux ELF. +-linux*) ++linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +@@ -3954,6 +4929,10 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++rdos*) ++ lt_cv_deplibs_check_method=pass_all ++ ;; ++ + solaris*) + lt_cv_deplibs_check_method=pass_all + ;; +@@ -3991,8 +4970,8 @@ + esac + + fi +-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 ++echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -4009,11 +4988,12 @@ + # Allow CC to be a program name with arguments. + compiler=$CC + +-# Check whether --enable-libtool-lock or --disable-libtool-lock was given. ++ ++# Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then +- enableval="$enable_libtool_lock" ++ enableval=$enable_libtool_lock; ++fi + +-fi; + test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + # Some flags need to be propagated to the compiler or linker for good +@@ -4040,7 +5020,7 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 4043 "configure"' > conftest.$ac_ext ++ echo '#line 4717 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -4075,7 +5055,8 @@ + rm -rf conftest* + ;; + +-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ++x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ ++s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +@@ -4086,6 +5067,9 @@ + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in ++ x86_64-*kfreebsd*-gnu) ++ LD="${LD-ld} -m elf_i386_fbsd" ++ ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +@@ -4101,7 +5085,11 @@ + esac + ;; + *64-bit*) ++ libsuff=64 + case $host in ++ x86_64-*kfreebsd*-gnu) ++ LD="${LD-ld} -m elf_x86_64_fbsd" ++ ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +@@ -4125,8 +5113,8 @@ + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" +- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 ++echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } + if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4152,35 +5140,32 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-lt_cv_cc_needs_belf=no ++ lt_cv_cc_needs_belf=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -4189,8 +5174,8 @@ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 ++echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" +@@ -4208,7 +5193,11 @@ + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; +- *) LD="${LD-ld} -64" ;; ++ *) ++ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then ++ LD="${LD-ld} -64" ++ fi ++ ;; + esac + ;; + esac +@@ -4220,8 +5209,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. + set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4234,32 +5223,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + DLLTOOL=$ac_cv_prog_DLLTOOL + if test -n "$DLLTOOL"; then +- echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +-echo "${ECHO_T}$DLLTOOL" >&6 ++ { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 ++echo "${ECHO_T}$DLLTOOL" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. + set dummy dlltool; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4272,27 +5263,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" + fi + fi + ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL + if test -n "$ac_ct_DLLTOOL"; then +- echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 ++echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- DLLTOOL=$ac_ct_DLLTOOL ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi + else + DLLTOOL="$ac_cv_prog_DLLTOOL" + fi +@@ -4300,8 +5305,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4314,32 +5319,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AS=$ac_cv_prog_AS + if test -n "$AS"; then +- echo "$as_me:$LINENO: result: $AS" >&5 +-echo "${ECHO_T}$AS" >&6 ++ { echo "$as_me:$LINENO: result: $AS" >&5 ++echo "${ECHO_T}$AS" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. + set dummy as; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4352,27 +5359,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" + fi + fi + ac_ct_AS=$ac_cv_prog_ac_ct_AS + if test -n "$ac_ct_AS"; then +- echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +-echo "${ECHO_T}$ac_ct_AS" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 ++echo "${ECHO_T}$ac_ct_AS" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- AS=$ac_ct_AS ++ if test "x$ac_ct_AS" = x; then ++ AS="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ AS=$ac_ct_AS ++ fi + else + AS="$ac_cv_prog_AS" + fi +@@ -4380,8 +5401,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. + set dummy ${ac_tool_prefix}objdump; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4394,32 +5415,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + OBJDUMP=$ac_cv_prog_OBJDUMP + if test -n "$OBJDUMP"; then +- echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +-echo "${ECHO_T}$OBJDUMP" >&6 ++ { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 ++echo "${ECHO_T}$OBJDUMP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. + set dummy objdump; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4432,27 +5455,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" + fi + fi + ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP + if test -n "$ac_ct_OBJDUMP"; then +- echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +-echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 ++echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- OBJDUMP=$ac_ct_OBJDUMP ++ if test "x$ac_ct_OBJDUMP" = x; then ++ OBJDUMP="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ OBJDUMP=$ac_ct_OBJDUMP ++ fi + else + OBJDUMP="$ac_cv_prog_OBJDUMP" + fi +@@ -4465,8 +5502,8 @@ + + + +-echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } + if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4490,35 +5527,31 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +@@ -4574,6 +5607,7 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include ++#include + #if ((' ' & 0x0FF) == 0x020) + # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +@@ -4593,18 +5627,27 @@ + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4617,12 +5660,14 @@ + ( exit $ac_status ) + ac_cv_header_stdc=no + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++echo "${ECHO_T}$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + + cat >>confdefs.h <<\_ACEOF +@@ -4645,9 +5690,9 @@ + inttypes.h stdint.h unistd.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +@@ -4661,38 +5706,35 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_Header=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +@@ -4707,18 +5749,19 @@ + for ac_header in dlfcn.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -4729,41 +5772,37 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -4772,24 +5811,22 @@ + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -4797,9 +5834,10 @@ + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -4823,25 +5861,24 @@ + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ ( cat <<\_ASBOX + ## -------------------------------------- ## + ## Report this to gtkglext-list@gnome.org ## + ## -------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then +@@ -4853,18 +5890,22 @@ + + done + +-ac_ext=cc ++ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +-if test -n "$ac_tool_prefix"; then +- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC ++if test -z "$CXX"; then ++ if test -n "$CCC"; then ++ CXX=$CCC ++ else ++ if test -n "$ac_tool_prefix"; then ++ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4877,36 +5918,38 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CXX=$ac_cv_prog_CXX + if test -n "$CXX"; then +- echo "$as_me:$LINENO: result: $CXX" >&5 +-echo "${ECHO_T}$CXX" >&6 ++ { echo "$as_me:$LINENO: result: $CXX" >&5 ++echo "${ECHO_T}$CXX" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$CXX" && break + done + fi + if test -z "$CXX"; then + ac_ct_CXX=$CXX +- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC ++ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4919,55 +5962,85 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CXX=$ac_cv_prog_ac_ct_CXX + if test -n "$ac_ct_CXX"; then +- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +-echo "${ECHO_T}$ac_ct_CXX" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 ++echo "${ECHO_T}$ac_ct_CXX" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$ac_ct_CXX" && break + done +-test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + +- CXX=$ac_ct_CXX ++ if test "x$ac_ct_CXX" = x; then ++ CXX="g++" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CXX=$ac_ct_CXX ++ fi + fi + +- ++ fi ++fi + # Provide some information about the compiler. +-echo "$as_me:$LINENO:" \ +- "checking for C++ compiler version" >&5 ++echo "$as_me:$LINENO: checking for C++ compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } + if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -4990,50 +6063,49 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } + GXX=`test $ac_compiler_gnu = yes && echo yes` + ac_test_CXXFLAGS=${CXXFLAGS+set} + ac_save_CXXFLAGS=$CXXFLAGS +-CXXFLAGS="-g" +-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 ++echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } + if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_save_cxx_werror_flag=$ac_cxx_werror_flag ++ ac_cxx_werror_flag=yes ++ ac_cv_prog_cxx_g=no ++ CXXFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5049,160 +6121,134 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_cxx_g=no +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +-if test "$ac_test_CXXFLAGS" = set; then +- CXXFLAGS=$ac_save_CXXFLAGS +-elif test $ac_cv_prog_cxx_g = yes; then +- if test "$GXX" = yes; then +- CXXFLAGS="-g -O2" +- else +- CXXFLAGS="-g" +- fi +-else +- if test "$GXX" = yes; then +- CXXFLAGS="-O2" +- else +- CXXFLAGS= +- fi +-fi +-for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF ++ CXXFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-$ac_declaration +-#include ++ + int + main () + { +-exit (42); ++ + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cxx_werror_flag=$ac_save_cxx_werror_flag ++ CXXFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-$ac_declaration ++ + int + main () + { +-exit (42); ++ + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cxx_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +-ac_ext=cc ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_cxx_werror_flag=$ac_save_cxx_werror_flag ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } ++if test "$ac_test_CXXFLAGS" = set; then ++ CXXFLAGS=$ac_save_CXXFLAGS ++elif test $ac_cv_prog_cxx_g = yes; then ++ if test "$GXX" = yes; then ++ CXXFLAGS="-g -O2" ++ else ++ CXXFLAGS="-g" ++ fi ++else ++ if test "$GXX" = yes; then ++ CXXFLAGS="-O2" ++ else ++ CXXFLAGS= ++ fi ++fi ++ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +@@ -5210,8 +6256,8 @@ + + depcc="$CXX" am_compiler_list= + +-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } + if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5249,7 +6295,9 @@ + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c +- : > sub/conftst$i.h ++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with ++ # Solaris 8's {/usr,}/bin/sh. ++ touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + +@@ -5273,13 +6321,19 @@ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && ++ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings +- # (even with -Werror). So we grep stderr for any message +- # that says an option was ignored. +- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else ++ # or remarks (even with -Werror). So we grep stderr for any message ++ # that says an option was ignored or not supported. ++ # When given -MP, icc 7.0 and 7.1 complain thusly: ++ # icc: Command line warning: ignoring option '-M'; no argument required ++ # The diagnosis changed in icc 8.0: ++ # icc: Command line remark: option '-MP' not supported ++ if (grep 'ignoring option' conftest.err || ++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi +@@ -5293,13 +6347,11 @@ + fi + + fi +-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 ++{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 ++echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } + CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + +- +- +-if ++ if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= +@@ -5315,13 +6367,13 @@ + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +- ac_ext=cc ++ ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 ++echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } + if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -5351,24 +6403,22 @@ + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -5377,9 +6427,10 @@ + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -5389,24 +6440,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -5417,6 +6466,7 @@ + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -5434,8 +6484,8 @@ + else + ac_cv_prog_CXXCPP=$CXXCPP + fi +-echo "$as_me:$LINENO: result: $CXXCPP" >&5 +-echo "${ECHO_T}$CXXCPP" >&6 ++{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 ++echo "${ECHO_T}$CXXCPP" >&6; } + ac_preproc_ok=false + for ac_cxx_preproc_warn_flag in '' yes + do +@@ -5458,24 +6508,22 @@ + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -5484,9 +6532,10 @@ + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -5496,24 +6545,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -5524,6 +6571,7 @@ + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -5539,7 +6587,7 @@ + { (exit 1); exit 1; }; } + fi + +-ac_ext=cc ++ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +@@ -5553,12 +6601,12 @@ + ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_f77_compiler_gnu + if test -n "$ac_tool_prefix"; then +- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran ++ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5571,36 +6619,38 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + F77=$ac_cv_prog_F77 + if test -n "$F77"; then +- echo "$as_me:$LINENO: result: $F77" >&5 +-echo "${ECHO_T}$F77" >&6 ++ { echo "$as_me:$LINENO: result: $F77" >&5 ++echo "${ECHO_T}$F77" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$F77" && break + done + fi + if test -z "$F77"; then + ac_ct_F77=$F77 +- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran ++ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5613,48 +6663,78 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_F77=$ac_cv_prog_ac_ct_F77 + if test -n "$ac_ct_F77"; then +- echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +-echo "${ECHO_T}$ac_ct_F77" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 ++echo "${ECHO_T}$ac_ct_F77" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$ac_ct_F77" && break + done + +- F77=$ac_ct_F77 ++ if test "x$ac_ct_F77" = x; then ++ F77="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ F77=$ac_ct_F77 ++ fi + fi + + + # Provide some information about the compiler. +-echo "$as_me:5643:" \ +- "checking for Fortran 77 compiler version" >&5 ++echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +@@ -5664,8 +6744,8 @@ + # input file. (Note that this only needs to work for GNU compilers.) + ac_save_ext=$ac_ext + ac_ext=F +-echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } + if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5678,46 +6758,42 @@ + end + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_f77_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } + ac_ext=$ac_save_ext + ac_test_FFLAGS=${FFLAGS+set} + ac_save_FFLAGS=$FFLAGS + FFLAGS= +-echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 ++echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } + if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5728,39 +6804,35 @@ + end + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_f77_g=no ++ ac_cv_prog_f77_g=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } + if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS + elif test $ac_cv_prog_f77_g = yes; then +@@ -5787,10 +6859,9 @@ + + + # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +- + # find the maximum length of command line arguments +-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 ++echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } + if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5874,43 +6945,47 @@ + fi + ;; + *) +- # If test is not a shell built-in, we'll probably end up computing a +- # maximum length that is only half of the actual maximum length, but +- # we can't tell. +- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} +- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ ++ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` ++ if test -n "$lt_cv_sys_max_cmd_len"; then ++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` ++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ++ else ++ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} ++ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && +- new_result=`expr "X$teststring" : ".*" 2>&1` && +- lt_cv_sys_max_cmd_len=$new_result && +- test $i != 17 # 1/2 MB should be enough +- do +- i=`expr $i + 1` +- teststring=$teststring$teststring +- done +- teststring= +- # Add a significant safety factor because C++ compilers can tack on massive +- # amounts of additional arguments before passing them to the linker. +- # It appears as though 1/2 is a usable value. +- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ++ new_result=`expr "X$teststring" : ".*" 2>&1` && ++ lt_cv_sys_max_cmd_len=$new_result && ++ test $i != 17 # 1/2 MB should be enough ++ do ++ i=`expr $i + 1` ++ teststring=$teststring$teststring ++ done ++ teststring= ++ # Add a significant safety factor because C++ compilers can tack on massive ++ # amounts of additional arguments before passing them to the linker. ++ # It appears as though 1/2 is a usable value. ++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ++ fi + ;; + esac + + fi + + if test -n $lt_cv_sys_max_cmd_len ; then +- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 ++ { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 ++echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } + else +- echo "$as_me:$LINENO: result: none" >&5 +-echo "${ECHO_T}none" >&6 ++ { echo "$as_me:$LINENO: result: none" >&5 ++echo "${ECHO_T}none" >&6; } + fi + + + + ++ + # Check for command to grab the raw symbol name followed by C symbol from nm. +-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 ++echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } + if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5945,7 +7020,7 @@ + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +-linux*) ++linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +@@ -6098,7 +7173,7 @@ + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi +- rm -f conftest* conftst* ++ rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then +@@ -6114,15 +7189,15 @@ + lt_cv_sys_global_symbol_to_cdecl= + fi + if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then +- echo "$as_me:$LINENO: result: failed" >&5 +-echo "${ECHO_T}failed" >&6 ++ { echo "$as_me:$LINENO: result: failed" >&5 ++echo "${ECHO_T}failed" >&6; } + else +- echo "$as_me:$LINENO: result: ok" >&5 +-echo "${ECHO_T}ok" >&6 ++ { echo "$as_me:$LINENO: result: ok" >&5 ++echo "${ECHO_T}ok" >&6; } + fi + +-echo "$as_me:$LINENO: checking for objdir" >&5 +-echo $ECHO_N "checking for objdir... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for objdir" >&5 ++echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } + if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6136,8 +7211,8 @@ + fi + rmdir .libs 2>/dev/null + fi +-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +-echo "${ECHO_T}$lt_cv_objdir" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 ++echo "${ECHO_T}$lt_cv_objdir" >&6; } + objdir=$lt_cv_objdir + + +@@ -6188,8 +7263,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6202,32 +7277,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AR=$ac_cv_prog_AR + if test -n "$AR"; then +- echo "$as_me:$LINENO: result: $AR" >&5 +-echo "${ECHO_T}$AR" >&6 ++ { echo "$as_me:$LINENO: result: $AR" >&5 ++echo "${ECHO_T}$AR" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6240,27 +7317,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" + fi + fi + ac_ct_AR=$ac_cv_prog_ac_ct_AR + if test -n "$ac_ct_AR"; then +- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +-echo "${ECHO_T}$ac_ct_AR" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 ++echo "${ECHO_T}$ac_ct_AR" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- AR=$ac_ct_AR ++ if test "x$ac_ct_AR" = x; then ++ AR="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ AR=$ac_ct_AR ++ fi + else + AR="$ac_cv_prog_AR" + fi +@@ -6268,8 +7359,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6282,32 +7373,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then +- echo "$as_me:$LINENO: result: $RANLIB" >&5 +-echo "${ECHO_T}$RANLIB" >&6 ++ { echo "$as_me:$LINENO: result: $RANLIB" >&5 ++echo "${ECHO_T}$RANLIB" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6320,27 +7413,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" + fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then +- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +-echo "${ECHO_T}$ac_ct_RANLIB" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ++echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- RANLIB=$ac_ct_RANLIB ++ if test "x$ac_ct_RANLIB" = x; then ++ RANLIB=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ RANLIB=$ac_ct_RANLIB ++ fi + else + RANLIB="$ac_cv_prog_RANLIB" + fi +@@ -6348,8 +7455,8 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6362,32 +7469,34 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6 ++ { echo "$as_me:$LINENO: result: $STRIP" >&5 ++echo "${ECHO_T}$STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6400,27 +7509,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++echo "${ECHO_T}$ac_ct_STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- STRIP=$ac_ct_STRIP ++ if test "x$ac_ct_STRIP" = x; then ++ STRIP=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ STRIP=$ac_ct_STRIP ++ fi + else + STRIP="$ac_cv_prog_STRIP" + fi +@@ -6448,7 +7571,7 @@ + test -z "$ac_objext" && ac_objext=o + + # Determine commands to create old-style static archives. +-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' ++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + +@@ -6479,8 +7602,8 @@ + case $deplibs_check_method in + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then +- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 ++echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6532,17 +7655,17 @@ + + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then +- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +-echo "${ECHO_T}$MAGIC_CMD" >&6 ++ { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ++echo "${ECHO_T}$MAGIC_CMD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then +- echo "$as_me:$LINENO: checking for file" >&5 +-echo $ECHO_N "checking for file... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for file" >&5 ++echo $ECHO_N "checking for file... $ECHO_C" >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -6594,11 +7717,11 @@ + + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then +- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +-echo "${ECHO_T}$MAGIC_CMD" >&6 ++ { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ++echo "${ECHO_T}$MAGIC_CMD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + + else +@@ -6610,86 +7733,337 @@ + ;; + esac + +-enable_dlopen=no +-enable_win32_dll=yes +- +-# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +-if test "${enable_libtool_lock+set}" = set; then +- enableval="$enable_libtool_lock" +- +-fi; +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +- + +-# Check whether --with-pic or --without-pic was given. +-if test "${with_pic+set}" = set; then +- withval="$with_pic" +- pic_mode="$withval" ++ case $host_os in ++ rhapsody* | darwin*) ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_DSYMUTIL+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- pic_mode=default +-fi; +-test -z "$pic_mode" && pic_mode=default ++ if test -n "$DSYMUTIL"; then ++ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS + +-# Check if we have a version mismatch between libtool.m4 and ltmain.sh. +-# +-# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. +-# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually +-# calls AC_LIBTOOL_CONFIG and creates libtool. +-# +-echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5 +-echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6 +-if test "x$ltmain" = "x" ; then +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- { { echo "$as_me:$LINENO: error: ++fi ++fi ++DSYMUTIL=$ac_cv_prog_DSYMUTIL ++if test -n "$DSYMUTIL"; then ++ { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 ++echo "${ECHO_T}$DSYMUTIL" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi + +-*** [Gentoo] sanity check failed! *** +-*** \$ltmain is not defined, please check the patch for consistency! *** +-" >&5 +-echo "$as_me: error: + +-*** [Gentoo] sanity check failed! *** +-*** \$ltmain is not defined, please check the patch for consistency! *** +-" >&2;} +- { (exit 1); exit 1; }; } + fi +-gentoo_lt_version="1.5.22" +-gentoo_ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' "$ltmain"` +-if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- { { echo "$as_me:$LINENO: error: +- +-*** [Gentoo] sanity check failed! *** +-*** libtool.m4 and ltmain.sh have a version mismatch! *** +-*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** ++if test -z "$ac_cv_prog_DSYMUTIL"; then ++ ac_ct_DSYMUTIL=$DSYMUTIL ++ # Extract the first word of "dsymutil", so it can be a program name with args. ++set dummy dsymutil; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_DSYMUTIL"; then ++ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS + +-Please run: ++fi ++fi ++ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL ++if test -n "$ac_ct_DSYMUTIL"; then ++ { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 ++echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi + +- libtoolize --copy --force ++ if test "x$ac_ct_DSYMUTIL" = x; then ++ DSYMUTIL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ DSYMUTIL=$ac_ct_DSYMUTIL ++ fi ++else ++ DSYMUTIL="$ac_cv_prog_DSYMUTIL" ++fi + +-if appropriate, please contact the maintainer of this +-package (or your distribution) for help. +-" >&5 +-echo "$as_me: error: ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. ++set dummy ${ac_tool_prefix}nmedit; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_NMEDIT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$NMEDIT"; then ++ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS ++ ++fi ++fi ++NMEDIT=$ac_cv_prog_NMEDIT ++if test -n "$NMEDIT"; then ++ { echo "$as_me:$LINENO: result: $NMEDIT" >&5 ++echo "${ECHO_T}$NMEDIT" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi + +-*** [Gentoo] sanity check failed! *** +-*** libtool.m4 and ltmain.sh have a version mismatch! *** +-*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** + +-Please run: ++fi ++if test -z "$ac_cv_prog_NMEDIT"; then ++ ac_ct_NMEDIT=$NMEDIT ++ # Extract the first word of "nmedit", so it can be a program name with args. ++set dummy nmedit; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_NMEDIT"; then ++ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_NMEDIT="nmedit" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS + +- libtoolize --copy --force ++fi ++fi ++ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT ++if test -n "$ac_ct_NMEDIT"; then ++ { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 ++echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi + +-if appropriate, please contact the maintainer of this +-package (or your distribution) for help. +-" >&2;} +- { (exit 1); exit 1; }; } ++ if test "x$ac_ct_NMEDIT" = x; then ++ NMEDIT=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ NMEDIT=$ac_ct_NMEDIT ++ fi ++else ++ NMEDIT="$ac_cv_prog_NMEDIT" ++fi ++ ++ ++ { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 ++echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } ++if test "${lt_cv_apple_cc_single_mod+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_apple_cc_single_mod=no ++ if test -z "${LT_MULTI_MODULE}"; then ++ # By default we will add the -single_module flag. You can override ++ # by either setting the environment variable LT_MULTI_MODULE ++ # non-empty at configure time, or by adding -multi_module to the ++ # link flags. ++ echo "int foo(void){return 1;}" > conftest.c ++ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ ++ -dynamiclib ${wl}-single_module conftest.c ++ if test -f libconftest.dylib; then ++ lt_cv_apple_cc_single_mod=yes ++ rm -rf libconftest.dylib* ++ fi ++ rm conftest.c ++ fi ++fi ++{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 ++echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } ++ { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 ++echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } ++if test "${lt_cv_ld_exported_symbols_list+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_ld_exported_symbols_list=no ++ save_LDFLAGS=$LDFLAGS ++ echo "_main" > conftest.sym ++ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ lt_cv_ld_exported_symbols_list=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ lt_cv_ld_exported_symbols_list=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++ LDFLAGS="$save_LDFLAGS" ++ ++fi ++{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 ++echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } ++ case $host_os in ++ rhapsody* | darwin1.[0123]) ++ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; ++ darwin1.*) ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; ++ darwin*) ++ # if running on 10.5 or later, the deployment target defaults ++ # to the OS version, if on x86, and 10.4, the deployment ++ # target defaults to 10.4. Don't you love it? ++ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in ++ 10.0,*86*-darwin8*|10.0,*-darwin[91]*) ++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ 10.[012]*) ++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; ++ 10.*) ++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ esac ++ ;; ++ esac ++ if test "$lt_cv_apple_cc_single_mod" = "yes"; then ++ _lt_dar_single_mod='$single_module' ++ fi ++ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then ++ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' ++ else ++ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" ++ fi ++ if test "$DSYMUTIL" != ":"; then ++ _lt_dsymutil="~$DSYMUTIL \$lib || :" ++ else ++ _lt_dsymutil= ++ fi ++ ;; ++ esac ++ ++ ++enable_dlopen=no ++enable_win32_dll=yes ++ ++# Check whether --enable-libtool-lock was given. ++if test "${enable_libtool_lock+set}" = set; then ++ enableval=$enable_libtool_lock; ++fi ++ ++test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ++ ++ ++# Check whether --with-pic was given. ++if test "${with_pic+set}" = set; then ++ withval=$with_pic; pic_mode="$withval" + else +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ pic_mode=default + fi + ++test -z "$pic_mode" && pic_mode=default + + # Use C for the default configuration in the libtool script + tagname= +@@ -6709,10 +8083,10 @@ + objext=$objext + + # Code to be used in simple compile tests +-lt_simple_compile_test_code="int some_variable = 0;\n" ++lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests +-lt_simple_link_test_code='int main(){return(0);}\n' ++lt_simple_link_test_code='int main(){return(0);}' + + + # If no C compiler was specified, use CC. +@@ -6727,16 +8101,16 @@ + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_compile_test_code" >conftest.$ac_ext ++echo "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_link_test_code" >conftest.$ac_ext ++echo "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` +-$rm conftest* ++$rm -r conftest* + + + +@@ -6746,14 +8120,14 @@ + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. +@@ -6764,11 +8138,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:6767: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7835: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:6771: \$? = $ac_status" >&5 ++ echo "$as_me:7839: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -6781,8 +8155,8 @@ + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +@@ -6796,8 +8170,8 @@ + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -6819,13 +8193,15 @@ + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + +- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + +- mingw* | pw32* | os2*) ++ mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). ++ # Although the cygwin gcc ignores -fPIC, still need this for old-style ++ # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + +@@ -6835,7 +8211,7 @@ + lt_prog_compiler_pic='-fno-common' + ;; + +- interix3*) ++ interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; +@@ -6893,7 +8269,7 @@ + esac + ;; + +- mingw* | pw32* | os2*) ++ mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -6926,7 +8302,7 @@ + lt_prog_compiler_static='-Bstatic' + ;; + +- linux*) ++ linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' +@@ -6945,6 +8321,22 @@ + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; ++ *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ # Sun C 5.9 ++ lt_prog_compiler_pic='-KPIC' ++ lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_wl='-Wl,' ++ ;; ++ *Sun\ F*) ++ # Sun Fortran 8.3 passes all unrecognized flags to the linker ++ lt_prog_compiler_pic='-KPIC' ++ lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_wl='' ++ ;; ++ esac ++ ;; + esac + ;; + +@@ -6954,6 +8346,10 @@ + lt_prog_compiler_static='-non_shared' + ;; + ++ rdos*) ++ lt_prog_compiler_static='-non_shared' ++ ;; ++ + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' +@@ -7006,22 +8402,22 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic" >&6 ++{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 ++echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_pic_works+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 ++echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_pic_works=no ++ lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. +@@ -7032,27 +8428,27 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7035: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8125: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7039: \$? = $ac_status" >&5 ++ echo "$as_me:8129: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_pic_works=yes ++ lt_cv_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } + +-if test x"$lt_prog_compiler_pic_works" = xyes; then ++if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; +@@ -7077,15 +8473,15 @@ + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_static_works+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_static_works=no ++ lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" +- printf "$lt_simple_link_test_code" > conftest.$ac_ext ++ echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -7095,28 +8491,28 @@ + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_static_works=yes ++ lt_cv_prog_compiler_static_works=yes + fi + else +- lt_prog_compiler_static_works=yes ++ lt_cv_prog_compiler_static_works=yes + fi + fi +- $rm conftest* ++ $rm -r conftest* + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } + +-if test x"$lt_prog_compiler_static_works" = xyes; then ++if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : + else + lt_prog_compiler_static= + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -7125,7 +8521,7 @@ + mkdir conftest + cd conftest + mkdir out +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or +@@ -7136,11 +8532,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7139: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8229: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:7143: \$? = $ac_status" >&5 ++ echo "$as_me:8233: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -7162,23 +8558,23 @@ + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { echo "$as_me:$LINENO: result: $hard_links" >&5 ++echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} +@@ -7188,8 +8584,8 @@ + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= +@@ -7220,12 +8616,13 @@ + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. +- exclude_expsyms="_GLOBAL_OFFSET_TABLE_" ++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. ++ # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do +@@ -7284,7 +8681,7 @@ + + # See if GNU ld supports shared libraries. + case $host_os in +- aix3* | aix4* | aix5*) ++ aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no +@@ -7332,7 +8729,7 @@ + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -7350,7 +8747,7 @@ + fi + ;; + +- interix3*) ++ interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' +@@ -7365,7 +8762,7 @@ + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + +- linux*) ++ gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in +@@ -7383,13 +8780,22 @@ + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac +- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) # Sun C 5.9 ++ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ++ tmp_sharedflag='-G' ;; ++ *Sun\ F*) # Sun Fortran 8.3 ++ tmp_sharedflag='-G' ;; ++ *) ++ tmp_sharedflag='-shared' ;; ++ esac ++ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' ++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no +@@ -7494,7 +8900,7 @@ + fi + ;; + +- aix4* | aix5*) ++ aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. +@@ -7514,7 +8920,7 @@ + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. +- case $host_os in aix4.[23]|aix4.[23].*|aix5*) ++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes +@@ -7548,7 +8954,7 @@ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 +- hardcode_direct=yes ++ : + else + # We have old collect2 + hardcode_direct=unsupported +@@ -7604,39 +9010,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -7665,39 +9076,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -7743,7 +9159,7 @@ + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; +@@ -7776,19 +9192,18 @@ + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' +- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' +- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' +- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" ++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' +- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' ++ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) +@@ -7828,7 +9243,7 @@ + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. +- freebsd* | kfreebsd*-gnu | dragonfly*) ++ freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes +@@ -7950,24 +9365,28 @@ + ;; + + openbsd*) +- hardcode_direct=yes +- hardcode_shlibpath_var=no +- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' +- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' +- export_dynamic_flag_spec='${wl}-E' ++ if test -f /usr/libexec/ld.so; then ++ hardcode_direct=yes ++ hardcode_shlibpath_var=no ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ export_dynamic_flag_spec='${wl}-E' ++ else ++ case $host_os in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ ;; ++ esac ++ fi + else +- case $host_os in +- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) +- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- hardcode_libdir_flag_spec='-R$libdir' +- ;; +- *) +- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' +- ;; +- esac ++ ld_shlibs=no + fi + ;; + +@@ -8026,17 +9445,16 @@ + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) +- # The compiler driver will combine linker options so we +- # cannot just pass the convience library names through +- # without $wl, iff we do not link with $LD. +- # Luckily, gcc supports the same syntax we need for Sun Studio. ++ # The compiler driver will combine and reorder linker options, ++ # but understands `-z linker_flag'. GCC discards it without `$wl', ++ # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) +- case $wlarc in +- '') +- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; +- *) +- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; +- esac ;; ++ if test "$GCC" = yes; then ++ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ++ else ++ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ++ fi ++ ;; + esac + link_all_deplibs=yes + ;; +@@ -8093,7 +9511,7 @@ + fi + ;; + +- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no +@@ -8146,8 +9564,8 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +-echo "${ECHO_T}$ld_shlibs" >&6 ++{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 ++echo "${ECHO_T}$ld_shlibs" >&6; } + test "$ld_shlibs" = no && can_build_shared=no + + # +@@ -8167,10 +9585,10 @@ + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 +@@ -8205,16 +9623,16 @@ + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc" >&6 ++ { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 ++echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -8228,17 +9646,55 @@ + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" ++ + if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` +- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then ++ case $host_os in ++ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; ++ *) lt_awk_arg="/^libraries:/" ;; ++ esac ++ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` ++ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi ++ # Ok, now we have the path, separated by spaces, we can step through it ++ # and add multilib dir if necessary. ++ lt_tmp_lt_search_path_spec= ++ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ for lt_sys_path in $lt_search_path_spec; do ++ if test -d "$lt_sys_path/$lt_multi_os_dir"; then ++ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" ++ else ++ test -d "$lt_sys_path" && \ ++ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" ++ fi ++ done ++ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' ++BEGIN {RS=" "; FS="/|\n";} { ++ lt_foo=""; ++ lt_count=0; ++ for (lt_i = NF; lt_i > 0; lt_i--) { ++ if ($lt_i != "" && $lt_i != ".") { ++ if ($lt_i == "..") { ++ lt_count++; ++ } else { ++ if (lt_count == 0) { ++ lt_foo="/" $lt_i lt_foo; ++ } else { ++ lt_count--; ++ } ++ } ++ } ++ } ++ if (lt_foo != "") { lt_freq[lt_foo]++; } ++ if (lt_freq[lt_foo] == 1) { print lt_foo; } ++}'` ++ sys_lib_search_path_spec=`echo $lt_search_path_spec` + else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + fi +@@ -8259,7 +9715,7 @@ + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +-aix4* | aix5*) ++aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -8379,30 +9835,6 @@ + esac + ;; + +- linux*) +- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` in +- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 +- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... +- *\ 2.11.*) ;; # other 2.11 versions +- *) supports_anon_versioning=yes ;; +- esac +- if test $supports_anon_versioning = yes; then +- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +-$echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +- else +- $archive_expsym_cmds="$archive_cmds" +- fi +- else +- ld_shlibs=no +- fi +- ;; +- + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; +@@ -8422,12 +9854,8 @@ + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. +- if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` +- else +- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' +- fi ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +@@ -8444,18 +9872,6 @@ + dynamic_linker=no + ;; + +-kfreebsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. +@@ -8467,14 +9883,7 @@ + *) objformat=elf ;; + esac + fi +- # Handle Gentoo/FreeBSD as it was Linux +- case $host_vendor in +- gentoo) +- version_type=linux ;; +- *) +- version_type=freebsd-$objformat ;; +- esac +- ++ version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' +@@ -8485,12 +9894,6 @@ + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; +- linux) +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- need_lib_prefix=no +- need_version=no +- ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in +@@ -8506,7 +9909,7 @@ + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +- freebsd*) # from 4.6 on ++ *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +@@ -8569,7 +9972,7 @@ + postinstall_cmds='chmod 555 $lib' + ;; + +-interix3*) ++interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -8624,7 +10027,7 @@ + ;; + + # This must be Linux ELF. +-linux*) ++linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -8637,11 +10040,13 @@ + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes ++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then +- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -8653,18 +10058,6 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + +-knetbsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -8746,6 +10139,10 @@ + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + ++rdos*) ++ dynamic_linker=no ++ ;; ++ + solaris*) + version_type=linux + need_lib_prefix=no +@@ -8838,17 +10235,32 @@ + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++echo "${ECHO_T}$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + ++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" ++fi ++ ++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" ++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" ++fi ++ ++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" ++ + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ +@@ -8872,8 +10284,8 @@ + # directories. + hardcode_action=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action" >&5 +-echo "${ECHO_T}$hardcode_action" >&6 ++{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 ++echo "${ECHO_T}$hardcode_action" >&6; } + + if test "$hardcode_action" = relink; then + # Fast installation is not supported +@@ -8886,29 +10298,30 @@ + + striplib= + old_striplib= +-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ++echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else + # FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ old_striplib="$STRIP -S" ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ;; + *) +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + ;; + esac + fi +@@ -8940,8 +10353,8 @@ + + darwin*) + # if libdl is installed we need to link against it +- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ++echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -8954,56 +10367,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { +-dlopen (); ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dl_dlopen=no ++ ac_cv_lib_dl_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ++echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else +@@ -9017,8 +10427,8 @@ + ;; + + *) +- echo "$as_me:$LINENO: checking for shl_load" >&5 +-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for shl_load" >&5 ++echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } + if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9045,73 +10455,64 @@ + + #undef shl_load + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char shl_load (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_shl_load) || defined (__stub___shl_load) ++#if defined __stub_shl_load || defined __stub___shl_load + choke me +-#else +-char (*f) () = shl_load; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != shl_load; ++return shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_shl_load=no ++ ac_cv_func_shl_load=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_func_shl_load" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 ++echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } + if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" + else +- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 ++echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9124,61 +10525,58 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char shl_load (); + int + main () + { +-shl_load (); ++return shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dld_shl_load=no ++ ac_cv_lib_dld_shl_load=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 ++echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } + if test $ac_cv_lib_dld_shl_load = yes; then +- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" ++ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + else +- echo "$as_me:$LINENO: checking for dlopen" >&5 +-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dlopen" >&5 ++echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } + if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9205,73 +10603,64 @@ + + #undef dlopen + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_dlopen) || defined (__stub___dlopen) ++#if defined __stub_dlopen || defined __stub___dlopen + choke me +-#else +-char (*f) () = dlopen; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != dlopen; ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_dlopen=no ++ ac_cv_func_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_func_dlopen" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 ++echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } + if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" + else +- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ++echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9284,61 +10673,58 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { +-dlopen (); ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dl_dlopen=no ++ ac_cv_lib_dl_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ++echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else +- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ++echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } + if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9351,61 +10737,58 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { +-dlopen (); ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_svld_dlopen=no ++ ac_cv_lib_svld_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 ++echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else +- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 ++echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } + if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9418,58 +10801,55 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dld_link (); + int + main () + { +-dld_link (); ++return dld_link (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dld_dld_link=no ++ ac_cv_lib_dld_dld_link=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 ++echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } + if test $ac_cv_lib_dld_dld_link = yes; then +- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" ++ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + fi + + +@@ -9507,8 +10887,8 @@ + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + +- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 ++echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } + if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9518,7 +10898,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <&5 +-echo "${ECHO_T}$lt_cv_dlopen_self" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 ++echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" +- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 ++echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } + if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -9618,7 +10998,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <&5 +-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 ++echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" +@@ -9725,13 +11105,13 @@ + + + # Report which library types will actually be built +-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $can_build_shared" >&5 +-echo "${ECHO_T}$can_build_shared" >&6 ++{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ++echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } ++{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 ++echo "${ECHO_T}$can_build_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ++echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -9745,21 +11125,21 @@ + fi + ;; + +-aix4* | aix5*) ++aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac +-echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6 ++{ echo "$as_me:$LINENO: result: $enable_shared" >&5 ++echo "${ECHO_T}$enable_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 ++echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes +-echo "$as_me:$LINENO: result: $enable_static" >&5 +-echo "${ECHO_T}$enable_static" >&6 ++{ echo "$as_me:$LINENO: result: $enable_static" >&5 ++echo "${ECHO_T}$enable_static" >&6; } + + # The else clause should only fire when bootstrapping the + # libtool distribution, otherwise you forgot to ship ltmain.sh +@@ -9801,6 +11181,7 @@ + predeps \ + postdeps \ + compiler_lib_search_path \ ++ compiler_lib_search_dirs \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ +@@ -9816,6 +11197,7 @@ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ ++ fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + +@@ -9860,7 +11242,7 @@ + # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + # Free Software Foundation, Inc. + # + # This file is part of GNU Libtool: +@@ -10096,6 +11478,10 @@ + # shared library. + postdeps=$lt_postdeps + ++# The directories searched by this compiler when creating a shared ++# library ++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs ++ + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path +@@ -10184,7 +11570,7 @@ + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path="$fix_srcfile_path" ++fix_srcfile_path=$lt_fix_srcfile_path + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols +@@ -10251,11 +11637,11 @@ + CC="$lt_save_CC" + + +-# Check whether --with-tags or --without-tags was given. ++# Check whether --with-tags was given. + if test "${with_tags+set}" = set; then +- withval="$with_tags" +- tagnames="$withval" +-fi; ++ withval=$with_tags; tagnames="$withval" ++fi ++ + + if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then +@@ -10309,7 +11695,7 @@ + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +- ac_ext=cc ++ ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +@@ -10344,6 +11730,7 @@ + predeps_CXX= + postdeps_CXX= + compiler_lib_search_path_CXX= ++compiler_lib_search_dirs_CXX= + + # Source file extension for C++ test sources. + ac_ext=cpp +@@ -10353,10 +11740,10 @@ + objext_CXX=$objext + + # Code to be used in simple compile tests +-lt_simple_compile_test_code="int some_variable = 0;\n" ++lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests +-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' ++lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + +@@ -10372,16 +11759,16 @@ + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_compile_test_code" >conftest.$ac_ext ++echo "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_link_test_code" >conftest.$ac_ext ++echo "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` +-$rm conftest* ++$rm -r conftest* + + + # Allow CC to be a program name with arguments. +@@ -10428,18 +11815,18 @@ + # Set up default GNU C++ configuration + + +-# Check whether --with-gnu-ld or --without-gnu-ld was given. ++# Check whether --with-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then +- withval="$with_gnu_ld" +- test "$withval" = no || with_gnu_ld=yes ++ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no +-fi; ++fi ++ + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ++echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -10468,11 +11855,11 @@ + ;; + esac + elif test "$with_gnu_ld" = yes; then +- echo "$as_me:$LINENO: checking for GNU ld" >&5 +-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for GNU ld" >&5 ++echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } + else +- echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -10505,17 +11892,17 @@ + + LD="$lt_cv_path_LD" + if test -n "$LD"; then +- echo "$as_me:$LINENO: result: $LD" >&5 +-echo "${ECHO_T}$LD" >&6 ++ { echo "$as_me:$LINENO: result: $LD" >&5 ++echo "${ECHO_T}$LD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 + echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -10529,8 +11916,8 @@ + ;; + esac + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ++echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +@@ -10580,15 +11967,15 @@ + fi + + # PORTME: fill in a description of your system's C++ link characteristics +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +- aix4* | aix5*) ++ aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. +@@ -10601,7 +11988,7 @@ + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. +- case $host_os in aix4.[23]|aix4.[23].*|aix5*) ++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) +@@ -10637,7 +12024,7 @@ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 +- hardcode_direct_CXX=yes ++ : + else + # We have old collect2 + hardcode_direct_CXX=unsupported +@@ -10693,39 +12080,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -10755,39 +12147,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -10849,59 +12246,31 @@ + fi + ;; + darwin* | rhapsody*) +- case $host_os in +- rhapsody* | darwin1.[012]) +- allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' +- ;; +- *) # Darwin 1.3 on +- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then +- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +- else +- case ${MACOSX_DEPLOYMENT_TARGET} in +- 10.[012]) +- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +- ;; +- 10.*) +- allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' +- ;; +- esac +- fi +- ;; +- esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes +- +- if test "$GXX" = yes ; then +- lt_int_apple_cc_single_mod=no ++ allow_undefined_flag_CXX="$_lt_dar_allow_undefined" ++ if test "$GXX" = yes ; then + output_verbose_link_cmd='echo' +- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then +- lt_int_apple_cc_single_mod=yes ++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" ++ if test "$lt_cv_apple_cc_single_mod" != "yes"; then ++ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" ++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then +- archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' +- else +- archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' +- fi +- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' +- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then +- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- else +- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- fi +- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' +- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' ++ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) +@@ -10935,7 +12304,7 @@ + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; +- freebsd* | kfreebsd*-gnu | dragonfly*) ++ freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes +@@ -10984,9 +12353,7 @@ + hardcode_libdir_separator_CXX=: + + case $host_cpu in +- hppa*64*|ia64*) +- hardcode_libdir_flag_spec_ld_CXX='+b $libdir' +- ;; ++ hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; +@@ -11054,7 +12421,7 @@ + ;; + esac + ;; +- interix3*) ++ interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' +@@ -11094,7 +12461,7 @@ + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; +- linux*) ++ linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler +@@ -11146,7 +12513,7 @@ + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; +- pgCC*) ++ pgCC* | pgcpp*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' +@@ -11174,6 +12541,29 @@ + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; ++ *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ # Sun C++ 5.9 ++ no_undefined_flag_CXX=' -zdefs' ++ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' ++ hardcode_libdir_flag_spec_CXX='-R$libdir' ++ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ++ ++ # Not sure whether something based on ++ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 ++ # would be better. ++ output_verbose_link_cmd='echo' ++ ++ # Archives containing C++ object files must be created using ++ # "CC -xar", where "CC" is the Sun C++ compiler. This is ++ # necessary to make sure instantiated templates are included ++ # in the archive. ++ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ++ ;; ++ esac ++ ;; + esac + ;; + lynxos*) +@@ -11212,16 +12602,20 @@ + ld_shlibs_CXX=no + ;; + openbsd*) +- hardcode_direct_CXX=yes +- hardcode_shlibpath_var_CXX=no +- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' +- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' +- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' +- export_dynamic_flag_spec_CXX='${wl}-E' +- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ++ if test -f /usr/libexec/ld.so; then ++ hardcode_direct_CXX=yes ++ hardcode_shlibpath_var_CXX=no ++ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' ++ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' ++ export_dynamic_flag_spec_CXX='${wl}-E' ++ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ++ fi ++ output_verbose_link_cmd='echo' ++ else ++ ld_shlibs_CXX=no + fi +- output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in +@@ -11383,15 +12777,10 @@ + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) +- # The C++ compiler is used as linker so we must use $wl +- # flag to pass the commands to the underlying system +- # linker. We must also pass each convience library through +- # to the system linker between allextract/defaultextract. +- # The C++ compiler will combine linker options so we +- # cannot just pass the convience library names through +- # without $wl. ++ # The compiler driver will combine and reorder linker options, ++ # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) +- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ++ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes +@@ -11438,6 +12827,12 @@ + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' ++ case $host_os in ++ solaris2.[0-5] | solaris2.[0-5].*) ;; ++ *) ++ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ++ ;; ++ esac + fi + ;; + esac +@@ -11518,14 +12913,13 @@ + ld_shlibs_CXX=no + ;; + esac +-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +-echo "${ECHO_T}$ld_shlibs_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ++echo "${ECHO_T}$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + +- + cat > conftest.$ac_ext <&1 | sed 5q` in ++ *Sun\ C*) ++ # Sun C++ 5.9 ++ # ++ # The more standards-conforming stlport4 library is ++ # incompatible with the Cstd library. Avoid specifying ++ # it if it's in CXXFLAGS. Ignore libCrun as ++ # -library=stlport4 depends on it. ++ case " $CXX $CXXFLAGS " in ++ *" -library=stlport4 "*) ++ solaris_use_stlport4=yes ++ ;; ++ esac ++ if test "$solaris_use_stlport4" != yes; then ++ postdeps_CXX='-library=Cstd -library=Crun' ++ fi ++ ;; ++ esac ++ ;; ++ + solaris*) + case $cc_basename in + CC*) ++ # The more standards-conforming stlport4 library is ++ # incompatible with the Cstd library. Avoid specifying ++ # it if it's in CXXFLAGS. Ignore libCrun as ++ # -library=stlport4 depends on it. ++ case " $CXX $CXXFLAGS " in ++ *" -library=stlport4 "*) ++ solaris_use_stlport4=yes ++ ;; ++ esac ++ + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. +- postdeps_CXX='-lCstd -lCrun' ++ if test "$solaris_use_stlport4" != yes; then ++ postdeps_CXX='-library=Cstd -library=Crun' ++ fi + ;; + esac + ;; + esac + +- + case " $postdeps_CXX " in + *" -lc "*) archive_cmds_need_lc_CXX=no ;; + esac +@@ -11658,8 +13089,8 @@ + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -11680,12 +13111,14 @@ + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; +- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; +- mingw* | os2* | pw32*) ++ mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). ++ # Although the cygwin gcc ignores -fPIC, still need this for old-style ++ # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) +@@ -11697,7 +13130,7 @@ + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; +- interix3*) ++ interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; +@@ -11723,7 +13156,7 @@ + esac + else + case $host_os in +- aix4* | aix5*) ++ aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor +@@ -11763,7 +13196,7 @@ + ;; + esac + ;; +- freebsd* | kfreebsd*-gnu | dragonfly*) ++ freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) +@@ -11806,7 +13239,7 @@ + ;; + esac + ;; +- linux*) ++ linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler +@@ -11819,7 +13252,7 @@ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; +- pgCC*) ++ pgCC* | pgcpp*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' +@@ -11833,6 +13266,14 @@ + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ # Sun C++ 5.9 ++ lt_prog_compiler_pic_CXX='-KPIC' ++ lt_prog_compiler_static_CXX='-Bstatic' ++ lt_prog_compiler_wl_CXX='-Qoption ld ' ++ ;; ++ esac + ;; + esac + ;; +@@ -11932,22 +13373,22 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 ++echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_CXX"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 ++echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_pic_works_CXX=no ++ lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. +@@ -11958,27 +13399,27 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:11961: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13096: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:11965: \$? = $ac_status" >&5 ++ echo "$as_me:13100: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_pic_works_CXX=yes ++ lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then ++if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; +@@ -12003,15 +13444,15 @@ + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_static_works_CXX=no ++ lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" +- printf "$lt_simple_link_test_code" > conftest.$ac_ext ++ echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -12021,28 +13462,28 @@ + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_static_works_CXX=yes ++ lt_cv_prog_compiler_static_works_CXX=yes + fi + else +- lt_prog_compiler_static_works_CXX=yes ++ lt_cv_prog_compiler_static_works_CXX=yes + fi + fi +- $rm conftest* ++ $rm -r conftest* + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } + +-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then ++if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : + else + lt_prog_compiler_static_CXX= + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -12051,7 +13492,7 @@ + mkdir conftest + cd conftest + mkdir out +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or +@@ -12062,11 +13503,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:12065: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13200: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:12069: \$? = $ac_status" >&5 ++ echo "$as_me:13204: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -12088,23 +13529,23 @@ + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { echo "$as_me:$LINENO: result: $hard_links" >&5 ++echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} +@@ -12114,12 +13555,12 @@ + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in +- aix4* | aix5*) ++ aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then +@@ -12132,15 +13573,16 @@ + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) +- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac ++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + +-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +-echo "${ECHO_T}$ld_shlibs_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ++echo "${ECHO_T}$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + # +@@ -12160,10 +13602,10 @@ + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 +@@ -12198,16 +13640,16 @@ + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ++ { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 ++echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -12221,20 +13663,7 @@ + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" +-if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` +- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then +- # if the path contains ";" then we assume it to be the separator +- # otherwise default to the standard path separator (i.e. ":") - it is +- # assumed that no part of a normal pathname contains ";" but that should +- # okay in the real world where ";" in dirpaths is itself problematic. +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` +- else +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` +- fi +-else +- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +-fi ++ + need_lib_prefix=unknown + hardcode_into_libs=no + +@@ -12252,7 +13681,7 @@ + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +-aix4* | aix5*) ++aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -12372,30 +13801,6 @@ + esac + ;; + +- linux*) +- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` in +- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 +- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... +- *\ 2.11.*) ;; # other 2.11 versions +- *) supports_anon_versioning=yes ;; +- esac +- if test $supports_anon_versioning = yes; then +- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +-$echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +- else +- $archive_expsym_cmds="$archive_cmds" +- fi +- else +- ld_shlibs=no +- fi +- ;; +- + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; +@@ -12415,12 +13820,7 @@ + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. +- if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` +- else +- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' +- fi ++ + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +@@ -12437,18 +13837,6 @@ + dynamic_linker=no + ;; + +-kfreebsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. +@@ -12460,14 +13848,7 @@ + *) objformat=elf ;; + esac + fi +- # Handle Gentoo/FreeBSD as it was Linux +- case $host_vendor in +- gentoo) +- version_type=linux ;; +- *) +- version_type=freebsd-$objformat ;; +- esac +- ++ version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' +@@ -12478,12 +13859,6 @@ + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; +- linux) +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- need_lib_prefix=no +- need_version=no +- ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in +@@ -12499,7 +13874,7 @@ + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +- freebsd*) # from 4.6 on ++ *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +@@ -12562,7 +13937,7 @@ + postinstall_cmds='chmod 555 $lib' + ;; + +-interix3*) ++interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -12617,7 +13992,7 @@ + ;; + + # This must be Linux ELF. +-linux*) ++linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -12630,11 +14005,13 @@ + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes ++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then +- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -12646,18 +14023,6 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + +-knetbsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -12739,6 +14104,10 @@ + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + ++rdos*) ++ dynamic_linker=no ++ ;; ++ + solaris*) + version_type=linux + need_lib_prefix=no +@@ -12831,17 +14200,32 @@ + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++echo "${ECHO_T}$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + ++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" ++fi ++ ++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" ++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" ++fi ++ ++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" ++ + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action_CXX= + if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ +@@ -12865,8 +14249,8 @@ + # directories. + hardcode_action_CXX=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +-echo "${ECHO_T}$hardcode_action_CXX" >&6 ++{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 ++echo "${ECHO_T}$hardcode_action_CXX" >&6; } + + if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported +@@ -12918,6 +14302,7 @@ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ ++ compiler_lib_search_dirs_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ +@@ -12933,6 +14318,7 @@ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ ++ fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + +@@ -13165,6 +14551,10 @@ + # shared library. + postdeps=$lt_postdeps_CXX + ++# The directories searched by this compiler when creating a shared ++# library ++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX ++ + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +@@ -13253,7 +14643,7 @@ + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path="$fix_srcfile_path_CXX" ++fix_srcfile_path=$lt_fix_srcfile_path + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_CXX +@@ -13344,10 +14734,17 @@ + objext_F77=$objext + + # Code to be used in simple compile tests +-lt_simple_compile_test_code=" subroutine t\n return\n end\n" ++lt_simple_compile_test_code="\ ++ subroutine t ++ return ++ end ++" + + # Code to be used in simple link tests +-lt_simple_link_test_code=" program t\n end\n" ++lt_simple_link_test_code="\ ++ program t ++ end ++" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + +@@ -13363,16 +14760,16 @@ + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_compile_test_code" >conftest.$ac_ext ++echo "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_link_test_code" >conftest.$ac_ext ++echo "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` +-$rm conftest* ++$rm -r conftest* + + + # Allow CC to be a program name with arguments. +@@ -13391,13 +14788,13 @@ + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $can_build_shared" >&5 +-echo "${ECHO_T}$can_build_shared" >&6 ++{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ++echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } ++{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 ++echo "${ECHO_T}$can_build_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ++echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -13410,21 +14807,21 @@ + postinstall_cmds='$RANLIB $lib' + fi + ;; +-aix4* | aix5*) ++aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac +-echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6 ++{ echo "$as_me:$LINENO: result: $enable_shared" >&5 ++echo "${ECHO_T}$enable_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 ++echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes +-echo "$as_me:$LINENO: result: $enable_static" >&5 +-echo "${ECHO_T}$enable_static" >&6 ++{ echo "$as_me:$LINENO: result: $enable_static" >&5 ++echo "${ECHO_T}$enable_static" >&6; } + + GCC_F77="$G77" + LD_F77="$LD" +@@ -13433,8 +14830,8 @@ + lt_prog_compiler_pic_F77= + lt_prog_compiler_static_F77= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' +@@ -13456,13 +14853,15 @@ + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + +- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + +- mingw* | pw32* | os2*) ++ mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). ++ # Although the cygwin gcc ignores -fPIC, still need this for old-style ++ # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + +@@ -13472,7 +14871,7 @@ + lt_prog_compiler_pic_F77='-fno-common' + ;; + +- interix3*) ++ interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; +@@ -13530,7 +14929,7 @@ + esac + ;; + +- mingw* | pw32* | os2*) ++ mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' +@@ -13563,7 +14962,7 @@ + lt_prog_compiler_static_F77='-Bstatic' + ;; + +- linux*) ++ linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' +@@ -13582,6 +14981,22 @@ + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; ++ *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ # Sun C 5.9 ++ lt_prog_compiler_pic_F77='-KPIC' ++ lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_wl_F77='-Wl,' ++ ;; ++ *Sun\ F*) ++ # Sun Fortran 8.3 passes all unrecognized flags to the linker ++ lt_prog_compiler_pic_F77='-KPIC' ++ lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_wl_F77='' ++ ;; ++ esac ++ ;; + esac + ;; + +@@ -13591,6 +15006,10 @@ + lt_prog_compiler_static_F77='-non_shared' + ;; + ++ rdos*) ++ lt_prog_compiler_static_F77='-non_shared' ++ ;; ++ + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' +@@ -13643,22 +15062,22 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 ++{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 ++echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_F77"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 ++echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_pic_works_F77=no ++ lt_cv_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. +@@ -13669,27 +15088,27 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13672: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:14785: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:13676: \$? = $ac_status" >&5 ++ echo "$as_me:14789: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_pic_works_F77=yes ++ lt_cv_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } + +-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then ++if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; +@@ -13714,15 +15133,15 @@ + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_static_works_F77+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_static_works_F77=no ++ lt_cv_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" +- printf "$lt_simple_link_test_code" > conftest.$ac_ext ++ echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -13732,28 +15151,28 @@ + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_static_works_F77=yes ++ lt_cv_prog_compiler_static_works_F77=yes + fi + else +- lt_prog_compiler_static_works_F77=yes ++ lt_cv_prog_compiler_static_works_F77=yes + fi + fi +- $rm conftest* ++ $rm -r conftest* + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } + +-if test x"$lt_prog_compiler_static_works_F77" = xyes; then ++if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then + : + else + lt_prog_compiler_static_F77= + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -13762,7 +15181,7 @@ + mkdir conftest + cd conftest + mkdir out +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or +@@ -13773,11 +15192,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13776: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:14889: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:13780: \$? = $ac_status" >&5 ++ echo "$as_me:14893: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -13799,23 +15218,23 @@ + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { echo "$as_me:$LINENO: result: $hard_links" >&5 ++echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} +@@ -13825,8 +15244,8 @@ + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= +@@ -13857,12 +15276,13 @@ + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. +- exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" ++ exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. ++ # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do +@@ -13921,7 +15341,7 @@ + + # See if GNU ld supports shared libraries. + case $host_os in +- aix3* | aix4* | aix5*) ++ aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no +@@ -13969,7 +15389,7 @@ + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes +- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -13987,7 +15407,7 @@ + fi + ;; + +- interix3*) ++ interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' +@@ -14002,7 +15422,7 @@ + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + +- linux*) ++ gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in +@@ -14020,13 +15440,22 @@ + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac +- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) # Sun C 5.9 ++ whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ++ tmp_sharedflag='-G' ;; ++ *Sun\ F*) # Sun Fortran 8.3 ++ tmp_sharedflag='-G' ;; ++ *) ++ tmp_sharedflag='-shared' ;; ++ esac ++ archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' ++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no +@@ -14131,7 +15560,7 @@ + fi + ;; + +- aix4* | aix5*) ++ aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. +@@ -14151,7 +15580,7 @@ + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. +- case $host_os in aix4.[23]|aix4.[23].*|aix5*) ++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes +@@ -14185,7 +15614,7 @@ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 +- hardcode_direct_F77=yes ++ : + else + # We have old collect2 + hardcode_direct_F77=unsupported +@@ -14231,39 +15660,44 @@ + end + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -14282,39 +15716,44 @@ + end + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -14360,7 +15799,7 @@ + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. +- old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' ++ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; +@@ -14393,19 +15832,18 @@ + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' +- archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' +- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' +- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" ++ archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' +- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' ++ archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) +@@ -14445,7 +15883,7 @@ + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. +- freebsd* | kfreebsd*-gnu | dragonfly*) ++ freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes +@@ -14567,24 +16005,28 @@ + ;; + + openbsd*) +- hardcode_direct_F77=yes +- hardcode_shlibpath_var_F77=no +- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' +- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' +- export_dynamic_flag_spec_F77='${wl}-E' ++ if test -f /usr/libexec/ld.so; then ++ hardcode_direct_F77=yes ++ hardcode_shlibpath_var_F77=no ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' ++ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ++ export_dynamic_flag_spec_F77='${wl}-E' ++ else ++ case $host_os in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec_F77='-R$libdir' ++ ;; ++ *) ++ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ++ ;; ++ esac ++ fi + else +- case $host_os in +- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) +- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- hardcode_libdir_flag_spec_F77='-R$libdir' +- ;; +- *) +- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' +- ;; +- esac ++ ld_shlibs_F77=no + fi + ;; + +@@ -14643,17 +16085,16 @@ + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) +- # The compiler driver will combine linker options so we +- # cannot just pass the convience library names through +- # without $wl, iff we do not link with $LD. +- # Luckily, gcc supports the same syntax we need for Sun Studio. ++ # The compiler driver will combine and reorder linker options, ++ # but understands `-z linker_flag'. GCC discards it without `$wl', ++ # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) +- case $wlarc in +- '') +- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; +- *) +- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; +- esac ;; ++ if test "$GCC" = yes; then ++ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ++ else ++ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ++ fi ++ ;; + esac + link_all_deplibs_F77=yes + ;; +@@ -14710,7 +16151,7 @@ + fi + ;; + +- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no +@@ -14763,8 +16204,8 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +-echo "${ECHO_T}$ld_shlibs_F77" >&6 ++{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 ++echo "${ECHO_T}$ld_shlibs_F77" >&6; } + test "$ld_shlibs_F77" = no && can_build_shared=no + + # +@@ -14784,10 +16225,10 @@ + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 +@@ -14822,16 +16263,16 @@ + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ++ { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 ++echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -14845,20 +16286,7 @@ + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" +-if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` +- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then +- # if the path contains ";" then we assume it to be the separator +- # otherwise default to the standard path separator (i.e. ":") - it is +- # assumed that no part of a normal pathname contains ";" but that should +- # okay in the real world where ";" in dirpaths is itself problematic. +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` +- else +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` +- fi +-else +- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +-fi ++ + need_lib_prefix=unknown + hardcode_into_libs=no + +@@ -14876,7 +16304,7 @@ + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +-aix4* | aix5*) ++aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -14996,30 +16424,6 @@ + esac + ;; + +- linux*) +- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` in +- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 +- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... +- *\ 2.11.*) ;; # other 2.11 versions +- *) supports_anon_versioning=yes ;; +- esac +- if test $supports_anon_versioning = yes; then +- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +-$echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +- else +- $archive_expsym_cmds="$archive_cmds" +- fi +- else +- ld_shlibs=no +- fi +- ;; +- + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; +@@ -15039,12 +16443,7 @@ + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. +- if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` +- else +- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' +- fi ++ + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +@@ -15061,18 +16460,6 @@ + dynamic_linker=no + ;; + +-kfreebsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. +@@ -15084,14 +16471,7 @@ + *) objformat=elf ;; + esac + fi +- # Handle Gentoo/FreeBSD as it was Linux +- case $host_vendor in +- gentoo) +- version_type=linux ;; +- *) +- version_type=freebsd-$objformat ;; +- esac +- ++ version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' +@@ -15102,12 +16482,6 @@ + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; +- linux) +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- need_lib_prefix=no +- need_version=no +- ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in +@@ -15123,7 +16497,7 @@ + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +- freebsd*) # from 4.6 on ++ *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +@@ -15186,7 +16560,7 @@ + postinstall_cmds='chmod 555 $lib' + ;; + +-interix3*) ++interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15241,7 +16615,7 @@ + ;; + + # This must be Linux ELF. +-linux*) ++linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -15254,11 +16628,13 @@ + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes ++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then +- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -15270,18 +16646,6 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + +-knetbsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -15363,6 +16727,10 @@ + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + ++rdos*) ++ dynamic_linker=no ++ ;; ++ + solaris*) + version_type=linux + need_lib_prefix=no +@@ -15455,17 +16823,32 @@ + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++echo "${ECHO_T}$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + ++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" ++fi ++ ++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" ++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" ++fi ++ ++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" ++ + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action_F77= + if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ +@@ -15489,8 +16872,8 @@ + # directories. + hardcode_action_F77=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +-echo "${ECHO_T}$hardcode_action_F77" >&6 ++{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 ++echo "${ECHO_T}$hardcode_action_F77" >&6; } + + if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported +@@ -15542,6 +16925,7 @@ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ ++ compiler_lib_search_dirs_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ +@@ -15557,6 +16941,7 @@ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ ++ fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + +@@ -15789,6 +17174,10 @@ + # shared library. + postdeps=$lt_postdeps_F77 + ++# The directories searched by this compiler when creating a shared ++# library ++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 ++ + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_F77 +@@ -15877,7 +17266,7 @@ + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path="$fix_srcfile_path_F77" ++fix_srcfile_path=$lt_fix_srcfile_path + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_F77 +@@ -15927,7 +17316,6 @@ + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +- + # Source file extension for Java test sources. + ac_ext=java + +@@ -15936,10 +17324,10 @@ + objext_GCJ=$objext + + # Code to be used in simple compile tests +-lt_simple_compile_test_code="class foo {}\n" ++lt_simple_compile_test_code="class foo {}" + + # Code to be used in simple link tests +-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' ++lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + +@@ -15955,16 +17343,16 @@ + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_compile_test_code" >conftest.$ac_ext ++echo "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_link_test_code" >conftest.$ac_ext ++echo "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` +-$rm conftest* ++$rm -r conftest* + + + # Allow CC to be a program name with arguments. +@@ -15995,14 +17383,14 @@ + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. +@@ -16013,11 +17401,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16016: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17098: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:16020: \$? = $ac_status" >&5 ++ echo "$as_me:17102: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -16030,8 +17418,8 @@ + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +@@ -16045,8 +17433,8 @@ + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_static_GCJ= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' +@@ -16068,14 +17456,16 @@ + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + +- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + +- mingw* | pw32* | os2*) ++ mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). +- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ++ # Although the cygwin gcc ignores -fPIC, still need this for old-style ++ # (--disable-auto-import) libraries ++ + ;; + + darwin* | rhapsody*) +@@ -16084,7 +17474,7 @@ + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + +- interix3*) ++ interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; +@@ -16142,10 +17532,10 @@ + esac + ;; + +- mingw* | pw32* | os2*) ++ mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). +- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ++ + ;; + + hpux9* | hpux10* | hpux11*) +@@ -16175,7 +17565,7 @@ + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + +- linux*) ++ linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' +@@ -16194,6 +17584,22 @@ + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; ++ *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ # Sun C 5.9 ++ lt_prog_compiler_pic_GCJ='-KPIC' ++ lt_prog_compiler_static_GCJ='-Bstatic' ++ lt_prog_compiler_wl_GCJ='-Wl,' ++ ;; ++ *Sun\ F*) ++ # Sun Fortran 8.3 passes all unrecognized flags to the linker ++ lt_prog_compiler_pic_GCJ='-KPIC' ++ lt_prog_compiler_static_GCJ='-Bstatic' ++ lt_prog_compiler_wl_GCJ='' ++ ;; ++ esac ++ ;; + esac + ;; + +@@ -16203,6 +17609,10 @@ + lt_prog_compiler_static_GCJ='-non_shared' + ;; + ++ rdos*) ++ lt_prog_compiler_static_GCJ='-non_shared' ++ ;; ++ + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' +@@ -16255,22 +17665,22 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 ++{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 ++echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_GCJ"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 ++echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_pic_works_GCJ=no ++ lt_cv_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. +@@ -16281,27 +17691,27 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16284: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17388: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:16288: \$? = $ac_status" >&5 ++ echo "$as_me:17392: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_pic_works_GCJ=yes ++ lt_cv_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } + +-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then ++if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; +@@ -16326,15 +17736,15 @@ + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then ++{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- lt_prog_compiler_static_works_GCJ=no ++ lt_cv_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" +- printf "$lt_simple_link_test_code" > conftest.$ac_ext ++ echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings +@@ -16344,28 +17754,28 @@ + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then +- lt_prog_compiler_static_works_GCJ=yes ++ lt_cv_prog_compiler_static_works_GCJ=yes + fi + else +- lt_prog_compiler_static_works_GCJ=yes ++ lt_cv_prog_compiler_static_works_GCJ=yes + fi + fi +- $rm conftest* ++ $rm -r conftest* + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } + +-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then ++if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then + : + else + lt_prog_compiler_static_GCJ= + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -16374,7 +17784,7 @@ + mkdir conftest + cd conftest + mkdir out +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or +@@ -16385,11 +17795,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16388: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17492: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:16392: \$? = $ac_status" >&5 ++ echo "$as_me:17496: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -16411,23 +17821,23 @@ + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 ++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { echo "$as_me:$LINENO: result: $hard_links" >&5 ++echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} +@@ -16437,8 +17847,8 @@ + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= +@@ -16469,12 +17879,13 @@ + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. +- exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" ++ exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. ++ # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do +@@ -16533,7 +17944,7 @@ + + # See if GNU ld supports shared libraries. + case $host_os in +- aix3* | aix4* | aix5*) ++ aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no +@@ -16581,7 +17992,7 @@ + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes +- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -16599,7 +18010,7 @@ + fi + ;; + +- interix3*) ++ interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' +@@ -16614,7 +18025,7 @@ + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + +- linux*) ++ gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in +@@ -16632,13 +18043,22 @@ + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac +- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) # Sun C 5.9 ++ whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ++ tmp_sharedflag='-G' ;; ++ *Sun\ F*) # Sun Fortran 8.3 ++ tmp_sharedflag='-G' ;; ++ *) ++ tmp_sharedflag='-shared' ;; ++ esac ++ archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' ++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no +@@ -16743,7 +18163,7 @@ + fi + ;; + +- aix4* | aix5*) ++ aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. +@@ -16763,7 +18183,7 @@ + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. +- case $host_os in aix4.[23]|aix4.[23].*|aix5*) ++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes +@@ -16797,7 +18217,7 @@ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 +- hardcode_direct_GCJ=yes ++ : + else + # We have old collect2 + hardcode_direct_GCJ=unsupported +@@ -16853,39 +18273,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -16914,39 +18339,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'` ++lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\(.*\)$/\1/ ++ p ++ } ++ }' ++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +-}'`; fi ++if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -16992,7 +18422,7 @@ + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. +- old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' ++ old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; +@@ -17025,19 +18455,18 @@ + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' +- archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' +- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' +- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" ++ module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" ++ archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" ++ module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' +- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' ++ archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ++ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) +@@ -17077,7 +18506,7 @@ + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. +- freebsd* | kfreebsd*-gnu | dragonfly*) ++ freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes +@@ -17199,24 +18628,28 @@ + ;; + + openbsd*) +- hardcode_direct_GCJ=yes +- hardcode_shlibpath_var_GCJ=no +- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' +- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' +- export_dynamic_flag_spec_GCJ='${wl}-E' ++ if test -f /usr/libexec/ld.so; then ++ hardcode_direct_GCJ=yes ++ hardcode_shlibpath_var_GCJ=no ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' ++ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ++ export_dynamic_flag_spec_GCJ='${wl}-E' ++ else ++ case $host_os in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec_GCJ='-R$libdir' ++ ;; ++ *) ++ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ++ ;; ++ esac ++ fi + else +- case $host_os in +- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) +- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- hardcode_libdir_flag_spec_GCJ='-R$libdir' +- ;; +- *) +- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' +- ;; +- esac ++ ld_shlibs_GCJ=no + fi + ;; + +@@ -17275,17 +18708,16 @@ + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) +- # The compiler driver will combine linker options so we +- # cannot just pass the convience library names through +- # without $wl, iff we do not link with $LD. +- # Luckily, gcc supports the same syntax we need for Sun Studio. ++ # The compiler driver will combine and reorder linker options, ++ # but understands `-z linker_flag'. GCC discards it without `$wl', ++ # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) +- case $wlarc in +- '') +- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; +- *) +- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; +- esac ;; ++ if test "$GCC" = yes; then ++ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ++ else ++ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ++ fi ++ ;; + esac + link_all_deplibs_GCJ=yes + ;; +@@ -17342,7 +18774,7 @@ + fi + ;; + +- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no +@@ -17395,8 +18827,8 @@ + esac + fi + +-echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +-echo "${ECHO_T}$ld_shlibs_GCJ" >&6 ++{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 ++echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } + test "$ld_shlibs_GCJ" = no && can_build_shared=no + + # +@@ -17416,10 +18848,10 @@ + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* +- printf "$lt_simple_compile_test_code" > conftest.$ac_ext ++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 +@@ -17454,16 +18886,16 @@ + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ++ { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 ++echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -17477,20 +18909,7 @@ + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" +-if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` +- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then +- # if the path contains ";" then we assume it to be the separator +- # otherwise default to the standard path separator (i.e. ":") - it is +- # assumed that no part of a normal pathname contains ";" but that should +- # okay in the real world where ";" in dirpaths is itself problematic. +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` +- else +- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` +- fi +-else +- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +-fi ++ + need_lib_prefix=unknown + hardcode_into_libs=no + +@@ -17508,7 +18927,7 @@ + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +-aix4* | aix5*) ++aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -17628,30 +19047,6 @@ + esac + ;; + +- linux*) +- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` in +- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 +- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... +- *\ 2.11.*) ;; # other 2.11 versions +- *) supports_anon_versioning=yes ;; +- esac +- if test $supports_anon_versioning = yes; then +- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +-$echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +- else +- $archive_expsym_cmds="$archive_cmds" +- fi +- else +- ld_shlibs=no +- fi +- ;; +- + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; +@@ -17671,12 +19066,7 @@ + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. +- if test "$GCC" = yes; then +- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` +- else +- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' +- fi ++ + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +@@ -17693,18 +19083,6 @@ + dynamic_linker=no + ;; + +-kfreebsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. +@@ -17716,14 +19094,7 @@ + *) objformat=elf ;; + esac + fi +- # Handle Gentoo/FreeBSD as it was Linux +- case $host_vendor in +- gentoo) +- version_type=linux ;; +- *) +- version_type=freebsd-$objformat ;; +- esac +- ++ version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' +@@ -17734,12 +19105,6 @@ + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; +- linux) +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- need_lib_prefix=no +- need_version=no +- ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in +@@ -17755,7 +19120,7 @@ + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +- freebsd*) # from 4.6 on ++ *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +@@ -17818,7 +19183,7 @@ + postinstall_cmds='chmod 555 $lib' + ;; + +-interix3*) ++interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -17873,7 +19238,7 @@ + ;; + + # This must be Linux ELF. +-linux*) ++linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no +@@ -17886,11 +19251,13 @@ + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes ++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then +- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -17902,18 +19269,6 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + +-knetbsd*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='GNU ld.so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -17995,6 +19350,10 @@ + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + ++rdos*) ++ dynamic_linker=no ++ ;; ++ + solaris*) + version_type=linux + need_lib_prefix=no +@@ -18087,17 +19446,32 @@ + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++echo "${ECHO_T}$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + ++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" ++fi ++ ++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" ++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" ++fi ++ ++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" ++ + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action_GCJ= + if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ +@@ -18121,8 +19495,8 @@ + # directories. + hardcode_action_GCJ=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +-echo "${ECHO_T}$hardcode_action_GCJ" >&6 ++{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 ++echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + + if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported +@@ -18174,6 +19548,7 @@ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ ++ compiler_lib_search_dirs_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ +@@ -18189,6 +19564,7 @@ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ ++ fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + +@@ -18421,6 +19797,10 @@ + # shared library. + postdeps=$lt_postdeps_GCJ + ++# The directories searched by this compiler when creating a shared ++# library ++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ ++ + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ +@@ -18509,7 +19889,7 @@ + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path="$fix_srcfile_path_GCJ" ++fix_srcfile_path=$lt_fix_srcfile_path + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_GCJ +@@ -18558,7 +19938,6 @@ + RC) + + +- + # Source file extension for RC test sources. + ac_ext=rc + +@@ -18567,7 +19946,7 @@ + objext_RC=$objext + + # Code to be used in simple compile tests +-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' ++lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + + # Code to be used in simple link tests + lt_simple_link_test_code="$lt_simple_compile_test_code" +@@ -18586,16 +19965,16 @@ + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_compile_test_code" >conftest.$ac_ext ++echo "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext +-printf "$lt_simple_link_test_code" >conftest.$ac_ext ++echo "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` +-$rm conftest* ++$rm -r conftest* + + + # Allow CC to be a program name with arguments. +@@ -18655,6 +20034,7 @@ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ ++ compiler_lib_search_dirs_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ +@@ -18670,6 +20050,7 @@ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ ++ fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + +@@ -18902,6 +20283,10 @@ + # shared library. + postdeps=$lt_postdeps_RC + ++# The directories searched by this compiler when creating a shared ++# library ++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC ++ + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_RC +@@ -18990,7 +20375,7 @@ + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path="$fix_srcfile_path_RC" ++fix_srcfile_path=$lt_fix_srcfile_path + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_RC +@@ -19091,8 +20476,8 @@ + + + platform_win32=no +-echo "$as_me:$LINENO: checking for some Win32 platform" >&5 +-echo $ECHO_N "checking for some Win32 platform... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for some Win32 platform" >&5 ++echo $ECHO_N "checking for some Win32 platform... $ECHO_C" >&6; } + case "$host_os" in + *mingw*|*cygwin*) + platform_win32=yes +@@ -19100,11 +20485,9 @@ + *) + ;; + esac +-echo "$as_me:$LINENO: result: $platform_win32" >&5 +-echo "${ECHO_T}$platform_win32" >&6 +- +- +-if test "x$platform_win32" = "xyes"; then ++{ echo "$as_me:$LINENO: result: $platform_win32" >&5 ++echo "${ECHO_T}$platform_win32" >&6; } ++ if test "x$platform_win32" = "xyes"; then + PLATFORM_WIN32_TRUE= + PLATFORM_WIN32_FALSE='#' + else +@@ -19115,8 +20498,8 @@ + + os_win32=no + MATH_LIB=-lm +-echo "$as_me:$LINENO: checking for native Win32" >&5 +-echo $ECHO_N "checking for native Win32... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for native Win32" >&5 ++echo $ECHO_N "checking for native Win32... $ECHO_C" >&6; } + case "$host_os" in + *mingw*) + os_win32=yes +@@ -19125,11 +20508,9 @@ + *) + ;; + esac +-echo "$as_me:$LINENO: result: $os_win32" >&5 +-echo "${ECHO_T}$os_win32" >&6 +- +- +-if test "x$os_win32" = "xyes"; then ++{ echo "$as_me:$LINENO: result: $os_win32" >&5 ++echo "${ECHO_T}$os_win32" >&6; } ++ if test "x$os_win32" = "xyes"; then + OS_WIN32_TRUE= + OS_WIN32_FALSE='#' + else +@@ -19142,8 +20523,8 @@ + if test "x$os_win32" = "xyes"; then + # Extract the first word of "lib.exe", so it can be a program name with args. + set dummy lib.exe; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ms_librarian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -19156,30 +20537,30 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ms_librarian="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + test -z "$ac_cv_prog_ms_librarian" && ac_cv_prog_ms_librarian="no" + fi + fi + ms_librarian=$ac_cv_prog_ms_librarian + if test -n "$ms_librarian"; then +- echo "$as_me:$LINENO: result: $ms_librarian" >&5 +-echo "${ECHO_T}$ms_librarian" >&6 ++ { echo "$as_me:$LINENO: result: $ms_librarian" >&5 ++echo "${ECHO_T}$ms_librarian" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + + +-if test "x$ms_librarian" = "xyes"; then ++fi ++ if test "x$ms_librarian" = "xyes"; then + MS_LIB_AVAILABLE_TRUE= + MS_LIB_AVAILABLE_FALSE='#' + else +@@ -19192,20 +20573,33 @@ + gdktarget=win32 + else + gdktarget=x11 ++ target=`pkg-config --variable=target gtk+-2.0` ++ if test "$target" = "quartz" ; then ++ gdktarget=quartz ++ fi ++fi ++ ++ if test "x$gdktarget" = "xquartz"; then ++ TARGET_QUARTZ_TRUE= ++ TARGET_QUARTZ_FALSE='#' ++else ++ TARGET_QUARTZ_TRUE='#' ++ TARGET_QUARTZ_FALSE= + fi + + +-# Check whether --with-gdktarget or --without-gdktarget was given. ++ ++# Check whether --with-gdktarget was given. + if test "${with_gdktarget+set}" = set; then +- withval="$with_gdktarget" +- gdktarget=$with_gdktarget +-fi; ++ withval=$with_gdktarget; gdktarget=$with_gdktarget ++fi ++ + + + case $gdktarget in +- x11|win32) ;; +- *) { { echo "$as_me:$LINENO: error: Invalid target for GDK: use x11 or win32." >&5 +-echo "$as_me: error: Invalid target for GDK: use x11 or win32." >&2;} ++ x11|win32|quartz) ;; ++ *) { { echo "$as_me:$LINENO: error: Invalid target for GDK: use x11, quartz or win32." >&5 ++echo "$as_me: error: Invalid target for GDK: use x11, quartz or win32." >&2;} + { (exit 1); exit 1; }; };; + esac + +@@ -19215,76 +20609,570 @@ + + + ++# Checks for programs. ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ++set dummy ${ac_tool_prefix}gcc; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_CC="${ac_tool_prefix}gcc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS + +-# Build time sanity check... +-echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +-# Just in case +-sleep 1 +-echo timestamp > conftest.file +-# Do `set' in a subshell so we don't clobber the current shell's +-# arguments. Must try -L first in case configure is actually a +-# symlink; some systems play weird games with the mod time of symlinks +-# (eg FreeBSD returns the mod time of the symlink's containing +-# directory). +-if ( +- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` +- if test "$*" = "X"; then +- # -L didn't work. +- set X `ls -t $srcdir/configure conftest.file` +- fi +- rm -f conftest.file +- if test "$*" != "X $srcdir/configure conftest.file" \ +- && test "$*" != "X conftest.file $srcdir/configure"; then ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_CC"; then ++ ac_ct_CC=$CC ++ # Extract the first word of "gcc", so it can be a program name with args. ++set dummy gcc; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_CC="gcc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi ++ ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi ++else ++ CC="$ac_cv_prog_CC" ++fi ++ ++if test -z "$CC"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ++set dummy ${ac_tool_prefix}cc; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_CC="${ac_tool_prefix}cc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS ++ ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi ++ ++ ++ fi ++fi ++if test -z "$CC"; then ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ ac_prog_rejected=no ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS ++ ++if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# != 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" ++ fi ++fi ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi ++ ++ ++fi ++if test -z "$CC"; then ++ if test -n "$ac_tool_prefix"; then ++ for ac_prog in cl.exe ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS ++ ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi ++ ++ ++ test -n "$CC" && break ++ done ++fi ++if test -z "$CC"; then ++ ac_ct_CC=$CC ++ for ac_prog in cl.exe ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_CC="$ac_prog" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6; } ++else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++fi ++ ++ ++ test -n "$ac_ct_CC" && break ++done ++ ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi ++fi ++ ++fi ++ ++ ++test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ++See \`config.log' for more details." >&5 ++echo "$as_me: error: no acceptable C compiler found in \$PATH ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ++ ++# Provide some information about the compiler. ++echo "$as_me:$LINENO: checking for C compiler version" >&5 ++ac_compiler=`set X $ac_compile; echo $2` ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++ ++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } ++if test "${ac_cv_c_compiler_gnu+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++#ifndef __GNUC__ ++ choke me ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_compiler_gnu=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_compiler_gnu=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ac_cv_c_compiler_gnu=$ac_compiler_gnu ++ ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } ++GCC=`test $ac_compiler_gnu = yes && echo yes` ++ac_test_CFLAGS=${CFLAGS+set} ++ac_save_CFLAGS=$CFLAGS ++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } ++if test "${ac_cv_prog_cc_g+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_save_c_werror_flag=$ac_c_werror_flag ++ ac_c_werror_flag=yes ++ ac_cv_prog_cc_g=no ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_g=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ CFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_c_werror_flag=$ac_save_c_werror_flag ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_g=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + +- # If neither matched, then we have a broken ls. This can happen +- # if, for instance, CONFIG_SHELL is bash and it inherits a +- # broken ls alias from the environment. This has actually +- # happened. Such a system could not be considered "sane". +- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +-alias in your environment" >&5 +-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +-alias in your environment" >&2;} +- { (exit 1); exit 1; }; } +- fi + +- test "$2" = conftest.file +- ) +-then +- # Ok. +- : +-else +- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +-Check your system clock" >&5 +-echo "$as_me: error: newly created file is older than distributed files! +-Check your system clock" >&2;} +- { (exit 1); exit 1; }; } + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +- +-# Checks for programs. + ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi + ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi + +-echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 +-echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 +-if test "${am_cv_prog_cc_stdc+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_c_werror_flag=$ac_save_c_werror_flag ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS=$ac_save_CFLAGS ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-g" ++ fi ++else ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi ++fi ++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- am_cv_prog_cc_stdc=no +-ac_save_CC="$CC" +-# Don't try gcc -ansi; that turns off useful extensions and +-# breaks some systems' header files. +-# AIX -qlanglvl=ansi +-# Ultrix and OSF/1 -std1 +-# HP-UX 10.20 and later -Ae +-# HP-UX older versions -Aa -D_HPUX_SOURCE +-# SVR4 -Xc -D__EXTENSIONS__ +-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +-do +- CC="$ac_save_CC $ac_arg" +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_prog_cc_c89=no ++ac_save_CC=$CC ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -19312,266 +21200,224 @@ + va_end (v); + return s; + } ++ ++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has ++ function prototypes and stuff, but not '\xHH' hex character constants. ++ These don't provoke an error unfortunately, instead are silently treated ++ as 'x'. The following induces an error, until -std is added to get ++ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an ++ array size at least. It's necessary to write '\x00'==0 to get something ++ that's true only with -std. */ ++int osf4_cc_array ['\x00' == 0 ? 1 : -1]; ++ ++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters ++ inside strings and character constants. */ ++#define FOO(x) 'x' ++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; ++ + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; + int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); + int argc; + char **argv; +- + int + main () + { +- + return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; +- + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ ++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ++do ++ CC="$ac_save_CC $ac_arg" ++ rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- am_cv_prog_cc_stdc="$ac_arg"; break ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_c89=$ac_arg + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-CC="$ac_save_CC" +- +-fi + +-if test -z "$am_cv_prog_cc_stdc"; then +- echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6 +-else +- echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 +-echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 + fi +-case "x$am_cv_prog_cc_stdc" in +- x|xno) ;; +- *) CC="$CC $am_cv_prog_cc_stdc" ;; +-esac + +-# Find a good install program. We prefer a C program (faster), +-# so one script is as good as another. But avoid the broken or +-# incompatible versions: +-# SysV /etc/install, /usr/sbin/install +-# SunOS /usr/etc/install +-# IRIX /sbin/install +-# AIX /bin/install +-# AmigaOS /C/install, which installs bootblocks on floppy discs +-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +-# AFS /usr/afsws/bin/install, which mishandles nonexistent args +-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +-# OS/2's system install, which has a completely different semantic +-# ./install, which can be erroneously created by make from ./install.sh. +-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +-if test -z "$INSTALL"; then +-if test "${ac_cv_path_install+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- # Account for people who put trailing slashes in PATH elements. +-case $as_dir/ in +- ./ | .// | /cC/* | \ +- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ +- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ +- /usr/ucb/* ) ;; +- *) +- # OSF1 and SCO ODT 3.0 have their own names for install. +- # Don't use installbsd from OSF since it installs stuff as root +- # by default. +- for ac_prog in ginstall scoinst install; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then +- if test $ac_prog = install && +- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then +- # AIX install. It has an incompatible calling convention. +- : +- elif test $ac_prog = install && +- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then +- # program-specific install script used by HP pwplus--don't use. +- : +- else +- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" +- break 3 +- fi +- fi +- done +- done +- ;; +-esac ++rm -f core conftest.err conftest.$ac_objext ++ test "x$ac_cv_prog_cc_c89" != "xno" && break + done ++rm -f conftest.$ac_ext ++CC=$ac_save_CC + +- +-fi +- if test "${ac_cv_path_install+set}" = set; then +- INSTALL=$ac_cv_path_install +- else +- # As a last resort, use the slow shell script. We don't cache a +- # path for INSTALL within a source directory, because that will +- # break other packages using the cache if that directory is +- # removed, or if the path is relative. +- INSTALL=$ac_install_sh +- fi + fi +-echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6 ++# AC_CACHE_VAL ++case "x$ac_cv_prog_cc_c89" in ++ x) ++ { echo "$as_me:$LINENO: result: none needed" >&5 ++echo "${ECHO_T}none needed" >&6; } ;; ++ xno) ++ { echo "$as_me:$LINENO: result: unsupported" >&5 ++echo "${ECHO_T}unsupported" >&6; } ;; ++ *) ++ CC="$CC $ac_cv_prog_cc_c89" ++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; ++esac + +-# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +-# It thinks the first close brace ends the variable substitution. +-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu + +-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ++depcc="$CC" am_compiler_list= + +-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } ++if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat >conftest.make <<\_ACEOF +-all: +- @echo 'ac_maketemp="$(MAKE)"' +-_ACEOF +-# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +-if test -n "$ac_maketemp"; then +- eval ac_cv_prog_make_${ac_make}_set=yes +-else +- eval ac_cv_prog_make_${ac_make}_set=no +-fi +-rm -f conftest.make +-fi +-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +- SET_MAKE= +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- SET_MAKE="MAKE=${MAKE-make}" +-fi +- +-echo "$as_me:$LINENO: checking whether ln -s works" >&5 +-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +-LN_S=$as_ln_s +-if test "$LN_S" = "ln -s"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +-else +- echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +-echo "${ECHO_T}no, using $LN_S" >&6 +-fi ++ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ++ # We make a subdir and do the tests there. Otherwise we can end up ++ # making bogus files that we don't know about and never remove. For ++ # instance it was reported that on HP-UX the gcc test will end up ++ # making a dummy file named `D' -- because `-MD' means `put the output ++ # in D'. ++ mkdir conftest.dir ++ # Copy depcomp to subdir because otherwise we won't find it if we're ++ # using a relative directory. ++ cp "$am_depcomp" conftest.dir ++ cd conftest.dir ++ # We will build objects and dependencies in a subdirectory because ++ # it helps to detect inapplicable dependency modes. For instance ++ # both Tru64's cc and ICC support -MD to output dependencies as a ++ # side effect of compilation, but ICC will put the dependencies in ++ # the current directory while Tru64 will put them in the object ++ # directory. ++ mkdir sub + +-for ac_prog in gawk mawk nawk awk +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_prog_AWK+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- if test -n "$AWK"; then +- ac_cv_prog_AWK="$AWK" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AWK="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 ++ am_cv_CC_dependencies_compiler_type=none ++ if test "$am_compiler_list" = ""; then ++ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi +-done +-done ++ for depmode in $am_compiler_list; do ++ # Setup a source with many dependencies, because some compilers ++ # like to wrap large dependency lists on column 80 (with \), and ++ # we should not choose a depcomp mode which is confused by this. ++ # ++ # We need to recreate these files for each test, as the compiler may ++ # overwrite some of them when testing with obscure command lines. ++ # This happens at least with the AIX C compiler. ++ : > sub/conftest.c ++ for i in 1 2 3 4 5 6; do ++ echo '#include "conftst'$i'.h"' >> sub/conftest.c ++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with ++ # Solaris 8's {/usr,}/bin/sh. ++ touch sub/conftst$i.h ++ done ++ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + ++ case $depmode in ++ nosideeffect) ++ # after this tag, mechanisms are not by side-effect, so they'll ++ # only be used when explicitly requested ++ if test "x$enable_dependency_tracking" = xyes; then ++ continue ++ else ++ break ++ fi ++ ;; ++ none) break ;; ++ esac ++ # We check with `-c' and `-o' for the sake of the "dashmstdout" ++ # mode. It turns out that the SunPro C++ compiler does not properly ++ # handle `-M -o', and we need to detect this. ++ if depmode=$depmode \ ++ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ++ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ++ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ++ >/dev/null 2>conftest.err && ++ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && ++ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ++ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ++ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ++ # icc doesn't choke on unknown options, it will just issue warnings ++ # or remarks (even with -Werror). So we grep stderr for any message ++ # that says an option was ignored or not supported. ++ # When given -MP, icc 7.0 and 7.1 complain thusly: ++ # icc: Command line warning: ignoring option '-M'; no argument required ++ # The diagnosis changed in icc 8.0: ++ # icc: Command line remark: option '-MP' not supported ++ if (grep 'ignoring option' conftest.err || ++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else ++ am_cv_CC_dependencies_compiler_type=$depmode ++ break ++ fi ++ fi ++ done ++ ++ cd .. ++ rm -rf conftest.dir ++else ++ am_cv_CC_dependencies_compiler_type=none + fi ++ + fi +-AWK=$ac_cv_prog_AWK +-if test -n "$AWK"; then +- echo "$as_me:$LINENO: result: $AWK" >&5 +-echo "${ECHO_T}$AWK" >&6 ++{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ++echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } ++CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type ++ ++ if ++ test "x$enable_dependency_tracking" != xno \ ++ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then ++ am__fastdepCC_TRUE= ++ am__fastdepCC_FALSE='#' + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ am__fastdepCC_TRUE='#' ++ am__fastdepCC_FALSE= + fi + +- test -n "$AWK" && break +-done + + +-# Debug option +-# Check whether --enable-debug or --disable-debug was given. +-if test "${enable_debug+set}" = set; then +- enableval="$enable_debug" ++am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc + ++{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 ++echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } ++LN_S=$as_ln_s ++if test "$LN_S" = "ln -s"; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else +- enable_debug=minimum +-fi; ++ { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 ++echo "${ECHO_T}no, using $LN_S" >&6; } ++fi + +-# Strict ansi +-# Check whether --enable-ansi or --disable-ansi was given. +-if test "${enable_ansi+set}" = set; then +- enableval="$enable_ansi" + ++# Debug option ++# Check whether --enable-debug was given. ++if test "${enable_debug+set}" = set; then ++ enableval=$enable_debug; + else +- enable_ansi=no +-fi; +- +-if test "x$GCC" = "xyes"; then +- case " $CFLAGS " in +- *[\ \ ]-Wall[\ \ ]*) ;; +- *) CFLAGS="$CFLAGS -Wall" ;; +- esac +- +- if test "x$enable_ansi" = "xyes"; then +- case " $CFLAGS " in +- *[\ \ ]-ansi[\ \ ]*) ;; +- *) CFLAGS="$CFLAGS -ansi" ;; +- esac +- +- case " $CFLAGS " in +- *[\ \ ]-pedantic[\ \ ]*) ;; +- *) CFLAGS="$CFLAGS -pedantic" ;; +- esac +- fi ++ enable_debug=minimum + fi + ++ + if test "x$enable_debug" = "xyes"; then + if test x$cflags_set != xset ; then + case " $CFLAGS " in +@@ -19609,8 +21455,8 @@ + if test "x$os_win32" = "xyes"; then + if test "x$GCC" = "xyes"; then + msnative_struct='' +- echo "$as_me:$LINENO: checking how to get MSVC-compatible struct packing" >&5 +-echo $ECHO_N "checking how to get MSVC-compatible struct packing... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking how to get MSVC-compatible struct packing" >&5 ++echo $ECHO_N "checking how to get MSVC-compatible struct packing... $ECHO_C" >&6; } + if test -z "$ac_cv_prog_CC"; then + our_gcc="$CC" + else +@@ -19629,14 +21475,14 @@ + ;; + esac + if test x"$msnative_struct" = x ; then +- echo "$as_me:$LINENO: result: no way" >&5 +-echo "${ECHO_T}no way" >&6 ++ { echo "$as_me:$LINENO: result: no way" >&5 ++echo "${ECHO_T}no way" >&6; } + { echo "$as_me:$LINENO: WARNING: produced libraries might be incompatible with MSVC-compiled code" >&5 + echo "$as_me: WARNING: produced libraries might be incompatible with MSVC-compiled code" >&2;} + else + CFLAGS="$CFLAGS $msnative_struct" +- echo "$as_me:$LINENO: result: ${msnative_struct}" >&5 +-echo "${ECHO_T}${msnative_struct}" >&6 ++ { echo "$as_me:$LINENO: result: ${msnative_struct}" >&5 ++echo "${ECHO_T}${msnative_struct}" >&6; } + fi + fi + fi +@@ -19654,20 +21500,20 @@ + # define a MAINT-like variable REBUILD which is set if Perl + # and awk are found, so autogenerated sources can be rebuilt + +-# Check whether --enable-rebuilds or --disable-rebuilds was given. ++# Check whether --enable-rebuilds was given. + if test "${enable_rebuilds+set}" = set; then +- enableval="$enable_rebuilds" +- ++ enableval=$enable_rebuilds; + else + enable_rebuilds=yes +-fi; ++fi ++ + + for ac_prog in perl5 perl + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -19682,67 +21528,31 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + ;; + esac + fi + PERL=$ac_cv_path_PERL +- + if test -n "$PERL"; then +- echo "$as_me:$LINENO: result: $PERL" >&5 +-echo "${ECHO_T}$PERL" >&6 ++ { echo "$as_me:$LINENO: result: $PERL" >&5 ++echo "${ECHO_T}$PERL" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- test -n "$PERL" && break +-done + +- +-# We would like indent, but don't require it. +-# Extract the first word of "indent", so it can be a program name with args. +-set dummy indent; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_prog_INDENT+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- if test -n "$INDENT"; then +- ac_cv_prog_INDENT="$INDENT" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_INDENT="indent" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done ++ test -n "$PERL" && break + done + +-fi +-fi +-INDENT=$ac_cv_prog_INDENT +-if test -n "$INDENT"; then +- echo "$as_me:$LINENO: result: $INDENT" >&5 +-echo "${ECHO_T}$INDENT" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- + + REBUILD=\# + if test "x$enable_rebuilds" = "xyes" && \ +@@ -19752,9 +21562,6 @@ + fi + + +-# Honor aclocal flags +-ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS -I $srcdir/m4macros" +- + ## Initial sanity check, done here so that users get told they + ## have the wrong dependencies as early in the process as possible. + ## Later on we actually use the cflags/libs from separate pkg-config +@@ -19762,314 +21569,32 @@ + ## the version requirements since those make the module lists + ## annoying to construct + +- +-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- case $PKG_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +-done +- +- ;; +-esac +-fi +-PKG_CONFIG=$ac_cv_path_PKG_CONFIG +- +-if test -n "$PKG_CONFIG"; then +- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +-echo "${ECHO_T}$PKG_CONFIG" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- +-fi +-if test -z "$ac_cv_path_PKG_CONFIG"; then +- ac_pt_PKG_CONFIG=$PKG_CONFIG +- # Extract the first word of "pkg-config", so it can be a program name with args. +-set dummy pkg-config; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- case $ac_pt_PKG_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +-done +- +- ;; +-esac +-fi +-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +- +-if test -n "$ac_pt_PKG_CONFIG"; then +- echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- +- PKG_CONFIG=$ac_pt_PKG_CONFIG +-else +- PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +-fi +- +-fi +-if test -n "$PKG_CONFIG"; then +- _pkg_min_version=0.9.0 +- echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6 +- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +- else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- PKG_CONFIG="" +- fi +- +-fi +- +-pkg_failed=no +-echo "$as_me:$LINENO: checking for BASE_DEPENDENCIES" >&5 +-echo $ECHO_N "checking for BASE_DEPENDENCIES... $ECHO_C" >&6 +- +-if test -n "$PKG_CONFIG"; then +- if test -n "$BASE_DEPENDENCIES_CFLAGS"; then +- pkg_cv_BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\\ +-gtk+-2.0 >= 2.0.0 \\ +-gdk-2.0 >= 2.0.0 \\ +-pango >= 1.0.0 \\ +-pangox >= 1.0.0 \\ +-gmodule-2.0 >= 2.0.0 \\ +-\"") >&5 +- ($PKG_CONFIG --exists --print-errors "\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then +- pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-" 2>/dev/null` +-else +- pkg_failed=yes +-fi +- fi +-else +- pkg_failed=untried +-fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$BASE_DEPENDENCIES_LIBS"; then +- pkg_cv_BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\\ +-gtk+-2.0 >= 2.0.0 \\ +-gdk-2.0 >= 2.0.0 \\ +-pango >= 1.0.0 \\ +-pangox >= 1.0.0 \\ +-gmodule-2.0 >= 2.0.0 \\ +-\"") >&5 +- ($PKG_CONFIG --exists --print-errors "\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then +- pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-" 2>/dev/null` +-else +- pkg_failed=yes +-fi +- fi +-else +- pkg_failed=untried +-fi +- +- +- +-if test $pkg_failed = yes; then +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no +-fi +- if test $_pkg_short_errors_supported = yes; then +- BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-"` +- else +- BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-"` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$BASE_DEPENDENCIES_PKG_ERRORS" >&5 +- +- { { echo "$as_me:$LINENO: error: Package requirements (\ +-gtk+-2.0 >= 2.0.0 \ +-gdk-2.0 >= 2.0.0 \ +-pango >= 1.0.0 \ +-pangox >= 1.0.0 \ +-gmodule-2.0 >= 2.0.0 \ +-) were not met: +- +-$BASE_DEPENDENCIES_PKG_ERRORS +- +-Consider adjusting the PKG_CONFIG_PATH environment variable if you +-installed software in a non-standard prefix. +- +-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS +-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. +-" >&5 +-echo "$as_me: error: Package requirements (\ +-gtk+-2.0 >= 2.0.0 \ ++if test "x$gdktarget" != "xquartz"; then ++TMPDEPS="\ ++gtk+-2.0 >= 2.4.0 \ + gdk-2.0 >= 2.0.0 \ + pango >= 1.0.0 \ + pangox >= 1.0.0 \ + gmodule-2.0 >= 2.0.0 \ +-) were not met: +- +-$BASE_DEPENDENCIES_PKG_ERRORS +- +-Consider adjusting the PKG_CONFIG_PATH environment variable if you +-installed software in a non-standard prefix. +- +-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS +-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. +-" >&2;} +- { (exit 1); exit 1; }; } +-elif test $pkg_failed = untried; then +- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +-is in your PATH or set the PKG_CONFIG environment variable to the full +-path to pkg-config. +- +-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS +-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. +- +-To get pkg-config, see . +-See \`config.log' for more details." >&5 +-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +-is in your PATH or set the PKG_CONFIG environment variable to the full +-path to pkg-config. +- +-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS +-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. +- +-To get pkg-config, see . +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++" + else +- BASE_DEPENDENCIES_CFLAGS=$pkg_cv_BASE_DEPENDENCIES_CFLAGS +- BASE_DEPENDENCIES_LIBS=$pkg_cv_BASE_DEPENDENCIES_LIBS +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +- : ++TMPDEPS="\ ++gtk+-2.0 >= 2.4.0 \ ++gdk-2.0 >= 2.0.0 \ ++pango >= 1.0.0 \ ++gmodule-2.0 >= 2.0.0 \ ++" + fi + +-# Check for GLib +-# Check whether --enable-glibtest or --disable-glibtest was given. +-if test "${enable_glibtest+set}" = set; then +- enableval="$enable_glibtest" + +-else +- enable_glibtest=yes +-fi; + +- pkg_config_args=glib-2.0 +- for module in . +- do +- case "$module" in +- gmodule) +- pkg_config_args="$pkg_config_args gmodule-2.0" +- ;; +- gmodule-no-export) +- pkg_config_args="$pkg_config_args gmodule-no-export-2.0" +- ;; +- gobject) +- pkg_config_args="$pkg_config_args gobject-2.0" +- ;; +- gthread) +- pkg_config_args="$pkg_config_args gthread-2.0" +- ;; +- esac +- done + +- # Extract the first word of "pkg-config", so it can be a program name with args. +-set dummy pkg-config; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. ++set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -20084,317 +21609,41 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG=$ac_cv_path_PKG_CONFIG +- + if test -n "$PKG_CONFIG"; then +- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +-echo "${ECHO_T}$PKG_CONFIG" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- +- +- no_glib="" +- +- if test x$PKG_CONFIG != xno ; then +- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then +- : +- else +- echo *** pkg-config too old; version 0.7 or better required. +- no_glib=yes +- PKG_CONFIG=no +- fi +- else +- no_glib=yes +- fi +- +- min_glib_version=2.0.0 +- echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5 +-echo $ECHO_N "checking for GLIB - version >= $min_glib_version... $ECHO_C" >&6 +- +- if test x$PKG_CONFIG != xno ; then +- ## don't try to run the test against uninstalled libtool libs +- if $PKG_CONFIG --uninstalled $pkg_config_args; then +- echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" +- enable_glibtest=no +- fi +- +- if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then +- : +- else +- no_glib=yes +- fi +- fi +- +- if test x"$no_glib" = x ; then +- GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` +- GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` +- GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` +- +- GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` +- GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` +- glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ +- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` +- glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ +- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` +- glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ +- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` +- if test "x$enable_glibtest" = "xyes" ; then +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $GLIB_CFLAGS" +- LIBS="$GLIB_LIBS $LIBS" +- rm -f conf.glibtest +- if test "$cross_compiling" = yes; then +- echo $ac_n "cross compiling; assumed OK... $ac_c" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +- +-int +-main () +-{ +- int major, minor, micro; +- char *tmp_version; +- +- system ("touch conf.glibtest"); +- +- /* HP/UX 9 (%@#!) writes to sscanf strings */ +- tmp_version = g_strdup("$min_glib_version"); +- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { +- printf("%s, bad version string\n", "$min_glib_version"); +- exit(1); +- } +- +- if ((glib_major_version != $glib_config_major_version) || +- (glib_minor_version != $glib_config_minor_version) || +- (glib_micro_version != $glib_config_micro_version)) +- { +- printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", +- $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, +- glib_major_version, glib_minor_version, glib_micro_version); +- printf ("*** was found! If pkg-config was correct, then it is best\n"); +- printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); +- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); +- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); +- printf("*** required on your system.\n"); +- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); +- printf("*** to point to the correct configuration files\n"); +- } +- else if ((glib_major_version != GLIB_MAJOR_VERSION) || +- (glib_minor_version != GLIB_MINOR_VERSION) || +- (glib_micro_version != GLIB_MICRO_VERSION)) +- { +- printf("*** GLIB header files (version %d.%d.%d) do not match\n", +- GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); +- printf("*** library (version %d.%d.%d)\n", +- glib_major_version, glib_minor_version, glib_micro_version); +- } +- else +- { +- if ((glib_major_version > major) || +- ((glib_major_version == major) && (glib_minor_version > minor)) || +- ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) +- { +- return 0; +- } +- else +- { +- printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", +- glib_major_version, glib_minor_version, glib_micro_version); +- printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", +- major, minor, micro); +- printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); +- printf("***\n"); +- printf("*** If you have already installed a sufficiently new version, this error\n"); +- printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); +- printf("*** being found. The easiest way to fix this is to remove the old version\n"); +- printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); +- printf("*** correct copy of pkg-config. (In this case, you will have to\n"); +- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** so that the correct libraries are found at run-time))\n"); +- } +- } +- return 1; +-} +- +-_ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : ++ { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 ++echo "${ECHO_T}$PKG_CONFIG" >&6; } + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-no_glib=yes ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- if test "x$no_glib" = x ; then +- echo "$as_me:$LINENO: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 +-echo "${ECHO_T}yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6 +- : +- else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- if test "$PKG_CONFIG" = "no" ; then +- echo "*** A new enough version of pkg-config was not found." +- echo "*** See http://www.freedesktop.org/software/pkgconfig/" +- else +- if test -f conf.glibtest ; then +- : +- else +- echo "*** Could not run GLIB test program, checking why..." +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $GLIB_CFLAGS" +- LIBS="$LIBS $GLIB_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +- +-int +-main () +-{ +- return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- echo "*** The test program compiled, but did not run. This usually means" +- echo "*** that the run-time linker is not finding GLIB or finding the wrong" +- echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" +- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" +- echo "*** to the installed location Also, make sure you have run ldconfig if that" +- echo "*** is required on your system" +- echo "***" +- echo "*** If you have an old version installed, it is best to remove it, although" +- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- echo "*** The test program failed to compile or link. See the file config.log for the" +- echo "*** exact error that occured. This usually means GLIB is incorrectly installed." + fi +-rm -f conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- GLIB_CFLAGS="" +- GLIB_LIBS="" +- GLIB_GENMARSHAL="" +- GOBJECT_QUERY="" +- GLIB_MKENUMS="" +- { { echo "$as_me:$LINENO: error: GLib 2.0 not found" >&5 +-echo "$as_me: error: GLib 2.0 not found" >&2;} +- { (exit 1); exit 1; }; } +- fi +- +- +- +- +- +- rm -f conf.glibtest +- +- +-# Check for GTK+ +-# Check whether --enable-gtktest or --disable-gtktest was given. +-if test "${enable_gtktest+set}" = set; then +- enableval="$enable_gtktest" +- +-else +- enable_gtktest=yes +-fi; +- +- pkg_config_args=gtk+-2.0 +- for module in . +- do +- case "$module" in +- gthread) +- pkg_config_args="$pkg_config_args gthread-2.0" +- ;; +- esac +- done +- +- no_gtk="" +- ++if test -z "$ac_cv_path_PKG_CONFIG"; then ++ ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case $PKG_CONFIG in ++ case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) +- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ++ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +@@ -20403,279 +21652,175 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi +-PKG_CONFIG=$ac_cv_path_PKG_CONFIG +- +-if test -n "$PKG_CONFIG"; then +- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +-echo "${ECHO_T}$PKG_CONFIG" >&6 ++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG ++if test -n "$ac_pt_PKG_CONFIG"; then ++ { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 ++echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- +- if test x$PKG_CONFIG != xno ; then +- if pkg-config --atleast-pkgconfig-version 0.7 ; then +- : +- else +- echo "*** pkg-config too old; version 0.7 or better required." +- no_gtk=yes +- PKG_CONFIG=no +- fi +- else +- no_gtk=yes +- fi +- +- min_gtk_version=2.0.0 +- echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 +-echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 +- +- if test x$PKG_CONFIG != xno ; then +- ## don't try to run the test against uninstalled libtool libs +- if $PKG_CONFIG --uninstalled $pkg_config_args; then +- echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" +- enable_gtktest=no +- fi +- +- if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then +- : +- else +- no_gtk=yes +- fi ++ if test "x$ac_pt_PKG_CONFIG" = x; then ++ PKG_CONFIG="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +- +- if test x"$no_gtk" = x ; then +- GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` +- GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` +- gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ +- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` +- gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ +- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` +- gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ +- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` +- if test "x$enable_gtktest" = "xyes" ; then +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $GTK_CFLAGS" +- LIBS="$GTK_LIBS $LIBS" +- rm -f conf.gtktest +- if test "$cross_compiling" = yes; then +- echo $ac_n "cross compiling; assumed OK... $ac_c" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include ++ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" ++fi + +-int +-main () +-{ +- int major, minor, micro; +- char *tmp_version; ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=0.9.0 ++ { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 ++echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } ++ else ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++ PKG_CONFIG="" ++ fi + +- system ("touch conf.gtktest"); ++fi + +- /* HP/UX 9 (%@#!) writes to sscanf strings */ +- tmp_version = g_strdup("$min_gtk_version"); +- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { +- printf("%s, bad version string\n", "$min_gtk_version"); +- exit(1); +- } +- +- if ((gtk_major_version != $gtk_config_major_version) || +- (gtk_minor_version != $gtk_config_minor_version) || +- (gtk_micro_version != $gtk_config_micro_version)) +- { +- printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", +- $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, +- gtk_major_version, gtk_minor_version, gtk_micro_version); +- printf ("*** was found! If pkg-config was correct, then it is best\n"); +- printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); +- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); +- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); +- printf("*** required on your system.\n"); +- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); +- printf("*** to point to the correct configuration files\n"); +- } +- else if ((gtk_major_version != GTK_MAJOR_VERSION) || +- (gtk_minor_version != GTK_MINOR_VERSION) || +- (gtk_micro_version != GTK_MICRO_VERSION)) +- { +- printf("*** GTK+ header files (version %d.%d.%d) do not match\n", +- GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); +- printf("*** library (version %d.%d.%d)\n", +- gtk_major_version, gtk_minor_version, gtk_micro_version); +- } +- else +- { +- if ((gtk_major_version > major) || +- ((gtk_major_version == major) && (gtk_minor_version > minor)) || +- ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) +- { +- return 0; +- } +- else +- { +- printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", +- gtk_major_version, gtk_minor_version, gtk_micro_version); +- printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", +- major, minor, micro); +- printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); +- printf("***\n"); +- printf("*** If you have already installed a sufficiently new version, this error\n"); +- printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); +- printf("*** being found. The easiest way to fix this is to remove the old version\n"); +- printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); +- printf("*** correct copy of pkg-config. (In this case, you will have to\n"); +- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** so that the correct libraries are found at run-time))\n"); +- } +- } +- return 1; +-} ++pkg_failed=no ++{ echo "$as_me:$LINENO: checking for BASE_DEPENDENCIES" >&5 ++echo $ECHO_N "checking for BASE_DEPENDENCIES... $ECHO_C" >&6; } + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if test -n "$BASE_DEPENDENCIES_CFLAGS"; then ++ pkg_cv_BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMPDEPS\"") >&5 ++ ($PKG_CONFIG --exists --print-errors "$TMPDEPS") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); }; then ++ pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "$TMPDEPS" 2>/dev/null` ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$BASE_DEPENDENCIES_LIBS"; then ++ pkg_cv_BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMPDEPS\"") >&5 ++ ($PKG_CONFIG --exists --print-errors "$TMPDEPS") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : ++ (exit $ac_status); }; then ++ pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "$TMPDEPS" 2>/dev/null` + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-no_gtk=yes ++ pkg_failed=yes + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ else ++ pkg_failed=untried + fi +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- if test "x$no_gtk" = x ; then +- echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 +-echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 +- : +- else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- if test "$PKG_CONFIG" = "no" ; then +- echo "*** A new enough version of pkg-config was not found." +- echo "*** See http://pkgconfig.sourceforge.net" +- else +- if test -f conf.gtktest ; then +- : +- else +- echo "*** Could not run GTK+ test program, checking why..." +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $GTK_CFLAGS" +- LIBS="$LIBS $GTK_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include + +-int +-main () +-{ +- return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- echo "*** The test program compiled, but did not run. This usually means" +- echo "*** that the run-time linker is not finding GTK+ or finding the wrong" +- echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" +- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" +- echo "*** to the installed location Also, make sure you have run ldconfig if that" +- echo "*** is required on your system" +- echo "***" +- echo "*** If you have an old version installed, it is best to remove it, although" +- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ++ ++if test $pkg_failed = yes; then ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$TMPDEPS" 2>&1` ++ else ++ BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors "$TMPDEPS" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$BASE_DEPENDENCIES_PKG_ERRORS" >&5 ++ ++ { { echo "$as_me:$LINENO: error: Package requirements ($TMPDEPS) were not met: ++ ++$BASE_DEPENDENCIES_PKG_ERRORS + +- echo "*** The test program failed to compile or link. See the file config.log for the" +- echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." +-fi +-rm -f conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- GTK_CFLAGS="" +- GTK_LIBS="" +- { { echo "$as_me:$LINENO: error: GTK+ 2.0 not found" >&5 +-echo "$as_me: error: GTK+ 2.0 not found" >&2;} ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS ++and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++" >&5 ++echo "$as_me: error: Package requirements ($TMPDEPS) were not met: ++ ++$BASE_DEPENDENCIES_PKG_ERRORS ++ ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS ++and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++" >&2;} + { (exit 1); exit 1; }; } +- fi ++elif test $pkg_failed = untried; then ++ { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. ++ ++Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS ++and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++ ++To get pkg-config, see . ++See \`config.log' for more details." >&5 ++echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. + ++Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS ++and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. + +- rm -f conf.gtktest ++To get pkg-config, see . ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ++else ++ BASE_DEPENDENCIES_CFLAGS=$pkg_cv_BASE_DEPENDENCIES_CFLAGS ++ BASE_DEPENDENCIES_LIBS=$pkg_cv_BASE_DEPENDENCIES_LIBS ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } ++ : ++fi + + + # Checks for libraries. + + # Checks for header files. +-echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } + if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -20699,35 +21844,31 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +@@ -20783,6 +21924,7 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include ++#include + #if ((' ' & 0x0FF) == 0x020) + # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +@@ -20802,18 +21944,27 @@ + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -20826,12 +21977,14 @@ + ( exit $ac_status ) + ac_cv_header_stdc=no + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++echo "${ECHO_T}$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + + cat >>confdefs.h <<\_ACEOF +@@ -20846,18 +21999,19 @@ + for ac_header in inttypes.h stdlib.h string.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -20868,41 +22022,37 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -20911,24 +22061,22 @@ + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -20936,9 +22084,10 @@ + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -20962,25 +22111,24 @@ + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ ( cat <<\_ASBOX + ## -------------------------------------- ## + ## Report this to gtkglext-list@gnome.org ## + ## -------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then +@@ -20994,8 +22142,8 @@ + + + # Checks for typedefs, structures, and compiler characteristics. +-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 ++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } + if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -21013,10 +22161,10 @@ + #ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; +- const charset x; ++ const charset cs; + /* SunOS 4.1.1 cc rejects this. */ +- char const *const *ccp; +- char **p; ++ char const *const *pcpcc; ++ char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; +@@ -21025,16 +22173,17 @@ + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; +- ccp = &g + (g ? g-g : 0); ++ pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ +- ++ccp; +- p = (char**) ccp; +- ccp = (char const *const *) p; ++ ++pcpcc; ++ ppc = (char**) pcpcc; ++ pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; ++ if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; +@@ -21053,7 +22202,9 @@ + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; ++ if (!foo) return 0; + } ++ return !cs[0] && !zero.x; + #endif + + ; +@@ -21061,38 +22212,34 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_c_const=no ++ ac_cv_c_const=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +-echo "${ECHO_T}$ac_cv_c_const" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 ++echo "${ECHO_T}$ac_cv_c_const" >&6; } + if test $ac_cv_c_const = no; then + + cat >>confdefs.h <<\_ACEOF +@@ -21110,18 +22257,19 @@ + for ac_header in stdlib.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21132,41 +22280,37 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21175,24 +22319,22 @@ + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -21200,9 +22342,10 @@ + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -21226,25 +22369,24 @@ + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ ( cat <<\_ASBOX + ## -------------------------------------- ## + ## Report this to gtkglext-list@gnome.org ## + ## -------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then +@@ -21256,8 +22398,8 @@ + + done + +-echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +-echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 ++echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } + if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -21270,7 +22412,7 @@ + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#if STDC_HEADERS || HAVE_STDLIB_H ++#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *malloc (); +@@ -21279,19 +22421,28 @@ + int + main () + { +-exit (malloc (0) ? 0 : 1); ++return ! malloc (0); + ; + return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -21304,11 +22455,13 @@ + ( exit $ac_status ) + ac_cv_func_malloc_0_nonnull=no + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +-echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 ++echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } + if test $ac_cv_func_malloc_0_nonnull = yes; then + + cat >>confdefs.h <<\_ACEOF +@@ -21320,12 +22473,10 @@ + #define HAVE_MALLOC 0 + _ACEOF + +- case $LIBOBJS in +- "malloc.$ac_objext" | \ +- *" malloc.$ac_objext" | \ +- "malloc.$ac_objext "* | \ ++ case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; ++ *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ++ ;; + esac + + +@@ -21345,9 +22496,9 @@ + for ac_func in memset sqrt strchr strrchr strstr + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_var+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +@@ -21373,68 +22524,60 @@ + + #undef $ac_func + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func + choke me +-#else +-char (*f) () = $ac_func; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != $ac_func; ++return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_var=no" ++ eval "$as_ac_var=no" + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +@@ -21463,18 +22606,19 @@ + for ac_header in gdk/gdkdisplay.h gdk/gdkscreen.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21485,41 +22629,37 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21528,24 +22668,22 @@ + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -21553,9 +22691,10 @@ + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -21579,25 +22718,24 @@ + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ ( cat <<\_ASBOX + ## -------------------------------------- ## + ## Report this to gtkglext-list@gnome.org ## + ## -------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then +@@ -21613,8 +22751,8 @@ + + + if test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"; then +- echo "$as_me:$LINENO: checking for gdk_display_get_default in GDK library" >&5 +-echo $ECHO_N "checking for gdk_display_get_default in GDK library... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gdk_display_get_default in GDK library" >&5 ++echo $ECHO_N "checking for gdk_display_get_default in GDK library... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21631,38 +22769,35 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + GDKGLEXT_MULTIHEAD_SUPPORT=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-GDKGLEXT_MULTIHEAD_SUPPORT=no ++ GDKGLEXT_MULTIHEAD_SUPPORT=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +- echo "$as_me:$LINENO: result: $GDKGLEXT_MULTIHEAD_SUPPORT" >&5 +-echo "${ECHO_T}$GDKGLEXT_MULTIHEAD_SUPPORT" >&6 ++ { echo "$as_me:$LINENO: result: $GDKGLEXT_MULTIHEAD_SUPPORT" >&5 ++echo "${ECHO_T}$GDKGLEXT_MULTIHEAD_SUPPORT" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" +@@ -21677,9 +22812,7 @@ + fi + + +- +- +-if test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"; then ++ if test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"; then + MULTIHEAD_SUPPORT_TRUE= + MULTIHEAD_SUPPORT_FALSE='#' + else +@@ -21701,9 +22834,9 @@ + for ac_func in gdk_x11_colormap_foreign_new + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_var+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +@@ -21729,68 +22862,60 @@ + + #undef $ac_func + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func + choke me +-#else +-char (*f) () = $ac_func; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != $ac_func; ++return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_var=no" ++ eval "$as_ac_var=no" + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +@@ -21817,44 +22942,49 @@ + GDKGLEXT_WIN_EXTRA_DEFS="" + + if test "x$gdktarget" = "xx11"; then +- echo "$as_me:$LINENO: checking for X" >&5 +-echo $ECHO_N "checking for X... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for X" >&5 ++echo $ECHO_N "checking for X... $ECHO_C" >&6; } + + +-# Check whether --with-x or --without-x was given. ++# Check whether --with-x was given. + if test "${with_x+set}" = set; then +- withval="$with_x" ++ withval=$with_x; ++fi + +-fi; + # $have_x is `yes', `no', `disabled', or empty when we do not yet know. + if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled + else +- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then +- # Both variables are already set. +- have_x=yes +- else +- if test "${ac_cv_have_x+set}" = set; then ++ case $x_includes,$x_libraries in #( ++ *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 ++echo "$as_me: error: Cannot use X directory names containing '" >&2;} ++ { (exit 1); exit 1; }; };; #( ++ *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # One or both of the vars are not set, and there is no cached value. + ac_x_includes=no ac_x_libraries=no +-rm -fr conftest.dir ++rm -f -r conftest.dir + if mkdir conftest.dir; then + cd conftest.dir +- # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat >Imakefile <<'_ACEOF' +-acfindx: +- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' ++incroot: ++ @echo incroot='${INCROOT}' ++usrlibdir: ++ @echo usrlibdir='${USRLIBDIR}' ++libdir: ++ @echo libdir='${LIBDIR}' + _ACEOF +- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then ++ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` ++ for ac_var in incroot usrlibdir libdir; do ++ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" ++ done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do +- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && +- test -f $ac_im_libdir/libX11.$ac_extension; then ++ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && ++ test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done +@@ -21862,7 +22992,7 @@ + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in +- /usr/include) ;; ++ /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in +@@ -21871,7 +23001,7 @@ + esac + fi + cd .. +- rm -fr conftest.dir ++ rm -f -r conftest.dir + fi + + # Standard set of common directories for X headers. +@@ -21912,7 +23042,7 @@ + /usr/openwin/share/include' + + if test "$ac_x_includes" = no; then +- # Guess where to find include files, by looking for Intrinsic.h. ++ # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -21920,26 +23050,24 @@ + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include ++#include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # We can compile using X headers with no special include directory. + ac_x_includes= + else +@@ -21947,12 +23075,13 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do +- if test -r "$ac_dir/X11/Intrinsic.h"; then ++ if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi + done + fi ++ + rm -f conftest.err conftest.$ac_ext + fi # $ac_x_includes = no + +@@ -21961,44 +23090,40 @@ + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS +- LIBS="-lXt $LIBS" ++ LIBS="-lX11 $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include ++#include + int + main () + { +-XtMalloc (0) ++XrmInitialize () + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + LIBS=$ac_save_LIBS + # We can link X programs with no special library path. + ac_x_libraries= +@@ -22006,49 +23131,54 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS=$ac_save_LIBS ++ LIBS=$ac_save_LIBS + for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` + do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do +- if test -r $ac_dir/libXt.$ac_extension; then ++ if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done + done + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi # $ac_x_libraries = no + +-if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then +- # Didn't find X anywhere. Cache the known absence of X. +- ac_cv_have_x="have_x=no" +-else +- # Record where we found X for the cache. +- ac_cv_have_x="have_x=yes \ +- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +-fi ++case $ac_x_includes,$ac_x_libraries in #( ++ no,* | *,no | *\'*) ++ # Didn't find X, or a directory has "'" in its name. ++ ac_cv_have_x="have_x=no";; #( ++ *) ++ # Record where we found X for the cache. ++ ac_cv_have_x="have_x=yes\ ++ ac_x_includes='$ac_x_includes'\ ++ ac_x_libraries='$ac_x_libraries'" ++esac + fi +- +- fi ++;; #( ++ *) have_x=yes;; ++ esac + eval "$ac_cv_have_x" + fi # $with_x != no + + if test "$have_x" != yes; then +- echo "$as_me:$LINENO: result: $have_x" >&5 +-echo "${ECHO_T}$have_x" >&6 ++ { echo "$as_me:$LINENO: result: $have_x" >&5 ++echo "${ECHO_T}$have_x" >&6; } + no_x=yes + else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. +- ac_cv_have_x="have_x=yes \ +- ac_x_includes=$x_includes ac_x_libraries=$x_libraries" +- echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +-echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 ++ ac_cv_have_x="have_x=yes\ ++ ac_x_includes='$x_includes'\ ++ ac_x_libraries='$x_libraries'" ++ { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 ++echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } + fi + + if test "$no_x" = yes; then +@@ -22069,12 +23199,12 @@ + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . +- case `(uname -sr) 2>/dev/null` in +- "SunOS 5"*) +- echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +-echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 +- ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" +- cat >conftest.$ac_ext <<_ACEOF ++ { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 ++echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } ++ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ++ ac_xsave_c_werror_flag=$ac_c_werror_flag ++ ac_c_werror_flag=yes ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -22090,43 +23220,32 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_R_nospace=yes ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++ X_LIBS="$X_LIBS -R$x_libraries" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_R_nospace=no +-fi +-rm -f conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- if test $ac_R_nospace = yes; then +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- X_LIBS="$X_LIBS -R$x_libraries" +- else + LIBS="$ac_xsave_LIBS -R $x_libraries" +- cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -22142,47 +23261,42 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_R_space=yes ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } ++ X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_R_space=no ++ { echo "$as_me:$LINENO: result: neither works" >&5 ++echo "${ECHO_T}neither works" >&6; } + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +- if test $ac_R_space = yes; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +- X_LIBS="$X_LIBS -R $x_libraries" +- else +- echo "$as_me:$LINENO: result: neither works" >&5 +-echo "${ECHO_T}neither works" >&6 +- fi +- fi +- LIBS=$ac_xsave_LIBS +- esac ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++ ac_c_werror_flag=$ac_xsave_c_werror_flag ++ LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. +@@ -22203,50 +23317,46 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char XOpenDisplay (); + int + main () + { +-XOpenDisplay (); ++return XOpenDisplay (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +-echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 ++echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } + if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22259,63 +23369,60 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dnet_ntoa (); + int + main () + { +-dnet_ntoa (); ++return dnet_ntoa (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_dnet_ntoa=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dnet_dnet_ntoa=no ++ ac_cv_lib_dnet_dnet_ntoa=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +-echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 ++echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } + if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" + fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then +- echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +-echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 ++echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } + if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22328,63 +23435,61 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dnet_ntoa (); + int + main () + { +-dnet_ntoa (); ++return dnet_ntoa (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dnet_stub_dnet_ntoa=no ++ ac_cv_lib_dnet_stub_dnet_ntoa=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +-echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 ++echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } + if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" + fi + + fi + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + +@@ -22396,8 +23501,8 @@ + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. +- echo "$as_me:$LINENO: checking for gethostbyname" >&5 +-echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gethostbyname" >&5 ++echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22424,72 +23529,63 @@ + + #undef gethostbyname + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gethostbyname (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) ++#if defined __stub_gethostbyname || defined __stub___gethostbyname + choke me +-#else +-char (*f) () = gethostbyname; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != gethostbyname; ++return gethostbyname (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_gethostbyname=no ++ ac_cv_func_gethostbyname=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +-echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 ++echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then +- echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 ++echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22502,63 +23598,60 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gethostbyname (); + int + main () + { +-gethostbyname (); ++return gethostbyname (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_nsl_gethostbyname=no ++ ac_cv_lib_nsl_gethostbyname=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 ++echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } + if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" + fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then +- echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +-echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 ++echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } + if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22571,56 +23664,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gethostbyname (); + int + main () + { +-gethostbyname (); ++return gethostbyname (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_gethostbyname=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_bsd_gethostbyname=no ++ ac_cv_lib_bsd_gethostbyname=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +-echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 ++echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } + if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" + fi +@@ -22635,8 +23725,8 @@ + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. +- echo "$as_me:$LINENO: checking for connect" >&5 +-echo $ECHO_N "checking for connect... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for connect" >&5 ++echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22663,72 +23753,63 @@ + + #undef connect + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char connect (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_connect) || defined (__stub___connect) ++#if defined __stub_connect || defined __stub___connect + choke me +-#else +-char (*f) () = connect; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != connect; ++return connect (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_connect=no ++ ac_cv_func_connect=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +-echo "${ECHO_T}$ac_cv_func_connect" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 ++echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then +- echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +-echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 ++echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } + if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22741,56 +23822,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char connect (); + int + main () + { +-connect (); ++return connect (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_socket_connect=no ++ ac_cv_lib_socket_connect=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +-echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 ++echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } + if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" + fi +@@ -22798,8 +23876,8 @@ + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. +- echo "$as_me:$LINENO: checking for remove" >&5 +-echo $ECHO_N "checking for remove... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for remove" >&5 ++echo $ECHO_N "checking for remove... $ECHO_C" >&6; } + if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22826,72 +23904,63 @@ + + #undef remove + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char remove (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_remove) || defined (__stub___remove) ++#if defined __stub_remove || defined __stub___remove + choke me +-#else +-char (*f) () = remove; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != remove; ++return remove (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_remove=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_remove=no ++ ac_cv_func_remove=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +-echo "${ECHO_T}$ac_cv_func_remove" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 ++echo "${ECHO_T}$ac_cv_func_remove" >&6; } + + if test $ac_cv_func_remove = no; then +- echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +-echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 ++echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } + if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22904,56 +23973,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char remove (); + int + main () + { +-remove (); ++return remove (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_posix_remove=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_posix_remove=no ++ ac_cv_lib_posix_remove=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +-echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 ++echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } + if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" + fi +@@ -22961,8 +24027,8 @@ + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. +- echo "$as_me:$LINENO: checking for shmat" >&5 +-echo $ECHO_N "checking for shmat... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for shmat" >&5 ++echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } + if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -22989,72 +24055,63 @@ + + #undef shmat + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char shmat (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_shmat) || defined (__stub___shmat) ++#if defined __stub_shmat || defined __stub___shmat + choke me +-#else +-char (*f) () = shmat; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != shmat; ++return shmat (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_shmat=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_shmat=no ++ ac_cv_func_shmat=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +-echo "${ECHO_T}$ac_cv_func_shmat" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 ++echo "${ECHO_T}$ac_cv_func_shmat" >&6; } + + if test $ac_cv_func_shmat = no; then +- echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +-echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 ++echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } + if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -23067,56 +24124,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char shmat (); + int + main () + { +-shmat (); ++return shmat (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_ipc_shmat=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_ipc_shmat=no ++ ac_cv_lib_ipc_shmat=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +-echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 ++echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } + if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" + fi +@@ -23133,8 +24187,8 @@ + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry +- echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +-echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 ++echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } + if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -23147,56 +24201,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char IceConnectionNumber (); + int + main () + { +-IceConnectionNumber (); ++return IceConnectionNumber (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_ICE_IceConnectionNumber=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_ICE_IceConnectionNumber=no ++ ac_cv_lib_ICE_IceConnectionNumber=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +-echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 ++echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } + if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" + fi +@@ -23222,9 +24273,9 @@ + for ac_header in X11/Xmu/StdCmap.h Xmu/StdCmap.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +@@ -23239,38 +24290,35 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_Header=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +@@ -23283,8 +24331,8 @@ + + XMU_LIBS="" + +-echo "$as_me:$LINENO: checking for XmuLookupStandardColormap in -lXmu" >&5 +-echo $ECHO_N "checking for XmuLookupStandardColormap in -lXmu... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for XmuLookupStandardColormap in -lXmu" >&5 ++echo $ECHO_N "checking for XmuLookupStandardColormap in -lXmu... $ECHO_C" >&6; } + if test "${ac_cv_lib_Xmu_XmuLookupStandardColormap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -23297,56 +24345,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char XmuLookupStandardColormap (); + int + main () + { +-XmuLookupStandardColormap (); ++return XmuLookupStandardColormap (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xmu_XmuLookupStandardColormap=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_Xmu_XmuLookupStandardColormap=no ++ ac_cv_lib_Xmu_XmuLookupStandardColormap=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuLookupStandardColormap" >&5 +-echo "${ECHO_T}$ac_cv_lib_Xmu_XmuLookupStandardColormap" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuLookupStandardColormap" >&5 ++echo "${ECHO_T}$ac_cv_lib_Xmu_XmuLookupStandardColormap" >&6; } + if test $ac_cv_lib_Xmu_XmuLookupStandardColormap = yes; then + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBXMU 1 +@@ -23369,9 +24414,7 @@ + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS" + +- +- +-if true; then ++ if true; then + USE_X11_TRUE= + USE_X11_FALSE='#' + else +@@ -23380,9 +24423,7 @@ + fi + + else +- +- +-if false; then ++ if false; then + USE_X11_TRUE= + USE_X11_FALSE='#' + else +@@ -23395,9 +24436,7 @@ + if test "x$gdktarget" = "xwin32"; then + WINDOWING_LIBS="-lgdi32 -luser32 -lkernel32" + GDKGLEXT_WIN_LIBS="-lgdi32 -luser32 -lkernel32" +- +- +-if true; then ++ if true; then + USE_WIN32_TRUE= + USE_WIN32_FALSE='#' + else +@@ -23406,9 +24445,7 @@ + fi + + else +- +- +-if false; then ++ if false; then + USE_WIN32_TRUE= + USE_WIN32_FALSE='#' + else +@@ -23436,31 +24473,31 @@ + GL_LIBS="" + + +-# Check whether --with-gl-prefix or --without-gl-prefix was given. ++# Check whether --with-gl-prefix was given. + if test "${with_gl_prefix+set}" = set; then +- withval="$with_gl_prefix" +- ++ withval=$with_gl_prefix; + else + with_gl_prefix=auto +-fi; ++fi + + +-# Check whether --with-gl-includedir or --without-gl-includedir was given. +-if test "${with_gl_includedir+set}" = set; then +- withval="$with_gl_includedir" + ++# Check whether --with-gl-includedir was given. ++if test "${with_gl_includedir+set}" = set; then ++ withval=$with_gl_includedir; + else + with_gl_includedir=auto +-fi; ++fi + + +-# Check whether --with-gl-libdir or --without-gl-libdir was given. +-if test "${with_gl_libdir+set}" = set; then +- withval="$with_gl_libdir" + ++# Check whether --with-gl-libdir was given. ++if test "${with_gl_libdir+set}" = set; then ++ withval=$with_gl_libdir; + else + with_gl_libdir=auto +-fi; ++fi ++ + + if test "x$with_gl_includedir" != "xauto"; then + GL_CFLAGS="-I$with_gl_includedir" +@@ -23484,18 +24521,19 @@ + for ac_header in GL/glx.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -23506,41 +24544,37 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -23549,24 +24583,22 @@ + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -23574,9 +24606,10 @@ + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -23600,25 +24633,24 @@ + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ ( cat <<\_ASBOX + ## -------------------------------------- ## + ## Report this to gtkglext-list@gnome.org ## + ## -------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then +@@ -23636,23 +24668,25 @@ + + fi + ++if test "x$gdktarget" != "xquartz"; then + + + for ac_header in GL/gl.h GL/glu.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -23663,41 +24697,37 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -23706,24 +24736,22 @@ + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -23731,9 +24759,10 @@ + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -23757,25 +24786,24 @@ + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ ( cat <<\_ASBOX + ## -------------------------------------- ## + ## Report this to gtkglext-list@gnome.org ## + ## -------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then +@@ -23791,6 +24819,7 @@ + + done + ++fi + + if test "x$gdktarget" = "xx11"; then + +@@ -23803,8 +24832,8 @@ + GL_LIB_NAME=GL + + # GLcore and GL (SGI) +- echo "$as_me:$LINENO: checking for glVertex3d in -lGLcore" >&5 +-echo $ECHO_N "checking for glVertex3d in -lGLcore... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glVertex3d in -lGLcore" >&5 ++echo $ECHO_N "checking for glVertex3d in -lGLcore... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLcore_glVertex3d+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -23817,64 +24846,61 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glVertex3d (); + int + main () + { +-glVertex3d (); ++return glVertex3d (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLcore_glVertex3d=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLcore_glVertex3d=no ++ ac_cv_lib_GLcore_glVertex3d=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLcore_glVertex3d" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLcore_glVertex3d" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLcore_glVertex3d" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLcore_glVertex3d" >&6; } + if test $ac_cv_lib_GLcore_glVertex3d = yes; then + GL_LIBS="-lGLcore" + fi + + if test "x$ac_cv_lib_GLcore_glVertex3d" = "xyes" ; then + # if GLcore found, then also check for GL +- echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5 +-echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5 ++echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; } + if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -23887,56 +24913,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glXCreateContext (); + int + main () + { +-glXCreateContext (); ++return glXCreateContext (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_glXCreateContext=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GL_glXCreateContext=no ++ ac_cv_lib_GL_glXCreateContext=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5 +-echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5 ++echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; } + if test $ac_cv_lib_GL_glXCreateContext = yes; then + GL_LIBS="-lGL $GL_LIBS" + have_GL=yes +@@ -23947,8 +24970,8 @@ + # GL + if test "x$have_GL" = "xno" ; then + # if no GLcore and GL, check for GL +- echo "$as_me:$LINENO: checking for glVertex3d in -lGL" >&5 +-echo $ECHO_N "checking for glVertex3d in -lGL... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glVertex3d in -lGL" >&5 ++echo $ECHO_N "checking for glVertex3d in -lGL... $ECHO_C" >&6; } + if test "${ac_cv_lib_GL_glVertex3d+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -23961,56 +24984,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glVertex3d (); + int + main () + { +-glVertex3d (); ++return glVertex3d (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_glVertex3d=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GL_glVertex3d=no ++ ac_cv_lib_GL_glVertex3d=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3d" >&5 +-echo "${ECHO_T}$ac_cv_lib_GL_glVertex3d" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3d" >&5 ++echo "${ECHO_T}$ac_cv_lib_GL_glVertex3d" >&6; } + if test $ac_cv_lib_GL_glVertex3d = yes; then + GL_LIBS="-lGL" + have_GL=yes +@@ -24018,8 +25038,8 @@ + + if test "x$ac_cv_lib_GL_glVertex3d" = "xno" ; then + # GL may need to be linked with the thread library explicitly +- echo "$as_me:$LINENO: checking for glVertex3f in -lGL" >&5 +-echo $ECHO_N "checking for glVertex3f in -lGL... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glVertex3f in -lGL" >&5 ++echo $ECHO_N "checking for glVertex3f in -lGL... $ECHO_C" >&6; } + if test "${ac_cv_lib_GL_glVertex3f+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24032,56 +25052,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glVertex3f (); + int + main () + { +-glVertex3f (); ++return glVertex3f (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_glVertex3f=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GL_glVertex3f=no ++ ac_cv_lib_GL_glVertex3f=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3f" >&5 +-echo "${ECHO_T}$ac_cv_lib_GL_glVertex3f" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3f" >&5 ++echo "${ECHO_T}$ac_cv_lib_GL_glVertex3f" >&6; } + if test $ac_cv_lib_GL_glVertex3f = yes; then + GL_LIBS="-lGL $THREAD_LIB" + have_GL=yes +@@ -24089,8 +25106,8 @@ + + if test "x$ac_cv_lib_GL_glVertex3f" = "xno" ; then + # GL may need to be linked with std C++ library explicitly +- echo "$as_me:$LINENO: checking for glVertex3i in -lGL" >&5 +-echo $ECHO_N "checking for glVertex3i in -lGL... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glVertex3i in -lGL" >&5 ++echo $ECHO_N "checking for glVertex3i in -lGL... $ECHO_C" >&6; } + if test "${ac_cv_lib_GL_glVertex3i+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24103,56 +25120,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glVertex3i (); + int + main () + { +-glVertex3i (); ++return glVertex3i (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_glVertex3i=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GL_glVertex3i=no ++ ac_cv_lib_GL_glVertex3i=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3i" >&5 +-echo "${ECHO_T}$ac_cv_lib_GL_glVertex3i" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3i" >&5 ++echo "${ECHO_T}$ac_cv_lib_GL_glVertex3i" >&6; } + if test $ac_cv_lib_GL_glVertex3i = yes; then + GL_LIBS="-lGL $STDCXX_LIB" + have_GL=yes +@@ -24160,8 +25174,8 @@ + + if test "x$ac_cv_lib_GL_glVertex3i" = "xno" ; then + # GL may need to be linked with std C++ and thread libraries explicitly +- echo "$as_me:$LINENO: checking for glVertex3s in -lGL" >&5 +-echo $ECHO_N "checking for glVertex3s in -lGL... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glVertex3s in -lGL" >&5 ++echo $ECHO_N "checking for glVertex3s in -lGL... $ECHO_C" >&6; } + if test "${ac_cv_lib_GL_glVertex3s+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24174,56 +25188,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glVertex3s (); + int + main () + { +-glVertex3s (); ++return glVertex3s (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_glVertex3s=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GL_glVertex3s=no ++ ac_cv_lib_GL_glVertex3s=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3s" >&5 +-echo "${ECHO_T}$ac_cv_lib_GL_glVertex3s" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3s" >&5 ++echo "${ECHO_T}$ac_cv_lib_GL_glVertex3s" >&6; } + if test $ac_cv_lib_GL_glVertex3s = yes; then + GL_LIBS="-lGL $STDCXX_LIB $THREAD_LIB" + have_GL=yes +@@ -24237,8 +25248,8 @@ + # MesaGL + if test "x$have_GL" = "xno" ; then + # if no GL, check for MesaGL +- echo "$as_me:$LINENO: checking for glVertex3d in -lMesaGL" >&5 +-echo $ECHO_N "checking for glVertex3d in -lMesaGL... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glVertex3d in -lMesaGL" >&5 ++echo $ECHO_N "checking for glVertex3d in -lMesaGL... $ECHO_C" >&6; } + if test "${ac_cv_lib_MesaGL_glVertex3d+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24251,56 +25262,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char glVertex3d (); + int + main () + { +-glVertex3d (); ++return glVertex3d (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_MesaGL_glVertex3d=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_MesaGL_glVertex3d=no ++ ac_cv_lib_MesaGL_glVertex3d=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glVertex3d" >&5 +-echo "${ECHO_T}$ac_cv_lib_MesaGL_glVertex3d" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glVertex3d" >&5 ++echo "${ECHO_T}$ac_cv_lib_MesaGL_glVertex3d" >&6; } + if test $ac_cv_lib_MesaGL_glVertex3d = yes; then + GL_LIBS="-lMesaGL" + have_GL=yes +@@ -24321,8 +25329,8 @@ + have_GLU=no + have_SGI_GLU=no + +- echo "$as_me:$LINENO: checking for gluSphere in -lGLU" >&5 +-echo $ECHO_N "checking for gluSphere in -lGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluSphere in -lGLU" >&5 ++echo $ECHO_N "checking for gluSphere in -lGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLU_gluSphere+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24335,56 +25343,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluSphere (); + int + main () + { +-gluSphere (); ++return gluSphere (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluSphere=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLU_gluSphere=no ++ ac_cv_lib_GLU_gluSphere=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluSphere" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLU_gluSphere" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluSphere" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLU_gluSphere" >&6; } + if test $ac_cv_lib_GLU_gluSphere = yes; then + GL_LIBS="-lGLU $GL_LIBS" + have_GLU=yes +@@ -24392,8 +25397,8 @@ + + if test "x$ac_cv_lib_GLU_gluSphere" = "xno" ; then + # GLU may need to be linked with the thread library explicitly +- echo "$as_me:$LINENO: checking for gluCylinder in -lGLU" >&5 +-echo $ECHO_N "checking for gluCylinder in -lGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluCylinder in -lGLU" >&5 ++echo $ECHO_N "checking for gluCylinder in -lGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLU_gluCylinder+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24406,56 +25411,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluCylinder (); + int + main () + { +-gluCylinder (); ++return gluCylinder (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluCylinder=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLU_gluCylinder=no ++ ac_cv_lib_GLU_gluCylinder=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluCylinder" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLU_gluCylinder" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluCylinder" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLU_gluCylinder" >&6; } + if test $ac_cv_lib_GLU_gluCylinder = yes; then + GL_LIBS="-lGLU $GL_LIBS $THREAD_LIB" + have_GLU=yes +@@ -24463,8 +25465,8 @@ + + if test "x$ac_cv_lib_GLU_gluCylinder" = "xno" ; then + # GLU may need to be linked with std C++ library explicitly +- echo "$as_me:$LINENO: checking for gluDisk in -lGLU" >&5 +-echo $ECHO_N "checking for gluDisk in -lGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluDisk in -lGLU" >&5 ++echo $ECHO_N "checking for gluDisk in -lGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLU_gluDisk+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24477,56 +25479,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluDisk (); + int + main () + { +-gluDisk (); ++return gluDisk (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluDisk=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLU_gluDisk=no ++ ac_cv_lib_GLU_gluDisk=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluDisk" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLU_gluDisk" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluDisk" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLU_gluDisk" >&6; } + if test $ac_cv_lib_GLU_gluDisk = yes; then + GL_LIBS="-lGLU $GL_LIBS $STDCXX_LIB" + have_GLU=yes +@@ -24535,8 +25534,8 @@ + + if test "x$ac_cv_lib_GLU_gluDisk" = "xno" ; then + # GLU may need to be linked with std C++ and thread libraries explicitly +- echo "$as_me:$LINENO: checking for gluPartialDisk in -lGLU" >&5 +-echo $ECHO_N "checking for gluPartialDisk in -lGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluPartialDisk in -lGLU" >&5 ++echo $ECHO_N "checking for gluPartialDisk in -lGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLU_gluPartialDisk+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24549,56 +25548,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluPartialDisk (); + int + main () + { +-gluPartialDisk (); ++return gluPartialDisk (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? ++ cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluPartialDisk=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLU_gluPartialDisk=no ++ ac_cv_lib_GLU_gluPartialDisk=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluPartialDisk" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLU_gluPartialDisk" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluPartialDisk" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLU_gluPartialDisk" >&6; } + if test $ac_cv_lib_GLU_gluPartialDisk = yes; then + GL_LIBS="-lGLU $GL_LIBS $STDCXX_LIB $THREAD_LIB" + have_GLU=yes +@@ -24611,8 +25607,8 @@ + + if test "x$have_GLU" = "xno" ; then + # if no GLU, check for MesaGLU +- echo "$as_me:$LINENO: checking for gluSphere in -lMesaGLU" >&5 +-echo $ECHO_N "checking for gluSphere in -lMesaGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluSphere in -lMesaGLU" >&5 ++echo $ECHO_N "checking for gluSphere in -lMesaGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_MesaGLU_gluSphere+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24625,56 +25621,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluSphere (); + int + main () + { +-gluSphere (); ++return gluSphere (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_MesaGLU_gluSphere=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_MesaGLU_gluSphere=no ++ ac_cv_lib_MesaGLU_gluSphere=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGLU_gluSphere" >&5 +-echo "${ECHO_T}$ac_cv_lib_MesaGLU_gluSphere" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGLU_gluSphere" >&5 ++echo "${ECHO_T}$ac_cv_lib_MesaGLU_gluSphere" >&6; } + if test $ac_cv_lib_MesaGLU_gluSphere = yes; then + GL_LIBS="-lMesaGLU $GL_LIBS" + have_GLU=yes +@@ -24695,8 +25688,8 @@ + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" + +- echo "$as_me:$LINENO: checking for gluBeginCurve in -lGLU" >&5 +-echo $ECHO_N "checking for gluBeginCurve in -lGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluBeginCurve in -lGLU" >&5 ++echo $ECHO_N "checking for gluBeginCurve in -lGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLU_gluBeginCurve+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24709,63 +25702,60 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluBeginCurve (); + int + main () + { +-gluBeginCurve (); ++return gluBeginCurve (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluBeginCurve=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLU_gluBeginCurve=no ++ ac_cv_lib_GLU_gluBeginCurve=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginCurve" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLU_gluBeginCurve" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginCurve" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLU_gluBeginCurve" >&6; } + if test $ac_cv_lib_GLU_gluBeginCurve = yes; then + have_SGI_GLU=no + fi + + if test "x$ac_cv_lib_GLU_gluBeginCurve" = "xno" ; then +- echo "$as_me:$LINENO: checking for gluBeginPolygon in -lGLU" >&5 +-echo $ECHO_N "checking for gluBeginPolygon in -lGLU... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluBeginPolygon in -lGLU" >&5 ++echo $ECHO_N "checking for gluBeginPolygon in -lGLU... $ECHO_C" >&6; } + if test "${ac_cv_lib_GLU_gluBeginPolygon+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24778,56 +25768,53 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char gluBeginPolygon (); + int + main () + { +-gluBeginPolygon (); ++return gluBeginPolygon (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluBeginPolygon=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_GLU_gluBeginPolygon=no ++ ac_cv_lib_GLU_gluBeginPolygon=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginPolygon" >&5 +-echo "${ECHO_T}$ac_cv_lib_GLU_gluBeginPolygon" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginPolygon" >&5 ++echo "${ECHO_T}$ac_cv_lib_GLU_gluBeginPolygon" >&6; } + if test $ac_cv_lib_GLU_gluBeginPolygon = yes; then + GL_LIBS="$GL_LIBS $STDCXX_LIB" + have_SGI_GLU=yes +@@ -24838,17 +25825,17 @@ + LDFLAGS="$save_LDFLAGS" + fi + +- echo "$as_me:$LINENO: checking whether libGLU needs to be linked with the std C++ library" >&5 +-echo $ECHO_N "checking whether libGLU needs to be linked with the std C++ library... $ECHO_C" >&6 +- echo "$as_me:$LINENO: result: $have_SGI_GLU" >&5 +-echo "${ECHO_T}$have_SGI_GLU" >&6 ++ { echo "$as_me:$LINENO: checking whether libGLU needs to be linked with the std C++ library" >&5 ++echo $ECHO_N "checking whether libGLU needs to be linked with the std C++ library... $ECHO_C" >&6; } ++ { echo "$as_me:$LINENO: result: $have_SGI_GLU" >&5 ++echo "${ECHO_T}$have_SGI_GLU" >&6; } + + # Checks for some types in gdk/GL/glxext.h + + # GLXFBConfigSGIX + GDKGLEXT_NEED_GLXFBCONFIGSGIX_TYPEDEF=no +- echo "$as_me:$LINENO: checking for GLXFBConfigSGIX" >&5 +-echo $ECHO_N "checking for GLXFBConfigSGIX... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for GLXFBConfigSGIX" >&5 ++echo $ECHO_N "checking for GLXFBConfigSGIX... $ECHO_C" >&6; } + if test "${ac_cv_type_GLXFBConfigSGIX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24860,50 +25847,47 @@ + /* end confdefs.h. */ + #include + ++typedef GLXFBConfigSGIX ac__type_new_; + int + main () + { +-if ((GLXFBConfigSGIX *) 0) ++if ((ac__type_new_ *) 0) + return 0; +-if (sizeof (GLXFBConfigSGIX)) ++if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_type_GLXFBConfigSGIX=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_GLXFBConfigSGIX=no ++ ac_cv_type_GLXFBConfigSGIX=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_GLXFBConfigSGIX" >&5 +-echo "${ECHO_T}$ac_cv_type_GLXFBConfigSGIX" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_type_GLXFBConfigSGIX" >&5 ++echo "${ECHO_T}$ac_cv_type_GLXFBConfigSGIX" >&6; } + if test $ac_cv_type_GLXFBConfigSGIX = yes; then + + cat >>confdefs.h <<_ACEOF +@@ -24919,8 +25903,8 @@ + + # GLXFBConfigIDSGIX + GDKGLEXT_NEED_GLXFBCONFIGIDSGIX_TYPEDEF=no +- echo "$as_me:$LINENO: checking for GLXFBConfigIDSGIX" >&5 +-echo $ECHO_N "checking for GLXFBConfigIDSGIX... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for GLXFBConfigIDSGIX" >&5 ++echo $ECHO_N "checking for GLXFBConfigIDSGIX... $ECHO_C" >&6; } + if test "${ac_cv_type_GLXFBConfigIDSGIX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -24932,50 +25916,47 @@ + /* end confdefs.h. */ + #include + ++typedef GLXFBConfigIDSGIX ac__type_new_; + int + main () + { +-if ((GLXFBConfigIDSGIX *) 0) ++if ((ac__type_new_ *) 0) + return 0; +-if (sizeof (GLXFBConfigIDSGIX)) ++if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_type_GLXFBConfigIDSGIX=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_GLXFBConfigIDSGIX=no ++ ac_cv_type_GLXFBConfigIDSGIX=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_GLXFBConfigIDSGIX" >&5 +-echo "${ECHO_T}$ac_cv_type_GLXFBConfigIDSGIX" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_type_GLXFBConfigIDSGIX" >&5 ++echo "${ECHO_T}$ac_cv_type_GLXFBConfigIDSGIX" >&6; } + if test $ac_cv_type_GLXFBConfigIDSGIX = yes; then + + cat >>confdefs.h <<_ACEOF +@@ -24991,8 +25972,8 @@ + + # GLXPbufferSGIX + GDKGLEXT_NEED_GLXPBUFFERSGIX_TYPEDEF=no +- echo "$as_me:$LINENO: checking for GLXPbufferSGIX" >&5 +-echo $ECHO_N "checking for GLXPbufferSGIX... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for GLXPbufferSGIX" >&5 ++echo $ECHO_N "checking for GLXPbufferSGIX... $ECHO_C" >&6; } + if test "${ac_cv_type_GLXPbufferSGIX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -25004,50 +25985,47 @@ + /* end confdefs.h. */ + #include + ++typedef GLXPbufferSGIX ac__type_new_; + int + main () + { +-if ((GLXPbufferSGIX *) 0) ++if ((ac__type_new_ *) 0) + return 0; +-if (sizeof (GLXPbufferSGIX)) ++if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_type_GLXPbufferSGIX=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_GLXPbufferSGIX=no ++ ac_cv_type_GLXPbufferSGIX=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_GLXPbufferSGIX" >&5 +-echo "${ECHO_T}$ac_cv_type_GLXPbufferSGIX" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_type_GLXPbufferSGIX" >&5 ++echo "${ECHO_T}$ac_cv_type_GLXPbufferSGIX" >&6; } + if test $ac_cv_type_GLXPbufferSGIX = yes; then + + cat >>confdefs.h <<_ACEOF +@@ -25063,8 +26041,8 @@ + + # GLXVideoSourceSGIX + GDKGLEXT_NEED_GLXVIDEOSOURCESGIX_TYPEDEF=no +- echo "$as_me:$LINENO: checking for GLXVideoSourceSGIX" >&5 +-echo $ECHO_N "checking for GLXVideoSourceSGIX... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for GLXVideoSourceSGIX" >&5 ++echo $ECHO_N "checking for GLXVideoSourceSGIX... $ECHO_C" >&6; } + if test "${ac_cv_type_GLXVideoSourceSGIX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -25076,50 +26054,47 @@ + /* end confdefs.h. */ + #include + ++typedef GLXVideoSourceSGIX ac__type_new_; + int + main () + { +-if ((GLXVideoSourceSGIX *) 0) ++if ((ac__type_new_ *) 0) + return 0; +-if (sizeof (GLXVideoSourceSGIX)) ++if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_type_GLXVideoSourceSGIX=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_GLXVideoSourceSGIX=no ++ ac_cv_type_GLXVideoSourceSGIX=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_GLXVideoSourceSGIX" >&5 +-echo "${ECHO_T}$ac_cv_type_GLXVideoSourceSGIX" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_type_GLXVideoSourceSGIX" >&5 ++echo "${ECHO_T}$ac_cv_type_GLXVideoSourceSGIX" >&6; } + if test $ac_cv_type_GLXVideoSourceSGIX = yes; then + + cat >>confdefs.h <<_ACEOF +@@ -25135,8 +26110,8 @@ + + # __GLXextFuncPtr + GDKGLEXT_NEED_GLXEXTFUNCPTR_TYPEDEF=no +- echo "$as_me:$LINENO: checking for __GLXextFuncPtr" >&5 +-echo $ECHO_N "checking for __GLXextFuncPtr... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for __GLXextFuncPtr" >&5 ++echo $ECHO_N "checking for __GLXextFuncPtr... $ECHO_C" >&6; } + if test "${ac_cv_type___GLXextFuncPtr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -25148,50 +26123,47 @@ + /* end confdefs.h. */ + #include + ++typedef __GLXextFuncPtr ac__type_new_; + int + main () + { +-if ((__GLXextFuncPtr *) 0) ++if ((ac__type_new_ *) 0) + return 0; +-if (sizeof (__GLXextFuncPtr)) ++if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_type___GLXextFuncPtr=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type___GLXextFuncPtr=no ++ ac_cv_type___GLXextFuncPtr=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type___GLXextFuncPtr" >&5 +-echo "${ECHO_T}$ac_cv_type___GLXextFuncPtr" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_type___GLXextFuncPtr" >&5 ++echo "${ECHO_T}$ac_cv_type___GLXextFuncPtr" >&6; } + if test $ac_cv_type___GLXextFuncPtr = yes; then + + cat >>confdefs.h <<_ACEOF +@@ -25205,12 +26177,11 @@ + GDKGLEXT_NEED_GLXEXTFUNCPTR_TYPEDEF=yes + fi + +-else +- ++elif test "x$gdktarget" = "xwin32"; then + # for Win32 + +- echo "$as_me:$LINENO: checking for glNewList in -lopengl32" >&5 +-echo $ECHO_N "checking for glNewList in -lopengl32... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for glNewList in -lopengl32" >&5 ++echo $ECHO_N "checking for glNewList in -lopengl32... $ECHO_C" >&6; } + have_opengl32=no + LIBS="-lopengl32 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +@@ -25230,46 +26201,44 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + GL_LIBS="-lopengl32" + have_opengl32=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +- echo "$as_me:$LINENO: result: $have_opengl32" >&5 +-echo "${ECHO_T}$have_opengl32" >&6 ++ { echo "$as_me:$LINENO: result: $have_opengl32" >&5 ++echo "${ECHO_T}$have_opengl32" >&6; } + if test "x$have_opengl32" = "xno" ; then + { { echo "$as_me:$LINENO: error: Cannot find GL library" >&5 + echo "$as_me: error: Cannot find GL library" >&2;} + { (exit 1); exit 1; }; } + fi + +- echo "$as_me:$LINENO: checking for gluNewQuadric in -lglu32" >&5 +-echo $ECHO_N "checking for gluNewQuadric in -lglu32... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for gluNewQuadric in -lglu32" >&5 ++echo $ECHO_N "checking for gluNewQuadric in -lglu32... $ECHO_C" >&6; } + have_glu32=no + LIBS="-lglu32 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +@@ -25290,38 +26259,36 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + GL_LIBS="-lglu32 $GL_LIBS" + have_glu32=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +- echo "$as_me:$LINENO: result: $have_glu32" >&5 +-echo "${ECHO_T}$have_glu32" >&6 ++ { echo "$as_me:$LINENO: result: $have_glu32" >&5 ++echo "${ECHO_T}$have_glu32" >&6; } + if test "x$have_glu32" = "xno" ; then + { { echo "$as_me:$LINENO: error: Cannot find GLU library" >&5 + echo "$as_me: error: Cannot find GLU library" >&2;} +@@ -25330,6 +26297,10 @@ + + + ++else ++#quartz ++ GL_LIBS="-framework OpenGL -framework AppKit" ++ save_CPPFLAGS ="$save_CPPFLAGS $BASE_DEPENDENCIES_CFLAGS" + fi + + +@@ -25337,8 +26308,8 @@ + + # GLhalfNV + GDKGLEXT_NEED_GLHALFNV_TYPEDEF=no +-echo "$as_me:$LINENO: checking for GLhalfNV" >&5 +-echo $ECHO_N "checking for GLhalfNV... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for GLhalfNV" >&5 ++echo $ECHO_N "checking for GLhalfNV... $ECHO_C" >&6; } + if test "${ac_cv_type_GLhalfNV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -25350,50 +26321,47 @@ + /* end confdefs.h. */ + #include + ++typedef GLhalfNV ac__type_new_; + int + main () + { +-if ((GLhalfNV *) 0) ++if ((ac__type_new_ *) 0) + return 0; +-if (sizeof (GLhalfNV)) ++if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_type_GLhalfNV=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_GLhalfNV=no ++ ac_cv_type_GLhalfNV=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_GLhalfNV" >&5 +-echo "${ECHO_T}$ac_cv_type_GLhalfNV" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_type_GLhalfNV" >&5 ++echo "${ECHO_T}$ac_cv_type_GLhalfNV" >&6; } + if test $ac_cv_type_GLhalfNV = yes; then + + cat >>confdefs.h <<_ACEOF +@@ -25420,7 +26388,12 @@ + # CFLAGS and LIBS + ################################################## + ++if test "x$gdktarget" != "xquartz"; then + GDKGLEXT_PACKAGES="gdk-2.0 pango pangox gmodule-2.0" ++else ++GDKGLEXT_PACKAGES="gdk-2.0 pango gmodule-2.0" ++fi ++ + GDKGLEXT_EXTRA_CFLAGS="$GL_CFLAGS $GDKGLEXT_WIN_CFLAGS" + GDKGLEXT_EXTRA_LIBS="$GL_LIBS $GDKGLEXT_WIN_LIBS" + GDKGLEXT_DEP_CFLAGS="$GDKGLEXT_EXTRA_CFLAGS `$PKG_CONFIG --cflags $GDKGLEXT_PACKAGES`" +@@ -25456,11 +26429,11 @@ + ################################################## + + +-# Check whether --with-html-dir or --without-html-dir was given. ++# Check whether --with-html-dir was given. + if test "${with_html_dir+set}" = set; then +- withval="$with_html_dir" ++ withval=$with_html_dir; ++fi + +-fi; + + if test "x$with_html_dir" = "x" ; then + HTML_DIR='${datadir}/gtk-doc/html' +@@ -25470,13 +26443,13 @@ + + + +-# Check whether --enable-gtk-doc or --disable-gtk-doc was given. ++# Check whether --enable-gtk-doc was given. + if test "${enable_gtk_doc+set}" = set; then +- enableval="$enable_gtk_doc" +- ++ enableval=$enable_gtk_doc; + else + enable_gtk_doc=no +-fi; ++fi ++ + + if test "x$enable_gtk_doc" = "xyes" ; then + +@@ -25484,8 +26457,8 @@ + + # Extract the first word of "gtkdoc-mkdb", so it can be a program name with args. + set dummy gtkdoc-mkdb; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_GTKDOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -25498,31 +26471,33 @@ + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GTKDOC="true" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + test -z "$ac_cv_prog_GTKDOC" && ac_cv_prog_GTKDOC="false" + fi + fi + GTKDOC=$ac_cv_prog_GTKDOC + if test -n "$GTKDOC"; then +- echo "$as_me:$LINENO: result: $GTKDOC" >&5 +-echo "${ECHO_T}$GTKDOC" >&6 ++ { echo "$as_me:$LINENO: result: $GTKDOC" >&5 ++echo "${ECHO_T}$GTKDOC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + + ++ + if $GTKDOC ; then + gtk_doc_version=`gtkdoc-mkdb --version` +- echo "$as_me:$LINENO: checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version" >&5 +-echo $ECHO_N "checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version" >&5 ++echo $ECHO_N "checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version... $ECHO_C" >&6; } + + IFS="${IFS= }"; gtk_save_IFS="$IFS"; IFS="." + set $gtk_doc_version +@@ -25536,11 +26511,11 @@ + IFS="$gtk_save_IFS" + + if $GTKDOC ; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + fi + +@@ -25550,9 +26525,7 @@ + + fi + +- +- +-if test "x$enable_gtk_doc" = "xyes"; then ++ if test "x$enable_gtk_doc" = "xyes"; then + ENABLE_GTK_DOC_TRUE= + ENABLE_GTK_DOC_FALSE='#' + else +@@ -25566,7 +26539,7 @@ + # Output configuration header + ################################################## + +- ac_config_commands="$ac_config_commands gdk/gdkglext-config.h" ++ac_config_commands="$ac_config_commands gdk/gdkglext-config.h" + + + +@@ -25574,7 +26547,7 @@ + # Config files + ################################################## + +- ac_config_files="$ac_config_files gdkglext.pc gtkglext.pc gdkglext-uninstalled.pc gtkglext-uninstalled.pc gtkglext.spec gtkglext.nsi Makefile gdk/Makefile gdk/gdkglversion.h gdk/glext/Makefile gdk/x11/Makefile gdk/win32/Makefile gtk/Makefile gtk/gtkglversion.h m4macros/Makefile docs/Makefile docs/reference/Makefile docs/reference/gtkglext/Makefile docs/reference/gtkglext/version.xml examples/Makefile examples/glade/Makefile" ++ac_config_files="$ac_config_files gdkglext.pc gtkglext.pc gdkglext-uninstalled.pc gtkglext-uninstalled.pc gtkglext.spec gtkglext.nsi Makefile gdk/Makefile gdk/gdkglversion.h gdk/glext/Makefile gdk/x11/Makefile gdk/win32/Makefile gdk/quartz/Makefile gtk/Makefile gtk/gtkglversion.h docs/Makefile docs/reference/Makefile docs/reference/gtkglext/Makefile docs/reference/gtkglext/version.xml examples/Makefile examples/glade/Makefile" + + + cat >confcache <<\_ACEOF +@@ -25595,39 +26568,58 @@ + + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. +-# So, don't put newlines in cache variables' values. ++# So, we kill variables containing newlines. + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done ++ + (set) 2>&1 | +- case `(ac_space=' '; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space=' '; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" +- ;; ++ ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} | ++ esac | ++ sort ++) | + sed ' ++ /^ac_cv_env_/b end + t clear +- : clear ++ :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end +- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ +- : end' >>confcache +-if diff $cache_file confcache >/dev/null 2>&1; then :; else +- if test -w $cache_file; then +- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ++ :end' >>confcache ++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else ++ if test -w "$cache_file"; then ++ test "x$cache_file" != "x/dev/null" && ++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5 ++echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else +- echo "not updating unwritable cache $cache_file" ++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 ++echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi + rm -f confcache +@@ -25636,32 +26628,18 @@ + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +-# trailing colons and then remove the whole line if VPATH becomes empty +-# (actually we leave an empty line to preserve line numbers). +-if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/; +-s/:*\${srcdir}:*/:/; +-s/:*@srcdir@:*/:/; +-s/^\([^=]*=[ ]*\):*/\1/; +-s/:*$//; +-s/^[^=]*=[ ]*$//; +-}' +-fi +- + DEFS=-DHAVE_CONFIG_H + + ac_libobjs= + ac_ltlibobjs= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. +- ac_i=`echo "$ac_i" | +- sed 's/\$U\././;s/\.o$//;s/\.obj$//'` +- # 2. Add them. +- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" +- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ++ ac_i=`echo "$ac_i" | sed "$ac_script"` ++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR ++ # will be set to the directory where LIBOBJS objects are built. ++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + +@@ -25717,6 +26695,20 @@ + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi ++if test -z "${TARGET_QUARTZ_TRUE}" && test -z "${TARGET_QUARTZ_FALSE}"; then ++ { { echo "$as_me:$LINENO: error: conditional \"TARGET_QUARTZ\" was never defined. ++Usually this means the macro was only invoked conditionally." >&5 ++echo "$as_me: error: conditional \"TARGET_QUARTZ\" was never defined. ++Usually this means the macro was only invoked conditionally." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then ++ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. ++Usually this means the macro was only invoked conditionally." >&5 ++echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. ++Usually this means the macro was only invoked conditionally." >&2;} ++ { (exit 1); exit 1; }; } ++fi + if test -z "${MULTIHEAD_SUPPORT_TRUE}" && test -z "${MULTIHEAD_SUPPORT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MULTIHEAD_SUPPORT\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +@@ -25783,17 +26775,45 @@ + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then +- set -o posix ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ echo "#! /bin/sh" >conf$$.sh ++ echo "exit 0" >>conf$$.sh ++ chmod +x conf$$.sh ++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ++ PATH_SEPARATOR=';' ++ else ++ PATH_SEPARATOR=: ++ fi ++ rm -f conf$$.sh + fi +-DUALCASE=1; export DUALCASE # for MKS sh + + # Support unset when possible. + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -25803,8 +26823,43 @@ + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++as_nl=' ++' ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# We did not find ourselves, most probably we were run as `sh COMMAND' ++# in which case we are not to be found in the path. ++if test "x$as_myself" = x; then ++ as_myself=$0 ++fi ++if test ! -f "$as_myself"; then ++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' +@@ -25818,18 +26873,19 @@ + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else +- $as_unset $as_var ++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi + done + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -25837,159 +26893,120 @@ + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- +- +-# PATH needs CR, and LINENO needs CR and PATH. +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' +- else +- PATH_SEPARATOR=: +- fi +- rm -f conf$$.sh +-fi ++# CDPATH. ++$as_unset CDPATH + + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" || { +- # Find who we are. Look in the path if we contain no path at all +- # relative or not. +- case $0 in +- *[\\/]* ) as_myself=$0 ;; +- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done + +- ;; +- esac +- # We did not find ourselves, most probably we were run as `sh COMMAND' +- # in which case we are not to be found in the path. +- if test "x$as_myself" = x; then +- as_myself=$0 +- fi +- if test ! -f "$as_myself"; then +- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} +- { (exit 1); exit 1; }; } +- fi +- case $CONFIG_SHELL in +- '') +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for as_base in sh bash ksh sh5; do +- case $as_dir in +- /*) +- if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then +- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } +- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } +- CONFIG_SHELL=$as_dir/$as_base +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$0" ${1+"$@"} +- fi;; +- esac +- done +-done +-;; +- esac ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line before each line; the second 'sed' does the real +- # work. The second script uses 'N' to pair each line-number line +- # with the numbered line, and appends trailing '-' during +- # substitution so that $LINENO is not a special case at line end. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, and appends ++ # trailing '-' during substitution so that $LINENO is not a special ++ # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) +- sed '=' <$as_myself | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || +- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ++ chmod +x "$as_me.lineno" || ++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensible to this). +- . ./$as_me.lineno ++ # original and so on. Autoconf is especially sensitive to this). ++ . "./$as_me.lineno" + # Exit status is that of the last command. + exit + } + + +-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in +- *c*,-n*) ECHO_N= ECHO_C=' +-' ECHO_T=' ' ;; +- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; +- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir ++fi + echo >conf$$.file + if ln -s conf$$.file conf$$ 2>/dev/null; then +- # We could just check for DJGPP; but this test a) works b) is more generic +- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). +- if test -f conf$$.exe; then +- # Don't use ln at all; we don't have any links ++ as_ln_s='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +- else +- as_ln_s='ln -s' +- fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +-rm -f conf$$ conf$$.exe conf$$.file ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +@@ -25998,7 +27015,28 @@ + as_mkdir_p=false + fi + +-as_executable_p="test -f" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -26007,31 +27045,14 @@ + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +-# IFS +-# We need space, tab and new line, in precisely that order. +-as_nl=' +-' +-IFS=" $as_nl" +- +-# CDPATH. +-$as_unset CDPATH +- +-exec 6>&1 +- +-# Open the log real soon, to keep \$[0] and so on meaningful, and to +-# report actual input values of CONFIG_FILES etc. instead of their +-# values after options handling. Logging --version etc. is OK. +-exec 5>>config.log +-{ +- echo +- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +-## Running $as_me. ## +-_ASBOX +-} >&5 +-cat >&5 <<_CSEOF ++exec 6>&1 + ++# Save the log message, to keep $[0] and so on meaningful, and to ++# report actual input values of CONFIG_FILES etc. instead of their ++# values after options handling. ++ac_log=" + This file was extended by gtkglext $as_me 1.2.0, which was +-generated by GNU Autoconf 2.59. Invocation command line was ++generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -26039,30 +27060,20 @@ + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +-_CSEOF +-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +-echo >&5 ++on `(hostname || uname -n) 2>/dev/null | sed 1q` ++" ++ + _ACEOF + ++cat >>$CONFIG_STATUS <<_ACEOF + # Files that config.status was made for. +-if test -n "$ac_config_files"; then +- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_headers"; then +- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +-fi ++config_files="$ac_config_files" ++config_headers="$ac_config_headers" ++config_commands="$ac_config_commands" + +-if test -n "$ac_config_links"; then +- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_commands"; then +- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +-fi ++_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF +- + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. +@@ -26070,7 +27081,7 @@ + Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit +- -V, --version print version number, then exit ++ -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions +@@ -26089,19 +27100,22 @@ + $config_commands + + Report bugs to ." +-_ACEOF + ++_ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ + gtkglext config.status 1.2.0 +-configured by $0, generated by GNU Autoconf 2.59, +- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" ++configured by $0, generated by GNU Autoconf 2.61, ++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +-Copyright (C) 2003 Free Software Foundation, Inc. ++Copyright (C) 2006 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." +-srcdir=$srcdir +-INSTALL="$INSTALL" ++ ++ac_pwd='$ac_pwd' ++srcdir='$srcdir' ++INSTALL='$INSTALL' ++MKDIR_P='$MKDIR_P' + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF +@@ -26112,39 +27126,24 @@ + do + case $1 in + --*=*) +- ac_option=`expr "x$1" : 'x\([^=]*\)='` +- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; +- -*) ++ *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; +- *) # This is not an option, so the user has probably given explicit +- # arguments. +- ac_option=$1 +- ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; +- --version | --vers* | -V ) +- echo "$ac_cs_version"; exit 0 ;; +- --he | --h) +- # Conflict between --help and --header +- { { echo "$as_me:$LINENO: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2;} +- { (exit 1); exit 1; }; };; +- --help | --hel | -h ) +- echo "$ac_cs_usage"; exit 0 ;; +- --debug | --d* | -d ) ++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) ++ echo "$ac_cs_version"; exit ;; ++ --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift +@@ -26154,18 +27153,24 @@ + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; ++ --he | --h) ++ # Conflict between --help and --header ++ { echo "$as_me: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&2 ++ { (exit 1); exit 1; }; };; ++ --help | --hel | -h ) ++ echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. +- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&2;} ++ -*) { echo "$as_me: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + +- *) ac_config_targets="$ac_config_targets $1" ;; ++ *) ac_config_targets="$ac_config_targets $1" ++ ac_need_defaults=false ;; + + esac + shift +@@ -26181,17 +27186,28 @@ + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + if \$ac_cs_recheck; then +- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 +- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ++ CONFIG_SHELL=$SHELL ++ export CONFIG_SHELL ++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + fi + + _ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF ++exec 5>>config.log ++{ ++ echo ++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ++## Running $as_me. ## ++_ASBOX ++ echo "$ac_log" ++} >&5 + ++_ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + # +-# INIT-COMMANDS section. ++# INIT-COMMANDS + # +- + AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +@@ -26201,6 +27217,9 @@ + elif test "x$gdktarget" = "xwin32" ; then + gdkglext_windowing=' + #define GDKGLEXT_WINDOWING_WIN32' ++elif test "x$gdktarget" = "xquartz" ; then ++ gdkglext_windowing=' ++#define GDKGLEXT_WINDOWING_QUARTZ' + fi + + if test "x$GDKGLEXT_MULTIHEAD_SUPPORT" = "xyes"; then +@@ -26242,43 +27261,44 @@ + + _ACEOF + +- +- + cat >>$CONFIG_STATUS <<\_ACEOF ++ ++# Handling of arguments. + for ac_config_target in $ac_config_targets + do +- case "$ac_config_target" in +- # Handling of arguments. +- "gdkglext.pc" ) CONFIG_FILES="$CONFIG_FILES gdkglext.pc" ;; +- "gtkglext.pc" ) CONFIG_FILES="$CONFIG_FILES gtkglext.pc" ;; +- "gdkglext-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES gdkglext-uninstalled.pc" ;; +- "gtkglext-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES gtkglext-uninstalled.pc" ;; +- "gtkglext.spec" ) CONFIG_FILES="$CONFIG_FILES gtkglext.spec" ;; +- "gtkglext.nsi" ) CONFIG_FILES="$CONFIG_FILES gtkglext.nsi" ;; +- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; +- "gdk/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdk/Makefile" ;; +- "gdk/gdkglversion.h" ) CONFIG_FILES="$CONFIG_FILES gdk/gdkglversion.h" ;; +- "gdk/glext/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdk/glext/Makefile" ;; +- "gdk/x11/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdk/x11/Makefile" ;; +- "gdk/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdk/win32/Makefile" ;; +- "gtk/Makefile" ) CONFIG_FILES="$CONFIG_FILES gtk/Makefile" ;; +- "gtk/gtkglversion.h" ) CONFIG_FILES="$CONFIG_FILES gtk/gtkglversion.h" ;; +- "m4macros/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4macros/Makefile" ;; +- "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; +- "docs/reference/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; +- "docs/reference/gtkglext/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/reference/gtkglext/Makefile" ;; +- "docs/reference/gtkglext/version.xml" ) CONFIG_FILES="$CONFIG_FILES docs/reference/gtkglext/version.xml" ;; +- "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; +- "examples/glade/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/glade/Makefile" ;; +- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; +- "gdk/gdkglext-config.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gdk/gdkglext-config.h" ;; +- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ case $ac_config_target in ++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; ++ "gdk/gdkglext-config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gdk/gdkglext-config.h" ;; ++ "gdkglext.pc") CONFIG_FILES="$CONFIG_FILES gdkglext.pc" ;; ++ "gtkglext.pc") CONFIG_FILES="$CONFIG_FILES gtkglext.pc" ;; ++ "gdkglext-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES gdkglext-uninstalled.pc" ;; ++ "gtkglext-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES gtkglext-uninstalled.pc" ;; ++ "gtkglext.spec") CONFIG_FILES="$CONFIG_FILES gtkglext.spec" ;; ++ "gtkglext.nsi") CONFIG_FILES="$CONFIG_FILES gtkglext.nsi" ;; ++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; ++ "gdk/Makefile") CONFIG_FILES="$CONFIG_FILES gdk/Makefile" ;; ++ "gdk/gdkglversion.h") CONFIG_FILES="$CONFIG_FILES gdk/gdkglversion.h" ;; ++ "gdk/glext/Makefile") CONFIG_FILES="$CONFIG_FILES gdk/glext/Makefile" ;; ++ "gdk/x11/Makefile") CONFIG_FILES="$CONFIG_FILES gdk/x11/Makefile" ;; ++ "gdk/win32/Makefile") CONFIG_FILES="$CONFIG_FILES gdk/win32/Makefile" ;; ++ "gdk/quartz/Makefile") CONFIG_FILES="$CONFIG_FILES gdk/quartz/Makefile" ;; ++ "gtk/Makefile") CONFIG_FILES="$CONFIG_FILES gtk/Makefile" ;; ++ "gtk/gtkglversion.h") CONFIG_FILES="$CONFIG_FILES gtk/gtkglversion.h" ;; ++ "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; ++ "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; ++ "docs/reference/gtkglext/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/gtkglext/Makefile" ;; ++ "docs/reference/gtkglext/version.xml") CONFIG_FILES="$CONFIG_FILES docs/reference/gtkglext/version.xml" ;; ++ "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; ++ "examples/glade/Makefile") CONFIG_FILES="$CONFIG_FILES examples/glade/Makefile" ;; ++ + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 + echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac + done + ++ + # If the user did not use the arguments to specify the items to instantiate, + # then the envvar interface is used. Set only those that are not. + # We use the long form for the default assignment because of an extremely +@@ -26290,434 +27310,543 @@ + fi + + # Have a temporary directory for convenience. Make it in the build tree +-# simply because there is no reason to put it here, and in addition, ++# simply because there is no reason against having it here, and in addition, + # creating and moving files from /tmp can sometimes cause problems. +-# Create a temporary directory, and hook for its removal unless debugging. ++# Hook for its removal unless debugging. ++# Note that there is a small window in which the directory will not be cleaned: ++# after its creation but before its name has been assigned to `$tmp'. + $debug || + { +- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ++ tmp= ++ trap 'exit_status=$? ++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 + } +- + # Create a (secure) tmp directory for tmp files. + + { +- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { +- tmp=./confstat$$-$RANDOM +- (umask 077 && mkdir $tmp) ++ tmp=./conf$$-$RANDOM ++ (umask 077 && mkdir "$tmp") + } || + { + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } + } + +-_ACEOF +- +-cat >>$CONFIG_STATUS <<_ACEOF +- + # +-# CONFIG_FILES section. ++# Set up the sed scripts for CONFIG_FILES section. + # + + # No need to generate the scripts if there are no CONFIG_FILES. + # This happens for instance when ./config.status config.h +-if test -n "\$CONFIG_FILES"; then +- # Protect against being on the right side of a sed subst in config.status. +- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; +- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +-s,@SHELL@,$SHELL,;t t +-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +-s,@exec_prefix@,$exec_prefix,;t t +-s,@prefix@,$prefix,;t t +-s,@program_transform_name@,$program_transform_name,;t t +-s,@bindir@,$bindir,;t t +-s,@sbindir@,$sbindir,;t t +-s,@libexecdir@,$libexecdir,;t t +-s,@datadir@,$datadir,;t t +-s,@sysconfdir@,$sysconfdir,;t t +-s,@sharedstatedir@,$sharedstatedir,;t t +-s,@localstatedir@,$localstatedir,;t t +-s,@libdir@,$libdir,;t t +-s,@includedir@,$includedir,;t t +-s,@oldincludedir@,$oldincludedir,;t t +-s,@infodir@,$infodir,;t t +-s,@mandir@,$mandir,;t t +-s,@build_alias@,$build_alias,;t t +-s,@host_alias@,$host_alias,;t t +-s,@target_alias@,$target_alias,;t t +-s,@DEFS@,$DEFS,;t t +-s,@ECHO_C@,$ECHO_C,;t t +-s,@ECHO_N@,$ECHO_N,;t t +-s,@ECHO_T@,$ECHO_T,;t t +-s,@LIBS@,$LIBS,;t t +-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +-s,@INSTALL_DATA@,$INSTALL_DATA,;t t +-s,@CYGPATH_W@,$CYGPATH_W,;t t +-s,@PACKAGE@,$PACKAGE,;t t +-s,@VERSION@,$VERSION,;t t +-s,@ACLOCAL@,$ACLOCAL,;t t +-s,@AUTOCONF@,$AUTOCONF,;t t +-s,@AUTOMAKE@,$AUTOMAKE,;t t +-s,@AUTOHEADER@,$AUTOHEADER,;t t +-s,@MAKEINFO@,$MAKEINFO,;t t +-s,@AMTAR@,$AMTAR,;t t +-s,@install_sh@,$install_sh,;t t +-s,@STRIP@,$STRIP,;t t +-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +-s,@AWK@,$AWK,;t t +-s,@SET_MAKE@,$SET_MAKE,;t t +-s,@am__leading_dot@,$am__leading_dot,;t t +-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +-s,@MAINT@,$MAINT,;t t +-s,@build@,$build,;t t +-s,@build_cpu@,$build_cpu,;t t +-s,@build_vendor@,$build_vendor,;t t +-s,@build_os@,$build_os,;t t +-s,@host@,$host,;t t +-s,@host_cpu@,$host_cpu,;t t +-s,@host_vendor@,$host_vendor,;t t +-s,@host_os@,$host_os,;t t +-s,@GTKGLEXT_MAJOR_VERSION@,$GTKGLEXT_MAJOR_VERSION,;t t +-s,@GTKGLEXT_MINOR_VERSION@,$GTKGLEXT_MINOR_VERSION,;t t +-s,@GTKGLEXT_MICRO_VERSION@,$GTKGLEXT_MICRO_VERSION,;t t +-s,@GTKGLEXT_INTERFACE_AGE@,$GTKGLEXT_INTERFACE_AGE,;t t +-s,@GTKGLEXT_BINARY_AGE@,$GTKGLEXT_BINARY_AGE,;t t +-s,@GTKGLEXT_VERSION@,$GTKGLEXT_VERSION,;t t +-s,@GTKGLEXT_API_MAJOR_VERSION@,$GTKGLEXT_API_MAJOR_VERSION,;t t +-s,@GTKGLEXT_API_MINOR_VERSION@,$GTKGLEXT_API_MINOR_VERSION,;t t +-s,@GTKGLEXT_API_VERSION@,$GTKGLEXT_API_VERSION,;t t +-s,@API_MJ@,$API_MJ,;t t +-s,@API_MI@,$API_MI,;t t +-s,@LT_RELEASE@,$LT_RELEASE,;t t +-s,@LT_CURRENT@,$LT_CURRENT,;t t +-s,@LT_REVISION@,$LT_REVISION,;t t +-s,@LT_AGE@,$LT_AGE,;t t +-s,@LT_CURRENT_MINUS_AGE@,$LT_CURRENT_MINUS_AGE,;t t +-s,@CC@,$CC,;t t +-s,@CFLAGS@,$CFLAGS,;t t +-s,@LDFLAGS@,$LDFLAGS,;t t +-s,@CPPFLAGS@,$CPPFLAGS,;t t +-s,@ac_ct_CC@,$ac_ct_CC,;t t +-s,@EXEEXT@,$EXEEXT,;t t +-s,@OBJEXT@,$OBJEXT,;t t +-s,@DEPDIR@,$DEPDIR,;t t +-s,@am__include@,$am__include,;t t +-s,@am__quote@,$am__quote,;t t +-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +-s,@CCDEPMODE@,$CCDEPMODE,;t t +-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +-s,@CPP@,$CPP,;t t +-s,@EGREP@,$EGREP,;t t +-s,@LN_S@,$LN_S,;t t +-s,@ECHO@,$ECHO,;t t +-s,@AR@,$AR,;t t +-s,@ac_ct_AR@,$ac_ct_AR,;t t +-s,@RANLIB@,$RANLIB,;t t +-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +-s,@DLLTOOL@,$DLLTOOL,;t t +-s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t +-s,@AS@,$AS,;t t +-s,@ac_ct_AS@,$ac_ct_AS,;t t +-s,@OBJDUMP@,$OBJDUMP,;t t +-s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t +-s,@CXX@,$CXX,;t t +-s,@CXXFLAGS@,$CXXFLAGS,;t t +-s,@ac_ct_CXX@,$ac_ct_CXX,;t t +-s,@CXXDEPMODE@,$CXXDEPMODE,;t t +-s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +-s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +-s,@CXXCPP@,$CXXCPP,;t t +-s,@F77@,$F77,;t t +-s,@FFLAGS@,$FFLAGS,;t t +-s,@ac_ct_F77@,$ac_ct_F77,;t t +-s,@LIBTOOL@,$LIBTOOL,;t t +-s,@PLATFORM_WIN32_TRUE@,$PLATFORM_WIN32_TRUE,;t t +-s,@PLATFORM_WIN32_FALSE@,$PLATFORM_WIN32_FALSE,;t t +-s,@OS_WIN32_TRUE@,$OS_WIN32_TRUE,;t t +-s,@OS_WIN32_FALSE@,$OS_WIN32_FALSE,;t t +-s,@MATH_LIB@,$MATH_LIB,;t t +-s,@ms_librarian@,$ms_librarian,;t t +-s,@MS_LIB_AVAILABLE_TRUE@,$MS_LIB_AVAILABLE_TRUE,;t t +-s,@MS_LIB_AVAILABLE_FALSE@,$MS_LIB_AVAILABLE_FALSE,;t t +-s,@gdktarget@,$gdktarget,;t t +-s,@gdkglext_targetlib@,$gdkglext_targetlib,;t t +-s,@gtkglext_targetlib@,$gtkglext_targetlib,;t t +-s,@GTKGLEXT_DEBUG_FLAGS@,$GTKGLEXT_DEBUG_FLAGS,;t t +-s,@LIBTOOL_EXPORT_OPTIONS@,$LIBTOOL_EXPORT_OPTIONS,;t t +-s,@PERL@,$PERL,;t t +-s,@INDENT@,$INDENT,;t t +-s,@REBUILD@,$REBUILD,;t t +-s,@PKG_CONFIG@,$PKG_CONFIG,;t t +-s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t +-s,@BASE_DEPENDENCIES_CFLAGS@,$BASE_DEPENDENCIES_CFLAGS,;t t +-s,@BASE_DEPENDENCIES_LIBS@,$BASE_DEPENDENCIES_LIBS,;t t +-s,@GLIB_CFLAGS@,$GLIB_CFLAGS,;t t +-s,@GLIB_LIBS@,$GLIB_LIBS,;t t +-s,@GLIB_GENMARSHAL@,$GLIB_GENMARSHAL,;t t +-s,@GOBJECT_QUERY@,$GOBJECT_QUERY,;t t +-s,@GLIB_MKENUMS@,$GLIB_MKENUMS,;t t +-s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t +-s,@GTK_LIBS@,$GTK_LIBS,;t t +-s,@LIBOBJS@,$LIBOBJS,;t t +-s,@GDKGLEXT_MULTIHEAD_SUPPORT@,$GDKGLEXT_MULTIHEAD_SUPPORT,;t t +-s,@MULTIHEAD_SUPPORT_TRUE@,$MULTIHEAD_SUPPORT_TRUE,;t t +-s,@MULTIHEAD_SUPPORT_FALSE@,$MULTIHEAD_SUPPORT_FALSE,;t t +-s,@X_CFLAGS@,$X_CFLAGS,;t t +-s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +-s,@X_LIBS@,$X_LIBS,;t t +-s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +-s,@USE_X11_TRUE@,$USE_X11_TRUE,;t t +-s,@USE_X11_FALSE@,$USE_X11_FALSE,;t t +-s,@USE_WIN32_TRUE@,$USE_WIN32_TRUE,;t t +-s,@USE_WIN32_FALSE@,$USE_WIN32_FALSE,;t t +-s,@WINDOWING_CFLAGS@,$WINDOWING_CFLAGS,;t t +-s,@WINDOWING_LIBS@,$WINDOWING_LIBS,;t t +-s,@GDKGLEXT_WIN_CFLAGS@,$GDKGLEXT_WIN_CFLAGS,;t t +-s,@GDKGLEXT_WIN_LIBS@,$GDKGLEXT_WIN_LIBS,;t t +-s,@GDKGLEXT_WIN_EXTRA_DEFS@,$GDKGLEXT_WIN_EXTRA_DEFS,;t t +-s,@GL_CFLAGS@,$GL_CFLAGS,;t t +-s,@GL_LIBS@,$GL_LIBS,;t t +-s,@GDKGLEXT_PACKAGES@,$GDKGLEXT_PACKAGES,;t t +-s,@GDKGLEXT_EXTRA_CFLAGS@,$GDKGLEXT_EXTRA_CFLAGS,;t t +-s,@GDKGLEXT_EXTRA_LIBS@,$GDKGLEXT_EXTRA_LIBS,;t t +-s,@GDKGLEXT_DEP_CFLAGS@,$GDKGLEXT_DEP_CFLAGS,;t t +-s,@GDKGLEXT_DEP_LIBS@,$GDKGLEXT_DEP_LIBS,;t t +-s,@GTKGLEXT_PACKAGES@,$GTKGLEXT_PACKAGES,;t t +-s,@GTKGLEXT_EXTRA_CFLAGS@,$GTKGLEXT_EXTRA_CFLAGS,;t t +-s,@GTKGLEXT_EXTRA_LIBS@,$GTKGLEXT_EXTRA_LIBS,;t t +-s,@GTKGLEXT_DEP_CFLAGS@,$GTKGLEXT_DEP_CFLAGS,;t t +-s,@GTKGLEXT_DEP_LIBS@,$GTKGLEXT_DEP_LIBS,;t t +-s,@EXAMPLES_DEP_CFLAGS@,$EXAMPLES_DEP_CFLAGS,;t t +-s,@GTKGLEXT_DEP_LIBS_WITH_PANGOFT2@,$GTKGLEXT_DEP_LIBS_WITH_PANGOFT2,;t t +-s,@HTML_DIR@,$HTML_DIR,;t t +-s,@GTKDOC@,$GTKDOC,;t t +-s,@ENABLE_GTK_DOC_TRUE@,$ENABLE_GTK_DOC_TRUE,;t t +-s,@ENABLE_GTK_DOC_FALSE@,$ENABLE_GTK_DOC_FALSE,;t t +-s,@LTLIBOBJS@,$LTLIBOBJS,;t t +-CEOF +- +-_ACEOF +- +- cat >>$CONFIG_STATUS <<\_ACEOF +- # Split the substitutions into bite-sized pieces for seds with +- # small command number limits, like on Digital OSF/1 and HP-UX. +- ac_max_sed_lines=48 +- ac_sed_frag=1 # Number of current file. +- ac_beg=1 # First line for current file. +- ac_end=$ac_max_sed_lines # Line after last line for current file. +- ac_more_lines=: +- ac_sed_cmds= +- while $ac_more_lines; do +- if test $ac_beg -gt 1; then +- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- else +- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- fi +- if test ! -s $tmp/subs.frag; then +- ac_more_lines=false +- else +- # The purpose of the label and of the branching condition is to +- # speed up the sed processing (if there are no `@' at all, there +- # is no need to browse any of the substitutions). +- # These are the two extra sed commands mentioned above. +- (echo ':t +- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" +- else +- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" +- fi +- ac_sed_frag=`expr $ac_sed_frag + 1` +- ac_beg=$ac_end +- ac_end=`expr $ac_end + $ac_max_sed_lines` +- fi +- done +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds=cat ++if test -n "$CONFIG_FILES"; then ++ ++_ACEOF ++ ++ ++ ++ac_delim='%!_!# ' ++for ac_last_try in false false false false false :; do ++ cat >conf$$subs.sed <<_ACEOF ++SHELL!$SHELL$ac_delim ++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim ++PACKAGE_NAME!$PACKAGE_NAME$ac_delim ++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim ++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim ++PACKAGE_STRING!$PACKAGE_STRING$ac_delim ++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim ++exec_prefix!$exec_prefix$ac_delim ++prefix!$prefix$ac_delim ++program_transform_name!$program_transform_name$ac_delim ++bindir!$bindir$ac_delim ++sbindir!$sbindir$ac_delim ++libexecdir!$libexecdir$ac_delim ++datarootdir!$datarootdir$ac_delim ++datadir!$datadir$ac_delim ++sysconfdir!$sysconfdir$ac_delim ++sharedstatedir!$sharedstatedir$ac_delim ++localstatedir!$localstatedir$ac_delim ++includedir!$includedir$ac_delim ++oldincludedir!$oldincludedir$ac_delim ++docdir!$docdir$ac_delim ++infodir!$infodir$ac_delim ++htmldir!$htmldir$ac_delim ++dvidir!$dvidir$ac_delim ++pdfdir!$pdfdir$ac_delim ++psdir!$psdir$ac_delim ++libdir!$libdir$ac_delim ++localedir!$localedir$ac_delim ++mandir!$mandir$ac_delim ++DEFS!$DEFS$ac_delim ++ECHO_C!$ECHO_C$ac_delim ++ECHO_N!$ECHO_N$ac_delim ++ECHO_T!$ECHO_T$ac_delim ++LIBS!$LIBS$ac_delim ++build_alias!$build_alias$ac_delim ++host_alias!$host_alias$ac_delim ++target_alias!$target_alias$ac_delim ++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim ++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim ++INSTALL_DATA!$INSTALL_DATA$ac_delim ++am__isrc!$am__isrc$ac_delim ++CYGPATH_W!$CYGPATH_W$ac_delim ++PACKAGE!$PACKAGE$ac_delim ++VERSION!$VERSION$ac_delim ++ACLOCAL!$ACLOCAL$ac_delim ++AUTOCONF!$AUTOCONF$ac_delim ++AUTOMAKE!$AUTOMAKE$ac_delim ++AUTOHEADER!$AUTOHEADER$ac_delim ++MAKEINFO!$MAKEINFO$ac_delim ++install_sh!$install_sh$ac_delim ++STRIP!$STRIP$ac_delim ++INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim ++mkdir_p!$mkdir_p$ac_delim ++AWK!$AWK$ac_delim ++SET_MAKE!$SET_MAKE$ac_delim ++am__leading_dot!$am__leading_dot$ac_delim ++AMTAR!$AMTAR$ac_delim ++am__tar!$am__tar$ac_delim ++am__untar!$am__untar$ac_delim ++MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim ++MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim ++MAINT!$MAINT$ac_delim ++build!$build$ac_delim ++build_cpu!$build_cpu$ac_delim ++build_vendor!$build_vendor$ac_delim ++build_os!$build_os$ac_delim ++host!$host$ac_delim ++host_cpu!$host_cpu$ac_delim ++host_vendor!$host_vendor$ac_delim ++host_os!$host_os$ac_delim ++GTKGLEXT_MAJOR_VERSION!$GTKGLEXT_MAJOR_VERSION$ac_delim ++GTKGLEXT_MINOR_VERSION!$GTKGLEXT_MINOR_VERSION$ac_delim ++GTKGLEXT_MICRO_VERSION!$GTKGLEXT_MICRO_VERSION$ac_delim ++GTKGLEXT_INTERFACE_AGE!$GTKGLEXT_INTERFACE_AGE$ac_delim ++GTKGLEXT_BINARY_AGE!$GTKGLEXT_BINARY_AGE$ac_delim ++GTKGLEXT_VERSION!$GTKGLEXT_VERSION$ac_delim ++GTKGLEXT_API_MAJOR_VERSION!$GTKGLEXT_API_MAJOR_VERSION$ac_delim ++GTKGLEXT_API_MINOR_VERSION!$GTKGLEXT_API_MINOR_VERSION$ac_delim ++GTKGLEXT_API_VERSION!$GTKGLEXT_API_VERSION$ac_delim ++API_MJ!$API_MJ$ac_delim ++API_MI!$API_MI$ac_delim ++LT_RELEASE!$LT_RELEASE$ac_delim ++LT_CURRENT!$LT_CURRENT$ac_delim ++LT_REVISION!$LT_REVISION$ac_delim ++LT_AGE!$LT_AGE$ac_delim ++LT_CURRENT_MINUS_AGE!$LT_CURRENT_MINUS_AGE$ac_delim ++CC!$CC$ac_delim ++CFLAGS!$CFLAGS$ac_delim ++LDFLAGS!$LDFLAGS$ac_delim ++CPPFLAGS!$CPPFLAGS$ac_delim ++ac_ct_CC!$ac_ct_CC$ac_delim ++EXEEXT!$EXEEXT$ac_delim ++OBJEXT!$OBJEXT$ac_delim ++DEPDIR!$DEPDIR$ac_delim ++am__include!$am__include$ac_delim ++am__quote!$am__quote$ac_delim ++AMDEP_TRUE!$AMDEP_TRUE$ac_delim ++_ACEOF ++ ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then ++ break ++ elif $ac_last_try; then ++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +-fi # test -n "$CONFIG_FILES" ++done ++ ++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` ++if test -n "$ac_eof"; then ++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ++ ac_eof=`expr $ac_eof + 1` ++fi ++ ++cat >>$CONFIG_STATUS <<_ACEOF ++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof ++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b ++_ACEOF ++sed ' ++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g ++s/^/s,@/; s/!/@,|#_!!_#|/ ++:n ++t n ++s/'"$ac_delim"'$/,g/; t ++s/$/\\/; p ++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ++' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF ++CEOF$ac_eof ++_ACEOF ++ ++ ++ac_delim='%!_!# ' ++for ac_last_try in false false false false false :; do ++ cat >conf$$subs.sed <<_ACEOF ++AMDEP_FALSE!$AMDEP_FALSE$ac_delim ++AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim ++CCDEPMODE!$CCDEPMODE$ac_delim ++am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim ++am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim ++CPP!$CPP$ac_delim ++SED!$SED$ac_delim ++GREP!$GREP$ac_delim ++EGREP!$EGREP$ac_delim ++LN_S!$LN_S$ac_delim ++ECHO!$ECHO$ac_delim ++AR!$AR$ac_delim ++RANLIB!$RANLIB$ac_delim ++DSYMUTIL!$DSYMUTIL$ac_delim ++NMEDIT!$NMEDIT$ac_delim ++DLLTOOL!$DLLTOOL$ac_delim ++AS!$AS$ac_delim ++OBJDUMP!$OBJDUMP$ac_delim ++CXX!$CXX$ac_delim ++CXXFLAGS!$CXXFLAGS$ac_delim ++ac_ct_CXX!$ac_ct_CXX$ac_delim ++CXXDEPMODE!$CXXDEPMODE$ac_delim ++am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim ++am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim ++CXXCPP!$CXXCPP$ac_delim ++F77!$F77$ac_delim ++FFLAGS!$FFLAGS$ac_delim ++ac_ct_F77!$ac_ct_F77$ac_delim ++LIBTOOL!$LIBTOOL$ac_delim ++PLATFORM_WIN32_TRUE!$PLATFORM_WIN32_TRUE$ac_delim ++PLATFORM_WIN32_FALSE!$PLATFORM_WIN32_FALSE$ac_delim ++OS_WIN32_TRUE!$OS_WIN32_TRUE$ac_delim ++OS_WIN32_FALSE!$OS_WIN32_FALSE$ac_delim ++MATH_LIB!$MATH_LIB$ac_delim ++ms_librarian!$ms_librarian$ac_delim ++MS_LIB_AVAILABLE_TRUE!$MS_LIB_AVAILABLE_TRUE$ac_delim ++MS_LIB_AVAILABLE_FALSE!$MS_LIB_AVAILABLE_FALSE$ac_delim ++TARGET_QUARTZ_TRUE!$TARGET_QUARTZ_TRUE$ac_delim ++TARGET_QUARTZ_FALSE!$TARGET_QUARTZ_FALSE$ac_delim ++gdktarget!$gdktarget$ac_delim ++gdkglext_targetlib!$gdkglext_targetlib$ac_delim ++gtkglext_targetlib!$gtkglext_targetlib$ac_delim ++GTKGLEXT_DEBUG_FLAGS!$GTKGLEXT_DEBUG_FLAGS$ac_delim ++LIBTOOL_EXPORT_OPTIONS!$LIBTOOL_EXPORT_OPTIONS$ac_delim ++PERL!$PERL$ac_delim ++REBUILD!$REBUILD$ac_delim ++PKG_CONFIG!$PKG_CONFIG$ac_delim ++BASE_DEPENDENCIES_CFLAGS!$BASE_DEPENDENCIES_CFLAGS$ac_delim ++BASE_DEPENDENCIES_LIBS!$BASE_DEPENDENCIES_LIBS$ac_delim ++LIBOBJS!$LIBOBJS$ac_delim ++GDKGLEXT_MULTIHEAD_SUPPORT!$GDKGLEXT_MULTIHEAD_SUPPORT$ac_delim ++MULTIHEAD_SUPPORT_TRUE!$MULTIHEAD_SUPPORT_TRUE$ac_delim ++MULTIHEAD_SUPPORT_FALSE!$MULTIHEAD_SUPPORT_FALSE$ac_delim ++XMKMF!$XMKMF$ac_delim ++X_CFLAGS!$X_CFLAGS$ac_delim ++X_PRE_LIBS!$X_PRE_LIBS$ac_delim ++X_LIBS!$X_LIBS$ac_delim ++X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim ++USE_X11_TRUE!$USE_X11_TRUE$ac_delim ++USE_X11_FALSE!$USE_X11_FALSE$ac_delim ++USE_WIN32_TRUE!$USE_WIN32_TRUE$ac_delim ++USE_WIN32_FALSE!$USE_WIN32_FALSE$ac_delim ++WINDOWING_CFLAGS!$WINDOWING_CFLAGS$ac_delim ++WINDOWING_LIBS!$WINDOWING_LIBS$ac_delim ++GDKGLEXT_WIN_CFLAGS!$GDKGLEXT_WIN_CFLAGS$ac_delim ++GDKGLEXT_WIN_LIBS!$GDKGLEXT_WIN_LIBS$ac_delim ++GDKGLEXT_WIN_EXTRA_DEFS!$GDKGLEXT_WIN_EXTRA_DEFS$ac_delim ++GL_CFLAGS!$GL_CFLAGS$ac_delim ++GL_LIBS!$GL_LIBS$ac_delim ++GDKGLEXT_PACKAGES!$GDKGLEXT_PACKAGES$ac_delim ++GDKGLEXT_EXTRA_CFLAGS!$GDKGLEXT_EXTRA_CFLAGS$ac_delim ++GDKGLEXT_EXTRA_LIBS!$GDKGLEXT_EXTRA_LIBS$ac_delim ++GDKGLEXT_DEP_CFLAGS!$GDKGLEXT_DEP_CFLAGS$ac_delim ++GDKGLEXT_DEP_LIBS!$GDKGLEXT_DEP_LIBS$ac_delim ++GTKGLEXT_PACKAGES!$GTKGLEXT_PACKAGES$ac_delim ++GTKGLEXT_EXTRA_CFLAGS!$GTKGLEXT_EXTRA_CFLAGS$ac_delim ++GTKGLEXT_EXTRA_LIBS!$GTKGLEXT_EXTRA_LIBS$ac_delim ++GTKGLEXT_DEP_CFLAGS!$GTKGLEXT_DEP_CFLAGS$ac_delim ++GTKGLEXT_DEP_LIBS!$GTKGLEXT_DEP_LIBS$ac_delim ++EXAMPLES_DEP_CFLAGS!$EXAMPLES_DEP_CFLAGS$ac_delim ++GTKGLEXT_DEP_LIBS_WITH_PANGOFT2!$GTKGLEXT_DEP_LIBS_WITH_PANGOFT2$ac_delim ++HTML_DIR!$HTML_DIR$ac_delim ++GTKDOC!$GTKDOC$ac_delim ++ENABLE_GTK_DOC_TRUE!$ENABLE_GTK_DOC_TRUE$ac_delim ++ENABLE_GTK_DOC_FALSE!$ENABLE_GTK_DOC_FALSE$ac_delim ++LTLIBOBJS!$LTLIBOBJS$ac_delim ++_ACEOF ++ ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then ++ break ++ elif $ac_last_try; then ++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ++ fi ++done + ++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` ++if test -n "$ac_eof"; then ++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ++ ac_eof=`expr $ac_eof + 1` ++fi ++ ++cat >>$CONFIG_STATUS <<_ACEOF ++cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof ++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end ++_ACEOF ++sed ' ++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g ++s/^/s,@/; s/!/@,|#_!!_#|/ ++:n ++t n ++s/'"$ac_delim"'$/,g/; t ++s/$/\\/; p ++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ++' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF ++:end ++s/|#_!!_#|//g ++CEOF$ac_eof + _ACEOF ++ ++ ++# VPATH may cause trouble with some makes, so we remove $(srcdir), ++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# trailing colons and then remove the whole line if VPATH becomes empty ++# (actually we leave an empty line to preserve line numbers). ++if test "x$srcdir" = x.; then ++ ac_vpsub='/^[ ]*VPATH[ ]*=/{ ++s/:*\$(srcdir):*/:/ ++s/:*\${srcdir}:*/:/ ++s/:*@srcdir@:*/:/ ++s/^\([^=]*=[ ]*\):*/\1/ ++s/:*$// ++s/^[^=]*=[ ]*$// ++}' ++fi ++ + cat >>$CONFIG_STATUS <<\_ACEOF +-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +- case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++fi # test -n "$CONFIG_FILES" ++ ++ ++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS ++do ++ case $ac_tag in ++ :[FHLC]) ac_mode=$ac_tag; continue;; ++ esac ++ case $ac_mode$ac_tag in ++ :[FHL]*:*);; ++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 ++echo "$as_me: error: Invalid tag $ac_tag." >&2;} ++ { (exit 1); exit 1; }; };; ++ :[FH]-) ac_tag=-:-;; ++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; ++ esac ++ ac_save_IFS=$IFS ++ IFS=: ++ set x $ac_tag ++ IFS=$ac_save_IFS ++ shift ++ ac_file=$1 ++ shift ++ ++ case $ac_mode in ++ :L) ac_source=$1;; ++ :[FH]) ++ ac_file_inputs= ++ for ac_f ++ do ++ case $ac_f in ++ -) ac_f="$tmp/stdin";; ++ *) # Look for the file first in the build tree, then in the source tree ++ # (if the path is not absolute). The absolute path cannot be DOS-style, ++ # because $ac_f cannot contain `:'. ++ test -f "$ac_f" || ++ case $ac_f in ++ [\\/$]*) false;; ++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; ++ esac || ++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 ++echo "$as_me: error: cannot find input file: $ac_f" >&2;} ++ { (exit 1); exit 1; }; };; ++ esac ++ ac_file_inputs="$ac_file_inputs $ac_f" ++ done ++ ++ # Let's still pretend it is `configure' which instantiates (i.e., don't ++ # use $as_me), people would be surprised to read: ++ # /* config.h. Generated by config.status. */ ++ configure_input="Generated from "`IFS=: ++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." ++ if test x"$ac_file" != x-; then ++ configure_input="$ac_file. $configure_input" ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ fi ++ ++ case $ac_tag in ++ *:-:* | *:-) cat >"$tmp/stdin";; ++ esac ++ ;; + esac + +- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. +- ac_dir=`(dirname "$ac_file") 2>/dev/null || ++ ac_dir=`$as_dirname -- "$ac_file" || + $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir="$ac_dir" ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + ac_builddir=. + +-if test "$ac_dir" != .; then ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # We are building in place. + ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac + ++ case $ac_mode in ++ :F) ++ # ++ # CONFIG_FILE ++ # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; +- *) ac_INSTALL=$ac_top_builddir$INSTALL ;; ++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac ++ ac_MKDIR_P=$MKDIR_P ++ case $MKDIR_P in ++ [\\/$]* | ?:[\\/]* ) ;; ++ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; ++ esac ++_ACEOF + +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi +- # Let's still pretend it is `configure' which instantiates (i.e., don't +- # use $as_me), people would be surprised to read: +- # /* config.h. Generated by config.status. */ +- if test x"$ac_file" = x-; then +- configure_input= +- else +- configure_input="$ac_file. " +- fi +- configure_input=$configure_input"Generated from `echo $ac_file_in | +- sed 's,.*/,,'` by configure." +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- echo "$f";; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo "$f" +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo "$srcdir/$f" +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } ++cat >>$CONFIG_STATUS <<\_ACEOF ++# If the template does not know about datarootdir, expand it. ++# FIXME: This hack should be removed a few years after 2.60. ++ac_datarootdir_hack=; ac_datarootdir_seen= ++ ++case `sed -n '/datarootdir/ { ++ p ++ q ++} ++/@datadir@/p ++/@docdir@/p ++/@infodir@/p ++/@localedir@/p ++/@mandir@/p ++' $ac_file_inputs` in ++*datarootdir*) ac_datarootdir_seen=yes;; ++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) ++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF ++ ac_datarootdir_hack=' ++ s&@datadir@&$datadir&g ++ s&@docdir@&$docdir&g ++ s&@infodir@&$infodir&g ++ s&@localedir@&$localedir&g ++ s&@mandir@&$mandir&g ++ s&\\\${datarootdir}&$datarootdir&g' ;; ++esac + _ACEOF ++ ++# Neutralize VPATH when `$srcdir' = `.'. ++# Shell code in configure.ac might set extrasub. ++# FIXME: do we really want to maintain this feature? + cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub + $extrasub +@@ -26725,387 +27854,175 @@ + cat >>$CONFIG_STATUS <<\_ACEOF + :t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-s,@configure_input@,$configure_input,;t t +-s,@srcdir@,$ac_srcdir,;t t +-s,@abs_srcdir@,$ac_abs_srcdir,;t t +-s,@top_srcdir@,$ac_top_srcdir,;t t +-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +-s,@builddir@,$ac_builddir,;t t +-s,@abs_builddir@,$ac_abs_builddir,;t t +-s,@top_builddir@,$ac_top_builddir,;t t +-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +-s,@INSTALL@,$ac_INSTALL,;t t +-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out +- rm -f $tmp/stdin +- if test x"$ac_file" != x-; then +- mv $tmp/out $ac_file +- else +- cat $tmp/out +- rm -f $tmp/out +- fi +- +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF +- +-# +-# CONFIG_HEADER section. +-# ++s&@configure_input@&$configure_input&;t t ++s&@top_builddir@&$ac_top_builddir_sub&;t t ++s&@srcdir@&$ac_srcdir&;t t ++s&@abs_srcdir@&$ac_abs_srcdir&;t t ++s&@top_srcdir@&$ac_top_srcdir&;t t ++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t ++s&@builddir@&$ac_builddir&;t t ++s&@abs_builddir@&$ac_abs_builddir&;t t ++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t ++s&@INSTALL@&$ac_INSTALL&;t t ++s&@MKDIR_P@&$ac_MKDIR_P&;t t ++$ac_datarootdir_hack ++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out ++ ++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && ++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && ++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&5 ++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&2;} + +-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +-# NAME is the cpp macro being defined and VALUE is the value it is being given. +-# +-# ac_d sets the value in "#define NAME VALUE" lines. +-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +-ac_dB='[ ].*$,\1#\2' +-ac_dC=' ' +-ac_dD=',;t' +-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +-ac_uB='$,\1#\2define\3' +-ac_uC=' ' +-ac_uD=',;t' +- +-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ++ rm -f "$tmp/stdin" + case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++ -) cat "$tmp/out"; rm -f "$tmp/out";; ++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac +- +- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- # Do quote $f, to prevent DOS paths from being IFS'd. +- echo "$f";; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo "$f" +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo "$srcdir/$f" +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } +- # Remove the trailing spaces. +- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in +- ++ ;; ++ :H) ++ # ++ # CONFIG_HEADER ++ # + _ACEOF + +-# Transform confdefs.h into two sed scripts, `conftest.defines' and +-# `conftest.undefs', that substitutes the proper values into +-# config.h.in to produce config.h. The first handles `#define' +-# templates, and the second `#undef' templates. +-# And first: Protect against being on the right side of a sed subst in +-# config.status. Protect against being in an unquoted here document +-# in config.status. +-rm -f conftest.defines conftest.undefs +-# Using a here document instead of a string reduces the quoting nightmare. +-# Putting comments in sed scripts is not portable. +-# +-# `end' is used to avoid that the second main sed command (meant for +-# 0-ary CPP macros) applies to n-ary macro definitions. +-# See the Autoconf documentation for `clear'. +-cat >confdef2sed.sed <<\_ACEOF +-s/[\\&,]/\\&/g +-s,[\\$`],\\&,g +-t clear +-: clear +-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +-t end +-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +-: end +-_ACEOF +-# If some macros were called several times there might be several times +-# the same #defines, which is useless. Nevertheless, we may not want to +-# sort them, since we want the *last* AC-DEFINE to be honored. +-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +-rm -f confdef2sed.sed ++# Transform confdefs.h into a sed script `conftest.defines', that ++# substitutes the proper values into config.h.in to produce config.h. ++rm -f conftest.defines conftest.tail ++# First, append a space to every undef/define line, to ease matching. ++echo 's/$/ /' >conftest.defines ++# Then, protect against being on the right side of a sed subst, or in ++# an unquoted here document, in config.status. If some macros were ++# called several times there might be several #defines for the same ++# symbol, which is useless. But do not sort them, since the last ++# AC_DEFINE must be honored. ++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* ++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where ++# NAME is the cpp macro being defined, VALUE is the value it is being given. ++# PARAMS is the parameter list in the macro definition--in most cases, it's ++# just an empty string. ++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ++ac_dB='\\)[ (].*,\\1define\\2' ++ac_dC=' ' ++ac_dD=' ,' + +-# This sed command replaces #undef with comments. This is necessary, for ++uniq confdefs.h | ++ sed -n ' ++ t rset ++ :rset ++ s/^[ ]*#[ ]*define[ ][ ]*// ++ t ok ++ d ++ :ok ++ s/[\\&,]/\\&/g ++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p ++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ++ ' >>conftest.defines ++ ++# Remove the space that was appended to ease matching. ++# Then replace #undef with comments. This is necessary, for + # example, in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. +-cat >>conftest.undefs <<\_ACEOF +-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +-_ACEOF ++# (The regexp can be short, since the line contains either #define or #undef.) ++echo 's/ $// ++s,^[ #]*u.*,/* & */,' >>conftest.defines ++ ++# Break up conftest.defines: ++ac_max_sed_lines=50 ++ ++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" ++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" ++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" ++# et cetera. ++ac_in='$ac_file_inputs' ++ac_out='"$tmp/out1"' ++ac_nxt='"$tmp/out2"' + +-# Break up conftest.defines because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +-echo ' :' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.defines >/dev/null +-do +- # Write a limited-size here document to $tmp/defines.sed. +- echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#define' lines. +- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ++while : ++do ++ # Write a here document: ++ cat >>$CONFIG_STATUS <<_ACEOF ++ # First, check the format of the line: ++ cat >"\$tmp/defines.sed" <<\\CEOF ++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def ++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def ++b ++:def ++_ACEOF ++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF +- sed -f $tmp/defines.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in ++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail ++ grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines + done +-rm -f conftest.defines +-echo ' fi # grep' >>$CONFIG_STATUS +-echo >>$CONFIG_STATUS +- +-# Break up conftest.undefs because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.undefs >/dev/null +-do +- # Write a limited-size here document to $tmp/undefs.sed. +- echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#undef' +- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS +- echo 'CEOF +- sed -f $tmp/undefs.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail +- rm -f conftest.undefs +- mv conftest.tail conftest.undefs +-done +-rm -f conftest.undefs ++rm -f conftest.defines conftest.tail + ++echo "ac_result=$ac_in" >>$CONFIG_STATUS + cat >>$CONFIG_STATUS <<\_ACEOF +- # Let's still pretend it is `configure' which instantiates (i.e., don't +- # use $as_me), people would be surprised to read: +- # /* config.h. Generated by config.status. */ +- if test x"$ac_file" = x-; then +- echo "/* Generated by configure. */" >$tmp/config.h +- else +- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h +- fi +- cat $tmp/in >>$tmp/config.h +- rm -f $tmp/in + if test x"$ac_file" != x-; then +- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ++ echo "/* $configure_input */" >"$tmp/config.h" ++ cat "$ac_result" >>"$tmp/config.h" ++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + echo "$as_me: $ac_file is unchanged" >&6;} + else +- ac_dir=`(dirname "$ac_file") 2>/dev/null || +-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_file" : 'X\(//\)[^/]' \| \ +- X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } +- + rm -f $ac_file +- mv $tmp/config.h $ac_file ++ mv "$tmp/config.h" $ac_file + fi + else +- cat $tmp/config.h +- rm -f $tmp/config.h ++ echo "/* $configure_input */" ++ cat "$ac_result" + fi ++ rm -f "$tmp/out12" + # Compute $ac_file's index in $config_headers. ++_am_arg=$ac_file + _am_stamp_count=1 + for _am_header in $config_headers :; do + case $_am_header in +- $ac_file | $ac_file:* ) ++ $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac + done +-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X$ac_file : 'X\(//\)[^/]' \| \ +- X$ac_file : 'X\(//\)$' \| \ +- X$ac_file : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X$ac_file | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'`/stamp-h$_am_stamp_count +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF +- +-# +-# CONFIG_COMMANDS section. +-# +-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue +- ac_dest=`echo "$ac_file" | sed 's,:.*,,'` +- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_dir=`(dirname "$ac_dest") 2>/dev/null || +-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_dest" : 'X\(//\)[^/]' \| \ +- X"$ac_dest" : 'X\(//\)$' \| \ +- X"$ac_dest" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_dest" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } +- +- ac_builddir=. +- +-if test "$ac_dir" != .; then +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi +- +-case $srcdir in +- .) # No --srcdir option. We are building in place. +- ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. +- ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; +-esac ++echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || ++$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$_am_arg" : 'X\(//\)[^/]' \| \ ++ X"$_am_arg" : 'X\(//\)$' \| \ ++ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || ++echo X"$_am_arg" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'`/stamp-h$_am_stamp_count ++ ;; + +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac ++ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 ++echo "$as_me: executing $ac_file commands" >&6;} ++ ;; ++ esac + + +- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +-echo "$as_me: executing $ac_dest commands" >&6;} +- case $ac_dest in +- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ++ case $ac_file$ac_mode in ++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. +@@ -27113,90 +28030,123 @@ + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. +- # So let's grep whole file. +- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then +- dirpart=`(dirname "$mf") 2>/dev/null || ++ # Grep'ing the whole file is not good either: AIX grep has a line ++ # limit of 2048, but all sed's we know have understand at least 4000. ++ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then ++ dirpart=`$as_dirname -- "$mf" || + $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ +- X"$mf" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$mf" : 'X\(/\)' \| . 2>/dev/null || + echo X"$mf" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + else + continue + fi +- grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue +- # Extract the definition of DEP_FILES from the Makefile without +- # running `make'. +- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` ++ # Extract the definition of DEPDIR, am__include, and am__quote ++ # from the Makefile without running `make'. ++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue ++ am__include=`sed -n 's/^am__include = //p' < "$mf"` ++ test -z "am__include" && continue ++ am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it +- U=`sed -n -e '/^U = / s///p' < "$mf"` +- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" +- # We invoke sed twice because it is the simplest approach to +- # changing $(DEPDIR) to its actual value in the expansion. +- for file in `sed -n -e ' +- /^DEP_FILES = .*\\\\$/ { +- s/^DEP_FILES = // +- :loop +- s/\\\\$// +- p +- n +- /\\\\$/ b loop +- p +- } +- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ++ U=`sed -n 's/^U = //p' < "$mf"` ++ # Find all dependency output files, they are included files with ++ # $(DEPDIR) in their names. We invoke sed twice because it is the ++ # simplest approach to changing $(DEPDIR) to its actual value in the ++ # expansion. ++ for file in `sed -n " ++ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue +- fdir=`(dirname "$file") 2>/dev/null || ++ fdir=`$as_dirname -- "$file" || + $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ +- X"$file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$file" : 'X\(/\)' \| . 2>/dev/null || + echo X"$file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p $dirpart/$fdir +- else +- as_dir=$dirpart/$fdir ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir=$dirpart/$fdir ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done + ;; +- gdk/gdkglext-config.h ) ++ "gdk/gdkglext-config.h":C) + outfile=gdkglext-config.h-tmp + cat > $outfile <<\_______EOF + /* gdkglext-config.h +@@ -27254,11 +28204,10 @@ + fi + + ;; ++ + esac +-done +-_ACEOF ++done # for ac_tag + +-cat >>$CONFIG_STATUS <<\_ACEOF + + { (exit 0); exit 0; } + _ACEOF diff --git a/Patches/gtkglext/patch-examples-pixmap-mixed.c.diff b/Patches/gtkglext/patch-examples-pixmap-mixed.c.diff new file mode 100644 index 0000000000000..3f39948777a7a --- /dev/null +++ b/Patches/gtkglext/patch-examples-pixmap-mixed.c.diff @@ -0,0 +1,11 @@ +--- examples/pixmap-mixed.c.orig 2003-09-14 02:23:33.000000000 -0700 ++++ examples/pixmap-mixed.c 2010-07-26 22:28:55.000000000 -0700 +@@ -154,7 +154,7 @@ + gpointer data) + { + gdk_draw_drawable (widget->window, +- widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ widget->style->fg_gc[gtk_widget_get_state (widget)], + pixmap, + event->area.x, event->area.y, + event->area.x, event->area.y, diff --git a/Patches/gtkglext/patch-examples-pixmap.c.diff b/Patches/gtkglext/patch-examples-pixmap.c.diff new file mode 100644 index 0000000000000..e6d0e1e158e64 --- /dev/null +++ b/Patches/gtkglext/patch-examples-pixmap.c.diff @@ -0,0 +1,11 @@ +--- examples/pixmap.c.orig 2003-09-14 02:23:33.000000000 -0700 ++++ examples/pixmap.c 2010-07-26 22:29:22.000000000 -0700 +@@ -137,7 +137,7 @@ + gpointer data) + { + gdk_draw_drawable (widget->window, +- widget->style->fg_gc[GTK_WIDGET_STATE (widget)], ++ widget->style->fg_gc[gtk_widget_get_state (widget)], + pixmap, + event->area.x, event->area.y, + event->area.x, event->area.y, diff --git a/Patches/gtkglext/patch-gdk-gdkglglext.h.diff b/Patches/gtkglext/patch-gdk-gdkglglext.h.diff new file mode 100644 index 0000000000000..ef54cd78a5559 --- /dev/null +++ b/Patches/gtkglext/patch-gdk-gdkglglext.h.diff @@ -0,0 +1,14 @@ +--- gdk/gdkglglext.h.orig 2009-08-24 14:47:39.000000000 +0400 ++++ gdk/gdkglglext.h 2009-08-24 14:48:31.000000000 +0400 +@@ -30,7 +30,11 @@ + #include + #endif + ++#ifdef GDK_WINDOWING_QUARTZ ++#include ++#else + #include ++#endif + + #include + #include diff --git a/Patches/gtkglext/patch-gdk-gdkglquery.c.diff b/Patches/gtkglext/patch-gdk-gdkglquery.c.diff new file mode 100644 index 0000000000000..9992e026c5d00 --- /dev/null +++ b/Patches/gtkglext/patch-gdk-gdkglquery.c.diff @@ -0,0 +1,14 @@ +--- gdk/gdkglquery.c.orig 2009-08-24 14:43:25.000000000 +0400 ++++ gdk/gdkglquery.c 2009-08-24 14:44:18.000000000 +0400 +@@ -27,7 +27,11 @@ + #include + #endif + ++#ifdef GDK_WINDOWING_QUARTZ ++#include ++#else + #include ++#endif + + /* + * This code is based on glutExtensionSupported(). diff --git a/Patches/gtkglext/patch-gdk-gdkglshapes.c.diff b/Patches/gtkglext/patch-gdk-gdkglshapes.c.diff new file mode 100644 index 0000000000000..b11f4385c7b70 --- /dev/null +++ b/Patches/gtkglext/patch-gdk-gdkglshapes.c.diff @@ -0,0 +1,16 @@ +--- gdk/gdkglshapes.c.orig 2009-08-24 14:43:49.000000000 +0400 ++++ gdk/gdkglshapes.c 2009-08-24 14:46:28.000000000 +0400 +@@ -28,8 +28,13 @@ + #include + #endif + ++#ifdef GDK_WINDOWING_QUARTZ ++#include ++#include ++#else + #include + #include ++#endif + + /* + * The following code is imported from GLUT. diff --git a/Patches/gtkglext/patch-gdk-makefile.in.diff b/Patches/gtkglext/patch-gdk-makefile.in.diff new file mode 100644 index 0000000000000..972848aa2248a --- /dev/null +++ b/Patches/gtkglext/patch-gdk-makefile.in.diff @@ -0,0 +1,971 @@ +--- gdk/Makefile.in.orig 2009-08-24 14:16:28.000000000 +0400 ++++ gdk/Makefile.in 2009-08-24 13:25:08.000000000 +0400 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.7.9 from Makefile.am. ++# Makefile.in generated by automake 1.10.1 from Makefile.am. + # @configure_input@ + +-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +-# Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -14,16 +14,13 @@ + + @SET_MAKE@ + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ ++ ++ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = .. +- + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -35,10 +32,98 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++build_triplet = @build@ + host_triplet = @host@ ++subdir = gdk ++DIST_COMMON = $(gdkglextinclude_HEADERS) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/gdkglversion.h.in ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++mkinstalldirs = $(install_sh) -d ++CONFIG_HEADER = $(top_builddir)/config.h ++CONFIG_CLEAN_FILES = gdkglversion.h ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ++am__installdirs = "$(DESTDIR)$(libdir)" \ ++ "$(DESTDIR)$(gdkglextincludedir)" ++libLTLIBRARIES_INSTALL = $(INSTALL) ++LTLIBRARIES = $(lib_LTLIBRARIES) ++am__DEPENDENCIES_1 = ++am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) ++libgdkglext_quartz_@API_MJ@_@API_MI@_la_DEPENDENCIES = \ ++ quartz/libgdkglext-quartz.la $(am__DEPENDENCIES_2) ++am__objects_1 = ++am__objects_2 = gdkglversion.lo gdkglinit.lo gdkglquery.lo \ ++ gdkglconfig.lo gdkglcontext.lo gdkgldrawable.lo gdkglpixmap.lo \ ++ gdkglwindow.lo gdkglshapes.lo gdkglglext.lo ++am__objects_3 = gdkglenumtypes.lo ++am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3) ++am_libgdkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_4) ++libgdkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS = \ ++ $(am_libgdkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) ++libgdkglext_quartz_@API_MJ@_@API_MI@_la_LINK = $(LIBTOOL) --tag=CC \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_CFLAGS) $(CFLAGS) \ ++ $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_LDFLAGS) $(LDFLAGS) \ ++ -o $@ ++am_libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_4) ++libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = \ ++ $(am_libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) ++libgdkglext_win32_@API_MJ@_@API_MI@_la_LINK = $(LIBTOOL) --tag=CC \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_CFLAGS) $(CFLAGS) \ ++ $(libgdkglext_win32_@API_MJ@_@API_MI@_la_LDFLAGS) $(LDFLAGS) \ ++ -o $@ ++libgdkglext_x11_@API_MJ@_@API_MI@_la_DEPENDENCIES = \ ++ x11/libgdkglext-x11.la $(am__DEPENDENCIES_2) ++am_libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_4) ++libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = \ ++ $(am_libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) ++libgdkglext_x11_@API_MJ@_@API_MI@_la_LINK = $(LIBTOOL) --tag=CC \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_CFLAGS) $(CFLAGS) \ ++ $(libgdkglext_x11_@API_MJ@_@API_MI@_la_LDFLAGS) $(LDFLAGS) -o \ ++ $@ ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) ++depcomp = $(SHELL) $(top_srcdir)/depcomp ++am__depfiles_maybe = depfiles ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++CCLD = $(CC) ++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ ++ $(LDFLAGS) -o $@ ++SOURCES = $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgdkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgdkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) ++DIST_SOURCES = $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgdkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgdkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) ++RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ++ html-recursive info-recursive install-data-recursive \ ++ install-dvi-recursive install-exec-recursive \ ++ install-html-recursive install-info-recursive \ ++ install-pdf-recursive install-ps-recursive install-recursive \ ++ installcheck-recursive installdirs-recursive pdf-recursive \ ++ ps-recursive uninstall-recursive ++DATA = $(noinst_DATA) ++gdkglextincludeHEADERS_INSTALL = $(INSTALL_HEADER) ++HEADERS = $(gdkglextinclude_HEADERS) ++RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ ++ distclean-recursive maintainer-clean-recursive ++ETAGS = etags ++CTAGS = ctags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + API_MI = @API_MI@ + API_MJ = @API_MJ@ +@@ -63,13 +148,12 @@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ + DLLTOOL = @DLLTOOL@ ++DSYMUTIL = @DSYMUTIL@ + ECHO = @ECHO@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ +-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@ +-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@ + EXAMPLES_DEP_CFLAGS = @EXAMPLES_DEP_CFLAGS@ + EXEEXT = @EXEEXT@ + F77 = @F77@ +@@ -83,13 +167,9 @@ + GDKGLEXT_WIN_CFLAGS = @GDKGLEXT_WIN_CFLAGS@ + GDKGLEXT_WIN_EXTRA_DEFS = @GDKGLEXT_WIN_EXTRA_DEFS@ + GDKGLEXT_WIN_LIBS = @GDKGLEXT_WIN_LIBS@ +-GLIB_CFLAGS = @GLIB_CFLAGS@ +-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +-GLIB_LIBS = @GLIB_LIBS@ +-GLIB_MKENUMS = @GLIB_MKENUMS@ + GL_CFLAGS = @GL_CFLAGS@ + GL_LIBS = @GL_LIBS@ +-GOBJECT_QUERY = @GOBJECT_QUERY@ ++GREP = @GREP@ + GTKDOC = @GTKDOC@ + GTKGLEXT_API_MAJOR_VERSION = @GTKGLEXT_API_MAJOR_VERSION@ + GTKGLEXT_API_MINOR_VERSION = @GTKGLEXT_API_MINOR_VERSION@ +@@ -107,10 +187,8 @@ + GTKGLEXT_MINOR_VERSION = @GTKGLEXT_MINOR_VERSION@ + GTKGLEXT_PACKAGES = @GTKGLEXT_PACKAGES@ + GTKGLEXT_VERSION = @GTKGLEXT_VERSION@ +-GTK_CFLAGS = @GTK_CFLAGS@ +-GTK_LIBS = @GTK_LIBS@ + HTML_DIR = @HTML_DIR@ +-INDENT = @INDENT@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -128,18 +206,12 @@ + LT_RELEASE = @LT_RELEASE@ + LT_REVISION = @LT_REVISION@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MATH_LIB = @MATH_LIB@ +-MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@ +-MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@ +-MULTIHEAD_SUPPORT_FALSE = @MULTIHEAD_SUPPORT_FALSE@ +-MULTIHEAD_SUPPORT_TRUE = @MULTIHEAD_SUPPORT_TRUE@ ++MKDIR_P = @MKDIR_P@ ++NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ +-OS_WIN32_FALSE = @OS_WIN32_FALSE@ +-OS_WIN32_TRUE = @OS_WIN32_TRUE@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ +@@ -149,48 +221,43 @@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PERL = @PERL@ + PKG_CONFIG = @PKG_CONFIG@ +-PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ +-PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ + RANLIB = @RANLIB@ + REBUILD = @REBUILD@ ++SED = @SED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STRIP = @STRIP@ +-USE_WIN32_FALSE = @USE_WIN32_FALSE@ +-USE_WIN32_TRUE = @USE_WIN32_TRUE@ +-USE_X11_FALSE = @USE_X11_FALSE@ +-USE_X11_TRUE = @USE_X11_TRUE@ + VERSION = @VERSION@ + WINDOWING_CFLAGS = @WINDOWING_CFLAGS@ + WINDOWING_LIBS = @WINDOWING_LIBS@ ++XMKMF = @XMKMF@ + X_CFLAGS = @X_CFLAGS@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ + X_LIBS = @X_LIBS@ + X_PRE_LIBS = @X_PRE_LIBS@ +-ac_ct_AR = @ac_ct_AR@ +-ac_ct_AS = @ac_ct_AS@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ +-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ +-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ ++am__tar = @am__tar@ ++am__untar = @am__untar@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + gdkglext_targetlib = @gdkglext_targetlib@ + gdktarget = @gdktarget@ +@@ -200,39 +267,41 @@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ ++mkdir_p = @mkdir_p@ + ms_librarian = @ms_librarian@ + oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +- ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ + SUBDIRS = glext $(gdktarget) +-DIST_SUBDIRS = glext x11 win32 +- ++DIST_SUBDIRS = glext x11 win32 quartz + EXTRA_DIST = \ + gdkglversion.h.in \ + gdkglext.def \ + gdkglext-gtk20.def + +- + @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined +- +-@MULTIHEAD_SUPPORT_TRUE@@OS_WIN32_TRUE@gdkglext_def = gdkglext.def + @MULTIHEAD_SUPPORT_FALSE@@OS_WIN32_TRUE@gdkglext_def = gdkglext-gtk20.def ++@MULTIHEAD_SUPPORT_TRUE@@OS_WIN32_TRUE@gdkglext_def = gdkglext.def + @OS_WIN32_TRUE@gdkglext_win32_symbols = -export-symbols $(gdkglext_def) +- + @MS_LIB_AVAILABLE_TRUE@noinst_DATA = gdkglext-win32-@GTKGLEXT_API_VERSION@.lib +- + common_includes = \ + -DG_LOG_DOMAIN=\"GdkGLExt\" \ + -DGDK_GL_COMPILATION \ +@@ -243,7 +312,6 @@ + -DGDK_DISABLE_DEPRECATED \ + -DGDK_PIXBUF_DISABLE_DEPRECATED + +- + common_ldflags = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ + -export-dynamic \ +@@ -252,12 +320,10 @@ + @LIBTOOL_EXPORT_OPTIONS@ \ + $(gdkglext_win32_symbols) + +- + common_libadd = \ + $(GDKGLEXT_DEP_LIBS) + + +- + # + # setup source file variables + # +@@ -278,15 +344,12 @@ + gdkglshapes.h \ + gdkglglext.h + +- + gdkglext_private_h_sources = \ + gdkglprivate.h + +- + gdkglext_built_public_h_sources = \ + gdkglenumtypes.h + +- + gdkglext_c_sources = \ + gdkglversion.c \ + gdkglinit.c \ +@@ -299,64 +362,55 @@ + gdkglshapes.c \ + gdkglglext.c + +- + gdkglext_built_c_sources = \ + gdkglenumtypes.c + +- + gdkglext_headers = \ + $(gdkglext_public_h_sources) \ + $(gdkglext_built_public_h_sources) \ + gdkgldebug.h + +- + gdkglext_sources = \ + $(gdkglext_private_h_sources) \ + $(gdkglext_c_sources) \ + $(gdkglext_built_c_sources) + +- + gdkglext_built_sources = \ + $(gdkglext_built_public_h_sources) \ + $(gdkglext_built_c_sources) + +- + stamp_files = \ + stamp-gdkglenumtypes-h + + +- + # + # setup GdkGLExt sources and their dependancies + # + gdkglextincludedir = $(includedir)/gtkglext-@GTKGLEXT_API_VERSION@/gdk + gdkglextinclude_HEADERS = $(gdkglext_headers) +- + INCLUDES = $(common_includes) +- + lib_LTLIBRARIES = $(gdkglext_targetlib) +- + EXTRA_LTLIBRARIES = \ + libgdkglext-x11-@API_MJ@.@API_MI@.la \ ++ libgdkglext-quartz-@API_MJ@.@API_MI@.la \ + libgdkglext-win32-@API_MJ@.@API_MI@.la + +- + libgdkglext_x11_@API_MJ@_@API_MI@_la_SOURCES = $(gdkglext_sources) + libgdkglext_x11_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags) + libgdkglext_x11_@API_MJ@_@API_MI@_la_LIBADD = x11/libgdkglext-x11.la $(common_libadd) +- ++libgdkglext_quartz_@API_MJ@_@API_MI@_la_SOURCES = $(gdkglext_sources) ++libgdkglext_quartz_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags) ++libgdkglext_quartz_@API_MJ@_@API_MI@_la_LIBADD = quartz/libgdkglext-quartz.la $(common_libadd) + libgdkglext_win32_@API_MJ@_@API_MI@_la_SOURCES = $(gdkglext_sources) + libgdkglext_win32_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags) + libgdkglext_win32_@API_MJ@_@API_MI@_la_LIBADD = win32/libgdkglext-win32.la $(common_libadd) + libgdkglext_win32_@API_MJ@_@API_MI@_la_DEPENDENCIES = $(gdkglext_def) +- + BUILT_SOURCES = \ + @REBUILD@ \ + $(gdkglext_built_sources) + +- +-DISTCLEANFILES = $(stamp_files) gdkglext-config.h stamp-gdkglext-config-h +- ++DISTCLEANFILES = $(stamp_files) gdkglext-config.h \ ++ stamp-gdkglext-config-h + MAINTAINERCLEANFILES = \ + $(gdkglext_built_sources) + +@@ -365,112 +419,78 @@ + # Rule to install gdkglext-config.h header file + # + configexecincludedir = $(libdir)/gtkglext-@GTKGLEXT_API_VERSION@/include +-subdir = gdk +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +-CONFIG_HEADER = $(top_builddir)/config.h +-CONFIG_CLEAN_FILES = gdkglversion.h +-LTLIBRARIES = $(lib_LTLIBRARIES) +- +-am__objects_1 = +-am__objects_2 = gdkglversion.lo gdkglinit.lo gdkglquery.lo \ +- gdkglconfig.lo gdkglcontext.lo gdkgldrawable.lo gdkglpixmap.lo \ +- gdkglwindow.lo gdkglshapes.lo gdkglglext.lo +-am__objects_3 = gdkglenumtypes.lo +-am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3) +-am_libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_4) +-libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = \ +- $(am_libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) +-libgdkglext_x11_@API_MJ@_@API_MI@_la_DEPENDENCIES = \ +- x11/libgdkglext-x11.la +-am_libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_4) +-libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = \ +- $(am_libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) +- +-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +-depcomp = $(SHELL) $(top_srcdir)/depcomp +-am__depfiles_maybe = depfiles +-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gdkglconfig.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglcontext.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkgldrawable.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglenumtypes.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglglext.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglinit.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglpixmap.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglquery.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglshapes.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglversion.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gdkglwindow.Plo +-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ +- $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-CCLD = $(CC) +-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-DIST_SOURCES = $(libgdkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) \ +- $(libgdkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) +-DATA = $(noinst_DATA) +- +-HEADERS = $(gdkglextinclude_HEADERS) +- +- +-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ +- ps-recursive install-info-recursive uninstall-info-recursive \ +- all-recursive install-data-recursive install-exec-recursive \ +- installdirs-recursive install-recursive uninstall-recursive \ +- check-recursive installcheck-recursive +-DIST_COMMON = $(gdkglextinclude_HEADERS) $(srcdir)/Makefile.in \ +- Makefile.am gdkglversion.h.in +-SOURCES = $(libgdkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) +- + all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + + .SUFFIXES: + .SUFFIXES: .c .lo .o .obj +-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gdk/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu gdk/Makefile +-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status +- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +-gdkglversion.h: $(top_builddir)/config.status gdkglversion.h.in ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ++ esac; ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++gdkglversion.h: $(top_builddir)/config.status $(srcdir)/gdkglversion.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +-libLTLIBRARIES_INSTALL = $(INSTALL) + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(libdir) ++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ +- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + + uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +- p="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ +- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ ++ p=$(am__strip_dir) \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + + clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ +- test "$$dir" = "$$p" && dir=.; \ ++ test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done ++libgdkglext-quartz-@API_MJ@.@API_MI@.la: $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_DEPENDENCIES) ++ $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_LINK) $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) + libgdkglext-win32-@API_MJ@.@API_MI@.la: $(libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_DEPENDENCIES) +- $(LINK) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_LDFLAGS) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) ++ $(libgdkglext_win32_@API_MJ@_@API_MI@_la_LINK) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) + libgdkglext-x11-@API_MJ@.@API_MI@.la: $(libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_DEPENDENCIES) +- $(LINK) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_LDFLAGS) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) ++ $(libgdkglext_x11_@API_MJ@_@API_MI@_la_LINK) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_x11_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) + + mostlyclean-compile: +- -rm -f *.$(OBJEXT) core *.core ++ -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c +@@ -488,64 +508,47 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdkglwindow.Plo@am__quote@ + + .c.o: +-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +-@am__fastdepCC_TRUE@ fi ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: +-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +-@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +-@am__fastdepCC_TRUE@ fi ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + .c.lo: +-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +-@am__fastdepCC_TRUE@ fi ++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + + mostlyclean-libtool: + -rm -f *.lo + + clean-libtool: + -rm -rf .libs _libs +- +-distclean-libtool: +- -rm -f libtool +-uninstall-info-am: +-gdkglextincludeHEADERS_INSTALL = $(INSTALL_HEADER) + install-gdkglextincludeHEADERS: $(gdkglextinclude_HEADERS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(gdkglextincludedir) ++ test -z "$(gdkglextincludedir)" || $(MKDIR_P) "$(DESTDIR)$(gdkglextincludedir)" + @list='$(gdkglextinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(gdkglextincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(gdkglextincludedir)/$$f"; \ +- $(gdkglextincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(gdkglextincludedir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " $(gdkglextincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(gdkglextincludedir)/$$f'"; \ ++ $(gdkglextincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(gdkglextincludedir)/$$f"; \ + done + + uninstall-gdkglextincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(gdkglextinclude_HEADERS)'; for p in $$list; do \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " rm -f $(DESTDIR)$(gdkglextincludedir)/$$f"; \ +- rm -f $(DESTDIR)$(gdkglextincludedir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(gdkglextincludedir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(gdkglextincludedir)/$$f"; \ + done + + # This directory's subdirectories are mostly independent; you can cd +@@ -555,7 +558,13 @@ + # (which will cause the Makefiles to be regenerated when you run `make'); + # (2) otherwise, pass the desired values on the `make' command line. + $(RECURSIVE_TARGETS): +- @set fnord $$MAKEFLAGS; amf=$$2; \ ++ @failcom='exit 1'; \ ++ for f in x $$MAKEFLAGS; do \ ++ case $$f in \ ++ *=* | --[!k]*);; \ ++ *k*) failcom='fail=yes';; \ ++ esac; \ ++ done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -567,15 +576,20 @@ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +-mostlyclean-recursive clean-recursive distclean-recursive \ +-maintainer-clean-recursive: +- @set fnord $$MAKEFLAGS; amf=$$2; \ ++$(RECURSIVE_CLEAN_TARGETS): ++ @failcom='exit 1'; \ ++ for f in x $$MAKEFLAGS; do \ ++ case $$f in \ ++ *=* | --[!k]*);; \ ++ *k*) failcom='fail=yes';; \ ++ esac; \ ++ done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ +@@ -596,7 +610,7 @@ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ || eval $$failcom; \ + done && test -z "$$fail" + tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -607,35 +621,30 @@ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +-ETAGS = etags +-ETAGSFLAGS = +- +-CTAGS = ctags +-CTAGSFLAGS = +- +-tags: TAGS +- + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique ++tags: TAGS + + TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ +- if (etags --etags-include --version) >/dev/null 2>&1; then \ ++ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ ++ empty_fix=.; \ + else \ + include_option=--include; \ ++ empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && \ ++ test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ +@@ -643,23 +652,23 @@ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ +- test -z "$(ETAGS_ARGS)$$tags$$unique" \ +- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique +- ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ ++ fi + ctags: CTAGS + CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ +- here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +@@ -671,28 +680,23 @@ + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +- +-top_distdir = .. +-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + + distdir: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkinstalldirs) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -705,13 +709,17 @@ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -d $(distdir)/$$subdir \ +- || mkdir $(distdir)/$$subdir \ ++ test -d "$(distdir)/$$subdir" \ ++ || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ ++ distdir=`$(am__cd) $(distdir) && pwd`; \ ++ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ +- top_distdir="$(top_distdir)" \ +- distdir=../$(distdir)/$$subdir \ ++ top_distdir="$$top_distdir" \ ++ distdir="$$distdir/$$subdir" \ ++ am__remove_distdir=: \ ++ am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ +@@ -722,8 +730,9 @@ + all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) + installdirs: installdirs-recursive + installdirs-am: +- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(gdkglextincludedir) +- ++ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gdkglextincludedir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done + install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive + install-exec: install-exec-recursive +@@ -744,14 +753,14 @@ + clean-generic: + + distclean-generic: +- -rm -f $(CONFIG_CLEAN_FILES) ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) ++ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + clean: clean-recursive + + clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ +@@ -761,24 +770,34 @@ + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-libtool distclean-tags ++ distclean-tags + + dvi: dvi-recursive + + dvi-am: + ++html: html-recursive ++ + info: info-recursive + + info-am: + + install-data-am: install-data-local install-gdkglextincludeHEADERS + ++install-dvi: install-dvi-recursive ++ + install-exec-am: install-exec-local install-libLTLIBRARIES + ++install-html: install-html-recursive ++ + install-info: install-info-recursive + + install-man: + ++install-pdf: install-pdf-recursive ++ ++install-ps: install-ps-recursive ++ + installcheck-am: + + maintainer-clean: maintainer-clean-recursive +@@ -799,32 +818,30 @@ + + ps-am: + +-uninstall-am: uninstall-gdkglextincludeHEADERS uninstall-info-am \ ++uninstall-am: uninstall-gdkglextincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local + +-uninstall-info: uninstall-info-recursive ++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ ++ install-strip + +-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ +- clean-generic clean-libLTLIBRARIES clean-libtool \ +- clean-recursive ctags ctags-recursive distclean \ +- distclean-compile distclean-generic distclean-libtool \ +- distclean-recursive distclean-tags distdir dvi dvi-am \ +- dvi-recursive info info-am info-recursive install install-am \ +- install-data install-data-am install-data-local \ +- install-data-recursive install-exec install-exec-am \ +- install-exec-local install-exec-recursive \ +- install-gdkglextincludeHEADERS install-info install-info-am \ +- install-info-recursive install-libLTLIBRARIES install-man \ +- install-recursive install-strip installcheck installcheck-am \ +- installdirs installdirs-am installdirs-recursive \ +- maintainer-clean maintainer-clean-generic \ +- maintainer-clean-recursive mostlyclean mostlyclean-compile \ +- mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ +- pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ +- tags-recursive uninstall uninstall-am \ +- uninstall-gdkglextincludeHEADERS uninstall-info-am \ +- uninstall-info-recursive uninstall-libLTLIBRARIES \ +- uninstall-local uninstall-recursive ++.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ ++ all all-am check check-am clean clean-generic \ ++ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ ++ distclean distclean-compile distclean-generic \ ++ distclean-libtool distclean-tags distdir dvi dvi-am html \ ++ html-am info info-am install install-am install-data \ ++ install-data-am install-data-local install-dvi install-dvi-am \ ++ install-exec install-exec-am install-exec-local \ ++ install-gdkglextincludeHEADERS install-html install-html-am \ ++ install-info install-info-am install-libLTLIBRARIES \ ++ install-man install-pdf install-pdf-am install-ps \ ++ install-ps-am install-strip installcheck installcheck-am \ ++ installdirs installdirs-am maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ++ tags tags-recursive uninstall uninstall-am \ ++ uninstall-gdkglextincludeHEADERS uninstall-libLTLIBRARIES \ ++ uninstall-local + + + @MS_LIB_AVAILABLE_TRUE@gdkglext-win32-@GTKGLEXT_API_VERSION@.lib: libgdkglext-win32-@GTKGLEXT_API_VERSION@.la $(gdkglext_def) +@@ -839,7 +856,7 @@ + @MS_LIB_AVAILABLE_FALSE@uninstall-ms-lib: + + # Generate built header without using automake BUILT_SOURCES +-$(libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS): $(gdkglext_built_public_h_sources) ++$(libgdkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) $(libgdkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS): $(gdkglext_built_public_h_sources) + + $(srcdir)/gdkglenumtypes.h: stamp-gdkglenumtypes-h + @true diff --git a/Patches/gtkglext/patch-gtk-gtkglwidget.c.diff b/Patches/gtkglext/patch-gtk-gtkglwidget.c.diff new file mode 100644 index 0000000000000..c0caca3cbd6f6 --- /dev/null +++ b/Patches/gtkglext/patch-gtk-gtkglwidget.c.diff @@ -0,0 +1,76 @@ +--- gtk/gtkglwidget.c.orig 2004-02-20 01:38:36.000000000 -0800 ++++ gtk/gtkglwidget.c 2010-07-26 22:42:45.000000000 -0700 +@@ -127,7 +127,7 @@ + * Synchronize OpenGL and window resizing request streams. + */ + +- if (GTK_WIDGET_REALIZED (widget) && private->is_realized) ++ if (gtk_widget_get_realized (widget) && private->is_realized) + { + gldrawable = gdk_window_get_gl_drawable (widget->window); + gdk_gl_drawable_wait_gdk (gldrawable); +@@ -154,7 +154,7 @@ + * Remove OpenGL-capability from widget->window. + */ + +- if (GTK_WIDGET_REALIZED (widget)) ++ if (gtk_widget_get_realized (widget)) + gdk_window_unset_gl_capability (widget->window); + + private->is_realized = FALSE; +@@ -174,7 +174,7 @@ + */ + + toplevel = gtk_widget_get_toplevel (widget); +- if (GTK_WIDGET_TOPLEVEL (toplevel) && !GTK_WIDGET_REALIZED (toplevel)) ++ if (gtk_widget_is_toplevel (toplevel) && !gtk_widget_get_realized (toplevel)) + { + GTK_GL_NOTE (MISC, + g_message (" - Install colormap to the top-level window.")); +@@ -194,7 +194,7 @@ + * Set a background of "None" on window to avoid AIX X server crash. + */ + +- if (GTK_WIDGET_REALIZED (widget)) ++ if (gtk_widget_get_realized (widget)) + { + GTK_GL_NOTE (MISC, + g_message (" - window->bg_pixmap = %p", +@@ -250,8 +250,8 @@ + GTK_GL_NOTE_FUNC (); + + g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); +- g_return_val_if_fail (!GTK_WIDGET_NO_WINDOW (widget), FALSE); +- g_return_val_if_fail (!GTK_WIDGET_REALIZED (widget), FALSE); ++ g_return_val_if_fail (gtk_widget_get_has_window (widget), FALSE); ++ g_return_val_if_fail (!gtk_widget_get_realized (widget), FALSE); + g_return_val_if_fail (GDK_IS_GL_CONFIG (glconfig), FALSE); + + /* +@@ -432,7 +432,7 @@ + GTK_GL_NOTE_FUNC (); + + g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); +- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL); ++ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL); + + gldrawable = gdk_window_get_gl_drawable (widget->window); + if (gldrawable == NULL) +@@ -474,7 +474,7 @@ + GLWidgetPrivate *private; + + g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); +- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL); ++ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL); + + private = g_object_get_qdata (G_OBJECT (widget), quark_gl_private); + if (private == NULL) +@@ -501,7 +501,7 @@ + gtk_widget_get_gl_window (GtkWidget *widget) + { + g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); +- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL); ++ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL); + + return gdk_window_get_gl_window (widget->window); + } diff --git a/Patches/gtkglext/patch-gtk-makefile.in.diff b/Patches/gtkglext/patch-gtk-makefile.in.diff new file mode 100644 index 0000000000000..a497c7be6180a --- /dev/null +++ b/Patches/gtkglext/patch-gtk-makefile.in.diff @@ -0,0 +1,771 @@ +--- gtk/Makefile.in.orig 2009-08-24 14:16:17.000000000 +0400 ++++ gtk/Makefile.in 2009-08-24 13:25:09.000000000 +0400 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.7.9 from Makefile.am. ++# Makefile.in generated by automake 1.10.1 from Makefile.am. + # @configure_input@ + +-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +-# Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -14,16 +14,13 @@ + + @SET_MAKE@ + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ ++ ++ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = .. +- + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -35,10 +32,87 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++build_triplet = @build@ + host_triplet = @host@ ++subdir = gtk ++DIST_COMMON = $(gtkglextinclude_HEADERS) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/gtkglversion.h.in ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++mkinstalldirs = $(install_sh) -d ++CONFIG_HEADER = $(top_builddir)/config.h ++CONFIG_CLEAN_FILES = gtkglversion.h ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ++am__installdirs = "$(DESTDIR)$(libdir)" \ ++ "$(DESTDIR)$(gtkglextincludedir)" ++libLTLIBRARIES_INSTALL = $(INSTALL) ++LTLIBRARIES = $(lib_LTLIBRARIES) ++am__DEPENDENCIES_1 = ++am__DEPENDENCIES_2 = $(top_builddir)/gdk/$(gdkglext_targetlib) \ ++ $(am__DEPENDENCIES_1) ++libgtkglext_quartz_@API_MJ@_@API_MI@_la_DEPENDENCIES = \ ++ $(am__DEPENDENCIES_2) ++am__objects_1 = ++am__objects_2 = gtkglversion.lo gtkglinit.lo gtkglwidget.lo ++am__objects_3 = $(am__objects_1) $(am__objects_2) ++am_libgtkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_3) ++libgtkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS = \ ++ $(am_libgtkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) ++libgtkglext_quartz_@API_MJ@_@API_MI@_la_LINK = $(LIBTOOL) --tag=CC \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_CFLAGS) $(CFLAGS) \ ++ $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_LDFLAGS) $(LDFLAGS) \ ++ -o $@ ++am_libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_3) ++libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = \ ++ $(am_libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) ++libgtkglext_win32_@API_MJ@_@API_MI@_la_LINK = $(LIBTOOL) --tag=CC \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_CFLAGS) $(CFLAGS) \ ++ $(libgtkglext_win32_@API_MJ@_@API_MI@_la_LDFLAGS) $(LDFLAGS) \ ++ -o $@ ++libgtkglext_x11_@API_MJ@_@API_MI@_la_DEPENDENCIES = \ ++ $(am__DEPENDENCIES_2) ++am_libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_3) ++libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = \ ++ $(am_libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) ++libgtkglext_x11_@API_MJ@_@API_MI@_la_LINK = $(LIBTOOL) --tag=CC \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_CFLAGS) $(CFLAGS) \ ++ $(libgtkglext_x11_@API_MJ@_@API_MI@_la_LDFLAGS) $(LDFLAGS) -o \ ++ $@ ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) ++depcomp = $(SHELL) $(top_srcdir)/depcomp ++am__depfiles_maybe = depfiles ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++CCLD = $(CC) ++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ ++ $(LDFLAGS) -o $@ ++SOURCES = $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgtkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgtkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) ++DIST_SOURCES = $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgtkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) \ ++ $(libgtkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) ++DATA = $(noinst_DATA) ++gtkglextincludeHEADERS_INSTALL = $(INSTALL_HEADER) ++HEADERS = $(gtkglextinclude_HEADERS) ++ETAGS = etags ++CTAGS = ctags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + API_MI = @API_MI@ + API_MJ = @API_MJ@ +@@ -63,13 +137,12 @@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ + DLLTOOL = @DLLTOOL@ ++DSYMUTIL = @DSYMUTIL@ + ECHO = @ECHO@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ +-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@ +-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@ + EXAMPLES_DEP_CFLAGS = @EXAMPLES_DEP_CFLAGS@ + EXEEXT = @EXEEXT@ + F77 = @F77@ +@@ -83,13 +156,9 @@ + GDKGLEXT_WIN_CFLAGS = @GDKGLEXT_WIN_CFLAGS@ + GDKGLEXT_WIN_EXTRA_DEFS = @GDKGLEXT_WIN_EXTRA_DEFS@ + GDKGLEXT_WIN_LIBS = @GDKGLEXT_WIN_LIBS@ +-GLIB_CFLAGS = @GLIB_CFLAGS@ +-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +-GLIB_LIBS = @GLIB_LIBS@ +-GLIB_MKENUMS = @GLIB_MKENUMS@ + GL_CFLAGS = @GL_CFLAGS@ + GL_LIBS = @GL_LIBS@ +-GOBJECT_QUERY = @GOBJECT_QUERY@ ++GREP = @GREP@ + GTKDOC = @GTKDOC@ + GTKGLEXT_API_MAJOR_VERSION = @GTKGLEXT_API_MAJOR_VERSION@ + GTKGLEXT_API_MINOR_VERSION = @GTKGLEXT_API_MINOR_VERSION@ +@@ -107,10 +176,8 @@ + GTKGLEXT_MINOR_VERSION = @GTKGLEXT_MINOR_VERSION@ + GTKGLEXT_PACKAGES = @GTKGLEXT_PACKAGES@ + GTKGLEXT_VERSION = @GTKGLEXT_VERSION@ +-GTK_CFLAGS = @GTK_CFLAGS@ +-GTK_LIBS = @GTK_LIBS@ + HTML_DIR = @HTML_DIR@ +-INDENT = @INDENT@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -128,18 +195,12 @@ + LT_RELEASE = @LT_RELEASE@ + LT_REVISION = @LT_REVISION@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MATH_LIB = @MATH_LIB@ +-MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@ +-MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@ +-MULTIHEAD_SUPPORT_FALSE = @MULTIHEAD_SUPPORT_FALSE@ +-MULTIHEAD_SUPPORT_TRUE = @MULTIHEAD_SUPPORT_TRUE@ ++MKDIR_P = @MKDIR_P@ ++NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ +-OS_WIN32_FALSE = @OS_WIN32_FALSE@ +-OS_WIN32_TRUE = @OS_WIN32_TRUE@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ +@@ -149,48 +210,43 @@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PERL = @PERL@ + PKG_CONFIG = @PKG_CONFIG@ +-PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ +-PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ + RANLIB = @RANLIB@ + REBUILD = @REBUILD@ ++SED = @SED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STRIP = @STRIP@ +-USE_WIN32_FALSE = @USE_WIN32_FALSE@ +-USE_WIN32_TRUE = @USE_WIN32_TRUE@ +-USE_X11_FALSE = @USE_X11_FALSE@ +-USE_X11_TRUE = @USE_X11_TRUE@ + VERSION = @VERSION@ + WINDOWING_CFLAGS = @WINDOWING_CFLAGS@ + WINDOWING_LIBS = @WINDOWING_LIBS@ ++XMKMF = @XMKMF@ + X_CFLAGS = @X_CFLAGS@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ + X_LIBS = @X_LIBS@ + X_PRE_LIBS = @X_PRE_LIBS@ +-ac_ct_AR = @ac_ct_AR@ +-ac_ct_AS = @ac_ct_AS@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ +-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ +-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ ++am__tar = @am__tar@ ++am__untar = @am__untar@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + gdkglext_targetlib = @gdkglext_targetlib@ + gdktarget = @gdktarget@ +@@ -200,34 +256,37 @@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ ++mkdir_p = @mkdir_p@ + ms_librarian = @ms_librarian@ + oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +- ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ + EXTRA_DIST = \ + gtkglversion.h.in \ + gtkglext.def + +- + @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined +- + @OS_WIN32_TRUE@gtkglext_def = gtkglext.def + @OS_WIN32_TRUE@gtkglext_win32_symbols = -export-symbols $(gtkglext_def) +- + @MS_LIB_AVAILABLE_TRUE@noinst_DATA = gtkglext-win32-@GTKGLEXT_API_VERSION@.lib +- + common_includes = \ + -DG_LOG_DOMAIN=\"GtkGLExt\" \ + -DGTK_GL_COMPILATION \ +@@ -240,7 +299,6 @@ + -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED + +- + common_ldflags = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ + -export-dynamic \ +@@ -249,13 +307,11 @@ + @LIBTOOL_EXPORT_OPTIONS@ \ + $(gtkglext_win32_symbols) + +- + common_libadd = \ + $(top_builddir)/gdk/$(gdkglext_targetlib) \ + $(GTKGLEXT_DEP_LIBS) + + +- + # + # setup source file variables + # +@@ -266,139 +322,116 @@ + gtkglinit.h \ + gtkglwidget.h + +- + gtkglext_private_h_sources = \ + gtkglprivate.h + +- + gtkglext_c_sources = \ + gtkglversion.c \ + gtkglinit.c \ + gtkglwidget.c + +- + gtkglext_headers = \ + $(gtkglext_public_h_sources) \ + gtkgldebug.h + +- + gtkglext_sources = \ + $(gtkglext_private_h_sources) \ + $(gtkglext_c_sources) + + +- + # + # setup GtkGLExt sources and their dependancies + # + gtkglextincludedir = $(includedir)/gtkglext-@GTKGLEXT_API_VERSION@/gtk + gtkglextinclude_HEADERS = $(gtkglext_headers) +- + INCLUDES = $(common_includes) +- + lib_LTLIBRARIES = $(gtkglext_targetlib) +- + EXTRA_LTLIBRARIES = \ + libgtkglext-x11-@API_MJ@.@API_MI@.la \ ++ libgtkglext-quartz-@API_MJ@.@API_MI@.la \ + libgtkglext-win32-@API_MJ@.@API_MI@.la + +- + libgtkglext_x11_@API_MJ@_@API_MI@_la_SOURCES = $(gtkglext_sources) + libgtkglext_x11_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags) + libgtkglext_x11_@API_MJ@_@API_MI@_la_LIBADD = $(common_libadd) +- ++libgtkglext_quartz_@API_MJ@_@API_MI@_la_SOURCES = $(gtkglext_sources) ++libgtkglext_quartz_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags) ++libgtkglext_quartz_@API_MJ@_@API_MI@_la_LIBADD = $(common_libadd) + libgtkglext_win32_@API_MJ@_@API_MI@_la_SOURCES = $(gtkglext_sources) + libgtkglext_win32_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags) + libgtkglext_win32_@API_MJ@_@API_MI@_la_LIBADD = $(common_libadd) + libgtkglext_win32_@API_MJ@_@API_MI@_la_DEPENDENCIES = $(gtkglext_def) +-subdir = gtk +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +-CONFIG_HEADER = $(top_builddir)/config.h +-CONFIG_CLEAN_FILES = gtkglversion.h +-LTLIBRARIES = $(lib_LTLIBRARIES) +- +-am__objects_1 = +-am__objects_2 = gtkglversion.lo gtkglinit.lo gtkglwidget.lo +-am__objects_3 = $(am__objects_1) $(am__objects_2) +-am_libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_3) +-libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS = \ +- $(am_libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) +-libgtkglext_x11_@API_MJ@_@API_MI@_la_DEPENDENCIES = \ +- $(top_builddir)/gdk/$(gdkglext_targetlib) +-am_libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = $(am__objects_3) +-libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS = \ +- $(am_libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) +- +-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +-depcomp = $(SHELL) $(top_srcdir)/depcomp +-am__depfiles_maybe = depfiles +-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gtkglinit.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gtkglversion.Plo \ +-@AMDEP_TRUE@ ./$(DEPDIR)/gtkglwidget.Plo +-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ +- $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-CCLD = $(CC) +-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-DIST_SOURCES = $(libgtkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) \ +- $(libgtkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) +-DATA = $(noinst_DATA) +- +-HEADERS = $(gtkglextinclude_HEADERS) +- +-DIST_COMMON = $(gtkglextinclude_HEADERS) $(srcdir)/Makefile.in \ +- Makefile.am gtkglversion.h.in +-SOURCES = $(libgtkglext_win32_@API_MJ@_@API_MI@_la_SOURCES) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_SOURCES) +- + all: all-am + + .SUFFIXES: + .SUFFIXES: .c .lo .o .obj +-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gtk/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu gtk/Makefile +-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status +- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +-gtkglversion.h: $(top_builddir)/config.status gtkglversion.h.in ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ++ esac; ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++gtkglversion.h: $(top_builddir)/config.status $(srcdir)/gtkglversion.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +-libLTLIBRARIES_INSTALL = $(INSTALL) + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(libdir) ++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ +- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + + uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +- p="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ +- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ ++ p=$(am__strip_dir) \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + + clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ +- test "$$dir" = "$$p" && dir=.; \ ++ test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done ++libgtkglext-quartz-@API_MJ@.@API_MI@.la: $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_DEPENDENCIES) ++ $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_LINK) $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_quartz_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) + libgtkglext-win32-@API_MJ@.@API_MI@.la: $(libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_win32_@API_MJ@_@API_MI@_la_DEPENDENCIES) +- $(LINK) $(libgtkglext_win32_@API_MJ@_@API_MI@_la_LDFLAGS) $(libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_win32_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) ++ $(libgtkglext_win32_@API_MJ@_@API_MI@_la_LINK) $(libgtkglext_win32_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_win32_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) + libgtkglext-x11-@API_MJ@.@API_MI@.la: $(libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_DEPENDENCIES) +- $(LINK) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_LDFLAGS) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) ++ $(libgtkglext_x11_@API_MJ@_@API_MI@_la_LINK) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_OBJECTS) $(libgtkglext_x11_@API_MJ@_@API_MI@_la_LIBADD) $(LIBS) + + mostlyclean-compile: +- -rm -f *.$(OBJEXT) core *.core ++ -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c +@@ -408,82 +441,58 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkglwidget.Plo@am__quote@ + + .c.o: +-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +-@am__fastdepCC_TRUE@ fi ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: +-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +-@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +-@am__fastdepCC_TRUE@ fi ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + .c.lo: +-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +-@am__fastdepCC_TRUE@ fi ++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + + mostlyclean-libtool: + -rm -f *.lo + + clean-libtool: + -rm -rf .libs _libs +- +-distclean-libtool: +- -rm -f libtool +-uninstall-info-am: +-gtkglextincludeHEADERS_INSTALL = $(INSTALL_HEADER) + install-gtkglextincludeHEADERS: $(gtkglextinclude_HEADERS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(gtkglextincludedir) ++ test -z "$(gtkglextincludedir)" || $(MKDIR_P) "$(DESTDIR)$(gtkglextincludedir)" + @list='$(gtkglextinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(gtkglextincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(gtkglextincludedir)/$$f"; \ +- $(gtkglextincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(gtkglextincludedir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " $(gtkglextincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(gtkglextincludedir)/$$f'"; \ ++ $(gtkglextincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(gtkglextincludedir)/$$f"; \ + done + + uninstall-gtkglextincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(gtkglextinclude_HEADERS)'; for p in $$list; do \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " rm -f $(DESTDIR)$(gtkglextincludedir)/$$f"; \ +- rm -f $(DESTDIR)$(gtkglextincludedir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(gtkglextincludedir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(gtkglextincludedir)/$$f"; \ + done + +-ETAGS = etags +-ETAGSFLAGS = +- +-CTAGS = ctags +-CTAGSFLAGS = +- +-tags: TAGS +- + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique ++tags: TAGS + + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) +@@ -493,23 +502,23 @@ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ +- test -z "$(ETAGS_ARGS)$$tags$$unique" \ +- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique +- ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ ++ fi + ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ +- here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +@@ -521,28 +530,23 @@ + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +- +-top_distdir = .. +-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + + distdir: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkinstalldirs) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -556,9 +560,10 @@ + check-am: all-am + check: check-am + all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +- + installdirs: +- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(gtkglextincludedir) ++ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gtkglextincludedir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done + install: install-am + install-exec: install-exec-am + install-data: install-data-am +@@ -578,7 +583,7 @@ + clean-generic: + + distclean-generic: +- -rm -f $(CONFIG_CLEAN_FILES) ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" +@@ -592,24 +597,34 @@ + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-libtool distclean-tags ++ distclean-tags + + dvi: dvi-am + + dvi-am: + ++html: html-am ++ + info: info-am + + info-am: + + install-data-am: install-data-local install-gtkglextincludeHEADERS + ++install-dvi: install-dvi-am ++ + install-exec-am: install-libLTLIBRARIES + ++install-html: install-html-am ++ + install-info: install-info-am + + install-man: + ++install-pdf: install-pdf-am ++ ++install-ps: install-ps-am ++ + installcheck-am: + + maintainer-clean: maintainer-clean-am +@@ -630,21 +645,25 @@ + + ps-am: + +-uninstall-am: uninstall-gtkglextincludeHEADERS uninstall-info-am \ ++uninstall-am: uninstall-gtkglextincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local + ++.MAKE: install-am install-strip ++ + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ +- distclean-tags distdir dvi dvi-am info info-am install \ +- install-am install-data install-data-am install-data-local \ +- install-exec install-exec-am install-gtkglextincludeHEADERS \ +- install-info install-info-am install-libLTLIBRARIES install-man \ +- install-strip installcheck installcheck-am installdirs \ +- maintainer-clean maintainer-clean-generic mostlyclean \ +- mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ +- pdf-am ps ps-am tags uninstall uninstall-am \ +- uninstall-gtkglextincludeHEADERS uninstall-info-am \ ++ distclean-tags distdir dvi dvi-am html html-am info info-am \ ++ install install-am install-data install-data-am \ ++ install-data-local install-dvi install-dvi-am install-exec \ ++ install-exec-am install-gtkglextincludeHEADERS install-html \ ++ install-html-am install-info install-info-am \ ++ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ ++ install-ps install-ps-am install-strip installcheck \ ++ installcheck-am installdirs maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ++ tags uninstall uninstall-am uninstall-gtkglextincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local + + diff --git a/Patches/gtkglext/patch-makefile.in.diff b/Patches/gtkglext/patch-makefile.in.diff new file mode 100644 index 0000000000000..899707ae363e5 --- /dev/null +++ b/Patches/gtkglext/patch-makefile.in.diff @@ -0,0 +1,818 @@ +--- Makefile.in.orig 2009-08-24 14:57:21.000000000 +0400 ++++ Makefile.in 2009-08-24 14:58:56.000000000 +0400 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.7.9 from Makefile.am. ++# Makefile.in generated by automake 1.10.1 from Makefile.am. + # @configure_input@ + +-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +-# Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -14,16 +14,11 @@ + + @SET_MAKE@ + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = . +- + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -35,10 +30,61 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++build_triplet = @build@ + host_triplet = @host@ ++subdir = . ++DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ ++ $(srcdir)/gdkglext-uninstalled.pc.in $(srcdir)/gdkglext.pc.in \ ++ $(srcdir)/gtkglext-uninstalled.pc.in $(srcdir)/gtkglext.nsi.in \ ++ $(srcdir)/gtkglext.pc.in $(srcdir)/gtkglext.spec.in \ ++ $(top_srcdir)/configure AUTHORS COPYING COPYING.LIB ChangeLog \ ++ INSTALL NEWS TODO config.guess config.sub depcomp install-sh \ ++ ltmain.sh missing ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno config.status.lineno ++mkinstalldirs = $(install_sh) -d ++CONFIG_HEADER = config.h ++CONFIG_CLEAN_FILES = gdkglext.pc gtkglext.pc gdkglext-uninstalled.pc \ ++ gtkglext-uninstalled.pc gtkglext.spec gtkglext.nsi ++SOURCES = ++DIST_SOURCES = ++RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ++ html-recursive info-recursive install-data-recursive \ ++ install-dvi-recursive install-exec-recursive \ ++ install-html-recursive install-info-recursive \ ++ install-pdf-recursive install-ps-recursive install-recursive \ ++ installcheck-recursive installdirs-recursive pdf-recursive \ ++ ps-recursive uninstall-recursive ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ++am__installdirs = "$(DESTDIR)$(pkgconfigdir)" ++pkgconfigDATA_INSTALL = $(INSTALL_DATA) ++DATA = $(pkgconfig_DATA) ++RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ ++ distclean-recursive maintainer-clean-recursive ++ETAGS = etags ++CTAGS = ctags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++distdir = $(PACKAGE)-$(VERSION) ++top_distdir = $(distdir) ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + API_MI = @API_MI@ + API_MJ = @API_MJ@ +@@ -63,13 +109,12 @@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ + DLLTOOL = @DLLTOOL@ ++DSYMUTIL = @DSYMUTIL@ + ECHO = @ECHO@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ +-ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@ +-ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@ + EXAMPLES_DEP_CFLAGS = @EXAMPLES_DEP_CFLAGS@ + EXEEXT = @EXEEXT@ + F77 = @F77@ +@@ -83,13 +128,9 @@ + GDKGLEXT_WIN_CFLAGS = @GDKGLEXT_WIN_CFLAGS@ + GDKGLEXT_WIN_EXTRA_DEFS = @GDKGLEXT_WIN_EXTRA_DEFS@ + GDKGLEXT_WIN_LIBS = @GDKGLEXT_WIN_LIBS@ +-GLIB_CFLAGS = @GLIB_CFLAGS@ +-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +-GLIB_LIBS = @GLIB_LIBS@ +-GLIB_MKENUMS = @GLIB_MKENUMS@ + GL_CFLAGS = @GL_CFLAGS@ + GL_LIBS = @GL_LIBS@ +-GOBJECT_QUERY = @GOBJECT_QUERY@ ++GREP = @GREP@ + GTKDOC = @GTKDOC@ + GTKGLEXT_API_MAJOR_VERSION = @GTKGLEXT_API_MAJOR_VERSION@ + GTKGLEXT_API_MINOR_VERSION = @GTKGLEXT_API_MINOR_VERSION@ +@@ -107,10 +148,8 @@ + GTKGLEXT_MINOR_VERSION = @GTKGLEXT_MINOR_VERSION@ + GTKGLEXT_PACKAGES = @GTKGLEXT_PACKAGES@ + GTKGLEXT_VERSION = @GTKGLEXT_VERSION@ +-GTK_CFLAGS = @GTK_CFLAGS@ +-GTK_LIBS = @GTK_LIBS@ + HTML_DIR = @HTML_DIR@ +-INDENT = @INDENT@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -128,18 +167,12 @@ + LT_RELEASE = @LT_RELEASE@ + LT_REVISION = @LT_REVISION@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MATH_LIB = @MATH_LIB@ +-MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@ +-MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@ +-MULTIHEAD_SUPPORT_FALSE = @MULTIHEAD_SUPPORT_FALSE@ +-MULTIHEAD_SUPPORT_TRUE = @MULTIHEAD_SUPPORT_TRUE@ ++MKDIR_P = @MKDIR_P@ ++NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ +-OS_WIN32_FALSE = @OS_WIN32_FALSE@ +-OS_WIN32_TRUE = @OS_WIN32_TRUE@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ +@@ -149,48 +182,43 @@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PERL = @PERL@ + PKG_CONFIG = @PKG_CONFIG@ +-PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ +-PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ + RANLIB = @RANLIB@ + REBUILD = @REBUILD@ ++SED = @SED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STRIP = @STRIP@ +-USE_WIN32_FALSE = @USE_WIN32_FALSE@ +-USE_WIN32_TRUE = @USE_WIN32_TRUE@ +-USE_X11_FALSE = @USE_X11_FALSE@ +-USE_X11_TRUE = @USE_X11_TRUE@ + VERSION = @VERSION@ + WINDOWING_CFLAGS = @WINDOWING_CFLAGS@ + WINDOWING_LIBS = @WINDOWING_LIBS@ ++XMKMF = @XMKMF@ + X_CFLAGS = @X_CFLAGS@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ + X_LIBS = @X_LIBS@ + X_PRE_LIBS = @X_PRE_LIBS@ +-ac_ct_AR = @ac_ct_AR@ +-ac_ct_AS = @ac_ct_AS@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ +-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ +-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ ++am__tar = @am__tar@ ++am__untar = @am__untar@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + gdkglext_targetlib = @gdkglext_targetlib@ + gdktarget = @gdktarget@ +@@ -200,25 +228,31 @@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ ++mkdir_p = @mkdir_p@ + ms_librarian = @ms_librarian@ + oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +- +-SUBDIRS = gdk gtk m4macros docs ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ ++SUBDIRS = gdk gtk docs + DIST_SUBDIRS = $(SUBDIRS) examples +- + EXTRA_DIST = \ + README.win32 \ + ChangeLog.pre-1-0 \ +@@ -232,10 +266,8 @@ + gtkglext.nsi \ + setup-gtkglext.sh + +- + GDK_TARGET = @gdktarget@ + API_VER = @GTKGLEXT_API_VERSION@ +- + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = \ + gdkglext-$(GDK_TARGET)-$(API_VER).pc \ +@@ -243,7 +275,6 @@ + gtkglext-$(GDK_TARGET)-$(API_VER).pc \ + gtkglext-$(API_VER).pc + +- + DISTCLEANFILES = \ + gdkglext-$(GDK_TARGET)-$(API_VER).pc \ + gdkglext-$(API_VER).pc \ +@@ -254,75 +285,71 @@ + gtkglext-$(GDK_TARGET)-$(API_VER)-uninstalled.pc \ + gtkglext-$(API_VER)-uninstalled.pc + +-subdir = . +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +-CONFIG_HEADER = config.h +-CONFIG_CLEAN_FILES = gdkglext.pc gtkglext.pc gdkglext-uninstalled.pc \ +- gtkglext-uninstalled.pc gtkglext.spec gtkglext.nsi +-DIST_SOURCES = +-DATA = $(pkgconfig_DATA) +- +- +-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ +- ps-recursive install-info-recursive uninstall-info-recursive \ +- all-recursive install-data-recursive install-exec-recursive \ +- installdirs-recursive install-recursive uninstall-recursive \ +- check-recursive installcheck-recursive +-DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ +- COPYING COPYING.LIB ChangeLog INSTALL Makefile.am NEWS TODO \ +- aclocal.m4 config.guess config.h.in config.sub configure \ +- configure.in depcomp gdkglext-uninstalled.pc.in gdkglext.pc.in \ +- gtkglext-uninstalled.pc.in gtkglext.nsi.in gtkglext.pc.in \ +- gtkglext.spec.in install-sh ltmain.sh missing mkinstalldirs + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + + .SUFFIXES: +- +-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ +- configure.lineno +-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++am--refresh: ++ @: ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ ++ cd $(srcdir) && $(AUTOMAKE) --gnu \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status +- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ echo ' $(SHELL) ./config.status'; \ ++ $(SHELL) ./config.status;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ ++ esac; + +-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) +- cd $(srcdir) && $(AUTOCONF) + +-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(srcdir) && $(AUTOCONF) ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + + config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ +- $(MAKE) stamp-h1; \ ++ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + + stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +- +-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) +- touch $(srcdir)/config.h.in ++ rm -f stamp-h1 ++ touch $@ + + distclean-hdr: + -rm -f config.h stamp-h1 +-gdkglext.pc: $(top_builddir)/config.status gdkglext.pc.in ++gdkglext.pc: $(top_builddir)/config.status $(srcdir)/gdkglext.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +-gtkglext.pc: $(top_builddir)/config.status gtkglext.pc.in ++gtkglext.pc: $(top_builddir)/config.status $(srcdir)/gtkglext.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +-gdkglext-uninstalled.pc: $(top_builddir)/config.status gdkglext-uninstalled.pc.in ++gdkglext-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gdkglext-uninstalled.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +-gtkglext-uninstalled.pc: $(top_builddir)/config.status gtkglext-uninstalled.pc.in ++gtkglext-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gtkglext-uninstalled.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +-gtkglext.spec: $(top_builddir)/config.status gtkglext.spec.in ++gtkglext.spec: $(top_builddir)/config.status $(srcdir)/gtkglext.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +-gtkglext.nsi: $(top_builddir)/config.status gtkglext.nsi.in ++gtkglext.nsi: $(top_builddir)/config.status $(srcdir)/gtkglext.nsi.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + + mostlyclean-libtool: +@@ -333,24 +360,22 @@ + + distclean-libtool: + -rm -f libtool +-uninstall-info-am: +-pkgconfigDATA_INSTALL = $(INSTALL_DATA) + install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) ++ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f"; \ +- $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ ++ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + + uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ +- f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " rm -f $(DESTDIR)$(pkgconfigdir)/$$f"; \ +- rm -f $(DESTDIR)$(pkgconfigdir)/$$f; \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + + # This directory's subdirectories are mostly independent; you can cd +@@ -360,7 +385,13 @@ + # (which will cause the Makefiles to be regenerated when you run `make'); + # (2) otherwise, pass the desired values on the `make' command line. + $(RECURSIVE_TARGETS): +- @set fnord $$MAKEFLAGS; amf=$$2; \ ++ @failcom='exit 1'; \ ++ for f in x $$MAKEFLAGS; do \ ++ case $$f in \ ++ *=* | --[!k]*);; \ ++ *k*) failcom='fail=yes';; \ ++ esac; \ ++ done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -372,15 +403,20 @@ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +-mostlyclean-recursive clean-recursive distclean-recursive \ +-maintainer-clean-recursive: +- @set fnord $$MAKEFLAGS; amf=$$2; \ ++$(RECURSIVE_CLEAN_TARGETS): ++ @failcom='exit 1'; \ ++ for f in x $$MAKEFLAGS; do \ ++ case $$f in \ ++ *=* | --[!k]*);; \ ++ *k*) failcom='fail=yes';; \ ++ esac; \ ++ done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ +@@ -401,7 +437,7 @@ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ || eval $$failcom; \ + done && test -z "$$fail" + tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -412,35 +448,30 @@ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +-ETAGS = etags +-ETAGSFLAGS = +- +-CTAGS = ctags +-CTAGSFLAGS = +- +-tags: TAGS +- + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique ++tags: TAGS + + TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ +- if (etags --etags-include --version) >/dev/null 2>&1; then \ ++ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ ++ empty_fix=.; \ + else \ + include_option=--include; \ ++ empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && \ ++ test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ +@@ -448,23 +479,23 @@ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ +- test -z "$(ETAGS_ARGS)$$tags$$unique" \ +- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique +- ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ ++ fi + ctags: CTAGS + CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ +- here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) ' { files[$$0] = 1; } \ +- END { for (i in files) print i; }'`; \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +@@ -476,40 +507,25 @@ + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +- +-top_distdir = . +-distdir = $(PACKAGE)-$(VERSION) +- +-am__remove_distdir = \ +- { test ! -d $(distdir) \ +- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ +- && rm -fr $(distdir); }; } +- +-GZIP_ENV = --best +-distuninstallcheck_listfiles = find . -type f -print +-distcleancheck_listfiles = find . -type f -print + + distdir: $(DISTFILES) + $(am__remove_distdir) +- mkdir $(distdir) +- $(mkinstalldirs) $(distdir)/. $(distdir)/docs/reference/gtkglext $(distdir)/gdk $(distdir)/gtk +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ test -d $(distdir) || mkdir $(distdir) ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkinstalldirs) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -522,13 +538,17 @@ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -d $(distdir)/$$subdir \ +- || mkdir $(distdir)/$$subdir \ ++ test -d "$(distdir)/$$subdir" \ ++ || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ ++ distdir=`$(am__cd) $(distdir) && pwd`; \ ++ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ +- top_distdir="$(top_distdir)" \ +- distdir=../$(distdir)/$$subdir \ ++ top_distdir="$$top_distdir" \ ++ distdir="$$distdir/$$subdir" \ ++ am__remove_distdir=: \ ++ am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ +@@ -536,24 +556,34 @@ + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ +- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ++ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) + dist-gzip: distdir +- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +- + dist-bzip2: distdir +- $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ++ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 ++ $(am__remove_distdir) ++ ++dist-lzma: distdir ++ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + ++dist-tarZ: distdir ++ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z ++ $(am__remove_distdir) ++ ++dist-shar: distdir ++ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz ++ $(am__remove_distdir) + dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + + dist dist-all: distdir +- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +- $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ++ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) +@@ -562,8 +592,20 @@ + # it guarantees that the distribution is self-contained by making another + # tarfile. + distcheck: dist +- $(am__remove_distdir) +- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ++ case '$(DIST_ARCHIVES)' in \ ++ *.tar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ ++ *.tar.bz2*) \ ++ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ ++ *.tar.lzma*) \ ++ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ ++ *.tar.Z*) \ ++ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ ++ *.shar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ ++ *.zip*) \ ++ unzip $(distdir).zip ;;\ ++ esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst +@@ -583,19 +625,20 @@ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ +- (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ ++ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ +- && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ +- && rm -f $(distdir).tar.gz \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist \ ++ && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) +- @echo "$(distdir).tar.gz is ready for distribution" | \ +- sed 'h;s/./=/g;p;x;p;x' ++ @(echo "$(distdir) archives ready for distribution: "; \ ++ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ ++ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' + distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ +@@ -619,8 +662,9 @@ + all-am: Makefile $(DATA) config.h + installdirs: installdirs-recursive + installdirs-am: +- $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) +- ++ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done + install: install-recursive + install-exec: install-exec-recursive + install-data: install-data-recursive +@@ -640,7 +684,7 @@ + clean-generic: + + distclean-generic: +- -rm -f $(CONFIG_CLEAN_FILES) ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + + maintainer-clean-generic: +@@ -653,25 +697,35 @@ + distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +-distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \ +- distclean-tags ++distclean-am: clean-am distclean-generic distclean-hdr \ ++ distclean-libtool distclean-tags + + dvi: dvi-recursive + + dvi-am: + ++html: html-recursive ++ + info: info-recursive + + info-am: + + install-data-am: install-pkgconfigDATA + ++install-dvi: install-dvi-recursive ++ + install-exec-am: + ++install-html: install-html-recursive ++ + install-info: install-info-recursive + + install-man: + ++install-pdf: install-pdf-recursive ++ ++install-ps: install-ps-recursive ++ + installcheck-am: + + maintainer-clean: maintainer-clean-recursive +@@ -692,29 +746,27 @@ + + ps-am: + +-uninstall-am: uninstall-info-am uninstall-pkgconfigDATA ++uninstall-am: uninstall-pkgconfigDATA + +-uninstall-info: uninstall-info-recursive ++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ ++ install-strip + +-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ +- clean-generic clean-libtool clean-recursive ctags \ +- ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-zip \ +- distcheck distclean distclean-generic distclean-hdr \ +- distclean-libtool distclean-recursive distclean-tags \ +- distcleancheck distdir distuninstallcheck dvi dvi-am \ +- dvi-recursive info info-am info-recursive install install-am \ +- install-data install-data-am install-data-recursive \ +- install-exec install-exec-am install-exec-recursive \ +- install-info install-info-am install-info-recursive install-man \ +- install-pkgconfigDATA install-recursive install-strip \ +- installcheck installcheck-am installdirs installdirs-am \ +- installdirs-recursive maintainer-clean maintainer-clean-generic \ +- maintainer-clean-recursive mostlyclean mostlyclean-generic \ +- mostlyclean-libtool mostlyclean-recursive pdf pdf-am \ +- pdf-recursive ps ps-am ps-recursive tags tags-recursive \ +- uninstall uninstall-am uninstall-info-am \ +- uninstall-info-recursive uninstall-pkgconfigDATA \ +- uninstall-recursive ++.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ ++ all all-am am--refresh check check-am clean clean-generic \ ++ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ ++ dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ ++ distclean distclean-generic distclean-hdr distclean-libtool \ ++ distclean-tags distcleancheck distdir distuninstallcheck dvi \ ++ dvi-am html html-am info info-am install install-am \ ++ install-data install-data-am install-dvi install-dvi-am \ ++ install-exec install-exec-am install-html install-html-am \ ++ install-info install-info-am install-man install-pdf \ ++ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ ++ install-strip installcheck installcheck-am installdirs \ ++ installdirs-am maintainer-clean maintainer-clean-generic \ ++ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ++ ps ps-am tags tags-recursive uninstall uninstall-am \ ++ uninstall-pkgconfigDATA + + + gdkglext-$(GDK_TARGET)-$(API_VER).pc: gdkglext.pc gdkglext-$(GDK_TARGET)-$(API_VER)-uninstalled.pc diff --git a/Patches/hbase/build.xml.patch b/Patches/hbase/build.xml.patch new file mode 100644 index 0000000000000..6359cfce402fe --- /dev/null +++ b/Patches/hbase/build.xml.patch @@ -0,0 +1,58 @@ +diff --git a/build.xml b/build.xml +index e653229..7fafe68 100644 +--- a/build.xml ++++ b/build.xml +@@ -83,7 +83,7 @@ + + + +- ++ + + + +@@ -93,7 +93,7 @@ + + + +- ++ + + + +@@ -213,6 +213,7 @@ + optimize="${javac.optimize}" + target="${javac.version}" + source="${javac.version}" ++ nativeHeaderDir="${build.native}/src/com/hadoop/compression/lzo" + deprecation="${javac.deprecation}"> + + +@@ -236,14 +237,6 @@ + + + +- +- +- +- +- + + + +diff --git a/ivy/ivysettings.xml b/ivy/ivysettings.xml +index 0422914..c704610 100644 +--- a/ivy/ivysettings.xml ++++ b/ivy/ivysettings.xml +@@ -12,7 +12,7 @@ + http://www.ibiblio.net/pub/packages/maven2 + --> + + name, ssl_cipher->valid, ssl_cipher->id); ++ fprintf (stderr, "core_ssl_connect: cipher=%s, id=%lu\n", ++ SSL_CIPHER_get_name(ssl_cipher), SSL_CIPHER_get_id(ssl_cipher)); + } + + arg.l = 0; +diff -pur httperf-0.9.0/src/httperf.c httperf-0.9.0-fixed/src/httperf.c +--- httperf-0.9.0/src/httperf.c 2007-04-07 09:01:56.000000000 +0200 ++++ httperf-0.9.0-fixed/src/httperf.c 2019-09-11 14:12:54.000000000 +0200 +@@ -808,7 +808,7 @@ main (int argc, char **argv) + SSLeay_add_ssl_algorithms (); + + /* for some strange reason, SSLv23_client_method () doesn't work here */ +- ssl_ctx = SSL_CTX_new (SSLv3_client_method ()); ++ ssl_ctx = SSL_CTX_new (TLS_client_method ()); + if (!ssl_ctx) + { + ERR_print_errors_fp (stderr); diff --git a/Patches/id3lib/automake.patch b/Patches/id3lib/automake.patch new file mode 100644 index 0000000000000..cae73ef8ec7f6 --- /dev/null +++ b/Patches/id3lib/automake.patch @@ -0,0 +1,76 @@ +--- a/configure.in.orig 2013-01-05 10:23:58.000000000 -0800 ++++ a/configure.in 2013-01-05 10:25:32.000000000 -0800 +@@ -11,11 +11,12 @@ + # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +-# require autoconf 2.13 +-AC_PREREQ(2.13) ++# require autoconf 2.63 ++AC_PREREQ(2.63) + + # init autoconf (and check for presence fo reconf) + AC_INIT(reconf) ++AC_CONFIG_MACRO_DIR([m4]) + + ID3LIB_NAME=id3lib + +@@ -83,7 +84,7 @@ ID3LIB_FULLNAME=$ID3LIB_NAME-$ID3LIB_VER + + AC_SUBST(ID3LIB_FULLNAME) + +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS([config.h]) + + AM_INIT_AUTOMAKE($PACKAGE,$VERSION) + +@@ -168,7 +169,7 @@ if test $has_iconv = 1; then + iconv_oldstyle=1, iconv_oldstyle=0) + if test $iconv_oldstyle = 1; then + AC_MSG_RESULT(const char **) +- AC_DEFINE(ID3LIB_ICONV_OLDSTYLE) ++ AC_DEFINE(ID3LIB_ICONV_OLDSTYLE, 1, [Desc]) + #we'll check out the need of + #typecast in the call of iconv_open + AC_MSG_CHECKING(whether to typecast in iconv) +@@ -184,7 +185,7 @@ if test $has_iconv = 1; then + iconv_cast=0, iconv_cast=1) + if test $iconv_cast = 1; then + AC_MSG_RESULT(yes) +- AC_DEFINE(ID3LIB_ICONV_CAST_OK) ++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, 1, [Desc]) + else + AC_MSG_RESULT(no) + fi +@@ -206,7 +207,7 @@ if test $has_iconv = 1; then + iconv_cast=0, iconv_cast=1) + if test $iconv_cast = 1; then + AC_MSG_RESULT(yes) +- AC_DEFINE(ID3LIB_ICONV_CAST_OK) ++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, 1, [Desc]) + else + AC_MSG_RESULT(no) + fi +@@ -296,12 +297,6 @@ AC_DEFINE_UNQUOTED(_ID3LIB_INTERFACE_AGE + AC_DEFINE_UNQUOTED(_ID3LIB_BINARY_AGE, $ID3LIB_BINARY_AGE) + AC_DEFINE_UNQUOTED(_ID3_COMPILED_WITH_DEBUGGING, "${enable_debug}") + +-CONDITIONAL_SUBDIRS= +-if test "x$ac_cv_lib_z_uncompress" = "xno"; then +- CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib" +-fi +-AC_CONFIG_SUBDIRS(zlib) +- + CFLAGS="$CFLAGS -Wall" + + AC_OUTPUT( \ +--- a/Makefile.am.orig 2013-01-05 10:25:44.000000000 -0800 ++++ a/Makefile.am 2013-01-05 10:26:37.000000000 -0800 +@@ -11,6 +11,7 @@ + + # require automake 1.5 + AUTOMAKE_OPTIONS = 1.5 ++ACLOCAL_AMFLAGS = -I m4 + + EXTRA_DIST = \ + HISTORY \ diff --git a/Patches/id3lib/boolcheck.patch b/Patches/id3lib/boolcheck.patch new file mode 100644 index 0000000000000..f9810271c1c24 --- /dev/null +++ b/Patches/id3lib/boolcheck.patch @@ -0,0 +1,11 @@ +--- a/m4/id3_cxx.m4.orig 2013-01-12 16:23:24.000000000 -0800 ++++ b/m4/id3_cxx.m4 2013-01-12 16:23:52.000000000 -0800 +@@ -81,7 +81,7 @@ AC_DEFUN(ID3_CXX_PORTABILITY,[ + + dnl Check whether we have bool + AC_MSG_CHECKING(whether C++ has bool) +- AC_TRY_RUN([main() { bool b1=true; bool b2=false; }], ++ AC_TRY_RUN([int main() { bool b1=true; bool b2=false; return 0; }], + [ AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) + AC_DEFINE(CXX_HAS_NO_BOOL) ], diff --git a/Patches/id3lib/id3lib-main.patch b/Patches/id3lib/id3lib-main.patch new file mode 100644 index 0000000000000..abcae4aa22348 --- /dev/null +++ b/Patches/id3lib/id3lib-main.patch @@ -0,0 +1,72 @@ +diff -Naurp id3lib-3.8.3.orig/examples/demo_convert.cpp id3lib-3.8.3/examples/demo_convert.cpp +--- id3lib-3.8.3.orig/examples/demo_convert.cpp 2003-03-01 16:23:00.000000000 -0800 ++++ id3lib-3.8.3/examples/demo_convert.cpp 2011-06-28 21:37:42.000000000 -0700 +@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTag + } + } + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + flags_t ulFlag = ID3TT_ALL; + gengetopt_args_info args; +diff -Naurp id3lib-3.8.3.orig/examples/demo_copy.cpp id3lib-3.8.3/examples/demo_copy.cpp +--- id3lib-3.8.3.orig/examples/demo_copy.cpp 2003-03-01 16:23:00.000000000 -0800 ++++ id3lib-3.8.3/examples/demo_copy.cpp 2011-06-28 21:37:42.000000000 -0700 +@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTag + } + } + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + int ulFlag = ID3TT_ID3; + ID3D_INIT_DOUT(); +diff -Naurp id3lib-3.8.3.orig/examples/demo_info.cpp id3lib-3.8.3/examples/demo_info.cpp +--- id3lib-3.8.3.orig/examples/demo_info.cpp 2003-03-01 16:23:00.000000000 -0800 ++++ id3lib-3.8.3/examples/demo_info.cpp 2011-06-28 21:37:42.000000000 -0700 +@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myT + + #define DEBUG + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + ID3D_INIT_DOUT(); + +diff -Naurp id3lib-3.8.3.orig/examples/demo_tag.cpp id3lib-3.8.3/examples/demo_tag.cpp +--- id3lib-3.8.3.orig/examples/demo_tag.cpp 2003-03-01 16:23:00.000000000 -0800 ++++ id3lib-3.8.3/examples/demo_tag.cpp 2011-06-28 21:37:42.000000000 -0700 +@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTag + os << "v2"; + } + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + int ulFlag = ID3TT_ID3; + ID3D_INIT_DOUT(); +diff -Naurp id3lib-3.8.3.orig/examples/findeng.cpp id3lib-3.8.3/examples/findeng.cpp +--- id3lib-3.8.3.orig/examples/findeng.cpp 2003-03-01 16:23:00.000000000 -0800 ++++ id3lib-3.8.3/examples/findeng.cpp 2011-06-28 21:37:42.000000000 -0700 +@@ -9,7 +9,7 @@ + using std::cout; + using std::endl; + +-int main(unsigned argc, char* argv[]) ++int main(int argc, char* argv[]) + { + ID3D_INIT_DOUT(); + ID3D_INIT_WARNING(); +diff -Naurp id3lib-3.8.3.orig/examples/findstr.cpp id3lib-3.8.3/examples/findstr.cpp +--- id3lib-3.8.3.orig/examples/findstr.cpp 2003-03-01 16:23:00.000000000 -0800 ++++ id3lib-3.8.3/examples/findstr.cpp 2011-06-28 21:37:42.000000000 -0700 +@@ -9,7 +9,7 @@ + using std::cout; + using std::endl; + +-int main(unsigned argc, char* argv[]) ++int main(int argc, char* argv[]) + { + ID3D_INIT_DOUT(); + ID3D_INIT_WARNING(); diff --git a/Patches/id3lib/id3lib-vbr-overflow.patch b/Patches/id3lib/id3lib-vbr-overflow.patch new file mode 100644 index 0000000000000..a9389ceff70c3 --- /dev/null +++ b/Patches/id3lib/id3lib-vbr-overflow.patch @@ -0,0 +1,11 @@ +--- id3lib-3.8.3.orig/src/mp3_parse.cpp.org 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/src/mp3_parse.cpp 2009-09-27 19:44:18.000000000 +0200 +@@ -465,7 +465,7 @@ + // from http://www.xingtech.com/developer/mp3/ + + const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed +- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional ++ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional + + if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE) + { diff --git a/Patches/id3lib/no-iomanip.h.patch b/Patches/id3lib/no-iomanip.h.patch new file mode 100644 index 0000000000000..b04ee29bdc7c8 --- /dev/null +++ b/Patches/id3lib/no-iomanip.h.patch @@ -0,0 +1,10 @@ +--- a/configure.in 2013-01-13 00:13:22.000000000 -0800 ++++ b/configure.in 2013-01-13 00:14:14.000000000 -0800 +@@ -228,7 +228,6 @@ AC_CHECK_HEADERS(fstream iostream iomani + ) + AC_CHECK_HEADERS( \ + string \ +- iomanip.h \ + ,,AC_MSG_ERROR([Missing a vital header file for id3lib]) + ) + diff --git a/Patches/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff b/Patches/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff new file mode 100644 index 0000000000000..b05d2cf298d3d --- /dev/null +++ b/Patches/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff @@ -0,0 +1,39 @@ +diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog +--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100 +@@ -1,3 +1,8 @@ ++2006-02-17 Jerome Couderc ++ ++ * Patch from Spoon to fix UTF-16 writing bug ++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ + 2003-03-02 Sunday 17:38 Thijmen Klok + + * THANKS (1.20): added more people +diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp +--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100 +@@ -363,11 +363,22 @@ + // Write the BOM: 0xFEFF + unicode_t BOM = 0xFEFF; + writer.writeChars((const unsigned char*) &BOM, 2); ++ // Patch from Spoon : 2004-08-25 14:17 ++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ // Wrong code ++ //for (size_t i = 0; i < size; i += 2) ++ //{ ++ // unicode_t ch = (data[i] << 8) | data[i+1]; ++ // writer.writeChars((const unsigned char*) &ch, 2); ++ //} ++ // Right code ++ unsigned char *pdata = (unsigned char *) data.c_str(); + for (size_t i = 0; i < size; i += 2) + { +- unicode_t ch = (data[i] << 8) | data[i+1]; ++ unicode_t ch = (pdata[i] << 8) | pdata[i+1]; + writer.writeChars((const unsigned char*) &ch, 2); + } ++ // End patch + } + return writer.getCur() - beg; + } diff --git a/Patches/ipopt/mumps-makefile-inc-generic-seq.patch b/Patches/ipopt/mumps-makefile-inc-generic-seq.patch new file mode 100644 index 0000000000000..78f08ef67929c --- /dev/null +++ b/Patches/ipopt/mumps-makefile-inc-generic-seq.patch @@ -0,0 +1,27 @@ +diff --git a/Make.inc/Makefile.inc.generic.SEQ b/Make.inc/Makefile.inc.generic.SEQ +index bb27718..61ddf21 100644 +--- a/Make.inc/Makefile.inc.generic.SEQ ++++ b/Make.inc/Makefile.inc.generic.SEQ +@@ -97 +97 @@ PLAT = +-LIBEXT = .a ++LIBEXT = .dylib +@@ -103 +102,0 @@ RM = /bin/rm -f +-CC = cc +@@ -105 +104 @@ CC = cc +-FC = f90 ++FC = gfortran +@@ -107 +106 @@ FC = f90 +-FL = f90 ++FL = $(FC) +@@ -110 +109 @@ FL = f90 +-AR = ar vr ++AR = $(FC) -dynamiclib -undefined dynamic_lookup -Wl,-install_name,@rpath/$(notdir $@) -o +@@ -113,2 +112 @@ AR = ar vr +-RANLIB = ranlib +-#RANLIB = echo ++RANLIB = echo +@@ -146,2 +144,2 @@ CDEFS = -DAdd_ +-OPTF = -O +-OPTC = -O -I. ++OPTF = -fPIC -O ++OPTC = -fPIC -O -I. diff --git a/Patches/irrlicht/use-system-libs.patch b/Patches/irrlicht/use-system-libs.patch new file mode 100644 index 0000000000000..84744a829bad9 --- /dev/null +++ b/Patches/irrlicht/use-system-libs.patch @@ -0,0 +1,47 @@ +WARNING: This patch contains a mix of CRLF and LF line endings. + +--- a/include/IrrCompileConfig.h ++++ b/include/IrrCompileConfig.h +@@ -250,6 +250,7 @@ the engine will no longer read .jpeg images. */ + /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system. + This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */ + #define _IRR_USE_NON_SYSTEM_JPEG_LIB_ ++#define NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ + #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ + #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_ + #endif +@@ -266,6 +267,7 @@ the engine will no longer read .png images. */ + /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system. + This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */ + #define _IRR_USE_NON_SYSTEM_LIB_PNG_ ++#define NO_IRR_USE_NON_SYSTEM_LIB_PNG_ + #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_ + #undef _IRR_USE_NON_SYSTEM_LIB_PNG_ + #endif +@@ -603,6 +605,7 @@ ones. */ + installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is + defined. */ + #define _IRR_USE_NON_SYSTEM_ZLIB_ ++#define NO_IRR_USE_NON_SYSTEM_ZLIB_ + #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_ + #undef _IRR_USE_NON_SYSTEM_ZLIB_ + #endif +@@ -624,6 +627,7 @@ library. */ + installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is + defined. */ + #define _IRR_USE_NON_SYSTEM_BZLIB_ ++#define NO_IRR_USE_NON_SYSTEM_BZLIB_ + #ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_ + #undef _IRR_USE_NON_SYSTEM_BZLIB_ + #endif +--- a/source/Irrlicht/CImageLoaderJPG.cpp ++++ b/source/Irrlicht/CImageLoaderJPG.cpp +@@ -68,7 +68,7 @@ void CImageLoaderJPG::init_source (j_decompress_ptr cinfo) + boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo) + { + // DO NOTHING +- return 1; ++ return TRUE; + } + + diff --git a/Patches/irrlicht/xcode.patch b/Patches/irrlicht/xcode.patch new file mode 100644 index 0000000000000..9dc09686ca650 --- /dev/null +++ b/Patches/irrlicht/xcode.patch @@ -0,0 +1,824 @@ +--- a/source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj ++++ b/source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj +@@ -115,21 +115,6 @@ + 0925114B0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925114C0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925114D0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; +- 09293C3E0ED32029003B8C9C /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2C0ED32029003B8C9C /* png.c */; }; +- 09293C3F0ED32029003B8C9C /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2D0ED32029003B8C9C /* pngerror.c */; }; +- 09293C410ED32029003B8C9C /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2F0ED32029003B8C9C /* pngget.c */; }; +- 09293C420ED32029003B8C9C /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C300ED32029003B8C9C /* pngmem.c */; }; +- 09293C430ED32029003B8C9C /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C310ED32029003B8C9C /* pngpread.c */; }; +- 09293C440ED32029003B8C9C /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C320ED32029003B8C9C /* pngread.c */; }; +- 09293C450ED32029003B8C9C /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C330ED32029003B8C9C /* pngrio.c */; }; +- 09293C460ED32029003B8C9C /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C340ED32029003B8C9C /* pngrtran.c */; }; +- 09293C470ED32029003B8C9C /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C350ED32029003B8C9C /* pngrutil.c */; }; +- 09293C480ED32029003B8C9C /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C360ED32029003B8C9C /* pngset.c */; }; +- 09293C4A0ED32029003B8C9C /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C380ED32029003B8C9C /* pngtrans.c */; }; +- 09293C4C0ED32029003B8C9C /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3A0ED32029003B8C9C /* pngwio.c */; }; +- 09293C4D0ED32029003B8C9C /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3B0ED32029003B8C9C /* pngwrite.c */; }; +- 09293C4E0ED32029003B8C9C /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3C0ED32029003B8C9C /* pngwtran.c */; }; +- 09293C4F0ED32029003B8C9C /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3D0ED32029003B8C9C /* pngwutil.c */; }; + 0930CE560EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE570EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE580EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; +@@ -217,9 +202,6 @@ + 09F649600D2CE206001E0599 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 09F649610D2CE206001E0599 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 09F649740D2CE2D0001E0599 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09F649730D2CE2D0001E0599 /* main.cpp */; }; +- 0E2E3C461103B1B5002DE8D7 /* jaricom.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C431103B1B5002DE8D7 /* jaricom.c */; }; +- 0E2E3C471103B1B5002DE8D7 /* jcarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C441103B1B5002DE8D7 /* jcarith.c */; }; +- 0E2E3C481103B1B5002DE8D7 /* jdarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C451103B1B5002DE8D7 /* jdarith.c */; }; + 0E2E3C4A1103B224002DE8D7 /* Octree.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C491103B224002DE8D7 /* Octree.h */; }; + 0E2E3C4D1103B247002DE8D7 /* COctreeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */; }; + 0E2E3C4E1103B247002DE8D7 /* COctreeSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C4C1103B247002DE8D7 /* COctreeSceneNode.h */; }; +@@ -232,13 +214,6 @@ + 0E2E3C5D1103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */; }; + 0E2E3C5E1103B2AE002DE8D7 /* CIrrDeviceWinCE.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C5A1103B2AE002DE8D7 /* CIrrDeviceWinCE.h */; }; + 0E2E3C641103B384002DE8D7 /* LzmaDec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C631103B384002DE8D7 /* LzmaDec.c */; }; +- 0E2E3C6F1103B3B9002DE8D7 /* blocksort.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C661103B3B9002DE8D7 /* blocksort.c */; }; +- 0E2E3C701103B3B9002DE8D7 /* bzcompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */; }; +- 0E2E3C731103B3B9002DE8D7 /* crctable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */; }; +- 0E2E3C741103B3B9002DE8D7 /* decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */; }; +- 0E2E3C751103B3B9002DE8D7 /* huffman.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */; }; +- 0E2E3C771103B3B9002DE8D7 /* randtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */; }; +- 0E2E3C7C1103B4E1002DE8D7 /* bzlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */; }; + 0E2E3C871103B53C002DE8D7 /* aescrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */; }; + 0E2E3C881103B53C002DE8D7 /* aeskey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */; }; + 0E2E3C891103B53C002DE8D7 /* aestab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C801103B53C002DE8D7 /* aestab.cpp */; }; +@@ -311,15 +286,6 @@ + 4C53E2870A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2880A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E3890A48559C0014E966 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; +- 4C53E3D80A4856B30014E966 /* inffast.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1800A484C2C0014E966 /* inffast.c */; }; +- 4C53E3DC0A4856B30014E966 /* inftrees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1850A484C2C0014E966 /* inftrees.c */; }; +- 4C53E3E40A4856B30014E966 /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18D0A484C2C0014E966 /* uncompr.c */; }; +- 4C53E3F30A4856B30014E966 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1750A484C2C0014E966 /* compress.c */; }; +- 4C53E3F60A4856B30014E966 /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1770A484C2C0014E966 /* crc32.c */; }; +- 4C53E3FE0A4856B30014E966 /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1920A484C2C0014E966 /* zutil.c */; }; +- 4C53E4010A4856B30014E966 /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18B0A484C2C0014E966 /* trees.c */; }; +- 4C53E40A0A4856B30014E966 /* deflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1790A484C2C0014E966 /* deflate.c */; }; +- 4C53E4150A4856B30014E966 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1720A484C2C0014E966 /* adler32.c */; }; + 4C53E4280A4856B30014E966 /* CImageLoaderPNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF600A484C230014E966 /* CImageLoaderPNG.cpp */; }; + 4C53E4290A4856B30014E966 /* CColorConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFC0A484C220014E966 /* CColorConverter.cpp */; }; + 4C53E42A0A4856B30014E966 /* CSceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAB0A484C240014E966 /* CSceneManager.cpp */; }; +@@ -464,50 +430,6 @@ + 4C53E57E0A4856B30014E966 /* OSXClipboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1670A484C2C0014E966 /* OSXClipboard.mm */; }; + 4C53E57F0A4856B30014E966 /* CIrrDeviceMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E15F0A484C2C0014E966 /* CIrrDeviceMacOSX.mm */; }; + 4C53E5800A4856B30014E966 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E14D0A484C2C0014E966 /* AppDelegate.mm */; }; +- 4C6DC9B70A48715A0017A6E5 /* inflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C6DC9B60A48715A0017A6E5 /* inflate.c */; }; +- 4CA25BCE0A485EAD00B4E469 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F10A485CD80014E966 /* jcapimin.c */; }; +- 4CA25BCF0A485EAD00B4E469 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F20A485CD80014E966 /* jcapistd.c */; }; +- 4CA25BD00A485EAD00B4E469 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F30A485CD80014E966 /* jccoefct.c */; }; +- 4CA25BD10A485EAD00B4E469 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F40A485CD80014E966 /* jccolor.c */; }; +- 4CA25BD20A485EAD00B4E469 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F50A485CD80014E966 /* jcdctmgr.c */; }; +- 4CA25BD30A485EAD00B4E469 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F60A485CD80014E966 /* jchuff.c */; }; +- 4CA25BD50A485EAD00B4E469 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F80A485CD80014E966 /* jcinit.c */; }; +- 4CA25BD60A485EAD00B4E469 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F90A485CD80014E966 /* jcmainct.c */; }; +- 4CA25BD70A485EAD00B4E469 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FA0A485CD80014E966 /* jcmarker.c */; }; +- 4CA25BD80A485EAD00B4E469 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FB0A485CD80014E966 /* jcmaster.c */; }; +- 4CA25BD90A485EAD00B4E469 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FC0A485CD80014E966 /* jcomapi.c */; }; +- 4CA25BDB0A485EAD00B4E469 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70A0A485CD80014E966 /* jcparam.c */; }; +- 4CA25BDD0A485EAD00B4E469 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70C0A485CD80014E966 /* jcprepct.c */; }; +- 4CA25BDE0A485EAD00B4E469 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70D0A485CD80014E966 /* jcsample.c */; }; +- 4CA25BDF0A485EAD00B4E469 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70E0A485CD80014E966 /* jctrans.c */; }; +- 4CA25BE00A485EAD00B4E469 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70F0A485CD80014E966 /* jdapimin.c */; }; +- 4CA25BE10A485EAD00B4E469 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7100A485CD80014E966 /* jdapistd.c */; }; +- 4CA25BE20A485EAD00B4E469 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7110A485CD80014E966 /* jdatadst.c */; }; +- 4CA25BE30A485EAD00B4E469 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7120A485CD80014E966 /* jdatasrc.c */; }; +- 4CA25BE40A485EAD00B4E469 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7130A485CD80014E966 /* jdcoefct.c */; }; +- 4CA25BE50A485EAD00B4E469 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7140A485CD80014E966 /* jdcolor.c */; }; +- 4CA25BE70A485EAD00B4E469 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7160A485CD80014E966 /* jddctmgr.c */; }; +- 4CA25BE80A485EAD00B4E469 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7170A485CD80014E966 /* jdhuff.c */; }; +- 4CA25BEA0A485EAD00B4E469 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7190A485CD80014E966 /* jdinput.c */; }; +- 4CA25BEB0A485EAD00B4E469 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71A0A485CD80014E966 /* jdmainct.c */; }; +- 4CA25BEC0A485EAD00B4E469 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71B0A485CD80014E966 /* jdmarker.c */; }; +- 4CA25BED0A485EAD00B4E469 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71C0A485CD80014E966 /* jdmaster.c */; }; +- 4CA25BEE0A485EAD00B4E469 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71D0A485CD80014E966 /* jdmerge.c */; }; +- 4CA25BF00A485EAD00B4E469 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71F0A485CD80014E966 /* jdpostct.c */; }; +- 4CA25BF10A485EAD00B4E469 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7200A485CD80014E966 /* jdsample.c */; }; +- 4CA25BF20A485EAD00B4E469 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7210A485CD80014E966 /* jdtrans.c */; }; +- 4CA25BF30A485EAD00B4E469 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7220A485CD80014E966 /* jerror.c */; }; +- 4CA25BF50A485EAD00B4E469 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7240A485CD80014E966 /* jfdctflt.c */; }; +- 4CA25BF60A485EAD00B4E469 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7250A485CD80014E966 /* jfdctfst.c */; }; +- 4CA25BF70A485EAD00B4E469 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7260A485CD80014E966 /* jfdctint.c */; }; +- 4CA25BF80A485EAD00B4E469 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7270A485CD80014E966 /* jidctflt.c */; }; +- 4CA25BF90A485EAD00B4E469 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7280A485CD80014E966 /* jidctfst.c */; }; +- 4CA25BFA0A485EAD00B4E469 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7290A485CD80014E966 /* jidctint.c */; }; +- 4CA25C000A485EAD00B4E469 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7300A485CD80014E966 /* jmemmgr.c */; }; +- 4CA25C020A485EAD00B4E469 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7320A485CD80014E966 /* jmemnobs.c */; }; +- 4CA25C080A485EAD00B4E469 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7390A485CD80014E966 /* jquant1.c */; }; +- 4CA25C090A485EAD00B4E469 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73A0A485CD80014E966 /* jquant2.c */; }; +- 4CA25C0A0A485EAD00B4E469 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73B0A485CD80014E966 /* jutils.c */; }; + 4CA25C350A4860EE00B4E469 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00547D0A48470500C844C2 /* main.cpp */; }; + 4CA25C360A48610400B4E469 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA25C520A48618800B4E469 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; +@@ -584,6 +506,8 @@ + 5DD480CA0C7DA66800728AA9 /* CIrrDeviceSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C40C7DA66800728AA9 /* CIrrDeviceSDL.cpp */; }; + 5DD480CB0C7DA66800728AA9 /* COpenGLExtensionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C50C7DA66800728AA9 /* COpenGLExtensionHandler.cpp */; }; + 5DD480CC0C7DA66800728AA9 /* CMD3MeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C60C7DA66800728AA9 /* CMD3MeshFileLoader.cpp */; }; ++ 8409B223273E747900BB674D /* libpng.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8409B222273E747900BB674D /* libpng.dylib */; }; ++ 8409B230273E883500BB674D /* libjpeg.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8409B22F273E883400BB674D /* libjpeg.dylib */; }; + 95154774133CD9DA008D792F /* aabbox3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0A0A88742800B03626 /* aabbox3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154775133CD9DA008D792F /* CMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FD0D1F64B300D46B04 /* CMeshBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154776133CD9DA008D792F /* coreutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FE0D1F64B300D46B04 /* coreutil.h */; settings = {ATTRIBUTES = (Public, ); }; }; +@@ -737,58 +661,6 @@ + 9515480A133CD9DA008D792F /* triangle3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7E0A88742900B03626 /* triangle3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515480B133CD9DA008D792F /* vector2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7F0A88742900B03626 /* vector2d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515480C133CD9DA008D792F /* vector3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C800A88742900B03626 /* vector3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; +- 959729E912C192DA00BF73D3 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F10A485CD80014E966 /* jcapimin.c */; }; +- 959729EA12C192DA00BF73D3 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F20A485CD80014E966 /* jcapistd.c */; }; +- 959729EB12C192DA00BF73D3 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F30A485CD80014E966 /* jccoefct.c */; }; +- 959729EC12C192DA00BF73D3 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F40A485CD80014E966 /* jccolor.c */; }; +- 959729ED12C192DA00BF73D3 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F50A485CD80014E966 /* jcdctmgr.c */; }; +- 959729EE12C192DA00BF73D3 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F60A485CD80014E966 /* jchuff.c */; }; +- 959729EF12C192DA00BF73D3 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F80A485CD80014E966 /* jcinit.c */; }; +- 959729F012C192DA00BF73D3 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F90A485CD80014E966 /* jcmainct.c */; }; +- 959729F112C192DA00BF73D3 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FA0A485CD80014E966 /* jcmarker.c */; }; +- 959729F212C192DA00BF73D3 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FB0A485CD80014E966 /* jcmaster.c */; }; +- 959729F312C192DA00BF73D3 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FC0A485CD80014E966 /* jcomapi.c */; }; +- 959729F412C192DA00BF73D3 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70A0A485CD80014E966 /* jcparam.c */; }; +- 959729F512C192DA00BF73D3 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70C0A485CD80014E966 /* jcprepct.c */; }; +- 959729F612C192DA00BF73D3 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70D0A485CD80014E966 /* jcsample.c */; }; +- 959729F712C192DA00BF73D3 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70E0A485CD80014E966 /* jctrans.c */; }; +- 959729F812C192DA00BF73D3 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70F0A485CD80014E966 /* jdapimin.c */; }; +- 959729F912C192DA00BF73D3 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7100A485CD80014E966 /* jdapistd.c */; }; +- 959729FA12C192DA00BF73D3 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7110A485CD80014E966 /* jdatadst.c */; }; +- 959729FB12C192DA00BF73D3 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7120A485CD80014E966 /* jdatasrc.c */; }; +- 959729FC12C192DA00BF73D3 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7130A485CD80014E966 /* jdcoefct.c */; }; +- 959729FD12C192DA00BF73D3 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7140A485CD80014E966 /* jdcolor.c */; }; +- 959729FE12C192DA00BF73D3 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7160A485CD80014E966 /* jddctmgr.c */; }; +- 959729FF12C192DA00BF73D3 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7170A485CD80014E966 /* jdhuff.c */; }; +- 95972A0012C192DA00BF73D3 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7190A485CD80014E966 /* jdinput.c */; }; +- 95972A0112C192DA00BF73D3 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71A0A485CD80014E966 /* jdmainct.c */; }; +- 95972A0212C192DA00BF73D3 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71B0A485CD80014E966 /* jdmarker.c */; }; +- 95972A0312C192DA00BF73D3 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71C0A485CD80014E966 /* jdmaster.c */; }; +- 95972A0412C192DA00BF73D3 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71D0A485CD80014E966 /* jdmerge.c */; }; +- 95972A0512C192DA00BF73D3 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71F0A485CD80014E966 /* jdpostct.c */; }; +- 95972A0612C192DA00BF73D3 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7200A485CD80014E966 /* jdsample.c */; }; +- 95972A0712C192DA00BF73D3 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7210A485CD80014E966 /* jdtrans.c */; }; +- 95972A0812C192DA00BF73D3 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7220A485CD80014E966 /* jerror.c */; }; +- 95972A0912C192DA00BF73D3 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7240A485CD80014E966 /* jfdctflt.c */; }; +- 95972A0A12C192DA00BF73D3 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7250A485CD80014E966 /* jfdctfst.c */; }; +- 95972A0B12C192DA00BF73D3 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7260A485CD80014E966 /* jfdctint.c */; }; +- 95972A0C12C192DA00BF73D3 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7270A485CD80014E966 /* jidctflt.c */; }; +- 95972A0D12C192DA00BF73D3 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7280A485CD80014E966 /* jidctfst.c */; }; +- 95972A0E12C192DA00BF73D3 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7290A485CD80014E966 /* jidctint.c */; }; +- 95972A0F12C192DA00BF73D3 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7300A485CD80014E966 /* jmemmgr.c */; }; +- 95972A1012C192DA00BF73D3 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7320A485CD80014E966 /* jmemnobs.c */; }; +- 95972A1112C192DA00BF73D3 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7390A485CD80014E966 /* jquant1.c */; }; +- 95972A1212C192DA00BF73D3 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73A0A485CD80014E966 /* jquant2.c */; }; +- 95972A1312C192DA00BF73D3 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73B0A485CD80014E966 /* jutils.c */; }; +- 95972A2212C192DA00BF73D3 /* inffast.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1800A484C2C0014E966 /* inffast.c */; }; +- 95972A2312C192DA00BF73D3 /* inftrees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1850A484C2C0014E966 /* inftrees.c */; }; +- 95972A2412C192DA00BF73D3 /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18D0A484C2C0014E966 /* uncompr.c */; }; +- 95972A2512C192DA00BF73D3 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1750A484C2C0014E966 /* compress.c */; }; +- 95972A2612C192DA00BF73D3 /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1770A484C2C0014E966 /* crc32.c */; }; +- 95972A2712C192DA00BF73D3 /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1920A484C2C0014E966 /* zutil.c */; }; +- 95972A2812C192DA00BF73D3 /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18B0A484C2C0014E966 /* trees.c */; }; +- 95972A2912C192DA00BF73D3 /* deflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1790A484C2C0014E966 /* deflate.c */; }; +- 95972A2A12C192DA00BF73D3 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1720A484C2C0014E966 /* adler32.c */; }; + 95972A2B12C192DA00BF73D3 /* CImageLoaderPNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF600A484C230014E966 /* CImageLoaderPNG.cpp */; }; + 95972A2C12C192DA00BF73D3 /* CColorConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFC0A484C220014E966 /* CColorConverter.cpp */; }; + 95972A2D12C192DA00BF73D3 /* CSceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAB0A484C240014E966 /* CSceneManager.cpp */; }; +@@ -933,7 +805,6 @@ + 95972AB812C192DA00BF73D3 /* OSXClipboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1670A484C2C0014E966 /* OSXClipboard.mm */; }; + 95972AB912C192DA00BF73D3 /* CIrrDeviceMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E15F0A484C2C0014E966 /* CIrrDeviceMacOSX.mm */; }; + 95972ABA12C192DA00BF73D3 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E14D0A484C2C0014E966 /* AppDelegate.mm */; }; +- 95972ABB12C192DA00BF73D3 /* inflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C6DC9B60A48715A0017A6E5 /* inflate.c */; }; + 95972ABC12C192DA00BF73D3 /* CSphereSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC36B0D0A6B61DB0076C4B2 /* CSphereSceneNode.cpp */; }; + 95972ABD12C192DA00BF73D3 /* COBJMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C364EA20A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp */; }; + 95972ABE12C192DA00BF73D3 /* CPakReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43EEBE0A74A5C800F942FC /* CPakReader.cpp */; }; +@@ -989,21 +860,6 @@ + 95972AF012C192DA00BF73D3 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 093973BE0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp */; }; + 95972AF112C192DA00BF73D3 /* COBJMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096F8E3B0EA2EFBA00907EC5 /* COBJMeshWriter.cpp */; }; + 95972AF212C192DA00BF73D3 /* CParticleScaleAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096CC0DE0ECE65B500C81DC7 /* CParticleScaleAffector.cpp */; }; +- 95972AF312C192DA00BF73D3 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2C0ED32029003B8C9C /* png.c */; }; +- 95972AF412C192DA00BF73D3 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2D0ED32029003B8C9C /* pngerror.c */; }; +- 95972AF612C192DA00BF73D3 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2F0ED32029003B8C9C /* pngget.c */; }; +- 95972AF712C192DA00BF73D3 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C300ED32029003B8C9C /* pngmem.c */; }; +- 95972AF812C192DA00BF73D3 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C310ED32029003B8C9C /* pngpread.c */; }; +- 95972AF912C192DA00BF73D3 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C320ED32029003B8C9C /* pngread.c */; }; +- 95972AFA12C192DA00BF73D3 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C330ED32029003B8C9C /* pngrio.c */; }; +- 95972AFB12C192DA00BF73D3 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C340ED32029003B8C9C /* pngrtran.c */; }; +- 95972AFC12C192DA00BF73D3 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C350ED32029003B8C9C /* pngrutil.c */; }; +- 95972AFD12C192DA00BF73D3 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C360ED32029003B8C9C /* pngset.c */; }; +- 95972AFE12C192DA00BF73D3 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C380ED32029003B8C9C /* pngtrans.c */; }; +- 95972AFF12C192DA00BF73D3 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3A0ED32029003B8C9C /* pngwio.c */; }; +- 95972B0012C192DA00BF73D3 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3B0ED32029003B8C9C /* pngwrite.c */; }; +- 95972B0112C192DA00BF73D3 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3C0ED32029003B8C9C /* pngwtran.c */; }; +- 95972B0212C192DA00BF73D3 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3D0ED32029003B8C9C /* pngwutil.c */; }; + 95972B0312C192DA00BF73D3 /* CGUIImageList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4E00F48D1B000C81F60 /* CGUIImageList.cpp */; }; + 95972B0412C192DA00BF73D3 /* CGUITreeView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4ED0F48D3A100C81F60 /* CGUITreeView.cpp */; }; + 95972B0512C192DA00BF73D3 /* CMemoryFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4FC0F48D4CB00C81F60 /* CMemoryFile.cpp */; }; +@@ -1013,22 +869,12 @@ + 95972B0912C192DA00BF73D3 /* CPLYMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91DB0F65FD14000B5651 /* CPLYMeshWriter.cpp */; }; + 95972B0A12C192DA00BF73D3 /* CTarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3430E4D51022C391006271FD /* CTarReader.cpp */; }; + 95972B0B12C192DA00BF73D3 /* CMountPointReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344FD4A41039E98C0045FD3F /* CMountPointReader.cpp */; }; +- 95972B0C12C192DA00BF73D3 /* jaricom.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C431103B1B5002DE8D7 /* jaricom.c */; }; +- 95972B0D12C192DA00BF73D3 /* jcarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C441103B1B5002DE8D7 /* jcarith.c */; }; +- 95972B0E12C192DA00BF73D3 /* jdarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C451103B1B5002DE8D7 /* jdarith.c */; }; + 95972B0F12C192DA00BF73D3 /* COctreeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */; }; + 95972B1012C192DA00BF73D3 /* COctreeTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4F1103B261002DE8D7 /* COctreeTriangleSelector.cpp */; }; + 95972B1112C192DA00BF73D3 /* CNPKReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C531103B27D002DE8D7 /* CNPKReader.cpp */; }; + 95972B1212C192DA00BF73D3 /* CIrrDeviceFB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C571103B2AE002DE8D7 /* CIrrDeviceFB.cpp */; }; + 95972B1312C192DA00BF73D3 /* CIrrDeviceWinCE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */; }; + 95972B1412C192DA00BF73D3 /* LzmaDec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C631103B384002DE8D7 /* LzmaDec.c */; }; +- 95972B1512C192DA00BF73D3 /* blocksort.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C661103B3B9002DE8D7 /* blocksort.c */; }; +- 95972B1612C192DA00BF73D3 /* bzcompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */; }; +- 95972B1712C192DA00BF73D3 /* crctable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */; }; +- 95972B1812C192DA00BF73D3 /* decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */; }; +- 95972B1912C192DA00BF73D3 /* huffman.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */; }; +- 95972B1A12C192DA00BF73D3 /* randtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */; }; +- 95972B1B12C192DA00BF73D3 /* bzlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */; }; + 95972B1C12C192DA00BF73D3 /* aescrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */; }; + 95972B1D12C192DA00BF73D3 /* aeskey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */; }; + 95972B1E12C192DA00BF73D3 /* aestab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C801103B53C002DE8D7 /* aestab.cpp */; }; +@@ -1410,21 +1256,6 @@ + 0910BA220D1F64B300D46B04 /* SSkinMeshBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSkinMeshBuffer.h; sourceTree = ""; }; + 0910BA230D1F64B300D46B04 /* SViewFrustum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SViewFrustum.h; sourceTree = ""; }; + 0925113D0D744ADE006784D9 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; +- 09293C2C0ED32029003B8C9C /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = png.c; path = libpng/png.c; sourceTree = ""; }; +- 09293C2D0ED32029003B8C9C /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = libpng/pngerror.c; sourceTree = ""; }; +- 09293C2F0ED32029003B8C9C /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = libpng/pngget.c; sourceTree = ""; }; +- 09293C300ED32029003B8C9C /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = libpng/pngmem.c; sourceTree = ""; }; +- 09293C310ED32029003B8C9C /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = libpng/pngpread.c; sourceTree = ""; }; +- 09293C320ED32029003B8C9C /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = libpng/pngread.c; sourceTree = ""; }; +- 09293C330ED32029003B8C9C /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = libpng/pngrio.c; sourceTree = ""; }; +- 09293C340ED32029003B8C9C /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = libpng/pngrtran.c; sourceTree = ""; }; +- 09293C350ED32029003B8C9C /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = libpng/pngrutil.c; sourceTree = ""; }; +- 09293C360ED32029003B8C9C /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = libpng/pngset.c; sourceTree = ""; }; +- 09293C380ED32029003B8C9C /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = libpng/pngtrans.c; sourceTree = ""; }; +- 09293C3A0ED32029003B8C9C /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = libpng/pngwio.c; sourceTree = ""; }; +- 09293C3B0ED32029003B8C9C /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = libpng/pngwrite.c; sourceTree = ""; }; +- 09293C3C0ED32029003B8C9C /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = libpng/pngwtran.c; sourceTree = ""; }; +- 09293C3D0ED32029003B8C9C /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = libpng/pngwutil.c; sourceTree = ""; }; + 0930CE550EC39F4500D63866 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 093973BC0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorCameraFPS.cpp; sourceTree = ""; }; + 093973BD0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorCameraFPS.h; sourceTree = ""; }; +@@ -1481,9 +1312,6 @@ + 09F6493E0D2CE03E001E0599 /* LoadIrrFile_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LoadIrrFile_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F649650D2CE206001E0599 /* Quake3Shader_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quake3Shader_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F649730D2CE2D0001E0599 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = 16.Quake3MapShader/main.cpp; sourceTree = ""; }; +- 0E2E3C431103B1B5002DE8D7 /* jaricom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jaricom.c; sourceTree = ""; }; +- 0E2E3C441103B1B5002DE8D7 /* jcarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcarith.c; sourceTree = ""; }; +- 0E2E3C451103B1B5002DE8D7 /* jdarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdarith.c; sourceTree = ""; }; + 0E2E3C491103B224002DE8D7 /* Octree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Octree.h; sourceTree = ""; }; + 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COctreeSceneNode.cpp; sourceTree = ""; }; + 0E2E3C4C1103B247002DE8D7 /* COctreeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = COctreeSceneNode.h; sourceTree = ""; }; +@@ -1496,13 +1324,6 @@ + 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceWinCE.cpp; sourceTree = ""; }; + 0E2E3C5A1103B2AE002DE8D7 /* CIrrDeviceWinCE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceWinCE.h; sourceTree = ""; }; + 0E2E3C631103B384002DE8D7 /* LzmaDec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LzmaDec.c; path = lzma/LzmaDec.c; sourceTree = ""; }; +- 0E2E3C661103B3B9002DE8D7 /* blocksort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blocksort.c; path = bzip2/blocksort.c; sourceTree = ""; }; +- 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzcompress.c; path = bzip2/bzcompress.c; sourceTree = ""; }; +- 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crctable.c; path = bzip2/crctable.c; sourceTree = ""; }; +- 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decompress.c; path = bzip2/decompress.c; sourceTree = ""; }; +- 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = huffman.c; path = bzip2/huffman.c; sourceTree = ""; }; +- 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = randtable.c; path = bzip2/randtable.c; sourceTree = ""; }; +- 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzlib.c; path = bzip2/bzlib.c; sourceTree = ""; }; + 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aescrypt.cpp; path = aesGladman/aescrypt.cpp; sourceTree = ""; }; + 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aeskey.cpp; path = aesGladman/aeskey.cpp; sourceTree = ""; }; + 0E2E3C801103B53C002DE8D7 /* aestab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aestab.cpp; path = aesGladman/aestab.cpp; sourceTree = ""; }; +@@ -1846,63 +1667,10 @@ + 4C53E16D0A484C2C0014E966 /* S4DVertex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = S4DVertex.h; sourceTree = ""; }; + 4C53E16E0A484C2C0014E966 /* SoftwareDriver2_compile_config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SoftwareDriver2_compile_config.h; sourceTree = ""; }; + 4C53E16F0A484C2C0014E966 /* SoftwareDriver2_helper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SoftwareDriver2_helper.h; sourceTree = ""; }; +- 4C53E1720A484C2C0014E966 /* adler32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = adler32.c; sourceTree = ""; }; +- 4C53E1750A484C2C0014E966 /* compress.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = ""; }; +- 4C53E1770A484C2C0014E966 /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = crc32.c; sourceTree = ""; }; +- 4C53E1790A484C2C0014E966 /* deflate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = deflate.c; sourceTree = ""; }; +- 4C53E1800A484C2C0014E966 /* inffast.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inffast.c; sourceTree = ""; }; +- 4C53E1850A484C2C0014E966 /* inftrees.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inftrees.c; sourceTree = ""; }; +- 4C53E18B0A484C2C0014E966 /* trees.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = trees.c; sourceTree = ""; }; +- 4C53E18D0A484C2C0014E966 /* uncompr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = uncompr.c; sourceTree = ""; }; +- 4C53E1920A484C2C0014E966 /* zutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = zutil.c; sourceTree = ""; }; + 4C53E24D0A4850120014E966 /* libIrrlicht.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIrrlicht.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4C53E2520A4850550014E966 /* Quake3Map_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quake3Map_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4C53E26D0A4850D60014E966 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 4C53E26E0A4850D60014E966 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; +- 4C53E6F10A485CD80014E966 /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapimin.c; sourceTree = ""; }; +- 4C53E6F20A485CD80014E966 /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapistd.c; sourceTree = ""; }; +- 4C53E6F30A485CD80014E966 /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccoefct.c; sourceTree = ""; }; +- 4C53E6F40A485CD80014E966 /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccolor.c; sourceTree = ""; }; +- 4C53E6F50A485CD80014E966 /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcdctmgr.c; sourceTree = ""; }; +- 4C53E6F60A485CD80014E966 /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jchuff.c; sourceTree = ""; }; +- 4C53E6F80A485CD80014E966 /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcinit.c; sourceTree = ""; }; +- 4C53E6F90A485CD80014E966 /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmainct.c; sourceTree = ""; }; +- 4C53E6FA0A485CD80014E966 /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmarker.c; sourceTree = ""; }; +- 4C53E6FB0A485CD80014E966 /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmaster.c; sourceTree = ""; }; +- 4C53E6FC0A485CD80014E966 /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcomapi.c; sourceTree = ""; }; +- 4C53E70A0A485CD80014E966 /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcparam.c; sourceTree = ""; }; +- 4C53E70C0A485CD80014E966 /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcprepct.c; sourceTree = ""; }; +- 4C53E70D0A485CD80014E966 /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcsample.c; sourceTree = ""; }; +- 4C53E70E0A485CD80014E966 /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jctrans.c; sourceTree = ""; }; +- 4C53E70F0A485CD80014E966 /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapimin.c; sourceTree = ""; }; +- 4C53E7100A485CD80014E966 /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapistd.c; sourceTree = ""; }; +- 4C53E7110A485CD80014E966 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatadst.c; sourceTree = ""; }; +- 4C53E7120A485CD80014E966 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatasrc.c; sourceTree = ""; }; +- 4C53E7130A485CD80014E966 /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcoefct.c; sourceTree = ""; }; +- 4C53E7140A485CD80014E966 /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcolor.c; sourceTree = ""; }; +- 4C53E7160A485CD80014E966 /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jddctmgr.c; sourceTree = ""; }; +- 4C53E7170A485CD80014E966 /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdhuff.c; sourceTree = ""; }; +- 4C53E7190A485CD80014E966 /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdinput.c; sourceTree = ""; }; +- 4C53E71A0A485CD80014E966 /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmainct.c; sourceTree = ""; }; +- 4C53E71B0A485CD80014E966 /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmarker.c; sourceTree = ""; }; +- 4C53E71C0A485CD80014E966 /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmaster.c; sourceTree = ""; }; +- 4C53E71D0A485CD80014E966 /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmerge.c; sourceTree = ""; }; +- 4C53E71F0A485CD80014E966 /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdpostct.c; sourceTree = ""; }; +- 4C53E7200A485CD80014E966 /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdsample.c; sourceTree = ""; }; +- 4C53E7210A485CD80014E966 /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdtrans.c; sourceTree = ""; }; +- 4C53E7220A485CD80014E966 /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jerror.c; sourceTree = ""; }; +- 4C53E7240A485CD80014E966 /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctflt.c; sourceTree = ""; }; +- 4C53E7250A485CD80014E966 /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctfst.c; sourceTree = ""; }; +- 4C53E7260A485CD80014E966 /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctint.c; sourceTree = ""; }; +- 4C53E7270A485CD80014E966 /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctflt.c; sourceTree = ""; }; +- 4C53E7280A485CD80014E966 /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctfst.c; sourceTree = ""; }; +- 4C53E7290A485CD80014E966 /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctint.c; sourceTree = ""; }; +- 4C53E7300A485CD80014E966 /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemmgr.c; sourceTree = ""; }; +- 4C53E7320A485CD80014E966 /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemnobs.c; sourceTree = ""; }; +- 4C53E7390A485CD80014E966 /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant1.c; sourceTree = ""; }; +- 4C53E73A0A485CD80014E966 /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant2.c; sourceTree = ""; }; +- 4C53E73B0A485CD80014E966 /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jutils.c; sourceTree = ""; }; +- 4C6DC9B60A48715A0017A6E5 /* inflate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inflate.c; sourceTree = ""; }; + 4CA25B980A485D9800B4E469 /* CustomSceneNode_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CustomSceneNode_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25B9A0A485D9800B4E469 /* MeshViewer_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeshViewer_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25B9C0A485D9800B4E469 /* RenderToTexture_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RenderToTexture_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; +@@ -2077,6 +1845,8 @@ + 5DD480C40C7DA66800728AA9 /* CIrrDeviceSDL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceSDL.cpp; sourceTree = ""; }; + 5DD480C50C7DA66800728AA9 /* COpenGLExtensionHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COpenGLExtensionHandler.cpp; sourceTree = ""; }; + 5DD480C60C7DA66800728AA9 /* CMD3MeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMD3MeshFileLoader.cpp; sourceTree = ""; }; ++ 8409B222273E747900BB674D /* libpng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpng.dylib; path = @LIBPNG_PREFIX@/lib/libpng.dylib; sourceTree = ""; }; ++ 8409B22F273E883400BB674D /* libjpeg.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libjpeg.dylib; path = @JPEG_PREFIX@/lib/libjpeg.dylib; sourceTree = ""; }; + 959726FD12C18FFC00BF73D3 /* IrrFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IrrFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 959726FE12C18FFC00BF73D3 /* irrFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "irrFramework-Info.plist"; sourceTree = ""; }; + 95972B8312C19A5C00BF73D3 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; +@@ -2089,9 +1859,6 @@ + 95E5858C12FCE388004946C6 /* CTRNormalMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CTRNormalMap.cpp; path = ../CTRNormalMap.cpp; sourceTree = SOURCE_ROOT; }; + 95E5859112FCE3A1004946C6 /* CTRStencilShadow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CTRStencilShadow.cpp; path = ../CTRStencilShadow.cpp; sourceTree = SOURCE_ROOT; }; + 95E5859412FCE3F5004946C6 /* CSMFMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSMFMeshFileLoader.cpp; path = ../CSMFMeshFileLoader.cpp; sourceTree = SOURCE_ROOT; }; +- 95E9D50210F42F9A008546FE /* jcarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcarith.c; path = ../jpeglib/jcarith.c; sourceTree = SOURCE_ROOT; }; +- 95E9D50610F42FDF008546FE /* jdarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdarith.c; path = ../jpeglib/jdarith.c; sourceTree = SOURCE_ROOT; }; +- 95E9D50A10F43011008546FE /* jaricom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jaricom.c; path = ../jpeglib/jaricom.c; sourceTree = SOURCE_ROOT; }; + 95E9D50E10F43194008546FE /* CNPKReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CNPKReader.cpp; path = ../CNPKReader.cpp; sourceTree = SOURCE_ROOT; }; + /* End PBXFileReference section */ + +@@ -2184,6 +1951,8 @@ + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( ++ 8409B223273E747900BB674D /* libpng.dylib in Frameworks */, ++ 8409B230273E883500BB674D /* libjpeg.dylib in Frameworks */, + 95972B8412C19A5C00BF73D3 /* OpenGL.framework in Frameworks */, + 95972B8A12C19A7600BF73D3 /* IOKit.framework in Frameworks */, + 95972B8E12C19A7F00BF73D3 /* Carbon.framework in Frameworks */, +@@ -2365,6 +2134,8 @@ + 4C00546D0A48470500C844C2 /* examples */, + 4C53E2540A48505D0014E966 /* Libraries */, + 4C53E24C0A484FED0014E966 /* Products */, ++ 8409B222273E747900BB674D /* libpng.dylib */, ++ 8409B22F273E883400BB674D /* libjpeg.dylib */, + 959726FD12C18FFC00BF73D3 /* IrrFramework.framework */, + 959726FE12C18FFC00BF73D3 /* irrFramework-Info.plist */, + 95972B8312C19A5C00BF73D3 /* OpenGL.framework */, +@@ -3057,28 +2828,6 @@ + name = Software; + sourceTree = ""; + }; +- 09293C2B0ED31FF8003B8C9C /* libpng */ = { +- isa = PBXGroup; +- children = ( +- 09293C2C0ED32029003B8C9C /* png.c */, +- 09293C2D0ED32029003B8C9C /* pngerror.c */, +- 09293C2F0ED32029003B8C9C /* pngget.c */, +- 09293C300ED32029003B8C9C /* pngmem.c */, +- 09293C310ED32029003B8C9C /* pngpread.c */, +- 09293C320ED32029003B8C9C /* pngread.c */, +- 09293C330ED32029003B8C9C /* pngrio.c */, +- 09293C340ED32029003B8C9C /* pngrtran.c */, +- 09293C350ED32029003B8C9C /* pngrutil.c */, +- 09293C360ED32029003B8C9C /* pngset.c */, +- 09293C380ED32029003B8C9C /* pngtrans.c */, +- 09293C3A0ED32029003B8C9C /* pngwio.c */, +- 09293C3B0ED32029003B8C9C /* pngwrite.c */, +- 09293C3C0ED32029003B8C9C /* pngwtran.c */, +- 09293C3D0ED32029003B8C9C /* pngwutil.c */, +- ); +- name = libpng; +- sourceTree = ""; +- }; + 0946CC980EC99B8B00D945A5 /* 19.MouseAndJoystick */ = { + isa = PBXGroup; + children = ( +@@ -3111,20 +2860,6 @@ + name = lzma; + sourceTree = ""; + }; +- 0E2E3C651103B388002DE8D7 /* bzip2 */ = { +- isa = PBXGroup; +- children = ( +- 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */, +- 0E2E3C661103B3B9002DE8D7 /* blocksort.c */, +- 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */, +- 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */, +- 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */, +- 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */, +- 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */, +- ); +- name = bzip2; +- sourceTree = ""; +- }; + 0E2E3C7D1103B4E6002DE8D7 /* aesGladman */ = { + isa = PBXGroup; + children = ( +@@ -3214,11 +2949,7 @@ + isa = PBXGroup; + children = ( + 0E2E3C7D1103B4E6002DE8D7 /* aesGladman */, +- 0E2E3C651103B388002DE8D7 /* bzip2 */, + 0E2E3C621103B350002DE8D7 /* lzma */, +- 4C53E1710A484C2C0014E966 /* zlib */, +- 4C53E0130A484C250014E966 /* jpeglib */, +- 09293C2B0ED31FF8003B8C9C /* libpng */, + ); + name = libraries; + sourceTree = ""; +@@ -3511,62 +3242,6 @@ + path = ..; + sourceTree = SOURCE_ROOT; + }; +- 4C53E0130A484C250014E966 /* jpeglib */ = { +- isa = PBXGroup; +- children = ( +- 0E2E3C431103B1B5002DE8D7 /* jaricom.c */, +- 0E2E3C441103B1B5002DE8D7 /* jcarith.c */, +- 0E2E3C451103B1B5002DE8D7 /* jdarith.c */, +- 4C53E6F10A485CD80014E966 /* jcapimin.c */, +- 4C53E6F20A485CD80014E966 /* jcapistd.c */, +- 95E9D50210F42F9A008546FE /* jcarith.c */, +- 4C53E6F30A485CD80014E966 /* jccoefct.c */, +- 4C53E6F40A485CD80014E966 /* jccolor.c */, +- 4C53E6F50A485CD80014E966 /* jcdctmgr.c */, +- 4C53E6F60A485CD80014E966 /* jchuff.c */, +- 4C53E6F80A485CD80014E966 /* jcinit.c */, +- 4C53E6F90A485CD80014E966 /* jcmainct.c */, +- 4C53E6FA0A485CD80014E966 /* jcmarker.c */, +- 4C53E6FB0A485CD80014E966 /* jcmaster.c */, +- 4C53E6FC0A485CD80014E966 /* jcomapi.c */, +- 4C53E70A0A485CD80014E966 /* jcparam.c */, +- 4C53E70C0A485CD80014E966 /* jcprepct.c */, +- 4C53E70D0A485CD80014E966 /* jcsample.c */, +- 4C53E70E0A485CD80014E966 /* jctrans.c */, +- 4C53E70F0A485CD80014E966 /* jdapimin.c */, +- 95E9D50A10F43011008546FE /* jaricom.c */, +- 4C53E7100A485CD80014E966 /* jdapistd.c */, +- 95E9D50610F42FDF008546FE /* jdarith.c */, +- 4C53E7110A485CD80014E966 /* jdatadst.c */, +- 4C53E7120A485CD80014E966 /* jdatasrc.c */, +- 4C53E7130A485CD80014E966 /* jdcoefct.c */, +- 4C53E7140A485CD80014E966 /* jdcolor.c */, +- 4C53E7160A485CD80014E966 /* jddctmgr.c */, +- 4C53E7170A485CD80014E966 /* jdhuff.c */, +- 4C53E7190A485CD80014E966 /* jdinput.c */, +- 4C53E71A0A485CD80014E966 /* jdmainct.c */, +- 4C53E71B0A485CD80014E966 /* jdmarker.c */, +- 4C53E71C0A485CD80014E966 /* jdmaster.c */, +- 4C53E71D0A485CD80014E966 /* jdmerge.c */, +- 4C53E71F0A485CD80014E966 /* jdpostct.c */, +- 4C53E7200A485CD80014E966 /* jdsample.c */, +- 4C53E7210A485CD80014E966 /* jdtrans.c */, +- 4C53E7220A485CD80014E966 /* jerror.c */, +- 4C53E7240A485CD80014E966 /* jfdctflt.c */, +- 4C53E7250A485CD80014E966 /* jfdctfst.c */, +- 4C53E7260A485CD80014E966 /* jfdctint.c */, +- 4C53E7270A485CD80014E966 /* jidctflt.c */, +- 4C53E7280A485CD80014E966 /* jidctfst.c */, +- 4C53E7290A485CD80014E966 /* jidctint.c */, +- 4C53E7300A485CD80014E966 /* jmemmgr.c */, +- 4C53E7320A485CD80014E966 /* jmemnobs.c */, +- 4C53E7390A485CD80014E966 /* jquant1.c */, +- 4C53E73A0A485CD80014E966 /* jquant2.c */, +- 4C53E73B0A485CD80014E966 /* jutils.c */, +- ); +- path = jpeglib; +- sourceTree = ""; +- }; + 4C53E14A0A484C2C0014E966 /* MacOSX */ = { + isa = PBXGroup; + children = ( +@@ -3614,23 +3289,6 @@ + path = strings.pbxstrings; + sourceTree = ""; + }; +- 4C53E1710A484C2C0014E966 /* zlib */ = { +- isa = PBXGroup; +- children = ( +- 4C6DC9B60A48715A0017A6E5 /* inflate.c */, +- 4C53E1720A484C2C0014E966 /* adler32.c */, +- 4C53E1750A484C2C0014E966 /* compress.c */, +- 4C53E1770A484C2C0014E966 /* crc32.c */, +- 4C53E1790A484C2C0014E966 /* deflate.c */, +- 4C53E1800A484C2C0014E966 /* inffast.c */, +- 4C53E1850A484C2C0014E966 /* inftrees.c */, +- 4C53E18B0A484C2C0014E966 /* trees.c */, +- 4C53E18D0A484C2C0014E966 /* uncompr.c */, +- 4C53E1920A484C2C0014E966 /* zutil.c */, +- ); +- path = zlib; +- sourceTree = ""; +- }; + 4C53E24C0A484FED0014E966 /* Products */ = { + isa = PBXGroup; + children = ( +@@ -4661,58 +4319,6 @@ + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( +- 959729E912C192DA00BF73D3 /* jcapimin.c in Sources */, +- 959729EA12C192DA00BF73D3 /* jcapistd.c in Sources */, +- 959729EB12C192DA00BF73D3 /* jccoefct.c in Sources */, +- 959729EC12C192DA00BF73D3 /* jccolor.c in Sources */, +- 959729ED12C192DA00BF73D3 /* jcdctmgr.c in Sources */, +- 959729EE12C192DA00BF73D3 /* jchuff.c in Sources */, +- 959729EF12C192DA00BF73D3 /* jcinit.c in Sources */, +- 959729F012C192DA00BF73D3 /* jcmainct.c in Sources */, +- 959729F112C192DA00BF73D3 /* jcmarker.c in Sources */, +- 959729F212C192DA00BF73D3 /* jcmaster.c in Sources */, +- 959729F312C192DA00BF73D3 /* jcomapi.c in Sources */, +- 959729F412C192DA00BF73D3 /* jcparam.c in Sources */, +- 959729F512C192DA00BF73D3 /* jcprepct.c in Sources */, +- 959729F612C192DA00BF73D3 /* jcsample.c in Sources */, +- 959729F712C192DA00BF73D3 /* jctrans.c in Sources */, +- 959729F812C192DA00BF73D3 /* jdapimin.c in Sources */, +- 959729F912C192DA00BF73D3 /* jdapistd.c in Sources */, +- 959729FA12C192DA00BF73D3 /* jdatadst.c in Sources */, +- 959729FB12C192DA00BF73D3 /* jdatasrc.c in Sources */, +- 959729FC12C192DA00BF73D3 /* jdcoefct.c in Sources */, +- 959729FD12C192DA00BF73D3 /* jdcolor.c in Sources */, +- 959729FE12C192DA00BF73D3 /* jddctmgr.c in Sources */, +- 959729FF12C192DA00BF73D3 /* jdhuff.c in Sources */, +- 95972A0012C192DA00BF73D3 /* jdinput.c in Sources */, +- 95972A0112C192DA00BF73D3 /* jdmainct.c in Sources */, +- 95972A0212C192DA00BF73D3 /* jdmarker.c in Sources */, +- 95972A0312C192DA00BF73D3 /* jdmaster.c in Sources */, +- 95972A0412C192DA00BF73D3 /* jdmerge.c in Sources */, +- 95972A0512C192DA00BF73D3 /* jdpostct.c in Sources */, +- 95972A0612C192DA00BF73D3 /* jdsample.c in Sources */, +- 95972A0712C192DA00BF73D3 /* jdtrans.c in Sources */, +- 95972A0812C192DA00BF73D3 /* jerror.c in Sources */, +- 95972A0912C192DA00BF73D3 /* jfdctflt.c in Sources */, +- 95972A0A12C192DA00BF73D3 /* jfdctfst.c in Sources */, +- 95972A0B12C192DA00BF73D3 /* jfdctint.c in Sources */, +- 95972A0C12C192DA00BF73D3 /* jidctflt.c in Sources */, +- 95972A0D12C192DA00BF73D3 /* jidctfst.c in Sources */, +- 95972A0E12C192DA00BF73D3 /* jidctint.c in Sources */, +- 95972A0F12C192DA00BF73D3 /* jmemmgr.c in Sources */, +- 95972A1012C192DA00BF73D3 /* jmemnobs.c in Sources */, +- 95972A1112C192DA00BF73D3 /* jquant1.c in Sources */, +- 95972A1212C192DA00BF73D3 /* jquant2.c in Sources */, +- 95972A1312C192DA00BF73D3 /* jutils.c in Sources */, +- 95972A2212C192DA00BF73D3 /* inffast.c in Sources */, +- 95972A2312C192DA00BF73D3 /* inftrees.c in Sources */, +- 95972A2412C192DA00BF73D3 /* uncompr.c in Sources */, +- 95972A2512C192DA00BF73D3 /* compress.c in Sources */, +- 95972A2612C192DA00BF73D3 /* crc32.c in Sources */, +- 95972A2712C192DA00BF73D3 /* zutil.c in Sources */, +- 95972A2812C192DA00BF73D3 /* trees.c in Sources */, +- 95972A2912C192DA00BF73D3 /* deflate.c in Sources */, +- 95972A2A12C192DA00BF73D3 /* adler32.c in Sources */, + 95972A2B12C192DA00BF73D3 /* CImageLoaderPNG.cpp in Sources */, + 95972A2C12C192DA00BF73D3 /* CColorConverter.cpp in Sources */, + 95972A2D12C192DA00BF73D3 /* CSceneManager.cpp in Sources */, +@@ -4857,7 +4463,6 @@ + 95972AB812C192DA00BF73D3 /* OSXClipboard.mm in Sources */, + 95972AB912C192DA00BF73D3 /* CIrrDeviceMacOSX.mm in Sources */, + 95972ABA12C192DA00BF73D3 /* AppDelegate.mm in Sources */, +- 95972ABB12C192DA00BF73D3 /* inflate.c in Sources */, + 95972ABC12C192DA00BF73D3 /* CSphereSceneNode.cpp in Sources */, + 95972ABD12C192DA00BF73D3 /* COBJMeshFileLoader.cpp in Sources */, + 95972ABE12C192DA00BF73D3 /* CPakReader.cpp in Sources */, +@@ -4913,21 +4518,6 @@ + 95972AF012C192DA00BF73D3 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */, + 95972AF112C192DA00BF73D3 /* COBJMeshWriter.cpp in Sources */, + 95972AF212C192DA00BF73D3 /* CParticleScaleAffector.cpp in Sources */, +- 95972AF312C192DA00BF73D3 /* png.c in Sources */, +- 95972AF412C192DA00BF73D3 /* pngerror.c in Sources */, +- 95972AF612C192DA00BF73D3 /* pngget.c in Sources */, +- 95972AF712C192DA00BF73D3 /* pngmem.c in Sources */, +- 95972AF812C192DA00BF73D3 /* pngpread.c in Sources */, +- 95972AF912C192DA00BF73D3 /* pngread.c in Sources */, +- 95972AFA12C192DA00BF73D3 /* pngrio.c in Sources */, +- 95972AFB12C192DA00BF73D3 /* pngrtran.c in Sources */, +- 95972AFC12C192DA00BF73D3 /* pngrutil.c in Sources */, +- 95972AFD12C192DA00BF73D3 /* pngset.c in Sources */, +- 95972AFE12C192DA00BF73D3 /* pngtrans.c in Sources */, +- 95972AFF12C192DA00BF73D3 /* pngwio.c in Sources */, +- 95972B0012C192DA00BF73D3 /* pngwrite.c in Sources */, +- 95972B0112C192DA00BF73D3 /* pngwtran.c in Sources */, +- 95972B0212C192DA00BF73D3 /* pngwutil.c in Sources */, + 95972B0312C192DA00BF73D3 /* CGUIImageList.cpp in Sources */, + 95972B0412C192DA00BF73D3 /* CGUITreeView.cpp in Sources */, + 95972B0512C192DA00BF73D3 /* CMemoryFile.cpp in Sources */, +@@ -4937,22 +4527,12 @@ + 95972B0912C192DA00BF73D3 /* CPLYMeshWriter.cpp in Sources */, + 95972B0A12C192DA00BF73D3 /* CTarReader.cpp in Sources */, + 95972B0B12C192DA00BF73D3 /* CMountPointReader.cpp in Sources */, +- 95972B0C12C192DA00BF73D3 /* jaricom.c in Sources */, +- 95972B0D12C192DA00BF73D3 /* jcarith.c in Sources */, +- 95972B0E12C192DA00BF73D3 /* jdarith.c in Sources */, + 95972B0F12C192DA00BF73D3 /* COctreeSceneNode.cpp in Sources */, + 95972B1012C192DA00BF73D3 /* COctreeTriangleSelector.cpp in Sources */, + 95972B1112C192DA00BF73D3 /* CNPKReader.cpp in Sources */, + 95972B1212C192DA00BF73D3 /* CIrrDeviceFB.cpp in Sources */, + 95972B1312C192DA00BF73D3 /* CIrrDeviceWinCE.cpp in Sources */, + 95972B1412C192DA00BF73D3 /* LzmaDec.c in Sources */, +- 95972B1512C192DA00BF73D3 /* blocksort.c in Sources */, +- 95972B1612C192DA00BF73D3 /* bzcompress.c in Sources */, +- 95972B1712C192DA00BF73D3 /* crctable.c in Sources */, +- 95972B1812C192DA00BF73D3 /* decompress.c in Sources */, +- 95972B1912C192DA00BF73D3 /* huffman.c in Sources */, +- 95972B1A12C192DA00BF73D3 /* randtable.c in Sources */, +- 95972B1B12C192DA00BF73D3 /* bzlib.c in Sources */, + 95972B1C12C192DA00BF73D3 /* aescrypt.cpp in Sources */, + 95972B1D12C192DA00BF73D3 /* aeskey.cpp in Sources */, + 95972B1E12C192DA00BF73D3 /* aestab.cpp in Sources */, +@@ -5081,58 +4661,6 @@ + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( +- 4CA25BCE0A485EAD00B4E469 /* jcapimin.c in Sources */, +- 4CA25BCF0A485EAD00B4E469 /* jcapistd.c in Sources */, +- 4CA25BD00A485EAD00B4E469 /* jccoefct.c in Sources */, +- 4CA25BD10A485EAD00B4E469 /* jccolor.c in Sources */, +- 4CA25BD20A485EAD00B4E469 /* jcdctmgr.c in Sources */, +- 4CA25BD30A485EAD00B4E469 /* jchuff.c in Sources */, +- 4CA25BD50A485EAD00B4E469 /* jcinit.c in Sources */, +- 4CA25BD60A485EAD00B4E469 /* jcmainct.c in Sources */, +- 4CA25BD70A485EAD00B4E469 /* jcmarker.c in Sources */, +- 4CA25BD80A485EAD00B4E469 /* jcmaster.c in Sources */, +- 4CA25BD90A485EAD00B4E469 /* jcomapi.c in Sources */, +- 4CA25BDB0A485EAD00B4E469 /* jcparam.c in Sources */, +- 4CA25BDD0A485EAD00B4E469 /* jcprepct.c in Sources */, +- 4CA25BDE0A485EAD00B4E469 /* jcsample.c in Sources */, +- 4CA25BDF0A485EAD00B4E469 /* jctrans.c in Sources */, +- 4CA25BE00A485EAD00B4E469 /* jdapimin.c in Sources */, +- 4CA25BE10A485EAD00B4E469 /* jdapistd.c in Sources */, +- 4CA25BE20A485EAD00B4E469 /* jdatadst.c in Sources */, +- 4CA25BE30A485EAD00B4E469 /* jdatasrc.c in Sources */, +- 4CA25BE40A485EAD00B4E469 /* jdcoefct.c in Sources */, +- 4CA25BE50A485EAD00B4E469 /* jdcolor.c in Sources */, +- 4CA25BE70A485EAD00B4E469 /* jddctmgr.c in Sources */, +- 4CA25BE80A485EAD00B4E469 /* jdhuff.c in Sources */, +- 4CA25BEA0A485EAD00B4E469 /* jdinput.c in Sources */, +- 4CA25BEB0A485EAD00B4E469 /* jdmainct.c in Sources */, +- 4CA25BEC0A485EAD00B4E469 /* jdmarker.c in Sources */, +- 4CA25BED0A485EAD00B4E469 /* jdmaster.c in Sources */, +- 4CA25BEE0A485EAD00B4E469 /* jdmerge.c in Sources */, +- 4CA25BF00A485EAD00B4E469 /* jdpostct.c in Sources */, +- 4CA25BF10A485EAD00B4E469 /* jdsample.c in Sources */, +- 4CA25BF20A485EAD00B4E469 /* jdtrans.c in Sources */, +- 4CA25BF30A485EAD00B4E469 /* jerror.c in Sources */, +- 4CA25BF50A485EAD00B4E469 /* jfdctflt.c in Sources */, +- 4CA25BF60A485EAD00B4E469 /* jfdctfst.c in Sources */, +- 4CA25BF70A485EAD00B4E469 /* jfdctint.c in Sources */, +- 4CA25BF80A485EAD00B4E469 /* jidctflt.c in Sources */, +- 4CA25BF90A485EAD00B4E469 /* jidctfst.c in Sources */, +- 4CA25BFA0A485EAD00B4E469 /* jidctint.c in Sources */, +- 4CA25C000A485EAD00B4E469 /* jmemmgr.c in Sources */, +- 4CA25C020A485EAD00B4E469 /* jmemnobs.c in Sources */, +- 4CA25C080A485EAD00B4E469 /* jquant1.c in Sources */, +- 4CA25C090A485EAD00B4E469 /* jquant2.c in Sources */, +- 4CA25C0A0A485EAD00B4E469 /* jutils.c in Sources */, +- 4C53E3D80A4856B30014E966 /* inffast.c in Sources */, +- 4C53E3DC0A4856B30014E966 /* inftrees.c in Sources */, +- 4C53E3E40A4856B30014E966 /* uncompr.c in Sources */, +- 4C53E3F30A4856B30014E966 /* compress.c in Sources */, +- 4C53E3F60A4856B30014E966 /* crc32.c in Sources */, +- 4C53E3FE0A4856B30014E966 /* zutil.c in Sources */, +- 4C53E4010A4856B30014E966 /* trees.c in Sources */, +- 4C53E40A0A4856B30014E966 /* deflate.c in Sources */, +- 4C53E4150A4856B30014E966 /* adler32.c in Sources */, + 4C53E4280A4856B30014E966 /* CImageLoaderPNG.cpp in Sources */, + 4C53E4290A4856B30014E966 /* CColorConverter.cpp in Sources */, + 4C53E42A0A4856B30014E966 /* CSceneManager.cpp in Sources */, +@@ -5277,7 +4805,6 @@ + 4C53E57E0A4856B30014E966 /* OSXClipboard.mm in Sources */, + 4C53E57F0A4856B30014E966 /* CIrrDeviceMacOSX.mm in Sources */, + 4C53E5800A4856B30014E966 /* AppDelegate.mm in Sources */, +- 4C6DC9B70A48715A0017A6E5 /* inflate.c in Sources */, + 4CC36B0F0A6B61DB0076C4B2 /* CSphereSceneNode.cpp in Sources */, + 4C364EA40A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp in Sources */, + 4C43EEC00A74A5C800F942FC /* CPakReader.cpp in Sources */, +@@ -5333,21 +4860,6 @@ + 093973C20E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */, + 096F8E3D0EA2EFBA00907EC5 /* COBJMeshWriter.cpp in Sources */, + 096CC0E00ECE65B500C81DC7 /* CParticleScaleAffector.cpp in Sources */, +- 09293C3E0ED32029003B8C9C /* png.c in Sources */, +- 09293C3F0ED32029003B8C9C /* pngerror.c in Sources */, +- 09293C410ED32029003B8C9C /* pngget.c in Sources */, +- 09293C420ED32029003B8C9C /* pngmem.c in Sources */, +- 09293C430ED32029003B8C9C /* pngpread.c in Sources */, +- 09293C440ED32029003B8C9C /* pngread.c in Sources */, +- 09293C450ED32029003B8C9C /* pngrio.c in Sources */, +- 09293C460ED32029003B8C9C /* pngrtran.c in Sources */, +- 09293C470ED32029003B8C9C /* pngrutil.c in Sources */, +- 09293C480ED32029003B8C9C /* pngset.c in Sources */, +- 09293C4A0ED32029003B8C9C /* pngtrans.c in Sources */, +- 09293C4C0ED32029003B8C9C /* pngwio.c in Sources */, +- 09293C4D0ED32029003B8C9C /* pngwrite.c in Sources */, +- 09293C4E0ED32029003B8C9C /* pngwtran.c in Sources */, +- 09293C4F0ED32029003B8C9C /* pngwutil.c in Sources */, + 3484C4E20F48D1B000C81F60 /* CGUIImageList.cpp in Sources */, + 3484C4EF0F48D3A100C81F60 /* CGUITreeView.cpp in Sources */, + 3484C4FE0F48D4CB00C81F60 /* CMemoryFile.cpp in Sources */, +@@ -5357,22 +4869,12 @@ + 34EF91DD0F65FD14000B5651 /* CPLYMeshWriter.cpp in Sources */, + 3430E4D71022C391006271FD /* CTarReader.cpp in Sources */, + 344FD4A61039E98C0045FD3F /* CMountPointReader.cpp in Sources */, +- 0E2E3C461103B1B5002DE8D7 /* jaricom.c in Sources */, +- 0E2E3C471103B1B5002DE8D7 /* jcarith.c in Sources */, +- 0E2E3C481103B1B5002DE8D7 /* jdarith.c in Sources */, + 0E2E3C4D1103B247002DE8D7 /* COctreeSceneNode.cpp in Sources */, + 0E2E3C511103B261002DE8D7 /* COctreeTriangleSelector.cpp in Sources */, + 0E2E3C551103B27D002DE8D7 /* CNPKReader.cpp in Sources */, + 0E2E3C5B1103B2AE002DE8D7 /* CIrrDeviceFB.cpp in Sources */, + 0E2E3C5D1103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp in Sources */, + 0E2E3C641103B384002DE8D7 /* LzmaDec.c in Sources */, +- 0E2E3C6F1103B3B9002DE8D7 /* blocksort.c in Sources */, +- 0E2E3C701103B3B9002DE8D7 /* bzcompress.c in Sources */, +- 0E2E3C731103B3B9002DE8D7 /* crctable.c in Sources */, +- 0E2E3C741103B3B9002DE8D7 /* decompress.c in Sources */, +- 0E2E3C751103B3B9002DE8D7 /* huffman.c in Sources */, +- 0E2E3C771103B3B9002DE8D7 /* randtable.c in Sources */, +- 0E2E3C7C1103B4E1002DE8D7 /* bzlib.c in Sources */, + 0E2E3C871103B53C002DE8D7 /* aescrypt.cpp in Sources */, + 0E2E3C881103B53C002DE8D7 /* aeskey.cpp in Sources */, + 0E2E3C891103B53C002DE8D7 /* aestab.cpp in Sources */, +@@ -6091,7 +5593,11 @@ + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = NO; +- HEADER_SEARCH_PATHS = ../../../include; ++ HEADER_SEARCH_PATHS = ( ++ ../../../include, ++ @LIBPNG_PREFIX@/include, ++ @JPEG_PREFIX@/include, ++ ); + OTHER_CFLAGS = ( + "-DMACOSX", + "-D_DEBUG", +@@ -6112,7 +5618,11 @@ + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = NO; +- HEADER_SEARCH_PATHS = ../../../include; ++ HEADER_SEARCH_PATHS = ( ++ ../../../include, ++ @LIBPNG_PREFIX@/include, ++ @JPEG_PREFIX@/include, ++ ); + INSTALL_MODE_FLAG = "a+rwx"; + OTHER_CFLAGS = "-DMACOSX"; + PREBINDING = NO; +@@ -6138,6 +5648,11 @@ + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = "IrrFramework-Info.plist"; + INSTALL_PATH = "@executable_path/../Frameworks"; ++ LIBRARY_SEARCH_PATHS = ( ++ "$(inherited)", ++ @LIBPNG_PREFIX@/lib, ++ @JPEG_PREFIX@/lib, ++ ); + OTHER_CFLAGS = ( + "-read_only_relocs", + suppress, +@@ -6149,6 +5664,8 @@ + AppKit, + "-read_only_relocs", + suppress, ++ "-lbz2", ++ "-lz", + ); + PREBINDING = NO; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; +@@ -6175,6 +5692,11 @@ + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = "IrrFramework-Info.plist"; + INSTALL_PATH = "@executable_path/../Frameworks"; ++ LIBRARY_SEARCH_PATHS = ( ++ "$(inherited)", ++ @LIBPNG_PREFIX@/lib, ++ @JPEG_PREFIX@/lib, ++ ); + OTHER_CFLAGS = ( + "-read_only_relocs", + suppress, +@@ -6186,6 +5708,8 @@ + AppKit, + "-read_only_relocs", + suppress, ++ "-lbz2", ++ "-lz", + ); + PREBINDING = NO; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; diff --git a/Patches/jam/2.6.1.patch b/Patches/jam/2.6.1.patch new file mode 100644 index 0000000000000..9e5fd7852693e --- /dev/null +++ b/Patches/jam/2.6.1.patch @@ -0,0 +1,52 @@ +diff --git a/jam.c b/jam.c +index 7f6e556..e37bb37 100644 +--- a/jam.c ++++ b/jam.c +@@ -166,7 +166,7 @@ extern char **environ; + # endif + # endif + +-main( int argc, char **argv, char **arg_environ ) ++int main( int argc, char **argv, char **arg_environ ) + { + int n; + const char *s; +diff --git a/jam.h b/jam.h +index 2e8bb3e..5db7599 100644 +--- a/jam.h ++++ b/jam.h +@@ -438,7 +438,7 @@ + # include + # include + +-# ifdef OS_HPUX ++# if defined(__APPLE__) || defined(OS_HPUX) + # include + # endif + +diff --git a/mkjambase.c b/mkjambase.c +index 26224c9..eebe354 100644 +--- a/mkjambase.c ++++ b/mkjambase.c +@@ -24,7 +24,7 @@ + # include + # include + +-main( int argc, char **argv, char **envp ) ++int main( int argc, char **argv, char **envp ) + { + char buf[ 1024 ]; + FILE *fin; +diff --git a/scan.h b/scan.h +index e16af85..f9ed291 100644 +--- a/scan.h ++++ b/scan.h +@@ -50,7 +50,7 @@ int yyline(); + int yylex(); + int yyparse(); + const char *yyfname(); +-int yylineo(); ++int yylineno(); + + # define SCAN_NORMAL 0 /* normal parsing */ + # define SCAN_STRING 1 /* look only for matching } */ diff --git a/Patches/john-jumbo/john_jumbo_m1.diff b/Patches/john-jumbo/john_jumbo_m1.diff new file mode 100644 index 0000000000000..2fb9f862d39e5 --- /dev/null +++ b/Patches/john-jumbo/john_jumbo_m1.diff @@ -0,0 +1,275 @@ +diff --git a/src/configure b/src/configure +index 6b9a5088c4..796660f8d7 100755 +--- a/src/configure ++++ b/src/configure +@@ -9321,6 +9321,42 @@ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++ CC="$CC_BACKUP -march=armv8-a+simd" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ASIMD" >&5 ++$as_echo_n "checking for ASIMD... " >&6; } ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include ++ #include ++ extern void exit(int); ++ int main(){uint32x4_t t;*((long*)&t)=1;t=veorq_u32(t,t);if((*(unsigned*)&t)==88)printf(".");exit(0);} ++ ++ ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ CPU_BEST_FLAGS="-march=armv8-a+simd" ++ SIMD_NAME="ASIMD" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ARCH_LINK=arm64le.h ++ ++else ++ CPU_NOTFOUND="1" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +@@ -9329,6 +9365,7 @@ fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NEON" >&5 + $as_echo_n "checking for NEON... " >&6; } ++ CC="$CC_BACKUP -mfpu=neon" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9350,6 +9387,34 @@ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ASIMD" >&5 ++$as_echo_n "checking for ASIMD... " >&6; } ++ CC="$CC_BACKUP -march=armv8-a+simd" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include ++ #include ++ extern void exit(int); ++ int main(){uint32x4_t t;*((long*)&t)=1;t=veorq_u32(t,t);if((*(unsigned*)&t)==88)printf(".");exit(0);} ++ ++ ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ CPU_BEST_FLAGS="-march=armv8-a+simd" ++ SIMD_NAME="ASIMD" ++ ARCH_LINK=arm64le.h ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++else ++ CPU_NOTFOUND="1" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +diff --git a/src/m4/jtr_arm_logic.m4 b/src/m4/jtr_arm_logic.m4 +index 3703e74b02..de47735cc2 100644 +--- a/src/m4/jtr_arm_logic.m4 ++++ b/src/m4/jtr_arm_logic.m4 +@@ -44,11 +44,29 @@ if test "x$enable_native_tests" = xyes; then + ,[CPU_NOTFOUND="1"] + [AC_MSG_RESULT(no)] + ) ++ CC="$CC_BACKUP -march=armv8-a+simd" ++ AC_MSG_CHECKING([for ASIMD]) ++ AC_RUN_IFELSE( ++ [ ++ AC_LANG_SOURCE( ++ [[#include ++ #include ++ extern void exit(int); ++ int main(){uint32x4_t t;*((long*)&t)=1;t=veorq_u32(t,t);if((*(unsigned*)&t)==88)printf(".");exit(0);}]] ++ )] ++ ,[CPU_BEST_FLAGS="-march=armv8-a+simd"] ++ [SIMD_NAME="ASIMD"] ++ [AC_MSG_RESULT([yes])] ++ [ARCH_LINK=arm64le.h] ++ ,[CPU_NOTFOUND="1"] ++ [AC_MSG_RESULT(no)] ++ ) + else + dnl ====================================================================== + dnl cross-compile versions of the same tests + dnl ====================================================================== + AC_MSG_CHECKING([for NEON]) ++ CC="$CC_BACKUP -mfpu=neon" + AC_LINK_IFELSE( + [ + AC_LANG_SOURCE( +@@ -63,6 +81,23 @@ dnl ====================================================================== + ,[CPU_NOTFOUND="1"] + [AC_MSG_RESULT(no)] + ) ++ AC_MSG_CHECKING([for ASIMD]) ++ CC="$CC_BACKUP -march=armv8-a+simd" ++ AC_LINK_IFELSE( ++ [ ++ AC_LANG_SOURCE( ++ [[#include ++ #include ++ extern void exit(int); ++ int main(){uint32x4_t t;*((long*)&t)=1;t=veorq_u32(t,t);if((*(unsigned*)&t)==88)printf(".");exit(0);}]] ++ )] ++ ,[CPU_BEST_FLAGS="-march=armv8-a+simd"] ++ [SIMD_NAME="ASIMD"] ++ [ARCH_LINK=arm64le.h] ++ [AC_MSG_RESULT([yes])] ++ ,[CPU_NOTFOUND="1"] ++ [AC_MSG_RESULT(no)] ++ ) + fi + fi + + diff --git a/src/arm32le.h b/src/arm32le.h + index 9a8ff99956..a0c60c0d26 100644 + --- a/src/arm32le.h + +++ b/src/arm32le.h + @@ -27,7 +27,7 @@ + #define ARCH_INT_GT_32 0 + #endif + + -#define ARCH_ALLOWS_UNALIGNED 0 + +#define ARCH_ALLOWS_UNALIGNED __ARM_FEATURE_UNALIGNED + #define ARCH_INDEX(x) ((unsigned int)(unsigned char)(x)) + + #define CPU_DETECT 0 + diff --git a/src/arm64le.h b/src/arm64le.h + index a916cc0538..63b1ed932e 100644 + --- a/src/arm64le.h + +++ b/src/arm64le.h + @@ -28,7 +28,7 @@ + #define ARCH_INT_GT_32 0 + #endif + + -#define ARCH_ALLOWS_UNALIGNED 0 + +#define ARCH_ALLOWS_UNALIGNED __ARM_FEATURE_UNALIGNED + #define ARCH_INDEX(x) ((unsigned int)(unsigned char)(x)) + + #define CPU_DETECT 0 + + diff --git a/src/pseudo_intrinsics.h b/src/pseudo_intrinsics.h + index 5fabbdbb81..450e2477b5 100644 + --- a/src/pseudo_intrinsics.h + +++ b/src/pseudo_intrinsics.h + @@ -66,10 +66,10 @@ typedef union { + #define VLOADU_EMULATED 1 + #define vor(x, y) (vtype)vorrq_u32((x).v32, (y).v32) + #define vorn(x, y) (vtype)vornq_u32((x).v32, (y).v32) + -#define vroti_epi32(x, i) (i > 0 ? (vtype)vsliq_n_u32(vshrq_n_u32((x).v32, 32 - (i)), (x).v32, i) : \ + - (vtype)vsriq_n_u32(vshlq_n_u32((x).v32, 32 + (i)), (x).v32, -(i))) + -#define vroti_epi64(x, i) (i > 0 ? (vtype)vsliq_n_u64(vshrq_n_u64((x).v64, 64 - (i)), (x).v64, i) : \ + - (vtype)vsriq_n_u64(vshlq_n_u64((x).v64, 64 + (i)), (x).v64, -(i))) + +#define vroti_epi32(x, i) (i > 0 ? (vtype)vsliq_n_u32(vshrq_n_u32((x).v32, 32 - ((i) & 31)), (x).v32, (i) & 31) : \ + + (vtype)vsriq_n_u32(vshlq_n_u32((x).v32, (32 + (i)) & 31), (x).v32, (-(i)) & 31)) + +#define vroti_epi64(x, i) (i > 0 ? (vtype)vsliq_n_u64(vshrq_n_u64((x).v64, 64 - ((i) & 63)), (x).v64, (i) & 63) : \ + + (vtype)vsriq_n_u64(vshlq_n_u64((x).v64, (64 + (i)) & 63), (x).v64, (-(i)) & 63)) + #define vroti16_epi32 vroti_epi32 + #define vset1_epi32(i) (vtype)vdupq_n_u32(i) + #define vset1_epi64(i) (vtype)vdupq_n_u64(i) + + diff --git a/src/arm32le.h b/src/arm32le.h + index a0c60c0d26..9a8ff99956 100644 + --- a/src/arm32le.h + +++ b/src/arm32le.h + @@ -27,7 +27,7 @@ + #define ARCH_INT_GT_32 0 + #endif + + -#define ARCH_ALLOWS_UNALIGNED __ARM_FEATURE_UNALIGNED + +#define ARCH_ALLOWS_UNALIGNED 0 + #define ARCH_INDEX(x) ((unsigned int)(unsigned char)(x)) + + #define CPU_DETECT 0 + diff --git a/src/arm64le.h b/src/arm64le.h + index 63b1ed932e..a916cc0538 100644 + --- a/src/arm64le.h + +++ b/src/arm64le.h + @@ -28,7 +28,7 @@ + #define ARCH_INT_GT_32 0 + #endif + + -#define ARCH_ALLOWS_UNALIGNED __ARM_FEATURE_UNALIGNED + +#define ARCH_ALLOWS_UNALIGNED 0 + #define ARCH_INDEX(x) ((unsigned int)(unsigned char)(x)) + + #define CPU_DETECT 0 + diff --git a/src/opencl_rar_fmt_plug.c b/src/opencl_rar_fmt_plug.c + index 0d78f55f00..daa7573d43 100644 + --- a/src/opencl_rar_fmt_plug.c + +++ b/src/opencl_rar_fmt_plug.c + @@ -40,7 +40,14 @@ + * + */ + + -#ifdef HAVE_OPENCL + +#if HAVE_OPENCL + + + +#if AC_BUILT + +#include "autoconfig.h" + +#endif + +#include "arch.h" + + + +#if ARCH_ALLOWS_UNALIGNED || __ARM_FEATURE_UNALIGNED + + #if FMT_EXTERNS_H + extern struct fmt_main fmt_ocl_rar; + @@ -433,4 +435,14 @@ struct fmt_main fmt_ocl_rar = { + + #endif /* plugin stanza */ + + +#else + +#if !defined(FMT_EXTERNS_H) && !defined(FMT_REGISTERS_H) + +#ifdef __GNUC__ + +#warning ": target system requires aligned memory access, RAR OpenCL format disabled:" + +#elif _MSC_VER + +#pragma message(": target system requires aligned memory access, RAR OpenCL format disabled:") + +#endif + +#endif + + + +#endif /* ARCH_ALLOWS_UNALIGNED || __ARM_FEATURE_UNALIGNED */ + #endif /* HAVE_OPENCL */ + diff --git a/src/rar_fmt_plug.c b/src/rar_fmt_plug.c + index 5af8801949..b82c7b51ca 100644 + --- a/src/rar_fmt_plug.c + +++ b/src/rar_fmt_plug.c + @@ -45,7 +45,7 @@ + #endif + #include "arch.h" + + -#if ARCH_ALLOWS_UNALIGNED + +#if ARCH_ALLOWS_UNALIGNED || __ARM_FEATURE_UNALIGNED + + #if FMT_EXTERNS_H + extern struct fmt_main fmt_rar; + @@ -453,4 +453,4 @@ struct fmt_main fmt_rar = { + #endif + #endif + + -#endif /* ARCH_ALLOWS_UNALIGNED */ + +#endif /* ARCH_ALLOWS_UNALIGNED || __ARM_FEATURE_UNALIGNED */ diff --git a/Patches/john/1.9.0.patch b/Patches/john/1.9.0.patch new file mode 100644 index 0000000000000..187ffe457b4d3 --- /dev/null +++ b/Patches/john/1.9.0.patch @@ -0,0 +1,50 @@ +diff --git a/src/path.c b/src/path.c +index 2bee3c2..d640daf 100644 +--- a/src/path.c ++++ b/src/path.c +@@ -9,6 +9,7 @@ + */ + + #include ++#include + + #include "misc.h" + #include "params.h" +@@ -32,7 +33,7 @@ + void path_init(char **argv) + { + #if JOHN_SYSTEMWIDE +- struct passwd *pw; ++ char *home_dir; + #ifdef JOHN_PRIVATE_HOME + const char *private; + #endif +@@ -46,15 +47,23 @@ + john_home_length = strlen(john_home_path); + + if (user_home_path) return; +- pw = getpwuid(getuid()); +- endpwent(); +- if (!pw) return; + +- user_home_length = strlen(pw->pw_dir) + 1; ++ /* $HOME may override user's home directory */ ++ if (!(home_dir = getenv("HOME"))) { ++ struct passwd *pw; ++ ++ pw = getpwuid(getuid()); ++ endpwent(); ++ if (!pw) ++ return; ++ home_dir = pw->pw_dir; ++ } ++ ++ user_home_length = strlen(home_dir) + 1; + if (user_home_length >= PATH_BUFFER_SIZE) return; + + user_home_path = mem_alloc(PATH_BUFFER_SIZE); +- memcpy(user_home_path, pw->pw_dir, user_home_length - 1); ++ memcpy(user_home_path, home_dir, user_home_length - 1); + user_home_path[user_home_length - 1] = '/'; + + #ifdef JOHN_PRIVATE_HOME diff --git a/Patches/kyoto-tycoon/0.9.56.patch b/Patches/kyoto-tycoon/0.9.56.patch new file mode 100644 index 0000000000000..7c1ce2ab42210 --- /dev/null +++ b/Patches/kyoto-tycoon/0.9.56.patch @@ -0,0 +1,11 @@ +--- a/ktdbext.h 2013-11-08 09:34:53.000000000 -0500 ++++ b/ktdbext.h 2013-11-08 09:35:00.000000000 -0500 +@@ -271,7 +271,7 @@ + if (!logf("prepare", "started to open temporary databases under %s", tmppath.c_str())) + err = true; + stime = kc::time(); +- uint32_t pid = getpid() & kc::UINT16MAX; ++ uint32_t pid = kc::getpid() & kc::UINT16MAX; + uint32_t tid = kc::Thread::hash() & kc::UINT16MAX; + uint32_t ts = kc::time() * 1000; + for (size_t i = 0; i < dbnum_; i++) { diff --git a/Patches/kyoto-tycoon/ephemeral-ports.patch b/Patches/kyoto-tycoon/ephemeral-ports.patch new file mode 100644 index 0000000000000..78d8e3ae2df39 --- /dev/null +++ b/Patches/kyoto-tycoon/ephemeral-ports.patch @@ -0,0 +1,20 @@ +--- a/ktsocket.cc 2012-05-25 01:44:34.000000000 +0800 ++++ b/ktsocket.cc 2020-12-03 19:17:12.907438645 +0800 +@@ -250,7 +250,7 @@ + char addr[NAMEBUFSIZ]; + int32_t port; + parseaddr(expr.c_str(), addr, &port); +- if (kc::atoi(addr) < 1 || port < 1 || port > kc::INT16MAX) { ++ if (kc::atoi(addr) < 1 || port < 1 || port > kc::UINT16MAX) { + sockseterrmsg(core, "invalid address expression"); + return false; + } +@@ -724,7 +724,7 @@ + servseterrmsg(core, "invalid address expression"); + return false; + } +- if (port < 1 || port > kc::INT16MAX) { ++ if (port < 1 || port > kc::UINT16MAX) { + servseterrmsg(core, "invalid address expression"); + return false; + } diff --git a/Patches/lbzip2/gnulib-vasnprintf-port-to-macOS-10-13.diff b/Patches/lbzip2/gnulib-vasnprintf-port-to-macOS-10-13.diff new file mode 100644 index 0000000000000..e82b8cdd94dac --- /dev/null +++ b/Patches/lbzip2/gnulib-vasnprintf-port-to-macOS-10-13.diff @@ -0,0 +1,25 @@ +--- lib/vasnprintf.c~ 2020-08-06 19:19:48.000000000 +0200 ++++ lib/vasnprintf.c 2020-08-06 19:19:58.000000000 +0200 +@@ -4870,7 +4870,11 @@ + #endif + *fbp = dp->conversion; + #if USE_SNPRINTF +-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) ++# if ! (((__GLIBC__ > 2 \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ ++ && !defined __UCLIBC__) \ ++ || (defined __APPLE__ && defined __MACH__) \ ++ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; +@@ -4884,6 +4888,9 @@ + in format strings in writable memory may crash the program + (if compiled with _FORTIFY_SOURCE=2), so we should avoid it + in this situation. */ ++ /* macOS 10.13 High Sierra behaves like glibc with ++ _FORTIFY_SOURCE=2, and older macOS releases ++ presumably do not need %n. */ + /* On native Windows systems (such as mingw), we can avoid using + %n because: + - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, diff --git a/Patches/libdc1394/capture.patch b/Patches/libdc1394/capture.patch new file mode 100644 index 0000000000000..dcab9f7cd519c --- /dev/null +++ b/Patches/libdc1394/capture.patch @@ -0,0 +1,13 @@ +diff --git a/dc1394/macosx/capture.c b/dc1394/macosx/capture.c +index c7c71f2..8959535 100644 +--- a/dc1394/macosx/capture.c ++++ b/dc1394/macosx/capture.c +@@ -150,7 +150,7 @@ callback (buffer_info * buffer, NuDCLRef dcl) + + for (i = 0; i < buffer->num_dcls; i++) { + int packet_size = capture->frames[buffer->i].packet_size; +- if ((buffer->pkts[i].status & 0x1F) != 0x11) { ++ if (buffer->pkts[i].status && (buffer->pkts[i].status & 0x1F) != 0x11) { + dc1394_log_warning ("packet %d had error status %x", + i, buffer->pkts[i].status); + corrupt = 1; diff --git a/Patches/libfreehand/0.1.2.patch b/Patches/libfreehand/0.1.2.patch new file mode 100644 index 0000000000000..4b4f84cd9eb51 --- /dev/null +++ b/Patches/libfreehand/0.1.2.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/libfreehand_utils.cpp b/src/lib/libfreehand_utils.cpp +index 439c457..32f23e0 100644 +--- a/src/lib/libfreehand_utils.cpp ++++ b/src/lib/libfreehand_utils.cpp +@@ -162,7 +162,7 @@ + while (j < length) + { + UChar32 c; +- U16_NEXT(s, j, length, c) ++ U16_NEXT(s, j, length, c); + unsigned char outbuf[U8_MAX_LENGTH+1]; + int i = 0; + U8_APPEND_UNSAFE(&outbuf[0], i, c); diff --git a/Patches/liblinear/patch-Makefile.diff b/Patches/liblinear/patch-Makefile.diff new file mode 100644 index 0000000000000..7cbb2a667cfed --- /dev/null +++ b/Patches/liblinear/patch-Makefile.diff @@ -0,0 +1,52 @@ +*** Makefile.orig +--- Makefile +*************** +*** 5,20 **** + #LIBS = -lblas + SHVER = 5 + OS = $(shell uname) + ifeq ($(OS),Darwin) +! SHARED_LIB_FLAG = -dynamiclib -Wl,-install_name,liblinear.so.$(SHVER) + else +! SHARED_LIB_FLAG = -shared -Wl,-soname,liblinear.so.$(SHVER) + endif + +! all: train predict + + lib: linear.o newton.o blas/blas.a +! $(CXX) $(SHARED_LIB_FLAG) linear.o newton.o blas/blas.a -o liblinear.so.$(SHVER) + + train: newton.o linear.o train.c blas/blas.a + $(CXX) $(CFLAGS) -o train train.c newton.o linear.o $(LIBS) +--- 5,24 ---- + #LIBS = -lblas + SHVER = 5 + OS = $(shell uname) ++ PREFIX ?= /usr/local ++ + ifeq ($(OS),Darwin) +! LIBEXT = ".$(SHVER).dylib" +! SHARED_LIB_FLAG = -dynamiclib -install_name $(PREFIX)/lib/liblinear$(LIBEXT) + else +! LIBEXT = ".so.$(SHVER)" +! SHARED_LIB_FLAG = -shared -Wl,-soname,liblinear$(LIBEXT) + endif + +! all: train predict lib + + lib: linear.o newton.o blas/blas.a +! $(CXX) $(SHARED_LIB_FLAG) linear.o newton.o blas/blas.a -o liblinear$(LIBEXT) + + train: newton.o linear.o train.c blas/blas.a + $(CXX) $(CFLAGS) -o train train.c newton.o linear.o $(LIBS) +*************** +*** 34,37 **** + clean: + make -C blas clean + make -C matlab clean +! rm -f *~ newton.o linear.o train predict liblinear.so.$(SHVER) +--- 38,41 ---- + clean: + make -C blas clean + make -C matlab clean +! rm -f *~ newton.o linear.o train predict liblinear.* diff --git a/Patches/libmemcached/1.0.18.patch b/Patches/libmemcached/1.0.18.patch new file mode 100644 index 0000000000000..d2299fb4a0aa8 --- /dev/null +++ b/Patches/libmemcached/1.0.18.patch @@ -0,0 +1,218 @@ +diff --git a/clients/memflush.cc b/clients/memflush.cc +index 8bd0dbf..71545ea 100644 +--- a/clients/memflush.cc ++++ b/clients/memflush.cc +@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) + { + options_parse(argc, argv); + +- if (opt_servers == false) ++ if (opt_servers == NULL) + { + char *temp; + +@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) + opt_servers= strdup(temp); + } + +- if (opt_servers == false) ++ if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); +diff --git a/example/byteorder.cc b/example/byteorder.cc +index fdfa021..8c03d35 100644 +--- a/example/byteorder.cc ++++ b/example/byteorder.cc +@@ -42,27 +42,59 @@ + #include + + /* Byte swap a 64-bit number. */ +-#ifndef swap64 +-static inline uint64_t swap64(uint64_t in) +-{ +-#ifndef WORDS_BIGENDIAN +- /* Little endian, flip the bytes around until someone makes a faster/better ++#if !defined(htonll) && !defined(ntohll) ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# if defined(__FreeBSD__) ++# include ++# define htonll(x) bswap64(x) ++# define ntohll(x) bswap64(x) ++# elif defined(__APPLE__) ++# include ++# define htonll(x) OSSwapInt64(x) ++# define ntohll(x) OSSwapInt64(x) ++# elif defined(__OpenBSD__) ++# include ++# define htonll(x) swap64(x) ++# define ntohll(x) swap64(x) ++# elif defined(__NetBSD__) ++# include ++# include ++# if defined(__BSWAP_RENAME) && !defined(__bswap_32) ++# define htonll(x) bswap64(x) ++# define ntohll(x) bswap64(x) ++# endif ++# elif defined(__sun) || defined(sun) ++# include ++# define htonll(x) BSWAP_64(x) ++# define ntohll(x) BSWAP_64(x) ++# elif defined(_MSC_VER) ++# include ++# define htonll(x) _byteswap_uint64(x) ++# define ntohll(x) _byteswap_uint64(x) ++# else ++# include ++# ifndef bswap_64 ++ /* Little endian, flip the bytes around until someone makes a faster/better + * way to do this. */ +- uint64_t rv= 0; +- for (uint8_t x= 0; x < 8; x++) +- { +- rv= (rv << 8) | (in & 0xff); +- in >>= 8; +- } +- return rv; ++ static inline uint64_t bswap_64(uint64_t in) ++ { ++ uint64_t rv= 0; ++ for (uint8_t x= 0; x < 8; x++) ++ { ++ rv= (rv << 8) | (in & 0xff); ++ in >>= 8; ++ } ++ return rv; ++ } ++# endif ++# define htonll(x) bswap_64(x) ++# define ntohll(x) bswap_64(x) ++# endif + #else +- /* big-endian machines don't need byte swapping */ +- return in; +-#endif // WORDS_BIGENDIAN +-} ++# define htonll(x) (x) ++# define ntohll(x) (x) ++#endif + #endif +- +-#ifdef HAVE_HTONLL + + uint64_t example_ntohll(uint64_t value) + { +@@ -73,17 +105,3 @@ uint64_t example_htonll(uint64_t value) + { + return htonll(value); + } +- +-#else // HAVE_HTONLL +- +-uint64_t example_ntohll(uint64_t value) +-{ +- return swap64(value); +-} +- +-uint64_t example_htonll(uint64_t value) +-{ +- return swap64(value); +-} +- +-#endif // HAVE_HTONLL +diff --git a/libmemcached/byteorder.cc b/libmemcached/byteorder.cc +index 9f11aa8..f167822 100644 +--- a/libmemcached/byteorder.cc ++++ b/libmemcached/byteorder.cc +@@ -39,41 +39,66 @@ + #include "libmemcached/byteorder.h" + + /* Byte swap a 64-bit number. */ +-#ifndef swap64 +-static inline uint64_t swap64(uint64_t in) +-{ +-#ifndef WORDS_BIGENDIAN +- /* Little endian, flip the bytes around until someone makes a faster/better ++#if !defined(htonll) && !defined(ntohll) ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# if defined(__FreeBSD__) ++# include ++# define htonll(x) bswap64(x) ++# define ntohll(x) bswap64(x) ++# elif defined(__APPLE__) ++# include ++# define htonll(x) OSSwapInt64(x) ++# define ntohll(x) OSSwapInt64(x) ++# elif defined(__OpenBSD__) ++# include ++# define htonll(x) swap64(x) ++# define ntohll(x) swap64(x) ++# elif defined(__NetBSD__) ++# include ++# include ++# if defined(__BSWAP_RENAME) && !defined(__bswap_32) ++# define htonll(x) bswap64(x) ++# define ntohll(x) bswap64(x) ++# endif ++# elif defined(__sun) || defined(sun) ++# include ++# define htonll(x) BSWAP_64(x) ++# define ntohll(x) BSWAP_64(x) ++# elif defined(_MSC_VER) ++# include ++# define htonll(x) _byteswap_uint64(x) ++# define ntohll(x) _byteswap_uint64(x) ++# else ++# include ++# ifndef bswap_64 ++ /* Little endian, flip the bytes around until someone makes a faster/better + * way to do this. */ +- uint64_t rv= 0; +- for (uint8_t x= 0; x < 8; ++x) +- { +- rv= (rv << 8) | (in & 0xff); +- in >>= 8; +- } +- return rv; ++ static inline uint64_t bswap_64(uint64_t in) ++ { ++ uint64_t rv= 0; ++ for (uint8_t x= 0; x < 8; x++) ++ { ++ rv= (rv << 8) | (in & 0xff); ++ in >>= 8; ++ } ++ return rv; ++ } ++# endif ++# define htonll(x) bswap_64(x) ++# define ntohll(x) bswap_64(x) ++# endif + #else +- /* big-endian machines don't need byte swapping */ +- return in; +-#endif // WORDS_BIGENDIAN +-} ++# define htonll(x) (x) ++# define ntohll(x) (x) ++#endif + #endif +- + + uint64_t memcached_ntohll(uint64_t value) + { +-#ifdef HAVE_HTONLL + return ntohll(value); +-#else +- return swap64(value); +-#endif + } + + uint64_t memcached_htonll(uint64_t value) + { +-#ifdef HAVE_HTONLL + return htonll(value); +-#else +- return swap64(value); +-#endif + } diff --git a/Patches/libnids/1.24.patch b/Patches/libnids/1.24.patch new file mode 100644 index 0000000000000..af40ab9b45b3f --- /dev/null +++ b/Patches/libnids/1.24.patch @@ -0,0 +1,29 @@ +--- a/src/Makefile.in 2010-03-01 13:13:17.000000000 -0800 ++++ b/src/Makefile.in 2012-09-19 09:48:23.000000000 -0700 +@@ -13,7 +13,7 @@ + libdir = @libdir@ + mandir = @mandir@ + LIBSTATIC = libnids.a +-LIBSHARED = libnids.so.1.24 ++LIBSHARED = libnids.1.24.dylib + + CC = @CC@ + CFLAGS = @CFLAGS@ -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@ +@@ -65,7 +65,7 @@ + ar -cr $@ $(OBJS) + $(RANLIB) $@ + $(LIBSHARED): $(OBJS_SHARED) +- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) ++ $(CC) -dynamiclib -Wl,-dylib -Wl,-install_name,$(LIBSHARED) -Wl,-headerpad_max_install_names -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB) + + _install install: $(LIBSTATIC) + ../mkinstalldirs $(install_prefix)$(libdir) +@@ -76,7 +76,7 @@ + $(INSTALL) -c -m 644 libnids.3 $(install_prefix)$(mandir)/man3 + _installshared installshared: install $(LIBSHARED) + $(INSTALL) -c -m 755 $(LIBSHARED) $(install_prefix)$(libdir) +- ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.so ++ ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.dylib + + clean: + rm -f *.o *~ $(LIBSTATIC) $(LIBSHARED) diff --git a/Patches/liboggz/1.1.2-inttypes.patch b/Patches/liboggz/1.1.2-inttypes.patch new file mode 100644 index 0000000000000..906b4f3c731ef --- /dev/null +++ b/Patches/liboggz/1.1.2-inttypes.patch @@ -0,0 +1,124 @@ +From d199231d34c9a32a52077a9e502edbd23db4a832 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Mon, 10 Feb 2025 09:36:44 -0500 +Subject: [PATCH] Include `` to fix missing printf format macros + +Signed-off-by: Rui Chen +--- + src/liboggz/metric_internal.c | 2 +- + src/liboggz/oggz_auto.c | 2 +- + src/liboggz/oggz_seek.c | 13 +++++++------ + src/tools/oggz-basetime.c | 1 + + 4 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/src/liboggz/metric_internal.c b/src/liboggz/metric_internal.c +index b4a15d3..e20a59e 100644 +--- a/src/liboggz/metric_internal.c ++++ b/src/liboggz/metric_internal.c +@@ -31,6 +31,7 @@ + */ + + #include "config.h" ++#include + + #include "oggz_private.h" + +@@ -301,4 +302,3 @@ oggz_set_metric_linear (OGGZ * oggz, long serialno, + + return oggz_metric_update (oggz, serialno); + } +- +diff --git a/src/liboggz/oggz_auto.c b/src/liboggz/oggz_auto.c +index ad3652a..6795c06 100644 +--- a/src/liboggz/oggz_auto.c ++++ b/src/liboggz/oggz_auto.c +@@ -37,6 +37,7 @@ + */ + + #include "config.h" ++#include + + #include + #include +@@ -1517,4 +1518,3 @@ oggz_auto_read_comments (OGGZ * oggz, oggz_stream_t * stream, long serialno, + + return 0; + } +- +diff --git a/src/liboggz/oggz_seek.c b/src/liboggz/oggz_seek.c +index 9e12b20..087832f 100644 +--- a/src/liboggz/oggz_seek.c ++++ b/src/liboggz/oggz_seek.c +@@ -37,6 +37,7 @@ + */ + + #include "config.h" ++#include + + #if OGGZ_CONFIG_READ + +@@ -119,7 +120,7 @@ oggz_seek_raw (OGGZ * oggz, oggz_off_t offset, int whence) + ogg_sync_reset (&reader->ogg_sync); + + oggz_vector_foreach(oggz->streams, oggz_seek_reset_stream); +- ++ + return offset_at; + } + +@@ -256,7 +257,7 @@ oggz_get_next_page (OGGZ * oggz, ogg_page * og) + /* didn't need to do any reading -- accumulate the page_offset */ + oggz->offset += page_offset; + } +- ++ + ret = oggz->offset + more; + + return ret; +@@ -443,7 +444,7 @@ oggz_scan_for_page (OGGZ * oggz, ogg_page * og, ogg_int64_t unit_target, + serialno = ogg_page_serialno (og); + granule_at = ogg_page_granulepos (og); + unit_at = oggz_get_unit (oggz, serialno, granule_at); +- ++ + return offset_at; + #endif + } +@@ -523,11 +524,11 @@ guess (ogg_int64_t unit_at, ogg_int64_t unit_target, + printf ("oggz_seek::guess: guess_ratio %" PRId64 " = (%" PRId64 " - %" PRId64 ") / (%" PRId64 " - %" PRId64 ")\n", + guess_ratio, unit_target, unit_begin, unit_at, unit_begin); + #endif +- ++ + offset_guess = offset_begin + + (oggz_off_t)(((offset_end - offset_begin) * guess_ratio) / + GUESS_MULTIPLIER); +- ++ + return offset_guess; + } + +@@ -637,7 +638,7 @@ oggz_bounded_seek_set (OGGZ * oggz, + #endif + return -1; + } +- ++ + if (offset_end == -1 && (offset_end = oggz_offset_end (oggz)) == -1) { + #ifdef DEBUG + printf ("oggz_bounded_seek_set: oggz_offset_end == -1, FAIL\n"); +diff --git a/src/tools/oggz-basetime.c b/src/tools/oggz-basetime.c +index b0696ef..d9f63eb 100644 +--- a/src/tools/oggz-basetime.c ++++ b/src/tools/oggz-basetime.c +@@ -31,6 +31,7 @@ + */ + + #include "config.h" ++#include + + #include + #include +-- +2.48.1 + diff --git a/Patches/libpulsar/asio.patch b/Patches/libpulsar/asio.patch new file mode 100644 index 0000000000000..70aee2a400090 --- /dev/null +++ b/Patches/libpulsar/asio.patch @@ -0,0 +1,1135 @@ +diff --git i/.github/workflows/ci-pr-validation.yaml w/.github/workflows/ci-pr-validation.yaml +index 861b0d9..72c2819 100644 +--- i/.github/workflows/ci-pr-validation.yaml ++++ w/.github/workflows/ci-pr-validation.yaml +@@ -115,6 +115,11 @@ jobs: + - name: Run unit tests + run: RETRY_FAILED=3 ./run-unit-tests.sh + ++ - name: Build with Boost.Asio ++ run: | ++ cmake -B build-boost-asio -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON ++ cmake --build build-boost-asio -j8 ++ + - name: Build perf tools + run: | + cmake . -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON +diff --git i/CMakeLists.txt w/CMakeLists.txt +index b004653..2efeec8 100644 +--- i/CMakeLists.txt ++++ w/CMakeLists.txt +@@ -19,15 +19,16 @@ + + cmake_minimum_required(VERSION 3.13) + +-option(USE_ASIO "Use Asio instead of Boost.Asio" OFF) +- + option(INTEGRATE_VCPKG "Integrate with Vcpkg" OFF) + if (INTEGRATE_VCPKG) +- set(USE_ASIO ON) ++ option(USE_ASIO "Use Asio instead of Boost.Asio" ON) + if (NOT CMAKE_TOOLCHAIN_FILE) + set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake") + endif () ++else () ++ option(USE_ASIO "Use Asio instead of Boost.Asio" OFF) + endif () ++message(STATUS "USE_ASIO: ${USE_ASIO}") + + option(BUILD_TESTS "Build tests" ON) + message(STATUS "BUILD_TESTS: " ${BUILD_TESTS}) +diff --git i/lib/AckGroupingTrackerEnabled.cc w/lib/AckGroupingTrackerEnabled.cc +index 7233b2c..bc8da97 100644 +--- i/lib/AckGroupingTrackerEnabled.cc ++++ w/lib/AckGroupingTrackerEnabled.cc +@@ -117,8 +117,7 @@ void AckGroupingTrackerEnabled::close() { + this->flush(); + std::lock_guard lock(this->mutexTimer_); + if (this->timer_) { +- ASIO_ERROR ec; +- this->timer_->cancel(ec); ++ this->timer_->cancel(); + } + } + +@@ -168,7 +167,7 @@ void AckGroupingTrackerEnabled::scheduleTimer() { + + std::lock_guard lock(this->mutexTimer_); + this->timer_ = this->executor_->createDeadlineTimer(); +- this->timer_->expires_from_now(std::chrono::milliseconds(std::max(1L, this->ackGroupingTimeMs_))); ++ this->timer_->expires_after(std::chrono::milliseconds(std::max(1L, this->ackGroupingTimeMs_))); + auto self = shared_from_this(); + this->timer_->async_wait([this, self](const ASIO_ERROR& ec) -> void { + if (!ec) { +diff --git i/lib/ClientConnection.cc w/lib/ClientConnection.cc +index d036491..6c17d26 100644 +--- i/lib/ClientConnection.cc ++++ w/lib/ClientConnection.cc +@@ -266,7 +266,7 @@ ClientConnection::ClientConnection(const std::string& logicalAddress, const std: + if (!clientConfiguration.isTlsAllowInsecureConnection() && clientConfiguration.isValidateHostName()) { + LOG_DEBUG("Validating hostname for " << serviceUrl.host() << ":" << serviceUrl.port()); + std::string urlHost = isSniProxy_ ? proxyUrl.host() : serviceUrl.host(); +- tlsSocket_->set_verify_callback(ASIO::ssl::rfc2818_verification(urlHost)); ++ tlsSocket_->set_verify_callback(ASIO::ssl::host_name_verification(urlHost)); + } + + LOG_DEBUG("TLS SNI Host: " << serviceUrl.host()); +@@ -309,7 +309,7 @@ void ClientConnection::handlePulsarConnected(const proto::CommandConnected& cmdC + // Only send keep-alive probes if the broker supports it + keepAliveTimer_ = executor_->createDeadlineTimer(); + if (keepAliveTimer_) { +- keepAliveTimer_->expires_from_now(std::chrono::seconds(keepAliveIntervalInSeconds_)); ++ keepAliveTimer_->expires_after(std::chrono::seconds(keepAliveIntervalInSeconds_)); + auto weakSelf = weak_from_this(); + keepAliveTimer_->async_wait([weakSelf](const ASIO_ERROR&) { + auto self = weakSelf.lock(); +@@ -354,7 +354,7 @@ void ClientConnection::startConsumerStatsTimer(std::vector consumerSta + // If the close operation has reset the consumerStatsRequestTimer_ then the use_count will be zero + // Check if we have a timer still before we set the request timer to pop again. + if (consumerStatsRequestTimer_) { +- consumerStatsRequestTimer_->expires_from_now(operationsTimeout_); ++ consumerStatsRequestTimer_->expires_after(operationsTimeout_); + auto weakSelf = weak_from_this(); + consumerStatsRequestTimer_->async_wait([weakSelf, consumerStatsRequests](const ASIO_ERROR& err) { + auto self = weakSelf.lock(); +@@ -388,129 +388,87 @@ typedef ASIO::detail::socket_option::integer tcp_kee + typedef ASIO::detail::socket_option::integer tcp_keep_alive_idle; + #endif + +-/* +- * TCP Connect handler +- * +- * if async_connect without any error, connected_ would be set to true +- * at this point the connection is deemed valid to be used by clients of this class +- */ +-void ClientConnection::handleTcpConnected(const ASIO_ERROR& err, tcp::resolver::iterator endpointIterator) { +- if (!err) { +- std::stringstream cnxStringStream; +- try { +- cnxStringStream << "[" << socket_->local_endpoint() << " -> " << socket_->remote_endpoint() +- << "] "; +- cnxString_ = cnxStringStream.str(); +- } catch (const ASIO_SYSTEM_ERROR& e) { +- LOG_ERROR("Failed to get endpoint: " << e.what()); +- close(ResultRetryable); +- return; +- } +- if (logicalAddress_ == physicalAddress_) { +- LOG_INFO(cnxString_ << "Connected to broker"); +- } else { +- LOG_INFO(cnxString_ << "Connected to broker through proxy. Logical broker: " << logicalAddress_ +- << ", proxy: " << proxyServiceUrl_ +- << ", physical address:" << physicalAddress_); +- } +- +- Lock lock(mutex_); +- if (isClosed()) { +- LOG_INFO(cnxString_ << "Connection already closed"); +- return; +- } +- state_ = TcpConnected; +- lock.unlock(); +- +- ASIO_ERROR error; +- socket_->set_option(tcp::no_delay(true), error); +- if (error) { +- LOG_WARN(cnxString_ << "Socket failed to set tcp::no_delay: " << error.message()); +- } +- +- socket_->set_option(tcp::socket::keep_alive(true), error); +- if (error) { +- LOG_WARN(cnxString_ << "Socket failed to set tcp::socket::keep_alive: " << error.message()); +- } +- +- // Start TCP keep-alive probes after connection has been idle after 1 minute. Ideally this +- // should never happen, given that we're sending our own keep-alive probes (within the TCP +- // connection) every 30 seconds +- socket_->set_option(tcp_keep_alive_idle(1 * 60), error); +- if (error) { +- LOG_DEBUG(cnxString_ << "Socket failed to set tcp_keep_alive_idle: " << error.message()); +- } +- +- // Send up to 10 probes before declaring the connection broken +- socket_->set_option(tcp_keep_alive_count(10), error); +- if (error) { +- LOG_DEBUG(cnxString_ << "Socket failed to set tcp_keep_alive_count: " << error.message()); +- } +- +- // Interval between probes: 6 seconds +- socket_->set_option(tcp_keep_alive_interval(6), error); +- if (error) { +- LOG_DEBUG(cnxString_ << "Socket failed to set tcp_keep_alive_interval: " << error.message()); +- } +- +- if (tlsSocket_) { +- if (!isTlsAllowInsecureConnection_) { +- ASIO_ERROR err; +- Url service_url; +- if (!Url::parse(physicalAddress_, service_url)) { +- LOG_ERROR(cnxString_ << "Invalid Url, unable to parse: " << err << " " << err.message()); +- close(); +- return; +- } +- } +- auto weakSelf = weak_from_this(); +- auto socket = socket_; +- auto tlsSocket = tlsSocket_; +- // socket and ssl::stream objects must exist until async_handshake is done, otherwise segmentation +- // fault might happen +- auto callback = [weakSelf, socket, tlsSocket](const ASIO_ERROR& err) { +- auto self = weakSelf.lock(); +- if (self) { +- self->handleHandshake(err); +- } +- }; +- tlsSocket_->async_handshake(ASIO::ssl::stream::client, +- ASIO::bind_executor(strand_, callback)); +- } else { +- handleHandshake(ASIO_SUCCESS); +- } +- } else if (endpointIterator != tcp::resolver::iterator()) { +- LOG_WARN(cnxString_ << "Failed to establish connection: " << err.message()); +- // The connection failed. Try the next endpoint in the list. +- ASIO_ERROR closeError; +- socket_->close(closeError); // ignore the error of close +- if (closeError) { +- LOG_WARN(cnxString_ << "Failed to close socket: " << err.message()); +- } +- connectTimeoutTask_->stop(); +- ++endpointIterator; +- if (endpointIterator != tcp::resolver::iterator()) { +- LOG_DEBUG(cnxString_ << "Connecting to " << endpointIterator->endpoint() << "..."); +- connectTimeoutTask_->start(); +- tcp::endpoint endpoint = *endpointIterator; +- auto weakSelf = weak_from_this(); +- socket_->async_connect(endpoint, [weakSelf, endpointIterator](const ASIO_ERROR& err) { +- auto self = weakSelf.lock(); +- if (self) { +- self->handleTcpConnected(err, endpointIterator); +- } +- }); +- } else { +- if (err == ASIO::error::operation_aborted) { +- // TCP connect timeout, which is not retryable +- close(); +- } else { +- close(ResultRetryable); +- } +- } +- } else { +- LOG_ERROR(cnxString_ << "Failed to establish connection: " << err.message()); ++void ClientConnection::completeConnect(ASIO::ip::tcp::endpoint endpoint) { ++ std::stringstream cnxStringStream; ++ try { ++ cnxStringStream << "[" << socket_->local_endpoint() << " -> " << socket_->remote_endpoint() << "] "; ++ cnxString_ = cnxStringStream.str(); ++ } catch (const ASIO_SYSTEM_ERROR& e) { ++ LOG_ERROR("Failed to get endpoint: " << e.what()); + close(ResultRetryable); ++ return; ++ } ++ if (logicalAddress_ == physicalAddress_) { ++ LOG_INFO(cnxString_ << "Connected to broker"); ++ } else { ++ LOG_INFO(cnxString_ << "Connected to broker through proxy. Logical broker: " << logicalAddress_ ++ << ", proxy: " << proxyServiceUrl_ << ", physical address:" << physicalAddress_); ++ } ++ ++ Lock lock(mutex_); ++ if (isClosed()) { ++ LOG_INFO(cnxString_ << "Connection already closed"); ++ return; ++ } ++ state_ = TcpConnected; ++ lock.unlock(); ++ ++ ASIO_ERROR error; ++ socket_->set_option(tcp::no_delay(true), error); ++ if (error) { ++ LOG_WARN(cnxString_ << "Socket failed to set tcp::no_delay: " << error.message()); ++ } ++ ++ socket_->set_option(tcp::socket::keep_alive(true), error); ++ if (error) { ++ LOG_WARN(cnxString_ << "Socket failed to set tcp::socket::keep_alive: " << error.message()); ++ } ++ ++ // Start TCP keep-alive probes after connection has been idle after 1 minute. Ideally this ++ // should never happen, given that we're sending our own keep-alive probes (within the TCP ++ // connection) every 30 seconds ++ socket_->set_option(tcp_keep_alive_idle(1 * 60), error); ++ if (error) { ++ LOG_DEBUG(cnxString_ << "Socket failed to set tcp_keep_alive_idle: " << error.message()); ++ } ++ ++ // Send up to 10 probes before declaring the connection broken ++ socket_->set_option(tcp_keep_alive_count(10), error); ++ if (error) { ++ LOG_DEBUG(cnxString_ << "Socket failed to set tcp_keep_alive_count: " << error.message()); ++ } ++ ++ // Interval between probes: 6 seconds ++ socket_->set_option(tcp_keep_alive_interval(6), error); ++ if (error) { ++ LOG_DEBUG(cnxString_ << "Socket failed to set tcp_keep_alive_interval: " << error.message()); ++ } ++ ++ if (tlsSocket_) { ++ if (!isTlsAllowInsecureConnection_) { ++ ASIO_ERROR err; ++ Url service_url; ++ if (!Url::parse(physicalAddress_, service_url)) { ++ LOG_ERROR(cnxString_ << "Invalid Url, unable to parse: " << err << " " << err.message()); ++ close(); ++ return; ++ } ++ } ++ auto weakSelf = weak_from_this(); ++ auto socket = socket_; ++ auto tlsSocket = tlsSocket_; ++ // socket and ssl::stream objects must exist until async_handshake is done, otherwise segmentation ++ // fault might happen ++ auto callback = [weakSelf, socket, tlsSocket](const ASIO_ERROR& err) { ++ auto self = weakSelf.lock(); ++ if (self) { ++ self->handleHandshake(err); ++ } ++ }; ++ tlsSocket_->async_handshake(ASIO::ssl::stream::client, ++ ASIO::bind_executor(strand_, callback)); ++ } else { ++ handleHandshake(ASIO_SUCCESS); + } + } + +@@ -603,60 +561,71 @@ void ClientConnection::tcpConnectAsync() { + } + + LOG_DEBUG(cnxString_ << "Resolving " << service_url.host() << ":" << service_url.port()); +- tcp::resolver::query query(service_url.host(), std::to_string(service_url.port())); ++ tcp::resolver::endpoint_type endpoint(ASIO::ip::make_address(service_url.host()), service_url.port()); + auto weakSelf = weak_from_this(); +- resolver_->async_resolve(query, [weakSelf](const ASIO_ERROR& err, tcp::resolver::iterator iterator) { +- auto self = weakSelf.lock(); +- if (self) { +- self->handleResolve(err, iterator); +- } +- }); ++ resolver_->async_resolve( ++ endpoint, [this, weakSelf](const ASIO_ERROR& err, tcp::resolver::results_type results) { ++ auto self = weakSelf.lock(); ++ if (!self) { ++ return; ++ } ++ if (err) { ++ std::string hostUrl = isSniProxy_ ? cnxString_ : proxyServiceUrl_; ++ LOG_ERROR(hostUrl << "Resolve error: " << err << " : " << err.message()); ++ close(); ++ return; ++ } ++ if (results.empty()) { ++ LOG_ERROR(cnxString_ << "No IP address found"); ++ close(); ++ return; ++ } ++ connectTimeoutTask_->setCallback([weakSelf](const PeriodicTask::ErrorCode& ec) { ++ ClientConnectionPtr ptr = weakSelf.lock(); ++ if (!ptr) { ++ // Connection was already destroyed ++ return; ++ } ++ ++ if (ptr->state_ != Ready) { ++ LOG_ERROR(ptr->cnxString_ << "Connection was not established in " ++ << ptr->connectTimeoutTask_->getPeriodMs() ++ << " ms, close the socket"); ++ PeriodicTask::ErrorCode err; ++ ptr->socket_->close(err); ++ if (err) { ++ LOG_WARN(ptr->cnxString_ << "Failed to close socket: " << err.message()); ++ } ++ } ++ ptr->connectTimeoutTask_->stop(); ++ }); ++ connectTimeoutTask_->start(); ++ std::vector endpoints; ++ for (const auto& result : results) { ++ endpoints.emplace_back(result.endpoint()); ++ } ++ asyncConnect(endpoints, 0); ++ }); + } + +-void ClientConnection::handleResolve(const ASIO_ERROR& err, tcp::resolver::iterator endpointIterator) { +- if (err) { +- std::string hostUrl = isSniProxy_ ? cnxString_ : proxyServiceUrl_; +- LOG_ERROR(hostUrl << "Resolve error: " << err << " : " << err.message()); +- close(); ++void ClientConnection::asyncConnect(const std::vector& endpoints, size_t index) { ++ if (index >= endpoints.size()) { ++ close(ResultRetryable); + return; + } +- + auto weakSelf = weak_from_this(); +- connectTimeoutTask_->setCallback([weakSelf](const PeriodicTask::ErrorCode& ec) { +- ClientConnectionPtr ptr = weakSelf.lock(); +- if (!ptr) { +- // Connection was already destroyed ++ socket_->async_connect(endpoints[index], [this, weakSelf, endpoints, index](const ASIO_ERROR& err) { ++ auto self = weakSelf.lock(); ++ if (!self) { + return; + } +- +- if (ptr->state_ != Ready) { +- LOG_ERROR(ptr->cnxString_ << "Connection was not established in " +- << ptr->connectTimeoutTask_->getPeriodMs() << " ms, close the socket"); +- PeriodicTask::ErrorCode err; +- ptr->socket_->close(err); +- if (err) { +- LOG_WARN(ptr->cnxString_ << "Failed to close socket: " << err.message()); +- } ++ if (err) { ++ LOG_ERROR(cnxString_ << "Failed to establish connection: " << err.message()); ++ asyncConnect(endpoints, index + 1); ++ return; + } +- ptr->connectTimeoutTask_->stop(); ++ completeConnect(endpoints[index]); + }); +- +- LOG_DEBUG(cnxString_ << "Connecting to " << endpointIterator->endpoint() << "..."); +- connectTimeoutTask_->start(); +- if (endpointIterator != tcp::resolver::iterator()) { +- LOG_DEBUG(cnxString_ << "Resolved hostname " << endpointIterator->host_name() // +- << " to " << endpointIterator->endpoint()); +- socket_->async_connect(*endpointIterator, [weakSelf, endpointIterator](const ASIO_ERROR& err) { +- auto self = weakSelf.lock(); +- if (self) { +- self->handleTcpConnected(err, endpointIterator); +- } +- }); +- } else { +- LOG_WARN(cnxString_ << "No IP address found"); +- close(); +- return; +- } + } + + void ClientConnection::readNextCommand() { +@@ -1060,7 +1029,7 @@ void ClientConnection::newLookup(const SharedBuffer& cmd, const uint64_t request + LookupRequestData requestData; + requestData.promise = promise; + requestData.timer = executor_->createDeadlineTimer(); +- requestData.timer->expires_from_now(operationsTimeout_); ++ requestData.timer->expires_after(operationsTimeout_); + auto weakSelf = weak_from_this(); + requestData.timer->async_wait([weakSelf, requestData](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +@@ -1176,8 +1145,9 @@ void ClientConnection::sendPendingCommands() { + PairSharedBuffer buffer = + Commands::newSend(outgoingBuffer_, outgoingCmd, getChecksumType(), *args); + +- // Capture the buffer because asio does not copy the buffer, if the buffer is destroyed before the +- // callback is called, an invalid buffer range might be passed to the underlying socket send. ++ // Capture the buffer because asio does not copy the buffer, if the buffer is destroyed before ++ // the callback is called, an invalid buffer range might be passed to the underlying socket ++ // send. + asyncWrite(buffer, customAllocWriteHandler([this, self, buffer](const ASIO_ERROR& err, size_t) { + handleSendPair(err); + })); +@@ -1200,7 +1170,7 @@ Future ClientConnection::sendRequestWithId(SharedBuffer cm + + PendingRequestData requestData; + requestData.timer = executor_->createDeadlineTimer(); +- requestData.timer->expires_from_now(operationsTimeout_); ++ requestData.timer->expires_after(operationsTimeout_); + auto weakSelf = weak_from_this(); + requestData.timer->async_wait([weakSelf, requestData](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +@@ -1253,7 +1223,7 @@ void ClientConnection::handleKeepAliveTimeout() { + // be zero And we do not attempt to dereference the pointer. + Lock lock(mutex_); + if (keepAliveTimer_) { +- keepAliveTimer_->expires_from_now(std::chrono::seconds(keepAliveIntervalInSeconds_)); ++ keepAliveTimer_->expires_after(std::chrono::seconds(keepAliveIntervalInSeconds_)); + auto weakSelf = weak_from_this(); + keepAliveTimer_->async_wait([weakSelf](const ASIO_ERROR&) { + auto self = weakSelf.lock(); +@@ -1432,7 +1402,7 @@ Future ClientConnection::newGetLastMessageId(u + LastMessageIdRequestData requestData; + requestData.promise = promise; + requestData.timer = executor_->createDeadlineTimer(); +- requestData.timer->expires_from_now(operationsTimeout_); ++ requestData.timer->expires_after(operationsTimeout_); + auto weakSelf = weak_from_this(); + requestData.timer->async_wait([weakSelf, requestData](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +@@ -1480,7 +1450,7 @@ Future ClientConnection::newGetSchema(const std::string& top + lock.unlock(); + + auto weakSelf = weak_from_this(); +- timer->expires_from_now(operationsTimeout_); ++ timer->expires_after(operationsTimeout_); + timer->async_wait([this, weakSelf, requestId](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); + if (!self) { +@@ -2049,8 +2019,7 @@ void ClientConnection::unsafeRemovePendingRequest(long requestId) { + auto it = pendingRequests_.find(requestId); + if (it != pendingRequests_.end()) { + it->second.promise.setFailed(ResultDisconnected); +- ASIO_ERROR ec; +- it->second.timer->cancel(ec); ++ it->second.timer->cancel(); + pendingRequests_.erase(it); + } + } +diff --git i/lib/ClientConnection.h w/lib/ClientConnection.h +index 7646f85..14e0765 100644 +--- i/lib/ClientConnection.h ++++ w/lib/ClientConnection.h +@@ -25,13 +25,13 @@ + #include + #ifdef USE_ASIO + #include +-#include ++#include + #include + #include + #include + #else + #include +-#include ++#include + #include + #include + #include +@@ -231,13 +231,8 @@ class PULSAR_PUBLIC ClientConnection : public std::enable_shared_from_this& endpoints, size_t index); ++ void completeConnect(ASIO::ip::tcp::endpoint endpoint); + + void handleHandshake(const ASIO_ERROR& err); + +@@ -260,8 +255,6 @@ class PULSAR_PUBLIC ClientConnection : public std::enable_shared_from_this strand_; ++ ASIO::strand strand_; + + const std::string logicalAddress_; + /* +diff --git i/lib/ConsumerImpl.cc w/lib/ConsumerImpl.cc +index 595183e..15470b6 100644 +--- i/lib/ConsumerImpl.cc ++++ w/lib/ConsumerImpl.cc +@@ -422,7 +422,7 @@ void ConsumerImpl::discardChunkMessages(std::string uuid, MessageId messageId, b + } + + void ConsumerImpl::triggerCheckExpiredChunkedTimer() { +- checkExpiredChunkedTimer_->expires_from_now(milliseconds(expireTimeOfIncompleteChunkedMessageMs_)); ++ checkExpiredChunkedTimer_->expires_after(milliseconds(expireTimeOfIncompleteChunkedMessageMs_)); + std::weak_ptr weakSelf{shared_from_this()}; + checkExpiredChunkedTimer_->async_wait([this, weakSelf](const ASIO_ERROR& ec) -> void { + auto self = weakSelf.lock(); +@@ -1672,7 +1672,7 @@ void ConsumerImpl::internalGetLastMessageIdAsync(const BackoffPtr& backoff, Time + } + remainTime -= next; + +- timer->expires_from_now(next); ++ timer->expires_after(next); + + auto self = shared_from_this(); + timer->async_wait([this, backoff, remainTime, timer, next, callback, +@@ -1796,9 +1796,8 @@ std::shared_ptr ConsumerImpl::get_shared_this_ptr() { + } + + void ConsumerImpl::cancelTimers() noexcept { +- ASIO_ERROR ec; +- batchReceiveTimer_->cancel(ec); +- checkExpiredChunkedTimer_->cancel(ec); ++ batchReceiveTimer_->cancel(); ++ checkExpiredChunkedTimer_->cancel(); + unAckedMessageTrackerPtr_->stop(); + consumerStatsBasePtr_->stop(); + } +diff --git i/lib/ConsumerImplBase.cc w/lib/ConsumerImplBase.cc +index 098f2d5..76d9937 100644 +--- i/lib/ConsumerImplBase.cc ++++ w/lib/ConsumerImplBase.cc +@@ -51,7 +51,7 @@ ConsumerImplBase::ConsumerImplBase(ClientImplPtr client, const std::string& topi + + void ConsumerImplBase::triggerBatchReceiveTimerTask(long timeoutMs) { + if (timeoutMs > 0) { +- batchReceiveTimer_->expires_from_now(std::chrono::milliseconds(timeoutMs)); ++ batchReceiveTimer_->expires_after(std::chrono::milliseconds(timeoutMs)); + std::weak_ptr weakSelf{shared_from_this()}; + batchReceiveTimer_->async_wait([weakSelf](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +diff --git i/lib/ExecutorService.cc w/lib/ExecutorService.cc +index 794e361..7f2a2c1 100644 +--- i/lib/ExecutorService.cc ++++ w/lib/ExecutorService.cc +@@ -18,6 +18,12 @@ + */ + #include "ExecutorService.h" + ++#ifdef USE_ASIO ++#include ++#else ++#include ++#endif ++ + #include "LogUtils.h" + #include "TimeUtils.h" + DECLARE_LOG_OBJECT() +@@ -31,18 +37,13 @@ ExecutorService::~ExecutorService() { close(0); } + void ExecutorService::start() { + auto self = shared_from_this(); + std::thread t{[this, self] { +- LOG_DEBUG("Run io_service in a single thread"); +- ASIO_ERROR ec; ++ LOG_DEBUG("Run io_context in a single thread"); + while (!closed_) { +- io_service_.restart(); +- IOService::work work{getIOService()}; +- io_service_.run(ec); +- } +- if (ec) { +- LOG_ERROR("Failed to run io_service: " << ec.message()); +- } else { +- LOG_DEBUG("Event loop of ExecutorService exits successfully"); ++ io_context_.restart(); ++ auto work{ASIO::make_work_guard(io_context_)}; ++ io_context_.run(); + } ++ LOG_DEBUG("Event loop of ExecutorService exits successfully"); + { + std::lock_guard lock{mutex_}; + ioServiceDone_ = true; +@@ -63,12 +64,12 @@ ExecutorServicePtr ExecutorService::create() { + } + + /* +- * factory method of ASIO::ip::tcp::socket associated with io_service_ instance ++ * factory method of ASIO::ip::tcp::socket associated with io_context_ instance + * @ returns shared_ptr to this socket + */ + SocketPtr ExecutorService::createSocket() { + try { +- return SocketPtr(new ASIO::ip::tcp::socket(io_service_)); ++ return SocketPtr(new ASIO::ip::tcp::socket(io_context_)); + } catch (const ASIO_SYSTEM_ERROR &e) { + restart(); + auto error = std::string("Failed to create socket: ") + e.what(); +@@ -82,12 +83,12 @@ TlsSocketPtr ExecutorService::createTlsSocket(SocketPtr &socket, ASIO::ssl::cont + } + + /* +- * factory method of Resolver object associated with io_service_ instance ++ * factory method of Resolver object associated with io_context_ instance + * @returns shraed_ptr to resolver object + */ + TcpResolverPtr ExecutorService::createTcpResolver() { + try { +- return TcpResolverPtr(new ASIO::ip::tcp::resolver(io_service_)); ++ return TcpResolverPtr(new ASIO::ip::tcp::resolver(io_context_)); + } catch (const ASIO_SYSTEM_ERROR &e) { + restart(); + auto error = std::string("Failed to create resolver: ") + e.what(); +@@ -97,7 +98,7 @@ TcpResolverPtr ExecutorService::createTcpResolver() { + + DeadlineTimerPtr ExecutorService::createDeadlineTimer() { + try { +- return DeadlineTimerPtr(new ASIO::steady_timer(io_service_)); ++ return DeadlineTimerPtr(new ASIO::steady_timer(io_context_)); + } catch (const ASIO_SYSTEM_ERROR &e) { + restart(); + auto error = std::string("Failed to create steady_timer: ") + e.what(); +@@ -105,7 +106,7 @@ DeadlineTimerPtr ExecutorService::createDeadlineTimer() { + } + } + +-void ExecutorService::restart() { io_service_.stop(); } ++void ExecutorService::restart() { io_context_.stop(); } + + void ExecutorService::close(long timeoutMs) { + bool expectedState = false; +@@ -113,12 +114,12 @@ void ExecutorService::close(long timeoutMs) { + return; + } + if (timeoutMs == 0) { // non-blocking +- io_service_.stop(); ++ io_context_.stop(); + return; + } + + std::unique_lock lock{mutex_}; +- io_service_.stop(); ++ io_context_.stop(); + if (timeoutMs > 0) { + cond_.wait_for(lock, std::chrono::milliseconds(timeoutMs), [this] { return ioServiceDone_; }); + } else { // < 0 +@@ -126,7 +127,7 @@ void ExecutorService::close(long timeoutMs) { + } + } + +-void ExecutorService::postWork(std::function task) { io_service_.post(task); } ++void ExecutorService::postWork(std::function task) { ASIO::post(io_context_, task); } + + ///////////////////// + +diff --git i/lib/ExecutorService.h w/lib/ExecutorService.h +index 89d06d3..626cb20 100644 +--- i/lib/ExecutorService.h ++++ w/lib/ExecutorService.h +@@ -23,11 +23,11 @@ + + #include + #ifdef USE_ASIO +-#include ++#include + #include + #include + #else +-#include ++#include + #include + #include + #endif +@@ -46,7 +46,7 @@ typedef std::shared_ptr > TlsSocketPt + typedef std::shared_ptr TcpResolverPtr; + class PULSAR_PUBLIC ExecutorService : public std::enable_shared_from_this { + public: +- using IOService = ASIO::io_service; ++ using IOService = ASIO::io_context; + using SharedPtr = std::shared_ptr; + + static SharedPtr create(); +@@ -67,14 +67,14 @@ class PULSAR_PUBLIC ExecutorService : public std::enable_shared_from_thiscancel(ignored); +- creationTimer_->cancel(ignored); ++ timer_->cancel(); ++ creationTimer_->cancel(); + } + + void HandlerBase::start() { +@@ -61,15 +60,14 @@ void HandlerBase::start() { + if (state_.compare_exchange_strong(state, Pending)) { + grabCnx(); + } +- creationTimer_->expires_from_now(operationTimeut_); ++ creationTimer_->expires_after(operationTimeut_); + std::weak_ptr weakSelf{shared_from_this()}; + creationTimer_->async_wait([this, weakSelf](const ASIO_ERROR& error) { + auto self = weakSelf.lock(); + if (self && !error) { + LOG_WARN("Cancel the pending reconnection due to the start timeout"); + connectionFailed(ResultTimeout); +- ASIO_ERROR ignored; +- timer_->cancel(ignored); ++ timer_->cancel(); + } + }); + } +@@ -133,8 +131,7 @@ void HandlerBase::grabCnx(const boost::optional& assignedBrokerUrl) + connectionTimeMs_ = + duration_cast(high_resolution_clock::now() - before).count(); + // Prevent the creationTimer_ from cancelling the timer_ in future +- ASIO_ERROR ignored; +- creationTimer_->cancel(ignored); ++ creationTimer_->cancel(); + LOG_INFO("Finished connecting to broker after " << connectionTimeMs_ << " ms") + } else if (isResultRetryable(result)) { + scheduleReconnection(); +@@ -188,7 +185,7 @@ void HandlerBase::scheduleReconnection(const boost::optional& assig + TimeDuration delay = assignedBrokerUrl ? std::chrono::milliseconds(0) : backoff_.next(); + + LOG_INFO(getName() << "Schedule reconnection in " << (toMillis(delay) / 1000.0) << " s"); +- timer_->expires_from_now(delay); ++ timer_->expires_after(delay); + // passing shared_ptr here since time_ will get destroyed, so tasks will be cancelled + // so we will not run into the case where grabCnx is invoked on out of scope handler + auto name = getName(); +diff --git i/lib/MultiTopicsConsumerImpl.cc w/lib/MultiTopicsConsumerImpl.cc +index ff793fb..8fa060b 100644 +--- i/lib/MultiTopicsConsumerImpl.cc ++++ w/lib/MultiTopicsConsumerImpl.cc +@@ -968,7 +968,7 @@ uint64_t MultiTopicsConsumerImpl::getNumberOfConnectedConsumer() { + return numberOfConnectedConsumer; + } + void MultiTopicsConsumerImpl::runPartitionUpdateTask() { +- partitionsUpdateTimer_->expires_from_now(partitionsUpdateInterval_); ++ partitionsUpdateTimer_->expires_after(partitionsUpdateInterval_); + auto weakSelf = weak_from_this(); + partitionsUpdateTimer_->async_wait([weakSelf](const ASIO_ERROR& ec) { + // If two requests call runPartitionUpdateTask at the same time, the timer will fail, and it +@@ -1121,8 +1121,7 @@ void MultiTopicsConsumerImpl::beforeConnectionChange(ClientConnection& cnx) { + + void MultiTopicsConsumerImpl::cancelTimers() noexcept { + if (partitionsUpdateTimer_) { +- ASIO_ERROR ec; +- partitionsUpdateTimer_->cancel(ec); ++ partitionsUpdateTimer_->cancel(); + } + } + +diff --git i/lib/NegativeAcksTracker.cc w/lib/NegativeAcksTracker.cc +index e443496..e50b4ca 100644 +--- i/lib/NegativeAcksTracker.cc ++++ w/lib/NegativeAcksTracker.cc +@@ -50,7 +50,7 @@ void NegativeAcksTracker::scheduleTimer() { + return; + } + std::weak_ptr weakSelf{shared_from_this()}; +- timer_->expires_from_now(timerInterval_); ++ timer_->expires_after(timerInterval_); + timer_->async_wait([weakSelf](const ASIO_ERROR &ec) { + if (auto self = weakSelf.lock()) { + self->handleTimer(ec); +@@ -107,8 +107,7 @@ void NegativeAcksTracker::add(const MessageId &m) { + + void NegativeAcksTracker::close() { + closed_ = true; +- ASIO_ERROR ec; +- timer_->cancel(ec); ++ timer_->cancel(); + std::lock_guard lock(mutex_); + nackedMessages_.clear(); + } +diff --git i/lib/PartitionedProducerImpl.cc w/lib/PartitionedProducerImpl.cc +index 4178096..923c038 100644 +--- i/lib/PartitionedProducerImpl.cc ++++ w/lib/PartitionedProducerImpl.cc +@@ -421,7 +421,7 @@ void PartitionedProducerImpl::flushAsync(FlushCallback callback) { + + void PartitionedProducerImpl::runPartitionUpdateTask() { + auto weakSelf = weak_from_this(); +- partitionsUpdateTimer_->expires_from_now(partitionsUpdateInterval_); ++ partitionsUpdateTimer_->expires_after(partitionsUpdateInterval_); + partitionsUpdateTimer_->async_wait([weakSelf](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); + if (self) { +@@ -524,8 +524,7 @@ uint64_t PartitionedProducerImpl::getNumberOfConnectedProducer() { + + void PartitionedProducerImpl::cancelTimers() noexcept { + if (partitionsUpdateTimer_) { +- ASIO_ERROR ec; +- partitionsUpdateTimer_->cancel(ec); ++ partitionsUpdateTimer_->cancel(); + } + } + +diff --git i/lib/PatternMultiTopicsConsumerImpl.cc w/lib/PatternMultiTopicsConsumerImpl.cc +index 73aa874..4b8a13f 100644 +--- i/lib/PatternMultiTopicsConsumerImpl.cc ++++ w/lib/PatternMultiTopicsConsumerImpl.cc +@@ -48,7 +48,7 @@ const PULSAR_REGEX_NAMESPACE::regex PatternMultiTopicsConsumerImpl::getPattern() + + void PatternMultiTopicsConsumerImpl::resetAutoDiscoveryTimer() { + autoDiscoveryRunning_ = false; +- autoDiscoveryTimer_->expires_from_now(seconds(conf_.getPatternAutoDiscoveryPeriod())); ++ autoDiscoveryTimer_->expires_after(seconds(conf_.getPatternAutoDiscoveryPeriod())); + + auto weakSelf = weak_from_this(); + autoDiscoveryTimer_->async_wait([weakSelf](const ASIO_ERROR& err) { +@@ -231,7 +231,7 @@ void PatternMultiTopicsConsumerImpl::start() { + LOG_DEBUG("PatternMultiTopicsConsumerImpl start autoDiscoveryTimer_."); + + if (conf_.getPatternAutoDiscoveryPeriod() > 0) { +- autoDiscoveryTimer_->expires_from_now(seconds(conf_.getPatternAutoDiscoveryPeriod())); ++ autoDiscoveryTimer_->expires_after(seconds(conf_.getPatternAutoDiscoveryPeriod())); + auto weakSelf = weak_from_this(); + autoDiscoveryTimer_->async_wait([weakSelf](const ASIO_ERROR& err) { + if (auto self = weakSelf.lock()) { +@@ -251,7 +251,4 @@ void PatternMultiTopicsConsumerImpl::closeAsync(ResultCallback callback) { + MultiTopicsConsumerImpl::closeAsync(callback); + } + +-void PatternMultiTopicsConsumerImpl::cancelTimers() noexcept { +- ASIO_ERROR ec; +- autoDiscoveryTimer_->cancel(ec); +-} ++void PatternMultiTopicsConsumerImpl::cancelTimers() noexcept { autoDiscoveryTimer_->cancel(); } +diff --git i/lib/PeriodicTask.cc w/lib/PeriodicTask.cc +index 9fde012..4b5f962 100644 +--- i/lib/PeriodicTask.cc ++++ w/lib/PeriodicTask.cc +@@ -29,7 +29,7 @@ void PeriodicTask::start() { + state_ = Ready; + if (periodMs_ >= 0) { + std::weak_ptr weakSelf{shared_from_this()}; +- timer_->expires_from_now(std::chrono::milliseconds(periodMs_)); ++ timer_->expires_after(std::chrono::milliseconds(periodMs_)); + timer_->async_wait([weakSelf](const ErrorCode& ec) { + auto self = weakSelf.lock(); + if (self) { +@@ -44,8 +44,7 @@ void PeriodicTask::stop() noexcept { + if (!state_.compare_exchange_strong(state, Closing)) { + return; + } +- ErrorCode ec; +- timer_->cancel(ec); ++ timer_->cancel(); + state_ = Pending; + } + +@@ -59,7 +58,7 @@ void PeriodicTask::handleTimeout(const ErrorCode& ec) { + // state_ may be changed in handleTimeout, so we check state_ again + if (state_ == Ready) { + auto self = shared_from_this(); +- timer_->expires_from_now(std::chrono::milliseconds(periodMs_)); ++ timer_->expires_after(std::chrono::milliseconds(periodMs_)); + timer_->async_wait([this, self](const ErrorCode& ec) { handleTimeout(ec); }); + } + } +diff --git i/lib/ProducerImpl.cc w/lib/ProducerImpl.cc +index 4399ce5..8b112bf 100644 +--- i/lib/ProducerImpl.cc ++++ w/lib/ProducerImpl.cc +@@ -570,7 +570,7 @@ void ProducerImpl::sendAsyncWithStatsUpdate(const Message& msg, SendCallback&& c + bool isFirstMessage = batchMessageContainer_->isFirstMessageToAdd(msg); + bool isFull = batchMessageContainer_->add(msg, callback); + if (isFirstMessage) { +- batchTimer_->expires_from_now(milliseconds(conf_.getBatchingMaxPublishDelayMs())); ++ batchTimer_->expires_after(milliseconds(conf_.getBatchingMaxPublishDelayMs())); + auto weakSelf = weak_from_this(); + batchTimer_->async_wait([this, weakSelf](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +@@ -1007,9 +1007,8 @@ void ProducerImpl::shutdown() { + + void ProducerImpl::cancelTimers() noexcept { + dataKeyRefreshTask_.stop(); +- ASIO_ERROR ec; +- batchTimer_->cancel(ec); +- sendTimer_->cancel(ec); ++ batchTimer_->cancel(); ++ sendTimer_->cancel(); + } + + bool ProducerImplCmp::operator()(const ProducerImplPtr& a, const ProducerImplPtr& b) const { +@@ -1030,7 +1029,7 @@ void ProducerImpl::startSendTimeoutTimer() { + } + + void ProducerImpl::asyncWaitSendTimeout(DurationType expiryTime) { +- sendTimer_->expires_from_now(expiryTime); ++ sendTimer_->expires_after(expiryTime); + + auto weakSelf = weak_from_this(); + sendTimer_->async_wait([weakSelf](const ASIO_ERROR& err) { +diff --git i/lib/RetryableOperation.h w/lib/RetryableOperation.h +index dba190f..8a235d3 100644 +--- i/lib/RetryableOperation.h ++++ w/lib/RetryableOperation.h +@@ -26,8 +26,8 @@ + #include + #include + ++#include "AsioTimer.h" + #include "Backoff.h" +-#include "ExecutorService.h" + #include "Future.h" + #include "LogUtils.h" + #include "ResultUtils.h" +@@ -68,8 +68,7 @@ class RetryableOperation : public std::enable_shared_from_thiscancel(ec); ++ timer_->cancel(); + } + + private: +@@ -107,7 +106,7 @@ class RetryableOperation : public std::enable_shared_from_thisexpires_from_now(delay); ++ timer_->expires_after(delay); + + auto nextRemainingTime = remainingTime - delay; + LOG_INFO("Reschedule " << name_ << " for " << toMillis(delay) +diff --git i/lib/RetryableOperationCache.h w/lib/RetryableOperationCache.h +index e42460d..5030c94 100644 +--- i/lib/RetryableOperationCache.h ++++ w/lib/RetryableOperationCache.h +@@ -18,7 +18,6 @@ + */ + #pragma once + +-#include + #include + #include + +diff --git i/lib/SharedBuffer.h w/lib/SharedBuffer.h +index 26fc59e..a6ced18 100644 +--- i/lib/SharedBuffer.h ++++ w/lib/SharedBuffer.h +@@ -151,11 +151,11 @@ class SharedBuffer { + + inline bool writable() const { return writableBytes() > 0; } + +- ASIO::const_buffers_1 const_asio_buffer() const { +- return ASIO::const_buffers_1(ptr_ + readIdx_, readableBytes()); ++ ASIO::const_buffer const_asio_buffer() const { ++ return ASIO::const_buffer(ptr_ + readIdx_, readableBytes()); + } + +- ASIO::mutable_buffers_1 asio_buffer() { ++ ASIO::mutable_buffer asio_buffer() { + assert(data_); + return ASIO::buffer(ptr_ + writeIdx_, writableBytes()); + } +diff --git i/lib/UnAckedMessageTrackerEnabled.cc w/lib/UnAckedMessageTrackerEnabled.cc +index e371af9..3b959d8 100644 +--- i/lib/UnAckedMessageTrackerEnabled.cc ++++ w/lib/UnAckedMessageTrackerEnabled.cc +@@ -34,7 +34,7 @@ void UnAckedMessageTrackerEnabled::timeoutHandler() { + timeoutHandlerHelper(); + ExecutorServicePtr executorService = client_->getIOExecutorProvider()->get(); + timer_ = executorService->createDeadlineTimer(); +- timer_->expires_from_now(std::chrono::milliseconds(tickDurationInMs_)); ++ timer_->expires_after(std::chrono::milliseconds(tickDurationInMs_)); + std::weak_ptr weakSelf{shared_from_this()}; + timer_->async_wait([weakSelf](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +@@ -173,9 +173,8 @@ void UnAckedMessageTrackerEnabled::clear() { + } + + void UnAckedMessageTrackerEnabled::stop() { +- ASIO_ERROR ec; + if (timer_) { +- timer_->cancel(ec); ++ timer_->cancel(); + } + } + } /* namespace pulsar */ +diff --git i/lib/stats/ConsumerStatsImpl.cc w/lib/stats/ConsumerStatsImpl.cc +index 0eefabd..e8bd919 100644 +--- i/lib/stats/ConsumerStatsImpl.cc ++++ w/lib/stats/ConsumerStatsImpl.cc +@@ -85,7 +85,7 @@ void ConsumerStatsImpl::messageAcknowledged(Result res, CommandAck_AckType ackTy + } + + void ConsumerStatsImpl::scheduleTimer() { +- timer_->expires_from_now(std::chrono::seconds(statsIntervalInSeconds_)); ++ timer_->expires_after(std::chrono::seconds(statsIntervalInSeconds_)); + std::weak_ptr weakSelf{shared_from_this()}; + timer_->async_wait([this, weakSelf](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +diff --git i/lib/stats/ConsumerStatsImpl.h w/lib/stats/ConsumerStatsImpl.h +index 3333ea8..35fda9b 100644 +--- i/lib/stats/ConsumerStatsImpl.h ++++ w/lib/stats/ConsumerStatsImpl.h +@@ -59,10 +59,7 @@ class ConsumerStatsImpl : public std::enable_shared_from_this + ConsumerStatsImpl(const ConsumerStatsImpl& stats); + void flushAndReset(const ASIO_ERROR&); + void start() override; +- void stop() override { +- ASIO_ERROR error; +- timer_->cancel(error); +- } ++ void stop() override { timer_->cancel(); } + void receivedMessage(Message&, Result) override; + void messageAcknowledged(Result, CommandAck_AckType, uint32_t ackNums) override; + virtual ~ConsumerStatsImpl(); +diff --git i/lib/stats/ProducerStatsImpl.cc w/lib/stats/ProducerStatsImpl.cc +index 15e9e67..b5e0079 100644 +--- i/lib/stats/ProducerStatsImpl.cc ++++ w/lib/stats/ProducerStatsImpl.cc +@@ -109,7 +109,7 @@ void ProducerStatsImpl::messageReceived(Result res, const ptime& publishTime) { + ProducerStatsImpl::~ProducerStatsImpl() { timer_->cancel(); } + + void ProducerStatsImpl::scheduleTimer() { +- timer_->expires_from_now(std::chrono::seconds(statsIntervalInSeconds_)); ++ timer_->expires_after(std::chrono::seconds(statsIntervalInSeconds_)); + std::weak_ptr weakSelf{shared_from_this()}; + timer_->async_wait([this, weakSelf](const ASIO_ERROR& ec) { + auto self = weakSelf.lock(); +diff --git i/tests/AuthPluginTest.cc w/tests/AuthPluginTest.cc +index 24549d7..ed0511e 100644 +--- i/tests/AuthPluginTest.cc ++++ w/tests/AuthPluginTest.cc +@@ -309,16 +309,17 @@ namespace testAthenz { + std::string principalToken; + void mockZTS(Latch& latch, int port) { + LOG_INFO("-- MockZTS started"); +- ASIO::io_service io; +- ASIO::ip::tcp::iostream stream; ++ ASIO::io_context io; ++ ASIO::ip::tcp::socket socket(io); + ASIO::ip::tcp::acceptor acceptor(io, ASIO::ip::tcp::endpoint(ASIO::ip::tcp::v4(), port)); + + LOG_INFO("-- MockZTS waiting for connnection"); + latch.countdown(); +- acceptor.accept(*stream.rdbuf()); ++ acceptor.accept(socket); + LOG_INFO("-- MockZTS got connection"); + + std::string headerLine; ++ ASIO::ip::tcp::iostream stream(std::move(socket)); + while (getline(stream, headerLine)) { + std::vector kv; + boost::algorithm::split(kv, headerLine, boost::is_any_of(" ")); +diff --git i/tests/ConsumerTest.h w/tests/ConsumerTest.h +index 8248287..9d190c1 100644 +--- i/tests/ConsumerTest.h ++++ w/tests/ConsumerTest.h +@@ -46,8 +46,8 @@ class ConsumerTest { + return nullptr; + } + auto timer = cnx->executor_->createDeadlineTimer(); +- timer->expires_from_now(delaySinceStartGrabCnx - +- std::chrono::milliseconds(impl->connectionTimeMs_ + 50)); ++ timer->expires_after(delaySinceStartGrabCnx - ++ std::chrono::milliseconds(impl->connectionTimeMs_ + 50)); + timer->async_wait([cnx](const ASIO_ERROR&) { cnx->close(); }); + return timer; + } diff --git a/Patches/libsoxr/arm64_defines.patch b/Patches/libsoxr/arm64_defines.patch new file mode 100644 index 0000000000000..6ea2f1aa0ea2f --- /dev/null +++ b/Patches/libsoxr/arm64_defines.patch @@ -0,0 +1,79 @@ +From 4e882dfb9d977bd42c66b95985e5d898849d46c2 Mon Sep 17 00:00:00 2001 +From: Misty De Meo +Date: Tue, 15 Sep 2020 16:57:26 -0700 +Subject: [PATCH] Check for __arm64__, not just __arm__ + +On at least one 64-bit ARM processor I've tested (Apple Silicon on macOS), +__arm__ isn't defined but __arm64__ is. As a result, some of the +ARM-specific macros are missing and calls to them fail. +--- + src/cr-core.c | 2 +- + src/dev32s.h | 2 +- + src/pffft-wrap.c | 2 +- + src/pffft.c | 4 ++-- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/cr-core.c b/src/cr-core.c +index 159a5d9..fe5ea8a 100644 +--- a/src/cr-core.c ++++ b/src/cr-core.c +@@ -80,7 +80,7 @@ static void cubic_stage_fn(stage_t * p, fifo_t * output_fifo) + #define DEFINED_X86 0 + #endif + +-#if defined __arm__ ++#if defined(__arm__) || defined(__arm64__) + #define DEFINED_ARM 1 + #else + #define DEFINED_ARM 0 +diff --git a/src/dev32s.h b/src/dev32s.h +index 7edae86..a14d7ad 100644 +--- a/src/dev32s.h ++++ b/src/dev32s.h +@@ -31,7 +31,7 @@ SIMD_INLINE(void) vStorSum(float * a, v4_t b) { + v4_t t = vAdd(_mm_movehl_ps(b, b), b); + _mm_store_ss(a, vAdd(t, _mm_shuffle_ps(t,t,1)));} + +-#elif defined __arm__ ++#elif defined(__arm__) || defined(__arm64__) + + #include + +diff --git a/src/pffft-wrap.c b/src/pffft-wrap.c +index c920f06..1641fc4 100644 +--- a/src/pffft-wrap.c ++++ b/src/pffft-wrap.c +@@ -40,7 +40,7 @@ static void pffft_zconvolve(PFFFT_Setup *s, const float *a, const float *b, floa + + float ar, ai, br, bi; + +-#ifdef __arm__ ++#if defined(__arm__) || defined(__arm64__) + __builtin_prefetch(va); + __builtin_prefetch(vb); + __builtin_prefetch(va+2); +diff --git a/src/pffft.c b/src/pffft.c +index 46c841e..8c775a9 100644 +--- a/src/pffft.c ++++ b/src/pffft.c +@@ -157,7 +157,7 @@ typedef __m128 v4sf; + /* + ARM NEON support macros + */ +-#elif !defined(PFFFT_SIMD_DISABLE) && defined(__arm__) ++#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(__arm64__)) + # include + typedef float32x4_t v4sf; + # define SIMD_SZ 4 +@@ -1732,7 +1732,7 @@ void pffft_zconvolve_accumulate(PFFFT_Setup *s, const float *a, const float *b, + const v4sf * RESTRICT vb = (const v4sf*)b; + v4sf * RESTRICT vab = (v4sf*)ab; + +-#ifdef __arm__ ++#if defined(__arm__) || defined(__arm64__) + __builtin_prefetch(va); + __builtin_prefetch(vb); + __builtin_prefetch(vab); +-- +2.28.0 + diff --git a/Patches/libtool/configure-big_sur.diff b/Patches/libtool/configure-big_sur.diff new file mode 100644 index 0000000000000..aba05df4d8ac6 --- /dev/null +++ b/Patches/libtool/configure-big_sur.diff @@ -0,0 +1,23 @@ +--- a/configure.orig 2021-10-01 08:15:08.000000000 -0700 ++++ b/configure 2021-10-20 12:44:47.000000000 -0700 +@@ -8733,16 +8733,11 @@ + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; +- 10.[012][,.]*) ++ darwin*) ++ case ${MACOSX_DEPLOYMENT_TARGET},$host in ++ 10.[012],*|,*powerpc*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; +- 10.*) ++ *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; diff --git a/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff b/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff new file mode 100644 index 0000000000000..31c1f3728b739 --- /dev/null +++ b/Patches/libtool/configure-pre-0.4.2.418-big_sur.diff @@ -0,0 +1,23 @@ +--- a/configure.orig 2021-09-26 09:39:54.000000000 -0700 ++++ b/configure 2021-09-26 09:40:56.000000000 -0700 +@@ -8427,16 +8427,11 @@ + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- 10.[012]*) ++ darwin*) ++ case ${MACOSX_DEPLOYMENT_TARGET},$host in ++ 10.[012],*|,*powerpc*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) ++ *) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; diff --git a/Patches/linkerd/stable-2.14.10.patch b/Patches/linkerd/stable-2.14.10.patch new file mode 100644 index 0000000000000..b1d4fb3bc2b56 --- /dev/null +++ b/Patches/linkerd/stable-2.14.10.patch @@ -0,0 +1,249 @@ +diff --git a/go.mod b/go.mod +index 1191d29c3..64b14e468 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,6 +1,6 @@ + module github.com/linkerd/linkerd2 + +-go 1.19 ++go 1.22 + + require ( + contrib.go.opencensus.io/exporter/ocagent v0.7.0 +diff --git a/go.sum b/go.sum +index b5fbd984b..9305838cb 100644 +--- a/go.sum ++++ b/go.sum +@@ -39,12 +39,16 @@ github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr + github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= + github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= + github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= ++github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= + github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= ++github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= + github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= ++github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= + github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= + github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= + github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= + github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= ++github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= + github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= + github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= + github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +@@ -54,9 +58,13 @@ github.com/bombsimon/logrusr/v4 v4.1.0/go.mod h1:pjfHC5e59CvjTBIU3V3sGhFWFAnsnhO + github.com/briandowns/spinner v0.0.0-20190212173954-5cf08d0ac778 h1:Dmz6bJXocvwkw7BOz4jpyVZReGrkjs+fBDWKn5tBES4= + github.com/briandowns/spinner v0.0.0-20190212173954-5cf08d0ac778/go.mod h1:hw/JEQBIE+c/BLI4aKM8UU8v+ZqrD3h7HC27kKt8JQU= + github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= ++github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= + github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= ++github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= + github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= ++github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= + github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= ++github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= + github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= + github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= + github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +@@ -70,6 +78,7 @@ github.com/clarketm/json v1.15.7/go.mod h1:ynr2LRfb0fQU34l07csRNBTcivjySLLiY1YzQ + github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= + github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= + github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= ++github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= + github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns= + github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= + github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= +@@ -79,12 +88,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0q + github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= + github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= + github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= ++github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= + github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= + github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= + github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= + github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= + github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= + github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= ++github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= + github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= + github.com/docker/cli v24.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= + github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +@@ -96,11 +107,13 @@ github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNk + github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= + github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= + github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= ++github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= + github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= + github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= + github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= + github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= + github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= ++github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= + github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= + github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= + github.com/emicklei/proto v1.12.1 h1:6n/Z2pZAnBwuhU66Gs8160B8rrrYKo7h2F2sCOnNceE= +@@ -114,8 +127,11 @@ github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi + github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= + github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= + github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= ++github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= + github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= ++github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= + github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= ++github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= + github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= + github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= + github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +@@ -148,6 +164,7 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ + github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= + github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= ++github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= + github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= + github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= + github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +@@ -157,6 +174,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= + github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= + github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= + github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= ++github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= + github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +@@ -185,6 +203,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu + github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= + github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= + github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= ++github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= + github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= + github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= + github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +@@ -214,6 +233,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf + github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= + github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= + github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= ++github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= + github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +@@ -224,6 +244,7 @@ github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ + github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= + github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= + github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= ++github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= + github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= + github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= + github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +@@ -241,6 +262,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9K + github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= + github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= + github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= ++github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= + github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= + github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= + github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +@@ -256,6 +278,7 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf + github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= + github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= + github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= ++github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= + github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= + github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= + github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +@@ -275,6 +298,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN + github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= + github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= + github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= ++github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= + github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= + github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= + github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +@@ -302,6 +326,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 + github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= + github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= + github.com/miekg/dns v1.1.25 h1:dFwPR6SfLtrSwgDcIq2bcU/gVutB4sNApq2HBdqcakg= ++github.com/miekg/dns v1.1.25/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= + github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= + github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= + github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +@@ -313,6 +338,7 @@ github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQ + github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= + github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= + github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= ++github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= + github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= + github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= + github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +@@ -330,6 +356,7 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= + github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= ++github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +@@ -343,10 +370,12 @@ github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= + github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= + github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= + github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= ++github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= + github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= + github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= + github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= + github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= ++github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= + github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= + github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= + github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +@@ -356,6 +385,7 @@ github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTK + github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= + github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= + github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= ++github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= + github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15 h1:mrI+6Ae64Wjt+uahGe5we/sPS1sXjvfT3YjtawAVgps= + github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= + github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +@@ -387,6 +417,7 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ + github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= + github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= + github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= ++github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= + github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= + github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= + github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +@@ -425,6 +456,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ + github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= + github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= + github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= ++github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= + github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +@@ -439,8 +471,11 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de + github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= + github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= + github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= ++github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= + github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= ++github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= + github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= ++github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= + go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= + go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= + go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +@@ -686,6 +721,7 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= + google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= + google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= ++google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +@@ -745,6 +781,7 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C + gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= + gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= + gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= ++gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= + helm.sh/helm/v3 v3.14.1 h1:4AwRLx+wfzlPtvrsbDmWP5PUokGmf9/nAmEdk21vae8= + helm.sh/helm/v3 v3.14.1/go.mod h1:2itvvDv2WSZXTllknfQo6j7u3VVgMAvm8POCDgYH424= + honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/Patches/llvm/17.x-arm64-opt.patch b/Patches/llvm/17.x-arm64-opt.patch new file mode 100644 index 0000000000000..f5c124955e3cf --- /dev/null +++ b/Patches/llvm/17.x-arm64-opt.patch @@ -0,0 +1,187 @@ +From c3866492879d67314325fbb42b0cdbc9cd882424 Mon Sep 17 00:00:00 2001 +From: DianQK +Date: Thu, 14 Dec 2023 19:19:55 +0800 +Subject: [PATCH] [AArch64] ORRWrs is copy instruction when there's no implicit + def of the X register (#75184) + +Follows +https://github.com/llvm/llvm-project/pull/74682#issuecomment-1850268782. +Fixes #74680. +--- + llvm/include/llvm/CodeGen/TargetInstrInfo.h | 13 ++++++++ + .../LiveDebugValues/InstrRefBasedImpl.cpp | 2 +- + .../LiveDebugValues/VarLocBasedImpl.cpp | 4 +-- + llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 23 ++++++++++--- + llvm/lib/Target/AArch64/AArch64InstrInfo.h | 2 ++ + .../CodeGen/AArch64/machine-cp-sub-reg.mir | 33 +++++++++++++++++++ + 6 files changed, 69 insertions(+), 8 deletions(-) + create mode 100644 llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir + +diff --git a/llvm/include/llvm/CodeGen/TargetInstrInfo.h b/llvm/include/llvm/CodeGen/TargetInstrInfo.h +index 93dfcfc399247e4cb681a329c9791cd6aed08e2c..6ded5f99f0df396001ad1520829a9bee90a0e585 100644 +--- a/llvm/include/llvm/CodeGen/TargetInstrInfo.h ++++ b/llvm/include/llvm/CodeGen/TargetInstrInfo.h +@@ -1019,6 +1019,11 @@ protected: + return std::nullopt; + } + ++ virtual std::optional ++ isCopyLikeInstrImpl(const MachineInstr &MI) const { ++ return std::nullopt; ++ } ++ + /// Return true if the given terminator MI is not expected to spill. This + /// sets the live interval as not spillable and adjusts phi node lowering to + /// not introduce copies after the terminator. Use with care, these are +@@ -1044,6 +1049,14 @@ public: + return isCopyInstrImpl(MI); + } + ++ // Similar to `isCopyInstr`, but adds non-copy semantics on MIR, but ++ // ultimately generates a copy instruction. ++ std::optional isCopyLikeInstr(const MachineInstr &MI) const { ++ if (auto IsCopyInstr = isCopyInstr(MI)) ++ return IsCopyInstr; ++ return isCopyLikeInstrImpl(MI); ++ } ++ + /// If the specific machine instruction is an instruction that adds an + /// immediate value and a physical register, and stores the result in + /// the given physical register \c Reg, return a pair of the source +diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +index 57df9b67fd0263466484ee136e6db9c3c33d9061..7a77141256a36957c8bf34c8b4abbbd9dbd63e1b 100644 +--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp ++++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +@@ -2116,7 +2116,7 @@ bool InstrRefBasedLDV::transferSpillOrRestoreInst(MachineInstr &MI) { + } + + bool InstrRefBasedLDV::transferRegisterCopy(MachineInstr &MI) { +- auto DestSrc = TII->isCopyInstr(MI); ++ auto DestSrc = TII->isCopyLikeInstr(MI); + if (!DestSrc) + return false; + +diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp +index 116c6b7e2d19efad22b780f7cda3e3c816b27938..bf730be00a9a92c93e1b4e749e1085f7529a6694 100644 +--- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp ++++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp +@@ -1364,7 +1364,7 @@ void VarLocBasedLDV::removeEntryValue(const MachineInstr &MI, + // TODO: Try to keep tracking of an entry value if we encounter a propagated + // DBG_VALUE describing the copy of the entry value. (Propagated entry value + // does not indicate the parameter modification.) +- auto DestSrc = TII->isCopyInstr(*TransferInst); ++ auto DestSrc = TII->isCopyLikeInstr(*TransferInst); + if (DestSrc) { + const MachineOperand *SrcRegOp, *DestRegOp; + SrcRegOp = DestSrc->Source; +@@ -1840,7 +1840,7 @@ void VarLocBasedLDV::transferRegisterCopy(MachineInstr &MI, + OpenRangesSet &OpenRanges, + VarLocMap &VarLocIDs, + TransferMap &Transfers) { +- auto DestSrc = TII->isCopyInstr(MI); ++ auto DestSrc = TII->isCopyLikeInstr(MI); + if (!DestSrc) + return; + +diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +index 0691e07a639beee77f8096e2cdb1f70e259a0e03..5fbb5947788c640aa6cb203efe6f90df64c5fe74 100644 +--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp ++++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +@@ -8269,19 +8269,32 @@ AArch64InstrInfo::isCopyInstrImpl(const MachineInstr &MI) const { + // and zero immediate operands used as an alias for mov instruction. + if (MI.getOpcode() == AArch64::ORRWrs && + MI.getOperand(1).getReg() == AArch64::WZR && +- MI.getOperand(3).getImm() == 0x0) { ++ MI.getOperand(3).getImm() == 0x0 && ++ // Check that the w->w move is not a zero-extending w->x mov. ++ (!MI.getOperand(0).getReg().isVirtual() || ++ MI.getOperand(0).getSubReg() == 0) && ++ (!MI.getOperand(0).getReg().isPhysical() || ++ MI.findRegisterDefOperandIdx(MI.getOperand(0).getReg() - AArch64::W0 + ++ AArch64::X0) == -1)) + return DestSourcePair{MI.getOperand(0), MI.getOperand(2)}; +- } + + if (MI.getOpcode() == AArch64::ORRXrs && + MI.getOperand(1).getReg() == AArch64::XZR && +- MI.getOperand(3).getImm() == 0x0) { ++ MI.getOperand(3).getImm() == 0x0) + return DestSourcePair{MI.getOperand(0), MI.getOperand(2)}; +- } + + return std::nullopt; + } + ++std::optional ++AArch64InstrInfo::isCopyLikeInstrImpl(const MachineInstr &MI) const { ++ if (MI.getOpcode() == AArch64::ORRWrs && ++ MI.getOperand(1).getReg() == AArch64::WZR && ++ MI.getOperand(3).getImm() == 0x0) ++ return DestSourcePair{MI.getOperand(0), MI.getOperand(2)}; ++ return std::nullopt; ++} ++ + std::optional + AArch64InstrInfo::isAddImmediate(const MachineInstr &MI, Register Reg) const { + int Sign = 1; +@@ -8325,7 +8338,7 @@ static std::optional + describeORRLoadedValue(const MachineInstr &MI, Register DescribedReg, + const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI) { +- auto DestSrc = TII->isCopyInstr(MI); ++ auto DestSrc = TII->isCopyLikeInstr(MI); + if (!DestSrc) + return std::nullopt; + +diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.h b/llvm/lib/Target/AArch64/AArch64InstrInfo.h +index 20210a96d67ad28def588797a694c958c5aaaa79..ba16b6dba857bf8f0d5b6cdf912c5256255e7ae9 100644 +--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.h ++++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.h +@@ -349,6 +349,8 @@ protected: + /// registers as machine operands. + std::optional + isCopyInstrImpl(const MachineInstr &MI) const override; ++ std::optional ++ isCopyLikeInstrImpl(const MachineInstr &MI) const override; + + private: + unsigned getInstBundleLength(const MachineInstr &MI) const; +diff --git a/llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir b/llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir +new file mode 100644 +index 0000000000000000000000000000000000000000..23cf1dcda839e3072af578a617e5823cb3fbff2d +--- /dev/null ++++ b/llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir +@@ -0,0 +1,33 @@ ++# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4 ++# RUN: llc -o - %s --run-pass=machine-cp -mcp-use-is-copy-instr -mtriple=arm64-apple-macos --verify-machineinstrs | FileCheck %s ++ ++--- ++name: test ++tracksRegLiveness: true ++body: | ++ ; CHECK-LABEL: name: test ++ ; CHECK: bb.0: ++ ; CHECK-NEXT: successors: %bb.1(0x80000000) ++ ; CHECK-NEXT: liveins: $w0 ++ ; CHECK-NEXT: {{ $}} ++ ; CHECK-NEXT: $x8 = ORRXrs $xzr, $x0, 0, implicit $w0 ++ ; CHECK-NEXT: $w8 = ORRWrs $wzr, $w0, 0, implicit-def $x8 ++ ; CHECK-NEXT: {{ $}} ++ ; CHECK-NEXT: bb.1: ++ ; CHECK-NEXT: liveins: $x8 ++ ; CHECK-NEXT: {{ $}} ++ ; CHECK-NEXT: $x0 = ADDXri $x8, 1, 0 ++ ; CHECK-NEXT: RET undef $lr, implicit $x0 ++ bb.0: ++ successors: %bb.1(0x80000000) ++ liveins: $w0 ++ ++ $x8 = ORRXrs $xzr, $x0, 0, implicit $w0 ++ $w8 = ORRWrs $wzr, $w0, 0, implicit-def $x8 ++ ++ bb.1: ++ liveins: $x8 ++ $x0 = ADDXri $x8, 1, 0 ++ ++ RET undef $lr, implicit $x0 ++... diff --git a/Patches/llvm/llvm.patch b/Patches/llvm/llvm.patch new file mode 100644 index 0000000000000..5b7b01fe3685b --- /dev/null +++ b/Patches/llvm/llvm.patch @@ -0,0 +1,96 @@ +diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h +index fa067b7..39ab908 100644 +--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h ++++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h +@@ -56,6 +56,12 @@ public: + virtual llvm::Optional GetMmapData() { return llvm::None; } + + protected: ++ // NB: This constructor is here only because gcc<=6.5 requires a virtual base ++ // class initializer on abstract class (even though it is never used). It can ++ // be deleted once we move to gcc>=7.0. ++ NativeRegisterContextLinux(NativeThreadProtocol &thread) ++ : NativeRegisterContextRegisterInfo(thread, nullptr) {} ++ + lldb::ByteOrder GetByteOrder() const; + + virtual Status ReadRegisterRaw(uint32_t reg_index, RegisterValue ®_value); +diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp +index c6aa320..e222909 100644 +--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp ++++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp +@@ -292,6 +292,8 @@ NativeRegisterContextLinux_x86_64::NativeRegisterContextLinux_x86_64( + const ArchSpec &target_arch, NativeThreadProtocol &native_thread) + : NativeRegisterContextRegisterInfo( + native_thread, CreateRegisterInfoInterface(target_arch)), ++ NativeRegisterContextLinux(native_thread), ++ NativeRegisterContextWatchpoint_x86(native_thread), + m_xstate_type(XStateType::Invalid), m_ymm_set(), m_mpx_set(), + m_reg_info(), m_gpr_x86_64() { + // Set up data about ranges of valid registers. +@@ -1040,14 +1042,16 @@ NativeRegisterContextLinux_x86_64::GetSyscallData() { + static const uint32_t Args[] = {lldb_eax_i386, lldb_ebx_i386, lldb_ecx_i386, + lldb_edx_i386, lldb_esi_i386, lldb_edi_i386, + lldb_ebp_i386}; +- return SyscallData{Int80, Args, lldb_eax_i386}; ++ return SyscallData{llvm::makeArrayRef(Int80), llvm::makeArrayRef(Args), ++ lldb_eax_i386}; + } + case llvm::Triple::x86_64: { + static const uint8_t Syscall[] = {0x0f, 0x05}; + static const uint32_t Args[] = { + lldb_rax_x86_64, lldb_rdi_x86_64, lldb_rsi_x86_64, lldb_rdx_x86_64, + lldb_r10_x86_64, lldb_r8_x86_64, lldb_r9_x86_64}; +- return SyscallData{Syscall, Args, lldb_rax_x86_64}; ++ return SyscallData{llvm::makeArrayRef(Syscall), llvm::makeArrayRef(Args), ++ lldb_rax_x86_64}; + } + default: + llvm_unreachable("Unhandled architecture!"); +diff --git a/lldb/source/Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.h b/lldb/source/Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.h +index cfb8900..071cf92 100644 +--- a/lldb/source/Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.h ++++ b/lldb/source/Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.h +@@ -16,6 +16,13 @@ namespace lldb_private { + class NativeRegisterContextWatchpoint_x86 + : public virtual NativeRegisterContextRegisterInfo { + public: ++ // NB: This constructor is here only because gcc<=6.5 requires a virtual base ++ // class initializer on abstract class (even though it is never used). It can ++ // be deleted once we move to gcc>=7.0. ++ NativeRegisterContextWatchpoint_x86(NativeThreadProtocol &thread) ++ : NativeRegisterContextRegisterInfo(thread, nullptr) {} ++ ++ + Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override; + + Status GetWatchpointHitIndex(uint32_t &wp_index, +diff --git a/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp b/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp +index e9f6fcf..ce259c5 100644 +--- a/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp ++++ b/lldb/unittests/Utility/ReproducerInstrumentationTest.cpp +@@ -50,7 +50,7 @@ public: + TestingRegistry(); + }; + +-static llvm::Optional g_registry; ++static std::unique_ptr g_registry; + static llvm::Optional g_serializer; + static llvm::Optional g_deserializer; + +@@ -75,13 +75,13 @@ inline TestInstrumentationData GetTestInstrumentationData() { + class TestInstrumentationDataRAII { + public: + TestInstrumentationDataRAII(llvm::raw_string_ostream &os) { +- g_registry.emplace(); ++ g_registry = std::make_unique(); + g_serializer.emplace(os); + g_deserializer.reset(); + } + + TestInstrumentationDataRAII(llvm::StringRef buffer) { +- g_registry.emplace(); ++ g_registry = std::make_unique(); + g_serializer.reset(); + g_deserializer.emplace(buffer); + } diff --git a/Patches/loki/loki-3.5.1-purego.patch b/Patches/loki/loki-3.5.1-purego.patch new file mode 100644 index 0000000000000..2ca87d263fb30 --- /dev/null +++ b/Patches/loki/loki-3.5.1-purego.patch @@ -0,0 +1,346 @@ +From 143dcad30588ac7c7bb63fe0a273ef0a2576e506 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Fri, 23 May 2025 22:55:19 -0400 +Subject: [PATCH] fix + +Signed-off-by: Rui Chen +--- + go.mod | 2 +- + go.sum | 2 + + vendor/github.com/ebitengine/purego/dlfcn.go | 8 +-- + .../ebitengine/purego/dlfcn_darwin.go | 5 -- + .../purego/internal/fakecgo/go_libinit.go | 3 + + .../purego/internal/fakecgo/symbols.go | 60 ++++++++++++------- + vendor/modules.txt | 2 +- + 7 files changed, 51 insertions(+), 31 deletions(-) + +diff --git a/go.mod b/go.mod +index 33fcfcd9..4dc5f192 100644 +--- a/go.mod ++++ b/go.mod +@@ -180,7 +180,7 @@ require ( + github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/containerd/containerd/v2 v2.0.4 // indirect + github.com/dlclark/regexp2 v1.11.4 // indirect +- github.com/ebitengine/purego v0.8.2 // indirect ++ github.com/ebitengine/purego v0.8.4 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect +diff --git a/go.sum b/go.sum +index c60b9353..be172046 100644 +--- a/go.sum ++++ b/go.sum +@@ -380,6 +380,8 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= + github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= + github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= + github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= ++github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= ++github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= + github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= + github.com/edsrzf/mmap-go v1.2.0 h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84= + github.com/edsrzf/mmap-go v1.2.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= +diff --git a/vendor/github.com/ebitengine/purego/dlfcn.go b/vendor/github.com/ebitengine/purego/dlfcn.go +index f70a2458..cd1bf293 100644 +--- a/vendor/github.com/ebitengine/purego/dlfcn.go ++++ b/vendor/github.com/ebitengine/purego/dlfcn.go +@@ -83,17 +83,17 @@ func loadSymbol(handle uintptr, name string) (uintptr, error) { + // appear to work if you link directly to the C function on darwin arm64. + + //go:linkname dlopen dlopen +-var dlopen uintptr ++var dlopen uint8 + var dlopenABI0 = uintptr(unsafe.Pointer(&dlopen)) + + //go:linkname dlsym dlsym +-var dlsym uintptr ++var dlsym uint8 + var dlsymABI0 = uintptr(unsafe.Pointer(&dlsym)) + + //go:linkname dlclose dlclose +-var dlclose uintptr ++var dlclose uint8 + var dlcloseABI0 = uintptr(unsafe.Pointer(&dlclose)) + + //go:linkname dlerror dlerror +-var dlerror uintptr ++var dlerror uint8 + var dlerrorABI0 = uintptr(unsafe.Pointer(&dlerror)) +diff --git a/vendor/github.com/ebitengine/purego/dlfcn_darwin.go b/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +index 5f876278..27f56071 100644 +--- a/vendor/github.com/ebitengine/purego/dlfcn_darwin.go ++++ b/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +@@ -17,8 +17,3 @@ const ( + //go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib" + //go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib" + //go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib" +- +-//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib" +-//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib" +-//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib" +-//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib" +diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +index d229d842..e5a66f39 100644 +--- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go ++++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +@@ -19,6 +19,7 @@ var ( + ) + + //go:nosplit ++//go:norace + func x_cgo_notify_runtime_init_done() { + pthread_mutex_lock(&runtime_init_mu) + runtime_init_done = 1 +@@ -28,6 +29,8 @@ func x_cgo_notify_runtime_init_done() { + + // Store the g into a thread-specific value associated with the pthread key pthread_g. + // And pthread_key_destructor will dropm when the thread is exiting. ++// ++//go:norace + func x_cgo_bindm(g unsafe.Pointer) { + // We assume this will always succeed, otherwise, there might be extra M leaking, + // when a C thread exits after a cgo call. +diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +index 7a3a1bbb..d5170240 100644 +--- a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go ++++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +@@ -19,6 +19,7 @@ func setg_trampoline(setg uintptr, G uintptr) + func call5(fn, a1, a2, a3, a4, a5 uintptr) uintptr + + //go:nosplit ++//go:norace + func malloc(size uintptr) unsafe.Pointer { + ret := call5(mallocABI0, uintptr(size), 0, 0, 0, 0) + // this indirection is to avoid go vet complaining about possible misuse of unsafe.Pointer +@@ -26,176 +27,195 @@ func malloc(size uintptr) unsafe.Pointer { + } + + //go:nosplit ++//go:norace + func free(ptr unsafe.Pointer) { + call5(freeABI0, uintptr(ptr), 0, 0, 0, 0) + } + + //go:nosplit ++//go:norace + func setenv(name *byte, value *byte, overwrite int32) int32 { + return int32(call5(setenvABI0, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), uintptr(overwrite), 0, 0)) + } + + //go:nosplit ++//go:norace + func unsetenv(name *byte) int32 { + return int32(call5(unsetenvABI0, uintptr(unsafe.Pointer(name)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func sigfillset(set *sigset_t) int32 { + return int32(call5(sigfillsetABI0, uintptr(unsafe.Pointer(set)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func nanosleep(ts *syscall.Timespec, rem *syscall.Timespec) int32 { + return int32(call5(nanosleepABI0, uintptr(unsafe.Pointer(ts)), uintptr(unsafe.Pointer(rem)), 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func abort() { + call5(abortABI0, 0, 0, 0, 0, 0) + } + + //go:nosplit ++//go:norace + func pthread_attr_init(attr *pthread_attr_t) int32 { + return int32(call5(pthread_attr_initABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_create(thread *pthread_t, attr *pthread_attr_t, start unsafe.Pointer, arg unsafe.Pointer) int32 { + return int32(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(start), uintptr(arg), 0)) + } + + //go:nosplit ++//go:norace + func pthread_detach(thread pthread_t) int32 { + return int32(call5(pthread_detachABI0, uintptr(thread), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_sigmask(how sighow, ign *sigset_t, oset *sigset_t) int32 { + return int32(call5(pthread_sigmaskABI0, uintptr(how), uintptr(unsafe.Pointer(ign)), uintptr(unsafe.Pointer(oset)), 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_self() pthread_t { + return pthread_t(call5(pthread_selfABI0, 0, 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_get_stacksize_np(thread pthread_t) size_t { + return size_t(call5(pthread_get_stacksize_npABI0, uintptr(thread), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_attr_getstacksize(attr *pthread_attr_t, stacksize *size_t) int32 { + return int32(call5(pthread_attr_getstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(stacksize)), 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_attr_setstacksize(attr *pthread_attr_t, size size_t) int32 { + return int32(call5(pthread_attr_setstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(size), 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_attr_destroy(attr *pthread_attr_t) int32 { + return int32(call5(pthread_attr_destroyABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_mutex_lock(mutex *pthread_mutex_t) int32 { + return int32(call5(pthread_mutex_lockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_mutex_unlock(mutex *pthread_mutex_t) int32 { + return int32(call5(pthread_mutex_unlockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_cond_broadcast(cond *pthread_cond_t) int32 { + return int32(call5(pthread_cond_broadcastABI0, uintptr(unsafe.Pointer(cond)), 0, 0, 0, 0)) + } + + //go:nosplit ++//go:norace + func pthread_setspecific(key pthread_key_t, value unsafe.Pointer) int32 { + return int32(call5(pthread_setspecificABI0, uintptr(key), uintptr(value), 0, 0, 0)) + } + + //go:linkname _malloc _malloc +-var _malloc uintptr ++var _malloc uint8 + var mallocABI0 = uintptr(unsafe.Pointer(&_malloc)) + + //go:linkname _free _free +-var _free uintptr ++var _free uint8 + var freeABI0 = uintptr(unsafe.Pointer(&_free)) + + //go:linkname _setenv _setenv +-var _setenv uintptr ++var _setenv uint8 + var setenvABI0 = uintptr(unsafe.Pointer(&_setenv)) + + //go:linkname _unsetenv _unsetenv +-var _unsetenv uintptr ++var _unsetenv uint8 + var unsetenvABI0 = uintptr(unsafe.Pointer(&_unsetenv)) + + //go:linkname _sigfillset _sigfillset +-var _sigfillset uintptr ++var _sigfillset uint8 + var sigfillsetABI0 = uintptr(unsafe.Pointer(&_sigfillset)) + + //go:linkname _nanosleep _nanosleep +-var _nanosleep uintptr ++var _nanosleep uint8 + var nanosleepABI0 = uintptr(unsafe.Pointer(&_nanosleep)) + + //go:linkname _abort _abort +-var _abort uintptr ++var _abort uint8 + var abortABI0 = uintptr(unsafe.Pointer(&_abort)) + + //go:linkname _pthread_attr_init _pthread_attr_init +-var _pthread_attr_init uintptr ++var _pthread_attr_init uint8 + var pthread_attr_initABI0 = uintptr(unsafe.Pointer(&_pthread_attr_init)) + + //go:linkname _pthread_create _pthread_create +-var _pthread_create uintptr ++var _pthread_create uint8 + var pthread_createABI0 = uintptr(unsafe.Pointer(&_pthread_create)) + + //go:linkname _pthread_detach _pthread_detach +-var _pthread_detach uintptr ++var _pthread_detach uint8 + var pthread_detachABI0 = uintptr(unsafe.Pointer(&_pthread_detach)) + + //go:linkname _pthread_sigmask _pthread_sigmask +-var _pthread_sigmask uintptr ++var _pthread_sigmask uint8 + var pthread_sigmaskABI0 = uintptr(unsafe.Pointer(&_pthread_sigmask)) + + //go:linkname _pthread_self _pthread_self +-var _pthread_self uintptr ++var _pthread_self uint8 + var pthread_selfABI0 = uintptr(unsafe.Pointer(&_pthread_self)) + + //go:linkname _pthread_get_stacksize_np _pthread_get_stacksize_np +-var _pthread_get_stacksize_np uintptr ++var _pthread_get_stacksize_np uint8 + var pthread_get_stacksize_npABI0 = uintptr(unsafe.Pointer(&_pthread_get_stacksize_np)) + + //go:linkname _pthread_attr_getstacksize _pthread_attr_getstacksize +-var _pthread_attr_getstacksize uintptr ++var _pthread_attr_getstacksize uint8 + var pthread_attr_getstacksizeABI0 = uintptr(unsafe.Pointer(&_pthread_attr_getstacksize)) + + //go:linkname _pthread_attr_setstacksize _pthread_attr_setstacksize +-var _pthread_attr_setstacksize uintptr ++var _pthread_attr_setstacksize uint8 + var pthread_attr_setstacksizeABI0 = uintptr(unsafe.Pointer(&_pthread_attr_setstacksize)) + + //go:linkname _pthread_attr_destroy _pthread_attr_destroy +-var _pthread_attr_destroy uintptr ++var _pthread_attr_destroy uint8 + var pthread_attr_destroyABI0 = uintptr(unsafe.Pointer(&_pthread_attr_destroy)) + + //go:linkname _pthread_mutex_lock _pthread_mutex_lock +-var _pthread_mutex_lock uintptr ++var _pthread_mutex_lock uint8 + var pthread_mutex_lockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_lock)) + + //go:linkname _pthread_mutex_unlock _pthread_mutex_unlock +-var _pthread_mutex_unlock uintptr ++var _pthread_mutex_unlock uint8 + var pthread_mutex_unlockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_unlock)) + + //go:linkname _pthread_cond_broadcast _pthread_cond_broadcast +-var _pthread_cond_broadcast uintptr ++var _pthread_cond_broadcast uint8 + var pthread_cond_broadcastABI0 = uintptr(unsafe.Pointer(&_pthread_cond_broadcast)) + + //go:linkname _pthread_setspecific _pthread_setspecific +-var _pthread_setspecific uintptr ++var _pthread_setspecific uint8 + var pthread_setspecificABI0 = uintptr(unsafe.Pointer(&_pthread_setspecific)) +diff --git a/vendor/modules.txt b/vendor/modules.txt +index 8314ac63..7522f26f 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -708,7 +708,7 @@ github.com/eapache/go-xerial-snappy + # github.com/eapache/queue v1.1.0 + ## explicit + github.com/eapache/queue +-# github.com/ebitengine/purego v0.8.2 ++# github.com/ebitengine/purego v0.8.4 + ## explicit; go 1.18 + github.com/ebitengine/purego + github.com/ebitengine/purego/internal/cgo +-- +2.49.0 + diff --git a/Patches/lua/lua-dylib.patch b/Patches/lua/lua-dylib.patch new file mode 100644 index 0000000000000..7c5eaf54cffbc --- /dev/null +++ b/Patches/lua/lua-dylib.patch @@ -0,0 +1,95 @@ +diff --git a/Makefile b/Makefile +index fed75b3..66691ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,9 +12,9 @@ PLAT= guess + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. + INSTALL_TOP= /usr/local + INSTALL_BIN= $(INSTALL_TOP)/bin +-INSTALL_INC= $(INSTALL_TOP)/include ++INSTALL_INC= $(INSTALL_TOP)/include/lua + INSTALL_LIB= $(INSTALL_TOP)/lib +-INSTALL_MAN= $(INSTALL_TOP)/man/man1 ++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V + INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +@@ -41,7 +41,7 @@ PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix + # What to install. + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +-TO_LIB= liblua.a ++TO_LIB= liblua.a liblua.dylib + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -52,7 +52,7 @@ R= $V.3 + all: $(PLAT) + + $(PLATS) help test clean: +- @cd src && $(MAKE) $@ ++ @cd src && $(MAKE) $@ V=$(V) R=$(R) + + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) +@@ -60,6 +60,8 @@ install: dummy + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ++ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.$(V).dylib ++ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.$(R).dylib + + uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) +diff --git a/src/Makefile b/src/Makefile +index f78c0b8..7f3faf5 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -33,6 +33,7 @@ CMCFLAGS= + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_DYLIB= liblua.dylib + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -44,8 +45,8 @@ LUAC_T= luac + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +-ALL_A= $(LUA_A) ++ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_A= $(LUA_DYLIB) $(LUA_A) + + # Targets start here. + default: $(PLAT) +@@ -60,11 +61,15 @@ $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) +- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++$(LUA_DYLIB): $(BASE_O) ++ $(CC) -o $@ -dynamiclib -install_name @OPT_LIB@/liblua.dylib \ ++ -compatibility_version $(V) -current_version $(R) $^ + +-$(LUAC_T): $(LUAC_O) $(LUA_A) +- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) ++$(LUA_T): $(LUA_O) $(LUA_DYLIB) ++ $(CC) -fno-common -o $@ $(LDFLAGS) $(LUA_O) $(LUA_DYLIB) -L. -llua $(LIBS) ++ ++$(LUAC_T): $(LUAC_O) $(LUA_DYLIB) ++ $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS) + + test: + ./$(LUA_T) -v +@@ -126,7 +131,7 @@ linux-readline: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline" + + Darwin macos macosx: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline" ++ $(MAKE) $(ALL) SYSCFLAGS="-fno-common -DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline" + + mingw: + $(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \ diff --git a/Patches/lua/lua-so.patch b/Patches/lua/lua-so.patch new file mode 100644 index 0000000000000..b571f721cb86f --- /dev/null +++ b/Patches/lua/lua-so.patch @@ -0,0 +1,63 @@ +diff --git a/Makefile b/Makefile +index fed75b3..66691ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,9 +12,9 @@ PLAT= guess + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. + INSTALL_TOP= /usr/local + INSTALL_BIN= $(INSTALL_TOP)/bin +-INSTALL_INC= $(INSTALL_TOP)/include ++INSTALL_INC= $(INSTALL_TOP)/include/lua + INSTALL_LIB= $(INSTALL_TOP)/lib +-INSTALL_MAN= $(INSTALL_TOP)/man/man1 ++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V + INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +diff --git a/Makefile b/Makefile +index 36447a0..5f93891 100644 +--- a/Makefile ++++ b/Makefile +@@ -52,7 +52,7 @@ R= $V.2 + all: $(PLAT) + + $(PLATS) help test clean: +- @cd src && $(MAKE) $@ ++ @cd src && $(MAKE) $@ V=$(V) R=$(R) + + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) +diff --git a/src/Makefile b/src/Makefile +index a99735a..9415e09 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -33,6 +33,7 @@ CMCFLAGS= + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -44,7 +45,7 @@ LUAC_T= luac + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -60,6 +61,12 @@ $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -ldl -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + \ No newline at end of file diff --git a/Patches/lua@5.3/lua-so.patch b/Patches/lua@5.3/lua-so.patch new file mode 100644 index 0000000000000..f675d4d4dafbf --- /dev/null +++ b/Patches/lua@5.3/lua-so.patch @@ -0,0 +1,47 @@ +diff --git a/Makefile b/Makefile +index 7fa91c8..dccf485 100644 +--- a/Makefile ++++ b/Makefile +@@ -52,7 +52,7 @@ R= $V.0 + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ V=$(V) R=$(R) + + test: dummy + src/lua -v +diff --git a/src/Makefile b/src/Makefile +index 2e7a412..fa5769f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,6 +29,7 @@ MYOBJS= + PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ + lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ + ltm.o lundump.o lvm.o lzio.o +@@ -43,7 +44,7 @@ LUAC_T= luac + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -59,6 +60,12 @@ $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + \ No newline at end of file diff --git a/Patches/madplay/patch-audio_carbon.c b/Patches/madplay/patch-audio_carbon.c new file mode 100644 index 0000000000000..64bfb99b947dc --- /dev/null +++ b/Patches/madplay/patch-audio_carbon.c @@ -0,0 +1,32 @@ +--- audio_carbon.c.orig 2004-01-23 01:41:31.000000000 -0800 ++++ audio_carbon.c 2009-08-24 23:07:41.000000000 -0700 +@@ -94,7 +94,7 @@ + } + + static +-int wait(struct buffer *buffer) ++int delay(struct buffer *buffer) + { + if (MPWaitOnSemaphore(buffer->semaphore, kDurationForever) != noErr) { + audio_error = _("MPWaitOnSemaphore() failed"); +@@ -234,7 +234,11 @@ + break; + + case 16: ++#ifdef __BIG_ENDIAN__ + audio_pcm = audio_pcm_s16be; ++#else ++ audio_pcm = audio_pcm_s16le; ++#endif + break; + } + +@@ -263,7 +267,7 @@ + /* wait for block to finish playing */ + + if (buffer->pcm_nsamples == 0) { +- if (wait(buffer) == -1) ++ if (delay(buffer) == -1) + return -1; + + buffer->pcm_length = 0; diff --git a/Patches/makeicns/patch-IconFamily.m.diff b/Patches/makeicns/patch-IconFamily.m.diff new file mode 100644 index 0000000000000..270a4cadc08e9 --- /dev/null +++ b/Patches/makeicns/patch-IconFamily.m.diff @@ -0,0 +1,57 @@ +--- makeicns/IconFamily.m 2012-01-19 22:16:19.000000000 +0100 ++++ IconFamily.m 2013-10-29 15:51:30.000000000 +0100 +@@ -85,7 +85,9 @@ + + + (Handle) get32BitDataFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize; + ++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 + + (Handle) get8BitDataFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize; ++#endif + + + (Handle) get8BitMaskFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize; + +@@ -675,10 +677,12 @@ + hRawData = [IconFamily get1BitMaskFromBitmapImageRep:bitmapImageRep requiredPixelSize:32]; + break; + ++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 + // 'icl8' 32x32 8-bit indexed image data + case kLarge8BitData: + hRawData = [IconFamily get8BitDataFromBitmapImageRep:bitmapImageRep requiredPixelSize:32]; + break; ++#endif + + // 'is32' 16x16 32-bit RGB image + case kSmall32BitData: +@@ -695,10 +699,12 @@ + hRawData = [IconFamily get1BitMaskFromBitmapImageRep:bitmapImageRep requiredPixelSize:16]; + break; + ++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 + // 'ics8' 16x16 8-bit indexed image data + case kSmall8BitData: + hRawData = [IconFamily get8BitDataFromBitmapImageRep:bitmapImageRep requiredPixelSize:16]; + break; ++#endif + + default: + return NO; +@@ -1323,6 +1329,10 @@ + return hRawData; + } + ++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 ++// This method is based on CGPaletteCreateDefaultColorPalette which is no longer ++// supported on 10.9, and provided a data structure to access old MacOS's 8 bits ++// palette. + + (Handle) get8BitDataFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize + { + Handle hRawData; +@@ -1411,6 +1421,7 @@ + + return hRawData; + } ++#endif + + + (Handle) get8BitMaskFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize + { diff --git a/Patches/mcpp/2.7.2.patch b/Patches/mcpp/2.7.2.patch new file mode 100644 index 0000000000000..dce0de3d1d9e9 --- /dev/null +++ b/Patches/mcpp/2.7.2.patch @@ -0,0 +1,112 @@ +diff --git a/src/internal.H b/src/internal.H +index 5e1c19f..39aff8c 100644 +--- a/src/internal.H ++++ b/src/internal.H +@@ -390,6 +390,8 @@ extern char * const work_end; /* End of work[] buffer */ + extern char identifier[]; /* Lastly scanned name */ + extern IFINFO ifstack[]; /* Information of #if nesting */ + extern char work_buf[]; ++extern FILEINFO * sh_file; ++extern int sh_line; + /* Temporary buffer for directive line and macro expansion */ + + /* main.c */ +@@ -557,6 +559,6 @@ extern void init_system( void); + #endif + #endif + +-#if HOST_HAVE_STPCPY ++#if HOST_HAVE_STPCPY && !defined(stpcpy) + extern char * stpcpy( char * dest, const char * src); + #endif +diff --git a/src/main.c b/src/main.c +index a438894..8da4b58 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -326,6 +326,8 @@ static void init_main( void) + = FALSE; + option_flags.trig = TRIGRAPHS_INIT; + option_flags.dig = DIGRAPHS_INIT; ++ sh_file = NULL; ++ sh_line = 0; + } + + int mcpp_lib_main +diff --git a/src/support.c b/src/support.c +index c57eaef..348ede0 100644 +--- a/src/support.c ++++ b/src/support.c +@@ -188,7 +188,7 @@ static char * append_to_buffer( + size_t length + ) + { +- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ ++ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ + size_t size = MAX( BUF_INCR_SIZE, length); + + if (mem_buf_p->buffer == NULL) { /* 1st append */ +@@ -1722,6 +1722,8 @@ com_start: + sp -= 2; + while (*sp != '\n') /* Until end of line */ + mcpp_fputc( *sp++, OUT); ++ mcpp_fputc( '\n', OUT); ++ wrong_line = TRUE; + } + goto end_line; + default: /* Not a comment */ +diff --git a/src/system.c b/src/system.c +index 4759469..4e008fa 100644 +--- a/src/system.c ++++ b/src/system.c +@@ -3534,6 +3534,32 @@ void add_file( + FILEINFO * file; + const char * too_many_include_nest = + "More than %.0s%ld nesting of #include"; /* _F_ _W4_ */ ++ ++ // ++ // When encoding is UTF-8, skip BOM if present. ++ // ++ if(mbchar == UTF8 && fp != NULL && ftell(fp) == 0) ++ { ++ const unsigned char UTF8_BOM[3] = {0xEF, 0xBB, 0xBF}; ++ unsigned char FILE_HEAD[3] = {0, 0, 0}; ++ int i; ++ for(i = 0; i < 3; ++i) ++ { ++ FILE_HEAD[i] = getc(fp); ++ if(FILE_HEAD[i] != UTF8_BOM[i]) ++ { ++ if(FILE_HEAD[i] == (unsigned char)EOF) ++ { ++ i--; ++ } ++ for(; i >= 0; --i) ++ { ++ ungetc(FILE_HEAD[i], fp); ++ } ++ break; ++ } ++ } ++ } + + filename = set_fname( filename); /* Search or append to fnamelist[] */ + fullname = set_fname( fullname); /* Search or append to fnamelist[] */ +@@ -3858,6 +3884,9 @@ static int chk_dirp( + } + #endif + ++FILEINFO* sh_file; ++int sh_line; ++ + void sharp( + FILEINFO * sharp_file, + int flag /* Flag to append to the line for GCC */ +@@ -3868,8 +3897,6 @@ void sharp( + * else (i.e. 'sharp_file' is NULL) 'infile'. + */ + { +- static FILEINFO * sh_file; +- static int sh_line; + FILEINFO * file; + int line; + diff --git a/Patches/mfem/4.8-support-hypre-3.0.patch b/Patches/mfem/4.8-support-hypre-3.0.patch new file mode 100644 index 0000000000000..fecccd5170a82 --- /dev/null +++ b/Patches/mfem/4.8-support-hypre-3.0.patch @@ -0,0 +1,288 @@ +From 0144ab834e8b438a7077d3afa1cb2b025540259c Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Sun, 28 Sep 2025 11:07:37 -0400 +Subject: [PATCH] Support hypre 3.0 + +Signed-off-by: Rui Chen +--- + CMakeLists.txt | 10 +-- + config/cmake/modules/FindHYPRE.cmake | 113 ++++++++++++++++++++++++++- + linalg/hypre.cpp | 4 +- + linalg/hypre.hpp | 8 +- + linalg/hypre_parcsr.cpp | 6 +- + linalg/hypre_parcsr.hpp | 4 + + 6 files changed, 129 insertions(+), 16 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64c9a62..45b16bb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -261,6 +261,11 @@ if (MFEM_USE_OPENMP OR MFEM_USE_LEGACY_OPENMP) + endif() + endif() + ++# Umpire (must be included before hypre, so hypre can use it if needed) ++if (MFEM_USE_UMPIRE) ++ find_package(UMPIRE REQUIRED) ++endif() ++ + # MPI -> hypre; PETSc (optional) + if (MFEM_USE_MPI) + find_package(MPI REQUIRED) +@@ -476,11 +481,6 @@ if (MFEM_USE_RAJA) + find_package(RAJA REQUIRED) + endif() + +-# UMPIRE +-if (MFEM_USE_UMPIRE) +- find_package(UMPIRE REQUIRED) +-endif() +- + # GOOGLE-BENCHMARK + if (MFEM_USE_BENCHMARK) + find_package(Benchmark REQUIRED) +diff --git a/config/cmake/modules/FindHYPRE.cmake b/config/cmake/modules/FindHYPRE.cmake +index d13b623..1df0790 100644 +--- a/config/cmake/modules/FindHYPRE.cmake ++++ b/config/cmake/modules/FindHYPRE.cmake +@@ -9,21 +9,25 @@ + # terms of the BSD-3 license. We welcome feedback and contributions, see file + # CONTRIBUTING.md for details. + +-# Defines the following variables: ++# Defines the following variables if fetching of TPLs is disabled (default): + # - HYPRE_FOUND + # - HYPRE_LIBRARIES + # - HYPRE_INCLUDE_DIRS + # - HYPRE_VERSION + # - HYPRE_USING_CUDA (internal) + # - HYPRE_USING_HIP (internal) ++# otherwise, the following are defined: ++# - HYPRE (imported library target) ++# - HYPRE_VERSION (cache variable) + +-if (HYPRE_FOUND) ++if (HYPRE_FOUND OR TARGET HYPRE) + if (HYPRE_USING_CUDA) + find_package(CUDAToolkit REQUIRED) + endif() + if (HYPRE_USING_HIP) + find_package(rocsparse REQUIRED) + find_package(rocrand REQUIRED) ++ find_package(rocsolver REQUIRED) + endif() + if (HYPRE_LIBRARIES AND HYPRE_INCLUDE_DIRS AND HYPRE_VERSION) + find_package_handle_standard_args(HYPRE +@@ -33,6 +37,95 @@ if (HYPRE_FOUND) + endif() + endif() + ++if (HYPRE_FETCH OR FETCH_TPLS) ++ # Collect all HYPRE_ENABLE variables and pass them to hypre, assuming they are BOOL. ++ set(HYPRE_CMAKE_OPTIONS "") ++ get_cmake_property(all_vars VARIABLES) ++ foreach(var ${all_vars}) ++ if(var MATCHES "^HYPRE_ENABLE") ++ list(APPEND HYPRE_CMAKE_OPTIONS "-D${var}:BOOL=${${var}}") ++ endif() ++ endforeach() ++ ++ set(HYPRE_FETCH_VERSION 2.33.0) ++ set(HYPRE_FETCH_TAG "v${HYPRE_FETCH_VERSION}" CACHE STRING "Tag, branch, or commit for HYPRE") ++ add_library(HYPRE STATIC IMPORTED) ++ # set options and associated dependencies ++ list(APPEND HYPRE_CMAKE_OPTIONS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}) ++ if (MFEM_USE_CUDA) ++ list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_CUDA:BOOL=ON -DCMAKE_CUDA_ARCHITECTURES:STRING=${CMAKE_CUDA_ARCHITECTURES}) ++ find_package(CUDAToolkit REQUIRED) ++ target_link_libraries(HYPRE INTERFACE CUDA::cusparse CUDA::curand CUDA::cublas) ++ elseif (MFEM_USE_HIP) ++ list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_HIP:BOOL=ON) ++ find_package(rocsparse REQUIRED) ++ find_package(rocrand REQUIRED) ++ target_link_libraries(HYPRE INTERFACE rocsparse rocrand) ++ endif() ++ if (MFEM_USE_CUDA OR MFEM_USE_HIP) ++ if (MFEM_USE_UMPIRE) ++ if (EXISTS ${umpire_DIR}) ++ list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_UMPIRE:BOOL=ON -Dumpire_DIR:PATH=${umpire_DIR}) ++ else() ++ message(FATAL_ERROR "MFEM_USE_UMPIRE=ON, however umpire_DIR isn't visible to HYPRE") ++ endif() ++ else() ++ list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_UMPIRE:BOOL=OFF) ++ message(WARNING ++"================================================================================ ++ Umpire is disabled while building HYPRE with GPU support. ++ This is not recommended for performance reasons! ++ Consider enabling Umpire with -DMFEM_USE_UMPIRE=ON and providing -DUMPIRE_DIR. ++================================================================================") ++ endif() ++ endif() ++ if (MFEM_USE_SINGLE) ++ list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_SINGLE:BOOL=ON) ++ endif() ++ # define external project and create future include directory so it is present ++ # to pass CMake checks at end of MFEM configuration step ++ message(STATUS "Will fetch HYPRE ${HYPRE_FETCH_TAG} to be built with ${HYPRE_CMAKE_OPTIONS}") ++ set(HYPRE_INSTALL ${CMAKE_BINARY_DIR}/fetch/hypre) ++ include(ExternalProject) ++ ExternalProject_Add(hypre ++ GIT_REPOSITORY https://github.com/hypre-space/hypre.git ++ GIT_TAG ${HYPRE_FETCH_TAG} ++ GIT_SHALLOW TRUE ++ GIT_PROGRESS TRUE ++ UPDATE_DISCONNECTED TRUE ++ SOURCE_SUBDIR src ++ PREFIX ${HYPRE_INSTALL} ++ BUILD_COMMAND ${CMAKE_COMMAND} --build . -- -j${CMAKE_BUILD_PARALLEL_LEVEL} ++ CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${HYPRE_INSTALL} -DCMAKE_INSTALL_LIBDIR:PATH=lib ${HYPRE_CMAKE_OPTIONS}) ++ file(MAKE_DIRECTORY ${HYPRE_INSTALL}/include) ++ # set imported library target properties ++ add_dependencies(HYPRE hypre) ++ set_target_properties(HYPRE PROPERTIES ++ IMPORTED_LOCATION ${HYPRE_INSTALL}/lib/libHYPRE.a ++ INTERFACE_INCLUDE_DIRECTORIES ${HYPRE_INSTALL}/include) ++ # convert HYPRE version to integer ++ if (HYPRE_FETCH_TAG MATCHES "^v?([0-9]+)\\.([0-9]+)\\.([0-9]+)$") ++ # Exact release tag X.Y.Z ++ string(REGEX MATCHALL "[0-9]+" HYPRE_SPLIT_VERSION "${HYPRE_FETCH_TAG}") ++ elseif (HYPRE_FETCH_VERSION MATCHES "([0-9]+)\\.([0-9]+)(\\.([0-9]+))?") ++ string(REGEX MATCHALL "[0-9]+" HYPRE_SPLIT_VERSION "${HYPRE_FETCH_VERSION}") ++ else (NOT DEFINED HYPRE_VERSION) ++ message(FATAL_ERROR "Unable to find HYPRE release version. Please provide it via -DHYPRE_VERSION") ++ endif() ++ if (HYPRE_SPLIT_VERSION AND NOT DEFINED HYPRE_VERSION) ++ list(GET HYPRE_SPLIT_VERSION 0 HYPRE_MAJOR_VERSION) ++ list(GET HYPRE_SPLIT_VERSION 1 HYPRE_MINOR_VERSION) ++ if (HYPRE_SPLIT_VERSION GREATER 2) ++ list(GET HYPRE_SPLIT_VERSION 2 HYPRE_PATCH_VERSION) ++ else() ++ set(HYPRE_PATCH_VERSION 0) ++ endif() ++ math(EXPR HYPRE_VERSION "10000*${HYPRE_MAJOR_VERSION} + 100*${HYPRE_MINOR_VERSION} + ${HYPRE_PATCH_VERSION}") ++ set(HYPRE_VERSION ${HYPRE_VERSION} CACHE STRING "HYPRE version." FORCE) ++ endif() ++ return() ++endif() ++ + include(MfemCmakeUtilities) + mfem_find_package(HYPRE HYPRE HYPRE_DIR "include" "HYPRE.h" "lib" "HYPRE" + "Paths to headers required by HYPRE." "Libraries required by HYPRE." +@@ -86,8 +179,9 @@ if (HYPRE_FOUND AND HYPRE_USING_CUDA) + mfem_culib_set_libraries(CUSPARSE cusparse) + mfem_culib_set_libraries(CURAND curand) + mfem_culib_set_libraries(CUBLAS cublas) ++ mfem_culib_set_libraries(CUSOLVER cusolver) + list(APPEND HYPRE_LIBRARIES ${CUSPARSE_LIBRARIES} ${CURAND_LIBRARIES} +- ${CUBLAS_LIBRARIES}) ++ ${CUBLAS_LIBRARIES} ${CUSOLVER_LIBRARIES}) + set(HYPRE_LIBRARIES ${HYPRE_LIBRARIES} CACHE STRING + "HYPRE libraries + dependencies." FORCE) + message(STATUS "Updated HYPRE_LIBRARIES: ${HYPRE_LIBRARIES}") +@@ -96,12 +190,23 @@ endif() + if (HYPRE_FOUND AND HYPRE_USING_HIP) + find_package(rocsparse REQUIRED) + find_package(rocrand REQUIRED) +- list(APPEND HYPRE_LIBRARIES ${rocsparse_LIBRARIES} ${rocrand_LIBRARIES}) ++ find_package(rocsolver REQUIRED) ++ list(APPEND HYPRE_LIBRARIES ${rocsparse_LIBRARIES} ${rocrand_LIBRARIES} roc::rocsolver roc::rocblas) + set(HYPRE_LIBRARIES ${HYPRE_LIBRARIES} CACHE STRING + "HYPRE libraries + dependencies." FORCE) + message(STATUS "Updated HYPRE_LIBRARIES: ${HYPRE_LIBRARIES}") + endif() + ++# Hypre+Umpire check ++if (HYPRE_FOUND AND (HYPRE_USING_CUDA OR HYPRE_USING_HIP) AND NOT MFEM_USE_UMPIRE) ++ message(WARNING ++"=============================================================== ++ Detected GPU-enabled HYPRE build without Umpire support. ++ This is not recommended for performance reasons! ++ Consider rebuilding HYPRE with Umpire support. ++===============================================================") ++endif() ++ + find_package_handle_standard_args(HYPRE + REQUIRED_VARS HYPRE_LIBRARIES HYPRE_INCLUDE_DIRS HYPRE_VERSION + ) +diff --git a/linalg/hypre.cpp b/linalg/hypre.cpp +index c3f6067..a19c2bb 100644 +--- a/linalg/hypre.cpp ++++ b/linalg/hypre.cpp +@@ -2324,10 +2324,10 @@ void HypreParMatrix::Threshold(real_t threshold) + ierr += hypre_CSRMatrixDestroy(csr_A); + } + +- /* TODO: GenerateDiagAndOffd() uses an int array of size equal to the number ++ /* TODO: hypre_GenerateDiagAndOffd() uses an int array of size equal to the number + of columns in csr_A_wo_z which is the global number of columns in A. This + does not scale well. */ +- ierr += GenerateDiagAndOffd(csr_A_wo_z,parcsr_A_ptr, ++ ierr += hypre_GenerateDiagAndOffd(csr_A_wo_z,parcsr_A_ptr, + col_start,col_end); + + ierr += hypre_CSRMatrixDestroy(csr_A_wo_z); +diff --git a/linalg/hypre.hpp b/linalg/hypre.hpp +index efbb0de..93e7c01 100644 +--- a/linalg/hypre.hpp ++++ b/linalg/hypre.hpp +@@ -25,11 +25,11 @@ + #define HYPRE_TIMING + + // hypre header files +-#include +-#include + #include <_hypre_parcsr_mv.h> + #include <_hypre_parcsr_ls.h> + ++#include ++ + #ifdef HYPRE_COMPLEX + #error "MFEM does not work with HYPRE's complex numbers support" + #endif +@@ -53,6 +53,10 @@ + #error "MFEM_USE_HIP=YES is required when HYPRE is built with HIP!" + #endif + ++#if MFEM_HYPRE_VERSION > 21500 ++#define HYPRE_AssumedPartitionCheck() 1 ++#endif ++ + namespace mfem + { + +diff --git a/linalg/hypre_parcsr.cpp b/linalg/hypre_parcsr.cpp +index a11eab8..2409e25 100644 +--- a/linalg/hypre_parcsr.cpp ++++ b/linalg/hypre_parcsr.cpp +@@ -1916,9 +1916,9 @@ hypre_ParCSRMatrixAdd(hypre_ParCSRMatrix *A, + /* FIXME: GenerateDiagAndOffd() uses an int array of size equal to the + number of columns in csr_C_temp which is the global number of columns + in A and B. This does not scale well. */ +- ierr += GenerateDiagAndOffd(csr_C_temp, C, +- hypre_ParCSRMatrixFirstColDiag(A), +- hypre_ParCSRMatrixLastColDiag(A)); ++ ierr += hypre_GenerateDiagAndOffd(csr_C_temp, C, ++ hypre_ParCSRMatrixFirstColDiag(A), ++ hypre_ParCSRMatrixLastColDiag(A)); + + /* delete CSR version of C */ + ierr += hypre_CSRMatrixDestroy(csr_C_temp); +diff --git a/linalg/hypre_parcsr.hpp b/linalg/hypre_parcsr.hpp +index 4dadd31..07b3217 100644 +--- a/linalg/hypre_parcsr.hpp ++++ b/linalg/hypre_parcsr.hpp +@@ -21,6 +21,10 @@ + // hypre header files + #include <_hypre_parcsr_mv.h> + ++#if MFEM_HYPRE_VERSION < 30000 ++#define hypre_GenerateDiagAndOffd GenerateDiagAndOffd ++#endif ++ + // Older hypre versions do not define HYPRE_BigInt and HYPRE_MPI_BIG_INT, so we + // define them here for backward compatibility. + #if MFEM_HYPRE_VERSION < 21600 +-- +2.51.0 + diff --git a/Patches/mkvdts2ac3/1.6.0.patch b/Patches/mkvdts2ac3/1.6.0.patch new file mode 100644 index 0000000000000..aab484039aa41 --- /dev/null +++ b/Patches/mkvdts2ac3/1.6.0.patch @@ -0,0 +1,77 @@ +diff --git a/mkvdts2ac3.sh b/mkvdts2ac3.sh +index 270f768..156d60d 100755 +--- a/mkvdts2ac3.sh ++++ b/mkvdts2ac3.sh +@@ -355,8 +355,18 @@ if [ $EXECUTE = 1 ]; then + checkdep perl + fi + ++# Make some adjustments based on the version of mkvtoolnix ++MKVTOOLNIXVERSION=$(mkvmerge -V | cut -d " " -f 2 | sed s/\[\^0-9\]//g) ++if [ ${MKVTOOLNIXVERSION} -lt 670 ]; then ++ AUDIOTRACKPREFIX="audio (A_" ++ VIDEOTRACKPREFIX="video (V_" ++else ++ AUDIOTRACKPREFIX="audio (" ++ VIDEOTRACKPREFIX="video (" ++fi ++ + # Added check to see if AC3 track exists. If so, no need to continue +-if [ "$(mkvmerge -i "$MKVFILE" | grep -i "A_AC3")" ]; then ++if [ "$(mkvmerge -i "$MKVFILE" | grep -i "${AUDIOTRACKPREFIX}AC3")" ]; then + echo $"AC3 track already exists in '$MKVFILE'." + if [ $FORCE = 0 ]; then + echo $"Use -f or --force argument to bypass this check." +@@ -389,11 +399,11 @@ doprint $"WORKING DIRECTORY: $WD" + if [ -z $DTSTRACK ]; then + doprint "" + doprint $"Find first DTS track in MKV file." +- doprint "> mkvmerge -i \"$MKVFILE\" | grep -m 1 \"audio (A_DTS)\" | cut -d ":" -f 1 | cut -d \" \" -f 3" ++ doprint "> mkvmerge -i \"$MKVFILE\" | grep -m 1 \"${AUDIOTRACKPREFIX}DTS)\" | cut -d ":" -f 1 | cut -d \" \" -f 3" + DTSTRACK="DTSTRACK" #Value for debugging + dopause + if [ $EXECUTE = 1 ]; then +- DTSTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "audio (A_DTS)" | cut -d ":" -f 1 | cut -d " " -f 3) ++ DTSTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "${AUDIOTRACKPREFIX}DTS)" | cut -d ":" -f 1 | cut -d " " -f 3) + + # Check to make sure there is a DTS track in the MVK + if [ -z $DTSTRACK ]; then +@@ -405,10 +415,10 @@ if [ -z $DTSTRACK ]; then + else + # Checks to make sure the command line argument track id is valid + doprint $"Checking to see if DTS track specified via arguments is valid." +- doprint "> mkvmerge -i \"$MKVFILE\" | grep \"Track ID $DTSTRACK: audio (A_DTS)\"" ++ doprint "> mkvmerge -i \"$MKVFILE\" | grep \"Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS)\"" + dopause + if [ $EXECUTE = 1 ]; then +- VALID=$(mkvmerge -i "$MKVFILE" | grep "Track ID $DTSTRACK: audio (A_DTS)") ++ VALID=$(mkvmerge -i "$MKVFILE" | grep "Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS)") + + if [ -z "$VALID" ]; then + error $"Track ID '$DTSTRACK' is not a DTS track and/or does not exist." +@@ -555,14 +565,14 @@ else + # If user doesn't want the original DTS track drop it + if [ $NODTS ]; then + # Count the number of audio tracks in the file +- AUDIOTRACKS=$(mkvmerge -i "$MKVFILE" | grep "audio (A_" | wc -l) ++ AUDIOTRACKS=$(mkvmerge -i "$MKVFILE" | grep "$AUDIOTRACKPREFIX" | wc -l) + + if [ $AUDIOTRACKS -eq 1 ]; then + # If there is only the DTS audio track then drop all audio tracks + CMD="$CMD -A" + else + # Get a list of all the other audio tracks +- SAVETRACKS=$(mkvmerge -i "$MKVFILE" | grep "audio (A_" | cut -d ":" -f 1 | grep -vx "Track ID $DTSTRACK" | cut -d " " -f 3 | awk '{ if (T == "") T=$1; else T=T","$1 } END { print T }') ++ SAVETRACKS=$(mkvmerge -i "$MKVFILE" | grep "$AUDIOTRACKPREFIX" | cut -d ":" -f 1 | grep -vx "Track ID $DTSTRACK" | cut -d " " -f 3 | awk '{ if (T == "") T=$1; else T=T","$1 } END { print T }') + # And copy only those + CMD="$CMD -a \"$SAVETRACKS\"" + +@@ -576,7 +586,7 @@ else + fi + + # Get track ID of video track +- VIDEOTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "video (V_" | cut -d ":" -f 1 | cut -d " " -f 3) ++ VIDEOTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "$VIDEOTRACKPREFIX" | cut -d ":" -f 1 | cut -d " " -f 3) + # Add original MKV file, set header compression scheme + CMD="$CMD --compression $VIDEOTRACK:$COMP \"$MKVFILE\"" + diff --git a/Patches/moc/01-codec-2.5.2.patch b/Patches/moc/01-codec-2.5.2.patch new file mode 100644 index 0000000000000..8c1a833cb9640 --- /dev/null +++ b/Patches/moc/01-codec-2.5.2.patch @@ -0,0 +1,91 @@ +diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c +index 7b90493..f1db552 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.c ++++ b/decoder_plugins/ffmpeg/ffmpeg.c +@@ -965,7 +965,20 @@ static void *ffmpeg_open (const char *file) + } + + data->stream = data->ic->streams[audio_ix]; +- data->enc = data->stream->codec; ++ ++ data->enc = avcodec_alloc_context3 (NULL); ++ if (!data->enc) { ++ decoder_error (&data->error, ERROR_FATAL, 0, ++ "Failed to allocate codec context"); ++ goto end; ++ } ++ ++ err = avcodec_copy_context (data->enc, data->stream->codec); ++ if (err < 0) { ++ decoder_error (&data->error, ERROR_FATAL, 0, ++ "Failed to copy codec context"); ++ goto end; ++ } + + data->codec = avcodec_find_decoder (data->enc->codec_id); + if (!data->codec) { +@@ -1019,7 +1032,6 @@ static void *ffmpeg_open (const char *file) + decoder_error (&data->error, ERROR_FATAL, 0, + "Unsupported sample size!"); + #endif +- avcodec_close (data->enc); + goto end; + } + +@@ -1034,7 +1046,6 @@ static void *ffmpeg_open (const char *file) + ffmpeg_log_repeats (NULL); + decoder_error (&data->error, ERROR_FATAL, 0, + "Broken WAV file; use W64!"); +- avcodec_close (data->enc); + goto end; + } + +@@ -1056,6 +1067,12 @@ static void *ffmpeg_open (const char *file) + return data; + + end: ++#ifdef HAVE_AVCODEC_FREE_CONTEXT ++ avcodec_free_context (&data->enc); ++#else ++ avcodec_close (data->enc); ++ av_freep (&data->enc); ++#endif + #ifdef HAVE_AVFORMAT_CLOSE_INPUT + avformat_close_input (&data->ic); + #else +@@ -1403,7 +1420,7 @@ static bool seek_in_stream (struct ffmpeg_data *data, int sec) + return false; + } + +- avcodec_flush_buffers (data->stream->codec); ++ avcodec_flush_buffers (data->enc); + + return true; + } +@@ -1526,7 +1543,12 @@ static void ffmpeg_close (void *prv_data) + struct ffmpeg_data *data = (struct ffmpeg_data *)prv_data; + + if (data->okay) { ++#ifdef HAVE_AVCODEC_FREE_CONTEXT ++ avcodec_free_context (&data->enc); ++#else + avcodec_close (data->enc); ++ av_freep (&data->enc); ++#endif + #ifdef HAVE_AVFORMAT_CLOSE_INPUT + avformat_close_input (&data->ic); + #else +diff --git a/decoder_plugins/ffmpeg/ffmpeg.m4 b/decoder_plugins/ffmpeg/ffmpeg.m4 +index 91e9360..2c60d4a 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.m4 ++++ b/decoder_plugins/ffmpeg/ffmpeg.m4 +@@ -137,6 +137,9 @@ then + AC_SEARCH_LIBS(avcodec_free_frame, avcodec, + [AC_DEFINE([HAVE_AVCODEC_FREE_FRAME], 1, + [Define to 1 if you have the `avcodec_free_frame' function.])]) ++ AC_SEARCH_LIBS(avcodec_free_context, avcodec, ++ [AC_DEFINE([HAVE_AVCODEC_FREE_CONTEXT], 1, ++ [Define to 1 if you have the `avcodec_free_context' function.])]) + AC_CHECK_DECLS([CODEC_ID_PCM_S8], , , + [#include ]) + AC_CHECK_DECLS([CODEC_ID_PCM_S8_PLANAR], , , diff --git a/Patches/moc/02-codecpar-2.5.2.patch b/Patches/moc/02-codecpar-2.5.2.patch new file mode 100644 index 0000000000000..77e97616044a1 --- /dev/null +++ b/Patches/moc/02-codecpar-2.5.2.patch @@ -0,0 +1,58 @@ +diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c +index f1db552..93ac7e7 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.c ++++ b/decoder_plugins/ffmpeg/ffmpeg.c +@@ -309,11 +309,15 @@ static unsigned int find_first_audio (AVFormatContext *ic) + assert (ic); + + for (result = 0; result < ic->nb_streams; result += 1) { +-#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(50,15,1) +- if (ic->streams[result]->codec->codec_type == CODEC_TYPE_AUDIO) ++ enum AVMediaType codec_type; ++ ++#ifdef HAVE_STRUCT_AVSTREAM_CODECPAR ++ codec_type = ic->streams[result]->codecpar->codec_type; + #else +- if (ic->streams[result]->codec->codec_type == AVMEDIA_TYPE_AUDIO) ++ codec_type = ic->streams[result]->codec->codec_type; + #endif ++ ++ if (codec_type == AVMEDIA_TYPE_AUDIO) + { + break; + } +@@ -973,12 +977,21 @@ static void *ffmpeg_open (const char *file) + goto end; + } + ++#ifdef HAVE_STRUCT_AVSTREAM_CODECPAR ++ err = avcodec_parameters_to_context (data->enc, data->stream->codecpar); ++ if (err < 0) { ++ decoder_error (&data->error, ERROR_FATAL, 0, ++ "Failed to copy codec parameters"); ++ goto end; ++ } ++#else + err = avcodec_copy_context (data->enc, data->stream->codec); + if (err < 0) { + decoder_error (&data->error, ERROR_FATAL, 0, + "Failed to copy codec context"); + goto end; + } ++#endif + + data->codec = avcodec_find_decoder (data->enc->codec_id); + if (!data->codec) { +diff --git a/decoder_plugins/ffmpeg/ffmpeg.m4 b/decoder_plugins/ffmpeg/ffmpeg.m4 +index 2c60d4a..cf818d3 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.m4 ++++ b/decoder_plugins/ffmpeg/ffmpeg.m4 +@@ -140,6 +140,8 @@ then + AC_SEARCH_LIBS(avcodec_free_context, avcodec, + [AC_DEFINE([HAVE_AVCODEC_FREE_CONTEXT], 1, + [Define to 1 if you have the `avcodec_free_context' function.])]) ++ AC_CHECK_MEMBERS([struct AVStream.codecpar], [], [], ++ [#include ]) + AC_CHECK_DECLS([CODEC_ID_PCM_S8], , , + [#include ]) + AC_CHECK_DECLS([CODEC_ID_PCM_S8_PLANAR], , , diff --git a/Patches/moc/03-defines-2.5.2.patch b/Patches/moc/03-defines-2.5.2.patch new file mode 100644 index 0000000000000..6e929e9634409 --- /dev/null +++ b/Patches/moc/03-defines-2.5.2.patch @@ -0,0 +1,50 @@ +diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c +index 93ac7e7..4ea635a 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.c ++++ b/decoder_plugins/ffmpeg/ffmpeg.c +@@ -96,6 +96,16 @@ GCC_DIAG_ON(deprecated-declarations) + #include "files.h" + #include "lists.h" + ++#ifndef AV_CODEC_CAP_DELAY ++# define AV_CODEC_CAP_DELAY CODEC_CAP_DELAY ++# define AV_CODEC_CAP_EXPERIMENTAL CODEC_CAP_EXPERIMENTAL ++# define AV_CODEC_CAP_TRUNCATED CODEC_CAP_TRUNCATED ++#endif ++ ++#ifndef AV_CODEC_FLAG_TRUNCATED ++# define AV_CODEC_FLAG_TRUNCATED CODEC_FLAG_TRUNCATED ++#endif ++ + /* Set SEEK_IN_DECODER to 1 if you'd prefer seeking to be delay until + * the next time ffmpeg_decode() is called. This will provide seeking + * in formats for which FFmpeg falsely reports seek errors, but could +@@ -1010,7 +1020,7 @@ static void *ffmpeg_open (const char *file) + * FFmpeg/LibAV in use. For some versions this will be caught in + * *_find_stream_info() above and misreported as an unfound codec + * parameters error. */ +- if (data->codec->capabilities & CODEC_CAP_EXPERIMENTAL) { ++ if (data->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) { + decoder_error (&data->error, ERROR_FATAL, 0, + "The codec is experimental and may damage MOC: %s", + data->codec->name); +@@ -1019,8 +1029,8 @@ static void *ffmpeg_open (const char *file) + #endif + + set_downmixing (data); +- if (data->codec->capabilities & CODEC_CAP_TRUNCATED) +- data->enc->flags |= CODEC_FLAG_TRUNCATED; ++ if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED) ++ data->enc->flags |= AV_CODEC_FLAG_TRUNCATED; + + #ifdef HAVE_AVCODEC_OPEN2 + if (avcodec_open2 (data->enc, data->codec, NULL) < 0) +@@ -1050,7 +1060,7 @@ static void *ffmpeg_open (const char *file) + + data->sample_width = sfmt_Bps (data->fmt); + +- if (data->codec->capabilities & CODEC_CAP_DELAY) ++ if (data->codec->capabilities & AV_CODEC_CAP_DELAY) + data->delay = true; + data->seek_broken = is_seek_broken (data); + data->timing_broken = is_timing_broken (data->ic); diff --git a/Patches/moc/04-lockmgr-2.5.2.patch b/Patches/moc/04-lockmgr-2.5.2.patch new file mode 100644 index 0000000000000..48af7839fbc8d --- /dev/null +++ b/Patches/moc/04-lockmgr-2.5.2.patch @@ -0,0 +1,44 @@ +diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c +index 4ea635a..f26afab 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.c ++++ b/decoder_plugins/ffmpeg/ffmpeg.c +@@ -430,7 +430,7 @@ static void load_video_extns (lists_t_strs *list) + } + + /* Handle FFmpeg's locking requirements. */ +-#ifdef HAVE_LOCKMGR_REGISTER ++#if HAVE_LIBAV || LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,9,100) + static int locking_cb (void **mutex, enum AVLockOp op) + { + int result; +@@ -514,10 +514,6 @@ static bool is_timing_broken (AVFormatContext *ic) + + static void ffmpeg_init () + { +-#ifdef HAVE_LOCKMGR_REGISTER +- int rc; +-#endif +- + #ifdef DEBUG + av_log_set_level (AV_LOG_INFO); + #else +@@ -531,8 +527,8 @@ static void ffmpeg_init () + load_audio_extns (supported_extns); + load_video_extns (supported_extns); + +-#ifdef HAVE_LOCKMGR_REGISTER +- rc = av_lockmgr_register (locking_cb); ++#if HAVE_LIBAV || LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,9,100) ++ int rc = av_lockmgr_register (locking_cb); + if (rc < 0) + fatal ("Lock manager initialisation failed"); + #endif +@@ -540,7 +536,7 @@ static void ffmpeg_init () + + static void ffmpeg_destroy () + { +-#ifdef HAVE_LOCKMGR_REGISTER ++#if HAVE_LIBAV || LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,9,100) + av_lockmgr_register (NULL); + #endif + diff --git a/Patches/moc/05-audio4-2.5.2.patch b/Patches/moc/05-audio4-2.5.2.patch new file mode 100644 index 0000000000000..3e61df2404838 --- /dev/null +++ b/Patches/moc/05-audio4-2.5.2.patch @@ -0,0 +1,39 @@ +diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c +index f26afab..834967f 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.c ++++ b/decoder_plugins/ffmpeg/ffmpeg.c +@@ -1246,6 +1246,9 @@ static AVPacket *get_packet (struct ffmpeg_data *data) + return NULL; + } + ++#ifdef HAVE_AVCODEC_RECEIVE_FRAME ++ GCC_DIAG_OFF(deprecated-declarations) ++#endif + #ifndef HAVE_AVCODEC_DECODE_AUDIO4 + /* Decode samples from packet data using pre-avcodec_decode_audio4(). */ + static int decode_packet (struct ffmpeg_data *data, AVPacket *pkt, +@@ -1396,6 +1399,10 @@ static int decode_packet (struct ffmpeg_data *data, AVPacket *pkt, + return filled; + } + #endif ++#ifdef HAVE_AVCODEC_RECEIVE_FRAME ++ GCC_DIAG_ON(deprecated-declarations) ++#endif ++ + + #if SEEK_IN_DECODER + static bool seek_in_stream (struct ffmpeg_data *data) +diff --git a/decoder_plugins/ffmpeg/ffmpeg.m4 b/decoder_plugins/ffmpeg/ffmpeg.m4 +index cf818d3..21f6d00 100644 +--- a/decoder_plugins/ffmpeg/ffmpeg.m4 ++++ b/decoder_plugins/ffmpeg/ffmpeg.m4 +@@ -142,6 +142,9 @@ then + [Define to 1 if you have the `avcodec_free_context' function.])]) + AC_CHECK_MEMBERS([struct AVStream.codecpar], [], [], + [#include ]) ++ AC_SEARCH_LIBS(avcodec_receive_frame, avcodec, ++ [AC_DEFINE([HAVE_AVCODEC_RECEIVE_FRAME], 1, ++ [Define to 1 if you have the `avcodec_receive_frame' function.])]) + AC_CHECK_DECLS([CODEC_ID_PCM_S8], , , + [#include ]) + AC_CHECK_DECLS([CODEC_ID_PCM_S8_PLANAR], , , diff --git a/Patches/movgrab/libUseful_xattr_backport.diff b/Patches/movgrab/libUseful_xattr_backport.diff new file mode 100644 index 0000000000000..0dca0559fb122 --- /dev/null +++ b/Patches/movgrab/libUseful_xattr_backport.diff @@ -0,0 +1,36 @@ +diff --git a/libUseful-2.8/FileSystem.c b/libUseful-2.8/FileSystem.c +index 447db4c..487fc22 100755 +--- a/libUseful-2.8/FileSystem.c ++++ b/libUseful-2.8/FileSystem.c +@@ -237,11 +237,19 @@ char *FileGetXAttribute(char *RetStr, const char *Path, const char *Name) + int len; + + #ifdef HAVE_XATTR ++ #ifdef __APPLE__ //'cos some idiot's always got to 'think different' ++len=getxattr(Path, Name, NULL, 0, 0, 0); ++ #else + len=getxattr(Path, Name, NULL, 0); ++ #endif + if (len > 0) + { + RetStr=SetStrLen(RetStr,len); ++ #ifdef __APPLE__ ++ getxattr(Path, Name, RetStr, len, 0, 0); ++ #else + getxattr(Path, Name, RetStr, len); ++ #endif + } + else RetStr=CopyStr(RetStr, ""); + #else +@@ -256,7 +264,11 @@ int FileSetXAttribute(const char *Path, const char *Name, const char *Value, int + { + #ifdef HAVE_XATTR + if (Len==0) Len=StrLen(Value); ++ #ifdef __APPLE__ ++return(setxattr(Path, Name, Value, Len, 0, 0)); ++ #else + return(setxattr(Path, Name, Value, Len, 0)); ++ #endif + #else + RaiseError(0, "FileSetXAttribute", "xattr support not compiled in"); + #endif diff --git a/Patches/movgrab/linker.patch b/Patches/movgrab/linker.patch new file mode 100644 index 0000000000000..bf508beaf5bb4 --- /dev/null +++ b/Patches/movgrab/linker.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile.in b/Makefile.in +index 04ea67d..5516051 100755 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,7 +11,7 @@ OBJ=common.o settings.o containerfiles.o outputfiles.o servicetypes.o extract_te + + all: $(OBJ) + @cd libUseful-2.8; $(MAKE) +- $(CC) $(FLAGS) -o movgrab main.c $(LIBS) $(OBJ) libUseful-2.8/libUseful-2.8.a ++ $(CC) $(FLAGS) -o movgrab main.c $(OBJ) libUseful-2.8/libUseful-2.8.a $(LIBS) + + clean: + @rm -f movgrab *.o libUseful-2.8/*.o libUseful-2.8/*.a libUseful-2.8/*.so config.log config.status +diff --git a/libUseful-2.8/DataProcessing.c b/libUseful-2.8/DataProcessing.c +index 3e188a8..56087a6 100755 +--- a/libUseful-2.8/DataProcessing.c ++++ b/libUseful-2.8/DataProcessing.c +@@ -420,8 +420,8 @@ switch(val) + + if (Data->Cipher) + { +-Data->enc_ctx=(EVP_CIPHER_CTX *) calloc(1,sizeof(EVP_CIPHER_CTX)); +-Data->dec_ctx=(EVP_CIPHER_CTX *) calloc(1,sizeof(EVP_CIPHER_CTX)); ++Data->enc_ctx=EVP_CIPHER_CTX_new(); ++Data->dec_ctx=EVP_CIPHER_CTX_new(); + EVP_CIPHER_CTX_init(Data->enc_ctx); + EVP_CIPHER_CTX_init(Data->dec_ctx); + Data->BlockSize=EVP_CIPHER_block_size(Data->Cipher); diff --git a/Patches/movgrab/pointer-conv.patch b/Patches/movgrab/pointer-conv.patch new file mode 100644 index 0000000000000..84e962353e5e2 --- /dev/null +++ b/Patches/movgrab/pointer-conv.patch @@ -0,0 +1,45 @@ +diff --git a/libUseful-2.8/ConnectionChain.c b/libUseful-2.8/ConnectionChain.c +index 1475dba..ac0cbdf 100755 +--- a/libUseful-2.8/ConnectionChain.c ++++ b/libUseful-2.8/ConnectionChain.c +@@ -363,8 +363,8 @@ if (Type==CONNECT_HOP_SSHTUNNEL) + //Host will be Token, and port Token2 + ParseConnectDetails(NextHop, NULL, &Token, &Token2, NULL, NULL, NULL); + Tempstr=FormatStr(Tempstr,"tunnel:%d:%s:%s ",TunnelPort,Token,Token2); +- tmpS=SSHConnect(Host, Port, User, Pass, Tempstr); +- if (tmpS) ++ int sshConnectResult=SSHConnect(Host, Port, User, Pass, Tempstr); ++ if (sshConnectResult) + { + for (i=0; i < 30; i++) + { +diff --git a/libUseful-2.8/Terminal.c b/libUseful-2.8/Terminal.c +index 78db6d7..faf2028 100755 +--- a/libUseful-2.8/Terminal.c ++++ b/libUseful-2.8/Terminal.c +@@ -304,7 +304,11 @@ char *Tempstr=NULL; + if (Char <= 0x7f) + { + if (S) STREAMWriteChar(S, Char); +- else write(1, Char, 1); ++ else ++ { ++ char ch = Char; ++ write(1, &ch, 1); ++ } + } + else + { +diff --git a/main.c b/main.c +index 8bb3912..edbb4a4 100755 +--- a/main.c ++++ b/main.c +@@ -36,7 +36,7 @@ int Type=TYPE_NONE; + + + +-main(int argc, char *argv[]) ++int main(int argc, char *argv[]) + { + ListNode *Curr, *Next; + int OverrideType=TYPE_NONE; diff --git a/Patches/mp3info/patch-mp3tech.c.diff b/Patches/mp3info/patch-mp3tech.c.diff new file mode 100644 index 0000000000000..a3e874c5cf73a --- /dev/null +++ b/Patches/mp3info/patch-mp3tech.c.diff @@ -0,0 +1,11 @@ +--- ../mp3info-0.8.5a/mp3tech.c 2006-11-05 22:05:30.000000000 -0600 ++++ mp3tech.c 2007-11-30 12:28:52.000000000 -0600 +@@ -279,7 +279,7 @@ + } + + int sameConstant(mp3header *h1, mp3header *h2) { +- if((*(uint*)h1) == (*(uint*)h2)) return 1; ++ if((*(unsigned int*)h1) == (*(unsigned int*)h2)) return 1; + + if((h1->version == h2->version ) && + (h1->layer == h2->layer ) && diff --git a/Patches/mpack/linux.patch b/Patches/mpack/linux.patch new file mode 100644 index 0000000000000..f2b4b0de5359f --- /dev/null +++ b/Patches/mpack/linux.patch @@ -0,0 +1,76 @@ +diff --git a/unixos.c b/unixos.c +index 243a7be..c7008d6 100644 +--- a/unixos.c ++++ b/unixos.c +@@ -23,6 +23,7 @@ + * SOFTWARE. + */ + #include ++#include + #include + #include + #include +@@ -38,10 +39,6 @@ + #define MAXHOSTNAMELEN 64 + #endif + +-extern int errno; +-extern char *malloc(); +-extern char *getenv(); +- + int overwrite_files = 0; + int didchat; + +diff --git a/unixpk.c b/unixpk.c +index 144e34d..1c70779 100644 +--- a/unixpk.c ++++ b/unixpk.c +@@ -23,6 +23,9 @@ + * SOFTWARE. + */ + #include ++#include ++#include ++#include + #include + #include + #include "common.h" +@@ -31,12 +34,6 @@ + + #define MAXADDRESS 100 + +-extern char *getenv(); +- +-extern int errno; +-extern int optind; +-extern char *optarg; +- + void usage(void); + void sendmail(FILE *infile, char **addr, int start); + void inews(FILE *infile); +diff --git a/unixunpk.c b/unixunpk.c +index a1f065b..0f5fa85 100644 +--- a/unixunpk.c ++++ b/unixunpk.c +@@ -23,6 +23,7 @@ + * SOFTWARE. + */ + #include ++#include + #include "version.h" + #include "part.h" + +diff --git a/xmalloc.c b/xmalloc.c +index 7c74360..d5f3909 100644 +--- a/xmalloc.c ++++ b/xmalloc.c +@@ -23,8 +23,8 @@ + * SOFTWARE. + */ + #include ++#include + #include +-extern char *malloc(), *realloc(); + + char *xmalloc (int size) + { diff --git a/Patches/mpack/uudecode.c.patch b/Patches/mpack/uudecode.c.patch new file mode 100644 index 0000000000000..84da043374154 --- /dev/null +++ b/Patches/mpack/uudecode.c.patch @@ -0,0 +1,11 @@ +--- uudecode.c.orig 2003-07-22 06:46:37.000000000 +1000 ++++ uudecode.c 2012-08-01 20:05:39.000000000 +1000 +@@ -845,7 +845,7 @@ int uudecodeline(char *line, FILE *outfi + } + line += 4; + } +- return; ++ return 0; + } + + diff --git a/Patches/mpg321/0.3.2.patch b/Patches/mpg321/0.3.2.patch new file mode 100644 index 0000000000000..ec4f5fe07b182 --- /dev/null +++ b/Patches/mpg321/0.3.2.patch @@ -0,0 +1,27 @@ +--- a/mpg321.h 2012-03-25 05:27:49.000000000 -0700 ++++ b/mpg321.h 2012-11-15 20:54:28.000000000 -0800 +@@ -290,7 +290,7 @@ + /* Shared total decoded frames */ + decoded_frames *Decoded_Frames; + +-#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) ++#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) || defined(__APPLE__) + /* */ + #else + union semun { +--- a/network.c 2012-03-25 05:27:49.000000000 -0700 ++++ b/network.c 2012-11-15 20:58:02.000000000 -0800 +@@ -50,6 +50,13 @@ + + #define IFVERB if(options.opt & MPG321_VERBOSE_PLAY) + ++/* The following defines are needed to emulate the Linux interface on ++ * BSD-based systems like FreeBSD and OS X */ ++#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP) ++#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP ++#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP ++#endif ++ + int proxy_enable = 0; + char *proxy_server; + int auth_enable = 0; diff --git a/Patches/musepack/r479.patch b/Patches/musepack/r479.patch new file mode 100644 index 0000000000000..0c15f2a1158cd --- /dev/null +++ b/Patches/musepack/r479.patch @@ -0,0 +1,17 @@ +Index: libmpcdec/requant.h +=================================================================== +--- libmpcdec/requant.h (revision 478) ++++ libmpcdec/requant.h (revision 479) +@@ -47,9 +47,9 @@ + + + /* C O N S T A N T S */ +-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer +-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients +-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset ++extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer ++extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients ++extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset + + #define Cc (__Cc + 1) + #define Dc (__Dc + 1) diff --git a/Patches/musepack/r482.patch b/Patches/musepack/r482.patch new file mode 100644 index 0000000000000..dbbb08f84d62b --- /dev/null +++ b/Patches/musepack/r482.patch @@ -0,0 +1,53 @@ +Index: include/CMakeLists.txt +=================================================================== +--- include/CMakeLists.txt (revision 481) ++++ include/CMakeLists.txt (nonexistent) +@@ -1 +0,0 @@ +-INSTALL(DIRECTORY mpc DESTINATION include) +Index: libmpcdec/Makefile.am +=================================================================== +--- libmpcdec/Makefile.am (revision 481) ++++ libmpcdec/Makefile.am (revision 482) +@@ -16,4 +16,5 @@ + mpc_bits_reader.h huffman.h decoder.h internal.h requant.h mpcdec_math.h \ + $(common_sources) + ++# version info shoud match the one in CMakeLists.txt + libmpcdec_la_LDFLAGS = -no-undefined -version-info 7:0:1 +Index: libmpcdec/CMakeLists.txt +=================================================================== +--- libmpcdec/CMakeLists.txt (revision 481) ++++ libmpcdec/CMakeLists.txt (revision 482) +@@ -1,7 +1,23 @@ ++SET(mpcdec_VERSION_MAJOR 7) ++SET(mpcdec_VERSION_MINOR 0) ++SET(mpcdec_VERSION_PATCH 1) ++ ++set(mpcdec_VERSION ${mpcdec_VERSION_MAJOR}.${mpcdec_VERSION_MINOR}.${mpcdec_VERSION_PATCH}) ++ + include_directories(${libmpc_SOURCE_DIR}/include) ++install(FILES ++ ${libmpc_SOURCE_DIR}/include/mpc/mpcdec.h ++ ${libmpc_SOURCE_DIR}/include/mpc/reader.h ++ ${libmpc_SOURCE_DIR}/include/mpc/streaminfo.h ++ ${libmpc_SOURCE_DIR}/include/mpc/mpc_types.h ++ DESTINATION include/mpc COMPONENT headers) ++ + if(SHARED) + add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ set_target_properties(mpcdec PROPERTIES VERSION ${mpcdec_VERSION} SOVERSION ${mpcdec_VERSION_MAJOR}) ++ install(TARGETS mpcdec LIBRARY DESTINATION "lib" COMPONENT libraries) + else(SHARED) + add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ install(TARGETS mpcdec_static ARCHIVE DESTINATION "lib/static" COMPONENT libraries) + endif(SHARED) + +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt (revision 481) ++++ CMakeLists.txt (revision 482) +@@ -30,4 +30,3 @@ + add_subdirectory(mpccut) + add_subdirectory(mpcchap) + add_subdirectory(wavcmp) +-add_subdirectory(include) diff --git a/Patches/musepack/r491.patch b/Patches/musepack/r491.patch new file mode 100644 index 0000000000000..8ea597dd53fa4 --- /dev/null +++ b/Patches/musepack/r491.patch @@ -0,0 +1,33 @@ +Index: libmpcdec/CMakeLists.txt +=================================================================== +--- libmpcdec/CMakeLists.txt (revision 490) ++++ libmpcdec/CMakeLists.txt (revision 491) +@@ -4,7 +4,6 @@ + + set(mpcdec_VERSION ${mpcdec_VERSION_MAJOR}.${mpcdec_VERSION_MINOR}.${mpcdec_VERSION_PATCH}) + +-include_directories(${libmpc_SOURCE_DIR}/include) + install(FILES + ${libmpc_SOURCE_DIR}/include/mpc/mpcdec.h + ${libmpc_SOURCE_DIR}/include/mpc/reader.h +@@ -12,12 +11,16 @@ + ${libmpc_SOURCE_DIR}/include/mpc/mpc_types.h + DESTINATION include/mpc COMPONENT headers) + ++include_directories(${libmpc_SOURCE_DIR}/include) + if(SHARED) +- add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) +- set_target_properties(mpcdec PROPERTIES VERSION ${mpcdec_VERSION} SOVERSION ${mpcdec_VERSION_MAJOR}) +- install(TARGETS mpcdec LIBRARY DESTINATION "lib" COMPONENT libraries) ++ add_library(mpcdec_shared SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ set_target_properties(mpcdec_shared PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION ${mpcdec_VERSION} SOVERSION ${mpcdec_VERSION_MAJOR}) ++ install(TARGETS mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}" COMPONENT libraries) ++ target_link_libraries(mpcdec_shared m) + else(SHARED) + add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) +- install(TARGETS mpcdec_static ARCHIVE DESTINATION "lib/static" COMPONENT libraries) ++ set_target_properties(mpcdec_static PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1) ++ install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}" COMPONENT libraries) ++ target_link_libraries(mpcdec_static m) + endif(SHARED) + diff --git a/Patches/nutcracker/use-system-libyaml.patch b/Patches/nutcracker/use-system-libyaml.patch new file mode 100644 index 0000000000000..24c827eed2534 --- /dev/null +++ b/Patches/nutcracker/use-system-libyaml.patch @@ -0,0 +1,84 @@ +From c82c8d540545c8f0f6535e2e2d8bb661936c2034 Mon Sep 17 00:00:00 2001 +From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> +Date: Wed, 21 Jul 2021 17:32:00 +0800 +Subject: [PATCH] Use system libyaml + +Adapted from Debian's patch at + + https://sources.debian.org/patches/nutcracker/0.4.1+dfsg-1/use_system_libyaml/ +--- + Makefile.am | 2 +- + configure.ac | 7 ------- + src/Makefile.am | 5 +---- + 3 files changed, 2 insertions(+), 12 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 5869974..237405e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in config.h.in~ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = contrib src ++SUBDIRS = src + + dist_man_MANS = man/nutcracker.8 + +diff --git a/configure.ac b/configure.ac +index 0f96dba..8634435 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -197,15 +197,8 @@ AS_IF([test "x$disable_stats" = xyes], + [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])]) + AC_MSG_RESULT($disable_stats) + +-# Untar the yaml-0.2.5 in contrib/ before config.status is rerun +-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.2.5.tar.gz -C contrib]) +- +-# Call yaml-0.2.5 ./configure recursively +-AC_CONFIG_SUBDIRS([contrib/yaml-0.2.5]) +- + # Define Makefiles + AC_CONFIG_FILES([Makefile +- contrib/Makefile + src/Makefile + src/hashkit/Makefile + src/proto/Makefile +diff --git a/src/Makefile.am b/src/Makefile.am +index dd07a25..e32be10 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -7,7 +7,6 @@ endif + AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit + AM_CPPFLAGS += -I $(top_srcdir)/src/proto + AM_CPPFLAGS += -I $(top_srcdir)/src/event +-AM_CPPFLAGS += -I $(top_srcdir)/contrib/yaml-0.2.5/include + + AM_CFLAGS = + # about -fno-strict-aliasing: https://github.com/twitter/twemproxy/issues/276 +@@ -22,7 +21,7 @@ AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissin + AM_CFLAGS += -Wno-format-zero-length + + AM_LDFLAGS = +-AM_LDFLAGS += -lm -lpthread -rdynamic ++AM_LDFLAGS += -lm -lpthread -lyaml -rdynamic + if OS_SOLARIS + AM_LDFLAGS += -lnsl -lsocket + endif +@@ -58,7 +57,6 @@ nutcracker_SOURCES = \ + nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a + nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a + nutcracker_LDADD += $(top_builddir)/src/event/libevent.a +-nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.2.5/src/.libs/libyaml.a + + TESTS = test_all + bin_PROGRAMS = test_all +@@ -86,4 +84,3 @@ test_all_SOURCES = test_all.c \ + test_all_LDADD = $(top_builddir)/src/hashkit/libhashkit.a + test_all_LDADD += $(top_builddir)/src/proto/libproto.a + test_all_LDADD += $(top_builddir)/src/event/libevent.a +-test_all_LDADD += $(top_builddir)/contrib/yaml-0.2.5/src/.libs/libyaml.a +-- +2.32.0 + diff --git a/Patches/nvi/patch-common__db.h b/Patches/nvi/patch-common__db.h new file mode 100644 index 0000000000000..a347dfb99783c --- /dev/null +++ b/Patches/nvi/patch-common__db.h @@ -0,0 +1,14 @@ +--- common/db.h.orig 2009-09-13 23:17:35.000000000 -0700 ++++ common/db.h 2009-09-13 23:18:27.000000000 -0700 +@@ -16,7 +16,10 @@ + (env)->remove(env, path, NULL, flags) + #endif + +-#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 ++#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 4 ++#define db_open(db,file,type,flags,mode) \ ++ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode) ++#elif DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 + #define db_open(db,file,type,flags,mode) \ + (db)->open(db, NULL, file, NULL, type, flags, mode) + #else diff --git a/Patches/nvi/patch-dist__port.h.in b/Patches/nvi/patch-dist__port.h.in new file mode 100644 index 0000000000000..e0ed731b1ee2d --- /dev/null +++ b/Patches/nvi/patch-dist__port.h.in @@ -0,0 +1,13 @@ +--- dist/port.h.in.orig 2009-09-14 11:37:02.000000000 -0700 ++++ dist/port.h.in 2009-09-14 11:37:12.000000000 -0700 +@@ -184,10 +184,6 @@ + #endif + #endif + +-#ifndef HAVE_MEMCPY +-#define memcpy memmove +-#endif +- + #ifdef NEED_FPRINTF_PROTO + extern int fprintf( FILE *, const char *, ... ); + #endif diff --git a/Patches/nvi/patch-ex_script.c.diff b/Patches/nvi/patch-ex_script.c.diff new file mode 100644 index 0000000000000..2b40434fb771b --- /dev/null +++ b/Patches/nvi/patch-ex_script.c.diff @@ -0,0 +1,24 @@ +--- ex/ex_script.c.orig 2007-11-18 10:41:42.000000000 -0600 ++++ ex/ex_script.c 2007-12-23 07:24:58.000000000 -0600 +@@ -12,6 +12,10 @@ + + #include "config.h" + ++#ifdef __APPLE__ ++#undef HAVE_SYS5_PTY ++#endif ++ + #ifndef lint + static const char sccsid[] = "$Id: ex_script.c,v 10.38 2001/06/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:19 $"; + #endif /* not lint */ +@@ -45,6 +49,10 @@ + #include "script.h" + #include "pathnames.h" + ++#ifdef __APPLE__ ++#undef HAVE_SYS5_PTY ++#endif ++ + static void sscr_check __P((SCR *)); + static int sscr_getprompt __P((SCR *)); + static int sscr_init __P((SCR *)); diff --git a/Patches/ogmtools/common.h.diff b/Patches/ogmtools/common.h.diff new file mode 100644 index 0000000000000..00bee4fbe1f26 --- /dev/null +++ b/Patches/ogmtools/common.h.diff @@ -0,0 +1,10 @@ +--- common.h.orig 2003-11-21 09:21:36.000000000 +1100 ++++ common.h 2011-03-04 07:45:16.000000000 +1100 +@@ -23,6 +23,7 @@ extern "C" { + #ifdef NEED_FSEEKO + #include + #endif ++#include + #include + #include "ogmstreams.h" + diff --git a/Patches/oscats/linux.patch b/Patches/oscats/linux.patch new file mode 100644 index 0000000000000..2d002f74fa4ec --- /dev/null +++ b/Patches/oscats/linux.patch @@ -0,0 +1,88 @@ +diff --git a/src/liboscats/algorithms/closest_diff.c b/src/liboscats/algorithms/closest_diff.c +index 86f7f2f..97de5d9 100644 +--- a/src/liboscats/algorithms/closest_diff.c ++++ b/src/liboscats/algorithms/closest_diff.c +@@ -175,7 +175,7 @@ static gdouble criterion(const OscatsItem *item, OscatsExaminee *e, + return oscats_model_distance(model, theta, e->covariates); + } + +-static gint select (OscatsTest *test, OscatsExaminee *e, ++static gint select_algorithm (OscatsTest *test, OscatsExaminee *e, + GBitArray *eligible, gpointer alg_data) + { + return oscats_alg_chooser_choose(OSCATS_ALG_CLOSEST_DIFF(alg_data)->chooser, +@@ -194,7 +194,7 @@ static void alg_register (OscatsAlgorithm *alg_data, OscatsTest *test) + OscatsAlgClosestDiff *self = OSCATS_ALG_CLOSEST_DIFF(alg_data); + self->chooser->bank = g_object_ref(test->itembank); + self->chooser->criterion = (OscatsAlgChooserCriterion)criterion; +- g_signal_connect_data(test, "select", G_CALLBACK(select), ++ g_signal_connect_data(test, "select", G_CALLBACK(select_algorithm), + alg_data, oscats_algorithm_closure_finalize, 0); + } + +diff --git a/src/liboscats/algorithms/max_fisher.c b/src/liboscats/algorithms/max_fisher.c +index 16c8b39..0835bf6 100644 +--- a/src/liboscats/algorithms/max_fisher.c ++++ b/src/liboscats/algorithms/max_fisher.c +@@ -265,7 +265,7 @@ static gdouble criterion(const OscatsItem *item, + // max det[sum I_j(theta)] <==> min -det[sum I_j(theta)] + } + +-static gint select (OscatsTest *test, OscatsExaminee *e, ++static gint select_algorithm (OscatsTest *test, OscatsExaminee *e, + GBitArray *eligible, gpointer alg_data) + { + OscatsAlgMaxFisher *self = OSCATS_ALG_MAX_FISHER(alg_data); +@@ -298,7 +298,7 @@ static void alg_register (OscatsAlgorithm *alg_data, OscatsTest *test) + + g_signal_connect_data(test, "initialize", G_CALLBACK(initialize), + alg_data, oscats_algorithm_closure_finalize, 0); +- g_signal_connect_data(test, "select", G_CALLBACK(select), ++ g_signal_connect_data(test, "select", G_CALLBACK(select_algorithm), + alg_data, oscats_algorithm_closure_finalize, 0); + g_object_ref(alg_data); + } +diff --git a/src/liboscats/algorithms/max_kl.c b/src/liboscats/algorithms/max_kl.c +index ac9a53e..95c74a3 100644 +--- a/src/liboscats/algorithms/max_kl.c ++++ b/src/liboscats/algorithms/max_kl.c +@@ -623,7 +623,7 @@ static gdouble criterion(const OscatsItem *item, + alg_data); + } + +-static gint select (OscatsTest *test, OscatsExaminee *e, ++static gint select_algorithm (OscatsTest *test, OscatsExaminee *e, + GBitArray *eligible, gpointer alg_data) + { + OscatsAlgMaxKl *self = OSCATS_ALG_MAX_KL(alg_data); +@@ -661,7 +661,7 @@ static void alg_register (OscatsAlgorithm *alg_data, OscatsTest *test) + + g_signal_connect_data(test, "initialize", G_CALLBACK(initialize), + alg_data, oscats_algorithm_closure_finalize, 0); +- g_signal_connect_data(test, "select", G_CALLBACK(select), ++ g_signal_connect_data(test, "select", G_CALLBACK(select_algorithm), + alg_data, oscats_algorithm_closure_finalize, 0); + g_object_ref(alg_data); + } +diff --git a/src/liboscats/algorithms/pick_rand.c b/src/liboscats/algorithms/pick_rand.c +index 1e66758..ef6234c 100644 +--- a/src/liboscats/algorithms/pick_rand.c ++++ b/src/liboscats/algorithms/pick_rand.c +@@ -35,7 +35,7 @@ static void oscats_alg_pick_rand_init (OscatsAlgPickRand *self) + { + } + +-static gint select (OscatsTest *test, OscatsExaminee *e, ++static gint select_algorithm (OscatsTest *test, OscatsExaminee *e, + GBitArray *eligible, gpointer alg_data) + { + guint i, item = 0; +@@ -55,7 +55,7 @@ static gint select (OscatsTest *test, OscatsExaminee *e, + */ + static void alg_register (OscatsAlgorithm *alg_data, OscatsTest *test) + { +- g_signal_connect_data(test, "select", G_CALLBACK(select), ++ g_signal_connect_data(test, "select", G_CALLBACK(select_algorithm), + alg_data, oscats_algorithm_closure_finalize, 0); + } + diff --git a/Patches/plank/1.6.patch b/Patches/plank/1.6.patch new file mode 100644 index 0000000000000..df8a0f08664a2 --- /dev/null +++ b/Patches/plank/1.6.patch @@ -0,0 +1,341 @@ +diff --git a/Sources/Core/ObjectiveCInitExtension.swift b/Sources/Core/ObjectiveCInitExtension.swift +index b860031..4ef0c8f 100644 +--- a/Sources/Core/ObjectiveCInitExtension.swift ++++ b/Sources/Core/ObjectiveCInitExtension.swift +@@ -23,11 +23,21 @@ extension ObjCModelRenderer { + } + } + ++ func renderModelObjectWithDictionaryError() -> ObjCIR.Method { ++ return ObjCIR.method("+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dictionary error:(NSError *__autoreleasing *)error") { ++ ["return [[self alloc] initWithModelDictionary:dictionary error:error];"] ++ } ++ } ++ + func renderDesignatedInit() -> ObjCIR.Method { + return ObjCIR.method("- (instancetype)init") { +- [ +- "return [self initWithModelDictionary:@{}];", +- ] ++ ["return [self initWithModelDictionary:@{} error:NULL];"] ++ } ++ } ++ ++ func renderInitWithModelDictionary() -> ObjCIR.Method { ++ return ObjCIR.method("- (instancetype)initWithModelDictionary:(NSDictionary *)modelDictionary") { ++ ["return [self initWithModelDictionary:modelDictionary error:NULL];"] + } + } + +@@ -66,29 +76,68 @@ extension ObjCModelRenderer { + } + } + +- public func renderInitWithModelDictionary() -> ObjCIR.Method { ++ func expectedObjectType(schema: Schema) -> String? { ++ switch schema { ++ case .object, ++ .map(valueType: _): ++ return "NSDictionary" ++ case .array(itemType: _), ++ .set(itemType: _): ++ return "NSArray" ++ case .integer, ++ .float, ++ .boolean, ++ .enumT(.integer): ++ return "NSNumber" ++ case .string(format: _), ++ .enumT(.string): ++ return "NSString" ++ default: ++ return nil ++ } ++ } ++ ++ public func renderInitWithModelDictionaryError() -> ObjCIR.Method { + func renderPropertyInit( + _ propertyToAssign: String, + _ rawObjectName: String, ++ keyPath: [String], + schema: Schema, + firstName: String, // TODO: HACK to get enums to work (not clean) +- counter: Int = 0 ++ counter: Int = 0, ++ dirtyPropertyName: String? = nil, ++ needsTypeCheck: Bool = true + ) -> [String] { ++ func renderTypeCheck(_ body: () -> [String]) -> [String] { ++ guard needsTypeCheck else { return body() } ++ guard let kindOf = expectedObjectType(schema: schema) else { return body() } ++ let key = keyPath.count == 1 ? keyPath[0] : "[@[\(keyPath.joined(separator: ", "))] componentsJoinedByString:@\".\"]" ++ return [ ++ ObjCIR.ifStmt("!error || [\(rawObjectName) isKindOfClass:[\(kindOf) class]]", body: body) + ++ ObjCIR.elseStmt { ++ ((dirtyPropertyName != nil) ? ["self->_\(dirtyPropertiesIVarName).\(dirtyPropertyOption(propertyName: dirtyPropertyName!, className: className)) = 0;"] : []) + ++ ["*error = PlankTypeError(\(key), [\(kindOf) class], [\(rawObjectName) class]);"] ++ ++ }, ++ ] ++ } ++ + switch schema { + case let .array(itemType: .some(itemType)): + let currentResult = "result\(counter)" + let currentTmp = "tmp\(counter)" + let currentObj = "obj\(counter)" ++ let currentItems = "items\(counter)" + if itemType.isPrimitiveType { +- return [ ++ return renderTypeCheck { [ + "\(propertyToAssign) = \(rawObjectName);", +- ] ++ ] } + } +- let propertyInit = renderPropertyInit(currentTmp, currentObj, schema: itemType, firstName: firstName, counter: counter + 1).joined(separator: "\n") +- return [ +- "NSArray *items = \(rawObjectName);", +- "NSMutableArray *\(currentResult) = [NSMutableArray arrayWithCapacity:items.count];", +- ObjCIR.forStmt("id \(currentObj) in items") { [ ++ let propertyInit = renderPropertyInit(currentTmp, currentObj, keyPath: keyPath + ["?".objcLiteral()], schema: itemType, firstName: firstName, counter: counter + 1).joined(separator: "\n") ++ return renderTypeCheck { [ ++ "NSArray *\(currentItems) = \(rawObjectName);", ++ "NSMutableArray *\(currentResult) = [NSMutableArray arrayWithCapacity:\(currentItems).count];", ++ ObjCIR.forStmt("id \(currentObj) in \(currentItems)") { [ + ObjCIR.ifStmt("\(currentObj) != (id)kCFNull") { [ + "id \(currentTmp) = nil;", + propertyInit, +@@ -98,23 +147,23 @@ extension ObjCModelRenderer { + ] }, + ] }, + "\(propertyToAssign) = \(currentResult);", +- ] ++ ] } + case let .set(itemType: .some(itemType)): + let currentResult = "result\(counter)" + let currentTmp = "tmp\(counter)" + let currentObj = "obj\(counter)" +- ++ let currentItems = "items\(counter)" + if itemType.isPrimitiveType { +- return [ +- "NSArray *items = \(rawObjectName);", +- "\(propertyToAssign) = [NSSet setWithArray:items];", +- ] ++ return renderTypeCheck { [ ++ "NSArray *\(currentItems) = \(rawObjectName);", ++ "\(propertyToAssign) = [NSSet setWithArray:\(currentItems)];", ++ ] } + } +- let propertyInit = renderPropertyInit(currentTmp, currentObj, schema: itemType, firstName: firstName, counter: counter + 1).joined(separator: "\n") +- return [ +- "NSArray *items = \(rawObjectName);", +- "NSMutableSet *\(currentResult) = [NSMutableSet setWithCapacity:items.count];", +- ObjCIR.forStmt("id \(currentObj) in items") { [ ++ let propertyInit = renderPropertyInit(currentTmp, currentObj, keyPath: keyPath + ["?".objcLiteral()], schema: itemType, firstName: firstName, counter: counter + 1).joined(separator: "\n") ++ return renderTypeCheck { [ ++ "NSArray *\(currentItems) = \(rawObjectName);", ++ "NSMutableSet *\(currentResult) = [NSMutableSet setWithCapacity:\(currentItems).count];", ++ ObjCIR.forStmt("id \(currentObj) in \(currentItems)") { [ + ObjCIR.ifStmt("\(currentObj) != (id)kCFNull") { [ + "id \(currentTmp) = nil;", + propertyInit, +@@ -124,12 +173,12 @@ extension ObjCModelRenderer { + ] }, + ] }, + "\(propertyToAssign) = \(currentResult);", +- ] ++ ] } + case let .map(valueType: .some(valueType)) where valueType.isPrimitiveType == false: + let currentResult = "result\(counter)" + let currentItems = "items\(counter)" + let (currentKey, currentObj, currentStop) = ("key\(counter)", "obj\(counter)", "stop\(counter)") +- return [ ++ return renderTypeCheck { [ + "NSDictionary *\(currentItems) = \(rawObjectName);", + "NSMutableDictionary *\(currentResult) = [NSMutableDictionary dictionaryWithCapacity:\(currentItems).count];", + ObjCIR.stmt( +@@ -140,37 +189,37 @@ extension ObjCModelRenderer { + "__unused BOOL * _Nonnull \(currentStop)"]) { + [ + ObjCIR.ifStmt("\(currentObj) != nil && \(currentObj) != (id)kCFNull") { +- renderPropertyInit("\(currentResult)[\(currentKey)]", currentObj, schema: valueType, firstName: firstName, counter: counter + 1) ++ renderPropertyInit("\(currentResult)[\(currentKey)]", currentObj, keyPath: keyPath + [currentKey], schema: valueType, firstName: firstName, counter: counter + 1) + }, + ] + })) + ), + "\(propertyToAssign) = \(currentResult);", +- ] ++ ] } + case .float: +- return ["\(propertyToAssign) = [\(rawObjectName) doubleValue];"] ++ return renderTypeCheck { ["\(propertyToAssign) = [\(rawObjectName) doubleValue];"] } + case .integer: +- return ["\(propertyToAssign) = [\(rawObjectName) integerValue];"] ++ return renderTypeCheck { ["\(propertyToAssign) = [\(rawObjectName) integerValue];"] } + case .boolean: +- return ["\(propertyToAssign) = [\(rawObjectName) boolValue] & 0x1;"] ++ return renderTypeCheck { ["\(propertyToAssign) = [\(rawObjectName) boolValue] & 0x1;"] } + case .string(format: .some(.uri)): +- return ["\(propertyToAssign) = [NSURL URLWithString:\(rawObjectName)];"] ++ return renderTypeCheck { ["\(propertyToAssign) = [NSURL URLWithString:\(rawObjectName)];"] } + case .string(format: .some(.dateTime)): +- return ["\(propertyToAssign) = [[NSValueTransformer valueTransformerForName:\(dateValueTransformerKey)] transformedValue:\(rawObjectName)];"] ++ return renderTypeCheck { ["\(propertyToAssign) = [[NSValueTransformer valueTransformerForName:\(dateValueTransformerKey)] transformedValue:\(rawObjectName)];"] } + case let .reference(with: ref): + return ref.force().map { +- renderPropertyInit(propertyToAssign, rawObjectName, schema: $0, firstName: firstName, counter: counter) ++ renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: $0, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName) + } ?? { + assert(false, "TODO: Forward optional across methods") + return [] + }() +- case let .enumT(.integer(variants)): ++ case .enumT(.integer): + let typeName = enumTypeName(propertyName: firstName, className: className) +- return ["\(propertyToAssign) = (\(typeName))[\(rawObjectName) integerValue];"] +- case let .enumT(.string(variants)): +- return ["\(propertyToAssign) = \(enumFromStringMethodName(propertyName: firstName, className: className))(value);"] ++ return renderTypeCheck { ["\(propertyToAssign) = (\(typeName))[\(rawObjectName) integerValue];"] } ++ case .enumT(.string): ++ return renderTypeCheck { ["\(propertyToAssign) = \(enumFromStringMethodName(propertyName: firstName, className: className))(value);"] } + case let .object(objectRoot): +- return ["\(propertyToAssign) = [\(objectRoot.className(with: self.params)) modelObjectWithDictionary:\(rawObjectName)];"] ++ return renderTypeCheck { ["\(propertyToAssign) = [\(objectRoot.className(with: self.params)) modelObjectWithDictionary:\(rawObjectName) error:error];"] } + case let .oneOf(types: schemas): + // TODO: Update to create ADT objects + let adtClassName = typeFromSchema(firstName, schema.nonnullProperty()).trimmingCharacters(in: CharacterSet(charactersIn: "*")) +@@ -191,7 +240,7 @@ extension ObjCModelRenderer { + switch schema { + case let .object(objectRoot): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSDictionary class]] && [\(rawObjectName)[\("type".objcLiteral())] isEqualToString:\(objectRoot.typeIdentifier.objcLiteral())]") { +- transformToADTInit(["\(propertyToAssign) = [\(objectRoot.className(with: self.params)) modelObjectWithDictionary:\(rawObjectName)];"]) ++ transformToADTInit(["\(propertyToAssign) = [\(objectRoot.className(with: self.params)) modelObjectWithDictionary:\(rawObjectName) error:error];"]) + } + case let .reference(with: ref): + return ref.force().map(loop) ?? { +@@ -205,7 +254,7 @@ extension ObjCModelRenderer { + ] + + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSNumber class]] && (\(encodingConditions.joined(separator: " ||\n")))") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: .float, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: .float, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .integer, .enumT(.integer): + let encodingConditions = [ +@@ -219,36 +268,36 @@ extension ObjCModelRenderer { + "strcmp([\(rawObjectName) objCType], @encode(unsigned long long)) == 0", + ] + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSNumber class]] && (\(encodingConditions.joined(separator: " ||\n")))") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + + case .boolean: +- return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSNumber class]] && strcmp([\(rawObjectName) objCType], @encode(BOOL)) == 0") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSNumber class]] && strcmp([\(rawObjectName) objCType], [[NSNumber numberWithBool:0] objCType]) == 0") { ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .array(itemType: _): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSArray class]]") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .set(itemType: _): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSSet class]]") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .map(valueType: _): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSDictionary class]]") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .string(.some(.uri)): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSString class]] && [NSURL URLWithString:\(rawObjectName)] != nil") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .string(.some(.dateTime)): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSString class]] && [[NSValueTransformer valueTransformerForName:\(dateValueTransformerKey)] transformedValue:\(rawObjectName)] != nil") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .string(.some), .string(.none), .enumT(.string): + return ObjCIR.ifStmt("[\(rawObjectName) isKindOfClass:[NSString class]]") { +- transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, schema: schema, firstName: firstName, counter: counter)) ++ transformToADTInit(renderPropertyInit(propertyToAssign, rawObjectName, keyPath: keyPath, schema: schema, firstName: firstName, counter: counter, dirtyPropertyName: dirtyPropertyName, needsTypeCheck: false)) + } + case .oneOf(types: _): + fatalError("Nested oneOf types are unsupported at this time. Please file an issue if you require this.") +@@ -259,35 +308,36 @@ extension ObjCModelRenderer { + default: + switch schema.memoryAssignmentType() { + case .copy: +- return ["\(propertyToAssign) = [\(rawObjectName) copy];"] ++ return renderTypeCheck { ["\(propertyToAssign) = [\(rawObjectName) copy];"] } + default: +- return ["\(propertyToAssign) = \(rawObjectName);"] ++ return renderTypeCheck { ["\(propertyToAssign) = \(rawObjectName);"] } + } + } + } + +- return ObjCIR.method("- (instancetype)initWithModelDictionary:(NS_VALID_UNTIL_END_OF_SCOPE NSDictionary *)modelDictionary") { ++ return ObjCIR.method("- (instancetype)initWithModelDictionary:(NS_VALID_UNTIL_END_OF_SCOPE NSDictionary *)modelDictionary error:(NSError *__autoreleasing *)error") { + [ + "NSParameterAssert(modelDictionary);", +- ObjCIR.ifStmt("!modelDictionary") { ["return self;"] }, ++ "NSParameterAssert([modelDictionary isKindOfClass:[NSDictionary class]]);", + self.isBaseClass ? ObjCIR.ifStmt("!(self = [super init])") { ["return self;"] } : +- "if (!(self = [super initWithModelDictionary:modelDictionary])) { return self; }", +- -->self.properties.map { name, prop in ++ "if (!(self = [super initWithModelDictionary:modelDictionary error:error])) { return self; }", ++ ObjCIR.ifStmt("!modelDictionary") { ["return self;"] }, ++ self.properties.map { name, prop in + ObjCIR.scope { [ +- "__unsafe_unretained id value = modelDictionary[\(name.objcLiteral())]; // Collection will retain.", ++ "__unsafe_unretained id value = modelDictionary[\(name.objcLiteral())];", + ObjCIR.ifStmt("value != nil") { [ ++ "self->_\(dirtyPropertiesIVarName).\(dirtyPropertyOption(propertyName: name, className: className)) = 1;", + ObjCIR.ifStmt("value != (id)kCFNull") { + switch prop.schema { + case .boolean: +- return renderPropertyInit("self->_\(booleanPropertiesIVarName).\(booleanPropertyOption(propertyName: name, className: className))", "value", schema: prop.schema, firstName: name) ++ return renderPropertyInit("self->_\(booleanPropertiesIVarName).\(booleanPropertyOption(propertyName: name, className: className))", "value", keyPath: [name.objcLiteral()], schema: prop.schema, firstName: name, dirtyPropertyName: name) + default: +- return renderPropertyInit("self->_\(Languages.objectiveC.snakeCaseToPropertyName(name))", "value", schema: prop.schema, firstName: name) ++ return renderPropertyInit("self->_\(Languages.objectiveC.snakeCaseToPropertyName(name))", "value", keyPath: [name.objcLiteral()], schema: prop.schema, firstName: name, dirtyPropertyName: name) + } + }, +- "self->_\(dirtyPropertiesIVarName).\(dirtyPropertyOption(propertyName: name, className: className)) = 1;", + ] }, + ] } +- }, ++ }.joined(separator: "\n"), + ObjCIR.ifStmt("[self class] == [\(self.className) class]") { + [renderPostInitNotification(type: "PlankModelInitTypeDefault")] + }, +diff --git a/Sources/Core/ObjectiveCNSCodingExtension.swift b/Sources/Core/ObjectiveCNSCodingExtension.swift +index a43aacc..c284e9a 100644 +--- a/Sources/Core/ObjectiveCNSCodingExtension.swift ++++ b/Sources/Core/ObjectiveCNSCodingExtension.swift +@@ -11,7 +11,7 @@ import Foundation + extension ObjCModelRenderer { + func renderInitWithCoder() -> ObjCIR.Method { + return ObjCIR.method("- (instancetype)initWithCoder:(NSCoder *)aDecoder") { +- [ ++ let body: [String] = [ + self.isBaseClass ? ObjCIR.ifStmt("!(self = [super init])") { ["return self;"] } : + "if (!(self = [super initWithCoder:aDecoder])) { return self; }", + self.properties.filter { (_, schema) -> Bool in +@@ -35,6 +35,7 @@ extension ObjCModelRenderer { + }, + "return self;", + ] ++ return body + } + } + diff --git a/Patches/proctools/patch-pfind-Makefile.diff b/Patches/proctools/patch-pfind-Makefile.diff new file mode 100644 index 0000000000000..25f172d23302a --- /dev/null +++ b/Patches/proctools/patch-pfind-Makefile.diff @@ -0,0 +1,11 @@ +--- pfind/Makefile.orig 2008-06-01 22:40:55.000000000 -0700 ++++ pfind/Makefile 2008-06-01 22:40:26.000000000 -0700 +@@ -1,6 +1,6 @@ + PROG= pfind + DPADD+= ../proctools/libproctools.a +-LDADD= -L${MAKEOBJDIR} -lproctools -lkvm ++LDADD= -L${MAKEOBJDIR} -lproctools + CLEANFILES+= pfind.cat1 + + .if defined(OLDKVM) + diff --git a/Patches/proctools/patch-pfind-pfind.c.diff b/Patches/proctools/patch-pfind-pfind.c.diff new file mode 100644 index 0000000000000..f865a6dda547f --- /dev/null +++ b/Patches/proctools/patch-pfind-pfind.c.diff @@ -0,0 +1,34 @@ +--- pfind/pfind.orig.c 2003-12-06 02:45:21.000000000 -0800 ++++ pfind/pfind.c 2008-06-01 22:39:46.000000000 -0700 +@@ -434,11 +434,11 @@ + PFIND_EVAL(pfind_pri_any) + { + int result; +- result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, NULL); ++ result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, 0); + if (!result) { + const char *args; + args = getProcArgs(baton, proctoolslist); +- result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, NULL); ++ result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 0); + /* do not free(args) */ + } + (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result; +@@ -450,7 +450,7 @@ + const char *args; + int result; + args = getProcArgs(baton, proctoolslist); +- result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, NULL); ++ result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 0); + (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result; + /* do not free(args) */ + return 0; +@@ -490,7 +490,7 @@ + (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !strcmp(proctoolslist->name, (*expression)->optarg.str); + } + else { +- (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, NULL); ++ (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, 0); + } + return 0; + } diff --git a/Patches/proctools/patch-pgrep-Makefile.diff b/Patches/proctools/patch-pgrep-Makefile.diff new file mode 100644 index 0000000000000..7a862b44852f2 --- /dev/null +++ b/Patches/proctools/patch-pgrep-Makefile.diff @@ -0,0 +1,11 @@ +--- pgrep/Makefile.orig 2008-06-01 22:41:24.000000000 -0700 ++++ pgrep/Makefile 2008-06-01 22:36:08.000000000 -0700 +@@ -1,6 +1,6 @@ + PROG= pgrep + DPADD+= ../proctools/libproctools.a +-LDADD= -L${MAKEOBJDIR} -lproctools -lkvm ++LDADD= -L${MAKEOBJDIR} -lproctools + CLEANFILES+= pgrep.cat1 + + .if defined(OLDKVM) + diff --git a/Patches/proctools/patch-pkill-Makefile.diff b/Patches/proctools/patch-pkill-Makefile.diff new file mode 100644 index 0000000000000..24be56ddb1c2f --- /dev/null +++ b/Patches/proctools/patch-pkill-Makefile.diff @@ -0,0 +1,11 @@ +--- pkill/Makefile.orig 2008-06-01 22:41:43.000000000 -0700 ++++ pkill/Makefile 2008-06-01 22:36:34.000000000 -0700 +@@ -1,6 +1,6 @@ + PROG= pkill + DPADD+= ../proctools/libproctools.a +-LDADD= -L${MAKEOBJDIR} -lproctools -lkvm ++LDADD= -L${MAKEOBJDIR} -lproctools + CLEANFILES+= pkill.cat1 + + .if defined(OLDKVM) + diff --git a/Patches/proctools/patch-proctools-fmt.c.diff b/Patches/proctools/patch-proctools-fmt.c.diff new file mode 100644 index 0000000000000..f414b12d529cd --- /dev/null +++ b/Patches/proctools/patch-proctools-fmt.c.diff @@ -0,0 +1,30 @@ +--- proctools/fmt.orig.c 2003-12-06 02:13:20.000000000 -0800 ++++ proctools/fmt.c 2008-06-01 22:35:32.000000000 -0700 +@@ -7,7 +7,10 @@ + #include + #include + ++#if defined(USE_KVM) + #include ++#endif ++ + #include + #include + #include +@@ -27,6 +30,7 @@ + return ((cp = strrchr(arg0, '/')) != NULL ? cp + 1 : arg0); + } + ++#if defined(USE_KVM) + void + fmt_argv(kd, ki) + kvm_t *kd; +@@ -51,6 +55,7 @@ + fmt_putc(')', &left); + } + } ++#endif + + void + fmt_puts(s, leftp) + diff --git a/Patches/proctools/patch-proctools-proctools.c.diff b/Patches/proctools/patch-proctools-proctools.c.diff new file mode 100644 index 0000000000000..76cdc11a5f311 --- /dev/null +++ b/Patches/proctools/patch-proctools-proctools.c.diff @@ -0,0 +1,50 @@ +--- proctools/proctools.orig.c 2003-12-06 03:41:26.000000000 -0800 ++++ proctools/proctools.c 2008-06-01 22:39:04.000000000 -0700 +@@ -23,7 +23,10 @@ + + extern char *cmdpart(char *); + extern void fmt_puts(char *, int *); ++ ++#if defined(USE_KVM) + extern void fmt_argv(kvm_t *kd, struct kinfo_proc *ki); ++#endif + + static char dbuf[DUMPBUFSZ]; + +@@ -919,7 +922,7 @@ + matched = !strcmp(name, pattern); + } + else { +- matched = regexec(®ex, name, 0, NULL, NULL) == 0; ++ matched = regexec(®ex, name, 0, NULL, 0) == 0; + } + } + else { +@@ -960,7 +963,7 @@ + } + } + else +- if (regexec(®ex, name, 0, NULL, NULL) == 0) ++ if (regexec(®ex, name, 0, NULL, 0) == 0) + pushProcList(proctoolslist, kp); + } + else +@@ -995,7 +998,7 @@ + matched = !strcmp(name, pattern); + } + else { +- matched = regexec(®ex, name, 0, NULL, NULL) == 0; ++ matched = regexec(®ex, name, 0, NULL, 0) == 0; + } + } + else { +@@ -1037,7 +1040,7 @@ + } + } + else +- if (regexec(®ex, name, 0, NULL, NULL) == REG_NOMATCH) ++ if (regexec(®ex, name, 0, NULL, 0) == REG_NOMATCH) + pushProcList(proctoolslist, kp); + } + else + diff --git a/Patches/proctools/patch-proctools-proctools.h.diff b/Patches/proctools/patch-proctools-proctools.h.diff new file mode 100644 index 0000000000000..2442669c9de03 --- /dev/null +++ b/Patches/proctools/patch-proctools-proctools.h.diff @@ -0,0 +1,16 @@ +--- proctools/proctools.orig.h 2003-12-06 03:12:04.000000000 -0800 ++++ proctools/proctools.h 2008-06-01 22:34:58.000000000 -0700 +@@ -5,7 +5,12 @@ + + #include + #include ++ ++#if defined(USE_KVM) + #include ++#else ++#define USE_SYSCTL ++#endif + + #if !defined(USE_KVM) && !defined(USE_SYSCTL) + # if defined(KVM_NO_FILES) + diff --git a/Patches/pypy/tcl-tk.diff b/Patches/pypy/tcl-tk.diff new file mode 100644 index 0000000000000..48988e37ccd9c --- /dev/null +++ b/Patches/pypy/tcl-tk.diff @@ -0,0 +1,20 @@ +--- a/lib_pypy/_tkinter/tklib_build.py ++++ b/lib_pypy/_tkinter/tklib_build.py +@@ -17,7 +17,7 @@ elif sys.platform == 'win32': + incdirs = [] + linklibs = ['tcl86t', 'tk86t'] + libdirs = [] +-elif sys.platform == 'darwin': ++else: + # homebrew + homebrew = os.environ.get('HOMEBREW_PREFIX', '') + incdirs = ['/usr/local/opt/tcl-tk/include'] +@@ -26,7 +26,7 @@ elif sys.platform == 'darwin': + if homebrew: + incdirs.append(homebrew + '/include') + libdirs.append(homebrew + '/opt/tcl-tk/lib') +-else: ++if False: # disable Linux system tcl-tk detection + # On some Linux distributions, the tcl and tk libraries are + # stored in /usr/include, so we must check this case also + libdirs = [] diff --git a/Patches/python/3.10-distutils-scheme.diff b/Patches/python/3.10-distutils-scheme.diff new file mode 100644 index 0000000000000..390b9e0b2de88 --- /dev/null +++ b/Patches/python/3.10-distutils-scheme.diff @@ -0,0 +1,14 @@ +diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py +index 01d5331a63..601c8dd135 100644 +--- a/Lib/distutils/command/install.py ++++ b/Lib/distutils/command/install.py +@@ -38,7 +38,8 @@ + # Copy from sysconfig._INSTALL_SCHEMES + for key in SCHEME_KEYS: + for distutils_scheme_name, sys_scheme_name in ( +- ("unix_prefix", "posix_prefix"), ("unix_home", "posix_home"), ++ ("unix_prefix", sysconfig.get_preferred_scheme("prefix")), ++ ("unix_home", "posix_home"), + ("nt", "nt")): + sys_key = key + sys_scheme = sysconfig._INSTALL_SCHEMES[sys_scheme_name] diff --git a/Patches/python/3.10-sysconfig.diff b/Patches/python/3.10-sysconfig.diff new file mode 100644 index 0000000000000..7ca8189f73391 --- /dev/null +++ b/Patches/python/3.10-sysconfig.diff @@ -0,0 +1,50 @@ +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index daf9f00006..095a199463 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -56,8 +56,22 @@ + 'scripts': '{base}/Scripts', + 'data': '{base}', + }, ++ 'osx_framework_library': { ++ 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', ++ 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', ++ 'purelib': '@@HOMEBREW_PREFIX@@/lib/python{py_version_short}/site-packages', ++ 'platlib': '@@HOMEBREW_PREFIX@@/{platlibdir}/python{py_version_short}/site-packages', ++ 'include': ++ '{installed_base}/include/python{py_version_short}{abiflags}', ++ 'platinclude': ++ '{installed_platbase}/include/python{py_version_short}{abiflags}', ++ 'scripts': '@@HOMEBREW_PREFIX@@/bin', ++ 'data': '@@HOMEBREW_PREFIX@@', ++ }, + } + ++_INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_prefix'] ++ + + # NOTE: site.py has copy of this function. + # Sync it when modify this function. +@@ -231,14 +245,20 @@ def _get_preferred_schemes(): + 'home': 'posix_home', + 'user': 'nt_user', + } ++ ++ if sys.prefix == sys.base_prefix and not os.environ.get("ENSUREPIP_OPTIONS", None): ++ prefix = 'osx_framework_library' ++ else: ++ prefix = 'posix_prefix' ++ + if sys.platform == 'darwin' and sys._framework: + return { +- 'prefix': 'posix_prefix', ++ 'prefix': prefix, + 'home': 'posix_home', + 'user': 'osx_framework_user', + } + return { +- 'prefix': 'posix_prefix', ++ 'prefix': prefix, + 'home': 'posix_home', + 'user': 'posix_user', + } diff --git a/Patches/python/3.11-sysconfig.diff b/Patches/python/3.11-sysconfig.diff new file mode 100644 index 0000000000000..f97c34c4d8bab --- /dev/null +++ b/Patches/python/3.11-sysconfig.diff @@ -0,0 +1,50 @@ +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index ebe3711827..a9d9ec1de4 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -95,6 +95,18 @@ + 'scripts': '{base}/Scripts', + 'data': '{base}', + }, ++ 'osx_framework_library': { ++ 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', ++ 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', ++ 'purelib': '@@HOMEBREW_PREFIX@@/lib/python{py_version_short}/site-packages', ++ 'platlib': '@@HOMEBREW_PREFIX@@/{platlibdir}/python{py_version_short}/site-packages', ++ 'include': ++ '{installed_base}/include/python{py_version_short}{abiflags}', ++ 'platinclude': ++ '{installed_platbase}/include/python{py_version_short}{abiflags}', ++ 'scripts': '@@HOMEBREW_PREFIX@@/bin', ++ 'data': '@@HOMEBREW_PREFIX@@', ++ }, + } + + # For the OS-native venv scheme, we essentially provide an alias: +@@ -283,21 +295,22 @@ def _get_preferred_schemes(): + 'home': 'posix_home', + 'user': 'nt_user', + } ++ + if sys.platform == 'darwin' and sys._framework: + return { +- 'prefix': 'posix_prefix', ++ 'prefix': 'osx_framework_library', + 'home': 'posix_home', + 'user': 'osx_framework_user', + } + return { +- 'prefix': 'posix_prefix', ++ 'prefix': 'osx_framework_library', + 'home': 'posix_home', + 'user': 'posix_user', + } + + + def get_preferred_scheme(key): +- if key == 'prefix' and sys.prefix != sys.base_prefix: ++ if key == 'prefix' and (sys.prefix != sys.base_prefix or os.environ.get("ENSUREPIP_OPTIONS", None)): + return 'venv' + scheme = _get_preferred_schemes()[key] + if scheme not in _INSTALL_SCHEMES: + diff --git a/Patches/python/3.13-sysconfig.diff b/Patches/python/3.13-sysconfig.diff new file mode 100644 index 0000000000000..4d8e37799921e --- /dev/null +++ b/Patches/python/3.13-sysconfig.diff @@ -0,0 +1,45 @@ +diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py +index 80aef34..4af9376 100644 +--- a/Lib/sysconfig/__init__.py ++++ b/Lib/sysconfig/__init__.py +@@ -98,6 +98,16 @@ _INSTALL_SCHEMES = { + 'scripts': '{base}/Scripts', + 'data': '{base}', + }, ++ 'osx_framework_library': { ++ 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}{abi_thread}', ++ 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}{abi_thread}', ++ 'purelib': '@@HOMEBREW_PREFIX@@/lib/python{py_version_short}{abi_thread}/site-packages', ++ 'platlib': '@@HOMEBREW_PREFIX@@/{platlibdir}/python{py_version_short}{abi_thread}/site-packages', ++ 'include': '{installed_base}/include/python{py_version_short}{abiflags}', ++ 'platinclude': '{installed_platbase}/include/python{py_version_short}{abiflags}', ++ 'scripts': '@@HOMEBREW_PREFIX@@/bin', ++ 'data': '@@HOMEBREW_PREFIX@@', ++ }, + } + + # For the OS-native venv scheme, we essentially provide an alias: +@@ -288,20 +298,20 @@ def _get_preferred_schemes(): + } + if sys.platform == 'darwin' and sys._framework: + return { +- 'prefix': 'posix_prefix', ++ 'prefix': 'osx_framework_library', + 'home': 'posix_home', + 'user': 'osx_framework_user', + } + + return { +- 'prefix': 'posix_prefix', ++ 'prefix': 'osx_framework_library', + 'home': 'posix_home', + 'user': 'posix_user', + } + + + def get_preferred_scheme(key): +- if key == 'prefix' and sys.prefix != sys.base_prefix: ++ if key == 'prefix' and (sys.prefix != sys.base_prefix or os.environ.get("ENSUREPIP_OPTIONS", None)): + return 'venv' + scheme = _get_preferred_schemes()[key] + if scheme not in _INSTALL_SCHEMES: diff --git a/Patches/rathole/rust-1.80.patch b/Patches/rathole/rust-1.80.patch new file mode 100644 index 0000000000000..6fe10aff0f586 --- /dev/null +++ b/Patches/rathole/rust-1.80.patch @@ -0,0 +1,76 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 6856445..f952333 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -491,9 +491,12 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + + [[package]] + name = "deranged" +-version = "0.3.8" ++version = "0.3.11" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" ++checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" ++dependencies = [ ++ "powerfmt", ++] + + [[package]] + name = "digest" +@@ -1173,6 +1176,12 @@ dependencies = [ + "winapi", + ] + ++[[package]] ++name = "num-conv" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" ++ + [[package]] + name = "num-traits" + version = "0.2.16" +@@ -1365,6 +1374,12 @@ dependencies = [ + "universal-hash", + ] + ++[[package]] ++name = "powerfmt" ++version = "0.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" ++ + [[package]] + name = "ppv-lite86" + version = "0.2.17" +@@ -1894,12 +1909,14 @@ dependencies = [ + + [[package]] + name = "time" +-version = "0.3.29" ++version = "0.3.36" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" ++checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" + dependencies = [ + "deranged", + "itoa", ++ "num-conv", ++ "powerfmt", + "serde", + "time-core", + "time-macros", +@@ -1913,10 +1930,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + + [[package]] + name = "time-macros" +-version = "0.2.15" ++version = "0.2.18" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" ++checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" + dependencies = [ ++ "num-conv", + "time-core", + ] + diff --git a/Patches/renameutils/0.12.0.patch b/Patches/renameutils/0.12.0.patch new file mode 100644 index 0000000000000..84cd751cacfcf --- /dev/null +++ b/Patches/renameutils/0.12.0.patch @@ -0,0 +1,49 @@ +--- a/src/apply.c ++++ b/src/apply.c +@@ -72,9 +72,9 @@ perform_command(FileSpec *spec) + if (force_command != NULL) + command = force_command; + else if (strcmp(program, "qmv") == 0) +- command = "mv"; ++ command = "gmv"; + else +- command = "cp"; ++ command = "gcp"; + + child = fork(); + if (child < 0) { +--- a/src/icmd.c ++++ b/src/icmd.c +@@ -45,8 +45,8 @@ + #include "common/string-utils.h" + #include "common/common.h" + +-#define MV_COMMAND "mv" +-#define CP_COMMAND "cp" ++#define MV_COMMAND "gmv" ++#define CP_COMMAND "gcp" + /* This list should be up to date with mv and cp! + * It was last updated on 2007-11-30 for + * Debian coreutils 5.97-5.4 in unstable. +--- a/src/qcmd.c 2011-08-21 10:15:51.000000000 -0700 ++++ b/src/qcmd.c 2012-06-28 15:51:48.000000000 -0700 +@@ -239,7 +239,7 @@ + editor_program = xstrdup(editor_program); + + if (ls_program == NULL) +- ls_program = xstrdup("ls"); ++ ls_program = xstrdup("gls"); + + /* Parse format options */ + if (format_options != NULL && !format->parse_options(format_options)) +--- a/src/Makefile.in 2012-04-23 04:24:10.000000000 -0700 ++++ b/src/Makefile.in 2012-06-29 00:42:45.000000000 -0700 +@@ -1577,7 +1577,7 @@ + @[ -f icp ] || (echo $(LN_S) icmd icp ; $(LN_S) icmd icp) + + install-exec-local: +- $(mkdir_p) $(DESTDIR)($bindir) ++ $(mkdir_p) $(DESTDIR)$(bindir) + @[ -f $(DESTDIR)$(bindir)/qmv ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv) + @[ -f $(DESTDIR)$(bindir)/qcp ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp) + @[ -f $(DESTDIR)$(bindir)/imv ] || (echo $(LN_S) icmd $(DESTDIR)$(bindir)/imv ; $(LN_S) icmd $(DESTDIR)$(bindir)/imv) diff --git a/Patches/rtmpdump/openssl-1.1.diff b/Patches/rtmpdump/openssl-1.1.diff new file mode 100644 index 0000000000000..2b68394270a2c --- /dev/null +++ b/Patches/rtmpdump/openssl-1.1.diff @@ -0,0 +1,142 @@ +--- librtmp/dh.h.orig 2016-02-29 01:15:13 UTC ++++ librtmp/dh.h +@@ -253,20 +253,23 @@ DHInit(int nKeyBits) + if (!dh) + goto failed; + +- MP_new(dh->g); ++ const BIGNUM *p; ++ const BIGNUM *g; ++ DH_get0_pqg(dh,&p,NULL,&g); ++ MP_new(g); + +- if (!dh->g) ++ if (!g) + goto failed; + +- MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ ++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */ + if (!res) + { + goto failed; + } + +- MP_set_w(dh->g, 2); /* base 2 */ ++ MP_set_w(g, 2); /* base 2 */ + +- dh->length = nKeyBits; ++ DH_set_length(dh, nKeyBits); + return dh; + + failed: +@@ -293,12 +296,15 @@ DHGenerateKey(MDH *dh) + MP_gethex(q1, Q1024, res); + assert(res); + +- res = isValidPublicKey(dh->pub_key, dh->p, q1); ++ BIGNUM *pub_key, *priv_key, *p; ++ DH_get0_key(dh, &pub_key, &priv_key); ++ DH_get0_pqg(dh,&p,NULL,NULL); ++ res = isValidPublicKey(pub_key, p, q1); + if (!res) + { +- MP_free(dh->pub_key); +- MP_free(dh->priv_key); +- dh->pub_key = dh->priv_key = 0; ++ MP_free(pub_key); ++ MP_free(priv_key); ++ DH_set0_key(dh, 0, 0); + } + + MP_free(q1); +@@ -314,15 +320,17 @@ static int + DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + { + int len; +- if (!dh || !dh->pub_key) ++ BIGNUM *pub_key; ++ DH_get0_key(dh, &pub_key, NULL); ++ if (!dh || !pub_key) + return 0; + +- len = MP_bytes(dh->pub_key); ++ len = MP_bytes(pub_key); + if (len <= 0 || len > (int) nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); +- MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); ++ MP_setbin(pub_key, pubkey + (nPubkeyLen - len), len); + return 1; + } + +@@ -364,7 +372,9 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, siz + MP_gethex(q1, Q1024, len); + assert(len); + +- if (isValidPublicKey(pubkeyBn, dh->p, q1)) ++ BIGNUM *p; ++ DH_get0_pqg(dh,&p,NULL,NULL); ++ if (isValidPublicKey(pubkeyBn, p, q1)) + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; +--- librtmp/handshake.h.orig 2016-02-29 01:15:13 UTC ++++ librtmp/handshake.h +@@ -69,9 +69,9 @@ typedef struct arcfour_ctx* RC4_handle; + #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) + #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 + #endif +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx) + + typedef RC4_KEY * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +@@ -117,7 +117,7 @@ static void InitRC4Encryption + { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx = HMAC_CTX_new(); + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); +@@ -266,7 +266,7 @@ HMACsha256(const uint8_t *message, size_t messageLen, + size_t keylen, uint8_t *digest) + { + unsigned int digestLen; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx = HMAC_CTX_new(); + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); +--- librtmp/hashswf.c.orig 2016-02-29 01:15:13 UTC ++++ librtmp/hashswf.c +@@ -57,10 +57,10 @@ + #include + #include + #include +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen); +-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen); ++#define HMAC_close(ctx) HMAC_CTX_free(ctx) + #endif + + extern void RTMP_TLS_Init(); +@@ -289,7 +289,7 @@ leave: + struct info + { + z_stream *zs; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + int first; + int zlib; + int size; diff --git a/Patches/rxvt-unicode/9.22.patch b/Patches/rxvt-unicode/9.22.patch new file mode 100644 index 0000000000000..9b6db50350301 --- /dev/null +++ b/Patches/rxvt-unicode/9.22.patch @@ -0,0 +1,38 @@ +diff --git a/configure b/configure +index c756724..5e94907 100755 +--- a/configure ++++ b/configure +@@ -7847,8 +7847,8 @@ $as_echo_n "checking for $PERL suitability... " >&6; } + + save_CXXFLAGS="$CXXFLAGS" + save_LIBS="$LIBS" +- CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" +- LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" ++ CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts|sed -E 's/ -arch [^ ]+//g'`" ++ LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts|sed -E 's/ -arch [^ ]+//g'`" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -7884,8 +7884,8 @@ $as_echo "#define ENABLE_PERL 1" >>confdefs.h + + IF_PERL= + PERL_O=rxvtperl.o +- PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" +- PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" ++ PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts|sed -E 's/ -arch [^ ]+//g'`" ++ PERLLIB="`$PERL -MExtUtils::Embed -e ldopts|sed -E 's/ -arch [^ ]+//g'`" + PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" + else + as_fn_error $? "no, unable to link" "$LINENO" 5 +diff --git a/Makefile.in b/Makefile.in +index eee5969..c230930 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -31,6 +31,7 @@ subdirs = src doc + + RECURSIVE_TARGETS = all allbin alldoc tags clean distclean realclean install + ++.PHONY: install + #------------------------------------------------------------------------- + + $(RECURSIVE_TARGETS): diff --git a/Patches/shellinabox/2.20.patch b/Patches/shellinabox/2.20.patch new file mode 100644 index 0000000000000..48a272503f43e --- /dev/null +++ b/Patches/shellinabox/2.20.patch @@ -0,0 +1,341 @@ +diff --git a/configure.ac b/configure.ac +index 05ab1bb..5fa918d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -138,6 +138,17 @@ AC_ARG_ENABLE(runtime-loading, + these libraries into the binary, thus making them a + hard dependency, then disable runtime-loading.]) + ++dnl This changes the order of the top ciphersuites ++AC_ARG_ENABLE(prefer-chacha, ++ [ --enable-prefer-chacha Prefer ChaCha20-Poly1305 ciphersuites over ++ AES256-GCM. For processors without AES-NI or ++ similar capabilities, ChaCha20-Poly1305 is 3 times ++ faster than AES, with an equivalent strength.]) ++if test "x$enable_prefer_chacha" == xyes; then ++ AC_DEFINE(SHELLINABOX_USE_CHACHA_FIRST, 1, ++ Set if you want to prefer Chacha20-Poly1305 over AES-GCM) ++fi ++ + dnl This is feature is not suported in some standard C libs. So users can use + dnl this switch to avoid compile and runtime problems. Note that utmp must + dnl disabled on systems with musl libc. +diff --git a/libhttp/ssl.c b/libhttp/ssl.c +index 6d09035..609d4e5 100644 +--- a/libhttp/ssl.c ++++ b/libhttp/ssl.c +@@ -117,6 +117,9 @@ SSL_CTX * (*SSL_CTX_new)(SSL_METHOD *); + int (*SSL_CTX_set_cipher_list)(SSL_CTX *, const char *); + void (*SSL_CTX_set_info_callback)(SSL_CTX *, + void (*)(const SSL *, int, int)); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++unsigned long (*SSL_CTX_set_options)(SSL_CTX *, unsigned long); ++#endif + int (*SSL_CTX_use_PrivateKey_file)(SSL_CTX *, const char *, int); + int (*SSL_CTX_use_PrivateKey_ASN1)(int, SSL_CTX *, + const unsigned char *, long); +@@ -130,7 +133,9 @@ void * (*SSL_get_ex_data)(const SSL *, int); + BIO * (*SSL_get_rbio)(const SSL *); + const char * (*SSL_get_servername)(const SSL *, int); + BIO * (*SSL_get_wbio)(const SSL *); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + int (*SSL_library_init)(void); ++#endif + SSL * (*SSL_new)(SSL_CTX *); + int (*SSL_read)(SSL *, void *, int); + SSL_CTX * (*SSL_set_SSL_CTX)(SSL *, SSL_CTX *); +@@ -139,10 +144,16 @@ void (*SSL_set_bio)(SSL *, BIO *, BIO *); + int (*SSL_set_ex_data)(SSL *, int, void *); + int (*SSL_shutdown)(SSL *); + int (*SSL_write)(SSL *, const void *, int); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_METHOD * (*SSLv23_server_method)(void); ++#else ++SSL_METHOD * (*TLS_server_method)(void); ++#endif + X509 * (*d2i_X509)(X509 **px, const unsigned char **in, int len); + void (*X509_free)(X509 *a); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + void (*x_sk_zero)(void *st); ++#endif + void * (*x_SSL_COMP_get_compression_methods)(void); + #endif + +@@ -208,7 +219,7 @@ static int maybeLoadCrypto(void) { + // The feature is currently disabled. + const char* path_libcrypto = NULL; // getenv ("SHELLINABOX_LIBCRYPTO_SO"); + if (path_libcrypto == NULL) +- path_libcrypto = "libcrypto.so"; ++ path_libcrypto = DEFAULT_LIBCRYPTO_SO; + + if (!crypto++) { + #ifdef RTLD_NOLOAD +@@ -267,8 +278,8 @@ static void loadSSL(void) { + // The feature is currently disabled. + const char* path_libssl = NULL; // = getenv ("SHELLINABOX_LIBSSL_SO"); + if (path_libssl == NULL) +- path_libssl = "libssl.so"; +- check(!SSL_library_init); ++ path_libssl = DEFAULT_LIBSSL_SO; ++ check(!SSL_CTX_new); + struct { + union { + void *avoid_gcc_warning_about_type_punning; +@@ -299,6 +310,9 @@ static void loadSSL(void) { + { { &SSL_CTX_new }, "SSL_CTX_new" }, + { { &SSL_CTX_set_cipher_list }, "SSL_CTX_set_cipher_list" }, + { { &SSL_CTX_set_info_callback }, "SSL_CTX_set_info_callback" }, ++#if OPENSSL_VERSION_NUMBER > 0x10100000L ++ { { &SSL_CTX_set_options }, "SSL_CTX_set_options" }, ++#endif + { { &SSL_CTX_use_PrivateKey_file }, "SSL_CTX_use_PrivateKey_file" }, + { { &SSL_CTX_use_PrivateKey_ASN1 }, "SSL_CTX_use_PrivateKey_ASN1" }, + { { &SSL_CTX_use_certificate_file },"SSL_CTX_use_certificate_file"}, +@@ -312,7 +326,9 @@ static void loadSSL(void) { + { { &SSL_get_servername }, "SSL_get_servername" }, + #endif + { { &SSL_get_wbio }, "SSL_get_wbio" }, ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + { { &SSL_library_init }, "SSL_library_init" }, ++#endif + { { &SSL_new }, "SSL_new" }, + { { &SSL_read }, "SSL_read" }, + #ifdef HAVE_TLSEXT +@@ -323,10 +339,16 @@ static void loadSSL(void) { + { { &SSL_set_ex_data }, "SSL_set_ex_data" }, + { { &SSL_shutdown }, "SSL_shutdown" }, + { { &SSL_write }, "SSL_write" }, ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + { { &SSLv23_server_method }, "SSLv23_server_method" }, ++#else ++ { { &TLS_server_method }, "TLS_server_method" }, ++#endif + { { &d2i_X509 }, "d2i_X509" }, + { { &X509_free }, "X509_free" }, ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + { { &x_sk_zero }, "sk_zero" } ++#endif + }; + for (unsigned i = 0; i < sizeof(symbols)/sizeof(symbols[0]); i++) { + if (!(*symbols[i].var = loadSymbol(path_libssl, symbols[i].fn))) { +@@ -343,7 +365,9 @@ static void loadSSL(void) { + // ends + + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); ++#endif + dcheck(!ERR_peek_error()); + debug("[ssl] Loaded SSL suppport..."); + } +@@ -351,7 +375,11 @@ static void loadSSL(void) { + + int serverSupportsSSL(void) { + #if defined(HAVE_OPENSSL) && !defined(HAVE_DLOPEN) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + return SSL_library_init(); ++#else ++ return 1; ++#endif + #else + #if defined(HAVE_OPENSSL) + // We want to call loadSSL() exactly once. For single-threaded applications, +@@ -372,7 +400,11 @@ int serverSupportsSSL(void) { + loadSSL(); + } + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + return !!SSL_library_init; ++#else ++ return 1; ++#endif + #else + return 0; + #endif +@@ -623,7 +655,11 @@ static void sslInfoCallback(const SSL *sslHndl, int type, int val) { + static SSL_CTX *sslMakeContext(void) { + + SSL_CTX *context; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + check(context = SSL_CTX_new(SSLv23_server_method())); ++#else ++ check(context = SSL_CTX_new(TLS_server_method())); ++#endif + + long options = SSL_OP_ALL; + options |= SSL_OP_NO_SSLv2; +@@ -641,6 +677,7 @@ static SSL_CTX *sslMakeContext(void) { + // Set default SSL options. + SSL_CTX_set_options(context, options); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + // Workaround for SSL_OP_NO_COMPRESSION with older OpenSSL versions. + #ifdef HAVE_DLOPEN + if (SSL_COMP_get_compression_methods) { +@@ -648,6 +685,7 @@ static SSL_CTX *sslMakeContext(void) { + } + #elif OPENSSL_VERSION_NUMBER >= 0x00908000L + sk_SSL_COMP_zero(SSL_COMP_get_compression_methods()); ++#endif + #endif + + // For Perfect Forward Secrecy (PFS) support we need to enable some additional +@@ -657,21 +695,39 @@ static SSL_CTX *sslMakeContext(void) { + SSL_CTX_set_options(context, SSL_OP_SINGLE_ECDH_USE); + SSL_CTX_set_options(context, SSL_OP_CIPHER_SERVER_PREFERENCE); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L /* openssl 1.1 does this automatically */ + EC_KEY *ecKey; + check(ecKey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1)); + SSL_CTX_set_tmp_ecdh(context, ecKey); + EC_KEY_free(ecKey); ++#endif + + debug("[ssl] Support for PFS enabled..."); + #endif + + check(SSL_CTX_set_cipher_list(context, ++#ifdef SHELLINABOX_USE_CHACHA_FIRST ++ "ECDHE-ECDSA-CHACHA20-POLY1305:" ++ "ECDHE-RSA-CHACHA20-POLY1305:" ++ "ECDHE-ECDSA-AES256-GCM-SHA384:" + "ECDHE-RSA-AES256-GCM-SHA384:" ++#else ++ "ECDHE-ECDSA-AES256-GCM-SHA384:" ++ "ECDHE-RSA-AES256-GCM-SHA384:" ++ "ECDHE-ECDSA-CHACHA20-POLY1305:" ++ "ECDHE-RSA-CHACHA20-POLY1305:" ++#endif ++ "ECDHE-ECDSA-AES128-GCM-SHA256:" + "ECDHE-RSA-AES128-GCM-SHA256:" ++ "ECDHE-ECDSA-AES256-SHA384:" + "ECDHE-RSA-AES256-SHA384:" ++ "ECDHE-ECDSA-AES128-SHA256:" + "ECDHE-RSA-AES128-SHA256:" ++ "ECDHE-ECDSA-AES256-SHA:" + "ECDHE-RSA-AES256-SHA:" ++ "ECDHE-ECDSA-AES128-SHA:" + "ECDHE-RSA-AES128-SHA:" ++ "ECDHE-ECDSA-DES-CBC3-SHA:" + "ECDHE-RSA-DES-CBC3-SHA:" + "HIGH:MEDIUM:!RC4:!aNULL:!MD5")); + +diff --git a/libhttp/ssl.h b/libhttp/ssl.h +index 9fbac63..7c3a23d 100644 +--- a/libhttp/ssl.h ++++ b/libhttp/ssl.h +@@ -57,6 +57,7 @@ + #include + #include + #include ++#include + #else + #undef HAVE_OPENSSL + typedef struct BIO BIO; +@@ -77,6 +78,17 @@ typedef struct X509 X509; + #endif + + #if defined(HAVE_DLOPEN) ++#if !defined(DEFAULT_LIBCRYPTO_SO) || !defined(DEFAULT_LIBSSL_SO) ++#undef DEFAULT_LIBCRYPTO_SO ++#undef DEFAULT_LIBSSL_SO ++#ifdef SHLIB_VERSION_NUMBER ++#define DEFAULT_LIBCRYPTO_SO "libcrypto.so." SHLIB_VERSION_NUMBER ++#define DEFAULT_LIBSSL_SO "libssl.so." SHLIB_VERSION_NUMBER ++#else ++#define DEFAULT_LIBCRYPTO_SO "libcrypto.so" ++#define DEFAULT_LIBSSL_SO "libssl.so" ++#endif ++#endif + extern long (*x_BIO_ctrl)(BIO *, int, long, void *); + extern BIO_METHOD *(*x_BIO_f_buffer)(void); + extern void (*x_BIO_free_all)(BIO *); +@@ -99,6 +111,9 @@ extern SSL_CTX*(*x_SSL_CTX_new)(SSL_METHOD *); + extern int (*x_SSL_CTX_set_cipher_list)(SSL_CTX *, const char *); + extern void (*x_SSL_CTX_set_info_callback)(SSL_CTX *, + void (*)(const SSL *, int, int)); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++extern unsigned long (*x_SSL_CTX_set_options)(SSL_CTX *, unsigned long); ++#endif + extern int (*x_SSL_CTX_use_PrivateKey_file)(SSL_CTX *, const char *, int); + extern int (*x_SSL_CTX_use_PrivateKey_ASN1)(int, SSL_CTX *, + const unsigned char *, long); +@@ -112,7 +127,9 @@ extern void *(*x_SSL_get_ex_data)(const SSL *, int); + extern BIO *(*x_SSL_get_rbio)(const SSL *); + extern const char *(*x_SSL_get_servername)(const SSL *, int); + extern BIO *(*x_SSL_get_wbio)(const SSL *); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + extern int (*x_SSL_library_init)(void); ++#endif + extern SSL *(*x_SSL_new)(SSL_CTX *); + extern int (*x_SSL_read)(SSL *, void *, int); + extern SSL_CTX*(*x_SSL_set_SSL_CTX)(SSL *, SSL_CTX *); +@@ -121,10 +138,16 @@ extern void (*x_SSL_set_bio)(SSL *, BIO *, BIO *); + extern int (*x_SSL_set_ex_data)(SSL *, int, void *); + extern int (*x_SSL_shutdown)(SSL *); + extern int (*x_SSL_write)(SSL *, const void *, int); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + extern SSL_METHOD *(*x_SSLv23_server_method)(void); ++#else ++extern SSL_METHOD *(*x_TLS_server_method)(void); ++#endif + extern X509 * (*x_d2i_X509)(X509 **px, const unsigned char **in, int len); + extern void (*x_X509_free)(X509 *a); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + extern void (*x_sk_zero)(void *st); ++#endif + extern void *(*x_SSL_COMP_get_compression_methods)(void); + + #define BIO_ctrl x_BIO_ctrl +@@ -146,6 +169,9 @@ extern void *(*x_SSL_COMP_get_compression_methods)(void); + #define SSL_CTX_new x_SSL_CTX_new + #define SSL_CTX_set_cipher_list x_SSL_CTX_set_cipher_list + #define SSL_CTX_set_info_callback x_SSL_CTX_set_info_callback ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#define SSL_CTX_set_options x_SSL_CTX_set_options ++#endif + #define SSL_CTX_use_PrivateKey_file x_SSL_CTX_use_PrivateKey_file + #define SSL_CTX_use_PrivateKey_ASN1 x_SSL_CTX_use_PrivateKey_ASN1 + #define SSL_CTX_use_certificate_file x_SSL_CTX_use_certificate_file +@@ -157,7 +183,9 @@ extern void *(*x_SSL_COMP_get_compression_methods)(void); + #define SSL_get_rbio x_SSL_get_rbio + #define SSL_get_servername x_SSL_get_servername + #define SSL_get_wbio x_SSL_get_wbio ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + #define SSL_library_init x_SSL_library_init ++#endif + #define SSL_new x_SSL_new + #define SSL_read x_SSL_read + #define SSL_set_SSL_CTX x_SSL_set_SSL_CTX +@@ -166,10 +194,16 @@ extern void *(*x_SSL_COMP_get_compression_methods)(void); + #define SSL_set_ex_data x_SSL_set_ex_data + #define SSL_shutdown x_SSL_shutdown + #define SSL_write x_SSL_write ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + #define SSLv23_server_method x_SSLv23_server_method ++#else ++#define TLS_server_method x_TLS_server_method ++#endif + #define d2i_X509 x_d2i_X509 + #define X509_free x_X509_free ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + #define sk_zero x_sk_zero ++#endif + #define SSL_COMP_get_compression_methods x_SSL_COMP_get_compression_methods + + #undef BIO_set_buffer_read_data +diff --git a/shellinabox/service.c b/shellinabox/service.c +index cdf946e..aa44798 100644 +--- a/shellinabox/service.c ++++ b/shellinabox/service.c +@@ -175,8 +175,8 @@ void initService(struct Service *service, const char *arg) { + "-oHostbasedAuthentication=no -oIdentitiesOnly=yes " + "-oKbdInteractiveAuthentication=yes -oPasswordAuthentication=yes " + "-oPreferredAuthentications=keyboard-interactive,password " +- "-oPubkeyAuthentication=no -oRhostsRSAAuthentication=no " +- "-oRSAAuthentication=no -oStrictHostKeyChecking=no -oTunnel=no " ++ "-oPubkeyAuthentication=no " ++ "-oStrictHostKeyChecking=no -oTunnel=no " + "-oUserKnownHostsFile=/dev/null -oVerifyHostKeyDNS=no " + // beewoolie-2012.03.30: while it would be nice to disable this + // feature, we cannot be sure that it is available on the diff --git a/Patches/stella/7.0c-ventura.patch b/Patches/stella/7.0c-ventura.patch new file mode 100644 index 0000000000000..d137940465df6 --- /dev/null +++ b/Patches/stella/7.0c-ventura.patch @@ -0,0 +1,2203 @@ +From b836070133d86f2ee69d664d4087798cadaff0b5 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Thu, 23 Jan 2025 01:40:11 -0500 +Subject: [PATCH] Revert "Convert stringstream::str() to stringstream::view() + where applicable." This reverts commit + https://github.com/stella-emu/stella/commit/a8a23f611211e6edaf117756f640e37bd8012778. + +Signed-off-by: Rui Chen +--- + src/cheat/CheatManager.cxx | 6 +-- + src/common/EventHandlerSDL2.cxx | 4 +- + src/common/FBBackendSDL2.cxx | 10 ++-- + src/common/HighScoresManager.cxx | 6 +-- + src/common/JoyMap.cxx | 2 +- + src/common/KeyMap.cxx | 2 +- + src/common/MouseControl.cxx | 10 ++-- + src/common/PJoystickHandler.cxx | 30 ++++++------ + src/common/PKeyboardHandler.cxx | 2 +- + src/common/PNGLibrary.cxx | 12 ++--- + src/common/PaletteHandler.cxx | 6 +-- + src/common/RewindManager.cxx | 4 +- + src/common/SoundSDL2.cxx | 10 ++-- + src/common/StaggeredLogger.cxx | 2 +- + src/common/StateManager.cxx | 18 ++++---- + src/common/Variant.hxx | 14 +++--- + src/common/VideoModeHandler.cxx | 2 +- + .../repository/CompositeKVRJsonAdapter.cxx | 2 +- + src/common/tv_filters/NTSCFilter.cxx | 8 ++-- + src/debugger/CartDebug.cxx | 2 +- + src/debugger/Debugger.cxx | 10 ++-- + src/debugger/DebuggerParser.cxx | 38 +++++++-------- + src/debugger/DiStella.cxx | 8 ++-- + src/debugger/gui/AudioWidget.cxx | 2 +- + src/debugger/gui/Cart3EPlusWidget.cxx | 14 +++--- + src/debugger/gui/CartARMWidget.cxx | 2 +- + src/debugger/gui/CartBUSInfoWidget.cxx | 2 +- + src/debugger/gui/CartCDFInfoWidget.cxx | 2 +- + src/debugger/gui/CartDPCPlusWidget.cxx | 2 +- + src/debugger/gui/CartDPCWidget.cxx | 4 +- + src/debugger/gui/CartDebugWidget.cxx | 2 +- + src/debugger/gui/CartE7Widget.cxx | 2 +- + src/debugger/gui/CartEnhancedWidget.cxx | 10 ++-- + src/debugger/gui/CartRamWidget.cxx | 2 +- + src/debugger/gui/CpuWidget.cxx | 2 +- + src/debugger/gui/DelayQueueWidget.cxx | 4 +- + src/debugger/gui/FlashWidget.cxx | 2 +- + src/debugger/gui/NullControlWidget.hxx | 4 +- + src/debugger/gui/RomWidget.cxx | 8 ++-- + src/debugger/gui/TiaOutputWidget.cxx | 10 ++-- + src/debugger/gui/TiaZoomWidget.cxx | 4 +- + src/emucore/CartCreator.cxx | 4 +- + src/emucore/CartDetector.cxx | 2 +- + src/emucore/CartEnhanced.cxx | 4 +- + src/emucore/Console.cxx | 46 +++++++++---------- + src/emucore/EventHandler.cxx | 8 ++-- + src/emucore/FrameBuffer.cxx | 14 +++--- + src/emucore/KidVid.cxx | 4 +- + src/emucore/M6502.cxx | 16 +++---- + src/emucore/OSystem.cxx | 12 ++--- + src/emucore/PlusROM.cxx | 6 +-- + src/emucore/Settings.cxx | 2 +- + src/emucore/TIASurface.cxx | 6 +-- + src/emucore/Thumbulator.cxx | 2 +- + src/gui/DeveloperDialog.cxx | 2 +- + src/gui/EditableWidget.cxx | 4 +- + src/gui/EventMappingWidget.cxx | 2 +- + src/gui/GameInfoDialog.cxx | 8 ++-- + src/gui/HighScoresDialog.cxx | 4 +- + src/gui/JoystickDialog.cxx | 2 +- + src/gui/LauncherDialog.cxx | 4 +- + src/gui/RomAuditDialog.cxx | 2 +- + src/gui/RomImageWidget.cxx | 4 +- + src/gui/VideoAudioDialog.cxx | 8 ++-- + 64 files changed, 226 insertions(+), 226 deletions(-) + +diff --git a/src/cheat/CheatManager.cxx b/src/cheat/CheatManager.cxx +index c36d9b8..a11cdef 100644 +--- a/src/cheat/CheatManager.cxx ++++ b/src/cheat/CheatManager.cxx +@@ -298,7 +298,7 @@ void CheatManager::saveCheats(string_view md5sum) + cheats << ","; + } + +- const bool changed = cheats.view() != myCurrentCheat; ++ const bool changed = cheats.str() != myCurrentCheat; + + // Only update the list if absolutely necessary + if(changed) +@@ -310,8 +310,8 @@ void CheatManager::saveCheats(string_view md5sum) + myCheatMap.erase(iter); + + // Add new entry only if there are any cheats defined +- if(!cheats.view().empty()) +- myCheatMap.emplace(md5sum, cheats.view()); ++ if(!cheats.str().empty()) ++ myCheatMap.emplace(md5sum, cheats.str()); + } + + // Update the dirty flag +diff --git a/src/common/EventHandlerSDL2.cxx b/src/common/EventHandlerSDL2.cxx +index 8c8a371..b56d5a1 100644 +--- a/src/common/EventHandlerSDL2.cxx ++++ b/src/common/EventHandlerSDL2.cxx +@@ -33,7 +33,7 @@ EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem) + myQwertz = int{'y'} == static_cast + (SDL_GetKeyFromScancode(static_cast(KBDK_Z))); + buf << "Keyboard: " << (myQwertz ? "QWERTZ" : "QWERTY"); +- Logger::debug(buf.view()); ++ Logger::debug(buf.str()); + } + #endif + +@@ -43,7 +43,7 @@ EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem) + ostringstream buf; + buf << "ERROR: Couldn't initialize SDL joystick support: " + << SDL_GetError() << '\n'; +- Logger::error(buf.view()); ++ Logger::error(buf.str()); + } + Logger::debug("EventHandlerSDL2::EventHandlerSDL2 SDL_INIT_JOYSTICK"); + #endif +diff --git a/src/common/FBBackendSDL2.cxx b/src/common/FBBackendSDL2.cxx +index b9c3f39..efddd45 100644 +--- a/src/common/FBBackendSDL2.cxx ++++ b/src/common/FBBackendSDL2.cxx +@@ -105,11 +105,11 @@ void FBBackendSDL2::queryHardware(vector& fullscreenRes, + SDL_GetDisplayMode(i, m, &mode); + res << std::setw(4) << mode.w << "x" << std::setw(4) << mode.h; + +- if(lastRes != res.view()) ++ if(lastRes != res.str()) + { +- Logger::debug(s.view()); ++ Logger::debug(s.str()); + s.str(""); +- lastRes = res.view(); ++ lastRes = res.str(); + s << " " << lastRes << ": "; + } + s << mode.refresh_rate << "Hz"; +@@ -118,7 +118,7 @@ void FBBackendSDL2::queryHardware(vector& fullscreenRes, + else + s << " "; + } +- Logger::debug(s.view()); ++ Logger::debug(s.str()); + } + + // Now get the maximum windowed desktop resolution +@@ -332,7 +332,7 @@ bool FBBackendSDL2::setVideoMode(const VideoModeHandler::Mode& mode, + + msg << "Display refresh rate changed to " + << adaptedSdlMode.refresh_rate << " Hz " << "(" << adaptedSdlMode.w << "x" << adaptedSdlMode.h << ")"; +- Logger::info(msg.view()); ++ Logger::info(msg.str()); + + SDL_DisplayMode setSdlMode; + SDL_GetWindowDisplayMode(myWindow, &setSdlMode); +diff --git a/src/common/HighScoresManager.cxx b/src/common/HighScoresManager.cxx +index 1e645be..bdb1cdb 100644 +--- a/src/common/HighScoresManager.cxx ++++ b/src/common/HighScoresManager.cxx +@@ -414,7 +414,7 @@ string HighScoresManager::md5Props() const + + buf << specialAddress(jprops) << specialBCD(jprops) << specialZeroBased(jprops); + +- return MD5::hash(buf.view()); ++ return MD5::hash(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -570,7 +570,7 @@ string HighScoresManager::hash(const ScoresData& data) const + << data.scores[r].date; + } + +- return MD5::hash(buf.view()); ++ return MD5::hash(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -657,7 +657,7 @@ void HighScoresManager::loadHighScores(ScoresData& data) + clearHighScores(data); + buf << "Error: Invalid high scores data for variation " << data.variation << "."; + } +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/common/JoyMap.cxx b/src/common/JoyMap.cxx +index cab6734..68ae59e 100644 +--- a/src/common/JoyMap.cxx ++++ b/src/common/JoyMap.cxx +@@ -161,7 +161,7 @@ string JoyMap::getEventMappingDesc(int stick, Event::Type event, + { + if (_event == event && _mapping.mode == mode) + { +- if(!buf.view().empty()) ++ if(!buf.str().empty()) + buf << ", "; + buf << "C" << stick << getDesc(event, _mapping); + } +diff --git a/src/common/KeyMap.cxx b/src/common/KeyMap.cxx +index 460087e..556e482 100644 +--- a/src/common/KeyMap.cxx ++++ b/src/common/KeyMap.cxx +@@ -195,7 +195,7 @@ string KeyMap::getEventMappingDesc(Event::Type event, EventMode mode) const + { + if (_event == event && _mapping.mode == mode) + { +- if(!buf.view().empty()) ++ if(!buf.str().empty()) + buf << ", "; + buf << getDesc(_mapping); + } +diff --git a/src/common/MouseControl.cxx b/src/common/MouseControl.cxx +index 5378014..89c3410 100644 +--- a/src/common/MouseControl.cxx ++++ b/src/common/MouseControl.cxx +@@ -107,7 +107,7 @@ MouseControl::MouseControl(Console& console, string_view mode) + msg << ", Y-axis is "; + MControlToController(yaxis, ytype, yid); + +- myModeList.emplace_back(xtype, xid, ytype, yid, msg.view()); ++ myModeList.emplace_back(xtype, xid, ytype, yid, msg.str()); + } + + // Now consider the possible modes for the mouse based on the left +@@ -174,7 +174,7 @@ void MouseControl::addLeftControllerModes(bool noswap) + msg << "Mouse is left " << myLeftController.name() << " controller"; + const Controller::Type type = myLeftController.type(); + const int id = noswap ? 0 : 1; +- myModeList.emplace_back(type, id, type, id, msg.view()); ++ myModeList.emplace_back(type, id, type, id, msg.str()); + } + } + } +@@ -195,7 +195,7 @@ void MouseControl::addRightControllerModes(bool noswap) + msg << "Mouse is right " << myRightController.name() << " controller"; + const Controller::Type type = myRightController.type(); + const int id = noswap ? 1 : 0; +- myModeList.emplace_back(type, id, type, id, msg.view()); ++ myModeList.emplace_back(type, id, type, id, msg.str()); + } + } + } +@@ -206,11 +206,11 @@ void MouseControl::addPaddleModes(int lport, int rport, int lname, int rname) + const Controller::Type type = Controller::Type::Paddles; + ostringstream msg; + msg << "Mouse is Paddle " << lname << " controller"; +- const MouseMode mode0(type, lport, type, lport, msg.view()); ++ const MouseMode mode0(type, lport, type, lport, msg.str()); + + msg.str(""); + msg << "Mouse is Paddle " << rname << " controller"; +- const MouseMode mode1(type, rport, type, rport, msg.view()); ++ const MouseMode mode1(type, rport, type, rport, msg.str()); + + if(BSPF::equalsIgnoreCase(myProps.get(PropType::Controller_SwapPaddles), "NO")) + { +diff --git a/src/common/PJoystickHandler.cxx b/src/common/PJoystickHandler.cxx +index d21bdef..1b1d808 100644 +--- a/src/common/PJoystickHandler.cxx ++++ b/src/common/PJoystickHandler.cxx +@@ -117,7 +117,7 @@ int PhysicalJoystickHandler::add(const PhysicalJoystickPtr& stick) + { + ostringstream name; + name << stick->name << " #" << count+1; +- stick->name = name.view(); ++ stick->name = name.str(); + } + stick->type = PhysicalJoystick::Type::REGULAR; + } +@@ -175,7 +175,7 @@ void PhysicalJoystickHandler::addToDatabase(const PhysicalJoystickPtr& stick) + ostringstream buf; + buf << "Added joystick " << stick->ID << ":\n" + << " " << stick->about() << '\n'; +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -196,7 +196,7 @@ bool PhysicalJoystickHandler::remove(int id) + ostringstream buf; + buf << "Removed joystick " << mySticks[id]->ID << ":\n" + << " " << mySticks[id]->about() << '\n'; +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + + // Remove joystick, but remember mapping + it->second.mapping = stick->getMap(); +@@ -264,7 +264,7 @@ bool PhysicalJoystickHandler::mapStelladaptors(string_view saport, int ID) + ostringstream buf; + buf << "Erased joystick " << _stick->ID << ":\n" + << " " << _stick->about() << '\n'; +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + + _stick->name.erase(pos); + erased = true; +@@ -808,7 +808,7 @@ string PhysicalJoystickHandler::getMappingDesc(Event::Type event, EventMode mode + //Joystick mapping / labeling + if(!_joyptr->joyMap.getEventMapping(event, evMode).empty()) + { +- if(!buf.view().empty()) ++ if(!buf.str().empty()) + buf << ", "; + buf << _joyptr->joyMap.getEventMappingDesc(_id, event, evMode); + } +@@ -1134,7 +1134,7 @@ void PhysicalJoystickHandler::changeDigitalDeadZone(int direction) + ss << std::round(Controller::digitalDeadZoneValue(deadZone) * 100.F / 32768) << "%"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Digital controller dead zone", ss.view(), deadZone, ++ "Digital controller dead zone", ss.str(), deadZone, + Controller::MIN_DIGITAL_DEADZONE, Controller::MAX_DIGITAL_DEADZONE); + } + +@@ -1152,7 +1152,7 @@ void PhysicalJoystickHandler::changeAnalogPaddleDeadZone(int direction) + ss << std::round(Controller::analogDeadZoneValue(deadZone) * 100.F / 32768) << "%"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Analog controller dead zone", ss.view(), deadZone, ++ "Analog controller dead zone", ss.str(), deadZone, + Controller::MIN_ANALOG_DEADZONE, Controller::MAX_ANALOG_DEADZONE); + } + +@@ -1170,7 +1170,7 @@ void PhysicalJoystickHandler::changeAnalogPaddleSensitivity(int direction) + ss << std::round(Paddles::analogSensitivityValue(sense) * 100.F) << "%"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Analog paddle sensitivity", ss.view(), sense, ++ "Analog paddle sensitivity", ss.str(), sense, + Paddles::MIN_ANALOG_SENSE, Paddles::MAX_ANALOG_SENSE); + } + +@@ -1191,7 +1191,7 @@ void PhysicalJoystickHandler::changeAnalogPaddleLinearity(int direction) + ss << "Off"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Analog paddle linearity", ss.view(), linear, ++ "Analog paddle linearity", ss.str(), linear, + Paddles::MIN_ANALOG_LINEARITY, Paddles::MAX_ANALOG_LINEARITY); + } + +@@ -1212,7 +1212,7 @@ void PhysicalJoystickHandler::changePaddleDejitterAveraging(int direction) + ss << "Off"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Analog paddle dejitter averaging", ss.view(), dejitter, ++ "Analog paddle dejitter averaging", ss.str(), dejitter, + Paddles::MIN_DEJITTER, Paddles::MAX_DEJITTER); + } + +@@ -1233,7 +1233,7 @@ void PhysicalJoystickHandler::changePaddleDejitterReaction(int direction) + ss << "Off"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Analog paddle dejitter reaction", ss.view(), dejitter, ++ "Analog paddle dejitter reaction", ss.str(), dejitter, + Paddles::MIN_DEJITTER, Paddles::MAX_DEJITTER); + } + +@@ -1254,7 +1254,7 @@ void PhysicalJoystickHandler::changeDigitalPaddleSensitivity(int direction) + ss << "Off"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Digital sensitivity", ss.view(), sense, ++ "Digital sensitivity", ss.str(), sense, + Paddles::MIN_DIGITAL_SENSE, Paddles::MAX_DIGITAL_SENSE); + } + +@@ -1272,7 +1272,7 @@ void PhysicalJoystickHandler::changeMousePaddleSensitivity(int direction) + ss << sense * 10 << "%"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Mouse paddle sensitivity", ss.view(), sense, ++ "Mouse paddle sensitivity", ss.str(), sense, + Controller::MIN_MOUSE_SENSE, Controller::MAX_MOUSE_SENSE); + } + +@@ -1290,7 +1290,7 @@ void PhysicalJoystickHandler::changeMouseTrackballSensitivity(int direction) + ss << sense * 10 << "%"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Mouse trackball sensitivity", ss.view(), sense, ++ "Mouse trackball sensitivity", ss.str(), sense, + PointingDevice::MIN_SENSE, PointingDevice::MAX_SENSE); + } + +@@ -1308,7 +1308,7 @@ void PhysicalJoystickHandler::changeDrivingSensitivity(int direction) + ss << sense * 10 << "%"; + + myOSystem.frameBuffer().showGaugeMessage( +- "Driving controller sensitivity", ss.view(), sense, ++ "Driving controller sensitivity", ss.str(), sense, + Driving::MIN_SENSE, Driving::MAX_SENSE); + } + +diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx +index a5c53b0..02b6b4f 100644 +--- a/src/common/PKeyboardHandler.cxx ++++ b/src/common/PKeyboardHandler.cxx +@@ -613,7 +613,7 @@ void PhysicalKeyboardHandler::toggleModKeys(bool toggle) + ostringstream ss; + ss << "Modifier key combos "; + ss << (modCombo ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/common/PNGLibrary.cxx b/src/common/PNGLibrary.cxx +index e3b4b73..d611653 100644 +--- a/src/common/PNGLibrary.cxx ++++ b/src/common/PNGLibrary.cxx +@@ -273,7 +273,7 @@ void PNGLibrary::toggleContinuousSnapshots(bool perFrame) + buf << "Enabling snapshots in " << interval << " second intervals"; + interval *= static_cast(myOSystem.frameRate()); + } +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + setContinuousSnapInterval(interval); + } + else +@@ -282,7 +282,7 @@ void PNGLibrary::toggleContinuousSnapshots(bool perFrame) + buf << "Disabling snapshots, generated " + << (mySnapCounter / mySnapInterval) + << " files"; +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + setContinuousSnapInterval(0); + } + } +@@ -313,7 +313,7 @@ void PNGLibrary::takeSnapshot(uInt32 number) + ostringstream buf; + buf << sspath << "_" << std::hex << std::setw(8) << std::setfill('0') + << number << ".png"; +- filename = buf.view(); ++ filename = buf.str(); + } + else if(!myOSystem.settings().getBool("sssingle")) + { +@@ -328,11 +328,11 @@ void PNGLibrary::takeSnapshot(uInt32 number) + { + buf.str(""); + buf << sspath << "_" << i << ".png"; +- const FSNode next(buf.view()); ++ const FSNode next(buf.str()); + if(!next.exists()) + break; + } +- filename = buf.view(); ++ filename = buf.str(); + } + } + else +@@ -344,7 +344,7 @@ void PNGLibrary::takeSnapshot(uInt32 number) + VarList::push_back(metaData, "Title", "Snapshot"); + version << "Stella " << STELLA_VERSION << " (Build " << STELLA_BUILD << ") [" + << BSPF::ARCH << "]"; +- VarList::push_back(metaData, "Software", version.view()); ++ VarList::push_back(metaData, "Software", version.str()); + const string& name = (myOSystem.settings().getString("snapname") == "int") + ? myOSystem.console().properties().get(PropType::Cart_Name) + : myOSystem.romFile().getName(); +diff --git a/src/common/PaletteHandler.cxx b/src/common/PaletteHandler.cxx +index 6e39ce5..6d021cf 100644 +--- a/src/common/PaletteHandler.cxx ++++ b/src/common/PaletteHandler.cxx +@@ -112,7 +112,7 @@ void PaletteHandler::showAdjustableMessage() + myOSystem.console().timing() == ConsoleTiming::pal ? myPhasePAL : myPhaseNTSC; + buf << std::fixed << std::setprecision(1) << value << DEGREE; + myOSystem.frameBuffer().showGaugeMessage( +- "Palette phase shift", buf.view(), value, ++ "Palette phase shift", buf.str(), value, + (isNTSC ? DEF_NTSC_SHIFT : DEF_PAL_SHIFT) - MAX_PHASE_SHIFT, + (isNTSC ? DEF_NTSC_SHIFT : DEF_PAL_SHIFT) + MAX_PHASE_SHIFT); + } +@@ -122,7 +122,7 @@ void PaletteHandler::showAdjustableMessage() + + buf << std::fixed << std::setprecision(1) << value << DEGREE; + myOSystem.frameBuffer().showGaugeMessage( +- msg.view(), buf.view(), value, -MAX_RGB_SHIFT, +MAX_RGB_SHIFT); ++ msg.str(), buf.str(), value, -MAX_RGB_SHIFT, +MAX_RGB_SHIFT); + } + else + { +@@ -131,7 +131,7 @@ void PaletteHandler::showAdjustableMessage() + : scaleTo100(*myAdjustables[myCurrentAdjustable].value); + buf << value << "%"; + myOSystem.frameBuffer().showGaugeMessage( +- msg.view(), buf.view(), value); ++ msg.str(), buf.str(), value); + } + } + +diff --git a/src/common/RewindManager.cxx b/src/common/RewindManager.cxx +index da5b456..6ba980b 100644 +--- a/src/common/RewindManager.cxx ++++ b/src/common/RewindManager.cxx +@@ -239,7 +239,7 @@ string RewindManager::saveAllStates() + << myOSystem.console().properties().get(PropType::Cart_Name) + << ".sta"; + +- Serializer out(buf.view(), Serializer::Mode::ReadWriteTrunc); ++ Serializer out(buf.str(), Serializer::Mode::ReadWriteTrunc); + if (!out) + return "Can't save to all states file"; + +@@ -296,7 +296,7 @@ string RewindManager::loadAllStates() + << ".sta"; + + // Make sure the file can be opened for reading +- const Serializer in(buf.view(), Serializer::Mode::ReadOnly); ++ const Serializer in(buf.str(), Serializer::Mode::ReadOnly); + if (!in) + return "Can't load from all states file"; + +diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx +index 7f8edeb..1546963 100644 +--- a/src/common/SoundSDL2.cxx ++++ b/src/common/SoundSDL2.cxx +@@ -48,7 +48,7 @@ SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings) + + buf << "WARNING: Failed to initialize SDL audio system! \n" + << " " << SDL_GetError() << '\n'; +- Logger::error(buf.view()); ++ Logger::error(buf.str()); + return; + } + +@@ -83,7 +83,7 @@ void SoundSDL2::queryHardware(VariantList& devices) + // log the available audio devices + ostringstream s; + s << "Supported audio devices (" << numDevices << "):"; +- Logger::debug(s.view()); ++ Logger::debug(s.str()); + + VarList::push_back(devices, "Default", 0); + for(int i = 0; i < numDevices; ++i) +@@ -91,7 +91,7 @@ void SoundSDL2::queryHardware(VariantList& devices) + ostringstream ss; + + ss << " " << i + 1 << ": " << SDL_GetAudioDeviceName(i, 0); +- Logger::debug(ss.view()); ++ Logger::debug(ss.str()); + + VarList::push_back(devices, SDL_GetAudioDeviceName(i, 0), i + 1); + } +@@ -128,7 +128,7 @@ bool SoundSDL2::openDevice() + + buf << "WARNING: Couldn't open SDL audio device! \n" + << " " << SDL_GetError() << '\n'; +- Logger::error(buf.view()); ++ Logger::error(buf.str()); + + return myIsInitializedFlag = false; + } +@@ -253,7 +253,7 @@ void SoundSDL2::adjustVolume(int direction) + // Now show an onscreen message + ostringstream strval; + (percent) ? strval << percent << "%" : strval << "Off"; +- myOSystem.frameBuffer().showGaugeMessage("Volume", strval.view(), percent); ++ myOSystem.frameBuffer().showGaugeMessage("Volume", strval.str(), percent); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/common/StaggeredLogger.cxx b/src/common/StaggeredLogger.cxx +index 0e007eb..770508a 100644 +--- a/src/common/StaggeredLogger.cxx ++++ b/src/common/StaggeredLogger.cxx +@@ -84,7 +84,7 @@ void StaggeredLogger::logLine() + << millisecondsSinceIntervalStart << " milliseconds" + << ")"; + +- Logger::log(ss.view(), myLevel); ++ Logger::log(ss.str(), myLevel); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/common/StateManager.cxx b/src/common/StateManager.cxx +index 599f6c5..e80b508 100644 +--- a/src/common/StateManager.cxx ++++ b/src/common/StateManager.cxx +@@ -207,12 +207,12 @@ void StateManager::loadState(int slot) + << ".st" << slot; + + // Make sure the file can be opened in read-only mode +- Serializer in(buf.view(), Serializer::Mode::ReadOnly); ++ Serializer in(buf.str(), Serializer::Mode::ReadOnly); + if(!in) + { + buf.str(""); + buf << "Can't open/load from state file " << slot; +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + return; + } + +@@ -236,7 +236,7 @@ void StateManager::loadState(int slot) + buf << "Invalid data in state " << slot << " file"; + } + +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + } + } + +@@ -253,12 +253,12 @@ void StateManager::saveState(int slot) + << ".st" << slot; + + // Make sure the file can be opened for writing +- Serializer out(buf.view(), Serializer::Mode::ReadWriteTrunc); ++ Serializer out(buf.str(), Serializer::Mode::ReadWriteTrunc); + if(!out) + { + buf.str(""); + buf << "Can't open/save to state file " << slot; +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + return; + } + +@@ -271,7 +271,7 @@ void StateManager::saveState(int slot) + catch(...) + { + buf << "Error saving state " << slot; +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + return; + } + +@@ -289,7 +289,7 @@ void StateManager::saveState(int slot) + else + buf << "Error saving state " << slot; + +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + } + } + +@@ -304,7 +304,7 @@ void StateManager::changeState(int direction) + buf << "Changed to state slot " << myCurrentSlot; + else + buf << "State slot " << myCurrentSlot; +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -315,7 +315,7 @@ void StateManager::toggleAutoSlot() + // Print appropriate message + ostringstream buf; + buf << "Automatic slot change " << (autoSlot ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(buf.view()); ++ myOSystem.frameBuffer().showTextMessage(buf.str()); + + myOSystem.settings().setValue("autoslot", autoSlot); + } +diff --git a/src/common/Variant.hxx b/src/common/Variant.hxx +index 9997629..48c5c88 100644 +--- a/src/common/Variant.hxx ++++ b/src/common/Variant.hxx +@@ -49,13 +49,13 @@ class Variant + Variant(string_view s) : data{s} { } + Variant(const char* s) : data{s} { } + +- Variant(Int32 i) { buf().str(""); buf() << i; data = buf().view(); } +- Variant(uInt32 i) { buf().str(""); buf() << i; data = buf().view(); } +- Variant(float f) { buf().str(""); buf() << f; data = buf().view(); } +- Variant(double d) { buf().str(""); buf() << d; data = buf().view(); } +- Variant(bool b) { buf().str(""); buf() << b; data = buf().view(); } +- Variant(const Common::Size& s) { buf().str(""); buf() << s; data = buf().view(); } +- Variant(const Common::Point& s) { buf().str(""); buf() << s; data = buf().view(); } ++ Variant(Int32 i) { buf().str(""); buf() << i; data = buf().str(); } ++ Variant(uInt32 i) { buf().str(""); buf() << i; data = buf().str(); } ++ Variant(float f) { buf().str(""); buf() << f; data = buf().str(); } ++ Variant(double d) { buf().str(""); buf() << d; data = buf().str(); } ++ Variant(bool b) { buf().str(""); buf() << b; data = buf().str(); } ++ Variant(const Common::Size& s) { buf().str(""); buf() << s; data = buf().str(); } ++ Variant(const Common::Point& s) { buf().str(""); buf() << s; data = buf().str(); } + + // Conversion methods + const string& toString() const { return data; } +diff --git a/src/common/VideoModeHandler.cxx b/src/common/VideoModeHandler.cxx +index 2cd5202..1725889 100644 +--- a/src/common/VideoModeHandler.cxx ++++ b/src/common/VideoModeHandler.cxx +@@ -54,7 +54,7 @@ const VideoModeHandler::Mode& + // Overscan is not applicable in this mode + myMode = Mode(myImage.w, myImage.h, + Mode::Stretch::Fill, myFSIndex, +- desc.view(), zoom, bezelInfo); ++ desc.str(), zoom, bezelInfo); + } + else + { +diff --git a/src/common/repository/CompositeKVRJsonAdapter.cxx b/src/common/repository/CompositeKVRJsonAdapter.cxx +index 7ef54ec..a1691ae 100644 +--- a/src/common/repository/CompositeKVRJsonAdapter.cxx ++++ b/src/common/repository/CompositeKVRJsonAdapter.cxx +@@ -41,7 +41,7 @@ namespace { + + if (!KeyValueRepositoryJsonFile::save(out, values)) return false; + +- return myKvr.save(myKey, out.view()); ++ return myKvr.save(myKey, out.str()); + } + + private: +diff --git a/src/common/tv_filters/NTSCFilter.cxx b/src/common/tv_filters/NTSCFilter.cxx +index dc509ef..fe4fa71 100644 +--- a/src/common/tv_filters/NTSCFilter.cxx ++++ b/src/common/tv_filters/NTSCFilter.cxx +@@ -90,8 +90,8 @@ void NTSCFilter::selectAdjustable(int direction, + msg << "Custom " << ourCustomAdjustables[myCurrentAdjustable].type; + val << value << "%"; + +- text = msg.view(); +- valueText = val.view(); ++ text = msg.str(); ++ valueText = val.str(); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -121,8 +121,8 @@ void NTSCFilter::changeCurrentAdjustable(int direction, + msg << "Custom " << ourCustomAdjustables[myCurrentAdjustable].type; + val << newValue << "%"; + +- text = msg.view(); +- valueText = val.view(); ++ text = msg.str(); ++ valueText = val.str(); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx +index 33a9fa7..2077e48 100644 +--- a/src/debugger/CartDebug.cxx ++++ b/src/debugger/CartDebug.cxx +@@ -1379,7 +1379,7 @@ string CartDebug::saveDisassembly(string path) + } + + // And finally, output the disassembly +- out << buf.view(); ++ out << buf.str(); + + if(path.empty()) + path = myOSystem.userDir().getPath() +diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx +index 3095e0a..a9704f4 100644 +--- a/src/debugger/Debugger.cxx ++++ b/src/debugger/Debugger.cxx +@@ -125,7 +125,7 @@ bool Debugger::start(string_view message, int address, bool read, + buf << message; + if(address > -1) + buf << cartDebug().getLabel(address, read, 4); +- myDialog->message().setText(buf.view()); ++ myDialog->message().setText(buf.str()); + myDialog->message().setToolTip(toolTip); + return true; + } +@@ -461,7 +461,7 @@ void Debugger::log(string_view triggerMsg) + msg << "B/"; + } + msg << "Addr Code Disasm"; +- Logger::log(msg.view()); ++ Logger::log(msg.str()); + myFirstLog = false; + } + +@@ -515,7 +515,7 @@ void Debugger::log(string_view triggerMsg) + break; + } + } +- Logger::log(msg.view()); ++ Logger::log(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -628,7 +628,7 @@ void Debugger::nextScanline(int lines) + } + lockSystem(); + +- addState(buf.view()); ++ addState(buf.str()); + myOSystem.console().tia().flushLineCache(); + } + +@@ -651,7 +651,7 @@ void Debugger::nextFrame(int frames) + } + lockSystem(); + +- addState(buf.view()); ++ addState(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx +index 42ac0ea..b38cec2 100644 +--- a/src/debugger/DebuggerParser.cxx ++++ b/src/debugger/DebuggerParser.cxx +@@ -597,7 +597,7 @@ void DebuggerParser::printTimer(uInt32 idx, bool showHeader) + + if(!debugger.cartDebug().getLabel(buf, timer.from.addr, true)) + buf << " $" << setw(4) << Base::HEX4 << timer.from.addr; +- string labelFrom{buf.view()}; ++ string labelFrom{buf.str()}; + labelFrom = labelFrom.substr(0, (banked ? 12 : 15) - (timer.mirrors ? 1 : 0)); + labelFrom += (timer.mirrors ? "+" : ""); + labelFrom = (labelFrom + " ").substr(0, banked ? 12 : 15); +@@ -605,7 +605,7 @@ void DebuggerParser::printTimer(uInt32 idx, bool showHeader) + buf.str(""); + if(!debugger.cartDebug().getLabel(buf, timer.to.addr, true)) + buf << " $" << setw(4) << Base::HEX4 << timer.to.addr; +- string labelTo{buf.view()}; ++ string labelTo{buf.str()}; + labelTo = labelTo.substr(0, (banked ? 12 : 15) - (timer.mirrors ? 1 : 0)); + labelTo += (timer.mirrors ? "+" : ""); + labelTo = (labelTo + " ").substr(0, banked ? 12 : 15); +@@ -778,7 +778,7 @@ string DebuggerParser::saveScriptFile(string file) + + const FSNode node(file); + +- if(node.exists() || !out.view().empty()) ++ if(node.exists() || !out.str().empty()) + { + try + { +@@ -1369,11 +1369,11 @@ void DebuggerParser::executeDump() + // So we pass a copy of its contents, then re-create the + // stream inside the lambda + // Maybe this will change in a future version +- const string outStr{out.view()}; +- const string resultStr{commandResult.view()}; ++ const string outStr{out.str()}; ++ const string resultStr{commandResult.str()}; + + DebuggerDialog* dlg = debugger.myDialog; +- BrowserDialog::show(dlg, "Save Dump as", path.view(), ++ BrowserDialog::show(dlg, "Save Dump as", path.str(), + BrowserDialog::Mode::FileSave, + [dlg, outStr, resultStr] + (bool OK, const FSNode& node) +@@ -1393,7 +1393,7 @@ void DebuggerParser::executeDump() + commandResult.str("_NO_PROMPT"); + } + else +- saveDump(FSNode(path.view()), out, commandResult); ++ saveDump(FSNode(path.str()), out, commandResult); + } + } + +@@ -1416,7 +1416,7 @@ void DebuggerParser::executeExec() + ostringstream prefix; + prefix << std::hex << std::setw(8) << std::setfill('0') + << static_cast(TimerManager::getTicks()/1000); +- execPrefix = prefix.view(); ++ execPrefix = prefix.str(); + } + + // make sure the commands are added to prompt history +@@ -1666,7 +1666,7 @@ void DebuggerParser::executeListBreaks() + } + } + if(count) +- commandResult << "breaks:\n" << buf.view(); ++ commandResult << "breaks:\n" << buf.str(); + + StringList conds = debugger.m6502().getCondBreakNames(); + +@@ -1682,7 +1682,7 @@ void DebuggerParser::executeListBreaks() + } + } + +- if(commandResult.view().empty()) ++ if(commandResult.str().empty()) + commandResult << "no breakpoints set"; + } + +@@ -1724,7 +1724,7 @@ void DebuggerParser::executeListSaveStateIfs() + } + } + +- if(commandResult.view().empty()) ++ if(commandResult.str().empty()) + commandResult << "no savestateifs defined"; + } + +@@ -1837,7 +1837,7 @@ void DebuggerParser::executePc() + + debugger.cpuDebug().setPC(args[0]); + msg << "Set PC @ " << Base::HEX4 << args[0]; +- debugger.addState(msg.view()); ++ debugger.addState(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1974,7 +1974,7 @@ void DebuggerParser::executeRunTo() + + buf << "runTo searching through " << max_iterations << " disassembled instructions" + << progress.ELLIPSIS; +- progress.setMessage(buf.view()); ++ progress.setMessage(buf.str()); + progress.setRange(0, static_cast(max_iterations), 5); + progress.open(); + +@@ -2022,7 +2022,7 @@ void DebuggerParser::executeRunToPc() + ProgressDialog progress(debugger.baseDialog(), debugger.lfont()); + + buf << " runTo PC running" << progress.ELLIPSIS << " "; +- progress.setMessage(buf.view()); ++ progress.setMessage(buf.str()); + progress.setRange(0, 100000, 5); + progress.open(); + +@@ -2045,7 +2045,7 @@ void DebuggerParser::executeRunToPc() + << "Set PC to $" << Base::HEX4 << args[0] << " in " + << dec << count << " instructions"; + msg << "RunTo PC @ " << Base::HEX4 << args[0]; +- debugger.addState(msg.view()); ++ debugger.addState(msg.str()); + } + else + commandResult +@@ -2199,9 +2199,9 @@ void DebuggerParser::executeSaveSes() + if(argCount) + path << argStrings[0]; + else +- path << debugger.myOSystem.userDir() << filename.view(); ++ path << debugger.myOSystem.userDir() << filename.str(); + +- commandResult << debugger.prompt().saveBuffer(FSNode(path.view())); ++ commandResult << debugger.prompt().saveBuffer(FSNode(path.str())); + } + } + +@@ -2291,7 +2291,7 @@ void DebuggerParser::executeStepWhile() + + buf << "stepWhile running through disassembled instructions" + << progress.ELLIPSIS; +- progress.setMessage(buf.view()); ++ progress.setMessage(buf.str()); + progress.setRange(0, 100000, 5); + progress.open(); + +@@ -2542,7 +2542,7 @@ void DebuggerParser::executeTraps(bool read, bool write, string_view command, + if(hasCond) + conditionBuf << ")"; + +- const string condition{conditionBuf.view()}; ++ const string condition{conditionBuf.str()}; + + const int res = YaccParser::parse(condition); + if(res == 0) +diff --git a/src/debugger/DiStella.cxx b/src/debugger/DiStella.cxx +index 993bdd5..05e83ea 100644 +--- a/src/debugger/DiStella.cxx ++++ b/src/debugger/DiStella.cxx +@@ -83,7 +83,7 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list, + if (CartDebug::addressType(k + myOffset) == CartDebug::AddrType::ROM) { + reservedLabel.str(""); + reservedLabel << "L" << Base::HEX4 << (k + myOffset); +- myReserved.Label.emplace(k + myOffset, reservedLabel.view()); ++ myReserved.Label.emplace(k + myOffset, reservedLabel.str()); + } + } + } +@@ -227,7 +227,7 @@ void DiStella::disasm(uInt32 distart, int pass) + nextLine << ".byte $" << Base::HEX2 << static_cast(opcode) << " ;"; + nextLine << ourLookup[opcode].mnemonic; + +- myDisasmBuf << nextLine.view() << "'" << ";" ++ myDisasmBuf << nextLine.str() << "'" << ";" + << std::dec << static_cast(ourLookup[opcode].cycles) << "-" + << std::dec << static_cast(ourLookup[nextOpcode].cycles) << " " + << "'= " << std::setw(3) << std::setfill(' ') << std::dec << cycles; +@@ -608,7 +608,7 @@ void DiStella::disasm(uInt32 distart, int pass) + if(pass == 3) { + cycles += static_cast(ourLookup[opcode].cycles); + // A complete line of disassembly (text, cycle count, and bytes) +- myDisasmBuf << nextLine.view() << "'" ++ myDisasmBuf << nextLine.str() << "'" + << ";" << std::dec << static_cast(ourLookup[opcode].cycles) + << (addrMode == AddressingMode::RELATIVE ? (ad & 0xf00) != ((myPC + myOffset) & 0xf00) ? "/3!" : "/3 " : " "); + if((opcode == 0x40 || opcode == 0x60 || opcode == 0x4c || opcode == 0x00 // code block end +@@ -622,7 +622,7 @@ void DiStella::disasm(uInt32 distart, int pass) + else { + myDisasmBuf << "' "; + } +- myDisasmBuf << "'" << nextLineBytes.view(); ++ myDisasmBuf << "'" << nextLineBytes.str(); + + addEntry(Device::CODE); + if(opcode == 0x40 || opcode == 0x60 || opcode == 0x4c || opcode == 0x00) { +diff --git a/src/debugger/gui/AudioWidget.cxx b/src/debugger/gui/AudioWidget.cxx +index 3e2c279..e76b188 100644 +--- a/src/debugger/gui/AudioWidget.cxx ++++ b/src/debugger/gui/AudioWidget.cxx +@@ -152,7 +152,7 @@ void AudioWidget::handleVolume() + stringstream s; + + s << getEffectiveVolume() << "% (eff. volume)"; +- myAudEffV->setLabel(s.view()); ++ myAudEffV->setLabel(s.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/debugger/gui/Cart3EPlusWidget.cxx b/src/debugger/gui/Cart3EPlusWidget.cxx +index e46ed21..d3b7d61 100644 +--- a/src/debugger/gui/Cart3EPlusWidget.cxx ++++ b/src/debugger/gui/Cart3EPlusWidget.cxx +@@ -79,7 +79,7 @@ void Cartridge3EPlusWidget::bankSelect(int& ypos) + + label << "Set segment " << seg << " as "; + +- new StaticTextWidget(_boss, _font, xpos, ypos, label.view()); ++ new StaticTextWidget(_boss, _font, xpos, ypos, label.str()); + ypos += myLineHeight + VGAP * 2; + + xpos += _font.getMaxCharWidth() * 2; +@@ -120,7 +120,7 @@ void Cartridge3EPlusWidget::bankSelect(int& ypos) + label.str(""); + label << "$" << Common::Base::HEX4 << addr1 << "-$" + << Common::Base::HEX4 << (addr1 + 0x1FF); +- auto* t = new StaticTextWidget(_boss, _font, xpos_s, ypos_s + 2, label.view()); ++ auto* t = new StaticTextWidget(_boss, _font, xpos_s, ypos_s + 2, label.str()); + + const int xoffset = t->getRight() + _font.getMaxCharWidth(); + const size_t bank_off = static_cast(seg) * 2; +@@ -131,7 +131,7 @@ void Cartridge3EPlusWidget::bankSelect(int& ypos) + + label.str(""); + label << "$" << Common::Base::HEX4 << addr2 << "-$" << Common::Base::HEX4 << (addr2 + 0x1FF); +- new StaticTextWidget(_boss, _font, xpos_s, ypos_s + 2, label.view()); ++ new StaticTextWidget(_boss, _font, xpos_s, ypos_s + 2, label.str()); + + myBankState[bank_off + 1] = new EditTextWidget(_boss, _font, + xoffset, ypos_s, _w - xoffset - 10, myLineHeight, ""); +@@ -209,12 +209,12 @@ void Cartridge3EPlusWidget::updateUIState() + + buf << "RAM @ $" << Common::Base::HEX4 + << (ramBank << myCart3EP.myBankShift) << " (R)"; +- myBankState[bank_off]->setText(buf.view()); ++ myBankState[bank_off]->setText(buf.str()); + + buf.str(""); + buf << "RAM @ $" << Common::Base::HEX4 + << ((ramBank << myCart3EP.myBankShift) + myCart3EP.myBankSize) << " (W)"; +- myBankState[bank_off + 1]->setText(buf.view()); ++ myBankState[bank_off + 1]->setText(buf.str()); + + myBankWidgets[seg]->setSelectedIndex(ramBank); + myBankType[seg]->setSelected("RAM"); +@@ -223,12 +223,12 @@ void Cartridge3EPlusWidget::updateUIState() + { + buf << "ROM @ $" << Common::Base::HEX4 + << ((bank << myCart3EP.myBankShift)); +- myBankState[bank_off]->setText(buf.view()); ++ myBankState[bank_off]->setText(buf.str()); + + buf.str(""); + buf << "ROM @ $" << Common::Base::HEX4 + << ((bank << myCart3EP.myBankShift) + myCart3EP.myBankSize); +- myBankState[bank_off + 1]->setText(buf.view()); ++ myBankState[bank_off + 1]->setText(buf.str()); + + myBankWidgets[seg]->setSelectedIndex(bank); + myBankType[seg]->setSelected("ROM"); +diff --git a/src/debugger/gui/CartARMWidget.cxx b/src/debugger/gui/CartARMWidget.cxx +index 3a35ae3..f0d9c15 100644 +--- a/src/debugger/gui/CartARMWidget.cxx ++++ b/src/debugger/gui/CartARMWidget.cxx +@@ -242,7 +242,7 @@ void CartridgeARMWidget::handleChipType() + << (chipProps.flashBanks > 1 ? "s" : "") << ", " + << chipProps.MHz << " MHz, " + << chipProps.flashCycles - 1 << " wait states"; +- myChipType->setToolTip(buf.view()); ++ myChipType->setToolTip(buf.str()); + } + } + +diff --git a/src/debugger/gui/CartBUSInfoWidget.cxx b/src/debugger/gui/CartBUSInfoWidget.cxx +index d9426ef..fdb9609 100644 +--- a/src/debugger/gui/CartBUSInfoWidget.cxx ++++ b/src/debugger/gui/CartBUSInfoWidget.cxx +@@ -57,7 +57,7 @@ CartridgeBUSInfoWidget::CartridgeBUSInfoWidget( + } + #endif + +- addBaseInformation(size, "AtariAge", info.view()); ++ addBaseInformation(size, "AtariAge", info.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/debugger/gui/CartCDFInfoWidget.cxx b/src/debugger/gui/CartCDFInfoWidget.cxx +index 241aac0..9e7c279 100644 +--- a/src/debugger/gui/CartCDFInfoWidget.cxx ++++ b/src/debugger/gui/CartCDFInfoWidget.cxx +@@ -53,7 +53,7 @@ CartridgeCDFInfoWidget::CartridgeCDFInfoWidget( + } + #endif + +- addBaseInformation(cart.romSize(), "AtariAge", info.view()); ++ addBaseInformation(cart.romSize(), "AtariAge", info.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/debugger/gui/CartDPCPlusWidget.cxx b/src/debugger/gui/CartDPCPlusWidget.cxx +index 045405b..ce12a3d 100644 +--- a/src/debugger/gui/CartDPCPlusWidget.cxx ++++ b/src/debugger/gui/CartDPCPlusWidget.cxx +@@ -50,7 +50,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( + #endif + + int xpos = 2, +- ypos = addBaseInformation(size, "Activision (Pitfall II)", info.view()) + ++ ypos = addBaseInformation(size, "Activision (Pitfall II)", info.str()) + + myLineHeight; + + VariantList items; +diff --git a/src/debugger/gui/CartDPCWidget.cxx b/src/debugger/gui/CartDPCWidget.cxx +index f1544ae..3db9b1d 100644 +--- a/src/debugger/gui/CartDPCWidget.cxx ++++ b/src/debugger/gui/CartDPCWidget.cxx +@@ -48,7 +48,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( + } + + int xpos = 2, +- ypos = addBaseInformation(size, "Activision (Pitfall II)", info.view()) + ++ ypos = addBaseInformation(size, "Activision (Pitfall II)", info.str()) + + myLineHeight; + + VariantList items; +@@ -57,7 +57,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( + ostringstream buf; + + buf << "#" << std::dec << bank << " ($" << Common::Base::HEX4 << (0xFFF8 + bank) << ")"; +- VarList::push_back(items, buf.view()); ++ VarList::push_back(items, buf.str()); + } + + myBank = +diff --git a/src/debugger/gui/CartDebugWidget.cxx b/src/debugger/gui/CartDebugWidget.cxx +index 85a1b47..b555c39 100644 +--- a/src/debugger/gui/CartDebugWidget.cxx ++++ b/src/debugger/gui/CartDebugWidget.cxx +@@ -56,7 +56,7 @@ int CartDebugWidget::addBaseInformation(size_t bytes, string_view manufacturer, + buf << " / " << (bytes/1024) << "KB"; + + w = new EditTextWidget(_boss, _nfont, x+lwidth, y - 1, +- fwidth, myLineHeight, buf.view()); ++ fwidth, myLineHeight, buf.str()); + w->setEditable(false); + y += myLineHeight + 4; + +diff --git a/src/debugger/gui/CartE7Widget.cxx b/src/debugger/gui/CartE7Widget.cxx +index ebd7112..8053497 100644 +--- a/src/debugger/gui/CartE7Widget.cxx ++++ b/src/debugger/gui/CartE7Widget.cxx +@@ -66,7 +66,7 @@ void CartridgeE7Widget::initialize(GuiObject* boss, + const uInt32 size = cart.romBankCount() * CartridgeE7::BANK_SIZE; + + constexpr int xpos = 2; +- int ypos = addBaseInformation(size, "M Network", info.view(), 15) + myLineHeight; ++ int ypos = addBaseInformation(size, "M Network", info.str(), 15) + myLineHeight; + + VariantList items0, items1; + for(int i = 0; i < cart.romBankCount(); ++i) +diff --git a/src/debugger/gui/CartEnhancedWidget.cxx b/src/debugger/gui/CartEnhancedWidget.cxx +index 06ee13c..18ccf61 100644 +--- a/src/debugger/gui/CartEnhancedWidget.cxx ++++ b/src/debugger/gui/CartEnhancedWidget.cxx +@@ -197,8 +197,8 @@ void CartridgeEnhancedWidget::bankList(uInt16 bankCount, int seg, VariantList& i + + if(myCart.hotspot() != 0 && myHotspotDelta > 0) + buf << " " << hotspotStr(bank, seg); +- VarList::push_back(items, buf.view()); +- width = std::max(width, _font.getStringWidth(buf.view())); ++ VarList::push_back(items, buf.str()); ++ width = std::max(width, _font.getStringWidth(buf.str())); + } + } + +@@ -229,7 +229,7 @@ void CartridgeEnhancedWidget::bankSelect(int& ypos) + buf << " "; // align with info + + myBankWidgets[seg] = new PopUpWidget(_boss, _font, xpos, ypos - 2, +- pw, myLineHeight, items, buf.view(), ++ pw, myLineHeight, items, buf.str(), + 0, kBankChanged); + myBankWidgets[seg]->setTarget(this); + myBankWidgets[seg]->setID(seg); +@@ -338,14 +338,14 @@ void CartridgeEnhancedWidget::loadConfig() + + for(auto i: arr) + buf << Common::Base::HEX2 << static_cast(i) << " "; +- myPlusROMSendWidget->setText(buf.view(), arr != myOldState.send); ++ myPlusROMSendWidget->setText(buf.str(), arr != myOldState.send); + + buf.str(""); + arr = myCart.myPlusROM->getReceive(); + + for(auto i: arr) + buf << Common::Base::HEX2 << static_cast(i) << " "; +- myPlusROMReceiveWidget->setText(buf.view(), arr != myOldState.receive); ++ myPlusROMReceiveWidget->setText(buf.str(), arr != myOldState.receive); + } + if(myBankWidgets != nullptr) + { +diff --git a/src/debugger/gui/CartRamWidget.cxx b/src/debugger/gui/CartRamWidget.cxx +index e685294..88cacf3 100644 +--- a/src/debugger/gui/CartRamWidget.cxx ++++ b/src/debugger/gui/CartRamWidget.cxx +@@ -55,7 +55,7 @@ CartRamWidget::CartRamWidget( + buf << " / " << (ramsize/1024) << "KB"; + + etw = new EditTextWidget(boss, nfont, xpos+lwidth, ypos - 1, +- fwidth, myLineHeight, buf.view()); ++ fwidth, myLineHeight, buf.str()); + etw->setEditable(false); + ypos += myLineHeight + 4; + +diff --git a/src/debugger/gui/CpuWidget.cxx b/src/debugger/gui/CpuWidget.cxx +index 5d57910..7ae8b89 100644 +--- a/src/debugger/gui/CpuWidget.cxx ++++ b/src/debugger/gui/CpuWidget.cxx +@@ -203,7 +203,7 @@ void CpuWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) + // event the rest of the debugger widgets + ostringstream command; + command << "pc #" << value; +- instance().debugger().run(command.view()); ++ instance().debugger().run(command.str()); + break; + } + +diff --git a/src/debugger/gui/DelayQueueWidget.cxx b/src/debugger/gui/DelayQueueWidget.cxx +index ca5251c..73faaf4 100644 +--- a/src/debugger/gui/DelayQueueWidget.cxx ++++ b/src/debugger/gui/DelayQueueWidget.cxx +@@ -86,10 +86,10 @@ void DelayQueueWidget::loadConfig() { + break; + } + +- if(line != ss.view()) ++ if(line != ss.str()) + { + setDirty(); +- line = ss.view(); ++ line = ss.str(); + } + delayQueueIterator->next(); + } +diff --git a/src/debugger/gui/FlashWidget.cxx b/src/debugger/gui/FlashWidget.cxx +index 58e101b..1388b59 100644 +--- a/src/debugger/gui/FlashWidget.cxx ++++ b/src/debugger/gui/FlashWidget.cxx +@@ -105,7 +105,7 @@ void FlashWidget::loadConfig() + label << " "; + label << ": " << Common::Base::HEX4 << from << "-" << Common::Base::HEX4 << to; + } +- myPage[useCount]->setLabel(label.view()); ++ myPage[useCount]->setLabel(label.str()); + + startPage = -1; + if(++useCount == MAX_PAGES) +diff --git a/src/debugger/gui/NullControlWidget.hxx b/src/debugger/gui/NullControlWidget.hxx +index 45ffd4a..51130e1 100644 +--- a/src/debugger/gui/NullControlWidget.hxx ++++ b/src/debugger/gui/NullControlWidget.hxx +@@ -47,10 +47,10 @@ class NullControlWidget : public ControllerWidget + { + ostringstream buf; + buf << getHeader(); +- const int lwidth = std::max(font.getStringWidth(buf.view()), ++ const int lwidth = std::max(font.getStringWidth(buf.str()), + font.getStringWidth("Controller input")); + +- new StaticTextWidget(boss, font, x, y + 2, lwidth, fontHeight, buf.view()); ++ new StaticTextWidget(boss, font, x, y + 2, lwidth, fontHeight, buf.str()); + y += 2 + lineHeight * 2; + new StaticTextWidget(boss, font, x, y, lwidth, + fontHeight, "Controller input", TextAlign::Center); +diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx +index ee1d0bd..cdfac0f 100644 +--- a/src/debugger/gui/RomWidget.cxx ++++ b/src/debugger/gui/RomWidget.cxx +@@ -181,7 +181,7 @@ void RomWidget::setPC(int disasm_line) + { + ostringstream command; + command << "pc #" << address; +- instance().debugger().run(command.view()); ++ instance().debugger().run(command.str()); + } + } + +@@ -194,7 +194,7 @@ void RomWidget::runtoPC(int disasm_line) + { + ostringstream command; + command << "runtopc #" << address; +- const string& msg = instance().debugger().run(command.view()); ++ const string& msg = instance().debugger().run(command.str()); + instance().frameBuffer().showTextMessage(msg); + } + } +@@ -208,7 +208,7 @@ void RomWidget::setTimer(int disasm_line) + { + ostringstream command; + command << "timer #" << address << " " << instance().debugger().cartDebug().getBank(address); +- const string& msg = instance().debugger().run(command.view()); ++ const string& msg = instance().debugger().run(command.str()); + instance().frameBuffer().showTextMessage(msg); + } + } +@@ -244,7 +244,7 @@ void RomWidget::patchROM(int disasm_line, string_view bytes, + + Common::Base::setFormat(base); + command << "rom #" << address << " " << bytes; +- instance().debugger().run(command.view()); ++ instance().debugger().run(command.str()); + + // Restore previous base + Common::Base::setFormat(oldbase); +diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx +index 01f3222..2d6ef2b 100644 +--- a/src/debugger/gui/TiaOutputWidget.cxx ++++ b/src/debugger/gui/TiaOutputWidget.cxx +@@ -97,12 +97,12 @@ void TiaOutputWidget::saveSnapshot(int execDepth, string_view execPrefix, + buf.str(""); + suffix.str(""); + suffix << "_" << i; +- buf << sspath.view() << suffix.view() << ".png"; +- const FSNode next(buf.view()); ++ buf << sspath.str() << suffix.str() << ".png"; ++ const FSNode next(buf.str()); + if(!next.exists()) + break; + } +- sspath << suffix.view(); ++ sspath << suffix.str(); + } + } + sspath << ".png"; +@@ -166,7 +166,7 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in + if(lines > 0) + { + command << "scanLine #" << lines; +- const string message = instance().debugger().parser().run(command.view()); ++ const string message = instance().debugger().parser().run(command.str()); + instance().frameBuffer().showTextMessage(message); + } + } +@@ -175,7 +175,7 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in + ostringstream command; + const int scanline = myClickY + startLine; + command << "breakIf _scan==#" << scanline; +- const string& message = instance().debugger().parser().run(command.view()); ++ const string& message = instance().debugger().parser().run(command.str()); + instance().frameBuffer().showTextMessage(message); + } + else if(rmb == "zoom") +diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx +index 5ea8c15..38c2907 100644 +--- a/src/debugger/gui/TiaZoomWidget.cxx ++++ b/src/debugger/gui/TiaZoomWidget.cxx +@@ -255,7 +255,7 @@ void TiaZoomWidget::handleCommand(CommandSender* sender, int cmd, int data, int + if(lines > 0) + { + command << "scanline #" << lines; +- const string& message = instance().debugger().parser().run(command.view()); ++ const string& message = instance().debugger().parser().run(command.str()); + instance().frameBuffer().showTextMessage(message); + } + } +@@ -264,7 +264,7 @@ void TiaZoomWidget::handleCommand(CommandSender* sender, int cmd, int data, int + ostringstream command; + const int scanline = myClickY / myZoomLevel + myOffY + startLine; + command << "breakif _scan==#" << scanline; +- const string& message = instance().debugger().parser().run(command.view()); ++ const string& message = instance().debugger().parser().run(command.str()); + instance().frameBuffer().showTextMessage(message); + } + else +diff --git a/src/emucore/CartCreator.cxx b/src/emucore/CartCreator.cxx +index 508776f..a23030e 100644 +--- a/src/emucore/CartCreator.cxx ++++ b/src/emucore/CartCreator.cxx +@@ -183,7 +183,7 @@ unique_ptr CartCreator::create(const FSNode& file, + buf << " " << Bankswitch::typeToName(detectedType); + buf << ") "; + +- cartridge->setAbout(buf.view(), Bankswitch::typeToName(type), id); ++ cartridge->setAbout(buf.str(), Bankswitch::typeToName(type), id); + + return cartridge; + } +@@ -211,7 +211,7 @@ CartCreator::createFromMultiCart(const ByteBuffer& image, size_t& size, + md5 = MD5::hash(slice, size); + ostringstream buf; + buf << " [G" << (i+1) << "]"; +- id = buf.view(); ++ id = buf.str(); + + // TODO: allow using ROM properties instead of autodetect only + if(size <= 2_KB) +diff --git a/src/emucore/CartDetector.cxx b/src/emucore/CartDetector.cxx +index cd298d8..34ffdea 100644 +--- a/src/emucore/CartDetector.cxx ++++ b/src/emucore/CartDetector.cxx +@@ -264,7 +264,7 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si + + ostringstream ss; + ss << "Bankswitching type '" << Bankswitch::typeToDesc(type) << "' detected"; +- Logger::debug(ss.view()); ++ Logger::debug(ss.str()); + + return type; + } +diff --git a/src/emucore/CartEnhanced.cxx b/src/emucore/CartEnhanced.cxx +index 5c2e4e4..3fe071a 100644 +--- a/src/emucore/CartEnhanced.cxx ++++ b/src/emucore/CartEnhanced.cxx +@@ -35,14 +35,14 @@ CartridgeEnhanced::CartridgeEnhanced(const ByteBuffer& image, size_t size, + ostringstream buf; + buf << "ROM larger than expected (" << size << " > " << bsSize + << "), truncating " << (size - bsSize) << " bytes\n"; +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + } + else if(size < bsSize) + { + ostringstream buf; + buf << "ROM smaller than expected (" << size << " < " << bsSize + << "), appending " << (bsSize - size) << " bytes\n"; +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + } + + mySize = bsSize; +diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx +index 55dbc9c..530183a 100644 +--- a/src/emucore/Console.cxx ++++ b/src/emucore/Console.cxx +@@ -134,7 +134,7 @@ Console::Console(OSystem& osystem, unique_ptr& cart, + #ifdef DEBUG_BUILD + ostringstream msg; + msg << "Phosphor effect automatically " << (enable ? "enabled" : "disabled"); +- frameBuffer.showTextMessage(msg.view()); ++ frameBuffer.showTextMessage(msg.str()); + #endif + }; + myTIA = make_unique(*this, [this]() { return timing(); }, myOSystem.settings(), callback); +@@ -578,7 +578,7 @@ void Console::toggleInter(bool toggle) + ostringstream ss; + + ss << "Interpolation " << (enabled ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + else + myOSystem.frameBuffer().showTextMessage( +@@ -600,7 +600,7 @@ void Console::toggleTurbo() + + ostringstream ss; + ss << "Turbo mode " << (!enabled ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -625,7 +625,7 @@ void Console::changeSpeed(int direction) + ostringstream val; + + val << formatSpeed(speed) << "%"; +- myOSystem.frameBuffer().showGaugeMessage("Emulation speed", val.view(), speed, MIN_SPEED, MAX_SPEED); ++ myOSystem.frameBuffer().showGaugeMessage("Emulation speed", val.str(), speed, MIN_SPEED, MAX_SPEED); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -648,7 +648,7 @@ void Console::togglePhosphor(bool toggle) + + ostringstream msg; + msg << "Phosphor effect " << (enable ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -691,7 +691,7 @@ void Console::cyclePhosphorMode(int direction) + } + ostringstream msg; + msg << "Phosphor mode " << MESSAGES[mode]; +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -707,7 +707,7 @@ void Console::changePhosphor(int direction) + + ostringstream val; + val << blend; +- myProperties.set(PropType::Display_PPBlend, val.view()); ++ myProperties.set(PropType::Display_PPBlend, val.str()); + if(blend) + val << "%"; + else +@@ -715,7 +715,7 @@ void Console::changePhosphor(int direction) + val.str(""); + val << "Off"; + } +- myOSystem.frameBuffer().showGaugeMessage("Phosphor blend", val.view(), blend); ++ myOSystem.frameBuffer().showGaugeMessage("Phosphor blend", val.str(), blend); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -804,11 +804,11 @@ void Console::changeVerticalCenter(int direction) + ostringstream ss, val; + ss << vcenter; + +- myProperties.set(PropType::Display_VCenter, ss.view()); ++ myProperties.set(PropType::Display_VCenter, ss.str()); + if (vcenter != myTIA->vcenter()) myTIA->setVcenter(vcenter); + + val << (vcenter ? vcenter > 0 ? "+" : "" : " ") << vcenter << "px"; +- myOSystem.frameBuffer().showGaugeMessage("V-Center", val.view(), vcenter, ++ myOSystem.frameBuffer().showGaugeMessage("V-Center", val.str(), vcenter, + myTIA->minVcenter(), myTIA->maxVcenter()); + } + +@@ -838,7 +838,7 @@ void Console::changeVSizeAdjust(int direction) + + val << (newAdjustVSize ? newAdjustVSize > 0 ? "+" : "" : " ") + << newAdjustVSize << "%"; +- myOSystem.frameBuffer().showGaugeMessage("V-Size", val.view(), newAdjustVSize, -5, 5); ++ myOSystem.frameBuffer().showGaugeMessage("V-Size", val.str(), newAdjustVSize, -5, 5); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -982,7 +982,7 @@ void Console::changeLeftController(int direction) + + ostringstream msg; + msg << "Left controller " << Controller::getName(Controller::Type{type}); +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1000,7 +1000,7 @@ void Console::changeRightController(int direction) + + ostringstream msg; + msg << "Right controller " << Controller::getName(Controller::Type{type}); +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1156,7 +1156,7 @@ void Console::toggleSwapPorts(bool toggle) + + ostringstream msg; + msg << "Swap ports " << (swapped ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1174,7 +1174,7 @@ void Console::toggleSwapPaddles(bool toggle) + + ostringstream msg; + msg << "Swap paddles " << (swapped ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1188,7 +1188,7 @@ void Console::changePaddleCenterX(int direction) + + ostringstream val; + val << (center ? center > 0 ? "+" : "" : " ") << center * 5 << "px"; +- myOSystem.frameBuffer().showGaugeMessage("Paddles x-center ", val.view(), center, ++ myOSystem.frameBuffer().showGaugeMessage("Paddles x-center ", val.str(), center, + Paddles::MIN_ANALOG_CENTER, Paddles::MAX_ANALOG_CENTER); + } + +@@ -1203,7 +1203,7 @@ void Console::changePaddleCenterY(int direction) + + ostringstream val; + val << (center ? center > 0 ? "+" : "" : " ") << center * 5 << "px"; +- myOSystem.frameBuffer().showGaugeMessage("Paddles y-center ", val.view(), center, ++ myOSystem.frameBuffer().showGaugeMessage("Paddles y-center ", val.str(), center, + Paddles::MIN_ANALOG_CENTER, Paddles::MAX_ANALOG_CENTER); + } + +@@ -1225,13 +1225,13 @@ void Console::changePaddleAxesRange(int direction) + control << mode; + if(range != 100) + control << " " << std::to_string(range); +- myProperties.set(PropType::Controller_MouseAxis, control.view()); ++ myProperties.set(PropType::Controller_MouseAxis, control.str()); + + Paddles::setDigitalPaddleRange(range); + + ostringstream val; + val << range << "%"; +- myOSystem.frameBuffer().showGaugeMessage("Mouse axes range", val.view(), range); ++ myOSystem.frameBuffer().showGaugeMessage("Mouse axes range", val.str(), range); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1248,7 +1248,7 @@ void Console::toggleAutoFire(bool toggle) + + ostringstream ss; + ss << "Autofire " << (enabled ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1275,7 +1275,7 @@ void Console::changeAutoFireRate(int direction) + else + val << "Off"; + +- myOSystem.frameBuffer().showGaugeMessage("Autofire rate", val.view(), rate, 0, isNTSC ? 30 : 25); ++ myOSystem.frameBuffer().showGaugeMessage("Autofire rate", val.str(), rate, 0, isNTSC ? 30 : 25); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -1400,7 +1400,7 @@ void Console::changeJitterSense(int direction) const + myTIA->setJitterSensitivity(sensitivity); + myOSystem.settings().setValue(prefix + "tv.jitter_sense", sensitivity); + val << sensitivity; +- myOSystem.frameBuffer().showGaugeMessage("TV jitter sensitivity", val.view(), sensitivity, ++ myOSystem.frameBuffer().showGaugeMessage("TV jitter sensitivity", val.str(), sensitivity, + 0, JitterEmulation::MAX_SENSITIVITY); + } + else +@@ -1433,7 +1433,7 @@ void Console::changeJitterRecovery(int direction) const + myTIA->setJitterRecoveryFactor(recovery); + myOSystem.settings().setValue(prefix + "tv.jitter_recovery", recovery); + val << recovery; +- myOSystem.frameBuffer().showGaugeMessage("TV jitter roll", val.view(), ++ myOSystem.frameBuffer().showGaugeMessage("TV jitter roll", val.str(), + recovery, 0, JitterEmulation::MAX_RECOVERY); + } + else +diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx +index 2a95510..0dc2870 100644 +--- a/src/emucore/EventHandler.cxx ++++ b/src/emucore/EventHandler.cxx +@@ -205,7 +205,7 @@ void EventHandler::toggleAllow4JoyDirections(bool toggle) + ostringstream ss; + ss << "Allow all 4 joystick directions "; + ss << (joyAllow4 ? "enabled" : "disabled"); +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -2330,7 +2330,7 @@ VariantList EventHandler::getComboList() + if(event < Event::Combo1 || event > Event::Combo16) + { + buf << i; +- VarList::push_back(l, EventHandler::ourEmulActionList[i].action, buf.view()); ++ VarList::push_back(l, EventHandler::ourEmulActionList[i].action, buf.str()); + buf.str(""); + } + } +@@ -2547,7 +2547,7 @@ void EventHandler::changeMouseControllerMode(int direction) + + ostringstream ss; + ss << "Mouse controls " << MSG[i] << " devices"; +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -2562,7 +2562,7 @@ void EventHandler::changeMouseCursor(int direction) + ss << "Mouse cursor visibilility: " + << ((cursor & 2) ? "+" : "-") << "UI, " + << ((cursor & 1) ? "+" : "-") << "Emulation"; +- myOSystem.frameBuffer().showTextMessage(ss.view()); ++ myOSystem.frameBuffer().showTextMessage(ss.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx +index c5ffe4c..f6b80e3 100644 +--- a/src/emucore/FrameBuffer.cxx ++++ b/src/emucore/FrameBuffer.cxx +@@ -721,7 +721,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) + << "Hz => " + << info.DisplayFormat; + +- myStatsMsg.surface->drawString(f, ss.view(), xPos, yPos, ++ myStatsMsg.surface->drawString(f, ss.str(), xPos, yPos, + myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor); + + yPos += dy; +@@ -736,7 +736,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) + : myOSystem.settings().getFloat("speed")) + << "% speed"; + +- myStatsMsg.surface->drawString(f, ss.view(), xPos, yPos, ++ myStatsMsg.surface->drawString(f, ss.str(), xPos, yPos, + myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor); + + yPos += dy; +@@ -744,7 +744,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) + + ss << info.BankSwitch; + int xPosEnd = +- myStatsMsg.surface->drawString(f, ss.view(), xPos, yPos, ++ myStatsMsg.surface->drawString(f, ss.str(), xPos, yPos, + myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor); + + if(myOSystem.settings().getBool("dev.settings")) +@@ -760,7 +760,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) + color = kDbgColorRed; + ss << "VSYNC!"; + } +- myStatsMsg.surface->drawString(f, ss.view(), xPosEnd, yPos, ++ myStatsMsg.surface->drawString(f, ss.str(), xPosEnd, yPos, + myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor); + } + +@@ -1174,7 +1174,7 @@ void FrameBuffer::toggleFullscreen(bool toggle) + else + msg << "disabled"; + } +- showTextMessage(msg.view()); ++ showTextMessage(msg.str()); + } + break; + } +@@ -1207,7 +1207,7 @@ void FrameBuffer::toggleAdaptRefresh(bool toggle) + msg << (isAdaptRefresh ? "enabled" : "disabled"); + msg << " (" << myBackend->refreshRate() << " Hz)"; + +- showTextMessage(msg.view()); ++ showTextMessage(msg.str()); + } + } + #endif +@@ -1233,7 +1233,7 @@ void FrameBuffer::changeOverscan(int direction) + val << (overscan > 0 ? "+" : "" ) << overscan << "%"; + else + val << "Off"; +- myOSystem.frameBuffer().showGaugeMessage("Overscan", val.view(), overscan, 0, 10); ++ myOSystem.frameBuffer().showGaugeMessage("Overscan", val.str(), overscan, 0, 10); + } + } + +diff --git a/src/emucore/KidVid.cxx b/src/emucore/KidVid.cxx +index 73ade24..680b70a 100644 +--- a/src/emucore/KidVid.cxx ++++ b/src/emucore/KidVid.cxx +@@ -132,7 +132,7 @@ void KidVid::update() + ostringstream msg; + msg << "Game #" << gameNumber[myTape - 1] << " - \"" + << gameName[gameNumber[myTape - 1] + (myGame == Game::Smurfs ? -1 : 2)] << "\""; +- myCallback(msg.view(), true); ++ myCallback(msg.str(), true); + } + } + +@@ -302,7 +302,7 @@ void KidVid::setNextSong() + ourSongStart[temp], mySongLength); + ostringstream msg; + msg << "Read song #" << mySongPointer << " (" << fileName << ")"; +- myCallback(msg.view(), false); ++ myCallback(msg.str(), false); + + #ifdef DEBUG_BUILD + cerr << fileName << ": " << (ourSongPositions[mySongPointer] & 0x7f) << '\n'; +diff --git a/src/emucore/M6502.cxx b/src/emucore/M6502.cxx +index 76dd032..d65d99a 100644 +--- a/src/emucore/M6502.cxx ++++ b/src/emucore/M6502.cxx +@@ -133,7 +133,7 @@ inline uInt8 M6502::peek(uInt16 address, Device::AccessFlags flags) + stringstream msg; + msg << "RTrap" << (flags == DISASM_NONE ? "G[" : "[") << Common::Base::HEX2 << cond << "]" + << (myTrapCondNames[cond].empty() ? ": " : "If: {" + myTrapCondNames[cond] + "} "); +- myHitTrapInfo.message = msg.view(); ++ myHitTrapInfo.message = msg.str(); + myHitTrapInfo.address = address; + } + } +@@ -168,7 +168,7 @@ inline void M6502::poke(uInt16 address, uInt8 value, Device::AccessFlags flags) + myJustHitWriteTrapFlag = true; + stringstream msg; + msg << "WTrap[" << Common::Base::HEX2 << cond << "]" << (myTrapCondNames[cond].empty() ? ":" : "If: {" + myTrapCondNames[cond] + "}"); +- myHitTrapInfo.message = msg.view(); ++ myHitTrapInfo.message = msg.str(); + myHitTrapInfo.address = address; + } + } +@@ -291,7 +291,7 @@ inline void M6502::_execute(uInt64 cycles, DispatchResult& result) + + msg << "BP: $" << Common::Base::HEX4 << PC << ", bank #" + << std::dec << static_cast(bank); +- result.setDebugger(currentCycles, msg.view(), "Breakpoint"); ++ result.setDebugger(currentCycles, msg.str(), "Breakpoint"); + return; + } + } +@@ -311,12 +311,12 @@ inline void M6502::_execute(uInt64 cycles, DispatchResult& result) + if(myLogBreaks) + { + msg << "CBP[" << Common::Base::HEX2 << cond << "]:"; +- myDebugger->log(msg.view()); ++ myDebugger->log(msg.str()); + } + else + { + msg << "CBP[" << Common::Base::HEX2 << cond << "]: " << myCondBreakNames[cond]; +- result.setDebugger(currentCycles, msg.view(), "Conditional breakpoint"); ++ result.setDebugger(currentCycles, msg.str(), "Conditional breakpoint"); + return; + } + } +@@ -335,7 +335,7 @@ inline void M6502::_execute(uInt64 cycles, DispatchResult& result) + { + ostringstream msg; + msg << "conditional savestate [" << Common::Base::HEX2 << cond << "]"; +- myDebugger->addState(msg.view()); ++ myDebugger->addState(msg.str()); + } + + mySystem->cart().clearAllRAMAccesses(); +@@ -378,7 +378,7 @@ inline void M6502::_execute(uInt64 cycles, DispatchResult& result) + { + ostringstream msg; + msg << "RWP[@ $" << Common::Base::HEX4 << rwpAddr << "]: "; +- result.setDebugger(currentCycles, msg.view(), "Read from write port", oldPC); ++ result.setDebugger(currentCycles, msg.str(), "Read from write port", oldPC); + return; + } + } +@@ -390,7 +390,7 @@ inline void M6502::_execute(uInt64 cycles, DispatchResult& result) + { + ostringstream msg; + msg << "WRP[@ $" << Common::Base::HEX4 << wrpAddr << "]: "; +- result.setDebugger(currentCycles, msg.view(), "Write to read port", oldPC); ++ result.setDebugger(currentCycles, msg.str(), "Write to read port", oldPC); + return; + } + } +diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx +index 3166847..ec4f238 100644 +--- a/src/emucore/OSystem.cxx ++++ b/src/emucore/OSystem.cxx +@@ -96,7 +96,7 @@ OSystem::OSystem() + ostringstream info; + info << "Build " << STELLA_BUILD << ", using " << MediaFactory::backendName() + << " [" << BSPF::ARCH << "]"; +- myBuildInfo = info.view(); ++ myBuildInfo = info.str(); + + mySettings = MediaFactory::createSettings(); + +@@ -138,7 +138,7 @@ bool OSystem::initialize(const Settings::Options& options) + << myCheatFile.getShortPath() << "'\n" + << "Palette file: '" + << myPaletteFile.getShortPath() << "'\n"; +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + + // NOTE: The framebuffer MUST be created before any other object!!! + // Get relevant information about the video hardware +@@ -470,7 +470,7 @@ string OSystem::createConsole(const FSNode& rom, string_view md5sum, bool newrom + catch(const runtime_error& e) + { + buf << "ERROR: " << e.what(); +- Logger::error(buf.view()); ++ Logger::error(buf.str()); + return buf.str(); + } + +@@ -517,7 +517,7 @@ string OSystem::createConsole(const FSNode& rom, string_view md5sum, bool newrom + if(propsFile.exists()) + buf << " PRO file: " << propsFile.getShortPath() << '\n'; + buf << '\n' << getROMInfo(*myConsole); +- Logger::info(buf.view()); ++ Logger::info(buf.str()); + + myFrameBuffer->setCursorState(); + +@@ -539,14 +539,14 @@ string OSystem::createConsole(const FSNode& rom, string_view md5sum, bool newrom + << " - " << myConsole->cartridge().detectedType() + << (myConsole->cartridge().isPlusROM() ? " PlusROM " : "") + << " - " << myConsole->getFormatString(); +- myFrameBuffer->showTextMessage(msg.view()); ++ myFrameBuffer->showTextMessage(msg.str()); + } + else if(!myLauncherUsed) + { + ostringstream msg; + + msg << "Stella " << STELLA_VERSION; +- myFrameBuffer->showTextMessage(msg.view()); ++ myFrameBuffer->showTextMessage(msg.str()); + } + } + +diff --git a/src/emucore/PlusROM.cxx b/src/emucore/PlusROM.cxx +index 6c2bf62..018dcae 100644 +--- a/src/emucore/PlusROM.cxx ++++ b/src/emucore/PlusROM.cxx +@@ -117,7 +117,7 @@ class PlusROMRequest { + << myDestination.path + << ": failed"; + +- Logger::error(ss.view()); ++ Logger::error(ss.str()); + + myState = State::failed; + +@@ -134,7 +134,7 @@ class PlusROMRequest { + << ": failed with HTTP status " + << response->status; + +- Logger::error(ss.view()); ++ Logger::error(ss.str()); + + myState = State::failed; + +@@ -145,7 +145,7 @@ class PlusROMRequest { + ostringstream ss; + ss << "PlusCart: request to " << myDestination.host << "/" << myDestination.path << ": invalid response"; + +- Logger::error(ss.view()); ++ Logger::error(ss.str()); + + myState = State::failed; + +diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx +index 7be24c4..2cd052f 100644 +--- a/src/emucore/Settings.cxx ++++ b/src/emucore/Settings.cxx +@@ -838,7 +838,7 @@ void Settings::usage() + // + // if(NULL != GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) + // height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; +- cout << buf.view() << std::flush; ++ cout << buf.str() << std::flush; + #endif + + #if defined(BSPF_UNIX) || defined(BSPF_MACOS) +diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx +index 6782652..fcab48c 100644 +--- a/src/emucore/TIASurface.cxx ++++ b/src/emucore/TIASurface.cxx +@@ -164,7 +164,7 @@ void TIASurface::setNTSC(NTSCFilter::Preset preset, bool show) + } + myOSystem.settings().setValue("tv.filter", static_cast(preset)); + +- if(show) myFB.showTextMessage(buf.view()); ++ if(show) myFB.showTextMessage(buf.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -247,7 +247,7 @@ void TIASurface::changeScanlineIntensity(int direction) + buf << intensity << "%"; + else + buf << "Off"; +- myFB.showGaugeMessage("Scanline intensity", buf.view(), intensity); ++ myFB.showGaugeMessage("Scanline intensity", buf.str(), intensity); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -299,7 +299,7 @@ void TIASurface::cycleScanlineMask(int direction) + ostringstream msg; + + msg << "Scanline data '" << Names[i] << "'"; +- myOSystem.frameBuffer().showTextMessage(msg.view()); ++ myOSystem.frameBuffer().showTextMessage(msg.str()); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx +index 27a2217..73a3ecd 100644 +--- a/src/emucore/Thumbulator.cxx ++++ b/src/emucore/Thumbulator.cxx +@@ -191,7 +191,7 @@ string Thumbulator::doRun(uInt32& cycles, bool irqDrivenAudio) + #endif + #if defined(THUMB_DISS) || defined(THUMB_DBUG) + dump_counters(); +- cout << statusMsg.view() << '\n'; ++ cout << statusMsg.str() << '\n'; + return statusMsg.str(); + #else + return ""; +diff --git a/src/gui/DeveloperDialog.cxx b/src/gui/DeveloperDialog.cxx +index 0be0b78..219c272 100644 +--- a/src/gui/DeveloperDialog.cxx ++++ b/src/gui/DeveloperDialog.cxx +@@ -364,7 +364,7 @@ void DeveloperDialog::addTiaTab(const GUI::Font& font) + + ostringstream ss; + ss << "Delayed VDEL" << ELLIPSIS << " swap for"; +- mySwapLabel = new StaticTextWidget(myTab, font, HBORDER + INDENT * 2, ypos + 1, ss.view()); ++ mySwapLabel = new StaticTextWidget(myTab, font, HBORDER + INDENT * 2, ypos + 1, ss.str()); + mySwapLabel->setToolTip("VDELed objects react one color clock slower to updates."); + wid.push_back(mySwapLabel); + ypos += lineHeight + VGAP * 1; +diff --git a/src/gui/EditableWidget.cxx b/src/gui/EditableWidget.cxx +index c857a49..ddce295 100644 +--- a/src/gui/EditableWidget.cxx ++++ b/src/gui/EditableWidget.cxx +@@ -886,9 +886,9 @@ bool EditableWidget::pasteSelectedText() + lastOk = false; + } + +- _editString.insert(_caretPos, buf.view()); ++ _editString.insert(_caretPos, buf.str()); + // position cursor at the end of pasted text +- setCaretPos(_caretPos + static_cast(buf.view().length())); ++ setCaretPos(_caretPos + static_cast(buf.str().length())); + + if(selected || !pasted.empty()) + { +diff --git a/src/gui/EventMappingWidget.cxx b/src/gui/EventMappingWidget.cxx +index 19c8608..c00dd53 100644 +--- a/src/gui/EventMappingWidget.cxx ++++ b/src/gui/EventMappingWidget.cxx +@@ -205,7 +205,7 @@ void EventMappingWidget::startRemapping() + << EventHandler::actionAtIndex(myActionSelected, myEventGroup) + << "' event"; + myKeyMapping->setTextColor(kTextColorEm); +- myKeyMapping->setText(buf.view()); ++ myKeyMapping->setText(buf.str()); + + // Make sure that this widget receives all raw data, before any + // pre-processing occurs +diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx +index 51e6c63..af81262 100644 +--- a/src/gui/GameInfoDialog.cxx ++++ b/src/gui/GameInfoDialog.cxx +@@ -947,12 +947,12 @@ void GameInfoDialog::loadHighScoresProperties(const Properties& props) + ss.str(""); + ss << hex << right // << setw(HSM::MAX_ADDR_CHARS) << setfill(' ') + << uppercase << info.varsAddr; +- myVarAddress->setText(ss.view()); ++ myVarAddress->setText(ss.str()); + + ss.str(""); + ss << hex << right // << setw(HSM::MAX_ADDR_CHARS) << setfill(' ') + << uppercase << info.specialAddr; +- mySpecialAddress->setText(ss.view()); ++ mySpecialAddress->setText(ss.str()); + + + for (uInt32 a = 0; a < HSM::MAX_SCORE_ADDR; ++a) +@@ -963,7 +963,7 @@ void GameInfoDialog::loadHighScoresProperties(const Properties& props) + ss << hex << right // << setw(HSM::MAX_ADDR_CHARS) << setfill(' ') + << uppercase << info.scoreAddr[a]; + } +- myScoreAddress[a]->setText(ss.view()); ++ myScoreAddress[a]->setText(ss.str()); + } + updateHighScoresWidgets(); + } +@@ -1489,7 +1489,7 @@ void GameInfoDialog::setAddressVal(const EditTextWidget* addressWidget, EditText + // ss << hex; + ss << right // << setw(2) << setfill(' ') + << uppercase << static_cast(val); +- valWidget->setText(ss.view()); ++ valWidget->setText(ss.str()); + } + else + valWidget->setText(""); +diff --git a/src/gui/HighScoresDialog.cxx b/src/gui/HighScoresDialog.cxx +index 2a6dd05..ad0457f 100644 +--- a/src/gui/HighScoresDialog.cxx ++++ b/src/gui/HighScoresDialog.cxx +@@ -235,7 +235,7 @@ void HighScoresDialog::loadConfig() + { + ostringstream buf; + buf << std::setw(3) << std::setfill(' ') << i; +- VarList::push_back(items, buf.view(), i); ++ VarList::push_back(items, buf.str(), i); + } + myVariationPopup->addItems(items); + +@@ -404,7 +404,7 @@ void HighScoresDialog::updateWidgets(bool init) + if (myScores.scores[r].special > 0) + buf << std::setw(HSM::MAX_SPECIAL_DIGITS) << std::setfill(' ') + << myScores.scores[r].special; +- mySpecialWidgets[r]->setLabel(buf.view()); ++ mySpecialWidgets[r]->setLabel(buf.str()); + + myNameWidgets[r]->setLabel(myScores.scores[r].name); + myDateWidgets[r]->setLabel(myScores.scores[r].date); +diff --git a/src/gui/JoystickDialog.cxx b/src/gui/JoystickDialog.cxx +index 18acdf6..6db8f22 100644 +--- a/src/gui/JoystickDialog.cxx ++++ b/src/gui/JoystickDialog.cxx +@@ -140,7 +140,7 @@ void JoystickDialog::handleCommand(CommandSender* sender, int cmd, int data, int + { + ostringstream buf; + buf << "C" << myJoyIDs[data]; +- myJoyText->setText(buf.view()); ++ myJoyText->setText(buf.str()); + myJoyPort->setSelected(myJoyPorts[data]); + } + else +diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx +index 00d73be..52f1ef5 100644 +--- a/src/gui/LauncherDialog.cxx ++++ b/src/gui/LauncherDialog.cxx +@@ -106,7 +106,7 @@ void LauncherDialog::addTitleWidget(int &ypos) + ver << " for RetroN 77"; + #endif + new StaticTextWidget(this, _font, 1, ypos, _w - 2, fontHeight, +- ver.view(), TextAlign::Center); ++ ver.str(), TextAlign::Center); + ypos += fontHeight + VGAP; + } + +@@ -549,7 +549,7 @@ void LauncherDialog::updateUI() + ostringstream buf; + buf << (myList->getList().size() - (currentDir().hasParent() ? 1 : 0)) + << (myShortCount ? " items" : " items found"); +- myRomCount->setLabel(buf.view()); ++ myRomCount->setLabel(buf.str()); + + loadRomInfo(); + } +diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx +index 6862a83..9b367a1 100644 +--- a/src/gui/RomAuditDialog.cxx ++++ b/src/gui/RomAuditDialog.cxx +@@ -123,7 +123,7 @@ void RomAuditDialog::auditRoms() + // NOLINTEND + + buf << "Auditing ROM files" << ELLIPSIS; +- progress.setMessage(buf.view()); ++ progress.setMessage(buf.str()); + progress.setRange(0, static_cast(files.size()) - 1, 5); + progress.open(); + +diff --git a/src/gui/RomImageWidget.cxx b/src/gui/RomImageWidget.cxx +index d3f19ba..cfc63a5 100644 +--- a/src/gui/RomImageWidget.cxx ++++ b/src/gui/RomImageWidget.cxx +@@ -574,13 +574,13 @@ void RomImageWidget::drawWidget(bool hilite) + ostringstream buf; + buf << myImageIdx + 1 << "/" << myImageList.size(); + const int yText = _y + _h - _font.getFontHeight() * 10 / 8; +- const int wText = _font.getStringWidth(buf.view()) + 8; ++ const int wText = _font.getStringWidth(buf.str()) + 8; + + s.fillRect(_x, yText, _w, _font.getFontHeight(), _bgcolor); + if(!myLabel.empty()) + s.drawString(_font, myLabel, _x + 8, yText, _w - wText - 16 - _font.getMaxCharWidth() * 2, _textcolor); + if(!myImageList.empty()) +- s.drawString(_font, buf.view(), _x + _w - wText, yText, wText, _textcolor); ++ s.drawString(_font, buf.str(), _x + _w - wText, yText, wText, _textcolor); + + // Draw the navigation icons + myNavSurface->invalidate(); +diff --git a/src/gui/VideoAudioDialog.cxx b/src/gui/VideoAudioDialog.cxx +index 32dc0de..511f4cf 100644 +--- a/src/gui/VideoAudioDialog.cxx ++++ b/src/gui/VideoAudioDialog.cxx +@@ -1147,7 +1147,7 @@ void VideoAudioDialog::handleShiftChanged(SliderWidget* widget) + + ss << std::setw(4) << std::fixed << std::setprecision(1) + << (0.1 * (widget->getValue())) << DEGREE; +- widget->setValueLabel(ss.view()); ++ widget->setValueLabel(ss.str()); + handlePaletteUpdate(); + } + +@@ -1384,14 +1384,14 @@ void VideoAudioDialog::handleCommand(CommandSender* sender, int cmd, + { + std::ostringstream ss; // NOLINT (ss is not a const) + ss << std::fixed << std::setprecision(1) << (0.5 * myHeadroomSlider->getValue()) << " frames"; +- myHeadroomSlider->setValueLabel(ss.view()); ++ myHeadroomSlider->setValueLabel(ss.str()); + break; + } + case kBufferSizeChanged: + { + std::ostringstream ss; // NOLINT (ss is not a const) + ss << std::fixed << std::setprecision(1) << (0.5 * myBufferSizeSlider->getValue()) << " frames"; +- myBufferSizeSlider->setValueLabel(ss.view()); ++ myBufferSizeSlider->setValueLabel(ss.str()); + break; + } + +@@ -1445,7 +1445,7 @@ void VideoAudioDialog::colorPalette() + const int color = order[type][idx]; + + ss << Common::Base::HEX1 << std::uppercase << color; +- myColorLbl[idx]->setLabel(ss.view()); ++ myColorLbl[idx]->setLabel(ss.str()); + for(int lum = 0; lum < NUM_LUMA; ++lum) + myColor[idx][lum]->setColor(color * NUM_CHROMA + lum * 2); // skip grayscale colors + } +-- +2.48.1 + diff --git a/Patches/swift/homebrew-resource-dir.diff b/Patches/swift/homebrew-resource-dir.diff new file mode 100644 index 0000000000000..497208710d2bd --- /dev/null +++ b/Patches/swift/homebrew-resource-dir.diff @@ -0,0 +1,30 @@ +diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp +index 477c664143d..87a6f1fe5dd 100644 +--- a/lib/Frontend/CompilerInvocation.cpp ++++ b/lib/Frontend/CompilerInvocation.cpp +@@ -52,6 +52,25 @@ void CompilerInvocation::computeRuntimeResourcePathFromExecutablePath( + + llvm::sys::path::remove_filename(runtimeResourcePath); // Remove /swift + llvm::sys::path::remove_filename(runtimeResourcePath); // Remove /bin ++ ++ StringRef RuntimeResourcePathRef(runtimeResourcePath.data(), runtimeResourcePath.size()); ++ llvm::SmallVector InstallPrefix; ++ for (auto PathIt = llvm::sys::path::rbegin(RuntimeResourcePathRef), ++ PathEnd = llvm::sys::path::rend(RuntimeResourcePathRef); ++ PathIt != PathEnd; ++PathIt) { ++ if (*PathIt == "Cellar" && !InstallPrefix.empty() && InstallPrefix.back() == "swift") { ++ llvm::SmallString<128> OrigPath(runtimeResourcePath.begin(), runtimeResourcePath.end()); ++ runtimeResourcePath.resize(PathIt - PathEnd); ++ llvm::sys::path::append(runtimeResourcePath, "opt", "swift"); ++ for (auto It = InstallPrefix.rbegin() + 2, End = InstallPrefix.rend(); It != End; ++It) ++ llvm::sys::path::append(runtimeResourcePath, *It); ++ if (!llvm::sys::fs::exists(runtimeResourcePath)) // not symlinked to opt ++ runtimeResourcePath.assign(OrigPath.begin(), OrigPath.end()); ++ break; ++ } ++ InstallPrefix.push_back(*PathIt); ++ } ++ + appendSwiftLibDir(runtimeResourcePath, shared); + } + diff --git a/Patches/swift/llbuild-sqlite3.patch b/Patches/swift/llbuild-sqlite3.patch new file mode 100644 index 0000000000000..0a2808518b687 --- /dev/null +++ b/Patches/swift/llbuild-sqlite3.patch @@ -0,0 +1,32 @@ +diff --git a/Package.swift b/Package.swift +index 28ce8e24..aef12c4b 100644 +--- a/Package.swift ++++ b/Package.swift +@@ -335,12 +335,12 @@ package.targets.first { $0.name == "llbuildBasic" }?.linkerSettings = [ + // FIXME: when the SupportedPlatforms availability directive is updated and + // the platform port is in sync with this directive, these conditions can + // be folded up with .when(platforms:_) clauses. +-#if os(FreeBSD) || os(OpenBSD) ++#if os(Linux) + package.targets.filter({ $0.name == "llbuildCore" || $0.name == "llbuildCoreTests" }).forEach { +- $0.cSettings = [.unsafeFlags(["-I/usr/local/include"])] ++ $0.cSettings = [.unsafeFlags(["-I@@HOMEBREW_PREFIX@@/opt/sqlite3/include"])] + $0.linkerSettings = [ + .linkedLibrary("sqlite3"), +- .unsafeFlags(["-L/usr/local/lib"]) ++ .unsafeFlags(["-L@@HOMEBREW_PREFIX@@/opt/sqlite3/lib"]) + ] + + } +@@ -356,4 +356,11 @@ if let target = package.targets.first(where: { $0.name == "llvmSupport" }) { + package.targets.filter({ $0.name == "llbuild" || $0.name == "swift-build-tool" }).forEach { + $0.linkerSettings = [.linkedLibrary("dl"), .linkedLibrary("pthread")] + } ++#elseif os(Linux) ++if let target = package.targets.first(where: { $0.name == "llvmSupport" }) { ++ target.linkerSettings = [ ++ .linkedLibrary("ncurses"), ++ .unsafeFlags(["-L@@HOMEBREW_PREFIX@@/opt/ncurses/lib"]) ++ ] ++} + #endif diff --git a/Patches/swift/swiftpm-sqlite3.patch b/Patches/swift/swiftpm-sqlite3.patch new file mode 100644 index 0000000000000..a6c2781dc53e9 --- /dev/null +++ b/Patches/swift/swiftpm-sqlite3.patch @@ -0,0 +1,16 @@ +diff --git a/Sources/SPMSQLite3/CMakeLists.txt b/Sources/SPMSQLite3/CMakeLists.txt +index 46777305b..8fca39d51 100644 +--- a/Sources/SPMSQLite3/CMakeLists.txt ++++ b/Sources/SPMSQLite3/CMakeLists.txt +@@ -11,6 +11,8 @@ target_include_directories(SPMSQLite3 INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(SPMSQLite3 INTERFACE + SQLite::SQLite3) +-if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD) +- target_link_options(SPMSQLite3 INTERFACE "-L/usr/local/lib") +-endif() ++ ++# The modulemap supplies `-lsqlite3` regardless of the above so we need to configure `-L` ++get_target_property(SQLITE_LOCATION SQLite::SQLite3 LOCATION) ++cmake_path(GET SQLITE_LOCATION PARENT_PATH SQLITE_LIBDIR) ++target_link_options(SPMSQLite3 INTERFACE "-L${SQLITE_LIBDIR}") diff --git a/Patches/tinysvm/patch-configure.diff b/Patches/tinysvm/patch-configure.diff new file mode 100644 index 0000000000000..b69bdf516a48f --- /dev/null +++ b/Patches/tinysvm/patch-configure.diff @@ -0,0 +1,13 @@ +--- configure.orig 2002-08-20 01:01:54.000000000 -0500 ++++ configure 2011-04-19 02:33:14.000000000 -0500 +@@ -6105,8 +6105,8 @@ + + + if test -n "$GCC"; then +- CFLAGS="-Wall -O9 -funroll-all-loops -finline -ffast-math" +- CXXFLAGS="-Wall -O9 -funroll-all-loops -finline -ffast-math" ++ CFLAGS="$CFLAGS -Wall -O9 -funroll-all-loops -finline -ffast-math" ++ CXXFLAGS="$CXXFLAGS -Wall -O9 -funroll-all-loops -finline -ffast-math" + fi + + # On Intel systems with gcc, we may need to compile with -mieee-fp to diff --git a/Patches/ucg/xcode9.patch b/Patches/ucg/xcode9.patch new file mode 100644 index 0000000000000..eb684e8ffbc86 --- /dev/null +++ b/Patches/ucg/xcode9.patch @@ -0,0 +1,110 @@ +diff -pur universalcodegrep-0.3.3-old/src/FileScanner.cpp universalcodegrep-0.3.3/src/FileScanner.cpp +--- universalcodegrep-0.3.3-old/src/FileScanner.cpp 2016-12-30 16:38:24.000000000 +0100 ++++ universalcodegrep-0.3.3/src/FileScanner.cpp 2018-03-13 20:29:31.000000000 +0100 +@@ -246,7 +246,7 @@ bool FileScanner::IsPatternLiteral(const + return is_lit; + } + +-int FileScanner::LiteralMatch_default(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) noexcept ++int FileScanner::LiteralMatch_default(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) const noexcept + { + int rc = 0; + +@@ -283,10 +283,6 @@ extern "C" void * resolve_CountLinesSinc + { + retval = reinterpret_cast(&FileScanner::CountLinesSinceLastMatch_sse4_2_no_popcnt); + } +- else if(sys_has_sse2()) +- { +- retval = reinterpret_cast(&FileScanner::CountLinesSinceLastMatch_sse2); +- } + else + { + retval = reinterpret_cast(&FileScanner::CountLinesSinceLastMatch_default); +@@ -295,9 +291,9 @@ extern "C" void * resolve_CountLinesSinc + return retval; + } + +-FileScanner::LiteralMatch_type FileScanner::resolve_LiteralMatch(FileScanner * obj [[maybe_unused]]) noexcept ++decltype(FileScanner::LiteralMatch) FileScanner::resolve_LiteralMatch(FileScanner * obj [[maybe_unused]]) noexcept + { +- FileScanner::LiteralMatch_type retval; ++ decltype(FileScanner::LiteralMatch) retval; + + if(sys_has_sse4_2()) + { +diff -pur universalcodegrep-0.3.3-old/src/FileScanner.h universalcodegrep-0.3.3/src/FileScanner.h +--- universalcodegrep-0.3.3-old/src/FileScanner.h 2016-12-30 16:38:24.000000000 +0100 ++++ universalcodegrep-0.3.3/src/FileScanner.h 2018-03-13 20:26:32.000000000 +0100 +@@ -145,17 +145,14 @@ protected: + const char * find_sse4_2_popcnt(const char * __restrict__ cbegin, size_t len) const noexcept; + + +- using LiteralMatch_type = std::function; +- +- static LiteralMatch_type resolve_LiteralMatch(FileScanner *obj) noexcept; +- +- LiteralMatch_type LiteralMatch; ++ int (FileScanner::*LiteralMatch)(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) const noexcept; ++ static decltype(LiteralMatch) resolve_LiteralMatch(FileScanner *obj) noexcept; + + //int (*FileScanner::LiteralMatch)(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) const noexcept; + +- int LiteralMatch_default(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) noexcept; ++ int LiteralMatch_default(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) const noexcept; + +- int LiteralMatch_sse4_2(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) noexcept; ++ int LiteralMatch_sse4_2(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) const noexcept; + + ///@} + +diff -pur universalcodegrep-0.3.3-old/src/FileScannerPCRE2.cpp universalcodegrep-0.3.3/src/FileScannerPCRE2.cpp +--- universalcodegrep-0.3.3-old/src/FileScannerPCRE2.cpp 2016-12-30 16:38:24.000000000 +0100 ++++ universalcodegrep-0.3.3/src/FileScannerPCRE2.cpp 2018-03-13 20:20:26.000000000 +0100 +@@ -356,7 +356,7 @@ void FileScannerPCRE2::ScanFile(const ch + } + else + { +- rc = LiteralMatch(this, file_data, file_size, start_offset, ovector); ++ rc = (this->*LiteralMatch)(file_data, file_size, start_offset, ovector); + } + + // Check for no match. +diff -pur universalcodegrep-0.3.3-old/src/FileScanner_sse4_2.cpp universalcodegrep-0.3.3/src/FileScanner_sse4_2.cpp +--- universalcodegrep-0.3.3-old/src/FileScanner_sse4_2.cpp 2016-12-30 16:38:24.000000000 +0100 ++++ universalcodegrep-0.3.3/src/FileScanner_sse4_2.cpp 2018-03-13 20:26:55.000000000 +0100 +@@ -285,7 +285,7 @@ const char * MULTIVERSION(FileScanner::f + + #ifndef __POPCNT__ // To eliminate multiple defs. + +-int FileScanner::LiteralMatch_sse4_2(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) noexcept ++int FileScanner::LiteralMatch_sse4_2(const char *file_data, size_t file_size, size_t start_offset, size_t *ovector) const noexcept + { + int rc = 0; + const char* str_match; +diff -pur universalcodegrep-0.3.3-old/src/libext/DirTree.h universalcodegrep-0.3.3/src/libext/DirTree.h +--- universalcodegrep-0.3.3-old/src/libext/DirTree.h 2016-12-30 08:19:05.000000000 +0100 ++++ universalcodegrep-0.3.3/src/libext/DirTree.h 2018-03-13 20:15:45.000000000 +0100 +@@ -98,6 +98,10 @@ private: + #undef M_STATLIST + }; + ++/// Types of the file and directory include/exclude predicates. ++using file_basename_filter_type = std::function; ++using dir_basename_filter_type = std::function; ++ + + /** + * Multithreaded directory tree traversal class. +@@ -105,10 +109,7 @@ private: + class DirTree + { + public: +- /// Type of the file and directory include/exclude predicates. +- using file_basename_filter_type = std::function; +- using dir_basename_filter_type = std::function; +- ++ DirTree() = delete; + DirTree(sync_queue>& output_queue, + const file_basename_filter_type &file_basename_filter, + const dir_basename_filter_type &dir_basename_filter, diff --git a/Patches/uni2ascii/uni2ascii-4.20.patch b/Patches/uni2ascii/uni2ascii-4.20.patch new file mode 100644 index 0000000000000..95bed136da172 --- /dev/null +++ b/Patches/uni2ascii/uni2ascii-4.20.patch @@ -0,0 +1,87 @@ +From b351e132db164dd97a0e0a937c1551edbcfed583 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Sun, 7 Jul 2024 15:59:06 -0400 +Subject: [PATCH] build patch for fixing `implicit function declarations` + errors + +Signed-off-by: Rui Chen +--- + enttbl.c | 1 + + putu8.c | 2 +- + putu8.h | 8 ++++++++ + uni2ascii.c | 5 +++-- + 4 files changed, 13 insertions(+), 3 deletions(-) + create mode 100644 putu8.h + +diff --git a/enttbl.c b/enttbl.c +index 13b7675..f6a644c 100644 +--- a/enttbl.c ++++ b/enttbl.c +@@ -20,6 +20,7 @@ + + #include "config.h" + #include ++#include + #include "unicode.h" + + struct ent { +diff --git a/putu8.c b/putu8.c +index 1cf2795..45933e4 100644 +--- a/putu8.c ++++ b/putu8.c +@@ -2,7 +2,7 @@ + #include "config.h" + #include + #include +-#include ++#include "putu8.h" + + /* + * Takes a UTF-32 code as input and outputs UTF-8. +diff --git a/putu8.h b/putu8.h +new file mode 100644 +index 0000000..2046f00 +--- /dev/null ++++ b/putu8.h +@@ -0,0 +1,8 @@ ++#ifndef PUTU8_H ++#define PUTU8_H ++ ++#include ++ ++void putu8(wchar_t c); ++ ++#endif /* PUTU8_H */ +diff --git a/uni2ascii.c b/uni2ascii.c +index 650e40b..075a34d 100644 +--- a/uni2ascii.c ++++ b/uni2ascii.c +@@ -44,6 +44,7 @@ + #include "utf8error.h" + #include "exitcode.h" + #include "formats.h" ++#include "putu8.h" + + #if defined(__DATE__) && defined(__TIME__) + #define HAVE_DATE_TIME +@@ -2689,7 +2690,7 @@ int SubsAvailable = 0; + * search may be advisable. For the time being we just do a linear search. + */ + +-SubstituteChar(UTF32 c) { ++int SubstituteChar(UTF32 c) { + int i; + for(i = 0; i < SubCnt; i++) { + if(c == SubList[i].u) { +@@ -2703,7 +2704,7 @@ SubstituteChar(UTF32 c) { + return 0; + } + +-AddCustomSubstitution(char *str){ ++int AddCustomSubstitution(char *str){ + char *Left; + char *Right; + char *Delim; +-- +2.45.2 + diff --git a/Patches/urweb/icu4c68-2.patch b/Patches/urweb/icu4c68-2.patch new file mode 100644 index 0000000000000..b66cc7baadb2d --- /dev/null +++ b/Patches/urweb/icu4c68-2.patch @@ -0,0 +1,40 @@ +diff --git a/src/c/urweb.c b/src/c/urweb.c +index 0db5fc8..d79b35e 100644 +--- a/src/c/urweb.c ++++ b/src/c/urweb.c +@@ -3089,13 +3089,13 @@ char *uw_Basis_sqlifyTimeN(uw_context ctx, uw_Basis_time *t) { + } + + char *uw_Basis_ensqlBool(uw_Basis_bool b) { +- static uw_Basis_int true = 1; +- static uw_Basis_int false = 0; ++ static uw_Basis_int uw_true = 1; ++ static uw_Basis_int uw_false = 0; + + if (!b) +- return (char *)&false; ++ return (char *)&uw_false; + else +- return (char *)&true; ++ return (char *)&uw_true; + } + + uw_Basis_string uw_Basis_intToString(uw_context ctx, uw_Basis_int n) { +@@ -3193,13 +3193,13 @@ uw_Basis_char *uw_Basis_stringToChar(uw_context ctx, uw_Basis_string s) { + + uw_Basis_bool *uw_Basis_stringToBool(uw_context ctx, uw_Basis_string s) { + (void)ctx; +- static uw_Basis_bool true = uw_Basis_True; +- static uw_Basis_bool false = uw_Basis_False; ++ static uw_Basis_bool uw_true = uw_Basis_True; ++ static uw_Basis_bool uw_false = uw_Basis_False; + + if (!strcasecmp (s, "True")) +- return &true; ++ return &uw_true; + else if (!strcasecmp (s, "False")) +- return &false; ++ return &uw_false; + else + return NULL; + } diff --git a/Patches/usbutils/portable.patch b/Patches/usbutils/portable.patch new file mode 100644 index 0000000000000..ec64f9f21fdca --- /dev/null +++ b/Patches/usbutils/portable.patch @@ -0,0 +1,439 @@ +diff --git a/lsusb.c b/lsusb.c +index 0b74182..ebb408a 100644 +--- a/lsusb.c ++++ b/lsusb.c +@@ -261,7 +261,9 @@ static void dump_device( + char vendor[128], product[128]; + char cls[128], subcls[128], proto[128]; + char mfg[128] = {0}, prod[128] = {0}, serial[128] = {0}; ++#ifdef HAVE_SYSFS + char sysfs_name[PATH_MAX]; ++#endif + const char *negotiated_speed; + + get_vendor_product_with_fallback(vendor, sizeof(vendor), +@@ -272,11 +274,13 @@ static void dump_device( + get_protocol_string(proto, sizeof(proto), descriptor->bDeviceClass, + descriptor->bDeviceSubClass, descriptor->bDeviceProtocol); + ++#ifdef HAVE_SYSFS + if (get_sysfs_name(sysfs_name, sizeof(sysfs_name), dev) >= 0) { + read_sysfs_prop(mfg, sizeof(mfg), sysfs_name, "manufacturer"); + read_sysfs_prop(prod, sizeof(prod), sysfs_name, "product"); + read_sysfs_prop(serial, sizeof(serial), sysfs_name, "serial"); + } ++#endif + + switch (libusb_get_device_speed(dev)) { + case LIBUSB_SPEED_LOW: +@@ -3796,12 +3800,16 @@ int main(int argc, char *argv[]) + { "version", 0, 0, 'V' }, + { "verbose", 0, 0, 'v' }, + { "help", 0, 0, 'h' }, ++#ifdef HAVE_TREE_MODE + { "tree", 0, 0, 't' }, ++#endif + { 0, 0, 0, 0 } + }; + libusb_context *ctx; + int c, err = 0; ++#ifdef HAVE_TREE_MODE + unsigned int treemode = 0; ++#endif + int bus = -1, devnum = -1, vendor = -1, product = -1; + const char *devdump = NULL; + int help = 0; +@@ -3824,9 +3832,11 @@ int main(int argc, char *argv[]) + help=1; + break; + ++#ifdef HAVE_TREE_MODE + case 't': + treemode = 1; + break; ++#endif + + case 's': + cp = strchr(optarg, ':'); +@@ -3878,8 +3888,10 @@ int main(int argc, char *argv[]) + " product ID numbers (in hexadecimal)\n" + " -D device\n" + " Selects which device lsusb will examine\n" ++#ifdef HAVE_TREE_MODE + " -t, --tree\n" + " Dump the physical USB device hierarchy as a tree\n" ++#endif + " -V, --version\n" + " Show version of program\n" + " -h, --help\n" +@@ -3892,17 +3904,23 @@ int main(int argc, char *argv[]) + } + + ++#ifdef HAVE_UDEV + /* by default, print names as well as numbers */ + if (names_init() < 0) + fprintf(stderr, "unable to initialize usb spec"); + + status = 0; ++#endif + ++#ifdef HAVE_TREE_MODE + if (treemode) { + status = lsusb_t(); ++#ifdef HAVE_UDEV + names_exit(); ++#endif + return status; + } ++#endif + + err = libusb_init(&ctx); + if (err) { +@@ -3915,7 +3933,9 @@ int main(int argc, char *argv[]) + else + status = list_devices(ctx, bus, devnum, vendor, product); + ++#ifdef HAVE_UDEV + names_exit(); ++#endif + libusb_exit(ctx); + return status; + } +diff --git a/lsusb.h b/lsusb.h +index 3e93c23..2a97df6 100644 +--- a/lsusb.h ++++ b/lsusb.h +@@ -3,7 +3,9 @@ + #ifndef _LSUSB_H + #define _LSUSB_H + ++#ifdef HAVE_TREE_MODE + extern int lsusb_t(void); ++#endif + extern unsigned int verblevel; + + #endif +diff --git a/meson.build b/meson.build +index c522283..ee4469f 100644 +--- a/meson.build ++++ b/meson.build +@@ -76,7 +76,7 @@ add_project_arguments('-include', 'config.h', language : 'c') + ##################### + # man page generation + ##################### +-install_man(['man/lsusb.8', 'man/lsusb.py.1', 'man/usb-devices.1', 'man/usbhid-dump.8']) ++man_pages = ['man/lsusb.8', 'man/usbhid-dump.8'] + + + ########################## +@@ -87,13 +87,9 @@ lsusb_sources = [ + 'desc-defs.h', + 'desc-dump.c', + 'desc-dump.h', +- 'lsusb-t.c', + 'lsusb.c', + 'lsusb.h', +- 'names.c', + 'names.h', +- 'sysfs.c', +- 'sysfs.h', + 'usb-spec.h', + 'usbmisc.c', + 'usbmisc.h', +@@ -105,10 +101,38 @@ lsusb_sources = [ + 'ccan/list/list.h', + ] + +-libudev = dependency('libudev', version: '>= 196') ++libudev = dependency('libudev', version: '>= 196', required: false) + libusb = dependency('libusb-1.0', version: '>= 1.0.22') +- +-executable('lsusb', lsusb_sources, dependencies: [libusb, libudev], install: true) ++libiconv = dependency('iconv') ++ ++if get_option('with_sysfs') ++ add_project_arguments('-DHAVE_SYSFS', language : 'c') ++ lsusb_sources += [ ++ 'sysfs.c', ++ 'sysfs.h', ++ ] ++endif ++ ++if get_option('with_tree_mode') ++ add_project_arguments('-DHAVE_TREE_MODE', language : 'c') ++ lsusb_sources += [ ++ 'lsusb-t.c', ++ ] ++endif ++ ++if get_option('with_udev') and libudev.found() ++ add_project_arguments('-DHAVE_UDEV', language : 'c') ++ ++ lsusb_sources += [ ++ 'names.c', ++ ] ++else ++ lsusb_sources += [ ++ 'names_no_udev.c', ++ ] ++endif ++ ++executable('lsusb', lsusb_sources, dependencies: [libusb, libudev, libiconv], install: true) + + ################################ + # usbhid-dump build instructions +@@ -128,6 +152,7 @@ usbhid_sources = [ + + executable('usbhid-dump', usbhid_sources, dependencies: libusb, install: true) + ++if get_option('with_sysfs') + ############################## + # usbreset build instructions + ############################## +@@ -156,3 +181,8 @@ install_data(usb_devices_sources, install_dir: get_option('bindir'), install_mod + # Also a hack, like was done for usb-devices, as this is "just" a script and + # doesn't need to be compiled. + install_data(files('lsusb.py'), install_dir: get_option('bindir'), install_mode: 'rwxr-xr-x') ++ ++man_pages += ['man/lsusb.py.1', 'man/usb-devices.1'] ++endif ++ ++install_man(man_pages) +diff --git a/meson_options.txt b/meson_options.txt +new file mode 100644 +index 0000000..aff1fc8 +--- /dev/null ++++ b/meson_options.txt +@@ -0,0 +1,3 @@ ++option('with_udev', type : 'boolean', value : false) ++option('with_sysfs', type : 'boolean', value : false) ++option('with_tree_mode', type : 'boolean', value : false) +diff --git a/names_no_udev.c b/names_no_udev.c +new file mode 100644 +index 0000000..9494b48 +--- /dev/null ++++ b/names_no_udev.c +@@ -0,0 +1,222 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * USB name database manipulation routines ++ * ++ * Copyright (C) 1999, 2000 Thomas Sailer (sailer@ife.ee.ethz.ch) ++ * Copyright (C) 2013 Tom Gundersen (teg@jklm.no) ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "usb-spec.h" ++#include "names.h" ++#ifdef HAVE_SYSFS ++#include "sysfs.h" ++#endif ++ ++/* ---------------------------------------------------------------------- */ ++ ++static const char *names_genericstrtable(const struct genericstrtable *t, ++ unsigned int idx) ++{ ++ const struct genericstrtable *h; ++ ++ for (h = t; t->name; t++) ++ if (h->num == idx) ++ return h->name; ++ return NULL; ++} ++ ++const char *names_hid(uint8_t hidd) ++{ ++ return names_genericstrtable(hiddescriptors, hidd); ++} ++ ++const char *names_reporttag(uint8_t rt) ++{ ++ return names_genericstrtable(reports, rt); ++} ++ ++const char *names_huts(unsigned int data) ++{ ++ return names_genericstrtable(huts, data); ++} ++ ++const char *names_hutus(unsigned int data) ++{ ++ return names_genericstrtable(hutus, data); ++} ++ ++const char *names_langid(uint16_t langid) ++{ ++ return names_genericstrtable(langids, langid); ++} ++ ++const char *names_physdes(uint8_t ph) ++{ ++ return names_genericstrtable(physdess, ph); ++} ++ ++const char *names_bias(uint8_t b) ++{ ++ return names_genericstrtable(biass, b); ++} ++ ++const char *names_countrycode(unsigned int countrycode) ++{ ++ return names_genericstrtable(countrycodes, countrycode); ++} ++ ++static const char *hwdb_get(const char *modalias, const char *key) ++{ ++ return NULL; ++} ++ ++const char *names_vendor(uint16_t vendorid) ++{ ++ return NULL; ++} ++ ++const char *names_product(uint16_t vendorid, uint16_t productid) ++{ ++ return NULL; ++} ++ ++const char *names_class(uint8_t classid) ++{ ++ return NULL; ++} ++ ++const char *names_subclass(uint8_t classid, uint8_t subclassid) ++{ ++ return NULL; ++} ++ ++const char *names_protocol(uint8_t classid, uint8_t subclassid, uint8_t protocolid) ++{ ++ return NULL; ++} ++ ++const char *names_audioterminal(uint16_t termt) ++{ ++ const struct audioterminal *at; ++ ++ for (at = audioterminals; at->name; at++) ++ if (at->termt == termt) ++ return at->name; ++ return NULL; ++} ++ ++const char *names_videoterminal(uint16_t termt) ++{ ++ const struct videoterminal *vt; ++ ++ for (vt = videoterminals; vt->name; vt++) ++ if (vt->termt == termt) ++ return vt->name; ++ return NULL; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++int get_vendor_string(char *buf, size_t size, uint16_t vid) ++{ ++ const char *cp; ++ ++ if (size < 1) ++ return 0; ++ *buf = 0; ++ if (!(cp = names_vendor(vid))) ++ return 0; ++ return snprintf(buf, size, "%s", cp); ++} ++ ++int get_product_string(char *buf, size_t size, uint16_t vid, uint16_t pid) ++{ ++ const char *cp; ++ ++ if (size < 1) ++ return 0; ++ *buf = 0; ++ if (!(cp = names_product(vid, pid))) ++ return 0; ++ return snprintf(buf, size, "%s", cp); ++} ++ ++int get_class_string(char *buf, size_t size, uint8_t cls) ++{ ++ const char *cp; ++ ++ if (size < 1) ++ return 0; ++ *buf = 0; ++ if (!(cp = names_class(cls))) ++ return snprintf(buf, size, "[unknown]"); ++ return snprintf(buf, size, "%s", cp); ++} ++ ++int get_subclass_string(char *buf, size_t size, uint8_t cls, uint8_t subcls) ++{ ++ const char *cp; ++ ++ if (size < 1) ++ return 0; ++ *buf = 0; ++ if (!(cp = names_subclass(cls, subcls))) ++ return snprintf(buf, size, "[unknown]"); ++ return snprintf(buf, size, "%s", cp); ++} ++ ++/* ++ * Attempt to get friendly vendor and product names from the udev hwdb. If ++ * either or both are not present, instead populate those from the device's ++ * own string descriptors. ++ */ ++void get_vendor_product_with_fallback(char *vendor, int vendor_len, ++ char *product, int product_len, ++ libusb_device *dev) ++{ ++ struct libusb_device_descriptor desc; ++ bool have_vendor, have_product; ++ ++ libusb_get_device_descriptor(dev, &desc); ++ ++ /* set to "[unknown]" by default unless something below finds a string */ ++ strncpy(vendor, "[unknown]", vendor_len); ++ strncpy(product, "[unknown]", product_len); ++ ++ have_vendor = !!get_vendor_string(vendor, vendor_len, desc.idVendor); ++ have_product = !!get_product_string(product, product_len, ++ desc.idVendor, desc.idProduct); ++ ++ if (have_vendor && have_product) ++ return; ++#ifdef HAVE_SYSFS ++ if (get_sysfs_name(sysfs_name, sizeof(sysfs_name), dev) >= 0) { ++ if (!have_vendor) ++ read_sysfs_prop(vendor, vendor_len, sysfs_name, "manufacturer"); ++ if (!have_product) ++ read_sysfs_prop(product, product_len, sysfs_name, "product"); ++ } ++#endif ++} ++ ++int names_init(void) ++{ ++ return -1; ++} ++ ++void names_exit(void) ++{ ++} diff --git a/Patches/vip/19971113.patch b/Patches/vip/19971113.patch new file mode 100644 index 0000000000000..0f0dc02037a8e --- /dev/null +++ b/Patches/vip/19971113.patch @@ -0,0 +1,24 @@ +diff --git a/vip b/vip +index f150167..e517675 100644 +--- a/vip ++++ b/vip +@@ -66,7 +66,7 @@ Usage: $PROG [ -no ] [ command ] + otherwise stdin is used; + " + +-: ${TMPDIR:="/usr/tmp"} # where temp. files go ++: ${TMPDIR:="/var/tmp"} # where temp. files go + TEMP_FILE="$TMPDIR/$PROG.$$" # temp. file to hold data to edit + COMMAND="cat" # default command to produce input + DFLT_ED="vi" # default editor +@@ -81,6 +81,10 @@ case "$SYS" in + ;; + "HP-UX "*) + AWK=awk ++ ;; ++ "Darwin "*) ++ AWK=awk ++ ;; + esac + + # diff --git a/Patches/vlang/vc.patch b/Patches/vlang/vc.patch new file mode 100644 index 0000000000000..113189417b8ef --- /dev/null +++ b/Patches/vlang/vc.patch @@ -0,0 +1,14 @@ +Include sys/types.h for Big Sur or earlier. + +diff --git a/v.c b/v.c +index 5d089d60..e3cb2645 100644 +--- a/v.c ++++ b/v.c +@@ -1982,6 +1982,7 @@ static inline unsigned char atomic_fetch_xor_byte(unsigned char* x, unsigned cha + #if defined(__has_include) + + #if __has_include() ++#include + #include + #else + #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. diff --git a/Patches/vowpal-wabbit/fmt11.diff b/Patches/vowpal-wabbit/fmt11.diff new file mode 100644 index 0000000000000..5478e0ee8b4f2 --- /dev/null +++ b/Patches/vowpal-wabbit/fmt11.diff @@ -0,0 +1,151 @@ +diff --git a/vowpalwabbit/config/src/cli_help_formatter.cc b/vowpalwabbit/config/src/cli_help_formatter.cc +index 8cc6dfe..530d200 100644 +--- a/vowpalwabbit/config/src/cli_help_formatter.cc ++++ b/vowpalwabbit/config/src/cli_help_formatter.cc +@@ -8,6 +8,7 @@ + #include "vw/config/options.h" + + #include ++#include + + #include + #include +@@ -191,4 +192,4 @@ std::string cli_help_formatter::format_help(const std::vector ++#include + + #include + #include +diff --git a/vowpalwabbit/core/include/vw/core/vw_string_view_fmt.h b/vowpalwabbit/core/include/vw/core/vw_string_view_fmt.h +index 0d42ac7..6f3cdff 100644 +--- a/vowpalwabbit/core/include/vw/core/vw_string_view_fmt.h ++++ b/vowpalwabbit/core/include/vw/core/vw_string_view_fmt.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + namespace fmt + { +diff --git a/vowpalwabbit/core/src/merge.cc b/vowpalwabbit/core/src/merge.cc +index 7425dee..46e2b16 100644 +--- a/vowpalwabbit/core/src/merge.cc ++++ b/vowpalwabbit/core/src/merge.cc +@@ -16,6 +16,8 @@ + #include "vw/core/vw_math.h" + #include "vw/io/io_adapter.h" + ++#include ++ + #include + #include + +diff --git a/vowpalwabbit/core/src/no_label.cc b/vowpalwabbit/core/src/no_label.cc +index c09f65f..b973442 100644 +--- a/vowpalwabbit/core/src/no_label.cc ++++ b/vowpalwabbit/core/src/no_label.cc +@@ -11,6 +11,8 @@ + #include "vw/core/vw.h" + #include "vw/io/logger.h" + ++#include ++ + namespace + { + void parse_no_label(const std::vector& words, VW::io::logger& logger) +diff --git a/vowpalwabbit/core/src/parse_args.cc b/vowpalwabbit/core/src/parse_args.cc +index 3d33bde..7feaccc 100644 +--- a/vowpalwabbit/core/src/parse_args.cc ++++ b/vowpalwabbit/core/src/parse_args.cc +@@ -44,6 +44,8 @@ + #include "vw/io/owning_stream.h" + #include "vw/text_parser/parse_example_text.h" + ++#include ++ + #include + #include + +diff --git a/vowpalwabbit/core/src/vw.cc b/vowpalwabbit/core/src/vw.cc +index c8af91a..1b739a1 100644 +--- a/vowpalwabbit/core/src/vw.cc ++++ b/vowpalwabbit/core/src/vw.cc +@@ -23,6 +23,7 @@ + #include "vw/core/unique_sort.h" + #include "vw/text_parser/parse_example_text.h" + ++#include + #include + + namespace +diff --git a/vowpalwabbit/core/include/vw/core/automl_impl.h b/vowpalwabbit/core/include/vw/core/automl_impl.h +index 4a44666..0d1b35d 100644 +--- a/vowpalwabbit/core/include/vw/core/automl_impl.h ++++ b/vowpalwabbit/core/include/vw/core/automl_impl.h +@@ -334,7 +334,7 @@ template <> + class formatter : public formatter + { + public: +- auto format(VW::reductions::automl::automl_state c, format_context& ctx) -> decltype(ctx.out()) ++ auto format(VW::reductions::automl::automl_state c, format_context& ctx) const -> decltype(ctx.out()) + { + return formatter::format(std::string{VW::to_string(c)}, ctx); + } +@@ -344,7 +344,7 @@ template <> + class formatter : public formatter + { + public: +- auto format(VW::reductions::automl::config_state c, format_context& ctx) -> decltype(ctx.out()) ++ auto format(VW::reductions::automl::config_state c, format_context& ctx) const -> decltype(ctx.out()) + { + return formatter::format(std::string{VW::to_string(c)}, ctx); + } +@@ -354,7 +354,7 @@ template <> + class formatter : public formatter + { + public: +- auto format(VW::reductions::automl::config_type c, format_context& ctx) -> decltype(ctx.out()) ++ auto format(VW::reductions::automl::config_type c, format_context& ctx) const -> decltype(ctx.out()) + { + return formatter::format(std::string{VW::to_string(c)}, ctx); + } +diff --git a/vowpalwabbit/core/include/vw/core/ccb_label.h b/vowpalwabbit/core/include/vw/core/ccb_label.h +index 2e7e985..9dd9158 100644 +--- a/vowpalwabbit/core/include/vw/core/ccb_label.h ++++ b/vowpalwabbit/core/include/vw/core/ccb_label.h +@@ -81,7 +81,7 @@ template <> + class formatter : public formatter + { + public: +- auto format(VW::ccb_example_type c, format_context& ctx) -> decltype(ctx.out()) ++ auto format(VW::ccb_example_type c, format_context& ctx) const -> decltype(ctx.out()) + { + return formatter::format(std::string{VW::to_string(c)}, ctx); + } +diff --git a/vowpalwabbit/core/include/vw/core/slates_label.h b/vowpalwabbit/core/include/vw/core/slates_label.h +index 0cd089c..d226893 100644 +--- a/vowpalwabbit/core/include/vw/core/slates_label.h ++++ b/vowpalwabbit/core/include/vw/core/slates_label.h +@@ -81,7 +81,7 @@ template <> + class formatter : public formatter + { + public: +- auto format(VW::slates::example_type c, format_context& ctx) -> decltype(ctx.out()) ++ auto format(VW::slates::example_type c, format_context& ctx) const -> decltype(ctx.out()) + { + return formatter::format(std::string{VW::to_string(c)}, ctx); + } diff --git a/Patches/vsftpd/3.0.3.patch b/Patches/vsftpd/3.0.3.patch new file mode 100644 index 0000000000000..febd1c44194fa --- /dev/null +++ b/Patches/vsftpd/3.0.3.patch @@ -0,0 +1,43 @@ +diff --git a/sysdeputil.c b/sysdeputil.c +index 9dc8a5e..66dbe30 100644 +--- a/sysdeputil.c ++++ b/sysdeputil.c +@@ -64,6 +64,10 @@ + #include + + /* BEGIN config */ ++#if defined(__APPLE__) ++ #undef VSF_SYSDEP_HAVE_UTMPX ++#endif ++ + #if defined(__linux__) + #include + #include +diff --git a/vsf_findlibs.sh b/vsf_findlibs.sh +index b988be6..68d4a34 100755 +--- a/vsf_findlibs.sh ++++ b/vsf_findlibs.sh +@@ -20,6 +20,10 @@ if find_func pam_start sysdeputil.o; then + locate_library /usr/lib/libpam.sl && echo "-lpam"; + # AIX ends shared libraries with .a + locate_library /usr/lib/libpam.a && echo "-lpam"; ++ # Mac OS X / Darwin shared libraries with .dylib, but on ++ # MacOS 11 the file itself doesn't exist on the FS, but can ++ # be linked against and opened via dlopen(). ++ perl -mDynaLoader -e 'exit 1 unless DynaLoader::dl_load_file(shift)' /usr/lib/libpam.dylib && echo "-lpam"; + else + locate_library /lib/libcrypt.so && echo "-lcrypt"; + locate_library /usr/lib/libcrypt.so && echo "-lcrypt"; +diff --git a/Makefile b/Makefile +index c63ed1b..556519e 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ + + LIBS = `./vsf_findlibs.sh` + LINK = -Wl,-s +-LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now ++LDFLAGS = -fPIE -pie + + OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ + tunables.o ftpdataio.o secbuf.o ls.o \ diff --git a/Patches/vsftpd/3.0.5.patch b/Patches/vsftpd/3.0.5.patch new file mode 100644 index 0000000000000..1b3aa460e47f2 --- /dev/null +++ b/Patches/vsftpd/3.0.5.patch @@ -0,0 +1,49 @@ +diff --git a/sysutil.c b/sysutil.c +index ff8885b..c465b99 100644 +--- a/sysutil.c ++++ b/sysutil.c +@@ -2792,6 +2792,7 @@ vsf_sysutil_getuid(void) + void + vsf_sysutil_set_address_space_limit(unsigned long bytes) + { ++#if! defined(__APPLE__) + /* Unfortunately, OpenBSD is missing RLIMIT_AS. */ + #ifdef RLIMIT_AS + int ret; +@@ -2807,12 +2808,14 @@ vsf_sysutil_set_address_space_limit(unsigned long bytes) + die("setrlimit"); + } + #endif /* RLIMIT_AS */ ++#endif + (void) bytes; + } + + void + vsf_sysutil_set_no_fds() + { ++#if! defined(__APPLE__) + int ret; + struct rlimit rlim; + rlim.rlim_cur = 0; +@@ -2822,11 +2825,13 @@ vsf_sysutil_set_no_fds() + { + die("setrlimit NOFILE"); + } ++#endif + } + + void + vsf_sysutil_set_no_procs() + { ++#if! defined(__APPLE__) + #ifdef RLIMIT_NPROC + int ret; + struct rlimit rlim; +@@ -2838,6 +2843,7 @@ vsf_sysutil_set_no_procs() + die("setrlimit NPROC"); + } + #endif ++#endif + } + + void diff --git a/Patches/webfs/patch-ls.c b/Patches/webfs/patch-ls.c new file mode 100644 index 0000000000000..0ec8cea8900fd --- /dev/null +++ b/Patches/webfs/patch-ls.c @@ -0,0 +1,11 @@ +--- ls.c.orig Fri Oct 15 14:20:50 2004 ++++ ls.c Fri Oct 15 14:21:13 2004 +@@ -160,7 +160,7 @@ + return buf; + } + +-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) ++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) + static void strmode(mode_t mode, char *dest) + { + static const char *rwx[] = { diff --git a/Patches/wmctrl/1.07.patch b/Patches/wmctrl/1.07.patch new file mode 100644 index 0000000000000..344e1bd2707fe --- /dev/null +++ b/Patches/wmctrl/1.07.patch @@ -0,0 +1,39 @@ +--- wmctrl-1.07.orig/main.c ++++ wmctrl-1.07/main.c +@@ -1425,6 +1425,16 @@ + * + * long_length = Specifies the length in 32-bit multiples of the + * data to be retrieved. ++ * ++ * NOTE: see ++ * http://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html ++ * In particular: ++ * ++ * When the X window system was ported to 64-bit architectures, a ++ * rather peculiar design decision was made. 32-bit quantities such ++ * as Window IDs, atoms, etc, were kept as longs in the client side ++ * APIs, even when long was changed to 64 bits. ++ * + */ + if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False, + xa_prop_type, &xa_ret_type, &ret_format, +@@ -1440,7 +1450,18 @@ static gchar *get_property (Display *disp, Window win, /*{{{*/ + } + + /* null terminate the result to make string handling easier */ +- tmp_size = (ret_format / 8) * ret_nitems; ++ switch (ret_format) { ++ case 8: ++ tmp_size = sizeof(char) * ret_nitems; ++ break; ++ case 16: ++ tmp_size = sizeof(short) * ret_nitems; ++ break; ++ case 32: ++ default: ++ tmp_size = sizeof(long) * ret_nitems; ++ break; ++ } + ret = g_malloc(tmp_size + 1); + memcpy(ret, ret_prop, tmp_size); + ret[tmp_size] = '\0'; diff --git a/Patches/wordplay/patch-wordplay.c b/Patches/wordplay/patch-wordplay.c new file mode 100644 index 0000000000000..fa277d697825e --- /dev/null +++ b/Patches/wordplay/patch-wordplay.c @@ -0,0 +1,18 @@ +--- wordplay.c.orig 1996-03-20 09:34:00.000000000 -0600 ++++ wordplay.c 2012-10-03 05:07:15.000000000 -0500 +@@ -136,13 +136,14 @@ + */ + + #include ++#include + #include + #include + + #define max(A, B) ((A) > (B) ? (A) : (B)) + #define min(A, B) ((A) < (B) ? (A) : (B)) + +-#define DEFAULT_WORD_FILE "words721.txt" ++#define DEFAULT_WORD_FILE "@PREFIX@/share/wordplay/words721.txt" + #define WORDBLOCKSIZE 4096 + #define MAX_WORD_LENGTH 128 + #define SAFETY_ZONE MAX_WORD_LENGTH + 1 diff --git a/Patches/wput/0.6.2.patch b/Patches/wput/0.6.2.patch new file mode 100644 index 0000000000000..f439774bdca7d --- /dev/null +++ b/Patches/wput/0.6.2.patch @@ -0,0 +1,26 @@ +diff --git a/src/memdbg.c b/src/memdbg.c +index 560bd7c..9e69eef 100644 +--- a/src/memdbg.c ++++ b/src/memdbg.c +@@ -1,5 +1,7 @@ + #include ++#ifndef __APPLE__ + #include ++#endif + #include + #ifndef WIN32 + #include +diff --git a/src/socketlib.c b/src/socketlib.c +index ab77d2b..c728ed9 100644 +--- a/src/socketlib.c ++++ b/src/socketlib.c +@@ -20,7 +20,9 @@ + * It is meant to provide some library functions. The only required external depency + * the printip function that is provided in utils.c */ + ++#ifndef __APPLE__ + #include ++#endif + #include + #include + #include diff --git a/Patches/xplanet/xplanet-1.3.1-giflib5.patch b/Patches/xplanet/xplanet-1.3.1-giflib5.patch new file mode 100644 index 0000000000000..75dfd9abb6154 --- /dev/null +++ b/Patches/xplanet/xplanet-1.3.1-giflib5.patch @@ -0,0 +1,38 @@ +--- a/src/libimage/gif.c.old 2017-04-05 00:02:06.000000000 +0200 ++++ b/src/libimage/gif.c 2017-04-05 00:02:34.000000000 +0200 +@@ -179,7 +179,11 @@ read_gif(const char *filename, int *widt + } + } + ++#if GIFLIB_MAJOR >= 5 ++ if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) { ++#else + if (DGifCloseFile(GifFile) == GIF_ERROR) { ++#endif + return(0); + } + +@@ -493,7 +497,11 @@ SortCmpRtn(const void *Entry1, + static void QuitGifError(GifFileType *GifFile) + { + fprintf(stderr, "Error writing GIF file\n"); ++#if GIFLIB_MAJOR >= 5 ++ if (GifFile != NULL) EGifCloseFile(GifFile, NULL); ++#else + if (GifFile != NULL) EGifCloseFile(GifFile); ++#endif + } + + int +@@ -589,7 +597,11 @@ write_gif(const char *filename, int widt + Ptr += width; + } + ++#if GIFLIB_MAJOR >= 5 ++ if (EGifCloseFile(GifFile, NULL) == GIF_ERROR) ++#else + if (EGifCloseFile(GifFile) == GIF_ERROR) ++#endif + + { + QuitGifError(GifFile); diff --git a/Patches/xplanet/xplanet-1.3.1-ntimes.patch b/Patches/xplanet/xplanet-1.3.1-ntimes.patch new file mode 100644 index 0000000000000..941afff665c98 --- /dev/null +++ b/Patches/xplanet/xplanet-1.3.1-ntimes.patch @@ -0,0 +1,11 @@ +--- a/trunk/src/libdisplay/DisplayOutput.cpp ++++ b/trunk/src/libdisplay/DisplayOutput.cpp +@@ -51,7 +51,7 @@ + string outputFilename = options->OutputBase(); + int startIndex = options->OutputStartIndex(); + int stopIndex = options->NumTimes() + startIndex - 1; +- if (stopIndex > 1) ++ if (stopIndex > 0) + { + const int digits = (int) (log10((double) stopIndex) + 1); + char buffer[64]; \ No newline at end of file diff --git a/Patches/yconalyzer/1.0.4.patch b/Patches/yconalyzer/1.0.4.patch new file mode 100644 index 0000000000000..2b83ea3644d61 --- /dev/null +++ b/Patches/yconalyzer/1.0.4.patch @@ -0,0 +1,23 @@ +--- yconalyzer.cc.orig 2014-01-12 14:15:17.000000000 +0800 ++++ yconalyzer.cc 2014-01-12 14:17:49.000000000 +0800 +@@ -76,19 +76,11 @@ + + #include + +-#if __GNUC__ > 2 + #include +-using namespace _GLIBCXX_STD; ++using namespace std; + // Linux gcc-3 is not too happy with the format strings we use in BSD. + #define KEY_FMT_STRING "%#8x%#4x" + +-#else /* We are using gnu-c <= 2 */ +- +-#include +-#define KEY_FMT_STRING "%8ux%4hx" +- +-#endif +- + static int debug = 0; + static u_short port = 0; + static int nbuckets; diff --git a/Patches/zip/xcode15.diff b/Patches/zip/xcode15.diff new file mode 100644 index 0000000000000..16414e8164848 --- /dev/null +++ b/Patches/zip/xcode15.diff @@ -0,0 +1,42 @@ +diff -pur zip30/unix/configure zip30-patched/unix/configure +--- zip30/unix/configure 2008-06-20 05:32:20 ++++ zip30-patched/unix/configure 2023-10-04 10:46:52 +@@ -513,13 +513,16 @@ do + do + echo Check for $func + echo "int main(){ $func(); return 0; }" > conftest.c +- $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null ++ $CC $BFLAG -Wno-implicit-function-declaration -o conftest conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`" + done + + + echo Check for memset +-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c ++cat > conftest.c << _EOF_ ++#include ++int main(){ char k; memset(&k,0,0); return 0; } ++_EOF_ + $CC -o conftest conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM" + +@@ -556,6 +559,7 @@ cat > conftest.c << _EOF_ + + echo Check for directory libraries + cat > conftest.c << _EOF_ ++#include + int main() { return closedir(opendir(".")); } + _EOF_ + +@@ -578,7 +582,10 @@ echo Check for readlink + # Dynix/ptx 1.3 needed this + + echo Check for readlink +-echo "int main(){ return readlink(); }" > conftest.c ++cat > conftest.c << _EOF_ ++#include ++int main(){ return readlink(); } ++_EOF_ + $CC -o conftest conftest.c >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + $CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null diff --git a/README.md b/README.md index 8fbc9360dcee8..413de2521c7b9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ # Homebrew Core + Core formulae for the Homebrew package manager. + [Homebrew/discussions (forum)](https://github.com/orgs/Homebrew/discussions) + ## How do I install these formulae? + Just `brew install `. This is the default tap for Homebrew and is installed by default. ## More Documentation, Troubleshooting, Contributing, Security, Community, Donations, License and Sponsors + See these sections in [Homebrew/brew's README](https://github.com/Homebrew/brew#homebrew). diff --git a/audit_exceptions/cert_error_allowlist.json b/audit_exceptions/cert_error_allowlist.json new file mode 100644 index 0000000000000..0967ef424bce6 --- /dev/null +++ b/audit_exceptions/cert_error_allowlist.json @@ -0,0 +1 @@ +{} diff --git a/audit_exceptions/eol_date_blocklist.json b/audit_exceptions/eol_date_blocklist.json new file mode 100644 index 0000000000000..dc086fef48a08 --- /dev/null +++ b/audit_exceptions/eol_date_blocklist.json @@ -0,0 +1,6 @@ +{ + "cake": true, + "mac": true, + "spark": true, + "qt": true +} diff --git a/audit_exceptions/flat_namespace_allowlist.json b/audit_exceptions/flat_namespace_allowlist.json new file mode 100644 index 0000000000000..f670f96863c57 --- /dev/null +++ b/audit_exceptions/flat_namespace_allowlist.json @@ -0,0 +1,25 @@ +[ + "adios2", + "arpack", + "bind", + "blast", + "cp2k", + "e2fsprogs", + "gnuradio", + "hdf5-mpi", + "libvirt", + "mpich", + "omniorb", + "open-mpi", + "pypy", + "pypy3.10", + "pypy3.9", + "scalapack", + "soapysdr", + "soci", + "syslog-ng", + "tcl-tk@8", + "uhd", + "xmlrpc-c", + "xvid" +] diff --git a/audit_exceptions/github_prerelease_allowlist.json b/audit_exceptions/github_prerelease_allowlist.json new file mode 100644 index 0000000000000..d21db6679793d --- /dev/null +++ b/audit_exceptions/github_prerelease_allowlist.json @@ -0,0 +1,10 @@ +{ + "aws-crt-cpp": "all", + "codevis": "all", + "get-flash-videos": "1.25.99.03", + "gitless": "0.8.8", + "grt": "0.2.4", + "joshuto": "all", + "libesedb": "20240420", + "polynote": "all" +} diff --git a/audit_exceptions/gitlab_prerelease_allowlist.json b/audit_exceptions/gitlab_prerelease_allowlist.json new file mode 100644 index 0000000000000..0967ef424bce6 --- /dev/null +++ b/audit_exceptions/gitlab_prerelease_allowlist.json @@ -0,0 +1 @@ +{} diff --git a/audit_exceptions/gnome_devel_allowlist.json b/audit_exceptions/gnome_devel_allowlist.json new file mode 100644 index 0000000000000..151968d4ad10d --- /dev/null +++ b/audit_exceptions/gnome_devel_allowlist.json @@ -0,0 +1,18 @@ +{ + "gcr": "all", + "gnome-autoar": "all", + "gom": "all", + "gtk-doc": "all", + "gtk-mac-integration": "all", + "gtk-vnc": "all", + "libadwaita": "all", + "libart": "all", + "libepoxy": "all", + "librsvg": "all", + "libsecret": "all", + "libshumate": "all", + "libxml2": "all", + "libxslt": "all", + "pango": "all", + "tinysparql": "all" +} diff --git a/audit_exceptions/head_non_default_branch_allowlist.json b/audit_exceptions/head_non_default_branch_allowlist.json new file mode 100644 index 0000000000000..554b1193f54af --- /dev/null +++ b/audit_exceptions/head_non_default_branch_allowlist.json @@ -0,0 +1,15 @@ +{ + "awscli": "v2", + "botan@2": "release-2", + "cabal-install": "3.16", + "flarectl": "v0", + "libngspice": "master", + "msgpack": "c_master", + "msgpack-cxx": "cpp_master", + "ngspice": "master", + "r3": "master", + "sdl2": "SDL2", + "stlink": "develop", + "swiftformat": "develop", + "xmrig": "dev" +} diff --git a/audit_exceptions/linux_only_gcc_dependency_allowlist.json b/audit_exceptions/linux_only_gcc_dependency_allowlist.json new file mode 100644 index 0000000000000..4d30de6292483 --- /dev/null +++ b/audit_exceptions/linux_only_gcc_dependency_allowlist.json @@ -0,0 +1,3 @@ +[ + "libunicode" +] diff --git a/audit_exceptions/mismatched_binary_allowlist.json b/audit_exceptions/mismatched_binary_allowlist.json new file mode 100644 index 0000000000000..f25b4123c72f1 --- /dev/null +++ b/audit_exceptions/mismatched_binary_allowlist.json @@ -0,0 +1,15 @@ +{ + "afl++": "share/afl/testcases/others/elf/small_exec.elf", + "aws-sam-cli": "libexec/lib/python*/site-packages/samcli/local/rapid/aws-lambda-rie-*", + "balena-cli": "**/*", + "elf2uf2-rs": "share/elf2uf2-rs/examples/*.elf", + "faust": "share/faust/android/app/lib/libsndfile/lib/*/libsndfile.so", + "ghidra": "libexec/docs/GhidraClass/ExerciseFiles/Advanced/*", + "i686-elf-grub": "lib/i686-elf/grub/i386-pc/*", + "lima": "share/lima/lima-guestagent.Linux-*", + "picotool": "share/picotool/*.elf", + "preevy": "libexec/lib/node_modules/preevy/node_modules/@preevy/compose-tunnel-agent/out/*.node", + "prestodb": "libexec/bin/procname/Linux-*/libprocname.so", + "qemu": "share/qemu/*", + "x86_64-elf-grub": "lib/x86_64-elf/grub/i386-pc/*" +} diff --git a/audit_exceptions/no_cpuid_allowlist.json b/audit_exceptions/no_cpuid_allowlist.json new file mode 100644 index 0000000000000..6986eb317754b --- /dev/null +++ b/audit_exceptions/no_cpuid_allowlist.json @@ -0,0 +1,3 @@ +[ + "aws-checksums" +] diff --git a/audit_exceptions/permitted_formula_license_mismatches.json b/audit_exceptions/permitted_formula_license_mismatches.json new file mode 100644 index 0000000000000..fe51488c7066f --- /dev/null +++ b/audit_exceptions/permitted_formula_license_mismatches.json @@ -0,0 +1 @@ +[] diff --git a/audit_exceptions/provided_by_macos_depends_on_allowlist.json b/audit_exceptions/provided_by_macos_depends_on_allowlist.json new file mode 100644 index 0000000000000..ff667c1e400c3 --- /dev/null +++ b/audit_exceptions/provided_by_macos_depends_on_allowlist.json @@ -0,0 +1,10 @@ +[ + "apr", + "apr-util", + "libarchive", + "libressl", + "llvm", + "openblas", + "openssl@3.0", + "openssl@3" +] diff --git a/audit_exceptions/relicensed_formulae_versions.json b/audit_exceptions/relicensed_formulae_versions.json new file mode 100644 index 0000000000000..3ad10d948a490 --- /dev/null +++ b/audit_exceptions/relicensed_formulae_versions.json @@ -0,0 +1,4 @@ +{ + "liquibase": "5.0.0", + "terraform": "1.6" +} diff --git a/audit_exceptions/universal_binary_allowlist.json b/audit_exceptions/universal_binary_allowlist.json new file mode 100644 index 0000000000000..d5d441a9ec11b --- /dev/null +++ b/audit_exceptions/universal_binary_allowlist.json @@ -0,0 +1,4 @@ +[ + "llvm", + "swift" +] diff --git a/audit_exceptions/unstable_allowlist.json b/audit_exceptions/unstable_allowlist.json new file mode 100644 index 0000000000000..accf34288e516 --- /dev/null +++ b/audit_exceptions/unstable_allowlist.json @@ -0,0 +1,14 @@ +{ + "aalib": "1.4rc", + "automysqlbackup": "3.0-rc", + "aview": "1.3.0rc", + "ftgl": "2.1.3-rc", + "libcaca": "0.99b", + "librasterlite2": "1.1.0-beta", + "premake": "5.0.0-beta", + "pwnat": "0.3-beta", + "recode": "3.7-beta", + "spatialite-gui": "2.1.0-beta", + "tcptraceroute": "1.5beta", + "vbindiff": "3.0_beta" +} diff --git a/audit_exceptions/unstable_devel_allowlist.json b/audit_exceptions/unstable_devel_allowlist.json new file mode 100644 index 0000000000000..0967ef424bce6 --- /dev/null +++ b/audit_exceptions/unstable_devel_allowlist.json @@ -0,0 +1 @@ +{} diff --git a/audit_exceptions/versioned_dependencies_conflicts_allowlist.json b/audit_exceptions/versioned_dependencies_conflicts_allowlist.json new file mode 100644 index 0000000000000..93b84504efbac --- /dev/null +++ b/audit_exceptions/versioned_dependencies_conflicts_allowlist.json @@ -0,0 +1,4 @@ +[ + "hive", + "opencoarrays" +] diff --git a/audit_exceptions/versioned_formula_dependent_conflicts_allowlist.json b/audit_exceptions/versioned_formula_dependent_conflicts_allowlist.json new file mode 100644 index 0000000000000..f583229b77cf8 --- /dev/null +++ b/audit_exceptions/versioned_formula_dependent_conflicts_allowlist.json @@ -0,0 +1,3 @@ +[ + "python" +] diff --git a/audit_exceptions/versioned_head_spec_allowlist.json b/audit_exceptions/versioned_head_spec_allowlist.json new file mode 100644 index 0000000000000..4607ec1295245 --- /dev/null +++ b/audit_exceptions/versioned_head_spec_allowlist.json @@ -0,0 +1,6 @@ +[ + "bash-completion@2", + "botan@2", + "imagemagick@6", + "mbedtls@2" +] diff --git a/audit_exceptions/versioned_keg_only_allowlist.json b/audit_exceptions/versioned_keg_only_allowlist.json new file mode 100644 index 0000000000000..4cf9256e8b043 --- /dev/null +++ b/audit_exceptions/versioned_keg_only_allowlist.json @@ -0,0 +1,45 @@ +[ + "atkmm@2.28", + "autoconf@2.13", + "bash-completion@2", + "cairomm@1.14", + "clang-format@11", + "gcc@9", + "gcc@10", + "gcc@11", + "gcc@12", + "gcc@13", + "gcc@14", + "glibmm@2.66", + "gnupg@1.4", + "icu4c@77", + "libpeas@1", + "libsigc++@2", + "libxml++@3", + "libxml++@4", + "libxml++@5", + "linux-headers@5.15", + "openssl@3.0", + "openssl@3", + "pangomm@2.46", + "postgresql@14", + "pyqt@5", + "python@3.9", + "python@3.10", + "python@3.11", + "python@3.12", + "python@3.13", + "python@3.14", + "python-gdbm@3.11", + "python-gdbm@3.12", + "python-gdbm@3.13", + "python-gdbm@3.14", + "python-tk@3.9", + "python-tk@3.10", + "python-tk@3.11", + "python-tk@3.12", + "python-tk@3.13", + "python-tk@3.14", + "spidermonkey@115", + "wxwidgets@3.2" +] diff --git a/cmd/aspell-dictionaries.rb b/cmd/aspell-dictionaries.rb new file mode 100755 index 0000000000000..0b4a0c871ab37 --- /dev/null +++ b/cmd/aspell-dictionaries.rb @@ -0,0 +1,59 @@ +# typed: strict +# frozen_string_literal: true + +require "abstract_command" +require "resource" +require "formula" + +module Homebrew + module Cmd + class AspellDictionariesCmd < AbstractCommand + cmd_args do + usage_banner <<~EOS + `aspell-dictionaries` + + Generates the new dictionaries for the `aspell` formula. + EOS + end + + sig { override.void } + def run + dictionary_url = "https://ftpmirror.gnu.org/gnu/aspell/dict" + dictionary_mirror = "https://ftp.gnu.org/gnu/aspell/dict" + languages = {} + + index_output = Utils::Curl.curl_output("#{dictionary_url}/0index.html").stdout + index_output.split("").each do |line| + next unless line.start_with?(" 1 || + UNCHECKED_COMMIT_AUTHORS.include?(item.dig("commit", "author", "name")) || + UNCHECKED_COMMIT_AUTHORS.include?(item.dig("commit", "committer", "name")) + end + + response.map { |item| item.fetch("sha") } + end + + def commit_modifies_bottle_block?(sha) + owner, repo = ENV.fetch("GITHUB_REPOSITORY").split("/") + response = GitHub::API.open_rest(GitHub.url_to("repos", owner, repo, "commits", sha)) + + files = response.fetch("files") + files.reject! do |file| + next true if %w[renamed removed].include?(file.fetch("status")) + + filename = file.fetch("filename") + !filename.start_with?("Formula/") || !filename.end_with?(".rb") + end + + files.any? { |file| patch_modifies_bottle_block?(file.fetch("patch")) } + end + + def patch_modifies_bottle_block?(patch) + patch.lines.any? { |line| line.match?(MODIFIED_BOTTLE_BLOCK_REGEX) } + end + + def run + pr = args.named.first.to_i + commits = get_pull_request_commits(pr) + + odie "PR##{pr} modifies the bottle block" if commits.any? { |sha| commit_modifies_bottle_block?(sha) } + end + end + end +end diff --git a/cmd/check-ci-status.rb b/cmd/check-ci-status.rb new file mode 100755 index 0000000000000..965311477254d --- /dev/null +++ b/cmd/check-ci-status.rb @@ -0,0 +1,158 @@ +# typed: true +# frozen_string_literal: true + +require "abstract_command" + +module Homebrew + module Cmd + class CheckCiStatusCmd < AbstractCommand + cmd_args do + description <<~EOS + Check the status of CI tests. Used to determine whether tests can be + cancelled, or whether a long-timeout label can be removed. + EOS + + switch "--cancel", description: "Determine whether tests can be cancelled." + switch "--long-timeout-label", description: "Determine whether a long-timeout label can be removed." + + named_args :pull_request_number, number: 1 + + hide_from_man_page! + end + + GRAPHQL_WORKFLOW_RUN_QUERY = <<~GRAPHQL + query ($owner: String!, $name: String!, $pr: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $pr) { + commits(last: 1) { + nodes { + commit { + checkSuites(last: 100) { + nodes { + status + workflowRun { + event + databaseId + createdAt + workflow { + name + } + } + checkRuns(last: 100) { + nodes { + name + status + conclusion + databaseId + } + } + } + } + } + } + } + } + } + } + GRAPHQL + ALLOWABLE_REMAINING_MACOS_RUNNERS = 1 + + def get_workflow_run_status(pull_request) + @status_cache ||= {} + return @status_cache[pull_request] if @status_cache.include? pull_request + + owner, name = ENV.fetch("GITHUB_REPOSITORY").split("/") + variables = { + owner:, + name:, + pr: pull_request, + } + odebug "Checking CI status for #{owner}/#{name}##{pull_request}..." + + response = GitHub::API.open_graphql(GRAPHQL_WORKFLOW_RUN_QUERY, variables:, scopes: ["repo"].freeze) + commit_node = response.dig("repository", "pullRequest", "commits", "nodes", 0) + check_suite_nodes = commit_node.dig("commit", "checkSuites", "nodes") + ci_nodes = check_suite_nodes.select do |node| + workflow_run = node.fetch("workflowRun") + next false if workflow_run.blank? + + workflow_run.fetch("event") == "pull_request" && workflow_run.dig("workflow", "name") == "CI" + end + # There can be multiple CI nodes when a PR is closed and reopened. + # Make sure we use the latest one in this case. + ci_node = ci_nodes.max_by { |node| DateTime.parse(node.dig("workflowRun", "createdAt")) } + return [nil, nil] if ci_node.blank? + + check_run_nodes = ci_node.dig("checkRuns", "nodes") + + @status_cache[pull_request] = [ci_node, check_run_nodes] + [ci_node, check_run_nodes] + end + + def run_id_if_cancellable(pull_request) + ci_node, = get_workflow_run_status(pull_request) + return if ci_node.nil? + + # Possible values: COMPLETED, IN_PROGRESS, PENDING, QUEUED, REQUESTED, WAITING + # https://docs.github.com/en/graphql/reference/enums#checkstatusstateb + ci_status = ci_node.fetch("status") + odebug "CI status: #{ci_status}" + return if ci_status == "COMPLETED" + + ci_run_id = ci_node.dig("workflowRun", "databaseId") + odebug "CI run ID: #{ci_run_id}" + ci_run_id + end + + def allow_long_timeout_label_removal?(pull_request) + ci_node, check_run_nodes = get_workflow_run_status(pull_request) + return false if ci_node.nil? + + ci_status = ci_node.fetch("status") + odebug "CI status: #{ci_status}" + return true if ci_status == "COMPLETED" + + # The `test_deps` job is still waiting to be processed. + return false if check_run_nodes.none? { |node| node.fetch("name").end_with?("(deps)") } + + incomplete_macos_checks = check_run_nodes.select do |node| + check_run_status = node.fetch("status") + check_run_name = node.fetch("name") + odebug "#{check_run_name}: #{check_run_status}" + + check_run_status != "COMPLETED" && check_run_name.start_with?("macOS") + end + + incomplete_macos_checks.count <= ALLOWABLE_REMAINING_MACOS_RUNNERS + end + + def run + pr = args.named.first.to_i + + if !args.cancel? && !args.long_timeout_label? + raise UsageError, "At least one of `--cancel` and `--long-timeout-label` is needed." + end + + outputs = {} + + if args.cancel? + run_id = run_id_if_cancellable(pr) + outputs["cancellable-run-id"] = run_id.to_json + end + + if args.long_timeout_label? + allow_removal = allow_long_timeout_label_removal?(pr) + outputs["allow-long-timeout-label-removal"] = allow_removal + end + + github_output = ENV.fetch("GITHUB_OUTPUT") + File.open(github_output, "a") do |f| + outputs.each do |key, value| + odebug "#{key}: #{value}" + f.puts "#{key}=#{value}" + end + end + end + end + end +end diff --git a/cmd/check-ci-status.rbi b/cmd/check-ci-status.rbi new file mode 100644 index 0000000000000..131ecf76598a3 --- /dev/null +++ b/cmd/check-ci-status.rbi @@ -0,0 +1,14 @@ +# typed: strict + +class Homebrew::Cmd::CheckCiStatusCmd + sig { returns(Homebrew::Cmd::CheckCiStatusCmd::Args) } + def args; end +end + +class Homebrew::Cmd::CheckCiStatusCmd::Args < Homebrew::CLI::Args + sig { returns(T::Boolean) } + def cancel?; end + + sig { returns(T::Boolean) } + def long_timeout_label?; end +end diff --git a/cmd/determine-rebottle-runners.rb b/cmd/determine-rebottle-runners.rb new file mode 100755 index 0000000000000..23dbde0985e76 --- /dev/null +++ b/cmd/determine-rebottle-runners.rb @@ -0,0 +1,96 @@ +# typed: strict +# frozen_string_literal: true + +require "abstract_command" +require "formula" + +module Homebrew + module Cmd + class DetermineRebottleRunnersCmd < AbstractCommand + cmd_args do + usage_banner <<~EOS + `determine-rebottle-runners` + + Determines the runners to use to rebottle a formula. + EOS + + named_args number: 2 + + hide_from_man_page! + end + + sig { params(arch: Symbol, timeout: Integer).returns(T::Hash[Symbol, T.any(String, T::Hash[Symbol, String])]) } + def linux_runner_spec(arch, timeout) + linux_runner = if arch == :arm64 + "ubuntu-22.04-arm" + elsif timeout > 360 + "linux-self-hosted-1" + else + "ubuntu-latest" + end + + { + runner: linux_runner, + container: { + image: "ghcr.io/homebrew/ubuntu22.04:main", + options: "--user=linuxbrew -e GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED", + }, + workdir: "/github/home", + } + end + + KNOWN_LINUX_ARCHES = [:arm64, :x86_64].freeze + + sig { override.void } + def run + formula = Formula[T.must(args.named.first)] + timeout = args.named.second.to_i + + tags = formula.bottle_specification.collector.tags + runners = if tags.one? && tags.first.system == :all + # Build on all supported macOS versions and Linux. + [linux_runner_spec(:x86_64, timeout)] + MacOSVersion::SYMBOLS.keys.flat_map do |symbol| + macos_version = MacOSVersion.from_symbol(symbol) + if macos_version.outdated_release? || macos_version.prerelease? + nil + else + ephemeral_suffix = "-#{ENV.fetch("GITHUB_RUN_ID")}-dispatch" + macos_runners = [{ runner: "#{macos_version}-x86_64#{ephemeral_suffix}" }] + macos_runners << { runner: "#{macos_version}-arm64#{ephemeral_suffix}" } + macos_runners + end + end + else + tags.map do |tag| + macos_version = tag.to_macos_version + + if macos_version.outdated_release? + nil # Don't rebottle for older macOS versions (no CI to build them). + else + runner = macos_version.to_s + runner += "-#{tag.arch}" + runner += "-#{ENV.fetch("GITHUB_RUN_ID")}" + runner += "-dispatch" + + { runner: } + end + rescue MacOSVersion::Error + if tag.system == :linux && KNOWN_LINUX_ARCHES.include?(tag.arch) + linux_runner_spec(tag.arch, timeout) + elsif tag.system == :all + # An all bottle with OS-specific bottles also present - ignore it. + nil + else + raise "Unknown tag: #{tag}" + end + end + end.compact + + github_output = ENV.fetch("GITHUB_OUTPUT") { raise "GITHUB_OUTPUT is not defined" } + File.open(github_output, "a") do |f| + f.puts("runners=#{runners.to_json}") + end + end + end + end +end diff --git a/disabled_new_usr_local_relocation_formulae.json b/disabled_new_usr_local_relocation_formulae.json new file mode 100644 index 0000000000000..0823a286c8d35 --- /dev/null +++ b/disabled_new_usr_local_relocation_formulae.json @@ -0,0 +1,6 @@ +[ + "davmail", + "meson", + "rabbitmq", + "python-setuptools" +] diff --git a/formula_renames.json b/formula_renames.json index 39ff88370083f..fa064b7a79ae8 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -1,195 +1,192 @@ { - "ansible19": "ansible@19", - "ansible20": "ansible@20", - "antlr2": "antlr@2", - "antlr3": "antlr@3", - "apache-spark15": "apache-spark@15", - "apache-spark16": "apache-spark@16", - "app-engine-java-sdk": "app-engine-java", + "alloy": "alloy-analyzer", + "amtk": "libgedit-amtk", + "annie": "lux", + "ark": "velero", "arm": "nyx", - "artifactory-cli-go": "jfrog-cli-go", - "autoconf213": "autoconf@213", - "autoconf264": "autoconf@264", - "automake112": "automake@112", + "asciigen": "glyph", + "at-spi2-atk": "at-spi2-core", + "atk": "at-spi2-core", + "azion-cli": "azion", + "aztfy": "aztfexport", + "artifactory-cli-go": "jfrog-cli", + "badtouch": "authoscope", "bash-completion2": "bash-completion@2", - "bazel02": "bazel@0.2", "beanstalk": "beanstalkd", "berkeley-db4": "berkeley-db@4", "bigdata": "blazegraph", "bison27": "bison@2.7", - "boost-python159": "boost-python@1.59", - "boost155": "boost@1.55", - "boost157": "boost@1.57", - "boost159": "boost@1.59", - "boost160": "boost@1.60", "boot2docker": "docker-machine", - "camlistore": "perkeep", - "cassandra21": "cassandra@2.1", - "cassandra22": "cassandra@2.2", + "bro": "zeek", "cdiff": "ydiff", - "clang-format38": "clang-format@3.8", - "cloog-ppl015": "cloog@0.15", + "chipmunk": "chipmunk-physics", "cloog018": "cloog", + "cloudflare-wrangler2": "cloudflare-wrangler", "commonmark": "cmark", + "coq": "rocq", + "corepack": "node", "cppformat": "fmt", "crystal-lang": "crystal", + "cutter": "cutter-cli", + "curl-openssl": "curl", "cv": "progress", "cyassl": "wolfssl", + "dash": "dash-shell", "d-bus": "dbus", - "docker111": "docker@1.11", - "docker171": "docker@1.71", - "eigen32": "eigen@3.2", - "elasticsearch24": "elasticsearch@2.4", - "eris": "monax", - "erlang-r18": "erlang@18", + "docker-slim": "mintoolkit", "fbida": "exiftran", + "fcct": "butane", "ffmpeg28": "ffmpeg@2.8", - "fig": "docker-compose", "findbugs": "spotbugs", - "freetds091": "freetds@0.91", - "gcc46": "gcc@4.6", - "gcc47": "gcc@4.7", - "gcc48": "gcc@4.8", - "gcc49": "gcc@4.9", - "gcc5": "gcc@5", - "gcc6": "gcc@6", + "genai-toolbox": "mcp-toolbox", "geode": "apache-geode", "geth": "ethereum", "gitlab-ci-multi-runner": "gitlab-runner", - "giflib5": "giflib@5", "giflib@5": "giflib", - "glfw2": "glfw@2", + "glib-utils": "glib", + "glibmm@2.64": "glibmm@2.66", "glfw3": "glfw", - "gmp4": "gmp@4", - "gmt4": "gmt@4", + "gloo-ctl": "glooctl", + "gnatsd": "nats-server", "gnome-icon-theme": "adwaita-icon-theme", + "gnome-latex": "enter-tex", + "gnome-themes-standard": "gnome-themes-extra", + "gnu-cobol": "gnucobol", "gnupg2": "gnupg", - "gnuplot4": "gnuplot@4", - "go-app-engine-32": "app-engine-go-32", - "go-app-engine-64": "app-engine-go-64", - "go14": "go@1.4", - "go15": "go@1.5", - "go16": "go@1.6", - "google-app-engine": "app-engine-python", + "gold": "binutils", + "goplus": "xgo", "google-perftools": "gperftools", - "gradle214": "gradle@2.14", - "grails25": "grails@2.5", + "grakn": "typedb", + "grpc-swift": "protoc-gen-grpc-swift", "grunt": "grunt-cli", - "gsl1": "gsl@1", - "gst-plugins-bad010": "gst-plugins-bad@0.10", - "gst-plugins-base010": "gst-plugins-base@0.10", - "gst-plugins-good010": "gst-plugins-good@0.10", - "gst-plugins-ugly010": "gst-plugins-ugly@0.10", - "gstreamer010": "gstreamer@0.10", - "gtef": "tepl", + "gst-devtools": "gstreamer", + "gst-editing-services": "gstreamer", + "gst-libav": "gstreamer", + "gst-plugins-bad": "gstreamer", + "gst-plugins-base": "gstreamer", + "gst-plugins-good": "gstreamer", + "gst-plugins-rs": "gstreamer", + "gst-plugins-ugly": "gstreamer", + "gst-python": "gstreamer", + "gst-rtsp-server": "gstreamer", + "gst-validate": "gstreamer", + "gtk+4": "gtk4", "gtksourceview@4": "gtksourceview4", "gutenberg": "zola", - "hamsterdb": "upscaledb", - "heroku-toolbelt": "heroku", "hh": "hstr", + "hpp-fcl": "coal", + "ht-rust": "xh", "htop-osx": "htop", "httpd24": "httpd", - "influxdb08": "influxdb@0.8", - "isl011": "isl@0.11", - "isl012": "isl@0.12", - "isl014": "isl@0.14", - "jetty8": "jetty@8", - "jpeg6b": "jpeg@6", + "i386-elf-binutils": "x86_64-elf-binutils", + "i386-elf-gcc": "x86_64-elf-gcc", + "iccmax": "iccdev", + "iceberg": "iceberg-cli", + "interactive-rebase-tool": "git-interactive-rebase-tool", + "jfrog-cli-go": "jfrog-cli", "juju2": "juju", "juju@2.0": "juju", - "kibana41": "kibana@4.1", - "kibana44": "kibana@4.4", + "jupyter": "jupyterlab", + "kafkacat": "kcat", + "kde-extra-cmake-modules": "extra-cmake-modules", + "kde-karchive": "karchive", + "kde-kdoctools": "kdoctools", + "kde-ki18n": "ki18n", + "kde-threadweaver": "threadweaver", + "kertish-dfs": "kertish-dos", "kotlin-compiler": "kotlin", - "kubernetes-cli13": "kubernetes-cli@1.3", - "latexila": "gnome-latex", - "ledger26": "ledger@2.6", + "ksh": "ksh93", + "kubernetes-helm": "helm", + "ldb": "samba", "letsencrypt": "certbot", + "libbitcoin": "libbitcoin-system", "libcppa": "caf", + "libcython": "cython", "libmongoclient": "mongo-cxx-driver", - "libmpc08": "libmpc@0.8", - "libpng12": "libpng@1.2", - "libpqxx3": "libpqxx@3", - "libxml278": "libxml2@2.7", - "llvm38": "llvm@3.8", - "logstash24": "logstash@2.4", - "lua51": "lua@5.1", - "lua@5.3": "lua", - "mapnik2": "mapnik@2", - "mariadb100": "mariadb@10.0", + "libpython-tabulate": "python-tabulate", + "libsasl2": "cyrus-sasl", + "libtorch": "pytorch", + "libxml++3": "libxml++@3", + "limbo": "turso", + "llama": "walk", "mat": "mat2", - "maven31": "maven@3.1", - "maven32": "maven@3.2", + "minizip2": "minizip-ng", + "mist": "mist-cli", + "mkl-dnn": "onednn", + "moar": "moor", "mobile-shell": "mosh", "mongo-c": "mongo-c-driver", - "mongodb26": "mongodb@2.6", - "mongodb30": "mongodb@3.0", - "mongodb32": "mongodb@3.2", - "mpfr2": "mpfr@2", "mpich2": "mpich", - "mysql55": "mysql@5.5", - "mysql56": "mysql@5.6", + "mps-youtube": "yewtube", + "mr2": "zoro", + "mysql-connector-c": "mysql-client", + "nanopb-generator": "nanopb", "newsbeuter": "newsboat", "nimrod": "nim", - "node010": "node@0.10", - "node012": "node@0.12", - "node6-lts": "node@6", + "now-cli": "vercel-cli", + "nova": "nova-fairwinds", "objective-caml": "ocaml", "offline-imap": "offlineimap", + "onedrive": "onedrive-cli", + "open-cobol": "gnucobol", "opencv3": "opencv", - "open-mpi16": "open-mpi@1.6", "osh": "etsh", - "percona-server55": "percona-server@5.5", - "percona-server56": "percona-server@5.6", - "perl514": "perl@5.14", - "perl518": "perl@5.18", - "php71": "php@7.1", - "php72": "php@7.2", - "plt-racket": "racket", + "pangomm@2.42": "pangomm@2.46", + "parallelstl": "onedpl", + "pev": "readpe", + "poac": "cabin", "polarssl": "mbedtls", - "postgresql94": "postgresql@9.4", - "postgresql95": "postgresql@9.5", - "ppl011": "ppl@0.11", - "protobuf250": "protobuf@2.5", - "protobuf260": "protobuf@2.6", - "pyqt5": "pyqt", - "python3": "python", - "qt5": "qt", + "postgresql": "postgresql@14", + "prefligit": "prek", + "prest": "prestd", + "presto": "prestodb", + "prestosql": "trino", + "prql-compiler": "prqlc", + "pyqt5": "pyqt@5", + "python-certifi": "certifi", + "python-chardet": "chardet", + "python-cryptography": "cryptography", + "qt5": "qt@5", "racket": "minimal-racket", "rebar@3": "rebar3", "recipes": "gnome-recipes", + "repopack": "repomix", + "resin-cli": "balena-cli", + "richmd": "rich-cli", + "rio": "rio-terminal", "root6": "root", - "ruby187": "ruby@1.8", - "ruby20": "ruby@2.0", - "ruby23": "ruby@2.3", - "saltstack": "salt", - "scala210": "scala@2.10", - "scala211": "scala@2.11", + "rt-audio": "rtaudio", + "rtx": "mise", + "rustfmt": "rust", + "rustup-init": "rustup", "screenbrightness": "brightness", - "selenium-server-standalone245": "selenium-server-standalone@2.45", - "solr54": "solr@5.4", - "solr55": "solr@5.5", - "sonar": "sonarqube", + "sdl": "sdl12-compat", + "selenium-server-standalone": "selenium-server", + "server-go": "openiothub-server", + "shuttle": "shuttle-cli", + "singularity": "apptainer", + "sloth": "sloth-cli", "speedtest_cli": "speedtest-cli", - "srtp@1.5": "srtp@1.6", "ssreflect": "math-comp", - "stash-cli": "atlassian-cli", - "subversion18": "subversion@1.8", - "swig2": "swig@2", - "swig304": "swig@3.04", + "squirrel": "squirrel-lang", "tachyon": "alluxio", - "team-explorer-everywhere": "tee-clc", "tensorflow": "libtensorflow", - "thrift@0.90": "thrift@0.9", - "thrift090": "thrift@0.90", - "tomcat6": "tomcat@6", - "tomcat7": "tomcat@7", + "tepl": "libgedit-tepl", + "thors-serializer": "thors-mongo", + "todoist": "todoist-cli", + "todolist": "ultralist", + "tomee-jax-rs": "tomee-plus", + "tracker": "tinysparql", "transfig": "fig2dev", - "unison240": "unison@2.40", - "v8-315": "v8@3.15", - "varnish4": "varnish@4", - "vim74": "vim@7.4", + "transmission": "transmission-cli", + "trust-dns": "hickory-dns", + "twine-pypi": "twine", + "usbmuxd": "libusbmuxd", + "wcurl": "curl", + "weboob": "woob", "wires": "geckodriver", "wpcli-completion": "wp-cli-completion", - "zeromq32": "zeromq@3.2", - "zeromq40": "zeromq@4.0" + "wxmac": "wxwidgets", + "xkeyboardconfig": "xkeyboard-config", + "xu4": "scummvm" } diff --git a/style_exceptions/binary_bootstrap_formula_urls_allowlist.json b/style_exceptions/binary_bootstrap_formula_urls_allowlist.json new file mode 100644 index 0000000000000..5dd5fa33a483a --- /dev/null +++ b/style_exceptions/binary_bootstrap_formula_urls_allowlist.json @@ -0,0 +1,23 @@ +[ + "cabal-install", + "clozure-cl", + "crystal", + "fastbuild", + "fpc", + "ghc", + "ghc@9.10", + "ghc@9.2", + "ghc@9.4", + "ghc@9.6", + "ghc@9.8", + "go", + "ldc", + "mlton", + "openjdk", + "openjdk@11", + "openjdk@17", + "openjdk@21", + "openjdk@8", + "pypy", + "rust" +] diff --git a/style_exceptions/components_order_exceptions.json b/style_exceptions/components_order_exceptions.json new file mode 100644 index 0000000000000..0d4f101c7a37a --- /dev/null +++ b/style_exceptions/components_order_exceptions.json @@ -0,0 +1,2 @@ +[ +] diff --git a/style_exceptions/make_check_allowlist.json b/style_exceptions/make_check_allowlist.json new file mode 100644 index 0000000000000..a3168e8b482d2 --- /dev/null +++ b/style_exceptions/make_check_allowlist.json @@ -0,0 +1,28 @@ +[ + "aqbanking", + "beecrypt", + "bdw-gc", + "ccrypt", + "cryptopp", + "git", + "gmp", + "gnupg", + "gnupg@1.4", + "gnupg@2.2", + "google-sparsehash", + "jemalloc", + "jpeg-turbo", + "mosh", + "mpfr", + "nettle", + "ntbtls", + "open-mpi", + "openssl@3.0", + "openssl@3", + "p11-kit", + "pcre", + "protobuf", + "quictls", + "wolfssl", + "xz" +] diff --git a/style_exceptions/not_a_binary_url_prefix_allowlist.json b/style_exceptions/not_a_binary_url_prefix_allowlist.json new file mode 100644 index 0000000000000..de4dcf53470c3 --- /dev/null +++ b/style_exceptions/not_a_binary_url_prefix_allowlist.json @@ -0,0 +1,11 @@ +[ + "bittwist", + "cpm", + "cspice", + "flashrom", + "mlx", + "organize-tool", + "reattach-to-user-namespace", + "wallpaper", + "x264" +] diff --git a/style_exceptions/regex_case_sensitive_allowlist.json b/style_exceptions/regex_case_sensitive_allowlist.json new file mode 100644 index 0000000000000..fe51488c7066f --- /dev/null +++ b/style_exceptions/regex_case_sensitive_allowlist.json @@ -0,0 +1 @@ +[] diff --git a/style_exceptions/runtime_cpu_detection_allowlist.json b/style_exceptions/runtime_cpu_detection_allowlist.json new file mode 100644 index 0000000000000..2b80d16e3d343 --- /dev/null +++ b/style_exceptions/runtime_cpu_detection_allowlist.json @@ -0,0 +1,54 @@ +[ + "abseil", + "aom", + "aws-checksums", + "awscli", + "bitcoin", + "blis", + "botan", + "coreutils", + "cryfs", + "cryptopp", + "fftw", + "fio", + "groestlcoin", + "handbrake", + "highway", + "libpq", + "libpq@16", + "libpq@17", + "libvpx", + "mariadb", + "mariadb@10.11", + "mariadb@10.5", + "mariadb@10.6", + "mariadb@11.4", + "mariadb@11.8", + "nsd", + "nss", + "onnxruntime", + "openblas", + "openblas64", + "opencv", + "open-mpi", + "postgresql@12", + "postgresql@13", + "postgresql@14", + "postgresql@15", + "postgresql@16", + "postgresql@17", + "postgresql@18", + "pytorch", + "qt", + "qt@5", + "qtbase", + "qtwebengine", + "spades", + "spidermonkey", + "svt-av1", + "vc", + "wiredtiger", + "x265", + "xxhash", + "zlib-ng-compat" +] diff --git a/style_exceptions/versioned_formulae_conflicts_allowlist.json b/style_exceptions/versioned_formulae_conflicts_allowlist.json new file mode 100644 index 0000000000000..e1de91051dc94 --- /dev/null +++ b/style_exceptions/versioned_formulae_conflicts_allowlist.json @@ -0,0 +1,3 @@ +[ + "bash-completion@2" +] diff --git a/synced_versions_formulae.json b/synced_versions_formulae.json new file mode 100644 index 0000000000000..90e39e0b4e338 --- /dev/null +++ b/synced_versions_formulae.json @@ -0,0 +1,126 @@ +[ + [ + "aarch64-elf-binutils", + "arm-linux-gnueabihf-binutils", + "arm-none-eabi-binutils", + "binutils", + "i686-elf-binutils", + "m68k-elf-binutils", + "riscv64-elf-binutils", + "x86_64-elf-binutils", + "x86_64-linux-gnu-binutils" + ], + ["apache-arrow", "apache-arrow-glib"], + ["avro-c", "avro-cpp", "avro-tools"], + ["b3sum", "blake3"], + ["baresip", "libre"], + ["htslib", "samtools"], + ["boost", "boost-bcp", "boost-build", "boost-mpi", "boost-python3"], + ["bundler-completion", "gem-completion", "rails-completion", "rake-completion", "ruby-completion"], + ["cmake", "cmake-docs"], + ["dbhash", "lemon", "sqldiff", "sqlite", "sqlite-analyzer", "sqlite-rsync"], + ["dmd", "dtools"], + ["docker", "docker-completion"], + ["etl", "synfig"], + ["file-formula", "libmagic"], + ["edencommon", "fb303", "fbthrift", "fizz", "folly", "mvfst", "proxygen", "wangle", "watchman"], + ["extra-cmake-modules", "karchive", "kdoctools", "ki18n", "ktexttemplate", "threadweaver"], + ["gcc", "libgccjit"], + ["gdb", "aarch64-elf-gdb", "arm-none-eabi-gdb", "i386-elf-gdb", "riscv64-elf-gdb", "x86_64-elf-gdb"], + ["git", "git-credential-libsecret", "git-gui", "git-svn"], + ["gnome-online-accounts", "libgoa"], + ["hdf5", "hdf5-mpi"], + ["ilmbase", "openexr@2"], + ["libmediainfo", "media-info"], + ["libnetworkit", "networkit"], + ["libnghttp2", "nghttp2"], + ["libngspice", "ngspice"], + ["libnice", "libnice-gstreamer"], + ["libtorrent-rakshasa", "rtorrent"], + ["lima", "lima-additional-guestagents"], + ["llvm", "lld", "flang", "wasi-runtimes"], + ["logcli", "loki", "promtail"], + ["qalculate-gtk", "qalculate-qt"], + ["mame", "rom-tools"], + ["mecab-unidic", "mecab-unidic-extended"], + ["micropython", "mpremote"], + ["moarvm", "nqp", "rakudo"], + ["moreutils", "sponge"], + ["mupdf", "mupdf-tools"], + ["mysql", "mysql-client"], + ["notmuch", "notmuch-mutt"], + ["openssh", "ssh-copy-id"], + ["petsc", "petsc-complex"], + ["php", "php-intl"], + ["poppler", "poppler-qt5"], + ["protoc-gen-gogo", "protoc-gen-gogofaster"], + ["python-tk@3.10", "python@3.10"], + ["python-gdbm@3.11", "python-tk@3.11", "python@3.11"], + ["python-gdbm@3.12", "python-tk@3.12", "python@3.12"], + ["python-gdbm@3.13", "python-tk@3.13", "python@3.13"], + ["python-gdbm@3.14", "python-tk@3.14", "python@3.14", "python-freethreading"], + ["python-tk@3.9", "python@3.9"], + [ + "qt", + "qt-libiodbc", + "qt-mariadb", + "qt-mysql", + "qt-percona-server", + "qt-postgresql", + "qt-unixodbc", + "qt3d", + "qt5compat", + "qtbase", + "qtcharts", + "qtconnectivity", + "qtdatavis3d", + "qtdeclarative", + "qtgraphs", + "qtgrpc", + "qthttpserver", + "qtimageformats", + "qtlanguageserver", + "qtlocation", + "qtlottie", + "qtmultimedia", + "qtnetworkauth", + "qtpositioning", + "qtquick3d", + "qtquick3dphysics", + "qtquickeffectmaker", + "qtquicktimeline", + "qtremoteobjects", + "qtscxml", + "qtsensors", + "qtserialbus", + "qtserialport", + "qtshadertools", + "qtspeech", + "qtsvg", + "qttools", + "qttranslations", + "qtvirtualkeyboard", + "qtwayland", + "qtwebchannel", + "qtwebengine", + "qtwebsockets", + "qtwebview" + ], + ["qwt", "qwt-qt5"], + [ + "spirv-headers", + "spirv-tools", + "vulkan-extensionlayer", + "vulkan-headers", + "vulkan-loader", + "vulkan-profiles", + "vulkan-tools", + "vulkan-utility-libraries", + "vulkan-validationlayers" + ], + ["surelog", "uhdm"], + ["technitium-dns", "technitium-library"], + ["tmuxinator", "tmuxinator-completion"], + ["tree-sitter", "tree-sitter-cli"], + ["wp-cli", "wp-cli-completion"] +] diff --git a/tap_migrations.json b/tap_migrations.json index d81960610e3a1..58b8f1742bd2f 100644 --- a/tap_migrations.json +++ b/tap_migrations.json @@ -1,5 +1,4 @@ { - "adobe-air-sdk": "homebrew/cask", "android-ndk": "homebrew/cask", "android-platform-tools": "homebrew/cask", "android-sdk": "homebrew/cask", @@ -7,24 +6,32 @@ "app-engine-go-64": "homebrew/cask/google-cloud-sdk", "avidemux": "homebrew/cask", "chromedriver": "homebrew/cask", - "cmucl": "homebrew/cask", "cockatrice": "homebrew/cask", - "crystax-ndk": "homebrew/cask", + "codex": "homebrew/cask", + "consul": "homebrew/cask", "corelocationcli": "homebrew/cask", "dwarf-fortress": "homebrew/cask", "geany": "homebrew/cask", + "gearboy": "homebrew/cask", + "gearsystem": "homebrew/cask", "gimp": "homebrew/cask", "grads": "homebrew/cask", "gtkwave": "homebrew/cask", "horndis": "homebrew/cask", "inkscape": "homebrew/cask", - "jsl": "homebrew/cask", - "kdiff3": "homebrew/cask", + "joplin": "homebrew/cask", "keybase": "homebrew/cask", + "luanti": "homebrew/cask", "meld": "homebrew/cask", + "minetest": "homebrew/cask/luanti", + "mitmproxy": "homebrew/cask", + "openrct2": "homebrew/cask", + "openttd": "homebrew/cask", "osxfuse": "homebrew/cask", "phantomjs": "homebrew/cask", "quassel": "homebrew/cask", + "schismtracker": "homebrew/cask/schism-tracker", "transmission-remote-gtk": "homebrew/cask/transmission-remote-gui", - "tuntap": "homebrew/cask" + "truetree": "homebrew/cask", + "wesnoth": "homebrew/cask/the-battle-for-wesnoth" }